From 75ee3b30e2c60a4587aeaea25e155f3610ca6653 Mon Sep 17 00:00:00 2001 From: KimLS Date: Sun, 16 Jul 2017 22:29:52 -0700 Subject: [PATCH 001/670] Support for races up to waypoint node race, wip on interface for pathfinding to support both kinds. --- zone/CMakeLists.txt | 5 +++++ zone/command.cpp | 4 ++-- zone/pathing.cpp | 13 +++---------- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/zone/CMakeLists.txt b/zone/CMakeLists.txt index 0c2c9bd63..5eb161cf5 100644 --- a/zone/CMakeLists.txt +++ b/zone/CMakeLists.txt @@ -84,6 +84,8 @@ SET(zone_sources npc_ai.cpp object.cpp oriented_bounding_box.cpp + pathfinder_nav_mesh.cpp + pathfinder_waypoint.cpp pathing.cpp perl_client.cpp perl_doors.cpp @@ -197,6 +199,9 @@ SET(zone_headers npc_ai.h object.h oriented_bounding_box.h + pathfinder_interface.h + pathfinder_nav_mesh.h + pathfinder_waypoint.h pathing.h perlpacket.h petitions.h diff --git a/zone/command.cpp b/zone/command.cpp index cbcdf6bb3..9463e2484 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -2317,13 +2317,13 @@ void command_race(Client *c, const Seperator *sep) Mob *t=c->CastToMob(); // Need to figure out max race for LoY/LDoN: going with upper bound of 500 now for testing - if (sep->IsNumber(1) && atoi(sep->arg[1]) >= 0 && atoi(sep->arg[1]) <= 724) { + if (sep->IsNumber(1) && atoi(sep->arg[1]) >= 0 && atoi(sep->arg[1]) <= 2259) { if ((c->GetTarget()) && c->Admin() >= commandRaceOthers) t=c->GetTarget(); t->SendIllusionPacket(atoi(sep->arg[1])); } else - c->Message(0, "Usage: #race [0-724] (0 for back to normal)"); + c->Message(0, "Usage: #race [0-2259] (0 for back to normal)"); } void command_gender(Client *c, const Seperator *sep) diff --git a/zone/pathing.cpp b/zone/pathing.cpp index 25d996eac..35e3edcb3 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -549,18 +549,11 @@ void PathManager::SpawnPathNodes() auto npc_type = new NPCType; memset(npc_type, 0, sizeof(NPCType)); - if(PathNodes[i].id < 10) - sprintf(npc_type->name, "%s", DigitToWord(PathNodes[i].id)); - else if(PathNodes[i].id < 100) - sprintf(npc_type->name, "%s_%s", DigitToWord(PathNodes[i].id/10), DigitToWord(PathNodes[i].id % 10)); - else - sprintf(npc_type->name, "%s_%s_%s", DigitToWord(PathNodes[i].id/100), DigitToWord((PathNodes[i].id % 100)/10), - DigitToWord(((PathNodes[i].id % 100) %10))); - - sprintf(npc_type->lastname, "%i", PathNodes[i].id); + auto c = PathNodes[i].id / 1000u; + sprintf(npc_type->name, "Node%u", c); npc_type->cur_hp = 4000000; npc_type->max_hp = 4000000; - npc_type->race = 151; + npc_type->race = 2254; npc_type->gender = 2; npc_type->class_ = 9; npc_type->deity= 1; From 596e3b28b5cb29a9c7f63154aafa1018caccf53a Mon Sep 17 00:00:00 2001 From: KimLS Date: Sun, 16 Jul 2017 22:30:19 -0700 Subject: [PATCH 002/670] Actually add the interface files --- zone/pathfinder_interface.h | 0 zone/pathfinder_nav_mesh.cpp | 0 zone/pathfinder_nav_mesh.h | 0 zone/pathfinder_waypoint.cpp | 0 zone/pathfinder_waypoint.h | 0 5 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 zone/pathfinder_interface.h create mode 100644 zone/pathfinder_nav_mesh.cpp create mode 100644 zone/pathfinder_nav_mesh.h create mode 100644 zone/pathfinder_waypoint.cpp create mode 100644 zone/pathfinder_waypoint.h diff --git a/zone/pathfinder_interface.h b/zone/pathfinder_interface.h new file mode 100644 index 000000000..e69de29bb diff --git a/zone/pathfinder_nav_mesh.cpp b/zone/pathfinder_nav_mesh.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/zone/pathfinder_nav_mesh.h b/zone/pathfinder_nav_mesh.h new file mode 100644 index 000000000..e69de29bb diff --git a/zone/pathfinder_waypoint.cpp b/zone/pathfinder_waypoint.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/zone/pathfinder_waypoint.h b/zone/pathfinder_waypoint.h new file mode 100644 index 000000000..e69de29bb From 5f1063acb9440d80078e253557b96aa769377635 Mon Sep 17 00:00:00 2001 From: KimLS Date: Tue, 18 Jul 2017 00:01:59 -0700 Subject: [PATCH 003/670] Add pathfinding interfaces, still heavily wip --- zone/CMakeLists.txt | 3 + zone/bot.cpp | 28 +- zone/client_packet.cpp | 244 +++++++------- zone/command.cpp | 612 +++++++++++++++++----------------- zone/entity.cpp | 20 -- zone/entity.h | 1 - zone/fearpath.cpp | 25 +- zone/lua_mob.cpp | 13 - zone/lua_mob.h | 2 - zone/merc.cpp | 16 +- zone/mob.cpp | 12 - zone/mob.h | 15 +- zone/mob_ai.cpp | 38 +-- zone/pathfinder_interface.cpp | 7 + zone/pathfinder_interface.h | 18 + zone/pathfinder_nav_mesh.h | 3 + zone/pathfinder_null.cpp | 15 + zone/pathfinder_null.h | 13 + zone/pathfinder_waypoint.h | 13 + zone/pathing.cpp | 495 ++++----------------------- zone/pathing.h | 27 +- zone/perl_mob.cpp | 38 --- zone/questmgr.cpp | 133 ++++---- zone/waypoints.cpp | 85 +---- zone/zone.cpp | 6 +- zone/zone.h | 4 +- 26 files changed, 705 insertions(+), 1181 deletions(-) create mode 100644 zone/pathfinder_interface.cpp create mode 100644 zone/pathfinder_null.cpp create mode 100644 zone/pathfinder_null.h diff --git a/zone/CMakeLists.txt b/zone/CMakeLists.txt index 5eb161cf5..907a47192 100644 --- a/zone/CMakeLists.txt +++ b/zone/CMakeLists.txt @@ -84,7 +84,9 @@ SET(zone_sources npc_ai.cpp object.cpp oriented_bounding_box.cpp + pathfinder_interface.cpp pathfinder_nav_mesh.cpp + pathfinder_null.cpp pathfinder_waypoint.cpp pathing.cpp perl_client.cpp @@ -201,6 +203,7 @@ SET(zone_headers oriented_bounding_box.h pathfinder_interface.h pathfinder_nav_mesh.h + pathfinder_null.h pathfinder_waypoint.h pathing.h perlpacket.h diff --git a/zone/bot.cpp b/zone/bot.cpp index f5a9285a3..834aa7bd6 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -2165,7 +2165,7 @@ void Bot::AI_Process() { } else if(!IsRooted()) { if(GetTarget() && GetTarget()->GetHateTop() && GetTarget()->GetHateTop() != this) { Log(Logs::Detail, Logs::AI, "Returning to location prior to being summoned."); - CalculateNewPosition2(m_PreSummonLocation.x, m_PreSummonLocation.y, m_PreSummonLocation.z, GetBotRunspeed()); + CalculateNewPosition(m_PreSummonLocation.x, m_PreSummonLocation.y, m_PreSummonLocation.z, GetBotRunspeed()); SetHeading(CalculateHeadingToTarget(m_PreSummonLocation.x, m_PreSummonLocation.y)); return; } @@ -2256,12 +2256,12 @@ void Bot::AI_Process() { if (WaypointChanged) tar_ndx = 20; - CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetBotRunspeed()); + CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetBotRunspeed()); } else { Mob* follow = entity_list.GetMob(GetFollowID()); if (follow) - CalculateNewPosition2(follow->GetX(), follow->GetY(), follow->GetZ(), GetBotRunspeed()); + CalculateNewPosition(follow->GetX(), follow->GetY(), follow->GetZ(), GetBotRunspeed()); } return; @@ -2352,7 +2352,7 @@ void Bot::AI_Process() { float newZ = 0; FaceTarget(GetTarget()); if (PlotPositionAroundTarget(this, newX, newY, newZ)) { - CalculateNewPosition2(newX, newY, newZ, GetBotRunspeed()); + CalculateNewPosition(newX, newY, newZ, GetBotRunspeed()); return; } } @@ -2364,7 +2364,7 @@ void Bot::AI_Process() { float newY = 0; float newZ = 0; if (PlotPositionAroundTarget(GetTarget(), newX, newY, newZ)) { - CalculateNewPosition2(newX, newY, newZ, GetBotRunspeed()); + CalculateNewPosition(newX, newY, newZ, GetBotRunspeed()); return; } } @@ -2375,7 +2375,7 @@ void Bot::AI_Process() { float newY = 0; float newZ = 0; if (PlotPositionAroundTarget(GetTarget(), newX, newY, newZ, false) && GetArchetype() != ARCHETYPE_CASTER) { - CalculateNewPosition2(newX, newY, newZ, GetBotRunspeed()); + CalculateNewPosition(newX, newY, newZ, GetBotRunspeed()); return; } } @@ -2500,7 +2500,7 @@ void Bot::AI_Process() { if (AI_movement_timer->Check()) { if(!IsRooted()) { Log(Logs::Detail, Logs::AI, "Pursuing %s while engaged.", GetTarget()->GetCleanName()); - CalculateNewPosition2(GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ(), GetBotRunspeed()); + CalculateNewPosition(GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ(), GetBotRunspeed()); return; } @@ -2560,10 +2560,10 @@ void Bot::AI_Process() { if (WaypointChanged) tar_ndx = 20; - CalculateNewPosition2(Goal.x, Goal.y, Goal.z, speed); + CalculateNewPosition(Goal.x, Goal.y, Goal.z, speed); } else { - CalculateNewPosition2(follow->GetX(), follow->GetY(), follow->GetZ(), speed); + CalculateNewPosition(follow->GetX(), follow->GetY(), follow->GetZ(), speed); } if (rest_timer.Enabled()) @@ -2643,14 +2643,14 @@ void Bot::PetAIProcess() { if(botPet->GetClass() == ROGUE && !petHasAggro && !botPet->BehindMob(botPet->GetTarget(), botPet->GetX(), botPet->GetY())) { // Move the rogue to behind the mob if(botPet->PlotPositionAroundTarget(botPet->GetTarget(), newX, newY, newZ)) { - botPet->CalculateNewPosition2(newX, newY, newZ, botPet->GetRunspeed()); + botPet->CalculateNewPosition(newX, newY, newZ, botPet->GetRunspeed()); return; } } else if(GetTarget() == botPet->GetTarget() && !petHasAggro && !botPet->BehindMob(botPet->GetTarget(), botPet->GetX(), botPet->GetY())) { // If the bot owner and the bot are fighting the same mob, then move the pet to the rear arc of the mob if(botPet->PlotPositionAroundTarget(botPet->GetTarget(), newX, newY, newZ)) { - botPet->CalculateNewPosition2(newX, newY, newZ, botPet->GetRunspeed()); + botPet->CalculateNewPosition(newX, newY, newZ, botPet->GetRunspeed()); return; } } @@ -2665,7 +2665,7 @@ void Bot::PetAIProcess() { moveBehindMob = true; if(botPet->PlotPositionAroundTarget(botPet->GetTarget(), newX, newY, newZ, moveBehindMob)) { - botPet->CalculateNewPosition2(newX, newY, newZ, botPet->GetRunspeed()); + botPet->CalculateNewPosition(newX, newY, newZ, botPet->GetRunspeed()); return; } } @@ -2748,7 +2748,7 @@ void Bot::PetAIProcess() { botPet->SetRunAnimSpeed(0); if(!botPet->IsRooted()) { Log(Logs::Detail, Logs::AI, "Pursuing %s while engaged.", botPet->GetTarget()->GetCleanName()); - botPet->CalculateNewPosition2(botPet->GetTarget()->GetX(), botPet->GetTarget()->GetY(), botPet->GetTarget()->GetZ(), botPet->GetOwner()->GetRunspeed()); + botPet->CalculateNewPosition(botPet->GetTarget()->GetX(), botPet->GetTarget()->GetY(), botPet->GetTarget()->GetZ(), botPet->GetOwner()->GetRunspeed()); return; } else { botPet->SetHeading(botPet->GetTarget()->GetHeading()); @@ -2776,7 +2776,7 @@ void Bot::PetAIProcess() { float dist = DistanceSquared(botPet->GetPosition(), botPet->GetTarget()->GetPosition()); botPet->SetRunAnimSpeed(0); if(dist > 184) { - botPet->CalculateNewPosition2(botPet->GetTarget()->GetX(), botPet->GetTarget()->GetY(), botPet->GetTarget()->GetZ(), botPet->GetTarget()->GetRunspeed()); + botPet->CalculateNewPosition(botPet->GetTarget()->GetX(), botPet->GetTarget()->GetY(), botPet->GetTarget()->GetZ(), botPet->GetTarget()->GetRunspeed()); return; } else { botPet->SetHeading(botPet->GetTarget()->GetHeading()); diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index e8ae68e69..dbf09faa3 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -5688,128 +5688,128 @@ void Client::Handle_OP_FeignDeath(const EQApplicationPacket *app) void Client::Handle_OP_FindPersonRequest(const EQApplicationPacket *app) { - if (app->size != sizeof(FindPersonRequest_Struct)) - printf("Error in FindPersonRequest_Struct. Expected size of: %zu, but got: %i\n", sizeof(FindPersonRequest_Struct), app->size); - else { - FindPersonRequest_Struct* t = (FindPersonRequest_Struct*)app->pBuffer; - - std::vector points; - Mob* target = entity_list.GetMob(t->npc_id); - - if (target == nullptr) { - //empty length packet == not found. - EQApplicationPacket outapp(OP_FindPersonReply, 0); - QueuePacket(&outapp); - return; - } - - if (!RuleB(Pathing, Find) && RuleB(Bazaar, EnableWarpToTrader) && target->IsClient() && (target->CastToClient()->Trader || - target->CastToClient()->Buyer)) { - Message(15, "Moving you to Trader %s", target->GetName()); - MovePC(zone->GetZoneID(), zone->GetInstanceID(), target->GetX(), target->GetY(), target->GetZ(), 0.0f); - } - - if (!RuleB(Pathing, Find) || !zone->pathing) - { - //fill in the path array... - // - points.resize(2); - points[0].x = GetX(); - points[0].y = GetY(); - points[0].z = GetZ(); - points[1].x = target->GetX(); - points[1].y = target->GetY(); - points[1].z = target->GetZ(); - } - else - { - glm::vec3 Start(GetX(), GetY(), GetZ() + (GetSize() < 6.0 ? 6 : GetSize()) * HEAD_POSITION); - glm::vec3 End(target->GetX(), target->GetY(), target->GetZ() + (target->GetSize() < 6.0 ? 6 : target->GetSize()) * HEAD_POSITION); - - if (!zone->zonemap->LineIntersectsZone(Start, End, 1.0f, nullptr) && zone->pathing->NoHazards(Start, End)) - { - points.resize(2); - points[0].x = Start.x; - points[0].y = Start.y; - points[0].z = Start.z; - - points[1].x = End.x; - points[1].y = End.y; - points[1].z = End.z; - - } - else - { - std::deque pathlist = zone->pathing->FindRoute(Start, End); - - if (pathlist.empty()) - { - EQApplicationPacket outapp(OP_FindPersonReply, 0); - QueuePacket(&outapp); - return; - } - - //the client seems to have issues with packets larger than this - if (pathlist.size() > 36) - { - EQApplicationPacket outapp(OP_FindPersonReply, 0); - QueuePacket(&outapp); - return; - } - - // Live appears to send the points in this order: - // Final destination. - // Current Position. - // rest of the points. - FindPerson_Point p; - - int PointNumber = 0; - - bool LeadsToTeleporter = false; - - glm::vec3 v = zone->pathing->GetPathNodeCoordinates(pathlist.back()); - - p.x = v.x; - p.y = v.y; - p.z = v.z; - points.push_back(p); - - p.x = GetX(); - p.y = GetY(); - p.z = GetZ(); - points.push_back(p); - - for (auto Iterator = pathlist.begin(); Iterator != pathlist.end(); ++Iterator) - { - if ((*Iterator) == -1) // Teleporter - { - LeadsToTeleporter = true; - break; - } - - glm::vec3 v = zone->pathing->GetPathNodeCoordinates((*Iterator), false); - p.x = v.x; - p.y = v.y; - p.z = v.z; - points.push_back(p); - ++PointNumber; - } - - if (!LeadsToTeleporter) - { - p.x = target->GetX(); - p.y = target->GetY(); - p.z = target->GetZ(); - - points.push_back(p); - } - - } - } - - SendPathPacket(points); - } - return; + //if (app->size != sizeof(FindPersonRequest_Struct)) + // printf("Error in FindPersonRequest_Struct. Expected size of: %zu, but got: %i\n", sizeof(FindPersonRequest_Struct), app->size); + //else { + // FindPersonRequest_Struct* t = (FindPersonRequest_Struct*)app->pBuffer; + // + // std::vector points; + // Mob* target = entity_list.GetMob(t->npc_id); + // + // if (target == nullptr) { + // //empty length packet == not found. + // EQApplicationPacket outapp(OP_FindPersonReply, 0); + // QueuePacket(&outapp); + // return; + // } + // + // if (!RuleB(Pathing, Find) && RuleB(Bazaar, EnableWarpToTrader) && target->IsClient() && (target->CastToClient()->Trader || + // target->CastToClient()->Buyer)) { + // Message(15, "Moving you to Trader %s", target->GetName()); + // MovePC(zone->GetZoneID(), zone->GetInstanceID(), target->GetX(), target->GetY(), target->GetZ(), 0.0f); + // } + // + // if (!RuleB(Pathing, Find) || !zone->pathing) + // { + // //fill in the path array... + // // + // points.resize(2); + // points[0].x = GetX(); + // points[0].y = GetY(); + // points[0].z = GetZ(); + // points[1].x = target->GetX(); + // points[1].y = target->GetY(); + // points[1].z = target->GetZ(); + // } + // else + // { + // glm::vec3 Start(GetX(), GetY(), GetZ() + (GetSize() < 6.0 ? 6 : GetSize()) * HEAD_POSITION); + // glm::vec3 End(target->GetX(), target->GetY(), target->GetZ() + (target->GetSize() < 6.0 ? 6 : target->GetSize()) * HEAD_POSITION); + // + // if (!zone->zonemap->LineIntersectsZone(Start, End, 1.0f, nullptr) && zone->pathing->NoHazards(Start, End)) + // { + // points.resize(2); + // points[0].x = Start.x; + // points[0].y = Start.y; + // points[0].z = Start.z; + // + // points[1].x = End.x; + // points[1].y = End.y; + // points[1].z = End.z; + // + // } + // else + // { + // std::deque pathlist = zone->pathing->FindRoute(Start, End); + // + // if (pathlist.empty()) + // { + // EQApplicationPacket outapp(OP_FindPersonReply, 0); + // QueuePacket(&outapp); + // return; + // } + // + // //the client seems to have issues with packets larger than this + // if (pathlist.size() > 36) + // { + // EQApplicationPacket outapp(OP_FindPersonReply, 0); + // QueuePacket(&outapp); + // return; + // } + // + // // Live appears to send the points in this order: + // // Final destination. + // // Current Position. + // // rest of the points. + // FindPerson_Point p; + // + // int PointNumber = 0; + // + // bool LeadsToTeleporter = false; + // + // glm::vec3 v = zone->pathing->GetPathNodeCoordinates(pathlist.back()); + // + // p.x = v.x; + // p.y = v.y; + // p.z = v.z; + // points.push_back(p); + // + // p.x = GetX(); + // p.y = GetY(); + // p.z = GetZ(); + // points.push_back(p); + // + // for (auto Iterator = pathlist.begin(); Iterator != pathlist.end(); ++Iterator) + // { + // if ((*Iterator) == -1) // Teleporter + // { + // LeadsToTeleporter = true; + // break; + // } + // + // glm::vec3 v = zone->pathing->GetPathNodeCoordinates((*Iterator), false); + // p.x = v.x; + // p.y = v.y; + // p.z = v.z; + // points.push_back(p); + // ++PointNumber; + // } + // + // if (!LeadsToTeleporter) + // { + // p.x = target->GetX(); + // p.y = target->GetY(); + // p.z = target->GetZ(); + // + // points.push_back(p); + // } + // + // } + // } + // + // SendPathPacket(points); + //} + //return; } void Client::Handle_OP_Fishing(const EQApplicationPacket *app) diff --git a/zone/command.cpp b/zone/command.cpp index 9463e2484..c11500ffc 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -6813,312 +6813,312 @@ void command_qglobal(Client *c, const Seperator *sep) { void command_path(Client *c, const Seperator *sep) { - if(sep->arg[1][0] == '\0' || !strcasecmp(sep->arg[1], "help")) - { - c->Message(0, "Syntax: #path shownodes: Spawns a npc to represent every npc node."); - c->Message(0, "#path info node_id: Gives information about node info (requires shownode target)."); - c->Message(0, "#path dump file_name: Dumps the current zone->pathing to a file of your naming."); - c->Message(0, "#path add [requested_id]: Adds a node at your current location will try to take the requested id if possible."); - c->Message(0, "#path connect connect_to_id [is_teleport] [door_id]: Connects the currently targeted node to connect_to_id's node and connects that node back (requires shownode target)."); - c->Message(0, "#path sconnect connect_to_id [is_teleport] [door_id]: Connects the currently targeted node to connect_to_id's node (requires shownode target)."); - c->Message(0, "#path qconnect [set]: short cut connect, connects the targeted node to the node you set with #path qconnect set (requires shownode target)."); - c->Message(0, "#path disconnect [all]/disconnect_from_id: Disconnects the currently targeted node to disconnect from disconnect from id's node (requires shownode target), if passed all as the second argument it will disconnect this node from every other node."); - c->Message(0, "#path move: Moves your targeted node to your current position"); - c->Message(0, "#path process file_name: processes the map file and tries to automatically generate a rudimentary path setup and then dumps the current zone->pathing to a file of your naming."); - c->Message(0, "#path resort [nodes]: resorts the connections/nodes after you've manually altered them so they'll work."); - return; - } - if(!strcasecmp(sep->arg[1], "shownodes")) - { - if(zone->pathing) - zone->pathing->SpawnPathNodes(); - - return; - } - - if(!strcasecmp(sep->arg[1], "info")) - { - if(zone->pathing) - { - zone->pathing->NodeInfo(c); - } - return; - } - - if(!strcasecmp(sep->arg[1], "dump")) - { - if(zone->pathing) - { - if(sep->arg[2][0] == '\0') - return; - - zone->pathing->DumpPath(sep->arg[2]); - } - return; - } - - if(!strcasecmp(sep->arg[1], "add")) - { - if(zone->pathing) - { - float px = c->GetX(); - float py = c->GetY(); - float pz = c->GetZ(); - float best_z; - - if(zone->zonemap) - { - glm::vec3 loc(px, py, pz); - best_z = zone->zonemap->FindBestZ(loc, nullptr); - } - else - { - best_z = pz; - } - int32 res = zone->pathing->AddNode(px, py, pz, best_z, atoi(sep->arg[2])); - if(res >= 0) - { - c->Message(0, "Added Path Node: %i", res); - } - else - { - c->Message(0, "Failed to add Path Node"); - } - } - else - { - zone->pathing = new PathManager(); - float px = c->GetX(); - float py = c->GetY(); - float pz = c->GetZ(); - float best_z; - - if(zone->zonemap) - { - glm::vec3 loc(px, py, pz); - best_z = zone->zonemap->FindBestZ(loc, nullptr); - } - else - { - best_z = pz; - } - int32 res = zone->pathing->AddNode(px, py, pz, best_z, atoi(sep->arg[2])); - if(res >= 0) - { - c->Message(0, "Added Path Node: %i", res); - } - else - { - c->Message(0, "Failed to add Path Node"); - } - } - return; - } - - if(!strcasecmp(sep->arg[1], "remove")) - { - if(zone->pathing) - { - if(zone->pathing->DeleteNode(c)) - { - c->Message(0, "Removed Node."); - } - else - { - c->Message(0, "Unable to Remove Node."); - } - } - return; - } - - if(!strcasecmp(sep->arg[1], "connect")) - { - if(zone->pathing) - { - zone->pathing->ConnectNodeToNode(c, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4])); - } - return; - } - - if(!strcasecmp(sep->arg[1], "sconnect")) - { - if(zone->pathing) - { - zone->pathing->ConnectNode(c, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4])); - } - return; - } - - if(!strcasecmp(sep->arg[1], "qconnect")) - { - if(zone->pathing) - { - if(!strcasecmp(sep->arg[2], "set")) - { - zone->pathing->QuickConnect(c, true); - } - else - { - zone->pathing->QuickConnect(c, false); - } - } - return; - } - - if(!strcasecmp(sep->arg[1], "disconnect")) - { - if(zone->pathing) - { - if(!strcasecmp(sep->arg[2], "all")) - { - zone->pathing->DisconnectAll(c); - } - else - { - zone->pathing->DisconnectNodeToNode(c, atoi(sep->arg[2])); - } - } - return; - } - - - if(!strcasecmp(sep->arg[1], "move")) - { - if(zone->pathing) - { - zone->pathing->MoveNode(c); - } - return; - } - - if(!strcasecmp(sep->arg[1], "process")) - { - if(zone->pathing) - { - if(sep->arg[2][0] == '\0') - return; - - zone->pathing->ProcessNodesAndSave(sep->arg[2]); - c->Message(0, "Path processed..."); - } - return; - } - - if(!strcasecmp(sep->arg[1], "resort")) - { - if(zone->pathing) - { - if(!strcasecmp(sep->arg[2], "nodes")) - { - zone->pathing->SortNodes(); - c->Message(0, "Nodes resorted..."); - } - else - { - zone->pathing->ResortConnections(); - c->Message(0, "Connections resorted..."); - } - } - return; - } - - if(!strcasecmp(sep->arg[1], "hazard")) - { - if(zone->pathing) - { - if(c && c->GetTarget()) - { - if (zone->pathing->NoHazardsAccurate(glm::vec3(c->GetX(), c->GetY(), c->GetZ()), - glm::vec3(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()))) - { - c->Message(0, "No hazards."); - } - else - { - c->Message(0, "Hazard Detected..."); - } - } - } - return; - } - - if(!strcasecmp(sep->arg[1], "print")) - { - if(zone->pathing) - { - zone->pathing->PrintPathing(); - } - return; - } - - if(!strcasecmp(sep->arg[1], "showneighbours") || !strcasecmp(sep->arg[1], "showneighbors")) - { - if(!c->GetTarget()) - { - c->Message(0, "First #path shownodes to spawn the pathnodes, and then target one of them."); - return; - } - if(zone->pathing) - { - zone->pathing->ShowPathNodeNeighbours(c); - return; - } - } - if(!strcasecmp(sep->arg[1], "meshtest")) - { - if(zone->pathing) - { - if(!strcasecmp(sep->arg[2], "simple")) - { - c->Message(0, "You may go linkdead. Results will be in the log file."); - zone->pathing->SimpleMeshTest(); - return; - } - else - { - c->Message(0, "You may go linkdead. Results will be in the log file."); - zone->pathing->MeshTest(); - return; - } - } - } - - if(!strcasecmp(sep->arg[1], "allspawns")) - { - if(zone->pathing) - { - c->Message(0, "You may go linkdead. Results will be in the log file."); - entity_list.FindPathsToAllNPCs(); - return; - } - } - - if(!strcasecmp(sep->arg[1], "nearest")) - { - if(!c->GetTarget() || !c->GetTarget()->IsMob()) - { - c->Message(0, "You must target something."); - return; - } - - if(zone->pathing) - { - Mob *m = c->GetTarget(); - - glm::vec3 Position(m->GetX(), m->GetY(), m->GetZ()); - - int Node = zone->pathing->FindNearestPathNode(Position); - - if(Node == -1) - c->Message(0, "Unable to locate a path node within range."); - else - c->Message(0, "Nearest path node is %i", Node); - - return; - } - } - - c->Message(0, "Unknown path command."); + //if(sep->arg[1][0] == '\0' || !strcasecmp(sep->arg[1], "help")) + //{ + // c->Message(0, "Syntax: #path shownodes: Spawns a npc to represent every npc node."); + // c->Message(0, "#path info node_id: Gives information about node info (requires shownode target)."); + // c->Message(0, "#path dump file_name: Dumps the current zone->pathing to a file of your naming."); + // c->Message(0, "#path add [requested_id]: Adds a node at your current location will try to take the requested id if possible."); + // c->Message(0, "#path connect connect_to_id [is_teleport] [door_id]: Connects the currently targeted node to connect_to_id's node and connects that node back (requires shownode target)."); + // c->Message(0, "#path sconnect connect_to_id [is_teleport] [door_id]: Connects the currently targeted node to connect_to_id's node (requires shownode target)."); + // c->Message(0, "#path qconnect [set]: short cut connect, connects the targeted node to the node you set with #path qconnect set (requires shownode target)."); + // c->Message(0, "#path disconnect [all]/disconnect_from_id: Disconnects the currently targeted node to disconnect from disconnect from id's node (requires shownode target), if passed all as the second argument it will disconnect this node from every other node."); + // c->Message(0, "#path move: Moves your targeted node to your current position"); + // c->Message(0, "#path process file_name: processes the map file and tries to automatically generate a rudimentary path setup and then dumps the current zone->pathing to a file of your naming."); + // c->Message(0, "#path resort [nodes]: resorts the connections/nodes after you've manually altered them so they'll work."); + // return; + //} + //if(!strcasecmp(sep->arg[1], "shownodes")) + //{ + // if(zone->pathing) + // zone->pathing->SpawnPathNodes(); + // + // return; + //} + // + //if(!strcasecmp(sep->arg[1], "info")) + //{ + // if(zone->pathing) + // { + // zone->pathing->NodeInfo(c); + // } + // return; + //} + // + //if(!strcasecmp(sep->arg[1], "dump")) + //{ + // if(zone->pathing) + // { + // if(sep->arg[2][0] == '\0') + // return; + // + // zone->pathing->DumpPath(sep->arg[2]); + // } + // return; + //} + // + //if(!strcasecmp(sep->arg[1], "add")) + //{ + // if(zone->pathing) + // { + // float px = c->GetX(); + // float py = c->GetY(); + // float pz = c->GetZ(); + // float best_z; + // + // if(zone->zonemap) + // { + // glm::vec3 loc(px, py, pz); + // best_z = zone->zonemap->FindBestZ(loc, nullptr); + // } + // else + // { + // best_z = pz; + // } + // int32 res = zone->pathing->AddNode(px, py, pz, best_z, atoi(sep->arg[2])); + // if(res >= 0) + // { + // c->Message(0, "Added Path Node: %i", res); + // } + // else + // { + // c->Message(0, "Failed to add Path Node"); + // } + // } + // else + // { + // zone->pathing = new PathManager(); + // float px = c->GetX(); + // float py = c->GetY(); + // float pz = c->GetZ(); + // float best_z; + // + // if(zone->zonemap) + // { + // glm::vec3 loc(px, py, pz); + // best_z = zone->zonemap->FindBestZ(loc, nullptr); + // } + // else + // { + // best_z = pz; + // } + // int32 res = zone->pathing->AddNode(px, py, pz, best_z, atoi(sep->arg[2])); + // if(res >= 0) + // { + // c->Message(0, "Added Path Node: %i", res); + // } + // else + // { + // c->Message(0, "Failed to add Path Node"); + // } + // } + // return; + //} + // + //if(!strcasecmp(sep->arg[1], "remove")) + //{ + // if(zone->pathing) + // { + // if(zone->pathing->DeleteNode(c)) + // { + // c->Message(0, "Removed Node."); + // } + // else + // { + // c->Message(0, "Unable to Remove Node."); + // } + // } + // return; + //} + // + //if(!strcasecmp(sep->arg[1], "connect")) + //{ + // if(zone->pathing) + // { + // zone->pathing->ConnectNodeToNode(c, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4])); + // } + // return; + //} + // + //if(!strcasecmp(sep->arg[1], "sconnect")) + //{ + // if(zone->pathing) + // { + // zone->pathing->ConnectNode(c, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4])); + // } + // return; + //} + // + //if(!strcasecmp(sep->arg[1], "qconnect")) + //{ + // if(zone->pathing) + // { + // if(!strcasecmp(sep->arg[2], "set")) + // { + // zone->pathing->QuickConnect(c, true); + // } + // else + // { + // zone->pathing->QuickConnect(c, false); + // } + // } + // return; + //} + // + //if(!strcasecmp(sep->arg[1], "disconnect")) + //{ + // if(zone->pathing) + // { + // if(!strcasecmp(sep->arg[2], "all")) + // { + // zone->pathing->DisconnectAll(c); + // } + // else + // { + // zone->pathing->DisconnectNodeToNode(c, atoi(sep->arg[2])); + // } + // } + // return; + //} + // + // + //if(!strcasecmp(sep->arg[1], "move")) + //{ + // if(zone->pathing) + // { + // zone->pathing->MoveNode(c); + // } + // return; + //} + // + //if(!strcasecmp(sep->arg[1], "process")) + //{ + // if(zone->pathing) + // { + // if(sep->arg[2][0] == '\0') + // return; + // + // zone->pathing->ProcessNodesAndSave(sep->arg[2]); + // c->Message(0, "Path processed..."); + // } + // return; + //} + // + //if(!strcasecmp(sep->arg[1], "resort")) + //{ + // if(zone->pathing) + // { + // if(!strcasecmp(sep->arg[2], "nodes")) + // { + // zone->pathing->SortNodes(); + // c->Message(0, "Nodes resorted..."); + // } + // else + // { + // zone->pathing->ResortConnections(); + // c->Message(0, "Connections resorted..."); + // } + // } + // return; + //} + // + //if(!strcasecmp(sep->arg[1], "hazard")) + //{ + // if(zone->pathing) + // { + // if(c && c->GetTarget()) + // { + // if (zone->pathing->NoHazardsAccurate(glm::vec3(c->GetX(), c->GetY(), c->GetZ()), + // glm::vec3(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()))) + // { + // c->Message(0, "No hazards."); + // } + // else + // { + // c->Message(0, "Hazard Detected..."); + // } + // } + // } + // return; + //} + // + //if(!strcasecmp(sep->arg[1], "print")) + //{ + // if(zone->pathing) + // { + // zone->pathing->PrintPathing(); + // } + // return; + //} + // + //if(!strcasecmp(sep->arg[1], "showneighbours") || !strcasecmp(sep->arg[1], "showneighbors")) + //{ + // if(!c->GetTarget()) + // { + // c->Message(0, "First #path shownodes to spawn the pathnodes, and then target one of them."); + // return; + // } + // if(zone->pathing) + // { + // zone->pathing->ShowPathNodeNeighbours(c); + // return; + // } + //} + //if(!strcasecmp(sep->arg[1], "meshtest")) + //{ + // if(zone->pathing) + // { + // if(!strcasecmp(sep->arg[2], "simple")) + // { + // c->Message(0, "You may go linkdead. Results will be in the log file."); + // zone->pathing->SimpleMeshTest(); + // return; + // } + // else + // { + // c->Message(0, "You may go linkdead. Results will be in the log file."); + // zone->pathing->MeshTest(); + // return; + // } + // } + //} + // + //if(!strcasecmp(sep->arg[1], "allspawns")) + //{ + // if(zone->pathing) + // { + // c->Message(0, "You may go linkdead. Results will be in the log file."); + // entity_list.FindPathsToAllNPCs(); + // return; + // } + //} + // + //if(!strcasecmp(sep->arg[1], "nearest")) + //{ + // if(!c->GetTarget() || !c->GetTarget()->IsMob()) + // { + // c->Message(0, "You must target something."); + // return; + // } + // + // if(zone->pathing) + // { + // Mob *m = c->GetTarget(); + // + // glm::vec3 Position(m->GetX(), m->GetY(), m->GetZ()); + // + // int Node = zone->pathing->FindNearestPathNode(Position); + // + // if(Node == -1) + // c->Message(0, "Unable to locate a path node within range."); + // else + // c->Message(0, "Nearest path node is %i", Node); + // + // return; + // } + //} + // + //c->Message(0, "Unknown path command."); } void Client::Undye() { diff --git a/zone/entity.cpp b/zone/entity.cpp index 52eb41165..d5c558a7b 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -2822,26 +2822,6 @@ void EntityList::ListPlayerCorpses(Client *client) client->Message(0, "%d player corpses listed.", x); } -void EntityList::FindPathsToAllNPCs() -{ - if (!zone->pathing) - return; - - auto it = npc_list.begin(); - while (it != npc_list.end()) { - glm::vec3 Node0 = zone->pathing->GetPathNodeCoordinates(0, false); - glm::vec3 Dest(it->second->GetX(), it->second->GetY(), it->second->GetZ()); - std::deque Route = zone->pathing->FindRoute(Node0, Dest); - if (Route.empty()) - printf("Unable to find a route to %s\n", it->second->GetName()); - else - printf("Found a route to %s\n", it->second->GetName()); - ++it; - } - - fflush(stdout); -} - // returns the number of corpses deleted. A negative number indicates an error code. int32 EntityList::DeleteNPCCorpses() { diff --git a/zone/entity.h b/zone/entity.h index 036e0c419..33434ed04 100644 --- a/zone/entity.h +++ b/zone/entity.h @@ -383,7 +383,6 @@ public: void ListNPCs(Client* client, const char* arg1 = 0, const char* arg2 = 0, uint8 searchtype = 0); void ListNPCCorpses(Client* client); void ListPlayerCorpses(Client* client); - void FindPathsToAllNPCs(); int32 DeleteNPCCorpses(); int32 DeletePlayerCorpses(); void CorpseFix(Client* c); diff --git a/zone/fearpath.cpp b/zone/fearpath.cpp index ea5bb16d9..3a1215748 100644 --- a/zone/fearpath.cpp +++ b/zone/fearpath.cpp @@ -130,23 +130,25 @@ void Mob::CalculateNewFearpoint() { if(RuleB(Pathing, Fear) && zone->pathing) { - int Node = zone->pathing->GetRandomPathNode(); + auto Node = zone->pathing->GetRandomLocation(); + if (Node.x != 0.0f || Node.y != 0.0f || Node.z != 0.0f) { - glm::vec3 Loc = zone->pathing->GetPathNodeCoordinates(Node); + ++Node.z; - ++Loc.z; + glm::vec3 CurrentPosition(GetX(), GetY(), GetZ()); - glm::vec3 CurrentPosition(GetX(), GetY(), GetZ()); + auto Route = zone->pathing->FindRoute(CurrentPosition, Node); - std::deque Route = zone->pathing->FindRoute(CurrentPosition, Loc); + if (!Route.empty()) + { + auto first = (*Route.begin()); + m_FearWalkTarget = glm::vec3(first.x, first.y, first.z); + currently_fleeing = true; - if(!Route.empty()) - { - m_FearWalkTarget = glm::vec3(Loc.x, Loc.y, Loc.z); - currently_fleeing = true; + Log(Logs::Detail, Logs::None, "Feared to node %i (%8.3f, %8.3f, %8.3f)", Node, first.x, first.y, first.z); + return; + } - Log(Logs::Detail, Logs::None, "Feared to node %i (%8.3f, %8.3f, %8.3f)", Node, Loc.x, Loc.y, Loc.z); - return; } Log(Logs::Detail, Logs::None, "No path found to selected node. Falling through to old fear point selection."); @@ -171,6 +173,7 @@ void Mob::CalculateNewFearpoint() break; } } + if (currently_fleeing) m_FearWalkTarget = glm::vec3(ranx, rany, ranz); else //Break fear diff --git a/zone/lua_mob.cpp b/zone/lua_mob.cpp index 18651edea..308b915d4 100644 --- a/zone/lua_mob.cpp +++ b/zone/lua_mob.cpp @@ -1125,17 +1125,6 @@ bool Lua_Mob::CalculateNewPosition(double x, double y, double z, double speed, b check_z); } -bool Lua_Mob::CalculateNewPosition2(double x, double y, double z, double speed) { - Lua_Safe_Call_Bool(); - return self->CalculateNewPosition2(static_cast(x), static_cast(y), static_cast(z), static_cast(speed)); -} - -bool Lua_Mob::CalculateNewPosition2(double x, double y, double z, double speed, bool check_z) { - Lua_Safe_Call_Bool(); - return self->CalculateNewPosition2(static_cast(x), static_cast(y), static_cast(z), static_cast(speed), - check_z); -} - float Lua_Mob::CalculateDistance(double x, double y, double z) { Lua_Safe_Call_Real(); return self->CalculateDistance(static_cast(x), static_cast(y), static_cast(z)); @@ -2287,8 +2276,6 @@ luabind::scope lua_register_mob() { .def("CalculateHeadingToTarget", (double(Lua_Mob::*)(double,double))&Lua_Mob::CalculateHeadingToTarget) .def("CalculateNewPosition", (bool(Lua_Mob::*)(double,double,double,double))&Lua_Mob::CalculateNewPosition) .def("CalculateNewPosition", (bool(Lua_Mob::*)(double,double,double,double,bool))&Lua_Mob::CalculateNewPosition) - .def("CalculateNewPosition2", (bool(Lua_Mob::*)(double,double,double,double))&Lua_Mob::CalculateNewPosition2) - .def("CalculateNewPosition2", (bool(Lua_Mob::*)(double,double,double,double,bool))&Lua_Mob::CalculateNewPosition2) .def("CalculateDistance", (float(Lua_Mob::*)(double,double,double))&Lua_Mob::CalculateDistance) .def("SendTo", (void(Lua_Mob::*)(double,double,double))&Lua_Mob::SendTo) .def("SendToFixZ", (void(Lua_Mob::*)(double,double,double))&Lua_Mob::SendToFixZ) diff --git a/zone/lua_mob.h b/zone/lua_mob.h index c54deb6bc..936703f8c 100644 --- a/zone/lua_mob.h +++ b/zone/lua_mob.h @@ -240,8 +240,6 @@ public: double CalculateHeadingToTarget(double in_x, double in_y); bool CalculateNewPosition(double x, double y, double z, double speed); bool CalculateNewPosition(double x, double y, double z, double speed, bool check_z); - bool CalculateNewPosition2(double x, double y, double z, double speed); - bool CalculateNewPosition2(double x, double y, double z, double speed, bool check_z); float CalculateDistance(double x, double y, double z); void SendTo(double x, double y, double z); void SendToFixZ(double x, double y, double z); diff --git a/zone/merc.cpp b/zone/merc.cpp index 80565c6b4..f6a13ba6e 100644 --- a/zone/merc.cpp +++ b/zone/merc.cpp @@ -1487,12 +1487,12 @@ void Merc::AI_Process() { if (WaypointChanged) tar_ndx = 20; - CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetRunspeed()); + CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetRunspeed()); } else { Mob* follow = entity_list.GetMob(GetFollowID()); if (follow) - CalculateNewPosition2(follow->GetX(), follow->GetY(), follow->GetZ(), GetRunspeed()); + CalculateNewPosition(follow->GetX(), follow->GetY(), follow->GetZ(), GetRunspeed()); } return; @@ -1559,7 +1559,7 @@ void Merc::AI_Process() { float newZ = 0; FaceTarget(GetTarget()); if (PlotPositionAroundTarget(this, newX, newY, newZ)) { - CalculateNewPosition2(newX, newY, newZ, GetRunspeed()); + CalculateNewPosition(newX, newY, newZ, GetRunspeed()); return; } } @@ -1571,7 +1571,7 @@ void Merc::AI_Process() { float newY = 0; float newZ = 0; if (PlotPositionAroundTarget(GetTarget(), newX, newY, newZ)) { - CalculateNewPosition2(newX, newY, newZ, GetRunspeed()); + CalculateNewPosition(newX, newY, newZ, GetRunspeed()); return; } } @@ -1582,7 +1582,7 @@ void Merc::AI_Process() { float newY = 0; float newZ = 0; if (PlotPositionAroundTarget(GetTarget(), newX, newY, newZ, false) && GetArchetype() != ARCHETYPE_CASTER) { - CalculateNewPosition2(newX, newY, newZ, GetRunspeed()); + CalculateNewPosition(newX, newY, newZ, GetRunspeed()); return; } } @@ -1709,7 +1709,7 @@ void Merc::AI_Process() { { if(!IsRooted()) { Log(Logs::Detail, Logs::AI, "Pursuing %s while engaged.", GetTarget()->GetCleanName()); - CalculateNewPosition2(GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ(), GetRunspeed()); + CalculateNewPosition(GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ(), GetRunspeed()); return; } @@ -1781,10 +1781,10 @@ void Merc::AI_Process() { if (WaypointChanged) tar_ndx = 20; - CalculateNewPosition2(Goal.x, Goal.y, Goal.z, speed); + CalculateNewPosition(Goal.x, Goal.y, Goal.z, speed); } else { - CalculateNewPosition2(follow->GetX(), follow->GetY(), follow->GetZ(), speed); + CalculateNewPosition(follow->GetX(), follow->GetY(), follow->GetZ(), speed); } if (rest_timer.Enabled()) diff --git a/zone/mob.cpp b/zone/mob.cpp index 33863081a..2d4b10da7 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -430,15 +430,7 @@ Mob::Mob(const char* in_name, m_TargetRing = glm::vec3(); flymode = FlyMode3; - // Pathing - PathingLOSState = UnknownLOS; - PathingLoopCount = 0; - PathingLastNodeVisited = -1; - PathingLOSCheckTimer = new Timer(RuleI(Pathing, LOSCheckFrequency)); - PathingRouteUpdateTimerShort = new Timer(RuleI(Pathing, RouteUpdateFrequencyShort)); - PathingRouteUpdateTimerLong = new Timer(RuleI(Pathing, RouteUpdateFrequencyLong)); DistractedFromGrid = false; - PathingTraversedNodes = 0; hate_list.SetHateOwner(this); m_AllowBeneficial = false; @@ -485,9 +477,6 @@ Mob::~Mob() entity_list.DestroyTempPets(this); } entity_list.UnMarkNPC(GetID()); - safe_delete(PathingLOSCheckTimer); - safe_delete(PathingRouteUpdateTimerShort); - safe_delete(PathingRouteUpdateTimerLong); UninitializeBuffSlots(); #ifdef BOTS @@ -1642,7 +1631,6 @@ void Mob::ShowBuffList(Client* client) { } void Mob::GMMove(float x, float y, float z, float heading, bool SendUpdate) { - Route.clear(); if(IsNPC()) { diff --git a/zone/mob.h b/zone/mob.h index 8286bf647..e5ae2a479 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -21,7 +21,7 @@ #include "common.h" #include "entity.h" #include "hate_list.h" -#include "pathing.h" +#include "pathfinder_interface.h" #include "position.h" #include "aa_ability.h" #include "aa.h" @@ -908,8 +908,7 @@ public: inline bool CheckAggro(Mob* other) {return hate_list.IsEntOnHateList(other);} float CalculateHeadingToTarget(float in_x, float in_y); - bool CalculateNewPosition(float x, float y, float z, int speed, bool checkZ = false, bool calcheading = true); - virtual bool CalculateNewPosition2(float x, float y, float z, int speed, bool checkZ = true, bool calcheading = true); + virtual bool CalculateNewPosition(float x, float y, float z, int speed, bool checkZ = true, bool calcheading = true); float CalculateDistance(float x, float y, float z); float GetGroundZ(float new_x, float new_y, float z_offset=0.0); void SendTo(float new_x, float new_y, float new_z); @@ -1410,16 +1409,8 @@ protected: // Pathing // glm::vec3 PathingDestination; - glm::vec3 PathingLastPosition; - int PathingLoopCount; - int PathingLastNodeVisited; - std::deque Route; - LOSType PathingLOSState; - Timer *PathingLOSCheckTimer; - Timer *PathingRouteUpdateTimerShort; - Timer *PathingRouteUpdateTimerLong; + IPathfinder::IPath Route; bool DistractedFromGrid; - int PathingTraversedNodes; uint32 pDontHealMeBefore; uint32 pDontBuffMeBefore; diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index e1e4682b0..6a54edf37 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -563,10 +563,6 @@ void Client::AI_Stop() { // only call this on a zone shutdown event void Mob::AI_ShutDown() { - safe_delete(PathingLOSCheckTimer); - safe_delete(PathingRouteUpdateTimerShort); - safe_delete(PathingRouteUpdateTimerLong); - attack_timer.Disable(); attack_dw_timer.Disable(); ranged_timer.Disable(); @@ -770,7 +766,7 @@ void Client::AI_Process() CalculateNewFearpoint(); } if(!RuleB(Pathing, Fear) || !zone->pathing) - CalculateNewPosition2(m_FearWalkTarget.x, m_FearWalkTarget.y, m_FearWalkTarget.z, speed, true); + CalculateNewPosition(m_FearWalkTarget.x, m_FearWalkTarget.y, m_FearWalkTarget.z, speed, true); else { bool WaypointChanged, NodeReached; @@ -781,7 +777,7 @@ void Client::AI_Process() if(WaypointChanged) tar_ndx = 20; - CalculateNewPosition2(Goal.x, Goal.y, Goal.z, speed); + CalculateNewPosition(Goal.x, Goal.y, Goal.z, speed); } } return; @@ -853,7 +849,7 @@ void Client::AI_Process() newspeed *= 2; SetCurrentSpeed(newspeed); if(!RuleB(Pathing, Aggro) || !zone->pathing) - CalculateNewPosition2(GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ(), newspeed); + CalculateNewPosition(GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ(), newspeed); else { bool WaypointChanged, NodeReached; @@ -863,7 +859,7 @@ void Client::AI_Process() if(WaypointChanged) tar_ndx = 20; - CalculateNewPosition2(Goal.x, Goal.y, Goal.z, newspeed); + CalculateNewPosition(Goal.x, Goal.y, Goal.z, newspeed); } } } @@ -912,7 +908,7 @@ void Client::AI_Process() nspeed *= 2; SetCurrentSpeed(nspeed); - CalculateNewPosition2(owner->GetX(), owner->GetY(), owner->GetZ(), nspeed); + CalculateNewPosition(owner->GetX(), owner->GetY(), owner->GetZ(), nspeed); } } else @@ -969,7 +965,7 @@ void Mob::AI_Process() { } if(!RuleB(Pathing, Fear) || !zone->pathing) { - CalculateNewPosition2(m_FearWalkTarget.x, m_FearWalkTarget.y, m_FearWalkTarget.z, GetFearSpeed(), true); + CalculateNewPosition(m_FearWalkTarget.x, m_FearWalkTarget.y, m_FearWalkTarget.z, GetFearSpeed(), true); } else { @@ -981,7 +977,7 @@ void Mob::AI_Process() { if(WaypointChanged) tar_ndx = 20; - CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetFearSpeed()); + CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetFearSpeed()); } } return; @@ -1300,7 +1296,7 @@ void Mob::AI_Process() { if (!IsRooted()) { Log(Logs::Detail, Logs::AI, "Pursuing %s while engaged.", target->GetName()); if (!RuleB(Pathing, Aggro) || !zone->pathing) - CalculateNewPosition2(target->GetX(), target->GetY(), target->GetZ(), GetRunspeed()); + CalculateNewPosition(target->GetX(), target->GetY(), target->GetZ(), GetRunspeed()); else { bool WaypointChanged, NodeReached; @@ -1311,7 +1307,7 @@ void Mob::AI_Process() { if (WaypointChanged) tar_ndx = 20; - CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetRunspeed()); + CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetRunspeed()); } } @@ -1395,7 +1391,7 @@ void Mob::AI_Process() { if (dist >= 5625) speed = GetRunspeed(); - CalculateNewPosition2(owner->GetX(), owner->GetY(), owner->GetZ(), speed); + CalculateNewPosition(owner->GetX(), owner->GetY(), owner->GetZ(), speed); } else { @@ -1454,7 +1450,7 @@ void Mob::AI_Process() { int speed = GetWalkspeed(); if (dist2 >= followdist + 150) speed = GetRunspeed(); - CalculateNewPosition2(follow->GetX(), follow->GetY(), follow->GetZ(), speed); + CalculateNewPosition(follow->GetX(), follow->GetY(), follow->GetZ(), speed); } else { @@ -1536,7 +1532,7 @@ void NPC::AI_DoMovement() { Log(Logs::Detail, Logs::AI, "Roam Box: d=%.3f (%.3f->%.3f,%.3f->%.3f): Go To (%.3f,%.3f)", roambox_distance, roambox_min_x, roambox_max_x, roambox_min_y, roambox_max_y, roambox_movingto_x, roambox_movingto_y); - if (!CalculateNewPosition2(roambox_movingto_x, roambox_movingto_y, GetZ(), walksp, true)) + if (!CalculateNewPosition(roambox_movingto_x, roambox_movingto_y, GetZ(), walksp, true)) { roambox_movingto_x = roambox_max_x + 1; // force update pLastFightingDelayMoving = Timer::GetCurrentTime() + RandomTimer(roambox_min_delay, roambox_delay); @@ -1593,7 +1589,7 @@ void NPC::AI_DoMovement() { if (doMove) { // not at waypoint yet or at 0 pause WP, so keep moving if(!RuleB(Pathing, AggroReturnToGrid) || !zone->pathing || (DistractedFromGrid == 0)) - CalculateNewPosition2(m_CurrentWayPoint.x, m_CurrentWayPoint.y, m_CurrentWayPoint.z, walksp, true); + CalculateNewPosition(m_CurrentWayPoint.x, m_CurrentWayPoint.y, m_CurrentWayPoint.z, walksp, true); else { bool WaypointChanged; @@ -1605,13 +1601,13 @@ void NPC::AI_DoMovement() { if(NodeReached) entity_list.OpenDoorsNear(CastToNPC()); - CalculateNewPosition2(Goal.x, Goal.y, Goal.z, walksp, true); + CalculateNewPosition(Goal.x, Goal.y, Goal.z, walksp, true); } } } } // endif (gridno > 0) -// handle new quest grid command processing + // handle new quest grid command processing else if (gridno < 0) { // this mob is under quest control if (movetimercompleted==true) @@ -1630,7 +1626,7 @@ void NPC::AI_DoMovement() { { bool CP2Moved; if(!RuleB(Pathing, Guard) || !zone->pathing) - CP2Moved = CalculateNewPosition2(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z, walksp); + CP2Moved = CalculateNewPosition(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z, walksp); else { if(!((m_Position.x == m_GuardPoint.x) && (m_Position.y == m_GuardPoint.y) && (m_Position.z == m_GuardPoint.z))) @@ -1643,7 +1639,7 @@ void NPC::AI_DoMovement() { if(NodeReached) entity_list.OpenDoorsNear(CastToNPC()); - CP2Moved = CalculateNewPosition2(Goal.x, Goal.y, Goal.z, walksp); + CP2Moved = CalculateNewPosition(Goal.x, Goal.y, Goal.z, walksp); } else CP2Moved = false; diff --git a/zone/pathfinder_interface.cpp b/zone/pathfinder_interface.cpp new file mode 100644 index 000000000..f3110808e --- /dev/null +++ b/zone/pathfinder_interface.cpp @@ -0,0 +1,7 @@ +#include "pathfinder_null.h" +#include "pathfinder_nav_mesh.h" +#include "pathfinder_waypoint.h" + +IPathfinder *IPathfinder::Load(const std::string &zone) { + return new PathfinderNull(); +} \ No newline at end of file diff --git a/zone/pathfinder_interface.h b/zone/pathfinder_interface.h index e69de29bb..ea4aa6642 100644 --- a/zone/pathfinder_interface.h +++ b/zone/pathfinder_interface.h @@ -0,0 +1,18 @@ +#pragma once + +#include "map.h" +#include + +class IPathfinder +{ +public: + typedef std::list IPath; + + IPathfinder() { } + virtual ~IPathfinder() { } + + virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end) = 0; + virtual glm::vec3 GetRandomLocation() = 0; + + static IPathfinder *Load(const std::string &zone); +}; diff --git a/zone/pathfinder_nav_mesh.h b/zone/pathfinder_nav_mesh.h index e69de29bb..bdb83a41e 100644 --- a/zone/pathfinder_nav_mesh.h +++ b/zone/pathfinder_nav_mesh.h @@ -0,0 +1,3 @@ +#pragma once + +#include "pathfinder_interface.h" \ No newline at end of file diff --git a/zone/pathfinder_null.cpp b/zone/pathfinder_null.cpp new file mode 100644 index 000000000..98a9ce5d7 --- /dev/null +++ b/zone/pathfinder_null.cpp @@ -0,0 +1,15 @@ +#include "pathfinder_null.h" +#pragma once + +IPathfinder::IPath PathfinderNull::FindRoute(const glm::vec3 &start, const glm::vec3 &end) +{ + IPath ret; + ret.push_back(start); + ret.push_back(end); + return ret; +} + +glm::vec3 PathfinderNull::GetRandomLocation() +{ + return glm::vec3(); +} diff --git a/zone/pathfinder_null.h b/zone/pathfinder_null.h new file mode 100644 index 000000000..6d2674230 --- /dev/null +++ b/zone/pathfinder_null.h @@ -0,0 +1,13 @@ +#pragma once + +#include "pathfinder_interface.h" + +class PathfinderNull : public IPathfinder +{ +public: + PathfinderNull() { } + virtual ~PathfinderNull() { } + + virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end); + virtual glm::vec3 GetRandomLocation(); +}; \ No newline at end of file diff --git a/zone/pathfinder_waypoint.h b/zone/pathfinder_waypoint.h index e69de29bb..5c51ac915 100644 --- a/zone/pathfinder_waypoint.h +++ b/zone/pathfinder_waypoint.h @@ -0,0 +1,13 @@ +#pragma once + +#include "pathfinder_interface.h" + +class PathfinderWaypoint : public IPathfinder +{ +public: + PathfinderWaypoint() { } + virtual ~PathfinderWaypoint() { } + + virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end); + virtual glm::vec3 GetRandomLocation(); +}; \ No newline at end of file diff --git a/zone/pathing.cpp b/zone/pathing.cpp index 48b945905..599e8af6b 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -467,7 +467,7 @@ std::deque PathManager::FindRoute(glm::vec3 Start, glm::vec3 End) break; if(!zone->zonemap->LineIntersectsZone(Start, PathNodes[(*Second)].v, 1.0f, nullptr) - && zone->pathing->NoHazards(Start, PathNodes[(*Second)].v)) + && NoHazards(Start, PathNodes[(*Second)].v)) { noderoute.erase(First); @@ -500,7 +500,7 @@ std::deque PathManager::FindRoute(glm::vec3 Start, glm::vec3 End) break; if(!zone->zonemap->LineIntersectsZone(End, PathNodes[(*Second)].v, 1.0f, nullptr) - && zone->pathing->NoHazards(End, PathNodes[(*Second)].v)) + && NoHazards(End, PathNodes[(*Second)].v)) { noderoute.erase(First); @@ -644,439 +644,62 @@ void PathManager::SimpleMeshTest() glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &WaypointChanged, bool &NodeReached) { - WaypointChanged = false; - - NodeReached = false; - - glm::vec3 NodeLoc; + glm::vec3 To(ToX, ToY, ToZ); + if (Speed <= 0) { + return To; + } glm::vec3 From(GetX(), GetY(), GetZ()); - - glm::vec3 HeadPosition(From.x, From.y, From.z + (GetSize() < 6.0 ? 6 : GetSize()) * HEAD_POSITION); - - glm::vec3 To(ToX, ToY, ToZ); - - bool SameDestination = (To == PathingDestination); - - if (Speed <= 0) // our speed is 0, we cant move so lets return the dest - return To; // this will also avoid the teleports cleanly - - int NextNode; - - if(To == From) + + if (DistanceSquared(To, From) < 1.0f) { + WaypointChanged = false; + NodeReached = true; + Route.clear(); return To; + } - Log(Logs::Detail, Logs::None, "UpdatePath. From(%8.3f, %8.3f, %8.3f) To(%8.3f, %8.3f, %8.3f)", From.x, From.y, From.z, To.x, To.y, To.z); - - if(From == PathingLastPosition) - { - ++PathingLoopCount; - - if((PathingLoopCount > 5) && !IsRooted()) - { - Log(Logs::Detail, Logs::None, "appears to be stuck. Teleporting them to next position.", GetName()); - - if(Route.empty()) - { - Teleport(To); - - WaypointChanged = true; - - PathingLoopCount = 0; - - return To; - } - NodeLoc = zone->pathing->GetPathNodeCoordinates(Route.front()); - - Route.pop_front(); - - ++PathingTraversedNodes; - - Teleport(NodeLoc); - + if (Route.empty()) { + Route = zone->pathing->FindRoute(From, To); + PathingDestination = To; + WaypointChanged = true; + NodeReached = false; + return *Route.begin(); + } + else { + bool SameDestination = DistanceSquared(To, PathingDestination) < 1.0f; + if (!SameDestination) { + //We had a route but our target position moved too much + Route = zone->pathing->FindRoute(From, To); + PathingDestination = To; WaypointChanged = true; - - PathingLoopCount = 0; - - return NodeLoc; + NodeReached = false; + return *Route.begin(); } - } - else - { - PathingLoopCount = 0; - - PathingLastPosition = From; - } - - if(!Route.empty()) - { - - // If we are already pathing, and the destination is the same as before ... - if(SameDestination) - { - Log(Logs::Detail, Logs::None, " Still pathing to the same destination."); - - // Get the coordinates of the first path node we are going to. - NextNode = Route.front(); - - NodeLoc = zone->pathing->GetPathNodeCoordinates(NextNode); - - // May need to refine this as rounding errors may mean we never have equality - // We have reached the path node. - if(NodeLoc == From) - { - Log(Logs::Detail, Logs::None, " Arrived at node %i", NextNode); - + else { + bool AtNextNode = DistanceSquared(From, *Route.begin()) < 1.0f; + if (AtNextNode) { + WaypointChanged = false; NodeReached = true; - PathingLastNodeVisited = Route.front(); - // We only check for LOS again after traversing more than 1 node, otherwise we can get into - // a loop where we have a hazard and so run to a path node far enough away from the hazard, and - // then run right back towards the same hazard again. - // - // An exception is when we are about to head for the last node. We always check LOS then. This - // is because we are seeking a path to the node nearest to our target. This node may be behind the - // target, and we may run past the target if we don't check LOS at this point. - int RouteSize = Route.size(); - - Log(Logs::Detail, Logs::None, "Route size is %i", RouteSize); - - if((RouteSize == 2) - || ((PathingTraversedNodes >= RuleI(Pathing, MinNodesTraversedForLOSCheck)) - && (RouteSize <= RuleI(Pathing, MinNodesLeftForLOSCheck)) - && PathingLOSCheckTimer->Check())) - { - Log(Logs::Detail, Logs::None, " Checking distance to target."); - float Distance = VectorDistanceNoRoot(From, To); - - Log(Logs::Detail, Logs::None, " Distance between From and To (NoRoot) is %8.3f", Distance); - - if ((Distance <= RuleR(Pathing, MinDistanceForLOSCheckShort)) && - (std::abs(From.z - To.z) <= RuleR(Pathing, ZDiffThresholdNew))) { - if(!zone->zonemap->LineIntersectsZone(HeadPosition, To, 1.0f, nullptr)) - PathingLOSState = HaveLOS; - else - PathingLOSState = NoLOS; - Log(Logs::Detail, Logs::None, "NoLOS"); - - if((PathingLOSState == HaveLOS) && zone->pathing->NoHazards(From, To)) - { - Log(Logs::Detail, Logs::None, " No hazards. Running directly to target."); - Route.clear(); - - return To; - } - else - { - Log(Logs::Detail, Logs::None, " Continuing on node path."); - } - } - else - PathingLOSState = UnknownLOS; - } - // We are on the same route, no LOS (or not checking this time, so pop off the node we just reached - // Route.pop_front(); - ++PathingTraversedNodes; - - WaypointChanged = true; - - // If there are more nodes on the route, return the coords of the next node - if(!Route.empty()) - { - NextNode = Route.front(); - - if(NextNode == -1) - { - // -1 indicates a teleport to the next node - Route.pop_front(); - - if(Route.empty()) - { - Log(Logs::Detail, Logs::None, "Missing node after teleport."); - return To; - } - - NextNode = Route.front(); - - NodeLoc = zone->pathing->GetPathNodeCoordinates(NextNode); - - Teleport(NodeLoc); - - Log(Logs::Detail, Logs::None, " TELEPORTED to %8.3f, %8.3f, %8.3f\n", NodeLoc.x, NodeLoc.y, NodeLoc.z); - - Route.pop_front(); - - if(Route.empty()) - return To; - - NextNode = Route.front(); - } - zone->pathing->OpenDoors(PathingLastNodeVisited, NextNode, this); - - Log(Logs::Detail, Logs::None, " Now moving to node %i", NextNode); - - return zone->pathing->GetPathNodeCoordinates(NextNode); - } - else - { - // we have run all the nodes, all that is left is the direct path from the last node - // to the destination - Log(Logs::Detail, Logs::None, " Reached end of node path, running direct to target."); - - return To; - } - } - // At this point, we are still on the previous path, but not reached a node yet. - // The route shouldn't be empty, but check anyway. - // - int RouteSize = Route.size(); - - if((PathingTraversedNodes >= RuleI(Pathing, MinNodesTraversedForLOSCheck)) - && (RouteSize <= RuleI(Pathing, MinNodesLeftForLOSCheck)) - && PathingLOSCheckTimer->Check()) - { - Log(Logs::Detail, Logs::None, " Checking distance to target."); - - float Distance = VectorDistanceNoRoot(From, To); - - Log(Logs::Detail, Logs::None, " Distance between From and To (NoRoot) is %8.3f", Distance); - - if ((Distance <= RuleR(Pathing, MinDistanceForLOSCheckShort)) && - (std::abs(From.z - To.z) <= RuleR(Pathing, ZDiffThresholdNew))) { - if(!zone->zonemap->LineIntersectsZone(HeadPosition, To, 1.0f, nullptr)) - PathingLOSState = HaveLOS; - else - PathingLOSState = NoLOS; - Log(Logs::Detail, Logs::None, "NoLOS"); - - if((PathingLOSState == HaveLOS) && zone->pathing->NoHazards(From, To)) - { - Log(Logs::Detail, Logs::None, " No hazards. Running directly to target."); - Route.clear(); - - return To; - } - else - { - Log(Logs::Detail, Logs::None, " Continuing on node path."); - } - } - else - PathingLOSState = UnknownLOS; - } - return NodeLoc; - } - else - { - // We get here if we were already pathing, but our destination has now changed. - // - Log(Logs::Detail, Logs::None, " Target has changed position."); - // Update our record of where we are going to. - PathingDestination = To; - // Check if we now have LOS etc to the new destination. - if(PathingLOSCheckTimer->Check()) - { - float Distance = VectorDistanceNoRoot(From, To); - - if ((Distance <= RuleR(Pathing, MinDistanceForLOSCheckShort)) && - (std::abs(From.z - To.z) <= RuleR(Pathing, ZDiffThresholdNew))) { - Log(Logs::Detail, Logs::None, " Checking for short LOS at distance %8.3f.", Distance); - if(!zone->zonemap->LineIntersectsZone(HeadPosition, To, 1.0f, nullptr)) - PathingLOSState = HaveLOS; - else - PathingLOSState = NoLOS; - - Log(Logs::Detail, Logs::None, "NoLOS"); - - if((PathingLOSState == HaveLOS) && zone->pathing->NoHazards(From, To)) - { - Log(Logs::Detail, Logs::None, " No hazards. Running directly to target."); - Route.clear(); - return To; - } - else - { - Log(Logs::Detail, Logs::None, " Continuing on node path."); - } - } - } - - // If the player is moving, we don't want to recalculate our route too frequently. - // - if(static_cast(Route.size()) <= RuleI(Pathing, RouteUpdateFrequencyNodeCount)) - { - if(!PathingRouteUpdateTimerShort->Check()) - { - Log(Logs::Detail, Logs::None, "Short route update timer not yet expired."); - return zone->pathing->GetPathNodeCoordinates(Route.front()); - } - Log(Logs::Detail, Logs::None, "Short route update timer expired."); - } - else - { - if(!PathingRouteUpdateTimerLong->Check()) - { - Log(Logs::Detail, Logs::None, "Long route update timer not yet expired."); - return zone->pathing->GetPathNodeCoordinates(Route.front()); - } - Log(Logs::Detail, Logs::None, "Long route update timer expired."); - } - - // We are already pathing, destination changed, no LOS. Find the nearest node to our destination. - int DestinationPathNode= zone->pathing->FindNearestPathNode(To); - - // Destination unreachable via pathing, return direct route. - if(DestinationPathNode == -1) - { - Log(Logs::Detail, Logs::None, " Unable to find path node for new destination. Running straight to target."); - Route.clear(); - return To; - } - // If the nearest path node to our new destination is the same as for the previous - // one, we will carry on on our path. - if(DestinationPathNode == Route.back()) - { - Log(Logs::Detail, Logs::None, " Same destination Node (%i). Continue with current path.", DestinationPathNode); - - NodeLoc = zone->pathing->GetPathNodeCoordinates(Route.front()); - - // May need to refine this as rounding errors may mean we never have equality - // Check if we have reached a path node. - if(NodeLoc == From) - { - Log(Logs::Detail, Logs::None, " Arrived at node %i, moving to next one.\n", Route.front()); - - NodeReached = true; - - PathingLastNodeVisited = Route.front(); - - Route.pop_front(); - - ++PathingTraversedNodes; - + if (Route.empty()) { + Route = zone->pathing->FindRoute(From, To); + PathingDestination = To; WaypointChanged = true; - - if(!Route.empty()) - { - NextNode = Route.front(); - - if(NextNode == -1) - { - // -1 indicates a teleport to the next node - Route.pop_front(); - - if(Route.empty()) - { - Log(Logs::Detail, Logs::None, "Missing node after teleport."); - return To; - } - - NextNode = Route.front(); - - NodeLoc = zone->pathing->GetPathNodeCoordinates(NextNode); - - Teleport(NodeLoc); - - Log(Logs::Detail, Logs::None, " TELEPORTED to %8.3f, %8.3f, %8.3f\n", NodeLoc.x, NodeLoc.y, NodeLoc.z); - - Route.pop_front(); - - if(Route.empty()) - return To; - - NextNode = Route.front(); - } - // Return the coords of our next path node on the route. - Log(Logs::Detail, Logs::None, " Now moving to node %i", NextNode); - - zone->pathing->OpenDoors(PathingLastNodeVisited, NextNode, this); - - return zone->pathing->GetPathNodeCoordinates(NextNode); - } - else - { - Log(Logs::Detail, Logs::None, " Reached end of path grid. Running direct to target."); - return To; - } + return *Route.begin(); + } + else { + return *Route.begin(); } - return NodeLoc; } - else - { - Log(Logs::Detail, Logs::None, " Target moved. End node is different. Clearing route."); - - Route.clear(); - // We will now fall through to get a new route. + else { + WaypointChanged = false; + NodeReached = false; + return *Route.begin(); } - - } - - - } - Log(Logs::Detail, Logs::None, " Our route list is empty."); - - if((SameDestination) && !PathingLOSCheckTimer->Check()) - { - Log(Logs::Detail, Logs::None, " Destination same as before, LOS check timer not reached. Returning To."); - return To; - } - - PathingLOSState = UnknownLOS; - - PathingDestination = To; - - WaypointChanged = true; - - float Distance = VectorDistanceNoRoot(From, To); - - if ((Distance <= RuleR(Pathing, MinDistanceForLOSCheckLong)) && - (std::abs(From.z - To.z) <= RuleR(Pathing, ZDiffThresholdNew))) { - Log(Logs::Detail, Logs::None, " Checking for long LOS at distance %8.3f.", Distance); - - if(!zone->zonemap->LineIntersectsZone(HeadPosition, To, 1.0f, nullptr)) - PathingLOSState = HaveLOS; - else - PathingLOSState = NoLOS; - - Log(Logs::Detail, Logs::None, "NoLOS"); - - if((PathingLOSState == HaveLOS) && zone->pathing->NoHazards(From, To)) - { - Log(Logs::Detail, Logs::None, "Target is reachable. Running directly there."); - return To; } } - Log(Logs::Detail, Logs::None, " Calculating new route to target."); - - Route = zone->pathing->FindRoute(From, To); - - PathingTraversedNodes = 0; - - if(Route.empty()) - { - Log(Logs::Detail, Logs::None, " No route available, running direct."); - - return To; - } - - if(SameDestination && (Route.front() == PathingLastNodeVisited)) - { - Log(Logs::Detail, Logs::None, " Probable loop detected. Same destination and Route.front() == PathingLastNodeVisited."); - - Route.clear(); - - return To; - } - NodeLoc = zone->pathing->GetPathNodeCoordinates(Route.front()); - - Log(Logs::Detail, Logs::None, " New route determined, heading for node %i", Route.front()); - - PathingLoopCount = 0; - - return NodeLoc; - } int PathManager::FindNearestPathNode(glm::vec3 Position) @@ -1254,14 +877,14 @@ bool PathManager::NoHazardsAccurate(glm::vec3 From, glm::vec3 To) void Mob::PrintRoute() { - printf("Route is : "); - - for(auto Iterator = Route.begin(); Iterator !=Route.end(); ++Iterator) - { - printf("%i, ", (*Iterator)); - } - - printf("\n"); + //printf("Route is : "); + // + //for(auto Iterator = Route.begin(); Iterator !=Route.end(); ++Iterator) + //{ + // printf("%i, ", (*Iterator)); + //} + // + //printf("\n"); } @@ -1346,7 +969,7 @@ void PathManager::ShowPathNodeNeighbours(Client *c) return; - PathNode *Node = zone->pathing->FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); + PathNode *Node = FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); if(!Node) { @@ -1412,7 +1035,7 @@ void PathManager::NodeInfo(Client *c) return; } - PathNode *Node = zone->pathing->FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); + PathNode *Node = FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); if(!Node) { return; @@ -1661,7 +1284,7 @@ bool PathManager::DeleteNode(Client *c) return false; } - PathNode *Node = zone->pathing->FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); + PathNode *Node = FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); if(!Node) { return false; @@ -1742,7 +1365,7 @@ void PathManager::ConnectNodeToNode(Client *c, int32 Node2, int32 teleport, int3 return; } - PathNode *Node = zone->pathing->FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); + PathNode *Node = FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); if(!Node) { return; @@ -1832,7 +1455,7 @@ void PathManager::ConnectNode(Client *c, int32 Node2, int32 teleport, int32 door return; } - PathNode *Node = zone->pathing->FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); + PathNode *Node = FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); if(!Node) { return; @@ -1902,7 +1525,7 @@ void PathManager::DisconnectNodeToNode(Client *c, int32 Node2) return; } - PathNode *Node = zone->pathing->FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); + PathNode *Node = FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); if(!Node) { return; @@ -1986,7 +1609,7 @@ void PathManager::MoveNode(Client *c) return; } - PathNode *Node = zone->pathing->FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); + PathNode *Node = FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); if(!Node) { return; @@ -2020,7 +1643,7 @@ void PathManager::DisconnectAll(Client *c) return; } - PathNode *Node = zone->pathing->FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); + PathNode *Node = FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); if(!Node) { return; @@ -2193,7 +1816,7 @@ void PathManager::QuickConnect(Client *c, bool set) return; } - PathNode *Node = zone->pathing->FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); + PathNode *Node = FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); if(!Node) { return; diff --git a/zone/pathing.h b/zone/pathing.h index d65ebfdcf..9921a2ed3 100644 --- a/zone/pathing.h +++ b/zone/pathing.h @@ -59,26 +59,18 @@ public: ~PathManager(); - static PathManager *LoadPathFile(const char *ZoneName); - bool loadPaths(FILE *fp); - void PrintPathing(); + static PathManager *LoadPathFile(const char *ZoneName); std::deque FindRoute(glm::vec3 Start, glm::vec3 End); +private: + bool loadPaths(FILE *fp); std::deque FindRoute(int startID, int endID); - glm::vec3 GetPathNodeCoordinates(int NodeNumber, bool BestZ = true); + void PrintPathing(); bool CheckLosFN(glm::vec3 a, glm::vec3 b); - void SpawnPathNodes(); - void MeshTest(); - void SimpleMeshTest(); - int FindNearestPathNode(glm::vec3 Position); bool NoHazards(glm::vec3 From, glm::vec3 To); bool NoHazardsAccurate(glm::vec3 From, glm::vec3 To); void OpenDoors(int Node1, int Node2, Mob* ForWho); - PathNode* FindPathNodeByCoordinates(float x, float y, float z); - void ShowPathNodeNeighbours(Client *c); - int GetRandomPathNode(); - void NodeInfo(Client *c); int32 AddNode(float x, float y, float z, float best_z, int32 requested_id = 0); //return -1 on failure, else returns the id of this node bool DeleteNode(Client *c); @@ -98,7 +90,16 @@ public: void QuickConnect(Client *c, bool set = false); void SortNodes(); -private: + glm::vec3 GetPathNodeCoordinates(int NodeNumber, bool BestZ = true); + void SpawnPathNodes(); + void MeshTest(); + void SimpleMeshTest(); + int FindNearestPathNode(glm::vec3 Position); + + PathNode* FindPathNodeByCoordinates(float x, float y, float z); + void ShowPathNodeNeighbours(Client *c); + int GetRandomPathNode(); + PathFileHeader Head; PathNode *PathNodes; int QuickConnectTarget; diff --git a/zone/perl_mob.cpp b/zone/perl_mob.cpp index f95deb3de..e27a2f241 100644 --- a/zone/perl_mob.cpp +++ b/zone/perl_mob.cpp @@ -5886,43 +5886,6 @@ XS(XS_Mob_CalculateNewPosition) XSRETURN(1); } -XS(XS_Mob_CalculateNewPosition2); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_CalculateNewPosition2) -{ - dXSARGS; - if (items < 5 || items > 6) - Perl_croak(aTHX_ "Usage: Mob::CalculateNewPosition2(THIS, x, y, z, speed, checkZ= false)"); - { - Mob * THIS; - bool RETVAL; - float x = (float)SvNV(ST(1)); - float y = (float)SvNV(ST(2)); - float z = (float)SvNV(ST(3)); - float speed = (float)SvNV(ST(4)); - bool checkZ; - - if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else - Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) - Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - - if (items < 6) - checkZ = false; - else { - checkZ = (bool)SvTRUE(ST(5)); - } - - RETVAL = THIS->CalculateNewPosition2(x, y, z, speed, checkZ); - ST(0) = boolSV(RETVAL); - sv_2mortal(ST(0)); - } - XSRETURN(1); -} - XS(XS_Mob_CalculateDistance); /* prototype to pass -Wmissing-prototypes */ XS(XS_Mob_CalculateDistance) { @@ -9262,7 +9225,6 @@ XS(boot_Mob) newXSproto(strcpy(buf, "CheckAggro"), XS_Mob_CheckAggro, file, "$$"); newXSproto(strcpy(buf, "CalculateHeadingToTarget"), XS_Mob_CalculateHeadingToTarget, file, "$$$"); newXSproto(strcpy(buf, "CalculateNewPosition"), XS_Mob_CalculateNewPosition, file, "$$$$$;$"); - newXSproto(strcpy(buf, "CalculateNewPosition2"), XS_Mob_CalculateNewPosition2, file, "$$$$$;$"); newXSproto(strcpy(buf, "CalculateDistance"), XS_Mob_CalculateDistance, file, "$$$$"); newXSproto(strcpy(buf, "SendTo"), XS_Mob_SendTo, file, "$$$$"); newXSproto(strcpy(buf, "SendToFixZ"), XS_Mob_SendToFixZ, file, "$$$$"); diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index c77e96979..b06f39ca5 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -673,76 +673,79 @@ void QuestManager::repopzone() { } void QuestManager::ConnectNodeToNode(int node1, int node2, int teleport, int doorid) { - if (!node1 || !node2) - { - Log(Logs::General, Logs::Quests, "QuestManager::ConnectNodeToNode called without node1 or node2. Probably syntax error in quest file."); - } - else - { - if (!teleport) - { - teleport = 0; - } - else if (teleport == 1 || teleport == -1) - { - teleport = -1; - } - - if (!doorid) - { - doorid = 0; - } - - if (!zone->pathing) - { - // if no pathing bits available, make them available. - zone->pathing = new PathManager(); - } - - if (zone->pathing) - { - zone->pathing->ConnectNodeToNode(node1, node2, teleport, doorid); - Log(Logs::Moderate, Logs::Quests, "QuestManager::ConnectNodeToNode connecting node %i to node %i.", node1, node2); - } - } + //PATHING TODO + //if (!node1 || !node2) + //{ + // Log(Logs::General, Logs::Quests, "QuestManager::ConnectNodeToNode called without node1 or node2. Probably syntax error in quest file."); + //} + //else + //{ + // if (!teleport) + // { + // teleport = 0; + // } + // else if (teleport == 1 || teleport == -1) + // { + // teleport = -1; + // } + // + // if (!doorid) + // { + // doorid = 0; + // } + // + // if (!zone->pathing) + // { + // // if no pathing bits available, make them available. + // zone->pathing = new PathManager(); + // } + // + // if (zone->pathing) + // { + // zone->pathing->ConnectNodeToNode(node1, node2, teleport, doorid); + // Log(Logs::Moderate, Logs::Quests, "QuestManager::ConnectNodeToNode connecting node %i to node %i.", node1, node2); + // } + //} } void QuestManager::AddNode(float x, float y, float z, float best_z, int32 requested_id) { - if (!x || !y || !z) - { - Log(Logs::General, Logs::Quests, "QuestManager::AddNode called without x, y, z. Probably syntax error in quest file."); - } + //PATHING TODO - if (!best_z || best_z == 0) - { - if (zone->zonemap) - { - glm::vec3 loc(x, y, z); - best_z = zone->zonemap->FindBestZ(loc, nullptr); - } - else - { - best_z = z; - } - } - - if (!requested_id) - { - requested_id = 0; - } - - if (!zone->pathing) - { - // if no pathing bits available, make them available. - zone->pathing = new PathManager(); - } - - if (zone->pathing) - { - zone->pathing->AddNode(x, y, z, best_z, requested_id); - Log(Logs::Moderate, Logs::Quests, "QuestManager::AddNode adding node at (%i, %i, %i).", x, y, z); - } + //if (!x || !y || !z) + //{ + // Log(Logs::General, Logs::Quests, "QuestManager::AddNode called without x, y, z. Probably syntax error in quest file."); + //} + // + //if (!best_z || best_z == 0) + //{ + // if (zone->zonemap) + // { + // glm::vec3 loc(x, y, z); + // best_z = zone->zonemap->FindBestZ(loc, nullptr); + // } + // else + // { + // best_z = z; + // } + //} + // + //if (!requested_id) + //{ + // requested_id = 0; + //} + // + //if (!zone->pathing) + //{ + // // if no pathing bits available, make them available. + // zone->pathing = new PathManager(); + //} + // + //if (zone->pathing) + //{ + // zone->pathing->AddNode(x, y, z, best_z, requested_id); + // Log(Logs::Moderate, Logs::Quests, "QuestManager::AddNode adding node at (%i, %i, %i).", x, y, z); + //} } void QuestManager::settarget(const char *type, int target_id) { diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index 15ab630ca..ad423113a 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -412,7 +412,7 @@ void NPC::SaveGuardSpot(bool iClearGuardSpot) { } void NPC::NextGuardPosition() { - if (!CalculateNewPosition2(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z, GetMovespeed())) { + if (!CalculateNewPosition(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z, GetMovespeed())) { SetHeading(m_GuardPoint.w); Log(Logs::Detail, Logs::AI, "Unable to move to next guard position. Probably rooted."); } @@ -625,89 +625,8 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, int speed, boo return true; } -bool Mob::CalculateNewPosition2(float x, float y, float z, int speed, bool checkZ, bool calcHeading) { - return MakeNewPositionAndSendUpdate(x, y, z, speed, checkZ); -} - bool Mob::CalculateNewPosition(float x, float y, float z, int speed, bool checkZ, bool calcHeading) { - if (GetID() == 0) - return true; - - float nx = m_Position.x; - float ny = m_Position.y; - float nz = m_Position.z; - - // if NPC is rooted - if (speed == 0) { - SetHeading(CalculateHeadingToTarget(x, y)); - if (moved) { - SetCurrentSpeed(0); - moved = false; - } - Log(Logs::Detail, Logs::AI, "Rooted while calculating new position to (%.3f, %.3f, %.3f)", x, y, z); - return true; - } - - float old_test_vector = test_vector; - m_TargetV.x = x - nx; - m_TargetV.y = y - ny; - m_TargetV.z = z - nz; - - if (m_TargetV.x == 0 && m_TargetV.y == 0) - return false; - SetCurrentSpeed((int8)(speed)); //*NPC_RUNANIM_RATIO); - //speed *= NPC_SPEED_MULTIPLIER; - - Log(Logs::Detail, Logs::AI, "Calculating new position to (%.3f, %.3f, %.3f) vector (%.3f, %.3f, %.3f) rate %.3f RAS %d", x, y, z, m_TargetV.x, m_TargetV.y, m_TargetV.z, speed, pRunAnimSpeed); - - // -------------------------------------------------------------------------- - // 2: get unit vector - // -------------------------------------------------------------------------- - test_vector = sqrtf(x*x + y*y + z*z); - tar_vector = speed / sqrtf(m_TargetV.x*m_TargetV.x + m_TargetV.y*m_TargetV.y + m_TargetV.z*m_TargetV.z); - m_Position.w = CalculateHeadingToTarget(x, y); - - if (tar_vector >= 1.0) { - if (IsNPC()) { - entity_list.ProcessMove(CastToNPC(), x, y, z); - } - - m_Position.x = x; - m_Position.y = y; - m_Position.z = z; - Log(Logs::Detail, Logs::AI, "Close enough, jumping to waypoint"); - } - else { - float new_x = m_Position.x + m_TargetV.x*tar_vector; - float new_y = m_Position.y + m_TargetV.y*tar_vector; - float new_z = m_Position.z + m_TargetV.z*tar_vector; - if (IsNPC()) { - entity_list.ProcessMove(CastToNPC(), new_x, new_y, new_z); - } - - m_Position.x = new_x; - m_Position.y = new_y; - m_Position.z = new_z; - Log(Logs::Detail, Logs::AI, "Next position (%.3f, %.3f, %.3f)", m_Position.x, m_Position.y, m_Position.z); - } - - if (fix_z_timer.Check()) - this->FixZ(); - - //OP_MobUpdate - if ((old_test_vector != test_vector) || tar_ndx>20) { //send update - tar_ndx = 0; - this->SetMoving(true); - moved = true; - m_Delta = glm::vec4(m_Position.x - nx, m_Position.y - ny, m_Position.z - nz, 0.0f); - SendPositionUpdate(); - } - tar_ndx++; - - // now get new heading - SetAppearance(eaStanding, false); // make sure they're standing - pLastChange = Timer::GetCurrentTime(); - return true; + return MakeNewPositionAndSendUpdate(x, y, z, speed, checkZ); } void NPC::AssignWaypoints(int32 grid) diff --git a/zone/zone.cpp b/zone/zone.cpp index 6a0754dea..c1ef23119 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -42,7 +42,9 @@ #include "net.h" #include "npc.h" #include "object.h" -#include "pathing.h" +#include "pathfinder_null.h" +#include "pathfinder_nav_mesh.h" +#include "pathfinder_waypoint.h" #include "petitions.h" #include "quest_parser_collection.h" #include "spawn2.h" @@ -893,7 +895,7 @@ bool Zone::Init(bool iStaticZone) { zone->zonemap = Map::LoadMapFile(zone->map_name); zone->watermap = WaterMap::LoadWaterMapfile(zone->map_name); - zone->pathing = PathManager::LoadPathFile(zone->map_name); + zone->pathing = IPathfinder::Load(zone->map_name); Log(Logs::General, Logs::Status, "Loading spawn conditions..."); if(!spawn_conditions.LoadSpawnConditions(short_name, instanceid)) { diff --git a/zone/zone.h b/zone/zone.h index a3e9f59b4..4f5e3b5cc 100644 --- a/zone/zone.h +++ b/zone/zone.h @@ -28,6 +28,7 @@ #include "spawn2.h" #include "spawngroup.h" #include "aa_ability.h" +#include "pathfinder_interface.h" struct ZonePoint { @@ -73,7 +74,6 @@ struct item_tick_struct { class Client; class Map; class Mob; -class PathManager; class WaterMap; extern EntityList entity_list; struct NPCType; @@ -211,7 +211,7 @@ public: Map* zonemap; WaterMap* watermap; - PathManager *pathing; + IPathfinder *pathing; NewZone_Struct newzone_data; SpawnConditionManager spawn_conditions; From c2766db89da1cf0eb82dd6dd20f0e438ee3bb590 Mon Sep 17 00:00:00 2001 From: KimLS Date: Wed, 19 Jul 2017 19:54:26 -0700 Subject: [PATCH 004/670] Working on waypoint code, using boost graph libs --- zone/command.cpp | 4 + zone/pathfinder_interface.cpp | 17 +- zone/pathfinder_interface.h | 4 + zone/pathfinder_nav_mesh.h | 13 +- zone/pathfinder_null.h | 1 + zone/pathfinder_waypoint.cpp | 372 ++++++++++++++++++++++++++++++++++ zone/pathfinder_waypoint.h | 13 +- zone/pathing.cpp | 28 ++- 8 files changed, 445 insertions(+), 7 deletions(-) diff --git a/zone/command.cpp b/zone/command.cpp index c11500ffc..405eb8889 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -6813,6 +6813,10 @@ void command_qglobal(Client *c, const Seperator *sep) { void command_path(Client *c, const Seperator *sep) { + if (zone->pathing) { + zone->pathing->DebugCommand(c, sep); + } + //if(sep->arg[1][0] == '\0' || !strcasecmp(sep->arg[1], "help")) //{ // c->Message(0, "Syntax: #path shownodes: Spawns a npc to represent every npc node."); diff --git a/zone/pathfinder_interface.cpp b/zone/pathfinder_interface.cpp index f3110808e..2a60ada74 100644 --- a/zone/pathfinder_interface.cpp +++ b/zone/pathfinder_interface.cpp @@ -1,7 +1,22 @@ +#include "../common/seperator.h" +#include "client.h" #include "pathfinder_null.h" #include "pathfinder_nav_mesh.h" #include "pathfinder_waypoint.h" +#include +#include IPathfinder *IPathfinder::Load(const std::string &zone) { + struct stat statbuffer; + std::string waypoint_path = fmt::format("maps/{0}.path", zone); + std::string navmesh_path = fmt::format("maps/{0}.nav", zone); + if (stat(waypoint_path.c_str(), &statbuffer) == 0) { + return new PathfinderWaypoint(waypoint_path); + } + + //if (stat(waypoint_path.c_str(), &statbuffer) == 0) { + // return new PathfinderNavmesh(navmesh_path); + //} + return new PathfinderNull(); -} \ No newline at end of file +} diff --git a/zone/pathfinder_interface.h b/zone/pathfinder_interface.h index ea4aa6642..e701b7f37 100644 --- a/zone/pathfinder_interface.h +++ b/zone/pathfinder_interface.h @@ -3,6 +3,9 @@ #include "map.h" #include +class Client; +class Seperator; + class IPathfinder { public: @@ -13,6 +16,7 @@ public: virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end) = 0; virtual glm::vec3 GetRandomLocation() = 0; + virtual void DebugCommand(Client *c, const Seperator *sep) = 0; static IPathfinder *Load(const std::string &zone); }; diff --git a/zone/pathfinder_nav_mesh.h b/zone/pathfinder_nav_mesh.h index bdb83a41e..bec5c1b44 100644 --- a/zone/pathfinder_nav_mesh.h +++ b/zone/pathfinder_nav_mesh.h @@ -1,3 +1,14 @@ #pragma once -#include "pathfinder_interface.h" \ No newline at end of file +#include "pathfinder_interface.h" + +class PathfinderNavmesh : public IPathfinder +{ +public: + PathfinderNavmesh() { } + virtual ~PathfinderNavmesh() { } + + virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end); + virtual glm::vec3 GetRandomLocation(); + virtual void DebugCommand(Client *c, const Seperator *sep); +}; \ No newline at end of file diff --git a/zone/pathfinder_null.h b/zone/pathfinder_null.h index 6d2674230..55ff2b06b 100644 --- a/zone/pathfinder_null.h +++ b/zone/pathfinder_null.h @@ -10,4 +10,5 @@ public: virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end); virtual glm::vec3 GetRandomLocation(); + virtual void DebugCommand(Client *c, const Seperator *sep) { } }; \ No newline at end of file diff --git a/zone/pathfinder_waypoint.cpp b/zone/pathfinder_waypoint.cpp index e69de29bb..d6e88353e 100644 --- a/zone/pathfinder_waypoint.cpp +++ b/zone/pathfinder_waypoint.cpp @@ -0,0 +1,372 @@ +#include +#include +#include +#include +#include + +#include "pathfinder_waypoint.h" +#include "zone.h" +#include "client.h" +#include "../common/eqemu_logsys.h" +#include "../common/rulesys.h" +#include +#include + +extern Zone *zone; + +#pragma pack(1) +struct NeighbourNode { + int16 id; + float distance; + uint8 Teleport; + int16 DoorID; +}; + +struct PathNode { + uint16 id; + glm::vec3 v; + float bestz; + NeighbourNode Neighbours[50]; +}; + +struct PathFileHeader { + uint32 version; + uint32 PathNodeCount; +}; +#pragma pack() + +struct Node +{ + glm::vec3 v; + float bestz; +}; + +struct Edge +{ + float distance; + bool teleport; + int door_id; +}; +template +class distance_heuristic : public boost::astar_heuristic +{ +public: + typedef typename boost::graph_traits::vertex_descriptor Vertex; + + distance_heuristic(NodeMap n, Vertex goal) + : m_node(n), m_goal(goal) {} + CostType operator()(Vertex u) + { + CostType dx = m_node[m_goal].v.x - m_node[u].v.x; + CostType dy = m_node[m_goal].v.y - m_node[u].v.y; + CostType dz = m_node[m_goal].v.z - m_node[u].v.z; + return ::sqrt(dx * dx + dy * dy + dz * dz); + } +private: + NodeMap m_node; + Vertex m_goal; +}; + +struct found_goal {}; +template +class astar_goal_visitor : public boost::default_astar_visitor +{ +public: + astar_goal_visitor(Vertex goal) : m_goal(goal) {} + template + void examine_vertex(Vertex u, Graph& g) { + if (u == m_goal) + throw found_goal(); + } +private: + Vertex m_goal; +}; + +typedef boost::geometry::model::point Point; +typedef boost::geometry::model::box Box; +typedef std::pair RTreeValue; +typedef boost::adjacency_list> GraphType; +typedef boost::property_map::type WeightMap; + +struct PathfinderWaypoint::Implementation { + bool PathFileValid; + boost::geometry::index::rtree> Tree; + GraphType Graph; + std::vector Nodes; + std::vector Edges; +}; + +PathfinderWaypoint::PathfinderWaypoint(const std::string &path) +{ + PathFileHeader Head; + m_impl.reset(new Implementation()); + m_impl->PathFileValid = false; + Head.PathNodeCount = 0; + Head.version = 2; + + FILE *f = fopen(path.c_str(), "rb"); + if (f) { + char Magic[10]; + + fread(&Magic, 9, 1, f); + + if (strncmp(Magic, "EQEMUPATH", 9)) + { + Log(Logs::General, Logs::Error, "Bad Magic String in .path file."); + return; + } + + fread(&Head, sizeof(Head), 1, f); + + Log(Logs::General, Logs::Status, "Path File Header: Version %ld, PathNodes %ld", + (long)Head.version, (long)Head.PathNodeCount); + + if (Head.version != 2) + { + Log(Logs::General, Logs::Error, "Unsupported path file version."); + return; + } + + std::unique_ptr PathNodes(new PathNode[Head.PathNodeCount]); + + fread(PathNodes.get(), sizeof(PathNode), Head.PathNodeCount, f); + + int MaxNodeID = Head.PathNodeCount - 1; + + m_impl->PathFileValid = true; + + m_impl->Nodes.reserve(Head.PathNodeCount); + for (uint32 i = 0; i < Head.PathNodeCount; ++i) + { + auto &n = PathNodes[i]; + + Point p = Point(n.v.x, n.v.y, n.v.z); + m_impl->Tree.insert(std::make_pair(p, i)); + + boost::add_vertex(m_impl->Graph); + Node node; + node.v = n.v; + node.bestz = n.bestz; + m_impl->Nodes.push_back(node); + } + + auto weightmap = boost::get(boost::edge_weight, m_impl->Graph); + for (uint32 i = 0; i < Head.PathNodeCount; ++i) { + for (uint32 j = 0; j < 50; ++j) + { + if (PathNodes[i].Neighbours[j].id > MaxNodeID) + { + Log(Logs::General, Logs::Error, "Path Node %i, Neighbour %i (%i) out of range.", i, j, PathNodes[i].Neighbours[j].id); + m_impl->PathFileValid = false; + } + + if (PathNodes[i].Neighbours[j].id > 0) { + GraphType::edge_descriptor e; + bool inserted; + boost::tie(e, inserted) = boost::add_edge(PathNodes[i].id, PathNodes[i].Neighbours[j].id, m_impl->Graph); + weightmap[e] = PathNodes[i].Neighbours[j].distance; + + Edge edge; + edge.distance = PathNodes[i].Neighbours[j].distance; + edge.door_id = PathNodes[i].Neighbours[j].DoorID; + edge.teleport = PathNodes[i].Neighbours[j].Teleport; + m_impl->Edges.push_back(edge); + } + } + } + + fclose(f); + } +} + +PathfinderWaypoint::~PathfinderWaypoint() +{ +} + +IPathfinder::IPath PathfinderWaypoint::FindRoute(const glm::vec3 &start, const glm::vec3 &end) +{ + std::vector result_start_n; + m_impl->Tree.query(boost::geometry::index::nearest(Point(start.x, start.y, start.z), 1), std::back_inserter(result_start_n)); + if (result_start_n.size() == 0) { + IPath Route; + Route.push_back(start); + Route.push_back(end); + return Route; + } + + std::vector result_end_n; + m_impl->Tree.query(boost::geometry::index::nearest(Point(end.x, end.y, end.z), 1), std::back_inserter(result_end_n)); + if (result_end_n.size() == 0) { + IPath Route; + Route.push_back(start); + Route.push_back(end); + return Route; + } + + auto &nearest_start = *result_start_n.begin(); + auto &nearest_end = *result_end_n.begin(); + + Log(Logs::General, Logs::Status, "Nearest start point found to be (%f, %f, %f) with node %u", nearest_start.first.get<0>(), nearest_start.first.get<1>(), nearest_start.first.get<2>(), nearest_start.second); + Log(Logs::General, Logs::Status, "Nearest end point found to be (%f, %f, %f) with node %u", nearest_end.first.get<0>(), nearest_end.first.get<1>(), nearest_end.first.get<2>(), nearest_end.second); + + std::vector p(boost::num_vertices(m_impl->Graph)); + std::vector d(boost::num_vertices(m_impl->Graph)); + try { + boost::astar_search(m_impl->Graph, nearest_start.second, + distance_heuristic(&m_impl->Nodes[0], nearest_end.second), + boost::predecessor_map(&p[0]) + .distance_map(&d[0]) + .visitor(astar_goal_visitor(nearest_end.second))); + } + catch (found_goal) + { + IPath Route; + + Route.push_front(end); + for (size_t v = nearest_end.second;; v = p[v]) { + Route.push_front(m_impl->Nodes[v].v); + if (p[v] == v) + break; + } + Route.push_front(start); + + return Route; + } + + + IPath Route; + Route.push_back(start); + Route.push_back(end); + return Route; +} + +glm::vec3 PathfinderWaypoint::GetRandomLocation() +{ + return glm::vec3(); +} + +void PathfinderWaypoint::DebugCommand(Client *c, const Seperator *sep) +{ + if(sep->arg[1][0] == '\0' || !strcasecmp(sep->arg[1], "help")) + { + c->Message(0, "Syntax: #path shownodes: Spawns a npc to represent every npc node."); + c->Message(0, "#path info node_id: Gives information about node info (requires shownode target)."); + c->Message(0, "#path dump file_name: Dumps the current zone->pathing to a file of your naming."); + c->Message(0, "#path add [requested_id]: Adds a node at your current location will try to take the requested id if possible."); + c->Message(0, "#path connect connect_to_id [is_teleport] [door_id]: Connects the currently targeted node to connect_to_id's node and connects that node back (requires shownode target)."); + c->Message(0, "#path sconnect connect_to_id [is_teleport] [door_id]: Connects the currently targeted node to connect_to_id's node (requires shownode target)."); + c->Message(0, "#path qconnect [set]: short cut connect, connects the targeted node to the node you set with #path qconnect set (requires shownode target)."); + c->Message(0, "#path disconnect [all]/disconnect_from_id: Disconnects the currently targeted node to disconnect from disconnect from id's node (requires shownode target), if passed all as the second argument it will disconnect this node from every other node."); + c->Message(0, "#path move: Moves your targeted node to your current position"); + c->Message(0, "#path process file_name: processes the map file and tries to automatically generate a rudimentary path setup and then dumps the current zone->pathing to a file of your naming."); + c->Message(0, "#path resort [nodes]: resorts the connections/nodes after you've manually altered them so they'll work."); + return; + } + + if(!strcasecmp(sep->arg[1], "shownodes")) + { + ShowNodes(); + return; + } + + if (!strcasecmp(sep->arg[1], "show")) + { + if (c->GetTarget() != nullptr) { + auto target = c->GetTarget(); + glm::vec3 start(target->GetX(), target->GetY(), target->GetZ()); + glm::vec3 end(c->GetX(), c->GetY(), c->GetZ()); + + ShowPath(start, end); + } + + return; + } +} + +void PathfinderWaypoint::ShowNodes() +{ + for (size_t i = 0; i < m_impl->Nodes.size(); ++i) + { + auto npc_type = new NPCType; + memset(npc_type, 0, sizeof(NPCType)); + + auto c = i / 1000u; + sprintf(npc_type->name, "Node%u", c); + npc_type->cur_hp = 4000000; + npc_type->max_hp = 4000000; + npc_type->race = 2254; + npc_type->gender = 2; + npc_type->class_ = 9; + npc_type->deity = 1; + npc_type->level = 75; + npc_type->npc_id = 0; + npc_type->loottable_id = 0; + npc_type->texture = 1; + npc_type->light = 0; + npc_type->runspeed = 0; + npc_type->d_melee_texture1 = 1; + npc_type->d_melee_texture2 = 1; + npc_type->merchanttype = 1; + npc_type->bodytype = 1; + + npc_type->STR = 150; + npc_type->STA = 150; + npc_type->DEX = 150; + npc_type->AGI = 150; + npc_type->INT = 150; + npc_type->WIS = 150; + npc_type->CHA = 150; + + npc_type->findable = 1; + auto position = glm::vec4(m_impl->Nodes[i].v.x, m_impl->Nodes[i].v.y, m_impl->Nodes[i].v.z, 0.0f); + auto npc = new NPC(npc_type, nullptr, position, FlyMode1); + npc->GiveNPCTypeData(npc_type); + + entity_list.AddNPC(npc, true, true); + } +} + +void PathfinderWaypoint::ShowPath(const glm::vec3 &start, const glm::vec3 &end) +{ + auto path = FindRoute(start, end); + + for (auto &node : path) + { + auto npc_type = new NPCType; + memset(npc_type, 0, sizeof(NPCType)); + + sprintf(npc_type->name, "Path"); + npc_type->cur_hp = 4000000; + npc_type->max_hp = 4000000; + npc_type->race = 2254; + npc_type->gender = 2; + npc_type->class_ = 9; + npc_type->deity = 1; + npc_type->level = 75; + npc_type->npc_id = 0; + npc_type->loottable_id = 0; + npc_type->texture = 1; + npc_type->light = 0; + npc_type->runspeed = 0; + npc_type->d_melee_texture1 = 1; + npc_type->d_melee_texture2 = 1; + npc_type->merchanttype = 1; + npc_type->bodytype = 1; + + npc_type->STR = 150; + npc_type->STA = 150; + npc_type->DEX = 150; + npc_type->AGI = 150; + npc_type->INT = 150; + npc_type->WIS = 150; + npc_type->CHA = 150; + + npc_type->findable = 1; + auto position = glm::vec4(node.x, node.y, node.z, 0.0f); + auto npc = new NPC(npc_type, nullptr, position, FlyMode1); + npc->GiveNPCTypeData(npc_type); + + entity_list.AddNPC(npc, true, true); + } +} diff --git a/zone/pathfinder_waypoint.h b/zone/pathfinder_waypoint.h index 5c51ac915..493531802 100644 --- a/zone/pathfinder_waypoint.h +++ b/zone/pathfinder_waypoint.h @@ -1,13 +1,22 @@ #pragma once #include "pathfinder_interface.h" +#include class PathfinderWaypoint : public IPathfinder { public: - PathfinderWaypoint() { } - virtual ~PathfinderWaypoint() { } + PathfinderWaypoint(const std::string &path); + virtual ~PathfinderWaypoint(); virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end); virtual glm::vec3 GetRandomLocation(); + virtual void DebugCommand(Client *c, const Seperator *sep); + +private: + void ShowNodes(); + void ShowPath(const glm::vec3 &start, const glm::vec3 &end); + + struct Implementation; + std::unique_ptr m_impl; }; \ No newline at end of file diff --git a/zone/pathing.cpp b/zone/pathing.cpp index 599e8af6b..8d6c677b7 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -666,7 +666,7 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa return *Route.begin(); } else { - bool SameDestination = DistanceSquared(To, PathingDestination) < 1.0f; + bool SameDestination = DistanceSquared(To, PathingDestination) < 4.0f; if (!SameDestination) { //We had a route but our target position moved too much Route = zone->pathing->FindRoute(From, To); @@ -676,7 +676,7 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa return *Route.begin(); } else { - bool AtNextNode = DistanceSquared(From, *Route.begin()) < 1.0f; + bool AtNextNode = DistanceSquared(From, *Route.begin()) < 4.0f; if (AtNextNode) { WaypointChanged = false; NodeReached = true; @@ -690,7 +690,29 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa return *Route.begin(); } else { - return *Route.begin(); + auto node = *Route.begin(); + if (node.x == 1000000.0f && node.y == 1000000.0f && node.z == 1000000.0f) { + //If is identity node then is teleport node. + Route.pop_front(); + + if (Route.empty()) { + return To; + } + + auto nextNode = *Route.begin(); + + Teleport(nextNode); + + Route.pop_front(); + + if (Route.empty()) { + return To; + } + + return *Route.begin(); + } + + return node; } } else { From ab33148f816d64e969a0ef1eb3244047480bc6a2 Mon Sep 17 00:00:00 2001 From: KimLS Date: Thu, 20 Jul 2017 00:34:58 -0700 Subject: [PATCH 005/670] Some tweaks to wp, basically works --- zone/client_packet.cpp | 2 + zone/mob.cpp | 2 + zone/mob.h | 1 + zone/pathfinder_waypoint.cpp | 41 ++++++++++---- zone/pathing.cpp | 103 ++++++++++++++++++----------------- 5 files changed, 88 insertions(+), 61 deletions(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index dbf09faa3..c45aca912 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -4366,6 +4366,7 @@ void Client::Handle_OP_ClientTimeStamp(const EQApplicationPacket *app) void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) { + Log(Logs::General, Logs::Status, "Incoming client position packet"); if (IsAIControlled()) return; @@ -4606,6 +4607,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) m_Position.x = ppu->x_pos; m_Position.y = ppu->y_pos; m_Position.z = ppu->z_pos; + Log(Logs::General, Logs::Status, "Client position updated"); /* Visual Debugging */ if (RuleB(Character, OPClientUpdateVisualDebug)) { diff --git a/zone/mob.cpp b/zone/mob.cpp index 2d4b10da7..9bfc30d38 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -444,6 +444,8 @@ Mob::Mob(const char* in_name, PrimaryAggro = false; AssistAggro = false; npc_assist_cap = 0; + + PathRecalcTimer.reset(new Timer(1000)); } Mob::~Mob() diff --git a/zone/mob.h b/zone/mob.h index e5ae2a479..ce09f2b88 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -1410,6 +1410,7 @@ protected: // glm::vec3 PathingDestination; IPathfinder::IPath Route; + std::unique_ptr PathRecalcTimer; bool DistractedFromGrid; uint32 pDontHealMeBefore; diff --git a/zone/pathfinder_waypoint.cpp b/zone/pathfinder_waypoint.cpp index d6e88353e..c741c4547 100644 --- a/zone/pathfinder_waypoint.cpp +++ b/zone/pathfinder_waypoint.cpp @@ -46,7 +46,8 @@ struct Edge float distance; bool teleport; int door_id; -}; +}; + template class distance_heuristic : public boost::astar_heuristic { @@ -94,7 +95,7 @@ struct PathfinderWaypoint::Implementation { boost::geometry::index::rtree> Tree; GraphType Graph; std::vector Nodes; - std::vector Edges; + std::map, Edge> Edges; }; PathfinderWaypoint::PathfinderWaypoint(const std::string &path) @@ -171,7 +172,8 @@ PathfinderWaypoint::PathfinderWaypoint(const std::string &path) edge.distance = PathNodes[i].Neighbours[j].distance; edge.door_id = PathNodes[i].Neighbours[j].DoorID; edge.teleport = PathNodes[i].Neighbours[j].Teleport; - m_impl->Edges.push_back(edge); + + m_impl->Edges[std::make_pair(PathNodes[i].id, PathNodes[i].Neighbours[j].id)] = edge; } } } @@ -207,16 +209,18 @@ IPathfinder::IPath PathfinderWaypoint::FindRoute(const glm::vec3 &start, const g auto &nearest_start = *result_start_n.begin(); auto &nearest_end = *result_end_n.begin(); - Log(Logs::General, Logs::Status, "Nearest start point found to be (%f, %f, %f) with node %u", nearest_start.first.get<0>(), nearest_start.first.get<1>(), nearest_start.first.get<2>(), nearest_start.second); - Log(Logs::General, Logs::Status, "Nearest end point found to be (%f, %f, %f) with node %u", nearest_end.first.get<0>(), nearest_end.first.get<1>(), nearest_end.first.get<2>(), nearest_end.second); + if (nearest_start.second == nearest_end.second) { + IPath Route; + Route.push_back(start); + Route.push_back(end); + return Route; + } std::vector p(boost::num_vertices(m_impl->Graph)); - std::vector d(boost::num_vertices(m_impl->Graph)); try { boost::astar_search(m_impl->Graph, nearest_start.second, distance_heuristic(&m_impl->Nodes[0], nearest_end.second), boost::predecessor_map(&p[0]) - .distance_map(&d[0]) .visitor(astar_goal_visitor(nearest_end.second))); } catch (found_goal) @@ -225,16 +229,33 @@ IPathfinder::IPath PathfinderWaypoint::FindRoute(const glm::vec3 &start, const g Route.push_front(end); for (size_t v = nearest_end.second;; v = p[v]) { - Route.push_front(m_impl->Nodes[v].v); - if (p[v] == v) + if (p[v] == v) { + Route.push_front(m_impl->Nodes[v].v); break; + } + else { + auto iter = m_impl->Edges.find(std::make_pair(p[v], p[v + 1])); + if (iter != m_impl->Edges.end()) { + auto &edge = iter->second; + if (edge.teleport) { + Route.push_front(m_impl->Nodes[v].v); + glm::vec3 teleport(100000000.0f, 100000000.0f, 100000000.0f); + Route.push_front(teleport); + } + else { + Route.push_front(m_impl->Nodes[v].v); + } + } + else { + Route.push_front(m_impl->Nodes[v].v); + } + } } Route.push_front(start); return Route; } - IPath Route; Route.push_back(start); Route.push_back(end); diff --git a/zone/pathing.cpp b/zone/pathing.cpp index 8d6c677b7..7bbc3c727 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -666,61 +666,62 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa return *Route.begin(); } else { - bool SameDestination = DistanceSquared(To, PathingDestination) < 4.0f; - if (!SameDestination) { - //We had a route but our target position moved too much - Route = zone->pathing->FindRoute(From, To); - PathingDestination = To; - WaypointChanged = true; - NodeReached = false; - return *Route.begin(); - } - else { - bool AtNextNode = DistanceSquared(From, *Route.begin()) < 4.0f; - if (AtNextNode) { - WaypointChanged = false; - NodeReached = true; - - Route.pop_front(); - - if (Route.empty()) { - Route = zone->pathing->FindRoute(From, To); - PathingDestination = To; - WaypointChanged = true; - return *Route.begin(); - } - else { - auto node = *Route.begin(); - if (node.x == 1000000.0f && node.y == 1000000.0f && node.z == 1000000.0f) { - //If is identity node then is teleport node. - Route.pop_front(); - - if (Route.empty()) { - return To; - } - - auto nextNode = *Route.begin(); - - Teleport(nextNode); - - Route.pop_front(); - - if (Route.empty()) { - return To; - } - - return *Route.begin(); - } - - return node; - } - } - else { - WaypointChanged = false; + if (PathRecalcTimer->Check()) { + bool SameDestination = DistanceSquared(To, PathingDestination) < 4.0f; + if (!SameDestination) { + //We had a route but our target position moved too much + Route = zone->pathing->FindRoute(From, To); + PathingDestination = To; + WaypointChanged = true; NodeReached = false; return *Route.begin(); } } + + bool AtNextNode = DistanceSquared(From, *Route.begin()) < 4.0f; + if (AtNextNode) { + WaypointChanged = false; + NodeReached = true; + + Route.pop_front(); + + if (Route.empty()) { + Route = zone->pathing->FindRoute(From, To); + PathingDestination = To; + WaypointChanged = true; + return *Route.begin(); + } + else { + auto node = *Route.begin(); + if (node.x == 1000000.0f && node.y == 1000000.0f && node.z == 1000000.0f) { + //If is identity node then is teleport node. + Route.pop_front(); + + if (Route.empty()) { + return To; + } + + auto nextNode = *Route.begin(); + + Teleport(nextNode); + + Route.pop_front(); + + if (Route.empty()) { + return To; + } + + return *Route.begin(); + } + + return node; + } + } + else { + WaypointChanged = false; + NodeReached = false; + return *Route.begin(); + } } } From bdc90ac3a748aafc3dfc597b231bd21574a73e7c Mon Sep 17 00:00:00 2001 From: KimLS Date: Fri, 21 Jul 2017 20:22:33 -0700 Subject: [PATCH 006/670] Command changes and code cleanup --- zone/CMakeLists.txt | 1 - zone/bot_command.cpp | 1 - zone/client.h | 2 +- zone/client_packet.cpp | 233 ++--- zone/client_process.cpp | 5 +- zone/command.cpp | 308 ------ zone/fearpath.cpp | 5 +- zone/pathfinder_interface.h | 17 +- zone/pathfinder_waypoint.cpp | 182 ++-- zone/pathfinder_waypoint.h | 7 +- zone/pathing.cpp | 1862 +--------------------------------- zone/pathing.h | 112 -- 12 files changed, 253 insertions(+), 2482 deletions(-) delete mode 100644 zone/pathing.h diff --git a/zone/CMakeLists.txt b/zone/CMakeLists.txt index 907a47192..c85922334 100644 --- a/zone/CMakeLists.txt +++ b/zone/CMakeLists.txt @@ -205,7 +205,6 @@ SET(zone_headers pathfinder_nav_mesh.h pathfinder_null.h pathfinder_waypoint.h - pathing.h perlpacket.h petitions.h pets.h diff --git a/zone/bot_command.cpp b/zone/bot_command.cpp index 5ba73d068..b7ca796cc 100644 --- a/zone/bot_command.cpp +++ b/zone/bot_command.cpp @@ -63,7 +63,6 @@ #include "guild_mgr.h" #include "map.h" #include "doors.h" -#include "pathing.h" #include "qglobals.h" #include "queryserv.h" #include "quest_parser_collection.h" diff --git a/zone/client.h b/zone/client.h index 640d9dc98..336bc7725 100644 --- a/zone/client.h +++ b/zone/client.h @@ -300,8 +300,8 @@ public: void FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho); virtual bool Process(); + void ProcessPackets(); void LogMerchant(Client* player, Mob* merchant, uint32 quantity, uint32 price, const EQEmu::ItemData* item, bool buying); - void SendPacketQueue(bool Block = true); void QueuePacket(const EQApplicationPacket* app, bool ack_req = true, CLIENT_CONN_STATUS = CLIENT_CONNECTINGALL, eqFilterType filter=FilterNone); void FastQueuePacket(EQApplicationPacket** app, bool ack_req = true, CLIENT_CONN_STATUS = CLIENT_CONNECTINGALL); void ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_skill, const char* orig_message, const char* targetname=nullptr); diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index c45aca912..a2ca6f4b7 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -4366,7 +4366,6 @@ void Client::Handle_OP_ClientTimeStamp(const EQApplicationPacket *app) void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) { - Log(Logs::General, Logs::Status, "Incoming client position packet"); if (IsAIControlled()) return; @@ -4380,8 +4379,12 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) Log(Logs::General, Logs::Error, "OP size error: OP_ClientUpdate expected:%i got:%i", sizeof(PlayerPositionUpdateClient_Struct), app->size); return; } + PlayerPositionUpdateClient_Struct* ppu = (PlayerPositionUpdateClient_Struct*)app->pBuffer; + Message(0, "Client Update Position (%.2f, %.2f, %.2f, %u) (%u)", ppu->x_pos, ppu->y_pos, ppu->z_pos, ppu->heading, ppu->animation); + Message(0, "Client Update Deltas (%.2f, %.2f, %.2f, %u)", ppu->delta_x, ppu->delta_y, ppu->delta_z, ppu->delta_heading); + /* Boat handling */ if (ppu->spawn_id != GetID()) { /* If player is controlling boat */ @@ -4607,7 +4610,6 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) m_Position.x = ppu->x_pos; m_Position.y = ppu->y_pos; m_Position.z = ppu->z_pos; - Log(Logs::General, Logs::Status, "Client position updated"); /* Visual Debugging */ if (RuleB(Character, OPClientUpdateVisualDebug)) { @@ -5690,128 +5692,111 @@ void Client::Handle_OP_FeignDeath(const EQApplicationPacket *app) void Client::Handle_OP_FindPersonRequest(const EQApplicationPacket *app) { - //if (app->size != sizeof(FindPersonRequest_Struct)) - // printf("Error in FindPersonRequest_Struct. Expected size of: %zu, but got: %i\n", sizeof(FindPersonRequest_Struct), app->size); - //else { - // FindPersonRequest_Struct* t = (FindPersonRequest_Struct*)app->pBuffer; - // - // std::vector points; - // Mob* target = entity_list.GetMob(t->npc_id); - // - // if (target == nullptr) { - // //empty length packet == not found. - // EQApplicationPacket outapp(OP_FindPersonReply, 0); - // QueuePacket(&outapp); - // return; - // } - // - // if (!RuleB(Pathing, Find) && RuleB(Bazaar, EnableWarpToTrader) && target->IsClient() && (target->CastToClient()->Trader || - // target->CastToClient()->Buyer)) { - // Message(15, "Moving you to Trader %s", target->GetName()); - // MovePC(zone->GetZoneID(), zone->GetInstanceID(), target->GetX(), target->GetY(), target->GetZ(), 0.0f); - // } - // - // if (!RuleB(Pathing, Find) || !zone->pathing) - // { - // //fill in the path array... - // // - // points.resize(2); - // points[0].x = GetX(); - // points[0].y = GetY(); - // points[0].z = GetZ(); - // points[1].x = target->GetX(); - // points[1].y = target->GetY(); - // points[1].z = target->GetZ(); - // } - // else - // { - // glm::vec3 Start(GetX(), GetY(), GetZ() + (GetSize() < 6.0 ? 6 : GetSize()) * HEAD_POSITION); - // glm::vec3 End(target->GetX(), target->GetY(), target->GetZ() + (target->GetSize() < 6.0 ? 6 : target->GetSize()) * HEAD_POSITION); - // - // if (!zone->zonemap->LineIntersectsZone(Start, End, 1.0f, nullptr) && zone->pathing->NoHazards(Start, End)) - // { - // points.resize(2); - // points[0].x = Start.x; - // points[0].y = Start.y; - // points[0].z = Start.z; - // - // points[1].x = End.x; - // points[1].y = End.y; - // points[1].z = End.z; - // - // } - // else - // { - // std::deque pathlist = zone->pathing->FindRoute(Start, End); - // - // if (pathlist.empty()) - // { - // EQApplicationPacket outapp(OP_FindPersonReply, 0); - // QueuePacket(&outapp); - // return; - // } - // - // //the client seems to have issues with packets larger than this - // if (pathlist.size() > 36) - // { - // EQApplicationPacket outapp(OP_FindPersonReply, 0); - // QueuePacket(&outapp); - // return; - // } - // - // // Live appears to send the points in this order: - // // Final destination. - // // Current Position. - // // rest of the points. - // FindPerson_Point p; - // - // int PointNumber = 0; - // - // bool LeadsToTeleporter = false; - // - // glm::vec3 v = zone->pathing->GetPathNodeCoordinates(pathlist.back()); - // - // p.x = v.x; - // p.y = v.y; - // p.z = v.z; - // points.push_back(p); - // - // p.x = GetX(); - // p.y = GetY(); - // p.z = GetZ(); - // points.push_back(p); - // - // for (auto Iterator = pathlist.begin(); Iterator != pathlist.end(); ++Iterator) - // { - // if ((*Iterator) == -1) // Teleporter - // { - // LeadsToTeleporter = true; - // break; - // } - // - // glm::vec3 v = zone->pathing->GetPathNodeCoordinates((*Iterator), false); - // p.x = v.x; - // p.y = v.y; - // p.z = v.z; - // points.push_back(p); - // ++PointNumber; - // } - // - // if (!LeadsToTeleporter) - // { - // p.x = target->GetX(); - // p.y = target->GetY(); - // p.z = target->GetZ(); - // - // points.push_back(p); - // } - // - // } - // } - // - // SendPathPacket(points); - //} - //return; + if (app->size != sizeof(FindPersonRequest_Struct)) + printf("Error in FindPersonRequest_Struct. Expected size of: %zu, but got: %i\n", sizeof(FindPersonRequest_Struct), app->size); + else { + FindPersonRequest_Struct* t = (FindPersonRequest_Struct*)app->pBuffer; + + std::vector points; + Mob* target = entity_list.GetMob(t->npc_id); + + if (target == nullptr) { + //empty length packet == not found. + EQApplicationPacket outapp(OP_FindPersonReply, 0); + QueuePacket(&outapp); + return; + } + + if (!RuleB(Pathing, Find) && RuleB(Bazaar, EnableWarpToTrader) && target->IsClient() && (target->CastToClient()->Trader || + target->CastToClient()->Buyer)) { + Message(15, "Moving you to Trader %s", target->GetName()); + MovePC(zone->GetZoneID(), zone->GetInstanceID(), target->GetX(), target->GetY(), target->GetZ(), 0.0f); + } + + if (!RuleB(Pathing, Find) || !zone->pathing) + { + //fill in the path array... + // + points.resize(2); + points[0].x = GetX(); + points[0].y = GetY(); + points[0].z = GetZ(); + points[1].x = target->GetX(); + points[1].y = target->GetY(); + points[1].z = target->GetZ(); + } + else + { + glm::vec3 Start(GetX(), GetY(), GetZ() + (GetSize() < 6.0 ? 6 : GetSize()) * HEAD_POSITION); + glm::vec3 End(target->GetX(), target->GetY(), target->GetZ() + (target->GetSize() < 6.0 ? 6 : target->GetSize()) * HEAD_POSITION); + + auto pathlist = zone->pathing->FindRoute(Start, End); + + if (pathlist.empty()) + { + EQApplicationPacket outapp(OP_FindPersonReply, 0); + QueuePacket(&outapp); + return; + } + + //the client seems to have issues with packets larger than this + if (pathlist.size() > 36) + { + EQApplicationPacket outapp(OP_FindPersonReply, 0); + QueuePacket(&outapp); + return; + } + + // Live appears to send the points in this order: + // Final destination. + // Current Position. + // rest of the points. + FindPerson_Point p; + + int PointNumber = 0; + + bool LeadsToTeleporter = false; + + auto v = pathlist.back(); + + p.x = v.pos.x; + p.y = v.pos.y; + p.z = v.pos.z; + points.push_back(p); + + p.x = GetX(); + p.y = GetY(); + p.z = GetZ(); + points.push_back(p); + + for (auto Iterator = pathlist.begin(); Iterator != pathlist.end(); ++Iterator) + { + if ((*Iterator).teleport) // Teleporter + { + LeadsToTeleporter = true; + break; + } + + glm::vec3 v = (*Iterator).pos; + p.x = v.x; + p.y = v.y; + p.z = v.z; + points.push_back(p); + ++PointNumber; + } + + if (!LeadsToTeleporter) + { + p.x = target->GetX(); + p.y = target->GetY(); + p.z = target->GetZ(); + + points.push_back(p); + } + } + + SendPathPacket(points); + } } void Client::Handle_OP_Fishing(const EQApplicationPacket *app) diff --git a/zone/client_process.cpp b/zone/client_process.cpp index 672848acc..eb89bb546 100644 --- a/zone/client_process.cpp +++ b/zone/client_process.cpp @@ -600,9 +600,8 @@ bool Client::Process() { EQApplicationPacket *app = nullptr; if (!eqs->CheckState(CLOSING)) { - while (ret && (app = (EQApplicationPacket *)eqs->PopPacket())) { - if (app) - ret = HandlePacket(app); + while (app = eqs->PopPacket()) { + HandlePacket(app); safe_delete(app); } } diff --git a/zone/command.cpp b/zone/command.cpp index 405eb8889..ebf70d03e 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -59,7 +59,6 @@ #include "command.h" #include "guild_mgr.h" #include "map.h" -#include "pathing.h" #include "qglobals.h" #include "queryserv.h" #include "quest_parser_collection.h" @@ -6816,313 +6815,6 @@ void command_path(Client *c, const Seperator *sep) if (zone->pathing) { zone->pathing->DebugCommand(c, sep); } - - //if(sep->arg[1][0] == '\0' || !strcasecmp(sep->arg[1], "help")) - //{ - // c->Message(0, "Syntax: #path shownodes: Spawns a npc to represent every npc node."); - // c->Message(0, "#path info node_id: Gives information about node info (requires shownode target)."); - // c->Message(0, "#path dump file_name: Dumps the current zone->pathing to a file of your naming."); - // c->Message(0, "#path add [requested_id]: Adds a node at your current location will try to take the requested id if possible."); - // c->Message(0, "#path connect connect_to_id [is_teleport] [door_id]: Connects the currently targeted node to connect_to_id's node and connects that node back (requires shownode target)."); - // c->Message(0, "#path sconnect connect_to_id [is_teleport] [door_id]: Connects the currently targeted node to connect_to_id's node (requires shownode target)."); - // c->Message(0, "#path qconnect [set]: short cut connect, connects the targeted node to the node you set with #path qconnect set (requires shownode target)."); - // c->Message(0, "#path disconnect [all]/disconnect_from_id: Disconnects the currently targeted node to disconnect from disconnect from id's node (requires shownode target), if passed all as the second argument it will disconnect this node from every other node."); - // c->Message(0, "#path move: Moves your targeted node to your current position"); - // c->Message(0, "#path process file_name: processes the map file and tries to automatically generate a rudimentary path setup and then dumps the current zone->pathing to a file of your naming."); - // c->Message(0, "#path resort [nodes]: resorts the connections/nodes after you've manually altered them so they'll work."); - // return; - //} - //if(!strcasecmp(sep->arg[1], "shownodes")) - //{ - // if(zone->pathing) - // zone->pathing->SpawnPathNodes(); - // - // return; - //} - // - //if(!strcasecmp(sep->arg[1], "info")) - //{ - // if(zone->pathing) - // { - // zone->pathing->NodeInfo(c); - // } - // return; - //} - // - //if(!strcasecmp(sep->arg[1], "dump")) - //{ - // if(zone->pathing) - // { - // if(sep->arg[2][0] == '\0') - // return; - // - // zone->pathing->DumpPath(sep->arg[2]); - // } - // return; - //} - // - //if(!strcasecmp(sep->arg[1], "add")) - //{ - // if(zone->pathing) - // { - // float px = c->GetX(); - // float py = c->GetY(); - // float pz = c->GetZ(); - // float best_z; - // - // if(zone->zonemap) - // { - // glm::vec3 loc(px, py, pz); - // best_z = zone->zonemap->FindBestZ(loc, nullptr); - // } - // else - // { - // best_z = pz; - // } - // int32 res = zone->pathing->AddNode(px, py, pz, best_z, atoi(sep->arg[2])); - // if(res >= 0) - // { - // c->Message(0, "Added Path Node: %i", res); - // } - // else - // { - // c->Message(0, "Failed to add Path Node"); - // } - // } - // else - // { - // zone->pathing = new PathManager(); - // float px = c->GetX(); - // float py = c->GetY(); - // float pz = c->GetZ(); - // float best_z; - // - // if(zone->zonemap) - // { - // glm::vec3 loc(px, py, pz); - // best_z = zone->zonemap->FindBestZ(loc, nullptr); - // } - // else - // { - // best_z = pz; - // } - // int32 res = zone->pathing->AddNode(px, py, pz, best_z, atoi(sep->arg[2])); - // if(res >= 0) - // { - // c->Message(0, "Added Path Node: %i", res); - // } - // else - // { - // c->Message(0, "Failed to add Path Node"); - // } - // } - // return; - //} - // - //if(!strcasecmp(sep->arg[1], "remove")) - //{ - // if(zone->pathing) - // { - // if(zone->pathing->DeleteNode(c)) - // { - // c->Message(0, "Removed Node."); - // } - // else - // { - // c->Message(0, "Unable to Remove Node."); - // } - // } - // return; - //} - // - //if(!strcasecmp(sep->arg[1], "connect")) - //{ - // if(zone->pathing) - // { - // zone->pathing->ConnectNodeToNode(c, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4])); - // } - // return; - //} - // - //if(!strcasecmp(sep->arg[1], "sconnect")) - //{ - // if(zone->pathing) - // { - // zone->pathing->ConnectNode(c, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4])); - // } - // return; - //} - // - //if(!strcasecmp(sep->arg[1], "qconnect")) - //{ - // if(zone->pathing) - // { - // if(!strcasecmp(sep->arg[2], "set")) - // { - // zone->pathing->QuickConnect(c, true); - // } - // else - // { - // zone->pathing->QuickConnect(c, false); - // } - // } - // return; - //} - // - //if(!strcasecmp(sep->arg[1], "disconnect")) - //{ - // if(zone->pathing) - // { - // if(!strcasecmp(sep->arg[2], "all")) - // { - // zone->pathing->DisconnectAll(c); - // } - // else - // { - // zone->pathing->DisconnectNodeToNode(c, atoi(sep->arg[2])); - // } - // } - // return; - //} - // - // - //if(!strcasecmp(sep->arg[1], "move")) - //{ - // if(zone->pathing) - // { - // zone->pathing->MoveNode(c); - // } - // return; - //} - // - //if(!strcasecmp(sep->arg[1], "process")) - //{ - // if(zone->pathing) - // { - // if(sep->arg[2][0] == '\0') - // return; - // - // zone->pathing->ProcessNodesAndSave(sep->arg[2]); - // c->Message(0, "Path processed..."); - // } - // return; - //} - // - //if(!strcasecmp(sep->arg[1], "resort")) - //{ - // if(zone->pathing) - // { - // if(!strcasecmp(sep->arg[2], "nodes")) - // { - // zone->pathing->SortNodes(); - // c->Message(0, "Nodes resorted..."); - // } - // else - // { - // zone->pathing->ResortConnections(); - // c->Message(0, "Connections resorted..."); - // } - // } - // return; - //} - // - //if(!strcasecmp(sep->arg[1], "hazard")) - //{ - // if(zone->pathing) - // { - // if(c && c->GetTarget()) - // { - // if (zone->pathing->NoHazardsAccurate(glm::vec3(c->GetX(), c->GetY(), c->GetZ()), - // glm::vec3(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()))) - // { - // c->Message(0, "No hazards."); - // } - // else - // { - // c->Message(0, "Hazard Detected..."); - // } - // } - // } - // return; - //} - // - //if(!strcasecmp(sep->arg[1], "print")) - //{ - // if(zone->pathing) - // { - // zone->pathing->PrintPathing(); - // } - // return; - //} - // - //if(!strcasecmp(sep->arg[1], "showneighbours") || !strcasecmp(sep->arg[1], "showneighbors")) - //{ - // if(!c->GetTarget()) - // { - // c->Message(0, "First #path shownodes to spawn the pathnodes, and then target one of them."); - // return; - // } - // if(zone->pathing) - // { - // zone->pathing->ShowPathNodeNeighbours(c); - // return; - // } - //} - //if(!strcasecmp(sep->arg[1], "meshtest")) - //{ - // if(zone->pathing) - // { - // if(!strcasecmp(sep->arg[2], "simple")) - // { - // c->Message(0, "You may go linkdead. Results will be in the log file."); - // zone->pathing->SimpleMeshTest(); - // return; - // } - // else - // { - // c->Message(0, "You may go linkdead. Results will be in the log file."); - // zone->pathing->MeshTest(); - // return; - // } - // } - //} - // - //if(!strcasecmp(sep->arg[1], "allspawns")) - //{ - // if(zone->pathing) - // { - // c->Message(0, "You may go linkdead. Results will be in the log file."); - // entity_list.FindPathsToAllNPCs(); - // return; - // } - //} - // - //if(!strcasecmp(sep->arg[1], "nearest")) - //{ - // if(!c->GetTarget() || !c->GetTarget()->IsMob()) - // { - // c->Message(0, "You must target something."); - // return; - // } - // - // if(zone->pathing) - // { - // Mob *m = c->GetTarget(); - // - // glm::vec3 Position(m->GetX(), m->GetY(), m->GetZ()); - // - // int Node = zone->pathing->FindNearestPathNode(Position); - // - // if(Node == -1) - // c->Message(0, "Unable to locate a path node within range."); - // else - // c->Message(0, "Nearest path node is %i", Node); - // - // return; - // } - //} - // - //c->Message(0, "Unknown path command."); } void Client::Undye() { diff --git a/zone/fearpath.cpp b/zone/fearpath.cpp index 3a1215748..a3a39993c 100644 --- a/zone/fearpath.cpp +++ b/zone/fearpath.cpp @@ -19,7 +19,6 @@ #include "../common/rulesys.h" #include "map.h" -#include "pathing.h" #include "zone.h" #ifdef _WINDOWS @@ -142,10 +141,10 @@ void Mob::CalculateNewFearpoint() if (!Route.empty()) { auto first = (*Route.begin()); - m_FearWalkTarget = glm::vec3(first.x, first.y, first.z); + m_FearWalkTarget = glm::vec3(first.pos.x, first.pos.y, first.pos.z); currently_fleeing = true; - Log(Logs::Detail, Logs::None, "Feared to node %i (%8.3f, %8.3f, %8.3f)", Node, first.x, first.y, first.z); + Log(Logs::Detail, Logs::None, "Feared to node %i (%8.3f, %8.3f, %8.3f)", Node, first.pos.x, first.pos.y, first.pos.z); return; } diff --git a/zone/pathfinder_interface.h b/zone/pathfinder_interface.h index e701b7f37..fc120fb43 100644 --- a/zone/pathfinder_interface.h +++ b/zone/pathfinder_interface.h @@ -9,7 +9,22 @@ class Seperator; class IPathfinder { public: - typedef std::list IPath; + struct IPathNode + { + IPathNode(const glm::vec3 &p) { + pos = p; + teleport = false; + } + + IPathNode(bool tp) { + teleport = tp; + } + + glm::vec3 pos; + bool teleport; + }; + + typedef std::list IPath; IPathfinder() { } virtual ~IPathfinder() { } diff --git a/zone/pathfinder_waypoint.cpp b/zone/pathfinder_waypoint.cpp index c741c4547..10c8c97a8 100644 --- a/zone/pathfinder_waypoint.cpp +++ b/zone/pathfinder_waypoint.cpp @@ -3,14 +3,15 @@ #include #include #include +#include +#include +#include #include "pathfinder_waypoint.h" #include "zone.h" #include "client.h" #include "../common/eqemu_logsys.h" #include "../common/rulesys.h" -#include -#include extern Zone *zone; @@ -115,6 +116,7 @@ PathfinderWaypoint::PathfinderWaypoint(const std::string &path) if (strncmp(Magic, "EQEMUPATH", 9)) { Log(Logs::General, Logs::Error, "Bad Magic String in .path file."); + fclose(f); return; } @@ -123,62 +125,20 @@ PathfinderWaypoint::PathfinderWaypoint(const std::string &path) Log(Logs::General, Logs::Status, "Path File Header: Version %ld, PathNodes %ld", (long)Head.version, (long)Head.PathNodeCount); - if (Head.version != 2) + if (Head.version == 2) { - Log(Logs::General, Logs::Error, "Unsupported path file version."); + LoadV2(f, Head); return; } - - std::unique_ptr PathNodes(new PathNode[Head.PathNodeCount]); - - fread(PathNodes.get(), sizeof(PathNode), Head.PathNodeCount, f); - - int MaxNodeID = Head.PathNodeCount - 1; - - m_impl->PathFileValid = true; - - m_impl->Nodes.reserve(Head.PathNodeCount); - for (uint32 i = 0; i < Head.PathNodeCount; ++i) - { - auto &n = PathNodes[i]; - - Point p = Point(n.v.x, n.v.y, n.v.z); - m_impl->Tree.insert(std::make_pair(p, i)); - - boost::add_vertex(m_impl->Graph); - Node node; - node.v = n.v; - node.bestz = n.bestz; - m_impl->Nodes.push_back(node); + else if (Head.version == 3) { + LoadV3(f, Head); + return; } - - auto weightmap = boost::get(boost::edge_weight, m_impl->Graph); - for (uint32 i = 0; i < Head.PathNodeCount; ++i) { - for (uint32 j = 0; j < 50; ++j) - { - if (PathNodes[i].Neighbours[j].id > MaxNodeID) - { - Log(Logs::General, Logs::Error, "Path Node %i, Neighbour %i (%i) out of range.", i, j, PathNodes[i].Neighbours[j].id); - m_impl->PathFileValid = false; - } - - if (PathNodes[i].Neighbours[j].id > 0) { - GraphType::edge_descriptor e; - bool inserted; - boost::tie(e, inserted) = boost::add_edge(PathNodes[i].id, PathNodes[i].Neighbours[j].id, m_impl->Graph); - weightmap[e] = PathNodes[i].Neighbours[j].distance; - - Edge edge; - edge.distance = PathNodes[i].Neighbours[j].distance; - edge.door_id = PathNodes[i].Neighbours[j].DoorID; - edge.teleport = PathNodes[i].Neighbours[j].Teleport; - - m_impl->Edges[std::make_pair(PathNodes[i].id, PathNodes[i].Neighbours[j].id)] = edge; - } - } + else { + Log(Logs::General, Logs::Error, "Unsupported path file version."); + fclose(f); + return; } - - fclose(f); } } @@ -239,8 +199,7 @@ IPathfinder::IPath PathfinderWaypoint::FindRoute(const glm::vec3 &start, const g auto &edge = iter->second; if (edge.teleport) { Route.push_front(m_impl->Nodes[v].v); - glm::vec3 teleport(100000000.0f, 100000000.0f, 100000000.0f); - Route.push_front(teleport); + Route.push_front(true); } else { Route.push_front(m_impl->Nodes[v].v); @@ -295,16 +254,75 @@ void PathfinderWaypoint::DebugCommand(Client *c, const Seperator *sep) { if (c->GetTarget() != nullptr) { auto target = c->GetTarget(); - glm::vec3 start(target->GetX(), target->GetY(), target->GetZ()); - glm::vec3 end(c->GetX(), c->GetY(), c->GetZ()); + glm::vec3 end(target->GetX(), target->GetY(), target->GetZ()); + glm::vec3 start(c->GetX(), c->GetY(), c->GetZ()); - ShowPath(start, end); + ShowPath(c, start, end); } return; } } +void PathfinderWaypoint::LoadV2(FILE *f, const PathFileHeader &header) +{ + std::unique_ptr PathNodes(new PathNode[header.PathNodeCount]); + + fread(PathNodes.get(), sizeof(PathNode), header.PathNodeCount, f); + + int MaxNodeID = header.PathNodeCount - 1; + + m_impl->PathFileValid = true; + + m_impl->Nodes.reserve(header.PathNodeCount); + for (uint32 i = 0; i < header.PathNodeCount; ++i) + { + auto &n = PathNodes[i]; + + Point p = Point(n.v.x, n.v.y, n.v.z); + m_impl->Tree.insert(std::make_pair(p, i)); + + boost::add_vertex(m_impl->Graph); + Node node; + node.v = n.v; + node.bestz = n.bestz; + m_impl->Nodes.push_back(node); + } + + auto weightmap = boost::get(boost::edge_weight, m_impl->Graph); + for (uint32 i = 0; i < header.PathNodeCount; ++i) { + for (uint32 j = 0; j < 50; ++j) + { + if (PathNodes[i].Neighbours[j].id > MaxNodeID) + { + Log(Logs::General, Logs::Error, "Path Node %i, Neighbour %i (%i) out of range.", i, j, PathNodes[i].Neighbours[j].id); + m_impl->PathFileValid = false; + } + + if (PathNodes[i].Neighbours[j].id > 0) { + GraphType::edge_descriptor e; + bool inserted; + boost::tie(e, inserted) = boost::add_edge(PathNodes[i].id, PathNodes[i].Neighbours[j].id, m_impl->Graph); + weightmap[e] = PathNodes[i].Neighbours[j].distance; + + Edge edge; + edge.distance = PathNodes[i].Neighbours[j].distance; + edge.door_id = PathNodes[i].Neighbours[j].DoorID; + edge.teleport = PathNodes[i].Neighbours[j].Teleport; + + m_impl->Edges[std::make_pair(PathNodes[i].id, PathNodes[i].Neighbours[j].id)] = edge; + } + } + } + + fclose(f); +} + +void PathfinderWaypoint::LoadV3(FILE *f, const PathFileHeader &header) +{ + fclose(f); +} + void PathfinderWaypoint::ShowNodes() { for (size_t i = 0; i < m_impl->Nodes.size(); ++i) @@ -348,46 +366,22 @@ void PathfinderWaypoint::ShowNodes() } } -void PathfinderWaypoint::ShowPath(const glm::vec3 &start, const glm::vec3 &end) +void PathfinderWaypoint::ShowPath(Client *c, const glm::vec3 &start, const glm::vec3 &end) { auto path = FindRoute(start, end); + std::vector points; + FindPerson_Point p; for (auto &node : path) { - auto npc_type = new NPCType; - memset(npc_type, 0, sizeof(NPCType)); - - sprintf(npc_type->name, "Path"); - npc_type->cur_hp = 4000000; - npc_type->max_hp = 4000000; - npc_type->race = 2254; - npc_type->gender = 2; - npc_type->class_ = 9; - npc_type->deity = 1; - npc_type->level = 75; - npc_type->npc_id = 0; - npc_type->loottable_id = 0; - npc_type->texture = 1; - npc_type->light = 0; - npc_type->runspeed = 0; - npc_type->d_melee_texture1 = 1; - npc_type->d_melee_texture2 = 1; - npc_type->merchanttype = 1; - npc_type->bodytype = 1; - - npc_type->STR = 150; - npc_type->STA = 150; - npc_type->DEX = 150; - npc_type->AGI = 150; - npc_type->INT = 150; - npc_type->WIS = 150; - npc_type->CHA = 150; - - npc_type->findable = 1; - auto position = glm::vec4(node.x, node.y, node.z, 0.0f); - auto npc = new NPC(npc_type, nullptr, position, FlyMode1); - npc->GiveNPCTypeData(npc_type); - - entity_list.AddNPC(npc, true, true); + if (!node.teleport) { + p.x = node.pos.x; + p.y = node.pos.y; + p.z = node.pos.z; + + points.push_back(p); + } } + + c->SendPathPacket(points); } diff --git a/zone/pathfinder_waypoint.h b/zone/pathfinder_waypoint.h index 493531802..5d10ea25a 100644 --- a/zone/pathfinder_waypoint.h +++ b/zone/pathfinder_waypoint.h @@ -1,7 +1,8 @@ #pragma once #include "pathfinder_interface.h" -#include + +struct PathFileHeader; class PathfinderWaypoint : public IPathfinder { @@ -14,8 +15,10 @@ public: virtual void DebugCommand(Client *c, const Seperator *sep); private: + void LoadV2(FILE *f, const PathFileHeader &header); + void LoadV3(FILE *f, const PathFileHeader &header); void ShowNodes(); - void ShowPath(const glm::vec3 &start, const glm::vec3 &end); + void ShowPath(Client *c, const glm::vec3 &start, const glm::vec3 &end); struct Implementation; std::unique_ptr m_impl; diff --git a/zone/pathing.cpp b/zone/pathing.cpp index 7bbc3c727..3be00c473 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -1,647 +1,10 @@ #include "../common/global_define.h" #include "client.h" -#include "doors.h" -#include "pathing.h" -#include "water_map.h" #include "zone.h" -#include -#include -#include -#include -#include - -#ifdef _WINDOWS -#define snprintf _snprintf -#endif - -//#define PATHDEBUG - extern Zone *zone; -float VectorDistance(glm::vec3 a, glm::vec3 b) -{ - float xdist = a.x - b.x; - float ydist = a.y - b.y; - float zdist = a.z - b.z; - return sqrtf(xdist * xdist + ydist * ydist + zdist * zdist); -} - -float VectorDistanceNoRoot(glm::vec3 a, glm::vec3 b) -{ - float xdist = a.x - b.x; - float ydist = a.y - b.y; - float zdist = a.z - b.z; - return xdist * xdist + ydist * ydist + zdist * zdist; - -} - -PathManager* PathManager::LoadPathFile(const char* ZoneName) -{ - - FILE *PathFile = nullptr; - - char LowerCaseZoneName[64]; - - char ZonePathFileName[256]; - - PathManager* Ret = nullptr; - - strn0cpy(LowerCaseZoneName, ZoneName, 64); - - strlwr(LowerCaseZoneName); - - snprintf(ZonePathFileName, 250, "%s%s.path", Config->MapDir.c_str(), LowerCaseZoneName); - - if((PathFile = fopen(ZonePathFileName, "rb"))) - { - Ret = new PathManager(); - - if(Ret->loadPaths(PathFile)) - { - Log(Logs::General, Logs::Status, "Path File %s loaded.", ZonePathFileName); - - } - else - { - Log(Logs::General, Logs::Error, "Path File %s failed to load.", ZonePathFileName); - safe_delete(Ret); - } - fclose(PathFile); - } - else - { - Log(Logs::General, Logs::Error, "Path File %s not found.", ZonePathFileName); - } - - return Ret; -} - -PathManager::PathManager() -{ - PathNodes = nullptr; - ClosedListFlag = nullptr; - Head.PathNodeCount = 0; - Head.version = 2; - QuickConnectTarget = -1; -} - -PathManager::~PathManager() -{ - safe_delete_array(PathNodes); - safe_delete_array(ClosedListFlag); -} - -bool PathManager::loadPaths(FILE *PathFile) -{ - - char Magic[10]; - - fread(&Magic, 9, 1, PathFile); - - if(strncmp(Magic, "EQEMUPATH", 9)) - { - Log(Logs::General, Logs::Error, "Bad Magic String in .path file."); - return false; - } - - fread(&Head, sizeof(Head), 1, PathFile); - - Log(Logs::General, Logs::Status, "Path File Header: Version %ld, PathNodes %ld", - (long)Head.version, (long)Head.PathNodeCount); - - if(Head.version != 2) - { - Log(Logs::General, Logs::Error, "Unsupported path file version."); - return false; - } - - PathNodes = new PathNode[Head.PathNodeCount]; - - fread(PathNodes, sizeof(PathNode), Head.PathNodeCount, PathFile); - - ClosedListFlag = new int[Head.PathNodeCount]; - -#ifdef PATHDEBUG - PrintPathing(); -#endif - - int MaxNodeID = Head.PathNodeCount - 1; - - bool PathFileValid = true; - - for(uint32 i = 0; i < Head.PathNodeCount; ++i) - { - for(uint32 j = 0; j < PATHNODENEIGHBOURS; ++j) - { - if(PathNodes[i].Neighbours[j].id > MaxNodeID) - { - Log(Logs::General, Logs::Error, "Path Node %i, Neighbour %i (%i) out of range.", i, j, PathNodes[i].Neighbours[j].id); - - PathFileValid = false; - } - } - } - - if(!PathFileValid) - { - safe_delete_array(PathNodes); - } - - return PathFileValid; -} - -void PathManager::PrintPathing() -{ - - for(uint32 i = 0; i < Head.PathNodeCount; ++i) - { - printf("PathNode: %2d id %2d. (%8.3f, %8.3f, %8.3f), BestZ: %8.3f\n", - i, PathNodes[i].id, PathNodes[i].v.x, PathNodes[i].v.y, PathNodes[i].v.z, PathNodes[i].bestz); - - - if(PathNodes[i].Neighbours[0].id == -1) - { - printf(" NO NEIGHBOURS.\n"); - continue; - } - - for(int j=0; j= 0) - printf(" ***** via door %i *****", PathNodes[i].Neighbours[j].DoorID); - - printf("\n"); - } - } -} - -glm::vec3 PathManager::GetPathNodeCoordinates(int NodeNumber, bool BestZ) -{ - glm::vec3 Result; - - if(NodeNumber < Head.PathNodeCount) - { - Result = PathNodes[NodeNumber].v; - - if(!BestZ) - return Result; - - Result.z = PathNodes[NodeNumber].bestz; - } - - return Result; - -} - -std::deque PathManager::FindRoute(int startID, int endID) -{ - Log(Logs::Detail, Logs::None, "FindRoute from node %i to %i", startID, endID); - - memset(ClosedListFlag, 0, sizeof(int) * Head.PathNodeCount); - - std::deque OpenList, ClosedList; - - std::dequeRoute; - - AStarNode AStarEntry, CurrentNode; - - AStarEntry.PathNodeID = startID; - AStarEntry.Parent = -1; - AStarEntry.HCost = 0; - AStarEntry.GCost = 0; - AStarEntry.Teleport = false; - - OpenList.push_back(AStarEntry); - - while(!OpenList.empty()) - { - // The OpenList is maintained in sorted order, lowest to highest cost. - - CurrentNode = (*OpenList.begin()); - - ClosedList.push_back(CurrentNode); - - ClosedListFlag[CurrentNode.PathNodeID] = true; - - OpenList.pop_front(); - - for(int i = 0; i < PATHNODENEIGHBOURS; ++i) - { - if(PathNodes[CurrentNode.PathNodeID].Neighbours[i].id == -1) - break; - - if(PathNodes[CurrentNode.PathNodeID].Neighbours[i].id == CurrentNode.Parent) - continue; - - if(PathNodes[CurrentNode.PathNodeID].Neighbours[i].id == endID) - { - Route.push_back(CurrentNode.PathNodeID); - - Route.push_back(endID); - - std::deque::iterator RouteIterator; - - while(CurrentNode.PathNodeID != startID) - { - for(RouteIterator = ClosedList.begin(); RouteIterator != ClosedList.end(); ++RouteIterator) - { - if((*RouteIterator).PathNodeID == CurrentNode.Parent) - { - if(CurrentNode.Teleport) - Route.insert(Route.begin(), -1); - - CurrentNode = (*RouteIterator); - - Route.insert(Route.begin(), CurrentNode.PathNodeID); - - break; - } - } - } - - return Route; - } - if(ClosedListFlag[PathNodes[CurrentNode.PathNodeID].Neighbours[i].id]) - continue; - - AStarEntry.PathNodeID = PathNodes[CurrentNode.PathNodeID].Neighbours[i].id; - - AStarEntry.Parent = CurrentNode.PathNodeID; - - AStarEntry.Teleport = PathNodes[CurrentNode.PathNodeID].Neighbours[i].Teleport; - - // HCost is the estimated cost to get from this node to the end. - AStarEntry.HCost = VectorDistance(PathNodes[PathNodes[CurrentNode.PathNodeID].Neighbours[i].id].v, - PathNodes[endID].v); - - AStarEntry.GCost = CurrentNode.GCost + PathNodes[CurrentNode.PathNodeID].Neighbours[i].distance; - - float FCost = AStarEntry.HCost + AStarEntry.GCost; -#ifdef PATHDEBUG - printf("Node: %i, Open Neighbour %i has HCost %8.3f, GCost %8.3f (Total Cost: %8.3f)\n", - CurrentNode.PathNodeID, - PathNodes[CurrentNode.PathNodeID].Neighbours[i].id, - AStarEntry.HCost, - AStarEntry.GCost, - AStarEntry.HCost + AStarEntry.GCost); -#endif - - bool AlreadyInOpenList = false; - - std::deque::iterator OpenListIterator, InsertionPoint = OpenList.end(); - - for(OpenListIterator = OpenList.begin(); OpenListIterator != OpenList.end(); ++OpenListIterator) - { - if((*OpenListIterator).PathNodeID == PathNodes[CurrentNode.PathNodeID].Neighbours[i].id) - { - AlreadyInOpenList = true; - - float GCostToNode = CurrentNode.GCost + PathNodes[CurrentNode.PathNodeID].Neighbours[i].distance; - - if(GCostToNode < (*OpenListIterator).GCost) - { - (*OpenListIterator).Parent = CurrentNode.PathNodeID; - - (*OpenListIterator).GCost = GCostToNode; - - (*OpenListIterator).Teleport = PathNodes[CurrentNode.PathNodeID].Neighbours[i].Teleport; - } - break; - } - else if((InsertionPoint == OpenList.end()) && (((*OpenListIterator).HCost + (*OpenListIterator).GCost) > FCost)) - { - InsertionPoint = OpenListIterator; - } - } - if(!AlreadyInOpenList) - OpenList.insert(InsertionPoint, AStarEntry); - } - - } - Log(Logs::Detail, Logs::None, "Unable to find a route."); - return Route; - -} - -bool CheckLOSBetweenPoints(glm::vec3 start, glm::vec3 end) { - - glm::vec3 hit; - - if((zone->zonemap) && (zone->zonemap->LineIntersectsZone(start, end, 1, &hit))) - return false; - - return true; -} - -auto path_compare = [](const PathNodeSortStruct& a, const PathNodeSortStruct& b) -{ - return a.Distance < b.Distance; -}; - -std::deque PathManager::FindRoute(glm::vec3 Start, glm::vec3 End) -{ - Log(Logs::Detail, Logs::None, "FindRoute(%8.3f, %8.3f, %8.3f, %8.3f, %8.3f, %8.3f)", Start.x, Start.y, Start.z, End.x, End.y, End.z); - - std::deque noderoute; - - float CandidateNodeRangeXY = RuleR(Pathing, CandidateNodeRangeXY); - - float CandidateNodeRangeZ = RuleR(Pathing, CandidateNodeRangeZ); - - // Find the nearest PathNode the Start has LOS to. - // - // - int ClosestPathNodeToStart = -1; - - std::deque SortedByDistance; - - PathNodeSortStruct TempNode; - - for(uint32 i = 0 ; i < Head.PathNodeCount; ++i) - { - if ((std::abs(Start.x - PathNodes[i].v.x) <= CandidateNodeRangeXY) && - (std::abs(Start.y - PathNodes[i].v.y) <= CandidateNodeRangeXY) && - (std::abs(Start.z - PathNodes[i].v.z) <= CandidateNodeRangeZ)) { - TempNode.id = i; - TempNode.Distance = VectorDistanceNoRoot(Start, PathNodes[i].v); - SortedByDistance.push_back(TempNode); - - } - } - - std::sort(SortedByDistance.begin(), SortedByDistance.end(), path_compare); - - for(auto Iterator = SortedByDistance.begin(); Iterator != SortedByDistance.end(); ++Iterator) - { - Log(Logs::Detail, Logs::None, "Checking Reachability of Node %i from Start Position.", PathNodes[(*Iterator).id].id); - - if(!zone->zonemap->LineIntersectsZone(Start, PathNodes[(*Iterator).id].v, 1.0f, nullptr)) - { - ClosestPathNodeToStart = (*Iterator).id; - break; - } - } - - if(ClosestPathNodeToStart <0 ) { - Log(Logs::Detail, Logs::None, "No LOS to any starting Path Node within range."); - return noderoute; - } - - Log(Logs::Detail, Logs::None, "Closest Path Node To Start: %2d", ClosestPathNodeToStart); - - // Find the nearest PathNode the end point has LOS to - - int ClosestPathNodeToEnd = -1; - - SortedByDistance.clear(); - - for(uint32 i = 0 ; i < Head.PathNodeCount; ++i) - { - if ((std::abs(End.x - PathNodes[i].v.x) <= CandidateNodeRangeXY) && - (std::abs(End.y - PathNodes[i].v.y) <= CandidateNodeRangeXY) && - (std::abs(End.z - PathNodes[i].v.z) <= CandidateNodeRangeZ)) { - TempNode.id = i; - TempNode.Distance = VectorDistanceNoRoot(End, PathNodes[i].v); - SortedByDistance.push_back(TempNode); - } - } - - std::sort(SortedByDistance.begin(), SortedByDistance.end(), path_compare); - - for(auto Iterator = SortedByDistance.begin(); Iterator != SortedByDistance.end(); ++Iterator) - { - Log(Logs::Detail, Logs::None, "Checking Reachability of Node %i from End Position.", PathNodes[(*Iterator).id].id); - Log(Logs::Detail, Logs::None, " (%8.3f, %8.3f, %8.3f) to (%8.3f, %8.3f, %8.3f)", - End.x, End.y, End.z, - PathNodes[(*Iterator).id].v.x, PathNodes[(*Iterator).id].v.y, PathNodes[(*Iterator).id].v.z); - - if(!zone->zonemap->LineIntersectsZone(End, PathNodes[(*Iterator).id].v, 1.0f, nullptr)) - { - ClosestPathNodeToEnd = (*Iterator).id; - break; - } - } - - if(ClosestPathNodeToEnd < 0) { - Log(Logs::Detail, Logs::None, "No LOS to any end Path Node within range."); - return noderoute; - } - - Log(Logs::Detail, Logs::None, "Closest Path Node To End: %2d", ClosestPathNodeToEnd); - - if(ClosestPathNodeToStart == ClosestPathNodeToEnd) - { - noderoute.push_back(ClosestPathNodeToStart); - return noderoute; - } - noderoute = FindRoute(ClosestPathNodeToStart, ClosestPathNodeToEnd); - - int NodesToAttemptToCull = RuleI(Pathing, CullNodesFromStart); - - if(NodesToAttemptToCull > 0) - { - int CulledNodes = 0; - - std::deque::iterator First, Second; - - while((noderoute.size() >= 2) && (CulledNodes < NodesToAttemptToCull)) - { - First = noderoute.begin(); - - Second = First; - - ++Second; - - if((*Second) < 0) - break; - - if(!zone->zonemap->LineIntersectsZone(Start, PathNodes[(*Second)].v, 1.0f, nullptr) - && NoHazards(Start, PathNodes[(*Second)].v)) - { - noderoute.erase(First); - - ++CulledNodes; - } - else - break; - } - } - - NodesToAttemptToCull = RuleI(Pathing, CullNodesFromEnd); - - if(NodesToAttemptToCull > 0) - { - int CulledNodes = 0; - - std::deque::iterator First, Second; - - while((noderoute.size() >= 2) && (CulledNodes < NodesToAttemptToCull)) - { - First = noderoute.end(); - - --First; - - Second = First; - - --Second; - - if((*Second) < 0) - break; - - if(!zone->zonemap->LineIntersectsZone(End, PathNodes[(*Second)].v, 1.0f, nullptr) - && NoHazards(End, PathNodes[(*Second)].v)) - { - noderoute.erase(First); - - ++CulledNodes; - } - else - break; - } - } - - return noderoute; -} - -const char* DigitToWord(int i) -{ - switch(i) { - case 0: - return "zero"; - case 1: - return "one"; - case 2: - return "two"; - case 3: - return "three"; - case 4: - return "four"; - case 5: - return "five"; - case 6: - return "six"; - case 7: - return "seven"; - case 8: - return "eight"; - case 9: - return "nine"; - } - return ""; -} - -void PathManager::SpawnPathNodes() -{ - - for(uint32 i = 0; i < Head.PathNodeCount; ++i) - { - auto npc_type = new NPCType; - memset(npc_type, 0, sizeof(NPCType)); - - auto c = PathNodes[i].id / 1000u; - sprintf(npc_type->name, "Node%u", c); - npc_type->cur_hp = 4000000; - npc_type->max_hp = 4000000; - npc_type->race = 2254; - npc_type->gender = 2; - npc_type->class_ = 9; - npc_type->deity= 1; - npc_type->level = 75; - npc_type->npc_id = 0; - npc_type->loottable_id = 0; - npc_type->texture = 1; - npc_type->light = 0; - npc_type->runspeed = 0; - npc_type->d_melee_texture1 = 1; - npc_type->d_melee_texture2 = 1; - npc_type->merchanttype = 1; - npc_type->bodytype = 1; - - npc_type->STR = 150; - npc_type->STA = 150; - npc_type->DEX = 150; - npc_type->AGI = 150; - npc_type->INT = 150; - npc_type->WIS = 150; - npc_type->CHA = 150; - - npc_type->findable = 1; - auto position = glm::vec4(PathNodes[i].v.x, PathNodes[i].v.y, PathNodes[i].v.z, 0.0f); - auto npc = new NPC(npc_type, nullptr, position, FlyMode1); - npc->GiveNPCTypeData(npc_type); - - entity_list.AddNPC(npc, true, true); - } -} - -void PathManager::MeshTest() -{ - // This will test connectivity between all path nodes - - int TotalTests = 0; - int NoConnections = 0; - - printf("Beginning Pathmanager connectivity tests.\n"); fflush(stdout); - - for(uint32 i = 0; i < Head.PathNodeCount; ++i) - { - for(uint32 j = 0; j < Head.PathNodeCount; ++j) - { - if(j == i) - continue; - - std::deque Route = FindRoute(PathNodes[i].id, PathNodes[j].id); - - if(Route.empty()) - { - ++NoConnections; - printf("FindRoute(%i, %i) **** NO ROUTE FOUND ****\n", PathNodes[i].id, PathNodes[j].id); - } - ++TotalTests; - } - } - printf("Executed %i route searches.\n", TotalTests); - printf("Failed to find %i routes.\n", NoConnections); - fflush(stdout); -} - -void PathManager::SimpleMeshTest() -{ - // This will test connectivity between the first path node and all other nodes - - int TotalTests = 0; - int NoConnections = 0; - - printf("Beginning Pathmanager connectivity tests.\n"); - fflush(stdout); - - for(uint32 j = 1; j < Head.PathNodeCount; ++j) - { - std::deque Route = FindRoute(PathNodes[0].id, PathNodes[j].id); - - if(Route.empty()) - { - ++NoConnections; - printf("FindRoute(%i, %i) **** NO ROUTE FOUND ****\n", PathNodes[0].id, PathNodes[j].id); - } - ++TotalTests; - } - printf("Executed %i route searches.\n", TotalTests); - printf("Failed to find %i routes.\n", NoConnections); - fflush(stdout); -} - glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &WaypointChanged, bool &NodeReached) { glm::vec3 To(ToX, ToY, ToZ); @@ -650,7 +13,7 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa } glm::vec3 From(GetX(), GetY(), GetZ()); - + if (DistanceSquared(To, From) < 1.0f) { WaypointChanged = false; NodeReached = true; @@ -663,7 +26,7 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa PathingDestination = To; WaypointChanged = true; NodeReached = false; - return *Route.begin(); + return (*Route.begin()).pos; } else { if (PathRecalcTimer->Check()) { @@ -674,290 +37,80 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa PathingDestination = To; WaypointChanged = true; NodeReached = false; - return *Route.begin(); + return (*Route.begin()).pos; } } - bool AtNextNode = DistanceSquared(From, *Route.begin()) < 4.0f; + bool AtNextNode = DistanceSquared(From, (*Route.begin()).pos) < 4.0f; if (AtNextNode) { WaypointChanged = false; NodeReached = true; - + Route.pop_front(); - + if (Route.empty()) { Route = zone->pathing->FindRoute(From, To); PathingDestination = To; WaypointChanged = true; - return *Route.begin(); + return (*Route.begin()).pos; } else { auto node = *Route.begin(); - if (node.x == 1000000.0f && node.y == 1000000.0f && node.z == 1000000.0f) { + if (node.teleport) { //If is identity node then is teleport node. Route.pop_front(); - + if (Route.empty()) { return To; } - + auto nextNode = *Route.begin(); - - Teleport(nextNode); - + + Teleport(nextNode.pos); + Route.pop_front(); - + if (Route.empty()) { return To; } - - return *Route.begin(); + + return (*Route.begin()).pos; } - - return node; + + return node.pos; } } else { WaypointChanged = false; NodeReached = false; - return *Route.begin(); + return (*Route.begin()).pos; } } } -int PathManager::FindNearestPathNode(glm::vec3 Position) -{ - - // Find the nearest PathNode we have LOS to. - // - // - - float CandidateNodeRangeXY = RuleR(Pathing, CandidateNodeRangeXY); - - float CandidateNodeRangeZ = RuleR(Pathing, CandidateNodeRangeZ); - - int ClosestPathNodeToStart = -1; - - std::deque SortedByDistance; - - PathNodeSortStruct TempNode; - - for(uint32 i = 0 ; i < Head.PathNodeCount; ++i) - { - if ((std::abs(Position.x - PathNodes[i].v.x) <= CandidateNodeRangeXY) && - (std::abs(Position.y - PathNodes[i].v.y) <= CandidateNodeRangeXY) && - (std::abs(Position.z - PathNodes[i].v.z) <= CandidateNodeRangeZ)) { - TempNode.id = i; - TempNode.Distance = VectorDistanceNoRoot(Position, PathNodes[i].v); - SortedByDistance.push_back(TempNode); - - } - } - - std::sort(SortedByDistance.begin(), SortedByDistance.end(), path_compare); - - for(auto Iterator = SortedByDistance.begin(); Iterator != SortedByDistance.end(); ++Iterator) - { - Log(Logs::Detail, Logs::None, "Checking Reachability of Node %i from Start Position.", PathNodes[(*Iterator).id].id); - - if(!zone->zonemap->LineIntersectsZone(Position, PathNodes[(*Iterator).id].v, 1.0f, nullptr)) - { - ClosestPathNodeToStart = (*Iterator).id; - break; - } - } - - if(ClosestPathNodeToStart <0 ) { - Log(Logs::Detail, Logs::None, "No LOS to any starting Path Node within range."); - return -1; - } - return ClosestPathNodeToStart; -} - -bool PathManager::NoHazards(glm::vec3 From, glm::vec3 To) -{ - // Test the Z coordinate at the mid point. - // - glm::vec3 MidPoint((From.x + To.x) / 2, (From.y + To.y) / 2, From.z); - - float NewZ = zone->zonemap->FindBestZ(MidPoint, nullptr); - - if (std::abs(NewZ - From.z) > RuleR(Pathing, ZDiffThresholdNew)) { - Log(Logs::Detail, Logs::None, " HAZARD DETECTED moving from %8.3f, %8.3f, %8.3f to %8.3f, %8.3f, %8.3f. Z Change is %8.3f", - From.x, From.y, From.z, MidPoint.x, MidPoint.y, MidPoint.z, NewZ - From.z); - - return false; - } - else - { - Log(Logs::Detail, Logs::None, "No HAZARD DETECTED moving from %8.3f, %8.3f, %8.3f to %8.3f, %8.3f, %8.3f. Z Change is %8.3f", - From.x, From.y, From.z, MidPoint.x, MidPoint.y, MidPoint.z, NewZ - From.z); - } - - return true; -} - -bool PathManager::NoHazardsAccurate(glm::vec3 From, glm::vec3 To) -{ - float stepx, stepy, stepz, curx, cury, curz; - glm::vec3 cur = From; - float last_z = From.z; - float step_size = 1.0; - - curx = From.x; - cury = From.y; - curz = From.z; - - do - { - stepx = (float)To.x - curx; - stepy = (float)To.y - cury; - stepz = (float)To.z - curz; - float factor = sqrt(stepx*stepx + stepy*stepy + stepz*stepz); - stepx = (stepx / factor)*step_size; - stepy = (stepy / factor)*step_size; - stepz = (stepz / factor)*step_size; - - glm::vec3 TestPoint(curx, cury, curz); - float NewZ = zone->zonemap->FindBestZ(TestPoint, nullptr); - if (std::abs(NewZ - last_z) > 5.0f) { - Log(Logs::Detail, Logs::None, " HAZARD DETECTED moving from %8.3f, %8.3f, %8.3f to %8.3f, %8.3f, %8.3f. Best Z %8.3f, Z Change is %8.3f", - From.x, From.y, From.z, TestPoint.x, TestPoint.y, TestPoint.z, NewZ, NewZ - From.z); - return false; - } - last_z = NewZ; - - if (zone->watermap) - { - auto from = glm::vec3(From.x, From.y, From.z); - auto to = glm::vec3(To.x, To.y, To.z); - if (zone->watermap->InLiquid(from) || zone->watermap->InLiquid(to)) - { - break; - } - auto testPointNewZ = glm::vec3(TestPoint.x, TestPoint.y, NewZ); - if (zone->watermap->InLiquid(testPointNewZ)) - { - glm::vec3 TestPointWater(TestPoint.x, TestPoint.y, NewZ - 0.5f); - glm::vec3 TestPointWaterDest = TestPointWater; - glm::vec3 hit; - TestPointWaterDest.z -= 500; - float best_z2 = -999990; - if (zone->zonemap->LineIntersectsZone(TestPointWater, TestPointWaterDest, 1.0f, &hit)) - { - best_z2 = hit.z; - } - if (best_z2 == -999990) - { - Log(Logs::Detail, Logs::None, " HAZARD DETECTED, really deep water/lava!"); - return false; - } - else - { - if (std::abs(NewZ - best_z2) > RuleR(Pathing, ZDiffThresholdNew)) { - Log(Logs::Detail, Logs::None, - " HAZARD DETECTED, water is fairly deep at %8.3f units deep", - std::abs(NewZ - best_z2)); - return false; - } - else - { - Log(Logs::Detail, Logs::None, - " HAZARD NOT DETECTED, water is shallow at %8.3f units deep", - std::abs(NewZ - best_z2)); - } - } - } - else - { - Log(Logs::Detail, Logs::None, "Hazard point not in water or lava!"); - } - } - else - { - Log(Logs::Detail, Logs::None, "No water map loaded for hazards!"); - } - - curx += stepx; - cury += stepy; - curz += stepz; - - cur.x = curx; - cur.y = cury; - cur.z = curz; - - if (std::abs(curx - To.x) < step_size) - cur.x = To.x; - if (std::abs(cury - To.y) < step_size) - cur.y = To.y; - if (std::abs(curz - To.z) < step_size) - cur.z = To.z; - - } while (cur.x != To.x || cur.y != To.y || cur.z != To.z); - return true; -} - -void Mob::PrintRoute() -{ - - //printf("Route is : "); - // - //for(auto Iterator = Route.begin(); Iterator !=Route.end(); ++Iterator) - //{ - // printf("%i, ", (*Iterator)); - //} - // - //printf("\n"); - -} - -void PathManager::OpenDoors(int Node1, int Node2, Mob *ForWho) -{ - if(!ForWho || (Node1 >= Head.PathNodeCount) || (Node2 >= Head.PathNodeCount) || (Node1 < 0) || (Node2 < 0)) - return; - - for(int i = 0; i < PATHNODENEIGHBOURS; ++i) - { - if(PathNodes[Node1].Neighbours[i].id == -1) - return; - - if(PathNodes[Node1].Neighbours[i].id != Node2) - continue; - - if(PathNodes[Node1].Neighbours[i].DoorID >= 0) - { - Doors *d = entity_list.FindDoor(PathNodes[Node1].Neighbours[i].DoorID); - - if(d && !d->IsDoorOpen() ) - { - Log(Logs::Detail, Logs::None, "Opening door %i for %s", PathNodes[Node1].Neighbours[i].DoorID, ForWho->GetName()); - - d->ForceOpen(ForWho); - } - return; - } - } -} - -//this assumes that the first point in the list is the player's -//current position, I dont know how well it works if its not. void Client::SendPathPacket(std::vector &points) { - if(points.size() < 2) { + if (points.size() < 2) { //empty length packet == not found. EQApplicationPacket outapp(OP_FindPersonReply, 0); QueuePacket(&outapp); return; } - int len = sizeof(FindPersonResult_Struct) + (points.size()+1) * sizeof(FindPerson_Point); + if (points.size() > 36) { + EQApplicationPacket outapp(OP_FindPersonReply, 0); + QueuePacket(&outapp); + return; + } + + int len = sizeof(FindPersonResult_Struct) + (points.size() + 1) * sizeof(FindPerson_Point); auto outapp = new EQApplicationPacket(OP_FindPersonReply, len); - FindPersonResult_Struct* fpr=(FindPersonResult_Struct*)outapp->pBuffer; + FindPersonResult_Struct* fpr = (FindPersonResult_Struct*)outapp->pBuffer; std::vector::iterator cur, end; cur = points.begin(); end = points.end(); unsigned int r; - for(r = 0; cur != end; ++cur, r++) { + for (r = 0; cur != end; ++cur, r++) { fpr->path[r] = *cur; } @@ -967,959 +120,4 @@ void Client::SendPathPacket(std::vector &points) { fpr->dest = *cur; FastQueuePacket(&outapp); - - -} - -PathNode* PathManager::FindPathNodeByCoordinates(float x, float y, float z) -{ - for(uint32 i = 0; i < Head.PathNodeCount; ++i) - if((PathNodes[i].v.x == x) && (PathNodes[i].v.y == y) && (PathNodes[i].v.z == z)) - return &PathNodes[i]; - - return nullptr; -} - -int PathManager::GetRandomPathNode() -{ - return zone->random.Int(0, Head.PathNodeCount - 1); - -} - -void PathManager::ShowPathNodeNeighbours(Client *c) -{ - if(!c || !c->GetTarget()) - return; - - - PathNode *Node = FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); - - if(!Node) - { - c->Message(0, "Unable to find path node."); - return; - } - c->Message(0, "Path node %4i", Node->id); - - for(uint32 i = 0; i < Head.PathNodeCount; ++i) - { - char Name[64]; - - if(PathNodes[i].id < 10) - sprintf(Name, "%s000", DigitToWord(PathNodes[i].id)); - else if(PathNodes[i].id < 100) - sprintf(Name, "%s_%s000", DigitToWord(PathNodes[i].id / 10), DigitToWord(PathNodes[i].id % 10)); - else - sprintf(Name, "%s_%s_%s000", DigitToWord(PathNodes[i].id/100), DigitToWord((PathNodes[i].id % 100)/10), - DigitToWord(((PathNodes[i].id % 100) %10))); - - Mob *m = entity_list.GetMob(Name); - - if(m) - m->SendIllusionPacket(151); - } - - std::stringstream Neighbours; - - for(int i = 0; i < PATHNODENEIGHBOURS; ++i) - { - if(Node->Neighbours[i].id == -1) - break; - Neighbours << Node->Neighbours[i].id << ", "; - - char Name[64]; - - if(Node->Neighbours[i].id < 10) - sprintf(Name, "%s000", DigitToWord(Node->Neighbours[i].id)); - else if(Node->Neighbours[i].id < 100) - sprintf(Name, "%s_%s000", DigitToWord(Node->Neighbours[i].id / 10), DigitToWord(Node->Neighbours[i].id % 10)); - else - sprintf(Name, "%s_%s_%s000", DigitToWord(Node->Neighbours[i].id/100), DigitToWord((Node->Neighbours[i].id % 100)/10), - DigitToWord(((Node->Neighbours[i].id % 100) %10))); - - Mob *m = entity_list.GetMob(Name); - - if(m) - m->SendIllusionPacket(46); - } - c->Message(0, "Neighbours: %s", Neighbours.str().c_str()); -} - -void PathManager::NodeInfo(Client *c) -{ - if(!c) - { - return; - } - - if(!c->GetTarget()) - { - c->Message(0, "You must target a node."); - return; - } - - PathNode *Node = FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); - if(!Node) - { - return; - } - - c->Message(0, "Pathing node: %i at (%.2f, %.2f, %.2f) with bestz %.2f", - Node->id, Node->v.x, Node->v.y, Node->v.z, Node->bestz); - - bool neighbour = false; - for(int x = 0; x < 50; ++x) - { - if(Node->Neighbours[x].id != -1) - { - if(!neighbour) - { - c->Message(0, "Neighbours found:"); - neighbour = true; - } - c->Message(0, "id: %i, distance: %.2f, door id: %i, is teleport: %i", - Node->Neighbours[x].id, Node->Neighbours[x].distance, - Node->Neighbours[x].DoorID, Node->Neighbours[x].Teleport); - } - } - - if(!neighbour) - { - c->Message(0, "No neighbours found!"); - } - return; -} - -void PathManager::DumpPath(std::string filename) -{ - std::ofstream o_file; - - std::string file_to_write = StringFormat("%s%s", Config->MapDir.c_str(), filename.c_str()); - - o_file.open(file_to_write.c_str(), std::ios_base::binary | std::ios_base::trunc | std::ios_base::out); - o_file.write("EQEMUPATH", 9); - o_file.write((const char*)&Head, sizeof(Head)); - o_file.write((const char*)PathNodes, (sizeof(PathNode)*Head.PathNodeCount)); - o_file.close(); -} - -int32 PathManager::AddNode(float x, float y, float z, float best_z, int32 requested_id) -{ - int32 new_id = -1; - if(requested_id != 0) - { - new_id = requested_id; - for(uint32 i = 0; i < Head.PathNodeCount; ++i) - { - if(PathNodes[i].id == requested_id) - { - new_id = -1; - break; - } - } - } - - if(new_id == -1) - { - for(uint32 i = 0; i < Head.PathNodeCount; ++i) - { - if(PathNodes[i].id - new_id > 1) { - new_id = PathNodes[i].id - 1; - break; - } - - if(PathNodes[i].id > new_id) - new_id = PathNodes[i].id; - } - new_id++; - } - - PathNode new_node; - new_node.v.x = x; - new_node.v.y = y; - new_node.v.z = z; - new_node.bestz = best_z; - new_node.id = (uint16)new_id; - for(int x = 0; x < PATHNODENEIGHBOURS; ++x) - { - new_node.Neighbours[x].id = -1; - new_node.Neighbours[x].distance = 0.0; - new_node.Neighbours[x].DoorID = -1; - new_node.Neighbours[x].Teleport = 0; - } - - Head.PathNodeCount++; - if(Head.PathNodeCount > 1) - { - auto t_PathNodes = new PathNode[Head.PathNodeCount]; - for(uint32 x = 0; x < (Head.PathNodeCount - 1); ++x) - { - t_PathNodes[x].v.x = PathNodes[x].v.x; - t_PathNodes[x].v.y = PathNodes[x].v.y; - t_PathNodes[x].v.z = PathNodes[x].v.z; - t_PathNodes[x].bestz = PathNodes[x].bestz; - t_PathNodes[x].id = PathNodes[x].id; - for(int n = 0; n < PATHNODENEIGHBOURS; ++n) - { - t_PathNodes[x].Neighbours[n].distance = PathNodes[x].Neighbours[n].distance; - t_PathNodes[x].Neighbours[n].DoorID = PathNodes[x].Neighbours[n].DoorID; - t_PathNodes[x].Neighbours[n].id = PathNodes[x].Neighbours[n].id; - t_PathNodes[x].Neighbours[n].Teleport = PathNodes[x].Neighbours[n].Teleport; - } - - } - - int32 index = (Head.PathNodeCount - 1); - t_PathNodes[index].v.x = new_node.v.x; - t_PathNodes[index].v.y = new_node.v.y; - t_PathNodes[index].v.z = new_node.v.z; - t_PathNodes[index].bestz = new_node.bestz; - t_PathNodes[index].id = new_node.id; - for(int n = 0; n < PATHNODENEIGHBOURS; ++n) - { - t_PathNodes[index].Neighbours[n].distance = new_node.Neighbours[n].distance; - t_PathNodes[index].Neighbours[n].DoorID = new_node.Neighbours[n].DoorID; - t_PathNodes[index].Neighbours[n].id = new_node.Neighbours[n].id; - t_PathNodes[index].Neighbours[n].Teleport = new_node.Neighbours[n].Teleport; - } - - delete[] PathNodes; - PathNodes = t_PathNodes; - - auto npc_type = new NPCType; - memset(npc_type, 0, sizeof(NPCType)); - if(new_id < 10) - sprintf(npc_type->name, "%s", DigitToWord(new_id)); - else if(new_id < 100) - sprintf(npc_type->name, "%s_%s", DigitToWord(new_id/10), DigitToWord(new_id % 10)); - else - sprintf(npc_type->name, "%s_%s_%s", DigitToWord(new_id/100), DigitToWord((new_id % 100)/10), - DigitToWord(((new_id % 100) %10))); - - sprintf(npc_type->lastname, "%i", new_id); - npc_type->cur_hp = 4000000; - npc_type->max_hp = 4000000; - npc_type->race = 151; - npc_type->gender = 2; - npc_type->class_ = 9; - npc_type->deity= 1; - npc_type->level = 75; - npc_type->npc_id = 0; - npc_type->loottable_id = 0; - npc_type->texture = 1; - npc_type->light = 0; - npc_type->runspeed = 0; - npc_type->d_melee_texture1 = 1; - npc_type->d_melee_texture2 = 1; - npc_type->merchanttype = 1; - npc_type->bodytype = 1; - npc_type->STR = 150; - npc_type->STA = 150; - npc_type->DEX = 150; - npc_type->AGI = 150; - npc_type->INT = 150; - npc_type->WIS = 150; - npc_type->CHA = 150; - npc_type->findable = 1; - - auto position = glm::vec4(new_node.v.x, new_node.v.y, new_node.v.z, 0.0f); - auto npc = new NPC(npc_type, nullptr, position, FlyMode1); - npc->GiveNPCTypeData(npc_type); - entity_list.AddNPC(npc, true, true); - - safe_delete_array(ClosedListFlag); - ClosedListFlag = new int[Head.PathNodeCount]; - return new_id; - } - else - { - PathNodes = new PathNode[Head.PathNodeCount]; - PathNodes[0].v.x = new_node.v.x; - PathNodes[0].v.y = new_node.v.y; - PathNodes[0].v.z = new_node.v.z; - PathNodes[0].bestz = new_node.bestz; - PathNodes[0].id = new_node.id; - for(int n = 0; n < PATHNODENEIGHBOURS; ++n) - { - PathNodes[0].Neighbours[n].distance = new_node.Neighbours[n].distance; - PathNodes[0].Neighbours[n].DoorID = new_node.Neighbours[n].DoorID; - PathNodes[0].Neighbours[n].id = new_node.Neighbours[n].id; - PathNodes[0].Neighbours[n].Teleport = new_node.Neighbours[n].Teleport; - } - - auto npc_type = new NPCType; - memset(npc_type, 0, sizeof(NPCType)); - if(new_id < 10) - sprintf(npc_type->name, "%s", DigitToWord(new_id)); - else if(new_id < 100) - sprintf(npc_type->name, "%s_%s", DigitToWord(new_id/10), DigitToWord(new_id % 10)); - else - sprintf(npc_type->name, "%s_%s_%s", DigitToWord(new_id/100), DigitToWord((new_id % 100)/10), - DigitToWord(((new_id % 100) %10))); - - sprintf(npc_type->lastname, "%i", new_id); - npc_type->cur_hp = 4000000; - npc_type->max_hp = 4000000; - npc_type->race = 151; - npc_type->gender = 2; - npc_type->class_ = 9; - npc_type->deity= 1; - npc_type->level = 75; - npc_type->npc_id = 0; - npc_type->loottable_id = 0; - npc_type->texture = 1; - npc_type->light = 0; - npc_type->runspeed = 0; - npc_type->d_melee_texture1 = 1; - npc_type->d_melee_texture2 = 1; - npc_type->merchanttype = 1; - npc_type->bodytype = 1; - npc_type->STR = 150; - npc_type->STA = 150; - npc_type->DEX = 150; - npc_type->AGI = 150; - npc_type->INT = 150; - npc_type->WIS = 150; - npc_type->CHA = 150; - npc_type->findable = 1; - - auto position = glm::vec4(new_node.v.x, new_node.v.y, new_node.v.z, 0.0f); - auto npc = new NPC(npc_type, nullptr, position, FlyMode1); - npc->GiveNPCTypeData(npc_type); - entity_list.AddNPC(npc, true, true); - - ClosedListFlag = new int[Head.PathNodeCount]; - - return new_id; - } -} - -bool PathManager::DeleteNode(Client *c) -{ - if(!c) - { - return false; - } - - if(!c->GetTarget()) - { - c->Message(0, "You must target a node."); - return false; - } - - PathNode *Node = FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); - if(!Node) - { - return false; - } - - return DeleteNode(Node->id); -} - -bool PathManager::DeleteNode(int32 id) -{ - //if the current list is > 1 in size create a new list of size current size - 1 - //transfer all but the current node to this new list and delete our current list - //set this new list to be our current list - //else if the size is 1 just delete our current list and set it to zero. - //go through and delete all ref in neighbors... - - if(Head.PathNodeCount > 1) - { - auto t_PathNodes = new PathNode[Head.PathNodeCount - 1]; - uint32 index = 0; - for(uint32 x = 0; x < Head.PathNodeCount; x++) - { - if(PathNodes[x].id != id) - { - t_PathNodes[index].id = PathNodes[x].id; - t_PathNodes[index].v.x = PathNodes[x].v.x; - t_PathNodes[index].v.y = PathNodes[x].v.y; - t_PathNodes[index].v.z = PathNodes[x].v.z; - t_PathNodes[index].bestz = PathNodes[x].bestz; - for(int n = 0; n < PATHNODENEIGHBOURS; ++n) - { - t_PathNodes[index].Neighbours[n].distance = PathNodes[x].Neighbours[n].distance; - t_PathNodes[index].Neighbours[n].DoorID = PathNodes[x].Neighbours[n].DoorID; - t_PathNodes[index].Neighbours[n].id = PathNodes[x].Neighbours[n].id; - t_PathNodes[index].Neighbours[n].Teleport = PathNodes[x].Neighbours[n].Teleport; - } - index++; - } - } - Head.PathNodeCount--; - delete[] PathNodes; - PathNodes = t_PathNodes; - - for(uint32 y = 0; y < Head.PathNodeCount; ++y) - { - for(int n = 0; n < PATHNODENEIGHBOURS; ++n) - { - if(PathNodes[y].Neighbours[n].id == id) - { - PathNodes[y].Neighbours[n].Teleport = 0; - PathNodes[y].Neighbours[n].DoorID = -1; - PathNodes[y].Neighbours[n].distance = 0.0; - PathNodes[y].Neighbours[n].id = -1; - } - } - } - safe_delete_array(ClosedListFlag); - ClosedListFlag = new int[Head.PathNodeCount]; - } - else - { - delete[] PathNodes; - PathNodes = nullptr; - } - return true; -} - -void PathManager::ConnectNodeToNode(Client *c, int32 Node2, int32 teleport, int32 doorid) -{ - if(!c) - { - return; - } - - if(!c->GetTarget()) - { - c->Message(0, "You must target a node."); - return; - } - - PathNode *Node = FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); - if(!Node) - { - return; - } - - c->Message(0, "Connecting %i to %i", Node->id, Node2); - - if(doorid == 0) - ConnectNodeToNode(Node->id, Node2, teleport); - else - ConnectNodeToNode(Node->id, Node2, teleport, doorid); -} - -void PathManager::ConnectNodeToNode(int32 Node1, int32 Node2, int32 teleport, int32 doorid) -{ - PathNode *a = nullptr; - PathNode *b = nullptr; - for(uint32 x = 0; x < Head.PathNodeCount; ++x) - { - if(PathNodes[x].id == Node1) - { - a = &PathNodes[x]; - if(b) - break; - } - else if(PathNodes[x].id == Node2) - { - b = &PathNodes[x]; - if(a) - break; - } - } - - if(a == nullptr || b == nullptr) - return; - - bool connect_a_to_b = true; - if(NodesConnected(a, b)) - connect_a_to_b = false; - - bool connect_b_to_a = true; - if(NodesConnected(b, a)) - connect_b_to_a = false; - - - if(connect_a_to_b) - { - for(int a_i = 0; a_i < PATHNODENEIGHBOURS; ++a_i) - { - if(a->Neighbours[a_i].id == -1) - { - a->Neighbours[a_i].id = b->id; - a->Neighbours[a_i].DoorID = doorid; - a->Neighbours[a_i].Teleport = teleport; - a->Neighbours[a_i].distance = VectorDistance(a->v, b->v); - break; - } - } - } - - if(connect_b_to_a) - { - for(int b_i = 0; b_i < PATHNODENEIGHBOURS; ++b_i) - { - if(b->Neighbours[b_i].id == -1) - { - b->Neighbours[b_i].id = a->id; - b->Neighbours[b_i].DoorID = doorid; - b->Neighbours[b_i].Teleport = teleport; - b->Neighbours[b_i].distance = VectorDistance(a->v, b->v); - break; - } - } - } -} - -void PathManager::ConnectNode(Client *c, int32 Node2, int32 teleport, int32 doorid) -{ - if(!c) - { - return; - } - - if(!c->GetTarget()) - { - c->Message(0, "You must target a node."); - return; - } - - PathNode *Node = FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); - if(!Node) - { - return; - } - - c->Message(0, "Connecting %i to %i", Node->id, Node2); - - if(doorid == 0) - ConnectNode(Node->id, Node2, teleport); - else - ConnectNode(Node->id, Node2, teleport, doorid); -} - -void PathManager::ConnectNode(int32 Node1, int32 Node2, int32 teleport, int32 doorid) -{ - PathNode *a = nullptr; - PathNode *b = nullptr; - for(uint32 x = 0; x < Head.PathNodeCount; ++x) - { - if(PathNodes[x].id == Node1) - { - a = &PathNodes[x]; - if(b) - break; - } - else if(PathNodes[x].id == Node2) - { - b = &PathNodes[x]; - if(a) - break; - } - } - - if(a == nullptr || b == nullptr) - return; - - bool connect_a_to_b = true; - if(NodesConnected(a, b)) - connect_a_to_b = false; - - if(connect_a_to_b) - { - for(int a_i = 0; a_i < PATHNODENEIGHBOURS; ++a_i) - { - if(a->Neighbours[a_i].id == -1) - { - a->Neighbours[a_i].id = b->id; - a->Neighbours[a_i].DoorID = doorid; - a->Neighbours[a_i].Teleport = teleport; - a->Neighbours[a_i].distance = VectorDistance(a->v, b->v); - break; - } - } - } -} - -void PathManager::DisconnectNodeToNode(Client *c, int32 Node2) -{ - if(!c) - { - return; - } - - if(!c->GetTarget()) - { - c->Message(0, "You must target a node."); - return; - } - - PathNode *Node = FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); - if(!Node) - { - return; - } - - DisconnectNodeToNode(Node->id, Node2); -} - -void PathManager::DisconnectNodeToNode(int32 Node1, int32 Node2) -{ - PathNode *a = nullptr; - PathNode *b = nullptr; - for(uint32 x = 0; x < Head.PathNodeCount; ++x) - { - if(PathNodes[x].id == Node1) - { - a = &PathNodes[x]; - if(b) - break; - } - else if(PathNodes[x].id == Node2) - { - b = &PathNodes[x]; - if(a) - break; - } - } - - if(a == nullptr || b == nullptr) - return; - - bool disconnect_a_from_b = false; - if(NodesConnected(a, b)) - disconnect_a_from_b = true; - - bool disconnect_b_from_a = false; - if(NodesConnected(b, a)) - disconnect_b_from_a = true; - - if(disconnect_a_from_b) - { - for(int a_i = 0; a_i < PATHNODENEIGHBOURS; ++a_i) - { - if(a->Neighbours[a_i].id == b->id) - { - a->Neighbours[a_i].distance = 0.0; - a->Neighbours[a_i].DoorID = -1; - a->Neighbours[a_i].id = -1; - a->Neighbours[a_i].Teleport = 0; - break; - } - } - } - - if(disconnect_b_from_a) - { - for(int b_i = 0; b_i < PATHNODENEIGHBOURS; ++b_i) - { - if(b->Neighbours[b_i].id == a->id) - { - b->Neighbours[b_i].distance = 0.0; - b->Neighbours[b_i].DoorID = -1; - b->Neighbours[b_i].id = -1; - b->Neighbours[b_i].Teleport = 0; - break; - } - } - } -} - -void PathManager::MoveNode(Client *c) -{ - if(!c) - { - return; - } - - if(!c->GetTarget()) - { - c->Message(0, "You must target a node."); - return; - } - - PathNode *Node = FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); - if(!Node) - { - return; - } - - Node->v.x = c->GetX(); - Node->v.y = c->GetY(); - Node->v.z = c->GetZ(); - - if(zone->zonemap) - { - glm::vec3 loc(c->GetX(), c->GetY(), c->GetZ()); - Node->bestz = zone->zonemap->FindBestZ(loc, nullptr); - } - else - { - Node->bestz = Node->v.z; - } -} - -void PathManager::DisconnectAll(Client *c) -{ - if(!c) - { - return; - } - - if(!c->GetTarget()) - { - c->Message(0, "You must target a node."); - return; - } - - PathNode *Node = FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); - if(!Node) - { - return; - } - - for(int x = 0; x < PATHNODENEIGHBOURS; ++x) - { - Node->Neighbours[x].distance = 0; - Node->Neighbours[x].Teleport = 0; - Node->Neighbours[x].DoorID = -1; - Node->Neighbours[x].id = -1; - } - - for(uint32 i = 0; i < Head.PathNodeCount; ++i) - { - if(PathNodes[i].id == Node->id) - continue; - - for(int ix = 0; ix < PATHNODENEIGHBOURS; ++ix) - { - if(PathNodes[i].Neighbours[ix].id == Node->id) - { - PathNodes[i].Neighbours[ix].distance = 0; - PathNodes[i].Neighbours[ix].Teleport = 0; - PathNodes[i].Neighbours[ix].id = -1; - PathNodes[i].Neighbours[ix].DoorID = -1; - } - } - } -} - -//checks if anything in a points to b -bool PathManager::NodesConnected(PathNode *a, PathNode *b) -{ - if(!a) - return false; - - if(!b) - return false; - - for(int x = 0; x < PATHNODENEIGHBOURS; ++x) - { - if(a->Neighbours[x].id == b->id) - return true; - } - return false; -} - -bool PathManager::CheckLosFN(glm::vec3 a, glm::vec3 b) -{ - if(zone->zonemap) - { - glm::vec3 hit; - - glm::vec3 myloc; - glm::vec3 oloc; - - myloc.x = a.x; - myloc.y = a.y; - myloc.z = a.z; - - oloc.x = b.x; - oloc.y = b.y; - oloc.z = b.z; - - - if(zone->zonemap->LineIntersectsZone(myloc, oloc, 1.0f, nullptr)) - { - return false; - } - } - return true; -} - -void PathManager::ProcessNodesAndSave(std::string filename) -{ - if(zone->zonemap) - { - for(uint32 i = 0; i < Head.PathNodeCount; ++i) - { - for(int in = 0; in < PATHNODENEIGHBOURS; ++in) - { - PathNodes[i].Neighbours[in].distance = 0.0; - PathNodes[i].Neighbours[in].DoorID = -1; - PathNodes[i].Neighbours[in].id = -1; - PathNodes[i].Neighbours[in].Teleport = 0; - } - } - - for(uint32 x = 0; x < Head.PathNodeCount; ++x) - { - for(uint32 y = 0; y < Head.PathNodeCount; ++y) - { - if(y == x) //can't connect to ourselves. - continue; - - if(!NodesConnected(&PathNodes[x], &PathNodes[y])) - { - if(VectorDistance(PathNodes[x].v, PathNodes[y].v) <= 200) - { - if(CheckLosFN(PathNodes[x].v, PathNodes[y].v)) - { - if(NoHazardsAccurate(PathNodes[x].v, PathNodes[y].v)) - { - ConnectNodeToNode(PathNodes[x].id, PathNodes[y].id, 0, 0); - } - } - } - } - } - } - } - DumpPath(filename); -} - -void PathManager::ResortConnections() -{ - NeighbourNode Neigh[PATHNODENEIGHBOURS]; - for(uint32 x = 0; x < Head.PathNodeCount; ++x) - { - int index = 0; - for(int y = 0; y < PATHNODENEIGHBOURS; ++y) - { - Neigh[y].distance = 0; - Neigh[y].DoorID = -1; - Neigh[y].id = -1; - Neigh[y].Teleport = 0; - } - - for(int z = 0; z < PATHNODENEIGHBOURS; ++z) - { - if(PathNodes[x].Neighbours[z].id != -1) - { - Neigh[index].id = PathNodes[x].Neighbours[z].id; - Neigh[index].distance = PathNodes[x].Neighbours[z].distance; - Neigh[index].DoorID = PathNodes[x].Neighbours[z].DoorID; - Neigh[index].Teleport = PathNodes[x].Neighbours[z].Teleport; - index++; - } - } - - for(int i = 0; i < PATHNODENEIGHBOURS; ++i) - { - PathNodes[x].Neighbours[i].distance = 0; - PathNodes[x].Neighbours[i].DoorID = -1; - PathNodes[x].Neighbours[i].id = -1; - PathNodes[x].Neighbours[i].Teleport = 0; - } - - for(int z = 0; z < PATHNODENEIGHBOURS; ++z) - { - PathNodes[x].Neighbours[z].distance = Neigh[z].distance; - PathNodes[x].Neighbours[z].DoorID = Neigh[z].DoorID; - PathNodes[x].Neighbours[z].id = Neigh[z].id; - PathNodes[x].Neighbours[z].Teleport = Neigh[z].Teleport; - } - } -} - -void PathManager::QuickConnect(Client *c, bool set) -{ - if(!c) - { - return; - } - - if(!c->GetTarget()) - { - c->Message(0, "You must target a node."); - return; - } - - PathNode *Node = FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); - if(!Node) - { - return; - } - - if(set) - { - c->Message(0, "Setting %i to the quick connect target", Node->id); - QuickConnectTarget = Node->id; - } - else - { - if(QuickConnectTarget >= 0) - { - ConnectNodeToNode(QuickConnectTarget, Node->id); - } - } -} - -struct InternalPathSort -{ - int16 old_id; - int16 new_id; -}; - -void PathManager::SortNodes() -{ - std::vector sorted_vals; - for(uint32 x = 0; x < Head.PathNodeCount; ++x) - { - InternalPathSort tmp; - tmp.old_id = PathNodes[x].id; - sorted_vals.push_back(tmp); - } - - auto t_PathNodes = new PathNode[Head.PathNodeCount]; - memcpy(t_PathNodes, PathNodes, sizeof(PathNode)*Head.PathNodeCount); - for(uint32 i = 0; i < Head.PathNodeCount; ++i) - { - for(size_t j = 0; j < sorted_vals.size(); ++j) - { - if(sorted_vals[j].old_id == PathNodes[i].id) - { - if(i != PathNodes[i].id) - { - printf("Assigning new id of index %i differs from old id %i\n", i, PathNodes[i].id); - } - sorted_vals[j].new_id = i; - } - } - t_PathNodes[i].id = i; - } - - for(uint32 y = 0; y < Head.PathNodeCount; ++y) - { - for(int z = 0; z < PATHNODENEIGHBOURS; ++z) - { - if(PathNodes[y].Neighbours[z].id != -1) - { - int new_val = -1; - for(size_t c = 0; c < sorted_vals.size(); ++c) - { - if(PathNodes[y].Neighbours[z].id == sorted_vals[c].old_id) - { - new_val = sorted_vals[c].new_id; - break; - } - } - if(new_val != -1) - { - if(t_PathNodes[y].Neighbours[z].id != new_val) - { - printf("changing neighbor value to %i from %i\n", new_val, t_PathNodes[y].Neighbours[z].id); - } - t_PathNodes[y].Neighbours[z].id = new_val; - } - } - } - } - safe_delete_array(PathNodes); - PathNodes = t_PathNodes; -} - +} \ No newline at end of file diff --git a/zone/pathing.h b/zone/pathing.h deleted file mode 100644 index 9921a2ed3..000000000 --- a/zone/pathing.h +++ /dev/null @@ -1,112 +0,0 @@ -#ifndef PATHING_H -#define PATHING_H - -#include "map.h" -#include "zone_config.h" -#include - -extern const ZoneConfig *Config; - -class Client; -class Mob; - -#define PATHNODENEIGHBOURS 50 - -#pragma pack(1) - -struct AStarNode -{ - int PathNodeID; - int Parent; - float HCost; - float GCost; - bool Teleport; -}; - -struct NeighbourNode { - int16 id; - float distance; - uint8 Teleport; - int16 DoorID; -}; - -struct PathNode { - uint16 id; - glm::vec3 v; - float bestz; - NeighbourNode Neighbours[PATHNODENEIGHBOURS]; -}; - -struct PathFileHeader { - uint32 version; - uint32 PathNodeCount; -}; - -#pragma pack() - -struct PathNodeSortStruct -{ - int id; - float Distance; -}; - -enum LOSType{ UnknownLOS, HaveLOS, NoLOS }; - -class PathManager { - -public: - PathManager(); - ~PathManager(); - - - static PathManager *LoadPathFile(const char *ZoneName); - std::deque FindRoute(glm::vec3 Start, glm::vec3 End); -private: - bool loadPaths(FILE *fp); - std::deque FindRoute(int startID, int endID); - - void PrintPathing(); - bool CheckLosFN(glm::vec3 a, glm::vec3 b); - bool NoHazards(glm::vec3 From, glm::vec3 To); - bool NoHazardsAccurate(glm::vec3 From, glm::vec3 To); - void OpenDoors(int Node1, int Node2, Mob* ForWho); - - void NodeInfo(Client *c); - int32 AddNode(float x, float y, float z, float best_z, int32 requested_id = 0); //return -1 on failure, else returns the id of this node - bool DeleteNode(Client *c); - bool DeleteNode(int32 id); //returns true on success, false on failure, tries to delete a node from this map - void ConnectNodeToNode(Client *c, int32 Node2, int32 teleport = 0, int32 doorid = -1); //connects a node both ways - void ConnectNodeToNode(int32 Node1, int32 Node2, int32 teleport = 0, int32 doorid = -1); - void ConnectNode(Client *c, int32 Node2, int32 teleport = 0, int32 doorid = -1); //connects a node one way - void ConnectNode(int32 Node1, int32 Node2, int32 teleport = 0, int32 doorid = -1); - void DisconnectNodeToNode(Client *c, int32 Node2); - void DisconnectNodeToNode(int32 Node1, int32 Node2); - void MoveNode(Client *c); - void DisconnectAll(Client *c); - bool NodesConnected(PathNode *a, PathNode *b); - void DumpPath(std::string filename); - void ProcessNodesAndSave(std::string filename); - void ResortConnections(); - void QuickConnect(Client *c, bool set = false); - void SortNodes(); - - glm::vec3 GetPathNodeCoordinates(int NodeNumber, bool BestZ = true); - void SpawnPathNodes(); - void MeshTest(); - void SimpleMeshTest(); - int FindNearestPathNode(glm::vec3 Position); - - PathNode* FindPathNodeByCoordinates(float x, float y, float z); - void ShowPathNodeNeighbours(Client *c); - int GetRandomPathNode(); - - PathFileHeader Head; - PathNode *PathNodes; - int QuickConnectTarget; - - int *ClosedListFlag; -}; - - -#endif - From 7d3f35d48b497ca855b90d659d8bafe805ac860e Mon Sep 17 00:00:00 2001 From: KimLS Date: Thu, 27 Jul 2017 23:21:45 -0700 Subject: [PATCH 007/670] Support for v3 path files, removed the movement log stuff, fix for a crash or two --- zone/client_packet.cpp | 3 - zone/mob.cpp | 2 +- zone/pathfinder_waypoint.cpp | 429 ++++++++++++++++++++++++----------- zone/pathfinder_waypoint.h | 6 + zone/pathing.cpp | 7 +- 5 files changed, 311 insertions(+), 136 deletions(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index a2ca6f4b7..cf70bcbeb 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -4382,9 +4382,6 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) PlayerPositionUpdateClient_Struct* ppu = (PlayerPositionUpdateClient_Struct*)app->pBuffer; - Message(0, "Client Update Position (%.2f, %.2f, %.2f, %u) (%u)", ppu->x_pos, ppu->y_pos, ppu->z_pos, ppu->heading, ppu->animation); - Message(0, "Client Update Deltas (%.2f, %.2f, %.2f, %u)", ppu->delta_x, ppu->delta_y, ppu->delta_z, ppu->delta_heading); - /* Boat handling */ if (ppu->spawn_id != GetID()) { /* If player is controlling boat */ diff --git a/zone/mob.cpp b/zone/mob.cpp index 9bfc30d38..6b40615a3 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -445,7 +445,7 @@ Mob::Mob(const char* in_name, AssistAggro = false; npc_assist_cap = 0; - PathRecalcTimer.reset(new Timer(1000)); + PathRecalcTimer.reset(new Timer(2000)); } Mob::~Mob() diff --git a/zone/pathfinder_waypoint.cpp b/zone/pathfinder_waypoint.cpp index 10c8c97a8..c845a4d88 100644 --- a/zone/pathfinder_waypoint.cpp +++ b/zone/pathfinder_waypoint.cpp @@ -5,12 +5,14 @@ #include #include #include +#include #include #include "pathfinder_waypoint.h" #include "zone.h" #include "client.h" #include "../common/eqemu_logsys.h" +#include "../common/string_util.h" #include "../common/rulesys.h" extern Zone *zone; @@ -36,12 +38,6 @@ struct PathFileHeader { }; #pragma pack() -struct Node -{ - glm::vec3 v; - float bestz; -}; - struct Edge { float distance; @@ -49,6 +45,14 @@ struct Edge int door_id; }; +struct Node +{ + int id; + glm::vec3 v; + float bestz; + std::map edges; +}; + template class distance_heuristic : public boost::astar_heuristic { @@ -85,7 +89,6 @@ private: }; typedef boost::geometry::model::point Point; -typedef boost::geometry::model::box Box; typedef std::pair RTreeValue; typedef boost::adjacency_list> GraphType; @@ -96,50 +99,15 @@ struct PathfinderWaypoint::Implementation { boost::geometry::index::rtree> Tree; GraphType Graph; std::vector Nodes; - std::map, Edge> Edges; + std::string FileName; }; PathfinderWaypoint::PathfinderWaypoint(const std::string &path) { - PathFileHeader Head; m_impl.reset(new Implementation()); m_impl->PathFileValid = false; - Head.PathNodeCount = 0; - Head.version = 2; - - FILE *f = fopen(path.c_str(), "rb"); - if (f) { - char Magic[10]; - - fread(&Magic, 9, 1, f); - - if (strncmp(Magic, "EQEMUPATH", 9)) - { - Log(Logs::General, Logs::Error, "Bad Magic String in .path file."); - fclose(f); - return; - } - - fread(&Head, sizeof(Head), 1, f); - - Log(Logs::General, Logs::Status, "Path File Header: Version %ld, PathNodes %ld", - (long)Head.version, (long)Head.PathNodeCount); - - if (Head.version == 2) - { - LoadV2(f, Head); - return; - } - else if (Head.version == 3) { - LoadV3(f, Head); - return; - } - else { - Log(Logs::General, Logs::Error, "Unsupported path file version."); - fclose(f); - return; - } - } + m_impl->FileName = path; + Load(path); } PathfinderWaypoint::~PathfinderWaypoint() @@ -151,21 +119,15 @@ IPathfinder::IPath PathfinderWaypoint::FindRoute(const glm::vec3 &start, const g std::vector result_start_n; m_impl->Tree.query(boost::geometry::index::nearest(Point(start.x, start.y, start.z), 1), std::back_inserter(result_start_n)); if (result_start_n.size() == 0) { - IPath Route; - Route.push_back(start); - Route.push_back(end); - return Route; + return IPath(); } - + std::vector result_end_n; m_impl->Tree.query(boost::geometry::index::nearest(Point(end.x, end.y, end.z), 1), std::back_inserter(result_end_n)); if (result_end_n.size() == 0) { - IPath Route; - Route.push_back(start); - Route.push_back(end); - return Route; + return IPath(); } - + auto &nearest_start = *result_start_n.begin(); auto &nearest_end = *result_end_n.begin(); @@ -175,7 +137,7 @@ IPathfinder::IPath PathfinderWaypoint::FindRoute(const glm::vec3 &start, const g Route.push_back(end); return Route; } - + std::vector p(boost::num_vertices(m_impl->Graph)); try { boost::astar_search(m_impl->Graph, nearest_start.second, @@ -194,8 +156,10 @@ IPathfinder::IPath PathfinderWaypoint::FindRoute(const glm::vec3 &start, const g break; } else { - auto iter = m_impl->Edges.find(std::make_pair(p[v], p[v + 1])); - if (iter != m_impl->Edges.end()) { + auto &node = m_impl->Nodes[v]; + + auto iter = node.edges.find(p[v + 1]); + if (iter != node.edges.end()) { auto &edge = iter->second; if (edge.teleport) { Route.push_front(m_impl->Nodes[v].v); @@ -210,14 +174,14 @@ IPathfinder::IPath PathfinderWaypoint::FindRoute(const glm::vec3 &start, const g } } } + Route.push_front(start); - return Route; } - + IPath Route; - Route.push_back(start); - Route.push_back(end); + Route.push_front(start); + Route.push_back(glm::vec3(nearest_start.first.get<0>(), nearest_start.first.get<1>(), nearest_start.first.get<2>())); return Route; } @@ -231,95 +195,186 @@ void PathfinderWaypoint::DebugCommand(Client *c, const Seperator *sep) if(sep->arg[1][0] == '\0' || !strcasecmp(sep->arg[1], "help")) { c->Message(0, "Syntax: #path shownodes: Spawns a npc to represent every npc node."); + c->Message(0, "#path show: Plots a path from the user to their target."); c->Message(0, "#path info node_id: Gives information about node info (requires shownode target)."); - c->Message(0, "#path dump file_name: Dumps the current zone->pathing to a file of your naming."); - c->Message(0, "#path add [requested_id]: Adds a node at your current location will try to take the requested id if possible."); - c->Message(0, "#path connect connect_to_id [is_teleport] [door_id]: Connects the currently targeted node to connect_to_id's node and connects that node back (requires shownode target)."); - c->Message(0, "#path sconnect connect_to_id [is_teleport] [door_id]: Connects the currently targeted node to connect_to_id's node (requires shownode target)."); - c->Message(0, "#path qconnect [set]: short cut connect, connects the targeted node to the node you set with #path qconnect set (requires shownode target)."); - c->Message(0, "#path disconnect [all]/disconnect_from_id: Disconnects the currently targeted node to disconnect from disconnect from id's node (requires shownode target), if passed all as the second argument it will disconnect this node from every other node."); - c->Message(0, "#path move: Moves your targeted node to your current position"); - c->Message(0, "#path process file_name: processes the map file and tries to automatically generate a rudimentary path setup and then dumps the current zone->pathing to a file of your naming."); - c->Message(0, "#path resort [nodes]: resorts the connections/nodes after you've manually altered them so they'll work."); return; } - + if(!strcasecmp(sep->arg[1], "shownodes")) { ShowNodes(); return; } - + if (!strcasecmp(sep->arg[1], "show")) { if (c->GetTarget() != nullptr) { auto target = c->GetTarget(); - glm::vec3 end(target->GetX(), target->GetY(), target->GetZ()); glm::vec3 start(c->GetX(), c->GetY(), c->GetZ()); - + glm::vec3 end(target->GetX(), target->GetY(), target->GetZ()); + ShowPath(c, start, end); } - + return; } + + if (!strcasecmp(sep->arg[1], "reload")) + { + Load(m_impl->FileName); + return; + } + + if (!strcasecmp(sep->arg[1], "info")) + { + NodeInfo(c); + return; + } +} + +void PathfinderWaypoint::Load(const std::string &filename) { + PathFileHeader Head; + Head.PathNodeCount = 0; + Head.version = 2; + + FILE *f = fopen(filename.c_str(), "rb"); + if (f) { + char Magic[10]; + + fread(&Magic, 9, 1, f); + + if (strncmp(Magic, "EQEMUPATH", 9)) + { + Log(Logs::General, Logs::Error, "Bad Magic String in .path file."); + fclose(f); + return; + } + + fread(&Head, sizeof(Head), 1, f); + + Log(Logs::General, Logs::Status, "Path File Header: Version %ld, PathNodes %ld", + (long)Head.version, (long)Head.PathNodeCount); + + if (Head.version == 2) + { + LoadV2(f, Head); + return; + } + else if (Head.version == 3) { + LoadV3(f, Head); + return; + } + else { + Log(Logs::General, Logs::Error, "Unsupported path file version."); + fclose(f); + return; + } + } } void PathfinderWaypoint::LoadV2(FILE *f, const PathFileHeader &header) { std::unique_ptr PathNodes(new PathNode[header.PathNodeCount]); - + fread(PathNodes.get(), sizeof(PathNode), header.PathNodeCount, f); - + int MaxNodeID = header.PathNodeCount - 1; - + m_impl->PathFileValid = true; - + m_impl->Nodes.reserve(header.PathNodeCount); for (uint32 i = 0; i < header.PathNodeCount; ++i) { auto &n = PathNodes[i]; - - Point p = Point(n.v.x, n.v.y, n.v.z); - m_impl->Tree.insert(std::make_pair(p, i)); - - boost::add_vertex(m_impl->Graph); Node node; + node.id = i; node.v = n.v; node.bestz = n.bestz; m_impl->Nodes.push_back(node); } - + auto weightmap = boost::get(boost::edge_weight, m_impl->Graph); for (uint32 i = 0; i < header.PathNodeCount; ++i) { for (uint32 j = 0; j < 50; ++j) { + auto &node = m_impl->Nodes[i]; if (PathNodes[i].Neighbours[j].id > MaxNodeID) { Log(Logs::General, Logs::Error, "Path Node %i, Neighbour %i (%i) out of range.", i, j, PathNodes[i].Neighbours[j].id); m_impl->PathFileValid = false; } - + if (PathNodes[i].Neighbours[j].id > 0) { - GraphType::edge_descriptor e; - bool inserted; - boost::tie(e, inserted) = boost::add_edge(PathNodes[i].id, PathNodes[i].Neighbours[j].id, m_impl->Graph); - weightmap[e] = PathNodes[i].Neighbours[j].distance; - Edge edge; edge.distance = PathNodes[i].Neighbours[j].distance; edge.door_id = PathNodes[i].Neighbours[j].DoorID; edge.teleport = PathNodes[i].Neighbours[j].Teleport; - - m_impl->Edges[std::make_pair(PathNodes[i].id, PathNodes[i].Neighbours[j].id)] = edge; + + node.edges[PathNodes[i].Neighbours[j].id] = edge; } } } - + + BuildGraph(); fclose(f); } void PathfinderWaypoint::LoadV3(FILE *f, const PathFileHeader &header) { + m_impl->Nodes.reserve(header.PathNodeCount); + + uint32 edge_count = 0; + fread(&edge_count, sizeof(uint32), 1, f); + + for (int i = 0; i < header.PathNodeCount; ++i) + { + uint32 id = 0; + float x = 0.0f; + float y = 0.0f; + float z = 0.0f; + float best_z = 0.0f; + + fread(&id, sizeof(uint32), 1, f); + fread(&x, sizeof(float), 1, f); + fread(&y, sizeof(float), 1, f); + fread(&z, sizeof(float), 1, f); + fread(&best_z, sizeof(float), 1, f); + + Node n; + n.id = id; + n.bestz = best_z; + n.v.x = x; + n.v.y = y; + n.v.z = z; + + m_impl->Nodes.push_back(n); + } + + for (uint32 j = 0; j < edge_count; ++j) { + uint32 from = 0; + uint32 to = 0; + int8 teleport = 0; + float distance = 0.0f; + int32 door_id = 0; + + fread(&from, sizeof(uint32), 1, f); + fread(&to, sizeof(uint32), 1, f); + fread(&teleport, sizeof(int8), 1, f); + fread(&distance, sizeof(float), 1, f); + fread(&door_id, sizeof(int32), 1, f); + + Edge e; + e.teleport = teleport > 0 ? true : false; + e.distance = distance; + e.door_id = door_id; + + auto &n = m_impl->Nodes[from]; + n.edges[to] = e; + } + + m_impl->PathFileValid = true; + + BuildGraph(); fclose(f); } @@ -327,42 +382,7 @@ void PathfinderWaypoint::ShowNodes() { for (size_t i = 0; i < m_impl->Nodes.size(); ++i) { - auto npc_type = new NPCType; - memset(npc_type, 0, sizeof(NPCType)); - - auto c = i / 1000u; - sprintf(npc_type->name, "Node%u", c); - npc_type->cur_hp = 4000000; - npc_type->max_hp = 4000000; - npc_type->race = 2254; - npc_type->gender = 2; - npc_type->class_ = 9; - npc_type->deity = 1; - npc_type->level = 75; - npc_type->npc_id = 0; - npc_type->loottable_id = 0; - npc_type->texture = 1; - npc_type->light = 0; - npc_type->runspeed = 0; - npc_type->d_melee_texture1 = 1; - npc_type->d_melee_texture2 = 1; - npc_type->merchanttype = 1; - npc_type->bodytype = 1; - - npc_type->STR = 150; - npc_type->STA = 150; - npc_type->DEX = 150; - npc_type->AGI = 150; - npc_type->INT = 150; - npc_type->WIS = 150; - npc_type->CHA = 150; - - npc_type->findable = 1; - auto position = glm::vec4(m_impl->Nodes[i].v.x, m_impl->Nodes[i].v.y, m_impl->Nodes[i].v.z, 0.0f); - auto npc = new NPC(npc_type, nullptr, position, FlyMode1); - npc->GiveNPCTypeData(npc_type); - - entity_list.AddNPC(npc, true, true); + ShowNode(m_impl->Nodes[i]); } } @@ -385,3 +405,150 @@ void PathfinderWaypoint::ShowPath(Client *c, const glm::vec3 &start, const glm:: c->SendPathPacket(points); } + +void PathfinderWaypoint::NodeInfo(Client *c) +{ + if (!c->GetTarget()) { + return; + } + + auto node = FindPathNodeByCoordinates(c->GetTarget()->GetX(), c->GetTarget()->GetY(), c->GetTarget()->GetZ()); + if (node == nullptr) { + return; + } + + c->Message(0, "Pathing node: %i at (%.2f, %.2f, %.2f) with bestz %.2f", + node->id, node->v.x, node->v.y, node->v.z, node->bestz); + + for (auto &edge : node->edges) { + c->Message(0, "id: %i, distance: %.2f, door id: %i, is teleport: %i", + edge.first, + edge.second.distance, + edge.second.door_id, + edge.second.teleport); + } +} + +Node *PathfinderWaypoint::FindPathNodeByCoordinates(float x, float y, float z) +{ + for (auto &node : m_impl->Nodes) { + auto dist = Distance(glm::vec3(x, y, z), node.v); + + if (dist < 0.1) { + return &node; + } + } + + return nullptr; +} + +void PathfinderWaypoint::BuildGraph() +{ + m_impl->Graph = GraphType(); + m_impl->Tree = boost::geometry::index::rtree>(); + + for (auto &node : m_impl->Nodes) { + Point p = Point(node.v.x, node.v.y, node.v.z); + m_impl->Tree.insert(std::make_pair(p, node.id)); + boost::add_vertex(m_impl->Graph); + } + + //Populate edges now that we've created all the nodes + auto weightmap = boost::get(boost::edge_weight, m_impl->Graph); + for (auto &node : m_impl->Nodes) { + for (auto &edge : node.edges) { + GraphType::edge_descriptor e; + bool inserted; + boost::tie(e, inserted) = boost::add_edge(node.id, edge.first, m_impl->Graph); + weightmap[e] = edge.second.distance; + } + } +} + +std::string DigitToWord(int i) +{ + std::string digit = std::to_string(i); + std::string ret; + for (size_t idx = 0; idx < digit.length(); ++idx) { + if (!ret.empty()) { + ret += "_"; + } + + switch (digit[idx]) { + case '0': + ret += "Zero"; + break; + case '1': + ret += "One"; + break; + case '2': + ret += "Two"; + break; + case '3': + ret += "Three"; + break; + case '4': + ret += "Four"; + break; + case '5': + ret += "Five"; + break; + case '6': + ret += "Six"; + break; + case '7': + ret += "Seven"; + break; + case '8': + ret += "Eight"; + break; + case '9': + ret += "Nine"; + break; + default: + break; + } + } + + return ret; +} + +void PathfinderWaypoint::ShowNode(const Node &n) { + auto npc_type = new NPCType; + memset(npc_type, 0, sizeof(NPCType)); + + sprintf(npc_type->name, "%s", DigitToWord(n.id).c_str()); + sprintf(npc_type->lastname, "%i", n.id); + npc_type->cur_hp = 4000000; + npc_type->max_hp = 4000000; + npc_type->race = 2254; + npc_type->gender = 2; + npc_type->class_ = 9; + npc_type->deity = 1; + npc_type->level = 75; + npc_type->npc_id = 0; + npc_type->loottable_id = 0; + npc_type->texture = 1; + npc_type->light = 0; + npc_type->runspeed = 0; + npc_type->d_melee_texture1 = 1; + npc_type->d_melee_texture2 = 1; + npc_type->merchanttype = 1; + npc_type->bodytype = 1; + npc_type->show_name = true; + + npc_type->STR = 150; + npc_type->STA = 150; + npc_type->DEX = 150; + npc_type->AGI = 150; + npc_type->INT = 150; + npc_type->WIS = 150; + npc_type->CHA = 150; + + npc_type->findable = 1; + auto position = glm::vec4(n.v.x, n.v.y, n.v.z, 0.0f); + auto npc = new NPC(npc_type, nullptr, position, FlyMode1); + npc->GiveNPCTypeData(npc_type); + + entity_list.AddNPC(npc, true, true); +} diff --git a/zone/pathfinder_waypoint.h b/zone/pathfinder_waypoint.h index 5d10ea25a..f4132e44c 100644 --- a/zone/pathfinder_waypoint.h +++ b/zone/pathfinder_waypoint.h @@ -3,6 +3,7 @@ #include "pathfinder_interface.h" struct PathFileHeader; +struct Node; class PathfinderWaypoint : public IPathfinder { @@ -15,10 +16,15 @@ public: virtual void DebugCommand(Client *c, const Seperator *sep); private: + void Load(const std::string &filename); void LoadV2(FILE *f, const PathFileHeader &header); void LoadV3(FILE *f, const PathFileHeader &header); void ShowNodes(); void ShowPath(Client *c, const glm::vec3 &start, const glm::vec3 &end); + void NodeInfo(Client *c); + Node *FindPathNodeByCoordinates(float x, float y, float z); + void BuildGraph(); + void ShowNode(const Node &n); struct Implementation; std::unique_ptr m_impl; diff --git a/zone/pathing.cpp b/zone/pathing.cpp index a915a73a0..a5d439d94 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -26,7 +26,12 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa PathingDestination = To; WaypointChanged = true; NodeReached = false; - return (*Route.begin()).pos; + if (Route.empty()) { + return From; + } + else { + return (*Route.begin()).pos; + } } else { if (PathRecalcTimer->Check()) { From 80f1c65e1c4e7a0ed6a5192deae8bb3547477f28 Mon Sep 17 00:00:00 2001 From: KimLS Date: Sat, 29 Jul 2017 00:11:57 -0700 Subject: [PATCH 008/670] Update fmt lib, add recast, wip on recast pathfinder interface (broken atm) --- CMakeLists.txt | 4 +- common/CMakeLists.txt | 2 + common/perl_eqdb.cpp | 4 +- common/perl_eqdb_res.cpp | 4 +- libs/CMakeLists.txt | 3 +- libs/format/.travis.yml | 8 +- libs/format/CMakeLists.txt | 32 +- libs/format/ChangeLog.rst | 110 +++ libs/format/README.rst | 33 +- libs/format/cppformat/format.h | 2 - libs/format/cppformat/posix.h | 2 - libs/format/doc/CMakeLists.txt | 6 +- libs/format/doc/_templates/layout.html | 51 +- libs/format/doc/api.rst | 90 ++- libs/format/doc/basic-bootstrap/layout.html | 3 +- libs/format/doc/build.py | 74 +- libs/format/doc/conf.py | 7 +- libs/format/doc/html/_sources/api.txt | 90 ++- libs/format/doc/html/_sources/index.txt | 61 +- libs/format/doc/html/_sources/syntax.txt | 16 +- libs/format/doc/html/_sources/usage.txt | 25 +- libs/format/doc/html/_static/pygments.css | 4 + libs/format/doc/html/api.html | 537 +++++++++++---- libs/format/doc/html/contents.html | 43 +- libs/format/doc/html/genindex.html | 151 ++++- libs/format/doc/html/index.html | 119 ++-- libs/format/doc/html/objects.inv | Bin 3626 -> 4204 bytes libs/format/doc/html/search.html | 39 +- libs/format/doc/html/searchindex.js | 2 +- libs/format/doc/html/syntax.html | 58 +- libs/format/doc/html/usage.html | 76 ++- libs/format/doc/index.rst | 61 +- libs/format/doc/syntax.rst | 16 +- libs/format/doc/usage.rst | 25 +- libs/format/fmt/CMakeLists.txt | 54 +- libs/format/fmt/format.cc | 534 ++------------- libs/format/fmt/format.h | 638 +++++++++++------- libs/format/fmt/ostream.cc | 34 +- libs/format/fmt/ostream.h | 72 +- libs/format/fmt/posix.cc | 57 +- libs/format/fmt/posix.h | 96 +-- libs/format/fmt/time.h | 125 +++- libs/format/support/appveyor-build.py | 31 +- libs/format/support/appveyor.yml | 4 + libs/format/support/cmake/cxx11.cmake | 14 +- libs/format/support/travis-build.py | 125 ++-- .../format/support/update-converity-branch.py | 30 +- libs/format/test/CMakeLists.txt | 23 +- .../test/add-subdirectory-test/CMakeLists.txt | 6 +- .../test/find-package-test/CMakeLists.txt | 6 +- libs/format/test/format-impl-test.cc | 6 +- libs/format/test/format-test.cc | 87 ++- libs/format/test/gmock/gmock.h | 5 +- libs/format/test/gtest-extra-test.cc | 2 +- libs/format/test/gtest-extra.cc | 2 +- libs/format/test/gtest-extra.h | 8 +- libs/format/test/gtest/gtest.h | 6 +- libs/format/test/mock-allocator.h | 10 +- libs/format/test/ostream-test.cc | 24 +- libs/format/test/posix-mock-test.cc | 8 +- libs/format/test/posix-test.cc | 2 +- libs/format/test/printf-test.cc | 40 +- libs/format/test/util-test.cc | 40 +- libs/format/test/util.h | 7 + zone/map.cpp | 80 +-- zone/pathfinder_interface.cpp | 8 +- zone/pathfinder_nav_mesh.cpp | 268 ++++++++ zone/pathfinder_nav_mesh.h | 12 +- 68 files changed, 2560 insertions(+), 1662 deletions(-) delete mode 100644 libs/format/cppformat/format.h delete mode 100644 libs/format/cppformat/posix.h diff --git a/CMakeLists.txt b/CMakeLists.txt index ce1a3bc9b..a3d38e1bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -309,7 +309,7 @@ IF(EQEMU_BUILD_PERL) INCLUDE_DIRECTORIES(SYSTEM "${PERL_INCLUDE_PATH}") ENDIF(EQEMU_BUILD_PERL) -SET(SERVER_LIBS common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY} libuv fmt) +SET(SERVER_LIBS common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY} libuv fmt recast_navigation) FIND_PACKAGE(Sodium REQUIRED) IF(SODIUM_FOUND) @@ -357,6 +357,8 @@ INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/libs/cereal") INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/libs/libuv/include" ) INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/libs/libuv/src") INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/libs/format") +INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/libs/recast/detour/include") +INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/libs/recast/recast/include") IF(EQEMU_BUILD_SERVER OR EQEMU_BUILD_LOGIN OR EQEMU_BUILD_TESTS OR EQEMU_BUILD_HC) ADD_SUBDIRECTORY(common) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index d65efd183..8a9d2c673 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -3,6 +3,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) SET(common_sources base_packet.cpp classes.cpp + compression.cpp condition.cpp crash.cpp crc16.cpp @@ -113,6 +114,7 @@ SET(common_headers base_data.h bodytypes.h classes.h + compression.h condition.h crash.h crc16.h diff --git a/common/perl_eqdb.cpp b/common/perl_eqdb.cpp index 2cd9fa38d..06fb7f958 100644 --- a/common/perl_eqdb.cpp +++ b/common/perl_eqdb.cpp @@ -28,9 +28,9 @@ typedef const char Const_char; #ifdef EMBPERL -#include "../common/global_define.h" -#include "../common/useperl.h" +#include "global_define.h" #include "eqdb.h" +#include "useperl.h" #ifdef THIS /* this macro seems to leak out on some systems */ #undef THIS diff --git a/common/perl_eqdb_res.cpp b/common/perl_eqdb_res.cpp index 2782a6f05..61b2f4043 100644 --- a/common/perl_eqdb_res.cpp +++ b/common/perl_eqdb_res.cpp @@ -28,9 +28,9 @@ typedef const char Const_char; #ifdef EMBPERL -#include "../common/global_define.h" -#include "../common/useperl.h" +#include "global_define.h" #include "eqdb_res.h" +#include "useperl.h" XS(XS_EQDBRes_num_rows); /* prototype to pass -Wmissing-prototypes */ diff --git a/libs/CMakeLists.txt b/libs/CMakeLists.txt index cb5a25998..801f5fdd9 100644 --- a/libs/CMakeLists.txt +++ b/libs/CMakeLists.txt @@ -3,4 +3,5 @@ IF(EQEMU_BUILD_LUA) ENDIF(EQEMU_BUILD_LUA) ADD_SUBDIRECTORY(libuv) -ADD_SUBDIRECTORY(format) \ No newline at end of file +ADD_SUBDIRECTORY(format) +ADD_SUBDIRECTORY(recast) \ No newline at end of file diff --git a/libs/format/.travis.yml b/libs/format/.travis.yml index d6b81a2a6..c359852e4 100644 --- a/libs/format/.travis.yml +++ b/libs/format/.travis.yml @@ -1,4 +1,5 @@ language: cpp +dist: trusty sudo: required # the doc target uses sudo to install dependencies os: @@ -22,12 +23,5 @@ matrix: - os: osx env: BUILD=Doc -addons: - apt: - sources: - - kubuntu-backports # cmake 2.8.12 - packages: - - cmake - script: - support/travis-build.py diff --git a/libs/format/CMakeLists.txt b/libs/format/CMakeLists.txt index 789b7e122..b08f9cbe9 100644 --- a/libs/format/CMakeLists.txt +++ b/libs/format/CMakeLists.txt @@ -1,6 +1,6 @@ message(STATUS "CMake version: ${CMAKE_VERSION}") -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 2.8.12) # Determine if fmt is built as a subproject (using add_subdirectory) # or if it is the master project. @@ -9,12 +9,22 @@ if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) set(MASTER_PROJECT ON) endif () +# Joins arguments and places the results in ${result_var}. +function(join result_var) + set(result ) + foreach (arg ${ARGN}) + set(result "${result}${arg}") + endforeach () + set(${result_var} "${result}" PARENT_SCOPE) +endfunction() + # Set the default CMAKE_BUILD_TYPE to Release. # This should be done before the project command since the latter can set # CMAKE_BUILD_TYPE itself (it does so for nmake). if (NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE Release CACHE STRING - "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.") + join(doc "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or " + "CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.") + set(CMAKE_BUILD_TYPE Release CACHE STRING ${doc}) endif () option(FMT_PEDANTIC "Enable extra warnings and expensive tests." OFF) @@ -28,13 +38,17 @@ option(FMT_USE_CPP11 "Enable the addition of C++11 compiler flags." ON) project(FMT) # Starting with cmake 3.0 VERSION is part of the project command. -set(FMT_VERSION 3.0.0) -if (NOT FMT_VERSION MATCHES "^([0-9]+).([0-9]+).([0-9]+)$") - message(FATAL_ERROR "Invalid version format ${FMT_VERSION}.") +file(READ fmt/format.h format_h) +if (NOT format_h MATCHES "FMT_VERSION ([0-9]+)([0-9][0-9])([0-9][0-9])") + message(FATAL_ERROR "Cannot get FMT_VERSION from format.h.") endif () -set(CPACK_PACKAGE_VERSION_MAJOR ${CMAKE_MATCH_1}) -set(CPACK_PACKAGE_VERSION_MINOR ${CMAKE_MATCH_2}) -set(CPACK_PACKAGE_VERSION_PATCH ${CMAKE_MATCH_3}) +# Use math to skip leading zeros if any. +math(EXPR CPACK_PACKAGE_VERSION_MAJOR ${CMAKE_MATCH_1}) +math(EXPR CPACK_PACKAGE_VERSION_MINOR ${CMAKE_MATCH_2}) +math(EXPR CPACK_PACKAGE_VERSION_PATCH ${CMAKE_MATCH_3}) +join(FMT_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}. + ${CPACK_PACKAGE_VERSION_PATCH}) +message(STATUS "Version: ${FMT_VERSION}") message(STATUS "Build type: ${CMAKE_BUILD_TYPE}") diff --git a/libs/format/ChangeLog.rst b/libs/format/ChangeLog.rst index 0e065451d..4a16be951 100644 --- a/libs/format/ChangeLog.rst +++ b/libs/format/ChangeLog.rst @@ -1,3 +1,113 @@ +4.0.0 - 2017-06-27 +------------------ + +* Removed old compatibility headers ``cppformat/*.h`` and CMake options (`#527 `_). Thanks `@maddinat0r (Alex Martin) `_. + +* Added ``string.h`` containing ``fmt::to_string()`` as alternative to ``std::to_string()`` as well as other string writer functionality (`#326 `_ and `#441 `_): + + .. code:: c++ + + #include "fmt/string.h" + + std::string answer = fmt::to_string(42); + + Thanks to `@glebov-andrey (Andrey Glebov) `_. + +* Moved ``fmt::printf()`` to new ``printf.h`` header and allowed ``%s`` as generic specifier (`#453 `_), made ``%.f`` more conformant to regular ``printf()`` (`#490 `_), added custom writer support (`#476 `_) and implemented missing custom argument formatting (`#339 `_ and `#340 `_): + + .. code:: c++ + + #include "fmt/printf.h" + + // %s format specifier can be used with any argument type. + fmt::printf("%s", 42); + + Thanks `@mojoBrendan `_, `@manylegged (Arthur Danskin) `_ and `@spacemoose (Glen Stark) `_. See also `#360 `_, `#335 `_ and `#331 `_. + +* Added ``container.h`` containing a ``BasicContainerWriter`` to write to containers like ``std::vector`` (`#450 `_). Thanks `@polyvertex (Jean-Charles Lefebvre) `_. + +* Added ``fmt::join()`` function that takes a range and formats its elements separated by a given string (`#466 `_): + + .. code:: c++ + + #include "fmt/format.h" + + std::vector v = {1.2, 3.4, 5.6}; + // Prints "(+01.20, +03.40, +05.60)". + fmt::print("({:+06.2f})", fmt::join(v.begin(), v.end(), ", ")); + + Thanks `@olivier80 `_. + +* Added support for custom formatting specifications to simplify customization of built-in formatting (`#444 `_). Thanks `@polyvertex (Jean-Charles Lefebvre) `_. See also `#439 `_. + +* Added ``fmt::format_system_error()`` for error code formatting (`#323 `_ and `#526 `_). Thanks `@maddinat0r (Alex Martin) `_. + +* Added thread-safe ``fmt::localtime()`` and ``fmt::gmtime()`` as replacement for the standard version to ``time.h`` (`#396 `_). Thanks `@codicodi `_. + +* Internal improvements to ``NamedArg`` and ``ArgLists`` (`#389 `_ and `#390 `_). Thanks `@chronoxor `_. + +* Fixed crash due to bug in ``FormatBuf`` (`#493 `_). Thanks `@effzeh `_. See also `#480 `_ and `#491 `_. + +* Fixed handling of wide strings in ``fmt::StringWriter``. + +* Improved compiler error messages (`#357 `_). + +* Fixed various warnings and issues with various compilers (`#494 `_, `#499 `_, `#483 `_, `#519 `_, `#485 `_, `#482 `_, `#475 `_, `#473 `_ and `#414 `_). Thanks `@chronoxor `_, `@zhaohuaxishi `_, `@pkestene (Pierre Kestener) `_, `@dschmidt (Dominik Schmidt) `_ and `@0x414c (Alexey Gorishny) `_ . + +* Improved CMake: targets are now namespaced (`#511 `_ and `#513 `_), supported header-only ``printf.h`` (`#354 `_), fixed issue with minimal supported library subset (`#418 `_, `#419 `_ and `#420 `_). Thanks `@bjoernthiel (Bjoern Thiel) `_, + `@niosHD (Mario Werner) `_, `@LogicalKnight (Sean LK) `_ and `@alabuzhev (Alex Alabuzhev) `_. + +* Improved documentation. Thanks to `@pwm1234 (Phil) `_ for `#393 `_. + +3.0.2 - 2017-06-14 +------------------ + +* Added ``FMT_VERSION`` macro (`#411 `_). + +* Used ``FMT_NULL`` instead of literal ``0`` (`#409 `_). Thanks `@alabuzhev (Alex Alabuzhev) `_. + +* Added extern templates for ``format_float`` (`#413 `_). + +* Fixed implicit conversion issue (`#507 `_). + +* Fixed signbit detection (`#423 `_). + +* Fixed naming collision (`#425 `_). + +* Fixed missing intrinsic for C++/CLI (`#457 `_). Thanks `@calumr (Calum Robinson) `_ + +* Fixed Android detection (`#458 `_). Thanks `@Gachapen (Magnus Bjerke Vik) `_. + +* Use lean ``windows.h`` if not in header-only mode (`#503 `_). Thanks `@Quentin01 (Quentin Buathier) `_. + +* Fixed issue with CMake exporting C++11 flag (`#445 `_). Thanks `@EricWF (Eric) `_. + +* Fixed issue with nvcc and MSVC compiler bug and MinGW (`#505 `_). + +* Fixed DLL issues (`#469 `_ and `#502 `_). Thanks `@richardeakin (Richard Eakin) `_ and `@AndreasSchoenle (Andreas Schönle) `_. + +* Fixed test compilation under FreeBSD (`#433 `_). + +* Fixed various warnings (`#403 `_, `#410 `_ and `#510 `_). Thanks `@Lecetem `_, `@chenhayat (Chen Hayat) `_ and `@trozen `_. + +* Removed redundant include (`#479 `_). + +* Fixed documentation issues. + +3.0.1 - 2016-11-01 +------------------ +* Fixed handling of thousands seperator (`#353 `_) + +* Fixed handling of ``unsigned char`` strings (`#373 `_) + +* Corrected buffer growth when formatting time (`#367 `_) + +* Removed warnings under MSVC and clang (`#318 `_, `#250 `_, also merged `#385 `_ and `#361 `_). Thanks `@jcelerier (Jean-Michaël Celerier) `_ and `@nmoehrle (Nils Moehrle) `_. + +* Fixed compilation issues under Android (`#327 `_, `#345 `_ and `#381 `_), FreeBSD (`#358 `_), Cygwin (`#388 `_), MinGW (`#355 `_) as well as other issues (`#350 `_, `#366 `_, `#348 `_, `#402 `_, `#405 `_). Thanks to `@dpantele (Dmitry) `_, `@hghwng (Hugh Wang) `_, `@arvedarved (Tilman Keskinöz) `_, `@LogicalKnight (Sean) `_ and `@JanHellwig (Jan Hellwig) `_. + +* Fixed some documentation issues and extended specification (`#320 `_, `#333 `_, `#347 `_, `#362 `_). Thanks to `@smellman (Taro Matsuzawa aka. btm) `_. + 3.0.0 - 2016-05-07 ------------------ diff --git a/libs/format/README.rst b/libs/format/README.rst index f9707ff53..ea2a6da41 100644 --- a/libs/format/README.rst +++ b/libs/format/README.rst @@ -20,9 +20,11 @@ alternative to IOStreams. Features -------- -* Two APIs: faster concatenation-based write API and slower (but still - very fast) replacement-based format API with positional arguments for - localization. +* Two APIs: faster concatenation-based `write API + `_ and slower, + but still very fast, replacement-based `format API + `_ with positional arguments + for localization. * Write API similar to the one used by IOStreams but stateless allowing faster implementation. * Format API with `format string syntax @@ -35,10 +37,10 @@ Features * Support for user-defined types. * High speed: performance of the format API is close to that of glibc's `printf `_ - and better than performance of IOStreams. See `Speed tests`_ and + and better than the performance of IOStreams. See `Speed tests`_ and `Fast integer to string conversion in C++ `_. -* Small code size both in terms of source code (format consists of a single +* Small code size both in terms of source code (the core library consists of a single header file and a single source file) and compiled code. See `Compile time and code bloat`_. * Reliability: the library has an extensive set of `unit tests @@ -89,6 +91,8 @@ An object of any user-defined type for which there is an overloaded .. code:: c++ + #include "fmt/ostream.h" + class Date { int year_, month_, day_; public: @@ -132,6 +136,12 @@ Projects using this library * `AMPL/MP `_: An open-source library for mathematical programming +* `CUAUV `_: Cornell University's autonomous underwater vehicle + +* `Drake `_: A planning, control, and analysis toolbox for nonlinear dynamical systems (MIT) + +* `Envoy `_: C++ L7 proxy and communication bus (Lyft) + * `HarpyWar/pvpgn `_: Player vs Player Gaming Network with tweaks @@ -139,6 +149,8 @@ Projects using this library * `Keypirinha `_: A semantic launcher for Windows +* `Kodi `_ (formerly xbmc): Home theater software + * `Lifeline `_: A 2D game * `MongoDB Smasher `_: A small tool to generate randomized datasets @@ -158,6 +170,12 @@ Projects using this library * `Salesforce Analytics Cloud `_: Business intelligence software +* `Scylla `_: A Cassandra-compatible NoSQL data store that can handle + 1 million transactions per second on a single server + +* `Seastar `_: An advanced, open-source C++ framework for + high-performance server applications on modern hardware + * `spdlog `_: Super fast C++ logging library * `Stellar `_: Financial platform @@ -390,6 +408,11 @@ It only applies if you distribute the documentation of fmt. Acknowledgments --------------- +The fmt library is maintained by Victor Zverovich (`vitaut `_) +and Jonathan Müller (`foonathan `_) with contributions from many +other people. See `Contributors `_ and `Releases `_ for some of the names. Let us know if your contribution +is not listed or mentioned incorrectly and we'll make it right. + The benchmark section of this readme file and the performance tests are taken from the excellent `tinyformat `_ library written by Chris Foster. Boost Format library is acknowledged transitively diff --git a/libs/format/cppformat/format.h b/libs/format/cppformat/format.h deleted file mode 100644 index 3fbf86b89..000000000 --- a/libs/format/cppformat/format.h +++ /dev/null @@ -1,2 +0,0 @@ -#include "../fmt/format.h" -#warning Including cppformat/format.h is deprecated. Include fmt/format.h instead. diff --git a/libs/format/cppformat/posix.h b/libs/format/cppformat/posix.h deleted file mode 100644 index 97b6fadcd..000000000 --- a/libs/format/cppformat/posix.h +++ /dev/null @@ -1,2 +0,0 @@ -#include "../fmt/posix.h" -#warning Including cppformat/posix.h is deprecated. Include fmt/posix.h instead. diff --git a/libs/format/doc/CMakeLists.txt b/libs/format/doc/CMakeLists.txt index fc5a0a244..df3e9b1e9 100644 --- a/libs/format/doc/CMakeLists.txt +++ b/libs/format/doc/CMakeLists.txt @@ -5,6 +5,8 @@ if (NOT DOXYGEN) endif () add_custom_target(doc - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build.py ${FMT_VERSION}) + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build.py ${FMT_VERSION} + SOURCES build.py conf.py _templates/layout.html) -install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ DESTINATION share/doc/fmt) +install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ + DESTINATION share/doc/fmt OPTIONAL) diff --git a/libs/format/doc/_templates/layout.html b/libs/format/doc/_templates/layout.html index 261e2eb4f..0ac2dec78 100644 --- a/libs/format/doc/_templates/layout.html +++ b/libs/format/doc/_templates/layout.html @@ -8,8 +8,9 @@ {# Google Analytics #} {%- for scriptfile in script_files %} diff --git a/libs/format/doc/build.py b/libs/format/doc/build.py index 9721e2986..55992b9ff 100644 --- a/libs/format/doc/build.py +++ b/libs/format/doc/build.py @@ -8,30 +8,35 @@ from distutils.version import LooseVersion def pip_install(package, commit=None, **kwargs): "Install package using pip." + min_version = kwargs.get('min_version') + if min_version: + from pkg_resources import get_distribution, DistributionNotFound + try: + installed_version = get_distribution(os.path.basename(package)).version + if LooseVersion(installed_version) >= min_version: + print('{} {} already installed'.format(package, min_version)) + return + except DistributionNotFound: + pass if commit: - check_version = kwargs.get('check_version', '') - #output = check_output(['pip', 'show', package.split('/')[1]]) - #if check_version in output: - # print('{} already installed'.format(package)) - # return - package = 'git+git://github.com/{0}.git@{1}'.format(package, commit) - print('Installing {}'.format(package)) - check_call(['pip', 'install', '--upgrade', package]) + package = 'git+https://github.com/{0}.git@{1}'.format(package, commit) + print('Installing {0}'.format(package)) + check_call(['pip', 'install', package]) -def build_docs(version='dev'): +def create_build_env(dirname='virtualenv'): # Create virtualenv. - doc_dir = os.path.dirname(os.path.realpath(__file__)) - virtualenv_dir = 'virtualenv' - check_call(['virtualenv', virtualenv_dir]) + if not os.path.exists(dirname): + check_call(['virtualenv', dirname]) import sysconfig scripts_dir = os.path.basename(sysconfig.get_path('scripts')) - activate_this_file = os.path.join(virtualenv_dir, scripts_dir, - 'activate_this.py') + activate_this_file = os.path.join(dirname, scripts_dir, 'activate_this.py') with open(activate_this_file) as f: exec(f.read(), dict(__file__=activate_this_file)) + # Import get_distribution after activating virtualenv to get info about + # the correct packages. + from pkg_resources import get_distribution, DistributionNotFound # Upgrade pip because installation of sphinx with pip 1.1 available on Travis # is broken (see #207) and it doesn't support the show command. - from pkg_resources import get_distribution, DistributionNotFound pip_version = get_distribution('pip').version if LooseVersion(pip_version) < LooseVersion('1.5.4'): print("Updating pip") @@ -46,27 +51,35 @@ def build_docs(version='dev'): except DistributionNotFound: pass # Install Sphinx and Breathe. - pip_install('fmtlib/sphinx', - '12dde8afdb0a7bb5576e2656692c3478c69d8cc3', - check_version='1.4a0.dev-20151013') + pip_install('sphinx-doc/sphinx', '12b83372ac9316e8cbe86e7fed889296a4cc29ee', + min_version='1.4.1.dev20160531') pip_install('michaeljones/breathe', - '1c9d7f80378a92cffa755084823a78bb38ee4acc') + '6b1c5bb7a1866f15fc328b8716258354b10c1daa', + min_version='4.2.0') + +def build_docs(version='dev', **kwargs): + doc_dir = kwargs.get('doc_dir', os.path.dirname(os.path.realpath(__file__))) + work_dir = kwargs.get('work_dir', '.') + include_dir = kwargs.get('include_dir', + os.path.join(os.path.dirname(doc_dir), 'fmt')) # Build docs. cmd = ['doxygen', '-'] p = Popen(cmd, stdin=PIPE) + doxyxml_dir = os.path.join(work_dir, 'doxyxml') p.communicate(input=r''' PROJECT_NAME = fmt GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO - INPUT = {0}/format.h {0}/ostream.h + INPUT = {0}/container.h {0}/format.h {0}/ostream.h \ + {0}/printf.h {0}/string.h QUIET = YES JAVADOC_AUTOBRIEF = YES AUTOLINK_SUPPORT = NO GENERATE_HTML = NO GENERATE_XML = YES - XML_OUTPUT = doxyxml + XML_OUTPUT = {1} ALIASES = "rst=\verbatim embed:rst" ALIASES += "endrst=\endverbatim" MACRO_EXPANSION = YES @@ -76,24 +89,29 @@ def build_docs(version='dev'): FMT_USE_USER_DEFINED_LITERALS=1 \ FMT_API= EXCLUDE_SYMBOLS = fmt::internal::* StringValue write_str - '''.format(os.path.join(os.path.dirname(doc_dir), 'fmt')).encode('UTF-8')) + '''.format(include_dir, doxyxml_dir).encode('UTF-8')) if p.returncode != 0: raise CalledProcessError(p.returncode, cmd) + html_dir = os.path.join(work_dir, 'html') + versions = ['3.0.0', '2.0.0', '1.1.0'] check_call(['sphinx-build', - '-Dbreathe_projects.format=' + os.path.join(os.getcwd(), 'doxyxml'), - '-Dversion=' + version, '-Drelease=' + version, '-Aversion=' + version, - '-b', 'html', doc_dir, 'html']) + '-Dbreathe_projects.format=' + os.path.abspath(doxyxml_dir), + '-Dversion=' + version, '-Drelease=' + version, + '-Aversion=' + version, '-Aversions=' + ','.join(versions), + '-b', 'html', doc_dir, html_dir]) try: check_call(['lessc', '--clean-css', '--include-path=' + os.path.join(doc_dir, 'bootstrap'), os.path.join(doc_dir, 'fmt.less'), - 'html/_static/fmt.css']) + os.path.join(html_dir, '_static', 'fmt.css')]) except OSError as e: if e.errno != errno.ENOENT: raise - print('lessc not found; make sure that Less (http://lesscss.org/) is installed') + print('lessc not found; make sure that Less (http://lesscss.org/) ' + + 'is installed') sys.exit(1) - return 'html' + return html_dir if __name__ == '__main__': + create_build_env() build_docs(sys.argv[1]) diff --git a/libs/format/doc/conf.py b/libs/format/doc/conf.py index 7af3e4815..1e9010e79 100644 --- a/libs/format/doc/conf.py +++ b/libs/format/doc/conf.py @@ -228,8 +228,7 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'format', u'format Documentation', - [u'Victor Zverovich'], 1) + ('index', 'fmt', u'fmt documentation', [u'Victor Zverovich'], 1) ] # If true, show URL addresses after external links. @@ -242,8 +241,8 @@ man_pages = [ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - ('index', 'format', u'format Documentation', - u'Victor Zverovich', 'format', 'One line description of project.', + ('index', 'fmt', u'fmt documentation', + u'Victor Zverovich', 'fmt', 'One line description of project.', 'Miscellaneous'), ] diff --git a/libs/format/doc/html/_sources/api.txt b/libs/format/doc/html/_sources/api.txt index 5270a68d4..8dbef39e1 100644 --- a/libs/format/doc/html/_sources/api.txt +++ b/libs/format/doc/html/_sources/api.txt @@ -11,8 +11,8 @@ namespace is usually omitted in examples. Format API ========== -The following functions use :ref:`format string syntax ` similar -to the one used by Python's `str.format +The following functions defined in ``fmt/format.h`` use :ref:`format string +syntax ` similar to the one used by Python's `str.format `_ function. They take *format_str* and *args* as arguments. @@ -22,6 +22,11 @@ arguments in the resulting string. *args* is an argument list representing arbitrary arguments. +The `performance of the format API +`_ is close +to that of glibc's ``printf`` and better than the performance of IOStreams. +For even better speed use the `write API`_. + .. _format: .. doxygenfunction:: format(CStringRef, ArgList) @@ -40,8 +45,9 @@ arguments in the resulting string. Date and time formatting ------------------------ -The library supports `strftime `_-like -date and time formatting:: +The library supports `strftime +`_-like date and time +formatting:: #include "fmt/time.h" @@ -52,6 +58,36 @@ date and time formatting:: The format string syntax is described in the documentation of `strftime `_. +Formatting user-defined types +----------------------------- + +A custom ``format_arg`` function may be implemented and used to format any +user-defined type. That is how date and time formatting described in the +previous section is implemented in :file:`fmt/time.h`. The following example +shows how to implement custom formatting for a user-defined structure. + +:: + + struct MyStruct { double a, b; }; + + void format_arg(fmt::BasicFormatter &f, + const char *&format_str, const MyStruct &s) { + f.writer().write("[MyStruct: a={:.1f}, b={:.2f}]", s.a, s.b); + } + + MyStruct m = { 1, 2 }; + std::string s = fmt::format("m={}", n); + // s == "m=[MyStruct: a=1.0, b=2.00]" + +Note in the example above the ``format_arg`` function ignores the contents of +``format_str`` so the type will always be formatted as specified. See +``format_arg`` in :file:`fmt/time.h` for an advanced example of how to use +the ``format_str`` argument to customize the formatted output. + +This section shows how to define a custom format function for a user-defined +type. The next section describes how to get ``fmt`` to use a conventional stream +output ``operator<<`` when one is defined for a user-defined type. + ``std::ostream`` support ------------------------ @@ -63,7 +99,7 @@ formatting of user-defined types that have overloaded ``operator<<``:: class Date { int year_, month_, day_; public: - Date(int year, int month, int day) : year_(year), month_(month), day_(day) {} + Date(int year, int month, int day): year_(year), month_(month), day_(day) {} friend std::ostream &operator<<(std::ostream &os, const Date &d) { return os << d.year_ << '-' << d.month_ << '-' << d.day_; @@ -75,8 +111,6 @@ formatting of user-defined types that have overloaded ``operator<<``:: .. doxygenfunction:: print(std::ostream&, CStringRef, ArgList) -.. doxygenfunction:: fprintf(std::ostream&, CStringRef, ArgList) - Argument formatters ------------------- @@ -86,7 +120,7 @@ custom argument formatter class:: // A custom argument formatter that formats negative integers as unsigned // with the ``x`` format specifier. class CustomArgFormatter : - public fmt::BasicArgFormatter { + public fmt::BasicArgFormatter { public: CustomArgFormatter(fmt::BasicFormatter &f, fmt::FormatSpec &s, const char *fmt) @@ -120,22 +154,43 @@ custom argument formatter class:: .. doxygenclass:: fmt::ArgFormatter :members: -Printf formatting functions ---------------------------- +Printf formatting +----------------- +The header ``fmt/printf.h`` provides ``printf``-like formatting functionality. The following functions use `printf format string syntax `_ with -a POSIX extension for positional arguments. +the POSIX extension for positional arguments. Unlike their standard +counterparts, the ``fmt`` functions are type-safe and throw an exception if an +argument type doesn't match its format specification. .. doxygenfunction:: printf(CStringRef, ArgList) .. doxygenfunction:: fprintf(std::FILE *, CStringRef, ArgList) +.. doxygenfunction:: fprintf(std::ostream&, CStringRef, ArgList) + .. doxygenfunction:: sprintf(CStringRef, ArgList) +.. doxygenclass:: fmt::PrintfFormatter + :members: + +.. doxygenclass:: fmt::BasicPrintfArgFormatter + :members: + +.. doxygenclass:: fmt::PrintfArgFormatter + :members: + Write API ========= +The write API provides classes for writing formatted data into character +streams. It is usually faster than the `format API`_ but, as IOStreams, +may result in larger compiled code size. The main writer class is +`~fmt::BasicMemoryWriter` which stores its output in a memory buffer and +provides direct access to it. It is possible to create custom writers that +store output elsewhere by subclassing `~fmt::BasicWriter`. + .. doxygenclass:: fmt::BasicWriter :members: @@ -145,6 +200,12 @@ Write API .. doxygenclass:: fmt::BasicArrayWriter :members: +.. doxygenclass:: fmt::BasicStringWriter + :members: + +.. doxygenclass:: fmt::BasicContainerWriter + :members: + .. doxygenfunction:: bin(int) .. doxygenfunction:: oct(int) @@ -169,6 +230,8 @@ Utilities .. doxygenclass:: fmt::ArgList :members: +.. doxygenfunction:: fmt::to_string(const T&) + .. doxygenclass:: fmt::BasicStringRef :members: @@ -185,6 +248,8 @@ System errors .. doxygenclass:: fmt::SystemError :members: +.. doxygenfunction:: fmt::format_system_error + .. doxygenclass:: fmt::WindowsError :members: @@ -202,7 +267,8 @@ A custom allocator class can be specified as a template argument to It is also possible to write a formatting function that uses a custom allocator:: - typedef std::basic_string, CustomAllocator> CustomString; + typedef std::basic_string, CustomAllocator> + CustomString; CustomString format(CustomAllocator alloc, fmt::CStringRef format_str, fmt::ArgList args) { diff --git a/libs/format/doc/html/_sources/index.txt b/libs/format/doc/html/_sources/index.txt index 4e17d4b54..ce9b7bf94 100644 --- a/libs/format/doc/html/_sources/index.txt +++ b/libs/format/doc/html/_sources/index.txt @@ -10,9 +10,9 @@ alternative to C++ IOStreams.
What users say:
- Thanks for creating this library. It’s been a hole in C++ for a long time. - I’ve used both boost::format and loki::SPrintf, and neither felt like the - right answer. This does. + Thanks for creating this library. It’s been a hole in C++ for a long + time. I’ve used both boost::format and loki::SPrintf, and neither felt + like the right answer. This does.
@@ -24,8 +24,8 @@ Format API The replacement-based Format API provides a safe alternative to ``printf``, ``sprintf`` and friends with comparable or `better performance `_. -The `format string syntax `_ is similar -to the one used by `str.format `_ +The `format string syntax `_ is similar to the one used by +`str.format `_ in Python: .. code:: c++ @@ -98,8 +98,8 @@ literal operators, they must be made visible with the directive Write API --------- -The concatenation-based Write API (experimental) provides a -`fast `_ +The concatenation-based Write API (experimental) provides a `fast +`_ stateless alternative to IOStreams: .. code:: c++ @@ -112,8 +112,9 @@ stateless alternative to IOStreams: Safety ------ -The library is fully type safe, automatic memory management prevents buffer overflow, -errors in format strings are reported using exceptions. For example, the code +The library is fully type safe, automatic memory management prevents buffer +overflow, errors in format strings are reported using exceptions. For example, +the code .. code:: c++ @@ -138,19 +139,21 @@ formatted into a narrow string. You can use a wide format string instead: fmt::format(L"Cyrillic letter {}", L'\x42e'); For comparison, writing a wide character to ``std::ostream`` results in -its numeric value being written to the stream (i.e. 1070 instead of letter 'ÑŽ' which -is represented by ``L'\x42e'`` if we use Unicode) which is rarely what is needed. +its numeric value being written to the stream (i.e. 1070 instead of letter 'ÑŽ' +which is represented by ``L'\x42e'`` if we use Unicode) which is rarely what is +needed. .. _portability: Portability ----------- -The library is highly portable. Here is an incomplete list of operating systems and -compilers where it has been tested and known to work: +The library is highly portable. Here is an incomplete list of operating systems +and compilers where it has been tested and known to work: -* 64-bit (amd64) GNU/Linux with GCC 4.4.3, `4.6.3 `_, - 4.7.2, 4.8.1 and Intel C++ Compiler (ICC) 14.0.2 +* 64-bit (amd64) GNU/Linux with GCC 4.4.3, + `4.6.3 `_, 4.7.2, 4.8.1, and Intel C++ + Compiler (ICC) 14.0.2 * 32-bit (i386) GNU/Linux with GCC 4.4.3, 4.6.3 @@ -161,21 +164,21 @@ compilers where it has been tested and known to work: * 32-bit Windows with Visual C++ 2010 -Although the library uses C++11 features when available, it also works with older -compilers and standard library implementations. The only thing to keep in mind -for C++98 portability: +Although the library uses C++11 features when available, it also works with +older compilers and standard library implementations. The only thing to keep in +mind for C++98 portability: * Variadic templates: minimum GCC 4.4, Clang 2.9 or VS2013. This feature allows - the Format API to accept an unlimited number of arguments. With older compilers - the maximum is 15. + the Format API to accept an unlimited number of arguments. With older + compilers the maximum is 15. -* User-defined literals: minimum GCC 4.7, Clang 3.1 or VS2015. The suffixes - ``_format`` and ``_a`` are functionally equivalent to the functions +* User-defined literals: minimum GCC 4.7, Clang 3.1 or VS2015. The suffixes + ``_format`` and ``_a`` are functionally equivalent to the functions ``fmt::format`` and ``fmt::arg``. -The output of all formatting functions is consistent across platforms. In particular, -formatting a floating-point infinity always gives ``inf`` while the output -of ``printf`` is platform-dependent in this case. For example, +The output of all formatting functions is consistent across platforms. In +particular, formatting a floating-point infinity always gives ``inf`` while the +output of ``printf`` is platform-dependent in this case. For example, .. code:: @@ -188,10 +191,10 @@ always prints ``inf``. Ease of Use ----------- -fmt has a small self-contained code base consisting of a single header file -and a single source file and no external dependencies. A permissive BSD `license -`_ allows using the library both -in open-source and commercial projects. +fmt has a small self-contained code base with the core library consisting of +a single header file and a single source file and no external dependencies. +A permissive BSD `license `_ allows +using the library both in open-source and commercial projects. .. raw:: html diff --git a/libs/format/doc/html/_sources/syntax.txt b/libs/format/doc/html/_sources/syntax.txt index feda3e44d..1051467a0 100644 --- a/libs/format/doc/html/_sources/syntax.txt +++ b/libs/format/doc/html/_sources/syntax.txt @@ -49,12 +49,10 @@ mini-language" or interpretation of the *format_spec*. Most built-in types support a common formatting mini-language, which is described in the next section. -A *format_spec* field can also include nested replacement fields within it. -These nested replacement fields can contain only an argument index; -format specifications are not allowed. Formatting is performed as if the -replacement fields within the format_spec are substituted before the -*format_spec* string is interpreted. This allows the formatting of a value -to be dynamically specified. +A *format_spec* field can also include nested replacement fields in certain +positions within it. These nested replacement fields can contain only an +argument id; format specifications are not allowed. This allows the +formatting of a value to be dynamically specified. See the :ref:`formatexamples` section for some examples. @@ -80,8 +78,8 @@ The general form of a *standard format specifier* is: sign: "+" | "-" | " " width: `integer` | "{" `arg_id` "}" precision: `integer` | "{" `arg_id` "}" - type: `int_type` | "c" | "e" | "E" | "f" | "F" | "g" | "G" | "p" | "s" - int_type: "b" | "B" | "d" | "o" | "x" | "X" + type: `int_type` | "a" | "A" | "c" | "e" | "E" | "f" | "F" | "g" | "G" | "p" | "s" + int_type: "b" | "B" | "d" | "n" | "o" | "x" | "X" The *fill* character can be any character other than '{' or '}'. The presence of a fill character is signaled by the character following it, which must be @@ -234,7 +232,7 @@ The available presentation types for floating-point values are: +=========+==========================================================+ | ``'a'`` | Hexadecimal floating point format. Prints the number in | | | base 16 with prefix ``"0x"`` and lower-case letters for | -| | digits above 9. Uses 'p' to indicate the exponent. | +| | digits above 9. Uses ``'p'`` to indicate the exponent. | +---------+----------------------------------------------------------+ | ``'A'`` | Same as ``'a'`` except it uses upper-case letters for | | | the prefix, digits above 9 and to indicate the exponent. | diff --git a/libs/format/doc/html/_sources/usage.txt b/libs/format/doc/html/_sources/usage.txt index 27d96edec..dff312dfa 100644 --- a/libs/format/doc/html/_sources/usage.txt +++ b/libs/format/doc/html/_sources/usage.txt @@ -54,6 +54,23 @@ To build a `shared library`__ set the ``BUILD_SHARED_LIBS`` CMake variable to __ http://en.wikipedia.org/wiki/Library_%28computing%29#Shared_libraries +Header-only usage with CMake +============================ + +In order to add ``fmtlib`` into an existing ``CMakeLists.txt`` file, you can add the ``fmt`` library directory into your main project, which will enable the ``fmt`` library:: + + add_subdirectory(fmt) + +If you have a project called ``foo`` that you would like to link against the fmt library in a header-only fashion, you can enable with with:: + + target_link_libraries(foo PRIVATE fmt::fmt-header-only) + +And then to ensure that the ``fmt`` library does not always get built, you can modify the call to ``add_subdirectory`` to read :: + + add_subdirectory(fmt EXCLUDE_FROM_ALL) + +This will ensure that the ``fmt`` library is exluded from calls to ``make``, ``make all``, or ``cmake --build .``. + Building the documentation ========================== @@ -62,7 +79,11 @@ system: * `Python `_ with pip and virtualenv * `Doxygen `_ -* `Less `_ with less-plugin-clean-css +* `Less `_ with ``less-plugin-clean-css``. + Ubuntu doesn't package the ``clean-css`` plugin so you should use ``npm`` + instead of ``apt`` to install both ``less`` and the plugin:: + + sudo npm install -g less less-plugin-clean-css. First generate makefiles or project files using CMake as described in the previous section. Then compile the ``doc`` target/project, for example:: @@ -87,4 +108,4 @@ Homebrew fmt can be installed on OS X using `Homebrew `_:: - brew install cppformat + brew install fmt diff --git a/libs/format/doc/html/_static/pygments.css b/libs/format/doc/html/_static/pygments.css index 8213e90be..20c4814dc 100644 --- a/libs/format/doc/html/_static/pygments.css +++ b/libs/format/doc/html/_static/pygments.css @@ -47,8 +47,10 @@ .highlight .mh { color: #208050 } /* Literal.Number.Hex */ .highlight .mi { color: #208050 } /* Literal.Number.Integer */ .highlight .mo { color: #208050 } /* Literal.Number.Oct */ +.highlight .sa { color: #4070a0 } /* Literal.String.Affix */ .highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ .highlight .sc { color: #4070a0 } /* Literal.String.Char */ +.highlight .dl { color: #4070a0 } /* Literal.String.Delimiter */ .highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ .highlight .s2 { color: #4070a0 } /* Literal.String.Double */ .highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ @@ -59,7 +61,9 @@ .highlight .s1 { color: #4070a0 } /* Literal.String.Single */ .highlight .ss { color: #517918 } /* Literal.String.Symbol */ .highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #06287e } /* Name.Function.Magic */ .highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ .highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ .highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ +.highlight .vm { color: #bb60d5 } /* Name.Variable.Magic */ .highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/libs/format/doc/html/api.html b/libs/format/doc/html/api.html index 073c02b99..e8b323871 100644 --- a/libs/format/doc/html/api.html +++ b/libs/format/doc/html/api.html @@ -8,7 +8,7 @@ - API Reference — fmt 3.0.0 documentation + API Reference — fmt 4.0.0 documentation @@ -17,10 +17,11 @@ @@ -35,8 +36,9 @@ diff --git a/libs/format/doc/html/contents.html b/libs/format/doc/html/contents.html index 9daa5e953..e2d5789ee 100644 --- a/libs/format/doc/html/contents.html +++ b/libs/format/doc/html/contents.html @@ -8,7 +8,7 @@ - Contents — fmt 3.0.0 documentation + Contents — fmt 4.0.0 documentation @@ -17,10 +17,11 @@ @@ -34,8 +35,9 @@ diff --git a/libs/format/doc/html/genindex.html b/libs/format/doc/html/genindex.html index 5f0142ca3..89ffacf4b 100644 --- a/libs/format/doc/html/genindex.html +++ b/libs/format/doc/html/genindex.html @@ -9,7 +9,7 @@ - Index — fmt 3.0.0 documentation + Index — fmt 4.0.0 documentation @@ -18,10 +18,11 @@ @@ -34,8 +35,9 @@ diff --git a/libs/format/doc/html/index.html b/libs/format/doc/html/index.html index 9d1316431..e159b2170 100644 --- a/libs/format/doc/html/index.html +++ b/libs/format/doc/html/index.html @@ -8,7 +8,7 @@ - Overview — fmt 3.0.0 documentation + Overview — fmt 4.0.0 documentation @@ -17,10 +17,11 @@ @@ -33,8 +34,9 @@ diff --git a/libs/format/doc/html/objects.inv b/libs/format/doc/html/objects.inv index 21d47b1482e68b4f998a8ccdcc176011f917b781..018ffadc32d673aa5e5c1762d0d10b0981e71c77 100644 GIT binary patch delta 4129 zcmV++5Z>>q9PA*FHvu$}I6r?}TW=f5m44T+5RkkosQX38J~*BpK=8~&pvN=7E*3&v zWhN9Ukd$oi!~XXDs!2*D)h+f#-Yl}2feorz=R2pW&gDDRCI9&IuQ%`CUH|%NQk{p( zI~SIVb9(OXr+@mqzMK6a{OOP97iT|W&~NW1SMPqfdfz@O->ok%-z|S{e_Sl@+0;gq^hm{oiodwkG(0`I67N5| z@|DMo0+R@q+oSM%|9ZhOmIDxpjyPs7P z(ZC2A4D6j18*G0&N{*(EkGY$*XUQ$b(tZ1VIqkIU>R6-|s|Eekyk011P5*-ZGF;V+(};V@Uyh((sG5A(^)nMn>+d$x z+B!#@CGU3xdHwA^b=3VjVy-_9nUmUxRxcdy>Yq>JWSdhEXNyF1uY}p+O{M$eq+{X?oui-Z9+>4np-Xd9@ zKz?22sf5_3wcVV?bh6=VCoS#Q;J4b)-0h#x+O_pRsrB$2;FQ+xeL%b7_7j3r+B*~D zcI5->c95E8hfuDX7`xbhinRnW7hQNKX=-K zeb|55s^P%w4Z$08&u#<1gTC+`FjFID_Y`!njSczd32}(4@peb6JBi*CmbF-GleOzx z8#Vs-arpI7`~%sW$3xB?B3Nz4Rfl4im+t;P&0`k}wg_q?feK7Nl|RRT!QHzsU4QGe zKU++*6FQ#O<>l>i@ui1#qKvPaXu%e5nO1*k`Ive@>aEBL)DAwrzls})*DyOr&2H+4 z@iL%wqvn;at%(N@>(!dnG^%dy(Dq-o9~#$Vrt(OlYC&p-K6wUuB=k~U$5X8r*7P`_ zIo8?rOz0n>^W(SGI^9*vWtaO2bZ>MM!b`Z5xphzA5PnL@-ud@d*YDGLTzpw|G?#zv z53iaq8W2xjQrVX{QqgF$TXyQ*ImT7?NqX|(`GUiE1V5d3LcqA^bBRGh-Cg#{L-*F~ zxNv_Dw3}7!WjCqwmfHqFGy=8SEis?gKiQXO0QtU-%PxBKc5HQx+9ZCw`l)(-Hvg}Y zf4HA~5I|pzfiBIQUVxk?clYLYcLsm|oW6F7GmLwVv!Ox{U8F=AI9hBGIz=wWxRFBl zt`m>u7*|dIc5q@gMs(Tnx{0huzUl-2j94#1v@ckwIQk)5zx|`YnHnceCm3 z{Cu^J0Q!5HpI^}P)wlWDecj03F5TUoTVB*(UX&~SfUSqeMJR)JTF&2HU!B9ev`q7m z&d@O2Ok*Eh|1h1!GL0fLb3V??HY=5kkZ?Zy61(P+)(^qwlF^(k({!yUG#=JmV@>-7(z35 zj&o;{l`Lk$rK5u6{^+w30fVGqj&+)9&j@2wlVCEl)KEd4At9*bS$}`v$L;T73>Ab? z)H-eglgS1lvkl5ArA5{;yUew;BeAWvS}W{>vEDhXym6jUm6(v;kHKb6I}yC6F>7Z$ z51bOGh*pGX&0QLUEvc}=5$2B9Yq0O36*ikFafh6J6$Qwx!WAP}4?5T@n40hl)2_+5pTv>lYoHH?-Bso{YgltE} zd=P>O3#YJwa>S)1oNya04b%i;^eAi&sAbvz zkdQAtha-5Vu}48h76L()d;=BUXrv8P6Hg@}fn=r?qFiJpk|e`cVRv`qW|{I>`I0p? zlA03&C7dNfjUb#xMFOfW^^vkSP=V~Lgr|mU6c?=+;@W>$Zn4mkN5Rz_s6e)0LSSiq z43trxNDL}SB12|M=3%qg-G3k9a>p2jDg~J(qb{R@bLBJ95xFQLBPEk#5<}FCN)HD- z+EYs`p~}#VoJCQD6p@VOL?x^XWAPPtp@dqt&_IaHJm};_6wFECvmT4@qg0kfmKkLn z0Ue#Tg5rN+#ymj9#^PtgG-!r|_qyZ_^CoB(I7mJ`jdC{x|E|7AJ;KQj0LmsJ5I|0_ z)|N}9B0-GPY)LX@XEl2Z9X>@3eyBXO7<3YzX7pgx5CV@5YS2b*&LYOwyC$5nEQBHH zS{_W)&T|8jf=EO?QV2ZF=o_jM$fJdOq4o(>y(oXYFrY`4CxjF-z#FQP&KRo__k}m2 zo*U#sWLyfq!LUXCO;v%?SQ~Rx79|{;j^HAJ`W(<}GyaCER78iPDalDo1qU+>OalAF zQ*!8})f=kPgrP(eox=2$x0~&}=)N&MTg4GEo zX%BzW8b&JsBZ)D1LK1NV&P1GWRv_Ekq)c*Tyn-MC2^?M`w8HuZucQY1luCjhD?VC* zk%+CpNr+sAsA9^nT_g8PW+cL5w1OBkwI+$^(fI*AQ?zKHPRY=6u;WH6NWm#q8WD>B zB$J*b@D_#sTT-KkmBp=s;br9j07jyfR3v|+>CGvkwN6N#XqRk|f*4M7cncj_CNHth z7L7>C3T?ZT;0s0?2A}bRoN@RHJeft5iw+h9XC3BEz%HW7pvyw%gmz&RIFlLlgeAd2 z0@3sHm@JA1cNyy~NgM?(f{w~_hyJ;2Q|6M!#1S8fpafDg3S1WQN+kCdd`n{Ej0b!<81!#*1$?D>uJ;66Om2f`xlP${**>hTmb zI;I$kosk(=`kbM#St!RtG7$vcCoV04|DY)QvJ5m0ghdCg%juE<({)4>Vvv8)G?i9a zr@>$b!h%LSf<%K)E(kO-nF*&kBPfq7sh&h@e5=vICXqX=WGeEYs9;1!w4GUT&;(?3 zG-iX8j5G0|2eL9q0-Avet93bXH^`}(8BGL9GK^MWgXh6T>p+)6Bt{6CY|f0AE{OCk z;0MD6O(ui{21*k% zs4Pa1)0O-HEI7xR%18w#(@$B@Im7#_D%W@8R-B_7DA$9 z4uPQcWQd(oI8cwZPNwHHF~uB^6N!b5R+ci0phxLIFJZd82|EBYh~@HD%7^lHc{-n7{N(1h5AHVYfHo~|ZI#av z*|faDlBw%jdZ!?NCgyV!lPG3)0=e3+%}0^cu|Yv-r4@_T=d?N_a?pGTeDFX3IQ;#oaR z+gwp?_oQXIpCNJFVGC}s1+!k4=vFSLSIz%e4>(&Tw+x?;0;qnrS(uNT@2^Xota@G$ z+yueJmUfnpFD|d`P5AKI;0Af$iS~3o1@-2-&co%s z3yaw~J$Li!k6%{zli!Cw{^9)M?0XFQ<-^U@hwrXF9v_wOSC^L`7I%N&&ldM?wMvWg zFrQzBiCZpr2ai8qUw>skaSW$yclf9YqX98LOv9?0OW4e#{7@}dCugHK14jpfmzT47TDaA0@jriSGl4Bm^=8+dH*1y$mb`?f%c-ljsyh2`No3i#Z zcKjun#LjeYjsV2`Ri-F`Gl>b%$LWT zRJ$S5$LC)U?4@7UqNA^S&>iy4L5z=@aT;+?nR)>IO4WbOr!Awup|t*P?R=ZnI%dho zEk#^C%~MO=ZzJaVW1l&xwdm;8wp{)DX}sBl6a0HG_a0UG*ghp4s$7d6c=eCzezs_x z%JnOm(NVNx3ffhvU9l#$H#ZGW->_xd75`UH8{BORl^xQ!*cTWz<22&7+xM4bdZ?-? zga1=B9;<)8zpnDOrDMm6=vJ&N0r_QjGWkYZDj^K^k*66|Sqc8jln5hx7bv*3t zVnZ-I1NQJUe%#CIg4x}1Yq6tTVoT2&HU8gW=yiWl{2keu$3xC7qF1fQjrPSZFWr2e zrm>9$8w9nMK&Gdk%g-TTaB~-`)l&yZvz0lV)#c^gV)obpNtE%Urs}i7Tcl-Ld`%r7 z^+x0bYD)*-F5+6^EzFLH2f=dtv|Oe8(PGi&%|6{3J!(LB4R_L6cLes~D@t}+#*MDO zRMUSrdtA0Om+cN8HDNR$o;=;zl{iq*XtP_is=^%OM)q0y=F`j3z;Fa#O%v zUPA5rpXUy1XUz^X;X9+v@x`hYh18p|qiaN-`2OmL(SMMSB7Zl(`6Ph890GjRL+DM5qaIk;aq;6Oz%NN%6yWfpl@ny3Wom6b>%BfsK zE&46s+vkQI9eN}7TPvD{R)8GiUN*6p(A>2mZ5-o9)!+AC0}K&ev^>O;^~g74^4}5b zRm$uN)-K2Y2lahW2X9yF0`%(wx2l?IQ#AjT(Hc)O+VL z#mm*~A8C4iLC=>@)0O+SM!H+L`+K*zsK2}@m)@YH9v)|*4BqNI|8RYE4(PN<(~!>4 z8H}sg1=l}RlUQCL7MY3jX;Ne!mhLXCMgDO9=k1Wymvla<{K74s&cbZEO4HSH*Qo8Y zwPhbSzn#VEu3B}mDY<33nB|LyW!ir?3q4r+wl!;nQRlOK{&|_say6NB(Xc7?d*IL8 z_%h&PyXwsrtj|}<7Hr0km-7_5+fg^SaGEj2|78pF^SR(D3y+JAsbe{4Z-XH;bLTjB zCRxd1CR{oyNbZh4Dc;*l3g$!>n9__JlL&!9nnW9{FfJHa6JmGZubZoieFcAE6t#|< zz+|#P$ZUghN@)_d~Fm(@q5MY0TOg&jY8# zDWVl2T633%U`r~jaD@3Nq~^?!9B2rbg=I7wO$T8o&I8e~R|F@lQ<=tS7&SDpXiXl1 zt(>J!Qzi`~QgKOGrWxyu1qy#g`ax@ANK(wR7@|%(acD437=;fi1)UIgliLT2t6gjK!lEvPUW*L$Cw4NhoQ!=gJb|oQc^a$+>?LCS*G(=7SJS zSU80Zlp`)B;e^|0X`m($qX%KDsBPlWa`;S^DhuL+BPJUqX^4YjCvrl$mxfqrQ}7vk zYISDt6={_imQNyL5hyM@_%=<#8Xi5-G!r2scDft(`ZRYynQQz|<*u_`eh2p>2LIWW(^PrO# zQ7|Wk&w41nk5X9{S!R@RL`iho3W|pr^8mjYik}VBsNIrV>5@0ho1j_Xngn2S&xmT3araip1$ak>8RjJFD4y=#+tqO4h4^(!r zf*3TlCW+`l;Zn|-BKd(iCPSf*y1@#tLLfj`l?W0Z6k2~iuq{zoMMOua-a$cWazXcl zWLj{|s6-YCsM-OokKCHPtl9)U9q+!CxtNKuqVIfp0-cm|4Z6qHCO{4j8^c?EEl zh(Z=Ya9FDaNhE2TT~>p@(V=m44M7PD>rq}DdNqIL9U9s!k_&^tvnRB?`yt9R^lXG7 z;c~A<4BpdXM3LOSRX@*|~ zjXXgj*3QJP@3@{}b#N#_T443iDQM8E7z$uy#uZZ37d8upMlqR)YVXk`SpvSQK-!AE zH1&Ukby

v{6W7luE6b1vTUbE*d-nqbDrbyDr!Ul*|!L2zvggDcW7@H26R_*kye& zYMkm@O1&jv7AHE0LLUVKafn(l<&mDKW$0?S>=-eR>&s7l?AjA8c>+8mBxGbPnM4kX z8Hw6ZZCD{2E#8l$Z|;6RNz46#yRX@wU(A1Rhi)V{@952!5^0etbX%S=^aIKfBw3HX zK+3=wT9ebhy9bsDXbrL*fRaE_0CrLWjSYTii}zr=U_3a-nL>SuF?!%-AJ8l&nSud9 z)1AOTvaB;!dY;k8=EQ_&$|R15Xd)!*24PFC2X+uaSvR zN>GCja2n!Tkg7efkR2ETyun(jwaAnb%}T;Rrbwn67g9_*>S z7K|C5>IpbQW*lgpz!F+{;;f<)O_xj*wW)N|7ClCxIH$ojw*fYeme3qpq#b`WZ{S=s zYFYRM0^gx1v(ybOf{6o06e5D`gB^90P|h)P7i>D6(Vh=N-_FqGubr!01y>)X|5#0{ ziyz$d?!n!qEl}NtEsrW(|DE!=n@nb*+~ZoF-KA-LO1m$zeY!rIzA7KjsyHr3*46YO zbvd+!*mC6-t8Ow0igLA~hHZbPp69VSVc(g;e}7GjuT^@)pw+nk)6Gu6t8~}Rmit+3 zSl0Q|#rBJ}SwGI=!z67Mcs^UKoUbP3_W$u?^y`;VXY&OdVp*J_gK6u#G{;?Xk>(Rb z!9BKMj4haSx*)Mczx$^7xAlOtWpaz~<-q6bXX}NzU4MUFTzlE^^2bg(2rf3S2g}D- z7ZY|SyniKRjlAnbJG!3ZaQ#PQxAix>A}7LkPpqpG)|X6n4STtDa{jq|JbSF->Pr{M Ux~V&HYooqORA1Woe;TK4r#q_B-v9sr diff --git a/libs/format/doc/html/search.html b/libs/format/doc/html/search.html index 54b2f380c..a8f742f30 100644 --- a/libs/format/doc/html/search.html +++ b/libs/format/doc/html/search.html @@ -8,7 +8,7 @@ - Search — fmt 3.0.0 documentation + Search — fmt 4.0.0 documentation @@ -17,10 +17,11 @@ @@ -40,8 +41,9 @@ diff --git a/libs/format/doc/html/searchindex.js b/libs/format/doc/html/searchindex.js index f6532839a..fecf16d98 100644 --- a/libs/format/doc/html/searchindex.js +++ b/libs/format/doc/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({envversion:47,filenames:["api","contents","index","syntax","usage"],objects:{"":{"fmt::ArgFormatter":[0,1,1,"_CPPv2N3fmt12ArgFormatterE"],"fmt::ArgFormatter::ArgFormatter":[0,2,1,"_CPPv2N3fmt12ArgFormatter12ArgFormatterER14BasicFormatterI4CharER10FormatSpecPK4Char"],"fmt::ArgList":[0,1,1,"_CPPv2N3fmt7ArgListE"],"fmt::ArgList::operator[]":[0,2,1,"_CPPv2N3fmt7ArgListixEj"],"fmt::ArgVisitor":[0,1,1,"_CPPv2N3fmt10ArgVisitorE"],"fmt::ArgVisitor::visit":[0,2,1,"_CPPv2N3fmt10ArgVisitor5visitERK3Arg"],"fmt::ArgVisitor::visit_any_double":[0,2,1,"_CPPv2N3fmt10ArgVisitor16visit_any_doubleE1T"],"fmt::ArgVisitor::visit_any_int":[0,2,1,"_CPPv2N3fmt10ArgVisitor13visit_any_intE1T"],"fmt::ArgVisitor::visit_bool":[0,2,1,"_CPPv2N3fmt10ArgVisitor10visit_boolEb"],"fmt::ArgVisitor::visit_char":[0,2,1,"_CPPv2N3fmt10ArgVisitor10visit_charEi"],"fmt::ArgVisitor::visit_cstring":[0,2,1,"_CPPv2N3fmt10ArgVisitor13visit_cstringEPKc"],"fmt::ArgVisitor::visit_custom":[0,2,1,"_CPPv2N3fmt10ArgVisitor12visit_customEN3Arg11CustomValueE"],"fmt::ArgVisitor::visit_double":[0,2,1,"_CPPv2N3fmt10ArgVisitor12visit_doubleEd"],"fmt::ArgVisitor::visit_int":[0,2,1,"_CPPv2N3fmt10ArgVisitor9visit_intEi"],"fmt::ArgVisitor::visit_long_double":[0,2,1,"_CPPv2N3fmt10ArgVisitor17visit_long_doubleEe"],"fmt::ArgVisitor::visit_long_long":[0,2,1,"_CPPv2N3fmt10ArgVisitor15visit_long_longE8LongLong"],"fmt::ArgVisitor::visit_pointer":[0,2,1,"_CPPv2N3fmt10ArgVisitor13visit_pointerEPKv"],"fmt::ArgVisitor::visit_string":[0,2,1,"_CPPv2N3fmt10ArgVisitor12visit_stringEN3Arg11StringValueIcEE"],"fmt::ArgVisitor::visit_uint":[0,2,1,"_CPPv2N3fmt10ArgVisitor10visit_uintEj"],"fmt::ArgVisitor::visit_ulong_long":[0,2,1,"_CPPv2N3fmt10ArgVisitor16visit_ulong_longE9ULongLong"],"fmt::ArgVisitor::visit_wstring":[0,2,1,"_CPPv2N3fmt10ArgVisitor13visit_wstringEN3Arg11StringValueIwEE"],"fmt::BasicArgFormatter":[0,1,1,"_CPPv2N3fmt17BasicArgFormatterE"],"fmt::BasicArgFormatter::BasicArgFormatter":[0,2,1,"_CPPv2N3fmt17BasicArgFormatter17BasicArgFormatterER14BasicFormatterI4Char4ImplER10FormatSpecPK4Char"],"fmt::BasicArgFormatter::visit_custom":[0,2,1,"_CPPv2N3fmt17BasicArgFormatter12visit_customEN8internal3Arg11CustomValueE"],"fmt::BasicArrayWriter":[0,1,1,"_CPPv2N3fmt16BasicArrayWriterE"],"fmt::BasicArrayWriter::BasicArrayWriter":[0,2,1,"_CPPv2N3fmt16BasicArrayWriter16BasicArrayWriterERASIZE_4Char"],"fmt::BasicCStringRef":[0,1,1,"_CPPv2N3fmt15BasicCStringRefE"],"fmt::BasicCStringRef::BasicCStringRef":[0,2,1,"_CPPv2N3fmt15BasicCStringRef15BasicCStringRefERKNSt12basic_stringI4CharEE"],"fmt::BasicCStringRef::c_str":[0,2,1,"_CPPv2N3fmt15BasicCStringRef5c_strEv"],"fmt::BasicFormatter":[0,1,1,"_CPPv2N3fmt14BasicFormatterE"],"fmt::BasicFormatter::BasicFormatter":[0,2,1,"_CPPv2N3fmt14BasicFormatter14BasicFormatterERK7ArgListR11BasicWriterI4CharE"],"fmt::BasicFormatter::Char":[0,3,1,"_CPPv2N3fmt14BasicFormatter4CharE"],"fmt::BasicFormatter::format":[0,2,1,"_CPPv2N3fmt14BasicFormatter6formatERPK4CharRKN8internal3ArgE"],"fmt::BasicFormatter::writer":[0,2,1,"_CPPv2N3fmt14BasicFormatter6writerEv"],"fmt::BasicMemoryWriter":[0,1,1,"_CPPv2N3fmt17BasicMemoryWriterE"],"fmt::BasicMemoryWriter::BasicMemoryWriter":[0,2,1,"_CPPv2N3fmt17BasicMemoryWriter17BasicMemoryWriterERR17BasicMemoryWriter"],"fmt::BasicMemoryWriter::operator=":[0,2,1,"_CPPv2N3fmt17BasicMemoryWriteraSERR17BasicMemoryWriter"],"fmt::BasicStringRef":[0,1,1,"_CPPv2N3fmt14BasicStringRefE"],"fmt::BasicStringRef::BasicStringRef":[0,2,1,"_CPPv2N3fmt14BasicStringRef14BasicStringRefERKNSt12basic_stringI4CharEE"],"fmt::BasicStringRef::data":[0,2,1,"_CPPv2N3fmt14BasicStringRef4dataEv"],"fmt::BasicStringRef::size":[0,2,1,"_CPPv2N3fmt14BasicStringRef4sizeEv"],"fmt::BasicStringRef::to_string":[0,2,1,"_CPPv2N3fmt14BasicStringRef9to_stringEv"],"fmt::BasicWriter":[0,1,1,"_CPPv2N3fmt11BasicWriterE"],"fmt::BasicWriter::c_str":[0,2,1,"_CPPv2N3fmt11BasicWriter5c_strEv"],"fmt::BasicWriter::data":[0,2,1,"_CPPv2N3fmt11BasicWriter4dataEv"],"fmt::BasicWriter::operator<<":[0,2,1,"_CPPv2N3fmt11BasicWriterlsEe"],"fmt::BasicWriter::size":[0,2,1,"_CPPv2N3fmt11BasicWriter4sizeEv"],"fmt::BasicWriter::str":[0,2,1,"_CPPv2N3fmt11BasicWriter3strEv"],"fmt::BasicWriter::write":[0,2,1,"_CPPv2N3fmt11BasicWriter5writeE15BasicCStringRefI4CharE7ArgList"],"fmt::BasicWriter::~BasicWriter":[0,2,1,"_CPPv2N3fmt11BasicWriterD0Ev"],"fmt::Buffer":[0,1,1,"_CPPv2N3fmt6BufferE"],"fmt::Buffer::append":[0,2,1,"_CPPv2N3fmt6Buffer6appendEPK1UPK1U"],"fmt::Buffer::capacity":[0,2,1,"_CPPv2N3fmt6Buffer8capacityEv"],"fmt::Buffer::grow":[0,2,1,"_CPPv2N3fmt6Buffer4growENSt6size_tE"],"fmt::Buffer::reserve":[0,2,1,"_CPPv2N3fmt6Buffer7reserveENSt6size_tE"],"fmt::Buffer::resize":[0,2,1,"_CPPv2N3fmt6Buffer6resizeENSt6size_tE"],"fmt::Buffer::size":[0,2,1,"_CPPv2N3fmt6Buffer4sizeEv"],"fmt::SystemError":[0,1,1,"_CPPv2N3fmt11SystemErrorE"],"fmt::SystemError::SystemError":[0,2,1,"_CPPv2N3fmt11SystemError11SystemErrorEi10CStringRef"],"fmt::WindowsError":[0,1,1,"_CPPv2N3fmt12WindowsErrorE"],"fmt::WindowsError::WindowsError":[0,2,1,"_CPPv2N3fmt12WindowsError12WindowsErrorEi10CStringRef"],"fmt::arg":[0,2,1,"_CPPv2N3fmt3argE9StringRefRK1T"],"fmt::bin":[0,2,1,"_CPPv2N3fmt3binEi"],"fmt::format":[0,2,1,"_CPPv2N3fmt6formatE10CStringRef7ArgList"],"fmt::fprintf":[0,2,1,"_CPPv2N3fmt7fprintfERNSt7ostreamE10CStringRef7ArgList"],"fmt::hex":[0,2,1,"_CPPv2N3fmt3hexEi"],"fmt::hexu":[0,2,1,"_CPPv2N3fmt4hexuEi"],"fmt::literals::operator\"\"_a":[0,2,1,"_CPPv2N3fmt8literalsli2_aEPKcNSt6size_tE"],"fmt::literals::operator\"\"_format":[0,2,1,"_CPPv2N3fmt8literalsli7_formatEPKcNSt6size_tE"],"fmt::oct":[0,2,1,"_CPPv2N3fmt3octEi"],"fmt::pad":[0,2,1,"_CPPv2N3fmt3padEij4Char"],"fmt::print":[0,2,1,"_CPPv2N3fmt5printERNSt7ostreamE10CStringRef7ArgList"],"fmt::printf":[0,2,1,"_CPPv2N3fmt6printfER11BasicWriterI4CharE15BasicCStringRefI4CharE7ArgList"],"fmt::sprintf":[0,2,1,"_CPPv2N3fmt7sprintfE10CStringRef7ArgList"],FMT_CAPTURE:[0,0,1,"c.FMT_CAPTURE"],FMT_VARIADIC:[0,0,1,"c.FMT_VARIADIC"]}},objnames:{"0":["c","macro","C macro"],"1":["cpp","class","C++ class"],"2":["cpp","function","C++ function"],"3":["cpp","type","C++ type"]},objtypes:{"0":"c:macro","1":"cpp:class","2":"cpp:function","3":"cpp:type"},terms:{"0000cafe":0,"0b101010":3,"0x2a":3,"0xcafe":0,"\u044e":2,"_format":[0,2],"boolean":3,"case":[0,2,3],"char":[0,2,3],"class":0,"const":[0,2],"default":[0,3],"final":3,"float":[0,2,3],"int":[0,3],"long":[0,2],"new":[0,3],"null":0,"public":0,"return":[0,2],"switch":3,"throw":[0,2],"true":[3,4],"void":0,"while":2,abov:[0,3],abra:[2,3],abracadabra:3,absent:3,accept:2,access:[0,3],across:2,add:[3,4],addit:3,after:3,align:[0,3],aligntypespec:0,all:[0,2,3],allow:[0,2,3],also:[0,2,3],altern:[2,3,4],although:[2,3],alwai:[2,3],amd64:2,android:1,ani:[0,3],answer:[0,2],anyth:3,appear:3,append:0,appli:2,appropri:[0,3],arbitrari:0,archiv:4,arg:[0,2],arg_id:3,argformatt:0,arglist:0,argvisitor:0,arrai:0,arraywrit:0,associ:0,assum:3,automat:[2,3],avail:[2,3,4],avoid:2,awar:3,base:[0,2,3],basic_str:0,basicargformatt:0,basicarraywrit:0,basiccstringref:0,basicformatt:0,basicmemorywrit:0,basicstringref:0,basicwrit:0,becaus:2,been:[2,4],befor:[3,4],begin:0,behavior:3,better:2,bin:[0,3],binari:3,bit:2,bool:0,boost:2,both:[2,3],brace:[0,3],breviti:0,brew:4,bring:[2,3],bsd:2,buffer:[0,2],build:1,build_shared_lib:4,built:[3,4],c_str:[0,2],cad:[2,3],call:0,can:[0,2,3,4],cannot:[0,2],capac:0,capacity_:0,captur:0,caught:2,caus:3,center:3,cerr:0,chang:0,char_trait:0,charact:[0,2,3],chartyp:0,choic:4,clang:2,clean:4,cmake:4,code:[0,2],colon:3,commerci:2,common:[0,3],compar:2,comparison:[2,3],compat:[0,2],compil:[0,2,4],comput:0,concaten:2,consid:3,consist:2,construct:[0,2],contain:[0,2,3],content:0,conveni:0,convers:3,convert:[0,3],copi:3,correspond:0,count:3,cppformat:[2,4],creat:[2,4],css:4,cstringref:0,curious:0,curli:3,current:[0,3,4],custom_format:0,customalloc:0,customargformatt:0,custommemorywrit:0,customstr:0,customvalu:0,cyril:2,dai:0,data:[0,3],day_:0,dbuild_shared_lib:4,decim:3,defin:[0,2,3],definit:0,depend:[0,2,3],describ:[0,3,4],descript:[0,2],destroi:0,detail:3,determin:3,differ:[0,3],digit:[0,3],direct:2,directli:0,directori:[0,4],dispatch:0,displai:3,doc:4,document:[0,1],doe:2,doesn:0,don:[0,2],doubl:[0,2,3],download:4,doxygen:4,dynam:[0,3],each:3,easier:2,either:3,elaps:0,element:0,els:[0,2],emul:2,enabl:3,end:0,ensur:2,environ:4,equival:[0,2,3],errno:[0,2],error_cod:0,escap:3,even:3,exampl:[0,1,2],except:[2,3],experiment:2,expon:3,extens:0,extern:2,fals:3,fast:2,featur:2,felt:2,ffffffd6:0,field:[0,3],file:[0,2,4],filenam:0,fill:[0,3],find:0,first:[3,4],fit:0,fix:[0,3],fmt:[0,2,3,4],fmt_:0,fmt_captur:0,fmt_variad:0,follow:[0,3,4],fopen:0,forc:3,form:[0,3],formal:3,format_spec:3,format_str:0,formaterror:2,formatspec:0,formerli:2,forti:2,fprintf:0,freeli:4,friend:[0,2],from:[0,2,3,4],fulli:2,func:0,gcc:2,gener:[0,2,3,4],get:3,getlasterror:0,git:4,github:2,give:2,given:[0,3],gnu:2,goe:2,goodby:2,grammar:3,grow:0,happi:2,have:[0,4],header:[0,2,4],hello:2,here:2,hex:[0,2,3],hexadecim:[2,3],hexu:0,hfile:0,hfile_error:0,highli:2,hold:[0,4],hole:2,homebrew:1,how:3,html:4,http:4,i386:2,icc:2,id_continu:3,id_start:3,ident:2,identifi:3,impl:0,implement:[0,2,3],implicitli:3,includ:[0,3,4],incomplet:2,increas:0,index:[0,3],indic:3,individu:3,inf:[2,3],infin:[2,3],inform:0,initi:0,insert:[2,3],instal:4,instead:[2,3],int_typ:3,integ:[0,2,3],integr:0,intel:2,intern:0,interpret:3,intformatspec:0,invok:4,iostream:2,just:3,keep:2,known:[0,2],languag:[0,1],larg:3,lead:3,least:0,left:[2,3],legaci:0,length:0,less:[3,4],letter:[0,2,3],librari:[0,1,2],licens:2,lifetim:0,lightweight:2,like:[0,2],line:[0,4],linux:2,list:[0,2],liter:[0,2,3],local:[2,3],localtim:0,loki:2,longlong:0,look:[0,2],lower:[0,3],lpofstruct:0,mac:[2,4],macro:0,made:2,madeup:0,magnitud:3,mai:[0,2,3],main:0,make:[0,2,4],makefil:4,manag:2,mani:3,maximum:[2,3],mean:3,memori:[0,2],memorywrit:[0,2],messag:[0,2],method:0,might:4,mind:2,mini:1,minimum:[2,3],minu:3,mkdir:4,month:0,month_:0,most:[0,3],move:0,msbuild:4,multipl:2,must:[2,3],myargvisitor:0,name:[0,2],namedarg:0,namespac:[0,2],nan:3,narrow:2,nativ:4,natur:2,ndk:1,need:[0,2,3,4],neg:[0,3],neither:2,nest:3,new_siz:0,next:3,nix:4,non:3,none:3,normal:3,notat:3,note:[2,3],noth:2,now:4,nullptr:0,number:[0,2,3],numer:[0,2,3],numeric_limit:2,object:[0,3],oct:[0,3],octal:3,of_read:0,offer:2,older:2,omit:[0,2,3],onc:4,onli:[2,3],open:[0,2],openfil:0,oper:[0,2],option:3,order:[2,3],org:4,other:[0,2,3,4],otherwis:2,out:[0,2],output:[0,2,3,4],overflow:2,overload:0,own:3,pad:[0,3],panic:[0,2],paramet:0,pars:0,part:0,particular:2,pass:0,path:4,pattern:0,perform:[2,3],permiss:2,pip:4,place:3,placement:2,platform:[0,2,4],plugin:4,pod:0,point:[0,2,3],pointer:[0,3],posit:[0,2,3],posix:0,possibl:[0,2],preced:3,precis:3,precompil:4,prefix:[0,3],presenc:3,present:3,prevent:2,previou:4,print:[0,2,3],print_error:0,process:0,produc:2,project:[2,4],protect:0,provid:[0,2,4],ptr_:0,python:[0,2,4],rang:4,rare:2,rather:2,recur:0,releas:4,remov:3,repeat:3,replac:[0,2,3],report:2,repositori:[2,4],repres:[0,2],represent:3,reserv:0,resid:0,resiz:0,respect:3,result:[0,2,3],returntyp:0,right:[0,2,3],round:3,run:4,runtim:0,runtime_error:0,safe:2,sai:2,same:[0,3],scientif:3,script:4,second:[0,3],section:[3,4],see:[0,3,4],self:2,separ:3,sequenc:3,set:[2,3,4],sever:[0,4],shalt:3,share:4,should:[3,4],show:3,shown:3,sign:3,signal:3,signatur:0,signific:3,similar:[0,2,3],simpl:3,singl:2,size:[0,3],size_t:0,slightli:2,sln:4,small:2,softwar:4,some:[0,3],sourc:2,space:[0,3],spec:0,specif:[0,1],specifi:[0,3],sprintf:[0,2],standard:[0,2,3],start:[3,4],stateless:2,stdafx:4,stderr:[0,2],stdout:[0,2],store:0,str:[0,2],stream:[0,2],strftime:0,string:[0,1,2],stringref:0,stringvalu:0,studio:4,subclass:0,subset:0,substitut:3,suffix:2,superclass:0,sure:0,surround:[0,3],syntax:[0,1,2],systemerror:0,take:0,target:4,templat:[0,2],term:3,termin:0,terser:2,test:[2,4],text:[0,3],textual:3,than:[2,3],thank:2,thei:[0,2,3],them:4,thi:[0,2,3,4],thing:2,thou:3,time_t:0,to_str:0,too:3,total:0,track:2,trail:3,translat:3,treat:3,two:2,type:[0,2,3],type_cod:0,typedef:0,typenam:0,typespec:0,typic:4,udlarg:0,udlformat:0,ulonglong:0,unchang:3,unicod:2,unknown:[0,2],unless:3,unlimit:2,unsign:0,updat:0,upper:[0,3],uppercas:3,usag:1,user:[0,2],usual:0,valid:[0,3],valu:[0,2,3],vari:0,variabl:[0,4],variad:[0,2],variou:3,vcproj:4,vector:0,virtual:0,virtualenv:4,visibl:2,visit:0,visit_any_doubl:0,visit_any_int:0,visit_bool:0,visit_char:0,visit_cstr:0,visit_custom:0,visit_doubl:0,visit_int:0,visit_long_doubl:0,visit_long_long:0,visit_point:0,visit_str:0,visit_uint:0,visit_ulong_long:0,visit_wstr:0,visitor:0,visual:[2,4],vs2013:2,vs2015:2,wai:0,warraywrit:0,wchar_t:0,wcstringref:0,well:3,what:2,when:[0,2,3],where:[0,2,4],whether:3,which:[2,3],whose:3,wide:[0,2,4],width:[0,3],window:[0,2,4],windowserror:0,within:3,wmemorywrit:0,word:3,work:[2,4],workflow:4,world:2,wrapper:2,writer:0,written:[0,2],wstringref:0,wwriter:0,www:4,x42e:2,xcode:4,xcodeproj:4,year:0,year_:0,you:[0,2,3,4],your:[2,4],zero:3},titles:["API Reference","Contents","Overview","Format String Syntax","Usage"],titleterms:{"function":0,alloc:0,android:4,api:[0,2],argument:0,build:4,content:1,custom:0,date:0,document:4,eas:2,error:0,exampl:3,format:[0,2,3],formatt:0,homebrew:4,languag:3,librari:4,mini:3,ndk:4,ostream:0,overview:2,portabl:2,printf:0,refer:0,safeti:2,specif:3,std:0,string:3,support:0,syntax:3,system:0,time:0,usag:4,util:0,write:[0,2]}}) \ No newline at end of file +Search.setIndex({envversion:49,filenames:["api","contents","index","syntax","usage"],objects:{"":{"fmt::ArgFormatter":[0,1,1,"_CPPv2N3fmt12ArgFormatterE"],"fmt::ArgFormatter::ArgFormatter":[0,2,1,"_CPPv2N3fmt12ArgFormatter12ArgFormatterER14BasicFormatterI4CharER10FormatSpecPK4Char"],"fmt::ArgList":[0,1,1,"_CPPv2N3fmt7ArgListE"],"fmt::ArgList::operator[]":[0,2,1,"_CPPv2NK3fmt7ArgListixEj"],"fmt::ArgVisitor":[0,1,1,"_CPPv2N3fmt10ArgVisitorE"],"fmt::ArgVisitor::visit":[0,2,1,"_CPPv2N3fmt10ArgVisitor5visitERK3Arg"],"fmt::ArgVisitor::visit_any_double":[0,2,1,"_CPPv2N3fmt10ArgVisitor16visit_any_doubleE1T"],"fmt::ArgVisitor::visit_any_int":[0,2,1,"_CPPv2N3fmt10ArgVisitor13visit_any_intE1T"],"fmt::ArgVisitor::visit_bool":[0,2,1,"_CPPv2N3fmt10ArgVisitor10visit_boolEb"],"fmt::ArgVisitor::visit_char":[0,2,1,"_CPPv2N3fmt10ArgVisitor10visit_charEi"],"fmt::ArgVisitor::visit_cstring":[0,2,1,"_CPPv2N3fmt10ArgVisitor13visit_cstringEPKc"],"fmt::ArgVisitor::visit_custom":[0,2,1,"_CPPv2N3fmt10ArgVisitor12visit_customEN3Arg11CustomValueE"],"fmt::ArgVisitor::visit_double":[0,2,1,"_CPPv2N3fmt10ArgVisitor12visit_doubleEd"],"fmt::ArgVisitor::visit_int":[0,2,1,"_CPPv2N3fmt10ArgVisitor9visit_intEi"],"fmt::ArgVisitor::visit_long_double":[0,2,1,"_CPPv2N3fmt10ArgVisitor17visit_long_doubleEe"],"fmt::ArgVisitor::visit_long_long":[0,2,1,"_CPPv2N3fmt10ArgVisitor15visit_long_longE8LongLong"],"fmt::ArgVisitor::visit_pointer":[0,2,1,"_CPPv2N3fmt10ArgVisitor13visit_pointerEPKv"],"fmt::ArgVisitor::visit_string":[0,2,1,"_CPPv2N3fmt10ArgVisitor12visit_stringEN3Arg11StringValueIcEE"],"fmt::ArgVisitor::visit_uint":[0,2,1,"_CPPv2N3fmt10ArgVisitor10visit_uintEj"],"fmt::ArgVisitor::visit_ulong_long":[0,2,1,"_CPPv2N3fmt10ArgVisitor16visit_ulong_longE9ULongLong"],"fmt::ArgVisitor::visit_wstring":[0,2,1,"_CPPv2N3fmt10ArgVisitor13visit_wstringEN3Arg11StringValueIwEE"],"fmt::BasicArgFormatter":[0,1,1,"_CPPv2N3fmt17BasicArgFormatterE"],"fmt::BasicArgFormatter::BasicArgFormatter":[0,2,1,"_CPPv2N3fmt17BasicArgFormatter17BasicArgFormatterER14BasicFormatterI4Char4ImplER4SpecPK4Char"],"fmt::BasicArgFormatter::visit_custom":[0,2,1,"_CPPv2N3fmt17BasicArgFormatter12visit_customEN8internal3Arg11CustomValueE"],"fmt::BasicArrayWriter":[0,1,1,"_CPPv2N3fmt16BasicArrayWriterE"],"fmt::BasicArrayWriter::BasicArrayWriter":[0,2,1,"_CPPv2N3fmt16BasicArrayWriter16BasicArrayWriterERASIZE_4Char"],"fmt::BasicCStringRef":[0,1,1,"_CPPv2N3fmt15BasicCStringRefE"],"fmt::BasicCStringRef::BasicCStringRef":[0,2,1,"_CPPv2N3fmt15BasicCStringRef15BasicCStringRefERKNSt12basic_stringI4CharNSt11char_traitsI4CharEE9AllocatorEE"],"fmt::BasicCStringRef::c_str":[0,2,1,"_CPPv2NK3fmt15BasicCStringRef5c_strEv"],"fmt::BasicContainerWriter":[0,1,1,"_CPPv2N3fmt20BasicContainerWriterE"],"fmt::BasicContainerWriter::BasicContainerWriter":[0,2,1,"_CPPv2N3fmt20BasicContainerWriter20BasicContainerWriterER9Container"],"fmt::BasicFormatter":[0,1,1,"_CPPv2N3fmt14BasicFormatterE"],"fmt::BasicFormatter::BasicFormatter":[0,2,1,"_CPPv2N3fmt14BasicFormatter14BasicFormatterERK7ArgListR11BasicWriterI4CharE"],"fmt::BasicFormatter::Char":[0,3,1,"_CPPv2N3fmt14BasicFormatter4CharE"],"fmt::BasicFormatter::format":[0,2,1,"_CPPv2N3fmt14BasicFormatter6formatERPK4CharRKN8internal3ArgE"],"fmt::BasicFormatter::writer":[0,2,1,"_CPPv2N3fmt14BasicFormatter6writerEv"],"fmt::BasicMemoryWriter":[0,1,1,"_CPPv2N3fmt17BasicMemoryWriterE"],"fmt::BasicMemoryWriter::BasicMemoryWriter":[0,2,1,"_CPPv2N3fmt17BasicMemoryWriter17BasicMemoryWriterERR17BasicMemoryWriter"],"fmt::BasicMemoryWriter::operator=":[0,2,1,"_CPPv2N3fmt17BasicMemoryWriteraSERR17BasicMemoryWriter"],"fmt::BasicPrintfArgFormatter":[0,1,1,"_CPPv2N3fmt23BasicPrintfArgFormatterE"],"fmt::BasicPrintfArgFormatter::BasicPrintfArgFormatter":[0,2,1,"_CPPv2N3fmt23BasicPrintfArgFormatter23BasicPrintfArgFormatterER11BasicWriterI4CharER4Spec"],"fmt::BasicPrintfArgFormatter::visit_bool":[0,2,1,"_CPPv2N3fmt23BasicPrintfArgFormatter10visit_boolEb"],"fmt::BasicPrintfArgFormatter::visit_char":[0,2,1,"_CPPv2N3fmt23BasicPrintfArgFormatter10visit_charEi"],"fmt::BasicPrintfArgFormatter::visit_cstring":[0,2,1,"_CPPv2N3fmt23BasicPrintfArgFormatter13visit_cstringEPKc"],"fmt::BasicPrintfArgFormatter::visit_custom":[0,2,1,"_CPPv2N3fmt23BasicPrintfArgFormatter12visit_customEN8internal3Arg11CustomValueE"],"fmt::BasicPrintfArgFormatter::visit_pointer":[0,2,1,"_CPPv2N3fmt23BasicPrintfArgFormatter13visit_pointerEPKv"],"fmt::BasicStringRef":[0,1,1,"_CPPv2N3fmt14BasicStringRefE"],"fmt::BasicStringRef::BasicStringRef":[0,2,1,"_CPPv2N3fmt14BasicStringRef14BasicStringRefERKNSt12basic_stringI4CharNSt11char_traitsI4CharEE9AllocatorEE"],"fmt::BasicStringRef::data":[0,2,1,"_CPPv2NK3fmt14BasicStringRef4dataEv"],"fmt::BasicStringRef::size":[0,2,1,"_CPPv2NK3fmt14BasicStringRef4sizeEv"],"fmt::BasicStringRef::to_string":[0,2,1,"_CPPv2NK3fmt14BasicStringRef9to_stringEv"],"fmt::BasicStringWriter":[0,1,1,"_CPPv2N3fmt17BasicStringWriterE"],"fmt::BasicStringWriter::BasicStringWriter":[0,2,1,"_CPPv2N3fmt17BasicStringWriter17BasicStringWriterERK9Allocator"],"fmt::BasicStringWriter::move_to":[0,2,1,"_CPPv2N3fmt17BasicStringWriter7move_toERNSt12basic_stringI4CharNSt11char_traitsI4CharEE9AllocatorEE"],"fmt::BasicWriter":[0,1,1,"_CPPv2N3fmt11BasicWriterE"],"fmt::BasicWriter::c_str":[0,2,1,"_CPPv2NK3fmt11BasicWriter5c_strEv"],"fmt::BasicWriter::data":[0,2,1,"_CPPv2NK3fmt11BasicWriter4dataEv"],"fmt::BasicWriter::operator<<":[0,2,1,"_CPPv2N3fmt11BasicWriterlsEe"],"fmt::BasicWriter::size":[0,2,1,"_CPPv2NK3fmt11BasicWriter4sizeEv"],"fmt::BasicWriter::str":[0,2,1,"_CPPv2NK3fmt11BasicWriter3strEv"],"fmt::BasicWriter::write":[0,2,1,"_CPPv2N3fmt11BasicWriter5writeE15BasicCStringRefI4CharE7ArgList"],"fmt::BasicWriter::~BasicWriter":[0,2,1,"_CPPv2N3fmt11BasicWriterD0Ev"],"fmt::Buffer":[0,1,1,"_CPPv2N3fmt6BufferE"],"fmt::Buffer::append":[0,2,1,"_CPPv2N3fmt6Buffer6appendEPK1UPK1U"],"fmt::Buffer::capacity":[0,2,1,"_CPPv2NK3fmt6Buffer8capacityEv"],"fmt::Buffer::grow":[0,2,1,"_CPPv2N3fmt6Buffer4growENSt6size_tE"],"fmt::Buffer::reserve":[0,2,1,"_CPPv2N3fmt6Buffer7reserveENSt6size_tE"],"fmt::Buffer::resize":[0,2,1,"_CPPv2N3fmt6Buffer6resizeENSt6size_tE"],"fmt::Buffer::size":[0,2,1,"_CPPv2NK3fmt6Buffer4sizeEv"],"fmt::PrintfArgFormatter":[0,1,1,"_CPPv2N3fmt18PrintfArgFormatterE"],"fmt::PrintfArgFormatter::PrintfArgFormatter":[0,2,1,"_CPPv2N3fmt18PrintfArgFormatter18PrintfArgFormatterER11BasicWriterI4CharER10FormatSpec"],"fmt::PrintfFormatter":[0,1,1,"_CPPv2N3fmt15PrintfFormatterE"],"fmt::PrintfFormatter::PrintfFormatter":[0,2,1,"_CPPv2N3fmt15PrintfFormatter15PrintfFormatterERK7ArgListR11BasicWriterI4CharE"],"fmt::PrintfFormatter::format":[0,2,1,"_CPPv2N3fmt15PrintfFormatter6formatE15BasicCStringRefI4CharE"],"fmt::SystemError":[0,1,1,"_CPPv2N3fmt11SystemErrorE"],"fmt::SystemError::SystemError":[0,2,1,"_CPPv2N3fmt11SystemError11SystemErrorEi10CStringRef"],"fmt::WindowsError":[0,1,1,"_CPPv2N3fmt12WindowsErrorE"],"fmt::WindowsError::WindowsError":[0,2,1,"_CPPv2N3fmt12WindowsError12WindowsErrorEi10CStringRef"],"fmt::arg":[0,2,1,"_CPPv2N3fmt3argE9StringRefRK1T"],"fmt::bin":[0,2,1,"_CPPv2N3fmt3binEi"],"fmt::format":[0,2,1,"_CPPv2N3fmt6formatE10CStringRef7ArgList"],"fmt::format_system_error":[0,2,1,"_CPPv2N3fmt19format_system_errorERN3fmt6WriterEiN3fmt9StringRefE"],"fmt::fprintf":[0,2,1,"_CPPv2N3fmt7fprintfERNSt7ostreamE10CStringRef7ArgList"],"fmt::hex":[0,2,1,"_CPPv2N3fmt3hexEi"],"fmt::hexu":[0,2,1,"_CPPv2N3fmt4hexuEi"],"fmt::oct":[0,2,1,"_CPPv2N3fmt3octEi"],"fmt::pad":[0,2,1,"_CPPv2N3fmt3padEij4Char"],"fmt::print":[0,2,1,"_CPPv2N3fmt5printERNSt7ostreamE10CStringRef7ArgList"],"fmt::printf":[0,2,1,"_CPPv2N3fmt6printfER7WWriter11WCStringRefDpRK4Args"],"fmt::sprintf":[0,2,1,"_CPPv2N3fmt7sprintfE10CStringRef7ArgList"],"fmt::to_string":[0,2,1,"_CPPv2N3fmt9to_stringERK1T"],FMT_CAPTURE:[0,0,1,"c.FMT_CAPTURE"],FMT_VARIADIC:[0,0,1,"c.FMT_VARIADIC"]}},objnames:{"0":["c","macro","C macro"],"1":["cpp","class","C++ class"],"2":["cpp","function","C++ function"],"3":["cpp","type","C++ type"]},objtypes:{"0":"c:macro","1":"cpp:class","2":"cpp:function","3":"cpp:type"},terms:{"0000cafe":0,"0b101010":3,"0x2a":3,"0xcafe":0,"\u044e":2,"_format":[0,2],"boolean":3,"case":[0,2,3],"char":[0,2,3],"class":0,"const":[0,2],"default":[0,3],"final":3,"float":[0,2,3],"function":[0,2,3],"int":[0,3],"long":[0,2],"new":[0,3],"null":0,"public":0,"return":[0,2],"switch":3,"throw":[0,2],"true":[3,4],"void":0,"while":2,abov:[0,3],abra:[2,3],abracadabra:3,absent:3,accept:2,access:[0,3],across:2,add:[3,4],add_subdirectori:4,addit:[0,3],advanc:0,after:3,against:4,align:[0,3],aligntypespec:0,all:[0,2,3,4],allow:[0,2,3],also:[0,2,3],altern:[2,3,4],although:[2,3],alwai:[0,2,3,4],amd64:2,android:1,ani:[0,3],answer:[0,2],anyth:3,appear:3,append:0,appli:2,appropri:[0,3],apt:4,arbitrari:0,archiv:4,arg:[0,2],arg_id:3,argformatt:0,argformatterbas:0,arglist:0,argvisitor:0,arrai:0,arraywrit:0,associ:0,assum:3,automat:[2,3],avail:[2,3,4],avoid:2,awar:3,base:[0,2,3],basic_str:0,basicargformatt:0,basicarraywrit:0,basiccontainerwrit:0,basiccstringref:0,basicformatt:0,basicmemorywrit:0,basicprintfargformatt:0,basicstringref:0,basicstringwrit:0,basicwrit:0,becaus:2,been:[2,4],befor:[3,4],begin:0,behavior:3,better:[0,2],bin:[0,3],binari:3,bit:2,bool:0,boost:2,both:[2,3,4],brace:[0,3],breviti:0,brew:4,bring:[2,3],bsd:2,buffer:[0,2],build:[0,1],build_shared_lib:4,built:[3,4],c_str:[0,2],cad:[2,3],call:[0,4],can:[0,2,3,4],cannot:[0,2],capac:0,capacity_:0,captur:0,caught:2,caus:3,center:3,cerr:0,certain:3,chang:0,char_trait:0,charact:[0,2,3],chartyp:0,choic:4,clang:2,clean:4,clear:0,close:0,cmake:1,cmakelist:4,code:[0,2],colon:3,commerci:2,common:[0,3],compar:2,comparison:[2,3],compat:[0,2],compil:[0,2,4],comput:0,concaten:2,consid:3,consist:2,construct:[0,2],constructor:0,contain:[0,2,3],content:0,conveni:0,convent:0,convers:3,convert:[0,3],copi:3,core:2,correspond:0,count:3,counterpart:0,cppformat:2,creat:[0,2,4],css:4,cstringref:0,curious:0,curli:3,current:[0,3,4],custom_format:0,customalloc:0,customargformatt:0,custommemorywrit:0,customstr:0,customvalu:0,cyril:2,dai:0,data:[0,3],day_:0,dbuild_shared_lib:4,decim:3,definit:0,depend:[0,2,3],describ:[0,3,4],descript:[0,2],dest:0,destroi:0,detail:3,determin:3,differ:[0,3],digit:[0,3],direct:[0,2],directli:0,directori:[0,4],dispatch:0,displai:3,doc:[0,4],document:[0,1],doe:[2,4],doesn:[0,4],don:[0,2],doubl:[0,2,3],download:4,doxygen:[0,4],doxygenfunct:0,doxyxml:0,dynam:[0,3],each:3,easier:2,either:3,elaps:0,element:0,els:[0,2],elsewher:0,emul:2,enabl:[3,4],end:0,ensur:[2,4],environ:4,equival:[2,3],errno:[0,2],error_cod:0,escap:3,even:[0,3],exampl:[0,1,2],except:[0,2,3],exclude_from_al:4,exist:4,exlud:4,experiment:2,expon:3,extens:0,extern:2,fals:3,fashion:4,fast:2,faster:0,featur:2,felt:2,ffffffd6:0,field:[0,3],file:[0,2,4],filenam:0,fill:[0,3],find:0,first:[3,4],fit:0,fix:[0,3],fmt:[0,2,3,4],fmt_:0,fmt_captur:0,fmt_variad:0,fmtlib:4,follow:[0,3,4],foo:4,foonathan:0,fopen:0,forc:3,form:[0,3],formal:3,format_arg:0,format_spec:3,format_str:0,format_system_error:0,formaterror:2,formatspec:0,formatterbas:0,formerli:2,forti:2,fprintf:0,freeli:4,friend:[0,2],from:[0,2,3,4],fulli:2,func:0,gcc:2,gener:[0,2,3,4],get:[0,3,4],getlasterror:0,git:4,github:2,give:2,given:[0,3],glibc:0,gnu:2,goe:2,goodby:2,grammar:3,grow:0,happi:2,have:[0,4],header:[0,1,2],hello:2,here:2,hex:[0,2,3],hexadecim:[2,3],hexu:0,hfile:0,hfile_error:0,highli:2,hold:[0,4],hole:2,home:0,homebrew:1,how:[0,3],html:4,http:4,i386:2,icc:2,id_continu:3,id_start:3,ident:2,identifi:3,ignor:0,impl:0,implement:[0,2,3],implicitli:3,includ:[0,3,4],incomplet:2,increas:0,index:0,indic:3,individu:3,inf:[2,3],infin:[2,3],inform:0,inherit:0,initi:0,insert:[2,3],instal:4,instead:[2,3,4],int_typ:3,integ:[0,2,3],integr:0,intel:2,intern:0,interpret:3,intformatspec:0,invok:4,iostream:[0,2],just:3,keep:2,known:[0,2],languag:[0,1],larg:3,larger:0,lead:3,least:0,left:[2,3],legaci:0,length:0,less:[3,4],letter:[0,2,3],librari:[0,1,2],licens:2,lifetim:0,lightweight:2,like:[0,2,4],line:[0,4],link:4,linux:2,list:[0,2],liter:[0,2,3],local:[2,3],localtim:0,loki:2,longlong:0,look:[0,2],lower:[0,3],lpofstruct:0,mac:[2,4],macro:0,made:2,madeup:0,magnitud:3,mai:[0,2,3],main:[0,4],make:[0,2,4],makefil:4,manag:2,mani:3,match:0,maximum:[2,3],mean:3,memori:[0,2],memorybuff:0,memorywrit:[0,2],messag:[0,2],method:0,might:4,mind:2,mini:1,minimum:[2,3],minu:3,mkdir:4,modifi:4,month:0,month_:0,most:[0,3],move:0,move_to:0,msbuild:4,multipl:2,must:[2,3],myargvisitor:0,mystruct:0,name:[0,2],namedargwithtyp:0,namespac:[0,2],nan:3,narrow:2,nativ:4,natur:2,ndk:1,need:[0,2,3,4],neg:[0,3],neither:2,nest:3,new_siz:0,next:[0,3],nix:4,non:3,none:3,normal:3,notat:3,note:[0,2,3],noth:2,now:4,npm:4,nullptr:0,number:[0,2,3],numer:[0,2,3],numeric_limit:2,object:[0,3],oct:[0,3],octal:3,of_read:0,offer:2,older:2,omit:[0,2,3],onc:4,onli:[1,2,3],open:[0,2],openfil:0,oper:[0,2],option:3,order:[2,3,4],org:4,other:[0,2,3,4],otherwis:2,out:[0,2],output:[0,2,3,4],overflow:2,overload:0,own:3,packag:4,pad:[0,3],panic:[0,2],paramet:0,pars:0,part:0,particular:2,pass:0,path:4,pattern:0,perform:[0,2],permiss:2,pip:4,place:3,placement:2,platform:[0,2,4],plugin:4,pod:0,point:[0,2,3],pointer:[0,3],posit:[0,2,3],posix:0,possibl:[0,2],preced:3,precis:3,precompil:4,prefix:[0,3],presenc:3,present:3,prevent:2,previou:[0,4],print:[0,2,3],print_error:0,printfargformatt:0,printfformatt:0,privat:4,process:0,produc:2,program:0,project:[0,2,4],protect:0,provid:[0,2,4],ptr_:0,python:[0,2,4],rang:4,rare:2,rather:2,read:4,recur:0,releas:4,remov:3,repeat:3,replac:[0,2,3],report:2,repositori:[2,4],repres:[0,2],represent:3,reserv:0,resid:0,resiz:0,respect:3,result:[0,2,3],returntyp:0,right:[0,2,3],round:3,run:4,runtim:0,runtime_error:0,runtimeerror:0,safe:[0,2],sai:2,same:[0,3],scientif:3,script:4,second:[0,3],section:[0,3,4],see:[0,3,4],self:2,separ:3,sequenc:3,set:[2,3,4],sever:[0,4],shalt:3,share:4,should:[3,4],show:[0,3],shown:3,sign:3,signal:3,signatur:0,signific:3,similar:[0,2,3],similarli:0,simpl:3,singl:2,size:[0,3],size_t:0,slightli:2,sln:4,small:2,softwar:4,some:[0,3],sourc:2,space:[0,3],spec:0,specif:[0,1],specifi:[0,3],speed:0,sprintf:[0,2],standard:[0,2,3],start:[3,4],stateless:2,stdafx:4,stderr:[0,2],stdout:[0,2],store:0,str:[0,2],stream:[0,2],strftime:0,string:[0,1,2],stringref:0,stringvalu:0,stringwrit:0,struct:0,structur:0,studio:4,subclass:0,subset:0,sudo:4,suffix:2,superclass:0,sure:0,surround:[0,3],syntax:[0,1,2],systemerror:0,take:0,target:4,target_link_librari:4,templat:[0,2],term:3,termin:0,terser:2,test:[2,4],text:[0,3],textual:3,than:[0,2,3],thank:2,thei:[0,2,3],them:4,thi:[0,2,3,4],thing:2,thou:3,time_t:0,to_str:0,too:3,total:0,track:2,trail:3,translat:3,treat:3,two:2,txt:4,type_cod:0,typedef:0,typenam:0,typespec:0,typic:4,ubuntu:4,ulonglong:0,unchang:3,unicod:2,unknown:[0,2],unless:3,unlik:0,unlimit:2,unsign:0,updat:0,upper:[0,3],uppercas:3,usag:1,usual:0,valid:[0,3],valu:[0,2,3],value_typ:0,vari:0,variabl:[0,4],variad:[0,2],variou:3,vcproj:4,vecformat:0,vector:0,virtual:0,virtualenv:4,visibl:2,visit:0,visit_any_doubl:0,visit_any_int:0,visit_bool:0,visit_char:0,visit_cstr:0,visit_custom:0,visit_doubl:0,visit_int:0,visit_long_doubl:0,visit_long_long:0,visit_point:0,visit_str:0,visit_uint:0,visit_ulong_long:0,visit_wstr:0,visitor:0,visual:[2,4],vs2013:2,vs2015:2,wai:0,warraywrit:0,wchar_t:0,wcstringref:0,well:3,what:2,when:[0,2,3],where:[0,2,4],whether:3,which:[0,2,3,4],whose:3,wide:[0,2,4],width:[0,3],window:[0,2,4],windowserror:0,within:3,wmemorywrit:0,word:3,work:[2,4],workflow:4,world:2,would:4,wrapper:2,writer:0,written:[0,2],wstringref:0,wstringwrit:0,wwriter:0,www:4,x42e:2,xcode:4,xcodeproj:4,xml:0,year:0,year_:0,you:[0,2,3,4],your:[2,4],zero:3},titles:["API Reference","Contents","Overview","Format String Syntax","Usage"],titleterms:{alloc:0,android:4,api:[0,2],argument:0,build:4,cmake:4,content:1,custom:0,date:0,defin:0,document:4,eas:2,error:0,exampl:3,format:[0,2,3],formatt:0,header:4,homebrew:4,languag:3,librari:4,mini:3,ndk:4,onli:4,ostream:0,overview:2,portabl:2,printf:0,refer:0,safeti:2,specif:3,std:0,string:3,support:0,syntax:3,system:0,time:0,type:0,usag:4,user:0,util:0,write:[0,2]}}) \ No newline at end of file diff --git a/libs/format/doc/html/syntax.html b/libs/format/doc/html/syntax.html index ded1e98dc..55ec80507 100644 --- a/libs/format/doc/html/syntax.html +++ b/libs/format/doc/html/syntax.html @@ -8,7 +8,7 @@ - Format String Syntax — fmt 3.0.0 documentation + Format String Syntax — fmt 4.0.0 documentation @@ -17,10 +17,11 @@ @@ -34,8 +35,9 @@ diff --git a/libs/format/doc/html/usage.html b/libs/format/doc/html/usage.html index b2c90f581..12d59bf21 100644 --- a/libs/format/doc/html/usage.html +++ b/libs/format/doc/html/usage.html @@ -8,7 +8,7 @@ - Usage — fmt 3.0.0 documentation + Usage — fmt 4.0.0 documentation @@ -17,10 +17,11 @@ @@ -35,8 +36,9 @@ diff --git a/libs/format/doc/index.rst b/libs/format/doc/index.rst index 4e17d4b54..ce9b7bf94 100644 --- a/libs/format/doc/index.rst +++ b/libs/format/doc/index.rst @@ -10,9 +10,9 @@ alternative to C++ IOStreams.

What users say:
- Thanks for creating this library. It’s been a hole in C++ for a long time. - I’ve used both boost::format and loki::SPrintf, and neither felt like the - right answer. This does. + Thanks for creating this library. It’s been a hole in C++ for a long + time. I’ve used both boost::format and loki::SPrintf, and neither felt + like the right answer. This does.
@@ -24,8 +24,8 @@ Format API The replacement-based Format API provides a safe alternative to ``printf``, ``sprintf`` and friends with comparable or `better performance `_. -The `format string syntax `_ is similar -to the one used by `str.format `_ +The `format string syntax `_ is similar to the one used by +`str.format `_ in Python: .. code:: c++ @@ -98,8 +98,8 @@ literal operators, they must be made visible with the directive Write API --------- -The concatenation-based Write API (experimental) provides a -`fast `_ +The concatenation-based Write API (experimental) provides a `fast +`_ stateless alternative to IOStreams: .. code:: c++ @@ -112,8 +112,9 @@ stateless alternative to IOStreams: Safety ------ -The library is fully type safe, automatic memory management prevents buffer overflow, -errors in format strings are reported using exceptions. For example, the code +The library is fully type safe, automatic memory management prevents buffer +overflow, errors in format strings are reported using exceptions. For example, +the code .. code:: c++ @@ -138,19 +139,21 @@ formatted into a narrow string. You can use a wide format string instead: fmt::format(L"Cyrillic letter {}", L'\x42e'); For comparison, writing a wide character to ``std::ostream`` results in -its numeric value being written to the stream (i.e. 1070 instead of letter 'ÑŽ' which -is represented by ``L'\x42e'`` if we use Unicode) which is rarely what is needed. +its numeric value being written to the stream (i.e. 1070 instead of letter 'ÑŽ' +which is represented by ``L'\x42e'`` if we use Unicode) which is rarely what is +needed. .. _portability: Portability ----------- -The library is highly portable. Here is an incomplete list of operating systems and -compilers where it has been tested and known to work: +The library is highly portable. Here is an incomplete list of operating systems +and compilers where it has been tested and known to work: -* 64-bit (amd64) GNU/Linux with GCC 4.4.3, `4.6.3 `_, - 4.7.2, 4.8.1 and Intel C++ Compiler (ICC) 14.0.2 +* 64-bit (amd64) GNU/Linux with GCC 4.4.3, + `4.6.3 `_, 4.7.2, 4.8.1, and Intel C++ + Compiler (ICC) 14.0.2 * 32-bit (i386) GNU/Linux with GCC 4.4.3, 4.6.3 @@ -161,21 +164,21 @@ compilers where it has been tested and known to work: * 32-bit Windows with Visual C++ 2010 -Although the library uses C++11 features when available, it also works with older -compilers and standard library implementations. The only thing to keep in mind -for C++98 portability: +Although the library uses C++11 features when available, it also works with +older compilers and standard library implementations. The only thing to keep in +mind for C++98 portability: * Variadic templates: minimum GCC 4.4, Clang 2.9 or VS2013. This feature allows - the Format API to accept an unlimited number of arguments. With older compilers - the maximum is 15. + the Format API to accept an unlimited number of arguments. With older + compilers the maximum is 15. -* User-defined literals: minimum GCC 4.7, Clang 3.1 or VS2015. The suffixes - ``_format`` and ``_a`` are functionally equivalent to the functions +* User-defined literals: minimum GCC 4.7, Clang 3.1 or VS2015. The suffixes + ``_format`` and ``_a`` are functionally equivalent to the functions ``fmt::format`` and ``fmt::arg``. -The output of all formatting functions is consistent across platforms. In particular, -formatting a floating-point infinity always gives ``inf`` while the output -of ``printf`` is platform-dependent in this case. For example, +The output of all formatting functions is consistent across platforms. In +particular, formatting a floating-point infinity always gives ``inf`` while the +output of ``printf`` is platform-dependent in this case. For example, .. code:: @@ -188,10 +191,10 @@ always prints ``inf``. Ease of Use ----------- -fmt has a small self-contained code base consisting of a single header file -and a single source file and no external dependencies. A permissive BSD `license -`_ allows using the library both -in open-source and commercial projects. +fmt has a small self-contained code base with the core library consisting of +a single header file and a single source file and no external dependencies. +A permissive BSD `license `_ allows +using the library both in open-source and commercial projects. .. raw:: html diff --git a/libs/format/doc/syntax.rst b/libs/format/doc/syntax.rst index feda3e44d..1051467a0 100644 --- a/libs/format/doc/syntax.rst +++ b/libs/format/doc/syntax.rst @@ -49,12 +49,10 @@ mini-language" or interpretation of the *format_spec*. Most built-in types support a common formatting mini-language, which is described in the next section. -A *format_spec* field can also include nested replacement fields within it. -These nested replacement fields can contain only an argument index; -format specifications are not allowed. Formatting is performed as if the -replacement fields within the format_spec are substituted before the -*format_spec* string is interpreted. This allows the formatting of a value -to be dynamically specified. +A *format_spec* field can also include nested replacement fields in certain +positions within it. These nested replacement fields can contain only an +argument id; format specifications are not allowed. This allows the +formatting of a value to be dynamically specified. See the :ref:`formatexamples` section for some examples. @@ -80,8 +78,8 @@ The general form of a *standard format specifier* is: sign: "+" | "-" | " " width: `integer` | "{" `arg_id` "}" precision: `integer` | "{" `arg_id` "}" - type: `int_type` | "c" | "e" | "E" | "f" | "F" | "g" | "G" | "p" | "s" - int_type: "b" | "B" | "d" | "o" | "x" | "X" + type: `int_type` | "a" | "A" | "c" | "e" | "E" | "f" | "F" | "g" | "G" | "p" | "s" + int_type: "b" | "B" | "d" | "n" | "o" | "x" | "X" The *fill* character can be any character other than '{' or '}'. The presence of a fill character is signaled by the character following it, which must be @@ -234,7 +232,7 @@ The available presentation types for floating-point values are: +=========+==========================================================+ | ``'a'`` | Hexadecimal floating point format. Prints the number in | | | base 16 with prefix ``"0x"`` and lower-case letters for | -| | digits above 9. Uses 'p' to indicate the exponent. | +| | digits above 9. Uses ``'p'`` to indicate the exponent. | +---------+----------------------------------------------------------+ | ``'A'`` | Same as ``'a'`` except it uses upper-case letters for | | | the prefix, digits above 9 and to indicate the exponent. | diff --git a/libs/format/doc/usage.rst b/libs/format/doc/usage.rst index 27d96edec..dff312dfa 100644 --- a/libs/format/doc/usage.rst +++ b/libs/format/doc/usage.rst @@ -54,6 +54,23 @@ To build a `shared library`__ set the ``BUILD_SHARED_LIBS`` CMake variable to __ http://en.wikipedia.org/wiki/Library_%28computing%29#Shared_libraries +Header-only usage with CMake +============================ + +In order to add ``fmtlib`` into an existing ``CMakeLists.txt`` file, you can add the ``fmt`` library directory into your main project, which will enable the ``fmt`` library:: + + add_subdirectory(fmt) + +If you have a project called ``foo`` that you would like to link against the fmt library in a header-only fashion, you can enable with with:: + + target_link_libraries(foo PRIVATE fmt::fmt-header-only) + +And then to ensure that the ``fmt`` library does not always get built, you can modify the call to ``add_subdirectory`` to read :: + + add_subdirectory(fmt EXCLUDE_FROM_ALL) + +This will ensure that the ``fmt`` library is exluded from calls to ``make``, ``make all``, or ``cmake --build .``. + Building the documentation ========================== @@ -62,7 +79,11 @@ system: * `Python `_ with pip and virtualenv * `Doxygen `_ -* `Less `_ with less-plugin-clean-css +* `Less `_ with ``less-plugin-clean-css``. + Ubuntu doesn't package the ``clean-css`` plugin so you should use ``npm`` + instead of ``apt`` to install both ``less`` and the plugin:: + + sudo npm install -g less less-plugin-clean-css. First generate makefiles or project files using CMake as described in the previous section. Then compile the ``doc`` target/project, for example:: @@ -87,4 +108,4 @@ Homebrew fmt can be installed on OS X using `Homebrew `_:: - brew install cppformat + brew install fmt diff --git a/libs/format/fmt/CMakeLists.txt b/libs/format/fmt/CMakeLists.txt index 3fc872622..90eaf575f 100644 --- a/libs/format/fmt/CMakeLists.txt +++ b/libs/format/fmt/CMakeLists.txt @@ -1,26 +1,52 @@ # Define the fmt library, its includes and the needed defines. -# format.cc is added to FMT_HEADERS for the header-only configuration. -set(FMT_HEADERS format.h format.cc ostream.h ostream.cc time.h) +# *.cc are added to FMT_HEADERS for the header-only configuration. +set(FMT_HEADERS container.h format.h format.cc ostream.h ostream.cc printf.h + printf.cc string.h time.h) if (HAVE_OPEN) set(FMT_HEADERS ${FMT_HEADERS} posix.h) set(FMT_SOURCES ${FMT_SOURCES} posix.cc) endif () -add_library(fmt ${FMT_SOURCES} ${FMT_HEADERS} ../ChangeLog.rst) +add_library(fmt ${FMT_SOURCES} ${FMT_HEADERS} ../README.rst ../ChangeLog.rst) +add_library(fmt::fmt ALIAS fmt) -option(FMT_CPPFORMAT "Build cppformat library for backward compatibility." OFF) -if (FMT_CPPFORMAT) - message(WARNING "The cppformat library is deprecated, use fmt instead.") - add_library(cppformat ${FMT_SOURCES} ${FMT_HEADERS}) +# Starting with cmake 3.1 the CXX_STANDARD property can be used instead. +# Note: Don't make -std=c++11 public or interface, since it breaks projects +# that use C++14. +target_compile_options(fmt PRIVATE ${CPP11_FLAG}) +if (FMT_PEDANTIC) + target_compile_options(fmt PRIVATE ${PEDANTIC_COMPILE_FLAGS}) endif () -include_directories(fmt INTERFACE +target_include_directories(fmt PUBLIC $ $) set_target_properties(fmt PROPERTIES VERSION ${FMT_VERSION} SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}) +if (BUILD_SHARED_LIBS) + if (UNIX AND NOT APPLE) + # Fix rpmlint warning: + # unused-direct-shlib-dependency /usr/lib/libformat.so.1.1.0 /lib/libm.so.6. + target_link_libraries(fmt -Wl,--as-needed) + endif () + target_compile_definitions(fmt PRIVATE FMT_EXPORT INTERFACE FMT_SHARED) +endif () + +#------------------------------------------------------------------------------ +# additionally define a header only library when cmake is new enough +if (CMAKE_VERSION VERSION_GREATER 3.1.0 OR CMAKE_VERSION VERSION_EQUAL 3.1.0) + add_library(fmt-header-only INTERFACE) + add_library(fmt::fmt-header-only ALIAS fmt-header-only) + + target_compile_definitions(fmt-header-only INTERFACE FMT_HEADER_ONLY=1) + + target_include_directories(fmt-header-only INTERFACE + $ + $) +endif () + # Install targets. if (FMT_INSTALL) include(CMakePackageConfigHelpers) @@ -47,18 +73,18 @@ if (FMT_INSTALL) ${PROJECT_SOURCE_DIR}/support/cmake/fmt-config.cmake.in ${project_config} INSTALL_DESTINATION ${FMT_CMAKE_DIR}) - export(TARGETS ${INSTALL_TARGETS} FILE ${PROJECT_BINARY_DIR}/${targets_export_name}.cmake) + export(TARGETS ${INSTALL_TARGETS} NAMESPACE fmt:: + FILE ${PROJECT_BINARY_DIR}/${targets_export_name}.cmake) # Install version, config and target files. install( FILES ${project_config} ${version_config} DESTINATION ${FMT_CMAKE_DIR}) - install(EXPORT ${targets_export_name} DESTINATION ${FMT_CMAKE_DIR}) + install(EXPORT ${targets_export_name} DESTINATION ${FMT_CMAKE_DIR} + NAMESPACE fmt::) # Install the library and headers. - install(TARGETS ${INSTALL_TARGETS} EXPORT ${targets_export_name} DESTINATION ${FMT_LIB_DIR}) + install(TARGETS ${INSTALL_TARGETS} EXPORT ${targets_export_name} + DESTINATION ${FMT_LIB_DIR}) install(FILES ${FMT_HEADERS} DESTINATION include/fmt) - if (FMT_CPPFORMAT) - install(TARGETS cppformat DESTINATION ${FMT_LIB_DIR}) - endif () endif () diff --git a/libs/format/fmt/format.cc b/libs/format/fmt/format.cc index ae5d11034..09d2ea9fd 100644 --- a/libs/format/fmt/format.cc +++ b/libs/format/fmt/format.cc @@ -41,6 +41,9 @@ #endif #if FMT_USE_WINDOWS_H +# if !defined(FMT_HEADER_ONLY) && !defined(WIN32_LEAN_AND_MEAN) +# define WIN32_LEAN_AND_MEAN +# endif # if defined(NOMINMAX) || defined(FMT_WIN_MINMAX) # include # else @@ -50,8 +53,6 @@ # endif #endif -using fmt::internal::Arg; - #if FMT_EXCEPTIONS # define FMT_TRY try # define FMT_CATCH(x) catch (x) @@ -79,6 +80,11 @@ static inline fmt::internal::Null<> strerror_s(char *, std::size_t, ...) { } namespace fmt { + +FMT_FUNC internal::RuntimeError::~RuntimeError() FMT_DTOR_NOEXCEPT {} +FMT_FUNC FormatError::~FormatError() FMT_DTOR_NOEXCEPT {} +FMT_FUNC SystemError::~SystemError() FMT_DTOR_NOEXCEPT {} + namespace { #ifndef _MSC_VER @@ -100,27 +106,6 @@ inline int fmt_snprintf(char *buffer, size_t size, const char *format, ...) { # define FMT_SWPRINTF swprintf #endif // defined(_WIN32) && defined(__MINGW32__) && !defined(__NO_ISOCEXT) -// Checks if a value fits in int - used to avoid warnings about comparing -// signed and unsigned integers. -template -struct IntChecker { - template - static bool fits_in_int(T value) { - unsigned max = INT_MAX; - return value <= max; - } - static bool fits_in_int(bool) { return true; } -}; - -template <> -struct IntChecker { - template - static bool fits_in_int(T value) { - return value >= INT_MIN && value <= INT_MAX; - } - static bool fits_in_int(int) { return true; } -}; - const char RESET_COLOR[] = "\x1b[0m"; typedef void (*FormatFunc)(Writer &, int, StringRef); @@ -186,7 +171,8 @@ int safe_strerror( : error_code_(err_code), buffer_(buf), buffer_size_(buf_size) {} int run() { - strerror_r(0, 0, ""); // Suppress a warning about unused strerror_r. + // Suppress a warning about unused strerror_r. + strerror_r(0, FMT_NULL, ""); return handle(strerror_r(error_code_, buffer_, buffer_size_)); } }; @@ -225,222 +211,19 @@ void report_error(FormatFunc func, int error_code, std::fwrite(full_message.data(), full_message.size(), 1, stderr); std::fputc('\n', stderr); } - -// IsZeroInt::visit(arg) returns true iff arg is a zero integer. -class IsZeroInt : public ArgVisitor { - public: - template - bool visit_any_int(T value) { return value == 0; } -}; - -// Checks if an argument is a valid printf width specifier and sets -// left alignment if it is negative. -class WidthHandler : public ArgVisitor { - private: - FormatSpec &spec_; - - FMT_DISALLOW_COPY_AND_ASSIGN(WidthHandler); - - public: - explicit WidthHandler(FormatSpec &spec) : spec_(spec) {} - - void report_unhandled_arg() { - FMT_THROW(FormatError("width is not integer")); - } - - template - unsigned visit_any_int(T value) { - typedef typename internal::IntTraits::MainType UnsignedType; - UnsignedType width = static_cast(value); - if (internal::is_negative(value)) { - spec_.align_ = ALIGN_LEFT; - width = 0 - width; - } - if (width > INT_MAX) - FMT_THROW(FormatError("number is too big")); - return static_cast(width); - } -}; - -class PrecisionHandler : public ArgVisitor { - public: - void report_unhandled_arg() { - FMT_THROW(FormatError("precision is not integer")); - } - - template - int visit_any_int(T value) { - if (!IntChecker::is_signed>::fits_in_int(value)) - FMT_THROW(FormatError("number is too big")); - return static_cast(value); - } -}; - -template -struct is_same { - enum { value = 0 }; -}; - -template -struct is_same { - enum { value = 1 }; -}; - -// An argument visitor that converts an integer argument to T for printf, -// if T is an integral type. If T is void, the argument is converted to -// corresponding signed or unsigned type depending on the type specifier: -// 'd' and 'i' - signed, other - unsigned) -template -class ArgConverter : public ArgVisitor, void> { - private: - internal::Arg &arg_; - wchar_t type_; - - FMT_DISALLOW_COPY_AND_ASSIGN(ArgConverter); - - public: - ArgConverter(internal::Arg &arg, wchar_t type) - : arg_(arg), type_(type) {} - - void visit_bool(bool value) { - if (type_ != 's') - visit_any_int(value); - } - - template - void visit_any_int(U value) { - bool is_signed = type_ == 'd' || type_ == 'i'; - using internal::Arg; - typedef typename internal::Conditional< - is_same::value, U, T>::type TargetType; - if (sizeof(TargetType) <= sizeof(int)) { - // Extra casts are used to silence warnings. - if (is_signed) { - arg_.type = Arg::INT; - arg_.int_value = static_cast(static_cast(value)); - } else { - arg_.type = Arg::UINT; - typedef typename internal::MakeUnsigned::Type Unsigned; - arg_.uint_value = static_cast(static_cast(value)); - } - } else { - if (is_signed) { - arg_.type = Arg::LONG_LONG; - // glibc's printf doesn't sign extend arguments of smaller types: - // std::printf("%lld", -42); // prints "4294967254" - // but we don't have to do the same because it's a UB. - arg_.long_long_value = static_cast(value); - } else { - arg_.type = Arg::ULONG_LONG; - arg_.ulong_long_value = - static_cast::Type>(value); - } - } - } -}; - -// Converts an integer argument to char for printf. -class CharConverter : public ArgVisitor { - private: - internal::Arg &arg_; - - FMT_DISALLOW_COPY_AND_ASSIGN(CharConverter); - - public: - explicit CharConverter(internal::Arg &arg) : arg_(arg) {} - - template - void visit_any_int(T value) { - arg_.type = internal::Arg::CHAR; - arg_.int_value = static_cast(value); - } -}; } // namespace -namespace internal { - -template -class PrintfArgFormatter : - public ArgFormatterBase, Char> { - - void write_null_pointer() { - this->spec().type_ = 0; - this->write("(nil)"); - } - - typedef ArgFormatterBase, Char> Base; - - public: - PrintfArgFormatter(BasicWriter &w, FormatSpec &s) - : ArgFormatterBase, Char>(w, s) {} - - void visit_bool(bool value) { - FormatSpec &fmt_spec = this->spec(); - if (fmt_spec.type_ != 's') - return this->visit_any_int(value); - fmt_spec.type_ = 0; - this->write(value); - } - - void visit_char(int value) { - const FormatSpec &fmt_spec = this->spec(); - BasicWriter &w = this->writer(); - if (fmt_spec.type_ && fmt_spec.type_ != 'c') - w.write_int(value, fmt_spec); - typedef typename BasicWriter::CharPtr CharPtr; - CharPtr out = CharPtr(); - if (fmt_spec.width_ > 1) { - Char fill = ' '; - out = w.grow_buffer(fmt_spec.width_); - if (fmt_spec.align_ != ALIGN_LEFT) { - std::fill_n(out, fmt_spec.width_ - 1, fill); - out += fmt_spec.width_ - 1; - } else { - std::fill_n(out + 1, fmt_spec.width_ - 1, fill); - } - } else { - out = w.grow_buffer(1); - } - *out = static_cast(value); - } - - void visit_cstring(const char *value) { - if (value) - Base::visit_cstring(value); - else if (this->spec().type_ == 'p') - write_null_pointer(); - else - this->write("(null)"); - } - - void visit_pointer(const void *value) { - if (value) - return Base::visit_pointer(value); - this->spec().type_ = 0; - write_null_pointer(); - } - - void visit_custom(Arg::CustomValue c) { - BasicFormatter formatter(ArgList(), this->writer()); - const Char format_str[] = {'}', 0}; - const Char *format = format_str; - c.format(&formatter, c.value, &format); - } -}; -} // namespace internal -} // namespace fmt - -FMT_FUNC void fmt::SystemError::init( +FMT_FUNC void SystemError::init( int err_code, CStringRef format_str, ArgList args) { error_code_ = err_code; MemoryWriter w; - internal::format_system_error(w, err_code, format(format_str, args)); + format_system_error(w, err_code, format(format_str, args)); std::runtime_error &base = *this; base = std::runtime_error(w.str()); } template -int fmt::internal::CharTraits::format_float( +int internal::CharTraits::format_float( char *buffer, std::size_t size, const char *format, unsigned width, int precision, T value) { if (width == 0) { @@ -454,7 +237,7 @@ int fmt::internal::CharTraits::format_float( } template -int fmt::internal::CharTraits::format_float( +int internal::CharTraits::format_float( wchar_t *buffer, std::size_t size, const wchar_t *format, unsigned width, int precision, T value) { if (width == 0) { @@ -468,7 +251,7 @@ int fmt::internal::CharTraits::format_float( } template -const char fmt::internal::BasicData::DIGITS[] = +const char internal::BasicData::DIGITS[] = "0001020304050607080910111213141516171819" "2021222324252627282930313233343536373839" "4041424344454647484950515253545556575859" @@ -487,40 +270,40 @@ const char fmt::internal::BasicData::DIGITS[] = factor * 1000000000 template -const uint32_t fmt::internal::BasicData::POWERS_OF_10_32[] = { +const uint32_t internal::BasicData::POWERS_OF_10_32[] = { 0, FMT_POWERS_OF_10(1) }; template -const uint64_t fmt::internal::BasicData::POWERS_OF_10_64[] = { +const uint64_t internal::BasicData::POWERS_OF_10_64[] = { 0, FMT_POWERS_OF_10(1), - FMT_POWERS_OF_10(fmt::ULongLong(1000000000)), + FMT_POWERS_OF_10(ULongLong(1000000000)), // Multiply several constants instead of using a single long long constant // to avoid warnings about C++98 not supporting long long. - fmt::ULongLong(1000000000) * fmt::ULongLong(1000000000) * 10 + ULongLong(1000000000) * ULongLong(1000000000) * 10 }; -FMT_FUNC void fmt::internal::report_unknown_type(char code, const char *type) { +FMT_FUNC void internal::report_unknown_type(char code, const char *type) { (void)type; if (std::isprint(static_cast(code))) { - FMT_THROW(fmt::FormatError( - fmt::format("unknown format code '{}' for {}", code, type))); + FMT_THROW(FormatError( + format("unknown format code '{}' for {}", code, type))); } - FMT_THROW(fmt::FormatError( - fmt::format("unknown format code '\\x{:02x}' for {}", + FMT_THROW(FormatError( + format("unknown format code '\\x{:02x}' for {}", static_cast(code), type))); } #if FMT_USE_WINDOWS_H -FMT_FUNC fmt::internal::UTF8ToUTF16::UTF8ToUTF16(fmt::StringRef s) { +FMT_FUNC internal::UTF8ToUTF16::UTF8ToUTF16(StringRef s) { static const char ERROR_MSG[] = "cannot convert string from UTF-8 to UTF-16"; if (s.size() > INT_MAX) FMT_THROW(WindowsError(ERROR_INVALID_PARAMETER, ERROR_MSG)); int s_size = static_cast(s.size()); int length = MultiByteToWideChar( - CP_UTF8, MB_ERR_INVALID_CHARS, s.data(), s_size, 0, 0); + CP_UTF8, MB_ERR_INVALID_CHARS, s.data(), s_size, FMT_NULL, 0); if (length == 0) FMT_THROW(WindowsError(GetLastError(), ERROR_MSG)); buffer_.resize(length + 1); @@ -531,30 +314,31 @@ FMT_FUNC fmt::internal::UTF8ToUTF16::UTF8ToUTF16(fmt::StringRef s) { buffer_[length] = 0; } -FMT_FUNC fmt::internal::UTF16ToUTF8::UTF16ToUTF8(fmt::WStringRef s) { +FMT_FUNC internal::UTF16ToUTF8::UTF16ToUTF8(WStringRef s) { if (int error_code = convert(s)) { FMT_THROW(WindowsError(error_code, "cannot convert string from UTF-16 to UTF-8")); } } -FMT_FUNC int fmt::internal::UTF16ToUTF8::convert(fmt::WStringRef s) { +FMT_FUNC int internal::UTF16ToUTF8::convert(WStringRef s) { if (s.size() > INT_MAX) return ERROR_INVALID_PARAMETER; int s_size = static_cast(s.size()); - int length = WideCharToMultiByte(CP_UTF8, 0, s.data(), s_size, 0, 0, 0, 0); + int length = WideCharToMultiByte( + CP_UTF8, 0, s.data(), s_size, FMT_NULL, 0, FMT_NULL, FMT_NULL); if (length == 0) return GetLastError(); buffer_.resize(length + 1); length = WideCharToMultiByte( - CP_UTF8, 0, s.data(), s_size, &buffer_[0], length, 0, 0); + CP_UTF8, 0, s.data(), s_size, &buffer_[0], length, FMT_NULL, FMT_NULL); if (length == 0) return GetLastError(); buffer_[length] = 0; return 0; } -FMT_FUNC void fmt::WindowsError::init( +FMT_FUNC void WindowsError::init( int err_code, CStringRef format_str, ArgList args) { error_code_ = err_code; MemoryWriter w; @@ -563,17 +347,17 @@ FMT_FUNC void fmt::WindowsError::init( base = std::runtime_error(w.str()); } -FMT_FUNC void fmt::internal::format_windows_error( - fmt::Writer &out, int error_code, - fmt::StringRef message) FMT_NOEXCEPT { +FMT_FUNC void internal::format_windows_error( + Writer &out, int error_code, StringRef message) FMT_NOEXCEPT { FMT_TRY { MemoryBuffer buffer; buffer.resize(INLINE_BUFFER_SIZE); for (;;) { wchar_t *system_message = &buffer[0]; - int result = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, - 0, error_code, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - system_message, static_cast(buffer.size()), 0); + int result = FormatMessageW( + FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + FMT_NULL, error_code, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + system_message, static_cast(buffer.size()), FMT_NULL); if (result != 0) { UTF16ToUTF8 utf8_message; if (utf8_message.convert(system_message) == ERROR_SUCCESS) { @@ -592,12 +376,11 @@ FMT_FUNC void fmt::internal::format_windows_error( #endif // FMT_USE_WINDOWS_H -FMT_FUNC void fmt::internal::format_system_error( - fmt::Writer &out, int error_code, - fmt::StringRef message) FMT_NOEXCEPT { +FMT_FUNC void format_system_error( + Writer &out, int error_code, StringRef message) FMT_NOEXCEPT { FMT_TRY { - MemoryBuffer buffer; - buffer.resize(INLINE_BUFFER_SIZE); + internal::MemoryBuffer buffer; + buffer.resize(internal::INLINE_BUFFER_SIZE); for (;;) { char *system_message = &buffer[0]; int result = safe_strerror(error_code, system_message, buffer.size()); @@ -614,11 +397,11 @@ FMT_FUNC void fmt::internal::format_system_error( } template -void fmt::internal::ArgMap::init(const ArgList &args) { +void internal::ArgMap::init(const ArgList &args) { if (!map_.empty()) return; typedef internal::NamedArg NamedArg; - const NamedArg *named_arg = 0; + const NamedArg *named_arg = FMT_NULL; bool use_values = args.type(ArgList::MAX_PACKED_ARGS - 1) == internal::Arg::NONE; if (use_values) { @@ -659,18 +442,18 @@ void fmt::internal::ArgMap::init(const ArgList &args) { } template -void fmt::internal::FixedBuffer::grow(std::size_t) { +void internal::FixedBuffer::grow(std::size_t) { FMT_THROW(std::runtime_error("buffer overflow")); } -FMT_FUNC Arg fmt::internal::FormatterBase::do_get_arg( +FMT_FUNC internal::Arg internal::FormatterBase::do_get_arg( unsigned arg_index, const char *&error) { - Arg arg = args_[arg_index]; + internal::Arg arg = args_[arg_index]; switch (arg.type) { - case Arg::NONE: + case internal::Arg::NONE: error = "argument index out of range"; break; - case Arg::NAMED_ARG: + case internal::Arg::NAMED_ARG: arg = *static_cast(arg.pointer); break; default: @@ -679,203 +462,31 @@ FMT_FUNC Arg fmt::internal::FormatterBase::do_get_arg( return arg; } -template -void fmt::internal::PrintfFormatter::parse_flags( - FormatSpec &spec, const Char *&s) { - for (;;) { - switch (*s++) { - case '-': - spec.align_ = ALIGN_LEFT; - break; - case '+': - spec.flags_ |= SIGN_FLAG | PLUS_FLAG; - break; - case '0': - spec.fill_ = '0'; - break; - case ' ': - spec.flags_ |= SIGN_FLAG; - break; - case '#': - spec.flags_ |= HASH_FLAG; - break; - default: - --s; - return; - } - } -} - -template -Arg fmt::internal::PrintfFormatter::get_arg( - const Char *s, unsigned arg_index) { - (void)s; - const char *error = 0; - Arg arg = arg_index == UINT_MAX ? - next_arg(error) : FormatterBase::get_arg(arg_index - 1, error); - if (error) - FMT_THROW(FormatError(!*s ? "invalid format string" : error)); - return arg; -} - -template -unsigned fmt::internal::PrintfFormatter::parse_header( - const Char *&s, FormatSpec &spec) { - unsigned arg_index = UINT_MAX; - Char c = *s; - if (c >= '0' && c <= '9') { - // Parse an argument index (if followed by '$') or a width possibly - // preceded with '0' flag(s). - unsigned value = parse_nonnegative_int(s); - if (*s == '$') { // value is an argument index - ++s; - arg_index = value; - } else { - if (c == '0') - spec.fill_ = '0'; - if (value != 0) { - // Nonzero value means that we parsed width and don't need to - // parse it or flags again, so return now. - spec.width_ = value; - return arg_index; - } - } - } - parse_flags(spec, s); - // Parse width. - if (*s >= '0' && *s <= '9') { - spec.width_ = parse_nonnegative_int(s); - } else if (*s == '*') { - ++s; - spec.width_ = WidthHandler(spec).visit(get_arg(s)); - } - return arg_index; -} - -template -void fmt::internal::PrintfFormatter::format( - BasicWriter &writer, BasicCStringRef format_str) { - const Char *start = format_str.c_str(); - const Char *s = start; - while (*s) { - Char c = *s++; - if (c != '%') continue; - if (*s == c) { - write(writer, start, s); - start = ++s; - continue; - } - write(writer, start, s - 1); - - FormatSpec spec; - spec.align_ = ALIGN_RIGHT; - - // Parse argument index, flags and width. - unsigned arg_index = parse_header(s, spec); - - // Parse precision. - if (*s == '.') { - ++s; - if ('0' <= *s && *s <= '9') { - spec.precision_ = static_cast(parse_nonnegative_int(s)); - } else if (*s == '*') { - ++s; - spec.precision_ = PrecisionHandler().visit(get_arg(s)); - } - } - - Arg arg = get_arg(s, arg_index); - if (spec.flag(HASH_FLAG) && IsZeroInt().visit(arg)) - spec.flags_ &= ~to_unsigned(HASH_FLAG); - if (spec.fill_ == '0') { - if (arg.type <= Arg::LAST_NUMERIC_TYPE) - spec.align_ = ALIGN_NUMERIC; - else - spec.fill_ = ' '; // Ignore '0' flag for non-numeric types. - } - - // Parse length and convert the argument to the required type. - switch (*s++) { - case 'h': - if (*s == 'h') - ArgConverter(arg, *++s).visit(arg); - else - ArgConverter(arg, *s).visit(arg); - break; - case 'l': - if (*s == 'l') - ArgConverter(arg, *++s).visit(arg); - else - ArgConverter(arg, *s).visit(arg); - break; - case 'j': - ArgConverter(arg, *s).visit(arg); - break; - case 'z': - ArgConverter(arg, *s).visit(arg); - break; - case 't': - ArgConverter(arg, *s).visit(arg); - break; - case 'L': - // printf produces garbage when 'L' is omitted for long double, no - // need to do the same. - break; - default: - --s; - ArgConverter(arg, *s).visit(arg); - } - - // Parse type. - if (!*s) - FMT_THROW(FormatError("invalid format string")); - spec.type_ = static_cast(*s++); - if (arg.type <= Arg::LAST_INTEGER_TYPE) { - // Normalize type. - switch (spec.type_) { - case 'i': case 'u': - spec.type_ = 'd'; - break; - case 'c': - // TODO: handle wchar_t - CharConverter(arg).visit(arg); - break; - } - } - - start = s; - - // Format argument. - internal::PrintfArgFormatter(writer, spec).visit(arg); - } - write(writer, start, s); -} - -FMT_FUNC void fmt::report_system_error( +FMT_FUNC void report_system_error( int error_code, fmt::StringRef message) FMT_NOEXCEPT { // 'fmt::' is for bcc32. - fmt::report_error(internal::format_system_error, error_code, message); + report_error(format_system_error, error_code, message); } #if FMT_USE_WINDOWS_H -FMT_FUNC void fmt::report_windows_error( +FMT_FUNC void report_windows_error( int error_code, fmt::StringRef message) FMT_NOEXCEPT { // 'fmt::' is for bcc32. - fmt::report_error(internal::format_windows_error, error_code, message); + report_error(internal::format_windows_error, error_code, message); } #endif -FMT_FUNC void fmt::print(std::FILE *f, CStringRef format_str, ArgList args) { +FMT_FUNC void print(std::FILE *f, CStringRef format_str, ArgList args) { MemoryWriter w; w.write(format_str, args); std::fwrite(w.data(), 1, w.size(), f); } -FMT_FUNC void fmt::print(CStringRef format_str, ArgList args) { +FMT_FUNC void print(CStringRef format_str, ArgList args) { print(stdout, format_str, args); } -FMT_FUNC void fmt::print_colored(Color c, CStringRef format, ArgList args) { +FMT_FUNC void print_colored(Color c, CStringRef format, ArgList args) { char escape[] = "\x1b[30m"; escape[3] = static_cast('0' + c); std::fputs(escape, stdout); @@ -883,53 +494,42 @@ FMT_FUNC void fmt::print_colored(Color c, CStringRef format, ArgList args) { std::fputs(RESET_COLOR, stdout); } -FMT_FUNC int fmt::fprintf(std::FILE *f, CStringRef format, ArgList args) { - MemoryWriter w; - printf(w, format, args); - std::size_t size = w.size(); - return std::fwrite(w.data(), 1, size, f) < size ? -1 : static_cast(size); -} - #ifndef FMT_HEADER_ONLY -template struct fmt::internal::BasicData; +template struct internal::BasicData; // Explicit instantiations for char. -template void fmt::internal::FixedBuffer::grow(std::size_t); +template void internal::FixedBuffer::grow(std::size_t); -template void fmt::internal::ArgMap::init(const fmt::ArgList &args); +template void internal::ArgMap::init(const ArgList &args); -template void fmt::internal::PrintfFormatter::format( - BasicWriter &writer, CStringRef format); - -template int fmt::internal::CharTraits::format_float( +template FMT_API int internal::CharTraits::format_float( char *buffer, std::size_t size, const char *format, unsigned width, int precision, double value); -template int fmt::internal::CharTraits::format_float( +template FMT_API int internal::CharTraits::format_float( char *buffer, std::size_t size, const char *format, unsigned width, int precision, long double value); // Explicit instantiations for wchar_t. -template void fmt::internal::FixedBuffer::grow(std::size_t); +template void internal::FixedBuffer::grow(std::size_t); -template void fmt::internal::ArgMap::init(const fmt::ArgList &args); +template void internal::ArgMap::init(const ArgList &args); -template void fmt::internal::PrintfFormatter::format( - BasicWriter &writer, WCStringRef format); - -template int fmt::internal::CharTraits::format_float( +template FMT_API int internal::CharTraits::format_float( wchar_t *buffer, std::size_t size, const wchar_t *format, unsigned width, int precision, double value); -template int fmt::internal::CharTraits::format_float( +template FMT_API int internal::CharTraits::format_float( wchar_t *buffer, std::size_t size, const wchar_t *format, unsigned width, int precision, long double value); #endif // FMT_HEADER_ONLY +} // namespace fmt + #ifdef _MSC_VER # pragma warning(pop) #endif diff --git a/libs/format/fmt/format.h b/libs/format/fmt/format.h index 47a8b74d8..6ee9d2a21 100644 --- a/libs/format/fmt/format.h +++ b/libs/format/fmt/format.h @@ -25,7 +25,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#pragma once +#ifndef FMT_FORMAT_H_ +#define FMT_FORMAT_H_ #include #include @@ -37,7 +38,10 @@ #include #include #include -#include +#include // for std::pair + +// The fmt library version in the form major * 10000 + minor * 100 + patch. +#define FMT_VERSION 40000 #ifdef _SECURE_SCL # define FMT_SECURE_SCL _SECURE_SCL @@ -49,7 +53,13 @@ # include #endif -#if defined(_MSC_VER) && _MSC_VER <= 1500 +#ifdef _MSC_VER +# define FMT_MSC_VER _MSC_VER +#else +# define FMT_MSC_VER 0 +#endif + +#if FMT_MSC_VER && FMT_MSC_VER <= 1500 typedef unsigned __int32 uint32_t; typedef unsigned __int64 uint64_t; typedef __int64 intmax_t; @@ -97,8 +107,10 @@ typedef __int64 intmax_t; #endif #if defined(__clang__) && !defined(FMT_ICC_VERSION) +# define FMT_CLANG_VERSION (__clang_major__ * 100 + __clang_minor__) # pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wdocumentation" +# pragma clang diagnostic ignored "-Wdocumentation-unknown-command" +# pragma clang diagnostic ignored "-Wpadded" #endif #ifdef __GNUC_LIBSTD__ @@ -129,7 +141,7 @@ typedef __int64 intmax_t; // since version 2013. # define FMT_USE_VARIADIC_TEMPLATES \ (FMT_HAS_FEATURE(cxx_variadic_templates) || \ - (FMT_GCC_VERSION >= 404 && FMT_HAS_GXX_CXX11) || _MSC_VER >= 1800) + (FMT_GCC_VERSION >= 404 && FMT_HAS_GXX_CXX11) || FMT_MSC_VER >= 1800) #endif #ifndef FMT_USE_RVALUE_REFERENCES @@ -140,19 +152,15 @@ typedef __int64 intmax_t; # else # define FMT_USE_RVALUE_REFERENCES \ (FMT_HAS_FEATURE(cxx_rvalue_references) || \ - (FMT_GCC_VERSION >= 403 && FMT_HAS_GXX_CXX11) || _MSC_VER >= 1600) + (FMT_GCC_VERSION >= 403 && FMT_HAS_GXX_CXX11) || FMT_MSC_VER >= 1600) # endif #endif -#if FMT_USE_RVALUE_REFERENCES -# include // for std::move -#endif - // Check if exceptions are disabled. #if defined(__GNUC__) && !defined(__EXCEPTIONS) # define FMT_EXCEPTIONS 0 #endif -#if defined(_MSC_VER) && !_HAS_EXCEPTIONS +#if FMT_MSC_VER && !_HAS_EXCEPTIONS # define FMT_EXCEPTIONS 0 #endif #ifndef FMT_EXCEPTIONS @@ -172,20 +180,50 @@ typedef __int64 intmax_t; # define FMT_USE_NOEXCEPT 0 #endif +#if FMT_USE_NOEXCEPT || FMT_HAS_FEATURE(cxx_noexcept) || \ + (FMT_GCC_VERSION >= 408 && FMT_HAS_GXX_CXX11) || \ + FMT_MSC_VER >= 1900 +# define FMT_DETECTED_NOEXCEPT noexcept +#else +# define FMT_DETECTED_NOEXCEPT throw() +#endif + #ifndef FMT_NOEXCEPT # if FMT_EXCEPTIONS -# if FMT_USE_NOEXCEPT || FMT_HAS_FEATURE(cxx_noexcept) || \ - (FMT_GCC_VERSION >= 408 && FMT_HAS_GXX_CXX11) || \ - _MSC_VER >= 1900 -# define FMT_NOEXCEPT noexcept -# else -# define FMT_NOEXCEPT throw() -# endif +# define FMT_NOEXCEPT FMT_DETECTED_NOEXCEPT # else # define FMT_NOEXCEPT # endif #endif +// This is needed because GCC still uses throw() in its headers when exceptions +// are disabled. +#if FMT_GCC_VERSION +# define FMT_DTOR_NOEXCEPT FMT_DETECTED_NOEXCEPT +#else +# define FMT_DTOR_NOEXCEPT FMT_NOEXCEPT +#endif + +#ifndef FMT_OVERRIDE +# if (defined(FMT_USE_OVERRIDE) && FMT_USE_OVERRIDE) || FMT_HAS_FEATURE(cxx_override) || \ + (FMT_GCC_VERSION >= 408 && FMT_HAS_GXX_CXX11) || \ + FMT_MSC_VER >= 1900 +# define FMT_OVERRIDE override +# else +# define FMT_OVERRIDE +# endif +#endif + +#ifndef FMT_NULL +# if FMT_HAS_FEATURE(cxx_nullptr) || \ + (FMT_GCC_VERSION >= 408 && FMT_HAS_GXX_CXX11) || \ + FMT_MSC_VER >= 1600 +# define FMT_NULL nullptr +# else +# define FMT_NULL NULL +# endif +#endif + // A macro to disallow the copy constructor and operator= functions // This should be used in the private: declarations for a class #ifndef FMT_USE_DELETED_FUNCTIONS @@ -193,7 +231,7 @@ typedef __int64 intmax_t; #endif #if FMT_USE_DELETED_FUNCTIONS || FMT_HAS_FEATURE(cxx_deleted_functions) || \ - (FMT_GCC_VERSION >= 404 && FMT_HAS_GXX_CXX11) || _MSC_VER >= 1800 + (FMT_GCC_VERSION >= 404 && FMT_HAS_GXX_CXX11) || FMT_MSC_VER >= 1800 # define FMT_DELETED_OR_UNDEFINED = delete # define FMT_DISALLOW_COPY_AND_ASSIGN(TypeName) \ TypeName(const TypeName&) = delete; \ @@ -205,6 +243,20 @@ typedef __int64 intmax_t; TypeName& operator=(const TypeName&) #endif +#ifndef FMT_USE_DEFAULTED_FUNCTIONS +# define FMT_USE_DEFAULTED_FUNCTIONS 0 +#endif + +#ifndef FMT_DEFAULTED_COPY_CTOR +# if FMT_USE_DEFAULTED_FUNCTIONS || FMT_HAS_FEATURE(cxx_defaulted_functions) || \ + (FMT_GCC_VERSION >= 404 && FMT_HAS_GXX_CXX11) || FMT_MSC_VER >= 1800 +# define FMT_DEFAULTED_COPY_CTOR(TypeName) \ + TypeName(const TypeName&) = default; +# else +# define FMT_DEFAULTED_COPY_CTOR(TypeName) +# endif +#endif + #ifndef FMT_USE_USER_DEFINED_LITERALS // All compilers which support UDLs also support variadic templates. This // makes the fmt::literals implementation easier. However, an explicit check @@ -213,28 +265,42 @@ typedef __int64 intmax_t; # define FMT_USE_USER_DEFINED_LITERALS \ FMT_USE_VARIADIC_TEMPLATES && FMT_USE_RVALUE_REFERENCES && \ (FMT_HAS_FEATURE(cxx_user_literals) || \ - (FMT_GCC_VERSION >= 407 && FMT_HAS_GXX_CXX11) || _MSC_VER >= 1900) && \ + (FMT_GCC_VERSION >= 407 && FMT_HAS_GXX_CXX11) || FMT_MSC_VER >= 1900) && \ (!defined(FMT_ICC_VERSION) || FMT_ICC_VERSION >= 1500) #endif +#ifndef FMT_USE_EXTERN_TEMPLATES +# define FMT_USE_EXTERN_TEMPLATES \ + (FMT_CLANG_VERSION >= 209 || (FMT_GCC_VERSION >= 303 && FMT_HAS_GXX_CXX11)) +#endif + +#ifdef FMT_HEADER_ONLY +// If header only do not use extern templates. +# undef FMT_USE_EXTERN_TEMPLATES +# define FMT_USE_EXTERN_TEMPLATES 0 +#endif + #ifndef FMT_ASSERT # define FMT_ASSERT(condition, message) assert((condition) && message) #endif +// __builtin_clz is broken in clang with Microsoft CodeGen: +// https://github.com/fmtlib/fmt/issues/519 +#ifndef _MSC_VER +# if FMT_GCC_VERSION >= 400 || FMT_HAS_BUILTIN(__builtin_clz) +# define FMT_BUILTIN_CLZ(n) __builtin_clz(n) +# endif -#if FMT_GCC_VERSION >= 400 || FMT_HAS_BUILTIN(__builtin_clz) -# define FMT_BUILTIN_CLZ(n) __builtin_clz(n) +# if FMT_GCC_VERSION >= 400 || FMT_HAS_BUILTIN(__builtin_clzll) +# define FMT_BUILTIN_CLZLL(n) __builtin_clzll(n) +# endif #endif -#if FMT_GCC_VERSION >= 400 || FMT_HAS_BUILTIN(__builtin_clzll) -# define FMT_BUILTIN_CLZLL(n) __builtin_clzll(n) -#endif - -// Some compilers masquerade as both MSVC and GCC-likes or +// Some compilers masquerade as both MSVC and GCC-likes or // otherwise support __builtin_clz and __builtin_clzll, so // only define FMT_BUILTIN_CLZ using the MSVC intrinsics // if the clz and clzll builtins are not available. -#if defined(_MSC_VER) && !defined(FMT_BUILTIN_CLZLL) +#if FMT_MSC_VER && !defined(FMT_BUILTIN_CLZLL) && !defined(_MANAGED) # include // _BitScanReverse, _BitScanReverse64 namespace fmt { @@ -246,7 +312,7 @@ inline uint32_t clz(uint32_t x) { assert(x != 0); // Static analysis complains about using uninitialized data - // "r", but the only way that can happen is if "x" is 0, + // "r", but the only way that can happen is if "x" is 0, // which the callers guarantee to not happen. # pragma warning(suppress: 6102) return 31 - r; @@ -272,7 +338,7 @@ inline uint32_t clzll(uint64_t x) { assert(x != 0); // Static analysis complains about using uninitialized data - // "r", but the only way that can happen is if "x" is 0, + // "r", but the only way that can happen is if "x" is 0, // which the callers guarantee to not happen. # pragma warning(suppress: 6102) return 63 - r; @@ -297,14 +363,12 @@ inline DummyInt _ecvt_s(...) { return DummyInt(); } inline DummyInt isinf(...) { return DummyInt(); } inline DummyInt _finite(...) { return DummyInt(); } inline DummyInt isnan(...) { return DummyInt(); } -#ifndef _MSC_VER inline DummyInt _isnan(...) { return DummyInt(); } -#endif // A helper function to suppress bogus "conditional expression is constant" // warnings. template -inline T check(T value) { return value; } +inline T const_check(T value) { return value; } } } // namespace fmt @@ -323,8 +387,8 @@ class numeric_limits : using namespace fmt::internal; // The resolution "priority" is: // isinf macro > std::isinf > ::isinf > fmt::internal::isinf - if (check(sizeof(isinf(x)) == sizeof(bool) || - sizeof(isinf(x)) == sizeof(int))) { + if (const_check(sizeof(isinf(x)) == sizeof(bool) || + sizeof(isinf(x)) == sizeof(int))) { return isinf(x) != 0; } return !_finite(static_cast(x)); @@ -334,8 +398,8 @@ class numeric_limits : template static bool isnotanumber(T x) { using namespace fmt::internal; - if (check(sizeof(isnan(x)) == sizeof(bool) || - sizeof(isnan(x)) == sizeof(int))) { + if (const_check(sizeof(isnan(x)) == sizeof(bool) || + sizeof(isnan(x)) == sizeof(int))) { return isnan(x) != 0; } return _isnan(static_cast(x)) != 0; @@ -344,8 +408,10 @@ class numeric_limits : // Portable version of signbit. static bool isnegative(double x) { using namespace fmt::internal; - if (check(sizeof(signbit(x)) == sizeof(int))) + if (const_check(sizeof(signbit(x)) == sizeof(bool) || + sizeof(signbit(x)) == sizeof(int))) { return signbit(x) != 0; + } if (x < 0) return true; if (!isnotanumber(x)) return false; int dec = 0, sign = 0; @@ -376,13 +442,19 @@ typedef BasicWriter WWriter; template class ArgFormatter; +struct FormatSpec; + +template +class BasicPrintfArgFormatter; + template > class BasicFormatter; /** \rst - A string reference. It can be constructed from a C string or ``std::string``. + A string reference. It can be constructed from a C string or + ``std::basic_string``. You can use one of the following typedefs for common character types: @@ -425,10 +497,12 @@ class BasicStringRef { /** \rst - Constructs a string reference from an ``std::string`` object. + Constructs a string reference from a ``std::basic_string`` object. \endrst */ - BasicStringRef(const std::basic_string &s) + template + BasicStringRef( + const std::basic_string, Allocator> &s) : data_(s.c_str()), size_(s.size()) {} /** @@ -481,7 +555,7 @@ typedef BasicStringRef WStringRef; /** \rst A reference to a null terminated string. It can be constructed from a C - string or ``std::string``. + string or ``std::basic_string``. You can use one of the following typedefs for common character types: @@ -514,10 +588,13 @@ class BasicCStringRef { /** \rst - Constructs a string reference from an ``std::string`` object. + Constructs a string reference from a ``std::basic_string`` object. \endrst */ - BasicCStringRef(const std::basic_string &s) : data_(s.c_str()) {} + template + BasicCStringRef( + const std::basic_string, Allocator> &s) + : data_(s.c_str()) {} /** Returns the pointer to a C string. */ const Char *c_str() const { return data_; } @@ -526,13 +603,13 @@ class BasicCStringRef { typedef BasicCStringRef CStringRef; typedef BasicCStringRef WCStringRef; -/** - A formatting error such as invalid format string. -*/ +/** A formatting error such as invalid format string. */ class FormatError : public std::runtime_error { public: explicit FormatError(CStringRef message) : std::runtime_error(message.c_str()) {} + FormatError(const FormatError &ferr) : std::runtime_error(ferr) {} + FMT_API ~FormatError() FMT_DTOR_NOEXCEPT; }; namespace internal { @@ -590,7 +667,7 @@ class Buffer { std::size_t size_; std::size_t capacity_; - Buffer(T *ptr = 0, std::size_t capacity = 0) + Buffer(T *ptr = FMT_NULL, std::size_t capacity = 0) : ptr_(ptr), size_(0), capacity_(capacity) {} /** @@ -648,7 +725,8 @@ class Buffer { template template void Buffer::append(const U *begin, const U *end) { - std::size_t new_size = size_ + internal::to_unsigned(end - begin); + FMT_ASSERT(end >= begin, "negative value"); + std::size_t new_size = size_ + (end - begin); if (new_size > capacity_) grow(new_size); std::uninitialized_copy(begin, end, @@ -658,8 +736,8 @@ void Buffer::append(const U *begin, const U *end) { namespace internal { -// A memory buffer for trivially copyable/constructible types with the first SIZE -// elements stored in the object itself. +// A memory buffer for trivially copyable/constructible types with the first +// SIZE elements stored in the object itself. template > class MemoryBuffer : private Allocator, public Buffer { private: @@ -671,7 +749,7 @@ class MemoryBuffer : private Allocator, public Buffer { } protected: - void grow(std::size_t size); + void grow(std::size_t size) FMT_OVERRIDE; public: explicit MemoryBuffer(const Allocator &alloc = Allocator()) @@ -720,7 +798,7 @@ void MemoryBuffer::grow(std::size_t size) { std::size_t new_capacity = this->capacity_ + this->capacity_ / 2; if (size > new_capacity) new_capacity = size; - T *new_ptr = this->allocate(new_capacity); + T *new_ptr = this->allocate(new_capacity, FMT_NULL); // The following code doesn't throw, so the raw pointer above doesn't leak. std::uninitialized_copy(this->ptr_, this->ptr_ + this->size_, make_ptr(new_ptr, new_capacity)); @@ -742,7 +820,7 @@ class FixedBuffer : public fmt::Buffer { FixedBuffer(Char *array, std::size_t size) : fmt::Buffer(array, size) {} protected: - FMT_API void grow(std::size_t size); + FMT_API void grow(std::size_t size) FMT_OVERRIDE; }; template @@ -774,6 +852,15 @@ class CharTraits : public BasicCharTraits { const char *format, unsigned width, int precision, T value); }; +#if FMT_USE_EXTERN_TEMPLATES +extern template int CharTraits::format_float + (char *buffer, std::size_t size, + const char* format, unsigned width, int precision, double value); +extern template int CharTraits::format_float + (char *buffer, std::size_t size, + const char* format, unsigned width, int precision, long double value); +#endif + template <> class CharTraits : public BasicCharTraits { public: @@ -785,6 +872,15 @@ class CharTraits : public BasicCharTraits { const wchar_t *format, unsigned width, int precision, T value); }; +#if FMT_USE_EXTERN_TEMPLATES +extern template int CharTraits::format_float + (wchar_t *buffer, std::size_t size, + const wchar_t* format, unsigned width, int precision, double value); +extern template int CharTraits::format_float + (wchar_t *buffer, std::size_t size, + const wchar_t* format, unsigned width, int precision, long double value); +#endif + // Checks if a number is negative - used to avoid warnings. template struct SignChecker { @@ -831,6 +927,10 @@ struct FMT_API BasicData { static const char DIGITS[]; }; +#if FMT_USE_EXTERN_TEMPLATES +extern template struct BasicData; +#endif + typedef BasicData<> Data; #ifdef FMT_BUILTIN_CLZLL @@ -919,12 +1019,14 @@ inline void format_decimal(Char *buffer, UInt value, unsigned num_digits, } unsigned index = static_cast(value * 2); *--buffer = Data::DIGITS[index + 1]; + thousands_sep(buffer); *--buffer = Data::DIGITS[index]; } template inline void format_decimal(Char *buffer, UInt value, unsigned num_digits) { - return format_decimal(buffer, value, num_digits, NoThousandsSep()); + format_decimal(buffer, value, num_digits, NoThousandsSep()); + return; } #ifndef _WIN32 @@ -974,9 +1076,6 @@ FMT_API void format_windows_error(fmt::Writer &out, int error_code, fmt::StringRef message) FMT_NOEXCEPT; #endif -FMT_API void format_system_error(fmt::Writer &out, int error_code, - fmt::StringRef message) FMT_NOEXCEPT; - // A formatting argument value. struct Value { template @@ -1026,6 +1125,8 @@ struct Arg : Value { template struct NamedArg; +template +struct NamedArgWithType; template struct Null {}; @@ -1074,7 +1175,9 @@ struct ConvertToIntImpl2 { template struct ConvertToInt { - enum { enable_conversion = sizeof(convert(get())) == sizeof(Yes) }; + enum { + enable_conversion = sizeof(fmt::internal::convert(get())) == sizeof(Yes) + }; enum { value = ConvertToIntImpl2::value }; }; @@ -1100,12 +1203,59 @@ template struct Conditional { typedef F type; }; // For bcc32 which doesn't understand ! in template arguments. -template +template struct Not { enum { value = 0 }; }; -template<> +template <> struct Not { enum { value = 1 }; }; +template +struct FalseType { enum { value = 0 }; }; + +template struct LConvCheck { + LConvCheck(int) {} +}; + +// Returns the thousands separator for the current locale. +// We check if ``lconv`` contains ``thousands_sep`` because on Android +// ``lconv`` is stubbed as an empty struct. +template +inline StringRef thousands_sep( + LConv *lc, LConvCheck = 0) { + return lc->thousands_sep; +} + +inline fmt::StringRef thousands_sep(...) { return ""; } + +#define FMT_CONCAT(a, b) a##b + +#if FMT_GCC_VERSION >= 303 +# define FMT_UNUSED __attribute__((unused)) +#else +# define FMT_UNUSED +#endif + +#ifndef FMT_USE_STATIC_ASSERT +# define FMT_USE_STATIC_ASSERT 0 +#endif + +#if FMT_USE_STATIC_ASSERT || FMT_HAS_FEATURE(cxx_static_assert) || \ + (FMT_GCC_VERSION >= 403 && FMT_HAS_GXX_CXX11) || _MSC_VER >= 1600 +# define FMT_STATIC_ASSERT(cond, message) static_assert(cond, message) +#else +# define FMT_CONCAT_(a, b) FMT_CONCAT(a, b) +# define FMT_STATIC_ASSERT(cond, message) \ + typedef int FMT_CONCAT_(Assert, __LINE__)[(cond) ? 1 : -1] FMT_UNUSED +#endif + +template +void format_arg(Formatter &, const Char *, const T &) { + FMT_STATIC_ASSERT(FalseType::value, + "Cannot format argument. To enable the use of ostream " + "operator<< include fmt/ostream.h. Otherwise provide " + "an overload of format_arg."); +} + // Makes an Arg object from any type. template class MakeValue : public Arg { @@ -1127,7 +1277,7 @@ class MakeValue : public Arg { // characters and strings into narrow strings as in // fmt::format("{}", L"test"); // To fix this, use a wide format string: fmt::format(L"{}", L"test"). -#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED) +#if !FMT_MSC_VER || defined(_NATIVE_WCHAR_T_DEFINED) MakeValue(typename WCharHelper::Unsupported); #endif MakeValue(typename WCharHelper::Unsupported); @@ -1149,9 +1299,9 @@ class MakeValue : public Arg { template static void format_custom_arg( void *formatter, const void *arg, void *format_str_ptr) { - format(*static_cast(formatter), - *static_cast(format_str_ptr), - *static_cast(arg)); + format_arg(*static_cast(formatter), + *static_cast(format_str_ptr), + *static_cast(arg)); } public: @@ -1173,7 +1323,7 @@ class MakeValue : public Arg { MakeValue(long value) { // To minimize the number of types we need to deal with, long is // translated either to int or to long long depending on its size. - if (check(sizeof(long) == sizeof(int))) + if (const_check(sizeof(long) == sizeof(int))) int_value = static_cast(value); else long_long_value = value; @@ -1183,7 +1333,7 @@ class MakeValue : public Arg { } MakeValue(unsigned long value) { - if (check(sizeof(unsigned long) == sizeof(unsigned))) + if (const_check(sizeof(unsigned long) == sizeof(unsigned))) uint_value = static_cast(value); else ulong_long_value = value; @@ -1215,7 +1365,9 @@ class MakeValue : public Arg { FMT_MAKE_VALUE(char *, string.value, CSTRING) FMT_MAKE_VALUE(const char *, string.value, CSTRING) + FMT_MAKE_VALUE(signed char *, sstring.value, CSTRING) FMT_MAKE_VALUE(const signed char *, sstring.value, CSTRING) + FMT_MAKE_VALUE(unsigned char *, ustring.value, CSTRING) FMT_MAKE_VALUE(const unsigned char *, ustring.value, CSTRING) FMT_MAKE_STR_VALUE(const std::string &, STRING) FMT_MAKE_STR_VALUE(StringRef, STRING) @@ -1244,23 +1396,22 @@ class MakeValue : public Arg { } template - MakeValue(const T &value, - typename EnableIf::value, int>::type = 0) { - int_value = value; - } - - template - static uint64_t type(const T &) { - return ConvertToInt::value ? Arg::INT : Arg::CUSTOM; + static typename EnableIf::value>::value, uint64_t>::type + type(const T &) { + return Arg::CUSTOM; } // Additional template param `Char_` is needed here because make_type always // uses char. template MakeValue(const NamedArg &value) { pointer = &value; } + template + MakeValue(const NamedArgWithType &value) { pointer = &value; } template static uint64_t type(const NamedArg &) { return Arg::NAMED_ARG; } + template + static uint64_t type(const NamedArgWithType &) { return Arg::NAMED_ARG; } }; template @@ -1269,7 +1420,7 @@ public: MakeArg() { type = Arg::NONE; } - + template MakeArg(const T &value) : Arg(MakeValue(value)) { @@ -1286,14 +1437,19 @@ struct NamedArg : Arg { : Arg(MakeArg< BasicFormatter >(value)), name(argname) {} }; +template +struct NamedArgWithType : NamedArg { + NamedArgWithType(BasicStringRef argname, const T &value) + : NamedArg(argname, value) {} +}; + class RuntimeError : public std::runtime_error { protected: RuntimeError() : std::runtime_error("") {} + RuntimeError(const RuntimeError &rerr) : std::runtime_error(rerr) {} + FMT_API ~RuntimeError() FMT_DTOR_NOEXCEPT; }; -template -class PrintfArgFormatter; - template class ArgMap; } // namespace internal @@ -1315,10 +1471,7 @@ class ArgList { }; internal::Arg::Type type(unsigned index) const { - unsigned shift = index * 4; - uint64_t mask = 0xf; - return static_cast( - (types_ & (mask << shift)) >> shift); + return type(types_, index); } template @@ -1335,6 +1488,8 @@ class ArgList { ArgList(ULongLong types, const internal::Arg *args) : types_(types), args_(args) {} + uint64_t types() const { return types_; } + /** Returns the argument at specified index. */ internal::Arg operator[](unsigned index) const { using internal::Arg; @@ -1360,6 +1515,13 @@ class ArgList { } return args_[index]; } + + static internal::Arg::Type type(uint64_t types, unsigned index) { + unsigned shift = index * 4; + uint64_t mask = 0xf; + return static_cast( + (types & (mask << shift)) >> shift); + } }; #define FMT_DISPATCH(call) static_cast(this)->call @@ -1488,9 +1650,10 @@ class ArgVisitor { */ Result visit(const Arg &arg) { switch (arg.type) { - default: + case Arg::NONE: + case Arg::NAMED_ARG: FMT_ASSERT(false, "invalid argument type"); - return Result(); + break; case Arg::INT: return FMT_DISPATCH(visit_int(arg.int_value)); case Arg::UINT: @@ -1518,6 +1681,7 @@ class ArgVisitor { case Arg::CUSTOM: return FMT_DISPATCH(visit_custom(arg.custom)); } + return Result(); } }; @@ -1542,6 +1706,7 @@ struct TypeSpec : EmptySpec { int precision() const { return -1; } bool flag(unsigned) const { return false; } char type() const { return TYPE; } + char type_prefix() const { return TYPE; } char fill() const { return ' '; } }; @@ -1577,6 +1742,7 @@ struct AlignTypeSpec : AlignSpec { bool flag(unsigned) const { return false; } char type() const { return TYPE; } + char type_prefix() const { return TYPE; } }; // A full format specifier. @@ -1592,6 +1758,7 @@ struct FormatSpec : AlignSpec { bool flag(unsigned f) const { return (flags_ & f) != 0; } int precision() const { return precision_; } char type() const { return type_; } + char type_prefix() const { return type_; } }; // An integer format specifier. @@ -1756,22 +1923,22 @@ class ArgMap { public: FMT_API void init(const ArgList &args); - const internal::Arg* find(const fmt::BasicStringRef &name) const { + const internal::Arg *find(const fmt::BasicStringRef &name) const { // The list is unsorted, so just return the first matching name. for (typename MapType::const_iterator it = map_.begin(), end = map_.end(); it != end; ++it) { if (it->first == name) return &it->second; } - return 0; + return FMT_NULL; } }; -template +template class ArgFormatterBase : public ArgVisitor { private: BasicWriter &writer_; - FormatSpec &spec_; + Spec &spec_; FMT_DISALLOW_COPY_AND_ASSIGN(ArgFormatterBase); @@ -1781,9 +1948,12 @@ class ArgFormatterBase : public ArgVisitor { writer_.write_int(reinterpret_cast(p), spec_); } + // workaround MSVC two-phase lookup issue + typedef internal::Arg Arg; + protected: BasicWriter &writer() { return writer_; } - FormatSpec &spec() { return spec_; } + Spec &spec() { return spec_; } void write(bool value) { const char *str_value = value ? "true" : "false"; @@ -1792,12 +1962,14 @@ class ArgFormatterBase : public ArgVisitor { } void write(const char *value) { - Arg::StringValue str = {value, value != 0 ? std::strlen(value) : 0}; + Arg::StringValue str = {value, value ? std::strlen(value) : 0}; writer_.write_str(str, spec_); } public: - ArgFormatterBase(BasicWriter &w, FormatSpec &s) + typedef Spec SpecType; + + ArgFormatterBase(BasicWriter &w, Spec &s) : writer_(w), spec_(s) {} template @@ -1807,8 +1979,10 @@ class ArgFormatterBase : public ArgVisitor { void visit_any_double(T value) { writer_.write_double(value, spec_); } void visit_bool(bool value) { - if (spec_.type_) - return visit_any_int(value); + if (spec_.type_) { + visit_any_int(value); + return; + } write(value); } @@ -1823,21 +1997,21 @@ class ArgFormatterBase : public ArgVisitor { typedef typename BasicWriter::CharPtr CharPtr; Char fill = internal::CharTraits::cast(spec_.fill()); CharPtr out = CharPtr(); - const unsigned CHAR_WIDTH = 1; - if (spec_.width_ > CHAR_WIDTH) { + const unsigned CHAR_SIZE = 1; + if (spec_.width_ > CHAR_SIZE) { out = writer_.grow_buffer(spec_.width_); if (spec_.align_ == ALIGN_RIGHT) { - std::uninitialized_fill_n(out, spec_.width_ - CHAR_WIDTH, fill); - out += spec_.width_ - CHAR_WIDTH; + std::uninitialized_fill_n(out, spec_.width_ - CHAR_SIZE, fill); + out += spec_.width_ - CHAR_SIZE; } else if (spec_.align_ == ALIGN_CENTER) { out = writer_.fill_padding(out, spec_.width_, - internal::check(CHAR_WIDTH), fill); + internal::const_check(CHAR_SIZE), fill); } else { - std::uninitialized_fill_n(out + CHAR_WIDTH, - spec_.width_ - CHAR_WIDTH, fill); + std::uninitialized_fill_n(out + CHAR_SIZE, + spec_.width_ - CHAR_SIZE, fill); } } else { - out = writer_.grow_buffer(CHAR_WIDTH); + out = writer_.grow_buffer(CHAR_SIZE); } *out = internal::CharTraits::cast(value); } @@ -1848,13 +2022,14 @@ class ArgFormatterBase : public ArgVisitor { write(value); } - void visit_string(Arg::StringValue value) { + // Qualification with "internal" here and below is a workaround for nvcc. + void visit_string(internal::Arg::StringValue value) { writer_.write_str(value, spec_); } using ArgVisitor::visit_wstring; - void visit_wstring(Arg::StringValue value) { + void visit_wstring(internal::Arg::StringValue value) { writer_.write_str(value, spec_); } @@ -1910,26 +2085,6 @@ class FormatterBase { w << BasicStringRef(start, internal::to_unsigned(end - start)); } }; - -// A printf formatter. -template -class PrintfFormatter : private FormatterBase { - private: - void parse_flags(FormatSpec &spec, const Char *&s); - - // Returns the argument with specified index or, if arg_index is equal - // to the maximum unsigned value, the next argument. - Arg get_arg(const Char *s, - unsigned arg_index = (std::numeric_limits::max)()); - - // Parses argument index, flags and width and returns the argument index. - unsigned parse_header(const Char *&s, FormatSpec &spec); - - public: - explicit PrintfFormatter(const ArgList &args) : FormatterBase(args) {} - FMT_API void format(BasicWriter &writer, - BasicCStringRef format_str); -}; } // namespace internal /** @@ -1949,8 +2104,8 @@ class PrintfFormatter : private FormatterBase { will be called. \endrst */ -template -class BasicArgFormatter : public internal::ArgFormatterBase { +template +class BasicArgFormatter : public internal::ArgFormatterBase { private: BasicFormatter &formatter_; const Char *format_; @@ -1965,11 +2120,11 @@ class BasicArgFormatter : public internal::ArgFormatterBase { \endrst */ BasicArgFormatter(BasicFormatter &formatter, - FormatSpec &spec, const Char *fmt) - : internal::ArgFormatterBase(formatter.writer(), spec), + Spec &spec, const Char *fmt) + : internal::ArgFormatterBase(formatter.writer(), spec), formatter_(formatter), format_(fmt) {} - /** Formats argument of a custom (user-defined) type. */ + /** Formats an argument of a custom (user-defined) type. */ void visit_custom(internal::Arg::CustomValue c) { c.format(&formatter_, c.value, &format_); } @@ -1977,12 +2132,14 @@ class BasicArgFormatter : public internal::ArgFormatterBase { /** The default argument formatter. */ template -class ArgFormatter : public BasicArgFormatter, Char> { +class ArgFormatter : + public BasicArgFormatter, Char, FormatSpec> { public: /** Constructs an argument formatter object. */ ArgFormatter(BasicFormatter &formatter, FormatSpec &spec, const Char *fmt) - : BasicArgFormatter, Char>(formatter, spec, fmt) {} + : BasicArgFormatter, + Char, FormatSpec>(formatter, spec, fmt) {} }; /** This template formats data and writes the output to a writer. */ @@ -2058,13 +2215,13 @@ inline uint64_t make_type(const T &arg) { return MakeValue< BasicFormatter >::type(arg); } -template +template struct ArgArray; -template +template struct ArgArray { typedef Value Type[N > 0 ? N : 1]; - + template static Value make(const T &value) { #ifdef __clang__ @@ -2079,7 +2236,7 @@ struct ArgArray { } }; -template +template struct ArgArray { typedef Arg Type[N + 1]; // +1 for the list end Arg::NONE @@ -2219,7 +2376,7 @@ inline uint64_t make_type(FMT_GEN15(FMT_ARG_TYPE_DEFAULT)) { */ class SystemError : public internal::RuntimeError { private: - void init(int err_code, CStringRef format_str, ArgList args); + FMT_API void init(int err_code, CStringRef format_str, ArgList args); protected: int error_code_; @@ -2231,17 +2388,10 @@ class SystemError : public internal::RuntimeError { public: /** \rst - Constructs a :class:`fmt::SystemError` object with the description - of the form - - .. parsed-literal:: - **: ** - - where ** is the formatted message and ** is - the system message corresponding to the error code. - *error_code* is a system error code as given by ``errno``. - If *error_code* is not a valid error code such as -1, the system message - may look like "Unknown error -1" and is platform-dependent. + Constructs a :class:`fmt::SystemError` object with a description + formatted with `fmt::format_system_error`. *message* and additional + arguments passed into the constructor are formatted similarly to + `fmt::format`. **Example**:: @@ -2257,11 +2407,33 @@ class SystemError : public internal::RuntimeError { SystemError(int error_code, CStringRef message) { init(error_code, message, ArgList()); } + FMT_DEFAULTED_COPY_CTOR(SystemError) FMT_VARIADIC_CTOR(SystemError, init, int, CStringRef) + FMT_API ~SystemError() FMT_DTOR_NOEXCEPT; + int error_code() const { return error_code_; } }; +/** + \rst + Formats an error returned by an operating system or a language runtime, + for example a file opening error, and writes it to *out* in the following + form: + + .. parsed-literal:: + **: ** + + where ** is the passed message and ** is + the system message corresponding to the error code. + *error_code* is a system error code as given by ``errno``. + If *error_code* is not a valid error code such as -1, the system message + may look like "Unknown error -1" and is platform-dependent. + \endrst + */ +FMT_API void format_system_error(fmt::Writer &out, int error_code, + fmt::StringRef message) FMT_NOEXCEPT; + /** \rst This template provides operations for formatting and writing data into @@ -2350,16 +2522,16 @@ class BasicWriter { void write_int(T value, Spec spec); // Formats a floating-point number (double or long double). - template - void write_double(T value, const FormatSpec &spec); + template + void write_double(T value, const Spec &spec); // Writes a formatted string. template CharPtr write_str(const StrChar *s, std::size_t size, const AlignSpec &spec); - template + template void write_str(const internal::Arg::StringValue &str, - const FormatSpec &spec); + const Spec &spec); // This following methods are private to disallow writing wide characters // and strings to a char stream. If you want to print a wide string as a @@ -2378,10 +2550,11 @@ class BasicWriter { template void append_float_length(Char *&, T) {} - template + template friend class internal::ArgFormatterBase; - friend class internal::PrintfArgFormatter; + template + friend class BasicPrintfArgFormatter; protected: /** @@ -2577,9 +2750,9 @@ typename BasicWriter::CharPtr BasicWriter::write_str( } template -template +template void BasicWriter::write_str( - const internal::Arg::StringValue &s, const FormatSpec &spec) { + const internal::Arg::StringValue &s, const Spec &spec) { // Check if StrChar is convertible to Char. internal::CharTraits::convert(StrChar()); if (spec.type_ && spec.type_ != 's') @@ -2589,7 +2762,6 @@ void BasicWriter::write_str( if (str_size == 0) { if (!str_value) { FMT_THROW(FormatError("string pointer is null")); - return; } } std::size_t precision = static_cast(spec.precision_); @@ -2704,7 +2876,7 @@ void BasicWriter::write_int(T value, Spec spec) { UnsignedType n = abs_value; if (spec.flag(HASH_FLAG)) { prefix[prefix_size++] = '0'; - prefix[prefix_size++] = spec.type(); + prefix[prefix_size++] = spec.type_prefix(); } unsigned num_digits = 0; do { @@ -2724,7 +2896,7 @@ void BasicWriter::write_int(T value, Spec spec) { UnsignedType n = abs_value; if (spec.flag(HASH_FLAG)) { prefix[prefix_size++] = '0'; - prefix[prefix_size++] = spec.type(); + prefix[prefix_size++] = spec.type_prefix(); } unsigned num_digits = 0; do { @@ -2754,9 +2926,12 @@ void BasicWriter::write_int(T value, Spec spec) { } case 'n': { unsigned num_digits = internal::count_digits(abs_value); - fmt::StringRef sep = std::localeconv()->thousands_sep; + fmt::StringRef sep = ""; +#if !(defined(ANDROID) || defined(__ANDROID__)) + sep = internal::thousands_sep(std::localeconv()); +#endif unsigned size = static_cast( - num_digits + sep.size() * (num_digits - 1) / 3); + num_digits + sep.size() * ((num_digits - 1) / 3)); CharPtr p = prepare_int_buffer(size, spec, prefix, prefix_size) + 1; internal::format_decimal(get(p), abs_value, 0, internal::ThousandsSep(sep)); break; @@ -2769,8 +2944,8 @@ void BasicWriter::write_int(T value, Spec spec) { } template -template -void BasicWriter::write_double(T value, const FormatSpec &spec) { +template +void BasicWriter::write_double(T value, const Spec &spec) { // Check type. char type = spec.type(); bool upper = false; @@ -2781,7 +2956,7 @@ void BasicWriter::write_double(T value, const FormatSpec &spec) { case 'e': case 'f': case 'g': case 'a': break; case 'F': -#ifdef _MSC_VER +#if FMT_MSC_VER // MSVC's printf doesn't support 'F'. type = 'f'; #endif @@ -2871,10 +3046,10 @@ void BasicWriter::write_double(T value, const FormatSpec &spec) { // Format using snprintf. Char fill = internal::CharTraits::cast(spec.fill()); unsigned n = 0; - Char *start = 0; + Char *start = FMT_NULL; for (;;) { std::size_t buffer_size = buffer_.capacity() - offset; -#ifdef _MSC_VER +#if FMT_MSC_VER // MSVC's vsnprintf_s doesn't work with zero size, so reserve // space for at least one extra character to make the size non-zero. // Note that the buffer's capacity will increase by more than 1. @@ -3148,56 +3323,6 @@ FMT_API void print(std::FILE *f, CStringRef format_str, ArgList args); */ FMT_API void print(CStringRef format_str, ArgList args); -template -void printf(BasicWriter &w, BasicCStringRef format, ArgList args) { - internal::PrintfFormatter(args).format(w, format); -} - -/** - \rst - Formats arguments and returns the result as a string. - - **Example**:: - - std::string message = fmt::sprintf("The answer is %d", 42); - \endrst -*/ -inline std::string sprintf(CStringRef format, ArgList args) { - MemoryWriter w; - printf(w, format, args); - return w.str(); -} - -inline std::wstring sprintf(WCStringRef format, ArgList args) { - WMemoryWriter w; - printf(w, format, args); - return w.str(); -} - -/** - \rst - Prints formatted data to the file *f*. - - **Example**:: - - fmt::fprintf(stderr, "Don't %s!", "panic"); - \endrst - */ -FMT_API int fprintf(std::FILE *f, CStringRef format, ArgList args); - -/** - \rst - Prints formatted data to ``stdout``. - - **Example**:: - - fmt::printf("Elapsed time: %.2f seconds", 1.23); - \endrst - */ -inline int printf(CStringRef format, ArgList args) { - return fprintf(stdout, format, args); -} - /** Fast integer formatter. */ @@ -3314,13 +3439,13 @@ inline void format_decimal(char *&buffer, T value) { \endrst */ template -inline internal::NamedArg arg(StringRef name, const T &arg) { - return internal::NamedArg(name, arg); +inline internal::NamedArgWithType arg(StringRef name, const T &arg) { + return internal::NamedArgWithType(name, arg); } template -inline internal::NamedArg arg(WStringRef name, const T &arg) { - return internal::NamedArg(name, arg); +inline internal::NamedArgWithType arg(WStringRef name, const T &arg) { + return internal::NamedArgWithType(name, arg); } // The following two functions are deleted intentionally to disable @@ -3349,7 +3474,6 @@ void arg(WStringRef, const internal::NamedArg&) FMT_DELETED_OR_UNDEFINED; #define FMT_ARG_N(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N #define FMT_RSEQ_N() 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 -#define FMT_CONCAT(a, b) a##b #define FMT_FOR_EACH_(N, f, ...) \ FMT_EXPAND(FMT_CONCAT(FMT_FOR_EACH, N)(f, __VA_ARGS__)) #define FMT_FOR_EACH(f, ...) \ @@ -3463,12 +3587,7 @@ FMT_VARIADIC(std::string, format, CStringRef) FMT_VARIADIC_W(std::wstring, format, WCStringRef) FMT_VARIADIC(void, print, CStringRef) FMT_VARIADIC(void, print, std::FILE *, CStringRef) - FMT_VARIADIC(void, print_colored, Color, CStringRef) -FMT_VARIADIC(std::string, sprintf, CStringRef) -FMT_VARIADIC_W(std::wstring, sprintf, WCStringRef) -FMT_VARIADIC(int, printf, CStringRef) -FMT_VARIADIC(int, fprintf, std::FILE *, CStringRef) namespace internal { template @@ -3533,7 +3652,7 @@ inline internal::Arg BasicFormatter::get_arg( template inline internal::Arg BasicFormatter::parse_arg_index(const Char *&s) { - const char *error = 0; + const char *error = FMT_NULL; internal::Arg arg = *s < '0' || *s > '9' ? next_arg(error) : get_arg(internal::parse_nonnegative_int(s), error); if (error) { @@ -3551,7 +3670,7 @@ inline internal::Arg BasicFormatter::parse_arg_name(const Char *&s) { do { c = *++s; } while (internal::is_name_start(c) || ('0' <= c && c <= '9')); - const char *error = 0; + const char *error = FMT_NULL; internal::Arg arg = get_arg(BasicStringRef(start, s - start), error); if (error) FMT_THROW(FormatError(error)); @@ -3563,7 +3682,7 @@ const Char *BasicFormatter::format( const Char *&format_str, const internal::Arg &arg) { using internal::Arg; const Char *s = format_str; - FormatSpec spec; + typename ArgFormatter::SpecType spec; if (*s == ':') { if (arg.type == Arg::CUSTOM) { arg.custom.format(this, arg.custom.value, &s); @@ -3749,6 +3868,66 @@ void BasicFormatter::format(BasicCStringRef format_str) { } write(writer_, start, s); } + +template +struct ArgJoin { + It first; + It last; + BasicCStringRef sep; + + ArgJoin(It first, It last, const BasicCStringRef& sep) : + first(first), + last(last), + sep(sep) {} +}; + +template +ArgJoin join(It first, It last, const BasicCStringRef& sep) { + return ArgJoin(first, last, sep); +} + +template +ArgJoin join(It first, It last, const BasicCStringRef& sep) { + return ArgJoin(first, last, sep); +} + +#if FMT_HAS_GXX_CXX11 +template +auto join(const Range& range, const BasicCStringRef& sep) + -> ArgJoin { + return join(std::begin(range), std::end(range), sep); +} + +template +auto join(const Range& range, const BasicCStringRef& sep) + -> ArgJoin { + return join(std::begin(range), std::end(range), sep); +} +#endif + +template +void format_arg(fmt::BasicFormatter &f, + const Char *&format_str, const ArgJoin& e) { + const Char* end = format_str; + if (*end == ':') + ++end; + while (*end && *end != '}') + ++end; + if (*end != '}') + FMT_THROW(FormatError("missing '}' in format string")); + + It it = e.first; + if (it != e.last) { + const Char* save = format_str; + f.format(format_str, internal::MakeArg >(*it++)); + while (it != e.last) { + f.writer().write(e.sep); + format_str = save; + f.format(format_str, internal::MakeArg >(*it++)); + } + } + format_str = end + 1; +} } // namespace fmt #if FMT_USE_USER_DEFINED_LITERALS @@ -3771,7 +3950,7 @@ struct UdlArg { const Char *str; template - NamedArg operator=(T &&value) const { + NamedArgWithType operator=(T &&value) const { return {str, std::forward(value)}; } }; @@ -3830,3 +4009,4 @@ operator"" _a(const wchar_t *s, std::size_t) { return {s}; } # define FMT_FUNC #endif +#endif // FMT_FORMAT_H_ diff --git a/libs/format/fmt/ostream.cc b/libs/format/fmt/ostream.cc index 0ba303478..2d443f730 100644 --- a/libs/format/fmt/ostream.cc +++ b/libs/format/fmt/ostream.cc @@ -4,34 +4,15 @@ Copyright (c) 2012 - 2016, Victor Zverovich All rights reserved. - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + For the license information refer to format.h. */ #include "ostream.h" namespace fmt { -namespace { -// Write the content of w to os. -void write(std::ostream &os, Writer &w) { +namespace internal { +FMT_FUNC void write(std::ostream &os, Writer &w) { const char *data = w.data(); typedef internal::MakeUnsigned::Type UnsignedStreamSize; UnsignedStreamSize size = w.size(); @@ -49,13 +30,6 @@ void write(std::ostream &os, Writer &w) { FMT_FUNC void print(std::ostream &os, CStringRef format_str, ArgList args) { MemoryWriter w; w.write(format_str, args); - write(os, w); -} - -FMT_FUNC int fprintf(std::ostream &os, CStringRef format, ArgList args) { - MemoryWriter w; - printf(w, format, args); - write(os, w); - return static_cast(w.size()); + internal::write(os, w); } } // namespace fmt diff --git a/libs/format/fmt/ostream.h b/libs/format/fmt/ostream.h index 458d31de3..84a02d173 100644 --- a/libs/format/fmt/ostream.h +++ b/libs/format/fmt/ostream.h @@ -4,25 +4,7 @@ Copyright (c) 2012 - 2016, Victor Zverovich All rights reserved. - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + For the license information refer to format.h. */ #ifndef FMT_OSTREAM_H_ @@ -42,28 +24,27 @@ class FormatBuf : public std::basic_streambuf { typedef typename std::basic_streambuf::traits_type traits_type; Buffer &buffer_; - Char *start_; public: - FormatBuf(Buffer &buffer) : buffer_(buffer), start_(&buffer[0]) { - this->setp(start_, start_ + buffer_.capacity()); - } + FormatBuf(Buffer &buffer) : buffer_(buffer) {} - int_type overflow(int_type ch = traits_type::eof()) { - if (!traits_type::eq_int_type(ch, traits_type::eof())) { - size_t buf_size = size(); - buffer_.resize(buf_size); - buffer_.reserve(buf_size * 2); + protected: + // The put-area is actually always empty. This makes the implementation + // simpler and has the advantage that the streambuf and the buffer are always + // in sync and sputc never writes into uninitialized memory. The obvious + // disadvantage is that each call to sputc always results in a (virtual) call + // to overflow. There is no disadvantage here for sputn since this always + // results in a call to xsputn. - start_ = &buffer_[0]; - start_[buf_size] = traits_type::to_char_type(ch); - this->setp(start_+ buf_size + 1, start_ + buf_size * 2); - } + int_type overflow(int_type ch = traits_type::eof()) FMT_OVERRIDE { + if (!traits_type::eq_int_type(ch, traits_type::eof())) + buffer_.push_back(static_cast(ch)); return ch; } - size_t size() const { - return to_unsigned(this->pptr() - start_); + std::streamsize xsputn(const Char *s, std::streamsize count) FMT_OVERRIDE { + buffer_.append(s, s + count); + return count; } }; @@ -84,19 +65,22 @@ struct ConvertToIntImpl { value = sizeof(convert(get() << get())) == sizeof(No) }; }; + +// Write the content of w to os. +FMT_API void write(std::ostream &os, Writer &w); } // namespace internal // Formats a value. -template -void format(BasicFormatter &f, - const Char *&format_str, const T &value) { +template +void format_arg(BasicFormatter &f, + const Char *&format_str, const T &value) { internal::MemoryBuffer buffer; internal::FormatBuf format_buf(buffer); std::basic_ostream output(&format_buf); output << value; - BasicStringRef str(&buffer[0], format_buf.size()); + BasicStringRef str(&buffer[0], buffer.size()); typedef internal::MakeArg< BasicFormatter > MakeArg; format_str = f.format(format_str, MakeArg(str)); } @@ -112,18 +96,6 @@ void format(BasicFormatter &f, */ FMT_API void print(std::ostream &os, CStringRef format_str, ArgList args); FMT_VARIADIC(void, print, std::ostream &, CStringRef) - -/** - \rst - Prints formatted data to the stream *os*. - - **Example**:: - - fprintf(cerr, "Don't %s!", "panic"); - \endrst - */ -FMT_API int fprintf(std::ostream &os, CStringRef format_str, ArgList args); -FMT_VARIADIC(int, fprintf, std::ostream &, CStringRef) } // namespace fmt #ifdef FMT_HEADER_ONLY diff --git a/libs/format/fmt/posix.cc b/libs/format/fmt/posix.cc index 1ec746a46..356668c13 100644 --- a/libs/format/fmt/posix.cc +++ b/libs/format/fmt/posix.cc @@ -1,28 +1,10 @@ /* A C++ interface to POSIX functions. - Copyright (c) 2014 - 2016, Victor Zverovich + Copyright (c) 2012 - 2016, Victor Zverovich All rights reserved. - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + For the license information refer to format.h. */ // Disable bogus MSVC warnings. @@ -39,6 +21,9 @@ #ifndef _WIN32 # include #else +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif # include # include @@ -90,16 +75,16 @@ fmt::BufferedFile::BufferedFile( fmt::CStringRef filename, fmt::CStringRef mode) { FMT_RETRY_VAL(file_, FMT_SYSTEM(fopen(filename.c_str(), mode.c_str())), 0); if (!file_) - throw SystemError(errno, "cannot open file {}", filename); + FMT_THROW(SystemError(errno, "cannot open file {}", filename)); } void fmt::BufferedFile::close() { if (!file_) return; int result = FMT_SYSTEM(fclose(file_)); - file_ = 0; + file_ = FMT_NULL; if (result != 0) - throw SystemError(errno, "cannot close file"); + FMT_THROW(SystemError(errno, "cannot close file")); } // A macro used to prevent expansion of fileno on broken versions of MinGW. @@ -108,7 +93,7 @@ void fmt::BufferedFile::close() { int fmt::BufferedFile::fileno() const { int fd = FMT_POSIX_CALL(fileno FMT_ARGS(file_)); if (fd == -1) - throw SystemError(errno, "cannot get file descriptor"); + FMT_THROW(SystemError(errno, "cannot get file descriptor")); return fd; } @@ -121,7 +106,7 @@ fmt::File::File(fmt::CStringRef path, int oflag) { FMT_RETRY(fd_, FMT_POSIX_CALL(open(path.c_str(), oflag, mode))); #endif if (fd_ == -1) - throw SystemError(errno, "cannot open file {}", path); + FMT_THROW(SystemError(errno, "cannot open file {}", path)); } fmt::File::~File() FMT_NOEXCEPT { @@ -139,7 +124,7 @@ void fmt::File::close() { int result = FMT_POSIX_CALL(close(fd_)); fd_ = -1; if (result != 0) - throw SystemError(errno, "cannot close file"); + FMT_THROW(SystemError(errno, "cannot close file")); } fmt::LongLong fmt::File::size() const { @@ -153,7 +138,7 @@ fmt::LongLong fmt::File::size() const { if (size_lower == INVALID_FILE_SIZE) { DWORD error = GetLastError(); if (error != NO_ERROR) - throw WindowsError(GetLastError(), "cannot get file size"); + FMT_THROW(WindowsError(GetLastError(), "cannot get file size")); } fmt::ULongLong long_size = size_upper; return (long_size << sizeof(DWORD) * CHAR_BIT) | size_lower; @@ -161,7 +146,7 @@ fmt::LongLong fmt::File::size() const { typedef struct stat Stat; Stat file_stat = Stat(); if (FMT_POSIX_CALL(fstat(fd_, &file_stat)) == -1) - throw SystemError(errno, "cannot get file attributes"); + FMT_THROW(SystemError(errno, "cannot get file attributes")); FMT_STATIC_ASSERT(sizeof(fmt::LongLong) >= sizeof(file_stat.st_size), "return type of File::size is not large enough"); return file_stat.st_size; @@ -172,7 +157,7 @@ std::size_t fmt::File::read(void *buffer, std::size_t count) { RWResult result = 0; FMT_RETRY(result, FMT_POSIX_CALL(read(fd_, buffer, convert_rwcount(count)))); if (result < 0) - throw SystemError(errno, "cannot read from file"); + FMT_THROW(SystemError(errno, "cannot read from file")); return internal::to_unsigned(result); } @@ -180,7 +165,7 @@ std::size_t fmt::File::write(const void *buffer, std::size_t count) { RWResult result = 0; FMT_RETRY(result, FMT_POSIX_CALL(write(fd_, buffer, convert_rwcount(count)))); if (result < 0) - throw SystemError(errno, "cannot write to file"); + FMT_THROW(SystemError(errno, "cannot write to file")); return internal::to_unsigned(result); } @@ -189,7 +174,7 @@ fmt::File fmt::File::dup(int fd) { // http://pubs.opengroup.org/onlinepubs/009695399/functions/dup.html int new_fd = FMT_POSIX_CALL(dup(fd)); if (new_fd == -1) - throw SystemError(errno, "cannot duplicate file descriptor {}", fd); + FMT_THROW(SystemError(errno, "cannot duplicate file descriptor {}", fd)); return File(new_fd); } @@ -197,8 +182,8 @@ void fmt::File::dup2(int fd) { int result = 0; FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd))); if (result == -1) { - throw SystemError(errno, - "cannot duplicate file descriptor {} to {}", fd_, fd); + FMT_THROW(SystemError(errno, + "cannot duplicate file descriptor {} to {}", fd_, fd)); } } @@ -225,7 +210,7 @@ void fmt::File::pipe(File &read_end, File &write_end) { int result = FMT_POSIX_CALL(pipe(fds)); #endif if (result != 0) - throw SystemError(errno, "cannot create pipe"); + FMT_THROW(SystemError(errno, "cannot create pipe")); // The following assignments don't throw because read_fd and write_fd // are closed. read_end = File(fds[0]); @@ -236,7 +221,7 @@ fmt::BufferedFile fmt::File::fdopen(const char *mode) { // Don't retry as fdopen doesn't return EINTR. FILE *f = FMT_POSIX_CALL(fdopen(fd_, mode)); if (!f) - throw SystemError(errno, "cannot associate stream with file descriptor"); + FMT_THROW(SystemError(errno, "cannot associate stream with file descriptor")); BufferedFile file(f); fd_ = -1; return file; @@ -250,7 +235,7 @@ long fmt::getpagesize() { #else long size = FMT_POSIX_CALL(sysconf(_SC_PAGESIZE)); if (size < 0) - throw SystemError(errno, "cannot get memory page size"); + FMT_THROW(SystemError(errno, "cannot get memory page size")); return size; #endif } diff --git a/libs/format/fmt/posix.h b/libs/format/fmt/posix.h index ab6d12e87..88512de55 100644 --- a/libs/format/fmt/posix.h +++ b/libs/format/fmt/posix.h @@ -1,34 +1,16 @@ /* A C++ interface to POSIX functions. - Copyright (c) 2014 - 2016, Victor Zverovich + Copyright (c) 2012 - 2016, Victor Zverovich All rights reserved. - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + For the license information refer to format.h. */ #ifndef FMT_POSIX_H_ #define FMT_POSIX_H_ -#ifdef __MINGW32__ +#if defined(__MINGW32__) || defined(__CYGWIN__) // Workaround MinGW bug https://sourceforge.net/p/mingw/bugs/2024/. # undef __STRICT_ANSI__ #endif @@ -41,7 +23,7 @@ #include -#ifdef __APPLE__ +#if defined __APPLE__ || defined(__FreeBSD__) # include // for LC_NUMERIC_MASK on OS X #endif @@ -69,25 +51,6 @@ # endif #endif -#if FMT_GCC_VERSION >= 407 -# define FMT_UNUSED __attribute__((unused)) -#else -# define FMT_UNUSED -#endif - -#ifndef FMT_USE_STATIC_ASSERT -# define FMT_USE_STATIC_ASSERT 0 -#endif - -#if FMT_USE_STATIC_ASSERT || FMT_HAS_FEATURE(cxx_static_assert) || \ - (FMT_GCC_VERSION >= 403 && FMT_HAS_GXX_CXX11) || _MSC_VER >= 1600 -# define FMT_STATIC_ASSERT(cond, message) static_assert(cond, message) -#else -# define FMT_CONCAT_(a, b) FMT_CONCAT(a, b) -# define FMT_STATIC_ASSERT(cond, message) \ - typedef int FMT_CONCAT_(Assert, __LINE__)[(cond) ? 1 : -1] FMT_UNUSED -#endif - // Retries the expression while it evaluates to error_result and errno // equals to EINTR. #ifndef _WIN32 @@ -125,10 +88,10 @@ class BufferedFile { public: // Constructs a BufferedFile object which doesn't represent any file. - BufferedFile() FMT_NOEXCEPT : file_(0) {} + BufferedFile() FMT_NOEXCEPT : file_(FMT_NULL) {} // Destroys the object closing the file it represents if any. - ~BufferedFile() FMT_NOEXCEPT; + FMT_API ~BufferedFile() FMT_NOEXCEPT; #if !FMT_USE_RVALUE_REFERENCES // Emulate a move constructor and a move assignment operator if rvalue @@ -147,7 +110,7 @@ public: // A "move constructor" for moving from an lvalue. BufferedFile(BufferedFile &f) FMT_NOEXCEPT : file_(f.file_) { - f.file_ = 0; + f.file_ = FMT_NULL; } // A "move assignment operator" for moving from a temporary. @@ -161,7 +124,7 @@ public: BufferedFile &operator=(BufferedFile &other) { close(); file_ = other.file_; - other.file_ = 0; + other.file_ = FMT_NULL; return *this; } @@ -169,7 +132,7 @@ public: // BufferedFile file = BufferedFile(...); operator Proxy() FMT_NOEXCEPT { Proxy p = {file_}; - file_ = 0; + file_ = FMT_NULL; return p; } @@ -179,29 +142,29 @@ public: public: BufferedFile(BufferedFile &&other) FMT_NOEXCEPT : file_(other.file_) { - other.file_ = 0; + other.file_ = FMT_NULL; } BufferedFile& operator=(BufferedFile &&other) { close(); file_ = other.file_; - other.file_ = 0; + other.file_ = FMT_NULL; return *this; } #endif // Opens a file. - BufferedFile(CStringRef filename, CStringRef mode); + FMT_API BufferedFile(CStringRef filename, CStringRef mode); // Closes the file. - void close(); + FMT_API void close(); // Returns the pointer to a FILE object representing this file. FILE *get() const FMT_NOEXCEPT { return file_; } // We place parentheses around fileno to workaround a bug in some versions // of MinGW that define fileno as a macro. - int (fileno)() const; + FMT_API int (fileno)() const; void print(CStringRef format_str, const ArgList &args) { fmt::print(file_, format_str, args); @@ -234,7 +197,7 @@ class File { File() FMT_NOEXCEPT : fd_(-1) {} // Opens a file and constructs a File object representing this file. - File(CStringRef path, int oflag); + FMT_API File(CStringRef path, int oflag); #if !FMT_USE_RVALUE_REFERENCES // Emulate a move constructor and a move assignment operator if rvalue @@ -297,49 +260,50 @@ class File { #endif // Destroys the object closing the file it represents if any. - ~File() FMT_NOEXCEPT; + FMT_API ~File() FMT_NOEXCEPT; // Returns the file descriptor. int descriptor() const FMT_NOEXCEPT { return fd_; } // Closes the file. - void close(); + FMT_API void close(); // Returns the file size. The size has signed type for consistency with // stat::st_size. - LongLong size() const; + FMT_API LongLong size() const; // Attempts to read count bytes from the file into the specified buffer. - std::size_t read(void *buffer, std::size_t count); + FMT_API std::size_t read(void *buffer, std::size_t count); // Attempts to write count bytes from the specified buffer to the file. - std::size_t write(const void *buffer, std::size_t count); + FMT_API std::size_t write(const void *buffer, std::size_t count); // Duplicates a file descriptor with the dup function and returns // the duplicate as a file object. - static File dup(int fd); + FMT_API static File dup(int fd); // Makes fd be the copy of this file descriptor, closing fd first if // necessary. - void dup2(int fd); + FMT_API void dup2(int fd); // Makes fd be the copy of this file descriptor, closing fd first if // necessary. - void dup2(int fd, ErrorCode &ec) FMT_NOEXCEPT; + FMT_API void dup2(int fd, ErrorCode &ec) FMT_NOEXCEPT; // Creates a pipe setting up read_end and write_end file objects for reading // and writing respectively. - static void pipe(File &read_end, File &write_end); + FMT_API static void pipe(File &read_end, File &write_end); // Creates a BufferedFile object associated with this file and detaches // this File object from the file. - BufferedFile fdopen(const char *mode); + FMT_API BufferedFile fdopen(const char *mode); }; // Returns the memory page size. long getpagesize(); -#if defined(LC_NUMERIC_MASK) || defined(_MSC_VER) +#if (defined(LC_NUMERIC_MASK) || defined(_MSC_VER)) && \ + !defined(__ANDROID__) && !defined(__CYGWIN__) # define FMT_LOCALE #endif @@ -372,9 +336,9 @@ class Locale { public: typedef locale_t Type; - Locale() : locale_(newlocale(LC_NUMERIC_MASK, "C", NULL)) { + Locale() : locale_(newlocale(LC_NUMERIC_MASK, "C", FMT_NULL)) { if (!locale_) - throw fmt::SystemError(errno, "cannot create locale"); + FMT_THROW(fmt::SystemError(errno, "cannot create locale")); } ~Locale() { freelocale(locale_); } @@ -383,7 +347,7 @@ class Locale { // Converts string to floating-point number and advances str past the end // of the parsed input. double strtod(const char *&str) const { - char *end = 0; + char *end = FMT_NULL; double result = strtod_l(str, &end, locale_); str = end; return result; diff --git a/libs/format/fmt/time.h b/libs/format/fmt/time.h index 863382c0b..c98b0e011 100644 --- a/libs/format/fmt/time.h +++ b/libs/format/fmt/time.h @@ -4,37 +4,25 @@ Copyright (c) 2012 - 2016, Victor Zverovich All rights reserved. - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + For the license information refer to format.h. */ #ifndef FMT_TIME_H_ #define FMT_TIME_H_ -#include "fmt/format.h" +#include "format.h" #include +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4702) // unreachable code +# pragma warning(disable: 4996) // "deprecated" functions +#endif + namespace fmt { template -void format(BasicFormatter &f, - const char *&format_str, const std::tm &tm) { +void format_arg(BasicFormatter &f, + const char *&format_str, const std::tm &tm) { if (*format_str == ':') ++format_str; const char *end = format_str; @@ -54,11 +42,102 @@ void format(BasicFormatter &f, buffer.resize(start + count); break; } + if (size >= format.size() * 256) { + // If the buffer is 256 times larger than the format string, assume + // that `strftime` gives an empty result. There doesn't seem to be a + // better way to distinguish the two cases: + // https://github.com/fmtlib/fmt/issues/367 + break; + } const std::size_t MIN_GROWTH = 10; - buffer.reserve(buffer.capacity() + size > MIN_GROWTH ? size : MIN_GROWTH); + buffer.reserve(buffer.capacity() + (size > MIN_GROWTH ? size : MIN_GROWTH)); } format_str = end + 1; } + +namespace internal{ +inline Null<> localtime_r(...) { return Null<>(); } +inline Null<> localtime_s(...) { return Null<>(); } +inline Null<> gmtime_r(...) { return Null<>(); } +inline Null<> gmtime_s(...) { return Null<>(); } } +// Thread-safe replacement for std::localtime +inline std::tm localtime(std::time_t time) { + struct LocalTime { + std::time_t time_; + std::tm tm_; + + LocalTime(std::time_t t): time_(t) {} + + bool run() { + using namespace fmt::internal; + return handle(localtime_r(&time_, &tm_)); + } + + bool handle(std::tm *tm) { return tm != FMT_NULL; } + + bool handle(internal::Null<>) { + using namespace fmt::internal; + return fallback(localtime_s(&tm_, &time_)); + } + + bool fallback(int res) { return res == 0; } + + bool fallback(internal::Null<>) { + using namespace fmt::internal; + std::tm *tm = std::localtime(&time_); + if (tm) tm_ = *tm; + return tm != FMT_NULL; + } + }; + LocalTime lt(time); + if (lt.run()) + return lt.tm_; + // Too big time values may be unsupported. + FMT_THROW(fmt::FormatError("time_t value out of range")); + return std::tm(); +} + +// Thread-safe replacement for std::gmtime +inline std::tm gmtime(std::time_t time) { + struct GMTime { + std::time_t time_; + std::tm tm_; + + GMTime(std::time_t t): time_(t) {} + + bool run() { + using namespace fmt::internal; + return handle(gmtime_r(&time_, &tm_)); + } + + bool handle(std::tm *tm) { return tm != FMT_NULL; } + + bool handle(internal::Null<>) { + using namespace fmt::internal; + return fallback(gmtime_s(&tm_, &time_)); + } + + bool fallback(int res) { return res == 0; } + + bool fallback(internal::Null<>) { + std::tm *tm = std::gmtime(&time_); + if (tm != FMT_NULL) tm_ = *tm; + return tm != FMT_NULL; + } + }; + GMTime gt(time); + if (gt.run()) + return gt.tm_; + // Too big time values may be unsupported. + FMT_THROW(fmt::FormatError("time_t value out of range")); + return std::tm(); +} +} //namespace fmt + +#ifdef _MSC_VER +# pragma warning(pop) +#endif + #endif // FMT_TIME_H_ diff --git a/libs/format/support/appveyor-build.py b/libs/format/support/appveyor-build.py index a5b684ef3..3b747f3cc 100644 --- a/libs/format/support/appveyor-build.py +++ b/libs/format/support/appveyor-build.py @@ -10,22 +10,23 @@ platform = os.environ.get('PLATFORM') path = os.environ['PATH'] cmake_command = ['cmake', '-DFMT_PEDANTIC=ON', '-DCMAKE_BUILD_TYPE=' + config] if build == 'mingw': - cmake_command.append('-GMinGW Makefiles') - build_command = ['mingw32-make', '-j4'] - test_command = ['mingw32-make', 'test'] - # Remove the path to Git bin directory from $PATH because it breaks MinGW config. - path = path.replace(r'C:\Program Files (x86)\Git\bin', '') - os.environ['PATH'] = r'C:\MinGW\bin;' + path + cmake_command.append('-GMinGW Makefiles') + build_command = ['mingw32-make', '-j4'] + test_command = ['mingw32-make', 'test'] + # Remove the path to Git bin directory from $PATH because it breaks + # MinGW config. + path = path.replace(r'C:\Program Files (x86)\Git\bin', '') + os.environ['PATH'] = r'C:\MinGW\bin;' + path else: - # Add MSBuild 14.0 to PATH as described in - # http://help.appveyor.com/discussions/problems/2229-v140-not-found-on-vs2105rc. - os.environ['PATH'] = r'C:\Program Files (x86)\MSBuild\14.0\Bin;' + path - generator = 'Visual Studio 14 2015' - if platform == 'x64': - generator += ' Win64' - cmake_command.append('-G' + generator) - build_command = ['cmake', '--build', '.', '--config', config, '--', '/m:4'] - test_command = ['ctest', '-C', config] + # Add MSBuild 14.0 to PATH as described in + # http://help.appveyor.com/discussions/problems/2229-v140-not-found-on-vs2105rc. + os.environ['PATH'] = r'C:\Program Files (x86)\MSBuild\14.0\Bin;' + path + generator = 'Visual Studio 14 2015' + if platform == 'x64': + generator += ' Win64' + cmake_command.append('-G' + generator) + build_command = ['cmake', '--build', '.', '--config', config, '--', '/m:4'] + test_command = ['ctest', '-C', config] check_call(cmake_command) check_call(build_command) diff --git a/libs/format/support/appveyor.yml b/libs/format/support/appveyor.yml index 087512c31..a651c525f 100644 --- a/libs/format/support/appveyor.yml +++ b/libs/format/support/appveyor.yml @@ -20,3 +20,7 @@ build_script: on_failure: - appveyor PushArtifact Testing/Temporary/LastTest.log - appveyor AddTest test + +# Uncomment this to debug AppVeyor failures. +#on_finish: +# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) diff --git a/libs/format/support/cmake/cxx11.cmake b/libs/format/support/cmake/cxx11.cmake index 31ea1063e..21d125433 100644 --- a/libs/format/support/cmake/cxx11.cmake +++ b/libs/format/support/cmake/cxx11.cmake @@ -20,7 +20,14 @@ if (FMT_USE_CPP11) check_cxx_source_compiles(" #include int main() {}" FMT_CPP11_UNISTD_H) - if (FMT_CPP11_CMATH AND FMT_CPP11_UNISTD_H) + # Check if snprintf works with -std=c++11. It may not in MinGW. + check_cxx_source_compiles(" + #include + int main() { + char buffer[10]; + snprintf(buffer, 10, \"foo\"); + }" FMT_CPP11_SNPRINTF) + if (FMT_CPP11_CMATH AND FMT_CPP11_UNISTD_H AND FMT_CPP11_SNPRINTF) set(CPP11_FLAG -std=c++11) else () check_cxx_compiler_flag(-std=gnu++11 HAVE_STD_GNUPP11_FLAG) @@ -37,6 +44,11 @@ if (FMT_USE_CPP11) endif () endif () +if (CMAKE_CXX_STANDARD) + # Don't use -std compiler flag if CMAKE_CXX_STANDARD is specified. + set(CPP11_FLAG ) +endif () + set(CMAKE_REQUIRED_FLAGS ${CPP11_FLAG}) # Check if variadic templates are working and not affected by GCC bug 39653: diff --git a/libs/format/support/travis-build.py b/libs/format/support/travis-build.py index 6dc096669..910177920 100644 --- a/libs/format/support/travis-build.py +++ b/libs/format/support/travis-build.py @@ -6,34 +6,28 @@ import errno, os, re, shutil, sys, tempfile, urllib from subprocess import call, check_call, check_output, Popen, PIPE, STDOUT def rmtree_if_exists(dir): - try: - shutil.rmtree(dir) - except OSError as e: - if e.errno == errno.ENOENT: - pass + try: + shutil.rmtree(dir) + except OSError as e: + if e.errno == errno.ENOENT: + pass def makedirs_if_not_exist(dir): - try: - os.makedirs(dir) - except OSError as e: - if e.errno != errno.EEXIST: - raise + try: + os.makedirs(dir) + except OSError as e: + if e.errno != errno.EEXIST: + raise -fmt_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) - -build = os.environ['BUILD'] -if build == 'Doc': - travis = 'TRAVIS' in os.environ - # Install dependencies. - if travis: +def install_dependencies(): branch = os.environ['TRAVIS_BRANCH'] if branch != 'master': - print('Branch: ' + branch) - exit(0) # Ignore non-master branches - check_call('curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | ' + - 'sudo apt-key add -', shell=True) - check_call('echo "deb https://deb.nodesource.com/node_0.10 precise main" | ' + - 'sudo tee /etc/apt/sources.list.d/nodesource.list', shell=True) + print('Branch: ' + branch) + exit(0) # Ignore non-master branches + check_call('curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key ' + + '| sudo apt-key add -', shell=True) + check_call('echo "deb https://deb.nodesource.com/node_0.10 precise main" ' + + '| sudo tee /etc/apt/sources.list.d/nodesource.list', shell=True) check_call(['sudo', 'apt-get', 'update']) check_call(['sudo', 'apt-get', 'install', 'python-virtualenv', 'nodejs']) check_call(['npm', 'install', '-g', 'less', 'less-plugin-clean-css']) @@ -41,39 +35,48 @@ if build == 'Doc': urllib.urlretrieve('http://mirrors.kernel.org/ubuntu/pool/main/d/doxygen/' + deb_file, deb_file) check_call(['sudo', 'dpkg', '-i', deb_file]) - sys.path.insert(0, os.path.join(fmt_dir, 'doc')) - import build - html_dir = build.build_docs() - repo = 'fmtlib.github.io' - if travis and 'KEY' not in os.environ: - # Don't update the repo if building on Travis from an account that doesn't - # have push access. - print('Skipping update of ' + repo) - exit(0) - # Clone the fmtlib.github.io repo. - rmtree_if_exists(repo) - git_url = 'https://github.com/' if travis else 'git@github.com:' - check_call(['git', 'clone', git_url + 'fmtlib/{}.git'.format(repo)]) - # Copy docs to the repo. - target_dir = os.path.join(repo, 'dev') - rmtree_if_exists(target_dir) - shutil.copytree(html_dir, target_dir, ignore=shutil.ignore_patterns('.*')) - if travis: - check_call(['git', 'config', '--global', 'user.name', 'amplbot']) - check_call(['git', 'config', '--global', 'user.email', 'viz@ampl.com']) - # Push docs to GitHub pages. - check_call(['git', 'add', '--all'], cwd=repo) - if call(['git', 'diff-index', '--quiet', 'HEAD'], cwd=repo): - check_call(['git', 'commit', '-m', 'Update documentation'], cwd=repo) - cmd = 'git push' + +fmt_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) + +build = os.environ['BUILD'] +if build == 'Doc': + travis = 'TRAVIS' in os.environ if travis: - cmd += ' https://$KEY@github.com/fmtlib/fmtlib.github.io.git master' - p = Popen(cmd, shell=True, stdout=PIPE, stderr=STDOUT, cwd=repo) - # Print the output without the key. - print(p.communicate()[0].replace(os.environ['KEY'], '$KEY')) - if p.returncode != 0: - raise CalledProcessError(p.returncode, cmd) - exit(0) + install_dependencies() + sys.path.insert(0, os.path.join(fmt_dir, 'doc')) + import build + build.create_build_env() + html_dir = build.build_docs() + repo = 'fmtlib.github.io' + if travis and 'KEY' not in os.environ: + # Don't update the repo if building on Travis from an account that + # doesn't have push access. + print('Skipping update of ' + repo) + exit(0) + # Clone the fmtlib.github.io repo. + rmtree_if_exists(repo) + git_url = 'https://github.com/' if travis else 'git@github.com:' + check_call(['git', 'clone', git_url + 'fmtlib/{}.git'.format(repo)]) + # Copy docs to the repo. + target_dir = os.path.join(repo, 'dev') + rmtree_if_exists(target_dir) + shutil.copytree(html_dir, target_dir, ignore=shutil.ignore_patterns('.*')) + if travis: + check_call(['git', 'config', '--global', 'user.name', 'amplbot']) + check_call(['git', 'config', '--global', 'user.email', 'viz@ampl.com']) + # Push docs to GitHub pages. + check_call(['git', 'add', '--all'], cwd=repo) + if call(['git', 'diff-index', '--quiet', 'HEAD'], cwd=repo): + check_call(['git', 'commit', '-m', 'Update documentation'], cwd=repo) + cmd = 'git push' + if travis: + cmd += ' https://$KEY@github.com/fmtlib/fmtlib.github.io.git master' + p = Popen(cmd, shell=True, stdout=PIPE, stderr=STDOUT, cwd=repo) + # Print the output without the key. + print(p.communicate()[0].replace(os.environ['KEY'], '$KEY')) + if p.returncode != 0: + raise CalledProcessError(p.returncode, cmd) + exit(0) standard = os.environ['STANDARD'] install_dir = os.path.join(fmt_dir, "_install") @@ -83,11 +86,13 @@ test_build_dir = os.path.join(fmt_dir, "_build_test") # Configure library. makedirs_if_not_exist(build_dir) common_cmake_flags = [ - '-DCMAKE_INSTALL_PREFIX=' + install_dir, '-DCMAKE_BUILD_TYPE=' + build + '-DCMAKE_INSTALL_PREFIX=' + install_dir, '-DCMAKE_BUILD_TYPE=' + build ] extra_cmake_flags = [] if standard != '0x': - extra_cmake_flags = ['-DCMAKE_CXX_FLAGS=-std=c++' + standard, '-DFMT_USE_CPP11=OFF'] + extra_cmake_flags = [ + '-DCMAKE_CXX_FLAGS=-std=c++' + standard, '-DFMT_USE_CPP11=OFF' + ] check_call(['cmake', '-DFMT_DOC=OFF', '-DFMT_PEDANTIC=ON', fmt_dir] + common_cmake_flags + extra_cmake_flags, cwd=build_dir) @@ -98,9 +103,9 @@ check_call(['make', '-j4'], cwd=build_dir) env = os.environ.copy() env['CTEST_OUTPUT_ON_FAILURE'] = '1' if call(['make', 'test'], env=env, cwd=build_dir): - with open('Testing/Temporary/LastTest.log', 'r') as f: - print(f.read()) - sys.exit(-1) + with open('Testing/Temporary/LastTest.log', 'r') as f: + print(f.read()) + sys.exit(-1) # Install library. check_call(['make', 'install'], cwd=build_dir) diff --git a/libs/format/support/update-converity-branch.py b/libs/format/support/update-converity-branch.py index 36c0475ae..519f5d00d 100644 --- a/libs/format/support/update-converity-branch.py +++ b/libs/format/support/update-converity-branch.py @@ -8,23 +8,23 @@ import shutil, tempfile from subprocess import check_output, STDOUT class Git: - def __init__(self, dir): - self.dir = dir + def __init__(self, dir): + self.dir = dir - def __call__(self, *args): - output = check_output(['git'] + list(args), cwd=self.dir, stderr=STDOUT) - print(output) - return output + def __call__(self, *args): + output = check_output(['git'] + list(args), cwd=self.dir, stderr=STDOUT) + print(output) + return output dir = tempfile.mkdtemp() try: - git = Git(dir) - git('clone', '-b', 'coverity', 'git@github.com:fmtlib/fmt.git', dir) - output = git('merge', '-X', 'theirs', '--no-commit', 'origin/master') - if 'Fast-forward' not in output: - git('reset', 'HEAD', '.travis.yml') - git('checkout', '--', '.travis.yml') - git('commit', '-m', 'Update coverity branch') - git('push') + git = Git(dir) + git('clone', '-b', 'coverity', 'git@github.com:fmtlib/fmt.git', dir) + output = git('merge', '-X', 'theirs', '--no-commit', 'origin/master') + if 'Fast-forward' not in output: + git('reset', 'HEAD', '.travis.yml') + git('checkout', '--', '.travis.yml') + git('commit', '-m', 'Update coverity branch') + git('push') finally: - shutil.rmtree(dir) + shutil.rmtree(dir) diff --git a/libs/format/test/CMakeLists.txt b/libs/format/test/CMakeLists.txt index e4e868d54..31a418de7 100644 --- a/libs/format/test/CMakeLists.txt +++ b/libs/format/test/CMakeLists.txt @@ -56,11 +56,19 @@ if (CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) set(PEDANTIC_COMPILE_FLAGS -Wall -Wextra -Wno-long-long -Wno-variadic-macros) endif () +function(add_fmt_executable name) + add_executable(${name} ${ARGN}) + if (MINGW) + target_link_libraries(${name} -static-libgcc -static-libstdc++) + endif () +endfunction() + # Adds a test. # Usage: add_fmt_test(name srcs...) function(add_fmt_test name) - add_executable(${name} ${name}.cc ${ARGN}) + add_fmt_executable(${name} ${name}.cc ${ARGN}) target_link_libraries(${name} test-main) + # define if certain c++ features can be used target_compile_definitions(${name} PRIVATE FMT_USE_TYPE_TRAITS=$ @@ -72,13 +80,17 @@ function(add_fmt_test name) endfunction() add_fmt_test(assert-test) +add_fmt_test(container-test) add_fmt_test(gtest-extra-test) add_fmt_test(format-test) add_fmt_test(format-impl-test) add_fmt_test(ostream-test) add_fmt_test(printf-test) +add_fmt_test(string-test) +add_fmt_test(time-test) add_fmt_test(util-test mock-allocator.h) add_fmt_test(macro-test) +add_fmt_test(custom-formatter-test) # Enable stricter options for one test to make sure that the header is free of # warnings. @@ -87,7 +99,8 @@ if (FMT_PEDANTIC AND MSVC) endif () if (HAVE_OPEN) - add_executable(posix-mock-test posix-mock-test.cc ../fmt/format.cc ${TEST_MAIN_SRC}) + add_fmt_executable(posix-mock-test + posix-mock-test.cc ../fmt/format.cc ../fmt/printf.cc ${TEST_MAIN_SRC}) target_include_directories(posix-mock-test PRIVATE ${PROJECT_SOURCE_DIR}) target_compile_definitions(posix-mock-test PRIVATE FMT_USE_FILE_DESCRIPTORS=1) target_link_libraries(posix-mock-test gmock) @@ -95,7 +108,7 @@ if (HAVE_OPEN) add_fmt_test(posix-test) endif () -add_executable(header-only-test +add_fmt_executable(header-only-test header-only-test.cc header-only-test2.cc test-main.cc) target_link_libraries(header-only-test gmock) if (TARGET fmt-header-only) @@ -109,6 +122,7 @@ endif () check_cxx_compiler_flag(-fno-exceptions HAVE_FNO_EXCEPTIONS_FLAG) if (HAVE_FNO_EXCEPTIONS_FLAG) add_library(noexception-test ../fmt/format.cc) + target_include_directories(noexception-test PRIVATE ${PROJECT_SOURCE_DIR}) target_compile_options(noexception-test PRIVATE -fno-exceptions) endif () @@ -116,6 +130,7 @@ if (FMT_PEDANTIC) # Test that the library compiles without windows.h. if (CMAKE_SYSTEM_NAME STREQUAL "Windows") add_library(no-windows-h-test ../fmt/format.cc) + target_include_directories(no-windows-h-test PRIVATE ${PROJECT_SOURCE_DIR}) target_compile_definitions(no-windows-h-test PRIVATE FMT_USE_WINDOWS_H=0) endif () @@ -125,7 +140,7 @@ if (FMT_PEDANTIC) "${CMAKE_CURRENT_BINARY_DIR}/compile-test" --build-generator ${CMAKE_GENERATOR} --build-makeprogram ${CMAKE_MAKE_PROGRAM} - --build-options + --build-options "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}" "-DCPP11_FLAG=${CPP11_FLAG}" "-DSUPPORTS_USER_DEFINED_LITERALS=${SUPPORTS_USER_DEFINED_LITERALS}") diff --git a/libs/format/test/add-subdirectory-test/CMakeLists.txt b/libs/format/test/add-subdirectory-test/CMakeLists.txt index 5460363a8..d1edd8a52 100644 --- a/libs/format/test/add-subdirectory-test/CMakeLists.txt +++ b/libs/format/test/add-subdirectory-test/CMakeLists.txt @@ -5,9 +5,9 @@ project(fmt-test) add_subdirectory(../.. fmt) add_executable(library-test "main.cc") -target_link_libraries(library-test fmt) +target_link_libraries(library-test fmt::fmt) -if (TARGET fmt-header-only) +if (TARGET fmt::fmt-header-only) add_executable(header-only-test "main.cc") - target_link_libraries(header-only-test fmt-header-only) + target_link_libraries(header-only-test fmt::fmt-header-only) endif () diff --git a/libs/format/test/find-package-test/CMakeLists.txt b/libs/format/test/find-package-test/CMakeLists.txt index 1f28c30c6..40c075609 100644 --- a/libs/format/test/find-package-test/CMakeLists.txt +++ b/libs/format/test/find-package-test/CMakeLists.txt @@ -5,9 +5,9 @@ project(fmt-test) find_package(FMT REQUIRED) add_executable(library-test main.cc) -target_link_libraries(library-test fmt) +target_link_libraries(library-test fmt::fmt) -if (TARGET fmt-header-only) +if (TARGET fmt::fmt-header-only) add_executable(header-only-test main.cc) - target_link_libraries(header-only-test fmt-header-only) + target_link_libraries(header-only-test fmt::fmt-header-only) endif () diff --git a/libs/format/test/format-impl-test.cc b/libs/format/test/format-impl-test.cc index aff9ea54a..1eb5e9165 100644 --- a/libs/format/test/format-impl-test.cc +++ b/libs/format/test/format-impl-test.cc @@ -26,10 +26,12 @@ */ #define FMT_NOEXCEPT +#undef FMT_SHARED #include "test-assert.h" -// Include format.cc instead of format.h to test implementation-specific stuff. +// Include *.cc instead of *.h to test implementation-specific stuff. #include "fmt/format.cc" +#include "fmt/printf.cc" #include #include @@ -46,7 +48,7 @@ TEST(FormatTest, ArgConverter) { Arg arg = Arg(); arg.type = Arg::LONG_LONG; arg.long_long_value = std::numeric_limits::max(); - fmt::ArgConverter(arg, 'd').visit(arg); + fmt::internal::ArgConverter(arg, 'd').visit(arg); EXPECT_EQ(Arg::LONG_LONG, arg.type); } diff --git a/libs/format/test/format-test.cc b/libs/format/test/format-test.cc index 52ff8a1e0..6388d5a5c 100644 --- a/libs/format/test/format-test.cc +++ b/libs/format/test/format-test.cc @@ -43,8 +43,23 @@ // Test that the library compiles if None is defined to 0 as done by xlib.h. #define None 0 +struct LocaleMock { + static LocaleMock *instance; + + MOCK_METHOD0(localeconv, lconv *()); +} *LocaleMock::instance; + +namespace fmt { +namespace std { +using namespace ::std; +lconv *localeconv() { + return LocaleMock::instance ? + LocaleMock::instance->localeconv() : ::std::localeconv(); +} +} +} + #include "fmt/format.h" -#include "fmt/time.h" #include "util.h" #include "mock-allocator.h" @@ -235,7 +250,7 @@ TEST(WriterTest, Allocator) { std::size_t size = static_cast(1.5 * fmt::internal::INLINE_BUFFER_SIZE); std::vector mem(size); - EXPECT_CALL(alloc, allocate(size)).WillOnce(testing::Return(&mem[0])); + EXPECT_CALL(alloc, allocate(size, 0)).WillOnce(testing::Return(&mem[0])); for (int i = 0; i < fmt::internal::INLINE_BUFFER_SIZE + 1; ++i) w << '*'; EXPECT_CALL(alloc, deallocate(&mem[0], size)); @@ -917,7 +932,7 @@ TEST(FormatterTest, RuntimeWidth) { FormatError, "number is too big"); EXPECT_THROW_MSG(format("{0:{1}}", 0, -1l), FormatError, "negative width"); - if (fmt::internal::check(sizeof(long) > sizeof(int))) { + if (fmt::internal::const_check(sizeof(long) > sizeof(int))) { long value = INT_MAX; EXPECT_THROW_MSG(format("{0:{1}}", 0, (value + 1)), FormatError, "number is too big"); @@ -1036,7 +1051,7 @@ TEST(FormatterTest, RuntimePrecision) { FormatError, "number is too big"); EXPECT_THROW_MSG(format("{0:.{1}}", 0, -1l), FormatError, "negative precision"); - if (fmt::internal::check(sizeof(long) > sizeof(int))) { + if (fmt::internal::const_check(sizeof(long) > sizeof(int))) { long value = INT_MAX; EXPECT_THROW_MSG(format("{0:.{1}}", 0, (value + 1)), FormatError, "number is too big"); @@ -1209,13 +1224,24 @@ TEST(FormatterTest, FormatOct) { } TEST(FormatterTest, FormatIntLocale) { -#ifndef _WIN32 - const char *locale = "en_US.utf-8"; -#else - const char *locale = "English_United States"; -#endif - std::setlocale(LC_ALL, locale); - EXPECT_EQ("1,234,567", format("{:n}", 1234567)); + ScopedMock mock; + lconv lc = lconv(); + char sep[] = "--"; + lc.thousands_sep = sep; + EXPECT_CALL(mock, localeconv()).Times(3).WillRepeatedly(testing::Return(&lc)); + EXPECT_EQ("123", format("{:n}", 123)); + EXPECT_EQ("1--234", format("{:n}", 1234)); + EXPECT_EQ("1--234--567", format("{:n}", 1234567)); +} + +struct ConvertibleToLongLong { + operator fmt::LongLong() const { + return fmt::LongLong(1) << 32; + } +}; + +TEST(FormatterTest, FormatConvertibleToLongLong) { + EXPECT_EQ("100000000", format("{:x}", ConvertibleToLongLong())); } TEST(FormatterTest, FormatFloat) { @@ -1327,6 +1353,8 @@ TEST(FormatterTest, FormatUCharString) { EXPECT_EQ("test", format("{0:s}", str)); const unsigned char *const_str = str; EXPECT_EQ("test", format("{0:s}", const_str)); + unsigned char *ptr = str; + EXPECT_EQ("test", format("{0:s}", ptr)); } TEST(FormatterTest, FormatPointer) { @@ -1350,7 +1378,7 @@ TEST(FormatterTest, FormatCStringRef) { EXPECT_EQ("test", format("{0}", CStringRef("test"))); } -void format(fmt::BasicFormatter &f, const char *, const Date &d) { +void format_arg(fmt::BasicFormatter &f, const char *, const Date &d) { f.writer() << d.year() << '-' << d.month() << '-' << d.day(); } @@ -1363,7 +1391,7 @@ TEST(FormatterTest, FormatCustom) { class Answer {}; template -void format(fmt::BasicFormatter &f, const Char *, Answer) { +void format_arg(fmt::BasicFormatter &f, const Char *, Answer) { f.writer() << "42"; } @@ -1534,13 +1562,25 @@ TEST(FormatTest, Variadic) { EXPECT_EQ(L"abc1", format(L"{}c{}", L"ab", 1)); } -TEST(FormatTest, Time) { - std::tm tm = std::tm(); - tm.tm_year = 116; - tm.tm_mon = 3; - tm.tm_mday = 25; - EXPECT_EQ("The date is 2016-04-25.", - fmt::format("The date is {:%Y-%m-%d}.", tm)); +TEST(FormatTest, JoinArg) { + using fmt::join; + int v1[3] = { 1, 2, 3 }; + std::vector v2; + v2.push_back(1.2f); + v2.push_back(3.4f); + + EXPECT_EQ("(1, 2, 3)", format("({})", join(v1 + 0, v1 + 3, ", "))); + EXPECT_EQ("(1)", format("({})", join(v1 + 0, v1 + 1, ", "))); + EXPECT_EQ("()", format("({})", join(v1 + 0, v1 + 0, ", "))); + EXPECT_EQ("(001, 002, 003)", format("({:03})", join(v1 + 0, v1 + 3, ", "))); + EXPECT_EQ("(+01.20, +03.40)", format("({:+06.2f})", join(v2.begin(), v2.end(), ", "))); + + EXPECT_EQ(L"(1, 2, 3)", format(L"({})", join(v1 + 0, v1 + 3, L", "))); + +#if FMT_HAS_GXX_CXX11 + EXPECT_EQ("(1, 2, 3)", format("({})", join(v1, ", "))); + EXPECT_EQ("(+01.20, +03.40)", format("({:+06.2f})", join(v2, ", "))); +#endif } template @@ -1644,3 +1684,10 @@ FMT_VARIADIC(void, custom_format, const char *) TEST(FormatTest, CustomArgFormatter) { custom_format("{}", 42); } + +void convert(int); + +// Check if there is no collision with convert function in the global namespace. +TEST(FormatTest, ConvertCollision) { + fmt::format("{}", 42); +} diff --git a/libs/format/test/gmock/gmock.h b/libs/format/test/gmock/gmock.h index 17bde1e7e..84f58cdd1 100644 --- a/libs/format/test/gmock/gmock.h +++ b/libs/format/test/gmock/gmock.h @@ -10090,8 +10090,9 @@ class FunctionMockerBase : public UntypedFunctionMockerBase { // threads concurrently. Result InvokeWith(const ArgumentTuple& args) GTEST_LOCK_EXCLUDED_(g_gmock_mutex) { - return static_cast( - this->UntypedInvokeWith(&args))->GetValueAndDelete(); + const ResultHolder *rh = static_cast( + this->UntypedInvokeWith(&args)); + return rh ? rh->GetValueAndDelete() : Result(); } // Adds and returns a default action spec for this mock function. diff --git a/libs/format/test/gtest-extra-test.cc b/libs/format/test/gtest-extra-test.cc index 8f681c2cf..6a8c5676f 100644 --- a/libs/format/test/gtest-extra-test.cc +++ b/libs/format/test/gtest-extra-test.cc @@ -320,7 +320,7 @@ TEST(StreamingAssertionsTest, EXPECT_WRITE) { TEST(UtilTest, FormatSystemError) { fmt::MemoryWriter out; - fmt::internal::format_system_error(out, EDOM, "test message"); + fmt::format_system_error(out, EDOM, "test message"); EXPECT_EQ(out.str(), format_system_error(EDOM, "test message")); } diff --git a/libs/format/test/gtest-extra.cc b/libs/format/test/gtest-extra.cc index f7c296305..7640d1545 100644 --- a/libs/format/test/gtest-extra.cc +++ b/libs/format/test/gtest-extra.cc @@ -105,6 +105,6 @@ std::string read(File &f, std::size_t count) { std::string format_system_error(int error_code, fmt::StringRef message) { fmt::MemoryWriter out; - fmt::internal::format_system_error(out, error_code, message); + fmt::format_system_error(out, error_code, message); return out.str(); } diff --git a/libs/format/test/gtest-extra.h b/libs/format/test/gtest-extra.h index 649fbe275..5f7fe29d8 100644 --- a/libs/format/test/gtest-extra.h +++ b/libs/format/test/gtest-extra.h @@ -29,7 +29,7 @@ #define FMT_GTEST_EXTRA_H_ #include -#include +#include #include "fmt/format.h" @@ -172,4 +172,10 @@ std::string read(fmt::File &f, std::size_t count); #endif // FMT_USE_FILE_DESCRIPTORS +template +struct ScopedMock : testing::StrictMock { + ScopedMock() { Mock::instance = this; } + ~ScopedMock() { Mock::instance = 0; } +}; + #endif // FMT_GTEST_EXTRA_H_ diff --git a/libs/format/test/gtest/gtest.h b/libs/format/test/gtest/gtest.h index 4f3804f70..52d2ed6d0 100644 --- a/libs/format/test/gtest/gtest.h +++ b/libs/format/test/gtest/gtest.h @@ -2823,7 +2823,11 @@ inline int IsATTY(int /* fd */) { return 0; } inline int IsATTY(int fd) { return _isatty(fd); } # endif // GTEST_OS_WINDOWS_MOBILE inline int StrCaseCmp(const char* s1, const char* s2) { - return _stricmp(s1, s2); +# if _EMULATE_GLIBC + return strcasecmp(s1, s2); +# else + return _stricmp(s1, s2); +# endif } inline char* StrDup(const char* src) { return _strdup(src); } # endif // __BORLANDC__ diff --git a/libs/format/test/mock-allocator.h b/libs/format/test/mock-allocator.h index 7de1e1a09..34b9c11ab 100644 --- a/libs/format/test/mock-allocator.h +++ b/libs/format/test/mock-allocator.h @@ -36,8 +36,8 @@ class MockAllocator { MockAllocator() {} MockAllocator(const MockAllocator &) {} typedef T value_type; - MOCK_METHOD1_T(allocate, T* (std::size_t n)); - MOCK_METHOD2_T(deallocate, void (T* p, std::size_t n)); + MOCK_METHOD2_T(allocate, T *(std::size_t n, const T *h)); + MOCK_METHOD2_T(deallocate, void (T *p, std::size_t n)); }; template @@ -78,8 +78,10 @@ class AllocatorRef { Allocator *get() const { return alloc_; } - value_type* allocate(std::size_t n) { return alloc_->allocate(n); } - void deallocate(value_type* p, std::size_t n) { alloc_->deallocate(p, n); } + value_type *allocate(std::size_t n, const value_type *h) { + return alloc_->allocate(n, h); + } + void deallocate(value_type *p, std::size_t n) { alloc_->deallocate(p, n); } }; #endif // FMT_MOCK_ALLOCATOR_H_ diff --git a/libs/format/test/ostream-test.cc b/libs/format/test/ostream-test.cc index bbcce95e2..4081b43f8 100644 --- a/libs/format/test/ostream-test.cc +++ b/libs/format/test/ostream-test.cc @@ -25,7 +25,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "fmt/ostream.cc" +#include "fmt/ostream.h" #include #include "gmock/gmock.h" @@ -35,13 +35,6 @@ using fmt::format; using fmt::FormatError; -template -std::basic_ostream &operator<<( - std::basic_ostream &os, const BasicTestString &s) { - os << s.value(); - return os; -} - std::ostream &operator<<(std::ostream &os, const Date &d) { os << d.year() << '-' << d.month() << '-' << d.day(); return os; @@ -128,22 +121,11 @@ TEST(OStreamTest, Print) { EXPECT_EQ("Don't panic!", os.str()); } -TEST(OStreamTest, PrintfCustom) { - EXPECT_EQ("abc", fmt::sprintf("%s", TestString("abc"))); -} - -TEST(OStreamTest, FPrintf) { - std::ostringstream os; - int ret = fmt::fprintf(os, "Don't %s!", "panic"); - EXPECT_EQ("Don't panic!", os.str()); - EXPECT_EQ(12, ret); -} - TEST(OStreamTest, WriteToOStream) { std::ostringstream os; fmt::MemoryWriter w; w << "foo"; - fmt::write(os, w); + fmt::internal::write(os, w); EXPECT_EQ("foo", os.str()); } @@ -188,5 +170,5 @@ TEST(OStreamTest, WriteToOStreamMaxSize) { data += n; size -= static_cast(n); } while (size != 0); - fmt::write(os, w); + fmt::internal::write(os, w); } diff --git a/libs/format/test/posix-mock-test.cc b/libs/format/test/posix-mock-test.cc index 2a89a8224..7a78327e3 100644 --- a/libs/format/test/posix-mock-test.cc +++ b/libs/format/test/posix-mock-test.cc @@ -453,12 +453,6 @@ TEST(BufferedFileTest, FilenoNoRetry) { fileno_count = 0; } -template -struct ScopedMock : testing::StrictMock { - ScopedMock() { Mock::instance = this; } - ~ScopedMock() { Mock::instance = 0; } -}; - struct TestMock { static TestMock *instance; } *TestMock::instance; @@ -508,7 +502,7 @@ LocaleType newlocale(int category_mask, const char *locale, LocaleType base) { return LocaleMock::instance->newlocale(category_mask, locale, base); } -#ifdef __APPLE__ +#if defined(__APPLE__) || defined(__FreeBSD__) typedef int FreeLocaleResult; #else typedef void FreeLocaleResult; diff --git a/libs/format/test/posix-test.cc b/libs/format/test/posix-test.cc index 2dd3f046f..e6332bf03 100644 --- a/libs/format/test/posix-test.cc +++ b/libs/format/test/posix-test.cc @@ -232,7 +232,7 @@ TEST(FileTest, MoveAssignmentClosesFile) { File OpenBufferedFile(int &fd) { File f = open_file(); fd = f.descriptor(); - return std::move(f); + return f; } TEST(FileTest, MoveFromTemporaryInCtor) { diff --git a/libs/format/test/printf-test.cc b/libs/format/test/printf-test.cc index c38a1e52f..81a041d77 100644 --- a/libs/format/test/printf-test.cc +++ b/libs/format/test/printf-test.cc @@ -29,6 +29,7 @@ #include #include +#include "fmt/printf.h" #include "fmt/format.h" #include "gtest-extra.h" #include "util.h" @@ -201,6 +202,8 @@ TEST(PrintfTest, HashFlag) { TEST(PrintfTest, Width) { EXPECT_PRINTF(" abc", "%5s", "abc"); + EXPECT_PRINTF(" -42", "%5s", "-42"); + EXPECT_PRINTF(" 0.123456", "%10s", 0.123456); // Width cannot be specified twice. EXPECT_THROW_MSG(fmt::sprintf("%5-5d", 42), FormatError, @@ -295,12 +298,13 @@ void TestLength(const char *length_spec, U value) { fmt::LongLong signed_value = 0; fmt::ULongLong unsigned_value = 0; // Apply integer promotion to the argument. - fmt::ULongLong max = std::numeric_limits::max(); - using fmt::internal::check; - if (check(max <= static_cast(std::numeric_limits::max()))) { + using std::numeric_limits; + fmt::ULongLong max = numeric_limits::max(); + using fmt::internal::const_check; + if (const_check(max <= static_cast(numeric_limits::max()))) { signed_value = static_cast(value); unsigned_value = static_cast(value); - } else if (check(max <= std::numeric_limits::max())) { + } else if (const_check(max <= numeric_limits::max())) { signed_value = static_cast(value); unsigned_value = static_cast(value); } @@ -379,11 +383,13 @@ TEST(PrintfTest, Bool) { TEST(PrintfTest, Int) { EXPECT_PRINTF("-42", "%d", -42); EXPECT_PRINTF("-42", "%i", -42); + EXPECT_PRINTF("-42", "%s", -42); unsigned u = 0 - 42u; EXPECT_PRINTF(fmt::format("{}", u), "%u", -42); EXPECT_PRINTF(fmt::format("{:o}", u), "%o", -42); EXPECT_PRINTF(fmt::format("{:x}", u), "%x", -42); EXPECT_PRINTF(fmt::format("{:X}", u), "%X", -42); + EXPECT_PRINTF(fmt::format("{}", u), "%s", u); } TEST(PrintfTest, LongLong) { @@ -395,7 +401,11 @@ TEST(PrintfTest, LongLong) { TEST(PrintfTest, Float) { EXPECT_PRINTF("392.650000", "%f", 392.65); + EXPECT_PRINTF("392.65", "%.2f", 392.65); + EXPECT_PRINTF("392.6", "%.1f", 392.65); + EXPECT_PRINTF("393", "%.f", 392.65); EXPECT_PRINTF("392.650000", "%F", 392.65); + EXPECT_PRINTF("392.65", "%s", 392.65); char buffer[BUFFER_SIZE]; safe_sprintf(buffer, "%e", 392.65); EXPECT_PRINTF(buffer, "%e", 392.65); @@ -420,6 +430,7 @@ TEST(PrintfTest, Inf) { TEST(PrintfTest, Char) { EXPECT_PRINTF("x", "%c", 'x'); + EXPECT_PRINTF("x", "%s", 'x'); int max = std::numeric_limits::max(); EXPECT_PRINTF(fmt::format("{}", static_cast(max)), "%c", max); //EXPECT_PRINTF("x", "%lc", L'x'); @@ -438,13 +449,17 @@ TEST(PrintfTest, Pointer) { int n; void *p = &n; EXPECT_PRINTF(fmt::format("{}", p), "%p", p); + EXPECT_PRINTF(fmt::format("{}", p), "%s", p); p = 0; EXPECT_PRINTF("(nil)", "%p", p); EXPECT_PRINTF(" (nil)", "%10p", p); + EXPECT_PRINTF("(nil)", "%s", p); + EXPECT_PRINTF(" (nil)", "%10s", p); const char *s = "test"; EXPECT_PRINTF(fmt::format("{:p}", s), "%p", s); const char *null_str = 0; EXPECT_PRINTF("(nil)", "%p", null_str); + EXPECT_PRINTF("(null)", "%s", null_str); } TEST(PrintfTest, Location) { @@ -477,3 +492,20 @@ TEST(PrintfTest, PrintfError) { TEST(PrintfTest, WideString) { EXPECT_EQ(L"abc", fmt::sprintf(L"%s", L"abc")); } + +TEST(PrintfTest, PrintfCustom) { + EXPECT_EQ("abc", fmt::sprintf("%s", TestString("abc"))); +} + +TEST(PrintfTest, OStream) { + std::ostringstream os; + int ret = fmt::fprintf(os, "Don't %s!", "panic"); + EXPECT_EQ("Don't panic!", os.str()); + EXPECT_EQ(12, ret); +} + +TEST(PrintfTest, Writer) { + fmt::MemoryWriter writer; + printf(writer, "%d", 42); + EXPECT_EQ("42", writer.str()); +} diff --git a/libs/format/test/util-test.cc b/libs/format/test/util-test.cc index 2134d0951..a38825580 100644 --- a/libs/format/test/util-test.cc +++ b/libs/format/test/util-test.cc @@ -64,7 +64,7 @@ namespace { struct Test {}; template -void format(fmt::BasicFormatter &f, const Char *, Test) { +void format_arg(fmt::BasicFormatter &f, const Char *, Test) { f.writer() << "test"; } @@ -83,8 +83,8 @@ void CheckForwarding( // Check if value_type is properly defined. AllocatorRef< MockAllocator >::value_type *ptr = &mem; // Check forwarding. - EXPECT_CALL(alloc, allocate(42)).WillOnce(Return(ptr)); - ref.allocate(42); + EXPECT_CALL(alloc, allocate(42, 0)).WillOnce(Return(ptr)); + ref.allocate(42, 0); EXPECT_CALL(alloc, deallocate(ptr, 42)); ref.deallocate(ptr, 42); } @@ -339,7 +339,7 @@ TEST(MemoryBufferTest, Grow) { EXPECT_EQ(10u, buffer.capacity()); int mem[20]; mem[7] = 0xdead; - EXPECT_CALL(alloc, allocate(20)).WillOnce(Return(mem)); + EXPECT_CALL(alloc, allocate(20, 0)).WillOnce(Return(mem)); buffer.grow(20); EXPECT_EQ(20u, buffer.capacity()); // Check if size elements have been copied @@ -360,7 +360,7 @@ TEST(MemoryBufferTest, Allocator) { MemoryBuffer buffer2((TestAllocator(&alloc))); EXPECT_EQ(&alloc, buffer2.get_allocator().get()); std::size_t size = 2 * fmt::internal::INLINE_BUFFER_SIZE; - EXPECT_CALL(alloc, allocate(size)).WillOnce(Return(&mem)); + EXPECT_CALL(alloc, allocate(size, 0)).WillOnce(Return(&mem)); buffer2.reserve(size); EXPECT_CALL(alloc, deallocate(&mem, size)); } @@ -373,13 +373,13 @@ TEST(MemoryBufferTest, ExceptionInDeallocate) { std::size_t size = 2 * fmt::internal::INLINE_BUFFER_SIZE; std::vector mem(size); { - EXPECT_CALL(alloc, allocate(size)).WillOnce(Return(&mem[0])); + EXPECT_CALL(alloc, allocate(size, 0)).WillOnce(Return(&mem[0])); buffer.resize(size); std::fill(&buffer[0], &buffer[0] + size, 'x'); } std::vector mem2(2 * size); { - EXPECT_CALL(alloc, allocate(2 * size)).WillOnce(Return(&mem2[0])); + EXPECT_CALL(alloc, allocate(2 * size, 0)).WillOnce(Return(&mem2[0])); std::exception e; EXPECT_CALL(alloc, deallocate(&mem[0], size)).WillOnce(testing::Throw(e)); EXPECT_THROW(buffer.reserve(2 * size), std::exception); @@ -581,7 +581,7 @@ struct CustomFormatter { typedef char Char; }; -void format(CustomFormatter &, const char *&s, const Test &) { +void format_arg(CustomFormatter &, const char *&s, const Test &) { s = "custom_format"; } @@ -708,7 +708,7 @@ TEST(ArgVisitorTest, VisitUnhandledArg) { TEST(ArgVisitorTest, VisitInvalidArg) { Arg arg = Arg(); - arg.type = static_cast(Arg::CUSTOM + 1); + arg.type = static_cast(Arg::NONE); EXPECT_ASSERT(TestVisitor().visit(arg), "invalid argument type"); } @@ -834,10 +834,10 @@ void check_throw_error(int error_code, FormatErrorMessage format) { TEST(UtilTest, FormatSystemError) { fmt::MemoryWriter message; - fmt::internal::format_system_error(message, EDOM, "test"); + fmt::format_system_error(message, EDOM, "test"); EXPECT_EQ(fmt::format("test: {}", get_system_error(EDOM)), message.str()); message.clear(); - fmt::internal::format_system_error( + fmt::format_system_error( message, EDOM, fmt::StringRef(0, std::numeric_limits::max())); EXPECT_EQ(fmt::format("error {}", EDOM), message.str()); } @@ -846,12 +846,12 @@ TEST(UtilTest, SystemError) { fmt::SystemError e(EDOM, "test"); EXPECT_EQ(fmt::format("test: {}", get_system_error(EDOM)), e.what()); EXPECT_EQ(EDOM, e.error_code()); - check_throw_error(EDOM, fmt::internal::format_system_error); + check_throw_error(EDOM, fmt::format_system_error); } TEST(UtilTest, ReportSystemError) { fmt::MemoryWriter out; - fmt::internal::format_system_error(out, EDOM, "test error"); + fmt::format_system_error(out, EDOM, "test error"); out << '\n'; EXPECT_WRITE(stderr, fmt::report_system_error(EDOM, "test error"), out.str()); } @@ -956,3 +956,17 @@ TEST(UtilTest, Conditional) { fmt::internal::Conditional::type *pc = &c; (void)pc; } + +struct TestLConv { + char *thousands_sep; +}; + +struct EmptyLConv {}; + +TEST(UtilTest, ThousandsSep) { + char foo[] = "foo"; + TestLConv lc = {foo}; + EXPECT_EQ("foo", fmt::internal::thousands_sep(&lc).to_string()); + EmptyLConv empty_lc; + EXPECT_EQ("", fmt::internal::thousands_sep(&empty_lc)); +} diff --git a/libs/format/test/util.h b/libs/format/test/util.h index 21d76b2d2..b7faf62ae 100644 --- a/libs/format/test/util.h +++ b/libs/format/test/util.h @@ -87,6 +87,13 @@ const Char BasicTestString::EMPTY[] = {0}; typedef BasicTestString TestString; typedef BasicTestString TestWString; +template +std::basic_ostream &operator<<( + std::basic_ostream &os, const BasicTestString &s) { + os << s.value(); + return os; +} + class Date { int year_, month_, day_; public: diff --git a/zone/map.cpp b/zone/map.cpp index 32c6564b4..c1db6086d 100644 --- a/zone/map.cpp +++ b/zone/map.cpp @@ -1,5 +1,6 @@ #include "../common/global_define.h" #include "../common/misc_functions.h" +#include "../common/compression.h" #include "map.h" #include "raycast_mesh.h" @@ -10,83 +11,6 @@ #include #include #include -#include - - -uint32 EstimateDeflateBuffer(uint32_t len) { - z_stream zstream; - memset(&zstream, 0, sizeof(zstream)); - - zstream.zalloc = Z_NULL; - zstream.zfree = Z_NULL; - zstream.opaque = Z_NULL; - if (deflateInit(&zstream, Z_FINISH) != Z_OK) - return 0; - - return deflateBound(&zstream, len); -} - -uint32_t DeflateData(const char *buffer, uint32_t len, char *out_buffer, uint32_t out_len_max) { - z_stream zstream; - memset(&zstream, 0, sizeof(zstream)); - int zerror; - - zstream.next_in = const_cast(reinterpret_cast(buffer)); - zstream.avail_in = len; - zstream.zalloc = Z_NULL; - zstream.zfree = Z_NULL; - zstream.opaque = Z_NULL; - deflateInit(&zstream, Z_FINISH); - - zstream.next_out = reinterpret_cast(out_buffer); - zstream.avail_out = out_len_max; - zerror = deflate(&zstream, Z_FINISH); - - if (zerror == Z_STREAM_END) - { - deflateEnd(&zstream); - return (uint32_t)zstream.total_out; - } - else - { - zerror = deflateEnd(&zstream); - return 0; - } -} - -uint32 InflateData(const char* buffer, uint32 len, char* out_buffer, uint32 out_len_max) { - z_stream zstream; - int zerror = 0; - int i; - - zstream.next_in = const_cast(reinterpret_cast(buffer)); - zstream.avail_in = len; - zstream.next_out = reinterpret_cast(out_buffer);; - zstream.avail_out = out_len_max; - zstream.zalloc = Z_NULL; - zstream.zfree = Z_NULL; - zstream.opaque = Z_NULL; - - i = inflateInit2(&zstream, 15); - if (i != Z_OK) { - return 0; - } - - zerror = inflate(&zstream, Z_FINISH); - if (zerror == Z_STREAM_END) { - inflateEnd(&zstream); - return zstream.total_out; - } - else { - if (zerror == -4 && zstream.msg == 0) - { - return 0; - } - - zerror = inflateEnd(&zstream); - return 0; - } -} struct Map::impl { @@ -451,7 +375,7 @@ bool Map::LoadV2(FILE *f) { std::vector buffer; buffer.resize(buffer_size); - uint32 v = InflateData(&data[0], data_size, &buffer[0], buffer_size); + uint32 v = EQEmu::InflateData(&data[0], data_size, &buffer[0], buffer_size); char *buf = &buffer[0]; uint32 vert_count; diff --git a/zone/pathfinder_interface.cpp b/zone/pathfinder_interface.cpp index 2a60ada74..1773e275f 100644 --- a/zone/pathfinder_interface.cpp +++ b/zone/pathfinder_interface.cpp @@ -10,13 +10,13 @@ IPathfinder *IPathfinder::Load(const std::string &zone) { struct stat statbuffer; std::string waypoint_path = fmt::format("maps/{0}.path", zone); std::string navmesh_path = fmt::format("maps/{0}.nav", zone); + if (stat(navmesh_path.c_str(), &statbuffer) == 0) { + return new PathfinderNavmesh(navmesh_path); + } + if (stat(waypoint_path.c_str(), &statbuffer) == 0) { return new PathfinderWaypoint(waypoint_path); } - //if (stat(waypoint_path.c_str(), &statbuffer) == 0) { - // return new PathfinderNavmesh(navmesh_path); - //} - return new PathfinderNull(); } diff --git a/zone/pathfinder_nav_mesh.cpp b/zone/pathfinder_nav_mesh.cpp index e69de29bb..d20b595bc 100644 --- a/zone/pathfinder_nav_mesh.cpp +++ b/zone/pathfinder_nav_mesh.cpp @@ -0,0 +1,268 @@ +#include +#include +#include +#include +#include +#include "pathfinder_nav_mesh.h" + +#include "zone.h" +#include "client.h" +#include "../common/compression.h" + +struct PathfinderNavmesh::Implementation +{ + dtNavMesh *nav_mesh; + dtNavMeshQuery *query; +}; + +PathfinderNavmesh::PathfinderNavmesh(const std::string &path) +{ + m_impl.reset(new Implementation()); + m_impl->nav_mesh = nullptr; + m_impl->query = nullptr; +} + +PathfinderNavmesh::~PathfinderNavmesh() +{ + if (m_impl->nav_mesh) { + dtFreeNavMesh(m_impl->nav_mesh); + } + + if (m_impl->query) { + dtFreeNavMeshQuery(m_impl->query); + } +} + +IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const glm::vec3 &end) +{ + if (!m_impl->nav_mesh || !m_impl->query) { + IPath Route; + Route.push_back(start); + Route.push_back(end); + return Route; + } + + glm::vec3 ext(15.0f, 100.0f, 15.0f); + dtQueryFilter filter; + filter.setIncludeFlags(65535U); + filter.setAreaCost(0, 1.0f); //Normal + filter.setAreaCost(0, 1.0f); //Water + filter.setAreaCost(0, 1.0f); //Lava + filter.setAreaCost(0, 1.0f); //PvP + filter.setAreaCost(0, 1.0f); //Slime + filter.setAreaCost(0, 1.0f); //Ice + filter.setAreaCost(0, 1.0f); //V Water (Frigid Water) + filter.setAreaCost(0, 1.0f); //General Area + filter.setAreaCost(0, 1.0f); //Portal + + dtPolyRef start_ref; + dtPolyRef end_ref; + + m_impl->query->findNearestPoly(&start[0], &ext[0], &filter, &start_ref, 0); + m_impl->query->findNearestPoly(&end[0], &ext[0], &filter, &end_ref, 0); + + if (!start_ref || !end_ref) { + IPath Route; + Route.push_back(start); + Route.push_back(end); + return Route; + } + + int npoly = 0; + dtPolyRef path[1024] = { 0 }; + m_impl->query->findPath(start_ref, end_ref, &start[0], &end[0], &filter, path, &npoly, 1024); + + if (npoly) { + glm::vec3 epos = end; + if (path[npoly - 1] != end_ref) + m_impl->query->closestPointOnPoly(path[npoly - 1], &end[0], &epos[0], 0); + + float straight_path[2048 * 3]; + unsigned char straight_path_flags[2048]; + int n_straight_polys; + dtPolyRef straight_path_polys[2048]; + m_impl->query->findStraightPath(&start[0], &epos[0], path, npoly, + straight_path, straight_path_flags, + straight_path_polys, &n_straight_polys, 2048, DT_STRAIGHTPATH_ALL_CROSSINGS); + + if (n_straight_polys) { + IPath Route; + + for (int i = 0; i < n_straight_polys - 1; ++i) { + glm::vec3 color(1.0f, 1.0f, 0.0f); + unsigned short flag = 0; + if (dtStatusSucceed(m_impl->nav_mesh->getPolyFlags(straight_path_polys[i], &flag))) { + if (flag & 512) { //Portal + Route.push_back(true); + } + } + + Route.push_back(glm::vec3(straight_path[i * 3], straight_path[i * 3 + 1] + 0.4f, straight_path[i * 3 + 2])); + } + + return Route; + } + + IPath Route; + Route.push_back(start); + Route.push_back(end); + return Route; + } + else { + IPath Route; + Route.push_back(start); + Route.push_back(end); + return Route; + } +} + +glm::vec3 PathfinderNavmesh::GetRandomLocation() +{ + return glm::vec3(); +} + +void PathfinderNavmesh::DebugCommand(Client *c, const Seperator *sep) +{ + if (sep->arg[1][0] == '\0' || !strcasecmp(sep->arg[1], "help")) + { + c->Message(0, "#path show: Plots a path from the user to their target."); + return; + } + + if (!strcasecmp(sep->arg[1], "show")) + { + if (c->GetTarget() != nullptr) { + auto target = c->GetTarget(); + glm::vec3 start(c->GetX(), c->GetY(), c->GetZ()); + glm::vec3 end(target->GetX(), target->GetY(), target->GetZ()); + + ShowPath(c, start, end); + } + + return; + } +} + +void PathfinderNavmesh::Load(const std::string &path) +{ + if (m_impl->nav_mesh) { + dtFreeNavMesh(m_impl->nav_mesh); + m_impl->nav_mesh = nullptr; + } + + if (m_impl->query) { + dtFreeNavMeshQuery(m_impl->query); + m_impl->query = nullptr; + } + + FILE *f = fopen(path.c_str(), "rb"); + if (f) { + char magic[9] = { 0 }; + if (fread(magic, 9, 1, f) != 1) { + fclose(f); + return; + } + + if (strncmp(magic, "EQNAVMESH", 9) != 0) + { + fclose(f); + return; + } + + uint32_t version = 0; + if (fread(&version, sizeof(uint32_t), 1, f) != 1) { + fclose(f); + return; + } + + if (version != 2U) { + fclose(f); + return; + } + + uint32_t data_size; + if (fread(&data_size, sizeof(data_size), 1, f) != 1) { + fclose(f); + return; + } + + uint32_t buffer_size; + if (fread(&buffer_size, sizeof(buffer_size), 1, f) != 1) { + fclose(f); + return; + } + + std::vector data; + data.resize(data_size); + if (fread(&data[0], data_size, 1, f) != 1) { + fclose(f); + return; + } + + std::vector buffer; + buffer.resize(buffer_size); + uint32_t v = EQEmu::InflateData(&data[0], data_size, &buffer[0], buffer_size); + fclose(f); + + char *buf = &buffer[0]; + m_impl->nav_mesh = dtAllocNavMesh(); + + uint32_t number_of_tiles = *(uint32_t*)buf; + buf += sizeof(uint32_t); + + dtNavMeshParams params = *(dtNavMeshParams*)buf; + buf += sizeof(dtNavMeshParams); + + dtStatus status = m_impl->nav_mesh->init(¶ms); + if (dtStatusFailed(status)) + { + dtFreeNavMesh(m_impl->nav_mesh); + m_impl->nav_mesh = nullptr; + return; + } + + for (unsigned int i = 0; i < number_of_tiles; ++i) + { + uint32_t tile_ref = *(uint32_t*)buf; + buf += sizeof(uint32_t); + + int32_t data_size = *(uint32_t*)buf; + buf += sizeof(uint32_t); + + if (!tile_ref || !data_size) { + dtFreeNavMesh(m_impl->nav_mesh); + m_impl->nav_mesh = nullptr; + return; + } + + unsigned char* data = (unsigned char*)dtAlloc(data_size, DT_ALLOC_PERM); + memcpy(data, buf, data_size); + buf += data_size; + + m_impl->nav_mesh->addTile(data, data_size, DT_TILE_FREE_DATA, tile_ref, 0); + } + + m_impl->query = dtAllocNavMeshQuery(); + m_impl->query->init(m_impl->nav_mesh, 32768); + } +} + +void PathfinderNavmesh::ShowPath(Client * c, const glm::vec3 & start, const glm::vec3 & end) +{ + auto path = FindRoute(start, end); + std::vector points; + + FindPerson_Point p; + for (auto &node : path) + { + if (!node.teleport) { + p.x = node.pos.x; + p.y = node.pos.y; + p.z = node.pos.z; + + points.push_back(p); + } + } + + c->SendPathPacket(points); +} diff --git a/zone/pathfinder_nav_mesh.h b/zone/pathfinder_nav_mesh.h index bec5c1b44..6229cd791 100644 --- a/zone/pathfinder_nav_mesh.h +++ b/zone/pathfinder_nav_mesh.h @@ -1,14 +1,22 @@ #pragma once #include "pathfinder_interface.h" +#include class PathfinderNavmesh : public IPathfinder { public: - PathfinderNavmesh() { } - virtual ~PathfinderNavmesh() { } + PathfinderNavmesh(const std::string &path); + virtual ~PathfinderNavmesh(); virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end); virtual glm::vec3 GetRandomLocation(); virtual void DebugCommand(Client *c, const Seperator *sep); + +private: + void Load(const std::string &path); + void ShowPath(Client *c, const glm::vec3 &start, const glm::vec3 &end); + + struct Implementation; + std::unique_ptr m_impl; }; \ No newline at end of file From ff13f162cef76019495753d96597ff6435b39c9f Mon Sep 17 00:00:00 2001 From: KimLS Date: Sat, 29 Jul 2017 00:12:21 -0700 Subject: [PATCH 009/670] Forgot to git add so missed a bunch of stuff --- common/compression.cpp | 82 + common/compression.h | 8 + libs/format/.github/pull_request_template | 3 + libs/format/.gitignore | 19 + libs/format/CONTRIBUTING.rst | 11 + libs/format/doc/_static/breathe.css | 28 + libs/format/fmt/container.h | 82 + libs/format/fmt/printf.cc | 32 + libs/format/fmt/printf.h | 603 +++ libs/format/fmt/string.h | 126 + libs/format/support/manage.py | 235 ++ libs/format/support/rst2md.py | 127 + libs/format/test/container-test.cc | 94 + libs/format/test/custom-formatter-test.cc | 68 + libs/format/test/string-test.cc | 80 + libs/format/test/time-test.cc | 60 + libs/recast/CMakeLists.txt | 77 + libs/recast/debug_utils/include/DebugDraw.h | 223 + .../debug_utils/include/DetourDebugDraw.h | 48 + .../debug_utils/include/RecastDebugDraw.h | 42 + libs/recast/debug_utils/include/RecastDump.h | 43 + libs/recast/debug_utils/src/DebugDraw.cpp | 612 +++ .../debug_utils/src/DetourDebugDraw.cpp | 862 ++++ .../debug_utils/src/RecastDebugDraw.cpp | 1064 +++++ libs/recast/debug_utils/src/RecastDump.cpp | 451 ++ libs/recast/detour/include/DetourAlloc.h | 61 + libs/recast/detour/include/DetourAssert.h | 56 + libs/recast/detour/include/DetourCommon.h | 550 +++ libs/recast/detour/include/DetourMath.h | 20 + libs/recast/detour/include/DetourNavMesh.h | 765 ++++ .../detour/include/DetourNavMeshBuilder.h | 149 + .../detour/include/DetourNavMeshQuery.h | 575 +++ libs/recast/detour/include/DetourNode.h | 168 + libs/recast/detour/include/DetourStatus.h | 64 + libs/recast/detour/src/DetourAlloc.cpp | 50 + libs/recast/detour/src/DetourAssert.cpp | 35 + libs/recast/detour/src/DetourCommon.cpp | 388 ++ libs/recast/detour/src/DetourNavMesh.cpp | 1522 +++++++ .../detour/src/DetourNavMeshBuilder.cpp | 802 ++++ libs/recast/detour/src/DetourNavMeshQuery.cpp | 3664 +++++++++++++++++ libs/recast/detour/src/DetourNode.cpp | 200 + .../include/DetourTileCache.h | 247 ++ .../include/DetourTileCacheBuilder.h | 153 + .../detour_tile_cache/src/DetourTileCache.cpp | 764 ++++ .../src/DetourTileCacheBuilder.cpp | 2196 ++++++++++ libs/recast/recast/include/Recast.h | 1200 ++++++ libs/recast/recast/include/RecastAlloc.h | 146 + libs/recast/recast/include/RecastAssert.h | 56 + libs/recast/recast/src/Recast.cpp | 504 +++ libs/recast/recast/src/RecastAlloc.cpp | 86 + libs/recast/recast/src/RecastArea.cpp | 591 +++ libs/recast/recast/src/RecastAssert.cpp | 35 + libs/recast/recast/src/RecastContour.cpp | 1105 +++++ libs/recast/recast/src/RecastFilter.cpp | 202 + libs/recast/recast/src/RecastLayers.cpp | 644 +++ libs/recast/recast/src/RecastMesh.cpp | 1552 +++++++ libs/recast/recast/src/RecastMeshDetail.cpp | 1462 +++++++ .../recast/recast/src/RecastRasterization.cpp | 454 ++ libs/recast/recast/src/RecastRegion.cpp | 1824 ++++++++ 59 files changed, 27370 insertions(+) create mode 100644 common/compression.cpp create mode 100644 common/compression.h create mode 100644 libs/format/.github/pull_request_template create mode 100644 libs/format/.gitignore create mode 100644 libs/format/CONTRIBUTING.rst create mode 100644 libs/format/doc/_static/breathe.css create mode 100644 libs/format/fmt/container.h create mode 100644 libs/format/fmt/printf.cc create mode 100644 libs/format/fmt/printf.h create mode 100644 libs/format/fmt/string.h create mode 100644 libs/format/support/manage.py create mode 100644 libs/format/support/rst2md.py create mode 100644 libs/format/test/container-test.cc create mode 100644 libs/format/test/custom-formatter-test.cc create mode 100644 libs/format/test/string-test.cc create mode 100644 libs/format/test/time-test.cc create mode 100644 libs/recast/CMakeLists.txt create mode 100644 libs/recast/debug_utils/include/DebugDraw.h create mode 100644 libs/recast/debug_utils/include/DetourDebugDraw.h create mode 100644 libs/recast/debug_utils/include/RecastDebugDraw.h create mode 100644 libs/recast/debug_utils/include/RecastDump.h create mode 100644 libs/recast/debug_utils/src/DebugDraw.cpp create mode 100644 libs/recast/debug_utils/src/DetourDebugDraw.cpp create mode 100644 libs/recast/debug_utils/src/RecastDebugDraw.cpp create mode 100644 libs/recast/debug_utils/src/RecastDump.cpp create mode 100644 libs/recast/detour/include/DetourAlloc.h create mode 100644 libs/recast/detour/include/DetourAssert.h create mode 100644 libs/recast/detour/include/DetourCommon.h create mode 100644 libs/recast/detour/include/DetourMath.h create mode 100644 libs/recast/detour/include/DetourNavMesh.h create mode 100644 libs/recast/detour/include/DetourNavMeshBuilder.h create mode 100644 libs/recast/detour/include/DetourNavMeshQuery.h create mode 100644 libs/recast/detour/include/DetourNode.h create mode 100644 libs/recast/detour/include/DetourStatus.h create mode 100644 libs/recast/detour/src/DetourAlloc.cpp create mode 100644 libs/recast/detour/src/DetourAssert.cpp create mode 100644 libs/recast/detour/src/DetourCommon.cpp create mode 100644 libs/recast/detour/src/DetourNavMesh.cpp create mode 100644 libs/recast/detour/src/DetourNavMeshBuilder.cpp create mode 100644 libs/recast/detour/src/DetourNavMeshQuery.cpp create mode 100644 libs/recast/detour/src/DetourNode.cpp create mode 100644 libs/recast/detour_tile_cache/include/DetourTileCache.h create mode 100644 libs/recast/detour_tile_cache/include/DetourTileCacheBuilder.h create mode 100644 libs/recast/detour_tile_cache/src/DetourTileCache.cpp create mode 100644 libs/recast/detour_tile_cache/src/DetourTileCacheBuilder.cpp create mode 100644 libs/recast/recast/include/Recast.h create mode 100644 libs/recast/recast/include/RecastAlloc.h create mode 100644 libs/recast/recast/include/RecastAssert.h create mode 100644 libs/recast/recast/src/Recast.cpp create mode 100644 libs/recast/recast/src/RecastAlloc.cpp create mode 100644 libs/recast/recast/src/RecastArea.cpp create mode 100644 libs/recast/recast/src/RecastAssert.cpp create mode 100644 libs/recast/recast/src/RecastContour.cpp create mode 100644 libs/recast/recast/src/RecastFilter.cpp create mode 100644 libs/recast/recast/src/RecastLayers.cpp create mode 100644 libs/recast/recast/src/RecastMesh.cpp create mode 100644 libs/recast/recast/src/RecastMeshDetail.cpp create mode 100644 libs/recast/recast/src/RecastRasterization.cpp create mode 100644 libs/recast/recast/src/RecastRegion.cpp diff --git a/common/compression.cpp b/common/compression.cpp new file mode 100644 index 000000000..c56d9bf6a --- /dev/null +++ b/common/compression.cpp @@ -0,0 +1,82 @@ +#include "global_define.h" +#include "types.h" +#include +#include + +namespace EQEmu +{ + uint32 EstimateDeflateBuffer(uint32 len) { + z_stream zstream; + memset(&zstream, 0, sizeof(zstream)); + + zstream.zalloc = Z_NULL; + zstream.zfree = Z_NULL; + zstream.opaque = Z_NULL; + if (deflateInit(&zstream, Z_FINISH) != Z_OK) + return 0; + + return deflateBound(&zstream, len); + } + + uint32 DeflateData(const char *buffer, uint32 len, char *out_buffer, uint32 out_len_max) { + z_stream zstream; + memset(&zstream, 0, sizeof(zstream)); + int zerror; + + zstream.next_in = const_cast(reinterpret_cast(buffer)); + zstream.avail_in = len; + zstream.zalloc = Z_NULL; + zstream.zfree = Z_NULL; + zstream.opaque = Z_NULL; + deflateInit(&zstream, Z_FINISH); + + zstream.next_out = reinterpret_cast(out_buffer); + zstream.avail_out = out_len_max; + zerror = deflate(&zstream, Z_FINISH); + + if (zerror == Z_STREAM_END) + { + deflateEnd(&zstream); + return (uint32)zstream.total_out; + } + else + { + zerror = deflateEnd(&zstream); + return 0; + } + } + + uint32 InflateData(const char* buffer, uint32 len, char* out_buffer, uint32 out_len_max) { + z_stream zstream; + int zerror = 0; + int i; + + zstream.next_in = const_cast(reinterpret_cast(buffer)); + zstream.avail_in = len; + zstream.next_out = reinterpret_cast(out_buffer);; + zstream.avail_out = out_len_max; + zstream.zalloc = Z_NULL; + zstream.zfree = Z_NULL; + zstream.opaque = Z_NULL; + + i = inflateInit2(&zstream, 15); + if (i != Z_OK) { + return 0; + } + + zerror = inflate(&zstream, Z_FINISH); + if (zerror == Z_STREAM_END) { + inflateEnd(&zstream); + return zstream.total_out; + } + else { + if (zerror == -4 && zstream.msg == 0) + { + return 0; + } + + zerror = inflateEnd(&zstream); + return 0; + } + } +} diff --git a/common/compression.h b/common/compression.h new file mode 100644 index 000000000..cc2fac264 --- /dev/null +++ b/common/compression.h @@ -0,0 +1,8 @@ +#pragma once + +namespace EQEmu +{ + uint32 EstimateDeflateBuffer(uint32 len); + uint32 DeflateData(const char *buffer, uint32 len, char *out_buffer, uint32 out_len_max); + uint32 InflateData(const char* buffer, uint32 len, char* out_buffer, uint32 out_len_max); +} diff --git a/libs/format/.github/pull_request_template b/libs/format/.github/pull_request_template new file mode 100644 index 000000000..dcfc0fdb0 --- /dev/null +++ b/libs/format/.github/pull_request_template @@ -0,0 +1,3 @@ + diff --git a/libs/format/.gitignore b/libs/format/.gitignore new file mode 100644 index 000000000..c57070c5f --- /dev/null +++ b/libs/format/.gitignore @@ -0,0 +1,19 @@ +bin/ +/_CPack_Packages +/doc/doxyxml +/doc/html +virtualenv +/Testing +/install_manifest.txt +*~ +*.a +*.so* +*.zip +cmake_install.cmake +CPack*.cmake +fmt-*.cmake +CTestTestfile.cmake +CMakeCache.txt +CMakeFiles +Makefile +run-msbuild.bat diff --git a/libs/format/CONTRIBUTING.rst b/libs/format/CONTRIBUTING.rst new file mode 100644 index 000000000..506811d4a --- /dev/null +++ b/libs/format/CONTRIBUTING.rst @@ -0,0 +1,11 @@ +Contributing to fmt +=================== + +All C++ code must adhere to `Google C++ Style Guide +`_ with the following +exceptions: + +* Exceptions are permitted +* snake_case should be used instead of UpperCamelCase for function names + +Thanks for contributing! diff --git a/libs/format/doc/_static/breathe.css b/libs/format/doc/_static/breathe.css new file mode 100644 index 000000000..2a1534b0a --- /dev/null +++ b/libs/format/doc/_static/breathe.css @@ -0,0 +1,28 @@ + +/* -- breathe specific styles ----------------------------------------------- */ + +/* So enum value descriptions are displayed inline to the item */ +.breatheenumvalues li tt + p { + display: inline; +} + +/* So parameter descriptions are displayed inline to the item */ +.breatheparameterlist li tt + p { + display: inline; +} + +.container .breathe-sectiondef { + width: inherit; +} + +.github-btn { + border: 0; + overflow: hidden; +} + +.jumbotron { + background-size: 100% 4px; + background-repeat: repeat-y; + color: white; + text-align: center; +} diff --git a/libs/format/fmt/container.h b/libs/format/fmt/container.h new file mode 100644 index 000000000..cb6303fb7 --- /dev/null +++ b/libs/format/fmt/container.h @@ -0,0 +1,82 @@ +/* + Formatting library for C++ - standard container utilities + + Copyright (c) 2012 - 2016, Victor Zverovich + All rights reserved. + + For the license information refer to format.h. + */ + +#ifndef FMT_CONTAINER_H_ +#define FMT_CONTAINER_H_ + +#include "format.h" + +namespace fmt { + +namespace internal { + +/** + \rst + A "buffer" that appends data to a standard container (e.g. typically a + ``std::vector`` or ``std::basic_string``). + \endrst + */ +template +class ContainerBuffer : public Buffer { + private: + Container& container_; + + protected: + virtual void grow(std::size_t size) FMT_OVERRIDE { + container_.resize(size); + this->ptr_ = &container_[0]; + this->capacity_ = size; + } + + public: + explicit ContainerBuffer(Container& container) : container_(container) { + this->size_ = container_.size(); + if (this->size_ > 0) { + this->ptr_ = &container_[0]; + this->capacity_ = this->size_; + } + } +}; +} // namespace internal + +/** + \rst + This class template provides operations for formatting and appending data + to a standard *container* like ``std::vector`` or ``std::basic_string``. + + **Example**:: + + void vecformat(std::vector& dest, fmt::BasicCStringRef format, + fmt::ArgList args) { + fmt::BasicContainerWriter > appender(dest); + appender.write(format, args); + } + FMT_VARIADIC(void, vecformat, std::vector&, + fmt::BasicCStringRef); + \endrst + */ +template +class BasicContainerWriter + : public BasicWriter { + private: + internal::ContainerBuffer buffer_; + + public: + /** + \rst + Constructs a :class:`fmt::BasicContainerWriter` object. + \endrst + */ + explicit BasicContainerWriter(Container& dest) + : BasicWriter(buffer_), buffer_(dest) {} +}; + +} // namespace fmt + +#endif // FMT_CONTAINER_H_ diff --git a/libs/format/fmt/printf.cc b/libs/format/fmt/printf.cc new file mode 100644 index 000000000..95d7a36ab --- /dev/null +++ b/libs/format/fmt/printf.cc @@ -0,0 +1,32 @@ +/* + Formatting library for C++ + + Copyright (c) 2012 - 2016, Victor Zverovich + All rights reserved. + + For the license information refer to format.h. + */ + +#include "format.h" +#include "printf.h" + +namespace fmt { + +template +void printf(BasicWriter &w, BasicCStringRef format, ArgList args); + +FMT_FUNC int fprintf(std::FILE *f, CStringRef format, ArgList args) { + MemoryWriter w; + printf(w, format, args); + std::size_t size = w.size(); + return std::fwrite(w.data(), 1, size, f) < size ? -1 : static_cast(size); +} + +#ifndef FMT_HEADER_ONLY + +template void PrintfFormatter::format(CStringRef format); +template void PrintfFormatter::format(WCStringRef format); + +#endif // FMT_HEADER_ONLY + +} // namespace fmt diff --git a/libs/format/fmt/printf.h b/libs/format/fmt/printf.h new file mode 100644 index 000000000..30cbc49ba --- /dev/null +++ b/libs/format/fmt/printf.h @@ -0,0 +1,603 @@ +/* + Formatting library for C++ + + Copyright (c) 2012 - 2016, Victor Zverovich + All rights reserved. + + For the license information refer to format.h. + */ + +#ifndef FMT_PRINTF_H_ +#define FMT_PRINTF_H_ + +#include // std::fill_n +#include // std::numeric_limits + +#include "ostream.h" + +namespace fmt { +namespace internal { + +// Checks if a value fits in int - used to avoid warnings about comparing +// signed and unsigned integers. +template +struct IntChecker { + template + static bool fits_in_int(T value) { + unsigned max = std::numeric_limits::max(); + return value <= max; + } + static bool fits_in_int(bool) { return true; } +}; + +template <> +struct IntChecker { + template + static bool fits_in_int(T value) { + return value >= std::numeric_limits::min() && + value <= std::numeric_limits::max(); + } + static bool fits_in_int(int) { return true; } +}; + +class PrecisionHandler : public ArgVisitor { + public: + void report_unhandled_arg() { + FMT_THROW(FormatError("precision is not integer")); + } + + template + int visit_any_int(T value) { + if (!IntChecker::is_signed>::fits_in_int(value)) + FMT_THROW(FormatError("number is too big")); + return static_cast(value); + } +}; + +// IsZeroInt::visit(arg) returns true iff arg is a zero integer. +class IsZeroInt : public ArgVisitor { + public: + template + bool visit_any_int(T value) { return value == 0; } +}; + +// returns the default type for format specific "%s" +class DefaultType : public ArgVisitor { + public: + char visit_char(int) { return 'c'; } + + char visit_bool(bool) { return 's'; } + + char visit_pointer(const void *) { return 'p'; } + + template + char visit_any_int(T) { return 'd'; } + + template + char visit_any_double(T) { return 'g'; } + + char visit_unhandled_arg() { return 's'; } +}; + +template +struct is_same { + enum { value = 0 }; +}; + +template +struct is_same { + enum { value = 1 }; +}; + +// An argument visitor that converts an integer argument to T for printf, +// if T is an integral type. If T is void, the argument is converted to +// corresponding signed or unsigned type depending on the type specifier: +// 'd' and 'i' - signed, other - unsigned) +template +class ArgConverter : public ArgVisitor, void> { + private: + internal::Arg &arg_; + wchar_t type_; + + FMT_DISALLOW_COPY_AND_ASSIGN(ArgConverter); + + public: + ArgConverter(internal::Arg &arg, wchar_t type) + : arg_(arg), type_(type) {} + + void visit_bool(bool value) { + if (type_ != 's') + visit_any_int(value); + } + + void visit_char(char value) { + if (type_ != 's') + visit_any_int(value); + } + + template + void visit_any_int(U value) { + bool is_signed = type_ == 'd' || type_ == 'i'; + if (type_ == 's') { + is_signed = std::numeric_limits::is_signed; + } + + using internal::Arg; + typedef typename internal::Conditional< + is_same::value, U, T>::type TargetType; + if (sizeof(TargetType) <= sizeof(int)) { + // Extra casts are used to silence warnings. + if (is_signed) { + arg_.type = Arg::INT; + arg_.int_value = static_cast(static_cast(value)); + } else { + arg_.type = Arg::UINT; + typedef typename internal::MakeUnsigned::Type Unsigned; + arg_.uint_value = static_cast(static_cast(value)); + } + } else { + if (is_signed) { + arg_.type = Arg::LONG_LONG; + // glibc's printf doesn't sign extend arguments of smaller types: + // std::printf("%lld", -42); // prints "4294967254" + // but we don't have to do the same because it's a UB. + arg_.long_long_value = static_cast(value); + } else { + arg_.type = Arg::ULONG_LONG; + arg_.ulong_long_value = + static_cast::Type>(value); + } + } + } +}; + +// Converts an integer argument to char for printf. +class CharConverter : public ArgVisitor { + private: + internal::Arg &arg_; + + FMT_DISALLOW_COPY_AND_ASSIGN(CharConverter); + + public: + explicit CharConverter(internal::Arg &arg) : arg_(arg) {} + + template + void visit_any_int(T value) { + arg_.type = internal::Arg::CHAR; + arg_.int_value = static_cast(value); + } +}; + +// Checks if an argument is a valid printf width specifier and sets +// left alignment if it is negative. +class WidthHandler : public ArgVisitor { + private: + FormatSpec &spec_; + + FMT_DISALLOW_COPY_AND_ASSIGN(WidthHandler); + + public: + explicit WidthHandler(FormatSpec &spec) : spec_(spec) {} + + void report_unhandled_arg() { + FMT_THROW(FormatError("width is not integer")); + } + + template + unsigned visit_any_int(T value) { + typedef typename internal::IntTraits::MainType UnsignedType; + UnsignedType width = static_cast(value); + if (internal::is_negative(value)) { + spec_.align_ = ALIGN_LEFT; + width = 0 - width; + } + unsigned int_max = std::numeric_limits::max(); + if (width > int_max) + FMT_THROW(FormatError("number is too big")); + return static_cast(width); + } +}; +} // namespace internal + +/** + \rst + A ``printf`` argument formatter based on the `curiously recurring template + pattern `_. + + To use `~fmt::BasicPrintfArgFormatter` define a subclass that implements some + or all of the visit methods with the same signatures as the methods in + `~fmt::ArgVisitor`, for example, `~fmt::ArgVisitor::visit_int()`. + Pass the subclass as the *Impl* template parameter. When a formatting + function processes an argument, it will dispatch to a visit method + specific to the argument type. For example, if the argument type is + ``double`` then the `~fmt::ArgVisitor::visit_double()` method of a subclass + will be called. If the subclass doesn't contain a method with this signature, + then a corresponding method of `~fmt::BasicPrintfArgFormatter` or its + superclass will be called. + \endrst + */ +template +class BasicPrintfArgFormatter : + public internal::ArgFormatterBase { + private: + void write_null_pointer() { + this->spec().type_ = 0; + this->write("(nil)"); + } + + typedef internal::ArgFormatterBase Base; + + public: + /** + \rst + Constructs an argument formatter object. + *writer* is a reference to the output writer and *spec* contains format + specifier information for standard argument types. + \endrst + */ + BasicPrintfArgFormatter(BasicWriter &w, Spec &s) + : internal::ArgFormatterBase(w, s) {} + + /** Formats an argument of type ``bool``. */ + void visit_bool(bool value) { + Spec &fmt_spec = this->spec(); + if (fmt_spec.type_ != 's') + return this->visit_any_int(value); + fmt_spec.type_ = 0; + this->write(value); + } + + /** Formats a character. */ + void visit_char(int value) { + const Spec &fmt_spec = this->spec(); + BasicWriter &w = this->writer(); + if (fmt_spec.type_ && fmt_spec.type_ != 'c') + w.write_int(value, fmt_spec); + typedef typename BasicWriter::CharPtr CharPtr; + CharPtr out = CharPtr(); + if (fmt_spec.width_ > 1) { + Char fill = ' '; + out = w.grow_buffer(fmt_spec.width_); + if (fmt_spec.align_ != ALIGN_LEFT) { + std::fill_n(out, fmt_spec.width_ - 1, fill); + out += fmt_spec.width_ - 1; + } else { + std::fill_n(out + 1, fmt_spec.width_ - 1, fill); + } + } else { + out = w.grow_buffer(1); + } + *out = static_cast(value); + } + + /** Formats a null-terminated C string. */ + void visit_cstring(const char *value) { + if (value) + Base::visit_cstring(value); + else if (this->spec().type_ == 'p') + write_null_pointer(); + else + this->write("(null)"); + } + + /** Formats a pointer. */ + void visit_pointer(const void *value) { + if (value) + return Base::visit_pointer(value); + this->spec().type_ = 0; + write_null_pointer(); + } + + /** Formats an argument of a custom (user-defined) type. */ + void visit_custom(internal::Arg::CustomValue c) { + BasicFormatter formatter(ArgList(), this->writer()); + const Char format_str[] = {'}', 0}; + const Char *format = format_str; + c.format(&formatter, c.value, &format); + } +}; + +/** The default printf argument formatter. */ +template +class PrintfArgFormatter : + public BasicPrintfArgFormatter, Char, FormatSpec> { + public: + /** Constructs an argument formatter object. */ + PrintfArgFormatter(BasicWriter &w, FormatSpec &s) + : BasicPrintfArgFormatter, Char, FormatSpec>(w, s) {} +}; + +/** This template formats data and writes the output to a writer. */ +template > +class PrintfFormatter : private internal::FormatterBase { + private: + BasicWriter &writer_; + + void parse_flags(FormatSpec &spec, const Char *&s); + + // Returns the argument with specified index or, if arg_index is equal + // to the maximum unsigned value, the next argument. + internal::Arg get_arg( + const Char *s, + unsigned arg_index = (std::numeric_limits::max)()); + + // Parses argument index, flags and width and returns the argument index. + unsigned parse_header(const Char *&s, FormatSpec &spec); + + public: + /** + \rst + Constructs a ``PrintfFormatter`` object. References to the arguments and + the writer are stored in the formatter object so make sure they have + appropriate lifetimes. + \endrst + */ + explicit PrintfFormatter(const ArgList &al, BasicWriter &w) + : FormatterBase(al), writer_(w) {} + + /** Formats stored arguments and writes the output to the writer. */ + void format(BasicCStringRef format_str); +}; + +template +void PrintfFormatter::parse_flags(FormatSpec &spec, const Char *&s) { + for (;;) { + switch (*s++) { + case '-': + spec.align_ = ALIGN_LEFT; + break; + case '+': + spec.flags_ |= SIGN_FLAG | PLUS_FLAG; + break; + case '0': + spec.fill_ = '0'; + break; + case ' ': + spec.flags_ |= SIGN_FLAG; + break; + case '#': + spec.flags_ |= HASH_FLAG; + break; + default: + --s; + return; + } + } +} + +template +internal::Arg PrintfFormatter::get_arg(const Char *s, + unsigned arg_index) { + (void)s; + const char *error = FMT_NULL; + internal::Arg arg = arg_index == std::numeric_limits::max() ? + next_arg(error) : FormatterBase::get_arg(arg_index - 1, error); + if (error) + FMT_THROW(FormatError(!*s ? "invalid format string" : error)); + return arg; +} + +template +unsigned PrintfFormatter::parse_header( + const Char *&s, FormatSpec &spec) { + unsigned arg_index = std::numeric_limits::max(); + Char c = *s; + if (c >= '0' && c <= '9') { + // Parse an argument index (if followed by '$') or a width possibly + // preceded with '0' flag(s). + unsigned value = internal::parse_nonnegative_int(s); + if (*s == '$') { // value is an argument index + ++s; + arg_index = value; + } else { + if (c == '0') + spec.fill_ = '0'; + if (value != 0) { + // Nonzero value means that we parsed width and don't need to + // parse it or flags again, so return now. + spec.width_ = value; + return arg_index; + } + } + } + parse_flags(spec, s); + // Parse width. + if (*s >= '0' && *s <= '9') { + spec.width_ = internal::parse_nonnegative_int(s); + } else if (*s == '*') { + ++s; + spec.width_ = internal::WidthHandler(spec).visit(get_arg(s)); + } + return arg_index; +} + +template +void PrintfFormatter::format(BasicCStringRef format_str) { + const Char *start = format_str.c_str(); + const Char *s = start; + while (*s) { + Char c = *s++; + if (c != '%') continue; + if (*s == c) { + write(writer_, start, s); + start = ++s; + continue; + } + write(writer_, start, s - 1); + + FormatSpec spec; + spec.align_ = ALIGN_RIGHT; + + // Parse argument index, flags and width. + unsigned arg_index = parse_header(s, spec); + + // Parse precision. + if (*s == '.') { + ++s; + if ('0' <= *s && *s <= '9') { + spec.precision_ = static_cast(internal::parse_nonnegative_int(s)); + } else if (*s == '*') { + ++s; + spec.precision_ = internal::PrecisionHandler().visit(get_arg(s)); + } else { + spec.precision_ = 0; + } + } + + using internal::Arg; + Arg arg = get_arg(s, arg_index); + if (spec.flag(HASH_FLAG) && internal::IsZeroInt().visit(arg)) + spec.flags_ &= ~internal::to_unsigned(HASH_FLAG); + if (spec.fill_ == '0') { + if (arg.type <= Arg::LAST_NUMERIC_TYPE) + spec.align_ = ALIGN_NUMERIC; + else + spec.fill_ = ' '; // Ignore '0' flag for non-numeric types. + } + + // Parse length and convert the argument to the required type. + using internal::ArgConverter; + switch (*s++) { + case 'h': + if (*s == 'h') + ArgConverter(arg, *++s).visit(arg); + else + ArgConverter(arg, *s).visit(arg); + break; + case 'l': + if (*s == 'l') + ArgConverter(arg, *++s).visit(arg); + else + ArgConverter(arg, *s).visit(arg); + break; + case 'j': + ArgConverter(arg, *s).visit(arg); + break; + case 'z': + ArgConverter(arg, *s).visit(arg); + break; + case 't': + ArgConverter(arg, *s).visit(arg); + break; + case 'L': + // printf produces garbage when 'L' is omitted for long double, no + // need to do the same. + break; + default: + --s; + ArgConverter(arg, *s).visit(arg); + } + + // Parse type. + if (!*s) + FMT_THROW(FormatError("invalid format string")); + spec.type_ = static_cast(*s++); + + if (spec.type_ == 's') { + // set the format type to the default if 's' is specified + spec.type_ = internal::DefaultType().visit(arg); + } + + if (arg.type <= Arg::LAST_INTEGER_TYPE) { + // Normalize type. + switch (spec.type_) { + case 'i': case 'u': + spec.type_ = 'd'; + break; + case 'c': + // TODO: handle wchar_t + internal::CharConverter(arg).visit(arg); + break; + } + } + + start = s; + + // Format argument. + AF(writer_, spec).visit(arg); + } + write(writer_, start, s); +} + +inline void printf(Writer &w, CStringRef format, ArgList args) { + PrintfFormatter(args, w).format(format); +} +FMT_VARIADIC(void, printf, Writer &, CStringRef) + +inline void printf(WWriter &w, WCStringRef format, ArgList args) { + PrintfFormatter(args, w).format(format); +} +FMT_VARIADIC(void, printf, WWriter &, WCStringRef) + +/** + \rst + Formats arguments and returns the result as a string. + + **Example**:: + + std::string message = fmt::sprintf("The answer is %d", 42); + \endrst +*/ +inline std::string sprintf(CStringRef format, ArgList args) { + MemoryWriter w; + printf(w, format, args); + return w.str(); +} +FMT_VARIADIC(std::string, sprintf, CStringRef) + +inline std::wstring sprintf(WCStringRef format, ArgList args) { + WMemoryWriter w; + printf(w, format, args); + return w.str(); +} +FMT_VARIADIC_W(std::wstring, sprintf, WCStringRef) + +/** + \rst + Prints formatted data to the file *f*. + + **Example**:: + + fmt::fprintf(stderr, "Don't %s!", "panic"); + \endrst + */ +FMT_API int fprintf(std::FILE *f, CStringRef format, ArgList args); +FMT_VARIADIC(int, fprintf, std::FILE *, CStringRef) + +/** + \rst + Prints formatted data to ``stdout``. + + **Example**:: + + fmt::printf("Elapsed time: %.2f seconds", 1.23); + \endrst + */ +inline int printf(CStringRef format, ArgList args) { + return fprintf(stdout, format, args); +} +FMT_VARIADIC(int, printf, CStringRef) + +/** + \rst + Prints formatted data to the stream *os*. + + **Example**:: + + fprintf(cerr, "Don't %s!", "panic"); + \endrst + */ +inline int fprintf(std::ostream &os, CStringRef format_str, ArgList args) { + MemoryWriter w; + printf(w, format_str, args); + internal::write(os, w); + return static_cast(w.size()); +} +FMT_VARIADIC(int, fprintf, std::ostream &, CStringRef) +} // namespace fmt + +#ifdef FMT_HEADER_ONLY +# include "printf.cc" +#endif + +#endif // FMT_PRINTF_H_ diff --git a/libs/format/fmt/string.h b/libs/format/fmt/string.h new file mode 100644 index 000000000..ccf46ee11 --- /dev/null +++ b/libs/format/fmt/string.h @@ -0,0 +1,126 @@ +/* + Formatting library for C++ - string utilities + + Copyright (c) 2012 - 2016, Victor Zverovich + All rights reserved. + + For the license information refer to format.h. + */ + +#ifndef FMT_STRING_H_ +#define FMT_STRING_H_ + +#include "format.h" + +namespace fmt { + +namespace internal { + +// A buffer that stores data in ``std::basic_string``. +template > +class StringBuffer : public Buffer { + public: + typedef std::basic_string, Allocator> StringType; + + private: + StringType data_; + + protected: + virtual void grow(std::size_t size) FMT_OVERRIDE { + data_.resize(size); + this->ptr_ = &data_[0]; + this->capacity_ = size; + } + + public: + explicit StringBuffer(const Allocator &allocator = Allocator()) + : data_(allocator) {} + + // Moves the data to ``str`` clearing the buffer. + void move_to(StringType &str) { + data_.resize(this->size_); + str.swap(data_); + this->capacity_ = this->size_ = 0; + this->ptr_ = FMT_NULL; + } +}; +} // namespace internal + +/** + \rst + This class template provides operations for formatting and writing data + into a character stream. The output is stored in a ``std::basic_string`` + that grows dynamically. + + You can use one of the following typedefs for common character types + and the standard allocator: + + +---------------+----------------------------+ + | Type | Definition | + +===============+============================+ + | StringWriter | BasicStringWriter | + +---------------+----------------------------+ + | WStringWriter | BasicStringWriter | + +---------------+----------------------------+ + + **Example**:: + + StringWriter out; + out << "The answer is " << 42 << "\n"; + + This will write the following output to the ``out`` object: + + .. code-block:: none + + The answer is 42 + + The output can be moved to a ``std::basic_string`` with ``out.move_to()``. + \endrst + */ +template > +class BasicStringWriter : public BasicWriter { + private: + internal::StringBuffer buffer_; + + public: + /** + \rst + Constructs a :class:`fmt::BasicStringWriter` object. + \endrst + */ + explicit BasicStringWriter(const Allocator &allocator = Allocator()) + : BasicWriter(buffer_), buffer_(allocator) {} + + /** + \rst + Moves the buffer content to *str* clearing the buffer. + \endrst + */ + void move_to(std::basic_string, Allocator> &str) { + buffer_.move_to(str); + } +}; + +typedef BasicStringWriter StringWriter; +typedef BasicStringWriter WStringWriter; + +/** + \rst + Converts *value* to ``std::string`` using the default format for type *T*. + + **Example**:: + + #include "fmt/string.h" + + std::string answer = fmt::to_string(42); + \endrst + */ +template +std::string to_string(const T &value) { + fmt::MemoryWriter w; + w << value; + return w.str(); +} +} + +#endif // FMT_STRING_H_ diff --git a/libs/format/support/manage.py b/libs/format/support/manage.py new file mode 100644 index 000000000..1da371d49 --- /dev/null +++ b/libs/format/support/manage.py @@ -0,0 +1,235 @@ +#!/usr/bin/env python + +"""Manage site and releases. + +Usage: + manage.py release [] + manage.py site +""" + +from __future__ import print_function +import datetime, docopt, fileinput, json, os +import re, requests, shutil, sys, tempfile +from contextlib import contextmanager +from distutils.version import LooseVersion +from subprocess import check_call + + +class Git: + def __init__(self, dir): + self.dir = dir + + def call(self, method, args, **kwargs): + return check_call(['git', method] + list(args), **kwargs) + + def add(self, *args): + return self.call('add', args, cwd=self.dir) + + def checkout(self, *args): + return self.call('checkout', args, cwd=self.dir) + + def clean(self, *args): + return self.call('clean', args, cwd=self.dir) + + def clone(self, *args): + return self.call('clone', list(args) + [self.dir]) + + def commit(self, *args): + return self.call('commit', args, cwd=self.dir) + + def pull(self, *args): + return self.call('pull', args, cwd=self.dir) + + def push(self, *args): + return self.call('push', args, cwd=self.dir) + + def reset(self, *args): + return self.call('reset', args, cwd=self.dir) + + def update(self, *args): + clone = not os.path.exists(self.dir) + if clone: + self.clone(*args) + return clone + + +def clean_checkout(repo, branch): + repo.clean('-f', '-d') + repo.reset('--hard') + repo.checkout(branch) + + +class Runner: + def __init__(self, cwd): + self.cwd = cwd + + def __call__(self, *args, **kwargs): + kwargs['cwd'] = kwargs.get('cwd', self.cwd) + check_call(args, **kwargs) + + +def create_build_env(): + """Create a build environment.""" + class Env: + pass + env = Env() + + # Import the documentation build module. + env.fmt_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + sys.path.insert(0, os.path.join(env.fmt_dir, 'doc')) + import build + + env.build_dir = 'build' + + # Virtualenv and repos are cached to speed up builds. + build.create_build_env(os.path.join(env.build_dir, 'virtualenv')) + + env.fmt_repo = Git(os.path.join(env.build_dir, 'fmt')) + return env + + +@contextmanager +def rewrite(filename): + class Buffer: + pass + buffer = Buffer() + if not os.path.exists(filename): + buffer.data = '' + yield buffer + return + with open(filename) as f: + buffer.data = f.read() + yield buffer + with open(filename, 'w') as f: + f.write(buffer.data) + + +fmt_repo_url = 'git@github.com:fmtlib/fmt' + + +def update_site(env): + env.fmt_repo.update(fmt_repo_url) + + doc_repo = Git(os.path.join(env.build_dir, 'fmtlib.github.io')) + doc_repo.update('git@github.com:fmtlib/fmtlib.github.io') + + for version in ['1.0.0', '1.1.0', '2.0.0', '3.0.0']: + clean_checkout(env.fmt_repo, version) + target_doc_dir = os.path.join(env.fmt_repo.dir, 'doc') + # Remove the old theme. + for entry in os.listdir(target_doc_dir): + path = os.path.join(target_doc_dir, entry) + if os.path.isdir(path): + shutil.rmtree(path) + # Copy the new theme. + for entry in ['_static', '_templates', 'basic-bootstrap', 'bootstrap', + 'conf.py', 'fmt.less']: + src = os.path.join(env.fmt_dir, 'doc', entry) + dst = os.path.join(target_doc_dir, entry) + copy = shutil.copytree if os.path.isdir(src) else shutil.copyfile + copy(src, dst) + # Rename index to contents. + contents = os.path.join(target_doc_dir, 'contents.rst') + if not os.path.exists(contents): + os.rename(os.path.join(target_doc_dir, 'index.rst'), contents) + # Fix issues in reference.rst/api.rst. + for filename in ['reference.rst', 'api.rst']: + pattern = re.compile('doxygenfunction.. (bin|oct|hexu|hex)$', re.M) + with rewrite(os.path.join(target_doc_dir, filename)) as b: + b.data = b.data.replace('std::ostream &', 'std::ostream&') + b.data = re.sub(pattern, r'doxygenfunction:: \1(int)', b.data) + b.data = b.data.replace('std::FILE*', 'std::FILE *') + b.data = b.data.replace('unsigned int', 'unsigned') + # Fix a broken link in index.rst. + index = os.path.join(target_doc_dir, 'index.rst') + with rewrite(index) as b: + b.data = b.data.replace( + 'doc/latest/index.html#format-string-syntax', 'syntax.html') + # Build the docs. + html_dir = os.path.join(env.build_dir, 'html') + if os.path.exists(html_dir): + shutil.rmtree(html_dir) + include_dir = env.fmt_repo.dir + if LooseVersion(version) >= LooseVersion('3.0.0'): + include_dir = os.path.join(include_dir, 'fmt') + import build + build.build_docs(version, doc_dir=target_doc_dir, + include_dir=include_dir, work_dir=env.build_dir) + shutil.rmtree(os.path.join(html_dir, '.doctrees')) + # Create symlinks for older versions. + for link, target in {'index': 'contents', 'api': 'reference'}.items(): + link = os.path.join(html_dir, link) + '.html' + target += '.html' + if os.path.exists(os.path.join(html_dir, target)) and \ + not os.path.exists(link): + os.symlink(target, link) + # Copy docs to the website. + version_doc_dir = os.path.join(doc_repo.dir, version) + shutil.rmtree(version_doc_dir) + shutil.move(html_dir, version_doc_dir) + + +def release(args): + env = create_build_env() + fmt_repo = env.fmt_repo + + branch = args.get('') + if branch is None: + branch = 'master' + if not fmt_repo.update('-b', branch, fmt_repo_url): + clean_checkout(fmt_repo, branch) + + # Convert changelog from RST to GitHub-flavored Markdown and get the + # version. + changelog = 'ChangeLog.rst' + changelog_path = os.path.join(fmt_repo.dir, changelog) + import rst2md + changes, version = rst2md.convert(changelog_path) + cmakelists = 'CMakeLists.txt' + for line in fileinput.input(os.path.join(fmt_repo.dir, cmakelists), + inplace=True): + prefix = 'set(FMT_VERSION ' + if line.startswith(prefix): + line = prefix + version + ')\n' + sys.stdout.write(line) + + # Update the version in the changelog. + title_len = 0 + for line in fileinput.input(changelog_path, inplace=True): + if line.decode('utf-8').startswith(version + ' - TBD'): + line = version + ' - ' + datetime.date.today().isoformat() + title_len = len(line) + line += '\n' + elif title_len: + line = '-' * title_len + '\n' + title_len = 0 + sys.stdout.write(line) + # TODO: add new version to manage.py + fmt_repo.checkout('-B', 'release') + fmt_repo.add(changelog, cmakelists) + fmt_repo.commit('-m', 'Update version') + + # Build the docs and package. + run = Runner(fmt_repo.dir) + run('cmake', '.') + run('make', 'doc', 'package_source') + + update_site(env) + + # Create a release on GitHub. + fmt_repo.push('origin', 'release') + r = requests.post('https://api.github.com/repos/fmtlib/fmt/releases', + params={'access_token': os.getenv('FMT_TOKEN')}, + data=json.dumps({'tag_name': version, + 'target_commitish': 'release', + 'body': changes, 'draft': True})) + if r.status_code != 201: + raise Exception('Failed to create a release ' + str(r)) + + +if __name__ == '__main__': + args = docopt.docopt(__doc__) + if args.get('release'): + release(args) + elif args.get('site'): + update_site(create_build_env()) diff --git a/libs/format/support/rst2md.py b/libs/format/support/rst2md.py new file mode 100644 index 000000000..00ee93d9c --- /dev/null +++ b/libs/format/support/rst2md.py @@ -0,0 +1,127 @@ +# reStructuredText (RST) to GitHub-flavored Markdown converter + +import re +from docutils import core, nodes, writers + + +def is_github_ref(node): + return re.match('https://github.com/.*/(issues|pull)/.*', node['refuri']) + + +class Translator(nodes.NodeVisitor): + def __init__(self, document): + nodes.NodeVisitor.__init__(self, document) + self.output = '' + self.indent = 0 + self.preserve_newlines = False + + def write(self, text): + self.output += text.replace('\n', '\n' + ' ' * self.indent) + + def visit_document(self, node): + pass + + def depart_document(self, node): + pass + + def visit_section(self, node): + pass + + def depart_section(self, node): + # Skip all sections except the first one. + raise nodes.StopTraversal + + def visit_title(self, node): + self.version = re.match(r'(\d+\.\d+\.\d+).*', node.children[0]).group(1) + raise nodes.SkipChildren + + def depart_title(self, node): + pass + + def visit_Text(self, node): + if not self.preserve_newlines: + node = node.replace('\n', ' ') + self.write(node) + + def depart_Text(self, node): + pass + + def visit_bullet_list(self, node): + pass + + def depart_bullet_list(self, node): + pass + + def visit_list_item(self, node): + self.write('* ') + self.indent += 2 + + def depart_list_item(self, node): + self.indent -= 2 + self.write('\n\n') + + def visit_paragraph(self, node): + pass + + def depart_paragraph(self, node): + pass + + def visit_reference(self, node): + if not is_github_ref(node): + self.write('[') + + def depart_reference(self, node): + if not is_github_ref(node): + self.write('](' + node['refuri'] + ')') + + def visit_target(self, node): + pass + + def depart_target(self, node): + pass + + def visit_literal(self, node): + self.write('`') + + def depart_literal(self, node): + self.write('`') + + def visit_literal_block(self, node): + self.write('\n\n```') + if 'c++' in node['classes']: + self.write('c++') + self.write('\n') + self.preserve_newlines = True + + def depart_literal_block(self, node): + self.write('\n```\n') + self.preserve_newlines = False + + def visit_inline(self, node): + pass + + def depart_inline(self, node): + pass + + def visit_image(self, node): + self.write('![](' + node['uri'] + ')') + + def depart_image(self, node): + pass + + +class MDWriter(writers.Writer): + """GitHub-flavored markdown writer""" + + supported = ('md',) + """Formats this writer supports.""" + + def translate(self): + translator = Translator(self.document) + self.document.walkabout(translator) + self.output = (translator.output, translator.version) + + +def convert(rst_path): + """Converts RST file to Markdown.""" + return core.publish_file(source_path=rst_path, writer=MDWriter()) diff --git a/libs/format/test/container-test.cc b/libs/format/test/container-test.cc new file mode 100644 index 000000000..8cafb3d02 --- /dev/null +++ b/libs/format/test/container-test.cc @@ -0,0 +1,94 @@ +/* + Tests of container utilities + + Copyright (c) 2012 - 2016, Victor Zverovich + All rights reserved. + + For the license information refer to format.h. + */ + +#include "fmt/container.h" +#include "gtest/gtest.h" + +using fmt::internal::ContainerBuffer; + +TEST(ContainerBufferTest, Empty) { + std::string data; + ContainerBuffer buffer(data); + EXPECT_EQ(0u, buffer.size()); + EXPECT_EQ(0u, buffer.capacity()); +} + +TEST(ContainerBufferTest, Reserve) { + std::string data; + ContainerBuffer buffer(data); + std::size_t capacity = std::string().capacity() + 10; + buffer.reserve(capacity); + EXPECT_EQ(0u, buffer.size()); + EXPECT_EQ(capacity, buffer.capacity()); +} + +TEST(ContainerBufferTest, Resize) { + std::string data; + ContainerBuffer buffer(data); + std::size_t size = std::string().capacity() + 10; + buffer.resize(size); + EXPECT_EQ(size, buffer.size()); + EXPECT_EQ(size, buffer.capacity()); +} + +TEST(ContainerBufferTest, Append) { + std::string data("Why so"); + const std::string serious(" serious"); + ContainerBuffer buffer(data); + buffer.append(serious.c_str(), serious.c_str() + serious.length()); + EXPECT_EQ("Why so serious", data); + EXPECT_EQ(data.length(), buffer.size()); +} + +TEST(BasicContainerWriterTest, String) { + std::string data; + fmt::BasicContainerWriter out(data); + out << "The answer is " << 42 << "\n"; + EXPECT_EQ("The answer is 42\n", data); + EXPECT_EQ(17u, out.size()); +} + +TEST(BasicContainerWriterTest, WString) { + std::wstring data; + fmt::BasicContainerWriter out(data); + out << "The answer is " << 42 << "\n"; + EXPECT_EQ(L"The answer is 42\n", data); + EXPECT_EQ(17u, out.size()); +} + +TEST(BasicContainerWriterTest, Vector) { + std::vector data; + fmt::BasicContainerWriter > out(data); + out << "The answer is " << 42 << "\n"; + EXPECT_EQ(17u, data.size()); + EXPECT_EQ(out.size(), data.size()); +} + +TEST(BasicContainerWriterTest, StringAppend) { + std::string data("The"); + fmt::BasicContainerWriter out(data); + EXPECT_EQ(3u, data.size()); + EXPECT_EQ(3u, out.size()); + out << " answer is " << 42 << "\n"; + EXPECT_EQ("The answer is 42\n", data); + EXPECT_EQ(17u, out.size()); +} + +TEST(BasicContainerWriterTest, VectorAppend) { + std::vector data; + data.push_back('T'); + data.push_back('h'); + data.push_back('e'); + fmt::BasicContainerWriter > out(data); + EXPECT_EQ(3u, data.size()); + EXPECT_EQ(3u, out.size()); + out << " answer is " << 42 << "\n"; + EXPECT_EQ(17u, data.size()); + EXPECT_EQ(17u, out.size()); +} diff --git a/libs/format/test/custom-formatter-test.cc b/libs/format/test/custom-formatter-test.cc new file mode 100644 index 000000000..cc9c44854 --- /dev/null +++ b/libs/format/test/custom-formatter-test.cc @@ -0,0 +1,68 @@ +/* + Custom argument formatter tests + + Copyright (c) 2016, Victor Zverovich + All rights reserved. + + For the license information refer to format.h. + */ + +#include "fmt/printf.h" +#include "gtest-extra.h" + +using fmt::BasicPrintfArgFormatter; + +// A custom argument formatter that doesn't print `-` for floating-point values +// rounded to 0. +class CustomArgFormatter + : public fmt::BasicArgFormatter { + public: + CustomArgFormatter(fmt::BasicFormatter &f, + fmt::FormatSpec &s, const char *fmt) + : fmt::BasicArgFormatter(f, s, fmt) {} + + void visit_double(double value) { + if (round(value * pow(10, spec().precision())) == 0) + value = 0; + fmt::BasicArgFormatter::visit_double(value); + } +}; + +// A custom argument formatter that doesn't print `-` for floating-point values +// rounded to 0. +class CustomPrintfArgFormatter : + public BasicPrintfArgFormatter { + public: + typedef BasicPrintfArgFormatter Base; + + CustomPrintfArgFormatter(fmt::BasicWriter &w, fmt::FormatSpec &spec) + : Base(w, spec) {} + + void visit_double(double value) { + if (round(value * pow(10, spec().precision())) == 0) + value = 0; + Base::visit_double(value); + } +}; + +std::string custom_format(const char *format_str, fmt::ArgList args) { + fmt::MemoryWriter writer; + // Pass custom argument formatter as a template arg to BasicFormatter. + fmt::BasicFormatter formatter(args, writer); + formatter.format(format_str); + return writer.str(); +} +FMT_VARIADIC(std::string, custom_format, const char *) + +std::string custom_sprintf(const char* format_str, fmt::ArgList args){ + fmt::MemoryWriter writer; + fmt::PrintfFormatter formatter(args, writer); + formatter.format(format_str); + return writer.str(); +} +FMT_VARIADIC(std::string, custom_sprintf, const char*); + +TEST(CustomFormatterTest, Format) { + EXPECT_EQ("0.00", custom_format("{:.2f}", -.00001)); + EXPECT_EQ("0.00", custom_sprintf("%.2f", -.00001)); +} diff --git a/libs/format/test/string-test.cc b/libs/format/test/string-test.cc new file mode 100644 index 000000000..10e537b7a --- /dev/null +++ b/libs/format/test/string-test.cc @@ -0,0 +1,80 @@ +/* + Tests of string utilities + + Copyright (c) 2012 - 2016, Victor Zverovich + All rights reserved. + + For the license information refer to format.h. + */ + +#include "fmt/string.h" +#include "gtest/gtest.h" + +using fmt::internal::StringBuffer; + +TEST(StringBufferTest, Empty) { + StringBuffer buffer; + EXPECT_EQ(0u, buffer.size()); + EXPECT_EQ(0u, buffer.capacity()); + std::string data; + // std::string may have initial capacity. + std::size_t capacity = data.capacity(); + buffer.move_to(data); + EXPECT_EQ("", data); + EXPECT_EQ(capacity, data.capacity()); +} + +TEST(StringBufferTest, Reserve) { + StringBuffer buffer; + std::size_t capacity = std::string().capacity() + 10; + buffer.reserve(capacity); + EXPECT_EQ(0u, buffer.size()); + EXPECT_EQ(capacity, buffer.capacity()); + std::string data; + buffer.move_to(data); + EXPECT_EQ("", data); +} + +TEST(StringBufferTest, Resize) { + StringBuffer buffer; + std::size_t size = std::string().capacity() + 10; + buffer.resize(size); + EXPECT_EQ(size, buffer.size()); + EXPECT_EQ(size, buffer.capacity()); + std::string data; + buffer.move_to(data); + EXPECT_EQ(size, data.size()); +} + +TEST(StringBufferTest, MoveTo) { + StringBuffer buffer; + std::size_t size = std::string().capacity() + 10; + buffer.resize(size); + const char *p = &buffer[0]; + std::string data; + buffer.move_to(data); + EXPECT_EQ(p, &data[0]); + EXPECT_EQ(0u, buffer.size()); + EXPECT_EQ(0u, buffer.capacity()); +} + +TEST(StringWriterTest, MoveTo) { + fmt::StringWriter out; + out << "The answer is " << 42 << "\n"; + std::string s; + out.move_to(s); + EXPECT_EQ("The answer is 42\n", s); + EXPECT_EQ(0u, out.size()); +} + +TEST(StringWriterTest, WString) { + fmt::WStringWriter out; + out << "The answer is " << 42 << "\n"; + std::wstring s; + out.move_to(s); + EXPECT_EQ(L"The answer is 42\n", s); +} + +TEST(StringTest, ToString) { + EXPECT_EQ("42", fmt::to_string(42)); +} diff --git a/libs/format/test/time-test.cc b/libs/format/test/time-test.cc new file mode 100644 index 000000000..8b6c36128 --- /dev/null +++ b/libs/format/test/time-test.cc @@ -0,0 +1,60 @@ +/* + Time formatting tests + + Copyright (c) 2012 - 2016, Victor Zverovich + All rights reserved. + + For the license information refer to format.h. + */ +#ifdef WIN32 +#define _CRT_SECURE_NO_WARNINGS +#endif + +#include "gmock/gmock.h" +#include "fmt/time.h" + +TEST(TimeTest, Format) { + std::tm tm = std::tm(); + tm.tm_year = 116; + tm.tm_mon = 3; + tm.tm_mday = 25; + EXPECT_EQ("The date is 2016-04-25.", + fmt::format("The date is {:%Y-%m-%d}.", tm)); +} + +TEST(TimeTest, GrowBuffer) { + std::string s = "{:"; + for (int i = 0; i < 30; ++i) + s += "%c"; + s += "}\n"; + std::time_t t = std::time(0); + fmt::format(s, *std::localtime(&t)); +} + +TEST(TimeTest, EmptyResult) { + EXPECT_EQ("", fmt::format("{}", std::tm())); +} + +bool EqualTime(const std::tm &lhs, const std::tm &rhs) { + return lhs.tm_sec == rhs.tm_sec && + lhs.tm_min == rhs.tm_min && + lhs.tm_hour == rhs.tm_hour && + lhs.tm_mday == rhs.tm_mday && + lhs.tm_mon == rhs.tm_mon && + lhs.tm_year == rhs.tm_year && + lhs.tm_wday == rhs.tm_wday && + lhs.tm_yday == rhs.tm_yday && + lhs.tm_isdst == rhs.tm_isdst; +} + +TEST(TimeTest, LocalTime) { + std::time_t t = std::time(0); + std::tm tm = *std::localtime(&t); + EXPECT_TRUE(EqualTime(tm, fmt::localtime(t))); +} + +TEST(TimeTest, GMTime) { + std::time_t t = std::time(0); + std::tm tm = *std::gmtime(&t); + EXPECT_TRUE(EqualTime(tm, fmt::gmtime(t))); +} diff --git a/libs/recast/CMakeLists.txt b/libs/recast/CMakeLists.txt new file mode 100644 index 000000000..7f91efb38 --- /dev/null +++ b/libs/recast/CMakeLists.txt @@ -0,0 +1,77 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +SET(recast_navigation_sources + detour/src/DetourAlloc.cpp + detour/src/DetourAssert.cpp + detour/src/DetourCommon.cpp + detour/src/DetourNavMesh.cpp + detour/src/DetourNavMeshBuilder.cpp + detour/src/DetourNavMeshQuery.cpp + detour/src/DetourNode.cpp + recast/src/Recast.cpp + recast/src/RecastAlloc.cpp + recast/src/RecastArea.cpp + recast/src/RecastAssert.cpp + recast/src/RecastContour.cpp + recast/src/RecastFilter.cpp + recast/src/RecastLayers.cpp + recast/src/RecastMesh.cpp + recast/src/RecastMeshDetail.cpp + recast/src/RecastRasterization.cpp + recast/src/RecastRegion.cpp +) + +SET(recast_navigation_headers + detour/include/DetourAlloc.h + detour/include/DetourAssert.h + detour/include/DetourCommon.h + detour/include/DetourMath.h + detour/include/DetourNavMesh.h + detour/include/DetourNavMeshBuilder.h + detour/include/DetourNavMeshQuery.h + detour/include/DetourNode.h + detour/include/DetourStatus.h + recast/include/Recast.h + recast/include/RecastAlloc.h + recast/include/RecastAssert.h +) + +SOURCE_GROUP(Detour FILES + detour/src/DetourAlloc.cpp + detour/src/DetourAssert.cpp + detour/src/DetourCommon.cpp + detour/src/DetourNavMesh.cpp + detour/src/DetourNavMeshBuilder.cpp + detour/src/DetourNavMeshQuery.cpp + detour/src/DetourNode.cpp + detour/include/DetourAlloc.h + detour/include/DetourAssert.h + detour/include/DetourCommon.h + detour/include/DetourMath.h + detour/include/DetourNavMesh.h + detour/include/DetourNavMeshBuilder.h + detour/include/DetourNavMeshQuery.h + detour/include/DetourNode.h + detour/include/DetourStatus.h +) + +SOURCE_GROUP(Recast FILES + recast/src/Recast.cpp + recast/src/RecastAlloc.cpp + recast/src/RecastArea.cpp + recast/src/RecastAssert.cpp + recast/src/RecastContour.cpp + recast/src/RecastFilter.cpp + recast/src/RecastLayers.cpp + recast/src/RecastMesh.cpp + recast/src/RecastMeshDetail.cpp + recast/src/RecastRasterization.cpp + recast/src/RecastRegion.cpp + recast/include/Recast.h + recast/include/RecastAlloc.h + recast/include/RecastAssert.h +) + +ADD_LIBRARY(recast_navigation ${recast_navigation_sources} ${recast_navigation_headers}) + +SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib) \ No newline at end of file diff --git a/libs/recast/debug_utils/include/DebugDraw.h b/libs/recast/debug_utils/include/DebugDraw.h new file mode 100644 index 000000000..00b544d1c --- /dev/null +++ b/libs/recast/debug_utils/include/DebugDraw.h @@ -0,0 +1,223 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#ifndef DEBUGDRAW_H +#define DEBUGDRAW_H + +// Some math headers don't have PI defined. +static const float DU_PI = 3.14159265f; + +enum duDebugDrawPrimitives +{ + DU_DRAW_POINTS, + DU_DRAW_LINES, + DU_DRAW_TRIS, + DU_DRAW_QUADS, +}; + +/// Abstract debug draw interface. +struct duDebugDraw +{ + virtual ~duDebugDraw() = 0; + + virtual void depthMask(bool state) = 0; + + virtual void texture(bool state) = 0; + + /// Begin drawing primitives. + /// @param prim [in] primitive type to draw, one of rcDebugDrawPrimitives. + /// @param size [in] size of a primitive, applies to point size and line width only. + virtual void begin(duDebugDrawPrimitives prim, float size = 1.0f) = 0; + + /// Submit a vertex + /// @param pos [in] position of the verts. + /// @param color [in] color of the verts. + virtual void vertex(const float* pos, unsigned int color) = 0; + + /// Submit a vertex + /// @param x,y,z [in] position of the verts. + /// @param color [in] color of the verts. + virtual void vertex(const float x, const float y, const float z, unsigned int color) = 0; + + /// Submit a vertex + /// @param pos [in] position of the verts. + /// @param color [in] color of the verts. + virtual void vertex(const float* pos, unsigned int color, const float* uv) = 0; + + /// Submit a vertex + /// @param x,y,z [in] position of the verts. + /// @param color [in] color of the verts. + virtual void vertex(const float x, const float y, const float z, unsigned int color, const float u, const float v) = 0; + + /// End drawing primitives. + virtual void end() = 0; + + /// Compute a color for given area. + virtual unsigned int areaToCol(unsigned int area); +}; + +inline unsigned int duRGBA(int r, int g, int b, int a) +{ + return ((unsigned int)r) | ((unsigned int)g << 8) | ((unsigned int)b << 16) | ((unsigned int)a << 24); +} + +inline unsigned int duRGBAf(float fr, float fg, float fb, float fa) +{ + unsigned char r = (unsigned char)(fr*255.0f); + unsigned char g = (unsigned char)(fg*255.0f); + unsigned char b = (unsigned char)(fb*255.0f); + unsigned char a = (unsigned char)(fa*255.0f); + return duRGBA(r,g,b,a); +} + +unsigned int duIntToCol(int i, int a); +void duIntToCol(int i, float* col); + +inline unsigned int duMultCol(const unsigned int col, const unsigned int d) +{ + const unsigned int r = col & 0xff; + const unsigned int g = (col >> 8) & 0xff; + const unsigned int b = (col >> 16) & 0xff; + const unsigned int a = (col >> 24) & 0xff; + return duRGBA((r*d) >> 8, (g*d) >> 8, (b*d) >> 8, a); +} + +inline unsigned int duDarkenCol(unsigned int col) +{ + return ((col >> 1) & 0x007f7f7f) | (col & 0xff000000); +} + +inline unsigned int duLerpCol(unsigned int ca, unsigned int cb, unsigned int u) +{ + const unsigned int ra = ca & 0xff; + const unsigned int ga = (ca >> 8) & 0xff; + const unsigned int ba = (ca >> 16) & 0xff; + const unsigned int aa = (ca >> 24) & 0xff; + const unsigned int rb = cb & 0xff; + const unsigned int gb = (cb >> 8) & 0xff; + const unsigned int bb = (cb >> 16) & 0xff; + const unsigned int ab = (cb >> 24) & 0xff; + + unsigned int r = (ra*(255-u) + rb*u)/255; + unsigned int g = (ga*(255-u) + gb*u)/255; + unsigned int b = (ba*(255-u) + bb*u)/255; + unsigned int a = (aa*(255-u) + ab*u)/255; + return duRGBA(r,g,b,a); +} + +inline unsigned int duTransCol(unsigned int c, unsigned int a) +{ + return (a<<24) | (c & 0x00ffffff); +} + + +void duCalcBoxColors(unsigned int* colors, unsigned int colTop, unsigned int colSide); + +void duDebugDrawCylinderWire(struct duDebugDraw* dd, float minx, float miny, float minz, + float maxx, float maxy, float maxz, unsigned int col, const float lineWidth); + +void duDebugDrawBoxWire(struct duDebugDraw* dd, float minx, float miny, float minz, + float maxx, float maxy, float maxz, unsigned int col, const float lineWidth); + +void duDebugDrawArc(struct duDebugDraw* dd, const float x0, const float y0, const float z0, + const float x1, const float y1, const float z1, const float h, + const float as0, const float as1, unsigned int col, const float lineWidth); + +void duDebugDrawArrow(struct duDebugDraw* dd, const float x0, const float y0, const float z0, + const float x1, const float y1, const float z1, + const float as0, const float as1, unsigned int col, const float lineWidth); + +void duDebugDrawCircle(struct duDebugDraw* dd, const float x, const float y, const float z, + const float r, unsigned int col, const float lineWidth); + +void duDebugDrawCross(struct duDebugDraw* dd, const float x, const float y, const float z, + const float size, unsigned int col, const float lineWidth); + +void duDebugDrawBox(struct duDebugDraw* dd, float minx, float miny, float minz, + float maxx, float maxy, float maxz, const unsigned int* fcol); + +void duDebugDrawCylinder(struct duDebugDraw* dd, float minx, float miny, float minz, + float maxx, float maxy, float maxz, unsigned int col); + +void duDebugDrawGridXZ(struct duDebugDraw* dd, const float ox, const float oy, const float oz, + const int w, const int h, const float size, + const unsigned int col, const float lineWidth); + + +// Versions without begin/end, can be used to draw multiple primitives. +void duAppendCylinderWire(struct duDebugDraw* dd, float minx, float miny, float minz, + float maxx, float maxy, float maxz, unsigned int col); + +void duAppendBoxWire(struct duDebugDraw* dd, float minx, float miny, float minz, + float maxx, float maxy, float maxz, unsigned int col); + +void duAppendBoxPoints(struct duDebugDraw* dd, float minx, float miny, float minz, + float maxx, float maxy, float maxz, unsigned int col); + +void duAppendArc(struct duDebugDraw* dd, const float x0, const float y0, const float z0, + const float x1, const float y1, const float z1, const float h, + const float as0, const float as1, unsigned int col); + +void duAppendArrow(struct duDebugDraw* dd, const float x0, const float y0, const float z0, + const float x1, const float y1, const float z1, + const float as0, const float as1, unsigned int col); + +void duAppendCircle(struct duDebugDraw* dd, const float x, const float y, const float z, + const float r, unsigned int col); + +void duAppendCross(struct duDebugDraw* dd, const float x, const float y, const float z, + const float size, unsigned int col); + +void duAppendBox(struct duDebugDraw* dd, float minx, float miny, float minz, + float maxx, float maxy, float maxz, const unsigned int* fcol); + +void duAppendCylinder(struct duDebugDraw* dd, float minx, float miny, float minz, + float maxx, float maxy, float maxz, unsigned int col); + + +class duDisplayList : public duDebugDraw +{ + float* m_pos; + unsigned int* m_color; + int m_size; + int m_cap; + + bool m_depthMask; + duDebugDrawPrimitives m_prim; + float m_primSize; + + void resize(int cap); + +public: + duDisplayList(int cap = 512); + ~duDisplayList(); + virtual void depthMask(bool state); + virtual void begin(duDebugDrawPrimitives prim, float size = 1.0f); + virtual void vertex(const float x, const float y, const float z, unsigned int color); + virtual void vertex(const float* pos, unsigned int color); + virtual void end(); + void clear(); + void draw(struct duDebugDraw* dd); +private: + // Explicitly disabled copy constructor and copy assignment operator. + duDisplayList(const duDisplayList&); + duDisplayList& operator=(const duDisplayList&); +}; + + +#endif // DEBUGDRAW_H diff --git a/libs/recast/debug_utils/include/DetourDebugDraw.h b/libs/recast/debug_utils/include/DetourDebugDraw.h new file mode 100644 index 000000000..ff2ca2f9d --- /dev/null +++ b/libs/recast/debug_utils/include/DetourDebugDraw.h @@ -0,0 +1,48 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#ifndef DETOURDEBUGDRAW_H +#define DETOURDEBUGDRAW_H + +#include "DetourNavMesh.h" +#include "DetourNavMeshQuery.h" +#include "DetourTileCacheBuilder.h" + +enum DrawNavMeshFlags +{ + DU_DRAWNAVMESH_OFFMESHCONS = 0x01, + DU_DRAWNAVMESH_CLOSEDLIST = 0x02, + DU_DRAWNAVMESH_COLOR_TILES = 0x04, +}; + +void duDebugDrawNavMesh(struct duDebugDraw* dd, const dtNavMesh& mesh, unsigned char flags); +void duDebugDrawNavMeshWithClosedList(struct duDebugDraw* dd, const dtNavMesh& mesh, const dtNavMeshQuery& query, unsigned char flags); +void duDebugDrawNavMeshNodes(struct duDebugDraw* dd, const dtNavMeshQuery& query); +void duDebugDrawNavMeshBVTree(struct duDebugDraw* dd, const dtNavMesh& mesh); +void duDebugDrawNavMeshPortals(struct duDebugDraw* dd, const dtNavMesh& mesh); +void duDebugDrawNavMeshPolysWithFlags(struct duDebugDraw* dd, const dtNavMesh& mesh, const unsigned short polyFlags, const unsigned int col); +void duDebugDrawNavMeshPoly(struct duDebugDraw* dd, const dtNavMesh& mesh, dtPolyRef ref, const unsigned int col); + +void duDebugDrawTileCacheLayerAreas(struct duDebugDraw* dd, const dtTileCacheLayer& layer, const float cs, const float ch); +void duDebugDrawTileCacheLayerRegions(struct duDebugDraw* dd, const dtTileCacheLayer& layer, const float cs, const float ch); +void duDebugDrawTileCacheContours(duDebugDraw* dd, const struct dtTileCacheContourSet& lcset, + const float* orig, const float cs, const float ch); +void duDebugDrawTileCachePolyMesh(duDebugDraw* dd, const struct dtTileCachePolyMesh& lmesh, + const float* orig, const float cs, const float ch); + +#endif // DETOURDEBUGDRAW_H diff --git a/libs/recast/debug_utils/include/RecastDebugDraw.h b/libs/recast/debug_utils/include/RecastDebugDraw.h new file mode 100644 index 000000000..6a55fa647 --- /dev/null +++ b/libs/recast/debug_utils/include/RecastDebugDraw.h @@ -0,0 +1,42 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#ifndef RECAST_DEBUGDRAW_H +#define RECAST_DEBUGDRAW_H + +void duDebugDrawTriMesh(struct duDebugDraw* dd, const float* verts, int nverts, const int* tris, const float* normals, int ntris, const unsigned char* flags, const float texScale); +void duDebugDrawTriMeshSlope(struct duDebugDraw* dd, const float* verts, int nverts, const int* tris, const float* normals, int ntris, const float walkableSlopeAngle, const float texScale); + +void duDebugDrawHeightfieldSolid(struct duDebugDraw* dd, const struct rcHeightfield& hf); +void duDebugDrawHeightfieldWalkable(struct duDebugDraw* dd, const struct rcHeightfield& hf); + +void duDebugDrawCompactHeightfieldSolid(struct duDebugDraw* dd, const struct rcCompactHeightfield& chf); +void duDebugDrawCompactHeightfieldRegions(struct duDebugDraw* dd, const struct rcCompactHeightfield& chf); +void duDebugDrawCompactHeightfieldDistance(struct duDebugDraw* dd, const struct rcCompactHeightfield& chf); + +void duDebugDrawHeightfieldLayer(duDebugDraw* dd, const struct rcHeightfieldLayer& layer, const int idx); +void duDebugDrawHeightfieldLayers(duDebugDraw* dd, const struct rcHeightfieldLayerSet& lset); +void duDebugDrawHeightfieldLayersRegions(duDebugDraw* dd, const struct rcHeightfieldLayerSet& lset); + +void duDebugDrawRegionConnections(struct duDebugDraw* dd, const struct rcContourSet& cset, const float alpha = 1.0f); +void duDebugDrawRawContours(struct duDebugDraw* dd, const struct rcContourSet& cset, const float alpha = 1.0f); +void duDebugDrawContours(struct duDebugDraw* dd, const struct rcContourSet& cset, const float alpha = 1.0f); +void duDebugDrawPolyMesh(struct duDebugDraw* dd, const struct rcPolyMesh& mesh); +void duDebugDrawPolyMeshDetail(struct duDebugDraw* dd, const struct rcPolyMeshDetail& dmesh); + +#endif // RECAST_DEBUGDRAW_H diff --git a/libs/recast/debug_utils/include/RecastDump.h b/libs/recast/debug_utils/include/RecastDump.h new file mode 100644 index 000000000..6a722fdae --- /dev/null +++ b/libs/recast/debug_utils/include/RecastDump.h @@ -0,0 +1,43 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#ifndef RECAST_DUMP_H +#define RECAST_DUMP_H + +struct duFileIO +{ + virtual ~duFileIO() = 0; + virtual bool isWriting() const = 0; + virtual bool isReading() const = 0; + virtual bool write(const void* ptr, const size_t size) = 0; + virtual bool read(void* ptr, const size_t size) = 0; +}; + +bool duDumpPolyMeshToObj(struct rcPolyMesh& pmesh, duFileIO* io); +bool duDumpPolyMeshDetailToObj(struct rcPolyMeshDetail& dmesh, duFileIO* io); + +bool duDumpContourSet(struct rcContourSet& cset, duFileIO* io); +bool duReadContourSet(struct rcContourSet& cset, duFileIO* io); + +bool duDumpCompactHeightfield(struct rcCompactHeightfield& chf, duFileIO* io); +bool duReadCompactHeightfield(struct rcCompactHeightfield& chf, duFileIO* io); + +void duLogBuildTimes(rcContext& ctx, const int totalTileUsec); + + +#endif // RECAST_DUMP_H diff --git a/libs/recast/debug_utils/src/DebugDraw.cpp b/libs/recast/debug_utils/src/DebugDraw.cpp new file mode 100644 index 000000000..d0179bca2 --- /dev/null +++ b/libs/recast/debug_utils/src/DebugDraw.cpp @@ -0,0 +1,612 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#define _USE_MATH_DEFINES +#include +#include "DebugDraw.h" +#include "DetourMath.h" +#include "DetourNavMesh.h" + + +duDebugDraw::~duDebugDraw() +{ + // Empty +} + +unsigned int duDebugDraw::areaToCol(unsigned int area) +{ + if (area == 0) + { + // Treat zero area type as default. + return duRGBA(0, 192, 255, 255); + } + else + { + return duIntToCol(area, 255); + } +} + +inline int bit(int a, int b) +{ + return (a & (1 << b)) >> b; +} + +unsigned int duIntToCol(int i, int a) +{ + int r = bit(i, 1) + bit(i, 3) * 2 + 1; + int g = bit(i, 2) + bit(i, 4) * 2 + 1; + int b = bit(i, 0) + bit(i, 5) * 2 + 1; + return duRGBA(r*63,g*63,b*63,a); +} + +void duIntToCol(int i, float* col) +{ + int r = bit(i, 0) + bit(i, 3) * 2 + 1; + int g = bit(i, 1) + bit(i, 4) * 2 + 1; + int b = bit(i, 2) + bit(i, 5) * 2 + 1; + col[0] = 1 - r*63.0f/255.0f; + col[1] = 1 - g*63.0f/255.0f; + col[2] = 1 - b*63.0f/255.0f; +} + +void duCalcBoxColors(unsigned int* colors, unsigned int colTop, unsigned int colSide) +{ + if (!colors) return; + + colors[0] = duMultCol(colTop, 250); + colors[1] = duMultCol(colSide, 140); + colors[2] = duMultCol(colSide, 165); + colors[3] = duMultCol(colSide, 217); + colors[4] = duMultCol(colSide, 165); + colors[5] = duMultCol(colSide, 217); +} + +void duDebugDrawCylinderWire(struct duDebugDraw* dd, float minx, float miny, float minz, + float maxx, float maxy, float maxz, unsigned int col, const float lineWidth) +{ + if (!dd) return; + + dd->begin(DU_DRAW_LINES, lineWidth); + duAppendCylinderWire(dd, minx,miny,minz, maxx,maxy,maxz, col); + dd->end(); +} + +void duDebugDrawBoxWire(struct duDebugDraw* dd, float minx, float miny, float minz, + float maxx, float maxy, float maxz, unsigned int col, const float lineWidth) +{ + if (!dd) return; + + dd->begin(DU_DRAW_LINES, lineWidth); + duAppendBoxWire(dd, minx,miny,minz, maxx,maxy,maxz, col); + dd->end(); +} + +void duDebugDrawArc(struct duDebugDraw* dd, const float x0, const float y0, const float z0, + const float x1, const float y1, const float z1, const float h, + const float as0, const float as1, unsigned int col, const float lineWidth) +{ + if (!dd) return; + + dd->begin(DU_DRAW_LINES, lineWidth); + duAppendArc(dd, x0,y0,z0, x1,y1,z1, h, as0, as1, col); + dd->end(); +} + +void duDebugDrawArrow(struct duDebugDraw* dd, const float x0, const float y0, const float z0, + const float x1, const float y1, const float z1, + const float as0, const float as1, unsigned int col, const float lineWidth) +{ + if (!dd) return; + + dd->begin(DU_DRAW_LINES, lineWidth); + duAppendArrow(dd, x0,y0,z0, x1,y1,z1, as0, as1, col); + dd->end(); +} + +void duDebugDrawCircle(struct duDebugDraw* dd, const float x, const float y, const float z, + const float r, unsigned int col, const float lineWidth) +{ + if (!dd) return; + + dd->begin(DU_DRAW_LINES, lineWidth); + duAppendCircle(dd, x,y,z, r, col); + dd->end(); +} + +void duDebugDrawCross(struct duDebugDraw* dd, const float x, const float y, const float z, + const float size, unsigned int col, const float lineWidth) +{ + if (!dd) return; + + dd->begin(DU_DRAW_LINES, lineWidth); + duAppendCross(dd, x,y,z, size, col); + dd->end(); +} + +void duDebugDrawBox(struct duDebugDraw* dd, float minx, float miny, float minz, + float maxx, float maxy, float maxz, const unsigned int* fcol) +{ + if (!dd) return; + + dd->begin(DU_DRAW_QUADS); + duAppendBox(dd, minx,miny,minz, maxx,maxy,maxz, fcol); + dd->end(); +} + +void duDebugDrawCylinder(struct duDebugDraw* dd, float minx, float miny, float minz, + float maxx, float maxy, float maxz, unsigned int col) +{ + if (!dd) return; + + dd->begin(DU_DRAW_TRIS); + duAppendCylinder(dd, minx,miny,minz, maxx,maxy,maxz, col); + dd->end(); +} + +void duDebugDrawGridXZ(struct duDebugDraw* dd, const float ox, const float oy, const float oz, + const int w, const int h, const float size, + const unsigned int col, const float lineWidth) +{ + if (!dd) return; + + dd->begin(DU_DRAW_LINES, lineWidth); + for (int i = 0; i <= h; ++i) + { + dd->vertex(ox,oy,oz+i*size, col); + dd->vertex(ox+w*size,oy,oz+i*size, col); + } + for (int i = 0; i <= w; ++i) + { + dd->vertex(ox+i*size,oy,oz, col); + dd->vertex(ox+i*size,oy,oz+h*size, col); + } + dd->end(); +} + + +void duAppendCylinderWire(struct duDebugDraw* dd, float minx, float miny, float minz, + float maxx, float maxy, float maxz, unsigned int col) +{ + if (!dd) return; + + static const int NUM_SEG = 16; + static float dir[NUM_SEG*2]; + static bool init = false; + if (!init) + { + init = true; + for (int i = 0; i < NUM_SEG; ++i) + { + const float a = (float)i/(float)NUM_SEG*DU_PI*2; + dir[i*2] = dtMathCosf(a); + dir[i*2+1] = dtMathSinf(a); + } + } + + const float cx = (maxx + minx)/2; + const float cz = (maxz + minz)/2; + const float rx = (maxx - minx)/2; + const float rz = (maxz - minz)/2; + + for (int i = 0, j = NUM_SEG-1; i < NUM_SEG; j = i++) + { + dd->vertex(cx+dir[j*2+0]*rx, miny, cz+dir[j*2+1]*rz, col); + dd->vertex(cx+dir[i*2+0]*rx, miny, cz+dir[i*2+1]*rz, col); + dd->vertex(cx+dir[j*2+0]*rx, maxy, cz+dir[j*2+1]*rz, col); + dd->vertex(cx+dir[i*2+0]*rx, maxy, cz+dir[i*2+1]*rz, col); + } + for (int i = 0; i < NUM_SEG; i += NUM_SEG/4) + { + dd->vertex(cx+dir[i*2+0]*rx, miny, cz+dir[i*2+1]*rz, col); + dd->vertex(cx+dir[i*2+0]*rx, maxy, cz+dir[i*2+1]*rz, col); + } +} + +void duAppendBoxWire(struct duDebugDraw* dd, float minx, float miny, float minz, + float maxx, float maxy, float maxz, unsigned int col) +{ + if (!dd) return; + // Top + dd->vertex(minx, miny, minz, col); + dd->vertex(maxx, miny, minz, col); + dd->vertex(maxx, miny, minz, col); + dd->vertex(maxx, miny, maxz, col); + dd->vertex(maxx, miny, maxz, col); + dd->vertex(minx, miny, maxz, col); + dd->vertex(minx, miny, maxz, col); + dd->vertex(minx, miny, minz, col); + + // bottom + dd->vertex(minx, maxy, minz, col); + dd->vertex(maxx, maxy, minz, col); + dd->vertex(maxx, maxy, minz, col); + dd->vertex(maxx, maxy, maxz, col); + dd->vertex(maxx, maxy, maxz, col); + dd->vertex(minx, maxy, maxz, col); + dd->vertex(minx, maxy, maxz, col); + dd->vertex(minx, maxy, minz, col); + + // Sides + dd->vertex(minx, miny, minz, col); + dd->vertex(minx, maxy, minz, col); + dd->vertex(maxx, miny, minz, col); + dd->vertex(maxx, maxy, minz, col); + dd->vertex(maxx, miny, maxz, col); + dd->vertex(maxx, maxy, maxz, col); + dd->vertex(minx, miny, maxz, col); + dd->vertex(minx, maxy, maxz, col); +} + +void duAppendBoxPoints(struct duDebugDraw* dd, float minx, float miny, float minz, + float maxx, float maxy, float maxz, unsigned int col) +{ + if (!dd) return; + // Top + dd->vertex(minx, miny, minz, col); + dd->vertex(maxx, miny, minz, col); + dd->vertex(maxx, miny, minz, col); + dd->vertex(maxx, miny, maxz, col); + dd->vertex(maxx, miny, maxz, col); + dd->vertex(minx, miny, maxz, col); + dd->vertex(minx, miny, maxz, col); + dd->vertex(minx, miny, minz, col); + + // bottom + dd->vertex(minx, maxy, minz, col); + dd->vertex(maxx, maxy, minz, col); + dd->vertex(maxx, maxy, minz, col); + dd->vertex(maxx, maxy, maxz, col); + dd->vertex(maxx, maxy, maxz, col); + dd->vertex(minx, maxy, maxz, col); + dd->vertex(minx, maxy, maxz, col); + dd->vertex(minx, maxy, minz, col); +} + +void duAppendBox(struct duDebugDraw* dd, float minx, float miny, float minz, + float maxx, float maxy, float maxz, const unsigned int* fcol) +{ + if (!dd) return; + const float verts[8*3] = + { + minx, miny, minz, + maxx, miny, minz, + maxx, miny, maxz, + minx, miny, maxz, + minx, maxy, minz, + maxx, maxy, minz, + maxx, maxy, maxz, + minx, maxy, maxz, + }; + static const unsigned char inds[6*4] = + { + 7, 6, 5, 4, + 0, 1, 2, 3, + 1, 5, 6, 2, + 3, 7, 4, 0, + 2, 6, 7, 3, + 0, 4, 5, 1, + }; + + const unsigned char* in = inds; + for (int i = 0; i < 6; ++i) + { + dd->vertex(&verts[*in*3], fcol[i]); in++; + dd->vertex(&verts[*in*3], fcol[i]); in++; + dd->vertex(&verts[*in*3], fcol[i]); in++; + dd->vertex(&verts[*in*3], fcol[i]); in++; + } +} + +void duAppendCylinder(struct duDebugDraw* dd, float minx, float miny, float minz, + float maxx, float maxy, float maxz, unsigned int col) +{ + if (!dd) return; + + static const int NUM_SEG = 16; + static float dir[NUM_SEG*2]; + static bool init = false; + if (!init) + { + init = true; + for (int i = 0; i < NUM_SEG; ++i) + { + const float a = (float)i/(float)NUM_SEG*DU_PI*2; + dir[i*2] = cosf(a); + dir[i*2+1] = sinf(a); + } + } + + unsigned int col2 = duMultCol(col, 160); + + const float cx = (maxx + minx)/2; + const float cz = (maxz + minz)/2; + const float rx = (maxx - minx)/2; + const float rz = (maxz - minz)/2; + + for (int i = 2; i < NUM_SEG; ++i) + { + const int a = 0, b = i-1, c = i; + dd->vertex(cx+dir[a*2+0]*rx, miny, cz+dir[a*2+1]*rz, col2); + dd->vertex(cx+dir[b*2+0]*rx, miny, cz+dir[b*2+1]*rz, col2); + dd->vertex(cx+dir[c*2+0]*rx, miny, cz+dir[c*2+1]*rz, col2); + } + for (int i = 2; i < NUM_SEG; ++i) + { + const int a = 0, b = i, c = i-1; + dd->vertex(cx+dir[a*2+0]*rx, maxy, cz+dir[a*2+1]*rz, col); + dd->vertex(cx+dir[b*2+0]*rx, maxy, cz+dir[b*2+1]*rz, col); + dd->vertex(cx+dir[c*2+0]*rx, maxy, cz+dir[c*2+1]*rz, col); + } + for (int i = 0, j = NUM_SEG-1; i < NUM_SEG; j = i++) + { + dd->vertex(cx+dir[i*2+0]*rx, miny, cz+dir[i*2+1]*rz, col2); + dd->vertex(cx+dir[j*2+0]*rx, miny, cz+dir[j*2+1]*rz, col2); + dd->vertex(cx+dir[j*2+0]*rx, maxy, cz+dir[j*2+1]*rz, col); + + dd->vertex(cx+dir[i*2+0]*rx, miny, cz+dir[i*2+1]*rz, col2); + dd->vertex(cx+dir[j*2+0]*rx, maxy, cz+dir[j*2+1]*rz, col); + dd->vertex(cx+dir[i*2+0]*rx, maxy, cz+dir[i*2+1]*rz, col); + } +} + + +inline void evalArc(const float x0, const float y0, const float z0, + const float dx, const float dy, const float dz, + const float h, const float u, float* res) +{ + res[0] = x0 + dx * u; + res[1] = y0 + dy * u + h * (1-(u*2-1)*(u*2-1)); + res[2] = z0 + dz * u; +} + + +inline void vcross(float* dest, const float* v1, const float* v2) +{ + dest[0] = v1[1]*v2[2] - v1[2]*v2[1]; + dest[1] = v1[2]*v2[0] - v1[0]*v2[2]; + dest[2] = v1[0]*v2[1] - v1[1]*v2[0]; +} + +inline void vnormalize(float* v) +{ + float d = 1.0f / sqrtf(v[0]*v[0] + v[1]*v[1] + v[2]*v[2]); + v[0] *= d; + v[1] *= d; + v[2] *= d; +} + +inline void vsub(float* dest, const float* v1, const float* v2) +{ + dest[0] = v1[0]-v2[0]; + dest[1] = v1[1]-v2[1]; + dest[2] = v1[2]-v2[2]; +} + +inline float vdistSqr(const float* v1, const float* v2) +{ + const float x = v1[0]-v2[0]; + const float y = v1[1]-v2[1]; + const float z = v1[2]-v2[2]; + return x*x + y*y + z*z; +} + + +void appendArrowHead(struct duDebugDraw* dd, const float* p, const float* q, + const float s, unsigned int col) +{ + const float eps = 0.001f; + if (!dd) return; + if (vdistSqr(p,q) < eps*eps) return; + float ax[3], ay[3] = {0,1,0}, az[3]; + vsub(az, q, p); + vnormalize(az); + vcross(ax, ay, az); + vcross(ay, az, ax); + vnormalize(ay); + + dd->vertex(p, col); +// dd->vertex(p[0]+az[0]*s+ay[0]*s/2, p[1]+az[1]*s+ay[1]*s/2, p[2]+az[2]*s+ay[2]*s/2, col); + dd->vertex(p[0]+az[0]*s+ax[0]*s/3, p[1]+az[1]*s+ax[1]*s/3, p[2]+az[2]*s+ax[2]*s/3, col); + + dd->vertex(p, col); +// dd->vertex(p[0]+az[0]*s-ay[0]*s/2, p[1]+az[1]*s-ay[1]*s/2, p[2]+az[2]*s-ay[2]*s/2, col); + dd->vertex(p[0]+az[0]*s-ax[0]*s/3, p[1]+az[1]*s-ax[1]*s/3, p[2]+az[2]*s-ax[2]*s/3, col); + +} + +void duAppendArc(struct duDebugDraw* dd, const float x0, const float y0, const float z0, + const float x1, const float y1, const float z1, const float h, + const float as0, const float as1, unsigned int col) +{ + if (!dd) return; + static const int NUM_ARC_PTS = 8; + static const float PAD = 0.05f; + static const float ARC_PTS_SCALE = (1.0f-PAD*2) / (float)NUM_ARC_PTS; + const float dx = x1 - x0; + const float dy = y1 - y0; + const float dz = z1 - z0; + const float len = sqrtf(dx*dx + dy*dy + dz*dz); + float prev[3]; + evalArc(x0,y0,z0, dx,dy,dz, len*h, PAD, prev); + for (int i = 1; i <= NUM_ARC_PTS; ++i) + { + const float u = PAD + i * ARC_PTS_SCALE; + float pt[3]; + evalArc(x0,y0,z0, dx,dy,dz, len*h, u, pt); + dd->vertex(prev[0],prev[1],prev[2], col); + dd->vertex(pt[0],pt[1],pt[2], col); + prev[0] = pt[0]; prev[1] = pt[1]; prev[2] = pt[2]; + } + + // End arrows + if (as0 > 0.001f) + { + float p[3], q[3]; + evalArc(x0,y0,z0, dx,dy,dz, len*h, PAD, p); + evalArc(x0,y0,z0, dx,dy,dz, len*h, PAD+0.05f, q); + appendArrowHead(dd, p, q, as0, col); + } + + if (as1 > 0.001f) + { + float p[3], q[3]; + evalArc(x0,y0,z0, dx,dy,dz, len*h, 1-PAD, p); + evalArc(x0,y0,z0, dx,dy,dz, len*h, 1-(PAD+0.05f), q); + appendArrowHead(dd, p, q, as1, col); + } +} + +void duAppendArrow(struct duDebugDraw* dd, const float x0, const float y0, const float z0, + const float x1, const float y1, const float z1, + const float as0, const float as1, unsigned int col) +{ + if (!dd) return; + + dd->vertex(x0,y0,z0, col); + dd->vertex(x1,y1,z1, col); + + // End arrows + const float p[3] = {x0,y0,z0}, q[3] = {x1,y1,z1}; + if (as0 > 0.001f) + appendArrowHead(dd, p, q, as0, col); + if (as1 > 0.001f) + appendArrowHead(dd, q, p, as1, col); +} + +void duAppendCircle(struct duDebugDraw* dd, const float x, const float y, const float z, + const float r, unsigned int col) +{ + if (!dd) return; + static const int NUM_SEG = 40; + static float dir[40*2]; + static bool init = false; + if (!init) + { + init = true; + for (int i = 0; i < NUM_SEG; ++i) + { + const float a = (float)i/(float)NUM_SEG*DU_PI*2; + dir[i*2] = cosf(a); + dir[i*2+1] = sinf(a); + } + } + + for (int i = 0, j = NUM_SEG-1; i < NUM_SEG; j = i++) + { + dd->vertex(x+dir[j*2+0]*r, y, z+dir[j*2+1]*r, col); + dd->vertex(x+dir[i*2+0]*r, y, z+dir[i*2+1]*r, col); + } +} + +void duAppendCross(struct duDebugDraw* dd, const float x, const float y, const float z, + const float s, unsigned int col) +{ + if (!dd) return; + dd->vertex(x-s,y,z, col); + dd->vertex(x+s,y,z, col); + dd->vertex(x,y-s,z, col); + dd->vertex(x,y+s,z, col); + dd->vertex(x,y,z-s, col); + dd->vertex(x,y,z+s, col); +} + +duDisplayList::duDisplayList(int cap) : + m_pos(0), + m_color(0), + m_size(0), + m_cap(0), + m_depthMask(true), + m_prim(DU_DRAW_LINES), + m_primSize(1.0f) +{ + if (cap < 8) + cap = 8; + resize(cap); +} + +duDisplayList::~duDisplayList() +{ + delete [] m_pos; + delete [] m_color; +} + +void duDisplayList::resize(int cap) +{ + float* newPos = new float[cap*3]; + if (m_size) + memcpy(newPos, m_pos, sizeof(float)*3*m_size); + delete [] m_pos; + m_pos = newPos; + + unsigned int* newColor = new unsigned int[cap]; + if (m_size) + memcpy(newColor, m_color, sizeof(unsigned int)*m_size); + delete [] m_color; + m_color = newColor; + + m_cap = cap; +} + +void duDisplayList::clear() +{ + m_size = 0; +} + +void duDisplayList::depthMask(bool state) +{ + m_depthMask = state; +} + +void duDisplayList::begin(duDebugDrawPrimitives prim, float size) +{ + clear(); + m_prim = prim; + m_primSize = size; +} + +void duDisplayList::vertex(const float x, const float y, const float z, unsigned int color) +{ + if (m_size+1 >= m_cap) + resize(m_cap*2); + float* p = &m_pos[m_size*3]; + p[0] = x; + p[1] = y; + p[2] = z; + m_color[m_size] = color; + m_size++; +} + +void duDisplayList::vertex(const float* pos, unsigned int color) +{ + vertex(pos[0],pos[1],pos[2],color); +} + +void duDisplayList::end() +{ +} + +void duDisplayList::draw(struct duDebugDraw* dd) +{ + if (!dd) return; + if (!m_size) return; + dd->depthMask(m_depthMask); + dd->begin(m_prim, m_primSize); + for (int i = 0; i < m_size; ++i) + dd->vertex(&m_pos[i*3], m_color[i]); + dd->end(); +} diff --git a/libs/recast/debug_utils/src/DetourDebugDraw.cpp b/libs/recast/debug_utils/src/DetourDebugDraw.cpp new file mode 100644 index 000000000..dd4bad3fd --- /dev/null +++ b/libs/recast/debug_utils/src/DetourDebugDraw.cpp @@ -0,0 +1,862 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#include "DebugDraw.h" +#include "DetourDebugDraw.h" +#include "DetourNavMesh.h" +#include "DetourCommon.h" +#include "DetourNode.h" + + +static float distancePtLine2d(const float* pt, const float* p, const float* q) +{ + float pqx = q[0] - p[0]; + float pqz = q[2] - p[2]; + float dx = pt[0] - p[0]; + float dz = pt[2] - p[2]; + float d = pqx*pqx + pqz*pqz; + float t = pqx*dx + pqz*dz; + if (d != 0) t /= d; + dx = p[0] + t*pqx - pt[0]; + dz = p[2] + t*pqz - pt[2]; + return dx*dx + dz*dz; +} + +static void drawPolyBoundaries(duDebugDraw* dd, const dtMeshTile* tile, + const unsigned int col, const float linew, + bool inner) +{ + static const float thr = 0.01f*0.01f; + + dd->begin(DU_DRAW_LINES, linew); + + for (int i = 0; i < tile->header->polyCount; ++i) + { + const dtPoly* p = &tile->polys[i]; + + if (p->getType() == DT_POLYTYPE_OFFMESH_CONNECTION) continue; + + const dtPolyDetail* pd = &tile->detailMeshes[i]; + + for (int j = 0, nj = (int)p->vertCount; j < nj; ++j) + { + unsigned int c = col; + if (inner) + { + if (p->neis[j] == 0) continue; + if (p->neis[j] & DT_EXT_LINK) + { + bool con = false; + for (unsigned int k = p->firstLink; k != DT_NULL_LINK; k = tile->links[k].next) + { + if (tile->links[k].edge == j) + { + con = true; + break; + } + } + if (con) + c = duRGBA(255,255,255,48); + else + c = duRGBA(0,0,0,48); + } + else + c = duRGBA(0,48,64,32); + } + else + { + if (p->neis[j] != 0) continue; + } + + const float* v0 = &tile->verts[p->verts[j]*3]; + const float* v1 = &tile->verts[p->verts[(j+1) % nj]*3]; + + // Draw detail mesh edges which align with the actual poly edge. + // This is really slow. + for (int k = 0; k < pd->triCount; ++k) + { + const unsigned char* t = &tile->detailTris[(pd->triBase+k)*4]; + const float* tv[3]; + for (int m = 0; m < 3; ++m) + { + if (t[m] < p->vertCount) + tv[m] = &tile->verts[p->verts[t[m]]*3]; + else + tv[m] = &tile->detailVerts[(pd->vertBase+(t[m]-p->vertCount))*3]; + } + for (int m = 0, n = 2; m < 3; n=m++) + { + if (((t[3] >> (n*2)) & 0x3) == 0) continue; // Skip inner detail edges. + if (distancePtLine2d(tv[n],v0,v1) < thr && + distancePtLine2d(tv[m],v0,v1) < thr) + { + dd->vertex(tv[n], c); + dd->vertex(tv[m], c); + } + } + } + } + } + dd->end(); +} + +static void drawMeshTile(duDebugDraw* dd, const dtNavMesh& mesh, const dtNavMeshQuery* query, + const dtMeshTile* tile, unsigned char flags) +{ + dtPolyRef base = mesh.getPolyRefBase(tile); + + int tileNum = mesh.decodePolyIdTile(base); + const unsigned int tileColor = duIntToCol(tileNum, 128); + + dd->depthMask(false); + + dd->begin(DU_DRAW_TRIS); + for (int i = 0; i < tile->header->polyCount; ++i) + { + const dtPoly* p = &tile->polys[i]; + if (p->getType() == DT_POLYTYPE_OFFMESH_CONNECTION) // Skip off-mesh links. + continue; + + const dtPolyDetail* pd = &tile->detailMeshes[i]; + + unsigned int col; + if (query && query->isInClosedList(base | (dtPolyRef)i)) + col = duRGBA(255,196,0,64); + else + { + if (flags & DU_DRAWNAVMESH_COLOR_TILES) + col = tileColor; + else + col = duTransCol(dd->areaToCol(p->getArea()), 64); + } + + for (int j = 0; j < pd->triCount; ++j) + { + const unsigned char* t = &tile->detailTris[(pd->triBase+j)*4]; + for (int k = 0; k < 3; ++k) + { + if (t[k] < p->vertCount) + dd->vertex(&tile->verts[p->verts[t[k]]*3], col); + else + dd->vertex(&tile->detailVerts[(pd->vertBase+t[k]-p->vertCount)*3], col); + } + } + } + dd->end(); + + // Draw inter poly boundaries + drawPolyBoundaries(dd, tile, duRGBA(0,48,64,32), 1.5f, true); + + // Draw outer poly boundaries + drawPolyBoundaries(dd, tile, duRGBA(0,48,64,220), 2.5f, false); + + if (flags & DU_DRAWNAVMESH_OFFMESHCONS) + { + dd->begin(DU_DRAW_LINES, 2.0f); + for (int i = 0; i < tile->header->polyCount; ++i) + { + const dtPoly* p = &tile->polys[i]; + if (p->getType() != DT_POLYTYPE_OFFMESH_CONNECTION) // Skip regular polys. + continue; + + unsigned int col, col2; + if (query && query->isInClosedList(base | (dtPolyRef)i)) + col = duRGBA(255,196,0,220); + else + col = duDarkenCol(duTransCol(dd->areaToCol(p->getArea()), 220)); + + const dtOffMeshConnection* con = &tile->offMeshCons[i - tile->header->offMeshBase]; + const float* va = &tile->verts[p->verts[0]*3]; + const float* vb = &tile->verts[p->verts[1]*3]; + + // Check to see if start and end end-points have links. + bool startSet = false; + bool endSet = false; + for (unsigned int k = p->firstLink; k != DT_NULL_LINK; k = tile->links[k].next) + { + if (tile->links[k].edge == 0) + startSet = true; + if (tile->links[k].edge == 1) + endSet = true; + } + + // End points and their on-mesh locations. + dd->vertex(va[0],va[1],va[2], col); + dd->vertex(con->pos[0],con->pos[1],con->pos[2], col); + col2 = startSet ? col : duRGBA(220,32,16,196); + duAppendCircle(dd, con->pos[0],con->pos[1]+0.1f,con->pos[2], con->rad, col2); + + dd->vertex(vb[0],vb[1],vb[2], col); + dd->vertex(con->pos[3],con->pos[4],con->pos[5], col); + col2 = endSet ? col : duRGBA(220,32,16,196); + duAppendCircle(dd, con->pos[3],con->pos[4]+0.1f,con->pos[5], con->rad, col2); + + // End point vertices. + dd->vertex(con->pos[0],con->pos[1],con->pos[2], duRGBA(0,48,64,196)); + dd->vertex(con->pos[0],con->pos[1]+0.2f,con->pos[2], duRGBA(0,48,64,196)); + + dd->vertex(con->pos[3],con->pos[4],con->pos[5], duRGBA(0,48,64,196)); + dd->vertex(con->pos[3],con->pos[4]+0.2f,con->pos[5], duRGBA(0,48,64,196)); + + // Connection arc. + duAppendArc(dd, con->pos[0],con->pos[1],con->pos[2], con->pos[3],con->pos[4],con->pos[5], 0.25f, + (con->flags & 1) ? 0.6f : 0, 0.6f, col); + } + dd->end(); + } + + const unsigned int vcol = duRGBA(0,0,0,196); + dd->begin(DU_DRAW_POINTS, 3.0f); + for (int i = 0; i < tile->header->vertCount; ++i) + { + const float* v = &tile->verts[i*3]; + dd->vertex(v[0], v[1], v[2], vcol); + } + dd->end(); + + dd->depthMask(true); +} + +void duDebugDrawNavMesh(duDebugDraw* dd, const dtNavMesh& mesh, unsigned char flags) +{ + if (!dd) return; + + for (int i = 0; i < mesh.getMaxTiles(); ++i) + { + const dtMeshTile* tile = mesh.getTile(i); + if (!tile->header) continue; + drawMeshTile(dd, mesh, 0, tile, flags); + } +} + +void duDebugDrawNavMeshWithClosedList(struct duDebugDraw* dd, const dtNavMesh& mesh, const dtNavMeshQuery& query, unsigned char flags) +{ + if (!dd) return; + + const dtNavMeshQuery* q = (flags & DU_DRAWNAVMESH_CLOSEDLIST) ? &query : 0; + + for (int i = 0; i < mesh.getMaxTiles(); ++i) + { + const dtMeshTile* tile = mesh.getTile(i); + if (!tile->header) continue; + drawMeshTile(dd, mesh, q, tile, flags); + } +} + +void duDebugDrawNavMeshNodes(struct duDebugDraw* dd, const dtNavMeshQuery& query) +{ + if (!dd) return; + + const dtNodePool* pool = query.getNodePool(); + if (pool) + { + const float off = 0.5f; + dd->begin(DU_DRAW_POINTS, 4.0f); + for (int i = 0; i < pool->getHashSize(); ++i) + { + for (dtNodeIndex j = pool->getFirst(i); j != DT_NULL_IDX; j = pool->getNext(j)) + { + const dtNode* node = pool->getNodeAtIdx(j+1); + if (!node) continue; + dd->vertex(node->pos[0],node->pos[1]+off,node->pos[2], duRGBA(255,192,0,255)); + } + } + dd->end(); + + dd->begin(DU_DRAW_LINES, 2.0f); + for (int i = 0; i < pool->getHashSize(); ++i) + { + for (dtNodeIndex j = pool->getFirst(i); j != DT_NULL_IDX; j = pool->getNext(j)) + { + const dtNode* node = pool->getNodeAtIdx(j+1); + if (!node) continue; + if (!node->pidx) continue; + const dtNode* parent = pool->getNodeAtIdx(node->pidx); + if (!parent) continue; + dd->vertex(node->pos[0],node->pos[1]+off,node->pos[2], duRGBA(255,192,0,128)); + dd->vertex(parent->pos[0],parent->pos[1]+off,parent->pos[2], duRGBA(255,192,0,128)); + } + } + dd->end(); + } +} + + +static void drawMeshTileBVTree(duDebugDraw* dd, const dtMeshTile* tile) +{ + // Draw BV nodes. + const float cs = 1.0f / tile->header->bvQuantFactor; + dd->begin(DU_DRAW_LINES, 1.0f); + for (int i = 0; i < tile->header->bvNodeCount; ++i) + { + const dtBVNode* n = &tile->bvTree[i]; + if (n->i < 0) // Leaf indices are positive. + continue; + duAppendBoxWire(dd, tile->header->bmin[0] + n->bmin[0]*cs, + tile->header->bmin[1] + n->bmin[1]*cs, + tile->header->bmin[2] + n->bmin[2]*cs, + tile->header->bmin[0] + n->bmax[0]*cs, + tile->header->bmin[1] + n->bmax[1]*cs, + tile->header->bmin[2] + n->bmax[2]*cs, + duRGBA(255,255,255,128)); + } + dd->end(); +} + +void duDebugDrawNavMeshBVTree(duDebugDraw* dd, const dtNavMesh& mesh) +{ + if (!dd) return; + + for (int i = 0; i < mesh.getMaxTiles(); ++i) + { + const dtMeshTile* tile = mesh.getTile(i); + if (!tile->header) continue; + drawMeshTileBVTree(dd, tile); + } +} + +static void drawMeshTilePortal(duDebugDraw* dd, const dtMeshTile* tile) +{ + // Draw portals + const float padx = 0.04f; + const float pady = tile->header->walkableClimb; + + dd->begin(DU_DRAW_LINES, 2.0f); + + for (int side = 0; side < 8; ++side) + { + unsigned short m = DT_EXT_LINK | (unsigned short)side; + + for (int i = 0; i < tile->header->polyCount; ++i) + { + dtPoly* poly = &tile->polys[i]; + + // Create new links. + const int nv = poly->vertCount; + for (int j = 0; j < nv; ++j) + { + // Skip edges which do not point to the right side. + if (poly->neis[j] != m) + continue; + + // Create new links + const float* va = &tile->verts[poly->verts[j]*3]; + const float* vb = &tile->verts[poly->verts[(j+1) % nv]*3]; + + if (side == 0 || side == 4) + { + unsigned int col = side == 0 ? duRGBA(128,0,0,128) : duRGBA(128,0,128,128); + + const float x = va[0] + ((side == 0) ? -padx : padx); + + dd->vertex(x,va[1]-pady,va[2], col); + dd->vertex(x,va[1]+pady,va[2], col); + + dd->vertex(x,va[1]+pady,va[2], col); + dd->vertex(x,vb[1]+pady,vb[2], col); + + dd->vertex(x,vb[1]+pady,vb[2], col); + dd->vertex(x,vb[1]-pady,vb[2], col); + + dd->vertex(x,vb[1]-pady,vb[2], col); + dd->vertex(x,va[1]-pady,va[2], col); + } + else if (side == 2 || side == 6) + { + unsigned int col = side == 2 ? duRGBA(0,128,0,128) : duRGBA(0,128,128,128); + + const float z = va[2] + ((side == 2) ? -padx : padx); + + dd->vertex(va[0],va[1]-pady,z, col); + dd->vertex(va[0],va[1]+pady,z, col); + + dd->vertex(va[0],va[1]+pady,z, col); + dd->vertex(vb[0],vb[1]+pady,z, col); + + dd->vertex(vb[0],vb[1]+pady,z, col); + dd->vertex(vb[0],vb[1]-pady,z, col); + + dd->vertex(vb[0],vb[1]-pady,z, col); + dd->vertex(va[0],va[1]-pady,z, col); + } + + } + } + } + + dd->end(); +} + +void duDebugDrawNavMeshPortals(duDebugDraw* dd, const dtNavMesh& mesh) +{ + if (!dd) return; + + for (int i = 0; i < mesh.getMaxTiles(); ++i) + { + const dtMeshTile* tile = mesh.getTile(i); + if (!tile->header) continue; + drawMeshTilePortal(dd, tile); + } +} + +void duDebugDrawNavMeshPolysWithFlags(struct duDebugDraw* dd, const dtNavMesh& mesh, + const unsigned short polyFlags, const unsigned int col) +{ + if (!dd) return; + + for (int i = 0; i < mesh.getMaxTiles(); ++i) + { + const dtMeshTile* tile = mesh.getTile(i); + if (!tile->header) continue; + dtPolyRef base = mesh.getPolyRefBase(tile); + + for (int j = 0; j < tile->header->polyCount; ++j) + { + const dtPoly* p = &tile->polys[j]; + if ((p->flags & polyFlags) == 0) continue; + duDebugDrawNavMeshPoly(dd, mesh, base|(dtPolyRef)j, col); + } + } +} + +void duDebugDrawNavMeshPoly(duDebugDraw* dd, const dtNavMesh& mesh, dtPolyRef ref, const unsigned int col) +{ + if (!dd) return; + + const dtMeshTile* tile = 0; + const dtPoly* poly = 0; + if (dtStatusFailed(mesh.getTileAndPolyByRef(ref, &tile, &poly))) + return; + + dd->depthMask(false); + + const unsigned int c = duTransCol(col, 64); + const unsigned int ip = (unsigned int)(poly - tile->polys); + + if (poly->getType() == DT_POLYTYPE_OFFMESH_CONNECTION) + { + dtOffMeshConnection* con = &tile->offMeshCons[ip - tile->header->offMeshBase]; + + dd->begin(DU_DRAW_LINES, 2.0f); + + // Connection arc. + duAppendArc(dd, con->pos[0],con->pos[1],con->pos[2], con->pos[3],con->pos[4],con->pos[5], 0.25f, + (con->flags & 1) ? 0.6f : 0.0f, 0.6f, c); + + dd->end(); + } + else + { + const dtPolyDetail* pd = &tile->detailMeshes[ip]; + + dd->begin(DU_DRAW_TRIS); + for (int i = 0; i < pd->triCount; ++i) + { + const unsigned char* t = &tile->detailTris[(pd->triBase+i)*4]; + for (int j = 0; j < 3; ++j) + { + if (t[j] < poly->vertCount) + dd->vertex(&tile->verts[poly->verts[t[j]]*3], c); + else + dd->vertex(&tile->detailVerts[(pd->vertBase+t[j]-poly->vertCount)*3], c); + } + } + dd->end(); + } + + dd->depthMask(true); + +} + +static void debugDrawTileCachePortals(struct duDebugDraw* dd, const dtTileCacheLayer& layer, const float cs, const float ch) +{ + const int w = (int)layer.header->width; + const int h = (int)layer.header->height; + const float* bmin = layer.header->bmin; + + // Portals + unsigned int pcol = duRGBA(255,255,255,255); + + const int segs[4*4] = {0,0,0,1, 0,1,1,1, 1,1,1,0, 1,0,0,0}; + + // Layer portals + dd->begin(DU_DRAW_LINES, 2.0f); + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + const int idx = x+y*w; + const int lh = (int)layer.heights[idx]; + if (lh == 0xff) continue; + + for (int dir = 0; dir < 4; ++dir) + { + if (layer.cons[idx] & (1<<(dir+4))) + { + const int* seg = &segs[dir*4]; + const float ax = bmin[0] + (x+seg[0])*cs; + const float ay = bmin[1] + (lh+2)*ch; + const float az = bmin[2] + (y+seg[1])*cs; + const float bx = bmin[0] + (x+seg[2])*cs; + const float by = bmin[1] + (lh+2)*ch; + const float bz = bmin[2] + (y+seg[3])*cs; + dd->vertex(ax, ay, az, pcol); + dd->vertex(bx, by, bz, pcol); + } + } + } + } + dd->end(); +} + +void duDebugDrawTileCacheLayerAreas(struct duDebugDraw* dd, const dtTileCacheLayer& layer, const float cs, const float ch) +{ + const int w = (int)layer.header->width; + const int h = (int)layer.header->height; + const float* bmin = layer.header->bmin; + const float* bmax = layer.header->bmax; + const int idx = layer.header->tlayer; + + unsigned int color = duIntToCol(idx+1, 255); + + // Layer bounds + float lbmin[3], lbmax[3]; + lbmin[0] = bmin[0] + layer.header->minx*cs; + lbmin[1] = bmin[1]; + lbmin[2] = bmin[2] + layer.header->miny*cs; + lbmax[0] = bmin[0] + (layer.header->maxx+1)*cs; + lbmax[1] = bmax[1]; + lbmax[2] = bmin[2] + (layer.header->maxy+1)*cs; + duDebugDrawBoxWire(dd, lbmin[0],lbmin[1],lbmin[2], lbmax[0],lbmax[1],lbmax[2], duTransCol(color,128), 2.0f); + + // Layer height + dd->begin(DU_DRAW_QUADS); + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + const int lidx = x+y*w; + const int lh = (int)layer.heights[lidx]; + if (lh == 0xff) continue; + + const unsigned char area = layer.areas[lidx]; + unsigned int col; + if (area == 63) + col = duLerpCol(color, duRGBA(0,192,255,64), 32); + else if (area == 0) + col = duLerpCol(color, duRGBA(0,0,0,64), 32); + else + col = duLerpCol(color, dd->areaToCol(area), 32); + + const float fx = bmin[0] + x*cs; + const float fy = bmin[1] + (lh+1)*ch; + const float fz = bmin[2] + y*cs; + + dd->vertex(fx, fy, fz, col); + dd->vertex(fx, fy, fz+cs, col); + dd->vertex(fx+cs, fy, fz+cs, col); + dd->vertex(fx+cs, fy, fz, col); + } + } + dd->end(); + + debugDrawTileCachePortals(dd, layer, cs, ch); +} + +void duDebugDrawTileCacheLayerRegions(struct duDebugDraw* dd, const dtTileCacheLayer& layer, const float cs, const float ch) +{ + const int w = (int)layer.header->width; + const int h = (int)layer.header->height; + const float* bmin = layer.header->bmin; + const float* bmax = layer.header->bmax; + const int idx = layer.header->tlayer; + + unsigned int color = duIntToCol(idx+1, 255); + + // Layer bounds + float lbmin[3], lbmax[3]; + lbmin[0] = bmin[0] + layer.header->minx*cs; + lbmin[1] = bmin[1]; + lbmin[2] = bmin[2] + layer.header->miny*cs; + lbmax[0] = bmin[0] + (layer.header->maxx+1)*cs; + lbmax[1] = bmax[1]; + lbmax[2] = bmin[2] + (layer.header->maxy+1)*cs; + duDebugDrawBoxWire(dd, lbmin[0],lbmin[1],lbmin[2], lbmax[0],lbmax[1],lbmax[2], duTransCol(color,128), 2.0f); + + // Layer height + dd->begin(DU_DRAW_QUADS); + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + const int lidx = x+y*w; + const int lh = (int)layer.heights[lidx]; + if (lh == 0xff) continue; + const unsigned char reg = layer.regs[lidx]; + + unsigned int col = duLerpCol(color, duIntToCol(reg, 255), 192); + + const float fx = bmin[0] + x*cs; + const float fy = bmin[1] + (lh+1)*ch; + const float fz = bmin[2] + y*cs; + + dd->vertex(fx, fy, fz, col); + dd->vertex(fx, fy, fz+cs, col); + dd->vertex(fx+cs, fy, fz+cs, col); + dd->vertex(fx+cs, fy, fz, col); + } + } + dd->end(); + + debugDrawTileCachePortals(dd, layer, cs, ch); +} + + + + +/*struct dtTileCacheContour +{ + int nverts; + unsigned char* verts; + unsigned char reg; + unsigned char area; +}; + +struct dtTileCacheContourSet +{ + int nconts; + dtTileCacheContour* conts; +};*/ + +void duDebugDrawTileCacheContours(duDebugDraw* dd, const struct dtTileCacheContourSet& lcset, + const float* orig, const float cs, const float ch) +{ + if (!dd) return; + + const unsigned char a = 255;// (unsigned char)(alpha*255.0f); + + const int offs[2*4] = {-1,0, 0,1, 1,0, 0,-1}; + + dd->begin(DU_DRAW_LINES, 2.0f); + + for (int i = 0; i < lcset.nconts; ++i) + { + const dtTileCacheContour& c = lcset.conts[i]; + unsigned int color = 0; + + color = duIntToCol(i, a); + + for (int j = 0; j < c.nverts; ++j) + { + const int k = (j+1) % c.nverts; + const unsigned char* va = &c.verts[j*4]; + const unsigned char* vb = &c.verts[k*4]; + const float ax = orig[0] + va[0]*cs; + const float ay = orig[1] + (va[1]+1+(i&1))*ch; + const float az = orig[2] + va[2]*cs; + const float bx = orig[0] + vb[0]*cs; + const float by = orig[1] + (vb[1]+1+(i&1))*ch; + const float bz = orig[2] + vb[2]*cs; + unsigned int col = color; + if ((va[3] & 0xf) != 0xf) + { + // Portal segment + col = duRGBA(255,255,255,128); + int d = va[3] & 0xf; + + const float cx = (ax+bx)*0.5f; + const float cy = (ay+by)*0.5f; + const float cz = (az+bz)*0.5f; + + const float dx = cx + offs[d*2+0]*2*cs; + const float dy = cy; + const float dz = cz + offs[d*2+1]*2*cs; + + dd->vertex(cx,cy,cz,duRGBA(255,0,0,255)); + dd->vertex(dx,dy,dz,duRGBA(255,0,0,255)); + } + + duAppendArrow(dd, ax,ay,az, bx,by,bz, 0.0f, cs*0.5f, col); + } + } + dd->end(); + + dd->begin(DU_DRAW_POINTS, 4.0f); + + for (int i = 0; i < lcset.nconts; ++i) + { + const dtTileCacheContour& c = lcset.conts[i]; + unsigned int color = 0; + + for (int j = 0; j < c.nverts; ++j) + { + const unsigned char* va = &c.verts[j*4]; + + color = duDarkenCol(duIntToCol(i, a)); + if (va[3] & 0x80) + { + // Border vertex + color = duRGBA(255,0,0,255); + } + + float fx = orig[0] + va[0]*cs; + float fy = orig[1] + (va[1]+1+(i&1))*ch; + float fz = orig[2] + va[2]*cs; + dd->vertex(fx,fy,fz, color); + } + } + dd->end(); +} + +void duDebugDrawTileCachePolyMesh(duDebugDraw* dd, const struct dtTileCachePolyMesh& lmesh, + const float* orig, const float cs, const float ch) +{ + if (!dd) return; + + const int nvp = lmesh.nvp; + + const int offs[2*4] = {-1,0, 0,1, 1,0, 0,-1}; + + dd->begin(DU_DRAW_TRIS); + + for (int i = 0; i < lmesh.npolys; ++i) + { + const unsigned short* p = &lmesh.polys[i*nvp*2]; + const unsigned char area = lmesh.areas[i]; + + unsigned int color; + if (area == DT_TILECACHE_WALKABLE_AREA) + color = duRGBA(0,192,255,64); + else if (area == DT_TILECACHE_NULL_AREA) + color = duRGBA(0,0,0,64); + else + color = dd->areaToCol(area); + + unsigned short vi[3]; + for (int j = 2; j < nvp; ++j) + { + if (p[j] == DT_TILECACHE_NULL_IDX) break; + vi[0] = p[0]; + vi[1] = p[j-1]; + vi[2] = p[j]; + for (int k = 0; k < 3; ++k) + { + const unsigned short* v = &lmesh.verts[vi[k]*3]; + const float x = orig[0] + v[0]*cs; + const float y = orig[1] + (v[1]+1)*ch; + const float z = orig[2] + v[2]*cs; + dd->vertex(x,y,z, color); + } + } + } + dd->end(); + + // Draw neighbours edges + const unsigned int coln = duRGBA(0,48,64,32); + dd->begin(DU_DRAW_LINES, 1.5f); + for (int i = 0; i < lmesh.npolys; ++i) + { + const unsigned short* p = &lmesh.polys[i*nvp*2]; + for (int j = 0; j < nvp; ++j) + { + if (p[j] == DT_TILECACHE_NULL_IDX) break; + if (p[nvp+j] & 0x8000) continue; + const int nj = (j+1 >= nvp || p[j+1] == DT_TILECACHE_NULL_IDX) ? 0 : j+1; + int vi[2] = {p[j], p[nj]}; + + for (int k = 0; k < 2; ++k) + { + const unsigned short* v = &lmesh.verts[vi[k]*3]; + const float x = orig[0] + v[0]*cs; + const float y = orig[1] + (v[1]+1)*ch + 0.1f; + const float z = orig[2] + v[2]*cs; + dd->vertex(x, y, z, coln); + } + } + } + dd->end(); + + // Draw boundary edges + const unsigned int colb = duRGBA(0,48,64,220); + dd->begin(DU_DRAW_LINES, 2.5f); + for (int i = 0; i < lmesh.npolys; ++i) + { + const unsigned short* p = &lmesh.polys[i*nvp*2]; + for (int j = 0; j < nvp; ++j) + { + if (p[j] == DT_TILECACHE_NULL_IDX) break; + if ((p[nvp+j] & 0x8000) == 0) continue; + const int nj = (j+1 >= nvp || p[j+1] == DT_TILECACHE_NULL_IDX) ? 0 : j+1; + int vi[2] = {p[j], p[nj]}; + + unsigned int col = colb; + if ((p[nvp+j] & 0xf) != 0xf) + { + const unsigned short* va = &lmesh.verts[vi[0]*3]; + const unsigned short* vb = &lmesh.verts[vi[1]*3]; + + const float ax = orig[0] + va[0]*cs; + const float ay = orig[1] + (va[1]+1+(i&1))*ch; + const float az = orig[2] + va[2]*cs; + const float bx = orig[0] + vb[0]*cs; + const float by = orig[1] + (vb[1]+1+(i&1))*ch; + const float bz = orig[2] + vb[2]*cs; + + const float cx = (ax+bx)*0.5f; + const float cy = (ay+by)*0.5f; + const float cz = (az+bz)*0.5f; + + int d = p[nvp+j] & 0xf; + + const float dx = cx + offs[d*2+0]*2*cs; + const float dy = cy; + const float dz = cz + offs[d*2+1]*2*cs; + + dd->vertex(cx,cy,cz,duRGBA(255,0,0,255)); + dd->vertex(dx,dy,dz,duRGBA(255,0,0,255)); + + col = duRGBA(255,255,255,128); + } + + for (int k = 0; k < 2; ++k) + { + const unsigned short* v = &lmesh.verts[vi[k]*3]; + const float x = orig[0] + v[0]*cs; + const float y = orig[1] + (v[1]+1)*ch + 0.1f; + const float z = orig[2] + v[2]*cs; + dd->vertex(x, y, z, col); + } + } + } + dd->end(); + + dd->begin(DU_DRAW_POINTS, 3.0f); + const unsigned int colv = duRGBA(0,0,0,220); + for (int i = 0; i < lmesh.nverts; ++i) + { + const unsigned short* v = &lmesh.verts[i*3]; + const float x = orig[0] + v[0]*cs; + const float y = orig[1] + (v[1]+1)*ch + 0.1f; + const float z = orig[2] + v[2]*cs; + dd->vertex(x,y,z, colv); + } + dd->end(); +} + + + diff --git a/libs/recast/debug_utils/src/RecastDebugDraw.cpp b/libs/recast/debug_utils/src/RecastDebugDraw.cpp new file mode 100644 index 000000000..c1a73a168 --- /dev/null +++ b/libs/recast/debug_utils/src/RecastDebugDraw.cpp @@ -0,0 +1,1064 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#define _USE_MATH_DEFINES +#include +#include "DebugDraw.h" +#include "RecastDebugDraw.h" +#include "Recast.h" + +void duDebugDrawTriMesh(duDebugDraw* dd, const float* verts, int /*nverts*/, + const int* tris, const float* normals, int ntris, + const unsigned char* flags, const float texScale) +{ + if (!dd) return; + if (!verts) return; + if (!tris) return; + if (!normals) return; + + float uva[2]; + float uvb[2]; + float uvc[2]; + + const unsigned int unwalkable = duRGBA(192,128,0,255); + + dd->texture(true); + + dd->begin(DU_DRAW_TRIS); + for (int i = 0; i < ntris*3; i += 3) + { + const float* norm = &normals[i]; + unsigned int color; + unsigned char a = (unsigned char)(220*(2+norm[0]+norm[1])/4); + if (flags && !flags[i/3]) + color = duLerpCol(duRGBA(a,a,a,255), unwalkable, 64); + else + color = duRGBA(a,a,a,255); + + const float* va = &verts[tris[i+0]*3]; + const float* vb = &verts[tris[i+1]*3]; + const float* vc = &verts[tris[i+2]*3]; + + int ax = 0, ay = 0; + if (rcAbs(norm[1]) > rcAbs(norm[ax])) + ax = 1; + if (rcAbs(norm[2]) > rcAbs(norm[ax])) + ax = 2; + ax = (1<vertex(va, color, uva); + dd->vertex(vb, color, uvb); + dd->vertex(vc, color, uvc); + } + dd->end(); + dd->texture(false); +} + +void duDebugDrawTriMeshSlope(duDebugDraw* dd, const float* verts, int /*nverts*/, + const int* tris, const float* normals, int ntris, + const float walkableSlopeAngle, const float texScale) +{ + if (!dd) return; + if (!verts) return; + if (!tris) return; + if (!normals) return; + + const float walkableThr = cosf(walkableSlopeAngle/180.0f*DU_PI); + + float uva[2]; + float uvb[2]; + float uvc[2]; + + dd->texture(true); + + const unsigned int unwalkable = duRGBA(192,128,0,255); + + dd->begin(DU_DRAW_TRIS); + for (int i = 0; i < ntris*3; i += 3) + { + const float* norm = &normals[i]; + unsigned int color; + unsigned char a = (unsigned char)(220*(2+norm[0]+norm[1])/4); + if (norm[1] < walkableThr) + color = duLerpCol(duRGBA(a,a,a,255), unwalkable, 64); + else + color = duRGBA(a,a,a,255); + + const float* va = &verts[tris[i+0]*3]; + const float* vb = &verts[tris[i+1]*3]; + const float* vc = &verts[tris[i+2]*3]; + + int ax = 0, ay = 0; + if (rcAbs(norm[1]) > rcAbs(norm[ax])) + ax = 1; + if (rcAbs(norm[2]) > rcAbs(norm[ax])) + ax = 2; + ax = (1<vertex(va, color, uva); + dd->vertex(vb, color, uvb); + dd->vertex(vc, color, uvc); + } + dd->end(); + + dd->texture(false); +} + +void duDebugDrawHeightfieldSolid(duDebugDraw* dd, const rcHeightfield& hf) +{ + if (!dd) return; + + const float* orig = hf.bmin; + const float cs = hf.cs; + const float ch = hf.ch; + + const int w = hf.width; + const int h = hf.height; + + unsigned int fcol[6]; + duCalcBoxColors(fcol, duRGBA(255,255,255,255), duRGBA(255,255,255,255)); + + dd->begin(DU_DRAW_QUADS); + + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + float fx = orig[0] + x*cs; + float fz = orig[2] + y*cs; + const rcSpan* s = hf.spans[x + y*w]; + while (s) + { + duAppendBox(dd, fx, orig[1]+s->smin*ch, fz, fx+cs, orig[1] + s->smax*ch, fz+cs, fcol); + s = s->next; + } + } + } + dd->end(); +} + +void duDebugDrawHeightfieldWalkable(duDebugDraw* dd, const rcHeightfield& hf) +{ + if (!dd) return; + + const float* orig = hf.bmin; + const float cs = hf.cs; + const float ch = hf.ch; + + const int w = hf.width; + const int h = hf.height; + + unsigned int fcol[6]; + duCalcBoxColors(fcol, duRGBA(255,255,255,255), duRGBA(217,217,217,255)); + + dd->begin(DU_DRAW_QUADS); + + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + float fx = orig[0] + x*cs; + float fz = orig[2] + y*cs; + const rcSpan* s = hf.spans[x + y*w]; + while (s) + { + if (s->area == RC_WALKABLE_AREA) + fcol[0] = duRGBA(64,128,160,255); + else if (s->area == RC_NULL_AREA) + fcol[0] = duRGBA(64,64,64,255); + else + fcol[0] = duMultCol(dd->areaToCol(s->area), 200); + + duAppendBox(dd, fx, orig[1]+s->smin*ch, fz, fx+cs, orig[1] + s->smax*ch, fz+cs, fcol); + s = s->next; + } + } + } + + dd->end(); +} + +void duDebugDrawCompactHeightfieldSolid(duDebugDraw* dd, const rcCompactHeightfield& chf) +{ + if (!dd) return; + + const float cs = chf.cs; + const float ch = chf.ch; + + dd->begin(DU_DRAW_QUADS); + + for (int y = 0; y < chf.height; ++y) + { + for (int x = 0; x < chf.width; ++x) + { + const float fx = chf.bmin[0] + x*cs; + const float fz = chf.bmin[2] + y*cs; + const rcCompactCell& c = chf.cells[x+y*chf.width]; + + for (unsigned i = c.index, ni = c.index+c.count; i < ni; ++i) + { + const rcCompactSpan& s = chf.spans[i]; + + const unsigned char area = chf.areas[i]; + unsigned int color; + if (area == RC_WALKABLE_AREA) + color = duRGBA(0,192,255,64); + else if (area == RC_NULL_AREA) + color = duRGBA(0,0,0,64); + else + color = dd->areaToCol(area); + + const float fy = chf.bmin[1] + (s.y+1)*ch; + dd->vertex(fx, fy, fz, color); + dd->vertex(fx, fy, fz+cs, color); + dd->vertex(fx+cs, fy, fz+cs, color); + dd->vertex(fx+cs, fy, fz, color); + } + } + } + dd->end(); +} + +void duDebugDrawCompactHeightfieldRegions(duDebugDraw* dd, const rcCompactHeightfield& chf) +{ + if (!dd) return; + + const float cs = chf.cs; + const float ch = chf.ch; + + dd->begin(DU_DRAW_QUADS); + + for (int y = 0; y < chf.height; ++y) + { + for (int x = 0; x < chf.width; ++x) + { + const float fx = chf.bmin[0] + x*cs; + const float fz = chf.bmin[2] + y*cs; + const rcCompactCell& c = chf.cells[x+y*chf.width]; + + for (unsigned i = c.index, ni = c.index+c.count; i < ni; ++i) + { + const rcCompactSpan& s = chf.spans[i]; + const float fy = chf.bmin[1] + (s.y)*ch; + unsigned int color; + if (s.reg) + color = duIntToCol(s.reg, 192); + else + color = duRGBA(0,0,0,64); + + dd->vertex(fx, fy, fz, color); + dd->vertex(fx, fy, fz+cs, color); + dd->vertex(fx+cs, fy, fz+cs, color); + dd->vertex(fx+cs, fy, fz, color); + } + } + } + + dd->end(); +} + + +void duDebugDrawCompactHeightfieldDistance(duDebugDraw* dd, const rcCompactHeightfield& chf) +{ + if (!dd) return; + if (!chf.dist) return; + + const float cs = chf.cs; + const float ch = chf.ch; + + float maxd = chf.maxDistance; + if (maxd < 1.0f) maxd = 1; + const float dscale = 255.0f / maxd; + + dd->begin(DU_DRAW_QUADS); + + for (int y = 0; y < chf.height; ++y) + { + for (int x = 0; x < chf.width; ++x) + { + const float fx = chf.bmin[0] + x*cs; + const float fz = chf.bmin[2] + y*cs; + const rcCompactCell& c = chf.cells[x+y*chf.width]; + + for (unsigned i = c.index, ni = c.index+c.count; i < ni; ++i) + { + const rcCompactSpan& s = chf.spans[i]; + const float fy = chf.bmin[1] + (s.y+1)*ch; + const unsigned char cd = (unsigned char)(chf.dist[i] * dscale); + const unsigned int color = duRGBA(cd,cd,cd,255); + dd->vertex(fx, fy, fz, color); + dd->vertex(fx, fy, fz+cs, color); + dd->vertex(fx+cs, fy, fz+cs, color); + dd->vertex(fx+cs, fy, fz, color); + } + } + } + dd->end(); +} + +static void drawLayerPortals(duDebugDraw* dd, const rcHeightfieldLayer* layer) +{ + const float cs = layer->cs; + const float ch = layer->ch; + const int w = layer->width; + const int h = layer->height; + + unsigned int pcol = duRGBA(255,255,255,255); + + const int segs[4*4] = {0,0,0,1, 0,1,1,1, 1,1,1,0, 1,0,0,0}; + + // Layer portals + dd->begin(DU_DRAW_LINES, 2.0f); + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + const int idx = x+y*w; + const int lh = (int)layer->heights[idx]; + if (lh == 255) continue; + + for (int dir = 0; dir < 4; ++dir) + { + if (layer->cons[idx] & (1<<(dir+4))) + { + const int* seg = &segs[dir*4]; + const float ax = layer->bmin[0] + (x+seg[0])*cs; + const float ay = layer->bmin[1] + (lh+2)*ch; + const float az = layer->bmin[2] + (y+seg[1])*cs; + const float bx = layer->bmin[0] + (x+seg[2])*cs; + const float by = layer->bmin[1] + (lh+2)*ch; + const float bz = layer->bmin[2] + (y+seg[3])*cs; + dd->vertex(ax, ay, az, pcol); + dd->vertex(bx, by, bz, pcol); + } + } + } + } + dd->end(); +} + +void duDebugDrawHeightfieldLayer(duDebugDraw* dd, const struct rcHeightfieldLayer& layer, const int idx) +{ + const float cs = layer.cs; + const float ch = layer.ch; + const int w = layer.width; + const int h = layer.height; + + unsigned int color = duIntToCol(idx+1, 255); + + // Layer bounds + float bmin[3], bmax[3]; + bmin[0] = layer.bmin[0] + layer.minx*cs; + bmin[1] = layer.bmin[1]; + bmin[2] = layer.bmin[2] + layer.miny*cs; + bmax[0] = layer.bmin[0] + (layer.maxx+1)*cs; + bmax[1] = layer.bmax[1]; + bmax[2] = layer.bmin[2] + (layer.maxy+1)*cs; + duDebugDrawBoxWire(dd, bmin[0],bmin[1],bmin[2], bmax[0],bmax[1],bmax[2], duTransCol(color,128), 2.0f); + + // Layer height + dd->begin(DU_DRAW_QUADS); + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + const int lidx = x+y*w; + const int lh = (int)layer.heights[lidx]; + if (h == 0xff) continue; + const unsigned char area = layer.areas[lidx]; + + unsigned int col; + if (area == RC_WALKABLE_AREA) + col = duLerpCol(color, duRGBA(0,192,255,64), 32); + else if (area == RC_NULL_AREA) + col = duLerpCol(color, duRGBA(0,0,0,64), 32); + else + col = duLerpCol(color, dd->areaToCol(area), 32); + + const float fx = layer.bmin[0] + x*cs; + const float fy = layer.bmin[1] + (lh+1)*ch; + const float fz = layer.bmin[2] + y*cs; + + dd->vertex(fx, fy, fz, col); + dd->vertex(fx, fy, fz+cs, col); + dd->vertex(fx+cs, fy, fz+cs, col); + dd->vertex(fx+cs, fy, fz, col); + } + } + dd->end(); + + // Portals + drawLayerPortals(dd, &layer); +} + +void duDebugDrawHeightfieldLayers(duDebugDraw* dd, const struct rcHeightfieldLayerSet& lset) +{ + if (!dd) return; + for (int i = 0; i < lset.nlayers; ++i) + duDebugDrawHeightfieldLayer(dd, lset.layers[i], i); +} + +/* +void duDebugDrawLayerContours(duDebugDraw* dd, const struct rcLayerContourSet& lcset) +{ + if (!dd) return; + + const float* orig = lcset.bmin; + const float cs = lcset.cs; + const float ch = lcset.ch; + + const unsigned char a = 255;// (unsigned char)(alpha*255.0f); + + const int offs[2*4] = {-1,0, 0,1, 1,0, 0,-1}; + + dd->begin(DU_DRAW_LINES, 2.0f); + + for (int i = 0; i < lcset.nconts; ++i) + { + const rcLayerContour& c = lcset.conts[i]; + unsigned int color = 0; + + color = duIntToCol(i, a); + + for (int j = 0; j < c.nverts; ++j) + { + const int k = (j+1) % c.nverts; + const unsigned char* va = &c.verts[j*4]; + const unsigned char* vb = &c.verts[k*4]; + const float ax = orig[0] + va[0]*cs; + const float ay = orig[1] + (va[1]+1+(i&1))*ch; + const float az = orig[2] + va[2]*cs; + const float bx = orig[0] + vb[0]*cs; + const float by = orig[1] + (vb[1]+1+(i&1))*ch; + const float bz = orig[2] + vb[2]*cs; + unsigned int col = color; + if ((va[3] & 0xf) != 0xf) + { + col = duRGBA(255,255,255,128); + int d = va[3] & 0xf; + + const float cx = (ax+bx)*0.5f; + const float cy = (ay+by)*0.5f; + const float cz = (az+bz)*0.5f; + + const float dx = cx + offs[d*2+0]*2*cs; + const float dy = cy; + const float dz = cz + offs[d*2+1]*2*cs; + + dd->vertex(cx,cy,cz,duRGBA(255,0,0,255)); + dd->vertex(dx,dy,dz,duRGBA(255,0,0,255)); + } + + duAppendArrow(dd, ax,ay,az, bx,by,bz, 0.0f, cs*0.5f, col); + } + } + dd->end(); + + dd->begin(DU_DRAW_POINTS, 4.0f); + + for (int i = 0; i < lcset.nconts; ++i) + { + const rcLayerContour& c = lcset.conts[i]; + unsigned int color = 0; + + for (int j = 0; j < c.nverts; ++j) + { + const unsigned char* va = &c.verts[j*4]; + + color = duDarkenCol(duIntToCol(i, a)); + if (va[3] & 0x80) + color = duRGBA(255,0,0,255); + + float fx = orig[0] + va[0]*cs; + float fy = orig[1] + (va[1]+1+(i&1))*ch; + float fz = orig[2] + va[2]*cs; + dd->vertex(fx,fy,fz, color); + } + } + dd->end(); +} + +void duDebugDrawLayerPolyMesh(duDebugDraw* dd, const struct rcLayerPolyMesh& lmesh) +{ + if (!dd) return; + + const int nvp = lmesh.nvp; + const float cs = lmesh.cs; + const float ch = lmesh.ch; + const float* orig = lmesh.bmin; + + const int offs[2*4] = {-1,0, 0,1, 1,0, 0,-1}; + + dd->begin(DU_DRAW_TRIS); + + for (int i = 0; i < lmesh.npolys; ++i) + { + const unsigned short* p = &lmesh.polys[i*nvp*2]; + + unsigned int color; + if (lmesh.areas[i] == RC_WALKABLE_AREA) + color = duRGBA(0,192,255,64); + else if (lmesh.areas[i] == RC_NULL_AREA) + color = duRGBA(0,0,0,64); + else + color = duIntToCol(lmesh.areas[i], 255); + + unsigned short vi[3]; + for (int j = 2; j < nvp; ++j) + { + if (p[j] == RC_MESH_NULL_IDX) break; + vi[0] = p[0]; + vi[1] = p[j-1]; + vi[2] = p[j]; + for (int k = 0; k < 3; ++k) + { + const unsigned short* v = &lmesh.verts[vi[k]*3]; + const float x = orig[0] + v[0]*cs; + const float y = orig[1] + (v[1]+1)*ch; + const float z = orig[2] + v[2]*cs; + dd->vertex(x,y,z, color); + } + } + } + dd->end(); + + // Draw neighbours edges + const unsigned int coln = duRGBA(0,48,64,32); + dd->begin(DU_DRAW_LINES, 1.5f); + for (int i = 0; i < lmesh.npolys; ++i) + { + const unsigned short* p = &lmesh.polys[i*nvp*2]; + for (int j = 0; j < nvp; ++j) + { + if (p[j] == RC_MESH_NULL_IDX) break; + if (p[nvp+j] & 0x8000) continue; + const int nj = (j+1 >= nvp || p[j+1] == RC_MESH_NULL_IDX) ? 0 : j+1; + int vi[2] = {p[j], p[nj]}; + + for (int k = 0; k < 2; ++k) + { + const unsigned short* v = &lmesh.verts[vi[k]*3]; + const float x = orig[0] + v[0]*cs; + const float y = orig[1] + (v[1]+1)*ch + 0.1f; + const float z = orig[2] + v[2]*cs; + dd->vertex(x, y, z, coln); + } + } + } + dd->end(); + + // Draw boundary edges + const unsigned int colb = duRGBA(0,48,64,220); + dd->begin(DU_DRAW_LINES, 2.5f); + for (int i = 0; i < lmesh.npolys; ++i) + { + const unsigned short* p = &lmesh.polys[i*nvp*2]; + for (int j = 0; j < nvp; ++j) + { + if (p[j] == RC_MESH_NULL_IDX) break; + if ((p[nvp+j] & 0x8000) == 0) continue; + const int nj = (j+1 >= nvp || p[j+1] == RC_MESH_NULL_IDX) ? 0 : j+1; + int vi[2] = {p[j], p[nj]}; + + unsigned int col = colb; + if ((p[nvp+j] & 0xf) != 0xf) + { + const unsigned short* va = &lmesh.verts[vi[0]*3]; + const unsigned short* vb = &lmesh.verts[vi[1]*3]; + + const float ax = orig[0] + va[0]*cs; + const float ay = orig[1] + (va[1]+1+(i&1))*ch; + const float az = orig[2] + va[2]*cs; + const float bx = orig[0] + vb[0]*cs; + const float by = orig[1] + (vb[1]+1+(i&1))*ch; + const float bz = orig[2] + vb[2]*cs; + + const float cx = (ax+bx)*0.5f; + const float cy = (ay+by)*0.5f; + const float cz = (az+bz)*0.5f; + + int d = p[nvp+j] & 0xf; + + const float dx = cx + offs[d*2+0]*2*cs; + const float dy = cy; + const float dz = cz + offs[d*2+1]*2*cs; + + dd->vertex(cx,cy,cz,duRGBA(255,0,0,255)); + dd->vertex(dx,dy,dz,duRGBA(255,0,0,255)); + + col = duRGBA(255,255,255,128); + } + + for (int k = 0; k < 2; ++k) + { + const unsigned short* v = &lmesh.verts[vi[k]*3]; + const float x = orig[0] + v[0]*cs; + const float y = orig[1] + (v[1]+1)*ch + 0.1f; + const float z = orig[2] + v[2]*cs; + dd->vertex(x, y, z, col); + } + } + } + dd->end(); + + dd->begin(DU_DRAW_POINTS, 3.0f); + const unsigned int colv = duRGBA(0,0,0,220); + for (int i = 0; i < lmesh.nverts; ++i) + { + const unsigned short* v = &lmesh.verts[i*3]; + const float x = orig[0] + v[0]*cs; + const float y = orig[1] + (v[1]+1)*ch + 0.1f; + const float z = orig[2] + v[2]*cs; + dd->vertex(x,y,z, colv); + } + dd->end(); +} +*/ + +static void getContourCenter(const rcContour* cont, const float* orig, float cs, float ch, float* center) +{ + center[0] = 0; + center[1] = 0; + center[2] = 0; + if (!cont->nverts) + return; + for (int i = 0; i < cont->nverts; ++i) + { + const int* v = &cont->verts[i*4]; + center[0] += (float)v[0]; + center[1] += (float)v[1]; + center[2] += (float)v[2]; + } + const float s = 1.0f / cont->nverts; + center[0] *= s * cs; + center[1] *= s * ch; + center[2] *= s * cs; + center[0] += orig[0]; + center[1] += orig[1] + 4*ch; + center[2] += orig[2]; +} + +static const rcContour* findContourFromSet(const rcContourSet& cset, unsigned short reg) +{ + for (int i = 0; i < cset.nconts; ++i) + { + if (cset.conts[i].reg == reg) + return &cset.conts[i]; + } + return 0; +} + +void duDebugDrawRegionConnections(duDebugDraw* dd, const rcContourSet& cset, const float alpha) +{ + if (!dd) return; + + const float* orig = cset.bmin; + const float cs = cset.cs; + const float ch = cset.ch; + + // Draw centers + float pos[3], pos2[3]; + + unsigned int color = duRGBA(0,0,0,196); + + dd->begin(DU_DRAW_LINES, 2.0f); + + for (int i = 0; i < cset.nconts; ++i) + { + const rcContour* cont = &cset.conts[i]; + getContourCenter(cont, orig, cs, ch, pos); + for (int j = 0; j < cont->nverts; ++j) + { + const int* v = &cont->verts[j*4]; + if (v[3] == 0 || (unsigned short)v[3] < cont->reg) continue; + const rcContour* cont2 = findContourFromSet(cset, (unsigned short)v[3]); + if (cont2) + { + getContourCenter(cont2, orig, cs, ch, pos2); + duAppendArc(dd, pos[0],pos[1],pos[2], pos2[0],pos2[1],pos2[2], 0.25f, 0.6f, 0.6f, color); + } + } + } + + dd->end(); + + unsigned char a = (unsigned char)(alpha * 255.0f); + + dd->begin(DU_DRAW_POINTS, 7.0f); + + for (int i = 0; i < cset.nconts; ++i) + { + const rcContour* cont = &cset.conts[i]; + unsigned int col = duDarkenCol(duIntToCol(cont->reg,a)); + getContourCenter(cont, orig, cs, ch, pos); + dd->vertex(pos, col); + } + dd->end(); +} + +void duDebugDrawRawContours(duDebugDraw* dd, const rcContourSet& cset, const float alpha) +{ + if (!dd) return; + + const float* orig = cset.bmin; + const float cs = cset.cs; + const float ch = cset.ch; + + const unsigned char a = (unsigned char)(alpha*255.0f); + + dd->begin(DU_DRAW_LINES, 2.0f); + + for (int i = 0; i < cset.nconts; ++i) + { + const rcContour& c = cset.conts[i]; + unsigned int color = duIntToCol(c.reg, a); + + for (int j = 0; j < c.nrverts; ++j) + { + const int* v = &c.rverts[j*4]; + float fx = orig[0] + v[0]*cs; + float fy = orig[1] + (v[1]+1+(i&1))*ch; + float fz = orig[2] + v[2]*cs; + dd->vertex(fx,fy,fz,color); + if (j > 0) + dd->vertex(fx,fy,fz,color); + } + // Loop last segment. + const int* v = &c.rverts[0]; + float fx = orig[0] + v[0]*cs; + float fy = orig[1] + (v[1]+1+(i&1))*ch; + float fz = orig[2] + v[2]*cs; + dd->vertex(fx,fy,fz,color); + } + dd->end(); + + dd->begin(DU_DRAW_POINTS, 2.0f); + + for (int i = 0; i < cset.nconts; ++i) + { + const rcContour& c = cset.conts[i]; + unsigned int color = duDarkenCol(duIntToCol(c.reg, a)); + + for (int j = 0; j < c.nrverts; ++j) + { + const int* v = &c.rverts[j*4]; + float off = 0; + unsigned int colv = color; + if (v[3] & RC_BORDER_VERTEX) + { + colv = duRGBA(255,255,255,a); + off = ch*2; + } + + float fx = orig[0] + v[0]*cs; + float fy = orig[1] + (v[1]+1+(i&1))*ch + off; + float fz = orig[2] + v[2]*cs; + dd->vertex(fx,fy,fz, colv); + } + } + dd->end(); +} + +void duDebugDrawContours(duDebugDraw* dd, const rcContourSet& cset, const float alpha) +{ + if (!dd) return; + + const float* orig = cset.bmin; + const float cs = cset.cs; + const float ch = cset.ch; + + const unsigned char a = (unsigned char)(alpha*255.0f); + + dd->begin(DU_DRAW_LINES, 2.5f); + + for (int i = 0; i < cset.nconts; ++i) + { + const rcContour& c = cset.conts[i]; + if (!c.nverts) + continue; + const unsigned int color = duIntToCol(c.reg, a); + const unsigned int bcolor = duLerpCol(color,duRGBA(255,255,255,a),128); + for (int j = 0, k = c.nverts-1; j < c.nverts; k=j++) + { + const int* va = &c.verts[k*4]; + const int* vb = &c.verts[j*4]; + unsigned int col = (va[3] & RC_AREA_BORDER) ? bcolor : color; + float fx,fy,fz; + fx = orig[0] + va[0]*cs; + fy = orig[1] + (va[1]+1+(i&1))*ch; + fz = orig[2] + va[2]*cs; + dd->vertex(fx,fy,fz, col); + fx = orig[0] + vb[0]*cs; + fy = orig[1] + (vb[1]+1+(i&1))*ch; + fz = orig[2] + vb[2]*cs; + dd->vertex(fx,fy,fz, col); + } + } + dd->end(); + + dd->begin(DU_DRAW_POINTS, 3.0f); + + for (int i = 0; i < cset.nconts; ++i) + { + const rcContour& c = cset.conts[i]; + unsigned int color = duDarkenCol(duIntToCol(c.reg, a)); + for (int j = 0; j < c.nverts; ++j) + { + const int* v = &c.verts[j*4]; + float off = 0; + unsigned int colv = color; + if (v[3] & RC_BORDER_VERTEX) + { + colv = duRGBA(255,255,255,a); + off = ch*2; + } + + float fx = orig[0] + v[0]*cs; + float fy = orig[1] + (v[1]+1+(i&1))*ch + off; + float fz = orig[2] + v[2]*cs; + dd->vertex(fx,fy,fz, colv); + } + } + dd->end(); +} + +void duDebugDrawPolyMesh(duDebugDraw* dd, const struct rcPolyMesh& mesh) +{ + if (!dd) return; + + const int nvp = mesh.nvp; + const float cs = mesh.cs; + const float ch = mesh.ch; + const float* orig = mesh.bmin; + + dd->begin(DU_DRAW_TRIS); + + for (int i = 0; i < mesh.npolys; ++i) + { + const unsigned short* p = &mesh.polys[i*nvp*2]; + const unsigned char area = mesh.areas[i]; + + unsigned int color; + if (area == RC_WALKABLE_AREA) + color = duRGBA(0,192,255,64); + else if (area == RC_NULL_AREA) + color = duRGBA(0,0,0,64); + else + color = dd->areaToCol(area); + + unsigned short vi[3]; + for (int j = 2; j < nvp; ++j) + { + if (p[j] == RC_MESH_NULL_IDX) break; + vi[0] = p[0]; + vi[1] = p[j-1]; + vi[2] = p[j]; + for (int k = 0; k < 3; ++k) + { + const unsigned short* v = &mesh.verts[vi[k]*3]; + const float x = orig[0] + v[0]*cs; + const float y = orig[1] + (v[1]+1)*ch; + const float z = orig[2] + v[2]*cs; + dd->vertex(x,y,z, color); + } + } + } + dd->end(); + + // Draw neighbours edges + const unsigned int coln = duRGBA(0,48,64,32); + dd->begin(DU_DRAW_LINES, 1.5f); + for (int i = 0; i < mesh.npolys; ++i) + { + const unsigned short* p = &mesh.polys[i*nvp*2]; + for (int j = 0; j < nvp; ++j) + { + if (p[j] == RC_MESH_NULL_IDX) break; + if (p[nvp+j] & 0x8000) continue; + const int nj = (j+1 >= nvp || p[j+1] == RC_MESH_NULL_IDX) ? 0 : j+1; + const int vi[2] = {p[j], p[nj]}; + + for (int k = 0; k < 2; ++k) + { + const unsigned short* v = &mesh.verts[vi[k]*3]; + const float x = orig[0] + v[0]*cs; + const float y = orig[1] + (v[1]+1)*ch + 0.1f; + const float z = orig[2] + v[2]*cs; + dd->vertex(x, y, z, coln); + } + } + } + dd->end(); + + // Draw boundary edges + const unsigned int colb = duRGBA(0,48,64,220); + dd->begin(DU_DRAW_LINES, 2.5f); + for (int i = 0; i < mesh.npolys; ++i) + { + const unsigned short* p = &mesh.polys[i*nvp*2]; + for (int j = 0; j < nvp; ++j) + { + if (p[j] == RC_MESH_NULL_IDX) break; + if ((p[nvp+j] & 0x8000) == 0) continue; + const int nj = (j+1 >= nvp || p[j+1] == RC_MESH_NULL_IDX) ? 0 : j+1; + const int vi[2] = {p[j], p[nj]}; + + unsigned int col = colb; + if ((p[nvp+j] & 0xf) != 0xf) + col = duRGBA(255,255,255,128); + for (int k = 0; k < 2; ++k) + { + const unsigned short* v = &mesh.verts[vi[k]*3]; + const float x = orig[0] + v[0]*cs; + const float y = orig[1] + (v[1]+1)*ch + 0.1f; + const float z = orig[2] + v[2]*cs; + dd->vertex(x, y, z, col); + } + } + } + dd->end(); + + dd->begin(DU_DRAW_POINTS, 3.0f); + const unsigned int colv = duRGBA(0,0,0,220); + for (int i = 0; i < mesh.nverts; ++i) + { + const unsigned short* v = &mesh.verts[i*3]; + const float x = orig[0] + v[0]*cs; + const float y = orig[1] + (v[1]+1)*ch + 0.1f; + const float z = orig[2] + v[2]*cs; + dd->vertex(x,y,z, colv); + } + dd->end(); +} + +void duDebugDrawPolyMeshDetail(duDebugDraw* dd, const struct rcPolyMeshDetail& dmesh) +{ + if (!dd) return; + + dd->begin(DU_DRAW_TRIS); + + for (int i = 0; i < dmesh.nmeshes; ++i) + { + const unsigned int* m = &dmesh.meshes[i*4]; + const unsigned int bverts = m[0]; + const unsigned int btris = m[2]; + const int ntris = (int)m[3]; + const float* verts = &dmesh.verts[bverts*3]; + const unsigned char* tris = &dmesh.tris[btris*4]; + + unsigned int color = duIntToCol(i, 192); + + for (int j = 0; j < ntris; ++j) + { + dd->vertex(&verts[tris[j*4+0]*3], color); + dd->vertex(&verts[tris[j*4+1]*3], color); + dd->vertex(&verts[tris[j*4+2]*3], color); + } + } + dd->end(); + + // Internal edges. + dd->begin(DU_DRAW_LINES, 1.0f); + const unsigned int coli = duRGBA(0,0,0,64); + for (int i = 0; i < dmesh.nmeshes; ++i) + { + const unsigned int* m = &dmesh.meshes[i*4]; + const unsigned int bverts = m[0]; + const unsigned int btris = m[2]; + const int ntris = (int)m[3]; + const float* verts = &dmesh.verts[bverts*3]; + const unsigned char* tris = &dmesh.tris[btris*4]; + + for (int j = 0; j < ntris; ++j) + { + const unsigned char* t = &tris[j*4]; + for (int k = 0, kp = 2; k < 3; kp=k++) + { + unsigned char ef = (t[3] >> (kp*2)) & 0x3; + if (ef == 0) + { + // Internal edge + if (t[kp] < t[k]) + { + dd->vertex(&verts[t[kp]*3], coli); + dd->vertex(&verts[t[k]*3], coli); + } + } + } + } + } + dd->end(); + + // External edges. + dd->begin(DU_DRAW_LINES, 2.0f); + const unsigned int cole = duRGBA(0,0,0,64); + for (int i = 0; i < dmesh.nmeshes; ++i) + { + const unsigned int* m = &dmesh.meshes[i*4]; + const unsigned int bverts = m[0]; + const unsigned int btris = m[2]; + const int ntris = (int)m[3]; + const float* verts = &dmesh.verts[bverts*3]; + const unsigned char* tris = &dmesh.tris[btris*4]; + + for (int j = 0; j < ntris; ++j) + { + const unsigned char* t = &tris[j*4]; + for (int k = 0, kp = 2; k < 3; kp=k++) + { + unsigned char ef = (t[3] >> (kp*2)) & 0x3; + if (ef != 0) + { + // Ext edge + dd->vertex(&verts[t[kp]*3], cole); + dd->vertex(&verts[t[k]*3], cole); + } + } + } + } + dd->end(); + + dd->begin(DU_DRAW_POINTS, 3.0f); + const unsigned int colv = duRGBA(0,0,0,64); + for (int i = 0; i < dmesh.nmeshes; ++i) + { + const unsigned int* m = &dmesh.meshes[i*4]; + const unsigned int bverts = m[0]; + const int nverts = (int)m[1]; + const float* verts = &dmesh.verts[bverts*3]; + for (int j = 0; j < nverts; ++j) + dd->vertex(&verts[j*3], colv); + } + dd->end(); +} diff --git a/libs/recast/debug_utils/src/RecastDump.cpp b/libs/recast/debug_utils/src/RecastDump.cpp new file mode 100644 index 000000000..209382515 --- /dev/null +++ b/libs/recast/debug_utils/src/RecastDump.cpp @@ -0,0 +1,451 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#define _USE_MATH_DEFINES +#include +#include +#include +#include +#include "Recast.h" +#include "RecastAlloc.h" +#include "RecastDump.h" + + +duFileIO::~duFileIO() +{ + // Empty +} + +static void ioprintf(duFileIO* io, const char* format, ...) +{ + char line[256]; + va_list ap; + va_start(ap, format); + const int n = vsnprintf(line, sizeof(line), format, ap); + va_end(ap); + if (n > 0) + io->write(line, sizeof(char)*n); +} + +bool duDumpPolyMeshToObj(rcPolyMesh& pmesh, duFileIO* io) +{ + if (!io) + { + printf("duDumpPolyMeshToObj: input IO is null.\n"); + return false; + } + if (!io->isWriting()) + { + printf("duDumpPolyMeshToObj: input IO not writing.\n"); + return false; + } + + const int nvp = pmesh.nvp; + const float cs = pmesh.cs; + const float ch = pmesh.ch; + const float* orig = pmesh.bmin; + + ioprintf(io, "# Recast Navmesh\n"); + ioprintf(io, "o NavMesh\n"); + + ioprintf(io, "\n"); + + for (int i = 0; i < pmesh.nverts; ++i) + { + const unsigned short* v = &pmesh.verts[i*3]; + const float x = orig[0] + v[0]*cs; + const float y = orig[1] + (v[1]+1)*ch + 0.1f; + const float z = orig[2] + v[2]*cs; + ioprintf(io, "v %f %f %f\n", x,y,z); + } + + ioprintf(io, "\n"); + + for (int i = 0; i < pmesh.npolys; ++i) + { + const unsigned short* p = &pmesh.polys[i*nvp*2]; + for (int j = 2; j < nvp; ++j) + { + if (p[j] == RC_MESH_NULL_IDX) break; + ioprintf(io, "f %d %d %d\n", p[0]+1, p[j-1]+1, p[j]+1); + } + } + + return true; +} + +bool duDumpPolyMeshDetailToObj(rcPolyMeshDetail& dmesh, duFileIO* io) +{ + if (!io) + { + printf("duDumpPolyMeshDetailToObj: input IO is null.\n"); + return false; + } + if (!io->isWriting()) + { + printf("duDumpPolyMeshDetailToObj: input IO not writing.\n"); + return false; + } + + ioprintf(io, "# Recast Navmesh\n"); + ioprintf(io, "o NavMesh\n"); + + ioprintf(io, "\n"); + + for (int i = 0; i < dmesh.nverts; ++i) + { + const float* v = &dmesh.verts[i*3]; + ioprintf(io, "v %f %f %f\n", v[0],v[1],v[2]); + } + + ioprintf(io, "\n"); + + for (int i = 0; i < dmesh.nmeshes; ++i) + { + const unsigned int* m = &dmesh.meshes[i*4]; + const unsigned int bverts = m[0]; + const unsigned int btris = m[2]; + const unsigned int ntris = m[3]; + const unsigned char* tris = &dmesh.tris[btris*4]; + for (unsigned int j = 0; j < ntris; ++j) + { + ioprintf(io, "f %d %d %d\n", + (int)(bverts+tris[j*4+0])+1, + (int)(bverts+tris[j*4+1])+1, + (int)(bverts+tris[j*4+2])+1); + } + } + + return true; +} + +static const int CSET_MAGIC = ('c' << 24) | ('s' << 16) | ('e' << 8) | 't'; +static const int CSET_VERSION = 2; + +bool duDumpContourSet(struct rcContourSet& cset, duFileIO* io) +{ + if (!io) + { + printf("duDumpContourSet: input IO is null.\n"); + return false; + } + if (!io->isWriting()) + { + printf("duDumpContourSet: input IO not writing.\n"); + return false; + } + + io->write(&CSET_MAGIC, sizeof(CSET_MAGIC)); + io->write(&CSET_VERSION, sizeof(CSET_VERSION)); + + io->write(&cset.nconts, sizeof(cset.nconts)); + + io->write(cset.bmin, sizeof(cset.bmin)); + io->write(cset.bmax, sizeof(cset.bmax)); + + io->write(&cset.cs, sizeof(cset.cs)); + io->write(&cset.ch, sizeof(cset.ch)); + + io->write(&cset.width, sizeof(cset.width)); + io->write(&cset.height, sizeof(cset.height)); + io->write(&cset.borderSize, sizeof(cset.borderSize)); + + for (int i = 0; i < cset.nconts; ++i) + { + const rcContour& cont = cset.conts[i]; + io->write(&cont.nverts, sizeof(cont.nverts)); + io->write(&cont.nrverts, sizeof(cont.nrverts)); + io->write(&cont.reg, sizeof(cont.reg)); + io->write(&cont.area, sizeof(cont.area)); + io->write(cont.verts, sizeof(int)*4*cont.nverts); + io->write(cont.rverts, sizeof(int)*4*cont.nrverts); + } + + return true; +} + +bool duReadContourSet(struct rcContourSet& cset, duFileIO* io) +{ + if (!io) + { + printf("duReadContourSet: input IO is null.\n"); + return false; + } + if (!io->isReading()) + { + printf("duReadContourSet: input IO not reading.\n"); + return false; + } + + int magic = 0; + int version = 0; + + io->read(&magic, sizeof(magic)); + io->read(&version, sizeof(version)); + + if (magic != CSET_MAGIC) + { + printf("duReadContourSet: Bad voodoo.\n"); + return false; + } + if (version != CSET_VERSION) + { + printf("duReadContourSet: Bad version.\n"); + return false; + } + + io->read(&cset.nconts, sizeof(cset.nconts)); + + cset.conts = (rcContour*)rcAlloc(sizeof(rcContour)*cset.nconts, RC_ALLOC_PERM); + if (!cset.conts) + { + printf("duReadContourSet: Could not alloc contours (%d)\n", cset.nconts); + return false; + } + memset(cset.conts, 0, sizeof(rcContour)*cset.nconts); + + io->read(cset.bmin, sizeof(cset.bmin)); + io->read(cset.bmax, sizeof(cset.bmax)); + + io->read(&cset.cs, sizeof(cset.cs)); + io->read(&cset.ch, sizeof(cset.ch)); + + io->read(&cset.width, sizeof(cset.width)); + io->read(&cset.height, sizeof(cset.height)); + io->read(&cset.borderSize, sizeof(cset.borderSize)); + + for (int i = 0; i < cset.nconts; ++i) + { + rcContour& cont = cset.conts[i]; + io->read(&cont.nverts, sizeof(cont.nverts)); + io->read(&cont.nrverts, sizeof(cont.nrverts)); + io->read(&cont.reg, sizeof(cont.reg)); + io->read(&cont.area, sizeof(cont.area)); + + cont.verts = (int*)rcAlloc(sizeof(int)*4*cont.nverts, RC_ALLOC_PERM); + if (!cont.verts) + { + printf("duReadContourSet: Could not alloc contour verts (%d)\n", cont.nverts); + return false; + } + cont.rverts = (int*)rcAlloc(sizeof(int)*4*cont.nrverts, RC_ALLOC_PERM); + if (!cont.rverts) + { + printf("duReadContourSet: Could not alloc contour rverts (%d)\n", cont.nrverts); + return false; + } + + io->read(cont.verts, sizeof(int)*4*cont.nverts); + io->read(cont.rverts, sizeof(int)*4*cont.nrverts); + } + + return true; +} + + +static const int CHF_MAGIC = ('r' << 24) | ('c' << 16) | ('h' << 8) | 'f'; +static const int CHF_VERSION = 3; + +bool duDumpCompactHeightfield(struct rcCompactHeightfield& chf, duFileIO* io) +{ + if (!io) + { + printf("duDumpCompactHeightfield: input IO is null.\n"); + return false; + } + if (!io->isWriting()) + { + printf("duDumpCompactHeightfield: input IO not writing.\n"); + return false; + } + + io->write(&CHF_MAGIC, sizeof(CHF_MAGIC)); + io->write(&CHF_VERSION, sizeof(CHF_VERSION)); + + io->write(&chf.width, sizeof(chf.width)); + io->write(&chf.height, sizeof(chf.height)); + io->write(&chf.spanCount, sizeof(chf.spanCount)); + + io->write(&chf.walkableHeight, sizeof(chf.walkableHeight)); + io->write(&chf.walkableClimb, sizeof(chf.walkableClimb)); + io->write(&chf.borderSize, sizeof(chf.borderSize)); + + io->write(&chf.maxDistance, sizeof(chf.maxDistance)); + io->write(&chf.maxRegions, sizeof(chf.maxRegions)); + + io->write(chf.bmin, sizeof(chf.bmin)); + io->write(chf.bmax, sizeof(chf.bmax)); + + io->write(&chf.cs, sizeof(chf.cs)); + io->write(&chf.ch, sizeof(chf.ch)); + + int tmp = 0; + if (chf.cells) tmp |= 1; + if (chf.spans) tmp |= 2; + if (chf.dist) tmp |= 4; + if (chf.areas) tmp |= 8; + + io->write(&tmp, sizeof(tmp)); + + if (chf.cells) + io->write(chf.cells, sizeof(rcCompactCell)*chf.width*chf.height); + if (chf.spans) + io->write(chf.spans, sizeof(rcCompactSpan)*chf.spanCount); + if (chf.dist) + io->write(chf.dist, sizeof(unsigned short)*chf.spanCount); + if (chf.areas) + io->write(chf.areas, sizeof(unsigned char)*chf.spanCount); + + return true; +} + +bool duReadCompactHeightfield(struct rcCompactHeightfield& chf, duFileIO* io) +{ + if (!io) + { + printf("duReadCompactHeightfield: input IO is null.\n"); + return false; + } + if (!io->isReading()) + { + printf("duReadCompactHeightfield: input IO not reading.\n"); + return false; + } + + int magic = 0; + int version = 0; + + io->read(&magic, sizeof(magic)); + io->read(&version, sizeof(version)); + + if (magic != CHF_MAGIC) + { + printf("duReadCompactHeightfield: Bad voodoo.\n"); + return false; + } + if (version != CHF_VERSION) + { + printf("duReadCompactHeightfield: Bad version.\n"); + return false; + } + + io->read(&chf.width, sizeof(chf.width)); + io->read(&chf.height, sizeof(chf.height)); + io->read(&chf.spanCount, sizeof(chf.spanCount)); + + io->read(&chf.walkableHeight, sizeof(chf.walkableHeight)); + io->read(&chf.walkableClimb, sizeof(chf.walkableClimb)); + io->read(&chf.borderSize, sizeof(chf.borderSize)); + + io->read(&chf.maxDistance, sizeof(chf.maxDistance)); + io->read(&chf.maxRegions, sizeof(chf.maxRegions)); + + io->read(chf.bmin, sizeof(chf.bmin)); + io->read(chf.bmax, sizeof(chf.bmax)); + + io->read(&chf.cs, sizeof(chf.cs)); + io->read(&chf.ch, sizeof(chf.ch)); + + int tmp = 0; + io->read(&tmp, sizeof(tmp)); + + if (tmp & 1) + { + chf.cells = (rcCompactCell*)rcAlloc(sizeof(rcCompactCell)*chf.width*chf.height, RC_ALLOC_PERM); + if (!chf.cells) + { + printf("duReadCompactHeightfield: Could not alloc cells (%d)\n", chf.width*chf.height); + return false; + } + io->read(chf.cells, sizeof(rcCompactCell)*chf.width*chf.height); + } + if (tmp & 2) + { + chf.spans = (rcCompactSpan*)rcAlloc(sizeof(rcCompactSpan)*chf.spanCount, RC_ALLOC_PERM); + if (!chf.spans) + { + printf("duReadCompactHeightfield: Could not alloc spans (%d)\n", chf.spanCount); + return false; + } + io->read(chf.spans, sizeof(rcCompactSpan)*chf.spanCount); + } + if (tmp & 4) + { + chf.dist = (unsigned short*)rcAlloc(sizeof(unsigned short)*chf.spanCount, RC_ALLOC_PERM); + if (!chf.dist) + { + printf("duReadCompactHeightfield: Could not alloc dist (%d)\n", chf.spanCount); + return false; + } + io->read(chf.dist, sizeof(unsigned short)*chf.spanCount); + } + if (tmp & 8) + { + chf.areas = (unsigned char*)rcAlloc(sizeof(unsigned char)*chf.spanCount, RC_ALLOC_PERM); + if (!chf.areas) + { + printf("duReadCompactHeightfield: Could not alloc areas (%d)\n", chf.spanCount); + return false; + } + io->read(chf.areas, sizeof(unsigned char)*chf.spanCount); + } + + return true; +} + + +static void logLine(rcContext& ctx, rcTimerLabel label, const char* name, const float pc) +{ + const int t = ctx.getAccumulatedTime(label); + if (t < 0) return; + ctx.log(RC_LOG_PROGRESS, "%s:\t%.2fms\t(%.1f%%)", name, t/1000.0f, t*pc); +} + +void duLogBuildTimes(rcContext& ctx, const int totalTimeUsec) +{ + const float pc = 100.0f / totalTimeUsec; + + ctx.log(RC_LOG_PROGRESS, "Build Times"); + logLine(ctx, RC_TIMER_RASTERIZE_TRIANGLES, "- Rasterize", pc); + logLine(ctx, RC_TIMER_BUILD_COMPACTHEIGHTFIELD, "- Build Compact", pc); + logLine(ctx, RC_TIMER_FILTER_BORDER, "- Filter Border", pc); + logLine(ctx, RC_TIMER_FILTER_WALKABLE, "- Filter Walkable", pc); + logLine(ctx, RC_TIMER_ERODE_AREA, "- Erode Area", pc); + logLine(ctx, RC_TIMER_MEDIAN_AREA, "- Median Area", pc); + logLine(ctx, RC_TIMER_MARK_BOX_AREA, "- Mark Box Area", pc); + logLine(ctx, RC_TIMER_MARK_CONVEXPOLY_AREA, "- Mark Convex Area", pc); + logLine(ctx, RC_TIMER_MARK_CYLINDER_AREA, "- Mark Cylinder Area", pc); + logLine(ctx, RC_TIMER_BUILD_DISTANCEFIELD, "- Build Distance Field", pc); + logLine(ctx, RC_TIMER_BUILD_DISTANCEFIELD_DIST, " - Distance", pc); + logLine(ctx, RC_TIMER_BUILD_DISTANCEFIELD_BLUR, " - Blur", pc); + logLine(ctx, RC_TIMER_BUILD_REGIONS, "- Build Regions", pc); + logLine(ctx, RC_TIMER_BUILD_REGIONS_WATERSHED, " - Watershed", pc); + logLine(ctx, RC_TIMER_BUILD_REGIONS_EXPAND, " - Expand", pc); + logLine(ctx, RC_TIMER_BUILD_REGIONS_FLOOD, " - Find Basins", pc); + logLine(ctx, RC_TIMER_BUILD_REGIONS_FILTER, " - Filter", pc); + logLine(ctx, RC_TIMER_BUILD_LAYERS, "- Build Layers", pc); + logLine(ctx, RC_TIMER_BUILD_CONTOURS, "- Build Contours", pc); + logLine(ctx, RC_TIMER_BUILD_CONTOURS_TRACE, " - Trace", pc); + logLine(ctx, RC_TIMER_BUILD_CONTOURS_SIMPLIFY, " - Simplify", pc); + logLine(ctx, RC_TIMER_BUILD_POLYMESH, "- Build Polymesh", pc); + logLine(ctx, RC_TIMER_BUILD_POLYMESHDETAIL, "- Build Polymesh Detail", pc); + logLine(ctx, RC_TIMER_MERGE_POLYMESH, "- Merge Polymeshes", pc); + logLine(ctx, RC_TIMER_MERGE_POLYMESHDETAIL, "- Merge Polymesh Details", pc); + ctx.log(RC_LOG_PROGRESS, "=== TOTAL:\t%.2fms", totalTimeUsec/1000.0f); +} + diff --git a/libs/recast/detour/include/DetourAlloc.h b/libs/recast/detour/include/DetourAlloc.h new file mode 100644 index 000000000..f87b454ac --- /dev/null +++ b/libs/recast/detour/include/DetourAlloc.h @@ -0,0 +1,61 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#ifndef DETOURALLOCATOR_H +#define DETOURALLOCATOR_H + +#include + +/// Provides hint values to the memory allocator on how long the +/// memory is expected to be used. +enum dtAllocHint +{ + DT_ALLOC_PERM, ///< Memory persist after a function call. + DT_ALLOC_TEMP ///< Memory used temporarily within a function. +}; + +/// A memory allocation function. +// @param[in] size The size, in bytes of memory, to allocate. +// @param[in] rcAllocHint A hint to the allocator on how long the memory is expected to be in use. +// @return A pointer to the beginning of the allocated memory block, or null if the allocation failed. +/// @see dtAllocSetCustom +typedef void* (dtAllocFunc)(size_t size, dtAllocHint hint); + +/// A memory deallocation function. +/// @param[in] ptr A pointer to a memory block previously allocated using #dtAllocFunc. +/// @see dtAllocSetCustom +typedef void (dtFreeFunc)(void* ptr); + +/// Sets the base custom allocation functions to be used by Detour. +/// @param[in] allocFunc The memory allocation function to be used by #dtAlloc +/// @param[in] freeFunc The memory de-allocation function to be used by #dtFree +void dtAllocSetCustom(dtAllocFunc *allocFunc, dtFreeFunc *freeFunc); + +/// Allocates a memory block. +/// @param[in] size The size, in bytes of memory, to allocate. +/// @param[in] hint A hint to the allocator on how long the memory is expected to be in use. +/// @return A pointer to the beginning of the allocated memory block, or null if the allocation failed. +/// @see dtFree +void* dtAlloc(size_t size, dtAllocHint hint); + +/// Deallocates a memory block. +/// @param[in] ptr A pointer to a memory block previously allocated using #dtAlloc. +/// @see dtAlloc +void dtFree(void* ptr); + +#endif diff --git a/libs/recast/detour/include/DetourAssert.h b/libs/recast/detour/include/DetourAssert.h new file mode 100644 index 000000000..e05fd66fa --- /dev/null +++ b/libs/recast/detour/include/DetourAssert.h @@ -0,0 +1,56 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#ifndef DETOURASSERT_H +#define DETOURASSERT_H + +// Note: This header file's only purpose is to include define assert. +// Feel free to change the file and include your own implementation instead. + +#ifdef NDEBUG + +// From http://cnicholson.net/2009/02/stupid-c-tricks-adventures-in-assert/ +# define dtAssert(x) do { (void)sizeof(x); } while((void)(__LINE__==-1),false) + +#else + +/// An assertion failure function. +// @param[in] expression asserted expression. +// @param[in] file Filename of the failed assertion. +// @param[in] line Line number of the failed assertion. +/// @see dtAssertFailSetCustom +typedef void (dtAssertFailFunc)(const char* expression, const char* file, int line); + +/// Sets the base custom assertion failure function to be used by Detour. +/// @param[in] assertFailFunc The function to be invoked in case of failure of #dtAssert +void dtAssertFailSetCustom(dtAssertFailFunc *assertFailFunc); + +/// Gets the base custom assertion failure function to be used by Detour. +dtAssertFailFunc* dtAssertFailGetCustom(); + +# include +# define dtAssert(expression) \ + { \ + dtAssertFailFunc* failFunc = dtAssertFailGetCustom(); \ + if(failFunc == NULL) { assert(expression); } \ + else if(!(expression)) { (*failFunc)(#expression, __FILE__, __LINE__); } \ + } + +#endif + +#endif // DETOURASSERT_H diff --git a/libs/recast/detour/include/DetourCommon.h b/libs/recast/detour/include/DetourCommon.h new file mode 100644 index 000000000..739858cd9 --- /dev/null +++ b/libs/recast/detour/include/DetourCommon.h @@ -0,0 +1,550 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#ifndef DETOURCOMMON_H +#define DETOURCOMMON_H + +#include "DetourMath.h" +#include + +/** +@defgroup detour Detour + +Members in this module are used to create, manipulate, and query navigation +meshes. + +@note This is a summary list of members. Use the index or search +feature to find minor members. +*/ + +/// @name General helper functions +/// @{ + +/// Used to ignore a function parameter. VS complains about unused parameters +/// and this silences the warning. +/// @param [in] _ Unused parameter +template void dtIgnoreUnused(const T&) { } + +/// Swaps the values of the two parameters. +/// @param[in,out] a Value A +/// @param[in,out] b Value B +template inline void dtSwap(T& a, T& b) { T t = a; a = b; b = t; } + +/// Returns the minimum of two values. +/// @param[in] a Value A +/// @param[in] b Value B +/// @return The minimum of the two values. +template inline T dtMin(T a, T b) { return a < b ? a : b; } + +/// Returns the maximum of two values. +/// @param[in] a Value A +/// @param[in] b Value B +/// @return The maximum of the two values. +template inline T dtMax(T a, T b) { return a > b ? a : b; } + +/// Returns the absolute value. +/// @param[in] a The value. +/// @return The absolute value of the specified value. +template inline T dtAbs(T a) { return a < 0 ? -a : a; } + +/// Returns the square of the value. +/// @param[in] a The value. +/// @return The square of the value. +template inline T dtSqr(T a) { return a*a; } + +/// Clamps the value to the specified range. +/// @param[in] v The value to clamp. +/// @param[in] mn The minimum permitted return value. +/// @param[in] mx The maximum permitted return value. +/// @return The value, clamped to the specified range. +template inline T dtClamp(T v, T mn, T mx) { return v < mn ? mn : (v > mx ? mx : v); } + +/// @} +/// @name Vector helper functions. +/// @{ + +/// Derives the cross product of two vectors. (@p v1 x @p v2) +/// @param[out] dest The cross product. [(x, y, z)] +/// @param[in] v1 A Vector [(x, y, z)] +/// @param[in] v2 A vector [(x, y, z)] +inline void dtVcross(float* dest, const float* v1, const float* v2) +{ + dest[0] = v1[1]*v2[2] - v1[2]*v2[1]; + dest[1] = v1[2]*v2[0] - v1[0]*v2[2]; + dest[2] = v1[0]*v2[1] - v1[1]*v2[0]; +} + +/// Derives the dot product of two vectors. (@p v1 . @p v2) +/// @param[in] v1 A Vector [(x, y, z)] +/// @param[in] v2 A vector [(x, y, z)] +/// @return The dot product. +inline float dtVdot(const float* v1, const float* v2) +{ + return v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2]; +} + +/// Performs a scaled vector addition. (@p v1 + (@p v2 * @p s)) +/// @param[out] dest The result vector. [(x, y, z)] +/// @param[in] v1 The base vector. [(x, y, z)] +/// @param[in] v2 The vector to scale and add to @p v1. [(x, y, z)] +/// @param[in] s The amount to scale @p v2 by before adding to @p v1. +inline void dtVmad(float* dest, const float* v1, const float* v2, const float s) +{ + dest[0] = v1[0]+v2[0]*s; + dest[1] = v1[1]+v2[1]*s; + dest[2] = v1[2]+v2[2]*s; +} + +/// Performs a linear interpolation between two vectors. (@p v1 toward @p v2) +/// @param[out] dest The result vector. [(x, y, x)] +/// @param[in] v1 The starting vector. +/// @param[in] v2 The destination vector. +/// @param[in] t The interpolation factor. [Limits: 0 <= value <= 1.0] +inline void dtVlerp(float* dest, const float* v1, const float* v2, const float t) +{ + dest[0] = v1[0]+(v2[0]-v1[0])*t; + dest[1] = v1[1]+(v2[1]-v1[1])*t; + dest[2] = v1[2]+(v2[2]-v1[2])*t; +} + +/// Performs a vector addition. (@p v1 + @p v2) +/// @param[out] dest The result vector. [(x, y, z)] +/// @param[in] v1 The base vector. [(x, y, z)] +/// @param[in] v2 The vector to add to @p v1. [(x, y, z)] +inline void dtVadd(float* dest, const float* v1, const float* v2) +{ + dest[0] = v1[0]+v2[0]; + dest[1] = v1[1]+v2[1]; + dest[2] = v1[2]+v2[2]; +} + +/// Performs a vector subtraction. (@p v1 - @p v2) +/// @param[out] dest The result vector. [(x, y, z)] +/// @param[in] v1 The base vector. [(x, y, z)] +/// @param[in] v2 The vector to subtract from @p v1. [(x, y, z)] +inline void dtVsub(float* dest, const float* v1, const float* v2) +{ + dest[0] = v1[0]-v2[0]; + dest[1] = v1[1]-v2[1]; + dest[2] = v1[2]-v2[2]; +} + +/// Scales the vector by the specified value. (@p v * @p t) +/// @param[out] dest The result vector. [(x, y, z)] +/// @param[in] v The vector to scale. [(x, y, z)] +/// @param[in] t The scaling factor. +inline void dtVscale(float* dest, const float* v, const float t) +{ + dest[0] = v[0]*t; + dest[1] = v[1]*t; + dest[2] = v[2]*t; +} + +/// Selects the minimum value of each element from the specified vectors. +/// @param[in,out] mn A vector. (Will be updated with the result.) [(x, y, z)] +/// @param[in] v A vector. [(x, y, z)] +inline void dtVmin(float* mn, const float* v) +{ + mn[0] = dtMin(mn[0], v[0]); + mn[1] = dtMin(mn[1], v[1]); + mn[2] = dtMin(mn[2], v[2]); +} + +/// Selects the maximum value of each element from the specified vectors. +/// @param[in,out] mx A vector. (Will be updated with the result.) [(x, y, z)] +/// @param[in] v A vector. [(x, y, z)] +inline void dtVmax(float* mx, const float* v) +{ + mx[0] = dtMax(mx[0], v[0]); + mx[1] = dtMax(mx[1], v[1]); + mx[2] = dtMax(mx[2], v[2]); +} + +/// Sets the vector elements to the specified values. +/// @param[out] dest The result vector. [(x, y, z)] +/// @param[in] x The x-value of the vector. +/// @param[in] y The y-value of the vector. +/// @param[in] z The z-value of the vector. +inline void dtVset(float* dest, const float x, const float y, const float z) +{ + dest[0] = x; dest[1] = y; dest[2] = z; +} + +/// Performs a vector copy. +/// @param[out] dest The result. [(x, y, z)] +/// @param[in] a The vector to copy. [(x, y, z)] +inline void dtVcopy(float* dest, const float* a) +{ + dest[0] = a[0]; + dest[1] = a[1]; + dest[2] = a[2]; +} + +/// Derives the scalar length of the vector. +/// @param[in] v The vector. [(x, y, z)] +/// @return The scalar length of the vector. +inline float dtVlen(const float* v) +{ + return dtMathSqrtf(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); +} + +/// Derives the square of the scalar length of the vector. (len * len) +/// @param[in] v The vector. [(x, y, z)] +/// @return The square of the scalar length of the vector. +inline float dtVlenSqr(const float* v) +{ + return v[0]*v[0] + v[1]*v[1] + v[2]*v[2]; +} + +/// Returns the distance between two points. +/// @param[in] v1 A point. [(x, y, z)] +/// @param[in] v2 A point. [(x, y, z)] +/// @return The distance between the two points. +inline float dtVdist(const float* v1, const float* v2) +{ + const float dx = v2[0] - v1[0]; + const float dy = v2[1] - v1[1]; + const float dz = v2[2] - v1[2]; + return dtMathSqrtf(dx*dx + dy*dy + dz*dz); +} + +/// Returns the square of the distance between two points. +/// @param[in] v1 A point. [(x, y, z)] +/// @param[in] v2 A point. [(x, y, z)] +/// @return The square of the distance between the two points. +inline float dtVdistSqr(const float* v1, const float* v2) +{ + const float dx = v2[0] - v1[0]; + const float dy = v2[1] - v1[1]; + const float dz = v2[2] - v1[2]; + return dx*dx + dy*dy + dz*dz; +} + +/// Derives the distance between the specified points on the xz-plane. +/// @param[in] v1 A point. [(x, y, z)] +/// @param[in] v2 A point. [(x, y, z)] +/// @return The distance between the point on the xz-plane. +/// +/// The vectors are projected onto the xz-plane, so the y-values are ignored. +inline float dtVdist2D(const float* v1, const float* v2) +{ + const float dx = v2[0] - v1[0]; + const float dz = v2[2] - v1[2]; + return dtMathSqrtf(dx*dx + dz*dz); +} + +/// Derives the square of the distance between the specified points on the xz-plane. +/// @param[in] v1 A point. [(x, y, z)] +/// @param[in] v2 A point. [(x, y, z)] +/// @return The square of the distance between the point on the xz-plane. +inline float dtVdist2DSqr(const float* v1, const float* v2) +{ + const float dx = v2[0] - v1[0]; + const float dz = v2[2] - v1[2]; + return dx*dx + dz*dz; +} + +/// Normalizes the vector. +/// @param[in,out] v The vector to normalize. [(x, y, z)] +inline void dtVnormalize(float* v) +{ + float d = 1.0f / dtMathSqrtf(dtSqr(v[0]) + dtSqr(v[1]) + dtSqr(v[2])); + v[0] *= d; + v[1] *= d; + v[2] *= d; +} + +/// Performs a 'sloppy' colocation check of the specified points. +/// @param[in] p0 A point. [(x, y, z)] +/// @param[in] p1 A point. [(x, y, z)] +/// @return True if the points are considered to be at the same location. +/// +/// Basically, this function will return true if the specified points are +/// close enough to eachother to be considered colocated. +inline bool dtVequal(const float* p0, const float* p1) +{ + static const float thr = dtSqr(1.0f/16384.0f); + const float d = dtVdistSqr(p0, p1); + return d < thr; +} + +/// Derives the dot product of two vectors on the xz-plane. (@p u . @p v) +/// @param[in] u A vector [(x, y, z)] +/// @param[in] v A vector [(x, y, z)] +/// @return The dot product on the xz-plane. +/// +/// The vectors are projected onto the xz-plane, so the y-values are ignored. +inline float dtVdot2D(const float* u, const float* v) +{ + return u[0]*v[0] + u[2]*v[2]; +} + +/// Derives the xz-plane 2D perp product of the two vectors. (uz*vx - ux*vz) +/// @param[in] u The LHV vector [(x, y, z)] +/// @param[in] v The RHV vector [(x, y, z)] +/// @return The dot product on the xz-plane. +/// +/// The vectors are projected onto the xz-plane, so the y-values are ignored. +inline float dtVperp2D(const float* u, const float* v) +{ + return u[2]*v[0] - u[0]*v[2]; +} + +/// @} +/// @name Computational geometry helper functions. +/// @{ + +/// Derives the signed xz-plane area of the triangle ABC, or the relationship of line AB to point C. +/// @param[in] a Vertex A. [(x, y, z)] +/// @param[in] b Vertex B. [(x, y, z)] +/// @param[in] c Vertex C. [(x, y, z)] +/// @return The signed xz-plane area of the triangle. +inline float dtTriArea2D(const float* a, const float* b, const float* c) +{ + const float abx = b[0] - a[0]; + const float abz = b[2] - a[2]; + const float acx = c[0] - a[0]; + const float acz = c[2] - a[2]; + return acx*abz - abx*acz; +} + +/// Determines if two axis-aligned bounding boxes overlap. +/// @param[in] amin Minimum bounds of box A. [(x, y, z)] +/// @param[in] amax Maximum bounds of box A. [(x, y, z)] +/// @param[in] bmin Minimum bounds of box B. [(x, y, z)] +/// @param[in] bmax Maximum bounds of box B. [(x, y, z)] +/// @return True if the two AABB's overlap. +/// @see dtOverlapBounds +inline bool dtOverlapQuantBounds(const unsigned short amin[3], const unsigned short amax[3], + const unsigned short bmin[3], const unsigned short bmax[3]) +{ + bool overlap = true; + overlap = (amin[0] > bmax[0] || amax[0] < bmin[0]) ? false : overlap; + overlap = (amin[1] > bmax[1] || amax[1] < bmin[1]) ? false : overlap; + overlap = (amin[2] > bmax[2] || amax[2] < bmin[2]) ? false : overlap; + return overlap; +} + +/// Determines if two axis-aligned bounding boxes overlap. +/// @param[in] amin Minimum bounds of box A. [(x, y, z)] +/// @param[in] amax Maximum bounds of box A. [(x, y, z)] +/// @param[in] bmin Minimum bounds of box B. [(x, y, z)] +/// @param[in] bmax Maximum bounds of box B. [(x, y, z)] +/// @return True if the two AABB's overlap. +/// @see dtOverlapQuantBounds +inline bool dtOverlapBounds(const float* amin, const float* amax, + const float* bmin, const float* bmax) +{ + bool overlap = true; + overlap = (amin[0] > bmax[0] || amax[0] < bmin[0]) ? false : overlap; + overlap = (amin[1] > bmax[1] || amax[1] < bmin[1]) ? false : overlap; + overlap = (amin[2] > bmax[2] || amax[2] < bmin[2]) ? false : overlap; + return overlap; +} + +/// Derives the closest point on a triangle from the specified reference point. +/// @param[out] closest The closest point on the triangle. +/// @param[in] p The reference point from which to test. [(x, y, z)] +/// @param[in] a Vertex A of triangle ABC. [(x, y, z)] +/// @param[in] b Vertex B of triangle ABC. [(x, y, z)] +/// @param[in] c Vertex C of triangle ABC. [(x, y, z)] +void dtClosestPtPointTriangle(float* closest, const float* p, + const float* a, const float* b, const float* c); + +/// Derives the y-axis height of the closest point on the triangle from the specified reference point. +/// @param[in] p The reference point from which to test. [(x, y, z)] +/// @param[in] a Vertex A of triangle ABC. [(x, y, z)] +/// @param[in] b Vertex B of triangle ABC. [(x, y, z)] +/// @param[in] c Vertex C of triangle ABC. [(x, y, z)] +/// @param[out] h The resulting height. +bool dtClosestHeightPointTriangle(const float* p, const float* a, const float* b, const float* c, float& h); + +bool dtIntersectSegmentPoly2D(const float* p0, const float* p1, + const float* verts, int nverts, + float& tmin, float& tmax, + int& segMin, int& segMax); + +bool dtIntersectSegSeg2D(const float* ap, const float* aq, + const float* bp, const float* bq, + float& s, float& t); + +/// Determines if the specified point is inside the convex polygon on the xz-plane. +/// @param[in] pt The point to check. [(x, y, z)] +/// @param[in] verts The polygon vertices. [(x, y, z) * @p nverts] +/// @param[in] nverts The number of vertices. [Limit: >= 3] +/// @return True if the point is inside the polygon. +bool dtPointInPolygon(const float* pt, const float* verts, const int nverts); + +bool dtDistancePtPolyEdgesSqr(const float* pt, const float* verts, const int nverts, + float* ed, float* et); + +float dtDistancePtSegSqr2D(const float* pt, const float* p, const float* q, float& t); + +/// Derives the centroid of a convex polygon. +/// @param[out] tc The centroid of the polgyon. [(x, y, z)] +/// @param[in] idx The polygon indices. [(vertIndex) * @p nidx] +/// @param[in] nidx The number of indices in the polygon. [Limit: >= 3] +/// @param[in] verts The polygon vertices. [(x, y, z) * vertCount] +void dtCalcPolyCenter(float* tc, const unsigned short* idx, int nidx, const float* verts); + +/// Determines if the two convex polygons overlap on the xz-plane. +/// @param[in] polya Polygon A vertices. [(x, y, z) * @p npolya] +/// @param[in] npolya The number of vertices in polygon A. +/// @param[in] polyb Polygon B vertices. [(x, y, z) * @p npolyb] +/// @param[in] npolyb The number of vertices in polygon B. +/// @return True if the two polygons overlap. +bool dtOverlapPolyPoly2D(const float* polya, const int npolya, + const float* polyb, const int npolyb); + +/// @} +/// @name Miscellanious functions. +/// @{ + +inline unsigned int dtNextPow2(unsigned int v) +{ + v--; + v |= v >> 1; + v |= v >> 2; + v |= v >> 4; + v |= v >> 8; + v |= v >> 16; + v++; + return v; +} + +inline unsigned int dtIlog2(unsigned int v) +{ + unsigned int r; + unsigned int shift; + r = (v > 0xffff) << 4; v >>= r; + shift = (v > 0xff) << 3; v >>= shift; r |= shift; + shift = (v > 0xf) << 2; v >>= shift; r |= shift; + shift = (v > 0x3) << 1; v >>= shift; r |= shift; + r |= (v >> 1); + return r; +} + +inline int dtAlign4(int x) { return (x+3) & ~3; } + +inline int dtOppositeTile(int side) { return (side+4) & 0x7; } + +inline void dtSwapByte(unsigned char* a, unsigned char* b) +{ + unsigned char tmp = *a; + *a = *b; + *b = tmp; +} + +inline void dtSwapEndian(unsigned short* v) +{ + unsigned char* x = (unsigned char*)v; + dtSwapByte(x+0, x+1); +} + +inline void dtSwapEndian(short* v) +{ + unsigned char* x = (unsigned char*)v; + dtSwapByte(x+0, x+1); +} + +inline void dtSwapEndian(unsigned int* v) +{ + unsigned char* x = (unsigned char*)v; + dtSwapByte(x+0, x+3); dtSwapByte(x+1, x+2); +} + +inline void dtSwapEndian(int* v) +{ + unsigned char* x = (unsigned char*)v; + dtSwapByte(x+0, x+3); dtSwapByte(x+1, x+2); +} + +inline void dtSwapEndian(float* v) +{ + unsigned char* x = (unsigned char*)v; + dtSwapByte(x+0, x+3); dtSwapByte(x+1, x+2); +} + +void dtRandomPointInConvexPoly(const float* pts, const int npts, float* areas, + const float s, const float t, float* out); + +template +TypeToRetrieveAs* dtGetThenAdvanceBufferPointer(const unsigned char*& buffer, const size_t distanceToAdvance) +{ + TypeToRetrieveAs* returnPointer = reinterpret_cast(buffer); + buffer += distanceToAdvance; + return returnPointer; +} + +template +TypeToRetrieveAs* dtGetThenAdvanceBufferPointer(unsigned char*& buffer, const size_t distanceToAdvance) +{ + TypeToRetrieveAs* returnPointer = reinterpret_cast(buffer); + buffer += distanceToAdvance; + return returnPointer; +} + + +/// @} + +#endif // DETOURCOMMON_H + +/////////////////////////////////////////////////////////////////////////// + +// This section contains detailed documentation for members that don't have +// a source file. It reduces clutter in the main section of the header. + +/** + +@fn float dtTriArea2D(const float* a, const float* b, const float* c) +@par + +The vertices are projected onto the xz-plane, so the y-values are ignored. + +This is a low cost function than can be used for various purposes. Its main purpose +is for point/line relationship testing. + +In all cases: A value of zero indicates that all vertices are collinear or represent the same point. +(On the xz-plane.) + +When used for point/line relationship tests, AB usually represents a line against which +the C point is to be tested. In this case: + +A positive value indicates that point C is to the left of line AB, looking from A toward B.
+A negative value indicates that point C is to the right of lineAB, looking from A toward B. + +When used for evaluating a triangle: + +The absolute value of the return value is two times the area of the triangle when it is +projected onto the xz-plane. + +A positive return value indicates: + +
    +
  • The vertices are wrapped in the normal Detour wrap direction.
  • +
  • The triangle's 3D face normal is in the general up direction.
  • +
+ +A negative return value indicates: + +
    +
  • The vertices are reverse wrapped. (Wrapped opposite the normal Detour wrap direction.)
  • +
  • The triangle's 3D face normal is in the general down direction.
  • +
+ +*/ diff --git a/libs/recast/detour/include/DetourMath.h b/libs/recast/detour/include/DetourMath.h new file mode 100644 index 000000000..95e14f884 --- /dev/null +++ b/libs/recast/detour/include/DetourMath.h @@ -0,0 +1,20 @@ +/** +@defgroup detour Detour + +Members in this module are wrappers around the standard math library +*/ + +#ifndef DETOURMATH_H +#define DETOURMATH_H + +#include + +inline float dtMathFabsf(float x) { return fabsf(x); } +inline float dtMathSqrtf(float x) { return sqrtf(x); } +inline float dtMathFloorf(float x) { return floorf(x); } +inline float dtMathCeilf(float x) { return ceilf(x); } +inline float dtMathCosf(float x) { return cosf(x); } +inline float dtMathSinf(float x) { return sinf(x); } +inline float dtMathAtan2f(float y, float x) { return atan2f(y, x); } + +#endif diff --git a/libs/recast/detour/include/DetourNavMesh.h b/libs/recast/detour/include/DetourNavMesh.h new file mode 100644 index 000000000..8ecd57e46 --- /dev/null +++ b/libs/recast/detour/include/DetourNavMesh.h @@ -0,0 +1,765 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#ifndef DETOURNAVMESH_H +#define DETOURNAVMESH_H + +#include "DetourAlloc.h" +#include "DetourStatus.h" + +// Undefine (or define in a build cofnig) the following line to use 64bit polyref. +// Generally not needed, useful for very large worlds. +// Note: tiles build using 32bit refs are not compatible with 64bit refs! +//#define DT_POLYREF64 1 + +#ifdef DT_POLYREF64 +// TODO: figure out a multiplatform version of uint64_t +// - maybe: https://code.google.com/p/msinttypes/ +// - or: http://www.azillionmonkeys.com/qed/pstdint.h +#include +#endif + +// Note: If you want to use 64-bit refs, change the types of both dtPolyRef & dtTileRef. +// It is also recommended that you change dtHashRef() to a proper 64-bit hash. + +/// A handle to a polygon within a navigation mesh tile. +/// @ingroup detour +#ifdef DT_POLYREF64 +static const unsigned int DT_SALT_BITS = 16; +static const unsigned int DT_TILE_BITS = 28; +static const unsigned int DT_POLY_BITS = 20; +typedef uint64_t dtPolyRef; +#else +typedef unsigned int dtPolyRef; +#endif + +/// A handle to a tile within a navigation mesh. +/// @ingroup detour +#ifdef DT_POLYREF64 +typedef uint64_t dtTileRef; +#else +typedef unsigned int dtTileRef; +#endif + +/// The maximum number of vertices per navigation polygon. +/// @ingroup detour +static const int DT_VERTS_PER_POLYGON = 6; + +/// @{ +/// @name Tile Serialization Constants +/// These constants are used to detect whether a navigation tile's data +/// and state format is compatible with the current build. +/// + +/// A magic number used to detect compatibility of navigation tile data. +static const int DT_NAVMESH_MAGIC = 'D'<<24 | 'N'<<16 | 'A'<<8 | 'V'; + +/// A version number used to detect compatibility of navigation tile data. +static const int DT_NAVMESH_VERSION = 7; + +/// A magic number used to detect the compatibility of navigation tile states. +static const int DT_NAVMESH_STATE_MAGIC = 'D'<<24 | 'N'<<16 | 'M'<<8 | 'S'; + +/// A version number used to detect compatibility of navigation tile states. +static const int DT_NAVMESH_STATE_VERSION = 1; + +/// @} + +/// A flag that indicates that an entity links to an external entity. +/// (E.g. A polygon edge is a portal that links to another polygon.) +static const unsigned short DT_EXT_LINK = 0x8000; + +/// A value that indicates the entity does not link to anything. +static const unsigned int DT_NULL_LINK = 0xffffffff; + +/// A flag that indicates that an off-mesh connection can be traversed in both directions. (Is bidirectional.) +static const unsigned int DT_OFFMESH_CON_BIDIR = 1; + +/// The maximum number of user defined area ids. +/// @ingroup detour +static const int DT_MAX_AREAS = 64; + +/// Tile flags used for various functions and fields. +/// For an example, see dtNavMesh::addTile(). +enum dtTileFlags +{ + /// The navigation mesh owns the tile memory and is responsible for freeing it. + DT_TILE_FREE_DATA = 0x01, +}; + +/// Vertex flags returned by dtNavMeshQuery::findStraightPath. +enum dtStraightPathFlags +{ + DT_STRAIGHTPATH_START = 0x01, ///< The vertex is the start position in the path. + DT_STRAIGHTPATH_END = 0x02, ///< The vertex is the end position in the path. + DT_STRAIGHTPATH_OFFMESH_CONNECTION = 0x04, ///< The vertex is the start of an off-mesh connection. +}; + +/// Options for dtNavMeshQuery::findStraightPath. +enum dtStraightPathOptions +{ + DT_STRAIGHTPATH_AREA_CROSSINGS = 0x01, ///< Add a vertex at every polygon edge crossing where area changes. + DT_STRAIGHTPATH_ALL_CROSSINGS = 0x02, ///< Add a vertex at every polygon edge crossing. +}; + + +/// Options for dtNavMeshQuery::initSlicedFindPath and updateSlicedFindPath +enum dtFindPathOptions +{ + DT_FINDPATH_ANY_ANGLE = 0x02, ///< use raycasts during pathfind to "shortcut" (raycast still consider costs) +}; + +/// Options for dtNavMeshQuery::raycast +enum dtRaycastOptions +{ + DT_RAYCAST_USE_COSTS = 0x01, ///< Raycast should calculate movement cost along the ray and fill RaycastHit::cost +}; + + +/// Limit raycasting during any angle pahfinding +/// The limit is given as a multiple of the character radius +static const float DT_RAY_CAST_LIMIT_PROPORTIONS = 50.0f; + +/// Flags representing the type of a navigation mesh polygon. +enum dtPolyTypes +{ + /// The polygon is a standard convex polygon that is part of the surface of the mesh. + DT_POLYTYPE_GROUND = 0, + /// The polygon is an off-mesh connection consisting of two vertices. + DT_POLYTYPE_OFFMESH_CONNECTION = 1, +}; + + +/// Defines a polygon within a dtMeshTile object. +/// @ingroup detour +struct dtPoly +{ + /// Index to first link in linked list. (Or #DT_NULL_LINK if there is no link.) + unsigned int firstLink; + + /// The indices of the polygon's vertices. + /// The actual vertices are located in dtMeshTile::verts. + unsigned short verts[DT_VERTS_PER_POLYGON]; + + /// Packed data representing neighbor polygons references and flags for each edge. + unsigned short neis[DT_VERTS_PER_POLYGON]; + + /// The user defined polygon flags. + unsigned short flags; + + /// The number of vertices in the polygon. + unsigned char vertCount; + + /// The bit packed area id and polygon type. + /// @note Use the structure's set and get methods to acess this value. + unsigned char areaAndtype; + + /// Sets the user defined area id. [Limit: < #DT_MAX_AREAS] + inline void setArea(unsigned char a) { areaAndtype = (areaAndtype & 0xc0) | (a & 0x3f); } + + /// Sets the polygon type. (See: #dtPolyTypes.) + inline void setType(unsigned char t) { areaAndtype = (areaAndtype & 0x3f) | (t << 6); } + + /// Gets the user defined area id. + inline unsigned char getArea() const { return areaAndtype & 0x3f; } + + /// Gets the polygon type. (See: #dtPolyTypes) + inline unsigned char getType() const { return areaAndtype >> 6; } +}; + +/// Defines the location of detail sub-mesh data within a dtMeshTile. +struct dtPolyDetail +{ + unsigned int vertBase; ///< The offset of the vertices in the dtMeshTile::detailVerts array. + unsigned int triBase; ///< The offset of the triangles in the dtMeshTile::detailTris array. + unsigned char vertCount; ///< The number of vertices in the sub-mesh. + unsigned char triCount; ///< The number of triangles in the sub-mesh. +}; + +/// Defines a link between polygons. +/// @note This structure is rarely if ever used by the end user. +/// @see dtMeshTile +struct dtLink +{ + dtPolyRef ref; ///< Neighbour reference. (The neighbor that is linked to.) + unsigned int next; ///< Index of the next link. + unsigned char edge; ///< Index of the polygon edge that owns this link. + unsigned char side; ///< If a boundary link, defines on which side the link is. + unsigned char bmin; ///< If a boundary link, defines the minimum sub-edge area. + unsigned char bmax; ///< If a boundary link, defines the maximum sub-edge area. +}; + +/// Bounding volume node. +/// @note This structure is rarely if ever used by the end user. +/// @see dtMeshTile +struct dtBVNode +{ + unsigned short bmin[3]; ///< Minimum bounds of the node's AABB. [(x, y, z)] + unsigned short bmax[3]; ///< Maximum bounds of the node's AABB. [(x, y, z)] + int i; ///< The node's index. (Negative for escape sequence.) +}; + +/// Defines an navigation mesh off-mesh connection within a dtMeshTile object. +/// An off-mesh connection is a user defined traversable connection made up to two vertices. +struct dtOffMeshConnection +{ + /// The endpoints of the connection. [(ax, ay, az, bx, by, bz)] + float pos[6]; + + /// The radius of the endpoints. [Limit: >= 0] + float rad; + + /// The polygon reference of the connection within the tile. + unsigned short poly; + + /// Link flags. + /// @note These are not the connection's user defined flags. Those are assigned via the + /// connection's dtPoly definition. These are link flags used for internal purposes. + unsigned char flags; + + /// End point side. + unsigned char side; + + /// The id of the offmesh connection. (User assigned when the navigation mesh is built.) + unsigned int userId; +}; + +/// Provides high level information related to a dtMeshTile object. +/// @ingroup detour +struct dtMeshHeader +{ + int magic; ///< Tile magic number. (Used to identify the data format.) + int version; ///< Tile data format version number. + int x; ///< The x-position of the tile within the dtNavMesh tile grid. (x, y, layer) + int y; ///< The y-position of the tile within the dtNavMesh tile grid. (x, y, layer) + int layer; ///< The layer of the tile within the dtNavMesh tile grid. (x, y, layer) + unsigned int userId; ///< The user defined id of the tile. + int polyCount; ///< The number of polygons in the tile. + int vertCount; ///< The number of vertices in the tile. + int maxLinkCount; ///< The number of allocated links. + int detailMeshCount; ///< The number of sub-meshes in the detail mesh. + + /// The number of unique vertices in the detail mesh. (In addition to the polygon vertices.) + int detailVertCount; + + int detailTriCount; ///< The number of triangles in the detail mesh. + int bvNodeCount; ///< The number of bounding volume nodes. (Zero if bounding volumes are disabled.) + int offMeshConCount; ///< The number of off-mesh connections. + int offMeshBase; ///< The index of the first polygon which is an off-mesh connection. + float walkableHeight; ///< The height of the agents using the tile. + float walkableRadius; ///< The radius of the agents using the tile. + float walkableClimb; ///< The maximum climb height of the agents using the tile. + float bmin[3]; ///< The minimum bounds of the tile's AABB. [(x, y, z)] + float bmax[3]; ///< The maximum bounds of the tile's AABB. [(x, y, z)] + + /// The bounding volume quantization factor. + float bvQuantFactor; +}; + +/// Defines a navigation mesh tile. +/// @ingroup detour +struct dtMeshTile +{ + unsigned int salt; ///< Counter describing modifications to the tile. + + unsigned int linksFreeList; ///< Index to the next free link. + dtMeshHeader* header; ///< The tile header. + dtPoly* polys; ///< The tile polygons. [Size: dtMeshHeader::polyCount] + float* verts; ///< The tile vertices. [Size: dtMeshHeader::vertCount] + dtLink* links; ///< The tile links. [Size: dtMeshHeader::maxLinkCount] + dtPolyDetail* detailMeshes; ///< The tile's detail sub-meshes. [Size: dtMeshHeader::detailMeshCount] + + /// The detail mesh's unique vertices. [(x, y, z) * dtMeshHeader::detailVertCount] + float* detailVerts; + + /// The detail mesh's triangles. [(vertA, vertB, vertC) * dtMeshHeader::detailTriCount] + unsigned char* detailTris; + + /// The tile bounding volume nodes. [Size: dtMeshHeader::bvNodeCount] + /// (Will be null if bounding volumes are disabled.) + dtBVNode* bvTree; + + dtOffMeshConnection* offMeshCons; ///< The tile off-mesh connections. [Size: dtMeshHeader::offMeshConCount] + + unsigned char* data; ///< The tile data. (Not directly accessed under normal situations.) + int dataSize; ///< Size of the tile data. + int flags; ///< Tile flags. (See: #dtTileFlags) + dtMeshTile* next; ///< The next free tile, or the next tile in the spatial grid. +private: + dtMeshTile(const dtMeshTile&); + dtMeshTile& operator=(const dtMeshTile&); +}; + +/// Configuration parameters used to define multi-tile navigation meshes. +/// The values are used to allocate space during the initialization of a navigation mesh. +/// @see dtNavMesh::init() +/// @ingroup detour +struct dtNavMeshParams +{ + float orig[3]; ///< The world space origin of the navigation mesh's tile space. [(x, y, z)] + float tileWidth; ///< The width of each tile. (Along the x-axis.) + float tileHeight; ///< The height of each tile. (Along the z-axis.) + int maxTiles; ///< The maximum number of tiles the navigation mesh can contain. + int maxPolys; ///< The maximum number of polygons each tile can contain. +}; + +/// A navigation mesh based on tiles of convex polygons. +/// @ingroup detour +class dtNavMesh +{ +public: + dtNavMesh(); + ~dtNavMesh(); + + /// @{ + /// @name Initialization and Tile Management + + /// Initializes the navigation mesh for tiled use. + /// @param[in] params Initialization parameters. + /// @return The status flags for the operation. + dtStatus init(const dtNavMeshParams* params); + + /// Initializes the navigation mesh for single tile use. + /// @param[in] data Data of the new tile. (See: #dtCreateNavMeshData) + /// @param[in] dataSize The data size of the new tile. + /// @param[in] flags The tile flags. (See: #dtTileFlags) + /// @return The status flags for the operation. + /// @see dtCreateNavMeshData + dtStatus init(unsigned char* data, const int dataSize, const int flags); + + /// The navigation mesh initialization params. + const dtNavMeshParams* getParams() const; + + /// Adds a tile to the navigation mesh. + /// @param[in] data Data for the new tile mesh. (See: #dtCreateNavMeshData) + /// @param[in] dataSize Data size of the new tile mesh. + /// @param[in] flags Tile flags. (See: #dtTileFlags) + /// @param[in] lastRef The desired reference for the tile. (When reloading a tile.) [opt] [Default: 0] + /// @param[out] result The tile reference. (If the tile was succesfully added.) [opt] + /// @return The status flags for the operation. + dtStatus addTile(unsigned char* data, int dataSize, int flags, dtTileRef lastRef, dtTileRef* result); + + /// Removes the specified tile from the navigation mesh. + /// @param[in] ref The reference of the tile to remove. + /// @param[out] data Data associated with deleted tile. + /// @param[out] dataSize Size of the data associated with deleted tile. + /// @return The status flags for the operation. + dtStatus removeTile(dtTileRef ref, unsigned char** data, int* dataSize); + + /// @} + + /// @{ + /// @name Query Functions + + /// Calculates the tile grid location for the specified world position. + /// @param[in] pos The world position for the query. [(x, y, z)] + /// @param[out] tx The tile's x-location. (x, y) + /// @param[out] ty The tile's y-location. (x, y) + void calcTileLoc(const float* pos, int* tx, int* ty) const; + + /// Gets the tile at the specified grid location. + /// @param[in] x The tile's x-location. (x, y, layer) + /// @param[in] y The tile's y-location. (x, y, layer) + /// @param[in] layer The tile's layer. (x, y, layer) + /// @return The tile, or null if the tile does not exist. + const dtMeshTile* getTileAt(const int x, const int y, const int layer) const; + + /// Gets all tiles at the specified grid location. (All layers.) + /// @param[in] x The tile's x-location. (x, y) + /// @param[in] y The tile's y-location. (x, y) + /// @param[out] tiles A pointer to an array of tiles that will hold the result. + /// @param[in] maxTiles The maximum tiles the tiles parameter can hold. + /// @return The number of tiles returned in the tiles array. + int getTilesAt(const int x, const int y, + dtMeshTile const** tiles, const int maxTiles) const; + + /// Gets the tile reference for the tile at specified grid location. + /// @param[in] x The tile's x-location. (x, y, layer) + /// @param[in] y The tile's y-location. (x, y, layer) + /// @param[in] layer The tile's layer. (x, y, layer) + /// @return The tile reference of the tile, or 0 if there is none. + dtTileRef getTileRefAt(int x, int y, int layer) const; + + /// Gets the tile reference for the specified tile. + /// @param[in] tile The tile. + /// @return The tile reference of the tile. + dtTileRef getTileRef(const dtMeshTile* tile) const; + + /// Gets the tile for the specified tile reference. + /// @param[in] ref The tile reference of the tile to retrieve. + /// @return The tile for the specified reference, or null if the + /// reference is invalid. + const dtMeshTile* getTileByRef(dtTileRef ref) const; + + /// The maximum number of tiles supported by the navigation mesh. + /// @return The maximum number of tiles supported by the navigation mesh. + int getMaxTiles() const; + + /// Gets the tile at the specified index. + /// @param[in] i The tile index. [Limit: 0 >= index < #getMaxTiles()] + /// @return The tile at the specified index. + const dtMeshTile* getTile(int i) const; + + /// Gets the tile and polygon for the specified polygon reference. + /// @param[in] ref The reference for the a polygon. + /// @param[out] tile The tile containing the polygon. + /// @param[out] poly The polygon. + /// @return The status flags for the operation. + dtStatus getTileAndPolyByRef(const dtPolyRef ref, const dtMeshTile** tile, const dtPoly** poly) const; + + /// Returns the tile and polygon for the specified polygon reference. + /// @param[in] ref A known valid reference for a polygon. + /// @param[out] tile The tile containing the polygon. + /// @param[out] poly The polygon. + void getTileAndPolyByRefUnsafe(const dtPolyRef ref, const dtMeshTile** tile, const dtPoly** poly) const; + + /// Checks the validity of a polygon reference. + /// @param[in] ref The polygon reference to check. + /// @return True if polygon reference is valid for the navigation mesh. + bool isValidPolyRef(dtPolyRef ref) const; + + /// Gets the polygon reference for the tile's base polygon. + /// @param[in] tile The tile. + /// @return The polygon reference for the base polygon in the specified tile. + dtPolyRef getPolyRefBase(const dtMeshTile* tile) const; + + /// Gets the endpoints for an off-mesh connection, ordered by "direction of travel". + /// @param[in] prevRef The reference of the polygon before the connection. + /// @param[in] polyRef The reference of the off-mesh connection polygon. + /// @param[out] startPos The start position of the off-mesh connection. [(x, y, z)] + /// @param[out] endPos The end position of the off-mesh connection. [(x, y, z)] + /// @return The status flags for the operation. + dtStatus getOffMeshConnectionPolyEndPoints(dtPolyRef prevRef, dtPolyRef polyRef, float* startPos, float* endPos) const; + + /// Gets the specified off-mesh connection. + /// @param[in] ref The polygon reference of the off-mesh connection. + /// @return The specified off-mesh connection, or null if the polygon reference is not valid. + const dtOffMeshConnection* getOffMeshConnectionByRef(dtPolyRef ref) const; + + /// @} + + /// @{ + /// @name State Management + /// These functions do not effect #dtTileRef or #dtPolyRef's. + + /// Sets the user defined flags for the specified polygon. + /// @param[in] ref The polygon reference. + /// @param[in] flags The new flags for the polygon. + /// @return The status flags for the operation. + dtStatus setPolyFlags(dtPolyRef ref, unsigned short flags); + + /// Gets the user defined flags for the specified polygon. + /// @param[in] ref The polygon reference. + /// @param[out] resultFlags The polygon flags. + /// @return The status flags for the operation. + dtStatus getPolyFlags(dtPolyRef ref, unsigned short* resultFlags) const; + + /// Sets the user defined area for the specified polygon. + /// @param[in] ref The polygon reference. + /// @param[in] area The new area id for the polygon. [Limit: < #DT_MAX_AREAS] + /// @return The status flags for the operation. + dtStatus setPolyArea(dtPolyRef ref, unsigned char area); + + /// Gets the user defined area for the specified polygon. + /// @param[in] ref The polygon reference. + /// @param[out] resultArea The area id for the polygon. + /// @return The status flags for the operation. + dtStatus getPolyArea(dtPolyRef ref, unsigned char* resultArea) const; + + /// Gets the size of the buffer required by #storeTileState to store the specified tile's state. + /// @param[in] tile The tile. + /// @return The size of the buffer required to store the state. + int getTileStateSize(const dtMeshTile* tile) const; + + /// Stores the non-structural state of the tile in the specified buffer. (Flags, area ids, etc.) + /// @param[in] tile The tile. + /// @param[out] data The buffer to store the tile's state in. + /// @param[in] maxDataSize The size of the data buffer. [Limit: >= #getTileStateSize] + /// @return The status flags for the operation. + dtStatus storeTileState(const dtMeshTile* tile, unsigned char* data, const int maxDataSize) const; + + /// Restores the state of the tile. + /// @param[in] tile The tile. + /// @param[in] data The new state. (Obtained from #storeTileState.) + /// @param[in] maxDataSize The size of the state within the data buffer. + /// @return The status flags for the operation. + dtStatus restoreTileState(dtMeshTile* tile, const unsigned char* data, const int maxDataSize); + + /// @} + + /// @{ + /// @name Encoding and Decoding + /// These functions are generally meant for internal use only. + + /// Derives a standard polygon reference. + /// @note This function is generally meant for internal use only. + /// @param[in] salt The tile's salt value. + /// @param[in] it The index of the tile. + /// @param[in] ip The index of the polygon within the tile. + inline dtPolyRef encodePolyId(unsigned int salt, unsigned int it, unsigned int ip) const + { +#ifdef DT_POLYREF64 + return ((dtPolyRef)salt << (DT_POLY_BITS+DT_TILE_BITS)) | ((dtPolyRef)it << DT_POLY_BITS) | (dtPolyRef)ip; +#else + return ((dtPolyRef)salt << (m_polyBits+m_tileBits)) | ((dtPolyRef)it << m_polyBits) | (dtPolyRef)ip; +#endif + } + + /// Decodes a standard polygon reference. + /// @note This function is generally meant for internal use only. + /// @param[in] ref The polygon reference to decode. + /// @param[out] salt The tile's salt value. + /// @param[out] it The index of the tile. + /// @param[out] ip The index of the polygon within the tile. + /// @see #encodePolyId + inline void decodePolyId(dtPolyRef ref, unsigned int& salt, unsigned int& it, unsigned int& ip) const + { +#ifdef DT_POLYREF64 + const dtPolyRef saltMask = ((dtPolyRef)1<> (DT_POLY_BITS+DT_TILE_BITS)) & saltMask); + it = (unsigned int)((ref >> DT_POLY_BITS) & tileMask); + ip = (unsigned int)(ref & polyMask); +#else + const dtPolyRef saltMask = ((dtPolyRef)1<> (m_polyBits+m_tileBits)) & saltMask); + it = (unsigned int)((ref >> m_polyBits) & tileMask); + ip = (unsigned int)(ref & polyMask); +#endif + } + + /// Extracts a tile's salt value from the specified polygon reference. + /// @note This function is generally meant for internal use only. + /// @param[in] ref The polygon reference. + /// @see #encodePolyId + inline unsigned int decodePolyIdSalt(dtPolyRef ref) const + { +#ifdef DT_POLYREF64 + const dtPolyRef saltMask = ((dtPolyRef)1<> (DT_POLY_BITS+DT_TILE_BITS)) & saltMask); +#else + const dtPolyRef saltMask = ((dtPolyRef)1<> (m_polyBits+m_tileBits)) & saltMask); +#endif + } + + /// Extracts the tile's index from the specified polygon reference. + /// @note This function is generally meant for internal use only. + /// @param[in] ref The polygon reference. + /// @see #encodePolyId + inline unsigned int decodePolyIdTile(dtPolyRef ref) const + { +#ifdef DT_POLYREF64 + const dtPolyRef tileMask = ((dtPolyRef)1<> DT_POLY_BITS) & tileMask); +#else + const dtPolyRef tileMask = ((dtPolyRef)1<> m_polyBits) & tileMask); +#endif + } + + /// Extracts the polygon's index (within its tile) from the specified polygon reference. + /// @note This function is generally meant for internal use only. + /// @param[in] ref The polygon reference. + /// @see #encodePolyId + inline unsigned int decodePolyIdPoly(dtPolyRef ref) const + { +#ifdef DT_POLYREF64 + const dtPolyRef polyMask = ((dtPolyRef)1<header->bvQuantFactor; +const dtBVNode* n = &tile->bvTree[i]; +if (n->i >= 0) +{ + // This is a leaf node. + float worldMinX = tile->header->bmin[0] + n->bmin[0]*cs; + float worldMinY = tile->header->bmin[0] + n->bmin[1]*cs; + // Etc... +} +@endcode + +@struct dtMeshTile +@par + +Tiles generally only exist within the context of a dtNavMesh object. + +Some tile content is optional. For example, a tile may not contain any +off-mesh connections. In this case the associated pointer will be null. + +If a detail mesh exists it will share vertices with the base polygon mesh. +Only the vertices unique to the detail mesh will be stored in #detailVerts. + +@warning Tiles returned by a dtNavMesh object are not guarenteed to be populated. +For example: The tile at a location might not have been loaded yet, or may have been removed. +In this case, pointers will be null. So if in doubt, check the polygon count in the +tile's header to determine if a tile has polygons defined. + +@var float dtOffMeshConnection::pos[6] +@par + +For a properly built navigation mesh, vertex A will always be within the bounds of the mesh. +Vertex B is not required to be within the bounds of the mesh. + +*/ diff --git a/libs/recast/detour/include/DetourNavMeshBuilder.h b/libs/recast/detour/include/DetourNavMeshBuilder.h new file mode 100644 index 000000000..9425a7a78 --- /dev/null +++ b/libs/recast/detour/include/DetourNavMeshBuilder.h @@ -0,0 +1,149 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#ifndef DETOURNAVMESHBUILDER_H +#define DETOURNAVMESHBUILDER_H + +#include "DetourAlloc.h" + +/// Represents the source data used to build an navigation mesh tile. +/// @ingroup detour +struct dtNavMeshCreateParams +{ + + /// @name Polygon Mesh Attributes + /// Used to create the base navigation graph. + /// See #rcPolyMesh for details related to these attributes. + /// @{ + + const unsigned short* verts; ///< The polygon mesh vertices. [(x, y, z) * #vertCount] [Unit: vx] + int vertCount; ///< The number vertices in the polygon mesh. [Limit: >= 3] + const unsigned short* polys; ///< The polygon data. [Size: #polyCount * 2 * #nvp] + const unsigned short* polyFlags; ///< The user defined flags assigned to each polygon. [Size: #polyCount] + const unsigned char* polyAreas; ///< The user defined area ids assigned to each polygon. [Size: #polyCount] + int polyCount; ///< Number of polygons in the mesh. [Limit: >= 1] + int nvp; ///< Number maximum number of vertices per polygon. [Limit: >= 3] + + /// @} + /// @name Height Detail Attributes (Optional) + /// See #rcPolyMeshDetail for details related to these attributes. + /// @{ + + const unsigned int* detailMeshes; ///< The height detail sub-mesh data. [Size: 4 * #polyCount] + const float* detailVerts; ///< The detail mesh vertices. [Size: 3 * #detailVertsCount] [Unit: wu] + int detailVertsCount; ///< The number of vertices in the detail mesh. + const unsigned char* detailTris; ///< The detail mesh triangles. [Size: 4 * #detailTriCount] + int detailTriCount; ///< The number of triangles in the detail mesh. + + /// @} + /// @name Off-Mesh Connections Attributes (Optional) + /// Used to define a custom point-to-point edge within the navigation graph, an + /// off-mesh connection is a user defined traversable connection made up to two vertices, + /// at least one of which resides within a navigation mesh polygon. + /// @{ + + /// Off-mesh connection vertices. [(ax, ay, az, bx, by, bz) * #offMeshConCount] [Unit: wu] + const float* offMeshConVerts; + /// Off-mesh connection radii. [Size: #offMeshConCount] [Unit: wu] + const float* offMeshConRad; + /// User defined flags assigned to the off-mesh connections. [Size: #offMeshConCount] + const unsigned short* offMeshConFlags; + /// User defined area ids assigned to the off-mesh connections. [Size: #offMeshConCount] + const unsigned char* offMeshConAreas; + /// The permitted travel direction of the off-mesh connections. [Size: #offMeshConCount] + /// + /// 0 = Travel only from endpoint A to endpoint B.
+ /// #DT_OFFMESH_CON_BIDIR = Bidirectional travel. + const unsigned char* offMeshConDir; + /// The user defined ids of the off-mesh connection. [Size: #offMeshConCount] + const unsigned int* offMeshConUserID; + /// The number of off-mesh connections. [Limit: >= 0] + int offMeshConCount; + + /// @} + /// @name Tile Attributes + /// @note The tile grid/layer data can be left at zero if the destination is a single tile mesh. + /// @{ + + unsigned int userId; ///< The user defined id of the tile. + int tileX; ///< The tile's x-grid location within the multi-tile destination mesh. (Along the x-axis.) + int tileY; ///< The tile's y-grid location within the multi-tile desitation mesh. (Along the z-axis.) + int tileLayer; ///< The tile's layer within the layered destination mesh. [Limit: >= 0] (Along the y-axis.) + float bmin[3]; ///< The minimum bounds of the tile. [(x, y, z)] [Unit: wu] + float bmax[3]; ///< The maximum bounds of the tile. [(x, y, z)] [Unit: wu] + + /// @} + /// @name General Configuration Attributes + /// @{ + + float walkableHeight; ///< The agent height. [Unit: wu] + float walkableRadius; ///< The agent radius. [Unit: wu] + float walkableClimb; ///< The agent maximum traversable ledge. (Up/Down) [Unit: wu] + float cs; ///< The xz-plane cell size of the polygon mesh. [Limit: > 0] [Unit: wu] + float ch; ///< The y-axis cell height of the polygon mesh. [Limit: > 0] [Unit: wu] + + /// True if a bounding volume tree should be built for the tile. + /// @note The BVTree is not normally needed for layered navigation meshes. + bool buildBvTree; + + /// @} +}; + +/// Builds navigation mesh tile data from the provided tile creation data. +/// @ingroup detour +/// @param[in] params Tile creation data. +/// @param[out] outData The resulting tile data. +/// @param[out] outDataSize The size of the tile data array. +/// @return True if the tile data was successfully created. +bool dtCreateNavMeshData(dtNavMeshCreateParams* params, unsigned char** outData, int* outDataSize); + +/// Swaps the endianess of the tile data's header (#dtMeshHeader). +/// @param[in,out] data The tile data array. +/// @param[in] dataSize The size of the data array. +bool dtNavMeshHeaderSwapEndian(unsigned char* data, const int dataSize); + +/// Swaps endianess of the tile data. +/// @param[in,out] data The tile data array. +/// @param[in] dataSize The size of the data array. +bool dtNavMeshDataSwapEndian(unsigned char* data, const int dataSize); + +#endif // DETOURNAVMESHBUILDER_H + +// This section contains detailed documentation for members that don't have +// a source file. It reduces clutter in the main section of the header. + +/** + +@struct dtNavMeshCreateParams +@par + +This structure is used to marshal data between the Recast mesh generation pipeline and Detour navigation components. + +See the rcPolyMesh and rcPolyMeshDetail documentation for detailed information related to mesh structure. + +Units are usually in voxels (vx) or world units (wu). The units for voxels, grid size, and cell size +are all based on the values of #cs and #ch. + +The standard navigation mesh build process is to create tile data using dtCreateNavMeshData, then add the tile +to a navigation mesh using either the dtNavMesh single tile init() function or the dtNavMesh::addTile() +function. + +@see dtCreateNavMeshData + +*/ + diff --git a/libs/recast/detour/include/DetourNavMeshQuery.h b/libs/recast/detour/include/DetourNavMeshQuery.h new file mode 100644 index 000000000..61541e83d --- /dev/null +++ b/libs/recast/detour/include/DetourNavMeshQuery.h @@ -0,0 +1,575 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#ifndef DETOURNAVMESHQUERY_H +#define DETOURNAVMESHQUERY_H + +#include "DetourNavMesh.h" +#include "DetourStatus.h" + + +// Define DT_VIRTUAL_QUERYFILTER if you wish to derive a custom filter from dtQueryFilter. +// On certain platforms indirect or virtual function call is expensive. The default +// setting is to use non-virtual functions, the actual implementations of the functions +// are declared as inline for maximum speed. + +//#define DT_VIRTUAL_QUERYFILTER 1 + +/// Defines polygon filtering and traversal costs for navigation mesh query operations. +/// @ingroup detour +class dtQueryFilter +{ + float m_areaCost[DT_MAX_AREAS]; ///< Cost per area type. (Used by default implementation.) + unsigned short m_includeFlags; ///< Flags for polygons that can be visited. (Used by default implementation.) + unsigned short m_excludeFlags; ///< Flags for polygons that should not be visted. (Used by default implementation.) + +public: + dtQueryFilter(); + +#ifdef DT_VIRTUAL_QUERYFILTER + virtual ~dtQueryFilter() { } +#endif + + /// Returns true if the polygon can be visited. (I.e. Is traversable.) + /// @param[in] ref The reference id of the polygon test. + /// @param[in] tile The tile containing the polygon. + /// @param[in] poly The polygon to test. +#ifdef DT_VIRTUAL_QUERYFILTER + virtual bool passFilter(const dtPolyRef ref, + const dtMeshTile* tile, + const dtPoly* poly) const; +#else + bool passFilter(const dtPolyRef ref, + const dtMeshTile* tile, + const dtPoly* poly) const; +#endif + + /// Returns cost to move from the beginning to the end of a line segment + /// that is fully contained within a polygon. + /// @param[in] pa The start position on the edge of the previous and current polygon. [(x, y, z)] + /// @param[in] pb The end position on the edge of the current and next polygon. [(x, y, z)] + /// @param[in] prevRef The reference id of the previous polygon. [opt] + /// @param[in] prevTile The tile containing the previous polygon. [opt] + /// @param[in] prevPoly The previous polygon. [opt] + /// @param[in] curRef The reference id of the current polygon. + /// @param[in] curTile The tile containing the current polygon. + /// @param[in] curPoly The current polygon. + /// @param[in] nextRef The refernece id of the next polygon. [opt] + /// @param[in] nextTile The tile containing the next polygon. [opt] + /// @param[in] nextPoly The next polygon. [opt] +#ifdef DT_VIRTUAL_QUERYFILTER + virtual float getCost(const float* pa, const float* pb, + const dtPolyRef prevRef, const dtMeshTile* prevTile, const dtPoly* prevPoly, + const dtPolyRef curRef, const dtMeshTile* curTile, const dtPoly* curPoly, + const dtPolyRef nextRef, const dtMeshTile* nextTile, const dtPoly* nextPoly) const; +#else + float getCost(const float* pa, const float* pb, + const dtPolyRef prevRef, const dtMeshTile* prevTile, const dtPoly* prevPoly, + const dtPolyRef curRef, const dtMeshTile* curTile, const dtPoly* curPoly, + const dtPolyRef nextRef, const dtMeshTile* nextTile, const dtPoly* nextPoly) const; +#endif + + /// @name Getters and setters for the default implementation data. + ///@{ + + /// Returns the traversal cost of the area. + /// @param[in] i The id of the area. + /// @returns The traversal cost of the area. + inline float getAreaCost(const int i) const { return m_areaCost[i]; } + + /// Sets the traversal cost of the area. + /// @param[in] i The id of the area. + /// @param[in] cost The new cost of traversing the area. + inline void setAreaCost(const int i, const float cost) { m_areaCost[i] = cost; } + + /// Returns the include flags for the filter. + /// Any polygons that include one or more of these flags will be + /// included in the operation. + inline unsigned short getIncludeFlags() const { return m_includeFlags; } + + /// Sets the include flags for the filter. + /// @param[in] flags The new flags. + inline void setIncludeFlags(const unsigned short flags) { m_includeFlags = flags; } + + /// Returns the exclude flags for the filter. + /// Any polygons that include one ore more of these flags will be + /// excluded from the operation. + inline unsigned short getExcludeFlags() const { return m_excludeFlags; } + + /// Sets the exclude flags for the filter. + /// @param[in] flags The new flags. + inline void setExcludeFlags(const unsigned short flags) { m_excludeFlags = flags; } + + ///@} + +}; + + + +/// Provides information about raycast hit +/// filled by dtNavMeshQuery::raycast +/// @ingroup detour +struct dtRaycastHit +{ + /// The hit parameter. (FLT_MAX if no wall hit.) + float t; + + /// hitNormal The normal of the nearest wall hit. [(x, y, z)] + float hitNormal[3]; + + /// The index of the edge on the final polygon where the wall was hit. + int hitEdgeIndex; + + /// Pointer to an array of reference ids of the visited polygons. [opt] + dtPolyRef* path; + + /// The number of visited polygons. [opt] + int pathCount; + + /// The maximum number of polygons the @p path array can hold. + int maxPath; + + /// The cost of the path until hit. + float pathCost; +}; + +/// Provides custom polygon query behavior. +/// Used by dtNavMeshQuery::queryPolygons. +/// @ingroup detour +class dtPolyQuery +{ +public: + virtual ~dtPolyQuery() { } + + /// Called for each batch of unique polygons touched by the search area in dtNavMeshQuery::queryPolygons. + /// This can be called multiple times for a single query. + virtual void process(const dtMeshTile* tile, dtPoly** polys, dtPolyRef* refs, int count) = 0; +}; + +/// Provides the ability to perform pathfinding related queries against +/// a navigation mesh. +/// @ingroup detour +class dtNavMeshQuery +{ +public: + dtNavMeshQuery(); + ~dtNavMeshQuery(); + + /// Initializes the query object. + /// @param[in] nav Pointer to the dtNavMesh object to use for all queries. + /// @param[in] maxNodes Maximum number of search nodes. [Limits: 0 < value <= 65535] + /// @returns The status flags for the query. + dtStatus init(const dtNavMesh* nav, const int maxNodes); + + /// @name Standard Pathfinding Functions + // /@{ + + /// Finds a path from the start polygon to the end polygon. + /// @param[in] startRef The refrence id of the start polygon. + /// @param[in] endRef The reference id of the end polygon. + /// @param[in] startPos A position within the start polygon. [(x, y, z)] + /// @param[in] endPos A position within the end polygon. [(x, y, z)] + /// @param[in] filter The polygon filter to apply to the query. + /// @param[out] path An ordered list of polygon references representing the path. (Start to end.) + /// [(polyRef) * @p pathCount] + /// @param[out] pathCount The number of polygons returned in the @p path array. + /// @param[in] maxPath The maximum number of polygons the @p path array can hold. [Limit: >= 1] + dtStatus findPath(dtPolyRef startRef, dtPolyRef endRef, + const float* startPos, const float* endPos, + const dtQueryFilter* filter, + dtPolyRef* path, int* pathCount, const int maxPath) const; + + /// Finds the straight path from the start to the end position within the polygon corridor. + /// @param[in] startPos Path start position. [(x, y, z)] + /// @param[in] endPos Path end position. [(x, y, z)] + /// @param[in] path An array of polygon references that represent the path corridor. + /// @param[in] pathSize The number of polygons in the @p path array. + /// @param[out] straightPath Points describing the straight path. [(x, y, z) * @p straightPathCount]. + /// @param[out] straightPathFlags Flags describing each point. (See: #dtStraightPathFlags) [opt] + /// @param[out] straightPathRefs The reference id of the polygon that is being entered at each point. [opt] + /// @param[out] straightPathCount The number of points in the straight path. + /// @param[in] maxStraightPath The maximum number of points the straight path arrays can hold. [Limit: > 0] + /// @param[in] options Query options. (see: #dtStraightPathOptions) + /// @returns The status flags for the query. + dtStatus findStraightPath(const float* startPos, const float* endPos, + const dtPolyRef* path, const int pathSize, + float* straightPath, unsigned char* straightPathFlags, dtPolyRef* straightPathRefs, + int* straightPathCount, const int maxStraightPath, const int options = 0) const; + + ///@} + /// @name Sliced Pathfinding Functions + /// Common use case: + /// -# Call initSlicedFindPath() to initialize the sliced path query. + /// -# Call updateSlicedFindPath() until it returns complete. + /// -# Call finalizeSlicedFindPath() to get the path. + ///@{ + + /// Intializes a sliced path query. + /// @param[in] startRef The refrence id of the start polygon. + /// @param[in] endRef The reference id of the end polygon. + /// @param[in] startPos A position within the start polygon. [(x, y, z)] + /// @param[in] endPos A position within the end polygon. [(x, y, z)] + /// @param[in] filter The polygon filter to apply to the query. + /// @param[in] options query options (see: #dtFindPathOptions) + /// @returns The status flags for the query. + dtStatus initSlicedFindPath(dtPolyRef startRef, dtPolyRef endRef, + const float* startPos, const float* endPos, + const dtQueryFilter* filter, const unsigned int options = 0); + + /// Updates an in-progress sliced path query. + /// @param[in] maxIter The maximum number of iterations to perform. + /// @param[out] doneIters The actual number of iterations completed. [opt] + /// @returns The status flags for the query. + dtStatus updateSlicedFindPath(const int maxIter, int* doneIters); + + /// Finalizes and returns the results of a sliced path query. + /// @param[out] path An ordered list of polygon references representing the path. (Start to end.) + /// [(polyRef) * @p pathCount] + /// @param[out] pathCount The number of polygons returned in the @p path array. + /// @param[in] maxPath The max number of polygons the path array can hold. [Limit: >= 1] + /// @returns The status flags for the query. + dtStatus finalizeSlicedFindPath(dtPolyRef* path, int* pathCount, const int maxPath); + + /// Finalizes and returns the results of an incomplete sliced path query, returning the path to the furthest + /// polygon on the existing path that was visited during the search. + /// @param[in] existing An array of polygon references for the existing path. + /// @param[in] existingSize The number of polygon in the @p existing array. + /// @param[out] path An ordered list of polygon references representing the path. (Start to end.) + /// [(polyRef) * @p pathCount] + /// @param[out] pathCount The number of polygons returned in the @p path array. + /// @param[in] maxPath The max number of polygons the @p path array can hold. [Limit: >= 1] + /// @returns The status flags for the query. + dtStatus finalizeSlicedFindPathPartial(const dtPolyRef* existing, const int existingSize, + dtPolyRef* path, int* pathCount, const int maxPath); + + ///@} + /// @name Dijkstra Search Functions + /// @{ + + /// Finds the polygons along the navigation graph that touch the specified circle. + /// @param[in] startRef The reference id of the polygon where the search starts. + /// @param[in] centerPos The center of the search circle. [(x, y, z)] + /// @param[in] radius The radius of the search circle. + /// @param[in] filter The polygon filter to apply to the query. + /// @param[out] resultRef The reference ids of the polygons touched by the circle. [opt] + /// @param[out] resultParent The reference ids of the parent polygons for each result. + /// Zero if a result polygon has no parent. [opt] + /// @param[out] resultCost The search cost from @p centerPos to the polygon. [opt] + /// @param[out] resultCount The number of polygons found. [opt] + /// @param[in] maxResult The maximum number of polygons the result arrays can hold. + /// @returns The status flags for the query. + dtStatus findPolysAroundCircle(dtPolyRef startRef, const float* centerPos, const float radius, + const dtQueryFilter* filter, + dtPolyRef* resultRef, dtPolyRef* resultParent, float* resultCost, + int* resultCount, const int maxResult) const; + + /// Finds the polygons along the naviation graph that touch the specified convex polygon. + /// @param[in] startRef The reference id of the polygon where the search starts. + /// @param[in] verts The vertices describing the convex polygon. (CCW) + /// [(x, y, z) * @p nverts] + /// @param[in] nverts The number of vertices in the polygon. + /// @param[in] filter The polygon filter to apply to the query. + /// @param[out] resultRef The reference ids of the polygons touched by the search polygon. [opt] + /// @param[out] resultParent The reference ids of the parent polygons for each result. Zero if a + /// result polygon has no parent. [opt] + /// @param[out] resultCost The search cost from the centroid point to the polygon. [opt] + /// @param[out] resultCount The number of polygons found. + /// @param[in] maxResult The maximum number of polygons the result arrays can hold. + /// @returns The status flags for the query. + dtStatus findPolysAroundShape(dtPolyRef startRef, const float* verts, const int nverts, + const dtQueryFilter* filter, + dtPolyRef* resultRef, dtPolyRef* resultParent, float* resultCost, + int* resultCount, const int maxResult) const; + + /// Gets a path from the explored nodes in the previous search. + /// @param[in] endRef The reference id of the end polygon. + /// @param[out] path An ordered list of polygon references representing the path. (Start to end.) + /// [(polyRef) * @p pathCount] + /// @param[out] pathCount The number of polygons returned in the @p path array. + /// @param[in] maxPath The maximum number of polygons the @p path array can hold. [Limit: >= 0] + /// @returns The status flags. Returns DT_FAILURE | DT_INVALID_PARAM if any parameter is wrong, or if + /// @p endRef was not explored in the previous search. Returns DT_SUCCESS | DT_BUFFER_TOO_SMALL + /// if @p path cannot contain the entire path. In this case it is filled to capacity with a partial path. + /// Otherwise returns DT_SUCCESS. + /// @remarks The result of this function depends on the state of the query object. For that reason it should only + /// be used immediately after one of the two Dijkstra searches, findPolysAroundCircle or findPolysAroundShape. + dtStatus getPathFromDijkstraSearch(dtPolyRef endRef, dtPolyRef* path, int* pathCount, int maxPath) const; + + /// @} + /// @name Local Query Functions + ///@{ + + /// Finds the polygon nearest to the specified center point. + /// @param[in] center The center of the search box. [(x, y, z)] + /// @param[in] extents The search distance along each axis. [(x, y, z)] + /// @param[in] filter The polygon filter to apply to the query. + /// @param[out] nearestRef The reference id of the nearest polygon. + /// @param[out] nearestPt The nearest point on the polygon. [opt] [(x, y, z)] + /// @returns The status flags for the query. + dtStatus findNearestPoly(const float* center, const float* extents, + const dtQueryFilter* filter, + dtPolyRef* nearestRef, float* nearestPt) const; + + /// Finds polygons that overlap the search box. + /// @param[in] center The center of the search box. [(x, y, z)] + /// @param[in] extents The search distance along each axis. [(x, y, z)] + /// @param[in] filter The polygon filter to apply to the query. + /// @param[out] polys The reference ids of the polygons that overlap the query box. + /// @param[out] polyCount The number of polygons in the search result. + /// @param[in] maxPolys The maximum number of polygons the search result can hold. + /// @returns The status flags for the query. + dtStatus queryPolygons(const float* center, const float* extents, + const dtQueryFilter* filter, + dtPolyRef* polys, int* polyCount, const int maxPolys) const; + + /// Finds polygons that overlap the search box. + /// @param[in] center The center of the search box. [(x, y, z)] + /// @param[in] extents The search distance along each axis. [(x, y, z)] + /// @param[in] filter The polygon filter to apply to the query. + /// @param[in] query The query. Polygons found will be batched together and passed to this query. + dtStatus queryPolygons(const float* center, const float* extents, + const dtQueryFilter* filter, dtPolyQuery* query) const; + + /// Finds the non-overlapping navigation polygons in the local neighbourhood around the center position. + /// @param[in] startRef The reference id of the polygon where the search starts. + /// @param[in] centerPos The center of the query circle. [(x, y, z)] + /// @param[in] radius The radius of the query circle. + /// @param[in] filter The polygon filter to apply to the query. + /// @param[out] resultRef The reference ids of the polygons touched by the circle. + /// @param[out] resultParent The reference ids of the parent polygons for each result. + /// Zero if a result polygon has no parent. [opt] + /// @param[out] resultCount The number of polygons found. + /// @param[in] maxResult The maximum number of polygons the result arrays can hold. + /// @returns The status flags for the query. + dtStatus findLocalNeighbourhood(dtPolyRef startRef, const float* centerPos, const float radius, + const dtQueryFilter* filter, + dtPolyRef* resultRef, dtPolyRef* resultParent, + int* resultCount, const int maxResult) const; + + /// Moves from the start to the end position constrained to the navigation mesh. + /// @param[in] startRef The reference id of the start polygon. + /// @param[in] startPos A position of the mover within the start polygon. [(x, y, x)] + /// @param[in] endPos The desired end position of the mover. [(x, y, z)] + /// @param[in] filter The polygon filter to apply to the query. + /// @param[out] resultPos The result position of the mover. [(x, y, z)] + /// @param[out] visited The reference ids of the polygons visited during the move. + /// @param[out] visitedCount The number of polygons visited during the move. + /// @param[in] maxVisitedSize The maximum number of polygons the @p visited array can hold. + /// @returns The status flags for the query. + dtStatus moveAlongSurface(dtPolyRef startRef, const float* startPos, const float* endPos, + const dtQueryFilter* filter, + float* resultPos, dtPolyRef* visited, int* visitedCount, const int maxVisitedSize) const; + + /// Casts a 'walkability' ray along the surface of the navigation mesh from + /// the start position toward the end position. + /// @note A wrapper around raycast(..., RaycastHit*). Retained for backward compatibility. + /// @param[in] startRef The reference id of the start polygon. + /// @param[in] startPos A position within the start polygon representing + /// the start of the ray. [(x, y, z)] + /// @param[in] endPos The position to cast the ray toward. [(x, y, z)] + /// @param[out] t The hit parameter. (FLT_MAX if no wall hit.) + /// @param[out] hitNormal The normal of the nearest wall hit. [(x, y, z)] + /// @param[in] filter The polygon filter to apply to the query. + /// @param[out] path The reference ids of the visited polygons. [opt] + /// @param[out] pathCount The number of visited polygons. [opt] + /// @param[in] maxPath The maximum number of polygons the @p path array can hold. + /// @returns The status flags for the query. + dtStatus raycast(dtPolyRef startRef, const float* startPos, const float* endPos, + const dtQueryFilter* filter, + float* t, float* hitNormal, dtPolyRef* path, int* pathCount, const int maxPath) const; + + /// Casts a 'walkability' ray along the surface of the navigation mesh from + /// the start position toward the end position. + /// @param[in] startRef The reference id of the start polygon. + /// @param[in] startPos A position within the start polygon representing + /// the start of the ray. [(x, y, z)] + /// @param[in] endPos The position to cast the ray toward. [(x, y, z)] + /// @param[in] filter The polygon filter to apply to the query. + /// @param[in] flags govern how the raycast behaves. See dtRaycastOptions + /// @param[out] hit Pointer to a raycast hit structure which will be filled by the results. + /// @param[in] prevRef parent of start ref. Used during for cost calculation [opt] + /// @returns The status flags for the query. + dtStatus raycast(dtPolyRef startRef, const float* startPos, const float* endPos, + const dtQueryFilter* filter, const unsigned int options, + dtRaycastHit* hit, dtPolyRef prevRef = 0) const; + + + /// Finds the distance from the specified position to the nearest polygon wall. + /// @param[in] startRef The reference id of the polygon containing @p centerPos. + /// @param[in] centerPos The center of the search circle. [(x, y, z)] + /// @param[in] maxRadius The radius of the search circle. + /// @param[in] filter The polygon filter to apply to the query. + /// @param[out] hitDist The distance to the nearest wall from @p centerPos. + /// @param[out] hitPos The nearest position on the wall that was hit. [(x, y, z)] + /// @param[out] hitNormal The normalized ray formed from the wall point to the + /// source point. [(x, y, z)] + /// @returns The status flags for the query. + dtStatus findDistanceToWall(dtPolyRef startRef, const float* centerPos, const float maxRadius, + const dtQueryFilter* filter, + float* hitDist, float* hitPos, float* hitNormal) const; + + /// Returns the segments for the specified polygon, optionally including portals. + /// @param[in] ref The reference id of the polygon. + /// @param[in] filter The polygon filter to apply to the query. + /// @param[out] segmentVerts The segments. [(ax, ay, az, bx, by, bz) * segmentCount] + /// @param[out] segmentRefs The reference ids of each segment's neighbor polygon. + /// Or zero if the segment is a wall. [opt] [(parentRef) * @p segmentCount] + /// @param[out] segmentCount The number of segments returned. + /// @param[in] maxSegments The maximum number of segments the result arrays can hold. + /// @returns The status flags for the query. + dtStatus getPolyWallSegments(dtPolyRef ref, const dtQueryFilter* filter, + float* segmentVerts, dtPolyRef* segmentRefs, int* segmentCount, + const int maxSegments) const; + + /// Returns random location on navmesh. + /// Polygons are chosen weighted by area. The search runs in linear related to number of polygon. + /// @param[in] filter The polygon filter to apply to the query. + /// @param[in] frand Function returning a random number [0..1). + /// @param[out] randomRef The reference id of the random location. + /// @param[out] randomPt The random location. + /// @returns The status flags for the query. + dtStatus findRandomPoint(const dtQueryFilter* filter, float (*frand)(), + dtPolyRef* randomRef, float* randomPt) const; + + /// Returns random location on navmesh within the reach of specified location. + /// Polygons are chosen weighted by area. The search runs in linear related to number of polygon. + /// The location is not exactly constrained by the circle, but it limits the visited polygons. + /// @param[in] startRef The reference id of the polygon where the search starts. + /// @param[in] centerPos The center of the search circle. [(x, y, z)] + /// @param[in] filter The polygon filter to apply to the query. + /// @param[in] frand Function returning a random number [0..1). + /// @param[out] randomRef The reference id of the random location. + /// @param[out] randomPt The random location. [(x, y, z)] + /// @returns The status flags for the query. + dtStatus findRandomPointAroundCircle(dtPolyRef startRef, const float* centerPos, const float maxRadius, + const dtQueryFilter* filter, float (*frand)(), + dtPolyRef* randomRef, float* randomPt) const; + + /// Finds the closest point on the specified polygon. + /// @param[in] ref The reference id of the polygon. + /// @param[in] pos The position to check. [(x, y, z)] + /// @param[out] closest The closest point on the polygon. [(x, y, z)] + /// @param[out] posOverPoly True of the position is over the polygon. + /// @returns The status flags for the query. + dtStatus closestPointOnPoly(dtPolyRef ref, const float* pos, float* closest, bool* posOverPoly) const; + + /// Returns a point on the boundary closest to the source point if the source point is outside the + /// polygon's xz-bounds. + /// @param[in] ref The reference id to the polygon. + /// @param[in] pos The position to check. [(x, y, z)] + /// @param[out] closest The closest point. [(x, y, z)] + /// @returns The status flags for the query. + dtStatus closestPointOnPolyBoundary(dtPolyRef ref, const float* pos, float* closest) const; + + /// Gets the height of the polygon at the provided position using the height detail. (Most accurate.) + /// @param[in] ref The reference id of the polygon. + /// @param[in] pos A position within the xz-bounds of the polygon. [(x, y, z)] + /// @param[out] height The height at the surface of the polygon. + /// @returns The status flags for the query. + dtStatus getPolyHeight(dtPolyRef ref, const float* pos, float* height) const; + + /// @} + /// @name Miscellaneous Functions + /// @{ + + /// Returns true if the polygon reference is valid and passes the filter restrictions. + /// @param[in] ref The polygon reference to check. + /// @param[in] filter The filter to apply. + bool isValidPolyRef(dtPolyRef ref, const dtQueryFilter* filter) const; + + /// Returns true if the polygon reference is in the closed list. + /// @param[in] ref The reference id of the polygon to check. + /// @returns True if the polygon is in closed list. + bool isInClosedList(dtPolyRef ref) const; + + /// Gets the node pool. + /// @returns The node pool. + class dtNodePool* getNodePool() const { return m_nodePool; } + + /// Gets the navigation mesh the query object is using. + /// @return The navigation mesh the query object is using. + const dtNavMesh* getAttachedNavMesh() const { return m_nav; } + + /// @} + +private: + // Explicitly disabled copy constructor and copy assignment operator + dtNavMeshQuery(const dtNavMeshQuery&); + dtNavMeshQuery& operator=(const dtNavMeshQuery&); + + /// Queries polygons within a tile. + void queryPolygonsInTile(const dtMeshTile* tile, const float* qmin, const float* qmax, + const dtQueryFilter* filter, dtPolyQuery* query) const; + + /// Returns portal points between two polygons. + dtStatus getPortalPoints(dtPolyRef from, dtPolyRef to, float* left, float* right, + unsigned char& fromType, unsigned char& toType) const; + dtStatus getPortalPoints(dtPolyRef from, const dtPoly* fromPoly, const dtMeshTile* fromTile, + dtPolyRef to, const dtPoly* toPoly, const dtMeshTile* toTile, + float* left, float* right) const; + + /// Returns edge mid point between two polygons. + dtStatus getEdgeMidPoint(dtPolyRef from, dtPolyRef to, float* mid) const; + dtStatus getEdgeMidPoint(dtPolyRef from, const dtPoly* fromPoly, const dtMeshTile* fromTile, + dtPolyRef to, const dtPoly* toPoly, const dtMeshTile* toTile, + float* mid) const; + + // Appends vertex to a straight path + dtStatus appendVertex(const float* pos, const unsigned char flags, const dtPolyRef ref, + float* straightPath, unsigned char* straightPathFlags, dtPolyRef* straightPathRefs, + int* straightPathCount, const int maxStraightPath) const; + + // Appends intermediate portal points to a straight path. + dtStatus appendPortals(const int startIdx, const int endIdx, const float* endPos, const dtPolyRef* path, + float* straightPath, unsigned char* straightPathFlags, dtPolyRef* straightPathRefs, + int* straightPathCount, const int maxStraightPath, const int options) const; + + // Gets the path leading to the specified end node. + dtStatus getPathToNode(struct dtNode* endNode, dtPolyRef* path, int* pathCount, int maxPath) const; + + const dtNavMesh* m_nav; ///< Pointer to navmesh data. + + struct dtQueryData + { + dtStatus status; + struct dtNode* lastBestNode; + float lastBestNodeCost; + dtPolyRef startRef, endRef; + float startPos[3], endPos[3]; + const dtQueryFilter* filter; + unsigned int options; + float raycastLimitSqr; + }; + dtQueryData m_query; ///< Sliced query state. + + class dtNodePool* m_tinyNodePool; ///< Pointer to small node pool. + class dtNodePool* m_nodePool; ///< Pointer to node pool. + class dtNodeQueue* m_openList; ///< Pointer to open list queue. +}; + +/// Allocates a query object using the Detour allocator. +/// @return An allocated query object, or null on failure. +/// @ingroup detour +dtNavMeshQuery* dtAllocNavMeshQuery(); + +/// Frees the specified query object using the Detour allocator. +/// @param[in] query A query object allocated using #dtAllocNavMeshQuery +/// @ingroup detour +void dtFreeNavMeshQuery(dtNavMeshQuery* query); + +#endif // DETOURNAVMESHQUERY_H diff --git a/libs/recast/detour/include/DetourNode.h b/libs/recast/detour/include/DetourNode.h new file mode 100644 index 000000000..db0974708 --- /dev/null +++ b/libs/recast/detour/include/DetourNode.h @@ -0,0 +1,168 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#ifndef DETOURNODE_H +#define DETOURNODE_H + +#include "DetourNavMesh.h" + +enum dtNodeFlags +{ + DT_NODE_OPEN = 0x01, + DT_NODE_CLOSED = 0x02, + DT_NODE_PARENT_DETACHED = 0x04, // parent of the node is not adjacent. Found using raycast. +}; + +typedef unsigned short dtNodeIndex; +static const dtNodeIndex DT_NULL_IDX = (dtNodeIndex)~0; + +static const int DT_NODE_PARENT_BITS = 24; +static const int DT_NODE_STATE_BITS = 2; +struct dtNode +{ + float pos[3]; ///< Position of the node. + float cost; ///< Cost from previous node to current node. + float total; ///< Cost up to the node. + unsigned int pidx : DT_NODE_PARENT_BITS; ///< Index to parent node. + unsigned int state : DT_NODE_STATE_BITS; ///< extra state information. A polyRef can have multiple nodes with different extra info. see DT_MAX_STATES_PER_NODE + unsigned int flags : 3; ///< Node flags. A combination of dtNodeFlags. + dtPolyRef id; ///< Polygon ref the node corresponds to. +}; + +static const int DT_MAX_STATES_PER_NODE = 1 << DT_NODE_STATE_BITS; // number of extra states per node. See dtNode::state + +class dtNodePool +{ +public: + dtNodePool(int maxNodes, int hashSize); + ~dtNodePool(); + void clear(); + + // Get a dtNode by ref and extra state information. If there is none then - allocate + // There can be more than one node for the same polyRef but with different extra state information + dtNode* getNode(dtPolyRef id, unsigned char state=0); + dtNode* findNode(dtPolyRef id, unsigned char state); + unsigned int findNodes(dtPolyRef id, dtNode** nodes, const int maxNodes); + + inline unsigned int getNodeIdx(const dtNode* node) const + { + if (!node) return 0; + return (unsigned int)(node - m_nodes) + 1; + } + + inline dtNode* getNodeAtIdx(unsigned int idx) + { + if (!idx) return 0; + return &m_nodes[idx - 1]; + } + + inline const dtNode* getNodeAtIdx(unsigned int idx) const + { + if (!idx) return 0; + return &m_nodes[idx - 1]; + } + + inline int getMemUsed() const + { + return sizeof(*this) + + sizeof(dtNode)*m_maxNodes + + sizeof(dtNodeIndex)*m_maxNodes + + sizeof(dtNodeIndex)*m_hashSize; + } + + inline int getMaxNodes() const { return m_maxNodes; } + + inline int getHashSize() const { return m_hashSize; } + inline dtNodeIndex getFirst(int bucket) const { return m_first[bucket]; } + inline dtNodeIndex getNext(int i) const { return m_next[i]; } + inline int getNodeCount() const { return m_nodeCount; } + +private: + // Explicitly disabled copy constructor and copy assignment operator. + dtNodePool(const dtNodePool&); + dtNodePool& operator=(const dtNodePool&); + + dtNode* m_nodes; + dtNodeIndex* m_first; + dtNodeIndex* m_next; + const int m_maxNodes; + const int m_hashSize; + int m_nodeCount; +}; + +class dtNodeQueue +{ +public: + dtNodeQueue(int n); + ~dtNodeQueue(); + + inline void clear() { m_size = 0; } + + inline dtNode* top() { return m_heap[0]; } + + inline dtNode* pop() + { + dtNode* result = m_heap[0]; + m_size--; + trickleDown(0, m_heap[m_size]); + return result; + } + + inline void push(dtNode* node) + { + m_size++; + bubbleUp(m_size-1, node); + } + + inline void modify(dtNode* node) + { + for (int i = 0; i < m_size; ++i) + { + if (m_heap[i] == node) + { + bubbleUp(i, node); + return; + } + } + } + + inline bool empty() const { return m_size == 0; } + + inline int getMemUsed() const + { + return sizeof(*this) + + sizeof(dtNode*) * (m_capacity + 1); + } + + inline int getCapacity() const { return m_capacity; } + +private: + // Explicitly disabled copy constructor and copy assignment operator. + dtNodeQueue(const dtNodeQueue&); + dtNodeQueue& operator=(const dtNodeQueue&); + + void bubbleUp(int i, dtNode* node); + void trickleDown(int i, dtNode* node); + + dtNode** m_heap; + const int m_capacity; + int m_size; +}; + + +#endif // DETOURNODE_H diff --git a/libs/recast/detour/include/DetourStatus.h b/libs/recast/detour/include/DetourStatus.h new file mode 100644 index 000000000..af822c4a9 --- /dev/null +++ b/libs/recast/detour/include/DetourStatus.h @@ -0,0 +1,64 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#ifndef DETOURSTATUS_H +#define DETOURSTATUS_H + +typedef unsigned int dtStatus; + +// High level status. +static const unsigned int DT_FAILURE = 1u << 31; // Operation failed. +static const unsigned int DT_SUCCESS = 1u << 30; // Operation succeed. +static const unsigned int DT_IN_PROGRESS = 1u << 29; // Operation still in progress. + +// Detail information for status. +static const unsigned int DT_STATUS_DETAIL_MASK = 0x0ffffff; +static const unsigned int DT_WRONG_MAGIC = 1 << 0; // Input data is not recognized. +static const unsigned int DT_WRONG_VERSION = 1 << 1; // Input data is in wrong version. +static const unsigned int DT_OUT_OF_MEMORY = 1 << 2; // Operation ran out of memory. +static const unsigned int DT_INVALID_PARAM = 1 << 3; // An input parameter was invalid. +static const unsigned int DT_BUFFER_TOO_SMALL = 1 << 4; // Result buffer for the query was too small to store all results. +static const unsigned int DT_OUT_OF_NODES = 1 << 5; // Query ran out of nodes during search. +static const unsigned int DT_PARTIAL_RESULT = 1 << 6; // Query did not reach the end location, returning best guess. + + +// Returns true of status is success. +inline bool dtStatusSucceed(dtStatus status) +{ + return (status & DT_SUCCESS) != 0; +} + +// Returns true of status is failure. +inline bool dtStatusFailed(dtStatus status) +{ + return (status & DT_FAILURE) != 0; +} + +// Returns true of status is in progress. +inline bool dtStatusInProgress(dtStatus status) +{ + return (status & DT_IN_PROGRESS) != 0; +} + +// Returns true if specific detail is set. +inline bool dtStatusDetail(dtStatus status, unsigned int detail) +{ + return (status & detail) != 0; +} + +#endif // DETOURSTATUS_H diff --git a/libs/recast/detour/src/DetourAlloc.cpp b/libs/recast/detour/src/DetourAlloc.cpp new file mode 100644 index 000000000..d9ad1fc01 --- /dev/null +++ b/libs/recast/detour/src/DetourAlloc.cpp @@ -0,0 +1,50 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#include +#include "DetourAlloc.h" + +static void *dtAllocDefault(size_t size, dtAllocHint) +{ + return malloc(size); +} + +static void dtFreeDefault(void *ptr) +{ + free(ptr); +} + +static dtAllocFunc* sAllocFunc = dtAllocDefault; +static dtFreeFunc* sFreeFunc = dtFreeDefault; + +void dtAllocSetCustom(dtAllocFunc *allocFunc, dtFreeFunc *freeFunc) +{ + sAllocFunc = allocFunc ? allocFunc : dtAllocDefault; + sFreeFunc = freeFunc ? freeFunc : dtFreeDefault; +} + +void* dtAlloc(size_t size, dtAllocHint hint) +{ + return sAllocFunc(size, hint); +} + +void dtFree(void* ptr) +{ + if (ptr) + sFreeFunc(ptr); +} diff --git a/libs/recast/detour/src/DetourAssert.cpp b/libs/recast/detour/src/DetourAssert.cpp new file mode 100644 index 000000000..5e019e0cf --- /dev/null +++ b/libs/recast/detour/src/DetourAssert.cpp @@ -0,0 +1,35 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#include "DetourAssert.h" + +#ifndef NDEBUG + +static dtAssertFailFunc* sAssertFailFunc = 0; + +void dtAssertFailSetCustom(dtAssertFailFunc *assertFailFunc) +{ + sAssertFailFunc = assertFailFunc; +} + +dtAssertFailFunc* dtAssertFailGetCustom() +{ + return sAssertFailFunc; +} + +#endif diff --git a/libs/recast/detour/src/DetourCommon.cpp b/libs/recast/detour/src/DetourCommon.cpp new file mode 100644 index 000000000..41d0d7bd3 --- /dev/null +++ b/libs/recast/detour/src/DetourCommon.cpp @@ -0,0 +1,388 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#include "DetourCommon.h" +#include "DetourMath.h" + +////////////////////////////////////////////////////////////////////////////////////////// + +void dtClosestPtPointTriangle(float* closest, const float* p, + const float* a, const float* b, const float* c) +{ + // Check if P in vertex region outside A + float ab[3], ac[3], ap[3]; + dtVsub(ab, b, a); + dtVsub(ac, c, a); + dtVsub(ap, p, a); + float d1 = dtVdot(ab, ap); + float d2 = dtVdot(ac, ap); + if (d1 <= 0.0f && d2 <= 0.0f) + { + // barycentric coordinates (1,0,0) + dtVcopy(closest, a); + return; + } + + // Check if P in vertex region outside B + float bp[3]; + dtVsub(bp, p, b); + float d3 = dtVdot(ab, bp); + float d4 = dtVdot(ac, bp); + if (d3 >= 0.0f && d4 <= d3) + { + // barycentric coordinates (0,1,0) + dtVcopy(closest, b); + return; + } + + // Check if P in edge region of AB, if so return projection of P onto AB + float vc = d1*d4 - d3*d2; + if (vc <= 0.0f && d1 >= 0.0f && d3 <= 0.0f) + { + // barycentric coordinates (1-v,v,0) + float v = d1 / (d1 - d3); + closest[0] = a[0] + v * ab[0]; + closest[1] = a[1] + v * ab[1]; + closest[2] = a[2] + v * ab[2]; + return; + } + + // Check if P in vertex region outside C + float cp[3]; + dtVsub(cp, p, c); + float d5 = dtVdot(ab, cp); + float d6 = dtVdot(ac, cp); + if (d6 >= 0.0f && d5 <= d6) + { + // barycentric coordinates (0,0,1) + dtVcopy(closest, c); + return; + } + + // Check if P in edge region of AC, if so return projection of P onto AC + float vb = d5*d2 - d1*d6; + if (vb <= 0.0f && d2 >= 0.0f && d6 <= 0.0f) + { + // barycentric coordinates (1-w,0,w) + float w = d2 / (d2 - d6); + closest[0] = a[0] + w * ac[0]; + closest[1] = a[1] + w * ac[1]; + closest[2] = a[2] + w * ac[2]; + return; + } + + // Check if P in edge region of BC, if so return projection of P onto BC + float va = d3*d6 - d5*d4; + if (va <= 0.0f && (d4 - d3) >= 0.0f && (d5 - d6) >= 0.0f) + { + // barycentric coordinates (0,1-w,w) + float w = (d4 - d3) / ((d4 - d3) + (d5 - d6)); + closest[0] = b[0] + w * (c[0] - b[0]); + closest[1] = b[1] + w * (c[1] - b[1]); + closest[2] = b[2] + w * (c[2] - b[2]); + return; + } + + // P inside face region. Compute Q through its barycentric coordinates (u,v,w) + float denom = 1.0f / (va + vb + vc); + float v = vb * denom; + float w = vc * denom; + closest[0] = a[0] + ab[0] * v + ac[0] * w; + closest[1] = a[1] + ab[1] * v + ac[1] * w; + closest[2] = a[2] + ab[2] * v + ac[2] * w; +} + +bool dtIntersectSegmentPoly2D(const float* p0, const float* p1, + const float* verts, int nverts, + float& tmin, float& tmax, + int& segMin, int& segMax) +{ + static const float EPS = 0.00000001f; + + tmin = 0; + tmax = 1; + segMin = -1; + segMax = -1; + + float dir[3]; + dtVsub(dir, p1, p0); + + for (int i = 0, j = nverts-1; i < nverts; j=i++) + { + float edge[3], diff[3]; + dtVsub(edge, &verts[i*3], &verts[j*3]); + dtVsub(diff, p0, &verts[j*3]); + const float n = dtVperp2D(edge, diff); + const float d = dtVperp2D(dir, edge); + if (fabsf(d) < EPS) + { + // S is nearly parallel to this edge + if (n < 0) + return false; + else + continue; + } + const float t = n / d; + if (d < 0) + { + // segment S is entering across this edge + if (t > tmin) + { + tmin = t; + segMin = j; + // S enters after leaving polygon + if (tmin > tmax) + return false; + } + } + else + { + // segment S is leaving across this edge + if (t < tmax) + { + tmax = t; + segMax = j; + // S leaves before entering polygon + if (tmax < tmin) + return false; + } + } + } + + return true; +} + +float dtDistancePtSegSqr2D(const float* pt, const float* p, const float* q, float& t) +{ + float pqx = q[0] - p[0]; + float pqz = q[2] - p[2]; + float dx = pt[0] - p[0]; + float dz = pt[2] - p[2]; + float d = pqx*pqx + pqz*pqz; + t = pqx*dx + pqz*dz; + if (d > 0) t /= d; + if (t < 0) t = 0; + else if (t > 1) t = 1; + dx = p[0] + t*pqx - pt[0]; + dz = p[2] + t*pqz - pt[2]; + return dx*dx + dz*dz; +} + +void dtCalcPolyCenter(float* tc, const unsigned short* idx, int nidx, const float* verts) +{ + tc[0] = 0.0f; + tc[1] = 0.0f; + tc[2] = 0.0f; + for (int j = 0; j < nidx; ++j) + { + const float* v = &verts[idx[j]*3]; + tc[0] += v[0]; + tc[1] += v[1]; + tc[2] += v[2]; + } + const float s = 1.0f / nidx; + tc[0] *= s; + tc[1] *= s; + tc[2] *= s; +} + +bool dtClosestHeightPointTriangle(const float* p, const float* a, const float* b, const float* c, float& h) +{ + float v0[3], v1[3], v2[3]; + dtVsub(v0, c,a); + dtVsub(v1, b,a); + dtVsub(v2, p,a); + + const float dot00 = dtVdot2D(v0, v0); + const float dot01 = dtVdot2D(v0, v1); + const float dot02 = dtVdot2D(v0, v2); + const float dot11 = dtVdot2D(v1, v1); + const float dot12 = dtVdot2D(v1, v2); + + // Compute barycentric coordinates + const float invDenom = 1.0f / (dot00 * dot11 - dot01 * dot01); + const float u = (dot11 * dot02 - dot01 * dot12) * invDenom; + const float v = (dot00 * dot12 - dot01 * dot02) * invDenom; + + // The (sloppy) epsilon is needed to allow to get height of points which + // are interpolated along the edges of the triangles. + static const float EPS = 1e-4f; + + // If point lies inside the triangle, return interpolated ycoord. + if (u >= -EPS && v >= -EPS && (u+v) <= 1+EPS) + { + h = a[1] + v0[1]*u + v1[1]*v; + return true; + } + + return false; +} + +/// @par +/// +/// All points are projected onto the xz-plane, so the y-values are ignored. +bool dtPointInPolygon(const float* pt, const float* verts, const int nverts) +{ + // TODO: Replace pnpoly with triArea2D tests? + int i, j; + bool c = false; + for (i = 0, j = nverts-1; i < nverts; j = i++) + { + const float* vi = &verts[i*3]; + const float* vj = &verts[j*3]; + if (((vi[2] > pt[2]) != (vj[2] > pt[2])) && + (pt[0] < (vj[0]-vi[0]) * (pt[2]-vi[2]) / (vj[2]-vi[2]) + vi[0]) ) + c = !c; + } + return c; +} + +bool dtDistancePtPolyEdgesSqr(const float* pt, const float* verts, const int nverts, + float* ed, float* et) +{ + // TODO: Replace pnpoly with triArea2D tests? + int i, j; + bool c = false; + for (i = 0, j = nverts-1; i < nverts; j = i++) + { + const float* vi = &verts[i*3]; + const float* vj = &verts[j*3]; + if (((vi[2] > pt[2]) != (vj[2] > pt[2])) && + (pt[0] < (vj[0]-vi[0]) * (pt[2]-vi[2]) / (vj[2]-vi[2]) + vi[0]) ) + c = !c; + ed[j] = dtDistancePtSegSqr2D(pt, vj, vi, et[j]); + } + return c; +} + +static void projectPoly(const float* axis, const float* poly, const int npoly, + float& rmin, float& rmax) +{ + rmin = rmax = dtVdot2D(axis, &poly[0]); + for (int i = 1; i < npoly; ++i) + { + const float d = dtVdot2D(axis, &poly[i*3]); + rmin = dtMin(rmin, d); + rmax = dtMax(rmax, d); + } +} + +inline bool overlapRange(const float amin, const float amax, + const float bmin, const float bmax, + const float eps) +{ + return ((amin+eps) > bmax || (amax-eps) < bmin) ? false : true; +} + +/// @par +/// +/// All vertices are projected onto the xz-plane, so the y-values are ignored. +bool dtOverlapPolyPoly2D(const float* polya, const int npolya, + const float* polyb, const int npolyb) +{ + const float eps = 1e-4f; + + for (int i = 0, j = npolya-1; i < npolya; j=i++) + { + const float* va = &polya[j*3]; + const float* vb = &polya[i*3]; + const float n[3] = { vb[2]-va[2], 0, -(vb[0]-va[0]) }; + float amin,amax,bmin,bmax; + projectPoly(n, polya, npolya, amin,amax); + projectPoly(n, polyb, npolyb, bmin,bmax); + if (!overlapRange(amin,amax, bmin,bmax, eps)) + { + // Found separating axis + return false; + } + } + for (int i = 0, j = npolyb-1; i < npolyb; j=i++) + { + const float* va = &polyb[j*3]; + const float* vb = &polyb[i*3]; + const float n[3] = { vb[2]-va[2], 0, -(vb[0]-va[0]) }; + float amin,amax,bmin,bmax; + projectPoly(n, polya, npolya, amin,amax); + projectPoly(n, polyb, npolyb, bmin,bmax); + if (!overlapRange(amin,amax, bmin,bmax, eps)) + { + // Found separating axis + return false; + } + } + return true; +} + +// Returns a random point in a convex polygon. +// Adapted from Graphics Gems article. +void dtRandomPointInConvexPoly(const float* pts, const int npts, float* areas, + const float s, const float t, float* out) +{ + // Calc triangle araes + float areasum = 0.0f; + for (int i = 2; i < npts; i++) { + areas[i] = dtTriArea2D(&pts[0], &pts[(i-1)*3], &pts[i*3]); + areasum += dtMax(0.001f, areas[i]); + } + // Find sub triangle weighted by area. + const float thr = s*areasum; + float acc = 0.0f; + float u = 1.0f; + int tri = npts - 1; + for (int i = 2; i < npts; i++) { + const float dacc = areas[i]; + if (thr >= acc && thr < (acc+dacc)) + { + u = (thr - acc) / dacc; + tri = i; + break; + } + acc += dacc; + } + + float v = dtMathSqrtf(t); + + const float a = 1 - v; + const float b = (1 - u) * v; + const float c = u * v; + const float* pa = &pts[0]; + const float* pb = &pts[(tri-1)*3]; + const float* pc = &pts[tri*3]; + + out[0] = a*pa[0] + b*pb[0] + c*pc[0]; + out[1] = a*pa[1] + b*pb[1] + c*pc[1]; + out[2] = a*pa[2] + b*pb[2] + c*pc[2]; +} + +inline float vperpXZ(const float* a, const float* b) { return a[0]*b[2] - a[2]*b[0]; } + +bool dtIntersectSegSeg2D(const float* ap, const float* aq, + const float* bp, const float* bq, + float& s, float& t) +{ + float u[3], v[3], w[3]; + dtVsub(u,aq,ap); + dtVsub(v,bq,bp); + dtVsub(w,ap,bp); + float d = vperpXZ(u,v); + if (fabsf(d) < 1e-6f) return false; + s = vperpXZ(v,w) / d; + t = vperpXZ(u,w) / d; + return true; +} + diff --git a/libs/recast/detour/src/DetourNavMesh.cpp b/libs/recast/detour/src/DetourNavMesh.cpp new file mode 100644 index 000000000..a6557f9e8 --- /dev/null +++ b/libs/recast/detour/src/DetourNavMesh.cpp @@ -0,0 +1,1522 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#include +#include +#include +#include "DetourNavMesh.h" +#include "DetourNode.h" +#include "DetourCommon.h" +#include "DetourMath.h" +#include "DetourAlloc.h" +#include "DetourAssert.h" +#include + + +inline bool overlapSlabs(const float* amin, const float* amax, + const float* bmin, const float* bmax, + const float px, const float py) +{ + // Check for horizontal overlap. + // The segment is shrunken a little so that slabs which touch + // at end points are not connected. + const float minx = dtMax(amin[0]+px,bmin[0]+px); + const float maxx = dtMin(amax[0]-px,bmax[0]-px); + if (minx > maxx) + return false; + + // Check vertical overlap. + const float ad = (amax[1]-amin[1]) / (amax[0]-amin[0]); + const float ak = amin[1] - ad*amin[0]; + const float bd = (bmax[1]-bmin[1]) / (bmax[0]-bmin[0]); + const float bk = bmin[1] - bd*bmin[0]; + const float aminy = ad*minx + ak; + const float amaxy = ad*maxx + ak; + const float bminy = bd*minx + bk; + const float bmaxy = bd*maxx + bk; + const float dmin = bminy - aminy; + const float dmax = bmaxy - amaxy; + + // Crossing segments always overlap. + if (dmin*dmax < 0) + return true; + + // Check for overlap at endpoints. + const float thr = dtSqr(py*2); + if (dmin*dmin <= thr || dmax*dmax <= thr) + return true; + + return false; +} + +static float getSlabCoord(const float* va, const int side) +{ + if (side == 0 || side == 4) + return va[0]; + else if (side == 2 || side == 6) + return va[2]; + return 0; +} + +static void calcSlabEndPoints(const float* va, const float* vb, float* bmin, float* bmax, const int side) +{ + if (side == 0 || side == 4) + { + if (va[2] < vb[2]) + { + bmin[0] = va[2]; + bmin[1] = va[1]; + bmax[0] = vb[2]; + bmax[1] = vb[1]; + } + else + { + bmin[0] = vb[2]; + bmin[1] = vb[1]; + bmax[0] = va[2]; + bmax[1] = va[1]; + } + } + else if (side == 2 || side == 6) + { + if (va[0] < vb[0]) + { + bmin[0] = va[0]; + bmin[1] = va[1]; + bmax[0] = vb[0]; + bmax[1] = vb[1]; + } + else + { + bmin[0] = vb[0]; + bmin[1] = vb[1]; + bmax[0] = va[0]; + bmax[1] = va[1]; + } + } +} + +inline int computeTileHash(int x, int y, const int mask) +{ + const unsigned int h1 = 0x8da6b343; // Large multiplicative constants; + const unsigned int h2 = 0xd8163841; // here arbitrarily chosen primes + unsigned int n = h1 * x + h2 * y; + return (int)(n & mask); +} + +inline unsigned int allocLink(dtMeshTile* tile) +{ + if (tile->linksFreeList == DT_NULL_LINK) + return DT_NULL_LINK; + unsigned int link = tile->linksFreeList; + tile->linksFreeList = tile->links[link].next; + return link; +} + +inline void freeLink(dtMeshTile* tile, unsigned int link) +{ + tile->links[link].next = tile->linksFreeList; + tile->linksFreeList = link; +} + + +dtNavMesh* dtAllocNavMesh() +{ + void* mem = dtAlloc(sizeof(dtNavMesh), DT_ALLOC_PERM); + if (!mem) return 0; + return new(mem) dtNavMesh; +} + +/// @par +/// +/// This function will only free the memory for tiles with the #DT_TILE_FREE_DATA +/// flag set. +void dtFreeNavMesh(dtNavMesh* navmesh) +{ + if (!navmesh) return; + navmesh->~dtNavMesh(); + dtFree(navmesh); +} + +////////////////////////////////////////////////////////////////////////////////////////// + +/** +@class dtNavMesh + +The navigation mesh consists of one or more tiles defining three primary types of structural data: + +A polygon mesh which defines most of the navigation graph. (See rcPolyMesh for its structure.) +A detail mesh used for determining surface height on the polygon mesh. (See rcPolyMeshDetail for its structure.) +Off-mesh connections, which define custom point-to-point edges within the navigation graph. + +The general build process is as follows: + +-# Create rcPolyMesh and rcPolyMeshDetail data using the Recast build pipeline. +-# Optionally, create off-mesh connection data. +-# Combine the source data into a dtNavMeshCreateParams structure. +-# Create a tile data array using dtCreateNavMeshData(). +-# Allocate at dtNavMesh object and initialize it. (For single tile navigation meshes, + the tile data is loaded during this step.) +-# For multi-tile navigation meshes, load the tile data using dtNavMesh::addTile(). + +Notes: + +- This class is usually used in conjunction with the dtNavMeshQuery class for pathfinding. +- Technically, all navigation meshes are tiled. A 'solo' mesh is simply a navigation mesh initialized + to have only a single tile. +- This class does not implement any asynchronous methods. So the ::dtStatus result of all methods will + always contain either a success or failure flag. + +@see dtNavMeshQuery, dtCreateNavMeshData, dtNavMeshCreateParams, #dtAllocNavMesh, #dtFreeNavMesh +*/ + +dtNavMesh::dtNavMesh() : + m_tileWidth(0), + m_tileHeight(0), + m_maxTiles(0), + m_tileLutSize(0), + m_tileLutMask(0), + m_posLookup(0), + m_nextFree(0), + m_tiles(0) +{ +#ifndef DT_POLYREF64 + m_saltBits = 0; + m_tileBits = 0; + m_polyBits = 0; +#endif + memset(&m_params, 0, sizeof(dtNavMeshParams)); + m_orig[0] = 0; + m_orig[1] = 0; + m_orig[2] = 0; +} + +dtNavMesh::~dtNavMesh() +{ + for (int i = 0; i < m_maxTiles; ++i) + { + if (m_tiles[i].flags & DT_TILE_FREE_DATA) + { + dtFree(m_tiles[i].data); + m_tiles[i].data = 0; + m_tiles[i].dataSize = 0; + } + } + dtFree(m_posLookup); + dtFree(m_tiles); +} + +dtStatus dtNavMesh::init(const dtNavMeshParams* params) +{ + memcpy(&m_params, params, sizeof(dtNavMeshParams)); + dtVcopy(m_orig, params->orig); + m_tileWidth = params->tileWidth; + m_tileHeight = params->tileHeight; + + // Init tiles + m_maxTiles = params->maxTiles; + m_tileLutSize = dtNextPow2(params->maxTiles/4); + if (!m_tileLutSize) m_tileLutSize = 1; + m_tileLutMask = m_tileLutSize-1; + + m_tiles = (dtMeshTile*)dtAlloc(sizeof(dtMeshTile)*m_maxTiles, DT_ALLOC_PERM); + if (!m_tiles) + return DT_FAILURE | DT_OUT_OF_MEMORY; + m_posLookup = (dtMeshTile**)dtAlloc(sizeof(dtMeshTile*)*m_tileLutSize, DT_ALLOC_PERM); + if (!m_posLookup) + return DT_FAILURE | DT_OUT_OF_MEMORY; + memset(m_tiles, 0, sizeof(dtMeshTile)*m_maxTiles); + memset(m_posLookup, 0, sizeof(dtMeshTile*)*m_tileLutSize); + m_nextFree = 0; + for (int i = m_maxTiles-1; i >= 0; --i) + { + m_tiles[i].salt = 1; + m_tiles[i].next = m_nextFree; + m_nextFree = &m_tiles[i]; + } + + // Init ID generator values. +#ifndef DT_POLYREF64 + m_tileBits = dtIlog2(dtNextPow2((unsigned int)params->maxTiles)); + m_polyBits = dtIlog2(dtNextPow2((unsigned int)params->maxPolys)); + // Only allow 31 salt bits, since the salt mask is calculated using 32bit uint and it will overflow. + m_saltBits = dtMin((unsigned int)31, 32 - m_tileBits - m_polyBits); + + if (m_saltBits < 10) + return DT_FAILURE | DT_INVALID_PARAM; +#endif + + return DT_SUCCESS; +} + +dtStatus dtNavMesh::init(unsigned char* data, const int dataSize, const int flags) +{ + // Make sure the data is in right format. + dtMeshHeader* header = (dtMeshHeader*)data; + if (header->magic != DT_NAVMESH_MAGIC) + return DT_FAILURE | DT_WRONG_MAGIC; + if (header->version != DT_NAVMESH_VERSION) + return DT_FAILURE | DT_WRONG_VERSION; + + dtNavMeshParams params; + dtVcopy(params.orig, header->bmin); + params.tileWidth = header->bmax[0] - header->bmin[0]; + params.tileHeight = header->bmax[2] - header->bmin[2]; + params.maxTiles = 1; + params.maxPolys = header->polyCount; + + dtStatus status = init(¶ms); + if (dtStatusFailed(status)) + return status; + + return addTile(data, dataSize, flags, 0, 0); +} + +/// @par +/// +/// @note The parameters are created automatically when the single tile +/// initialization is performed. +const dtNavMeshParams* dtNavMesh::getParams() const +{ + return &m_params; +} + +////////////////////////////////////////////////////////////////////////////////////////// +int dtNavMesh::findConnectingPolys(const float* va, const float* vb, + const dtMeshTile* tile, int side, + dtPolyRef* con, float* conarea, int maxcon) const +{ + if (!tile) return 0; + + float amin[2], amax[2]; + calcSlabEndPoints(va, vb, amin, amax, side); + const float apos = getSlabCoord(va, side); + + // Remove links pointing to 'side' and compact the links array. + float bmin[2], bmax[2]; + unsigned short m = DT_EXT_LINK | (unsigned short)side; + int n = 0; + + dtPolyRef base = getPolyRefBase(tile); + + for (int i = 0; i < tile->header->polyCount; ++i) + { + dtPoly* poly = &tile->polys[i]; + const int nv = poly->vertCount; + for (int j = 0; j < nv; ++j) + { + // Skip edges which do not point to the right side. + if (poly->neis[j] != m) continue; + + const float* vc = &tile->verts[poly->verts[j]*3]; + const float* vd = &tile->verts[poly->verts[(j+1) % nv]*3]; + const float bpos = getSlabCoord(vc, side); + + // Segments are not close enough. + if (dtAbs(apos-bpos) > 0.01f) + continue; + + // Check if the segments touch. + calcSlabEndPoints(vc,vd, bmin,bmax, side); + + if (!overlapSlabs(amin,amax, bmin,bmax, 0.01f, tile->header->walkableClimb)) continue; + + // Add return value. + if (n < maxcon) + { + conarea[n*2+0] = dtMax(amin[0], bmin[0]); + conarea[n*2+1] = dtMin(amax[0], bmax[0]); + con[n] = base | (dtPolyRef)i; + n++; + } + break; + } + } + return n; +} + +void dtNavMesh::unconnectLinks(dtMeshTile* tile, dtMeshTile* target) +{ + if (!tile || !target) return; + + const unsigned int targetNum = decodePolyIdTile(getTileRef(target)); + + for (int i = 0; i < tile->header->polyCount; ++i) + { + dtPoly* poly = &tile->polys[i]; + unsigned int j = poly->firstLink; + unsigned int pj = DT_NULL_LINK; + while (j != DT_NULL_LINK) + { + if (decodePolyIdTile(tile->links[j].ref) == targetNum) + { + // Remove link. + unsigned int nj = tile->links[j].next; + if (pj == DT_NULL_LINK) + poly->firstLink = nj; + else + tile->links[pj].next = nj; + freeLink(tile, j); + j = nj; + } + else + { + // Advance + pj = j; + j = tile->links[j].next; + } + } + } +} + +void dtNavMesh::connectExtLinks(dtMeshTile* tile, dtMeshTile* target, int side) +{ + if (!tile) return; + + // Connect border links. + for (int i = 0; i < tile->header->polyCount; ++i) + { + dtPoly* poly = &tile->polys[i]; + + // Create new links. +// unsigned short m = DT_EXT_LINK | (unsigned short)side; + + const int nv = poly->vertCount; + for (int j = 0; j < nv; ++j) + { + // Skip non-portal edges. + if ((poly->neis[j] & DT_EXT_LINK) == 0) + continue; + + const int dir = (int)(poly->neis[j] & 0xff); + if (side != -1 && dir != side) + continue; + + // Create new links + const float* va = &tile->verts[poly->verts[j]*3]; + const float* vb = &tile->verts[poly->verts[(j+1) % nv]*3]; + dtPolyRef nei[4]; + float neia[4*2]; + int nnei = findConnectingPolys(va,vb, target, dtOppositeTile(dir), nei,neia,4); + for (int k = 0; k < nnei; ++k) + { + unsigned int idx = allocLink(tile); + if (idx != DT_NULL_LINK) + { + dtLink* link = &tile->links[idx]; + link->ref = nei[k]; + link->edge = (unsigned char)j; + link->side = (unsigned char)dir; + + link->next = poly->firstLink; + poly->firstLink = idx; + + // Compress portal limits to a byte value. + if (dir == 0 || dir == 4) + { + float tmin = (neia[k*2+0]-va[2]) / (vb[2]-va[2]); + float tmax = (neia[k*2+1]-va[2]) / (vb[2]-va[2]); + if (tmin > tmax) + dtSwap(tmin,tmax); + link->bmin = (unsigned char)(dtClamp(tmin, 0.0f, 1.0f)*255.0f); + link->bmax = (unsigned char)(dtClamp(tmax, 0.0f, 1.0f)*255.0f); + } + else if (dir == 2 || dir == 6) + { + float tmin = (neia[k*2+0]-va[0]) / (vb[0]-va[0]); + float tmax = (neia[k*2+1]-va[0]) / (vb[0]-va[0]); + if (tmin > tmax) + dtSwap(tmin,tmax); + link->bmin = (unsigned char)(dtClamp(tmin, 0.0f, 1.0f)*255.0f); + link->bmax = (unsigned char)(dtClamp(tmax, 0.0f, 1.0f)*255.0f); + } + } + } + } + } +} + +void dtNavMesh::connectExtOffMeshLinks(dtMeshTile* tile, dtMeshTile* target, int side) +{ + if (!tile) return; + + // Connect off-mesh links. + // We are interested on links which land from target tile to this tile. + const unsigned char oppositeSide = (side == -1) ? 0xff : (unsigned char)dtOppositeTile(side); + + for (int i = 0; i < target->header->offMeshConCount; ++i) + { + dtOffMeshConnection* targetCon = &target->offMeshCons[i]; + if (targetCon->side != oppositeSide) + continue; + + dtPoly* targetPoly = &target->polys[targetCon->poly]; + // Skip off-mesh connections which start location could not be connected at all. + if (targetPoly->firstLink == DT_NULL_LINK) + continue; + + const float ext[3] = { targetCon->rad, target->header->walkableClimb, targetCon->rad }; + + // Find polygon to connect to. + const float* p = &targetCon->pos[3]; + float nearestPt[3]; + dtPolyRef ref = findNearestPolyInTile(tile, p, ext, nearestPt); + if (!ref) + continue; + // findNearestPoly may return too optimistic results, further check to make sure. + if (dtSqr(nearestPt[0]-p[0])+dtSqr(nearestPt[2]-p[2]) > dtSqr(targetCon->rad)) + continue; + // Make sure the location is on current mesh. + float* v = &target->verts[targetPoly->verts[1]*3]; + dtVcopy(v, nearestPt); + + // Link off-mesh connection to target poly. + unsigned int idx = allocLink(target); + if (idx != DT_NULL_LINK) + { + dtLink* link = &target->links[idx]; + link->ref = ref; + link->edge = (unsigned char)1; + link->side = oppositeSide; + link->bmin = link->bmax = 0; + // Add to linked list. + link->next = targetPoly->firstLink; + targetPoly->firstLink = idx; + } + + // Link target poly to off-mesh connection. + if (targetCon->flags & DT_OFFMESH_CON_BIDIR) + { + unsigned int tidx = allocLink(tile); + if (tidx != DT_NULL_LINK) + { + const unsigned short landPolyIdx = (unsigned short)decodePolyIdPoly(ref); + dtPoly* landPoly = &tile->polys[landPolyIdx]; + dtLink* link = &tile->links[tidx]; + link->ref = getPolyRefBase(target) | (dtPolyRef)(targetCon->poly); + link->edge = 0xff; + link->side = (unsigned char)(side == -1 ? 0xff : side); + link->bmin = link->bmax = 0; + // Add to linked list. + link->next = landPoly->firstLink; + landPoly->firstLink = tidx; + } + } + } + +} + +void dtNavMesh::connectIntLinks(dtMeshTile* tile) +{ + if (!tile) return; + + dtPolyRef base = getPolyRefBase(tile); + + for (int i = 0; i < tile->header->polyCount; ++i) + { + dtPoly* poly = &tile->polys[i]; + poly->firstLink = DT_NULL_LINK; + + if (poly->getType() == DT_POLYTYPE_OFFMESH_CONNECTION) + continue; + + // Build edge links backwards so that the links will be + // in the linked list from lowest index to highest. + for (int j = poly->vertCount-1; j >= 0; --j) + { + // Skip hard and non-internal edges. + if (poly->neis[j] == 0 || (poly->neis[j] & DT_EXT_LINK)) continue; + + unsigned int idx = allocLink(tile); + if (idx != DT_NULL_LINK) + { + dtLink* link = &tile->links[idx]; + link->ref = base | (dtPolyRef)(poly->neis[j]-1); + link->edge = (unsigned char)j; + link->side = 0xff; + link->bmin = link->bmax = 0; + // Add to linked list. + link->next = poly->firstLink; + poly->firstLink = idx; + } + } + } +} + +void dtNavMesh::baseOffMeshLinks(dtMeshTile* tile) +{ + if (!tile) return; + + dtPolyRef base = getPolyRefBase(tile); + + // Base off-mesh connection start points. + for (int i = 0; i < tile->header->offMeshConCount; ++i) + { + dtOffMeshConnection* con = &tile->offMeshCons[i]; + dtPoly* poly = &tile->polys[con->poly]; + + const float ext[3] = { con->rad, tile->header->walkableClimb, con->rad }; + + // Find polygon to connect to. + const float* p = &con->pos[0]; // First vertex + float nearestPt[3]; + dtPolyRef ref = findNearestPolyInTile(tile, p, ext, nearestPt); + if (!ref) continue; + // findNearestPoly may return too optimistic results, further check to make sure. + if (dtSqr(nearestPt[0]-p[0])+dtSqr(nearestPt[2]-p[2]) > dtSqr(con->rad)) + continue; + // Make sure the location is on current mesh. + float* v = &tile->verts[poly->verts[0]*3]; + dtVcopy(v, nearestPt); + + // Link off-mesh connection to target poly. + unsigned int idx = allocLink(tile); + if (idx != DT_NULL_LINK) + { + dtLink* link = &tile->links[idx]; + link->ref = ref; + link->edge = (unsigned char)0; + link->side = 0xff; + link->bmin = link->bmax = 0; + // Add to linked list. + link->next = poly->firstLink; + poly->firstLink = idx; + } + + // Start end-point is always connect back to off-mesh connection. + unsigned int tidx = allocLink(tile); + if (tidx != DT_NULL_LINK) + { + const unsigned short landPolyIdx = (unsigned short)decodePolyIdPoly(ref); + dtPoly* landPoly = &tile->polys[landPolyIdx]; + dtLink* link = &tile->links[tidx]; + link->ref = base | (dtPolyRef)(con->poly); + link->edge = 0xff; + link->side = 0xff; + link->bmin = link->bmax = 0; + // Add to linked list. + link->next = landPoly->firstLink; + landPoly->firstLink = tidx; + } + } +} + +void dtNavMesh::closestPointOnPoly(dtPolyRef ref, const float* pos, float* closest, bool* posOverPoly) const +{ + const dtMeshTile* tile = 0; + const dtPoly* poly = 0; + getTileAndPolyByRefUnsafe(ref, &tile, &poly); + + // Off-mesh connections don't have detail polygons. + if (poly->getType() == DT_POLYTYPE_OFFMESH_CONNECTION) + { + const float* v0 = &tile->verts[poly->verts[0]*3]; + const float* v1 = &tile->verts[poly->verts[1]*3]; + const float d0 = dtVdist(pos, v0); + const float d1 = dtVdist(pos, v1); + const float u = d0 / (d0+d1); + dtVlerp(closest, v0, v1, u); + if (posOverPoly) + *posOverPoly = false; + return; + } + + const unsigned int ip = (unsigned int)(poly - tile->polys); + const dtPolyDetail* pd = &tile->detailMeshes[ip]; + + // Clamp point to be inside the polygon. + float verts[DT_VERTS_PER_POLYGON*3]; + float edged[DT_VERTS_PER_POLYGON]; + float edget[DT_VERTS_PER_POLYGON]; + const int nv = poly->vertCount; + for (int i = 0; i < nv; ++i) + dtVcopy(&verts[i*3], &tile->verts[poly->verts[i]*3]); + + dtVcopy(closest, pos); + if (!dtDistancePtPolyEdgesSqr(pos, verts, nv, edged, edget)) + { + // Point is outside the polygon, dtClamp to nearest edge. + float dmin = edged[0]; + int imin = 0; + for (int i = 1; i < nv; ++i) + { + if (edged[i] < dmin) + { + dmin = edged[i]; + imin = i; + } + } + const float* va = &verts[imin*3]; + const float* vb = &verts[((imin+1)%nv)*3]; + dtVlerp(closest, va, vb, edget[imin]); + + if (posOverPoly) + *posOverPoly = false; + } + else + { + if (posOverPoly) + *posOverPoly = true; + } + + // Find height at the location. + for (int j = 0; j < pd->triCount; ++j) + { + const unsigned char* t = &tile->detailTris[(pd->triBase+j)*4]; + const float* v[3]; + for (int k = 0; k < 3; ++k) + { + if (t[k] < poly->vertCount) + v[k] = &tile->verts[poly->verts[t[k]]*3]; + else + v[k] = &tile->detailVerts[(pd->vertBase+(t[k]-poly->vertCount))*3]; + } + float h; + if (dtClosestHeightPointTriangle(closest, v[0], v[1], v[2], h)) + { + closest[1] = h; + break; + } + } +} + +dtPolyRef dtNavMesh::findNearestPolyInTile(const dtMeshTile* tile, + const float* center, const float* extents, + float* nearestPt) const +{ + float bmin[3], bmax[3]; + dtVsub(bmin, center, extents); + dtVadd(bmax, center, extents); + + // Get nearby polygons from proximity grid. + dtPolyRef polys[128]; + int polyCount = queryPolygonsInTile(tile, bmin, bmax, polys, 128); + + // Find nearest polygon amongst the nearby polygons. + dtPolyRef nearest = 0; + float nearestDistanceSqr = FLT_MAX; + for (int i = 0; i < polyCount; ++i) + { + dtPolyRef ref = polys[i]; + float closestPtPoly[3]; + float diff[3]; + bool posOverPoly = false; + float d; + closestPointOnPoly(ref, center, closestPtPoly, &posOverPoly); + + // If a point is directly over a polygon and closer than + // climb height, favor that instead of straight line nearest point. + dtVsub(diff, center, closestPtPoly); + if (posOverPoly) + { + d = dtAbs(diff[1]) - tile->header->walkableClimb; + d = d > 0 ? d*d : 0; + } + else + { + d = dtVlenSqr(diff); + } + + if (d < nearestDistanceSqr) + { + dtVcopy(nearestPt, closestPtPoly); + nearestDistanceSqr = d; + nearest = ref; + } + } + + return nearest; +} + +int dtNavMesh::queryPolygonsInTile(const dtMeshTile* tile, const float* qmin, const float* qmax, + dtPolyRef* polys, const int maxPolys) const +{ + if (tile->bvTree) + { + const dtBVNode* node = &tile->bvTree[0]; + const dtBVNode* end = &tile->bvTree[tile->header->bvNodeCount]; + const float* tbmin = tile->header->bmin; + const float* tbmax = tile->header->bmax; + const float qfac = tile->header->bvQuantFactor; + + // Calculate quantized box + unsigned short bmin[3], bmax[3]; + // dtClamp query box to world box. + float minx = dtClamp(qmin[0], tbmin[0], tbmax[0]) - tbmin[0]; + float miny = dtClamp(qmin[1], tbmin[1], tbmax[1]) - tbmin[1]; + float minz = dtClamp(qmin[2], tbmin[2], tbmax[2]) - tbmin[2]; + float maxx = dtClamp(qmax[0], tbmin[0], tbmax[0]) - tbmin[0]; + float maxy = dtClamp(qmax[1], tbmin[1], tbmax[1]) - tbmin[1]; + float maxz = dtClamp(qmax[2], tbmin[2], tbmax[2]) - tbmin[2]; + // Quantize + bmin[0] = (unsigned short)(qfac * minx) & 0xfffe; + bmin[1] = (unsigned short)(qfac * miny) & 0xfffe; + bmin[2] = (unsigned short)(qfac * minz) & 0xfffe; + bmax[0] = (unsigned short)(qfac * maxx + 1) | 1; + bmax[1] = (unsigned short)(qfac * maxy + 1) | 1; + bmax[2] = (unsigned short)(qfac * maxz + 1) | 1; + + // Traverse tree + dtPolyRef base = getPolyRefBase(tile); + int n = 0; + while (node < end) + { + const bool overlap = dtOverlapQuantBounds(bmin, bmax, node->bmin, node->bmax); + const bool isLeafNode = node->i >= 0; + + if (isLeafNode && overlap) + { + if (n < maxPolys) + polys[n++] = base | (dtPolyRef)node->i; + } + + if (overlap || isLeafNode) + node++; + else + { + const int escapeIndex = -node->i; + node += escapeIndex; + } + } + + return n; + } + else + { + float bmin[3], bmax[3]; + int n = 0; + dtPolyRef base = getPolyRefBase(tile); + for (int i = 0; i < tile->header->polyCount; ++i) + { + dtPoly* p = &tile->polys[i]; + // Do not return off-mesh connection polygons. + if (p->getType() == DT_POLYTYPE_OFFMESH_CONNECTION) + continue; + // Calc polygon bounds. + const float* v = &tile->verts[p->verts[0]*3]; + dtVcopy(bmin, v); + dtVcopy(bmax, v); + for (int j = 1; j < p->vertCount; ++j) + { + v = &tile->verts[p->verts[j]*3]; + dtVmin(bmin, v); + dtVmax(bmax, v); + } + if (dtOverlapBounds(qmin,qmax, bmin,bmax)) + { + if (n < maxPolys) + polys[n++] = base | (dtPolyRef)i; + } + } + return n; + } +} + +/// @par +/// +/// The add operation will fail if the data is in the wrong format, the allocated tile +/// space is full, or there is a tile already at the specified reference. +/// +/// The lastRef parameter is used to restore a tile with the same tile +/// reference it had previously used. In this case the #dtPolyRef's for the +/// tile will be restored to the same values they were before the tile was +/// removed. +/// +/// The nav mesh assumes exclusive access to the data passed and will make +/// changes to the dynamic portion of the data. For that reason the data +/// should not be reused in other nav meshes until the tile has been successfully +/// removed from this nav mesh. +/// +/// @see dtCreateNavMeshData, #removeTile +dtStatus dtNavMesh::addTile(unsigned char* data, int dataSize, int flags, + dtTileRef lastRef, dtTileRef* result) +{ + // Make sure the data is in right format. + dtMeshHeader* header = (dtMeshHeader*)data; + if (header->magic != DT_NAVMESH_MAGIC) + return DT_FAILURE | DT_WRONG_MAGIC; + if (header->version != DT_NAVMESH_VERSION) + return DT_FAILURE | DT_WRONG_VERSION; + + // Make sure the location is free. + if (getTileAt(header->x, header->y, header->layer)) + return DT_FAILURE; + + // Allocate a tile. + dtMeshTile* tile = 0; + if (!lastRef) + { + if (m_nextFree) + { + tile = m_nextFree; + m_nextFree = tile->next; + tile->next = 0; + } + } + else + { + // Try to relocate the tile to specific index with same salt. + int tileIndex = (int)decodePolyIdTile((dtPolyRef)lastRef); + if (tileIndex >= m_maxTiles) + return DT_FAILURE | DT_OUT_OF_MEMORY; + // Try to find the specific tile id from the free list. + dtMeshTile* target = &m_tiles[tileIndex]; + dtMeshTile* prev = 0; + tile = m_nextFree; + while (tile && tile != target) + { + prev = tile; + tile = tile->next; + } + // Could not find the correct location. + if (tile != target) + return DT_FAILURE | DT_OUT_OF_MEMORY; + // Remove from freelist + if (!prev) + m_nextFree = tile->next; + else + prev->next = tile->next; + + // Restore salt. + tile->salt = decodePolyIdSalt((dtPolyRef)lastRef); + } + + // Make sure we could allocate a tile. + if (!tile) + return DT_FAILURE | DT_OUT_OF_MEMORY; + + // Insert tile into the position lut. + int h = computeTileHash(header->x, header->y, m_tileLutMask); + tile->next = m_posLookup[h]; + m_posLookup[h] = tile; + + // Patch header pointers. + const int headerSize = dtAlign4(sizeof(dtMeshHeader)); + const int vertsSize = dtAlign4(sizeof(float)*3*header->vertCount); + const int polysSize = dtAlign4(sizeof(dtPoly)*header->polyCount); + const int linksSize = dtAlign4(sizeof(dtLink)*(header->maxLinkCount)); + const int detailMeshesSize = dtAlign4(sizeof(dtPolyDetail)*header->detailMeshCount); + const int detailVertsSize = dtAlign4(sizeof(float)*3*header->detailVertCount); + const int detailTrisSize = dtAlign4(sizeof(unsigned char)*4*header->detailTriCount); + const int bvtreeSize = dtAlign4(sizeof(dtBVNode)*header->bvNodeCount); + const int offMeshLinksSize = dtAlign4(sizeof(dtOffMeshConnection)*header->offMeshConCount); + + unsigned char* d = data + headerSize; + tile->verts = dtGetThenAdvanceBufferPointer(d, vertsSize); + tile->polys = dtGetThenAdvanceBufferPointer(d, polysSize); + tile->links = dtGetThenAdvanceBufferPointer(d, linksSize); + tile->detailMeshes = dtGetThenAdvanceBufferPointer(d, detailMeshesSize); + tile->detailVerts = dtGetThenAdvanceBufferPointer(d, detailVertsSize); + tile->detailTris = dtGetThenAdvanceBufferPointer(d, detailTrisSize); + tile->bvTree = dtGetThenAdvanceBufferPointer(d, bvtreeSize); + tile->offMeshCons = dtGetThenAdvanceBufferPointer(d, offMeshLinksSize); + + // If there are no items in the bvtree, reset the tree pointer. + if (!bvtreeSize) + tile->bvTree = 0; + + // Build links freelist + tile->linksFreeList = 0; + tile->links[header->maxLinkCount-1].next = DT_NULL_LINK; + for (int i = 0; i < header->maxLinkCount-1; ++i) + tile->links[i].next = i+1; + + // Init tile. + tile->header = header; + tile->data = data; + tile->dataSize = dataSize; + tile->flags = flags; + + connectIntLinks(tile); + + // Base off-mesh connections to their starting polygons and connect connections inside the tile. + baseOffMeshLinks(tile); + connectExtOffMeshLinks(tile, tile, -1); + + // Create connections with neighbour tiles. + static const int MAX_NEIS = 32; + dtMeshTile* neis[MAX_NEIS]; + int nneis; + + // Connect with layers in current tile. + nneis = getTilesAt(header->x, header->y, neis, MAX_NEIS); + for (int j = 0; j < nneis; ++j) + { + if (neis[j] == tile) + continue; + + connectExtLinks(tile, neis[j], -1); + connectExtLinks(neis[j], tile, -1); + connectExtOffMeshLinks(tile, neis[j], -1); + connectExtOffMeshLinks(neis[j], tile, -1); + } + + // Connect with neighbour tiles. + for (int i = 0; i < 8; ++i) + { + nneis = getNeighbourTilesAt(header->x, header->y, i, neis, MAX_NEIS); + for (int j = 0; j < nneis; ++j) + { + connectExtLinks(tile, neis[j], i); + connectExtLinks(neis[j], tile, dtOppositeTile(i)); + connectExtOffMeshLinks(tile, neis[j], i); + connectExtOffMeshLinks(neis[j], tile, dtOppositeTile(i)); + } + } + + if (result) + *result = getTileRef(tile); + + return DT_SUCCESS; +} + +const dtMeshTile* dtNavMesh::getTileAt(const int x, const int y, const int layer) const +{ + // Find tile based on hash. + int h = computeTileHash(x,y,m_tileLutMask); + dtMeshTile* tile = m_posLookup[h]; + while (tile) + { + if (tile->header && + tile->header->x == x && + tile->header->y == y && + tile->header->layer == layer) + { + return tile; + } + tile = tile->next; + } + return 0; +} + +int dtNavMesh::getNeighbourTilesAt(const int x, const int y, const int side, dtMeshTile** tiles, const int maxTiles) const +{ + int nx = x, ny = y; + switch (side) + { + case 0: nx++; break; + case 1: nx++; ny++; break; + case 2: ny++; break; + case 3: nx--; ny++; break; + case 4: nx--; break; + case 5: nx--; ny--; break; + case 6: ny--; break; + case 7: nx++; ny--; break; + }; + + return getTilesAt(nx, ny, tiles, maxTiles); +} + +int dtNavMesh::getTilesAt(const int x, const int y, dtMeshTile** tiles, const int maxTiles) const +{ + int n = 0; + + // Find tile based on hash. + int h = computeTileHash(x,y,m_tileLutMask); + dtMeshTile* tile = m_posLookup[h]; + while (tile) + { + if (tile->header && + tile->header->x == x && + tile->header->y == y) + { + if (n < maxTiles) + tiles[n++] = tile; + } + tile = tile->next; + } + + return n; +} + +/// @par +/// +/// This function will not fail if the tiles array is too small to hold the +/// entire result set. It will simply fill the array to capacity. +int dtNavMesh::getTilesAt(const int x, const int y, dtMeshTile const** tiles, const int maxTiles) const +{ + int n = 0; + + // Find tile based on hash. + int h = computeTileHash(x,y,m_tileLutMask); + dtMeshTile* tile = m_posLookup[h]; + while (tile) + { + if (tile->header && + tile->header->x == x && + tile->header->y == y) + { + if (n < maxTiles) + tiles[n++] = tile; + } + tile = tile->next; + } + + return n; +} + + +dtTileRef dtNavMesh::getTileRefAt(const int x, const int y, const int layer) const +{ + // Find tile based on hash. + int h = computeTileHash(x,y,m_tileLutMask); + dtMeshTile* tile = m_posLookup[h]; + while (tile) + { + if (tile->header && + tile->header->x == x && + tile->header->y == y && + tile->header->layer == layer) + { + return getTileRef(tile); + } + tile = tile->next; + } + return 0; +} + +const dtMeshTile* dtNavMesh::getTileByRef(dtTileRef ref) const +{ + if (!ref) + return 0; + unsigned int tileIndex = decodePolyIdTile((dtPolyRef)ref); + unsigned int tileSalt = decodePolyIdSalt((dtPolyRef)ref); + if ((int)tileIndex >= m_maxTiles) + return 0; + const dtMeshTile* tile = &m_tiles[tileIndex]; + if (tile->salt != tileSalt) + return 0; + return tile; +} + +int dtNavMesh::getMaxTiles() const +{ + return m_maxTiles; +} + +dtMeshTile* dtNavMesh::getTile(int i) +{ + return &m_tiles[i]; +} + +const dtMeshTile* dtNavMesh::getTile(int i) const +{ + return &m_tiles[i]; +} + +void dtNavMesh::calcTileLoc(const float* pos, int* tx, int* ty) const +{ + *tx = (int)floorf((pos[0]-m_orig[0]) / m_tileWidth); + *ty = (int)floorf((pos[2]-m_orig[2]) / m_tileHeight); +} + +dtStatus dtNavMesh::getTileAndPolyByRef(const dtPolyRef ref, const dtMeshTile** tile, const dtPoly** poly) const +{ + if (!ref) return DT_FAILURE; + unsigned int salt, it, ip; + decodePolyId(ref, salt, it, ip); + if (it >= (unsigned int)m_maxTiles) return DT_FAILURE | DT_INVALID_PARAM; + if (m_tiles[it].salt != salt || m_tiles[it].header == 0) return DT_FAILURE | DT_INVALID_PARAM; + if (ip >= (unsigned int)m_tiles[it].header->polyCount) return DT_FAILURE | DT_INVALID_PARAM; + *tile = &m_tiles[it]; + *poly = &m_tiles[it].polys[ip]; + return DT_SUCCESS; +} + +/// @par +/// +/// @warning Only use this function if it is known that the provided polygon +/// reference is valid. This function is faster than #getTileAndPolyByRef, but +/// it does not validate the reference. +void dtNavMesh::getTileAndPolyByRefUnsafe(const dtPolyRef ref, const dtMeshTile** tile, const dtPoly** poly) const +{ + unsigned int salt, it, ip; + decodePolyId(ref, salt, it, ip); + *tile = &m_tiles[it]; + *poly = &m_tiles[it].polys[ip]; +} + +bool dtNavMesh::isValidPolyRef(dtPolyRef ref) const +{ + if (!ref) return false; + unsigned int salt, it, ip; + decodePolyId(ref, salt, it, ip); + if (it >= (unsigned int)m_maxTiles) return false; + if (m_tiles[it].salt != salt || m_tiles[it].header == 0) return false; + if (ip >= (unsigned int)m_tiles[it].header->polyCount) return false; + return true; +} + +/// @par +/// +/// This function returns the data for the tile so that, if desired, +/// it can be added back to the navigation mesh at a later point. +/// +/// @see #addTile +dtStatus dtNavMesh::removeTile(dtTileRef ref, unsigned char** data, int* dataSize) +{ + if (!ref) + return DT_FAILURE | DT_INVALID_PARAM; + unsigned int tileIndex = decodePolyIdTile((dtPolyRef)ref); + unsigned int tileSalt = decodePolyIdSalt((dtPolyRef)ref); + if ((int)tileIndex >= m_maxTiles) + return DT_FAILURE | DT_INVALID_PARAM; + dtMeshTile* tile = &m_tiles[tileIndex]; + if (tile->salt != tileSalt) + return DT_FAILURE | DT_INVALID_PARAM; + + // Remove tile from hash lookup. + int h = computeTileHash(tile->header->x,tile->header->y,m_tileLutMask); + dtMeshTile* prev = 0; + dtMeshTile* cur = m_posLookup[h]; + while (cur) + { + if (cur == tile) + { + if (prev) + prev->next = cur->next; + else + m_posLookup[h] = cur->next; + break; + } + prev = cur; + cur = cur->next; + } + + // Remove connections to neighbour tiles. + static const int MAX_NEIS = 32; + dtMeshTile* neis[MAX_NEIS]; + int nneis; + + // Disconnect from other layers in current tile. + nneis = getTilesAt(tile->header->x, tile->header->y, neis, MAX_NEIS); + for (int j = 0; j < nneis; ++j) + { + if (neis[j] == tile) continue; + unconnectLinks(neis[j], tile); + } + + // Disconnect from neighbour tiles. + for (int i = 0; i < 8; ++i) + { + nneis = getNeighbourTilesAt(tile->header->x, tile->header->y, i, neis, MAX_NEIS); + for (int j = 0; j < nneis; ++j) + unconnectLinks(neis[j], tile); + } + + // Reset tile. + if (tile->flags & DT_TILE_FREE_DATA) + { + // Owns data + dtFree(tile->data); + tile->data = 0; + tile->dataSize = 0; + if (data) *data = 0; + if (dataSize) *dataSize = 0; + } + else + { + if (data) *data = tile->data; + if (dataSize) *dataSize = tile->dataSize; + } + + tile->header = 0; + tile->flags = 0; + tile->linksFreeList = 0; + tile->polys = 0; + tile->verts = 0; + tile->links = 0; + tile->detailMeshes = 0; + tile->detailVerts = 0; + tile->detailTris = 0; + tile->bvTree = 0; + tile->offMeshCons = 0; + + // Update salt, salt should never be zero. +#ifdef DT_POLYREF64 + tile->salt = (tile->salt+1) & ((1<salt = (tile->salt+1) & ((1<salt == 0) + tile->salt++; + + // Add to free list. + tile->next = m_nextFree; + m_nextFree = tile; + + return DT_SUCCESS; +} + +dtTileRef dtNavMesh::getTileRef(const dtMeshTile* tile) const +{ + if (!tile) return 0; + const unsigned int it = (unsigned int)(tile - m_tiles); + return (dtTileRef)encodePolyId(tile->salt, it, 0); +} + +/// @par +/// +/// Example use case: +/// @code +/// +/// const dtPolyRef base = navmesh->getPolyRefBase(tile); +/// for (int i = 0; i < tile->header->polyCount; ++i) +/// { +/// const dtPoly* p = &tile->polys[i]; +/// const dtPolyRef ref = base | (dtPolyRef)i; +/// +/// // Use the reference to access the polygon data. +/// } +/// @endcode +dtPolyRef dtNavMesh::getPolyRefBase(const dtMeshTile* tile) const +{ + if (!tile) return 0; + const unsigned int it = (unsigned int)(tile - m_tiles); + return encodePolyId(tile->salt, it, 0); +} + +struct dtTileState +{ + int magic; // Magic number, used to identify the data. + int version; // Data version number. + dtTileRef ref; // Tile ref at the time of storing the data. +}; + +struct dtPolyState +{ + unsigned short flags; // Flags (see dtPolyFlags). + unsigned char area; // Area ID of the polygon. +}; + +/// @see #storeTileState +int dtNavMesh::getTileStateSize(const dtMeshTile* tile) const +{ + if (!tile) return 0; + const int headerSize = dtAlign4(sizeof(dtTileState)); + const int polyStateSize = dtAlign4(sizeof(dtPolyState) * tile->header->polyCount); + return headerSize + polyStateSize; +} + +/// @par +/// +/// Tile state includes non-structural data such as polygon flags, area ids, etc. +/// @note The state data is only valid until the tile reference changes. +/// @see #getTileStateSize, #restoreTileState +dtStatus dtNavMesh::storeTileState(const dtMeshTile* tile, unsigned char* data, const int maxDataSize) const +{ + // Make sure there is enough space to store the state. + const int sizeReq = getTileStateSize(tile); + if (maxDataSize < sizeReq) + return DT_FAILURE | DT_BUFFER_TOO_SMALL; + + dtTileState* tileState = dtGetThenAdvanceBufferPointer(data, dtAlign4(sizeof(dtTileState))); + dtPolyState* polyStates = dtGetThenAdvanceBufferPointer(data, dtAlign4(sizeof(dtPolyState) * tile->header->polyCount)); + + // Store tile state. + tileState->magic = DT_NAVMESH_STATE_MAGIC; + tileState->version = DT_NAVMESH_STATE_VERSION; + tileState->ref = getTileRef(tile); + + // Store per poly state. + for (int i = 0; i < tile->header->polyCount; ++i) + { + const dtPoly* p = &tile->polys[i]; + dtPolyState* s = &polyStates[i]; + s->flags = p->flags; + s->area = p->getArea(); + } + + return DT_SUCCESS; +} + +/// @par +/// +/// Tile state includes non-structural data such as polygon flags, area ids, etc. +/// @note This function does not impact the tile's #dtTileRef and #dtPolyRef's. +/// @see #storeTileState +dtStatus dtNavMesh::restoreTileState(dtMeshTile* tile, const unsigned char* data, const int maxDataSize) +{ + // Make sure there is enough space to store the state. + const int sizeReq = getTileStateSize(tile); + if (maxDataSize < sizeReq) + return DT_FAILURE | DT_INVALID_PARAM; + + const dtTileState* tileState = dtGetThenAdvanceBufferPointer(data, dtAlign4(sizeof(dtTileState))); + const dtPolyState* polyStates = dtGetThenAdvanceBufferPointer(data, dtAlign4(sizeof(dtPolyState) * tile->header->polyCount)); + + // Check that the restore is possible. + if (tileState->magic != DT_NAVMESH_STATE_MAGIC) + return DT_FAILURE | DT_WRONG_MAGIC; + if (tileState->version != DT_NAVMESH_STATE_VERSION) + return DT_FAILURE | DT_WRONG_VERSION; + if (tileState->ref != getTileRef(tile)) + return DT_FAILURE | DT_INVALID_PARAM; + + // Restore per poly state. + for (int i = 0; i < tile->header->polyCount; ++i) + { + dtPoly* p = &tile->polys[i]; + const dtPolyState* s = &polyStates[i]; + p->flags = s->flags; + p->setArea(s->area); + } + + return DT_SUCCESS; +} + +/// @par +/// +/// Off-mesh connections are stored in the navigation mesh as special 2-vertex +/// polygons with a single edge. At least one of the vertices is expected to be +/// inside a normal polygon. So an off-mesh connection is "entered" from a +/// normal polygon at one of its endpoints. This is the polygon identified by +/// the prevRef parameter. +dtStatus dtNavMesh::getOffMeshConnectionPolyEndPoints(dtPolyRef prevRef, dtPolyRef polyRef, float* startPos, float* endPos) const +{ + unsigned int salt, it, ip; + + if (!polyRef) + return DT_FAILURE; + + // Get current polygon + decodePolyId(polyRef, salt, it, ip); + if (it >= (unsigned int)m_maxTiles) return DT_FAILURE | DT_INVALID_PARAM; + if (m_tiles[it].salt != salt || m_tiles[it].header == 0) return DT_FAILURE | DT_INVALID_PARAM; + const dtMeshTile* tile = &m_tiles[it]; + if (ip >= (unsigned int)tile->header->polyCount) return DT_FAILURE | DT_INVALID_PARAM; + const dtPoly* poly = &tile->polys[ip]; + + // Make sure that the current poly is indeed off-mesh link. + if (poly->getType() != DT_POLYTYPE_OFFMESH_CONNECTION) + return DT_FAILURE; + + // Figure out which way to hand out the vertices. + int idx0 = 0, idx1 = 1; + + // Find link that points to first vertex. + for (unsigned int i = poly->firstLink; i != DT_NULL_LINK; i = tile->links[i].next) + { + if (tile->links[i].edge == 0) + { + if (tile->links[i].ref != prevRef) + { + idx0 = 1; + idx1 = 0; + } + break; + } + } + + dtVcopy(startPos, &tile->verts[poly->verts[idx0]*3]); + dtVcopy(endPos, &tile->verts[poly->verts[idx1]*3]); + + return DT_SUCCESS; +} + + +const dtOffMeshConnection* dtNavMesh::getOffMeshConnectionByRef(dtPolyRef ref) const +{ + unsigned int salt, it, ip; + + if (!ref) + return 0; + + // Get current polygon + decodePolyId(ref, salt, it, ip); + if (it >= (unsigned int)m_maxTiles) return 0; + if (m_tiles[it].salt != salt || m_tiles[it].header == 0) return 0; + const dtMeshTile* tile = &m_tiles[it]; + if (ip >= (unsigned int)tile->header->polyCount) return 0; + const dtPoly* poly = &tile->polys[ip]; + + // Make sure that the current poly is indeed off-mesh link. + if (poly->getType() != DT_POLYTYPE_OFFMESH_CONNECTION) + return 0; + + const unsigned int idx = ip - tile->header->offMeshBase; + dtAssert(idx < (unsigned int)tile->header->offMeshConCount); + return &tile->offMeshCons[idx]; +} + + +dtStatus dtNavMesh::setPolyFlags(dtPolyRef ref, unsigned short flags) +{ + if (!ref) return DT_FAILURE; + unsigned int salt, it, ip; + decodePolyId(ref, salt, it, ip); + if (it >= (unsigned int)m_maxTiles) return DT_FAILURE | DT_INVALID_PARAM; + if (m_tiles[it].salt != salt || m_tiles[it].header == 0) return DT_FAILURE | DT_INVALID_PARAM; + dtMeshTile* tile = &m_tiles[it]; + if (ip >= (unsigned int)tile->header->polyCount) return DT_FAILURE | DT_INVALID_PARAM; + dtPoly* poly = &tile->polys[ip]; + + // Change flags. + poly->flags = flags; + + return DT_SUCCESS; +} + +dtStatus dtNavMesh::getPolyFlags(dtPolyRef ref, unsigned short* resultFlags) const +{ + if (!ref) return DT_FAILURE; + unsigned int salt, it, ip; + decodePolyId(ref, salt, it, ip); + if (it >= (unsigned int)m_maxTiles) return DT_FAILURE | DT_INVALID_PARAM; + if (m_tiles[it].salt != salt || m_tiles[it].header == 0) return DT_FAILURE | DT_INVALID_PARAM; + const dtMeshTile* tile = &m_tiles[it]; + if (ip >= (unsigned int)tile->header->polyCount) return DT_FAILURE | DT_INVALID_PARAM; + const dtPoly* poly = &tile->polys[ip]; + + *resultFlags = poly->flags; + + return DT_SUCCESS; +} + +dtStatus dtNavMesh::setPolyArea(dtPolyRef ref, unsigned char area) +{ + if (!ref) return DT_FAILURE; + unsigned int salt, it, ip; + decodePolyId(ref, salt, it, ip); + if (it >= (unsigned int)m_maxTiles) return DT_FAILURE | DT_INVALID_PARAM; + if (m_tiles[it].salt != salt || m_tiles[it].header == 0) return DT_FAILURE | DT_INVALID_PARAM; + dtMeshTile* tile = &m_tiles[it]; + if (ip >= (unsigned int)tile->header->polyCount) return DT_FAILURE | DT_INVALID_PARAM; + dtPoly* poly = &tile->polys[ip]; + + poly->setArea(area); + + return DT_SUCCESS; +} + +dtStatus dtNavMesh::getPolyArea(dtPolyRef ref, unsigned char* resultArea) const +{ + if (!ref) return DT_FAILURE; + unsigned int salt, it, ip; + decodePolyId(ref, salt, it, ip); + if (it >= (unsigned int)m_maxTiles) return DT_FAILURE | DT_INVALID_PARAM; + if (m_tiles[it].salt != salt || m_tiles[it].header == 0) return DT_FAILURE | DT_INVALID_PARAM; + const dtMeshTile* tile = &m_tiles[it]; + if (ip >= (unsigned int)tile->header->polyCount) return DT_FAILURE | DT_INVALID_PARAM; + const dtPoly* poly = &tile->polys[ip]; + + *resultArea = poly->getArea(); + + return DT_SUCCESS; +} + diff --git a/libs/recast/detour/src/DetourNavMeshBuilder.cpp b/libs/recast/detour/src/DetourNavMeshBuilder.cpp new file mode 100644 index 000000000..e93a97629 --- /dev/null +++ b/libs/recast/detour/src/DetourNavMeshBuilder.cpp @@ -0,0 +1,802 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#include +#include +#include +#include +#include "DetourNavMesh.h" +#include "DetourCommon.h" +#include "DetourMath.h" +#include "DetourNavMeshBuilder.h" +#include "DetourAlloc.h" +#include "DetourAssert.h" + +static unsigned short MESH_NULL_IDX = 0xffff; + + +struct BVItem +{ + unsigned short bmin[3]; + unsigned short bmax[3]; + int i; +}; + +static int compareItemX(const void* va, const void* vb) +{ + const BVItem* a = (const BVItem*)va; + const BVItem* b = (const BVItem*)vb; + if (a->bmin[0] < b->bmin[0]) + return -1; + if (a->bmin[0] > b->bmin[0]) + return 1; + return 0; +} + +static int compareItemY(const void* va, const void* vb) +{ + const BVItem* a = (const BVItem*)va; + const BVItem* b = (const BVItem*)vb; + if (a->bmin[1] < b->bmin[1]) + return -1; + if (a->bmin[1] > b->bmin[1]) + return 1; + return 0; +} + +static int compareItemZ(const void* va, const void* vb) +{ + const BVItem* a = (const BVItem*)va; + const BVItem* b = (const BVItem*)vb; + if (a->bmin[2] < b->bmin[2]) + return -1; + if (a->bmin[2] > b->bmin[2]) + return 1; + return 0; +} + +static void calcExtends(BVItem* items, const int /*nitems*/, const int imin, const int imax, + unsigned short* bmin, unsigned short* bmax) +{ + bmin[0] = items[imin].bmin[0]; + bmin[1] = items[imin].bmin[1]; + bmin[2] = items[imin].bmin[2]; + + bmax[0] = items[imin].bmax[0]; + bmax[1] = items[imin].bmax[1]; + bmax[2] = items[imin].bmax[2]; + + for (int i = imin+1; i < imax; ++i) + { + const BVItem& it = items[i]; + if (it.bmin[0] < bmin[0]) bmin[0] = it.bmin[0]; + if (it.bmin[1] < bmin[1]) bmin[1] = it.bmin[1]; + if (it.bmin[2] < bmin[2]) bmin[2] = it.bmin[2]; + + if (it.bmax[0] > bmax[0]) bmax[0] = it.bmax[0]; + if (it.bmax[1] > bmax[1]) bmax[1] = it.bmax[1]; + if (it.bmax[2] > bmax[2]) bmax[2] = it.bmax[2]; + } +} + +inline int longestAxis(unsigned short x, unsigned short y, unsigned short z) +{ + int axis = 0; + unsigned short maxVal = x; + if (y > maxVal) + { + axis = 1; + maxVal = y; + } + if (z > maxVal) + { + axis = 2; + } + return axis; +} + +static void subdivide(BVItem* items, int nitems, int imin, int imax, int& curNode, dtBVNode* nodes) +{ + int inum = imax - imin; + int icur = curNode; + + dtBVNode& node = nodes[curNode++]; + + if (inum == 1) + { + // Leaf + node.bmin[0] = items[imin].bmin[0]; + node.bmin[1] = items[imin].bmin[1]; + node.bmin[2] = items[imin].bmin[2]; + + node.bmax[0] = items[imin].bmax[0]; + node.bmax[1] = items[imin].bmax[1]; + node.bmax[2] = items[imin].bmax[2]; + + node.i = items[imin].i; + } + else + { + // Split + calcExtends(items, nitems, imin, imax, node.bmin, node.bmax); + + int axis = longestAxis(node.bmax[0] - node.bmin[0], + node.bmax[1] - node.bmin[1], + node.bmax[2] - node.bmin[2]); + + if (axis == 0) + { + // Sort along x-axis + qsort(items+imin, inum, sizeof(BVItem), compareItemX); + } + else if (axis == 1) + { + // Sort along y-axis + qsort(items+imin, inum, sizeof(BVItem), compareItemY); + } + else + { + // Sort along z-axis + qsort(items+imin, inum, sizeof(BVItem), compareItemZ); + } + + int isplit = imin+inum/2; + + // Left + subdivide(items, nitems, imin, isplit, curNode, nodes); + // Right + subdivide(items, nitems, isplit, imax, curNode, nodes); + + int iescape = curNode - icur; + // Negative index means escape. + node.i = -iescape; + } +} + +static int createBVTree(dtNavMeshCreateParams* params, dtBVNode* nodes, int /*nnodes*/) +{ + // Build tree + float quantFactor = 1 / params->cs; + BVItem* items = (BVItem*)dtAlloc(sizeof(BVItem)*params->polyCount, DT_ALLOC_TEMP); + for (int i = 0; i < params->polyCount; i++) + { + BVItem& it = items[i]; + it.i = i; + // Calc polygon bounds. Use detail meshes if available. + if (params->detailMeshes) + { + int vb = (int)params->detailMeshes[i*4+0]; + int ndv = (int)params->detailMeshes[i*4+1]; + float bmin[3]; + float bmax[3]; + + const float* dv = ¶ms->detailVerts[vb*3]; + dtVcopy(bmin, dv); + dtVcopy(bmax, dv); + + for (int j = 1; j < ndv; j++) + { + dtVmin(bmin, &dv[j * 3]); + dtVmax(bmax, &dv[j * 3]); + } + + // BV-tree uses cs for all dimensions + it.bmin[0] = (unsigned short)dtClamp((int)((bmin[0] - params->bmin[0])*quantFactor), 0, 0xffff); + it.bmin[1] = (unsigned short)dtClamp((int)((bmin[1] - params->bmin[1])*quantFactor), 0, 0xffff); + it.bmin[2] = (unsigned short)dtClamp((int)((bmin[2] - params->bmin[2])*quantFactor), 0, 0xffff); + + it.bmax[0] = (unsigned short)dtClamp((int)((bmax[0] - params->bmin[0])*quantFactor), 0, 0xffff); + it.bmax[1] = (unsigned short)dtClamp((int)((bmax[1] - params->bmin[1])*quantFactor), 0, 0xffff); + it.bmax[2] = (unsigned short)dtClamp((int)((bmax[2] - params->bmin[2])*quantFactor), 0, 0xffff); + } + else + { + const unsigned short* p = ¶ms->polys[i*params->nvp * 2]; + it.bmin[0] = it.bmax[0] = params->verts[p[0] * 3 + 0]; + it.bmin[1] = it.bmax[1] = params->verts[p[0] * 3 + 1]; + it.bmin[2] = it.bmax[2] = params->verts[p[0] * 3 + 2]; + + for (int j = 1; j < params->nvp; ++j) + { + if (p[j] == MESH_NULL_IDX) break; + unsigned short x = params->verts[p[j] * 3 + 0]; + unsigned short y = params->verts[p[j] * 3 + 1]; + unsigned short z = params->verts[p[j] * 3 + 2]; + + if (x < it.bmin[0]) it.bmin[0] = x; + if (y < it.bmin[1]) it.bmin[1] = y; + if (z < it.bmin[2]) it.bmin[2] = z; + + if (x > it.bmax[0]) it.bmax[0] = x; + if (y > it.bmax[1]) it.bmax[1] = y; + if (z > it.bmax[2]) it.bmax[2] = z; + } + // Remap y + it.bmin[1] = (unsigned short)dtMathFloorf((float)it.bmin[1] * params->ch / params->cs); + it.bmax[1] = (unsigned short)dtMathCeilf((float)it.bmax[1] * params->ch / params->cs); + } + } + + int curNode = 0; + subdivide(items, params->polyCount, 0, params->polyCount, curNode, nodes); + + dtFree(items); + + return curNode; +} + +static unsigned char classifyOffMeshPoint(const float* pt, const float* bmin, const float* bmax) +{ + static const unsigned char XP = 1<<0; + static const unsigned char ZP = 1<<1; + static const unsigned char XM = 1<<2; + static const unsigned char ZM = 1<<3; + + unsigned char outcode = 0; + outcode |= (pt[0] >= bmax[0]) ? XP : 0; + outcode |= (pt[2] >= bmax[2]) ? ZP : 0; + outcode |= (pt[0] < bmin[0]) ? XM : 0; + outcode |= (pt[2] < bmin[2]) ? ZM : 0; + + switch (outcode) + { + case XP: return 0; + case XP|ZP: return 1; + case ZP: return 2; + case XM|ZP: return 3; + case XM: return 4; + case XM|ZM: return 5; + case ZM: return 6; + case XP|ZM: return 7; + }; + + return 0xff; +} + +// TODO: Better error handling. + +/// @par +/// +/// The output data array is allocated using the detour allocator (dtAlloc()). The method +/// used to free the memory will be determined by how the tile is added to the navigation +/// mesh. +/// +/// @see dtNavMesh, dtNavMesh::addTile() +bool dtCreateNavMeshData(dtNavMeshCreateParams* params, unsigned char** outData, int* outDataSize) +{ + if (params->nvp > DT_VERTS_PER_POLYGON) + return false; + if (params->vertCount >= 0xffff) + return false; + if (!params->vertCount || !params->verts) + return false; + if (!params->polyCount || !params->polys) + return false; + + const int nvp = params->nvp; + + // Classify off-mesh connection points. We store only the connections + // whose start point is inside the tile. + unsigned char* offMeshConClass = 0; + int storedOffMeshConCount = 0; + int offMeshConLinkCount = 0; + + if (params->offMeshConCount > 0) + { + offMeshConClass = (unsigned char*)dtAlloc(sizeof(unsigned char)*params->offMeshConCount*2, DT_ALLOC_TEMP); + if (!offMeshConClass) + return false; + + // Find tight heigh bounds, used for culling out off-mesh start locations. + float hmin = FLT_MAX; + float hmax = -FLT_MAX; + + if (params->detailVerts && params->detailVertsCount) + { + for (int i = 0; i < params->detailVertsCount; ++i) + { + const float h = params->detailVerts[i*3+1]; + hmin = dtMin(hmin,h); + hmax = dtMax(hmax,h); + } + } + else + { + for (int i = 0; i < params->vertCount; ++i) + { + const unsigned short* iv = ¶ms->verts[i*3]; + const float h = params->bmin[1] + iv[1] * params->ch; + hmin = dtMin(hmin,h); + hmax = dtMax(hmax,h); + } + } + hmin -= params->walkableClimb; + hmax += params->walkableClimb; + float bmin[3], bmax[3]; + dtVcopy(bmin, params->bmin); + dtVcopy(bmax, params->bmax); + bmin[1] = hmin; + bmax[1] = hmax; + + for (int i = 0; i < params->offMeshConCount; ++i) + { + const float* p0 = ¶ms->offMeshConVerts[(i*2+0)*3]; + const float* p1 = ¶ms->offMeshConVerts[(i*2+1)*3]; + offMeshConClass[i*2+0] = classifyOffMeshPoint(p0, bmin, bmax); + offMeshConClass[i*2+1] = classifyOffMeshPoint(p1, bmin, bmax); + + // Zero out off-mesh start positions which are not even potentially touching the mesh. + if (offMeshConClass[i*2+0] == 0xff) + { + if (p0[1] < bmin[1] || p0[1] > bmax[1]) + offMeshConClass[i*2+0] = 0; + } + + // Cound how many links should be allocated for off-mesh connections. + if (offMeshConClass[i*2+0] == 0xff) + offMeshConLinkCount++; + if (offMeshConClass[i*2+1] == 0xff) + offMeshConLinkCount++; + + if (offMeshConClass[i*2+0] == 0xff) + storedOffMeshConCount++; + } + } + + // Off-mesh connectionss are stored as polygons, adjust values. + const int totPolyCount = params->polyCount + storedOffMeshConCount; + const int totVertCount = params->vertCount + storedOffMeshConCount*2; + + // Find portal edges which are at tile borders. + int edgeCount = 0; + int portalCount = 0; + for (int i = 0; i < params->polyCount; ++i) + { + const unsigned short* p = ¶ms->polys[i*2*nvp]; + for (int j = 0; j < nvp; ++j) + { + if (p[j] == MESH_NULL_IDX) break; + edgeCount++; + + if (p[nvp+j] & 0x8000) + { + unsigned short dir = p[nvp+j] & 0xf; + if (dir != 0xf) + portalCount++; + } + } + } + + const int maxLinkCount = edgeCount + portalCount*2 + offMeshConLinkCount*2; + + // Find unique detail vertices. + int uniqueDetailVertCount = 0; + int detailTriCount = 0; + if (params->detailMeshes) + { + // Has detail mesh, count unique detail vertex count and use input detail tri count. + detailTriCount = params->detailTriCount; + for (int i = 0; i < params->polyCount; ++i) + { + const unsigned short* p = ¶ms->polys[i*nvp*2]; + int ndv = params->detailMeshes[i*4+1]; + int nv = 0; + for (int j = 0; j < nvp; ++j) + { + if (p[j] == MESH_NULL_IDX) break; + nv++; + } + ndv -= nv; + uniqueDetailVertCount += ndv; + } + } + else + { + // No input detail mesh, build detail mesh from nav polys. + uniqueDetailVertCount = 0; // No extra detail verts. + detailTriCount = 0; + for (int i = 0; i < params->polyCount; ++i) + { + const unsigned short* p = ¶ms->polys[i*nvp*2]; + int nv = 0; + for (int j = 0; j < nvp; ++j) + { + if (p[j] == MESH_NULL_IDX) break; + nv++; + } + detailTriCount += nv-2; + } + } + + // Calculate data size + const int headerSize = dtAlign4(sizeof(dtMeshHeader)); + const int vertsSize = dtAlign4(sizeof(float)*3*totVertCount); + const int polysSize = dtAlign4(sizeof(dtPoly)*totPolyCount); + const int linksSize = dtAlign4(sizeof(dtLink)*maxLinkCount); + const int detailMeshesSize = dtAlign4(sizeof(dtPolyDetail)*params->polyCount); + const int detailVertsSize = dtAlign4(sizeof(float)*3*uniqueDetailVertCount); + const int detailTrisSize = dtAlign4(sizeof(unsigned char)*4*detailTriCount); + const int bvTreeSize = params->buildBvTree ? dtAlign4(sizeof(dtBVNode)*params->polyCount*2) : 0; + const int offMeshConsSize = dtAlign4(sizeof(dtOffMeshConnection)*storedOffMeshConCount); + + const int dataSize = headerSize + vertsSize + polysSize + linksSize + + detailMeshesSize + detailVertsSize + detailTrisSize + + bvTreeSize + offMeshConsSize; + + unsigned char* data = (unsigned char*)dtAlloc(sizeof(unsigned char)*dataSize, DT_ALLOC_PERM); + if (!data) + { + dtFree(offMeshConClass); + return false; + } + memset(data, 0, dataSize); + + unsigned char* d = data; + + dtMeshHeader* header = dtGetThenAdvanceBufferPointer(d, headerSize); + float* navVerts = dtGetThenAdvanceBufferPointer(d, vertsSize); + dtPoly* navPolys = dtGetThenAdvanceBufferPointer(d, polysSize); + d += linksSize; // Ignore links; just leave enough space for them. They'll be created on load. + dtPolyDetail* navDMeshes = dtGetThenAdvanceBufferPointer(d, detailMeshesSize); + float* navDVerts = dtGetThenAdvanceBufferPointer(d, detailVertsSize); + unsigned char* navDTris = dtGetThenAdvanceBufferPointer(d, detailTrisSize); + dtBVNode* navBvtree = dtGetThenAdvanceBufferPointer(d, bvTreeSize); + dtOffMeshConnection* offMeshCons = dtGetThenAdvanceBufferPointer(d, offMeshConsSize); + + + // Store header + header->magic = DT_NAVMESH_MAGIC; + header->version = DT_NAVMESH_VERSION; + header->x = params->tileX; + header->y = params->tileY; + header->layer = params->tileLayer; + header->userId = params->userId; + header->polyCount = totPolyCount; + header->vertCount = totVertCount; + header->maxLinkCount = maxLinkCount; + dtVcopy(header->bmin, params->bmin); + dtVcopy(header->bmax, params->bmax); + header->detailMeshCount = params->polyCount; + header->detailVertCount = uniqueDetailVertCount; + header->detailTriCount = detailTriCount; + header->bvQuantFactor = 1.0f / params->cs; + header->offMeshBase = params->polyCount; + header->walkableHeight = params->walkableHeight; + header->walkableRadius = params->walkableRadius; + header->walkableClimb = params->walkableClimb; + header->offMeshConCount = storedOffMeshConCount; + header->bvNodeCount = params->buildBvTree ? params->polyCount*2 : 0; + + const int offMeshVertsBase = params->vertCount; + const int offMeshPolyBase = params->polyCount; + + // Store vertices + // Mesh vertices + for (int i = 0; i < params->vertCount; ++i) + { + const unsigned short* iv = ¶ms->verts[i*3]; + float* v = &navVerts[i*3]; + v[0] = params->bmin[0] + iv[0] * params->cs; + v[1] = params->bmin[1] + iv[1] * params->ch; + v[2] = params->bmin[2] + iv[2] * params->cs; + } + // Off-mesh link vertices. + int n = 0; + for (int i = 0; i < params->offMeshConCount; ++i) + { + // Only store connections which start from this tile. + if (offMeshConClass[i*2+0] == 0xff) + { + const float* linkv = ¶ms->offMeshConVerts[i*2*3]; + float* v = &navVerts[(offMeshVertsBase + n*2)*3]; + dtVcopy(&v[0], &linkv[0]); + dtVcopy(&v[3], &linkv[3]); + n++; + } + } + + // Store polygons + // Mesh polys + const unsigned short* src = params->polys; + for (int i = 0; i < params->polyCount; ++i) + { + dtPoly* p = &navPolys[i]; + p->vertCount = 0; + p->flags = params->polyFlags[i]; + p->setArea(params->polyAreas[i]); + p->setType(DT_POLYTYPE_GROUND); + for (int j = 0; j < nvp; ++j) + { + if (src[j] == MESH_NULL_IDX) break; + p->verts[j] = src[j]; + if (src[nvp+j] & 0x8000) + { + // Border or portal edge. + unsigned short dir = src[nvp+j] & 0xf; + if (dir == 0xf) // Border + p->neis[j] = 0; + else if (dir == 0) // Portal x- + p->neis[j] = DT_EXT_LINK | 4; + else if (dir == 1) // Portal z+ + p->neis[j] = DT_EXT_LINK | 2; + else if (dir == 2) // Portal x+ + p->neis[j] = DT_EXT_LINK | 0; + else if (dir == 3) // Portal z- + p->neis[j] = DT_EXT_LINK | 6; + } + else + { + // Normal connection + p->neis[j] = src[nvp+j]+1; + } + + p->vertCount++; + } + src += nvp*2; + } + // Off-mesh connection vertices. + n = 0; + for (int i = 0; i < params->offMeshConCount; ++i) + { + // Only store connections which start from this tile. + if (offMeshConClass[i*2+0] == 0xff) + { + dtPoly* p = &navPolys[offMeshPolyBase+n]; + p->vertCount = 2; + p->verts[0] = (unsigned short)(offMeshVertsBase + n*2+0); + p->verts[1] = (unsigned short)(offMeshVertsBase + n*2+1); + p->flags = params->offMeshConFlags[i]; + p->setArea(params->offMeshConAreas[i]); + p->setType(DT_POLYTYPE_OFFMESH_CONNECTION); + n++; + } + } + + // Store detail meshes and vertices. + // The nav polygon vertices are stored as the first vertices on each mesh. + // We compress the mesh data by skipping them and using the navmesh coordinates. + if (params->detailMeshes) + { + unsigned short vbase = 0; + for (int i = 0; i < params->polyCount; ++i) + { + dtPolyDetail& dtl = navDMeshes[i]; + const int vb = (int)params->detailMeshes[i*4+0]; + const int ndv = (int)params->detailMeshes[i*4+1]; + const int nv = navPolys[i].vertCount; + dtl.vertBase = (unsigned int)vbase; + dtl.vertCount = (unsigned char)(ndv-nv); + dtl.triBase = (unsigned int)params->detailMeshes[i*4+2]; + dtl.triCount = (unsigned char)params->detailMeshes[i*4+3]; + // Copy vertices except the first 'nv' verts which are equal to nav poly verts. + if (ndv-nv) + { + memcpy(&navDVerts[vbase*3], ¶ms->detailVerts[(vb+nv)*3], sizeof(float)*3*(ndv-nv)); + vbase += (unsigned short)(ndv-nv); + } + } + // Store triangles. + memcpy(navDTris, params->detailTris, sizeof(unsigned char)*4*params->detailTriCount); + } + else + { + // Create dummy detail mesh by triangulating polys. + int tbase = 0; + for (int i = 0; i < params->polyCount; ++i) + { + dtPolyDetail& dtl = navDMeshes[i]; + const int nv = navPolys[i].vertCount; + dtl.vertBase = 0; + dtl.vertCount = 0; + dtl.triBase = (unsigned int)tbase; + dtl.triCount = (unsigned char)(nv-2); + // Triangulate polygon (local indices). + for (int j = 2; j < nv; ++j) + { + unsigned char* t = &navDTris[tbase*4]; + t[0] = 0; + t[1] = (unsigned char)(j-1); + t[2] = (unsigned char)j; + // Bit for each edge that belongs to poly boundary. + t[3] = (1<<2); + if (j == 2) t[3] |= (1<<0); + if (j == nv-1) t[3] |= (1<<4); + tbase++; + } + } + } + + // Store and create BVtree. + if (params->buildBvTree) + { + createBVTree(params, navBvtree, 2*params->polyCount); + } + + // Store Off-Mesh connections. + n = 0; + for (int i = 0; i < params->offMeshConCount; ++i) + { + // Only store connections which start from this tile. + if (offMeshConClass[i*2+0] == 0xff) + { + dtOffMeshConnection* con = &offMeshCons[n]; + con->poly = (unsigned short)(offMeshPolyBase + n); + // Copy connection end-points. + const float* endPts = ¶ms->offMeshConVerts[i*2*3]; + dtVcopy(&con->pos[0], &endPts[0]); + dtVcopy(&con->pos[3], &endPts[3]); + con->rad = params->offMeshConRad[i]; + con->flags = params->offMeshConDir[i] ? DT_OFFMESH_CON_BIDIR : 0; + con->side = offMeshConClass[i*2+1]; + if (params->offMeshConUserID) + con->userId = params->offMeshConUserID[i]; + n++; + } + } + + dtFree(offMeshConClass); + + *outData = data; + *outDataSize = dataSize; + + return true; +} + +bool dtNavMeshHeaderSwapEndian(unsigned char* data, const int /*dataSize*/) +{ + dtMeshHeader* header = (dtMeshHeader*)data; + + int swappedMagic = DT_NAVMESH_MAGIC; + int swappedVersion = DT_NAVMESH_VERSION; + dtSwapEndian(&swappedMagic); + dtSwapEndian(&swappedVersion); + + if ((header->magic != DT_NAVMESH_MAGIC || header->version != DT_NAVMESH_VERSION) && + (header->magic != swappedMagic || header->version != swappedVersion)) + { + return false; + } + + dtSwapEndian(&header->magic); + dtSwapEndian(&header->version); + dtSwapEndian(&header->x); + dtSwapEndian(&header->y); + dtSwapEndian(&header->layer); + dtSwapEndian(&header->userId); + dtSwapEndian(&header->polyCount); + dtSwapEndian(&header->vertCount); + dtSwapEndian(&header->maxLinkCount); + dtSwapEndian(&header->detailMeshCount); + dtSwapEndian(&header->detailVertCount); + dtSwapEndian(&header->detailTriCount); + dtSwapEndian(&header->bvNodeCount); + dtSwapEndian(&header->offMeshConCount); + dtSwapEndian(&header->offMeshBase); + dtSwapEndian(&header->walkableHeight); + dtSwapEndian(&header->walkableRadius); + dtSwapEndian(&header->walkableClimb); + dtSwapEndian(&header->bmin[0]); + dtSwapEndian(&header->bmin[1]); + dtSwapEndian(&header->bmin[2]); + dtSwapEndian(&header->bmax[0]); + dtSwapEndian(&header->bmax[1]); + dtSwapEndian(&header->bmax[2]); + dtSwapEndian(&header->bvQuantFactor); + + // Freelist index and pointers are updated when tile is added, no need to swap. + + return true; +} + +/// @par +/// +/// @warning This function assumes that the header is in the correct endianess already. +/// Call #dtNavMeshHeaderSwapEndian() first on the data if the data is expected to be in wrong endianess +/// to start with. Call #dtNavMeshHeaderSwapEndian() after the data has been swapped if converting from +/// native to foreign endianess. +bool dtNavMeshDataSwapEndian(unsigned char* data, const int /*dataSize*/) +{ + // Make sure the data is in right format. + dtMeshHeader* header = (dtMeshHeader*)data; + if (header->magic != DT_NAVMESH_MAGIC) + return false; + if (header->version != DT_NAVMESH_VERSION) + return false; + + // Patch header pointers. + const int headerSize = dtAlign4(sizeof(dtMeshHeader)); + const int vertsSize = dtAlign4(sizeof(float)*3*header->vertCount); + const int polysSize = dtAlign4(sizeof(dtPoly)*header->polyCount); + const int linksSize = dtAlign4(sizeof(dtLink)*(header->maxLinkCount)); + const int detailMeshesSize = dtAlign4(sizeof(dtPolyDetail)*header->detailMeshCount); + const int detailVertsSize = dtAlign4(sizeof(float)*3*header->detailVertCount); + const int detailTrisSize = dtAlign4(sizeof(unsigned char)*4*header->detailTriCount); + const int bvtreeSize = dtAlign4(sizeof(dtBVNode)*header->bvNodeCount); + const int offMeshLinksSize = dtAlign4(sizeof(dtOffMeshConnection)*header->offMeshConCount); + + unsigned char* d = data + headerSize; + float* verts = dtGetThenAdvanceBufferPointer(d, vertsSize); + dtPoly* polys = dtGetThenAdvanceBufferPointer(d, polysSize); + d += linksSize; // Ignore links; they technically should be endian-swapped but all their data is overwritten on load anyway. + //dtLink* links = dtGetThenAdvanceBufferPointer(d, linksSize); + dtPolyDetail* detailMeshes = dtGetThenAdvanceBufferPointer(d, detailMeshesSize); + float* detailVerts = dtGetThenAdvanceBufferPointer(d, detailVertsSize); + d += detailTrisSize; // Ignore detail tris; single bytes can't be endian-swapped. + //unsigned char* detailTris = dtGetThenAdvanceBufferPointer(d, detailTrisSize); + dtBVNode* bvTree = dtGetThenAdvanceBufferPointer(d, bvtreeSize); + dtOffMeshConnection* offMeshCons = dtGetThenAdvanceBufferPointer(d, offMeshLinksSize); + + // Vertices + for (int i = 0; i < header->vertCount*3; ++i) + { + dtSwapEndian(&verts[i]); + } + + // Polys + for (int i = 0; i < header->polyCount; ++i) + { + dtPoly* p = &polys[i]; + // poly->firstLink is update when tile is added, no need to swap. + for (int j = 0; j < DT_VERTS_PER_POLYGON; ++j) + { + dtSwapEndian(&p->verts[j]); + dtSwapEndian(&p->neis[j]); + } + dtSwapEndian(&p->flags); + } + + // Links are rebuild when tile is added, no need to swap. + + // Detail meshes + for (int i = 0; i < header->detailMeshCount; ++i) + { + dtPolyDetail* pd = &detailMeshes[i]; + dtSwapEndian(&pd->vertBase); + dtSwapEndian(&pd->triBase); + } + + // Detail verts + for (int i = 0; i < header->detailVertCount*3; ++i) + { + dtSwapEndian(&detailVerts[i]); + } + + // BV-tree + for (int i = 0; i < header->bvNodeCount; ++i) + { + dtBVNode* node = &bvTree[i]; + for (int j = 0; j < 3; ++j) + { + dtSwapEndian(&node->bmin[j]); + dtSwapEndian(&node->bmax[j]); + } + dtSwapEndian(&node->i); + } + + // Off-mesh Connections. + for (int i = 0; i < header->offMeshConCount; ++i) + { + dtOffMeshConnection* con = &offMeshCons[i]; + for (int j = 0; j < 6; ++j) + dtSwapEndian(&con->pos[j]); + dtSwapEndian(&con->rad); + dtSwapEndian(&con->poly); + } + + return true; +} diff --git a/libs/recast/detour/src/DetourNavMeshQuery.cpp b/libs/recast/detour/src/DetourNavMeshQuery.cpp new file mode 100644 index 000000000..024d4a1fe --- /dev/null +++ b/libs/recast/detour/src/DetourNavMeshQuery.cpp @@ -0,0 +1,3664 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#include +#include +#include "DetourNavMeshQuery.h" +#include "DetourNavMesh.h" +#include "DetourNode.h" +#include "DetourCommon.h" +#include "DetourMath.h" +#include "DetourAlloc.h" +#include "DetourAssert.h" +#include + +/// @class dtQueryFilter +/// +/// The Default Implementation +/// +/// At construction: All area costs default to 1.0. All flags are included +/// and none are excluded. +/// +/// If a polygon has both an include and an exclude flag, it will be excluded. +/// +/// The way filtering works, a navigation mesh polygon must have at least one flag +/// set to ever be considered by a query. So a polygon with no flags will never +/// be considered. +/// +/// Setting the include flags to 0 will result in all polygons being excluded. +/// +/// Custom Implementations +/// +/// DT_VIRTUAL_QUERYFILTER must be defined in order to extend this class. +/// +/// Implement a custom query filter by overriding the virtual passFilter() +/// and getCost() functions. If this is done, both functions should be as +/// fast as possible. Use cached local copies of data rather than accessing +/// your own objects where possible. +/// +/// Custom implementations do not need to adhere to the flags or cost logic +/// used by the default implementation. +/// +/// In order for A* searches to work properly, the cost should be proportional to +/// the travel distance. Implementing a cost modifier less than 1.0 is likely +/// to lead to problems during pathfinding. +/// +/// @see dtNavMeshQuery + +dtQueryFilter::dtQueryFilter() : + m_includeFlags(0xffff), + m_excludeFlags(0) +{ + for (int i = 0; i < DT_MAX_AREAS; ++i) + m_areaCost[i] = 1.0f; +} + +#ifdef DT_VIRTUAL_QUERYFILTER +bool dtQueryFilter::passFilter(const dtPolyRef /*ref*/, + const dtMeshTile* /*tile*/, + const dtPoly* poly) const +{ + return (poly->flags & m_includeFlags) != 0 && (poly->flags & m_excludeFlags) == 0; +} + +float dtQueryFilter::getCost(const float* pa, const float* pb, + const dtPolyRef /*prevRef*/, const dtMeshTile* /*prevTile*/, const dtPoly* /*prevPoly*/, + const dtPolyRef /*curRef*/, const dtMeshTile* /*curTile*/, const dtPoly* curPoly, + const dtPolyRef /*nextRef*/, const dtMeshTile* /*nextTile*/, const dtPoly* /*nextPoly*/) const +{ + return dtVdist(pa, pb) * m_areaCost[curPoly->getArea()]; +} +#else +inline bool dtQueryFilter::passFilter(const dtPolyRef /*ref*/, + const dtMeshTile* /*tile*/, + const dtPoly* poly) const +{ + return (poly->flags & m_includeFlags) != 0 && (poly->flags & m_excludeFlags) == 0; +} + +inline float dtQueryFilter::getCost(const float* pa, const float* pb, + const dtPolyRef /*prevRef*/, const dtMeshTile* /*prevTile*/, const dtPoly* /*prevPoly*/, + const dtPolyRef /*curRef*/, const dtMeshTile* /*curTile*/, const dtPoly* curPoly, + const dtPolyRef /*nextRef*/, const dtMeshTile* /*nextTile*/, const dtPoly* /*nextPoly*/) const +{ + return dtVdist(pa, pb) * m_areaCost[curPoly->getArea()]; +} +#endif + +static const float H_SCALE = 0.999f; // Search heuristic scale. + + +dtNavMeshQuery* dtAllocNavMeshQuery() +{ + void* mem = dtAlloc(sizeof(dtNavMeshQuery), DT_ALLOC_PERM); + if (!mem) return 0; + return new(mem) dtNavMeshQuery; +} + +void dtFreeNavMeshQuery(dtNavMeshQuery* navmesh) +{ + if (!navmesh) return; + navmesh->~dtNavMeshQuery(); + dtFree(navmesh); +} + +////////////////////////////////////////////////////////////////////////////////////////// + +/// @class dtNavMeshQuery +/// +/// For methods that support undersized buffers, if the buffer is too small +/// to hold the entire result set the return status of the method will include +/// the #DT_BUFFER_TOO_SMALL flag. +/// +/// Constant member functions can be used by multiple clients without side +/// effects. (E.g. No change to the closed list. No impact on an in-progress +/// sliced path query. Etc.) +/// +/// Walls and portals: A @e wall is a polygon segment that is +/// considered impassable. A @e portal is a passable segment between polygons. +/// A portal may be treated as a wall based on the dtQueryFilter used for a query. +/// +/// @see dtNavMesh, dtQueryFilter, #dtAllocNavMeshQuery(), #dtAllocNavMeshQuery() + +dtNavMeshQuery::dtNavMeshQuery() : + m_nav(0), + m_tinyNodePool(0), + m_nodePool(0), + m_openList(0) +{ + memset(&m_query, 0, sizeof(dtQueryData)); +} + +dtNavMeshQuery::~dtNavMeshQuery() +{ + if (m_tinyNodePool) + m_tinyNodePool->~dtNodePool(); + if (m_nodePool) + m_nodePool->~dtNodePool(); + if (m_openList) + m_openList->~dtNodeQueue(); + dtFree(m_tinyNodePool); + dtFree(m_nodePool); + dtFree(m_openList); +} + +/// @par +/// +/// Must be the first function called after construction, before other +/// functions are used. +/// +/// This function can be used multiple times. +dtStatus dtNavMeshQuery::init(const dtNavMesh* nav, const int maxNodes) +{ + if (maxNodes > DT_NULL_IDX || maxNodes > (1 << DT_NODE_PARENT_BITS) - 1) + return DT_FAILURE | DT_INVALID_PARAM; + + m_nav = nav; + + if (!m_nodePool || m_nodePool->getMaxNodes() < maxNodes) + { + if (m_nodePool) + { + m_nodePool->~dtNodePool(); + dtFree(m_nodePool); + m_nodePool = 0; + } + m_nodePool = new (dtAlloc(sizeof(dtNodePool), DT_ALLOC_PERM)) dtNodePool(maxNodes, dtNextPow2(maxNodes/4)); + if (!m_nodePool) + return DT_FAILURE | DT_OUT_OF_MEMORY; + } + else + { + m_nodePool->clear(); + } + + if (!m_tinyNodePool) + { + m_tinyNodePool = new (dtAlloc(sizeof(dtNodePool), DT_ALLOC_PERM)) dtNodePool(64, 32); + if (!m_tinyNodePool) + return DT_FAILURE | DT_OUT_OF_MEMORY; + } + else + { + m_tinyNodePool->clear(); + } + + if (!m_openList || m_openList->getCapacity() < maxNodes) + { + if (m_openList) + { + m_openList->~dtNodeQueue(); + dtFree(m_openList); + m_openList = 0; + } + m_openList = new (dtAlloc(sizeof(dtNodeQueue), DT_ALLOC_PERM)) dtNodeQueue(maxNodes); + if (!m_openList) + return DT_FAILURE | DT_OUT_OF_MEMORY; + } + else + { + m_openList->clear(); + } + + return DT_SUCCESS; +} + +dtStatus dtNavMeshQuery::findRandomPoint(const dtQueryFilter* filter, float (*frand)(), + dtPolyRef* randomRef, float* randomPt) const +{ + dtAssert(m_nav); + + // Randomly pick one tile. Assume that all tiles cover roughly the same area. + const dtMeshTile* tile = 0; + float tsum = 0.0f; + for (int i = 0; i < m_nav->getMaxTiles(); i++) + { + const dtMeshTile* t = m_nav->getTile(i); + if (!t || !t->header) continue; + + // Choose random tile using reservoi sampling. + const float area = 1.0f; // Could be tile area too. + tsum += area; + const float u = frand(); + if (u*tsum <= area) + tile = t; + } + if (!tile) + return DT_FAILURE; + + // Randomly pick one polygon weighted by polygon area. + const dtPoly* poly = 0; + dtPolyRef polyRef = 0; + const dtPolyRef base = m_nav->getPolyRefBase(tile); + + float areaSum = 0.0f; + for (int i = 0; i < tile->header->polyCount; ++i) + { + const dtPoly* p = &tile->polys[i]; + // Do not return off-mesh connection polygons. + if (p->getType() != DT_POLYTYPE_GROUND) + continue; + // Must pass filter + const dtPolyRef ref = base | (dtPolyRef)i; + if (!filter->passFilter(ref, tile, p)) + continue; + + // Calc area of the polygon. + float polyArea = 0.0f; + for (int j = 2; j < p->vertCount; ++j) + { + const float* va = &tile->verts[p->verts[0]*3]; + const float* vb = &tile->verts[p->verts[j-1]*3]; + const float* vc = &tile->verts[p->verts[j]*3]; + polyArea += dtTriArea2D(va,vb,vc); + } + + // Choose random polygon weighted by area, using reservoi sampling. + areaSum += polyArea; + const float u = frand(); + if (u*areaSum <= polyArea) + { + poly = p; + polyRef = ref; + } + } + + if (!poly) + return DT_FAILURE; + + // Randomly pick point on polygon. + const float* v = &tile->verts[poly->verts[0]*3]; + float verts[3*DT_VERTS_PER_POLYGON]; + float areas[DT_VERTS_PER_POLYGON]; + dtVcopy(&verts[0*3],v); + for (int j = 1; j < poly->vertCount; ++j) + { + v = &tile->verts[poly->verts[j]*3]; + dtVcopy(&verts[j*3],v); + } + + const float s = frand(); + const float t = frand(); + + float pt[3]; + dtRandomPointInConvexPoly(verts, poly->vertCount, areas, s, t, pt); + + float h = 0.0f; + dtStatus status = getPolyHeight(polyRef, pt, &h); + if (dtStatusFailed(status)) + return status; + pt[1] = h; + + dtVcopy(randomPt, pt); + *randomRef = polyRef; + + return DT_SUCCESS; +} + +dtStatus dtNavMeshQuery::findRandomPointAroundCircle(dtPolyRef startRef, const float* centerPos, const float maxRadius, + const dtQueryFilter* filter, float (*frand)(), + dtPolyRef* randomRef, float* randomPt) const +{ + dtAssert(m_nav); + dtAssert(m_nodePool); + dtAssert(m_openList); + + // Validate input + if (!startRef || !m_nav->isValidPolyRef(startRef)) + return DT_FAILURE | DT_INVALID_PARAM; + + const dtMeshTile* startTile = 0; + const dtPoly* startPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(startRef, &startTile, &startPoly); + if (!filter->passFilter(startRef, startTile, startPoly)) + return DT_FAILURE | DT_INVALID_PARAM; + + m_nodePool->clear(); + m_openList->clear(); + + dtNode* startNode = m_nodePool->getNode(startRef); + dtVcopy(startNode->pos, centerPos); + startNode->pidx = 0; + startNode->cost = 0; + startNode->total = 0; + startNode->id = startRef; + startNode->flags = DT_NODE_OPEN; + m_openList->push(startNode); + + dtStatus status = DT_SUCCESS; + + const float radiusSqr = dtSqr(maxRadius); + float areaSum = 0.0f; + + const dtMeshTile* randomTile = 0; + const dtPoly* randomPoly = 0; + dtPolyRef randomPolyRef = 0; + + while (!m_openList->empty()) + { + dtNode* bestNode = m_openList->pop(); + bestNode->flags &= ~DT_NODE_OPEN; + bestNode->flags |= DT_NODE_CLOSED; + + // Get poly and tile. + // The API input has been cheked already, skip checking internal data. + const dtPolyRef bestRef = bestNode->id; + const dtMeshTile* bestTile = 0; + const dtPoly* bestPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(bestRef, &bestTile, &bestPoly); + + // Place random locations on on ground. + if (bestPoly->getType() == DT_POLYTYPE_GROUND) + { + // Calc area of the polygon. + float polyArea = 0.0f; + for (int j = 2; j < bestPoly->vertCount; ++j) + { + const float* va = &bestTile->verts[bestPoly->verts[0]*3]; + const float* vb = &bestTile->verts[bestPoly->verts[j-1]*3]; + const float* vc = &bestTile->verts[bestPoly->verts[j]*3]; + polyArea += dtTriArea2D(va,vb,vc); + } + // Choose random polygon weighted by area, using reservoi sampling. + areaSum += polyArea; + const float u = frand(); + if (u*areaSum <= polyArea) + { + randomTile = bestTile; + randomPoly = bestPoly; + randomPolyRef = bestRef; + } + } + + + // Get parent poly and tile. + dtPolyRef parentRef = 0; + const dtMeshTile* parentTile = 0; + const dtPoly* parentPoly = 0; + if (bestNode->pidx) + parentRef = m_nodePool->getNodeAtIdx(bestNode->pidx)->id; + if (parentRef) + m_nav->getTileAndPolyByRefUnsafe(parentRef, &parentTile, &parentPoly); + + for (unsigned int i = bestPoly->firstLink; i != DT_NULL_LINK; i = bestTile->links[i].next) + { + const dtLink* link = &bestTile->links[i]; + dtPolyRef neighbourRef = link->ref; + // Skip invalid neighbours and do not follow back to parent. + if (!neighbourRef || neighbourRef == parentRef) + continue; + + // Expand to neighbour + const dtMeshTile* neighbourTile = 0; + const dtPoly* neighbourPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(neighbourRef, &neighbourTile, &neighbourPoly); + + // Do not advance if the polygon is excluded by the filter. + if (!filter->passFilter(neighbourRef, neighbourTile, neighbourPoly)) + continue; + + // Find edge and calc distance to the edge. + float va[3], vb[3]; + if (!getPortalPoints(bestRef, bestPoly, bestTile, neighbourRef, neighbourPoly, neighbourTile, va, vb)) + continue; + + // If the circle is not touching the next polygon, skip it. + float tseg; + float distSqr = dtDistancePtSegSqr2D(centerPos, va, vb, tseg); + if (distSqr > radiusSqr) + continue; + + dtNode* neighbourNode = m_nodePool->getNode(neighbourRef); + if (!neighbourNode) + { + status |= DT_OUT_OF_NODES; + continue; + } + + if (neighbourNode->flags & DT_NODE_CLOSED) + continue; + + // Cost + if (neighbourNode->flags == 0) + dtVlerp(neighbourNode->pos, va, vb, 0.5f); + + const float total = bestNode->total + dtVdist(bestNode->pos, neighbourNode->pos); + + // The node is already in open list and the new result is worse, skip. + if ((neighbourNode->flags & DT_NODE_OPEN) && total >= neighbourNode->total) + continue; + + neighbourNode->id = neighbourRef; + neighbourNode->flags = (neighbourNode->flags & ~DT_NODE_CLOSED); + neighbourNode->pidx = m_nodePool->getNodeIdx(bestNode); + neighbourNode->total = total; + + if (neighbourNode->flags & DT_NODE_OPEN) + { + m_openList->modify(neighbourNode); + } + else + { + neighbourNode->flags = DT_NODE_OPEN; + m_openList->push(neighbourNode); + } + } + } + + if (!randomPoly) + return DT_FAILURE; + + // Randomly pick point on polygon. + const float* v = &randomTile->verts[randomPoly->verts[0]*3]; + float verts[3*DT_VERTS_PER_POLYGON]; + float areas[DT_VERTS_PER_POLYGON]; + dtVcopy(&verts[0*3],v); + for (int j = 1; j < randomPoly->vertCount; ++j) + { + v = &randomTile->verts[randomPoly->verts[j]*3]; + dtVcopy(&verts[j*3],v); + } + + const float s = frand(); + const float t = frand(); + + float pt[3]; + dtRandomPointInConvexPoly(verts, randomPoly->vertCount, areas, s, t, pt); + + float h = 0.0f; + dtStatus stat = getPolyHeight(randomPolyRef, pt, &h); + if (dtStatusFailed(status)) + return stat; + pt[1] = h; + + dtVcopy(randomPt, pt); + *randomRef = randomPolyRef; + + return DT_SUCCESS; +} + + +////////////////////////////////////////////////////////////////////////////////////////// + +/// @par +/// +/// Uses the detail polygons to find the surface height. (Most accurate.) +/// +/// @p pos does not have to be within the bounds of the polygon or navigation mesh. +/// +/// See closestPointOnPolyBoundary() for a limited but faster option. +/// +dtStatus dtNavMeshQuery::closestPointOnPoly(dtPolyRef ref, const float* pos, float* closest, bool* posOverPoly) const +{ + dtAssert(m_nav); + const dtMeshTile* tile = 0; + const dtPoly* poly = 0; + if (dtStatusFailed(m_nav->getTileAndPolyByRef(ref, &tile, &poly))) + return DT_FAILURE | DT_INVALID_PARAM; + if (!tile) + return DT_FAILURE | DT_INVALID_PARAM; + + // Off-mesh connections don't have detail polygons. + if (poly->getType() == DT_POLYTYPE_OFFMESH_CONNECTION) + { + const float* v0 = &tile->verts[poly->verts[0]*3]; + const float* v1 = &tile->verts[poly->verts[1]*3]; + const float d0 = dtVdist(pos, v0); + const float d1 = dtVdist(pos, v1); + const float u = d0 / (d0+d1); + dtVlerp(closest, v0, v1, u); + if (posOverPoly) + *posOverPoly = false; + return DT_SUCCESS; + } + + const unsigned int ip = (unsigned int)(poly - tile->polys); + const dtPolyDetail* pd = &tile->detailMeshes[ip]; + + // Clamp point to be inside the polygon. + float verts[DT_VERTS_PER_POLYGON*3]; + float edged[DT_VERTS_PER_POLYGON]; + float edget[DT_VERTS_PER_POLYGON]; + const int nv = poly->vertCount; + for (int i = 0; i < nv; ++i) + dtVcopy(&verts[i*3], &tile->verts[poly->verts[i]*3]); + + dtVcopy(closest, pos); + if (!dtDistancePtPolyEdgesSqr(pos, verts, nv, edged, edget)) + { + // Point is outside the polygon, dtClamp to nearest edge. + float dmin = edged[0]; + int imin = 0; + for (int i = 1; i < nv; ++i) + { + if (edged[i] < dmin) + { + dmin = edged[i]; + imin = i; + } + } + const float* va = &verts[imin*3]; + const float* vb = &verts[((imin+1)%nv)*3]; + dtVlerp(closest, va, vb, edget[imin]); + + if (posOverPoly) + *posOverPoly = false; + } + else + { + if (posOverPoly) + *posOverPoly = true; + } + + // Find height at the location. + for (int j = 0; j < pd->triCount; ++j) + { + const unsigned char* t = &tile->detailTris[(pd->triBase+j)*4]; + const float* v[3]; + for (int k = 0; k < 3; ++k) + { + if (t[k] < poly->vertCount) + v[k] = &tile->verts[poly->verts[t[k]]*3]; + else + v[k] = &tile->detailVerts[(pd->vertBase+(t[k]-poly->vertCount))*3]; + } + float h; + if (dtClosestHeightPointTriangle(closest, v[0], v[1], v[2], h)) + { + closest[1] = h; + break; + } + } + + return DT_SUCCESS; +} + +/// @par +/// +/// Much faster than closestPointOnPoly(). +/// +/// If the provided position lies within the polygon's xz-bounds (above or below), +/// then @p pos and @p closest will be equal. +/// +/// The height of @p closest will be the polygon boundary. The height detail is not used. +/// +/// @p pos does not have to be within the bounds of the polybon or the navigation mesh. +/// +dtStatus dtNavMeshQuery::closestPointOnPolyBoundary(dtPolyRef ref, const float* pos, float* closest) const +{ + dtAssert(m_nav); + + const dtMeshTile* tile = 0; + const dtPoly* poly = 0; + if (dtStatusFailed(m_nav->getTileAndPolyByRef(ref, &tile, &poly))) + return DT_FAILURE | DT_INVALID_PARAM; + + // Collect vertices. + float verts[DT_VERTS_PER_POLYGON*3]; + float edged[DT_VERTS_PER_POLYGON]; + float edget[DT_VERTS_PER_POLYGON]; + int nv = 0; + for (int i = 0; i < (int)poly->vertCount; ++i) + { + dtVcopy(&verts[nv*3], &tile->verts[poly->verts[i]*3]); + nv++; + } + + bool inside = dtDistancePtPolyEdgesSqr(pos, verts, nv, edged, edget); + if (inside) + { + // Point is inside the polygon, return the point. + dtVcopy(closest, pos); + } + else + { + // Point is outside the polygon, dtClamp to nearest edge. + float dmin = edged[0]; + int imin = 0; + for (int i = 1; i < nv; ++i) + { + if (edged[i] < dmin) + { + dmin = edged[i]; + imin = i; + } + } + const float* va = &verts[imin*3]; + const float* vb = &verts[((imin+1)%nv)*3]; + dtVlerp(closest, va, vb, edget[imin]); + } + + return DT_SUCCESS; +} + +/// @par +/// +/// Will return #DT_FAILURE if the provided position is outside the xz-bounds +/// of the polygon. +/// +dtStatus dtNavMeshQuery::getPolyHeight(dtPolyRef ref, const float* pos, float* height) const +{ + dtAssert(m_nav); + + const dtMeshTile* tile = 0; + const dtPoly* poly = 0; + if (dtStatusFailed(m_nav->getTileAndPolyByRef(ref, &tile, &poly))) + return DT_FAILURE | DT_INVALID_PARAM; + + if (poly->getType() == DT_POLYTYPE_OFFMESH_CONNECTION) + { + const float* v0 = &tile->verts[poly->verts[0]*3]; + const float* v1 = &tile->verts[poly->verts[1]*3]; + const float d0 = dtVdist2D(pos, v0); + const float d1 = dtVdist2D(pos, v1); + const float u = d0 / (d0+d1); + if (height) + *height = v0[1] + (v1[1] - v0[1]) * u; + return DT_SUCCESS; + } + else + { + const unsigned int ip = (unsigned int)(poly - tile->polys); + const dtPolyDetail* pd = &tile->detailMeshes[ip]; + for (int j = 0; j < pd->triCount; ++j) + { + const unsigned char* t = &tile->detailTris[(pd->triBase+j)*4]; + const float* v[3]; + for (int k = 0; k < 3; ++k) + { + if (t[k] < poly->vertCount) + v[k] = &tile->verts[poly->verts[t[k]]*3]; + else + v[k] = &tile->detailVerts[(pd->vertBase+(t[k]-poly->vertCount))*3]; + } + float h; + if (dtClosestHeightPointTriangle(pos, v[0], v[1], v[2], h)) + { + if (height) + *height = h; + return DT_SUCCESS; + } + } + } + + return DT_FAILURE | DT_INVALID_PARAM; +} + +class dtFindNearestPolyQuery : public dtPolyQuery +{ + const dtNavMeshQuery* m_query; + const float* m_center; + float m_nearestDistanceSqr; + dtPolyRef m_nearestRef; + float m_nearestPoint[3]; + +public: + dtFindNearestPolyQuery(const dtNavMeshQuery* query, const float* center) + : m_query(query), m_center(center), m_nearestDistanceSqr(FLT_MAX), m_nearestRef(0), m_nearestPoint() + { + } + + dtPolyRef nearestRef() const { return m_nearestRef; } + const float* nearestPoint() const { return m_nearestPoint; } + + void process(const dtMeshTile* tile, dtPoly** polys, dtPolyRef* refs, int count) + { + dtIgnoreUnused(polys); + + for (int i = 0; i < count; ++i) + { + dtPolyRef ref = refs[i]; + float closestPtPoly[3]; + float diff[3]; + bool posOverPoly = false; + float d; + m_query->closestPointOnPoly(ref, m_center, closestPtPoly, &posOverPoly); + + // If a point is directly over a polygon and closer than + // climb height, favor that instead of straight line nearest point. + dtVsub(diff, m_center, closestPtPoly); + if (posOverPoly) + { + d = dtAbs(diff[1]) - tile->header->walkableClimb; + d = d > 0 ? d*d : 0; + } + else + { + d = dtVlenSqr(diff); + } + + if (d < m_nearestDistanceSqr) + { + dtVcopy(m_nearestPoint, closestPtPoly); + + m_nearestDistanceSqr = d; + m_nearestRef = ref; + } + } + } +}; + +/// @par +/// +/// @note If the search box does not intersect any polygons the search will +/// return #DT_SUCCESS, but @p nearestRef will be zero. So if in doubt, check +/// @p nearestRef before using @p nearestPt. +/// +dtStatus dtNavMeshQuery::findNearestPoly(const float* center, const float* extents, + const dtQueryFilter* filter, + dtPolyRef* nearestRef, float* nearestPt) const +{ + dtAssert(m_nav); + + if (!nearestRef) + return DT_FAILURE | DT_INVALID_PARAM; + + dtFindNearestPolyQuery query(this, center); + + dtStatus status = queryPolygons(center, extents, filter, &query); + if (dtStatusFailed(status)) + return status; + + *nearestRef = query.nearestRef(); + // Only override nearestPt if we actually found a poly so the nearest point + // is valid. + if (nearestPt && *nearestRef) + dtVcopy(nearestPt, query.nearestPoint()); + + return DT_SUCCESS; +} + +void dtNavMeshQuery::queryPolygonsInTile(const dtMeshTile* tile, const float* qmin, const float* qmax, + const dtQueryFilter* filter, dtPolyQuery* query) const +{ + dtAssert(m_nav); + static const int batchSize = 32; + dtPolyRef polyRefs[batchSize]; + dtPoly* polys[batchSize]; + int n = 0; + + if (tile->bvTree) + { + const dtBVNode* node = &tile->bvTree[0]; + const dtBVNode* end = &tile->bvTree[tile->header->bvNodeCount]; + const float* tbmin = tile->header->bmin; + const float* tbmax = tile->header->bmax; + const float qfac = tile->header->bvQuantFactor; + + // Calculate quantized box + unsigned short bmin[3], bmax[3]; + // dtClamp query box to world box. + float minx = dtClamp(qmin[0], tbmin[0], tbmax[0]) - tbmin[0]; + float miny = dtClamp(qmin[1], tbmin[1], tbmax[1]) - tbmin[1]; + float minz = dtClamp(qmin[2], tbmin[2], tbmax[2]) - tbmin[2]; + float maxx = dtClamp(qmax[0], tbmin[0], tbmax[0]) - tbmin[0]; + float maxy = dtClamp(qmax[1], tbmin[1], tbmax[1]) - tbmin[1]; + float maxz = dtClamp(qmax[2], tbmin[2], tbmax[2]) - tbmin[2]; + // Quantize + bmin[0] = (unsigned short)(qfac * minx) & 0xfffe; + bmin[1] = (unsigned short)(qfac * miny) & 0xfffe; + bmin[2] = (unsigned short)(qfac * minz) & 0xfffe; + bmax[0] = (unsigned short)(qfac * maxx + 1) | 1; + bmax[1] = (unsigned short)(qfac * maxy + 1) | 1; + bmax[2] = (unsigned short)(qfac * maxz + 1) | 1; + + // Traverse tree + const dtPolyRef base = m_nav->getPolyRefBase(tile); + while (node < end) + { + const bool overlap = dtOverlapQuantBounds(bmin, bmax, node->bmin, node->bmax); + const bool isLeafNode = node->i >= 0; + + if (isLeafNode && overlap) + { + dtPolyRef ref = base | (dtPolyRef)node->i; + if (filter->passFilter(ref, tile, &tile->polys[node->i])) + { + polyRefs[n] = ref; + polys[n] = &tile->polys[node->i]; + + if (n == batchSize - 1) + { + query->process(tile, polys, polyRefs, batchSize); + n = 0; + } + else + { + n++; + } + } + } + + if (overlap || isLeafNode) + node++; + else + { + const int escapeIndex = -node->i; + node += escapeIndex; + } + } + } + else + { + float bmin[3], bmax[3]; + const dtPolyRef base = m_nav->getPolyRefBase(tile); + for (int i = 0; i < tile->header->polyCount; ++i) + { + dtPoly* p = &tile->polys[i]; + // Do not return off-mesh connection polygons. + if (p->getType() == DT_POLYTYPE_OFFMESH_CONNECTION) + continue; + // Must pass filter + const dtPolyRef ref = base | (dtPolyRef)i; + if (!filter->passFilter(ref, tile, p)) + continue; + // Calc polygon bounds. + const float* v = &tile->verts[p->verts[0]*3]; + dtVcopy(bmin, v); + dtVcopy(bmax, v); + for (int j = 1; j < p->vertCount; ++j) + { + v = &tile->verts[p->verts[j]*3]; + dtVmin(bmin, v); + dtVmax(bmax, v); + } + if (dtOverlapBounds(qmin, qmax, bmin, bmax)) + { + polyRefs[n] = ref; + polys[n] = p; + + if (n == batchSize - 1) + { + query->process(tile, polys, polyRefs, batchSize); + n = 0; + } + else + { + n++; + } + } + } + } + + // Process the last polygons that didn't make a full batch. + if (n > 0) + query->process(tile, polys, polyRefs, n); +} + +class dtCollectPolysQuery : public dtPolyQuery +{ + dtPolyRef* m_polys; + const int m_maxPolys; + int m_numCollected; + bool m_overflow; + +public: + dtCollectPolysQuery(dtPolyRef* polys, const int maxPolys) + : m_polys(polys), m_maxPolys(maxPolys), m_numCollected(0), m_overflow(false) + { + } + + int numCollected() const { return m_numCollected; } + bool overflowed() const { return m_overflow; } + + void process(const dtMeshTile* tile, dtPoly** polys, dtPolyRef* refs, int count) + { + dtIgnoreUnused(tile); + dtIgnoreUnused(polys); + + int numLeft = m_maxPolys - m_numCollected; + int toCopy = count; + if (toCopy > numLeft) + { + m_overflow = true; + toCopy = numLeft; + } + + memcpy(m_polys + m_numCollected, refs, (size_t)toCopy * sizeof(dtPolyRef)); + m_numCollected += toCopy; + } +}; + +/// @par +/// +/// If no polygons are found, the function will return #DT_SUCCESS with a +/// @p polyCount of zero. +/// +/// If @p polys is too small to hold the entire result set, then the array will +/// be filled to capacity. The method of choosing which polygons from the +/// full set are included in the partial result set is undefined. +/// +dtStatus dtNavMeshQuery::queryPolygons(const float* center, const float* extents, + const dtQueryFilter* filter, + dtPolyRef* polys, int* polyCount, const int maxPolys) const +{ + if (!polys || !polyCount || maxPolys < 0) + return DT_FAILURE | DT_INVALID_PARAM; + + dtCollectPolysQuery collector(polys, maxPolys); + + dtStatus status = queryPolygons(center, extents, filter, &collector); + if (dtStatusFailed(status)) + return status; + + *polyCount = collector.numCollected(); + return collector.overflowed() ? DT_SUCCESS | DT_BUFFER_TOO_SMALL : DT_SUCCESS; +} + +/// @par +/// +/// The query will be invoked with batches of polygons. Polygons passed +/// to the query have bounding boxes that overlap with the center and extents +/// passed to this function. The dtPolyQuery::process function is invoked multiple +/// times until all overlapping polygons have been processed. +/// +dtStatus dtNavMeshQuery::queryPolygons(const float* center, const float* extents, + const dtQueryFilter* filter, dtPolyQuery* query) const +{ + dtAssert(m_nav); + + if (!center || !extents || !filter || !query) + return DT_FAILURE | DT_INVALID_PARAM; + + float bmin[3], bmax[3]; + dtVsub(bmin, center, extents); + dtVadd(bmax, center, extents); + + // Find tiles the query touches. + int minx, miny, maxx, maxy; + m_nav->calcTileLoc(bmin, &minx, &miny); + m_nav->calcTileLoc(bmax, &maxx, &maxy); + + static const int MAX_NEIS = 32; + const dtMeshTile* neis[MAX_NEIS]; + + for (int y = miny; y <= maxy; ++y) + { + for (int x = minx; x <= maxx; ++x) + { + const int nneis = m_nav->getTilesAt(x,y,neis,MAX_NEIS); + for (int j = 0; j < nneis; ++j) + { + queryPolygonsInTile(neis[j], bmin, bmax, filter, query); + } + } + } + + return DT_SUCCESS; +} + +/// @par +/// +/// If the end polygon cannot be reached through the navigation graph, +/// the last polygon in the path will be the nearest the end polygon. +/// +/// If the path array is to small to hold the full result, it will be filled as +/// far as possible from the start polygon toward the end polygon. +/// +/// The start and end positions are used to calculate traversal costs. +/// (The y-values impact the result.) +/// +dtStatus dtNavMeshQuery::findPath(dtPolyRef startRef, dtPolyRef endRef, + const float* startPos, const float* endPos, + const dtQueryFilter* filter, + dtPolyRef* path, int* pathCount, const int maxPath) const +{ + dtAssert(m_nav); + dtAssert(m_nodePool); + dtAssert(m_openList); + + if (pathCount) + *pathCount = 0; + + // Validate input + if (!m_nav->isValidPolyRef(startRef) || !m_nav->isValidPolyRef(endRef) || + !startPos || !endPos || !filter || maxPath <= 0 || !path || !pathCount) + return DT_FAILURE | DT_INVALID_PARAM; + + if (startRef == endRef) + { + path[0] = startRef; + *pathCount = 1; + return DT_SUCCESS; + } + + m_nodePool->clear(); + m_openList->clear(); + + dtNode* startNode = m_nodePool->getNode(startRef); + dtVcopy(startNode->pos, startPos); + startNode->pidx = 0; + startNode->cost = 0; + startNode->total = dtVdist(startPos, endPos) * H_SCALE; + startNode->id = startRef; + startNode->flags = DT_NODE_OPEN; + m_openList->push(startNode); + + dtNode* lastBestNode = startNode; + float lastBestNodeCost = startNode->total; + + bool outOfNodes = false; + + while (!m_openList->empty()) + { + // Remove node from open list and put it in closed list. + dtNode* bestNode = m_openList->pop(); + bestNode->flags &= ~DT_NODE_OPEN; + bestNode->flags |= DT_NODE_CLOSED; + + // Reached the goal, stop searching. + if (bestNode->id == endRef) + { + lastBestNode = bestNode; + break; + } + + // Get current poly and tile. + // The API input has been cheked already, skip checking internal data. + const dtPolyRef bestRef = bestNode->id; + const dtMeshTile* bestTile = 0; + const dtPoly* bestPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(bestRef, &bestTile, &bestPoly); + + // Get parent poly and tile. + dtPolyRef parentRef = 0; + const dtMeshTile* parentTile = 0; + const dtPoly* parentPoly = 0; + if (bestNode->pidx) + parentRef = m_nodePool->getNodeAtIdx(bestNode->pidx)->id; + if (parentRef) + m_nav->getTileAndPolyByRefUnsafe(parentRef, &parentTile, &parentPoly); + + for (unsigned int i = bestPoly->firstLink; i != DT_NULL_LINK; i = bestTile->links[i].next) + { + dtPolyRef neighbourRef = bestTile->links[i].ref; + + // Skip invalid ids and do not expand back to where we came from. + if (!neighbourRef || neighbourRef == parentRef) + continue; + + // Get neighbour poly and tile. + // The API input has been cheked already, skip checking internal data. + const dtMeshTile* neighbourTile = 0; + const dtPoly* neighbourPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(neighbourRef, &neighbourTile, &neighbourPoly); + + if (!filter->passFilter(neighbourRef, neighbourTile, neighbourPoly)) + continue; + + // deal explicitly with crossing tile boundaries + unsigned char crossSide = 0; + if (bestTile->links[i].side != 0xff) + crossSide = bestTile->links[i].side >> 1; + + // get the node + dtNode* neighbourNode = m_nodePool->getNode(neighbourRef, crossSide); + if (!neighbourNode) + { + outOfNodes = true; + continue; + } + + // If the node is visited the first time, calculate node position. + if (neighbourNode->flags == 0) + { + getEdgeMidPoint(bestRef, bestPoly, bestTile, + neighbourRef, neighbourPoly, neighbourTile, + neighbourNode->pos); + } + + // Calculate cost and heuristic. + float cost = 0; + float heuristic = 0; + + // Special case for last node. + if (neighbourRef == endRef) + { + // Cost + const float curCost = filter->getCost(bestNode->pos, neighbourNode->pos, + parentRef, parentTile, parentPoly, + bestRef, bestTile, bestPoly, + neighbourRef, neighbourTile, neighbourPoly); + const float endCost = filter->getCost(neighbourNode->pos, endPos, + bestRef, bestTile, bestPoly, + neighbourRef, neighbourTile, neighbourPoly, + 0, 0, 0); + + cost = bestNode->cost + curCost + endCost; + heuristic = 0; + } + else + { + // Cost + const float curCost = filter->getCost(bestNode->pos, neighbourNode->pos, + parentRef, parentTile, parentPoly, + bestRef, bestTile, bestPoly, + neighbourRef, neighbourTile, neighbourPoly); + cost = bestNode->cost + curCost; + heuristic = dtVdist(neighbourNode->pos, endPos)*H_SCALE; + } + + const float total = cost + heuristic; + + // The node is already in open list and the new result is worse, skip. + if ((neighbourNode->flags & DT_NODE_OPEN) && total >= neighbourNode->total) + continue; + // The node is already visited and process, and the new result is worse, skip. + if ((neighbourNode->flags & DT_NODE_CLOSED) && total >= neighbourNode->total) + continue; + + // Add or update the node. + neighbourNode->pidx = m_nodePool->getNodeIdx(bestNode); + neighbourNode->id = neighbourRef; + neighbourNode->flags = (neighbourNode->flags & ~DT_NODE_CLOSED); + neighbourNode->cost = cost; + neighbourNode->total = total; + + if (neighbourNode->flags & DT_NODE_OPEN) + { + // Already in open, update node location. + m_openList->modify(neighbourNode); + } + else + { + // Put the node in open list. + neighbourNode->flags |= DT_NODE_OPEN; + m_openList->push(neighbourNode); + } + + // Update nearest node to target so far. + if (heuristic < lastBestNodeCost) + { + lastBestNodeCost = heuristic; + lastBestNode = neighbourNode; + } + } + } + + dtStatus status = getPathToNode(lastBestNode, path, pathCount, maxPath); + + if (lastBestNode->id != endRef) + status |= DT_PARTIAL_RESULT; + + if (outOfNodes) + status |= DT_OUT_OF_NODES; + + return status; +} + +dtStatus dtNavMeshQuery::getPathToNode(dtNode* endNode, dtPolyRef* path, int* pathCount, int maxPath) const +{ + // Find the length of the entire path. + dtNode* curNode = endNode; + int length = 0; + do + { + length++; + curNode = m_nodePool->getNodeAtIdx(curNode->pidx); + } while (curNode); + + // If the path cannot be fully stored then advance to the last node we will be able to store. + curNode = endNode; + int writeCount; + for (writeCount = length; writeCount > maxPath; writeCount--) + { + dtAssert(curNode); + + curNode = m_nodePool->getNodeAtIdx(curNode->pidx); + } + + // Write path + for (int i = writeCount - 1; i >= 0; i--) + { + dtAssert(curNode); + + path[i] = curNode->id; + curNode = m_nodePool->getNodeAtIdx(curNode->pidx); + } + + dtAssert(!curNode); + + *pathCount = dtMin(length, maxPath); + + if (length > maxPath) + return DT_SUCCESS | DT_BUFFER_TOO_SMALL; + + return DT_SUCCESS; +} + + +/// @par +/// +/// @warning Calling any non-slice methods before calling finalizeSlicedFindPath() +/// or finalizeSlicedFindPathPartial() may result in corrupted data! +/// +/// The @p filter pointer is stored and used for the duration of the sliced +/// path query. +/// +dtStatus dtNavMeshQuery::initSlicedFindPath(dtPolyRef startRef, dtPolyRef endRef, + const float* startPos, const float* endPos, + const dtQueryFilter* filter, const unsigned int options) +{ + dtAssert(m_nav); + dtAssert(m_nodePool); + dtAssert(m_openList); + + // Init path state. + memset(&m_query, 0, sizeof(dtQueryData)); + m_query.status = DT_FAILURE; + m_query.startRef = startRef; + m_query.endRef = endRef; + dtVcopy(m_query.startPos, startPos); + dtVcopy(m_query.endPos, endPos); + m_query.filter = filter; + m_query.options = options; + m_query.raycastLimitSqr = FLT_MAX; + + if (!startRef || !endRef) + return DT_FAILURE | DT_INVALID_PARAM; + + // Validate input + if (!m_nav->isValidPolyRef(startRef) || !m_nav->isValidPolyRef(endRef)) + return DT_FAILURE | DT_INVALID_PARAM; + + // trade quality with performance? + if (options & DT_FINDPATH_ANY_ANGLE) + { + // limiting to several times the character radius yields nice results. It is not sensitive + // so it is enough to compute it from the first tile. + const dtMeshTile* tile = m_nav->getTileByRef(startRef); + float agentRadius = tile->header->walkableRadius; + m_query.raycastLimitSqr = dtSqr(agentRadius * DT_RAY_CAST_LIMIT_PROPORTIONS); + } + + if (startRef == endRef) + { + m_query.status = DT_SUCCESS; + return DT_SUCCESS; + } + + m_nodePool->clear(); + m_openList->clear(); + + dtNode* startNode = m_nodePool->getNode(startRef); + dtVcopy(startNode->pos, startPos); + startNode->pidx = 0; + startNode->cost = 0; + startNode->total = dtVdist(startPos, endPos) * H_SCALE; + startNode->id = startRef; + startNode->flags = DT_NODE_OPEN; + m_openList->push(startNode); + + m_query.status = DT_IN_PROGRESS; + m_query.lastBestNode = startNode; + m_query.lastBestNodeCost = startNode->total; + + return m_query.status; +} + +dtStatus dtNavMeshQuery::updateSlicedFindPath(const int maxIter, int* doneIters) +{ + if (!dtStatusInProgress(m_query.status)) + return m_query.status; + + // Make sure the request is still valid. + if (!m_nav->isValidPolyRef(m_query.startRef) || !m_nav->isValidPolyRef(m_query.endRef)) + { + m_query.status = DT_FAILURE; + return DT_FAILURE; + } + + dtRaycastHit rayHit; + rayHit.maxPath = 0; + + int iter = 0; + while (iter < maxIter && !m_openList->empty()) + { + iter++; + + // Remove node from open list and put it in closed list. + dtNode* bestNode = m_openList->pop(); + bestNode->flags &= ~DT_NODE_OPEN; + bestNode->flags |= DT_NODE_CLOSED; + + // Reached the goal, stop searching. + if (bestNode->id == m_query.endRef) + { + m_query.lastBestNode = bestNode; + const dtStatus details = m_query.status & DT_STATUS_DETAIL_MASK; + m_query.status = DT_SUCCESS | details; + if (doneIters) + *doneIters = iter; + return m_query.status; + } + + // Get current poly and tile. + // The API input has been cheked already, skip checking internal data. + const dtPolyRef bestRef = bestNode->id; + const dtMeshTile* bestTile = 0; + const dtPoly* bestPoly = 0; + if (dtStatusFailed(m_nav->getTileAndPolyByRef(bestRef, &bestTile, &bestPoly))) + { + // The polygon has disappeared during the sliced query, fail. + m_query.status = DT_FAILURE; + if (doneIters) + *doneIters = iter; + return m_query.status; + } + + // Get parent and grand parent poly and tile. + dtPolyRef parentRef = 0, grandpaRef = 0; + const dtMeshTile* parentTile = 0; + const dtPoly* parentPoly = 0; + dtNode* parentNode = 0; + if (bestNode->pidx) + { + parentNode = m_nodePool->getNodeAtIdx(bestNode->pidx); + parentRef = parentNode->id; + if (parentNode->pidx) + grandpaRef = m_nodePool->getNodeAtIdx(parentNode->pidx)->id; + } + if (parentRef) + { + bool invalidParent = dtStatusFailed(m_nav->getTileAndPolyByRef(parentRef, &parentTile, &parentPoly)); + if (invalidParent || (grandpaRef && !m_nav->isValidPolyRef(grandpaRef)) ) + { + // The polygon has disappeared during the sliced query, fail. + m_query.status = DT_FAILURE; + if (doneIters) + *doneIters = iter; + return m_query.status; + } + } + + // decide whether to test raycast to previous nodes + bool tryLOS = false; + if (m_query.options & DT_FINDPATH_ANY_ANGLE) + { + if ((parentRef != 0) && (dtVdistSqr(parentNode->pos, bestNode->pos) < m_query.raycastLimitSqr)) + tryLOS = true; + } + + for (unsigned int i = bestPoly->firstLink; i != DT_NULL_LINK; i = bestTile->links[i].next) + { + dtPolyRef neighbourRef = bestTile->links[i].ref; + + // Skip invalid ids and do not expand back to where we came from. + if (!neighbourRef || neighbourRef == parentRef) + continue; + + // Get neighbour poly and tile. + // The API input has been cheked already, skip checking internal data. + const dtMeshTile* neighbourTile = 0; + const dtPoly* neighbourPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(neighbourRef, &neighbourTile, &neighbourPoly); + + if (!m_query.filter->passFilter(neighbourRef, neighbourTile, neighbourPoly)) + continue; + + // get the neighbor node + dtNode* neighbourNode = m_nodePool->getNode(neighbourRef, 0); + if (!neighbourNode) + { + m_query.status |= DT_OUT_OF_NODES; + continue; + } + + // do not expand to nodes that were already visited from the same parent + if (neighbourNode->pidx != 0 && neighbourNode->pidx == bestNode->pidx) + continue; + + // If the node is visited the first time, calculate node position. + if (neighbourNode->flags == 0) + { + getEdgeMidPoint(bestRef, bestPoly, bestTile, + neighbourRef, neighbourPoly, neighbourTile, + neighbourNode->pos); + } + + // Calculate cost and heuristic. + float cost = 0; + float heuristic = 0; + + // raycast parent + bool foundShortCut = false; + rayHit.pathCost = rayHit.t = 0; + if (tryLOS) + { + raycast(parentRef, parentNode->pos, neighbourNode->pos, m_query.filter, DT_RAYCAST_USE_COSTS, &rayHit, grandpaRef); + foundShortCut = rayHit.t >= 1.0f; + } + + // update move cost + if (foundShortCut) + { + // shortcut found using raycast. Using shorter cost instead + cost = parentNode->cost + rayHit.pathCost; + } + else + { + // No shortcut found. + const float curCost = m_query.filter->getCost(bestNode->pos, neighbourNode->pos, + parentRef, parentTile, parentPoly, + bestRef, bestTile, bestPoly, + neighbourRef, neighbourTile, neighbourPoly); + cost = bestNode->cost + curCost; + } + + // Special case for last node. + if (neighbourRef == m_query.endRef) + { + const float endCost = m_query.filter->getCost(neighbourNode->pos, m_query.endPos, + bestRef, bestTile, bestPoly, + neighbourRef, neighbourTile, neighbourPoly, + 0, 0, 0); + + cost = cost + endCost; + heuristic = 0; + } + else + { + heuristic = dtVdist(neighbourNode->pos, m_query.endPos)*H_SCALE; + } + + const float total = cost + heuristic; + + // The node is already in open list and the new result is worse, skip. + if ((neighbourNode->flags & DT_NODE_OPEN) && total >= neighbourNode->total) + continue; + // The node is already visited and process, and the new result is worse, skip. + if ((neighbourNode->flags & DT_NODE_CLOSED) && total >= neighbourNode->total) + continue; + + // Add or update the node. + neighbourNode->pidx = foundShortCut ? bestNode->pidx : m_nodePool->getNodeIdx(bestNode); + neighbourNode->id = neighbourRef; + neighbourNode->flags = (neighbourNode->flags & ~(DT_NODE_CLOSED | DT_NODE_PARENT_DETACHED)); + neighbourNode->cost = cost; + neighbourNode->total = total; + if (foundShortCut) + neighbourNode->flags = (neighbourNode->flags | DT_NODE_PARENT_DETACHED); + + if (neighbourNode->flags & DT_NODE_OPEN) + { + // Already in open, update node location. + m_openList->modify(neighbourNode); + } + else + { + // Put the node in open list. + neighbourNode->flags |= DT_NODE_OPEN; + m_openList->push(neighbourNode); + } + + // Update nearest node to target so far. + if (heuristic < m_query.lastBestNodeCost) + { + m_query.lastBestNodeCost = heuristic; + m_query.lastBestNode = neighbourNode; + } + } + } + + // Exhausted all nodes, but could not find path. + if (m_openList->empty()) + { + const dtStatus details = m_query.status & DT_STATUS_DETAIL_MASK; + m_query.status = DT_SUCCESS | details; + } + + if (doneIters) + *doneIters = iter; + + return m_query.status; +} + +dtStatus dtNavMeshQuery::finalizeSlicedFindPath(dtPolyRef* path, int* pathCount, const int maxPath) +{ + *pathCount = 0; + + if (dtStatusFailed(m_query.status)) + { + // Reset query. + memset(&m_query, 0, sizeof(dtQueryData)); + return DT_FAILURE; + } + + int n = 0; + + if (m_query.startRef == m_query.endRef) + { + // Special case: the search starts and ends at same poly. + path[n++] = m_query.startRef; + } + else + { + // Reverse the path. + dtAssert(m_query.lastBestNode); + + if (m_query.lastBestNode->id != m_query.endRef) + m_query.status |= DT_PARTIAL_RESULT; + + dtNode* prev = 0; + dtNode* node = m_query.lastBestNode; + int prevRay = 0; + do + { + dtNode* next = m_nodePool->getNodeAtIdx(node->pidx); + node->pidx = m_nodePool->getNodeIdx(prev); + prev = node; + int nextRay = node->flags & DT_NODE_PARENT_DETACHED; // keep track of whether parent is not adjacent (i.e. due to raycast shortcut) + node->flags = (node->flags & ~DT_NODE_PARENT_DETACHED) | prevRay; // and store it in the reversed path's node + prevRay = nextRay; + node = next; + } + while (node); + + // Store path + node = prev; + do + { + dtNode* next = m_nodePool->getNodeAtIdx(node->pidx); + dtStatus status = 0; + if (node->flags & DT_NODE_PARENT_DETACHED) + { + float t, normal[3]; + int m; + status = raycast(node->id, node->pos, next->pos, m_query.filter, &t, normal, path+n, &m, maxPath-n); + n += m; + // raycast ends on poly boundary and the path might include the next poly boundary. + if (path[n-1] == next->id) + n--; // remove to avoid duplicates + } + else + { + path[n++] = node->id; + if (n >= maxPath) + status = DT_BUFFER_TOO_SMALL; + } + + if (status & DT_STATUS_DETAIL_MASK) + { + m_query.status |= status & DT_STATUS_DETAIL_MASK; + break; + } + node = next; + } + while (node); + } + + const dtStatus details = m_query.status & DT_STATUS_DETAIL_MASK; + + // Reset query. + memset(&m_query, 0, sizeof(dtQueryData)); + + *pathCount = n; + + return DT_SUCCESS | details; +} + +dtStatus dtNavMeshQuery::finalizeSlicedFindPathPartial(const dtPolyRef* existing, const int existingSize, + dtPolyRef* path, int* pathCount, const int maxPath) +{ + *pathCount = 0; + + if (existingSize == 0) + { + return DT_FAILURE; + } + + if (dtStatusFailed(m_query.status)) + { + // Reset query. + memset(&m_query, 0, sizeof(dtQueryData)); + return DT_FAILURE; + } + + int n = 0; + + if (m_query.startRef == m_query.endRef) + { + // Special case: the search starts and ends at same poly. + path[n++] = m_query.startRef; + } + else + { + // Find furthest existing node that was visited. + dtNode* prev = 0; + dtNode* node = 0; + for (int i = existingSize-1; i >= 0; --i) + { + m_nodePool->findNodes(existing[i], &node, 1); + if (node) + break; + } + + if (!node) + { + m_query.status |= DT_PARTIAL_RESULT; + dtAssert(m_query.lastBestNode); + node = m_query.lastBestNode; + } + + // Reverse the path. + int prevRay = 0; + do + { + dtNode* next = m_nodePool->getNodeAtIdx(node->pidx); + node->pidx = m_nodePool->getNodeIdx(prev); + prev = node; + int nextRay = node->flags & DT_NODE_PARENT_DETACHED; // keep track of whether parent is not adjacent (i.e. due to raycast shortcut) + node->flags = (node->flags & ~DT_NODE_PARENT_DETACHED) | prevRay; // and store it in the reversed path's node + prevRay = nextRay; + node = next; + } + while (node); + + // Store path + node = prev; + do + { + dtNode* next = m_nodePool->getNodeAtIdx(node->pidx); + dtStatus status = 0; + if (node->flags & DT_NODE_PARENT_DETACHED) + { + float t, normal[3]; + int m; + status = raycast(node->id, node->pos, next->pos, m_query.filter, &t, normal, path+n, &m, maxPath-n); + n += m; + // raycast ends on poly boundary and the path might include the next poly boundary. + if (path[n-1] == next->id) + n--; // remove to avoid duplicates + } + else + { + path[n++] = node->id; + if (n >= maxPath) + status = DT_BUFFER_TOO_SMALL; + } + + if (status & DT_STATUS_DETAIL_MASK) + { + m_query.status |= status & DT_STATUS_DETAIL_MASK; + break; + } + node = next; + } + while (node); + } + + const dtStatus details = m_query.status & DT_STATUS_DETAIL_MASK; + + // Reset query. + memset(&m_query, 0, sizeof(dtQueryData)); + + *pathCount = n; + + return DT_SUCCESS | details; +} + + +dtStatus dtNavMeshQuery::appendVertex(const float* pos, const unsigned char flags, const dtPolyRef ref, + float* straightPath, unsigned char* straightPathFlags, dtPolyRef* straightPathRefs, + int* straightPathCount, const int maxStraightPath) const +{ + if ((*straightPathCount) > 0 && dtVequal(&straightPath[((*straightPathCount)-1)*3], pos)) + { + // The vertices are equal, update flags and poly. + if (straightPathFlags) + straightPathFlags[(*straightPathCount)-1] = flags; + if (straightPathRefs) + straightPathRefs[(*straightPathCount)-1] = ref; + } + else + { + // Append new vertex. + dtVcopy(&straightPath[(*straightPathCount)*3], pos); + if (straightPathFlags) + straightPathFlags[(*straightPathCount)] = flags; + if (straightPathRefs) + straightPathRefs[(*straightPathCount)] = ref; + (*straightPathCount)++; + + // If there is no space to append more vertices, return. + if ((*straightPathCount) >= maxStraightPath) + { + return DT_SUCCESS | DT_BUFFER_TOO_SMALL; + } + + // If reached end of path, return. + if (flags == DT_STRAIGHTPATH_END) + { + return DT_SUCCESS; + } + } + return DT_IN_PROGRESS; +} + +dtStatus dtNavMeshQuery::appendPortals(const int startIdx, const int endIdx, const float* endPos, const dtPolyRef* path, + float* straightPath, unsigned char* straightPathFlags, dtPolyRef* straightPathRefs, + int* straightPathCount, const int maxStraightPath, const int options) const +{ + const float* startPos = &straightPath[(*straightPathCount-1)*3]; + // Append or update last vertex + dtStatus stat = 0; + for (int i = startIdx; i < endIdx; i++) + { + // Calculate portal + const dtPolyRef from = path[i]; + const dtMeshTile* fromTile = 0; + const dtPoly* fromPoly = 0; + if (dtStatusFailed(m_nav->getTileAndPolyByRef(from, &fromTile, &fromPoly))) + return DT_FAILURE | DT_INVALID_PARAM; + + const dtPolyRef to = path[i+1]; + const dtMeshTile* toTile = 0; + const dtPoly* toPoly = 0; + if (dtStatusFailed(m_nav->getTileAndPolyByRef(to, &toTile, &toPoly))) + return DT_FAILURE | DT_INVALID_PARAM; + + float left[3], right[3]; + if (dtStatusFailed(getPortalPoints(from, fromPoly, fromTile, to, toPoly, toTile, left, right))) + break; + + if (options & DT_STRAIGHTPATH_AREA_CROSSINGS) + { + // Skip intersection if only area crossings are requested. + if (fromPoly->getArea() == toPoly->getArea()) + continue; + } + + // Append intersection + float s,t; + if (dtIntersectSegSeg2D(startPos, endPos, left, right, s, t)) + { + float pt[3]; + dtVlerp(pt, left,right, t); + + stat = appendVertex(pt, 0, path[i+1], + straightPath, straightPathFlags, straightPathRefs, + straightPathCount, maxStraightPath); + if (stat != DT_IN_PROGRESS) + return stat; + } + } + return DT_IN_PROGRESS; +} + +/// @par +/// +/// This method peforms what is often called 'string pulling'. +/// +/// The start position is clamped to the first polygon in the path, and the +/// end position is clamped to the last. So the start and end positions should +/// normally be within or very near the first and last polygons respectively. +/// +/// The returned polygon references represent the reference id of the polygon +/// that is entered at the associated path position. The reference id associated +/// with the end point will always be zero. This allows, for example, matching +/// off-mesh link points to their representative polygons. +/// +/// If the provided result buffers are too small for the entire result set, +/// they will be filled as far as possible from the start toward the end +/// position. +/// +dtStatus dtNavMeshQuery::findStraightPath(const float* startPos, const float* endPos, + const dtPolyRef* path, const int pathSize, + float* straightPath, unsigned char* straightPathFlags, dtPolyRef* straightPathRefs, + int* straightPathCount, const int maxStraightPath, const int options) const +{ + dtAssert(m_nav); + + *straightPathCount = 0; + + if (!maxStraightPath) + return DT_FAILURE | DT_INVALID_PARAM; + + if (!path[0]) + return DT_FAILURE | DT_INVALID_PARAM; + + dtStatus stat = 0; + + // TODO: Should this be callers responsibility? + float closestStartPos[3]; + if (dtStatusFailed(closestPointOnPolyBoundary(path[0], startPos, closestStartPos))) + return DT_FAILURE | DT_INVALID_PARAM; + + float closestEndPos[3]; + if (dtStatusFailed(closestPointOnPolyBoundary(path[pathSize-1], endPos, closestEndPos))) + return DT_FAILURE | DT_INVALID_PARAM; + + // Add start point. + stat = appendVertex(closestStartPos, DT_STRAIGHTPATH_START, path[0], + straightPath, straightPathFlags, straightPathRefs, + straightPathCount, maxStraightPath); + if (stat != DT_IN_PROGRESS) + return stat; + + if (pathSize > 1) + { + float portalApex[3], portalLeft[3], portalRight[3]; + dtVcopy(portalApex, closestStartPos); + dtVcopy(portalLeft, portalApex); + dtVcopy(portalRight, portalApex); + int apexIndex = 0; + int leftIndex = 0; + int rightIndex = 0; + + unsigned char leftPolyType = 0; + unsigned char rightPolyType = 0; + + dtPolyRef leftPolyRef = path[0]; + dtPolyRef rightPolyRef = path[0]; + + for (int i = 0; i < pathSize; ++i) + { + float left[3], right[3]; + unsigned char toType; + + if (i+1 < pathSize) + { + unsigned char fromType; // fromType is ignored. + + // Next portal. + if (dtStatusFailed(getPortalPoints(path[i], path[i+1], left, right, fromType, toType))) + { + // Failed to get portal points, in practice this means that path[i+1] is invalid polygon. + // Clamp the end point to path[i], and return the path so far. + + if (dtStatusFailed(closestPointOnPolyBoundary(path[i], endPos, closestEndPos))) + { + // This should only happen when the first polygon is invalid. + return DT_FAILURE | DT_INVALID_PARAM; + } + + // Apeend portals along the current straight path segment. + if (options & (DT_STRAIGHTPATH_AREA_CROSSINGS | DT_STRAIGHTPATH_ALL_CROSSINGS)) + { + // Ignore status return value as we're just about to return anyway. + appendPortals(apexIndex, i, closestEndPos, path, + straightPath, straightPathFlags, straightPathRefs, + straightPathCount, maxStraightPath, options); + } + + // Ignore status return value as we're just about to return anyway. + appendVertex(closestEndPos, 0, path[i], + straightPath, straightPathFlags, straightPathRefs, + straightPathCount, maxStraightPath); + + return DT_SUCCESS | DT_PARTIAL_RESULT | ((*straightPathCount >= maxStraightPath) ? DT_BUFFER_TOO_SMALL : 0); + } + + // If starting really close the portal, advance. + if (i == 0) + { + float t; + if (dtDistancePtSegSqr2D(portalApex, left, right, t) < dtSqr(0.001f)) + continue; + } + } + else + { + // End of the path. + dtVcopy(left, closestEndPos); + dtVcopy(right, closestEndPos); + + toType = DT_POLYTYPE_GROUND; + } + + // Right vertex. + if (dtTriArea2D(portalApex, portalRight, right) <= 0.0f) + { + if (dtVequal(portalApex, portalRight) || dtTriArea2D(portalApex, portalLeft, right) > 0.0f) + { + dtVcopy(portalRight, right); + rightPolyRef = (i+1 < pathSize) ? path[i+1] : 0; + rightPolyType = toType; + rightIndex = i; + } + else + { + // Append portals along the current straight path segment. + if (options & (DT_STRAIGHTPATH_AREA_CROSSINGS | DT_STRAIGHTPATH_ALL_CROSSINGS)) + { + stat = appendPortals(apexIndex, leftIndex, portalLeft, path, + straightPath, straightPathFlags, straightPathRefs, + straightPathCount, maxStraightPath, options); + if (stat != DT_IN_PROGRESS) + return stat; + } + + dtVcopy(portalApex, portalLeft); + apexIndex = leftIndex; + + unsigned char flags = 0; + if (!leftPolyRef) + flags = DT_STRAIGHTPATH_END; + else if (leftPolyType == DT_POLYTYPE_OFFMESH_CONNECTION) + flags = DT_STRAIGHTPATH_OFFMESH_CONNECTION; + dtPolyRef ref = leftPolyRef; + + // Append or update vertex + stat = appendVertex(portalApex, flags, ref, + straightPath, straightPathFlags, straightPathRefs, + straightPathCount, maxStraightPath); + if (stat != DT_IN_PROGRESS) + return stat; + + dtVcopy(portalLeft, portalApex); + dtVcopy(portalRight, portalApex); + leftIndex = apexIndex; + rightIndex = apexIndex; + + // Restart + i = apexIndex; + + continue; + } + } + + // Left vertex. + if (dtTriArea2D(portalApex, portalLeft, left) >= 0.0f) + { + if (dtVequal(portalApex, portalLeft) || dtTriArea2D(portalApex, portalRight, left) < 0.0f) + { + dtVcopy(portalLeft, left); + leftPolyRef = (i+1 < pathSize) ? path[i+1] : 0; + leftPolyType = toType; + leftIndex = i; + } + else + { + // Append portals along the current straight path segment. + if (options & (DT_STRAIGHTPATH_AREA_CROSSINGS | DT_STRAIGHTPATH_ALL_CROSSINGS)) + { + stat = appendPortals(apexIndex, rightIndex, portalRight, path, + straightPath, straightPathFlags, straightPathRefs, + straightPathCount, maxStraightPath, options); + if (stat != DT_IN_PROGRESS) + return stat; + } + + dtVcopy(portalApex, portalRight); + apexIndex = rightIndex; + + unsigned char flags = 0; + if (!rightPolyRef) + flags = DT_STRAIGHTPATH_END; + else if (rightPolyType == DT_POLYTYPE_OFFMESH_CONNECTION) + flags = DT_STRAIGHTPATH_OFFMESH_CONNECTION; + dtPolyRef ref = rightPolyRef; + + // Append or update vertex + stat = appendVertex(portalApex, flags, ref, + straightPath, straightPathFlags, straightPathRefs, + straightPathCount, maxStraightPath); + if (stat != DT_IN_PROGRESS) + return stat; + + dtVcopy(portalLeft, portalApex); + dtVcopy(portalRight, portalApex); + leftIndex = apexIndex; + rightIndex = apexIndex; + + // Restart + i = apexIndex; + + continue; + } + } + } + + // Append portals along the current straight path segment. + if (options & (DT_STRAIGHTPATH_AREA_CROSSINGS | DT_STRAIGHTPATH_ALL_CROSSINGS)) + { + stat = appendPortals(apexIndex, pathSize-1, closestEndPos, path, + straightPath, straightPathFlags, straightPathRefs, + straightPathCount, maxStraightPath, options); + if (stat != DT_IN_PROGRESS) + return stat; + } + } + + // Ignore status return value as we're just about to return anyway. + appendVertex(closestEndPos, DT_STRAIGHTPATH_END, 0, + straightPath, straightPathFlags, straightPathRefs, + straightPathCount, maxStraightPath); + + return DT_SUCCESS | ((*straightPathCount >= maxStraightPath) ? DT_BUFFER_TOO_SMALL : 0); +} + +/// @par +/// +/// This method is optimized for small delta movement and a small number of +/// polygons. If used for too great a distance, the result set will form an +/// incomplete path. +/// +/// @p resultPos will equal the @p endPos if the end is reached. +/// Otherwise the closest reachable position will be returned. +/// +/// @p resultPos is not projected onto the surface of the navigation +/// mesh. Use #getPolyHeight if this is needed. +/// +/// This method treats the end position in the same manner as +/// the #raycast method. (As a 2D point.) See that method's documentation +/// for details. +/// +/// If the @p visited array is too small to hold the entire result set, it will +/// be filled as far as possible from the start position toward the end +/// position. +/// +dtStatus dtNavMeshQuery::moveAlongSurface(dtPolyRef startRef, const float* startPos, const float* endPos, + const dtQueryFilter* filter, + float* resultPos, dtPolyRef* visited, int* visitedCount, const int maxVisitedSize) const +{ + dtAssert(m_nav); + dtAssert(m_tinyNodePool); + + *visitedCount = 0; + + // Validate input + if (!startRef) + return DT_FAILURE | DT_INVALID_PARAM; + if (!m_nav->isValidPolyRef(startRef)) + return DT_FAILURE | DT_INVALID_PARAM; + + dtStatus status = DT_SUCCESS; + + static const int MAX_STACK = 48; + dtNode* stack[MAX_STACK]; + int nstack = 0; + + m_tinyNodePool->clear(); + + dtNode* startNode = m_tinyNodePool->getNode(startRef); + startNode->pidx = 0; + startNode->cost = 0; + startNode->total = 0; + startNode->id = startRef; + startNode->flags = DT_NODE_CLOSED; + stack[nstack++] = startNode; + + float bestPos[3]; + float bestDist = FLT_MAX; + dtNode* bestNode = 0; + dtVcopy(bestPos, startPos); + + // Search constraints + float searchPos[3], searchRadSqr; + dtVlerp(searchPos, startPos, endPos, 0.5f); + searchRadSqr = dtSqr(dtVdist(startPos, endPos)/2.0f + 0.001f); + + float verts[DT_VERTS_PER_POLYGON*3]; + + while (nstack) + { + // Pop front. + dtNode* curNode = stack[0]; + for (int i = 0; i < nstack-1; ++i) + stack[i] = stack[i+1]; + nstack--; + + // Get poly and tile. + // The API input has been cheked already, skip checking internal data. + const dtPolyRef curRef = curNode->id; + const dtMeshTile* curTile = 0; + const dtPoly* curPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(curRef, &curTile, &curPoly); + + // Collect vertices. + const int nverts = curPoly->vertCount; + for (int i = 0; i < nverts; ++i) + dtVcopy(&verts[i*3], &curTile->verts[curPoly->verts[i]*3]); + + // If target is inside the poly, stop search. + if (dtPointInPolygon(endPos, verts, nverts)) + { + bestNode = curNode; + dtVcopy(bestPos, endPos); + break; + } + + // Find wall edges and find nearest point inside the walls. + for (int i = 0, j = (int)curPoly->vertCount-1; i < (int)curPoly->vertCount; j = i++) + { + // Find links to neighbours. + static const int MAX_NEIS = 8; + int nneis = 0; + dtPolyRef neis[MAX_NEIS]; + + if (curPoly->neis[j] & DT_EXT_LINK) + { + // Tile border. + for (unsigned int k = curPoly->firstLink; k != DT_NULL_LINK; k = curTile->links[k].next) + { + const dtLink* link = &curTile->links[k]; + if (link->edge == j) + { + if (link->ref != 0) + { + const dtMeshTile* neiTile = 0; + const dtPoly* neiPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(link->ref, &neiTile, &neiPoly); + if (filter->passFilter(link->ref, neiTile, neiPoly)) + { + if (nneis < MAX_NEIS) + neis[nneis++] = link->ref; + } + } + } + } + } + else if (curPoly->neis[j]) + { + const unsigned int idx = (unsigned int)(curPoly->neis[j]-1); + const dtPolyRef ref = m_nav->getPolyRefBase(curTile) | idx; + if (filter->passFilter(ref, curTile, &curTile->polys[idx])) + { + // Internal edge, encode id. + neis[nneis++] = ref; + } + } + + if (!nneis) + { + // Wall edge, calc distance. + const float* vj = &verts[j*3]; + const float* vi = &verts[i*3]; + float tseg; + const float distSqr = dtDistancePtSegSqr2D(endPos, vj, vi, tseg); + if (distSqr < bestDist) + { + // Update nearest distance. + dtVlerp(bestPos, vj,vi, tseg); + bestDist = distSqr; + bestNode = curNode; + } + } + else + { + for (int k = 0; k < nneis; ++k) + { + // Skip if no node can be allocated. + dtNode* neighbourNode = m_tinyNodePool->getNode(neis[k]); + if (!neighbourNode) + continue; + // Skip if already visited. + if (neighbourNode->flags & DT_NODE_CLOSED) + continue; + + // Skip the link if it is too far from search constraint. + // TODO: Maybe should use getPortalPoints(), but this one is way faster. + const float* vj = &verts[j*3]; + const float* vi = &verts[i*3]; + float tseg; + float distSqr = dtDistancePtSegSqr2D(searchPos, vj, vi, tseg); + if (distSqr > searchRadSqr) + continue; + + // Mark as the node as visited and push to queue. + if (nstack < MAX_STACK) + { + neighbourNode->pidx = m_tinyNodePool->getNodeIdx(curNode); + neighbourNode->flags |= DT_NODE_CLOSED; + stack[nstack++] = neighbourNode; + } + } + } + } + } + + int n = 0; + if (bestNode) + { + // Reverse the path. + dtNode* prev = 0; + dtNode* node = bestNode; + do + { + dtNode* next = m_tinyNodePool->getNodeAtIdx(node->pidx); + node->pidx = m_tinyNodePool->getNodeIdx(prev); + prev = node; + node = next; + } + while (node); + + // Store result + node = prev; + do + { + visited[n++] = node->id; + if (n >= maxVisitedSize) + { + status |= DT_BUFFER_TOO_SMALL; + break; + } + node = m_tinyNodePool->getNodeAtIdx(node->pidx); + } + while (node); + } + + dtVcopy(resultPos, bestPos); + + *visitedCount = n; + + return status; +} + + +dtStatus dtNavMeshQuery::getPortalPoints(dtPolyRef from, dtPolyRef to, float* left, float* right, + unsigned char& fromType, unsigned char& toType) const +{ + dtAssert(m_nav); + + const dtMeshTile* fromTile = 0; + const dtPoly* fromPoly = 0; + if (dtStatusFailed(m_nav->getTileAndPolyByRef(from, &fromTile, &fromPoly))) + return DT_FAILURE | DT_INVALID_PARAM; + fromType = fromPoly->getType(); + + const dtMeshTile* toTile = 0; + const dtPoly* toPoly = 0; + if (dtStatusFailed(m_nav->getTileAndPolyByRef(to, &toTile, &toPoly))) + return DT_FAILURE | DT_INVALID_PARAM; + toType = toPoly->getType(); + + return getPortalPoints(from, fromPoly, fromTile, to, toPoly, toTile, left, right); +} + +// Returns portal points between two polygons. +dtStatus dtNavMeshQuery::getPortalPoints(dtPolyRef from, const dtPoly* fromPoly, const dtMeshTile* fromTile, + dtPolyRef to, const dtPoly* toPoly, const dtMeshTile* toTile, + float* left, float* right) const +{ + // Find the link that points to the 'to' polygon. + const dtLink* link = 0; + for (unsigned int i = fromPoly->firstLink; i != DT_NULL_LINK; i = fromTile->links[i].next) + { + if (fromTile->links[i].ref == to) + { + link = &fromTile->links[i]; + break; + } + } + if (!link) + return DT_FAILURE | DT_INVALID_PARAM; + + // Handle off-mesh connections. + if (fromPoly->getType() == DT_POLYTYPE_OFFMESH_CONNECTION) + { + // Find link that points to first vertex. + for (unsigned int i = fromPoly->firstLink; i != DT_NULL_LINK; i = fromTile->links[i].next) + { + if (fromTile->links[i].ref == to) + { + const int v = fromTile->links[i].edge; + dtVcopy(left, &fromTile->verts[fromPoly->verts[v]*3]); + dtVcopy(right, &fromTile->verts[fromPoly->verts[v]*3]); + return DT_SUCCESS; + } + } + return DT_FAILURE | DT_INVALID_PARAM; + } + + if (toPoly->getType() == DT_POLYTYPE_OFFMESH_CONNECTION) + { + for (unsigned int i = toPoly->firstLink; i != DT_NULL_LINK; i = toTile->links[i].next) + { + if (toTile->links[i].ref == from) + { + const int v = toTile->links[i].edge; + dtVcopy(left, &toTile->verts[toPoly->verts[v]*3]); + dtVcopy(right, &toTile->verts[toPoly->verts[v]*3]); + return DT_SUCCESS; + } + } + return DT_FAILURE | DT_INVALID_PARAM; + } + + // Find portal vertices. + const int v0 = fromPoly->verts[link->edge]; + const int v1 = fromPoly->verts[(link->edge+1) % (int)fromPoly->vertCount]; + dtVcopy(left, &fromTile->verts[v0*3]); + dtVcopy(right, &fromTile->verts[v1*3]); + + // If the link is at tile boundary, dtClamp the vertices to + // the link width. + if (link->side != 0xff) + { + // Unpack portal limits. + if (link->bmin != 0 || link->bmax != 255) + { + const float s = 1.0f/255.0f; + const float tmin = link->bmin*s; + const float tmax = link->bmax*s; + dtVlerp(left, &fromTile->verts[v0*3], &fromTile->verts[v1*3], tmin); + dtVlerp(right, &fromTile->verts[v0*3], &fromTile->verts[v1*3], tmax); + } + } + + return DT_SUCCESS; +} + +// Returns edge mid point between two polygons. +dtStatus dtNavMeshQuery::getEdgeMidPoint(dtPolyRef from, dtPolyRef to, float* mid) const +{ + float left[3], right[3]; + unsigned char fromType, toType; + if (dtStatusFailed(getPortalPoints(from, to, left,right, fromType, toType))) + return DT_FAILURE | DT_INVALID_PARAM; + mid[0] = (left[0]+right[0])*0.5f; + mid[1] = (left[1]+right[1])*0.5f; + mid[2] = (left[2]+right[2])*0.5f; + return DT_SUCCESS; +} + +dtStatus dtNavMeshQuery::getEdgeMidPoint(dtPolyRef from, const dtPoly* fromPoly, const dtMeshTile* fromTile, + dtPolyRef to, const dtPoly* toPoly, const dtMeshTile* toTile, + float* mid) const +{ + float left[3], right[3]; + if (dtStatusFailed(getPortalPoints(from, fromPoly, fromTile, to, toPoly, toTile, left, right))) + return DT_FAILURE | DT_INVALID_PARAM; + mid[0] = (left[0]+right[0])*0.5f; + mid[1] = (left[1]+right[1])*0.5f; + mid[2] = (left[2]+right[2])*0.5f; + return DT_SUCCESS; +} + + + +/// @par +/// +/// This method is meant to be used for quick, short distance checks. +/// +/// If the path array is too small to hold the result, it will be filled as +/// far as possible from the start postion toward the end position. +/// +/// Using the Hit Parameter (t) +/// +/// If the hit parameter is a very high value (FLT_MAX), then the ray has hit +/// the end position. In this case the path represents a valid corridor to the +/// end position and the value of @p hitNormal is undefined. +/// +/// If the hit parameter is zero, then the start position is on the wall that +/// was hit and the value of @p hitNormal is undefined. +/// +/// If 0 < t < 1.0 then the following applies: +/// +/// @code +/// distanceToHitBorder = distanceToEndPosition * t +/// hitPoint = startPos + (endPos - startPos) * t +/// @endcode +/// +/// Use Case Restriction +/// +/// The raycast ignores the y-value of the end position. (2D check.) This +/// places significant limits on how it can be used. For example: +/// +/// Consider a scene where there is a main floor with a second floor balcony +/// that hangs over the main floor. So the first floor mesh extends below the +/// balcony mesh. The start position is somewhere on the first floor. The end +/// position is on the balcony. +/// +/// The raycast will search toward the end position along the first floor mesh. +/// If it reaches the end position's xz-coordinates it will indicate FLT_MAX +/// (no wall hit), meaning it reached the end position. This is one example of why +/// this method is meant for short distance checks. +/// +dtStatus dtNavMeshQuery::raycast(dtPolyRef startRef, const float* startPos, const float* endPos, + const dtQueryFilter* filter, + float* t, float* hitNormal, dtPolyRef* path, int* pathCount, const int maxPath) const +{ + dtRaycastHit hit; + hit.path = path; + hit.maxPath = maxPath; + + dtStatus status = raycast(startRef, startPos, endPos, filter, 0, &hit); + + *t = hit.t; + if (hitNormal) + dtVcopy(hitNormal, hit.hitNormal); + if (pathCount) + *pathCount = hit.pathCount; + + return status; +} + + +/// @par +/// +/// This method is meant to be used for quick, short distance checks. +/// +/// If the path array is too small to hold the result, it will be filled as +/// far as possible from the start postion toward the end position. +/// +/// Using the Hit Parameter t of RaycastHit +/// +/// If the hit parameter is a very high value (FLT_MAX), then the ray has hit +/// the end position. In this case the path represents a valid corridor to the +/// end position and the value of @p hitNormal is undefined. +/// +/// If the hit parameter is zero, then the start position is on the wall that +/// was hit and the value of @p hitNormal is undefined. +/// +/// If 0 < t < 1.0 then the following applies: +/// +/// @code +/// distanceToHitBorder = distanceToEndPosition * t +/// hitPoint = startPos + (endPos - startPos) * t +/// @endcode +/// +/// Use Case Restriction +/// +/// The raycast ignores the y-value of the end position. (2D check.) This +/// places significant limits on how it can be used. For example: +/// +/// Consider a scene where there is a main floor with a second floor balcony +/// that hangs over the main floor. So the first floor mesh extends below the +/// balcony mesh. The start position is somewhere on the first floor. The end +/// position is on the balcony. +/// +/// The raycast will search toward the end position along the first floor mesh. +/// If it reaches the end position's xz-coordinates it will indicate FLT_MAX +/// (no wall hit), meaning it reached the end position. This is one example of why +/// this method is meant for short distance checks. +/// +dtStatus dtNavMeshQuery::raycast(dtPolyRef startRef, const float* startPos, const float* endPos, + const dtQueryFilter* filter, const unsigned int options, + dtRaycastHit* hit, dtPolyRef prevRef) const +{ + dtAssert(m_nav); + + hit->t = 0; + hit->pathCount = 0; + hit->pathCost = 0; + + // Validate input + if (!startRef || !m_nav->isValidPolyRef(startRef)) + return DT_FAILURE | DT_INVALID_PARAM; + if (prevRef && !m_nav->isValidPolyRef(prevRef)) + return DT_FAILURE | DT_INVALID_PARAM; + + float dir[3], curPos[3], lastPos[3]; + float verts[DT_VERTS_PER_POLYGON*3+3]; + int n = 0; + + dtVcopy(curPos, startPos); + dtVsub(dir, endPos, startPos); + dtVset(hit->hitNormal, 0, 0, 0); + + dtStatus status = DT_SUCCESS; + + const dtMeshTile* prevTile, *tile, *nextTile; + const dtPoly* prevPoly, *poly, *nextPoly; + dtPolyRef curRef; + + // The API input has been checked already, skip checking internal data. + curRef = startRef; + tile = 0; + poly = 0; + m_nav->getTileAndPolyByRefUnsafe(curRef, &tile, &poly); + nextTile = prevTile = tile; + nextPoly = prevPoly = poly; + if (prevRef) + m_nav->getTileAndPolyByRefUnsafe(prevRef, &prevTile, &prevPoly); + + while (curRef) + { + // Cast ray against current polygon. + + // Collect vertices. + int nv = 0; + for (int i = 0; i < (int)poly->vertCount; ++i) + { + dtVcopy(&verts[nv*3], &tile->verts[poly->verts[i]*3]); + nv++; + } + + float tmin, tmax; + int segMin, segMax; + if (!dtIntersectSegmentPoly2D(startPos, endPos, verts, nv, tmin, tmax, segMin, segMax)) + { + // Could not hit the polygon, keep the old t and report hit. + hit->pathCount = n; + return status; + } + + hit->hitEdgeIndex = segMax; + + // Keep track of furthest t so far. + if (tmax > hit->t) + hit->t = tmax; + + // Store visited polygons. + if (n < hit->maxPath) + hit->path[n++] = curRef; + else + status |= DT_BUFFER_TOO_SMALL; + + // Ray end is completely inside the polygon. + if (segMax == -1) + { + hit->t = FLT_MAX; + hit->pathCount = n; + + // add the cost + if (options & DT_RAYCAST_USE_COSTS) + hit->pathCost += filter->getCost(curPos, endPos, prevRef, prevTile, prevPoly, curRef, tile, poly, curRef, tile, poly); + return status; + } + + // Follow neighbours. + dtPolyRef nextRef = 0; + + for (unsigned int i = poly->firstLink; i != DT_NULL_LINK; i = tile->links[i].next) + { + const dtLink* link = &tile->links[i]; + + // Find link which contains this edge. + if ((int)link->edge != segMax) + continue; + + // Get pointer to the next polygon. + nextTile = 0; + nextPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(link->ref, &nextTile, &nextPoly); + + // Skip off-mesh connections. + if (nextPoly->getType() == DT_POLYTYPE_OFFMESH_CONNECTION) + continue; + + // Skip links based on filter. + if (!filter->passFilter(link->ref, nextTile, nextPoly)) + continue; + + // If the link is internal, just return the ref. + if (link->side == 0xff) + { + nextRef = link->ref; + break; + } + + // If the link is at tile boundary, + + // Check if the link spans the whole edge, and accept. + if (link->bmin == 0 && link->bmax == 255) + { + nextRef = link->ref; + break; + } + + // Check for partial edge links. + const int v0 = poly->verts[link->edge]; + const int v1 = poly->verts[(link->edge+1) % poly->vertCount]; + const float* left = &tile->verts[v0*3]; + const float* right = &tile->verts[v1*3]; + + // Check that the intersection lies inside the link portal. + if (link->side == 0 || link->side == 4) + { + // Calculate link size. + const float s = 1.0f/255.0f; + float lmin = left[2] + (right[2] - left[2])*(link->bmin*s); + float lmax = left[2] + (right[2] - left[2])*(link->bmax*s); + if (lmin > lmax) dtSwap(lmin, lmax); + + // Find Z intersection. + float z = startPos[2] + (endPos[2]-startPos[2])*tmax; + if (z >= lmin && z <= lmax) + { + nextRef = link->ref; + break; + } + } + else if (link->side == 2 || link->side == 6) + { + // Calculate link size. + const float s = 1.0f/255.0f; + float lmin = left[0] + (right[0] - left[0])*(link->bmin*s); + float lmax = left[0] + (right[0] - left[0])*(link->bmax*s); + if (lmin > lmax) dtSwap(lmin, lmax); + + // Find X intersection. + float x = startPos[0] + (endPos[0]-startPos[0])*tmax; + if (x >= lmin && x <= lmax) + { + nextRef = link->ref; + break; + } + } + } + + // add the cost + if (options & DT_RAYCAST_USE_COSTS) + { + // compute the intersection point at the furthest end of the polygon + // and correct the height (since the raycast moves in 2d) + dtVcopy(lastPos, curPos); + dtVmad(curPos, startPos, dir, hit->t); + float* e1 = &verts[segMax*3]; + float* e2 = &verts[((segMax+1)%nv)*3]; + float eDir[3], diff[3]; + dtVsub(eDir, e2, e1); + dtVsub(diff, curPos, e1); + float s = dtSqr(eDir[0]) > dtSqr(eDir[2]) ? diff[0] / eDir[0] : diff[2] / eDir[2]; + curPos[1] = e1[1] + eDir[1] * s; + + hit->pathCost += filter->getCost(lastPos, curPos, prevRef, prevTile, prevPoly, curRef, tile, poly, nextRef, nextTile, nextPoly); + } + + if (!nextRef) + { + // No neighbour, we hit a wall. + + // Calculate hit normal. + const int a = segMax; + const int b = segMax+1 < nv ? segMax+1 : 0; + const float* va = &verts[a*3]; + const float* vb = &verts[b*3]; + const float dx = vb[0] - va[0]; + const float dz = vb[2] - va[2]; + hit->hitNormal[0] = dz; + hit->hitNormal[1] = 0; + hit->hitNormal[2] = -dx; + dtVnormalize(hit->hitNormal); + + hit->pathCount = n; + return status; + } + + // No hit, advance to neighbour polygon. + prevRef = curRef; + curRef = nextRef; + prevTile = tile; + tile = nextTile; + prevPoly = poly; + poly = nextPoly; + } + + hit->pathCount = n; + + return status; +} + +/// @par +/// +/// At least one result array must be provided. +/// +/// The order of the result set is from least to highest cost to reach the polygon. +/// +/// A common use case for this method is to perform Dijkstra searches. +/// Candidate polygons are found by searching the graph beginning at the start polygon. +/// +/// If a polygon is not found via the graph search, even if it intersects the +/// search circle, it will not be included in the result set. For example: +/// +/// polyA is the start polygon. +/// polyB shares an edge with polyA. (Is adjacent.) +/// polyC shares an edge with polyB, but not with polyA +/// Even if the search circle overlaps polyC, it will not be included in the +/// result set unless polyB is also in the set. +/// +/// The value of the center point is used as the start position for cost +/// calculations. It is not projected onto the surface of the mesh, so its +/// y-value will effect the costs. +/// +/// Intersection tests occur in 2D. All polygons and the search circle are +/// projected onto the xz-plane. So the y-value of the center point does not +/// effect intersection tests. +/// +/// If the result arrays are to small to hold the entire result set, they will be +/// filled to capacity. +/// +dtStatus dtNavMeshQuery::findPolysAroundCircle(dtPolyRef startRef, const float* centerPos, const float radius, + const dtQueryFilter* filter, + dtPolyRef* resultRef, dtPolyRef* resultParent, float* resultCost, + int* resultCount, const int maxResult) const +{ + dtAssert(m_nav); + dtAssert(m_nodePool); + dtAssert(m_openList); + + *resultCount = 0; + + // Validate input + if (!startRef || !m_nav->isValidPolyRef(startRef)) + return DT_FAILURE | DT_INVALID_PARAM; + + m_nodePool->clear(); + m_openList->clear(); + + dtNode* startNode = m_nodePool->getNode(startRef); + dtVcopy(startNode->pos, centerPos); + startNode->pidx = 0; + startNode->cost = 0; + startNode->total = 0; + startNode->id = startRef; + startNode->flags = DT_NODE_OPEN; + m_openList->push(startNode); + + dtStatus status = DT_SUCCESS; + + int n = 0; + + const float radiusSqr = dtSqr(radius); + + while (!m_openList->empty()) + { + dtNode* bestNode = m_openList->pop(); + bestNode->flags &= ~DT_NODE_OPEN; + bestNode->flags |= DT_NODE_CLOSED; + + // Get poly and tile. + // The API input has been cheked already, skip checking internal data. + const dtPolyRef bestRef = bestNode->id; + const dtMeshTile* bestTile = 0; + const dtPoly* bestPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(bestRef, &bestTile, &bestPoly); + + // Get parent poly and tile. + dtPolyRef parentRef = 0; + const dtMeshTile* parentTile = 0; + const dtPoly* parentPoly = 0; + if (bestNode->pidx) + parentRef = m_nodePool->getNodeAtIdx(bestNode->pidx)->id; + if (parentRef) + m_nav->getTileAndPolyByRefUnsafe(parentRef, &parentTile, &parentPoly); + + if (n < maxResult) + { + if (resultRef) + resultRef[n] = bestRef; + if (resultParent) + resultParent[n] = parentRef; + if (resultCost) + resultCost[n] = bestNode->total; + ++n; + } + else + { + status |= DT_BUFFER_TOO_SMALL; + } + + for (unsigned int i = bestPoly->firstLink; i != DT_NULL_LINK; i = bestTile->links[i].next) + { + const dtLink* link = &bestTile->links[i]; + dtPolyRef neighbourRef = link->ref; + // Skip invalid neighbours and do not follow back to parent. + if (!neighbourRef || neighbourRef == parentRef) + continue; + + // Expand to neighbour + const dtMeshTile* neighbourTile = 0; + const dtPoly* neighbourPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(neighbourRef, &neighbourTile, &neighbourPoly); + + // Do not advance if the polygon is excluded by the filter. + if (!filter->passFilter(neighbourRef, neighbourTile, neighbourPoly)) + continue; + + // Find edge and calc distance to the edge. + float va[3], vb[3]; + if (!getPortalPoints(bestRef, bestPoly, bestTile, neighbourRef, neighbourPoly, neighbourTile, va, vb)) + continue; + + // If the circle is not touching the next polygon, skip it. + float tseg; + float distSqr = dtDistancePtSegSqr2D(centerPos, va, vb, tseg); + if (distSqr > radiusSqr) + continue; + + dtNode* neighbourNode = m_nodePool->getNode(neighbourRef); + if (!neighbourNode) + { + status |= DT_OUT_OF_NODES; + continue; + } + + if (neighbourNode->flags & DT_NODE_CLOSED) + continue; + + // Cost + if (neighbourNode->flags == 0) + dtVlerp(neighbourNode->pos, va, vb, 0.5f); + + float cost = filter->getCost( + bestNode->pos, neighbourNode->pos, + parentRef, parentTile, parentPoly, + bestRef, bestTile, bestPoly, + neighbourRef, neighbourTile, neighbourPoly); + + const float total = bestNode->total + cost; + + // The node is already in open list and the new result is worse, skip. + if ((neighbourNode->flags & DT_NODE_OPEN) && total >= neighbourNode->total) + continue; + + neighbourNode->id = neighbourRef; + neighbourNode->pidx = m_nodePool->getNodeIdx(bestNode); + neighbourNode->total = total; + + if (neighbourNode->flags & DT_NODE_OPEN) + { + m_openList->modify(neighbourNode); + } + else + { + neighbourNode->flags = DT_NODE_OPEN; + m_openList->push(neighbourNode); + } + } + } + + *resultCount = n; + + return status; +} + +/// @par +/// +/// The order of the result set is from least to highest cost. +/// +/// At least one result array must be provided. +/// +/// A common use case for this method is to perform Dijkstra searches. +/// Candidate polygons are found by searching the graph beginning at the start +/// polygon. +/// +/// The same intersection test restrictions that apply to findPolysAroundCircle() +/// method apply to this method. +/// +/// The 3D centroid of the search polygon is used as the start position for cost +/// calculations. +/// +/// Intersection tests occur in 2D. All polygons are projected onto the +/// xz-plane. So the y-values of the vertices do not effect intersection tests. +/// +/// If the result arrays are is too small to hold the entire result set, they will +/// be filled to capacity. +/// +dtStatus dtNavMeshQuery::findPolysAroundShape(dtPolyRef startRef, const float* verts, const int nverts, + const dtQueryFilter* filter, + dtPolyRef* resultRef, dtPolyRef* resultParent, float* resultCost, + int* resultCount, const int maxResult) const +{ + dtAssert(m_nav); + dtAssert(m_nodePool); + dtAssert(m_openList); + + *resultCount = 0; + + // Validate input + if (!startRef || !m_nav->isValidPolyRef(startRef)) + return DT_FAILURE | DT_INVALID_PARAM; + + m_nodePool->clear(); + m_openList->clear(); + + float centerPos[3] = {0,0,0}; + for (int i = 0; i < nverts; ++i) + dtVadd(centerPos,centerPos,&verts[i*3]); + dtVscale(centerPos,centerPos,1.0f/nverts); + + dtNode* startNode = m_nodePool->getNode(startRef); + dtVcopy(startNode->pos, centerPos); + startNode->pidx = 0; + startNode->cost = 0; + startNode->total = 0; + startNode->id = startRef; + startNode->flags = DT_NODE_OPEN; + m_openList->push(startNode); + + dtStatus status = DT_SUCCESS; + + int n = 0; + + while (!m_openList->empty()) + { + dtNode* bestNode = m_openList->pop(); + bestNode->flags &= ~DT_NODE_OPEN; + bestNode->flags |= DT_NODE_CLOSED; + + // Get poly and tile. + // The API input has been cheked already, skip checking internal data. + const dtPolyRef bestRef = bestNode->id; + const dtMeshTile* bestTile = 0; + const dtPoly* bestPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(bestRef, &bestTile, &bestPoly); + + // Get parent poly and tile. + dtPolyRef parentRef = 0; + const dtMeshTile* parentTile = 0; + const dtPoly* parentPoly = 0; + if (bestNode->pidx) + parentRef = m_nodePool->getNodeAtIdx(bestNode->pidx)->id; + if (parentRef) + m_nav->getTileAndPolyByRefUnsafe(parentRef, &parentTile, &parentPoly); + + if (n < maxResult) + { + if (resultRef) + resultRef[n] = bestRef; + if (resultParent) + resultParent[n] = parentRef; + if (resultCost) + resultCost[n] = bestNode->total; + + ++n; + } + else + { + status |= DT_BUFFER_TOO_SMALL; + } + + for (unsigned int i = bestPoly->firstLink; i != DT_NULL_LINK; i = bestTile->links[i].next) + { + const dtLink* link = &bestTile->links[i]; + dtPolyRef neighbourRef = link->ref; + // Skip invalid neighbours and do not follow back to parent. + if (!neighbourRef || neighbourRef == parentRef) + continue; + + // Expand to neighbour + const dtMeshTile* neighbourTile = 0; + const dtPoly* neighbourPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(neighbourRef, &neighbourTile, &neighbourPoly); + + // Do not advance if the polygon is excluded by the filter. + if (!filter->passFilter(neighbourRef, neighbourTile, neighbourPoly)) + continue; + + // Find edge and calc distance to the edge. + float va[3], vb[3]; + if (!getPortalPoints(bestRef, bestPoly, bestTile, neighbourRef, neighbourPoly, neighbourTile, va, vb)) + continue; + + // If the poly is not touching the edge to the next polygon, skip the connection it. + float tmin, tmax; + int segMin, segMax; + if (!dtIntersectSegmentPoly2D(va, vb, verts, nverts, tmin, tmax, segMin, segMax)) + continue; + if (tmin > 1.0f || tmax < 0.0f) + continue; + + dtNode* neighbourNode = m_nodePool->getNode(neighbourRef); + if (!neighbourNode) + { + status |= DT_OUT_OF_NODES; + continue; + } + + if (neighbourNode->flags & DT_NODE_CLOSED) + continue; + + // Cost + if (neighbourNode->flags == 0) + dtVlerp(neighbourNode->pos, va, vb, 0.5f); + + float cost = filter->getCost( + bestNode->pos, neighbourNode->pos, + parentRef, parentTile, parentPoly, + bestRef, bestTile, bestPoly, + neighbourRef, neighbourTile, neighbourPoly); + + const float total = bestNode->total + cost; + + // The node is already in open list and the new result is worse, skip. + if ((neighbourNode->flags & DT_NODE_OPEN) && total >= neighbourNode->total) + continue; + + neighbourNode->id = neighbourRef; + neighbourNode->pidx = m_nodePool->getNodeIdx(bestNode); + neighbourNode->total = total; + + if (neighbourNode->flags & DT_NODE_OPEN) + { + m_openList->modify(neighbourNode); + } + else + { + neighbourNode->flags = DT_NODE_OPEN; + m_openList->push(neighbourNode); + } + } + } + + *resultCount = n; + + return status; +} + +dtStatus dtNavMeshQuery::getPathFromDijkstraSearch(dtPolyRef endRef, dtPolyRef* path, int* pathCount, int maxPath) const +{ + if (!m_nav->isValidPolyRef(endRef) || !path || !pathCount || maxPath < 0) + return DT_FAILURE | DT_INVALID_PARAM; + + *pathCount = 0; + + dtNode* endNode; + if (m_nodePool->findNodes(endRef, &endNode, 1) != 1 || + (endNode->flags & DT_NODE_CLOSED) == 0) + return DT_FAILURE | DT_INVALID_PARAM; + + return getPathToNode(endNode, path, pathCount, maxPath); +} + +/// @par +/// +/// This method is optimized for a small search radius and small number of result +/// polygons. +/// +/// Candidate polygons are found by searching the navigation graph beginning at +/// the start polygon. +/// +/// The same intersection test restrictions that apply to the findPolysAroundCircle +/// mehtod applies to this method. +/// +/// The value of the center point is used as the start point for cost calculations. +/// It is not projected onto the surface of the mesh, so its y-value will effect +/// the costs. +/// +/// Intersection tests occur in 2D. All polygons and the search circle are +/// projected onto the xz-plane. So the y-value of the center point does not +/// effect intersection tests. +/// +/// If the result arrays are is too small to hold the entire result set, they will +/// be filled to capacity. +/// +dtStatus dtNavMeshQuery::findLocalNeighbourhood(dtPolyRef startRef, const float* centerPos, const float radius, + const dtQueryFilter* filter, + dtPolyRef* resultRef, dtPolyRef* resultParent, + int* resultCount, const int maxResult) const +{ + dtAssert(m_nav); + dtAssert(m_tinyNodePool); + + *resultCount = 0; + + // Validate input + if (!startRef || !m_nav->isValidPolyRef(startRef)) + return DT_FAILURE | DT_INVALID_PARAM; + + static const int MAX_STACK = 48; + dtNode* stack[MAX_STACK]; + int nstack = 0; + + m_tinyNodePool->clear(); + + dtNode* startNode = m_tinyNodePool->getNode(startRef); + startNode->pidx = 0; + startNode->id = startRef; + startNode->flags = DT_NODE_CLOSED; + stack[nstack++] = startNode; + + const float radiusSqr = dtSqr(radius); + + float pa[DT_VERTS_PER_POLYGON*3]; + float pb[DT_VERTS_PER_POLYGON*3]; + + dtStatus status = DT_SUCCESS; + + int n = 0; + if (n < maxResult) + { + resultRef[n] = startNode->id; + if (resultParent) + resultParent[n] = 0; + ++n; + } + else + { + status |= DT_BUFFER_TOO_SMALL; + } + + while (nstack) + { + // Pop front. + dtNode* curNode = stack[0]; + for (int i = 0; i < nstack-1; ++i) + stack[i] = stack[i+1]; + nstack--; + + // Get poly and tile. + // The API input has been cheked already, skip checking internal data. + const dtPolyRef curRef = curNode->id; + const dtMeshTile* curTile = 0; + const dtPoly* curPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(curRef, &curTile, &curPoly); + + for (unsigned int i = curPoly->firstLink; i != DT_NULL_LINK; i = curTile->links[i].next) + { + const dtLink* link = &curTile->links[i]; + dtPolyRef neighbourRef = link->ref; + // Skip invalid neighbours. + if (!neighbourRef) + continue; + + // Skip if cannot alloca more nodes. + dtNode* neighbourNode = m_tinyNodePool->getNode(neighbourRef); + if (!neighbourNode) + continue; + // Skip visited. + if (neighbourNode->flags & DT_NODE_CLOSED) + continue; + + // Expand to neighbour + const dtMeshTile* neighbourTile = 0; + const dtPoly* neighbourPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(neighbourRef, &neighbourTile, &neighbourPoly); + + // Skip off-mesh connections. + if (neighbourPoly->getType() == DT_POLYTYPE_OFFMESH_CONNECTION) + continue; + + // Do not advance if the polygon is excluded by the filter. + if (!filter->passFilter(neighbourRef, neighbourTile, neighbourPoly)) + continue; + + // Find edge and calc distance to the edge. + float va[3], vb[3]; + if (!getPortalPoints(curRef, curPoly, curTile, neighbourRef, neighbourPoly, neighbourTile, va, vb)) + continue; + + // If the circle is not touching the next polygon, skip it. + float tseg; + float distSqr = dtDistancePtSegSqr2D(centerPos, va, vb, tseg); + if (distSqr > radiusSqr) + continue; + + // Mark node visited, this is done before the overlap test so that + // we will not visit the poly again if the test fails. + neighbourNode->flags |= DT_NODE_CLOSED; + neighbourNode->pidx = m_tinyNodePool->getNodeIdx(curNode); + + // Check that the polygon does not collide with existing polygons. + + // Collect vertices of the neighbour poly. + const int npa = neighbourPoly->vertCount; + for (int k = 0; k < npa; ++k) + dtVcopy(&pa[k*3], &neighbourTile->verts[neighbourPoly->verts[k]*3]); + + bool overlap = false; + for (int j = 0; j < n; ++j) + { + dtPolyRef pastRef = resultRef[j]; + + // Connected polys do not overlap. + bool connected = false; + for (unsigned int k = curPoly->firstLink; k != DT_NULL_LINK; k = curTile->links[k].next) + { + if (curTile->links[k].ref == pastRef) + { + connected = true; + break; + } + } + if (connected) + continue; + + // Potentially overlapping. + const dtMeshTile* pastTile = 0; + const dtPoly* pastPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(pastRef, &pastTile, &pastPoly); + + // Get vertices and test overlap + const int npb = pastPoly->vertCount; + for (int k = 0; k < npb; ++k) + dtVcopy(&pb[k*3], &pastTile->verts[pastPoly->verts[k]*3]); + + if (dtOverlapPolyPoly2D(pa,npa, pb,npb)) + { + overlap = true; + break; + } + } + if (overlap) + continue; + + // This poly is fine, store and advance to the poly. + if (n < maxResult) + { + resultRef[n] = neighbourRef; + if (resultParent) + resultParent[n] = curRef; + ++n; + } + else + { + status |= DT_BUFFER_TOO_SMALL; + } + + if (nstack < MAX_STACK) + { + stack[nstack++] = neighbourNode; + } + } + } + + *resultCount = n; + + return status; +} + + +struct dtSegInterval +{ + dtPolyRef ref; + short tmin, tmax; +}; + +static void insertInterval(dtSegInterval* ints, int& nints, const int maxInts, + const short tmin, const short tmax, const dtPolyRef ref) +{ + if (nints+1 > maxInts) return; + // Find insertion point. + int idx = 0; + while (idx < nints) + { + if (tmax <= ints[idx].tmin) + break; + idx++; + } + // Move current results. + if (nints-idx) + memmove(ints+idx+1, ints+idx, sizeof(dtSegInterval)*(nints-idx)); + // Store + ints[idx].ref = ref; + ints[idx].tmin = tmin; + ints[idx].tmax = tmax; + nints++; +} + +/// @par +/// +/// If the @p segmentRefs parameter is provided, then all polygon segments will be returned. +/// Otherwise only the wall segments are returned. +/// +/// A segment that is normally a portal will be included in the result set as a +/// wall if the @p filter results in the neighbor polygon becoomming impassable. +/// +/// The @p segmentVerts and @p segmentRefs buffers should normally be sized for the +/// maximum segments per polygon of the source navigation mesh. +/// +dtStatus dtNavMeshQuery::getPolyWallSegments(dtPolyRef ref, const dtQueryFilter* filter, + float* segmentVerts, dtPolyRef* segmentRefs, int* segmentCount, + const int maxSegments) const +{ + dtAssert(m_nav); + + *segmentCount = 0; + + const dtMeshTile* tile = 0; + const dtPoly* poly = 0; + if (dtStatusFailed(m_nav->getTileAndPolyByRef(ref, &tile, &poly))) + return DT_FAILURE | DT_INVALID_PARAM; + + int n = 0; + static const int MAX_INTERVAL = 16; + dtSegInterval ints[MAX_INTERVAL]; + int nints; + + const bool storePortals = segmentRefs != 0; + + dtStatus status = DT_SUCCESS; + + for (int i = 0, j = (int)poly->vertCount-1; i < (int)poly->vertCount; j = i++) + { + // Skip non-solid edges. + nints = 0; + if (poly->neis[j] & DT_EXT_LINK) + { + // Tile border. + for (unsigned int k = poly->firstLink; k != DT_NULL_LINK; k = tile->links[k].next) + { + const dtLink* link = &tile->links[k]; + if (link->edge == j) + { + if (link->ref != 0) + { + const dtMeshTile* neiTile = 0; + const dtPoly* neiPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(link->ref, &neiTile, &neiPoly); + if (filter->passFilter(link->ref, neiTile, neiPoly)) + { + insertInterval(ints, nints, MAX_INTERVAL, link->bmin, link->bmax, link->ref); + } + } + } + } + } + else + { + // Internal edge + dtPolyRef neiRef = 0; + if (poly->neis[j]) + { + const unsigned int idx = (unsigned int)(poly->neis[j]-1); + neiRef = m_nav->getPolyRefBase(tile) | idx; + if (!filter->passFilter(neiRef, tile, &tile->polys[idx])) + neiRef = 0; + } + + // If the edge leads to another polygon and portals are not stored, skip. + if (neiRef != 0 && !storePortals) + continue; + + if (n < maxSegments) + { + const float* vj = &tile->verts[poly->verts[j]*3]; + const float* vi = &tile->verts[poly->verts[i]*3]; + float* seg = &segmentVerts[n*6]; + dtVcopy(seg+0, vj); + dtVcopy(seg+3, vi); + if (segmentRefs) + segmentRefs[n] = neiRef; + n++; + } + else + { + status |= DT_BUFFER_TOO_SMALL; + } + + continue; + } + + // Add sentinels + insertInterval(ints, nints, MAX_INTERVAL, -1, 0, 0); + insertInterval(ints, nints, MAX_INTERVAL, 255, 256, 0); + + // Store segments. + const float* vj = &tile->verts[poly->verts[j]*3]; + const float* vi = &tile->verts[poly->verts[i]*3]; + for (int k = 1; k < nints; ++k) + { + // Portal segment. + if (storePortals && ints[k].ref) + { + const float tmin = ints[k].tmin/255.0f; + const float tmax = ints[k].tmax/255.0f; + if (n < maxSegments) + { + float* seg = &segmentVerts[n*6]; + dtVlerp(seg+0, vj,vi, tmin); + dtVlerp(seg+3, vj,vi, tmax); + if (segmentRefs) + segmentRefs[n] = ints[k].ref; + n++; + } + else + { + status |= DT_BUFFER_TOO_SMALL; + } + } + + // Wall segment. + const int imin = ints[k-1].tmax; + const int imax = ints[k].tmin; + if (imin != imax) + { + const float tmin = imin/255.0f; + const float tmax = imax/255.0f; + if (n < maxSegments) + { + float* seg = &segmentVerts[n*6]; + dtVlerp(seg+0, vj,vi, tmin); + dtVlerp(seg+3, vj,vi, tmax); + if (segmentRefs) + segmentRefs[n] = 0; + n++; + } + else + { + status |= DT_BUFFER_TOO_SMALL; + } + } + } + } + + *segmentCount = n; + + return status; +} + +/// @par +/// +/// @p hitPos is not adjusted using the height detail data. +/// +/// @p hitDist will equal the search radius if there is no wall within the +/// radius. In this case the values of @p hitPos and @p hitNormal are +/// undefined. +/// +/// The normal will become unpredicable if @p hitDist is a very small number. +/// +dtStatus dtNavMeshQuery::findDistanceToWall(dtPolyRef startRef, const float* centerPos, const float maxRadius, + const dtQueryFilter* filter, + float* hitDist, float* hitPos, float* hitNormal) const +{ + dtAssert(m_nav); + dtAssert(m_nodePool); + dtAssert(m_openList); + + // Validate input + if (!startRef || !m_nav->isValidPolyRef(startRef)) + return DT_FAILURE | DT_INVALID_PARAM; + + m_nodePool->clear(); + m_openList->clear(); + + dtNode* startNode = m_nodePool->getNode(startRef); + dtVcopy(startNode->pos, centerPos); + startNode->pidx = 0; + startNode->cost = 0; + startNode->total = 0; + startNode->id = startRef; + startNode->flags = DT_NODE_OPEN; + m_openList->push(startNode); + + float radiusSqr = dtSqr(maxRadius); + + dtStatus status = DT_SUCCESS; + + while (!m_openList->empty()) + { + dtNode* bestNode = m_openList->pop(); + bestNode->flags &= ~DT_NODE_OPEN; + bestNode->flags |= DT_NODE_CLOSED; + + // Get poly and tile. + // The API input has been cheked already, skip checking internal data. + const dtPolyRef bestRef = bestNode->id; + const dtMeshTile* bestTile = 0; + const dtPoly* bestPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(bestRef, &bestTile, &bestPoly); + + // Get parent poly and tile. + dtPolyRef parentRef = 0; + const dtMeshTile* parentTile = 0; + const dtPoly* parentPoly = 0; + if (bestNode->pidx) + parentRef = m_nodePool->getNodeAtIdx(bestNode->pidx)->id; + if (parentRef) + m_nav->getTileAndPolyByRefUnsafe(parentRef, &parentTile, &parentPoly); + + // Hit test walls. + for (int i = 0, j = (int)bestPoly->vertCount-1; i < (int)bestPoly->vertCount; j = i++) + { + // Skip non-solid edges. + if (bestPoly->neis[j] & DT_EXT_LINK) + { + // Tile border. + bool solid = true; + for (unsigned int k = bestPoly->firstLink; k != DT_NULL_LINK; k = bestTile->links[k].next) + { + const dtLink* link = &bestTile->links[k]; + if (link->edge == j) + { + if (link->ref != 0) + { + const dtMeshTile* neiTile = 0; + const dtPoly* neiPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(link->ref, &neiTile, &neiPoly); + if (filter->passFilter(link->ref, neiTile, neiPoly)) + solid = false; + } + break; + } + } + if (!solid) continue; + } + else if (bestPoly->neis[j]) + { + // Internal edge + const unsigned int idx = (unsigned int)(bestPoly->neis[j]-1); + const dtPolyRef ref = m_nav->getPolyRefBase(bestTile) | idx; + if (filter->passFilter(ref, bestTile, &bestTile->polys[idx])) + continue; + } + + // Calc distance to the edge. + const float* vj = &bestTile->verts[bestPoly->verts[j]*3]; + const float* vi = &bestTile->verts[bestPoly->verts[i]*3]; + float tseg; + float distSqr = dtDistancePtSegSqr2D(centerPos, vj, vi, tseg); + + // Edge is too far, skip. + if (distSqr > radiusSqr) + continue; + + // Hit wall, update radius. + radiusSqr = distSqr; + // Calculate hit pos. + hitPos[0] = vj[0] + (vi[0] - vj[0])*tseg; + hitPos[1] = vj[1] + (vi[1] - vj[1])*tseg; + hitPos[2] = vj[2] + (vi[2] - vj[2])*tseg; + } + + for (unsigned int i = bestPoly->firstLink; i != DT_NULL_LINK; i = bestTile->links[i].next) + { + const dtLink* link = &bestTile->links[i]; + dtPolyRef neighbourRef = link->ref; + // Skip invalid neighbours and do not follow back to parent. + if (!neighbourRef || neighbourRef == parentRef) + continue; + + // Expand to neighbour. + const dtMeshTile* neighbourTile = 0; + const dtPoly* neighbourPoly = 0; + m_nav->getTileAndPolyByRefUnsafe(neighbourRef, &neighbourTile, &neighbourPoly); + + // Skip off-mesh connections. + if (neighbourPoly->getType() == DT_POLYTYPE_OFFMESH_CONNECTION) + continue; + + // Calc distance to the edge. + const float* va = &bestTile->verts[bestPoly->verts[link->edge]*3]; + const float* vb = &bestTile->verts[bestPoly->verts[(link->edge+1) % bestPoly->vertCount]*3]; + float tseg; + float distSqr = dtDistancePtSegSqr2D(centerPos, va, vb, tseg); + + // If the circle is not touching the next polygon, skip it. + if (distSqr > radiusSqr) + continue; + + if (!filter->passFilter(neighbourRef, neighbourTile, neighbourPoly)) + continue; + + dtNode* neighbourNode = m_nodePool->getNode(neighbourRef); + if (!neighbourNode) + { + status |= DT_OUT_OF_NODES; + continue; + } + + if (neighbourNode->flags & DT_NODE_CLOSED) + continue; + + // Cost + if (neighbourNode->flags == 0) + { + getEdgeMidPoint(bestRef, bestPoly, bestTile, + neighbourRef, neighbourPoly, neighbourTile, neighbourNode->pos); + } + + const float total = bestNode->total + dtVdist(bestNode->pos, neighbourNode->pos); + + // The node is already in open list and the new result is worse, skip. + if ((neighbourNode->flags & DT_NODE_OPEN) && total >= neighbourNode->total) + continue; + + neighbourNode->id = neighbourRef; + neighbourNode->flags = (neighbourNode->flags & ~DT_NODE_CLOSED); + neighbourNode->pidx = m_nodePool->getNodeIdx(bestNode); + neighbourNode->total = total; + + if (neighbourNode->flags & DT_NODE_OPEN) + { + m_openList->modify(neighbourNode); + } + else + { + neighbourNode->flags |= DT_NODE_OPEN; + m_openList->push(neighbourNode); + } + } + } + + // Calc hit normal. + dtVsub(hitNormal, centerPos, hitPos); + dtVnormalize(hitNormal); + + *hitDist = dtMathSqrtf(radiusSqr); + + return status; +} + +bool dtNavMeshQuery::isValidPolyRef(dtPolyRef ref, const dtQueryFilter* filter) const +{ + const dtMeshTile* tile = 0; + const dtPoly* poly = 0; + dtStatus status = m_nav->getTileAndPolyByRef(ref, &tile, &poly); + // If cannot get polygon, assume it does not exists and boundary is invalid. + if (dtStatusFailed(status)) + return false; + // If cannot pass filter, assume flags has changed and boundary is invalid. + if (!filter->passFilter(ref, tile, poly)) + return false; + return true; +} + +/// @par +/// +/// The closed list is the list of polygons that were fully evaluated during +/// the last navigation graph search. (A* or Dijkstra) +/// +bool dtNavMeshQuery::isInClosedList(dtPolyRef ref) const +{ + if (!m_nodePool) return false; + + dtNode* nodes[DT_MAX_STATES_PER_NODE]; + int n= m_nodePool->findNodes(ref, nodes, DT_MAX_STATES_PER_NODE); + + for (int i=0; iflags & DT_NODE_CLOSED) + return true; + } + + return false; +} diff --git a/libs/recast/detour/src/DetourNode.cpp b/libs/recast/detour/src/DetourNode.cpp new file mode 100644 index 000000000..48abbba6b --- /dev/null +++ b/libs/recast/detour/src/DetourNode.cpp @@ -0,0 +1,200 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#include "DetourNode.h" +#include "DetourAlloc.h" +#include "DetourAssert.h" +#include "DetourCommon.h" +#include + +#ifdef DT_POLYREF64 +// From Thomas Wang, https://gist.github.com/badboy/6267743 +inline unsigned int dtHashRef(dtPolyRef a) +{ + a = (~a) + (a << 18); // a = (a << 18) - a - 1; + a = a ^ (a >> 31); + a = a * 21; // a = (a + (a << 2)) + (a << 4); + a = a ^ (a >> 11); + a = a + (a << 6); + a = a ^ (a >> 22); + return (unsigned int)a; +} +#else +inline unsigned int dtHashRef(dtPolyRef a) +{ + a += ~(a<<15); + a ^= (a>>10); + a += (a<<3); + a ^= (a>>6); + a += ~(a<<11); + a ^= (a>>16); + return (unsigned int)a; +} +#endif + +////////////////////////////////////////////////////////////////////////////////////////// +dtNodePool::dtNodePool(int maxNodes, int hashSize) : + m_nodes(0), + m_first(0), + m_next(0), + m_maxNodes(maxNodes), + m_hashSize(hashSize), + m_nodeCount(0) +{ + dtAssert(dtNextPow2(m_hashSize) == (unsigned int)m_hashSize); + // pidx is special as 0 means "none" and 1 is the first node. For that reason + // we have 1 fewer nodes available than the number of values it can contain. + dtAssert(m_maxNodes > 0 && m_maxNodes <= DT_NULL_IDX && m_maxNodes <= (1 << DT_NODE_PARENT_BITS) - 1); + + m_nodes = (dtNode*)dtAlloc(sizeof(dtNode)*m_maxNodes, DT_ALLOC_PERM); + m_next = (dtNodeIndex*)dtAlloc(sizeof(dtNodeIndex)*m_maxNodes, DT_ALLOC_PERM); + m_first = (dtNodeIndex*)dtAlloc(sizeof(dtNodeIndex)*hashSize, DT_ALLOC_PERM); + + dtAssert(m_nodes); + dtAssert(m_next); + dtAssert(m_first); + + memset(m_first, 0xff, sizeof(dtNodeIndex)*m_hashSize); + memset(m_next, 0xff, sizeof(dtNodeIndex)*m_maxNodes); +} + +dtNodePool::~dtNodePool() +{ + dtFree(m_nodes); + dtFree(m_next); + dtFree(m_first); +} + +void dtNodePool::clear() +{ + memset(m_first, 0xff, sizeof(dtNodeIndex)*m_hashSize); + m_nodeCount = 0; +} + +unsigned int dtNodePool::findNodes(dtPolyRef id, dtNode** nodes, const int maxNodes) +{ + int n = 0; + unsigned int bucket = dtHashRef(id) & (m_hashSize-1); + dtNodeIndex i = m_first[bucket]; + while (i != DT_NULL_IDX) + { + if (m_nodes[i].id == id) + { + if (n >= maxNodes) + return n; + nodes[n++] = &m_nodes[i]; + } + i = m_next[i]; + } + + return n; +} + +dtNode* dtNodePool::findNode(dtPolyRef id, unsigned char state) +{ + unsigned int bucket = dtHashRef(id) & (m_hashSize-1); + dtNodeIndex i = m_first[bucket]; + while (i != DT_NULL_IDX) + { + if (m_nodes[i].id == id && m_nodes[i].state == state) + return &m_nodes[i]; + i = m_next[i]; + } + return 0; +} + +dtNode* dtNodePool::getNode(dtPolyRef id, unsigned char state) +{ + unsigned int bucket = dtHashRef(id) & (m_hashSize-1); + dtNodeIndex i = m_first[bucket]; + dtNode* node = 0; + while (i != DT_NULL_IDX) + { + if (m_nodes[i].id == id && m_nodes[i].state == state) + return &m_nodes[i]; + i = m_next[i]; + } + + if (m_nodeCount >= m_maxNodes) + return 0; + + i = (dtNodeIndex)m_nodeCount; + m_nodeCount++; + + // Init node + node = &m_nodes[i]; + node->pidx = 0; + node->cost = 0; + node->total = 0; + node->id = id; + node->state = state; + node->flags = 0; + + m_next[i] = m_first[bucket]; + m_first[bucket] = i; + + return node; +} + + +////////////////////////////////////////////////////////////////////////////////////////// +dtNodeQueue::dtNodeQueue(int n) : + m_heap(0), + m_capacity(n), + m_size(0) +{ + dtAssert(m_capacity > 0); + + m_heap = (dtNode**)dtAlloc(sizeof(dtNode*)*(m_capacity+1), DT_ALLOC_PERM); + dtAssert(m_heap); +} + +dtNodeQueue::~dtNodeQueue() +{ + dtFree(m_heap); +} + +void dtNodeQueue::bubbleUp(int i, dtNode* node) +{ + int parent = (i-1)/2; + // note: (index > 0) means there is a parent + while ((i > 0) && (m_heap[parent]->total > node->total)) + { + m_heap[i] = m_heap[parent]; + i = parent; + parent = (i-1)/2; + } + m_heap[i] = node; +} + +void dtNodeQueue::trickleDown(int i, dtNode* node) +{ + int child = (i*2)+1; + while (child < m_size) + { + if (((child+1) < m_size) && + (m_heap[child]->total > m_heap[child+1]->total)) + { + child++; + } + m_heap[i] = m_heap[child]; + i = child; + child = (i*2)+1; + } + bubbleUp(i, node); +} diff --git a/libs/recast/detour_tile_cache/include/DetourTileCache.h b/libs/recast/detour_tile_cache/include/DetourTileCache.h new file mode 100644 index 000000000..c45910cd5 --- /dev/null +++ b/libs/recast/detour_tile_cache/include/DetourTileCache.h @@ -0,0 +1,247 @@ +#ifndef DETOURTILECACHE_H +#define DETOURTILECACHE_H + +#include "DetourStatus.h" + + + +typedef unsigned int dtObstacleRef; + +typedef unsigned int dtCompressedTileRef; + +/// Flags for addTile +enum dtCompressedTileFlags +{ + DT_COMPRESSEDTILE_FREE_DATA = 0x01, ///< Navmesh owns the tile memory and should free it. +}; + +struct dtCompressedTile +{ + unsigned int salt; ///< Counter describing modifications to the tile. + struct dtTileCacheLayerHeader* header; + unsigned char* compressed; + int compressedSize; + unsigned char* data; + int dataSize; + unsigned int flags; + dtCompressedTile* next; +}; + +enum ObstacleState +{ + DT_OBSTACLE_EMPTY, + DT_OBSTACLE_PROCESSING, + DT_OBSTACLE_PROCESSED, + DT_OBSTACLE_REMOVING, +}; + +enum ObstacleType +{ + DT_OBSTACLE_CYLINDER, + DT_OBSTACLE_BOX, +}; + +struct dtObstacleCylinder +{ + float pos[ 3 ]; + float radius; + float height; +}; + +struct dtObstacleBox +{ + float bmin[ 3 ]; + float bmax[ 3 ]; +}; + +static const int DT_MAX_TOUCHED_TILES = 8; +struct dtTileCacheObstacle +{ + union + { + dtObstacleCylinder cylinder; + dtObstacleBox box; + }; + + dtCompressedTileRef touched[DT_MAX_TOUCHED_TILES]; + dtCompressedTileRef pending[DT_MAX_TOUCHED_TILES]; + unsigned short salt; + unsigned char type; + unsigned char state; + unsigned char ntouched; + unsigned char npending; + dtTileCacheObstacle* next; +}; + +struct dtTileCacheParams +{ + float orig[3]; + float cs, ch; + int width, height; + float walkableHeight; + float walkableRadius; + float walkableClimb; + float maxSimplificationError; + int maxTiles; + int maxObstacles; +}; + +struct dtTileCacheMeshProcess +{ + virtual ~dtTileCacheMeshProcess() { } + + virtual void process(struct dtNavMeshCreateParams* params, + unsigned char* polyAreas, unsigned short* polyFlags) = 0; +}; + + +class dtTileCache +{ +public: + dtTileCache(); + ~dtTileCache(); + + struct dtTileCacheAlloc* getAlloc() { return m_talloc; } + struct dtTileCacheCompressor* getCompressor() { return m_tcomp; } + const dtTileCacheParams* getParams() const { return &m_params; } + + inline int getTileCount() const { return m_params.maxTiles; } + inline const dtCompressedTile* getTile(const int i) const { return &m_tiles[i]; } + + inline int getObstacleCount() const { return m_params.maxObstacles; } + inline const dtTileCacheObstacle* getObstacle(const int i) const { return &m_obstacles[i]; } + + const dtTileCacheObstacle* getObstacleByRef(dtObstacleRef ref); + + dtObstacleRef getObstacleRef(const dtTileCacheObstacle* obmin) const; + + dtStatus init(const dtTileCacheParams* params, + struct dtTileCacheAlloc* talloc, + struct dtTileCacheCompressor* tcomp, + struct dtTileCacheMeshProcess* tmproc); + + int getTilesAt(const int tx, const int ty, dtCompressedTileRef* tiles, const int maxTiles) const ; + + dtCompressedTile* getTileAt(const int tx, const int ty, const int tlayer); + dtCompressedTileRef getTileRef(const dtCompressedTile* tile) const; + const dtCompressedTile* getTileByRef(dtCompressedTileRef ref) const; + + dtStatus addTile(unsigned char* data, const int dataSize, unsigned char flags, dtCompressedTileRef* result); + + dtStatus removeTile(dtCompressedTileRef ref, unsigned char** data, int* dataSize); + + dtStatus addObstacle(const float* pos, const float radius, const float height, dtObstacleRef* result); + dtStatus addBoxObstacle(const float* bmin, const float* bmax, dtObstacleRef* result); + + dtStatus removeObstacle(const dtObstacleRef ref); + + dtStatus queryTiles(const float* bmin, const float* bmax, + dtCompressedTileRef* results, int* resultCount, const int maxResults) const; + + /// Updates the tile cache by rebuilding tiles touched by unfinished obstacle requests. + /// @param[in] dt The time step size. Currently not used. + /// @param[in] navmesh The mesh to affect when rebuilding tiles. + /// @param[out] upToDate Whether the tile cache is fully up to date with obstacle requests and tile rebuilds. + /// If the tile cache is up to date another (immediate) call to update will have no effect; + /// otherwise another call will continue processing obstacle requests and tile rebuilds. + dtStatus update(const float dt, class dtNavMesh* navmesh, bool* upToDate = 0); + + dtStatus buildNavMeshTilesAt(const int tx, const int ty, class dtNavMesh* navmesh); + + dtStatus buildNavMeshTile(const dtCompressedTileRef ref, class dtNavMesh* navmesh); + + void calcTightTileBounds(const struct dtTileCacheLayerHeader* header, float* bmin, float* bmax) const; + + void getObstacleBounds(const struct dtTileCacheObstacle* ob, float* bmin, float* bmax) const; + + + /// Encodes a tile id. + inline dtCompressedTileRef encodeTileId(unsigned int salt, unsigned int it) const + { + return ((dtCompressedTileRef)salt << m_tileBits) | (dtCompressedTileRef)it; + } + + /// Decodes a tile salt. + inline unsigned int decodeTileIdSalt(dtCompressedTileRef ref) const + { + const dtCompressedTileRef saltMask = ((dtCompressedTileRef)1<> m_tileBits) & saltMask); + } + + /// Decodes a tile id. + inline unsigned int decodeTileIdTile(dtCompressedTileRef ref) const + { + const dtCompressedTileRef tileMask = ((dtCompressedTileRef)1<> 16) & saltMask); + } + + /// Decodes an obstacle id. + inline unsigned int decodeObstacleIdObstacle(dtObstacleRef ref) const + { + const dtObstacleRef tileMask = ((dtObstacleRef)1<<16)-1; + return (unsigned int)(ref & tileMask); + } + + +private: + // Explicitly disabled copy constructor and copy assignment operator. + dtTileCache(const dtTileCache&); + dtTileCache& operator=(const dtTileCache&); + + enum ObstacleRequestAction + { + REQUEST_ADD, + REQUEST_REMOVE, + }; + + struct ObstacleRequest + { + int action; + dtObstacleRef ref; + }; + + int m_tileLutSize; ///< Tile hash lookup size (must be pot). + int m_tileLutMask; ///< Tile hash lookup mask. + + dtCompressedTile** m_posLookup; ///< Tile hash lookup. + dtCompressedTile* m_nextFreeTile; ///< Freelist of tiles. + dtCompressedTile* m_tiles; ///< List of tiles. + + unsigned int m_saltBits; ///< Number of salt bits in the tile ID. + unsigned int m_tileBits; ///< Number of tile bits in the tile ID. + + dtTileCacheParams m_params; + + dtTileCacheAlloc* m_talloc; + dtTileCacheCompressor* m_tcomp; + dtTileCacheMeshProcess* m_tmproc; + + dtTileCacheObstacle* m_obstacles; + dtTileCacheObstacle* m_nextFreeObstacle; + + static const int MAX_REQUESTS = 64; + ObstacleRequest m_reqs[MAX_REQUESTS]; + int m_nreqs; + + static const int MAX_UPDATE = 64; + dtCompressedTileRef m_update[MAX_UPDATE]; + int m_nupdate; +}; + +dtTileCache* dtAllocTileCache(); +void dtFreeTileCache(dtTileCache* tc); + +#endif diff --git a/libs/recast/detour_tile_cache/include/DetourTileCacheBuilder.h b/libs/recast/detour_tile_cache/include/DetourTileCacheBuilder.h new file mode 100644 index 000000000..d1ef80e1d --- /dev/null +++ b/libs/recast/detour_tile_cache/include/DetourTileCacheBuilder.h @@ -0,0 +1,153 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#ifndef DETOURTILECACHEBUILDER_H +#define DETOURTILECACHEBUILDER_H + +#include "DetourAlloc.h" +#include "DetourStatus.h" + +static const int DT_TILECACHE_MAGIC = 'D'<<24 | 'T'<<16 | 'L'<<8 | 'R'; ///< 'DTLR'; +static const int DT_TILECACHE_VERSION = 1; + +static const unsigned char DT_TILECACHE_NULL_AREA = 0; +static const unsigned char DT_TILECACHE_WALKABLE_AREA = 63; +static const unsigned short DT_TILECACHE_NULL_IDX = 0xffff; + +struct dtTileCacheLayerHeader +{ + int magic; ///< Data magic + int version; ///< Data version + int tx,ty,tlayer; + float bmin[3], bmax[3]; + unsigned short hmin, hmax; ///< Height min/max range + unsigned char width, height; ///< Dimension of the layer. + unsigned char minx, maxx, miny, maxy; ///< Usable sub-region. +}; + +struct dtTileCacheLayer +{ + dtTileCacheLayerHeader* header; + unsigned char regCount; ///< Region count. + unsigned char* heights; + unsigned char* areas; + unsigned char* cons; + unsigned char* regs; +}; + +struct dtTileCacheContour +{ + int nverts; + unsigned char* verts; + unsigned char reg; + unsigned char area; +}; + +struct dtTileCacheContourSet +{ + int nconts; + dtTileCacheContour* conts; +}; + +struct dtTileCachePolyMesh +{ + int nvp; + int nverts; ///< Number of vertices. + int npolys; ///< Number of polygons. + unsigned short* verts; ///< Vertices of the mesh, 3 elements per vertex. + unsigned short* polys; ///< Polygons of the mesh, nvp*2 elements per polygon. + unsigned short* flags; ///< Per polygon flags. + unsigned char* areas; ///< Area ID of polygons. +}; + + +struct dtTileCacheAlloc +{ + virtual ~dtTileCacheAlloc() {} + + virtual void reset() {} + + virtual void* alloc(const size_t size) + { + return dtAlloc(size, DT_ALLOC_TEMP); + } + + virtual void free(void* ptr) + { + dtFree(ptr); + } +}; + +struct dtTileCacheCompressor +{ + virtual ~dtTileCacheCompressor() { } + + virtual int maxCompressedSize(const int bufferSize) = 0; + virtual dtStatus compress(const unsigned char* buffer, const int bufferSize, + unsigned char* compressed, const int maxCompressedSize, int* compressedSize) = 0; + virtual dtStatus decompress(const unsigned char* compressed, const int compressedSize, + unsigned char* buffer, const int maxBufferSize, int* bufferSize) = 0; +}; + + +dtStatus dtBuildTileCacheLayer(dtTileCacheCompressor* comp, + dtTileCacheLayerHeader* header, + const unsigned char* heights, + const unsigned char* areas, + const unsigned char* cons, + unsigned char** outData, int* outDataSize); + +void dtFreeTileCacheLayer(dtTileCacheAlloc* alloc, dtTileCacheLayer* layer); + +dtStatus dtDecompressTileCacheLayer(dtTileCacheAlloc* alloc, dtTileCacheCompressor* comp, + unsigned char* compressed, const int compressedSize, + dtTileCacheLayer** layerOut); + +dtTileCacheContourSet* dtAllocTileCacheContourSet(dtTileCacheAlloc* alloc); +void dtFreeTileCacheContourSet(dtTileCacheAlloc* alloc, dtTileCacheContourSet* cset); + +dtTileCachePolyMesh* dtAllocTileCachePolyMesh(dtTileCacheAlloc* alloc); +void dtFreeTileCachePolyMesh(dtTileCacheAlloc* alloc, dtTileCachePolyMesh* lmesh); + +dtStatus dtMarkCylinderArea(dtTileCacheLayer& layer, const float* orig, const float cs, const float ch, + const float* pos, const float radius, const float height, const unsigned char areaId); + +dtStatus dtMarkBoxArea(dtTileCacheLayer& layer, const float* orig, const float cs, const float ch, + const float* bmin, const float* bmax, const unsigned char areaId); + +dtStatus dtBuildTileCacheRegions(dtTileCacheAlloc* alloc, + dtTileCacheLayer& layer, + const int walkableClimb); + +dtStatus dtBuildTileCacheContours(dtTileCacheAlloc* alloc, + dtTileCacheLayer& layer, + const int walkableClimb, const float maxError, + dtTileCacheContourSet& lcset); + +dtStatus dtBuildTileCachePolyMesh(dtTileCacheAlloc* alloc, + dtTileCacheContourSet& lcset, + dtTileCachePolyMesh& mesh); + +/// Swaps the endianess of the compressed tile data's header (#dtTileCacheLayerHeader). +/// Tile layer data does not need endian swapping as it consits only of bytes. +/// @param[in,out] data The tile data array. +/// @param[in] dataSize The size of the data array. +bool dtTileCacheHeaderSwapEndian(unsigned char* data, const int dataSize); + + +#endif // DETOURTILECACHEBUILDER_H diff --git a/libs/recast/detour_tile_cache/src/DetourTileCache.cpp b/libs/recast/detour_tile_cache/src/DetourTileCache.cpp new file mode 100644 index 000000000..cf575046c --- /dev/null +++ b/libs/recast/detour_tile_cache/src/DetourTileCache.cpp @@ -0,0 +1,764 @@ +#include "DetourTileCache.h" +#include "DetourTileCacheBuilder.h" +#include "DetourNavMeshBuilder.h" +#include "DetourNavMesh.h" +#include "DetourCommon.h" +#include "DetourMath.h" +#include "DetourAlloc.h" +#include "DetourAssert.h" +#include +#include + +dtTileCache* dtAllocTileCache() +{ + void* mem = dtAlloc(sizeof(dtTileCache), DT_ALLOC_PERM); + if (!mem) return 0; + return new(mem) dtTileCache; +} + +void dtFreeTileCache(dtTileCache* tc) +{ + if (!tc) return; + tc->~dtTileCache(); + dtFree(tc); +} + +static bool contains(const dtCompressedTileRef* a, const int n, const dtCompressedTileRef v) +{ + for (int i = 0; i < n; ++i) + if (a[i] == v) + return true; + return false; +} + +inline int computeTileHash(int x, int y, const int mask) +{ + const unsigned int h1 = 0x8da6b343; // Large multiplicative constants; + const unsigned int h2 = 0xd8163841; // here arbitrarily chosen primes + unsigned int n = h1 * x + h2 * y; + return (int)(n & mask); +} + + +struct NavMeshTileBuildContext +{ + inline NavMeshTileBuildContext(struct dtTileCacheAlloc* a) : layer(0), lcset(0), lmesh(0), alloc(a) {} + inline ~NavMeshTileBuildContext() { purge(); } + void purge() + { + dtFreeTileCacheLayer(alloc, layer); + layer = 0; + dtFreeTileCacheContourSet(alloc, lcset); + lcset = 0; + dtFreeTileCachePolyMesh(alloc, lmesh); + lmesh = 0; + } + struct dtTileCacheLayer* layer; + struct dtTileCacheContourSet* lcset; + struct dtTileCachePolyMesh* lmesh; + struct dtTileCacheAlloc* alloc; +}; + + +dtTileCache::dtTileCache() : + m_tileLutSize(0), + m_tileLutMask(0), + m_posLookup(0), + m_nextFreeTile(0), + m_tiles(0), + m_saltBits(0), + m_tileBits(0), + m_talloc(0), + m_tcomp(0), + m_tmproc(0), + m_obstacles(0), + m_nextFreeObstacle(0), + m_nreqs(0), + m_nupdate(0) +{ + memset(&m_params, 0, sizeof(m_params)); + memset(m_reqs, 0, sizeof(ObstacleRequest) * MAX_REQUESTS); +} + +dtTileCache::~dtTileCache() +{ + for (int i = 0; i < m_params.maxTiles; ++i) + { + if (m_tiles[i].flags & DT_COMPRESSEDTILE_FREE_DATA) + { + dtFree(m_tiles[i].data); + m_tiles[i].data = 0; + } + } + dtFree(m_obstacles); + m_obstacles = 0; + dtFree(m_posLookup); + m_posLookup = 0; + dtFree(m_tiles); + m_tiles = 0; + m_nreqs = 0; + m_nupdate = 0; +} + +const dtCompressedTile* dtTileCache::getTileByRef(dtCompressedTileRef ref) const +{ + if (!ref) + return 0; + unsigned int tileIndex = decodeTileIdTile(ref); + unsigned int tileSalt = decodeTileIdSalt(ref); + if ((int)tileIndex >= m_params.maxTiles) + return 0; + const dtCompressedTile* tile = &m_tiles[tileIndex]; + if (tile->salt != tileSalt) + return 0; + return tile; +} + + +dtStatus dtTileCache::init(const dtTileCacheParams* params, + dtTileCacheAlloc* talloc, + dtTileCacheCompressor* tcomp, + dtTileCacheMeshProcess* tmproc) +{ + m_talloc = talloc; + m_tcomp = tcomp; + m_tmproc = tmproc; + m_nreqs = 0; + memcpy(&m_params, params, sizeof(m_params)); + + // Alloc space for obstacles. + m_obstacles = (dtTileCacheObstacle*)dtAlloc(sizeof(dtTileCacheObstacle)*m_params.maxObstacles, DT_ALLOC_PERM); + if (!m_obstacles) + return DT_FAILURE | DT_OUT_OF_MEMORY; + memset(m_obstacles, 0, sizeof(dtTileCacheObstacle)*m_params.maxObstacles); + m_nextFreeObstacle = 0; + for (int i = m_params.maxObstacles-1; i >= 0; --i) + { + m_obstacles[i].salt = 1; + m_obstacles[i].next = m_nextFreeObstacle; + m_nextFreeObstacle = &m_obstacles[i]; + } + + // Init tiles + m_tileLutSize = dtNextPow2(m_params.maxTiles/4); + if (!m_tileLutSize) m_tileLutSize = 1; + m_tileLutMask = m_tileLutSize-1; + + m_tiles = (dtCompressedTile*)dtAlloc(sizeof(dtCompressedTile)*m_params.maxTiles, DT_ALLOC_PERM); + if (!m_tiles) + return DT_FAILURE | DT_OUT_OF_MEMORY; + m_posLookup = (dtCompressedTile**)dtAlloc(sizeof(dtCompressedTile*)*m_tileLutSize, DT_ALLOC_PERM); + if (!m_posLookup) + return DT_FAILURE | DT_OUT_OF_MEMORY; + memset(m_tiles, 0, sizeof(dtCompressedTile)*m_params.maxTiles); + memset(m_posLookup, 0, sizeof(dtCompressedTile*)*m_tileLutSize); + m_nextFreeTile = 0; + for (int i = m_params.maxTiles-1; i >= 0; --i) + { + m_tiles[i].salt = 1; + m_tiles[i].next = m_nextFreeTile; + m_nextFreeTile = &m_tiles[i]; + } + + // Init ID generator values. + m_tileBits = dtIlog2(dtNextPow2((unsigned int)m_params.maxTiles)); + // Only allow 31 salt bits, since the salt mask is calculated using 32bit uint and it will overflow. + m_saltBits = dtMin((unsigned int)31, 32 - m_tileBits); + if (m_saltBits < 10) + return DT_FAILURE | DT_INVALID_PARAM; + + return DT_SUCCESS; +} + +int dtTileCache::getTilesAt(const int tx, const int ty, dtCompressedTileRef* tiles, const int maxTiles) const +{ + int n = 0; + + // Find tile based on hash. + int h = computeTileHash(tx,ty,m_tileLutMask); + dtCompressedTile* tile = m_posLookup[h]; + while (tile) + { + if (tile->header && + tile->header->tx == tx && + tile->header->ty == ty) + { + if (n < maxTiles) + tiles[n++] = getTileRef(tile); + } + tile = tile->next; + } + + return n; +} + +dtCompressedTile* dtTileCache::getTileAt(const int tx, const int ty, const int tlayer) +{ + // Find tile based on hash. + int h = computeTileHash(tx,ty,m_tileLutMask); + dtCompressedTile* tile = m_posLookup[h]; + while (tile) + { + if (tile->header && + tile->header->tx == tx && + tile->header->ty == ty && + tile->header->tlayer == tlayer) + { + return tile; + } + tile = tile->next; + } + return 0; +} + +dtCompressedTileRef dtTileCache::getTileRef(const dtCompressedTile* tile) const +{ + if (!tile) return 0; + const unsigned int it = (unsigned int)(tile - m_tiles); + return (dtCompressedTileRef)encodeTileId(tile->salt, it); +} + +dtObstacleRef dtTileCache::getObstacleRef(const dtTileCacheObstacle* ob) const +{ + if (!ob) return 0; + const unsigned int idx = (unsigned int)(ob - m_obstacles); + return encodeObstacleId(ob->salt, idx); +} + +const dtTileCacheObstacle* dtTileCache::getObstacleByRef(dtObstacleRef ref) +{ + if (!ref) + return 0; + unsigned int idx = decodeObstacleIdObstacle(ref); + if ((int)idx >= m_params.maxObstacles) + return 0; + const dtTileCacheObstacle* ob = &m_obstacles[idx]; + unsigned int salt = decodeObstacleIdSalt(ref); + if (ob->salt != salt) + return 0; + return ob; +} + +dtStatus dtTileCache::addTile(unsigned char* data, const int dataSize, unsigned char flags, dtCompressedTileRef* result) +{ + // Make sure the data is in right format. + dtTileCacheLayerHeader* header = (dtTileCacheLayerHeader*)data; + if (header->magic != DT_TILECACHE_MAGIC) + return DT_FAILURE | DT_WRONG_MAGIC; + if (header->version != DT_TILECACHE_VERSION) + return DT_FAILURE | DT_WRONG_VERSION; + + // Make sure the location is free. + if (getTileAt(header->tx, header->ty, header->tlayer)) + return DT_FAILURE; + + // Allocate a tile. + dtCompressedTile* tile = 0; + if (m_nextFreeTile) + { + tile = m_nextFreeTile; + m_nextFreeTile = tile->next; + tile->next = 0; + } + + // Make sure we could allocate a tile. + if (!tile) + return DT_FAILURE | DT_OUT_OF_MEMORY; + + // Insert tile into the position lut. + int h = computeTileHash(header->tx, header->ty, m_tileLutMask); + tile->next = m_posLookup[h]; + m_posLookup[h] = tile; + + // Init tile. + const int headerSize = dtAlign4(sizeof(dtTileCacheLayerHeader)); + tile->header = (dtTileCacheLayerHeader*)data; + tile->data = data; + tile->dataSize = dataSize; + tile->compressed = tile->data + headerSize; + tile->compressedSize = tile->dataSize - headerSize; + tile->flags = flags; + + if (result) + *result = getTileRef(tile); + + return DT_SUCCESS; +} + +dtStatus dtTileCache::removeTile(dtCompressedTileRef ref, unsigned char** data, int* dataSize) +{ + if (!ref) + return DT_FAILURE | DT_INVALID_PARAM; + unsigned int tileIndex = decodeTileIdTile(ref); + unsigned int tileSalt = decodeTileIdSalt(ref); + if ((int)tileIndex >= m_params.maxTiles) + return DT_FAILURE | DT_INVALID_PARAM; + dtCompressedTile* tile = &m_tiles[tileIndex]; + if (tile->salt != tileSalt) + return DT_FAILURE | DT_INVALID_PARAM; + + // Remove tile from hash lookup. + const int h = computeTileHash(tile->header->tx,tile->header->ty,m_tileLutMask); + dtCompressedTile* prev = 0; + dtCompressedTile* cur = m_posLookup[h]; + while (cur) + { + if (cur == tile) + { + if (prev) + prev->next = cur->next; + else + m_posLookup[h] = cur->next; + break; + } + prev = cur; + cur = cur->next; + } + + // Reset tile. + if (tile->flags & DT_COMPRESSEDTILE_FREE_DATA) + { + // Owns data + dtFree(tile->data); + tile->data = 0; + tile->dataSize = 0; + if (data) *data = 0; + if (dataSize) *dataSize = 0; + } + else + { + if (data) *data = tile->data; + if (dataSize) *dataSize = tile->dataSize; + } + + tile->header = 0; + tile->data = 0; + tile->dataSize = 0; + tile->compressed = 0; + tile->compressedSize = 0; + tile->flags = 0; + + // Update salt, salt should never be zero. + tile->salt = (tile->salt+1) & ((1<salt == 0) + tile->salt++; + + // Add to free list. + tile->next = m_nextFreeTile; + m_nextFreeTile = tile; + + return DT_SUCCESS; +} + + +dtStatus dtTileCache::addObstacle(const float* pos, const float radius, const float height, dtObstacleRef* result) +{ + if (m_nreqs >= MAX_REQUESTS) + return DT_FAILURE | DT_BUFFER_TOO_SMALL; + + dtTileCacheObstacle* ob = 0; + if (m_nextFreeObstacle) + { + ob = m_nextFreeObstacle; + m_nextFreeObstacle = ob->next; + ob->next = 0; + } + if (!ob) + return DT_FAILURE | DT_OUT_OF_MEMORY; + + unsigned short salt = ob->salt; + memset(ob, 0, sizeof(dtTileCacheObstacle)); + ob->salt = salt; + ob->state = DT_OBSTACLE_PROCESSING; + ob->type = DT_OBSTACLE_CYLINDER; + dtVcopy(ob->cylinder.pos, pos); + ob->cylinder.radius = radius; + ob->cylinder.height = height; + + ObstacleRequest* req = &m_reqs[m_nreqs++]; + memset(req, 0, sizeof(ObstacleRequest)); + req->action = REQUEST_ADD; + req->ref = getObstacleRef(ob); + + if (result) + *result = req->ref; + + return DT_SUCCESS; +} + +dtStatus dtTileCache::addBoxObstacle(const float* bmin, const float* bmax, dtObstacleRef* result) +{ + if (m_nreqs >= MAX_REQUESTS) + return DT_FAILURE | DT_BUFFER_TOO_SMALL; + + dtTileCacheObstacle* ob = 0; + if (m_nextFreeObstacle) + { + ob = m_nextFreeObstacle; + m_nextFreeObstacle = ob->next; + ob->next = 0; + } + if (!ob) + return DT_FAILURE | DT_OUT_OF_MEMORY; + + unsigned short salt = ob->salt; + memset(ob, 0, sizeof(dtTileCacheObstacle)); + ob->salt = salt; + ob->state = DT_OBSTACLE_PROCESSING; + ob->type = DT_OBSTACLE_BOX; + dtVcopy(ob->box.bmin, bmin); + dtVcopy(ob->box.bmax, bmax); + + ObstacleRequest* req = &m_reqs[m_nreqs++]; + memset(req, 0, sizeof(ObstacleRequest)); + req->action = REQUEST_ADD; + req->ref = getObstacleRef(ob); + + if (result) + *result = req->ref; + + return DT_SUCCESS; +} + +dtStatus dtTileCache::removeObstacle(const dtObstacleRef ref) +{ + if (!ref) + return DT_SUCCESS; + if (m_nreqs >= MAX_REQUESTS) + return DT_FAILURE | DT_BUFFER_TOO_SMALL; + + ObstacleRequest* req = &m_reqs[m_nreqs++]; + memset(req, 0, sizeof(ObstacleRequest)); + req->action = REQUEST_REMOVE; + req->ref = ref; + + return DT_SUCCESS; +} + +dtStatus dtTileCache::queryTiles(const float* bmin, const float* bmax, + dtCompressedTileRef* results, int* resultCount, const int maxResults) const +{ + const int MAX_TILES = 32; + dtCompressedTileRef tiles[MAX_TILES]; + + int n = 0; + + const float tw = m_params.width * m_params.cs; + const float th = m_params.height * m_params.cs; + const int tx0 = (int)dtMathFloorf((bmin[0]-m_params.orig[0]) / tw); + const int tx1 = (int)dtMathFloorf((bmax[0]-m_params.orig[0]) / tw); + const int ty0 = (int)dtMathFloorf((bmin[2]-m_params.orig[2]) / th); + const int ty1 = (int)dtMathFloorf((bmax[2]-m_params.orig[2]) / th); + + for (int ty = ty0; ty <= ty1; ++ty) + { + for (int tx = tx0; tx <= tx1; ++tx) + { + const int ntiles = getTilesAt(tx,ty,tiles,MAX_TILES); + + for (int i = 0; i < ntiles; ++i) + { + const dtCompressedTile* tile = &m_tiles[decodeTileIdTile(tiles[i])]; + float tbmin[3], tbmax[3]; + calcTightTileBounds(tile->header, tbmin, tbmax); + + if (dtOverlapBounds(bmin,bmax, tbmin,tbmax)) + { + if (n < maxResults) + results[n++] = tiles[i]; + } + } + } + } + + *resultCount = n; + + return DT_SUCCESS; +} + +dtStatus dtTileCache::update(const float /*dt*/, dtNavMesh* navmesh, + bool* upToDate) +{ + if (m_nupdate == 0) + { + // Process requests. + for (int i = 0; i < m_nreqs; ++i) + { + ObstacleRequest* req = &m_reqs[i]; + + unsigned int idx = decodeObstacleIdObstacle(req->ref); + if ((int)idx >= m_params.maxObstacles) + continue; + dtTileCacheObstacle* ob = &m_obstacles[idx]; + unsigned int salt = decodeObstacleIdSalt(req->ref); + if (ob->salt != salt) + continue; + + if (req->action == REQUEST_ADD) + { + // Find touched tiles. + float bmin[3], bmax[3]; + getObstacleBounds(ob, bmin, bmax); + + int ntouched = 0; + queryTiles(bmin, bmax, ob->touched, &ntouched, DT_MAX_TOUCHED_TILES); + ob->ntouched = (unsigned char)ntouched; + // Add tiles to update list. + ob->npending = 0; + for (int j = 0; j < ob->ntouched; ++j) + { + if (m_nupdate < MAX_UPDATE) + { + if (!contains(m_update, m_nupdate, ob->touched[j])) + m_update[m_nupdate++] = ob->touched[j]; + ob->pending[ob->npending++] = ob->touched[j]; + } + } + } + else if (req->action == REQUEST_REMOVE) + { + // Prepare to remove obstacle. + ob->state = DT_OBSTACLE_REMOVING; + // Add tiles to update list. + ob->npending = 0; + for (int j = 0; j < ob->ntouched; ++j) + { + if (m_nupdate < MAX_UPDATE) + { + if (!contains(m_update, m_nupdate, ob->touched[j])) + m_update[m_nupdate++] = ob->touched[j]; + ob->pending[ob->npending++] = ob->touched[j]; + } + } + } + } + + m_nreqs = 0; + } + + dtStatus status = DT_SUCCESS; + // Process updates + if (m_nupdate) + { + // Build mesh + const dtCompressedTileRef ref = m_update[0]; + status = buildNavMeshTile(ref, navmesh); + m_nupdate--; + if (m_nupdate > 0) + memmove(m_update, m_update+1, m_nupdate*sizeof(dtCompressedTileRef)); + + // Update obstacle states. + for (int i = 0; i < m_params.maxObstacles; ++i) + { + dtTileCacheObstacle* ob = &m_obstacles[i]; + if (ob->state == DT_OBSTACLE_PROCESSING || ob->state == DT_OBSTACLE_REMOVING) + { + // Remove handled tile from pending list. + for (int j = 0; j < (int)ob->npending; j++) + { + if (ob->pending[j] == ref) + { + ob->pending[j] = ob->pending[(int)ob->npending-1]; + ob->npending--; + break; + } + } + + // If all pending tiles processed, change state. + if (ob->npending == 0) + { + if (ob->state == DT_OBSTACLE_PROCESSING) + { + ob->state = DT_OBSTACLE_PROCESSED; + } + else if (ob->state == DT_OBSTACLE_REMOVING) + { + ob->state = DT_OBSTACLE_EMPTY; + // Update salt, salt should never be zero. + ob->salt = (ob->salt+1) & ((1<<16)-1); + if (ob->salt == 0) + ob->salt++; + // Return obstacle to free list. + ob->next = m_nextFreeObstacle; + m_nextFreeObstacle = ob; + } + } + } + } + } + + if (upToDate) + *upToDate = m_nupdate == 0 && m_nreqs == 0; + + return status; +} + + +dtStatus dtTileCache::buildNavMeshTilesAt(const int tx, const int ty, dtNavMesh* navmesh) +{ + const int MAX_TILES = 32; + dtCompressedTileRef tiles[MAX_TILES]; + const int ntiles = getTilesAt(tx,ty,tiles,MAX_TILES); + + for (int i = 0; i < ntiles; ++i) + { + dtStatus status = buildNavMeshTile(tiles[i], navmesh); + if (dtStatusFailed(status)) + return status; + } + + return DT_SUCCESS; +} + +dtStatus dtTileCache::buildNavMeshTile(const dtCompressedTileRef ref, dtNavMesh* navmesh) +{ + dtAssert(m_talloc); + dtAssert(m_tcomp); + + unsigned int idx = decodeTileIdTile(ref); + if (idx > (unsigned int)m_params.maxTiles) + return DT_FAILURE | DT_INVALID_PARAM; + const dtCompressedTile* tile = &m_tiles[idx]; + unsigned int salt = decodeTileIdSalt(ref); + if (tile->salt != salt) + return DT_FAILURE | DT_INVALID_PARAM; + + m_talloc->reset(); + + NavMeshTileBuildContext bc(m_talloc); + const int walkableClimbVx = (int)(m_params.walkableClimb / m_params.ch); + dtStatus status; + + // Decompress tile layer data. + status = dtDecompressTileCacheLayer(m_talloc, m_tcomp, tile->data, tile->dataSize, &bc.layer); + if (dtStatusFailed(status)) + return status; + + // Rasterize obstacles. + for (int i = 0; i < m_params.maxObstacles; ++i) + { + const dtTileCacheObstacle* ob = &m_obstacles[i]; + if (ob->state == DT_OBSTACLE_EMPTY || ob->state == DT_OBSTACLE_REMOVING) + continue; + if (contains(ob->touched, ob->ntouched, ref)) + { + if (ob->type == DT_OBSTACLE_CYLINDER) + { + dtMarkCylinderArea(*bc.layer, tile->header->bmin, m_params.cs, m_params.ch, + ob->cylinder.pos, ob->cylinder.radius, ob->cylinder.height, 0); + } + else if (ob->type == DT_OBSTACLE_BOX) + { + dtMarkBoxArea(*bc.layer, tile->header->bmin, m_params.cs, m_params.ch, + ob->box.bmin, ob->box.bmax, 0); + } + } + } + + // Build navmesh + status = dtBuildTileCacheRegions(m_talloc, *bc.layer, walkableClimbVx); + if (dtStatusFailed(status)) + return status; + + bc.lcset = dtAllocTileCacheContourSet(m_talloc); + if (!bc.lcset) + return status; + status = dtBuildTileCacheContours(m_talloc, *bc.layer, walkableClimbVx, + m_params.maxSimplificationError, *bc.lcset); + if (dtStatusFailed(status)) + return status; + + bc.lmesh = dtAllocTileCachePolyMesh(m_talloc); + if (!bc.lmesh) + return status; + status = dtBuildTileCachePolyMesh(m_talloc, *bc.lcset, *bc.lmesh); + if (dtStatusFailed(status)) + return status; + + // Early out if the mesh tile is empty. + if (!bc.lmesh->npolys) + { + // Remove existing tile. + navmesh->removeTile(navmesh->getTileRefAt(tile->header->tx,tile->header->ty,tile->header->tlayer),0,0); + return DT_SUCCESS; + } + + dtNavMeshCreateParams params; + memset(¶ms, 0, sizeof(params)); + params.verts = bc.lmesh->verts; + params.vertCount = bc.lmesh->nverts; + params.polys = bc.lmesh->polys; + params.polyAreas = bc.lmesh->areas; + params.polyFlags = bc.lmesh->flags; + params.polyCount = bc.lmesh->npolys; + params.nvp = DT_VERTS_PER_POLYGON; + params.walkableHeight = m_params.walkableHeight; + params.walkableRadius = m_params.walkableRadius; + params.walkableClimb = m_params.walkableClimb; + params.tileX = tile->header->tx; + params.tileY = tile->header->ty; + params.tileLayer = tile->header->tlayer; + params.cs = m_params.cs; + params.ch = m_params.ch; + params.buildBvTree = false; + dtVcopy(params.bmin, tile->header->bmin); + dtVcopy(params.bmax, tile->header->bmax); + + if (m_tmproc) + { + m_tmproc->process(¶ms, bc.lmesh->areas, bc.lmesh->flags); + } + + unsigned char* navData = 0; + int navDataSize = 0; + if (!dtCreateNavMeshData(¶ms, &navData, &navDataSize)) + return DT_FAILURE; + + // Remove existing tile. + navmesh->removeTile(navmesh->getTileRefAt(tile->header->tx,tile->header->ty,tile->header->tlayer),0,0); + + // Add new tile, or leave the location empty. + if (navData) + { + // Let the navmesh own the data. + status = navmesh->addTile(navData,navDataSize,DT_TILE_FREE_DATA,0,0); + if (dtStatusFailed(status)) + { + dtFree(navData); + return status; + } + } + + return DT_SUCCESS; +} + +void dtTileCache::calcTightTileBounds(const dtTileCacheLayerHeader* header, float* bmin, float* bmax) const +{ + const float cs = m_params.cs; + bmin[0] = header->bmin[0] + header->minx*cs; + bmin[1] = header->bmin[1]; + bmin[2] = header->bmin[2] + header->miny*cs; + bmax[0] = header->bmin[0] + (header->maxx+1)*cs; + bmax[1] = header->bmax[1]; + bmax[2] = header->bmin[2] + (header->maxy+1)*cs; +} + +void dtTileCache::getObstacleBounds(const struct dtTileCacheObstacle* ob, float* bmin, float* bmax) const +{ + if (ob->type == DT_OBSTACLE_CYLINDER) + { + const dtObstacleCylinder &cl = ob->cylinder; + + bmin[0] = cl.pos[0] - cl.radius; + bmin[1] = cl.pos[1]; + bmin[2] = cl.pos[2] - cl.radius; + bmax[0] = cl.pos[0] + cl.radius; + bmax[1] = cl.pos[1] + cl.height; + bmax[2] = cl.pos[2] + cl.radius; + } + else if (ob->type == DT_OBSTACLE_BOX) + { + dtVcopy(bmin, ob->box.bmin); + dtVcopy(bmax, ob->box.bmax); + } +} diff --git a/libs/recast/detour_tile_cache/src/DetourTileCacheBuilder.cpp b/libs/recast/detour_tile_cache/src/DetourTileCacheBuilder.cpp new file mode 100644 index 000000000..a81a7b439 --- /dev/null +++ b/libs/recast/detour_tile_cache/src/DetourTileCacheBuilder.cpp @@ -0,0 +1,2196 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#include "DetourCommon.h" +#include "DetourMath.h" +#include "DetourStatus.h" +#include "DetourAssert.h" +#include "DetourTileCacheBuilder.h" +#include + + +template class dtFixedArray +{ + dtTileCacheAlloc* m_alloc; + T* m_ptr; + const int m_size; + inline void operator=(dtFixedArray& p); +public: + inline dtFixedArray(dtTileCacheAlloc* a, const int s) : m_alloc(a), m_ptr((T*)a->alloc(sizeof(T)*s)), m_size(s) {} + inline ~dtFixedArray() { if (m_alloc) m_alloc->free(m_ptr); } + inline operator T*() { return m_ptr; } + inline int size() const { return m_size; } +}; + +inline int getDirOffsetX(int dir) +{ + const int offset[4] = { -1, 0, 1, 0, }; + return offset[dir&0x03]; +} + +inline int getDirOffsetY(int dir) +{ + const int offset[4] = { 0, 1, 0, -1 }; + return offset[dir&0x03]; +} + +static const int MAX_VERTS_PER_POLY = 6; // TODO: use the DT_VERTS_PER_POLYGON +static const int MAX_REM_EDGES = 48; // TODO: make this an expression. + + + +dtTileCacheContourSet* dtAllocTileCacheContourSet(dtTileCacheAlloc* alloc) +{ + dtAssert(alloc); + + dtTileCacheContourSet* cset = (dtTileCacheContourSet*)alloc->alloc(sizeof(dtTileCacheContourSet)); + memset(cset, 0, sizeof(dtTileCacheContourSet)); + return cset; +} + +void dtFreeTileCacheContourSet(dtTileCacheAlloc* alloc, dtTileCacheContourSet* cset) +{ + dtAssert(alloc); + + if (!cset) return; + for (int i = 0; i < cset->nconts; ++i) + alloc->free(cset->conts[i].verts); + alloc->free(cset->conts); + alloc->free(cset); +} + +dtTileCachePolyMesh* dtAllocTileCachePolyMesh(dtTileCacheAlloc* alloc) +{ + dtAssert(alloc); + + dtTileCachePolyMesh* lmesh = (dtTileCachePolyMesh*)alloc->alloc(sizeof(dtTileCachePolyMesh)); + memset(lmesh, 0, sizeof(dtTileCachePolyMesh)); + return lmesh; +} + +void dtFreeTileCachePolyMesh(dtTileCacheAlloc* alloc, dtTileCachePolyMesh* lmesh) +{ + dtAssert(alloc); + + if (!lmesh) return; + alloc->free(lmesh->verts); + alloc->free(lmesh->polys); + alloc->free(lmesh->flags); + alloc->free(lmesh->areas); + alloc->free(lmesh); +} + + + +struct dtLayerSweepSpan +{ + unsigned short ns; // number samples + unsigned char id; // region id + unsigned char nei; // neighbour id +}; + +static const int DT_LAYER_MAX_NEIS = 16; + +struct dtLayerMonotoneRegion +{ + int area; + unsigned char neis[DT_LAYER_MAX_NEIS]; + unsigned char nneis; + unsigned char regId; + unsigned char areaId; +}; + +struct dtTempContour +{ + inline dtTempContour(unsigned char* vbuf, const int nvbuf, + unsigned short* pbuf, const int npbuf) : + verts(vbuf), nverts(0), cverts(nvbuf), + poly(pbuf), npoly(0), cpoly(npbuf) + { + } + unsigned char* verts; + int nverts; + int cverts; + unsigned short* poly; + int npoly; + int cpoly; +}; + + + + +inline bool overlapRangeExl(const unsigned short amin, const unsigned short amax, + const unsigned short bmin, const unsigned short bmax) +{ + return (amin >= bmax || amax <= bmin) ? false : true; +} + +static void addUniqueLast(unsigned char* a, unsigned char& an, unsigned char v) +{ + const int n = (int)an; + if (n > 0 && a[n-1] == v) return; + a[an] = v; + an++; +} + +inline bool isConnected(const dtTileCacheLayer& layer, + const int ia, const int ib, const int walkableClimb) +{ + if (layer.areas[ia] != layer.areas[ib]) return false; + if (dtAbs((int)layer.heights[ia] - (int)layer.heights[ib]) > walkableClimb) return false; + return true; +} + +static bool canMerge(unsigned char oldRegId, unsigned char newRegId, const dtLayerMonotoneRegion* regs, const int nregs) +{ + int count = 0; + for (int i = 0; i < nregs; ++i) + { + const dtLayerMonotoneRegion& reg = regs[i]; + if (reg.regId != oldRegId) continue; + const int nnei = (int)reg.nneis; + for (int j = 0; j < nnei; ++j) + { + if (regs[reg.neis[j]].regId == newRegId) + count++; + } + } + return count == 1; +} + + +dtStatus dtBuildTileCacheRegions(dtTileCacheAlloc* alloc, + dtTileCacheLayer& layer, + const int walkableClimb) +{ + dtAssert(alloc); + + const int w = (int)layer.header->width; + const int h = (int)layer.header->height; + + memset(layer.regs,0xff,sizeof(unsigned char)*w*h); + + const int nsweeps = w; + dtFixedArray sweeps(alloc, nsweeps); + if (!sweeps) + return DT_FAILURE | DT_OUT_OF_MEMORY; + memset(sweeps,0,sizeof(dtLayerSweepSpan)*nsweeps); + + // Partition walkable area into monotone regions. + unsigned char prevCount[256]; + unsigned char regId = 0; + + for (int y = 0; y < h; ++y) + { + if (regId > 0) + memset(prevCount,0,sizeof(unsigned char)*regId); + unsigned char sweepId = 0; + + for (int x = 0; x < w; ++x) + { + const int idx = x + y*w; + if (layer.areas[idx] == DT_TILECACHE_NULL_AREA) continue; + + unsigned char sid = 0xff; + + // -x + const int xidx = (x-1)+y*w; + if (x > 0 && isConnected(layer, idx, xidx, walkableClimb)) + { + if (layer.regs[xidx] != 0xff) + sid = layer.regs[xidx]; + } + + if (sid == 0xff) + { + sid = sweepId++; + sweeps[sid].nei = 0xff; + sweeps[sid].ns = 0; + } + + // -y + const int yidx = x+(y-1)*w; + if (y > 0 && isConnected(layer, idx, yidx, walkableClimb)) + { + const unsigned char nr = layer.regs[yidx]; + if (nr != 0xff) + { + // Set neighbour when first valid neighbour is encoutered. + if (sweeps[sid].ns == 0) + sweeps[sid].nei = nr; + + if (sweeps[sid].nei == nr) + { + // Update existing neighbour + sweeps[sid].ns++; + prevCount[nr]++; + } + else + { + // This is hit if there is nore than one neighbour. + // Invalidate the neighbour. + sweeps[sid].nei = 0xff; + } + } + } + + layer.regs[idx] = sid; + } + + // Create unique ID. + for (int i = 0; i < sweepId; ++i) + { + // If the neighbour is set and there is only one continuous connection to it, + // the sweep will be merged with the previous one, else new region is created. + if (sweeps[i].nei != 0xff && (unsigned short)prevCount[sweeps[i].nei] == sweeps[i].ns) + { + sweeps[i].id = sweeps[i].nei; + } + else + { + if (regId == 255) + { + // Region ID's overflow. + return DT_FAILURE | DT_BUFFER_TOO_SMALL; + } + sweeps[i].id = regId++; + } + } + + // Remap local sweep ids to region ids. + for (int x = 0; x < w; ++x) + { + const int idx = x+y*w; + if (layer.regs[idx] != 0xff) + layer.regs[idx] = sweeps[layer.regs[idx]].id; + } + } + + // Allocate and init layer regions. + const int nregs = (int)regId; + dtFixedArray regs(alloc, nregs); + if (!regs) + return DT_FAILURE | DT_OUT_OF_MEMORY; + + memset(regs, 0, sizeof(dtLayerMonotoneRegion)*nregs); + for (int i = 0; i < nregs; ++i) + regs[i].regId = 0xff; + + // Find region neighbours. + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + const int idx = x+y*w; + const unsigned char ri = layer.regs[idx]; + if (ri == 0xff) + continue; + + // Update area. + regs[ri].area++; + regs[ri].areaId = layer.areas[idx]; + + // Update neighbours + const int ymi = x+(y-1)*w; + if (y > 0 && isConnected(layer, idx, ymi, walkableClimb)) + { + const unsigned char rai = layer.regs[ymi]; + if (rai != 0xff && rai != ri) + { + addUniqueLast(regs[ri].neis, regs[ri].nneis, rai); + addUniqueLast(regs[rai].neis, regs[rai].nneis, ri); + } + } + } + } + + for (int i = 0; i < nregs; ++i) + regs[i].regId = (unsigned char)i; + + for (int i = 0; i < nregs; ++i) + { + dtLayerMonotoneRegion& reg = regs[i]; + + int merge = -1; + int mergea = 0; + for (int j = 0; j < (int)reg.nneis; ++j) + { + const unsigned char nei = reg.neis[j]; + dtLayerMonotoneRegion& regn = regs[nei]; + if (reg.regId == regn.regId) + continue; + if (reg.areaId != regn.areaId) + continue; + if (regn.area > mergea) + { + if (canMerge(reg.regId, regn.regId, regs, nregs)) + { + mergea = regn.area; + merge = (int)nei; + } + } + } + if (merge != -1) + { + const unsigned char oldId = reg.regId; + const unsigned char newId = regs[merge].regId; + for (int j = 0; j < nregs; ++j) + if (regs[j].regId == oldId) + regs[j].regId = newId; + } + } + + // Compact ids. + unsigned char remap[256]; + memset(remap, 0, 256); + // Find number of unique regions. + regId = 0; + for (int i = 0; i < nregs; ++i) + remap[regs[i].regId] = 1; + for (int i = 0; i < 256; ++i) + if (remap[i]) + remap[i] = regId++; + // Remap ids. + for (int i = 0; i < nregs; ++i) + regs[i].regId = remap[regs[i].regId]; + + layer.regCount = regId; + + for (int i = 0; i < w*h; ++i) + { + if (layer.regs[i] != 0xff) + layer.regs[i] = regs[layer.regs[i]].regId; + } + + return DT_SUCCESS; +} + + + +static bool appendVertex(dtTempContour& cont, const int x, const int y, const int z, const int r) +{ + // Try to merge with existing segments. + if (cont.nverts > 1) + { + unsigned char* pa = &cont.verts[(cont.nverts-2)*4]; + unsigned char* pb = &cont.verts[(cont.nverts-1)*4]; + if ((int)pb[3] == r) + { + if (pa[0] == pb[0] && (int)pb[0] == x) + { + // The verts are aligned aling x-axis, update z. + pb[1] = (unsigned char)y; + pb[2] = (unsigned char)z; + return true; + } + else if (pa[2] == pb[2] && (int)pb[2] == z) + { + // The verts are aligned aling z-axis, update x. + pb[0] = (unsigned char)x; + pb[1] = (unsigned char)y; + return true; + } + } + } + + // Add new point. + if (cont.nverts+1 > cont.cverts) + return false; + + unsigned char* v = &cont.verts[cont.nverts*4]; + v[0] = (unsigned char)x; + v[1] = (unsigned char)y; + v[2] = (unsigned char)z; + v[3] = (unsigned char)r; + cont.nverts++; + + return true; +} + + +static unsigned char getNeighbourReg(dtTileCacheLayer& layer, + const int ax, const int ay, const int dir) +{ + const int w = (int)layer.header->width; + const int ia = ax + ay*w; + + const unsigned char con = layer.cons[ia] & 0xf; + const unsigned char portal = layer.cons[ia] >> 4; + const unsigned char mask = (unsigned char)(1<width; + const int h = (int)layer.header->height; + + cont.nverts = 0; + + int startX = x; + int startY = y; + int startDir = -1; + + for (int i = 0; i < 4; ++i) + { + const int dir = (i+3)&3; + unsigned char rn = getNeighbourReg(layer, x, y, dir); + if (rn != layer.regs[x+y*w]) + { + startDir = dir; + break; + } + } + if (startDir == -1) + return true; + + int dir = startDir; + const int maxIter = w*h; + + int iter = 0; + while (iter < maxIter) + { + unsigned char rn = getNeighbourReg(layer, x, y, dir); + + int nx = x; + int ny = y; + int ndir = dir; + + if (rn != layer.regs[x+y*w]) + { + // Solid edge. + int px = x; + int pz = y; + switch(dir) + { + case 0: pz++; break; + case 1: px++; pz++; break; + case 2: px++; break; + } + + // Try to merge with previous vertex. + if (!appendVertex(cont, px, (int)layer.heights[x+y*w], pz,rn)) + return false; + + ndir = (dir+1) & 0x3; // Rotate CW + } + else + { + // Move to next. + nx = x + getDirOffsetX(dir); + ny = y + getDirOffsetY(dir); + ndir = (dir+3) & 0x3; // Rotate CCW + } + + if (iter > 0 && x == startX && y == startY && dir == startDir) + break; + + x = nx; + y = ny; + dir = ndir; + + iter++; + } + + // Remove last vertex if it is duplicate of the first one. + unsigned char* pa = &cont.verts[(cont.nverts-1)*4]; + unsigned char* pb = &cont.verts[0]; + if (pa[0] == pb[0] && pa[2] == pb[2]) + cont.nverts--; + + return true; +} + + +static float distancePtSeg(const int x, const int z, + const int px, const int pz, + const int qx, const int qz) +{ + float pqx = (float)(qx - px); + float pqz = (float)(qz - pz); + float dx = (float)(x - px); + float dz = (float)(z - pz); + float d = pqx*pqx + pqz*pqz; + float t = pqx*dx + pqz*dz; + if (d > 0) + t /= d; + if (t < 0) + t = 0; + else if (t > 1) + t = 1; + + dx = px + t*pqx - x; + dz = pz + t*pqz - z; + + return dx*dx + dz*dz; +} + +static void simplifyContour(dtTempContour& cont, const float maxError) +{ + cont.npoly = 0; + + for (int i = 0; i < cont.nverts; ++i) + { + int j = (i+1) % cont.nverts; + // Check for start of a wall segment. + unsigned char ra = cont.verts[j*4+3]; + unsigned char rb = cont.verts[i*4+3]; + if (ra != rb) + cont.poly[cont.npoly++] = (unsigned short)i; + } + if (cont.npoly < 2) + { + // If there is no transitions at all, + // create some initial points for the simplification process. + // Find lower-left and upper-right vertices of the contour. + int llx = cont.verts[0]; + int llz = cont.verts[2]; + int lli = 0; + int urx = cont.verts[0]; + int urz = cont.verts[2]; + int uri = 0; + for (int i = 1; i < cont.nverts; ++i) + { + int x = cont.verts[i*4+0]; + int z = cont.verts[i*4+2]; + if (x < llx || (x == llx && z < llz)) + { + llx = x; + llz = z; + lli = i; + } + if (x > urx || (x == urx && z > urz)) + { + urx = x; + urz = z; + uri = i; + } + } + cont.npoly = 0; + cont.poly[cont.npoly++] = (unsigned short)lli; + cont.poly[cont.npoly++] = (unsigned short)uri; + } + + // Add points until all raw points are within + // error tolerance to the simplified shape. + for (int i = 0; i < cont.npoly; ) + { + int ii = (i+1) % cont.npoly; + + const int ai = (int)cont.poly[i]; + const int ax = (int)cont.verts[ai*4+0]; + const int az = (int)cont.verts[ai*4+2]; + + const int bi = (int)cont.poly[ii]; + const int bx = (int)cont.verts[bi*4+0]; + const int bz = (int)cont.verts[bi*4+2]; + + // Find maximum deviation from the segment. + float maxd = 0; + int maxi = -1; + int ci, cinc, endi; + + // Traverse the segment in lexilogical order so that the + // max deviation is calculated similarly when traversing + // opposite segments. + if (bx > ax || (bx == ax && bz > az)) + { + cinc = 1; + ci = (ai+cinc) % cont.nverts; + endi = bi; + } + else + { + cinc = cont.nverts-1; + ci = (bi+cinc) % cont.nverts; + endi = ai; + } + + // Tessellate only outer edges or edges between areas. + while (ci != endi) + { + float d = distancePtSeg(cont.verts[ci*4+0], cont.verts[ci*4+2], ax, az, bx, bz); + if (d > maxd) + { + maxd = d; + maxi = ci; + } + ci = (ci+cinc) % cont.nverts; + } + + + // If the max deviation is larger than accepted error, + // add new point, else continue to next segment. + if (maxi != -1 && maxd > (maxError*maxError)) + { + cont.npoly++; + for (int j = cont.npoly-1; j > i; --j) + cont.poly[j] = cont.poly[j-1]; + cont.poly[i+1] = (unsigned short)maxi; + } + else + { + ++i; + } + } + + // Remap vertices + int start = 0; + for (int i = 1; i < cont.npoly; ++i) + if (cont.poly[i] < cont.poly[start]) + start = i; + + cont.nverts = 0; + for (int i = 0; i < cont.npoly; ++i) + { + const int j = (start+i) % cont.npoly; + unsigned char* src = &cont.verts[cont.poly[j]*4]; + unsigned char* dst = &cont.verts[cont.nverts*4]; + dst[0] = src[0]; + dst[1] = src[1]; + dst[2] = src[2]; + dst[3] = src[3]; + cont.nverts++; + } +} + +static unsigned char getCornerHeight(dtTileCacheLayer& layer, + const int x, const int y, const int z, + const int walkableClimb, + bool& shouldRemove) +{ + const int w = (int)layer.header->width; + const int h = (int)layer.header->height; + + int n = 0; + + unsigned char portal = 0xf; + unsigned char height = 0; + unsigned char preg = 0xff; + bool allSameReg = true; + + for (int dz = -1; dz <= 0; ++dz) + { + for (int dx = -1; dx <= 0; ++dx) + { + const int px = x+dx; + const int pz = z+dz; + if (px >= 0 && pz >= 0 && px < w && pz < h) + { + const int idx = px + pz*w; + const int lh = (int)layer.heights[idx]; + if (dtAbs(lh-y) <= walkableClimb && layer.areas[idx] != DT_TILECACHE_NULL_AREA) + { + height = dtMax(height, (unsigned char)lh); + portal &= (layer.cons[idx] >> 4); + if (preg != 0xff && preg != layer.regs[idx]) + allSameReg = false; + preg = layer.regs[idx]; + n++; + } + } + } + } + + int portalCount = 0; + for (int dir = 0; dir < 4; ++dir) + if (portal & (1< 1 && portalCount == 1 && allSameReg) + { + shouldRemove = true; + } + + return height; +} + + +// TODO: move this somewhere else, once the layer meshing is done. +dtStatus dtBuildTileCacheContours(dtTileCacheAlloc* alloc, + dtTileCacheLayer& layer, + const int walkableClimb, const float maxError, + dtTileCacheContourSet& lcset) +{ + dtAssert(alloc); + + const int w = (int)layer.header->width; + const int h = (int)layer.header->height; + + lcset.nconts = layer.regCount; + lcset.conts = (dtTileCacheContour*)alloc->alloc(sizeof(dtTileCacheContour)*lcset.nconts); + if (!lcset.conts) + return DT_FAILURE | DT_OUT_OF_MEMORY; + memset(lcset.conts, 0, sizeof(dtTileCacheContour)*lcset.nconts); + + // Allocate temp buffer for contour tracing. + const int maxTempVerts = (w+h)*2 * 2; // Twice around the layer. + + dtFixedArray tempVerts(alloc, maxTempVerts*4); + if (!tempVerts) + return DT_FAILURE | DT_OUT_OF_MEMORY; + + dtFixedArray tempPoly(alloc, maxTempVerts); + if (!tempPoly) + return DT_FAILURE | DT_OUT_OF_MEMORY; + + dtTempContour temp(tempVerts, maxTempVerts, tempPoly, maxTempVerts); + + // Find contours. + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + const int idx = x+y*w; + const unsigned char ri = layer.regs[idx]; + if (ri == 0xff) + continue; + + dtTileCacheContour& cont = lcset.conts[ri]; + + if (cont.nverts > 0) + continue; + + cont.reg = ri; + cont.area = layer.areas[idx]; + + if (!walkContour(layer, x, y, temp)) + { + // Too complex contour. + // Note: If you hit here ofte, try increasing 'maxTempVerts'. + return DT_FAILURE | DT_BUFFER_TOO_SMALL; + } + + simplifyContour(temp, maxError); + + // Store contour. + cont.nverts = temp.nverts; + if (cont.nverts > 0) + { + cont.verts = (unsigned char*)alloc->alloc(sizeof(unsigned char)*4*temp.nverts); + if (!cont.verts) + return DT_FAILURE | DT_OUT_OF_MEMORY; + + for (int i = 0, j = temp.nverts-1; i < temp.nverts; j=i++) + { + unsigned char* dst = &cont.verts[j*4]; + unsigned char* v = &temp.verts[j*4]; + unsigned char* vn = &temp.verts[i*4]; + unsigned char nei = vn[3]; // The neighbour reg is stored at segment vertex of a segment. + bool shouldRemove = false; + unsigned char lh = getCornerHeight(layer, (int)v[0], (int)v[1], (int)v[2], + walkableClimb, shouldRemove); + + dst[0] = v[0]; + dst[1] = lh; + dst[2] = v[2]; + + // Store portal direction and remove status to the fourth component. + dst[3] = 0x0f; + if (nei != 0xff && nei >= 0xf8) + dst[3] = nei - 0xf8; + if (shouldRemove) + dst[3] |= 0x80; + } + } + } + } + + return DT_SUCCESS; +} + + + +static const int VERTEX_BUCKET_COUNT2 = (1<<8); + +inline int computeVertexHash2(int x, int y, int z) +{ + const unsigned int h1 = 0x8da6b343; // Large multiplicative constants; + const unsigned int h2 = 0xd8163841; // here arbitrarily chosen primes + const unsigned int h3 = 0xcb1ab31f; + unsigned int n = h1 * x + h2 * y + h3 * z; + return (int)(n & (VERTEX_BUCKET_COUNT2-1)); +} + +static unsigned short addVertex(unsigned short x, unsigned short y, unsigned short z, + unsigned short* verts, unsigned short* firstVert, unsigned short* nextVert, int& nv) +{ + int bucket = computeVertexHash2(x, 0, z); + unsigned short i = firstVert[bucket]; + + while (i != DT_TILECACHE_NULL_IDX) + { + const unsigned short* v = &verts[i*3]; + if (v[0] == x && v[2] == z && (dtAbs(v[1] - y) <= 2)) + return i; + i = nextVert[i]; // next + } + + // Could not find, create new. + i = (unsigned short)nv; nv++; + unsigned short* v = &verts[i*3]; + v[0] = x; + v[1] = y; + v[2] = z; + nextVert[i] = firstVert[bucket]; + firstVert[bucket] = i; + + return (unsigned short)i; +} + + +struct rcEdge +{ + unsigned short vert[2]; + unsigned short polyEdge[2]; + unsigned short poly[2]; +}; + +static bool buildMeshAdjacency(dtTileCacheAlloc* alloc, + unsigned short* polys, const int npolys, + const unsigned short* verts, const int nverts, + const dtTileCacheContourSet& lcset) +{ + // Based on code by Eric Lengyel from: + // http://www.terathon.com/code/edges.php + + const int maxEdgeCount = npolys*MAX_VERTS_PER_POLY; + dtFixedArray firstEdge(alloc, nverts + maxEdgeCount); + if (!firstEdge) + return false; + unsigned short* nextEdge = firstEdge + nverts; + int edgeCount = 0; + + dtFixedArray edges(alloc, maxEdgeCount); + if (!edges) + return false; + + for (int i = 0; i < nverts; i++) + firstEdge[i] = DT_TILECACHE_NULL_IDX; + + for (int i = 0; i < npolys; ++i) + { + unsigned short* t = &polys[i*MAX_VERTS_PER_POLY*2]; + for (int j = 0; j < MAX_VERTS_PER_POLY; ++j) + { + if (t[j] == DT_TILECACHE_NULL_IDX) break; + unsigned short v0 = t[j]; + unsigned short v1 = (j+1 >= MAX_VERTS_PER_POLY || t[j+1] == DT_TILECACHE_NULL_IDX) ? t[0] : t[j+1]; + if (v0 < v1) + { + rcEdge& edge = edges[edgeCount]; + edge.vert[0] = v0; + edge.vert[1] = v1; + edge.poly[0] = (unsigned short)i; + edge.polyEdge[0] = (unsigned short)j; + edge.poly[1] = (unsigned short)i; + edge.polyEdge[1] = 0xff; + // Insert edge + nextEdge[edgeCount] = firstEdge[v0]; + firstEdge[v0] = (unsigned short)edgeCount; + edgeCount++; + } + } + } + + for (int i = 0; i < npolys; ++i) + { + unsigned short* t = &polys[i*MAX_VERTS_PER_POLY*2]; + for (int j = 0; j < MAX_VERTS_PER_POLY; ++j) + { + if (t[j] == DT_TILECACHE_NULL_IDX) break; + unsigned short v0 = t[j]; + unsigned short v1 = (j+1 >= MAX_VERTS_PER_POLY || t[j+1] == DT_TILECACHE_NULL_IDX) ? t[0] : t[j+1]; + if (v0 > v1) + { + bool found = false; + for (unsigned short e = firstEdge[v1]; e != DT_TILECACHE_NULL_IDX; e = nextEdge[e]) + { + rcEdge& edge = edges[e]; + if (edge.vert[1] == v0 && edge.poly[0] == edge.poly[1]) + { + edge.poly[1] = (unsigned short)i; + edge.polyEdge[1] = (unsigned short)j; + found = true; + break; + } + } + if (!found) + { + // Matching edge not found, it is an open edge, add it. + rcEdge& edge = edges[edgeCount]; + edge.vert[0] = v1; + edge.vert[1] = v0; + edge.poly[0] = (unsigned short)i; + edge.polyEdge[0] = (unsigned short)j; + edge.poly[1] = (unsigned short)i; + edge.polyEdge[1] = 0xff; + // Insert edge + nextEdge[edgeCount] = firstEdge[v1]; + firstEdge[v1] = (unsigned short)edgeCount; + edgeCount++; + } + } + } + } + + // Mark portal edges. + for (int i = 0; i < lcset.nconts; ++i) + { + dtTileCacheContour& cont = lcset.conts[i]; + if (cont.nverts < 3) + continue; + + for (int j = 0, k = cont.nverts-1; j < cont.nverts; k=j++) + { + const unsigned char* va = &cont.verts[k*4]; + const unsigned char* vb = &cont.verts[j*4]; + const unsigned char dir = va[3] & 0xf; + if (dir == 0xf) + continue; + + if (dir == 0 || dir == 2) + { + // Find matching vertical edge + const unsigned short x = (unsigned short)va[0]; + unsigned short zmin = (unsigned short)va[2]; + unsigned short zmax = (unsigned short)vb[2]; + if (zmin > zmax) + dtSwap(zmin, zmax); + + for (int m = 0; m < edgeCount; ++m) + { + rcEdge& e = edges[m]; + // Skip connected edges. + if (e.poly[0] != e.poly[1]) + continue; + const unsigned short* eva = &verts[e.vert[0]*3]; + const unsigned short* evb = &verts[e.vert[1]*3]; + if (eva[0] == x && evb[0] == x) + { + unsigned short ezmin = eva[2]; + unsigned short ezmax = evb[2]; + if (ezmin > ezmax) + dtSwap(ezmin, ezmax); + if (overlapRangeExl(zmin,zmax, ezmin, ezmax)) + { + // Reuse the other polyedge to store dir. + e.polyEdge[1] = dir; + } + } + } + } + else + { + // Find matching vertical edge + const unsigned short z = (unsigned short)va[2]; + unsigned short xmin = (unsigned short)va[0]; + unsigned short xmax = (unsigned short)vb[0]; + if (xmin > xmax) + dtSwap(xmin, xmax); + for (int m = 0; m < edgeCount; ++m) + { + rcEdge& e = edges[m]; + // Skip connected edges. + if (e.poly[0] != e.poly[1]) + continue; + const unsigned short* eva = &verts[e.vert[0]*3]; + const unsigned short* evb = &verts[e.vert[1]*3]; + if (eva[2] == z && evb[2] == z) + { + unsigned short exmin = eva[0]; + unsigned short exmax = evb[0]; + if (exmin > exmax) + dtSwap(exmin, exmax); + if (overlapRangeExl(xmin,xmax, exmin, exmax)) + { + // Reuse the other polyedge to store dir. + e.polyEdge[1] = dir; + } + } + } + } + } + } + + + // Store adjacency + for (int i = 0; i < edgeCount; ++i) + { + const rcEdge& e = edges[i]; + if (e.poly[0] != e.poly[1]) + { + unsigned short* p0 = &polys[e.poly[0]*MAX_VERTS_PER_POLY*2]; + unsigned short* p1 = &polys[e.poly[1]*MAX_VERTS_PER_POLY*2]; + p0[MAX_VERTS_PER_POLY + e.polyEdge[0]] = e.poly[1]; + p1[MAX_VERTS_PER_POLY + e.polyEdge[1]] = e.poly[0]; + } + else if (e.polyEdge[1] != 0xff) + { + unsigned short* p0 = &polys[e.poly[0]*MAX_VERTS_PER_POLY*2]; + p0[MAX_VERTS_PER_POLY + e.polyEdge[0]] = 0x8000 | (unsigned short)e.polyEdge[1]; + } + + } + + return true; +} + + +// Last time I checked the if version got compiled using cmov, which was a lot faster than module (with idiv). +inline int prev(int i, int n) { return i-1 >= 0 ? i-1 : n-1; } +inline int next(int i, int n) { return i+1 < n ? i+1 : 0; } + +inline int area2(const unsigned char* a, const unsigned char* b, const unsigned char* c) +{ + return ((int)b[0] - (int)a[0]) * ((int)c[2] - (int)a[2]) - ((int)c[0] - (int)a[0]) * ((int)b[2] - (int)a[2]); +} + +// Exclusive or: true iff exactly one argument is true. +// The arguments are negated to ensure that they are 0/1 +// values. Then the bitwise Xor operator may apply. +// (This idea is due to Michael Baldwin.) +inline bool xorb(bool x, bool y) +{ + return !x ^ !y; +} + +// Returns true iff c is strictly to the left of the directed +// line through a to b. +inline bool left(const unsigned char* a, const unsigned char* b, const unsigned char* c) +{ + return area2(a, b, c) < 0; +} + +inline bool leftOn(const unsigned char* a, const unsigned char* b, const unsigned char* c) +{ + return area2(a, b, c) <= 0; +} + +inline bool collinear(const unsigned char* a, const unsigned char* b, const unsigned char* c) +{ + return area2(a, b, c) == 0; +} + +// Returns true iff ab properly intersects cd: they share +// a point interior to both segments. The properness of the +// intersection is ensured by using strict leftness. +static bool intersectProp(const unsigned char* a, const unsigned char* b, + const unsigned char* c, const unsigned char* d) +{ + // Eliminate improper cases. + if (collinear(a,b,c) || collinear(a,b,d) || + collinear(c,d,a) || collinear(c,d,b)) + return false; + + return xorb(left(a,b,c), left(a,b,d)) && xorb(left(c,d,a), left(c,d,b)); +} + +// Returns T iff (a,b,c) are collinear and point c lies +// on the closed segement ab. +static bool between(const unsigned char* a, const unsigned char* b, const unsigned char* c) +{ + if (!collinear(a, b, c)) + return false; + // If ab not vertical, check betweenness on x; else on y. + if (a[0] != b[0]) + return ((a[0] <= c[0]) && (c[0] <= b[0])) || ((a[0] >= c[0]) && (c[0] >= b[0])); + else + return ((a[2] <= c[2]) && (c[2] <= b[2])) || ((a[2] >= c[2]) && (c[2] >= b[2])); +} + +// Returns true iff segments ab and cd intersect, properly or improperly. +static bool intersect(const unsigned char* a, const unsigned char* b, + const unsigned char* c, const unsigned char* d) +{ + if (intersectProp(a, b, c, d)) + return true; + else if (between(a, b, c) || between(a, b, d) || + between(c, d, a) || between(c, d, b)) + return true; + else + return false; +} + +static bool vequal(const unsigned char* a, const unsigned char* b) +{ + return a[0] == b[0] && a[2] == b[2]; +} + +// Returns T iff (v_i, v_j) is a proper internal *or* external +// diagonal of P, *ignoring edges incident to v_i and v_j*. +static bool diagonalie(int i, int j, int n, const unsigned char* verts, const unsigned short* indices) +{ + const unsigned char* d0 = &verts[(indices[i] & 0x7fff) * 4]; + const unsigned char* d1 = &verts[(indices[j] & 0x7fff) * 4]; + + // For each edge (k,k+1) of P + for (int k = 0; k < n; k++) + { + int k1 = next(k, n); + // Skip edges incident to i or j + if (!((k == i) || (k1 == i) || (k == j) || (k1 == j))) + { + const unsigned char* p0 = &verts[(indices[k] & 0x7fff) * 4]; + const unsigned char* p1 = &verts[(indices[k1] & 0x7fff) * 4]; + + if (vequal(d0, p0) || vequal(d1, p0) || vequal(d0, p1) || vequal(d1, p1)) + continue; + + if (intersect(d0, d1, p0, p1)) + return false; + } + } + return true; +} + +// Returns true iff the diagonal (i,j) is strictly internal to the +// polygon P in the neighborhood of the i endpoint. +static bool inCone(int i, int j, int n, const unsigned char* verts, const unsigned short* indices) +{ + const unsigned char* pi = &verts[(indices[i] & 0x7fff) * 4]; + const unsigned char* pj = &verts[(indices[j] & 0x7fff) * 4]; + const unsigned char* pi1 = &verts[(indices[next(i, n)] & 0x7fff) * 4]; + const unsigned char* pin1 = &verts[(indices[prev(i, n)] & 0x7fff) * 4]; + + // If P[i] is a convex vertex [ i+1 left or on (i-1,i) ]. + if (leftOn(pin1, pi, pi1)) + return left(pi, pj, pin1) && left(pj, pi, pi1); + // Assume (i-1,i,i+1) not collinear. + // else P[i] is reflex. + return !(leftOn(pi, pj, pi1) && leftOn(pj, pi, pin1)); +} + +// Returns T iff (v_i, v_j) is a proper internal +// diagonal of P. +static bool diagonal(int i, int j, int n, const unsigned char* verts, const unsigned short* indices) +{ + return inCone(i, j, n, verts, indices) && diagonalie(i, j, n, verts, indices); +} + +static int triangulate(int n, const unsigned char* verts, unsigned short* indices, unsigned short* tris) +{ + int ntris = 0; + unsigned short* dst = tris; + + // The last bit of the index is used to indicate if the vertex can be removed. + for (int i = 0; i < n; i++) + { + int i1 = next(i, n); + int i2 = next(i1, n); + if (diagonal(i, i2, n, verts, indices)) + indices[i1] |= 0x8000; + } + + while (n > 3) + { + int minLen = -1; + int mini = -1; + for (int i = 0; i < n; i++) + { + int i1 = next(i, n); + if (indices[i1] & 0x8000) + { + const unsigned char* p0 = &verts[(indices[i] & 0x7fff) * 4]; + const unsigned char* p2 = &verts[(indices[next(i1, n)] & 0x7fff) * 4]; + + const int dx = (int)p2[0] - (int)p0[0]; + const int dz = (int)p2[2] - (int)p0[2]; + const int len = dx*dx + dz*dz; + if (minLen < 0 || len < minLen) + { + minLen = len; + mini = i; + } + } + } + + if (mini == -1) + { + // Should not happen. + /* printf("mini == -1 ntris=%d n=%d\n", ntris, n); + for (int i = 0; i < n; i++) + { + printf("%d ", indices[i] & 0x0fffffff); + } + printf("\n");*/ + return -ntris; + } + + int i = mini; + int i1 = next(i, n); + int i2 = next(i1, n); + + *dst++ = indices[i] & 0x7fff; + *dst++ = indices[i1] & 0x7fff; + *dst++ = indices[i2] & 0x7fff; + ntris++; + + // Removes P[i1] by copying P[i+1]...P[n-1] left one index. + n--; + for (int k = i1; k < n; k++) + indices[k] = indices[k+1]; + + if (i1 >= n) i1 = 0; + i = prev(i1,n); + // Update diagonal flags. + if (diagonal(prev(i, n), i1, n, verts, indices)) + indices[i] |= 0x8000; + else + indices[i] &= 0x7fff; + + if (diagonal(i, next(i1, n), n, verts, indices)) + indices[i1] |= 0x8000; + else + indices[i1] &= 0x7fff; + } + + // Append the remaining triangle. + *dst++ = indices[0] & 0x7fff; + *dst++ = indices[1] & 0x7fff; + *dst++ = indices[2] & 0x7fff; + ntris++; + + return ntris; +} + + +static int countPolyVerts(const unsigned short* p) +{ + for (int i = 0; i < MAX_VERTS_PER_POLY; ++i) + if (p[i] == DT_TILECACHE_NULL_IDX) + return i; + return MAX_VERTS_PER_POLY; +} + +inline bool uleft(const unsigned short* a, const unsigned short* b, const unsigned short* c) +{ + return ((int)b[0] - (int)a[0]) * ((int)c[2] - (int)a[2]) - + ((int)c[0] - (int)a[0]) * ((int)b[2] - (int)a[2]) < 0; +} + +static int getPolyMergeValue(unsigned short* pa, unsigned short* pb, + const unsigned short* verts, int& ea, int& eb) +{ + const int na = countPolyVerts(pa); + const int nb = countPolyVerts(pb); + + // If the merged polygon would be too big, do not merge. + if (na+nb-2 > MAX_VERTS_PER_POLY) + return -1; + + // Check if the polygons share an edge. + ea = -1; + eb = -1; + + for (int i = 0; i < na; ++i) + { + unsigned short va0 = pa[i]; + unsigned short va1 = pa[(i+1) % na]; + if (va0 > va1) + dtSwap(va0, va1); + for (int j = 0; j < nb; ++j) + { + unsigned short vb0 = pb[j]; + unsigned short vb1 = pb[(j+1) % nb]; + if (vb0 > vb1) + dtSwap(vb0, vb1); + if (va0 == vb0 && va1 == vb1) + { + ea = i; + eb = j; + break; + } + } + } + + // No common edge, cannot merge. + if (ea == -1 || eb == -1) + return -1; + + // Check to see if the merged polygon would be convex. + unsigned short va, vb, vc; + + va = pa[(ea+na-1) % na]; + vb = pa[ea]; + vc = pb[(eb+2) % nb]; + if (!uleft(&verts[va*3], &verts[vb*3], &verts[vc*3])) + return -1; + + va = pb[(eb+nb-1) % nb]; + vb = pb[eb]; + vc = pa[(ea+2) % na]; + if (!uleft(&verts[va*3], &verts[vb*3], &verts[vc*3])) + return -1; + + va = pa[ea]; + vb = pa[(ea+1)%na]; + + int dx = (int)verts[va*3+0] - (int)verts[vb*3+0]; + int dy = (int)verts[va*3+2] - (int)verts[vb*3+2]; + + return dx*dx + dy*dy; +} + +static void mergePolys(unsigned short* pa, unsigned short* pb, int ea, int eb) +{ + unsigned short tmp[MAX_VERTS_PER_POLY*2]; + + const int na = countPolyVerts(pa); + const int nb = countPolyVerts(pb); + + // Merge polygons. + memset(tmp, 0xff, sizeof(unsigned short)*MAX_VERTS_PER_POLY*2); + int n = 0; + // Add pa + for (int i = 0; i < na-1; ++i) + tmp[n++] = pa[(ea+1+i) % na]; + // Add pb + for (int i = 0; i < nb-1; ++i) + tmp[n++] = pb[(eb+1+i) % nb]; + + memcpy(pa, tmp, sizeof(unsigned short)*MAX_VERTS_PER_POLY); +} + + +static void pushFront(unsigned short v, unsigned short* arr, int& an) +{ + an++; + for (int i = an-1; i > 0; --i) + arr[i] = arr[i-1]; + arr[0] = v; +} + +static void pushBack(unsigned short v, unsigned short* arr, int& an) +{ + arr[an] = v; + an++; +} + +static bool canRemoveVertex(dtTileCachePolyMesh& mesh, const unsigned short rem) +{ + // Count number of polygons to remove. + int numRemovedVerts = 0; + int numTouchedVerts = 0; + int numRemainingEdges = 0; + for (int i = 0; i < mesh.npolys; ++i) + { + unsigned short* p = &mesh.polys[i*MAX_VERTS_PER_POLY*2]; + const int nv = countPolyVerts(p); + int numRemoved = 0; + int numVerts = 0; + for (int j = 0; j < nv; ++j) + { + if (p[j] == rem) + { + numTouchedVerts++; + numRemoved++; + } + numVerts++; + } + if (numRemoved) + { + numRemovedVerts += numRemoved; + numRemainingEdges += numVerts-(numRemoved+1); + } + } + + // There would be too few edges remaining to create a polygon. + // This can happen for example when a tip of a triangle is marked + // as deletion, but there are no other polys that share the vertex. + // In this case, the vertex should not be removed. + if (numRemainingEdges <= 2) + return false; + + // Check that there is enough memory for the test. + const int maxEdges = numTouchedVerts*2; + if (maxEdges > MAX_REM_EDGES) + return false; + + // Find edges which share the removed vertex. + unsigned short edges[MAX_REM_EDGES]; + int nedges = 0; + + for (int i = 0; i < mesh.npolys; ++i) + { + unsigned short* p = &mesh.polys[i*MAX_VERTS_PER_POLY*2]; + const int nv = countPolyVerts(p); + + // Collect edges which touches the removed vertex. + for (int j = 0, k = nv-1; j < nv; k = j++) + { + if (p[j] == rem || p[k] == rem) + { + // Arrange edge so that a=rem. + int a = p[j], b = p[k]; + if (b == rem) + dtSwap(a,b); + + // Check if the edge exists + bool exists = false; + for (int m = 0; m < nedges; ++m) + { + unsigned short* e = &edges[m*3]; + if (e[1] == b) + { + // Exists, increment vertex share count. + e[2]++; + exists = true; + } + } + // Add new edge. + if (!exists) + { + unsigned short* e = &edges[nedges*3]; + e[0] = (unsigned short)a; + e[1] = (unsigned short)b; + e[2] = 1; + nedges++; + } + } + } + } + + // There should be no more than 2 open edges. + // This catches the case that two non-adjacent polygons + // share the removed vertex. In that case, do not remove the vertex. + int numOpenEdges = 0; + for (int i = 0; i < nedges; ++i) + { + if (edges[i*3+2] < 2) + numOpenEdges++; + } + if (numOpenEdges > 2) + return false; + + return true; +} + +static dtStatus removeVertex(dtTileCachePolyMesh& mesh, const unsigned short rem, const int maxTris) +{ + // Count number of polygons to remove. + int numRemovedVerts = 0; + for (int i = 0; i < mesh.npolys; ++i) + { + unsigned short* p = &mesh.polys[i*MAX_VERTS_PER_POLY*2]; + const int nv = countPolyVerts(p); + for (int j = 0; j < nv; ++j) + { + if (p[j] == rem) + numRemovedVerts++; + } + } + + int nedges = 0; + unsigned short edges[MAX_REM_EDGES*3]; + int nhole = 0; + unsigned short hole[MAX_REM_EDGES]; + int nharea = 0; + unsigned short harea[MAX_REM_EDGES]; + + for (int i = 0; i < mesh.npolys; ++i) + { + unsigned short* p = &mesh.polys[i*MAX_VERTS_PER_POLY*2]; + const int nv = countPolyVerts(p); + bool hasRem = false; + for (int j = 0; j < nv; ++j) + if (p[j] == rem) hasRem = true; + if (hasRem) + { + // Collect edges which does not touch the removed vertex. + for (int j = 0, k = nv-1; j < nv; k = j++) + { + if (p[j] != rem && p[k] != rem) + { + if (nedges >= MAX_REM_EDGES) + return DT_FAILURE | DT_BUFFER_TOO_SMALL; + unsigned short* e = &edges[nedges*3]; + e[0] = p[k]; + e[1] = p[j]; + e[2] = mesh.areas[i]; + nedges++; + } + } + // Remove the polygon. + unsigned short* p2 = &mesh.polys[(mesh.npolys-1)*MAX_VERTS_PER_POLY*2]; + memcpy(p,p2,sizeof(unsigned short)*MAX_VERTS_PER_POLY); + memset(p+MAX_VERTS_PER_POLY,0xff,sizeof(unsigned short)*MAX_VERTS_PER_POLY); + mesh.areas[i] = mesh.areas[mesh.npolys-1]; + mesh.npolys--; + --i; + } + } + + // Remove vertex. + for (int i = (int)rem; i < mesh.nverts; ++i) + { + mesh.verts[i*3+0] = mesh.verts[(i+1)*3+0]; + mesh.verts[i*3+1] = mesh.verts[(i+1)*3+1]; + mesh.verts[i*3+2] = mesh.verts[(i+1)*3+2]; + } + mesh.nverts--; + + // Adjust indices to match the removed vertex layout. + for (int i = 0; i < mesh.npolys; ++i) + { + unsigned short* p = &mesh.polys[i*MAX_VERTS_PER_POLY*2]; + const int nv = countPolyVerts(p); + for (int j = 0; j < nv; ++j) + if (p[j] > rem) p[j]--; + } + for (int i = 0; i < nedges; ++i) + { + if (edges[i*3+0] > rem) edges[i*3+0]--; + if (edges[i*3+1] > rem) edges[i*3+1]--; + } + + if (nedges == 0) + return DT_SUCCESS; + + // Start with one vertex, keep appending connected + // segments to the start and end of the hole. + pushBack(edges[0], hole, nhole); + pushBack(edges[2], harea, nharea); + + while (nedges) + { + bool match = false; + + for (int i = 0; i < nedges; ++i) + { + const unsigned short ea = edges[i*3+0]; + const unsigned short eb = edges[i*3+1]; + const unsigned short a = edges[i*3+2]; + bool add = false; + if (hole[0] == eb) + { + // The segment matches the beginning of the hole boundary. + if (nhole >= MAX_REM_EDGES) + return DT_FAILURE | DT_BUFFER_TOO_SMALL; + pushFront(ea, hole, nhole); + pushFront(a, harea, nharea); + add = true; + } + else if (hole[nhole-1] == ea) + { + // The segment matches the end of the hole boundary. + if (nhole >= MAX_REM_EDGES) + return DT_FAILURE | DT_BUFFER_TOO_SMALL; + pushBack(eb, hole, nhole); + pushBack(a, harea, nharea); + add = true; + } + if (add) + { + // The edge segment was added, remove it. + edges[i*3+0] = edges[(nedges-1)*3+0]; + edges[i*3+1] = edges[(nedges-1)*3+1]; + edges[i*3+2] = edges[(nedges-1)*3+2]; + --nedges; + match = true; + --i; + } + } + + if (!match) + break; + } + + + unsigned short tris[MAX_REM_EDGES*3]; + unsigned char tverts[MAX_REM_EDGES*3]; + unsigned short tpoly[MAX_REM_EDGES*3]; + + // Generate temp vertex array for triangulation. + for (int i = 0; i < nhole; ++i) + { + const unsigned short pi = hole[i]; + tverts[i*4+0] = (unsigned char)mesh.verts[pi*3+0]; + tverts[i*4+1] = (unsigned char)mesh.verts[pi*3+1]; + tverts[i*4+2] = (unsigned char)mesh.verts[pi*3+2]; + tverts[i*4+3] = 0; + tpoly[i] = (unsigned short)i; + } + + // Triangulate the hole. + int ntris = triangulate(nhole, tverts, tpoly, tris); + if (ntris < 0) + { + // TODO: issue warning! + ntris = -ntris; + } + + if (ntris > MAX_REM_EDGES) + return DT_FAILURE | DT_BUFFER_TOO_SMALL; + + unsigned short polys[MAX_REM_EDGES*MAX_VERTS_PER_POLY]; + unsigned char pareas[MAX_REM_EDGES]; + + // Build initial polygons. + int npolys = 0; + memset(polys, 0xff, ntris*MAX_VERTS_PER_POLY*sizeof(unsigned short)); + for (int j = 0; j < ntris; ++j) + { + unsigned short* t = &tris[j*3]; + if (t[0] != t[1] && t[0] != t[2] && t[1] != t[2]) + { + polys[npolys*MAX_VERTS_PER_POLY+0] = hole[t[0]]; + polys[npolys*MAX_VERTS_PER_POLY+1] = hole[t[1]]; + polys[npolys*MAX_VERTS_PER_POLY+2] = hole[t[2]]; + pareas[npolys] = (unsigned char)harea[t[0]]; + npolys++; + } + } + if (!npolys) + return DT_SUCCESS; + + // Merge polygons. + int maxVertsPerPoly = MAX_VERTS_PER_POLY; + if (maxVertsPerPoly > 3) + { + for (;;) + { + // Find best polygons to merge. + int bestMergeVal = 0; + int bestPa = 0, bestPb = 0, bestEa = 0, bestEb = 0; + + for (int j = 0; j < npolys-1; ++j) + { + unsigned short* pj = &polys[j*MAX_VERTS_PER_POLY]; + for (int k = j+1; k < npolys; ++k) + { + unsigned short* pk = &polys[k*MAX_VERTS_PER_POLY]; + int ea, eb; + int v = getPolyMergeValue(pj, pk, mesh.verts, ea, eb); + if (v > bestMergeVal) + { + bestMergeVal = v; + bestPa = j; + bestPb = k; + bestEa = ea; + bestEb = eb; + } + } + } + + if (bestMergeVal > 0) + { + // Found best, merge. + unsigned short* pa = &polys[bestPa*MAX_VERTS_PER_POLY]; + unsigned short* pb = &polys[bestPb*MAX_VERTS_PER_POLY]; + mergePolys(pa, pb, bestEa, bestEb); + memcpy(pb, &polys[(npolys-1)*MAX_VERTS_PER_POLY], sizeof(unsigned short)*MAX_VERTS_PER_POLY); + pareas[bestPb] = pareas[npolys-1]; + npolys--; + } + else + { + // Could not merge any polygons, stop. + break; + } + } + } + + // Store polygons. + for (int i = 0; i < npolys; ++i) + { + if (mesh.npolys >= maxTris) break; + unsigned short* p = &mesh.polys[mesh.npolys*MAX_VERTS_PER_POLY*2]; + memset(p,0xff,sizeof(unsigned short)*MAX_VERTS_PER_POLY*2); + for (int j = 0; j < MAX_VERTS_PER_POLY; ++j) + p[j] = polys[i*MAX_VERTS_PER_POLY+j]; + mesh.areas[mesh.npolys] = pareas[i]; + mesh.npolys++; + if (mesh.npolys > maxTris) + return DT_FAILURE | DT_BUFFER_TOO_SMALL; + } + + return DT_SUCCESS; +} + + +dtStatus dtBuildTileCachePolyMesh(dtTileCacheAlloc* alloc, + dtTileCacheContourSet& lcset, + dtTileCachePolyMesh& mesh) +{ + dtAssert(alloc); + + int maxVertices = 0; + int maxTris = 0; + int maxVertsPerCont = 0; + for (int i = 0; i < lcset.nconts; ++i) + { + // Skip null contours. + if (lcset.conts[i].nverts < 3) continue; + maxVertices += lcset.conts[i].nverts; + maxTris += lcset.conts[i].nverts - 2; + maxVertsPerCont = dtMax(maxVertsPerCont, lcset.conts[i].nverts); + } + + // TODO: warn about too many vertices? + + mesh.nvp = MAX_VERTS_PER_POLY; + + dtFixedArray vflags(alloc, maxVertices); + if (!vflags) + return DT_FAILURE | DT_OUT_OF_MEMORY; + memset(vflags, 0, maxVertices); + + mesh.verts = (unsigned short*)alloc->alloc(sizeof(unsigned short)*maxVertices*3); + if (!mesh.verts) + return DT_FAILURE | DT_OUT_OF_MEMORY; + + mesh.polys = (unsigned short*)alloc->alloc(sizeof(unsigned short)*maxTris*MAX_VERTS_PER_POLY*2); + if (!mesh.polys) + return DT_FAILURE | DT_OUT_OF_MEMORY; + + mesh.areas = (unsigned char*)alloc->alloc(sizeof(unsigned char)*maxTris); + if (!mesh.areas) + return DT_FAILURE | DT_OUT_OF_MEMORY; + + mesh.flags = (unsigned short*)alloc->alloc(sizeof(unsigned short)*maxTris); + if (!mesh.flags) + return DT_FAILURE | DT_OUT_OF_MEMORY; + + // Just allocate and clean the mesh flags array. The user is resposible for filling it. + memset(mesh.flags, 0, sizeof(unsigned short) * maxTris); + + mesh.nverts = 0; + mesh.npolys = 0; + + memset(mesh.verts, 0, sizeof(unsigned short)*maxVertices*3); + memset(mesh.polys, 0xff, sizeof(unsigned short)*maxTris*MAX_VERTS_PER_POLY*2); + memset(mesh.areas, 0, sizeof(unsigned char)*maxTris); + + unsigned short firstVert[VERTEX_BUCKET_COUNT2]; + for (int i = 0; i < VERTEX_BUCKET_COUNT2; ++i) + firstVert[i] = DT_TILECACHE_NULL_IDX; + + dtFixedArray nextVert(alloc, maxVertices); + if (!nextVert) + return DT_FAILURE | DT_OUT_OF_MEMORY; + memset(nextVert, 0, sizeof(unsigned short)*maxVertices); + + dtFixedArray indices(alloc, maxVertsPerCont); + if (!indices) + return DT_FAILURE | DT_OUT_OF_MEMORY; + + dtFixedArray tris(alloc, maxVertsPerCont*3); + if (!tris) + return DT_FAILURE | DT_OUT_OF_MEMORY; + + dtFixedArray polys(alloc, maxVertsPerCont*MAX_VERTS_PER_POLY); + if (!polys) + return DT_FAILURE | DT_OUT_OF_MEMORY; + + for (int i = 0; i < lcset.nconts; ++i) + { + dtTileCacheContour& cont = lcset.conts[i]; + + // Skip null contours. + if (cont.nverts < 3) + continue; + + // Triangulate contour + for (int j = 0; j < cont.nverts; ++j) + indices[j] = (unsigned short)j; + + int ntris = triangulate(cont.nverts, cont.verts, &indices[0], &tris[0]); + if (ntris <= 0) + { + // TODO: issue warning! + ntris = -ntris; + } + + // Add and merge vertices. + for (int j = 0; j < cont.nverts; ++j) + { + const unsigned char* v = &cont.verts[j*4]; + indices[j] = addVertex((unsigned short)v[0], (unsigned short)v[1], (unsigned short)v[2], + mesh.verts, firstVert, nextVert, mesh.nverts); + if (v[3] & 0x80) + { + // This vertex should be removed. + vflags[indices[j]] = 1; + } + } + + // Build initial polygons. + int npolys = 0; + memset(polys, 0xff, sizeof(unsigned short) * maxVertsPerCont * MAX_VERTS_PER_POLY); + for (int j = 0; j < ntris; ++j) + { + const unsigned short* t = &tris[j*3]; + if (t[0] != t[1] && t[0] != t[2] && t[1] != t[2]) + { + polys[npolys*MAX_VERTS_PER_POLY+0] = indices[t[0]]; + polys[npolys*MAX_VERTS_PER_POLY+1] = indices[t[1]]; + polys[npolys*MAX_VERTS_PER_POLY+2] = indices[t[2]]; + npolys++; + } + } + if (!npolys) + continue; + + // Merge polygons. + int maxVertsPerPoly =MAX_VERTS_PER_POLY ; + if (maxVertsPerPoly > 3) + { + for(;;) + { + // Find best polygons to merge. + int bestMergeVal = 0; + int bestPa = 0, bestPb = 0, bestEa = 0, bestEb = 0; + + for (int j = 0; j < npolys-1; ++j) + { + unsigned short* pj = &polys[j*MAX_VERTS_PER_POLY]; + for (int k = j+1; k < npolys; ++k) + { + unsigned short* pk = &polys[k*MAX_VERTS_PER_POLY]; + int ea, eb; + int v = getPolyMergeValue(pj, pk, mesh.verts, ea, eb); + if (v > bestMergeVal) + { + bestMergeVal = v; + bestPa = j; + bestPb = k; + bestEa = ea; + bestEb = eb; + } + } + } + + if (bestMergeVal > 0) + { + // Found best, merge. + unsigned short* pa = &polys[bestPa*MAX_VERTS_PER_POLY]; + unsigned short* pb = &polys[bestPb*MAX_VERTS_PER_POLY]; + mergePolys(pa, pb, bestEa, bestEb); + memcpy(pb, &polys[(npolys-1)*MAX_VERTS_PER_POLY], sizeof(unsigned short)*MAX_VERTS_PER_POLY); + npolys--; + } + else + { + // Could not merge any polygons, stop. + break; + } + } + } + + // Store polygons. + for (int j = 0; j < npolys; ++j) + { + unsigned short* p = &mesh.polys[mesh.npolys*MAX_VERTS_PER_POLY*2]; + unsigned short* q = &polys[j*MAX_VERTS_PER_POLY]; + for (int k = 0; k < MAX_VERTS_PER_POLY; ++k) + p[k] = q[k]; + mesh.areas[mesh.npolys] = cont.area; + mesh.npolys++; + if (mesh.npolys > maxTris) + return DT_FAILURE | DT_BUFFER_TOO_SMALL; + } + } + + + // Remove edge vertices. + for (int i = 0; i < mesh.nverts; ++i) + { + if (vflags[i]) + { + if (!canRemoveVertex(mesh, (unsigned short)i)) + continue; + dtStatus status = removeVertex(mesh, (unsigned short)i, maxTris); + if (dtStatusFailed(status)) + return status; + // Remove vertex + // Note: mesh.nverts is already decremented inside removeVertex()! + for (int j = i; j < mesh.nverts; ++j) + vflags[j] = vflags[j+1]; + --i; + } + } + + // Calculate adjacency. + if (!buildMeshAdjacency(alloc, mesh.polys, mesh.npolys, mesh.verts, mesh.nverts, lcset)) + return DT_FAILURE | DT_OUT_OF_MEMORY; + + return DT_SUCCESS; +} + +dtStatus dtMarkCylinderArea(dtTileCacheLayer& layer, const float* orig, const float cs, const float ch, + const float* pos, const float radius, const float height, const unsigned char areaId) +{ + float bmin[3], bmax[3]; + bmin[0] = pos[0] - radius; + bmin[1] = pos[1]; + bmin[2] = pos[2] - radius; + bmax[0] = pos[0] + radius; + bmax[1] = pos[1] + height; + bmax[2] = pos[2] + radius; + const float r2 = dtSqr(radius/cs + 0.5f); + + const int w = (int)layer.header->width; + const int h = (int)layer.header->height; + const float ics = 1.0f/cs; + const float ich = 1.0f/ch; + + const float px = (pos[0]-orig[0])*ics; + const float pz = (pos[2]-orig[2])*ics; + + int minx = (int)dtMathFloorf((bmin[0]-orig[0])*ics); + int miny = (int)dtMathFloorf((bmin[1]-orig[1])*ich); + int minz = (int)dtMathFloorf((bmin[2]-orig[2])*ics); + int maxx = (int)dtMathFloorf((bmax[0]-orig[0])*ics); + int maxy = (int)dtMathFloorf((bmax[1]-orig[1])*ich); + int maxz = (int)dtMathFloorf((bmax[2]-orig[2])*ics); + + if (maxx < 0) return DT_SUCCESS; + if (minx >= w) return DT_SUCCESS; + if (maxz < 0) return DT_SUCCESS; + if (minz >= h) return DT_SUCCESS; + + if (minx < 0) minx = 0; + if (maxx >= w) maxx = w-1; + if (minz < 0) minz = 0; + if (maxz >= h) maxz = h-1; + + for (int z = minz; z <= maxz; ++z) + { + for (int x = minx; x <= maxx; ++x) + { + const float dx = (float)(x+0.5f) - px; + const float dz = (float)(z+0.5f) - pz; + if (dx*dx + dz*dz > r2) + continue; + const int y = layer.heights[x+z*w]; + if (y < miny || y > maxy) + continue; + layer.areas[x+z*w] = areaId; + } + } + + return DT_SUCCESS; +} + +dtStatus dtMarkBoxArea(dtTileCacheLayer& layer, const float* orig, const float cs, const float ch, + const float* bmin, const float* bmax, const unsigned char areaId) +{ + const int w = (int)layer.header->width; + const int h = (int)layer.header->height; + const float ics = 1.0f/cs; + const float ich = 1.0f/ch; + + int minx = (int)floorf((bmin[0]-orig[0])*ics); + int miny = (int)floorf((bmin[1]-orig[1])*ich); + int minz = (int)floorf((bmin[2]-orig[2])*ics); + int maxx = (int)floorf((bmax[0]-orig[0])*ics); + int maxy = (int)floorf((bmax[1]-orig[1])*ich); + int maxz = (int)floorf((bmax[2]-orig[2])*ics); + + if (maxx < 0) return DT_SUCCESS; + if (minx >= w) return DT_SUCCESS; + if (maxz < 0) return DT_SUCCESS; + if (minz >= h) return DT_SUCCESS; + + if (minx < 0) minx = 0; + if (maxx >= w) maxx = w-1; + if (minz < 0) minz = 0; + if (maxz >= h) maxz = h-1; + + for (int z = minz; z <= maxz; ++z) + { + for (int x = minx; x <= maxx; ++x) + { + const int y = layer.heights[x+z*w]; + if (y < miny || y > maxy) + continue; + layer.areas[x+z*w] = areaId; + } + } + + return DT_SUCCESS; +} + +dtStatus dtBuildTileCacheLayer(dtTileCacheCompressor* comp, + dtTileCacheLayerHeader* header, + const unsigned char* heights, + const unsigned char* areas, + const unsigned char* cons, + unsigned char** outData, int* outDataSize) +{ + const int headerSize = dtAlign4(sizeof(dtTileCacheLayerHeader)); + const int gridSize = (int)header->width * (int)header->height; + const int maxDataSize = headerSize + comp->maxCompressedSize(gridSize*3); + unsigned char* data = (unsigned char*)dtAlloc(maxDataSize, DT_ALLOC_PERM); + if (!data) + return DT_FAILURE | DT_OUT_OF_MEMORY; + memset(data, 0, maxDataSize); + + // Store header + memcpy(data, header, sizeof(dtTileCacheLayerHeader)); + + // Concatenate grid data for compression. + const int bufferSize = gridSize*3; + unsigned char* buffer = (unsigned char*)dtAlloc(bufferSize, DT_ALLOC_TEMP); + if (!buffer) + { + dtFree(data); + return DT_FAILURE | DT_OUT_OF_MEMORY; + } + + memcpy(buffer, heights, gridSize); + memcpy(buffer+gridSize, areas, gridSize); + memcpy(buffer+gridSize*2, cons, gridSize); + + // Compress + unsigned char* compressed = data + headerSize; + const int maxCompressedSize = maxDataSize - headerSize; + int compressedSize = 0; + dtStatus status = comp->compress(buffer, bufferSize, compressed, maxCompressedSize, &compressedSize); + if (dtStatusFailed(status)) + { + dtFree(buffer); + dtFree(data); + return status; + } + + *outData = data; + *outDataSize = headerSize + compressedSize; + + dtFree(buffer); + + return DT_SUCCESS; +} + +void dtFreeTileCacheLayer(dtTileCacheAlloc* alloc, dtTileCacheLayer* layer) +{ + dtAssert(alloc); + // The layer is allocated as one conitguous blob of data. + alloc->free(layer); +} + +dtStatus dtDecompressTileCacheLayer(dtTileCacheAlloc* alloc, dtTileCacheCompressor* comp, + unsigned char* compressed, const int compressedSize, + dtTileCacheLayer** layerOut) +{ + dtAssert(alloc); + dtAssert(comp); + + if (!layerOut) + return DT_FAILURE | DT_INVALID_PARAM; + if (!compressed) + return DT_FAILURE | DT_INVALID_PARAM; + + *layerOut = 0; + + dtTileCacheLayerHeader* compressedHeader = (dtTileCacheLayerHeader*)compressed; + if (compressedHeader->magic != DT_TILECACHE_MAGIC) + return DT_FAILURE | DT_WRONG_MAGIC; + if (compressedHeader->version != DT_TILECACHE_VERSION) + return DT_FAILURE | DT_WRONG_VERSION; + + const int layerSize = dtAlign4(sizeof(dtTileCacheLayer)); + const int headerSize = dtAlign4(sizeof(dtTileCacheLayerHeader)); + const int gridSize = (int)compressedHeader->width * (int)compressedHeader->height; + const int bufferSize = layerSize + headerSize + gridSize*4; + + unsigned char* buffer = (unsigned char*)alloc->alloc(bufferSize); + if (!buffer) + return DT_FAILURE | DT_OUT_OF_MEMORY; + memset(buffer, 0, bufferSize); + + dtTileCacheLayer* layer = (dtTileCacheLayer*)buffer; + dtTileCacheLayerHeader* header = (dtTileCacheLayerHeader*)(buffer + layerSize); + unsigned char* grids = buffer + layerSize + headerSize; + const int gridsSize = bufferSize - (layerSize + headerSize); + + // Copy header + memcpy(header, compressedHeader, headerSize); + // Decompress grid. + int size = 0; + dtStatus status = comp->decompress(compressed+headerSize, compressedSize-headerSize, + grids, gridsSize, &size); + if (dtStatusFailed(status)) + { + dtFree(buffer); + return status; + } + + layer->header = header; + layer->heights = grids; + layer->areas = grids + gridSize; + layer->cons = grids + gridSize*2; + layer->regs = grids + gridSize*3; + + *layerOut = layer; + + return DT_SUCCESS; +} + + + +bool dtTileCacheHeaderSwapEndian(unsigned char* data, const int dataSize) +{ + dtIgnoreUnused(dataSize); + dtTileCacheLayerHeader* header = (dtTileCacheLayerHeader*)data; + + int swappedMagic = DT_TILECACHE_MAGIC; + int swappedVersion = DT_TILECACHE_VERSION; + dtSwapEndian(&swappedMagic); + dtSwapEndian(&swappedVersion); + + if ((header->magic != DT_TILECACHE_MAGIC || header->version != DT_TILECACHE_VERSION) && + (header->magic != swappedMagic || header->version != swappedVersion)) + { + return false; + } + + dtSwapEndian(&header->magic); + dtSwapEndian(&header->version); + dtSwapEndian(&header->tx); + dtSwapEndian(&header->ty); + dtSwapEndian(&header->tlayer); + dtSwapEndian(&header->bmin[0]); + dtSwapEndian(&header->bmin[1]); + dtSwapEndian(&header->bmin[2]); + dtSwapEndian(&header->bmax[0]); + dtSwapEndian(&header->bmax[1]); + dtSwapEndian(&header->bmax[2]); + dtSwapEndian(&header->hmin); + dtSwapEndian(&header->hmax); + + // width, height, minx, maxx, miny, maxy are unsigned char, no need to swap. + + return true; +} + diff --git a/libs/recast/recast/include/Recast.h b/libs/recast/recast/include/Recast.h new file mode 100644 index 000000000..e85c0d2e2 --- /dev/null +++ b/libs/recast/recast/include/Recast.h @@ -0,0 +1,1200 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#ifndef RECAST_H +#define RECAST_H + +/// The value of PI used by Recast. +static const float RC_PI = 3.14159265f; + +/// Recast log categories. +/// @see rcContext +enum rcLogCategory +{ + RC_LOG_PROGRESS = 1, ///< A progress log entry. + RC_LOG_WARNING, ///< A warning log entry. + RC_LOG_ERROR, ///< An error log entry. +}; + +/// Recast performance timer categories. +/// @see rcContext +enum rcTimerLabel +{ + /// The user defined total time of the build. + RC_TIMER_TOTAL, + /// A user defined build time. + RC_TIMER_TEMP, + /// The time to rasterize the triangles. (See: #rcRasterizeTriangle) + RC_TIMER_RASTERIZE_TRIANGLES, + /// The time to build the compact heightfield. (See: #rcBuildCompactHeightfield) + RC_TIMER_BUILD_COMPACTHEIGHTFIELD, + /// The total time to build the contours. (See: #rcBuildContours) + RC_TIMER_BUILD_CONTOURS, + /// The time to trace the boundaries of the contours. (See: #rcBuildContours) + RC_TIMER_BUILD_CONTOURS_TRACE, + /// The time to simplify the contours. (See: #rcBuildContours) + RC_TIMER_BUILD_CONTOURS_SIMPLIFY, + /// The time to filter ledge spans. (See: #rcFilterLedgeSpans) + RC_TIMER_FILTER_BORDER, + /// The time to filter low height spans. (See: #rcFilterWalkableLowHeightSpans) + RC_TIMER_FILTER_WALKABLE, + /// The time to apply the median filter. (See: #rcMedianFilterWalkableArea) + RC_TIMER_MEDIAN_AREA, + /// The time to filter low obstacles. (See: #rcFilterLowHangingWalkableObstacles) + RC_TIMER_FILTER_LOW_OBSTACLES, + /// The time to build the polygon mesh. (See: #rcBuildPolyMesh) + RC_TIMER_BUILD_POLYMESH, + /// The time to merge polygon meshes. (See: #rcMergePolyMeshes) + RC_TIMER_MERGE_POLYMESH, + /// The time to erode the walkable area. (See: #rcErodeWalkableArea) + RC_TIMER_ERODE_AREA, + /// The time to mark a box area. (See: #rcMarkBoxArea) + RC_TIMER_MARK_BOX_AREA, + /// The time to mark a cylinder area. (See: #rcMarkCylinderArea) + RC_TIMER_MARK_CYLINDER_AREA, + /// The time to mark a convex polygon area. (See: #rcMarkConvexPolyArea) + RC_TIMER_MARK_CONVEXPOLY_AREA, + /// The total time to build the distance field. (See: #rcBuildDistanceField) + RC_TIMER_BUILD_DISTANCEFIELD, + /// The time to build the distances of the distance field. (See: #rcBuildDistanceField) + RC_TIMER_BUILD_DISTANCEFIELD_DIST, + /// The time to blur the distance field. (See: #rcBuildDistanceField) + RC_TIMER_BUILD_DISTANCEFIELD_BLUR, + /// The total time to build the regions. (See: #rcBuildRegions, #rcBuildRegionsMonotone) + RC_TIMER_BUILD_REGIONS, + /// The total time to apply the watershed algorithm. (See: #rcBuildRegions) + RC_TIMER_BUILD_REGIONS_WATERSHED, + /// The time to expand regions while applying the watershed algorithm. (See: #rcBuildRegions) + RC_TIMER_BUILD_REGIONS_EXPAND, + /// The time to flood regions while applying the watershed algorithm. (See: #rcBuildRegions) + RC_TIMER_BUILD_REGIONS_FLOOD, + /// The time to filter out small regions. (See: #rcBuildRegions, #rcBuildRegionsMonotone) + RC_TIMER_BUILD_REGIONS_FILTER, + /// The time to build heightfield layers. (See: #rcBuildHeightfieldLayers) + RC_TIMER_BUILD_LAYERS, + /// The time to build the polygon mesh detail. (See: #rcBuildPolyMeshDetail) + RC_TIMER_BUILD_POLYMESHDETAIL, + /// The time to merge polygon mesh details. (See: #rcMergePolyMeshDetails) + RC_TIMER_MERGE_POLYMESHDETAIL, + /// The maximum number of timers. (Used for iterating timers.) + RC_MAX_TIMERS +}; + +/// Provides an interface for optional logging and performance tracking of the Recast +/// build process. +/// @ingroup recast +class rcContext +{ +public: + + /// Contructor. + /// @param[in] state TRUE if the logging and performance timers should be enabled. [Default: true] + inline rcContext(bool state = true) : m_logEnabled(state), m_timerEnabled(state) {} + virtual ~rcContext() {} + + /// Enables or disables logging. + /// @param[in] state TRUE if logging should be enabled. + inline void enableLog(bool state) { m_logEnabled = state; } + + /// Clears all log entries. + inline void resetLog() { if (m_logEnabled) doResetLog(); } + + /// Logs a message. + /// @param[in] category The category of the message. + /// @param[in] format The message. + void log(const rcLogCategory category, const char* format, ...); + + /// Enables or disables the performance timers. + /// @param[in] state TRUE if timers should be enabled. + inline void enableTimer(bool state) { m_timerEnabled = state; } + + /// Clears all peformance timers. (Resets all to unused.) + inline void resetTimers() { if (m_timerEnabled) doResetTimers(); } + + /// Starts the specified performance timer. + /// @param label The category of the timer. + inline void startTimer(const rcTimerLabel label) { if (m_timerEnabled) doStartTimer(label); } + + /// Stops the specified performance timer. + /// @param label The category of the timer. + inline void stopTimer(const rcTimerLabel label) { if (m_timerEnabled) doStopTimer(label); } + + /// Returns the total accumulated time of the specified performance timer. + /// @param label The category of the timer. + /// @return The accumulated time of the timer, or -1 if timers are disabled or the timer has never been started. + inline int getAccumulatedTime(const rcTimerLabel label) const { return m_timerEnabled ? doGetAccumulatedTime(label) : -1; } + +protected: + + /// Clears all log entries. + virtual void doResetLog() {} + + /// Logs a message. + /// @param[in] category The category of the message. + /// @param[in] msg The formatted message. + /// @param[in] len The length of the formatted message. + virtual void doLog(const rcLogCategory /*category*/, const char* /*msg*/, const int /*len*/) {} + + /// Clears all timers. (Resets all to unused.) + virtual void doResetTimers() {} + + /// Starts the specified performance timer. + /// @param[in] label The category of timer. + virtual void doStartTimer(const rcTimerLabel /*label*/) {} + + /// Stops the specified performance timer. + /// @param[in] label The category of the timer. + virtual void doStopTimer(const rcTimerLabel /*label*/) {} + + /// Returns the total accumulated time of the specified performance timer. + /// @param[in] label The category of the timer. + /// @return The accumulated time of the timer, or -1 if timers are disabled or the timer has never been started. + virtual int doGetAccumulatedTime(const rcTimerLabel /*label*/) const { return -1; } + + /// True if logging is enabled. + bool m_logEnabled; + + /// True if the performance timers are enabled. + bool m_timerEnabled; +}; + +/// A helper to first start a timer and then stop it when this helper goes out of scope. +/// @see rcContext +class rcScopedTimer +{ +public: + /// Constructs an instance and starts the timer. + /// @param[in] ctx The context to use. + /// @param[in] label The category of the timer. + inline rcScopedTimer(rcContext* ctx, const rcTimerLabel label) : m_ctx(ctx), m_label(label) { m_ctx->startTimer(m_label); } + inline ~rcScopedTimer() { m_ctx->stopTimer(m_label); } + +private: + // Explicitly disabled copy constructor and copy assignment operator. + rcScopedTimer(const rcScopedTimer&); + rcScopedTimer& operator=(const rcScopedTimer&); + + rcContext* const m_ctx; + const rcTimerLabel m_label; +}; + +/// Specifies a configuration to use when performing Recast builds. +/// @ingroup recast +struct rcConfig +{ + /// The width of the field along the x-axis. [Limit: >= 0] [Units: vx] + int width; + + /// The height of the field along the z-axis. [Limit: >= 0] [Units: vx] + int height; + + /// The width/height size of tile's on the xz-plane. [Limit: >= 0] [Units: vx] + int tileSize; + + /// The size of the non-navigable border around the heightfield. [Limit: >=0] [Units: vx] + int borderSize; + + /// The xz-plane cell size to use for fields. [Limit: > 0] [Units: wu] + float cs; + + /// The y-axis cell size to use for fields. [Limit: > 0] [Units: wu] + float ch; + + /// The minimum bounds of the field's AABB. [(x, y, z)] [Units: wu] + float bmin[3]; + + /// The maximum bounds of the field's AABB. [(x, y, z)] [Units: wu] + float bmax[3]; + + /// The maximum slope that is considered walkable. [Limits: 0 <= value < 90] [Units: Degrees] + float walkableSlopeAngle; + + /// Minimum floor to 'ceiling' height that will still allow the floor area to + /// be considered walkable. [Limit: >= 3] [Units: vx] + int walkableHeight; + + /// Maximum ledge height that is considered to still be traversable. [Limit: >=0] [Units: vx] + int walkableClimb; + + /// The distance to erode/shrink the walkable area of the heightfield away from + /// obstructions. [Limit: >=0] [Units: vx] + int walkableRadius; + + /// The maximum allowed length for contour edges along the border of the mesh. [Limit: >=0] [Units: vx] + int maxEdgeLen; + + /// The maximum distance a simplfied contour's border edges should deviate + /// the original raw contour. [Limit: >=0] [Units: vx] + float maxSimplificationError; + + /// The minimum number of cells allowed to form isolated island areas. [Limit: >=0] [Units: vx] + int minRegionArea; + + /// Any regions with a span count smaller than this value will, if possible, + /// be merged with larger regions. [Limit: >=0] [Units: vx] + int mergeRegionArea; + + /// The maximum number of vertices allowed for polygons generated during the + /// contour to polygon conversion process. [Limit: >= 3] + int maxVertsPerPoly; + + /// Sets the sampling distance to use when generating the detail mesh. + /// (For height detail only.) [Limits: 0 or >= 0.9] [Units: wu] + float detailSampleDist; + + /// The maximum distance the detail mesh surface should deviate from heightfield + /// data. (For height detail only.) [Limit: >=0] [Units: wu] + float detailSampleMaxError; +}; + +/// Defines the number of bits allocated to rcSpan::smin and rcSpan::smax. +static const int RC_SPAN_HEIGHT_BITS = 13; +/// Defines the maximum value for rcSpan::smin and rcSpan::smax. +static const int RC_SPAN_MAX_HEIGHT = (1 << RC_SPAN_HEIGHT_BITS) - 1; + +/// The number of spans allocated per span spool. +/// @see rcSpanPool +static const int RC_SPANS_PER_POOL = 2048; + +/// Represents a span in a heightfield. +/// @see rcHeightfield +struct rcSpan +{ + unsigned int smin : RC_SPAN_HEIGHT_BITS; ///< The lower limit of the span. [Limit: < #smax] + unsigned int smax : RC_SPAN_HEIGHT_BITS; ///< The upper limit of the span. [Limit: <= #RC_SPAN_MAX_HEIGHT] + unsigned int area : 6; ///< The area id assigned to the span. + rcSpan* next; ///< The next span higher up in column. +}; + +/// A memory pool used for quick allocation of spans within a heightfield. +/// @see rcHeightfield +struct rcSpanPool +{ + rcSpanPool* next; ///< The next span pool. + rcSpan items[RC_SPANS_PER_POOL]; ///< Array of spans in the pool. +}; + +/// A dynamic heightfield representing obstructed space. +/// @ingroup recast +struct rcHeightfield +{ + rcHeightfield(); + ~rcHeightfield(); + + int width; ///< The width of the heightfield. (Along the x-axis in cell units.) + int height; ///< The height of the heightfield. (Along the z-axis in cell units.) + float bmin[3]; ///< The minimum bounds in world space. [(x, y, z)] + float bmax[3]; ///< The maximum bounds in world space. [(x, y, z)] + float cs; ///< The size of each cell. (On the xz-plane.) + float ch; ///< The height of each cell. (The minimum increment along the y-axis.) + rcSpan** spans; ///< Heightfield of spans (width*height). + rcSpanPool* pools; ///< Linked list of span pools. + rcSpan* freelist; ///< The next free span. + +private: + // Explicitly-disabled copy constructor and copy assignment operator. + rcHeightfield(const rcHeightfield&); + rcHeightfield& operator=(const rcHeightfield&); +}; + +/// Provides information on the content of a cell column in a compact heightfield. +struct rcCompactCell +{ + unsigned int index : 24; ///< Index to the first span in the column. + unsigned int count : 8; ///< Number of spans in the column. +}; + +/// Represents a span of unobstructed space within a compact heightfield. +struct rcCompactSpan +{ + unsigned short y; ///< The lower extent of the span. (Measured from the heightfield's base.) + unsigned short reg; ///< The id of the region the span belongs to. (Or zero if not in a region.) + unsigned int con : 24; ///< Packed neighbor connection data. + unsigned int h : 8; ///< The height of the span. (Measured from #y.) +}; + +/// A compact, static heightfield representing unobstructed space. +/// @ingroup recast +struct rcCompactHeightfield +{ + int width; ///< The width of the heightfield. (Along the x-axis in cell units.) + int height; ///< The height of the heightfield. (Along the z-axis in cell units.) + int spanCount; ///< The number of spans in the heightfield. + int walkableHeight; ///< The walkable height used during the build of the field. (See: rcConfig::walkableHeight) + int walkableClimb; ///< The walkable climb used during the build of the field. (See: rcConfig::walkableClimb) + int borderSize; ///< The AABB border size used during the build of the field. (See: rcConfig::borderSize) + unsigned short maxDistance; ///< The maximum distance value of any span within the field. + unsigned short maxRegions; ///< The maximum region id of any span within the field. + float bmin[3]; ///< The minimum bounds in world space. [(x, y, z)] + float bmax[3]; ///< The maximum bounds in world space. [(x, y, z)] + float cs; ///< The size of each cell. (On the xz-plane.) + float ch; ///< The height of each cell. (The minimum increment along the y-axis.) + rcCompactCell* cells; ///< Array of cells. [Size: #width*#height] + rcCompactSpan* spans; ///< Array of spans. [Size: #spanCount] + unsigned short* dist; ///< Array containing border distance data. [Size: #spanCount] + unsigned char* areas; ///< Array containing area id data. [Size: #spanCount] +}; + +/// Represents a heightfield layer within a layer set. +/// @see rcHeightfieldLayerSet +struct rcHeightfieldLayer +{ + float bmin[3]; ///< The minimum bounds in world space. [(x, y, z)] + float bmax[3]; ///< The maximum bounds in world space. [(x, y, z)] + float cs; ///< The size of each cell. (On the xz-plane.) + float ch; ///< The height of each cell. (The minimum increment along the y-axis.) + int width; ///< The width of the heightfield. (Along the x-axis in cell units.) + int height; ///< The height of the heightfield. (Along the z-axis in cell units.) + int minx; ///< The minimum x-bounds of usable data. + int maxx; ///< The maximum x-bounds of usable data. + int miny; ///< The minimum y-bounds of usable data. (Along the z-axis.) + int maxy; ///< The maximum y-bounds of usable data. (Along the z-axis.) + int hmin; ///< The minimum height bounds of usable data. (Along the y-axis.) + int hmax; ///< The maximum height bounds of usable data. (Along the y-axis.) + unsigned char* heights; ///< The heightfield. [Size: width * height] + unsigned char* areas; ///< Area ids. [Size: Same as #heights] + unsigned char* cons; ///< Packed neighbor connection information. [Size: Same as #heights] +}; + +/// Represents a set of heightfield layers. +/// @ingroup recast +/// @see rcAllocHeightfieldLayerSet, rcFreeHeightfieldLayerSet +struct rcHeightfieldLayerSet +{ + rcHeightfieldLayer* layers; ///< The layers in the set. [Size: #nlayers] + int nlayers; ///< The number of layers in the set. +}; + +/// Represents a simple, non-overlapping contour in field space. +struct rcContour +{ + int* verts; ///< Simplified contour vertex and connection data. [Size: 4 * #nverts] + int nverts; ///< The number of vertices in the simplified contour. + int* rverts; ///< Raw contour vertex and connection data. [Size: 4 * #nrverts] + int nrverts; ///< The number of vertices in the raw contour. + unsigned short reg; ///< The region id of the contour. + unsigned char area; ///< The area id of the contour. +}; + +/// Represents a group of related contours. +/// @ingroup recast +struct rcContourSet +{ + rcContour* conts; ///< An array of the contours in the set. [Size: #nconts] + int nconts; ///< The number of contours in the set. + float bmin[3]; ///< The minimum bounds in world space. [(x, y, z)] + float bmax[3]; ///< The maximum bounds in world space. [(x, y, z)] + float cs; ///< The size of each cell. (On the xz-plane.) + float ch; ///< The height of each cell. (The minimum increment along the y-axis.) + int width; ///< The width of the set. (Along the x-axis in cell units.) + int height; ///< The height of the set. (Along the z-axis in cell units.) + int borderSize; ///< The AABB border size used to generate the source data from which the contours were derived. + float maxError; ///< The max edge error that this contour set was simplified with. +}; + +/// Represents a polygon mesh suitable for use in building a navigation mesh. +/// @ingroup recast +struct rcPolyMesh +{ + unsigned short* verts; ///< The mesh vertices. [Form: (x, y, z) * #nverts] + unsigned short* polys; ///< Polygon and neighbor data. [Length: #maxpolys * 2 * #nvp] + unsigned short* regs; ///< The region id assigned to each polygon. [Length: #maxpolys] + unsigned short* flags; ///< The user defined flags for each polygon. [Length: #maxpolys] + unsigned char* areas; ///< The area id assigned to each polygon. [Length: #maxpolys] + int nverts; ///< The number of vertices. + int npolys; ///< The number of polygons. + int maxpolys; ///< The number of allocated polygons. + int nvp; ///< The maximum number of vertices per polygon. + float bmin[3]; ///< The minimum bounds in world space. [(x, y, z)] + float bmax[3]; ///< The maximum bounds in world space. [(x, y, z)] + float cs; ///< The size of each cell. (On the xz-plane.) + float ch; ///< The height of each cell. (The minimum increment along the y-axis.) + int borderSize; ///< The AABB border size used to generate the source data from which the mesh was derived. + float maxEdgeError; ///< The max error of the polygon edges in the mesh. +}; + +/// Contains triangle meshes that represent detailed height data associated +/// with the polygons in its associated polygon mesh object. +/// @ingroup recast +struct rcPolyMeshDetail +{ + unsigned int* meshes; ///< The sub-mesh data. [Size: 4*#nmeshes] + float* verts; ///< The mesh vertices. [Size: 3*#nverts] + unsigned char* tris; ///< The mesh triangles. [Size: 4*#ntris] + int nmeshes; ///< The number of sub-meshes defined by #meshes. + int nverts; ///< The number of vertices in #verts. + int ntris; ///< The number of triangles in #tris. +}; + +/// @name Allocation Functions +/// Functions used to allocate and de-allocate Recast objects. +/// @see rcAllocSetCustom +/// @{ + +/// Allocates a heightfield object using the Recast allocator. +/// @return A heightfield that is ready for initialization, or null on failure. +/// @ingroup recast +/// @see rcCreateHeightfield, rcFreeHeightField +rcHeightfield* rcAllocHeightfield(); + +/// Frees the specified heightfield object using the Recast allocator. +/// @param[in] hf A heightfield allocated using #rcAllocHeightfield +/// @ingroup recast +/// @see rcAllocHeightfield +void rcFreeHeightField(rcHeightfield* hf); + +/// Allocates a compact heightfield object using the Recast allocator. +/// @return A compact heightfield that is ready for initialization, or null on failure. +/// @ingroup recast +/// @see rcBuildCompactHeightfield, rcFreeCompactHeightfield +rcCompactHeightfield* rcAllocCompactHeightfield(); + +/// Frees the specified compact heightfield object using the Recast allocator. +/// @param[in] chf A compact heightfield allocated using #rcAllocCompactHeightfield +/// @ingroup recast +/// @see rcAllocCompactHeightfield +void rcFreeCompactHeightfield(rcCompactHeightfield* chf); + +/// Allocates a heightfield layer set using the Recast allocator. +/// @return A heightfield layer set that is ready for initialization, or null on failure. +/// @ingroup recast +/// @see rcBuildHeightfieldLayers, rcFreeHeightfieldLayerSet +rcHeightfieldLayerSet* rcAllocHeightfieldLayerSet(); + +/// Frees the specified heightfield layer set using the Recast allocator. +/// @param[in] lset A heightfield layer set allocated using #rcAllocHeightfieldLayerSet +/// @ingroup recast +/// @see rcAllocHeightfieldLayerSet +void rcFreeHeightfieldLayerSet(rcHeightfieldLayerSet* lset); + +/// Allocates a contour set object using the Recast allocator. +/// @return A contour set that is ready for initialization, or null on failure. +/// @ingroup recast +/// @see rcBuildContours, rcFreeContourSet +rcContourSet* rcAllocContourSet(); + +/// Frees the specified contour set using the Recast allocator. +/// @param[in] cset A contour set allocated using #rcAllocContourSet +/// @ingroup recast +/// @see rcAllocContourSet +void rcFreeContourSet(rcContourSet* cset); + +/// Allocates a polygon mesh object using the Recast allocator. +/// @return A polygon mesh that is ready for initialization, or null on failure. +/// @ingroup recast +/// @see rcBuildPolyMesh, rcFreePolyMesh +rcPolyMesh* rcAllocPolyMesh(); + +/// Frees the specified polygon mesh using the Recast allocator. +/// @param[in] pmesh A polygon mesh allocated using #rcAllocPolyMesh +/// @ingroup recast +/// @see rcAllocPolyMesh +void rcFreePolyMesh(rcPolyMesh* pmesh); + +/// Allocates a detail mesh object using the Recast allocator. +/// @return A detail mesh that is ready for initialization, or null on failure. +/// @ingroup recast +/// @see rcBuildPolyMeshDetail, rcFreePolyMeshDetail +rcPolyMeshDetail* rcAllocPolyMeshDetail(); + +/// Frees the specified detail mesh using the Recast allocator. +/// @param[in] dmesh A detail mesh allocated using #rcAllocPolyMeshDetail +/// @ingroup recast +/// @see rcAllocPolyMeshDetail +void rcFreePolyMeshDetail(rcPolyMeshDetail* dmesh); + +/// @} + +/// Heighfield border flag. +/// If a heightfield region ID has this bit set, then the region is a border +/// region and its spans are considered unwalkable. +/// (Used during the region and contour build process.) +/// @see rcCompactSpan::reg +static const unsigned short RC_BORDER_REG = 0x8000; + +/// Polygon touches multiple regions. +/// If a polygon has this region ID it was merged with or created +/// from polygons of different regions during the polymesh +/// build step that removes redundant border vertices. +/// (Used during the polymesh and detail polymesh build processes) +/// @see rcPolyMesh::regs +static const unsigned short RC_MULTIPLE_REGS = 0; + +/// Border vertex flag. +/// If a region ID has this bit set, then the associated element lies on +/// a tile border. If a contour vertex's region ID has this bit set, the +/// vertex will later be removed in order to match the segments and vertices +/// at tile boundaries. +/// (Used during the build process.) +/// @see rcCompactSpan::reg, #rcContour::verts, #rcContour::rverts +static const int RC_BORDER_VERTEX = 0x10000; + +/// Area border flag. +/// If a region ID has this bit set, then the associated element lies on +/// the border of an area. +/// (Used during the region and contour build process.) +/// @see rcCompactSpan::reg, #rcContour::verts, #rcContour::rverts +static const int RC_AREA_BORDER = 0x20000; + +/// Contour build flags. +/// @see rcBuildContours +enum rcBuildContoursFlags +{ + RC_CONTOUR_TESS_WALL_EDGES = 0x01, ///< Tessellate solid (impassable) edges during contour simplification. + RC_CONTOUR_TESS_AREA_EDGES = 0x02, ///< Tessellate edges between areas during contour simplification. +}; + +/// Applied to the region id field of contour vertices in order to extract the region id. +/// The region id field of a vertex may have several flags applied to it. So the +/// fields value can't be used directly. +/// @see rcContour::verts, rcContour::rverts +static const int RC_CONTOUR_REG_MASK = 0xffff; + +/// An value which indicates an invalid index within a mesh. +/// @note This does not necessarily indicate an error. +/// @see rcPolyMesh::polys +static const unsigned short RC_MESH_NULL_IDX = 0xffff; + +/// Represents the null area. +/// When a data element is given this value it is considered to no longer be +/// assigned to a usable area. (E.g. It is unwalkable.) +static const unsigned char RC_NULL_AREA = 0; + +/// The default area id used to indicate a walkable polygon. +/// This is also the maximum allowed area id, and the only non-null area id +/// recognized by some steps in the build process. +static const unsigned char RC_WALKABLE_AREA = 63; + +/// The value returned by #rcGetCon if the specified direction is not connected +/// to another span. (Has no neighbor.) +static const int RC_NOT_CONNECTED = 0x3f; + +/// @name General helper functions +/// @{ + +/// Used to ignore a function parameter. VS complains about unused parameters +/// and this silences the warning. +/// @param [in] _ Unused parameter +template void rcIgnoreUnused(const T&) { } + +/// Swaps the values of the two parameters. +/// @param[in,out] a Value A +/// @param[in,out] b Value B +template inline void rcSwap(T& a, T& b) { T t = a; a = b; b = t; } + +/// Returns the minimum of two values. +/// @param[in] a Value A +/// @param[in] b Value B +/// @return The minimum of the two values. +template inline T rcMin(T a, T b) { return a < b ? a : b; } + +/// Returns the maximum of two values. +/// @param[in] a Value A +/// @param[in] b Value B +/// @return The maximum of the two values. +template inline T rcMax(T a, T b) { return a > b ? a : b; } + +/// Returns the absolute value. +/// @param[in] a The value. +/// @return The absolute value of the specified value. +template inline T rcAbs(T a) { return a < 0 ? -a : a; } + +/// Returns the square of the value. +/// @param[in] a The value. +/// @return The square of the value. +template inline T rcSqr(T a) { return a*a; } + +/// Clamps the value to the specified range. +/// @param[in] v The value to clamp. +/// @param[in] mn The minimum permitted return value. +/// @param[in] mx The maximum permitted return value. +/// @return The value, clamped to the specified range. +template inline T rcClamp(T v, T mn, T mx) { return v < mn ? mn : (v > mx ? mx : v); } + +/// Returns the square root of the value. +/// @param[in] x The value. +/// @return The square root of the vlaue. +float rcSqrt(float x); + +/// @} +/// @name Vector helper functions. +/// @{ + +/// Derives the cross product of two vectors. (@p v1 x @p v2) +/// @param[out] dest The cross product. [(x, y, z)] +/// @param[in] v1 A Vector [(x, y, z)] +/// @param[in] v2 A vector [(x, y, z)] +inline void rcVcross(float* dest, const float* v1, const float* v2) +{ + dest[0] = v1[1]*v2[2] - v1[2]*v2[1]; + dest[1] = v1[2]*v2[0] - v1[0]*v2[2]; + dest[2] = v1[0]*v2[1] - v1[1]*v2[0]; +} + +/// Derives the dot product of two vectors. (@p v1 . @p v2) +/// @param[in] v1 A Vector [(x, y, z)] +/// @param[in] v2 A vector [(x, y, z)] +/// @return The dot product. +inline float rcVdot(const float* v1, const float* v2) +{ + return v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2]; +} + +/// Performs a scaled vector addition. (@p v1 + (@p v2 * @p s)) +/// @param[out] dest The result vector. [(x, y, z)] +/// @param[in] v1 The base vector. [(x, y, z)] +/// @param[in] v2 The vector to scale and add to @p v1. [(x, y, z)] +/// @param[in] s The amount to scale @p v2 by before adding to @p v1. +inline void rcVmad(float* dest, const float* v1, const float* v2, const float s) +{ + dest[0] = v1[0]+v2[0]*s; + dest[1] = v1[1]+v2[1]*s; + dest[2] = v1[2]+v2[2]*s; +} + +/// Performs a vector addition. (@p v1 + @p v2) +/// @param[out] dest The result vector. [(x, y, z)] +/// @param[in] v1 The base vector. [(x, y, z)] +/// @param[in] v2 The vector to add to @p v1. [(x, y, z)] +inline void rcVadd(float* dest, const float* v1, const float* v2) +{ + dest[0] = v1[0]+v2[0]; + dest[1] = v1[1]+v2[1]; + dest[2] = v1[2]+v2[2]; +} + +/// Performs a vector subtraction. (@p v1 - @p v2) +/// @param[out] dest The result vector. [(x, y, z)] +/// @param[in] v1 The base vector. [(x, y, z)] +/// @param[in] v2 The vector to subtract from @p v1. [(x, y, z)] +inline void rcVsub(float* dest, const float* v1, const float* v2) +{ + dest[0] = v1[0]-v2[0]; + dest[1] = v1[1]-v2[1]; + dest[2] = v1[2]-v2[2]; +} + +/// Selects the minimum value of each element from the specified vectors. +/// @param[in,out] mn A vector. (Will be updated with the result.) [(x, y, z)] +/// @param[in] v A vector. [(x, y, z)] +inline void rcVmin(float* mn, const float* v) +{ + mn[0] = rcMin(mn[0], v[0]); + mn[1] = rcMin(mn[1], v[1]); + mn[2] = rcMin(mn[2], v[2]); +} + +/// Selects the maximum value of each element from the specified vectors. +/// @param[in,out] mx A vector. (Will be updated with the result.) [(x, y, z)] +/// @param[in] v A vector. [(x, y, z)] +inline void rcVmax(float* mx, const float* v) +{ + mx[0] = rcMax(mx[0], v[0]); + mx[1] = rcMax(mx[1], v[1]); + mx[2] = rcMax(mx[2], v[2]); +} + +/// Performs a vector copy. +/// @param[out] dest The result. [(x, y, z)] +/// @param[in] v The vector to copy. [(x, y, z)] +inline void rcVcopy(float* dest, const float* v) +{ + dest[0] = v[0]; + dest[1] = v[1]; + dest[2] = v[2]; +} + +/// Returns the distance between two points. +/// @param[in] v1 A point. [(x, y, z)] +/// @param[in] v2 A point. [(x, y, z)] +/// @return The distance between the two points. +inline float rcVdist(const float* v1, const float* v2) +{ + float dx = v2[0] - v1[0]; + float dy = v2[1] - v1[1]; + float dz = v2[2] - v1[2]; + return rcSqrt(dx*dx + dy*dy + dz*dz); +} + +/// Returns the square of the distance between two points. +/// @param[in] v1 A point. [(x, y, z)] +/// @param[in] v2 A point. [(x, y, z)] +/// @return The square of the distance between the two points. +inline float rcVdistSqr(const float* v1, const float* v2) +{ + float dx = v2[0] - v1[0]; + float dy = v2[1] - v1[1]; + float dz = v2[2] - v1[2]; + return dx*dx + dy*dy + dz*dz; +} + +/// Normalizes the vector. +/// @param[in,out] v The vector to normalize. [(x, y, z)] +inline void rcVnormalize(float* v) +{ + float d = 1.0f / rcSqrt(rcSqr(v[0]) + rcSqr(v[1]) + rcSqr(v[2])); + v[0] *= d; + v[1] *= d; + v[2] *= d; +} + +/// @} +/// @name Heightfield Functions +/// @see rcHeightfield +/// @{ + +/// Calculates the bounding box of an array of vertices. +/// @ingroup recast +/// @param[in] verts An array of vertices. [(x, y, z) * @p nv] +/// @param[in] nv The number of vertices in the @p verts array. +/// @param[out] bmin The minimum bounds of the AABB. [(x, y, z)] [Units: wu] +/// @param[out] bmax The maximum bounds of the AABB. [(x, y, z)] [Units: wu] +void rcCalcBounds(const float* verts, int nv, float* bmin, float* bmax); + +/// Calculates the grid size based on the bounding box and grid cell size. +/// @ingroup recast +/// @param[in] bmin The minimum bounds of the AABB. [(x, y, z)] [Units: wu] +/// @param[in] bmax The maximum bounds of the AABB. [(x, y, z)] [Units: wu] +/// @param[in] cs The xz-plane cell size. [Limit: > 0] [Units: wu] +/// @param[out] w The width along the x-axis. [Limit: >= 0] [Units: vx] +/// @param[out] h The height along the z-axis. [Limit: >= 0] [Units: vx] +void rcCalcGridSize(const float* bmin, const float* bmax, float cs, int* w, int* h); + +/// Initializes a new heightfield. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in,out] hf The allocated heightfield to initialize. +/// @param[in] width The width of the field along the x-axis. [Limit: >= 0] [Units: vx] +/// @param[in] height The height of the field along the z-axis. [Limit: >= 0] [Units: vx] +/// @param[in] bmin The minimum bounds of the field's AABB. [(x, y, z)] [Units: wu] +/// @param[in] bmax The maximum bounds of the field's AABB. [(x, y, z)] [Units: wu] +/// @param[in] cs The xz-plane cell size to use for the field. [Limit: > 0] [Units: wu] +/// @param[in] ch The y-axis cell size to use for field. [Limit: > 0] [Units: wu] +/// @returns True if the operation completed successfully. +bool rcCreateHeightfield(rcContext* ctx, rcHeightfield& hf, int width, int height, + const float* bmin, const float* bmax, + float cs, float ch); + +/// Sets the area id of all triangles with a slope below the specified value +/// to #RC_WALKABLE_AREA. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in] walkableSlopeAngle The maximum slope that is considered walkable. +/// [Limits: 0 <= value < 90] [Units: Degrees] +/// @param[in] verts The vertices. [(x, y, z) * @p nv] +/// @param[in] nv The number of vertices. +/// @param[in] tris The triangle vertex indices. [(vertA, vertB, vertC) * @p nt] +/// @param[in] nt The number of triangles. +/// @param[out] areas The triangle area ids. [Length: >= @p nt] +void rcMarkWalkableTriangles(rcContext* ctx, const float walkableSlopeAngle, const float* verts, int nv, + const int* tris, int nt, unsigned char* areas); + +/// Sets the area id of all triangles with a slope greater than or equal to the specified value to #RC_NULL_AREA. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in] walkableSlopeAngle The maximum slope that is considered walkable. +/// [Limits: 0 <= value < 90] [Units: Degrees] +/// @param[in] verts The vertices. [(x, y, z) * @p nv] +/// @param[in] nv The number of vertices. +/// @param[in] tris The triangle vertex indices. [(vertA, vertB, vertC) * @p nt] +/// @param[in] nt The number of triangles. +/// @param[out] areas The triangle area ids. [Length: >= @p nt] +void rcClearUnwalkableTriangles(rcContext* ctx, const float walkableSlopeAngle, const float* verts, int nv, + const int* tris, int nt, unsigned char* areas); + +/// Adds a span to the specified heightfield. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in,out] hf An initialized heightfield. +/// @param[in] x The width index where the span is to be added. +/// [Limits: 0 <= value < rcHeightfield::width] +/// @param[in] y The height index where the span is to be added. +/// [Limits: 0 <= value < rcHeightfield::height] +/// @param[in] smin The minimum height of the span. [Limit: < @p smax] [Units: vx] +/// @param[in] smax The maximum height of the span. [Limit: <= #RC_SPAN_MAX_HEIGHT] [Units: vx] +/// @param[in] area The area id of the span. [Limit: <= #RC_WALKABLE_AREA) +/// @param[in] flagMergeThr The merge theshold. [Limit: >= 0] [Units: vx] +/// @returns True if the operation completed successfully. +bool rcAddSpan(rcContext* ctx, rcHeightfield& hf, const int x, const int y, + const unsigned short smin, const unsigned short smax, + const unsigned char area, const int flagMergeThr); + +/// Rasterizes a triangle into the specified heightfield. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in] v0 Triangle vertex 0 [(x, y, z)] +/// @param[in] v1 Triangle vertex 1 [(x, y, z)] +/// @param[in] v2 Triangle vertex 2 [(x, y, z)] +/// @param[in] area The area id of the triangle. [Limit: <= #RC_WALKABLE_AREA] +/// @param[in,out] solid An initialized heightfield. +/// @param[in] flagMergeThr The distance where the walkable flag is favored over the non-walkable flag. +/// [Limit: >= 0] [Units: vx] +/// @returns True if the operation completed successfully. +bool rcRasterizeTriangle(rcContext* ctx, const float* v0, const float* v1, const float* v2, + const unsigned char area, rcHeightfield& solid, + const int flagMergeThr = 1); + +/// Rasterizes an indexed triangle mesh into the specified heightfield. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in] verts The vertices. [(x, y, z) * @p nv] +/// @param[in] nv The number of vertices. +/// @param[in] tris The triangle indices. [(vertA, vertB, vertC) * @p nt] +/// @param[in] areas The area id's of the triangles. [Limit: <= #RC_WALKABLE_AREA] [Size: @p nt] +/// @param[in] nt The number of triangles. +/// @param[in,out] solid An initialized heightfield. +/// @param[in] flagMergeThr The distance where the walkable flag is favored over the non-walkable flag. +/// [Limit: >= 0] [Units: vx] +/// @returns True if the operation completed successfully. +bool rcRasterizeTriangles(rcContext* ctx, const float* verts, const int nv, + const int* tris, const unsigned char* areas, const int nt, + rcHeightfield& solid, const int flagMergeThr = 1); + +/// Rasterizes an indexed triangle mesh into the specified heightfield. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in] verts The vertices. [(x, y, z) * @p nv] +/// @param[in] nv The number of vertices. +/// @param[in] tris The triangle indices. [(vertA, vertB, vertC) * @p nt] +/// @param[in] areas The area id's of the triangles. [Limit: <= #RC_WALKABLE_AREA] [Size: @p nt] +/// @param[in] nt The number of triangles. +/// @param[in,out] solid An initialized heightfield. +/// @param[in] flagMergeThr The distance where the walkable flag is favored over the non-walkable flag. +/// [Limit: >= 0] [Units: vx] +/// @returns True if the operation completed successfully. +bool rcRasterizeTriangles(rcContext* ctx, const float* verts, const int nv, + const unsigned short* tris, const unsigned char* areas, const int nt, + rcHeightfield& solid, const int flagMergeThr = 1); + +/// Rasterizes triangles into the specified heightfield. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in] verts The triangle vertices. [(ax, ay, az, bx, by, bz, cx, by, cx) * @p nt] +/// @param[in] areas The area id's of the triangles. [Limit: <= #RC_WALKABLE_AREA] [Size: @p nt] +/// @param[in] nt The number of triangles. +/// @param[in,out] solid An initialized heightfield. +/// @param[in] flagMergeThr The distance where the walkable flag is favored over the non-walkable flag. +/// [Limit: >= 0] [Units: vx] +/// @returns True if the operation completed successfully. +bool rcRasterizeTriangles(rcContext* ctx, const float* verts, const unsigned char* areas, const int nt, + rcHeightfield& solid, const int flagMergeThr = 1); + +/// Marks non-walkable spans as walkable if their maximum is within @p walkableClimp of a walkable neighbor. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in] walkableClimb Maximum ledge height that is considered to still be traversable. +/// [Limit: >=0] [Units: vx] +/// @param[in,out] solid A fully built heightfield. (All spans have been added.) +void rcFilterLowHangingWalkableObstacles(rcContext* ctx, const int walkableClimb, rcHeightfield& solid); + +/// Marks spans that are ledges as not-walkable. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in] walkableHeight Minimum floor to 'ceiling' height that will still allow the floor area to +/// be considered walkable. [Limit: >= 3] [Units: vx] +/// @param[in] walkableClimb Maximum ledge height that is considered to still be traversable. +/// [Limit: >=0] [Units: vx] +/// @param[in,out] solid A fully built heightfield. (All spans have been added.) +void rcFilterLedgeSpans(rcContext* ctx, const int walkableHeight, + const int walkableClimb, rcHeightfield& solid); + +/// Marks walkable spans as not walkable if the clearence above the span is less than the specified height. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in] walkableHeight Minimum floor to 'ceiling' height that will still allow the floor area to +/// be considered walkable. [Limit: >= 3] [Units: vx] +/// @param[in,out] solid A fully built heightfield. (All spans have been added.) +void rcFilterWalkableLowHeightSpans(rcContext* ctx, int walkableHeight, rcHeightfield& solid); + +/// Returns the number of spans contained in the specified heightfield. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in] hf An initialized heightfield. +/// @returns The number of spans in the heightfield. +int rcGetHeightFieldSpanCount(rcContext* ctx, rcHeightfield& hf); + +/// @} +/// @name Compact Heightfield Functions +/// @see rcCompactHeightfield +/// @{ + +/// Builds a compact heightfield representing open space, from a heightfield representing solid space. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in] walkableHeight Minimum floor to 'ceiling' height that will still allow the floor area +/// to be considered walkable. [Limit: >= 3] [Units: vx] +/// @param[in] walkableClimb Maximum ledge height that is considered to still be traversable. +/// [Limit: >=0] [Units: vx] +/// @param[in] hf The heightfield to be compacted. +/// @param[out] chf The resulting compact heightfield. (Must be pre-allocated.) +/// @returns True if the operation completed successfully. +bool rcBuildCompactHeightfield(rcContext* ctx, const int walkableHeight, const int walkableClimb, + rcHeightfield& hf, rcCompactHeightfield& chf); + +/// Erodes the walkable area within the heightfield by the specified radius. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in] radius The radius of erosion. [Limits: 0 < value < 255] [Units: vx] +/// @param[in,out] chf The populated compact heightfield to erode. +/// @returns True if the operation completed successfully. +bool rcErodeWalkableArea(rcContext* ctx, int radius, rcCompactHeightfield& chf); + +/// Applies a median filter to walkable area types (based on area id), removing noise. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in,out] chf A populated compact heightfield. +/// @returns True if the operation completed successfully. +bool rcMedianFilterWalkableArea(rcContext* ctx, rcCompactHeightfield& chf); + +/// Applies an area id to all spans within the specified bounding box. (AABB) +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in] bmin The minimum of the bounding box. [(x, y, z)] +/// @param[in] bmax The maximum of the bounding box. [(x, y, z)] +/// @param[in] areaId The area id to apply. [Limit: <= #RC_WALKABLE_AREA] +/// @param[in,out] chf A populated compact heightfield. +void rcMarkBoxArea(rcContext* ctx, const float* bmin, const float* bmax, unsigned char areaId, + rcCompactHeightfield& chf); + +/// Applies the area id to the all spans within the specified convex polygon. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in] verts The vertices of the polygon [Fomr: (x, y, z) * @p nverts] +/// @param[in] nverts The number of vertices in the polygon. +/// @param[in] hmin The height of the base of the polygon. +/// @param[in] hmax The height of the top of the polygon. +/// @param[in] areaId The area id to apply. [Limit: <= #RC_WALKABLE_AREA] +/// @param[in,out] chf A populated compact heightfield. +void rcMarkConvexPolyArea(rcContext* ctx, const float* verts, const int nverts, + const float hmin, const float hmax, unsigned char areaId, + rcCompactHeightfield& chf); + +/// Helper function to offset voncex polygons for rcMarkConvexPolyArea. +/// @ingroup recast +/// @param[in] verts The vertices of the polygon [Form: (x, y, z) * @p nverts] +/// @param[in] nverts The number of vertices in the polygon. +/// @param[out] outVerts The offset vertices (should hold up to 2 * @p nverts) [Form: (x, y, z) * return value] +/// @param[in] maxOutVerts The max number of vertices that can be stored to @p outVerts. +/// @returns Number of vertices in the offset polygon or 0 if too few vertices in @p outVerts. +int rcOffsetPoly(const float* verts, const int nverts, const float offset, + float* outVerts, const int maxOutVerts); + +/// Applies the area id to all spans within the specified cylinder. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in] pos The center of the base of the cylinder. [Form: (x, y, z)] +/// @param[in] r The radius of the cylinder. +/// @param[in] h The height of the cylinder. +/// @param[in] areaId The area id to apply. [Limit: <= #RC_WALKABLE_AREA] +/// @param[in,out] chf A populated compact heightfield. +void rcMarkCylinderArea(rcContext* ctx, const float* pos, + const float r, const float h, unsigned char areaId, + rcCompactHeightfield& chf); + +/// Builds the distance field for the specified compact heightfield. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in,out] chf A populated compact heightfield. +/// @returns True if the operation completed successfully. +bool rcBuildDistanceField(rcContext* ctx, rcCompactHeightfield& chf); + +/// Builds region data for the heightfield using watershed partitioning. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in,out] chf A populated compact heightfield. +/// @param[in] borderSize The size of the non-navigable border around the heightfield. +/// [Limit: >=0] [Units: vx] +/// @param[in] minRegionArea The minimum number of cells allowed to form isolated island areas. +/// [Limit: >=0] [Units: vx]. +/// @param[in] mergeRegionArea Any regions with a span count smaller than this value will, if possible, +/// be merged with larger regions. [Limit: >=0] [Units: vx] +/// @returns True if the operation completed successfully. +bool rcBuildRegions(rcContext* ctx, rcCompactHeightfield& chf, + const int borderSize, const int minRegionArea, const int mergeRegionArea); + +/// Builds region data for the heightfield by partitioning the heightfield in non-overlapping layers. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in,out] chf A populated compact heightfield. +/// @param[in] borderSize The size of the non-navigable border around the heightfield. +/// [Limit: >=0] [Units: vx] +/// @param[in] minRegionArea The minimum number of cells allowed to form isolated island areas. +/// [Limit: >=0] [Units: vx]. +/// @returns True if the operation completed successfully. +bool rcBuildLayerRegions(rcContext* ctx, rcCompactHeightfield& chf, + const int borderSize, const int minRegionArea); + +/// Builds region data for the heightfield using simple monotone partitioning. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in,out] chf A populated compact heightfield. +/// @param[in] borderSize The size of the non-navigable border around the heightfield. +/// [Limit: >=0] [Units: vx] +/// @param[in] minRegionArea The minimum number of cells allowed to form isolated island areas. +/// [Limit: >=0] [Units: vx]. +/// @param[in] mergeRegionArea Any regions with a span count smaller than this value will, if possible, +/// be merged with larger regions. [Limit: >=0] [Units: vx] +/// @returns True if the operation completed successfully. +bool rcBuildRegionsMonotone(rcContext* ctx, rcCompactHeightfield& chf, + const int borderSize, const int minRegionArea, const int mergeRegionArea); + +/// Sets the neighbor connection data for the specified direction. +/// @param[in] s The span to update. +/// @param[in] dir The direction to set. [Limits: 0 <= value < 4] +/// @param[in] i The index of the neighbor span. +inline void rcSetCon(rcCompactSpan& s, int dir, int i) +{ + const unsigned int shift = (unsigned int)dir*6; + unsigned int con = s.con; + s.con = (con & ~(0x3f << shift)) | (((unsigned int)i & 0x3f) << shift); +} + +/// Gets neighbor connection data for the specified direction. +/// @param[in] s The span to check. +/// @param[in] dir The direction to check. [Limits: 0 <= value < 4] +/// @return The neighbor connection data for the specified direction, +/// or #RC_NOT_CONNECTED if there is no connection. +inline int rcGetCon(const rcCompactSpan& s, int dir) +{ + const unsigned int shift = (unsigned int)dir*6; + return (s.con >> shift) & 0x3f; +} + +/// Gets the standard width (x-axis) offset for the specified direction. +/// @param[in] dir The direction. [Limits: 0 <= value < 4] +/// @return The width offset to apply to the current cell position to move +/// in the direction. +inline int rcGetDirOffsetX(int dir) +{ + static const int offset[4] = { -1, 0, 1, 0, }; + return offset[dir&0x03]; +} + +/// Gets the standard height (z-axis) offset for the specified direction. +/// @param[in] dir The direction. [Limits: 0 <= value < 4] +/// @return The height offset to apply to the current cell position to move +/// in the direction. +inline int rcGetDirOffsetY(int dir) +{ + static const int offset[4] = { 0, 1, 0, -1 }; + return offset[dir&0x03]; +} + +/// Gets the direction for the specified offset. One of x and y should be 0. +/// @param[in] x The x offset. [Limits: -1 <= value <= 1] +/// @param[in] y The y offset. [Limits: -1 <= value <= 1] +/// @return The direction that represents the offset. +inline int rcGetDirForOffset(int x, int y) +{ + static const int dirs[5] = { 3, 0, -1, 2, 1 }; + return dirs[((y+1)<<1)+x]; +} + +/// @} +/// @name Layer, Contour, Polymesh, and Detail Mesh Functions +/// @see rcHeightfieldLayer, rcContourSet, rcPolyMesh, rcPolyMeshDetail +/// @{ + +/// Builds a layer set from the specified compact heightfield. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in] chf A fully built compact heightfield. +/// @param[in] borderSize The size of the non-navigable border around the heightfield. [Limit: >=0] +/// [Units: vx] +/// @param[in] walkableHeight Minimum floor to 'ceiling' height that will still allow the floor area +/// to be considered walkable. [Limit: >= 3] [Units: vx] +/// @param[out] lset The resulting layer set. (Must be pre-allocated.) +/// @returns True if the operation completed successfully. +bool rcBuildHeightfieldLayers(rcContext* ctx, rcCompactHeightfield& chf, + const int borderSize, const int walkableHeight, + rcHeightfieldLayerSet& lset); + +/// Builds a contour set from the region outlines in the provided compact heightfield. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in] chf A fully built compact heightfield. +/// @param[in] maxError The maximum distance a simplfied contour's border edges should deviate +/// the original raw contour. [Limit: >=0] [Units: wu] +/// @param[in] maxEdgeLen The maximum allowed length for contour edges along the border of the mesh. +/// [Limit: >=0] [Units: vx] +/// @param[out] cset The resulting contour set. (Must be pre-allocated.) +/// @param[in] buildFlags The build flags. (See: #rcBuildContoursFlags) +/// @returns True if the operation completed successfully. +bool rcBuildContours(rcContext* ctx, rcCompactHeightfield& chf, + const float maxError, const int maxEdgeLen, + rcContourSet& cset, const int buildFlags = RC_CONTOUR_TESS_WALL_EDGES); + +/// Builds a polygon mesh from the provided contours. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in] cset A fully built contour set. +/// @param[in] nvp The maximum number of vertices allowed for polygons generated during the +/// contour to polygon conversion process. [Limit: >= 3] +/// @param[out] mesh The resulting polygon mesh. (Must be re-allocated.) +/// @returns True if the operation completed successfully. +bool rcBuildPolyMesh(rcContext* ctx, rcContourSet& cset, const int nvp, rcPolyMesh& mesh); + +/// Merges multiple polygon meshes into a single mesh. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in] meshes An array of polygon meshes to merge. [Size: @p nmeshes] +/// @param[in] nmeshes The number of polygon meshes in the meshes array. +/// @param[in] mesh The resulting polygon mesh. (Must be pre-allocated.) +/// @returns True if the operation completed successfully. +bool rcMergePolyMeshes(rcContext* ctx, rcPolyMesh** meshes, const int nmeshes, rcPolyMesh& mesh); + +/// Builds a detail mesh from the provided polygon mesh. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in] mesh A fully built polygon mesh. +/// @param[in] chf The compact heightfield used to build the polygon mesh. +/// @param[in] sampleDist Sets the distance to use when samping the heightfield. [Limit: >=0] [Units: wu] +/// @param[in] sampleMaxError The maximum distance the detail mesh surface should deviate from +/// heightfield data. [Limit: >=0] [Units: wu] +/// @param[out] dmesh The resulting detail mesh. (Must be pre-allocated.) +/// @returns True if the operation completed successfully. +bool rcBuildPolyMeshDetail(rcContext* ctx, const rcPolyMesh& mesh, const rcCompactHeightfield& chf, + const float sampleDist, const float sampleMaxError, + rcPolyMeshDetail& dmesh); + +/// Copies the poly mesh data from src to dst. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in] src The source mesh to copy from. +/// @param[out] dst The resulting detail mesh. (Must be pre-allocated, must be empty mesh.) +/// @returns True if the operation completed successfully. +bool rcCopyPolyMesh(rcContext* ctx, const rcPolyMesh& src, rcPolyMesh& dst); + +/// Merges multiple detail meshes into a single detail mesh. +/// @ingroup recast +/// @param[in,out] ctx The build context to use during the operation. +/// @param[in] meshes An array of detail meshes to merge. [Size: @p nmeshes] +/// @param[in] nmeshes The number of detail meshes in the meshes array. +/// @param[out] mesh The resulting detail mesh. (Must be pre-allocated.) +/// @returns True if the operation completed successfully. +bool rcMergePolyMeshDetails(rcContext* ctx, rcPolyMeshDetail** meshes, const int nmeshes, rcPolyMeshDetail& mesh); + +/// @} + +#endif // RECAST_H + +/////////////////////////////////////////////////////////////////////////// + +// Due to the large amount of detail documentation for this file, +// the content normally located at the end of the header file has been separated +// out to a file in /Docs/Extern. diff --git a/libs/recast/recast/include/RecastAlloc.h b/libs/recast/recast/include/RecastAlloc.h new file mode 100644 index 000000000..3cdd450d4 --- /dev/null +++ b/libs/recast/recast/include/RecastAlloc.h @@ -0,0 +1,146 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#ifndef RECASTALLOC_H +#define RECASTALLOC_H + +#include + +/// Provides hint values to the memory allocator on how long the +/// memory is expected to be used. +enum rcAllocHint +{ + RC_ALLOC_PERM, ///< Memory will persist after a function call. + RC_ALLOC_TEMP ///< Memory used temporarily within a function. +}; + +/// A memory allocation function. +// @param[in] size The size, in bytes of memory, to allocate. +// @param[in] rcAllocHint A hint to the allocator on how long the memory is expected to be in use. +// @return A pointer to the beginning of the allocated memory block, or null if the allocation failed. +/// @see rcAllocSetCustom +typedef void* (rcAllocFunc)(size_t size, rcAllocHint hint); + +/// A memory deallocation function. +/// @param[in] ptr A pointer to a memory block previously allocated using #rcAllocFunc. +/// @see rcAllocSetCustom +typedef void (rcFreeFunc)(void* ptr); + +/// Sets the base custom allocation functions to be used by Recast. +/// @param[in] allocFunc The memory allocation function to be used by #rcAlloc +/// @param[in] freeFunc The memory de-allocation function to be used by #rcFree +void rcAllocSetCustom(rcAllocFunc *allocFunc, rcFreeFunc *freeFunc); + +/// Allocates a memory block. +/// @param[in] size The size, in bytes of memory, to allocate. +/// @param[in] hint A hint to the allocator on how long the memory is expected to be in use. +/// @return A pointer to the beginning of the allocated memory block, or null if the allocation failed. +/// @see rcFree +void* rcAlloc(size_t size, rcAllocHint hint); + +/// Deallocates a memory block. +/// @param[in] ptr A pointer to a memory block previously allocated using #rcAlloc. +/// @see rcAlloc +void rcFree(void* ptr); + + +/// A simple dynamic array of integers. +class rcIntArray +{ + int* m_data; + int m_size, m_cap; + + void doResize(int n); + + // Explicitly disabled copy constructor and copy assignment operator. + rcIntArray(const rcIntArray&); + rcIntArray& operator=(const rcIntArray&); + +public: + /// Constructs an instance with an initial array size of zero. + rcIntArray() : m_data(0), m_size(0), m_cap(0) {} + + /// Constructs an instance initialized to the specified size. + /// @param[in] n The initial size of the integer array. + rcIntArray(int n) : m_data(0), m_size(0), m_cap(0) { resize(n); } + ~rcIntArray() { rcFree(m_data); } + + /// Specifies the new size of the integer array. + /// @param[in] n The new size of the integer array. + void resize(int n) + { + if (n > m_cap) + doResize(n); + + m_size = n; + } + + /// Push the specified integer onto the end of the array and increases the size by one. + /// @param[in] item The new value. + void push(int item) { resize(m_size+1); m_data[m_size-1] = item; } + + /// Returns the value at the end of the array and reduces the size by one. + /// @return The value at the end of the array. + int pop() + { + if (m_size > 0) + m_size--; + + return m_data[m_size]; + } + + /// The value at the specified array index. + /// @warning Does not provide overflow protection. + /// @param[in] i The index of the value. + const int& operator[](int i) const { return m_data[i]; } + + /// The value at the specified array index. + /// @warning Does not provide overflow protection. + /// @param[in] i The index of the value. + int& operator[](int i) { return m_data[i]; } + + /// The current size of the integer array. + int size() const { return m_size; } +}; + +/// A simple helper class used to delete an array when it goes out of scope. +/// @note This class is rarely if ever used by the end user. +template class rcScopedDelete +{ + T* ptr; +public: + + /// Constructs an instance with a null pointer. + inline rcScopedDelete() : ptr(0) {} + + /// Constructs an instance with the specified pointer. + /// @param[in] p An pointer to an allocated array. + inline rcScopedDelete(T* p) : ptr(p) {} + inline ~rcScopedDelete() { rcFree(ptr); } + + /// The root array pointer. + /// @return The root array pointer. + inline operator T*() { return ptr; } + +private: + // Explicitly disabled copy constructor and copy assignment operator. + rcScopedDelete(const rcScopedDelete&); + rcScopedDelete& operator=(const rcScopedDelete&); +}; + +#endif diff --git a/libs/recast/recast/include/RecastAssert.h b/libs/recast/recast/include/RecastAssert.h new file mode 100644 index 000000000..e7cc10e49 --- /dev/null +++ b/libs/recast/recast/include/RecastAssert.h @@ -0,0 +1,56 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#ifndef RECASTASSERT_H +#define RECASTASSERT_H + +// Note: This header file's only purpose is to include define assert. +// Feel free to change the file and include your own implementation instead. + +#ifdef NDEBUG + +// From http://cnicholson.net/2009/02/stupid-c-tricks-adventures-in-assert/ +# define rcAssert(x) do { (void)sizeof(x); } while((void)(__LINE__==-1),false) + +#else + +/// An assertion failure function. +// @param[in] expression asserted expression. +// @param[in] file Filename of the failed assertion. +// @param[in] line Line number of the failed assertion. +/// @see rcAssertFailSetCustom +typedef void (rcAssertFailFunc)(const char* expression, const char* file, int line); + +/// Sets the base custom assertion failure function to be used by Recast. +/// @param[in] assertFailFunc The function to be used in case of failure of #dtAssert +void rcAssertFailSetCustom(rcAssertFailFunc *assertFailFunc); + +/// Gets the base custom assertion failure function to be used by Recast. +rcAssertFailFunc* rcAssertFailGetCustom(); + +# include +# define rcAssert(expression) \ + { \ + rcAssertFailFunc* failFunc = rcAssertFailGetCustom(); \ + if(failFunc == NULL) { assert(expression); } \ + else if(!(expression)) { (*failFunc)(#expression, __FILE__, __LINE__); } \ + } + +#endif + +#endif // RECASTASSERT_H diff --git a/libs/recast/recast/src/Recast.cpp b/libs/recast/recast/src/Recast.cpp new file mode 100644 index 000000000..8308d1973 --- /dev/null +++ b/libs/recast/recast/src/Recast.cpp @@ -0,0 +1,504 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#include +#define _USE_MATH_DEFINES +#include +#include +#include +#include +#include +#include +#include "Recast.h" +#include "RecastAlloc.h" +#include "RecastAssert.h" + +float rcSqrt(float x) +{ + return sqrtf(x); +} + +/// @class rcContext +/// @par +/// +/// This class does not provide logging or timer functionality on its +/// own. Both must be provided by a concrete implementation +/// by overriding the protected member functions. Also, this class does not +/// provide an interface for extracting log messages. (Only adding them.) +/// So concrete implementations must provide one. +/// +/// If no logging or timers are required, just pass an instance of this +/// class through the Recast build process. +/// + +/// @par +/// +/// Example: +/// @code +/// // Where ctx is an instance of rcContext and filepath is a char array. +/// ctx->log(RC_LOG_ERROR, "buildTiledNavigation: Could not load '%s'", filepath); +/// @endcode +void rcContext::log(const rcLogCategory category, const char* format, ...) +{ + if (!m_logEnabled) + return; + static const int MSG_SIZE = 512; + char msg[MSG_SIZE]; + va_list ap; + va_start(ap, format); + int len = vsnprintf(msg, MSG_SIZE, format, ap); + if (len >= MSG_SIZE) + { + len = MSG_SIZE-1; + msg[MSG_SIZE-1] = '\0'; + } + va_end(ap); + doLog(category, msg, len); +} + +rcHeightfield* rcAllocHeightfield() +{ + return new (rcAlloc(sizeof(rcHeightfield), RC_ALLOC_PERM)) rcHeightfield; +} + +rcHeightfield::rcHeightfield() + : width() + , height() + , bmin() + , bmax() + , cs() + , ch() + , spans() + , pools() + , freelist() +{ +} + +rcHeightfield::~rcHeightfield() +{ + // Delete span array. + rcFree(spans); + // Delete span pools. + while (pools) + { + rcSpanPool* next = pools->next; + rcFree(pools); + pools = next; + } +} + +void rcFreeHeightField(rcHeightfield* hf) +{ + if (!hf) return; + hf->~rcHeightfield(); + rcFree(hf); +} + +rcCompactHeightfield* rcAllocCompactHeightfield() +{ + rcCompactHeightfield* chf = (rcCompactHeightfield*)rcAlloc(sizeof(rcCompactHeightfield), RC_ALLOC_PERM); + memset(chf, 0, sizeof(rcCompactHeightfield)); + return chf; +} + +void rcFreeCompactHeightfield(rcCompactHeightfield* chf) +{ + if (!chf) return; + rcFree(chf->cells); + rcFree(chf->spans); + rcFree(chf->dist); + rcFree(chf->areas); + rcFree(chf); +} + +rcHeightfieldLayerSet* rcAllocHeightfieldLayerSet() +{ + rcHeightfieldLayerSet* lset = (rcHeightfieldLayerSet*)rcAlloc(sizeof(rcHeightfieldLayerSet), RC_ALLOC_PERM); + memset(lset, 0, sizeof(rcHeightfieldLayerSet)); + return lset; +} + +void rcFreeHeightfieldLayerSet(rcHeightfieldLayerSet* lset) +{ + if (!lset) return; + for (int i = 0; i < lset->nlayers; ++i) + { + rcFree(lset->layers[i].heights); + rcFree(lset->layers[i].areas); + rcFree(lset->layers[i].cons); + } + rcFree(lset->layers); + rcFree(lset); +} + + +rcContourSet* rcAllocContourSet() +{ + rcContourSet* cset = (rcContourSet*)rcAlloc(sizeof(rcContourSet), RC_ALLOC_PERM); + memset(cset, 0, sizeof(rcContourSet)); + return cset; +} + +void rcFreeContourSet(rcContourSet* cset) +{ + if (!cset) return; + for (int i = 0; i < cset->nconts; ++i) + { + rcFree(cset->conts[i].verts); + rcFree(cset->conts[i].rverts); + } + rcFree(cset->conts); + rcFree(cset); +} + +rcPolyMesh* rcAllocPolyMesh() +{ + rcPolyMesh* pmesh = (rcPolyMesh*)rcAlloc(sizeof(rcPolyMesh), RC_ALLOC_PERM); + memset(pmesh, 0, sizeof(rcPolyMesh)); + return pmesh; +} + +void rcFreePolyMesh(rcPolyMesh* pmesh) +{ + if (!pmesh) return; + rcFree(pmesh->verts); + rcFree(pmesh->polys); + rcFree(pmesh->regs); + rcFree(pmesh->flags); + rcFree(pmesh->areas); + rcFree(pmesh); +} + +rcPolyMeshDetail* rcAllocPolyMeshDetail() +{ + rcPolyMeshDetail* dmesh = (rcPolyMeshDetail*)rcAlloc(sizeof(rcPolyMeshDetail), RC_ALLOC_PERM); + memset(dmesh, 0, sizeof(rcPolyMeshDetail)); + return dmesh; +} + +void rcFreePolyMeshDetail(rcPolyMeshDetail* dmesh) +{ + if (!dmesh) return; + rcFree(dmesh->meshes); + rcFree(dmesh->verts); + rcFree(dmesh->tris); + rcFree(dmesh); +} + +void rcCalcBounds(const float* verts, int nv, float* bmin, float* bmax) +{ + // Calculate bounding box. + rcVcopy(bmin, verts); + rcVcopy(bmax, verts); + for (int i = 1; i < nv; ++i) + { + const float* v = &verts[i*3]; + rcVmin(bmin, v); + rcVmax(bmax, v); + } +} + +void rcCalcGridSize(const float* bmin, const float* bmax, float cs, int* w, int* h) +{ + *w = (int)((bmax[0] - bmin[0])/cs+0.5f); + *h = (int)((bmax[2] - bmin[2])/cs+0.5f); +} + +/// @par +/// +/// See the #rcConfig documentation for more information on the configuration parameters. +/// +/// @see rcAllocHeightfield, rcHeightfield +bool rcCreateHeightfield(rcContext* ctx, rcHeightfield& hf, int width, int height, + const float* bmin, const float* bmax, + float cs, float ch) +{ + rcIgnoreUnused(ctx); + + hf.width = width; + hf.height = height; + rcVcopy(hf.bmin, bmin); + rcVcopy(hf.bmax, bmax); + hf.cs = cs; + hf.ch = ch; + hf.spans = (rcSpan**)rcAlloc(sizeof(rcSpan*)*hf.width*hf.height, RC_ALLOC_PERM); + if (!hf.spans) + return false; + memset(hf.spans, 0, sizeof(rcSpan*)*hf.width*hf.height); + return true; +} + +static void calcTriNormal(const float* v0, const float* v1, const float* v2, float* norm) +{ + float e0[3], e1[3]; + rcVsub(e0, v1, v0); + rcVsub(e1, v2, v0); + rcVcross(norm, e0, e1); + rcVnormalize(norm); +} + +/// @par +/// +/// Only sets the area id's for the walkable triangles. Does not alter the +/// area id's for unwalkable triangles. +/// +/// See the #rcConfig documentation for more information on the configuration parameters. +/// +/// @see rcHeightfield, rcClearUnwalkableTriangles, rcRasterizeTriangles +void rcMarkWalkableTriangles(rcContext* ctx, const float walkableSlopeAngle, + const float* verts, int nv, + const int* tris, int nt, + unsigned char* areas) +{ + rcIgnoreUnused(ctx); + rcIgnoreUnused(nv); + + const float walkableThr = cosf(walkableSlopeAngle/180.0f*RC_PI); + + float norm[3]; + + for (int i = 0; i < nt; ++i) + { + const int* tri = &tris[i*3]; + calcTriNormal(&verts[tri[0]*3], &verts[tri[1]*3], &verts[tri[2]*3], norm); + // Check if the face is walkable. + if (norm[1] > walkableThr) + areas[i] = RC_WALKABLE_AREA; + } +} + +/// @par +/// +/// Only sets the area id's for the unwalkable triangles. Does not alter the +/// area id's for walkable triangles. +/// +/// See the #rcConfig documentation for more information on the configuration parameters. +/// +/// @see rcHeightfield, rcClearUnwalkableTriangles, rcRasterizeTriangles +void rcClearUnwalkableTriangles(rcContext* ctx, const float walkableSlopeAngle, + const float* verts, int /*nv*/, + const int* tris, int nt, + unsigned char* areas) +{ + rcIgnoreUnused(ctx); + + const float walkableThr = cosf(walkableSlopeAngle/180.0f*RC_PI); + + float norm[3]; + + for (int i = 0; i < nt; ++i) + { + const int* tri = &tris[i*3]; + calcTriNormal(&verts[tri[0]*3], &verts[tri[1]*3], &verts[tri[2]*3], norm); + // Check if the face is walkable. + if (norm[1] <= walkableThr) + areas[i] = RC_NULL_AREA; + } +} + +int rcGetHeightFieldSpanCount(rcContext* ctx, rcHeightfield& hf) +{ + rcIgnoreUnused(ctx); + + const int w = hf.width; + const int h = hf.height; + int spanCount = 0; + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + for (rcSpan* s = hf.spans[x + y*w]; s; s = s->next) + { + if (s->area != RC_NULL_AREA) + spanCount++; + } + } + } + return spanCount; +} + +/// @par +/// +/// This is just the beginning of the process of fully building a compact heightfield. +/// Various filters may be applied, then the distance field and regions built. +/// E.g: #rcBuildDistanceField and #rcBuildRegions +/// +/// See the #rcConfig documentation for more information on the configuration parameters. +/// +/// @see rcAllocCompactHeightfield, rcHeightfield, rcCompactHeightfield, rcConfig +bool rcBuildCompactHeightfield(rcContext* ctx, const int walkableHeight, const int walkableClimb, + rcHeightfield& hf, rcCompactHeightfield& chf) +{ + rcAssert(ctx); + + rcScopedTimer timer(ctx, RC_TIMER_BUILD_COMPACTHEIGHTFIELD); + + const int w = hf.width; + const int h = hf.height; + const int spanCount = rcGetHeightFieldSpanCount(ctx, hf); + + // Fill in header. + chf.width = w; + chf.height = h; + chf.spanCount = spanCount; + chf.walkableHeight = walkableHeight; + chf.walkableClimb = walkableClimb; + chf.maxRegions = 0; + rcVcopy(chf.bmin, hf.bmin); + rcVcopy(chf.bmax, hf.bmax); + chf.bmax[1] += walkableHeight*hf.ch; + chf.cs = hf.cs; + chf.ch = hf.ch; + chf.cells = (rcCompactCell*)rcAlloc(sizeof(rcCompactCell)*w*h, RC_ALLOC_PERM); + if (!chf.cells) + { + ctx->log(RC_LOG_ERROR, "rcBuildCompactHeightfield: Out of memory 'chf.cells' (%d)", w*h); + return false; + } + memset(chf.cells, 0, sizeof(rcCompactCell)*w*h); + chf.spans = (rcCompactSpan*)rcAlloc(sizeof(rcCompactSpan)*spanCount, RC_ALLOC_PERM); + if (!chf.spans) + { + ctx->log(RC_LOG_ERROR, "rcBuildCompactHeightfield: Out of memory 'chf.spans' (%d)", spanCount); + return false; + } + memset(chf.spans, 0, sizeof(rcCompactSpan)*spanCount); + chf.areas = (unsigned char*)rcAlloc(sizeof(unsigned char)*spanCount, RC_ALLOC_PERM); + if (!chf.areas) + { + ctx->log(RC_LOG_ERROR, "rcBuildCompactHeightfield: Out of memory 'chf.areas' (%d)", spanCount); + return false; + } + memset(chf.areas, RC_NULL_AREA, sizeof(unsigned char)*spanCount); + + const int MAX_HEIGHT = 0xffff; + + // Fill in cells and spans. + int idx = 0; + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + const rcSpan* s = hf.spans[x + y*w]; + // If there are no spans at this cell, just leave the data to index=0, count=0. + if (!s) continue; + rcCompactCell& c = chf.cells[x+y*w]; + c.index = idx; + c.count = 0; + while (s) + { + if (s->area != RC_NULL_AREA) + { + const int bot = (int)s->smax; + const int top = s->next ? (int)s->next->smin : MAX_HEIGHT; + chf.spans[idx].y = (unsigned short)rcClamp(bot, 0, 0xffff); + chf.spans[idx].h = (unsigned char)rcClamp(top - bot, 0, 0xff); + chf.areas[idx] = s->area; + idx++; + c.count++; + } + s = s->next; + } + } + } + + // Find neighbour connections. + const int MAX_LAYERS = RC_NOT_CONNECTED-1; + int tooHighNeighbour = 0; + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + const rcCompactCell& c = chf.cells[x+y*w]; + for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i) + { + rcCompactSpan& s = chf.spans[i]; + + for (int dir = 0; dir < 4; ++dir) + { + rcSetCon(s, dir, RC_NOT_CONNECTED); + const int nx = x + rcGetDirOffsetX(dir); + const int ny = y + rcGetDirOffsetY(dir); + // First check that the neighbour cell is in bounds. + if (nx < 0 || ny < 0 || nx >= w || ny >= h) + continue; + + // Iterate over all neighbour spans and check if any of the is + // accessible from current cell. + const rcCompactCell& nc = chf.cells[nx+ny*w]; + for (int k = (int)nc.index, nk = (int)(nc.index+nc.count); k < nk; ++k) + { + const rcCompactSpan& ns = chf.spans[k]; + const int bot = rcMax(s.y, ns.y); + const int top = rcMin(s.y+s.h, ns.y+ns.h); + + // Check that the gap between the spans is walkable, + // and that the climb height between the gaps is not too high. + if ((top - bot) >= walkableHeight && rcAbs((int)ns.y - (int)s.y) <= walkableClimb) + { + // Mark direction as walkable. + const int lidx = k - (int)nc.index; + if (lidx < 0 || lidx > MAX_LAYERS) + { + tooHighNeighbour = rcMax(tooHighNeighbour, lidx); + continue; + } + rcSetCon(s, dir, lidx); + break; + } + } + + } + } + } + } + + if (tooHighNeighbour > MAX_LAYERS) + { + ctx->log(RC_LOG_ERROR, "rcBuildCompactHeightfield: Heightfield has too many layers %d (max: %d)", + tooHighNeighbour, MAX_LAYERS); + } + + return true; +} + +/* +static int getHeightfieldMemoryUsage(const rcHeightfield& hf) +{ + int size = 0; + size += sizeof(hf); + size += hf.width * hf.height * sizeof(rcSpan*); + + rcSpanPool* pool = hf.pools; + while (pool) + { + size += (sizeof(rcSpanPool) - sizeof(rcSpan)) + sizeof(rcSpan)*RC_SPANS_PER_POOL; + pool = pool->next; + } + return size; +} + +static int getCompactHeightFieldMemoryusage(const rcCompactHeightfield& chf) +{ + int size = 0; + size += sizeof(rcCompactHeightfield); + size += sizeof(rcCompactSpan) * chf.spanCount; + size += sizeof(rcCompactCell) * chf.width * chf.height; + return size; +} +*/ diff --git a/libs/recast/recast/src/RecastAlloc.cpp b/libs/recast/recast/src/RecastAlloc.cpp new file mode 100644 index 000000000..453b5fa6a --- /dev/null +++ b/libs/recast/recast/src/RecastAlloc.cpp @@ -0,0 +1,86 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#include +#include +#include "RecastAlloc.h" +#include "RecastAssert.h" + +static void *rcAllocDefault(size_t size, rcAllocHint) +{ + return malloc(size); +} + +static void rcFreeDefault(void *ptr) +{ + free(ptr); +} + +static rcAllocFunc* sRecastAllocFunc = rcAllocDefault; +static rcFreeFunc* sRecastFreeFunc = rcFreeDefault; + +/// @see rcAlloc, rcFree +void rcAllocSetCustom(rcAllocFunc *allocFunc, rcFreeFunc *freeFunc) +{ + sRecastAllocFunc = allocFunc ? allocFunc : rcAllocDefault; + sRecastFreeFunc = freeFunc ? freeFunc : rcFreeDefault; +} + +/// @see rcAllocSetCustom +void* rcAlloc(size_t size, rcAllocHint hint) +{ + return sRecastAllocFunc(size, hint); +} + +/// @par +/// +/// @warning This function leaves the value of @p ptr unchanged. So it still +/// points to the same (now invalid) location, and not to null. +/// +/// @see rcAllocSetCustom +void rcFree(void* ptr) +{ + if (ptr) + sRecastFreeFunc(ptr); +} + +/// @class rcIntArray +/// +/// While it is possible to pre-allocate a specific array size during +/// construction or by using the #resize method, certain methods will +/// automatically resize the array as needed. +/// +/// @warning The array memory is not initialized to zero when the size is +/// manually set during construction or when using #resize. + +/// @par +/// +/// Using this method ensures the array is at least large enough to hold +/// the specified number of elements. This can improve performance by +/// avoiding auto-resizing during use. +void rcIntArray::doResize(int n) +{ + if (!m_cap) m_cap = n; + while (m_cap < n) m_cap *= 2; + int* newData = (int*)rcAlloc(m_cap*sizeof(int), RC_ALLOC_TEMP); + rcAssert(newData); + if (m_size && newData) memcpy(newData, m_data, m_size*sizeof(int)); + rcFree(m_data); + m_data = newData; +} + diff --git a/libs/recast/recast/src/RecastArea.cpp b/libs/recast/recast/src/RecastArea.cpp new file mode 100644 index 000000000..97139cf99 --- /dev/null +++ b/libs/recast/recast/src/RecastArea.cpp @@ -0,0 +1,591 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#include +#define _USE_MATH_DEFINES +#include +#include +#include +#include +#include "Recast.h" +#include "RecastAlloc.h" +#include "RecastAssert.h" + +/// @par +/// +/// Basically, any spans that are closer to a boundary or obstruction than the specified radius +/// are marked as unwalkable. +/// +/// This method is usually called immediately after the heightfield has been built. +/// +/// @see rcCompactHeightfield, rcBuildCompactHeightfield, rcConfig::walkableRadius +bool rcErodeWalkableArea(rcContext* ctx, int radius, rcCompactHeightfield& chf) +{ + rcAssert(ctx); + + const int w = chf.width; + const int h = chf.height; + + rcScopedTimer timer(ctx, RC_TIMER_ERODE_AREA); + + unsigned char* dist = (unsigned char*)rcAlloc(sizeof(unsigned char)*chf.spanCount, RC_ALLOC_TEMP); + if (!dist) + { + ctx->log(RC_LOG_ERROR, "erodeWalkableArea: Out of memory 'dist' (%d).", chf.spanCount); + return false; + } + + // Init distance. + memset(dist, 0xff, sizeof(unsigned char)*chf.spanCount); + + // Mark boundary cells. + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + const rcCompactCell& c = chf.cells[x+y*w]; + for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i) + { + if (chf.areas[i] == RC_NULL_AREA) + { + dist[i] = 0; + } + else + { + const rcCompactSpan& s = chf.spans[i]; + int nc = 0; + for (int dir = 0; dir < 4; ++dir) + { + if (rcGetCon(s, dir) != RC_NOT_CONNECTED) + { + const int nx = x + rcGetDirOffsetX(dir); + const int ny = y + rcGetDirOffsetY(dir); + const int nidx = (int)chf.cells[nx+ny*w].index + rcGetCon(s, dir); + if (chf.areas[nidx] != RC_NULL_AREA) + { + nc++; + } + } + } + // At least one missing neighbour. + if (nc != 4) + dist[i] = 0; + } + } + } + } + + unsigned char nd; + + // Pass 1 + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + const rcCompactCell& c = chf.cells[x+y*w]; + for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i) + { + const rcCompactSpan& s = chf.spans[i]; + + if (rcGetCon(s, 0) != RC_NOT_CONNECTED) + { + // (-1,0) + const int ax = x + rcGetDirOffsetX(0); + const int ay = y + rcGetDirOffsetY(0); + const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 0); + const rcCompactSpan& as = chf.spans[ai]; + nd = (unsigned char)rcMin((int)dist[ai]+2, 255); + if (nd < dist[i]) + dist[i] = nd; + + // (-1,-1) + if (rcGetCon(as, 3) != RC_NOT_CONNECTED) + { + const int aax = ax + rcGetDirOffsetX(3); + const int aay = ay + rcGetDirOffsetY(3); + const int aai = (int)chf.cells[aax+aay*w].index + rcGetCon(as, 3); + nd = (unsigned char)rcMin((int)dist[aai]+3, 255); + if (nd < dist[i]) + dist[i] = nd; + } + } + if (rcGetCon(s, 3) != RC_NOT_CONNECTED) + { + // (0,-1) + const int ax = x + rcGetDirOffsetX(3); + const int ay = y + rcGetDirOffsetY(3); + const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 3); + const rcCompactSpan& as = chf.spans[ai]; + nd = (unsigned char)rcMin((int)dist[ai]+2, 255); + if (nd < dist[i]) + dist[i] = nd; + + // (1,-1) + if (rcGetCon(as, 2) != RC_NOT_CONNECTED) + { + const int aax = ax + rcGetDirOffsetX(2); + const int aay = ay + rcGetDirOffsetY(2); + const int aai = (int)chf.cells[aax+aay*w].index + rcGetCon(as, 2); + nd = (unsigned char)rcMin((int)dist[aai]+3, 255); + if (nd < dist[i]) + dist[i] = nd; + } + } + } + } + } + + // Pass 2 + for (int y = h-1; y >= 0; --y) + { + for (int x = w-1; x >= 0; --x) + { + const rcCompactCell& c = chf.cells[x+y*w]; + for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i) + { + const rcCompactSpan& s = chf.spans[i]; + + if (rcGetCon(s, 2) != RC_NOT_CONNECTED) + { + // (1,0) + const int ax = x + rcGetDirOffsetX(2); + const int ay = y + rcGetDirOffsetY(2); + const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 2); + const rcCompactSpan& as = chf.spans[ai]; + nd = (unsigned char)rcMin((int)dist[ai]+2, 255); + if (nd < dist[i]) + dist[i] = nd; + + // (1,1) + if (rcGetCon(as, 1) != RC_NOT_CONNECTED) + { + const int aax = ax + rcGetDirOffsetX(1); + const int aay = ay + rcGetDirOffsetY(1); + const int aai = (int)chf.cells[aax+aay*w].index + rcGetCon(as, 1); + nd = (unsigned char)rcMin((int)dist[aai]+3, 255); + if (nd < dist[i]) + dist[i] = nd; + } + } + if (rcGetCon(s, 1) != RC_NOT_CONNECTED) + { + // (0,1) + const int ax = x + rcGetDirOffsetX(1); + const int ay = y + rcGetDirOffsetY(1); + const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 1); + const rcCompactSpan& as = chf.spans[ai]; + nd = (unsigned char)rcMin((int)dist[ai]+2, 255); + if (nd < dist[i]) + dist[i] = nd; + + // (-1,1) + if (rcGetCon(as, 0) != RC_NOT_CONNECTED) + { + const int aax = ax + rcGetDirOffsetX(0); + const int aay = ay + rcGetDirOffsetY(0); + const int aai = (int)chf.cells[aax+aay*w].index + rcGetCon(as, 0); + nd = (unsigned char)rcMin((int)dist[aai]+3, 255); + if (nd < dist[i]) + dist[i] = nd; + } + } + } + } + } + + const unsigned char thr = (unsigned char)(radius*2); + for (int i = 0; i < chf.spanCount; ++i) + if (dist[i] < thr) + chf.areas[i] = RC_NULL_AREA; + + rcFree(dist); + + return true; +} + +static void insertSort(unsigned char* a, const int n) +{ + int i, j; + for (i = 1; i < n; i++) + { + const unsigned char value = a[i]; + for (j = i - 1; j >= 0 && a[j] > value; j--) + a[j+1] = a[j]; + a[j+1] = value; + } +} + +/// @par +/// +/// This filter is usually applied after applying area id's using functions +/// such as #rcMarkBoxArea, #rcMarkConvexPolyArea, and #rcMarkCylinderArea. +/// +/// @see rcCompactHeightfield +bool rcMedianFilterWalkableArea(rcContext* ctx, rcCompactHeightfield& chf) +{ + rcAssert(ctx); + + const int w = chf.width; + const int h = chf.height; + + rcScopedTimer timer(ctx, RC_TIMER_MEDIAN_AREA); + + unsigned char* areas = (unsigned char*)rcAlloc(sizeof(unsigned char)*chf.spanCount, RC_ALLOC_TEMP); + if (!areas) + { + ctx->log(RC_LOG_ERROR, "medianFilterWalkableArea: Out of memory 'areas' (%d).", chf.spanCount); + return false; + } + + // Init distance. + memset(areas, 0xff, sizeof(unsigned char)*chf.spanCount); + + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + const rcCompactCell& c = chf.cells[x+y*w]; + for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i) + { + const rcCompactSpan& s = chf.spans[i]; + if (chf.areas[i] == RC_NULL_AREA) + { + areas[i] = chf.areas[i]; + continue; + } + + unsigned char nei[9]; + for (int j = 0; j < 9; ++j) + nei[j] = chf.areas[i]; + + for (int dir = 0; dir < 4; ++dir) + { + if (rcGetCon(s, dir) != RC_NOT_CONNECTED) + { + const int ax = x + rcGetDirOffsetX(dir); + const int ay = y + rcGetDirOffsetY(dir); + const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, dir); + if (chf.areas[ai] != RC_NULL_AREA) + nei[dir*2+0] = chf.areas[ai]; + + const rcCompactSpan& as = chf.spans[ai]; + const int dir2 = (dir+1) & 0x3; + if (rcGetCon(as, dir2) != RC_NOT_CONNECTED) + { + const int ax2 = ax + rcGetDirOffsetX(dir2); + const int ay2 = ay + rcGetDirOffsetY(dir2); + const int ai2 = (int)chf.cells[ax2+ay2*w].index + rcGetCon(as, dir2); + if (chf.areas[ai2] != RC_NULL_AREA) + nei[dir*2+1] = chf.areas[ai2]; + } + } + } + insertSort(nei, 9); + areas[i] = nei[4]; + } + } + } + + memcpy(chf.areas, areas, sizeof(unsigned char)*chf.spanCount); + + rcFree(areas); + + return true; +} + +/// @par +/// +/// The value of spacial parameters are in world units. +/// +/// @see rcCompactHeightfield, rcMedianFilterWalkableArea +void rcMarkBoxArea(rcContext* ctx, const float* bmin, const float* bmax, unsigned char areaId, + rcCompactHeightfield& chf) +{ + rcAssert(ctx); + + rcScopedTimer timer(ctx, RC_TIMER_MARK_BOX_AREA); + + int minx = (int)((bmin[0]-chf.bmin[0])/chf.cs); + int miny = (int)((bmin[1]-chf.bmin[1])/chf.ch); + int minz = (int)((bmin[2]-chf.bmin[2])/chf.cs); + int maxx = (int)((bmax[0]-chf.bmin[0])/chf.cs); + int maxy = (int)((bmax[1]-chf.bmin[1])/chf.ch); + int maxz = (int)((bmax[2]-chf.bmin[2])/chf.cs); + + if (maxx < 0) return; + if (minx >= chf.width) return; + if (maxz < 0) return; + if (minz >= chf.height) return; + + if (minx < 0) minx = 0; + if (maxx >= chf.width) maxx = chf.width-1; + if (minz < 0) minz = 0; + if (maxz >= chf.height) maxz = chf.height-1; + + for (int z = minz; z <= maxz; ++z) + { + for (int x = minx; x <= maxx; ++x) + { + const rcCompactCell& c = chf.cells[x+z*chf.width]; + for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i) + { + rcCompactSpan& s = chf.spans[i]; + if ((int)s.y >= miny && (int)s.y <= maxy) + { + if (chf.areas[i] != RC_NULL_AREA) + chf.areas[i] = areaId; + } + } + } + } +} + + +static int pointInPoly(int nvert, const float* verts, const float* p) +{ + int i, j, c = 0; + for (i = 0, j = nvert-1; i < nvert; j = i++) + { + const float* vi = &verts[i*3]; + const float* vj = &verts[j*3]; + if (((vi[2] > p[2]) != (vj[2] > p[2])) && + (p[0] < (vj[0]-vi[0]) * (p[2]-vi[2]) / (vj[2]-vi[2]) + vi[0]) ) + c = !c; + } + return c; +} + +/// @par +/// +/// The value of spacial parameters are in world units. +/// +/// The y-values of the polygon vertices are ignored. So the polygon is effectively +/// projected onto the xz-plane at @p hmin, then extruded to @p hmax. +/// +/// @see rcCompactHeightfield, rcMedianFilterWalkableArea +void rcMarkConvexPolyArea(rcContext* ctx, const float* verts, const int nverts, + const float hmin, const float hmax, unsigned char areaId, + rcCompactHeightfield& chf) +{ + rcAssert(ctx); + + rcScopedTimer timer(ctx, RC_TIMER_MARK_CONVEXPOLY_AREA); + + float bmin[3], bmax[3]; + rcVcopy(bmin, verts); + rcVcopy(bmax, verts); + for (int i = 1; i < nverts; ++i) + { + rcVmin(bmin, &verts[i*3]); + rcVmax(bmax, &verts[i*3]); + } + bmin[1] = hmin; + bmax[1] = hmax; + + int minx = (int)((bmin[0]-chf.bmin[0])/chf.cs); + int miny = (int)((bmin[1]-chf.bmin[1])/chf.ch); + int minz = (int)((bmin[2]-chf.bmin[2])/chf.cs); + int maxx = (int)((bmax[0]-chf.bmin[0])/chf.cs); + int maxy = (int)((bmax[1]-chf.bmin[1])/chf.ch); + int maxz = (int)((bmax[2]-chf.bmin[2])/chf.cs); + + if (maxx < 0) return; + if (minx >= chf.width) return; + if (maxz < 0) return; + if (minz >= chf.height) return; + + if (minx < 0) minx = 0; + if (maxx >= chf.width) maxx = chf.width-1; + if (minz < 0) minz = 0; + if (maxz >= chf.height) maxz = chf.height-1; + + + // TODO: Optimize. + for (int z = minz; z <= maxz; ++z) + { + for (int x = minx; x <= maxx; ++x) + { + const rcCompactCell& c = chf.cells[x+z*chf.width]; + for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i) + { + rcCompactSpan& s = chf.spans[i]; + if (chf.areas[i] == RC_NULL_AREA) + continue; + if ((int)s.y >= miny && (int)s.y <= maxy) + { + float p[3]; + p[0] = chf.bmin[0] + (x+0.5f)*chf.cs; + p[1] = 0; + p[2] = chf.bmin[2] + (z+0.5f)*chf.cs; + + if (pointInPoly(nverts, verts, p)) + { + chf.areas[i] = areaId; + } + } + } + } + } +} + +int rcOffsetPoly(const float* verts, const int nverts, const float offset, + float* outVerts, const int maxOutVerts) +{ + const float MITER_LIMIT = 1.20f; + + int n = 0; + + for (int i = 0; i < nverts; i++) + { + const int a = (i+nverts-1) % nverts; + const int b = i; + const int c = (i+1) % nverts; + const float* va = &verts[a*3]; + const float* vb = &verts[b*3]; + const float* vc = &verts[c*3]; + float dx0 = vb[0] - va[0]; + float dy0 = vb[2] - va[2]; + float d0 = dx0*dx0 + dy0*dy0; + if (d0 > 1e-6f) + { + d0 = 1.0f/rcSqrt(d0); + dx0 *= d0; + dy0 *= d0; + } + float dx1 = vc[0] - vb[0]; + float dy1 = vc[2] - vb[2]; + float d1 = dx1*dx1 + dy1*dy1; + if (d1 > 1e-6f) + { + d1 = 1.0f/rcSqrt(d1); + dx1 *= d1; + dy1 *= d1; + } + const float dlx0 = -dy0; + const float dly0 = dx0; + const float dlx1 = -dy1; + const float dly1 = dx1; + float cross = dx1*dy0 - dx0*dy1; + float dmx = (dlx0 + dlx1) * 0.5f; + float dmy = (dly0 + dly1) * 0.5f; + float dmr2 = dmx*dmx + dmy*dmy; + bool bevel = dmr2 * MITER_LIMIT*MITER_LIMIT < 1.0f; + if (dmr2 > 1e-6f) + { + const float scale = 1.0f / dmr2; + dmx *= scale; + dmy *= scale; + } + + if (bevel && cross < 0.0f) + { + if (n+2 >= maxOutVerts) + return 0; + float d = (1.0f - (dx0*dx1 + dy0*dy1))*0.5f; + outVerts[n*3+0] = vb[0] + (-dlx0+dx0*d)*offset; + outVerts[n*3+1] = vb[1]; + outVerts[n*3+2] = vb[2] + (-dly0+dy0*d)*offset; + n++; + outVerts[n*3+0] = vb[0] + (-dlx1-dx1*d)*offset; + outVerts[n*3+1] = vb[1]; + outVerts[n*3+2] = vb[2] + (-dly1-dy1*d)*offset; + n++; + } + else + { + if (n+1 >= maxOutVerts) + return 0; + outVerts[n*3+0] = vb[0] - dmx*offset; + outVerts[n*3+1] = vb[1]; + outVerts[n*3+2] = vb[2] - dmy*offset; + n++; + } + } + + return n; +} + + +/// @par +/// +/// The value of spacial parameters are in world units. +/// +/// @see rcCompactHeightfield, rcMedianFilterWalkableArea +void rcMarkCylinderArea(rcContext* ctx, const float* pos, + const float r, const float h, unsigned char areaId, + rcCompactHeightfield& chf) +{ + rcAssert(ctx); + + rcScopedTimer timer(ctx, RC_TIMER_MARK_CYLINDER_AREA); + + float bmin[3], bmax[3]; + bmin[0] = pos[0] - r; + bmin[1] = pos[1]; + bmin[2] = pos[2] - r; + bmax[0] = pos[0] + r; + bmax[1] = pos[1] + h; + bmax[2] = pos[2] + r; + const float r2 = r*r; + + int minx = (int)((bmin[0]-chf.bmin[0])/chf.cs); + int miny = (int)((bmin[1]-chf.bmin[1])/chf.ch); + int minz = (int)((bmin[2]-chf.bmin[2])/chf.cs); + int maxx = (int)((bmax[0]-chf.bmin[0])/chf.cs); + int maxy = (int)((bmax[1]-chf.bmin[1])/chf.ch); + int maxz = (int)((bmax[2]-chf.bmin[2])/chf.cs); + + if (maxx < 0) return; + if (minx >= chf.width) return; + if (maxz < 0) return; + if (minz >= chf.height) return; + + if (minx < 0) minx = 0; + if (maxx >= chf.width) maxx = chf.width-1; + if (minz < 0) minz = 0; + if (maxz >= chf.height) maxz = chf.height-1; + + + for (int z = minz; z <= maxz; ++z) + { + for (int x = minx; x <= maxx; ++x) + { + const rcCompactCell& c = chf.cells[x+z*chf.width]; + for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i) + { + rcCompactSpan& s = chf.spans[i]; + + if (chf.areas[i] == RC_NULL_AREA) + continue; + + if ((int)s.y >= miny && (int)s.y <= maxy) + { + const float sx = chf.bmin[0] + (x+0.5f)*chf.cs; + const float sz = chf.bmin[2] + (z+0.5f)*chf.cs; + const float dx = sx - pos[0]; + const float dz = sz - pos[2]; + + if (dx*dx + dz*dz < r2) + { + chf.areas[i] = areaId; + } + } + } + } + } +} diff --git a/libs/recast/recast/src/RecastAssert.cpp b/libs/recast/recast/src/RecastAssert.cpp new file mode 100644 index 000000000..6297d4202 --- /dev/null +++ b/libs/recast/recast/src/RecastAssert.cpp @@ -0,0 +1,35 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#include "RecastAssert.h" + +#ifndef NDEBUG + +static rcAssertFailFunc* sRecastAssertFailFunc = 0; + +void rcAssertFailSetCustom(rcAssertFailFunc *assertFailFunc) +{ + sRecastAssertFailFunc = assertFailFunc; +} + +rcAssertFailFunc* rcAssertFailGetCustom() +{ + return sRecastAssertFailFunc; +} + +#endif diff --git a/libs/recast/recast/src/RecastContour.cpp b/libs/recast/recast/src/RecastContour.cpp new file mode 100644 index 000000000..277ab0150 --- /dev/null +++ b/libs/recast/recast/src/RecastContour.cpp @@ -0,0 +1,1105 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#define _USE_MATH_DEFINES +#include +#include +#include +#include +#include "Recast.h" +#include "RecastAlloc.h" +#include "RecastAssert.h" + + +static int getCornerHeight(int x, int y, int i, int dir, + const rcCompactHeightfield& chf, + bool& isBorderVertex) +{ + const rcCompactSpan& s = chf.spans[i]; + int ch = (int)s.y; + int dirp = (dir+1) & 0x3; + + unsigned int regs[4] = {0,0,0,0}; + + // Combine region and area codes in order to prevent + // border vertices which are in between two areas to be removed. + regs[0] = chf.spans[i].reg | (chf.areas[i] << 16); + + if (rcGetCon(s, dir) != RC_NOT_CONNECTED) + { + const int ax = x + rcGetDirOffsetX(dir); + const int ay = y + rcGetDirOffsetY(dir); + const int ai = (int)chf.cells[ax+ay*chf.width].index + rcGetCon(s, dir); + const rcCompactSpan& as = chf.spans[ai]; + ch = rcMax(ch, (int)as.y); + regs[1] = chf.spans[ai].reg | (chf.areas[ai] << 16); + if (rcGetCon(as, dirp) != RC_NOT_CONNECTED) + { + const int ax2 = ax + rcGetDirOffsetX(dirp); + const int ay2 = ay + rcGetDirOffsetY(dirp); + const int ai2 = (int)chf.cells[ax2+ay2*chf.width].index + rcGetCon(as, dirp); + const rcCompactSpan& as2 = chf.spans[ai2]; + ch = rcMax(ch, (int)as2.y); + regs[2] = chf.spans[ai2].reg | (chf.areas[ai2] << 16); + } + } + if (rcGetCon(s, dirp) != RC_NOT_CONNECTED) + { + const int ax = x + rcGetDirOffsetX(dirp); + const int ay = y + rcGetDirOffsetY(dirp); + const int ai = (int)chf.cells[ax+ay*chf.width].index + rcGetCon(s, dirp); + const rcCompactSpan& as = chf.spans[ai]; + ch = rcMax(ch, (int)as.y); + regs[3] = chf.spans[ai].reg | (chf.areas[ai] << 16); + if (rcGetCon(as, dir) != RC_NOT_CONNECTED) + { + const int ax2 = ax + rcGetDirOffsetX(dir); + const int ay2 = ay + rcGetDirOffsetY(dir); + const int ai2 = (int)chf.cells[ax2+ay2*chf.width].index + rcGetCon(as, dir); + const rcCompactSpan& as2 = chf.spans[ai2]; + ch = rcMax(ch, (int)as2.y); + regs[2] = chf.spans[ai2].reg | (chf.areas[ai2] << 16); + } + } + + // Check if the vertex is special edge vertex, these vertices will be removed later. + for (int j = 0; j < 4; ++j) + { + const int a = j; + const int b = (j+1) & 0x3; + const int c = (j+2) & 0x3; + const int d = (j+3) & 0x3; + + // The vertex is a border vertex there are two same exterior cells in a row, + // followed by two interior cells and none of the regions are out of bounds. + const bool twoSameExts = (regs[a] & regs[b] & RC_BORDER_REG) != 0 && regs[a] == regs[b]; + const bool twoInts = ((regs[c] | regs[d]) & RC_BORDER_REG) == 0; + const bool intsSameArea = (regs[c]>>16) == (regs[d]>>16); + const bool noZeros = regs[a] != 0 && regs[b] != 0 && regs[c] != 0 && regs[d] != 0; + if (twoSameExts && twoInts && intsSameArea && noZeros) + { + isBorderVertex = true; + break; + } + } + + return ch; +} + +static void walkContour(int x, int y, int i, + rcCompactHeightfield& chf, + unsigned char* flags, rcIntArray& points) +{ + // Choose the first non-connected edge + unsigned char dir = 0; + while ((flags[i] & (1 << dir)) == 0) + dir++; + + unsigned char startDir = dir; + int starti = i; + + const unsigned char area = chf.areas[i]; + + int iter = 0; + while (++iter < 40000) + { + if (flags[i] & (1 << dir)) + { + // Choose the edge corner + bool isBorderVertex = false; + bool isAreaBorder = false; + int px = x; + int py = getCornerHeight(x, y, i, dir, chf, isBorderVertex); + int pz = y; + switch(dir) + { + case 0: pz++; break; + case 1: px++; pz++; break; + case 2: px++; break; + } + int r = 0; + const rcCompactSpan& s = chf.spans[i]; + if (rcGetCon(s, dir) != RC_NOT_CONNECTED) + { + const int ax = x + rcGetDirOffsetX(dir); + const int ay = y + rcGetDirOffsetY(dir); + const int ai = (int)chf.cells[ax+ay*chf.width].index + rcGetCon(s, dir); + r = (int)chf.spans[ai].reg; + if (area != chf.areas[ai]) + isAreaBorder = true; + } + if (isBorderVertex) + r |= RC_BORDER_VERTEX; + if (isAreaBorder) + r |= RC_AREA_BORDER; + points.push(px); + points.push(py); + points.push(pz); + points.push(r); + + flags[i] &= ~(1 << dir); // Remove visited edges + dir = (dir+1) & 0x3; // Rotate CW + } + else + { + int ni = -1; + const int nx = x + rcGetDirOffsetX(dir); + const int ny = y + rcGetDirOffsetY(dir); + const rcCompactSpan& s = chf.spans[i]; + if (rcGetCon(s, dir) != RC_NOT_CONNECTED) + { + const rcCompactCell& nc = chf.cells[nx+ny*chf.width]; + ni = (int)nc.index + rcGetCon(s, dir); + } + if (ni == -1) + { + // Should not happen. + return; + } + x = nx; + y = ny; + i = ni; + dir = (dir+3) & 0x3; // Rotate CCW + } + + if (starti == i && startDir == dir) + { + break; + } + } +} + +static float distancePtSeg(const int x, const int z, + const int px, const int pz, + const int qx, const int qz) +{ + float pqx = (float)(qx - px); + float pqz = (float)(qz - pz); + float dx = (float)(x - px); + float dz = (float)(z - pz); + float d = pqx*pqx + pqz*pqz; + float t = pqx*dx + pqz*dz; + if (d > 0) + t /= d; + if (t < 0) + t = 0; + else if (t > 1) + t = 1; + + dx = px + t*pqx - x; + dz = pz + t*pqz - z; + + return dx*dx + dz*dz; +} + +static void simplifyContour(rcIntArray& points, rcIntArray& simplified, + const float maxError, const int maxEdgeLen, const int buildFlags) +{ + // Add initial points. + bool hasConnections = false; + for (int i = 0; i < points.size(); i += 4) + { + if ((points[i+3] & RC_CONTOUR_REG_MASK) != 0) + { + hasConnections = true; + break; + } + } + + if (hasConnections) + { + // The contour has some portals to other regions. + // Add a new point to every location where the region changes. + for (int i = 0, ni = points.size()/4; i < ni; ++i) + { + int ii = (i+1) % ni; + const bool differentRegs = (points[i*4+3] & RC_CONTOUR_REG_MASK) != (points[ii*4+3] & RC_CONTOUR_REG_MASK); + const bool areaBorders = (points[i*4+3] & RC_AREA_BORDER) != (points[ii*4+3] & RC_AREA_BORDER); + if (differentRegs || areaBorders) + { + simplified.push(points[i*4+0]); + simplified.push(points[i*4+1]); + simplified.push(points[i*4+2]); + simplified.push(i); + } + } + } + + if (simplified.size() == 0) + { + // If there is no connections at all, + // create some initial points for the simplification process. + // Find lower-left and upper-right vertices of the contour. + int llx = points[0]; + int lly = points[1]; + int llz = points[2]; + int lli = 0; + int urx = points[0]; + int ury = points[1]; + int urz = points[2]; + int uri = 0; + for (int i = 0; i < points.size(); i += 4) + { + int x = points[i+0]; + int y = points[i+1]; + int z = points[i+2]; + if (x < llx || (x == llx && z < llz)) + { + llx = x; + lly = y; + llz = z; + lli = i/4; + } + if (x > urx || (x == urx && z > urz)) + { + urx = x; + ury = y; + urz = z; + uri = i/4; + } + } + simplified.push(llx); + simplified.push(lly); + simplified.push(llz); + simplified.push(lli); + + simplified.push(urx); + simplified.push(ury); + simplified.push(urz); + simplified.push(uri); + } + + // Add points until all raw points are within + // error tolerance to the simplified shape. + const int pn = points.size()/4; + for (int i = 0; i < simplified.size()/4; ) + { + int ii = (i+1) % (simplified.size()/4); + + int ax = simplified[i*4+0]; + int az = simplified[i*4+2]; + int ai = simplified[i*4+3]; + + int bx = simplified[ii*4+0]; + int bz = simplified[ii*4+2]; + int bi = simplified[ii*4+3]; + + // Find maximum deviation from the segment. + float maxd = 0; + int maxi = -1; + int ci, cinc, endi; + + // Traverse the segment in lexilogical order so that the + // max deviation is calculated similarly when traversing + // opposite segments. + if (bx > ax || (bx == ax && bz > az)) + { + cinc = 1; + ci = (ai+cinc) % pn; + endi = bi; + } + else + { + cinc = pn-1; + ci = (bi+cinc) % pn; + endi = ai; + rcSwap(ax, bx); + rcSwap(az, bz); + } + + // Tessellate only outer edges or edges between areas. + if ((points[ci*4+3] & RC_CONTOUR_REG_MASK) == 0 || + (points[ci*4+3] & RC_AREA_BORDER)) + { + while (ci != endi) + { + float d = distancePtSeg(points[ci*4+0], points[ci*4+2], ax, az, bx, bz); + if (d > maxd) + { + maxd = d; + maxi = ci; + } + ci = (ci+cinc) % pn; + } + } + + + // If the max deviation is larger than accepted error, + // add new point, else continue to next segment. + if (maxi != -1 && maxd > (maxError*maxError)) + { + // Add space for the new point. + simplified.resize(simplified.size()+4); + const int n = simplified.size()/4; + for (int j = n-1; j > i; --j) + { + simplified[j*4+0] = simplified[(j-1)*4+0]; + simplified[j*4+1] = simplified[(j-1)*4+1]; + simplified[j*4+2] = simplified[(j-1)*4+2]; + simplified[j*4+3] = simplified[(j-1)*4+3]; + } + // Add the point. + simplified[(i+1)*4+0] = points[maxi*4+0]; + simplified[(i+1)*4+1] = points[maxi*4+1]; + simplified[(i+1)*4+2] = points[maxi*4+2]; + simplified[(i+1)*4+3] = maxi; + } + else + { + ++i; + } + } + + // Split too long edges. + if (maxEdgeLen > 0 && (buildFlags & (RC_CONTOUR_TESS_WALL_EDGES|RC_CONTOUR_TESS_AREA_EDGES)) != 0) + { + for (int i = 0; i < simplified.size()/4; ) + { + const int ii = (i+1) % (simplified.size()/4); + + const int ax = simplified[i*4+0]; + const int az = simplified[i*4+2]; + const int ai = simplified[i*4+3]; + + const int bx = simplified[ii*4+0]; + const int bz = simplified[ii*4+2]; + const int bi = simplified[ii*4+3]; + + // Find maximum deviation from the segment. + int maxi = -1; + int ci = (ai+1) % pn; + + // Tessellate only outer edges or edges between areas. + bool tess = false; + // Wall edges. + if ((buildFlags & RC_CONTOUR_TESS_WALL_EDGES) && (points[ci*4+3] & RC_CONTOUR_REG_MASK) == 0) + tess = true; + // Edges between areas. + if ((buildFlags & RC_CONTOUR_TESS_AREA_EDGES) && (points[ci*4+3] & RC_AREA_BORDER)) + tess = true; + + if (tess) + { + int dx = bx - ax; + int dz = bz - az; + if (dx*dx + dz*dz > maxEdgeLen*maxEdgeLen) + { + // Round based on the segments in lexilogical order so that the + // max tesselation is consistent regardles in which direction + // segments are traversed. + const int n = bi < ai ? (bi+pn - ai) : (bi - ai); + if (n > 1) + { + if (bx > ax || (bx == ax && bz > az)) + maxi = (ai + n/2) % pn; + else + maxi = (ai + (n+1)/2) % pn; + } + } + } + + // If the max deviation is larger than accepted error, + // add new point, else continue to next segment. + if (maxi != -1) + { + // Add space for the new point. + simplified.resize(simplified.size()+4); + const int n = simplified.size()/4; + for (int j = n-1; j > i; --j) + { + simplified[j*4+0] = simplified[(j-1)*4+0]; + simplified[j*4+1] = simplified[(j-1)*4+1]; + simplified[j*4+2] = simplified[(j-1)*4+2]; + simplified[j*4+3] = simplified[(j-1)*4+3]; + } + // Add the point. + simplified[(i+1)*4+0] = points[maxi*4+0]; + simplified[(i+1)*4+1] = points[maxi*4+1]; + simplified[(i+1)*4+2] = points[maxi*4+2]; + simplified[(i+1)*4+3] = maxi; + } + else + { + ++i; + } + } + } + + for (int i = 0; i < simplified.size()/4; ++i) + { + // The edge vertex flag is take from the current raw point, + // and the neighbour region is take from the next raw point. + const int ai = (simplified[i*4+3]+1) % pn; + const int bi = simplified[i*4+3]; + simplified[i*4+3] = (points[ai*4+3] & (RC_CONTOUR_REG_MASK|RC_AREA_BORDER)) | (points[bi*4+3] & RC_BORDER_VERTEX); + } + +} + +static int calcAreaOfPolygon2D(const int* verts, const int nverts) +{ + int area = 0; + for (int i = 0, j = nverts-1; i < nverts; j=i++) + { + const int* vi = &verts[i*4]; + const int* vj = &verts[j*4]; + area += vi[0] * vj[2] - vj[0] * vi[2]; + } + return (area+1) / 2; +} + +// TODO: these are the same as in RecastMesh.cpp, consider using the same. +// Last time I checked the if version got compiled using cmov, which was a lot faster than module (with idiv). +inline int prev(int i, int n) { return i-1 >= 0 ? i-1 : n-1; } +inline int next(int i, int n) { return i+1 < n ? i+1 : 0; } + +inline int area2(const int* a, const int* b, const int* c) +{ + return (b[0] - a[0]) * (c[2] - a[2]) - (c[0] - a[0]) * (b[2] - a[2]); +} + +// Exclusive or: true iff exactly one argument is true. +// The arguments are negated to ensure that they are 0/1 +// values. Then the bitwise Xor operator may apply. +// (This idea is due to Michael Baldwin.) +inline bool xorb(bool x, bool y) +{ + return !x ^ !y; +} + +// Returns true iff c is strictly to the left of the directed +// line through a to b. +inline bool left(const int* a, const int* b, const int* c) +{ + return area2(a, b, c) < 0; +} + +inline bool leftOn(const int* a, const int* b, const int* c) +{ + return area2(a, b, c) <= 0; +} + +inline bool collinear(const int* a, const int* b, const int* c) +{ + return area2(a, b, c) == 0; +} + +// Returns true iff ab properly intersects cd: they share +// a point interior to both segments. The properness of the +// intersection is ensured by using strict leftness. +static bool intersectProp(const int* a, const int* b, const int* c, const int* d) +{ + // Eliminate improper cases. + if (collinear(a,b,c) || collinear(a,b,d) || + collinear(c,d,a) || collinear(c,d,b)) + return false; + + return xorb(left(a,b,c), left(a,b,d)) && xorb(left(c,d,a), left(c,d,b)); +} + +// Returns T iff (a,b,c) are collinear and point c lies +// on the closed segement ab. +static bool between(const int* a, const int* b, const int* c) +{ + if (!collinear(a, b, c)) + return false; + // If ab not vertical, check betweenness on x; else on y. + if (a[0] != b[0]) + return ((a[0] <= c[0]) && (c[0] <= b[0])) || ((a[0] >= c[0]) && (c[0] >= b[0])); + else + return ((a[2] <= c[2]) && (c[2] <= b[2])) || ((a[2] >= c[2]) && (c[2] >= b[2])); +} + +// Returns true iff segments ab and cd intersect, properly or improperly. +static bool intersect(const int* a, const int* b, const int* c, const int* d) +{ + if (intersectProp(a, b, c, d)) + return true; + else if (between(a, b, c) || between(a, b, d) || + between(c, d, a) || between(c, d, b)) + return true; + else + return false; +} + +static bool vequal(const int* a, const int* b) +{ + return a[0] == b[0] && a[2] == b[2]; +} + +static bool intersectSegCountour(const int* d0, const int* d1, int i, int n, const int* verts) +{ + // For each edge (k,k+1) of P + for (int k = 0; k < n; k++) + { + int k1 = next(k, n); + // Skip edges incident to i. + if (i == k || i == k1) + continue; + const int* p0 = &verts[k * 4]; + const int* p1 = &verts[k1 * 4]; + if (vequal(d0, p0) || vequal(d1, p0) || vequal(d0, p1) || vequal(d1, p1)) + continue; + + if (intersect(d0, d1, p0, p1)) + return true; + } + return false; +} + +static bool inCone(int i, int n, const int* verts, const int* pj) +{ + const int* pi = &verts[i * 4]; + const int* pi1 = &verts[next(i, n) * 4]; + const int* pin1 = &verts[prev(i, n) * 4]; + + // If P[i] is a convex vertex [ i+1 left or on (i-1,i) ]. + if (leftOn(pin1, pi, pi1)) + return left(pi, pj, pin1) && left(pj, pi, pi1); + // Assume (i-1,i,i+1) not collinear. + // else P[i] is reflex. + return !(leftOn(pi, pj, pi1) && leftOn(pj, pi, pin1)); +} + + +static void removeDegenerateSegments(rcIntArray& simplified) +{ + // Remove adjacent vertices which are equal on xz-plane, + // or else the triangulator will get confused. + int npts = simplified.size()/4; + for (int i = 0; i < npts; ++i) + { + int ni = next(i, npts); + + if (vequal(&simplified[i*4], &simplified[ni*4])) + { + // Degenerate segment, remove. + for (int j = i; j < simplified.size()/4-1; ++j) + { + simplified[j*4+0] = simplified[(j+1)*4+0]; + simplified[j*4+1] = simplified[(j+1)*4+1]; + simplified[j*4+2] = simplified[(j+1)*4+2]; + simplified[j*4+3] = simplified[(j+1)*4+3]; + } + simplified.resize(simplified.size()-4); + npts--; + } + } +} + + +static bool mergeContours(rcContour& ca, rcContour& cb, int ia, int ib) +{ + const int maxVerts = ca.nverts + cb.nverts + 2; + int* verts = (int*)rcAlloc(sizeof(int)*maxVerts*4, RC_ALLOC_PERM); + if (!verts) + return false; + + int nv = 0; + + // Copy contour A. + for (int i = 0; i <= ca.nverts; ++i) + { + int* dst = &verts[nv*4]; + const int* src = &ca.verts[((ia+i)%ca.nverts)*4]; + dst[0] = src[0]; + dst[1] = src[1]; + dst[2] = src[2]; + dst[3] = src[3]; + nv++; + } + + // Copy contour B + for (int i = 0; i <= cb.nverts; ++i) + { + int* dst = &verts[nv*4]; + const int* src = &cb.verts[((ib+i)%cb.nverts)*4]; + dst[0] = src[0]; + dst[1] = src[1]; + dst[2] = src[2]; + dst[3] = src[3]; + nv++; + } + + rcFree(ca.verts); + ca.verts = verts; + ca.nverts = nv; + + rcFree(cb.verts); + cb.verts = 0; + cb.nverts = 0; + + return true; +} + +struct rcContourHole +{ + rcContour* contour; + int minx, minz, leftmost; +}; + +struct rcContourRegion +{ + rcContour* outline; + rcContourHole* holes; + int nholes; +}; + +struct rcPotentialDiagonal +{ + int vert; + int dist; +}; + +// Finds the lowest leftmost vertex of a contour. +static void findLeftMostVertex(rcContour* contour, int* minx, int* minz, int* leftmost) +{ + *minx = contour->verts[0]; + *minz = contour->verts[2]; + *leftmost = 0; + for (int i = 1; i < contour->nverts; i++) + { + const int x = contour->verts[i*4+0]; + const int z = contour->verts[i*4+2]; + if (x < *minx || (x == *minx && z < *minz)) + { + *minx = x; + *minz = z; + *leftmost = i; + } + } +} + +static int compareHoles(const void* va, const void* vb) +{ + const rcContourHole* a = (const rcContourHole*)va; + const rcContourHole* b = (const rcContourHole*)vb; + if (a->minx == b->minx) + { + if (a->minz < b->minz) + return -1; + if (a->minz > b->minz) + return 1; + } + else + { + if (a->minx < b->minx) + return -1; + if (a->minx > b->minx) + return 1; + } + return 0; +} + + +static int compareDiagDist(const void* va, const void* vb) +{ + const rcPotentialDiagonal* a = (const rcPotentialDiagonal*)va; + const rcPotentialDiagonal* b = (const rcPotentialDiagonal*)vb; + if (a->dist < b->dist) + return -1; + if (a->dist > b->dist) + return 1; + return 0; +} + + +static void mergeRegionHoles(rcContext* ctx, rcContourRegion& region) +{ + // Sort holes from left to right. + for (int i = 0; i < region.nholes; i++) + findLeftMostVertex(region.holes[i].contour, ®ion.holes[i].minx, ®ion.holes[i].minz, ®ion.holes[i].leftmost); + + qsort(region.holes, region.nholes, sizeof(rcContourHole), compareHoles); + + int maxVerts = region.outline->nverts; + for (int i = 0; i < region.nholes; i++) + maxVerts += region.holes[i].contour->nverts; + + rcScopedDelete diags((rcPotentialDiagonal*)rcAlloc(sizeof(rcPotentialDiagonal)*maxVerts, RC_ALLOC_TEMP)); + if (!diags) + { + ctx->log(RC_LOG_WARNING, "mergeRegionHoles: Failed to allocated diags %d.", maxVerts); + return; + } + + rcContour* outline = region.outline; + + // Merge holes into the outline one by one. + for (int i = 0; i < region.nholes; i++) + { + rcContour* hole = region.holes[i].contour; + + int index = -1; + int bestVertex = region.holes[i].leftmost; + for (int iter = 0; iter < hole->nverts; iter++) + { + // Find potential diagonals. + // The 'best' vertex must be in the cone described by 3 cosequtive vertices of the outline. + // ..o j-1 + // | + // | * best + // | + // j o-----o j+1 + // : + int ndiags = 0; + const int* corner = &hole->verts[bestVertex*4]; + for (int j = 0; j < outline->nverts; j++) + { + if (inCone(j, outline->nverts, outline->verts, corner)) + { + int dx = outline->verts[j*4+0] - corner[0]; + int dz = outline->verts[j*4+2] - corner[2]; + diags[ndiags].vert = j; + diags[ndiags].dist = dx*dx + dz*dz; + ndiags++; + } + } + // Sort potential diagonals by distance, we want to make the connection as short as possible. + qsort(diags, ndiags, sizeof(rcPotentialDiagonal), compareDiagDist); + + // Find a diagonal that is not intersecting the outline not the remaining holes. + index = -1; + for (int j = 0; j < ndiags; j++) + { + const int* pt = &outline->verts[diags[j].vert*4]; + bool intersect = intersectSegCountour(pt, corner, diags[i].vert, outline->nverts, outline->verts); + for (int k = i; k < region.nholes && !intersect; k++) + intersect |= intersectSegCountour(pt, corner, -1, region.holes[k].contour->nverts, region.holes[k].contour->verts); + if (!intersect) + { + index = diags[j].vert; + break; + } + } + // If found non-intersecting diagonal, stop looking. + if (index != -1) + break; + // All the potential diagonals for the current vertex were intersecting, try next vertex. + bestVertex = (bestVertex + 1) % hole->nverts; + } + + if (index == -1) + { + ctx->log(RC_LOG_WARNING, "mergeHoles: Failed to find merge points for %p and %p.", region.outline, hole); + continue; + } + if (!mergeContours(*region.outline, *hole, index, bestVertex)) + { + ctx->log(RC_LOG_WARNING, "mergeHoles: Failed to merge contours %p and %p.", region.outline, hole); + continue; + } + } +} + + +/// @par +/// +/// The raw contours will match the region outlines exactly. The @p maxError and @p maxEdgeLen +/// parameters control how closely the simplified contours will match the raw contours. +/// +/// Simplified contours are generated such that the vertices for portals between areas match up. +/// (They are considered mandatory vertices.) +/// +/// Setting @p maxEdgeLength to zero will disabled the edge length feature. +/// +/// See the #rcConfig documentation for more information on the configuration parameters. +/// +/// @see rcAllocContourSet, rcCompactHeightfield, rcContourSet, rcConfig +bool rcBuildContours(rcContext* ctx, rcCompactHeightfield& chf, + const float maxError, const int maxEdgeLen, + rcContourSet& cset, const int buildFlags) +{ + rcAssert(ctx); + + const int w = chf.width; + const int h = chf.height; + const int borderSize = chf.borderSize; + + rcScopedTimer timer(ctx, RC_TIMER_BUILD_CONTOURS); + + rcVcopy(cset.bmin, chf.bmin); + rcVcopy(cset.bmax, chf.bmax); + if (borderSize > 0) + { + // If the heightfield was build with bordersize, remove the offset. + const float pad = borderSize*chf.cs; + cset.bmin[0] += pad; + cset.bmin[2] += pad; + cset.bmax[0] -= pad; + cset.bmax[2] -= pad; + } + cset.cs = chf.cs; + cset.ch = chf.ch; + cset.width = chf.width - chf.borderSize*2; + cset.height = chf.height - chf.borderSize*2; + cset.borderSize = chf.borderSize; + cset.maxError = maxError; + + int maxContours = rcMax((int)chf.maxRegions, 8); + cset.conts = (rcContour*)rcAlloc(sizeof(rcContour)*maxContours, RC_ALLOC_PERM); + if (!cset.conts) + return false; + cset.nconts = 0; + + rcScopedDelete flags((unsigned char*)rcAlloc(sizeof(unsigned char)*chf.spanCount, RC_ALLOC_TEMP)); + if (!flags) + { + ctx->log(RC_LOG_ERROR, "rcBuildContours: Out of memory 'flags' (%d).", chf.spanCount); + return false; + } + + ctx->startTimer(RC_TIMER_BUILD_CONTOURS_TRACE); + + // Mark boundaries. + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + const rcCompactCell& c = chf.cells[x+y*w]; + for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i) + { + unsigned char res = 0; + const rcCompactSpan& s = chf.spans[i]; + if (!chf.spans[i].reg || (chf.spans[i].reg & RC_BORDER_REG)) + { + flags[i] = 0; + continue; + } + for (int dir = 0; dir < 4; ++dir) + { + unsigned short r = 0; + if (rcGetCon(s, dir) != RC_NOT_CONNECTED) + { + const int ax = x + rcGetDirOffsetX(dir); + const int ay = y + rcGetDirOffsetY(dir); + const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, dir); + r = chf.spans[ai].reg; + } + if (r == chf.spans[i].reg) + res |= (1 << dir); + } + flags[i] = res ^ 0xf; // Inverse, mark non connected edges. + } + } + } + + ctx->stopTimer(RC_TIMER_BUILD_CONTOURS_TRACE); + + rcIntArray verts(256); + rcIntArray simplified(64); + + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + const rcCompactCell& c = chf.cells[x+y*w]; + for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i) + { + if (flags[i] == 0 || flags[i] == 0xf) + { + flags[i] = 0; + continue; + } + const unsigned short reg = chf.spans[i].reg; + if (!reg || (reg & RC_BORDER_REG)) + continue; + const unsigned char area = chf.areas[i]; + + verts.resize(0); + simplified.resize(0); + + ctx->startTimer(RC_TIMER_BUILD_CONTOURS_TRACE); + walkContour(x, y, i, chf, flags, verts); + ctx->stopTimer(RC_TIMER_BUILD_CONTOURS_TRACE); + + ctx->startTimer(RC_TIMER_BUILD_CONTOURS_SIMPLIFY); + simplifyContour(verts, simplified, maxError, maxEdgeLen, buildFlags); + removeDegenerateSegments(simplified); + ctx->stopTimer(RC_TIMER_BUILD_CONTOURS_SIMPLIFY); + + + // Store region->contour remap info. + // Create contour. + if (simplified.size()/4 >= 3) + { + if (cset.nconts >= maxContours) + { + // Allocate more contours. + // This happens when a region has holes. + const int oldMax = maxContours; + maxContours *= 2; + rcContour* newConts = (rcContour*)rcAlloc(sizeof(rcContour)*maxContours, RC_ALLOC_PERM); + for (int j = 0; j < cset.nconts; ++j) + { + newConts[j] = cset.conts[j]; + // Reset source pointers to prevent data deletion. + cset.conts[j].verts = 0; + cset.conts[j].rverts = 0; + } + rcFree(cset.conts); + cset.conts = newConts; + + ctx->log(RC_LOG_WARNING, "rcBuildContours: Expanding max contours from %d to %d.", oldMax, maxContours); + } + + rcContour* cont = &cset.conts[cset.nconts++]; + + cont->nverts = simplified.size()/4; + cont->verts = (int*)rcAlloc(sizeof(int)*cont->nverts*4, RC_ALLOC_PERM); + if (!cont->verts) + { + ctx->log(RC_LOG_ERROR, "rcBuildContours: Out of memory 'verts' (%d).", cont->nverts); + return false; + } + memcpy(cont->verts, &simplified[0], sizeof(int)*cont->nverts*4); + if (borderSize > 0) + { + // If the heightfield was build with bordersize, remove the offset. + for (int j = 0; j < cont->nverts; ++j) + { + int* v = &cont->verts[j*4]; + v[0] -= borderSize; + v[2] -= borderSize; + } + } + + cont->nrverts = verts.size()/4; + cont->rverts = (int*)rcAlloc(sizeof(int)*cont->nrverts*4, RC_ALLOC_PERM); + if (!cont->rverts) + { + ctx->log(RC_LOG_ERROR, "rcBuildContours: Out of memory 'rverts' (%d).", cont->nrverts); + return false; + } + memcpy(cont->rverts, &verts[0], sizeof(int)*cont->nrverts*4); + if (borderSize > 0) + { + // If the heightfield was build with bordersize, remove the offset. + for (int j = 0; j < cont->nrverts; ++j) + { + int* v = &cont->rverts[j*4]; + v[0] -= borderSize; + v[2] -= borderSize; + } + } + + cont->reg = reg; + cont->area = area; + } + } + } + } + + // Merge holes if needed. + if (cset.nconts > 0) + { + // Calculate winding of all polygons. + rcScopedDelete winding((char*)rcAlloc(sizeof(char)*cset.nconts, RC_ALLOC_TEMP)); + if (!winding) + { + ctx->log(RC_LOG_ERROR, "rcBuildContours: Out of memory 'hole' (%d).", cset.nconts); + return false; + } + int nholes = 0; + for (int i = 0; i < cset.nconts; ++i) + { + rcContour& cont = cset.conts[i]; + // If the contour is wound backwards, it is a hole. + winding[i] = calcAreaOfPolygon2D(cont.verts, cont.nverts) < 0 ? -1 : 1; + if (winding[i] < 0) + nholes++; + } + + if (nholes > 0) + { + // Collect outline contour and holes contours per region. + // We assume that there is one outline and multiple holes. + const int nregions = chf.maxRegions+1; + rcScopedDelete regions((rcContourRegion*)rcAlloc(sizeof(rcContourRegion)*nregions, RC_ALLOC_TEMP)); + if (!regions) + { + ctx->log(RC_LOG_ERROR, "rcBuildContours: Out of memory 'regions' (%d).", nregions); + return false; + } + memset(regions, 0, sizeof(rcContourRegion)*nregions); + + rcScopedDelete holes((rcContourHole*)rcAlloc(sizeof(rcContourHole)*cset.nconts, RC_ALLOC_TEMP)); + if (!holes) + { + ctx->log(RC_LOG_ERROR, "rcBuildContours: Out of memory 'holes' (%d).", cset.nconts); + return false; + } + memset(holes, 0, sizeof(rcContourHole)*cset.nconts); + + for (int i = 0; i < cset.nconts; ++i) + { + rcContour& cont = cset.conts[i]; + // Positively would contours are outlines, negative holes. + if (winding[i] > 0) + { + if (regions[cont.reg].outline) + ctx->log(RC_LOG_ERROR, "rcBuildContours: Multiple outlines for region %d.", cont.reg); + regions[cont.reg].outline = &cont; + } + else + { + regions[cont.reg].nholes++; + } + } + int index = 0; + for (int i = 0; i < nregions; i++) + { + if (regions[i].nholes > 0) + { + regions[i].holes = &holes[index]; + index += regions[i].nholes; + regions[i].nholes = 0; + } + } + for (int i = 0; i < cset.nconts; ++i) + { + rcContour& cont = cset.conts[i]; + rcContourRegion& reg = regions[cont.reg]; + if (winding[i] < 0) + reg.holes[reg.nholes++].contour = &cont; + } + + // Finally merge each regions holes into the outline. + for (int i = 0; i < nregions; i++) + { + rcContourRegion& reg = regions[i]; + if (!reg.nholes) continue; + + if (reg.outline) + { + mergeRegionHoles(ctx, reg); + } + else + { + // The region does not have an outline. + // This can happen if the contour becaomes selfoverlapping because of + // too aggressive simplification settings. + ctx->log(RC_LOG_ERROR, "rcBuildContours: Bad outline for region %d, contour simplification is likely too aggressive.", i); + } + } + } + + } + + return true; +} diff --git a/libs/recast/recast/src/RecastFilter.cpp b/libs/recast/recast/src/RecastFilter.cpp new file mode 100644 index 000000000..9d3e63c48 --- /dev/null +++ b/libs/recast/recast/src/RecastFilter.cpp @@ -0,0 +1,202 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#define _USE_MATH_DEFINES +#include +#include +#include "Recast.h" +#include "RecastAssert.h" + +/// @par +/// +/// Allows the formation of walkable regions that will flow over low lying +/// objects such as curbs, and up structures such as stairways. +/// +/// Two neighboring spans are walkable if: rcAbs(currentSpan.smax - neighborSpan.smax) < waklableClimb +/// +/// @warning Will override the effect of #rcFilterLedgeSpans. So if both filters are used, call +/// #rcFilterLedgeSpans after calling this filter. +/// +/// @see rcHeightfield, rcConfig +void rcFilterLowHangingWalkableObstacles(rcContext* ctx, const int walkableClimb, rcHeightfield& solid) +{ + rcAssert(ctx); + + rcScopedTimer timer(ctx, RC_TIMER_FILTER_LOW_OBSTACLES); + + const int w = solid.width; + const int h = solid.height; + + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + rcSpan* ps = 0; + bool previousWalkable = false; + unsigned char previousArea = RC_NULL_AREA; + + for (rcSpan* s = solid.spans[x + y*w]; s; ps = s, s = s->next) + { + const bool walkable = s->area != RC_NULL_AREA; + // If current span is not walkable, but there is walkable + // span just below it, mark the span above it walkable too. + if (!walkable && previousWalkable) + { + if (rcAbs((int)s->smax - (int)ps->smax) <= walkableClimb) + s->area = previousArea; + } + // Copy walkable flag so that it cannot propagate + // past multiple non-walkable objects. + previousWalkable = walkable; + previousArea = s->area; + } + } + } +} + +/// @par +/// +/// A ledge is a span with one or more neighbors whose maximum is further away than @p walkableClimb +/// from the current span's maximum. +/// This method removes the impact of the overestimation of conservative voxelization +/// so the resulting mesh will not have regions hanging in the air over ledges. +/// +/// A span is a ledge if: rcAbs(currentSpan.smax - neighborSpan.smax) > walkableClimb +/// +/// @see rcHeightfield, rcConfig +void rcFilterLedgeSpans(rcContext* ctx, const int walkableHeight, const int walkableClimb, + rcHeightfield& solid) +{ + rcAssert(ctx); + + rcScopedTimer timer(ctx, RC_TIMER_FILTER_BORDER); + + const int w = solid.width; + const int h = solid.height; + const int MAX_HEIGHT = 0xffff; + + // Mark border spans. + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + for (rcSpan* s = solid.spans[x + y*w]; s; s = s->next) + { + // Skip non walkable spans. + if (s->area == RC_NULL_AREA) + continue; + + const int bot = (int)(s->smax); + const int top = s->next ? (int)(s->next->smin) : MAX_HEIGHT; + + // Find neighbours minimum height. + int minh = MAX_HEIGHT; + + // Min and max height of accessible neighbours. + int asmin = s->smax; + int asmax = s->smax; + + for (int dir = 0; dir < 4; ++dir) + { + int dx = x + rcGetDirOffsetX(dir); + int dy = y + rcGetDirOffsetY(dir); + // Skip neighbours which are out of bounds. + if (dx < 0 || dy < 0 || dx >= w || dy >= h) + { + minh = rcMin(minh, -walkableClimb - bot); + continue; + } + + // From minus infinity to the first span. + rcSpan* ns = solid.spans[dx + dy*w]; + int nbot = -walkableClimb; + int ntop = ns ? (int)ns->smin : MAX_HEIGHT; + // Skip neightbour if the gap between the spans is too small. + if (rcMin(top,ntop) - rcMax(bot,nbot) > walkableHeight) + minh = rcMin(minh, nbot - bot); + + // Rest of the spans. + for (ns = solid.spans[dx + dy*w]; ns; ns = ns->next) + { + nbot = (int)ns->smax; + ntop = ns->next ? (int)ns->next->smin : MAX_HEIGHT; + // Skip neightbour if the gap between the spans is too small. + if (rcMin(top,ntop) - rcMax(bot,nbot) > walkableHeight) + { + minh = rcMin(minh, nbot - bot); + + // Find min/max accessible neighbour height. + if (rcAbs(nbot - bot) <= walkableClimb) + { + if (nbot < asmin) asmin = nbot; + if (nbot > asmax) asmax = nbot; + } + + } + } + } + + // The current span is close to a ledge if the drop to any + // neighbour span is less than the walkableClimb. + if (minh < -walkableClimb) + { + s->area = RC_NULL_AREA; + } + // If the difference between all neighbours is too large, + // we are at steep slope, mark the span as ledge. + else if ((asmax - asmin) > walkableClimb) + { + s->area = RC_NULL_AREA; + } + } + } + } +} + +/// @par +/// +/// For this filter, the clearance above the span is the distance from the span's +/// maximum to the next higher span's minimum. (Same grid column.) +/// +/// @see rcHeightfield, rcConfig +void rcFilterWalkableLowHeightSpans(rcContext* ctx, int walkableHeight, rcHeightfield& solid) +{ + rcAssert(ctx); + + rcScopedTimer timer(ctx, RC_TIMER_FILTER_WALKABLE); + + const int w = solid.width; + const int h = solid.height; + const int MAX_HEIGHT = 0xffff; + + // Remove walkable flag from spans which do not have enough + // space above them for the agent to stand there. + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + for (rcSpan* s = solid.spans[x + y*w]; s; s = s->next) + { + const int bot = (int)(s->smax); + const int top = s->next ? (int)(s->next->smin) : MAX_HEIGHT; + if ((top - bot) <= walkableHeight) + s->area = RC_NULL_AREA; + } + } + } +} diff --git a/libs/recast/recast/src/RecastLayers.cpp b/libs/recast/recast/src/RecastLayers.cpp new file mode 100644 index 000000000..acc97e44f --- /dev/null +++ b/libs/recast/recast/src/RecastLayers.cpp @@ -0,0 +1,644 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#include +#define _USE_MATH_DEFINES +#include +#include +#include +#include +#include "Recast.h" +#include "RecastAlloc.h" +#include "RecastAssert.h" + + +// Must be 255 or smaller (not 256) because layer IDs are stored as +// a byte where 255 is a special value. +static const int RC_MAX_LAYERS = 63; +static const int RC_MAX_NEIS = 16; + +struct rcLayerRegion +{ + unsigned char layers[RC_MAX_LAYERS]; + unsigned char neis[RC_MAX_NEIS]; + unsigned short ymin, ymax; + unsigned char layerId; // Layer ID + unsigned char nlayers; // Layer count + unsigned char nneis; // Neighbour count + unsigned char base; // Flag indicating if the region is the base of merged regions. +}; + + +static bool contains(const unsigned char* a, const unsigned char an, const unsigned char v) +{ + const int n = (int)an; + for (int i = 0; i < n; ++i) + { + if (a[i] == v) + return true; + } + return false; +} + +static bool addUnique(unsigned char* a, unsigned char& an, int anMax, unsigned char v) +{ + if (contains(a, an, v)) + return true; + + if ((int)an >= anMax) + return false; + + a[an] = v; + an++; + return true; +} + + +inline bool overlapRange(const unsigned short amin, const unsigned short amax, + const unsigned short bmin, const unsigned short bmax) +{ + return (amin > bmax || amax < bmin) ? false : true; +} + + + +struct rcLayerSweepSpan +{ + unsigned short ns; // number samples + unsigned char id; // region id + unsigned char nei; // neighbour id +}; + +/// @par +/// +/// See the #rcConfig documentation for more information on the configuration parameters. +/// +/// @see rcAllocHeightfieldLayerSet, rcCompactHeightfield, rcHeightfieldLayerSet, rcConfig +bool rcBuildHeightfieldLayers(rcContext* ctx, rcCompactHeightfield& chf, + const int borderSize, const int walkableHeight, + rcHeightfieldLayerSet& lset) +{ + rcAssert(ctx); + + rcScopedTimer timer(ctx, RC_TIMER_BUILD_LAYERS); + + const int w = chf.width; + const int h = chf.height; + + rcScopedDelete srcReg((unsigned char*)rcAlloc(sizeof(unsigned char)*chf.spanCount, RC_ALLOC_TEMP)); + if (!srcReg) + { + ctx->log(RC_LOG_ERROR, "rcBuildHeightfieldLayers: Out of memory 'srcReg' (%d).", chf.spanCount); + return false; + } + memset(srcReg,0xff,sizeof(unsigned char)*chf.spanCount); + + const int nsweeps = chf.width; + rcScopedDelete sweeps((rcLayerSweepSpan*)rcAlloc(sizeof(rcLayerSweepSpan)*nsweeps, RC_ALLOC_TEMP)); + if (!sweeps) + { + ctx->log(RC_LOG_ERROR, "rcBuildHeightfieldLayers: Out of memory 'sweeps' (%d).", nsweeps); + return false; + } + + + // Partition walkable area into monotone regions. + int prevCount[256]; + unsigned char regId = 0; + + for (int y = borderSize; y < h-borderSize; ++y) + { + memset(prevCount,0,sizeof(int)*regId); + unsigned char sweepId = 0; + + for (int x = borderSize; x < w-borderSize; ++x) + { + const rcCompactCell& c = chf.cells[x+y*w]; + + for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i) + { + const rcCompactSpan& s = chf.spans[i]; + if (chf.areas[i] == RC_NULL_AREA) continue; + + unsigned char sid = 0xff; + + // -x + if (rcGetCon(s, 0) != RC_NOT_CONNECTED) + { + const int ax = x + rcGetDirOffsetX(0); + const int ay = y + rcGetDirOffsetY(0); + const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 0); + if (chf.areas[ai] != RC_NULL_AREA && srcReg[ai] != 0xff) + sid = srcReg[ai]; + } + + if (sid == 0xff) + { + sid = sweepId++; + sweeps[sid].nei = 0xff; + sweeps[sid].ns = 0; + } + + // -y + if (rcGetCon(s,3) != RC_NOT_CONNECTED) + { + const int ax = x + rcGetDirOffsetX(3); + const int ay = y + rcGetDirOffsetY(3); + const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 3); + const unsigned char nr = srcReg[ai]; + if (nr != 0xff) + { + // Set neighbour when first valid neighbour is encoutered. + if (sweeps[sid].ns == 0) + sweeps[sid].nei = nr; + + if (sweeps[sid].nei == nr) + { + // Update existing neighbour + sweeps[sid].ns++; + prevCount[nr]++; + } + else + { + // This is hit if there is nore than one neighbour. + // Invalidate the neighbour. + sweeps[sid].nei = 0xff; + } + } + } + + srcReg[i] = sid; + } + } + + // Create unique ID. + for (int i = 0; i < sweepId; ++i) + { + // If the neighbour is set and there is only one continuous connection to it, + // the sweep will be merged with the previous one, else new region is created. + if (sweeps[i].nei != 0xff && prevCount[sweeps[i].nei] == (int)sweeps[i].ns) + { + sweeps[i].id = sweeps[i].nei; + } + else + { + if (regId == 255) + { + ctx->log(RC_LOG_ERROR, "rcBuildHeightfieldLayers: Region ID overflow."); + return false; + } + sweeps[i].id = regId++; + } + } + + // Remap local sweep ids to region ids. + for (int x = borderSize; x < w-borderSize; ++x) + { + const rcCompactCell& c = chf.cells[x+y*w]; + for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i) + { + if (srcReg[i] != 0xff) + srcReg[i] = sweeps[srcReg[i]].id; + } + } + } + + // Allocate and init layer regions. + const int nregs = (int)regId; + rcScopedDelete regs((rcLayerRegion*)rcAlloc(sizeof(rcLayerRegion)*nregs, RC_ALLOC_TEMP)); + if (!regs) + { + ctx->log(RC_LOG_ERROR, "rcBuildHeightfieldLayers: Out of memory 'regs' (%d).", nregs); + return false; + } + memset(regs, 0, sizeof(rcLayerRegion)*nregs); + for (int i = 0; i < nregs; ++i) + { + regs[i].layerId = 0xff; + regs[i].ymin = 0xffff; + regs[i].ymax = 0; + } + + // Find region neighbours and overlapping regions. + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + const rcCompactCell& c = chf.cells[x+y*w]; + + unsigned char lregs[RC_MAX_LAYERS]; + int nlregs = 0; + + for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i) + { + const rcCompactSpan& s = chf.spans[i]; + const unsigned char ri = srcReg[i]; + if (ri == 0xff) continue; + + regs[ri].ymin = rcMin(regs[ri].ymin, s.y); + regs[ri].ymax = rcMax(regs[ri].ymax, s.y); + + // Collect all region layers. + if (nlregs < RC_MAX_LAYERS) + lregs[nlregs++] = ri; + + // Update neighbours + for (int dir = 0; dir < 4; ++dir) + { + if (rcGetCon(s, dir) != RC_NOT_CONNECTED) + { + const int ax = x + rcGetDirOffsetX(dir); + const int ay = y + rcGetDirOffsetY(dir); + const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, dir); + const unsigned char rai = srcReg[ai]; + if (rai != 0xff && rai != ri) + { + // Don't check return value -- if we cannot add the neighbor + // it will just cause a few more regions to be created, which + // is fine. + addUnique(regs[ri].neis, regs[ri].nneis, RC_MAX_NEIS, rai); + } + } + } + + } + + // Update overlapping regions. + for (int i = 0; i < nlregs-1; ++i) + { + for (int j = i+1; j < nlregs; ++j) + { + if (lregs[i] != lregs[j]) + { + rcLayerRegion& ri = regs[lregs[i]]; + rcLayerRegion& rj = regs[lregs[j]]; + + if (!addUnique(ri.layers, ri.nlayers, RC_MAX_LAYERS, lregs[j]) || + !addUnique(rj.layers, rj.nlayers, RC_MAX_LAYERS, lregs[i])) + { + ctx->log(RC_LOG_ERROR, "rcBuildHeightfieldLayers: layer overflow (too many overlapping walkable platforms). Try increasing RC_MAX_LAYERS."); + return false; + } + } + } + } + + } + } + + // Create 2D layers from regions. + unsigned char layerId = 0; + + static const int MAX_STACK = 64; + unsigned char stack[MAX_STACK]; + int nstack = 0; + + for (int i = 0; i < nregs; ++i) + { + rcLayerRegion& root = regs[i]; + // Skip already visited. + if (root.layerId != 0xff) + continue; + + // Start search. + root.layerId = layerId; + root.base = 1; + + nstack = 0; + stack[nstack++] = (unsigned char)i; + + while (nstack) + { + // Pop front + rcLayerRegion& reg = regs[stack[0]]; + nstack--; + for (int j = 0; j < nstack; ++j) + stack[j] = stack[j+1]; + + const int nneis = (int)reg.nneis; + for (int j = 0; j < nneis; ++j) + { + const unsigned char nei = reg.neis[j]; + rcLayerRegion& regn = regs[nei]; + // Skip already visited. + if (regn.layerId != 0xff) + continue; + // Skip if the neighbour is overlapping root region. + if (contains(root.layers, root.nlayers, nei)) + continue; + // Skip if the height range would become too large. + const int ymin = rcMin(root.ymin, regn.ymin); + const int ymax = rcMax(root.ymax, regn.ymax); + if ((ymax - ymin) >= 255) + continue; + + if (nstack < MAX_STACK) + { + // Deepen + stack[nstack++] = (unsigned char)nei; + + // Mark layer id + regn.layerId = layerId; + // Merge current layers to root. + for (int k = 0; k < regn.nlayers; ++k) + { + if (!addUnique(root.layers, root.nlayers, RC_MAX_LAYERS, regn.layers[k])) + { + ctx->log(RC_LOG_ERROR, "rcBuildHeightfieldLayers: layer overflow (too many overlapping walkable platforms). Try increasing RC_MAX_LAYERS."); + return false; + } + } + root.ymin = rcMin(root.ymin, regn.ymin); + root.ymax = rcMax(root.ymax, regn.ymax); + } + } + } + + layerId++; + } + + // Merge non-overlapping regions that are close in height. + const unsigned short mergeHeight = (unsigned short)walkableHeight * 4; + + for (int i = 0; i < nregs; ++i) + { + rcLayerRegion& ri = regs[i]; + if (!ri.base) continue; + + unsigned char newId = ri.layerId; + + for (;;) + { + unsigned char oldId = 0xff; + + for (int j = 0; j < nregs; ++j) + { + if (i == j) continue; + rcLayerRegion& rj = regs[j]; + if (!rj.base) continue; + + // Skip if the regions are not close to each other. + if (!overlapRange(ri.ymin,ri.ymax+mergeHeight, rj.ymin,rj.ymax+mergeHeight)) + continue; + // Skip if the height range would become too large. + const int ymin = rcMin(ri.ymin, rj.ymin); + const int ymax = rcMax(ri.ymax, rj.ymax); + if ((ymax - ymin) >= 255) + continue; + + // Make sure that there is no overlap when merging 'ri' and 'rj'. + bool overlap = false; + // Iterate over all regions which have the same layerId as 'rj' + for (int k = 0; k < nregs; ++k) + { + if (regs[k].layerId != rj.layerId) + continue; + // Check if region 'k' is overlapping region 'ri' + // Index to 'regs' is the same as region id. + if (contains(ri.layers,ri.nlayers, (unsigned char)k)) + { + overlap = true; + break; + } + } + // Cannot merge of regions overlap. + if (overlap) + continue; + + // Can merge i and j. + oldId = rj.layerId; + break; + } + + // Could not find anything to merge with, stop. + if (oldId == 0xff) + break; + + // Merge + for (int j = 0; j < nregs; ++j) + { + rcLayerRegion& rj = regs[j]; + if (rj.layerId == oldId) + { + rj.base = 0; + // Remap layerIds. + rj.layerId = newId; + // Add overlaid layers from 'rj' to 'ri'. + for (int k = 0; k < rj.nlayers; ++k) + { + if (!addUnique(ri.layers, ri.nlayers, RC_MAX_LAYERS, rj.layers[k])) + { + ctx->log(RC_LOG_ERROR, "rcBuildHeightfieldLayers: layer overflow (too many overlapping walkable platforms). Try increasing RC_MAX_LAYERS."); + return false; + } + } + + // Update height bounds. + ri.ymin = rcMin(ri.ymin, rj.ymin); + ri.ymax = rcMax(ri.ymax, rj.ymax); + } + } + } + } + + // Compact layerIds + unsigned char remap[256]; + memset(remap, 0, 256); + + // Find number of unique layers. + layerId = 0; + for (int i = 0; i < nregs; ++i) + remap[regs[i].layerId] = 1; + for (int i = 0; i < 256; ++i) + { + if (remap[i]) + remap[i] = layerId++; + else + remap[i] = 0xff; + } + // Remap ids. + for (int i = 0; i < nregs; ++i) + regs[i].layerId = remap[regs[i].layerId]; + + // No layers, return empty. + if (layerId == 0) + return true; + + // Create layers. + rcAssert(lset.layers == 0); + + const int lw = w - borderSize*2; + const int lh = h - borderSize*2; + + // Build contracted bbox for layers. + float bmin[3], bmax[3]; + rcVcopy(bmin, chf.bmin); + rcVcopy(bmax, chf.bmax); + bmin[0] += borderSize*chf.cs; + bmin[2] += borderSize*chf.cs; + bmax[0] -= borderSize*chf.cs; + bmax[2] -= borderSize*chf.cs; + + lset.nlayers = (int)layerId; + + lset.layers = (rcHeightfieldLayer*)rcAlloc(sizeof(rcHeightfieldLayer)*lset.nlayers, RC_ALLOC_PERM); + if (!lset.layers) + { + ctx->log(RC_LOG_ERROR, "rcBuildHeightfieldLayers: Out of memory 'layers' (%d).", lset.nlayers); + return false; + } + memset(lset.layers, 0, sizeof(rcHeightfieldLayer)*lset.nlayers); + + + // Store layers. + for (int i = 0; i < lset.nlayers; ++i) + { + unsigned char curId = (unsigned char)i; + + rcHeightfieldLayer* layer = &lset.layers[i]; + + const int gridSize = sizeof(unsigned char)*lw*lh; + + layer->heights = (unsigned char*)rcAlloc(gridSize, RC_ALLOC_PERM); + if (!layer->heights) + { + ctx->log(RC_LOG_ERROR, "rcBuildHeightfieldLayers: Out of memory 'heights' (%d).", gridSize); + return false; + } + memset(layer->heights, 0xff, gridSize); + + layer->areas = (unsigned char*)rcAlloc(gridSize, RC_ALLOC_PERM); + if (!layer->areas) + { + ctx->log(RC_LOG_ERROR, "rcBuildHeightfieldLayers: Out of memory 'areas' (%d).", gridSize); + return false; + } + memset(layer->areas, 0, gridSize); + + layer->cons = (unsigned char*)rcAlloc(gridSize, RC_ALLOC_PERM); + if (!layer->cons) + { + ctx->log(RC_LOG_ERROR, "rcBuildHeightfieldLayers: Out of memory 'cons' (%d).", gridSize); + return false; + } + memset(layer->cons, 0, gridSize); + + // Find layer height bounds. + int hmin = 0, hmax = 0; + for (int j = 0; j < nregs; ++j) + { + if (regs[j].base && regs[j].layerId == curId) + { + hmin = (int)regs[j].ymin; + hmax = (int)regs[j].ymax; + } + } + + layer->width = lw; + layer->height = lh; + layer->cs = chf.cs; + layer->ch = chf.ch; + + // Adjust the bbox to fit the heightfield. + rcVcopy(layer->bmin, bmin); + rcVcopy(layer->bmax, bmax); + layer->bmin[1] = bmin[1] + hmin*chf.ch; + layer->bmax[1] = bmin[1] + hmax*chf.ch; + layer->hmin = hmin; + layer->hmax = hmax; + + // Update usable data region. + layer->minx = layer->width; + layer->maxx = 0; + layer->miny = layer->height; + layer->maxy = 0; + + // Copy height and area from compact heightfield. + for (int y = 0; y < lh; ++y) + { + for (int x = 0; x < lw; ++x) + { + const int cx = borderSize+x; + const int cy = borderSize+y; + const rcCompactCell& c = chf.cells[cx+cy*w]; + for (int j = (int)c.index, nj = (int)(c.index+c.count); j < nj; ++j) + { + const rcCompactSpan& s = chf.spans[j]; + // Skip unassigned regions. + if (srcReg[j] == 0xff) + continue; + // Skip of does nto belong to current layer. + unsigned char lid = regs[srcReg[j]].layerId; + if (lid != curId) + continue; + + // Update data bounds. + layer->minx = rcMin(layer->minx, x); + layer->maxx = rcMax(layer->maxx, x); + layer->miny = rcMin(layer->miny, y); + layer->maxy = rcMax(layer->maxy, y); + + // Store height and area type. + const int idx = x+y*lw; + layer->heights[idx] = (unsigned char)(s.y - hmin); + layer->areas[idx] = chf.areas[j]; + + // Check connection. + unsigned char portal = 0; + unsigned char con = 0; + for (int dir = 0; dir < 4; ++dir) + { + if (rcGetCon(s, dir) != RC_NOT_CONNECTED) + { + const int ax = cx + rcGetDirOffsetX(dir); + const int ay = cy + rcGetDirOffsetY(dir); + const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, dir); + unsigned char alid = srcReg[ai] != 0xff ? regs[srcReg[ai]].layerId : 0xff; + // Portal mask + if (chf.areas[ai] != RC_NULL_AREA && lid != alid) + { + portal |= (unsigned char)(1< hmin) + layer->heights[idx] = rcMax(layer->heights[idx], (unsigned char)(as.y - hmin)); + } + // Valid connection mask + if (chf.areas[ai] != RC_NULL_AREA && lid == alid) + { + const int nx = ax - borderSize; + const int ny = ay - borderSize; + if (nx >= 0 && ny >= 0 && nx < lw && ny < lh) + con |= (unsigned char)(1<cons[idx] = (portal << 4) | con; + } + } + } + + if (layer->minx > layer->maxx) + layer->minx = layer->maxx = 0; + if (layer->miny > layer->maxy) + layer->miny = layer->maxy = 0; + } + + return true; +} diff --git a/libs/recast/recast/src/RecastMesh.cpp b/libs/recast/recast/src/RecastMesh.cpp new file mode 100644 index 000000000..e99eaebb7 --- /dev/null +++ b/libs/recast/recast/src/RecastMesh.cpp @@ -0,0 +1,1552 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#define _USE_MATH_DEFINES +#include +#include +#include +#include "Recast.h" +#include "RecastAlloc.h" +#include "RecastAssert.h" + +struct rcEdge +{ + unsigned short vert[2]; + unsigned short polyEdge[2]; + unsigned short poly[2]; +}; + +static bool buildMeshAdjacency(unsigned short* polys, const int npolys, + const int nverts, const int vertsPerPoly) +{ + // Based on code by Eric Lengyel from: + // http://www.terathon.com/code/edges.php + + int maxEdgeCount = npolys*vertsPerPoly; + unsigned short* firstEdge = (unsigned short*)rcAlloc(sizeof(unsigned short)*(nverts + maxEdgeCount), RC_ALLOC_TEMP); + if (!firstEdge) + return false; + unsigned short* nextEdge = firstEdge + nverts; + int edgeCount = 0; + + rcEdge* edges = (rcEdge*)rcAlloc(sizeof(rcEdge)*maxEdgeCount, RC_ALLOC_TEMP); + if (!edges) + { + rcFree(firstEdge); + return false; + } + + for (int i = 0; i < nverts; i++) + firstEdge[i] = RC_MESH_NULL_IDX; + + for (int i = 0; i < npolys; ++i) + { + unsigned short* t = &polys[i*vertsPerPoly*2]; + for (int j = 0; j < vertsPerPoly; ++j) + { + if (t[j] == RC_MESH_NULL_IDX) break; + unsigned short v0 = t[j]; + unsigned short v1 = (j+1 >= vertsPerPoly || t[j+1] == RC_MESH_NULL_IDX) ? t[0] : t[j+1]; + if (v0 < v1) + { + rcEdge& edge = edges[edgeCount]; + edge.vert[0] = v0; + edge.vert[1] = v1; + edge.poly[0] = (unsigned short)i; + edge.polyEdge[0] = (unsigned short)j; + edge.poly[1] = (unsigned short)i; + edge.polyEdge[1] = 0; + // Insert edge + nextEdge[edgeCount] = firstEdge[v0]; + firstEdge[v0] = (unsigned short)edgeCount; + edgeCount++; + } + } + } + + for (int i = 0; i < npolys; ++i) + { + unsigned short* t = &polys[i*vertsPerPoly*2]; + for (int j = 0; j < vertsPerPoly; ++j) + { + if (t[j] == RC_MESH_NULL_IDX) break; + unsigned short v0 = t[j]; + unsigned short v1 = (j+1 >= vertsPerPoly || t[j+1] == RC_MESH_NULL_IDX) ? t[0] : t[j+1]; + if (v0 > v1) + { + for (unsigned short e = firstEdge[v1]; e != RC_MESH_NULL_IDX; e = nextEdge[e]) + { + rcEdge& edge = edges[e]; + if (edge.vert[1] == v0 && edge.poly[0] == edge.poly[1]) + { + edge.poly[1] = (unsigned short)i; + edge.polyEdge[1] = (unsigned short)j; + break; + } + } + } + } + } + + // Store adjacency + for (int i = 0; i < edgeCount; ++i) + { + const rcEdge& e = edges[i]; + if (e.poly[0] != e.poly[1]) + { + unsigned short* p0 = &polys[e.poly[0]*vertsPerPoly*2]; + unsigned short* p1 = &polys[e.poly[1]*vertsPerPoly*2]; + p0[vertsPerPoly + e.polyEdge[0]] = e.poly[1]; + p1[vertsPerPoly + e.polyEdge[1]] = e.poly[0]; + } + } + + rcFree(firstEdge); + rcFree(edges); + + return true; +} + + +static const int VERTEX_BUCKET_COUNT = (1<<12); + +inline int computeVertexHash(int x, int y, int z) +{ + const unsigned int h1 = 0x8da6b343; // Large multiplicative constants; + const unsigned int h2 = 0xd8163841; // here arbitrarily chosen primes + const unsigned int h3 = 0xcb1ab31f; + unsigned int n = h1 * x + h2 * y + h3 * z; + return (int)(n & (VERTEX_BUCKET_COUNT-1)); +} + +static unsigned short addVertex(unsigned short x, unsigned short y, unsigned short z, + unsigned short* verts, int* firstVert, int* nextVert, int& nv) +{ + int bucket = computeVertexHash(x, 0, z); + int i = firstVert[bucket]; + + while (i != -1) + { + const unsigned short* v = &verts[i*3]; + if (v[0] == x && (rcAbs(v[1] - y) <= 2) && v[2] == z) + return (unsigned short)i; + i = nextVert[i]; // next + } + + // Could not find, create new. + i = nv; nv++; + unsigned short* v = &verts[i*3]; + v[0] = x; + v[1] = y; + v[2] = z; + nextVert[i] = firstVert[bucket]; + firstVert[bucket] = i; + + return (unsigned short)i; +} + +// Last time I checked the if version got compiled using cmov, which was a lot faster than module (with idiv). +inline int prev(int i, int n) { return i-1 >= 0 ? i-1 : n-1; } +inline int next(int i, int n) { return i+1 < n ? i+1 : 0; } + +inline int area2(const int* a, const int* b, const int* c) +{ + return (b[0] - a[0]) * (c[2] - a[2]) - (c[0] - a[0]) * (b[2] - a[2]); +} + +// Exclusive or: true iff exactly one argument is true. +// The arguments are negated to ensure that they are 0/1 +// values. Then the bitwise Xor operator may apply. +// (This idea is due to Michael Baldwin.) +inline bool xorb(bool x, bool y) +{ + return !x ^ !y; +} + +// Returns true iff c is strictly to the left of the directed +// line through a to b. +inline bool left(const int* a, const int* b, const int* c) +{ + return area2(a, b, c) < 0; +} + +inline bool leftOn(const int* a, const int* b, const int* c) +{ + return area2(a, b, c) <= 0; +} + +inline bool collinear(const int* a, const int* b, const int* c) +{ + return area2(a, b, c) == 0; +} + +// Returns true iff ab properly intersects cd: they share +// a point interior to both segments. The properness of the +// intersection is ensured by using strict leftness. +static bool intersectProp(const int* a, const int* b, const int* c, const int* d) +{ + // Eliminate improper cases. + if (collinear(a,b,c) || collinear(a,b,d) || + collinear(c,d,a) || collinear(c,d,b)) + return false; + + return xorb(left(a,b,c), left(a,b,d)) && xorb(left(c,d,a), left(c,d,b)); +} + +// Returns T iff (a,b,c) are collinear and point c lies +// on the closed segement ab. +static bool between(const int* a, const int* b, const int* c) +{ + if (!collinear(a, b, c)) + return false; + // If ab not vertical, check betweenness on x; else on y. + if (a[0] != b[0]) + return ((a[0] <= c[0]) && (c[0] <= b[0])) || ((a[0] >= c[0]) && (c[0] >= b[0])); + else + return ((a[2] <= c[2]) && (c[2] <= b[2])) || ((a[2] >= c[2]) && (c[2] >= b[2])); +} + +// Returns true iff segments ab and cd intersect, properly or improperly. +static bool intersect(const int* a, const int* b, const int* c, const int* d) +{ + if (intersectProp(a, b, c, d)) + return true; + else if (between(a, b, c) || between(a, b, d) || + between(c, d, a) || between(c, d, b)) + return true; + else + return false; +} + +static bool vequal(const int* a, const int* b) +{ + return a[0] == b[0] && a[2] == b[2]; +} + +// Returns T iff (v_i, v_j) is a proper internal *or* external +// diagonal of P, *ignoring edges incident to v_i and v_j*. +static bool diagonalie(int i, int j, int n, const int* verts, int* indices) +{ + const int* d0 = &verts[(indices[i] & 0x0fffffff) * 4]; + const int* d1 = &verts[(indices[j] & 0x0fffffff) * 4]; + + // For each edge (k,k+1) of P + for (int k = 0; k < n; k++) + { + int k1 = next(k, n); + // Skip edges incident to i or j + if (!((k == i) || (k1 == i) || (k == j) || (k1 == j))) + { + const int* p0 = &verts[(indices[k] & 0x0fffffff) * 4]; + const int* p1 = &verts[(indices[k1] & 0x0fffffff) * 4]; + + if (vequal(d0, p0) || vequal(d1, p0) || vequal(d0, p1) || vequal(d1, p1)) + continue; + + if (intersect(d0, d1, p0, p1)) + return false; + } + } + return true; +} + +// Returns true iff the diagonal (i,j) is strictly internal to the +// polygon P in the neighborhood of the i endpoint. +static bool inCone(int i, int j, int n, const int* verts, int* indices) +{ + const int* pi = &verts[(indices[i] & 0x0fffffff) * 4]; + const int* pj = &verts[(indices[j] & 0x0fffffff) * 4]; + const int* pi1 = &verts[(indices[next(i, n)] & 0x0fffffff) * 4]; + const int* pin1 = &verts[(indices[prev(i, n)] & 0x0fffffff) * 4]; + + // If P[i] is a convex vertex [ i+1 left or on (i-1,i) ]. + if (leftOn(pin1, pi, pi1)) + return left(pi, pj, pin1) && left(pj, pi, pi1); + // Assume (i-1,i,i+1) not collinear. + // else P[i] is reflex. + return !(leftOn(pi, pj, pi1) && leftOn(pj, pi, pin1)); +} + +// Returns T iff (v_i, v_j) is a proper internal +// diagonal of P. +static bool diagonal(int i, int j, int n, const int* verts, int* indices) +{ + return inCone(i, j, n, verts, indices) && diagonalie(i, j, n, verts, indices); +} + + +static bool diagonalieLoose(int i, int j, int n, const int* verts, int* indices) +{ + const int* d0 = &verts[(indices[i] & 0x0fffffff) * 4]; + const int* d1 = &verts[(indices[j] & 0x0fffffff) * 4]; + + // For each edge (k,k+1) of P + for (int k = 0; k < n; k++) + { + int k1 = next(k, n); + // Skip edges incident to i or j + if (!((k == i) || (k1 == i) || (k == j) || (k1 == j))) + { + const int* p0 = &verts[(indices[k] & 0x0fffffff) * 4]; + const int* p1 = &verts[(indices[k1] & 0x0fffffff) * 4]; + + if (vequal(d0, p0) || vequal(d1, p0) || vequal(d0, p1) || vequal(d1, p1)) + continue; + + if (intersectProp(d0, d1, p0, p1)) + return false; + } + } + return true; +} + +static bool inConeLoose(int i, int j, int n, const int* verts, int* indices) +{ + const int* pi = &verts[(indices[i] & 0x0fffffff) * 4]; + const int* pj = &verts[(indices[j] & 0x0fffffff) * 4]; + const int* pi1 = &verts[(indices[next(i, n)] & 0x0fffffff) * 4]; + const int* pin1 = &verts[(indices[prev(i, n)] & 0x0fffffff) * 4]; + + // If P[i] is a convex vertex [ i+1 left or on (i-1,i) ]. + if (leftOn(pin1, pi, pi1)) + return leftOn(pi, pj, pin1) && leftOn(pj, pi, pi1); + // Assume (i-1,i,i+1) not collinear. + // else P[i] is reflex. + return !(leftOn(pi, pj, pi1) && leftOn(pj, pi, pin1)); +} + +static bool diagonalLoose(int i, int j, int n, const int* verts, int* indices) +{ + return inConeLoose(i, j, n, verts, indices) && diagonalieLoose(i, j, n, verts, indices); +} + + +static int triangulate(int n, const int* verts, int* indices, int* tris) +{ + int ntris = 0; + int* dst = tris; + + // The last bit of the index is used to indicate if the vertex can be removed. + for (int i = 0; i < n; i++) + { + int i1 = next(i, n); + int i2 = next(i1, n); + if (diagonal(i, i2, n, verts, indices)) + indices[i1] |= 0x80000000; + } + + while (n > 3) + { + int minLen = -1; + int mini = -1; + for (int i = 0; i < n; i++) + { + int i1 = next(i, n); + if (indices[i1] & 0x80000000) + { + const int* p0 = &verts[(indices[i] & 0x0fffffff) * 4]; + const int* p2 = &verts[(indices[next(i1, n)] & 0x0fffffff) * 4]; + + int dx = p2[0] - p0[0]; + int dy = p2[2] - p0[2]; + int len = dx*dx + dy*dy; + + if (minLen < 0 || len < minLen) + { + minLen = len; + mini = i; + } + } + } + + if (mini == -1) + { + // We might get here because the contour has overlapping segments, like this: + // + // A o-o=====o---o B + // / |C D| \. + // o o o o + // : : : : + // We'll try to recover by loosing up the inCone test a bit so that a diagonal + // like A-B or C-D can be found and we can continue. + minLen = -1; + mini = -1; + for (int i = 0; i < n; i++) + { + int i1 = next(i, n); + int i2 = next(i1, n); + if (diagonalLoose(i, i2, n, verts, indices)) + { + const int* p0 = &verts[(indices[i] & 0x0fffffff) * 4]; + const int* p2 = &verts[(indices[next(i2, n)] & 0x0fffffff) * 4]; + int dx = p2[0] - p0[0]; + int dy = p2[2] - p0[2]; + int len = dx*dx + dy*dy; + + if (minLen < 0 || len < minLen) + { + minLen = len; + mini = i; + } + } + } + if (mini == -1) + { + // The contour is messed up. This sometimes happens + // if the contour simplification is too aggressive. + return -ntris; + } + } + + int i = mini; + int i1 = next(i, n); + int i2 = next(i1, n); + + *dst++ = indices[i] & 0x0fffffff; + *dst++ = indices[i1] & 0x0fffffff; + *dst++ = indices[i2] & 0x0fffffff; + ntris++; + + // Removes P[i1] by copying P[i+1]...P[n-1] left one index. + n--; + for (int k = i1; k < n; k++) + indices[k] = indices[k+1]; + + if (i1 >= n) i1 = 0; + i = prev(i1,n); + // Update diagonal flags. + if (diagonal(prev(i, n), i1, n, verts, indices)) + indices[i] |= 0x80000000; + else + indices[i] &= 0x0fffffff; + + if (diagonal(i, next(i1, n), n, verts, indices)) + indices[i1] |= 0x80000000; + else + indices[i1] &= 0x0fffffff; + } + + // Append the remaining triangle. + *dst++ = indices[0] & 0x0fffffff; + *dst++ = indices[1] & 0x0fffffff; + *dst++ = indices[2] & 0x0fffffff; + ntris++; + + return ntris; +} + +static int countPolyVerts(const unsigned short* p, const int nvp) +{ + for (int i = 0; i < nvp; ++i) + if (p[i] == RC_MESH_NULL_IDX) + return i; + return nvp; +} + +inline bool uleft(const unsigned short* a, const unsigned short* b, const unsigned short* c) +{ + return ((int)b[0] - (int)a[0]) * ((int)c[2] - (int)a[2]) - + ((int)c[0] - (int)a[0]) * ((int)b[2] - (int)a[2]) < 0; +} + +static int getPolyMergeValue(unsigned short* pa, unsigned short* pb, + const unsigned short* verts, int& ea, int& eb, + const int nvp) +{ + const int na = countPolyVerts(pa, nvp); + const int nb = countPolyVerts(pb, nvp); + + // If the merged polygon would be too big, do not merge. + if (na+nb-2 > nvp) + return -1; + + // Check if the polygons share an edge. + ea = -1; + eb = -1; + + for (int i = 0; i < na; ++i) + { + unsigned short va0 = pa[i]; + unsigned short va1 = pa[(i+1) % na]; + if (va0 > va1) + rcSwap(va0, va1); + for (int j = 0; j < nb; ++j) + { + unsigned short vb0 = pb[j]; + unsigned short vb1 = pb[(j+1) % nb]; + if (vb0 > vb1) + rcSwap(vb0, vb1); + if (va0 == vb0 && va1 == vb1) + { + ea = i; + eb = j; + break; + } + } + } + + // No common edge, cannot merge. + if (ea == -1 || eb == -1) + return -1; + + // Check to see if the merged polygon would be convex. + unsigned short va, vb, vc; + + va = pa[(ea+na-1) % na]; + vb = pa[ea]; + vc = pb[(eb+2) % nb]; + if (!uleft(&verts[va*3], &verts[vb*3], &verts[vc*3])) + return -1; + + va = pb[(eb+nb-1) % nb]; + vb = pb[eb]; + vc = pa[(ea+2) % na]; + if (!uleft(&verts[va*3], &verts[vb*3], &verts[vc*3])) + return -1; + + va = pa[ea]; + vb = pa[(ea+1)%na]; + + int dx = (int)verts[va*3+0] - (int)verts[vb*3+0]; + int dy = (int)verts[va*3+2] - (int)verts[vb*3+2]; + + return dx*dx + dy*dy; +} + +static void mergePolyVerts(unsigned short* pa, unsigned short* pb, int ea, int eb, + unsigned short* tmp, const int nvp) +{ + const int na = countPolyVerts(pa, nvp); + const int nb = countPolyVerts(pb, nvp); + + // Merge polygons. + memset(tmp, 0xff, sizeof(unsigned short)*nvp); + int n = 0; + // Add pa + for (int i = 0; i < na-1; ++i) + tmp[n++] = pa[(ea+1+i) % na]; + // Add pb + for (int i = 0; i < nb-1; ++i) + tmp[n++] = pb[(eb+1+i) % nb]; + + memcpy(pa, tmp, sizeof(unsigned short)*nvp); +} + + +static void pushFront(int v, int* arr, int& an) +{ + an++; + for (int i = an-1; i > 0; --i) arr[i] = arr[i-1]; + arr[0] = v; +} + +static void pushBack(int v, int* arr, int& an) +{ + arr[an] = v; + an++; +} + +static bool canRemoveVertex(rcContext* ctx, rcPolyMesh& mesh, const unsigned short rem) +{ + const int nvp = mesh.nvp; + + // Count number of polygons to remove. + int numRemovedVerts = 0; + int numTouchedVerts = 0; + int numRemainingEdges = 0; + for (int i = 0; i < mesh.npolys; ++i) + { + unsigned short* p = &mesh.polys[i*nvp*2]; + const int nv = countPolyVerts(p, nvp); + int numRemoved = 0; + int numVerts = 0; + for (int j = 0; j < nv; ++j) + { + if (p[j] == rem) + { + numTouchedVerts++; + numRemoved++; + } + numVerts++; + } + if (numRemoved) + { + numRemovedVerts += numRemoved; + numRemainingEdges += numVerts-(numRemoved+1); + } + } + + // There would be too few edges remaining to create a polygon. + // This can happen for example when a tip of a triangle is marked + // as deletion, but there are no other polys that share the vertex. + // In this case, the vertex should not be removed. + if (numRemainingEdges <= 2) + return false; + + // Find edges which share the removed vertex. + const int maxEdges = numTouchedVerts*2; + int nedges = 0; + rcScopedDelete edges((int*)rcAlloc(sizeof(int)*maxEdges*3, RC_ALLOC_TEMP)); + if (!edges) + { + ctx->log(RC_LOG_WARNING, "canRemoveVertex: Out of memory 'edges' (%d).", maxEdges*3); + return false; + } + + for (int i = 0; i < mesh.npolys; ++i) + { + unsigned short* p = &mesh.polys[i*nvp*2]; + const int nv = countPolyVerts(p, nvp); + + // Collect edges which touches the removed vertex. + for (int j = 0, k = nv-1; j < nv; k = j++) + { + if (p[j] == rem || p[k] == rem) + { + // Arrange edge so that a=rem. + int a = p[j], b = p[k]; + if (b == rem) + rcSwap(a,b); + + // Check if the edge exists + bool exists = false; + for (int m = 0; m < nedges; ++m) + { + int* e = &edges[m*3]; + if (e[1] == b) + { + // Exists, increment vertex share count. + e[2]++; + exists = true; + } + } + // Add new edge. + if (!exists) + { + int* e = &edges[nedges*3]; + e[0] = a; + e[1] = b; + e[2] = 1; + nedges++; + } + } + } + } + + // There should be no more than 2 open edges. + // This catches the case that two non-adjacent polygons + // share the removed vertex. In that case, do not remove the vertex. + int numOpenEdges = 0; + for (int i = 0; i < nedges; ++i) + { + if (edges[i*3+2] < 2) + numOpenEdges++; + } + if (numOpenEdges > 2) + return false; + + return true; +} + +static bool removeVertex(rcContext* ctx, rcPolyMesh& mesh, const unsigned short rem, const int maxTris) +{ + const int nvp = mesh.nvp; + + // Count number of polygons to remove. + int numRemovedVerts = 0; + for (int i = 0; i < mesh.npolys; ++i) + { + unsigned short* p = &mesh.polys[i*nvp*2]; + const int nv = countPolyVerts(p, nvp); + for (int j = 0; j < nv; ++j) + { + if (p[j] == rem) + numRemovedVerts++; + } + } + + int nedges = 0; + rcScopedDelete edges((int*)rcAlloc(sizeof(int)*numRemovedVerts*nvp*4, RC_ALLOC_TEMP)); + if (!edges) + { + ctx->log(RC_LOG_WARNING, "removeVertex: Out of memory 'edges' (%d).", numRemovedVerts*nvp*4); + return false; + } + + int nhole = 0; + rcScopedDelete hole((int*)rcAlloc(sizeof(int)*numRemovedVerts*nvp, RC_ALLOC_TEMP)); + if (!hole) + { + ctx->log(RC_LOG_WARNING, "removeVertex: Out of memory 'hole' (%d).", numRemovedVerts*nvp); + return false; + } + + int nhreg = 0; + rcScopedDelete hreg((int*)rcAlloc(sizeof(int)*numRemovedVerts*nvp, RC_ALLOC_TEMP)); + if (!hreg) + { + ctx->log(RC_LOG_WARNING, "removeVertex: Out of memory 'hreg' (%d).", numRemovedVerts*nvp); + return false; + } + + int nharea = 0; + rcScopedDelete harea((int*)rcAlloc(sizeof(int)*numRemovedVerts*nvp, RC_ALLOC_TEMP)); + if (!harea) + { + ctx->log(RC_LOG_WARNING, "removeVertex: Out of memory 'harea' (%d).", numRemovedVerts*nvp); + return false; + } + + for (int i = 0; i < mesh.npolys; ++i) + { + unsigned short* p = &mesh.polys[i*nvp*2]; + const int nv = countPolyVerts(p, nvp); + bool hasRem = false; + for (int j = 0; j < nv; ++j) + if (p[j] == rem) hasRem = true; + if (hasRem) + { + // Collect edges which does not touch the removed vertex. + for (int j = 0, k = nv-1; j < nv; k = j++) + { + if (p[j] != rem && p[k] != rem) + { + int* e = &edges[nedges*4]; + e[0] = p[k]; + e[1] = p[j]; + e[2] = mesh.regs[i]; + e[3] = mesh.areas[i]; + nedges++; + } + } + // Remove the polygon. + unsigned short* p2 = &mesh.polys[(mesh.npolys-1)*nvp*2]; + if (p != p2) + memcpy(p,p2,sizeof(unsigned short)*nvp); + memset(p+nvp,0xff,sizeof(unsigned short)*nvp); + mesh.regs[i] = mesh.regs[mesh.npolys-1]; + mesh.areas[i] = mesh.areas[mesh.npolys-1]; + mesh.npolys--; + --i; + } + } + + // Remove vertex. + for (int i = (int)rem; i < mesh.nverts - 1; ++i) + { + mesh.verts[i*3+0] = mesh.verts[(i+1)*3+0]; + mesh.verts[i*3+1] = mesh.verts[(i+1)*3+1]; + mesh.verts[i*3+2] = mesh.verts[(i+1)*3+2]; + } + mesh.nverts--; + + // Adjust indices to match the removed vertex layout. + for (int i = 0; i < mesh.npolys; ++i) + { + unsigned short* p = &mesh.polys[i*nvp*2]; + const int nv = countPolyVerts(p, nvp); + for (int j = 0; j < nv; ++j) + if (p[j] > rem) p[j]--; + } + for (int i = 0; i < nedges; ++i) + { + if (edges[i*4+0] > rem) edges[i*4+0]--; + if (edges[i*4+1] > rem) edges[i*4+1]--; + } + + if (nedges == 0) + return true; + + // Start with one vertex, keep appending connected + // segments to the start and end of the hole. + pushBack(edges[0], hole, nhole); + pushBack(edges[2], hreg, nhreg); + pushBack(edges[3], harea, nharea); + + while (nedges) + { + bool match = false; + + for (int i = 0; i < nedges; ++i) + { + const int ea = edges[i*4+0]; + const int eb = edges[i*4+1]; + const int r = edges[i*4+2]; + const int a = edges[i*4+3]; + bool add = false; + if (hole[0] == eb) + { + // The segment matches the beginning of the hole boundary. + pushFront(ea, hole, nhole); + pushFront(r, hreg, nhreg); + pushFront(a, harea, nharea); + add = true; + } + else if (hole[nhole-1] == ea) + { + // The segment matches the end of the hole boundary. + pushBack(eb, hole, nhole); + pushBack(r, hreg, nhreg); + pushBack(a, harea, nharea); + add = true; + } + if (add) + { + // The edge segment was added, remove it. + edges[i*4+0] = edges[(nedges-1)*4+0]; + edges[i*4+1] = edges[(nedges-1)*4+1]; + edges[i*4+2] = edges[(nedges-1)*4+2]; + edges[i*4+3] = edges[(nedges-1)*4+3]; + --nedges; + match = true; + --i; + } + } + + if (!match) + break; + } + + rcScopedDelete tris((int*)rcAlloc(sizeof(int)*nhole*3, RC_ALLOC_TEMP)); + if (!tris) + { + ctx->log(RC_LOG_WARNING, "removeVertex: Out of memory 'tris' (%d).", nhole*3); + return false; + } + + rcScopedDelete tverts((int*)rcAlloc(sizeof(int)*nhole*4, RC_ALLOC_TEMP)); + if (!tverts) + { + ctx->log(RC_LOG_WARNING, "removeVertex: Out of memory 'tverts' (%d).", nhole*4); + return false; + } + + rcScopedDelete thole((int*)rcAlloc(sizeof(int)*nhole, RC_ALLOC_TEMP)); + if (!thole) + { + ctx->log(RC_LOG_WARNING, "removeVertex: Out of memory 'thole' (%d).", nhole); + return false; + } + + // Generate temp vertex array for triangulation. + for (int i = 0; i < nhole; ++i) + { + const int pi = hole[i]; + tverts[i*4+0] = mesh.verts[pi*3+0]; + tverts[i*4+1] = mesh.verts[pi*3+1]; + tverts[i*4+2] = mesh.verts[pi*3+2]; + tverts[i*4+3] = 0; + thole[i] = i; + } + + // Triangulate the hole. + int ntris = triangulate(nhole, &tverts[0], &thole[0], tris); + if (ntris < 0) + { + ntris = -ntris; + ctx->log(RC_LOG_WARNING, "removeVertex: triangulate() returned bad results."); + } + + // Merge the hole triangles back to polygons. + rcScopedDelete polys((unsigned short*)rcAlloc(sizeof(unsigned short)*(ntris+1)*nvp, RC_ALLOC_TEMP)); + if (!polys) + { + ctx->log(RC_LOG_ERROR, "removeVertex: Out of memory 'polys' (%d).", (ntris+1)*nvp); + return false; + } + rcScopedDelete pregs((unsigned short*)rcAlloc(sizeof(unsigned short)*ntris, RC_ALLOC_TEMP)); + if (!pregs) + { + ctx->log(RC_LOG_ERROR, "removeVertex: Out of memory 'pregs' (%d).", ntris); + return false; + } + rcScopedDelete pareas((unsigned char*)rcAlloc(sizeof(unsigned char)*ntris, RC_ALLOC_TEMP)); + if (!pareas) + { + ctx->log(RC_LOG_ERROR, "removeVertex: Out of memory 'pareas' (%d).", ntris); + return false; + } + + unsigned short* tmpPoly = &polys[ntris*nvp]; + + // Build initial polygons. + int npolys = 0; + memset(polys, 0xff, ntris*nvp*sizeof(unsigned short)); + for (int j = 0; j < ntris; ++j) + { + int* t = &tris[j*3]; + if (t[0] != t[1] && t[0] != t[2] && t[1] != t[2]) + { + polys[npolys*nvp+0] = (unsigned short)hole[t[0]]; + polys[npolys*nvp+1] = (unsigned short)hole[t[1]]; + polys[npolys*nvp+2] = (unsigned short)hole[t[2]]; + + // If this polygon covers multiple region types then + // mark it as such + if (hreg[t[0]] != hreg[t[1]] || hreg[t[1]] != hreg[t[2]]) + pregs[npolys] = RC_MULTIPLE_REGS; + else + pregs[npolys] = (unsigned short)hreg[t[0]]; + + pareas[npolys] = (unsigned char)harea[t[0]]; + npolys++; + } + } + if (!npolys) + return true; + + // Merge polygons. + if (nvp > 3) + { + for (;;) + { + // Find best polygons to merge. + int bestMergeVal = 0; + int bestPa = 0, bestPb = 0, bestEa = 0, bestEb = 0; + + for (int j = 0; j < npolys-1; ++j) + { + unsigned short* pj = &polys[j*nvp]; + for (int k = j+1; k < npolys; ++k) + { + unsigned short* pk = &polys[k*nvp]; + int ea, eb; + int v = getPolyMergeValue(pj, pk, mesh.verts, ea, eb, nvp); + if (v > bestMergeVal) + { + bestMergeVal = v; + bestPa = j; + bestPb = k; + bestEa = ea; + bestEb = eb; + } + } + } + + if (bestMergeVal > 0) + { + // Found best, merge. + unsigned short* pa = &polys[bestPa*nvp]; + unsigned short* pb = &polys[bestPb*nvp]; + mergePolyVerts(pa, pb, bestEa, bestEb, tmpPoly, nvp); + if (pregs[bestPa] != pregs[bestPb]) + pregs[bestPa] = RC_MULTIPLE_REGS; + + unsigned short* last = &polys[(npolys-1)*nvp]; + if (pb != last) + memcpy(pb, last, sizeof(unsigned short)*nvp); + pregs[bestPb] = pregs[npolys-1]; + pareas[bestPb] = pareas[npolys-1]; + npolys--; + } + else + { + // Could not merge any polygons, stop. + break; + } + } + } + + // Store polygons. + for (int i = 0; i < npolys; ++i) + { + if (mesh.npolys >= maxTris) break; + unsigned short* p = &mesh.polys[mesh.npolys*nvp*2]; + memset(p,0xff,sizeof(unsigned short)*nvp*2); + for (int j = 0; j < nvp; ++j) + p[j] = polys[i*nvp+j]; + mesh.regs[mesh.npolys] = pregs[i]; + mesh.areas[mesh.npolys] = pareas[i]; + mesh.npolys++; + if (mesh.npolys > maxTris) + { + ctx->log(RC_LOG_ERROR, "removeVertex: Too many polygons %d (max:%d).", mesh.npolys, maxTris); + return false; + } + } + + return true; +} + +/// @par +/// +/// @note If the mesh data is to be used to construct a Detour navigation mesh, then the upper +/// limit must be retricted to <= #DT_VERTS_PER_POLYGON. +/// +/// @see rcAllocPolyMesh, rcContourSet, rcPolyMesh, rcConfig +bool rcBuildPolyMesh(rcContext* ctx, rcContourSet& cset, const int nvp, rcPolyMesh& mesh) +{ + rcAssert(ctx); + + rcScopedTimer timer(ctx, RC_TIMER_BUILD_POLYMESH); + + rcVcopy(mesh.bmin, cset.bmin); + rcVcopy(mesh.bmax, cset.bmax); + mesh.cs = cset.cs; + mesh.ch = cset.ch; + mesh.borderSize = cset.borderSize; + mesh.maxEdgeError = cset.maxError; + + int maxVertices = 0; + int maxTris = 0; + int maxVertsPerCont = 0; + for (int i = 0; i < cset.nconts; ++i) + { + // Skip null contours. + if (cset.conts[i].nverts < 3) continue; + maxVertices += cset.conts[i].nverts; + maxTris += cset.conts[i].nverts - 2; + maxVertsPerCont = rcMax(maxVertsPerCont, cset.conts[i].nverts); + } + + if (maxVertices >= 0xfffe) + { + ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Too many vertices %d.", maxVertices); + return false; + } + + rcScopedDelete vflags((unsigned char*)rcAlloc(sizeof(unsigned char)*maxVertices, RC_ALLOC_TEMP)); + if (!vflags) + { + ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'vflags' (%d).", maxVertices); + return false; + } + memset(vflags, 0, maxVertices); + + mesh.verts = (unsigned short*)rcAlloc(sizeof(unsigned short)*maxVertices*3, RC_ALLOC_PERM); + if (!mesh.verts) + { + ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'mesh.verts' (%d).", maxVertices); + return false; + } + mesh.polys = (unsigned short*)rcAlloc(sizeof(unsigned short)*maxTris*nvp*2, RC_ALLOC_PERM); + if (!mesh.polys) + { + ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'mesh.polys' (%d).", maxTris*nvp*2); + return false; + } + mesh.regs = (unsigned short*)rcAlloc(sizeof(unsigned short)*maxTris, RC_ALLOC_PERM); + if (!mesh.regs) + { + ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'mesh.regs' (%d).", maxTris); + return false; + } + mesh.areas = (unsigned char*)rcAlloc(sizeof(unsigned char)*maxTris, RC_ALLOC_PERM); + if (!mesh.areas) + { + ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'mesh.areas' (%d).", maxTris); + return false; + } + + mesh.nverts = 0; + mesh.npolys = 0; + mesh.nvp = nvp; + mesh.maxpolys = maxTris; + + memset(mesh.verts, 0, sizeof(unsigned short)*maxVertices*3); + memset(mesh.polys, 0xff, sizeof(unsigned short)*maxTris*nvp*2); + memset(mesh.regs, 0, sizeof(unsigned short)*maxTris); + memset(mesh.areas, 0, sizeof(unsigned char)*maxTris); + + rcScopedDelete nextVert((int*)rcAlloc(sizeof(int)*maxVertices, RC_ALLOC_TEMP)); + if (!nextVert) + { + ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'nextVert' (%d).", maxVertices); + return false; + } + memset(nextVert, 0, sizeof(int)*maxVertices); + + rcScopedDelete firstVert((int*)rcAlloc(sizeof(int)*VERTEX_BUCKET_COUNT, RC_ALLOC_TEMP)); + if (!firstVert) + { + ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'firstVert' (%d).", VERTEX_BUCKET_COUNT); + return false; + } + for (int i = 0; i < VERTEX_BUCKET_COUNT; ++i) + firstVert[i] = -1; + + rcScopedDelete indices((int*)rcAlloc(sizeof(int)*maxVertsPerCont, RC_ALLOC_TEMP)); + if (!indices) + { + ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'indices' (%d).", maxVertsPerCont); + return false; + } + rcScopedDelete tris((int*)rcAlloc(sizeof(int)*maxVertsPerCont*3, RC_ALLOC_TEMP)); + if (!tris) + { + ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'tris' (%d).", maxVertsPerCont*3); + return false; + } + rcScopedDelete polys((unsigned short*)rcAlloc(sizeof(unsigned short)*(maxVertsPerCont+1)*nvp, RC_ALLOC_TEMP)); + if (!polys) + { + ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'polys' (%d).", maxVertsPerCont*nvp); + return false; + } + unsigned short* tmpPoly = &polys[maxVertsPerCont*nvp]; + + for (int i = 0; i < cset.nconts; ++i) + { + rcContour& cont = cset.conts[i]; + + // Skip null contours. + if (cont.nverts < 3) + continue; + + // Triangulate contour + for (int j = 0; j < cont.nverts; ++j) + indices[j] = j; + + int ntris = triangulate(cont.nverts, cont.verts, &indices[0], &tris[0]); + if (ntris <= 0) + { + // Bad triangulation, should not happen. +/* printf("\tconst float bmin[3] = {%ff,%ff,%ff};\n", cset.bmin[0], cset.bmin[1], cset.bmin[2]); + printf("\tconst float cs = %ff;\n", cset.cs); + printf("\tconst float ch = %ff;\n", cset.ch); + printf("\tconst int verts[] = {\n"); + for (int k = 0; k < cont.nverts; ++k) + { + const int* v = &cont.verts[k*4]; + printf("\t\t%d,%d,%d,%d,\n", v[0], v[1], v[2], v[3]); + } + printf("\t};\n\tconst int nverts = sizeof(verts)/(sizeof(int)*4);\n");*/ + ctx->log(RC_LOG_WARNING, "rcBuildPolyMesh: Bad triangulation Contour %d.", i); + ntris = -ntris; + } + + // Add and merge vertices. + for (int j = 0; j < cont.nverts; ++j) + { + const int* v = &cont.verts[j*4]; + indices[j] = addVertex((unsigned short)v[0], (unsigned short)v[1], (unsigned short)v[2], + mesh.verts, firstVert, nextVert, mesh.nverts); + if (v[3] & RC_BORDER_VERTEX) + { + // This vertex should be removed. + vflags[indices[j]] = 1; + } + } + + // Build initial polygons. + int npolys = 0; + memset(polys, 0xff, maxVertsPerCont*nvp*sizeof(unsigned short)); + for (int j = 0; j < ntris; ++j) + { + int* t = &tris[j*3]; + if (t[0] != t[1] && t[0] != t[2] && t[1] != t[2]) + { + polys[npolys*nvp+0] = (unsigned short)indices[t[0]]; + polys[npolys*nvp+1] = (unsigned short)indices[t[1]]; + polys[npolys*nvp+2] = (unsigned short)indices[t[2]]; + npolys++; + } + } + if (!npolys) + continue; + + // Merge polygons. + if (nvp > 3) + { + for(;;) + { + // Find best polygons to merge. + int bestMergeVal = 0; + int bestPa = 0, bestPb = 0, bestEa = 0, bestEb = 0; + + for (int j = 0; j < npolys-1; ++j) + { + unsigned short* pj = &polys[j*nvp]; + for (int k = j+1; k < npolys; ++k) + { + unsigned short* pk = &polys[k*nvp]; + int ea, eb; + int v = getPolyMergeValue(pj, pk, mesh.verts, ea, eb, nvp); + if (v > bestMergeVal) + { + bestMergeVal = v; + bestPa = j; + bestPb = k; + bestEa = ea; + bestEb = eb; + } + } + } + + if (bestMergeVal > 0) + { + // Found best, merge. + unsigned short* pa = &polys[bestPa*nvp]; + unsigned short* pb = &polys[bestPb*nvp]; + mergePolyVerts(pa, pb, bestEa, bestEb, tmpPoly, nvp); + unsigned short* lastPoly = &polys[(npolys-1)*nvp]; + if (pb != lastPoly) + memcpy(pb, lastPoly, sizeof(unsigned short)*nvp); + npolys--; + } + else + { + // Could not merge any polygons, stop. + break; + } + } + } + + // Store polygons. + for (int j = 0; j < npolys; ++j) + { + unsigned short* p = &mesh.polys[mesh.npolys*nvp*2]; + unsigned short* q = &polys[j*nvp]; + for (int k = 0; k < nvp; ++k) + p[k] = q[k]; + mesh.regs[mesh.npolys] = cont.reg; + mesh.areas[mesh.npolys] = cont.area; + mesh.npolys++; + if (mesh.npolys > maxTris) + { + ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Too many polygons %d (max:%d).", mesh.npolys, maxTris); + return false; + } + } + } + + + // Remove edge vertices. + for (int i = 0; i < mesh.nverts; ++i) + { + if (vflags[i]) + { + if (!canRemoveVertex(ctx, mesh, (unsigned short)i)) + continue; + if (!removeVertex(ctx, mesh, (unsigned short)i, maxTris)) + { + // Failed to remove vertex + ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Failed to remove edge vertex %d.", i); + return false; + } + // Remove vertex + // Note: mesh.nverts is already decremented inside removeVertex()! + // Fixup vertex flags + for (int j = i; j < mesh.nverts; ++j) + vflags[j] = vflags[j+1]; + --i; + } + } + + // Calculate adjacency. + if (!buildMeshAdjacency(mesh.polys, mesh.npolys, mesh.nverts, nvp)) + { + ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Adjacency failed."); + return false; + } + + // Find portal edges + if (mesh.borderSize > 0) + { + const int w = cset.width; + const int h = cset.height; + for (int i = 0; i < mesh.npolys; ++i) + { + unsigned short* p = &mesh.polys[i*2*nvp]; + for (int j = 0; j < nvp; ++j) + { + if (p[j] == RC_MESH_NULL_IDX) break; + // Skip connected edges. + if (p[nvp+j] != RC_MESH_NULL_IDX) + continue; + int nj = j+1; + if (nj >= nvp || p[nj] == RC_MESH_NULL_IDX) nj = 0; + const unsigned short* va = &mesh.verts[p[j]*3]; + const unsigned short* vb = &mesh.verts[p[nj]*3]; + + if ((int)va[0] == 0 && (int)vb[0] == 0) + p[nvp+j] = 0x8000 | 0; + else if ((int)va[2] == h && (int)vb[2] == h) + p[nvp+j] = 0x8000 | 1; + else if ((int)va[0] == w && (int)vb[0] == w) + p[nvp+j] = 0x8000 | 2; + else if ((int)va[2] == 0 && (int)vb[2] == 0) + p[nvp+j] = 0x8000 | 3; + } + } + } + + // Just allocate the mesh flags array. The user is resposible to fill it. + mesh.flags = (unsigned short*)rcAlloc(sizeof(unsigned short)*mesh.npolys, RC_ALLOC_PERM); + if (!mesh.flags) + { + ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'mesh.flags' (%d).", mesh.npolys); + return false; + } + memset(mesh.flags, 0, sizeof(unsigned short) * mesh.npolys); + + if (mesh.nverts > 0xffff) + { + ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: The resulting mesh has too many vertices %d (max %d). Data can be corrupted.", mesh.nverts, 0xffff); + } + if (mesh.npolys > 0xffff) + { + ctx->log(RC_LOG_ERROR, "rcBuildPolyMesh: The resulting mesh has too many polygons %d (max %d). Data can be corrupted.", mesh.npolys, 0xffff); + } + + return true; +} + +/// @see rcAllocPolyMesh, rcPolyMesh +bool rcMergePolyMeshes(rcContext* ctx, rcPolyMesh** meshes, const int nmeshes, rcPolyMesh& mesh) +{ + rcAssert(ctx); + + if (!nmeshes || !meshes) + return true; + + rcScopedTimer timer(ctx, RC_TIMER_MERGE_POLYMESH); + + mesh.nvp = meshes[0]->nvp; + mesh.cs = meshes[0]->cs; + mesh.ch = meshes[0]->ch; + rcVcopy(mesh.bmin, meshes[0]->bmin); + rcVcopy(mesh.bmax, meshes[0]->bmax); + + int maxVerts = 0; + int maxPolys = 0; + int maxVertsPerMesh = 0; + for (int i = 0; i < nmeshes; ++i) + { + rcVmin(mesh.bmin, meshes[i]->bmin); + rcVmax(mesh.bmax, meshes[i]->bmax); + maxVertsPerMesh = rcMax(maxVertsPerMesh, meshes[i]->nverts); + maxVerts += meshes[i]->nverts; + maxPolys += meshes[i]->npolys; + } + + mesh.nverts = 0; + mesh.verts = (unsigned short*)rcAlloc(sizeof(unsigned short)*maxVerts*3, RC_ALLOC_PERM); + if (!mesh.verts) + { + ctx->log(RC_LOG_ERROR, "rcMergePolyMeshes: Out of memory 'mesh.verts' (%d).", maxVerts*3); + return false; + } + + mesh.npolys = 0; + mesh.polys = (unsigned short*)rcAlloc(sizeof(unsigned short)*maxPolys*2*mesh.nvp, RC_ALLOC_PERM); + if (!mesh.polys) + { + ctx->log(RC_LOG_ERROR, "rcMergePolyMeshes: Out of memory 'mesh.polys' (%d).", maxPolys*2*mesh.nvp); + return false; + } + memset(mesh.polys, 0xff, sizeof(unsigned short)*maxPolys*2*mesh.nvp); + + mesh.regs = (unsigned short*)rcAlloc(sizeof(unsigned short)*maxPolys, RC_ALLOC_PERM); + if (!mesh.regs) + { + ctx->log(RC_LOG_ERROR, "rcMergePolyMeshes: Out of memory 'mesh.regs' (%d).", maxPolys); + return false; + } + memset(mesh.regs, 0, sizeof(unsigned short)*maxPolys); + + mesh.areas = (unsigned char*)rcAlloc(sizeof(unsigned char)*maxPolys, RC_ALLOC_PERM); + if (!mesh.areas) + { + ctx->log(RC_LOG_ERROR, "rcMergePolyMeshes: Out of memory 'mesh.areas' (%d).", maxPolys); + return false; + } + memset(mesh.areas, 0, sizeof(unsigned char)*maxPolys); + + mesh.flags = (unsigned short*)rcAlloc(sizeof(unsigned short)*maxPolys, RC_ALLOC_PERM); + if (!mesh.flags) + { + ctx->log(RC_LOG_ERROR, "rcMergePolyMeshes: Out of memory 'mesh.flags' (%d).", maxPolys); + return false; + } + memset(mesh.flags, 0, sizeof(unsigned short)*maxPolys); + + rcScopedDelete nextVert((int*)rcAlloc(sizeof(int)*maxVerts, RC_ALLOC_TEMP)); + if (!nextVert) + { + ctx->log(RC_LOG_ERROR, "rcMergePolyMeshes: Out of memory 'nextVert' (%d).", maxVerts); + return false; + } + memset(nextVert, 0, sizeof(int)*maxVerts); + + rcScopedDelete firstVert((int*)rcAlloc(sizeof(int)*VERTEX_BUCKET_COUNT, RC_ALLOC_TEMP)); + if (!firstVert) + { + ctx->log(RC_LOG_ERROR, "rcMergePolyMeshes: Out of memory 'firstVert' (%d).", VERTEX_BUCKET_COUNT); + return false; + } + for (int i = 0; i < VERTEX_BUCKET_COUNT; ++i) + firstVert[i] = -1; + + rcScopedDelete vremap((unsigned short*)rcAlloc(sizeof(unsigned short)*maxVertsPerMesh, RC_ALLOC_PERM)); + if (!vremap) + { + ctx->log(RC_LOG_ERROR, "rcMergePolyMeshes: Out of memory 'vremap' (%d).", maxVertsPerMesh); + return false; + } + memset(vremap, 0, sizeof(unsigned short)*maxVertsPerMesh); + + for (int i = 0; i < nmeshes; ++i) + { + const rcPolyMesh* pmesh = meshes[i]; + + const unsigned short ox = (unsigned short)floorf((pmesh->bmin[0]-mesh.bmin[0])/mesh.cs+0.5f); + const unsigned short oz = (unsigned short)floorf((pmesh->bmin[2]-mesh.bmin[2])/mesh.cs+0.5f); + + bool isMinX = (ox == 0); + bool isMinZ = (oz == 0); + bool isMaxX = ((unsigned short)floorf((mesh.bmax[0] - pmesh->bmax[0]) / mesh.cs + 0.5f)) == 0; + bool isMaxZ = ((unsigned short)floorf((mesh.bmax[2] - pmesh->bmax[2]) / mesh.cs + 0.5f)) == 0; + bool isOnBorder = (isMinX || isMinZ || isMaxX || isMaxZ); + + for (int j = 0; j < pmesh->nverts; ++j) + { + unsigned short* v = &pmesh->verts[j*3]; + vremap[j] = addVertex(v[0]+ox, v[1], v[2]+oz, + mesh.verts, firstVert, nextVert, mesh.nverts); + } + + for (int j = 0; j < pmesh->npolys; ++j) + { + unsigned short* tgt = &mesh.polys[mesh.npolys*2*mesh.nvp]; + unsigned short* src = &pmesh->polys[j*2*mesh.nvp]; + mesh.regs[mesh.npolys] = pmesh->regs[j]; + mesh.areas[mesh.npolys] = pmesh->areas[j]; + mesh.flags[mesh.npolys] = pmesh->flags[j]; + mesh.npolys++; + for (int k = 0; k < mesh.nvp; ++k) + { + if (src[k] == RC_MESH_NULL_IDX) break; + tgt[k] = vremap[src[k]]; + } + + if (isOnBorder) + { + for (int k = mesh.nvp; k < mesh.nvp * 2; ++k) + { + if (src[k] & 0x8000 && src[k] != 0xffff) + { + unsigned short dir = src[k] & 0xf; + switch (dir) + { + case 0: // Portal x- + if (isMinX) + tgt[k] = src[k]; + break; + case 1: // Portal z+ + if (isMaxZ) + tgt[k] = src[k]; + break; + case 2: // Portal x+ + if (isMaxX) + tgt[k] = src[k]; + break; + case 3: // Portal z- + if (isMinZ) + tgt[k] = src[k]; + break; + } + } + } + } + } + } + + // Calculate adjacency. + if (!buildMeshAdjacency(mesh.polys, mesh.npolys, mesh.nverts, mesh.nvp)) + { + ctx->log(RC_LOG_ERROR, "rcMergePolyMeshes: Adjacency failed."); + return false; + } + + if (mesh.nverts > 0xffff) + { + ctx->log(RC_LOG_ERROR, "rcMergePolyMeshes: The resulting mesh has too many vertices %d (max %d). Data can be corrupted.", mesh.nverts, 0xffff); + } + if (mesh.npolys > 0xffff) + { + ctx->log(RC_LOG_ERROR, "rcMergePolyMeshes: The resulting mesh has too many polygons %d (max %d). Data can be corrupted.", mesh.npolys, 0xffff); + } + + return true; +} + +bool rcCopyPolyMesh(rcContext* ctx, const rcPolyMesh& src, rcPolyMesh& dst) +{ + rcAssert(ctx); + + // Destination must be empty. + rcAssert(dst.verts == 0); + rcAssert(dst.polys == 0); + rcAssert(dst.regs == 0); + rcAssert(dst.areas == 0); + rcAssert(dst.flags == 0); + + dst.nverts = src.nverts; + dst.npolys = src.npolys; + dst.maxpolys = src.npolys; + dst.nvp = src.nvp; + rcVcopy(dst.bmin, src.bmin); + rcVcopy(dst.bmax, src.bmax); + dst.cs = src.cs; + dst.ch = src.ch; + dst.borderSize = src.borderSize; + dst.maxEdgeError = src.maxEdgeError; + + dst.verts = (unsigned short*)rcAlloc(sizeof(unsigned short)*src.nverts*3, RC_ALLOC_PERM); + if (!dst.verts) + { + ctx->log(RC_LOG_ERROR, "rcCopyPolyMesh: Out of memory 'dst.verts' (%d).", src.nverts*3); + return false; + } + memcpy(dst.verts, src.verts, sizeof(unsigned short)*src.nverts*3); + + dst.polys = (unsigned short*)rcAlloc(sizeof(unsigned short)*src.npolys*2*src.nvp, RC_ALLOC_PERM); + if (!dst.polys) + { + ctx->log(RC_LOG_ERROR, "rcCopyPolyMesh: Out of memory 'dst.polys' (%d).", src.npolys*2*src.nvp); + return false; + } + memcpy(dst.polys, src.polys, sizeof(unsigned short)*src.npolys*2*src.nvp); + + dst.regs = (unsigned short*)rcAlloc(sizeof(unsigned short)*src.npolys, RC_ALLOC_PERM); + if (!dst.regs) + { + ctx->log(RC_LOG_ERROR, "rcCopyPolyMesh: Out of memory 'dst.regs' (%d).", src.npolys); + return false; + } + memcpy(dst.regs, src.regs, sizeof(unsigned short)*src.npolys); + + dst.areas = (unsigned char*)rcAlloc(sizeof(unsigned char)*src.npolys, RC_ALLOC_PERM); + if (!dst.areas) + { + ctx->log(RC_LOG_ERROR, "rcCopyPolyMesh: Out of memory 'dst.areas' (%d).", src.npolys); + return false; + } + memcpy(dst.areas, src.areas, sizeof(unsigned char)*src.npolys); + + dst.flags = (unsigned short*)rcAlloc(sizeof(unsigned short)*src.npolys, RC_ALLOC_PERM); + if (!dst.flags) + { + ctx->log(RC_LOG_ERROR, "rcCopyPolyMesh: Out of memory 'dst.flags' (%d).", src.npolys); + return false; + } + memcpy(dst.flags, src.flags, sizeof(unsigned short)*src.npolys); + + return true; +} diff --git a/libs/recast/recast/src/RecastMeshDetail.cpp b/libs/recast/recast/src/RecastMeshDetail.cpp new file mode 100644 index 000000000..f953132f7 --- /dev/null +++ b/libs/recast/recast/src/RecastMeshDetail.cpp @@ -0,0 +1,1462 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#include +#define _USE_MATH_DEFINES +#include +#include +#include +#include +#include "Recast.h" +#include "RecastAlloc.h" +#include "RecastAssert.h" + + +static const unsigned RC_UNSET_HEIGHT = 0xffff; + +struct rcHeightPatch +{ + inline rcHeightPatch() : data(0), xmin(0), ymin(0), width(0), height(0) {} + inline ~rcHeightPatch() { rcFree(data); } + unsigned short* data; + int xmin, ymin, width, height; +}; + + +inline float vdot2(const float* a, const float* b) +{ + return a[0]*b[0] + a[2]*b[2]; +} + +inline float vdistSq2(const float* p, const float* q) +{ + const float dx = q[0] - p[0]; + const float dy = q[2] - p[2]; + return dx*dx + dy*dy; +} + +inline float vdist2(const float* p, const float* q) +{ + return sqrtf(vdistSq2(p,q)); +} + +inline float vcross2(const float* p1, const float* p2, const float* p3) +{ + const float u1 = p2[0] - p1[0]; + const float v1 = p2[2] - p1[2]; + const float u2 = p3[0] - p1[0]; + const float v2 = p3[2] - p1[2]; + return u1 * v2 - v1 * u2; +} + +static bool circumCircle(const float* p1, const float* p2, const float* p3, + float* c, float& r) +{ + static const float EPS = 1e-6f; + // Calculate the circle relative to p1, to avoid some precision issues. + const float v1[3] = {0,0,0}; + float v2[3], v3[3]; + rcVsub(v2, p2,p1); + rcVsub(v3, p3,p1); + + const float cp = vcross2(v1, v2, v3); + if (fabsf(cp) > EPS) + { + const float v1Sq = vdot2(v1,v1); + const float v2Sq = vdot2(v2,v2); + const float v3Sq = vdot2(v3,v3); + c[0] = (v1Sq*(v2[2]-v3[2]) + v2Sq*(v3[2]-v1[2]) + v3Sq*(v1[2]-v2[2])) / (2*cp); + c[1] = 0; + c[2] = (v1Sq*(v3[0]-v2[0]) + v2Sq*(v1[0]-v3[0]) + v3Sq*(v2[0]-v1[0])) / (2*cp); + r = vdist2(c, v1); + rcVadd(c, c, p1); + return true; + } + + rcVcopy(c, p1); + r = 0; + return false; +} + +static float distPtTri(const float* p, const float* a, const float* b, const float* c) +{ + float v0[3], v1[3], v2[3]; + rcVsub(v0, c,a); + rcVsub(v1, b,a); + rcVsub(v2, p,a); + + const float dot00 = vdot2(v0, v0); + const float dot01 = vdot2(v0, v1); + const float dot02 = vdot2(v0, v2); + const float dot11 = vdot2(v1, v1); + const float dot12 = vdot2(v1, v2); + + // Compute barycentric coordinates + const float invDenom = 1.0f / (dot00 * dot11 - dot01 * dot01); + const float u = (dot11 * dot02 - dot01 * dot12) * invDenom; + float v = (dot00 * dot12 - dot01 * dot02) * invDenom; + + // If point lies inside the triangle, return interpolated y-coord. + static const float EPS = 1e-4f; + if (u >= -EPS && v >= -EPS && (u+v) <= 1+EPS) + { + const float y = a[1] + v0[1]*u + v1[1]*v; + return fabsf(y-p[1]); + } + return FLT_MAX; +} + +static float distancePtSeg(const float* pt, const float* p, const float* q) +{ + float pqx = q[0] - p[0]; + float pqy = q[1] - p[1]; + float pqz = q[2] - p[2]; + float dx = pt[0] - p[0]; + float dy = pt[1] - p[1]; + float dz = pt[2] - p[2]; + float d = pqx*pqx + pqy*pqy + pqz*pqz; + float t = pqx*dx + pqy*dy + pqz*dz; + if (d > 0) + t /= d; + if (t < 0) + t = 0; + else if (t > 1) + t = 1; + + dx = p[0] + t*pqx - pt[0]; + dy = p[1] + t*pqy - pt[1]; + dz = p[2] + t*pqz - pt[2]; + + return dx*dx + dy*dy + dz*dz; +} + +static float distancePtSeg2d(const float* pt, const float* p, const float* q) +{ + float pqx = q[0] - p[0]; + float pqz = q[2] - p[2]; + float dx = pt[0] - p[0]; + float dz = pt[2] - p[2]; + float d = pqx*pqx + pqz*pqz; + float t = pqx*dx + pqz*dz; + if (d > 0) + t /= d; + if (t < 0) + t = 0; + else if (t > 1) + t = 1; + + dx = p[0] + t*pqx - pt[0]; + dz = p[2] + t*pqz - pt[2]; + + return dx*dx + dz*dz; +} + +static float distToTriMesh(const float* p, const float* verts, const int /*nverts*/, const int* tris, const int ntris) +{ + float dmin = FLT_MAX; + for (int i = 0; i < ntris; ++i) + { + const float* va = &verts[tris[i*4+0]*3]; + const float* vb = &verts[tris[i*4+1]*3]; + const float* vc = &verts[tris[i*4+2]*3]; + float d = distPtTri(p, va,vb,vc); + if (d < dmin) + dmin = d; + } + if (dmin == FLT_MAX) return -1; + return dmin; +} + +static float distToPoly(int nvert, const float* verts, const float* p) +{ + + float dmin = FLT_MAX; + int i, j, c = 0; + for (i = 0, j = nvert-1; i < nvert; j = i++) + { + const float* vi = &verts[i*3]; + const float* vj = &verts[j*3]; + if (((vi[2] > p[2]) != (vj[2] > p[2])) && + (p[0] < (vj[0]-vi[0]) * (p[2]-vi[2]) / (vj[2]-vi[2]) + vi[0]) ) + c = !c; + dmin = rcMin(dmin, distancePtSeg2d(p, vj, vi)); + } + return c ? -dmin : dmin; +} + + +static unsigned short getHeight(const float fx, const float fy, const float fz, + const float /*cs*/, const float ics, const float ch, + const int radius, const rcHeightPatch& hp) +{ + int ix = (int)floorf(fx*ics + 0.01f); + int iz = (int)floorf(fz*ics + 0.01f); + ix = rcClamp(ix-hp.xmin, 0, hp.width - 1); + iz = rcClamp(iz-hp.ymin, 0, hp.height - 1); + unsigned short h = hp.data[ix+iz*hp.width]; + if (h == RC_UNSET_HEIGHT) + { + // Special case when data might be bad. + // Walk adjacent cells in a spiral up to 'radius', and look + // for a pixel which has a valid height. + int x = 1, z = 0, dx = 1, dz = 0; + int maxSize = radius * 2 + 1; + int maxIter = maxSize * maxSize - 1; + + int nextRingIterStart = 8; + int nextRingIters = 16; + + float dmin = FLT_MAX; + for (int i = 0; i < maxIter; i++) + { + const int nx = ix + x; + const int nz = iz + z; + + if (nx >= 0 && nz >= 0 && nx < hp.width && nz < hp.height) + { + const unsigned short nh = hp.data[nx + nz*hp.width]; + if (nh != RC_UNSET_HEIGHT) + { + const float d = fabsf(nh*ch - fy); + if (d < dmin) + { + h = nh; + dmin = d; + } + } + } + + // We are searching in a grid which looks approximately like this: + // __________ + // |2 ______ 2| + // | |1 __ 1| | + // | | |__| | | + // | |______| | + // |__________| + // We want to find the best height as close to the center cell as possible. This means that + // if we find a height in one of the neighbor cells to the center, we don't want to + // expand further out than the 8 neighbors - we want to limit our search to the closest + // of these "rings", but the best height in the ring. + // For example, the center is just 1 cell. We checked that at the entrance to the function. + // The next "ring" contains 8 cells (marked 1 above). Those are all the neighbors to the center cell. + // The next one again contains 16 cells (marked 2). In general each ring has 8 additional cells, which + // can be thought of as adding 2 cells around the "center" of each side when we expand the ring. + // Here we detect if we are about to enter the next ring, and if we are and we have found + // a height, we abort the search. + if (i + 1 == nextRingIterStart) + { + if (h != RC_UNSET_HEIGHT) + break; + + nextRingIterStart += nextRingIters; + nextRingIters += 8; + } + + if ((x == z) || ((x < 0) && (x == -z)) || ((x > 0) && (x == 1 - z))) + { + int tmp = dx; + dx = -dz; + dz = tmp; + } + x += dx; + z += dz; + } + } + return h; +} + + +enum EdgeValues +{ + EV_UNDEF = -1, + EV_HULL = -2, +}; + +static int findEdge(const int* edges, int nedges, int s, int t) +{ + for (int i = 0; i < nedges; i++) + { + const int* e = &edges[i*4]; + if ((e[0] == s && e[1] == t) || (e[0] == t && e[1] == s)) + return i; + } + return EV_UNDEF; +} + +static int addEdge(rcContext* ctx, int* edges, int& nedges, const int maxEdges, int s, int t, int l, int r) +{ + if (nedges >= maxEdges) + { + ctx->log(RC_LOG_ERROR, "addEdge: Too many edges (%d/%d).", nedges, maxEdges); + return EV_UNDEF; + } + + // Add edge if not already in the triangulation. + int e = findEdge(edges, nedges, s, t); + if (e == EV_UNDEF) + { + int* edge = &edges[nedges*4]; + edge[0] = s; + edge[1] = t; + edge[2] = l; + edge[3] = r; + return nedges++; + } + else + { + return EV_UNDEF; + } +} + +static void updateLeftFace(int* e, int s, int t, int f) +{ + if (e[0] == s && e[1] == t && e[2] == EV_UNDEF) + e[2] = f; + else if (e[1] == s && e[0] == t && e[3] == EV_UNDEF) + e[3] = f; +} + +static int overlapSegSeg2d(const float* a, const float* b, const float* c, const float* d) +{ + const float a1 = vcross2(a, b, d); + const float a2 = vcross2(a, b, c); + if (a1*a2 < 0.0f) + { + float a3 = vcross2(c, d, a); + float a4 = a3 + a2 - a1; + if (a3 * a4 < 0.0f) + return 1; + } + return 0; +} + +static bool overlapEdges(const float* pts, const int* edges, int nedges, int s1, int t1) +{ + for (int i = 0; i < nedges; ++i) + { + const int s0 = edges[i*4+0]; + const int t0 = edges[i*4+1]; + // Same or connected edges do not overlap. + if (s0 == s1 || s0 == t1 || t0 == s1 || t0 == t1) + continue; + if (overlapSegSeg2d(&pts[s0*3],&pts[t0*3], &pts[s1*3],&pts[t1*3])) + return true; + } + return false; +} + +static void completeFacet(rcContext* ctx, const float* pts, int npts, int* edges, int& nedges, const int maxEdges, int& nfaces, int e) +{ + static const float EPS = 1e-5f; + + int* edge = &edges[e*4]; + + // Cache s and t. + int s,t; + if (edge[2] == EV_UNDEF) + { + s = edge[0]; + t = edge[1]; + } + else if (edge[3] == EV_UNDEF) + { + s = edge[1]; + t = edge[0]; + } + else + { + // Edge already completed. + return; + } + + // Find best point on left of edge. + int pt = npts; + float c[3] = {0,0,0}; + float r = -1; + for (int u = 0; u < npts; ++u) + { + if (u == s || u == t) continue; + if (vcross2(&pts[s*3], &pts[t*3], &pts[u*3]) > EPS) + { + if (r < 0) + { + // The circle is not updated yet, do it now. + pt = u; + circumCircle(&pts[s*3], &pts[t*3], &pts[u*3], c, r); + continue; + } + const float d = vdist2(c, &pts[u*3]); + const float tol = 0.001f; + if (d > r*(1+tol)) + { + // Outside current circumcircle, skip. + continue; + } + else if (d < r*(1-tol)) + { + // Inside safe circumcircle, update circle. + pt = u; + circumCircle(&pts[s*3], &pts[t*3], &pts[u*3], c, r); + } + else + { + // Inside epsilon circum circle, do extra tests to make sure the edge is valid. + // s-u and t-u cannot overlap with s-pt nor t-pt if they exists. + if (overlapEdges(pts, edges, nedges, s,u)) + continue; + if (overlapEdges(pts, edges, nedges, t,u)) + continue; + // Edge is valid. + pt = u; + circumCircle(&pts[s*3], &pts[t*3], &pts[u*3], c, r); + } + } + } + + // Add new triangle or update edge info if s-t is on hull. + if (pt < npts) + { + // Update face information of edge being completed. + updateLeftFace(&edges[e*4], s, t, nfaces); + + // Add new edge or update face info of old edge. + e = findEdge(edges, nedges, pt, s); + if (e == EV_UNDEF) + addEdge(ctx, edges, nedges, maxEdges, pt, s, nfaces, EV_UNDEF); + else + updateLeftFace(&edges[e*4], pt, s, nfaces); + + // Add new edge or update face info of old edge. + e = findEdge(edges, nedges, t, pt); + if (e == EV_UNDEF) + addEdge(ctx, edges, nedges, maxEdges, t, pt, nfaces, EV_UNDEF); + else + updateLeftFace(&edges[e*4], t, pt, nfaces); + + nfaces++; + } + else + { + updateLeftFace(&edges[e*4], s, t, EV_HULL); + } +} + +static void delaunayHull(rcContext* ctx, const int npts, const float* pts, + const int nhull, const int* hull, + rcIntArray& tris, rcIntArray& edges) +{ + int nfaces = 0; + int nedges = 0; + const int maxEdges = npts*10; + edges.resize(maxEdges*4); + + for (int i = 0, j = nhull-1; i < nhull; j=i++) + addEdge(ctx, &edges[0], nedges, maxEdges, hull[j],hull[i], EV_HULL, EV_UNDEF); + + int currentEdge = 0; + while (currentEdge < nedges) + { + if (edges[currentEdge*4+2] == EV_UNDEF) + completeFacet(ctx, pts, npts, &edges[0], nedges, maxEdges, nfaces, currentEdge); + if (edges[currentEdge*4+3] == EV_UNDEF) + completeFacet(ctx, pts, npts, &edges[0], nedges, maxEdges, nfaces, currentEdge); + currentEdge++; + } + + // Create tris + tris.resize(nfaces*4); + for (int i = 0; i < nfaces*4; ++i) + tris[i] = -1; + + for (int i = 0; i < nedges; ++i) + { + const int* e = &edges[i*4]; + if (e[3] >= 0) + { + // Left face + int* t = &tris[e[3]*4]; + if (t[0] == -1) + { + t[0] = e[0]; + t[1] = e[1]; + } + else if (t[0] == e[1]) + t[2] = e[0]; + else if (t[1] == e[0]) + t[2] = e[1]; + } + if (e[2] >= 0) + { + // Right + int* t = &tris[e[2]*4]; + if (t[0] == -1) + { + t[0] = e[1]; + t[1] = e[0]; + } + else if (t[0] == e[0]) + t[2] = e[1]; + else if (t[1] == e[1]) + t[2] = e[0]; + } + } + + for (int i = 0; i < tris.size()/4; ++i) + { + int* t = &tris[i*4]; + if (t[0] == -1 || t[1] == -1 || t[2] == -1) + { + ctx->log(RC_LOG_WARNING, "delaunayHull: Removing dangling face %d [%d,%d,%d].", i, t[0],t[1],t[2]); + t[0] = tris[tris.size()-4]; + t[1] = tris[tris.size()-3]; + t[2] = tris[tris.size()-2]; + t[3] = tris[tris.size()-1]; + tris.resize(tris.size()-4); + --i; + } + } +} + +// Calculate minimum extend of the polygon. +static float polyMinExtent(const float* verts, const int nverts) +{ + float minDist = FLT_MAX; + for (int i = 0; i < nverts; i++) + { + const int ni = (i+1) % nverts; + const float* p1 = &verts[i*3]; + const float* p2 = &verts[ni*3]; + float maxEdgeDist = 0; + for (int j = 0; j < nverts; j++) + { + if (j == i || j == ni) continue; + float d = distancePtSeg2d(&verts[j*3], p1,p2); + maxEdgeDist = rcMax(maxEdgeDist, d); + } + minDist = rcMin(minDist, maxEdgeDist); + } + return rcSqrt(minDist); +} + +// Last time I checked the if version got compiled using cmov, which was a lot faster than module (with idiv). +inline int prev(int i, int n) { return i-1 >= 0 ? i-1 : n-1; } +inline int next(int i, int n) { return i+1 < n ? i+1 : 0; } + +static void triangulateHull(const int /*nverts*/, const float* verts, const int nhull, const int* hull, rcIntArray& tris) +{ + int start = 0, left = 1, right = nhull-1; + + // Start from an ear with shortest perimeter. + // This tends to favor well formed triangles as starting point. + float dmin = 0; + for (int i = 0; i < nhull; i++) + { + int pi = prev(i, nhull); + int ni = next(i, nhull); + const float* pv = &verts[hull[pi]*3]; + const float* cv = &verts[hull[i]*3]; + const float* nv = &verts[hull[ni]*3]; + const float d = vdist2(pv,cv) + vdist2(cv,nv) + vdist2(nv,pv); + if (d < dmin) + { + start = i; + left = ni; + right = pi; + dmin = d; + } + } + + // Add first triangle + tris.push(hull[start]); + tris.push(hull[left]); + tris.push(hull[right]); + tris.push(0); + + // Triangulate the polygon by moving left or right, + // depending on which triangle has shorter perimeter. + // This heuristic was chose emprically, since it seems + // handle tesselated straight edges well. + while (next(left, nhull) != right) + { + // Check to see if se should advance left or right. + int nleft = next(left, nhull); + int nright = prev(right, nhull); + + const float* cvleft = &verts[hull[left]*3]; + const float* nvleft = &verts[hull[nleft]*3]; + const float* cvright = &verts[hull[right]*3]; + const float* nvright = &verts[hull[nright]*3]; + const float dleft = vdist2(cvleft, nvleft) + vdist2(nvleft, cvright); + const float dright = vdist2(cvright, nvright) + vdist2(cvleft, nvright); + + if (dleft < dright) + { + tris.push(hull[left]); + tris.push(hull[nleft]); + tris.push(hull[right]); + tris.push(0); + left = nleft; + } + else + { + tris.push(hull[left]); + tris.push(hull[nright]); + tris.push(hull[right]); + tris.push(0); + right = nright; + } + } +} + + +inline float getJitterX(const int i) +{ + return (((i * 0x8da6b343) & 0xffff) / 65535.0f * 2.0f) - 1.0f; +} + +inline float getJitterY(const int i) +{ + return (((i * 0xd8163841) & 0xffff) / 65535.0f * 2.0f) - 1.0f; +} + +static bool buildPolyDetail(rcContext* ctx, const float* in, const int nin, + const float sampleDist, const float sampleMaxError, + const int heightSearchRadius, const rcCompactHeightfield& chf, + const rcHeightPatch& hp, float* verts, int& nverts, + rcIntArray& tris, rcIntArray& edges, rcIntArray& samples) +{ + static const int MAX_VERTS = 127; + static const int MAX_TRIS = 255; // Max tris for delaunay is 2n-2-k (n=num verts, k=num hull verts). + static const int MAX_VERTS_PER_EDGE = 32; + float edge[(MAX_VERTS_PER_EDGE+1)*3]; + int hull[MAX_VERTS]; + int nhull = 0; + + nverts = nin; + + for (int i = 0; i < nin; ++i) + rcVcopy(&verts[i*3], &in[i*3]); + + edges.resize(0); + tris.resize(0); + + const float cs = chf.cs; + const float ics = 1.0f/cs; + + // Calculate minimum extents of the polygon based on input data. + float minExtent = polyMinExtent(verts, nverts); + + // Tessellate outlines. + // This is done in separate pass in order to ensure + // seamless height values across the ply boundaries. + if (sampleDist > 0) + { + for (int i = 0, j = nin-1; i < nin; j=i++) + { + const float* vj = &in[j*3]; + const float* vi = &in[i*3]; + bool swapped = false; + // Make sure the segments are always handled in same order + // using lexological sort or else there will be seams. + if (fabsf(vj[0]-vi[0]) < 1e-6f) + { + if (vj[2] > vi[2]) + { + rcSwap(vj,vi); + swapped = true; + } + } + else + { + if (vj[0] > vi[0]) + { + rcSwap(vj,vi); + swapped = true; + } + } + // Create samples along the edge. + float dx = vi[0] - vj[0]; + float dy = vi[1] - vj[1]; + float dz = vi[2] - vj[2]; + float d = sqrtf(dx*dx + dz*dz); + int nn = 1 + (int)floorf(d/sampleDist); + if (nn >= MAX_VERTS_PER_EDGE) nn = MAX_VERTS_PER_EDGE-1; + if (nverts+nn >= MAX_VERTS) + nn = MAX_VERTS-1-nverts; + + for (int k = 0; k <= nn; ++k) + { + float u = (float)k/(float)nn; + float* pos = &edge[k*3]; + pos[0] = vj[0] + dx*u; + pos[1] = vj[1] + dy*u; + pos[2] = vj[2] + dz*u; + pos[1] = getHeight(pos[0],pos[1],pos[2], cs, ics, chf.ch, heightSearchRadius, hp)*chf.ch; + } + // Simplify samples. + int idx[MAX_VERTS_PER_EDGE] = {0,nn}; + int nidx = 2; + for (int k = 0; k < nidx-1; ) + { + const int a = idx[k]; + const int b = idx[k+1]; + const float* va = &edge[a*3]; + const float* vb = &edge[b*3]; + // Find maximum deviation along the segment. + float maxd = 0; + int maxi = -1; + for (int m = a+1; m < b; ++m) + { + float dev = distancePtSeg(&edge[m*3],va,vb); + if (dev > maxd) + { + maxd = dev; + maxi = m; + } + } + // If the max deviation is larger than accepted error, + // add new point, else continue to next segment. + if (maxi != -1 && maxd > rcSqr(sampleMaxError)) + { + for (int m = nidx; m > k; --m) + idx[m] = idx[m-1]; + idx[k+1] = maxi; + nidx++; + } + else + { + ++k; + } + } + + hull[nhull++] = j; + // Add new vertices. + if (swapped) + { + for (int k = nidx-2; k > 0; --k) + { + rcVcopy(&verts[nverts*3], &edge[idx[k]*3]); + hull[nhull++] = nverts; + nverts++; + } + } + else + { + for (int k = 1; k < nidx-1; ++k) + { + rcVcopy(&verts[nverts*3], &edge[idx[k]*3]); + hull[nhull++] = nverts; + nverts++; + } + } + } + } + + // If the polygon minimum extent is small (sliver or small triangle), do not try to add internal points. + if (minExtent < sampleDist*2) + { + triangulateHull(nverts, verts, nhull, hull, tris); + return true; + } + + // Tessellate the base mesh. + // We're using the triangulateHull instead of delaunayHull as it tends to + // create a bit better triangulation for long thin triangles when there + // are no internal points. + triangulateHull(nverts, verts, nhull, hull, tris); + + if (tris.size() == 0) + { + // Could not triangulate the poly, make sure there is some valid data there. + ctx->log(RC_LOG_WARNING, "buildPolyDetail: Could not triangulate polygon (%d verts).", nverts); + return true; + } + + if (sampleDist > 0) + { + // Create sample locations in a grid. + float bmin[3], bmax[3]; + rcVcopy(bmin, in); + rcVcopy(bmax, in); + for (int i = 1; i < nin; ++i) + { + rcVmin(bmin, &in[i*3]); + rcVmax(bmax, &in[i*3]); + } + int x0 = (int)floorf(bmin[0]/sampleDist); + int x1 = (int)ceilf(bmax[0]/sampleDist); + int z0 = (int)floorf(bmin[2]/sampleDist); + int z1 = (int)ceilf(bmax[2]/sampleDist); + samples.resize(0); + for (int z = z0; z < z1; ++z) + { + for (int x = x0; x < x1; ++x) + { + float pt[3]; + pt[0] = x*sampleDist; + pt[1] = (bmax[1]+bmin[1])*0.5f; + pt[2] = z*sampleDist; + // Make sure the samples are not too close to the edges. + if (distToPoly(nin,in,pt) > -sampleDist/2) continue; + samples.push(x); + samples.push(getHeight(pt[0], pt[1], pt[2], cs, ics, chf.ch, heightSearchRadius, hp)); + samples.push(z); + samples.push(0); // Not added + } + } + + // Add the samples starting from the one that has the most + // error. The procedure stops when all samples are added + // or when the max error is within treshold. + const int nsamples = samples.size()/4; + for (int iter = 0; iter < nsamples; ++iter) + { + if (nverts >= MAX_VERTS) + break; + + // Find sample with most error. + float bestpt[3] = {0,0,0}; + float bestd = 0; + int besti = -1; + for (int i = 0; i < nsamples; ++i) + { + const int* s = &samples[i*4]; + if (s[3]) continue; // skip added. + float pt[3]; + // The sample location is jittered to get rid of some bad triangulations + // which are cause by symmetrical data from the grid structure. + pt[0] = s[0]*sampleDist + getJitterX(i)*cs*0.1f; + pt[1] = s[1]*chf.ch; + pt[2] = s[2]*sampleDist + getJitterY(i)*cs*0.1f; + float d = distToTriMesh(pt, verts, nverts, &tris[0], tris.size()/4); + if (d < 0) continue; // did not hit the mesh. + if (d > bestd) + { + bestd = d; + besti = i; + rcVcopy(bestpt,pt); + } + } + // If the max error is within accepted threshold, stop tesselating. + if (bestd <= sampleMaxError || besti == -1) + break; + // Mark sample as added. + samples[besti*4+3] = 1; + // Add the new sample point. + rcVcopy(&verts[nverts*3],bestpt); + nverts++; + + // Create new triangulation. + // TODO: Incremental add instead of full rebuild. + edges.resize(0); + tris.resize(0); + delaunayHull(ctx, nverts, verts, nhull, hull, tris, edges); + } + } + + const int ntris = tris.size()/4; + if (ntris > MAX_TRIS) + { + tris.resize(MAX_TRIS*4); + ctx->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Shrinking triangle count from %d to max %d.", ntris, MAX_TRIS); + } + + return true; +} + +static void seedArrayWithPolyCenter(rcContext* ctx, const rcCompactHeightfield& chf, + const unsigned short* poly, const int npoly, + const unsigned short* verts, const int bs, + rcHeightPatch& hp, rcIntArray& array) +{ + // Note: Reads to the compact heightfield are offset by border size (bs) + // since border size offset is already removed from the polymesh vertices. + + static const int offset[9*2] = + { + 0,0, -1,-1, 0,-1, 1,-1, 1,0, 1,1, 0,1, -1,1, -1,0, + }; + + // Find cell closest to a poly vertex + int startCellX = 0, startCellY = 0, startSpanIndex = -1; + int dmin = RC_UNSET_HEIGHT; + for (int j = 0; j < npoly && dmin > 0; ++j) + { + for (int k = 0; k < 9 && dmin > 0; ++k) + { + const int ax = (int)verts[poly[j]*3+0] + offset[k*2+0]; + const int ay = (int)verts[poly[j]*3+1]; + const int az = (int)verts[poly[j]*3+2] + offset[k*2+1]; + if (ax < hp.xmin || ax >= hp.xmin+hp.width || + az < hp.ymin || az >= hp.ymin+hp.height) + continue; + + const rcCompactCell& c = chf.cells[(ax+bs)+(az+bs)*chf.width]; + for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni && dmin > 0; ++i) + { + const rcCompactSpan& s = chf.spans[i]; + int d = rcAbs(ay - (int)s.y); + if (d < dmin) + { + startCellX = ax; + startCellY = az; + startSpanIndex = i; + dmin = d; + } + } + } + } + + rcAssert(startSpanIndex != -1); + // Find center of the polygon + int pcx = 0, pcy = 0; + for (int j = 0; j < npoly; ++j) + { + pcx += (int)verts[poly[j]*3+0]; + pcy += (int)verts[poly[j]*3+2]; + } + pcx /= npoly; + pcy /= npoly; + + // Use seeds array as a stack for DFS + array.resize(0); + array.push(startCellX); + array.push(startCellY); + array.push(startSpanIndex); + + int dirs[] = { 0, 1, 2, 3 }; + memset(hp.data, 0, sizeof(unsigned short)*hp.width*hp.height); + // DFS to move to the center. Note that we need a DFS here and can not just move + // directly towards the center without recording intermediate nodes, even though the polygons + // are convex. In very rare we can get stuck due to contour simplification if we do not + // record nodes. + int cx = -1, cy = -1, ci = -1; + while (true) + { + if (array.size() < 3) + { + ctx->log(RC_LOG_WARNING, "Walk towards polygon center failed to reach center"); + break; + } + + ci = array.pop(); + cy = array.pop(); + cx = array.pop(); + + if (cx == pcx && cy == pcy) + break; + + // If we are already at the correct X-position, prefer direction + // directly towards the center in the Y-axis; otherwise prefer + // direction in the X-axis + int directDir; + if (cx == pcx) + directDir = rcGetDirForOffset(0, pcy > cy ? 1 : -1); + else + directDir = rcGetDirForOffset(pcx > cx ? 1 : -1, 0); + + // Push the direct dir last so we start with this on next iteration + rcSwap(dirs[directDir], dirs[3]); + + const rcCompactSpan& cs = chf.spans[ci]; + for (int i = 0; i < 4; i++) + { + int dir = dirs[i]; + if (rcGetCon(cs, dir) == RC_NOT_CONNECTED) + continue; + + int newX = cx + rcGetDirOffsetX(dir); + int newY = cy + rcGetDirOffsetY(dir); + + int hpx = newX - hp.xmin; + int hpy = newY - hp.ymin; + if (hpx < 0 || hpx >= hp.width || hpy < 0 || hpy >= hp.height) + continue; + + if (hp.data[hpx+hpy*hp.width] != 0) + continue; + + hp.data[hpx+hpy*hp.width] = 1; + array.push(newX); + array.push(newY); + array.push((int)chf.cells[(newX+bs)+(newY+bs)*chf.width].index + rcGetCon(cs, dir)); + } + + rcSwap(dirs[directDir], dirs[3]); + } + + array.resize(0); + // getHeightData seeds are given in coordinates with borders + array.push(cx+bs); + array.push(cy+bs); + array.push(ci); + + memset(hp.data, 0xff, sizeof(unsigned short)*hp.width*hp.height); + const rcCompactSpan& cs = chf.spans[ci]; + hp.data[cx-hp.xmin+(cy-hp.ymin)*hp.width] = cs.y; +} + + +static void push3(rcIntArray& queue, int v1, int v2, int v3) +{ + queue.resize(queue.size() + 3); + queue[queue.size() - 3] = v1; + queue[queue.size() - 2] = v2; + queue[queue.size() - 1] = v3; +} + +static void getHeightData(rcContext* ctx, const rcCompactHeightfield& chf, + const unsigned short* poly, const int npoly, + const unsigned short* verts, const int bs, + rcHeightPatch& hp, rcIntArray& queue, + int region) +{ + // Note: Reads to the compact heightfield are offset by border size (bs) + // since border size offset is already removed from the polymesh vertices. + + queue.resize(0); + // Set all heights to RC_UNSET_HEIGHT. + memset(hp.data, 0xff, sizeof(unsigned short)*hp.width*hp.height); + + bool empty = true; + + // We cannot sample from this poly if it was created from polys + // of different regions. If it was then it could potentially be overlapping + // with polys of that region and the heights sampled here could be wrong. + if (region != RC_MULTIPLE_REGS) + { + // Copy the height from the same region, and mark region borders + // as seed points to fill the rest. + for (int hy = 0; hy < hp.height; hy++) + { + int y = hp.ymin + hy + bs; + for (int hx = 0; hx < hp.width; hx++) + { + int x = hp.xmin + hx + bs; + const rcCompactCell& c = chf.cells[x + y*chf.width]; + for (int i = (int)c.index, ni = (int)(c.index + c.count); i < ni; ++i) + { + const rcCompactSpan& s = chf.spans[i]; + if (s.reg == region) + { + // Store height + hp.data[hx + hy*hp.width] = s.y; + empty = false; + + // If any of the neighbours is not in same region, + // add the current location as flood fill start + bool border = false; + for (int dir = 0; dir < 4; ++dir) + { + if (rcGetCon(s, dir) != RC_NOT_CONNECTED) + { + const int ax = x + rcGetDirOffsetX(dir); + const int ay = y + rcGetDirOffsetY(dir); + const int ai = (int)chf.cells[ax + ay*chf.width].index + rcGetCon(s, dir); + const rcCompactSpan& as = chf.spans[ai]; + if (as.reg != region) + { + border = true; + break; + } + } + } + if (border) + push3(queue, x, y, i); + break; + } + } + } + } + } + + // if the polygon does not contain any points from the current region (rare, but happens) + // or if it could potentially be overlapping polygons of the same region, + // then use the center as the seed point. + if (empty) + seedArrayWithPolyCenter(ctx, chf, poly, npoly, verts, bs, hp, queue); + + static const int RETRACT_SIZE = 256; + int head = 0; + + // We assume the seed is centered in the polygon, so a BFS to collect + // height data will ensure we do not move onto overlapping polygons and + // sample wrong heights. + while (head*3 < queue.size()) + { + int cx = queue[head*3+0]; + int cy = queue[head*3+1]; + int ci = queue[head*3+2]; + head++; + if (head >= RETRACT_SIZE) + { + head = 0; + if (queue.size() > RETRACT_SIZE*3) + memmove(&queue[0], &queue[RETRACT_SIZE*3], sizeof(int)*(queue.size()-RETRACT_SIZE*3)); + queue.resize(queue.size()-RETRACT_SIZE*3); + } + + const rcCompactSpan& cs = chf.spans[ci]; + for (int dir = 0; dir < 4; ++dir) + { + if (rcGetCon(cs, dir) == RC_NOT_CONNECTED) continue; + + const int ax = cx + rcGetDirOffsetX(dir); + const int ay = cy + rcGetDirOffsetY(dir); + const int hx = ax - hp.xmin - bs; + const int hy = ay - hp.ymin - bs; + + if ((unsigned int)hx >= (unsigned int)hp.width || (unsigned int)hy >= (unsigned int)hp.height) + continue; + + if (hp.data[hx + hy*hp.width] != RC_UNSET_HEIGHT) + continue; + + const int ai = (int)chf.cells[ax + ay*chf.width].index + rcGetCon(cs, dir); + const rcCompactSpan& as = chf.spans[ai]; + + hp.data[hx + hy*hp.width] = as.y; + + push3(queue, ax, ay, ai); + } + } +} + +static unsigned char getEdgeFlags(const float* va, const float* vb, + const float* vpoly, const int npoly) +{ + // Return true if edge (va,vb) is part of the polygon. + static const float thrSqr = rcSqr(0.001f); + for (int i = 0, j = npoly-1; i < npoly; j=i++) + { + if (distancePtSeg2d(va, &vpoly[j*3], &vpoly[i*3]) < thrSqr && + distancePtSeg2d(vb, &vpoly[j*3], &vpoly[i*3]) < thrSqr) + return 1; + } + return 0; +} + +static unsigned char getTriFlags(const float* va, const float* vb, const float* vc, + const float* vpoly, const int npoly) +{ + unsigned char flags = 0; + flags |= getEdgeFlags(va,vb,vpoly,npoly) << 0; + flags |= getEdgeFlags(vb,vc,vpoly,npoly) << 2; + flags |= getEdgeFlags(vc,va,vpoly,npoly) << 4; + return flags; +} + +/// @par +/// +/// See the #rcConfig documentation for more information on the configuration parameters. +/// +/// @see rcAllocPolyMeshDetail, rcPolyMesh, rcCompactHeightfield, rcPolyMeshDetail, rcConfig +bool rcBuildPolyMeshDetail(rcContext* ctx, const rcPolyMesh& mesh, const rcCompactHeightfield& chf, + const float sampleDist, const float sampleMaxError, + rcPolyMeshDetail& dmesh) +{ + rcAssert(ctx); + + rcScopedTimer timer(ctx, RC_TIMER_BUILD_POLYMESHDETAIL); + + if (mesh.nverts == 0 || mesh.npolys == 0) + return true; + + const int nvp = mesh.nvp; + const float cs = mesh.cs; + const float ch = mesh.ch; + const float* orig = mesh.bmin; + const int borderSize = mesh.borderSize; + const int heightSearchRadius = rcMax(1, (int)ceilf(mesh.maxEdgeError)); + + rcIntArray edges(64); + rcIntArray tris(512); + rcIntArray arr(512); + rcIntArray samples(512); + float verts[256*3]; + rcHeightPatch hp; + int nPolyVerts = 0; + int maxhw = 0, maxhh = 0; + + rcScopedDelete bounds((int*)rcAlloc(sizeof(int)*mesh.npolys*4, RC_ALLOC_TEMP)); + if (!bounds) + { + ctx->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'bounds' (%d).", mesh.npolys*4); + return false; + } + rcScopedDelete poly((float*)rcAlloc(sizeof(float)*nvp*3, RC_ALLOC_TEMP)); + if (!poly) + { + ctx->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'poly' (%d).", nvp*3); + return false; + } + + // Find max size for a polygon area. + for (int i = 0; i < mesh.npolys; ++i) + { + const unsigned short* p = &mesh.polys[i*nvp*2]; + int& xmin = bounds[i*4+0]; + int& xmax = bounds[i*4+1]; + int& ymin = bounds[i*4+2]; + int& ymax = bounds[i*4+3]; + xmin = chf.width; + xmax = 0; + ymin = chf.height; + ymax = 0; + for (int j = 0; j < nvp; ++j) + { + if(p[j] == RC_MESH_NULL_IDX) break; + const unsigned short* v = &mesh.verts[p[j]*3]; + xmin = rcMin(xmin, (int)v[0]); + xmax = rcMax(xmax, (int)v[0]); + ymin = rcMin(ymin, (int)v[2]); + ymax = rcMax(ymax, (int)v[2]); + nPolyVerts++; + } + xmin = rcMax(0,xmin-1); + xmax = rcMin(chf.width,xmax+1); + ymin = rcMax(0,ymin-1); + ymax = rcMin(chf.height,ymax+1); + if (xmin >= xmax || ymin >= ymax) continue; + maxhw = rcMax(maxhw, xmax-xmin); + maxhh = rcMax(maxhh, ymax-ymin); + } + + hp.data = (unsigned short*)rcAlloc(sizeof(unsigned short)*maxhw*maxhh, RC_ALLOC_TEMP); + if (!hp.data) + { + ctx->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'hp.data' (%d).", maxhw*maxhh); + return false; + } + + dmesh.nmeshes = mesh.npolys; + dmesh.nverts = 0; + dmesh.ntris = 0; + dmesh.meshes = (unsigned int*)rcAlloc(sizeof(unsigned int)*dmesh.nmeshes*4, RC_ALLOC_PERM); + if (!dmesh.meshes) + { + ctx->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'dmesh.meshes' (%d).", dmesh.nmeshes*4); + return false; + } + + int vcap = nPolyVerts+nPolyVerts/2; + int tcap = vcap*2; + + dmesh.nverts = 0; + dmesh.verts = (float*)rcAlloc(sizeof(float)*vcap*3, RC_ALLOC_PERM); + if (!dmesh.verts) + { + ctx->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'dmesh.verts' (%d).", vcap*3); + return false; + } + dmesh.ntris = 0; + dmesh.tris = (unsigned char*)rcAlloc(sizeof(unsigned char)*tcap*4, RC_ALLOC_PERM); + if (!dmesh.tris) + { + ctx->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'dmesh.tris' (%d).", tcap*4); + return false; + } + + for (int i = 0; i < mesh.npolys; ++i) + { + const unsigned short* p = &mesh.polys[i*nvp*2]; + + // Store polygon vertices for processing. + int npoly = 0; + for (int j = 0; j < nvp; ++j) + { + if(p[j] == RC_MESH_NULL_IDX) break; + const unsigned short* v = &mesh.verts[p[j]*3]; + poly[j*3+0] = v[0]*cs; + poly[j*3+1] = v[1]*ch; + poly[j*3+2] = v[2]*cs; + npoly++; + } + + // Get the height data from the area of the polygon. + hp.xmin = bounds[i*4+0]; + hp.ymin = bounds[i*4+2]; + hp.width = bounds[i*4+1]-bounds[i*4+0]; + hp.height = bounds[i*4+3]-bounds[i*4+2]; + getHeightData(ctx, chf, p, npoly, mesh.verts, borderSize, hp, arr, mesh.regs[i]); + + // Build detail mesh. + int nverts = 0; + if (!buildPolyDetail(ctx, poly, npoly, + sampleDist, sampleMaxError, + heightSearchRadius, chf, hp, + verts, nverts, tris, + edges, samples)) + { + return false; + } + + // Move detail verts to world space. + for (int j = 0; j < nverts; ++j) + { + verts[j*3+0] += orig[0]; + verts[j*3+1] += orig[1] + chf.ch; // Is this offset necessary? + verts[j*3+2] += orig[2]; + } + // Offset poly too, will be used to flag checking. + for (int j = 0; j < npoly; ++j) + { + poly[j*3+0] += orig[0]; + poly[j*3+1] += orig[1]; + poly[j*3+2] += orig[2]; + } + + // Store detail submesh. + const int ntris = tris.size()/4; + + dmesh.meshes[i*4+0] = (unsigned int)dmesh.nverts; + dmesh.meshes[i*4+1] = (unsigned int)nverts; + dmesh.meshes[i*4+2] = (unsigned int)dmesh.ntris; + dmesh.meshes[i*4+3] = (unsigned int)ntris; + + // Store vertices, allocate more memory if necessary. + if (dmesh.nverts+nverts > vcap) + { + while (dmesh.nverts+nverts > vcap) + vcap += 256; + + float* newv = (float*)rcAlloc(sizeof(float)*vcap*3, RC_ALLOC_PERM); + if (!newv) + { + ctx->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'newv' (%d).", vcap*3); + return false; + } + if (dmesh.nverts) + memcpy(newv, dmesh.verts, sizeof(float)*3*dmesh.nverts); + rcFree(dmesh.verts); + dmesh.verts = newv; + } + for (int j = 0; j < nverts; ++j) + { + dmesh.verts[dmesh.nverts*3+0] = verts[j*3+0]; + dmesh.verts[dmesh.nverts*3+1] = verts[j*3+1]; + dmesh.verts[dmesh.nverts*3+2] = verts[j*3+2]; + dmesh.nverts++; + } + + // Store triangles, allocate more memory if necessary. + if (dmesh.ntris+ntris > tcap) + { + while (dmesh.ntris+ntris > tcap) + tcap += 256; + unsigned char* newt = (unsigned char*)rcAlloc(sizeof(unsigned char)*tcap*4, RC_ALLOC_PERM); + if (!newt) + { + ctx->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'newt' (%d).", tcap*4); + return false; + } + if (dmesh.ntris) + memcpy(newt, dmesh.tris, sizeof(unsigned char)*4*dmesh.ntris); + rcFree(dmesh.tris); + dmesh.tris = newt; + } + for (int j = 0; j < ntris; ++j) + { + const int* t = &tris[j*4]; + dmesh.tris[dmesh.ntris*4+0] = (unsigned char)t[0]; + dmesh.tris[dmesh.ntris*4+1] = (unsigned char)t[1]; + dmesh.tris[dmesh.ntris*4+2] = (unsigned char)t[2]; + dmesh.tris[dmesh.ntris*4+3] = getTriFlags(&verts[t[0]*3], &verts[t[1]*3], &verts[t[2]*3], poly, npoly); + dmesh.ntris++; + } + } + + return true; +} + +/// @see rcAllocPolyMeshDetail, rcPolyMeshDetail +bool rcMergePolyMeshDetails(rcContext* ctx, rcPolyMeshDetail** meshes, const int nmeshes, rcPolyMeshDetail& mesh) +{ + rcAssert(ctx); + + rcScopedTimer timer(ctx, RC_TIMER_MERGE_POLYMESHDETAIL); + + int maxVerts = 0; + int maxTris = 0; + int maxMeshes = 0; + + for (int i = 0; i < nmeshes; ++i) + { + if (!meshes[i]) continue; + maxVerts += meshes[i]->nverts; + maxTris += meshes[i]->ntris; + maxMeshes += meshes[i]->nmeshes; + } + + mesh.nmeshes = 0; + mesh.meshes = (unsigned int*)rcAlloc(sizeof(unsigned int)*maxMeshes*4, RC_ALLOC_PERM); + if (!mesh.meshes) + { + ctx->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'pmdtl.meshes' (%d).", maxMeshes*4); + return false; + } + + mesh.ntris = 0; + mesh.tris = (unsigned char*)rcAlloc(sizeof(unsigned char)*maxTris*4, RC_ALLOC_PERM); + if (!mesh.tris) + { + ctx->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'dmesh.tris' (%d).", maxTris*4); + return false; + } + + mesh.nverts = 0; + mesh.verts = (float*)rcAlloc(sizeof(float)*maxVerts*3, RC_ALLOC_PERM); + if (!mesh.verts) + { + ctx->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'dmesh.verts' (%d).", maxVerts*3); + return false; + } + + // Merge datas. + for (int i = 0; i < nmeshes; ++i) + { + rcPolyMeshDetail* dm = meshes[i]; + if (!dm) continue; + for (int j = 0; j < dm->nmeshes; ++j) + { + unsigned int* dst = &mesh.meshes[mesh.nmeshes*4]; + unsigned int* src = &dm->meshes[j*4]; + dst[0] = (unsigned int)mesh.nverts+src[0]; + dst[1] = src[1]; + dst[2] = (unsigned int)mesh.ntris+src[2]; + dst[3] = src[3]; + mesh.nmeshes++; + } + + for (int k = 0; k < dm->nverts; ++k) + { + rcVcopy(&mesh.verts[mesh.nverts*3], &dm->verts[k*3]); + mesh.nverts++; + } + for (int k = 0; k < dm->ntris; ++k) + { + mesh.tris[mesh.ntris*4+0] = dm->tris[k*4+0]; + mesh.tris[mesh.ntris*4+1] = dm->tris[k*4+1]; + mesh.tris[mesh.ntris*4+2] = dm->tris[k*4+2]; + mesh.tris[mesh.ntris*4+3] = dm->tris[k*4+3]; + mesh.ntris++; + } + } + + return true; +} diff --git a/libs/recast/recast/src/RecastRasterization.cpp b/libs/recast/recast/src/RecastRasterization.cpp new file mode 100644 index 000000000..a4cef7490 --- /dev/null +++ b/libs/recast/recast/src/RecastRasterization.cpp @@ -0,0 +1,454 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#define _USE_MATH_DEFINES +#include +#include +#include "Recast.h" +#include "RecastAlloc.h" +#include "RecastAssert.h" + +inline bool overlapBounds(const float* amin, const float* amax, const float* bmin, const float* bmax) +{ + bool overlap = true; + overlap = (amin[0] > bmax[0] || amax[0] < bmin[0]) ? false : overlap; + overlap = (amin[1] > bmax[1] || amax[1] < bmin[1]) ? false : overlap; + overlap = (amin[2] > bmax[2] || amax[2] < bmin[2]) ? false : overlap; + return overlap; +} + +inline bool overlapInterval(unsigned short amin, unsigned short amax, + unsigned short bmin, unsigned short bmax) +{ + if (amax < bmin) return false; + if (amin > bmax) return false; + return true; +} + + +static rcSpan* allocSpan(rcHeightfield& hf) +{ + // If running out of memory, allocate new page and update the freelist. + if (!hf.freelist || !hf.freelist->next) + { + // Create new page. + // Allocate memory for the new pool. + rcSpanPool* pool = (rcSpanPool*)rcAlloc(sizeof(rcSpanPool), RC_ALLOC_PERM); + if (!pool) return 0; + + // Add the pool into the list of pools. + pool->next = hf.pools; + hf.pools = pool; + // Add new items to the free list. + rcSpan* freelist = hf.freelist; + rcSpan* head = &pool->items[0]; + rcSpan* it = &pool->items[RC_SPANS_PER_POOL]; + do + { + --it; + it->next = freelist; + freelist = it; + } + while (it != head); + hf.freelist = it; + } + + // Pop item from in front of the free list. + rcSpan* it = hf.freelist; + hf.freelist = hf.freelist->next; + return it; +} + +static void freeSpan(rcHeightfield& hf, rcSpan* ptr) +{ + if (!ptr) return; + // Add the node in front of the free list. + ptr->next = hf.freelist; + hf.freelist = ptr; +} + +static bool addSpan(rcHeightfield& hf, const int x, const int y, + const unsigned short smin, const unsigned short smax, + const unsigned char area, const int flagMergeThr) +{ + + int idx = x + y*hf.width; + + rcSpan* s = allocSpan(hf); + if (!s) + return false; + s->smin = smin; + s->smax = smax; + s->area = area; + s->next = 0; + + // Empty cell, add the first span. + if (!hf.spans[idx]) + { + hf.spans[idx] = s; + return true; + } + rcSpan* prev = 0; + rcSpan* cur = hf.spans[idx]; + + // Insert and merge spans. + while (cur) + { + if (cur->smin > s->smax) + { + // Current span is further than the new span, break. + break; + } + else if (cur->smax < s->smin) + { + // Current span is before the new span advance. + prev = cur; + cur = cur->next; + } + else + { + // Merge spans. + if (cur->smin < s->smin) + s->smin = cur->smin; + if (cur->smax > s->smax) + s->smax = cur->smax; + + // Merge flags. + if (rcAbs((int)s->smax - (int)cur->smax) <= flagMergeThr) + s->area = rcMax(s->area, cur->area); + + // Remove current span. + rcSpan* next = cur->next; + freeSpan(hf, cur); + if (prev) + prev->next = next; + else + hf.spans[idx] = next; + cur = next; + } + } + + // Insert new span. + if (prev) + { + s->next = prev->next; + prev->next = s; + } + else + { + s->next = hf.spans[idx]; + hf.spans[idx] = s; + } + + return true; +} + +/// @par +/// +/// The span addition can be set to favor flags. If the span is merged to +/// another span and the new @p smax is within @p flagMergeThr units +/// from the existing span, the span flags are merged. +/// +/// @see rcHeightfield, rcSpan. +bool rcAddSpan(rcContext* ctx, rcHeightfield& hf, const int x, const int y, + const unsigned short smin, const unsigned short smax, + const unsigned char area, const int flagMergeThr) +{ + rcAssert(ctx); + + if (!addSpan(hf, x, y, smin, smax, area, flagMergeThr)) + { + ctx->log(RC_LOG_ERROR, "rcAddSpan: Out of memory."); + return false; + } + + return true; +} + +// divides a convex polygons into two convex polygons on both sides of a line +static void dividePoly(const float* in, int nin, + float* out1, int* nout1, + float* out2, int* nout2, + float x, int axis) +{ + float d[12]; + for (int i = 0; i < nin; ++i) + d[i] = x - in[i*3+axis]; + + int m = 0, n = 0; + for (int i = 0, j = nin-1; i < nin; j=i, ++i) + { + bool ina = d[j] >= 0; + bool inb = d[i] >= 0; + if (ina != inb) + { + float s = d[j] / (d[j] - d[i]); + out1[m*3+0] = in[j*3+0] + (in[i*3+0] - in[j*3+0])*s; + out1[m*3+1] = in[j*3+1] + (in[i*3+1] - in[j*3+1])*s; + out1[m*3+2] = in[j*3+2] + (in[i*3+2] - in[j*3+2])*s; + rcVcopy(out2 + n*3, out1 + m*3); + m++; + n++; + // add the i'th point to the right polygon. Do NOT add points that are on the dividing line + // since these were already added above + if (d[i] > 0) + { + rcVcopy(out1 + m*3, in + i*3); + m++; + } + else if (d[i] < 0) + { + rcVcopy(out2 + n*3, in + i*3); + n++; + } + } + else // same side + { + // add the i'th point to the right polygon. Addition is done even for points on the dividing line + if (d[i] >= 0) + { + rcVcopy(out1 + m*3, in + i*3); + m++; + if (d[i] != 0) + continue; + } + rcVcopy(out2 + n*3, in + i*3); + n++; + } + } + + *nout1 = m; + *nout2 = n; +} + + + +static bool rasterizeTri(const float* v0, const float* v1, const float* v2, + const unsigned char area, rcHeightfield& hf, + const float* bmin, const float* bmax, + const float cs, const float ics, const float ich, + const int flagMergeThr) +{ + const int w = hf.width; + const int h = hf.height; + float tmin[3], tmax[3]; + const float by = bmax[1] - bmin[1]; + + // Calculate the bounding box of the triangle. + rcVcopy(tmin, v0); + rcVcopy(tmax, v0); + rcVmin(tmin, v1); + rcVmin(tmin, v2); + rcVmax(tmax, v1); + rcVmax(tmax, v2); + + // If the triangle does not touch the bbox of the heightfield, skip the triagle. + if (!overlapBounds(bmin, bmax, tmin, tmax)) + return true; + + // Calculate the footprint of the triangle on the grid's y-axis + int y0 = (int)((tmin[2] - bmin[2])*ics); + int y1 = (int)((tmax[2] - bmin[2])*ics); + y0 = rcClamp(y0, 0, h-1); + y1 = rcClamp(y1, 0, h-1); + + // Clip the triangle into all grid cells it touches. + float buf[7*3*4]; + float *in = buf, *inrow = buf+7*3, *p1 = inrow+7*3, *p2 = p1+7*3; + + rcVcopy(&in[0], v0); + rcVcopy(&in[1*3], v1); + rcVcopy(&in[2*3], v2); + int nvrow, nvIn = 3; + + for (int y = y0; y <= y1; ++y) + { + // Clip polygon to row. Store the remaining polygon as well + const float cz = bmin[2] + y*cs; + dividePoly(in, nvIn, inrow, &nvrow, p1, &nvIn, cz+cs, 2); + rcSwap(in, p1); + if (nvrow < 3) continue; + + // find the horizontal bounds in the row + float minX = inrow[0], maxX = inrow[0]; + for (int i=1; i inrow[i*3]) minX = inrow[i*3]; + if (maxX < inrow[i*3]) maxX = inrow[i*3]; + } + int x0 = (int)((minX - bmin[0])*ics); + int x1 = (int)((maxX - bmin[0])*ics); + x0 = rcClamp(x0, 0, w-1); + x1 = rcClamp(x1, 0, w-1); + + int nv, nv2 = nvrow; + + for (int x = x0; x <= x1; ++x) + { + // Clip polygon to column. store the remaining polygon as well + const float cx = bmin[0] + x*cs; + dividePoly(inrow, nv2, p1, &nv, p2, &nv2, cx+cs, 0); + rcSwap(inrow, p2); + if (nv < 3) continue; + + // Calculate min and max of the span. + float smin = p1[1], smax = p1[1]; + for (int i = 1; i < nv; ++i) + { + smin = rcMin(smin, p1[i*3+1]); + smax = rcMax(smax, p1[i*3+1]); + } + smin -= bmin[1]; + smax -= bmin[1]; + // Skip the span if it is outside the heightfield bbox + if (smax < 0.0f) continue; + if (smin > by) continue; + // Clamp the span to the heightfield bbox. + if (smin < 0.0f) smin = 0; + if (smax > by) smax = by; + + // Snap the span to the heightfield height grid. + unsigned short ismin = (unsigned short)rcClamp((int)floorf(smin * ich), 0, RC_SPAN_MAX_HEIGHT); + unsigned short ismax = (unsigned short)rcClamp((int)ceilf(smax * ich), (int)ismin+1, RC_SPAN_MAX_HEIGHT); + + if (!addSpan(hf, x, y, ismin, ismax, area, flagMergeThr)) + return false; + } + } + + return true; +} + +/// @par +/// +/// No spans will be added if the triangle does not overlap the heightfield grid. +/// +/// @see rcHeightfield +bool rcRasterizeTriangle(rcContext* ctx, const float* v0, const float* v1, const float* v2, + const unsigned char area, rcHeightfield& solid, + const int flagMergeThr) +{ + rcAssert(ctx); + + rcScopedTimer timer(ctx, RC_TIMER_RASTERIZE_TRIANGLES); + + const float ics = 1.0f/solid.cs; + const float ich = 1.0f/solid.ch; + if (!rasterizeTri(v0, v1, v2, area, solid, solid.bmin, solid.bmax, solid.cs, ics, ich, flagMergeThr)) + { + ctx->log(RC_LOG_ERROR, "rcRasterizeTriangle: Out of memory."); + return false; + } + + return true; +} + +/// @par +/// +/// Spans will only be added for triangles that overlap the heightfield grid. +/// +/// @see rcHeightfield +bool rcRasterizeTriangles(rcContext* ctx, const float* verts, const int /*nv*/, + const int* tris, const unsigned char* areas, const int nt, + rcHeightfield& solid, const int flagMergeThr) +{ + rcAssert(ctx); + + rcScopedTimer timer(ctx, RC_TIMER_RASTERIZE_TRIANGLES); + + const float ics = 1.0f/solid.cs; + const float ich = 1.0f/solid.ch; + // Rasterize triangles. + for (int i = 0; i < nt; ++i) + { + const float* v0 = &verts[tris[i*3+0]*3]; + const float* v1 = &verts[tris[i*3+1]*3]; + const float* v2 = &verts[tris[i*3+2]*3]; + // Rasterize. + if (!rasterizeTri(v0, v1, v2, areas[i], solid, solid.bmin, solid.bmax, solid.cs, ics, ich, flagMergeThr)) + { + ctx->log(RC_LOG_ERROR, "rcRasterizeTriangles: Out of memory."); + return false; + } + } + + return true; +} + +/// @par +/// +/// Spans will only be added for triangles that overlap the heightfield grid. +/// +/// @see rcHeightfield +bool rcRasterizeTriangles(rcContext* ctx, const float* verts, const int /*nv*/, + const unsigned short* tris, const unsigned char* areas, const int nt, + rcHeightfield& solid, const int flagMergeThr) +{ + rcAssert(ctx); + + rcScopedTimer timer(ctx, RC_TIMER_RASTERIZE_TRIANGLES); + + const float ics = 1.0f/solid.cs; + const float ich = 1.0f/solid.ch; + // Rasterize triangles. + for (int i = 0; i < nt; ++i) + { + const float* v0 = &verts[tris[i*3+0]*3]; + const float* v1 = &verts[tris[i*3+1]*3]; + const float* v2 = &verts[tris[i*3+2]*3]; + // Rasterize. + if (!rasterizeTri(v0, v1, v2, areas[i], solid, solid.bmin, solid.bmax, solid.cs, ics, ich, flagMergeThr)) + { + ctx->log(RC_LOG_ERROR, "rcRasterizeTriangles: Out of memory."); + return false; + } + } + + return true; +} + +/// @par +/// +/// Spans will only be added for triangles that overlap the heightfield grid. +/// +/// @see rcHeightfield +bool rcRasterizeTriangles(rcContext* ctx, const float* verts, const unsigned char* areas, const int nt, + rcHeightfield& solid, const int flagMergeThr) +{ + rcAssert(ctx); + + rcScopedTimer timer(ctx, RC_TIMER_RASTERIZE_TRIANGLES); + + const float ics = 1.0f/solid.cs; + const float ich = 1.0f/solid.ch; + // Rasterize triangles. + for (int i = 0; i < nt; ++i) + { + const float* v0 = &verts[(i*3+0)*3]; + const float* v1 = &verts[(i*3+1)*3]; + const float* v2 = &verts[(i*3+2)*3]; + // Rasterize. + if (!rasterizeTri(v0, v1, v2, areas[i], solid, solid.bmin, solid.bmax, solid.cs, ics, ich, flagMergeThr)) + { + ctx->log(RC_LOG_ERROR, "rcRasterizeTriangles: Out of memory."); + return false; + } + } + + return true; +} diff --git a/libs/recast/recast/src/RecastRegion.cpp b/libs/recast/recast/src/RecastRegion.cpp new file mode 100644 index 000000000..38a2bd6bf --- /dev/null +++ b/libs/recast/recast/src/RecastRegion.cpp @@ -0,0 +1,1824 @@ +// +// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#include +#define _USE_MATH_DEFINES +#include +#include +#include +#include +#include "Recast.h" +#include "RecastAlloc.h" +#include "RecastAssert.h" +#include + + +static void calculateDistanceField(rcCompactHeightfield& chf, unsigned short* src, unsigned short& maxDist) +{ + const int w = chf.width; + const int h = chf.height; + + // Init distance and points. + for (int i = 0; i < chf.spanCount; ++i) + src[i] = 0xffff; + + // Mark boundary cells. + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + const rcCompactCell& c = chf.cells[x+y*w]; + for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i) + { + const rcCompactSpan& s = chf.spans[i]; + const unsigned char area = chf.areas[i]; + + int nc = 0; + for (int dir = 0; dir < 4; ++dir) + { + if (rcGetCon(s, dir) != RC_NOT_CONNECTED) + { + const int ax = x + rcGetDirOffsetX(dir); + const int ay = y + rcGetDirOffsetY(dir); + const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, dir); + if (area == chf.areas[ai]) + nc++; + } + } + if (nc != 4) + src[i] = 0; + } + } + } + + + // Pass 1 + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + const rcCompactCell& c = chf.cells[x+y*w]; + for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i) + { + const rcCompactSpan& s = chf.spans[i]; + + if (rcGetCon(s, 0) != RC_NOT_CONNECTED) + { + // (-1,0) + const int ax = x + rcGetDirOffsetX(0); + const int ay = y + rcGetDirOffsetY(0); + const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 0); + const rcCompactSpan& as = chf.spans[ai]; + if (src[ai]+2 < src[i]) + src[i] = src[ai]+2; + + // (-1,-1) + if (rcGetCon(as, 3) != RC_NOT_CONNECTED) + { + const int aax = ax + rcGetDirOffsetX(3); + const int aay = ay + rcGetDirOffsetY(3); + const int aai = (int)chf.cells[aax+aay*w].index + rcGetCon(as, 3); + if (src[aai]+3 < src[i]) + src[i] = src[aai]+3; + } + } + if (rcGetCon(s, 3) != RC_NOT_CONNECTED) + { + // (0,-1) + const int ax = x + rcGetDirOffsetX(3); + const int ay = y + rcGetDirOffsetY(3); + const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 3); + const rcCompactSpan& as = chf.spans[ai]; + if (src[ai]+2 < src[i]) + src[i] = src[ai]+2; + + // (1,-1) + if (rcGetCon(as, 2) != RC_NOT_CONNECTED) + { + const int aax = ax + rcGetDirOffsetX(2); + const int aay = ay + rcGetDirOffsetY(2); + const int aai = (int)chf.cells[aax+aay*w].index + rcGetCon(as, 2); + if (src[aai]+3 < src[i]) + src[i] = src[aai]+3; + } + } + } + } + } + + // Pass 2 + for (int y = h-1; y >= 0; --y) + { + for (int x = w-1; x >= 0; --x) + { + const rcCompactCell& c = chf.cells[x+y*w]; + for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i) + { + const rcCompactSpan& s = chf.spans[i]; + + if (rcGetCon(s, 2) != RC_NOT_CONNECTED) + { + // (1,0) + const int ax = x + rcGetDirOffsetX(2); + const int ay = y + rcGetDirOffsetY(2); + const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 2); + const rcCompactSpan& as = chf.spans[ai]; + if (src[ai]+2 < src[i]) + src[i] = src[ai]+2; + + // (1,1) + if (rcGetCon(as, 1) != RC_NOT_CONNECTED) + { + const int aax = ax + rcGetDirOffsetX(1); + const int aay = ay + rcGetDirOffsetY(1); + const int aai = (int)chf.cells[aax+aay*w].index + rcGetCon(as, 1); + if (src[aai]+3 < src[i]) + src[i] = src[aai]+3; + } + } + if (rcGetCon(s, 1) != RC_NOT_CONNECTED) + { + // (0,1) + const int ax = x + rcGetDirOffsetX(1); + const int ay = y + rcGetDirOffsetY(1); + const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 1); + const rcCompactSpan& as = chf.spans[ai]; + if (src[ai]+2 < src[i]) + src[i] = src[ai]+2; + + // (-1,1) + if (rcGetCon(as, 0) != RC_NOT_CONNECTED) + { + const int aax = ax + rcGetDirOffsetX(0); + const int aay = ay + rcGetDirOffsetY(0); + const int aai = (int)chf.cells[aax+aay*w].index + rcGetCon(as, 0); + if (src[aai]+3 < src[i]) + src[i] = src[aai]+3; + } + } + } + } + } + + maxDist = 0; + for (int i = 0; i < chf.spanCount; ++i) + maxDist = rcMax(src[i], maxDist); + +} + +static unsigned short* boxBlur(rcCompactHeightfield& chf, int thr, + unsigned short* src, unsigned short* dst) +{ + const int w = chf.width; + const int h = chf.height; + + thr *= 2; + + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + const rcCompactCell& c = chf.cells[x+y*w]; + for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i) + { + const rcCompactSpan& s = chf.spans[i]; + const unsigned short cd = src[i]; + if (cd <= thr) + { + dst[i] = cd; + continue; + } + + int d = (int)cd; + for (int dir = 0; dir < 4; ++dir) + { + if (rcGetCon(s, dir) != RC_NOT_CONNECTED) + { + const int ax = x + rcGetDirOffsetX(dir); + const int ay = y + rcGetDirOffsetY(dir); + const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, dir); + d += (int)src[ai]; + + const rcCompactSpan& as = chf.spans[ai]; + const int dir2 = (dir+1) & 0x3; + if (rcGetCon(as, dir2) != RC_NOT_CONNECTED) + { + const int ax2 = ax + rcGetDirOffsetX(dir2); + const int ay2 = ay + rcGetDirOffsetY(dir2); + const int ai2 = (int)chf.cells[ax2+ay2*w].index + rcGetCon(as, dir2); + d += (int)src[ai2]; + } + else + { + d += cd; + } + } + else + { + d += cd*2; + } + } + dst[i] = (unsigned short)((d+5)/9); + } + } + } + return dst; +} + + +static bool floodRegion(int x, int y, int i, + unsigned short level, unsigned short r, + rcCompactHeightfield& chf, + unsigned short* srcReg, unsigned short* srcDist, + rcIntArray& stack) +{ + const int w = chf.width; + + const unsigned char area = chf.areas[i]; + + // Flood fill mark region. + stack.resize(0); + stack.push((int)x); + stack.push((int)y); + stack.push((int)i); + srcReg[i] = r; + srcDist[i] = 0; + + unsigned short lev = level >= 2 ? level-2 : 0; + int count = 0; + + while (stack.size() > 0) + { + int ci = stack.pop(); + int cy = stack.pop(); + int cx = stack.pop(); + + const rcCompactSpan& cs = chf.spans[ci]; + + // Check if any of the neighbours already have a valid region set. + unsigned short ar = 0; + for (int dir = 0; dir < 4; ++dir) + { + // 8 connected + if (rcGetCon(cs, dir) != RC_NOT_CONNECTED) + { + const int ax = cx + rcGetDirOffsetX(dir); + const int ay = cy + rcGetDirOffsetY(dir); + const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(cs, dir); + if (chf.areas[ai] != area) + continue; + unsigned short nr = srcReg[ai]; + if (nr & RC_BORDER_REG) // Do not take borders into account. + continue; + if (nr != 0 && nr != r) + { + ar = nr; + break; + } + + const rcCompactSpan& as = chf.spans[ai]; + + const int dir2 = (dir+1) & 0x3; + if (rcGetCon(as, dir2) != RC_NOT_CONNECTED) + { + const int ax2 = ax + rcGetDirOffsetX(dir2); + const int ay2 = ay + rcGetDirOffsetY(dir2); + const int ai2 = (int)chf.cells[ax2+ay2*w].index + rcGetCon(as, dir2); + if (chf.areas[ai2] != area) + continue; + unsigned short nr2 = srcReg[ai2]; + if (nr2 != 0 && nr2 != r) + { + ar = nr2; + break; + } + } + } + } + if (ar != 0) + { + srcReg[ci] = 0; + continue; + } + + count++; + + // Expand neighbours. + for (int dir = 0; dir < 4; ++dir) + { + if (rcGetCon(cs, dir) != RC_NOT_CONNECTED) + { + const int ax = cx + rcGetDirOffsetX(dir); + const int ay = cy + rcGetDirOffsetY(dir); + const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(cs, dir); + if (chf.areas[ai] != area) + continue; + if (chf.dist[ai] >= lev && srcReg[ai] == 0) + { + srcReg[ai] = r; + srcDist[ai] = 0; + stack.push(ax); + stack.push(ay); + stack.push(ai); + } + } + } + } + + return count > 0; +} + +static unsigned short* expandRegions(int maxIter, unsigned short level, + rcCompactHeightfield& chf, + unsigned short* srcReg, unsigned short* srcDist, + unsigned short* dstReg, unsigned short* dstDist, + rcIntArray& stack, + bool fillStack) +{ + const int w = chf.width; + const int h = chf.height; + + if (fillStack) + { + // Find cells revealed by the raised level. + stack.resize(0); + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + const rcCompactCell& c = chf.cells[x+y*w]; + for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i) + { + if (chf.dist[i] >= level && srcReg[i] == 0 && chf.areas[i] != RC_NULL_AREA) + { + stack.push(x); + stack.push(y); + stack.push(i); + } + } + } + } + } + else // use cells in the input stack + { + // mark all cells which already have a region + for (int j=0; j 0) + { + int failed = 0; + + memcpy(dstReg, srcReg, sizeof(unsigned short)*chf.spanCount); + memcpy(dstDist, srcDist, sizeof(unsigned short)*chf.spanCount); + + for (int j = 0; j < stack.size(); j += 3) + { + int x = stack[j+0]; + int y = stack[j+1]; + int i = stack[j+2]; + if (i < 0) + { + failed++; + continue; + } + + unsigned short r = srcReg[i]; + unsigned short d2 = 0xffff; + const unsigned char area = chf.areas[i]; + const rcCompactSpan& s = chf.spans[i]; + for (int dir = 0; dir < 4; ++dir) + { + if (rcGetCon(s, dir) == RC_NOT_CONNECTED) continue; + const int ax = x + rcGetDirOffsetX(dir); + const int ay = y + rcGetDirOffsetY(dir); + const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, dir); + if (chf.areas[ai] != area) continue; + if (srcReg[ai] > 0 && (srcReg[ai] & RC_BORDER_REG) == 0) + { + if ((int)srcDist[ai]+2 < (int)d2) + { + r = srcReg[ai]; + d2 = srcDist[ai]+2; + } + } + } + if (r) + { + stack[j+2] = -1; // mark as used + dstReg[i] = r; + dstDist[i] = d2; + } + else + { + failed++; + } + } + + // rcSwap source and dest. + rcSwap(srcReg, dstReg); + rcSwap(srcDist, dstDist); + + if (failed*3 == stack.size()) + break; + + if (level > 0) + { + ++iter; + if (iter >= maxIter) + break; + } + } + + return srcReg; +} + + + +static void sortCellsByLevel(unsigned short startLevel, + rcCompactHeightfield& chf, + unsigned short* srcReg, + unsigned int nbStacks, rcIntArray* stacks, + unsigned short loglevelsPerStack) // the levels per stack (2 in our case) as a bit shift +{ + const int w = chf.width; + const int h = chf.height; + startLevel = startLevel >> loglevelsPerStack; + + for (unsigned int j=0; j> loglevelsPerStack; + int sId = startLevel - level; + if (sId >= (int)nbStacks) + continue; + if (sId < 0) + sId = 0; + + stacks[sId].push(x); + stacks[sId].push(y); + stacks[sId].push(i); + } + } + } +} + + +static void appendStacks(rcIntArray& srcStack, rcIntArray& dstStack, + unsigned short* srcReg) +{ + for (int j=0; j 1; ) + { + int ni = (i+1) % reg.connections.size(); + if (reg.connections[i] == reg.connections[ni]) + { + // Remove duplicate + for (int j = i; j < reg.connections.size()-1; ++j) + reg.connections[j] = reg.connections[j+1]; + reg.connections.pop(); + } + else + ++i; + } +} + +static void replaceNeighbour(rcRegion& reg, unsigned short oldId, unsigned short newId) +{ + bool neiChanged = false; + for (int i = 0; i < reg.connections.size(); ++i) + { + if (reg.connections[i] == oldId) + { + reg.connections[i] = newId; + neiChanged = true; + } + } + for (int i = 0; i < reg.floors.size(); ++i) + { + if (reg.floors[i] == oldId) + reg.floors[i] = newId; + } + if (neiChanged) + removeAdjacentNeighbours(reg); +} + +static bool canMergeWithRegion(const rcRegion& rega, const rcRegion& regb) +{ + if (rega.areaType != regb.areaType) + return false; + int n = 0; + for (int i = 0; i < rega.connections.size(); ++i) + { + if (rega.connections[i] == regb.id) + n++; + } + if (n > 1) + return false; + for (int i = 0; i < rega.floors.size(); ++i) + { + if (rega.floors[i] == regb.id) + return false; + } + return true; +} + +static void addUniqueFloorRegion(rcRegion& reg, int n) +{ + for (int i = 0; i < reg.floors.size(); ++i) + if (reg.floors[i] == n) + return; + reg.floors.push(n); +} + +static bool mergeRegions(rcRegion& rega, rcRegion& regb) +{ + unsigned short aid = rega.id; + unsigned short bid = regb.id; + + // Duplicate current neighbourhood. + rcIntArray acon; + acon.resize(rega.connections.size()); + for (int i = 0; i < rega.connections.size(); ++i) + acon[i] = rega.connections[i]; + rcIntArray& bcon = regb.connections; + + // Find insertion point on A. + int insa = -1; + for (int i = 0; i < acon.size(); ++i) + { + if (acon[i] == bid) + { + insa = i; + break; + } + } + if (insa == -1) + return false; + + // Find insertion point on B. + int insb = -1; + for (int i = 0; i < bcon.size(); ++i) + { + if (bcon[i] == aid) + { + insb = i; + break; + } + } + if (insb == -1) + return false; + + // Merge neighbours. + rega.connections.resize(0); + for (int i = 0, ni = acon.size(); i < ni-1; ++i) + rega.connections.push(acon[(insa+1+i) % ni]); + + for (int i = 0, ni = bcon.size(); i < ni-1; ++i) + rega.connections.push(bcon[(insb+1+i) % ni]); + + removeAdjacentNeighbours(rega); + + for (int j = 0; j < regb.floors.size(); ++j) + addUniqueFloorRegion(rega, regb.floors[j]); + rega.spanCount += regb.spanCount; + regb.spanCount = 0; + regb.connections.resize(0); + + return true; +} + +static bool isRegionConnectedToBorder(const rcRegion& reg) +{ + // Region is connected to border if + // one of the neighbours is null id. + for (int i = 0; i < reg.connections.size(); ++i) + { + if (reg.connections[i] == 0) + return true; + } + return false; +} + +static bool isSolidEdge(rcCompactHeightfield& chf, unsigned short* srcReg, + int x, int y, int i, int dir) +{ + const rcCompactSpan& s = chf.spans[i]; + unsigned short r = 0; + if (rcGetCon(s, dir) != RC_NOT_CONNECTED) + { + const int ax = x + rcGetDirOffsetX(dir); + const int ay = y + rcGetDirOffsetY(dir); + const int ai = (int)chf.cells[ax+ay*chf.width].index + rcGetCon(s, dir); + r = srcReg[ai]; + } + if (r == srcReg[i]) + return false; + return true; +} + +static void walkContour(int x, int y, int i, int dir, + rcCompactHeightfield& chf, + unsigned short* srcReg, + rcIntArray& cont) +{ + int startDir = dir; + int starti = i; + + const rcCompactSpan& ss = chf.spans[i]; + unsigned short curReg = 0; + if (rcGetCon(ss, dir) != RC_NOT_CONNECTED) + { + const int ax = x + rcGetDirOffsetX(dir); + const int ay = y + rcGetDirOffsetY(dir); + const int ai = (int)chf.cells[ax+ay*chf.width].index + rcGetCon(ss, dir); + curReg = srcReg[ai]; + } + cont.push(curReg); + + int iter = 0; + while (++iter < 40000) + { + const rcCompactSpan& s = chf.spans[i]; + + if (isSolidEdge(chf, srcReg, x, y, i, dir)) + { + // Choose the edge corner + unsigned short r = 0; + if (rcGetCon(s, dir) != RC_NOT_CONNECTED) + { + const int ax = x + rcGetDirOffsetX(dir); + const int ay = y + rcGetDirOffsetY(dir); + const int ai = (int)chf.cells[ax+ay*chf.width].index + rcGetCon(s, dir); + r = srcReg[ai]; + } + if (r != curReg) + { + curReg = r; + cont.push(curReg); + } + + dir = (dir+1) & 0x3; // Rotate CW + } + else + { + int ni = -1; + const int nx = x + rcGetDirOffsetX(dir); + const int ny = y + rcGetDirOffsetY(dir); + if (rcGetCon(s, dir) != RC_NOT_CONNECTED) + { + const rcCompactCell& nc = chf.cells[nx+ny*chf.width]; + ni = (int)nc.index + rcGetCon(s, dir); + } + if (ni == -1) + { + // Should not happen. + return; + } + x = nx; + y = ny; + i = ni; + dir = (dir+3) & 0x3; // Rotate CCW + } + + if (starti == i && startDir == dir) + { + break; + } + } + + // Remove adjacent duplicates. + if (cont.size() > 1) + { + for (int j = 0; j < cont.size(); ) + { + int nj = (j+1) % cont.size(); + if (cont[j] == cont[nj]) + { + for (int k = j; k < cont.size()-1; ++k) + cont[k] = cont[k+1]; + cont.pop(); + } + else + ++j; + } + } +} + + +static bool mergeAndFilterRegions(rcContext* ctx, int minRegionArea, int mergeRegionSize, + unsigned short& maxRegionId, + rcCompactHeightfield& chf, + unsigned short* srcReg, rcIntArray& overlaps) +{ + const int w = chf.width; + const int h = chf.height; + + const int nreg = maxRegionId+1; + rcRegion* regions = (rcRegion*)rcAlloc(sizeof(rcRegion)*nreg, RC_ALLOC_TEMP); + if (!regions) + { + ctx->log(RC_LOG_ERROR, "mergeAndFilterRegions: Out of memory 'regions' (%d).", nreg); + return false; + } + + // Construct regions + for (int i = 0; i < nreg; ++i) + new(®ions[i]) rcRegion((unsigned short)i); + + // Find edge of a region and find connections around the contour. + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + const rcCompactCell& c = chf.cells[x+y*w]; + for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i) + { + unsigned short r = srcReg[i]; + if (r == 0 || r >= nreg) + continue; + + rcRegion& reg = regions[r]; + reg.spanCount++; + + // Update floors. + for (int j = (int)c.index; j < ni; ++j) + { + if (i == j) continue; + unsigned short floorId = srcReg[j]; + if (floorId == 0 || floorId >= nreg) + continue; + if (floorId == r) + reg.overlap = true; + addUniqueFloorRegion(reg, floorId); + } + + // Have found contour + if (reg.connections.size() > 0) + continue; + + reg.areaType = chf.areas[i]; + + // Check if this cell is next to a border. + int ndir = -1; + for (int dir = 0; dir < 4; ++dir) + { + if (isSolidEdge(chf, srcReg, x, y, i, dir)) + { + ndir = dir; + break; + } + } + + if (ndir != -1) + { + // The cell is at border. + // Walk around the contour to find all the neighbours. + walkContour(x, y, i, ndir, chf, srcReg, reg.connections); + } + } + } + } + + // Remove too small regions. + rcIntArray stack(32); + rcIntArray trace(32); + for (int i = 0; i < nreg; ++i) + { + rcRegion& reg = regions[i]; + if (reg.id == 0 || (reg.id & RC_BORDER_REG)) + continue; + if (reg.spanCount == 0) + continue; + if (reg.visited) + continue; + + // Count the total size of all the connected regions. + // Also keep track of the regions connects to a tile border. + bool connectsToBorder = false; + int spanCount = 0; + stack.resize(0); + trace.resize(0); + + reg.visited = true; + stack.push(i); + + while (stack.size()) + { + // Pop + int ri = stack.pop(); + + rcRegion& creg = regions[ri]; + + spanCount += creg.spanCount; + trace.push(ri); + + for (int j = 0; j < creg.connections.size(); ++j) + { + if (creg.connections[j] & RC_BORDER_REG) + { + connectsToBorder = true; + continue; + } + rcRegion& neireg = regions[creg.connections[j]]; + if (neireg.visited) + continue; + if (neireg.id == 0 || (neireg.id & RC_BORDER_REG)) + continue; + // Visit + stack.push(neireg.id); + neireg.visited = true; + } + } + + // If the accumulated regions size is too small, remove it. + // Do not remove areas which connect to tile borders + // as their size cannot be estimated correctly and removing them + // can potentially remove necessary areas. + if (spanCount < minRegionArea && !connectsToBorder) + { + // Kill all visited regions. + for (int j = 0; j < trace.size(); ++j) + { + regions[trace[j]].spanCount = 0; + regions[trace[j]].id = 0; + } + } + } + + // Merge too small regions to neighbour regions. + int mergeCount = 0 ; + do + { + mergeCount = 0; + for (int i = 0; i < nreg; ++i) + { + rcRegion& reg = regions[i]; + if (reg.id == 0 || (reg.id & RC_BORDER_REG)) + continue; + if (reg.overlap) + continue; + if (reg.spanCount == 0) + continue; + + // Check to see if the region should be merged. + if (reg.spanCount > mergeRegionSize && isRegionConnectedToBorder(reg)) + continue; + + // Small region with more than 1 connection. + // Or region which is not connected to a border at all. + // Find smallest neighbour region that connects to this one. + int smallest = 0xfffffff; + unsigned short mergeId = reg.id; + for (int j = 0; j < reg.connections.size(); ++j) + { + if (reg.connections[j] & RC_BORDER_REG) continue; + rcRegion& mreg = regions[reg.connections[j]]; + if (mreg.id == 0 || (mreg.id & RC_BORDER_REG) || mreg.overlap) continue; + if (mreg.spanCount < smallest && + canMergeWithRegion(reg, mreg) && + canMergeWithRegion(mreg, reg)) + { + smallest = mreg.spanCount; + mergeId = mreg.id; + } + } + // Found new id. + if (mergeId != reg.id) + { + unsigned short oldId = reg.id; + rcRegion& target = regions[mergeId]; + + // Merge neighbours. + if (mergeRegions(target, reg)) + { + // Fixup regions pointing to current region. + for (int j = 0; j < nreg; ++j) + { + if (regions[j].id == 0 || (regions[j].id & RC_BORDER_REG)) continue; + // If another region was already merged into current region + // change the nid of the previous region too. + if (regions[j].id == oldId) + regions[j].id = mergeId; + // Replace the current region with the new one if the + // current regions is neighbour. + replaceNeighbour(regions[j], oldId, mergeId); + } + mergeCount++; + } + } + } + } + while (mergeCount > 0); + + // Compress region Ids. + for (int i = 0; i < nreg; ++i) + { + regions[i].remap = false; + if (regions[i].id == 0) continue; // Skip nil regions. + if (regions[i].id & RC_BORDER_REG) continue; // Skip external regions. + regions[i].remap = true; + } + + unsigned short regIdGen = 0; + for (int i = 0; i < nreg; ++i) + { + if (!regions[i].remap) + continue; + unsigned short oldId = regions[i].id; + unsigned short newId = ++regIdGen; + for (int j = i; j < nreg; ++j) + { + if (regions[j].id == oldId) + { + regions[j].id = newId; + regions[j].remap = false; + } + } + } + maxRegionId = regIdGen; + + // Remap regions. + for (int i = 0; i < chf.spanCount; ++i) + { + if ((srcReg[i] & RC_BORDER_REG) == 0) + srcReg[i] = regions[srcReg[i]].id; + } + + // Return regions that we found to be overlapping. + for (int i = 0; i < nreg; ++i) + if (regions[i].overlap) + overlaps.push(regions[i].id); + + for (int i = 0; i < nreg; ++i) + regions[i].~rcRegion(); + rcFree(regions); + + + return true; +} + + +static void addUniqueConnection(rcRegion& reg, int n) +{ + for (int i = 0; i < reg.connections.size(); ++i) + if (reg.connections[i] == n) + return; + reg.connections.push(n); +} + +static bool mergeAndFilterLayerRegions(rcContext* ctx, int minRegionArea, + unsigned short& maxRegionId, + rcCompactHeightfield& chf, + unsigned short* srcReg, rcIntArray& /*overlaps*/) +{ + const int w = chf.width; + const int h = chf.height; + + const int nreg = maxRegionId+1; + rcRegion* regions = (rcRegion*)rcAlloc(sizeof(rcRegion)*nreg, RC_ALLOC_TEMP); + if (!regions) + { + ctx->log(RC_LOG_ERROR, "mergeAndFilterLayerRegions: Out of memory 'regions' (%d).", nreg); + return false; + } + + // Construct regions + for (int i = 0; i < nreg; ++i) + new(®ions[i]) rcRegion((unsigned short)i); + + // Find region neighbours and overlapping regions. + rcIntArray lregs(32); + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + const rcCompactCell& c = chf.cells[x+y*w]; + + lregs.resize(0); + + for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i) + { + const rcCompactSpan& s = chf.spans[i]; + const unsigned short ri = srcReg[i]; + if (ri == 0 || ri >= nreg) continue; + rcRegion& reg = regions[ri]; + + reg.spanCount++; + + reg.ymin = rcMin(reg.ymin, s.y); + reg.ymax = rcMax(reg.ymax, s.y); + + // Collect all region layers. + lregs.push(ri); + + // Update neighbours + for (int dir = 0; dir < 4; ++dir) + { + if (rcGetCon(s, dir) != RC_NOT_CONNECTED) + { + const int ax = x + rcGetDirOffsetX(dir); + const int ay = y + rcGetDirOffsetY(dir); + const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, dir); + const unsigned short rai = srcReg[ai]; + if (rai > 0 && rai < nreg && rai != ri) + addUniqueConnection(reg, rai); + if (rai & RC_BORDER_REG) + reg.connectsToBorder = true; + } + } + + } + + // Update overlapping regions. + for (int i = 0; i < lregs.size()-1; ++i) + { + for (int j = i+1; j < lregs.size(); ++j) + { + if (lregs[i] != lregs[j]) + { + rcRegion& ri = regions[lregs[i]]; + rcRegion& rj = regions[lregs[j]]; + addUniqueFloorRegion(ri, lregs[j]); + addUniqueFloorRegion(rj, lregs[i]); + } + } + } + + } + } + + // Create 2D layers from regions. + unsigned short layerId = 1; + + for (int i = 0; i < nreg; ++i) + regions[i].id = 0; + + // Merge montone regions to create non-overlapping areas. + rcIntArray stack(32); + for (int i = 1; i < nreg; ++i) + { + rcRegion& root = regions[i]; + // Skip already visited. + if (root.id != 0) + continue; + + // Start search. + root.id = layerId; + + stack.resize(0); + stack.push(i); + + while (stack.size() > 0) + { + // Pop front + rcRegion& reg = regions[stack[0]]; + for (int j = 0; j < stack.size()-1; ++j) + stack[j] = stack[j+1]; + stack.resize(stack.size()-1); + + const int ncons = (int)reg.connections.size(); + for (int j = 0; j < ncons; ++j) + { + const int nei = reg.connections[j]; + rcRegion& regn = regions[nei]; + // Skip already visited. + if (regn.id != 0) + continue; + // Skip if the neighbour is overlapping root region. + bool overlap = false; + for (int k = 0; k < root.floors.size(); k++) + { + if (root.floors[k] == nei) + { + overlap = true; + break; + } + } + if (overlap) + continue; + + // Deepen + stack.push(nei); + + // Mark layer id + regn.id = layerId; + // Merge current layers to root. + for (int k = 0; k < regn.floors.size(); ++k) + addUniqueFloorRegion(root, regn.floors[k]); + root.ymin = rcMin(root.ymin, regn.ymin); + root.ymax = rcMax(root.ymax, regn.ymax); + root.spanCount += regn.spanCount; + regn.spanCount = 0; + root.connectsToBorder = root.connectsToBorder || regn.connectsToBorder; + } + } + + layerId++; + } + + // Remove small regions + for (int i = 0; i < nreg; ++i) + { + if (regions[i].spanCount > 0 && regions[i].spanCount < minRegionArea && !regions[i].connectsToBorder) + { + unsigned short reg = regions[i].id; + for (int j = 0; j < nreg; ++j) + if (regions[j].id == reg) + regions[j].id = 0; + } + } + + // Compress region Ids. + for (int i = 0; i < nreg; ++i) + { + regions[i].remap = false; + if (regions[i].id == 0) continue; // Skip nil regions. + if (regions[i].id & RC_BORDER_REG) continue; // Skip external regions. + regions[i].remap = true; + } + + unsigned short regIdGen = 0; + for (int i = 0; i < nreg; ++i) + { + if (!regions[i].remap) + continue; + unsigned short oldId = regions[i].id; + unsigned short newId = ++regIdGen; + for (int j = i; j < nreg; ++j) + { + if (regions[j].id == oldId) + { + regions[j].id = newId; + regions[j].remap = false; + } + } + } + maxRegionId = regIdGen; + + // Remap regions. + for (int i = 0; i < chf.spanCount; ++i) + { + if ((srcReg[i] & RC_BORDER_REG) == 0) + srcReg[i] = regions[srcReg[i]].id; + } + + for (int i = 0; i < nreg; ++i) + regions[i].~rcRegion(); + rcFree(regions); + + return true; +} + + + +/// @par +/// +/// This is usually the second to the last step in creating a fully built +/// compact heightfield. This step is required before regions are built +/// using #rcBuildRegions or #rcBuildRegionsMonotone. +/// +/// After this step, the distance data is available via the rcCompactHeightfield::maxDistance +/// and rcCompactHeightfield::dist fields. +/// +/// @see rcCompactHeightfield, rcBuildRegions, rcBuildRegionsMonotone +bool rcBuildDistanceField(rcContext* ctx, rcCompactHeightfield& chf) +{ + rcAssert(ctx); + + rcScopedTimer timer(ctx, RC_TIMER_BUILD_DISTANCEFIELD); + + if (chf.dist) + { + rcFree(chf.dist); + chf.dist = 0; + } + + unsigned short* src = (unsigned short*)rcAlloc(sizeof(unsigned short)*chf.spanCount, RC_ALLOC_TEMP); + if (!src) + { + ctx->log(RC_LOG_ERROR, "rcBuildDistanceField: Out of memory 'src' (%d).", chf.spanCount); + return false; + } + unsigned short* dst = (unsigned short*)rcAlloc(sizeof(unsigned short)*chf.spanCount, RC_ALLOC_TEMP); + if (!dst) + { + ctx->log(RC_LOG_ERROR, "rcBuildDistanceField: Out of memory 'dst' (%d).", chf.spanCount); + rcFree(src); + return false; + } + + unsigned short maxDist = 0; + + { + rcScopedTimer timerDist(ctx, RC_TIMER_BUILD_DISTANCEFIELD_DIST); + + calculateDistanceField(chf, src, maxDist); + chf.maxDistance = maxDist; + } + + { + rcScopedTimer timerBlur(ctx, RC_TIMER_BUILD_DISTANCEFIELD_BLUR); + + // Blur + if (boxBlur(chf, 1, src, dst) != src) + rcSwap(src, dst); + + // Store distance. + chf.dist = src; + } + + rcFree(dst); + + return true; +} + +static void paintRectRegion(int minx, int maxx, int miny, int maxy, unsigned short regId, + rcCompactHeightfield& chf, unsigned short* srcReg) +{ + const int w = chf.width; + for (int y = miny; y < maxy; ++y) + { + for (int x = minx; x < maxx; ++x) + { + const rcCompactCell& c = chf.cells[x+y*w]; + for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i) + { + if (chf.areas[i] != RC_NULL_AREA) + srcReg[i] = regId; + } + } + } +} + + +static const unsigned short RC_NULL_NEI = 0xffff; + +struct rcSweepSpan +{ + unsigned short rid; // row id + unsigned short id; // region id + unsigned short ns; // number samples + unsigned short nei; // neighbour id +}; + +/// @par +/// +/// Non-null regions will consist of connected, non-overlapping walkable spans that form a single contour. +/// Contours will form simple polygons. +/// +/// If multiple regions form an area that is smaller than @p minRegionArea, then all spans will be +/// re-assigned to the zero (null) region. +/// +/// Partitioning can result in smaller than necessary regions. @p mergeRegionArea helps +/// reduce unecessarily small regions. +/// +/// See the #rcConfig documentation for more information on the configuration parameters. +/// +/// The region data will be available via the rcCompactHeightfield::maxRegions +/// and rcCompactSpan::reg fields. +/// +/// @warning The distance field must be created using #rcBuildDistanceField before attempting to build regions. +/// +/// @see rcCompactHeightfield, rcCompactSpan, rcBuildDistanceField, rcBuildRegionsMonotone, rcConfig +bool rcBuildRegionsMonotone(rcContext* ctx, rcCompactHeightfield& chf, + const int borderSize, const int minRegionArea, const int mergeRegionArea) +{ + rcAssert(ctx); + + rcScopedTimer timer(ctx, RC_TIMER_BUILD_REGIONS); + + const int w = chf.width; + const int h = chf.height; + unsigned short id = 1; + + rcScopedDelete srcReg((unsigned short*)rcAlloc(sizeof(unsigned short)*chf.spanCount, RC_ALLOC_TEMP)); + if (!srcReg) + { + ctx->log(RC_LOG_ERROR, "rcBuildRegionsMonotone: Out of memory 'src' (%d).", chf.spanCount); + return false; + } + memset(srcReg,0,sizeof(unsigned short)*chf.spanCount); + + const int nsweeps = rcMax(chf.width,chf.height); + rcScopedDelete sweeps((rcSweepSpan*)rcAlloc(sizeof(rcSweepSpan)*nsweeps, RC_ALLOC_TEMP)); + if (!sweeps) + { + ctx->log(RC_LOG_ERROR, "rcBuildRegionsMonotone: Out of memory 'sweeps' (%d).", nsweeps); + return false; + } + + + // Mark border regions. + if (borderSize > 0) + { + // Make sure border will not overflow. + const int bw = rcMin(w, borderSize); + const int bh = rcMin(h, borderSize); + // Paint regions + paintRectRegion(0, bw, 0, h, id|RC_BORDER_REG, chf, srcReg); id++; + paintRectRegion(w-bw, w, 0, h, id|RC_BORDER_REG, chf, srcReg); id++; + paintRectRegion(0, w, 0, bh, id|RC_BORDER_REG, chf, srcReg); id++; + paintRectRegion(0, w, h-bh, h, id|RC_BORDER_REG, chf, srcReg); id++; + + chf.borderSize = borderSize; + } + + rcIntArray prev(256); + + // Sweep one line at a time. + for (int y = borderSize; y < h-borderSize; ++y) + { + // Collect spans from this row. + prev.resize(id+1); + memset(&prev[0],0,sizeof(int)*id); + unsigned short rid = 1; + + for (int x = borderSize; x < w-borderSize; ++x) + { + const rcCompactCell& c = chf.cells[x+y*w]; + + for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i) + { + const rcCompactSpan& s = chf.spans[i]; + if (chf.areas[i] == RC_NULL_AREA) continue; + + // -x + unsigned short previd = 0; + if (rcGetCon(s, 0) != RC_NOT_CONNECTED) + { + const int ax = x + rcGetDirOffsetX(0); + const int ay = y + rcGetDirOffsetY(0); + const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 0); + if ((srcReg[ai] & RC_BORDER_REG) == 0 && chf.areas[i] == chf.areas[ai]) + previd = srcReg[ai]; + } + + if (!previd) + { + previd = rid++; + sweeps[previd].rid = previd; + sweeps[previd].ns = 0; + sweeps[previd].nei = 0; + } + + // -y + if (rcGetCon(s,3) != RC_NOT_CONNECTED) + { + const int ax = x + rcGetDirOffsetX(3); + const int ay = y + rcGetDirOffsetY(3); + const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 3); + if (srcReg[ai] && (srcReg[ai] & RC_BORDER_REG) == 0 && chf.areas[i] == chf.areas[ai]) + { + unsigned short nr = srcReg[ai]; + if (!sweeps[previd].nei || sweeps[previd].nei == nr) + { + sweeps[previd].nei = nr; + sweeps[previd].ns++; + prev[nr]++; + } + else + { + sweeps[previd].nei = RC_NULL_NEI; + } + } + } + + srcReg[i] = previd; + } + } + + // Create unique ID. + for (int i = 1; i < rid; ++i) + { + if (sweeps[i].nei != RC_NULL_NEI && sweeps[i].nei != 0 && + prev[sweeps[i].nei] == (int)sweeps[i].ns) + { + sweeps[i].id = sweeps[i].nei; + } + else + { + sweeps[i].id = id++; + } + } + + // Remap IDs + for (int x = borderSize; x < w-borderSize; ++x) + { + const rcCompactCell& c = chf.cells[x+y*w]; + + for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i) + { + if (srcReg[i] > 0 && srcReg[i] < rid) + srcReg[i] = sweeps[srcReg[i]].id; + } + } + } + + + { + rcScopedTimer timerFilter(ctx, RC_TIMER_BUILD_REGIONS_FILTER); + + // Merge regions and filter out small regions. + rcIntArray overlaps; + chf.maxRegions = id; + if (!mergeAndFilterRegions(ctx, minRegionArea, mergeRegionArea, chf.maxRegions, chf, srcReg, overlaps)) + return false; + + // Monotone partitioning does not generate overlapping regions. + } + + // Store the result out. + for (int i = 0; i < chf.spanCount; ++i) + chf.spans[i].reg = srcReg[i]; + + return true; +} + +/// @par +/// +/// Non-null regions will consist of connected, non-overlapping walkable spans that form a single contour. +/// Contours will form simple polygons. +/// +/// If multiple regions form an area that is smaller than @p minRegionArea, then all spans will be +/// re-assigned to the zero (null) region. +/// +/// Watershed partitioning can result in smaller than necessary regions, especially in diagonal corridors. +/// @p mergeRegionArea helps reduce unecessarily small regions. +/// +/// See the #rcConfig documentation for more information on the configuration parameters. +/// +/// The region data will be available via the rcCompactHeightfield::maxRegions +/// and rcCompactSpan::reg fields. +/// +/// @warning The distance field must be created using #rcBuildDistanceField before attempting to build regions. +/// +/// @see rcCompactHeightfield, rcCompactSpan, rcBuildDistanceField, rcBuildRegionsMonotone, rcConfig +bool rcBuildRegions(rcContext* ctx, rcCompactHeightfield& chf, + const int borderSize, const int minRegionArea, const int mergeRegionArea) +{ + rcAssert(ctx); + + rcScopedTimer timer(ctx, RC_TIMER_BUILD_REGIONS); + + const int w = chf.width; + const int h = chf.height; + + rcScopedDelete buf((unsigned short*)rcAlloc(sizeof(unsigned short)*chf.spanCount*4, RC_ALLOC_TEMP)); + if (!buf) + { + ctx->log(RC_LOG_ERROR, "rcBuildRegions: Out of memory 'tmp' (%d).", chf.spanCount*4); + return false; + } + + ctx->startTimer(RC_TIMER_BUILD_REGIONS_WATERSHED); + + const int LOG_NB_STACKS = 3; + const int NB_STACKS = 1 << LOG_NB_STACKS; + rcIntArray lvlStacks[NB_STACKS]; + for (int i=0; i 0) + { + // Make sure border will not overflow. + const int bw = rcMin(w, borderSize); + const int bh = rcMin(h, borderSize); + + // Paint regions + paintRectRegion(0, bw, 0, h, regionId|RC_BORDER_REG, chf, srcReg); regionId++; + paintRectRegion(w-bw, w, 0, h, regionId|RC_BORDER_REG, chf, srcReg); regionId++; + paintRectRegion(0, w, 0, bh, regionId|RC_BORDER_REG, chf, srcReg); regionId++; + paintRectRegion(0, w, h-bh, h, regionId|RC_BORDER_REG, chf, srcReg); regionId++; + + chf.borderSize = borderSize; + } + + int sId = -1; + while (level > 0) + { + level = level >= 2 ? level-2 : 0; + sId = (sId+1) & (NB_STACKS-1); + +// ctx->startTimer(RC_TIMER_DIVIDE_TO_LEVELS); + + if (sId == 0) + sortCellsByLevel(level, chf, srcReg, NB_STACKS, lvlStacks, 1); + else + appendStacks(lvlStacks[sId-1], lvlStacks[sId], srcReg); // copy left overs from last level + +// ctx->stopTimer(RC_TIMER_DIVIDE_TO_LEVELS); + + { + rcScopedTimer timerExpand(ctx, RC_TIMER_BUILD_REGIONS_EXPAND); + + // Expand current regions until no empty connected cells found. + if (expandRegions(expandIters, level, chf, srcReg, srcDist, dstReg, dstDist, lvlStacks[sId], false) != srcReg) + { + rcSwap(srcReg, dstReg); + rcSwap(srcDist, dstDist); + } + } + + { + rcScopedTimer timerFloor(ctx, RC_TIMER_BUILD_REGIONS_FLOOD); + + // Mark new regions with IDs. + for (int j = 0; j= 0 && srcReg[i] == 0) + { + if (floodRegion(x, y, i, level, regionId, chf, srcReg, srcDist, stack)) + { + if (regionId == 0xFFFF) + { + ctx->log(RC_LOG_ERROR, "rcBuildRegions: Region ID overflow"); + return false; + } + + regionId++; + } + } + } + } + } + + // Expand current regions until no empty connected cells found. + if (expandRegions(expandIters*8, 0, chf, srcReg, srcDist, dstReg, dstDist, stack, true) != srcReg) + { + rcSwap(srcReg, dstReg); + rcSwap(srcDist, dstDist); + } + + ctx->stopTimer(RC_TIMER_BUILD_REGIONS_WATERSHED); + + { + rcScopedTimer timerFilter(ctx, RC_TIMER_BUILD_REGIONS_FILTER); + + // Merge regions and filter out smalle regions. + rcIntArray overlaps; + chf.maxRegions = regionId; + if (!mergeAndFilterRegions(ctx, minRegionArea, mergeRegionArea, chf.maxRegions, chf, srcReg, overlaps)) + return false; + + // If overlapping regions were found during merging, split those regions. + if (overlaps.size() > 0) + { + ctx->log(RC_LOG_ERROR, "rcBuildRegions: %d overlapping regions.", overlaps.size()); + } + } + + // Write the result out. + for (int i = 0; i < chf.spanCount; ++i) + chf.spans[i].reg = srcReg[i]; + + return true; +} + + +bool rcBuildLayerRegions(rcContext* ctx, rcCompactHeightfield& chf, + const int borderSize, const int minRegionArea) +{ + rcAssert(ctx); + + rcScopedTimer timer(ctx, RC_TIMER_BUILD_REGIONS); + + const int w = chf.width; + const int h = chf.height; + unsigned short id = 1; + + rcScopedDelete srcReg((unsigned short*)rcAlloc(sizeof(unsigned short)*chf.spanCount, RC_ALLOC_TEMP)); + if (!srcReg) + { + ctx->log(RC_LOG_ERROR, "rcBuildLayerRegions: Out of memory 'src' (%d).", chf.spanCount); + return false; + } + memset(srcReg,0,sizeof(unsigned short)*chf.spanCount); + + const int nsweeps = rcMax(chf.width,chf.height); + rcScopedDelete sweeps((rcSweepSpan*)rcAlloc(sizeof(rcSweepSpan)*nsweeps, RC_ALLOC_TEMP)); + if (!sweeps) + { + ctx->log(RC_LOG_ERROR, "rcBuildLayerRegions: Out of memory 'sweeps' (%d).", nsweeps); + return false; + } + + + // Mark border regions. + if (borderSize > 0) + { + // Make sure border will not overflow. + const int bw = rcMin(w, borderSize); + const int bh = rcMin(h, borderSize); + // Paint regions + paintRectRegion(0, bw, 0, h, id|RC_BORDER_REG, chf, srcReg); id++; + paintRectRegion(w-bw, w, 0, h, id|RC_BORDER_REG, chf, srcReg); id++; + paintRectRegion(0, w, 0, bh, id|RC_BORDER_REG, chf, srcReg); id++; + paintRectRegion(0, w, h-bh, h, id|RC_BORDER_REG, chf, srcReg); id++; + + chf.borderSize = borderSize; + } + + rcIntArray prev(256); + + // Sweep one line at a time. + for (int y = borderSize; y < h-borderSize; ++y) + { + // Collect spans from this row. + prev.resize(id+1); + memset(&prev[0],0,sizeof(int)*id); + unsigned short rid = 1; + + for (int x = borderSize; x < w-borderSize; ++x) + { + const rcCompactCell& c = chf.cells[x+y*w]; + + for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i) + { + const rcCompactSpan& s = chf.spans[i]; + if (chf.areas[i] == RC_NULL_AREA) continue; + + // -x + unsigned short previd = 0; + if (rcGetCon(s, 0) != RC_NOT_CONNECTED) + { + const int ax = x + rcGetDirOffsetX(0); + const int ay = y + rcGetDirOffsetY(0); + const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 0); + if ((srcReg[ai] & RC_BORDER_REG) == 0 && chf.areas[i] == chf.areas[ai]) + previd = srcReg[ai]; + } + + if (!previd) + { + previd = rid++; + sweeps[previd].rid = previd; + sweeps[previd].ns = 0; + sweeps[previd].nei = 0; + } + + // -y + if (rcGetCon(s,3) != RC_NOT_CONNECTED) + { + const int ax = x + rcGetDirOffsetX(3); + const int ay = y + rcGetDirOffsetY(3); + const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 3); + if (srcReg[ai] && (srcReg[ai] & RC_BORDER_REG) == 0 && chf.areas[i] == chf.areas[ai]) + { + unsigned short nr = srcReg[ai]; + if (!sweeps[previd].nei || sweeps[previd].nei == nr) + { + sweeps[previd].nei = nr; + sweeps[previd].ns++; + prev[nr]++; + } + else + { + sweeps[previd].nei = RC_NULL_NEI; + } + } + } + + srcReg[i] = previd; + } + } + + // Create unique ID. + for (int i = 1; i < rid; ++i) + { + if (sweeps[i].nei != RC_NULL_NEI && sweeps[i].nei != 0 && + prev[sweeps[i].nei] == (int)sweeps[i].ns) + { + sweeps[i].id = sweeps[i].nei; + } + else + { + sweeps[i].id = id++; + } + } + + // Remap IDs + for (int x = borderSize; x < w-borderSize; ++x) + { + const rcCompactCell& c = chf.cells[x+y*w]; + + for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i) + { + if (srcReg[i] > 0 && srcReg[i] < rid) + srcReg[i] = sweeps[srcReg[i]].id; + } + } + } + + + { + rcScopedTimer timerFilter(ctx, RC_TIMER_BUILD_REGIONS_FILTER); + + // Merge monotone regions to layers and remove small regions. + rcIntArray overlaps; + chf.maxRegions = id; + if (!mergeAndFilterLayerRegions(ctx, minRegionArea, chf.maxRegions, chf, srcReg, overlaps)) + return false; + } + + + // Store the result out. + for (int i = 0; i < chf.spanCount; ++i) + chf.spans[i].reg = srcReg[i]; + + return true; +} From 832c31a41ab4d3b947fc81843ed973c13eb5f8b9 Mon Sep 17 00:00:00 2001 From: KimLS Date: Sat, 29 Jul 2017 15:05:56 -0700 Subject: [PATCH 010/670] work on navmesh loading --- zone/pathfinder_nav_mesh.cpp | 113 +++++++++++++++++++---------------- zone/pathfinder_nav_mesh.h | 1 + 2 files changed, 61 insertions(+), 53 deletions(-) diff --git a/zone/pathfinder_nav_mesh.cpp b/zone/pathfinder_nav_mesh.cpp index d20b595bc..3e5c8f431 100644 --- a/zone/pathfinder_nav_mesh.cpp +++ b/zone/pathfinder_nav_mesh.cpp @@ -20,100 +20,107 @@ PathfinderNavmesh::PathfinderNavmesh(const std::string &path) m_impl.reset(new Implementation()); m_impl->nav_mesh = nullptr; m_impl->query = nullptr; + Load(path); } PathfinderNavmesh::~PathfinderNavmesh() { - if (m_impl->nav_mesh) { - dtFreeNavMesh(m_impl->nav_mesh); - } - - if (m_impl->query) { - dtFreeNavMeshQuery(m_impl->query); - } + Clear(); } IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const glm::vec3 &end) { - if (!m_impl->nav_mesh || !m_impl->query) { + if (!m_impl->nav_mesh) { IPath Route; - Route.push_back(start); Route.push_back(end); return Route; } - glm::vec3 ext(15.0f, 100.0f, 15.0f); + if (!m_impl->query) { + m_impl->query = dtAllocNavMeshQuery(); + m_impl->query->init(m_impl->nav_mesh, 32768); + } + + glm::vec3 current_location(start.x, start.z, start.y); + glm::vec3 dest_location(end.x, end.z, end.y); + dtQueryFilter filter; filter.setIncludeFlags(65535U); filter.setAreaCost(0, 1.0f); //Normal - filter.setAreaCost(0, 1.0f); //Water - filter.setAreaCost(0, 1.0f); //Lava - filter.setAreaCost(0, 1.0f); //PvP - filter.setAreaCost(0, 1.0f); //Slime - filter.setAreaCost(0, 1.0f); //Ice - filter.setAreaCost(0, 1.0f); //V Water (Frigid Water) - filter.setAreaCost(0, 1.0f); //General Area - filter.setAreaCost(0, 1.0f); //Portal + filter.setAreaCost(1, 1.0f); //Water + filter.setAreaCost(2, 1.0f); //Lava + filter.setAreaCost(4, 1.0f); //PvP + filter.setAreaCost(5, 1.0f); //Slime + filter.setAreaCost(6, 1.0f); //Ice + filter.setAreaCost(7, 1.0f); //V Water (Frigid Water) + filter.setAreaCost(8, 1.0f); //General Area + filter.setAreaCost(9, 1.0f); //Portal dtPolyRef start_ref; dtPolyRef end_ref; + glm::vec3 ext(15.0f, 15.0f, 15.0f); - m_impl->query->findNearestPoly(&start[0], &ext[0], &filter, &start_ref, 0); - m_impl->query->findNearestPoly(&end[0], &ext[0], &filter, &end_ref, 0); + m_impl->query->findNearestPoly(¤t_location[0], &ext[0], &filter, &start_ref, 0); + m_impl->query->findNearestPoly(&dest_location[0], &ext[0], &filter, &end_ref, 0); if (!start_ref || !end_ref) { IPath Route; - Route.push_back(start); Route.push_back(end); return Route; } int npoly = 0; - dtPolyRef path[1024] = { 0 }; - m_impl->query->findPath(start_ref, end_ref, &start[0], &end[0], &filter, path, &npoly, 1024); + dtPolyRef path[512] = { 0 }; + auto status = m_impl->query->findPath(start_ref, end_ref, ¤t_location[0], &dest_location[0], &filter, path, &npoly, 512); if (npoly) { - glm::vec3 epos = end; - if (path[npoly - 1] != end_ref) - m_impl->query->closestPointOnPoly(path[npoly - 1], &end[0], &epos[0], 0); + glm::vec3 epos = dest_location; + if (path[npoly - 1] != end_ref) { + m_impl->query->closestPointOnPoly(path[npoly - 1], &dest_location[0], &epos[0], 0); + } + + float straight_path[512 * 3]; + unsigned char straight_path_flags[512]; - float straight_path[2048 * 3]; - unsigned char straight_path_flags[2048]; int n_straight_polys; - dtPolyRef straight_path_polys[2048]; - m_impl->query->findStraightPath(&start[0], &epos[0], path, npoly, + dtPolyRef straight_path_polys[512]; + + status = m_impl->query->findStraightPath(¤t_location[0], &epos[0], path, npoly, straight_path, straight_path_flags, - straight_path_polys, &n_straight_polys, 2048, DT_STRAIGHTPATH_ALL_CROSSINGS); + straight_path_polys, &n_straight_polys, 512, DT_STRAIGHTPATH_ALL_CROSSINGS); + + if (status & DT_OUT_OF_NODES) { + IPath Route; + Route.push_back(end); + return Route; + } if (n_straight_polys) { IPath Route; + for (int i = 0; i < n_straight_polys; ++i) + { + glm::vec3 node; + node.x = straight_path[i * 3]; + node.z = straight_path[i * 3 + 1]; + node.y = straight_path[i * 3 + 2]; - for (int i = 0; i < n_straight_polys - 1; ++i) { - glm::vec3 color(1.0f, 1.0f, 0.0f); unsigned short flag = 0; if (dtStatusSucceed(m_impl->nav_mesh->getPolyFlags(straight_path_polys[i], &flag))) { - if (flag & 512) { //Portal + if (flag & 512) { Route.push_back(true); } } - Route.push_back(glm::vec3(straight_path[i * 3], straight_path[i * 3 + 1] + 0.4f, straight_path[i * 3 + 2])); + Route.push_back(node); } return Route; } + } - IPath Route; - Route.push_back(start); - Route.push_back(end); - return Route; - } - else { - IPath Route; - Route.push_back(start); - Route.push_back(end); - return Route; - } + IPath Route; + Route.push_back(end); + return Route; } glm::vec3 PathfinderNavmesh::GetRandomLocation() @@ -143,17 +150,20 @@ void PathfinderNavmesh::DebugCommand(Client *c, const Seperator *sep) } } -void PathfinderNavmesh::Load(const std::string &path) +void PathfinderNavmesh::Clear() { if (m_impl->nav_mesh) { dtFreeNavMesh(m_impl->nav_mesh); - m_impl->nav_mesh = nullptr; } if (m_impl->query) { dtFreeNavMeshQuery(m_impl->query); - m_impl->query = nullptr; } +} + +void PathfinderNavmesh::Load(const std::string &path) +{ + Clear(); FILE *f = fopen(path.c_str(), "rb"); if (f) { @@ -175,7 +185,7 @@ void PathfinderNavmesh::Load(const std::string &path) return; } - if (version != 2U) { + if (version != 2) { fclose(f); return; } @@ -241,9 +251,6 @@ void PathfinderNavmesh::Load(const std::string &path) m_impl->nav_mesh->addTile(data, data_size, DT_TILE_FREE_DATA, tile_ref, 0); } - - m_impl->query = dtAllocNavMeshQuery(); - m_impl->query->init(m_impl->nav_mesh, 32768); } } diff --git a/zone/pathfinder_nav_mesh.h b/zone/pathfinder_nav_mesh.h index 6229cd791..a15f02d6b 100644 --- a/zone/pathfinder_nav_mesh.h +++ b/zone/pathfinder_nav_mesh.h @@ -14,6 +14,7 @@ public: virtual void DebugCommand(Client *c, const Seperator *sep); private: + void Clear(); void Load(const std::string &path); void ShowPath(Client *c, const glm::vec3 &start, const glm::vec3 &end); From 3afee1f84158d1d6ac9245493098d6083b817a9e Mon Sep 17 00:00:00 2001 From: KimLS Date: Sat, 5 Aug 2017 20:54:43 -0700 Subject: [PATCH 011/670] Work on making the paths work well when being z corrected esp for nav meshes --- zone/mob.cpp | 1 + zone/mob.h | 6 ++---- zone/pathfinder_nav_mesh.cpp | 19 +++++++++++----- zone/pathing.cpp | 42 ++++++++++++++++++++++++++++++++++-- 4 files changed, 57 insertions(+), 11 deletions(-) diff --git a/zone/mob.cpp b/zone/mob.cpp index 6b40615a3..c5f8c090e 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -446,6 +446,7 @@ Mob::Mob(const char* in_name, npc_assist_cap = 0; PathRecalcTimer.reset(new Timer(2000)); + PathingLoopCount = 0; } Mob::~Mob() diff --git a/zone/mob.h b/zone/mob.h index ce09f2b88..f1607f6f7 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -1227,7 +1227,6 @@ protected: void CalculateNewFearpoint(); float FindGroundZ(float new_x, float new_y, float z_offset=0.0); glm::vec3 UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &WaypointChange, bool &NodeReached); - void PrintRoute(); virtual float GetSympatheticProcChances(uint16 spell_id, int16 ProcRateMod, int32 ItemProcRate = 0); int16 GetSympatheticSpellProcRate(uint16 spell_id); @@ -1373,8 +1372,6 @@ protected: int32 GetItemFactionBonus(uint32 pFactionID); void ClearItemFactionBonuses(); - void CalculateFearPosition(); - bool flee_mode; Timer flee_timer; Timer fix_z_timer; @@ -1401,7 +1398,6 @@ protected: int npc_assist_cap; Timer assist_cap_timer; // clear assist cap so more nearby mobs can be called for help - int patrol; glm::vec3 m_FearWalkTarget; bool currently_fleeing; @@ -1412,6 +1408,8 @@ protected: IPathfinder::IPath Route; std::unique_ptr PathRecalcTimer; bool DistractedFromGrid; + glm::vec3 PathingLastPosition; + int PathingLoopCount; uint32 pDontHealMeBefore; uint32 pDontBuffMeBefore; diff --git a/zone/pathfinder_nav_mesh.cpp b/zone/pathfinder_nav_mesh.cpp index 3e5c8f431..9ac5402d8 100644 --- a/zone/pathfinder_nav_mesh.cpp +++ b/zone/pathfinder_nav_mesh.cpp @@ -9,6 +9,8 @@ #include "client.h" #include "../common/compression.h" +extern Zone *zone; + struct PathfinderNavmesh::Implementation { dtNavMesh *nav_mesh; @@ -47,12 +49,12 @@ IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const gl dtQueryFilter filter; filter.setIncludeFlags(65535U); filter.setAreaCost(0, 1.0f); //Normal - filter.setAreaCost(1, 1.0f); //Water - filter.setAreaCost(2, 1.0f); //Lava + filter.setAreaCost(1, 2.0f); //Water + filter.setAreaCost(2, 2.0f); //Lava filter.setAreaCost(4, 1.0f); //PvP - filter.setAreaCost(5, 1.0f); //Slime - filter.setAreaCost(6, 1.0f); //Ice - filter.setAreaCost(7, 1.0f); //V Water (Frigid Water) + filter.setAreaCost(5, 1.5f); //Slime + filter.setAreaCost(6, 1.5f); //Ice + filter.setAreaCost(7, 2.0f); //V Water (Frigid Water) filter.setAreaCost(8, 1.0f); //General Area filter.setAreaCost(9, 1.0f); //Portal @@ -104,6 +106,13 @@ IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const gl node.z = straight_path[i * 3 + 1]; node.y = straight_path[i * 3 + 2]; + if (zone->HasMap()) { + auto best_z = zone->zonemap->FindBestZ(node, nullptr); + if (best_z != BEST_Z_INVALID) { + node.z = best_z; + } + } + unsigned short flag = 0; if (dtStatusSucceed(m_impl->nav_mesh->getPolyFlags(straight_path_polys[i], &flag))) { if (flag & 512) { diff --git a/zone/pathing.cpp b/zone/pathing.cpp index a5d439d94..1fc47b549 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -35,7 +35,7 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa } else { if (PathRecalcTimer->Check()) { - bool SameDestination = DistanceSquared(To, PathingDestination) < 4.0f; + bool SameDestination = DistanceSquared(To, PathingDestination) < 100.0f; if (!SameDestination) { //We had a route but our target position moved too much Route = zone->pathing->FindRoute(From, To); @@ -46,7 +46,45 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa } } - bool AtNextNode = DistanceSquared(From, (*Route.begin()).pos) < 4.0f; + if (!IsRooted()) { + bool AtPrevNode = DistanceSquared(From, PathingLastPosition) < 1.0f; + if (AtPrevNode) { + PathingLoopCount++; + + if (PathingLoopCount > 5) { + SendPosition(); + } + + auto front = (*Route.begin()).pos; + Teleport(front); + Route.pop_front(); + + WaypointChanged = true; + NodeReached = true; + PathingLoopCount = 0; + + return front; + } + else { + PathingLastPosition = From; + PathingLoopCount = 0; + } + } + else { + PathingLastPosition = From; + PathingLoopCount = 0; + } + + bool AtNextNode = false; + if (flymode == 1) { + AtNextNode = DistanceSquared(From, (*Route.begin()).pos) < 4.0f; + } + else { + float z_dist = From.z - (*Route.begin()).pos.z; + z_dist *= z_dist; + AtNextNode = DistanceSquaredNoZ(From, (*Route.begin()).pos) < 4.0f && z_dist < 25.0f; + } + if (AtNextNode) { WaypointChanged = false; NodeReached = true; From 575ba28b6236d26e47357ada91e4dae70e61242c Mon Sep 17 00:00:00 2001 From: KimLS Date: Sun, 6 Aug 2017 20:48:39 -0700 Subject: [PATCH 012/670] Bug fixes with fear points and teleport jumps --- zone/fearpath.cpp | 15 +------------- zone/pathfinder_nav_mesh.cpp | 32 ++++++++++++++++++++++-------- zone/pathfinder_waypoint.cpp | 7 +++++++ zone/pathing.cpp | 38 +++++++++++++++++++++++++++++++++--- 4 files changed, 67 insertions(+), 25 deletions(-) diff --git a/zone/fearpath.cpp b/zone/fearpath.cpp index 573783fbc..b2f69f0e9 100644 --- a/zone/fearpath.cpp +++ b/zone/fearpath.cpp @@ -133,20 +133,7 @@ void Mob::CalculateNewFearpoint() if (Node.x != 0.0f || Node.y != 0.0f || Node.z != 0.0f) { ++Node.z; - - glm::vec3 CurrentPosition(GetX(), GetY(), GetZ()); - - auto Route = zone->pathing->FindRoute(CurrentPosition, Node); - - if (!Route.empty()) - { - auto first = (*Route.begin()); - m_FearWalkTarget = glm::vec3(first.pos.x, first.pos.y, first.pos.z); - currently_fleeing = true; - - Log(Logs::Detail, Logs::None, "Feared to node %i (%8.3f, %8.3f, %8.3f)", Node, first.pos.x, first.pos.y, first.pos.z); - return; - } + m_FearWalkTarget = Node; } diff --git a/zone/pathfinder_nav_mesh.cpp b/zone/pathfinder_nav_mesh.cpp index 9ac5402d8..f44e02ec9 100644 --- a/zone/pathfinder_nav_mesh.cpp +++ b/zone/pathfinder_nav_mesh.cpp @@ -6,6 +6,7 @@ #include "pathfinder_nav_mesh.h" #include "zone.h" +#include "water_map.h" #include "client.h" #include "../common/compression.h" @@ -106,12 +107,7 @@ IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const gl node.z = straight_path[i * 3 + 1]; node.y = straight_path[i * 3 + 2]; - if (zone->HasMap()) { - auto best_z = zone->zonemap->FindBestZ(node, nullptr); - if (best_z != BEST_Z_INVALID) { - node.z = best_z; - } - } + Route.push_back(node); unsigned short flag = 0; if (dtStatusSucceed(m_impl->nav_mesh->getPolyFlags(straight_path_polys[i], &flag))) { @@ -119,8 +115,6 @@ IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const gl Route.push_back(true); } } - - Route.push_back(node); } return Route; @@ -134,6 +128,28 @@ IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const gl glm::vec3 PathfinderNavmesh::GetRandomLocation() { + if (!m_impl->nav_mesh) { + return glm::vec3(); + } + + if (!m_impl->query) { + m_impl->query = dtAllocNavMeshQuery(); + m_impl->query->init(m_impl->nav_mesh, 32768); + } + + dtQueryFilter filter; + filter.setIncludeFlags(65535U); + + dtPolyRef randomRef; + float point[3]; + + if (dtStatusSucceed(m_impl->query->findRandomPoint(&filter, []() { + return (float)zone->random.Real(0.0, 1.0); + }, &randomRef, point))) + { + return glm::vec3(point[0], point[2], point[1]); + } + return glm::vec3(); } diff --git a/zone/pathfinder_waypoint.cpp b/zone/pathfinder_waypoint.cpp index c845a4d88..b3859472a 100644 --- a/zone/pathfinder_waypoint.cpp +++ b/zone/pathfinder_waypoint.cpp @@ -187,6 +187,13 @@ IPathfinder::IPath PathfinderWaypoint::FindRoute(const glm::vec3 &start, const g glm::vec3 PathfinderWaypoint::GetRandomLocation() { + if (m_impl->Nodes.size() > 0) { + auto idx = zone->random.Int(0, (int)m_impl->Nodes.size() - 1); + auto &node = m_impl->Nodes[idx]; + + return node.v; + } + return glm::vec3(); } diff --git a/zone/pathing.cpp b/zone/pathing.cpp index 1fc47b549..826160905 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -2,9 +2,25 @@ #include "client.h" #include "zone.h" +#include "water_map.h" extern Zone *zone; +void AdjustRoute(std::list &nodes, int flymode) { + if (!zone->HasMap() || !zone->HasWaterMap()) { + return; + } + + for (auto &node : nodes) { + if (flymode == 0 || !zone->watermap->InLiquid(node.pos)) { + auto best_z = zone->zonemap->FindBestZ(node.pos, nullptr); + if (best_z != BEST_Z_INVALID) { + node.pos.z = best_z; + } + } + } +} + glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &WaypointChanged, bool &NodeReached) { glm::vec3 To(ToX, ToY, ToZ); @@ -23,6 +39,8 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa if (Route.empty()) { Route = zone->pathing->FindRoute(From, To); + AdjustRoute(Route, flymode); + PathingDestination = To; WaypointChanged = true; NodeReached = false; @@ -39,10 +57,18 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa if (!SameDestination) { //We had a route but our target position moved too much Route = zone->pathing->FindRoute(From, To); + AdjustRoute(Route, flymode); + PathingDestination = To; WaypointChanged = true; NodeReached = false; - return (*Route.begin()).pos; + + if (Route.empty()) { + return From; + } + else { + return (*Route.begin()).pos; + } } } @@ -93,14 +119,20 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa if (Route.empty()) { Route = zone->pathing->FindRoute(From, To); + AdjustRoute(Route, flymode); PathingDestination = To; WaypointChanged = true; - return (*Route.begin()).pos; + + if (Route.empty()) { + return From; + } + else { + return (*Route.begin()).pos; + } } else { auto node = *Route.begin(); if (node.teleport) { - //If is identity node then is teleport node. Route.pop_front(); if (Route.empty()) { From 563878f20ea8653e32c4c33c9449f5ea3d4240e3 Mon Sep 17 00:00:00 2001 From: KimLS Date: Sat, 19 Aug 2017 12:49:06 -0700 Subject: [PATCH 013/670] Compile fixes and some debugging messages in find path code. --- common/event/background_task.h | 11 ++-- zone/client.h | 2 +- zone/client_packet.cpp | 20 +++--- zone/mob_ai.cpp | 2 +- zone/net.cpp | 6 +- zone/pathing.cpp | 107 ++++++++++++++++++++++++--------- zone/waypoints.cpp | 2 +- 7 files changed, 106 insertions(+), 44 deletions(-) diff --git a/common/event/background_task.h b/common/event/background_task.h index 8082abaf3..41fe4accb 100644 --- a/common/event/background_task.h +++ b/common/event/background_task.h @@ -1,32 +1,35 @@ #pragma once #include +#include "../any.h" #include "event_loop.h" namespace EQ { class BackgroundTask { public: - typedef std::function BackgroundTaskFunction; + typedef std::function BackgroundTaskFunction; struct BackgroundTaskBaton { BackgroundTaskFunction fn; BackgroundTaskFunction on_finish; + EQEmu::Any data; }; - BackgroundTask(BackgroundTaskFunction fn, BackgroundTaskFunction on_finish) { + BackgroundTask(BackgroundTaskFunction fn, BackgroundTaskFunction on_finish, EQEmu::Any data) { uv_work_t *m_work = new uv_work_t; memset(m_work, 0, sizeof(uv_work_t)); BackgroundTaskBaton *baton = new BackgroundTaskBaton(); baton->fn = fn; baton->on_finish = on_finish; + baton->data = data; m_work->data = baton; uv_queue_work(EventLoop::Get().Handle(), m_work, [](uv_work_t* req) { BackgroundTaskBaton *baton = (BackgroundTaskBaton*)req->data; - baton->fn(); + baton->fn(baton->data); }, [](uv_work_t* req, int status) { BackgroundTaskBaton *baton = (BackgroundTaskBaton*)req->data; - baton->on_finish(); + baton->on_finish(baton->data); delete baton; delete req; }); diff --git a/zone/client.h b/zone/client.h index dac409beb..a34bb8e72 100644 --- a/zone/client.h +++ b/zone/client.h @@ -776,7 +776,7 @@ public: void ChangeTributeSettings(TributeInfo_Struct *t); void SendTributeTimer(); void ToggleTribute(bool enabled); - void SendPathPacket(std::vector &path); + void SendPathPacket(const std::vector &path); inline PTimerList &GetPTimers() { return(p_timers); } diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 8537cada5..bb167c62f 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -5718,13 +5718,19 @@ void Client::Handle_OP_FindPersonRequest(const EQApplicationPacket *app) { //fill in the path array... // - points.resize(2); - points[0].x = GetX(); - points[0].y = GetY(); - points[0].z = GetZ(); - points[1].x = target->GetX(); - points[1].y = target->GetY(); - points[1].z = target->GetZ(); + points.clear(); + FindPerson_Point a; + FindPerson_Point b; + + a.x = GetX(); + a.y = GetY(); + a.z = GetZ(); + b.x = target->GetX(); + b.y = target->GetY(); + b.z = target->GetZ(); + + points.push_back(a); + points.push_back(b); } else { diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index bb36af028..b59146a12 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1536,7 +1536,7 @@ void NPC::AI_DoMovement() { float new_z = this->FindGroundZ(m_Position.x, m_Position.y, 5); new_z += (this->GetSize() / 1.55); - if (!CalculateNewPosition2(roambox_movingto_x, roambox_movingto_y, new_z, walksp, true)) + if (!CalculateNewPosition(roambox_movingto_x, roambox_movingto_y, new_z, walksp, true)) { roambox_movingto_x = roambox_max_x + 1; // force update pLastFightingDelayMoving = Timer::GetCurrentTime() + RandomTimer(roambox_min_delay, roambox_delay); diff --git a/zone/net.cpp b/zone/net.cpp index eafdde807..582aa8116 100644 --- a/zone/net.cpp +++ b/zone/net.cpp @@ -542,8 +542,10 @@ int main(int argc, char** argv) { process_timer.Stop(); process_timer.Start(1000, true); - uint32 shutdown_timer = database.getZoneShutDownDelay(zone->GetZoneID(), zone->GetInstanceVersion()); - zone->StartShutdownTimer(shutdown_timer); + if (zone) { + uint32 shutdown_timer = database.getZoneShutDownDelay(zone->GetZoneID(), zone->GetInstanceVersion()); + zone->StartShutdownTimer(shutdown_timer); + } } else if (!previous_loaded && current_loaded) { process_timer.Stop(); diff --git a/zone/pathing.cpp b/zone/pathing.cpp index 826160905..62c80a5d5 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -1,4 +1,5 @@ #include "../common/global_define.h" +#include "../common/event/background_task.h" #include "client.h" #include "zone.h" @@ -163,36 +164,86 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa } } -void Client::SendPathPacket(std::vector &points) { - if (points.size() < 2) { - //empty length packet == not found. - EQApplicationPacket outapp(OP_FindPersonReply, 0); - QueuePacket(&outapp); +void CullPoints(std::vector &points) { + if (!zone->HasMap()) { return; } - if (points.size() > 36) { - EQApplicationPacket outapp(OP_FindPersonReply, 0); - QueuePacket(&outapp); - return; + size_t i = 0; + for (; i < points.size(); ++i) { + auto &p = points[i]; + + for (;;) { + if (i + 2 >= points.size()) { + return; + } + + if (points.size() < 36) { + return; + } + + auto &p1 = points[i + 1]; + auto &p2 = points[i + 2]; + + if (zone->zonemap->CheckLoS(glm::vec3(p.x, p.y, p.z), glm::vec3(p2.x, p2.y, p2.z))) { + points.erase(points.begin() + i + 1); + Log(Logs::General, Logs::Status, "Culled find path point %u, connecting %u->%u instead.", i + 1, i, i + 2); + } + else { + break; + } + } } - - int len = sizeof(FindPersonResult_Struct) + (points.size() + 1) * sizeof(FindPerson_Point); - auto outapp = new EQApplicationPacket(OP_FindPersonReply, len); - FindPersonResult_Struct* fpr = (FindPersonResult_Struct*)outapp->pBuffer; - - std::vector::iterator cur, end; - cur = points.begin(); - end = points.end(); - unsigned int r; - for (r = 0; cur != end; ++cur, r++) { - fpr->path[r] = *cur; - - } - //put the last element into the destination field - --cur; - fpr->path[r] = *cur; - fpr->dest = *cur; - - FastQueuePacket(&outapp); +} + +void Client::SendPathPacket(const std::vector &points) { + EQ::BackgroundTask task([](EQEmu::Any &data) { + auto &points = EQEmu::any_cast>(data); + CullPoints(points); + }, [this](EQEmu::Any &data) { + auto &points = EQEmu::any_cast>(data); + + if (points.size() < 2) { + if (Admin() > 10) { + Message(MT_System, "Too few points"); + } + + EQApplicationPacket outapp(OP_FindPersonReply, 0); + QueuePacket(&outapp); + return; + } + + if (points.size() > 36) { + if (Admin() > 10) { + Message(MT_System, "Too many points %u", points.size()); + } + + EQApplicationPacket outapp(OP_FindPersonReply, 0); + QueuePacket(&outapp); + return; + } + + if (Admin() > 10) { + Message(MT_System, "Total points %u", points.size()); + } + + int len = sizeof(FindPersonResult_Struct) + (points.size() + 1) * sizeof(FindPerson_Point); + auto outapp = new EQApplicationPacket(OP_FindPersonReply, len); + FindPersonResult_Struct* fpr = (FindPersonResult_Struct*)outapp->pBuffer; + + std::vector::iterator cur, end; + cur = points.begin(); + end = points.end(); + unsigned int r; + for (r = 0; cur != end; ++cur, r++) { + fpr->path[r] = *cur; + + } + //put the last element into the destination field + --cur; + fpr->path[r] = *cur; + fpr->dest = *cur; + + FastQueuePacket(&outapp); + }, points); } diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index e6d9dee0a..527173287 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -627,7 +627,7 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, int speed) { } bool Mob::CalculateNewPosition(float x, float y, float z, int speed, bool checkZ, bool calcHeading) { - return MakeNewPositionAndSendUpdate(x, y, z, speed, checkZ); + return MakeNewPositionAndSendUpdate(x, y, z, speed); } void NPC::AssignWaypoints(int32 grid) From 17544d4577a8abf9bec4314a4f11d29433b72441 Mon Sep 17 00:00:00 2001 From: KimLS Date: Sun, 20 Aug 2017 15:37:46 -0700 Subject: [PATCH 014/670] Some tweaks to GCC errors, still think there's a couple --- zone/pathfinder_null.cpp | 1 - zone/pathfinder_waypoint.cpp | 4 ++-- zone/pathing.cpp | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/zone/pathfinder_null.cpp b/zone/pathfinder_null.cpp index 98a9ce5d7..cccf61ebc 100644 --- a/zone/pathfinder_null.cpp +++ b/zone/pathfinder_null.cpp @@ -1,5 +1,4 @@ #include "pathfinder_null.h" -#pragma once IPathfinder::IPath PathfinderNull::FindRoute(const glm::vec3 &start, const glm::vec3 &end) { diff --git a/zone/pathfinder_waypoint.cpp b/zone/pathfinder_waypoint.cpp index b3859472a..7514a8252 100644 --- a/zone/pathfinder_waypoint.cpp +++ b/zone/pathfinder_waypoint.cpp @@ -158,7 +158,7 @@ IPathfinder::IPath PathfinderWaypoint::FindRoute(const glm::vec3 &start, const g else { auto &node = m_impl->Nodes[v]; - auto iter = node.edges.find(p[v + 1]); + auto iter = node.edges.find((int)p[v + 1]); if (iter != node.edges.end()) { auto &edge = iter->second; if (edge.teleport) { @@ -333,7 +333,7 @@ void PathfinderWaypoint::LoadV3(FILE *f, const PathFileHeader &header) uint32 edge_count = 0; fread(&edge_count, sizeof(uint32), 1, f); - for (int i = 0; i < header.PathNodeCount; ++i) + for (uint32 i = 0; i < header.PathNodeCount; ++i) { uint32 id = 0; float x = 0.0f; diff --git a/zone/pathing.cpp b/zone/pathing.cpp index 62c80a5d5..3756f449b 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -198,10 +198,10 @@ void CullPoints(std::vector &points) { void Client::SendPathPacket(const std::vector &points) { EQ::BackgroundTask task([](EQEmu::Any &data) { - auto &points = EQEmu::any_cast>(data); + auto &points = EQEmu::any_cast&>(data); CullPoints(points); }, [this](EQEmu::Any &data) { - auto &points = EQEmu::any_cast>(data); + auto &points = EQEmu::any_cast&>(data); if (points.size() < 2) { if (Admin() > 10) { From 0e8f6a32b13995a4497a648f968f47bc50fdf85d Mon Sep 17 00:00:00 2001 From: KimLS Date: Sun, 20 Aug 2017 17:40:37 -0700 Subject: [PATCH 015/670] Explicit RTreeValue decl because gcc didnt like it implicitly here --- zone/pathfinder_waypoint.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zone/pathfinder_waypoint.cpp b/zone/pathfinder_waypoint.cpp index 7514a8252..9727f5636 100644 --- a/zone/pathfinder_waypoint.cpp +++ b/zone/pathfinder_waypoint.cpp @@ -455,8 +455,10 @@ void PathfinderWaypoint::BuildGraph() m_impl->Tree = boost::geometry::index::rtree>(); for (auto &node : m_impl->Nodes) { - Point p = Point(node.v.x, node.v.y, node.v.z); - m_impl->Tree.insert(std::make_pair(p, node.id)); + RTreeValue rtv; + rtv.first = Point(node.v.x, node.v.y, node.v.z); + rtv.second = node.id; + m_impl->Tree.insert(rtv); boost::add_vertex(m_impl->Graph); } From 545ac6b420ea60f5e13f135ce86f55d31a238aa2 Mon Sep 17 00:00:00 2001 From: KimLS Date: Mon, 28 Aug 2017 22:01:08 -0700 Subject: [PATCH 016/670] Some pathing tweaks, removed old quest functions that dealt with the old pathing code. Fixes to best z under new system --- zone/embparser_api.cpp | 48 ---------------- zone/mob.h | 1 + zone/mob_ai.cpp | 9 ++- zone/pathfinder_nav_mesh.cpp | 19 ++++--- zone/pathing.cpp | 12 ++-- zone/questmgr.cpp | 76 ------------------------- zone/questmgr.h | 2 - zone/waypoints.cpp | 104 ++++++++++++++++++++++++++++++++++- 8 files changed, 124 insertions(+), 147 deletions(-) diff --git a/zone/embparser_api.cpp b/zone/embparser_api.cpp index b440fdd3b..6cbd2db22 100644 --- a/zone/embparser_api.cpp +++ b/zone/embparser_api.cpp @@ -1930,52 +1930,6 @@ XS(XS__repopzone) XSRETURN_EMPTY; } -XS(XS__ConnectNodeToNode); -XS(XS__ConnectNodeToNode) -{ - dXSARGS; - if (items != 4) - Perl_croak(aTHX_ "Usage: ConnectNodeToNode(node1, node2, teleport, doorid)"); - - int node1 = (int)SvIV(ST(0)); - int node2 = (int)SvIV(ST(1)); - int teleport = (int)SvIV(ST(2)); - int doorid = (int)SvIV(ST(3)); - - quest_manager.ConnectNodeToNode(node1, node2, teleport, doorid); - - XSRETURN_EMPTY; -} - -XS(XS__AddNode); -XS(XS__AddNode) -{ - dXSARGS; - //void QuestManager::AddNode(float x, float y, float z, float best_z, int32 requested_id); - if (items < 3 || items > 5) - Perl_croak(aTHX_ "Usage: AddNode(x, y, z, [best_z], [requested_id])"); - - int x = (int)SvIV(ST(0)); - int y = (int)SvIV(ST(1)); - int z = (int)SvIV(ST(2)); - int best_z = 0; - int requested_id = 0; - - if (items == 4) - { - best_z = (int)SvIV(ST(3)); - } - else if (items == 5) - { - best_z = (int)SvIV(ST(3)); - requested_id = (int)SvIV(ST(4)); - } - - quest_manager.AddNode(x, y, z, best_z, requested_id); - - XSRETURN_EMPTY; -} - XS(XS__npcrace); XS(XS__npcrace) { @@ -3867,8 +3821,6 @@ EXTERN_C XS(boot_quest) newXS(strcpy(buf, "reloadzonestaticdata"), XS__reloadzonestaticdata, file); newXS(strcpy(buf, "removetitle"), XS__removetitle, file); newXS(strcpy(buf, "repopzone"), XS__repopzone, file); - newXS(strcpy(buf, "ConnectNodeToNode"), XS__ConnectNodeToNode, file); - newXS(strcpy(buf, "AddNode"), XS__AddNode, file); newXS(strcpy(buf, "resettaskactivity"), XS__resettaskactivity, file); newXS(strcpy(buf, "respawn"), XS__respawn, file); newXS(strcpy(buf, "resume"), XS__resume, file); diff --git a/zone/mob.h b/zone/mob.h index 9fe5eccd1..43f1765e0 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -949,6 +949,7 @@ public: void SendTo(float new_x, float new_y, float new_z); void SendToFixZ(float new_x, float new_y, float new_z); void FixZ(); + float GetModelOffset() const; void NPCSpecialAttacks(const char* parse, int permtag, bool reset = true, bool remove = false); inline uint32 DontHealMeBefore() const { return pDontHealMeBefore; } inline uint32 DontBuffMeBefore() const { return pDontBuffMeBefore; } diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index b59146a12..6e5fd8c8f 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1529,13 +1529,12 @@ void NPC::AI_DoMovement() { if (roambox_movingto_y > roambox_max_y || roambox_movingto_y < roambox_min_y) roambox_movingto_y = zone->random.Real(roambox_min_y+1,roambox_max_y-1); } - + Log(Logs::Detail, Logs::AI, "Roam Box: d=%.3f (%.3f->%.3f,%.3f->%.3f): Go To (%.3f,%.3f)", roambox_distance, roambox_min_x, roambox_max_x, roambox_min_y, roambox_max_y, roambox_movingto_x, roambox_movingto_y); - - float new_z = this->FindGroundZ(m_Position.x, m_Position.y, 5); - new_z += (this->GetSize() / 1.55); - + + float new_z = this->FindGroundZ(m_Position.x, m_Position.y, 5) + GetModelOffset(); + if (!CalculateNewPosition(roambox_movingto_x, roambox_movingto_y, new_z, walksp, true)) { roambox_movingto_x = roambox_max_x + 1; // force update diff --git a/zone/pathfinder_nav_mesh.cpp b/zone/pathfinder_nav_mesh.cpp index f44e02ec9..eb74c9cf0 100644 --- a/zone/pathfinder_nav_mesh.cpp +++ b/zone/pathfinder_nav_mesh.cpp @@ -51,17 +51,18 @@ IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const gl filter.setIncludeFlags(65535U); filter.setAreaCost(0, 1.0f); //Normal filter.setAreaCost(1, 2.0f); //Water - filter.setAreaCost(2, 2.0f); //Lava + filter.setAreaCost(2, 4.0f); //Lava filter.setAreaCost(4, 1.0f); //PvP filter.setAreaCost(5, 1.5f); //Slime filter.setAreaCost(6, 1.5f); //Ice - filter.setAreaCost(7, 2.0f); //V Water (Frigid Water) + filter.setAreaCost(7, 3.0f); //V Water (Frigid Water) filter.setAreaCost(8, 1.0f); //General Area filter.setAreaCost(9, 1.0f); //Portal + filter.setAreaCost(10, 0.5f); //Prefer dtPolyRef start_ref; dtPolyRef end_ref; - glm::vec3 ext(15.0f, 15.0f, 15.0f); + glm::vec3 ext(15.0f, 100.0f, 15.0f); m_impl->query->findNearestPoly(¤t_location[0], &ext[0], &filter, &start_ref, 0); m_impl->query->findNearestPoly(&dest_location[0], &ext[0], &filter, &end_ref, 0); @@ -73,8 +74,8 @@ IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const gl } int npoly = 0; - dtPolyRef path[512] = { 0 }; - auto status = m_impl->query->findPath(start_ref, end_ref, ¤t_location[0], &dest_location[0], &filter, path, &npoly, 512); + dtPolyRef path[1024] = { 0 }; + auto status = m_impl->query->findPath(start_ref, end_ref, ¤t_location[0], &dest_location[0], &filter, path, &npoly, 1024); if (npoly) { glm::vec3 epos = dest_location; @@ -82,15 +83,15 @@ IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const gl m_impl->query->closestPointOnPoly(path[npoly - 1], &dest_location[0], &epos[0], 0); } - float straight_path[512 * 3]; - unsigned char straight_path_flags[512]; + float straight_path[2048 * 3]; + unsigned char straight_path_flags[2048]; int n_straight_polys; - dtPolyRef straight_path_polys[512]; + dtPolyRef straight_path_polys[2048]; status = m_impl->query->findStraightPath(¤t_location[0], &epos[0], path, npoly, straight_path, straight_path_flags, - straight_path_polys, &n_straight_polys, 512, DT_STRAIGHTPATH_ALL_CROSSINGS); + straight_path_polys, &n_straight_polys, 2048, DT_STRAIGHTPATH_AREA_CROSSINGS); if (status & DT_OUT_OF_NODES) { IPath Route; diff --git a/zone/pathing.cpp b/zone/pathing.cpp index 3756f449b..e805138e3 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -7,16 +7,16 @@ extern Zone *zone; -void AdjustRoute(std::list &nodes, int flymode) { +void AdjustRoute(std::list &nodes, int flymode, float offset) { if (!zone->HasMap() || !zone->HasWaterMap()) { return; } - + for (auto &node : nodes) { if (flymode == 0 || !zone->watermap->InLiquid(node.pos)) { auto best_z = zone->zonemap->FindBestZ(node.pos, nullptr); if (best_z != BEST_Z_INVALID) { - node.pos.z = best_z; + node.pos.z = best_z + offset; } } } @@ -40,7 +40,7 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa if (Route.empty()) { Route = zone->pathing->FindRoute(From, To); - AdjustRoute(Route, flymode); + AdjustRoute(Route, flymode, GetModelOffset()); PathingDestination = To; WaypointChanged = true; @@ -58,7 +58,7 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa if (!SameDestination) { //We had a route but our target position moved too much Route = zone->pathing->FindRoute(From, To); - AdjustRoute(Route, flymode); + AdjustRoute(Route, flymode, GetModelOffset()); PathingDestination = To; WaypointChanged = true; @@ -120,7 +120,7 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa if (Route.empty()) { Route = zone->pathing->FindRoute(From, To); - AdjustRoute(Route, flymode); + AdjustRoute(Route, flymode, GetModelOffset()); PathingDestination = To; WaypointChanged = true; diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index b06f39ca5..0006398d4 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -672,82 +672,6 @@ void QuestManager::repopzone() { } } -void QuestManager::ConnectNodeToNode(int node1, int node2, int teleport, int doorid) { - //PATHING TODO - //if (!node1 || !node2) - //{ - // Log(Logs::General, Logs::Quests, "QuestManager::ConnectNodeToNode called without node1 or node2. Probably syntax error in quest file."); - //} - //else - //{ - // if (!teleport) - // { - // teleport = 0; - // } - // else if (teleport == 1 || teleport == -1) - // { - // teleport = -1; - // } - // - // if (!doorid) - // { - // doorid = 0; - // } - // - // if (!zone->pathing) - // { - // // if no pathing bits available, make them available. - // zone->pathing = new PathManager(); - // } - // - // if (zone->pathing) - // { - // zone->pathing->ConnectNodeToNode(node1, node2, teleport, doorid); - // Log(Logs::Moderate, Logs::Quests, "QuestManager::ConnectNodeToNode connecting node %i to node %i.", node1, node2); - // } - //} -} - -void QuestManager::AddNode(float x, float y, float z, float best_z, int32 requested_id) -{ - //PATHING TODO - - //if (!x || !y || !z) - //{ - // Log(Logs::General, Logs::Quests, "QuestManager::AddNode called without x, y, z. Probably syntax error in quest file."); - //} - // - //if (!best_z || best_z == 0) - //{ - // if (zone->zonemap) - // { - // glm::vec3 loc(x, y, z); - // best_z = zone->zonemap->FindBestZ(loc, nullptr); - // } - // else - // { - // best_z = z; - // } - //} - // - //if (!requested_id) - //{ - // requested_id = 0; - //} - // - //if (!zone->pathing) - //{ - // // if no pathing bits available, make them available. - // zone->pathing = new PathManager(); - //} - // - //if (zone->pathing) - //{ - // zone->pathing->AddNode(x, y, z, best_z, requested_id); - // Log(Logs::Moderate, Logs::Quests, "QuestManager::AddNode adding node at (%i, %i, %i).", x, y, z); - //} -} - void QuestManager::settarget(const char *type, int target_id) { QuestManagerCurrentQuestVars(); if (!owner || !owner->IsNPC()) diff --git a/zone/questmgr.h b/zone/questmgr.h index 0c846c013..a4deaba97 100644 --- a/zone/questmgr.h +++ b/zone/questmgr.h @@ -91,8 +91,6 @@ public: void depopall(int npc_type = 0); void depopzone(bool StartSpawnTimer = true); void repopzone(); - void ConnectNodeToNode(int node1, int node2, int teleport, int doorid); - void AddNode(float x, float y, float z, float best_z, int32 requested_id); void settarget(const char *type, int target_id); void follow(int entity_id, int distance); void sfollow(); diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index 527173287..180d89867 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -769,7 +769,7 @@ void Mob::FixZ() { { /* Any more than 5 in the offset makes NPC's hop/snap to ceiling in small corridors */ float new_z = this->FindGroundZ(m_Position.x, m_Position.y, 5); - new_z += (this->GetSize() / 1.55); + new_z += GetModelOffset(); auto duration = timer.elapsed(); @@ -803,6 +803,108 @@ void Mob::FixZ() { } } +float Mob::GetModelOffset() const { + switch (race) { + case 436: + return 0.577f; + + case 430: + return 0.5f; + + case 432: + return 1.9f; + + case 435: + return 0.93f; + + case 450: + return 0.938f; + + case 479: + return 0.8f; + + case 451: + return 0.816f; + + case 437: + return 0.527f; + + case 439: + return 1.536f; + + case 415: + return 1.0f; + + case 438: + return 0.776f; + + case 452: + return 0.776f; + + case 441: + return 0.816f; + + case 440: + return 0.938f; + + case 468: + return 1.0f; + + case 459: + return 1.0f; + + case 462: + return 1.5f; + + case 530: + return 1.2f; + + case 549: + return 0.5f; + + case 548: + return 0.5f; + + case 547: + return 0.5f; + + case 604: + return 1.2f; + + case 653: + return 5.9f; + + case 658: + return 4.0f; + + case 323: + return 5.0f; + + case 663: + return 5.0f; + + case 664: + return 4.0f; + + case 703: + return 9.0f; + + case 688: + return 5.0f; + + case 669: + return 7.0f; + + case 687: + return 2.0f; + + case 686: + return 2.0f; + default: + return 3.125f; + } +} + int ZoneDatabase::GetHighestGrid(uint32 zoneid) { std::string query = StringFormat("SELECT COALESCE(MAX(id), 0) FROM grid WHERE zoneid = %i", zoneid); From 46561b9cf592a9d1f42dc8b98a41ec4bb5f03982 Mon Sep 17 00:00:00 2001 From: KimLS Date: Mon, 28 Aug 2017 23:48:05 -0700 Subject: [PATCH 017/670] Factor in size to actor offset --- zone/waypoints.cpp | 133 +++++++++++++++++++++++---------------------- 1 file changed, 69 insertions(+), 64 deletions(-) diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index 180d89867..823cb06dd 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -804,105 +804,110 @@ void Mob::FixZ() { } float Mob::GetModelOffset() const { + float offset = 3.125f; + switch (race) { case 436: - return 0.577f; - + offset = 0.577f; + break; case 430: - return 0.5f; - + offset = 0.5f; + break; case 432: - return 1.9f; - + offset = 1.9f; + break; case 435: - return 0.93f; - + offset = 0.93f; + break; case 450: - return 0.938f; - + offset = 0.938f; + break; case 479: - return 0.8f; - + offset = 0.8f; + break; case 451: - return 0.816f; - + offset = 0.816f; + break; case 437: - return 0.527f; - + offset = 0.527f; + break; case 439: - return 1.536f; - + offset = 1.536f; + break; case 415: - return 1.0f; - + offset = 1.0f; + break; case 438: - return 0.776f; - + offset = 0.776f; + break; case 452: - return 0.776f; - + offset = 0.776f; + break; case 441: - return 0.816f; - + offset = 0.816f; + break; case 440: - return 0.938f; - + offset = 0.938f; + break; case 468: - return 1.0f; - + offset = 1.0f; + break; case 459: - return 1.0f; - + offset = 1.0f; + break; case 462: - return 1.5f; - + offset = 1.5f; + break; case 530: - return 1.2f; - + offset = 1.2f; + break; case 549: - return 0.5f; - + offset = 0.5f; + break; case 548: - return 0.5f; - + offset = 0.5f; + break; case 547: - return 0.5f; - + offset = 0.5f; + break; case 604: - return 1.2f; - + offset = 1.2f; + break; case 653: - return 5.9f; - + offset = 5.9f; + break; case 658: - return 4.0f; - + offset = 4.0f; + break; case 323: - return 5.0f; - + offset = 5.0f; + break; case 663: - return 5.0f; - + offset = 5.0f; + break; case 664: - return 4.0f; - + offset = 4.0f; + break; case 703: - return 9.0f; - + offset = 9.0f; + break; case 688: - return 5.0f; - + offset = 5.0f; + break; case 669: - return 7.0f; - + offset = 7.0f; + break; case 687: - return 2.0f; - + offset = 2.0f; + break; case 686: - return 2.0f; + offset = 2.0f; + break; default: - return 3.125f; + offset = 3.125f; } + + return 0.2 * GetSize() * offset; } int ZoneDatabase::GetHighestGrid(uint32 zoneid) { From 0ba9b3fedc270937e55c13d0472bff36ab7091f0 Mon Sep 17 00:00:00 2001 From: KimLS Date: Tue, 29 Aug 2017 22:03:22 -0700 Subject: [PATCH 018/670] Fix for bug in pathing stuck detection --- zone/pathing.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/zone/pathing.cpp b/zone/pathing.cpp index e805138e3..9bd6492a7 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -77,19 +77,18 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa bool AtPrevNode = DistanceSquared(From, PathingLastPosition) < 1.0f; if (AtPrevNode) { PathingLoopCount++; + auto front = (*Route.begin()).pos; if (PathingLoopCount > 5) { + Teleport(front); SendPosition(); + Route.pop_front(); + + WaypointChanged = true; + NodeReached = true; + PathingLoopCount = 0; } - auto front = (*Route.begin()).pos; - Teleport(front); - Route.pop_front(); - - WaypointChanged = true; - NodeReached = true; - PathingLoopCount = 0; - return front; } else { From c52ff4249a74cc8d62932fceec0b05abf353f0b1 Mon Sep 17 00:00:00 2001 From: KimLS Date: Wed, 30 Aug 2017 19:55:35 -0700 Subject: [PATCH 019/670] Pathing stuck detection, and logic to go with it --- zone/client_packet.cpp | 14 ++++-------- zone/mob.cpp | 2 +- zone/pathfinder_interface.h | 2 +- zone/pathfinder_nav_mesh.cpp | 41 +++++++++++++++++++++++------------ zone/pathfinder_nav_mesh.h | 2 +- zone/pathfinder_null.cpp | 4 +++- zone/pathfinder_null.h | 2 +- zone/pathfinder_waypoint.cpp | 11 ++++++++-- zone/pathfinder_waypoint.h | 2 +- zone/pathing.cpp | 42 ++++++++++++++++++++++++++++-------- 10 files changed, 81 insertions(+), 41 deletions(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index bb167c62f..27c4d2c50 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -5737,17 +5737,11 @@ void Client::Handle_OP_FindPersonRequest(const EQApplicationPacket *app) glm::vec3 Start(GetX(), GetY(), GetZ() + (GetSize() < 6.0 ? 6 : GetSize()) * HEAD_POSITION); glm::vec3 End(target->GetX(), target->GetY(), target->GetZ() + (target->GetSize() < 6.0 ? 6 : target->GetSize()) * HEAD_POSITION); - auto pathlist = zone->pathing->FindRoute(Start, End); + bool partial = false; + bool error = false; + auto pathlist = zone->pathing->FindRoute(Start, End, partial, error); - if (pathlist.empty()) - { - EQApplicationPacket outapp(OP_FindPersonReply, 0); - QueuePacket(&outapp); - return; - } - - //the client seems to have issues with packets larger than this - if (pathlist.size() > 36) + if (pathlist.empty() || error || partial) { EQApplicationPacket outapp(OP_FindPersonReply, 0); QueuePacket(&outapp); diff --git a/zone/mob.cpp b/zone/mob.cpp index c5f8c090e..e2ab820d3 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -445,7 +445,7 @@ Mob::Mob(const char* in_name, AssistAggro = false; npc_assist_cap = 0; - PathRecalcTimer.reset(new Timer(2000)); + PathRecalcTimer.reset(new Timer(1500)); PathingLoopCount = 0; } diff --git a/zone/pathfinder_interface.h b/zone/pathfinder_interface.h index fc120fb43..8ef9fb15a 100644 --- a/zone/pathfinder_interface.h +++ b/zone/pathfinder_interface.h @@ -29,7 +29,7 @@ public: IPathfinder() { } virtual ~IPathfinder() { } - virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end) = 0; + virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &error) = 0; virtual glm::vec3 GetRandomLocation() = 0; virtual void DebugCommand(Client *c, const Seperator *sep) = 0; diff --git a/zone/pathfinder_nav_mesh.cpp b/zone/pathfinder_nav_mesh.cpp index eb74c9cf0..904d7ce4a 100644 --- a/zone/pathfinder_nav_mesh.cpp +++ b/zone/pathfinder_nav_mesh.cpp @@ -12,6 +12,8 @@ extern Zone *zone; +const int MaxNavmeshNodes = 4092; + struct PathfinderNavmesh::Implementation { dtNavMesh *nav_mesh; @@ -31,9 +33,13 @@ PathfinderNavmesh::~PathfinderNavmesh() Clear(); } -IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const glm::vec3 &end) +IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &error) { + partial = false; + error = false; + if (!m_impl->nav_mesh) { + error = true; IPath Route; Route.push_back(end); return Route; @@ -41,7 +47,7 @@ IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const gl if (!m_impl->query) { m_impl->query = dtAllocNavMeshQuery(); - m_impl->query->init(m_impl->nav_mesh, 32768); + m_impl->query->init(m_impl->nav_mesh, MaxNavmeshNodes); } glm::vec3 current_location(start.x, start.z, start.y); @@ -68,6 +74,7 @@ IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const gl m_impl->query->findNearestPoly(&dest_location[0], &ext[0], &filter, &end_ref, 0); if (!start_ref || !end_ref) { + error = true; IPath Route; Route.push_back(end); return Route; @@ -81,6 +88,7 @@ IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const gl glm::vec3 epos = dest_location; if (path[npoly - 1] != end_ref) { m_impl->query->closestPointOnPoly(path[npoly - 1], &dest_location[0], &epos[0], 0); + partial = true; } float straight_path[2048 * 3]; @@ -93,7 +101,8 @@ IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const gl straight_path, straight_path_flags, straight_path_polys, &n_straight_polys, 2048, DT_STRAIGHTPATH_AREA_CROSSINGS); - if (status & DT_OUT_OF_NODES) { + if (dtStatusFailed(status)) { + error = true; IPath Route; Route.push_back(end); return Route; @@ -135,7 +144,7 @@ glm::vec3 PathfinderNavmesh::GetRandomLocation() if (!m_impl->query) { m_impl->query = dtAllocNavMeshQuery(); - m_impl->query->init(m_impl->nav_mesh, 32768); + m_impl->query->init(m_impl->nav_mesh, MaxNavmeshNodes); } dtQueryFilter filter; @@ -280,20 +289,24 @@ void PathfinderNavmesh::Load(const std::string &path) } } -void PathfinderNavmesh::ShowPath(Client * c, const glm::vec3 & start, const glm::vec3 & end) +void PathfinderNavmesh::ShowPath(Client * c, const glm::vec3 &start, const glm::vec3 &end) { - auto path = FindRoute(start, end); + bool partial = false; + bool error = false; + auto path = FindRoute(start, end, partial, error); std::vector points; - FindPerson_Point p; - for (auto &node : path) - { - if (!node.teleport) { - p.x = node.pos.x; - p.y = node.pos.y; - p.z = node.pos.z; + if (!partial && !error) { + FindPerson_Point p; + for (auto &node : path) + { + if (!node.teleport) { + p.x = node.pos.x; + p.y = node.pos.y; + p.z = node.pos.z; - points.push_back(p); + points.push_back(p); + } } } diff --git a/zone/pathfinder_nav_mesh.h b/zone/pathfinder_nav_mesh.h index a15f02d6b..583dd8183 100644 --- a/zone/pathfinder_nav_mesh.h +++ b/zone/pathfinder_nav_mesh.h @@ -9,7 +9,7 @@ public: PathfinderNavmesh(const std::string &path); virtual ~PathfinderNavmesh(); - virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end); + virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &error); virtual glm::vec3 GetRandomLocation(); virtual void DebugCommand(Client *c, const Seperator *sep); diff --git a/zone/pathfinder_null.cpp b/zone/pathfinder_null.cpp index cccf61ebc..ec6160fe7 100644 --- a/zone/pathfinder_null.cpp +++ b/zone/pathfinder_null.cpp @@ -1,7 +1,9 @@ #include "pathfinder_null.h" -IPathfinder::IPath PathfinderNull::FindRoute(const glm::vec3 &start, const glm::vec3 &end) +IPathfinder::IPath PathfinderNull::FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &error) { + error = false; + partial = false; IPath ret; ret.push_back(start); ret.push_back(end); diff --git a/zone/pathfinder_null.h b/zone/pathfinder_null.h index 55ff2b06b..885604b27 100644 --- a/zone/pathfinder_null.h +++ b/zone/pathfinder_null.h @@ -8,7 +8,7 @@ public: PathfinderNull() { } virtual ~PathfinderNull() { } - virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end); + virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &error); virtual glm::vec3 GetRandomLocation(); virtual void DebugCommand(Client *c, const Seperator *sep) { } }; \ No newline at end of file diff --git a/zone/pathfinder_waypoint.cpp b/zone/pathfinder_waypoint.cpp index 9727f5636..6489227b3 100644 --- a/zone/pathfinder_waypoint.cpp +++ b/zone/pathfinder_waypoint.cpp @@ -114,17 +114,21 @@ PathfinderWaypoint::~PathfinderWaypoint() { } -IPathfinder::IPath PathfinderWaypoint::FindRoute(const glm::vec3 &start, const glm::vec3 &end) +IPathfinder::IPath PathfinderWaypoint::FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &error) { + partial = false; + error = false; std::vector result_start_n; m_impl->Tree.query(boost::geometry::index::nearest(Point(start.x, start.y, start.z), 1), std::back_inserter(result_start_n)); if (result_start_n.size() == 0) { + error = true; return IPath(); } std::vector result_end_n; m_impl->Tree.query(boost::geometry::index::nearest(Point(end.x, end.y, end.z), 1), std::back_inserter(result_end_n)); if (result_end_n.size() == 0) { + error = true; return IPath(); } @@ -179,6 +183,7 @@ IPathfinder::IPath PathfinderWaypoint::FindRoute(const glm::vec3 &start, const g return Route; } + error = true; IPath Route; Route.push_front(start); Route.push_back(glm::vec3(nearest_start.first.get<0>(), nearest_start.first.get<1>(), nearest_start.first.get<2>())); @@ -395,7 +400,9 @@ void PathfinderWaypoint::ShowNodes() void PathfinderWaypoint::ShowPath(Client *c, const glm::vec3 &start, const glm::vec3 &end) { - auto path = FindRoute(start, end); + bool partial = false; + bool error = false; + auto path = FindRoute(start, end, partial, error); std::vector points; FindPerson_Point p; diff --git a/zone/pathfinder_waypoint.h b/zone/pathfinder_waypoint.h index f4132e44c..d9aa726d1 100644 --- a/zone/pathfinder_waypoint.h +++ b/zone/pathfinder_waypoint.h @@ -11,7 +11,7 @@ public: PathfinderWaypoint(const std::string &path); virtual ~PathfinderWaypoint(); - virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end); + virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &error); virtual glm::vec3 GetRandomLocation(); virtual void DebugCommand(Client *c, const Seperator *sep); diff --git a/zone/pathing.cpp b/zone/pathing.cpp index 9bd6492a7..a5e03ba63 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -39,14 +39,22 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa } if (Route.empty()) { - Route = zone->pathing->FindRoute(From, To); + bool partial = false; + bool error = false; + Route = zone->pathing->FindRoute(From, To, partial, error); AdjustRoute(Route, flymode, GetModelOffset()); PathingDestination = To; WaypointChanged = true; NodeReached = false; - if (Route.empty()) { - return From; + if (partial && Route.size() <= 2) { + //We are stuck + Route.clear(); + Teleport(To); + return To; + } + else if (error || Route.empty()) { + return To; } else { return (*Route.begin()).pos; @@ -57,15 +65,21 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa bool SameDestination = DistanceSquared(To, PathingDestination) < 100.0f; if (!SameDestination) { //We had a route but our target position moved too much - Route = zone->pathing->FindRoute(From, To); + bool partial = false; + bool error = false; + Route = zone->pathing->FindRoute(From, To, partial, error); AdjustRoute(Route, flymode, GetModelOffset()); PathingDestination = To; WaypointChanged = true; NodeReached = false; - if (Route.empty()) { - return From; + if (partial && Route.size() <= 2) { + Route.clear(); + Teleport(To); + return To; + } else if (error || Route.empty()) { + return To; } else { return (*Route.begin()).pos; @@ -118,13 +132,21 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa Route.pop_front(); if (Route.empty()) { - Route = zone->pathing->FindRoute(From, To); + bool partial = false; + bool error = false; + Route = zone->pathing->FindRoute(From, To, partial, error); AdjustRoute(Route, flymode, GetModelOffset()); PathingDestination = To; WaypointChanged = true; - if (Route.empty()) { - return From; + if (partial && Route.size() <= 2) { + //We are stuck + Route.clear(); + Teleport(To); + return To; + } + else if (error || Route.empty()) { + return To; } else { return (*Route.begin()).pos; @@ -161,6 +183,8 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa return (*Route.begin()).pos; } } + + return To; } void CullPoints(std::vector &points) { From 1a4aa1692a5b9171b9c9806486bc3d3433b59e60 Mon Sep 17 00:00:00 2001 From: KimLS Date: Tue, 5 Sep 2017 22:50:08 -0700 Subject: [PATCH 020/670] Remove partial warp for now --- zone/pathing.cpp | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/zone/pathing.cpp b/zone/pathing.cpp index a5e03ba63..bbe66d736 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -47,13 +47,7 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa PathingDestination = To; WaypointChanged = true; NodeReached = false; - if (partial && Route.size() <= 2) { - //We are stuck - Route.clear(); - Teleport(To); - return To; - } - else if (error || Route.empty()) { + if (Route.empty()) { return To; } else { @@ -74,11 +68,7 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa WaypointChanged = true; NodeReached = false; - if (partial && Route.size() <= 2) { - Route.clear(); - Teleport(To); - return To; - } else if (error || Route.empty()) { + if (Route.empty()) { return To; } else { @@ -139,13 +129,7 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa PathingDestination = To; WaypointChanged = true; - if (partial && Route.size() <= 2) { - //We are stuck - Route.clear(); - Teleport(To); - return To; - } - else if (error || Route.empty()) { + if(Route.empty()) { return To; } else { From ccdebf0116c9e7b305af8ea830abdfc056cd81d8 Mon Sep 17 00:00:00 2001 From: KimLS Date: Sat, 9 Sep 2017 00:24:30 -0700 Subject: [PATCH 021/670] Add custom feature, cross-class skill trainer, fix up stuck detection and added a better solution to it. --- common/ruletypes.h | 1 + zone/client_packet.cpp | 6 ++--- zone/client_process.cpp | 24 +++++++++++------- zone/mob.cpp | 9 ++++++- zone/pathfinder_interface.h | 2 +- zone/pathfinder_nav_mesh.cpp | 29 +++++++++------------- zone/pathfinder_nav_mesh.h | 2 +- zone/pathfinder_null.cpp | 4 +-- zone/pathfinder_null.h | 2 +- zone/pathfinder_waypoint.cpp | 16 ++++-------- zone/pathfinder_waypoint.h | 2 +- zone/pathing.cpp | 48 +++++++++++++++++++++++++++++++----- 12 files changed, 92 insertions(+), 53 deletions(-) diff --git a/common/ruletypes.h b/common/ruletypes.h index 529c7d239..a278f58f3 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -151,6 +151,7 @@ RULE_BOOL(Character, UseOldBindWound, false) // Uses the original bind wound beh RULE_BOOL(Character, GrantHoTTOnCreate, false) // Grant Health of Target's Target leadership AA on character creation RULE_BOOL(Character, UseOldConSystem, false) // Grant Health of Target's Target leadership AA on character creation RULE_BOOL(Character, OPClientUpdateVisualDebug, false) // Shows a pulse and forward directional particle each time the client sends its position to server +RULE_BOOL(Character, AllowCrossClassTrainers, false) RULE_CATEGORY_END() RULE_CATEGORY(Mercs) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 8a23b6996..01aadfd19 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -5750,10 +5750,10 @@ void Client::Handle_OP_FindPersonRequest(const EQApplicationPacket *app) glm::vec3 End(target->GetX(), target->GetY(), target->GetZ() + (target->GetSize() < 6.0 ? 6 : target->GetSize()) * HEAD_POSITION); bool partial = false; - bool error = false; - auto pathlist = zone->pathing->FindRoute(Start, End, partial, error); + bool stuck = false; + auto pathlist = zone->pathing->FindRoute(Start, End, partial, stuck); - if (pathlist.empty() || error || partial) + if (pathlist.empty() || partial) { EQApplicationPacket outapp(OP_FindPersonReply, 0); QueuePacket(&outapp); diff --git a/zone/client_process.cpp b/zone/client_process.cpp index 62921f6ce..1e591de2f 100644 --- a/zone/client_process.cpp +++ b/zone/client_process.cpp @@ -1527,9 +1527,11 @@ void Client::OPGMTraining(const EQApplicationPacket *app) return; //you can only use your own trainer, client enforces this, but why trust it - int trains_class = pTrainer->GetClass() - (WARRIORGM - WARRIOR); - if(GetClass() != trains_class) - return; + if (!RuleB(Character, AllowCrossClassTrainers)) { + int trains_class = pTrainer->GetClass() - (WARRIORGM - WARRIOR); + if (GetClass() != trains_class) + return; + } //you have to be somewhat close to a trainer to be properly using them if(DistanceSquared(m_Position,pTrainer->GetPosition()) > USE_NPC_RANGE2) @@ -1580,9 +1582,11 @@ void Client::OPGMEndTraining(const EQApplicationPacket *app) return; //you can only use your own trainer, client enforces this, but why trust it - int trains_class = pTrainer->GetClass() - (WARRIORGM - WARRIOR); - if(GetClass() != trains_class) - return; + if (!RuleB(Character, AllowCrossClassTrainers)) { + int trains_class = pTrainer->GetClass() - (WARRIORGM - WARRIOR); + if (GetClass() != trains_class) + return; + } //you have to be somewhat close to a trainer to be properly using them if(DistanceSquared(m_Position, pTrainer->GetPosition()) > USE_NPC_RANGE2) @@ -1609,9 +1613,11 @@ void Client::OPGMTrainSkill(const EQApplicationPacket *app) return; //you can only use your own trainer, client enforces this, but why trust it - int trains_class = pTrainer->GetClass() - (WARRIORGM - WARRIOR); - if(GetClass() != trains_class) - return; + if (!RuleB(Character, AllowCrossClassTrainers)) { + int trains_class = pTrainer->GetClass() - (WARRIORGM - WARRIOR); + if (GetClass() != trains_class) + return; + } //you have to be somewhat close to a trainer to be properly using them if(DistanceSquared(m_Position, pTrainer->GetPosition()) > USE_NPC_RANGE2) diff --git a/zone/mob.cpp b/zone/mob.cpp index a0b16c76c..42a7d01a8 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -445,7 +445,7 @@ Mob::Mob(const char* in_name, AssistAggro = false; npc_assist_cap = 0; - PathRecalcTimer.reset(new Timer(1500)); + PathRecalcTimer.reset(new Timer(500)); PathingLoopCount = 0; } @@ -1240,6 +1240,13 @@ void Mob::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) ns->spawn.flymode = 0; } + + if (RuleB(Character, AllowCrossClassTrainers) && ForWho) { + if (ns->spawn.class_ >= WARRIORGM && ns->spawn.class_ <= BERSERKERGM) { + int trainer_class = WARRIORGM + (ForWho->GetClass() - 1); + ns->spawn.class_ = trainer_class; + } + } } void Mob::CreateDespawnPacket(EQApplicationPacket* app, bool Decay) diff --git a/zone/pathfinder_interface.h b/zone/pathfinder_interface.h index 8ef9fb15a..2a874a50d 100644 --- a/zone/pathfinder_interface.h +++ b/zone/pathfinder_interface.h @@ -29,7 +29,7 @@ public: IPathfinder() { } virtual ~IPathfinder() { } - virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &error) = 0; + virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &stuck) = 0; virtual glm::vec3 GetRandomLocation() = 0; virtual void DebugCommand(Client *c, const Seperator *sep) = 0; diff --git a/zone/pathfinder_nav_mesh.cpp b/zone/pathfinder_nav_mesh.cpp index 904d7ce4a..8b4cfb2f5 100644 --- a/zone/pathfinder_nav_mesh.cpp +++ b/zone/pathfinder_nav_mesh.cpp @@ -33,16 +33,12 @@ PathfinderNavmesh::~PathfinderNavmesh() Clear(); } -IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &error) +IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &stuck) { partial = false; - error = false; if (!m_impl->nav_mesh) { - error = true; - IPath Route; - Route.push_back(end); - return Route; + return IPath(); } if (!m_impl->query) { @@ -74,10 +70,7 @@ IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const gl m_impl->query->findNearestPoly(&dest_location[0], &ext[0], &filter, &end_ref, 0); if (!start_ref || !end_ref) { - error = true; - IPath Route; - Route.push_back(end); - return Route; + return IPath(); } int npoly = 0; @@ -89,6 +82,11 @@ IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const gl if (path[npoly - 1] != end_ref) { m_impl->query->closestPointOnPoly(path[npoly - 1], &dest_location[0], &epos[0], 0); partial = true; + + auto dist = DistanceSquared(epos, current_location); + if (dist < 10.0f) { + stuck = true; + } } float straight_path[2048 * 3]; @@ -102,10 +100,7 @@ IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const gl straight_path_polys, &n_straight_polys, 2048, DT_STRAIGHTPATH_AREA_CROSSINGS); if (dtStatusFailed(status)) { - error = true; - IPath Route; - Route.push_back(end); - return Route; + return IPath(); } if (n_straight_polys) { @@ -292,11 +287,11 @@ void PathfinderNavmesh::Load(const std::string &path) void PathfinderNavmesh::ShowPath(Client * c, const glm::vec3 &start, const glm::vec3 &end) { bool partial = false; - bool error = false; - auto path = FindRoute(start, end, partial, error); + bool stuck = false; + auto path = FindRoute(start, end, partial, stuck); std::vector points; - if (!partial && !error) { + if (!partial) { FindPerson_Point p; for (auto &node : path) { diff --git a/zone/pathfinder_nav_mesh.h b/zone/pathfinder_nav_mesh.h index 583dd8183..e740e5ca7 100644 --- a/zone/pathfinder_nav_mesh.h +++ b/zone/pathfinder_nav_mesh.h @@ -9,7 +9,7 @@ public: PathfinderNavmesh(const std::string &path); virtual ~PathfinderNavmesh(); - virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &error); + virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &stuck); virtual glm::vec3 GetRandomLocation(); virtual void DebugCommand(Client *c, const Seperator *sep); diff --git a/zone/pathfinder_null.cpp b/zone/pathfinder_null.cpp index ec6160fe7..dce3d19f5 100644 --- a/zone/pathfinder_null.cpp +++ b/zone/pathfinder_null.cpp @@ -1,9 +1,9 @@ #include "pathfinder_null.h" -IPathfinder::IPath PathfinderNull::FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &error) +IPathfinder::IPath PathfinderNull::FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &stuck) { - error = false; partial = false; + stuck = false; IPath ret; ret.push_back(start); ret.push_back(end); diff --git a/zone/pathfinder_null.h b/zone/pathfinder_null.h index 885604b27..2c43e3085 100644 --- a/zone/pathfinder_null.h +++ b/zone/pathfinder_null.h @@ -8,7 +8,7 @@ public: PathfinderNull() { } virtual ~PathfinderNull() { } - virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &error); + virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &stuck); virtual glm::vec3 GetRandomLocation(); virtual void DebugCommand(Client *c, const Seperator *sep) { } }; \ No newline at end of file diff --git a/zone/pathfinder_waypoint.cpp b/zone/pathfinder_waypoint.cpp index 6489227b3..86dd4a4a4 100644 --- a/zone/pathfinder_waypoint.cpp +++ b/zone/pathfinder_waypoint.cpp @@ -114,21 +114,19 @@ PathfinderWaypoint::~PathfinderWaypoint() { } -IPathfinder::IPath PathfinderWaypoint::FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &error) +IPathfinder::IPath PathfinderWaypoint::FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &stuck) { + stuck = false; partial = false; - error = false; std::vector result_start_n; m_impl->Tree.query(boost::geometry::index::nearest(Point(start.x, start.y, start.z), 1), std::back_inserter(result_start_n)); if (result_start_n.size() == 0) { - error = true; return IPath(); } std::vector result_end_n; m_impl->Tree.query(boost::geometry::index::nearest(Point(end.x, end.y, end.z), 1), std::back_inserter(result_end_n)); if (result_end_n.size() == 0) { - error = true; return IPath(); } @@ -183,11 +181,7 @@ IPathfinder::IPath PathfinderWaypoint::FindRoute(const glm::vec3 &start, const g return Route; } - error = true; - IPath Route; - Route.push_front(start); - Route.push_back(glm::vec3(nearest_start.first.get<0>(), nearest_start.first.get<1>(), nearest_start.first.get<2>())); - return Route; + return IPath(); } glm::vec3 PathfinderWaypoint::GetRandomLocation() @@ -401,8 +395,8 @@ void PathfinderWaypoint::ShowNodes() void PathfinderWaypoint::ShowPath(Client *c, const glm::vec3 &start, const glm::vec3 &end) { bool partial = false; - bool error = false; - auto path = FindRoute(start, end, partial, error); + bool stuck = false; + auto path = FindRoute(start, end, partial, stuck); std::vector points; FindPerson_Point p; diff --git a/zone/pathfinder_waypoint.h b/zone/pathfinder_waypoint.h index d9aa726d1..3f6b99c9f 100644 --- a/zone/pathfinder_waypoint.h +++ b/zone/pathfinder_waypoint.h @@ -11,7 +11,7 @@ public: PathfinderWaypoint(const std::string &path); virtual ~PathfinderWaypoint(); - virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &error); + virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &stuck); virtual glm::vec3 GetRandomLocation(); virtual void DebugCommand(Client *c, const Seperator *sep); diff --git a/zone/pathing.cpp b/zone/pathing.cpp index bbe66d736..844ba6cde 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -40,13 +40,25 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa if (Route.empty()) { bool partial = false; - bool error = false; - Route = zone->pathing->FindRoute(From, To, partial, error); + bool stuck = false; + Route = zone->pathing->FindRoute(From, To, partial, stuck); AdjustRoute(Route, flymode, GetModelOffset()); PathingDestination = To; WaypointChanged = true; NodeReached = false; + if (stuck) { + bool partial = false; + bool stuck = false; + auto r = zone->pathing->FindRoute(To, From, partial, stuck); + Route.clear(); + + auto final_node = r.back(); + Route.push_back(final_node); + AdjustRoute(Route, flymode, GetModelOffset()); + return (*Route.begin()).pos; + } + if (Route.empty()) { return To; } @@ -60,14 +72,26 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa if (!SameDestination) { //We had a route but our target position moved too much bool partial = false; - bool error = false; - Route = zone->pathing->FindRoute(From, To, partial, error); + bool stuck = false; + Route = zone->pathing->FindRoute(From, To, partial, stuck); AdjustRoute(Route, flymode, GetModelOffset()); PathingDestination = To; WaypointChanged = true; NodeReached = false; + if (stuck) { + bool partial = false; + bool stuck = false; + auto r = zone->pathing->FindRoute(To, From, partial, stuck); + Route.clear(); + + auto final_node = r.back(); + Route.push_back(final_node); + AdjustRoute(Route, flymode, GetModelOffset()); + return (*Route.begin()).pos; + } + if (Route.empty()) { return To; } @@ -123,12 +147,24 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa if (Route.empty()) { bool partial = false; - bool error = false; - Route = zone->pathing->FindRoute(From, To, partial, error); + bool stuck = false; + Route = zone->pathing->FindRoute(From, To, partial, stuck); AdjustRoute(Route, flymode, GetModelOffset()); PathingDestination = To; WaypointChanged = true; + if (stuck) { + bool partial = false; + bool stuck = false; + auto r = zone->pathing->FindRoute(To, From, partial, stuck); + Route.clear(); + + auto final_node = r.back(); + Route.push_back(final_node); + AdjustRoute(Route, flymode, GetModelOffset()); + return (*Route.begin()).pos; + } + if(Route.empty()) { return To; } From 9dd4002337e3824b617f497f51369b66080141db Mon Sep 17 00:00:00 2001 From: KimLS Date: Sat, 9 Sep 2017 14:01:39 -0700 Subject: [PATCH 022/670] Move stuck code out of main pathing function so we can add logging easily later --- zone/mob.h | 1 + zone/pathing.cpp | 43 ++++++++++++++++--------------------------- 2 files changed, 17 insertions(+), 27 deletions(-) diff --git a/zone/mob.h b/zone/mob.h index 25d32a16c..0cb3fb399 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -1264,6 +1264,7 @@ protected: void CalculateNewFearpoint(); float FindGroundZ(float new_x, float new_y, float z_offset=0.0); glm::vec3 UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &WaypointChange, bool &NodeReached); + glm::vec3 HandleStuckPath(const glm::vec3 &To, const glm::vec3 &From); virtual float GetSympatheticProcChances(uint16 spell_id, int16 ProcRateMod, int32 ItemProcRate = 0); int16 GetSympatheticSpellProcRate(uint16 spell_id); diff --git a/zone/pathing.cpp b/zone/pathing.cpp index 844ba6cde..2195be8b6 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -48,15 +48,7 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa WaypointChanged = true; NodeReached = false; if (stuck) { - bool partial = false; - bool stuck = false; - auto r = zone->pathing->FindRoute(To, From, partial, stuck); - Route.clear(); - - auto final_node = r.back(); - Route.push_back(final_node); - AdjustRoute(Route, flymode, GetModelOffset()); - return (*Route.begin()).pos; + return HandleStuckPath(To, From); } if (Route.empty()) { @@ -81,15 +73,7 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa NodeReached = false; if (stuck) { - bool partial = false; - bool stuck = false; - auto r = zone->pathing->FindRoute(To, From, partial, stuck); - Route.clear(); - - auto final_node = r.back(); - Route.push_back(final_node); - AdjustRoute(Route, flymode, GetModelOffset()); - return (*Route.begin()).pos; + return HandleStuckPath(To, From); } if (Route.empty()) { @@ -154,15 +138,7 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa WaypointChanged = true; if (stuck) { - bool partial = false; - bool stuck = false; - auto r = zone->pathing->FindRoute(To, From, partial, stuck); - Route.clear(); - - auto final_node = r.back(); - Route.push_back(final_node); - AdjustRoute(Route, flymode, GetModelOffset()); - return (*Route.begin()).pos; + return HandleStuckPath(To, From); } if(Route.empty()) { @@ -207,6 +183,19 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa return To; } +glm::vec3 Mob::HandleStuckPath(const glm::vec3 &To, const glm::vec3 &From) +{ + bool partial = false; + bool stuck = false; + auto r = zone->pathing->FindRoute(To, From, partial, stuck); + Route.clear(); + + auto final_node = r.back(); + Route.push_back(final_node); + AdjustRoute(Route, flymode, GetModelOffset()); + return (*Route.begin()).pos; +} + void CullPoints(std::vector &points) { if (!zone->HasMap()) { return; From cbbfae0cfc7885431d720c2aa8d616a558a6a992 Mon Sep 17 00:00:00 2001 From: KimLS Date: Sun, 17 Sep 2017 13:34:35 -0700 Subject: [PATCH 023/670] Merge master compile fixes --- zone/entity.cpp | 2 +- zone/waypoints.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/zone/entity.cpp b/zone/entity.cpp index 74dd82e4b..81c857d9d 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -648,7 +648,7 @@ void EntityList::AddNPC(NPC *npc, bool SendSpawnPacket, bool dontqueue) parse->EventNPC(EVENT_SPAWN, npc, nullptr, "", 0); - npc->FixZ(1); + npc->FixZ(); uint16 emoteid = npc->GetEmoteID(); if (emoteid != 0) diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index 7e895beeb..0ae09548d 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -757,7 +757,7 @@ void Mob::SendToFixZ(float new_x, float new_y, float new_z) { } } -void Mob::FixZ(int32 z_find_offset /*= 5*/) +void Mob::FixZ() { BenchTimer timer; From d8bbb428d8c247e942bd6fe44736a5d021485ecb Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 18 Jan 2018 15:44:51 -0500 Subject: [PATCH 024/670] Add hatelist removal for far distances and time --- zone/hate_list.cpp | 30 ++++++++++++++++++++++++++++++ zone/hate_list.h | 2 ++ zone/mob_ai.cpp | 4 ++++ 3 files changed, 36 insertions(+) diff --git a/zone/hate_list.cpp b/zone/hate_list.cpp index 10b46a356..01507174f 100644 --- a/zone/hate_list.cpp +++ b/zone/hate_list.cpp @@ -107,6 +107,7 @@ void HateList::SetHateAmountOnEnt(Mob* other, uint32 in_hate, uint32 in_damage) entity->hatelist_damage = in_damage; if (in_hate > 0) entity->stored_hate_amount = in_hate; + entity->last_modified = Timer::GetCurrentTime(); } } @@ -208,6 +209,7 @@ void HateList::AddEntToHateList(Mob *in_entity, int32 in_hate, int32 in_damage, in_entity->CastToClient()->IncrementAggroCount(); } } + entity->last_modified = Timer::GetCurrentTime(); } bool HateList::RemoveEntFromHateList(Mob *in_entity) @@ -646,3 +648,31 @@ void HateList::SpellCast(Mob *caster, uint32 spell_id, float range, Mob* ae_cent iter++; } } + +void HateList::RemoveStaleEntries(int time_ms, float dist) +{ + auto it = list.begin(); + + auto cur_time = Timer::GetCurrentTime(); + + while (it != list.end()) { + auto m = (*it)->entity_on_hatelist; + if (m) { + // 10 mins or distance + if ((cur_time - (*it)->last_modified > time_ms) || hate_owner->CalculateDistance(m->GetX(), m->GetY(), m->GetZ()) > dist) { + parse->EventNPC(EVENT_HATE_LIST, hate_owner->CastToNPC(), m, "0", 0); + + if (m->IsClient()) { + m->CastToClient()->DecrementAggroCount(); + m->CastToClient()->RemoveXTarget(hate_owner, true); + } + + delete (*it); + it = list.erase(it); + continue; + } + } + ++it; + } +} + diff --git a/zone/hate_list.h b/zone/hate_list.h index f0e2b7618..1ffb1eaf8 100644 --- a/zone/hate_list.h +++ b/zone/hate_list.h @@ -31,6 +31,7 @@ struct struct_HateList int32 hatelist_damage; uint32 stored_hate_amount; bool is_entity_frenzy; + uint32 last_modified; // we need to remove this if it gets higher than 10 mins }; class HateList @@ -65,6 +66,7 @@ public: void SetHateOwner(Mob *new_hate_owner) { hate_owner = new_hate_owner; } void SpellCast(Mob *caster, uint32 spell_id, float range, Mob *ae_center = nullptr); void WipeHateList(); + void RemoveStaleEntries(int time_ms, float dist); protected: diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index a05aa1343..920ec8863 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1021,6 +1021,10 @@ void Mob::AI_Process() { if (!(m_PlayerState & static_cast(PlayerState::Aggressive))) SendAddPlayerState(PlayerState::Aggressive); + + // NPCs will forget people after 10 mins of not interacting with them or out of range + // both of these maybe zone specific, hardcoded for now + hate_list.RemoveStaleEntries(600000, 600.0f); // we are prevented from getting here if we are blind and don't have a target in range // from above, so no extra blind checks needed if ((IsRooted() && !GetSpecialAbility(IGNORE_ROOT_AGGRO_RULES)) || IsBlind()) From e7ce79261da095a3f03e2641a20f1d86716a8922 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 18 Jan 2018 15:54:53 -0500 Subject: [PATCH 025/670] Add a timer to rate limit the hatelist check --- zone/mob.cpp | 3 ++- zone/mob.h | 1 + zone/mob_ai.cpp | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/zone/mob.cpp b/zone/mob.cpp index 322bc7658..150469da4 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -115,7 +115,8 @@ Mob::Mob(const char* in_name, fix_z_timer(300), fix_z_timer_engaged(100), attack_anim_timer(1000), - position_update_melee_push_timer(1000) + position_update_melee_push_timer(1000), + mHateListCleanup(3000) { targeted = 0; tar_ndx = 0; diff --git a/zone/mob.h b/zone/mob.h index deb24f640..d5de43e0c 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -1419,6 +1419,7 @@ protected: void AddItemFactionBonus(uint32 pFactionID,int32 bonus); int32 GetItemFactionBonus(uint32 pFactionID); void ClearItemFactionBonuses(); + Timer mHateListCleanup; void CalculateFearPosition(); diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 920ec8863..07e7770b0 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1024,7 +1024,8 @@ void Mob::AI_Process() { // NPCs will forget people after 10 mins of not interacting with them or out of range // both of these maybe zone specific, hardcoded for now - hate_list.RemoveStaleEntries(600000, 600.0f); + if (mHateListCleanup.Check()) + hate_list.RemoveStaleEntries(600000, 600.0f); // we are prevented from getting here if we are blind and don't have a target in range // from above, so no extra blind checks needed if ((IsRooted() && !GetSpecialAbility(IGNORE_ROOT_AGGRO_RULES)) || IsBlind()) From b82100bcd76f2c38e69b0cf3b67c309ab9fa53d3 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 18 Jan 2018 18:30:29 -0500 Subject: [PATCH 026/670] Add IMMUNE_RANGED_ATTACKS This makes them immune to archery/throwing This also needs more work as comments state, but good enough for now --- zone/attack.cpp | 6 ++++++ zone/common.h | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/zone/attack.cpp b/zone/attack.cpp index f9edb46ac..ce96675a0 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -3363,6 +3363,12 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const damage = DMG_INVULNERABLE; } + // this should actually happen MUCH sooner, need to investigate though -- good enough for now + if ((skill_used == EQEmu::skills::SkillArchery || skill_used == EQEmu::skills::SkillThrowing) && GetSpecialAbility(IMMUNE_RANGED_ATTACKS)) { + Log(Logs::Detail, Logs::Combat, "Avoiding %d damage due to IMMUNE_RANGED_ATTACKS.", damage); + damage = DMG_INVULNERABLE; + } + if (spell_id != SPELL_UNKNOWN || attacker == nullptr) avoidable = false; diff --git a/zone/common.h b/zone/common.h index f7b157115..df6b22637 100644 --- a/zone/common.h +++ b/zone/common.h @@ -194,7 +194,8 @@ enum { CASTING_RESIST_DIFF = 43, COUNTER_AVOID_DAMAGE = 44, PROX_AGGRO = 45, - MAX_SPECIAL_ATTACK = 46 + IMMUNE_RANGED_ATTACKS = 46, + MAX_SPECIAL_ATTACK = 47 }; typedef enum { //fear states From a7310cba17afcf6c391a9eb68655b63050b458c7 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 18 Jan 2018 18:33:36 -0500 Subject: [PATCH 027/670] Export new special attack to lua too --- zone/lua_mob.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zone/lua_mob.cpp b/zone/lua_mob.cpp index 8b88ba12f..98ca32569 100644 --- a/zone/lua_mob.cpp +++ b/zone/lua_mob.cpp @@ -2499,7 +2499,8 @@ luabind::scope lua_register_special_abilities() { luabind::value("allow_to_tank", static_cast(ALLOW_TO_TANK)), luabind::value("ignore_root_aggro_rules", static_cast(IGNORE_ROOT_AGGRO_RULES)), luabind::value("casting_resist_diff", static_cast(CASTING_RESIST_DIFF)), - luabind::value("counter_avoid_damage", static_cast(COUNTER_AVOID_DAMAGE)) + luabind::value("counter_avoid_damage", static_cast(COUNTER_AVOID_DAMAGE)), + luabind::value("immune_ranged_attacks", static_cast(IMMUNE_RANGED_ATTACKS)) ]; } From a440269c6bf20eaf6ed67454620fd707470c874f Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 18 Jan 2018 19:59:04 -0500 Subject: [PATCH 028/670] Adjust the behavior of out of range aggro removal This is a bit more accurate --- zone/hate_list.cpp | 17 +++++++++++++++-- zone/hate_list.h | 1 + zone/mob.cpp | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/zone/hate_list.cpp b/zone/hate_list.cpp index 01507174f..8da223b04 100644 --- a/zone/hate_list.cpp +++ b/zone/hate_list.cpp @@ -200,6 +200,7 @@ void HateList::AddEntToHateList(Mob *in_entity, int32 in_hate, int32 in_damage, entity->hatelist_damage = (in_damage >= 0) ? in_damage : 0; entity->stored_hate_amount = in_hate; entity->is_entity_frenzy = in_is_entity_frenzied; + entity->oor_count = 0; list.push_back(entity); parse->EventNPC(EVENT_HATE_LIST, hate_owner->CastToNPC(), in_entity, "1", 0); @@ -658,8 +659,20 @@ void HateList::RemoveStaleEntries(int time_ms, float dist) while (it != list.end()) { auto m = (*it)->entity_on_hatelist; if (m) { - // 10 mins or distance - if ((cur_time - (*it)->last_modified > time_ms) || hate_owner->CalculateDistance(m->GetX(), m->GetY(), m->GetZ()) > dist) { + bool remove = false; + + if (cur_time - (*it)->last_modified > time_ms) + remove = true; + + if (!remove && hate_owner->CalculateDistance(m->GetX(), m->GetY(), m->GetZ()) > dist) { + (*it)->oor_count++; + if ((*it)->oor_count == 2) + remove = true; + } else if ((*it)->oor_count != 0) { + (*it)->oor_count = 0; + } + + if (remove) { parse->EventNPC(EVENT_HATE_LIST, hate_owner->CastToNPC(), m, "0", 0); if (m->IsClient()) { diff --git a/zone/hate_list.h b/zone/hate_list.h index 1ffb1eaf8..0ac1840ac 100644 --- a/zone/hate_list.h +++ b/zone/hate_list.h @@ -31,6 +31,7 @@ struct struct_HateList int32 hatelist_damage; uint32 stored_hate_amount; bool is_entity_frenzy; + int8 oor_count; // count on how long we've been out of range uint32 last_modified; // we need to remove this if it gets higher than 10 mins }; diff --git a/zone/mob.cpp b/zone/mob.cpp index 150469da4..39efb1d3d 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -116,7 +116,7 @@ Mob::Mob(const char* in_name, fix_z_timer_engaged(100), attack_anim_timer(1000), position_update_melee_push_timer(1000), - mHateListCleanup(3000) + mHateListCleanup(6000) { targeted = 0; tar_ndx = 0; From 39a94dba0d2387669cca9070f4e2aee115256a9d Mon Sep 17 00:00:00 2001 From: Uleat Date: Thu, 18 Jan 2018 22:34:23 -0500 Subject: [PATCH 029/670] Fix for installer script bot schema failures --- .../2015_09_30_bots_supplemental.sql | 1305 ++++++++++++++++ .../sql/git/bots/required/2015_09_30_bots.sql | 1309 +++++++++++++++++ 2 files changed, 2614 insertions(+) create mode 100644 utils/sql/git/bots/deprecated/2015_09_30_bots_supplemental.sql diff --git a/utils/sql/git/bots/deprecated/2015_09_30_bots_supplemental.sql b/utils/sql/git/bots/deprecated/2015_09_30_bots_supplemental.sql new file mode 100644 index 000000000..aab94aff3 --- /dev/null +++ b/utils/sql/git/bots/deprecated/2015_09_30_bots_supplemental.sql @@ -0,0 +1,1305 @@ +-- -------------------------------------------------------- +-- Host: 127.0.0.1 +-- Server version: 10.0.22-MariaDB - mariadb.org binary distribution +-- Server OS: Win64 +-- HeidiSQL Version: 9.3.0.4984 +-- -------------------------------------------------------- + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET NAMES utf8mb4 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; + +-- Dumping structure for table peq_raw.bot_spells_entries +DROP TABLE IF EXISTS `bot_spells_entries`; +CREATE TABLE IF NOT EXISTS `bot_spells_entries` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `npc_spells_id` int(11) NOT NULL DEFAULT '0', + `spellid` smallint(5) NOT NULL DEFAULT '0', + `type` int(10) unsigned NOT NULL DEFAULT '0', + `minlevel` tinyint(3) unsigned NOT NULL DEFAULT '0', + `maxlevel` tinyint(3) unsigned NOT NULL DEFAULT '255', + `manacost` smallint(5) NOT NULL DEFAULT '-1', + `recast_delay` int(11) NOT NULL DEFAULT '-1', + `priority` smallint(5) NOT NULL DEFAULT '0', + `resist_adjust` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2048 DEFAULT CHARSET=latin1; + +-- Dumping data for table peq_raw.bot_spells_entries: ~1,270 rows (approximately) +/*!40000 ALTER TABLE `bot_spells_entries` DISABLE KEYS */; +INSERT INTO `bot_spells_entries` (`id`, `npc_spells_id`, `spellid`, `type`, `minlevel`, `maxlevel`, `manacost`, `recast_delay`, `priority`, `resist_adjust`) VALUES + (1, 701, 200, 2, 1, 3, -1, -1, 1, NULL), + (2, 701, 14, 1, 1, 4, -1, -1, 1, NULL), + (3, 701, 201, 1, 1, 1, -1, -1, 1, NULL), + (4, 701, 202, 8, 1, 6, -1, -1, 10, NULL), + (5, 701, 11, 8, 1, 14, -1, -1, 8, NULL), + (6, 701, 207, 16, 1, 28, -1, -1, 1, NULL), + (7, 701, 216, 1, 2, 15, -1, -1, 1, NULL), + (8, 701, 17, 2, 4, 9, -1, -1, 1, NULL), + (9, 701, 560, 1, 5, 13, -1, -1, 1, NULL), + (10, 701, 219, 8, 7, 16, -1, -1, 10, NULL), + (11, 701, 12, 2, 10, 19, -1, -1, 2, NULL), + (12, 701, 485, 8, 11, 16, -1, -1, 7, NULL), + (13, 701, 16, 1, 14, 28, -1, -1, 1, NULL), + (14, 701, 3575, 8, 15, 34, -1, -1, 6, NULL), + (15, 701, 368, 8, 15, 24, -1, -1, 8, NULL), + (16, 701, 123, 1, 16, 30, -1, -1, 1, NULL), + (17, 701, 89, 8, 17, 20, -1, -1, 10, NULL), + (18, 701, 2502, 2, 19, 28, -1, -1, 1, NULL), + (19, 701, 15, 2, 20, 29, -1, -1, 2, NULL), + (20, 701, 4088, 8, 20, 39, -1, -1, 6, NULL), + (21, 701, 486, 8, 21, 30, -1, -1, 10, NULL), + (22, 701, 18, 8, 25, 34, -1, -1, 9, NULL), + (23, 701, 130, 16, 29, 255, -1, -1, 1, NULL), + (24, 701, 2175, 2, 29, 43, -1, -1, 1, NULL), + (25, 701, 329, 1, 29, 43, -1, -1, 1, NULL), + (26, 701, 9, 2, 30, 38, -1, -1, 2, NULL), + (27, 701, 124, 1, 31, 45, -1, -1, 1, NULL), + (28, 701, 487, 8, 31, 39, -1, -1, 10, NULL), + (29, 701, 3576, 8, 35, 61, -1, -1, 7, NULL), + (30, 701, 19, 8, 35, 39, -1, -1, 8, NULL), + (31, 701, 13, 2, 39, 69, -1, -1, 2, NULL), + (32, 701, 3692, 8, 40, 44, -1, -1, 10, NULL), + (33, 701, 4089, 8, 40, 53, -1, -1, 6, NULL), + (34, 701, 1445, 8, 40, 48, -1, -1, 11, NULL), + (35, 701, 1444, 2, 44, 58, -1, -1, 1, NULL), + (36, 701, 672, 1, 44, 53, -1, -1, 1, NULL), + (37, 701, 4053, 8, 45, 59, -1, -1, 10, NULL), + (38, 701, 125, 1, 46, 57, -1, -1, 1, NULL), + (39, 701, 2505, 8, 49, 57, -1, -1, 11, NULL), + (40, 701, 1547, 8, 51, 59, -1, -1, 9, NULL), + (41, 701, 1543, 1, 54, 55, -1, -1, 1, NULL), + (42, 701, 4090, 8, 54, 61, -1, -1, 6, NULL), + (43, 701, 2508, 1, 56, 61, -1, -1, 1, NULL), + (44, 701, 1544, 1, 58, 60, -1, -1, 1, NULL), + (45, 701, 2509, 8, 58, 59, -1, -1, 11, NULL), + (46, 701, 1522, 2, 59, 59, -1, -1, 1, NULL), + (47, 701, 1546, 8, 60, 255, -1, -1, 9, NULL), + (48, 701, 2109, 8, 60, 64, -1, -1, 11, NULL), + (49, 701, 2122, 8, 60, 61, -1, -1, 10, NULL), + (50, 701, 2180, 2, 60, 61, -1, -1, 1, NULL), + (51, 701, 3481, 1, 61, 62, -1, -1, 1, NULL), + (52, 701, 3467, 8, 62, 64, -1, -1, 10, NULL), + (53, 701, 3472, 8, 62, 63, -1, -1, 7, NULL), + (54, 701, 3475, 2, 62, 64, -1, -1, 1, NULL), + (55, 701, 3476, 1, 62, 64, -1, -1, 1, NULL), + (56, 701, 4091, 8, 62, 66, -1, -1, 6, NULL), + (57, 701, 3482, 1, 63, 65, -1, -1, 1, NULL), + (58, 701, 4108, 8, 64, 66, -1, -1, 7, NULL), + (59, 701, 3474, 8, 65, 69, -1, -1, 11, NULL), + (60, 701, 3479, 8, 65, 66, -1, -1, 10, NULL), + (61, 701, 4882, 2, 65, 66, -1, -1, 1, NULL), + (62, 701, 4973, 1, 65, 66, -1, -1, 1, NULL), + (63, 701, 5254, 1, 66, 67, -1, -1, 1, NULL), + (64, 701, 5257, 8, 67, 69, -1, -1, 10, NULL), + (65, 701, 5258, 8, 67, 68, -1, -1, 7, NULL), + (66, 701, 5259, 2, 67, 255, -1, -1, 1, NULL), + (67, 701, 5260, 1, 67, 68, -1, -1, 1, NULL), + (68, 701, 5261, 8, 67, 255, -1, -1, 6, NULL), + (69, 701, 5266, 1, 68, 255, -1, -1, 1, NULL), + (70, 701, 5272, 8, 69, 255, -1, -1, 7, NULL), + (71, 701, 8006, 1, 69, 69, -1, -1, 1, NULL), + (72, 701, 5276, 8, 70, 255, -1, -1, 11, NULL), + (73, 701, 5278, 8, 70, 255, -1, -1, 10, NULL), + (74, 701, 5279, 1, 70, 255, -1, -1, 1, NULL), + (75, 701, 6140, 2, 70, 255, -1, -1, 2, NULL), + (76, 702, 288, 8, 1, 5, -1, -1, 1, NULL), + (77, 702, 372, 1, 1, 7, -1, -1, 3, NULL), + (78, 702, 378, 8, 2, 9, -1, -1, 2, NULL), + (79, 702, 230, 4, 3, 16, -1, -1, 2, NULL), + (80, 702, 376, 1, 4, 4, -1, -1, 3, NULL), + (81, 702, 477, 1, 5, 14, -1, -1, 3, NULL), + (82, 702, 246, 8, 6, 14, -1, -1, 1, NULL), + (83, 702, 656, 1, 8, 23, -1, -1, 3, NULL), + (84, 702, 381, 8, 9, 60, -1, -1, 4, NULL), + (85, 702, 2551, 8, 10, 30, -1, -1, 2, NULL), + (86, 702, 383, 1, 10, 15, -1, -1, 3, NULL), + (87, 702, 48, 512, 11, 33, -1, -1, 1, NULL), + (88, 702, 236, 8, 13, 20, -1, -1, 5, NULL), + (89, 702, 309, 8, 15, 22, -1, -1, 1, NULL), + (90, 702, 657, 1, 15, 25, -1, -1, 3, NULL), + (91, 702, 38, 1, 16, 36, -1, -1, 3, NULL), + (92, 702, 131, 4, 17, 38, -1, -1, 2, NULL), + (93, 702, 22, 1, 17, 17, -1, -1, 3, NULL), + (94, 702, 2552, 1, 18, 27, -1, -1, 3, NULL), + (95, 702, 503, 1, 19, 46, -1, -1, 2, NULL), + (96, 702, 108, 8, 20, 41, -1, -1, 6, NULL), + (97, 702, 387, 8, 21, 29, -1, -1, 5, NULL), + (98, 702, 65, 8, 23, 32, -1, -1, 1, NULL), + (99, 702, 464, 1, 24, 33, -1, -1, 3, NULL), + (100, 702, 2553, 32, 25, 44, -1, -1, 0, NULL), + (101, 702, 465, 1, 26, 42, -1, -1, 3, NULL), + (102, 702, 470, 1, 28, 40, -1, -1, 3, NULL), + (103, 702, 393, 8, 30, 39, -1, -1, 5, NULL), + (104, 702, 1419, 8, 31, 48, -1, -1, 2, NULL), + (105, 702, 66, 8, 33, 43, -1, -1, 1, NULL), + (106, 702, 49, 512, 34, 52, -1, -1, 1, NULL), + (107, 702, 658, 1, 34, 48, -1, -1, 3, NULL), + (108, 702, 466, 1, 37, 57, -1, -1, 3, NULL), + (109, 702, 752, 16, 37, 59, -1, -1, 1, NULL), + (110, 702, 132, 4, 39, 47, -1, -1, 2, NULL), + (111, 702, 3811, 8, 40, 57, -1, -1, 3, NULL), + (112, 702, 394, 8, 40, 51, -1, -1, 5, NULL), + (113, 702, 23, 1, 41, 46, -1, -1, 3, NULL), + (114, 702, 109, 8, 42, 53, -1, -1, 6, NULL), + (115, 702, 659, 1, 43, 59, -1, -1, 3, NULL), + (116, 702, 67, 8, 44, 53, -1, -1, 1, NULL), + (117, 702, 2555, 32, 45, 53, -1, -1, 0, NULL), + (118, 702, 612, 1, 47, 50, -1, -1, 2, NULL), + (119, 702, 755, 1, 47, 59, -1, -1, 3, NULL), + (120, 702, 133, 4, 48, 50, -1, -1, 2, NULL), + (121, 702, 4067, 8, 49, 56, -1, -1, 2, NULL), + (122, 702, 732, 1, 49, 59, -1, -1, 3, NULL), + (123, 702, 1631, 128, 51, 57, -1, -1, 2, NULL), + (124, 702, 1634, 1, 51, 55, -1, -1, 2, NULL), + (125, 702, 1609, 8, 52, 62, -1, -1, 5, NULL), + (126, 702, 1526, 512, 53, 255, -1, -1, 1, NULL), + (127, 702, 1610, 8, 54, 60, -1, -1, 1, NULL), + (128, 702, 2557, 32, 54, 59, -1, -1, 0, NULL), + (129, 702, 3582, 8, 54, 61, -1, -1, 6, NULL), + (130, 702, 1635, 1, 56, 63, -1, -1, 2, NULL), + (131, 702, 4068, 8, 57, 63, -1, -1, 2, NULL), + (132, 702, 1633, 4, 58, 60, -1, -1, 2, NULL), + (133, 702, 1640, 1, 58, 60, -1, -1, 3, NULL), + (134, 702, 2559, 8, 58, 255, -1, -1, 3, NULL), + (135, 702, 2884, 1, 60, 64, -1, -1, 3, NULL), + (136, 702, 2116, 1, 60, 63, -1, -1, 3, NULL), + (137, 702, 2117, 16, 60, 255, -1, -1, 1, NULL), + (138, 702, 2560, 32, 60, 255, -1, -1, 0, NULL), + (139, 702, 2883, 1, 60, 62, -1, -1, 3, NULL), + (140, 702, 3194, 4, 61, 255, -1, -1, 2, NULL), + (141, 702, 3300, 8, 61, 63, -1, -1, 1, NULL), + (142, 702, 3326, 8, 61, 255, -1, -1, 4, NULL), + (143, 702, 3328, 1, 61, 66, -1, -1, 3, NULL), + (144, 702, 3329, 8, 62, 255, -1, -1, 6, NULL), + (145, 702, 3301, 8, 63, 67, -1, -1, 5, NULL), + (146, 702, 3335, 1, 63, 64, -1, -1, 3, NULL), + (147, 702, 3302, 8, 64, 65, -1, -1, 1, NULL), + (148, 702, 4069, 8, 64, 69, -1, -1, 2, NULL), + (149, 702, 4066, 1, 64, 68, -1, -1, 3, NULL), + (150, 702, 3333, 1, 64, 69, -1, -1, 2, NULL), + (151, 702, 4981, 1, 65, 69, -1, -1, 3, NULL), + (152, 702, 3191, 1, 65, 255, -1, -1, 3, NULL), + (153, 702, 5443, 8, 66, 255, -1, -1, 1, NULL), + (154, 702, 5445, 1, 67, 67, -1, -1, 3, NULL), + (155, 702, 5448, 8, 68, 255, -1, -1, 5, NULL), + (156, 702, 5450, 1, 68, 255, -1, -1, 3, NULL), + (157, 702, 5458, 1, 69, 255, -1, -1, 3, NULL), + (158, 702, 5459, 8, 70, 255, -1, -1, 2, NULL), + (159, 702, 8043, 1, 70, 255, -1, -1, 3, NULL), + (160, 702, 5456, 1, 70, 255, -1, -1, 3, NULL), + (161, 703, 288, 8, 1, 7, -1, -1, 1, NULL), + (162, 703, 340, 256, 1, 14, -1, -1, 2, NULL), + (163, 703, 341, 64, 1, 2, -1, -1, 3, NULL), + (164, 703, 338, 32, 1, 3, -1, -1, 0, NULL), + (165, 703, 346, 8, 3, 15, -1, -1, 3, NULL), + (166, 703, 502, 64, 3, 11, -1, -1, 3, NULL), + (167, 703, 344, 128, 4, 10, -1, -1, 1, NULL), + (168, 703, 229, 1, 4, 29, -1, 45, 6, NULL), + (169, 703, 348, 256, 4, 33, -1, -1, 3, NULL), + (170, 703, 491, 32, 4, 7, -1, -1, 0, NULL), + (171, 703, 641, 8, 6, 17, -1, -1, 4, NULL), + (172, 703, 359, 8, 7, 19, -1, -1, 5, NULL), + (173, 703, 246, 8, 8, 15, -1, -1, 1, NULL), + (174, 703, 351, 32, 8, 11, -1, -1, 0, NULL), + (175, 703, 1509, 256, 9, 28, -1, -1, 3, NULL), + (176, 703, 360, 256, 10, 27, -1, -1, 3, NULL), + (177, 703, 2541, 8, 11, 22, -1, -1, 6, NULL), + (178, 703, 355, 128, 11, 26, -1, -1, 1, NULL), + (179, 703, 362, 32, 12, 15, -1, -1, 0, NULL), + (180, 703, 445, 64, 12, 19, -1, -1, 3, NULL), + (181, 703, 367, 256, 13, 38, -1, -1, 3, NULL), + (182, 703, 236, 8, 14, 21, -1, -1, 2, NULL), + (183, 703, 365, 256, 15, 34, -1, -1, 3, NULL), + (184, 703, 309, 8, 16, 20, -1, -1, 1, NULL), + (185, 703, 492, 32, 16, 19, -1, -1, 0, NULL), + (186, 703, 2542, 1, 17, 37, -1, -1, 2, NULL), + (187, 703, 642, 8, 18, 30, -1, -1, 4, NULL), + (188, 703, 199, 16, 20, 57, -1, -1, 1, NULL), + (189, 703, 440, 32, 20, 23, -1, -1, 0, NULL), + (190, 703, 446, 64, 20, 25, -1, -1, 3, NULL), + (191, 703, 204, 1, 21, 31, -1, -1, 5, NULL), + (192, 703, 387, 8, 22, 31, -1, -1, 2, NULL), + (193, 703, 449, 8, 23, 34, -1, -1, 6, NULL), + (194, 703, 493, 32, 24, 28, -1, -1, 0, NULL), + (195, 703, 524, 64, 26, 38, -1, -1, 3, NULL), + (196, 703, 452, 128, 27, 46, -1, -1, 1, NULL), + (197, 703, 451, 256, 28, 46, -1, -1, 3, NULL), + (198, 703, 441, 32, 29, 32, -1, -1, 0, NULL), + (199, 703, 454, 256, 29, 44, -1, -1, 3, NULL), + (200, 703, 127, 1, 30, 55, -1, 45, 6, NULL), + (201, 703, 643, 8, 31, 47, -1, -1, 4, NULL), + (202, 703, 1415, 1, 32, 48, -1, -1, 5, NULL), + (203, 703, 393, 8, 32, 42, -1, -1, 2, NULL), + (204, 703, 494, 32, 33, 38, -1, -1, 0, NULL), + (205, 703, 435, 256, 34, 49, -1, -1, 3, NULL), + (206, 703, 31, 256, 35, 39, -1, -1, 3, NULL), + (207, 703, 661, 8, 35, 54, -1, -1, 6, NULL), + (208, 703, 2544, 1, 38, 255, -1, -1, 2, NULL), + (209, 703, 442, 32, 39, 43, -1, -1, 0, NULL), + (210, 703, 525, 64, 39, 47, -1, -1, 3, NULL), + (211, 703, 4096, 256, 39, 53, -1, -1, 3, NULL), + (212, 703, 1508, 256, 40, 51, -1, -1, 3, NULL), + (213, 703, 394, 8, 43, 51, -1, -1, 2, NULL), + (214, 703, 495, 32, 44, 47, -1, -1, 0, NULL), + (215, 703, 3702, 256, 45, 48, -1, -1, 3, NULL), + (216, 703, 453, 128, 47, 58, -1, -1, 1, NULL), + (217, 703, 6, 256, 47, 57, -1, -1, 3, NULL), + (218, 703, 443, 32, 48, 52, -1, -1, 0, NULL), + (219, 703, 447, 64, 48, 53, -1, -1, 3, NULL), + (220, 703, 644, 8, 48, 55, -1, -1, 4, NULL), + (221, 703, 3571, 1, 49, 53, -1, -1, 5, NULL), + (222, 703, 456, 256, 49, 56, -1, -1, 3, NULL), + (223, 703, 436, 256, 50, 64, -1, -1, 3, NULL), + (224, 703, 1609, 8, 52, 62, -1, -1, 2, NULL), + (225, 703, 32, 256, 52, 55, -1, -1, 3, NULL), + (226, 703, 1621, 32, 53, 55, -1, -1, 0, NULL), + (227, 703, 3572, 1, 54, 59, -1, -1, 5, NULL), + (228, 703, 1613, 64, 54, 58, -1, -1, 3, NULL), + (229, 703, 4097, 256, 54, 62, -1, -1, 3, NULL), + (230, 703, 1414, 8, 55, 61, -1, -1, 6, NULL), + (231, 703, 1527, 1, 56, 56, -1, 45, 6, NULL), + (232, 703, 1611, 8, 56, 59, -1, -1, 4, NULL), + (233, 703, 1615, 256, 56, 66, -1, -1, 3, NULL), + (234, 703, 1622, 32, 56, 58, -1, -1, 0, NULL), + (235, 703, 1616, 256, 57, 59, -1, -1, 3, NULL), + (236, 703, 6980, 1, 57, 61, -1, -1, 6, NULL), + (237, 703, 1612, 16, 58, 255, -1, -1, 1, NULL), + (238, 703, 1617, 256, 58, 59, -1, -1, 3, NULL), + (239, 703, 1619, 128, 59, 62, -1, -1, 1, NULL), + (240, 703, 1623, 32, 59, 60, -1, -1, 0, NULL), + (241, 703, 1618, 64, 59, 59, -1, -1, 3, NULL), + (242, 703, 1393, 64, 60, 60, -1, -1, 3, NULL), + (243, 703, 2114, 8, 60, 63, -1, -1, 4, NULL), + (244, 703, 2115, 1, 60, 60, -1, -1, 5, NULL), + (245, 703, 2550, 256, 60, 64, -1, -1, 3, NULL), + (246, 703, 2885, 256, 60, 64, -1, -1, 3, NULL), + (247, 703, 3032, 64, 61, 66, -1, -1, 3, NULL), + (248, 703, 3035, 1, 61, 65, -1, -1, 5, NULL), + (249, 703, 3304, 32, 61, 62, -1, -1, 0, NULL), + (250, 703, 3305, 8, 62, 66, -1, -1, 6, NULL), + (251, 703, 6981, 1, 62, 66, -1, -1, 6, NULL), + (252, 703, 3301, 8, 63, 68, -1, -1, 2, NULL), + (253, 703, 3309, 128, 63, 67, -1, -1, 1, NULL), + (254, 703, 3310, 32, 63, 64, -1, -1, 0, NULL), + (255, 703, 4098, 256, 63, 66, -1, -1, 3, NULL), + (256, 703, 3311, 8, 64, 64, -1, -1, 4, NULL), + (257, 703, 3303, 256, 65, 68, -1, -1, 3, NULL), + (258, 703, 3314, 32, 65, 66, -1, -1, 0, NULL), + (259, 703, 4889, 256, 65, 255, -1, -1, 3, NULL), + (260, 703, 4890, 256, 65, 68, -1, -1, 3, NULL), + (261, 703, 4978, 8, 65, 69, -1, -1, 4, NULL), + (262, 703, 5420, 1, 66, 255, -1, -1, 5, NULL), + (263, 703, 5419, 64, 67, 69, -1, -1, 3, NULL), + (264, 703, 5424, 256, 67, 255, -1, -1, 3, NULL), + (265, 703, 5425, 8, 67, 255, -1, -1, 6, NULL), + (266, 703, 5431, 32, 67, 69, -1, -1, 0, NULL), + (267, 703, 5432, 256, 67, 69, -1, -1, 3, NULL), + (268, 703, 6982, 1, 67, 255, -1, -1, 6, NULL), + (269, 703, 5430, 128, 68, 255, -1, -1, 1, NULL), + (270, 703, 5428, 8, 69, 255, -1, -1, 2, NULL), + (271, 703, 5437, 256, 69, 69, -1, -1, 3, NULL), + (272, 703, 7999, 256, 69, 255, -1, -1, 3, NULL), + (273, 703, 5438, 32, 70, 255, -1, -1, 0, NULL), + (274, 703, 5441, 256, 70, 255, -1, -1, 3, NULL), + (275, 703, 6143, 64, 70, 255, -1, -1, 3, NULL), + (276, 703, 7994, 256, 70, 255, -1, -1, 3, NULL), + (277, 703, 5434, 8, 70, 255, -1, -1, 4, NULL), + (278, 704, 288, 8, 1, 4, -1, -1, 1, NULL), + (279, 704, 93, 1, 1, 3, -1, -1, 5, NULL), + (280, 704, 315, 32, 2, 5, -1, -1, 0, NULL), + (281, 704, 316, 32, 3, 6, -1, -1, 0, NULL), + (282, 704, 317, 32, 4, 7, -1, -1, 0, NULL), + (283, 704, 94, 1, 4, 4, -1, -1, 5, NULL), + (284, 704, 58, 32, 5, 8, -1, -1, 0, NULL), + (285, 704, 246, 8, 5, 15, -1, -1, 1, NULL), + (286, 704, 322, 1, 5, 14, -1, -1, 5, NULL), + (287, 704, 398, 32, 6, 9, -1, -1, 0, NULL), + (288, 704, 399, 32, 7, 10, -1, -1, 0, NULL), + (289, 704, 324, 1, 7, 22, -1, -1, 6, NULL), + (290, 704, 332, 8, 7, 18, -1, -1, 2, NULL), + (291, 704, 400, 32, 8, 11, -1, -1, 0, NULL), + (292, 704, 397, 32, 9, 12, -1, -1, 0, NULL), + (293, 704, 248, 1, 9, 17, -1, -1, 3, NULL), + (294, 704, 402, 32, 10, 13, -1, -1, 0, NULL), + (295, 704, 403, 32, 11, 14, -1, -1, 0, NULL), + (296, 704, 327, 8, 11, 28, -1, -1, 3, NULL), + (297, 704, 404, 32, 12, 15, -1, -1, 0, NULL), + (298, 704, 333, 8, 12, 24, -1, -1, 4, NULL), + (299, 704, 401, 32, 13, 16, -1, -1, 0, NULL), + (300, 704, 336, 32, 14, 17, -1, -1, 0, NULL), + (301, 704, 395, 32, 15, 18, -1, -1, 0, NULL), + (302, 704, 334, 1, 15, 17, -1, -1, 5, NULL), + (303, 704, 396, 32, 16, 19, -1, -1, 0, NULL), + (304, 704, 309, 8, 16, 23, -1, -1, 1, NULL), + (305, 704, 335, 32, 17, 20, -1, -1, 0, NULL), + (306, 704, 497, 32, 18, 21, -1, -1, 0, NULL), + (307, 704, 68, 1, 18, 30, -1, -1, 5, NULL), + (308, 704, 663, 1, 18, 24, -1, -1, 3, NULL), + (309, 704, 498, 32, 19, 22, -1, -1, 0, NULL), + (310, 704, 411, 8, 19, 27, -1, -1, 2, NULL), + (311, 704, 499, 32, 20, 23, -1, -1, 0, NULL), + (312, 704, 496, 32, 21, 24, -1, -1, 0, NULL), + (313, 704, 570, 32, 22, 25, -1, -1, 0, NULL), + (314, 704, 571, 32, 23, 26, -1, -1, 0, NULL), + (315, 704, 113, 1, 23, 40, -1, -1, 6, NULL), + (316, 704, 572, 32, 24, 27, -1, -1, 0, NULL), + (317, 704, 65, 8, 24, 31, -1, -1, 1, NULL), + (318, 704, 569, 32, 25, 28, -1, -1, 0, NULL), + (319, 704, 115, 1, 25, 27, -1, -1, 3, NULL), + (320, 704, 81, 8, 25, 40, -1, -1, 4, NULL), + (321, 704, 574, 32, 26, 30, -1, -1, 0, NULL), + (322, 704, 575, 32, 27, 31, -1, -1, 0, NULL), + (323, 704, 576, 32, 28, 32, -1, -1, 0, NULL), + (324, 704, 479, 8, 28, 37, -1, -1, 2, NULL), + (325, 704, 664, 1, 28, 47, -1, -1, 3, NULL), + (326, 704, 106, 8, 28, 46, -1, -1, 3, NULL), + (327, 704, 573, 32, 29, 33, -1, -1, 0, NULL), + (328, 704, 1400, 32, 30, 49, -1, -1, 0, NULL), + (329, 704, 621, 32, 31, 35, -1, -1, 0, NULL), + (330, 704, 120, 1, 31, 32, -1, -1, 5, NULL), + (331, 704, 622, 32, 32, 36, -1, -1, 0, NULL), + (332, 704, 49, 512, 32, 52, -1, -1, 3, NULL), + (333, 704, 66, 8, 32, 42, -1, -1, 1, NULL), + (334, 704, 623, 32, 33, 37, -1, -1, 0, NULL), + (335, 704, 69, 1, 33, 46, -1, -1, 5, NULL), + (336, 704, 620, 32, 34, 38, -1, -1, 0, NULL), + (337, 704, 625, 32, 36, 40, -1, -1, 0, NULL), + (338, 704, 626, 32, 37, 41, -1, -1, 0, NULL), + (339, 704, 627, 32, 38, 42, -1, -1, 0, NULL), + (340, 704, 680, 8, 38, 44, -1, -1, 2, NULL), + (341, 704, 624, 32, 39, 43, -1, -1, 0, NULL), + (342, 704, 629, 32, 41, 48, -1, -1, 0, NULL), + (343, 704, 114, 1, 41, 56, -1, -1, 6, NULL), + (344, 704, 82, 8, 41, 51, -1, -1, 4, NULL), + (345, 704, 630, 32, 42, 46, -1, -1, 0, NULL), + (346, 704, 631, 32, 43, 47, -1, -1, 0, NULL), + (347, 704, 1403, 1, 43, 54, -1, -1, 4, NULL), + (348, 704, 67, 8, 43, 53, -1, -1, 1, NULL), + (349, 704, 628, 32, 44, 45, -1, -1, 0, NULL), + (350, 704, 412, 8, 45, 52, -1, -1, 2, NULL), + (351, 704, 632, 32, 46, 50, -1, -1, 0, NULL), + (352, 704, 4079, 8, 46, 57, -1, -1, 5, NULL), + (353, 704, 634, 32, 47, 51, -1, -1, 0, NULL), + (354, 704, 107, 8, 47, 51, -1, -1, 3, NULL), + (355, 704, 70, 1, 47, 51, -1, -1, 5, NULL), + (356, 704, 635, 32, 48, 52, -1, -1, 0, NULL), + (357, 704, 116, 1, 48, 55, -1, -1, 3, NULL), + (358, 704, 633, 32, 49, 53, -1, -1, 0, NULL), + (359, 704, 1402, 32, 50, 59, -1, -1, 0, NULL), + (360, 704, 1671, 32, 51, 56, -1, -1, 0, NULL), + (361, 704, 1673, 32, 52, 57, -1, -1, 0, NULL), + (362, 704, 1660, 1, 52, 58, -1, -1, 5, NULL), + (363, 704, 1666, 8, 52, 53, -1, -1, 4, NULL), + (364, 704, 3700, 8, 52, 54, -1, -1, 3, NULL), + (365, 704, 1674, 32, 53, 58, -1, -1, 0, NULL), + (366, 704, 1526, 512, 53, 255, -1, -1, 3, NULL), + (367, 704, 1668, 8, 53, 55, -1, -1, 2, NULL), + (368, 704, 1672, 32, 54, 59, -1, -1, 0, NULL), + (369, 704, 1610, 8, 54, 60, -1, -1, 1, NULL), + (370, 704, 2879, 8, 54, 57, -1, -1, 4, NULL), + (371, 704, 1405, 1, 55, 255, -1, -1, 4, NULL), + (372, 704, 1472, 8, 55, 59, -1, -1, 3, NULL), + (373, 704, 1529, 1, 56, 63, -1, -1, 3, NULL), + (374, 704, 1667, 8, 56, 59, -1, -1, 2, NULL), + (375, 704, 1675, 32, 57, 64, -1, -1, 0, NULL), + (376, 704, 1663, 1, 57, 62, -1, -1, 6, NULL), + (377, 704, 1677, 32, 58, 62, -1, -1, 0, NULL), + (378, 704, 2539, 8, 58, 61, -1, -1, 4, NULL), + (379, 704, 4080, 8, 58, 63, -1, -1, 5, NULL), + (380, 704, 1678, 32, 59, 60, -1, -1, 0, NULL), + (381, 704, 1664, 1, 59, 60, -1, -1, 5, NULL), + (382, 704, 1404, 32, 60, 64, -1, -1, 0, NULL), + (383, 704, 1676, 32, 60, 61, -1, -1, 0, NULL), + (384, 704, 1669, 8, 60, 60, -1, -1, 2, NULL), + (385, 704, 2119, 8, 60, 61, -1, -1, 3, NULL), + (386, 704, 3317, 32, 61, 65, -1, -1, 0, NULL), + (387, 704, 3198, 8, 61, 62, -1, -1, 2, NULL), + (388, 704, 3300, 8, 61, 63, -1, -1, 1, NULL), + (389, 704, 3318, 1, 61, 65, -1, -1, 5, NULL), + (390, 704, 3320, 32, 62, 66, -1, -1, 0, NULL), + (391, 704, 3031, 8, 62, 67, -1, -1, 4, NULL), + (392, 704, 3237, 8, 62, 68, -1, -1, 3, NULL), + (393, 704, 3322, 32, 63, 67, -1, -1, 0, NULL), + (394, 704, 3486, 8, 63, 65, -1, -1, 2, NULL), + (395, 704, 3321, 1, 63, 67, -1, -1, 6, NULL), + (396, 704, 3238, 1, 64, 68, -1, -1, 3, NULL), + (397, 704, 3302, 8, 64, 65, -1, -1, 1, NULL), + (398, 704, 4081, 8, 64, 68, -1, -1, 5, NULL), + (399, 704, 4888, 32, 65, 255, -1, -1, 0, NULL), + (400, 704, 3324, 32, 65, 69, -1, -1, 0, NULL), + (401, 704, 5473, 32, 66, 255, -1, -1, 0, NULL), + (402, 704, 5466, 8, 66, 69, -1, -1, 2, NULL), + (403, 704, 5472, 8, 66, 255, -1, -1, 1, NULL), + (404, 704, 5474, 1, 66, 255, -1, -1, 5, NULL), + (405, 704, 5480, 32, 67, 255, -1, -1, 0, NULL), + (406, 704, 5485, 32, 68, 255, -1, -1, 0, NULL), + (407, 704, 5476, 8, 68, 255, -1, -1, 4, NULL), + (408, 704, 5484, 1, 68, 255, -1, -1, 6, NULL), + (409, 704, 5478, 8, 69, 255, -1, -1, 3, NULL), + (410, 704, 5490, 1, 69, 255, -1, -1, 3, NULL), + (411, 704, 5494, 8, 69, 255, -1, -1, 5, NULL), + (412, 704, 5495, 32, 70, 255, -1, -1, 0, NULL), + (413, 704, 5488, 8, 70, 255, -1, -1, 2, NULL), + (414, 705, 288, 8, 1, 5, -1, -1, 1, NULL), + (415, 705, 40, 8, 1, 18, -1, -1, 2, NULL), + (416, 705, 289, 1, 1, 6, -1, -1, 7, NULL), + (417, 705, 286, 1, 1, 3, -1, -1, 6, NULL), + (418, 705, 285, 32, 1, 1, -1, -1, 0, NULL), + (419, 705, 681, 32, 2, 6, -1, -1, 0, NULL), + (420, 705, 294, 1, 4, 10, -1, -1, 6, NULL), + (421, 705, 246, 8, 6, 15, -1, -1, 1, NULL), + (422, 705, 295, 32, 7, 8, -1, -1, 0, NULL), + (423, 705, 296, 1, 7, 15, -1, -1, 7, NULL), + (424, 705, 48, 512, 7, 21, -1, -1, 7, NULL), + (425, 705, 302, 1, 9, 22, -1, -1, 2, NULL), + (426, 705, 303, 1, 9, 27, -1, -1, 5, NULL), + (427, 705, 682, 32, 9, 13, -1, -1, 0, NULL), + (428, 705, 2561, 8, 11, 16, -1, -1, 4, NULL), + (429, 705, 521, 1, 11, 25, -1, -1, 6, NULL), + (430, 705, 683, 32, 14, 16, -1, -1, 0, NULL), + (431, 705, 697, 8, 14, 25, -1, -1, 5, NULL), + (432, 705, 39, 8, 15, 20, -1, -1, 6, NULL), + (433, 705, 309, 8, 16, 22, -1, -1, 1, NULL), + (434, 705, 306, 1, 16, 20, -1, -1, 7, NULL), + (435, 705, 2562, 8, 17, 29, -1, -1, 4, NULL), + (436, 705, 684, 32, 17, 21, -1, -1, 0, NULL), + (437, 705, 170, 8, 21, 38, -1, -1, 6, NULL), + (438, 705, 350, 1, 21, 31, -1, -1, 7, NULL), + (439, 705, 24, 512, 22, 27, -1, -1, 7, NULL), + (440, 705, 685, 32, 22, 28, -1, -1, 0, NULL), + (441, 705, 185, 1, 23, 40, -1, -1, 2, NULL), + (442, 705, 65, 8, 23, 30, -1, -1, 1, NULL), + (443, 705, 174, 8, 26, 41, -1, -1, 5, NULL), + (444, 705, 450, 1, 26, 46, -1, -1, 6, NULL), + (445, 705, 49, 512, 28, 41, -1, -1, 7, NULL), + (446, 705, 619, 1, 28, 60, -1, -1, 5, NULL), + (447, 705, 4073, 8, 29, 43, -1, -1, 2, NULL), + (448, 705, 686, 32, 29, 30, -1, -1, 0, NULL), + (449, 705, 74, 1, 30, 49, -1, -1, 7, NULL), + (450, 705, 66, 8, 31, 39, -1, -1, 1, NULL), + (451, 705, 687, 32, 31, 36, -1, -1, 0, NULL), + (452, 705, 71, 1, 32, 42, -1, -1, 7, NULL), + (453, 705, 1408, 8, 34, 54, -1, -1, 3, NULL), + (454, 705, 688, 32, 37, 40, -1, -1, 0, NULL), + (455, 705, 171, 8, 39, 46, -1, -1, 7, NULL), + (456, 705, 1474, 8, 40, 62, -1, -1, 1, NULL), + (457, 705, 186, 1, 41, 56, -1, -1, 2, NULL), + (458, 705, 689, 32, 41, 47, -1, -1, 0, NULL), + (459, 705, 1694, 8, 42, 51, -1, -1, 5, NULL), + (460, 705, 25, 512, 42, 52, -1, -1, 7, NULL), + (461, 705, 673, 1, 43, 53, -1, -1, 7, NULL), + (462, 705, 4074, 1, 44, 54, -1, -1, 2, NULL), + (463, 705, 172, 8, 47, 52, -1, -1, 6, NULL), + (464, 705, 195, 1, 47, 58, -1, -1, 6, NULL), + (465, 705, 690, 32, 48, 54, -1, -1, 0, NULL), + (466, 705, 1686, 1, 50, 255, -1, -1, 7, NULL), + (467, 705, 1693, 8, 52, 55, -1, -1, 5, NULL), + (468, 705, 1697, 512, 53, 255, -1, -1, 7, NULL), + (469, 705, 1708, 8, 53, 57, -1, -1, 6, NULL), + (470, 705, 1698, 1, 54, 255, -1, -1, 7, NULL), + (471, 705, 1723, 32, 55, 61, -1, -1, 0, NULL), + (472, 705, 4075, 8, 55, 62, -1, -1, 2, NULL), + (473, 705, 1409, 8, 55, 59, -1, -1, 3, NULL), + (474, 705, 1695, 8, 56, 59, -1, -1, 5, NULL), + (475, 705, 1712, 1, 57, 68, -1, -1, 2, NULL), + (476, 705, 1709, 8, 58, 59, -1, -1, 6, NULL), + (477, 705, 1703, 1, 59, 61, -1, -1, 6, NULL), + (478, 705, 1710, 8, 60, 61, -1, -1, 6, NULL), + (479, 705, 2570, 8, 60, 62, -1, -1, 5, NULL), + (480, 705, 6739, 8, 61, 66, -1, -1, 4, NULL), + (481, 705, 3199, 8, 61, 65, -1, -1, 3, NULL), + (482, 705, 3229, 16, 61, 255, -1, -1, 1, NULL), + (483, 705, 3034, 32, 62, 65, -1, -1, 0, NULL), + (484, 705, 3240, 8, 62, 64, -1, -1, 6, NULL), + (485, 705, 3345, 1, 62, 68, -1, -1, 6, NULL), + (486, 705, 3350, 8, 63, 64, -1, -1, 5, NULL), + (487, 705, 4076, 8, 63, 67, -1, -1, 2, NULL), + (488, 705, 3241, 8, 63, 255, -1, -1, 1, NULL), + (489, 705, 3178, 8, 65, 66, -1, -1, 6, NULL), + (490, 705, 3360, 8, 65, 67, -1, -1, 5, NULL), + (491, 705, 5500, 8, 66, 255, -1, -1, 3, NULL), + (492, 705, 5505, 32, 66, 255, -1, -1, 0, NULL), + (493, 705, 5504, 8, 67, 68, -1, -1, 4, NULL), + (494, 705, 5507, 8, 67, 69, -1, -1, 6, NULL), + (495, 705, 5513, 8, 68, 69, -1, -1, 5, NULL), + (496, 705, 5515, 8, 68, 69, -1, -1, 2, NULL), + (497, 705, 5509, 1, 69, 255, -1, -1, 6, NULL), + (498, 705, 6671, 8, 69, 255, -1, -1, 4, NULL), + (499, 705, 6826, 1, 69, 255, -1, -1, 2, NULL), + (500, 705, 5517, 8, 70, 255, -1, -1, 2, NULL), + (501, 705, 5521, 8, 70, 255, -1, -1, 6, NULL), + (502, 705, 5522, 8, 70, 255, -1, -1, 5, NULL), + (503, 706, 266, 8, 1, 20, -1, -1, 1, NULL), + (504, 706, 40, 8, 1, 7, -1, -1, 2, NULL), + (505, 706, 267, 8, 1, 31, -1, -1, 3, NULL), + (506, 706, 93, 1, 1, 3, -1, -1, 1, NULL), + (507, 706, 200, 2, 1, 18, -1, -1, 2, NULL), + (508, 706, 274, 8, 3, 10, -1, -1, 9, NULL), + (509, 706, 269, 8, 3, 17, -1, -1, 10, NULL), + (510, 706, 275, 1, 4, 13, -1, -1, 5, NULL), + (511, 706, 75, 256, 4, 14, -1, -1, 4, NULL), + (512, 706, 270, 256, 5, 12, -1, -1, 2, NULL), + (513, 706, 279, 8, 6, 21, -1, -1, 11, NULL), + (514, 706, 2521, 8, 8, 17, -1, -1, 2, NULL), + (515, 706, 277, 256, 8, 23, -1, -1, 4, NULL), + (516, 706, 17, 2, 9, 18, -1, -1, 2, NULL), + (517, 706, 283, 8, 11, 19, -1, -1, 9, NULL), + (518, 706, 281, 1, 12, 28, -1, -1, 3, NULL), + (519, 706, 505, 1, 13, 26, -1, -1, 2, NULL), + (520, 706, 365, 256, 15, 18, -1, -1, 4, NULL), + (521, 706, 282, 1, 14, 22, -1, -1, 5, NULL), + (522, 706, 526, 1, 17, 37, -1, -1, 4, NULL), + (523, 706, 110, 1, 18, 31, -1, -1, 1, NULL), + (524, 706, 147, 8, 18, 27, -1, -1, 2, NULL), + (525, 706, 148, 8, 18, 30, -1, -1, 10, NULL), + (526, 706, 12, 2, 19, 28, -1, -1, 2, NULL), + (527, 706, 511, 256, 19, 30, -1, -1, 4, NULL), + (528, 706, 649, 8, 20, 25, -1, -1, 9, NULL), + (529, 706, 146, 8, 21, 24, -1, -1, 1, NULL), + (530, 706, 149, 8, 21, 29, -1, -1, 11, NULL), + (531, 706, 144, 8, 23, 38, -1, -1, 12, NULL), + (532, 706, 508, 1, 23, 32, -1, -1, 5, NULL), + (533, 706, 434, 256, 24, 36, -1, -1, 4, NULL), + (534, 706, 349, 8, 25, 38, -1, -1, 1, NULL), + (535, 706, 39, 8, 26, 41, -1, -1, 9, NULL), + (536, 706, 506, 1, 27, 37, -1, -1, 2, NULL), + (537, 706, 151, 8, 28, 34, -1, -1, 2, NULL), + (538, 706, 15, 2, 29, 50, -1, -1, 2, NULL), + (539, 706, 162, 1, 29, 40, -1, -1, 3, NULL), + (540, 706, 161, 8, 30, 42, -1, -1, 11, NULL), + (541, 706, 160, 8, 31, 40, -1, -1, 10, NULL), + (542, 706, 31, 256, 31, 48, -1, -1, 4, NULL), + (543, 706, 111, 1, 32, 47, -1, -1, 1, NULL), + (544, 706, 164, 32, 32, 36, -1, -1, 0, NULL), + (545, 706, 1428, 8, 35, 38, -1, -1, 2, NULL), + (546, 706, 435, 256, 37, 48, -1, -1, 4, NULL), + (547, 706, 577, 32, 37, 40, -1, -1, 0, NULL), + (548, 706, 507, 1, 38, 50, -1, -1, 2, NULL), + (549, 706, 527, 1, 38, 51, -1, -1, 4, NULL), + (550, 706, 145, 8, 39, 51, -1, -1, 12, NULL), + (551, 706, 152, 8, 39, 47, -1, -1, 1, NULL), + (552, 706, 153, 8, 39, 45, -1, -1, 2, NULL), + (553, 706, 154, 8, 41, 52, -1, -1, 10, NULL), + (554, 706, 163, 1, 41, 52, -1, -1, 3, NULL), + (555, 706, 165, 32, 41, 44, -1, -1, 0, NULL), + (556, 706, 170, 8, 42, 55, -1, -1, 9, NULL), + (557, 706, 158, 8, 43, 53, -1, -1, 11, NULL), + (558, 706, 3694, 1024, 44, 59, -1, -1, 5, NULL), + (559, 706, 754, 1024, 44, 53, -1, -1, 6, NULL), + (560, 706, 166, 32, 45, 54, -1, -1, 0, NULL), + (561, 706, 159, 8, 46, 56, -1, -1, 2, NULL), + (562, 706, 112, 1, 48, 56, -1, -1, 1, NULL), + (563, 706, 157, 8, 48, 57, -1, -1, 1, NULL), + (564, 706, 32, 256, 49, 58, -1, -1, 4, NULL), + (565, 706, 436, 256, 49, 55, -1, -1, 4, NULL), + (566, 706, 1588, 1, 51, 64, -1, -1, 2, NULL), + (567, 706, 9, 2, 51, 54, -1, -1, 2, NULL), + (568, 706, 1568, 8, 52, 55, -1, -1, 12, NULL), + (569, 706, 1573, 1, 52, 62, -1, -1, 4, NULL), + (570, 706, 1592, 1, 53, 65, -1, -1, 3, NULL), + (571, 706, 1594, 8, 53, 56, -1, -1, 10, NULL), + (572, 706, 1595, 8, 54, 56, -1, -1, 11, NULL), + (573, 706, 1572, 1024, 54, 57, -1, -1, 6, NULL), + (574, 706, 1290, 2, 55, 57, -1, -1, 3, NULL), + (575, 706, 1574, 32, 55, 60, -1, -1, 0, NULL), + (576, 706, 171, 8, 56, 62, -1, -1, 9, NULL), + (577, 706, 2528, 8, 56, 60, -1, -1, 12, NULL), + (578, 706, 1590, 256, 56, 59, -1, -1, 4, NULL), + (579, 706, 1580, 8, 57, 61, -1, -1, 11, NULL), + (580, 706, 1577, 1, 57, 59, -1, -1, 1, NULL), + (581, 706, 1593, 8, 57, 57, -1, -1, 2, NULL), + (582, 706, 1579, 8, 57, 60, -1, -1, 10, NULL), + (583, 706, 1596, 8, 58, 58, -1, -1, 1, NULL), + (584, 706, 1581, 8, 58, 59, -1, -1, 2, NULL), + (585, 706, 1332, 1024, 58, 64, -1, -1, 6, NULL), + (586, 706, 1583, 8, 59, 59, -1, -1, 1, NULL), + (587, 706, 1591, 256, 59, 63, -1, -1, 4, NULL), + (588, 706, 2112, 8, 60, 64, -1, -1, 2, NULL), + (589, 706, 2530, 8, 60, 61, -1, -1, 1, NULL), + (590, 706, 2113, 256, 60, 64, -1, -1, 4, NULL), + (591, 706, 1578, 1, 60, 62, -1, -1, 1, NULL), + (592, 706, 1576, 1024, 60, 64, -1, -1, 5, NULL), + (593, 706, 3378, 8, 61, 61, -1, -1, 10, NULL), + (594, 706, 3433, 8, 61, 62, -1, -1, 12, NULL), + (595, 706, 3377, 32, 61, 66, -1, -1, 0, NULL), + (596, 706, 3235, 8, 62, 64, -1, -1, 1, NULL), + (597, 706, 3383, 8, 62, 67, -1, -1, 10, NULL), + (598, 706, 3382, 8, 62, 62, -1, -1, 11, NULL), + (599, 706, 3233, 2, 62, 64, -1, -1, 2, NULL), + (600, 706, 172, 8, 63, 63, -1, -1, 9, NULL), + (601, 706, 3389, 8, 63, 67, -1, -1, 11, NULL), + (602, 706, 3441, 8, 63, 65, -1, -1, 12, NULL), + (603, 706, 3386, 1, 63, 65, -1, -1, 4, NULL), + (604, 706, 3387, 1, 63, 64, -1, -1, 1, NULL), + (605, 706, 3391, 8, 64, 255, -1, -1, 9, NULL), + (606, 706, 3394, 256, 64, 66, -1, -1, 4, NULL), + (607, 706, 3397, 8, 65, 67, -1, -1, 1, NULL), + (608, 706, 3399, 8, 65, 69, -1, -1, 2, NULL), + (609, 706, 3396, 256, 65, 69, -1, -1, 4, NULL), + (610, 706, 4900, 1, 65, 68, -1, -1, 2, NULL), + (611, 706, 3395, 1, 65, 255, -1, -1, 1, NULL), + (612, 706, 4901, 2, 65, 67, -1, -1, 2, NULL), + (613, 706, 4899, 1024, 65, 69, -1, -1, 5, NULL), + (614, 706, 4979, 1024, 65, 69, -1, -1, 6, NULL), + (615, 706, 5393, 8, 66, 68, -1, -1, 12, NULL), + (616, 706, 5394, 1, 66, 255, -1, -1, 3, NULL), + (617, 706, 5392, 1, 66, 255, -1, -1, 4, NULL), + (618, 706, 5411, 256, 67, 255, -1, -1, 4, NULL), + (619, 706, 5389, 32, 67, 255, -1, -1, 0, NULL), + (620, 706, 5396, 8, 68, 69, -1, -1, 1, NULL), + (621, 706, 5398, 8, 68, 68, -1, -1, 11, NULL), + (622, 706, 5395, 2, 68, 69, -1, -1, 2, NULL), + (623, 706, 5399, 8, 68, 255, -1, -1, 10, NULL), + (624, 706, 5405, 8, 69, 255, -1, -1, 11, NULL), + (625, 706, 5406, 8, 69, 255, -1, -1, 12, NULL), + (626, 706, 6827, 1, 69, 255, -1, -1, 2, NULL), + (627, 706, 5416, 1024, 70, 255, -1, -1, 5, NULL), + (628, 706, 5418, 1024, 70, 255, -1, -1, 6, NULL), + (629, 706, 5415, 8, 70, 255, -1, -1, 1, NULL), + (630, 706, 5417, 8, 70, 255, -1, -1, 2, NULL), + (631, 706, 5414, 256, 70, 255, -1, -1, 4, NULL), + (632, 706, 6142, 2, 70, 255, -1, -1, 2, NULL), + (633, 707, 239, 256, 1, 24, -1, -1, 2, NULL), + (634, 707, 242, 128, 1, 25, -1, -1, 1, NULL), + (635, 707, 93, 1, 1, 2, -1, -1, 3, NULL), + (636, 707, 200, 2, 1, 8, -1, -1, 2, NULL), + (637, 707, 248, 1, 2, 12, -1, -1, 2, NULL), + (638, 707, 253, 1, 3, 15, -1, -1, 3, NULL), + (639, 707, 92, 1, 3, 7, -1, -1, 3, NULL), + (640, 707, 256, 8, 7, 16, -1, -1, 1, NULL), + (641, 707, 515, 8, 7, 16, -1, -1, 8, NULL), + (642, 707, 91, 1, 8, 27, -1, -1, 3, NULL), + (643, 707, 17, 2, 9, 18, -1, -1, 2, NULL), + (644, 707, 264, 256, 10, 31, -1, -1, 2, NULL), + (645, 707, 663, 1, 13, 22, -1, -1, 2, NULL), + (646, 707, 520, 1, 16, 29, -1, -1, 3, NULL), + (647, 707, 273, 8, 17, 26, -1, -1, 1, NULL), + (648, 707, 516, 8, 17, 26, -1, -1, 8, NULL), + (649, 707, 12, 2, 19, 28, -1, -1, 2, NULL), + (650, 707, 115, 1, 23, 32, -1, -1, 2, NULL), + (651, 707, 99, 256, 24, 33, -1, -1, 2, NULL), + (652, 707, 78, 256, 25, 36, -1, -1, 2, NULL), + (653, 707, 512, 128, 26, 60, -1, -1, 1, NULL), + (654, 707, 129, 8, 27, 36, -1, -1, 1, NULL), + (655, 707, 517, 8, 27, 36, -1, -1, 8, NULL), + (656, 707, 217, 1, 28, 37, -1, -1, 3, NULL), + (657, 707, 15, 2, 29, 43, -1, -1, 2, NULL), + (658, 707, 1439, 1, 30, 55, -1, -1, 3, NULL), + (659, 707, 259, 256, 32, 39, -1, -1, 2, NULL), + (660, 707, 664, 1, 33, 42, -1, -1, 2, NULL), + (661, 707, 144, 8, 34, 38, -1, -1, 7, NULL), + (662, 707, 1437, 256, 37, 60, -1, -1, 2, NULL), + (663, 707, 432, 8, 37, 46, -1, -1, 1, NULL), + (664, 707, 518, 8, 37, 46, -1, -1, 8, NULL), + (665, 707, 57, 1, 38, 47, -1, -1, 3, NULL), + (666, 707, 137, 8, 39, 41, -1, -1, 7, NULL), + (667, 707, 665, 256, 40, 52, -1, -1, 2, NULL), + (668, 707, 427, 8, 40, 53, -1, -1, 9, NULL), + (669, 707, 1436, 256, 42, 61, -1, -1, 2, NULL), + (670, 707, 145, 8, 42, 44, -1, -1, 7, NULL), + (671, 707, 116, 1, 43, 54, -1, -1, 2, NULL), + (672, 707, 3834, 2, 44, 50, -1, -1, 2, NULL), + (673, 707, 138, 8, 45, 53, -1, -1, 7, NULL), + (674, 707, 29, 1, 47, 54, -1, -1, 3, NULL), + (675, 707, 356, 8, 47, 48, -1, -1, 1, NULL), + (676, 707, 519, 8, 47, 55, -1, -1, 8, NULL), + (677, 707, 671, 1, 48, 53, -1, -1, 3, NULL), + (678, 707, 1727, 8, 49, 57, -1, -1, 1, NULL), + (679, 707, 4104, 256, 49, 255, -1, -1, 2, NULL), + (680, 707, 1562, 8, 54, 59, -1, -1, 9, NULL), + (681, 707, 9, 2, 51, 54, -1, -1, 2, NULL), + (682, 707, 1600, 256, 52, 61, -1, -1, 2, NULL), + (683, 707, 1601, 256, 53, 62, -1, -1, 2, NULL), + (684, 707, 1568, 8, 54, 57, -1, -1, 7, NULL), + (685, 707, 1603, 1, 54, 58, -1, -1, 3, NULL), + (686, 707, 1290, 2, 55, 59, -1, -1, 2, NULL), + (687, 707, 1529, 1, 55, 64, -1, -1, 2, NULL), + (688, 707, 1605, 1, 55, 59, -1, -1, 3, NULL), + (689, 707, 4105, 256, 55, 255, -1, -1, 2, NULL), + (690, 707, 1558, 8, 56, 63, -1, -1, 8, NULL), + (691, 707, 1604, 1, 56, 60, -1, -1, 3, NULL), + (692, 707, 1560, 8, 58, 58, -1, -1, 1, NULL), + (693, 707, 1569, 8, 58, 59, -1, -1, 7, NULL), + (694, 707, 1561, 8, 59, 59, -1, -1, 1, NULL), + (695, 707, 1607, 1, 59, 59, -1, -1, 3, NULL), + (696, 707, 1563, 8, 60, 255, -1, -1, 9, NULL), + (697, 707, 1291, 2, 60, 62, -1, -1, 2, NULL), + (698, 707, 2125, 8, 60, 62, -1, -1, 1, NULL), + (699, 707, 2126, 1, 60, 63, -1, -1, 3, NULL), + (700, 707, 2520, 8, 60, 60, -1, -1, 7, NULL), + (701, 707, 2877, 1, 60, 64, -1, -1, 3, NULL), + (702, 707, 3433, 8, 61, 62, -1, -1, 7, NULL), + (703, 707, 3434, 1, 61, 65, -1, -1, 3, NULL), + (704, 707, 5572, 128, 61, 68, -1, -1, 1, NULL), + (705, 707, 3437, 256, 62, 63, -1, -1, 2, NULL), + (706, 707, 3440, 256, 62, 64, -1, -1, 2, NULL), + (707, 707, 3441, 8, 63, 65, -1, -1, 7, NULL), + (708, 707, 3443, 2, 63, 65, -1, -1, 2, NULL), + (709, 707, 3446, 256, 63, 67, -1, -1, 2, NULL), + (710, 707, 3448, 8, 63, 64, -1, -1, 1, NULL), + (711, 707, 3444, 8, 64, 255, -1, -1, 8, NULL), + (712, 707, 3449, 1, 64, 64, -1, -1, 3, NULL), + (713, 707, 4106, 256, 64, 255, -1, -1, 2, NULL), + (714, 707, 3238, 1, 65, 67, -1, -1, 2, NULL), + (715, 707, 3295, 8, 65, 66, -1, -1, 1, NULL), + (716, 707, 4974, 1, 65, 66, -1, -1, 3, NULL), + (717, 707, 4883, 2, 65, 67, -1, -1, 2, NULL), + (718, 707, 4884, 1, 65, 68, -1, -1, 3, NULL), + (719, 707, 4885, 256, 65, 66, -1, -1, 2, NULL), + (720, 707, 5342, 8, 66, 68, -1, -1, 7, NULL), + (721, 707, 5343, 1, 66, 255, -1, -1, 3, NULL), + (722, 707, 5348, 1, 67, 255, -1, -1, 3, NULL), + (723, 707, 5358, 8, 67, 69, -1, -1, 1, NULL), + (724, 707, 5355, 2, 68, 69, -1, -1, 2, NULL), + (725, 707, 5357, 256, 68, 255, -1, -1, 2, NULL), + (726, 707, 8008, 1, 68, 255, -1, -1, 1, NULL), + (727, 707, 5353, 8, 69, 255, -1, -1, 7, NULL), + (728, 707, 5361, 1, 69, 255, -1, -1, 3, NULL), + (729, 707, 6665, 128, 69, 255, -1, -1, 1, NULL), + (730, 707, 5365, 8, 70, 255, -1, -1, 1, NULL), + (731, 707, 6141, 2, 70, 255, -1, -1, 2, NULL), + (732, 708, 5011, 2, 1, 5, -1, -1, 2, NULL), + (733, 708, 200, 2, 6, 11, -1, -1, 2, NULL), + (734, 708, 2581, 1, 7, 12, -1, -1, 3, NULL), + (735, 708, 202, 8, 8, 19, -1, -1, 1, NULL), + (736, 708, 17, 2, 12, 26, -1, -1, 2, NULL), + (737, 708, 2582, 1, 13, 27, -1, -1, 3, NULL), + (738, 708, 218, 1, 14, 29, -1, -1, 2, NULL), + (739, 708, 11, 8, 15, 29, -1, -1, 2, NULL), + (740, 708, 219, 8, 20, 36, -1, -1, 1, NULL), + (741, 708, 485, 8, 24, 32, -1, -1, 3, NULL), + (742, 708, 2583, 8, 26, 62, -1, -1, 5, NULL), + (743, 708, 12, 2, 27, 35, -1, -1, 2, NULL), + (744, 708, 216, 1, 28, 41, -1, -1, 3, NULL), + (745, 708, 233, 1, 30, 45, -1, -1, 2, NULL), + (746, 708, 368, 8, 30, 38, -1, -1, 2, NULL), + (747, 708, 486, 8, 33, 45, -1, -1, 3, NULL), + (748, 708, 2584, 8, 35, 48, -1, -1, 4, NULL), + (749, 708, 15, 2, 36, 51, -1, -1, 2, NULL), + (750, 708, 89, 8, 37, 46, -1, -1, 1, NULL), + (751, 708, 18, 8, 39, 47, -1, -1, 2, NULL), + (752, 708, 123, 1, 42, 51, -1, -1, 3, NULL), + (753, 708, 2585, 8, 44, 255, -1, -1, 7, NULL), + (754, 708, 3683, 2, 44, 58, -1, -1, 1, NULL), + (755, 708, 117, 1, 46, 53, -1, -1, 2, NULL), + (756, 708, 487, 8, 46, 57, -1, -1, 3, NULL), + (757, 708, 312, 8, 47, 59, -1, -1, 1, NULL), + (758, 708, 19, 8, 48, 59, -1, -1, 2, NULL), + (759, 708, 207, 16, 48, 255, -1, -1, 1, NULL), + (760, 708, 3578, 8, 49, 52, -1, -1, 4, NULL), + (761, 708, 124, 1, 52, 52, -1, -1, 3, NULL), + (762, 708, 3684, 2, 52, 56, -1, -1, 2, NULL), + (763, 708, 1288, 8, 53, 59, -1, -1, 4, NULL), + (764, 708, 3975, 1, 53, 53, -1, -1, 3, NULL), + (765, 708, 2587, 1, 54, 61, -1, -1, 3, NULL), + (766, 708, 662, 1, 54, 61, -1, -1, 2, NULL), + (767, 708, 1743, 8, 55, 255, -1, -1, 2, NULL), + (768, 708, 9, 2, 57, 60, -1, -1, 2, NULL), + (769, 708, 488, 8, 58, 62, -1, -1, 3, NULL), + (770, 708, 1283, 2, 59, 63, -1, -1, 1, NULL), + (771, 708, 2590, 8, 60, 64, -1, -1, 4, NULL), + (772, 708, 314, 8, 60, 60, -1, -1, 1, NULL), + (773, 708, 20, 8, 60, 64, -1, -1, 2, NULL), + (774, 708, 1533, 8, 61, 63, -1, -1, 1, NULL), + (775, 708, 3429, 2, 61, 62, -1, -1, 2, NULL), + (776, 708, 3245, 1, 62, 63, -1, -1, 3, NULL), + (777, 708, 3428, 1, 62, 66, -1, -1, 2, NULL), + (778, 708, 3430, 2, 63, 64, -1, -1, 2, NULL), + (779, 708, 1535, 8, 63, 64, -1, -1, 3, NULL), + (780, 708, 3424, 8, 63, 64, -1, -1, 5, NULL), + (781, 708, 1538, 8, 64, 64, -1, -1, 1, NULL), + (782, 708, 3426, 1, 64, 64, -1, -1, 3, NULL), + (783, 708, 3247, 8, 64, 68, -1, -1, 9, NULL), + (784, 708, 2589, 2, 64, 255, -1, -1, 2, NULL), + (785, 708, 4894, 2, 65, 67, -1, -1, 2, NULL), + (786, 708, 3432, 8, 65, 69, -1, -1, 4, NULL), + (787, 708, 4109, 8, 65, 69, -1, -1, 2, NULL), + (788, 708, 4895, 8, 65, 67, -1, -1, 5, NULL), + (789, 708, 4977, 1, 65, 65, -1, -1, 3, NULL), + (790, 708, 5284, 1, 66, 67, -1, -1, 3, NULL), + (791, 708, 5286, 1, 67, 67, -1, -1, 2, NULL), + (792, 708, 5289, 2, 68, 255, -1, -1, 2, NULL), + (793, 708, 8027, 1, 68, 255, -1, -1, 2, NULL), + (794, 708, 5288, 8, 68, 255, -1, -1, 5, NULL), + (795, 708, 5292, 1, 68, 69, -1, -1, 3, NULL), + (796, 708, 5291, 8, 69, 255, -1, -1, 9, NULL), + (797, 708, 8029, 8, 69, 255, -1, -1, 10, NULL), + (798, 708, 5298, 8, 70, 255, -1, -1, 2, NULL), + (799, 708, 5297, 8, 70, 255, -1, -1, 4, NULL), + (800, 708, 5299, 1, 70, 255, -1, -1, 3, NULL), + (801, 709, 5012, 1, 1, 33, -1, -1, 5, NULL), + (802, 709, 340, 256, 5, 56, -1, -1, 3, NULL), + (803, 709, 491, 32, 7, 13, -1, -1, 0, NULL), + (804, 709, 341, 64, 8, 14, -1, -1, 3, NULL), + (805, 709, 2571, 1, 9, 49, -1, -1, 2, NULL), + (806, 709, 344, 128, 11, 19, -1, -1, 1, NULL), + (807, 709, 229, 1, 12, 42, -1, 45, 4, NULL), + (808, 709, 351, 32, 14, 21, -1, -1, 0, NULL), + (809, 709, 502, 64, 15, 28, -1, -1, 3, NULL), + (810, 709, 346, 8, 16, 57, -1, -1, 1, NULL), + (811, 709, 355, 128, 20, 43, -1, -1, 1, NULL), + (812, 709, 359, 8, 22, 36, -1, -1, 2, NULL), + (813, 709, 362, 32, 22, 29, -1, -1, 0, NULL), + (814, 709, 360, 256, 28, 40, -1, -1, 3, NULL), + (815, 709, 1289, 8, 29, 59, -1, -1, 9, NULL), + (816, 709, 445, 64, 29, 46, -1, -1, 3, NULL), + (817, 709, 492, 32, 30, 37, -1, -1, 0, NULL), + (818, 709, 236, 8, 31, 55, -1, -1, 8, NULL), + (819, 709, 3561, 1, 34, 47, -1, -1, 5, NULL), + (820, 709, 367, 256, 36, 59, -1, -1, 3, NULL), + (821, 709, 2574, 8, 37, 54, -1, -1, 2, NULL), + (822, 709, 370, 1, 37, 49, -1, -1, 2, NULL), + (823, 709, 440, 32, 38, 45, -1, -1, 0, NULL), + (824, 709, 3686, 256, 41, 52, -1, -1, 3, NULL), + (825, 709, 127, 1, 43, 56, -1, 45, 4, NULL), + (826, 709, 452, 128, 44, 58, -1, -1, 1, NULL), + (827, 709, 441, 32, 46, 51, -1, -1, 0, NULL), + (828, 709, 692, 64, 47, 56, -1, -1, 3, NULL), + (829, 709, 3560, 1, 48, 53, -1, -1, 5, NULL), + (830, 709, 199, 16, 50, 255, -1, -1, 1, NULL), + (831, 709, 442, 32, 52, 57, -1, -1, 0, NULL), + (832, 709, 451, 256, 53, 60, -1, -1, 3, NULL), + (833, 709, 3562, 1, 54, 63, -1, -1, 5, NULL), + (834, 709, 1376, 8, 55, 62, -1, -1, 2, NULL), + (835, 709, 393, 8, 56, 58, -1, -1, 8, NULL), + (836, 709, 454, 256, 57, 61, -1, -1, 3, NULL), + (837, 709, 525, 64, 57, 59, -1, -1, 3, NULL), + (838, 709, 6986, 1, 57, 61, -1, -1, 4, NULL), + (839, 709, 495, 32, 58, 63, -1, -1, 0, NULL), + (840, 709, 394, 8, 59, 255, -1, -1, 8, NULL), + (841, 709, 453, 128, 59, 60, -1, -1, 1, NULL), + (842, 709, 661, 8, 60, 63, -1, -1, 9, NULL), + (843, 709, 1508, 256, 60, 65, -1, -1, 3, NULL), + (844, 709, 447, 64, 60, 61, -1, -1, 3, NULL), + (845, 709, 3400, 128, 61, 255, -1, -1, 1, NULL), + (846, 709, 6, 256, 61, 62, -1, -1, 3, NULL), + (847, 709, 456, 256, 62, 65, -1, -1, 3, NULL), + (848, 709, 3401, 64, 62, 64, -1, -1, 3, NULL), + (849, 709, 3227, 8, 63, 64, -1, -1, 2, NULL), + (850, 709, 3489, 256, 63, 65, -1, -1, 3, NULL), + (851, 709, 6987, 1, 62, 66, -1, -1, 4, NULL), + (852, 709, 1414, 8, 64, 68, -1, -1, 9, NULL), + (853, 709, 3491, 1, 64, 64, -1, -1, 5, NULL), + (854, 709, 443, 32, 64, 67, -1, -1, 0, NULL), + (855, 709, 3413, 64, 65, 66, -1, -1, 3, NULL), + (856, 709, 4904, 1, 65, 68, -1, -1, 5, NULL), + (857, 709, 5323, 256, 66, 255, -1, -1, 3, NULL), + (858, 709, 5320, 256, 66, 67, -1, -1, 3, NULL), + (859, 709, 5322, 256, 66, 255, -1, -1, 3, NULL), + (860, 709, 5327, 8, 67, 255, -1, -1, 2, NULL), + (861, 709, 5324, 64, 67, 69, -1, -1, 3, NULL), + (862, 709, 6988, 1, 67, 255, -1, -1, 4, NULL), + (863, 709, 5330, 256, 68, 255, -1, -1, 3, NULL), + (864, 709, 5331, 32, 68, 255, -1, -1, 0, NULL), + (865, 709, 5332, 8, 69, 255, -1, -1, 9, NULL), + (866, 709, 5334, 1, 69, 255, -1, -1, 5, NULL), + (867, 709, 5338, 64, 70, 255, -1, -1, 3, NULL), + (868, 710, 5011, 2, 1, 7, -1, -1, 2, NULL), + (869, 710, 239, 256, 3, 43, -1, -1, 3, NULL), + (870, 710, 2591, 128, 5, 5, -1, -1, 1, NULL), + (871, 710, 242, 128, 6, 50, -1, -1, 1, NULL), + (872, 710, 26, 8, 7, 20, -1, -1, 1, NULL), + (873, 710, 200, 2, 8, 20, -1, -1, 2, NULL), + (874, 710, 2592, 8, 11, 51, -1, -1, 9, NULL), + (875, 710, 269, 8, 12, 54, -1, -1, 8, NULL), + (876, 710, 515, 8, 13, 29, -1, -1, 7, NULL), + (877, 710, 92, 1, 14, 18, -1, -1, 4, NULL), + (878, 710, 254, 8, 17, 36, -1, -1, 6, NULL), + (879, 710, 91, 1, 19, 28, -1, -1, 4, NULL), + (880, 710, 17, 2, 21, 37, -1, -1, 2, NULL), + (881, 710, 263, 8, 21, 37, -1, -1, 1, NULL), + (882, 710, 256, 8, 24, 42, -1, -1, 5, NULL), + (883, 710, 264, 256, 25, 39, -1, -1, 3, NULL), + (884, 710, 268, 8, 26, 52, -1, -1, 4, NULL), + (885, 710, 2593, 8, 29, 47, -1, -1, 2, NULL), + (886, 710, 3565, 1, 29, 38, -1, -1, 4, NULL), + (887, 710, 516, 8, 30, 33, -1, -1, 7, NULL), + (888, 710, 517, 8, 34, 41, -1, -1, 7, NULL), + (889, 710, 1461, 8, 36, 54, -1, -1, 10, NULL), + (890, 710, 2594, 8, 37, 50, -1, -1, 6, NULL), + (891, 710, 12, 2, 38, 56, -1, -1, 2, NULL), + (892, 710, 421, 8, 38, 53, -1, -1, 1, NULL), + (893, 710, 3564, 1, 39, 48, -1, -1, 4, NULL), + (894, 710, 3687, 256, 40, 53, -1, -1, 3, NULL), + (895, 710, 518, 8, 42, 59, -1, -1, 7, NULL), + (896, 710, 129, 8, 43, 57, -1, -1, 5, NULL), + (897, 710, 78, 256, 44, 255, -1, -1, 3, NULL), + (898, 710, 2595, 8, 48, 49, -1, -1, 2, NULL), + (899, 710, 691, 1, 49, 51, -1, -1, 4, NULL), + (900, 710, 1462, 8, 50, 61, -1, -1, 2, NULL), + (901, 710, 1741, 16, 50, 54, -1, -1, 1, NULL), + (902, 710, 1397, 8, 51, 61, -1, -1, 6, NULL), + (903, 710, 512, 128, 51, 60, -1, -1, 1, NULL), + (904, 710, 2596, 8, 52, 57, -1, -1, 9, NULL), + (905, 710, 57, 1, 52, 58, -1, -1, 4, NULL), + (906, 710, 430, 8, 53, 255, -1, -1, 4, NULL), + (907, 710, 259, 256, 54, 61, -1, -1, 3, NULL), + (908, 710, 422, 8, 54, 58, -1, -1, 1, NULL), + (909, 710, 1296, 16, 55, 255, -1, -1, 1, NULL), + (910, 710, 145, 8, 55, 63, -1, -1, 8, NULL), + (911, 710, 1463, 8, 55, 57, -1, -1, 10, NULL), + (912, 710, 15, 2, 57, 61, -1, -1, 2, NULL), + (913, 710, 432, 8, 58, 61, -1, -1, 5, NULL), + (914, 710, 4059, 8, 58, 63, -1, -1, 10, NULL), + (915, 710, 2599, 8, 58, 255, -1, -1, 9, NULL), + (916, 710, 423, 8, 59, 64, -1, -1, 1, NULL), + (917, 710, 1740, 1, 59, 63, -1, -1, 4, NULL), + (918, 710, 519, 8, 60, 62, -1, -1, 7, NULL), + (919, 710, 6732, 128, 61, 68, -1, -1, 1, NULL), + (920, 710, 3419, 8, 62, 66, -1, -1, 2, NULL), + (921, 710, 356, 8, 62, 65, -1, -1, 5, NULL), + (922, 710, 3487, 8, 62, 66, -1, -1, 6, NULL), + (923, 710, 665, 256, 62, 66, -1, -1, 3, NULL), + (924, 710, 1290, 2, 62, 64, -1, -1, 2, NULL), + (925, 710, 1558, 8, 63, 67, -1, -1, 7, NULL), + (926, 710, 1568, 8, 64, 67, -1, -1, 8, NULL), + (927, 710, 3415, 8, 64, 64, -1, -1, 10, NULL), + (928, 710, 3431, 1, 64, 64, -1, -1, 4, NULL), + (929, 710, 1559, 8, 65, 69, -1, -1, 1, NULL), + (930, 710, 4898, 8, 65, 68, -1, -1, 10, NULL), + (931, 710, 4980, 1, 65, 68, -1, -1, 4, NULL), + (932, 710, 4896, 2, 65, 66, -1, -1, 2, NULL), + (933, 710, 5302, 8, 66, 255, -1, -1, 5, NULL), + (934, 710, 5305, 8, 66, 255, -1, -1, 2, NULL), + (935, 710, 5306, 8, 67, 255, -1, -1, 6, NULL), + (936, 710, 5303, 256, 67, 255, -1, -1, 3, NULL), + (937, 710, 5304, 2, 67, 255, -1, -1, 2, NULL), + (938, 710, 5307, 8, 68, 255, -1, -1, 7, NULL), + (939, 710, 5310, 8, 68, 255, -1, -1, 8, NULL), + (940, 710, 5311, 8, 69, 255, -1, -1, 10, NULL), + (941, 710, 6664, 128, 69, 255, -1, -1, 1, NULL), + (942, 710, 5313, 1, 69, 69, -1, -1, 4, NULL), + (943, 710, 5315, 8, 70, 255, -1, -1, 1, NULL), + (944, 710, 5319, 1, 70, 255, -1, -1, 4, NULL), + (945, 711, 700, 8, 1, 9, -1, -1, 1, NULL), + (946, 711, 7, 2, 6, 33, -1, -1, 2, NULL), + (947, 711, 710, 8, 9, 12, -1, -1, 2, NULL), + (948, 711, 701, 8, 10, 35, -1, -1, 1, NULL), + (949, 711, 711, 8, 13, 24, -1, -1, 2, NULL), + (950, 711, 709, 8, 17, 51, -1, -1, 3, NULL), + (951, 711, 1287, 2, 20, 31, -1, -1, 2, NULL), + (952, 711, 738, 1, 23, 255, -1, -1, 3, NULL), + (953, 711, 712, 8, 25, 28, -1, -1, 2, NULL), + (954, 711, 715, 8, 29, 32, -1, -1, 3, NULL), + (955, 711, 707, 1, 30, 37, -1, -1, 2, NULL), + (956, 711, 723, 2, 32, 33, -1, -1, 3, NULL), + (957, 711, 713, 8, 33, 36, -1, -1, 2, NULL), + (958, 711, 1448, 2, 34, 54, -1, -1, 2, NULL), + (959, 711, 740, 8, 36, 41, -1, -1, 1, NULL), + (960, 711, 716, 8, 37, 40, -1, -1, 2, NULL), + (961, 711, 743, 1, 38, 41, -1, -1, 4, NULL), + (962, 711, 714, 8, 41, 46, -1, -1, 2, NULL), + (963, 711, 3567, 1, 42, 45, -1, -1, 5, NULL), + (964, 711, 702, 8, 42, 49, -1, -1, 1, NULL), + (965, 711, 744, 1, 46, 49, -1, -1, 6, NULL), + (966, 711, 748, 8, 47, 53, -1, -1, 2, NULL), + (967, 711, 3566, 1, 50, 62, -1, -1, 2, NULL), + (968, 711, 747, 8, 50, 53, -1, -1, 1, NULL), + (969, 711, 1751, 1, 51, 255, -1, -1, 4, NULL), + (970, 711, 2606, 8, 52, 59, -1, -1, 3, NULL), + (971, 711, 1754, 16, 53, 59, -1, -1, 1, NULL), + (972, 711, 2607, 8, 54, 255, -1, -1, 2, NULL), + (973, 711, 1759, 2, 55, 57, -1, -1, 2, NULL), + (974, 711, 2609, 2, 58, 59, -1, -1, 2, NULL), + (975, 711, 1196, 2, 60, 61, -1, -1, 2, NULL), + (976, 711, 1749, 16, 60, 255, -1, -1, 1, NULL), + (977, 711, 2610, 8, 60, 63, -1, -1, 3, NULL), + (978, 711, 3374, 8, 62, 64, -1, -1, 1, NULL), + (979, 711, 3651, 2, 62, 63, -1, -1, 2, NULL), + (980, 711, 3370, 1, 63, 63, -1, -1, 2, NULL), + (981, 711, 3066, 1, 64, 255, -1, -1, 2, NULL), + (982, 711, 3362, 8, 64, 64, -1, -1, 3, NULL), + (983, 711, 3372, 2, 64, 66, -1, -1, 2, NULL), + (984, 711, 4871, 8, 65, 67, -1, -1, 1, NULL), + (985, 711, 4872, 8, 65, 67, -1, -1, 3, NULL), + (986, 711, 5377, 2, 67, 68, -1, -1, 2, NULL), + (987, 711, 5376, 8, 68, 255, -1, -1, 1, NULL), + (988, 711, 5380, 8, 68, 68, -1, -1, 3, NULL), + (989, 711, 5382, 8, 69, 69, -1, -1, 3, NULL), + (990, 711, 5384, 2, 69, 255, -1, -1, 2, NULL), + (991, 711, 5388, 8, 70, 255, -1, -1, 3, NULL), + (992, 712, 5011, 2, 1, 5, -1, -1, 2, NULL), + (993, 712, 200, 2, 6, 19, -1, -1, 2, NULL), + (994, 712, 267, 8, 7, 19, -1, -1, 9, NULL), + (995, 712, 2612, 32, 8, 14, -1, -1, 0, NULL), + (996, 712, 2611, 2, 9, 14, -1, -1, 2, NULL), + (997, 712, 274, 8, 10, 25, -1, -1, 8, NULL), + (998, 712, 2068, 1, 12, 25, -1, -1, 4, NULL), + (999, 712, 2635, 8, 13, 17, -1, -1, 6, NULL), + (1000, 712, 40, 8, 14, 27, -1, -1, 5, NULL), + (1001, 712, 75, 256, 14, 39, -1, -1, 3, NULL), + (1002, 712, 2613, 2, 15, 26, -1, -1, 2, NULL), + (1003, 712, 2633, 32, 15, 20, -1, -1, 0, NULL), + (1004, 712, 279, 8, 17, 36, -1, -1, 4, NULL), + (1005, 712, 2636, 8, 18, 27, -1, -1, 6, NULL), + (1006, 712, 277, 256, 19, 34, -1, -1, 3, NULL), + (1007, 712, 270, 1, 20, 49, -1, -1, 3, NULL), + (1008, 712, 17, 2, 20, 35, -1, -1, 2, NULL), + (1009, 712, 2614, 32, 21, 29, -1, -1, 0, NULL), + (1010, 712, 282, 1, 26, 32, -1, -1, 4, NULL), + (1011, 712, 283, 8, 26, 36, -1, -1, 8, NULL), + (1012, 712, 2615, 2, 27, 35, -1, -1, 2, NULL), + (1013, 712, 147, 8, 28, 40, -1, -1, 5, NULL), + (1014, 712, 2637, 8, 28, 37, -1, -1, 6, NULL), + (1015, 712, 2616, 32, 30, 38, -1, -1, 0, NULL), + (1016, 712, 3568, 1, 33, 46, -1, -1, 4, NULL), + (1017, 712, 434, 256, 35, 51, -1, -1, 3, NULL), + (1018, 712, 48, 512, 35, 57, -1, -1, 6, NULL), + (1019, 712, 12, 2, 36, 56, -1, -1, 2, NULL), + (1020, 712, 2617, 2, 36, 48, -1, -1, 2, NULL), + (1021, 712, 2619, 8, 37, 51, -1, -1, 8, NULL), + (1022, 712, 149, 8, 37, 51, -1, -1, 3, NULL), + (1023, 712, 2638, 8, 38, 45, -1, -1, 6, NULL), + (1024, 712, 2618, 32, 39, 45, -1, -1, 0, NULL), + (1025, 712, 3689, 256, 40, 64, -1, -1, 3, NULL), + (1026, 712, 151, 8, 41, 53, -1, -1, 5, NULL), + (1027, 712, 2176, 8, 41, 51, -1, -1, 4, NULL), + (1028, 712, 2178, 8, 42, 59, -1, -1, 2, NULL), + (1029, 712, 2621, 32, 46, 53, -1, -1, 0, NULL), + (1030, 712, 2639, 8, 46, 50, -1, -1, 6, NULL), + (1031, 712, 308, 8, 47, 255, -1, -1, 7, NULL), + (1032, 712, 3569, 1, 47, 53, -1, -1, 4, NULL), + (1033, 712, 2620, 2, 49, 51, -1, -1, 2, NULL), + (1034, 712, 2634, 1, 50, 59, -1, -1, 3, NULL), + (1035, 712, 2640, 8, 51, 52, -1, -1, 6, NULL), + (1036, 712, 161, 8, 52, 56, -1, -1, 3, NULL), + (1037, 712, 2177, 8, 52, 58, -1, -1, 4, NULL), + (1038, 712, 2622, 2, 52, 54, -1, -1, 2, NULL), + (1039, 712, 3690, 8, 52, 54, -1, -1, 8, NULL), + (1040, 712, 435, 256, 52, 60, -1, -1, 3, NULL), + (1041, 712, 167, 8, 53, 57, -1, -1, 6, NULL), + (1042, 712, 153, 8, 54, 255, -1, -1, 5, NULL), + (1043, 712, 2623, 32, 54, 55, -1, -1, 0, NULL), + (1044, 712, 3570, 1, 54, 58, -1, -1, 4, NULL), + (1045, 712, 2625, 8, 55, 58, -1, -1, 8, NULL), + (1046, 712, 145, 8, 55, 63, -1, -1, 1, NULL), + (1047, 712, 2626, 32, 56, 57, -1, -1, 0, NULL), + (1048, 712, 15, 2, 57, 61, -1, -1, 2, NULL), + (1049, 712, 158, 8, 57, 255, -1, -1, 3, NULL), + (1050, 712, 168, 8, 58, 61, -1, -1, 6, NULL), + (1051, 712, 2627, 32, 58, 59, -1, -1, 0, NULL), + (1052, 712, 49, 512, 58, 59, -1, -1, 6, NULL), + (1053, 712, 2628, 8, 59, 62, -1, -1, 8, NULL), + (1054, 712, 2629, 8, 59, 63, -1, -1, 4, NULL), + (1055, 712, 510, 1, 59, 62, -1, -1, 4, NULL), + (1056, 712, 2941, 8, 60, 64, -1, -1, 10, NULL), + (1057, 712, 2630, 8, 60, 61, -1, -1, 2, NULL), + (1058, 712, 2631, 32, 60, 61, -1, -1, 0, NULL), + (1059, 712, 2942, 1, 60, 64, -1, -1, 3, NULL), + (1060, 712, 3492, 256, 61, 65, -1, -1, 3, NULL), + (1061, 712, 3456, 8, 62, 66, -1, -1, 2, NULL), + (1062, 712, 1585, 8, 62, 66, -1, -1, 6, NULL), + (1063, 712, 1290, 2, 62, 64, -1, -1, 2, NULL), + (1064, 712, 3457, 32, 62, 63, -1, -1, 0, NULL), + (1065, 712, 3458, 8, 63, 67, -1, -1, 8, NULL), + (1066, 712, 3493, 1, 63, 64, -1, -1, 4, NULL), + (1067, 712, 1568, 8, 64, 68, -1, -1, 1, NULL), + (1068, 712, 3460, 8, 64, 68, -1, -1, 4, NULL), + (1069, 712, 3461, 32, 64, 67, -1, -1, 0, NULL), + (1070, 712, 3463, 8, 65, 69, -1, -1, 10, NULL), + (1071, 712, 32, 256, 65, 69, -1, -1, 3, NULL), + (1072, 712, 3462, 1, 65, 69, -1, -1, 3, NULL), + (1073, 712, 4972, 1, 65, 68, -1, -1, 4, NULL), + (1074, 712, 4875, 2, 65, 66, -1, -1, 2, NULL), + (1075, 712, 5527, 256, 66, 255, -1, -1, 3, NULL), + (1076, 712, 5530, 8, 67, 255, -1, -1, 2, NULL), + (1077, 712, 5529, 8, 67, 255, -1, -1, 6, NULL), + (1078, 712, 5528, 2, 67, 255, -1, -1, 2, NULL), + (1079, 712, 5533, 8, 68, 255, -1, -1, 8, NULL), + (1080, 712, 5531, 32, 68, 69, -1, -1, 0, NULL), + (1081, 712, 5536, 8, 69, 255, -1, -1, 1, NULL), + (1082, 712, 5537, 8, 69, 255, -1, -1, 4, NULL), + (1083, 712, 5535, 1, 69, 69, -1, -1, 4, NULL), + (1084, 712, 5542, 8, 70, 255, -1, -1, 10, NULL), + (1085, 712, 5540, 256, 70, 255, -1, -1, 3, NULL), + (1086, 712, 6828, 1, 70, 255, -1, -1, 3, NULL), + (1087, 712, 5543, 1, 70, 255, -1, -1, 4, NULL), + (1088, 712, 5538, 32, 70, 255, -1, -1, 0, NULL), + (1089, 707, 425, 8, 20, 255, -1, -1, 0, NULL), + (1090, 705, 190, 2048, 47, 55, -1, -1, 0, NULL), + (1091, 705, 292, 2048, 2, 12, -1, -1, 0, NULL), + (1092, 705, 187, 2048, 13, 29, -1, -1, 0, NULL), + (1093, 705, 188, 2048, 30, 46, -1, -1, 0, NULL), + (1094, 705, 1691, 2048, 54, 58, -1, -1, 0, NULL), + (1095, 705, 1692, 2048, 59, 59, -1, -1, 0, NULL), + (1096, 705, 2120, 2048, 60, 60, -1, -1, 0, NULL), + (1097, 705, 3341, 2048, 61, 62, -1, -1, 0, NULL), + (1098, 705, 3354, 2048, 63, 63, -1, -1, 0, NULL), + (1099, 705, 3358, 2048, 64, 66, -1, -1, 0, NULL), + (1100, 705, 5503, 2048, 67, 67, -1, -1, 0, NULL), + (1101, 705, 8035, 2048, 68, 68, -1, -1, 0, NULL), + (1102, 705, 5520, 2048, 69, 255, -1, -1, 0, NULL), + (1103, 709, 343, 16384, 6, 51, -1, -1, 3, NULL), + (1104, 709, 2572, 16384, 15, 34, -1, -1, 3, NULL), + (1105, 709, 2573, 16384, 23, 49, -1, -1, 3, NULL), + (1106, 709, 1457, 16384, 35, 53, -1, -1, 3, NULL), + (1107, 709, 1458, 16384, 50, 55, -1, -1, 3, NULL), + (1108, 709, 2575, 16384, 52, 59, -1, -1, 3, NULL), + (1109, 709, 2577, 16384, 54, 64, -1, -1, 3, NULL), + (1110, 709, 2578, 16384, 56, 62, -1, -1, 3, NULL), + (1111, 709, 2579, 16384, 58, 65, -1, -1, 3, NULL), + (1112, 709, 3406, 16384, 61, 70, -1, -1, 2, NULL), + (1113, 707, 3435, 16384, 61, 85, -1, -1, 2, NULL), + (1114, 707, 5351, 16384, 67, 73, -1, -1, 2, NULL), + (1115, 707, 5354, 16384, 67, 71, -1, -1, 2, NULL), + (1116, 703, 343, 16384, 1, 12, -1, -1, 3, NULL), + (1117, 703, 1511, 16384, 10, 20, -1, -1, 3, NULL), + (1118, 703, 1512, 16384, 21, 36, -1, -1, 3, NULL), + (1119, 703, 1513, 16384, 37, 51, -1, -1, 3, NULL), + (1120, 703, 1716, 16384, 52, 67, -1, -1, 3, NULL), + (1121, 703, 2546, 16384, 52, 65, -1, -1, 3, NULL), + (1122, 703, 5427, 16384, 68, 71, -1, -1, 3, NULL), + (1123, 704, 110, 16384, 22, 43, -1, -1, 2, NULL), + (1124, 704, 111, 16384, 44, 50, -1, -1, 2, NULL), + (1125, 704, 112, 16384, 51, 57, -1, -1, 2, NULL), + (1126, 704, 1577, 16384, 58, 59, -1, -1, 2, NULL), + (1127, 704, 1772, 16384, 60, 255, -1, -1, 1, NULL), + (1128, 704, 3387, 16384, 63, 70, -1, -1, 2, NULL), + (1129, 705, 41, 16384, 1, 3, -1, -1, 3, NULL), + (1130, 705, 676, 16384, 2, 17, -1, -1, 1, NULL), + (1131, 705, 291, 16384, 4, 8, -1, -1, 3, NULL), + (1132, 705, 645, 16384, 9, 18, -1, -1, 3, NULL), + (1133, 705, 281, 16384, 16, 24, -1, -1, 3, NULL), + (1134, 705, 677, 16384, 18, 40, -1, -1, 1, NULL), + (1135, 705, 179, 16384, 19, 33, -1, -1, 4, NULL), + (1136, 705, 162, 16384, 25, 39, -1, -1, 3, NULL), + (1137, 705, 180, 16384, 34, 41, -1, -1, 4, NULL), + (1138, 705, 163, 16384, 40, 52, -1, -1, 3, NULL), + (1139, 705, 678, 16384, 41, 56, -1, -1, 1, NULL), + (1140, 705, 181, 16384, 42, 52, -1, -1, 4, NULL), + (1141, 705, 1592, 16384, 53, 65, -1, -1, 3, NULL), + (1142, 705, 1702, 16384, 57, 60, -1, -1, 1, NULL), + (1143, 705, 3342, 16384, 61, 71, -1, -1, 1, NULL), + (1144, 705, 5499, 16384, 66, 70, -1, -1, 3, NULL), + (1145, 712, 162, 16384, 44, 55, -1, -1, 2, NULL), + (1146, 712, 163, 16384, 56, 65, -1, -1, 2, NULL), + (1147, 707, 14312, 16384, 71, 75, -1, -1, 3, NULL), + (1148, 707, 14313, 16384, 71, 75, -1, -1, 3, NULL), + (1149, 707, 14314, 16384, 71, 75, -1, -1, 3, NULL), + (1150, 707, 0, 16384, 76, 80, -1, -1, 2, NULL), + (1151, 707, 18392, 16384, 81, 85, -1, -1, 2, NULL), + (1152, 707, 18393, 16384, 81, 85, -1, -1, 2, NULL), + (1153, 707, 18394, 16384, 81, 85, -1, -1, 2, NULL), + (1154, 703, 10516, 16384, 72, 76, -1, -1, 3, NULL), + (1155, 703, 10517, 16384, 72, 76, -1, -1, 3, NULL), + (1156, 703, 10518, 16384, 72, 76, -1, -1, 3, NULL), + (1157, 703, 0, 16384, 77, 81, -1, -1, 3, NULL), + (1158, 703, 18970, 16384, 82, 86, -1, -1, 3, NULL), + (1159, 703, 18971, 16384, 82, 86, -1, -1, 3, NULL), + (1160, 703, 18972, 16384, 82, 86, -1, -1, 3, NULL), + (1161, 704, 15186, 16384, 76, 80, -1, -1, 2, NULL), + (1162, 704, 15187, 16384, 76, 80, -1, -1, 2, NULL), + (1163, 704, 15188, 16384, 76, 80, -1, -1, 2, NULL), + (1164, 704, 18726, 16384, 81, 85, -1, -1, 2, NULL), + (1165, 704, 18727, 16384, 81, 85, -1, -1, 2, NULL), + (1166, 704, 18728, 16384, 81, 85, -1, -1, 2, NULL), + (1167, 705, 14446, 16384, 71, 75, -1, -1, 3, NULL), + (1168, 705, 14447, 16384, 71, 75, -1, -1, 3, NULL), + (1169, 705, 14467, 16384, 72, 76, -1, -1, 1, NULL), + (1170, 705, 14468, 16384, 72, 76, -1, -1, 1, NULL), + (1171, 705, 14469, 16384, 72, 76, -1, -1, 1, NULL), + (1172, 705, 0, 16384, 77, 81, -1, -1, 1, NULL), + (1173, 705, 18552, 16384, 81, 85, -1, -1, 3, NULL), + (1174, 705, 18553, 16384, 81, 85, -1, -1, 3, NULL), + (1175, 705, 18554, 16384, 81, 85, -1, -1, 3, NULL), + (1176, 705, 18573, 16384, 82, 86, -1, -1, 1, NULL), + (1177, 705, 18574, 16384, 82, 86, -1, -1, 1, NULL), + (1178, 705, 18575, 16384, 82, 86, -1, -1, 1, NULL), + (1179, 701, 203, 32768, 1, 21, -1, -1, 2, NULL), + (1180, 701, 213, 32768, 4, 27, -1, -1, 2, NULL), + (1181, 701, 4056, 32768, 8, 22, -1, -1, 2, NULL), + (1182, 701, 95, 32768, 22, 47, -1, -1, 2, NULL), + (1183, 701, 4057, 32768, 23, 37, -1, -1, 2, NULL), + (1184, 701, 96, 32768, 28, 50, -1, -1, 2, NULL), + (1185, 701, 2946, 32768, 38, 53, -1, -1, 2, NULL), + (1186, 701, 97, 32768, 48, 57, -1, -1, 2, NULL), + (1187, 701, 3693, 32768, 51, 83, -1, -1, 3, NULL), + (1188, 701, 2880, 32768, 54, 255, -1, -1, 2, NULL), + (1189, 701, 1525, 32768, 58, 83, -1, -1, 2, NULL), + (1190, 708, 203, 32768, 5, 33, -1, -1, 2, NULL), + (1191, 708, 213, 32768, 11, 55, -1, -1, 2, NULL), + (1192, 708, 4056, 32768, 19, 33, -1, -1, 2, NULL), + (1193, 708, 95, 32768, 34, 61, -1, -1, 2, NULL), + (1194, 708, 4057, 32768, 34, 44, -1, -1, 2, NULL), + (1195, 708, 2946, 32768, 45, 59, -1, -1, 2, NULL), + (1196, 708, 96, 32768, 56, 61, -1, -1, 2, NULL), + (1197, 708, 2880, 32768, 60, 255, -1, -1, 2, NULL), + (1198, 708, 3190, 32768, 62, 66, -1, -1, 2, NULL), + (1199, 708, 5283, 32768, 67, 80, -1, -1, 2, NULL), + (1200, 710, 203, 32768, 13, 60, -1, -1, 2, NULL), + (1201, 710, 213, 32768, 22, 60, -1, -1, 2, NULL), + (1202, 710, 95, 32768, 61, 72, -1, -1, 2, NULL), + (1203, 710, 96, 32768, 61, 72, -1, -1, 2, NULL), + (1204, 709, 213, 32768, 19, 255, -1, -1, 2, NULL), + (1205, 707, 213, 32768, 4, 27, -1, -1, 2, NULL), + (1206, 707, 203, 32768, 5, 27, -1, -1, 2, NULL), + (1207, 707, 95, 32768, 28, 51, -1, -1, 2, NULL), + (1208, 707, 96, 32768, 28, 51, -1, -1, 2, NULL), + (1209, 707, 3693, 32768, 52, 83, -1, -1, 2, NULL), + (1210, 711, 3682, 32768, 45, 85, -1, -1, 2, NULL), + (1211, 711, 3681, 32768, 52, 85, -1, -1, 2, NULL), + (1212, 706, 213, 32768, 1, 21, -1, -1, 2, NULL), + (1213, 706, 203, 32768, 2, 25, -1, -1, 2, NULL), + (1214, 706, 4056, 32768, 9, 23, -1, -1, 2, NULL), + (1215, 706, 96, 32768, 22, 47, -1, -1, 2, NULL), + (1216, 706, 4057, 32768, 24, 37, -1, -1, 2, NULL), + (1217, 706, 95, 32768, 26, 51, -1, -1, 2, NULL), + (1218, 706, 2946, 32768, 38, 53, -1, -1, 2, NULL), + (1219, 706, 98, 32768, 48, 51, -1, -1, 2, NULL), + (1220, 706, 2526, 32768, 52, 84, -1, -1, 2, NULL), + (1221, 706, 3842, 32768, 52, 84, -1, -1, 2, NULL), + (1222, 706, 2880, 32768, 54, 255, -1, -1, 2, NULL), + (1223, 712, 213, 32768, 4, 44, -1, -1, 2, NULL), + (1224, 712, 203, 32768, 13, 60, -1, -1, 2, NULL), + (1225, 712, 96, 32768, 45, 62, -1, -1, 2, NULL), + (1226, 712, 95, 32768, 61, 255, -1, -1, 2, NULL), + (1227, 712, 98, 32768, 63, 255, -1, -1, 2, NULL), + (1228, 701, 14267, 32768, 74, 78, -1, -1, 2, NULL), + (1229, 701, 14268, 32768, 74, 78, -1, -1, 2, NULL), + (1230, 701, 14269, 32768, 74, 78, -1, -1, 2, NULL), + (1231, 701, 18306, 32768, 84, 255, -1, -1, 2, NULL), + (1232, 701, 18307, 32768, 84, 255, -1, -1, 2, NULL), + (1233, 701, 18308, 32768, 84, 255, -1, -1, 2, NULL), + (1234, 701, 18389, 32768, 84, 255, -1, -1, 2, NULL), + (1235, 701, 18390, 32768, 84, 255, -1, -1, 2, NULL), + (1236, 701, 18391, 32768, 84, 255, -1, -1, 2, NULL), + (1237, 708, 19128, 32768, 81, 255, -1, -1, 2, NULL), + (1238, 708, 19129, 32768, 81, 255, -1, -1, 2, NULL), + (1239, 708, 19130, 32768, 81, 255, -1, -1, 2, NULL), + (1240, 710, 14955, 32768, 73, 77, -1, -1, 2, NULL), + (1241, 710, 14956, 32768, 73, 77, -1, -1, 2, NULL), + (1242, 710, 0, 32768, 78, 82, -1, -1, 2, NULL), + (1243, 710, 19146, 32768, 83, 87, -1, -1, 2, NULL), + (1244, 710, 19147, 32768, 83, 87, -1, -1, 2, NULL), + (1245, 710, 19148, 32768, 83, 87, -1, -1, 2, NULL), + (1246, 707, 9700, 32768, 71, 83, -1, -1, 2, NULL), + (1247, 707, 9701, 32768, 71, 83, -1, -1, 2, NULL), + (1248, 707, 9702, 32768, 71, 83, -1, -1, 2, NULL), + (1249, 707, 18389, 32768, 84, 88, -1, -1, 2, NULL), + (1250, 707, 18390, 32768, 84, 88, -1, -1, 2, NULL), + (1251, 707, 18391, 32768, 84, 88, -1, -1, 2, NULL), + (1252, 711, 14027, 32768, 79, 83, -1, -1, 2, NULL), + (1253, 711, 14028, 32768, 79, 83, -1, -1, 2, NULL), + (1254, 711, 14029, 32768, 79, 83, -1, -1, 2, NULL), + (1255, 711, 18021, 32768, 84, 85, -1, -1, 2, NULL), + (1256, 711, 18022, 32768, 84, 85, -1, -1, 2, NULL), + (1257, 711, 18023, 32768, 84, 85, -1, -1, 2, NULL), + (1258, 706, 9700, 32768, 72, 73, -1, -1, 2, NULL), + (1259, 706, 9701, 32768, 72, 73, -1, -1, 2, NULL), + (1260, 706, 9702, 32768, 72, 73, -1, -1, 2, NULL), + (1261, 706, 14387, 32768, 74, 78, -1, -1, 2, NULL), + (1262, 706, 14388, 32768, 74, 78, -1, -1, 2, NULL), + (1263, 706, 14389, 32768, 74, 78, -1, -1, 2, NULL), + (1264, 706, 0, 32768, 79, 83, -1, -1, 2, NULL), + (1265, 706, 18467, 32768, 84, 88, -1, -1, 2, NULL), + (1266, 706, 18468, 32768, 84, 88, -1, -1, 2, NULL), + (1267, 706, 18469, 32768, 84, 88, -1, -1, 2, NULL), + (1268, 706, 19513, 32768, 85, 89, -1, -1, 2, NULL), + (1269, 706, 19514, 32768, 85, 89, -1, -1, 2, NULL), + (1270, 706, 19515, 32768, 85, 89, -1, -1, 2, NULL); +/*!40000 ALTER TABLE `bot_spells_entries` ENABLE KEYS */; +/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; +/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; diff --git a/utils/sql/git/bots/required/2015_09_30_bots.sql b/utils/sql/git/bots/required/2015_09_30_bots.sql index 838e85c16..d3cd66132 100644 --- a/utils/sql/git/bots/required/2015_09_30_bots.sql +++ b/utils/sql/git/bots/required/2015_09_30_bots.sql @@ -343,4 +343,1313 @@ bm.`alt` FROM `bot_guild_members` AS bm; +-- Supplemental INSERT + +-- -------------------------------------------------------- +-- Host: 127.0.0.1 +-- Server version: 10.0.22-MariaDB - mariadb.org binary distribution +-- Server OS: Win64 +-- HeidiSQL Version: 9.3.0.4984 +-- -------------------------------------------------------- + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET NAMES utf8mb4 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; + +-- Dumping structure for table peq_raw.bot_spells_entries +DROP TABLE IF EXISTS `bot_spells_entries`; +CREATE TABLE IF NOT EXISTS `bot_spells_entries` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `npc_spells_id` int(11) NOT NULL DEFAULT '0', + `spellid` smallint(5) NOT NULL DEFAULT '0', + `type` int(10) unsigned NOT NULL DEFAULT '0', + `minlevel` tinyint(3) unsigned NOT NULL DEFAULT '0', + `maxlevel` tinyint(3) unsigned NOT NULL DEFAULT '255', + `manacost` smallint(5) NOT NULL DEFAULT '-1', + `recast_delay` int(11) NOT NULL DEFAULT '-1', + `priority` smallint(5) NOT NULL DEFAULT '0', + `resist_adjust` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2048 DEFAULT CHARSET=latin1; + +-- Dumping data for table peq_raw.bot_spells_entries: ~1,270 rows (approximately) +/*!40000 ALTER TABLE `bot_spells_entries` DISABLE KEYS */; +INSERT INTO `bot_spells_entries` (`id`, `npc_spells_id`, `spellid`, `type`, `minlevel`, `maxlevel`, `manacost`, `recast_delay`, `priority`, `resist_adjust`) VALUES + (1, 701, 200, 2, 1, 3, -1, -1, 1, NULL), + (2, 701, 14, 1, 1, 4, -1, -1, 1, NULL), + (3, 701, 201, 1, 1, 1, -1, -1, 1, NULL), + (4, 701, 202, 8, 1, 6, -1, -1, 10, NULL), + (5, 701, 11, 8, 1, 14, -1, -1, 8, NULL), + (6, 701, 207, 16, 1, 28, -1, -1, 1, NULL), + (7, 701, 216, 1, 2, 15, -1, -1, 1, NULL), + (8, 701, 17, 2, 4, 9, -1, -1, 1, NULL), + (9, 701, 560, 1, 5, 13, -1, -1, 1, NULL), + (10, 701, 219, 8, 7, 16, -1, -1, 10, NULL), + (11, 701, 12, 2, 10, 19, -1, -1, 2, NULL), + (12, 701, 485, 8, 11, 16, -1, -1, 7, NULL), + (13, 701, 16, 1, 14, 28, -1, -1, 1, NULL), + (14, 701, 3575, 8, 15, 34, -1, -1, 6, NULL), + (15, 701, 368, 8, 15, 24, -1, -1, 8, NULL), + (16, 701, 123, 1, 16, 30, -1, -1, 1, NULL), + (17, 701, 89, 8, 17, 20, -1, -1, 10, NULL), + (18, 701, 2502, 2, 19, 28, -1, -1, 1, NULL), + (19, 701, 15, 2, 20, 29, -1, -1, 2, NULL), + (20, 701, 4088, 8, 20, 39, -1, -1, 6, NULL), + (21, 701, 486, 8, 21, 30, -1, -1, 10, NULL), + (22, 701, 18, 8, 25, 34, -1, -1, 9, NULL), + (23, 701, 130, 16, 29, 255, -1, -1, 1, NULL), + (24, 701, 2175, 2, 29, 43, -1, -1, 1, NULL), + (25, 701, 329, 1, 29, 43, -1, -1, 1, NULL), + (26, 701, 9, 2, 30, 38, -1, -1, 2, NULL), + (27, 701, 124, 1, 31, 45, -1, -1, 1, NULL), + (28, 701, 487, 8, 31, 39, -1, -1, 10, NULL), + (29, 701, 3576, 8, 35, 61, -1, -1, 7, NULL), + (30, 701, 19, 8, 35, 39, -1, -1, 8, NULL), + (31, 701, 13, 2, 39, 69, -1, -1, 2, NULL), + (32, 701, 3692, 8, 40, 44, -1, -1, 10, NULL), + (33, 701, 4089, 8, 40, 53, -1, -1, 6, NULL), + (34, 701, 1445, 8, 40, 48, -1, -1, 11, NULL), + (35, 701, 1444, 2, 44, 58, -1, -1, 1, NULL), + (36, 701, 672, 1, 44, 53, -1, -1, 1, NULL), + (37, 701, 4053, 8, 45, 59, -1, -1, 10, NULL), + (38, 701, 125, 1, 46, 57, -1, -1, 1, NULL), + (39, 701, 2505, 8, 49, 57, -1, -1, 11, NULL), + (40, 701, 1547, 8, 51, 59, -1, -1, 9, NULL), + (41, 701, 1543, 1, 54, 55, -1, -1, 1, NULL), + (42, 701, 4090, 8, 54, 61, -1, -1, 6, NULL), + (43, 701, 2508, 1, 56, 61, -1, -1, 1, NULL), + (44, 701, 1544, 1, 58, 60, -1, -1, 1, NULL), + (45, 701, 2509, 8, 58, 59, -1, -1, 11, NULL), + (46, 701, 1522, 2, 59, 59, -1, -1, 1, NULL), + (47, 701, 1546, 8, 60, 255, -1, -1, 9, NULL), + (48, 701, 2109, 8, 60, 64, -1, -1, 11, NULL), + (49, 701, 2122, 8, 60, 61, -1, -1, 10, NULL), + (50, 701, 2180, 2, 60, 61, -1, -1, 1, NULL), + (51, 701, 3481, 1, 61, 62, -1, -1, 1, NULL), + (52, 701, 3467, 8, 62, 64, -1, -1, 10, NULL), + (53, 701, 3472, 8, 62, 63, -1, -1, 7, NULL), + (54, 701, 3475, 2, 62, 64, -1, -1, 1, NULL), + (55, 701, 3476, 1, 62, 64, -1, -1, 1, NULL), + (56, 701, 4091, 8, 62, 66, -1, -1, 6, NULL), + (57, 701, 3482, 1, 63, 65, -1, -1, 1, NULL), + (58, 701, 4108, 8, 64, 66, -1, -1, 7, NULL), + (59, 701, 3474, 8, 65, 69, -1, -1, 11, NULL), + (60, 701, 3479, 8, 65, 66, -1, -1, 10, NULL), + (61, 701, 4882, 2, 65, 66, -1, -1, 1, NULL), + (62, 701, 4973, 1, 65, 66, -1, -1, 1, NULL), + (63, 701, 5254, 1, 66, 67, -1, -1, 1, NULL), + (64, 701, 5257, 8, 67, 69, -1, -1, 10, NULL), + (65, 701, 5258, 8, 67, 68, -1, -1, 7, NULL), + (66, 701, 5259, 2, 67, 255, -1, -1, 1, NULL), + (67, 701, 5260, 1, 67, 68, -1, -1, 1, NULL), + (68, 701, 5261, 8, 67, 255, -1, -1, 6, NULL), + (69, 701, 5266, 1, 68, 255, -1, -1, 1, NULL), + (70, 701, 5272, 8, 69, 255, -1, -1, 7, NULL), + (71, 701, 8006, 1, 69, 69, -1, -1, 1, NULL), + (72, 701, 5276, 8, 70, 255, -1, -1, 11, NULL), + (73, 701, 5278, 8, 70, 255, -1, -1, 10, NULL), + (74, 701, 5279, 1, 70, 255, -1, -1, 1, NULL), + (75, 701, 6140, 2, 70, 255, -1, -1, 2, NULL), + (76, 702, 288, 8, 1, 5, -1, -1, 1, NULL), + (77, 702, 372, 1, 1, 7, -1, -1, 3, NULL), + (78, 702, 378, 8, 2, 9, -1, -1, 2, NULL), + (79, 702, 230, 4, 3, 16, -1, -1, 2, NULL), + (80, 702, 376, 1, 4, 4, -1, -1, 3, NULL), + (81, 702, 477, 1, 5, 14, -1, -1, 3, NULL), + (82, 702, 246, 8, 6, 14, -1, -1, 1, NULL), + (83, 702, 656, 1, 8, 23, -1, -1, 3, NULL), + (84, 702, 381, 8, 9, 60, -1, -1, 4, NULL), + (85, 702, 2551, 8, 10, 30, -1, -1, 2, NULL), + (86, 702, 383, 1, 10, 15, -1, -1, 3, NULL), + (87, 702, 48, 512, 11, 33, -1, -1, 1, NULL), + (88, 702, 236, 8, 13, 20, -1, -1, 5, NULL), + (89, 702, 309, 8, 15, 22, -1, -1, 1, NULL), + (90, 702, 657, 1, 15, 25, -1, -1, 3, NULL), + (91, 702, 38, 1, 16, 36, -1, -1, 3, NULL), + (92, 702, 131, 4, 17, 38, -1, -1, 2, NULL), + (93, 702, 22, 1, 17, 17, -1, -1, 3, NULL), + (94, 702, 2552, 1, 18, 27, -1, -1, 3, NULL), + (95, 702, 503, 1, 19, 46, -1, -1, 2, NULL), + (96, 702, 108, 8, 20, 41, -1, -1, 6, NULL), + (97, 702, 387, 8, 21, 29, -1, -1, 5, NULL), + (98, 702, 65, 8, 23, 32, -1, -1, 1, NULL), + (99, 702, 464, 1, 24, 33, -1, -1, 3, NULL), + (100, 702, 2553, 32, 25, 44, -1, -1, 0, NULL), + (101, 702, 465, 1, 26, 42, -1, -1, 3, NULL), + (102, 702, 470, 1, 28, 40, -1, -1, 3, NULL), + (103, 702, 393, 8, 30, 39, -1, -1, 5, NULL), + (104, 702, 1419, 8, 31, 48, -1, -1, 2, NULL), + (105, 702, 66, 8, 33, 43, -1, -1, 1, NULL), + (106, 702, 49, 512, 34, 52, -1, -1, 1, NULL), + (107, 702, 658, 1, 34, 48, -1, -1, 3, NULL), + (108, 702, 466, 1, 37, 57, -1, -1, 3, NULL), + (109, 702, 752, 16, 37, 59, -1, -1, 1, NULL), + (110, 702, 132, 4, 39, 47, -1, -1, 2, NULL), + (111, 702, 3811, 8, 40, 57, -1, -1, 3, NULL), + (112, 702, 394, 8, 40, 51, -1, -1, 5, NULL), + (113, 702, 23, 1, 41, 46, -1, -1, 3, NULL), + (114, 702, 109, 8, 42, 53, -1, -1, 6, NULL), + (115, 702, 659, 1, 43, 59, -1, -1, 3, NULL), + (116, 702, 67, 8, 44, 53, -1, -1, 1, NULL), + (117, 702, 2555, 32, 45, 53, -1, -1, 0, NULL), + (118, 702, 612, 1, 47, 50, -1, -1, 2, NULL), + (119, 702, 755, 1, 47, 59, -1, -1, 3, NULL), + (120, 702, 133, 4, 48, 50, -1, -1, 2, NULL), + (121, 702, 4067, 8, 49, 56, -1, -1, 2, NULL), + (122, 702, 732, 1, 49, 59, -1, -1, 3, NULL), + (123, 702, 1631, 128, 51, 57, -1, -1, 2, NULL), + (124, 702, 1634, 1, 51, 55, -1, -1, 2, NULL), + (125, 702, 1609, 8, 52, 62, -1, -1, 5, NULL), + (126, 702, 1526, 512, 53, 255, -1, -1, 1, NULL), + (127, 702, 1610, 8, 54, 60, -1, -1, 1, NULL), + (128, 702, 2557, 32, 54, 59, -1, -1, 0, NULL), + (129, 702, 3582, 8, 54, 61, -1, -1, 6, NULL), + (130, 702, 1635, 1, 56, 63, -1, -1, 2, NULL), + (131, 702, 4068, 8, 57, 63, -1, -1, 2, NULL), + (132, 702, 1633, 4, 58, 60, -1, -1, 2, NULL), + (133, 702, 1640, 1, 58, 60, -1, -1, 3, NULL), + (134, 702, 2559, 8, 58, 255, -1, -1, 3, NULL), + (135, 702, 2884, 1, 60, 64, -1, -1, 3, NULL), + (136, 702, 2116, 1, 60, 63, -1, -1, 3, NULL), + (137, 702, 2117, 16, 60, 255, -1, -1, 1, NULL), + (138, 702, 2560, 32, 60, 255, -1, -1, 0, NULL), + (139, 702, 2883, 1, 60, 62, -1, -1, 3, NULL), + (140, 702, 3194, 4, 61, 255, -1, -1, 2, NULL), + (141, 702, 3300, 8, 61, 63, -1, -1, 1, NULL), + (142, 702, 3326, 8, 61, 255, -1, -1, 4, NULL), + (143, 702, 3328, 1, 61, 66, -1, -1, 3, NULL), + (144, 702, 3329, 8, 62, 255, -1, -1, 6, NULL), + (145, 702, 3301, 8, 63, 67, -1, -1, 5, NULL), + (146, 702, 3335, 1, 63, 64, -1, -1, 3, NULL), + (147, 702, 3302, 8, 64, 65, -1, -1, 1, NULL), + (148, 702, 4069, 8, 64, 69, -1, -1, 2, NULL), + (149, 702, 4066, 1, 64, 68, -1, -1, 3, NULL), + (150, 702, 3333, 1, 64, 69, -1, -1, 2, NULL), + (151, 702, 4981, 1, 65, 69, -1, -1, 3, NULL), + (152, 702, 3191, 1, 65, 255, -1, -1, 3, NULL), + (153, 702, 5443, 8, 66, 255, -1, -1, 1, NULL), + (154, 702, 5445, 1, 67, 67, -1, -1, 3, NULL), + (155, 702, 5448, 8, 68, 255, -1, -1, 5, NULL), + (156, 702, 5450, 1, 68, 255, -1, -1, 3, NULL), + (157, 702, 5458, 1, 69, 255, -1, -1, 3, NULL), + (158, 702, 5459, 8, 70, 255, -1, -1, 2, NULL), + (159, 702, 8043, 1, 70, 255, -1, -1, 3, NULL), + (160, 702, 5456, 1, 70, 255, -1, -1, 3, NULL), + (161, 703, 288, 8, 1, 7, -1, -1, 1, NULL), + (162, 703, 340, 256, 1, 14, -1, -1, 2, NULL), + (163, 703, 341, 64, 1, 2, -1, -1, 3, NULL), + (164, 703, 338, 32, 1, 3, -1, -1, 0, NULL), + (165, 703, 346, 8, 3, 15, -1, -1, 3, NULL), + (166, 703, 502, 64, 3, 11, -1, -1, 3, NULL), + (167, 703, 344, 128, 4, 10, -1, -1, 1, NULL), + (168, 703, 229, 1, 4, 29, -1, 45, 6, NULL), + (169, 703, 348, 256, 4, 33, -1, -1, 3, NULL), + (170, 703, 491, 32, 4, 7, -1, -1, 0, NULL), + (171, 703, 641, 8, 6, 17, -1, -1, 4, NULL), + (172, 703, 359, 8, 7, 19, -1, -1, 5, NULL), + (173, 703, 246, 8, 8, 15, -1, -1, 1, NULL), + (174, 703, 351, 32, 8, 11, -1, -1, 0, NULL), + (175, 703, 1509, 256, 9, 28, -1, -1, 3, NULL), + (176, 703, 360, 256, 10, 27, -1, -1, 3, NULL), + (177, 703, 2541, 8, 11, 22, -1, -1, 6, NULL), + (178, 703, 355, 128, 11, 26, -1, -1, 1, NULL), + (179, 703, 362, 32, 12, 15, -1, -1, 0, NULL), + (180, 703, 445, 64, 12, 19, -1, -1, 3, NULL), + (181, 703, 367, 256, 13, 38, -1, -1, 3, NULL), + (182, 703, 236, 8, 14, 21, -1, -1, 2, NULL), + (183, 703, 365, 256, 15, 34, -1, -1, 3, NULL), + (184, 703, 309, 8, 16, 20, -1, -1, 1, NULL), + (185, 703, 492, 32, 16, 19, -1, -1, 0, NULL), + (186, 703, 2542, 1, 17, 37, -1, -1, 2, NULL), + (187, 703, 642, 8, 18, 30, -1, -1, 4, NULL), + (188, 703, 199, 16, 20, 57, -1, -1, 1, NULL), + (189, 703, 440, 32, 20, 23, -1, -1, 0, NULL), + (190, 703, 446, 64, 20, 25, -1, -1, 3, NULL), + (191, 703, 204, 1, 21, 31, -1, -1, 5, NULL), + (192, 703, 387, 8, 22, 31, -1, -1, 2, NULL), + (193, 703, 449, 8, 23, 34, -1, -1, 6, NULL), + (194, 703, 493, 32, 24, 28, -1, -1, 0, NULL), + (195, 703, 524, 64, 26, 38, -1, -1, 3, NULL), + (196, 703, 452, 128, 27, 46, -1, -1, 1, NULL), + (197, 703, 451, 256, 28, 46, -1, -1, 3, NULL), + (198, 703, 441, 32, 29, 32, -1, -1, 0, NULL), + (199, 703, 454, 256, 29, 44, -1, -1, 3, NULL), + (200, 703, 127, 1, 30, 55, -1, 45, 6, NULL), + (201, 703, 643, 8, 31, 47, -1, -1, 4, NULL), + (202, 703, 1415, 1, 32, 48, -1, -1, 5, NULL), + (203, 703, 393, 8, 32, 42, -1, -1, 2, NULL), + (204, 703, 494, 32, 33, 38, -1, -1, 0, NULL), + (205, 703, 435, 256, 34, 49, -1, -1, 3, NULL), + (206, 703, 31, 256, 35, 39, -1, -1, 3, NULL), + (207, 703, 661, 8, 35, 54, -1, -1, 6, NULL), + (208, 703, 2544, 1, 38, 255, -1, -1, 2, NULL), + (209, 703, 442, 32, 39, 43, -1, -1, 0, NULL), + (210, 703, 525, 64, 39, 47, -1, -1, 3, NULL), + (211, 703, 4096, 256, 39, 53, -1, -1, 3, NULL), + (212, 703, 1508, 256, 40, 51, -1, -1, 3, NULL), + (213, 703, 394, 8, 43, 51, -1, -1, 2, NULL), + (214, 703, 495, 32, 44, 47, -1, -1, 0, NULL), + (215, 703, 3702, 256, 45, 48, -1, -1, 3, NULL), + (216, 703, 453, 128, 47, 58, -1, -1, 1, NULL), + (217, 703, 6, 256, 47, 57, -1, -1, 3, NULL), + (218, 703, 443, 32, 48, 52, -1, -1, 0, NULL), + (219, 703, 447, 64, 48, 53, -1, -1, 3, NULL), + (220, 703, 644, 8, 48, 55, -1, -1, 4, NULL), + (221, 703, 3571, 1, 49, 53, -1, -1, 5, NULL), + (222, 703, 456, 256, 49, 56, -1, -1, 3, NULL), + (223, 703, 436, 256, 50, 64, -1, -1, 3, NULL), + (224, 703, 1609, 8, 52, 62, -1, -1, 2, NULL), + (225, 703, 32, 256, 52, 55, -1, -1, 3, NULL), + (226, 703, 1621, 32, 53, 55, -1, -1, 0, NULL), + (227, 703, 3572, 1, 54, 59, -1, -1, 5, NULL), + (228, 703, 1613, 64, 54, 58, -1, -1, 3, NULL), + (229, 703, 4097, 256, 54, 62, -1, -1, 3, NULL), + (230, 703, 1414, 8, 55, 61, -1, -1, 6, NULL), + (231, 703, 1527, 1, 56, 56, -1, 45, 6, NULL), + (232, 703, 1611, 8, 56, 59, -1, -1, 4, NULL), + (233, 703, 1615, 256, 56, 66, -1, -1, 3, NULL), + (234, 703, 1622, 32, 56, 58, -1, -1, 0, NULL), + (235, 703, 1616, 256, 57, 59, -1, -1, 3, NULL), + (236, 703, 6980, 1, 57, 61, -1, -1, 6, NULL), + (237, 703, 1612, 16, 58, 255, -1, -1, 1, NULL), + (238, 703, 1617, 256, 58, 59, -1, -1, 3, NULL), + (239, 703, 1619, 128, 59, 62, -1, -1, 1, NULL), + (240, 703, 1623, 32, 59, 60, -1, -1, 0, NULL), + (241, 703, 1618, 64, 59, 59, -1, -1, 3, NULL), + (242, 703, 1393, 64, 60, 60, -1, -1, 3, NULL), + (243, 703, 2114, 8, 60, 63, -1, -1, 4, NULL), + (244, 703, 2115, 1, 60, 60, -1, -1, 5, NULL), + (245, 703, 2550, 256, 60, 64, -1, -1, 3, NULL), + (246, 703, 2885, 256, 60, 64, -1, -1, 3, NULL), + (247, 703, 3032, 64, 61, 66, -1, -1, 3, NULL), + (248, 703, 3035, 1, 61, 65, -1, -1, 5, NULL), + (249, 703, 3304, 32, 61, 62, -1, -1, 0, NULL), + (250, 703, 3305, 8, 62, 66, -1, -1, 6, NULL), + (251, 703, 6981, 1, 62, 66, -1, -1, 6, NULL), + (252, 703, 3301, 8, 63, 68, -1, -1, 2, NULL), + (253, 703, 3309, 128, 63, 67, -1, -1, 1, NULL), + (254, 703, 3310, 32, 63, 64, -1, -1, 0, NULL), + (255, 703, 4098, 256, 63, 66, -1, -1, 3, NULL), + (256, 703, 3311, 8, 64, 64, -1, -1, 4, NULL), + (257, 703, 3303, 256, 65, 68, -1, -1, 3, NULL), + (258, 703, 3314, 32, 65, 66, -1, -1, 0, NULL), + (259, 703, 4889, 256, 65, 255, -1, -1, 3, NULL), + (260, 703, 4890, 256, 65, 68, -1, -1, 3, NULL), + (261, 703, 4978, 8, 65, 69, -1, -1, 4, NULL), + (262, 703, 5420, 1, 66, 255, -1, -1, 5, NULL), + (263, 703, 5419, 64, 67, 69, -1, -1, 3, NULL), + (264, 703, 5424, 256, 67, 255, -1, -1, 3, NULL), + (265, 703, 5425, 8, 67, 255, -1, -1, 6, NULL), + (266, 703, 5431, 32, 67, 69, -1, -1, 0, NULL), + (267, 703, 5432, 256, 67, 69, -1, -1, 3, NULL), + (268, 703, 6982, 1, 67, 255, -1, -1, 6, NULL), + (269, 703, 5430, 128, 68, 255, -1, -1, 1, NULL), + (270, 703, 5428, 8, 69, 255, -1, -1, 2, NULL), + (271, 703, 5437, 256, 69, 69, -1, -1, 3, NULL), + (272, 703, 7999, 256, 69, 255, -1, -1, 3, NULL), + (273, 703, 5438, 32, 70, 255, -1, -1, 0, NULL), + (274, 703, 5441, 256, 70, 255, -1, -1, 3, NULL), + (275, 703, 6143, 64, 70, 255, -1, -1, 3, NULL), + (276, 703, 7994, 256, 70, 255, -1, -1, 3, NULL), + (277, 703, 5434, 8, 70, 255, -1, -1, 4, NULL), + (278, 704, 288, 8, 1, 4, -1, -1, 1, NULL), + (279, 704, 93, 1, 1, 3, -1, -1, 5, NULL), + (280, 704, 315, 32, 2, 5, -1, -1, 0, NULL), + (281, 704, 316, 32, 3, 6, -1, -1, 0, NULL), + (282, 704, 317, 32, 4, 7, -1, -1, 0, NULL), + (283, 704, 94, 1, 4, 4, -1, -1, 5, NULL), + (284, 704, 58, 32, 5, 8, -1, -1, 0, NULL), + (285, 704, 246, 8, 5, 15, -1, -1, 1, NULL), + (286, 704, 322, 1, 5, 14, -1, -1, 5, NULL), + (287, 704, 398, 32, 6, 9, -1, -1, 0, NULL), + (288, 704, 399, 32, 7, 10, -1, -1, 0, NULL), + (289, 704, 324, 1, 7, 22, -1, -1, 6, NULL), + (290, 704, 332, 8, 7, 18, -1, -1, 2, NULL), + (291, 704, 400, 32, 8, 11, -1, -1, 0, NULL), + (292, 704, 397, 32, 9, 12, -1, -1, 0, NULL), + (293, 704, 248, 1, 9, 17, -1, -1, 3, NULL), + (294, 704, 402, 32, 10, 13, -1, -1, 0, NULL), + (295, 704, 403, 32, 11, 14, -1, -1, 0, NULL), + (296, 704, 327, 8, 11, 28, -1, -1, 3, NULL), + (297, 704, 404, 32, 12, 15, -1, -1, 0, NULL), + (298, 704, 333, 8, 12, 24, -1, -1, 4, NULL), + (299, 704, 401, 32, 13, 16, -1, -1, 0, NULL), + (300, 704, 336, 32, 14, 17, -1, -1, 0, NULL), + (301, 704, 395, 32, 15, 18, -1, -1, 0, NULL), + (302, 704, 334, 1, 15, 17, -1, -1, 5, NULL), + (303, 704, 396, 32, 16, 19, -1, -1, 0, NULL), + (304, 704, 309, 8, 16, 23, -1, -1, 1, NULL), + (305, 704, 335, 32, 17, 20, -1, -1, 0, NULL), + (306, 704, 497, 32, 18, 21, -1, -1, 0, NULL), + (307, 704, 68, 1, 18, 30, -1, -1, 5, NULL), + (308, 704, 663, 1, 18, 24, -1, -1, 3, NULL), + (309, 704, 498, 32, 19, 22, -1, -1, 0, NULL), + (310, 704, 411, 8, 19, 27, -1, -1, 2, NULL), + (311, 704, 499, 32, 20, 23, -1, -1, 0, NULL), + (312, 704, 496, 32, 21, 24, -1, -1, 0, NULL), + (313, 704, 570, 32, 22, 25, -1, -1, 0, NULL), + (314, 704, 571, 32, 23, 26, -1, -1, 0, NULL), + (315, 704, 113, 1, 23, 40, -1, -1, 6, NULL), + (316, 704, 572, 32, 24, 27, -1, -1, 0, NULL), + (317, 704, 65, 8, 24, 31, -1, -1, 1, NULL), + (318, 704, 569, 32, 25, 28, -1, -1, 0, NULL), + (319, 704, 115, 1, 25, 27, -1, -1, 3, NULL), + (320, 704, 81, 8, 25, 40, -1, -1, 4, NULL), + (321, 704, 574, 32, 26, 30, -1, -1, 0, NULL), + (322, 704, 575, 32, 27, 31, -1, -1, 0, NULL), + (323, 704, 576, 32, 28, 32, -1, -1, 0, NULL), + (324, 704, 479, 8, 28, 37, -1, -1, 2, NULL), + (325, 704, 664, 1, 28, 47, -1, -1, 3, NULL), + (326, 704, 106, 8, 28, 46, -1, -1, 3, NULL), + (327, 704, 573, 32, 29, 33, -1, -1, 0, NULL), + (328, 704, 1400, 32, 30, 49, -1, -1, 0, NULL), + (329, 704, 621, 32, 31, 35, -1, -1, 0, NULL), + (330, 704, 120, 1, 31, 32, -1, -1, 5, NULL), + (331, 704, 622, 32, 32, 36, -1, -1, 0, NULL), + (332, 704, 49, 512, 32, 52, -1, -1, 3, NULL), + (333, 704, 66, 8, 32, 42, -1, -1, 1, NULL), + (334, 704, 623, 32, 33, 37, -1, -1, 0, NULL), + (335, 704, 69, 1, 33, 46, -1, -1, 5, NULL), + (336, 704, 620, 32, 34, 38, -1, -1, 0, NULL), + (337, 704, 625, 32, 36, 40, -1, -1, 0, NULL), + (338, 704, 626, 32, 37, 41, -1, -1, 0, NULL), + (339, 704, 627, 32, 38, 42, -1, -1, 0, NULL), + (340, 704, 680, 8, 38, 44, -1, -1, 2, NULL), + (341, 704, 624, 32, 39, 43, -1, -1, 0, NULL), + (342, 704, 629, 32, 41, 48, -1, -1, 0, NULL), + (343, 704, 114, 1, 41, 56, -1, -1, 6, NULL), + (344, 704, 82, 8, 41, 51, -1, -1, 4, NULL), + (345, 704, 630, 32, 42, 46, -1, -1, 0, NULL), + (346, 704, 631, 32, 43, 47, -1, -1, 0, NULL), + (347, 704, 1403, 1, 43, 54, -1, -1, 4, NULL), + (348, 704, 67, 8, 43, 53, -1, -1, 1, NULL), + (349, 704, 628, 32, 44, 45, -1, -1, 0, NULL), + (350, 704, 412, 8, 45, 52, -1, -1, 2, NULL), + (351, 704, 632, 32, 46, 50, -1, -1, 0, NULL), + (352, 704, 4079, 8, 46, 57, -1, -1, 5, NULL), + (353, 704, 634, 32, 47, 51, -1, -1, 0, NULL), + (354, 704, 107, 8, 47, 51, -1, -1, 3, NULL), + (355, 704, 70, 1, 47, 51, -1, -1, 5, NULL), + (356, 704, 635, 32, 48, 52, -1, -1, 0, NULL), + (357, 704, 116, 1, 48, 55, -1, -1, 3, NULL), + (358, 704, 633, 32, 49, 53, -1, -1, 0, NULL), + (359, 704, 1402, 32, 50, 59, -1, -1, 0, NULL), + (360, 704, 1671, 32, 51, 56, -1, -1, 0, NULL), + (361, 704, 1673, 32, 52, 57, -1, -1, 0, NULL), + (362, 704, 1660, 1, 52, 58, -1, -1, 5, NULL), + (363, 704, 1666, 8, 52, 53, -1, -1, 4, NULL), + (364, 704, 3700, 8, 52, 54, -1, -1, 3, NULL), + (365, 704, 1674, 32, 53, 58, -1, -1, 0, NULL), + (366, 704, 1526, 512, 53, 255, -1, -1, 3, NULL), + (367, 704, 1668, 8, 53, 55, -1, -1, 2, NULL), + (368, 704, 1672, 32, 54, 59, -1, -1, 0, NULL), + (369, 704, 1610, 8, 54, 60, -1, -1, 1, NULL), + (370, 704, 2879, 8, 54, 57, -1, -1, 4, NULL), + (371, 704, 1405, 1, 55, 255, -1, -1, 4, NULL), + (372, 704, 1472, 8, 55, 59, -1, -1, 3, NULL), + (373, 704, 1529, 1, 56, 63, -1, -1, 3, NULL), + (374, 704, 1667, 8, 56, 59, -1, -1, 2, NULL), + (375, 704, 1675, 32, 57, 64, -1, -1, 0, NULL), + (376, 704, 1663, 1, 57, 62, -1, -1, 6, NULL), + (377, 704, 1677, 32, 58, 62, -1, -1, 0, NULL), + (378, 704, 2539, 8, 58, 61, -1, -1, 4, NULL), + (379, 704, 4080, 8, 58, 63, -1, -1, 5, NULL), + (380, 704, 1678, 32, 59, 60, -1, -1, 0, NULL), + (381, 704, 1664, 1, 59, 60, -1, -1, 5, NULL), + (382, 704, 1404, 32, 60, 64, -1, -1, 0, NULL), + (383, 704, 1676, 32, 60, 61, -1, -1, 0, NULL), + (384, 704, 1669, 8, 60, 60, -1, -1, 2, NULL), + (385, 704, 2119, 8, 60, 61, -1, -1, 3, NULL), + (386, 704, 3317, 32, 61, 65, -1, -1, 0, NULL), + (387, 704, 3198, 8, 61, 62, -1, -1, 2, NULL), + (388, 704, 3300, 8, 61, 63, -1, -1, 1, NULL), + (389, 704, 3318, 1, 61, 65, -1, -1, 5, NULL), + (390, 704, 3320, 32, 62, 66, -1, -1, 0, NULL), + (391, 704, 3031, 8, 62, 67, -1, -1, 4, NULL), + (392, 704, 3237, 8, 62, 68, -1, -1, 3, NULL), + (393, 704, 3322, 32, 63, 67, -1, -1, 0, NULL), + (394, 704, 3486, 8, 63, 65, -1, -1, 2, NULL), + (395, 704, 3321, 1, 63, 67, -1, -1, 6, NULL), + (396, 704, 3238, 1, 64, 68, -1, -1, 3, NULL), + (397, 704, 3302, 8, 64, 65, -1, -1, 1, NULL), + (398, 704, 4081, 8, 64, 68, -1, -1, 5, NULL), + (399, 704, 4888, 32, 65, 255, -1, -1, 0, NULL), + (400, 704, 3324, 32, 65, 69, -1, -1, 0, NULL), + (401, 704, 5473, 32, 66, 255, -1, -1, 0, NULL), + (402, 704, 5466, 8, 66, 69, -1, -1, 2, NULL), + (403, 704, 5472, 8, 66, 255, -1, -1, 1, NULL), + (404, 704, 5474, 1, 66, 255, -1, -1, 5, NULL), + (405, 704, 5480, 32, 67, 255, -1, -1, 0, NULL), + (406, 704, 5485, 32, 68, 255, -1, -1, 0, NULL), + (407, 704, 5476, 8, 68, 255, -1, -1, 4, NULL), + (408, 704, 5484, 1, 68, 255, -1, -1, 6, NULL), + (409, 704, 5478, 8, 69, 255, -1, -1, 3, NULL), + (410, 704, 5490, 1, 69, 255, -1, -1, 3, NULL), + (411, 704, 5494, 8, 69, 255, -1, -1, 5, NULL), + (412, 704, 5495, 32, 70, 255, -1, -1, 0, NULL), + (413, 704, 5488, 8, 70, 255, -1, -1, 2, NULL), + (414, 705, 288, 8, 1, 5, -1, -1, 1, NULL), + (415, 705, 40, 8, 1, 18, -1, -1, 2, NULL), + (416, 705, 289, 1, 1, 6, -1, -1, 7, NULL), + (417, 705, 286, 1, 1, 3, -1, -1, 6, NULL), + (418, 705, 285, 32, 1, 1, -1, -1, 0, NULL), + (419, 705, 681, 32, 2, 6, -1, -1, 0, NULL), + (420, 705, 294, 1, 4, 10, -1, -1, 6, NULL), + (421, 705, 246, 8, 6, 15, -1, -1, 1, NULL), + (422, 705, 295, 32, 7, 8, -1, -1, 0, NULL), + (423, 705, 296, 1, 7, 15, -1, -1, 7, NULL), + (424, 705, 48, 512, 7, 21, -1, -1, 7, NULL), + (425, 705, 302, 1, 9, 22, -1, -1, 2, NULL), + (426, 705, 303, 1, 9, 27, -1, -1, 5, NULL), + (427, 705, 682, 32, 9, 13, -1, -1, 0, NULL), + (428, 705, 2561, 8, 11, 16, -1, -1, 4, NULL), + (429, 705, 521, 1, 11, 25, -1, -1, 6, NULL), + (430, 705, 683, 32, 14, 16, -1, -1, 0, NULL), + (431, 705, 697, 8, 14, 25, -1, -1, 5, NULL), + (432, 705, 39, 8, 15, 20, -1, -1, 6, NULL), + (433, 705, 309, 8, 16, 22, -1, -1, 1, NULL), + (434, 705, 306, 1, 16, 20, -1, -1, 7, NULL), + (435, 705, 2562, 8, 17, 29, -1, -1, 4, NULL), + (436, 705, 684, 32, 17, 21, -1, -1, 0, NULL), + (437, 705, 170, 8, 21, 38, -1, -1, 6, NULL), + (438, 705, 350, 1, 21, 31, -1, -1, 7, NULL), + (439, 705, 24, 512, 22, 27, -1, -1, 7, NULL), + (440, 705, 685, 32, 22, 28, -1, -1, 0, NULL), + (441, 705, 185, 1, 23, 40, -1, -1, 2, NULL), + (442, 705, 65, 8, 23, 30, -1, -1, 1, NULL), + (443, 705, 174, 8, 26, 41, -1, -1, 5, NULL), + (444, 705, 450, 1, 26, 46, -1, -1, 6, NULL), + (445, 705, 49, 512, 28, 41, -1, -1, 7, NULL), + (446, 705, 619, 1, 28, 60, -1, -1, 5, NULL), + (447, 705, 4073, 8, 29, 43, -1, -1, 2, NULL), + (448, 705, 686, 32, 29, 30, -1, -1, 0, NULL), + (449, 705, 74, 1, 30, 49, -1, -1, 7, NULL), + (450, 705, 66, 8, 31, 39, -1, -1, 1, NULL), + (451, 705, 687, 32, 31, 36, -1, -1, 0, NULL), + (452, 705, 71, 1, 32, 42, -1, -1, 7, NULL), + (453, 705, 1408, 8, 34, 54, -1, -1, 3, NULL), + (454, 705, 688, 32, 37, 40, -1, -1, 0, NULL), + (455, 705, 171, 8, 39, 46, -1, -1, 7, NULL), + (456, 705, 1474, 8, 40, 62, -1, -1, 1, NULL), + (457, 705, 186, 1, 41, 56, -1, -1, 2, NULL), + (458, 705, 689, 32, 41, 47, -1, -1, 0, NULL), + (459, 705, 1694, 8, 42, 51, -1, -1, 5, NULL), + (460, 705, 25, 512, 42, 52, -1, -1, 7, NULL), + (461, 705, 673, 1, 43, 53, -1, -1, 7, NULL), + (462, 705, 4074, 1, 44, 54, -1, -1, 2, NULL), + (463, 705, 172, 8, 47, 52, -1, -1, 6, NULL), + (464, 705, 195, 1, 47, 58, -1, -1, 6, NULL), + (465, 705, 690, 32, 48, 54, -1, -1, 0, NULL), + (466, 705, 1686, 1, 50, 255, -1, -1, 7, NULL), + (467, 705, 1693, 8, 52, 55, -1, -1, 5, NULL), + (468, 705, 1697, 512, 53, 255, -1, -1, 7, NULL), + (469, 705, 1708, 8, 53, 57, -1, -1, 6, NULL), + (470, 705, 1698, 1, 54, 255, -1, -1, 7, NULL), + (471, 705, 1723, 32, 55, 61, -1, -1, 0, NULL), + (472, 705, 4075, 8, 55, 62, -1, -1, 2, NULL), + (473, 705, 1409, 8, 55, 59, -1, -1, 3, NULL), + (474, 705, 1695, 8, 56, 59, -1, -1, 5, NULL), + (475, 705, 1712, 1, 57, 68, -1, -1, 2, NULL), + (476, 705, 1709, 8, 58, 59, -1, -1, 6, NULL), + (477, 705, 1703, 1, 59, 61, -1, -1, 6, NULL), + (478, 705, 1710, 8, 60, 61, -1, -1, 6, NULL), + (479, 705, 2570, 8, 60, 62, -1, -1, 5, NULL), + (480, 705, 6739, 8, 61, 66, -1, -1, 4, NULL), + (481, 705, 3199, 8, 61, 65, -1, -1, 3, NULL), + (482, 705, 3229, 16, 61, 255, -1, -1, 1, NULL), + (483, 705, 3034, 32, 62, 65, -1, -1, 0, NULL), + (484, 705, 3240, 8, 62, 64, -1, -1, 6, NULL), + (485, 705, 3345, 1, 62, 68, -1, -1, 6, NULL), + (486, 705, 3350, 8, 63, 64, -1, -1, 5, NULL), + (487, 705, 4076, 8, 63, 67, -1, -1, 2, NULL), + (488, 705, 3241, 8, 63, 255, -1, -1, 1, NULL), + (489, 705, 3178, 8, 65, 66, -1, -1, 6, NULL), + (490, 705, 3360, 8, 65, 67, -1, -1, 5, NULL), + (491, 705, 5500, 8, 66, 255, -1, -1, 3, NULL), + (492, 705, 5505, 32, 66, 255, -1, -1, 0, NULL), + (493, 705, 5504, 8, 67, 68, -1, -1, 4, NULL), + (494, 705, 5507, 8, 67, 69, -1, -1, 6, NULL), + (495, 705, 5513, 8, 68, 69, -1, -1, 5, NULL), + (496, 705, 5515, 8, 68, 69, -1, -1, 2, NULL), + (497, 705, 5509, 1, 69, 255, -1, -1, 6, NULL), + (498, 705, 6671, 8, 69, 255, -1, -1, 4, NULL), + (499, 705, 6826, 1, 69, 255, -1, -1, 2, NULL), + (500, 705, 5517, 8, 70, 255, -1, -1, 2, NULL), + (501, 705, 5521, 8, 70, 255, -1, -1, 6, NULL), + (502, 705, 5522, 8, 70, 255, -1, -1, 5, NULL), + (503, 706, 266, 8, 1, 20, -1, -1, 1, NULL), + (504, 706, 40, 8, 1, 7, -1, -1, 2, NULL), + (505, 706, 267, 8, 1, 31, -1, -1, 3, NULL), + (506, 706, 93, 1, 1, 3, -1, -1, 1, NULL), + (507, 706, 200, 2, 1, 18, -1, -1, 2, NULL), + (508, 706, 274, 8, 3, 10, -1, -1, 9, NULL), + (509, 706, 269, 8, 3, 17, -1, -1, 10, NULL), + (510, 706, 275, 1, 4, 13, -1, -1, 5, NULL), + (511, 706, 75, 256, 4, 14, -1, -1, 4, NULL), + (512, 706, 270, 256, 5, 12, -1, -1, 2, NULL), + (513, 706, 279, 8, 6, 21, -1, -1, 11, NULL), + (514, 706, 2521, 8, 8, 17, -1, -1, 2, NULL), + (515, 706, 277, 256, 8, 23, -1, -1, 4, NULL), + (516, 706, 17, 2, 9, 18, -1, -1, 2, NULL), + (517, 706, 283, 8, 11, 19, -1, -1, 9, NULL), + (518, 706, 281, 1, 12, 28, -1, -1, 3, NULL), + (519, 706, 505, 1, 13, 26, -1, -1, 2, NULL), + (520, 706, 365, 256, 15, 18, -1, -1, 4, NULL), + (521, 706, 282, 1, 14, 22, -1, -1, 5, NULL), + (522, 706, 526, 1, 17, 37, -1, -1, 4, NULL), + (523, 706, 110, 1, 18, 31, -1, -1, 1, NULL), + (524, 706, 147, 8, 18, 27, -1, -1, 2, NULL), + (525, 706, 148, 8, 18, 30, -1, -1, 10, NULL), + (526, 706, 12, 2, 19, 28, -1, -1, 2, NULL), + (527, 706, 511, 256, 19, 30, -1, -1, 4, NULL), + (528, 706, 649, 8, 20, 25, -1, -1, 9, NULL), + (529, 706, 146, 8, 21, 24, -1, -1, 1, NULL), + (530, 706, 149, 8, 21, 29, -1, -1, 11, NULL), + (531, 706, 144, 8, 23, 38, -1, -1, 12, NULL), + (532, 706, 508, 1, 23, 32, -1, -1, 5, NULL), + (533, 706, 434, 256, 24, 36, -1, -1, 4, NULL), + (534, 706, 349, 8, 25, 38, -1, -1, 1, NULL), + (535, 706, 39, 8, 26, 41, -1, -1, 9, NULL), + (536, 706, 506, 1, 27, 37, -1, -1, 2, NULL), + (537, 706, 151, 8, 28, 34, -1, -1, 2, NULL), + (538, 706, 15, 2, 29, 50, -1, -1, 2, NULL), + (539, 706, 162, 1, 29, 40, -1, -1, 3, NULL), + (540, 706, 161, 8, 30, 42, -1, -1, 11, NULL), + (541, 706, 160, 8, 31, 40, -1, -1, 10, NULL), + (542, 706, 31, 256, 31, 48, -1, -1, 4, NULL), + (543, 706, 111, 1, 32, 47, -1, -1, 1, NULL), + (544, 706, 164, 32, 32, 36, -1, -1, 0, NULL), + (545, 706, 1428, 8, 35, 38, -1, -1, 2, NULL), + (546, 706, 435, 256, 37, 48, -1, -1, 4, NULL), + (547, 706, 577, 32, 37, 40, -1, -1, 0, NULL), + (548, 706, 507, 1, 38, 50, -1, -1, 2, NULL), + (549, 706, 527, 1, 38, 51, -1, -1, 4, NULL), + (550, 706, 145, 8, 39, 51, -1, -1, 12, NULL), + (551, 706, 152, 8, 39, 47, -1, -1, 1, NULL), + (552, 706, 153, 8, 39, 45, -1, -1, 2, NULL), + (553, 706, 154, 8, 41, 52, -1, -1, 10, NULL), + (554, 706, 163, 1, 41, 52, -1, -1, 3, NULL), + (555, 706, 165, 32, 41, 44, -1, -1, 0, NULL), + (556, 706, 170, 8, 42, 55, -1, -1, 9, NULL), + (557, 706, 158, 8, 43, 53, -1, -1, 11, NULL), + (558, 706, 3694, 1024, 44, 59, -1, -1, 5, NULL), + (559, 706, 754, 1024, 44, 53, -1, -1, 6, NULL), + (560, 706, 166, 32, 45, 54, -1, -1, 0, NULL), + (561, 706, 159, 8, 46, 56, -1, -1, 2, NULL), + (562, 706, 112, 1, 48, 56, -1, -1, 1, NULL), + (563, 706, 157, 8, 48, 57, -1, -1, 1, NULL), + (564, 706, 32, 256, 49, 58, -1, -1, 4, NULL), + (565, 706, 436, 256, 49, 55, -1, -1, 4, NULL), + (566, 706, 1588, 1, 51, 64, -1, -1, 2, NULL), + (567, 706, 9, 2, 51, 54, -1, -1, 2, NULL), + (568, 706, 1568, 8, 52, 55, -1, -1, 12, NULL), + (569, 706, 1573, 1, 52, 62, -1, -1, 4, NULL), + (570, 706, 1592, 1, 53, 65, -1, -1, 3, NULL), + (571, 706, 1594, 8, 53, 56, -1, -1, 10, NULL), + (572, 706, 1595, 8, 54, 56, -1, -1, 11, NULL), + (573, 706, 1572, 1024, 54, 57, -1, -1, 6, NULL), + (574, 706, 1290, 2, 55, 57, -1, -1, 3, NULL), + (575, 706, 1574, 32, 55, 60, -1, -1, 0, NULL), + (576, 706, 171, 8, 56, 62, -1, -1, 9, NULL), + (577, 706, 2528, 8, 56, 60, -1, -1, 12, NULL), + (578, 706, 1590, 256, 56, 59, -1, -1, 4, NULL), + (579, 706, 1580, 8, 57, 61, -1, -1, 11, NULL), + (580, 706, 1577, 1, 57, 59, -1, -1, 1, NULL), + (581, 706, 1593, 8, 57, 57, -1, -1, 2, NULL), + (582, 706, 1579, 8, 57, 60, -1, -1, 10, NULL), + (583, 706, 1596, 8, 58, 58, -1, -1, 1, NULL), + (584, 706, 1581, 8, 58, 59, -1, -1, 2, NULL), + (585, 706, 1332, 1024, 58, 64, -1, -1, 6, NULL), + (586, 706, 1583, 8, 59, 59, -1, -1, 1, NULL), + (587, 706, 1591, 256, 59, 63, -1, -1, 4, NULL), + (588, 706, 2112, 8, 60, 64, -1, -1, 2, NULL), + (589, 706, 2530, 8, 60, 61, -1, -1, 1, NULL), + (590, 706, 2113, 256, 60, 64, -1, -1, 4, NULL), + (591, 706, 1578, 1, 60, 62, -1, -1, 1, NULL), + (592, 706, 1576, 1024, 60, 64, -1, -1, 5, NULL), + (593, 706, 3378, 8, 61, 61, -1, -1, 10, NULL), + (594, 706, 3433, 8, 61, 62, -1, -1, 12, NULL), + (595, 706, 3377, 32, 61, 66, -1, -1, 0, NULL), + (596, 706, 3235, 8, 62, 64, -1, -1, 1, NULL), + (597, 706, 3383, 8, 62, 67, -1, -1, 10, NULL), + (598, 706, 3382, 8, 62, 62, -1, -1, 11, NULL), + (599, 706, 3233, 2, 62, 64, -1, -1, 2, NULL), + (600, 706, 172, 8, 63, 63, -1, -1, 9, NULL), + (601, 706, 3389, 8, 63, 67, -1, -1, 11, NULL), + (602, 706, 3441, 8, 63, 65, -1, -1, 12, NULL), + (603, 706, 3386, 1, 63, 65, -1, -1, 4, NULL), + (604, 706, 3387, 1, 63, 64, -1, -1, 1, NULL), + (605, 706, 3391, 8, 64, 255, -1, -1, 9, NULL), + (606, 706, 3394, 256, 64, 66, -1, -1, 4, NULL), + (607, 706, 3397, 8, 65, 67, -1, -1, 1, NULL), + (608, 706, 3399, 8, 65, 69, -1, -1, 2, NULL), + (609, 706, 3396, 256, 65, 69, -1, -1, 4, NULL), + (610, 706, 4900, 1, 65, 68, -1, -1, 2, NULL), + (611, 706, 3395, 1, 65, 255, -1, -1, 1, NULL), + (612, 706, 4901, 2, 65, 67, -1, -1, 2, NULL), + (613, 706, 4899, 1024, 65, 69, -1, -1, 5, NULL), + (614, 706, 4979, 1024, 65, 69, -1, -1, 6, NULL), + (615, 706, 5393, 8, 66, 68, -1, -1, 12, NULL), + (616, 706, 5394, 1, 66, 255, -1, -1, 3, NULL), + (617, 706, 5392, 1, 66, 255, -1, -1, 4, NULL), + (618, 706, 5411, 256, 67, 255, -1, -1, 4, NULL), + (619, 706, 5389, 32, 67, 255, -1, -1, 0, NULL), + (620, 706, 5396, 8, 68, 69, -1, -1, 1, NULL), + (621, 706, 5398, 8, 68, 68, -1, -1, 11, NULL), + (622, 706, 5395, 2, 68, 69, -1, -1, 2, NULL), + (623, 706, 5399, 8, 68, 255, -1, -1, 10, NULL), + (624, 706, 5405, 8, 69, 255, -1, -1, 11, NULL), + (625, 706, 5406, 8, 69, 255, -1, -1, 12, NULL), + (626, 706, 6827, 1, 69, 255, -1, -1, 2, NULL), + (627, 706, 5416, 1024, 70, 255, -1, -1, 5, NULL), + (628, 706, 5418, 1024, 70, 255, -1, -1, 6, NULL), + (629, 706, 5415, 8, 70, 255, -1, -1, 1, NULL), + (630, 706, 5417, 8, 70, 255, -1, -1, 2, NULL), + (631, 706, 5414, 256, 70, 255, -1, -1, 4, NULL), + (632, 706, 6142, 2, 70, 255, -1, -1, 2, NULL), + (633, 707, 239, 256, 1, 24, -1, -1, 2, NULL), + (634, 707, 242, 128, 1, 25, -1, -1, 1, NULL), + (635, 707, 93, 1, 1, 2, -1, -1, 3, NULL), + (636, 707, 200, 2, 1, 8, -1, -1, 2, NULL), + (637, 707, 248, 1, 2, 12, -1, -1, 2, NULL), + (638, 707, 253, 1, 3, 15, -1, -1, 3, NULL), + (639, 707, 92, 1, 3, 7, -1, -1, 3, NULL), + (640, 707, 256, 8, 7, 16, -1, -1, 1, NULL), + (641, 707, 515, 8, 7, 16, -1, -1, 8, NULL), + (642, 707, 91, 1, 8, 27, -1, -1, 3, NULL), + (643, 707, 17, 2, 9, 18, -1, -1, 2, NULL), + (644, 707, 264, 256, 10, 31, -1, -1, 2, NULL), + (645, 707, 663, 1, 13, 22, -1, -1, 2, NULL), + (646, 707, 520, 1, 16, 29, -1, -1, 3, NULL), + (647, 707, 273, 8, 17, 26, -1, -1, 1, NULL), + (648, 707, 516, 8, 17, 26, -1, -1, 8, NULL), + (649, 707, 12, 2, 19, 28, -1, -1, 2, NULL), + (650, 707, 115, 1, 23, 32, -1, -1, 2, NULL), + (651, 707, 99, 256, 24, 33, -1, -1, 2, NULL), + (652, 707, 78, 256, 25, 36, -1, -1, 2, NULL), + (653, 707, 512, 128, 26, 60, -1, -1, 1, NULL), + (654, 707, 129, 8, 27, 36, -1, -1, 1, NULL), + (655, 707, 517, 8, 27, 36, -1, -1, 8, NULL), + (656, 707, 217, 1, 28, 37, -1, -1, 3, NULL), + (657, 707, 15, 2, 29, 43, -1, -1, 2, NULL), + (658, 707, 1439, 1, 30, 55, -1, -1, 3, NULL), + (659, 707, 259, 256, 32, 39, -1, -1, 2, NULL), + (660, 707, 664, 1, 33, 42, -1, -1, 2, NULL), + (661, 707, 144, 8, 34, 38, -1, -1, 7, NULL), + (662, 707, 1437, 256, 37, 60, -1, -1, 2, NULL), + (663, 707, 432, 8, 37, 46, -1, -1, 1, NULL), + (664, 707, 518, 8, 37, 46, -1, -1, 8, NULL), + (665, 707, 57, 1, 38, 47, -1, -1, 3, NULL), + (666, 707, 137, 8, 39, 41, -1, -1, 7, NULL), + (667, 707, 665, 256, 40, 52, -1, -1, 2, NULL), + (668, 707, 427, 8, 40, 53, -1, -1, 9, NULL), + (669, 707, 1436, 256, 42, 61, -1, -1, 2, NULL), + (670, 707, 145, 8, 42, 44, -1, -1, 7, NULL), + (671, 707, 116, 1, 43, 54, -1, -1, 2, NULL), + (672, 707, 3834, 2, 44, 50, -1, -1, 2, NULL), + (673, 707, 138, 8, 45, 53, -1, -1, 7, NULL), + (674, 707, 29, 1, 47, 54, -1, -1, 3, NULL), + (675, 707, 356, 8, 47, 48, -1, -1, 1, NULL), + (676, 707, 519, 8, 47, 55, -1, -1, 8, NULL), + (677, 707, 671, 1, 48, 53, -1, -1, 3, NULL), + (678, 707, 1727, 8, 49, 57, -1, -1, 1, NULL), + (679, 707, 4104, 256, 49, 255, -1, -1, 2, NULL), + (680, 707, 1562, 8, 54, 59, -1, -1, 9, NULL), + (681, 707, 9, 2, 51, 54, -1, -1, 2, NULL), + (682, 707, 1600, 256, 52, 61, -1, -1, 2, NULL), + (683, 707, 1601, 256, 53, 62, -1, -1, 2, NULL), + (684, 707, 1568, 8, 54, 57, -1, -1, 7, NULL), + (685, 707, 1603, 1, 54, 58, -1, -1, 3, NULL), + (686, 707, 1290, 2, 55, 59, -1, -1, 2, NULL), + (687, 707, 1529, 1, 55, 64, -1, -1, 2, NULL), + (688, 707, 1605, 1, 55, 59, -1, -1, 3, NULL), + (689, 707, 4105, 256, 55, 255, -1, -1, 2, NULL), + (690, 707, 1558, 8, 56, 63, -1, -1, 8, NULL), + (691, 707, 1604, 1, 56, 60, -1, -1, 3, NULL), + (692, 707, 1560, 8, 58, 58, -1, -1, 1, NULL), + (693, 707, 1569, 8, 58, 59, -1, -1, 7, NULL), + (694, 707, 1561, 8, 59, 59, -1, -1, 1, NULL), + (695, 707, 1607, 1, 59, 59, -1, -1, 3, NULL), + (696, 707, 1563, 8, 60, 255, -1, -1, 9, NULL), + (697, 707, 1291, 2, 60, 62, -1, -1, 2, NULL), + (698, 707, 2125, 8, 60, 62, -1, -1, 1, NULL), + (699, 707, 2126, 1, 60, 63, -1, -1, 3, NULL), + (700, 707, 2520, 8, 60, 60, -1, -1, 7, NULL), + (701, 707, 2877, 1, 60, 64, -1, -1, 3, NULL), + (702, 707, 3433, 8, 61, 62, -1, -1, 7, NULL), + (703, 707, 3434, 1, 61, 65, -1, -1, 3, NULL), + (704, 707, 5572, 128, 61, 68, -1, -1, 1, NULL), + (705, 707, 3437, 256, 62, 63, -1, -1, 2, NULL), + (706, 707, 3440, 256, 62, 64, -1, -1, 2, NULL), + (707, 707, 3441, 8, 63, 65, -1, -1, 7, NULL), + (708, 707, 3443, 2, 63, 65, -1, -1, 2, NULL), + (709, 707, 3446, 256, 63, 67, -1, -1, 2, NULL), + (710, 707, 3448, 8, 63, 64, -1, -1, 1, NULL), + (711, 707, 3444, 8, 64, 255, -1, -1, 8, NULL), + (712, 707, 3449, 1, 64, 64, -1, -1, 3, NULL), + (713, 707, 4106, 256, 64, 255, -1, -1, 2, NULL), + (714, 707, 3238, 1, 65, 67, -1, -1, 2, NULL), + (715, 707, 3295, 8, 65, 66, -1, -1, 1, NULL), + (716, 707, 4974, 1, 65, 66, -1, -1, 3, NULL), + (717, 707, 4883, 2, 65, 67, -1, -1, 2, NULL), + (718, 707, 4884, 1, 65, 68, -1, -1, 3, NULL), + (719, 707, 4885, 256, 65, 66, -1, -1, 2, NULL), + (720, 707, 5342, 8, 66, 68, -1, -1, 7, NULL), + (721, 707, 5343, 1, 66, 255, -1, -1, 3, NULL), + (722, 707, 5348, 1, 67, 255, -1, -1, 3, NULL), + (723, 707, 5358, 8, 67, 69, -1, -1, 1, NULL), + (724, 707, 5355, 2, 68, 69, -1, -1, 2, NULL), + (725, 707, 5357, 256, 68, 255, -1, -1, 2, NULL), + (726, 707, 8008, 1, 68, 255, -1, -1, 1, NULL), + (727, 707, 5353, 8, 69, 255, -1, -1, 7, NULL), + (728, 707, 5361, 1, 69, 255, -1, -1, 3, NULL), + (729, 707, 6665, 128, 69, 255, -1, -1, 1, NULL), + (730, 707, 5365, 8, 70, 255, -1, -1, 1, NULL), + (731, 707, 6141, 2, 70, 255, -1, -1, 2, NULL), + (732, 708, 5011, 2, 1, 5, -1, -1, 2, NULL), + (733, 708, 200, 2, 6, 11, -1, -1, 2, NULL), + (734, 708, 2581, 1, 7, 12, -1, -1, 3, NULL), + (735, 708, 202, 8, 8, 19, -1, -1, 1, NULL), + (736, 708, 17, 2, 12, 26, -1, -1, 2, NULL), + (737, 708, 2582, 1, 13, 27, -1, -1, 3, NULL), + (738, 708, 218, 1, 14, 29, -1, -1, 2, NULL), + (739, 708, 11, 8, 15, 29, -1, -1, 2, NULL), + (740, 708, 219, 8, 20, 36, -1, -1, 1, NULL), + (741, 708, 485, 8, 24, 32, -1, -1, 3, NULL), + (742, 708, 2583, 8, 26, 62, -1, -1, 5, NULL), + (743, 708, 12, 2, 27, 35, -1, -1, 2, NULL), + (744, 708, 216, 1, 28, 41, -1, -1, 3, NULL), + (745, 708, 233, 1, 30, 45, -1, -1, 2, NULL), + (746, 708, 368, 8, 30, 38, -1, -1, 2, NULL), + (747, 708, 486, 8, 33, 45, -1, -1, 3, NULL), + (748, 708, 2584, 8, 35, 48, -1, -1, 4, NULL), + (749, 708, 15, 2, 36, 51, -1, -1, 2, NULL), + (750, 708, 89, 8, 37, 46, -1, -1, 1, NULL), + (751, 708, 18, 8, 39, 47, -1, -1, 2, NULL), + (752, 708, 123, 1, 42, 51, -1, -1, 3, NULL), + (753, 708, 2585, 8, 44, 255, -1, -1, 7, NULL), + (754, 708, 3683, 2, 44, 58, -1, -1, 1, NULL), + (755, 708, 117, 1, 46, 53, -1, -1, 2, NULL), + (756, 708, 487, 8, 46, 57, -1, -1, 3, NULL), + (757, 708, 312, 8, 47, 59, -1, -1, 1, NULL), + (758, 708, 19, 8, 48, 59, -1, -1, 2, NULL), + (759, 708, 207, 16, 48, 255, -1, -1, 1, NULL), + (760, 708, 3578, 8, 49, 52, -1, -1, 4, NULL), + (761, 708, 124, 1, 52, 52, -1, -1, 3, NULL), + (762, 708, 3684, 2, 52, 56, -1, -1, 2, NULL), + (763, 708, 1288, 8, 53, 59, -1, -1, 4, NULL), + (764, 708, 3975, 1, 53, 53, -1, -1, 3, NULL), + (765, 708, 2587, 1, 54, 61, -1, -1, 3, NULL), + (766, 708, 662, 1, 54, 61, -1, -1, 2, NULL), + (767, 708, 1743, 8, 55, 255, -1, -1, 2, NULL), + (768, 708, 9, 2, 57, 60, -1, -1, 2, NULL), + (769, 708, 488, 8, 58, 62, -1, -1, 3, NULL), + (770, 708, 1283, 2, 59, 63, -1, -1, 1, NULL), + (771, 708, 2590, 8, 60, 64, -1, -1, 4, NULL), + (772, 708, 314, 8, 60, 60, -1, -1, 1, NULL), + (773, 708, 20, 8, 60, 64, -1, -1, 2, NULL), + (774, 708, 1533, 8, 61, 63, -1, -1, 1, NULL), + (775, 708, 3429, 2, 61, 62, -1, -1, 2, NULL), + (776, 708, 3245, 1, 62, 63, -1, -1, 3, NULL), + (777, 708, 3428, 1, 62, 66, -1, -1, 2, NULL), + (778, 708, 3430, 2, 63, 64, -1, -1, 2, NULL), + (779, 708, 1535, 8, 63, 64, -1, -1, 3, NULL), + (780, 708, 3424, 8, 63, 64, -1, -1, 5, NULL), + (781, 708, 1538, 8, 64, 64, -1, -1, 1, NULL), + (782, 708, 3426, 1, 64, 64, -1, -1, 3, NULL), + (783, 708, 3247, 8, 64, 68, -1, -1, 9, NULL), + (784, 708, 2589, 2, 64, 255, -1, -1, 2, NULL), + (785, 708, 4894, 2, 65, 67, -1, -1, 2, NULL), + (786, 708, 3432, 8, 65, 69, -1, -1, 4, NULL), + (787, 708, 4109, 8, 65, 69, -1, -1, 2, NULL), + (788, 708, 4895, 8, 65, 67, -1, -1, 5, NULL), + (789, 708, 4977, 1, 65, 65, -1, -1, 3, NULL), + (790, 708, 5284, 1, 66, 67, -1, -1, 3, NULL), + (791, 708, 5286, 1, 67, 67, -1, -1, 2, NULL), + (792, 708, 5289, 2, 68, 255, -1, -1, 2, NULL), + (793, 708, 8027, 1, 68, 255, -1, -1, 2, NULL), + (794, 708, 5288, 8, 68, 255, -1, -1, 5, NULL), + (795, 708, 5292, 1, 68, 69, -1, -1, 3, NULL), + (796, 708, 5291, 8, 69, 255, -1, -1, 9, NULL), + (797, 708, 8029, 8, 69, 255, -1, -1, 10, NULL), + (798, 708, 5298, 8, 70, 255, -1, -1, 2, NULL), + (799, 708, 5297, 8, 70, 255, -1, -1, 4, NULL), + (800, 708, 5299, 1, 70, 255, -1, -1, 3, NULL), + (801, 709, 5012, 1, 1, 33, -1, -1, 5, NULL), + (802, 709, 340, 256, 5, 56, -1, -1, 3, NULL), + (803, 709, 491, 32, 7, 13, -1, -1, 0, NULL), + (804, 709, 341, 64, 8, 14, -1, -1, 3, NULL), + (805, 709, 2571, 1, 9, 49, -1, -1, 2, NULL), + (806, 709, 344, 128, 11, 19, -1, -1, 1, NULL), + (807, 709, 229, 1, 12, 42, -1, 45, 4, NULL), + (808, 709, 351, 32, 14, 21, -1, -1, 0, NULL), + (809, 709, 502, 64, 15, 28, -1, -1, 3, NULL), + (810, 709, 346, 8, 16, 57, -1, -1, 1, NULL), + (811, 709, 355, 128, 20, 43, -1, -1, 1, NULL), + (812, 709, 359, 8, 22, 36, -1, -1, 2, NULL), + (813, 709, 362, 32, 22, 29, -1, -1, 0, NULL), + (814, 709, 360, 256, 28, 40, -1, -1, 3, NULL), + (815, 709, 1289, 8, 29, 59, -1, -1, 9, NULL), + (816, 709, 445, 64, 29, 46, -1, -1, 3, NULL), + (817, 709, 492, 32, 30, 37, -1, -1, 0, NULL), + (818, 709, 236, 8, 31, 55, -1, -1, 8, NULL), + (819, 709, 3561, 1, 34, 47, -1, -1, 5, NULL), + (820, 709, 367, 256, 36, 59, -1, -1, 3, NULL), + (821, 709, 2574, 8, 37, 54, -1, -1, 2, NULL), + (822, 709, 370, 1, 37, 49, -1, -1, 2, NULL), + (823, 709, 440, 32, 38, 45, -1, -1, 0, NULL), + (824, 709, 3686, 256, 41, 52, -1, -1, 3, NULL), + (825, 709, 127, 1, 43, 56, -1, 45, 4, NULL), + (826, 709, 452, 128, 44, 58, -1, -1, 1, NULL), + (827, 709, 441, 32, 46, 51, -1, -1, 0, NULL), + (828, 709, 692, 64, 47, 56, -1, -1, 3, NULL), + (829, 709, 3560, 1, 48, 53, -1, -1, 5, NULL), + (830, 709, 199, 16, 50, 255, -1, -1, 1, NULL), + (831, 709, 442, 32, 52, 57, -1, -1, 0, NULL), + (832, 709, 451, 256, 53, 60, -1, -1, 3, NULL), + (833, 709, 3562, 1, 54, 63, -1, -1, 5, NULL), + (834, 709, 1376, 8, 55, 62, -1, -1, 2, NULL), + (835, 709, 393, 8, 56, 58, -1, -1, 8, NULL), + (836, 709, 454, 256, 57, 61, -1, -1, 3, NULL), + (837, 709, 525, 64, 57, 59, -1, -1, 3, NULL), + (838, 709, 6986, 1, 57, 61, -1, -1, 4, NULL), + (839, 709, 495, 32, 58, 63, -1, -1, 0, NULL), + (840, 709, 394, 8, 59, 255, -1, -1, 8, NULL), + (841, 709, 453, 128, 59, 60, -1, -1, 1, NULL), + (842, 709, 661, 8, 60, 63, -1, -1, 9, NULL), + (843, 709, 1508, 256, 60, 65, -1, -1, 3, NULL), + (844, 709, 447, 64, 60, 61, -1, -1, 3, NULL), + (845, 709, 3400, 128, 61, 255, -1, -1, 1, NULL), + (846, 709, 6, 256, 61, 62, -1, -1, 3, NULL), + (847, 709, 456, 256, 62, 65, -1, -1, 3, NULL), + (848, 709, 3401, 64, 62, 64, -1, -1, 3, NULL), + (849, 709, 3227, 8, 63, 64, -1, -1, 2, NULL), + (850, 709, 3489, 256, 63, 65, -1, -1, 3, NULL), + (851, 709, 6987, 1, 62, 66, -1, -1, 4, NULL), + (852, 709, 1414, 8, 64, 68, -1, -1, 9, NULL), + (853, 709, 3491, 1, 64, 64, -1, -1, 5, NULL), + (854, 709, 443, 32, 64, 67, -1, -1, 0, NULL), + (855, 709, 3413, 64, 65, 66, -1, -1, 3, NULL), + (856, 709, 4904, 1, 65, 68, -1, -1, 5, NULL), + (857, 709, 5323, 256, 66, 255, -1, -1, 3, NULL), + (858, 709, 5320, 256, 66, 67, -1, -1, 3, NULL), + (859, 709, 5322, 256, 66, 255, -1, -1, 3, NULL), + (860, 709, 5327, 8, 67, 255, -1, -1, 2, NULL), + (861, 709, 5324, 64, 67, 69, -1, -1, 3, NULL), + (862, 709, 6988, 1, 67, 255, -1, -1, 4, NULL), + (863, 709, 5330, 256, 68, 255, -1, -1, 3, NULL), + (864, 709, 5331, 32, 68, 255, -1, -1, 0, NULL), + (865, 709, 5332, 8, 69, 255, -1, -1, 9, NULL), + (866, 709, 5334, 1, 69, 255, -1, -1, 5, NULL), + (867, 709, 5338, 64, 70, 255, -1, -1, 3, NULL), + (868, 710, 5011, 2, 1, 7, -1, -1, 2, NULL), + (869, 710, 239, 256, 3, 43, -1, -1, 3, NULL), + (870, 710, 2591, 128, 5, 5, -1, -1, 1, NULL), + (871, 710, 242, 128, 6, 50, -1, -1, 1, NULL), + (872, 710, 26, 8, 7, 20, -1, -1, 1, NULL), + (873, 710, 200, 2, 8, 20, -1, -1, 2, NULL), + (874, 710, 2592, 8, 11, 51, -1, -1, 9, NULL), + (875, 710, 269, 8, 12, 54, -1, -1, 8, NULL), + (876, 710, 515, 8, 13, 29, -1, -1, 7, NULL), + (877, 710, 92, 1, 14, 18, -1, -1, 4, NULL), + (878, 710, 254, 8, 17, 36, -1, -1, 6, NULL), + (879, 710, 91, 1, 19, 28, -1, -1, 4, NULL), + (880, 710, 17, 2, 21, 37, -1, -1, 2, NULL), + (881, 710, 263, 8, 21, 37, -1, -1, 1, NULL), + (882, 710, 256, 8, 24, 42, -1, -1, 5, NULL), + (883, 710, 264, 256, 25, 39, -1, -1, 3, NULL), + (884, 710, 268, 8, 26, 52, -1, -1, 4, NULL), + (885, 710, 2593, 8, 29, 47, -1, -1, 2, NULL), + (886, 710, 3565, 1, 29, 38, -1, -1, 4, NULL), + (887, 710, 516, 8, 30, 33, -1, -1, 7, NULL), + (888, 710, 517, 8, 34, 41, -1, -1, 7, NULL), + (889, 710, 1461, 8, 36, 54, -1, -1, 10, NULL), + (890, 710, 2594, 8, 37, 50, -1, -1, 6, NULL), + (891, 710, 12, 2, 38, 56, -1, -1, 2, NULL), + (892, 710, 421, 8, 38, 53, -1, -1, 1, NULL), + (893, 710, 3564, 1, 39, 48, -1, -1, 4, NULL), + (894, 710, 3687, 256, 40, 53, -1, -1, 3, NULL), + (895, 710, 518, 8, 42, 59, -1, -1, 7, NULL), + (896, 710, 129, 8, 43, 57, -1, -1, 5, NULL), + (897, 710, 78, 256, 44, 255, -1, -1, 3, NULL), + (898, 710, 2595, 8, 48, 49, -1, -1, 2, NULL), + (899, 710, 691, 1, 49, 51, -1, -1, 4, NULL), + (900, 710, 1462, 8, 50, 61, -1, -1, 2, NULL), + (901, 710, 1741, 16, 50, 54, -1, -1, 1, NULL), + (902, 710, 1397, 8, 51, 61, -1, -1, 6, NULL), + (903, 710, 512, 128, 51, 60, -1, -1, 1, NULL), + (904, 710, 2596, 8, 52, 57, -1, -1, 9, NULL), + (905, 710, 57, 1, 52, 58, -1, -1, 4, NULL), + (906, 710, 430, 8, 53, 255, -1, -1, 4, NULL), + (907, 710, 259, 256, 54, 61, -1, -1, 3, NULL), + (908, 710, 422, 8, 54, 58, -1, -1, 1, NULL), + (909, 710, 1296, 16, 55, 255, -1, -1, 1, NULL), + (910, 710, 145, 8, 55, 63, -1, -1, 8, NULL), + (911, 710, 1463, 8, 55, 57, -1, -1, 10, NULL), + (912, 710, 15, 2, 57, 61, -1, -1, 2, NULL), + (913, 710, 432, 8, 58, 61, -1, -1, 5, NULL), + (914, 710, 4059, 8, 58, 63, -1, -1, 10, NULL), + (915, 710, 2599, 8, 58, 255, -1, -1, 9, NULL), + (916, 710, 423, 8, 59, 64, -1, -1, 1, NULL), + (917, 710, 1740, 1, 59, 63, -1, -1, 4, NULL), + (918, 710, 519, 8, 60, 62, -1, -1, 7, NULL), + (919, 710, 6732, 128, 61, 68, -1, -1, 1, NULL), + (920, 710, 3419, 8, 62, 66, -1, -1, 2, NULL), + (921, 710, 356, 8, 62, 65, -1, -1, 5, NULL), + (922, 710, 3487, 8, 62, 66, -1, -1, 6, NULL), + (923, 710, 665, 256, 62, 66, -1, -1, 3, NULL), + (924, 710, 1290, 2, 62, 64, -1, -1, 2, NULL), + (925, 710, 1558, 8, 63, 67, -1, -1, 7, NULL), + (926, 710, 1568, 8, 64, 67, -1, -1, 8, NULL), + (927, 710, 3415, 8, 64, 64, -1, -1, 10, NULL), + (928, 710, 3431, 1, 64, 64, -1, -1, 4, NULL), + (929, 710, 1559, 8, 65, 69, -1, -1, 1, NULL), + (930, 710, 4898, 8, 65, 68, -1, -1, 10, NULL), + (931, 710, 4980, 1, 65, 68, -1, -1, 4, NULL), + (932, 710, 4896, 2, 65, 66, -1, -1, 2, NULL), + (933, 710, 5302, 8, 66, 255, -1, -1, 5, NULL), + (934, 710, 5305, 8, 66, 255, -1, -1, 2, NULL), + (935, 710, 5306, 8, 67, 255, -1, -1, 6, NULL), + (936, 710, 5303, 256, 67, 255, -1, -1, 3, NULL), + (937, 710, 5304, 2, 67, 255, -1, -1, 2, NULL), + (938, 710, 5307, 8, 68, 255, -1, -1, 7, NULL), + (939, 710, 5310, 8, 68, 255, -1, -1, 8, NULL), + (940, 710, 5311, 8, 69, 255, -1, -1, 10, NULL), + (941, 710, 6664, 128, 69, 255, -1, -1, 1, NULL), + (942, 710, 5313, 1, 69, 69, -1, -1, 4, NULL), + (943, 710, 5315, 8, 70, 255, -1, -1, 1, NULL), + (944, 710, 5319, 1, 70, 255, -1, -1, 4, NULL), + (945, 711, 700, 8, 1, 9, -1, -1, 1, NULL), + (946, 711, 7, 2, 6, 33, -1, -1, 2, NULL), + (947, 711, 710, 8, 9, 12, -1, -1, 2, NULL), + (948, 711, 701, 8, 10, 35, -1, -1, 1, NULL), + (949, 711, 711, 8, 13, 24, -1, -1, 2, NULL), + (950, 711, 709, 8, 17, 51, -1, -1, 3, NULL), + (951, 711, 1287, 2, 20, 31, -1, -1, 2, NULL), + (952, 711, 738, 1, 23, 255, -1, -1, 3, NULL), + (953, 711, 712, 8, 25, 28, -1, -1, 2, NULL), + (954, 711, 715, 8, 29, 32, -1, -1, 3, NULL), + (955, 711, 707, 1, 30, 37, -1, -1, 2, NULL), + (956, 711, 723, 2, 32, 33, -1, -1, 3, NULL), + (957, 711, 713, 8, 33, 36, -1, -1, 2, NULL), + (958, 711, 1448, 2, 34, 54, -1, -1, 2, NULL), + (959, 711, 740, 8, 36, 41, -1, -1, 1, NULL), + (960, 711, 716, 8, 37, 40, -1, -1, 2, NULL), + (961, 711, 743, 1, 38, 41, -1, -1, 4, NULL), + (962, 711, 714, 8, 41, 46, -1, -1, 2, NULL), + (963, 711, 3567, 1, 42, 45, -1, -1, 5, NULL), + (964, 711, 702, 8, 42, 49, -1, -1, 1, NULL), + (965, 711, 744, 1, 46, 49, -1, -1, 6, NULL), + (966, 711, 748, 8, 47, 53, -1, -1, 2, NULL), + (967, 711, 3566, 1, 50, 62, -1, -1, 2, NULL), + (968, 711, 747, 8, 50, 53, -1, -1, 1, NULL), + (969, 711, 1751, 1, 51, 255, -1, -1, 4, NULL), + (970, 711, 2606, 8, 52, 59, -1, -1, 3, NULL), + (971, 711, 1754, 16, 53, 59, -1, -1, 1, NULL), + (972, 711, 2607, 8, 54, 255, -1, -1, 2, NULL), + (973, 711, 1759, 2, 55, 57, -1, -1, 2, NULL), + (974, 711, 2609, 2, 58, 59, -1, -1, 2, NULL), + (975, 711, 1196, 2, 60, 61, -1, -1, 2, NULL), + (976, 711, 1749, 16, 60, 255, -1, -1, 1, NULL), + (977, 711, 2610, 8, 60, 63, -1, -1, 3, NULL), + (978, 711, 3374, 8, 62, 64, -1, -1, 1, NULL), + (979, 711, 3651, 2, 62, 63, -1, -1, 2, NULL), + (980, 711, 3370, 1, 63, 63, -1, -1, 2, NULL), + (981, 711, 3066, 1, 64, 255, -1, -1, 2, NULL), + (982, 711, 3362, 8, 64, 64, -1, -1, 3, NULL), + (983, 711, 3372, 2, 64, 66, -1, -1, 2, NULL), + (984, 711, 4871, 8, 65, 67, -1, -1, 1, NULL), + (985, 711, 4872, 8, 65, 67, -1, -1, 3, NULL), + (986, 711, 5377, 2, 67, 68, -1, -1, 2, NULL), + (987, 711, 5376, 8, 68, 255, -1, -1, 1, NULL), + (988, 711, 5380, 8, 68, 68, -1, -1, 3, NULL), + (989, 711, 5382, 8, 69, 69, -1, -1, 3, NULL), + (990, 711, 5384, 2, 69, 255, -1, -1, 2, NULL), + (991, 711, 5388, 8, 70, 255, -1, -1, 3, NULL), + (992, 712, 5011, 2, 1, 5, -1, -1, 2, NULL), + (993, 712, 200, 2, 6, 19, -1, -1, 2, NULL), + (994, 712, 267, 8, 7, 19, -1, -1, 9, NULL), + (995, 712, 2612, 32, 8, 14, -1, -1, 0, NULL), + (996, 712, 2611, 2, 9, 14, -1, -1, 2, NULL), + (997, 712, 274, 8, 10, 25, -1, -1, 8, NULL), + (998, 712, 2068, 1, 12, 25, -1, -1, 4, NULL), + (999, 712, 2635, 8, 13, 17, -1, -1, 6, NULL), + (1000, 712, 40, 8, 14, 27, -1, -1, 5, NULL), + (1001, 712, 75, 256, 14, 39, -1, -1, 3, NULL), + (1002, 712, 2613, 2, 15, 26, -1, -1, 2, NULL), + (1003, 712, 2633, 32, 15, 20, -1, -1, 0, NULL), + (1004, 712, 279, 8, 17, 36, -1, -1, 4, NULL), + (1005, 712, 2636, 8, 18, 27, -1, -1, 6, NULL), + (1006, 712, 277, 256, 19, 34, -1, -1, 3, NULL), + (1007, 712, 270, 1, 20, 49, -1, -1, 3, NULL), + (1008, 712, 17, 2, 20, 35, -1, -1, 2, NULL), + (1009, 712, 2614, 32, 21, 29, -1, -1, 0, NULL), + (1010, 712, 282, 1, 26, 32, -1, -1, 4, NULL), + (1011, 712, 283, 8, 26, 36, -1, -1, 8, NULL), + (1012, 712, 2615, 2, 27, 35, -1, -1, 2, NULL), + (1013, 712, 147, 8, 28, 40, -1, -1, 5, NULL), + (1014, 712, 2637, 8, 28, 37, -1, -1, 6, NULL), + (1015, 712, 2616, 32, 30, 38, -1, -1, 0, NULL), + (1016, 712, 3568, 1, 33, 46, -1, -1, 4, NULL), + (1017, 712, 434, 256, 35, 51, -1, -1, 3, NULL), + (1018, 712, 48, 512, 35, 57, -1, -1, 6, NULL), + (1019, 712, 12, 2, 36, 56, -1, -1, 2, NULL), + (1020, 712, 2617, 2, 36, 48, -1, -1, 2, NULL), + (1021, 712, 2619, 8, 37, 51, -1, -1, 8, NULL), + (1022, 712, 149, 8, 37, 51, -1, -1, 3, NULL), + (1023, 712, 2638, 8, 38, 45, -1, -1, 6, NULL), + (1024, 712, 2618, 32, 39, 45, -1, -1, 0, NULL), + (1025, 712, 3689, 256, 40, 64, -1, -1, 3, NULL), + (1026, 712, 151, 8, 41, 53, -1, -1, 5, NULL), + (1027, 712, 2176, 8, 41, 51, -1, -1, 4, NULL), + (1028, 712, 2178, 8, 42, 59, -1, -1, 2, NULL), + (1029, 712, 2621, 32, 46, 53, -1, -1, 0, NULL), + (1030, 712, 2639, 8, 46, 50, -1, -1, 6, NULL), + (1031, 712, 308, 8, 47, 255, -1, -1, 7, NULL), + (1032, 712, 3569, 1, 47, 53, -1, -1, 4, NULL), + (1033, 712, 2620, 2, 49, 51, -1, -1, 2, NULL), + (1034, 712, 2634, 1, 50, 59, -1, -1, 3, NULL), + (1035, 712, 2640, 8, 51, 52, -1, -1, 6, NULL), + (1036, 712, 161, 8, 52, 56, -1, -1, 3, NULL), + (1037, 712, 2177, 8, 52, 58, -1, -1, 4, NULL), + (1038, 712, 2622, 2, 52, 54, -1, -1, 2, NULL), + (1039, 712, 3690, 8, 52, 54, -1, -1, 8, NULL), + (1040, 712, 435, 256, 52, 60, -1, -1, 3, NULL), + (1041, 712, 167, 8, 53, 57, -1, -1, 6, NULL), + (1042, 712, 153, 8, 54, 255, -1, -1, 5, NULL), + (1043, 712, 2623, 32, 54, 55, -1, -1, 0, NULL), + (1044, 712, 3570, 1, 54, 58, -1, -1, 4, NULL), + (1045, 712, 2625, 8, 55, 58, -1, -1, 8, NULL), + (1046, 712, 145, 8, 55, 63, -1, -1, 1, NULL), + (1047, 712, 2626, 32, 56, 57, -1, -1, 0, NULL), + (1048, 712, 15, 2, 57, 61, -1, -1, 2, NULL), + (1049, 712, 158, 8, 57, 255, -1, -1, 3, NULL), + (1050, 712, 168, 8, 58, 61, -1, -1, 6, NULL), + (1051, 712, 2627, 32, 58, 59, -1, -1, 0, NULL), + (1052, 712, 49, 512, 58, 59, -1, -1, 6, NULL), + (1053, 712, 2628, 8, 59, 62, -1, -1, 8, NULL), + (1054, 712, 2629, 8, 59, 63, -1, -1, 4, NULL), + (1055, 712, 510, 1, 59, 62, -1, -1, 4, NULL), + (1056, 712, 2941, 8, 60, 64, -1, -1, 10, NULL), + (1057, 712, 2630, 8, 60, 61, -1, -1, 2, NULL), + (1058, 712, 2631, 32, 60, 61, -1, -1, 0, NULL), + (1059, 712, 2942, 1, 60, 64, -1, -1, 3, NULL), + (1060, 712, 3492, 256, 61, 65, -1, -1, 3, NULL), + (1061, 712, 3456, 8, 62, 66, -1, -1, 2, NULL), + (1062, 712, 1585, 8, 62, 66, -1, -1, 6, NULL), + (1063, 712, 1290, 2, 62, 64, -1, -1, 2, NULL), + (1064, 712, 3457, 32, 62, 63, -1, -1, 0, NULL), + (1065, 712, 3458, 8, 63, 67, -1, -1, 8, NULL), + (1066, 712, 3493, 1, 63, 64, -1, -1, 4, NULL), + (1067, 712, 1568, 8, 64, 68, -1, -1, 1, NULL), + (1068, 712, 3460, 8, 64, 68, -1, -1, 4, NULL), + (1069, 712, 3461, 32, 64, 67, -1, -1, 0, NULL), + (1070, 712, 3463, 8, 65, 69, -1, -1, 10, NULL), + (1071, 712, 32, 256, 65, 69, -1, -1, 3, NULL), + (1072, 712, 3462, 1, 65, 69, -1, -1, 3, NULL), + (1073, 712, 4972, 1, 65, 68, -1, -1, 4, NULL), + (1074, 712, 4875, 2, 65, 66, -1, -1, 2, NULL), + (1075, 712, 5527, 256, 66, 255, -1, -1, 3, NULL), + (1076, 712, 5530, 8, 67, 255, -1, -1, 2, NULL), + (1077, 712, 5529, 8, 67, 255, -1, -1, 6, NULL), + (1078, 712, 5528, 2, 67, 255, -1, -1, 2, NULL), + (1079, 712, 5533, 8, 68, 255, -1, -1, 8, NULL), + (1080, 712, 5531, 32, 68, 69, -1, -1, 0, NULL), + (1081, 712, 5536, 8, 69, 255, -1, -1, 1, NULL), + (1082, 712, 5537, 8, 69, 255, -1, -1, 4, NULL), + (1083, 712, 5535, 1, 69, 69, -1, -1, 4, NULL), + (1084, 712, 5542, 8, 70, 255, -1, -1, 10, NULL), + (1085, 712, 5540, 256, 70, 255, -1, -1, 3, NULL), + (1086, 712, 6828, 1, 70, 255, -1, -1, 3, NULL), + (1087, 712, 5543, 1, 70, 255, -1, -1, 4, NULL), + (1088, 712, 5538, 32, 70, 255, -1, -1, 0, NULL), + (1089, 707, 425, 8, 20, 255, -1, -1, 0, NULL), + (1090, 705, 190, 2048, 47, 55, -1, -1, 0, NULL), + (1091, 705, 292, 2048, 2, 12, -1, -1, 0, NULL), + (1092, 705, 187, 2048, 13, 29, -1, -1, 0, NULL), + (1093, 705, 188, 2048, 30, 46, -1, -1, 0, NULL), + (1094, 705, 1691, 2048, 54, 58, -1, -1, 0, NULL), + (1095, 705, 1692, 2048, 59, 59, -1, -1, 0, NULL), + (1096, 705, 2120, 2048, 60, 60, -1, -1, 0, NULL), + (1097, 705, 3341, 2048, 61, 62, -1, -1, 0, NULL), + (1098, 705, 3354, 2048, 63, 63, -1, -1, 0, NULL), + (1099, 705, 3358, 2048, 64, 66, -1, -1, 0, NULL), + (1100, 705, 5503, 2048, 67, 67, -1, -1, 0, NULL), + (1101, 705, 8035, 2048, 68, 68, -1, -1, 0, NULL), + (1102, 705, 5520, 2048, 69, 255, -1, -1, 0, NULL), + (1103, 709, 343, 16384, 6, 51, -1, -1, 3, NULL), + (1104, 709, 2572, 16384, 15, 34, -1, -1, 3, NULL), + (1105, 709, 2573, 16384, 23, 49, -1, -1, 3, NULL), + (1106, 709, 1457, 16384, 35, 53, -1, -1, 3, NULL), + (1107, 709, 1458, 16384, 50, 55, -1, -1, 3, NULL), + (1108, 709, 2575, 16384, 52, 59, -1, -1, 3, NULL), + (1109, 709, 2577, 16384, 54, 64, -1, -1, 3, NULL), + (1110, 709, 2578, 16384, 56, 62, -1, -1, 3, NULL), + (1111, 709, 2579, 16384, 58, 65, -1, -1, 3, NULL), + (1112, 709, 3406, 16384, 61, 70, -1, -1, 2, NULL), + (1113, 707, 3435, 16384, 61, 85, -1, -1, 2, NULL), + (1114, 707, 5351, 16384, 67, 73, -1, -1, 2, NULL), + (1115, 707, 5354, 16384, 67, 71, -1, -1, 2, NULL), + (1116, 703, 343, 16384, 1, 12, -1, -1, 3, NULL), + (1117, 703, 1511, 16384, 10, 20, -1, -1, 3, NULL), + (1118, 703, 1512, 16384, 21, 36, -1, -1, 3, NULL), + (1119, 703, 1513, 16384, 37, 51, -1, -1, 3, NULL), + (1120, 703, 1716, 16384, 52, 67, -1, -1, 3, NULL), + (1121, 703, 2546, 16384, 52, 65, -1, -1, 3, NULL), + (1122, 703, 5427, 16384, 68, 71, -1, -1, 3, NULL), + (1123, 704, 110, 16384, 22, 43, -1, -1, 2, NULL), + (1124, 704, 111, 16384, 44, 50, -1, -1, 2, NULL), + (1125, 704, 112, 16384, 51, 57, -1, -1, 2, NULL), + (1126, 704, 1577, 16384, 58, 59, -1, -1, 2, NULL), + (1127, 704, 1772, 16384, 60, 255, -1, -1, 1, NULL), + (1128, 704, 3387, 16384, 63, 70, -1, -1, 2, NULL), + (1129, 705, 41, 16384, 1, 3, -1, -1, 3, NULL), + (1130, 705, 676, 16384, 2, 17, -1, -1, 1, NULL), + (1131, 705, 291, 16384, 4, 8, -1, -1, 3, NULL), + (1132, 705, 645, 16384, 9, 18, -1, -1, 3, NULL), + (1133, 705, 281, 16384, 16, 24, -1, -1, 3, NULL), + (1134, 705, 677, 16384, 18, 40, -1, -1, 1, NULL), + (1135, 705, 179, 16384, 19, 33, -1, -1, 4, NULL), + (1136, 705, 162, 16384, 25, 39, -1, -1, 3, NULL), + (1137, 705, 180, 16384, 34, 41, -1, -1, 4, NULL), + (1138, 705, 163, 16384, 40, 52, -1, -1, 3, NULL), + (1139, 705, 678, 16384, 41, 56, -1, -1, 1, NULL), + (1140, 705, 181, 16384, 42, 52, -1, -1, 4, NULL), + (1141, 705, 1592, 16384, 53, 65, -1, -1, 3, NULL), + (1142, 705, 1702, 16384, 57, 60, -1, -1, 1, NULL), + (1143, 705, 3342, 16384, 61, 71, -1, -1, 1, NULL), + (1144, 705, 5499, 16384, 66, 70, -1, -1, 3, NULL), + (1145, 712, 162, 16384, 44, 55, -1, -1, 2, NULL), + (1146, 712, 163, 16384, 56, 65, -1, -1, 2, NULL), + (1147, 707, 14312, 16384, 71, 75, -1, -1, 3, NULL), + (1148, 707, 14313, 16384, 71, 75, -1, -1, 3, NULL), + (1149, 707, 14314, 16384, 71, 75, -1, -1, 3, NULL), + (1150, 707, 0, 16384, 76, 80, -1, -1, 2, NULL), + (1151, 707, 18392, 16384, 81, 85, -1, -1, 2, NULL), + (1152, 707, 18393, 16384, 81, 85, -1, -1, 2, NULL), + (1153, 707, 18394, 16384, 81, 85, -1, -1, 2, NULL), + (1154, 703, 10516, 16384, 72, 76, -1, -1, 3, NULL), + (1155, 703, 10517, 16384, 72, 76, -1, -1, 3, NULL), + (1156, 703, 10518, 16384, 72, 76, -1, -1, 3, NULL), + (1157, 703, 0, 16384, 77, 81, -1, -1, 3, NULL), + (1158, 703, 18970, 16384, 82, 86, -1, -1, 3, NULL), + (1159, 703, 18971, 16384, 82, 86, -1, -1, 3, NULL), + (1160, 703, 18972, 16384, 82, 86, -1, -1, 3, NULL), + (1161, 704, 15186, 16384, 76, 80, -1, -1, 2, NULL), + (1162, 704, 15187, 16384, 76, 80, -1, -1, 2, NULL), + (1163, 704, 15188, 16384, 76, 80, -1, -1, 2, NULL), + (1164, 704, 18726, 16384, 81, 85, -1, -1, 2, NULL), + (1165, 704, 18727, 16384, 81, 85, -1, -1, 2, NULL), + (1166, 704, 18728, 16384, 81, 85, -1, -1, 2, NULL), + (1167, 705, 14446, 16384, 71, 75, -1, -1, 3, NULL), + (1168, 705, 14447, 16384, 71, 75, -1, -1, 3, NULL), + (1169, 705, 14467, 16384, 72, 76, -1, -1, 1, NULL), + (1170, 705, 14468, 16384, 72, 76, -1, -1, 1, NULL), + (1171, 705, 14469, 16384, 72, 76, -1, -1, 1, NULL), + (1172, 705, 0, 16384, 77, 81, -1, -1, 1, NULL), + (1173, 705, 18552, 16384, 81, 85, -1, -1, 3, NULL), + (1174, 705, 18553, 16384, 81, 85, -1, -1, 3, NULL), + (1175, 705, 18554, 16384, 81, 85, -1, -1, 3, NULL), + (1176, 705, 18573, 16384, 82, 86, -1, -1, 1, NULL), + (1177, 705, 18574, 16384, 82, 86, -1, -1, 1, NULL), + (1178, 705, 18575, 16384, 82, 86, -1, -1, 1, NULL), + (1179, 701, 203, 32768, 1, 21, -1, -1, 2, NULL), + (1180, 701, 213, 32768, 4, 27, -1, -1, 2, NULL), + (1181, 701, 4056, 32768, 8, 22, -1, -1, 2, NULL), + (1182, 701, 95, 32768, 22, 47, -1, -1, 2, NULL), + (1183, 701, 4057, 32768, 23, 37, -1, -1, 2, NULL), + (1184, 701, 96, 32768, 28, 50, -1, -1, 2, NULL), + (1185, 701, 2946, 32768, 38, 53, -1, -1, 2, NULL), + (1186, 701, 97, 32768, 48, 57, -1, -1, 2, NULL), + (1187, 701, 3693, 32768, 51, 83, -1, -1, 3, NULL), + (1188, 701, 2880, 32768, 54, 255, -1, -1, 2, NULL), + (1189, 701, 1525, 32768, 58, 83, -1, -1, 2, NULL), + (1190, 708, 203, 32768, 5, 33, -1, -1, 2, NULL), + (1191, 708, 213, 32768, 11, 55, -1, -1, 2, NULL), + (1192, 708, 4056, 32768, 19, 33, -1, -1, 2, NULL), + (1193, 708, 95, 32768, 34, 61, -1, -1, 2, NULL), + (1194, 708, 4057, 32768, 34, 44, -1, -1, 2, NULL), + (1195, 708, 2946, 32768, 45, 59, -1, -1, 2, NULL), + (1196, 708, 96, 32768, 56, 61, -1, -1, 2, NULL), + (1197, 708, 2880, 32768, 60, 255, -1, -1, 2, NULL), + (1198, 708, 3190, 32768, 62, 66, -1, -1, 2, NULL), + (1199, 708, 5283, 32768, 67, 80, -1, -1, 2, NULL), + (1200, 710, 203, 32768, 13, 60, -1, -1, 2, NULL), + (1201, 710, 213, 32768, 22, 60, -1, -1, 2, NULL), + (1202, 710, 95, 32768, 61, 72, -1, -1, 2, NULL), + (1203, 710, 96, 32768, 61, 72, -1, -1, 2, NULL), + (1204, 709, 213, 32768, 19, 255, -1, -1, 2, NULL), + (1205, 707, 213, 32768, 4, 27, -1, -1, 2, NULL), + (1206, 707, 203, 32768, 5, 27, -1, -1, 2, NULL), + (1207, 707, 95, 32768, 28, 51, -1, -1, 2, NULL), + (1208, 707, 96, 32768, 28, 51, -1, -1, 2, NULL), + (1209, 707, 3693, 32768, 52, 83, -1, -1, 2, NULL), + (1210, 711, 3682, 32768, 45, 85, -1, -1, 2, NULL), + (1211, 711, 3681, 32768, 52, 85, -1, -1, 2, NULL), + (1212, 706, 213, 32768, 1, 21, -1, -1, 2, NULL), + (1213, 706, 203, 32768, 2, 25, -1, -1, 2, NULL), + (1214, 706, 4056, 32768, 9, 23, -1, -1, 2, NULL), + (1215, 706, 96, 32768, 22, 47, -1, -1, 2, NULL), + (1216, 706, 4057, 32768, 24, 37, -1, -1, 2, NULL), + (1217, 706, 95, 32768, 26, 51, -1, -1, 2, NULL), + (1218, 706, 2946, 32768, 38, 53, -1, -1, 2, NULL), + (1219, 706, 98, 32768, 48, 51, -1, -1, 2, NULL), + (1220, 706, 2526, 32768, 52, 84, -1, -1, 2, NULL), + (1221, 706, 3842, 32768, 52, 84, -1, -1, 2, NULL), + (1222, 706, 2880, 32768, 54, 255, -1, -1, 2, NULL), + (1223, 712, 213, 32768, 4, 44, -1, -1, 2, NULL), + (1224, 712, 203, 32768, 13, 60, -1, -1, 2, NULL), + (1225, 712, 96, 32768, 45, 62, -1, -1, 2, NULL), + (1226, 712, 95, 32768, 61, 255, -1, -1, 2, NULL), + (1227, 712, 98, 32768, 63, 255, -1, -1, 2, NULL), + (1228, 701, 14267, 32768, 74, 78, -1, -1, 2, NULL), + (1229, 701, 14268, 32768, 74, 78, -1, -1, 2, NULL), + (1230, 701, 14269, 32768, 74, 78, -1, -1, 2, NULL), + (1231, 701, 18306, 32768, 84, 255, -1, -1, 2, NULL), + (1232, 701, 18307, 32768, 84, 255, -1, -1, 2, NULL), + (1233, 701, 18308, 32768, 84, 255, -1, -1, 2, NULL), + (1234, 701, 18389, 32768, 84, 255, -1, -1, 2, NULL), + (1235, 701, 18390, 32768, 84, 255, -1, -1, 2, NULL), + (1236, 701, 18391, 32768, 84, 255, -1, -1, 2, NULL), + (1237, 708, 19128, 32768, 81, 255, -1, -1, 2, NULL), + (1238, 708, 19129, 32768, 81, 255, -1, -1, 2, NULL), + (1239, 708, 19130, 32768, 81, 255, -1, -1, 2, NULL), + (1240, 710, 14955, 32768, 73, 77, -1, -1, 2, NULL), + (1241, 710, 14956, 32768, 73, 77, -1, -1, 2, NULL), + (1242, 710, 0, 32768, 78, 82, -1, -1, 2, NULL), + (1243, 710, 19146, 32768, 83, 87, -1, -1, 2, NULL), + (1244, 710, 19147, 32768, 83, 87, -1, -1, 2, NULL), + (1245, 710, 19148, 32768, 83, 87, -1, -1, 2, NULL), + (1246, 707, 9700, 32768, 71, 83, -1, -1, 2, NULL), + (1247, 707, 9701, 32768, 71, 83, -1, -1, 2, NULL), + (1248, 707, 9702, 32768, 71, 83, -1, -1, 2, NULL), + (1249, 707, 18389, 32768, 84, 88, -1, -1, 2, NULL), + (1250, 707, 18390, 32768, 84, 88, -1, -1, 2, NULL), + (1251, 707, 18391, 32768, 84, 88, -1, -1, 2, NULL), + (1252, 711, 14027, 32768, 79, 83, -1, -1, 2, NULL), + (1253, 711, 14028, 32768, 79, 83, -1, -1, 2, NULL), + (1254, 711, 14029, 32768, 79, 83, -1, -1, 2, NULL), + (1255, 711, 18021, 32768, 84, 85, -1, -1, 2, NULL), + (1256, 711, 18022, 32768, 84, 85, -1, -1, 2, NULL), + (1257, 711, 18023, 32768, 84, 85, -1, -1, 2, NULL), + (1258, 706, 9700, 32768, 72, 73, -1, -1, 2, NULL), + (1259, 706, 9701, 32768, 72, 73, -1, -1, 2, NULL), + (1260, 706, 9702, 32768, 72, 73, -1, -1, 2, NULL), + (1261, 706, 14387, 32768, 74, 78, -1, -1, 2, NULL), + (1262, 706, 14388, 32768, 74, 78, -1, -1, 2, NULL), + (1263, 706, 14389, 32768, 74, 78, -1, -1, 2, NULL), + (1264, 706, 0, 32768, 79, 83, -1, -1, 2, NULL), + (1265, 706, 18467, 32768, 84, 88, -1, -1, 2, NULL), + (1266, 706, 18468, 32768, 84, 88, -1, -1, 2, NULL), + (1267, 706, 18469, 32768, 84, 88, -1, -1, 2, NULL), + (1268, 706, 19513, 32768, 85, 89, -1, -1, 2, NULL), + (1269, 706, 19514, 32768, 85, 89, -1, -1, 2, NULL), + (1270, 706, 19515, 32768, 85, 89, -1, -1, 2, NULL); +/*!40000 ALTER TABLE `bot_spells_entries` ENABLE KEYS */; +/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; +/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; + + -- End of File From 26532c03acdcca74e3252f7031785b31fb72def3 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Fri, 19 Jan 2018 23:27:29 -0500 Subject: [PATCH 030/670] Fix crash Whoever made this using dynamic memory should be fired. --- zone/hate_list.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zone/hate_list.cpp b/zone/hate_list.cpp index 8da223b04..fe0ca4a04 100644 --- a/zone/hate_list.cpp +++ b/zone/hate_list.cpp @@ -193,6 +193,7 @@ void HateList::AddEntToHateList(Mob *in_entity, int32 in_hate, int32 in_damage, entity->hatelist_damage += (in_damage >= 0) ? in_damage : 0; entity->stored_hate_amount += in_hate; entity->is_entity_frenzy = in_is_entity_frenzied; + entity->last_modified = Timer::GetCurrentTime(); } else if (iAddIfNotExist) { entity = new struct_HateList; @@ -201,6 +202,7 @@ void HateList::AddEntToHateList(Mob *in_entity, int32 in_hate, int32 in_damage, entity->stored_hate_amount = in_hate; entity->is_entity_frenzy = in_is_entity_frenzied; entity->oor_count = 0; + entity->last_modified = Timer::GetCurrentTime(); list.push_back(entity); parse->EventNPC(EVENT_HATE_LIST, hate_owner->CastToNPC(), in_entity, "1", 0); @@ -210,7 +212,6 @@ void HateList::AddEntToHateList(Mob *in_entity, int32 in_hate, int32 in_damage, in_entity->CastToClient()->IncrementAggroCount(); } } - entity->last_modified = Timer::GetCurrentTime(); } bool HateList::RemoveEntFromHateList(Mob *in_entity) From 6042410b4b2b968b74d92d98247e85b33ecfd749 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 20 Jan 2018 19:19:40 -0500 Subject: [PATCH 031/670] Fix duration on WakeTheDead --- zone/aa.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/zone/aa.cpp b/zone/aa.cpp index 31ad9c162..38d477fb8 100644 --- a/zone/aa.cpp +++ b/zone/aa.cpp @@ -424,6 +424,7 @@ void Mob::WakeTheDead(uint16 spell_id, Mob *target, uint32 duration) npca->GetSwarmInfo()->duration->Start(duration*1000); } + npca->StartSwarmTimer(duration * 1000); npca->GetSwarmInfo()->owner_id = GetID(); //give the pet somebody to "love" From 7892fed6d9e88d0fdcfe2f859bc6ed464d0741b3 Mon Sep 17 00:00:00 2001 From: Daerath Date: Sun, 21 Jan 2018 10:17:31 -0500 Subject: [PATCH 032/670] * Combine container size is checked before displaying favorite recipes or when searching for a recipe. This fixes an issue where you could combine any recipe in a 2 slot container or in any container smaller than the number of required components. * World containers that do not have ID values default to size 10 based as all world containers that are not transmitting ID values appear to have 10 slots. --- zone/client_packet.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index d336f7f0d..57bd89465 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -11690,10 +11690,15 @@ void Client::Handle_OP_RecipesFavorite(const EQApplicationPacket *app) // make where clause segment for container(s) std::string containers; - if (tsf->some_id == 0) + uint32 combineObjectSlots; + if (tsf->some_id == 0) { containers += StringFormat(" = %u ", tsf->object_type); // world combiner so no item number - else + combineObjectSlots = 10; + } + else { containers += StringFormat(" in (%u, %u) ", tsf->object_type, tsf->some_id); // container in inventory + combineObjectSlots = database.GetItem(tsf->some_id)->BagSlots; + } std::string favoriteIDs; //gotta be big enough for 500 IDs bool first = true; @@ -11725,8 +11730,8 @@ void Client::Handle_OP_RecipesFavorite(const EQApplicationPacket *app) "((tr.must_learn & 0x3 <> 0 AND crl.madecount IS NOT NULL) " "OR (tr.must_learn & 0x3 = 0)) " "GROUP BY tr.id " - "HAVING sum(if(tre.item_id %s AND tre.iscontainer > 0,1,0)) > 0 " - "LIMIT 100 ", CharacterID(), favoriteIDs.c_str(), containers.c_str()); + "HAVING sum(if(tre.item_id %s AND tre.iscontainer > 0,1,0)) > 0 AND SUM(tre.componentcount) <= %u " + "LIMIT 100 ", CharacterID(), favoriteIDs.c_str(), containers.c_str(), combineObjectSlots); TradeskillSearchResults(query, tsf->object_type, tsf->some_id); return; @@ -11748,13 +11753,16 @@ void Client::Handle_OP_RecipesSearch(const EQApplicationPacket *app) // make where clause segment for container(s) char containers[30]; + uint32 combineObjectSlots; if (rss->some_id == 0) { // world combiner so no item number snprintf(containers, 29, "= %u", rss->object_type); + combineObjectSlots = 10; } else { // container in inventory snprintf(containers, 29, "in (%u,%u)", rss->object_type, rss->some_id); + combineObjectSlots = database.GetItem(rss->some_id)->BagSlots; } std::string searchClause; @@ -11779,10 +11787,10 @@ void Client::Handle_OP_RecipesSearch(const EQApplicationPacket *app) "AND crl.madecount IS NOT NULL) " "OR (tr.must_learn & 0x3 = 0)) " "GROUP BY tr.id " - "HAVING sum(if(tre.item_id %s AND tre.iscontainer > 0,1,0)) > 0 " + "HAVING sum(if(tre.item_id %s AND tre.iscontainer > 0,1,0)) > 0 AND SUM(tre.componentcount) <= %u " "LIMIT 200 ", CharacterID(), searchClause.c_str(), - rss->mintrivial, rss->maxtrivial, containers); + rss->mintrivial, rss->maxtrivial, containers, combineObjectSlots); TradeskillSearchResults(query, rss->object_type, rss->some_id); return; } From 518a5e8ab1dfaa2510b6386b5e51e1f3da6e0803 Mon Sep 17 00:00:00 2001 From: Daerath Date: Sun, 21 Jan 2018 15:49:15 -0500 Subject: [PATCH 033/670] * Added test for null output of GetItem and log & return if the item cannot be found. --- zone/client_packet.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 57bd89465..3ee4d0038 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -11697,7 +11697,14 @@ void Client::Handle_OP_RecipesFavorite(const EQApplicationPacket *app) } else { containers += StringFormat(" in (%u, %u) ", tsf->object_type, tsf->some_id); // container in inventory - combineObjectSlots = database.GetItem(tsf->some_id)->BagSlots; + auto item = database.GetItem(tsf->some_id); + if (!item) + { + Log(Logs::General, Logs::Error, "Invalid container ID: %d. GetItem returned null.\n", tsf->some_id); + return; + } + + combineObjectSlots = item->BagSlots; } std::string favoriteIDs; //gotta be big enough for 500 IDs @@ -11762,7 +11769,14 @@ void Client::Handle_OP_RecipesSearch(const EQApplicationPacket *app) else { // container in inventory snprintf(containers, 29, "in (%u,%u)", rss->object_type, rss->some_id); - combineObjectSlots = database.GetItem(rss->some_id)->BagSlots; + auto item = database.GetItem(rss->some_id); + if (!item) + { + Log(Logs::General, Logs::Error, "Invalid container ID: %d. GetItem returned null.\n", rss->some_id); + return; + } + + combineObjectSlots = item->BagSlots; } std::string searchClause; From fbe456ed4563bce4e5ef1156a229d84fb62d5fcd Mon Sep 17 00:00:00 2001 From: Daerath Date: Sun, 21 Jan 2018 17:28:27 -0500 Subject: [PATCH 034/670] * If GetItem returns null when searching for a container item, we now default bagslots to 10 instead of aborting. --- zone/client_packet.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 3ee4d0038..53fa8a27d 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -11700,11 +11700,13 @@ void Client::Handle_OP_RecipesFavorite(const EQApplicationPacket *app) auto item = database.GetItem(tsf->some_id); if (!item) { - Log(Logs::General, Logs::Error, "Invalid container ID: %d. GetItem returned null.\n", tsf->some_id); - return; + Log(Logs::General, Logs::Error, "Invalid container ID: %d. GetItem returned null. Defaulting to BagSlots = 10.\n", tsf->some_id); + combineObjectSlots = 10; + } + else + { + combineObjectSlots = item->BagSlots; } - - combineObjectSlots = item->BagSlots; } std::string favoriteIDs; //gotta be big enough for 500 IDs @@ -11772,11 +11774,13 @@ void Client::Handle_OP_RecipesSearch(const EQApplicationPacket *app) auto item = database.GetItem(rss->some_id); if (!item) { - Log(Logs::General, Logs::Error, "Invalid container ID: %d. GetItem returned null.\n", rss->some_id); - return; + Log(Logs::General, Logs::Error, "Invalid container ID: %d. GetItem returned null. Defaulting to BagSlots = 10.\n", rss->some_id); + combineObjectSlots = 10; + } + else + { + combineObjectSlots = item->BagSlots; } - - combineObjectSlots = item->BagSlots; } std::string searchClause; From 6ed330111010e5a86d367188924ae3b4c9515c50 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 24 Jan 2018 15:26:53 -0500 Subject: [PATCH 035/670] Add some appearance Changing functions These directly modify the values so we can script appearance on pets/swarm pets. (Ex. Host of the Elements, some Vet AAs) These functions are only really useful in EVENT_SPAWN since that's before the appearance data is sent to the client and this will avoid having to send a bunch of illusion packets. --- zone/lua_mob.cpp | 84 ++++++++++++++++++++++++++++++++++++++++++++++++ zone/lua_mob.h | 14 ++++++++ zone/mob.h | 14 ++++++++ 3 files changed, 112 insertions(+) diff --git a/zone/lua_mob.cpp b/zone/lua_mob.cpp index 98ca32569..bd5cddbcc 100644 --- a/zone/lua_mob.cpp +++ b/zone/lua_mob.cpp @@ -1605,6 +1605,76 @@ void Lua_Mob::SendIllusionPacket(luabind::adl::object illusion) { beard, aa_title, drakkin_heritage, drakkin_tattoo, drakkin_details, size); } +void Lua_Mob::ChangeRace(int in) { + Lua_Safe_Call_Void(); + self->ChangeRace(in); +} + +void Lua_Mob::ChangeGender(int in) { + Lua_Safe_Call_Void(); + self->ChangeGender(in); +} + +void Lua_Mob::ChangeTexture(int in) { + Lua_Safe_Call_Void(); + self->ChangeTexture(in); +} + +void Lua_Mob::ChangeHelmTexture(int in) { + Lua_Safe_Call_Void(); + self->ChangeHelmTexture(in); +} + +void Lua_Mob::ChangeHairColor(int in) { + Lua_Safe_Call_Void(); + self->ChangeHairColor(in); +} + +void Lua_Mob::ChangeBeardColor(int in) { + Lua_Safe_Call_Void(); + self->ChangeBeardColor(in); +} + +void Lua_Mob::ChangeEyeColor1(int in) { + Lua_Safe_Call_Void(); + self->ChangeEyeColor1(in); +} + +void Lua_Mob::ChangeEyeColor2(int in) { + Lua_Safe_Call_Void(); + self->ChangeEyeColor2(in); +} + +void Lua_Mob::ChangeHairStyle(int in) { + Lua_Safe_Call_Void(); + self->ChangeHairStyle(in); +} + +void Lua_Mob::ChangeLuclinFace(int in) { + Lua_Safe_Call_Void(); + self->ChangeLuclinFace(in); +} + +void Lua_Mob::ChangeBeard(int in) { + Lua_Safe_Call_Void(); + self->ChangeBeard(in); +} + +void Lua_Mob::ChangeDrakkinHeritage(int in) { + Lua_Safe_Call_Void(); + self->ChangeDrakkinHeritage(in); +} + +void Lua_Mob::ChangeDrakkinTattoo(int in) { + Lua_Safe_Call_Void(); + self->ChangeDrakkinTattoo(in); +} + +void Lua_Mob::ChangeDrakkinDetails(int in) { + Lua_Safe_Call_Void(); + self->ChangeDrakkinDetails(in); +} + void Lua_Mob::CameraEffect(uint32 duration, uint32 intensity) { Lua_Safe_Call_Void(); self->CameraEffect(duration, intensity); @@ -2356,6 +2426,20 @@ luabind::scope lua_register_mob() { .def("SetRace", (void(Lua_Mob::*)(int))&Lua_Mob::SetRace) .def("SetGender", (void(Lua_Mob::*)(int))&Lua_Mob::SetGender) .def("SendIllusionPacket", (void(Lua_Mob::*)(luabind::adl::object))&Lua_Mob::SendIllusionPacket) + .def("ChangeRace", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeRace) + .def("ChangeGender", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeGender) + .def("ChangeTexture", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeTexture) + .def("ChangeHelmTexture", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeHelmTexture) + .def("ChangeHairColor", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeHairColor) + .def("ChangeBeardColor", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeBeardColor) + .def("ChangeEyeColor1", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeEyeColor1) + .def("ChangeEyeColor2", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeEyeColor2) + .def("ChangeHairStyle", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeHairStyle) + .def("ChangeLuclinFace", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeLuclinFace) + .def("ChangeBeard", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeBeard) + .def("ChangeDrakkinHeritage", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeDrakkinHeritage) + .def("ChangeDrakkinTattoo", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeDrakkinTattoo) + .def("ChangeDrakkinDetails", (void(Lua_Mob::*)(int))&Lua_Mob::ChangeDrakkinDetails) .def("CameraEffect", (void(Lua_Mob::*)(uint32,uint32))&Lua_Mob::CameraEffect) .def("CameraEffect", (void(Lua_Mob::*)(uint32,uint32,Lua_Client))&Lua_Mob::CameraEffect) .def("CameraEffect", (void(Lua_Mob::*)(uint32,uint32,Lua_Client,bool))&Lua_Mob::CameraEffect) diff --git a/zone/lua_mob.h b/zone/lua_mob.h index 493f5e1e8..7aeb700e6 100644 --- a/zone/lua_mob.h +++ b/zone/lua_mob.h @@ -304,6 +304,20 @@ public: void SetRace(int in); void SetGender(int in); void SendIllusionPacket(luabind::adl::object illusion); + void ChangeRace(int in); + void ChangeGender(int in); + void ChangeTexture(int in); + void ChangeHelmTexture(int in); + void ChangeHairColor(int in); + void ChangeBeardColor(int in); + void ChangeEyeColor1(int in); + void ChangeEyeColor2(int in); + void ChangeHairStyle(int in); + void ChangeLuclinFace(int in); + void ChangeBeard(int in); + void ChangeDrakkinHeritage(int in); + void ChangeDrakkinTattoo(int in); + void ChangeDrakkinDetails(int in); void CameraEffect(uint32 duration, uint32 intensity); void CameraEffect(uint32 duration, uint32 intensity, Lua_Client c); void CameraEffect(uint32 duration, uint32 intensity, Lua_Client c, bool global); diff --git a/zone/mob.h b/zone/mob.h index d5de43e0c..f661a8600 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -439,6 +439,20 @@ public: inline uint8 GetDrakkinHeritage() const { return drakkin_heritage; } inline uint8 GetDrakkinTattoo() const { return drakkin_tattoo; } inline uint8 GetDrakkinDetails() const { return drakkin_details; } + inline void ChangeRace(uint16 in) { race = in; } + inline void ChangeGender(uint8 in) { gender = in;} + inline void ChangeTexture(uint8 in) { texture = in; } + inline void ChangeHelmTexture(uint8 in) { helmtexture = in; } + inline void ChangeHairColor(uint8 in) { haircolor = in; } + inline void ChangeBeardColor(uint8 in) { beardcolor = in; } + inline void ChangeEyeColor1(uint8 in) { eyecolor1 = in; } + inline void ChangeEyeColor2(uint8 in) { eyecolor2 = in; } + inline void ChangeHairStyle(uint8 in) { hairstyle = in; } + inline void ChangeLuclinFace(uint8 in) { luclinface = in; } + inline void ChangeBeard(uint8 in) { beard = in; } + inline void ChangeDrakkinHeritage(uint8 in) { drakkin_heritage = in; } + inline void ChangeDrakkinTattoo(uint8 in) { drakkin_tattoo = in; } + inline void ChangeDrakkinDetails(uint8 in) { drakkin_details = in; } inline uint32 GetArmorTint(uint8 i) const { return armor_tint.Slot[(i < EQEmu::textures::materialCount) ? i : 0].Color; } inline uint8 GetClass() const { return class_; } inline uint8 GetLevel() const { return level; } From 8e9fa38197a3a453d6813f045293d9faecd9723e Mon Sep 17 00:00:00 2001 From: Kinglykrab Date: Sat, 27 Jan 2018 18:19:48 -0500 Subject: [PATCH 036/670] Added #reloadmerchants for zone-based merchant refreshing. --- zone/command.cpp | 6 ++++++ zone/command.h | 1 + zone/zone.cpp | 12 ++++++++++++ zone/zone.h | 1 + 4 files changed, 20 insertions(+) diff --git a/zone/command.cpp b/zone/command.cpp index db24d3185..29b611135 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -317,6 +317,7 @@ int command_init(void) command_add("reloadallrules", "Executes a reload of all rules.", 80, command_reloadallrules) || command_add("reloademote", "Reloads NPC Emotes", 80, command_reloademote) || command_add("reloadlevelmods", nullptr, 255, command_reloadlevelmods) || + command_add("reloadmerchants", nullptr, 255, command_reloadmerchants) || command_add("reloadperlexportsettings", nullptr, 255, command_reloadperlexportsettings) || command_add("reloadqst", " - Clear quest cache (any argument causes it to also stop all timers)", 150, command_reloadqst) || command_add("reloadrulesworld", "Executes a reload of all rules in world specifically.", 80, command_reloadworldrules) || @@ -2996,6 +2997,11 @@ void command_reloadworld(Client *c, const Seperator *sep) safe_delete(pack); } +void command_reloadmerchants(Client *c, const Seperator *sep) { + zone->ReloadMerchants(); + c->Message(15, "Reloading merchants."); +} + void command_reloadlevelmods(Client *c, const Seperator *sep) { if (sep->arg[1][0] == 0) diff --git a/zone/command.h b/zone/command.h index a27f173fc..8f6257949 100644 --- a/zone/command.h +++ b/zone/command.h @@ -224,6 +224,7 @@ void command_reloadaa(Client *c, const Seperator *sep); void command_reloadallrules(Client *c, const Seperator *sep); void command_reloademote(Client* c, const Seperator *sep); void command_reloadlevelmods(Client *c, const Seperator *sep); +void command_reloadmerchants(Client *c, const Seperator *sep); void command_reloadperlexportsettings(Client *c, const Seperator *sep); void command_reloadqst(Client *c, const Seperator *sep); void command_reloadstatic(Client *c, const Seperator *sep); diff --git a/zone/zone.cpp b/zone/zone.cpp index 0e6a50092..262092db8 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -2272,6 +2272,18 @@ void Zone::ReloadWorld(uint32 Option){ } } +void Zone::ReloadMerchants() { + std::list npc_list; + entity_list.GetNPCList(npc_list); + + for(std::list::iterator itr = npc_list.begin(); itr != npc_list.end(); ++itr) { + NPC* npc = *itr; + if (npc->MerchantType != 0) { + zone->LoadNewMerchantData(npc->MerchantType); + } + } +} + void Zone::LoadTickItems() { tick_items.clear(); diff --git a/zone/zone.h b/zone/zone.h index b3ea9fbf1..3a5125eb4 100644 --- a/zone/zone.h +++ b/zone/zone.h @@ -209,6 +209,7 @@ public: void LoadAlternateCurrencies(); void LoadNPCEmotes(LinkedList* NPCEmoteList); void ReloadWorld(uint32 Option); + void ReloadMerchants(); Map* zonemap; WaterMap* watermap; From ceb2b287bb360317c9317373874c561b77c078e6 Mon Sep 17 00:00:00 2001 From: Kinglykrab Date: Sat, 27 Jan 2018 18:32:00 -0500 Subject: [PATCH 037/670] Fixed merchantlist probability. NPCs were setting a singular chance value and each item was checking based on this value, making the probability field not a random chance per item. This removes the probability field from NPCs, SetMerchantProbability() and GetMerchantProbability() and makes the probability field truly random chance. Special thanks to ChaosSlayerZ for noticing the issue here: http://www.eqemulator.org/forums/showthread.php?t=41731 --- zone/client_process.cpp | 2 +- zone/command.cpp | 2 +- zone/entity.cpp | 10 ++++++++- zone/entity.h | 1 + zone/lua_general.cpp | 1 - zone/lua_npc.cpp | 12 ---------- zone/lua_npc.h | 2 -- zone/npc.h | 3 --- zone/perl_npc.cpp | 50 ----------------------------------------- zone/zone.cpp | 12 ---------- zone/zonedump.h | 1 - 11 files changed, 12 insertions(+), 84 deletions(-) diff --git a/zone/client_process.cpp b/zone/client_process.cpp index ef7469aae..21863dbd3 100644 --- a/zone/client_process.cpp +++ b/zone/client_process.cpp @@ -887,7 +887,7 @@ void Client::BulkSendMerchantInventory(int merchant_id, int npcid) { uint8 handychance = 0; for (itr = merlist.begin(); itr != merlist.end() && i <= numItemSlots; ++itr) { MerchantList ml = *itr; - if (merch->CastToNPC()->GetMerchantProbability() > ml.probability) + if (ml.probability != 100 && zone->random.Int(1, 100) > ml.probability) continue; if (GetLevel() < ml.level_required) diff --git a/zone/command.cpp b/zone/command.cpp index 29b611135..5b45f3a69 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -2998,7 +2998,7 @@ void command_reloadworld(Client *c, const Seperator *sep) } void command_reloadmerchants(Client *c, const Seperator *sep) { - zone->ReloadMerchants(); + entity_list.ReloadMerchants(); c->Message(15, "Reloading merchants."); } diff --git a/zone/entity.cpp b/zone/entity.cpp index 4b0599541..e54042d5a 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -644,7 +644,6 @@ void EntityList::AddCorpse(Corpse *corpse, uint32 in_id) void EntityList::AddNPC(NPC *npc, bool SendSpawnPacket, bool dontqueue) { npc->SetID(GetFreeID()); - npc->SetMerchantProbability((uint8) zone->random.Int(0, 99)); parse->EventNPC(EVENT_SPAWN, npc, nullptr, "", 0); @@ -4871,3 +4870,12 @@ void EntityList::SendAlternateAdvancementStats() { c.second->SendAlternateAdvancementPoints(); } } + +void EntityList::ReloadMerchants() { + for (auto it = npc_list.begin();it != npc_list.end(); ++it) { + NPC *cur = it->second; + if (cur->MerchantType != 0) { + zone->LoadNewMerchantData(cur->MerchantType); + } + } +} diff --git a/zone/entity.h b/zone/entity.h index dccbb45b3..ec29b3581 100644 --- a/zone/entity.h +++ b/zone/entity.h @@ -244,6 +244,7 @@ public: void AddArea(int id, int type, float min_x, float max_x, float min_y, float max_y, float min_z, float max_z); void RemoveArea(int id); void ClearAreas(); + void ReloadMerchants(); void ProcessProximitySay(const char *Message, Client *c, uint8 language = 0); void SendAATimer(uint32 charid,UseAA_Struct* uaa); Doors *FindDoor(uint8 door_id); diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp index aad0be464..ec22fec1b 100644 --- a/zone/lua_general.cpp +++ b/zone/lua_general.cpp @@ -1464,7 +1464,6 @@ void lua_create_npc(luabind::adl::object table, float x, float y, float z, float LuaCreateNPCParse(healscale, float, 0); LuaCreateNPCParse(no_target_hotkey, bool, false); LuaCreateNPCParse(raid_target, bool, false); - LuaCreateNPCParse(probability, uint8, 0); NPC* npc = new NPC(npc_type, nullptr, glm::vec4(x, y, z, heading), FlyMode3); npc->GiveNPCTypeData(npc_type); diff --git a/zone/lua_npc.cpp b/zone/lua_npc.cpp index 50ff597f6..164e4146c 100644 --- a/zone/lua_npc.cpp +++ b/zone/lua_npc.cpp @@ -488,16 +488,6 @@ void Lua_NPC::MerchantCloseShop() { self->MerchantCloseShop(); } -void Lua_NPC::SetMerchantProbability(uint8 amt) { - Lua_Safe_Call_Void(); - self->SetMerchantProbability(amt); -} - -uint8 Lua_NPC::GetMerchantProbability() { - Lua_Safe_Call_Int(); - return self->GetMerchantProbability(); -} - int Lua_NPC::GetRawAC() { Lua_Safe_Call_Int(); return self->GetRawAC(); @@ -608,8 +598,6 @@ luabind::scope lua_register_npc() { .def("GetScore", (int(Lua_NPC::*)(void))&Lua_NPC::GetScore) .def("MerchantOpenShop", (void(Lua_NPC::*)(void))&Lua_NPC::MerchantOpenShop) .def("MerchantCloseShop", (void(Lua_NPC::*)(void))&Lua_NPC::MerchantCloseShop) - .def("SetMerchantProbability", (void(Lua_NPC::*)(void))&Lua_NPC::SetMerchantProbability) - .def("GetMerchantProbability", (uint8(Lua_NPC::*)(void))&Lua_NPC::GetMerchantProbability) .def("GetRawAC", (int(Lua_NPC::*)(void))&Lua_NPC::GetRawAC) .def("GetAvoidanceRating", &Lua_NPC::GetAvoidanceRating); } diff --git a/zone/lua_npc.h b/zone/lua_npc.h index d3d673641..cab47b5d6 100644 --- a/zone/lua_npc.h +++ b/zone/lua_npc.h @@ -123,8 +123,6 @@ public: int GetScore(); void MerchantOpenShop(); void MerchantCloseShop(); - void SetMerchantProbability(uint8 amt); - uint8 GetMerchantProbability(); int GetRawAC(); int GetAvoidanceRating(); }; diff --git a/zone/npc.h b/zone/npc.h index 4c67dd1d2..4b891b496 100644 --- a/zone/npc.h +++ b/zone/npc.h @@ -403,8 +403,6 @@ public: uint32 GetSpawnKillCount(); int GetScore(); - void SetMerchantProbability(uint8 amt) { probability = amt; } - uint8 GetMerchantProbability() { return probability; } void mod_prespawn(Spawn2 *sp); int mod_npc_damage(int damage, EQEmu::skills::SkillType skillinuse, int hand, const EQEmu::ItemData* weapon, Mob* other); void mod_npc_killed_merit(Mob* c); @@ -537,7 +535,6 @@ protected: std::list mercDataList; bool raid_target; - uint8 probability; bool ignore_despawn; //NPCs with this set to 1 will ignore the despawn value in spawngroup private: diff --git a/zone/perl_npc.cpp b/zone/perl_npc.cpp index 64e71d82f..18594e17a 100644 --- a/zone/perl_npc.cpp +++ b/zone/perl_npc.cpp @@ -2304,54 +2304,6 @@ XS(XS_NPC_GetScore) XSRETURN(1); } -XS(XS_NPC_SetMerchantProbability); -XS(XS_NPC_SetMerchantProbability) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::SetMerchantProbability(THIS, Probability)"); - { - NPC *THIS; - uint8 Probability = (uint8)SvIV(ST(1)); - - if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else - Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) - Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - - THIS->SetMerchantProbability(Probability); - } - XSRETURN_EMPTY; -} - -XS(XS_NPC_GetMerchantProbability); -XS(XS_NPC_GetMerchantProbability) { - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: NPC::GetMerchantProbability(THIS)"); - { - NPC *THIS; - uint8 RETVAL; - dXSTARG; - - if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else - Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == NULL) - Perl_croak(aTHX_ "THIS is NULL, avoiding crash."); - - RETVAL = THIS->GetMerchantProbability(); - XSprePUSH; PUSHu((UV)RETVAL); - } - XSRETURN(1); -} - XS(XS_NPC_AddMeleeProc); XS(XS_NPC_AddMeleeProc) { dXSARGS; @@ -2677,8 +2629,6 @@ XS(boot_NPC) newXSproto(strcpy(buf, "GetAvoidanceRating"), XS_NPC_GetAvoidanceRating, file, "$"); newXSproto(strcpy(buf, "GetSpawnKillCount"), XS_NPC_GetSpawnKillCount, file, "$"); newXSproto(strcpy(buf, "GetScore"), XS_NPC_GetScore, file, "$"); - newXSproto(strcpy(buf, "SetMerchantProbability"), XS_NPC_SetMerchantProbability, file, "$$"); - newXSproto(strcpy(buf, "GetMerchantProbability"), XS_NPC_GetMerchantProbability, file, "$"); newXSproto(strcpy(buf, "AddMeleeProc"), XS_NPC_AddMeleeProc, file, "$$$"); newXSproto(strcpy(buf, "AddRangedProc"), XS_NPC_AddRangedProc, file, "$$$"); newXSproto(strcpy(buf, "AddDefensiveProc"), XS_NPC_AddDefensiveProc, file, "$$$"); diff --git a/zone/zone.cpp b/zone/zone.cpp index 262092db8..0e6a50092 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -2272,18 +2272,6 @@ void Zone::ReloadWorld(uint32 Option){ } } -void Zone::ReloadMerchants() { - std::list npc_list; - entity_list.GetNPCList(npc_list); - - for(std::list::iterator itr = npc_list.begin(); itr != npc_list.end(); ++itr) { - NPC* npc = *itr; - if (npc->MerchantType != 0) { - zone->LoadNewMerchantData(npc->MerchantType); - } - } -} - void Zone::LoadTickItems() { tick_items.clear(); diff --git a/zone/zonedump.h b/zone/zonedump.h index 2bd78c2d8..d305e4105 100644 --- a/zone/zonedump.h +++ b/zone/zonedump.h @@ -126,7 +126,6 @@ struct NPCType float healscale; bool no_target_hotkey; bool raid_target; - uint8 probability; uint8 armtexture; uint8 bracertexture; uint8 handtexture; From f8ce10472be8c511d4dc4446df762f053c6074aa Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 28 Jan 2018 18:06:54 -0500 Subject: [PATCH 038/670] Rework some Spell AI so NPCs can have spammy spells Lots of encounters in EQ will spam spells, like dragon fear is on a very tight timer etc. In order to eliminate the need to script all of these encounters AI spells with a priority of '0' will be treated as "innate spells." Devs have used this term and it is what I believe they mean by it. You can run update npc_spells_entries set priority = priority + 1 where priority >= 0; to disable the behavior. --- changelog.txt | 9 +++++++ zone/mob_ai.cpp | 71 +++++++++++++++++++++++++++++-------------------- zone/npc.h | 2 +- 3 files changed, 52 insertions(+), 30 deletions(-) diff --git a/changelog.txt b/changelog.txt index 72434e602..41e9a9342 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,14 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 01/28/2018 == +Mackal: Spell AI tweaks + +AI spells are treated as "innate" spells (devs use this term, and I think this is what they mean by it) +These spells are spammed by the NPC, lots of encounters on live work like this and this will greatly reduce +the need to do quest scripting on these types of encounters. + +You can safely run update npc_spells_entries set priority = priority + 1 where priority >= 0; if you want to disable this new behavior + == 10/08/2017 == Mackal: Rework regens diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 07e7770b0..309ba5864 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -47,7 +47,7 @@ extern Zone *zone; #endif //NOTE: do NOT pass in beneficial and detrimental spell types into the same call here! -bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes) { +bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes, bool bInnates) { if (!tar) return false; @@ -61,7 +61,8 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes) { // Any sane mob would cast if they can. bool cast_only_option = (IsRooted() && !CombatRange(tar)); - if (!cast_only_option && iChance < 100) { + // innates are always attempted + if (!cast_only_option && iChance < 100 && !bInnates) { if (zone->random.Int(0, 100) >= iChance) return false; } @@ -84,6 +85,12 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes) { //return false; continue; } + + if ((AIspells[i].priority == 0 && !bInnates) || (AIspells[i].priority != 0 && bInnates)) { + // so "innate" spells are special and spammed a bit + // we define an innate spell as a spell with priority 0 + continue; + } if (iSpellTypes & AIspells[i].type) { // manacost has special values, -1 is no mana cost, -2 is instant cast (no mana) int32 mana_cost = AIspells[i].manacost; @@ -99,7 +106,7 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes) { dist2 <= spells[AIspells[i].spellid].range*spells[AIspells[i].spellid].range ) && (mana_cost <= GetMana() || GetMana() == GetMaxMana()) - && (AIspells[i].time_cancast + (zone->random.Int(0, 4) * 1000)) <= Timer::GetCurrentTime() //break up the spelling casting over a period of time. + && (AIspells[i].time_cancast + (zone->random.Int(0, 4) * 500)) <= Timer::GetCurrentTime() //break up the spelling casting over a period of time. ) { #if MobAI_DEBUG_Spells >= 21 @@ -127,7 +134,7 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes) { } case SpellType_Root: { Mob *rootee = GetHateRandom(); - if (rootee && !rootee->IsRooted() && !rootee->IsFeared() && zone->random.Roll(50) + if (rootee && !rootee->IsRooted() && !rootee->IsFeared() && (bInnates || zone->random.Roll(50)) && rootee->DontRootMeBefore() < Timer::GetCurrentTime() && rootee->CanBuffStack(AIspells[i].spellid, GetLevel(), true) >= 0 ) { @@ -166,7 +173,7 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes) { } case SpellType_InCombatBuff: { - if(zone->random.Roll(50)) + if(bInnates || zone->random.Roll(50)) { AIDoSpellCast(i, tar, mana_cost); return true; @@ -185,7 +192,7 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes) { case SpellType_Slow: case SpellType_Debuff: { Mob * debuffee = GetHateRandom(); - if (debuffee && manaR >= 10 && zone->random.Roll(70) && + if (debuffee && manaR >= 10 && (bInnates || zone->random.Roll(70)) && debuffee->CanBuffStack(AIspells[i].spellid, GetLevel(), true) >= 0) { if (!checked_los) { if (!CheckLosFN(debuffee)) @@ -199,8 +206,8 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes) { } case SpellType_Nuke: { if ( - manaR >= 10 && zone->random.Roll(70) - && tar->CanBuffStack(AIspells[i].spellid, GetLevel(), true) >= 0 + manaR >= 10 && (bInnates || zone->random.Roll(70)) + && tar->CanBuffStack(AIspells[i].spellid, GetLevel(), false) >= 0 // saying it's a nuke here, AI shouldn't care too much if overwriting ) { if(!checked_los) { if(!CheckLosFN(tar)) @@ -213,7 +220,7 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes) { break; } case SpellType_Dispel: { - if(zone->random.Roll(15)) + if(bInnates || zone->random.Roll(15)) { if(!checked_los) { if(!CheckLosFN(tar)) @@ -229,7 +236,7 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes) { break; } case SpellType_Mez: { - if(zone->random.Roll(20)) + if(bInnates || zone->random.Roll(20)) { Mob * mezTar = nullptr; mezTar = entity_list.GetTargetForMez(this); @@ -245,7 +252,7 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes) { case SpellType_Charm: { - if(!IsPet() && zone->random.Roll(20)) + if(!IsPet() && (bInnates || zone->random.Roll(20))) { Mob * chrmTar = GetHateRandom(); if(chrmTar && chrmTar->CanBuffStack(AIspells[i].spellid, GetLevel(), true) >= 0) @@ -259,7 +266,7 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes) { case SpellType_Pet: { //keep mobs from recasting pets when they have them. - if (!IsPet() && !GetPetID() && zone->random.Roll(25)) { + if (!IsPet() && !GetPetID() && (bInnates || zone->random.Roll(25))) { AIDoSpellCast(i, tar, mana_cost); return true; } @@ -267,7 +274,7 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes) { } case SpellType_Lifetap: { if (GetHPRatio() <= 95 - && zone->random.Roll(50) + && (bInnates || zone->random.Roll(50)) && tar->CanBuffStack(AIspells[i].spellid, GetLevel(), true) >= 0 ) { if(!checked_los) { @@ -283,7 +290,7 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes) { case SpellType_Snare: { if ( !tar->IsRooted() - && zone->random.Roll(50) + && (bInnates || zone->random.Roll(50)) && tar->DontSnareMeBefore() < Timer::GetCurrentTime() && tar->CanBuffStack(AIspells[i].spellid, GetLevel(), true) >= 0 ) { @@ -301,7 +308,7 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes) { } case SpellType_DOT: { if ( - zone->random.Roll(60) + (bInnates || zone->random.Roll(60)) && tar->DontDotMeBefore() < Timer::GetCurrentTime() && tar->CanBuffStack(AIspells[i].spellid, GetLevel(), true) >= 0 ) { @@ -502,7 +509,7 @@ void NPC::AI_Start(uint32 iMoveDelay) { AIautocastspell_timer = std::unique_ptr(new Timer(1000)); AIautocastspell_timer->Disable(); } else { - AIautocastspell_timer = std::unique_ptr(new Timer(750)); + AIautocastspell_timer = std::unique_ptr(new Timer(500)); AIautocastspell_timer->Start(RandomTimer(0, 300), false); } @@ -1855,7 +1862,7 @@ void NPC::AI_Event_SpellCastFinished(bool iCastSucceeded, uint16 slot) { recovery_time += spells[AIspells[casting_spell_AIindex].spellid].recovery_time; if (AIspells[casting_spell_AIindex].recast_delay >= 0) { - if (AIspells[casting_spell_AIindex].recast_delay < 10000) + if (AIspells[casting_spell_AIindex].recast_delay < 1000) AIspells[casting_spell_AIindex].time_cancast = Timer::GetCurrentTime() + (AIspells[casting_spell_AIindex].recast_delay*1000); } else @@ -1878,14 +1885,17 @@ bool NPC::AI_EngagedCastCheck() { Log(Logs::Detail, Logs::AI, "Engaged autocast check triggered. Trying to cast healing spells then maybe offensive spells."); - // try casting a heal or gate - if (!AICastSpell(this, AISpellVar.engaged_beneficial_self_chance, SpellType_Heal | SpellType_Escape | SpellType_InCombatBuff)) { - // try casting a heal on nearby - if (!entity_list.AICheckCloseBeneficialSpells(this, AISpellVar.engaged_beneficial_other_chance, MobAISpellRange, SpellType_Heal)) { - //nobody to heal, try some detrimental spells. - if(!AICastSpell(GetTarget(), AISpellVar.engaged_detrimental_chance, SpellType_Nuke | SpellType_Lifetap | SpellType_DOT | SpellType_Dispel | SpellType_Mez | SpellType_Slow | SpellType_Debuff | SpellType_Charm | SpellType_Root)) { - //no spell to cast, try again soon. - AIautocastspell_timer->Start(RandomTimer(AISpellVar.engaged_no_sp_recast_min, AISpellVar.engaged_no_sp_recast_max), false); + // first try innate (spam) spells + if(!AICastSpell(GetTarget(), 0, SpellType_Nuke | SpellType_Lifetap | SpellType_DOT | SpellType_Dispel | SpellType_Mez | SpellType_Slow | SpellType_Debuff | SpellType_Charm | SpellType_Root, true)) { + // try casting a heal or gate + if (!AICastSpell(this, AISpellVar.engaged_beneficial_self_chance, SpellType_Heal | SpellType_Escape | SpellType_InCombatBuff)) { + // try casting a heal on nearby + if (!entity_list.AICheckCloseBeneficialSpells(this, AISpellVar.engaged_beneficial_other_chance, MobAISpellRange, SpellType_Heal)) { + //nobody to heal, try some detrimental spells. + if(!AICastSpell(GetTarget(), AISpellVar.engaged_detrimental_chance, SpellType_Nuke | SpellType_Lifetap | SpellType_DOT | SpellType_Dispel | SpellType_Mez | SpellType_Slow | SpellType_Debuff | SpellType_Charm | SpellType_Root)) { + //no spell to cast, try again soon. + AIautocastspell_timer->Start(RandomTimer(AISpellVar.engaged_no_sp_recast_min, AISpellVar.engaged_no_sp_recast_max), false); + } } } } @@ -1900,10 +1910,13 @@ bool NPC::AI_PursueCastCheck() { AIautocastspell_timer->Disable(); //prevent the timer from going off AGAIN while we are casting. Log(Logs::Detail, Logs::AI, "Engaged (pursuing) autocast check triggered. Trying to cast offensive spells."); - if(!AICastSpell(GetTarget(), AISpellVar.pursue_detrimental_chance, SpellType_Root | SpellType_Nuke | SpellType_Lifetap | SpellType_Snare | SpellType_DOT | SpellType_Dispel | SpellType_Mez | SpellType_Slow | SpellType_Debuff)) { - //no spell cast, try again soon. - AIautocastspell_timer->Start(RandomTimer(AISpellVar.pursue_no_sp_recast_min, AISpellVar.pursue_no_sp_recast_max), false); - } //else, spell casting finishing will reset the timer. + // checking innate (spam) spells first + if(!AICastSpell(GetTarget(), AISpellVar.pursue_detrimental_chance, SpellType_Root | SpellType_Nuke | SpellType_Lifetap | SpellType_Snare | SpellType_DOT | SpellType_Dispel | SpellType_Mez | SpellType_Slow | SpellType_Debuff, true)) { + if(!AICastSpell(GetTarget(), AISpellVar.pursue_detrimental_chance, SpellType_Root | SpellType_Nuke | SpellType_Lifetap | SpellType_Snare | SpellType_DOT | SpellType_Dispel | SpellType_Mez | SpellType_Slow | SpellType_Debuff)) { + //no spell cast, try again soon. + AIautocastspell_timer->Start(RandomTimer(AISpellVar.pursue_no_sp_recast_min, AISpellVar.pursue_no_sp_recast_max), false); + } //else, spell casting finishing will reset the timer. + } return(true); } return(false); diff --git a/zone/npc.h b/zone/npc.h index 4b891b496..181de06fa 100644 --- a/zone/npc.h +++ b/zone/npc.h @@ -457,7 +457,7 @@ protected: uint32* pDontCastBefore_casting_spell; std::vector AIspells; bool HasAISpell; - virtual bool AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes); + virtual bool AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes, bool bInnates = false); virtual bool AIDoSpellCast(uint8 i, Mob* tar, int32 mana_cost, uint32* oDontDoAgainBefore = 0); AISpellsVar_Struct AISpellVar; int16 GetFocusEffect(focusType type, uint16 spell_id); From 93ddf915a2761e1594eb745e3e415688710e654b Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Mon, 29 Jan 2018 14:48:10 -0500 Subject: [PATCH 039/670] Cleanup some rules that are no longer used anywhere. --- common/ruletypes.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/common/ruletypes.h b/common/ruletypes.h index 0d7c45edd..3f7bbffc9 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -275,17 +275,10 @@ RULE_INT(Zone, GlobalLootMultiplier, 1) // Sets Global Loot drop multiplier for RULE_CATEGORY_END() RULE_CATEGORY(Map) -//enable these to help prevent mob hopping when they are pathing -RULE_BOOL(Map, FixPathingZWhenLoading, true) //increases zone boot times a bit to reduce hopping. -RULE_BOOL(Map, FixPathingZAtWaypoints, false) //alternative to `WhenLoading`, accomplishes the same thing but does it at each waypoint instead of once at boot time. -RULE_BOOL(Map, FixPathingZWhenMoving, false) //very CPU intensive, but helps hopping with widely spaced waypoints. RULE_BOOL(Map, FixPathingZOnSendTo, false) //try to repair Z coords in the SendTo routine as well. RULE_BOOL(Map, FixZWhenMoving, true) // Automatically fix NPC Z coordinates when moving/pathing/engaged (Far less CPU intensive than its predecessor) RULE_BOOL(Map, MobZVisualDebug, false) // Displays spell effects determining whether or not NPC is hitting Best Z calcs (blue for hit, red for miss) -RULE_REAL(Map, FixPathingZMaxDeltaMoving, 20) //at runtime while pathing: max change in Z to allow the BestZ code to apply. -RULE_REAL(Map, FixPathingZMaxDeltaWaypoint, 20) //at runtime at each waypoint: max change in Z to allow the BestZ code to apply. RULE_REAL(Map, FixPathingZMaxDeltaSendTo, 20) //at runtime in SendTo: max change in Z to allow the BestZ code to apply. -RULE_REAL(Map, FixPathingZMaxDeltaLoading, 45) //while loading each waypoint: max change in Z to allow the BestZ code to apply. RULE_INT(Map, FindBestZHeightAdjust, 1) // Adds this to the current Z before seeking the best Z position RULE_CATEGORY_END() From 7bd5213be412f388ba1495fc603b2bdfafdf3a5c Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Mon, 29 Jan 2018 15:16:56 -0500 Subject: [PATCH 040/670] Skip buff stack check for innates SpellType_Nukes --- zone/mob_ai.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 309ba5864..09bb54571 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -206,8 +206,8 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes, bool bInnates } case SpellType_Nuke: { if ( - manaR >= 10 && (bInnates || zone->random.Roll(70)) - && tar->CanBuffStack(AIspells[i].spellid, GetLevel(), false) >= 0 // saying it's a nuke here, AI shouldn't care too much if overwriting + manaR >= 10 && (bInnates || (zone->random.Roll(70) + && tar->CanBuffStack(AIspells[i].spellid, GetLevel(), false) >= 0)) // saying it's a nuke here, AI shouldn't care too much if overwriting ) { if(!checked_los) { if(!CheckLosFN(tar)) From 5d9c8c8e27d0b3ddfa5e9d504ac5d54b88750a83 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Mon, 29 Jan 2018 15:18:47 -0500 Subject: [PATCH 041/670] Quick fix to allow dev work to still happen on npc spells This will allow a bit of overhead while developing NPC spell sets --- zone/mob_ai.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 09bb54571..b14a09c79 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -2669,7 +2669,7 @@ DBnpcspells_Struct* ZoneDatabase::GetNPCSpells(uint32 iDBSpellsID) { return nullptr; if (!npc_spells_cache) { - npc_spells_maxid = GetMaxNPCSpellsID(); + npc_spells_maxid = GetMaxNPCSpellsID() + 50; // TODO: make this better, shitfix to allow dev work npc_spells_cache = new DBnpcspells_Struct*[npc_spells_maxid+1]; npc_spells_loadtried = new bool[npc_spells_maxid+1]; for (uint32 i=0; i<=npc_spells_maxid; i++) { From 6716e580f3533f027f1428c1565d9aa998a3570e Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Mon, 29 Jan 2018 23:36:05 -0500 Subject: [PATCH 042/670] Make npc_spells_cache a map fixes #705 Should probably add a way to clear the cache, but we didn't do that before so I didn't bother. --- zone/mob_ai.cpp | 203 ++++++++++++++++++++---------------------------- zone/zonedb.cpp | 17 +--- zone/zonedb.h | 10 +-- 3 files changed, 93 insertions(+), 137 deletions(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index b14a09c79..8bbfce4e9 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -2359,7 +2359,6 @@ bool NPC::AI_AddNPCSpells(uint32 iDBSpellsID) { return false; } DBnpcspells_Struct* parentlist = database.GetNPCSpells(spell_list->parent_list); - uint32 i; #if MobAI_DEBUG_Spells >= 10 std::string debug_msg = StringFormat("Loading NPCSpells onto %s: dbspellsid=%u", this->GetName(), iDBSpellsID); if (spell_list) { @@ -2414,14 +2413,11 @@ bool NPC::AI_AddNPCSpells(uint32 iDBSpellsID) { _idle_no_sp_recast_min = parentlist->idle_no_sp_recast_min; _idle_no_sp_recast_max = parentlist->idle_no_sp_recast_max; _idle_beneficial_chance = parentlist->idle_beneficial_chance; - for (i=0; inumentries; i++) { - if (GetLevel() >= parentlist->entries[i].minlevel && GetLevel() <= parentlist->entries[i].maxlevel && parentlist->entries[i].spellid > 0) { - if (!IsSpellInList(spell_list, parentlist->entries[i].spellid)) + for (auto &e : parentlist->entries) { + if (GetLevel() >= e.minlevel && GetLevel() <= e.maxlevel && e.spellid > 0) { + if (!IsSpellInList(spell_list, e.spellid)) { - AddSpellToNPCList(parentlist->entries[i].priority, - parentlist->entries[i].spellid, parentlist->entries[i].type, - parentlist->entries[i].manacost, parentlist->entries[i].recast_delay, - parentlist->entries[i].resist_adjust); + AddSpellToNPCList(e.priority, e.spellid, e.type, e.manacost, e.recast_delay, e.resist_adjust); } } } @@ -2460,14 +2456,12 @@ bool NPC::AI_AddNPCSpells(uint32 iDBSpellsID) { _idle_beneficial_chance = spell_list->idle_beneficial_chance; } - for (i=0; inumentries; i++) { - if (GetLevel() >= spell_list->entries[i].minlevel && GetLevel() <= spell_list->entries[i].maxlevel && spell_list->entries[i].spellid > 0) { - AddSpellToNPCList(spell_list->entries[i].priority, - spell_list->entries[i].spellid, spell_list->entries[i].type, - spell_list->entries[i].manacost, spell_list->entries[i].recast_delay, - spell_list->entries[i].resist_adjust); + for (auto &e : spell_list->entries) { + if (GetLevel() >= e.minlevel && GetLevel() <= e.maxlevel && e.spellid > 0) { + AddSpellToNPCList(e.priority, e.spellid, e.type, e.manacost, e.recast_delay, e.resist_adjust); } } + std::sort(AIspells.begin(), AIspells.end(), [](const AISpells_Struct& a, const AISpells_Struct& b) { return a.priority > b.priority; }); @@ -2605,11 +2599,9 @@ bool IsSpellEffectInList(DBnpcspellseffects_Struct* spelleffect_list, uint16 iSp } bool IsSpellInList(DBnpcspells_Struct* spell_list, int16 iSpellID) { - for (uint32 i=0; i < spell_list->numentries; i++) { - if (spell_list->entries[i].spellid == iSpellID) - return true; - } - return false; + auto it = std::find_if(spell_list->entries.begin(), spell_list->entries.end(), + [iSpellID](const DBnpcspells_entries_Struct &a) { return a.spellid == iSpellID; }); + return it != spell_list->entries.end(); } // adds a spell to the list, taking into account priority and resorting list as needed. @@ -2664,125 +2656,102 @@ void NPC::AISpellsList(Client *c) return; } -DBnpcspells_Struct* ZoneDatabase::GetNPCSpells(uint32 iDBSpellsID) { +DBnpcspells_Struct *ZoneDatabase::GetNPCSpells(uint32 iDBSpellsID) +{ if (iDBSpellsID == 0) return nullptr; - if (!npc_spells_cache) { - npc_spells_maxid = GetMaxNPCSpellsID() + 50; // TODO: make this better, shitfix to allow dev work - npc_spells_cache = new DBnpcspells_Struct*[npc_spells_maxid+1]; - npc_spells_loadtried = new bool[npc_spells_maxid+1]; - for (uint32 i=0; i<=npc_spells_maxid; i++) { - npc_spells_cache[i] = nullptr; - npc_spells_loadtried[i] = false; - } + auto it = npc_spells_cache.find(iDBSpellsID); + + if (it != npc_spells_cache.end()) { // it's in the cache, easy =) + return &it->second; } - if (iDBSpellsID > npc_spells_maxid) - return nullptr; - if (npc_spells_cache[iDBSpellsID]) { // it's in the cache, easy =) - return npc_spells_cache[iDBSpellsID]; - } - - else if (!npc_spells_loadtried[iDBSpellsID]) { // no reason to ask the DB again if we have failed once already - npc_spells_loadtried[iDBSpellsID] = true; + if (!npc_spells_loadtried.count(iDBSpellsID)) { // no reason to ask the DB again if we have failed once already + npc_spells_loadtried.insert(iDBSpellsID); std::string query = StringFormat("SELECT id, parent_list, attack_proc, proc_chance, " - "range_proc, rproc_chance, defensive_proc, dproc_chance, " - "fail_recast, engaged_no_sp_recast_min, engaged_no_sp_recast_max, " - "engaged_b_self_chance, engaged_b_other_chance, engaged_d_chance, " - "pursue_no_sp_recast_min, pursue_no_sp_recast_max, " - "pursue_d_chance, idle_no_sp_recast_min, idle_no_sp_recast_max, " - "idle_b_chance FROM npc_spells WHERE id=%d", iDBSpellsID); - auto results = QueryDatabase(query); - if (!results.Success()) { + "range_proc, rproc_chance, defensive_proc, dproc_chance, " + "fail_recast, engaged_no_sp_recast_min, engaged_no_sp_recast_max, " + "engaged_b_self_chance, engaged_b_other_chance, engaged_d_chance, " + "pursue_no_sp_recast_min, pursue_no_sp_recast_max, " + "pursue_d_chance, idle_no_sp_recast_min, idle_no_sp_recast_max, " + "idle_b_chance FROM npc_spells WHERE id=%d", + iDBSpellsID); + auto results = QueryDatabase(query); + if (!results.Success()) { return nullptr; - } + } - if (results.RowCount() != 1) - return nullptr; + if (results.RowCount() != 1) + return nullptr; - auto row = results.begin(); - uint32 tmpparent_list = atoi(row[1]); - uint16 tmpattack_proc = atoi(row[2]); - uint8 tmpproc_chance = atoi(row[3]); - uint16 tmprange_proc = atoi(row[4]); - int16 tmprproc_chance = atoi(row[5]); - uint16 tmpdefensive_proc = atoi(row[6]); - int16 tmpdproc_chance = atoi(row[7]); - uint32 tmppfail_recast = atoi(row[8]); - uint32 tmpengaged_no_sp_recast_min = atoi(row[9]); - uint32 tmpengaged_no_sp_recast_max = atoi(row[10]); - uint8 tmpengaged_b_self_chance = atoi(row[11]); - uint8 tmpengaged_b_other_chance = atoi(row[12]); - uint8 tmpengaged_d_chance = atoi(row[13]); - uint32 tmppursue_no_sp_recast_min = atoi(row[14]); - uint32 tmppursue_no_sp_recast_max = atoi(row[15]); - uint8 tmppursue_d_chance = atoi(row[16]); - uint32 tmpidle_no_sp_recast_min = atoi(row[17]); - uint32 tmpidle_no_sp_recast_max = atoi(row[18]); - uint8 tmpidle_b_chance = atoi(row[19]); + auto row = results.begin(); + DBnpcspells_Struct spell_set; + + spell_set.parent_list = atoi(row[1]); + spell_set.attack_proc = atoi(row[2]); + spell_set.proc_chance = atoi(row[3]); + spell_set.range_proc = atoi(row[4]); + spell_set.rproc_chance = atoi(row[5]); + spell_set.defensive_proc = atoi(row[6]); + spell_set.dproc_chance = atoi(row[7]); + spell_set.fail_recast = atoi(row[8]); + spell_set.engaged_no_sp_recast_min = atoi(row[9]); + spell_set.engaged_no_sp_recast_max = atoi(row[10]); + spell_set.engaged_beneficial_self_chance = atoi(row[11]); + spell_set.engaged_beneficial_other_chance = atoi(row[12]); + spell_set.engaged_detrimental_chance = atoi(row[13]); + spell_set.pursue_no_sp_recast_min = atoi(row[14]); + spell_set.pursue_no_sp_recast_max = atoi(row[15]); + spell_set.pursue_detrimental_chance = atoi(row[16]); + spell_set.idle_no_sp_recast_min = atoi(row[17]); + spell_set.idle_no_sp_recast_max = atoi(row[18]); + spell_set.idle_beneficial_chance = atoi(row[19]); // pulling fixed values from an auto-increment field is dangerous... - query = StringFormat("SELECT spellid, type, minlevel, maxlevel, " - "manacost, recast_delay, priority, resist_adjust " + query = StringFormat( + "SELECT spellid, type, minlevel, maxlevel, " + "manacost, recast_delay, priority, resist_adjust " #ifdef BOTS - "FROM %s " - "WHERE npc_spells_id=%d ORDER BY minlevel", (iDBSpellsID >= 3001 && iDBSpellsID <= 3016 ? "bot_spells_entries" : "npc_spells_entries"), iDBSpellsID); + "FROM %s " + "WHERE npc_spells_id=%d ORDER BY minlevel", + (iDBSpellsID >= 3001 && iDBSpellsID <= 3016 ? "bot_spells_entries" : "npc_spells_entries"), + iDBSpellsID); #else - "FROM npc_spells_entries " - "WHERE npc_spells_id=%d ORDER BY minlevel", iDBSpellsID); + "FROM npc_spells_entries " + "WHERE npc_spells_id=%d ORDER BY minlevel", + iDBSpellsID); #endif - results = QueryDatabase(query); + results = QueryDatabase(query); - if (!results.Success()) - { + if (!results.Success()) { return nullptr; - } + } - uint32 tmpSize = sizeof(DBnpcspells_Struct) + (sizeof(DBnpcspells_entries_Struct) * results.RowCount()); - npc_spells_cache[iDBSpellsID] = (DBnpcspells_Struct*) new uchar[tmpSize]; - memset(npc_spells_cache[iDBSpellsID], 0, tmpSize); - npc_spells_cache[iDBSpellsID]->parent_list = tmpparent_list; - npc_spells_cache[iDBSpellsID]->attack_proc = tmpattack_proc; - npc_spells_cache[iDBSpellsID]->proc_chance = tmpproc_chance; - npc_spells_cache[iDBSpellsID]->range_proc = tmprange_proc; - npc_spells_cache[iDBSpellsID]->rproc_chance = tmprproc_chance; - npc_spells_cache[iDBSpellsID]->defensive_proc = tmpdefensive_proc; - npc_spells_cache[iDBSpellsID]->dproc_chance = tmpdproc_chance; - npc_spells_cache[iDBSpellsID]->fail_recast = tmppfail_recast; - npc_spells_cache[iDBSpellsID]->engaged_no_sp_recast_min = tmpengaged_no_sp_recast_min; - npc_spells_cache[iDBSpellsID]->engaged_no_sp_recast_max = tmpengaged_no_sp_recast_max; - npc_spells_cache[iDBSpellsID]->engaged_beneficial_self_chance = tmpengaged_b_self_chance; - npc_spells_cache[iDBSpellsID]->engaged_beneficial_other_chance = tmpengaged_b_other_chance; - npc_spells_cache[iDBSpellsID]->engaged_detrimental_chance = tmpengaged_d_chance; - npc_spells_cache[iDBSpellsID]->pursue_no_sp_recast_min = tmppursue_no_sp_recast_min; - npc_spells_cache[iDBSpellsID]->pursue_no_sp_recast_max = tmppursue_no_sp_recast_max; - npc_spells_cache[iDBSpellsID]->pursue_detrimental_chance = tmppursue_d_chance; - npc_spells_cache[iDBSpellsID]->idle_no_sp_recast_min = tmpidle_no_sp_recast_min; - npc_spells_cache[iDBSpellsID]->idle_no_sp_recast_max = tmpidle_no_sp_recast_max; - npc_spells_cache[iDBSpellsID]->idle_beneficial_chance = tmpidle_b_chance; - npc_spells_cache[iDBSpellsID]->numentries = results.RowCount(); + int entryIndex = 0; + for (row = results.begin(); row != results.end(); ++row, ++entryIndex) { + DBnpcspells_entries_Struct entry; + int spell_id = atoi(row[0]); + entry.spellid = spell_id; + entry.type = atoul(row[1]); + entry.minlevel = atoi(row[2]); + entry.maxlevel = atoi(row[3]); + entry.manacost = atoi(row[4]); + entry.recast_delay = atoi(row[5]); + entry.priority = atoi(row[6]); - int entryIndex = 0; - for (row = results.begin(); row != results.end(); ++row, ++entryIndex) - { - int spell_id = atoi(row[0]); - npc_spells_cache[iDBSpellsID]->entries[entryIndex].spellid = spell_id; - npc_spells_cache[iDBSpellsID]->entries[entryIndex].type = atoul(row[1]); - npc_spells_cache[iDBSpellsID]->entries[entryIndex].minlevel = atoi(row[2]); - npc_spells_cache[iDBSpellsID]->entries[entryIndex].maxlevel = atoi(row[3]); - npc_spells_cache[iDBSpellsID]->entries[entryIndex].manacost = atoi(row[4]); - npc_spells_cache[iDBSpellsID]->entries[entryIndex].recast_delay = atoi(row[5]); - npc_spells_cache[iDBSpellsID]->entries[entryIndex].priority = atoi(row[6]); + if (row[7]) + entry.resist_adjust = atoi(row[7]); + else if (IsValidSpell(spell_id)) + entry.resist_adjust = spells[spell_id].ResistDiff; - if(row[7]) - npc_spells_cache[iDBSpellsID]->entries[entryIndex].resist_adjust = atoi(row[7]); - else if(IsValidSpell(spell_id)) - npc_spells_cache[iDBSpellsID]->entries[entryIndex].resist_adjust = spells[spell_id].ResistDiff; - } + spell_set.entries.push_back(entry); + } - return npc_spells_cache[iDBSpellsID]; + npc_spells_cache.insert(std::make_pair(iDBSpellsID, spell_set)); + + return &npc_spells_cache[iDBSpellsID]; } return nullptr; diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index e23d534c5..1de044973 100644 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -34,28 +34,15 @@ ZoneDatabase::ZoneDatabase(const char* host, const char* user, const char* passw void ZoneDatabase::ZDBInitVars() { memset(door_isopen_array, 0, sizeof(door_isopen_array)); - npc_spells_maxid = 0; - npc_spellseffects_maxid = 0; - npc_spells_cache = 0; npc_spellseffects_cache = 0; - npc_spells_loadtried = 0; npc_spellseffects_loadtried = 0; max_faction = 0; faction_array = nullptr; } ZoneDatabase::~ZoneDatabase() { - unsigned int x; - if (npc_spells_cache) { - for (x = 0; x <= npc_spells_maxid; x++) { - safe_delete_array(npc_spells_cache[x]); - } - safe_delete_array(npc_spells_cache); - } - safe_delete_array(npc_spells_loadtried); - if (npc_spellseffects_cache) { - for (x = 0; x <= npc_spellseffects_maxid; x++) { + for (int x = 0; x <= npc_spellseffects_maxid; x++) { safe_delete_array(npc_spellseffects_cache[x]); } safe_delete_array(npc_spellseffects_cache); @@ -63,7 +50,7 @@ ZoneDatabase::~ZoneDatabase() { safe_delete_array(npc_spellseffects_loadtried); if (faction_array != nullptr) { - for (x = 0; x <= max_faction; x++) { + for (int x = 0; x <= max_faction; x++) { if (faction_array[x] != 0) safe_delete(faction_array[x]); } diff --git a/zone/zonedb.h b/zone/zonedb.h index c134dade3..96604ce28 100644 --- a/zone/zonedb.h +++ b/zone/zonedb.h @@ -1,6 +1,8 @@ #ifndef ZONEDB_H_ #define ZONEDB_H_ +#include + #include "../common/shareddb.h" #include "../common/eq_packet_structs.h" #include "position.h" @@ -75,7 +77,6 @@ struct DBnpcspells_Struct { int16 rproc_chance; uint16 defensive_proc; int16 dproc_chance; - uint32 numentries; uint32 fail_recast; uint32 engaged_no_sp_recast_min; uint32 engaged_no_sp_recast_max; @@ -88,7 +89,7 @@ struct DBnpcspells_Struct { uint32 idle_no_sp_recast_min; uint32 idle_no_sp_recast_max; uint8 idle_beneficial_chance; - DBnpcspells_entries_Struct entries[0]; + std::vector entries; }; struct DBnpcspellseffects_Struct { @@ -524,10 +525,9 @@ protected: uint32 max_faction; Faction** faction_array; - uint32 npc_spells_maxid; uint32 npc_spellseffects_maxid; - DBnpcspells_Struct** npc_spells_cache; - bool* npc_spells_loadtried; + std::unordered_map npc_spells_cache; + std::unordered_set npc_spells_loadtried; DBnpcspellseffects_Struct** npc_spellseffects_cache; bool* npc_spellseffects_loadtried; uint8 door_isopen_array[255]; From 13ad5e4b46ff4a2fa3e78debacfdab0b9df56519 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Tue, 30 Jan 2018 12:53:58 -0500 Subject: [PATCH 043/670] Lets ignore Z on distance hate removal until pathing doesn't suck --- zone/hate_list.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zone/hate_list.cpp b/zone/hate_list.cpp index fe0ca4a04..5af9da7d9 100644 --- a/zone/hate_list.cpp +++ b/zone/hate_list.cpp @@ -657,6 +657,8 @@ void HateList::RemoveStaleEntries(int time_ms, float dist) auto cur_time = Timer::GetCurrentTime(); + auto dist2 = dist * dist; + while (it != list.end()) { auto m = (*it)->entity_on_hatelist; if (m) { @@ -665,7 +667,7 @@ void HateList::RemoveStaleEntries(int time_ms, float dist) if (cur_time - (*it)->last_modified > time_ms) remove = true; - if (!remove && hate_owner->CalculateDistance(m->GetX(), m->GetY(), m->GetZ()) > dist) { + if (!remove && DistanceSquaredNoZ(hate_owner->GetPosition(), m->GetPosition()) > dist2) { (*it)->oor_count++; if ((*it)->oor_count == 2) remove = true; From 03dbe47546c0ddfbaf7b04c3f5e281386d899f3d Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Tue, 30 Jan 2018 13:16:25 -0500 Subject: [PATCH 044/670] Skip distance check in mob spell AI for some target types This should be good enough for now, some of the hatelist spells use 0 ranges for some reason :P The client checks only a few target types for distance, we should probably just match that eventually --- zone/mob_ai.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 8bbfce4e9..bda34da46 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -98,13 +98,17 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes, bool bInnates mana_cost = spells[AIspells[i].spellid].mana; else if (mana_cost == -2) mana_cost = 0; + // this is ugly -- ignore distance for hatelist spells, looks like the client is only checking distance for some targettypes in CastSpell, + // should probably match that eventually. This should be good enough for now I guess .... if ( - (( - (spells[AIspells[i].spellid].targettype==ST_AECaster || spells[AIspells[i].spellid].targettype==ST_AEBard) - && dist2 <= spells[AIspells[i].spellid].aoerange*spells[AIspells[i].spellid].aoerange - ) || - dist2 <= spells[AIspells[i].spellid].range*spells[AIspells[i].spellid].range - ) + ( + (spells[AIspells[i].spellid].targettype == ST_HateList || spells[AIspells[i].spellid].targettype == ST_AETargetHateList) || + ( + (spells[AIspells[i].spellid].targettype==ST_AECaster || spells[AIspells[i].spellid].targettype==ST_AEBard) + && dist2 <= spells[AIspells[i].spellid].aoerange*spells[AIspells[i].spellid].aoerange + ) || + dist2 <= spells[AIspells[i].spellid].range*spells[AIspells[i].spellid].range + ) && (mana_cost <= GetMana() || GetMana() == GetMaxMana()) && (AIspells[i].time_cancast + (zone->random.Int(0, 4) * 500)) <= Timer::GetCurrentTime() //break up the spelling casting over a period of time. ) { From dd2b12b517b61fc320078c1952986ed03afb60c3 Mon Sep 17 00:00:00 2001 From: Uleat Date: Wed, 31 Jan 2018 17:46:28 -0500 Subject: [PATCH 045/670] Fix for 'MobAI_DEBUG_Spells >= 10' compile failure [skip-ci] --- zone/mob_ai.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index bda34da46..bbda210fe 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -2366,10 +2366,10 @@ bool NPC::AI_AddNPCSpells(uint32 iDBSpellsID) { #if MobAI_DEBUG_Spells >= 10 std::string debug_msg = StringFormat("Loading NPCSpells onto %s: dbspellsid=%u", this->GetName(), iDBSpellsID); if (spell_list) { - debug_msg.append(StringFormat(" (found, %u), parentlist=%u", spell_list->numentries, spell_list->parent_list)); + debug_msg.append(StringFormat(" (found, %u), parentlist=%u", spell_list->entries.size(), spell_list->parent_list)); if (spell_list->parent_list) { if (parentlist) - debug_msg.append(StringFormat(" (found, %u)", parentlist->numentries)); + debug_msg.append(StringFormat(" (found, %u)", parentlist->entries.size())); else debug_msg.append(" (not found)"); } From 88050219606dcf92ab34876ebeac030515684eca Mon Sep 17 00:00:00 2001 From: Uleat Date: Wed, 31 Jan 2018 19:31:09 -0500 Subject: [PATCH 046/670] Re-worked Bot::AI_Process(); Added 'leash,' 'main assist' and 'combat abort' features --- changelog.txt | 11 + zone/aggro.cpp | 22 + zone/bot.cpp | 944 ++++++++++++++++++++++++----------------- zone/bot.h | 18 +- zone/bot_command.cpp | 6 +- zone/heal_rotation.cpp | 23 +- zone/mob.cpp | 14 +- zone/mob.h | 1 + 8 files changed, 611 insertions(+), 428 deletions(-) diff --git a/changelog.txt b/changelog.txt index 41e9a9342..a7e75de62 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,16 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 01/31/2018 == +Uleat: Re-work of Bot::AI_Process(). Overall behavior is much improved. + - Removed a 'ton' of unneeded packet updates + - Added a 'leash' to the distance a bot can travel + - Added a 'main assist' feature to target control (set using group roles) + - Added combat 'jitter' movement to complement the existing rogue movement + - Attack can now be aborted if target contains no leash owner nor bot hate and leash owner turns off auto-attack + - Please report any issues with the bot AI code + +Added a work-around for heal rotations crashing the server - under certain conditions. + == 01/28/2018 == Mackal: Spell AI tweaks diff --git a/zone/aggro.cpp b/zone/aggro.cpp index cc70f1a4c..d73b96f6f 100644 --- a/zone/aggro.cpp +++ b/zone/aggro.cpp @@ -1007,6 +1007,28 @@ bool Mob::CheckLosFN(float posX, float posY, float posZ, float mobSize) { return zone->zonemap->CheckLoS(myloc, oloc); } +bool Mob::CheckLosFN(glm::vec3 posWatcher, float sizeWatcher, glm::vec3 posTarget, float sizeTarget) { + if (zone->zonemap == nullptr) { + //not sure what the best return is on error + //should make this a database variable, but im lazy today +#ifdef LOS_DEFAULT_CAN_SEE + return(true); +#else + return(false); +#endif + } + +#define LOS_DEFAULT_HEIGHT 6.0f + + posWatcher.z += (sizeWatcher == 0.0f ? LOS_DEFAULT_HEIGHT : sizeWatcher) / 2 * HEAD_POSITION; + posTarget.z += (sizeTarget == 0.0f ? LOS_DEFAULT_HEIGHT : sizeTarget) / 2 * SEE_POSITION; + +#if LOSDEBUG>=5 + Log(Logs::General, Logs::None, "LOS from (%.2f, %.2f, %.2f) to (%.2f, %.2f, %.2f) sizes: (%.2f, %.2f) [static]", posWatcher.x, posWatcher.y, posWatcher.z, posTarget.x, posTarget.y, posTarget.z, sizeWatcher, sizeTarget); +#endif + return zone->zonemap->CheckLoS(posWatcher, posTarget); +} + //offensive spell aggro int32 Mob::CheckAggroAmount(uint16 spell_id, Mob *target, bool isproc) { diff --git a/zone/bot.cpp b/zone/bot.cpp index 6a1521d6b..844381336 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -70,7 +70,6 @@ Bot::Bot(NPCType npcTypeData, Client* botOwner) : NPC(&npcTypeData, nullptr, glm SetBotCharmer(false); SetPetChooser(false); SetRangerAutoWeaponSelect(false); - SetHasBeenSummoned(false); SetTaunting(GetClass() == WARRIOR); SetDefaultBotStance(); @@ -140,7 +139,6 @@ Bot::Bot(uint32 botID, uint32 botOwnerCharacterID, uint32 botSpellsID, double to SetBotCharmer(false); SetPetChooser(false); SetRangerAutoWeaponSelect(false); - SetHasBeenSummoned(false); bool stance_flag = false; if (!botdb.LoadStance(this, stance_flag) && bot_owner) @@ -2043,70 +2041,91 @@ void Bot::SetTarget(Mob* mob) { } } -float Bot::GetMaxMeleeRangeToTarget(Mob* target) { - float result = 0; - if(target) { - float size_mod = GetSize(); - float other_size_mod = target->GetSize(); +void Bot::ForceMovementEnd() { + FixZ(); + SetCurrentSpeed(0); + if (moved) + moved = false; +} - if(GetRace() == 49 || GetRace() == 158 || GetRace() == 196) //For races with a fixed size - size_mod = 60.0f; - else if (size_mod < 6.0) - size_mod = 8.0f; - - if(target->GetRace() == 49 || target->GetRace() == 158 || target->GetRace() == 196) //For races with a fixed size - other_size_mod = 60.0f; - else if (other_size_mod < 6.0) - other_size_mod = 8.0f; - - if (other_size_mod > size_mod) - size_mod = other_size_mod; - - if (size_mod > 29) - size_mod *= size_mod; - else if (size_mod > 19) - size_mod *= (size_mod * 2); - else - size_mod *= (size_mod * 4); - - // prevention of ridiculously sized hit boxes - if (size_mod > 10000) - size_mod = (size_mod / 7); - - result = size_mod; - } - - return result; +void Bot::ForceMovementEnd(float new_heading) { + SetHeading(new_heading); + ForceMovementEnd(); } // AI Processing for the Bot object void Bot::AI_Process() { - // TODO: Need to add root checks to all movement code - if (!IsAIControlled()) - return; - if (GetPauseAI()) +#define TEST_TARGET() if (!GetTarget()) { return; } + + Client* bot_owner = (GetBotOwner() && GetBotOwner()->IsClient() ? GetBotOwner()->CastToClient() : nullptr); + Group* bot_group = GetGroup(); + Mob* follow_mob = entity_list.GetMob(GetFollowID()); + + // Primary reasons for not processing AI + if (!bot_owner || !bot_group || !follow_mob || !IsAIControlled()) return; - uint8 botClass = GetClass(); - uint8 botLevel = GetLevel(); + if (bot_owner->IsDead()) { + SetTarget(nullptr); + SetBotOwner(nullptr); + + return; + } + + // We also need a leash owner (subset of primary AI criteria) + Client* leash_owner = (bot_group->GetLeader() && bot_group->GetLeader()->IsClient() ? bot_group->GetLeader()->CastToClient() : bot_owner); + if (!leash_owner) + return; + + // Berserk updates should occur if primary AI criteria are met + if (GetClass() == WARRIOR || GetClass() == BERSERKER) { + if (!berserk && GetHP() > 0 && GetHPRatio() < 30.0f) { + entity_list.MessageClose_StringID(this, false, 200, 0, BERSERK_START, GetName()); + berserk = true; + } + + if (berserk && GetHPRatio() >= 30.0f) { + entity_list.MessageClose_StringID(this, false, 200, 0, BERSERK_END, GetName()); + berserk = false; + } + } + + // Secondary reasons for not processing AI + if (GetPauseAI() || IsStunned() || IsMezzed() || (GetAppearance() == eaDead)) { + if (IsCasting()) + InterruptSpell(); + if (IsMyHealRotationSet() || (AmICastingForHealRotation() && m_member_of_heal_rotation->CastingMember() == this)) { + AdvanceHealRotation(false); + m_member_of_heal_rotation->SetMemberIsCasting(this, false); + } + + return; + } + + auto fm_dist = DistanceSquared(m_Position, follow_mob->GetPosition()); + auto lo_distance = DistanceSquared(m_Position, leash_owner->GetPosition()); if (IsCasting()) { - if ( - IsHealRotationMember() && + if (IsHealRotationMember() && m_member_of_heal_rotation->CastingOverride() && m_member_of_heal_rotation->CastingTarget() != nullptr && m_member_of_heal_rotation->CastingReady() && m_member_of_heal_rotation->CastingMember() == this && - !m_member_of_heal_rotation->MemberIsCasting(this) - ) { + !m_member_of_heal_rotation->MemberIsCasting(this)) + { InterruptSpell(); } else if (AmICastingForHealRotation() && m_member_of_heal_rotation->CastingMember() == this) { AdvanceHealRotation(false); return; } - else if (botClass != BARD) { + else if (GetClass() != BARD) { + if (IsEngaged()) + return; + if (fm_dist > GetFollowDistance()) // Cancel out-of-combat casting if movement is required + InterruptSpell(); + return; } } @@ -2114,28 +2133,13 @@ void Bot::AI_Process() { m_member_of_heal_rotation->SetMemberIsCasting(this, false); } - // A bot wont start its AI if not grouped - if(!GetBotOwner() || !IsGrouped() || GetAppearance() == eaDead) - return; - - Mob* BotOwner = GetBotOwner(); - if(!BotOwner) - return; - - try { - if(BotOwner->CastToClient()->IsDead()) { - SetTarget(0); - SetBotOwner(0); - return; - } - } - catch(...) { - SetTarget(0); - SetBotOwner(0); + // Can't move if rooted... + if (IsRooted() && IsMoving()) { + ForceMovementEnd(); return; } - if(IsMyHealRotationSet()) { + if (IsMyHealRotationSet()) { Mob* delete_me = HealRotationTarget(); if (AIHealRotation(HealRotationTarget(), UseHealRotationFastHeals())) { #if (EQDEBUG >= 12) @@ -2154,432 +2158,615 @@ void Bot::AI_Process() { } } - if(GetHasBeenSummoned()) { - if(IsBotCaster() || IsBotArcher()) { - if (AI_movement_timer->Check()) { - if(!GetTarget() || (IsBotCaster() && !IsBotCasterAtCombatRange(GetTarget())) || (IsBotArcher() && IsArcheryRange(GetTarget())) || (DistanceSquaredNoZ(static_cast(m_Position), m_PreSummonLocation) < 10)) { - if(GetTarget()) - FaceTarget(GetTarget()); + // Empty hate list - let's find a target + if (!IsEngaged()) { + Mob* lo_target = leash_owner->GetTarget(); - SetHasBeenSummoned(false); - } else if(!IsRooted()) { - if(GetTarget() && GetTarget()->GetHateTop() && GetTarget()->GetHateTop() != this) { - Log(Logs::Detail, Logs::AI, "Returning to location prior to being summoned."); - CalculateNewPosition2(m_PreSummonLocation.x, m_PreSummonLocation.y, m_PreSummonLocation.z, GetBotRunspeed()); - SetHeading(CalculateHeadingToTarget(m_PreSummonLocation.x, m_PreSummonLocation.y)); - return; - } - } - - if(IsMoving()) - SendPositionUpdate(); - else - SendPosition(); - } - } else { - if(GetTarget()) - FaceTarget(GetTarget()); - - SetHasBeenSummoned(false); + if (lo_target && lo_target->IsNPC() && + !lo_target->IsMezzed() && + (lo_target->GetHateAmount(leash_owner) || leash_owner->AutoAttackEnabled()) && + lo_distance <= BOT_LEASH_DISTANCE && + DistanceSquared(m_Position, lo_target->GetPosition()) <= BOT_LEASH_DISTANCE && + (CheckLosFN(lo_target) || leash_owner->CheckLosFN(lo_target)) && + IsAttackAllowed(lo_target)) + { + AddToHateList(lo_target, 1); + if (HasPet()) + GetPet()->AddToHateList(lo_target, 1); } - return; - } + else { + for (int counter = 0; counter < bot_group->GroupCount(); counter++) { + Mob* bg_member = bot_group->members[counter]; + if (!bg_member) + continue; - if(!IsEngaged()) { - if(GetFollowID()) { - if(BotOwner && BotOwner->GetTarget() && BotOwner->GetTarget()->IsNPC() && (BotOwner->GetTarget()->GetHateAmount(BotOwner) || BotOwner->CastToClient()->AutoAttackEnabled()) && IsAttackAllowed(BotOwner->GetTarget())) { - AddToHateList(BotOwner->GetTarget(), 1); - if(HasPet()) - GetPet()->AddToHateList(BotOwner->GetTarget(), 1); - } else { - Group* g = GetGroup(); - if(g) { - for(int counter = 0; counter < g->GroupCount(); counter++) { - if(g->members[counter]) { - Mob* tar = g->members[counter]->GetTarget(); - if(tar && tar->IsNPC() && tar->GetHateAmount(g->members[counter]) && IsAttackAllowed(g->members[counter]->GetTarget())) { - AddToHateList(tar, 1); - if(HasPet()) - GetPet()->AddToHateList(tar, 1); + Mob* bgm_target = bg_member->GetTarget(); + if (!bgm_target || !bgm_target->IsNPC()) + continue; - break; - } - } - } + if (!bgm_target->IsMezzed() && + bgm_target->GetHateAmount(bg_member) && + lo_distance <= BOT_LEASH_DISTANCE && + DistanceSquared(m_Position, bgm_target->GetPosition()) <= BOT_LEASH_DISTANCE && + (CheckLosFN(bgm_target) || leash_owner->CheckLosFN(bgm_target)) && + IsAttackAllowed(bgm_target)) + { + AddToHateList(bgm_target, 1); + if (HasPet()) + GetPet()->AddToHateList(bgm_target, 1); + + break; } } } } - if(IsEngaged()) { - if(rest_timer.Enabled()) + glm::vec3 Goal(0, 0, 0); + + // We have aggro to choose from + if (IsEngaged()) { + if (rest_timer.Enabled()) rest_timer.Disable(); - if(IsRooted()) - SetTarget(hate_list.GetClosestEntOnHateList(this)); - else - SetTarget(hate_list.GetEntWithMostHateOnList(this)); + // Group roles can be expounded upon in the future + auto assist_mob = entity_list.GetMob(bot_group->GetMainAssistName()); + bool find_target = true; + + if (assist_mob) { + if (assist_mob->GetTarget()) { + if (assist_mob != this) + SetTarget(assist_mob->GetTarget()); - if(!GetTarget()) + find_target = false; + } + else if (assist_mob != this) { + SetTarget(nullptr); + if (HasPet()) + GetPet()->SetTarget(nullptr); + + find_target = false; + } + } + + if (find_target) { + if (IsRooted()) + SetTarget(hate_list.GetClosestEntOnHateList(this)); + else + SetTarget(hate_list.GetEntWithMostHateOnList(this)); + } + + TEST_TARGET(); + + Mob* tar = GetTarget(); + if (!tar) return; - if(HasPet()) - GetPet()->SetTarget(GetTarget()); - - if(!IsSitting()) - FaceTarget(GetTarget()); - - if(DivineAura()) - return; + float tar_distance = DistanceSquared(m_Position, tar->GetPosition()); // Let's check if we have a los with our target. // If we don't, our hate_list is wiped. // Else, it was causing the bot to aggro behind wall etc... causing massive trains. - if(GetTarget()->IsMezzed() || !IsAttackAllowed(GetTarget())) { - WipeHateList(); - if(IsMoving()) { - SetHeading(0); - SetRunAnimSpeed(0); - SetCurrentSpeed(GetBotRunspeed()); - if(moved) - SetCurrentSpeed(0); + if (!tar->IsNPC() || + tar->IsMezzed() || + (!tar->GetHateAmount(this) && !tar->GetHateAmount(leash_owner) && !leash_owner->AutoAttackEnabled()) || + lo_distance > BOT_LEASH_DISTANCE || + tar_distance > BOT_LEASH_DISTANCE || + (!CheckLosFN(tar) && !leash_owner->CheckLosFN(tar)) || + !IsAttackAllowed(tar)) + { + if (HasPet()) { + GetPet()->RemoveFromHateList(tar); + GetPet()->SetTarget(nullptr); } - return; - } - else if (!CheckLosFN(GetTarget())) { - if (RuleB(Bots, UsePathing) && zone->pathing) { - bool WaypointChanged, NodeReached; - glm::vec3 Goal = UpdatePath(GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ(), - GetBotRunspeed(), WaypointChanged, NodeReached); + RemoveFromHateList(tar); + SetTarget(nullptr); - if (WaypointChanged) - tar_ndx = 20; - - CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetBotRunspeed()); - } - else { - Mob* follow = entity_list.GetMob(GetFollowID()); - if (follow) - CalculateNewPosition2(follow->GetX(), follow->GetY(), follow->GetZ(), GetBotRunspeed()); - } + if (IsMoving()) + ForceMovementEnd(); return; } + if (HasPet()) // this causes conflicts with default pet handler (bounces between targets) + GetPet()->SetTarget(tar); + + if (DivineAura()) + return; + if (!(m_PlayerState & static_cast(PlayerState::Aggressive))) SendAddPlayerState(PlayerState::Aggressive); bool atCombatRange = false; - float meleeDistance = GetMaxMeleeRangeToTarget(GetTarget()); - if(botClass == SHADOWKNIGHT || botClass == PALADIN || botClass == WARRIOR) - meleeDistance = (meleeDistance * .30); - else - meleeDistance *= (float)zone->random.Real(.50, .85); - bool atArcheryRange = IsArcheryRange(GetTarget()); + // Calculate melee distance + float melee_distance_max = 0.0f; + { + float size_mod = GetSize(); + float other_size_mod = tar->GetSize(); - if(GetRangerAutoWeaponSelect()) { + if (GetRace() == RT_DRAGON || GetRace() == RT_WURM || GetRace() == RT_DRAGON_7) //For races with a fixed size + size_mod = 60.0f; + else if (size_mod < 6.0f) + size_mod = 8.0f; + + if (tar->GetRace() == RT_DRAGON || tar->GetRace() == RT_WURM || tar->GetRace() == RT_DRAGON_7) //For races with a fixed size + other_size_mod = 60.0f; + else if (other_size_mod < 6.0f) + other_size_mod = 8.0f; + + if (other_size_mod > size_mod) + size_mod = other_size_mod; + + if (size_mod > 29.0f) + size_mod *= size_mod; + else if (size_mod > 19.0f) + size_mod *= (size_mod * 2.0f); + else + size_mod *= (size_mod * 4.0f); + + // prevention of ridiculously sized hit boxes + if (size_mod > 10000.0f) + size_mod = (size_mod / 7.0f); + + melee_distance_max = size_mod; + } + + float melee_distance = 0.0f; + + const auto* p_item = GetBotItem(EQEmu::inventory::slotPrimary); + const auto* s_item = GetBotItem(EQEmu::inventory::slotSecondary); + + switch (GetClass()) { + case WARRIOR: + case PALADIN: + case SHADOWKNIGHT: + if (p_item && p_item->GetItem()->IsType2HWeapon()) + melee_distance = melee_distance_max * 0.45f; + else if ((s_item && s_item->GetItem()->IsTypeShield()) || (!p_item && !s_item)) + melee_distance = melee_distance_max * 0.35f; + else + melee_distance = melee_distance_max * 0.40f; + + break; + case NECROMANCER: + case WIZARD: + case MAGICIAN: + case ENCHANTER: + if (p_item && p_item->GetItem()->IsType2HWeapon()) + melee_distance = melee_distance_max * 0.95f; + else + melee_distance = melee_distance_max * 0.75f; + + break; + default: + if (p_item && p_item->GetItem()->IsType2HWeapon()) + melee_distance = melee_distance_max * 0.70f; + else + melee_distance = melee_distance_max * 0.50f; + + break; + } + + float melee_distance_min = melee_distance / 2.0f; + + // Calculate casting distance + float caster_distance_max = 0.0f; + { + if (GetLevel() >= RuleI(Bots, CasterStopMeleeLevel)) { + switch (GetClass()) { + case CLERIC: + caster_distance_max = 1156.0f; // as DSq value (34 units) + break; + case DRUID: + caster_distance_max = 1764.0f; // as DSq value (42 units) + break; + case SHAMAN: + caster_distance_max = 1444.0f; // as DSq value (38 units) + break; + case NECROMANCER: + caster_distance_max = 2916.0f; // as DSq value (54 units) + break; + case WIZARD: + caster_distance_max = 2304.0f; // as DSq value (48 units) + break; + case MAGICIAN: + caster_distance_max = 2704.0f; // as DSq value (52 units) + break; + case ENCHANTER: + caster_distance_max = 2500.0f; // as DSq value (50 units) + break; + default: + break; + } + } + } + + float caster_distance_min = 0.0f; + if (caster_distance_max) { + caster_distance_min = melee_distance_max; + + if (caster_distance_max <= caster_distance_min) + caster_distance_max = caster_distance_min * 1.25f; + } + + bool atArcheryRange = IsArcheryRange(tar); + + if (GetRangerAutoWeaponSelect()) { bool changeWeapons = false; - if(atArcheryRange && !IsBotArcher()) { + if (atArcheryRange && !IsBotArcher()) { SetBotArcher(true); changeWeapons = true; - } else if(!atArcheryRange && IsBotArcher()) { + } + else if (!atArcheryRange && IsBotArcher()) { SetBotArcher(false); changeWeapons = true; } - if(changeWeapons) + if (changeWeapons) ChangeBotArcherWeapons(IsBotArcher()); } - if (IsBotArcher() && atArcheryRange) { + if (IsBotArcher() && atArcheryRange) + atCombatRange = true; + else if (caster_distance_max && tar_distance <= caster_distance_max) + atCombatRange = true; + else if (tar_distance <= melee_distance) + atCombatRange = true; + + // We can fight + if (atCombatRange) { if (IsMoving()) { - SetHeading(CalculateHeadingToTarget(GetTarget()->GetX(), GetTarget()->GetY())); - SetRunAnimSpeed(0); - SetCurrentSpeed(0); - if (moved) { - moved = false; - SetCurrentSpeed(0); - } + ForceMovementEnd(CalculateHeadingToTarget(tar->GetX(), tar->GetY())); + return; } - atCombatRange = true; - } - else if (GetLevel() >= RuleI(Bots, CasterStopMeleeLevel) && IsBotCasterAtCombatRange(GetTarget())) { - atCombatRange = true; - } - else if (DistanceSquared(m_Position, GetTarget()->GetPosition()) <= meleeDistance) { - atCombatRange = true; - } + + // Combat 'jitter' code + if (AI_movement_timer->Check() && (!spellend_timer.Enabled() || GetClass() == BARD)) { + if (!IsRooted()) { + if (HasTargetReflection()) { + if (GetClass() == ROGUE) { + if (!tar->IsFeared() && !tar->IsStunned()) { + if (evade_timer.Check(false)) { // Attempt to evade + int timer_duration = (HideReuseTime - GetSkillReuseTime(EQEmu::skills::SkillHide)) * 1000; + if (timer_duration < 0) + timer_duration = 0; - if(atCombatRange) { - if(IsMoving()) { - SetHeading(CalculateHeadingToTarget(GetTarget()->GetX(), GetTarget()->GetY())); - SetCurrentSpeed(0); - if(moved) { - moved = false; - SetCurrentSpeed(0); - } - } - - if(AI_movement_timer->Check()) { - if (!IsMoving()) { - if (GetClass() == ROGUE) { - if (HasTargetReflection() && !GetTarget()->IsFeared() && !GetTarget()->IsStunned()) { - // Hate redux actions - if (evade_timer.Check(false)) { - // Attempt to evade - int timer_duration = (HideReuseTime - GetSkillReuseTime(EQEmu::skills::SkillHide)) * 1000; - if (timer_duration < 0) - timer_duration = 0; - evade_timer.Start(timer_duration); - - Bot::BotGroupSay(this, "Attempting to evade %s", GetTarget()->GetCleanName()); - if (zone->random.Int(0, 260) < (int)GetSkill(EQEmu::skills::SkillHide)) - RogueEvade(GetTarget()); + evade_timer.Start(timer_duration); + if (zone->random.Int(0, 260) < (int)GetSkill(EQEmu::skills::SkillHide)) + RogueEvade(tar); + return; + } + else if (tar->IsRooted()) { // Move rogue back from rooted mob - out of combat range, if necessary + if (tar_distance <= melee_distance_max) { + if (PlotPositionAroundTarget(this, Goal.x, Goal.y, Goal.z)) { + CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetBotWalkspeed()); + return; + } + } + } + } + } + } + else { + if (caster_distance_min && tar_distance < caster_distance_min) { // Caster back-off adjustment + if (PlotPositionAroundTarget(this, Goal.x, Goal.y, Goal.z)) { + if (DistanceSquared(Goal, tar->GetPosition()) <= caster_distance_max) { + CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetBotWalkspeed()); + return; + } + } + else if (!IsFacingMob(tar)) { + FaceTarget(tar); return; } - else if (GetTarget()->IsRooted()) { - // Move rogue back from rooted mob - out of combat range, if necessary - float melee_distance = GetMaxMeleeRangeToTarget(GetTarget()); - float current_distance = DistanceSquared(static_cast(m_Position), static_cast(GetTarget()->GetPosition())); - - if (current_distance <= melee_distance) { - float newX = 0; - float newY = 0; - float newZ = 0; - FaceTarget(GetTarget()); - if (PlotPositionAroundTarget(this, newX, newY, newZ)) { - CalculateNewPosition2(newX, newY, newZ, GetBotRunspeed()); + } + else if (tar_distance < melee_distance_min) { // Melee back-off adjustment + if (PlotPositionAroundTarget(this, Goal.x, Goal.y, Goal.z)) { + if (DistanceSquared(Goal, tar->GetPosition()) <= melee_distance_max) { + CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetBotWalkspeed()); + return; + } + } + else if (!IsFacingMob(tar)) { + FaceTarget(tar); + return; + } + } + else if (GetClass() == ROGUE) { + if (!BehindMob(tar, GetX(), GetY())) { // Move the rogue to behind the mob + if (PlotPositionAroundTarget(tar, Goal.x, Goal.y, Goal.z)) { + if (DistanceSquared(Goal, tar->GetPosition()) <= melee_distance_max) { + CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetBotRunspeed()); // rogues are agile enough to run in melee range return; } } } } - else if (!BehindMob(GetTarget(), GetX(), GetY())) { - // Move the rogue to behind the mob - float newX = 0; - float newY = 0; - float newZ = 0; - if (PlotPositionAroundTarget(GetTarget(), newX, newY, newZ)) { - CalculateNewPosition2(newX, newY, newZ, GetBotRunspeed()); - return; + else { + if (caster_distance_max == 0.0f && // Not a caster or a caster still below melee stop level (standard combat jitter) + zone->random.Int(1, 100) >= 94 && // 7:100 chance + PlotPositionAroundTarget(tar, Goal.x, Goal.y, Goal.z)) // If we're behind the mob, we can attack when it's enraged + { + if (DistanceSquared(Goal, tar->GetPosition()) <= melee_distance_max) { + CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetBotWalkspeed()); + return; + } } } } - else if (GetClass() != ROGUE && (DistanceSquaredNoZ(m_Position, GetTarget()->GetPosition()) < GetTarget()->GetSize())) { - // If we are not a rogue trying to backstab, let's try to adjust our melee range so we don't appear to be bunched up - float newX = 0; - float newY = 0; - float newZ = 0; - if (PlotPositionAroundTarget(GetTarget(), newX, newY, newZ, false) && GetArchetype() != ARCHETYPE_CASTER) { - CalculateNewPosition2(newX, newY, newZ, GetBotRunspeed()); - return; - } + } + else { + if (!IsSitting() && !IsFacingMob(tar)) { + FaceTarget(tar); + return; } } - - // TODO: Test RuleB(Bots, UpdatePositionWithTimer) - if(IsMoving()) - SendPositionUpdate(); - else - SendPosition(); } - if(IsBotArcher() && ranged_timer.Check(false)) { - if(GetTarget()->GetHPRatio() <= 99.0f) - BotRangedAttack(GetTarget()); + // Up to this point, GetTarget() has been safe to dereference since the initial + // TEST_TARGET() call. Due to the chance of the target dying and our pointer + // being nullified, we need to test it before dereferencing to avoid crashes + + if (IsBotArcher() && ranged_timer.Check(false)) { // can shoot mezzed, stunned and dead!? + TEST_TARGET(); + if (GetTarget()->GetHPRatio() <= 99.0f) + BotRangedAttack(tar); } - else if(!IsBotArcher() && (!(IsBotCaster() && GetLevel() >= RuleI(Bots, CasterStopMeleeLevel))) && GetTarget() && !IsStunned() && !IsMezzed() && (GetAppearance() != eaDead)) { + else if (!IsBotArcher() && (!(IsBotCaster() && GetLevel() >= RuleI(Bots, CasterStopMeleeLevel)))) { // we can't fight if we don't have a target, are stun/mezzed or dead.. // Stop attacking if the target is enraged - if((IsEngaged() && !BehindMob(GetTarget(), GetX(), GetY()) && GetTarget()->IsEnraged()) || GetBotStance() == BotStancePassive) + TEST_TARGET(); + if (GetBotStance() == BotStancePassive || (tar->IsEnraged() && !BehindMob(tar, GetX(), GetY()))) return; // First, special attack per class (kick, backstab etc..) - DoClassAttacks(GetTarget()); - if(attack_timer.Check()) { - Attack(GetTarget(), EQEmu::inventory::slotPrimary); - TriggerDefensiveProcs(GetTarget(), EQEmu::inventory::slotPrimary, false); - EQEmu::ItemInstance *wpn = GetBotItem(EQEmu::inventory::slotPrimary); - TryWeaponProc(wpn, GetTarget(), EQEmu::inventory::slotPrimary); - bool tripleSuccess = false; - if(BotOwner && GetTarget() && CanThisClassDoubleAttack()) { - if(BotOwner && CheckBotDoubleAttack()) - Attack(GetTarget(), EQEmu::inventory::slotPrimary, true); + TEST_TARGET(); + DoClassAttacks(tar); - if(BotOwner && GetTarget() && GetSpecialAbility(SPECATK_TRIPLE) && CheckBotDoubleAttack(true)) { - tripleSuccess = true; - Attack(GetTarget(), EQEmu::inventory::slotPrimary, true); + TEST_TARGET(); + if (attack_timer.Check()) { // Process primary weapon attacks + Attack(tar, EQEmu::inventory::slotPrimary); + + TEST_TARGET(); + TriggerDefensiveProcs(tar, EQEmu::inventory::slotPrimary, false); + + TEST_TARGET(); + TryWeaponProc(p_item, tar, EQEmu::inventory::slotPrimary); + + //bool tripleSuccess = false; + + TEST_TARGET(); + if (CanThisClassDoubleAttack()) { + if (CheckBotDoubleAttack()) + Attack(tar, EQEmu::inventory::slotPrimary, true); + + TEST_TARGET(); + if (GetSpecialAbility(SPECATK_TRIPLE) && CheckBotDoubleAttack(true)) { + //tripleSuccess = true; + Attack(tar, EQEmu::inventory::slotPrimary, true); } + TEST_TARGET(); //quad attack, does this belong here?? - if(BotOwner && GetTarget() && GetSpecialAbility(SPECATK_QUAD) && CheckBotDoubleAttack(true)) - Attack(GetTarget(), EQEmu::inventory::slotPrimary, true); + if (GetSpecialAbility(SPECATK_QUAD) && CheckBotDoubleAttack(true)) + Attack(tar, EQEmu::inventory::slotPrimary, true); } + TEST_TARGET(); //Live AA - Flurry, Rapid Strikes ect (Flurry does not require Triple Attack). int32 flurrychance = (aabonuses.FlurryChance + spellbonuses.FlurryChance + itembonuses.FlurryChance); - if (GetTarget() && flurrychance) { - if(zone->random.Int(0, 100) < flurrychance) { + if (flurrychance) { + if (zone->random.Int(0, 100) < flurrychance) { Message_StringID(MT_NPCFlurry, YOU_FLURRY); - Attack(GetTarget(), EQEmu::inventory::slotPrimary, false); - Attack(GetTarget(), EQEmu::inventory::slotPrimary, false); + Attack(tar, EQEmu::inventory::slotPrimary, false); + + TEST_TARGET(); + Attack(tar, EQEmu::inventory::slotPrimary, false); } } + TEST_TARGET(); int32 ExtraAttackChanceBonus = (spellbonuses.ExtraAttackChance + itembonuses.ExtraAttackChance + aabonuses.ExtraAttackChance); - if (GetTarget() && ExtraAttackChanceBonus) { - EQEmu::ItemInstance *wpn = GetBotItem(EQEmu::inventory::slotPrimary); - if(wpn) { - if (wpn->GetItem()->IsType2HWeapon()) { - if(zone->random.Int(0, 100) < ExtraAttackChanceBonus) - Attack(GetTarget(), EQEmu::inventory::slotPrimary, false); - } + if (ExtraAttackChanceBonus) { + if (p_item && p_item->GetItem()->IsType2HWeapon()) { + if (zone->random.Int(0, 100) < ExtraAttackChanceBonus) + Attack(tar, EQEmu::inventory::slotPrimary, false); } } } - if (GetClass() == WARRIOR || GetClass() == BERSERKER) { - if(GetHP() > 0 && !berserk && this->GetHPRatio() < 30) { - entity_list.MessageClose_StringID(this, false, 200, 0, BERSERK_START, GetName()); - this->berserk = true; - } - - if (berserk && this->GetHPRatio() > 30) { - entity_list.MessageClose_StringID(this, false, 200, 0, BERSERK_END, GetName()); - this->berserk = false; - } - } - - //now off hand - if(GetTarget() && attack_dw_timer.Check() && CanThisClassDualWield()) { - const EQEmu::ItemInstance* instweapon = GetBotItem(EQEmu::inventory::slotSecondary); - const EQEmu::ItemData* weapon = nullptr; + TEST_TARGET(); + if (attack_dw_timer.Check() && CanThisClassDualWield()) { // Process secondary weapon attacks + const EQEmu::ItemData* s_itemdata = nullptr; //can only dual wield without a weapon if you're a monk - if(instweapon || (botClass == MONK)) { - if(instweapon) - weapon = instweapon->GetItem(); + if (s_item || (GetClass() == MONK)) { + if(s_item) + s_itemdata = s_item->GetItem(); - int weapontype = 0; // No weapon type. - bool bIsFist = true; - if(weapon) { - weapontype = weapon->ItemType; - bIsFist = false; + int weapon_type = 0; // No weapon type. + bool use_fist = true; + if (s_itemdata) { + weapon_type = s_itemdata->ItemType; + use_fist = false; } - if (bIsFist || !weapon->IsType2HWeapon()) { + if (use_fist || !s_itemdata->IsType2HWeapon()) { float DualWieldProbability = 0.0f; + int32 Ambidexterity = (aabonuses.Ambidexterity + spellbonuses.Ambidexterity + itembonuses.Ambidexterity); DualWieldProbability = ((GetSkill(EQEmu::skills::SkillDualWield) + GetLevel() + Ambidexterity) / 400.0f); // 78.0 max + int32 DWBonus = (spellbonuses.DualWieldChance + itembonuses.DualWieldChance); DualWieldProbability += (DualWieldProbability * float(DWBonus) / 100.0f); + float random = zone->random.Real(0, 1); + if (random < DualWieldProbability){ // Max 78% of DW - Attack(GetTarget(), EQEmu::inventory::slotSecondary); // Single attack with offhand - EQEmu::ItemInstance *wpn = GetBotItem(EQEmu::inventory::slotSecondary); - TryWeaponProc(wpn, GetTarget(), EQEmu::inventory::slotSecondary); - if( CanThisClassDoubleAttack() && CheckBotDoubleAttack()) { - if(GetTarget() && GetTarget()->GetHP() > -10) - Attack(GetTarget(), EQEmu::inventory::slotSecondary); // Single attack with offhand + Attack(tar, EQEmu::inventory::slotSecondary); // Single attack with offhand + + TEST_TARGET(); + TryWeaponProc(s_item, tar, EQEmu::inventory::slotSecondary); + + TEST_TARGET(); + if (CanThisClassDoubleAttack() && CheckBotDoubleAttack()) { + if (tar->GetHP() > -10) + Attack(tar, EQEmu::inventory::slotSecondary); // Single attack with offhand } } } } } } - } else { - if(GetTarget()->IsFeared() && !spellend_timer.Enabled()){ - // This is a mob that is fleeing either because it has been feared or is low on hitpoints - if(GetBotStance() != BotStancePassive) - AI_PursueCastCheck(); - } - - if (AI_movement_timer->Check()) { - if(!IsRooted()) { + } + else { // To far away to fight (GetTarget() validity can be iffy below this point - including outer scopes) + if (AI_movement_timer->Check() && (!spellend_timer.Enabled() || GetClass() == BARD)) { // Pursue processing + if (GetTarget() && !IsRooted()) { Log(Logs::Detail, Logs::AI, "Pursuing %s while engaged.", GetTarget()->GetCleanName()); - CalculateNewPosition2(GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ(), GetBotRunspeed()); + + Goal = GetTarget()->GetPosition(); + + if (RuleB(Bots, UsePathing) && zone->pathing) { + bool WaypointChanged, NodeReached; + + Goal = UpdatePath(Goal.x, Goal.y, Goal.z, + GetBotRunspeed(), WaypointChanged, NodeReached); + + if (WaypointChanged) + tar_ndx = 20; + } + + CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetBotRunspeed()); + return; } + else { + if (IsMoving()) + ForceMovementEnd(); + else + SendPosition(); - if(IsMoving()) - SendPositionUpdate(); - else - SendPosition(); + return; + } + } + + // Fix Z when following during pull, not when engaged and stationary + if (IsMoving() && fix_z_timer_engaged.Check()) { + FixZ(); + return; + } + + if (GetTarget() && GetTarget()->IsFeared() && !spellend_timer.Enabled() && AI_think_timer->Check()) { + if (!IsFacingMob(GetTarget())) + FaceTarget(GetTarget()); + + // This is a mob that is fleeing either because it has been feared or is low on hitpoints + if (GetBotStance() != BotStancePassive) { + AI_PursueCastCheck(); // This appears to always return true..can't trust for success/fail + return; + } } } // end not in combat range - if(!IsMoving() && !spellend_timer.Enabled()) { - if(GetBotStance() == BotStancePassive) - return; + if (!IsMoving() && !spellend_timer.Enabled()) { // This may actually need work... + SendPosition(); - if(AI_EngagedCastCheck()) + if (GetBotStance() == BotStancePassive) + return; + + if (GetTarget() && AI_EngagedCastCheck()) BotMeditate(false); - else if(GetArchetype() == ARCHETYPE_CASTER) + else if (GetArchetype() == ARCHETYPE_CASTER) BotMeditate(true); + + return; } } - else { + else { // Out-of-combat behavior SetTarget(nullptr); + + if (HasPet()) { + GetPet()->WipeHateList(); + GetPet()->SetTarget(nullptr); + } + if (m_PlayerState & static_cast(PlayerState::Aggressive)) SendRemovePlayerState(PlayerState::Aggressive); - Mob* follow = entity_list.GetMob(GetFollowID()); - if (!follow) - return; + // Leash the bot + if (lo_distance > BOT_LEASH_DISTANCE) { + if (IsMoving()) + ForceMovementEnd(); - if (!IsMoving() && AI_think_timer->Check() && !spellend_timer.Enabled()) { - if (GetBotStance() != BotStancePassive) { - if (!AI_IdleCastCheck() && !IsCasting() && GetClass() != BARD) - BotMeditate(true); - } - else { - if (GetClass() != BARD) - BotMeditate(true); - } + Warp(glm::vec3(leash_owner->GetPosition())); + + if (HasPet()) + GetPet()->Warp(glm::vec3(leash_owner->GetPosition())); + + return; } - if (AI_movement_timer->Check()) { - float dist = DistanceSquared(m_Position, follow->GetPosition()); - int speed = GetBotRunspeed(); - - if (dist < GetFollowDistance() + BOT_FOLLOW_DISTANCE_WALK) - speed = GetBotWalkspeed(); - - SetRunAnimSpeed(0); - - if (dist > GetFollowDistance()) { - if (RuleB(Bots, UsePathing) && zone->pathing) { - bool WaypointChanged, NodeReached; - - glm::vec3 Goal = UpdatePath(follow->GetX(), follow->GetY(), follow->GetZ(), - speed, WaypointChanged, NodeReached); - - if (WaypointChanged) - tar_ndx = 20; - - CalculateNewPosition2(Goal.x, Goal.y, Goal.z, speed); + // Ok to idle + if (fm_dist <= GetFollowDistance()) { + if (!IsMoving() && AI_think_timer->Check() && !spellend_timer.Enabled()) { + if (GetBotStance() != BotStancePassive) { + if (!AI_IdleCastCheck() && !IsCasting() && GetClass() != BARD) + BotMeditate(true); } else { - CalculateNewPosition2(follow->GetX(), follow->GetY(), follow->GetZ(), speed); + if (GetClass() != BARD) + BotMeditate(true); } - if (rest_timer.Enabled()) - rest_timer.Disable(); + return; + } + } + + // Non-engaged movement checks + if (AI_movement_timer->Check() && (!IsCasting() || GetClass() == BARD)) { + if (fm_dist > GetFollowDistance()) { + if (!IsRooted()) { + if (rest_timer.Enabled()) + rest_timer.Disable(); + + int speed = GetBotRunspeed(); + if (fm_dist < GetFollowDistance() + BOT_FOLLOW_DISTANCE_WALK) + speed = GetBotWalkspeed(); + + Goal = follow_mob->GetPosition(); + + if (RuleB(Bots, UsePathing) && zone->pathing) { + bool WaypointChanged, NodeReached; + + Goal = UpdatePath(Goal.x, Goal.y, Goal.z, + speed, WaypointChanged, NodeReached); + + if (WaypointChanged) + tar_ndx = 20; + } + + CalculateNewPosition2(Goal.x, Goal.y, Goal.z, speed); + + return; + } } else { - if (moved) { - moved = false; - SetCurrentSpeed(0); + if (IsMoving()) { + ForceMovementEnd(); + return; } } } + // Basically, bard bots get a chance to cast idle spells while moving if (IsMoving()) { - if (GetClass() == BARD && GetBotStance() != BotStancePassive && !spellend_timer.Enabled() && AI_think_timer->Check()) { - AI_IdleCastCheck(); + if (GetBotStance() != BotStancePassive) { + if (GetClass() == BARD && !spellend_timer.Enabled() && AI_think_timer->Check()) { + AI_IdleCastCheck(); + return; + } } } } @@ -2589,7 +2776,7 @@ void Bot::AI_Process() { void Bot::PetAIProcess() { if( !HasPet() || !GetPet() || !GetPet()->IsNPC()) return; - + Mob* BotOwner = this->GetBotOwner(); NPC* botPet = this->GetPet()->CastToNPC(); if(!botPet->GetOwner() || !botPet->GetID() || !botPet->GetOwnerID()) { @@ -7046,33 +7233,6 @@ bool Bot::IsArcheryRange(Mob *target) { return result; } -bool Bot::IsBotCasterAtCombatRange(Mob *target) -{ - static const float local[PLAYER_CLASS_COUNT] = { - 0.0f, // WARRIOR - 1156.0f, // CLERIC as DSq value (34 units) - 0.0f, 0.0f, 0.0f, // PALADIN, RANGER, SHADOWKNIGHT - 1764.0f, // DRUID as DSq value (42 units) - 0.0f, 0.0f, 0.0f, // MONK, BARD, ROGUE - 1444.0f, // SHAMAN as DSq value (38 units) - 2916.0f, // NECROMANCER as DSq value (54 units) - 2304.0f, // WIZARD as DSq value (48 units) - 2704.0f, // MAGICIAN as DSq value (52 units) - 2500.0f, // ENCHANTER as DSq value (50 units) - 0.0f, 0.0f // BEASTLORD, BERSERKER - }; - - if (!target) - return false; - if (GetClass() < WARRIOR || GetClass() > BERSERKER) - return false; - - float targetDistance = DistanceSquaredNoZ(m_Position, target->GetPosition()); - if (targetDistance < local[GetClass() - 1]) - return true; - return false; -} - void Bot::UpdateGroupCastingRoles(const Group* group, bool disband) { if (!group) @@ -8417,12 +8577,6 @@ bool Bot::HasOrMayGetAggro() { return mayGetAggro; } -void Bot::SetHasBeenSummoned(bool wasSummoned) { - _hasBeenSummoned = wasSummoned; - if(!wasSummoned) - m_PreSummonLocation = glm::vec3(); -} - void Bot::SetDefaultBotStance() { BotStanceType defaultStance = BotStanceBalanced; if (GetClass() == WARRIOR) diff --git a/zone/bot.h b/zone/bot.h index 1a6bcf7cd..baee2f0b4 100644 --- a/zone/bot.h +++ b/zone/bot.h @@ -42,6 +42,8 @@ #define BOT_FOLLOW_DISTANCE_DEFAULT_MAX 2500 // as DSq value (50 units) #define BOT_FOLLOW_DISTANCE_WALK 1000 // as DSq value (~31.623 units) +#define BOT_LEASH_DISTANCE 250000 // as DSq value (500 units) + extern WorldServer worldserver; const int BotAISpellRange = 100; // TODO: Write a method that calcs what the bot's spell range is based on spell, equipment, AA, whatever and replace this @@ -337,7 +339,6 @@ public: bool IsStanding(); int GetBotWalkspeed() const { return (int)((float)_GetWalkSpeed() * 1.786f); } // 1.25 / 0.7 = 1.7857142857142857142857142857143 int GetBotRunspeed() const { return (int)((float)_GetRunSpeed() * 1.786f); } - bool IsBotCasterAtCombatRange(Mob *target); bool UseDiscipline(uint32 spell_id, uint32 target); uint8 GetNumberNeedingHealedInGroup(uint8 hpr, bool includePets); bool GetNeedsCured(Mob *tar); @@ -404,7 +405,8 @@ public: bool AIHealRotation(Mob* tar, bool useFastHeals); bool GetPauseAI() { return _pauseAI; } void SetPauseAI(bool pause_flag) { _pauseAI = pause_flag; } - + void ForceMovementEnd(); + void ForceMovementEnd(float new_heading); // Mob AI Virtual Override Methods virtual void AI_Process(); @@ -532,9 +534,7 @@ public: bool IsBotWISCaster() { return IsWISCasterClass(GetClass()); } bool CanHeal(); int GetRawACNoShield(int &shield_ac); - bool GetHasBeenSummoned() { return _hasBeenSummoned; } - const glm::vec3 GetPreSummonLocation() const { return m_PreSummonLocation; } - + // new heal rotation code bool CreateHealRotation(uint32 cycle_duration_ms = 5000, bool fast_heals = false, bool adaptive_targeting = false, bool casting_override = false); bool DestroyHealRotation(); @@ -628,9 +628,6 @@ public: void SetBotStance(BotStanceType botStance) { _botStance = ((botStance != BotStanceUnknown) ? (botStance) : (BotStancePassive)); } void SetSpellRecastTimer(int timer_index, int32 recast_delay); void SetDisciplineRecastTimer(int timer_index, int32 recast_delay); - void SetHasBeenSummoned(bool s); - void SetPreSummonLocation(const glm::vec3& location) { m_PreSummonLocation = location; } - void SetAltOutOfCombatBehavior(bool behavior_flag) { _altoutofcombatbehavior = behavior_flag;} void SetShowHelm(bool showhelm) { _showhelm = showhelm; } void SetBeardColor(uint8 value) { beardcolor = value; } @@ -688,7 +685,6 @@ protected: virtual int32 CalcBotAAFocus(BotfocusType type, uint32 aa_ID, uint32 points, uint16 spell_id); virtual void PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* client); virtual bool AIDoSpellCast(uint8 i, Mob* tar, int32 mana_cost, uint32* oDontDoAgainBefore = 0); - virtual float GetMaxMeleeRangeToTarget(Mob* target); BotCastingRoles& GetCastingRoles() { return m_CastingRoles; } void SetGroupHealer(bool flag = true) { m_CastingRoles.GroupHealer = flag; } @@ -734,9 +730,7 @@ private: int32 max_end; int32 end_regen; uint32 timers[MaxTimer]; - bool _hasBeenSummoned; - glm::vec3 m_PreSummonLocation; - + Timer evade_timer; // can be moved to pTimers at some point BotCastingRoles m_CastingRoles; diff --git a/zone/bot_command.cpp b/zone/bot_command.cpp index 5ba73d068..b45c2b26a 100644 --- a/zone/bot_command.cpp +++ b/zone/bot_command.cpp @@ -5146,10 +5146,10 @@ void bot_subcommand_bot_summon(Client *c, const Seperator *sep) if (!bot_iter) continue; - Bot::BotGroupSay(bot_iter, "Whee!"); + //Bot::BotGroupSay(bot_iter, "Whee!"); bot_iter->WipeHateList(); - bot_iter->SetTarget(bot_iter->GetBotOwner()); + bot_iter->SetTarget(nullptr); bot_iter->Warp(glm::vec3(c->GetPosition())); bot_iter->DoAnim(0); @@ -5157,7 +5157,7 @@ void bot_subcommand_bot_summon(Client *c, const Seperator *sep) continue; bot_iter->GetPet()->WipeHateList(); - bot_iter->GetPet()->SetTarget(bot_iter); + bot_iter->GetPet()->SetTarget(nullptr); bot_iter->GetPet()->Warp(glm::vec3(c->GetPosition())); } diff --git a/zone/heal_rotation.cpp b/zone/heal_rotation.cpp index c9bf54189..489d1ab45 100644 --- a/zone/heal_rotation.cpp +++ b/zone/heal_rotation.cpp @@ -169,9 +169,10 @@ bool HealRotation::ClearMemberPool() m_casting_target_poke = false; m_active_heal_target = false; - ClearTargetPool(); + if (!ClearTargetPool()) + Log(Logs::General, Logs::Error, "HealRotation::ClearTargetPool() failed to clear m_target_pool (size: %u)", m_target_pool.size()); - auto clear_list = m_member_pool; + auto clear_list = const_cast&>(m_member_pool); for (auto member_iter : clear_list) member_iter->LeaveHealRotationMemberPool(); @@ -183,13 +184,23 @@ bool HealRotation::ClearTargetPool() m_hot_target = nullptr; m_hot_active = false; m_is_active = false; - - auto clear_list = m_target_pool; + + auto clear_list = const_cast&>(m_target_pool); for (auto target_iter : clear_list) target_iter->LeaveHealRotationTargetPool(); - m_casting_target_poke = false; - bias_targets(); + //m_casting_target_poke = false; + //bias_targets(); + + // strange crash point... + // bias_targets() should be returning on m_target_pool.empty() + // and setting this two properties as below + m_casting_target_poke = true; + m_active_heal_target = false; + // instead, the list retains mob shared_ptrs and + // attempts to process them - and crashes program + // predominate when adaptive_healing = true + // (shared_ptr now has a delayed gc action? this did work before...) return m_target_pool.empty(); } diff --git a/zone/mob.cpp b/zone/mob.cpp index 39efb1d3d..9239e5a14 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -2723,20 +2723,10 @@ bool Mob::HateSummon() { if(summon_level == 1) { entity_list.MessageClose(this, true, 500, MT_Say, "%s says,'You will not evade me, %s!' ", GetCleanName(), target->GetCleanName() ); - if (target->IsClient()) { + if (target->IsClient()) target->CastToClient()->MovePC(zone->GetZoneID(), zone->GetInstanceID(), m_Position.x, m_Position.y, m_Position.z, target->GetHeading(), 0, SummonPC); - } - else { -#ifdef BOTS - if(target && target->IsBot()) { - // set pre summoning info to return to (to get out of melee range for caster) - target->CastToBot()->SetHasBeenSummoned(true); - target->CastToBot()->SetPreSummonLocation(glm::vec3(target->GetPosition())); - - } -#endif //BOTS + else target->GMMove(m_Position.x, m_Position.y, m_Position.z, target->GetHeading()); - } return true; } else if(summon_level == 2) { diff --git a/zone/mob.h b/zone/mob.h index f661a8600..a06485659 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -612,6 +612,7 @@ public: std::list& GetHateList() { return hate_list.GetHateList(); } bool CheckLosFN(Mob* other); bool CheckLosFN(float posX, float posY, float posZ, float mobSize); + static bool CheckLosFN(glm::vec3 posWatcher, float sizeWatcher, glm::vec3 posTarget, float sizeTarget); inline void SetChanged() { pLastChange = Timer::GetCurrentTime(); } inline const uint32 LastChange() const { return pLastChange; } inline void SetLastLosState(bool value) { last_los_check = value; } From d71dbd17510b3473952538b1d18c7987ef158e77 Mon Sep 17 00:00:00 2001 From: Uleat Date: Thu, 1 Feb 2018 05:38:10 -0500 Subject: [PATCH 047/670] Relocated 'stop movement' code into class Mob from class Bot --- zone/bot.cpp | 24 ++++++------------------ zone/bot.h | 4 +--- zone/mob.cpp | 15 +++++++++++++++ zone/mob.h | 2 ++ 4 files changed, 24 insertions(+), 21 deletions(-) diff --git a/zone/bot.cpp b/zone/bot.cpp index 844381336..12de9b936 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -2041,18 +2041,6 @@ void Bot::SetTarget(Mob* mob) { } } -void Bot::ForceMovementEnd() { - FixZ(); - SetCurrentSpeed(0); - if (moved) - moved = false; -} - -void Bot::ForceMovementEnd(float new_heading) { - SetHeading(new_heading); - ForceMovementEnd(); -} - // AI Processing for the Bot object void Bot::AI_Process() { @@ -2135,7 +2123,7 @@ void Bot::AI_Process() { // Can't move if rooted... if (IsRooted() && IsMoving()) { - ForceMovementEnd(); + StopMoving(); return; } @@ -2263,7 +2251,7 @@ void Bot::AI_Process() { SetTarget(nullptr); if (IsMoving()) - ForceMovementEnd(); + StopMoving(); return; } @@ -2418,7 +2406,7 @@ void Bot::AI_Process() { // We can fight if (atCombatRange) { if (IsMoving()) { - ForceMovementEnd(CalculateHeadingToTarget(tar->GetX(), tar->GetY())); + StopMoving(CalculateHeadingToTarget(tar->GetX(), tar->GetY())); return; } @@ -2644,7 +2632,7 @@ void Bot::AI_Process() { } else { if (IsMoving()) - ForceMovementEnd(); + StopMoving(); else SendPosition(); @@ -2698,7 +2686,7 @@ void Bot::AI_Process() { // Leash the bot if (lo_distance > BOT_LEASH_DISTANCE) { if (IsMoving()) - ForceMovementEnd(); + StopMoving(); Warp(glm::vec3(leash_owner->GetPosition())); @@ -2754,7 +2742,7 @@ void Bot::AI_Process() { } else { if (IsMoving()) { - ForceMovementEnd(); + StopMoving(); return; } } diff --git a/zone/bot.h b/zone/bot.h index baee2f0b4..d945c13be 100644 --- a/zone/bot.h +++ b/zone/bot.h @@ -405,9 +405,7 @@ public: bool AIHealRotation(Mob* tar, bool useFastHeals); bool GetPauseAI() { return _pauseAI; } void SetPauseAI(bool pause_flag) { _pauseAI = pause_flag; } - void ForceMovementEnd(); - void ForceMovementEnd(float new_heading); - + // Mob AI Virtual Override Methods virtual void AI_Process(); virtual void AI_Stop(); diff --git a/zone/mob.cpp b/zone/mob.cpp index 9239e5a14..9efdda70c 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -1437,6 +1437,21 @@ void Mob::SendHPUpdate(bool skip_self /*= false*/, bool force_update_all /*= fal } } +void Mob::StopMoving() { + FixZ(); + SetCurrentSpeed(0); + if (moved) + moved = false; +} + +void Mob::StopMoving(float new_heading) { + SetHeading(new_heading); + FixZ(); + SetCurrentSpeed(0); + if (moved) + moved = false; +} + /* Used for mobs standing still - this does not send a delta */ void Mob::SendPosition() { auto app = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); diff --git a/zone/mob.h b/zone/mob.h index a06485659..6266aa029 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -569,6 +569,8 @@ public: void MakeSpawnUpdateNoDelta(PlayerPositionUpdateServer_Struct* spu); void MakeSpawnUpdate(PlayerPositionUpdateServer_Struct* spu); void SendPosition(); + void StopMoving(); + void StopMoving(float new_heading); void SetSpawned() { spawned = true; }; bool Spawned() { return spawned; }; virtual bool ShouldISpawnFor(Client *c) { return true; } From 3c794cfc07deb86591aa9d58bfe170e0baaed404 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 1 Feb 2018 18:32:40 -0500 Subject: [PATCH 048/670] Add Support to define a valid HP range for NPC casting These will allow us to define a valid HP range (HP of the caster) that an NPC will cast a spell. For example NPC casting a defensive spell at --- common/version.h | 2 +- utils/sql/db_update_manifest.txt | 1 + .../2018_02_01_NPC_Spells_Min_Max_HP.sql | 2 ++ zone/lua_npc.cpp | 8 ++++++- zone/lua_npc.h | 1 + zone/mob_ai.cpp | 23 ++++++++++++++----- zone/npc.h | 4 +++- zone/perl_npc.cpp | 2 +- zone/zonedb.h | 6 +++-- 9 files changed, 37 insertions(+), 12 deletions(-) create mode 100644 utils/sql/git/required/2018_02_01_NPC_Spells_Min_Max_HP.sql diff --git a/common/version.h b/common/version.h index 108ce784b..4c86b26d7 100644 --- a/common/version.h +++ b/common/version.h @@ -30,7 +30,7 @@ Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt */ -#define CURRENT_BINARY_DATABASE_VERSION 9115 +#define CURRENT_BINARY_DATABASE_VERSION 9117 #ifdef BOTS #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9017 #else diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index 11dd1b315..1f95a513f 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -370,6 +370,7 @@ 9114|2017_07_22_aura.sql|SHOW TABLES LIKE 'auras'|empty| 9115|2017_10_28_traps.sql|SHOW COLUMNS FROM `traps` LIKE 'triggered_number'|empty| 9116|2017_12_16_GroundSpawn_Respawn_Timer.sql|SHOW COLUMNS FROM `ground_spawns` WHERE Field = 'respawn_timer' AND Type = 'int(11) unsigned'|empty| +9117|2018_02_01_NPC_Spells_Min_Max_HP.sql|SHOW COLUMNS FROM `npc_spells_entries` LIKE 'min_hp'|empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/utils/sql/git/required/2018_02_01_NPC_Spells_Min_Max_HP.sql b/utils/sql/git/required/2018_02_01_NPC_Spells_Min_Max_HP.sql new file mode 100644 index 000000000..b0535e25f --- /dev/null +++ b/utils/sql/git/required/2018_02_01_NPC_Spells_Min_Max_HP.sql @@ -0,0 +1,2 @@ +ALTER TABLE `npc_spells_entries` ADD `min_hp` SMALLINT(5) DEFAULT '0'; +ALTER TABLE `npc_spells_entries` ADD `max_hp` SMALLINT(5) DEFAULT '0'; diff --git a/zone/lua_npc.cpp b/zone/lua_npc.cpp index 164e4146c..a16d78361 100644 --- a/zone/lua_npc.cpp +++ b/zone/lua_npc.cpp @@ -420,7 +420,12 @@ void Lua_NPC::ModifyNPCStat(const char *stat, const char *value) { void Lua_NPC::AddAISpell(int priority, int spell_id, int type, int mana_cost, int recast_delay, int resist_adjust) { Lua_Safe_Call_Void(); - self->AddSpellToNPCList(priority, spell_id, type, mana_cost, recast_delay, resist_adjust); + self->AddSpellToNPCList(priority, spell_id, type, mana_cost, recast_delay, resist_adjust, 0, 0); +} + +void Lua_NPC::AddAISpell(int priority, int spell_id, int type, int mana_cost, int recast_delay, int resist_adjust, int min_hp, int max_hp) { + Lua_Safe_Call_Void(); + self->AddSpellToNPCList(priority, spell_id, type, mana_cost, recast_delay, resist_adjust, min_hp, max_hp); } void Lua_NPC::RemoveAISpell(int spell_id) { @@ -585,6 +590,7 @@ luabind::scope lua_register_npc() { .def("SetSwarmTarget", (void(Lua_NPC::*)(int))&Lua_NPC::SetSwarmTarget) .def("ModifyNPCStat", (void(Lua_NPC::*)(const char*,const char*))&Lua_NPC::ModifyNPCStat) .def("AddAISpell", (void(Lua_NPC::*)(int,int,int,int,int,int))&Lua_NPC::AddAISpell) + .def("AddAISpell", (void(Lua_NPC::*)(int,int,int,int,int,int,int,int))&Lua_NPC::AddAISpell) .def("RemoveAISpell", (void(Lua_NPC::*)(int))&Lua_NPC::RemoveAISpell) .def("SetSpellFocusDMG", (void(Lua_NPC::*)(int))&Lua_NPC::SetSpellFocusDMG) .def("SetSpellFocusHeal", (void(Lua_NPC::*)(int))&Lua_NPC::SetSpellFocusHeal) diff --git a/zone/lua_npc.h b/zone/lua_npc.h index cab47b5d6..972adee90 100644 --- a/zone/lua_npc.h +++ b/zone/lua_npc.h @@ -110,6 +110,7 @@ public: void SetSwarmTarget(int target); void ModifyNPCStat(const char *stat, const char *value); void AddAISpell(int priority, int spell_id, int type, int mana_cost, int recast_delay, int resist_adjust); + void AddAISpell(int priority, int spell_id, int type, int mana_cost, int recast_delay, int resist_adjust, int min_hp, int max_hp); void RemoveAISpell(int spell_id); void SetSpellFocusDMG(int focus); void SetSpellFocusHeal(int focus); diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index bbda210fe..33970640c 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -91,6 +91,13 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes, bool bInnates // we define an innate spell as a spell with priority 0 continue; } + + if (AIspells[i].min_hp != 0 && GetIntHPRatio() < AIspells[i].min_hp) + continue; + + if (AIspells[i].max_hp != 0 && GetIntHPRatio() > AIspells[i].max_hp) + continue; + if (iSpellTypes & AIspells[i].type) { // manacost has special values, -1 is no mana cost, -2 is instant cast (no mana) int32 mana_cost = AIspells[i].manacost; @@ -2421,7 +2428,7 @@ bool NPC::AI_AddNPCSpells(uint32 iDBSpellsID) { if (GetLevel() >= e.minlevel && GetLevel() <= e.maxlevel && e.spellid > 0) { if (!IsSpellInList(spell_list, e.spellid)) { - AddSpellToNPCList(e.priority, e.spellid, e.type, e.manacost, e.recast_delay, e.resist_adjust); + AddSpellToNPCList(e.priority, e.spellid, e.type, e.manacost, e.recast_delay, e.resist_adjust, e.min_hp, e.max_hp); } } } @@ -2462,7 +2469,7 @@ bool NPC::AI_AddNPCSpells(uint32 iDBSpellsID) { for (auto &e : spell_list->entries) { if (GetLevel() >= e.minlevel && GetLevel() <= e.maxlevel && e.spellid > 0) { - AddSpellToNPCList(e.priority, e.spellid, e.type, e.manacost, e.recast_delay, e.resist_adjust); + AddSpellToNPCList(e.priority, e.spellid, e.type, e.manacost, e.recast_delay, e.resist_adjust, e.min_hp, e.max_hp); } } @@ -2610,7 +2617,7 @@ bool IsSpellInList(DBnpcspells_Struct* spell_list, int16 iSpellID) { // adds a spell to the list, taking into account priority and resorting list as needed. void NPC::AddSpellToNPCList(int16 iPriority, int16 iSpellID, uint32 iType, - int16 iManaCost, int32 iRecastDelay, int16 iResistAdjust) + int16 iManaCost, int32 iRecastDelay, int16 iResistAdjust, int8 min_hp, int8 max_hp) { if(!IsValidSpell(iSpellID)) @@ -2626,6 +2633,8 @@ void NPC::AddSpellToNPCList(int16 iPriority, int16 iSpellID, uint32 iType, t.recast_delay = iRecastDelay; t.time_cancast = 0; t.resist_adjust = iResistAdjust; + t.min_hp = min_hp; + t.max_hp = max_hp; AIspells.push_back(t); @@ -2716,7 +2725,7 @@ DBnpcspells_Struct *ZoneDatabase::GetNPCSpells(uint32 iDBSpellsID) // pulling fixed values from an auto-increment field is dangerous... query = StringFormat( "SELECT spellid, type, minlevel, maxlevel, " - "manacost, recast_delay, priority, resist_adjust " + "manacost, recast_delay, priority, min_hp, max_hp, resist_adjust " #ifdef BOTS "FROM %s " "WHERE npc_spells_id=%d ORDER BY minlevel", @@ -2744,9 +2753,11 @@ DBnpcspells_Struct *ZoneDatabase::GetNPCSpells(uint32 iDBSpellsID) entry.manacost = atoi(row[4]); entry.recast_delay = atoi(row[5]); entry.priority = atoi(row[6]); + entry.min_hp = atoi(row[7]); + entry.max_hp = atoi(row[8]); - if (row[7]) - entry.resist_adjust = atoi(row[7]); + if (row[9]) + entry.resist_adjust = atoi(row[9]); else if (IsValidSpell(spell_id)) entry.resist_adjust = spells[spell_id].ResistDiff; diff --git a/zone/npc.h b/zone/npc.h index 181de06fa..8edff6245 100644 --- a/zone/npc.h +++ b/zone/npc.h @@ -61,6 +61,8 @@ struct AISpells_Struct { int32 recast_delay; int16 priority; int16 resist_adjust; + int8 min_hp; // >0 won't cast if HP is below + int8 max_hp; // >0 won't cast if HP is above }; struct AISpellsEffects_Struct { @@ -378,7 +380,7 @@ public: void NPCSlotTexture(uint8 slot, uint16 texture); // Sets new material values for slots uint32 GetAdventureTemplate() const { return adventure_template_id; } - void AddSpellToNPCList(int16 iPriority, int16 iSpellID, uint32 iType, int16 iManaCost, int32 iRecastDelay, int16 iResistAdjust); + void AddSpellToNPCList(int16 iPriority, int16 iSpellID, uint32 iType, int16 iManaCost, int32 iRecastDelay, int16 iResistAdjust, int8 min_hp, int8 max_hp); void AddSpellEffectToNPCList(uint16 iSpellEffectID, int32 base, int32 limit, int32 max); void RemoveSpellFromNPCList(int16 spell_id); Timer *GetRefaceTimer() const { return reface_timer; } diff --git a/zone/perl_npc.cpp b/zone/perl_npc.cpp index 18594e17a..eef7b1717 100644 --- a/zone/perl_npc.cpp +++ b/zone/perl_npc.cpp @@ -1993,7 +1993,7 @@ XS(XS_NPC_AddSpellToNPCList) if(THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - THIS->AddSpellToNPCList(priority, spell_id, type, mana_cost, recast_delay, resist_adjust); + THIS->AddSpellToNPCList(priority, spell_id, type, mana_cost, recast_delay, resist_adjust, 0, 0); } XSRETURN_EMPTY; } diff --git a/zone/zonedb.h b/zone/zonedb.h index 96604ce28..0a13c672e 100644 --- a/zone/zonedb.h +++ b/zone/zonedb.h @@ -48,13 +48,15 @@ struct wplist { #pragma pack(1) struct DBnpcspells_entries_Struct { int16 spellid; - uint32 type; uint8 minlevel; uint8 maxlevel; + uint32 type; int16 manacost; - int32 recast_delay; int16 priority; + int32 recast_delay; int16 resist_adjust; + int8 min_hp; + int8 max_hp; }; #pragma pack() From c21293e5080dd2bfa10b88b7b6cba0c5ba04c654 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 1 Feb 2018 18:55:16 -0500 Subject: [PATCH 049/670] Fix issue with spells that didn't make sense to be innate --- common/spdat.h | 2 ++ zone/mob_ai.cpp | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/common/spdat.h b/common/spdat.h index 0f9e7a47a..51ec8327b 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -73,6 +73,8 @@ enum SpellTypes : uint32 SpellTypes_Detrimental = (SpellType_Nuke | SpellType_Root | SpellType_Lifetap | SpellType_Snare | SpellType_DOT | SpellType_Dispel | SpellType_Mez | SpellType_Charm | SpellType_Debuff | SpellType_Slow), SpellTypes_Beneficial = (SpellType_Heal | SpellType_Buff | SpellType_Escape | SpellType_Pet | SpellType_InCombatBuff | SpellType_Cure | SpellType_HateRedux | SpellType_InCombatBuffSong | SpellType_OutOfCombatBuffSong | SpellType_PreCombatBuff | SpellType_PreCombatBuffSong), + SpellTypes_Innate = (SpellType_Nuke | SpellType_Lifetap | SpellType_DOT | SpellType_Dispel | SpellType_Mez | SpellType_Slow | SpellType_Debuff | SpellType_Charm | SpellType_Root), + SpellType_Any = 0xFFFFFFFF }; diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 33970640c..5ae4a7369 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -2756,6 +2756,10 @@ DBnpcspells_Struct *ZoneDatabase::GetNPCSpells(uint32 iDBSpellsID) entry.min_hp = atoi(row[7]); entry.max_hp = atoi(row[8]); + // some spell types don't make much since to be priority 0, so fix that + if (!(entry.type & SpellTypes_Innate) && entry.priority == 0) + entry.priority = 1; + if (row[9]) entry.resist_adjust = atoi(row[9]); else if (IsValidSpell(spell_id)) From ab65bb1d57ddb1295f3463c492081fa6ec393051 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 1 Feb 2018 19:03:42 -0500 Subject: [PATCH 050/670] Update #showspellslist command --- zone/mob_ai.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 5ae4a7369..384f09932 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -2663,8 +2663,8 @@ void NPC::AISpellsList(Client *c) return; for (auto it = AIspells.begin(); it != AIspells.end(); ++it) - c->Message(0, "%s (%d): Type %d, Priority %d", - spells[it->spellid].name, it->spellid, it->type, it->priority); + c->Message(0, "%s (%d): Type %d, Priority %d, Recast Delay %d, Resist Adjust %d, Min HP %d, Max HP %d", + spells[it->spellid].name, it->spellid, it->type, it->priority, it->recast_delay, it->resist_adjust, it->min_hp, it->max_hp); return; } From cef4928dd0fc6cbbe789875b92baabde32db4205 Mon Sep 17 00:00:00 2001 From: Uleat Date: Thu, 1 Feb 2018 20:43:26 -0500 Subject: [PATCH 051/670] Tweak for rogue bot jitter code --- zone/bot.cpp | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/zone/bot.cpp b/zone/bot.cpp index 12de9b936..9afdd733f 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -2267,6 +2267,16 @@ void Bot::AI_Process() { bool atCombatRange = false; + const auto* p_item = GetBotItem(EQEmu::inventory::slotPrimary); + const auto* s_item = GetBotItem(EQEmu::inventory::slotSecondary); + + bool behind_mob = false; + bool backstab_weapon = false; + if (GetClass() == ROGUE) { + behind_mob = BehindMob(tar, GetX(), GetY()); // can be separated for other future use + backstab_weapon = p_item && p_item->GetItemBackstabDamage(); + } + // Calculate melee distance float melee_distance_max = 0.0f; { @@ -2302,9 +2312,6 @@ void Bot::AI_Process() { float melee_distance = 0.0f; - const auto* p_item = GetBotItem(EQEmu::inventory::slotPrimary); - const auto* s_item = GetBotItem(EQEmu::inventory::slotSecondary); - switch (GetClass()) { case WARRIOR: case PALADIN: @@ -2327,6 +2334,16 @@ void Bot::AI_Process() { melee_distance = melee_distance_max * 0.75f; break; + case ROGUE: + if (behind_mob && backstab_weapon) { + if (p_item->GetItem()->IsType2HWeapon()) // p_item tested above + melee_distance = melee_distance_max * 0.30f; + else + melee_distance = melee_distance_max * 0.25f; + + break; + } + // Fall-through default: if (p_item && p_item->GetItem()->IsType2HWeapon()) melee_distance = melee_distance_max * 0.70f; @@ -2463,13 +2480,11 @@ void Bot::AI_Process() { return; } } - else if (GetClass() == ROGUE) { - if (!BehindMob(tar, GetX(), GetY())) { // Move the rogue to behind the mob - if (PlotPositionAroundTarget(tar, Goal.x, Goal.y, Goal.z)) { - if (DistanceSquared(Goal, tar->GetPosition()) <= melee_distance_max) { - CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetBotRunspeed()); // rogues are agile enough to run in melee range - return; - } + else if (backstab_weapon && !behind_mob) { // Move the rogue to behind the mob + if (PlotPositionAroundTarget(tar, Goal.x, Goal.y, Goal.z)) { + if (DistanceSquared(Goal, tar->GetPosition()) <= melee_distance_max) { + CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetBotRunspeed()); // rogues are agile enough to run in melee range + return; } } } From 1b2316ad1fa2510a56054dd4bdc866097693b3cb Mon Sep 17 00:00:00 2001 From: Uleat Date: Fri, 2 Feb 2018 18:25:01 -0500 Subject: [PATCH 052/670] Update for `bot_spells_entries` [ci skip] --- common/version.h | 2 +- utils/sql/git/bots/bots_db_update_manifest.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/common/version.h b/common/version.h index 4c86b26d7..ddff10b59 100644 --- a/common/version.h +++ b/common/version.h @@ -32,7 +32,7 @@ #define CURRENT_BINARY_DATABASE_VERSION 9117 #ifdef BOTS - #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9017 + #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9018 #else #define CURRENT_BINARY_BOTS_DATABASE_VERSION 0 // must be 0 #endif diff --git a/utils/sql/git/bots/bots_db_update_manifest.txt b/utils/sql/git/bots/bots_db_update_manifest.txt index 5806cfa3e..e072dcc4b 100644 --- a/utils/sql/git/bots/bots_db_update_manifest.txt +++ b/utils/sql/git/bots/bots_db_update_manifest.txt @@ -16,6 +16,7 @@ 9015|2017_02_26_bots_spell_casting_chances_update.sql|SHOW COLUMNS FROM `bot_spell_casting_chances` LIKE 'value'|not_empty| 9016|2017_02_26_bots_spell_casting_chances_update.sql|SHOW TABLES LIKE 'bot_spell_casting_chances'|empty| 9017|2017_03_26_bots_spells_id_fix_for_saved_shadowknight_bots.sql|SELECT * FROM `bot_data` WHERE `class` = '5' AND `spells_id` = '3004'|not_empty| +9018|2018_02_02_Bot_Spells_Min_Max_HP.sql|SHOW COLUMNS FROM `bot_spells_entries` LIKE 'min_hp'|empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not From 2ed185aa2c0651362df5ef3b809870bac950ccfb Mon Sep 17 00:00:00 2001 From: Uleat Date: Fri, 2 Feb 2018 18:26:01 -0500 Subject: [PATCH 053/670] Forgot unversioned script file... --- .../sql/git/bots/required/2018_02_02_Bot_Spells_Min_Max_HP.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 utils/sql/git/bots/required/2018_02_02_Bot_Spells_Min_Max_HP.sql diff --git a/utils/sql/git/bots/required/2018_02_02_Bot_Spells_Min_Max_HP.sql b/utils/sql/git/bots/required/2018_02_02_Bot_Spells_Min_Max_HP.sql new file mode 100644 index 000000000..95108afac --- /dev/null +++ b/utils/sql/git/bots/required/2018_02_02_Bot_Spells_Min_Max_HP.sql @@ -0,0 +1,2 @@ +ALTER TABLE `bot_spells_entries` ADD `min_hp` SMALLINT(5) DEFAULT '0'; +ALTER TABLE `bot_spells_entries` ADD `max_hp` SMALLINT(5) DEFAULT '0'; From 85bafecc93281c2f8d7faf790e4bb4cf3efd1818 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Fri, 2 Feb 2018 20:18:40 -0500 Subject: [PATCH 054/670] Command #repop will clear NPC spell cache now --- zone/zone.cpp | 3 +++ zone/zonedb.h | 1 + 2 files changed, 4 insertions(+) diff --git a/zone/zone.cpp b/zone/zone.cpp index 0e6a50092..8045e0fbf 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -1437,6 +1437,9 @@ bool Zone::Depop(bool StartSpawnTimer) { npctable.erase(itr); } + // clear spell cache + database.ClearNPCSpells(); + return true; } diff --git a/zone/zonedb.h b/zone/zonedb.h index 0a13c672e..ec1a1d663 100644 --- a/zone/zonedb.h +++ b/zone/zonedb.h @@ -427,6 +427,7 @@ public: DBnpcspells_Struct* GetNPCSpells(uint32 iDBSpellsID); DBnpcspellseffects_Struct* GetNPCSpellsEffects(uint32 iDBSpellsEffectsID); + void ClearNPCSpells() { npc_spells_cache.clear(); npc_spells_loadtried.clear(); } const NPCType* LoadNPCTypesData(uint32 id, bool bulk_load = false); /* Mercs */ From c5c93bb2e61030dafa9da19c5a1daefe0fe4391a Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 4 Feb 2018 13:23:47 -0500 Subject: [PATCH 055/670] Fix distance forget aggro drop not triggering events --- zone/mob_ai.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 384f09932..9db5b2577 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1042,8 +1042,15 @@ void Mob::AI_Process() { // NPCs will forget people after 10 mins of not interacting with them or out of range // both of these maybe zone specific, hardcoded for now - if (mHateListCleanup.Check()) + if (mHateListCleanup.Check()) { hate_list.RemoveStaleEntries(600000, 600.0f); + if (hate_list.IsHateListEmpty()) { + AI_Event_NoLongerEngaged(); + zone->DelAggroMob(); + if (IsNPC() && !RuleB(Aggro, AllowTickPulling)) + ResetAssistCap(); + } + } // we are prevented from getting here if we are blind and don't have a target in range // from above, so no extra blind checks needed if ((IsRooted() && !GetSpecialAbility(IGNORE_ROOT_AGGRO_RULES)) || IsBlind()) From f720e5158582857c998bb22e46f4ffe74b64ea20 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 4 Feb 2018 16:30:16 -0500 Subject: [PATCH 056/670] Implement NPC Charm Stats These combat stats an NPC will change to while charmed --- common/version.h | 2 +- utils/sql/db_update_manifest.txt | 1 + .../git/required/2018_02_04_Charm_Stats.sql | 7 +++ zone/npc.cpp | 57 +++++++++++++++++++ zone/npc.h | 21 +++++++ zone/spell_effects.cpp | 2 + zone/zonedb.cpp | 17 +++++- zone/zonedump.h | 7 +++ 8 files changed, 112 insertions(+), 2 deletions(-) create mode 100644 utils/sql/git/required/2018_02_04_Charm_Stats.sql diff --git a/common/version.h b/common/version.h index ddff10b59..a79766ec3 100644 --- a/common/version.h +++ b/common/version.h @@ -30,7 +30,7 @@ Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt */ -#define CURRENT_BINARY_DATABASE_VERSION 9117 +#define CURRENT_BINARY_DATABASE_VERSION 9118 #ifdef BOTS #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9018 #else diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index 1f95a513f..8463d979f 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -371,6 +371,7 @@ 9115|2017_10_28_traps.sql|SHOW COLUMNS FROM `traps` LIKE 'triggered_number'|empty| 9116|2017_12_16_GroundSpawn_Respawn_Timer.sql|SHOW COLUMNS FROM `ground_spawns` WHERE Field = 'respawn_timer' AND Type = 'int(11) unsigned'|empty| 9117|2018_02_01_NPC_Spells_Min_Max_HP.sql|SHOW COLUMNS FROM `npc_spells_entries` LIKE 'min_hp'|empty| +9118|2018_02_04_Charm_Stats.sql|SHOW COLUMNS FROM `npc_types` LIKE 'charm_ac'|empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/utils/sql/git/required/2018_02_04_Charm_Stats.sql b/utils/sql/git/required/2018_02_04_Charm_Stats.sql new file mode 100644 index 000000000..3a9164f40 --- /dev/null +++ b/utils/sql/git/required/2018_02_04_Charm_Stats.sql @@ -0,0 +1,7 @@ +ALTER TABLE `npc_types` ADD `charm_ac` SMALLINT(5) DEFAULT '0'; +ALTER TABLE `npc_types` ADD `charm_min_dmg` INT(10) DEFAULT '0'; +ALTER TABLE `npc_types` ADD `charm_max_dmg` INT(10) DEFAULT '0'; +ALTER TABLE `npc_types` ADD `charm_attack_delay` TINYINT(3) DEFAULT '0'; +ALTER TABLE `npc_types` ADD `charm_accuracy_rating` MEDIUMINT(9) DEFAULT '0'; +ALTER TABLE `npc_types` ADD `charm_avoidance_rating` MEDIUMINT(9) DEFAULT '0'; +ALTER TABLE `npc_types` ADD `charm_atk` MEDIUMINT(9) DEFAULT '0'; diff --git a/zone/npc.cpp b/zone/npc.cpp index c13841358..de494bb05 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -208,6 +208,24 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, const glm::vec4& position, int if avoidance_rating = d->avoidance_rating; ATK = d->ATK; + // used for when switch back to charm + default_ac = d->AC; + default_min_dmg = min_dmg; + default_max_dmg = max_dmg; + default_attack_delay = d->attack_delay; + default_accuracy_rating = d->accuracy_rating; + default_avoidance_rating = d->avoidance_rating; + default_atk = d->ATK; + + // used for when getting charmed, if 0, doesn't swap + charm_ac = d->charm_ac; + charm_min_dmg = d->charm_min_dmg; + charm_max_dmg = d->charm_max_dmg; + charm_attack_delay = d->charm_attack_delay; + charm_accuracy_rating = d->charm_accuracy_rating; + charm_avoidance_rating = d->charm_avoidance_rating; + charm_atk = d->charm_atk; + CalcMaxMana(); SetMana(GetMaxMana()); @@ -2636,3 +2654,42 @@ void NPC::DepopSwarmPets() } } } + +void NPC::ModifyStatsOnCharm(bool bRemoved) +{ + if (bRemoved) { + if (charm_ac) + AC = default_ac; + if (charm_attack_delay) + attack_delay = default_attack_delay; + if (charm_accuracy_rating) + accuracy_rating = default_accuracy_rating; + if (charm_avoidance_rating) + avoidance_rating = default_avoidance_rating; + if (charm_atk) + ATK = default_atk; + if (charm_min_dmg || charm_max_dmg) { + base_damage = round((default_max_dmg - default_min_dmg) / 1.9); + min_damage = default_min_dmg - round(base_damage / 10.0); + } + } else { + if (charm_ac) + AC = charm_ac; + if (charm_attack_delay) + attack_delay = charm_attack_delay; + if (charm_accuracy_rating) + accuracy_rating = charm_accuracy_rating; + if (charm_avoidance_rating) + avoidance_rating = charm_avoidance_rating; + if (charm_atk) + ATK = charm_atk; + if (charm_min_dmg || charm_max_dmg) { + base_damage = round((charm_max_dmg - charm_min_dmg) / 1.9); + min_damage = charm_min_dmg - round(base_damage / 10.0); + } + } + // the rest of the stats aren't cached, so lets just do these two instead of full CalcBonuses() + SetAttackTimer(); + CalcAC(); +} + diff --git a/zone/npc.h b/zone/npc.h index 8edff6245..0ff7f3b03 100644 --- a/zone/npc.h +++ b/zone/npc.h @@ -282,6 +282,8 @@ public: int32 GetNPCHPRegen() const { return hp_regen + itembonuses.HPRegen + spellbonuses.HPRegen; } inline const char* GetAmmoIDfile() const { return ammo_idfile; } + void ModifyStatsOnCharm(bool bRemoved); + //waypoint crap int GetMaxWp() const { return max_wp; } void DisplayWaypointInfo(Client *to); @@ -482,6 +484,25 @@ protected: int32 SpellFocusDMG; int32 SpellFocusHeal; + // stats to switch back to after charm wears off + // could probably pick a better name, but these probably aren't taken so ... + int default_ac; + int default_min_dmg; + int default_max_dmg; + int default_attack_delay; + int default_accuracy_rating; + int default_avoidance_rating; + int default_atk; + + // when charmed, switch to these + int charm_ac; + int charm_min_dmg; + int charm_max_dmg; + int charm_attack_delay; + int charm_accuracy_rating; + int charm_avoidance_rating; + int charm_atk; + //pet crap: uint16 pet_spell_id; bool taunting; diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 67104a234..5ebde5d05 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -790,6 +790,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove CastToClient()->AI_Start(); } else if(IsNPC()) { CastToNPC()->SetPetSpellID(0); //not a pet spell. + CastToNPC()->ModifyStatsOnCharm(false); } bool bBreak = false; @@ -3966,6 +3967,7 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses) if(IsNPC()) { CastToNPC()->RestoreGuardSpotCharm(); + CastToNPC()->ModifyStatsOnCharm(true); } SendAppearancePacket(AT_Pet, 0, true, true); diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index 1de044973..75ca99ac8 100644 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -1962,7 +1962,14 @@ const NPCType* ZoneDatabase::LoadNPCTypesData(uint32 npc_type_id, bool bulk_load "npc_types.feettexture, " "npc_types.ignore_despawn, " "npc_types.show_name, " - "npc_types.untargetable " + "npc_types.untargetable, " + "npc_types.charm_ac, " + "npc_types.charm_min_dmg, " + "npc_types.charm_max_dmg, " + "npc_types.charm_attack_delay, " + "npc_types.charm_accuracy_rating, " + "npc_types.charm_avoidance_rating, " + "npc_types.charm_atk " "FROM npc_types %s", where_condition.c_str() ); @@ -2141,6 +2148,14 @@ const NPCType* ZoneDatabase::LoadNPCTypesData(uint32 npc_type_id, bool bulk_load temp_npctype_data->show_name = atoi(row[98]) != 0 ? true : false; temp_npctype_data->untargetable = atoi(row[99]) != 0 ? true : false; + temp_npctype_data->charm_ac = atoi(row[100]); + temp_npctype_data->charm_min_dmg = atoi(row[101]); + temp_npctype_data->charm_max_dmg = atoi(row[102]); + temp_npctype_data->charm_attack_delay = atoi(row[103]) * 100; // TODO: fix DB + temp_npctype_data->charm_accuracy_rating = atoi(row[104]); + temp_npctype_data->charm_avoidance_rating = atoi(row[105]); + temp_npctype_data->charm_atk = atoi(row[106]); + // If NPC with duplicate NPC id already in table, // free item we attempted to add. if (zone->npctable.find(temp_npctype_data->npc_id) != zone->npctable.end()) { diff --git a/zone/zonedump.h b/zone/zonedump.h index d305e4105..636978475 100644 --- a/zone/zonedump.h +++ b/zone/zonedump.h @@ -89,6 +89,13 @@ struct NPCType EQEmu::TintProfile armor_tint; uint32 min_dmg; uint32 max_dmg; + uint32 charm_ac; + uint32 charm_min_dmg; + uint32 charm_max_dmg; + int charm_attack_delay; + int charm_accuracy_rating; + int charm_avoidance_rating; + int charm_atk; int16 attack_count; char special_abilities[512]; uint16 d_melee_texture1; From 4096ee1f1e4476ef29abae592ccec0a9371496ee Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Mon, 5 Feb 2018 13:38:03 -0500 Subject: [PATCH 057/670] Should dismount if mounted and casting and FD spell --- zone/spell_effects.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 5ebde5d05..5f0305f3a 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -1625,13 +1625,14 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove break; if(IsClient()) { + CastToClient()->SetHorseId(0); // dismount if have horse if (zone->random.Int(0, 99) > spells[spell_id].base[i]) { CastToClient()->SetFeigned(false); entity_list.MessageClose_StringID(this, false, 200, 10, STRING_FEIGNFAILED, GetName()); - } - else + } else { CastToClient()->SetFeigned(true); + } } break; } From cdd0b2de0099c1a48a6389913570ae58ed0a9d9a Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Tue, 6 Feb 2018 13:13:13 -0500 Subject: [PATCH 058/670] Bug fix for longer reuses --- zone/mob_ai.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 9db5b2577..ed55d1146 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1880,7 +1880,7 @@ void NPC::AI_Event_SpellCastFinished(bool iCastSucceeded, uint16 slot) { recovery_time += spells[AIspells[casting_spell_AIindex].spellid].recovery_time; if (AIspells[casting_spell_AIindex].recast_delay >= 0) { - if (AIspells[casting_spell_AIindex].recast_delay < 1000) + if (AIspells[casting_spell_AIindex].recast_delay < 10000) AIspells[casting_spell_AIindex].time_cancast = Timer::GetCurrentTime() + (AIspells[casting_spell_AIindex].recast_delay*1000); } else From 24b396e516410f107bea2dc3309d3f86ab8a4da2 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Tue, 6 Feb 2018 21:50:59 -0500 Subject: [PATCH 059/670] Fix /pet leader --- zone/client_packet.cpp | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 53fa8a27d..42a78cdaa 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -9960,22 +9960,18 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app) Mob* mypet = this->GetPet(); Mob *target = entity_list.GetMob(pet->target); - if (!mypet || pet->command == PET_LEADER) - { - if (pet->command == PET_LEADER) - { - if (mypet && (!GetTarget() || GetTarget() == mypet)) - { + if (!mypet || pet->command == PET_LEADER) { + if (pet->command == PET_LEADER) { + // we either send the ID of an NPC we're interested in or no ID for our own pet + if (target) { + auto owner = target->GetOwner(); + if (owner) + target->Say_StringID(PET_LEADERIS, owner->GetCleanName()); + else + target->Say_StringID(I_FOLLOW_NOONE); + } else if (mypet) { mypet->Say_StringID(PET_LEADERIS, GetName()); } - else if ((mypet = GetTarget())) - { - Mob *Owner = mypet->GetOwner(); - if (Owner) - mypet->Say_StringID(PET_LEADERIS, Owner->GetCleanName()); - else if (mypet->IsNPC()) - mypet->Say_StringID(I_FOLLOW_NOONE); - } } return; From 05a3c4b2b851d8cd0c8a582ec3c3f44b4a3e81c7 Mon Sep 17 00:00:00 2001 From: Uleat Date: Wed, 7 Feb 2018 18:47:42 -0500 Subject: [PATCH 060/670] Implemented pass-thru for Mob::CalculateNewPosition2(...) arguments 'fixZ' and 'calcHeading' --- zone/mob.h | 6 +++--- zone/waypoints.cpp | 14 ++++++++------ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/zone/mob.h b/zone/mob.h index 6266aa029..f973dd022 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -969,8 +969,8 @@ public: inline bool CheckAggro(Mob* other) {return hate_list.IsEntOnHateList(other);} float CalculateHeadingToTarget(float in_x, float in_y); - bool CalculateNewPosition(float x, float y, float z, int speed, bool checkZ = false, bool calcheading = true); - virtual bool CalculateNewPosition2(float x, float y, float z, int speed, bool checkZ = true, bool calcheading = true); + bool CalculateNewPosition(float x, float y, float z, int speed, bool checkZ = false, bool calcHeading = true); + virtual bool CalculateNewPosition2(float x, float y, float z, int speed, bool checkZ = true, bool calcHeading = true); float CalculateDistance(float x, float y, float z); float GetGroundZ(float new_x, float new_y, float z_offset=0.0); void SendTo(float new_x, float new_y, float new_z); @@ -1152,7 +1152,7 @@ protected: int _GetWalkSpeed() const; int _GetRunSpeed() const; int _GetFearSpeed() const; - virtual bool MakeNewPositionAndSendUpdate(float x, float y, float z, int speed); + virtual bool MakeNewPositionAndSendUpdate(float x, float y, float z, int speed, bool checkZ = true, bool calcHeading = true); virtual bool AI_EngagedCastCheck() { return(false); } virtual bool AI_PursueCastCheck() { return(false); } diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index 9231ccae2..8f9c902bb 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -456,7 +456,7 @@ float Mob::CalculateHeadingToTarget(float in_x, float in_y) { return (256 * (360 - angle) / 360.0f); } -bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, int speed) { +bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, int speed, bool checkZ, bool calcHeading) { if (GetID() == 0) return true; @@ -500,7 +500,7 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, int speed) { m_Position.y = new_y; m_Position.z = new_z; - if(fix_z_timer.Check() && + if(checkZ && fix_z_timer.Check() && (!this->IsEngaged() || flee_mode || currently_fleeing)) this->FixZ(); @@ -567,7 +567,8 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, int speed) { m_Position.x = new_x; m_Position.y = new_y; m_Position.z = new_z; - m_Position.w = CalculateHeadingToTarget(x, y); + if (calcHeading) + m_Position.w = CalculateHeadingToTarget(x, y); tar_ndx = 20 - numsteps; } else @@ -605,10 +606,11 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, int speed) { m_Position.x = new_x; m_Position.y = new_y; m_Position.z = new_z; - m_Position.w = CalculateHeadingToTarget(x, y); + if (calcHeading) + m_Position.w = CalculateHeadingToTarget(x, y); } - if (fix_z_timer.Check() && !this->IsEngaged()) + if (checkZ && fix_z_timer.Check() && !this->IsEngaged()) this->FixZ(); SetMoving(true); @@ -632,7 +634,7 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, int speed) { } bool Mob::CalculateNewPosition2(float x, float y, float z, int speed, bool checkZ, bool calcHeading) { - return MakeNewPositionAndSendUpdate(x, y, z, speed); + return MakeNewPositionAndSendUpdate(x, y, z, speed, checkZ, calcHeading); } bool Mob::CalculateNewPosition(float x, float y, float z, int speed, bool checkZ, bool calcHeading) { From e9437719458c12feb039d9e4622a65008eb6c53f Mon Sep 17 00:00:00 2001 From: Uleat Date: Wed, 7 Feb 2018 22:40:45 -0500 Subject: [PATCH 061/670] More tweaks to bot jitter code --- zone/bot.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/zone/bot.cpp b/zone/bot.cpp index 9afdd733f..05fdf184e 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -2431,8 +2431,8 @@ void Bot::AI_Process() { if (AI_movement_timer->Check() && (!spellend_timer.Enabled() || GetClass() == BARD)) { if (!IsRooted()) { if (HasTargetReflection()) { - if (GetClass() == ROGUE) { - if (!tar->IsFeared() && !tar->IsStunned()) { + if (!tar->IsFeared() && !tar->IsStunned()) { + if (GetClass() == ROGUE) { if (evade_timer.Check(false)) { // Attempt to evade int timer_duration = (HideReuseTime - GetSkillReuseTime(EQEmu::skills::SkillHide)) * 1000; if (timer_duration < 0) @@ -2444,10 +2444,13 @@ void Bot::AI_Process() { return; } - else if (tar->IsRooted()) { // Move rogue back from rooted mob - out of combat range, if necessary + } + + if (tar->IsRooted()) { // Move caster/rogue back from rooted mob - out of combat range, if necessary + if (GetArchetype() == ARCHETYPE_CASTER || GetClass() == ROGUE) { if (tar_distance <= melee_distance_max) { if (PlotPositionAroundTarget(this, Goal.x, Goal.y, Goal.z)) { - CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetBotWalkspeed()); + CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetBotWalkspeed(), true, false); return; } } @@ -2456,34 +2459,26 @@ void Bot::AI_Process() { } } else { - if (caster_distance_min && tar_distance < caster_distance_min) { // Caster back-off adjustment + if (caster_distance_min && tar_distance < caster_distance_min && !tar->IsFeared()) { // Caster back-off adjustment if (PlotPositionAroundTarget(this, Goal.x, Goal.y, Goal.z)) { if (DistanceSquared(Goal, tar->GetPosition()) <= caster_distance_max) { - CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetBotWalkspeed()); + CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetBotWalkspeed(), true, false); return; } } - else if (!IsFacingMob(tar)) { - FaceTarget(tar); - return; - } } else if (tar_distance < melee_distance_min) { // Melee back-off adjustment if (PlotPositionAroundTarget(this, Goal.x, Goal.y, Goal.z)) { if (DistanceSquared(Goal, tar->GetPosition()) <= melee_distance_max) { - CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetBotWalkspeed()); + CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetBotWalkspeed(), true, false); return; } } - else if (!IsFacingMob(tar)) { - FaceTarget(tar); - return; - } } else if (backstab_weapon && !behind_mob) { // Move the rogue to behind the mob if (PlotPositionAroundTarget(tar, Goal.x, Goal.y, Goal.z)) { if (DistanceSquared(Goal, tar->GetPosition()) <= melee_distance_max) { - CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetBotRunspeed()); // rogues are agile enough to run in melee range + CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetBotRunspeed(), true, false); // rogues are agile enough to run in melee range return; } } @@ -2494,11 +2489,16 @@ void Bot::AI_Process() { PlotPositionAroundTarget(tar, Goal.x, Goal.y, Goal.z)) // If we're behind the mob, we can attack when it's enraged { if (DistanceSquared(Goal, tar->GetPosition()) <= melee_distance_max) { - CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetBotWalkspeed()); + CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetBotWalkspeed(), true, false); return; } } } + + if (!IsFacingMob(tar)) { + FaceTarget(tar); + return; + } } } else { From fb8873e77b67a8229105e91eae70083be96b4141 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 8 Feb 2018 15:54:17 -0500 Subject: [PATCH 062/670] Fix for glm with GCC 7.3 Something similar will be in the next release of glm --- common/glm/glm/simd/platform.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/glm/glm/simd/platform.h b/common/glm/glm/simd/platform.h index f77939088..19bce7d02 100644 --- a/common/glm/glm/simd/platform.h +++ b/common/glm/glm/simd/platform.h @@ -111,7 +111,8 @@ #define GLM_COMPILER_GCC70 0x02000A00 #define GLM_COMPILER_GCC71 0x02000B00 #define GLM_COMPILER_GCC72 0x02000C00 -#define GLM_COMPILER_GCC80 0x02000D00 +#define GLM_COMPILER_GCC73 0x02000D00 +#define GLM_COMPILER_GCC80 0x02000E00 // CUDA #define GLM_COMPILER_CUDA 0x10000000 @@ -283,6 +284,8 @@ # define GLM_COMPILER (GLM_COMPILER_GCC71) # elif (__GNUC__ == 7) && (__GNUC_MINOR__ == 2) # define GLM_COMPILER (GLM_COMPILER_GCC72) +# elif (__GNUC__ == 7) && (__GNUC_MINOR__ == 3) +# define GLM_COMPILER (GLM_COMPILER_GCC73) # elif (__GNUC__ >= 8) # define GLM_COMPILER (GLM_COMPILER_GCC80) # else From 0b97db9fd2ed7f6d0b4ead2266db2eed41fd4366 Mon Sep 17 00:00:00 2001 From: Uleat Date: Thu, 8 Feb 2018 16:46:43 -0500 Subject: [PATCH 063/670] Added some basic functionality to 'bot guard' --- zone/bot.cpp | 54 +++++++++++++++++++++++++++++++++++++++++--- zone/bot.h | 2 ++ zone/bot_command.cpp | 8 +------ 3 files changed, 54 insertions(+), 10 deletions(-) diff --git a/zone/bot.cpp b/zone/bot.cpp index 05fdf184e..b0435dbe4 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -2041,6 +2041,20 @@ void Bot::SetTarget(Mob* mob) { } } +void Bot::SetGuardMode() { + WipeHateList(); + SetTarget(nullptr); + SetFollowID(GetID()); + StopMoving(); + m_GuardPoint = GetPosition(); + + if (HasPet()) { + GetPet()->WipeHateList(); + GetPet()->SetTarget(nullptr); + GetPet()->StopMoving(); + } +} + // AI Processing for the Bot object void Bot::AI_Process() { @@ -2091,6 +2105,8 @@ void Bot::AI_Process() { return; } + bool guard_mode = (follow_mob == this); + auto fm_dist = DistanceSquared(m_Position, follow_mob->GetPosition()); auto lo_distance = DistanceSquared(m_Position, leash_owner->GetPosition()); @@ -2113,6 +2129,17 @@ void Bot::AI_Process() { return; if (fm_dist > GetFollowDistance()) // Cancel out-of-combat casting if movement is required InterruptSpell(); + if (guard_mode) { + auto& my_pos = GetPosition(); + auto& my_guard = GetGuardPoint(); + + if (my_pos.x != my_guard.x || + my_pos.y != my_guard.y || + my_pos.z != my_guard.z) + { + InterruptSpell(); + } + } return; } @@ -2147,7 +2174,7 @@ void Bot::AI_Process() { } // Empty hate list - let's find a target - if (!IsEngaged()) { + if (!guard_mode && !IsEngaged()) { Mob* lo_target = leash_owner->GetTarget(); if (lo_target && lo_target->IsNPC() && @@ -2234,7 +2261,8 @@ void Bot::AI_Process() { // Let's check if we have a los with our target. // If we don't, our hate_list is wiped. // Else, it was causing the bot to aggro behind wall etc... causing massive trains. - if (!tar->IsNPC() || + if (guard_mode || + !tar->IsNPC() || tar->IsMezzed() || (!tar->GetHateAmount(this) && !tar->GetHateAmount(leash_owner) && !leash_owner->AutoAttackEnabled()) || lo_distance > BOT_LEASH_DISTANCE || @@ -2698,8 +2726,28 @@ void Bot::AI_Process() { if (m_PlayerState & static_cast(PlayerState::Aggressive)) SendRemovePlayerState(PlayerState::Aggressive); + // Check guard point + if (guard_mode) { + auto& my_pos = GetPosition(); + auto& my_guard = GetGuardPoint(); + + if (my_pos.x != my_guard.x || + my_pos.y != my_guard.y || + my_pos.z != my_guard.z) + { + if (IsMoving()) + StopMoving(); + + Warp(glm::vec3(my_guard)); + + if (HasPet()) + GetPet()->Warp(glm::vec3(my_guard)); + + return; + } + } // Leash the bot - if (lo_distance > BOT_LEASH_DISTANCE) { + else if (lo_distance > BOT_LEASH_DISTANCE) { if (IsMoving()) StopMoving(); diff --git a/zone/bot.h b/zone/bot.h index d945c13be..c69405011 100644 --- a/zone/bot.h +++ b/zone/bot.h @@ -339,6 +339,7 @@ public: bool IsStanding(); int GetBotWalkspeed() const { return (int)((float)_GetWalkSpeed() * 1.786f); } // 1.25 / 0.7 = 1.7857142857142857142857142857143 int GetBotRunspeed() const { return (int)((float)_GetRunSpeed() * 1.786f); } + int GetBotFearSpeed() const { return (int)((float)_GetFearSpeed() * 1.786f); } bool UseDiscipline(uint32 spell_id, uint32 target); uint8 GetNumberNeedingHealedInGroup(uint8 hpr, bool includePets); bool GetNeedsCured(Mob *tar); @@ -405,6 +406,7 @@ public: bool AIHealRotation(Mob* tar, bool useFastHeals); bool GetPauseAI() { return _pauseAI; } void SetPauseAI(bool pause_flag) { _pauseAI = pause_flag; } + void SetGuardMode(); // Mob AI Virtual Override Methods virtual void AI_Process(); diff --git a/zone/bot_command.cpp b/zone/bot_command.cpp index b45c2b26a..e94825929 100644 --- a/zone/bot_command.cpp +++ b/zone/bot_command.cpp @@ -3047,13 +3047,7 @@ void bot_command_guard(Client *c, const Seperator *sep) sbl.remove(nullptr); for (auto bot_iter : sbl) { - bot_iter->WipeHateList(); - bot_iter->SetFollowID(0); - if (!bot_iter->GetPet()) - continue; - - bot_iter->GetPet()->WipeHateList(); - bot_iter->GetPet()->SetFollowID(0); + bot_iter->SetGuardMode(); } if (sbl.size() == 1) Bot::BotGroupSay(sbl.front(), "Guarding this position"); From c5e4bb08f4e1a4b740af20c0a7aa36e655b38058 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 10 Feb 2018 22:15:21 -0500 Subject: [PATCH 064/670] Implement global loot system Fixes #619 This should allow us to emulate lives global tables The options available to filter tables are min_level, max_level, race, rare, raid, race, class, bodytype, and zone. race, class, bodytype, and zone are a pipe | separated list of IDs --- changelog.txt | 10 ++ common/version.h | 2 +- utils/sql/db_update_manifest.txt | 1 + .../git/required/2018_02_10_GlobalLoot.sql | 19 ++++ zone/CMakeLists.txt | 2 + zone/command.cpp | 26 ++++- zone/command.h | 2 + zone/forage.cpp | 25 +++-- zone/global_loot_manager.cpp | 98 ++++++++++++++++ zone/global_loot_manager.h | 61 ++++++++++ zone/loottables.cpp | 105 ++++++++++++++++-- zone/mob.cpp | 1 + zone/mob.h | 3 + zone/npc.cpp | 3 + zone/npc.h | 3 + zone/questmgr.cpp | 8 ++ zone/spawn2.cpp | 2 + zone/trap.cpp | 6 +- zone/zone.cpp | 4 + zone/zone.h | 8 ++ zone/zonedb.cpp | 7 +- zone/zonedb.h | 1 + zone/zonedump.h | 2 + 23 files changed, 372 insertions(+), 27 deletions(-) create mode 100644 utils/sql/git/required/2018_02_10_GlobalLoot.sql create mode 100644 zone/global_loot_manager.cpp create mode 100644 zone/global_loot_manager.h diff --git a/changelog.txt b/changelog.txt index a7e75de62..a700ded31 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,15 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 02/10/2018 == +mackal: Add Global Loot system + +This will allow us to implement global loot similarly to how it works on live +This system reuses our current loottable tables which the global_loot table references. +The limits for the rules to govern if a table should be rolled are min level, max level, rare, +raid, race, class, bodytype, and zone + +race, class, bodytype, and zone are a pipe | separated list of IDs. + == 01/31/2018 == Uleat: Re-work of Bot::AI_Process(). Overall behavior is much improved. - Removed a 'ton' of unneeded packet updates diff --git a/common/version.h b/common/version.h index a79766ec3..928592a4a 100644 --- a/common/version.h +++ b/common/version.h @@ -30,7 +30,7 @@ Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt */ -#define CURRENT_BINARY_DATABASE_VERSION 9118 +#define CURRENT_BINARY_DATABASE_VERSION 9119 #ifdef BOTS #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9018 #else diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index 8463d979f..188db2162 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -372,6 +372,7 @@ 9116|2017_12_16_GroundSpawn_Respawn_Timer.sql|SHOW COLUMNS FROM `ground_spawns` WHERE Field = 'respawn_timer' AND Type = 'int(11) unsigned'|empty| 9117|2018_02_01_NPC_Spells_Min_Max_HP.sql|SHOW COLUMNS FROM `npc_spells_entries` LIKE 'min_hp'|empty| 9118|2018_02_04_Charm_Stats.sql|SHOW COLUMNS FROM `npc_types` LIKE 'charm_ac'|empty| +9119|2018_02_10_GlobalLoot.sql|SHOW TABLES LIKE 'global_loot'|empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/utils/sql/git/required/2018_02_10_GlobalLoot.sql b/utils/sql/git/required/2018_02_10_GlobalLoot.sql new file mode 100644 index 000000000..573ab8f71 --- /dev/null +++ b/utils/sql/git/required/2018_02_10_GlobalLoot.sql @@ -0,0 +1,19 @@ +ALTER TABLE `npc_types` ADD `skip_global_loot` TINYINT DEFAULT '0'; +ALTER TABLE `npc_types` ADD `rare_spawn` TINYINT DEFAULT '0'; + +CREATE TABLE global_loot ( + id INT NOT NULL AUTO_INCREMENT, + description varchar(255), + loottable_id INT NOT NULL, + enabled TINYINT NOT NULL DEFAULT 1, + min_level INT NOT NULL DEFAULT 0, + max_level INT NOT NULL DEFAULT 0, + rare TINYINT NULL, + raid TINYINT NULL, + race MEDIUMTEXT NULL, + class MEDIUMTEXT NULL, + bodytype MEDIUMTEXT NULL, + zone MEDIUMTEXT NULL, + PRIMARY KEY (id) +); + diff --git a/zone/CMakeLists.txt b/zone/CMakeLists.txt index 0171c8eb9..49644cfcf 100644 --- a/zone/CMakeLists.txt +++ b/zone/CMakeLists.txt @@ -68,6 +68,7 @@ SET(zone_sources exp.cpp fearpath.cpp forage.cpp + global_loot_manager.cpp groups.cpp guild.cpp guild_mgr.cpp @@ -158,6 +159,7 @@ SET(zone_headers errmsg.h event_codes.h forage.h + global_loot_manager.h groups.h guild_mgr.h hate_list.h diff --git a/zone/command.cpp b/zone/command.cpp index 5b45f3a69..7a4366a4f 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -358,9 +358,11 @@ int command_init(void) command_add("showbonusstats", "[item|spell|all] Shows bonus stats for target from items or spells. Shows both by default.", 50, command_showbonusstats) || command_add("showbuffs", "- List buffs active on your target or you if no target", 50, command_showbuffs) || command_add("shownumhits", "Shows buffs numhits for yourself.", 0, command_shownumhits) || + command_add("shownpcgloballoot", "Show GlobalLoot entires on this npc", 50, command_shownpcgloballoot) || command_add("showskills", "- Show the values of your or your player target's skills", 50, command_showskills) || command_add("showspellslist", "Shows spell list of targeted NPC", 100, command_showspellslist) || command_add("showstats", "- Show details about you or your target", 50, command_showstats) || + command_add("showzonegloballoot", "Show GlobalLoot entires on this zone", 50, command_showzonegloballoot) || command_add("shutdown", "- Shut this zone process down", 150, command_shutdown) || command_add("size", "[size] - Change size of you or your target", 50, command_size) || command_add("spawn", "[name] [race] [level] [material] [hp] [gender] [class] [priweapon] [secweapon] [merchantid] - Spawn an NPC", 10, command_spawn) || @@ -2458,7 +2460,9 @@ void command_npctypespawn(Client *c, const Seperator *sep) if (npc && sep->IsNumber(2)) npc->SetNPCFactionID(atoi(sep->arg[2])); - npc->AddLootTable(); + npc->AddLootTable(); + if (npc->DropsGlobalLoot()) + npc->CheckGlobalLootTables(); entity_list.AddNPC(npc); } else @@ -3857,6 +3861,12 @@ void command_showstats(Client *c, const Seperator *sep) c->ShowStats(c); } +void command_showzonegloballoot(Client *c, const Seperator *sep) +{ + c->Message(0, "GlobalLoot for %s (%d:%d)", zone->GetShortName(), zone->GetZoneID(), zone->GetInstanceVersion()); + zone->ShowZoneGlobalLoot(c); +} + void command_mystats(Client *c, const Seperator *sep) { if (c->GetTarget() && c->GetPet()) { @@ -10441,6 +10451,20 @@ void command_shownumhits(Client *c, const Seperator *sep) return; } +void command_shownpcgloballoot(Client *c, const Seperator *sep) +{ + auto tar = c->GetTarget(); + + if (!tar || !tar->IsNPC()) { + c->Message(0, "You must target an NPC to use this command."); + return; + } + + auto npc = tar->CastToNPC(); + c->Message(0, "GlobalLoot for %s (%d)", npc->GetName(), npc->GetNPCTypeID()); + zone->ShowNPCGlobalLoot(c, npc); +} + void command_tune(Client *c, const Seperator *sep) { //Work in progress - Kayen diff --git a/zone/command.h b/zone/command.h index 8f6257949..b8d688a54 100644 --- a/zone/command.h +++ b/zone/command.h @@ -267,10 +267,12 @@ void command_setxp(Client *c, const Seperator *sep); void command_showbonusstats(Client *c, const Seperator *sep); void command_showbuffs(Client *c, const Seperator *sep); void command_shownumhits(Client *c, const Seperator *sep); +void command_shownpcgloballoot(Client *c, const Seperator *sep); void command_showpetspell(Client *c, const Seperator *sep); void command_showskills(Client *c, const Seperator *sep); void command_showspellslist(Client *c, const Seperator *sep); void command_showstats(Client *c, const Seperator *sep); +void command_showzonegloballoot(Client *c, const Seperator *sep); void command_shutdown(Client *c, const Seperator *sep); void command_size(Client *c, const Seperator *sep); void command_spawn(Client *c, const Seperator *sep); diff --git a/zone/forage.cpp b/zone/forage.cpp index be93d39ae..4dc3bc04f 100644 --- a/zone/forage.cpp +++ b/zone/forage.cpp @@ -277,20 +277,23 @@ void Client::GoFish() food_id = database.GetZoneFishing(m_pp.zone_id, fishing_skill, npc_id, npc_chance); //check for add NPC - if(npc_chance > 0 && npc_id) { - if(npc_chance < zone->random.Int(0, 99)) { - const NPCType* tmp = database.LoadNPCTypesData(npc_id); - if(tmp != nullptr) { - auto positionNPC = GetPosition(); - positionNPC.x = positionNPC.x + 3; - auto npc = new NPC(tmp, nullptr, positionNPC, FlyMode3); - npc->AddLootTable(); + if (npc_chance > 0 && npc_id) { + if (npc_chance < zone->random.Int(0, 99)) { + const NPCType *tmp = database.LoadNPCTypesData(npc_id); + if (tmp != nullptr) { + auto positionNPC = GetPosition(); + positionNPC.x = positionNPC.x + 3; + auto npc = new NPC(tmp, nullptr, positionNPC, FlyMode3); + npc->AddLootTable(); + if (npc->DropsGlobalLoot()) + npc->CheckGlobalLootTables(); - npc->AddToHateList(this, 1, 0, false); // no help yelling + npc->AddToHateList(this, 1, 0, false); // no help yelling - entity_list.AddNPC(npc); + entity_list.AddNPC(npc); - Message(MT_Emote, "You fish up a little more than you bargained for..."); + Message(MT_Emote, + "You fish up a little more than you bargained for..."); } } } diff --git a/zone/global_loot_manager.cpp b/zone/global_loot_manager.cpp new file mode 100644 index 000000000..8e990c0ac --- /dev/null +++ b/zone/global_loot_manager.cpp @@ -0,0 +1,98 @@ +#include "global_loot_manager.h" +#include "npc.h" +#include "client.h" + +std::vector GlobalLootManager::GetGlobalLootTables(NPC *mob) const +{ + // we may be able to add a cache here if performance is an issue, but for now + // just return NRVO'd vector + // The cache would have to be keyed by NPCType and level (for NPCs with Max Level set) + std::vector tables; + + for (auto &e : m_entries) { + if (e.PassesRules(mob)) { + tables.push_back(e.GetLootTableID()); + } + } + + return tables; +} + +void GlobalLootManager::ShowZoneGlobalLoot(Client *to) const +{ + for (auto &e : m_entries) + to->Message(0, " %s : %d table %d", e.GetDescription().c_str(), e.GetID(), e.GetLootTableID()); +} + +void GlobalLootManager::ShowNPCGlobalLoot(Client *to, NPC *who) const +{ + for (auto &e : m_entries) { + if (e.PassesRules(who)) + to->Message(0, " %s : %d table %d", e.GetDescription().c_str(), e.GetID(), e.GetLootTableID()); + } +} + +bool GlobalLootEntry::PassesRules(NPC *mob) const +{ + bool bRace = false; + bool bPassesRace = false; + bool bBodyType = false; + bool bPassesBodyType = false; + bool bClass = false; + bool bPassesClass = false; + + for (auto &r : m_rules) { + switch (r.type) { + case GlobalLoot::RuleTypes::LevelMin: + if (mob->GetLevel() < r.value) + return false; + break; + case GlobalLoot::RuleTypes::LevelMax: + if (mob->GetLevel() > r.value) + return false; + break; + case GlobalLoot::RuleTypes::Raid: // value == 0 must not be raid, value != 0 must be raid + if (mob->IsRaidTarget() && !r.value) + return false; + if (!mob->IsRaidTarget() && r.value) + return false; + break; + case GlobalLoot::RuleTypes::Rare: + if (mob->IsRareSpawn() && !r.value) + return false; + if (!mob->IsRareSpawn() && r.value) + return false; + break; + case GlobalLoot::RuleTypes::Race: // can have multiple races per rule set + bRace = true; // we must pass race + if (mob->GetRace() == r.value) + bPassesRace = true; + break; + case GlobalLoot::RuleTypes::Class: // can have multiple classes per rule set + bClass = true; // we must pass class + if (mob->GetClass() == r.value) + bPassesClass = true; + break; + case GlobalLoot::RuleTypes::BodyType: // can have multiple bodytypes per rule set + bBodyType = true; // we must pass BodyType + if (mob->GetBodyType() == r.value) + bPassesBodyType = true; + break; + default: + break; + } + } + + if (bRace && !bPassesRace) + return false; + + if (bClass && !bPassesClass) + return false; + + if (bBodyType && !bPassesBodyType) + return false; + + // we abort as early as possible if we fail a rule, so if we get here, we passed + return true; +} + diff --git a/zone/global_loot_manager.h b/zone/global_loot_manager.h new file mode 100644 index 000000000..fec5a7215 --- /dev/null +++ b/zone/global_loot_manager.h @@ -0,0 +1,61 @@ +#ifndef GLOBAL_LOOT_MANAGER_H +#define GLOBAL_LOOT_MANAGER_H + +#include +#include + +class NPC; +class Client; + +namespace GlobalLoot { + +enum class RuleTypes { + LevelMin = 0, + LevelMax = 1, + Race = 2, + Class = 3, + BodyType = 4, + Rare = 5, + Raid = 6, + Max +}; + +struct Rule { + RuleTypes type; + int value; + Rule(RuleTypes t, int v) : type(t), value(v) { } +}; + +}; + +class GlobalLootEntry { + int m_id; + int m_loottable_id; + std::string m_description; + std::vector m_rules; +public: + GlobalLootEntry(int id, int loottable, std::string des) + : m_id(id), m_loottable_id(loottable), m_description(std::move(des)) + { } + bool PassesRules(NPC *mob) const; + inline int GetLootTableID() const { return m_loottable_id; } + inline int GetID() const { return m_id; } + inline const std::string &GetDescription() const { return m_description; } + inline void SetLootTableID(int in) { m_loottable_id = in; } + inline void SetID(int in) { m_id = in; } + inline void SetDescription(const std::string &in) { m_description = in; } + inline void AddRule(GlobalLoot::RuleTypes rule, int value) { m_rules.emplace_back(rule, value); } +}; + +class GlobalLootManager { + std::vector m_entries; + +public: + std::vector GetGlobalLootTables(NPC *mob) const; + inline void Clear() { m_entries.clear(); } + inline void AddEntry(GlobalLootEntry &in) { m_entries.push_back(in); } + void ShowZoneGlobalLoot(Client *to) const; + void ShowNPCGlobalLoot(Client *to, NPC *who) const; +}; + +#endif /* !GLOBAL_LOOT_MANAGER_H */ diff --git a/zone/loottables.cpp b/zone/loottables.cpp index d9fa86257..961d66781 100644 --- a/zone/loottables.cpp +++ b/zone/loottables.cpp @@ -26,6 +26,7 @@ #include "mob.h" #include "npc.h" #include "zonedb.h" +#include "global_loot_manager.h" #include #include @@ -37,10 +38,14 @@ // Queries the loottable: adds item & coin to the npc void ZoneDatabase::AddLootTableToNPC(NPC* npc,uint32 loottable_id, ItemList* itemlist, uint32* copper, uint32* silver, uint32* gold, uint32* plat) { const LootTable_Struct* lts = nullptr; - *copper = 0; - *silver = 0; - *gold = 0; - *plat = 0; + // global loot passes nullptr for these + bool bGlobal = copper == nullptr && silver == nullptr && gold == nullptr && plat == nullptr; + if (!bGlobal) { + *copper = 0; + *silver = 0; + *gold = 0; + *plat = 0; + } lts = database.GetLootTable(loottable_id); if (!lts) @@ -55,17 +60,19 @@ void ZoneDatabase::AddLootTableToNPC(NPC* npc,uint32 loottable_id, ItemList* ite } uint32 cash = 0; - if(max_cash > 0 && lts->avgcoin > 0 && EQEmu::ValueWithin(lts->avgcoin, min_cash, max_cash)) { - float upper_chance = (float)(lts->avgcoin - min_cash) / (float)(max_cash - min_cash); - float avg_cash_roll = (float)zone->random.Real(0.0, 1.0); + if (!bGlobal) { + if(max_cash > 0 && lts->avgcoin > 0 && EQEmu::ValueWithin(lts->avgcoin, min_cash, max_cash)) { + float upper_chance = (float)(lts->avgcoin - min_cash) / (float)(max_cash - min_cash); + float avg_cash_roll = (float)zone->random.Real(0.0, 1.0); - if(avg_cash_roll < upper_chance) { - cash = zone->random.Int(lts->avgcoin, max_cash); + if(avg_cash_roll < upper_chance) { + cash = zone->random.Int(lts->avgcoin, max_cash); + } else { + cash = zone->random.Int(min_cash, lts->avgcoin); + } } else { - cash = zone->random.Int(min_cash, lts->avgcoin); + cash = zone->random.Int(min_cash, max_cash); } - } else { - cash = zone->random.Int(min_cash, max_cash); } if(cash != 0) { @@ -80,6 +87,7 @@ void ZoneDatabase::AddLootTableToNPC(NPC* npc,uint32 loottable_id, ItemList* ite *copper = cash; } + uint32 global_loot_multiplier = RuleI(Zone, GlobalLootMultiplier); // Do items @@ -444,3 +452,76 @@ void NPC::AddLootTable(uint32 ldid) { database.AddLootTableToNPC(this,ldid, &itemlist, &copper, &silver, &gold, &platinum); } } + +void NPC::CheckGlobalLootTables() +{ + auto tables = zone->GetGlobalLootTables(this); + + for (auto &id : tables) + database.AddLootTableToNPC(this, id, &itemlist, nullptr, nullptr, nullptr, nullptr); +} + +void ZoneDatabase::LoadGlobalLoot() +{ + auto query = StringFormat("SELECT id, loottable_id, description, min_level, max_level, rare, raid, race, " + "class, bodytype, zone FROM global_loot WHERE enabled = 1"); + + auto results = QueryDatabase(query); + if (!results.Success() || results.RowCount() == 0) + return; + + // we might need this, lets not keep doing it in a loop + auto zoneid = std::to_string(zone->GetZoneID()); + for (auto row = results.begin(); row != results.end(); ++row) { + // checking zone limits + if (row[10]) { + auto zones = SplitString(row[10], '|'); + + auto it = std::find(zones.begin(), zones.end(), zoneid); + if (it == zones.end()) // not in here, skip + continue; + } + + GlobalLootEntry e(atoi(row[0]), atoi(row[1]), row[2] ? row[2] : ""); + + auto min_level = atoi(row[3]); + if (min_level) + e.AddRule(GlobalLoot::RuleTypes::LevelMin, min_level); + + auto max_level = atoi(row[4]); + if (max_level) + e.AddRule(GlobalLoot::RuleTypes::LevelMax, max_level); + + // null is not used + if (row[5]) + e.AddRule(GlobalLoot::RuleTypes::Rare, atoi(row[5])); + + // null is not used + if (row[6]) + e.AddRule(GlobalLoot::RuleTypes::Raid, atoi(row[6])); + + if (row[7]) { + auto races = SplitString(row[7], '|'); + + for (auto &r : races) + e.AddRule(GlobalLoot::RuleTypes::Race, std::stoi(r)); + } + + if (row[8]) { + auto classes = SplitString(row[8], '|'); + + for (auto &c : classes) + e.AddRule(GlobalLoot::RuleTypes::Class, std::stoi(c)); + } + + if (row[9]) { + auto bodytypes = SplitString(row[9], '|'); + + for (auto &b : bodytypes) + e.AddRule(GlobalLoot::RuleTypes::Class, std::stoi(b)); + } + + zone->AddGlobalLootEntry(e); + } +} + diff --git a/zone/mob.cpp b/zone/mob.cpp index 9efdda70c..0c0e20d81 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -266,6 +266,7 @@ Mob::Mob(const char* in_name, IsFullHP = (cur_hp == max_hp); qglobal = 0; spawned = false; + rare_spawn = false; InitializeBuffSlots(); diff --git a/zone/mob.h b/zone/mob.h index f973dd022..c223a45b4 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -689,6 +689,8 @@ public: void SetFollowDistance(uint32 dist) { follow_dist = dist; } uint32 GetFollowID() const { return follow; } uint32 GetFollowDistance() const { return follow_dist; } + inline bool IsRareSpawn() const { return rare_spawn; } + inline void SetRareSpawn(bool in) { rare_spawn = in; } virtual void Message(uint32 type, const char* message, ...) { } virtual void Message_StringID(uint32 type, uint32 string_id, uint32 distance = 0) { } @@ -1225,6 +1227,7 @@ protected: uint32 follow; uint32 follow_dist; bool no_target_hotkey; + bool rare_spawn; uint32 m_PlayerState; uint32 GetPlayerState() { return m_PlayerState; } diff --git a/zone/npc.cpp b/zone/npc.cpp index de494bb05..8f070f7a9 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -245,6 +245,8 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, const glm::vec4& position, int if roambox_delay = 1000; p_depop = false; loottable_id = d->loottable_id; + skip_global_loot = d->skip_global_loot; + rare_spawn = d->rare_spawn; no_target_hotkey = d->no_target_hotkey; @@ -938,6 +940,7 @@ bool NPC::SpawnZoneController(){ npc_type->d_melee_texture2 = 0; npc_type->merchanttype = 0; npc_type->bodytype = 11; + npc_type->skip_global_loot = true; if (RuleB(Zone, EnableZoneControllerGlobals)) { npc_type->qglobal = true; diff --git a/zone/npc.h b/zone/npc.h index 0ff7f3b03..2e264ce24 100644 --- a/zone/npc.h +++ b/zone/npc.h @@ -185,6 +185,7 @@ public: void AddItem(uint32 itemid, uint16 charges, bool equipitem = true, uint32 aug1 = 0, uint32 aug2 = 0, uint32 aug3 = 0, uint32 aug4 = 0, uint32 aug5 = 0, uint32 aug6 = 0); void AddLootTable(); void AddLootTable(uint32 ldid); + void CheckGlobalLootTables(); void DescribeAggro(Client *towho, Mob *mob, bool verbose); void RemoveItem(uint32 item_id, uint16 quantity = 0, uint16 slot = 0); void CheckMinMaxLevel(Mob *them); @@ -197,6 +198,7 @@ public: uint32 CountLoot(); inline uint32 GetLoottableID() const { return loottable_id; } virtual void UpdateEquipmentLight(); + inline bool DropsGlobalLoot() const { return !skip_global_loot; } inline uint32 GetCopper() const { return copper; } inline uint32 GetSilver() const { return silver; } @@ -562,6 +564,7 @@ protected: private: uint32 loottable_id; + bool skip_global_loot; bool p_depop; }; diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index c77e96979..6c0bdfe0a 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -210,6 +210,8 @@ Mob* QuestManager::spawn2(int npc_type, int grid, int unused, const glm::vec4& p { auto npc = new NPC(tmp, nullptr, position, FlyMode3); npc->AddLootTable(); + if (npc->DropsGlobalLoot()) + npc->CheckGlobalLootTables(); entity_list.AddNPC(npc,true,true); if(grid > 0) { @@ -232,6 +234,8 @@ Mob* QuestManager::unique_spawn(int npc_type, int grid, int unused, const glm::v { auto npc = new NPC(tmp, nullptr, position, FlyMode3); npc->AddLootTable(); + if (npc->DropsGlobalLoot()) + npc->CheckGlobalLootTables(); entity_list.AddNPC(npc,true,true); if(grid > 0) { @@ -308,6 +312,8 @@ Mob* QuestManager::spawn_from_spawn2(uint32 spawn2_id) found_spawn->SetNPCPointer(npc); npc->AddLootTable(); + if (npc->DropsGlobalLoot()) + npc->CheckGlobalLootTables(); npc->SetSp2(found_spawn->SpawnGroupID()); entity_list.AddNPC(npc); entity_list.LimitAddNPC(npc); @@ -1656,6 +1662,8 @@ void QuestManager::respawn(int npcTypeID, int grid) { { owner = new NPC(npcType, nullptr, owner->GetPosition(), FlyMode3); owner->CastToNPC()->AddLootTable(); + if (owner->CastToNPC()->DropsGlobalLoot()) + owner->CastToNPC()->CheckGlobalLootTables(); entity_list.AddNPC(owner->CastToNPC(),true,true); if(grid > 0) owner->CastToNPC()->AssignWaypoints(grid); diff --git a/zone/spawn2.cpp b/zone/spawn2.cpp index 654c5e836..bfc474721 100644 --- a/zone/spawn2.cpp +++ b/zone/spawn2.cpp @@ -236,6 +236,8 @@ bool Spawn2::Process() { npcthis = npc; npc->AddLootTable(); + if (npc->DropsGlobalLoot()) + npc->CheckGlobalLootTables(); npc->SetSp2(spawngroup_id_); npc->SaveGuardPointAnim(anim); npc->SetAppearance((EmuAppearance)anim); diff --git a/zone/trap.cpp b/zone/trap.cpp index d5bcfbeb8..91e11c012 100644 --- a/zone/trap.cpp +++ b/zone/trap.cpp @@ -168,6 +168,8 @@ void Trap::Trigger(Mob* trigger) auto spawnPosition = randomOffset + glm::vec4(m_Position, 0.0f); auto new_npc = new NPC(tmp, nullptr, spawnPosition, FlyMode3); new_npc->AddLootTable(); + if (new_npc->DropsGlobalLoot()) + new_npc->CheckGlobalLootTables(); entity_list.AddNPC(new_npc); new_npc->AddToHateList(trigger,1); } @@ -191,6 +193,8 @@ void Trap::Trigger(Mob* trigger) auto spawnPosition = randomOffset + glm::vec4(m_Position, 0.0f); auto new_npc = new NPC(tmp, nullptr, spawnPosition, FlyMode3); new_npc->AddLootTable(); + if (new_npc->DropsGlobalLoot()) + new_npc->CheckGlobalLootTables(); entity_list.AddNPC(new_npc); new_npc->AddToHateList(trigger,1); } @@ -555,4 +559,4 @@ void Trap::UpdateTrap(bool respawn, bool repopnow) { database.SetTrapData(this, repopnow); } -} \ No newline at end of file +} diff --git a/zone/zone.cpp b/zone/zone.cpp index 8045e0fbf..fce562c94 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -968,6 +968,8 @@ bool Zone::Init(bool iStaticZone) { LoadAlternateAdvancement(); + database.LoadGlobalLoot(); + //Load merchant data zone->GetMerchantDataForZoneLoad(); @@ -2229,6 +2231,8 @@ void Zone::DoAdventureActions() { NPC* npc = new NPC(tmp, nullptr, glm::vec4(ds->assa_x, ds->assa_y, ds->assa_z, ds->assa_h), FlyMode3); npc->AddLootTable(); + if (npc->DropsGlobalLoot()) + npc->CheckGlobalLootTables(); entity_list.AddNPC(npc); npc->Shout("Rarrrgh!"); did_adventure_actions = true; diff --git a/zone/zone.h b/zone/zone.h index 3a5125eb4..158d414a4 100644 --- a/zone/zone.h +++ b/zone/zone.h @@ -28,6 +28,7 @@ #include "spawn2.h" #include "spawngroup.h" #include "aa_ability.h" +#include "global_loot_manager.h" struct ZonePoint { @@ -269,6 +270,11 @@ public: void UpdateHotzone(); std::unordered_map tick_items; + inline std::vector GetGlobalLootTables(NPC *mob) const { return m_global_loot.GetGlobalLootTables(mob); } + inline void AddGlobalLootEntry(GlobalLootEntry &in) { return m_global_loot.AddEntry(in); } + inline void ShowZoneGlobalLoot(Client *to) { m_global_loot.ShowZoneGlobalLoot(to); } + inline void ShowNPCGlobalLoot(Client *to, NPC *who) { m_global_loot.ShowNPCGlobalLoot(to, who); } + // random object that provides random values for the zone EQEmu::Random random; @@ -347,6 +353,8 @@ private: QGlobalCache *qGlobals; Timer hotzone_timer; + + GlobalLootManager m_global_loot; }; #endif diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index 75ca99ac8..01add9944 100644 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -1969,7 +1969,9 @@ const NPCType* ZoneDatabase::LoadNPCTypesData(uint32 npc_type_id, bool bulk_load "npc_types.charm_attack_delay, " "npc_types.charm_accuracy_rating, " "npc_types.charm_avoidance_rating, " - "npc_types.charm_atk " + "npc_types.charm_atk, " + "npc_types.skip_global_loot, " + "npc_types.rare_spawn " "FROM npc_types %s", where_condition.c_str() ); @@ -2156,6 +2158,9 @@ const NPCType* ZoneDatabase::LoadNPCTypesData(uint32 npc_type_id, bool bulk_load temp_npctype_data->charm_avoidance_rating = atoi(row[105]); temp_npctype_data->charm_atk = atoi(row[106]); + temp_npctype_data->skip_global_loot = atoi(row[107]) != 0; + temp_npctype_data->rare_spawn = atoi(row[108]) != 0; + // If NPC with duplicate NPC id already in table, // free item we attempted to add. if (zone->npctable.find(temp_npctype_data->npc_id) != zone->npctable.end()) { diff --git a/zone/zonedb.h b/zone/zonedb.h index ec1a1d663..6f65bae91 100644 --- a/zone/zonedb.h +++ b/zone/zonedb.h @@ -424,6 +424,7 @@ public: uint32 GetMaxNPCSpellsID(); uint32 GetMaxNPCSpellsEffectsID(); bool GetAuraEntry(uint16 spell_id, AuraRecord &record); + void LoadGlobalLoot(); DBnpcspells_Struct* GetNPCSpells(uint32 iDBSpellsID); DBnpcspellseffects_Struct* GetNPCSpellsEffects(uint32 iDBSpellsEffectsID); diff --git a/zone/zonedump.h b/zone/zonedump.h index 636978475..66c7ec01d 100644 --- a/zone/zonedump.h +++ b/zone/zonedump.h @@ -141,6 +141,8 @@ struct NPCType bool ignore_despawn; bool show_name; // should default on bool untargetable; + bool skip_global_loot; + bool rare_spawn; }; namespace player_lootitem { From 68d563c72f17df7ba67ae95eca251cf06cc784fb Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 11 Feb 2018 13:26:00 -0500 Subject: [PATCH 065/670] Add optional file to implement global defiant tables [skip ci] This is destructive and will delete the loottable_entries currently holding defiant drops The level ranges maybe a bit wrong, kind of hard to tell, but it should be accurate enough --- .../git/optional/2018_02_11_GlobalDefiant.sql | 451 ++++++++++++++++++ 1 file changed, 451 insertions(+) create mode 100644 utils/sql/git/optional/2018_02_11_GlobalDefiant.sql diff --git a/utils/sql/git/optional/2018_02_11_GlobalDefiant.sql b/utils/sql/git/optional/2018_02_11_GlobalDefiant.sql new file mode 100644 index 000000000..86b75b71b --- /dev/null +++ b/utils/sql/git/optional/2018_02_11_GlobalDefiant.sql @@ -0,0 +1,451 @@ +DELETE FROM lootdrop_entries WHERE item_id IN (50005, 50006, 50007, 50008, 50009, 50010, 50011, 50012, 50013, 50014, 50015, 50016, 50017, 50018, 50019, 50020, 50021, 50022, 50023, 50024, 50025, 50026, 50027, 50028, 50029, 50030, 50031, 50032, 50500, 50501, 50502, 50503, 50504, 50505, 50506, 50507, 50508, 50509, 50510, 50511, 50512, 50513, 50514, 50515, 50516, 50517, 50518); + +SELECT @loottable_id := MAX(id) + 1 FROM loottable; +INSERT INTO loottable SET id=@loottable_id, name="GLB-Crude-Defiant", mincash="0", maxcash="0", avgcoin="0"; +SELECT @lootdrop_id := MAX(id) + 1 FROM lootdrop; +INSERT INTO lootdrop SET id=@lootdrop_id, name="GLB-Crude-Defiant-Drop"; +INSERT INTO loottable_entries SET loottable_id='@loottable_id', lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50005, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50006, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50007, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50008, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50009, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50010, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50011, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50012, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50013, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50014, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50015, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50016, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50017, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50018, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50019, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50020, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50021, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50022, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50023, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50024, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50025, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50026, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50027, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50028, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50029, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50030, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50031, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50032, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50500, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50501, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50502, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50503, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50504, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50505, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50506, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50507, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50508, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50509, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50510, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50511, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50512, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50513, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50514, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50515, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50516, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50517, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50518, equip_item=1, item_charges=1, multiplier=1, chance=1; + +INSERT INTO global_loot SET description='GLB-Crude-Defiant', loottable_id=@loottable_id, max_level=15; + +DELETE FROM lootdrop_entries WHERE item_id IN (50033, 50034, 50035, 50036, 50037, 50038, 50039, 50040, 50041, 50042, 50043, 50044, 50045, 50046, 50047, 50048, 50049, 50050, 50051, 50052, 50053, 50054, 50055, 50056, 50057, 50058, 50059, 50060, 50519, 50520, 50521, 50522, 50523, 50524, 50525, 50526, 50527, 50528, 50529, 50530, 50531, 50532, 50533, 50534, 50535); + +SELECT @loottable_id := MAX(id) + 1 FROM loottable; +INSERT INTO loottable SET id=@loottable_id, name="GLB-Simple-Defiant", mincash="0", maxcash="0", avgcoin="0"; +SELECT @lootdrop_id := MAX(id) + 1 FROM lootdrop; +INSERT INTO lootdrop SET id=@lootdrop_id, name="GLB-Simple-Defiant-Drop"; +INSERT INTO loottable_entries SET loottable_id='@loottable_id', lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50033, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50034, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50035, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50036, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50037, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50038, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50039, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50040, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50041, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50042, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50043, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50044, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50045, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50046, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50047, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50048, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50049, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50050, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50051, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50052, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50053, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50054, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50055, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50056, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50057, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50058, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50059, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50060, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50519, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50520, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50521, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50522, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50523, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50524, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50525, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50526, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50527, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50528, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50529, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50530, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50531, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50532, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50533, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50534, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50535, equip_item=1, item_charges=1, multiplier=1, chance=1; + +INSERT INTO global_loot SET description='GLB-Simple-Defiant', loottable_id=@loottable_id, min_level=14, max_level=25; + +DELETE FROM lootdrop_entries WHERE item_id IN (50061, 50062, 50063, 50064, 50065, 50066, 50067, 50068, 50069, 50070, 50071, 50072, 50073, 50074, 50075, 50076, 50077, 50078, 50079, 50080, 50081, 50082, 50083, 50084, 50085, 50086, 50087, 50088, 50536, 50537, 50540, 50541, 50542, 50543, 50544, 50545, 50546, 50547, 50548, 50549, 50550, 50551, 50552, 50553); + +SELECT @loottable_id := MAX(id) + 1 FROM loottable; +INSERT INTO loottable SET id=@loottable_id, name="GLB-Rough-Defiant", mincash="0", maxcash="0", avgcoin="0"; +SELECT @lootdrop_id := MAX(id) + 1 FROM lootdrop; +INSERT INTO lootdrop SET id=@lootdrop_id, name="GLB-Rough-Defiant-Drop"; +INSERT INTO loottable_entries SET loottable_id='@loottable_id', lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50061, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50062, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50063, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50064, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50065, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50066, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50067, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50068, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50069, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50070, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50071, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50072, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50073, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50074, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50075, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50076, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50077, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50078, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50079, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50080, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50081, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50082, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50083, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50084, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50085, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50086, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50087, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50088, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50536, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50537, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50540, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50541, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50542, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50543, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50544, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50545, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50546, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50547, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50548, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50549, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50550, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50551, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50552, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50553, equip_item=1, item_charges=1, multiplier=1, chance=1; + +INSERT INTO global_loot SET description='GLB-Rough-Defiant', loottable_id=@loottable_id, min_level=24, max_level=36; + +DELETE FROM lootdrop_entries WHERE item_id IN (50089, 50090, 50091, 50092, 50093, 50094, 50095, 50096, 50097, 50098, 50099, 50100, 50101, 50102, 50103, 50104, 50105, 50106, 50107, 50108, 50109, 50110, 50111, 50112, 50113, 50114, 50115, 50116, 50554, 50555, 50556, 50557, 50558, 50559, 50560, 50561, 50562, 50563, 50564, 50565, 50566, 50567, 50568, 50569); + +SELECT @loottable_id := MAX(id) + 1 FROM loottable; +INSERT INTO loottable SET id=@loottable_id, name="GLB-Ornate-Defiant", mincash="0", maxcash="0", avgcoin="0"; +SELECT @lootdrop_id := MAX(id) + 1 FROM lootdrop; +INSERT INTO lootdrop SET id=@lootdrop_id, name="GLB-Ornate-Defiant-Drop"; +INSERT INTO loottable_entries SET loottable_id='@loottable_id', lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50089, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50090, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50091, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50092, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50093, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50094, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50095, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50096, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50097, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50098, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50099, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50100, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50101, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50102, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50103, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50104, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50105, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50106, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50107, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50108, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50109, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50110, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50111, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50112, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50113, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50114, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50115, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50116, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50554, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50555, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50556, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50557, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50558, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50559, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50560, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50561, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50562, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50563, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50564, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50565, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50566, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50567, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50568, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50569, equip_item=1, item_charges=1, multiplier=1, chance=1; + +INSERT INTO global_loot SET description='GLB-Ornate-Defiant', loottable_id=@loottable_id, min_level=35, max_level=47; + +DELETE FROM lootdrop_entries WHERE item_id IN (50117, 50118, 50119, 50120, 50121, 50122, 50123, 50124, 50125, 50126, 50127, 50128, 50129, 50130, 50131, 50132, 50133, 50134, 50135, 50136, 50137, 50138, 50139, 50140, 50141, 50142, 50143, 50144, 50570, 50571, 50572, 50573, 50574, 50575, 50576, 50577, 50578, 50579, 50580, 50581, 50582, 50583, 50584, 50585); + +SELECT @loottable_id := MAX(id) + 1 FROM loottable; +INSERT INTO loottable SET id=@loottable_id, name="GLB-Flawed-Defiant", mincash="0", maxcash="0", avgcoin="0"; +SELECT @lootdrop_id := MAX(id) + 1 FROM lootdrop; +INSERT INTO lootdrop SET id=@lootdrop_id, name="GLB-Flawed-Defiant-Drop"; +INSERT INTO loottable_entries SET loottable_id='@loottable_id', lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50117, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50118, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50119, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50120, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50121, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50122, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50123, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50124, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50125, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50126, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50127, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50128, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50129, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50130, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50131, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50132, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50133, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50134, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50135, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50136, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50137, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50138, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50139, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50140, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50141, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50142, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50143, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50144, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50570, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50571, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50572, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50573, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50574, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50575, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50576, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50577, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50578, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50579, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50580, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50581, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50582, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50583, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50584, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50585, equip_item=1, item_charges=1, multiplier=1, chance=1; + +INSERT INTO global_loot SET description='GLB-Flawed-Defiant', loottable_id=@loottable_id, enabled=0, min_level=44, max_level=55; + +DELETE FROM lootdrop_entries WHERE item_id IN (50145, 50146, 50147, 50148, 50149, 50150, 50151, 50152, 50153, 50154, 50155, 50156, 50157, 50158, 50159, 50160, 50161, 50162, 50163, 50164, 50165, 50166, 50167, 50168, 50169, 50170, 50171, 50172, 50173, 50174, 50175, 50176, 50177, 50178, 50586, 50587, 50588, 50589, 50590, 50591, 50592, 50593, 50594, 50595, 50596, 50597, 50598, 50599, 50600, 50601); + +SELECT @loottable_id := MAX(id) + 1 FROM loottable; +INSERT INTO loottable SET id=@loottable_id, name="GLB-Intricate-Defiant", mincash="0", maxcash="0", avgcoin="0"; +SELECT @lootdrop_id := MAX(id) + 1 FROM lootdrop; +INSERT INTO lootdrop SET id=@lootdrop_id, name="GLB-Intricate-Defiant-Drop"; +INSERT INTO loottable_entries SET loottable_id='@loottable_id', lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50145, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50146, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50147, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50148, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50149, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50150, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50151, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50152, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50153, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50154, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50155, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50156, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50157, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50158, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50159, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50160, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50161, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50162, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50163, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50164, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50165, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50166, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50167, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50168, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50169, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50170, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50171, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50172, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50173, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50174, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50175, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50176, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50177, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50178, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50586, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50587, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50588, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50589, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50590, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50591, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50592, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50593, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50594, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50595, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50596, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50597, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50598, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50599, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50600, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50601, equip_item=1, item_charges=1, multiplier=1, chance=1; + +INSERT INTO global_loot SET description='GLB-Intricate-Defiant', loottable_id=@loottable_id, enabled=0, min_level=54, max_level=65; + +DELETE FROM lootdrop_entries WHERE item_id IN (50179, 50180, 50181, 50182, 50183, 50184, 50185, 50186, 50187, 50188, 50189, 50190, 50191, 50192, 50193, 50194, 50195, 50196, 50197, 50198, 50199, 50200, 50201, 50202, 50203, 50204, 50205, 50206, 50207, 50208, 50209, 50210, 50211, 50212, 50602, 50603, 50604, 50605, 50606, 50607, 50608, 50609, 50610, 50611, 50612, 50613, 50614, 50615, 50616); + +SELECT @loottable_id := MAX(id) + 1 FROM loottable; +INSERT INTO loottable SET id=@loottable_id, name="GLB-Elaborate-Defiant", mincash="0", maxcash="0", avgcoin="0"; +SELECT @lootdrop_id := MAX(id) + 1 FROM lootdrop; +INSERT INTO lootdrop SET id=@lootdrop_id, name="GLB-Elaborate-Defiant-Drop"; +INSERT INTO loottable_entries SET loottable_id='@loottable_id', lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50179, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50180, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50181, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50182, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50183, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50184, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50185, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50186, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50187, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50188, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50189, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50190, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50191, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50192, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50193, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50194, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50195, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50196, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50197, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50198, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50199, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50200, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50201, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50202, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50203, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50204, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50205, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50206, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50207, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50208, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50209, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50210, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50211, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50212, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50602, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50603, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50604, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50605, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50606, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50607, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50608, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50609, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50610, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50611, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50612, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50613, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50614, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50615, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50616, equip_item=1, item_charges=1, multiplier=1, chance=1; + +INSERT INTO global_loot SET description='GLB-Elaborate-Defiant', loottable_id=@loottable_id, enabled=0, min_level=64, max_level=75; + +DELETE FROM lootdrop_entries WHERE item_id IN (50213, 50214, 50215, 50216, 50217, 50218, 50219, 50220, 50221, 50222, 50223, 50224, 50225, 50226, 50227, 50228, 50229, 50230, 50231, 50232, 50233, 50234, 50235, 50236, 50237, 50238, 50239, 50240, 50241, 50242, 50243, 50244, 50245, 50246, 50617, 50618, 50619, 50620, 50621, 50622, 50623, 50624, 50625, 50626, 50627, 50628, 50629, 50630, 50631); + +SELECT @loottable_id := MAX(id) + 1 FROM loottable; +INSERT INTO loottable SET id=@loottable_id, name="GLB-Elegant-Defiant", mincash="0", maxcash="0", avgcoin="0"; +SELECT @lootdrop_id := MAX(id) + 1 FROM lootdrop; +INSERT INTO lootdrop SET id=@lootdrop_id, name="GLB-Elegant-Defiant-Drop"; +INSERT INTO loottable_entries SET loottable_id='@loottable_id', lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50213, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50214, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50215, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50216, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50217, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50218, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50219, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50220, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50221, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50222, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50223, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50224, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50225, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50226, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50227, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50228, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50229, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50230, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50231, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50232, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50233, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50234, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50235, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50236, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50237, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50238, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50239, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50240, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50241, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50242, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50243, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50244, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50245, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50246, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50617, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50618, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50619, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50620, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50621, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50622, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50623, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50624, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50625, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50626, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50627, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50628, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50629, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50630, equip_item=1, item_charges=1, multiplier=1, chance=1; +INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50631, equip_item=1, item_charges=1, multiplier=1, chance=1; + +INSERT INTO global_loot SET description='GLB-Elegant-Defiant', loottable_id=@loottable_id, enabled=0, min_level=74, max_level=86; From e747ea851a1cef0c463fdb9a04ba4003d8aadc6c Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 11 Feb 2018 17:39:12 -0500 Subject: [PATCH 066/670] Fix issue with optional SQL [skip ci] --- .../git/optional/2018_02_11_GlobalDefiant.sql | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/utils/sql/git/optional/2018_02_11_GlobalDefiant.sql b/utils/sql/git/optional/2018_02_11_GlobalDefiant.sql index 86b75b71b..00e36818c 100644 --- a/utils/sql/git/optional/2018_02_11_GlobalDefiant.sql +++ b/utils/sql/git/optional/2018_02_11_GlobalDefiant.sql @@ -4,7 +4,7 @@ SELECT @loottable_id := MAX(id) + 1 FROM loottable; INSERT INTO loottable SET id=@loottable_id, name="GLB-Crude-Defiant", mincash="0", maxcash="0", avgcoin="0"; SELECT @lootdrop_id := MAX(id) + 1 FROM lootdrop; INSERT INTO lootdrop SET id=@lootdrop_id, name="GLB-Crude-Defiant-Drop"; -INSERT INTO loottable_entries SET loottable_id='@loottable_id', lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; +INSERT INTO loottable_entries SET loottable_id=@loottable_id, lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50005, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50006, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50007, equip_item=1, item_charges=1, multiplier=1, chance=1; @@ -61,7 +61,7 @@ SELECT @loottable_id := MAX(id) + 1 FROM loottable; INSERT INTO loottable SET id=@loottable_id, name="GLB-Simple-Defiant", mincash="0", maxcash="0", avgcoin="0"; SELECT @lootdrop_id := MAX(id) + 1 FROM lootdrop; INSERT INTO lootdrop SET id=@lootdrop_id, name="GLB-Simple-Defiant-Drop"; -INSERT INTO loottable_entries SET loottable_id='@loottable_id', lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; +INSERT INTO loottable_entries SET loottable_id=@loottable_id, lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50033, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50034, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50035, equip_item=1, item_charges=1, multiplier=1, chance=1; @@ -116,7 +116,7 @@ SELECT @loottable_id := MAX(id) + 1 FROM loottable; INSERT INTO loottable SET id=@loottable_id, name="GLB-Rough-Defiant", mincash="0", maxcash="0", avgcoin="0"; SELECT @lootdrop_id := MAX(id) + 1 FROM lootdrop; INSERT INTO lootdrop SET id=@lootdrop_id, name="GLB-Rough-Defiant-Drop"; -INSERT INTO loottable_entries SET loottable_id='@loottable_id', lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; +INSERT INTO loottable_entries SET loottable_id=@loottable_id, lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50061, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50062, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50063, equip_item=1, item_charges=1, multiplier=1, chance=1; @@ -170,7 +170,7 @@ SELECT @loottable_id := MAX(id) + 1 FROM loottable; INSERT INTO loottable SET id=@loottable_id, name="GLB-Ornate-Defiant", mincash="0", maxcash="0", avgcoin="0"; SELECT @lootdrop_id := MAX(id) + 1 FROM lootdrop; INSERT INTO lootdrop SET id=@lootdrop_id, name="GLB-Ornate-Defiant-Drop"; -INSERT INTO loottable_entries SET loottable_id='@loottable_id', lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; +INSERT INTO loottable_entries SET loottable_id=@loottable_id, lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50089, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50090, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50091, equip_item=1, item_charges=1, multiplier=1, chance=1; @@ -224,7 +224,7 @@ SELECT @loottable_id := MAX(id) + 1 FROM loottable; INSERT INTO loottable SET id=@loottable_id, name="GLB-Flawed-Defiant", mincash="0", maxcash="0", avgcoin="0"; SELECT @lootdrop_id := MAX(id) + 1 FROM lootdrop; INSERT INTO lootdrop SET id=@lootdrop_id, name="GLB-Flawed-Defiant-Drop"; -INSERT INTO loottable_entries SET loottable_id='@loottable_id', lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; +INSERT INTO loottable_entries SET loottable_id=@loottable_id, lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50117, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50118, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50119, equip_item=1, item_charges=1, multiplier=1, chance=1; @@ -278,7 +278,7 @@ SELECT @loottable_id := MAX(id) + 1 FROM loottable; INSERT INTO loottable SET id=@loottable_id, name="GLB-Intricate-Defiant", mincash="0", maxcash="0", avgcoin="0"; SELECT @lootdrop_id := MAX(id) + 1 FROM lootdrop; INSERT INTO lootdrop SET id=@lootdrop_id, name="GLB-Intricate-Defiant-Drop"; -INSERT INTO loottable_entries SET loottable_id='@loottable_id', lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; +INSERT INTO loottable_entries SET loottable_id=@loottable_id, lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50145, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50146, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50147, equip_item=1, item_charges=1, multiplier=1, chance=1; @@ -338,7 +338,7 @@ SELECT @loottable_id := MAX(id) + 1 FROM loottable; INSERT INTO loottable SET id=@loottable_id, name="GLB-Elaborate-Defiant", mincash="0", maxcash="0", avgcoin="0"; SELECT @lootdrop_id := MAX(id) + 1 FROM lootdrop; INSERT INTO lootdrop SET id=@lootdrop_id, name="GLB-Elaborate-Defiant-Drop"; -INSERT INTO loottable_entries SET loottable_id='@loottable_id', lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; +INSERT INTO loottable_entries SET loottable_id=@loottable_id, lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50179, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50180, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50181, equip_item=1, item_charges=1, multiplier=1, chance=1; @@ -397,7 +397,7 @@ SELECT @loottable_id := MAX(id) + 1 FROM loottable; INSERT INTO loottable SET id=@loottable_id, name="GLB-Elegant-Defiant", mincash="0", maxcash="0", avgcoin="0"; SELECT @lootdrop_id := MAX(id) + 1 FROM lootdrop; INSERT INTO lootdrop SET id=@lootdrop_id, name="GLB-Elegant-Defiant-Drop"; -INSERT INTO loottable_entries SET loottable_id='@loottable_id', lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; +INSERT INTO loottable_entries SET loottable_id=@loottable_id, lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50213, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50214, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50215, equip_item=1, item_charges=1, multiplier=1, chance=1; From d2360753fbbeedab8791a55c005c05ca8ec41b25 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 11 Feb 2018 17:40:49 -0500 Subject: [PATCH 067/670] Fix issue with optional SQL [skip ci] --- .../git/optional/2018_02_11_GlobalDefiant.sql | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/utils/sql/git/optional/2018_02_11_GlobalDefiant.sql b/utils/sql/git/optional/2018_02_11_GlobalDefiant.sql index 00e36818c..10c918884 100644 --- a/utils/sql/git/optional/2018_02_11_GlobalDefiant.sql +++ b/utils/sql/git/optional/2018_02_11_GlobalDefiant.sql @@ -4,7 +4,7 @@ SELECT @loottable_id := MAX(id) + 1 FROM loottable; INSERT INTO loottable SET id=@loottable_id, name="GLB-Crude-Defiant", mincash="0", maxcash="0", avgcoin="0"; SELECT @lootdrop_id := MAX(id) + 1 FROM lootdrop; INSERT INTO lootdrop SET id=@lootdrop_id, name="GLB-Crude-Defiant-Drop"; -INSERT INTO loottable_entries SET loottable_id=@loottable_id, lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; +INSERT INTO loottable_entries SET loottable_id=@loottable_id, lootdrop_id=@lootdrop_id, droplimit='0', mindrop='1', multiplier='1', probability='2'; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50005, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50006, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50007, equip_item=1, item_charges=1, multiplier=1, chance=1; @@ -61,7 +61,7 @@ SELECT @loottable_id := MAX(id) + 1 FROM loottable; INSERT INTO loottable SET id=@loottable_id, name="GLB-Simple-Defiant", mincash="0", maxcash="0", avgcoin="0"; SELECT @lootdrop_id := MAX(id) + 1 FROM lootdrop; INSERT INTO lootdrop SET id=@lootdrop_id, name="GLB-Simple-Defiant-Drop"; -INSERT INTO loottable_entries SET loottable_id=@loottable_id, lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; +INSERT INTO loottable_entries SET loottable_id=@loottable_id, lootdrop_id=@lootdrop_id, droplimit='0', mindrop='1', multiplier='1', probability='2'; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50033, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50034, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50035, equip_item=1, item_charges=1, multiplier=1, chance=1; @@ -116,7 +116,7 @@ SELECT @loottable_id := MAX(id) + 1 FROM loottable; INSERT INTO loottable SET id=@loottable_id, name="GLB-Rough-Defiant", mincash="0", maxcash="0", avgcoin="0"; SELECT @lootdrop_id := MAX(id) + 1 FROM lootdrop; INSERT INTO lootdrop SET id=@lootdrop_id, name="GLB-Rough-Defiant-Drop"; -INSERT INTO loottable_entries SET loottable_id=@loottable_id, lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; +INSERT INTO loottable_entries SET loottable_id=@loottable_id, lootdrop_id=@lootdrop_id, droplimit='0', mindrop='1', multiplier='1', probability='2'; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50061, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50062, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50063, equip_item=1, item_charges=1, multiplier=1, chance=1; @@ -170,7 +170,7 @@ SELECT @loottable_id := MAX(id) + 1 FROM loottable; INSERT INTO loottable SET id=@loottable_id, name="GLB-Ornate-Defiant", mincash="0", maxcash="0", avgcoin="0"; SELECT @lootdrop_id := MAX(id) + 1 FROM lootdrop; INSERT INTO lootdrop SET id=@lootdrop_id, name="GLB-Ornate-Defiant-Drop"; -INSERT INTO loottable_entries SET loottable_id=@loottable_id, lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; +INSERT INTO loottable_entries SET loottable_id=@loottable_id, lootdrop_id=@lootdrop_id, droplimit='0', mindrop='1', multiplier='1', probability='2'; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50089, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50090, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50091, equip_item=1, item_charges=1, multiplier=1, chance=1; @@ -224,7 +224,7 @@ SELECT @loottable_id := MAX(id) + 1 FROM loottable; INSERT INTO loottable SET id=@loottable_id, name="GLB-Flawed-Defiant", mincash="0", maxcash="0", avgcoin="0"; SELECT @lootdrop_id := MAX(id) + 1 FROM lootdrop; INSERT INTO lootdrop SET id=@lootdrop_id, name="GLB-Flawed-Defiant-Drop"; -INSERT INTO loottable_entries SET loottable_id=@loottable_id, lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; +INSERT INTO loottable_entries SET loottable_id=@loottable_id, lootdrop_id=@lootdrop_id, droplimit='0', mindrop='1', multiplier='1', probability='2'; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50117, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50118, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50119, equip_item=1, item_charges=1, multiplier=1, chance=1; @@ -278,7 +278,7 @@ SELECT @loottable_id := MAX(id) + 1 FROM loottable; INSERT INTO loottable SET id=@loottable_id, name="GLB-Intricate-Defiant", mincash="0", maxcash="0", avgcoin="0"; SELECT @lootdrop_id := MAX(id) + 1 FROM lootdrop; INSERT INTO lootdrop SET id=@lootdrop_id, name="GLB-Intricate-Defiant-Drop"; -INSERT INTO loottable_entries SET loottable_id=@loottable_id, lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; +INSERT INTO loottable_entries SET loottable_id=@loottable_id, lootdrop_id=@lootdrop_id, droplimit='0', mindrop='1', multiplier='1', probability='2'; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50145, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50146, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50147, equip_item=1, item_charges=1, multiplier=1, chance=1; @@ -338,7 +338,7 @@ SELECT @loottable_id := MAX(id) + 1 FROM loottable; INSERT INTO loottable SET id=@loottable_id, name="GLB-Elaborate-Defiant", mincash="0", maxcash="0", avgcoin="0"; SELECT @lootdrop_id := MAX(id) + 1 FROM lootdrop; INSERT INTO lootdrop SET id=@lootdrop_id, name="GLB-Elaborate-Defiant-Drop"; -INSERT INTO loottable_entries SET loottable_id=@loottable_id, lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; +INSERT INTO loottable_entries SET loottable_id=@loottable_id, lootdrop_id=@lootdrop_id, droplimit='0', mindrop='1', multiplier='1', probability='2'; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50179, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50180, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50181, equip_item=1, item_charges=1, multiplier=1, chance=1; @@ -397,7 +397,7 @@ SELECT @loottable_id := MAX(id) + 1 FROM loottable; INSERT INTO loottable SET id=@loottable_id, name="GLB-Elegant-Defiant", mincash="0", maxcash="0", avgcoin="0"; SELECT @lootdrop_id := MAX(id) + 1 FROM lootdrop; INSERT INTO lootdrop SET id=@lootdrop_id, name="GLB-Elegant-Defiant-Drop"; -INSERT INTO loottable_entries SET loottable_id=@loottable_id, lootdrop_id='@lootdrop_id', droplimit='0', mindrop='1', multiplier='1', probability='2'; +INSERT INTO loottable_entries SET loottable_id=@loottable_id, lootdrop_id=@lootdrop_id, droplimit='0', mindrop='1', multiplier='1', probability='2'; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50213, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50214, equip_item=1, item_charges=1, multiplier=1, chance=1; INSERT INTO lootdrop_entries SET lootdrop_id=@lootdrop_id, item_id=50215, equip_item=1, item_charges=1, multiplier=1, chance=1; From 3e39c0c11a9c947ba5d100d2f65a83984d72baa2 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Mon, 12 Feb 2018 10:51:21 -0500 Subject: [PATCH 068/670] Scaled AC and ATK if npc is scaling. --- zone/npc.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zone/npc.cpp b/zone/npc.cpp index c13841358..74be84fa2 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -2130,6 +2130,8 @@ void NPC::LevelScale() { if(level > 15 && level <= 25) scale_adjust = 2; + AC += (int)(AC * scaling); + ATK += (int)(ATK * scaling); base_hp += (int)(base_hp * scaling); max_hp += (int)(max_hp * scaling); cur_hp = max_hp; From b5e9c0f996b63fb3210a3e9f49a1677579b72622 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Mon, 12 Feb 2018 19:41:48 -0500 Subject: [PATCH 069/670] Fix PVP arenas --- zone/client.cpp | 14 ++++++++------ zone/client.h | 3 ++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/zone/client.cpp b/zone/client.cpp index 844188edb..69c43ef5a 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -336,6 +336,8 @@ Client::Client(EQStreamInterface* ieqs) for (int i = 0; i < InnateSkillMax; ++i) m_pp.InnateSkills[i] = InnateDisabled; + temp_pvp = false; + AI_Init(); } @@ -462,8 +464,8 @@ void Client::SendZoneInPackets() if (!GetHideMe()) entity_list.QueueClients(this, outapp, true); safe_delete(outapp); SetSpawned(); - if (GetPVP()) //force a PVP update until we fix the spawn struct - SendAppearancePacket(AT_PVP, GetPVP(), true, false); + if (GetPVP(false)) //force a PVP update until we fix the spawn struct + SendAppearancePacket(AT_PVP, GetPVP(false), true, false); //Send AA Exp packet: if (GetLevel() >= 51) @@ -1955,7 +1957,7 @@ void Client::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) ns->spawn.gm = GetGM() ? 1 : 0; ns->spawn.guildID = GuildID(); // ns->spawn.linkdead = IsLD() ? 1 : 0; -// ns->spawn.pvp = GetPVP() ? 1 : 0; +// ns->spawn.pvp = GetPVP(false) ? 1 : 0; ns->spawn.show_name = true; @@ -8889,9 +8891,9 @@ void Client::CheckRegionTypeChanges() return; if (last_region_type == RegionTypePVP) - SetPVP(true, false); - else if (GetPVP()) - SetPVP(false, false); + temp_pvp = true; + else if (temp_pvp) + temp_pvp = false; } void Client::ProcessAggroMeter() diff --git a/zone/client.h b/zone/client.h index e0732fd92..039844f82 100644 --- a/zone/client.h +++ b/zone/client.h @@ -395,7 +395,7 @@ public: void SetGM(bool toggle); void SetPVP(bool toggle, bool message = true); - inline bool GetPVP() const { return m_pp.pvp != 0; } + inline bool GetPVP(bool inc_temp = true) const { return m_pp.pvp != 0 || (inc_temp && temp_pvp); } inline bool GetGM() const { return m_pp.gm != 0; } inline void SetBaseClass(uint32 i) { m_pp.class_=i; } @@ -1466,6 +1466,7 @@ private: PetInfo m_suspendedminion; // pet data for our suspended minion. MercInfo m_mercinfo[MAXMERCS]; // current mercenary InspectMessage_Struct m_inspect_message; + bool temp_pvp; void NPCSpawn(const Seperator* sep); uint32 GetEXPForLevel(uint16 level); From 91d3851d76b3deace7c6c6f182ad74daf9cd6674 Mon Sep 17 00:00:00 2001 From: Uleat Date: Wed, 14 Feb 2018 23:04:33 -0500 Subject: [PATCH 070/670] Fix for 'SoD' client unable to log into zone [ci skip] --- common/patches/sod_structs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/patches/sod_structs.h b/common/patches/sod_structs.h index 88ccd7788..88a78c6ee 100644 --- a/common/patches/sod_structs.h +++ b/common/patches/sod_structs.h @@ -924,7 +924,7 @@ struct PlayerProfile_Struct /*06488*/ uint32 silver_cursor; // Silver Pieces on cursor /*06492*/ uint32 copper_cursor; // Copper Pieces on cursor /*06496*/ uint32 skills[MAX_PP_SKILL]; // [400] List of skills // 100 dword buffer -/*06896*/ uint32 InnateSkills[MAX_PP_SKILL]; +/*06896*/ uint32 InnateSkills[MAX_PP_INNATE_SKILL]; /*06996*/ uint8 unknown04760[36]; /*07032*/ uint32 toxicity; // Potion Toxicity (15=too toxic, each potion adds 3) /*07036*/ uint32 thirst_level; // Drink (ticks till next drink) From a32dedeb48b5f90e9f0d16e1a0c8e90ce0d2d933 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 15 Feb 2018 18:20:16 -0500 Subject: [PATCH 071/670] Fix issue with heading being incorrectly handled So we've been doing heading wrong all these years. You will need to run a script to fix your quests and required SQL to fix DB. This fixes a ton of random issues with headings and as gives us a better resolution on headings :P --- changelog.txt | 7 ++ common/misc_functions.cpp | 48 ++++++++++---- common/misc_functions.h | 13 +++- common/patches/rof2_structs.h | 4 +- common/version.h | 2 +- utils/sql/db_update_manifest.txt | 1 + utils/sql/git/required/2018_02_13_Heading.sql | 3 + zone/attack.cpp | 14 ++-- zone/client_packet.cpp | 10 +-- zone/client_process.cpp | 57 ++++++---------- zone/command.cpp | 19 +++--- zone/mob.cpp | 65 +++++++++---------- zone/mob.h | 5 +- zone/position.cpp | 4 +- zone/spell_effects.cpp | 12 ++-- zone/spells.cpp | 46 +++++++------ zone/waypoints.cpp | 21 ------ 17 files changed, 169 insertions(+), 162 deletions(-) create mode 100644 utils/sql/git/required/2018_02_13_Heading.sql diff --git a/changelog.txt b/changelog.txt index a700ded31..8daf85938 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,12 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 02/14/2018 == +mackal: Fix Heading -- Quests broken + +Please report any other issues with heading, most things were tested and worked + +Run akkadius' script to fix your quests + == 02/10/2018 == mackal: Add Global Loot system diff --git a/common/misc_functions.cpp b/common/misc_functions.cpp index dcdbad561..aaa20f3d4 100644 --- a/common/misc_functions.cpp +++ b/common/misc_functions.cpp @@ -194,32 +194,52 @@ uint32 rnd_hash( time_t t, clock_t c ) float EQ13toFloat(int d) { - return ( float(d)/float(1<<2)); -} - -float NewEQ13toFloat(int d) -{ - return ( float(d)/float(1<<6)); + return static_cast(d) / 64.0f; } float EQ19toFloat(int d) { - return ( float(d)/float(1<<3)); + return static_cast(d) / 8.0f; } int FloatToEQ13(float d) { - return int(d*float(1<<2)); -} - -int NewFloatToEQ13(float d) -{ - return int(d*float(1<<6)); + return static_cast(d * 64.0f); } int FloatToEQ19(float d) { - return int(d*float(1<<3)); + return static_cast(d * 8.0f); +} + +float EQ12toFloat(int d) +{ + return static_cast(d) / 4.0f; +} + +int FloatToEQ12(float d) +{ + return static_cast((d + 2048.0f) * 4.0f) % 2048; +} + +float EQ10toFloat(int d) +{ + return static_cast(d) / 20.0f; +} + +int FloatToEQ10(float d) +{ + return static_cast(d * 20.0f); +} + +float EQSpeedRunToFloat(int d) +{ + return static_cast(d) / 40.0f; +} + +int FloatToEQSpeedRun(float d) +{ + return static_cast(d * 40.0f); } /* diff --git a/common/misc_functions.h b/common/misc_functions.h index 501244fda..9ecb08378 100644 --- a/common/misc_functions.h +++ b/common/misc_functions.h @@ -50,13 +50,22 @@ uint32 ResolveIP(const char* hostname, char* errbuf = 0); bool ParseAddress(const char* iAddress, uint32* oIP, uint16* oPort, char* errbuf = 0); void CoutTimestamp(bool ms = true); float EQ13toFloat(int d); -float NewEQ13toFloat(int d); float EQ19toFloat(int d); float EQHtoFloat(int d); int FloatToEQ13(float d); -int NewFloatToEQ13(float d); int FloatToEQ19(float d); int FloatToEQH(float d); + +float EQ12toFloat(int d); +int FloatToEQ12(float d); + +float EQ10toFloat(int d); +int FloatToEQ10(float d); + +// this is also a 10 bit float +float EQSpeedRunToFloat(int d); +int FloatToEQSpeedRun(float d); + uint32 SwapBits21and22(uint32 mask); uint32 Catch22(uint32 mask); diff --git a/common/patches/rof2_structs.h b/common/patches/rof2_structs.h index 5aa11977f..5d42d9046 100644 --- a/common/patches/rof2_structs.h +++ b/common/patches/rof2_structs.h @@ -400,7 +400,7 @@ struct Spawn_Struct_Position struct Spawn_Struct_Position { - signed padding0000:12; + signed angle:12; // pitch of camera? signed y:19; signed padding0001:1; @@ -416,7 +416,7 @@ struct Spawn_Struct_Position signed z:19; signed padding0020:3; - signed animation:10; // animation + signed animation:10; // SpeedRun signed deltaY:13; signed padding0023:9; }; diff --git a/common/version.h b/common/version.h index 928592a4a..412223b8c 100644 --- a/common/version.h +++ b/common/version.h @@ -30,7 +30,7 @@ Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt */ -#define CURRENT_BINARY_DATABASE_VERSION 9119 +#define CURRENT_BINARY_DATABASE_VERSION 9120 #ifdef BOTS #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9018 #else diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index 188db2162..4de5f3d8f 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -373,6 +373,7 @@ 9117|2018_02_01_NPC_Spells_Min_Max_HP.sql|SHOW COLUMNS FROM `npc_spells_entries` LIKE 'min_hp'|empty| 9118|2018_02_04_Charm_Stats.sql|SHOW COLUMNS FROM `npc_types` LIKE 'charm_ac'|empty| 9119|2018_02_10_GlobalLoot.sql|SHOW TABLES LIKE 'global_loot'|empty| +9120|2018_02_13_Heading.sql|SELECT value FROM variables WHERE varname = 'fixed_heading'|empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/utils/sql/git/required/2018_02_13_Heading.sql b/utils/sql/git/required/2018_02_13_Heading.sql new file mode 100644 index 000000000..4f4736625 --- /dev/null +++ b/utils/sql/git/required/2018_02_13_Heading.sql @@ -0,0 +1,3 @@ +UPDATE spawn2 SET heading = heading * 8.0 / 4.0; +UPDATE grid_entries SET heading = heading * 8.0 / 4.0 WHERE heading <> -1; +INSERT INTO variables (varname, value) VALUES ('fixed_heading', 1); -- hack diff --git a/zone/attack.cpp b/zone/attack.cpp index ce96675a0..58e1510ff 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -358,7 +358,7 @@ bool Mob::AvoidDamage(Mob *other, DamageHitInfo &hit) Mob *attacker = other; Mob *defender = this; - bool InFront = attacker->InFrontMob(this, attacker->GetX(), attacker->GetY()); + bool InFront = !attacker->BehindMob(this, attacker->GetX(), attacker->GetY()); /* This special ability adds a negative modifer to the defenders riposte/block/parry/chance @@ -3611,13 +3611,13 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const a->special = 2; else a->special = 0; - a->meleepush_xy = attacker ? attacker->GetHeading() * 2.0f : 0.0f; + a->meleepush_xy = attacker ? attacker->GetHeading() : 0.0f; if (RuleB(Combat, MeleePush) && damage > 0 && !IsRooted() && (IsClient() || zone->random.Roll(RuleI(Combat, MeleePushChance)))) { a->force = EQEmu::skills::GetSkillMeleePushForce(skill_used); // update NPC stuff - auto new_pos = glm::vec3(m_Position.x + (a->force * std::sin(a->meleepush_xy) + m_Delta.x), - m_Position.y + (a->force * std::cos(a->meleepush_xy) + m_Delta.y), m_Position.z); + auto new_pos = glm::vec3(m_Position.x + (a->force * std::cos(a->meleepush_xy) + m_Delta.x), + m_Position.y + (a->force * std::sin(a->meleepush_xy) + m_Delta.y), m_Position.z); if (zone->zonemap && zone->zonemap->CheckLoS(glm::vec3(m_Position), new_pos)) { // If we have LoS on the new loc it should be reachable. if (IsNPC()) { // Is this adequate? @@ -4445,6 +4445,12 @@ void Mob::DoRiposte(Mob *defender) if (!defender) return; + // so ahhh the angle you can riposte is larger than the angle you can hit :P + if (!defender->IsFacingMob(this)) { + defender->Message_StringID(MT_TooFarAway, CANT_SEE_TARGET); + return; + } + defender->Attack(this, EQEmu::inventory::slotPrimary, true); if (HasDied()) return; diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 42a78cdaa..2de71acc8 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -4402,7 +4402,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) return; } - auto boat_delta = glm::vec4(ppu->delta_x, ppu->delta_y, ppu->delta_z, ppu->delta_heading); + auto boat_delta = glm::vec4(ppu->delta_x, ppu->delta_y, ppu->delta_z, EQ10toFloat(ppu->delta_heading)); boat->SetDelta(boat_delta); auto outapp = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); @@ -4412,7 +4412,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) safe_delete(outapp); /* Update the boat's position on the server, without sending an update */ - boat->GMMove(ppu->x_pos, ppu->y_pos, ppu->z_pos, EQ19toFloat(ppu->heading), false); + boat->GMMove(ppu->x_pos, ppu->y_pos, ppu->z_pos, EQ12toFloat(ppu->heading), false); return; } else return; @@ -4557,7 +4557,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) } /* Update internal state */ - m_Delta = glm::vec4(ppu->delta_x, ppu->delta_y, ppu->delta_z, ppu->delta_heading); + m_Delta = glm::vec4(ppu->delta_x, ppu->delta_y, ppu->delta_z, EQ10toFloat(ppu->delta_heading)); if (IsTracking() && ((m_Position.x != ppu->x_pos) || (m_Position.y != ppu->y_pos))) { if (zone->random.Real(0, 100) < 70)//should be good @@ -4610,7 +4610,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) } } - float new_heading = EQ19toFloat(ppu->heading); + float new_heading = EQ12toFloat(ppu->heading); int32 new_animation = ppu->animation; /* Update internal server position from what the client has sent */ @@ -4629,7 +4629,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) if (is_client_moving || new_heading != m_Position.w || new_animation != animation) { animation = ppu->animation; - m_Position.w = EQ19toFloat(ppu->heading); + m_Position.w = EQ12toFloat(ppu->heading); /* Broadcast update to other clients */ auto outapp = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); diff --git a/zone/client_process.cpp b/zone/client_process.cpp index 21863dbd3..c5801044f 100644 --- a/zone/client_process.cpp +++ b/zone/client_process.cpp @@ -1960,57 +1960,40 @@ void Client::CalcRestState() { void Client::DoTracking() { - if(TrackingID == 0) + if (TrackingID == 0) return; Mob *m = entity_list.GetMob(TrackingID); - if(!m || m->IsCorpse()) - { + if (!m || m->IsCorpse()) { Message_StringID(MT_Skills, TRACK_LOST_TARGET); - TrackingID = 0; - return; } float RelativeHeading = GetHeading() - CalculateHeadingToTarget(m->GetX(), m->GetY()); - if(RelativeHeading < 0) - RelativeHeading += 256; + if (RelativeHeading < 0) + RelativeHeading += 512; - if((RelativeHeading <= 16) || (RelativeHeading >= 240)) - { + if (RelativeHeading > 480) Message_StringID(MT_Skills, TRACK_STRAIGHT_AHEAD, m->GetCleanName()); - } - else if((RelativeHeading > 16) && (RelativeHeading <= 48)) - { - Message_StringID(MT_Skills, TRACK_AHEAD_AND_TO, m->GetCleanName(), "right"); - } - else if((RelativeHeading > 48) && (RelativeHeading <= 80)) - { - Message_StringID(MT_Skills, TRACK_TO_THE, m->GetCleanName(), "right"); - } - else if((RelativeHeading > 80) && (RelativeHeading <= 112)) - { - Message_StringID(MT_Skills, TRACK_BEHIND_AND_TO, m->GetCleanName(), "right"); - } - else if((RelativeHeading > 112) && (RelativeHeading <= 144)) - { - Message_StringID(MT_Skills, TRACK_BEHIND_YOU, m->GetCleanName()); - } - else if((RelativeHeading > 144) && (RelativeHeading <= 176)) - { - Message_StringID(MT_Skills, TRACK_BEHIND_AND_TO, m->GetCleanName(), "left"); - } - else if((RelativeHeading > 176) && (RelativeHeading <= 208)) - { - Message_StringID(MT_Skills, TRACK_TO_THE, m->GetCleanName(), "left"); - } - else if((RelativeHeading > 208) && (RelativeHeading < 240)) - { + else if (RelativeHeading > 416) Message_StringID(MT_Skills, TRACK_AHEAD_AND_TO, m->GetCleanName(), "left"); - } + else if (RelativeHeading > 352) + Message_StringID(MT_Skills, TRACK_TO_THE, m->GetCleanName(), "left"); + else if (RelativeHeading > 288) + Message_StringID(MT_Skills, TRACK_BEHIND_AND_TO, m->GetCleanName(), "left"); + else if (RelativeHeading > 224) + Message_StringID(MT_Skills, TRACK_BEHIND_YOU, m->GetCleanName()); + else if (RelativeHeading > 160) + Message_StringID(MT_Skills, TRACK_BEHIND_AND_TO, m->GetCleanName(), "right"); + else if (RelativeHeading > 96) + Message_StringID(MT_Skills, TRACK_TO_THE, m->GetCleanName(), "right"); + else if (RelativeHeading > 32) + Message_StringID(MT_Skills, TRACK_AHEAD_AND_TO, m->GetCleanName(), "right"); + else if (RelativeHeading >= 0) + Message_StringID(MT_Skills, TRACK_STRAIGHT_AHEAD, m->GetCleanName()); } void Client::HandleRespawnFromHover(uint32 Option) diff --git a/zone/command.cpp b/zone/command.cpp index 7a4366a4f..179a37ded 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -8759,7 +8759,7 @@ void command_object(Client *c, const Seperator *sep) od.x = c->GetX(); od.y = c->GetY(); od.z = c->GetZ() - (c->GetSize() * 0.625f); - od.heading = c->GetHeading() * 2.0f; // GetHeading() is half of actual. Compensate by doubling. + od.heading = c->GetHeading(); std::string query; if (id) { @@ -8864,11 +8864,9 @@ void command_object(Client *c, const Seperator *sep) // Bump player back to avoid getting stuck inside new object - // GetHeading() returns half of the actual heading, for some reason, so we'll double it here for - // computation - x2 = 10.0f * sin(c->GetHeading() * 2.0f / 256.0f * 3.14159265f); - y2 = 10.0f * cos(c->GetHeading() * 2.0f / 256.0f * 3.14159265f); - c->MovePC(c->GetX() - x2, c->GetY() - y2, c->GetZ(), c->GetHeading() * 2); + x2 = 10.0f * sin(c->GetHeading() / 256.0f * 3.14159265f); + y2 = 10.0f * cos(c->GetHeading() / 256.0f * 3.14159265f); + c->MovePC(c->GetX() - x2, c->GetY() - y2, c->GetZ(), c->GetHeading()); c->Message(0, "Spawning object with tentative id %u at location (%.1f, %.1f, %.1f heading %.1f). Use " "'#object Save' to save to database when satisfied with placement.", @@ -9186,14 +9184,13 @@ void command_object(Client *c, const Seperator *sep) (c->GetSize() * 0.625f); // Compensate for #loc bumping up Z coordinate by 62.5% of character's size. - o->SetHeading(c->GetHeading() * 2.0f); // Compensate for GetHeading() returning half of actual + o->SetHeading(c->GetHeading()); // Bump player back to avoid getting stuck inside object - // GetHeading() returns half of the actual heading, for some reason - x2 = 10.0f * sin(c->GetHeading() * 2.0f / 256.0f * 3.14159265f); - y2 = 10.0f * cos(c->GetHeading() * 2.0f / 256.0f * 3.14159265f); - c->MovePC(c->GetX() - x2, c->GetY() - y2, c->GetZ(), c->GetHeading() * 2.0f); + x2 = 10.0f * std::sin(c->GetHeading() / 256.0f * 3.14159265f); + y2 = 10.0f * std::cos(c->GetHeading() / 256.0f * 3.14159265f); + c->MovePC(c->GetX() - x2, c->GetY() - y2, c->GetZ(), c->GetHeading()); } // Move to x, y, z [h] else { od.x = atof(sep->arg[3]); diff --git a/zone/mob.cpp b/zone/mob.cpp index 0c0e20d81..3e9aff746 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -1109,7 +1109,7 @@ void Mob::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) strn0cpy(ns->spawn.lastName, lastname, sizeof(ns->spawn.lastName)); } - ns->spawn.heading = FloatToEQ19(m_Position.w); + ns->spawn.heading = FloatToEQ12(m_Position.w); ns->spawn.x = FloatToEQ19(m_Position.x);//((int32)x_pos)<<3; ns->spawn.y = FloatToEQ19(m_Position.y);//((int32)y_pos)<<3; ns->spawn.z = FloatToEQ19(m_Position.z);//((int32)z_pos)<<3; @@ -1515,12 +1515,12 @@ void Mob::MakeSpawnUpdateNoDelta(PlayerPositionUpdateServer_Struct *spu) { spu->x_pos = FloatToEQ19(m_Position.x); spu->y_pos = FloatToEQ19(m_Position.y); spu->z_pos = FloatToEQ19(m_Position.z); - spu->delta_x = NewFloatToEQ13(0); - spu->delta_y = NewFloatToEQ13(0); - spu->delta_z = NewFloatToEQ13(0); - spu->heading = FloatToEQ19(m_Position.w); + spu->delta_x = FloatToEQ13(0); + spu->delta_y = FloatToEQ13(0); + spu->delta_z = FloatToEQ13(0); + spu->heading = FloatToEQ12(m_Position.w); spu->animation = 0; - spu->delta_heading = NewFloatToEQ13(0); + spu->delta_heading = FloatToEQ10(0); spu->padding0002 = 0; spu->padding0006 = 7; spu->padding0014 = 0x7f; @@ -1534,10 +1534,10 @@ void Mob::MakeSpawnUpdate(PlayerPositionUpdateServer_Struct* spu) { spu->x_pos = FloatToEQ19(m_Position.x); spu->y_pos = FloatToEQ19(m_Position.y); spu->z_pos = FloatToEQ19(m_Position.z); - spu->delta_x = NewFloatToEQ13(m_Delta.x); - spu->delta_y = NewFloatToEQ13(m_Delta.y); - spu->delta_z = NewFloatToEQ13(m_Delta.z); - spu->heading = FloatToEQ19(m_Position.w); + spu->delta_x = FloatToEQ13(m_Delta.x); + spu->delta_y = FloatToEQ13(m_Delta.y); + spu->delta_z = FloatToEQ13(m_Delta.z); + spu->heading = FloatToEQ12(m_Position.w); spu->padding0002 = 0; spu->padding0006 = 7; spu->padding0014 = 0x7f; @@ -1551,7 +1551,7 @@ void Mob::MakeSpawnUpdate(PlayerPositionUpdateServer_Struct* spu) { else spu->animation = pRunAnimSpeed;//animation; - spu->delta_heading = NewFloatToEQ13(m_Delta.w); + spu->delta_heading = FloatToEQ10(m_Delta.w); } void Mob::ShowStats(Client* client) @@ -2438,18 +2438,18 @@ float Mob::MobAngle(Mob *other, float ourx, float oury) const { float mobx = -(other->GetX()); // mob xloc (inverse because eq) float moby = other->GetY(); // mob yloc float heading = other->GetHeading(); // mob heading - heading = (heading * 360.0f) / 256.0f; // convert to degrees + heading = (heading * 360.0f) / 512.0f; // convert to degrees if (heading < 270) heading += 90; else heading -= 270; heading = heading * 3.1415f / 180.0f; // convert to radians - vectorx = mobx + (10.0f * cosf(heading)); // create a vector based on heading - vectory = moby + (10.0f * sinf(heading)); // of mob length 10 + vectorx = mobx + (10.0f * std::cos(heading)); // create a vector based on heading + vectory = moby + (10.0f * std::sin(heading)); // of mob length 10 // length of mob to player vector - lengthb = (float) sqrtf(((-ourx - mobx) * (-ourx - mobx)) + ((oury - moby) * (oury - moby))); + lengthb = (float) std::sqrt(((-ourx - mobx) * (-ourx - mobx)) + ((oury - moby) * (oury - moby))); // calculate dot product to get angle // Handle acos domain errors due to floating point rounding errors @@ -2462,7 +2462,7 @@ float Mob::MobAngle(Mob *other, float ourx, float oury) const { else if (dotp < -1) return 180.0f; - angle = acosf(dotp); + angle = std::acos(dotp); angle = angle * 180.0f / 3.1415f; return angle; @@ -2631,7 +2631,7 @@ bool Mob::PlotPositionAroundTarget(Mob* target, float &x_dest, float &y_dest, fl look_heading = target->GetHeading(); // Convert to sony heading to radians - look_heading = (look_heading / 256.0f) * 6.283184f; + look_heading = (look_heading / 512.0f) * 6.283184f; float tempX = 0; float tempY = 0; @@ -4676,16 +4676,16 @@ void Mob::DoKnockback(Mob *caster, uint32 pushback, uint32 pushup) spu->x_pos = FloatToEQ19(GetX()); spu->y_pos = FloatToEQ19(GetY()); spu->z_pos = FloatToEQ19(GetZ()); - spu->delta_x = NewFloatToEQ13(static_cast(new_x)); - spu->delta_y = NewFloatToEQ13(static_cast(new_y)); - spu->delta_z = NewFloatToEQ13(static_cast(pushup)); - spu->heading = FloatToEQ19(GetHeading()); + spu->delta_x = FloatToEQ13(static_cast(new_x)); + spu->delta_y = FloatToEQ13(static_cast(new_y)); + spu->delta_z = FloatToEQ13(static_cast(pushup)); + spu->heading = FloatToEQ12(GetHeading()); spu->padding0002 =0; spu->padding0006 =7; spu->padding0014 =0x7f; spu->padding0018 =0x5df27; spu->animation = 0; - spu->delta_heading = NewFloatToEQ13(0); + spu->delta_heading = FloatToEQ10(0); outapp_push->priority = 6; entity_list.QueueClients(this, outapp_push, true); CastToClient()->FastQueuePacket(&outapp_push); @@ -5003,7 +5003,7 @@ void Mob::DoGravityEffect() } if(IsClient()) - this->CastToClient()->MovePC(zone->GetZoneID(), zone->GetInstanceID(), cur_x, cur_y, new_ground, GetHeading()*2); // I know the heading thing is weird(chance of movepc to halve the heading value, too lazy to figure out why atm) + this->CastToClient()->MovePC(zone->GetZoneID(), zone->GetInstanceID(), cur_x, cur_y, new_ground, GetHeading()); else this->GMMove(cur_x, cur_y, new_ground, GetHeading()); } @@ -5640,8 +5640,7 @@ bool Mob::IsFacingMob(Mob *other) if (!other) return false; float angle = HeadingAngleToMob(other); - // what the client uses appears to be 2x our internal heading - float heading = GetHeading() * 2.0f; + float heading = GetHeading(); if (angle > 472.0 && heading < 40.0) angle = heading; @@ -5655,15 +5654,13 @@ bool Mob::IsFacingMob(Mob *other) } // All numbers derived from the client -float Mob::HeadingAngleToMob(Mob *other) +float Mob::HeadingAngleToMob(float other_x, float other_y) { - float mob_x = other->GetX(); - float mob_y = other->GetY(); float this_x = GetX(); float this_y = GetY(); - float y_diff = std::abs(this_y - mob_y); - float x_diff = std::abs(this_x - mob_x); + float y_diff = std::abs(this_y - other_y); + float x_diff = std::abs(this_x - other_x); if (y_diff < 0.0000009999999974752427) y_diff = 0.0000009999999974752427; @@ -5671,13 +5668,13 @@ float Mob::HeadingAngleToMob(Mob *other) // return the right thing based on relative quadrant // I'm sure this could be improved for readability, but whatever - if (this_y >= mob_y) { - if (mob_x >= this_x) + if (this_y >= other_y) { + if (other_x >= this_x) return (90.0f - angle + 90.0f) * 511.5f * 0.0027777778f; - if (mob_x <= this_x) + if (other_x <= this_x) return (angle + 180.0f) * 511.5f * 0.0027777778f; } - if (this_y > mob_y || mob_x > this_x) + if (this_y > other_y || other_x > this_x) return angle * 511.5f * 0.0027777778f; else return (90.0f - angle + 270.0f) * 511.5f * 0.0027777778f; diff --git a/zone/mob.h b/zone/mob.h index c223a45b4..23c0004df 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -177,7 +177,8 @@ public: inline bool InFrontMob(Mob *other = 0, float ourx = 0.0f, float oury = 0.0f) const { return (!other || other == this) ? true : MobAngle(other, ourx, oury) < 56.0f; } bool IsFacingMob(Mob *other); // kind of does the same as InFrontMob, but derived from client - float HeadingAngleToMob(Mob *other); // to keep consistent with client generated messages + float HeadingAngleToMob(Mob *other) { return HeadingAngleToMob(other->GetX(), other->GetY()); } + float HeadingAngleToMob(float other_x, float other_y); // to keep consistent with client generated messages virtual void RangedAttack(Mob* other) { } virtual void ThrowingAttack(Mob* other) { } // 13 = Primary (default), 14 = secondary @@ -970,7 +971,7 @@ public: inline bool IsBlind() { return spellbonuses.IsBlind; } inline bool CheckAggro(Mob* other) {return hate_list.IsEntOnHateList(other);} - float CalculateHeadingToTarget(float in_x, float in_y); + float CalculateHeadingToTarget(float in_x, float in_y) {return HeadingAngleToMob(in_x, in_y); } bool CalculateNewPosition(float x, float y, float z, int speed, bool checkZ = false, bool calcHeading = true); virtual bool CalculateNewPosition2(float x, float y, float z, int speed, bool checkZ = true, bool calcHeading = true); float CalculateDistance(float x, float y, float z); diff --git a/zone/position.cpp b/zone/position.cpp index 798ff145c..22885b4b1 100644 --- a/zone/position.cpp +++ b/zone/position.cpp @@ -150,13 +150,13 @@ float GetReciprocalHeading(const float heading) float result = 0; // Convert to radians - float h = (heading / 256.0f) * 6.283184f; + float h = (heading / 512.0f) * 6.283184f; // Calculate the reciprocal heading in radians result = h + 3.141592f; // Convert back to eq heading from radians - result = (result / 6.283184f) * 256.0f; + result = (result / 6.283184f) * 512.0f; return result; } diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 5f0305f3a..480479b2f 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -2115,16 +2115,16 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove spu->x_pos = FloatToEQ19(GetX()); spu->y_pos = FloatToEQ19(GetY()); spu->z_pos = FloatToEQ19(GetZ()); - spu->delta_x = NewFloatToEQ13(new_x); - spu->delta_y = NewFloatToEQ13(new_y); - spu->delta_z = NewFloatToEQ13(toss_amt); - spu->heading = FloatToEQ19(GetHeading()); + spu->delta_x = FloatToEQ13(new_x); + spu->delta_y = FloatToEQ13(new_y); + spu->delta_z = FloatToEQ13(toss_amt); + spu->heading = FloatToEQ12(GetHeading()); spu->padding0002 =0; spu->padding0006 =7; spu->padding0014 =0x7f; spu->padding0018 =0x5df27; spu->animation = 0; - spu->delta_heading = NewFloatToEQ13(0); + spu->delta_heading = FloatToEQ10(0); outapp_push->priority = 5; entity_list.QueueClients(this, outapp_push, true); if(IsClient()) @@ -2654,7 +2654,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove float new_ground = GetGroundZ(my_x, my_y); if(caster->IsClient()) - caster->CastToClient()->MovePC(zone->GetZoneID(), zone->GetInstanceID(), my_x, my_y, new_ground, GetHeading()*2); + caster->CastToClient()->MovePC(zone->GetZoneID(), zone->GetInstanceID(), my_x, my_y, new_ground, GetHeading()); else caster->GMMove(my_x, my_y, new_ground, GetHeading()); } diff --git a/zone/spells.cpp b/zone/spells.cpp index 8117a8018..78ef657aa 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -2646,7 +2646,7 @@ void Mob::BardPulse(uint16 spell_id, Mob *caster) { action->source = caster->GetID(); action->target = GetID(); action->spell = spell_id; - action->sequence = (uint32) (GetHeading() * 2); // just some random number + action->sequence = (uint32) (GetHeading()); // just some random number action->instrument_mod = caster->GetInstrumentMod(spell_id); action->buff_unknown = 0; action->level = buffs[buffs_i].casterlevel; @@ -2686,16 +2686,16 @@ void Mob::BardPulse(uint16 spell_id, Mob *caster) { spu->x_pos = FloatToEQ19(GetX()); spu->y_pos = FloatToEQ19(GetY()); spu->z_pos = FloatToEQ19(GetZ()); - spu->delta_x = NewFloatToEQ13(new_x); - spu->delta_y = NewFloatToEQ13(new_y); - spu->delta_z = NewFloatToEQ13(spells[spell_id].pushup); - spu->heading = FloatToEQ19(GetHeading()); + spu->delta_x = FloatToEQ13(new_x); + spu->delta_y = FloatToEQ13(new_y); + spu->delta_z = FloatToEQ13(spells[spell_id].pushup); + spu->heading = FloatToEQ12(GetHeading()); spu->padding0002 =0; spu->padding0006 =7; spu->padding0014 =0x7f; spu->padding0018 =0x5df27; spu->animation = 0; - spu->delta_heading = NewFloatToEQ13(0); + spu->delta_heading = FloatToEQ10(0); outapp_push->priority = 6; entity_list.QueueClients(this, outapp_push, true); CastToClient()->FastQueuePacket(&outapp_push); @@ -3530,7 +3530,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r action->level = caster_level; // caster level, for animation only action->type = 231; // 231 means a spell action->spell = spell_id; - action->sequence = (uint32) (GetHeading() * 2); // just some random number + action->sequence = (uint32) (GetHeading()); // just some random number action->instrument_mod = GetInstrumentMod(spell_id); action->buff_unknown = 0; @@ -3992,16 +3992,16 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r spu->x_pos = FloatToEQ19(spelltar->GetX()); spu->y_pos = FloatToEQ19(spelltar->GetY()); spu->z_pos = FloatToEQ19(spelltar->GetZ()); - spu->delta_x = NewFloatToEQ13(new_x); - spu->delta_y = NewFloatToEQ13(new_y); - spu->delta_z = NewFloatToEQ13(spells[spell_id].pushup); - spu->heading = FloatToEQ19(spelltar->GetHeading()); + spu->delta_x = FloatToEQ13(new_x); + spu->delta_y = FloatToEQ13(new_y); + spu->delta_z = FloatToEQ13(spells[spell_id].pushup); + spu->heading = FloatToEQ12(spelltar->GetHeading()); spu->padding0002 =0; spu->padding0006 =7; spu->padding0014 =0x7f; spu->padding0018 =0x5df27; spu->animation = 0; - spu->delta_heading = NewFloatToEQ13(0); + spu->delta_heading = FloatToEQ10(0); outapp_push->priority = 6; entity_list.QueueClients(this, outapp_push, true); spelltar->CastToClient()->FastQueuePacket(&outapp_push); @@ -5727,8 +5727,8 @@ void Mob::CalcDestFromHeading(float heading, float distance, float MaxZDiff, flo if (!distance) { return; } if (!MaxZDiff) { MaxZDiff = 5; } - float ReverseHeading = 256 - heading; - float ConvertAngle = ReverseHeading * 1.40625f; + float ReverseHeading = 512 - heading; + float ConvertAngle = ReverseHeading * 360.0f / 512.0f; if (ConvertAngle <= 270) ConvertAngle = ConvertAngle + 90; else @@ -5736,8 +5736,8 @@ void Mob::CalcDestFromHeading(float heading, float distance, float MaxZDiff, flo float Radian = ConvertAngle * (3.1415927f / 180.0f); - float CircleX = distance * cos(Radian); - float CircleY = distance * sin(Radian); + float CircleX = distance * std::cos(Radian); + float CircleY = distance * std::sin(Radian); dX = CircleX + StartX; dY = CircleY + StartY; dZ = FindGroundZ(dX, dY, MaxZDiff); @@ -5802,7 +5802,8 @@ void Mob::BeamDirectional(uint16 spell_id, int16 resist_adjust) maxtarget_count++; } - if (maxtarget_count >= spells[spell_id].aemaxtargets) + // not sure if we need this check, but probably do, need to check if it should be default limited or not + if (spells[spell_id].aemaxtargets && maxtarget_count >= spells[spell_id].aemaxtargets) return; } ++iter; @@ -5817,8 +5818,10 @@ void Mob::ConeDirectional(uint16 spell_id, int16 resist_adjust) if (IsBeneficialSpell(spell_id) && IsClient()) beneficial_targets = true; - float angle_start = spells[spell_id].directional_start + (GetHeading() * 360.0f / 256.0f); - float angle_end = spells[spell_id].directional_end + (GetHeading() * 360.0f / 256.0f); + float heading = GetHeading() * 360.0f / 512.0f; // convert to degrees + + float angle_start = spells[spell_id].directional_start + heading; + float angle_end = spells[spell_id].directional_end + heading; while (angle_start > 360.0f) angle_start -= 360.0f; @@ -5839,7 +5842,7 @@ void Mob::ConeDirectional(uint16 spell_id, int16 resist_adjust) } float heading_to_target = - (CalculateHeadingToTarget((*iter)->GetX(), (*iter)->GetY()) * 360.0f / 256.0f); + (CalculateHeadingToTarget((*iter)->GetX(), (*iter)->GetY()) * 360.0f / 512.0f); while (heading_to_target < 0.0f) heading_to_target += 360.0f; @@ -5883,7 +5886,8 @@ void Mob::ConeDirectional(uint16 spell_id, int16 resist_adjust) } } - if (maxtarget_count >= spells[spell_id].aemaxtargets) + // my SHM breath could hit all 5 dummies I could summon in arena + if (spells[spell_id].aemaxtargets && maxtarget_count >= spells[spell_id].aemaxtargets) return; ++iter; diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index 8f9c902bb..45d199277 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -435,27 +435,6 @@ float Mob::CalculateDistance(float x, float y, float z) { return (float)sqrtf(((m_Position.x - x)*(m_Position.x - x)) + ((m_Position.y - y)*(m_Position.y - y)) + ((m_Position.z - z)*(m_Position.z - z))); } -float Mob::CalculateHeadingToTarget(float in_x, float in_y) { - float angle; - - if (in_x - m_Position.x > 0) - angle = -90 + atan((float)(in_y - m_Position.y) / (float)(in_x - m_Position.x)) * 180 / M_PI; - else if (in_x - m_Position.x < 0) - angle = +90 + atan((float)(in_y - m_Position.y) / (float)(in_x - m_Position.x)) * 180 / M_PI; - else // Added? - { - if (in_y - m_Position.y > 0) - angle = 0; - else - angle = 180; - } - if (angle < 0) - angle += 360; - if (angle > 360) - angle -= 360; - return (256 * (360 - angle) / 360.0f); -} - bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, int speed, bool checkZ, bool calcHeading) { if (GetID() == 0) return true; From cbd68ff8c873c2641074bb3831bf5b3e6379c75d Mon Sep 17 00:00:00 2001 From: Akkadius Date: Fri, 16 Feb 2018 01:18:52 -0600 Subject: [PATCH 072/670] Add new heading format conversion routine - eqemu_server.pl quest_heading_convert --- utils/scripts/eqemu_server.pl | 142 +++++++++++++++++++++++++++++++++- 1 file changed, 141 insertions(+), 1 deletion(-) diff --git a/utils/scripts/eqemu_server.pl b/utils/scripts/eqemu_server.pl index c70862aaa..8921cf89f 100644 --- a/utils/scripts/eqemu_server.pl +++ b/utils/scripts/eqemu_server.pl @@ -776,6 +776,13 @@ sub show_menu_prompt { print "Enter a command #> "; $last_menu = trim($input); } + elsif($input eq "conversions"){ + print "\n>>> Conversions Menu\n\n"; + print " [quest_heading_convert] Converts old heading format in quest scripts to new (live format)\n"; + print " \n> main - go back to main menu\n"; + print "Enter a command #> "; + $last_menu = trim($input); + } elsif($input eq "assets"){ print "\n>>> Server Assets Menu\n\n"; print " [maps] Download latest maps\n"; @@ -784,7 +791,7 @@ sub show_menu_prompt { print " [plugins] Download latest plugins\n"; print " [lua_modules] Download latest lua_modules\n"; print " [utility_scripts] Download utility scripts to run and operate the EQEmu Server\n"; - if($OS eq "Windows"){ + if($OS eq "Windows") { print ">>> Windows\n"; print " [windows_server_download] Updates server via latest 'stable' code\n"; print " [windows_server_latest] Updates server via latest commit 'unstable'\n"; @@ -818,6 +825,7 @@ sub show_menu_prompt { elsif($input eq "new_server"){ new_server(); $dc = 1; } elsif($input eq "setup_bots"){ setup_bots(); $dc = 1; } elsif($input eq "linux_login_server_setup"){ do_linux_login_server_setup(); $dc = 1; } + elsif($input eq "quest_heading_convert"){ quest_heading_convert(); $dc = 1; } elsif($input eq "exit"){ exit; } @@ -868,6 +876,7 @@ sub print_main_menu { print " [assets] Manage server assets \n"; print " [new_server] New folder EQEmu/PEQ install - Assumes MySQL/Perl installed \n"; print " [setup_bots] Enables bots on server - builds code and database requirements \n"; + print " [conversions] Routines used for conversion of scripts/data \n"; print "\n"; print " exit \n"; print "\n"; @@ -2257,3 +2266,134 @@ sub generate_random_password { return $randpassword; } +sub quest_heading_convert { + + if(trim(get_mysql_result("SELECT value FROM variables WHERE varname = 'new_heading_conversion'")) eq "true") { + print "Conversion script has already ran... doing this again would skew proper heading values in function calls...\n"; + exit; + } + + %matches = ( + 0 => ["quest::spawn2", 6], + 1 => ["eq.spawn2", 6], + 2 => ["eq.unique_spawn", 6], + 3 => ["quest::unique_spawn", 6], + 4 => ["GMMove", 3], + 5 => ["MovePCInstance", 5], + 6 => ["MovePC", 4], + 7 => ["moveto", 3], + ); + + $total_matches = 0; + + use Scalar::Util qw(looks_like_number); + + my @files; + my $start_dir = "quests/."; + find( + sub { push @files, $File::Find::name unless -d; }, + $start_dir + ); + for my $file (@files) { + + #::: Skip non script files + if($file!~/lua|pl/i){ next; } + + if($file=~/lua|pl/i){ + $print_buffer = ""; + + $changes_made = 0; + + #::: Open and read line by line + open (FILE, $file); + while () { + chomp; + $line = $_; + + #::: Loop through matches + foreach my $key (sort(keys %matches)) { + $argument_position = $matches{$key}[1]; + $match = $matches{$key}[0]; + + if($line=~/$match/i) { + $line_temp = $line; + $line_temp =~s/$match\(//g; + $line_temp =~s/\(.*?\)//gs; + $line_temp =~s/\);.*//; + $line_temp =~s/\).*//; + $line_temp =~s/\):.*//; + $line_temp =~s/\);//g; + + @line_data = split(",", $line_temp); + + # use Data::Dumper; + # print Dumper(\@line_data); + + $heading_value = $line_data[$argument_position]; + $heading_value_clean = trim($heading_value); + $heading_value_raw = $line_data[$argument_position]; + $heading_value_before = $line_data[$argument_position - 1]; + + if (looks_like_number($heading_value) && $heading_value != 0 && ($heading_value * 2) <= 512) { + $heading_value_new = $heading_value * 2; + + $heading_value=~s/$heading_value_clean/$heading_value_new/g; + + $heading_value_search = quotemeta($heading_value_before . "," . $heading_value_raw); + $heading_value_replace = $heading_value_before . "," . $heading_value; + + print $file . "\n"; + print $line . "\n"; + $line=~s/$heading_value_search/$heading_value_replace/g; + print $line . "\n"; + print "\n"; + + $changes_made = 1; + } + elsif ($heading_value == 0){} #::: Do nothing + elsif ($heading_value=~/GetHeading|heading|\$h/i){} #::: Do nothing + else { + if ($file=~/\.pl/i) { + if($line_temp=~/#/i) { + $line .= " - needs_heading_validation"; + } + else { + $line .= " # needs_heading_validation"; + } + } + elsif ($file=~/\.lua/i) { + if($line_temp=~/--/i) { + $line .= " - needs_heading_validation"; + } + else { + $line .= " -- needs_heading_validation"; + } + } + + $changes_made = 1; + + print $line . "\n"; + } + + $total_matches++; + } + } + + $print_buffer .= $line . "\n"; + } + close (FILE); + + if($changes_made == 1) { + #::: Write changes + open (NEW_FILE, '>', $file); + print NEW_FILE $print_buffer; + close NEW_FILE; + } + } + } + + #::: Mark conversion as ran + print get_mysql_result("INSERT INTO `variables` (varname, value, information, ts) VALUES ('new_heading_conversion', 'true', 'Script ran against quests folder to convert new heading values', NOW())"); + + print "Total matches: " . $total_matches . "\n"; +} \ No newline at end of file From 27225b6047fe8f6b2839c6f270ec4cadf170d6f8 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Fri, 16 Feb 2018 15:38:17 -0500 Subject: [PATCH 073/670] Update changelog [skip ci] --- changelog.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 8daf85938..f515e8e49 100644 --- a/changelog.txt +++ b/changelog.txt @@ -5,7 +5,8 @@ mackal: Fix Heading -- Quests broken Please report any other issues with heading, most things were tested and worked -Run akkadius' script to fix your quests +You can use eqemu_server.pl to run a conversion to fix your headings in quests. +Some may need manual review. == 02/10/2018 == mackal: Add Global Loot system From 97bb50a5c4a9738f914be4b173a8af35b0bad758 Mon Sep 17 00:00:00 2001 From: Uleat Date: Sat, 17 Feb 2018 17:35:54 -0500 Subject: [PATCH 074/670] Fix for query failure on some systems --- utils/sql/git/required/2018_02_13_Heading.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/sql/git/required/2018_02_13_Heading.sql b/utils/sql/git/required/2018_02_13_Heading.sql index 4f4736625..e7869b575 100644 --- a/utils/sql/git/required/2018_02_13_Heading.sql +++ b/utils/sql/git/required/2018_02_13_Heading.sql @@ -1,3 +1,3 @@ UPDATE spawn2 SET heading = heading * 8.0 / 4.0; UPDATE grid_entries SET heading = heading * 8.0 / 4.0 WHERE heading <> -1; -INSERT INTO variables (varname, value) VALUES ('fixed_heading', 1); -- hack +INSERT INTO variables (varname, value, information) VALUES ('fixed_heading', 1, 'manifest heading fix hack'); -- hack From a493242c3c9e95f9f20ce9fd1aa3ab6c03459a93 Mon Sep 17 00:00:00 2001 From: Uleat Date: Sun, 18 Feb 2018 14:03:13 -0500 Subject: [PATCH 075/670] Fix and overhaul to bug reporting system --- changelog.txt | 8 + common/emu_constants.cpp | 65 ++++ common/emu_constants.h | 31 ++ common/eq_packet_structs.h | 70 +++-- common/patches/rof2_structs.h | 44 +-- common/patches/rof_structs.h | 44 +-- common/patches/sod.cpp | 19 -- common/patches/sod_ops.h | 1 - common/patches/sod_structs.h | 47 +-- common/patches/sof.cpp | 11 + common/patches/sof_ops.h | 1 + common/patches/sof_structs.h | 67 +++-- common/patches/titanium.cpp | 11 + common/patches/titanium_ops.h | 1 + common/patches/titanium_structs.h | 68 +++-- common/patches/uf_structs.h | 46 +-- common/ruletypes.h | 6 + common/version.h | 2 +- utils/sql/db_update_manifest.txt | 1 + .../git/required/2018_02_18_bug_reports.sql | 44 +++ zone/client_packet.cpp | 28 +- zone/zonedb.cpp | 280 +++++++++++++++--- zone/zonedb.h | 5 +- 23 files changed, 618 insertions(+), 282 deletions(-) create mode 100644 utils/sql/git/required/2018_02_18_bug_reports.sql diff --git a/changelog.txt b/changelog.txt index f515e8e49..12a9fc76a 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,13 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 02/18/2018 == +Uleat: Bug reporting fix and overhaul. + - Fixed bug reporting for SoD+ clients + - Added ability to disable bug reporting (set rule 'Bugs:ReportingSystemActive' to 'false') + - Implemented a more detailed reporting system (set rule 'Bugs:UseOldReportingMethod' to 'false') + -- New system is not currently compatible with script-based monitoring + - Soft-removal of defunct 'Petition Bug' system + == 02/14/2018 == mackal: Fix Heading -- Quests broken diff --git a/common/emu_constants.cpp b/common/emu_constants.cpp index a8fa73d1c..e5e9ae841 100644 --- a/common/emu_constants.cpp +++ b/common/emu_constants.cpp @@ -18,3 +18,68 @@ */ #include "emu_constants.h" + + +const char* EQEmu::bug::CategoryIDToCategoryName(CategoryID category_id) { + switch (category_id) { + case catVideo: + return "Video"; + case catAudio: + return "Audio"; + case catPathing: + return "Pathing"; + case catQuest: + return "Quest"; + case catTradeskills: + return "Tradeskills"; + case catSpellStacking: + return "Spell stacking"; + case catDoorsPortals: + return "Doors/Portals"; + case catItems: + return "Items"; + case catNPC: + return "NPC"; + case catDialogs: + return "Dialogs"; + case catLoNTCG: + return "LoN - TCG"; + case catMercenaries: + return "Mercenaries"; + case catOther: + default: + return "Other"; + } +} + +EQEmu::bug::CategoryID EQEmu::bug::CategoryNameToCategoryID(const char* category_name) { + if (!category_name) + return catOther; + + if (!strcmp(category_name, "Video")) + return catVideo; + if (!strcmp(category_name, "Audio")) + return catAudio; + if (!strcmp(category_name, "Pathing")) + return catPathing; + if (!strcmp(category_name, "Quest")) + return catQuest; + if (!strcmp(category_name, "Tradeskills")) + return catTradeskills; + if (!strcmp(category_name, "Spell stacking")) + return catSpellStacking; + if (!strcmp(category_name, "Doors/Portals")) + return catDoorsPortals; + if (!strcmp(category_name, "Items")) + return catItems; + if (!strcmp(category_name, "NPC")) + return catNPC; + if (!strcmp(category_name, "Dialogs")) + return catDialogs; + if (!strcmp(category_name, "LoN - TCG")) + return catLoNTCG; + if (!strcmp(category_name, "Mercenaries")) + return catMercenaries; + + return catOther; +} diff --git a/common/emu_constants.h b/common/emu_constants.h index e156fe98a..04e36849b 100644 --- a/common/emu_constants.h +++ b/common/emu_constants.h @@ -126,6 +126,37 @@ namespace EQEmu } /*constants*/ + namespace bug { + enum CategoryID : uint32 { + catOther = 0, + catVideo, + catAudio, + catPathing, + catQuest, + catTradeskills, + catSpellStacking, + catDoorsPortals, + catItems, + catNPC, + catDialogs, + catLoNTCG, + catMercenaries + }; + + enum OptionalInfoFlag : uint32 { + infoNoOptionalInfo = 0x0, + infoCanDuplicate = 0x1, + infoCrashBug = 0x2, + infoTargetInfo = 0x4, + infoCharacterFlags = 0x8, + infoUnknownValue = 0xFFFFFFF0 + }; + + const char* CategoryIDToCategoryName(CategoryID category_id); + CategoryID CategoryNameToCategoryID(const char* category_name); + + } // namespace bug + enum class CastingSlot : uint32 { Gem1 = 0, Gem2 = 1, diff --git a/common/eq_packet_structs.h b/common/eq_packet_structs.h index 8452813f5..8b8949255 100644 --- a/common/eq_packet_structs.h +++ b/common/eq_packet_structs.h @@ -3323,23 +3323,32 @@ struct GuildMakeLeader{ char target[64]; }; -struct BugStruct{ -/*0000*/ char chartype[64]; -/*0064*/ char name[96]; -/*0160*/ char ui[128]; -/*0288*/ float x; -/*0292*/ float y; -/*0296*/ float z; -/*0300*/ float heading; -/*0304*/ uint32 unknown304; -/*0308*/ char unknown308[160]; -/*0468*/ char target_name[64]; -/*0532*/ uint32 type; -/*0536*/ char unknown536[2052]; -/*2584*/ char bug[2048]; -/*4632*/ char unknown4632[6]; -/*4638*/ char system_info[4094]; +struct BugReport_Struct { +/*0000*/ uint32 category_id; +/*0004*/ char category_name[64]; +/*0068*/ char reporter_name[64]; +/*0132*/ char unused_0132[32]; +/*0164*/ char ui_path[128]; +/*0292*/ float pos_x; +/*0296*/ float pos_y; +/*0300*/ float pos_z; +/*0304*/ uint32 heading; +/*0308*/ uint32 unused_0308; +/*0312*/ uint32 time_played; +/*0316*/ char padding_0316[8]; +/*0324*/ uint32 target_id; +/*0328*/ char padding_0328[140]; +/*0468*/ uint32 unknown_0468; // seems to always be '0' +/*0472*/ char target_name[64]; +/*0536*/ uint32 optional_info_mask; + +// this looks like a butchered 8k buffer with 2 trailing dword fields +/*0540*/ char unused_0540[2052]; +/*2592*/ char bug_report[2050]; +/*4642*/ char system_info[4098]; +/*8740*/ }; + struct Make_Pet_Struct { //Simple struct for getting pet info uint8 level; uint8 class_; @@ -3366,20 +3375,21 @@ struct Ground_Spawn{ struct Ground_Spawns { struct Ground_Spawn spawn[50]; //Assigned max number to allow }; -struct PetitionBug_Struct{ - uint32 petition_number; - uint32 unknown4; - char accountname[64]; - uint32 zoneid; - char name[64]; - uint32 level; - uint32 class_; - uint32 race; - uint32 unknown152[3]; - uint32 time; - uint32 unknown168; - char text[1028]; -}; + +//struct PetitionBug_Struct{ +// uint32 petition_number; +// uint32 unknown4; +// char accountname[64]; +// uint32 zoneid; +// char name[64]; +// uint32 level; +// uint32 class_; +// uint32 race; +// uint32 unknown152[3]; +// uint32 time; +// uint32 unknown168; +// char text[1028]; +//}; struct ApproveZone_Struct { char name[64]; diff --git a/common/patches/rof2_structs.h b/common/patches/rof2_structs.h index 5d42d9046..ecc288a35 100644 --- a/common/patches/rof2_structs.h +++ b/common/patches/rof2_structs.h @@ -3605,21 +3605,6 @@ struct GuildSetRank_Struct /*80*/ }; -struct BugStruct{ -/*0000*/ char chartype[64]; -/*0064*/ char name[96]; -/*0160*/ char ui[128]; -/*0288*/ float x; -/*0292*/ float y; -/*0296*/ float z; -/*0300*/ float heading; -/*0304*/ uint32 unknown304; -/*0308*/ uint32 type; -/*0312*/ char unknown312[2144]; -/*2456*/ char bug[1024]; -/*3480*/ char placeholder[2]; -/*3482*/ char system_info[4098]; -}; struct Make_Pet_Struct { //Simple struct for getting pet info uint8 level; uint8 class_; @@ -3646,20 +3631,21 @@ struct Ground_Spawn{ struct Ground_Spawns { struct Ground_Spawn spawn[50]; //Assigned max number to allow }; -struct PetitionBug_Struct{ - uint32 petition_number; - uint32 unknown4; - char accountname[64]; - uint32 zoneid; - char name[64]; - uint32 level; - uint32 class_; - uint32 race; - uint32 unknown152[3]; - uint32 time; - uint32 unknown168; - char text[1028]; -}; + +//struct PetitionBug_Struct{ +// uint32 petition_number; +// uint32 unknown4; +// char accountname[64]; +// uint32 zoneid; +// char name[64]; +// uint32 level; +// uint32 class_; +// uint32 race; +// uint32 unknown152[3]; +// uint32 time; +// uint32 unknown168; +// char text[1028]; +//}; struct ApproveZone_Struct { char name[64]; diff --git a/common/patches/rof_structs.h b/common/patches/rof_structs.h index 8de4fb9ab..bd9cbbce9 100644 --- a/common/patches/rof_structs.h +++ b/common/patches/rof_structs.h @@ -3545,21 +3545,6 @@ struct GuildSetRank_Struct /*80*/ }; -struct BugStruct{ -/*0000*/ char chartype[64]; -/*0064*/ char name[96]; -/*0160*/ char ui[128]; -/*0288*/ float x; -/*0292*/ float y; -/*0296*/ float z; -/*0300*/ float heading; -/*0304*/ uint32 unknown304; -/*0308*/ uint32 type; -/*0312*/ char unknown312[2144]; -/*2456*/ char bug[1024]; -/*3480*/ char placeholder[2]; -/*3482*/ char system_info[4098]; -}; struct Make_Pet_Struct { //Simple struct for getting pet info uint8 level; uint8 class_; @@ -3586,20 +3571,21 @@ struct Ground_Spawn{ struct Ground_Spawns { struct Ground_Spawn spawn[50]; //Assigned max number to allow }; -struct PetitionBug_Struct{ - uint32 petition_number; - uint32 unknown4; - char accountname[64]; - uint32 zoneid; - char name[64]; - uint32 level; - uint32 class_; - uint32 race; - uint32 unknown152[3]; - uint32 time; - uint32 unknown168; - char text[1028]; -}; + +//struct PetitionBug_Struct{ +// uint32 petition_number; +// uint32 unknown4; +// char accountname[64]; +// uint32 zoneid; +// char name[64]; +// uint32 level; +// uint32 class_; +// uint32 race; +// uint32 unknown152[3]; +// uint32 time; +// uint32 unknown168; +// char text[1028]; +//}; struct ApproveZone_Struct { char name[64]; diff --git a/common/patches/sod.cpp b/common/patches/sod.cpp index a77feedbc..ceba224f4 100644 --- a/common/patches/sod.cpp +++ b/common/patches/sod.cpp @@ -2933,25 +2933,6 @@ namespace SoD FINISH_DIRECT_DECODE(); } - DECODE(OP_Bug) - { - DECODE_LENGTH_EXACT(structs::BugStruct); - SETUP_DIRECT_DECODE(BugStruct, structs::BugStruct); - - strn0cpy(emu->chartype, eq->chartype, sizeof(emu->chartype)); - strn0cpy(emu->name, eq->name, sizeof(emu->name)); - strn0cpy(emu->ui, eq->ui, sizeof(emu->ui)); - IN(x); - IN(y); - IN(z); - IN(heading); - strn0cpy(emu->target_name, eq->target_name, sizeof(emu->target_name)); - strn0cpy(emu->bug, eq->bug, sizeof(emu->bug)); - strn0cpy(emu->system_info, eq->system_info, sizeof(emu->system_info)); - - FINISH_DIRECT_DECODE(); - } - DECODE(OP_CastSpell) { DECODE_LENGTH_EXACT(structs::CastSpell_Struct); diff --git a/common/patches/sod_ops.h b/common/patches/sod_ops.h index 90c28b2eb..7c1109499 100644 --- a/common/patches/sod_ops.h +++ b/common/patches/sod_ops.h @@ -104,7 +104,6 @@ D(OP_AugmentInfo) D(OP_AugmentItem) D(OP_BazaarSearch) D(OP_Buff) -D(OP_Bug) D(OP_CastSpell) D(OP_ChannelMessage) D(OP_CharacterCreate) diff --git a/common/patches/sod_structs.h b/common/patches/sod_structs.h index 88a78c6ee..76635108d 100644 --- a/common/patches/sod_structs.h +++ b/common/patches/sod_structs.h @@ -3008,24 +3008,6 @@ struct GuildMakeLeader{ char target[64]; }; -struct BugStruct{ -/*0000*/ uint32 type1; //seems to be just a different way of seeing type; seems to be ordered completely differently -/*0004*/ char chartype[64]; -/*0068*/ char name[96]; -/*0164*/ char ui[128]; -/*0292*/ float x; -/*0296*/ float y; -/*0300*/ float z; -/*0304*/ float heading; -/*0308*/ uint32 unknown304; -/*0312*/ char unknown308[160]; -/*0472*/ char target_name[64]; -/*0536*/ uint32 type; -/*0540*/ char unknown536[2052]; -/*2588*/ char bug[2048]; -/*4636*/ char unknown4632[6]; -/*4642*/ char system_info[4094]; -}; struct Make_Pet_Struct { //Simple struct for getting pet info uint8 level; uint8 class_; @@ -3052,20 +3034,21 @@ struct Ground_Spawn{ struct Ground_Spawns { struct Ground_Spawn spawn[50]; //Assigned max number to allow }; -struct PetitionBug_Struct{ - uint32 petition_number; - uint32 unknown4; - char accountname[64]; - uint32 zoneid; - char name[64]; - uint32 level; - uint32 class_; - uint32 race; - uint32 unknown152[3]; - uint32 time; - uint32 unknown168; - char text[1028]; -}; + +//struct PetitionBug_Struct{ +// uint32 petition_number; +// uint32 unknown4; +// char accountname[64]; +// uint32 zoneid; +// char name[64]; +// uint32 level; +// uint32 class_; +// uint32 race; +// uint32 unknown152[3]; +// uint32 time; +// uint32 unknown168; +// char text[1028]; +//}; struct ApproveZone_Struct { char name[64]; diff --git a/common/patches/sof.cpp b/common/patches/sof.cpp index 9df6ca1df..bee75b6c2 100644 --- a/common/patches/sof.cpp +++ b/common/patches/sof.cpp @@ -2385,6 +2385,17 @@ namespace SoF FINISH_DIRECT_DECODE(); } + DECODE(OP_Bug) + { + DECODE_LENGTH_EXACT(structs::BugReport_Struct); + SETUP_DIRECT_DECODE(BugReport_Struct, structs::BugReport_Struct); + + emu->category_id = EQEmu::bug::CategoryNameToCategoryID(eq->category_name); + memcpy(emu->category_name, eq, sizeof(structs::BugReport_Struct)); + + FINISH_DIRECT_DECODE(); + } + DECODE(OP_CastSpell) { DECODE_LENGTH_EXACT(structs::CastSpell_Struct); diff --git a/common/patches/sof_ops.h b/common/patches/sof_ops.h index 180857388..c4e42d8d4 100644 --- a/common/patches/sof_ops.h +++ b/common/patches/sof_ops.h @@ -95,6 +95,7 @@ D(OP_ApplyPoison) D(OP_AugmentInfo) D(OP_AugmentItem) D(OP_Buff) +D(OP_Bug) D(OP_CastSpell) D(OP_ChannelMessage) D(OP_CharacterCreate) diff --git a/common/patches/sof_structs.h b/common/patches/sof_structs.h index 9d87bd83a..ca1c93ed2 100644 --- a/common/patches/sof_structs.h +++ b/common/patches/sof_structs.h @@ -2906,23 +2906,31 @@ struct GuildMakeLeader{ char target[64]; }; +struct BugReport_Struct { +/*0000*/ char category_name[64]; +/*0064*/ char character_name[64]; +/*0128*/ char unused_0128[32]; +/*0160*/ char ui_path[128]; +/*0288*/ float pos_x; +/*0292*/ float pos_y; +/*0296*/ float pos_z; +/*0300*/ uint32 heading; +/*0304*/ uint32 unused_0304; +/*0308*/ uint32 time_played; +/*0312*/ char padding_0312[8]; +/*0320*/ uint32 target_id; +/*0324*/ char padding_0324[140]; +/*0464*/ uint32 unknown_0464; // seems to always be '0' +/*0468*/ char target_name[64]; +/*0532*/ uint32 optional_info_mask; - -struct BugStruct{ -/*0000*/ char chartype[64]; -/*0064*/ char name[96]; -/*0160*/ char ui[128]; -/*0288*/ float x; -/*0292*/ float y; -/*0296*/ float z; -/*0300*/ float heading; -/*0304*/ uint32 unknown304; -/*0308*/ uint32 type; -/*0312*/ char unknown312[2144]; -/*2456*/ char bug[1024]; -/*3480*/ char placeholder[2]; -/*3482*/ char system_info[4098]; +// this looks like a butchered 8k buffer with 2 trailing dword fields +/*0536*/ char unused_0536[2052]; +/*2588*/ char bug_report[2050]; +/*4638*/ char system_info[4098]; +/*8736*/ }; + struct Make_Pet_Struct { //Simple struct for getting pet info uint8 level; uint8 class_; @@ -2949,20 +2957,21 @@ struct Ground_Spawn{ struct Ground_Spawns { struct Ground_Spawn spawn[50]; //Assigned max number to allow }; -struct PetitionBug_Struct{ - uint32 petition_number; - uint32 unknown4; - char accountname[64]; - uint32 zoneid; - char name[64]; - uint32 level; - uint32 class_; - uint32 race; - uint32 unknown152[3]; - uint32 time; - uint32 unknown168; - char text[1028]; -}; + +//struct PetitionBug_Struct{ +// uint32 petition_number; +// uint32 unknown4; +// char accountname[64]; +// uint32 zoneid; +// char name[64]; +// uint32 level; +// uint32 class_; +// uint32 race; +// uint32 unknown152[3]; +// uint32 time; +// uint32 unknown168; +// char text[1028]; +//}; struct ApproveZone_Struct { char name[64]; diff --git a/common/patches/titanium.cpp b/common/patches/titanium.cpp index 45f267223..2c010713d 100644 --- a/common/patches/titanium.cpp +++ b/common/patches/titanium.cpp @@ -1789,6 +1789,17 @@ namespace Titanium FINISH_DIRECT_DECODE(); } + DECODE(OP_Bug) + { + DECODE_LENGTH_EXACT(structs::BugReport_Struct); + SETUP_DIRECT_DECODE(BugReport_Struct, structs::BugReport_Struct); + + emu->category_id = EQEmu::bug::CategoryNameToCategoryID(eq->category_name); + memcpy(emu->category_name, eq, sizeof(structs::BugReport_Struct)); + + FINISH_DIRECT_DECODE(); + } + DECODE(OP_CastSpell) { DECODE_LENGTH_EXACT(structs::CastSpell_Struct); diff --git a/common/patches/titanium_ops.h b/common/patches/titanium_ops.h index 9f77a7077..dafb8b903 100644 --- a/common/patches/titanium_ops.h +++ b/common/patches/titanium_ops.h @@ -78,6 +78,7 @@ D(OP_AdventureMerchantSell) D(OP_ApplyPoison) D(OP_AugmentItem) D(OP_Buff) +D(OP_Bug) D(OP_CastSpell) D(OP_ChannelMessage) D(OP_CharacterCreate) diff --git a/common/patches/titanium_structs.h b/common/patches/titanium_structs.h index e52b7628c..41f029c8d 100644 --- a/common/patches/titanium_structs.h +++ b/common/patches/titanium_structs.h @@ -2571,21 +2571,32 @@ struct GuildMakeLeader{ char name[64]; char target[64]; }; -struct BugStruct{ -/*0000*/ char chartype[64]; -/*0064*/ char name[96]; -/*0160*/ char ui[128]; -/*0288*/ float x; -/*0292*/ float y; -/*0296*/ float z; -/*0300*/ float heading; -/*0304*/ uint32 unknown304; -/*0308*/ uint32 type; -/*0312*/ char unknown312[2144]; -/*2456*/ char bug[1024]; -/*3480*/ char placeholder[2]; -/*3482*/ char system_info[4098]; + +struct BugReport_Struct { +/*0000*/ char category_name[64]; +/*0064*/ char character_name[64]; +/*0128*/ char unused_0128[32]; +/*0160*/ char ui_path[128]; +/*0288*/ float pos_x; +/*0292*/ float pos_y; +/*0296*/ float pos_z; +/*0300*/ uint32 heading; +/*0304*/ uint32 unused_0304; +/*0308*/ uint32 time_played; +/*0312*/ char padding_0312[8]; +/*0320*/ uint32 target_id; +/*0324*/ char padding_0324[140]; +/*0464*/ uint32 unknown_0464; // seems to always be '0' +/*0468*/ char target_name[64]; +/*0532*/ uint32 optional_info_mask; + +// this looks like a butchered 8k buffer with 2 trailing dword fields +/*0536*/ char unused_0536[2052]; +/*2588*/ char bug_report[2050]; +/*4638*/ char system_info[4098]; +/*8736*/ }; + struct Make_Pet_Struct { //Simple struct for getting pet info uint8 level; uint8 class_; @@ -2612,20 +2623,21 @@ struct Ground_Spawn{ struct Ground_Spawns { struct Ground_Spawn spawn[50]; //Assigned max number to allow }; -struct PetitionBug_Struct{ - uint32 petition_number; - uint32 unknown4; - char accountname[64]; - uint32 zoneid; - char name[64]; - uint32 level; - uint32 class_; - uint32 race; - uint32 unknown152[3]; - uint32 time; - uint32 unknown168; - char text[1028]; -}; + +//struct PetitionBug_Struct{ +// uint32 petition_number; +// uint32 unknown4; +// char accountname[64]; +// uint32 zoneid; +// char name[64]; +// uint32 level; +// uint32 class_; +// uint32 race; +// uint32 unknown152[3]; +// uint32 time; +// uint32 unknown168; +// char text[1028]; +//}; struct ApproveZone_Struct { char name[64]; diff --git a/common/patches/uf_structs.h b/common/patches/uf_structs.h index cc5564e11..b10e3a3dd 100644 --- a/common/patches/uf_structs.h +++ b/common/patches/uf_structs.h @@ -3060,23 +3060,6 @@ struct GuildMakeLeader{ char target[64]; }; - - -struct BugStruct{ -/*0000*/ char chartype[64]; -/*0064*/ char name[96]; -/*0160*/ char ui[128]; -/*0288*/ float x; -/*0292*/ float y; -/*0296*/ float z; -/*0300*/ float heading; -/*0304*/ uint32 unknown304; -/*0308*/ uint32 type; -/*0312*/ char unknown312[2144]; -/*2456*/ char bug[1024]; -/*3480*/ char placeholder[2]; -/*3482*/ char system_info[4098]; -}; struct Make_Pet_Struct { //Simple struct for getting pet info uint8 level; uint8 class_; @@ -3103,20 +3086,21 @@ struct Ground_Spawn{ struct Ground_Spawns { struct Ground_Spawn spawn[50]; //Assigned max number to allow }; -struct PetitionBug_Struct{ - uint32 petition_number; - uint32 unknown4; - char accountname[64]; - uint32 zoneid; - char name[64]; - uint32 level; - uint32 class_; - uint32 race; - uint32 unknown152[3]; - uint32 time; - uint32 unknown168; - char text[1028]; -}; + +//struct PetitionBug_Struct{ +// uint32 petition_number; +// uint32 unknown4; +// char accountname[64]; +// uint32 zoneid; +// char name[64]; +// uint32 level; +// uint32 class_; +// uint32 race; +// uint32 unknown152[3]; +// uint32 time; +// uint32 unknown168; +// char text[1028]; +//}; struct ApproveZone_Struct { char name[64]; diff --git a/common/ruletypes.h b/common/ruletypes.h index 24d9e809b..219995913 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -720,6 +720,12 @@ RULE_BOOL(Client, UseLiveFactionMessage, false) // Allows players to see faction RULE_BOOL(Client, UseLiveBlockedMessage, false) // Allows players to see faction adjustments like Live RULE_CATEGORY_END() +RULE_CATEGORY(Bugs) +RULE_BOOL(Bugs, ReportingSystemActive, true) // Activates bug reporting +RULE_BOOL(Bugs, UseOldReportingMethod, true) // Forces the use of the old bug reporting system +RULE_BOOL(Bugs, DumpTargetEntity, false) // Dumps the target entity, if one is provided +RULE_CATEGORY_END() + #undef RULE_CATEGORY #undef RULE_INT #undef RULE_REAL diff --git a/common/version.h b/common/version.h index 412223b8c..d1afd9744 100644 --- a/common/version.h +++ b/common/version.h @@ -30,7 +30,7 @@ Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt */ -#define CURRENT_BINARY_DATABASE_VERSION 9120 +#define CURRENT_BINARY_DATABASE_VERSION 9121 #ifdef BOTS #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9018 #else diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index 4de5f3d8f..2a0b12fd2 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -374,6 +374,7 @@ 9118|2018_02_04_Charm_Stats.sql|SHOW COLUMNS FROM `npc_types` LIKE 'charm_ac'|empty| 9119|2018_02_10_GlobalLoot.sql|SHOW TABLES LIKE 'global_loot'|empty| 9120|2018_02_13_Heading.sql|SELECT value FROM variables WHERE varname = 'fixed_heading'|empty| +9121|2018_02_18_bug_reports.sql|SHOW TABLES LIKE 'bug_reports'|empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/utils/sql/git/required/2018_02_18_bug_reports.sql b/utils/sql/git/required/2018_02_18_bug_reports.sql new file mode 100644 index 000000000..92afbd7c9 --- /dev/null +++ b/utils/sql/git/required/2018_02_18_bug_reports.sql @@ -0,0 +1,44 @@ +CREATE TABLE `bug_reports` ( + `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, + `zone` VARCHAR(32) NOT NULL DEFAULT 'Unknown', + `client_version_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `client_version_name` VARCHAR(24) NOT NULL DEFAULT 'Unknown', + `account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `character_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `character_name` VARCHAR(64) NOT NULL DEFAULT 'Unknown', + `reporter_spoof` TINYINT(1) NOT NULL DEFAULT '1', + `category_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `category_name` VARCHAR(64) NOT NULL DEFAULT 'Other', + `reporter_name` VARCHAR(64) NOT NULL DEFAULT 'Unknown', + `ui_path` VARCHAR(128) NOT NULL DEFAULT 'Unknown', + `pos_x` FLOAT NOT NULL DEFAULT '0', + `pos_y` FLOAT NOT NULL DEFAULT '0', + `pos_z` FLOAT NOT NULL DEFAULT '0', + `heading` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `time_played` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `target_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `target_name` VARCHAR(64) NOT NULL DEFAULT 'Unknown', + `optional_info_mask` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `_can_duplicate` TINYINT(1) NOT NULL DEFAULT '0', + `_crash_bug` TINYINT(1) NOT NULL DEFAULT '0', + `_target_info` TINYINT(1) NOT NULL DEFAULT '0', + `_character_flags` TINYINT(1) NOT NULL DEFAULT '0', + `_unknown_value` TINYINT(1) NOT NULL DEFAULT '0', + `bug_report` VARCHAR(1024) NOT NULL DEFAULT '', + `system_info` VARCHAR(1024) NOT NULL DEFAULT '', + `report_datetime` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + `bug_status` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', + `last_review` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `last_reviewer` VARCHAR(64) NOT NULL DEFAULT 'None', + `reviewer_notes` VARCHAR(1024) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + UNIQUE INDEX `id` (`id`) +) +COLLATE='utf8_general_ci' +ENGINE=InnoDB +; + +INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES +(1, 'Bugs:ReportingSystemActive', 'true', 'Activates bug reporting'), +(1, 'Bugs:UseOldReportingMethod', 'true', 'Forces the use of the old bug reporting system'), +(1, 'Bugs:DumpTargetEntity', 'false', 'Dumps the target entity, if one is provided'); diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 2de71acc8..07085ee71 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -3960,12 +3960,23 @@ void Client::Handle_OP_BuffRemoveRequest(const EQApplicationPacket *app) void Client::Handle_OP_Bug(const EQApplicationPacket *app) { - if (app->size != sizeof(BugStruct)) - printf("Wrong size of BugStruct got %d expected %zu!\n", app->size, sizeof(BugStruct)); - else { - BugStruct* bug = (BugStruct*)app->pBuffer; - database.UpdateBug(bug); + if (!RuleB(Bugs, ReportingSystemActive)) { + Message(0, "Bug reporting is disabled on this server."); + return; } + + if (app->size != sizeof(BugReport_Struct)) { + printf("Wrong size of BugReport_Struct got %d expected %zu!\n", app->size, sizeof(BugReport_Struct)); + } + else { + BugReport_Struct* bug_report = (BugReport_Struct*)app->pBuffer; + + if (RuleB(Bugs, UseOldReportingMethod)) + database.RegisterBug(bug_report); + else + database.RegisterBug(this, bug_report); + } + return; } @@ -10553,11 +10564,8 @@ void Client::Handle_OP_Petition(const EQApplicationPacket *app) void Client::Handle_OP_PetitionBug(const EQApplicationPacket *app) { - if (app->size != sizeof(PetitionBug_Struct)) - printf("Wrong size of BugStruct! Expected: %zu, Got: %i\n", sizeof(PetitionBug_Struct), app->size); - else { - Message(0, "Petition Bugs are not supported, please use /bug."); - } + Message(0, "Petition Bugs are not supported, please use /bug."); + return; } diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index 01add9944..d5db09a53 100644 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -325,62 +325,260 @@ bool ZoneDatabase::logevents(const char* accountname,uint32 accountid,uint8 stat return true; } +void ZoneDatabase::RegisterBug(BugReport_Struct* bug_report) { + if (!bug_report) + return; -void ZoneDatabase::UpdateBug(BugStruct* bug) { - - uint32 len = strlen(bug->bug); - char* bugtext = nullptr; - if(len > 0) - { - bugtext = new char[2*len+1]; - memset(bugtext, 0, 2*len+1); - DoEscapeString(bugtext, bug->bug, len); + size_t len = 0; + char* name_ = nullptr; + char* ui_ = nullptr; + char* type_ = nullptr; + char* target_ = nullptr; + char* bug_ = nullptr; + + len = strlen(bug_report->reporter_name); + if (len) { + if (len > 63) // check against db column size + len = 63; + name_ = new char[(2 * len + 1)]; + memset(name_, 0, (2 * len + 1)); + DoEscapeString(name_, bug_report->reporter_name, len); } - len = strlen(bug->ui); - char* uitext = nullptr; - if(len > 0) - { - uitext = new char[2*len+1]; - memset(uitext, 0, 2*len+1); - DoEscapeString(uitext, bug->ui, len); + len = strlen(bug_report->ui_path); + if (len) { + if (len > 127) + len = 127; + ui_ = new char[(2 * len + 1)]; + memset(ui_, 0, (2 * len + 1)); + DoEscapeString(ui_, bug_report->ui_path, len); } - len = strlen(bug->target_name); - char* targettext = nullptr; - if(len > 0) - { - targettext = new char[2*len+1]; - memset(targettext, 0, 2*len+1); - DoEscapeString(targettext, bug->target_name, len); + len = strlen(bug_report->category_name); + if (len) { + if (len > 63) + len = 63; + type_ = new char[(2 * len + 1)]; + memset(type_, 0, (2 * len + 1)); + DoEscapeString(type_, bug_report->category_name, len); } - //x and y are intentionally swapped because eq is inversexy coords - std::string query = StringFormat("INSERT INTO bugs (zone, name, ui, x, y, z, type, flag, target, bug, date) " + len = strlen(bug_report->target_name); + if (len) { + if (len > 63) + len = 63; + target_ = new char[(2 * len + 1)]; + memset(target_, 0, (2 * len + 1)); + DoEscapeString(target_, bug_report->target_name, len); + } + + len = strlen(bug_report->bug_report); + if (len) { + if (len > 1023) + len = 1023; + bug_ = new char[(2 * len + 1)]; + memset(bug_, 0, (2 * len + 1)); + DoEscapeString(bug_, bug_report->bug_report, len); + } + + //x and y are intentionally swapped because eq is inversexy coords //is this msg out-of-date or are the parameters wrong? + std::string query = StringFormat( + "INSERT INTO `bugs` (`zone`, `name`, `ui`, `x`, `y`, `z`, `type`, `flag`, `target`, `bug`, `date`) " "VALUES('%s', '%s', '%s', '%.2f', '%.2f', '%.2f', '%s', %d, '%s', '%s', CURDATE())", - zone->GetShortName(), bug->name, uitext == nullptr ? "": uitext, - bug->x, bug->y, bug->z, bug->chartype, bug->type, targettext == nullptr? "Unknown Target": targettext, - bugtext==nullptr?"":bugtext); - safe_delete_array(bugtext); - safe_delete_array(uitext); - safe_delete_array(targettext); + zone->GetShortName(), + (name_ ? name_ : ""), + (ui_ ? ui_ : ""), + bug_report->pos_x, + bug_report->pos_y, + bug_report->pos_z, + (type_ ? type_ : ""), + bug_report->optional_info_mask, + (target_ ? target_ : "Unknown Target"), + (bug_ ? bug_ : "") + ); + safe_delete_array(name_); + safe_delete_array(ui_); + safe_delete_array(type_); + safe_delete_array(target_); + safe_delete_array(bug_); + QueryDatabase(query); } -void ZoneDatabase::UpdateBug(PetitionBug_Struct* bug){ +void ZoneDatabase::RegisterBug(Client* client, BugReport_Struct* bug_report) { + if (!client || !bug_report) + return; - uint32 len = strlen(bug->text); - auto bugtext = new char[2 * len + 1]; - memset(bugtext, 0, 2*len+1); - DoEscapeString(bugtext, bug->text, len); + size_t len = 0; + char* category_name_ = nullptr; + char* reporter_name_ = nullptr; + char* ui_path_ = nullptr; + char* target_name_ = nullptr; + char* bug_report_ = nullptr; + char* system_info_ = nullptr; - std::string query = StringFormat("INSERT INTO bugs (type, name, bugtext, flag) " - "VALUES('%s', '%s', '%s', %i)", - "Petition", bug->name, bugtext, 25); - safe_delete_array(bugtext); - QueryDatabase(query); + len = strlen(bug_report->category_name); + if (len) { + if (len > 63) // check against db column size + len = 63; + category_name_ = new char[(2 * len + 1)]; + memset(category_name_, 0, (2 * len + 1)); + DoEscapeString(category_name_, bug_report->category_name, len); + } + + len = strlen(bug_report->reporter_name); + if (len) { + if (len > 63) + len = 63; + reporter_name_ = new char[(2 * len + 1)]; + memset(reporter_name_, 0, (2 * len + 1)); + DoEscapeString(reporter_name_, bug_report->reporter_name, len); + } + + len = strlen(bug_report->ui_path); + if (len) { + if (len > 127) + len = 127; + ui_path_ = new char[(2 * len + 1)]; + memset(ui_path_, 0, (2 * len + 1)); + DoEscapeString(ui_path_, bug_report->ui_path, len); + } + + len = strlen(bug_report->target_name); + if (len) { + if (len > 63) + len = 63; + target_name_ = new char[(2 * len + 1)]; + memset(target_name_, 0, (2 * len + 1)); + DoEscapeString(target_name_, bug_report->target_name, len); + } + + len = strlen(bug_report->bug_report); + if (len) { + if (len > 1023) + len = 1023; + bug_report_ = new char[(2 * len + 1)]; + memset(bug_report_, 0, (2 * len + 1)); + DoEscapeString(bug_report_, bug_report->bug_report, len); + } + + len = strlen(bug_report->system_info); + if (len) { + if (len > 1023) + len = 1023; + system_info_ = new char[(2 * len + 1)]; + memset(system_info_, 0, (2 * len + 1)); + DoEscapeString(system_info_, bug_report->system_info, len); + } + + std::string query = StringFormat( + "INSERT INTO `bug_reports` " + "(`zone`," + " `client_version_id`," + " `client_version_name`," + " `account_id`," + " `character_id`," + " `character_name`," + " `reporter_spoof`," + " `category_id`," + " `category_name`," + " `reporter_name`," + " `ui_path`," + " `pos_x`," + " `pos_y`," + " `pos_z`," + " `heading`," + " `time_played`," + " `target_id`," + " `target_name`," + " `optional_info_mask`," + " `_can_duplicate`," + " `_crash_bug`," + " `_target_info`," + " `_character_flags`," + " `_unknown_value`," + " `bug_report`," + " `system_info`) " + "VALUES " + "('%s'," + " '%u'," + " '%s'," + " '%u'," + " '%u'," + " '%s'," + " '%u'," + " '%u'," + " '%s'," + " '%s'," + " '%s'," + " '%1.1f'," + " '%1.1f'," + " '%1.1f'," + " '%u'," + " '%u'," + " '%u'," + " '%s'," + " '%u'," + " '%u'," + " '%u'," + " '%u'," + " '%u'," + " '%u'," + " '%s'," + " '%s')", + zone->GetShortName(), + client->ClientVersion(), + EQEmu::versions::ClientVersionName(client->ClientVersion()), + client->AccountID(), + client->CharacterID(), + client->GetName(), + (strcmp(client->GetName(), reporter_name_) != 0 ? 1 : 0), + bug_report->category_id, + (category_name_ ? category_name_ : ""), + (reporter_name_ ? reporter_name_ : ""), + (ui_path_ ? ui_path_ : ""), + bug_report->pos_x, + bug_report->pos_y, + bug_report->pos_z, + bug_report->heading, + bug_report->time_played, + bug_report->target_id, + (target_name_ ? target_name_ : ""), + bug_report->optional_info_mask, + ((bug_report->optional_info_mask & EQEmu::bug::infoCanDuplicate) != 0 ? 1 : 0), + ((bug_report->optional_info_mask & EQEmu::bug::infoCrashBug) != 0 ? 1 : 0), + ((bug_report->optional_info_mask & EQEmu::bug::infoTargetInfo) != 0 ? 1 : 0), + ((bug_report->optional_info_mask & EQEmu::bug::infoCharacterFlags) != 0 ? 1 : 0), + ((bug_report->optional_info_mask & EQEmu::bug::infoUnknownValue) != 0 ? 1 : 0), + (bug_report_ ? bug_report_ : ""), + (system_info_ ? system_info_ : "") + ); + safe_delete_array(category_name_); + safe_delete_array(reporter_name_); + safe_delete_array(ui_path_); + safe_delete_array(target_name_); + safe_delete_array(bug_report_); + safe_delete_array(system_info_); + + auto result = QueryDatabase(query); + + // TODO: Entity dumping [RuleB(Bugs, DumpTargetEntity)] } +//void ZoneDatabase::UpdateBug(PetitionBug_Struct* bug) { +// +// uint32 len = strlen(bug->text); +// auto bugtext = new char[2 * len + 1]; +// memset(bugtext, 0, 2 * len + 1); +// DoEscapeString(bugtext, bug->text, len); +// +// std::string query = StringFormat("INSERT INTO bugs (type, name, bugtext, flag) " +// "VALUES('%s', '%s', '%s', %i)", +// "Petition", bug->name, bugtext, 25); +// safe_delete_array(bugtext); +// QueryDatabase(query); +//} + bool ZoneDatabase::SetSpecialAttkFlag(uint8 id, const char* flag) { std::string query = StringFormat("UPDATE npc_types SET npcspecialattks='%s' WHERE id = %i;", flag, id); diff --git a/zone/zonedb.h b/zone/zonedb.h index 6f65bae91..d0e7b1a99 100644 --- a/zone/zonedb.h +++ b/zone/zonedb.h @@ -442,8 +442,9 @@ public: bool DeleteMerc(uint32 merc_id); /* Petitions */ - void UpdateBug(BugStruct* bug); - void UpdateBug(PetitionBug_Struct* bug); + void RegisterBug(BugReport_Struct* bug_report); // old method + void RegisterBug(Client* client, BugReport_Struct* bug_report); // new method + //void UpdateBug(PetitionBug_Struct* bug); void DeletePetitionFromDB(Petition* wpet); void UpdatePetitionToDB(Petition* wpet); void InsertPetitionToDB(Petition* wpet); From c36a1cd6dc1dad49af831d40db9627fa7b4964ea Mon Sep 17 00:00:00 2001 From: Uleat Date: Sun, 18 Feb 2018 14:30:58 -0500 Subject: [PATCH 076/670] Fix for linux build fail --- common/emu_constants.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/emu_constants.h b/common/emu_constants.h index 04e36849b..0858fec72 100644 --- a/common/emu_constants.h +++ b/common/emu_constants.h @@ -24,7 +24,7 @@ #include "emu_legacy.h" #include "emu_versions.h" -#include +#include namespace EQEmu From 765ee5eeedb75291113aec307825431678beb68a Mon Sep 17 00:00:00 2001 From: Uleat Date: Mon, 19 Feb 2018 07:34:43 -0500 Subject: [PATCH 077/670] Fix for possible memory leak when spawning bots --- zone/bot.cpp | 24 ++++++++++++++++-------- zone/bot.h | 2 +- zone/bot_command.cpp | 23 ++++++++++++++++++----- zone/bot_database.cpp | 5 ++++- 4 files changed, 39 insertions(+), 15 deletions(-) diff --git a/zone/bot.cpp b/zone/bot.cpp index b0435dbe4..95ecf7885 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -3053,7 +3053,7 @@ void Bot::Depop() { NPC::Depop(false); } -void Bot::Spawn(Client* botCharacterOwner) { +bool Bot::Spawn(Client* botCharacterOwner) { if(GetBotID() > 0 && _botOwnerCharacterID > 0 && botCharacterOwner && botCharacterOwner->CharacterID() == _botOwnerCharacterID) { // Rename the bot name to make sure that Mob::GetName() matches Mob::GetCleanName() so we dont have a bot named "Jesuschrist001" strcpy(name, GetCleanName()); @@ -3097,7 +3097,11 @@ void Bot::Spawn(Client* botCharacterOwner) { this->SendWearChange(materialFromSlot); } } + + return true; } + + return false; } // Deletes the inventory record for the specified item from the database for this bot. @@ -3246,16 +3250,20 @@ void Bot::LoadAndSpawnAllZonedBots(Client* botOwner) { if(!ActiveBots.empty()) { for(std::list::iterator itr = ActiveBots.begin(); itr != ActiveBots.end(); ++itr) { Bot* activeBot = Bot::LoadBot(*itr); + if (!activeBot) + continue; - if(activeBot) { - activeBot->Spawn(botOwner); - g->UpdatePlayer(activeBot); - // follow the bot owner, not the group leader we just zoned with our owner. - if(g->IsGroupMember(botOwner) && g->IsGroupMember(activeBot)) - activeBot->SetFollowID(botOwner->GetID()); + if (!activeBot->Spawn(botOwner)) { + safe_delete(activeBot); + continue; } - if(activeBot && !botOwner->HasGroup()) + g->UpdatePlayer(activeBot); + // follow the bot owner, not the group leader we just zoned with our owner. + if (g->IsGroupMember(botOwner) && g->IsGroupMember(activeBot)) + activeBot->SetFollowID(botOwner->GetID()); + + if(!botOwner->HasGroup()) database.SetGroupID(activeBot->GetCleanName(), 0, activeBot->GetBotID()); } } diff --git a/zone/bot.h b/zone/bot.h index c69405011..1d38e5f57 100644 --- a/zone/bot.h +++ b/zone/bot.h @@ -275,7 +275,7 @@ public: static bool IsValidRaceClassCombo(uint16 r, uint8 c); bool IsValidName(); static bool IsValidName(std::string& name); - void Spawn(Client* botCharacterOwner); + bool Spawn(Client* botCharacterOwner); virtual void SetLevel(uint8 in_level, bool command = false); virtual void FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho); virtual bool Process(); diff --git a/zone/bot_command.cpp b/zone/bot_command.cpp index e94825929..cd5e727d0 100644 --- a/zone/bot_command.cpp +++ b/zone/bot_command.cpp @@ -5049,7 +5049,11 @@ void bot_subcommand_bot_spawn(Client *c, const Seperator *sep) return; } - my_bot->Spawn(c); + if (!my_bot->Spawn(c)) { + c->Message(m_fail, "Failed to spawn bot '%s' (id: %i)", bot_name.c_str(), bot_id); + safe_delete(my_bot); + return; + } static const char* bot_spawn_message[16] = { "A solid weapon is my ally!", // WARRIOR / 'generic' @@ -5805,18 +5809,22 @@ void bot_subcommand_botgroup_load(Client *c, const Seperator *sep) return; } if (!leader_id) { - c->Message(m_fail, "Can not locate bot-group leader id for '%s'", botgroup_name_arg.c_str()); + c->Message(m_fail, "Cannot locate bot-group leader id for '%s'", botgroup_name_arg.c_str()); return; } auto botgroup_leader = Bot::LoadBot(leader_id); if (!botgroup_leader) { - c->Message(m_fail, "Could not spawn bot-group leader for '%s'", botgroup_name_arg.c_str()); + c->Message(m_fail, "Could not load bot-group leader for '%s'", botgroup_name_arg.c_str()); safe_delete(botgroup_leader); return; } - botgroup_leader->Spawn(c); + if (!botgroup_leader->Spawn(c)) { + c->Message(m_fail, "Could not spawn bot-group leader %s for '%s'", botgroup_leader->GetName(), botgroup_name_arg.c_str()); + safe_delete(botgroup_leader); + return; + } Group* group_inst = new Group(botgroup_leader); @@ -5835,7 +5843,12 @@ void bot_subcommand_botgroup_load(Client *c, const Seperator *sep) return; } - botgroup_member->Spawn(c); + if (!botgroup_member->Spawn(c)) { + c->Message(m_fail, "Could not spawn bot '%s' (id: %i)", botgroup_member->GetName(), member_iter); + safe_delete(botgroup_member); + return; + } + Bot::AddBotToGroup(botgroup_member, group_inst); } diff --git a/zone/bot_database.cpp b/zone/bot_database.cpp index d8511c54c..4c5aabb82 100644 --- a/zone/bot_database.cpp +++ b/zone/bot_database.cpp @@ -273,7 +273,10 @@ bool BotDatabase::LoadBotID(const uint32 owner_id, const std::string& bot_name, if (!owner_id || bot_name.empty()) return false; - query = StringFormat("SELECT `bot_id` FROM `bot_data` WHERE `name` = '%s' LIMIT 1", bot_name.c_str()); + query = StringFormat( + "SELECT `bot_id` FROM `bot_data` WHERE `owner_id` = '%u' AND `name` = '%s' LIMIT 1", + owner_id, bot_name.c_str() + ); auto results = QueryDatabase(query); if (!results.Success()) return false; From 0b755cac546bfb04b2d4d252c56409e9547117f3 Mon Sep 17 00:00:00 2001 From: Xackery Date: Wed, 21 Feb 2018 07:59:47 -0800 Subject: [PATCH 078/670] Added sanity check for #hotfix --- zone/command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/command.cpp b/zone/command.cpp index 179a37ded..dcfecce7a 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -10835,7 +10835,7 @@ void command_hotfix(Client *c, const Seperator *sep) { } worldserver.SendPacket(&pack); - c->Message(0, "Hotfix applied"); + if (c) c->Message(0, "Hotfix applied"); }); t1.detach(); From 6027a80c142f9be4af2417928df979d782670a41 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 22 Feb 2018 01:30:40 -0500 Subject: [PATCH 079/670] Identified bouding_radius in all spawn structs --- common/eq_packet_structs.h | 2 +- common/patches/rof2_structs.h | 2 +- common/patches/rof_structs.h | 2 +- common/patches/sod_structs.h | 2 +- common/patches/sof_structs.h | 3 ++- common/patches/titanium_structs.h | 2 +- common/patches/uf_structs.h | 2 +- 7 files changed, 8 insertions(+), 7 deletions(-) diff --git a/common/eq_packet_structs.h b/common/eq_packet_structs.h index 8b8949255..26ef0bee9 100644 --- a/common/eq_packet_structs.h +++ b/common/eq_packet_structs.h @@ -280,7 +280,7 @@ union // horse: 0=brown, 1=white, 2=black, 3=tan }; /*0340*/ uint32 spawnId; // Spawn Id -/*0344*/ uint8 unknown0344[3]; +/*0344*/ float bounding_radius; // used in melee, overrides calc /*0347*/ uint8 IsMercenary; /*0348*/ EQEmu::TintProfile equipment_tint; /*0384*/ uint8 lfg; // 0=off, 1=lfg on diff --git a/common/patches/rof2_structs.h b/common/patches/rof2_structs.h index ecc288a35..c516929f4 100644 --- a/common/patches/rof2_structs.h +++ b/common/patches/rof2_structs.h @@ -430,7 +430,7 @@ struct Spawn_Struct /*0000*/ //uint8 nullterm1; // hack to null terminate name /*0064*/ uint32 spawnId; /*0068*/ uint8 level; -/*0069*/ float unknown1; +/*0069*/ float bounding_radius; // used in melee, overrides calc /*0073*/ uint8 NPC; // 0=player,1=npc,2=pc corpse,3=npc corpse Spawn_Struct_Bitfields Bitfields; /*0000*/ uint8 otherData; // & 4 - has title, & 8 - has suffix, & 1 - it's a chest or untargetable diff --git a/common/patches/rof_structs.h b/common/patches/rof_structs.h index bd9cbbce9..db52827b9 100644 --- a/common/patches/rof_structs.h +++ b/common/patches/rof_structs.h @@ -408,7 +408,7 @@ struct Spawn_Struct /*0000*/ //uint8 nullterm1; // hack to null terminate name /*0064*/ uint32 spawnId; /*0068*/ uint8 level; -/*0069*/ float unknown1; +/*0069*/ float bounding_radius; // used in melee, overrides calc /*0073*/ uint8 NPC; // 0=player,1=npc,2=pc corpse,3=npc corpse Spawn_Struct_Bitfields Bitfields; /*0000*/ uint8 otherData; // & 4 - has title, & 8 - has suffix, & 1 - it's a chest or untargetable diff --git a/common/patches/sod_structs.h b/common/patches/sod_structs.h index 76635108d..1000cb5a3 100644 --- a/common/patches/sod_structs.h +++ b/common/patches/sod_structs.h @@ -292,7 +292,7 @@ struct Spawn_Struct /*0000*/ //uint8 nullterm1; // hack to null terminate name /*0064*/ uint32 spawnId; /*0068*/ uint8 level; -/*0069*/ float unknown1; +/*0069*/ float bounding_radius; // used in melee, overrides calc /*0073*/ uint8 NPC; // 0=player,1=npc,2=pc corpse,3=npc corpse Spawn_Struct_Bitfields Bitfields; /*0000*/ uint8 otherData; // & 4 - has title, & 8 - has suffix, & 1 - it's a chest or untargetable diff --git a/common/patches/sof_structs.h b/common/patches/sof_structs.h index ca1c93ed2..f6298f41d 100644 --- a/common/patches/sof_structs.h +++ b/common/patches/sof_structs.h @@ -326,7 +326,8 @@ union /*0725*/ uint8 targetable; // 1 = Targetable 0 = Not Targetable (is_npc?) /*0726*/ uint8 unknown0726[4]; /*0730*/ uint8 NPC; // 0=player,1=npc,2=pc corpse,3=npc corpse -/*0731*/ uint8 unknown0731[11]; +/*0731*/ float bounding_radius; // used in melee, overrides calc +/*0735*/ uint8 unknown0731[7]; /*0742*/ uint8 targetable_with_hotkey; /*0743*/ signed padding00:12; // ***Placeholder signed x:19; // x coord diff --git a/common/patches/titanium_structs.h b/common/patches/titanium_structs.h index 41f029c8d..3a2787500 100644 --- a/common/patches/titanium_structs.h +++ b/common/patches/titanium_structs.h @@ -327,7 +327,7 @@ union // horse: 0=brown, 1=white, 2=black, 3=tan }; /*0340*/ uint32 spawnId; // Spawn Id -/*0344*/ uint8 unknown0344[4]; +/*0344*/ float bounding_radius; // used in melee, overrides calc /*0348*/ TintProfile equipment_tint; /*0384*/ uint8 lfg; // 0=off, 1=lfg on /*0385*/ diff --git a/common/patches/uf_structs.h b/common/patches/uf_structs.h index b10e3a3dd..256169d67 100644 --- a/common/patches/uf_structs.h +++ b/common/patches/uf_structs.h @@ -292,7 +292,7 @@ struct Spawn_Struct /*0000*/ //uint8 nullterm1; // hack to null terminate name /*0064*/ uint32 spawnId; /*0068*/ uint8 level; -/*0069*/ float unknown1; +/*0069*/ float bounding_radius; // used in melee, overrides calc /*0073*/ uint8 NPC; // 0=player,1=npc,2=pc corpse,3=npc corpse Spawn_Struct_Bitfields Bitfields; /*0000*/ uint8 otherData; // & 4 - has title, & 8 - has suffix, & 1 - it's a chest or untargetable From f3b2ac6c17665c326be8d5bdef91492c0ace0b27 Mon Sep 17 00:00:00 2001 From: Xackery Date: Thu, 22 Feb 2018 18:43:31 -0800 Subject: [PATCH 080/670] Added rule to remove pet reagent cost --- common/ruletypes.h | 1 + zone/spells.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/common/ruletypes.h b/common/ruletypes.h index 219995913..b6acffc3c 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -156,6 +156,7 @@ RULE_BOOL(Character, UseOldBindWound, false) // Uses the original bind wound beh RULE_BOOL(Character, GrantHoTTOnCreate, false) // Grant Health of Target's Target leadership AA on character creation RULE_BOOL(Character, UseOldConSystem, false) // Grant Health of Target's Target leadership AA on character creation RULE_BOOL(Character, OPClientUpdateVisualDebug, false) // Shows a pulse and forward directional particle each time the client sends its position to server +RULE_BOOL(Character, PetsUseReagents, true) //Pets use reagent on spells RULE_CATEGORY_END() RULE_CATEGORY(Mercs) diff --git a/zone/spells.cpp b/zone/spells.cpp index 78ef657aa..e66a41fa8 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -1208,7 +1208,10 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo // handle the components for traditional casters else { - if(c->GetInv().HasItem(component, component_count, invWhereWorn|invWherePersonal) == -1) // item not found + if (!RuleB(Character, PetsUseReagents) && IsEffectInSpell(spell_id, SE_SummonPet)) { + //bypass reagent cost + } + else if(c->GetInv().HasItem(component, component_count, invWhereWorn|invWherePersonal) == -1) // item not found { if (!missingreags) { @@ -1238,6 +1241,9 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo return; } } + else if (!RuleB(Character, PetsUseReagents) && IsEffectInSpell(spell_id, SE_SummonPet)) { + //bypass reagent cost + } else if (!bard_song_mode) { int noexpend; From ca0b9bc3749ee29fda4af2fc12751681dc85da79 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Fri, 23 Feb 2018 17:00:17 -0500 Subject: [PATCH 081/670] Fix rampage behavior Fixes #716 --- common/features.h | 3 +++ zone/mob_ai.cpp | 25 ++++++++++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/common/features.h b/common/features.h index 486255f28..a35431bff 100644 --- a/common/features.h +++ b/common/features.h @@ -219,6 +219,9 @@ enum { //some random constants //the square of the maximum range at whihc you could possibly use NPC services (shop, tribute, etc) #define USE_NPC_RANGE2 200*200 //arbitrary right now +// Squared range for rampage 75.0 * 75.0 for now +#define NPC_RAMPAGE_RANGE2 5625.0f + //the formula for experience for killing a mob. //level is the only valid variable to use #define EXP_FORMULA level*level*75*35/10 diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index ed55d1146..b82f8601a 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -2074,15 +2074,34 @@ bool Mob::Rampage(ExtraAttackOptions *opts) if (m_target) { if (m_target == GetTarget()) continue; - if (CombatRange(m_target)) { + if (DistanceSquaredNoZ(GetPosition(), m_target->GetPosition()) <= NPC_RAMPAGE_RANGE2) { ProcessAttackRounds(m_target, opts); index_hit++; } } } - if (RuleB(Combat, RampageHitsTarget) && index_hit < rampage_targets) - ProcessAttackRounds(GetTarget(), opts); + if (RuleB(Combat, RampageHitsTarget)) { + if (index_hit < rampage_targets) + ProcessAttackRounds(GetTarget(), opts); + } else { // let's do correct behavior here, if they set above rule we can assume they want non-live like behavior + if (index_hit < rampage_targets) { + // so we go over in reverse order and skip range check + // lets do it this way to still support non-live-like >1 rampage targets + // likely live is just a fall through of the last valid mob + for (auto i = RampageArray.crbegin(); i != RampageArray.crend(); ++i) { + if (index_hit >= rampage_targets) + break; + auto m_target = entity_list.GetMob(*i); + if (m_target) { + if (m_target == GetTarget()) + continue; + ProcessAttackRounds(m_target, opts); + index_hit++; + } + } + } + } m_specialattacks = eSpecialAttacks::None; From 959337b592a5bdd085789567570e6bf6cb3f1755 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Fri, 23 Feb 2018 17:09:04 -0500 Subject: [PATCH 082/670] Pets should warp to owner >= 450 units Fixes #715 --- zone/mob_ai.cpp | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index b82f8601a..fec331cb5 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -918,29 +918,26 @@ void Client::AI_Process() } } - if(IsPet()) - { - Mob* owner = GetOwner(); - if(owner == nullptr) + if (IsPet()) { + Mob *owner = GetOwner(); + if (owner == nullptr) return; float dist = DistanceSquared(m_Position, owner->GetPosition()); - if (dist >= 400) - { - if(AI_movement_timer->Check()) - { - int nspeed = (dist >= 5625 ? GetRunspeed() : GetWalkspeed()); + if (dist >= 202500) { // >= 450 distance + Teleport(static_cast(owner->GetPosition())); + SendPositionUpdate(); // this shouldn't happen a lot (and hard to make it) so lets not rate limit + } else if (dist >= 400) { // >=20 + if (AI_movement_timer->Check()) { + int nspeed = (dist >= 5625 ? GetRunspeed() : GetWalkspeed()); // >= 75 animation = nspeed; nspeed *= 2; SetCurrentSpeed(nspeed); CalculateNewPosition2(owner->GetX(), owner->GetY(), owner->GetZ(), nspeed); } - } - else - { - if(moved) - { + } else { + if (moved) { SetCurrentSpeed(0); moved = false; } From c87380fa54379bff2d745d24a5d8b8147a77004a Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Fri, 23 Feb 2018 17:42:57 -0500 Subject: [PATCH 083/670] Actually fix pet warp range ... --- zone/mob_ai.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index fec331cb5..a7d1c2cb4 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1428,7 +1428,7 @@ void Mob::AI_Process() { if (dist >= 5625) speed = GetRunspeed(); - if (distz > 100) + if (dist >= 202500 || distz > 100) // dist >= 450 { m_Position = ownerPos; SendPositionUpdate(); From fc339cc9d01838db95fc4e55f9e741cf08ea2509 Mon Sep 17 00:00:00 2001 From: Kurt Gilpin Date: Sat, 24 Feb 2018 00:23:30 -0600 Subject: [PATCH 084/670] Removed conditional for installing libsodium. If it's superseded or already installed, it just won't install it anyway. --- utils/scripts/linux_installer/install.sh | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/utils/scripts/linux_installer/install.sh b/utils/scripts/linux_installer/install.sh index 1a94320ae..a88be638c 100644 --- a/utils/scripts/linux_installer/install.sh +++ b/utils/scripts/linux_installer/install.sh @@ -122,16 +122,12 @@ if [[ "$OS" == "Debian" ]]; then apt-get $apt_options install libjson-perl # If libsodium18 isn't installed (Debian), let's download both that and the dev package and install them. - if dpkg-query -s "libsodium18" 1>/dev/null 2>&1; then - echo "Sodium library already installed." - else - wget http://ftp.us.debian.org/debian/pool/main/libs/libsodium/libsodium-dev_1.0.11-1~bpo8+1_amd64.deb -O /home/eqemu/libsodium-dev.deb - wget http://ftp.us.debian.org/debian/pool/main/libs/libsodium/libsodium18_1.0.11-1~bpo8+1_amd64.deb -O /home/eqemu/libsodium18.deb - dpkg -i /home/eqemu/libsodium*.deb - # Cleanup after ourselves - rm -f /home/eqemu/libsodium-dev.deb - rm -f /home/eqemu/libsodium18.deb - fi + wget http://ftp.us.debian.org/debian/pool/main/libs/libsodium/libsodium-dev_1.0.11-1~bpo8+1_amd64.deb -O /home/eqemu/libsodium-dev.deb + wget http://ftp.us.debian.org/debian/pool/main/libs/libsodium/libsodium18_1.0.11-1~bpo8+1_amd64.deb -O /home/eqemu/libsodium18.deb + dpkg -i /home/eqemu/libsodium*.deb + # Cleanup after ourselves + rm -f /home/eqemu/libsodium-dev.deb + rm -f /home/eqemu/libsodium18.deb #::: Install FTP for remote FTP access echo "proftpd-basic shared/proftpd/inetd_or_standalone select standalone" | debconf-set-selections From 46a358abe649a3e5c8d0d2f766be8e985b5b647e Mon Sep 17 00:00:00 2001 From: Kurt Gilpin Date: Sat, 24 Feb 2018 00:24:26 -0600 Subject: [PATCH 085/670] Update install.sh --- utils/scripts/linux_installer/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/scripts/linux_installer/install.sh b/utils/scripts/linux_installer/install.sh index a88be638c..bffa2d939 100644 --- a/utils/scripts/linux_installer/install.sh +++ b/utils/scripts/linux_installer/install.sh @@ -121,7 +121,7 @@ if [[ "$OS" == "Debian" ]]; then apt-get $apt_options install libsodium18 apt-get $apt_options install libjson-perl - # If libsodium18 isn't installed (Debian), let's download both that and the dev package and install them. + # Install libsodium wget http://ftp.us.debian.org/debian/pool/main/libs/libsodium/libsodium-dev_1.0.11-1~bpo8+1_amd64.deb -O /home/eqemu/libsodium-dev.deb wget http://ftp.us.debian.org/debian/pool/main/libs/libsodium/libsodium18_1.0.11-1~bpo8+1_amd64.deb -O /home/eqemu/libsodium18.deb dpkg -i /home/eqemu/libsodium*.deb From 361937d4438ad6780e39cd3a5ee86334987d72ce Mon Sep 17 00:00:00 2001 From: Uleat Date: Sat, 24 Feb 2018 09:08:11 -0500 Subject: [PATCH 086/670] SayLink clean-up --- common/emu_constants.h | 4 ++ common/emu_legacy.h | 2 - common/eq_packet_structs.h | 17 +++++ common/patches/rof.cpp | 70 ++++++++++---------- common/patches/rof2.cpp | 60 ++++++++--------- common/patches/rof2_structs.h | 17 +++++ common/patches/rof_structs.h | 17 +++++ common/patches/sod.cpp | 76 +++++++++++----------- common/patches/sod_structs.h | 16 +++++ common/patches/sof.cpp | 76 +++++++++++----------- common/patches/sof_structs.h | 16 +++++ common/patches/titanium.cpp | 80 +++++++++++------------ common/patches/titanium_structs.h | 15 +++++ common/patches/uf.cpp | 76 +++++++++++----------- common/patches/uf_structs.h | 16 +++++ common/say_link.cpp | 104 +++++++++++++++--------------- common/say_link.h | 65 ++++++++----------- zone/bot.cpp | 2 + zone/bot_command.cpp | 8 +-- zone/client.cpp | 2 +- zone/command.cpp | 83 +++++++----------------- zone/corpse.cpp | 8 +-- zone/inventory.cpp | 2 +- zone/npc.cpp | 4 +- zone/questmgr.cpp | 12 ++-- zone/tasks.cpp | 3 +- 26 files changed, 455 insertions(+), 396 deletions(-) diff --git a/common/emu_constants.h b/common/emu_constants.h index 0858fec72..32968458c 100644 --- a/common/emu_constants.h +++ b/common/emu_constants.h @@ -114,7 +114,11 @@ namespace EQEmu const EQEmu::versions::ClientVersion CharacterCreationClient = EQEmu::versions::ClientVersion::RoF2; const size_t CharacterCreationMax = RoF2::constants::CharacterCreationLimit; + const size_t SayLinkOpenerSize = 1; const size_t SayLinkBodySize = RoF2::constants::SayLinkBodySize; + const size_t SayLinkTextSize = 256; // this may be varied until it breaks something (tested:374) - the others are constant + const size_t SayLinkCloserSize = 1; + const size_t SayLinkMaximumSize = (SayLinkOpenerSize + SayLinkBodySize + SayLinkTextSize + SayLinkCloserSize); const int LongBuffs = RoF2::constants::LongBuffs; const int ShortBuffs = RoF2::constants::ShortBuffs; diff --git a/common/emu_legacy.h b/common/emu_legacy.h index 0f3cf0a62..812a33ca1 100644 --- a/common/emu_legacy.h +++ b/common/emu_legacy.h @@ -175,8 +175,6 @@ namespace EQEmu // POTION_BELT_SIZE sets maximum limit..active limit will need to be handled by the appropriate AA or spell (or item?) static const size_t POTION_BELT_ITEM_COUNT = 5; - - static const size_t TEXT_LINK_BODY_LENGTH = 56; } } diff --git a/common/eq_packet_structs.h b/common/eq_packet_structs.h index 26ef0bee9..cc06ecf15 100644 --- a/common/eq_packet_structs.h +++ b/common/eq_packet_structs.h @@ -5366,6 +5366,23 @@ struct AuraDestory_Struct { }; // I think we can assume it's just action for 2, client doesn't seem to do anything with the rest of the data in that case +struct SayLinkBodyFrame_Struct { +/*000*/ char ActionID[1]; +/*001*/ char ItemID[5]; +/*006*/ char Augment1[5]; +/*011*/ char Augment2[5]; +/*016*/ char Augment3[5]; +/*021*/ char Augment4[5]; +/*026*/ char Augment5[5]; +/*031*/ char Augment6[5]; +/*036*/ char IsEvolving[1]; +/*037*/ char EvolveGroup[4]; +/*041*/ char EvolveLevel[2]; +/*043*/ char OrnamentIcon[5]; +/*048*/ char Hash[8]; +/*056*/ +}; + // Restore structure packing to default #pragma pack() diff --git a/common/patches/rof.cpp b/common/patches/rof.cpp index a57e798db..24fecb2ca 100644 --- a/common/patches/rof.cpp +++ b/common/patches/rof.cpp @@ -57,11 +57,11 @@ namespace RoF static inline uint32 RoFToServerTypelessSlot(structs::TypelessInventorySlot_Struct rofSlot); static inline uint32 RoFToServerCorpseSlot(uint32 rofCorpseSlot); - // server to client text link converter - static inline void ServerToRoFTextLink(std::string& rofTextLink, const std::string& serverTextLink); + // server to client say link converter + static inline void ServerToRoFSayLink(std::string& rofSayLink, const std::string& serverSayLink); - // client to server text link converter - static inline void RoFToServerTextLink(std::string& serverTextLink, const std::string& rofTextLink); + // client to server say link converter + static inline void RoFToServerSayLink(std::string& serverSayLink, const std::string& rofSayLink); static inline CastingSlot ServerToRoFCastingSlot(EQEmu::CastingSlot slot); static inline EQEmu::CastingSlot RoFToServerCastingSlot(CastingSlot slot); @@ -520,7 +520,7 @@ namespace RoF std::string old_message = emu->message; std::string new_message; - ServerToRoFTextLink(new_message, old_message); + ServerToRoFSayLink(new_message, old_message); //in->size = strlen(emu->sender) + 1 + strlen(emu->targetname) + 1 + strlen(emu->message) + 1 + 36; in->size = strlen(emu->sender) + strlen(emu->targetname) + new_message.length() + 39; @@ -847,7 +847,7 @@ namespace RoF std::string old_message = emu->message; std::string new_message; - ServerToRoFTextLink(new_message, old_message); + ServerToRoFSayLink(new_message, old_message); //if (new_message.length() > 512) // length restricted in packet building function due vari-length name size (no nullterm) // new_message = new_message.substr(0, 512); @@ -899,7 +899,7 @@ namespace RoF for (int i = 0; i < 9; ++i) { if (old_message_array[i].length() == 0) { break; } - ServerToRoFTextLink(new_message_array[i], old_message_array[i]); + ServerToRoFSayLink(new_message_array[i], old_message_array[i]); new_message_size += new_message_array[i].length() + 1; } @@ -3295,7 +3295,7 @@ namespace RoF std::string old_message = &emu->message[strlen(emu->sayer)]; std::string new_message; - ServerToRoFTextLink(new_message, old_message); + ServerToRoFSayLink(new_message, old_message); //in->size = 3 + 4 + 4 + strlen(emu->sayer) + 1 + 12 + new_message.length() + 1; in->size = strlen(emu->sayer) + new_message.length() + 25; @@ -3369,7 +3369,7 @@ namespace RoF std::string old_message = InBuffer; // start 'Reward' as string std::string new_message; - ServerToRoFTextLink(new_message, old_message); + ServerToRoFSayLink(new_message, old_message); in->size = sizeof(TaskDescriptionHeader_Struct) + sizeof(TaskDescriptionData1_Struct)+ sizeof(TaskDescriptionData2_Struct) + sizeof(TaskDescriptionTrailer_Struct)+ @@ -4355,7 +4355,7 @@ namespace RoF std::string old_message = InBuffer; std::string new_message; - RoFToServerTextLink(new_message, old_message); + RoFToServerSayLink(new_message, old_message); //__packet->size = sizeof(ChannelMessage_Struct)+strlen(InBuffer) + 1; __packet->size = sizeof(ChannelMessage_Struct) + new_message.length() + 1; @@ -4489,7 +4489,7 @@ namespace RoF std::string old_message = (char *)&__eq_buffer[4]; // unknown01 offset std::string new_message; - RoFToServerTextLink(new_message, old_message); + RoFToServerSayLink(new_message, old_message); __packet->size = sizeof(Emote_Struct); __packet->pBuffer = new unsigned char[__packet->size]; @@ -5916,19 +5916,19 @@ namespace RoF return (rofCorpseSlot - 1); } - static inline void ServerToRoFTextLink(std::string& rofTextLink, const std::string& serverTextLink) + static inline void ServerToRoFSayLink(std::string& rofSayLink, const std::string& serverSayLink) { - if ((constants::SayLinkBodySize == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) { - rofTextLink = serverTextLink; + if ((constants::SayLinkBodySize == EQEmu::constants::SayLinkBodySize) || (serverSayLink.find('\x12') == std::string::npos)) { + rofSayLink = serverSayLink; return; } - auto segments = SplitString(serverTextLink, '\x12'); + auto segments = SplitString(serverSayLink, '\x12'); for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { - if (segments[segment_iter].length() <= EQEmu::legacy::TEXT_LINK_BODY_LENGTH) { - rofTextLink.append(segments[segment_iter]); + if (segments[segment_iter].length() <= EQEmu::constants::SayLinkBodySize) { + rofSayLink.append(segments[segment_iter]); // TODO: log size mismatch error continue; } @@ -5938,36 +5938,36 @@ namespace RoF // RoF: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX X XXXXX XXXXXXXX (55) // Diff: ^ - rofTextLink.push_back('\x12'); - rofTextLink.append(segments[segment_iter].substr(0, 41)); + rofSayLink.push_back('\x12'); + rofSayLink.append(segments[segment_iter].substr(0, 41)); if (segments[segment_iter][41] == '0') - rofTextLink.push_back(segments[segment_iter][42]); + rofSayLink.push_back(segments[segment_iter][42]); else - rofTextLink.push_back('F'); + rofSayLink.push_back('F'); - rofTextLink.append(segments[segment_iter].substr(43)); - rofTextLink.push_back('\x12'); + rofSayLink.append(segments[segment_iter].substr(43)); + rofSayLink.push_back('\x12'); } else { - rofTextLink.append(segments[segment_iter]); + rofSayLink.append(segments[segment_iter]); } } } - static inline void RoFToServerTextLink(std::string& serverTextLink, const std::string& rofTextLink) + static inline void RoFToServerSayLink(std::string& serverSayLink, const std::string& rofSayLink) { - if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == constants::SayLinkBodySize) || (rofTextLink.find('\x12') == std::string::npos)) { - serverTextLink = rofTextLink; + if ((EQEmu::constants::SayLinkBodySize == constants::SayLinkBodySize) || (rofSayLink.find('\x12') == std::string::npos)) { + serverSayLink = rofSayLink; return; } - auto segments = SplitString(rofTextLink, '\x12'); + auto segments = SplitString(rofSayLink, '\x12'); for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { if (segments[segment_iter].length() <= constants::SayLinkBodySize) { - serverTextLink.append(segments[segment_iter]); + serverSayLink.append(segments[segment_iter]); // TODO: log size mismatch error continue; } @@ -5977,14 +5977,14 @@ namespace RoF // RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56) // Diff: ^ - serverTextLink.push_back('\x12'); - serverTextLink.append(segments[segment_iter].substr(0, 41)); - serverTextLink.push_back('0'); - serverTextLink.append(segments[segment_iter].substr(41)); - serverTextLink.push_back('\x12'); + serverSayLink.push_back('\x12'); + serverSayLink.append(segments[segment_iter].substr(0, 41)); + serverSayLink.push_back('0'); + serverSayLink.append(segments[segment_iter].substr(41)); + serverSayLink.push_back('\x12'); } else { - serverTextLink.append(segments[segment_iter]); + serverSayLink.append(segments[segment_iter]); } } } diff --git a/common/patches/rof2.cpp b/common/patches/rof2.cpp index 64b991ddc..7e5d79bb6 100644 --- a/common/patches/rof2.cpp +++ b/common/patches/rof2.cpp @@ -57,11 +57,11 @@ namespace RoF2 static inline uint32 RoF2ToServerTypelessSlot(structs::TypelessInventorySlot_Struct rof2Slot); static inline uint32 RoF2ToServerCorpseSlot(uint32 rof2CorpseSlot); - // server to client text link converter - static inline void ServerToRoF2TextLink(std::string& rof2TextLink, const std::string& serverTextLink); + // server to client say link converter + static inline void ServerToRoF2SayLink(std::string& rof2SayLink, const std::string& serverSayLink); - // client to server text link converter - static inline void RoF2ToServerTextLink(std::string& serverTextLink, const std::string& rof2TextLink); + // client to server say link converter + static inline void RoF2ToServerSayLink(std::string& serverSayLink, const std::string& rof2SayLink); static inline CastingSlot ServerToRoF2CastingSlot(EQEmu::CastingSlot slot); static inline EQEmu::CastingSlot RoF2ToServerCastingSlot(CastingSlot slot); @@ -588,7 +588,7 @@ namespace RoF2 std::string old_message = emu->message; std::string new_message; - ServerToRoF2TextLink(new_message, old_message); + ServerToRoF2SayLink(new_message, old_message); //in->size = strlen(emu->sender) + 1 + strlen(emu->targetname) + 1 + strlen(emu->message) + 1 + 36; in->size = strlen(emu->sender) + strlen(emu->targetname) + new_message.length() + 39; @@ -915,7 +915,7 @@ namespace RoF2 std::string old_message = emu->message; std::string new_message; - ServerToRoF2TextLink(new_message, old_message); + ServerToRoF2SayLink(new_message, old_message); //if (new_message.length() > 512) // length restricted in packet building function due vari-length name size (no nullterm) // new_message = new_message.substr(0, 512); @@ -967,7 +967,7 @@ namespace RoF2 for (int i = 0; i < 9; ++i) { if (old_message_array[i].length() == 0) { break; } - ServerToRoF2TextLink(new_message_array[i], old_message_array[i]); + ServerToRoF2SayLink(new_message_array[i], old_message_array[i]); new_message_size += new_message_array[i].length() + 1; } @@ -3364,7 +3364,7 @@ namespace RoF2 std::string old_message = &emu->message[strlen(emu->sayer)]; std::string new_message; - ServerToRoF2TextLink(new_message, old_message); + ServerToRoF2SayLink(new_message, old_message); //in->size = 3 + 4 + 4 + strlen(emu->sayer) + 1 + 12 + new_message.length() + 1; in->size = strlen(emu->sayer) + new_message.length() + 25; @@ -3438,7 +3438,7 @@ namespace RoF2 std::string old_message = InBuffer; // start 'Reward' as string std::string new_message; - ServerToRoF2TextLink(new_message, old_message); + ServerToRoF2SayLink(new_message, old_message); in->size = sizeof(TaskDescriptionHeader_Struct) + sizeof(TaskDescriptionData1_Struct)+ sizeof(TaskDescriptionData2_Struct) + sizeof(TaskDescriptionTrailer_Struct)+ @@ -4595,7 +4595,7 @@ namespace RoF2 std::string old_message = InBuffer; std::string new_message; - RoF2ToServerTextLink(new_message, old_message); + RoF2ToServerSayLink(new_message, old_message); //__packet->size = sizeof(ChannelMessage_Struct)+strlen(InBuffer) + 1; __packet->size = sizeof(ChannelMessage_Struct) + new_message.length() + 1; @@ -4729,7 +4729,7 @@ namespace RoF2 std::string old_message = (char *)&__eq_buffer[4]; // unknown01 offset std::string new_message; - RoF2ToServerTextLink(new_message, old_message); + RoF2ToServerSayLink(new_message, old_message); __packet->size = sizeof(Emote_Struct); __packet->pBuffer = new unsigned char[__packet->size]; @@ -6233,19 +6233,19 @@ namespace RoF2 return (rof2CorpseSlot + EQEmu::legacy::CORPSE_BEGIN - 1); } - static inline void ServerToRoF2TextLink(std::string& rof2TextLink, const std::string& serverTextLink) + static inline void ServerToRoF2SayLink(std::string& rof2SayLink, const std::string& serverSayLink) { - if ((constants::SayLinkBodySize == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) { - rof2TextLink = serverTextLink; + if ((constants::SayLinkBodySize == EQEmu::constants::SayLinkBodySize) || (serverSayLink.find('\x12') == std::string::npos)) { + rof2SayLink = serverSayLink; return; } - auto segments = SplitString(serverTextLink, '\x12'); + auto segments = SplitString(serverSayLink, '\x12'); for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { - if (segments[segment_iter].length() <= EQEmu::legacy::TEXT_LINK_BODY_LENGTH) { - rof2TextLink.append(segments[segment_iter]); + if (segments[segment_iter].length() <= EQEmu::constants::SayLinkBodySize) { + rof2SayLink.append(segments[segment_iter]); // TODO: log size mismatch error continue; } @@ -6255,29 +6255,29 @@ namespace RoF2 // RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56) // Diff: - rof2TextLink.push_back('\x12'); - rof2TextLink.append(segments[segment_iter]); - rof2TextLink.push_back('\x12'); + rof2SayLink.push_back('\x12'); + rof2SayLink.append(segments[segment_iter]); + rof2SayLink.push_back('\x12'); } else { - rof2TextLink.append(segments[segment_iter]); + rof2SayLink.append(segments[segment_iter]); } } } - static inline void RoF2ToServerTextLink(std::string& serverTextLink, const std::string& rof2TextLink) + static inline void RoF2ToServerSayLink(std::string& serverSayLink, const std::string& rof2SayLink) { - if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == constants::SayLinkBodySize) || (rof2TextLink.find('\x12') == std::string::npos)) { - serverTextLink = rof2TextLink; + if ((EQEmu::constants::SayLinkBodySize == constants::SayLinkBodySize) || (rof2SayLink.find('\x12') == std::string::npos)) { + serverSayLink = rof2SayLink; return; } - auto segments = SplitString(rof2TextLink, '\x12'); + auto segments = SplitString(rof2SayLink, '\x12'); for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { if (segments[segment_iter].length() <= constants::SayLinkBodySize) { - serverTextLink.append(segments[segment_iter]); + serverSayLink.append(segments[segment_iter]); // TODO: log size mismatch error continue; } @@ -6287,12 +6287,12 @@ namespace RoF2 // RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56) // Diff: - serverTextLink.push_back('\x12'); - serverTextLink.append(segments[segment_iter]); - serverTextLink.push_back('\x12'); + serverSayLink.push_back('\x12'); + serverSayLink.append(segments[segment_iter]); + serverSayLink.push_back('\x12'); } else { - serverTextLink.append(segments[segment_iter]); + serverSayLink.append(segments[segment_iter]); } } } diff --git a/common/patches/rof2_structs.h b/common/patches/rof2_structs.h index c516929f4..bd18a13c0 100644 --- a/common/patches/rof2_structs.h +++ b/common/patches/rof2_structs.h @@ -5089,6 +5089,23 @@ struct CrystalCountUpdate_Struct /*012*/ uint32 CareerEbonCrystals; }; +struct SayLinkBodyFrame_Struct { +/*000*/ char ActionID[1]; +/*001*/ char ItemID[5]; +/*006*/ char Augment1[5]; +/*011*/ char Augment2[5]; +/*016*/ char Augment3[5]; +/*021*/ char Augment4[5]; +/*026*/ char Augment5[5]; +/*031*/ char Augment6[5]; +/*036*/ char IsEvolving[1]; +/*037*/ char EvolveGroup[4]; +/*041*/ char EvolveLevel[2]; +/*043*/ char OrnamentIcon[5]; +/*048*/ char Hash[8]; +/*056*/ +}; + }; /*structs*/ }; /*RoF2*/ diff --git a/common/patches/rof_structs.h b/common/patches/rof_structs.h index db52827b9..d38d5c6bb 100644 --- a/common/patches/rof_structs.h +++ b/common/patches/rof_structs.h @@ -5006,6 +5006,23 @@ struct MercenaryMerchantRequest_Struct { struct MercenaryMerchantResponse_Struct { /*0000*/ uint32 ResponseType; /*0004*/ +}; + +struct SayLinkBodyFrame_Struct { +/*000*/ char ActionID[1]; +/*001*/ char ItemID[5]; +/*006*/ char Augment1[5]; +/*011*/ char Augment2[5]; +/*016*/ char Augment3[5]; +/*021*/ char Augment4[5]; +/*026*/ char Augment5[5]; +/*031*/ char Augment6[5]; +/*036*/ char IsEvolving[1]; +/*037*/ char EvolveGroup[4]; +/*041*/ char EvolveLevel[1]; +/*042*/ char OrnamentIcon[5]; +/*047*/ char Hash[8]; +/*055*/ }; }; /*structs*/ diff --git a/common/patches/sod.cpp b/common/patches/sod.cpp index ceba224f4..9e1479188 100644 --- a/common/patches/sod.cpp +++ b/common/patches/sod.cpp @@ -53,11 +53,11 @@ namespace SoD static inline uint32 SoDToServerSlot(uint32 sodSlot); static inline uint32 SoDToServerCorpseSlot(uint32 sodCorpseSlot); - // server to client text link converter - static inline void ServerToSoDTextLink(std::string& sodTextLink, const std::string& serverTextLink); + // server to client say link converter + static inline void ServerToSoDSayLink(std::string& sodSayLink, const std::string& serverSayLink); - // client to server text link converter - static inline void SoDToServerTextLink(std::string& serverTextLink, const std::string& sodTextLink); + // client to server say link converter + static inline void SoDToServerSayLink(std::string& serverSayLink, const std::string& sodSayLink); static inline CastingSlot ServerToSoDCastingSlot(EQEmu::CastingSlot slot); static inline EQEmu::CastingSlot SoDToServerCastingSlot(CastingSlot slot); @@ -346,7 +346,7 @@ namespace SoD std::string old_message = emu->message; std::string new_message; - ServerToSoDTextLink(new_message, old_message); + ServerToSoDSayLink(new_message, old_message); in->size = sizeof(ChannelMessage_Struct) + new_message.length() + 1; @@ -625,7 +625,7 @@ namespace SoD std::string old_message = emu->message; std::string new_message; - ServerToSoDTextLink(new_message, old_message); + ServerToSoDSayLink(new_message, old_message); //if (new_message.length() > 512) // length restricted in packet building function due vari-length name size (no nullterm) // new_message = new_message.substr(0, 512); @@ -677,7 +677,7 @@ namespace SoD for (int i = 0; i < 9; ++i) { if (old_message_array[i].length() == 0) { break; } - ServerToSoDTextLink(new_message_array[i], old_message_array[i]); + ServerToSoDSayLink(new_message_array[i], old_message_array[i]); new_message_size += new_message_array[i].length() + 1; } @@ -2156,7 +2156,7 @@ namespace SoD std::string old_message = &emu->message[strlen(emu->sayer)]; std::string new_message; - ServerToSoDTextLink(new_message, old_message); + ServerToSoDSayLink(new_message, old_message); //in->size = 3 + 4 + 4 + strlen(emu->sayer) + 1 + 12 + new_message.length() + 1; in->size = strlen(emu->sayer) + new_message.length() + 25; @@ -2252,7 +2252,7 @@ namespace SoD std::string old_message = InBuffer; // start 'Reward' as string std::string new_message; - ServerToSoDTextLink(new_message, old_message); + ServerToSoDSayLink(new_message, old_message); in->size = sizeof(TaskDescriptionHeader_Struct) + sizeof(TaskDescriptionData1_Struct)+ sizeof(TaskDescriptionData2_Struct) + sizeof(TaskDescriptionTrailer_Struct)+ @@ -2953,7 +2953,7 @@ namespace SoD std::string old_message = (char *)&__eq_buffer[sizeof(ChannelMessage_Struct)]; std::string new_message; - SoDToServerTextLink(new_message, old_message); + SoDToServerSayLink(new_message, old_message); __packet->size = sizeof(ChannelMessage_Struct) + new_message.length() + 1; __packet->pBuffer = new unsigned char[__packet->size]; @@ -3067,7 +3067,7 @@ namespace SoD std::string old_message = (char *)&__eq_buffer[4]; // unknown01 offset std::string new_message; - SoDToServerTextLink(new_message, old_message); + SoDToServerSayLink(new_message, old_message); __packet->size = sizeof(Emote_Struct); __packet->pBuffer = new unsigned char[__packet->size]; @@ -3917,19 +3917,19 @@ namespace SoD return (sodCorpseSlot - 1); } - static inline void ServerToSoDTextLink(std::string& sodTextLink, const std::string& serverTextLink) + static inline void ServerToSoDSayLink(std::string& sodSayLink, const std::string& serverSayLink) { - if ((constants::SayLinkBodySize == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) { - sodTextLink = serverTextLink; + if ((constants::SayLinkBodySize == EQEmu::constants::SayLinkBodySize) || (serverSayLink.find('\x12') == std::string::npos)) { + sodSayLink = serverSayLink; return; } - auto segments = SplitString(serverTextLink, '\x12'); + auto segments = SplitString(serverSayLink, '\x12'); for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { - if (segments[segment_iter].length() <= EQEmu::legacy::TEXT_LINK_BODY_LENGTH) { - sodTextLink.append(segments[segment_iter]); + if (segments[segment_iter].length() <= EQEmu::constants::SayLinkBodySize) { + sodSayLink.append(segments[segment_iter]); // TODO: log size mismatch error continue; } @@ -3939,37 +3939,37 @@ namespace SoD // SoF: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX X XXXXX XXXXXXXX (50) // Diff: ^^^^^ ^ - sodTextLink.push_back('\x12'); - sodTextLink.append(segments[segment_iter].substr(0, 31)); - sodTextLink.append(segments[segment_iter].substr(36, 5)); + sodSayLink.push_back('\x12'); + sodSayLink.append(segments[segment_iter].substr(0, 31)); + sodSayLink.append(segments[segment_iter].substr(36, 5)); if (segments[segment_iter][41] == '0') - sodTextLink.push_back(segments[segment_iter][42]); + sodSayLink.push_back(segments[segment_iter][42]); else - sodTextLink.push_back('F'); + sodSayLink.push_back('F'); - sodTextLink.append(segments[segment_iter].substr(43)); - sodTextLink.push_back('\x12'); + sodSayLink.append(segments[segment_iter].substr(43)); + sodSayLink.push_back('\x12'); } else { - sodTextLink.append(segments[segment_iter]); + sodSayLink.append(segments[segment_iter]); } } } - static inline void SoDToServerTextLink(std::string& serverTextLink, const std::string& sodTextLink) + static inline void SoDToServerSayLink(std::string& serverSayLink, const std::string& sodSayLink) { - if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == constants::SayLinkBodySize) || (sodTextLink.find('\x12') == std::string::npos)) { - serverTextLink = sodTextLink; + if ((EQEmu::constants::SayLinkBodySize == constants::SayLinkBodySize) || (sodSayLink.find('\x12') == std::string::npos)) { + serverSayLink = sodSayLink; return; } - auto segments = SplitString(sodTextLink, '\x12'); + auto segments = SplitString(sodSayLink, '\x12'); for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { if (segments[segment_iter].length() <= constants::SayLinkBodySize) { - serverTextLink.append(segments[segment_iter]); + serverSayLink.append(segments[segment_iter]); // TODO: log size mismatch error continue; } @@ -3979,16 +3979,16 @@ namespace SoD // RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56) // Diff: ^^^^^ ^ - serverTextLink.push_back('\x12'); - serverTextLink.append(segments[segment_iter].substr(0, 31)); - serverTextLink.append("00000"); - serverTextLink.append(segments[segment_iter].substr(31, 5)); - serverTextLink.push_back('0'); - serverTextLink.append(segments[segment_iter].substr(36)); - serverTextLink.push_back('\x12'); + serverSayLink.push_back('\x12'); + serverSayLink.append(segments[segment_iter].substr(0, 31)); + serverSayLink.append("00000"); + serverSayLink.append(segments[segment_iter].substr(31, 5)); + serverSayLink.push_back('0'); + serverSayLink.append(segments[segment_iter].substr(36)); + serverSayLink.push_back('\x12'); } else { - serverTextLink.append(segments[segment_iter]); + serverSayLink.append(segments[segment_iter]); } } } diff --git a/common/patches/sod_structs.h b/common/patches/sod_structs.h index 1000cb5a3..866418b54 100644 --- a/common/patches/sod_structs.h +++ b/common/patches/sod_structs.h @@ -4385,6 +4385,22 @@ struct MercenaryAssign_Struct { /*0004*/ uint32 MercUnk01; // /*0008*/ uint32 MercUnk02; // /*0012*/ +}; + +struct SayLinkBodyFrame_Struct { +/*000*/ char ActionID[1]; +/*001*/ char ItemID[5]; +/*006*/ char Augment1[5]; +/*011*/ char Augment2[5]; +/*016*/ char Augment3[5]; +/*021*/ char Augment4[5]; +/*026*/ char Augment5[5]; +/*031*/ char IsEvolving[1]; +/*032*/ char EvolveGroup[4]; +/*036*/ char EvolveLevel[1]; +/*037*/ char OrnamentIcon[5]; +/*042*/ char Hash[8]; +/*050*/ }; }; /*structs*/ diff --git a/common/patches/sof.cpp b/common/patches/sof.cpp index bee75b6c2..063d99ca4 100644 --- a/common/patches/sof.cpp +++ b/common/patches/sof.cpp @@ -53,11 +53,11 @@ namespace SoF static inline uint32 SoFToServerSlot(uint32 sofSlot); static inline uint32 SoFToServerCorpseSlot(uint32 sofCorpseSlot); - // server to client text link converter - static inline void ServerToSoFTextLink(std::string& sofTextLink, const std::string& serverTextLink); + // server to client say link converter + static inline void ServerToSoFSayLink(std::string& sofSayLink, const std::string& serverSayLink); - // client to server text link converter - static inline void SoFToServerTextLink(std::string& serverTextLink, const std::string& sofTextLink); + // client to server say link converter + static inline void SoFToServerSayLink(std::string& serverSayLink, const std::string& sofSayLink); static inline CastingSlot ServerToSoFCastingSlot(EQEmu::CastingSlot slot); static inline EQEmu::CastingSlot SoFToServerCastingSlot(CastingSlot slot, uint32 itemlocation); @@ -328,7 +328,7 @@ namespace SoF std::string old_message = emu->message; std::string new_message; - ServerToSoFTextLink(new_message, old_message); + ServerToSoFSayLink(new_message, old_message); in->size = sizeof(ChannelMessage_Struct) + new_message.length() + 1; @@ -613,7 +613,7 @@ namespace SoF std::string old_message = emu->message; std::string new_message; - ServerToSoFTextLink(new_message, old_message); + ServerToSoFSayLink(new_message, old_message); //if (new_message.length() > 512) // length restricted in packet building function due vari-length name size (no nullterm) // new_message = new_message.substr(0, 512); @@ -665,7 +665,7 @@ namespace SoF for (int i = 0; i < 9; ++i) { if (old_message_array[i].length() == 0) { break; } - ServerToSoFTextLink(new_message_array[i], old_message_array[i]); + ServerToSoFSayLink(new_message_array[i], old_message_array[i]); new_message_size += new_message_array[i].length() + 1; } @@ -1814,7 +1814,7 @@ namespace SoF std::string old_message = &emu->message[strlen(emu->sayer)]; std::string new_message; - ServerToSoFTextLink(new_message, old_message); + ServerToSoFSayLink(new_message, old_message); //in->size = 3 + 4 + 4 + strlen(emu->sayer) + 1 + 12 + new_message.length() + 1; in->size = strlen(emu->sayer) + new_message.length() + 25; @@ -1882,7 +1882,7 @@ namespace SoF std::string old_message = InBuffer; // start 'Reward' as string std::string new_message; - ServerToSoFTextLink(new_message, old_message); + ServerToSoFSayLink(new_message, old_message); in->size = sizeof(TaskDescriptionHeader_Struct) + sizeof(TaskDescriptionData1_Struct)+ sizeof(TaskDescriptionData2_Struct) + sizeof(TaskDescriptionTrailer_Struct)+ @@ -2415,7 +2415,7 @@ namespace SoF std::string old_message = (char *)&__eq_buffer[sizeof(ChannelMessage_Struct)]; std::string new_message; - SoFToServerTextLink(new_message, old_message); + SoFToServerSayLink(new_message, old_message); __packet->size = sizeof(ChannelMessage_Struct) + new_message.length() + 1; __packet->pBuffer = new unsigned char[__packet->size]; @@ -2529,7 +2529,7 @@ namespace SoF std::string old_message = (char *)&__eq_buffer[4]; // unknown01 offset std::string new_message; - SoFToServerTextLink(new_message, old_message); + SoFToServerSayLink(new_message, old_message); __packet->size = sizeof(Emote_Struct); __packet->pBuffer = new unsigned char[__packet->size]; @@ -3316,19 +3316,19 @@ namespace SoF return (sofCorpseSlot - 1); } - static inline void ServerToSoFTextLink(std::string& sofTextLink, const std::string& serverTextLink) + static inline void ServerToSoFSayLink(std::string& sofSayLink, const std::string& serverSayLink) { - if ((constants::SayLinkBodySize == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) { - sofTextLink = serverTextLink; + if ((constants::SayLinkBodySize == EQEmu::constants::SayLinkBodySize) || (serverSayLink.find('\x12') == std::string::npos)) { + sofSayLink = serverSayLink; return; } - auto segments = SplitString(serverTextLink, '\x12'); + auto segments = SplitString(serverSayLink, '\x12'); for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { - if (segments[segment_iter].length() <= EQEmu::legacy::TEXT_LINK_BODY_LENGTH) { - sofTextLink.append(segments[segment_iter]); + if (segments[segment_iter].length() <= EQEmu::constants::SayLinkBodySize) { + sofSayLink.append(segments[segment_iter]); // TODO: log size mismatch error continue; } @@ -3338,37 +3338,37 @@ namespace SoF // SoF: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX X XXXXX XXXXXXXX (50) // Diff: ^^^^^ ^ - sofTextLink.push_back('\x12'); - sofTextLink.append(segments[segment_iter].substr(0, 31)); - sofTextLink.append(segments[segment_iter].substr(36, 5)); + sofSayLink.push_back('\x12'); + sofSayLink.append(segments[segment_iter].substr(0, 31)); + sofSayLink.append(segments[segment_iter].substr(36, 5)); if (segments[segment_iter][41] == '0') - sofTextLink.push_back(segments[segment_iter][42]); + sofSayLink.push_back(segments[segment_iter][42]); else - sofTextLink.push_back('F'); + sofSayLink.push_back('F'); - sofTextLink.append(segments[segment_iter].substr(43)); - sofTextLink.push_back('\x12'); + sofSayLink.append(segments[segment_iter].substr(43)); + sofSayLink.push_back('\x12'); } else { - sofTextLink.append(segments[segment_iter]); + sofSayLink.append(segments[segment_iter]); } } } - static inline void SoFToServerTextLink(std::string& serverTextLink, const std::string& sofTextLink) + static inline void SoFToServerSayLink(std::string& serverSayLink, const std::string& sofSayLink) { - if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == constants::SayLinkBodySize) || (sofTextLink.find('\x12') == std::string::npos)) { - serverTextLink = sofTextLink; + if ((EQEmu::constants::SayLinkBodySize == constants::SayLinkBodySize) || (sofSayLink.find('\x12') == std::string::npos)) { + serverSayLink = sofSayLink; return; } - auto segments = SplitString(sofTextLink, '\x12'); + auto segments = SplitString(sofSayLink, '\x12'); for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { if (segments[segment_iter].length() <= constants::SayLinkBodySize) { - serverTextLink.append(segments[segment_iter]); + serverSayLink.append(segments[segment_iter]); // TODO: log size mismatch error continue; } @@ -3378,16 +3378,16 @@ namespace SoF // RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56) // Diff: ^^^^^ ^ - serverTextLink.push_back('\x12'); - serverTextLink.append(segments[segment_iter].substr(0, 31)); - serverTextLink.append("00000"); - serverTextLink.append(segments[segment_iter].substr(31, 5)); - serverTextLink.push_back('0'); - serverTextLink.append(segments[segment_iter].substr(36)); - serverTextLink.push_back('\x12'); + serverSayLink.push_back('\x12'); + serverSayLink.append(segments[segment_iter].substr(0, 31)); + serverSayLink.append("00000"); + serverSayLink.append(segments[segment_iter].substr(31, 5)); + serverSayLink.push_back('0'); + serverSayLink.append(segments[segment_iter].substr(36)); + serverSayLink.push_back('\x12'); } else { - serverTextLink.append(segments[segment_iter]); + serverSayLink.append(segments[segment_iter]); } } } diff --git a/common/patches/sof_structs.h b/common/patches/sof_structs.h index f6298f41d..168dfb123 100644 --- a/common/patches/sof_structs.h +++ b/common/patches/sof_structs.h @@ -4156,6 +4156,22 @@ struct AltCurrencySellItem_Struct { /*004*/ uint32 slot_id; /*006*/ uint32 charges; /*010*/ uint32 cost; +}; + +struct SayLinkBodyFrame_Struct { +/*000*/ char ActionID[1]; +/*001*/ char ItemID[5]; +/*006*/ char Augment1[5]; +/*011*/ char Augment2[5]; +/*016*/ char Augment3[5]; +/*021*/ char Augment4[5]; +/*026*/ char Augment5[5]; +/*031*/ char IsEvolving[1]; +/*032*/ char EvolveGroup[4]; +/*036*/ char EvolveLevel[1]; +/*037*/ char OrnamentIcon[5]; +/*042*/ char Hash[8]; +/*050*/ }; }; /*structs*/ diff --git a/common/patches/titanium.cpp b/common/patches/titanium.cpp index 2c010713d..afff0cea2 100644 --- a/common/patches/titanium.cpp +++ b/common/patches/titanium.cpp @@ -52,11 +52,11 @@ namespace Titanium static inline uint32 TitaniumToServerSlot(int16 titaniumSlot); static inline uint32 TitaniumToServerCorpseSlot(int16 titaniumCorpseSlot); - // server to client text link converter - static inline void ServerToTitaniumTextLink(std::string& titaniumTextLink, const std::string& serverTextLink); + // server to client say link converter + static inline void ServerToTitaniumSayLink(std::string& titaniumSayLink, const std::string& serverSayLink); - // client to server text link converter - static inline void TitaniumToServerTextLink(std::string& serverTextLink, const std::string& titaniumTextLink); + // client to server say link converter + static inline void TitaniumToServerSayLink(std::string& serverSayLink, const std::string& titaniumSayLink); static inline CastingSlot ServerToTitaniumCastingSlot(EQEmu::CastingSlot slot); static inline EQEmu::CastingSlot TitaniumToServerCastingSlot(CastingSlot slot, uint32 itemlocation); @@ -290,7 +290,7 @@ namespace Titanium std::string old_message = emu->message; std::string new_message; - ServerToTitaniumTextLink(new_message, old_message); + ServerToTitaniumSayLink(new_message, old_message); in->size = sizeof(ChannelMessage_Struct) + new_message.length() + 1; @@ -532,7 +532,7 @@ namespace Titanium std::string old_message = emu->message; std::string new_message; - ServerToTitaniumTextLink(new_message, old_message); + ServerToTitaniumSayLink(new_message, old_message); //if (new_message.length() > 512) // length restricted in packet building function due vari-length name size (no nullterm) // new_message = new_message.substr(0, 512); @@ -574,7 +574,7 @@ namespace Titanium for (int i = 0; i < 9; ++i) { if (old_message_array[i].length() == 0) { break; } - ServerToTitaniumTextLink(new_message_array[i], old_message_array[i]); + ServerToTitaniumSayLink(new_message_array[i], old_message_array[i]); new_message_size += new_message_array[i].length() + 1; } @@ -1402,7 +1402,7 @@ namespace Titanium std::string old_message = &emu->message[strlen(emu->sayer)]; std::string new_message; - ServerToTitaniumTextLink(new_message, old_message); + ServerToTitaniumSayLink(new_message, old_message); //in->size = 3 + 4 + 4 + strlen(emu->sayer) + 1 + 12 + new_message.length() + 1; in->size = strlen(emu->sayer) + new_message.length() + 25; @@ -1458,7 +1458,7 @@ namespace Titanium std::string old_message = InBuffer; // start 'Reward' as string std::string new_message; - ServerToTitaniumTextLink(new_message, old_message); + ServerToTitaniumSayLink(new_message, old_message); in->size = sizeof(TaskDescriptionHeader_Struct) + sizeof(TaskDescriptionData1_Struct) + sizeof(TaskDescriptionData2_Struct) + sizeof(TaskDescriptionTrailer_Struct) + @@ -1819,7 +1819,7 @@ namespace Titanium std::string old_message = (char *)&__eq_buffer[sizeof(ChannelMessage_Struct)]; std::string new_message; - TitaniumToServerTextLink(new_message, old_message); + TitaniumToServerSayLink(new_message, old_message); __packet->size = sizeof(ChannelMessage_Struct) + new_message.length() + 1; __packet->pBuffer = new unsigned char[__packet->size]; @@ -1891,7 +1891,7 @@ namespace Titanium std::string old_message = (char *)&__eq_buffer[4]; // unknown01 offset std::string new_message; - TitaniumToServerTextLink(new_message, old_message); + TitaniumToServerSayLink(new_message, old_message); __packet->size = sizeof(Emote_Struct); __packet->pBuffer = new unsigned char[__packet->size]; @@ -2485,19 +2485,19 @@ namespace Titanium return titaniumCorpseSlot; } - static inline void ServerToTitaniumTextLink(std::string& titaniumTextLink, const std::string& serverTextLink) + static inline void ServerToTitaniumSayLink(std::string& titaniumSayLink, const std::string& serverSayLink) { - if ((constants::SayLinkBodySize == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) { - titaniumTextLink = serverTextLink; + if ((constants::SayLinkBodySize == EQEmu::constants::SayLinkBodySize) || (serverSayLink.find('\x12') == std::string::npos)) { + titaniumSayLink = serverSayLink; return; } - auto segments = SplitString(serverTextLink, '\x12'); + auto segments = SplitString(serverSayLink, '\x12'); for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { - if (segments[segment_iter].length() <= EQEmu::legacy::TEXT_LINK_BODY_LENGTH) { - titaniumTextLink.append(segments[segment_iter]); + if (segments[segment_iter].length() <= EQEmu::constants::SayLinkBodySize) { + titaniumSayLink.append(segments[segment_iter]); // TODO: log size mismatch error continue; } @@ -2507,37 +2507,37 @@ namespace Titanium // 6.2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX X XXXXXXXX (45) // Diff: ^^^^^ ^ ^^^^^ - titaniumTextLink.push_back('\x12'); - titaniumTextLink.append(segments[segment_iter].substr(0, 31)); - titaniumTextLink.append(segments[segment_iter].substr(36, 5)); + titaniumSayLink.push_back('\x12'); + titaniumSayLink.append(segments[segment_iter].substr(0, 31)); + titaniumSayLink.append(segments[segment_iter].substr(36, 5)); if (segments[segment_iter][41] == '0') - titaniumTextLink.push_back(segments[segment_iter][42]); + titaniumSayLink.push_back(segments[segment_iter][42]); else - titaniumTextLink.push_back('F'); + titaniumSayLink.push_back('F'); - titaniumTextLink.append(segments[segment_iter].substr(48)); - titaniumTextLink.push_back('\x12'); + titaniumSayLink.append(segments[segment_iter].substr(48)); + titaniumSayLink.push_back('\x12'); } else { - titaniumTextLink.append(segments[segment_iter]); + titaniumSayLink.append(segments[segment_iter]); } } } - static inline void TitaniumToServerTextLink(std::string& serverTextLink, const std::string& titaniumTextLink) + static inline void TitaniumToServerSayLink(std::string& serverSayLink, const std::string& titaniumSayLink) { - if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == constants::SayLinkBodySize) || (titaniumTextLink.find('\x12') == std::string::npos)) { - serverTextLink = titaniumTextLink; + if ((EQEmu::constants::SayLinkBodySize == constants::SayLinkBodySize) || (titaniumSayLink.find('\x12') == std::string::npos)) { + serverSayLink = titaniumSayLink; return; } - auto segments = SplitString(titaniumTextLink, '\x12'); + auto segments = SplitString(titaniumSayLink, '\x12'); for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { if (segments[segment_iter].length() <= constants::SayLinkBodySize) { - serverTextLink.append(segments[segment_iter]); + serverSayLink.append(segments[segment_iter]); // TODO: log size mismatch error continue; } @@ -2547,18 +2547,18 @@ namespace Titanium // RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56) // Diff: ^^^^^ ^ ^^^^^ - serverTextLink.push_back('\x12'); - serverTextLink.append(segments[segment_iter].substr(0, 31)); - serverTextLink.append("00000"); - serverTextLink.append(segments[segment_iter].substr(31, 5)); - serverTextLink.push_back('0'); - serverTextLink.push_back(segments[segment_iter][36]); - serverTextLink.append("00000"); - serverTextLink.append(segments[segment_iter].substr(37)); - serverTextLink.push_back('\x12'); + serverSayLink.push_back('\x12'); + serverSayLink.append(segments[segment_iter].substr(0, 31)); + serverSayLink.append("00000"); + serverSayLink.append(segments[segment_iter].substr(31, 5)); + serverSayLink.push_back('0'); + serverSayLink.push_back(segments[segment_iter][36]); + serverSayLink.append("00000"); + serverSayLink.append(segments[segment_iter].substr(37)); + serverSayLink.push_back('\x12'); } else { - serverTextLink.append(segments[segment_iter]); + serverSayLink.append(segments[segment_iter]); } } } diff --git a/common/patches/titanium_structs.h b/common/patches/titanium_structs.h index 3a2787500..ea698acf0 100644 --- a/common/patches/titanium_structs.h +++ b/common/patches/titanium_structs.h @@ -3565,6 +3565,21 @@ struct LFGuild_GuildToggle_Struct // char ScrollName; // '0' //}; +struct SayLinkBodyFrame_Struct { +/*000*/ char ActionID[1]; +/*001*/ char ItemID[5]; +/*006*/ char Augment1[5]; +/*011*/ char Augment2[5]; +/*016*/ char Augment3[5]; +/*021*/ char Augment4[5]; +/*026*/ char Augment5[5]; +/*031*/ char IsEvolving[1]; +/*032*/ char EvolveGroup[4]; +/*036*/ char EvolveLevel[1]; +/*037*/ char Hash[8]; +/*045*/ +}; + }; /*structs*/ }; /*Titanium*/ diff --git a/common/patches/uf.cpp b/common/patches/uf.cpp index cf0c17176..176e737b7 100644 --- a/common/patches/uf.cpp +++ b/common/patches/uf.cpp @@ -53,11 +53,11 @@ namespace UF static inline uint32 UFToServerSlot(uint32 ufSlot); static inline uint32 UFToServerCorpseSlot(uint32 ufCorpseSlot); - // server to client text link converter - static inline void ServerToUFTextLink(std::string& ufTextLink, const std::string& serverTextLink); + // server to client say link converter + static inline void ServerToUFSayLink(std::string& ufSayLink, const std::string& serverSayLink); - // client to server text link converter - static inline void UFToServerTextLink(std::string& serverTextLink, const std::string& ufTextLink); + // client to server say link converter + static inline void UFToServerSayLink(std::string& serverSayLink, const std::string& ufSayLink); static inline CastingSlot ServerToUFCastingSlot(EQEmu::CastingSlot slot); static inline EQEmu::CastingSlot UFToServerCastingSlot(CastingSlot slot); @@ -463,7 +463,7 @@ namespace UF std::string old_message = emu->message; std::string new_message; - ServerToUFTextLink(new_message, old_message); + ServerToUFSayLink(new_message, old_message); //in->size = strlen(emu->sender) + 1 + strlen(emu->targetname) + 1 + strlen(emu->message) + 1 + 36; in->size = strlen(emu->sender) + strlen(emu->targetname) + new_message.length() + 39; @@ -762,7 +762,7 @@ namespace UF std::string old_message = emu->message; std::string new_message; - ServerToUFTextLink(new_message, old_message); + ServerToUFSayLink(new_message, old_message); //if (new_message.length() > 512) // length restricted in packet building function due vari-length name size (no nullterm) // new_message = new_message.substr(0, 512); @@ -814,7 +814,7 @@ namespace UF for (int i = 0; i < 9; ++i) { if (old_message_array[i].length() == 0) { break; } - ServerToUFTextLink(new_message_array[i], old_message_array[i]); + ServerToUFSayLink(new_message_array[i], old_message_array[i]); new_message_size += new_message_array[i].length() + 1; } @@ -2469,7 +2469,7 @@ namespace UF std::string old_message = &emu->message[strlen(emu->sayer)]; std::string new_message; - ServerToUFTextLink(new_message, old_message); + ServerToUFSayLink(new_message, old_message); //in->size = 3 + 4 + 4 + strlen(emu->sayer) + 1 + 12 + new_message.length() + 1; in->size = strlen(emu->sayer) + new_message.length() + 25; @@ -2539,7 +2539,7 @@ namespace UF std::string old_message = InBuffer; // start 'Reward' as string std::string new_message; - ServerToUFTextLink(new_message, old_message); + ServerToUFSayLink(new_message, old_message); in->size = sizeof(TaskDescriptionHeader_Struct) + sizeof(TaskDescriptionData1_Struct)+ sizeof(TaskDescriptionData2_Struct) + sizeof(TaskDescriptionTrailer_Struct)+ @@ -3287,7 +3287,7 @@ namespace UF std::string old_message = InBuffer; std::string new_message; - UFToServerTextLink(new_message, old_message); + UFToServerSayLink(new_message, old_message); //__packet->size = sizeof(ChannelMessage_Struct)+strlen(InBuffer) + 1; __packet->size = sizeof(ChannelMessage_Struct) + new_message.length() + 1; @@ -3421,7 +3421,7 @@ namespace UF std::string old_message = (char *)&__eq_buffer[4]; // unknown01 offset std::string new_message; - UFToServerTextLink(new_message, old_message); + UFToServerSayLink(new_message, old_message); __packet->size = sizeof(Emote_Struct); __packet->pBuffer = new unsigned char[__packet->size]; @@ -4290,19 +4290,19 @@ namespace UF return (ufCorpseSlot - 1); } - static inline void ServerToUFTextLink(std::string& ufTextLink, const std::string& serverTextLink) + static inline void ServerToUFSayLink(std::string& ufSayLink, const std::string& serverSayLink) { - if ((constants::SayLinkBodySize == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) { - ufTextLink = serverTextLink; + if ((constants::SayLinkBodySize == EQEmu::constants::SayLinkBodySize) || (serverSayLink.find('\x12') == std::string::npos)) { + ufSayLink = serverSayLink; return; } - auto segments = SplitString(serverTextLink, '\x12'); + auto segments = SplitString(serverSayLink, '\x12'); for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { - if (segments[segment_iter].length() <= EQEmu::legacy::TEXT_LINK_BODY_LENGTH) { - ufTextLink.append(segments[segment_iter]); + if (segments[segment_iter].length() <= EQEmu::constants::SayLinkBodySize) { + ufSayLink.append(segments[segment_iter]); // TODO: log size mismatch error continue; } @@ -4312,37 +4312,37 @@ namespace UF // SoF: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX X XXXXX XXXXXXXX (50) // Diff: ^^^^^ ^ - ufTextLink.push_back('\x12'); - ufTextLink.append(segments[segment_iter].substr(0, 31)); - ufTextLink.append(segments[segment_iter].substr(36, 5)); + ufSayLink.push_back('\x12'); + ufSayLink.append(segments[segment_iter].substr(0, 31)); + ufSayLink.append(segments[segment_iter].substr(36, 5)); if (segments[segment_iter][41] == '0') - ufTextLink.push_back(segments[segment_iter][42]); + ufSayLink.push_back(segments[segment_iter][42]); else - ufTextLink.push_back('F'); + ufSayLink.push_back('F'); - ufTextLink.append(segments[segment_iter].substr(43)); - ufTextLink.push_back('\x12'); + ufSayLink.append(segments[segment_iter].substr(43)); + ufSayLink.push_back('\x12'); } else { - ufTextLink.append(segments[segment_iter]); + ufSayLink.append(segments[segment_iter]); } } } - static inline void UFToServerTextLink(std::string& serverTextLink, const std::string& ufTextLink) + static inline void UFToServerSayLink(std::string& serverSayLink, const std::string& ufSayLink) { - if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == constants::SayLinkBodySize) || (ufTextLink.find('\x12') == std::string::npos)) { - serverTextLink = ufTextLink; + if ((EQEmu::constants::SayLinkBodySize == constants::SayLinkBodySize) || (ufSayLink.find('\x12') == std::string::npos)) { + serverSayLink = ufSayLink; return; } - auto segments = SplitString(ufTextLink, '\x12'); + auto segments = SplitString(ufSayLink, '\x12'); for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { if (segments[segment_iter].length() <= constants::SayLinkBodySize) { - serverTextLink.append(segments[segment_iter]); + serverSayLink.append(segments[segment_iter]); // TODO: log size mismatch error continue; } @@ -4352,16 +4352,16 @@ namespace UF // RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56) // Diff: ^^^^^ ^ - serverTextLink.push_back('\x12'); - serverTextLink.append(segments[segment_iter].substr(0, 31)); - serverTextLink.append("00000"); - serverTextLink.append(segments[segment_iter].substr(31, 5)); - serverTextLink.push_back('0'); - serverTextLink.append(segments[segment_iter].substr(36)); - serverTextLink.push_back('\x12'); + serverSayLink.push_back('\x12'); + serverSayLink.append(segments[segment_iter].substr(0, 31)); + serverSayLink.append("00000"); + serverSayLink.append(segments[segment_iter].substr(31, 5)); + serverSayLink.push_back('0'); + serverSayLink.append(segments[segment_iter].substr(36)); + serverSayLink.push_back('\x12'); } else { - serverTextLink.append(segments[segment_iter]); + serverSayLink.append(segments[segment_iter]); } } } diff --git a/common/patches/uf_structs.h b/common/patches/uf_structs.h index 256169d67..8a03144c9 100644 --- a/common/patches/uf_structs.h +++ b/common/patches/uf_structs.h @@ -4489,6 +4489,22 @@ struct MercenaryAssign_Struct { /*0004*/ uint32 MercUnk01; // /*0008*/ uint32 MercUnk02; // /*0012*/ +}; + +struct SayLinkBodyFrame_Struct { +/*000*/ char ActionID[1]; +/*001*/ char ItemID[5]; +/*006*/ char Augment1[5]; +/*011*/ char Augment2[5]; +/*016*/ char Augment3[5]; +/*021*/ char Augment4[5]; +/*026*/ char Augment5[5]; +/*031*/ char IsEvolving[1]; +/*032*/ char EvolveGroup[4]; +/*036*/ char EvolveLevel[1]; +/*037*/ char OrnamentIcon[5]; +/*042*/ char Hash[8]; +/*050*/ }; }; /*structs*/ diff --git a/common/say_link.cpp b/common/say_link.cpp index 923e53407..e2b43c107 100644 --- a/common/say_link.cpp +++ b/common/say_link.cpp @@ -29,10 +29,10 @@ bool EQEmu::saylink::DegenerateLinkBody(SayLinkBody_Struct& say_link_body_struct, const std::string& say_link_body) { memset(&say_link_body_struct, 0, sizeof(say_link_body_struct)); - if (say_link_body.length() != EQEmu::legacy::TEXT_LINK_BODY_LENGTH) + if (say_link_body.length() != EQEmu::constants::SayLinkBodySize) return false; - say_link_body_struct.unknown_1 = (uint8)strtol(say_link_body.substr(0, 1).c_str(), nullptr, 16); + say_link_body_struct.action_id = (uint8)strtol(say_link_body.substr(0, 1).c_str(), nullptr, 16); say_link_body_struct.item_id = (uint32)strtol(say_link_body.substr(1, 5).c_str(), nullptr, 16); say_link_body_struct.augment_1 = (uint32)strtol(say_link_body.substr(6, 5).c_str(), nullptr, 16); say_link_body_struct.augment_2 = (uint32)strtol(say_link_body.substr(11, 5).c_str(), nullptr, 16); @@ -44,7 +44,7 @@ bool EQEmu::saylink::DegenerateLinkBody(SayLinkBody_Struct& say_link_body_struct say_link_body_struct.evolve_group = (uint32)strtol(say_link_body.substr(37, 4).c_str(), nullptr, 16); say_link_body_struct.evolve_level = (uint8)strtol(say_link_body.substr(41, 2).c_str(), nullptr, 16); say_link_body_struct.ornament_icon = (uint32)strtol(say_link_body.substr(43, 5).c_str(), nullptr, 16); - say_link_body_struct.hash = (int)strtol(say_link_body.substr(48, 8).c_str(), nullptr, 16); + say_link_body_struct.hash = (uint32)strtol(say_link_body.substr(48, 8).c_str(), nullptr, 16); return true; } @@ -53,7 +53,7 @@ bool EQEmu::saylink::GenerateLinkBody(std::string& say_link_body, const SayLinkB { say_link_body = StringFormat( "%1X" "%05X" "%05X" "%05X" "%05X" "%05X" "%05X" "%05X" "%1X" "%04X" "%02X" "%05X" "%08X", - (0x0F & say_link_body_struct.unknown_1), + (0x0F & say_link_body_struct.action_id), (0x000FFFFF & say_link_body_struct.item_id), (0x000FFFFF & say_link_body_struct.augment_1), (0x000FFFFF & say_link_body_struct.augment_2), @@ -68,7 +68,7 @@ bool EQEmu::saylink::GenerateLinkBody(std::string& say_link_body, const SayLinkB (0xFFFFFFFF & say_link_body_struct.hash) ); - if (say_link_body.length() != EQEmu::legacy::TEXT_LINK_BODY_LENGTH) + if (say_link_body.length() != EQEmu::constants::SayLinkBodySize) return false; return true; @@ -79,7 +79,7 @@ EQEmu::SayLinkEngine::SayLinkEngine() Reset(); } -std::string EQEmu::SayLinkEngine::GenerateLink() +const std::string& EQEmu::SayLinkEngine::GenerateLink() { m_Link.clear(); m_LinkBody.clear(); @@ -88,18 +88,26 @@ std::string EQEmu::SayLinkEngine::GenerateLink() generate_body(); generate_text(); - if ((m_LinkBody.length() == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) && (m_LinkText.length() > 0)) { + if ((m_LinkBody.length() == EQEmu::constants::SayLinkBodySize) && (m_LinkText.length() > 0)) { m_Link.push_back(0x12); m_Link.append(m_LinkBody); m_Link.append(m_LinkText); m_Link.push_back(0x12); } - if ((m_Link.length() == 0) || (m_Link.length() > 250)) { + if ((m_Link.length() == 0) || (m_Link.length() > (EQEmu::constants::SayLinkMaximumSize))) { m_Error = true; m_Link = ""; - Log(Logs::General, Logs::Error, "TextLink::GenerateLink() failed to generate a useable text link (LinkType: %i, Lengths: {link: %u, body: %u, text: %u})", - m_LinkType, m_Link.length(), m_LinkBody.length(), m_LinkText.length()); + Log(Logs::General, Logs::Error, "SayLinkEngine::GenerateLink() failed to generate a useable say link"); + Log(Logs::General, Logs::Error, ">> LinkType: %i, Lengths: {link: %u(%u), body: %u(%u), text: %u(%u)}", + m_LinkType, + m_Link.length(), + EQEmu::constants::SayLinkMaximumSize, + m_LinkBody.length(), + EQEmu::constants::SayLinkBodySize, + m_LinkText.length(), + EQEmu::constants::SayLinkTextSize + ); Log(Logs::General, Logs::Error, ">> LinkBody: %s", m_LinkBody.c_str()); Log(Logs::General, Logs::Error, ">> LinkText: %s", m_LinkText.c_str()); } @@ -113,20 +121,10 @@ void EQEmu::SayLinkEngine::Reset() m_ItemData = nullptr; m_LootData = nullptr; m_ItemInst = nullptr; - m_Proxy_unknown_1 = 0; - m_ProxyItemID = 0; - m_ProxyAugment1ID = 0; - m_ProxyAugment2ID = 0; - m_ProxyAugment3ID = 0; - m_ProxyAugment4ID = 0; - m_ProxyAugment5ID = 0; - m_ProxyAugment6ID = 0; - m_ProxyIsEvolving = 0; - m_ProxyEvolveGroup = 0; - m_ProxyEvolveLevel = 0; - m_ProxyOrnamentIcon = 0; - m_ProxyHash = 0; - m_ProxyText = nullptr; + + memset(&m_LinkBodyStruct, 0, sizeof(SayLinkBody_Struct)); + memset(&m_LinkProxyStruct, 0, sizeof(SayLinkProxy_Struct)); + m_TaskUse = false; m_Link.clear(); m_LinkBody.clear(); @@ -194,32 +192,32 @@ void EQEmu::SayLinkEngine::generate_body() break; } - if (m_Proxy_unknown_1) - m_LinkBodyStruct.unknown_1 = m_Proxy_unknown_1; - if (m_ProxyItemID) - m_LinkBodyStruct.item_id = m_ProxyItemID; - if (m_ProxyAugment1ID) - m_LinkBodyStruct.augment_1 = m_ProxyAugment1ID; - if (m_ProxyAugment2ID) - m_LinkBodyStruct.augment_2 = m_ProxyAugment2ID; - if (m_ProxyAugment3ID) - m_LinkBodyStruct.augment_3 = m_ProxyAugment3ID; - if (m_ProxyAugment4ID) - m_LinkBodyStruct.augment_4 = m_ProxyAugment4ID; - if (m_ProxyAugment5ID) - m_LinkBodyStruct.augment_5 = m_ProxyAugment5ID; - if (m_ProxyAugment6ID) - m_LinkBodyStruct.augment_6 = m_ProxyAugment6ID; - if (m_ProxyIsEvolving) - m_LinkBodyStruct.is_evolving = m_ProxyIsEvolving; - if (m_ProxyEvolveGroup) - m_LinkBodyStruct.evolve_group = m_ProxyEvolveGroup; - if (m_ProxyEvolveLevel) - m_LinkBodyStruct.evolve_level = m_ProxyEvolveLevel; - if (m_ProxyOrnamentIcon) - m_LinkBodyStruct.ornament_icon = m_ProxyOrnamentIcon; - if (m_ProxyHash) - m_LinkBodyStruct.hash = m_ProxyHash; + if (m_LinkProxyStruct.action_id) + m_LinkBodyStruct.action_id = m_LinkProxyStruct.action_id; + if (m_LinkProxyStruct.item_id) + m_LinkBodyStruct.item_id = m_LinkProxyStruct.item_id; + if (m_LinkProxyStruct.augment_1) + m_LinkBodyStruct.augment_1 = m_LinkProxyStruct.augment_1; + if (m_LinkProxyStruct.augment_2) + m_LinkBodyStruct.augment_2 = m_LinkProxyStruct.augment_2; + if (m_LinkProxyStruct.augment_3) + m_LinkBodyStruct.augment_3 = m_LinkProxyStruct.augment_3; + if (m_LinkProxyStruct.augment_4) + m_LinkBodyStruct.augment_4 = m_LinkProxyStruct.augment_4; + if (m_LinkProxyStruct.augment_5) + m_LinkBodyStruct.augment_5 = m_LinkProxyStruct.augment_5; + if (m_LinkProxyStruct.augment_6) + m_LinkBodyStruct.augment_6 = m_LinkProxyStruct.augment_6; + if (m_LinkProxyStruct.is_evolving) + m_LinkBodyStruct.is_evolving = m_LinkProxyStruct.is_evolving; + if (m_LinkProxyStruct.evolve_group) + m_LinkBodyStruct.evolve_group = m_LinkProxyStruct.evolve_group; + if (m_LinkProxyStruct.evolve_level) + m_LinkBodyStruct.evolve_level = m_LinkProxyStruct.evolve_level; + if (m_LinkProxyStruct.ornament_icon) + m_LinkBodyStruct.ornament_icon = m_LinkProxyStruct.ornament_icon; + if (m_LinkProxyStruct.hash) + m_LinkBodyStruct.hash = m_LinkProxyStruct.hash; if (m_TaskUse) @@ -227,7 +225,7 @@ void EQEmu::SayLinkEngine::generate_body() m_LinkBody = StringFormat( "%1X" "%05X" "%05X" "%05X" "%05X" "%05X" "%05X" "%05X" "%1X" "%04X" "%02X" "%05X" "%08X", - (0x0F & m_LinkBodyStruct.unknown_1), + (0x0F & m_LinkBodyStruct.action_id), (0x000FFFFF & m_LinkBodyStruct.item_id), (0x000FFFFF & m_LinkBodyStruct.augment_1), (0x000FFFFF & m_LinkBodyStruct.augment_2), @@ -245,8 +243,8 @@ void EQEmu::SayLinkEngine::generate_body() void EQEmu::SayLinkEngine::generate_text() { - if (m_ProxyText != nullptr) { - m_LinkText = m_ProxyText; + if (m_LinkProxyStruct.text != nullptr) { + m_LinkText = m_LinkProxyStruct.text; return; } diff --git a/common/say_link.h b/common/say_link.h index 6bc3e5535..55e3a8237 100644 --- a/common/say_link.h +++ b/common/say_link.h @@ -47,7 +47,7 @@ namespace EQEmu } /*saylink*/ struct SayLinkBody_Struct { - uint8 unknown_1; /* %1X */ + uint8 action_id; /* %1X */ uint32 item_id; /* %05X */ uint32 augment_1; /* %05X */ uint32 augment_2; /* %05X */ @@ -56,13 +56,18 @@ namespace EQEmu uint32 augment_5; /* %05X */ uint32 augment_6; /* %05X */ uint8 is_evolving; /* %1X */ - uint32 evolve_group; /* %05X */ + uint32 evolve_group; /* %04X */ uint8 evolve_level; /* %02X */ uint32 ornament_icon; /* %05X */ - int hash; /* %08X */ + uint32 hash; /* %08X */ + }; + + struct SayLinkProxy_Struct : SayLinkBody_Struct { + const char* text; }; class SayLinkEngine { + // TODO: consider methods for direct 'saylink' assignments public: SayLinkEngine(); @@ -72,29 +77,29 @@ namespace EQEmu void SetItemInst(const ItemInstance* item_inst) { m_ItemInst = item_inst; } // mainly for saylinks..but, not limited to - void SetProxyUnknown1(uint8 proxy_unknown_1) { m_Proxy_unknown_1 = proxy_unknown_1; } - void SetProxyItemID(uint32 proxy_item_id) { m_ProxyItemID = proxy_item_id; } - void SetProxyAugment1ID(uint32 proxy_augment_id) { m_ProxyAugment1ID = proxy_augment_id; } - void SetProxyAugment2ID(uint32 proxy_augment_id) { m_ProxyAugment2ID = proxy_augment_id; } - void SetProxyAugment3ID(uint32 proxy_augment_id) { m_ProxyAugment3ID = proxy_augment_id; } - void SetProxyAugment4ID(uint32 proxy_augment_id) { m_ProxyAugment4ID = proxy_augment_id; } - void SetProxyAugment5ID(uint32 proxy_augment_id) { m_ProxyAugment5ID = proxy_augment_id; } - void SetProxyAugment6ID(uint32 proxy_augment_id) { m_ProxyAugment6ID = proxy_augment_id; } - void SetProxyIsEvolving(uint8 proxy_is_evolving) { m_ProxyIsEvolving = proxy_is_evolving; } - void SetProxyEvolveGroup(uint32 proxy_evolve_group) { m_ProxyEvolveGroup = proxy_evolve_group; } - void SetProxyEvolveLevel(uint8 proxy_evolve_level) { m_ProxyEvolveLevel = proxy_evolve_level; } - void SetProxyOrnamentIcon(uint32 proxy_ornament_icon) { m_ProxyOrnamentIcon = proxy_ornament_icon; } - void SetProxyHash(int proxy_hash) { m_ProxyHash = proxy_hash; } + void SetProxyActionID(uint8 proxy_action_id) { m_LinkProxyStruct.action_id = proxy_action_id; } // should always be '0' + void SetProxyItemID(uint32 proxy_item_id) { m_LinkProxyStruct.item_id = proxy_item_id; } + void SetProxyAugment1ID(uint32 proxy_augment_id) { m_LinkProxyStruct.augment_1 = proxy_augment_id; } + void SetProxyAugment2ID(uint32 proxy_augment_id) { m_LinkProxyStruct.augment_2 = proxy_augment_id; } + void SetProxyAugment3ID(uint32 proxy_augment_id) { m_LinkProxyStruct.augment_3 = proxy_augment_id; } + void SetProxyAugment4ID(uint32 proxy_augment_id) { m_LinkProxyStruct.augment_4 = proxy_augment_id; } + void SetProxyAugment5ID(uint32 proxy_augment_id) { m_LinkProxyStruct.augment_5 = proxy_augment_id; } + void SetProxyAugment6ID(uint32 proxy_augment_id) { m_LinkProxyStruct.augment_6 = proxy_augment_id; } + void SetProxyIsEvolving(uint8 proxy_is_evolving) { m_LinkProxyStruct.is_evolving = proxy_is_evolving; } + void SetProxyEvolveGroup(uint32 proxy_evolve_group) { m_LinkProxyStruct.evolve_group = proxy_evolve_group; } + void SetProxyEvolveLevel(uint8 proxy_evolve_level) { m_LinkProxyStruct.evolve_level = proxy_evolve_level; } + void SetProxyOrnamentIcon(uint32 proxy_ornament_icon) { m_LinkProxyStruct.ornament_icon = proxy_ornament_icon; } + void SetProxyHash(uint32 proxy_hash) { m_LinkProxyStruct.hash = proxy_hash; } - void SetProxyText(const char* proxy_text) { m_ProxyText = proxy_text; } // overrides standard text use + void SetProxyText(const char* proxy_text) { m_LinkProxyStruct.text = proxy_text; } // overrides standard text use void SetTaskUse() { m_TaskUse = true; } - std::string GenerateLink(); + const std::string& GenerateLink(); bool LinkError() { return m_Error; } - std::string Link() { return m_Link; } // contains full string format: '/12x' '' '' '/12x' - std::string LinkBody() { return m_LinkBody; } // contains string format: '' - std::string LinkText() { return m_LinkText; } // contains string format: '' + const std::string& Link() { return m_Link; } // contains full string format: '\x12' '' '' '\x12' + const std::string& LinkBody() { return m_LinkBody; } // contains string format: '' + const std::string& LinkText() { return m_LinkText; } // contains string format: '' void Reset(); @@ -106,23 +111,9 @@ namespace EQEmu const ItemData* m_ItemData; const ServerLootItem_Struct* m_LootData; const ItemInstance* m_ItemInst; - - uint8 m_Proxy_unknown_1; - uint32 m_ProxyItemID; - uint32 m_ProxyAugment1ID; - uint32 m_ProxyAugment2ID; - uint32 m_ProxyAugment3ID; - uint32 m_ProxyAugment4ID; - uint32 m_ProxyAugment5ID; - uint32 m_ProxyAugment6ID; - uint8 m_ProxyIsEvolving; - uint32 m_ProxyEvolveGroup; - uint8 m_ProxyEvolveLevel; - uint32 m_ProxyOrnamentIcon; - int m_ProxyHash; - const char* m_ProxyText; - bool m_TaskUse; SayLinkBody_Struct m_LinkBodyStruct; + SayLinkProxy_Struct m_LinkProxyStruct; + bool m_TaskUse; std::string m_Link; std::string m_LinkBody; std::string m_LinkText; diff --git a/zone/bot.cpp b/zone/bot.cpp index 95ecf7885..8751d40f7 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -8894,6 +8894,8 @@ bool Bot::DyeArmor(int16 slot_id, uint32 rgb, bool all_flag, bool save_flag) std::string Bot::CreateSayLink(Client* c, const char* message, const char* name) { + // TODO: review + int saylink_size = strlen(message); char* escaped_string = new char[saylink_size * 2]; diff --git a/zone/bot_command.cpp b/zone/bot_command.cpp index cd5e727d0..a91624df1 100644 --- a/zone/bot_command.cpp +++ b/zone/bot_command.cpp @@ -7085,7 +7085,6 @@ void bot_subcommand_inventory_list(Client *c, const Seperator *sep) const EQEmu::ItemData* item = nullptr; bool is2Hweapon = false; - std::string item_link; EQEmu::SayLinkEngine linker; linker.SetLinkType(EQEmu::saylink::SayLinkItemInst); @@ -7106,8 +7105,7 @@ void bot_subcommand_inventory_list(Client *c, const Seperator *sep) } linker.SetItemInst(inst); - item_link = linker.GenerateLink(); - c->Message(m_message, "Using %s in my %s (slot %i)", item_link.c_str(), GetBotEquipSlotName(i), (i == 22 ? EQEmu::inventory::slotPowerSource : i)); + c->Message(m_message, "Using %s in my %s (slot %i)", linker.GenerateLink().c_str(), GetBotEquipSlotName(i), (i == 22 ? EQEmu::inventory::slotPowerSource : i)); ++inventory_count; } @@ -7250,8 +7248,8 @@ void bot_subcommand_inventory_window(Client *c, const Seperator *sep) std::string window_text; //std::string item_link; - //Client::TextLink linker; - //linker.SetLinkType(linker.linkItemInst); + //EQEmu::SayLinkEngine linker; + //linker.SetLinkType(EQEmu::saylink::SayLinkItemInst); for (int i = EQEmu::legacy::EQUIPMENT_BEGIN; i <= (EQEmu::legacy::EQUIPMENT_END + 1); ++i) { const EQEmu::ItemData* item = nullptr; diff --git a/zone/client.cpp b/zone/client.cpp index 69c43ef5a..a62b94c43 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -7907,7 +7907,7 @@ void Client::GarbleMessage(char *message, uint8 variance) for (size_t i = 0; i < strlen(message); i++) { // Client expects hex values inside of a text link body if (message[i] == delimiter) { - if (!(delimiter_count & 1)) { i += EQEmu::legacy::TEXT_LINK_BODY_LENGTH; } + if (!(delimiter_count & 1)) { i += EQEmu::constants::SayLinkBodySize; } ++delimiter_count; continue; } diff --git a/zone/command.cpp b/zone/command.cpp index dcfecce7a..1fee0e26d 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -2549,7 +2549,7 @@ void command_peekinv(Client *c, const Seperator *sep) const EQEmu::ItemInstance* inst_main = nullptr; const EQEmu::ItemInstance* inst_sub = nullptr; const EQEmu::ItemData* item_data = nullptr; - std::string item_link; + EQEmu::SayLinkEngine linker; linker.SetLinkType(EQEmu::saylink::SayLinkItemInst); @@ -2561,10 +2561,8 @@ void command_peekinv(Client *c, const Seperator *sep) item_data = (inst_main == nullptr) ? nullptr : inst_main->GetItem(); linker.SetItemInst(inst_main); - item_link = linker.GenerateLink(); - c->Message((item_data == nullptr), "WornSlot: %i, Item: %i (%s), Charges: %i", - indexMain, ((item_data == nullptr) ? 0 : item_data->ID), item_link.c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges())); + indexMain, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges())); } if ((scopeWhere & peekWorn) && (targetClient->ClientVersion() >= EQEmu::versions::ClientVersion::SoF)) { @@ -2572,10 +2570,8 @@ void command_peekinv(Client *c, const Seperator *sep) item_data = (inst_main == nullptr) ? nullptr : inst_main->GetItem(); linker.SetItemInst(inst_main); - item_link = linker.GenerateLink(); - c->Message((item_data == nullptr), "WornSlot: %i, Item: %i (%s), Charges: %i", - EQEmu::inventory::slotPowerSource, ((item_data == nullptr) ? 0 : item_data->ID), item_link.c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges())); + EQEmu::inventory::slotPowerSource, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges())); } // inv @@ -2584,20 +2580,16 @@ void command_peekinv(Client *c, const Seperator *sep) item_data = (inst_main == nullptr) ? nullptr : inst_main->GetItem(); linker.SetItemInst(inst_main); - item_link = linker.GenerateLink(); - c->Message((item_data == nullptr), "InvSlot: %i, Item: %i (%s), Charges: %i", - indexMain, ((item_data == nullptr) ? 0 : item_data->ID), item_link.c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges())); + indexMain, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges())); for (uint8 indexSub = EQEmu::inventory::containerBegin; inst_main && inst_main->IsClassBag() && (indexSub < EQEmu::inventory::ContainerCount); ++indexSub) { inst_sub = inst_main->GetItem(indexSub); item_data = (inst_sub == nullptr) ? nullptr : inst_sub->GetItem(); linker.SetItemInst(inst_sub); - item_link = linker.GenerateLink(); - c->Message((item_data == nullptr), " InvBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i", - EQEmu::InventoryProfile::CalcSlotId(indexMain, indexSub), indexMain, indexSub, ((item_data == nullptr) ? 0 : item_data->ID), item_link.c_str(), ((inst_sub == nullptr) ? 0 : inst_sub->GetCharges())); + EQEmu::InventoryProfile::CalcSlotId(indexMain, indexSub), indexMain, indexSub, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_sub == nullptr) ? 0 : inst_sub->GetCharges())); } } @@ -2606,10 +2598,8 @@ void command_peekinv(Client *c, const Seperator *sep) if (targetClient->GetInv().CursorEmpty()) { linker.SetItemInst(nullptr); - item_link = linker.GenerateLink(); - c->Message(1, "CursorSlot: %i, Item: %i (%s), Charges: %i", - EQEmu::inventory::slotCursor, 0, item_link.c_str(), 0); + EQEmu::inventory::slotCursor, 0, linker.GenerateLink().c_str(), 0); } else { int cursorDepth = 0; @@ -2618,20 +2608,16 @@ void command_peekinv(Client *c, const Seperator *sep) item_data = (inst_main == nullptr) ? nullptr : inst_main->GetItem(); linker.SetItemInst(inst_main); - item_link = linker.GenerateLink(); - c->Message((item_data == nullptr), "CursorSlot: %i, Depth: %i, Item: %i (%s), Charges: %i", - EQEmu::inventory::slotCursor, cursorDepth, ((item_data == nullptr) ? 0 : item_data->ID), item_link.c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges())); + EQEmu::inventory::slotCursor, cursorDepth, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges())); for (uint8 indexSub = EQEmu::inventory::containerBegin; (cursorDepth == 0) && inst_main && inst_main->IsClassBag() && (indexSub < EQEmu::inventory::ContainerCount); ++indexSub) { inst_sub = inst_main->GetItem(indexSub); item_data = (inst_sub == nullptr) ? nullptr : inst_sub->GetItem(); linker.SetItemInst(inst_sub); - item_link = linker.GenerateLink(); - c->Message((item_data == nullptr), " CursorBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i", - EQEmu::InventoryProfile::CalcSlotId(EQEmu::inventory::slotCursor, indexSub), EQEmu::inventory::slotCursor, indexSub, ((item_data == nullptr) ? 0 : item_data->ID), item_link.c_str(), ((inst_sub == nullptr) ? 0 : inst_sub->GetCharges())); + EQEmu::InventoryProfile::CalcSlotId(EQEmu::inventory::slotCursor, indexSub), EQEmu::inventory::slotCursor, indexSub, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_sub == nullptr) ? 0 : inst_sub->GetCharges())); } } } @@ -2643,10 +2629,8 @@ void command_peekinv(Client *c, const Seperator *sep) item_data = (inst_main == nullptr) ? nullptr : inst_main->GetItem(); linker.SetItemInst(inst_main); - item_link = linker.GenerateLink(); - c->Message((item_data == nullptr), "TributeSlot: %i, Item: %i (%s), Charges: %i", - indexMain, ((item_data == nullptr) ? 0 : item_data->ID), item_link.c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges())); + indexMain, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges())); } // bank @@ -2655,20 +2639,16 @@ void command_peekinv(Client *c, const Seperator *sep) item_data = (inst_main == nullptr) ? nullptr : inst_main->GetItem(); linker.SetItemInst(inst_main); - item_link = linker.GenerateLink(); - c->Message((item_data == nullptr), "BankSlot: %i, Item: %i (%s), Charges: %i", - indexMain, ((item_data == nullptr) ? 0 : item_data->ID), item_link.c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges())); + indexMain, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges())); for (uint8 indexSub = EQEmu::inventory::containerBegin; inst_main && inst_main->IsClassBag() && (indexSub < EQEmu::inventory::ContainerCount); ++indexSub) { inst_sub = inst_main->GetItem(indexSub); item_data = (inst_sub == nullptr) ? nullptr : inst_sub->GetItem(); linker.SetItemInst(inst_sub); - item_link = linker.GenerateLink(); - c->Message((item_data == nullptr), " BankBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i", - EQEmu::InventoryProfile::CalcSlotId(indexMain, indexSub), indexMain, indexSub, ((item_data == nullptr) ? 0 : item_data->ID), item_link.c_str(), ((inst_sub == nullptr) ? 0 : inst_sub->GetCharges())); + EQEmu::InventoryProfile::CalcSlotId(indexMain, indexSub), indexMain, indexSub, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_sub == nullptr) ? 0 : inst_sub->GetCharges())); } } @@ -2677,20 +2657,16 @@ void command_peekinv(Client *c, const Seperator *sep) item_data = (inst_main == nullptr) ? nullptr : inst_main->GetItem(); linker.SetItemInst(inst_main); - item_link = linker.GenerateLink(); - c->Message((item_data == nullptr), "SharedBankSlot: %i, Item: %i (%s), Charges: %i", - indexMain, ((item_data == nullptr) ? 0 : item_data->ID), item_link.c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges())); + indexMain, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges())); for (uint8 indexSub = EQEmu::inventory::containerBegin; inst_main && inst_main->IsClassBag() && (indexSub < EQEmu::inventory::ContainerCount); ++indexSub) { inst_sub = inst_main->GetItem(indexSub); item_data = (inst_sub == nullptr) ? nullptr : inst_sub->GetItem(); linker.SetItemInst(inst_sub); - item_link = linker.GenerateLink(); - c->Message((item_data == nullptr), " SharedBankBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i", - EQEmu::InventoryProfile::CalcSlotId(indexMain, indexSub), indexMain, indexSub, ((item_data == nullptr) ? 0 : item_data->ID), item_link.c_str(), ((inst_sub == nullptr) ? 0 : inst_sub->GetCharges())); + EQEmu::InventoryProfile::CalcSlotId(indexMain, indexSub), indexMain, indexSub, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_sub == nullptr) ? 0 : inst_sub->GetCharges())); } } @@ -2700,20 +2676,16 @@ void command_peekinv(Client *c, const Seperator *sep) item_data = (inst_main == nullptr) ? nullptr : inst_main->GetItem(); linker.SetItemInst(inst_main); - item_link = linker.GenerateLink(); - c->Message((item_data == nullptr), "TradeSlot: %i, Item: %i (%s), Charges: %i", - indexMain, ((item_data == nullptr) ? 0 : item_data->ID), item_link.c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges())); + indexMain, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges())); for (uint8 indexSub = EQEmu::inventory::containerBegin; inst_main && inst_main->IsClassBag() && (indexSub < EQEmu::inventory::ContainerCount); ++indexSub) { inst_sub = inst_main->GetItem(indexSub); item_data = (inst_sub == nullptr) ? nullptr : inst_sub->GetItem(); linker.SetItemInst(inst_sub); - item_link = linker.GenerateLink(); - c->Message((item_data == nullptr), " TradeBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i", - EQEmu::InventoryProfile::CalcSlotId(indexMain, indexSub), indexMain, indexSub, ((item_data == nullptr) ? 0 : item_data->ID), item_link.c_str(), ((inst_sub == nullptr) ? 0 : inst_sub->GetCharges())); + EQEmu::InventoryProfile::CalcSlotId(indexMain, indexSub), indexMain, indexSub, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_sub == nullptr) ? 0 : inst_sub->GetCharges())); } } @@ -2732,20 +2704,16 @@ void command_peekinv(Client *c, const Seperator *sep) item_data = (inst_main == nullptr) ? nullptr : inst_main->GetItem(); linker.SetItemInst(inst_main); - item_link = linker.GenerateLink(); - c->Message((item_data == nullptr), "WorldSlot: %i, Item: %i (%s), Charges: %i", - (EQEmu::legacy::WORLD_BEGIN + indexMain), ((item_data == nullptr) ? 0 : item_data->ID), item_link.c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges())); + (EQEmu::legacy::WORLD_BEGIN + indexMain), ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges())); for (uint8 indexSub = EQEmu::inventory::containerBegin; inst_main && inst_main->IsType(EQEmu::item::ItemClassBag) && (indexSub < EQEmu::inventory::ContainerCount); ++indexSub) { inst_sub = inst_main->GetItem(indexSub); item_data = (inst_sub == nullptr) ? nullptr : inst_sub->GetItem(); linker.SetItemInst(inst_sub); - item_link = linker.GenerateLink(); - c->Message((item_data == nullptr), " WorldBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i", - INVALID_INDEX, indexMain, indexSub, ((item_data == nullptr) ? 0 : item_data->ID), item_link.c_str(), ((inst_sub == nullptr) ? 0 : inst_sub->GetCharges())); + INVALID_INDEX, indexMain, indexSub, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_sub == nullptr) ? 0 : inst_sub->GetCharges())); } } } @@ -4400,9 +4368,7 @@ void command_iteminfo(Client *c, const Seperator *sep) linker.SetLinkType(EQEmu::saylink::SayLinkItemInst); linker.SetItemInst(inst); - auto item_link = linker.GenerateLink(); - - c->Message(0, "*** Item Info for [%s] ***", item_link.c_str()); + c->Message(0, "*** Item Info for [%s] ***", linker.GenerateLink().c_str()); c->Message(0, ">> ID: %u, ItemUseType: %u, ItemClassType: %u", item->ID, item->ItemType, item->ItemClass); c->Message(0, ">> IDFile: '%s', IconID: %u", item->IDFile, item->Icon); c->Message(0, ">> Size: %u, Weight: %u, Price: %u, LDoNPrice: %u", item->Size, item->Weight, item->Price, item->LDoNPrice); @@ -5546,9 +5512,9 @@ void command_summonitem(Client *c, const Seperator *sep) std::string cmd_msg = sep->msg; size_t link_open = cmd_msg.find('\x12'); size_t link_close = cmd_msg.find_last_of('\x12'); - if (link_open != link_close && (cmd_msg.length() - link_open) > EQEmu::legacy::TEXT_LINK_BODY_LENGTH) { + if (link_open != link_close && (cmd_msg.length() - link_open) > EQEmu::constants::SayLinkBodySize) { EQEmu::SayLinkBody_Struct link_body; - EQEmu::saylink::DegenerateLinkBody(link_body, cmd_msg.substr(link_open + 1, EQEmu::legacy::TEXT_LINK_BODY_LENGTH)); + EQEmu::saylink::DegenerateLinkBody(link_body, cmd_msg.substr(link_open + 1, EQEmu::constants::SayLinkBodySize)); itemid = link_body.item_id; } else if (!sep->IsNumber(1)) { @@ -5657,7 +5623,6 @@ void command_itemsearch(Client *c, const Seperator *sep) const char *search_criteria=sep->argplus[1]; const EQEmu::ItemData* item = nullptr; - std::string item_link; EQEmu::SayLinkEngine linker; linker.SetLinkType(EQEmu::saylink::SayLinkItemData); @@ -5666,9 +5631,7 @@ void command_itemsearch(Client *c, const Seperator *sep) if (item) { linker.SetItemData(item); - item_link = linker.GenerateLink(); - - c->Message(0, "%u: %s", item->ID, item_link.c_str()); + c->Message(0, "%u: %s", item->ID, linker.GenerateLink().c_str()); } else { c->Message(0, "Item #%s not found", search_criteria); @@ -5691,9 +5654,7 @@ void command_itemsearch(Client *c, const Seperator *sep) if (pdest != nullptr) { linker.SetItemData(item); - item_link = linker.GenerateLink(); - - c->Message(0, "%u: %s", item->ID, item_link.c_str()); + c->Message(0, "%u: %s", item->ID, linker.GenerateLink().c_str()); ++count; } diff --git a/zone/corpse.cpp b/zone/corpse.cpp index a8f3e7ba1..63031ec45 100644 --- a/zone/corpse.cpp +++ b/zone/corpse.cpp @@ -1253,20 +1253,20 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app) linker.SetLinkType(EQEmu::saylink::SayLinkItemInst); linker.SetItemInst(inst); - auto item_link = linker.GenerateLink(); + linker.GenerateLink(); - client->Message_StringID(MT_LootMessages, LOOTED_MESSAGE, item_link.c_str()); + client->Message_StringID(MT_LootMessages, LOOTED_MESSAGE, linker.Link().c_str()); if (!IsPlayerCorpse()) { Group *g = client->GetGroup(); if (g != nullptr) { g->GroupMessage_StringID(client, MT_LootMessages, OTHER_LOOTED_MESSAGE, - client->GetName(), item_link.c_str()); + client->GetName(), linker.Link().c_str()); } else { Raid *r = client->GetRaid(); if (r != nullptr) { r->RaidMessage_StringID(client, MT_LootMessages, OTHER_LOOTED_MESSAGE, - client->GetName(), item_link.c_str()); + client->GetName(), linker.Link().c_str()); } } } diff --git a/zone/inventory.cpp b/zone/inventory.cpp index 49e8e83b5..17cfc1aa1 100644 --- a/zone/inventory.cpp +++ b/zone/inventory.cpp @@ -1326,7 +1326,7 @@ int Client::GetItemLinkHash(const EQEmu::ItemInstance* inst) { return hash; } -// This appears to still be in use... The core of this should be incorporated into class Client::TextLink +// This appears to still be in use... The core of this should be incorporated into class EQEmu::SayLinkEngine void Client::SendItemLink(const EQEmu::ItemInstance* inst, bool send_to_all) { /* diff --git a/zone/npc.cpp b/zone/npc.cpp index 9f50e7ff9..0fcc1e17d 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -583,9 +583,7 @@ void NPC::QueryLoot(Client* to) linker.SetLinkType(EQEmu::saylink::SayLinkLootItem); linker.SetLootData(*cur); - auto item_link = linker.GenerateLink(); - - to->Message(0, "%s, ID: %u, Level: (min: %u, max: %u)", item_link.c_str(), (*cur)->item_id, (*cur)->min_level, (*cur)->max_level); + to->Message(0, "%s, ID: %u, Level: (min: %u, max: %u)", linker.GenerateLink().c_str(), (*cur)->item_id, (*cur)->min_level, (*cur)->max_level); } to->Message(0, "%i items on %s.", x, GetName()); diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index 6c0bdfe0a..27e76813d 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -1319,9 +1319,7 @@ void QuestManager::itemlink(int item_id) { linker.SetLinkType(EQEmu::saylink::SayLinkItemData); linker.SetItemData(item); - auto item_link = linker.GenerateLink(); - - initiator->Message(0, "%s tells you, %s", owner->GetCleanName(), item_link.c_str()); + initiator->Message(0, "%s tells you, %s", owner->GetCleanName(), linker.GenerateLink().c_str()); } } @@ -2549,9 +2547,8 @@ const char* QuestManager::varlink(char* perltext, int item_id) { linker.SetLinkType(EQEmu::saylink::SayLinkItemData); linker.SetItemData(item); - auto item_link = linker.GenerateLink(); - strcpy(perltext, item_link.c_str()); // link length is currently ranged from 1 to 250 in TextLink::GenerateLink() - + strcpy(perltext, linker.GenerateLink().c_str()); + return perltext; } @@ -2773,8 +2770,7 @@ const char* QuestManager::saylink(char* Phrase, bool silent, const char* LinkNam linker.SetProxyAugment1ID(sayid); linker.SetProxyText(LinkName); - auto say_link = linker.GenerateLink(); - strcpy(Phrase, say_link.c_str()); // link length is currently ranged from 1 to 250 in TextLink::GenerateLink() + strcpy(Phrase, linker.GenerateLink().c_str()); return Phrase; } diff --git a/zone/tasks.cpp b/zone/tasks.cpp index bcddfcf0a..06e3b4c59 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -2804,8 +2804,7 @@ void TaskManager::SendActiveTaskDescription(Client *c, int TaskID, int SequenceN if (strlen(Tasks[TaskID]->Reward) != 0) linker.SetProxyText(Tasks[TaskID]->Reward); - auto reward_link = linker.GenerateLink(); - reward_text.append(reward_link); + reward_text.append(linker.GenerateLink()); } else { reward_text.append(Tasks[TaskID]->Reward); From 6c2a8edea6e131d937504fc3b0de609cd937f843 Mon Sep 17 00:00:00 2001 From: Uleat Date: Sun, 25 Feb 2018 21:40:45 -0500 Subject: [PATCH 087/670] Added ClientVersion request system to UCS server (needed to fix saylinks) --- common/emu_versions.h | 4 +- common/ruletypes.h | 2 + common/servertalk.h | 11 ++++++ ucs/clientlist.cpp | 85 +++++++++++++++++++++++++++++++++++++++++++ ucs/clientlist.h | 18 +++++++++ ucs/ucs.cpp | 5 +++ ucs/worldserver.cpp | 18 +++++++++ ucs/worldserver.h | 2 + world/client.cpp | 8 ++++ world/client.h | 1 + world/ucs.cpp | 8 ++++ world/zoneserver.cpp | 1 + zone/worldserver.cpp | 14 +++++++ 13 files changed, 175 insertions(+), 2 deletions(-) diff --git a/common/emu_versions.h b/common/emu_versions.h index 9d9e1f580..9ab5becde 100644 --- a/common/emu_versions.h +++ b/common/emu_versions.h @@ -28,7 +28,7 @@ namespace EQEmu { namespace versions { - enum class ClientVersion { + enum class ClientVersion : uint32 { Unknown = 0, Client62, // Build: 'Aug 4 2005 15:40:59' Titanium, // Build: 'Oct 31 2005 10:33:37' @@ -72,7 +72,7 @@ namespace EQEmu uint32 ConvertClientVersionToExpansion(ClientVersion client_version); - enum class MobVersion { + enum class MobVersion : uint32 { Unknown = 0, Client62, Titanium, diff --git a/common/ruletypes.h b/common/ruletypes.h index b6acffc3c..ea220a511 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -613,6 +613,8 @@ RULE_INT(Chat, IntervalDurationMS, 60000) RULE_INT(Chat, KarmaUpdateIntervalMS, 1200000) RULE_INT(Chat, KarmaGlobalChatLimit, 72) //amount of karma you need to be able to talk in ooc/auction/chat below the level limit RULE_INT(Chat, GlobalChatLevelLimit, 8) //level limit you need to of reached to talk in ooc/auction/chat if your karma is too low. +RULE_INT(Chat, ExpireClientVersionRequests, 3) // time in seconds to keep current cv requests active +RULE_INT(Chat, ExpireClientVersionReplies, 30) // time in seconds to keep current cv replies active RULE_CATEGORY_END() RULE_CATEGORY(Merchant) diff --git a/common/servertalk.h b/common/servertalk.h index f5965cd74..36e973195 100644 --- a/common/servertalk.h +++ b/common/servertalk.h @@ -190,6 +190,8 @@ #define ServerOP_ReloadLogs 0x4010 #define ServerOP_ReloadPerlExportSettings 0x4011 #define ServerOP_CZSetEntityVariableByClientName 0x4012 +#define ServerOP_UCSClientVersionRequest 0x4013 +#define ServerOP_UCSClientVersionReply 0x4014 /* Query Server OP Codes */ #define ServerOP_QSPlayerLogTrades 0x5010 #define ServerOP_QSPlayerLogHandins 0x5011 @@ -1278,6 +1280,15 @@ struct ServerRequestTellQueue_Struct { char name[64]; }; +struct UCSClientVersionRequest_Struct { + uint32 character_id; +}; + +struct UCSClientVersionReply_Struct { + uint32 character_id; + EQEmu::versions::ClientVersion client_version; +}; + #pragma pack() #endif diff --git a/ucs/clientlist.cpp b/ucs/clientlist.cpp index 998410ec1..751cf4089 100644 --- a/ucs/clientlist.cpp +++ b/ucs/clientlist.cpp @@ -512,7 +512,9 @@ Client::Client(std::shared_ptr eqs) { AccountGrabUpdateTimer = new Timer(60000); //check every minute GlobalChatLimiterTimer = new Timer(RuleI(Chat, IntervalDurationMS)); + RawConnectionType = '\0'; TypeOfConnection = ConnectionTypeUnknown; + ClientVersion_ = EQEmu::versions::ClientVersion::Unknown; UnderfootOrLater = false; } @@ -643,6 +645,10 @@ void Clientlist::Process() database.GetAccountStatus((*it)); + // give world packet a chance to arrive and be processed + if ((*it)->GetCharID()) + ClientVersionRequestQueue[(*it)->GetCharID()] = (Timer::GetCurrentTime() + (RuleI(Chat, ExpireClientVersionRequests) * 1000)); + if ((*it)->GetConnectionType() == ConnectionTypeCombined) (*it)->SendFriends(); @@ -681,8 +687,35 @@ void Clientlist::Process() it = ClientChatConnections.erase(it); continue; } + + // initiate request if we don't already have a reply from 'world enter' (ucs crash recovery protocol) + if ((*it)->GetClientVersion() == EQEmu::versions::ClientVersion::Unknown) { + if (!CheckForClientVersionReply((*it))) + RequestClientVersion((*it)->GetCharID()); + } + ++it; } + + // delete expired replies + auto repiter = ClientVersionReplyQueue.begin(); + while (repiter != ClientVersionReplyQueue.end()) { + if ((*repiter).second.second <= Timer::GetCurrentTime()) { + repiter = ClientVersionReplyQueue.erase(repiter); + continue; + } + ++repiter; + } + + // delete expired requests + auto reqiter = ClientVersionRequestQueue.begin(); + while (reqiter != ClientVersionRequestQueue.end()) { + if ((*reqiter).second <= Timer::GetCurrentTime()) { + reqiter = ClientVersionRequestQueue.erase(reqiter); + continue; + } + ++reqiter; + } } void Clientlist::ProcessOPMailCommand(Client *c, std::string CommandString) @@ -840,6 +873,55 @@ void Clientlist::ProcessOPMailCommand(Client *c, std::string CommandString) } } +void Clientlist::RequestClientVersion(uint32 character_id) { + if (!character_id) + return; + + if (ClientVersionRequestQueue.find(character_id) != ClientVersionRequestQueue.end()) { + if (ClientVersionRequestQueue[character_id] > Timer::GetCurrentTime()) + return; + } + + if (LogSys.log_settings[Logs::UCS_Server].is_category_enabled) { + Log(Logs::Detail, Logs::UCS_Server, "Requesting ClientVersion reply for character id: %u", + character_id); + } + ClientVersionRequestIDs.push_back(character_id); + ClientVersionRequestQueue[character_id] = (Timer::GetCurrentTime() + (RuleI(Chat, ExpireClientVersionRequests) * 1000)); +} + +bool Clientlist::QueueClientVersionReply(uint32 character_id, EQEmu::versions::ClientVersion client_version) { + if (!character_id) + return true; + if (client_version == EQEmu::versions::ClientVersion::Unknown) + return false; + + if (LogSys.log_settings[Logs::UCS_Server].is_category_enabled) { + Log(Logs::Detail, Logs::UCS_Server, "Queueing ClientVersion %u reply for character id: %u", + static_cast(client_version), character_id); + } + ClientVersionReplyQueue[character_id] = cvt_pair(client_version, (Timer::GetCurrentTime() + (RuleI(Chat, ExpireClientVersionReplies) * 1000))); + ClientVersionRequestQueue.erase(character_id); + + return true; +} + +bool Clientlist::CheckForClientVersionReply(Client* c) { + if (!c) + return true; + if (ClientVersionReplyQueue.find(c->GetCharID()) == ClientVersionReplyQueue.end()) + return false; + + if (LogSys.log_settings[Logs::UCS_Server].is_category_enabled) { + Log(Logs::General, Logs::UCS_Server, "Registering ClientVersion %s for stream %s:%u", + EQEmu::versions::ClientVersionName(ClientVersionReplyQueue[c->GetCharID()].first), c->ClientStream->GetRemoteAddr().c_str(), c->ClientStream->GetRemotePort()); + } + c->SetClientVersion(ClientVersionReplyQueue[c->GetCharID()].first); + ClientVersionReplyQueue.erase(c->GetCharID()); + + return true; +} + void Clientlist::CloseAllConnections() { @@ -2132,6 +2214,8 @@ void Client::AccountUpdate() void Client::SetConnectionType(char c) { + RawConnectionType = c; + switch (c) { case 'S': @@ -2161,6 +2245,7 @@ void Client::SetConnectionType(char c) { } default: { + RawConnectionType = '\0'; TypeOfConnection = ConnectionTypeUnknown; Log(Logs::Detail, Logs::UCS_Server, "Connection type is unknown."); } diff --git a/ucs/clientlist.h b/ucs/clientlist.h index 9b72df51a..f84bdc8a2 100644 --- a/ucs/clientlist.h +++ b/ucs/clientlist.h @@ -139,8 +139,13 @@ public: std::string MailBoxName(); int GetMailBoxNumber() { return CurrentMailBox; } int GetMailBoxNumber(std::string CharacterName); + + char GetRawConnectionType() { return RawConnectionType; } void SetConnectionType(char c); ConnectionType GetConnectionType() { return TypeOfConnection; } + void SetClientVersion(EQEmu::versions::ClientVersion client_version) { ClientVersion_ = client_version; } + EQEmu::versions::ClientVersion GetClientVersion() { return ClientVersion_; } + inline bool IsMailConnection() { return (TypeOfConnection == ConnectionTypeMail) || (TypeOfConnection == ConnectionTypeCombined); } void SendNotification(int MailBoxNumber, std::string From, std::string Subject, int MessageID); void ChangeMailBox(int NewMailBox); @@ -167,7 +172,10 @@ private: Timer *GlobalChatLimiterTimer; //60 seconds int AttemptedMessages; bool ForceDisconnect; + + char RawConnectionType; ConnectionType TypeOfConnection; + EQEmu::versions::ClientVersion ClientVersion_; bool UnderfootOrLater; }; @@ -182,12 +190,22 @@ public: Client *IsCharacterOnline(std::string CharacterName); void ProcessOPMailCommand(Client *c, std::string CommandString); + std::list ClientVersionRequestIDs; + + void RequestClientVersion(uint32 character_id); + bool QueueClientVersionReply(uint32 character_id, EQEmu::versions::ClientVersion client_version); + bool CheckForClientVersionReply(Client* c); + private: + typedef std::pair cvt_pair; EQ::Net::EQStreamManager *chatsf; std::list ClientChatConnections; + std::map ClientVersionRequestQueue; + std::map ClientVersionReplyQueue; + OpcodeManager *ChatOpMgr; }; diff --git a/ucs/ucs.cpp b/ucs/ucs.cpp index b9e7f41b4..1fbfec995 100644 --- a/ucs/ucs.cpp +++ b/ucs/ucs.cpp @@ -140,12 +140,17 @@ int main() { worldserver = new WorldServer; + // now that we can send packets to world, see if there's a + // broadcast opcode that tells the client to relog into ucs + while(RunLoops) { Timer::SetCurrentTime(); g_Clientlist->Process(); + worldserver->ProcessClientVersionRequests(g_Clientlist->ClientVersionRequestIDs); + if(ChannelListProcessTimer.Check()) ChannelList->Process(); diff --git a/ucs/worldserver.cpp b/ucs/worldserver.cpp index 141211032..b5251b64c 100644 --- a/ucs/worldserver.cpp +++ b/ucs/worldserver.cpp @@ -114,5 +114,23 @@ void WorldServer::ProcessMessage(uint16 opcode, EQ::Net::Packet &p) std::string()); break; } + + case ServerOP_UCSClientVersionReply: + { + UCSClientVersionReply_Struct* cvr = (UCSClientVersionReply_Struct*)pack->pBuffer; + g_Clientlist->QueueClientVersionReply(cvr->character_id, cvr->client_version); + break; + } } } + +void WorldServer::ProcessClientVersionRequests(std::list& id_list) { + UCSClientVersionRequest_Struct cvr; + EQ::Net::DynamicPacket dp_cvr; + for (auto iter : id_list) { + cvr.character_id = iter; + dp_cvr.PutData(0, &cvr, sizeof(cvr)); + m_connection->Send(ServerOP_UCSClientVersionRequest, dp_cvr); + } + id_list.clear(); +} diff --git a/ucs/worldserver.h b/ucs/worldserver.h index aad68e085..53f52823a 100644 --- a/ucs/worldserver.h +++ b/ucs/worldserver.h @@ -29,6 +29,8 @@ public: ~WorldServer(); void ProcessMessage(uint16 opcode, EQ::Net::Packet &); + void ProcessClientVersionRequests(std::list& id_list); + private: std::unique_ptr m_connection; diff --git a/world/client.cpp b/world/client.cpp index aaf7d4c9c..d904e1d2d 100644 --- a/world/client.cpp +++ b/world/client.cpp @@ -1215,6 +1215,14 @@ void Client::EnterWorld(bool TryBootup) { wtz->response = 0; zone_server->SendPacket(pack); delete pack; + + UCSClientVersionReply_Struct cvr; + cvr.character_id = GetCharID(); + cvr.client_version = GetClientVersion(); + EQ::Net::DynamicPacket dp_cvr; + dp_cvr.PutData(0, &cvr, sizeof(cvr)); + zone_server->HandleMessage(ServerOP_UCSClientVersionReply, dp_cvr); + } else { // if they havent seen character select screen, we can assume this is a zone // to zone movement, which should be preauthorized before they leave the previous zone diff --git a/world/client.h b/world/client.h index 88dc27c57..d36dc692d 100644 --- a/world/client.h +++ b/world/client.h @@ -68,6 +68,7 @@ public: inline const char* GetLSKey() { if (cle) { return cle->GetLSKey(); } return "NOKEY"; } inline uint32 GetCharID() { return charid; } inline const char* GetCharName() { return char_name; } + inline EQEmu::versions::ClientVersion GetClientVersion() { return m_ClientVersion; } inline ClientListEntry* GetCLE() { return cle; } inline void SetCLE(ClientListEntry* iCLE) { cle = iCLE; } private: diff --git a/world/ucs.cpp b/world/ucs.cpp index b745005d4..dfa8e116a 100644 --- a/world/ucs.cpp +++ b/world/ucs.cpp @@ -2,11 +2,14 @@ #include "../common/eqemu_logsys.h" #include "ucs.h" #include "world_config.h" +#include "zonelist.h" #include "../common/misc_functions.h" #include "../common/md5.h" #include "../common/packet_dump.h" +extern ZSList zoneserver_list; + UCSConnection::UCSConnection() { Stream = 0; @@ -49,6 +52,11 @@ void UCSConnection::ProcessPacket(uint16 opcode, EQ::Net::Packet &p) Log(Logs::Detail, Logs::UCS_Server, "Got authentication from UCS when they are already authenticated."); break; } + case ServerOP_UCSClientVersionRequest: + { + zoneserver_list.SendPacket(pack); + break; + } default: { Log(Logs::Detail, Logs::UCS_Server, "Unknown ServerOPcode from UCS 0x%04x, size %d", opcode, pack->size); diff --git a/world/zoneserver.cpp b/world/zoneserver.cpp index 4de771701..061ee6b72 100644 --- a/world/zoneserver.cpp +++ b/world/zoneserver.cpp @@ -1262,6 +1262,7 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) { break; } + case ServerOP_UCSClientVersionReply: case ServerOP_UCSMailMessage: { UCSLink.SendPacket(pack); diff --git a/zone/worldserver.cpp b/zone/worldserver.cpp index 6417b9c1d..1f771d131 100644 --- a/zone/worldserver.cpp +++ b/zone/worldserver.cpp @@ -1813,6 +1813,20 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) break; } + case ServerOP_UCSClientVersionRequest: + { + UCSClientVersionRequest_Struct* cvreq = (UCSClientVersionRequest_Struct*)pack->pBuffer; + Client* c = entity_list.GetClientByCharID(cvreq->character_id); + if (c) { + UCSClientVersionReply_Struct cvrep; + cvrep.character_id = c->CharacterID(); + cvrep.client_version = c->ClientVersion(); + EQ::Net::DynamicPacket dp_cvrep; + dp_cvrep.PutData(0, &cvrep, sizeof(cvrep)); + worldserver.m_connection->Send(ServerOP_UCSClientVersionReply, dp_cvrep); + } + break; + } case ServerOP_CZSetEntityVariableByNPCTypeID: { CZSetEntVarByNPCTypeID_Struct* CZM = (CZSetEntVarByNPCTypeID_Struct*)pack->pBuffer; From 008b17aaf261b5920cba6b98d265578a2e364d1e Mon Sep 17 00:00:00 2001 From: Xackery Date: Mon, 26 Feb 2018 09:33:15 -0800 Subject: [PATCH 088/670] added minimum level to pvp flag. --- common/ruletypes.h | 1 + zone/client.cpp | 2 +- zone/exp.cpp | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/common/ruletypes.h b/common/ruletypes.h index b6acffc3c..d80996184 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -234,6 +234,7 @@ RULE_INT(World, TitaniumStartZoneID, -1) //Sets the Starting Zone for Titanium C RULE_INT(World, ExpansionSettings, 16383) // Sets the expansion settings for the server, This is sent on login to world and affects client expansion settings. Defaults to all expansions enabled up to TSS. RULE_BOOL(World, UseClientBasedExpansionSettings, true) // if true it will overrule World, ExpansionSettings and set someone's expansion based on the client they're using RULE_INT(World, PVPSettings, 0) // Sets the PVP settings for the server, 1 = Rallos Zek RuleSet, 2 = Tallon/Vallon Zek Ruleset, 4 = Sullon Zek Ruleset, 6 = Discord Ruleset, anything above 6 is the Discord Ruleset without the no-drop restrictions removed. TODO: Edit IsAttackAllowed in Zone to accomodate for these rules. +RULE_INT(World, PVPMinLevel, 0) // minimum level to pvp RULE_BOOL (World, IsGMPetitionWindowEnabled, false) RULE_INT (World, FVNoDropFlag, 0) // Sets the Firiona Vie settings on the client. If set to 2, the flag will be set for GMs only, allowing trading of no-drop items. RULE_BOOL (World, IPLimitDisconnectAll, false) diff --git a/zone/client.cpp b/zone/client.cpp index 69c43ef5a..b507bbb99 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -254,7 +254,7 @@ Client::Client(EQStreamInterface* ieqs) mercSlot = 0; InitializeMercInfo(); SetMerc(0); - + if (RuleI(World, PVPMinLevel) > 0 && level >= RuleI(World, PVPMinLevel) && m_pp.pvp == 0) SetPVP(true, false); logging_enabled = CLIENT_DEFAULT_LOGGING_ENABLED; //for good measure: diff --git a/zone/exp.cpp b/zone/exp.cpp index be9d01c13..2902610a8 100644 --- a/zone/exp.cpp +++ b/zone/exp.cpp @@ -831,6 +831,8 @@ void Client::SetLevel(uint8 set_level, bool command) SetHP(CalcMaxHP()); // Why not, lets give them a free heal } + if (RuleI(World, PVPMinLevel) > 0 && level >= RuleI(World, PVPMinLevel) && m_pp.pvp == 0) SetPVP(true); + DoTributeUpdate(); SendHPUpdate(); SetMana(CalcMaxMana()); From 464c1cb584c171418a2d866d2785b6e7b38a71e5 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Mon, 26 Feb 2018 13:53:33 -0500 Subject: [PATCH 089/670] quest::npcfeature() could not set all features --- zone/questmgr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index c77e96979..1c15c54dc 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -1981,8 +1981,8 @@ void QuestManager::npcfeature(char *feature, int setting) QuestManagerCurrentQuestVars(); uint16 Race = owner->GetRace(); uint8 Gender = owner->GetGender(); - uint8 Texture = 0xFF; - uint8 HelmTexture = 0xFF; + uint8 Texture = owner->GetTexture(); + uint8 HelmTexture = owner->GetHelmTexture(); uint8 HairColor = owner->GetHairColor(); uint8 BeardColor = owner->GetBeardColor(); uint8 EyeColor1 = owner->GetEyeColor1(); From e547a1e778fe548a2c851ff6de22d820e4406d29 Mon Sep 17 00:00:00 2001 From: Uleat Date: Mon, 26 Feb 2018 20:02:27 -0500 Subject: [PATCH 090/670] Added 'server ready' broadcast to UCS server so clients will reconnect after crash --- common/ruletypes.h | 1 + common/servertalk.h | 6 ++++++ common/shareddb.cpp | 17 +++++++++++++++ common/shareddb.h | 1 + ucs/ucs.cpp | 6 ++++-- ucs/worldserver.cpp | 36 +++++++++++++++++++++++++++++++ ucs/worldserver.h | 5 +++++ world/ucs.cpp | 1 + world/worlddb.cpp | 17 --------------- world/worlddb.h | 1 - zone/worldserver.cpp | 51 ++++++++++++++++++++++++++++++++++++++++++++ 11 files changed, 122 insertions(+), 20 deletions(-) diff --git a/common/ruletypes.h b/common/ruletypes.h index ea220a511..ed51f4474 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -615,6 +615,7 @@ RULE_INT(Chat, KarmaGlobalChatLimit, 72) //amount of karma you need to be able t RULE_INT(Chat, GlobalChatLevelLimit, 8) //level limit you need to of reached to talk in ooc/auction/chat if your karma is too low. RULE_INT(Chat, ExpireClientVersionRequests, 3) // time in seconds to keep current cv requests active RULE_INT(Chat, ExpireClientVersionReplies, 30) // time in seconds to keep current cv replies active +RULE_INT(Chat, UCSBroadcastServerReadyDelay, 60) // time in seconds to delay broadcast `server ready` after start-up RULE_CATEGORY_END() RULE_CATEGORY(Merchant) diff --git a/common/servertalk.h b/common/servertalk.h index 36e973195..82f39319f 100644 --- a/common/servertalk.h +++ b/common/servertalk.h @@ -192,6 +192,7 @@ #define ServerOP_CZSetEntityVariableByClientName 0x4012 #define ServerOP_UCSClientVersionRequest 0x4013 #define ServerOP_UCSClientVersionReply 0x4014 +#define ServerOP_UCSBroadcastServerReady 0x4015 /* Query Server OP Codes */ #define ServerOP_QSPlayerLogTrades 0x5010 #define ServerOP_QSPlayerLogHandins 0x5011 @@ -1289,6 +1290,11 @@ struct UCSClientVersionReply_Struct { EQEmu::versions::ClientVersion client_version; }; +struct UCSBroadcastServerReady_Struct { + char chat_prefix[128]; + char mail_prefix[128]; +}; + #pragma pack() #endif diff --git a/common/shareddb.cpp b/common/shareddb.cpp index 09c936425..4a82c32da 100644 --- a/common/shareddb.cpp +++ b/common/shareddb.cpp @@ -110,6 +110,23 @@ uint32 SharedDatabase::GetTotalTimeEntitledOnAccount(uint32 AccountID) { return EntitledTime; } +void SharedDatabase::SetMailKey(int CharID, int IPAddress, int MailKey) +{ + char MailKeyString[17]; + + if (RuleB(Chat, EnableMailKeyIPVerification) == true) + sprintf(MailKeyString, "%08X%08X", IPAddress, MailKey); + else + sprintf(MailKeyString, "%08X", MailKey); + + std::string query = StringFormat("UPDATE character_data SET mailkey = '%s' WHERE id = '%i'", + MailKeyString, CharID); + auto results = QueryDatabase(query); + if (!results.Success()) + Log(Logs::General, Logs::Error, "SharedDatabase::SetMailKey(%i, %s) : %s", CharID, MailKeyString, results.ErrorMessage().c_str()); + +} + bool SharedDatabase::SaveCursor(uint32 char_id, std::list::const_iterator &start, std::list::const_iterator &end) { // Delete cursor items diff --git a/common/shareddb.h b/common/shareddb.h index d3d8020a1..171c2b8c6 100644 --- a/common/shareddb.h +++ b/common/shareddb.h @@ -72,6 +72,7 @@ class SharedDatabase : public Database void SaveCharacterInspectMessage(uint32 character_id, const InspectMessage_Struct* message); bool GetCommandSettings(std::map>> &command_settings); uint32 GetTotalTimeEntitledOnAccount(uint32 AccountID); + void SetMailKey(int CharID, int IPAddress, int MailKey); /* Character InventoryProfile diff --git a/ucs/ucs.cpp b/ucs/ucs.cpp index 1fbfec995..b59effd03 100644 --- a/ucs/ucs.cpp +++ b/ucs/ucs.cpp @@ -140,10 +140,12 @@ int main() { worldserver = new WorldServer; - // now that we can send packets to world, see if there's a - // broadcast opcode that tells the client to relog into ucs + worldserver->ActivateBroadcastServerReadyTimer(); while(RunLoops) { + // this triggers clients to 'reconnect' to ucs after server crash + if (worldserver->HasBroadcastServerReadyTimer()) + worldserver->ProcessBroadcastServerReady(); Timer::SetCurrentTime(); diff --git a/ucs/worldserver.cpp b/ucs/worldserver.cpp index b5251b64c..556be152f 100644 --- a/ucs/worldserver.cpp +++ b/ucs/worldserver.cpp @@ -45,6 +45,8 @@ WorldServer::WorldServer() { m_connection.reset(new EQ::Net::ServertalkClient(Config->WorldIP, Config->WorldTCPPort, false, "UCS", Config->SharedKey)); m_connection->OnMessage(std::bind(&WorldServer::ProcessMessage, this, std::placeholders::_1, std::placeholders::_2)); + + m_bsr_timer = nullptr; } WorldServer::~WorldServer() @@ -134,3 +136,37 @@ void WorldServer::ProcessClientVersionRequests(std::list& id_list) { } id_list.clear(); } + +void WorldServer::ProcessBroadcastServerReady() { + if (m_bsr_timer && (*m_bsr_timer) <= Timer::GetCurrentTime()) { + UCSBroadcastServerReady_Struct bsr; + memset(&bsr, 0, sizeof(UCSBroadcastServerReady_Struct)); + + sprintf(bsr.chat_prefix, "%s,%i,%s.", + Config->ChatHost.c_str(), + Config->ChatPort, + Config->ShortName.c_str() + ); + sprintf(bsr.mail_prefix, "%s,%i,%s.", + Config->ChatHost.c_str(), + Config->MailPort, + Config->ShortName.c_str() + ); + + EQ::Net::DynamicPacket dp_bsr; + dp_bsr.PutData(0, &bsr, sizeof(UCSBroadcastServerReady_Struct)); + m_connection->Send(ServerOP_UCSBroadcastServerReady, dp_bsr); + + safe_delete(m_bsr_timer); + } +} + +void WorldServer::ActivateBroadcastServerReadyTimer() { + safe_delete(m_bsr_timer); + m_bsr_timer = new uint32; + + // clients do not drop their connection to ucs immediately... + // it can take upwards of 60 seconds to process the drop + // and clients will not re-connect to ucs until that occurs + *m_bsr_timer = (Timer::GetCurrentTime() + (RuleI(Chat, UCSBroadcastServerReadyDelay) * 1000)); +} diff --git a/ucs/worldserver.h b/ucs/worldserver.h index 53f52823a..66ed0ec32 100644 --- a/ucs/worldserver.h +++ b/ucs/worldserver.h @@ -30,8 +30,13 @@ public: void ProcessMessage(uint16 opcode, EQ::Net::Packet &); void ProcessClientVersionRequests(std::list& id_list); + + void ProcessBroadcastServerReady(); + bool HasBroadcastServerReadyTimer() { return (m_bsr_timer != nullptr); } + void ActivateBroadcastServerReadyTimer(); private: + uint32* m_bsr_timer; std::unique_ptr m_connection; }; diff --git a/world/ucs.cpp b/world/ucs.cpp index dfa8e116a..76cba7e4b 100644 --- a/world/ucs.cpp +++ b/world/ucs.cpp @@ -52,6 +52,7 @@ void UCSConnection::ProcessPacket(uint16 opcode, EQ::Net::Packet &p) Log(Logs::Detail, Logs::UCS_Server, "Got authentication from UCS when they are already authenticated."); break; } + case ServerOP_UCSBroadcastServerReady: case ServerOP_UCSClientVersionRequest: { zoneserver_list.SendPacket(pack); diff --git a/world/worlddb.cpp b/world/worlddb.cpp index 0b118ff2e..cbf901cf7 100644 --- a/world/worlddb.cpp +++ b/world/worlddb.cpp @@ -516,23 +516,6 @@ void WorldDatabase::GetLauncherList(std::vector &rl) { } -void WorldDatabase::SetMailKey(int CharID, int IPAddress, int MailKey) -{ - char MailKeyString[17]; - - if(RuleB(Chat, EnableMailKeyIPVerification) == true) - sprintf(MailKeyString, "%08X%08X", IPAddress, MailKey); - else - sprintf(MailKeyString, "%08X", MailKey); - - std::string query = StringFormat("UPDATE character_data SET mailkey = '%s' WHERE id = '%i'", - MailKeyString, CharID); - auto results = QueryDatabase(query); - if (!results.Success()) - Log(Logs::General, Logs::Error, "WorldDatabase::SetMailKey(%i, %s) : %s", CharID, MailKeyString, results.ErrorMessage().c_str()); - -} - bool WorldDatabase::GetCharacterLevel(const char *name, int &level) { std::string query = StringFormat("SELECT level FROM character_data WHERE name = '%s'", name); diff --git a/world/worlddb.h b/world/worlddb.h index b0c2ff221..2afd69920 100644 --- a/world/worlddb.h +++ b/world/worlddb.h @@ -34,7 +34,6 @@ public: int MoveCharacterToBind(int CharID, uint8 bindnum = 0); void GetLauncherList(std::vector &result); - void SetMailKey(int CharID, int IPAddress, int MailKey); bool GetCharacterLevel(const char *name, int &level); bool LoadCharacterCreateAllocations(); diff --git a/zone/worldserver.cpp b/zone/worldserver.cpp index 1f771d131..4ad2267b3 100644 --- a/zone/worldserver.cpp +++ b/zone/worldserver.cpp @@ -1813,6 +1813,57 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) break; } + case ServerOP_UCSBroadcastServerReady: + { + UCSBroadcastServerReady_Struct* bsr = (UCSBroadcastServerReady_Struct*)pack->pBuffer; + EQApplicationPacket* outapp = nullptr; + std::string buffer; + + for (auto liter : entity_list.GetClientList()) { + auto c = liter.second; + if (!c) + continue; + + int MailKey = zone->random.Int(1, INT_MAX); + + database.SetMailKey(c->CharacterID(), c->GetIP(), MailKey); + + char ConnectionType; + + // chat server packet + if (c->ClientVersionBit() & EQEmu::versions::bit_UFAndLater) + ConnectionType = 'U'; + else if (c->ClientVersionBit() & EQEmu::versions::bit_SoFAndLater) + ConnectionType = 'S'; + else + ConnectionType = 'C'; + + buffer = bsr->chat_prefix; + buffer.append(StringFormat("%s,%c%08X", c->GetName(), ConnectionType, MailKey)); + + outapp = new EQApplicationPacket(OP_SetChatServer, (buffer.length() + 1)); + memcpy(outapp->pBuffer, buffer.c_str(), buffer.length()); + outapp->pBuffer[buffer.length()] = '\0'; + + c->QueuePacket(outapp); + safe_delete(outapp); + + // mail server packet + if (c->ClientVersionBit() & EQEmu::versions::bit_TitaniumAndEarlier) + ConnectionType = 'M'; + + buffer = bsr->mail_prefix; + buffer.append(StringFormat("%s,%c%08X", c->GetName(), ConnectionType, MailKey)); + + outapp = new EQApplicationPacket(OP_SetChatServer2, (buffer.length() + 1)); + memcpy(outapp->pBuffer, buffer.c_str(), buffer.length()); + outapp->pBuffer[buffer.length()] = '\0'; + + c->QueuePacket(outapp); + safe_delete(outapp); + } + break; + } case ServerOP_UCSClientVersionRequest: { UCSClientVersionRequest_Struct* cvreq = (UCSClientVersionRequest_Struct*)pack->pBuffer; From 1e316102ea6811b5243e414e26f3de71207072d7 Mon Sep 17 00:00:00 2001 From: Uleat Date: Mon, 26 Feb 2018 22:38:14 -0500 Subject: [PATCH 091/670] Fix for UCS-based messages containing saylinks --- ucs/chatchannel.cpp | 144 +++++++++++++++++++++++++++++++++++++++++++- ucs/clientlist.cpp | 2 +- ucs/worldserver.cpp | 131 +++++++++++++++++++++++++++++++++++++++- 3 files changed, 274 insertions(+), 3 deletions(-) diff --git a/ucs/chatchannel.cpp b/ucs/chatchannel.cpp index 16403c295..11a000712 100644 --- a/ucs/chatchannel.cpp +++ b/ucs/chatchannel.cpp @@ -28,6 +28,10 @@ extern Database database; extern uint32 ChatMessagesSent; +void ServerToClient45SayLink(std::string& clientSayLink, const std::string& serverSayLink); +void ServerToClient50SayLink(std::string& clientSayLink, const std::string& serverSayLink); +void ServerToClient55SayLink(std::string& clientSayLink, const std::string& serverSayLink); + ChatChannel::ChatChannel(std::string inName, std::string inOwner, std::string inPassword, bool inPermanent, int inMinimumStatus) : DeleteTimer(0) { @@ -384,6 +388,8 @@ void ChatChannel::SendMessageToChannel(std::string Message, Client* Sender) { if(!Sender) return; + std::string cv_messages[EQEmu::versions::ClientVersionCount]; + ChatMessagesSent++; LinkedListIterator iterator(ClientsInChannel); @@ -398,7 +404,28 @@ void ChatChannel::SendMessageToChannel(std::string Message, Client* Sender) { { Log(Logs::Detail, Logs::UCS_Server, "Sending message to %s from %s", ChannelClient->GetName().c_str(), Sender->GetName().c_str()); - ChannelClient->SendChannelMessage(Name, Message, Sender); + + if (cv_messages[static_cast(ChannelClient->GetClientVersion())].length() == 0) { + switch (ChannelClient->GetClientVersion()) { + case EQEmu::versions::ClientVersion::Titanium: + ServerToClient45SayLink(cv_messages[static_cast(ChannelClient->GetClientVersion())], Message); + break; + case EQEmu::versions::ClientVersion::SoF: + case EQEmu::versions::ClientVersion::SoD: + case EQEmu::versions::ClientVersion::UF: + ServerToClient50SayLink(cv_messages[static_cast(ChannelClient->GetClientVersion())], Message); + break; + case EQEmu::versions::ClientVersion::RoF: + ServerToClient55SayLink(cv_messages[static_cast(ChannelClient->GetClientVersion())], Message); + break; + case EQEmu::versions::ClientVersion::RoF2: + default: + cv_messages[static_cast(ChannelClient->GetClientVersion())] = Message; + break; + } + } + + ChannelClient->SendChannelMessage(Name, cv_messages[static_cast(ChannelClient->GetClientVersion())], Sender); } iterator.Advance(); @@ -655,3 +682,118 @@ std::string CapitaliseName(std::string inString) { return NormalisedName; } +void ServerToClient45SayLink(std::string& clientSayLink, const std::string& serverSayLink) { + if (serverSayLink.find('\x12') == std::string::npos) { + clientSayLink = serverSayLink; + return; + } + + auto segments = SplitString(serverSayLink, '\x12'); + + for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { + if (segment_iter & 1) { + if (segments[segment_iter].length() <= 56) { + clientSayLink.append(segments[segment_iter]); + // TODO: log size mismatch error + continue; + } + + // Idx: 0 1 6 11 16 21 26 31 36 37 41 43 48 (Source) + // RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56) + // 6.2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX X XXXXXXXX (45) + // Diff: ^^^^^ ^ ^^^^^ + + clientSayLink.push_back('\x12'); + clientSayLink.append(segments[segment_iter].substr(0, 31)); + clientSayLink.append(segments[segment_iter].substr(36, 5)); + + if (segments[segment_iter][41] == '0') + clientSayLink.push_back(segments[segment_iter][42]); + else + clientSayLink.push_back('F'); + + clientSayLink.append(segments[segment_iter].substr(48)); + clientSayLink.push_back('\x12'); + } + else { + clientSayLink.append(segments[segment_iter]); + } + } +} + +void ServerToClient50SayLink(std::string& clientSayLink, const std::string& serverSayLink) { + if (serverSayLink.find('\x12') == std::string::npos) { + clientSayLink = serverSayLink; + return; + } + + auto segments = SplitString(serverSayLink, '\x12'); + + for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { + if (segment_iter & 1) { + if (segments[segment_iter].length() <= 56) { + clientSayLink.append(segments[segment_iter]); + // TODO: log size mismatch error + continue; + } + + // Idx: 0 1 6 11 16 21 26 31 36 37 41 43 48 (Source) + // RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56) + // SoF: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX X XXXXX XXXXXXXX (50) + // Diff: ^^^^^ ^ + + clientSayLink.push_back('\x12'); + clientSayLink.append(segments[segment_iter].substr(0, 31)); + clientSayLink.append(segments[segment_iter].substr(36, 5)); + + if (segments[segment_iter][41] == '0') + clientSayLink.push_back(segments[segment_iter][42]); + else + clientSayLink.push_back('F'); + + clientSayLink.append(segments[segment_iter].substr(43)); + clientSayLink.push_back('\x12'); + } + else { + clientSayLink.append(segments[segment_iter]); + } + } +} + +void ServerToClient55SayLink(std::string& clientSayLink, const std::string& serverSayLink) { + if (serverSayLink.find('\x12') == std::string::npos) { + clientSayLink = serverSayLink; + return; + } + + auto segments = SplitString(serverSayLink, '\x12'); + + for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { + if (segment_iter & 1) { + if (segments[segment_iter].length() <= 56) { + clientSayLink.append(segments[segment_iter]); + // TODO: log size mismatch error + continue; + } + + // Idx: 0 1 6 11 16 21 26 31 36 37 41 43 48 (Source) + // RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56) + // RoF: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX X XXXXX XXXXXXXX (55) + // Diff: ^ + + clientSayLink.push_back('\x12'); + clientSayLink.append(segments[segment_iter].substr(0, 41)); + + if (segments[segment_iter][41] == '0') + clientSayLink.push_back(segments[segment_iter][42]); + else + clientSayLink.push_back('F'); + + clientSayLink.append(segments[segment_iter].substr(43)); + clientSayLink.push_back('\x12'); + } + else { + clientSayLink.append(segments[segment_iter]); + } + } +} diff --git a/ucs/clientlist.cpp b/ucs/clientlist.cpp index 751cf4089..e5076a150 100644 --- a/ucs/clientlist.cpp +++ b/ucs/clientlist.cpp @@ -893,7 +893,7 @@ void Clientlist::RequestClientVersion(uint32 character_id) { bool Clientlist::QueueClientVersionReply(uint32 character_id, EQEmu::versions::ClientVersion client_version) { if (!character_id) return true; - if (client_version == EQEmu::versions::ClientVersion::Unknown) + if (client_version < EQEmu::versions::ClientVersion::Titanium || client_version > EQEmu::versions::ClientVersion::RoF2) return false; if (LogSys.log_settings[Logs::UCS_Server].is_category_enabled) { diff --git a/ucs/worldserver.cpp b/ucs/worldserver.cpp index 556be152f..48ec03dca 100644 --- a/ucs/worldserver.cpp +++ b/ucs/worldserver.cpp @@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "../common/misc_functions.h" #include "../common/packet_functions.h" #include "../common/md5.h" +#include "../common/string_util.h" #include "worldserver.h" #include "clientlist.h" #include "ucsconfig.h" @@ -41,6 +42,10 @@ extern Database database; void ProcessMailTo(Client *c, std::string from, std::string subject, std::string message); +void Client45ToServerSayLink(std::string& serverSayLink, const std::string& clientSayLink); +void Client50ToServerSayLink(std::string& serverSayLink, const std::string& clientSayLink); +void Client55ToServerSayLink(std::string& serverSayLink, const std::string& clientSayLink); + WorldServer::WorldServer() { m_connection.reset(new EQ::Net::ServertalkClient(Config->WorldIP, Config->WorldTCPPort, false, "UCS", Config->SharedKey)); @@ -96,7 +101,26 @@ void WorldServer::ProcessMessage(uint16 opcode, EQ::Net::Packet &p) if (Message[0] == ';') { - c->SendChannelMessageByNumber(Message.substr(1, std::string::npos)); + std::string new_message; + switch (c->GetClientVersion()) { + case EQEmu::versions::ClientVersion::Titanium: + Client45ToServerSayLink(new_message, Message.substr(1, std::string::npos)); + break; + case EQEmu::versions::ClientVersion::SoF: + case EQEmu::versions::ClientVersion::SoD: + case EQEmu::versions::ClientVersion::UF: + Client50ToServerSayLink(new_message, Message.substr(1, std::string::npos)); + break; + case EQEmu::versions::ClientVersion::RoF: + Client55ToServerSayLink(new_message, Message.substr(1, std::string::npos)); + break; + case EQEmu::versions::ClientVersion::RoF2: + default: + new_message = Message.substr(1, std::string::npos); + break; + } + + c->SendChannelMessageByNumber(new_message); } else if (Message[0] == '[') { @@ -170,3 +194,108 @@ void WorldServer::ActivateBroadcastServerReadyTimer() { // and clients will not re-connect to ucs until that occurs *m_bsr_timer = (Timer::GetCurrentTime() + (RuleI(Chat, UCSBroadcastServerReadyDelay) * 1000)); } + +void Client45ToServerSayLink(std::string& serverSayLink, const std::string& clientSayLink) { + if (clientSayLink.find('\x12') == std::string::npos) { + serverSayLink = clientSayLink; + return; + } + + auto segments = SplitString(clientSayLink, '\x12'); + + for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { + if (segment_iter & 1) { + if (segments[segment_iter].length() <= 45) { + serverSayLink.append(segments[segment_iter]); + // TODO: log size mismatch error + continue; + } + + // Idx: 0 1 6 11 16 21 26 31 32 36 37 (Source) + // 6.2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX X XXXXXXXX (45) + // RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56) + // Diff: ^^^^^ ^ ^^^^^ + + serverSayLink.push_back('\x12'); + serverSayLink.append(segments[segment_iter].substr(0, 31)); + serverSayLink.append("00000"); + serverSayLink.append(segments[segment_iter].substr(31, 5)); + serverSayLink.push_back('0'); + serverSayLink.push_back(segments[segment_iter][36]); + serverSayLink.append("00000"); + serverSayLink.append(segments[segment_iter].substr(37)); + serverSayLink.push_back('\x12'); + } + else { + serverSayLink.append(segments[segment_iter]); + } + } +} + +void Client50ToServerSayLink(std::string& serverSayLink, const std::string& clientSayLink) { + if (clientSayLink.find('\x12') == std::string::npos) { + serverSayLink = clientSayLink; + return; + } + + auto segments = SplitString(clientSayLink, '\x12'); + + for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { + if (segment_iter & 1) { + if (segments[segment_iter].length() <= 50) { + serverSayLink.append(segments[segment_iter]); + // TODO: log size mismatch error + continue; + } + + // Idx: 0 1 6 11 16 21 26 31 32 36 37 42 (Source) + // SoF: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX X XXXXX XXXXXXXX (50) + // RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56) + // Diff: ^^^^^ ^ + + serverSayLink.push_back('\x12'); + serverSayLink.append(segments[segment_iter].substr(0, 31)); + serverSayLink.append("00000"); + serverSayLink.append(segments[segment_iter].substr(31, 5)); + serverSayLink.push_back('0'); + serverSayLink.append(segments[segment_iter].substr(36)); + serverSayLink.push_back('\x12'); + } + else { + serverSayLink.append(segments[segment_iter]); + } + } +} + +void Client55ToServerSayLink(std::string& serverSayLink, const std::string& clientSayLink) { + if (clientSayLink.find('\x12') == std::string::npos) { + serverSayLink = clientSayLink; + return; + } + + auto segments = SplitString(clientSayLink, '\x12'); + + for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { + if (segment_iter & 1) { + if (segments[segment_iter].length() <= 55) { + serverSayLink.append(segments[segment_iter]); + // TODO: log size mismatch error + continue; + } + + // Idx: 0 1 6 11 16 21 26 31 36 37 41 42 47 (Source) + // RoF: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX X XXXXX XXXXXXXX (55) + // RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56) + // Diff: ^ + + serverSayLink.push_back('\x12'); + serverSayLink.append(segments[segment_iter].substr(0, 41)); + serverSayLink.push_back('0'); + serverSayLink.append(segments[segment_iter].substr(41)); + serverSayLink.push_back('\x12'); + } + else { + serverSayLink.append(segments[segment_iter]); + } + } +} From 6f49a379149d046755e0aae50f69c62dc79f6c58 Mon Sep 17 00:00:00 2001 From: Uleat Date: Mon, 26 Feb 2018 23:04:28 -0500 Subject: [PATCH 092/670] Fix for linux build fail --- zone/worldserver.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/zone/worldserver.cpp b/zone/worldserver.cpp index 4ad2267b3..09e5aa223 100644 --- a/zone/worldserver.cpp +++ b/zone/worldserver.cpp @@ -22,6 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include #include #include +#include #ifdef _WINDOWS #include From 29f89cdfbc6f4a67c49a407a507766b2df3dd12c Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Tue, 27 Feb 2018 23:42:18 -0500 Subject: [PATCH 093/670] NPCs parsed less than normal push Checking the packets, I was getting 0.3 for bash against PCs and 0.03 against NPCs. Same for other attacks. --- zone/attack.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zone/attack.cpp b/zone/attack.cpp index 58e1510ff..8fcf508c3 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -3615,6 +3615,8 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const if (RuleB(Combat, MeleePush) && damage > 0 && !IsRooted() && (IsClient() || zone->random.Roll(RuleI(Combat, MeleePushChance)))) { a->force = EQEmu::skills::GetSkillMeleePushForce(skill_used); + if (IsNPC()) + a->force *= 0.10f; // force against NPCs is divided by 10 I guess? ex bash is 0.3, parsed 0.03 against an NPC // update NPC stuff auto new_pos = glm::vec3(m_Position.x + (a->force * std::cos(a->meleepush_xy) + m_Delta.x), m_Position.y + (a->force * std::sin(a->meleepush_xy) + m_Delta.y), m_Position.z); From 06d22fa009b313a51511c2c54a99006627fb91c4 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 28 Feb 2018 19:21:03 -0500 Subject: [PATCH 094/670] Identify the rest of Action/CombatDamage structs --- common/eq_packet_structs.h | 33 ++++++++-------- common/patches/rof.cpp | 31 ++++++++------- common/patches/rof2.cpp | 31 ++++++++------- common/patches/rof2_structs.h | 52 +++++++++++------------- common/patches/rof_structs.h | 52 +++++++++++------------- common/patches/sod.cpp | 15 ++++--- common/patches/sod_structs.h | 65 ++++++++++++++---------------- common/patches/sof.cpp | 15 ++++--- common/patches/sof_structs.h | 66 +++++++++++++++---------------- common/patches/titanium.cpp | 11 ++++-- common/patches/titanium_structs.h | 28 ++++++------- common/patches/uf.cpp | 39 +++++++----------- common/patches/uf_structs.h | 59 +++++++++++++-------------- zone/attack.cpp | 6 +-- zone/spell_effects.cpp | 18 ++++----- zone/spells.cpp | 28 ++++++------- zone/trap.cpp | 2 +- 17 files changed, 261 insertions(+), 290 deletions(-) diff --git a/common/eq_packet_structs.h b/common/eq_packet_structs.h index cc06ecf15..fd09f4d56 100644 --- a/common/eq_packet_structs.h +++ b/common/eq_packet_structs.h @@ -1253,21 +1253,22 @@ struct Action_Struct { /* 00 */ uint16 target; // id of target /* 02 */ uint16 source; // id of caster - /* 04 */ uint16 level; // level of caster - /* 06 */ uint16 instrument_mod; - /* 08 */ uint32 bard_focus_id; - /* 12 */ uint16 unknown16; -// some kind of sequence that's the same in both actions -// as well as the combat damage, to tie em together? - /* 14 */ uint32 sequence; - /* 18 */ uint32 unknown18; - /* 22 */ uint8 type; // 231 (0xE7) for spells - /* 23 */ uint32 unknown23; + /* 04 */ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level + /* 06 */ uint32 instrument_mod; // OSX dump says base damage, spells use it for bard song (different from newer clients) + /* 10 */ float force; + /* 14 */ float hit_heading; + /* 18 */ float hit_pitch; + /* 22 */ uint8 type; // 231 (0xE7) for spells, skill + /* 23 */ uint16 unknown23; // OSX says min_damage + /* 25 */ uint16 unknown25; // OSX says tohit /* 27 */ uint16 spell; // spell id being cast - /* 29 */ uint8 unknown29; + /* 29 */ uint8 spell_level; // this field seems to be some sort of success flag, if it's 4 - /* 30 */ uint8 buff_unknown; // if this is 4, a buff icon is made - /* 31 */ + /* 30 */ uint8 effect_flag; // if this is 4, a buff icon is made +// newer clients have some data for setting LaunchSpellData when effect_flag & 4 +// /* 31 */ uint8 spell_gem; +// /* 32 */ uint32 inventory_slot; +// /* 36 */ uint32 item_cast_type; }; // this is what prints the You have been struck. and the regular @@ -1277,12 +1278,12 @@ struct CombatDamage_Struct { /* 00 */ uint16 target; /* 02 */ uint16 source; -/* 04 */ uint8 type; //slashing, etc. 231 (0xE7) for spells +/* 04 */ uint8 type; //slashing, etc. 231 (0xE7) for spells, skill /* 05 */ uint16 spellid; /* 07 */ uint32 damage; /* 11 */ float force; -/* 15 */ float meleepush_xy; // see above notes in Action_Struct -/* 19 */ float meleepush_z; +/* 15 */ float hit_heading; // see above notes in Action_Struct +/* 19 */ float hit_pitch; /* 23 */ uint32 special; // 2 = Rampage, 1 = Wild Rampage }; diff --git a/common/patches/rof.cpp b/common/patches/rof.cpp index 24fecb2ca..62ef6751a 100644 --- a/common/patches/rof.cpp +++ b/common/patches/rof.cpp @@ -163,22 +163,23 @@ namespace RoF OUT(level); eq->unknown06 = 0; eq->instrument_mod = 1.0f + (emu->instrument_mod - 10) / 10.0f; - eq->bard_focus_id = emu->bard_focus_id; - eq->knockback_angle = emu->sequence; - eq->unknown22 = 0; + OUT(force); + OUT(hit_heading); + OUT(hit_pitch); OUT(type); eq->damage = 0; eq->unknown31 = 0; OUT(spell); - eq->level2 = eq->level; - eq->effect_flag = emu->buff_unknown; - eq->unknown39 = 14; - eq->unknown43 = 0; - eq->unknown44 = 17; - eq->unknown45 = 0; - eq->unknown46 = -1; - eq->unknown50 = 0; - eq->unknown54 = 0; + OUT(spell_level); + OUT(effect_flag); + eq->spell_gem = 0; + eq->slot.Type = INVALID_INDEX; + eq->slot.Unknown02 = 0; + eq->slot.Slot = INVALID_INDEX; + eq->slot.SubIndex = INVALID_INDEX; + eq->slot.AugIndex = INVALID_INDEX; + eq->slot.Unknown01 = 0; + eq->item_cast_type = 0; FINISH_ENCODE(); } @@ -659,8 +660,8 @@ namespace RoF OUT(spellid); OUT(damage); OUT(force); - OUT(meleepush_xy); - OUT(meleepush_z); + OUT(hit_heading); + OUT(hit_pitch); OUT(special); FINISH_ENCODE(); @@ -4466,7 +4467,7 @@ namespace RoF IN(type); IN(spellid); IN(damage); - IN(meleepush_xy); + IN(hit_heading); FINISH_DIRECT_DECODE(); } diff --git a/common/patches/rof2.cpp b/common/patches/rof2.cpp index 7e5d79bb6..5a30c1695 100644 --- a/common/patches/rof2.cpp +++ b/common/patches/rof2.cpp @@ -232,22 +232,23 @@ namespace RoF2 OUT(level); eq->unknown06 = 0; eq->instrument_mod = 1.0f + (emu->instrument_mod - 10) / 10.0f; - eq->bard_focus_id = emu->bard_focus_id; - eq->knockback_angle = emu->sequence; - eq->unknown22 = 0; + OUT(force); + OUT(hit_heading); + OUT(hit_pitch); OUT(type); eq->damage = 0; eq->unknown31 = 0; OUT(spell); - eq->level2 = eq->level; - eq->effect_flag = emu->buff_unknown; - eq->unknown39 = 14; - eq->unknown43 = 0; - eq->unknown44 = 17; - eq->unknown45 = 0; - eq->unknown46 = -1; - eq->unknown50 = 0; - eq->unknown54 = 0; + OUT(spell_level); + OUT(effect_flag); + eq->spell_gem = 0; + eq->slot.Type = INVALID_INDEX; + eq->slot.Unknown02 = 0; + eq->slot.Slot = INVALID_INDEX; + eq->slot.SubIndex = INVALID_INDEX; + eq->slot.AugIndex = INVALID_INDEX; + eq->slot.Unknown01 = 0; + eq->item_cast_type = 0; FINISH_ENCODE(); } @@ -727,8 +728,8 @@ namespace RoF2 OUT(spellid); OUT(damage); OUT(force); - OUT(meleepush_xy); - OUT(meleepush_z); + OUT(hit_heading); + OUT(hit_pitch); OUT(special); FINISH_ENCODE(); @@ -4706,7 +4707,7 @@ namespace RoF2 IN(type); IN(spellid); IN(damage); - IN(meleepush_xy); + IN(hit_heading); FINISH_DIRECT_DECODE(); } diff --git a/common/patches/rof2_structs.h b/common/patches/rof2_structs.h index bd18a13c0..5be96e071 100644 --- a/common/patches/rof2_structs.h +++ b/common/patches/rof2_structs.h @@ -1462,17 +1462,17 @@ struct Action_Struct { /*00*/ uint16 target; // id of target /*02*/ uint16 source; // id of caster -/*04*/ uint16 level; // level of caster - Seen 0 -/*06*/ uint32 unknown06; +/*04*/ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level +/*06*/ uint32 unknown06; // OSX dump says base_damage, was used for bard mod too, this is 0'd :( /*10*/ float instrument_mod; -/*14*/ uint32 bard_focus_id; // seen 0 -/*18*/ float knockback_angle; //seems to go from 0-512 then it rolls over again -/*22*/ uint32 unknown22; -/*26*/ uint8 type; -/*27*/ uint32 damage; -/*31*/ uint16 unknown31; +/*14*/ float force; +/*18*/ float hit_heading; +/*22*/ float hit_pitch; +/*26*/ uint8 type; // 231 (0xE7) for spells, skill +/*27*/ uint32 damage; // OSX says min_damage +/*31*/ uint16 unknown31; // OSX says tohit /*33*/ uint32 spell; // spell id being cast -/*37*/ uint8 level2; // level of caster again? Or maybe the castee +/*37*/ uint8 spell_level; // level of caster again? Or maybe the castee /*38*/ uint8 effect_flag; // if this is 4, the effect is valid: or if two are sent at the same time? /*39*/ }; @@ -1484,25 +1484,21 @@ struct ActionAlt_Struct { /*00*/ uint16 target; // id of target /*02*/ uint16 source; // id of caster -/*04*/ uint16 level; // level of caster - Seen 0 -/*06*/ uint32 unknown06; +/*04*/ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level +/*06*/ uint32 unknown06; // OSX dump says base_damage, was used for bard mod too, this is 0'd :( /*10*/ float instrument_mod; -/*14*/ uint32 bard_focus_id; // seen 0 -/*18*/ float knockback_angle; //seems to go from 0-512 then it rolls over again -/*22*/ uint32 unknown22; -/*26*/ uint8 type; -/*27*/ uint32 damage; -/*31*/ uint16 unknown31; +/*14*/ float force; +/*18*/ float hit_heading; +/*22*/ float hit_pitch; +/*26*/ uint8 type; // 231 (0xE7) for spells, skill +/*27*/ uint32 damage; // OSX says min_damage +/*31*/ uint16 unknown31; // OSX says tohit /*33*/ uint32 spell; // spell id being cast -/*37*/ uint8 level2; // level of caster again? Or maybe the castee +/*37*/ uint8 spell_level; // level of caster again? Or maybe the castee /*38*/ uint8 effect_flag; // if this is 4, the effect is valid: or if two are sent at the same time? -/*39*/ uint32 unknown39; // New field to Underfoot - Seen 14 -/*43*/ uint8 unknown43; // New field to Underfoot - Seen 0 -/*44*/ uint8 unknown44; // New field to Underfoot - Seen 17 -/*45*/ uint8 unknown45; // New field to Underfoot - Seen 0 -/*46*/ int32 unknown46; // New field to Underfoot - Seen -1 -/*50*/ uint32 unknown50; // New field to Underfoot - Seen 0 -/*54*/ uint16 unknown54; // New field to Underfoot - Seen 0 +/*39*/ uint8 spell_gem; +/*40*/ InventorySlot_Struct slot; +/*52*/ uint32 item_cast_type; // ItemSpellTypes enum from MQ2 /*56*/ }; @@ -1517,9 +1513,9 @@ struct CombatDamage_Struct /* 05 */ uint32 spellid; /* 09 */ int32 damage; /* 13 */ float force; // cd cc cc 3d -/* 17 */ float meleepush_xy; // see above notes in Action_Struct -/* 21 */ float meleepush_z; -/* 25 */ uint8 unknown25; // was [9] +/* 17 */ float hit_heading; // see above notes in Action_Struct +/* 21 */ float hit_pitch; +/* 25 */ uint8 secondary; // 0 for primary hand, 1 for secondary /* 26 */ uint32 special; // 2 = Rampage, 1 = Wild Rampage /* 30 */ }; diff --git a/common/patches/rof_structs.h b/common/patches/rof_structs.h index d38d5c6bb..08e3647be 100644 --- a/common/patches/rof_structs.h +++ b/common/patches/rof_structs.h @@ -1450,17 +1450,17 @@ struct Action_Struct { /*00*/ uint16 target; // id of target /*02*/ uint16 source; // id of caster -/*04*/ uint16 level; // level of caster - Seen 0 -/*06*/ uint32 unknown06; +/*04*/ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level +/*06*/ uint32 unknown06; // OSX dump says base_damage, was used for bard mod too, this is 0'd :( /*10*/ float instrument_mod; -/*14*/ uint32 bard_focus_id; // seen 0 -/*18*/ float knockback_angle; //seems to go from 0-512 then it rolls over again -/*22*/ uint32 unknown22; -/*26*/ uint8 type; -/*27*/ uint32 damage; -/*31*/ uint16 unknown31; +/*14*/ float force; +/*18*/ float hit_heading; +/*22*/ float hit_pitch; +/*26*/ uint8 type; // 231 (0xE7) for spells, skill +/*27*/ uint32 damage; // OSX says min_damage +/*31*/ uint16 unknown31; // OSX says tohit /*33*/ uint32 spell; // spell id being cast -/*37*/ uint8 level2; // level of caster again? Or maybe the castee +/*37*/ uint8 spell_level; // level of caster again? Or maybe the castee /*38*/ uint8 effect_flag; // if this is 4, the effect is valid: or if two are sent at the same time? /*39*/ }; @@ -1472,25 +1472,21 @@ struct ActionAlt_Struct { /*00*/ uint16 target; // id of target /*02*/ uint16 source; // id of caster -/*04*/ uint16 level; // level of caster - Seen 0 -/*06*/ uint32 unknown06; +/*04*/ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level +/*06*/ uint32 unknown06; // OSX dump says base_damage, was used for bard mod too, this is 0'd :( /*10*/ float instrument_mod; -/*14*/ uint32 bard_focus_id; // seen 0 -/*18*/ float knockback_angle; //seems to go from 0-512 then it rolls over again -/*22*/ uint32 unknown22; -/*26*/ uint8 type; -/*27*/ uint32 damage; -/*31*/ uint16 unknown31; +/*14*/ float force; +/*18*/ float hit_heading; +/*22*/ float hit_pitch; +/*26*/ uint8 type; // 231 (0xE7) for spells, skill +/*27*/ uint32 damage; // OSX says min_damage +/*31*/ uint16 unknown31; // OSX says tohit /*33*/ uint32 spell; // spell id being cast -/*37*/ uint8 level2; // level of caster again? Or maybe the castee +/*37*/ uint8 spell_level; // level of caster again? Or maybe the castee /*38*/ uint8 effect_flag; // if this is 4, the effect is valid: or if two are sent at the same time? -/*39*/ uint32 unknown39; // New field to Underfoot - Seen 14 -/*43*/ uint8 unknown43; // New field to Underfoot - Seen 0 -/*44*/ uint8 unknown44; // New field to Underfoot - Seen 17 -/*45*/ uint8 unknown45; // New field to Underfoot - Seen 0 -/*46*/ int32 unknown46; // New field to Underfoot - Seen -1 -/*50*/ uint32 unknown50; // New field to Underfoot - Seen 0 -/*54*/ uint16 unknown54; // New field to Underfoot - Seen 0 +/*39*/ uint8 spell_gem; +/*40*/ InventorySlot_Struct slot; +/*52*/ uint32 item_cast_type; // ItemSpellTypes enum from MQ2 /*56*/ }; @@ -1505,9 +1501,9 @@ struct CombatDamage_Struct /* 05 */ uint32 spellid; /* 09 */ int32 damage; /* 13 */ float force; // cd cc cc 3d -/* 17 */ float meleepush_xy; // see above notes in Action_Struct -/* 21 */ float meleepush_z; -/* 25 */ uint8 unknown25; // was [9] +/* 17 */ float hit_heading; // see above notes in Action_Struct +/* 21 */ float hit_pitch; +/* 25 */ uint8 secondary; // 0 for primary hand, 1 for secondary /* 26 */ uint32 special; // 2 = Rampage, 1 = Wild Rampage /* 30 */ }; diff --git a/common/patches/sod.cpp b/common/patches/sod.cpp index 9e1479188..560151bfa 100644 --- a/common/patches/sod.cpp +++ b/common/patches/sod.cpp @@ -161,15 +161,14 @@ namespace SoD OUT(source); OUT(level); OUT(instrument_mod); - eq->sequence = emu->sequence; + OUT(force); + OUT(hit_heading); + OUT(hit_pitch); OUT(type); //OUT(damage); OUT(spell); - eq->level2 = emu->level; - OUT(buff_unknown); // if this is 4, a buff icon is made - //eq->unknown0036 = -1; - //eq->unknown0040 = -1; - //eq->unknown0044 = -1; + OUT(spell_level); + OUT(effect_flag); // if this is 4, a buff icon is made FINISH_ENCODE(); } @@ -458,8 +457,8 @@ namespace SoD OUT(spellid); OUT(damage); OUT(force); - OUT(meleepush_xy); - OUT(meleepush_z); + OUT(hit_heading); + OUT(hit_pitch); OUT(special); FINISH_ENCODE(); diff --git a/common/patches/sod_structs.h b/common/patches/sod_structs.h index 866418b54..6b5c2f72c 100644 --- a/common/patches/sod_structs.h +++ b/common/patches/sod_structs.h @@ -1215,20 +1215,18 @@ struct Action_Struct { /* 00 */ uint16 target; // id of target /* 02 */ uint16 source; // id of caster - /* 04 */ uint16 level; // level of caster - /* 06 */ uint16 instrument_mod; // seems to be fixed to 0x0A - /* 08 */ uint32 unknown08; - /* 12 */ uint16 unknown16; -// some kind of sequence that's the same in both actions -// as well as the combat damage, to tie em together? - /* 14 */ float sequence; // was uint32 - /* 18 */ uint32 unknown18; - /* 22 */ uint8 type; // 231 (0xE7) for spells - /* 23 */ uint32 unknown23; + /* 04 */ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level + /* 06 */ uint32 instrument_mod; // OSX dump says base damage, spells use it for bard song (different from newer clients) + /* 10 */ float force; + /* 14 */ float hit_heading; + /* 18 */ float hit_pitch; + /* 22 */ uint8 type; // 231 (0xE7) for spells, skill + /* 23 */ uint16 unknown23; // OSX says min_damage + /* 25 */ uint16 unknown25; // OSX says tohit /* 27 */ uint16 spell; // spell id being cast - /* 29 */ uint8 level2; // level of caster again? Or maybe the castee + /* 29 */ uint8 spell_level; // level of caster again? Or maybe the castee // this field seems to be some sort of success flag, if it's 4 - /* 30 */ uint8 buff_unknown; // if this is 4, a buff icon is made + /* 30 */ uint8 effect_flag; // if this is 4, a buff icon is made /* 31 */ }; @@ -1237,26 +1235,23 @@ struct Action_Struct // has to do with buff blocking?? struct ActionAlt_Struct // ActionAlt_Struct - Size: 56 bytes { -/*0000*/ uint16 target; // Target ID -/*0002*/ uint16 source; // SourceID -/*0004*/ uint16 level; // level of caster -/*0006*/ uint16 instrument_mod; // seems to be fixed to 0x0A -/*0008*/ uint32 unknown08; -/*0012*/ uint16 unknown16; -/*0014*/ uint32 sequence; -/*0018*/ uint32 unknown18; -/*0022*/ uint8 type; // Casts, Falls, Bashes, etc... -/*0023*/ uint32 damage; // Amount of Damage -/*0027*/ uint16 spell; // SpellID -/*0029*/ uint8 unknown29; -/*0030*/ uint8 buff_unknown; // if this is 4, a buff icon is made -/*0031*/ uint32 unknown0031; // seen 00 00 00 00 -/*0035*/ uint8 unknown0035; // seen 00 -/*0036*/ uint32 unknown0036; // seen ff ff ff ff -/*0040*/ uint32 unknown0040; // seen ff ff ff ff -/*0044*/ uint32 unknown0044; // seen ff ff ff ff -/*0048*/ uint32 unknown0048; // seen 00 00 00 00 -/*0052*/ uint32 unknown0052; // seen 00 00 00 00 +/*0000*/ uint16 target; // id of target +/*0002*/ uint16 source; // id of caster +/*0004*/ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level +/*0006*/ uint32 instrument_mod; // OSX dump says base damage, spells use it for bard song (different from newer clients) +/*0010*/ float force; +/*0014*/ float hit_heading; +/*0018*/ float hit_pitch; +/*0022*/ uint8 type; // 231 (0xE7) for spells, skill +/*0023*/ uint16 unknown23; // OSX says min_damage +/*0025*/ uint16 unknown25; // OSX says tohit +/*0027*/ uint16 spell; // spell id being cast +/*0029*/ uint8 spell_level; // level of caster again? Or maybe the castee +// this field seems to be some sort of success flag, if it's 4 +/*0030*/ uint8 effect_flag; // if this is 4, a buff icon is made +/*0031*/ uint8 spell_slot; +/*0032*/ uint32 slot[5]; +/*0052*/ uint32 item_cast_type; // ItemSpellTypes enum from MQ2 /*0056*/ }; @@ -1271,9 +1266,9 @@ struct CombatDamage_Struct /* 05 */ uint16 spellid; /* 07 */ int32 damage; /* 11 */ float force; // cd cc cc 3d -/* 15 */ float meleepush_xy; // see above notes in Action_Struct -/* 19 */ float meleepush_z; -/* 23 */ uint8 unknown23; // was [9] +/* 15 */ float hit_heading; // see above notes in Action_Struct +/* 19 */ float hit_pitch; +/* 23 */ uint8 secondary; // 0 for primary hand, 1 for secondary /* 24 */ uint32 special; // 2 = Rampage, 1 = Wild Rampage /* 28 */ }; diff --git a/common/patches/sof.cpp b/common/patches/sof.cpp index 063d99ca4..c16bed086 100644 --- a/common/patches/sof.cpp +++ b/common/patches/sof.cpp @@ -161,15 +161,14 @@ namespace SoF OUT(source); OUT(level); OUT(instrument_mod); - eq->sequence = emu->sequence; + OUT(force); + OUT(hit_heading); + OUT(hit_pitch); OUT(type); //OUT(damage); OUT(spell); - eq->level2 = emu->level; - OUT(buff_unknown); // if this is 4, a buff icon is made - //eq->unknown0036 = -1; - //eq->unknown0040 = -1; - //eq->unknown0044 = -1; + OUT(spell_level); + OUT(effect_flag); // if this is 4, a buff icon is made FINISH_ENCODE(); } @@ -440,8 +439,8 @@ namespace SoF OUT(spellid); OUT(damage); OUT(force); - OUT(meleepush_xy); - OUT(meleepush_z); + OUT(hit_heading); + OUT(hit_pitch); FINISH_ENCODE(); } diff --git a/common/patches/sof_structs.h b/common/patches/sof_structs.h index 168dfb123..29272a7a6 100644 --- a/common/patches/sof_structs.h +++ b/common/patches/sof_structs.h @@ -1215,20 +1215,18 @@ struct Action_Struct { /* 00 */ uint16 target; // id of target /* 02 */ uint16 source; // id of caster - /* 04 */ uint16 level; // level of caster - /* 06 */ uint16 instrument_mod; // seems to be fixed to 0x0A - /* 08 */ uint32 unknown08; - /* 12 */ uint16 unknown16; -// some kind of sequence that's the same in both actions -// as well as the combat damage, to tie em together? - /* 14 */ float sequence; // was uint32 - /* 18 */ uint32 unknown18; - /* 22 */ uint8 type; // 231 (0xE7) for spells - /* 23 */ uint32 unknown23; + /* 04 */ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level + /* 06 */ uint32 instrument_mod; // OSX dump says base damage, spells use it for bard song (different from newer clients) + /* 10 */ float force; + /* 14 */ float hit_heading; + /* 18 */ float hit_pitch; + /* 22 */ uint8 type; // 231 (0xE7) for spells, skill + /* 23 */ uint16 unknown23; // OSX says min_damage + /* 25 */ uint16 unknown25; // OSX says tohit /* 27 */ uint16 spell; // spell id being cast - /* 29 */ uint8 level2; // level of caster again? Or maybe the castee + /* 29 */ uint8 spell_level; // level of caster again? Or maybe the castee // this field seems to be some sort of success flag, if it's 4 - /* 30 */ uint8 buff_unknown; // if this is 4, a buff icon is made + /* 30 */ uint8 effect_flag; // if this is 4, a buff icon is made /* 31 */ }; @@ -1237,26 +1235,23 @@ struct Action_Struct // has to do with buff blocking?? struct ActionAlt_Struct // ActionAlt_Struct - Size: 56 bytes { -/*0000*/ uint16 target; // Target ID -/*0002*/ uint16 source; // SourceID -/*0004*/ uint16 level; // level of caster -/*0006*/ uint16 instrument_mod; // seems to be fixed to 0x0A -/*0008*/ uint32 unknown08; -/*0012*/ uint16 unknown16; -/*0014*/ uint32 sequence; -/*0018*/ uint32 unknown18; -/*0022*/ uint8 type; // Casts, Falls, Bashes, etc... -/*0023*/ uint32 damage; // Amount of Damage -/*0027*/ uint16 spell; // SpellID -/*0029*/ uint8 unknown29; -/*0030*/ uint8 buff_unknown; // if this is 4, a buff icon is made -/*0031*/ uint32 unknown0031; // seen 00 00 00 00 -/*0035*/ uint8 unknown0035; // seen 00 -/*0036*/ uint32 unknown0036; // seen ff ff ff ff -/*0040*/ uint32 unknown0040; // seen ff ff ff ff -/*0044*/ uint32 unknown0044; // seen ff ff ff ff -/*0048*/ uint32 unknown0048; // seen 00 00 00 00 -/*0052*/ uint32 unknown0052; // seen 00 00 00 00 +/*0000*/ uint16 target; // id of target +/*0002*/ uint16 source; // id of caster +/*0004*/ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level +/*0006*/ uint32 instrument_mod; // OSX dump says base damage, spells use it for bard song (different from newer clients) +/*0010*/ float force; +/*0014*/ float hit_heading; +/*0018*/ float hit_pitch; +/*0022*/ uint8 type; // 231 (0xE7) for spells, skill +/*0023*/ uint16 unknown23; // OSX says min_damage +/*0025*/ uint16 unknown25; // OSX says tohit +/*0027*/ uint16 spell; // spell id being cast +/*0029*/ uint8 spell_level; // level of caster again? Or maybe the castee +// this field seems to be some sort of success flag, if it's 4 +/*0030*/ uint8 effect_flag; // if this is 4, a buff icon is made +/*0031*/ uint8 spell_slot; +/*0032*/ uint32 slot[5]; +/*0052*/ uint32 item_cast_type; // ItemSpellTypes enum from MQ2 /*0056*/ }; @@ -1271,9 +1266,10 @@ struct CombatDamage_Struct /* 05 */ uint16 spellid; /* 07 */ int32 damage; /* 11 */ float force; // cd cc cc 3d -/* 15 */ float meleepush_xy; // see above notes in Action_Struct -/* 19 */ float meleepush_z; -/* 23 */ uint8 unknown23[5]; // was [9] this appears unrelated to the stuff the other clients do here? +/* 15 */ float hit_heading; // see above notes in Action_Struct +/* 19 */ float hit_pitch; +/* 23 */ uint8 secondary; // 0 for primary hand, 1 for secondary +/* 24 */ uint32 special; // 2 = Rampage, 1 = Wild Rampage, Report function doesn't seem to check this :P /* 28 */ }; diff --git a/common/patches/titanium.cpp b/common/patches/titanium.cpp index afff0cea2..bf3c3d359 100644 --- a/common/patches/titanium.cpp +++ b/common/patches/titanium.cpp @@ -164,11 +164,14 @@ namespace Titanium OUT(source); OUT(level); OUT(instrument_mod); - OUT(sequence); + OUT(force); + OUT(hit_heading); + OUT(hit_pitch); OUT(type); //OUT(damage); OUT(spell); - OUT(buff_unknown); // if this is 4, a buff icon is made + OUT(spell_level); + OUT(effect_flag); // if this is 4, a buff icon is made FINISH_ENCODE(); } @@ -358,8 +361,8 @@ namespace Titanium OUT(spellid); OUT(damage); OUT(force); - OUT(meleepush_xy); - OUT(meleepush_z); + OUT(hit_heading); + OUT(hit_pitch); FINISH_ENCODE(); } diff --git a/common/patches/titanium_structs.h b/common/patches/titanium_structs.h index ea698acf0..9f2d9423d 100644 --- a/common/patches/titanium_structs.h +++ b/common/patches/titanium_structs.h @@ -1119,20 +1119,18 @@ struct Action_Struct { /* 00 */ uint16 target; // id of target /* 02 */ uint16 source; // id of caster - /* 04 */ uint16 level; // level of caster - /* 06 */ uint16 instrument_mod; - /* 08 */ uint32 unknown08; - /* 12 */ uint16 unknown16; -// some kind of sequence that's the same in both actions -// as well as the combat damage, to tie em together? - /* 14 */ uint32 sequence; - /* 18 */ uint32 unknown18; - /* 22 */ uint8 type; // 231 (0xE7) for spells - /* 23 */ uint32 unknown23; + /* 04 */ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level + /* 06 */ uint32 instrument_mod; // OSX dump says base damage, spells use it for bard song (different from newer clients) + /* 10 */ float force; + /* 14 */ float hit_heading; + /* 18 */ float hit_pitch; + /* 22 */ uint8 type; // 231 (0xE7) for spells, skill + /* 23 */ uint16 unknown23; // OSX says min_damage + /* 25 */ uint16 unknown25; // OSX says tohit /* 27 */ uint16 spell; // spell id being cast - /* 29 */ uint8 unknown29; + /* 29 */ uint8 spell_level; // this field seems to be some sort of success flag, if it's 4 - /* 30 */ uint8 buff_unknown; // if this is 4, a buff icon is made + /* 30 */ uint8 effect_flag; // if this is 4, a buff icon is made /* 31 */ }; @@ -1143,12 +1141,12 @@ struct CombatDamage_Struct { /* 00 */ uint16 target; /* 02 */ uint16 source; -/* 04 */ uint8 type; //slashing, etc. 231 (0xE7) for spells +/* 04 */ uint8 type; //slashing, etc. 231 (0xE7) for spells, skill /* 05 */ uint16 spellid; /* 07 */ uint32 damage; /* 11 */ float force; -/* 15 */ float meleepush_xy; // see above notes in Action_Struct -/* 19 */ float meleepush_z; +/* 15 */ float hit_heading; // see above notes in Action_Struct +/* 19 */ float hit_pitch; /* 23 */ }; diff --git a/common/patches/uf.cpp b/common/patches/uf.cpp index 176e737b7..79fdca333 100644 --- a/common/patches/uf.cpp +++ b/common/patches/uf.cpp @@ -161,29 +161,20 @@ namespace UF OUT(source); OUT(level); eq->instrument_mod = 1.0f + (emu->instrument_mod - 10) / 10.0f; - eq->knockback_angle = emu->sequence; + OUT(force); + OUT(hit_heading); + OUT(hit_pitch); OUT(type); OUT(spell); - eq->level2 = eq->level; - eq->effect_flag = emu->buff_unknown; - eq->unknown37 = 0x01; - eq->unknown44 = 0xFFFFFFFF; - eq->unknown48 = 0xFFFFFFFF; - eq->unknown52 = 0xFFFFFFFF; - - /*OUT(target); - OUT(source); - OUT(level); - OUT(instrument_mod); - eq->sequence = emu->sequence; - OUT(type); - //OUT(damage); - OUT(spell); - eq->level2 = emu->level; - OUT(buff_unknown); // if this is 4, a buff icon is made - //eq->unknown0036 = -1; - //eq->unknown0040 = -1; - //eq->unknown0044 = -1;*/ + OUT(spell_level); + OUT(effect_flag); + eq->spell_gem = 0; + eq->slot[0] = -1; // type + eq->slot[1] = -1; // slot + eq->slot[2] = -1; // sub index + eq->slot[3] = -1; // aug index + eq->slot[4] = -1; // unknown + eq->item_cast_type = 0; FINISH_ENCODE(); } @@ -586,8 +577,8 @@ namespace UF OUT(spellid); OUT(damage); OUT(force); - OUT(meleepush_xy); - OUT(meleepush_z); + OUT(hit_heading); + OUT(hit_pitch); OUT(special); FINISH_ENCODE(); @@ -3398,7 +3389,7 @@ namespace UF IN(type); IN(spellid); IN(damage); - IN(meleepush_xy); + IN(hit_heading); FINISH_DIRECT_DECODE(); } diff --git a/common/patches/uf_structs.h b/common/patches/uf_structs.h index 8a03144c9..dc66afd43 100644 --- a/common/patches/uf_structs.h +++ b/common/patches/uf_structs.h @@ -1252,19 +1252,19 @@ struct Action_Struct { /*00*/ uint16 target; // id of target /*02*/ uint16 source; // id of caster -/*04*/ uint16 level; // level of caster - Seen 0 -/*06*/ uint32 unknown06; -/*10*/ uint16 instrument_focus; -/*12*/ uint16 unknown12; // seems to always be set to something and it doesn't change between casts except in special cases like changing instrument mods -/*14*/ uint32 unknown14; // seen 0 -/*18*/ float knockback_angle; //seems to go from 0-512 then it rolls over again -/*22*/ uint32 unknown22; -/*26*/ uint8 type; -/*27*/ uint32 damage; -/*31*/ uint16 unknown31; +/*04*/ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level +/*06*/ uint32 unknown06; // OSX dump says base_damage, was used for bard mod too, this is 0'd :( +/*10*/ float instrument_mod; +/*14*/ float force; +/*18*/ float hit_heading; +/*22*/ float hit_pitch; +/*26*/ uint8 type; // 231 (0xE7) for spells, skill +/*27*/ uint32 damage; // OSX says min_damage +/*31*/ uint16 unknown31; // OSX says tohit /*33*/ uint16 spell; // spell id being cast -/*35*/ uint8 level2; // level of caster again? Or maybe the castee +/*35*/ uint8 spell_level; // level of caster again? Or maybe the castee /*36*/ uint8 effect_flag; // if this is 4, the effect is valid: or if two are sent at the same time? +/*37*/ }; @@ -1276,27 +1276,22 @@ struct ActionAlt_Struct { /*00*/ uint16 target; // id of target /*02*/ uint16 source; // id of caster -/*04*/ uint16 level; // level of caster - Seen 0 -/*06*/ uint32 unknown06; +/*04*/ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level +/*06*/ uint32 unknown06; // OSX dump says base_damage, was used for bard mod too, this is 0'd :( /*10*/ float instrument_mod; -/*14*/ uint32 unknown14; // seen 0 -/*18*/ float knockback_angle; //seems to go from 0-512 then it rolls over again -/*22*/ uint32 unknown22; -/*26*/ uint8 type; -/*27*/ uint32 damage; -/*31*/ uint16 unknown31; +/*14*/ float force; +/*18*/ float hit_heading; +/*22*/ float hit_pitch; +/*26*/ uint8 type; // 231 (0xE7) for spells, skill +/*27*/ uint32 damage; // OSX says min_damage +/*31*/ uint16 unknown31; // OSX says tohit /*33*/ uint16 spell; // spell id being cast -/*35*/ uint8 level2; // level of caster again? Or maybe the castee +/*35*/ uint8 spell_level; // level of caster again? Or maybe the castee /*36*/ uint8 effect_flag; // if this is 4, the effect is valid: or if two are sent at the same time? -/*37*/ uint32 unknown37; // New field to Underfoot - Seen 14 -/*41*/ uint8 unknown41; // New field to Underfoot - Seen 0 -/*42*/ uint8 unknown42; // New field to Underfoot - Seen 0 -/*43*/ uint8 unknown43; // New field to Underfoot - Seen 0 -/*44*/ uint32 unknown44; // New field to Underfoot - Seen 23 -/*48*/ uint32 unknown48; // New field to Underfoot - Seen -1 -/*52*/ uint32 unknown52; // New field to Underfoot - Seen -1 -/*56*/ uint32 unknown56; // New field to Underfoot - Seen 0 -/*60*/ uint32 unknown60; // New field to Underfoot - Seen 0 +/*37*/ uint8 spell_gem; +/*38*/ uint8 padding38[2]; +/*40*/ uint32 slot[5]; +/*60*/ uint32 item_cast_type; // ItemSpellTypes enum from MQ2 /*64*/ }; @@ -1311,9 +1306,9 @@ struct CombatDamage_Struct /* 05 */ uint16 spellid; /* 07 */ int32 damage; /* 11 */ float force; // cd cc cc 3d -/* 15 */ float meleepush_xy; // see above notes in Action_Struct -/* 19 */ float meleepush_z; -/* 23 */ uint8 unknown23; // was [9] +/* 15 */ float hit_heading; // see above notes in Action_Struct +/* 19 */ float hit_pitch; +/* 23 */ uint8 secondary; // 0 for primary hand, 1 for secondary /* 24 */ uint32 special; // 2 = Rampage, 1 = Wild Rampage /* 28 */ }; diff --git a/zone/attack.cpp b/zone/attack.cpp index 8fcf508c3..0979a705e 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -3611,15 +3611,15 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const a->special = 2; else a->special = 0; - a->meleepush_xy = attacker ? attacker->GetHeading() : 0.0f; + a->hit_heading = attacker ? attacker->GetHeading() : 0.0f; if (RuleB(Combat, MeleePush) && damage > 0 && !IsRooted() && (IsClient() || zone->random.Roll(RuleI(Combat, MeleePushChance)))) { a->force = EQEmu::skills::GetSkillMeleePushForce(skill_used); if (IsNPC()) a->force *= 0.10f; // force against NPCs is divided by 10 I guess? ex bash is 0.3, parsed 0.03 against an NPC // update NPC stuff - auto new_pos = glm::vec3(m_Position.x + (a->force * std::cos(a->meleepush_xy) + m_Delta.x), - m_Position.y + (a->force * std::sin(a->meleepush_xy) + m_Delta.y), m_Position.z); + auto new_pos = glm::vec3(m_Position.x + (a->force * std::cos(a->hit_heading) + m_Delta.x), + m_Position.y + (a->force * std::sin(a->hit_heading) + m_Delta.y), m_Position.z); if (zone->zonemap && zone->zonemap->CheckLoS(glm::vec3(m_Position), new_pos)) { // If we have LoS on the new loc it should be reachable. if (IsNPC()) { // Is this adequate? diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 480479b2f..f55c091d6 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -913,16 +913,16 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove action->source = caster ? caster->GetID() : GetID(); action->level = 65; action->instrument_mod = 10; - action->sequence = static_cast((GetHeading() * 12345 / 2)); + action->hit_heading = GetHeading(); action->type = 231; action->spell = spell_id; - action->buff_unknown = 4; + action->effect_flag = 4; cd->target = action->target; cd->source = action->source; cd->type = action->type; cd->spellid = action->spell; - cd->meleepush_xy = action->sequence; + cd->hit_heading = action->hit_heading; CastToClient()->QueuePacket(action_packet); if(caster && caster->IsClient() && caster != this) @@ -964,16 +964,16 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove action->source = caster ? caster->GetID() : GetID(); action->level = 65; action->instrument_mod = 10; - action->sequence = static_cast((GetHeading() * 12345 / 2)); + action->hit_heading = GetHeading(); action->type = 231; action->spell = spell_id; - action->buff_unknown = 4; + action->effect_flag = 4; cd->target = action->target; cd->source = action->source; cd->type = action->type; cd->spellid = action->spell; - cd->meleepush_xy = action->sequence; + cd->hit_heading = action->hit_heading; CastToClient()->QueuePacket(action_packet); if(caster->IsClient() && caster != this) @@ -1002,16 +1002,16 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove action->source = caster ? caster->GetID() : GetID(); action->level = 65; action->instrument_mod = 10; - action->sequence = static_cast((GetHeading() * 12345 / 2)); + action->hit_heading = GetHeading(); action->type = 231; action->spell = spell_id; - action->buff_unknown = 4; + action->effect_flag = 4; cd->target = action->target; cd->source = action->source; cd->type = action->type; cd->spellid = action->spell; - cd->meleepush_xy = action->sequence; + cd->hit_heading = action->hit_heading; CastToClient()->QueuePacket(action_packet); if(caster->IsClient() && caster != this) diff --git a/zone/spells.cpp b/zone/spells.cpp index e66a41fa8..002f996b6 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -2652,18 +2652,18 @@ void Mob::BardPulse(uint16 spell_id, Mob *caster) { action->source = caster->GetID(); action->target = GetID(); action->spell = spell_id; - action->sequence = (uint32) (GetHeading()); // just some random number + action->hit_heading = GetHeading(); action->instrument_mod = caster->GetInstrumentMod(spell_id); - action->buff_unknown = 0; - action->level = buffs[buffs_i].casterlevel; + action->effect_flag = 0; + action->spell_level = action->level = buffs[buffs_i].casterlevel; action->type = DamageTypeSpell; entity_list.QueueCloseClients(this, packet, false, RuleI(Range, SongMessages), 0, true, IsClient() ? FilterPCSpells : FilterNPCSpells); - action->buff_unknown = 4; + action->effect_flag = 4; if(IsEffectInSpell(spell_id, SE_TossUp)) { - action->buff_unknown = 0; + action->effect_flag = 0; } else if(spells[spell_id].pushback > 0 || spells[spell_id].pushup > 0) { @@ -2673,7 +2673,7 @@ void Mob::BardPulse(uint16 spell_id, Mob *caster) { { CastToClient()->SetKnockBackExemption(true); - action->buff_unknown = 0; + action->effect_flag = 0; auto outapp_push = new EQApplicationPacket( OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); PlayerPositionUpdateServer_Struct* spu = (PlayerPositionUpdateServer_Struct*)outapp_push->pBuffer; @@ -2725,7 +2725,7 @@ void Mob::BardPulse(uint16 spell_id, Mob *caster) { cd->source = action->source; cd->type = DamageTypeSpell; cd->spellid = action->spell; - cd->meleepush_xy = action->sequence; + cd->hit_heading = action->hit_heading; cd->damage = 0; if(!IsEffectInSpell(spell_id, SE_BindAffinity)) { @@ -3536,9 +3536,9 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r action->level = caster_level; // caster level, for animation only action->type = 231; // 231 means a spell action->spell = spell_id; - action->sequence = (uint32) (GetHeading()); // just some random number + action->hit_heading = GetHeading(); action->instrument_mod = GetInstrumentMod(spell_id); - action->buff_unknown = 0; + action->effect_flag = 0; if(spelltar != this && spelltar->IsClient()) // send to target spelltar->CastToClient()->QueuePacket(action_packet); @@ -3965,11 +3965,11 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r // NOTE: this is what causes the buff icon to appear on the client, if // this is a buff - but it sortof relies on the first packet. // the complete sequence is 2 actions and 1 damage message - action->buff_unknown = 0x04; // this is a success flag + action->effect_flag = 0x04; // this is a success flag if(IsEffectInSpell(spell_id, SE_TossUp)) { - action->buff_unknown = 0; + action->effect_flag = 0; } else if(spells[spell_id].pushback > 0 || spells[spell_id].pushup > 0) { @@ -3979,7 +3979,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r { spelltar->CastToClient()->SetKnockBackExemption(true); - action->buff_unknown = 0; + action->effect_flag = 0; auto outapp_push = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); PlayerPositionUpdateServer_Struct* spu = (PlayerPositionUpdateServer_Struct*)outapp_push->pBuffer; @@ -4039,7 +4039,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r cd->source = action->source; cd->type = action->type; cd->spellid = action->spell; - cd->meleepush_xy = action->sequence; + cd->hit_heading = action->hit_heading; cd->damage = 0; if(!IsEffectInSpell(spell_id, SE_BindAffinity)){ entity_list.QueueCloseClients( @@ -5722,7 +5722,7 @@ void Client::SendSpellAnim(uint16 targetid, uint16 spell_id) a->source = this->GetID(); a->type = 231; a->spell = spell_id; - a->sequence = 231; + a->hit_heading = GetHeading(); app.priority = 1; entity_list.QueueCloseClients(this, &app, false, RuleI(Range, SpellParticles)); diff --git a/zone/trap.cpp b/zone/trap.cpp index 91e11c012..687d3ded3 100644 --- a/zone/trap.cpp +++ b/zone/trap.cpp @@ -216,7 +216,7 @@ void Trap::Trigger(Mob* trigger) int dmg = zone->random.Int(effectvalue, effectvalue2); trigger->SetHP(trigger->GetHP() - dmg); a->damage = dmg; - a->meleepush_xy = zone->random.Int(0, 1234567); + a->hit_heading = 0.0f; a->source = GetHiddenTrigger()!=nullptr ? GetHiddenTrigger()->GetID() : trigger->GetID(); a->spellid = 0; a->target = trigger->GetID(); From 1b849059419cae9dcb22e538bfad189cb05b849e Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 28 Feb 2018 19:47:23 -0500 Subject: [PATCH 095/670] Fix spell push This now uses the spell data correctly, still need to write a system for NPCs though SE_TossUp needs to be implemented to, it just damages NPCs only --- zone/spell_effects.cpp | 55 --------------------------- zone/spells.cpp | 85 +++++------------------------------------- 2 files changed, 10 insertions(+), 130 deletions(-) diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index f55c091d6..30cf10450 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -2075,61 +2075,6 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove #ifdef SPELL_EFFECT_SPAM snprintf(effect_desc, _EDLEN, "Toss Up: %d", effect_value); #endif - double toss_amt = (double)spells[spell_id].base[i]; - if(toss_amt < 0) - toss_amt = -toss_amt; - - if(IsNPC()) - { - Stun(static_cast(toss_amt)); - } - toss_amt = sqrt(toss_amt)-2.0; - - if(toss_amt < 0.0) - toss_amt = 0.0; - - if(toss_amt > 20.0) - toss_amt = 20.0; - - if(IsClient()) - { - CastToClient()->SetKnockBackExemption(true); - } - - double look_heading = GetHeading(); - look_heading /= 256; - look_heading *= 360; - look_heading += 180; - if(look_heading > 360) - look_heading -= 360; - - //x and y are crossed mkay - double new_x = spells[spell_id].pushback * sin(double(look_heading * 3.141592 / 180.0)); - double new_y = spells[spell_id].pushback * cos(double(look_heading * 3.141592 / 180.0)); - - auto outapp_push = - new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); - PlayerPositionUpdateServer_Struct* spu = (PlayerPositionUpdateServer_Struct*)outapp_push->pBuffer; - - spu->spawn_id = GetID(); - spu->x_pos = FloatToEQ19(GetX()); - spu->y_pos = FloatToEQ19(GetY()); - spu->z_pos = FloatToEQ19(GetZ()); - spu->delta_x = FloatToEQ13(new_x); - spu->delta_y = FloatToEQ13(new_y); - spu->delta_z = FloatToEQ13(toss_amt); - spu->heading = FloatToEQ12(GetHeading()); - spu->padding0002 =0; - spu->padding0006 =7; - spu->padding0014 =0x7f; - spu->padding0018 =0x5df27; - spu->animation = 0; - spu->delta_heading = FloatToEQ10(0); - outapp_push->priority = 5; - entity_list.QueueClients(this, outapp_push, true); - if(IsClient()) - CastToClient()->FastQueuePacket(&outapp_push); - break; } diff --git a/zone/spells.cpp b/zone/spells.cpp index 002f996b6..6815ff406 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -2652,7 +2652,9 @@ void Mob::BardPulse(uint16 spell_id, Mob *caster) { action->source = caster->GetID(); action->target = GetID(); action->spell = spell_id; + action->force = spells[spell_id].pushback; action->hit_heading = GetHeading(); + action->hit_pitch = spells[spell_id].pushup; action->instrument_mod = caster->GetInstrumentMod(spell_id); action->effect_flag = 0; action->spell_level = action->level = buffs[buffs_i].casterlevel; @@ -2661,11 +2663,7 @@ void Mob::BardPulse(uint16 spell_id, Mob *caster) { action->effect_flag = 4; - if(IsEffectInSpell(spell_id, SE_TossUp)) - { - action->effect_flag = 0; - } - else if(spells[spell_id].pushback > 0 || spells[spell_id].pushup > 0) + if(spells[spell_id].pushback > 0 || spells[spell_id].pushup > 0) { if(IsClient()) { @@ -2673,38 +2671,6 @@ void Mob::BardPulse(uint16 spell_id, Mob *caster) { { CastToClient()->SetKnockBackExemption(true); - action->effect_flag = 0; - auto outapp_push = new EQApplicationPacket( - OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); - PlayerPositionUpdateServer_Struct* spu = (PlayerPositionUpdateServer_Struct*)outapp_push->pBuffer; - - double look_heading = caster->CalculateHeadingToTarget(GetX(), GetY()); - look_heading /= 256; - look_heading *= 360; - if(look_heading > 360) - look_heading -= 360; - - //x and y are crossed mkay - double new_x = spells[spell_id].pushback * sin(double(look_heading * 3.141592 / 180.0)); - double new_y = spells[spell_id].pushback * cos(double(look_heading * 3.141592 / 180.0)); - - spu->spawn_id = GetID(); - spu->x_pos = FloatToEQ19(GetX()); - spu->y_pos = FloatToEQ19(GetY()); - spu->z_pos = FloatToEQ19(GetZ()); - spu->delta_x = FloatToEQ13(new_x); - spu->delta_y = FloatToEQ13(new_y); - spu->delta_z = FloatToEQ13(spells[spell_id].pushup); - spu->heading = FloatToEQ12(GetHeading()); - spu->padding0002 =0; - spu->padding0006 =7; - spu->padding0014 =0x7f; - spu->padding0018 =0x5df27; - spu->animation = 0; - spu->delta_heading = FloatToEQ10(0); - outapp_push->priority = 6; - entity_list.QueueClients(this, outapp_push, true); - CastToClient()->FastQueuePacket(&outapp_push); } } } @@ -2725,7 +2691,9 @@ void Mob::BardPulse(uint16 spell_id, Mob *caster) { cd->source = action->source; cd->type = DamageTypeSpell; cd->spellid = action->spell; + cd->force = action->force; cd->hit_heading = action->hit_heading; + cd->hit_pitch = action->hit_pitch; cd->damage = 0; if(!IsEffectInSpell(spell_id, SE_BindAffinity)) { @@ -3536,7 +3504,9 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r action->level = caster_level; // caster level, for animation only action->type = 231; // 231 means a spell action->spell = spell_id; + action->force = spells[spell_id].pushback; action->hit_heading = GetHeading(); + action->hit_pitch = spells[spell_id].pushup; action->instrument_mod = GetInstrumentMod(spell_id); action->effect_flag = 0; @@ -3967,50 +3937,13 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r // the complete sequence is 2 actions and 1 damage message action->effect_flag = 0x04; // this is a success flag - if(IsEffectInSpell(spell_id, SE_TossUp)) - { - action->effect_flag = 0; - } - else if(spells[spell_id].pushback > 0 || spells[spell_id].pushup > 0) + if(spells[spell_id].pushback > 0 || spells[spell_id].pushup > 0) { if(spelltar->IsClient()) { if(!IsBuffSpell(spell_id)) { spelltar->CastToClient()->SetKnockBackExemption(true); - - action->effect_flag = 0; - auto outapp_push = - new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); - PlayerPositionUpdateServer_Struct* spu = (PlayerPositionUpdateServer_Struct*)outapp_push->pBuffer; - - double look_heading = CalculateHeadingToTarget(spelltar->GetX(), spelltar->GetY()); - look_heading /= 256; - look_heading *= 360; - if(look_heading > 360) - look_heading -= 360; - - //x and y are crossed mkay - double new_x = spells[spell_id].pushback * sin(double(look_heading * 3.141592 / 180.0)); - double new_y = spells[spell_id].pushback * cos(double(look_heading * 3.141592 / 180.0)); - - spu->spawn_id = spelltar->GetID(); - spu->x_pos = FloatToEQ19(spelltar->GetX()); - spu->y_pos = FloatToEQ19(spelltar->GetY()); - spu->z_pos = FloatToEQ19(spelltar->GetZ()); - spu->delta_x = FloatToEQ13(new_x); - spu->delta_y = FloatToEQ13(new_y); - spu->delta_z = FloatToEQ13(spells[spell_id].pushup); - spu->heading = FloatToEQ12(spelltar->GetHeading()); - spu->padding0002 =0; - spu->padding0006 =7; - spu->padding0014 =0x7f; - spu->padding0018 =0x5df27; - spu->animation = 0; - spu->delta_heading = FloatToEQ10(0); - outapp_push->priority = 6; - entity_list.QueueClients(this, outapp_push, true); - spelltar->CastToClient()->FastQueuePacket(&outapp_push); } } } @@ -4039,7 +3972,9 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r cd->source = action->source; cd->type = action->type; cd->spellid = action->spell; + cd->force = action->force; cd->hit_heading = action->hit_heading; + cd->hit_pitch = action->hit_pitch; cd->damage = 0; if(!IsEffectInSpell(spell_id, SE_BindAffinity)){ entity_list.QueueCloseClients( From 8e4aff391e97c218dd2519f6f581c86e953fbd0d Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 1 Mar 2018 11:29:13 -0500 Subject: [PATCH 096/670] Fix buff issue --- zone/spells.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/spells.cpp b/zone/spells.cpp index 6815ff406..0e643077e 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -3501,7 +3501,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r action->target = spelltar->GetID(); } - action->level = caster_level; // caster level, for animation only + action->spell_level = action->level = caster_level; // caster level, for animation only action->type = 231; // 231 means a spell action->spell = spell_id; action->force = spells[spell_id].pushback; From 7edc89160543ca30a5efd2f2a53f28fb4c73555e Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 1 Mar 2018 13:41:02 -0500 Subject: [PATCH 097/670] Use the melee push pos update timer for rate limiting the pushes Also lowered the timer since it's limiting actual movement now --- zone/attack.cpp | 6 ++---- zone/mob.cpp | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/zone/attack.cpp b/zone/attack.cpp index 0979a705e..7648f566a 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -3620,14 +3620,12 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const // update NPC stuff auto new_pos = glm::vec3(m_Position.x + (a->force * std::cos(a->hit_heading) + m_Delta.x), m_Position.y + (a->force * std::sin(a->hit_heading) + m_Delta.y), m_Position.z); - if (zone->zonemap && zone->zonemap->CheckLoS(glm::vec3(m_Position), new_pos)) { // If we have LoS on the new loc it should be reachable. + if (position_update_melee_push_timer.Check() && zone->zonemap && zone->zonemap->CheckLoS(glm::vec3(m_Position), new_pos)) { // If we have LoS on the new loc it should be reachable. if (IsNPC()) { // Is this adequate? Teleport(new_pos); - if (position_update_melee_push_timer.Check()) { - SendPositionUpdate(); - } + SendPositionUpdate(); } } else { diff --git a/zone/mob.cpp b/zone/mob.cpp index 3e9aff746..6c3808549 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -115,7 +115,7 @@ Mob::Mob(const char* in_name, fix_z_timer(300), fix_z_timer_engaged(100), attack_anim_timer(1000), - position_update_melee_push_timer(1000), + position_update_melee_push_timer(500), mHateListCleanup(6000) { targeted = 0; From d71e79b3065d282dc3f803893d1340240599e080 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 1 Mar 2018 13:44:10 -0500 Subject: [PATCH 098/670] Add 2013 NPC vs NPC push change They remove NPC vs NPC melee push in 2013 --- zone/attack.cpp | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/zone/attack.cpp b/zone/attack.cpp index 7648f566a..457518c67 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -3615,21 +3615,30 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const if (RuleB(Combat, MeleePush) && damage > 0 && !IsRooted() && (IsClient() || zone->random.Roll(RuleI(Combat, MeleePushChance)))) { a->force = EQEmu::skills::GetSkillMeleePushForce(skill_used); - if (IsNPC()) - a->force *= 0.10f; // force against NPCs is divided by 10 I guess? ex bash is 0.3, parsed 0.03 against an NPC - // update NPC stuff - auto new_pos = glm::vec3(m_Position.x + (a->force * std::cos(a->hit_heading) + m_Delta.x), - m_Position.y + (a->force * std::sin(a->hit_heading) + m_Delta.y), m_Position.z); - if (position_update_melee_push_timer.Check() && zone->zonemap && zone->zonemap->CheckLoS(glm::vec3(m_Position), new_pos)) { // If we have LoS on the new loc it should be reachable. - if (IsNPC()) { - // Is this adequate? - - Teleport(new_pos); - SendPositionUpdate(); - } + if (IsNPC()) { + if (attacker->IsNPC()) + a->force = 0.0f; // 2013 change that disabled NPC vs NPC push + else + a->force *= 0.10f; // force against NPCs is divided by 10 I guess? ex bash is 0.3, parsed 0.03 against an NPC } - else { - a->force = 0.0f; // we couldn't move there, so lets not + // update NPC stuff + if (a->force != 0.0f) { + auto new_pos = glm::vec3( + m_Position.x + (a->force * std::cos(a->hit_heading) + m_Delta.x), + m_Position.y + (a->force * std::sin(a->hit_heading) + m_Delta.y), m_Position.z); + if (position_update_melee_push_timer.Check() && zone->zonemap && + zone->zonemap->CheckLoS( + glm::vec3(m_Position), + new_pos)) { // If we have LoS on the new loc it should be reachable. + if (IsNPC()) { + // Is this adequate? + + Teleport(new_pos); + SendPositionUpdate(); + } + } else { + a->force = 0.0f; // we couldn't move there, so lets not + } } } From 28cb11f52146659c24dc9baaefe115aad211e7fd Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 1 Mar 2018 14:43:37 -0500 Subject: [PATCH 099/670] Implement SE_TossUP -- actually a DMG SPA This just causes damage to NPCs only --- zone/spell_effects.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 30cf10450..5f151e487 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -2075,6 +2075,9 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove #ifdef SPELL_EFFECT_SPAM snprintf(effect_desc, _EDLEN, "Toss Up: %d", effect_value); #endif + if (IsNPC()) { + Damage(caster, std::abs(effect_value), spell_id, spell.skill, false, buffslot, false); + } break; } From 1beb221337fbdb6068e9712cb18d33b74d0a1a5f Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 1 Mar 2018 16:15:57 -0500 Subject: [PATCH 100/670] Pets seem to run until within 35 units of you This was at 75 before, testing on live puts this closer to 35 --- zone/mob_ai.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index a7d1c2cb4..4d213dc7d 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -929,7 +929,7 @@ void Client::AI_Process() SendPositionUpdate(); // this shouldn't happen a lot (and hard to make it) so lets not rate limit } else if (dist >= 400) { // >=20 if (AI_movement_timer->Check()) { - int nspeed = (dist >= 5625 ? GetRunspeed() : GetWalkspeed()); // >= 75 + int nspeed = (dist >= 1225 ? GetRunspeed() : GetWalkspeed()); // >= 35 animation = nspeed; nspeed *= 2; SetCurrentSpeed(nspeed); @@ -1425,7 +1425,7 @@ void Mob::AI_Process() { if (dist >= 400 || distz > 100) { int speed = GetWalkspeed(); - if (dist >= 5625) + if (dist >= 1225) // 35 speed = GetRunspeed(); if (dist >= 202500 || distz > 100) // dist >= 450 From 3cb7b362c8adbd14f59fd9ad4c9174361daf2a2e Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 1 Mar 2018 16:42:46 -0500 Subject: [PATCH 101/670] Only rate limit NPC push Clients are fine --- zone/attack.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/attack.cpp b/zone/attack.cpp index 457518c67..1ae42b168 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -3626,7 +3626,7 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const auto new_pos = glm::vec3( m_Position.x + (a->force * std::cos(a->hit_heading) + m_Delta.x), m_Position.y + (a->force * std::sin(a->hit_heading) + m_Delta.y), m_Position.z); - if (position_update_melee_push_timer.Check() && zone->zonemap && + if ((IsNPC() && position_update_melee_push_timer.Check()) && zone->zonemap && zone->zonemap->CheckLoS( glm::vec3(m_Position), new_pos)) { // If we have LoS on the new loc it should be reachable. From 9e4f728f212c9fbd07c8e3a2190743f71ebc7370 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 1 Mar 2018 18:10:06 -0500 Subject: [PATCH 102/670] Spell push values can be negative --- zone/spells.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zone/spells.cpp b/zone/spells.cpp index 0e643077e..d5da2a34f 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -2663,7 +2663,7 @@ void Mob::BardPulse(uint16 spell_id, Mob *caster) { action->effect_flag = 4; - if(spells[spell_id].pushback > 0 || spells[spell_id].pushup > 0) + if(spells[spell_id].pushback != 0.0f || spells[spell_id].pushup != 0.0f) { if(IsClient()) { @@ -3937,7 +3937,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r // the complete sequence is 2 actions and 1 damage message action->effect_flag = 0x04; // this is a success flag - if(spells[spell_id].pushback > 0 || spells[spell_id].pushup > 0) + if(spells[spell_id].pushback != 0.0f || spells[spell_id].pushup != 0.0f) { if(spelltar->IsClient()) { From a5c32b63b7bfa648337b431a8e5c5ffe95d02eb7 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Fri, 2 Mar 2018 19:05:16 -0500 Subject: [PATCH 103/670] Make old style poison work much closer to live. --- zone/client_packet.cpp | 68 ++++++++++++++++++++++++++++-------------- 1 file changed, 46 insertions(+), 22 deletions(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index d336f7f0d..c647bde78 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -72,6 +72,9 @@ extern PetitionList petition_list; extern EntityList entity_list; typedef void (Client::*ClientPacketProc)(const EQApplicationPacket *app); +#define MIN(x,y) ((x) ConnectingOpcodes; //Use a static array for connected, for speed @@ -2861,41 +2864,57 @@ void Client::Handle_OP_ApplyPoison(const EQApplicationPacket *app) DumpPacket(app); return; } + uint32 ApplyPoisonSuccessResult = 0; ApplyPoison_Struct* ApplyPoisonData = (ApplyPoison_Struct*)app->pBuffer; const EQEmu::ItemInstance* PrimaryWeapon = GetInv().GetItem(EQEmu::inventory::slotPrimary); const EQEmu::ItemInstance* SecondaryWeapon = GetInv().GetItem(EQEmu::inventory::slotSecondary); const EQEmu::ItemInstance* PoisonItemInstance = GetInv()[ApplyPoisonData->inventorySlot]; + const EQEmu::ItemData* poison=PoisonItemInstance->GetItem(); + const EQEmu::ItemData* primary=nullptr; + const EQEmu::ItemData* secondary=nullptr; + bool IsPoison = PoisonItemInstance && + (poison->ItemType == EQEmu::item::ItemTypePoison); - bool IsPoison = PoisonItemInstance && (PoisonItemInstance->GetItem()->ItemType == EQEmu::item::ItemTypePoison); - - if (!IsPoison) - { - Log(Logs::Detail, Logs::Spells, "Item used to cast spell effect from a poison item was missing from inventory slot %d " - "after casting, or is not a poison!", ApplyPoisonData->inventorySlot); - - Message(0, "Error: item not found for inventory slot #%i or is not a poison", ApplyPoisonData->inventorySlot); + if (PrimaryWeapon) { + primary=PrimaryWeapon->GetItem(); } - else if (GetClass() == ROGUE) - { - if ((PrimaryWeapon && PrimaryWeapon->GetItem()->ItemType == EQEmu::item::ItemType1HPiercing) || - (SecondaryWeapon && SecondaryWeapon->GetItem()->ItemType == EQEmu::item::ItemType1HPiercing)) { - float SuccessChance = (GetSkill(EQEmu::skills::SkillApplyPoison) + GetLevel()) / 400.0f; + + if (SecondaryWeapon) { + secondary=SecondaryWeapon->GetItem(); + } + + if (IsPoison && GetClass() == ROGUE) { + + // Live always checks for skillup, even when poison is too high + CheckIncreaseSkill(EQEmu::skills::SkillApplyPoison, nullptr, 10); + + if (poison->Proc.Level2 > GetLevel()) { + // Poison is too high to apply. + Message_StringID(clientMessageTradeskill, POISON_TOO_HIGH); + } + else if ((primary && + primary->ItemType == EQEmu::item::ItemType1HPiercing) || + (secondary && + secondary->ItemType == EQEmu::item::ItemType1HPiercing)) { + double ChanceRoll = zone->random.Real(0, 1); - CheckIncreaseSkill(EQEmu::skills::SkillApplyPoison, nullptr, 10); + // Poisons that use this skill (old world poisons) almost + // never fail to apply. I did 25 applies of a trivial 120+ + // poison with an apply skill of 48 and they all worked. + // Poisons that don't proc until a level higher than the + // rogue simply won't apply at all, as done above now. - if (ChanceRoll < SuccessChance) { + if (ChanceRoll < .90) { ApplyPoisonSuccessResult = 1; - // NOTE: Someone may want to tweak the chance to proc the poison effect that is added to the weapon here. - // My thinking was that DEX should be apart of the calculation. - AddProcToWeapon(PoisonItemInstance->GetItem()->Proc.Effect, false, (GetDEX() / 100) + 103); + AddProcToWeapon(poison->Proc.Effect, false, + (GetDEX() / 100) + 103); } - - DeleteItemInInventory(ApplyPoisonData->inventorySlot, 1, true); - - Log(Logs::General, Logs::None, "Chance to Apply Poison was %f. Roll was %f. Result is %u.", SuccessChance, ChanceRoll, ApplyPoisonSuccessResult); } + + // Live always deletes the item, success or failure. Even if too high. + DeleteItemInInventory(ApplyPoisonData->inventorySlot, 1, true); } auto outapp = new EQApplicationPacket(OP_ApplyPoison, nullptr, sizeof(ApplyPoison_Struct)); @@ -10790,6 +10809,11 @@ void Client::Handle_OP_PopupResponse(const EQApplicationPacket *app) case POPUPID_UPDATE_SHOWSTATSWINDOW: if (GetTarget() && GetTarget()->IsClient()) GetTarget()->CastToClient()->SendStatsWindow(this, true); + else if (GetTarget() && GetTarget()->IsPet()) + { + Pet *pet = (Pet *) GetTarget(); + pet->ShowInventory(this); + } else SendStatsWindow(this, true); return; From bb3596d24560e97a77a2e156ac28b64d2d2efd92 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Fri, 2 Mar 2018 19:14:48 -0500 Subject: [PATCH 104/670] Adjusted chances for apply slightly. --- zone/client_packet.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index c647bde78..6974f3861 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -2903,10 +2903,13 @@ void Client::Handle_OP_ApplyPoison(const EQApplicationPacket *app) // Poisons that use this skill (old world poisons) almost // never fail to apply. I did 25 applies of a trivial 120+ // poison with an apply skill of 48 and they all worked. + // Also did 25 straight poisons at apply skill 248 for very + // high end and they never failed. + // Apply poison ranging from 1-9, 28/30 worked for a level 18.. // Poisons that don't proc until a level higher than the - // rogue simply won't apply at all, as done above now. + // rogue simply won't apply at all, no skill check done. - if (ChanceRoll < .90) { + if (ChanceRoll < (.9 + GetLevel()/1000) { ApplyPoisonSuccessResult = 1; AddProcToWeapon(poison->Proc.Effect, false, (GetDEX() / 100) + 103); @@ -10809,11 +10812,6 @@ void Client::Handle_OP_PopupResponse(const EQApplicationPacket *app) case POPUPID_UPDATE_SHOWSTATSWINDOW: if (GetTarget() && GetTarget()->IsClient()) GetTarget()->CastToClient()->SendStatsWindow(this, true); - else if (GetTarget() && GetTarget()->IsPet()) - { - Pet *pet = (Pet *) GetTarget(); - pet->ShowInventory(this); - } else SendStatsWindow(this, true); return; From 66ef95b9c97c95a06192c67cc152d3666b775780 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Fri, 2 Mar 2018 19:26:41 -0500 Subject: [PATCH 105/670] Missed a header file for poison commit --- zone/string_ids.h | 1 + 1 file changed, 1 insertion(+) diff --git a/zone/string_ids.h b/zone/string_ids.h index 997858bed..7786d12dc 100644 --- a/zone/string_ids.h +++ b/zone/string_ids.h @@ -120,6 +120,7 @@ #define FAIL_DISARM_DETECTED_TRAP 370 //You fail to disarm the detected trap. #define LOOT_LORE_ERROR 371 //You cannot loot this Lore Item. You already have one. #define PICK_LORE 379 //You cannot pick up a lore item you already possess. +#define POISON_TOO_HIGH 382 // This poison is too high level for you to apply. #define CONSENT_DENIED 390 //You do not have consent to summon that corpse. #define DISCIPLINE_RDY 393 //You are ready to use a new discipline now. #define CONSENT_INVALID_NAME 397 //Not a valid consent name. From 6fb3c66fe5fc717e7a70a95a1936a859ca246449 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Fri, 2 Mar 2018 20:08:06 -0500 Subject: [PATCH 106/670] Fixed last minute math change typo. --- zone/client_packet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 6974f3861..7e38d6363 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -2909,7 +2909,7 @@ void Client::Handle_OP_ApplyPoison(const EQApplicationPacket *app) // Poisons that don't proc until a level higher than the // rogue simply won't apply at all, no skill check done. - if (ChanceRoll < (.9 + GetLevel()/1000) { + if (ChanceRoll < (.9 + GetLevel()/1000)) { ApplyPoisonSuccessResult = 1; AddProcToWeapon(poison->Proc.Effect, false, (GetDEX() / 100) + 103); From b6679446129b5891164b8cac756412d7d0c5e2cd Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Fri, 2 Mar 2018 20:13:24 -0500 Subject: [PATCH 107/670] Removed unneeded macro --- zone/client_packet.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 7e38d6363..34c1387b9 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -72,8 +72,6 @@ extern PetitionList petition_list; extern EntityList entity_list; typedef void (Client::*ClientPacketProc)(const EQApplicationPacket *app); -#define MIN(x,y) ((x) ConnectingOpcodes; From ee4a79616f28c50f030902ad53a43276c6049a34 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 3 Mar 2018 00:59:44 -0500 Subject: [PATCH 108/670] Lets can't a reference in resends --- common/net/daybreak_connection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/net/daybreak_connection.cpp b/common/net/daybreak_connection.cpp index 095fab525..d32f9f678 100644 --- a/common/net/daybreak_connection.cpp +++ b/common/net/daybreak_connection.cpp @@ -165,7 +165,7 @@ void EQ::Net::DaybreakConnectionManager::ProcessResend() { auto iter = m_connections.begin(); while (iter != m_connections.end()) { - auto connection = iter->second; + auto &connection = iter->second; auto status = connection->m_status; switch (status) @@ -1397,4 +1397,4 @@ EQ::Net::SequenceOrder EQ::Net::DaybreakConnection::CompareSequence(uint16_t exp } return SequencePast; -} \ No newline at end of file +} From 5aab187e172744527a6d40e5e48c154ab36993fd Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 3 Mar 2018 13:10:32 -0500 Subject: [PATCH 109/670] Fix missile heading --- zone/special_attacks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/special_attacks.cpp b/zone/special_attacks.cpp index 03b144b5a..7c91c97a7 100644 --- a/zone/special_attacks.cpp +++ b/zone/special_attacks.cpp @@ -1443,7 +1443,7 @@ void Mob::SendItemAnimation(Mob *to, const EQEmu::ItemData *item, EQEmu::skills: //these angle and tilt used together seem to make the arrow/knife throw as straight as I can make it - as->launch_angle = CalculateHeadingToTarget(to->GetX(), to->GetY()) * 2; + as->launch_angle = CalculateHeadingToTarget(to->GetX(), to->GetY()); as->tilt = 125; as->arc = 50; From b63923264db32f01b050224ff042e854660fb1cf Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 3 Mar 2018 22:21:06 -0500 Subject: [PATCH 110/670] Fix memory leak --- zone/aura.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/zone/aura.cpp b/zone/aura.cpp index 8c54b75ee..08600811a 100644 --- a/zone/aura.cpp +++ b/zone/aura.cpp @@ -616,6 +616,7 @@ bool Aura::Process() it = spawned_for.erase(it); } } + safe_delete(app); } // TODO: waypoints? From 690d8f9155045f6589dcc7ac0c6acd78bd4fc1b0 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 3 Mar 2018 22:37:06 -0500 Subject: [PATCH 111/670] Fix Conditional jump or move depends on uninitialised value(s) --- zone/client.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/zone/client.cpp b/zone/client.cpp index 662c37071..16157c807 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -337,6 +337,7 @@ Client::Client(EQStreamInterface* ieqs) m_pp.InnateSkills[i] = InnateDisabled; temp_pvp = false; + is_client_moving = false; AI_Init(); } From 35c4867334a9e69d3d7693e26669fbf395d7c642 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 4 Mar 2018 02:19:12 -0500 Subject: [PATCH 112/670] Add the Fast trig functions that work with EQ headings This should match pretty close to the clients LUTs Also fixed a bug with push --- zone/CMakeLists.txt | 2 ++ zone/attack.cpp | 8 +++++--- zone/fastmath.cpp | 32 ++++++++++++++++++++++++++++++++ zone/fastmath.h | 18 ++++++++++++++++++ 4 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 zone/fastmath.cpp create mode 100644 zone/fastmath.h diff --git a/zone/CMakeLists.txt b/zone/CMakeLists.txt index 49644cfcf..b10ab32a0 100644 --- a/zone/CMakeLists.txt +++ b/zone/CMakeLists.txt @@ -28,6 +28,7 @@ SET(zone_sources encounter.cpp entity.cpp exp.cpp + fastmath.cpp fearpath.cpp forage.cpp groups.cpp @@ -158,6 +159,7 @@ SET(zone_headers entity.h errmsg.h event_codes.h + fastmath.h forage.h global_loot_manager.h groups.h diff --git a/zone/attack.cpp b/zone/attack.cpp index 1ae42b168..90a774550 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -32,6 +32,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "worldserver.h" #include "zone.h" #include "lua_parser.h" +#include "fastmath.h" #include #include @@ -43,6 +44,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA extern QueryServ* QServ; extern WorldServer worldserver; +extern FastMath g_Math; #ifdef _WINDOWS #define snprintf _snprintf @@ -3624,9 +3626,9 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const // update NPC stuff if (a->force != 0.0f) { auto new_pos = glm::vec3( - m_Position.x + (a->force * std::cos(a->hit_heading) + m_Delta.x), - m_Position.y + (a->force * std::sin(a->hit_heading) + m_Delta.y), m_Position.z); - if ((IsNPC() && position_update_melee_push_timer.Check()) && zone->zonemap && + m_Position.x + (a->force * g_Math.FastSin(a->hit_heading) + m_Delta.x), + m_Position.y + (a->force * g_Math.FastCos(a->hit_heading) + m_Delta.y), m_Position.z); + if ((!IsNPC() || position_update_melee_push_timer.Check()) && zone->zonemap && zone->zonemap->CheckLoS( glm::vec3(m_Position), new_pos)) { // If we have LoS on the new loc it should be reachable. diff --git a/zone/fastmath.cpp b/zone/fastmath.cpp new file mode 100644 index 000000000..fb2cef193 --- /dev/null +++ b/zone/fastmath.cpp @@ -0,0 +1,32 @@ +#include +#include "fastmath.h" + +FastMath g_Math; + +// This should match EQ's sin/cos LUTs +// Some values didn't match on linux, but they were the "same" float :P +FastMath::FastMath() +{ + int ci = 0; + int si = 128; + float res; + do { + res = std::cos(static_cast(ci) * M_PI * 2 / 512); + lut_cos[ci] = res; + if (si == 512) + si = 0; + lut_sin[si] = res; + ++ci; + ++si; + } while (ci < 512); + + lut_sin[0] = 0.0f; + lut_sin[128] = 1.0f; + lut_sin[256] = 0.0f; + lut_sin[384] = -1.0f; + + lut_cos[0] = 1.0f; + lut_cos[128] = 0.0f; + lut_cos[384] = 0.0f; +} + diff --git a/zone/fastmath.h b/zone/fastmath.h new file mode 100644 index 000000000..083198e48 --- /dev/null +++ b/zone/fastmath.h @@ -0,0 +1,18 @@ +#ifndef FASTMATH_H +#define FASTMATH_H + +class FastMath +{ +private: + float lut_cos[512]; + float lut_sin[512]; + +public: + FastMath(); + + inline float FastSin(float a) { return lut_sin[static_cast(a) & 0x1ff]; } + inline float FastCos(float a) { return lut_cos[static_cast(a) & 0x1ff]; } + +}; + +#endif /* !FASTMATH_H */ From 525db1819dfea8a1d7f8a4bd631ef00e38a23709 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 4 Mar 2018 13:54:04 -0500 Subject: [PATCH 113/670] Fix VS compilation hopefully --- zone/fastmath.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zone/fastmath.cpp b/zone/fastmath.cpp index fb2cef193..0da87dc87 100644 --- a/zone/fastmath.cpp +++ b/zone/fastmath.cpp @@ -1,3 +1,6 @@ +#if defined(_MSC_VER) +#define _USE_MATH_DEFINES +#endif #include #include "fastmath.h" From e5e779c0643e769b5d3d4bd34712308e1db0fac7 Mon Sep 17 00:00:00 2001 From: Uleat Date: Sun, 4 Mar 2018 21:38:17 -0500 Subject: [PATCH 114/670] Updated UCS versioning code - update your *.conf files --- changelog.txt | 7 ++ common/emu_oplist.h | 1 + common/emu_versions.h | 14 ++++ common/ruletypes.h | 3 - common/servertalk.h | 26 +++--- common/shareddb.cpp | 18 ++++ common/shareddb.h | 1 + ucs/clientlist.cpp | 153 +++++++++++----------------------- ucs/clientlist.h | 14 ---- ucs/ucs.cpp | 7 -- ucs/worldserver.cpp | 54 ------------ ucs/worldserver.h | 7 -- utils/patches/patch_RoF.conf | 1 + utils/patches/patch_RoF2.conf | 1 + utils/patches/patch_SoD.conf | 1 + utils/patches/patch_UF.conf | 1 + world/client.cpp | 112 +++++++++++++++---------- world/net.cpp | 4 + world/ucs.cpp | 9 -- world/zonelist.cpp | 11 +++ world/zonelist.h | 3 +- world/zoneserver.cpp | 20 ++++- zone/client_packet.cpp | 81 +++++++++++++++++- zone/client_packet.h | 1 + zone/worldserver.cpp | 65 +-------------- zone/zone.cpp | 31 ++++++- zone/zone.h | 9 +- zone/zonedb.cpp | 11 ++- 28 files changed, 338 insertions(+), 328 deletions(-) diff --git a/changelog.txt b/changelog.txt index 12a9fc76a..360f61082 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,12 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 03/04/2018 == +Uleat: Updated UCS versioning + - SoF and higher clients have a new opcode identified (update your *.conf files) + - Rework of previous ucs connectivity code + - Unrelated: Zone::weatherSend() now takes an optional parameter for singular updates (as in client entering zone) + -- prior to this, every client already in-zone received a weather update packet whenever a new client zoned in + == 02/18/2018 == Uleat: Bug reporting fix and overhaul. - Fixed bug reporting for SoD+ clients diff --git a/common/emu_oplist.h b/common/emu_oplist.h index 89e0126a8..5078cca68 100644 --- a/common/emu_oplist.h +++ b/common/emu_oplist.h @@ -393,6 +393,7 @@ N(OP_PVPLeaderBoardReply), N(OP_PVPLeaderBoardRequest), N(OP_PVPStats), N(OP_QueryResponseThing), +N(OP_QueryUCSServerStatus), N(OP_RaidInvite), N(OP_RaidJoin), N(OP_RaidUpdate), diff --git a/common/emu_versions.h b/common/emu_versions.h index 9ab5becde..a5f3d0183 100644 --- a/common/emu_versions.h +++ b/common/emu_versions.h @@ -121,6 +121,20 @@ namespace EQEmu ClientVersion ConvertOfflinePCMobVersionToClientVersion(MobVersion mob_version); MobVersion ConvertClientVersionToOfflinePCMobVersion(ClientVersion client_version); + + enum UCSVersion : char { + ucsUnknown = '\0', + ucsClient62Chat = 'A', + ucsClient62Mail = 'a', + ucsTitaniumChat = 'B', + ucsTitaniumMail = 'b', + ucsSoFCombined = 'C', + ucsSoDCombined = 'D', + ucsUFCombined = 'E', + ucsRoFCombined = 'F', + ucsRoF2Combined = 'G' + }; + } /*versions*/ } /*EQEmu*/ diff --git a/common/ruletypes.h b/common/ruletypes.h index f6c9f569b..d80996184 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -614,9 +614,6 @@ RULE_INT(Chat, IntervalDurationMS, 60000) RULE_INT(Chat, KarmaUpdateIntervalMS, 1200000) RULE_INT(Chat, KarmaGlobalChatLimit, 72) //amount of karma you need to be able to talk in ooc/auction/chat below the level limit RULE_INT(Chat, GlobalChatLevelLimit, 8) //level limit you need to of reached to talk in ooc/auction/chat if your karma is too low. -RULE_INT(Chat, ExpireClientVersionRequests, 3) // time in seconds to keep current cv requests active -RULE_INT(Chat, ExpireClientVersionReplies, 30) // time in seconds to keep current cv replies active -RULE_INT(Chat, UCSBroadcastServerReadyDelay, 60) // time in seconds to delay broadcast `server ready` after start-up RULE_CATEGORY_END() RULE_CATEGORY(Merchant) diff --git a/common/servertalk.h b/common/servertalk.h index 82f39319f..e1d019fc4 100644 --- a/common/servertalk.h +++ b/common/servertalk.h @@ -190,9 +190,8 @@ #define ServerOP_ReloadLogs 0x4010 #define ServerOP_ReloadPerlExportSettings 0x4011 #define ServerOP_CZSetEntityVariableByClientName 0x4012 -#define ServerOP_UCSClientVersionRequest 0x4013 -#define ServerOP_UCSClientVersionReply 0x4014 -#define ServerOP_UCSBroadcastServerReady 0x4015 +#define ServerOP_UCSServerStatusRequest 0x4013 +#define ServerOP_UCSServerStatusReply 0x4014 /* Query Server OP Codes */ #define ServerOP_QSPlayerLogTrades 0x5010 #define ServerOP_QSPlayerLogHandins 0x5011 @@ -1281,18 +1280,15 @@ struct ServerRequestTellQueue_Struct { char name[64]; }; -struct UCSClientVersionRequest_Struct { - uint32 character_id; -}; - -struct UCSClientVersionReply_Struct { - uint32 character_id; - EQEmu::versions::ClientVersion client_version; -}; - -struct UCSBroadcastServerReady_Struct { - char chat_prefix[128]; - char mail_prefix[128]; +struct UCSServerStatus_Struct { + uint8 available; // non-zero=true, 0=false + union { + struct { + uint16 port; + uint16 unused; + }; + uint32 timestamp; + }; }; #pragma pack() diff --git a/common/shareddb.cpp b/common/shareddb.cpp index 4a82c32da..a4c6e54d1 100644 --- a/common/shareddb.cpp +++ b/common/shareddb.cpp @@ -127,6 +127,24 @@ void SharedDatabase::SetMailKey(int CharID, int IPAddress, int MailKey) } +std::string SharedDatabase::GetMailKey(int CharID, bool key_only) +{ + std::string query = StringFormat("SELECT `mailkey` FROM `character_data` WHERE `id`='%i' LIMIT 1", CharID); + auto results = QueryDatabase(query); + if (!results.Success()) { + Log(Logs::Detail, Logs::MySQLError, "Error retrieving mailkey from database: %s", results.ErrorMessage().c_str()); + return std::string(); + } + + auto row = results.begin(); + std::string mail_key = row[0]; + + if (mail_key.length() > 8 && key_only) + return mail_key.substr(8); + else + return mail_key; +} + bool SharedDatabase::SaveCursor(uint32 char_id, std::list::const_iterator &start, std::list::const_iterator &end) { // Delete cursor items diff --git a/common/shareddb.h b/common/shareddb.h index 171c2b8c6..bbd8dc9a0 100644 --- a/common/shareddb.h +++ b/common/shareddb.h @@ -73,6 +73,7 @@ class SharedDatabase : public Database bool GetCommandSettings(std::map>> &command_settings); uint32 GetTotalTimeEntitledOnAccount(uint32 AccountID); void SetMailKey(int CharID, int IPAddress, int MailKey); + std::string GetMailKey(int CharID, bool key_only = false); /* Character InventoryProfile diff --git a/ucs/clientlist.cpp b/ucs/clientlist.cpp index e5076a150..130914952 100644 --- a/ucs/clientlist.cpp +++ b/ucs/clientlist.cpp @@ -512,7 +512,6 @@ Client::Client(std::shared_ptr eqs) { AccountGrabUpdateTimer = new Timer(60000); //check every minute GlobalChatLimiterTimer = new Timer(RuleI(Chat, IntervalDurationMS)); - RawConnectionType = '\0'; TypeOfConnection = ConnectionTypeUnknown; ClientVersion_ = EQEmu::versions::ClientVersion::Unknown; @@ -645,10 +644,6 @@ void Clientlist::Process() database.GetAccountStatus((*it)); - // give world packet a chance to arrive and be processed - if ((*it)->GetCharID()) - ClientVersionRequestQueue[(*it)->GetCharID()] = (Timer::GetCurrentTime() + (RuleI(Chat, ExpireClientVersionRequests) * 1000)); - if ((*it)->GetConnectionType() == ConnectionTypeCombined) (*it)->SendFriends(); @@ -688,34 +683,8 @@ void Clientlist::Process() continue; } - // initiate request if we don't already have a reply from 'world enter' (ucs crash recovery protocol) - if ((*it)->GetClientVersion() == EQEmu::versions::ClientVersion::Unknown) { - if (!CheckForClientVersionReply((*it))) - RequestClientVersion((*it)->GetCharID()); - } - ++it; } - - // delete expired replies - auto repiter = ClientVersionReplyQueue.begin(); - while (repiter != ClientVersionReplyQueue.end()) { - if ((*repiter).second.second <= Timer::GetCurrentTime()) { - repiter = ClientVersionReplyQueue.erase(repiter); - continue; - } - ++repiter; - } - - // delete expired requests - auto reqiter = ClientVersionRequestQueue.begin(); - while (reqiter != ClientVersionRequestQueue.end()) { - if ((*reqiter).second <= Timer::GetCurrentTime()) { - reqiter = ClientVersionRequestQueue.erase(reqiter); - continue; - } - ++reqiter; - } } void Clientlist::ProcessOPMailCommand(Client *c, std::string CommandString) @@ -873,55 +842,6 @@ void Clientlist::ProcessOPMailCommand(Client *c, std::string CommandString) } } -void Clientlist::RequestClientVersion(uint32 character_id) { - if (!character_id) - return; - - if (ClientVersionRequestQueue.find(character_id) != ClientVersionRequestQueue.end()) { - if (ClientVersionRequestQueue[character_id] > Timer::GetCurrentTime()) - return; - } - - if (LogSys.log_settings[Logs::UCS_Server].is_category_enabled) { - Log(Logs::Detail, Logs::UCS_Server, "Requesting ClientVersion reply for character id: %u", - character_id); - } - ClientVersionRequestIDs.push_back(character_id); - ClientVersionRequestQueue[character_id] = (Timer::GetCurrentTime() + (RuleI(Chat, ExpireClientVersionRequests) * 1000)); -} - -bool Clientlist::QueueClientVersionReply(uint32 character_id, EQEmu::versions::ClientVersion client_version) { - if (!character_id) - return true; - if (client_version < EQEmu::versions::ClientVersion::Titanium || client_version > EQEmu::versions::ClientVersion::RoF2) - return false; - - if (LogSys.log_settings[Logs::UCS_Server].is_category_enabled) { - Log(Logs::Detail, Logs::UCS_Server, "Queueing ClientVersion %u reply for character id: %u", - static_cast(client_version), character_id); - } - ClientVersionReplyQueue[character_id] = cvt_pair(client_version, (Timer::GetCurrentTime() + (RuleI(Chat, ExpireClientVersionReplies) * 1000))); - ClientVersionRequestQueue.erase(character_id); - - return true; -} - -bool Clientlist::CheckForClientVersionReply(Client* c) { - if (!c) - return true; - if (ClientVersionReplyQueue.find(c->GetCharID()) == ClientVersionReplyQueue.end()) - return false; - - if (LogSys.log_settings[Logs::UCS_Server].is_category_enabled) { - Log(Logs::General, Logs::UCS_Server, "Registering ClientVersion %s for stream %s:%u", - EQEmu::versions::ClientVersionName(ClientVersionReplyQueue[c->GetCharID()].first), c->ClientStream->GetRemoteAddr().c_str(), c->ClientStream->GetRemotePort()); - } - c->SetClientVersion(ClientVersionReplyQueue[c->GetCharID()].first); - ClientVersionReplyQueue.erase(c->GetCharID()); - - return true; -} - void Clientlist::CloseAllConnections() { @@ -2214,39 +2134,64 @@ void Client::AccountUpdate() void Client::SetConnectionType(char c) { - RawConnectionType = c; - switch (c) { - case 'S': - { - TypeOfConnection = ConnectionTypeCombined; - Log(Logs::Detail, Logs::UCS_Server, "Connection type is Combined (SoF/SoD)"); - break; - } - case 'U': - { - TypeOfConnection = ConnectionTypeCombined; - UnderfootOrLater = true; - Log(Logs::Detail, Logs::UCS_Server, "Connection type is Combined (Underfoot+)"); - break; - } - case 'M': - { - TypeOfConnection = ConnectionTypeMail; - Log(Logs::Detail, Logs::UCS_Server, "Connection type is Mail (6.2 or Titanium client)"); - break; - } - case 'C': + case EQEmu::versions::ucsTitaniumChat: { TypeOfConnection = ConnectionTypeChat; - Log(Logs::Detail, Logs::UCS_Server, "Connection type is Chat (6.2 or Titanium client)"); + ClientVersion_ = EQEmu::versions::ClientVersion::Titanium; + Log(Logs::Detail, Logs::UCS_Server, "Connection type is Chat (Titanium)"); + break; + } + case EQEmu::versions::ucsTitaniumMail: + { + TypeOfConnection = ConnectionTypeMail; + ClientVersion_ = EQEmu::versions::ClientVersion::Titanium; + Log(Logs::Detail, Logs::UCS_Server, "Connection type is Mail (Titanium)"); + break; + } + case EQEmu::versions::ucsSoFCombined: + { + TypeOfConnection = ConnectionTypeCombined; + ClientVersion_ = EQEmu::versions::ClientVersion::SoF; + Log(Logs::Detail, Logs::UCS_Server, "Connection type is Combined (SoF)"); + break; + } + case EQEmu::versions::ucsSoDCombined: + { + TypeOfConnection = ConnectionTypeCombined; + ClientVersion_ = EQEmu::versions::ClientVersion::SoD; + Log(Logs::Detail, Logs::UCS_Server, "Connection type is Combined (SoD)"); + break; + } + case EQEmu::versions::ucsUFCombined: + { + TypeOfConnection = ConnectionTypeCombined; + ClientVersion_ = EQEmu::versions::ClientVersion::UF; + UnderfootOrLater = true; + Log(Logs::Detail, Logs::UCS_Server, "Connection type is Combined (Underfoot)"); + break; + } + case EQEmu::versions::ucsRoFCombined: + { + TypeOfConnection = ConnectionTypeCombined; + ClientVersion_ = EQEmu::versions::ClientVersion::RoF; + UnderfootOrLater = true; + Log(Logs::Detail, Logs::UCS_Server, "Connection type is Combined (RoF)"); + break; + } + case EQEmu::versions::ucsRoF2Combined: + { + TypeOfConnection = ConnectionTypeCombined; + ClientVersion_ = EQEmu::versions::ClientVersion::RoF2; + UnderfootOrLater = true; + Log(Logs::Detail, Logs::UCS_Server, "Connection type is Combined (RoF2)"); break; } default: { - RawConnectionType = '\0'; TypeOfConnection = ConnectionTypeUnknown; + ClientVersion_ = EQEmu::versions::ClientVersion::Unknown; Log(Logs::Detail, Logs::UCS_Server, "Connection type is unknown."); } } diff --git a/ucs/clientlist.h b/ucs/clientlist.h index f84bdc8a2..6021c5c0e 100644 --- a/ucs/clientlist.h +++ b/ucs/clientlist.h @@ -140,10 +140,8 @@ public: int GetMailBoxNumber() { return CurrentMailBox; } int GetMailBoxNumber(std::string CharacterName); - char GetRawConnectionType() { return RawConnectionType; } void SetConnectionType(char c); ConnectionType GetConnectionType() { return TypeOfConnection; } - void SetClientVersion(EQEmu::versions::ClientVersion client_version) { ClientVersion_ = client_version; } EQEmu::versions::ClientVersion GetClientVersion() { return ClientVersion_; } inline bool IsMailConnection() { return (TypeOfConnection == ConnectionTypeMail) || (TypeOfConnection == ConnectionTypeCombined); } @@ -173,7 +171,6 @@ private: int AttemptedMessages; bool ForceDisconnect; - char RawConnectionType; ConnectionType TypeOfConnection; EQEmu::versions::ClientVersion ClientVersion_; bool UnderfootOrLater; @@ -190,22 +187,11 @@ public: Client *IsCharacterOnline(std::string CharacterName); void ProcessOPMailCommand(Client *c, std::string CommandString); - std::list ClientVersionRequestIDs; - - void RequestClientVersion(uint32 character_id); - bool QueueClientVersionReply(uint32 character_id, EQEmu::versions::ClientVersion client_version); - bool CheckForClientVersionReply(Client* c); - private: - typedef std::pair cvt_pair; - EQ::Net::EQStreamManager *chatsf; std::list ClientChatConnections; - std::map ClientVersionRequestQueue; - std::map ClientVersionReplyQueue; - OpcodeManager *ChatOpMgr; }; diff --git a/ucs/ucs.cpp b/ucs/ucs.cpp index b59effd03..b9e7f41b4 100644 --- a/ucs/ucs.cpp +++ b/ucs/ucs.cpp @@ -140,19 +140,12 @@ int main() { worldserver = new WorldServer; - worldserver->ActivateBroadcastServerReadyTimer(); - while(RunLoops) { - // this triggers clients to 'reconnect' to ucs after server crash - if (worldserver->HasBroadcastServerReadyTimer()) - worldserver->ProcessBroadcastServerReady(); Timer::SetCurrentTime(); g_Clientlist->Process(); - worldserver->ProcessClientVersionRequests(g_Clientlist->ClientVersionRequestIDs); - if(ChannelListProcessTimer.Check()) ChannelList->Process(); diff --git a/ucs/worldserver.cpp b/ucs/worldserver.cpp index 48ec03dca..b3df5d99d 100644 --- a/ucs/worldserver.cpp +++ b/ucs/worldserver.cpp @@ -50,8 +50,6 @@ WorldServer::WorldServer() { m_connection.reset(new EQ::Net::ServertalkClient(Config->WorldIP, Config->WorldTCPPort, false, "UCS", Config->SharedKey)); m_connection->OnMessage(std::bind(&WorldServer::ProcessMessage, this, std::placeholders::_1, std::placeholders::_2)); - - m_bsr_timer = nullptr; } WorldServer::~WorldServer() @@ -140,59 +138,7 @@ void WorldServer::ProcessMessage(uint16 opcode, EQ::Net::Packet &p) std::string()); break; } - - case ServerOP_UCSClientVersionReply: - { - UCSClientVersionReply_Struct* cvr = (UCSClientVersionReply_Struct*)pack->pBuffer; - g_Clientlist->QueueClientVersionReply(cvr->character_id, cvr->client_version); - break; } - } -} - -void WorldServer::ProcessClientVersionRequests(std::list& id_list) { - UCSClientVersionRequest_Struct cvr; - EQ::Net::DynamicPacket dp_cvr; - for (auto iter : id_list) { - cvr.character_id = iter; - dp_cvr.PutData(0, &cvr, sizeof(cvr)); - m_connection->Send(ServerOP_UCSClientVersionRequest, dp_cvr); - } - id_list.clear(); -} - -void WorldServer::ProcessBroadcastServerReady() { - if (m_bsr_timer && (*m_bsr_timer) <= Timer::GetCurrentTime()) { - UCSBroadcastServerReady_Struct bsr; - memset(&bsr, 0, sizeof(UCSBroadcastServerReady_Struct)); - - sprintf(bsr.chat_prefix, "%s,%i,%s.", - Config->ChatHost.c_str(), - Config->ChatPort, - Config->ShortName.c_str() - ); - sprintf(bsr.mail_prefix, "%s,%i,%s.", - Config->ChatHost.c_str(), - Config->MailPort, - Config->ShortName.c_str() - ); - - EQ::Net::DynamicPacket dp_bsr; - dp_bsr.PutData(0, &bsr, sizeof(UCSBroadcastServerReady_Struct)); - m_connection->Send(ServerOP_UCSBroadcastServerReady, dp_bsr); - - safe_delete(m_bsr_timer); - } -} - -void WorldServer::ActivateBroadcastServerReadyTimer() { - safe_delete(m_bsr_timer); - m_bsr_timer = new uint32; - - // clients do not drop their connection to ucs immediately... - // it can take upwards of 60 seconds to process the drop - // and clients will not re-connect to ucs until that occurs - *m_bsr_timer = (Timer::GetCurrentTime() + (RuleI(Chat, UCSBroadcastServerReadyDelay) * 1000)); } void Client45ToServerSayLink(std::string& serverSayLink, const std::string& clientSayLink) { diff --git a/ucs/worldserver.h b/ucs/worldserver.h index 66ed0ec32..aad68e085 100644 --- a/ucs/worldserver.h +++ b/ucs/worldserver.h @@ -29,14 +29,7 @@ public: ~WorldServer(); void ProcessMessage(uint16 opcode, EQ::Net::Packet &); - void ProcessClientVersionRequests(std::list& id_list); - - void ProcessBroadcastServerReady(); - bool HasBroadcastServerReadyTimer() { return (m_bsr_timer != nullptr); } - void ActivateBroadcastServerReadyTimer(); - private: - uint32* m_bsr_timer; std::unique_ptr m_connection; }; diff --git a/utils/patches/patch_RoF.conf b/utils/patches/patch_RoF.conf index 074d5751d..b348ea1ad 100644 --- a/utils/patches/patch_RoF.conf +++ b/utils/patches/patch_RoF.conf @@ -165,6 +165,7 @@ OP_GMNameChange=0x3077 # Was 0x4434 OP_GMLastName=0x4dd7 # Was 0x3077 # Misc Opcodes +OP_QueryUCSServerStatus=0x6964 OP_InspectRequest=0x23f1 OP_InspectAnswer=0x5794 OP_InspectMessageUpdate=0x3064 diff --git a/utils/patches/patch_RoF2.conf b/utils/patches/patch_RoF2.conf index dd58b3c11..9bd507bc1 100644 --- a/utils/patches/patch_RoF2.conf +++ b/utils/patches/patch_RoF2.conf @@ -164,6 +164,7 @@ OP_GMNameChange=0x035f OP_GMLastName=0x46ce # Misc Opcodes +OP_QueryUCSServerStatus=0x398f OP_InspectRequest=0x57bc OP_InspectAnswer=0x71ac OP_InspectMessageUpdate=0x4d25 diff --git a/utils/patches/patch_SoD.conf b/utils/patches/patch_SoD.conf index 5913670ae..ab8267a8a 100644 --- a/utils/patches/patch_SoD.conf +++ b/utils/patches/patch_SoD.conf @@ -165,6 +165,7 @@ OP_GMKill=0x6685 # C OP_GMNameChange=0x565d # C OP_GMLastName=0x3563 # C +OP_QueryUCSServerStatus=0x4036 OP_InspectAnswer=0x4938 # C OP_Action2=0x7e4d # C OP_Damage? OP_BeginCast=0x0d5a # C diff --git a/utils/patches/patch_UF.conf b/utils/patches/patch_UF.conf index a96b4208a..c08edbca3 100644 --- a/utils/patches/patch_UF.conf +++ b/utils/patches/patch_UF.conf @@ -168,6 +168,7 @@ OP_GMKill=0x799c # C OP_GMNameChange=0x0f48 # C OP_GMLastName=0x7bfb # C +OP_QueryUCSServerStatus=0x4481 OP_InspectAnswer=0x0c2b # C OP_BeginCast=0x0d5a # C OP_ColoredText=0x71bf # C diff --git a/world/client.cpp b/world/client.cpp index d904e1d2d..d3b74ae3f 100644 --- a/world/client.cpp +++ b/world/client.cpp @@ -84,6 +84,7 @@ extern ClientList client_list; extern EQEmu::Random emu_random; extern uint32 numclients; extern volatile bool RunLoops; +extern volatile bool UCSServerAvailable_; Client::Client(EQStreamInterface* ieqs) : autobootup_timeout(RuleI(World, ZoneAutobootTimeoutMS)), @@ -890,53 +891,84 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) { } QueuePacket(outapp); safe_delete(outapp); - + + // set mailkey - used for duration of character session int MailKey = emu_random.Int(1, INT_MAX); database.SetMailKey(charid, GetIP(), MailKey); + if (UCSServerAvailable_) { + const WorldConfig *Config = WorldConfig::get(); + std::string buffer; - char ConnectionType; + EQEmu::versions::UCSVersion ConnectionType = EQEmu::versions::ucsUnknown; - if (m_ClientVersionBit & EQEmu::versions::bit_UFAndLater) - ConnectionType = 'U'; - else if (m_ClientVersionBit & EQEmu::versions::bit_SoFAndLater) - ConnectionType = 'S'; - else - ConnectionType = 'C'; + // chat server packet + switch (GetClientVersion()) { + case EQEmu::versions::ClientVersion::Titanium: + ConnectionType = EQEmu::versions::ucsTitaniumChat; + break; + case EQEmu::versions::ClientVersion::SoF: + ConnectionType = EQEmu::versions::ucsSoFCombined; + break; + case EQEmu::versions::ClientVersion::SoD: + ConnectionType = EQEmu::versions::ucsSoDCombined; + break; + case EQEmu::versions::ClientVersion::UF: + ConnectionType = EQEmu::versions::ucsUFCombined; + break; + case EQEmu::versions::ClientVersion::RoF: + ConnectionType = EQEmu::versions::ucsRoFCombined; + break; + case EQEmu::versions::ClientVersion::RoF2: + ConnectionType = EQEmu::versions::ucsRoF2Combined; + break; + default: + ConnectionType = EQEmu::versions::ucsUnknown; + break; + } - auto outapp2 = new EQApplicationPacket(OP_SetChatServer); - char buffer[112]; + buffer = StringFormat("%s,%i,%s.%s,%c%08X", + Config->ChatHost.c_str(), + Config->ChatPort, + Config->ShortName.c_str(), + GetCharName(), + ConnectionType, + MailKey + ); - const WorldConfig *Config = WorldConfig::get(); + outapp = new EQApplicationPacket(OP_SetChatServer, (buffer.length() + 1)); + memcpy(outapp->pBuffer, buffer.c_str(), buffer.length()); + outapp->pBuffer[buffer.length()] = '\0'; - sprintf(buffer,"%s,%i,%s.%s,%c%08X", - Config->ChatHost.c_str(), - Config->ChatPort, - Config->ShortName.c_str(), - this->GetCharName(), ConnectionType, MailKey - ); - outapp2->size=strlen(buffer)+1; - outapp2->pBuffer = new uchar[outapp2->size]; - memcpy(outapp2->pBuffer,buffer,outapp2->size); - QueuePacket(outapp2); - safe_delete(outapp2); + QueuePacket(outapp); + safe_delete(outapp); - outapp2 = new EQApplicationPacket(OP_SetChatServer2); + // mail server packet + switch (GetClientVersion()) { + case EQEmu::versions::ClientVersion::Titanium: + ConnectionType = EQEmu::versions::ucsTitaniumMail; + break; + default: + // retain value from previous switch + break; + } - if (m_ClientVersionBit & EQEmu::versions::bit_TitaniumAndEarlier) - ConnectionType = 'M'; + buffer = StringFormat("%s,%i,%s.%s,%c%08X", + Config->MailHost.c_str(), + Config->MailPort, + Config->ShortName.c_str(), + GetCharName(), + ConnectionType, + MailKey + ); - sprintf(buffer,"%s,%i,%s.%s,%c%08X", - Config->MailHost.c_str(), - Config->MailPort, - Config->ShortName.c_str(), - this->GetCharName(), ConnectionType, MailKey - ); - outapp2->size=strlen(buffer)+1; - outapp2->pBuffer = new uchar[outapp2->size]; - memcpy(outapp2->pBuffer,buffer,outapp2->size); - QueuePacket(outapp2); - safe_delete(outapp2); + outapp = new EQApplicationPacket(OP_SetChatServer2, (buffer.length() + 1)); + memcpy(outapp->pBuffer, buffer.c_str(), buffer.length()); + outapp->pBuffer[buffer.length()] = '\0'; + + QueuePacket(outapp); + safe_delete(outapp); + } EnterWorld(); @@ -1215,14 +1247,6 @@ void Client::EnterWorld(bool TryBootup) { wtz->response = 0; zone_server->SendPacket(pack); delete pack; - - UCSClientVersionReply_Struct cvr; - cvr.character_id = GetCharID(); - cvr.client_version = GetClientVersion(); - EQ::Net::DynamicPacket dp_cvr; - dp_cvr.PutData(0, &cvr, sizeof(cvr)); - zone_server->HandleMessage(ServerOP_UCSClientVersionReply, dp_cvr); - } else { // if they havent seen character select screen, we can assume this is a zone // to zone movement, which should be preauthorized before they leave the previous zone diff --git a/world/net.cpp b/world/net.cpp index 033f470f7..c9a3f134c 100644 --- a/world/net.cpp +++ b/world/net.cpp @@ -462,6 +462,8 @@ int main(int argc, char** argv) { connection->Handle()->RemoteIP(), connection->Handle()->RemotePort(), connection->GetUUID()); UCSLink.SetConnection(connection); + + zoneserver_list.UpdateUCSServerAvailable(); }); server_connection->OnConnectionRemoved("UCS", [](std::shared_ptr connection) { @@ -469,6 +471,8 @@ int main(int argc, char** argv) { connection->GetUUID()); UCSLink.SetConnection(nullptr); + + zoneserver_list.UpdateUCSServerAvailable(false); }); server_connection->OnConnectionIdentified("WebInterface", [](std::shared_ptr connection) { diff --git a/world/ucs.cpp b/world/ucs.cpp index 76cba7e4b..b745005d4 100644 --- a/world/ucs.cpp +++ b/world/ucs.cpp @@ -2,14 +2,11 @@ #include "../common/eqemu_logsys.h" #include "ucs.h" #include "world_config.h" -#include "zonelist.h" #include "../common/misc_functions.h" #include "../common/md5.h" #include "../common/packet_dump.h" -extern ZSList zoneserver_list; - UCSConnection::UCSConnection() { Stream = 0; @@ -52,12 +49,6 @@ void UCSConnection::ProcessPacket(uint16 opcode, EQ::Net::Packet &p) Log(Logs::Detail, Logs::UCS_Server, "Got authentication from UCS when they are already authenticated."); break; } - case ServerOP_UCSBroadcastServerReady: - case ServerOP_UCSClientVersionRequest: - { - zoneserver_list.SendPacket(pack); - break; - } default: { Log(Logs::Detail, Logs::UCS_Server, "Unknown ServerOPcode from UCS 0x%04x, size %d", opcode, pack->size); diff --git a/world/zonelist.cpp b/world/zonelist.cpp index a1f0a60ff..d86f727f6 100644 --- a/world/zonelist.cpp +++ b/world/zonelist.cpp @@ -32,6 +32,7 @@ extern uint32 numzones; extern bool holdzones; extern EQEmu::Random emu_random; extern WebInterfaceList web_interface; +volatile bool UCSServerAvailable_ = false; void CatchSignal(int sig_num); ZSList::ZSList() @@ -669,6 +670,16 @@ void ZSList::GetZoneIDList(std::vector &zones) { } } +void ZSList::UpdateUCSServerAvailable(bool ucss_available) { + UCSServerAvailable_ = ucss_available; + auto outapp = new ServerPacket(ServerOP_UCSServerStatusReply, sizeof(UCSServerStatus_Struct)); + auto ucsss = (UCSServerStatus_Struct*)outapp->pBuffer; + ucsss->available = (ucss_available ? 1 : 0); + ucsss->timestamp = Timer::GetCurrentTime(); + SendPacket(outapp); + safe_delete(outapp); +} + void ZSList::WorldShutDown(uint32 time, uint32 interval) { if (time > 0) { diff --git a/world/zonelist.h b/world/zonelist.h index e152e5046..9911b87e0 100644 --- a/world/zonelist.h +++ b/world/zonelist.h @@ -54,7 +54,8 @@ public: Timer* reminder; void NextGroupIDs(uint32 &start, uint32 &end); void SendLSZones(); - uint16 GetAvailableZonePort(); + uint16 GetAvailableZonePort(); + void UpdateUCSServerAvailable(bool ucss_available = true); int GetZoneCount(); void GetZoneIDList(std::vector &zones); diff --git a/world/zoneserver.cpp b/world/zoneserver.cpp index 061ee6b72..e685b280e 100644 --- a/world/zoneserver.cpp +++ b/world/zoneserver.cpp @@ -41,6 +41,7 @@ extern GroupLFPList LFPGroupList; extern ZSList zoneserver_list; extern LoginServerList loginserverlist; extern volatile bool RunLoops; +extern volatile bool UCSServerAvailable_; extern AdventureManager adventure_manager; extern UCSConnection UCSLink; extern QueryServConnection QSLink; @@ -1262,12 +1263,29 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) { break; } - case ServerOP_UCSClientVersionReply: case ServerOP_UCSMailMessage: { UCSLink.SendPacket(pack); break; } + + case ServerOP_UCSServerStatusRequest: + { + auto ucsss = (UCSServerStatus_Struct*)pack->pBuffer; + auto zs = zoneserver_list.FindByPort(ucsss->port); + if (!zs) + break; + + auto outapp = new ServerPacket(ServerOP_UCSServerStatusReply, sizeof(UCSServerStatus_Struct)); + ucsss = (UCSServerStatus_Struct*)outapp->pBuffer; + ucsss->available = (UCSServerAvailable_ ? 1 : 0); + ucsss->timestamp = Timer::GetCurrentTime(); + zs->SendPacket(outapp); + safe_delete(outapp); + + break; + } + case ServerOP_QSSendQuery: case ServerOP_QueryServGeneric: case ServerOP_Speech: diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 843a2c282..fe8af2a98 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -316,6 +316,7 @@ void MapOpcodes() ConnectedOpcodes[OP_PurchaseLeadershipAA] = &Client::Handle_OP_PurchaseLeadershipAA; ConnectedOpcodes[OP_PVPLeaderBoardDetailsRequest] = &Client::Handle_OP_PVPLeaderBoardDetailsRequest; ConnectedOpcodes[OP_PVPLeaderBoardRequest] = &Client::Handle_OP_PVPLeaderBoardRequest; + ConnectedOpcodes[OP_QueryUCSServerStatus] = &Client::Handle_OP_QueryUCSServerStatus; ConnectedOpcodes[OP_RaidInvite] = &Client::Handle_OP_RaidCommand; ConnectedOpcodes[OP_RandomReq] = &Client::Handle_OP_RandomReq; ConnectedOpcodes[OP_ReadBook] = &Client::Handle_OP_ReadBook; @@ -792,7 +793,7 @@ void Client::CompleteConnect() } if (zone) - zone->weatherSend(); + zone->weatherSend(this); TotalKarma = database.GetKarma(AccountID()); SendDisciplineTimers(); @@ -11005,6 +11006,84 @@ void Client::Handle_OP_PVPLeaderBoardRequest(const EQApplicationPacket *app) safe_delete(outapp); } +void Client::Handle_OP_QueryUCSServerStatus(const EQApplicationPacket *app) +{ + if (zone->IsUCSServerAvailable()) { + EQApplicationPacket* outapp = nullptr; + std::string buffer; + + std::string MailKey = database.GetMailKey(CharacterID(), true); + EQEmu::versions::UCSVersion ConnectionType = EQEmu::versions::ucsUnknown; + + // chat server packet + switch (ClientVersion()) { + case EQEmu::versions::ClientVersion::Titanium: + ConnectionType = EQEmu::versions::ucsTitaniumChat; + break; + case EQEmu::versions::ClientVersion::SoF: + ConnectionType = EQEmu::versions::ucsSoFCombined; + break; + case EQEmu::versions::ClientVersion::SoD: + ConnectionType = EQEmu::versions::ucsSoDCombined; + break; + case EQEmu::versions::ClientVersion::UF: + ConnectionType = EQEmu::versions::ucsUFCombined; + break; + case EQEmu::versions::ClientVersion::RoF: + ConnectionType = EQEmu::versions::ucsRoFCombined; + break; + case EQEmu::versions::ClientVersion::RoF2: + ConnectionType = EQEmu::versions::ucsRoF2Combined; + break; + default: + ConnectionType = EQEmu::versions::ucsUnknown; + break; + } + + buffer = StringFormat("%s,%i,%s.%s,%c%s", + Config->ChatHost.c_str(), + Config->ChatPort, + Config->ShortName.c_str(), + GetName(), + ConnectionType, + MailKey.c_str() + ); + + outapp = new EQApplicationPacket(OP_SetChatServer, (buffer.length() + 1)); + memcpy(outapp->pBuffer, buffer.c_str(), buffer.length()); + outapp->pBuffer[buffer.length()] = '\0'; + + QueuePacket(outapp); + safe_delete(outapp); + + // mail server packet + switch (ClientVersion()) { + case EQEmu::versions::ClientVersion::Titanium: + ConnectionType = EQEmu::versions::ucsTitaniumMail; + break; + default: + // retain value from previous switch + break; + } + + buffer = StringFormat("%s,%i,%s.%s,%c%s", + Config->MailHost.c_str(), + Config->MailPort, + Config->ShortName.c_str(), + GetName(), + ConnectionType, + MailKey.c_str() + ); + + outapp = new EQApplicationPacket(OP_SetChatServer2, (buffer.length() + 1)); + memcpy(outapp->pBuffer, buffer.c_str(), buffer.length()); + outapp->pBuffer[buffer.length()] = '\0'; + + QueuePacket(outapp); + safe_delete(outapp); + } +} + void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app) { if (app->size < sizeof(RaidGeneral_Struct)) { diff --git a/zone/client_packet.h b/zone/client_packet.h index 1e7981ed9..4f9902599 100644 --- a/zone/client_packet.h +++ b/zone/client_packet.h @@ -228,6 +228,7 @@ void Handle_OP_PurchaseLeadershipAA(const EQApplicationPacket *app); void Handle_OP_PVPLeaderBoardDetailsRequest(const EQApplicationPacket *app); void Handle_OP_PVPLeaderBoardRequest(const EQApplicationPacket *app); + void Handle_OP_QueryUCSServerStatus(const EQApplicationPacket *app); void Handle_OP_RaidCommand(const EQApplicationPacket *app); void Handle_OP_RandomReq(const EQApplicationPacket *app); void Handle_OP_ReadBook(const EQApplicationPacket *app); diff --git a/zone/worldserver.cpp b/zone/worldserver.cpp index 09e5aa223..053bebacf 100644 --- a/zone/worldserver.cpp +++ b/zone/worldserver.cpp @@ -1814,69 +1814,10 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) break; } - case ServerOP_UCSBroadcastServerReady: + case ServerOP_UCSServerStatusReply: { - UCSBroadcastServerReady_Struct* bsr = (UCSBroadcastServerReady_Struct*)pack->pBuffer; - EQApplicationPacket* outapp = nullptr; - std::string buffer; - - for (auto liter : entity_list.GetClientList()) { - auto c = liter.second; - if (!c) - continue; - - int MailKey = zone->random.Int(1, INT_MAX); - - database.SetMailKey(c->CharacterID(), c->GetIP(), MailKey); - - char ConnectionType; - - // chat server packet - if (c->ClientVersionBit() & EQEmu::versions::bit_UFAndLater) - ConnectionType = 'U'; - else if (c->ClientVersionBit() & EQEmu::versions::bit_SoFAndLater) - ConnectionType = 'S'; - else - ConnectionType = 'C'; - - buffer = bsr->chat_prefix; - buffer.append(StringFormat("%s,%c%08X", c->GetName(), ConnectionType, MailKey)); - - outapp = new EQApplicationPacket(OP_SetChatServer, (buffer.length() + 1)); - memcpy(outapp->pBuffer, buffer.c_str(), buffer.length()); - outapp->pBuffer[buffer.length()] = '\0'; - - c->QueuePacket(outapp); - safe_delete(outapp); - - // mail server packet - if (c->ClientVersionBit() & EQEmu::versions::bit_TitaniumAndEarlier) - ConnectionType = 'M'; - - buffer = bsr->mail_prefix; - buffer.append(StringFormat("%s,%c%08X", c->GetName(), ConnectionType, MailKey)); - - outapp = new EQApplicationPacket(OP_SetChatServer2, (buffer.length() + 1)); - memcpy(outapp->pBuffer, buffer.c_str(), buffer.length()); - outapp->pBuffer[buffer.length()] = '\0'; - - c->QueuePacket(outapp); - safe_delete(outapp); - } - break; - } - case ServerOP_UCSClientVersionRequest: - { - UCSClientVersionRequest_Struct* cvreq = (UCSClientVersionRequest_Struct*)pack->pBuffer; - Client* c = entity_list.GetClientByCharID(cvreq->character_id); - if (c) { - UCSClientVersionReply_Struct cvrep; - cvrep.character_id = c->CharacterID(); - cvrep.client_version = c->ClientVersion(); - EQ::Net::DynamicPacket dp_cvrep; - dp_cvrep.PutData(0, &cvrep, sizeof(cvrep)); - worldserver.m_connection->Send(ServerOP_UCSClientVersionReply, dp_cvrep); - } + auto ucsss = (UCSServerStatus_Struct*)pack->pBuffer; + zone->SetUCSServerAvailable((ucsss->available != 0), ucsss->timestamp); break; } case ServerOP_CZSetEntityVariableByNPCTypeID: diff --git a/zone/zone.cpp b/zone/zone.cpp index fce562c94..90d59e17e 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -146,6 +146,8 @@ bool Zone::Bootup(uint32 iZoneID, uint32 iInstanceID, bool iStaticZone) { UpdateWindowTitle(); zone->GetTimeSync(); + zone->RequestUCSServerStatus(); + /* Set Logging */ LogSys.StartFileLogs(StringFormat("%s_version_%u_inst_id_%u_port_%u", zone->GetShortName(), zone->GetInstanceVersion(), zone->GetInstanceID(), ZoneConfig::get()->ZonePort)); @@ -847,6 +849,9 @@ Zone::Zone(uint32 in_zoneid, uint32 in_instanceid, const char* in_short_name) GuildBanks = new GuildBankManager; else GuildBanks = nullptr; + + m_ucss_available = false; + m_last_ucss_update = 0; } Zone::~Zone() { @@ -1863,14 +1868,17 @@ bool ZoneDatabase::GetDecayTimes(npcDecayTimes_Struct* npcCorpseDecayTimes) { return true; } -void Zone::weatherSend() +void Zone::weatherSend(Client* client) { auto outapp = new EQApplicationPacket(OP_Weather, 8); if(zone_weather>0) outapp->pBuffer[0] = zone_weather-1; if(zone_weather>0) outapp->pBuffer[4] = zone->weather_intensity; - entity_list.QueueClients(0, outapp); + if (client) + client->QueuePacket(outapp); + else + entity_list.QueueClients(0, outapp); safe_delete(outapp); } @@ -2336,3 +2344,22 @@ void Zone::UpdateHotzone() is_hotzone = atoi(row[0]) == 0 ? false: true; } +void Zone::RequestUCSServerStatus() { + auto outapp = new ServerPacket(ServerOP_UCSServerStatusRequest, sizeof(UCSServerStatus_Struct)); + auto ucsss = (UCSServerStatus_Struct*)outapp->pBuffer; + ucsss->available = 0; + ucsss->port = Config->ZonePort; + ucsss->unused = 0; + worldserver.SendPacket(outapp); + safe_delete(outapp); +} + +void Zone::SetUCSServerAvailable(bool ucss_available, uint32 update_timestamp) { + if (m_last_ucss_update == update_timestamp && m_ucss_available != ucss_available) { + m_ucss_available = false; + RequestUCSServerStatus(); + return; + } + if (m_last_ucss_update < update_timestamp) + m_ucss_available = ucss_available; +} diff --git a/zone/zone.h b/zone/zone.h index 158d414a4..bbd070305 100644 --- a/zone/zone.h +++ b/zone/zone.h @@ -224,7 +224,7 @@ public: void SetDate(uint16 year, uint8 month, uint8 day, uint8 hour, uint8 minute); void SetTime(uint8 hour, uint8 minute, bool update_world = true); - void weatherSend(); + void weatherSend(Client* client = nullptr); bool CanBind() const { return(can_bind); } bool IsCity() const { return(is_city); } bool CanDoCombat() const { return(can_combat); } @@ -275,6 +275,10 @@ public: inline void ShowZoneGlobalLoot(Client *to) { m_global_loot.ShowZoneGlobalLoot(to); } inline void ShowNPCGlobalLoot(Client *to, NPC *who) { m_global_loot.ShowNPCGlobalLoot(to, who); } + void RequestUCSServerStatus(); + void SetUCSServerAvailable(bool ucss_available, uint32 update_timestamp); + bool IsUCSServerAvailable() { return m_ucss_available; } + // random object that provides random values for the zone EQEmu::Random random; @@ -355,6 +359,9 @@ private: Timer hotzone_timer; GlobalLootManager m_global_loot; + + bool m_ucss_available; + uint32 m_last_ucss_update; }; #endif diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index d5db09a53..cef24a649 100644 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -1623,6 +1623,8 @@ bool ZoneDatabase::SaveCharacterData(uint32 character_id, uint32 account_id, Pla if (account_id <= 0) return false; + std::string mail_key = database.GetMailKey(character_id); + clock_t t = std::clock(); /* Function timer start */ std::string query = StringFormat( "REPLACE INTO `character_data` (" @@ -1719,7 +1721,8 @@ bool ZoneDatabase::SaveCharacterData(uint32 character_id, uint32 account_id, Pla " e_aa_effects, " " e_percent_to_aa, " " e_expended_aa_spent, " - " e_last_invsnapshot " + " e_last_invsnapshot, " + " mailkey " ") " "VALUES (" "%u," // id " id, " @@ -1815,7 +1818,8 @@ bool ZoneDatabase::SaveCharacterData(uint32 character_id, uint32 account_id, Pla "%u," // e_aa_effects "%u," // e_percent_to_aa "%u," // e_expended_aa_spent - "%u" // e_last_invsnapshot + "%u," // e_last_invsnapshot + "'%s'" // mailkey mail_key ")", character_id, // " id, " account_id, // " account_id, " @@ -1910,7 +1914,8 @@ bool ZoneDatabase::SaveCharacterData(uint32 character_id, uint32 account_id, Pla m_epp->aa_effects, m_epp->perAA, m_epp->expended_aa, - m_epp->last_invsnapshot_time + m_epp->last_invsnapshot_time, + mail_key.c_str() ); auto results = database.QueryDatabase(query); Log(Logs::General, Logs::None, "ZoneDatabase::SaveCharacterData %i, done... Took %f seconds", character_id, ((float)(std::clock() - t)) / CLOCKS_PER_SEC); From b3ac1001c9fbcc711e3c56b7900b1945cb96f24c Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Tue, 6 Mar 2018 23:01:25 -0500 Subject: [PATCH 115/670] Add a FixHeading function This is similar to what the client is doing Should be used when adding 2 headings together (or an EQ angle to a heading) --- common/misc_functions.cpp | 18 ++++++++++++++++++ common/misc_functions.h | 3 +++ 2 files changed, 21 insertions(+) diff --git a/common/misc_functions.cpp b/common/misc_functions.cpp index aaa20f3d4..e31da211f 100644 --- a/common/misc_functions.cpp +++ b/common/misc_functions.cpp @@ -242,6 +242,24 @@ int FloatToEQSpeedRun(float d) return static_cast(d * 40.0f); } +float FixHeading(float in) +{ + int i = 0; + if (in >= 512.0f) { + do { + in -= 512.0f; + } while (in >= 512.0f && i++ <= 5); + } + i = 0; + if (in < 0.0f) { + do { + in += 512.0f; + } while (in < 0.0f && i++ <= 5); + } + + return in; +} + /* Heading of 0 points in the pure positive Y direction diff --git a/common/misc_functions.h b/common/misc_functions.h index 9ecb08378..8214c7df0 100644 --- a/common/misc_functions.h +++ b/common/misc_functions.h @@ -66,6 +66,9 @@ int FloatToEQ10(float d); float EQSpeedRunToFloat(int d); int FloatToEQSpeedRun(float d); +// brings heading back into EQ angles range +float FixHeading(float in); + uint32 SwapBits21and22(uint32 mask); uint32 Catch22(uint32 mask); From 7e7f5f0bd67df3ad03d5baf7bc299441ea96a6c0 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Tue, 6 Mar 2018 23:02:49 -0500 Subject: [PATCH 116/670] Add Map::FindClosestLoS() This will return true if LOS failed and you should use the outloc --- zone/map.cpp | 8 ++++++++ zone/map.h | 1 + 2 files changed, 9 insertions(+) diff --git a/zone/map.cpp b/zone/map.cpp index 32c6564b4..f198dc1de 100644 --- a/zone/map.cpp +++ b/zone/map.cpp @@ -268,6 +268,14 @@ bool Map::CheckLoS(glm::vec3 myloc, glm::vec3 oloc) const { return !imp->rm->raycast((const RmReal*)&myloc, (const RmReal*)&oloc, nullptr, nullptr, nullptr); } +// returns true if outloc should be used +bool Map::FindClosestLoS(glm::vec3 myloc, glm::vec3 oloc, glm::vec3 &outloc) const { + if(!imp) + return false; + + return imp->rm->raycast((const RmReal*)&myloc, (const RmReal*)&oloc, (RmReal *)&outloc, nullptr, nullptr); +} + inline bool file_exists(const std::string& name) { std::ifstream f(name.c_str()); return f.good(); diff --git a/zone/map.h b/zone/map.h index 35b5baeda..162985a36 100644 --- a/zone/map.h +++ b/zone/map.h @@ -42,6 +42,7 @@ public: bool LineIntersectsZone(glm::vec3 start, glm::vec3 end, float step, glm::vec3 *result) const; bool LineIntersectsZoneNoZLeaps(glm::vec3 start, glm::vec3 end, float step_mag, glm::vec3 *result) const; bool CheckLoS(glm::vec3 myloc, glm::vec3 oloc) const; + bool FindClosestLoS(glm::vec3 myloc, glm::vec3 oloc, glm::vec3 &outloc) const; #ifdef USE_MAP_MMFS bool Load(std::string filename, bool force_mmf_overwrite = false); From 8f66527e02b1cb7b81ac5fc154958fde935a2896 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Tue, 6 Mar 2018 23:03:55 -0500 Subject: [PATCH 117/670] Add TryMoveAlong(distance, angle) This will take a distance you would like to move and an EQ angle you would like to move relative to current heading (so 0 is in front, 256 behind) Exported to Lua as well --- zone/lua_mob.cpp | 12 ++++++++++++ zone/lua_mob.h | 2 ++ zone/mob.h | 1 + zone/waypoints.cpp | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 47 insertions(+) diff --git a/zone/lua_mob.cpp b/zone/lua_mob.cpp index bd5cddbcc..3793e6b9d 100644 --- a/zone/lua_mob.cpp +++ b/zone/lua_mob.cpp @@ -282,6 +282,16 @@ void Lua_Mob::GMMove(double x, double y, double z, double heading, bool send_upd self->GMMove(static_cast(x), static_cast(y), static_cast(z), static_cast(heading), send_update); } +void Lua_Mob::TryMoveAlong(float distance, float angle) { + Lua_Safe_Call_Void(); + self->TryMoveAlong(distance, angle); +} + +void Lua_Mob::TryMoveAlong(float distance, float angle, bool send) { + Lua_Safe_Call_Void(); + self->TryMoveAlong(distance, angle, send); +} + bool Lua_Mob::HasProcs() { Lua_Safe_Call_Bool(); return self->HasProcs(); @@ -2197,6 +2207,8 @@ luabind::scope lua_register_mob() { .def("GMMove", (void(Lua_Mob::*)(double,double,double))&Lua_Mob::GMMove) .def("GMMove", (void(Lua_Mob::*)(double,double,double,double))&Lua_Mob::GMMove) .def("GMMove", (void(Lua_Mob::*)(double,double,double,double,bool))&Lua_Mob::GMMove) + .def("TryMoveAlong", (void(Lua_Mob::*)(float,float))&Lua_Mob::TryMoveAlong) + .def("TryMoveAlong", (void(Lua_Mob::*)(float,float,bool))&Lua_Mob::TryMoveAlong) .def("HasProcs", &Lua_Mob::HasProcs) .def("IsInvisible", (bool(Lua_Mob::*)(void))&Lua_Mob::IsInvisible) .def("IsInvisible", (bool(Lua_Mob::*)(Lua_Mob))&Lua_Mob::IsInvisible) diff --git a/zone/lua_mob.h b/zone/lua_mob.h index 7aeb700e6..17dbc5c43 100644 --- a/zone/lua_mob.h +++ b/zone/lua_mob.h @@ -74,6 +74,8 @@ public: void GMMove(double x, double y, double z); void GMMove(double x, double y, double z, double heading); void GMMove(double x, double y, double z, double heading, bool send_update); + void TryMoveAlong(float distance, float heading); + void TryMoveAlong(float distance, float heading, bool send); bool HasProcs(); bool IsInvisible(); bool IsInvisible(Lua_Mob other); diff --git a/zone/mob.h b/zone/mob.h index 23c0004df..d19f4299c 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -578,6 +578,7 @@ public: void SetFlyMode(uint8 flymode); inline void Teleport(glm::vec3 NewPosition) { m_Position.x = NewPosition.x; m_Position.y = NewPosition.y; m_Position.z = NewPosition.z; }; + void TryMoveAlong(float distance, float angle, bool send = true); //AI static uint32 GetLevelCon(uint8 mylevel, uint8 iOtherLevel); diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index 45d199277..6cf74bb65 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -29,10 +29,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "npc.h" #include "quest_parser_collection.h" #include "water_map.h" +#include "fastmath.h" #include #include +extern FastMath g_Math; + struct wp_distance { float dist; @@ -990,6 +993,35 @@ float Mob::GetZOffset() const { return 0.2 * GetSize() * offset; } +// This function will try to move the mob along the relative angle a set distance +// if it can't be moved, it will lower the distance and try again +// If we want to move on like say a spawn, we can pass send as false +void Mob::TryMoveAlong(float distance, float angle, bool send) +{ + angle += GetHeading(); + angle = FixHeading(angle); + + glm::vec3 tmp_pos; + glm::vec3 new_pos = GetPosition(); + new_pos.x += distance * g_Math.FastSin(angle); + new_pos.y += distance * g_Math.FastCos(angle); + new_pos.z += GetZOffset(); + + if (zone->HasMap()) { + auto new_z = zone->zonemap->FindClosestZ(new_pos, nullptr); + if (new_z != BEST_Z_INVALID) + new_pos.z = new_z; + + if (zone->zonemap->FindClosestLoS(GetPosition(), new_pos, tmp_pos)) + new_pos = tmp_pos; + } + + new_pos.z = GetFixedZ(new_pos); + Teleport(new_pos); + if (send) + SendPositionUpdate(); +} + int ZoneDatabase::GetHighestGrid(uint32 zoneid) { std::string query = StringFormat("SELECT COALESCE(MAX(id), 0) FROM grid WHERE zoneid = %i", zoneid); From 0d63c8b9ef0dacbf82bbd28ea2fb73cf8138d0ad Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 7 Mar 2018 15:23:03 -0500 Subject: [PATCH 118/670] Trap auras should spawn a bit in front --- zone/aura.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zone/aura.cpp b/zone/aura.cpp index 08600811a..8a885c67b 100644 --- a/zone/aura.cpp +++ b/zone/aura.cpp @@ -758,6 +758,8 @@ void Mob::MakeAura(uint16 spell_id) auto npc = new Aura(npc_type, this, record); npc->SetAuraID(spell_id); + if (trap) + npc->TryMoveAlong(5.0f, 0.0f, false); // try to place 5 units in front entity_list.AddNPC(npc, false); if (trap) From ae966e546b93b42193147cf87cf1f9d67e4877a6 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 7 Mar 2018 16:50:24 -0500 Subject: [PATCH 119/670] WIP for NPC spell push, off by default for now --- common/ruletypes.h | 1 + zone/attack.cpp | 22 +++------------- zone/map.cpp | 8 ++++++ zone/map.h | 1 + zone/mob.cpp | 1 + zone/mob.h | 6 +++++ zone/mob_ai.cpp | 66 ++++++++++++++++++++++++++++++++++++++++++++++ zone/spells.cpp | 7 +++++ 8 files changed, 94 insertions(+), 18 deletions(-) diff --git a/common/ruletypes.h b/common/ruletypes.h index d80996184..6484a8586 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -402,6 +402,7 @@ RULE_BOOL(Spells, IgnoreSpellDmgLvlRestriction, false) // ignore the 5 level spr RULE_BOOL(Spells, AllowItemTGB, false) // TGB doesn't work with items on live, custom servers want it though RULE_BOOL(Spells, NPCInnateProcOverride, true) // NPC innate procs override the target type to single target. RULE_BOOL(Spells, OldRainTargets, false) // use old incorrectly implemented max targets for rains +RULE_BOOL(Spells, NPCSpellPush, false) // enable spell push on NPCs RULE_CATEGORY_END() RULE_CATEGORY(Combat) diff --git a/zone/attack.cpp b/zone/attack.cpp index 90a774550..26121134e 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -3622,24 +3622,10 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const a->force = 0.0f; // 2013 change that disabled NPC vs NPC push else a->force *= 0.10f; // force against NPCs is divided by 10 I guess? ex bash is 0.3, parsed 0.03 against an NPC - } - // update NPC stuff - if (a->force != 0.0f) { - auto new_pos = glm::vec3( - m_Position.x + (a->force * g_Math.FastSin(a->hit_heading) + m_Delta.x), - m_Position.y + (a->force * g_Math.FastCos(a->hit_heading) + m_Delta.y), m_Position.z); - if ((!IsNPC() || position_update_melee_push_timer.Check()) && zone->zonemap && - zone->zonemap->CheckLoS( - glm::vec3(m_Position), - new_pos)) { // If we have LoS on the new loc it should be reachable. - if (IsNPC()) { - // Is this adequate? - - Teleport(new_pos); - SendPositionUpdate(); - } - } else { - a->force = 0.0f; // we couldn't move there, so lets not + if (ForcedMovement == 0 && a->force != 0.0f && position_update_melee_push_timer.Check()) { + m_Delta.x += a->force * g_Math.FastSin(a->hit_heading); + m_Delta.y += a->force * g_Math.FastCos(a->hit_heading); + ForcedMovement = 3; } } } diff --git a/zone/map.cpp b/zone/map.cpp index f198dc1de..487a9de0b 100644 --- a/zone/map.cpp +++ b/zone/map.cpp @@ -276,6 +276,14 @@ bool Map::FindClosestLoS(glm::vec3 myloc, glm::vec3 oloc, glm::vec3 &outloc) con return imp->rm->raycast((const RmReal*)&myloc, (const RmReal*)&oloc, (RmReal *)&outloc, nullptr, nullptr); } +// returns true if a collision happens +bool Map::DoCollisionCheck(glm::vec3 myloc, glm::vec3 oloc, glm::vec3 &outnorm, float &distance) const { + if(!imp) + return false; + + return imp->rm->raycast((const RmReal*)&myloc, (const RmReal*)&oloc, nullptr, (RmReal *)&outnorm, (RmReal *)&distance); +} + inline bool file_exists(const std::string& name) { std::ifstream f(name.c_str()); return f.good(); diff --git a/zone/map.h b/zone/map.h index 162985a36..34638eec1 100644 --- a/zone/map.h +++ b/zone/map.h @@ -43,6 +43,7 @@ public: bool LineIntersectsZoneNoZLeaps(glm::vec3 start, glm::vec3 end, float step_mag, glm::vec3 *result) const; bool CheckLoS(glm::vec3 myloc, glm::vec3 oloc) const; bool FindClosestLoS(glm::vec3 myloc, glm::vec3 oloc, glm::vec3 &outloc) const; + bool DoCollisionCheck(glm::vec3 myloc, glm::vec3 oloc, glm::vec3 &outnorm, float &distance) const; #ifdef USE_MAP_MMFS bool Load(std::string filename, bool force_mmf_overwrite = false); diff --git a/zone/mob.cpp b/zone/mob.cpp index 6c3808549..d23aaf0b4 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -393,6 +393,7 @@ Mob::Mob(const char* in_name, permarooted = (runspeed > 0) ? false : true; movetimercompleted = false; + ForcedMovement = 0; roamer = false; rooted = false; charmed = false; diff --git a/zone/mob.h b/zone/mob.h index d19f4299c..5530e0cab 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -50,6 +50,8 @@ struct AuraRecord; struct NewSpawn_Struct; struct PlayerPositionUpdateServer_Struct; +const int COLLISION_BOX_SIZE = 4; + namespace EQEmu { struct ItemData; @@ -1314,6 +1316,9 @@ protected: char lastname[64]; glm::vec4 m_Delta; + // just locs around them to double check, if we do expand collision this should be cached on movement + // ideally we should use real models, but this should be quick and work mostly + glm::vec4 m_CollisionBox[COLLISION_BOX_SIZE]; EQEmu::LightSourceProfile m_Light; @@ -1424,6 +1429,7 @@ protected: std::unique_ptr AI_movement_timer; std::unique_ptr AI_target_check_timer; bool movetimercompleted; + int8 ForcedMovement; // push bool permarooted; std::unique_ptr AI_scan_area_timer; std::unique_ptr AI_walking_timer; diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 4d213dc7d..0b77cb87e 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -29,12 +29,16 @@ #include "quest_parser_collection.h" #include "string_ids.h" #include "water_map.h" +#include "fastmath.h" +#include #include #include +#include #include extern EntityList entity_list; +extern FastMath g_Math; extern Zone *zone; @@ -953,6 +957,68 @@ void Mob::AI_Process() { if (!(AI_think_timer->Check() || attack_timer.Check(false))) return; + // we are being pushed, we will hijack this movement timer + // this also needs to be done before casting to have a chance to interrupt + // this flag won't be set if the mob can't be pushed (rooted etc) + if (ForcedMovement && AI_movement_timer->Check()) { + bool bPassed = true; + auto z_off = GetZOffset(); + glm::vec3 normal; + glm::vec3 new_pos = m_Position + m_Delta; + new_pos.z += z_off; + + // no zone map = fucked + if (zone->HasMap()) { + // in front + m_CollisionBox[0].x = m_Position.x + 3.0f * g_Math.FastSin(0.0f); + m_CollisionBox[0].y = m_Position.y + 3.0f * g_Math.FastCos(0.0f); + m_CollisionBox[0].z = m_Position.z + z_off; + + // to right + m_CollisionBox[1].x = m_Position.x + 3.0f * g_Math.FastSin(128.0f); + m_CollisionBox[1].y = m_Position.y + 3.0f * g_Math.FastCos(128.0f); + m_CollisionBox[1].z = m_Position.z + z_off; + + // behind + m_CollisionBox[2].x = m_Position.x + 3.0f * g_Math.FastSin(256.0f); + m_CollisionBox[2].y = m_Position.y + 3.0f * g_Math.FastCos(256.0f); + m_CollisionBox[2].z = m_Position.z + z_off; + + // to left + m_CollisionBox[3].x = m_Position.x + 3.0f * g_Math.FastSin(384.0f); + m_CollisionBox[3].y = m_Position.y + 3.0f * g_Math.FastCos(384.0f); + m_CollisionBox[3].z = m_Position.z + z_off; + + // collision happened, need to move along the wall + float distance = 0.0f, shortest = std::numeric_limits::infinity(); + glm::vec3 tmp_nrm; + for (auto &vec : m_CollisionBox) { + if (zone->zonemap->DoCollisionCheck(vec, new_pos, tmp_nrm, distance)) { + bPassed = false; // lets try with new projection next pass + if (distance < shortest) { + normal = tmp_nrm; + shortest = distance; + } + } + } + } + + if (bPassed) { + ForcedMovement = 0; + m_Delta = glm::vec4(); + Teleport(new_pos); + SendPositionUpdate(); + pLastChange = Timer::GetCurrentTime(); + } else if (--ForcedMovement) { + auto proj = glm::proj(static_cast(m_Delta), normal); + m_Delta.x -= proj.x; + m_Delta.y -= proj.y; + m_Delta.z -= proj.z; + } else { + m_Delta = glm::vec4(); // well, we failed to find a spot to be forced to, lets give up + } + } + if (IsCasting()) return; diff --git a/zone/spells.cpp b/zone/spells.cpp index d5da2a34f..1c17e80f4 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -81,6 +81,7 @@ Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org) #include "quest_parser_collection.h" #include "string_ids.h" #include "worldserver.h" +#include "fastmath.h" #include #include @@ -104,6 +105,7 @@ Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org) extern Zone* zone; extern volatile bool is_zone_loaded; extern WorldServer worldserver; +extern FastMath g_Math; using EQEmu::CastingSlot; @@ -3945,6 +3947,11 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r { spelltar->CastToClient()->SetKnockBackExemption(true); } + } else if (RuleB(Spells, NPCSpellPush) && !spelltar->IsRooted() && spelltar->ForcedMovement == 0) { + spelltar->m_Delta.x += action->force * g_Math.FastSin(action->hit_heading); + spelltar->m_Delta.y += action->force * g_Math.FastCos(action->hit_heading); + spelltar->m_Delta.z += action->hit_pitch; + spelltar->ForcedMovement = 6; } } From 2da70c69da99848237e8debe6765bbd59f4ff075 Mon Sep 17 00:00:00 2001 From: Uleat Date: Wed, 7 Mar 2018 22:45:05 -0500 Subject: [PATCH 120/670] Added command '#ucs' to force re-connect after ucs server unavailability (must manually re-join channels for now) --- changelog.txt | 5 ++ common/version.h | 2 +- utils/sql/db_update_manifest.txt | 1 + zone/command.cpp | 85 ++++++++++++++++++++++++++++++++ zone/command.h | 1 + 5 files changed, 93 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 360f61082..f2f200fa6 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,10 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 03/07/2018 == +Uleat: Added command '#ucs' to force a reconnect to UCS server. + - Works in place of client auto-reconnect packet in zones where feature is unsupported + - Currently, you will need to manually re-join channels + == 03/04/2018 == Uleat: Updated UCS versioning - SoF and higher clients have a new opcode identified (update your *.conf files) diff --git a/common/version.h b/common/version.h index d1afd9744..e003dc33f 100644 --- a/common/version.h +++ b/common/version.h @@ -30,7 +30,7 @@ Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt */ -#define CURRENT_BINARY_DATABASE_VERSION 9121 +#define CURRENT_BINARY_DATABASE_VERSION 9122 #ifdef BOTS #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9018 #else diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index 2a0b12fd2..db0a04ca8 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -375,6 +375,7 @@ 9119|2018_02_10_GlobalLoot.sql|SHOW TABLES LIKE 'global_loot'|empty| 9120|2018_02_13_Heading.sql|SELECT value FROM variables WHERE varname = 'fixed_heading'|empty| 9121|2018_02_18_bug_reports.sql|SHOW TABLES LIKE 'bug_reports'|empty| +9122|2018_03_07_ucs_command.sql|SELECT * FROM `command_settings` WHERE `command` LIKE 'ucs'|empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/zone/command.cpp b/zone/command.cpp index 1fee0e26d..a97e04d96 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -389,6 +389,7 @@ int command_init(void) command_add("traindisc", "[level] - Trains all the disciplines usable by the target, up to level specified. (may freeze client for a few seconds)", 150, command_traindisc) || command_add("trapinfo", "- Gets infomation about the traps currently spawned in the zone.", 81, command_trapinfo) || command_add("tune", "Calculate ideal statical values related to combat.", 100, command_tune) || + command_add("ucs", "- Attempts to reconnect to the UCS server", 0, command_ucs) || command_add("undyeme", "- Remove dye from all of your armor slots", 0, command_undyeme) || command_add("unfreeze", "- Unfreeze your target", 80, command_unfreeze) || command_add("unlock", "- Unlock the worldserver", 150, command_unlock) || @@ -7158,6 +7159,90 @@ void command_undye(Client *c, const Seperator *sep) } } +void command_ucs(Client *c, const Seperator *sep) +{ + if (!c) + return; + + Log(Logs::Detail, Logs::UCS_Server, "Character %s attempting ucs reconnect while ucs server is %savailable", + c->GetName(), (zone->IsUCSServerAvailable() ? "" : "un")); + + if (zone->IsUCSServerAvailable()) { + EQApplicationPacket* outapp = nullptr; + std::string buffer; + + std::string MailKey = database.GetMailKey(c->CharacterID(), true); + EQEmu::versions::UCSVersion ConnectionType = EQEmu::versions::ucsUnknown; + + // chat server packet + switch (c->ClientVersion()) { + case EQEmu::versions::ClientVersion::Titanium: + ConnectionType = EQEmu::versions::ucsTitaniumChat; + break; + case EQEmu::versions::ClientVersion::SoF: + ConnectionType = EQEmu::versions::ucsSoFCombined; + break; + case EQEmu::versions::ClientVersion::SoD: + ConnectionType = EQEmu::versions::ucsSoDCombined; + break; + case EQEmu::versions::ClientVersion::UF: + ConnectionType = EQEmu::versions::ucsUFCombined; + break; + case EQEmu::versions::ClientVersion::RoF: + ConnectionType = EQEmu::versions::ucsRoFCombined; + break; + case EQEmu::versions::ClientVersion::RoF2: + ConnectionType = EQEmu::versions::ucsRoF2Combined; + break; + default: + ConnectionType = EQEmu::versions::ucsUnknown; + break; + } + + buffer = StringFormat("%s,%i,%s.%s,%c%s", + Config->ChatHost.c_str(), + Config->ChatPort, + Config->ShortName.c_str(), + c->GetName(), + ConnectionType, + MailKey.c_str() + ); + + outapp = new EQApplicationPacket(OP_SetChatServer, (buffer.length() + 1)); + memcpy(outapp->pBuffer, buffer.c_str(), buffer.length()); + outapp->pBuffer[buffer.length()] = '\0'; + + c->QueuePacket(outapp); + safe_delete(outapp); + + // mail server packet + switch (c->ClientVersion()) { + case EQEmu::versions::ClientVersion::Titanium: + ConnectionType = EQEmu::versions::ucsTitaniumMail; + break; + default: + // retain value from previous switch + break; + } + + buffer = StringFormat("%s,%i,%s.%s,%c%s", + Config->MailHost.c_str(), + Config->MailPort, + Config->ShortName.c_str(), + c->GetName(), + ConnectionType, + MailKey.c_str() + ); + + outapp = new EQApplicationPacket(OP_SetChatServer2, (buffer.length() + 1)); + memcpy(outapp->pBuffer, buffer.c_str(), buffer.length()); + outapp->pBuffer[buffer.length()] = '\0'; + + c->QueuePacket(outapp); + safe_delete(outapp); + } +} + void command_undyeme(Client *c, const Seperator *sep) { if(c) { diff --git a/zone/command.h b/zone/command.h index b8d688a54..580dd00ff 100644 --- a/zone/command.h +++ b/zone/command.h @@ -302,6 +302,7 @@ void command_titlesuffix(Client *c, const Seperator *sep); void command_traindisc(Client *c, const Seperator *sep); void command_trapinfo(Client* c, const Seperator *sep); void command_tune(Client *c, const Seperator *sep); +void command_ucs(Client *c, const Seperator *sep); void command_undye(Client *c, const Seperator *sep); void command_undyeme(Client *c, const Seperator *sep); void command_unfreeze(Client *c, const Seperator *sep); From 736890119b31363dc734eff2a0c62f28c37525d4 Mon Sep 17 00:00:00 2001 From: Uleat Date: Wed, 7 Mar 2018 22:46:11 -0500 Subject: [PATCH 121/670] Forgot sql script file... --- utils/sql/git/required/2018_03_07_ucs_command.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 utils/sql/git/required/2018_03_07_ucs_command.sql diff --git a/utils/sql/git/required/2018_03_07_ucs_command.sql b/utils/sql/git/required/2018_03_07_ucs_command.sql new file mode 100644 index 000000000..fdad0dda1 --- /dev/null +++ b/utils/sql/git/required/2018_03_07_ucs_command.sql @@ -0,0 +1 @@ +INSERT INTO `command_settings` VALUES ('ucs', '0', ''); From 49089f75374f552bf6c860b567810b96ee403a91 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 8 Mar 2018 12:57:40 -0500 Subject: [PATCH 122/670] Revert changes to melee push until the generic push processing is better --- zone/attack.cpp | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/zone/attack.cpp b/zone/attack.cpp index 26121134e..90a774550 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -3622,10 +3622,24 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const a->force = 0.0f; // 2013 change that disabled NPC vs NPC push else a->force *= 0.10f; // force against NPCs is divided by 10 I guess? ex bash is 0.3, parsed 0.03 against an NPC - if (ForcedMovement == 0 && a->force != 0.0f && position_update_melee_push_timer.Check()) { - m_Delta.x += a->force * g_Math.FastSin(a->hit_heading); - m_Delta.y += a->force * g_Math.FastCos(a->hit_heading); - ForcedMovement = 3; + } + // update NPC stuff + if (a->force != 0.0f) { + auto new_pos = glm::vec3( + m_Position.x + (a->force * g_Math.FastSin(a->hit_heading) + m_Delta.x), + m_Position.y + (a->force * g_Math.FastCos(a->hit_heading) + m_Delta.y), m_Position.z); + if ((!IsNPC() || position_update_melee_push_timer.Check()) && zone->zonemap && + zone->zonemap->CheckLoS( + glm::vec3(m_Position), + new_pos)) { // If we have LoS on the new loc it should be reachable. + if (IsNPC()) { + // Is this adequate? + + Teleport(new_pos); + SendPositionUpdate(); + } + } else { + a->force = 0.0f; // we couldn't move there, so lets not } } } From ef487112df7baae7d332532a122c505ad721fc73 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 8 Mar 2018 16:11:48 -0500 Subject: [PATCH 123/670] Add FixZ() to the spell push stuff This is done after the packet since we want the NPC to get pushed up still. The client will still interp the fall but server side we'll be on the ground instantly --- zone/mob_ai.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 0b77cb87e..055200d56 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1009,6 +1009,7 @@ void Mob::AI_Process() { Teleport(new_pos); SendPositionUpdate(); pLastChange = Timer::GetCurrentTime(); + FixZ(); // so we teleport to the ground locally, we want the client to interpolate falling etc } else if (--ForcedMovement) { auto proj = glm::proj(static_cast(m_Delta), normal); m_Delta.x -= proj.x; From 5c87b8152db107896d5c84533b5727ec1de54530 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 8 Mar 2018 18:03:15 -0500 Subject: [PATCH 124/670] Remove Map::FindClosestLoS() Map::LineIntersectsZone() already accomplished this use case --- zone/map.cpp | 8 -------- zone/map.h | 1 - zone/waypoints.cpp | 2 +- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/zone/map.cpp b/zone/map.cpp index 487a9de0b..0627c2dc2 100644 --- a/zone/map.cpp +++ b/zone/map.cpp @@ -268,14 +268,6 @@ bool Map::CheckLoS(glm::vec3 myloc, glm::vec3 oloc) const { return !imp->rm->raycast((const RmReal*)&myloc, (const RmReal*)&oloc, nullptr, nullptr, nullptr); } -// returns true if outloc should be used -bool Map::FindClosestLoS(glm::vec3 myloc, glm::vec3 oloc, glm::vec3 &outloc) const { - if(!imp) - return false; - - return imp->rm->raycast((const RmReal*)&myloc, (const RmReal*)&oloc, (RmReal *)&outloc, nullptr, nullptr); -} - // returns true if a collision happens bool Map::DoCollisionCheck(glm::vec3 myloc, glm::vec3 oloc, glm::vec3 &outnorm, float &distance) const { if(!imp) diff --git a/zone/map.h b/zone/map.h index 34638eec1..8a2ec7f68 100644 --- a/zone/map.h +++ b/zone/map.h @@ -42,7 +42,6 @@ public: bool LineIntersectsZone(glm::vec3 start, glm::vec3 end, float step, glm::vec3 *result) const; bool LineIntersectsZoneNoZLeaps(glm::vec3 start, glm::vec3 end, float step_mag, glm::vec3 *result) const; bool CheckLoS(glm::vec3 myloc, glm::vec3 oloc) const; - bool FindClosestLoS(glm::vec3 myloc, glm::vec3 oloc, glm::vec3 &outloc) const; bool DoCollisionCheck(glm::vec3 myloc, glm::vec3 oloc, glm::vec3 &outnorm, float &distance) const; #ifdef USE_MAP_MMFS diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index 6cf74bb65..55a2cc511 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -1012,7 +1012,7 @@ void Mob::TryMoveAlong(float distance, float angle, bool send) if (new_z != BEST_Z_INVALID) new_pos.z = new_z; - if (zone->zonemap->FindClosestLoS(GetPosition(), new_pos, tmp_pos)) + if (zone->zonemap->LineIntersectsZone(GetPosition(), new_pos, 0.0f, &tmp_pos)) new_pos = tmp_pos; } From 876335bb54a5ef0c9f7954a0c4b1d1bc51e27e5c Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 8 Mar 2018 19:42:40 -0500 Subject: [PATCH 125/670] Pull out forced movement from push to it's own function Had to pull this out so we could process it before mez/stun --- zone/mob.h | 1 + zone/mob_ai.cpp | 20 ++++++++++++-------- zone/npc.cpp | 4 ++++ 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/zone/mob.h b/zone/mob.h index 5530e0cab..a160b2a45 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -581,6 +581,7 @@ public: inline void Teleport(glm::vec3 NewPosition) { m_Position.x = NewPosition.x; m_Position.y = NewPosition.y; m_Position.z = NewPosition.z; }; void TryMoveAlong(float distance, float angle, bool send = true); + void ProcessForcedMovement(); //AI static uint32 GetLevelCon(uint8 mylevel, uint8 iOtherLevel); diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 055200d56..70176a92e 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -950,17 +950,12 @@ void Client::AI_Process() } } -void Mob::AI_Process() { - if (!IsAIControlled()) - return; - - if (!(AI_think_timer->Check() || attack_timer.Check(false))) - return; - +void Mob::ProcessForcedMovement() +{ // we are being pushed, we will hijack this movement timer // this also needs to be done before casting to have a chance to interrupt // this flag won't be set if the mob can't be pushed (rooted etc) - if (ForcedMovement && AI_movement_timer->Check()) { + if (AI_movement_timer->Check()) { bool bPassed = true; auto z_off = GetZOffset(); glm::vec3 normal; @@ -1019,6 +1014,15 @@ void Mob::AI_Process() { m_Delta = glm::vec4(); // well, we failed to find a spot to be forced to, lets give up } } +} + +void Mob::AI_Process() { + if (!IsAIControlled()) + return; + + if (!(AI_think_timer->Check() || attack_timer.Check(false))) + return; + if (IsCasting()) return; diff --git a/zone/npc.cpp b/zone/npc.cpp index 0fcc1e17d..c872fb680 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -762,6 +762,10 @@ bool NPC::Process() reface_timer->Disable(); } + // needs to be done before mez and stun + if (ForcedMovement) + ProcessForcedMovement(); + if (IsMezzed()) return true; From d59931dc4db8879f55fbf2760c59b17941260c0a Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Fri, 9 Mar 2018 17:10:34 -0500 Subject: [PATCH 126/670] Use an algorithm to generate pet names --- common/spdat.h | 1 - zone/pets.cpp | 105 ++++++++++++++----------------------------------- 2 files changed, 29 insertions(+), 77 deletions(-) diff --git a/common/spdat.h b/common/spdat.h index 51ec8327b..c6aab7e7e 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -972,7 +972,6 @@ bool IsCastWhileInvis(uint16 spell_id); bool IsEffectIgnoredInStacking(int spa); int CalcPetHp(int levelb, int classb, int STA = 75); -const char *GetRandPetName(); int GetSpellEffectDescNum(uint16 spell_id); DmgShieldType GetDamageShieldType(uint16 spell_id, int32 DSType = 0); bool DetrimentalSpellAllowsRest(uint16 spell_id); diff --git a/zone/pets.cpp b/zone/pets.cpp index bbc4f8eea..a602153b2 100644 --- a/zone/pets.cpp +++ b/zone/pets.cpp @@ -28,6 +28,8 @@ #include "pets.h" #include "zonedb.h" +#include + #ifdef BOTS #include "bot.h" #endif @@ -38,82 +40,33 @@ #endif -const char *GetRandPetName() +// need to pass in a char array of 64 chars +void GetRandPetName(char *name) { - static const char *petnames[] = { "Gabaner","Gabann","Gabantik","Gabarab","Gabarer","Gabarn","Gabartik", - "Gabekab","Gabeker","Gabekn","Gaber","Gabn","Gabobab","Gabobn","Gabtik", - "Ganer","Gann","Gantik","Garab","Garaner","Garann","Garantik","Gararn", - "Garekn","Garer","Garn","Gartik","Gasaner","Gasann","Gasantik","Gasarer", - "Gasartik","Gasekn","Gaser","Gebann","Gebantik","Gebarer","Gebarn","Gebartik", - "Gebeker","Gebekn","Gebn","Gekab","Geker","Gekn","Genaner","Genann","Genantik", - "Genarer","Genarn","Gener","Genn","Genobtik","Gibaner","Gibann","Gibantik", - "Gibarn","Gibartik","Gibekn","Giber","Gibn","Gibobtik","Gibtik","Gobaber", - "Gobaner","Gobann","Gobarn","Gobartik","Gober","Gobn","Gobober","Gobobn", - "Gobobtik","Gobtik","Gonaner","Gonann","Gonantik","Gonarab","Gonarer", - "Gonarn","Gonartik","Gonekab","Gonekn","Goner","Gonobtik","Gontik","Gotik", - "Jabaner","Jabann","Jabantik","Jabarab","Jabarer","Jabarn","Jabartik", - "Jabekab","Jabeker","Jabekn","Jaber","Jabn","Jabobtik","Jabtik","Janab", - "Janer","Jann","Jantik","Jarab","Jaranab","Jaraner","Jararer","Jararn", - "Jarartik","Jareker","Jarekn","Jarer","Jarn","Jarobn","Jarobtik","Jartik", - "Jasab","Jasaner","Jasantik","Jasarer","Jasartik","Jasekab","Jaseker", - "Jasekn","Jaser","Jasn","Jasobab","Jasober","Jastik","Jebanab","Jebann", - "Jebantik","Jebarab","Jebarar","Jebarer","Jebarn","Jebartik","Jebeker", - "Jebekn","Jeber","Jebobn","Jebtik","Jekab","Jeker","Jekn","Jenann", - "Jenantik","Jenarer","Jeneker","Jenekn","Jentik","Jibaner","Jibann", - "Jibantik","Jibarer","Jibarn","Jibartik","Jibeker","Jibn","Jibobn", - "Jibtik","Jobab","Jobaner","Jobann","Jobantik","Jobarn","Jobartik", - "Jobekab","Jobeker","Jober","Jobn","Jobtik","Jonanab","Jonaner", - "Jonann","Jonantik","Jonarer","Jonarn","Jonartik","Jonekab","Joneker", - "Jonekn","Joner","Jonn","Jonnarn","Jonober","Jonobn","Jonobtik","Jontik", - "Kabanab","Kabaner","Kabann","Kabantik","Kabarer","Kabarn","Kabartik", - "Kabeker","Kabekn","Kaber","Kabn","Kabober","Kabobn","Kabobtik","Kabtik", - "Kanab","Kaner","Kann","Kantik","Karab","Karanab","Karaner","Karann", - "Karantik","Kararer","Karartik","Kareker","Karer","Karn","Karobab","Karobn", - "Kartik","Kasaner","Kasann","Kasarer","Kasartik","Kaseker","Kasekn","Kaser", - "Kasn","Kasober","Kastik","Kebann","Kebantik","Kebarab","Kebartik","Kebeker", - "Kebekn","Kebn","Kebobab","Kebtik","Kekab","Keker","Kekn","Kenab","Kenaner", - "Kenantik","Kenarer","Kenarn","Keneker","Kener","Kenn","Kenobn","Kenobtik", - "Kentik","Kibab","Kibaner","Kibantik","Kibarn","Kibartik","Kibekab","Kibeker", - "Kibekn","Kibn","Kibobn","Kibobtik","Kobab","Kobanab","Kobaner","Kobann", - "Kobantik","Kobarer","Kobarn","Kobartik","Kobeker","Kobekn","Kober","Kobn", - "Kobober","Kobobn","Kobtik","Konanab","Konaner","Konann","Konantik","Konarab", - "Konarer","Konarn","Konekab","Koneker","Konekn","Koner","Konn","Konobn", - "Konobtik","Kontik","Labanab","Labaner","Labann","Labarab","Labarer", - "Labarn","Labartik","Labeker","Labekn","Laner","Lann","Larab","Larantik", - "Lararer","Lararn","Larartik","Lareker","Larer","Larn","Lartik","Lasaner", - "Lasann","Lasarer","Laseker","Laser","Lasik","Lasn","Lastik","Lebaner", - "Lebarer","Lebartik","Lebekn","Lebtik","Lekab","Lekn","Lenanab","Lenaner", - "Lenann","Lenartik","Lenekab","Leneker","Lenekn","Lentik","Libab","Libaner", - "Libann","Libantik","Libarer","Libarn","Libartik","Libeker","Libekn","Lobann", - "Lobarab","Lobarn","Lobartik","Lobekn","Lobn","Lobober","Lobobn","Lobtik", - "Lonaner","Lonann","Lonantik","Lonarab","Lonarer","Lonarn","Lonartik","Lonekn", - "Loner","Lonobtik","Lontik","Vabanab","Vabaner","Vabann","Vabantik","Vabarer", - "Vabarn","Vabartik","Vabeker","Vabekn","Vabtik","Vanikk","Vann","Varartik","Varn", - "Vartik","Vasann","Vasantik","Vasarab","Vasarer","Vaseker","Vebaner","Vebantik", - "Vebarab","Vebeker","Vebekn","Vebobn","Vekab","Veker","Venaner","Venantik","Venar", - "Venarn","Vener","Ventik","Vibann","Vibantik","Viber","Vibobtik","Vobann", - "Vobarer","Vobartik","Vobekn","Vober","Vobn","Vobtik","Vonaner","Vonann", - "Vonantik","Vonarab","Vonarn","Vonartik","Voneker","Vonn","Xabanab","Xabaner", - "Xabarer","Xabarn","Xabartik","Xabekab","Xabeker","Xabekn","Xaber","Xabober", - "Xaner","Xann","Xarab","Xaranab","Xarann","Xarantik","Xararer","Xarartik","Xarer", - "Xarn","Xartik","Xasaner","Xasann","Xasarab","Xasarn","Xasekab","Xaseker", - "Xebarer","Xebarn","Xebeker","Xeber","Xebober","Xebtik","Xekab","Xeker", - "Xekn","Xenann","Xenantik","Xenarer","Xenartik","Xenekn","Xener","Xenober", - "Xentik","Xibantik","Xibarer","Xibekab","Xibeker","Xibobab","Xibober","Xibobn", - "Xobaner","Xobann","Xobarab","Xobarn","Xobekab","Xobeker","Xobekn","Xober", - "Xobn","Xobobn","Xobtik","Xonaner","Xonann","Xonantik","Xonarer","Xonartik", - "Xonekab","Xoneker","Xonekn","Xoner","Xonober","Xtik","Zabaner","Zabantik", - "Zabarab","Zabekab","Zabekn","Zaber","Zabn","Zabobab","Zabober","Zabtik", - "Zaner","Zantik","Zarann","Zarantik","Zararn","Zarartik","Zareker","Zarekn", - "Zarer","Zarn","Zarober","Zartik","Zasaner","Zasarer","Zaseker","Zasekn","Zasn", - "Zebantik","Zebarer","Zebarn","Zebartik","Zebobab","Zekab","Zekn","Zenann", - "Zenantik","Zenarer","Zenarn","Zenekab","Zeneker","Zenobtik","Zibanab","Zibaner", - "Zibann","Zibarer","Zibartik","Zibekn","Zibn","Zibobn","Zobaner","Zobann", - "Zobarn","Zober","Zobn","Zonanab","Zonaner","Zonann","Zonantik","Zonarer", - "Zonartik","Zonobn","Zonobtik","Zontik","Ztik" }; - int r = zone->random.Int(0, (sizeof(petnames)/sizeof(const char *))-1); - printf("Pet being created: %s\n",petnames[r]); // DO NOT COMMENT THIS OUT! - return petnames[r]; + std::string temp; + temp.reserve(64); + static const char *part1[] = {"G", "J", "K", "L", "V", "X", "Z"}; + static const char *part2[] = {nullptr, "ab", "ar", "as", "eb", "en", "ib", "ob", "on"}; + static const char *part3[] = {nullptr, "an", "ar", "ek", "ob"}; + static const char *part4[] = {"ab", "er", "n", "tik"}; + + const char *first = part1[zone->random.Int(0, (sizeof(part1) / sizeof(const char *)) - 1)]; + const char *second = part2[zone->random.Int(0, (sizeof(part2) / sizeof(const char *)) - 1)]; + const char *third = part3[zone->random.Int(0, (sizeof(part3) / sizeof(const char *)) - 1)]; + const char *fourth = part4[zone->random.Int(0, (sizeof(part4) / sizeof(const char *)) - 1)]; + + // if both of these are empty, we would get an illegally short name + if (second == nullptr && third == nullptr) + fourth = part4[(sizeof(part4) / sizeof(const char *)) - 1]; + + temp += first; + if (second != nullptr) + temp += second; + if (third != nullptr) + temp += third; + temp += fourth; + + strn0cpy(name, temp.c_str(), 64); } //not used anymore @@ -325,7 +278,7 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower, } else if (record.petnaming == 4) { // Keep the DB name } else if (record.petnaming == 3 && IsClient()) { - strcpy(npc_type->name, GetRandPetName()); + GetRandPetName(npc_type->name); } else if (record.petnaming == 5 && IsClient()) { strcpy(npc_type->name, this->GetName()); npc_type->name[24] = '\0'; From ca29cb037e2a75854ffc08eb8cd6099e14782997 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Fri, 9 Mar 2018 17:26:22 -0500 Subject: [PATCH 127/670] Add some more name filtering --- zone/pets.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/zone/pets.cpp b/zone/pets.cpp index a602153b2..be17a3293 100644 --- a/zone/pets.cpp +++ b/zone/pets.cpp @@ -45,10 +45,11 @@ void GetRandPetName(char *name) { std::string temp; temp.reserve(64); + // note these orders are used to make the exclusions cheap :P static const char *part1[] = {"G", "J", "K", "L", "V", "X", "Z"}; static const char *part2[] = {nullptr, "ab", "ar", "as", "eb", "en", "ib", "ob", "on"}; static const char *part3[] = {nullptr, "an", "ar", "ek", "ob"}; - static const char *part4[] = {"ab", "er", "n", "tik"}; + static const char *part4[] = {"er", "ab", "n", "tik"}; const char *first = part1[zone->random.Int(0, (sizeof(part1) / sizeof(const char *)) - 1)]; const char *second = part2[zone->random.Int(0, (sizeof(part2) / sizeof(const char *)) - 1)]; @@ -59,6 +60,14 @@ void GetRandPetName(char *name) if (second == nullptr && third == nullptr) fourth = part4[(sizeof(part4) / sizeof(const char *)) - 1]; + // "ektik" isn't allowed either I guess? + if (third == part3[3] && fourth == part4[3]) + fourth = part4[zone->random.Int(0, (sizeof(part4) / sizeof(const char *)) - 2)]; + + // "Laser" isn't allowed either I guess? + if (first == part1[3] && second == part2[3] && third == nullptr && fourth == part4[0]) + fourth = part4[zone->random.Int(1, (sizeof(part4) / sizeof(const char *)) - 2)]; + temp += first; if (second != nullptr) temp += second; From a6b31017e34309a7a9328d4468f64a70247ad69e Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Fri, 9 Mar 2018 19:27:31 -0500 Subject: [PATCH 128/670] Remove extra z offset --- zone/mob_ai.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 70176a92e..18fc5d441 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -960,7 +960,6 @@ void Mob::ProcessForcedMovement() auto z_off = GetZOffset(); glm::vec3 normal; glm::vec3 new_pos = m_Position + m_Delta; - new_pos.z += z_off; // no zone map = fucked if (zone->HasMap()) { From 341bc0723bd917dffd5d26b7c5761fab70ae364f Mon Sep 17 00:00:00 2001 From: Uleat Date: Fri, 9 Mar 2018 23:25:50 -0500 Subject: [PATCH 129/670] Test code for tracing zone crashes --- zone/client_packet.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index fe8af2a98..dc198056b 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -6728,7 +6728,11 @@ void Client::Handle_OP_GroupFollow2(const EQApplicationPacket *app) // Inviter and Invitee are in the same zone if (inviter != nullptr && inviter->IsClient()) { - if (GroupFollow(inviter->CastToClient())) + if (!inviter->CastToClient()->Connected()) + { + Log(Logs::General, Logs::Error, "%s attempted to join group while leader %s was zoning.", GetName(), inviter->GetName()); + } + else if (GroupFollow(inviter->CastToClient())) { strn0cpy(gf->name1, inviter->GetName(), sizeof(gf->name1)); strn0cpy(gf->name2, GetName(), sizeof(gf->name2)); From 89303d9218fdf0ef2ce6ba8a573cd63d7926f286 Mon Sep 17 00:00:00 2001 From: Uleat Date: Fri, 9 Mar 2018 23:41:27 -0500 Subject: [PATCH 130/670] Fix for zone crashes on startup --- zone/worldserver.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zone/worldserver.cpp b/zone/worldserver.cpp index 053bebacf..7c60bffe0 100644 --- a/zone/worldserver.cpp +++ b/zone/worldserver.cpp @@ -1817,7 +1817,8 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) case ServerOP_UCSServerStatusReply: { auto ucsss = (UCSServerStatus_Struct*)pack->pBuffer; - zone->SetUCSServerAvailable((ucsss->available != 0), ucsss->timestamp); + if (zone) + zone->SetUCSServerAvailable((ucsss->available != 0), ucsss->timestamp); break; } case ServerOP_CZSetEntityVariableByNPCTypeID: From fdef1090c3485a4f6e40e43dc6afa9fee72339d6 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 10 Mar 2018 15:11:16 -0500 Subject: [PATCH 131/670] Update #race to accept all valid RoF2 races --- zone/command.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/zone/command.cpp b/zone/command.cpp index a97e04d96..4ca94fcb4 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -2323,14 +2323,18 @@ void command_race(Client *c, const Seperator *sep) { Mob *t=c->CastToMob(); - // Need to figure out max race for LoY/LDoN: going with upper bound of 500 now for testing - if (sep->IsNumber(1) && atoi(sep->arg[1]) >= 0 && atoi(sep->arg[1]) <= 724) { - if ((c->GetTarget()) && c->Admin() >= commandRaceOthers) - t=c->GetTarget(); - t->SendIllusionPacket(atoi(sep->arg[1])); + if (sep->IsNumber(1)) { + auto race = atoi(sep->arg[1]); + if ((race >= 0 && race <= 732) || (race >= 2253 && race <= 2259)) { + if ((c->GetTarget()) && c->Admin() >= commandRaceOthers) + t = c->GetTarget(); + t->SendIllusionPacket(race); + } else { + c->Message(0, "Usage: #race [0-732, 2253-2259] (0 for back to normal)"); + } + } else { + c->Message(0, "Usage: #race [0-732, 2253-2259] (0 for back to normal)"); } - else - c->Message(0, "Usage: #race [0-724] (0 for back to normal)"); } void command_gender(Client *c, const Seperator *sep) From 638d43e3cfdf3fd4fc04aadb901a7fb6ec04003c Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 10 Mar 2018 15:36:12 -0500 Subject: [PATCH 132/670] Use pathpoint races for showing nodes The nearest neighbor command will grow them instead of changing race now. --- zone/pathing.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/zone/pathing.cpp b/zone/pathing.cpp index 0bc054d58..7f2d8c880 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -560,7 +560,8 @@ void PathManager::SpawnPathNodes() sprintf(npc_type->lastname, "%i", PathNodes[i].id); npc_type->cur_hp = 4000000; npc_type->max_hp = 4000000; - npc_type->race = 151; + npc_type->race = 2253; + npc_type->size = 3.0f; npc_type->gender = 2; npc_type->class_ = 9; npc_type->deity= 1; @@ -1377,7 +1378,7 @@ void PathManager::ShowPathNodeNeighbours(Client *c) Mob *m = entity_list.GetMob(Name); if(m) - m->SendIllusionPacket(151); + m->ChangeSize(3.0f); } std::stringstream Neighbours; @@ -1401,7 +1402,7 @@ void PathManager::ShowPathNodeNeighbours(Client *c) Mob *m = entity_list.GetMob(Name); if(m) - m->SendIllusionPacket(46); + m->ChangeSize(5.0f); } c->Message(0, "Neighbours: %s", Neighbours.str().c_str()); } @@ -1560,7 +1561,8 @@ int32 PathManager::AddNode(float x, float y, float z, float best_z, int32 reques sprintf(npc_type->lastname, "%i", new_id); npc_type->cur_hp = 4000000; npc_type->max_hp = 4000000; - npc_type->race = 151; + npc_type->race = 2253; + npc_type->size = 3.0f; npc_type->gender = 2; npc_type->class_ = 9; npc_type->deity= 1; @@ -1621,7 +1623,8 @@ int32 PathManager::AddNode(float x, float y, float z, float best_z, int32 reques sprintf(npc_type->lastname, "%i", new_id); npc_type->cur_hp = 4000000; npc_type->max_hp = 4000000; - npc_type->race = 151; + npc_type->race = 2253; + npc_type->size = 3.0f; npc_type->gender = 2; npc_type->class_ = 9; npc_type->deity= 1; From 5e963c05af59943a5c573fb51d9979d45639d256 Mon Sep 17 00:00:00 2001 From: Uleat Date: Mon, 12 Mar 2018 20:49:48 -0400 Subject: [PATCH 133/670] Added client message for test code --- zone/client_packet.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index dc198056b..e686784ce 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -6731,6 +6731,7 @@ void Client::Handle_OP_GroupFollow2(const EQApplicationPacket *app) if (!inviter->CastToClient()->Connected()) { Log(Logs::General, Logs::Error, "%s attempted to join group while leader %s was zoning.", GetName(), inviter->GetName()); + Message(13, "Bubba said you can't follow him."); } else if (GroupFollow(inviter->CastToClient())) { From 339e921f1793083e7ec3afc986d4a7ad0e47c37b Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 14 Mar 2018 16:09:43 -0400 Subject: [PATCH 134/670] Add a #push command, only works on NPCs for now --- zone/command.cpp | 30 ++++++++++++++++++++++++++++++ zone/command.h | 1 + zone/mob.h | 4 ++++ 3 files changed, 35 insertions(+) diff --git a/zone/command.cpp b/zone/command.cpp index 4ca94fcb4..3ef118934 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -67,10 +67,12 @@ #include "titles.h" #include "water_map.h" #include "worldserver.h" +#include "fastmath.h" extern QueryServ* QServ; extern WorldServer worldserver; extern TaskManager *taskmanager; +extern FastMath g_Math; void CatchSignal(int sig_num); @@ -306,6 +308,7 @@ int command_init(void) command_add("profilereset", "- Reset profiling info", 250, command_profilereset) || #endif + command_add("push", "Lets you do spell push", 150, command_push) || command_add("pvp", "[on/off] - Set your or your player target's PVP status", 100, command_pvp) || command_add("qglobal", "[on/off/view] - Toggles qglobal functionality on an NPC", 100, command_qglobal) || command_add("questerrors", "Shows quest errors.", 100, command_questerrors) || @@ -4052,6 +4055,33 @@ void command_unfreeze(Client *c, const Seperator *sep) c->Message(0, "ERROR: Unfreeze requires a target."); } +void command_push(Client *c, const Seperator *sep) +{ + Mob *t = c; + if (c->GetTarget() != nullptr) + t = c->GetTarget(); + + if (!sep->arg[1] || !sep->IsNumber(1)) { + c->Message(0, "ERROR: Must provide at least a push back."); + return; + } + + float back = atof(sep->arg[1]); + float up = 0.0f; + + if (sep->arg[2] && sep->IsNumber(2)) + up = atof(sep->arg[2]); + + if (t->IsNPC()) { + t->IncDeltaX(back * g_Math.FastSin(c->GetHeading())); + t->IncDeltaY(back * g_Math.FastCos(c->GetHeading())); + t->IncDeltaZ(up); + t->SetForcedMovement(6); + } else if (t->IsClient()) { + // TODO: send packet to push + } +} + void command_pvp(Client *c, const Seperator *sep) { bool state=atobool(sep->arg[1]); diff --git a/zone/command.h b/zone/command.h index 580dd00ff..d3bae6c0c 100644 --- a/zone/command.h +++ b/zone/command.h @@ -211,6 +211,7 @@ void command_profiledump(Client *c, const Seperator *sep); void command_profilereset(Client *c, const Seperator *sep); #endif +void command_push(Client *c, const Seperator *sep); void command_pvp(Client *c, const Seperator *sep); void command_qglobal(Client *c, const Seperator *sep); void command_qtest(Client *c, const Seperator *sep); diff --git a/zone/mob.h b/zone/mob.h index a160b2a45..43d8f9b59 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -582,6 +582,10 @@ public: m_Position.z = NewPosition.z; }; void TryMoveAlong(float distance, float angle, bool send = true); void ProcessForcedMovement(); + inline void IncDeltaX(float in) { m_Delta.x += in; } + inline void IncDeltaY(float in) { m_Delta.y += in; } + inline void IncDeltaZ(float in) { m_Delta.z += in; } + inline void SetForcedMovement(int in) { ForcedMovement = in; } //AI static uint32 GetLevelCon(uint8 mylevel, uint8 iOtherLevel); From d62f2d41fc7a65db3d2e7b6e5f8ce56b1bdcc168 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 15 Mar 2018 15:39:36 -0400 Subject: [PATCH 135/670] Bug fixes to push, shouldn't get stuck anymore --- zone/mob_ai.cpp | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 18fc5d441..7187abcde 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -20,6 +20,7 @@ #include "../common/features.h" #include "../common/rulesys.h" #include "../common/string_util.h" +#include "../common/misc_functions.h" #include "client.h" #include "entity.h" @@ -959,35 +960,39 @@ void Mob::ProcessForcedMovement() bool bPassed = true; auto z_off = GetZOffset(); glm::vec3 normal; - glm::vec3 new_pos = m_Position + m_Delta; // no zone map = fucked if (zone->HasMap()) { + float angle = GetHeading(); // in front - m_CollisionBox[0].x = m_Position.x + 3.0f * g_Math.FastSin(0.0f); - m_CollisionBox[0].y = m_Position.y + 3.0f * g_Math.FastCos(0.0f); + m_CollisionBox[0].x = m_Position.x + 3.0f * g_Math.FastSin(angle); + m_CollisionBox[0].y = m_Position.y + 3.0f * g_Math.FastCos(angle); m_CollisionBox[0].z = m_Position.z + z_off; // to right - m_CollisionBox[1].x = m_Position.x + 3.0f * g_Math.FastSin(128.0f); - m_CollisionBox[1].y = m_Position.y + 3.0f * g_Math.FastCos(128.0f); + angle = FixHeading(GetHeading() - 128.0f); + m_CollisionBox[1].x = m_Position.x + 3.0f * g_Math.FastSin(angle); + m_CollisionBox[1].y = m_Position.y + 3.0f * g_Math.FastCos(angle); m_CollisionBox[1].z = m_Position.z + z_off; + // behind - m_CollisionBox[2].x = m_Position.x + 3.0f * g_Math.FastSin(256.0f); - m_CollisionBox[2].y = m_Position.y + 3.0f * g_Math.FastCos(256.0f); + angle = FixHeading(GetHeading() - 256.0f); + m_CollisionBox[2].x = m_Position.x + 3.0f * g_Math.FastSin(angle); + m_CollisionBox[2].y = m_Position.y + 3.0f * g_Math.FastCos(angle); m_CollisionBox[2].z = m_Position.z + z_off; // to left - m_CollisionBox[3].x = m_Position.x + 3.0f * g_Math.FastSin(384.0f); - m_CollisionBox[3].y = m_Position.y + 3.0f * g_Math.FastCos(384.0f); + angle = FixHeading(GetHeading() - 384.0f); + m_CollisionBox[3].x = m_Position.x + 3.0f * g_Math.FastSin(angle); + m_CollisionBox[3].y = m_Position.y + 3.0f * g_Math.FastCos(angle); m_CollisionBox[3].z = m_Position.z + z_off; // collision happened, need to move along the wall float distance = 0.0f, shortest = std::numeric_limits::infinity(); glm::vec3 tmp_nrm; for (auto &vec : m_CollisionBox) { - if (zone->zonemap->DoCollisionCheck(vec, new_pos, tmp_nrm, distance)) { + if (zone->zonemap->DoCollisionCheck(vec, vec + m_Delta, tmp_nrm, distance)) { bPassed = false; // lets try with new projection next pass if (distance < shortest) { normal = tmp_nrm; @@ -999,8 +1004,8 @@ void Mob::ProcessForcedMovement() if (bPassed) { ForcedMovement = 0; + Teleport(m_Position + m_Delta); m_Delta = glm::vec4(); - Teleport(new_pos); SendPositionUpdate(); pLastChange = Timer::GetCurrentTime(); FixZ(); // so we teleport to the ground locally, we want the client to interpolate falling etc From a339d0d41d645a660f368a7193f0ea5c7db34845 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 15 Mar 2018 15:48:34 -0400 Subject: [PATCH 136/670] Don't rotate the box, it works better --- zone/mob_ai.cpp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 7187abcde..2c679f10b 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -20,7 +20,6 @@ #include "../common/features.h" #include "../common/rulesys.h" #include "../common/string_util.h" -#include "../common/misc_functions.h" #include "client.h" #include "entity.h" @@ -963,29 +962,25 @@ void Mob::ProcessForcedMovement() // no zone map = fucked if (zone->HasMap()) { - float angle = GetHeading(); // in front - m_CollisionBox[0].x = m_Position.x + 3.0f * g_Math.FastSin(angle); - m_CollisionBox[0].y = m_Position.y + 3.0f * g_Math.FastCos(angle); + m_CollisionBox[0].x = m_Position.x + 3.0f * g_Math.FastSin(0.0f); + m_CollisionBox[0].y = m_Position.y + 3.0f * g_Math.FastCos(0.0f); m_CollisionBox[0].z = m_Position.z + z_off; // to right - angle = FixHeading(GetHeading() - 128.0f); - m_CollisionBox[1].x = m_Position.x + 3.0f * g_Math.FastSin(angle); - m_CollisionBox[1].y = m_Position.y + 3.0f * g_Math.FastCos(angle); + m_CollisionBox[1].x = m_Position.x + 3.0f * g_Math.FastSin(128.0f); + m_CollisionBox[1].y = m_Position.y + 3.0f * g_Math.FastCos(128.0f); m_CollisionBox[1].z = m_Position.z + z_off; // behind - angle = FixHeading(GetHeading() - 256.0f); - m_CollisionBox[2].x = m_Position.x + 3.0f * g_Math.FastSin(angle); - m_CollisionBox[2].y = m_Position.y + 3.0f * g_Math.FastCos(angle); + m_CollisionBox[2].x = m_Position.x + 3.0f * g_Math.FastSin(256.0f); + m_CollisionBox[2].y = m_Position.y + 3.0f * g_Math.FastCos(256.0f); m_CollisionBox[2].z = m_Position.z + z_off; // to left - angle = FixHeading(GetHeading() - 384.0f); - m_CollisionBox[3].x = m_Position.x + 3.0f * g_Math.FastSin(angle); - m_CollisionBox[3].y = m_Position.y + 3.0f * g_Math.FastCos(angle); + m_CollisionBox[3].x = m_Position.x + 3.0f * g_Math.FastSin(384.0f); + m_CollisionBox[3].y = m_Position.y + 3.0f * g_Math.FastCos(384.0f); m_CollisionBox[3].z = m_Position.z + z_off; // collision happened, need to move along the wall From e46e2952e6d314b4321f7033d5654e8262442f5e Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 15 Mar 2018 16:20:00 -0400 Subject: [PATCH 137/670] Use 8 points to check in push code --- zone/mob.h | 2 +- zone/mob_ai.cpp | 39 +++++++++++++++++++++++++++++---------- 2 files changed, 30 insertions(+), 11 deletions(-) diff --git a/zone/mob.h b/zone/mob.h index 43d8f9b59..cb8e7b261 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -50,7 +50,7 @@ struct AuraRecord; struct NewSpawn_Struct; struct PlayerPositionUpdateServer_Struct; -const int COLLISION_BOX_SIZE = 4; +const int COLLISION_BOX_SIZE = 8; namespace EQEmu { diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 2c679f10b..8f42ce438 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -967,22 +967,41 @@ void Mob::ProcessForcedMovement() m_CollisionBox[0].y = m_Position.y + 3.0f * g_Math.FastCos(0.0f); m_CollisionBox[0].z = m_Position.z + z_off; - // to right - m_CollisionBox[1].x = m_Position.x + 3.0f * g_Math.FastSin(128.0f); - m_CollisionBox[1].y = m_Position.y + 3.0f * g_Math.FastCos(128.0f); + // 45 right front + m_CollisionBox[1].x = m_Position.x + 3.0f * g_Math.FastSin(64.0f); + m_CollisionBox[1].y = m_Position.y + 3.0f * g_Math.FastCos(64.0f); m_CollisionBox[1].z = m_Position.z + z_off; - - // behind - m_CollisionBox[2].x = m_Position.x + 3.0f * g_Math.FastSin(256.0f); - m_CollisionBox[2].y = m_Position.y + 3.0f * g_Math.FastCos(256.0f); + // to right + m_CollisionBox[2].x = m_Position.x + 3.0f * g_Math.FastSin(128.0f); + m_CollisionBox[2].y = m_Position.y + 3.0f * g_Math.FastCos(128.0f); m_CollisionBox[2].z = m_Position.z + z_off; - // to left - m_CollisionBox[3].x = m_Position.x + 3.0f * g_Math.FastSin(384.0f); - m_CollisionBox[3].y = m_Position.y + 3.0f * g_Math.FastCos(384.0f); + // 45 right back + m_CollisionBox[3].x = m_Position.x + 3.0f * g_Math.FastSin(192.0f); + m_CollisionBox[3].y = m_Position.y + 3.0f * g_Math.FastCos(192.0f); m_CollisionBox[3].z = m_Position.z + z_off; + // behind + m_CollisionBox[4].x = m_Position.x + 3.0f * g_Math.FastSin(256.0f); + m_CollisionBox[4].y = m_Position.y + 3.0f * g_Math.FastCos(256.0f); + m_CollisionBox[4].z = m_Position.z + z_off; + + // 45 left back + m_CollisionBox[5].x = m_Position.x + 3.0f * g_Math.FastSin(320.0f); + m_CollisionBox[5].y = m_Position.y + 3.0f * g_Math.FastCos(320.0f); + m_CollisionBox[5].z = m_Position.z + z_off; + + // to left + m_CollisionBox[6].x = m_Position.x + 3.0f * g_Math.FastSin(384.0f); + m_CollisionBox[6].y = m_Position.y + 3.0f * g_Math.FastCos(384.0f); + m_CollisionBox[6].z = m_Position.z + z_off; + + // 45 left front + m_CollisionBox[7].x = m_Position.x + 3.0f * g_Math.FastSin(448.0f); + m_CollisionBox[7].y = m_Position.y + 3.0f * g_Math.FastCos(448.0f); + m_CollisionBox[7].z = m_Position.z + z_off; + // collision happened, need to move along the wall float distance = 0.0f, shortest = std::numeric_limits::infinity(); glm::vec3 tmp_nrm; From d8b704ef7d3a7a7cb82eec9abe87f4777488fd07 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 17 Mar 2018 02:05:36 -0400 Subject: [PATCH 138/670] Adjust z offset down --- zone/mob_ai.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 8f42ce438..624f07f7f 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -957,7 +957,7 @@ void Mob::ProcessForcedMovement() // this flag won't be set if the mob can't be pushed (rooted etc) if (AI_movement_timer->Check()) { bool bPassed = true; - auto z_off = GetZOffset(); + auto z_off = GetZOffset() / 2.0f; glm::vec3 normal; // no zone map = fucked From 386261181edbfb0f74a8467ea0f09d0f7a2309fa Mon Sep 17 00:00:00 2001 From: Uleat Date: Sat, 17 Mar 2018 07:54:39 -0400 Subject: [PATCH 139/670] Rework of command #peekinv --- zone/command.cpp | 473 ++++++++++++++++++++++++++++++----------------- 1 file changed, 304 insertions(+), 169 deletions(-) diff --git a/zone/command.cpp b/zone/command.cpp index 3ef118934..ea1681566 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -294,7 +294,7 @@ int command_init(void) #endif command_add("path", "- view and edit pathing", 200, command_path) || - command_add("peekinv", "[worn/inv/cursor/trib/bank/trade/world/all] - Print out contents of your player target's inventory", 100, command_peekinv) || + command_add("peekinv", "[equip/gen/cursor/poss/limbo/curlim/trib/bank/shbank/allbank/trade/world/all] - Print out contents of your player target's inventory", 100, command_peekinv) || command_add("peqzone", "[zonename] - Go to specified zone, if you have > 75% health", 0, command_peqzone) || command_add("permaclass", "[classnum] - Change your or your player target's class (target is disconnected)", 80, command_permaclass) || command_add("permagender", "[gendernum] - Change your or your player target's gender (zone to take effect)", 80, command_permagender) || @@ -2520,212 +2520,347 @@ void command_nukeitem(Client *c, const Seperator *sep) void command_peekinv(Client *c, const Seperator *sep) { + // this can be cleaned up once inventory is cleaned up enum { - peekWorn = 0x01, - peekInv = 0x02, - peekCursor = 0x04, - peekTrib = 0x08, - peekBank = 0x10, - peekTrade = 0x20, - peekWorld = 0x40 - } ; + peekNone = 0x0000, + peekEquip = 0x0001, + peekGen = 0x0002, + peekCursor = 0x0004, + peekLimbo = 0x0008, + peekTrib = 0x0010, + peekBank = 0x0020, + peekShBank = 0x0040, + peekTrade = 0x0080, + peekWorld = 0x0100, + peekOutOfScope = (peekWorld * 2) // less than + }; - if (!c->GetTarget() || !c->GetTarget()->IsClient()) { - c->Message(0, "You must have a PC target selected for this command"); + static char* scope_prefix[] = { "Equip", "Gen", "Cursor", "Limbo", "Trib", "Bank", "ShBank", "Trade", "World" }; + + static int16 scope_range[][2] = { + { EQEmu::legacy::EQUIPMENT_BEGIN, EQEmu::legacy::EQUIPMENT_END }, + { EQEmu::legacy::GENERAL_BEGIN, EQEmu::legacy::GENERAL_END }, + { EQEmu::legacy::SLOT_CURSOR, EQEmu::legacy::SLOT_CURSOR }, + { EQEmu::legacy::SLOT_INVALID, EQEmu::legacy::SLOT_INVALID }, + { EQEmu::legacy::TRIBUTE_BEGIN, EQEmu::legacy::TRIBUTE_END }, + { EQEmu::legacy::BANK_BEGIN, EQEmu::legacy::BANK_END }, + { EQEmu::legacy::SHARED_BANK_BEGIN, EQEmu::legacy::SHARED_BANK_END }, + { EQEmu::legacy::TRADE_BEGIN, EQEmu::legacy::TRADE_END }, + { EQEmu::inventory::slotBegin, (EQEmu::legacy::WORLD_SIZE - 1) } + }; + + static bool scope_bag[] = { false, true, true, true, false, true, true, true, true }; + + if (!c) + return; + + if (c->GetTarget() && !c->GetTarget()->IsClient()) { + c->Message(0, "You must target a PC for this command."); return; } - int scopeWhere = 0; + int scopeMask = peekNone; - if (strcasecmp(sep->arg[1], "all") == 0) { scopeWhere = ~0; } - else if (strcasecmp(sep->arg[1], "worn") == 0) { scopeWhere |= peekWorn; } - else if (strcasecmp(sep->arg[1], "inv") == 0) { scopeWhere |= peekInv; } - else if (strcasecmp(sep->arg[1], "cursor") == 0) { scopeWhere |= peekCursor; } - else if (strcasecmp(sep->arg[1], "trib") == 0) { scopeWhere |= peekTrib; } - else if (strcasecmp(sep->arg[1], "bank") == 0) { scopeWhere |= peekBank; } - else if (strcasecmp(sep->arg[1], "trade") == 0) { scopeWhere |= peekTrade; } - else if (strcasecmp(sep->arg[1], "world") == 0) { scopeWhere |= peekWorld; } + if (strcasecmp(sep->arg[1], "all") == 0) { scopeMask = (peekOutOfScope - 1); } + else if (strcasecmp(sep->arg[1], "equip") == 0) { scopeMask |= peekEquip; } + else if (strcasecmp(sep->arg[1], "gen") == 0) { scopeMask |= peekGen; } + else if (strcasecmp(sep->arg[1], "cursor") == 0) { scopeMask |= peekCursor; } + else if (strcasecmp(sep->arg[1], "poss") == 0) { scopeMask |= (peekEquip | peekGen | peekCursor); } + else if (strcasecmp(sep->arg[1], "limbo") == 0) { scopeMask |= peekLimbo; } + else if (strcasecmp(sep->arg[1], "curlim") == 0) { scopeMask |= (peekCursor | peekLimbo); } + else if (strcasecmp(sep->arg[1], "trib") == 0) { scopeMask |= peekTrib; } + else if (strcasecmp(sep->arg[1], "bank") == 0) { scopeMask |= peekBank; } + else if (strcasecmp(sep->arg[1], "shbank") == 0) { scopeMask |= peekShBank; } + else if (strcasecmp(sep->arg[1], "allbank") == 0) { scopeMask |= (peekBank | peekShBank); } + else if (strcasecmp(sep->arg[1], "trade") == 0) { scopeMask |= peekTrade; } + else if (strcasecmp(sep->arg[1], "world") == 0) { scopeMask |= peekWorld; } - if (scopeWhere == 0) { - c->Message(0, "Usage: #peekinv [worn|inv|cursor|trib|bank|trade|world|all]"); - c->Message(0, " Displays a portion of the targeted user's inventory"); - c->Message(0, " Caution: 'all' is a lot of information!"); + if (!scopeMask) { + c->Message(0, "Usage: #peekinv [equip|gen|cursor|poss|limbo|curlim|trib|bank|shbank|allbank|trade|world|all]"); + c->Message(0, "- Displays a portion of the targeted user's inventory"); + c->Message(0, "- Caution: 'all' is a lot of information!"); return; } - Client* targetClient = c->GetTarget()->CastToClient(); + Client* targetClient = c; + if (c->GetTarget()) + targetClient = c->GetTarget()->CastToClient(); + const EQEmu::ItemInstance* inst_main = nullptr; const EQEmu::ItemInstance* inst_sub = nullptr; + const EQEmu::ItemInstance* inst_aug = nullptr; const EQEmu::ItemData* item_data = nullptr; EQEmu::SayLinkEngine linker; linker.SetLinkType(EQEmu::saylink::SayLinkItemInst); - c->Message(0, "Displaying inventory for %s...", targetClient->GetName()); + c->Message(0, "Displaying inventory for %s...", targetClient->GetName()); - // worn - for (int16 indexMain = EQEmu::legacy::EQUIPMENT_BEGIN; (scopeWhere & peekWorn) && (indexMain <= EQEmu::legacy::EQUIPMENT_END); ++indexMain) { - inst_main = targetClient->GetInv().GetItem(indexMain); - item_data = (inst_main == nullptr) ? nullptr : inst_main->GetItem(); - linker.SetItemInst(inst_main); + Object* objectTradeskill = targetClient->GetTradeskillObject(); - c->Message((item_data == nullptr), "WornSlot: %i, Item: %i (%s), Charges: %i", - indexMain, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges())); - } + bool itemsFound = false; - if ((scopeWhere & peekWorn) && (targetClient->ClientVersion() >= EQEmu::versions::ClientVersion::SoF)) { - inst_main = targetClient->GetInv().GetItem(EQEmu::inventory::slotPowerSource); - item_data = (inst_main == nullptr) ? nullptr : inst_main->GetItem(); - linker.SetItemInst(inst_main); + for (int scopeIndex = 0, scopeBit = peekEquip; scopeBit < peekOutOfScope; ++scopeIndex, scopeBit <<= 1) { + if (scopeBit & ~scopeMask) + continue; - c->Message((item_data == nullptr), "WornSlot: %i, Item: %i (%s), Charges: %i", - EQEmu::inventory::slotPowerSource, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges())); - } - - // inv - for (int16 indexMain = EQEmu::legacy::GENERAL_BEGIN; (scopeWhere & peekInv) && (indexMain <= EQEmu::legacy::GENERAL_END); ++indexMain) { - inst_main = targetClient->GetInv().GetItem(indexMain); - item_data = (inst_main == nullptr) ? nullptr : inst_main->GetItem(); - linker.SetItemInst(inst_main); - - c->Message((item_data == nullptr), "InvSlot: %i, Item: %i (%s), Charges: %i", - indexMain, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges())); - - for (uint8 indexSub = EQEmu::inventory::containerBegin; inst_main && inst_main->IsClassBag() && (indexSub < EQEmu::inventory::ContainerCount); ++indexSub) { - inst_sub = inst_main->GetItem(indexSub); - item_data = (inst_sub == nullptr) ? nullptr : inst_sub->GetItem(); - linker.SetItemInst(inst_sub); - - c->Message((item_data == nullptr), " InvBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i", - EQEmu::InventoryProfile::CalcSlotId(indexMain, indexSub), indexMain, indexSub, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_sub == nullptr) ? 0 : inst_sub->GetCharges())); + if (scopeBit & peekWorld) { + if (objectTradeskill == nullptr) { + c->Message(1, "No world tradeskill object selected..."); + continue; + } + else { + c->Message(0, "[WorldObject DBID: %i (entityid: %i)]", objectTradeskill->GetDBID(), objectTradeskill->GetID()); + } } - } - // cursor - if (scopeWhere & peekCursor) { - if (targetClient->GetInv().CursorEmpty()) { - linker.SetItemInst(nullptr); + for (int16 indexMain = scope_range[scopeIndex][0]; indexMain <= scope_range[scopeIndex][1]; ++indexMain) { + if (indexMain == EQEmu::legacy::SLOT_INVALID) + continue; - c->Message(1, "CursorSlot: %i, Item: %i (%s), Charges: %i", - EQEmu::inventory::slotCursor, 0, linker.GenerateLink().c_str(), 0); + inst_main = ((scopeBit & peekWorld) ? objectTradeskill->GetItem(indexMain) : targetClient->GetInv().GetItem(indexMain)); + if (inst_main) { + itemsFound = true; + item_data = inst_main->GetItem(); + } + else { + item_data = nullptr; + } + + linker.SetItemInst(inst_main); + + c->Message( + (item_data == nullptr), + "%sSlot: %i, Item: %i (%s), Charges: %i", + scope_prefix[scopeIndex], + ((scopeBit & peekWorld) ? (EQEmu::legacy::WORLD_BEGIN + indexMain) : indexMain), + ((item_data == nullptr) ? 0 : item_data->ID), + linker.GenerateLink().c_str(), + ((inst_main == nullptr) ? 0 : inst_main->GetCharges()) + ); + + if (inst_main && inst_main->IsClassCommon()) { + for (uint8 indexAug = EQEmu::inventory::socketBegin; indexAug < EQEmu::inventory::SocketCount; ++indexAug) { + inst_aug = inst_main->GetItem(indexAug); + if (!inst_aug) // extant only + continue; + + item_data = inst_aug->GetItem(); + linker.SetItemInst(inst_aug); + + c->Message( + (item_data == nullptr), + ".%sAugSlot: %i (Slot #%i, Aug idx #%i), Item: %i (%s), Charges: %i", + scope_prefix[scopeIndex], + INVALID_INDEX, + ((scopeBit & peekWorld) ? (EQEmu::legacy::WORLD_BEGIN + indexMain) : indexMain), + indexAug, + ((item_data == nullptr) ? 0 : item_data->ID), + linker.GenerateLink().c_str(), + ((inst_sub == nullptr) ? 0 : inst_sub->GetCharges()) + ); + } + } + + if (!scope_bag[scopeIndex] || !(inst_main && inst_main->IsClassBag())) + continue; + + for (uint8 indexSub = EQEmu::inventory::containerBegin; indexSub < EQEmu::inventory::ContainerCount; ++indexSub) { + inst_sub = inst_main->GetItem(indexSub); + if (!inst_sub) // extant only + continue; + + item_data = inst_sub->GetItem(); + linker.SetItemInst(inst_sub); + + c->Message( + (item_data == nullptr), + "..%sBagSlot: %i (Slot #%i, Bag idx #%i), Item: %i (%s), Charges: %i", + scope_prefix[scopeIndex], + ((scopeBit & peekWorld) ? INVALID_INDEX : EQEmu::InventoryProfile::CalcSlotId(indexMain, indexSub)), + ((scopeBit & peekWorld) ? (EQEmu::legacy::WORLD_BEGIN + indexMain) : indexMain), + indexSub, + ((item_data == nullptr) ? 0 : item_data->ID), + linker.GenerateLink().c_str(), + ((inst_sub == nullptr) ? 0 : inst_sub->GetCharges()) + ); + + if (inst_sub->IsClassCommon()) { + for (uint8 indexAug = EQEmu::inventory::socketBegin; indexAug < EQEmu::inventory::SocketCount; ++indexAug) { + inst_aug = inst_sub->GetItem(indexAug); + if (!inst_aug) // extant only + continue; + + item_data = inst_aug->GetItem(); + linker.SetItemInst(inst_aug); + + c->Message( + (item_data == nullptr), + "...%sAugSlot: %i (Slot #%i, Sub idx #%i, Aug idx #%i), Item: %i (%s), Charges: %i", + scope_prefix[scopeIndex], + INVALID_INDEX, + ((scopeBit & peekWorld) ? INVALID_INDEX : EQEmu::InventoryProfile::CalcSlotId(indexMain, indexSub)), + indexSub, + indexAug, + ((item_data == nullptr) ? 0 : item_data->ID), + linker.GenerateLink().c_str(), + ((inst_sub == nullptr) ? 0 : inst_sub->GetCharges()) + ); + } + } + } } - else { - int cursorDepth = 0; - for (auto it = targetClient->GetInv().cursor_cbegin(); (it != targetClient->GetInv().cursor_cend()); ++it, ++cursorDepth) { + + if ((scopeBit & peekEquip) && (targetClient->ClientVersion() >= EQEmu::versions::ClientVersion::SoF)) { + inst_main = targetClient->GetInv().GetItem(EQEmu::inventory::slotPowerSource); + if (inst_main) { + itemsFound = true; + item_data = inst_main->GetItem(); + } + else { + item_data = nullptr; + } + + linker.SetItemInst(inst_main); + + c->Message( + (item_data == nullptr), + "%sSlot: %i, Item: %i (%s), Charges: %i", + scope_prefix[scopeIndex], + EQEmu::inventory::slotPowerSource, + ((item_data == nullptr) ? 0 : item_data->ID), + linker.GenerateLink().c_str(), + ((inst_main == nullptr) ? 0 : inst_main->GetCharges()) + ); + + if (inst_main && inst_main->IsClassCommon()) { + for (uint8 indexAug = EQEmu::inventory::socketBegin; indexAug < EQEmu::inventory::SocketCount; ++indexAug) { + inst_aug = inst_main->GetItem(indexAug); + if (!inst_aug) // extant only + continue; + + item_data = inst_aug->GetItem(); + linker.SetItemInst(inst_aug); + + c->Message( + (item_data == nullptr), + ".%sAugSlot: %i (Slot #%i, Aug idx #%i), Item: %i (%s), Charges: %i", + scope_prefix[scopeIndex], + INVALID_INDEX, + EQEmu::inventory::slotPowerSource, + indexAug, + ((item_data == nullptr) ? 0 : item_data->ID), + linker.GenerateLink().c_str(), + ((inst_sub == nullptr) ? 0 : inst_sub->GetCharges()) + ); + } + } + } + + if (scopeBit & peekLimbo) { + int limboIndex = 0; + for (auto it = targetClient->GetInv().cursor_cbegin(); (it != targetClient->GetInv().cursor_cend()); ++it, ++limboIndex) { + if (it == targetClient->GetInv().cursor_cbegin()) + continue; + inst_main = *it; - item_data = (inst_main == nullptr) ? nullptr : inst_main->GetItem(); + if (inst_main) { + itemsFound = true; + item_data = inst_main->GetItem(); + } + else { + item_data = nullptr; + } + linker.SetItemInst(inst_main); - c->Message((item_data == nullptr), "CursorSlot: %i, Depth: %i, Item: %i (%s), Charges: %i", - EQEmu::inventory::slotCursor, cursorDepth, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges())); + c->Message( + (item_data == nullptr), + "%sSlot: %i, Item: %i (%s), Charges: %i", + scope_prefix[scopeIndex], + (8000 + limboIndex), + ((item_data == nullptr) ? 0 : item_data->ID), + linker.GenerateLink().c_str(), + ((inst_main == nullptr) ? 0 : inst_main->GetCharges()) + ); - for (uint8 indexSub = EQEmu::inventory::containerBegin; (cursorDepth == 0) && inst_main && inst_main->IsClassBag() && (indexSub < EQEmu::inventory::ContainerCount); ++indexSub) { + if (inst_main && inst_main->IsClassCommon()) { + for (uint8 indexAug = EQEmu::inventory::socketBegin; indexAug < EQEmu::inventory::SocketCount; ++indexAug) { + inst_aug = inst_main->GetItem(indexAug); + if (!inst_aug) // extant only + continue; + + item_data = inst_aug->GetItem(); + linker.SetItemInst(inst_aug); + + c->Message( + (item_data == nullptr), + ".%sAugSlot: %i (Slot #%i, Aug idx #%i), Item: %i (%s), Charges: %i", + scope_prefix[scopeIndex], + INVALID_INDEX, + (8000 + limboIndex), + indexAug, + ((item_data == nullptr) ? 0 : item_data->ID), + linker.GenerateLink().c_str(), + ((inst_sub == nullptr) ? 0 : inst_sub->GetCharges()) + ); + } + } + + if (!scope_bag[scopeIndex] || !(inst_main && inst_main->IsClassBag())) + continue; + + for (uint8 indexSub = EQEmu::inventory::containerBegin; indexSub < EQEmu::inventory::ContainerCount; ++indexSub) { inst_sub = inst_main->GetItem(indexSub); + if (!inst_sub) + continue; + item_data = (inst_sub == nullptr) ? nullptr : inst_sub->GetItem(); + linker.SetItemInst(inst_sub); - c->Message((item_data == nullptr), " CursorBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i", - EQEmu::InventoryProfile::CalcSlotId(EQEmu::inventory::slotCursor, indexSub), EQEmu::inventory::slotCursor, indexSub, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_sub == nullptr) ? 0 : inst_sub->GetCharges())); + c->Message( + (item_data == nullptr), + "..%sBagSlot: %i (Slot #%i, Bag idx #%i), Item: %i (%s), Charges: %i", + scope_prefix[scopeIndex], + INVALID_INDEX, + (8000 + limboIndex), + indexSub, + ((item_data == nullptr) ? 0 : item_data->ID), + linker.GenerateLink().c_str(), + ((inst_sub == nullptr) ? 0 : inst_sub->GetCharges()) + ); + + if (inst_sub->IsClassCommon()) { + for (uint8 indexAug = EQEmu::inventory::socketBegin; indexAug < EQEmu::inventory::SocketCount; ++indexAug) { + inst_aug = inst_sub->GetItem(indexAug); + if (!inst_aug) // extant only + continue; + + item_data = inst_aug->GetItem(); + linker.SetItemInst(inst_aug); + + c->Message( + (item_data == nullptr), + "...%sAugSlot: %i (Slot #%i, Sub idx #%i, Aug idx #%i), Item: %i (%s), Charges: %i", + scope_prefix[scopeIndex], + INVALID_INDEX, + (8000 + limboIndex), + indexSub, + indexAug, + ((item_data == nullptr) ? 0 : item_data->ID), + linker.GenerateLink().c_str(), + ((inst_sub == nullptr) ? 0 : inst_sub->GetCharges()) + ); + } + } } } } } - // trib - for (int16 indexMain = EQEmu::legacy::TRIBUTE_BEGIN; (scopeWhere & peekTrib) && (indexMain <= EQEmu::legacy::TRIBUTE_END); ++indexMain) { - inst_main = targetClient->GetInv().GetItem(indexMain); - item_data = (inst_main == nullptr) ? nullptr : inst_main->GetItem(); - linker.SetItemInst(inst_main); - - c->Message((item_data == nullptr), "TributeSlot: %i, Item: %i (%s), Charges: %i", - indexMain, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges())); - } - - // bank - for (int16 indexMain = EQEmu::legacy::BANK_BEGIN; (scopeWhere & peekBank) && (indexMain <= EQEmu::legacy::BANK_END); ++indexMain) { - inst_main = targetClient->GetInv().GetItem(indexMain); - item_data = (inst_main == nullptr) ? nullptr : inst_main->GetItem(); - linker.SetItemInst(inst_main); - - c->Message((item_data == nullptr), "BankSlot: %i, Item: %i (%s), Charges: %i", - indexMain, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges())); - - for (uint8 indexSub = EQEmu::inventory::containerBegin; inst_main && inst_main->IsClassBag() && (indexSub < EQEmu::inventory::ContainerCount); ++indexSub) { - inst_sub = inst_main->GetItem(indexSub); - item_data = (inst_sub == nullptr) ? nullptr : inst_sub->GetItem(); - linker.SetItemInst(inst_sub); - - c->Message((item_data == nullptr), " BankBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i", - EQEmu::InventoryProfile::CalcSlotId(indexMain, indexSub), indexMain, indexSub, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_sub == nullptr) ? 0 : inst_sub->GetCharges())); - } - } - - for (int16 indexMain = EQEmu::legacy::SHARED_BANK_BEGIN; (scopeWhere & peekBank) && (indexMain <= EQEmu::legacy::SHARED_BANK_END); ++indexMain) { - inst_main = targetClient->GetInv().GetItem(indexMain); - item_data = (inst_main == nullptr) ? nullptr : inst_main->GetItem(); - linker.SetItemInst(inst_main); - - c->Message((item_data == nullptr), "SharedBankSlot: %i, Item: %i (%s), Charges: %i", - indexMain, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges())); - - for (uint8 indexSub = EQEmu::inventory::containerBegin; inst_main && inst_main->IsClassBag() && (indexSub < EQEmu::inventory::ContainerCount); ++indexSub) { - inst_sub = inst_main->GetItem(indexSub); - item_data = (inst_sub == nullptr) ? nullptr : inst_sub->GetItem(); - linker.SetItemInst(inst_sub); - - c->Message((item_data == nullptr), " SharedBankBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i", - EQEmu::InventoryProfile::CalcSlotId(indexMain, indexSub), indexMain, indexSub, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_sub == nullptr) ? 0 : inst_sub->GetCharges())); - } - } - - // trade - for (int16 indexMain = EQEmu::legacy::TRADE_BEGIN; (scopeWhere & peekTrade) && (indexMain <= EQEmu::legacy::TRADE_END); ++indexMain) { - inst_main = targetClient->GetInv().GetItem(indexMain); - item_data = (inst_main == nullptr) ? nullptr : inst_main->GetItem(); - linker.SetItemInst(inst_main); - - c->Message((item_data == nullptr), "TradeSlot: %i, Item: %i (%s), Charges: %i", - indexMain, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges())); - - for (uint8 indexSub = EQEmu::inventory::containerBegin; inst_main && inst_main->IsClassBag() && (indexSub < EQEmu::inventory::ContainerCount); ++indexSub) { - inst_sub = inst_main->GetItem(indexSub); - item_data = (inst_sub == nullptr) ? nullptr : inst_sub->GetItem(); - linker.SetItemInst(inst_sub); - - c->Message((item_data == nullptr), " TradeBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i", - EQEmu::InventoryProfile::CalcSlotId(indexMain, indexSub), indexMain, indexSub, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_sub == nullptr) ? 0 : inst_sub->GetCharges())); - } - } - - // world - if (scopeWhere & peekWorld) { - Object* objectTradeskill = targetClient->GetTradeskillObject(); - - if (objectTradeskill == nullptr) { - c->Message(1, "No world tradeskill object selected..."); - } - else { - c->Message(0, "[WorldObject DBID: %i (entityid: %i)]", objectTradeskill->GetDBID(), objectTradeskill->GetID()); - - for (int16 indexMain = EQEmu::inventory::slotBegin; indexMain < EQEmu::legacy::TYPE_WORLD_SIZE; ++indexMain) { - inst_main = objectTradeskill->GetItem(indexMain); - item_data = (inst_main == nullptr) ? nullptr : inst_main->GetItem(); - linker.SetItemInst(inst_main); - - c->Message((item_data == nullptr), "WorldSlot: %i, Item: %i (%s), Charges: %i", - (EQEmu::legacy::WORLD_BEGIN + indexMain), ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges())); - - for (uint8 indexSub = EQEmu::inventory::containerBegin; inst_main && inst_main->IsType(EQEmu::item::ItemClassBag) && (indexSub < EQEmu::inventory::ContainerCount); ++indexSub) { - inst_sub = inst_main->GetItem(indexSub); - item_data = (inst_sub == nullptr) ? nullptr : inst_sub->GetItem(); - linker.SetItemInst(inst_sub); - - c->Message((item_data == nullptr), " WorldBagSlot: %i (Slot #%i, Bag #%i), Item: %i (%s), Charges: %i", - INVALID_INDEX, indexMain, indexSub, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_sub == nullptr) ? 0 : inst_sub->GetCharges())); - } - } - } - } + if (!itemsFound) + c->Message(0, "No items found."); } void command_interrogateinv(Client *c, const Seperator *sep) From 0643bf97836aaec6b744dc980b89377da003d773 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 17 Mar 2018 13:43:27 -0400 Subject: [PATCH 140/670] Remove z offset mod in push, wasn't needed --- zone/mob_ai.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 624f07f7f..d40f3ab9a 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -957,7 +957,6 @@ void Mob::ProcessForcedMovement() // this flag won't be set if the mob can't be pushed (rooted etc) if (AI_movement_timer->Check()) { bool bPassed = true; - auto z_off = GetZOffset() / 2.0f; glm::vec3 normal; // no zone map = fucked @@ -965,42 +964,42 @@ void Mob::ProcessForcedMovement() // in front m_CollisionBox[0].x = m_Position.x + 3.0f * g_Math.FastSin(0.0f); m_CollisionBox[0].y = m_Position.y + 3.0f * g_Math.FastCos(0.0f); - m_CollisionBox[0].z = m_Position.z + z_off; + m_CollisionBox[0].z = m_Position.z; // 45 right front m_CollisionBox[1].x = m_Position.x + 3.0f * g_Math.FastSin(64.0f); m_CollisionBox[1].y = m_Position.y + 3.0f * g_Math.FastCos(64.0f); - m_CollisionBox[1].z = m_Position.z + z_off; + m_CollisionBox[1].z = m_Position.z; // to right m_CollisionBox[2].x = m_Position.x + 3.0f * g_Math.FastSin(128.0f); m_CollisionBox[2].y = m_Position.y + 3.0f * g_Math.FastCos(128.0f); - m_CollisionBox[2].z = m_Position.z + z_off; + m_CollisionBox[2].z = m_Position.z; // 45 right back m_CollisionBox[3].x = m_Position.x + 3.0f * g_Math.FastSin(192.0f); m_CollisionBox[3].y = m_Position.y + 3.0f * g_Math.FastCos(192.0f); - m_CollisionBox[3].z = m_Position.z + z_off; + m_CollisionBox[3].z = m_Position.z; // behind m_CollisionBox[4].x = m_Position.x + 3.0f * g_Math.FastSin(256.0f); m_CollisionBox[4].y = m_Position.y + 3.0f * g_Math.FastCos(256.0f); - m_CollisionBox[4].z = m_Position.z + z_off; + m_CollisionBox[4].z = m_Position.z; // 45 left back m_CollisionBox[5].x = m_Position.x + 3.0f * g_Math.FastSin(320.0f); m_CollisionBox[5].y = m_Position.y + 3.0f * g_Math.FastCos(320.0f); - m_CollisionBox[5].z = m_Position.z + z_off; + m_CollisionBox[5].z = m_Position.z; // to left m_CollisionBox[6].x = m_Position.x + 3.0f * g_Math.FastSin(384.0f); m_CollisionBox[6].y = m_Position.y + 3.0f * g_Math.FastCos(384.0f); - m_CollisionBox[6].z = m_Position.z + z_off; + m_CollisionBox[6].z = m_Position.z; // 45 left front m_CollisionBox[7].x = m_Position.x + 3.0f * g_Math.FastSin(448.0f); m_CollisionBox[7].y = m_Position.y + 3.0f * g_Math.FastCos(448.0f); - m_CollisionBox[7].z = m_Position.z + z_off; + m_CollisionBox[7].z = m_Position.z; // collision happened, need to move along the wall float distance = 0.0f, shortest = std::numeric_limits::infinity(); From c29bdd4b1def801614b366c773299431ed553547 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 17 Mar 2018 14:29:11 -0400 Subject: [PATCH 141/670] Add a sanity check to prevent mobs climbing steep walls Ex. in OMM's room in anguish --- zone/mob_ai.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index d40f3ab9a..134beee0a 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1023,6 +1023,8 @@ void Mob::ProcessForcedMovement() pLastChange = Timer::GetCurrentTime(); FixZ(); // so we teleport to the ground locally, we want the client to interpolate falling etc } else if (--ForcedMovement) { + if (normal.z < -0.15f) // prevent too much wall climbing. ex. OMM's room in anguish + normal.z = 0.0f; auto proj = glm::proj(static_cast(m_Delta), normal); m_Delta.x -= proj.x; m_Delta.y -= proj.y; From 135cfd76170fce8f0dd820ae31333ad751315116 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Mon, 19 Mar 2018 00:13:57 -0400 Subject: [PATCH 142/670] Revert "Revert changes to melee push until the generic push processing is better" This reverts commit 49089f75374f552bf6c860b567810b96ee403a91. --- zone/attack.cpp | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/zone/attack.cpp b/zone/attack.cpp index 90a774550..26121134e 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -3622,24 +3622,10 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const a->force = 0.0f; // 2013 change that disabled NPC vs NPC push else a->force *= 0.10f; // force against NPCs is divided by 10 I guess? ex bash is 0.3, parsed 0.03 against an NPC - } - // update NPC stuff - if (a->force != 0.0f) { - auto new_pos = glm::vec3( - m_Position.x + (a->force * g_Math.FastSin(a->hit_heading) + m_Delta.x), - m_Position.y + (a->force * g_Math.FastCos(a->hit_heading) + m_Delta.y), m_Position.z); - if ((!IsNPC() || position_update_melee_push_timer.Check()) && zone->zonemap && - zone->zonemap->CheckLoS( - glm::vec3(m_Position), - new_pos)) { // If we have LoS on the new loc it should be reachable. - if (IsNPC()) { - // Is this adequate? - - Teleport(new_pos); - SendPositionUpdate(); - } - } else { - a->force = 0.0f; // we couldn't move there, so lets not + if (ForcedMovement == 0 && a->force != 0.0f && position_update_melee_push_timer.Check()) { + m_Delta.x += a->force * g_Math.FastSin(a->hit_heading); + m_Delta.y += a->force * g_Math.FastCos(a->hit_heading); + ForcedMovement = 3; } } } From 70922975cfdeffd45cfea0fa6b45576dd70e1276 Mon Sep 17 00:00:00 2001 From: Uleat Date: Mon, 19 Mar 2018 20:58:13 -0400 Subject: [PATCH 143/670] Test code for tracing zone crashes (stage 2) --- zone/client.cpp | 20 ++++++++++++++++++++ zone/client_packet.cpp | 7 +------ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/zone/client.cpp b/zone/client.cpp index 16157c807..717b1afdb 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -7578,7 +7578,27 @@ void Client::JoinGroupXTargets(Group *g) if (!g) return; + // test code for merge crashes - hopefully gcc won't optimize these out... + auto c1 = GetXTargetAutoMgr()->get_list().empty(); + auto c2 = GetXTargetAutoMgr()->get_list().size(); + auto c3 = GetXTargetAutoMgr()->get_list().begin(); + auto c4 = GetXTargetAutoMgr()->get_list().end(); + auto c5 = GetXTargetAutoMgr()->get_list().rbegin(); + auto c6 = GetXTargetAutoMgr()->get_list().rend(); + + auto g1 = g->GetXTargetAutoMgr()->get_list().empty(); + auto g2 = g->GetXTargetAutoMgr()->get_list().size(); + auto g3 = g->GetXTargetAutoMgr()->get_list().begin(); + auto g4 = g->GetXTargetAutoMgr()->get_list().end(); + auto g5 = g->GetXTargetAutoMgr()->get_list().rbegin(); + auto g6 = g->GetXTargetAutoMgr()->get_list().rend(); + if (!GetXTargetAutoMgr()->empty()) { + Log(Logs::Detail, Logs::Error, "XTarget Merge[clt] empty=%s, size=%u, begin=0x%X, end=0x%X, rbegin=0x%X, rend=0x%X", + (c1?"true":"false"), c2, c3, c4, c5, c6); + Log(Logs::Detail, Logs::Error, "XTarget Merge[grp] empty=%s, size=%u, begin=0x%X, end=0x%X, rbegin=0x%X, rend=0x%X", + (g1?"true":"false"), g2, g3, g4, g5, g6); + g->GetXTargetAutoMgr()->merge(*GetXTargetAutoMgr()); GetXTargetAutoMgr()->clear(); RemoveAutoXTargets(); diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index e686784ce..fe8af2a98 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -6728,12 +6728,7 @@ void Client::Handle_OP_GroupFollow2(const EQApplicationPacket *app) // Inviter and Invitee are in the same zone if (inviter != nullptr && inviter->IsClient()) { - if (!inviter->CastToClient()->Connected()) - { - Log(Logs::General, Logs::Error, "%s attempted to join group while leader %s was zoning.", GetName(), inviter->GetName()); - Message(13, "Bubba said you can't follow him."); - } - else if (GroupFollow(inviter->CastToClient())) + if (GroupFollow(inviter->CastToClient())) { strn0cpy(gf->name1, inviter->GetName(), sizeof(gf->name1)); strn0cpy(gf->name2, GetName(), sizeof(gf->name2)); From dbdad8096021d1aff47207ee29f8122609284b96 Mon Sep 17 00:00:00 2001 From: Uleat Date: Mon, 19 Mar 2018 22:00:12 -0400 Subject: [PATCH 144/670] Fix gcc error - report is non-critical portion of test --- zone/client.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zone/client.cpp b/zone/client.cpp index 717b1afdb..cd2c7d478 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -7594,10 +7594,10 @@ void Client::JoinGroupXTargets(Group *g) auto g6 = g->GetXTargetAutoMgr()->get_list().rend(); if (!GetXTargetAutoMgr()->empty()) { - Log(Logs::Detail, Logs::Error, "XTarget Merge[clt] empty=%s, size=%u, begin=0x%X, end=0x%X, rbegin=0x%X, rend=0x%X", - (c1?"true":"false"), c2, c3, c4, c5, c6); - Log(Logs::Detail, Logs::Error, "XTarget Merge[grp] empty=%s, size=%u, begin=0x%X, end=0x%X, rbegin=0x%X, rend=0x%X", - (g1?"true":"false"), g2, g3, g4, g5, g6); + Log(Logs::Detail, Logs::Error, "XTarget Merge[clt] empty=%s, size=%u, (begin==end)=%s, (rbegin==rend)=%s", + (c1?"true":"false"), c2, (c3==c4?"true":"false"), (c5==c6?"true":"false")); + Log(Logs::Detail, Logs::Error, "XTarget Merge[grp] empty=%s, size=%u, (begin==end)=%s, (rbegin==rend)=%s", + (g1?"true":"false"), g2, (g3==g4?"true":"false"), (g5==g6?"true":"false")); g->GetXTargetAutoMgr()->merge(*GetXTargetAutoMgr()); GetXTargetAutoMgr()->clear(); From 4ee35d7e56c52ac624a6c774da29ef29ab00ca0c Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Tue, 20 Mar 2018 14:35:52 -0400 Subject: [PATCH 145/670] Add default size function --- common/races.cpp | 116 +++++++++++++++++++++++++++++++++++++++++++++++ common/races.h | 2 + zone/npc.cpp | 3 ++ 3 files changed, 121 insertions(+) diff --git a/common/races.cpp b/common/races.cpp index 9d5fbdda0..1e4d88664 100644 --- a/common/races.cpp +++ b/common/races.cpp @@ -1488,6 +1488,122 @@ uint16 GetRaceIDFromPlayerRaceBit(uint32 player_race_bit) } } +float GetRaceGenderDefaultHeight(int race, int gender) +{ + static float male_height[] = { + 6.0f, 6.0f, 7.0f, 6.0f, 5.0f, 6.0f, 5.0f, 5.5f, 4.0f, 8.0f, 9.0f, 3.5f, 3.0f, 6.0f, 6.0f, + 2.0f, 8.5f, 8.0f, 21.0f, 20.0f, 6.0f, 6.0f, 3.5f, 3.0f, 6.0f, 2.0f, 5.0f, 5.0f, 6.0f, 6.0f, + 6.0f, 7.5f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 5.0f, 6.0f, 6.0f, 7.0f, 4.0f, 4.7f, 6.0f, + 8.0f, 3.0f, 12.0f, 5.0f, 21.0f, 6.0f, 6.0f, 3.0f, 9.0f, 6.0f, 6.0f, 2.0f, 6.0f, 3.0f, 6.0f, + 4.0f, 20.0f, 5.0f, 5.0f, 6.0f, 9.0f, 25.0f, 6.0f, 6.0f, 10.0f, 6.0f, 6.0f, 6.0f, 6.0f, 2.5f, + 7.0f, 6.0f, 5.0f, 6.0f, 1.5f, 1.0f, 3.5f, 7.0f, 6.0f, 6.0f, 6.0f, 6.0f, 7.0f, 3.0f, 3.0f, + 7.0f, 12.0f, 8.0f, 9.0f, 4.0f, 11.5f, 8.0f, 6.0f, 6.0f, 12.0f, 6.0f, 6.0f, 6.0f, 20.0f, 10.0f, + 6.5f, 6.0f, 17.0f, 1.0f, 4.0f, 6.0f, 8.0f, 5.0f, 1.0f, 6.0f, 6.0f, 5.0f, 5.0f, 5.0f, 9.0f, + 3.0f, 8.0f, 2.0f, 24.0f, 6.0f, 10.0f, 6.0f, 6.0f, 6.0f, 3.0f, 7.0f, 9.0f, 6.0f, 11.0f, 2.5f, + 14.0f, 8.0f, 7.0f, 12.0f, 6.0f, 27.0f, 6.0f, 6.0f, 6.0f, 6.0f, 2.0f, 9.0f, 9.0f, 6.0f, 9.0f, + 3.0f, 3.0f, 6.0f, 6.0f, 10.0f, 6.0f, 6.0f, 15.0f, 15.0f, 9.0f, 7.0f, 6.0f, 6.0f, 7.0f, 8.0f, + 3.0f, 3.0f, 6.0f, 7.0f, 13.0f, 6.0f, 6.0f, 9.0f, 5.0f, 7.0f, 9.0f, 6.0f, 6.0f, 8.0f, 6.0f, + 6.0f, 5.5f, 6.0f, 4.0f, 25.0f, 6.0f, 6.0f, 6.0f, 22.0f, 20.0f, 6.0f, 10.0f, 13.5f, 12.0f, 3.0f, + 30.0f, 6.0f, 6.0f, 35.0f, 1.5f, 8.0f, 3.0f, 6.0f, 2.0f, 6.0f, 6.0f, 5.0f, 2.0f, 7.0f, 6.0f, + 6.0f, 6.0f, 6.0f, 4.0f, 6.0f, 6.0f, 6.0f, 8.0f, 8.0f, 7.0f, 8.0f, 6.0f, 7.0f, 6.0f, 7.0f, + 6.0f, 10.0f, 3.0f, 6.0f, 8.0f, 9.0f, 15.0f, 5.0f, 10.0f, 7.0f, 6.0f, 7.0f, 6.0f, 7.0f, 7.0f, + 12.0f, 6.0f, 4.0f, 6.0f, 5.0f, 3.0f, 30.0f, 30.0f, 15.0f, 20.0f, 6.0f, 10.0f, 6.0f, 14.0f, 14.0f, + 16.0f, 15.0f, 30.0f, 15.0f, 7.5f, 5.0f, 4.0f, 6.0f, 15.0f, 6.5f, 3.0f, 12.0f, 10.0f, 10.5f, 10.0f, + 7.5f, 6.0f, 6.0f, 12.5f, 9.0f, 20.0f, 2.0f, 10.0f, 25.0f, 8.0f, 6.0f, 6.0f, 10.0f, 18.0f, 45.0f, + 13.0f, 15.0f, 8.0f, 30.0f, 25.0f, 25.0f, 10.0f, 13.0f, 5.0f, 3.5f, 15.0f, 35.0f, 11.0f, 15.0f, 50.0f, + 13.0f, 6.0f, 7.0f, 6.0f, 60.0f, 6.0f, 22.0f, 22.0f, 21.0f, 22.0f, 15.0f, 25.0f, 23.0f, 8.0f, 15.0f, + 10.0f, 6.0f, 7.0f, 6.0f, 12.0f, 9.5f, 6.0f, 12.0f, 12.0f, 12.0f, 15.0f, 4.0f, 5.0f, 105.0f, 20.0f, + 5.0f, 10.0f, 10.0f, 10.0f, 20.0f, 13.5f, 8.0f, 10.0f, 3.0f, 5.0f, 9.0f, 6.0f, 6.0f, 6.0f, 10.0f, + 8.0f, 8.0f, 8.0f, 6.0f, 6.0f, 5.0f, 5.0f, 5.0f, 9.0f, 9.0f, 9.0f, 6.0f, 8.5f, 6.0f, 7.0f, + 8.0f, 7.0f, 11.0f, 6.0f, 7.0f, 9.0f, 8.0f, 6.0f, 8.0f, 6.0f, 6.0f, 6.0f, 6.0f, 9.0f, 10.0f, + 6.0f, 3.0f, 4.0f, 3.0f, 3.0f, 4.0f, 10.0f, 10.0f, 2.0f, 8.0f, 6.0f, 6.0f, 14.0f, 7.0f, 5.0f, + 9.0f, 7.0f, 7.0f, 10.0f, 10.0f, 12.0f, 9.0f, 7.0f, 12.0f, 13.0f, 16.0f, 6.0f, 9.0f, 6.0f, 6.0f, + 10.0f, 25.0f, 15.0f, 6.0f, 25.0f, 6.0f, 6.0f, 8.0f, 11.0f, 6.0f, 9.0f, 2.0f, 6.0f, 5.0f, 4.0f, + 8.5f, 6.0f, 6.0f, 6.0f, 4.0f, 6.0f, 15.0f, 1.0f, 2.0f, 6.0f, 40.0f, 8.0f, 12.0f, 3.0f, 8.0f, + 99.0f, 9.0f, 100.0f, 100.0f, 10.0f, 6.0f, 27.5f, 20.0f, 6.0f, 6.0f, 5.0f, 6.0f, 8.0f, 5.0f, 3.0f, + 11.5f, 25.0f, 80.0f, 20.0f, 9.0f, 8.0f, 5.0f, 4.0f, 7.0f, 10.0f, 6.0f, 11.0f, 8.0f, 5.0f, 6.0f, + 6.0f, 30.0f, 7.0f, 15.0f, 9.0f, 6.0f, 9.0f, 6.0f, 3.0f, 32.5f, 15.0f, 7.5f, 10.0f, 10.0f, 6.0f, + 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 9.0f, 20.0f, 6.0f, 6.0f, 6.0f, 25.0f, 12.0f, 6.0f, 8.0f, 6.0f, + 6.0f, 20.0f, 10.0f, 8.0f, 12.0f, 8.0f, 2.0f, 6.0f, 3.0f, 6.0f, 7.0f, 1.5f, 6.0f, 3.0f, 3.0f, + 3.0f, 3.0f, 2.0f, 3.0f, 3.0f, 6.0f, 6.0f, 6.0f, 4.5f, 7.0f, 6.0f, 7.0f, 6.0f, 22.0f, 8.0f, + 15.0f, 22.0f, 8.0f, 15.0f, 6.0f, 80.0f, 150.0f, 7.0f, 6.0f, 6.0f, 6.0f, 12.0f, 6.0f, 6.0f, 6.0f, + 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 35.0f, 20.0f, 9.0f, 6.0f, 6.0f, 6.0f, 20.0f, 20.0f, + 20.0f, 20.0f, 20.0f, 9.0f, 4.0f, 4.0f, 10.0f, 5.0f, 8.0f, 6.0f, 10.0f, 6.0f, 6.0f, 2.0f, 36.0f, + 14.0f, 7.0f, 250.0f, 6.0f, 9.0f, 6.0f, 7.0f, 4.0f, 6.0f, 8.0f, 6.0f, 23.0f, 6.0f, 6.0f, 6.0f, + 70.0f, 6.0f, 7.0f, 6.0f, 6.0f, 6.0f, 20.0f, 6.0f, 6.0f, 6.0f, 5.0f, 1.0f, 6.0f, 6.0f, 6.0f, + 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, + 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, + 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, + 4.0f, 4.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 10.0f, 6.0f, 6.0f, 6.0f, + 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, + 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, + 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 7.0f, 7.0f, 7.0f, 7.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 8.0f, + 6.0f, 6.0f, 6.0f, 7.0f, 6.0f, 6.0f, 6.0f, 7.5f, 6.0f, 6.0f, 4.0f, 6.0f, 3.0f, 6.0f, 6.0f, + 1.0f, 9.0f, 7.0f, 8.0f, 7.0f, 8.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 8.0f, + }; + + static float female_height[] = { + 6.0f, 6.0f, 7.0f, 6.0f, 5.0f, 6.0f, 5.0f, 5.5f, 4.0f, 8.0f, 9.0f, 3.5f, 3.0f, 6.0f, 6.0f, + 2.0f, 8.5f, 8.0f, 21.0f, 20.0f, 6.0f, 6.0f, 3.5f, 3.0f, 6.0f, 2.0f, 5.0f, 5.0f, 6.0f, 6.0f, + 6.0f, 7.5f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 5.0f, 6.0f, 6.0f, 7.0f, 4.0f, 4.7f, 6.0f, + 8.0f, 3.0f, 12.0f, 5.0f, 21.0f, 6.0f, 6.0f, 3.0f, 9.0f, 6.0f, 6.0f, 2.0f, 6.0f, 3.0f, 6.0f, + 4.0f, 20.0f, 5.0f, 5.0f, 6.0f, 9.0f, 25.0f, 6.0f, 6.0f, 10.0f, 6.0f, 6.0f, 6.0f, 6.0f, 2.5f, + 7.0f, 6.0f, 5.0f, 6.0f, 1.5f, 1.0f, 3.5f, 7.0f, 6.0f, 6.0f, 6.0f, 6.0f, 7.0f, 3.0f, 3.0f, + 7.0f, 12.0f, 8.0f, 9.0f, 4.0f, 11.5f, 8.0f, 6.0f, 6.0f, 12.0f, 6.0f, 6.0f, 6.0f, 20.0f, 10.0f, + 6.5f, 6.0f, 17.0f, 1.0f, 4.0f, 6.0f, 8.0f, 5.0f, 1.0f, 6.0f, 6.0f, 5.0f, 5.0f, 5.0f, 9.0f, + 3.0f, 8.0f, 2.0f, 24.0f, 6.0f, 10.0f, 6.0f, 6.0f, 6.0f, 3.0f, 7.0f, 9.0f, 6.0f, 11.0f, 2.5f, + 14.0f, 8.0f, 7.0f, 12.0f, 6.0f, 27.0f, 6.0f, 6.0f, 6.0f, 6.0f, 2.0f, 9.0f, 9.0f, 6.0f, 9.0f, + 3.0f, 3.0f, 6.0f, 6.0f, 10.0f, 6.0f, 6.0f, 15.0f, 15.0f, 9.0f, 7.0f, 6.0f, 6.0f, 7.0f, 8.0f, + 3.0f, 3.0f, 6.0f, 7.0f, 13.0f, 6.0f, 6.0f, 9.0f, 5.0f, 7.0f, 9.0f, 6.0f, 6.0f, 8.0f, 6.0f, + 6.0f, 5.5f, 6.0f, 4.0f, 25.0f, 6.0f, 6.0f, 6.0f, 22.0f, 20.0f, 6.0f, 10.0f, 13.5f, 12.0f, 3.0f, + 30.0f, 6.0f, 6.0f, 35.0f, 1.5f, 8.0f, 3.0f, 6.0f, 2.0f, 6.0f, 6.0f, 5.0f, 2.0f, 7.0f, 6.0f, + 6.0f, 6.0f, 6.0f, 4.0f, 6.0f, 6.0f, 6.0f, 8.0f, 8.0f, 7.0f, 8.0f, 6.0f, 7.0f, 6.0f, 7.0f, + 6.0f, 10.0f, 3.0f, 6.0f, 8.0f, 9.0f, 15.0f, 5.0f, 10.0f, 7.0f, 6.0f, 7.0f, 6.0f, 7.0f, 7.0f, + 12.0f, 6.0f, 4.0f, 6.0f, 5.0f, 3.0f, 30.0f, 30.0f, 15.0f, 20.0f, 6.0f, 10.0f, 6.0f, 14.0f, 14.0f, + 16.0f, 15.0f, 30.0f, 15.0f, 7.5f, 5.0f, 4.0f, 6.0f, 15.0f, 6.5f, 3.0f, 12.0f, 10.0f, 10.5f, 10.0f, + 7.5f, 6.0f, 6.0f, 12.5f, 9.0f, 20.0f, 2.0f, 10.0f, 25.0f, 8.0f, 6.0f, 6.0f, 10.0f, 18.0f, 45.0f, + 13.0f, 15.0f, 8.0f, 30.0f, 25.0f, 25.0f, 10.0f, 13.0f, 5.0f, 3.5f, 15.0f, 35.0f, 11.0f, 15.0f, 50.0f, + 13.0f, 6.0f, 7.0f, 6.0f, 60.0f, 6.0f, 22.0f, 22.0f, 21.0f, 22.0f, 15.0f, 25.0f, 23.0f, 8.0f, 15.0f, + 10.0f, 6.0f, 7.0f, 6.0f, 12.0f, 9.5f, 6.0f, 12.0f, 12.0f, 12.0f, 15.0f, 4.0f, 5.0f, 105.0f, 20.0f, + 5.0f, 10.0f, 10.0f, 10.0f, 20.0f, 13.5f, 8.0f, 10.0f, 3.0f, 5.0f, 9.0f, 6.0f, 6.0f, 6.0f, 10.0f, + 8.0f, 8.0f, 8.0f, 6.0f, 6.0f, 5.0f, 5.0f, 5.0f, 9.0f, 9.0f, 9.0f, 6.0f, 8.5f, 6.0f, 7.0f, + 8.0f, 7.0f, 11.0f, 6.0f, 7.0f, 9.0f, 8.0f, 6.0f, 8.0f, 6.0f, 6.0f, 6.0f, 6.0f, 9.0f, 10.0f, + 6.0f, 3.0f, 4.0f, 3.0f, 3.0f, 4.0f, 10.0f, 10.0f, 2.0f, 8.0f, 6.0f, 6.0f, 14.0f, 7.0f, 5.0f, + 9.0f, 7.0f, 7.0f, 10.0f, 10.0f, 12.0f, 9.0f, 7.0f, 12.0f, 13.0f, 16.0f, 6.0f, 9.0f, 6.0f, 6.0f, + 10.0f, 25.0f, 15.0f, 6.0f, 25.0f, 6.0f, 6.0f, 8.0f, 11.0f, 6.0f, 9.0f, 2.0f, 6.0f, 5.0f, 4.0f, + 8.5f, 6.0f, 6.0f, 6.0f, 4.0f, 6.0f, 15.0f, 1.0f, 2.0f, 6.0f, 40.0f, 8.0f, 12.0f, 3.0f, 8.0f, + 99.0f, 9.0f, 100.0f, 100.0f, 10.0f, 6.0f, 27.5f, 20.0f, 6.0f, 6.0f, 5.0f, 6.0f, 8.0f, 5.0f, 3.0f, + 11.5f, 25.0f, 80.0f, 20.0f, 9.0f, 8.0f, 5.0f, 4.0f, 7.0f, 10.0f, 6.0f, 11.0f, 8.0f, 5.0f, 6.0f, + 6.0f, 30.0f, 7.0f, 15.0f, 9.0f, 6.0f, 9.0f, 6.0f, 3.0f, 32.5f, 15.0f, 7.5f, 10.0f, 10.0f, 6.0f, + 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 9.0f, 20.0f, 6.0f, 6.0f, 6.0f, 25.0f, 12.0f, 6.0f, 8.0f, 6.0f, + 6.0f, 20.0f, 9.0f, 8.0f, 12.0f, 8.0f, 2.0f, 6.0f, 3.0f, 6.0f, 7.0f, 1.5f, 6.0f, 3.0f, 3.0f, + 3.0f, 3.0f, 2.0f, 3.0f, 3.0f, 6.0f, 6.0f, 6.0f, 4.5f, 7.0f, 6.0f, 7.0f, 5.7f, 22.0f, 8.0f, + 15.0f, 22.0f, 8.0f, 15.0f, 6.0f, 80.0f, 150.0f, 7.0f, 6.0f, 6.0f, 6.0f, 12.0f, 6.0f, 6.0f, 6.0f, + 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 35.0f, 20.0f, 9.0f, 6.0f, 6.0f, 6.0f, 20.0f, 20.0f, + 20.0f, 20.0f, 20.0f, 9.0f, 4.0f, 4.0f, 10.0f, 5.0f, 8.0f, 6.0f, 10.0f, 5.7f, 6.0f, 2.0f, 36.0f, + 14.0f, 7.0f, 250.0f, 6.0f, 9.0f, 6.0f, 7.0f, 4.0f, 6.0f, 8.0f, 6.0f, 23.0f, 6.0f, 6.0f, 6.0f, + 70.0f, 6.0f, 7.0f, 6.0f, 6.0f, 6.0f, 20.0f, 6.0f, 6.0f, 6.0f, 5.0f, 1.0f, 6.0f, 6.0f, 6.0f, + 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, + 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, + 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, + 4.0f, 4.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 10.0f, 6.0f, 6.0f, 6.0f, + 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, + 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, + 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 7.0f, 7.0f, 7.0f, 7.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 8.0f, + 6.0f, 6.0f, 6.0f, 7.0f, 6.0f, 6.0f, 6.0f, 7.5f, 6.0f, 6.0f, 4.0f, 6.0f, 3.0f, 6.0f, 6.0f, + 1.0f, 9.0f, 7.0f, 8.0f, 7.0f, 8.0f, 6.0f, 6.0f, 6.0f, 6.0f, 6.0f, 8.0f, + }; + + const auto size = sizeof(male_height) / sizeof(male_height[0]); + + if (race > size) + return 6.0f; + + if (gender == 1) + return female_height[race]; + + return male_height[race]; +} // PlayerAppearance prep #define HUMAN_MALE ((HUMAN << 8) | MALE) diff --git a/common/races.h b/common/races.h index 04fdbbd32..4f4eea1cc 100644 --- a/common/races.h +++ b/common/races.h @@ -858,6 +858,8 @@ uint32 GetPlayerRaceBit(uint16 race_id); uint16 GetRaceIDFromPlayerRaceValue(uint32 player_race_value); uint16 GetRaceIDFromPlayerRaceBit(uint32 player_race_bit); +float GetRaceGenderDefaultHeight(int race, int gender); + // player race-/gender-based model feature validators namespace PlayerAppearance diff --git a/zone/npc.cpp b/zone/npc.cpp index c872fb680..b9aec3abb 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -135,6 +135,9 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, const glm::vec4& position, int if respawn2 = in_respawn; swarm_timer.Disable(); + if (size < 0.0f) + size = GetRaceGenderDefaultHeight(race, gender); + taunting = false; proximity = nullptr; copper = 0; From 3e1b86a7c3ec42015c97ee4bbe8a72220890b43c Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 24 Mar 2018 15:24:54 -0400 Subject: [PATCH 146/670] Fix lua/perl set_proximity to accept flag for say prox This will fix proximity say to always work --- zone/embparser_api.cpp | 7 +++++-- zone/lua_general.cpp | 5 +++++ zone/questmgr.cpp | 3 ++- zone/questmgr.h | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/zone/embparser_api.cpp b/zone/embparser_api.cpp index 0c8ef58b9..3026358c4 100644 --- a/zone/embparser_api.cpp +++ b/zone/embparser_api.cpp @@ -1543,7 +1543,7 @@ XS(XS__set_proximity) { dXSARGS; if (items != 4 && items != 6) - Perl_croak(aTHX_ "Usage: set_proximity(min_x, max_x, min_y, max_y [, min_z, max_z])"); + Perl_croak(aTHX_ "Usage: set_proximity(min_x, max_x, min_y, max_y [, min_z, max_z], [say])"); float min_x = (float)SvNV(ST(0)); float max_x = (float)SvNV(ST(1)); @@ -1555,7 +1555,10 @@ XS(XS__set_proximity) else { float min_z = (float)SvNV(ST(4)); float max_z = (float)SvNV(ST(5)); - quest_manager.set_proximity(min_x, max_x, min_y, max_y, min_z, max_z); + bool bSay = false; + if (items == 7) + bSay = (bool)SvTRUE(ST(6)); + quest_manager.set_proximity(min_x, max_x, min_y, max_y, min_z, max_z, bSay); } XSRETURN_EMPTY; diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp index ec22fec1b..55f00bcf1 100644 --- a/zone/lua_general.cpp +++ b/zone/lua_general.cpp @@ -493,6 +493,10 @@ void lua_set_proximity(float min_x, float max_x, float min_y, float max_y, float quest_manager.set_proximity(min_x, max_x, min_y, max_y, min_z, max_z); } +void lua_set_proximity(float min_x, float max_x, float min_y, float max_y, float min_z, float max_z, bool say) { + quest_manager.set_proximity(min_x, max_x, min_y, max_y, min_z, max_z, say); +} + void lua_clear_proximity() { quest_manager.clear_proximity(); } @@ -1581,6 +1585,7 @@ luabind::scope lua_register_general() { luabind::def("respawn", &lua_respawn), luabind::def("set_proximity", (void(*)(float,float,float,float))&lua_set_proximity), luabind::def("set_proximity", (void(*)(float,float,float,float,float,float))&lua_set_proximity), + luabind::def("set_proximity", (void(*)(float,float,float,float,float,float,bool))&lua_set_proximity), luabind::def("clear_proximity", &lua_clear_proximity), luabind::def("enable_proximity_say", &lua_enable_proximity_say), luabind::def("disable_proximity_say", &lua_disable_proximity_say), diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index 569afcd42..f0276e25b 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -1670,7 +1670,7 @@ void QuestManager::respawn(int npcTypeID, int grid) { } } -void QuestManager::set_proximity(float minx, float maxx, float miny, float maxy, float minz, float maxz) { +void QuestManager::set_proximity(float minx, float maxx, float miny, float maxy, float minz, float maxz, bool bSay) { QuestManagerCurrentQuestVars(); if (!owner || !owner->IsNPC()) return; @@ -1683,6 +1683,7 @@ void QuestManager::set_proximity(float minx, float maxx, float miny, float maxy, owner->CastToNPC()->proximity->max_y = maxy; owner->CastToNPC()->proximity->min_z = minz; owner->CastToNPC()->proximity->max_z = maxz; + owner->CastToNPC()->proximity->say = bSay; } void QuestManager::clear_proximity() { diff --git a/zone/questmgr.h b/zone/questmgr.h index 0c846c013..df0f0b669 100644 --- a/zone/questmgr.h +++ b/zone/questmgr.h @@ -150,7 +150,7 @@ public: void setnexthpevent(int at); void setnextinchpevent(int at); void respawn(int npc_type, int grid); - void set_proximity(float minx, float maxx, float miny, float maxy, float minz=-999999, float maxz=999999); + void set_proximity(float minx, float maxx, float miny, float maxy, float minz=-999999, float maxz=999999, bool bSay = false); void clear_proximity(); void enable_proximity_say(); void disable_proximity_say(); From d08b7dafa4e818f4e87a8dc539c7965d295ece73 Mon Sep 17 00:00:00 2001 From: Kinglykrab Date: Sat, 24 Mar 2018 18:52:20 -0400 Subject: [PATCH 147/670] Export TryMoveAlong() to Perl. --- zone/perl_mob.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/zone/perl_mob.cpp b/zone/perl_mob.cpp index f95deb3de..35f26cfc7 100644 --- a/zone/perl_mob.cpp +++ b/zone/perl_mob.cpp @@ -9039,6 +9039,35 @@ XS(XS_Mob_GetMeleeMitigation) { XSRETURN(1); } +XS(XS_Mob_TryMoveAlong); +XS(XS_Mob_TryMoveAlong) { + dXSARGS; + if (items < 3 || items > 4) + Perl_croak(aTHX_ "Usage: Mob::TryMoveAlong(THIS, distance, angle, send?)"); + { + Mob* THIS; + float distance = (float)SvNV(ST(1)); + float angle = (float)SvNV(ST(2)); + bool send = true; + + if (sv_derived_from(ST(0), "Mob")) { + IV tmp = SvIV((SV*)SvRV(ST(0))); + THIS = INT2PTR(Mob *,tmp); + } + else + Perl_croak(aTHX_ "THIS is not of type Mob"); + + if(THIS == nullptr) + Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); + + if (items == 4) + send = (bool)SvTRUE(ST(3)); + + THIS->TryMoveAlong(distance, angle, send); + } + XSRETURN_EMPTY; +} + #ifdef __cplusplus extern "C" #endif @@ -9373,6 +9402,7 @@ XS(boot_Mob) newXSproto(strcpy(buf, "IsSilenced"), XS_Mob_IsSilenced, file, "$"); newXSproto(strcpy(buf, "IsAmnesiad"), XS_Mob_IsAmnesiad, file, "$"); newXSproto(strcpy(buf, "GetMeleeMitigation"), XS_Mob_GetMeleeMitigation, file, "$"); + newXSproto(strcpy(buf, "TryMoveAlong"), XS_Mob_TryMoveAlong, file, "$$;$"); XSRETURN_YES; } From a5a660b8288682de78e3c908b92db7244530a0c0 Mon Sep 17 00:00:00 2001 From: Kinglykrab Date: Sat, 24 Mar 2018 21:06:56 -0400 Subject: [PATCH 148/670] Fix quest::set_proximity(). --- zone/embparser_api.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/embparser_api.cpp b/zone/embparser_api.cpp index 3026358c4..aacedcf2d 100644 --- a/zone/embparser_api.cpp +++ b/zone/embparser_api.cpp @@ -1542,7 +1542,7 @@ XS(XS__set_proximity); XS(XS__set_proximity) { dXSARGS; - if (items != 4 && items != 6) + if (items != 4 && items != 6 && items != 7) Perl_croak(aTHX_ "Usage: set_proximity(min_x, max_x, min_y, max_y [, min_z, max_z], [say])"); float min_x = (float)SvNV(ST(0)); From aff481bd371da37d9ac3ef1a1287f92754e34f91 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 25 Mar 2018 01:12:22 -0400 Subject: [PATCH 149/670] Fix invalid read in con --- zone/client_packet.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index fe8af2a98..6483c0cb2 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -4833,7 +4833,6 @@ void Client::Handle_OP_Consider(const EQApplicationPacket *app) mod_consider(tmob, con); QueuePacket(outapp); - safe_delete(outapp); // only wanted to check raid target once // and need con to still be around so, do it here! if (tmob->IsRaidTarget()) { @@ -4880,6 +4879,8 @@ void Client::Handle_OP_Consider(const EQApplicationPacket *app) else if ((invisible || invisible_undead || hidden || invisible_animals) && !IsInvisible(tmob)) Message_StringID(10, SUSPECT_SEES_YOU); + safe_delete(outapp); + return; } From 137d2d723d9ff86af9faeaf706267b6a2efb80f0 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 25 Mar 2018 01:16:06 -0400 Subject: [PATCH 150/670] Initialize AISpellVar --- zone/npc.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/zone/npc.cpp b/zone/npc.cpp index b9aec3abb..edd6e5673 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -399,6 +399,19 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, const glm::vec4& position, int if raid_target = d->raid_target; ignore_despawn = d->ignore_despawn; m_targetable = !d->untargetable; + + AISpellVar.fail_recast = RuleI(Spells, AI_SpellCastFinishedFailRecast); + AISpellVar.engaged_no_sp_recast_min = RuleI(Spells, AI_EngagedNoSpellMinRecast); + AISpellVar.engaged_no_sp_recast_max = RuleI(Spells, AI_EngagedNoSpellMaxRecast); + AISpellVar.engaged_beneficial_self_chance = RuleI(Spells, AI_EngagedBeneficialSelfChance); + AISpellVar.engaged_beneficial_other_chance = RuleI(Spells, AI_EngagedBeneficialOtherChance); + AISpellVar.engaged_detrimental_chance = RuleI(Spells, AI_EngagedDetrimentalChance); + AISpellVar.pursue_no_sp_recast_min = RuleI(Spells, AI_PursueNoSpellMinRecast); + AISpellVar.pursue_no_sp_recast_max = RuleI(Spells, AI_PursueNoSpellMaxRecast); + AISpellVar.pursue_detrimental_chance = RuleI(Spells, AI_PursueDetrimentalChance); + AISpellVar.idle_no_sp_recast_min = RuleI(Spells, AI_IdleNoSpellMinRecast); + AISpellVar.idle_no_sp_recast_max = RuleI(Spells, AI_IdleNoSpellMaxRecast); + AISpellVar.idle_beneficial_chance = RuleI(Spells, AI_IdleBeneficialChance); } NPC::~NPC() From 5b5c3a08e62f4ddd2017f4441cb3d5949a4ce38c Mon Sep 17 00:00:00 2001 From: Kinglykrab Date: Sun, 25 Mar 2018 14:33:38 -0400 Subject: [PATCH 151/670] Fix TryMoveAlong() in Perl. - Didn't have 4th option accounted for (my bad). --- zone/perl_mob.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/perl_mob.cpp b/zone/perl_mob.cpp index 35f26cfc7..cb30cf809 100644 --- a/zone/perl_mob.cpp +++ b/zone/perl_mob.cpp @@ -9402,7 +9402,7 @@ XS(boot_Mob) newXSproto(strcpy(buf, "IsSilenced"), XS_Mob_IsSilenced, file, "$"); newXSproto(strcpy(buf, "IsAmnesiad"), XS_Mob_IsAmnesiad, file, "$"); newXSproto(strcpy(buf, "GetMeleeMitigation"), XS_Mob_GetMeleeMitigation, file, "$"); - newXSproto(strcpy(buf, "TryMoveAlong"), XS_Mob_TryMoveAlong, file, "$$;$"); + newXSproto(strcpy(buf, "TryMoveAlong"), XS_Mob_TryMoveAlong, file, "$$$;$"); XSRETURN_YES; } From e4e40505b6abeac1ceb44e3b1a67500e40fd5145 Mon Sep 17 00:00:00 2001 From: Uleat Date: Mon, 26 Mar 2018 03:38:08 -0400 Subject: [PATCH 152/670] Removal of test code --- zone/client.cpp | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/zone/client.cpp b/zone/client.cpp index cd2c7d478..16157c807 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -7578,27 +7578,7 @@ void Client::JoinGroupXTargets(Group *g) if (!g) return; - // test code for merge crashes - hopefully gcc won't optimize these out... - auto c1 = GetXTargetAutoMgr()->get_list().empty(); - auto c2 = GetXTargetAutoMgr()->get_list().size(); - auto c3 = GetXTargetAutoMgr()->get_list().begin(); - auto c4 = GetXTargetAutoMgr()->get_list().end(); - auto c5 = GetXTargetAutoMgr()->get_list().rbegin(); - auto c6 = GetXTargetAutoMgr()->get_list().rend(); - - auto g1 = g->GetXTargetAutoMgr()->get_list().empty(); - auto g2 = g->GetXTargetAutoMgr()->get_list().size(); - auto g3 = g->GetXTargetAutoMgr()->get_list().begin(); - auto g4 = g->GetXTargetAutoMgr()->get_list().end(); - auto g5 = g->GetXTargetAutoMgr()->get_list().rbegin(); - auto g6 = g->GetXTargetAutoMgr()->get_list().rend(); - if (!GetXTargetAutoMgr()->empty()) { - Log(Logs::Detail, Logs::Error, "XTarget Merge[clt] empty=%s, size=%u, (begin==end)=%s, (rbegin==rend)=%s", - (c1?"true":"false"), c2, (c3==c4?"true":"false"), (c5==c6?"true":"false")); - Log(Logs::Detail, Logs::Error, "XTarget Merge[grp] empty=%s, size=%u, (begin==end)=%s, (rbegin==rend)=%s", - (g1?"true":"false"), g2, (g3==g4?"true":"false"), (g5==g6?"true":"false")); - g->GetXTargetAutoMgr()->merge(*GetXTargetAutoMgr()); GetXTargetAutoMgr()->clear(); RemoveAutoXTargets(); From 2d20d5858e5acfad83b17b89eddcf5e775434af5 Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Wed, 28 Mar 2018 16:06:45 -0400 Subject: [PATCH 153/670] Fix for a few of the Cast on Fade effects to make sure the trigger spell hits the correct target type. --- zone/spell_effects.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 5f151e487..1cb376e98 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -3659,7 +3659,7 @@ void Mob::DoBuffTic(const Buffs_Struct &buff, int slot, Mob *caster) case SE_CastOnFadeEffectNPC: case SE_CastOnFadeEffectAlways: { if (buff.ticsremaining == 0) { - SpellOnTarget(spells[buff.spellid].base[i], this); + SpellFinished(spells[buff.spellid].base[i], this, EQEmu::CastingSlot::Item, 0, -1, spells[spells[buff.spellid].base[i]].ResistDiff); } break; } From 0f3fbc3883d86009a6d3de9a5d67a9fcd4a6a866 Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Wed, 28 Mar 2018 17:07:15 -0400 Subject: [PATCH 154/670] Add Change Log message --- changelog.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/changelog.txt b/changelog.txt index f2f200fa6..33848c7d8 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,10 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 03/28/2018 == +Kayen: SE_CastOnFadeEffect, SE_CastOnFadeEffectNPC, SE_CastOnFadeEffectAlway triggered spell will now hit +the correct targets. + + == 03/07/2018 == Uleat: Added command '#ucs' to force a reconnect to UCS server. - Works in place of client auto-reconnect packet in zones where feature is unsupported From e594b7eac60db2ae9edd0f0b5ca5d53836baaa72 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 29 Mar 2018 18:28:36 -0400 Subject: [PATCH 155/670] Fix NPC chance on fishing (100 = 100% chance now) --- zone/forage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/forage.cpp b/zone/forage.cpp index 4dc3bc04f..81dd264bd 100644 --- a/zone/forage.cpp +++ b/zone/forage.cpp @@ -278,7 +278,7 @@ void Client::GoFish() //check for add NPC if (npc_chance > 0 && npc_id) { - if (npc_chance < zone->random.Int(0, 99)) { + if (zone->random.Roll(npc_chance)) { const NPCType *tmp = database.LoadNPCTypesData(npc_id); if (tmp != nullptr) { auto positionNPC = GetPosition(); From 3081f7b24fff7310bf427d72b29cfd3d625c71da Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 8 Apr 2018 18:26:25 -0400 Subject: [PATCH 156/670] Pets/NPCs don't use bane damage Adds rule NPC:UseBaneDamage (defaults to false) --- common/ruletypes.h | 3 ++- zone/attack.cpp | 15 +++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/common/ruletypes.h b/common/ruletypes.h index 6484a8586..f9c3b3c99 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -513,7 +513,8 @@ RULE_INT(NPC, MinorNPCCorpseDecayTimeMS, 450000) //level<55 RULE_INT(NPC, MajorNPCCorpseDecayTimeMS, 1500000) //level>=55 RULE_INT(NPC, CorpseUnlockTimer, 150000) RULE_INT(NPC, EmptyNPCCorpseDecayTimeMS, 0) -RULE_BOOL (NPC, UseItemBonusesForNonPets, true) +RULE_BOOL(NPC, UseItemBonusesForNonPets, true) +RULE_BOOL(NPC, UseBaneDamage, false) RULE_INT(NPC, SayPauseTimeInSec, 5) RULE_INT(NPC, OOCRegen, 0) RULE_BOOL(NPC, BuffFriends, false) diff --git a/zone/attack.cpp b/zone/attack.cpp index 26121134e..817a8e359 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -2000,14 +2000,17 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool //if NPCs can't inheriently hit the target we don't add bane/magic dmg which isn't exactly the same as PCs int eleBane = 0; if (weapon) { - if (weapon->BaneDmgBody == other->GetBodyType()) { - eleBane += weapon->BaneDmgAmt; - } - - if (weapon->BaneDmgRace == other->GetRace()) { - eleBane += weapon->BaneDmgRaceAmt; + if (RuleB(NPC, UseBaneDamage)) { + if (weapon->BaneDmgBody == other->GetBodyType()) { + eleBane += weapon->BaneDmgAmt; + } + + if (weapon->BaneDmgRace == other->GetRace()) { + eleBane += weapon->BaneDmgRaceAmt; + } } + // I don't think NPCs use this either .... if (weapon->ElemDmgAmt) { eleBane += (weapon->ElemDmgAmt * other->ResistSpell(weapon->ElemDmgType, 0, this) / 100); } From 9344896238129d78b87a652bfae525c30333231c Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 8 Apr 2018 18:38:34 -0400 Subject: [PATCH 157/670] /pet attack is range limited --- common/ruletypes.h | 1 + zone/client_packet.cpp | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/common/ruletypes.h b/common/ruletypes.h index f9c3b3c99..9846273bf 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -547,6 +547,7 @@ RULE_INT(Aggro, IntAggroThreshold, 75) // Int <= this will aggro regardless of l RULE_BOOL(Aggro, AllowTickPulling, false) // tick pulling is an exploit in an NPC's call for help fixed sometime in 2006 on live RULE_BOOL(Aggro, UseLevelAggro, true) // Level 18+ and Undead will aggro regardless of level difference. (this will disabled Rule:IntAggroThreshold if set to true) RULE_INT(Aggro, ClientAggroCheckInterval, 6) // Interval in which clients actually check for aggro - in seconds +RULE_REAL(Aggro, PetAttackRange, 40000.0) // max squared range /pet attack works at default is 200 RULE_CATEGORY_END() RULE_CATEGORY(TaskSystem) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 6483c0cb2..d8a514797 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -10046,6 +10046,14 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app) break; } + // default range is 200, takes Z into account + // really they do something weird where they're added to the aggro list then remove them + // and will attack if they come in range -- too lazy, lets remove exploits for now + if (DistanceSquared(mypet->GetPosition(), target->GetPosition()) >= RuleR(Aggro, PetAttackRange)) { + // they say they're attacking then remove on live ... so they don't really say anything in this case ... + break; + } + if ((mypet->GetPetType() == petAnimation && aabonuses.PetCommands[PetCommand]) || mypet->GetPetType() != petAnimation) { if (target != this && DistanceSquaredNoZ(mypet->GetPosition(), target->GetPosition()) <= (RuleR(Pets, AttackCommandRange)*RuleR(Pets, AttackCommandRange))) { if (mypet->IsPetStop()) { From 714f8172ecc26aa7d5ed9dc91685ce90ee4a5f97 Mon Sep 17 00:00:00 2001 From: Uleat Date: Wed, 11 Apr 2018 18:49:49 -0400 Subject: [PATCH 158/670] Added CanDoCombat() checks to certain actions --- zone/client_packet.cpp | 5 +++++ zone/forage.cpp | 29 +++++++++++++++++------------ zone/npc.cpp | 3 ++- 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index d8a514797..2c5d5f5f6 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -13712,6 +13712,11 @@ void Client::Handle_OP_Taunt(const EQApplicationPacket *app) if (GetTarget() == nullptr || !GetTarget()->IsNPC()) return; + if (!zone->CanDoCombat()) { + Message(13, "You cannot taunt in a no combat zone."); + return; + } + Taunt(GetTarget()->CastToNPC(), false); return; } diff --git a/zone/forage.cpp b/zone/forage.cpp index 81dd264bd..7adb245ee 100644 --- a/zone/forage.cpp +++ b/zone/forage.cpp @@ -279,21 +279,26 @@ void Client::GoFish() //check for add NPC if (npc_chance > 0 && npc_id) { if (zone->random.Roll(npc_chance)) { - const NPCType *tmp = database.LoadNPCTypesData(npc_id); - if (tmp != nullptr) { - auto positionNPC = GetPosition(); - positionNPC.x = positionNPC.x + 3; - auto npc = new NPC(tmp, nullptr, positionNPC, FlyMode3); - npc->AddLootTable(); - if (npc->DropsGlobalLoot()) - npc->CheckGlobalLootTables(); + if (zone->CanDoCombat()) { + const NPCType *tmp = database.LoadNPCTypesData(npc_id); + if (tmp != nullptr) { + auto positionNPC = GetPosition(); + positionNPC.x = positionNPC.x + 3; + auto npc = new NPC(tmp, nullptr, positionNPC, FlyMode3); + npc->AddLootTable(); + if (npc->DropsGlobalLoot()) + npc->CheckGlobalLootTables(); - npc->AddToHateList(this, 1, 0, false); // no help yelling + npc->AddToHateList(this, 1, 0, false); // no help yelling - entity_list.AddNPC(npc); + entity_list.AddNPC(npc); - Message(MT_Emote, - "You fish up a little more than you bargained for..."); + Message(MT_Emote, + "You fish up a little more than you bargained for..."); + } + } + else { + Message(MT_Emote, "You notice something lurking just below the water's surface..."); } } } diff --git a/zone/npc.cpp b/zone/npc.cpp index edd6e5673..96df168ff 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -1534,7 +1534,8 @@ void NPC::PickPocket(Client* thief) } if(zone->random.Roll(5)) { - AddToHateList(thief, 50); + if (zone->CanDoCombat()) + AddToHateList(thief, 50); Say("Stop thief!"); thief->Message(13, "You are noticed trying to steal!"); thief->SendPickPocketResponse(this, 0, PickPocketFailed); From fb7362c092da9ad9fcf51b4671640db08ac7a72d Mon Sep 17 00:00:00 2001 From: Uleat Date: Thu, 12 Apr 2018 20:14:02 -0400 Subject: [PATCH 159/670] Added bot command 'BotStopMeleeLevel' --- common/version.h | 2 +- .../sql/git/bots/bots_db_update_manifest.txt | 1 + .../2018_04_12_bots_stop_melee_level.sql | 8 +++ zone/bot.cpp | 32 +++++++++++- zone/bot.h | 3 ++ zone/bot_command.cpp | 51 ++++++++++++++++++- zone/bot_command.h | 1 + zone/bot_database.cpp | 49 +++++++++++++++--- zone/bot_database.h | 3 ++ 9 files changed, 139 insertions(+), 11 deletions(-) create mode 100644 utils/sql/git/bots/required/2018_04_12_bots_stop_melee_level.sql diff --git a/common/version.h b/common/version.h index e003dc33f..a222c057c 100644 --- a/common/version.h +++ b/common/version.h @@ -32,7 +32,7 @@ #define CURRENT_BINARY_DATABASE_VERSION 9122 #ifdef BOTS - #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9018 + #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9019 #else #define CURRENT_BINARY_BOTS_DATABASE_VERSION 0 // must be 0 #endif diff --git a/utils/sql/git/bots/bots_db_update_manifest.txt b/utils/sql/git/bots/bots_db_update_manifest.txt index e072dcc4b..2bf71af18 100644 --- a/utils/sql/git/bots/bots_db_update_manifest.txt +++ b/utils/sql/git/bots/bots_db_update_manifest.txt @@ -17,6 +17,7 @@ 9016|2017_02_26_bots_spell_casting_chances_update.sql|SHOW TABLES LIKE 'bot_spell_casting_chances'|empty| 9017|2017_03_26_bots_spells_id_fix_for_saved_shadowknight_bots.sql|SELECT * FROM `bot_data` WHERE `class` = '5' AND `spells_id` = '3004'|not_empty| 9018|2018_02_02_Bot_Spells_Min_Max_HP.sql|SHOW COLUMNS FROM `bot_spells_entries` LIKE 'min_hp'|empty| +9019|2018_04_12_bots_stop_melee_level.sql|SHOW COLUMNS FROM `bot_data` LIKE 'stop_melee_level'|empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/utils/sql/git/bots/required/2018_04_12_bots_stop_melee_level.sql b/utils/sql/git/bots/required/2018_04_12_bots_stop_melee_level.sql new file mode 100644 index 000000000..b294b29bf --- /dev/null +++ b/utils/sql/git/bots/required/2018_04_12_bots_stop_melee_level.sql @@ -0,0 +1,8 @@ +ALTER TABLE `bot_data` ADD COLUMN `stop_melee_level` TINYINT(3) UNSIGNED NOT NULL DEFAULT '255' AFTER `follow_distance`; + +INSERT INTO `bot_command_settings`(`bot_command`, `access`, `aliases`) VALUES ('botstopmeleelevel', '0', 'sml'); + +SELECT @csml_raw := (SELECT `rule_value` FROM `rule_values` WHERE `rule_name` LIKE 'Bots:CasterStopMeleeLevel' LIMIT 1); +SELECT @csml_value := IF((SELECT @csml_raw REGEXP '^[0-9]+$') = '1', @csml_raw, '13'); + +UPDATE `bot_data` SET `stop_melee_level` = @csml_value WHERE `class` IN ('2', '6', '10', '11', '12', '13', '14'); diff --git a/zone/bot.cpp b/zone/bot.cpp index 8751d40f7..01bbb1593 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -78,6 +78,11 @@ Bot::Bot(NPCType npcTypeData, Client* botOwner) : NPC(&npcTypeData, nullptr, glm SetPauseAI(false); rest_timer.Disable(); SetFollowDistance(BOT_FOLLOW_DISTANCE_DEFAULT); + if (IsCasterClass(GetClass())) + SetStopMeleeLevel((uint8)RuleI(Bots, CasterStopMeleeLevel)); + else + SetStopMeleeLevel(255); + // Do this once and only in this constructor GenerateAppearance(); GenerateBaseStats(); @@ -151,6 +156,11 @@ Bot::Bot(uint32 botID, uint32 botOwnerCharacterID, uint32 botSpellsID, double to rest_timer.Disable(); SetFollowDistance(BOT_FOLLOW_DISTANCE_DEFAULT); + if (IsCasterClass(GetClass())) + SetStopMeleeLevel((uint8)RuleI(Bots, CasterStopMeleeLevel)); + else + SetStopMeleeLevel(255); + strcpy(this->name, this->GetCleanName()); memset(&_botInspectMessage, 0, sizeof(InspectMessage_Struct)); @@ -2041,6 +2051,13 @@ void Bot::SetTarget(Mob* mob) { } } +void Bot::SetStopMeleeLevel(uint8 level) { + if (IsCasterClass(GetClass()) || IsSpellFighterClass(GetClass())) + _stopMeleeLevel = level; + else + _stopMeleeLevel = 255; +} + void Bot::SetGuardMode() { WipeHateList(); SetTarget(nullptr); @@ -2386,11 +2403,20 @@ void Bot::AI_Process() { // Calculate casting distance float caster_distance_max = 0.0f; { - if (GetLevel() >= RuleI(Bots, CasterStopMeleeLevel)) { + if (GetLevel() >= GetStopMeleeLevel()) { switch (GetClass()) { case CLERIC: caster_distance_max = 1156.0f; // as DSq value (34 units) break; + case PALADIN: + caster_distance_max = 576.0f; // as DSq value (24 units) + break; + case RANGER: + caster_distance_max = 784.0f; // as DSq value (28 units) + break; + case SHADOWKNIGHT: + caster_distance_max = 676.0f; // as DSq value (26 units) + break; case DRUID: caster_distance_max = 1764.0f; // as DSq value (42 units) break; @@ -2409,7 +2435,11 @@ void Bot::AI_Process() { case ENCHANTER: caster_distance_max = 2500.0f; // as DSq value (50 units) break; + case BEASTLORD: + caster_distance_max = 900.0f; // as DSq value (30 units) + break; default: + // pure melee classes (and BARD) do not get this option break; } } diff --git a/zone/bot.h b/zone/bot.h index 1d38e5f57..c72e83f5c 100644 --- a/zone/bot.h +++ b/zone/bot.h @@ -406,6 +406,8 @@ public: bool AIHealRotation(Mob* tar, bool useFastHeals); bool GetPauseAI() { return _pauseAI; } void SetPauseAI(bool pause_flag) { _pauseAI = pause_flag; } + uint8 GetStopMeleeLevel() { return _stopMeleeLevel; } + void SetStopMeleeLevel(uint8 level); void SetGuardMode(); // Mob AI Virtual Override Methods @@ -742,6 +744,7 @@ private: bool _altoutofcombatbehavior; bool _showhelm; bool _pauseAI; + uint8 _stopMeleeLevel; // Private "base stats" Members int32 _baseMR; diff --git a/zone/bot_command.cpp b/zone/bot_command.cpp index a91624df1..0a286e8f5 100644 --- a/zone/bot_command.cpp +++ b/zone/bot_command.cpp @@ -1350,6 +1350,7 @@ int bot_command_init(void) bot_command_add("botreport", "Orders a bot to report its readiness", 0, bot_subcommand_bot_report) || bot_command_add("botspawn", "Spawns a created bot", 0, bot_subcommand_bot_spawn) || bot_command_add("botstance", "Changes the stance of a bot", 0, bot_subcommand_bot_stance) || + bot_command_add("botstopmeleelevel", "Sets the level a caster or spell-casting fighter bot will stop melee combat", 0, bot_subcommand_bot_stop_melee_level) || bot_command_add("botsummon", "Summons bot(s) to your location", 0, bot_subcommand_bot_summon) || bot_command_add("bottattoo", "Changes the Drakkin tattoo of a bot", 0, bot_subcommand_bot_tattoo) || bot_command_add("bottogglearcher", "Toggles a archer bot between melee and ranged weapon use", 0, bot_subcommand_bot_toggle_archer) || @@ -2605,6 +2606,7 @@ void bot_command_bot(Client *c, const Seperator *sep) subcommand_list.push_back("botreport"); subcommand_list.push_back("botspawn"); subcommand_list.push_back("botstance"); + subcommand_list.push_back("botstopmeleelevel"); subcommand_list.push_back("botsummon"); subcommand_list.push_back("bottogglearcher"); subcommand_list.push_back("bottogglehelm"); @@ -4792,7 +4794,7 @@ void bot_subcommand_bot_list(Client *c, const Seperator *sep) return; if (helper_is_help_or_usage(sep->arg[1])) { c->Message(m_usage, "usage: %s ([class] [value]) ([race] [value]) ([name] [partial-full])", sep->arg[0]); - c->Message(m_note, "Note: filter criteria is orderless and optional"); + c->Message(m_note, "note: filter criteria is orderless and optional"); return; } @@ -5126,6 +5128,53 @@ void bot_subcommand_bot_stance(Client *c, const Seperator *sep) } } +void bot_subcommand_bot_stop_melee_level(Client *c, const Seperator *sep) +{ + if (helper_command_alias_fail(c, "bot_subcommand_bot_stop_melee_level", sep->arg[0], "botstopmeleelevel")) + return; + if (helper_is_help_or_usage(sep->arg[1])) { + c->Message(m_usage, "usage: %s [current | reset | sync | value: 0-255]", sep->arg[0]); + c->Message(m_note, "note: Only caster and spell-casting fighter class bots may be modified"); + c->Message(m_note, "note: Use [reset] to set stop melee level to server rule"); + c->Message(m_note, "note: Use [sync] to set stop melee level to current bot level"); + return; + } + + auto my_bot = ActionableBots::AsTarget_ByBot(c); + if (!my_bot) { + c->Message(m_fail, "You must a bot that you own to use this command"); + return; + } + if (!IsCasterClass(my_bot->GetClass()) && !IsSpellFighterClass(my_bot->GetClass())) { + c->Message(m_fail, "You must a caster or spell-casting fighter class bot to use this command"); + return; + } + + uint8 sml = RuleI(Bots, CasterStopMeleeLevel); + + if (sep->IsNumber(1)) { + sml = atoi(sep->arg[1]); + } + else if (!strcasecmp(sep->arg[1], "sync")) { + sml = my_bot->GetLevel(); + } + else if (!strcasecmp(sep->arg[1], "current")) { + c->Message(m_message, "My current melee stop level is %u", my_bot->GetStopMeleeLevel()); + return; + } + else if (strcasecmp(sep->arg[1], "reset")) { + c->Message(m_fail, "A [current] or [reset] argument, or numeric [value] is required to use this command"); + return; + } + // [reset] falls through with initialization value + + my_bot->SetStopMeleeLevel(sml); + if (!botdb.SaveStopMeleeLevel(c->CharacterID(), my_bot->GetBotID(), sml)) + c->Message(m_fail, "%s for '%s'", BotDatabase::fail::SaveStopMeleeLevel(), my_bot->GetCleanName()); + + c->Message(m_action, "Successfully set stop melee level for %s to %u", my_bot->GetCleanName(), sml); +} + void bot_subcommand_bot_summon(Client *c, const Seperator *sep) { if (helper_command_alias_fail(c, "bot_subcommand_bot_summon", sep->arg[0], "botsummon")) diff --git a/zone/bot_command.h b/zone/bot_command.h index c25c7b0eb..f2c706cac 100644 --- a/zone/bot_command.h +++ b/zone/bot_command.h @@ -612,6 +612,7 @@ void bot_subcommand_bot_out_of_combat(Client *c, const Seperator *sep); void bot_subcommand_bot_report(Client *c, const Seperator *sep); void bot_subcommand_bot_spawn(Client *c, const Seperator *sep); void bot_subcommand_bot_stance(Client *c, const Seperator *sep); +void bot_subcommand_bot_stop_melee_level(Client *c, const Seperator *sep); void bot_subcommand_bot_summon(Client *c, const Seperator *sep); void bot_subcommand_bot_tattoo(Client *c, const Seperator *sep); void bot_subcommand_bot_toggle_archer(Client *c, const Seperator *sep); diff --git a/zone/bot_database.cpp b/zone/bot_database.cpp index 4c5aabb82..10449ab7a 100644 --- a/zone/bot_database.cpp +++ b/zone/bot_database.cpp @@ -340,7 +340,8 @@ bool BotDatabase::LoadBot(const uint32 bot_id, Bot*& loaded_bot) " `disease`," /* not in-use[41] */ " `corruption`," /* not in-use[42] */ " `show_helm`," // 43 - " `follow_distance`" // 44 + " `follow_distance`," // 44 + " `stop_melee_level`" // 45 " FROM `bot_data`" " WHERE `bot_id` = '%u'" " LIMIT 1", @@ -397,13 +398,16 @@ bool BotDatabase::LoadBot(const uint32 bot_id, Bot*& loaded_bot) loaded_bot = new Bot(bot_id, atoi(row[0]), atoi(row[1]), atof(row[14]), atoi(row[6]), tempNPCStruct); if (loaded_bot) { loaded_bot->SetShowHelm((atoi(row[43]) > 0 ? true : false)); + uint32 bfd = atoi(row[44]); if (bfd < 1) bfd = 1; if (bfd > BOT_FOLLOW_DISTANCE_DEFAULT_MAX) bfd = BOT_FOLLOW_DISTANCE_DEFAULT_MAX; loaded_bot->SetFollowDistance(bfd); - + + uint8 sml = atoi(row[45]); + loaded_bot->SetStopMeleeLevel(sml); } return true; @@ -457,7 +461,8 @@ bool BotDatabase::SaveNewBot(Bot* bot_inst, uint32& bot_id) " `disease`," " `corruption`," " `show_helm`," - " `follow_distance`" + " `follow_distance`," + " `stop_melee_level`" ")" " VALUES (" "'%u'," /* owner_id */ @@ -501,7 +506,8 @@ bool BotDatabase::SaveNewBot(Bot* bot_inst, uint32& bot_id) " '%i'," /* disease */ " '%i'," /* corruption */ " '1'," /* show_helm */ - " '%i'" /* follow_distance */ + " '%i'," /* follow_distance */ + " '%u'" /* stop_melee_level */ ")", bot_inst->GetBotOwnerCharacterID(), bot_inst->GetBotSpellID(), @@ -540,7 +546,8 @@ bool BotDatabase::SaveNewBot(Bot* bot_inst, uint32& bot_id) bot_inst->GetPR(), bot_inst->GetDR(), bot_inst->GetCorrup(), - BOT_FOLLOW_DISTANCE_DEFAULT + BOT_FOLLOW_DISTANCE_DEFAULT, + (IsCasterClass(bot_inst->GetClass()) ? (uint8)RuleI(Bots, CasterStopMeleeLevel) : 255) ); auto results = QueryDatabase(query); if (!results.Success()) @@ -599,7 +606,8 @@ bool BotDatabase::SaveBot(Bot* bot_inst) " `disease` = '%i'," " `corruption` = '%i'," " `show_helm` = '%i'," - " `follow_distance` = '%i'" + " `follow_distance` = '%i'," + " `stop_melee_level` = '%u'" " WHERE `bot_id` = '%u'", bot_inst->GetBotOwnerCharacterID(), bot_inst->GetBotSpellID(), @@ -641,6 +649,7 @@ bool BotDatabase::SaveBot(Bot* bot_inst) bot_inst->GetBaseCorrup(), ((bot_inst->GetShowHelm()) ? (1) : (0)), bot_inst->GetFollowDistance(), + bot_inst->GetStopMeleeLevel(), bot_inst->GetBotID() ); auto results = QueryDatabase(query); @@ -2026,7 +2035,8 @@ bool BotDatabase::CreateCloneBot(const uint32 owner_id, const uint32 bot_id, con " `disease`," " `corruption`," " `show_helm`," - " `follow_distance`" + " `follow_distance`," + " `stop_melee_level`" ")" " SELECT" " bd.`owner_id`," @@ -2073,7 +2083,8 @@ bool BotDatabase::CreateCloneBot(const uint32 owner_id, const uint32 bot_id, con " bd.`disease`," " bd.`corruption`," " bd.`show_helm`," - " bd.`follow_distance`" + " bd.`follow_distance`," + " bd.`stop_melee_level`" " FROM `bot_data` bd" " WHERE" " bd.`owner_id` = '%u'" @@ -2153,6 +2164,27 @@ bool BotDatabase::CreateCloneBotInventory(const uint32 owner_id, const uint32 bo return true; } +bool BotDatabase::SaveStopMeleeLevel(const uint32 owner_id, const uint32 bot_id, const uint8 sml_value) +{ + if (!owner_id || !bot_id) + return false; + + query = StringFormat( + "UPDATE `bot_data`" + " SET `stop_melee_level` = '%u'" + " WHERE `owner_id` = '%u'" + " AND `bot_id` = '%u'", + sml_value, + owner_id, + bot_id + ); + auto results = QueryDatabase(query); + if (!results.Success()) + return false; + + return true; +} + /* Bot bot-group functions */ bool BotDatabase::QueryBotGroupExistence(const std::string& group_name, bool& extant_flag) @@ -2852,6 +2884,7 @@ const char* BotDatabase::fail::SaveFollowDistance() { return "Failed to save fol const char* BotDatabase::fail::SaveAllFollowDistances() { return "Failed to save all follow distances"; } const char* BotDatabase::fail::CreateCloneBot() { return "Failed to create clone bot"; } const char* BotDatabase::fail::CreateCloneBotInventory() { return "Failed to create clone bot inventory"; } +const char* BotDatabase::fail::SaveStopMeleeLevel() { return "Failed to save stop melee level"; } /* fail::Bot bot-group functions */ const char* BotDatabase::fail::QueryBotGroupExistence() { return "Failed to query bot-group existence"; } diff --git a/zone/bot_database.h b/zone/bot_database.h index 073fd3b5f..2361c0cf1 100644 --- a/zone/bot_database.h +++ b/zone/bot_database.h @@ -143,6 +143,8 @@ public: bool CreateCloneBot(const uint32 owner_id, const uint32 bot_id, const std::string& clone_name, uint32& clone_id); bool CreateCloneBotInventory(const uint32 owner_id, const uint32 bot_id, const uint32 clone_id); + bool SaveStopMeleeLevel(const uint32 owner_id, const uint32 bot_id, const uint8 sml_value); + /* Bot bot-group functions */ bool QueryBotGroupExistence(const std::string& botgroup_name, bool& extant_flag); @@ -253,6 +255,7 @@ public: static const char* SaveAllFollowDistances(); static const char* CreateCloneBot(); static const char* CreateCloneBotInventory(); + static const char* SaveStopMeleeLevel(); /* fail::Bot bot-group functions */ static const char* QueryBotGroupExistence(); From f7fe10fc98ef03a89cb23d1330183c35bd920846 Mon Sep 17 00:00:00 2001 From: regneq Date: Fri, 27 Apr 2018 16:31:35 -0700 Subject: [PATCH 160/670] =?UTF-8?q?Implemented=20lua=20methods=20eq.pause?= =?UTF-8?q?=5Ftimer("timername")=20and=20eq.resume=5Ftim=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …er("timername"). This allows developers to pause and resume the given timer on the current NPC. Added lua method eq.is_paused_timer("timername") to check to see if y… …ou have a paused timer or not. Example usage: if(eq.is_paused_timer("test"))then e.self:Say("You have a paused timer."); else e.self:Say("You do not have a paused timer."); end (credit goes to Cavedude) --- zone/lua_general.cpp | 16 +++++++ zone/questmgr.cpp | 101 +++++++++++++++++++++++++++++++++++++++++++ zone/questmgr.h | 10 +++++ 3 files changed, 127 insertions(+) diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp index 55f00bcf1..3d309c542 100644 --- a/zone/lua_general.cpp +++ b/zone/lua_general.cpp @@ -341,6 +341,19 @@ void lua_stop_all_timers(Lua_Encounter enc) { quest_manager.stopalltimers(enc); } +void lua_pause_timer(const char *timer) { + quest_manager.pausetimer(timer); + +} + +void lua_resume_timer(const char *timer) { + quest_manager.resumetimer(timer); +} + +bool lua_is_paused_timer(const char *timer) { + return quest_manager.ispausedtimer(timer); +} + void lua_depop() { quest_manager.depop(0); } @@ -1543,6 +1556,9 @@ luabind::scope lua_register_general() { luabind::def("stop_timer", (void(*)(const char*, Lua_ItemInst))&lua_stop_timer), luabind::def("stop_timer", (void(*)(const char*, Lua_Mob))&lua_stop_timer), luabind::def("stop_timer", (void(*)(const char*, Lua_Encounter))&lua_stop_timer), + luabind::def("pause_timer", (void(*)(const char*))&lua_pause_timer), + luabind::def("resume_timer", (void(*)(const char*))&lua_resume_timer), + luabind::def("is_paused_timer", (bool(*)(const char*))&lua_is_paused_timer), luabind::def("stop_all_timers", (void(*)(void))&lua_stop_all_timers), luabind::def("stop_all_timers", (void(*)(Lua_ItemInst))&lua_stop_all_timers), luabind::def("stop_all_timers", (void(*)(Lua_Mob))&lua_stop_all_timers), diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index f0276e25b..d6e8a004c 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -555,6 +555,107 @@ void QuestManager::stopalltimers(Mob *mob) { } } +void QuestManager::pausetimer(const char *timer_name) { + QuestManagerCurrentQuestVars(); + + std::list::iterator cur = QTimerList.begin(), end; + std::list::iterator pcur = PTimerList.begin(), pend; + PausedTimer pt; + uint32 milliseconds = 0; + + pend = PTimerList.end(); + while (pcur != pend) + { + if (pcur->owner && pcur->owner == owner && pcur->name == timer_name) + { + Log(Logs::General, Logs::Quests, "Timer %s is already paused for %s. Returning...", timer_name, owner->GetName()); + return; + } + ++pcur; + } + + end = QTimerList.end(); + while (cur != end) + { + if (cur->mob && cur->mob == owner && cur->name == timer_name) + { + milliseconds = cur->Timer_.GetRemainingTime(); + QTimerList.erase(cur); + break; + } + ++cur; + } + + std::string timername = timer_name; + pt.name = timername; + pt.owner = owner; + pt.time = milliseconds; + Log(Logs::General, Logs::Quests, "Pausing timer %s for %s with %d ms remaining.", timer_name, owner->GetName(), milliseconds); + PTimerList.push_back(pt); +} + +void QuestManager::resumetimer(const char *timer_name) { + QuestManagerCurrentQuestVars(); + + std::list::iterator cur = QTimerList.begin(), end; + std::list::iterator pcur = PTimerList.begin(), pend; + PausedTimer pt; + uint32 milliseconds = 0; + + pend = PTimerList.end(); + while (pcur != pend) + { + if (pcur->owner && pcur->owner == owner && pcur->name == timer_name) + { + milliseconds = pcur->time; + PTimerList.erase(pcur); + break; + } + ++pcur; + } + + if (milliseconds == 0) + { + Log(Logs::General, Logs::Quests, "Paused timer %s not found or has expired. Returning...", timer_name); + return; + } + + end = QTimerList.end(); + while (cur != end) + { + if (cur->mob && cur->mob == owner && cur->name == timer_name) + { + cur->Timer_.Enable(); + cur->Timer_.Start(milliseconds, false); + Log(Logs::General, Logs::Quests, "Resuming timer %s for %s with %d ms remaining.", timer_name, owner->GetName(), milliseconds); + return; + } + ++cur; + } + + QTimerList.push_back(QuestTimer(milliseconds, owner, timer_name)); + Log(Logs::General, Logs::Quests, "Creating a new timer and resuming %s for %s with %d ms remaining.", timer_name, owner->GetName(), milliseconds); + +} + +bool QuestManager::ispausedtimer(const char *timer_name) { + QuestManagerCurrentQuestVars(); + + std::list::iterator pcur = PTimerList.begin(), pend; + + pend = PTimerList.end(); + while (pcur != pend) + { + if (pcur->owner && pcur->owner == owner && pcur->name == timer_name) + { + return true; + } + ++pcur; + } + + return false; +} + void QuestManager::emote(const char *str) { QuestManagerCurrentQuestVars(); if (!owner) { diff --git a/zone/questmgr.h b/zone/questmgr.h index df0f0b669..93ba8267d 100644 --- a/zone/questmgr.h +++ b/zone/questmgr.h @@ -41,6 +41,12 @@ class QuestManager { bool depop_npc; std::string encounter; }; + + struct PausedTimer { + Mob * owner; + std::string name; + uint32 time; + }; public: QuestManager(); virtual ~QuestManager(); @@ -82,6 +88,9 @@ public: void stopalltimers(); void stopalltimers(EQEmu::ItemInstance *inst); void stopalltimers(Mob *mob); + void pausetimer(const char *timer_name); + void resumetimer(const char *timer_name); + bool ispausedtimer(const char *timer_name); void emote(const char *str); void shout(const char *str); void shout2(const char *str); @@ -304,6 +313,7 @@ private: }; std::list QTimerList; std::list STimerList; + std::list PTimerList; size_t item_timers; }; From 4fe6836cf0867a68798edd8a3623342328e363ec Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Fri, 27 Apr 2018 21:41:52 -0400 Subject: [PATCH 161/670] Fix compiling with libc++ --- common/event_sub.cpp | 1 - common/event_sub.h | 1 + common/mysql_request_result.h | 1 + common/useperl.h | 6 +++++- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/common/event_sub.cpp b/common/event_sub.cpp index d8c772df1..c2d94b175 100644 --- a/common/event_sub.cpp +++ b/common/event_sub.cpp @@ -1,5 +1,4 @@ #include "event_sub.h" -#include void EventSubscriptionWatcher::Subscribe(const std::string &event_name) { diff --git a/common/event_sub.h b/common/event_sub.h index 71b90f338..389b4ed07 100644 --- a/common/event_sub.h +++ b/common/event_sub.h @@ -1,6 +1,7 @@ #pragma once #include +#include class EventSubscriptionWatcher { diff --git a/common/mysql_request_result.h b/common/mysql_request_result.h index 0cc02a366..ec9b3e57f 100644 --- a/common/mysql_request_result.h +++ b/common/mysql_request_result.h @@ -6,6 +6,7 @@ #include #endif +#include #include #include "types.h" #include "mysql_request_row.h" diff --git a/common/useperl.h b/common/useperl.h index e9a02d604..a6345df5d 100644 --- a/common/useperl.h +++ b/common/useperl.h @@ -6,6 +6,10 @@ #include #define WIN32IO_IS_STDIO +// header to detect if libc++ is the std lib +// this doesn't do shit for C++ but libc++ and GCC 6.1+ use it to define some macros +#include + #ifndef WIN32 extern "C" { //the perl headers dont do this for us... #endif @@ -47,7 +51,7 @@ extern "C" { //the perl headers dont do this for us... #endif //These need to be cleaned up on FreeBSD -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(_LIBCPP_VERSION) #ifdef do_open #undef do_open #endif From dde3f603be2f30e127d03962d94a7f2f6ae1b4cf Mon Sep 17 00:00:00 2001 From: KimLS Date: Wed, 2 May 2018 18:23:28 -0700 Subject: [PATCH 162/670] Change distance to within 100.0 dist instead of within 1.0 dist for checking stuck code. The actual instances where you're within 100.0 with a partial path and legit not stuck is going to be uncommon enough to put up with the visual oddities --- zone/pathfinder_nav_mesh.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/pathfinder_nav_mesh.cpp b/zone/pathfinder_nav_mesh.cpp index 8b4cfb2f5..88afc0ec2 100644 --- a/zone/pathfinder_nav_mesh.cpp +++ b/zone/pathfinder_nav_mesh.cpp @@ -84,7 +84,7 @@ IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const gl partial = true; auto dist = DistanceSquared(epos, current_location); - if (dist < 10.0f) { + if (dist < 10000.0f) { stuck = true; } } From 95043d637c305c117bde45ae7f65d94273a13bbf Mon Sep 17 00:00:00 2001 From: Akkadius Date: Thu, 10 May 2018 03:54:49 -0500 Subject: [PATCH 163/670] Implement NPC's opening doors and clean up door code a bit --- .gitignore | 2 + common/features.h | 1 + zone/doors.cpp | 800 +++++++++++++++++++++++++--------------------- zone/doors.h | 144 ++++----- zone/mob.h | 1 + zone/mob_ai.cpp | 37 ++- zone/zonedb.h | 2 +- 7 files changed, 543 insertions(+), 444 deletions(-) diff --git a/.gitignore b/.gitignore index 805c783a4..9741cae65 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,5 @@ x64/ x86/ log/ logs/ + +.idea/* \ No newline at end of file diff --git a/common/features.h b/common/features.h index a35431bff..a80fb9f3c 100644 --- a/common/features.h +++ b/common/features.h @@ -154,6 +154,7 @@ enum { //timer settings, all in milliseconds AIscanarea_delay = 6000, AIfeignremember_delay = 500, AItarget_check_duration = 500, + AI_scan_door_open_interval = 1000, // AIClientScanarea_delay = 750, //used in REVERSE_AGGRO AIassistcheck_delay = 3000, //now often a fighting NPC will yell for help AI_check_signal_timer_delay = 500, // How often EVENT_SIGNAL checks are processed diff --git a/zone/doors.cpp b/zone/doors.cpp index 97aaa1088..b4cff6679 100644 --- a/zone/doors.cpp +++ b/zone/doors.cpp @@ -40,72 +40,71 @@ extern EntityList entity_list; extern WorldServer worldserver; -Doors::Doors(const Door* door) : -close_timer(5000), -m_Position(door->pos_x, door->pos_y, door->pos_z, door->heading), -m_Destination(door->dest_x, door->dest_y, door->dest_z, door->dest_heading) -{ - db_id = door->db_id; - door_id = door->door_id; +Doors::Doors(const Door *door) : + close_timer(5000), + m_Position(door->pos_x, door->pos_y, door->pos_z, door->heading), + m_Destination(door->dest_x, door->dest_y, door->dest_z, door->dest_heading) { + strn0cpy(zone_name, door->zone_name, 32); strn0cpy(door_name, door->door_name, 32); - incline = door->incline; - opentype = door->opentype; - guild_id = door->guild_id; - lockpick = door->lock_pick; - keyitem = door->keyitem; - nokeyring = door->nokeyring; - trigger_door = door->trigger_door; - trigger_type = door->trigger_type; - triggered = false; - door_param = door->door_param; - size = door->size; - invert_state = door->invert_state; + strn0cpy(destination_zone_name, door->dest_zone, 16); + + this->database_id = door->db_id; + this->door_id = door->door_id; + this->incline = door->incline; + this->open_type = door->opentype; + this->guild_id = door->guild_id; + this->lockpick = door->lock_pick; + this->key_item_id = door->keyitem; + this->no_key_ring = door->nokeyring; + this->trigger_door = door->trigger_door; + this->trigger_type = door->trigger_type; + this->triggered = false; + this->door_param = door->door_param; + this->size = door->size; + this->invert_state = door->invert_state; + this->destination_instance_id = door->dest_instance_id; + this->is_ldon_door = door->is_ldon_door; + this->client_version_mask = door->client_version_mask; + SetOpenState(false); close_timer.Disable(); - strn0cpy(dest_zone, door->dest_zone, 16); - dest_instance_id = door->dest_instance_id; - - is_ldon_door = door->is_ldon_door; - client_version_mask = door->client_version_mask; - disable_timer = (door->disable_timer == 1 ? true : false); } -Doors::Doors(const char *dmodel, const glm::vec4& position, uint8 dopentype, uint16 dsize) : -close_timer(5000), -m_Position(position), -m_Destination(glm::vec4()) -{ - db_id = database.GetDoorsCountPlusOne(zone->GetShortName(), zone->GetInstanceVersion()); - door_id = database.GetDoorsDBCountPlusOne(zone->GetShortName(), zone->GetInstanceVersion()); +Doors::Doors(const char *model, const glm::vec4 &position, uint8 open_type, uint16 size) : + close_timer(5000), + m_Position(position), + m_Destination(glm::vec4()){ + strn0cpy(zone_name, zone->GetShortName(), 32); - strn0cpy(door_name, dmodel, 32); - incline = 0; - opentype = dopentype; - guild_id = 0; - lockpick = 0; - keyitem = 0; - nokeyring = 0; - trigger_door = 0; - trigger_type = 0; - triggered = false; - door_param = 0; - size = dsize; - invert_state = 0; + strn0cpy(door_name, model, 32); + strn0cpy(destination_zone_name, "NONE", 32); + + this->database_id = (uint32) database.GetDoorsCountPlusOne(zone->GetShortName(), zone->GetInstanceVersion()); + this->door_id = (uint8) database.GetDoorsDBCountPlusOne(zone->GetShortName(), zone->GetInstanceVersion()); + + this->open_type = open_type; + this->size = size; + this->incline = 0; + this->guild_id = 0; + this->lockpick = 0; + this->key_item_id = 0; + this->no_key_ring = 0; + this->trigger_door = 0; + this->trigger_type = 0; + this->triggered = false; + this->door_param = 0; + this->invert_state = 0; + this->is_ldon_door = 0; + this->client_version_mask = 4294967295u; + this->disable_timer = 0; + this->destination_instance_id = 0; + SetOpenState(false); - close_timer.Disable(); - - strn0cpy(dest_zone, "NONE", 32); - dest_instance_id = 0; - - is_ldon_door = 0; - client_version_mask = 4294967295u; - - disable_timer = 0; } @@ -115,71 +114,89 @@ Doors::~Doors() bool Doors::Process() { - if(close_timer.Enabled() && close_timer.Check() && IsDoorOpen()) - { - if (opentype == 40 || GetTriggerType() == 1) - { + if (close_timer.Enabled() && close_timer.Check() && IsDoorOpen()) { + if (open_type == 40 || GetTriggerType() == 1) { auto outapp = new EQApplicationPacket(OP_MoveDoor, sizeof(MoveDoor_Struct)); - MoveDoor_Struct* md = (MoveDoor_Struct*)outapp->pBuffer; + MoveDoor_Struct *md = (MoveDoor_Struct *) outapp->pBuffer; md->doorid = door_id; md->action = invert_state == 0 ? CLOSE_DOOR : CLOSE_INVDOOR; entity_list.QueueClients(0, outapp); safe_delete(outapp); } - triggered=false; + triggered = false; close_timer.Disable(); SetOpenState(false); } return true; } -void Doors::HandleClick(Client* sender, uint8 trigger) -{ - //door debugging info dump - Log(Logs::Detail, Logs::Doors, "%s clicked door %s (dbid %d, eqid %d) at %s", sender->GetName(), door_name, db_id, door_id, to_string(m_Position).c_str()); - Log(Logs::Detail, Logs::Doors, " incline %d, opentype %d, lockpick %d, key %d, nokeyring %d, trigger %d type %d, param %d", incline, opentype, lockpick, keyitem, nokeyring, trigger_door, trigger_type, door_param); - Log(Logs::Detail, Logs::Doors, " disable_timer '%s',size %d, invert %d, dest: %s %s", (disable_timer?"true":"false"), size, invert_state, dest_zone, to_string(m_Destination).c_str()); +void Doors::HandleClick(Client* sender, uint8 trigger) { + Log(Logs::Detail, Logs::Doors, + "%s clicked door %s (dbid %d, eqid %d) at %s", + sender->GetName(), + this->door_name, + this->database_id, + this->door_id, + to_string(m_Position).c_str() + ); + + Log(Logs::Detail, Logs::Doors, + "incline %d, open_type %d, lockpick %d, key %d, nokeyring %d, trigger %d type %d, param %d", + this->incline, + this->open_type, + this->lockpick, + this->key_item_id, + this->no_key_ring, + this->trigger_door, + this->trigger_type, + this->door_param + ); + + Log(Logs::Detail, Logs::Doors, + "disable_timer '%s',size %d, invert %d, dest: %s %s", + (this->disable_timer ? "true" : "false"), + this->size, + this->invert_state, + this->destination_zone_name, + to_string(m_Destination).c_str() + ); auto outapp = new EQApplicationPacket(OP_MoveDoor, sizeof(MoveDoor_Struct)); - MoveDoor_Struct* md = (MoveDoor_Struct*)outapp->pBuffer; - md->doorid = door_id; - ///////////////////////////////////////////////////////////////// - //used_pawn: Locked doors! Rogue friendly too =) - //TODO: add check for other lockpick items - ////////////////////////////////////////////////////////////////// + auto *move_door_packet = (MoveDoor_Struct *) outapp->pBuffer; + move_door_packet->doorid = door_id; - //TODO: ADVENTURE DOOR - if(IsLDoNDoor()) - { - if(sender) - { - if(RuleI(Adventure, ItemIDToEnablePorts) != 0) - { - if(!sender->KeyRingCheck(RuleI(Adventure, ItemIDToEnablePorts))) - { - if (sender->GetInv().HasItem(RuleI(Adventure, ItemIDToEnablePorts)) == INVALID_INDEX) - { + if (this->IsLDoNDoor()) { + if (sender) { + if (RuleI(Adventure, ItemIDToEnablePorts) != 0) { + if (!sender->KeyRingCheck(RuleI(Adventure, ItemIDToEnablePorts))) { + if (sender->GetInv().HasItem(RuleI(Adventure, ItemIDToEnablePorts)) == INVALID_INDEX) { sender->Message_StringID(13, DUNGEON_SEALED); safe_delete(outapp); return; - } - else - { + } else { sender->KeyRingAdd(RuleI(Adventure, ItemIDToEnablePorts)); } } } - if(!sender->GetPendingAdventureDoorClick()) - { + if (!sender->GetPendingAdventureDoorClick()) { sender->PendingAdventureDoorClick(); - auto pack = new ServerPacket(ServerOP_AdventureClickDoor, - sizeof(ServerPlayerClickedAdventureDoor_Struct)); - ServerPlayerClickedAdventureDoor_Struct *ads = (ServerPlayerClickedAdventureDoor_Struct*)pack->pBuffer; - strcpy(ads->player, sender->GetName()); - ads->zone_id = zone->GetZoneID(); - ads->id = GetDoorDBID(); + auto pack = new ServerPacket( + ServerOP_AdventureClickDoor, + sizeof(ServerPlayerClickedAdventureDoor_Struct) + ); + + /** + * Adventure door + */ + ServerPlayerClickedAdventureDoor_Struct *adventure_door_click; + adventure_door_click = (ServerPlayerClickedAdventureDoor_Struct *) pack->pBuffer; + strcpy(adventure_door_click->player, sender->GetName()); + + adventure_door_click->zone_id = zone->GetZoneID(); + adventure_door_click->id = this->GetDoorDBID(); + worldserver.SendPacket(pack); safe_delete(pack); } @@ -188,166 +205,169 @@ void Doors::HandleClick(Client* sender, uint8 trigger) } } - uint32 keyneeded = GetKeyItem(); - uint8 keepoffkeyring = GetNoKeyring(); - uint32 haskey = 0; - uint32 playerkey = 0; - const EQEmu::ItemInstance *lockpicks = sender->GetInv().GetItem(EQEmu::inventory::slotCursor); + uint32 required_key_item = GetKeyItem(); + uint8 disable_add_to_key_ring = GetNoKeyring(); + uint32 player_has_key = 0; + uint32 player_key = 0; - haskey = sender->GetInv().HasItem(keyneeded, 1); + const EQEmu::ItemInstance *lock_pick_item = sender->GetInv().GetItem(EQEmu::inventory::slotCursor); + player_has_key = static_cast(sender->GetInv().HasItem(required_key_item, 1)); - if (haskey != INVALID_INDEX) - { - playerkey = keyneeded; + if (player_has_key != INVALID_INDEX) { + player_key = required_key_item; } - if(GetTriggerType() == 255) - { // this object isnt triggered - if(trigger == 1) - { // this door is only triggered by an object - if(!IsDoorOpen() || (opentype == 58)) - { - md->action = invert_state == 0 ? OPEN_DOOR : OPEN_INVDOOR; + /** + * Object is not triggered + */ + if (this->GetTriggerType() == 255) { + + /** + * Door is only triggered by an object + */ + if (trigger == 1) { + if (!this->IsDoorOpen() || (open_type == 58)) { + move_door_packet->action = static_cast(invert_state == 0 ? OPEN_DOOR : OPEN_INVDOOR); + } else { + move_door_packet->action = static_cast(invert_state == 0 ? CLOSE_DOOR : CLOSE_INVDOOR); } - else - { - md->action = invert_state == 0 ? CLOSE_DOOR : CLOSE_INVDOOR; - } - } - else - { + } else { safe_delete(outapp); return; } } - // guild doors - if(((keyneeded == 0) && (GetLockpick() == 0) && (guild_id == 0)) || - (IsDoorOpen() && (opentype == 58)) || - ((guild_id > 0) && (guild_id == sender->GuildID()))) - { //door not locked - if(!IsDoorOpen() || (opentype == 58)) - { - md->action = invert_state == 0 ? OPEN_DOOR : OPEN_INVDOOR; + /** + * Guild Doors + * + * Door is not locked + */ + bool is_guild_door = (this->GetGuildID() > 0) && (this->GetGuildID() == sender->GuildID()); + bool is_door_not_locked = ((required_key_item == 0) && (this->GetLockpick() == 0) && (this->GetGuildID() == 0)); + bool is_door_open_and_open_able = (this->IsDoorOpen() && (open_type == 58)); + + if (is_door_not_locked || is_door_open_and_open_able || is_guild_door) { + if (!this->IsDoorOpen() || (this->GetOpenType() == 58)) { + move_door_packet->action = static_cast(invert_state == 0 ? OPEN_DOOR : OPEN_INVDOOR); + } else { + move_door_packet->action = static_cast(invert_state == 0 ? CLOSE_DOOR : CLOSE_INVDOOR); } - else - { - md->action = invert_state == 0 ? CLOSE_DOOR : CLOSE_INVDOOR; - } - } - else - { // guild doors - if((guild_id > 0) && !sender->GetGM()) - { - std::string tmp; - char tmpmsg[240]; // guild doors msgs - if(guild_mgr.GetGuildNameByID(guild_id, tmp)) - { - sprintf(tmpmsg, "Only members of the <%s> guild may enter here", tmp.c_str()); + } else { + + /** + * Guild Doors + */ + if ((this->GetGuildID() > 0) && !sender->GetGM()) { + std::string guild_name; + char door_message[240]; + + if (guild_mgr.GetGuildNameByID(guild_id, guild_name)) { + sprintf(door_message, "Only members of the <%s> guild may enter here", guild_name.c_str()); + } else { + strcpy(door_message, "Door is locked by an unknown guild"); } - else - { - strcpy(tmpmsg, "Door is locked by an unknown guild"); - } - sender->Message(4, tmpmsg); + + sender->Message(4, door_message); safe_delete(outapp); return; } - // a key is required or the door is locked but can be picked or both - sender->Message(4, "This is locked..."); // debug spam - should probably go - if(sender->GetGM()) // GM can always open locks - should probably be changed to require a key - { - sender->Message_StringID(4,DOORS_GM); - if(!IsDoorOpen() || (opentype == 58)) - { - md->action = invert_state == 0 ? OPEN_DOOR : OPEN_INVDOOR; - } - else - { - md->action = invert_state == 0 ? CLOSE_DOOR : CLOSE_INVDOOR; + + /** + * Key required + */ + sender->Message(4, "This is locked..."); + + /** + * GM can always open locks + */ + if (sender->GetGM()) { + sender->Message_StringID(4, DOORS_GM); + + if (!IsDoorOpen() || (open_type == 58)) { + move_door_packet->action = static_cast(invert_state == 0 ? OPEN_DOOR : OPEN_INVDOOR); + } else { + move_door_packet->action = static_cast(invert_state == 0 ? CLOSE_DOOR : CLOSE_INVDOOR); } + } - else if(playerkey) - { // they have something they are trying to open it with - if(keyneeded && (keyneeded == playerkey)) - { // key required and client is using the right key - if(!keepoffkeyring) - { - sender->KeyRingAdd(playerkey); + + /** + * Player has something they are trying to open it with + */ + else if (player_key) { + + /** + * Key required and client is using the right key + */ + if (required_key_item && + (required_key_item == player_key)) { + + if (!disable_add_to_key_ring) { + sender->KeyRingAdd(player_key); } + sender->Message(4, "You got it open!"); - if(!IsDoorOpen() || (opentype == 58)) - { - md->action = invert_state == 0 ? OPEN_DOOR : OPEN_INVDOOR; - } - else - { - md->action = invert_state == 0 ? CLOSE_DOOR : CLOSE_INVDOOR; + + if (!IsDoorOpen() || (open_type == 58)) { + move_door_packet->action = static_cast(invert_state == 0 ? OPEN_DOOR : OPEN_INVDOOR); + } else { + move_door_packet->action = static_cast(invert_state == 0 ? CLOSE_DOOR : CLOSE_INVDOOR); } } } - else if(lockpicks != nullptr) - { - if (sender->GetSkill(EQEmu::skills::SkillPickLock)) - { - if(lockpicks->GetItem()->ItemType == EQEmu::item::ItemTypeLockPick) - { - float modskill = sender->GetSkill(EQEmu::skills::SkillPickLock); + + /** + * Try Lock pick + */ + else if (lock_pick_item != nullptr) { + if (sender->GetSkill(EQEmu::skills::SkillPickLock)) { + if (lock_pick_item->GetItem()->ItemType == EQEmu::item::ItemTypeLockPick) { + float player_pick_lock_skill = sender->GetSkill(EQEmu::skills::SkillPickLock); sender->CheckIncreaseSkill(EQEmu::skills::SkillPickLock, nullptr, 1); - Log(Logs::General, Logs::Skills, "Client has lockpicks: skill=%f", modskill); + Log(Logs::General, Logs::Skills, "Client has lockpicks: skill=%f", player_pick_lock_skill); - if(GetLockpick() <= modskill) - { - if(!IsDoorOpen()) - { - md->action = invert_state == 0 ? OPEN_DOOR : OPEN_INVDOOR; - } - else - { - md->action = invert_state == 0 ? CLOSE_DOOR : CLOSE_INVDOOR; + if (GetLockpick() <= player_pick_lock_skill) { + if (!IsDoorOpen()) { + move_door_packet->action = static_cast(invert_state == 0 ? OPEN_DOOR : OPEN_INVDOOR); + } else { + move_door_packet->action = static_cast(invert_state == 0 ? CLOSE_DOOR : CLOSE_INVDOOR); } sender->Message_StringID(4, DOORS_SUCCESSFUL_PICK); - } - else - { + } else { sender->Message_StringID(4, DOORS_INSUFFICIENT_SKILL); safe_delete(outapp); return; } - } - else - { + } else { sender->Message_StringID(4, DOORS_NO_PICK); safe_delete(outapp); return; } - } - else - { + } else { sender->Message_StringID(4, DOORS_CANT_PICK); safe_delete(outapp); return; } } - else - { // locked door and nothing to open it with - // search for key on keyring - if(sender->KeyRingCheck(keyneeded)) - { - playerkey = keyneeded; + + /** + * Locked door and nothing to open it with + */ + else { + + /** + * Search for key on keyring + */ + if (sender->KeyRingCheck(required_key_item)) { + player_key = required_key_item; sender->Message(4, "You got it open!"); // more debug spam - if(!IsDoorOpen() || (opentype == 58)) - { - md->action = invert_state == 0 ? OPEN_DOOR : OPEN_INVDOOR; + if (!IsDoorOpen() || (open_type == 58)) { + move_door_packet->action = static_cast(invert_state == 0 ? OPEN_DOOR : OPEN_INVDOOR); + } else { + move_door_packet->action = static_cast(invert_state == 0 ? CLOSE_DOOR : CLOSE_INVDOOR); } - else - { - md->action = invert_state == 0 ? CLOSE_DOOR : CLOSE_INVDOOR; - } - } - else - { + } else { sender->Message_StringID(4, DOORS_LOCKED); safe_delete(outapp); return; @@ -356,92 +376,121 @@ void Doors::HandleClick(Client* sender, uint8 trigger) } entity_list.QueueClients(sender, outapp, false); - if(!IsDoorOpen() || (opentype == 58)) - { + if (!IsDoorOpen() || (open_type == 58)) { if (!disable_timer) close_timer.Start(); SetOpenState(true); - } - else - { + } else { close_timer.Disable(); if (!disable_timer) SetOpenState(false); } - //everything past this point assumes we opened the door - //and met all the reqs for opening - //everything to do with closed doors has already been taken care of - //we return because we don't want people using teleports on an unlocked door (exploit!) - if((md->action == CLOSE_DOOR && invert_state == 0) || (md->action == CLOSE_INVDOOR && invert_state == 1)) - { + /* + * Everything past this point assumes we opened the door + * and met all the requirements for opening + * everything to do with closed doors has already been taken care of + * we return because we don't want people using teleports on an unlocked door (exploit!) + */ + + if ((move_door_packet->action == CLOSE_DOOR && invert_state == 0) || (move_door_packet->action == CLOSE_INVDOOR && invert_state == 1)) { safe_delete(outapp); return; } safe_delete(outapp); - if((GetTriggerDoorID() != 0) && (GetTriggerType() == 1)) - { - Doors* triggerdoor = entity_list.FindDoor(GetTriggerDoorID()); - if(triggerdoor && !triggerdoor->triggered) - { - triggered=true; - triggerdoor->HandleClick(sender, 1); + if ((GetTriggerDoorID() != 0) && (GetTriggerType() == 1)) { + Doors *trigger_door_entity = entity_list.FindDoor(GetTriggerDoorID()); + if (trigger_door_entity && !trigger_door_entity->triggered) { + triggered = true; + trigger_door_entity->HandleClick(sender, 1); + } else { + triggered = false; } - else - { - triggered=false; - } - } - else if((GetTriggerDoorID() != 0) && (GetTriggerType() != 1)) - { - Doors* triggerdoor = entity_list.FindDoor(GetTriggerDoorID()); - if(triggerdoor && !triggerdoor->triggered) - { - triggered=true; - triggerdoor->HandleClick(sender, 0); - } - else - { - triggered=false; + } else if ((GetTriggerDoorID() != 0) && (GetTriggerType() != 1)) { + Doors *trigger_door_entity = entity_list.FindDoor(GetTriggerDoorID()); + if (trigger_door_entity && !trigger_door_entity->triggered) { + triggered = true; + trigger_door_entity->HandleClick(sender, 0); + } else { + triggered = false; } } - if(((opentype == 57) || (opentype == 58)) && (strncmp(dest_zone, "NONE", strlen("NONE")) != 0)) - { // Teleport door! - if (( strncmp(dest_zone,zone_name,strlen(zone_name)) == 0) && (!keyneeded)) - { - if(!keepoffkeyring) - { - sender->KeyRingAdd(playerkey); + /** + * Teleport door + */ + if (((open_type == 57) || (open_type == 58)) && + (strncmp(destination_zone_name, "NONE", strlen("NONE")) != 0)) { + + /** + * If click destination is same zone and doesn't require a key + */ + if ((strncmp(destination_zone_name, zone_name, strlen(zone_name)) == 0) && (!required_key_item)) { + if (!disable_add_to_key_ring) { + sender->KeyRingAdd(player_key); } - sender->MovePC(zone->GetZoneID(), zone->GetInstanceID(), m_Destination.x, m_Destination.y, m_Destination.z, m_Destination.w); + sender->MovePC( + zone->GetZoneID(), + zone->GetInstanceID(), + m_Destination.x, + m_Destination.y, + m_Destination.z, + m_Destination.w + ); } - else if (( !IsDoorOpen() || opentype == 58 ) && (keyneeded && ((keyneeded == playerkey) || sender->GetGM()))) - { - if(!keepoffkeyring) - { - sender->KeyRingAdd(playerkey); + /** + * If requires a key + */ + else if ( + (!IsDoorOpen() || open_type == 58) && + (required_key_item && ((required_key_item == player_key) || sender->GetGM())) + ) { + + if (!disable_add_to_key_ring) { + sender->KeyRingAdd(player_key); } - if(database.GetZoneID(dest_zone) == zone->GetZoneID()) - { - sender->MovePC(zone->GetZoneID(), zone->GetInstanceID(), m_Destination.x, m_Destination.y, m_Destination.z, m_Destination.w); - } - else - { - sender->MovePC(database.GetZoneID(dest_zone), dest_instance_id, m_Destination.x, m_Destination.y, m_Destination.z, m_Destination.w); + if (database.GetZoneID(destination_zone_name) == zone->GetZoneID()) { + sender->MovePC( + zone->GetZoneID(), + zone->GetInstanceID(), + m_Destination.x, + m_Destination.y, + m_Destination.z, + m_Destination.w + ); + } else { + sender->MovePC( + database.GetZoneID(destination_zone_name), + static_cast(destination_instance_id), + m_Destination.x, + m_Destination.y, + m_Destination.z, + m_Destination.w + ); } } - if (( !IsDoorOpen() || opentype == 58 ) && (!keyneeded)) - { - if(database.GetZoneID(dest_zone) == zone->GetZoneID()) - { - sender->MovePC(zone->GetZoneID(), zone->GetInstanceID(), m_Destination.x, m_Destination.y, m_Destination.z, m_Destination.w); - } - else - { - sender->MovePC(database.GetZoneID(dest_zone), dest_instance_id, m_Destination.x, m_Destination.y, m_Destination.z, m_Destination.w); + + if ((!IsDoorOpen() || open_type == 58) && (!required_key_item)) { + if (database.GetZoneID(destination_zone_name) == zone->GetZoneID()) { + sender->MovePC( + zone->GetZoneID(), + zone->GetInstanceID(), + m_Destination.x, + m_Destination.y, + m_Destination.z, + m_Destination.w + ); + } else { + sender->MovePC( + database.GetZoneID(destination_zone_name), + static_cast(this->destination_instance_id), + m_Destination.x, + m_Destination.y, + m_Destination.z, + m_Destination.w + ); } } } @@ -450,7 +499,7 @@ void Doors::HandleClick(Client* sender, uint8 trigger) void Doors::NPCOpen(NPC* sender, bool alt_mode) { if (sender) { - if (GetTriggerType() == 255 || GetTriggerDoorID() > 0 || GetLockpick() != 0 || GetKeyItem() != 0 || opentype == 59 || opentype == 58 || !sender->IsNPC()) { // this object isnt triggered or door is locked - NPCs should not open locked doors! + if (GetTriggerType() == 255 || GetTriggerDoorID() > 0 || GetLockpick() != 0 || GetKeyItem() != 0 || open_type == 59 || open_type == 58 || !sender->IsNPC()) { // this object isnt triggered or door is locked - NPCs should not open locked doors! return; } @@ -509,12 +558,12 @@ void Doors::ForceOpen(Mob *sender, bool alt_mode) } } -void Doors::ForceClose(Mob *sender, bool alt_mode) -{ +void Doors::ForceClose(Mob *sender, bool alt_mode) { auto outapp = new EQApplicationPacket(OP_MoveDoor, sizeof(MoveDoor_Struct)); - MoveDoor_Struct* md = (MoveDoor_Struct*)outapp->pBuffer; - md->doorid = door_id; - md->action = invert_state == 0 ? CLOSE_DOOR : CLOSE_INVDOOR; // change from original (open to close) + MoveDoor_Struct *move_door_packet; + move_door_packet = (MoveDoor_Struct *) outapp->pBuffer; + move_door_packet->doorid = door_id; + move_door_packet->action = invert_state == 0 ? CLOSE_DOOR : CLOSE_INVDOOR; // change from original (open to close) entity_list.QueueClients(sender, outapp, false); safe_delete(outapp); @@ -523,13 +572,11 @@ void Doors::ForceClose(Mob *sender, bool alt_mode) if (!disable_timer) close_timer.Start(); is_open = true; - } - else { + } else { close_timer.Disable(); is_open = false; } - } - else { // alternative function + } else { // alternative function if (is_open) close_timer.Trigger(); } @@ -537,21 +584,21 @@ void Doors::ForceClose(Mob *sender, bool alt_mode) void Doors::ToggleState(Mob *sender) { - if(GetTriggerDoorID() > 0 || GetLockpick() != 0 || GetKeyItem() != 0 || opentype == 58 || opentype == 40) { // borrowed some NPCOpen criteria + if(GetTriggerDoorID() > 0 || GetLockpick() != 0 || GetKeyItem() != 0 || open_type == 58 || open_type == 40) { // borrowed some NPCOpen criteria return; } auto outapp = new EQApplicationPacket(OP_MoveDoor, sizeof(MoveDoor_Struct)); - MoveDoor_Struct* md=(MoveDoor_Struct*)outapp->pBuffer; - md->doorid = door_id; + MoveDoor_Struct* move_door_packet; + move_door_packet = (MoveDoor_Struct*)outapp->pBuffer; + move_door_packet->doorid = door_id; if(!is_open) { - md->action = invert_state == 0 ? OPEN_DOOR : OPEN_INVDOOR; + move_door_packet->action = static_cast(invert_state == 0 ? OPEN_DOOR : OPEN_INVDOOR); is_open=true; } - else - { - md->action = invert_state == 0 ? CLOSE_DOOR : CLOSE_INVDOOR; + else { + move_door_packet->action = static_cast(invert_state == 0 ? CLOSE_DOOR : CLOSE_INVDOOR); is_open=false; } @@ -559,18 +606,6 @@ void Doors::ToggleState(Mob *sender) safe_delete(outapp); } -void Doors::DumpDoor(){ - Log(Logs::General, Logs::None, - "db_id:%i door_id:%i zone_name:%s door_name:%s %s", - db_id, door_id, zone_name, door_name, to_string(m_Position).c_str()); - Log(Logs::General, Logs::None, - "opentype:%i guild_id:%i lockpick:%i keyitem:%i nokeyring:%i trigger_door:%i trigger_type:%i door_param:%i open:%s", - opentype, guild_id, lockpick, keyitem, nokeyring, trigger_door, trigger_type, door_param, (is_open) ? "open":"closed"); - Log(Logs::General, Logs::None, - "dest_zone:%s destination:%s ", - dest_zone, to_string(m_Destination).c_str()); -} - int32 ZoneDatabase::GetDoorsCount(uint32* oMaxID, const char *zone_name, int16 version) { std::string query = StringFormat("SELECT MAX(id), count(*) FROM doors " @@ -599,9 +634,11 @@ int32 ZoneDatabase::GetDoorsCount(uint32* oMaxID, const char *zone_name, int16 v } int32 ZoneDatabase::GetDoorsCountPlusOne(const char *zone_name, int16 version) { - - std::string query = StringFormat("SELECT MAX(id) FROM doors " - "WHERE zone = '%s' AND version = %u", zone_name, version); + std::string query = StringFormat( + "SELECT MAX(id) FROM doors WHERE zone = '%s' AND version = %u", + zone_name, + version + ); auto results = QueryDatabase(query); if (!results.Success()) { return -1; @@ -641,68 +678,97 @@ int32 ZoneDatabase::GetDoorsDBCountPlusOne(const char *zone_name, int16 version) return atoi(row[0]) + 1; } -bool ZoneDatabase::LoadDoors(int32 iDoorCount, Door *into, const char *zone_name, int16 version) { +bool ZoneDatabase::LoadDoors(int32 door_count, Door *into, const char *zone_name, int16 version) { Log(Logs::General, Logs::Status, "Loading Doors from database..."); - - // Door tmpDoor; - std::string query = StringFormat("SELECT id, doorid, zone, name, pos_x, pos_y, pos_z, heading, " - "opentype, guild, lockpick, keyitem, nokeyring, triggerdoor, triggertype, " - "dest_zone, dest_instance, dest_x, dest_y, dest_z, dest_heading, " - "door_param, invert_state, incline, size, is_ldon_door, client_version_mask, disable_timer " - "FROM doors WHERE zone = '%s' AND (version = %u OR version = -1) " - "ORDER BY doorid asc", zone_name, version); + std::string query = StringFormat( + " SELECT " + " id, " + " doorid, " + " zone, " + " NAME, " + " pos_x, " + " pos_y, " + " pos_z, " + " heading, " + " opentype, " + " guild, " + " lockpick, " + " keyitem, " + " nokeyring, " + " triggerdoor, " + " triggertype, " + " dest_zone, " + " dest_instance, " + " dest_x, " + " dest_y, " + " dest_z, " + " dest_heading, " + " door_param, " + " invert_state, " + " incline, " + " size, " + " is_ldon_door, " + " client_version_mask, " + " disable_timer " + " FROM " + " doors " + " WHERE " + " zone = '%s' " + " AND ( version = % u OR version = - 1 ) " + " ORDER BY " + " doorid ASC ", + zone_name, + version + ); auto results = QueryDatabase(query); if (!results.Success()) { return false; } - int32 rowIndex = 0; - for (auto row = results.begin(); row != results.end(); ++row, ++rowIndex) { - if (rowIndex >= iDoorCount) { - std::cerr << "Error, Door Count of " << iDoorCount << " exceeded." << std::endl; + int32 row_index = 0; + for (auto row = results.begin(); row != results.end(); ++row, ++row_index) { + if (row_index >= door_count) { + std::cerr << "Error, Door Count of " << door_count << " exceeded." << std::endl; break; } - memset(&into[rowIndex], 0, sizeof(Door)); + memset(&into[row_index], 0, sizeof(Door)); - into[rowIndex].db_id = atoi(row[0]); - into[rowIndex].door_id = atoi(row[1]); + strn0cpy(into[row_index].zone_name, row[2], 32); + strn0cpy(into[row_index].door_name, row[3], 32); + strn0cpy(into[row_index].dest_zone, row[15], 32); - strn0cpy(into[rowIndex].zone_name, row[2], 32); - strn0cpy(into[rowIndex].door_name, row[3], 32); - - into[rowIndex].pos_x = (float)atof(row[4]); - into[rowIndex].pos_y = (float)atof(row[5]); - into[rowIndex].pos_z = (float)atof(row[6]); - into[rowIndex].heading = (float)atof(row[7]); - into[rowIndex].opentype = atoi(row[8]); - into[rowIndex].guild_id = atoi(row[9]); - into[rowIndex].lock_pick = atoi(row[10]); - into[rowIndex].keyitem = atoi(row[11]); - into[rowIndex].nokeyring = atoi(row[12]); - into[rowIndex].trigger_door = atoi(row[13]); - into[rowIndex].trigger_type = atoi(row[14]); - - strn0cpy(into[rowIndex].dest_zone, row[15], 32); - - into[rowIndex].dest_instance_id = atoi(row[16]); - into[rowIndex].dest_x = (float)atof(row[17]); - into[rowIndex].dest_y = (float)atof(row[18]); - into[rowIndex].dest_z = (float)atof(row[19]); - into[rowIndex].dest_heading = (float)atof(row[20]); - into[rowIndex].door_param = atoi(row[21]); - into[rowIndex].invert_state = atoi(row[22]); - into[rowIndex].incline = atoi(row[23]); - into[rowIndex].size = atoi(row[24]); - into[rowIndex].is_ldon_door = atoi(row[25]); - into[rowIndex].client_version_mask = (uint32)strtoul(row[26], nullptr, 10); - into[rowIndex].disable_timer = atoi(row[27]); + into[row_index].db_id = static_cast(atoi(row[0])); + into[row_index].door_id = static_cast(atoi(row[1])); + into[row_index].pos_x = (float) atof(row[4]); + into[row_index].pos_y = (float) atof(row[5]); + into[row_index].pos_z = (float) atof(row[6]); + into[row_index].heading = (float) atof(row[7]); + into[row_index].opentype = static_cast(atoi(row[8])); + into[row_index].guild_id = static_cast(atoi(row[9])); + into[row_index].lock_pick = static_cast(atoi(row[10])); + into[row_index].keyitem = static_cast(atoi(row[11])); + into[row_index].nokeyring = static_cast(atoi(row[12])); + into[row_index].trigger_door = static_cast(atoi(row[13])); + into[row_index].trigger_type = static_cast(atoi(row[14])); + into[row_index].dest_instance_id = static_cast(atoi(row[16])); + into[row_index].dest_x = (float) atof(row[17]); + into[row_index].dest_y = (float) atof(row[18]); + into[row_index].dest_z = (float) atof(row[19]); + into[row_index].dest_heading = (float) atof(row[20]); + into[row_index].door_param = static_cast(atoi(row[21])); + into[row_index].invert_state = atoi(row[22]); + into[row_index].incline = atoi(row[23]); + into[row_index].size = static_cast(atoi(row[24])); + into[row_index].is_ldon_door = static_cast(atoi(row[25])); + into[row_index].client_version_mask = (uint32) strtoul(row[26], nullptr, 10); + into[row_index].disable_timer = static_cast(atoi(row[27])); Log(Logs::Detail, Logs::Doors, "Door Load: db id: %u, door_id %u disable_timer: %i", - into[rowIndex].db_id, - into[rowIndex].door_id, - into[rowIndex].disable_timer + into[row_index].db_id, + into[row_index].door_id, + into[row_index].disable_timer ); } @@ -731,7 +797,7 @@ void Doors::SetIncline(int in) { void Doors::SetOpenType(uint8 in) { entity_list.DespawnAllDoors(); - opentype = in; + open_type = in; entity_list.RespawnAllDoors(); } @@ -754,10 +820,26 @@ void Doors::SetDisableTimer(bool flag) { void Doors::CreateDatabaseEntry() { - if(database.GetDoorsDBCountPlusOne(zone->GetShortName(), zone->GetInstanceVersion()) - 1 >= 255) - { + if(database.GetDoorsDBCountPlusOne(zone->GetShortName(), zone->GetInstanceVersion()) - 1 >= 255) { return; } - database.InsertDoor(GetDoorDBID(), GetDoorID(), GetDoorName(), m_Position, GetOpenType(), GetGuildID(), GetLockpick(), GetKeyItem(), GetDoorParam(), GetInvertState(), GetIncline(), GetSize()); + + /** + * Persist + */ + database.InsertDoor( + GetDoorDBID(), + GetDoorID(), + GetDoorName(), + m_Position, + GetOpenType(), + static_cast(GetGuildID()), + GetLockpick(), + GetKeyItem(), + static_cast(GetDoorParam()), + static_cast(GetInvertState()), + GetIncline(), + GetSize() + ); } diff --git a/zone/doors.h b/zone/doors.h index 80af306b8..f112f84f1 100644 --- a/zone/doors.h +++ b/zone/doors.h @@ -16,92 +16,80 @@ struct Door; class Doors : public Entity { public: - Doors(const Door* door); - Doors(const char *dmodel, const glm::vec4& position, uint8 dopentype = 58, uint16 dsize = 100); ~Doors(); - bool IsDoor() const { return true; } - void HandleClick(Client* sender, uint8 trigger); - bool Process(); - uint8 GetDoorID() { return door_id; } - uint32 GetDoorDBID() { return db_id; } - uint32 GetGuildID() { return guild_id; } - uint8 GetOpenType() { return opentype; } - char* GetDoorName() { return door_name; } - uint32 GetDoorParam() { return door_param; } - int GetInvertState() { return invert_state; } - const glm::vec4& GetPosition() const{ return m_Position; } - int GetIncline() { return incline; } - bool triggered; - void SetOpenState(bool st) { is_open = st; } - bool IsDoorOpen() { return is_open; } - uint8 GetTriggerDoorID() { return trigger_door; } - uint8 GetTriggerType() { return trigger_type; } + Doors(const char *model, const glm::vec4& position, uint8 open_type = 58, uint16 size = 100); + Doors(const Door* door); - uint32 GetKeyItem() { return keyitem; } - void SetKeyItem(uint32 in) { keyitem = in; } - uint8 GetNoKeyring() { return nokeyring; } - void SetNoKeyring(uint8 in) { nokeyring = in; } - uint16 GetLockpick() { return lockpick; } - void SetLockpick(uint16 in) { lockpick = in; } - uint16 GetSize() { return size; } - void SetGuildID(uint32 guild_id) { this->guild_id = guild_id; } - - uint32 GetEntityID() { return entity_id; } - void SetEntityID(uint32 entity) { entity_id = entity; } - - void DumpDoor(); + bool GetDisableTimer() { return disable_timer; } + bool IsDoor() const { return true; } + bool IsDoorOpen() { return is_open; } + bool Process(); + bool triggered; + char *GetDoorName() { return door_name; } const glm::vec4 GetDestination() const { return m_Destination; } - - uint8 IsLDoNDoor() { return is_ldon_door; } - uint32 GetClientVersionMask() { return client_version_mask; } - - void NPCOpen(NPC* sender, bool alt_mode=false); - void ForceOpen(Mob *sender, bool alt_mode=false); - void ForceClose(Mob *sender, bool alt_mode=false); - void ToggleState(Mob *sender); - - void SetPosition(const glm::vec4& position); - void SetLocation(float x, float y, float z); - void SetIncline(int in); - void SetDoorName(const char* name); - void SetOpenType(uint8 in); - void SetSize(uint16 size); - - void SetDisableTimer(bool flag); - bool GetDisableTimer() { return disable_timer; } - - void CreateDatabaseEntry(); + const glm::vec4 &GetPosition() const { return m_Position; } + int GetIncline() { return incline; } + int GetInvertState() { return invert_state; } + uint8 GetDoorID() { return door_id; } + uint8 GetNoKeyring() { return no_key_ring; } + uint8 GetOpenType() { return open_type; } + uint8 GetTriggerDoorID() { return trigger_door; } + uint8 GetTriggerType() { return trigger_type; } + uint8 IsLDoNDoor() { return is_ldon_door; } + uint16 GetLockpick() { return lockpick; } + uint16 GetSize() { return size; } + uint32 GetClientVersionMask() { return client_version_mask; } + uint32 GetDoorDBID() { return database_id; } + uint32 GetDoorParam() { return door_param; } + uint32 GetEntityID() { return entity_id; } + uint32 GetGuildID() { return guild_id; } + uint32 GetKeyItem() { return key_item_id; } + void CreateDatabaseEntry(); + void ForceClose(Mob *sender, bool alt_mode = false); + void ForceOpen(Mob *sender, bool alt_mode = false); + void HandleClick(Client *sender, uint8 trigger); + void NPCOpen(NPC *sender, bool alt_mode = false); + void SetDisableTimer(bool flag); + void SetDoorName(const char *name); + void SetEntityID(uint32 entity) { entity_id = entity; } + void SetIncline(int in); + void SetKeyItem(uint32 in) { key_item_id = in; } + void SetLocation(float x, float y, float z); + void SetLockpick(uint16 in) { lockpick = in; } + void SetNoKeyring(uint8 in) { no_key_ring = in; } + void SetOpenState(bool st) { is_open = st; } + void SetOpenType(uint8 in); + void SetPosition(const glm::vec4 &position); + void SetSize(uint16 size); + void ToggleState(Mob *sender); private: - uint32 db_id; - uint8 door_id; - char zone_name[32]; - char door_name[32]; + uint32 database_id; + uint8 door_id; + char zone_name[32]; + char door_name[32]; glm::vec4 m_Position; - int incline; - uint8 opentype; - uint32 guild_id; - uint16 lockpick; - uint32 keyitem; - uint8 nokeyring; - uint8 trigger_door; - uint8 trigger_type; - uint32 door_param; - uint16 size; - int invert_state; - uint32 entity_id; - bool disable_timer; - bool is_open; - Timer close_timer; - //Timer trigger_timer; - - char dest_zone[16]; - int dest_instance_id; + int incline; + uint8 open_type; + uint32 guild_id; + uint16 lockpick; + uint32 key_item_id; + uint8 no_key_ring; + uint8 trigger_door; + uint8 trigger_type; + uint32 door_param; + uint16 size; + int invert_state; + uint32 entity_id; + bool disable_timer; + bool is_open; + Timer close_timer; + char destination_zone_name[16]; + int destination_instance_id; glm::vec4 m_Destination; - - uint8 is_ldon_door; - uint32 client_version_mask; + uint8 is_ldon_door; + uint32 client_version_mask; }; #endif diff --git a/zone/mob.h b/zone/mob.h index 7f5c74121..8e7189696 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -1440,6 +1440,7 @@ protected: std::unique_ptr AI_walking_timer; std::unique_ptr AI_feign_remember_timer; std::unique_ptr AI_check_signal_timer; + std::unique_ptr AI_scan_door_open_timer; uint32 pLastFightingDelayMoving; HateList hate_list; std::set feign_memory_list; diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index c72af8ed9..1685e933e 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -433,6 +433,7 @@ void Mob::AI_Init() AI_feign_remember_timer.reset(nullptr); AI_scan_area_timer.reset(nullptr); AI_check_signal_timer.reset(nullptr); + AI_scan_door_open_timer.reset(nullptr); minLastFightingDelayMoving = RuleI(NPC, LastFightingDelayMovingMin); maxLastFightingDelayMoving = RuleI(NPC, LastFightingDelayMovingMax); @@ -476,15 +477,17 @@ void Mob::AI_Start(uint32 iMoveDelay) { else pLastFightingDelayMoving = 0; - pAIControlled = true; + pAIControlled = true; AI_think_timer = std::unique_ptr(new Timer(AIthink_duration)); AI_think_timer->Trigger(); - AI_walking_timer = std::unique_ptr(new Timer(0)); - AI_movement_timer = std::unique_ptr(new Timer(AImovement_duration)); - AI_target_check_timer = std::unique_ptr(new Timer(AItarget_check_duration)); - AI_feign_remember_timer = std::unique_ptr(new Timer(AIfeignremember_delay)); - if(CastToNPC()->WillAggroNPCs()) + AI_walking_timer = std::unique_ptr(new Timer(0)); + AI_movement_timer = std::unique_ptr(new Timer(AImovement_duration)); + AI_target_check_timer = std::unique_ptr(new Timer(AItarget_check_duration)); + AI_feign_remember_timer = std::unique_ptr(new Timer(AIfeignremember_delay)); + AI_scan_door_open_timer = std::unique_ptr(new Timer(AI_scan_door_open_interval)); + + if (CastToNPC()->WillAggroNPCs()) AI_scan_area_timer = std::unique_ptr(new Timer(RandomTimer(RuleI(NPC, NPCToNPCAggroTimerMin), RuleI(NPC, NPCToNPCAggroTimerMax)))); AI_check_signal_timer = std::unique_ptr(new Timer(AI_check_signal_timer_delay)); @@ -552,6 +555,7 @@ void Mob::AI_Stop() { AI_scan_area_timer.reset(nullptr); AI_feign_remember_timer.reset(nullptr); AI_check_signal_timer.reset(nullptr); + AI_scan_door_open_timer.reset(nullptr); hate_list.WipeHateList(); } @@ -1049,6 +1053,27 @@ void Mob::AI_Process() { engaged = false; } + if (moving) { + if (AI_scan_door_open_timer->Check()) { + + auto &door_list = entity_list.GetDoorsList(); + for (auto itr : door_list) { + Doors* door = itr.second; + + if (door->IsDoorOpen()) { + continue; + } + + float distance = DistanceSquared(this->m_Position, door->GetPosition()); + float distance_scan_door_open = 20; + + if (distance <= (distance_scan_door_open * distance_scan_door_open)) { + door->ForceOpen(this); + } + } + } + } + // Begin: Additions for Wiz Fear Code // if(RuleB(Combat, EnableFearPathing)){ diff --git a/zone/zonedb.h b/zone/zonedb.h index d0e7b1a99..20bfd897a 100644 --- a/zone/zonedb.h +++ b/zone/zonedb.h @@ -469,7 +469,7 @@ public: /* Doors */ bool DoorIsOpen(uint8 door_id,const char* zone_name); void SetDoorPlace(uint8 value,uint8 door_id,const char* zone_name); - bool LoadDoors(int32 iDoorCount, Door *into, const char *zone_name, int16 version); + bool LoadDoors(int32 door_count, Door *into, const char *zone_name, int16 version); bool CheckGuildDoor(uint8 doorid,uint16 guild_id, const char* zone); bool SetGuildDoor(uint8 doorid,uint16 guild_id, const char* zone); uint32 GetGuildEQID(uint32 guilddbid); From d5043975931fa0989594747d4cb4756c8de73d38 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Thu, 10 May 2018 04:19:43 -0500 Subject: [PATCH 164/670] Change map loading paths - maps/base/*.map - maps/water/*.wtr - maps/nav/*.nav --- zone/map.cpp | 9 +++++---- zone/pathfinder_interface.cpp | 2 +- zone/pathfinder_nav_mesh.cpp | 2 ++ zone/water_map.cpp | 11 ++++++++--- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/zone/map.cpp b/zone/map.cpp index 538fe05ab..a63ea6672 100644 --- a/zone/map.cpp +++ b/zone/map.cpp @@ -217,12 +217,13 @@ Map *Map::LoadMapFile(std::string file) { else { filename = Config->MapDir; } + std::transform(file.begin(), file.end(), file.begin(), ::tolower); - filename += "/"; + filename += "/base/"; filename += file; filename += ".map"; - Log(Logs::General, Logs::Status, "Attempting to load Map File :: '%s'", filename.c_str()); + Log(Logs::General, Logs::Status, "Attempting to load Map File '%s'", filename.c_str()); auto m = new Map(); if (m->Load(filename)) { @@ -254,7 +255,7 @@ bool Map::Load(std::string filename) } if(version == 0x01000000) { - Log(Logs::General, Logs::Status, "Loaded V1 Map File :: '%s'", filename.c_str()); + Log(Logs::General, Logs::Status, "Loaded V1 Map File '%s'", filename.c_str()); bool v = LoadV1(f); fclose(f); @@ -265,7 +266,7 @@ bool Map::Load(std::string filename) return v; } else if(version == 0x02000000) { - Log(Logs::General, Logs::Status, "Loaded V2 Map File :: '%s'", filename.c_str()); + Log(Logs::General, Logs::Status, "Loaded V2 Map File '%s'", filename.c_str()); bool v = LoadV2(f); fclose(f); diff --git a/zone/pathfinder_interface.cpp b/zone/pathfinder_interface.cpp index 1773e275f..aca0f96ad 100644 --- a/zone/pathfinder_interface.cpp +++ b/zone/pathfinder_interface.cpp @@ -9,7 +9,7 @@ IPathfinder *IPathfinder::Load(const std::string &zone) { struct stat statbuffer; std::string waypoint_path = fmt::format("maps/{0}.path", zone); - std::string navmesh_path = fmt::format("maps/{0}.nav", zone); + std::string navmesh_path = fmt::format("maps/nav/{0}.nav", zone); if (stat(navmesh_path.c_str(), &statbuffer) == 0) { return new PathfinderNavmesh(navmesh_path); } diff --git a/zone/pathfinder_nav_mesh.cpp b/zone/pathfinder_nav_mesh.cpp index 88afc0ec2..ea6de52bb 100644 --- a/zone/pathfinder_nav_mesh.cpp +++ b/zone/pathfinder_nav_mesh.cpp @@ -281,6 +281,8 @@ void PathfinderNavmesh::Load(const std::string &path) m_impl->nav_mesh->addTile(data, data_size, DT_TILE_FREE_DATA, tile_ref, 0); } + + Log(Logs::General, Logs::Status, "Loaded Navmesh V%u file %s", version, path.c_str()); } } diff --git a/zone/water_map.cpp b/zone/water_map.cpp index f3b4c58d8..d6b84a802 100644 --- a/zone/water_map.cpp +++ b/zone/water_map.cpp @@ -3,6 +3,7 @@ #include "water_map.h" #include "water_map_v1.h" #include "water_map_v2.h" +#include "../common/eqemu_logsys.h" #include #include @@ -12,7 +13,7 @@ WaterMap* WaterMap::LoadWaterMapfile(std::string zone_name) { std::transform(zone_name.begin(), zone_name.end(), zone_name.begin(), ::tolower); - std::string file_path = Config->MapDir + zone_name + std::string(".wtr"); + std::string file_path = Config->MapDir + "water/" + zone_name + std::string(".wtr"); FILE *f = fopen(file_path.c_str(), "rb"); if(f) { char magic[10]; @@ -38,7 +39,9 @@ WaterMap* WaterMap::LoadWaterMapfile(std::string zone_name) { delete wm; wm = nullptr; } - + + Log(Logs::General, Logs::Status, "Loaded Water Map V%u file %s", version, file_path.c_str()); + fclose(f); return wm; } else if(version == 2) { @@ -47,7 +50,9 @@ WaterMap* WaterMap::LoadWaterMapfile(std::string zone_name) { delete wm; wm = nullptr; } - + + Log(Logs::General, Logs::Status, "Loaded Water Map V%u file %s", version, file_path.c_str()); + fclose(f); return wm; } else { From 2c91d1db6ec1f2b00281f840ec2ef3b2cc92dc68 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Fri, 11 May 2018 00:14:24 -0500 Subject: [PATCH 165/670] Make sure NPC's don't open keyed or lockpick enabled doors - also make sure we are opening doors and not platforms above or below --- zone/mob_ai.cpp | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 1685e933e..2efb80cc7 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1058,16 +1058,29 @@ void Mob::AI_Process() { auto &door_list = entity_list.GetDoorsList(); for (auto itr : door_list) { - Doors* door = itr.second; + Doors *door = itr.second; - if (door->IsDoorOpen()) { + if (door->GetKeyItem()) continue; - } - float distance = DistanceSquared(this->m_Position, door->GetPosition()); + if (door->GetLockpick()) + continue; + + if (door->IsDoorOpen()) + continue; + + float distance = DistanceSquared(this->m_Position, door->GetPosition()); float distance_scan_door_open = 20; if (distance <= (distance_scan_door_open * distance_scan_door_open)) { + + /** + * Make sure we're opening a door within height relevance and not platforms + * above or below + */ + if (std::abs(this->m_Position.z - door->GetPosition().z) > 10) + continue; + door->ForceOpen(this); } } From d43273fd1b3fd5e1b65f568e5c4ff5ee546a0376 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Fri, 11 May 2018 00:43:49 -0500 Subject: [PATCH 166/670] Fix some of the Fix Z logic - Boats no longer snap Z - Even though we checked for water, chances are boats pathing was above water and would snap Z to the floor of the water --- zone/waypoints.cpp | 52 +++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index d767ca3c3..8181fe4a2 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -752,55 +752,55 @@ float Mob::GetFixedZ(glm::vec3 dest, int32 z_find_offset) timer.reset(); float new_z = dest.z; - if (zone->HasMap() && RuleB(Map, FixZWhenMoving) && - (flymode != 1 && flymode != 2)) - { - if (!RuleB(Watermap, CheckForWaterWhenMoving) || !zone->HasWaterMap() - || (zone->HasWaterMap() && - !zone->watermap->InWater(glm::vec3(m_Position)))) - { - /* Any more than 5 in the offset makes NPC's hop/snap to ceiling in small corridors */ - new_z = this->FindDestGroundZ(dest, z_find_offset); - if (new_z != BEST_Z_INVALID) - { - new_z += this->GetZOffset(); + if (zone->HasMap() && RuleB(Map, FixZWhenMoving)) { - // If bad new Z restore old one - if (new_z < -2000) { - new_z = m_Position.z; - } + if (flymode == 1 || flymode == 2) + return new_z; + + if (this->IsBoat()) + return new_z; + + if (zone->HasWaterMap() && zone->watermap->InWater(glm::vec3(m_Position))) + return new_z; + + /* + * Any more than 5 in the offset makes NPC's hop/snap to ceiling in small corridors + */ + new_z = this->FindDestGroundZ(dest, z_find_offset); + if (new_z != BEST_Z_INVALID) { + new_z += this->GetZOffset(); + + if (new_z < -2000) { + new_z = m_Position.z; } } auto duration = timer.elapsed(); Log(Logs::Moderate, Logs::FixZ, - "Mob::GetFixedZ() (%s) returned %4.3f at %4.3f, %4.3f, %4.3f - Took %lf", - this->GetCleanName(), new_z, dest.x, dest.y, dest.z, duration); + "Mob::GetFixedZ() (%s) returned %4.3f at %4.3f, %4.3f, %4.3f - Took %lf", + this->GetCleanName(), new_z, dest.x, dest.y, dest.z, duration); } return new_z; } -void Mob::FixZ(int32 z_find_offset /*= 5*/) -{ +void Mob::FixZ(int32 z_find_offset /*= 5*/) { glm::vec3 current_loc(m_Position); - float new_z = GetFixedZ(current_loc, z_find_offset); + float new_z = GetFixedZ(current_loc, z_find_offset); - if (!IsClient() && new_z != m_Position.z) - { + if (!IsClient() && new_z != m_Position.z) { if ((new_z > -2000) && new_z != BEST_Z_INVALID) { if (RuleB(Map, MobZVisualDebug)) this->SendAppearanceEffect(78, 0, 0, 0, 0); m_Position.z = new_z; - } - else { + } else { if (RuleB(Map, MobZVisualDebug)) this->SendAppearanceEffect(103, 0, 0, 0, 0); Log(Logs::General, Logs::FixZ, "%s is failing to find Z %f", - this->GetCleanName(), std::abs(m_Position.z - new_z)); + this->GetCleanName(), std::abs(m_Position.z - new_z)); } } } From eb463eef9707e90dfff3b51a6fa14515226bb4a2 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sat, 12 May 2018 03:31:47 -0500 Subject: [PATCH 167/670] Tweaks to zone shutdown code --- common/timer.cpp | 5 ++--- zone/net.cpp | 5 ----- zone/zone.cpp | 18 ++++++++++++++++-- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/common/timer.cpp b/common/timer.cpp index d5a90a0f2..3b5d8f15e 100644 --- a/common/timer.cpp +++ b/common/timer.cpp @@ -131,12 +131,11 @@ void Timer::SetTimer(uint32 set_timer_time) { uint32 Timer::GetRemainingTime() { if (enabled) { - if (current_time-start_time > timer_time) + if (current_time - start_time > timer_time) return 0; else return (start_time + timer_time) - current_time; - } - else { + } else { return 0xFFFFFFFF; } } diff --git a/zone/net.cpp b/zone/net.cpp index 80411af7b..f51d50bb4 100644 --- a/zone/net.cpp +++ b/zone/net.cpp @@ -541,11 +541,6 @@ int main(int argc, char** argv) { if (previous_loaded && !current_loaded) { process_timer.Stop(); process_timer.Start(1000, true); - - if (zone && zone->GetZoneID() && zone->GetInstanceVersion()) { - uint32 shutdown_timer = database.getZoneShutDownDelay(zone->GetZoneID(), zone->GetInstanceVersion()); - zone->StartShutdownTimer(shutdown_timer); - } } else if (!previous_loaded && current_loaded) { process_timer.Stop(); diff --git a/zone/zone.cpp b/zone/zone.cpp index f4a1e86e8..d43527c4f 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -150,8 +150,15 @@ bool Zone::Bootup(uint32 iZoneID, uint32 iInstanceID, bool iStaticZone) { zone->RequestUCSServerStatus(); - /* Set Logging */ + /** + * Set Shutdown timer + */ + uint32 shutdown_timer = static_cast(database.getZoneShutDownDelay(zone->GetZoneID(), zone->GetInstanceVersion())); + zone->StartShutdownTimer(shutdown_timer); + /* + * Set Logging + */ LogSys.StartFileLogs(StringFormat("%s_version_%u_inst_id_%u_port_%u", zone->GetShortName(), zone->GetInstanceVersion(), zone->GetInstanceID(), ZoneConfig::get()->ZonePort)); return true; @@ -1427,11 +1434,18 @@ bool Zone::HasWeather() void Zone::StartShutdownTimer(uint32 set_time) { if (set_time > autoshutdown_timer.GetRemainingTime()) { if (set_time == (RuleI(Zone, AutoShutdownDelay))) { - set_time = database.getZoneShutDownDelay(GetZoneID(), GetInstanceVersion()); + set_time = static_cast(database.getZoneShutDownDelay(GetZoneID(), GetInstanceVersion())); } autoshutdown_timer.SetTimer(set_time); Log(Logs::General, Logs::Zone_Server, "Zone::StartShutdownTimer set to %u", set_time); } + + Log(Logs::Detail, Logs::Zone_Server, + "Zone::StartShutdownTimer trigger - set_time: %u remaining_time: %u diff: %i", + set_time, + autoshutdown_timer.GetRemainingTime(), + (set_time - autoshutdown_timer.GetRemainingTime()) + ); } bool Zone::Depop(bool StartSpawnTimer) { From 66aaa92bd1f89fd71eacf2215a6da16b8704efb9 Mon Sep 17 00:00:00 2001 From: KimLS Date: Sat, 12 May 2018 22:16:50 -0700 Subject: [PATCH 168/670] Changes to stuck handling that should result in fewer actually stuck npcs --- zone/pathing.cpp | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/zone/pathing.cpp b/zone/pathing.cpp index 9996270cb..9e14daa0d 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -188,12 +188,24 @@ glm::vec3 Mob::HandleStuckPath(const glm::vec3 &To, const glm::vec3 &From) bool partial = false; bool stuck = false; auto r = zone->pathing->FindRoute(To, From, partial, stuck); - Route.clear(); + Route.clear(); + + if (r.size() < 1) { + Teleport(To); + return To; + } - auto final_node = r.back(); - Route.push_back(final_node); - AdjustRoute(Route, flymode, GetZOffset()); - return (*Route.begin()).pos; + auto iter = r.rbegin(); + auto final_node = (*iter); + Teleport(final_node.pos); + + if (r.size() < 2) { + return final_node.pos; + } + else { + iter++; + return (*iter).pos; + } } void CullPoints(std::vector &points) { From 80c76433967fa63f5fa083d61273ad09e82b551a Mon Sep 17 00:00:00 2001 From: KimLS Date: Sat, 12 May 2018 22:30:07 -0700 Subject: [PATCH 169/670] Fix for spaces instead of tabs --- zone/pathing.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/zone/pathing.cpp b/zone/pathing.cpp index 9e14daa0d..4829bcc83 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -188,24 +188,24 @@ glm::vec3 Mob::HandleStuckPath(const glm::vec3 &To, const glm::vec3 &From) bool partial = false; bool stuck = false; auto r = zone->pathing->FindRoute(To, From, partial, stuck); - Route.clear(); - - if (r.size() < 1) { - Teleport(To); - return To; - } + Route.clear(); + + if (r.size() < 1) { + Teleport(To); + return To; + } - auto iter = r.rbegin(); - auto final_node = (*iter); - Teleport(final_node.pos); + auto iter = r.rbegin(); + auto final_node = (*iter); + Teleport(final_node.pos); - if (r.size() < 2) { - return final_node.pos; - } - else { - iter++; - return (*iter).pos; - } + if (r.size() < 2) { + return final_node.pos; + } + else { + iter++; + return (*iter).pos; + } } void CullPoints(std::vector &points) { From e28ddcff25cd377161964ab7835256fb5b84d32c Mon Sep 17 00:00:00 2001 From: Natedog2012 Date: Mon, 14 May 2018 01:11:32 -0700 Subject: [PATCH 170/670] Fix size of AltCurrencySelectItem_Struct in RoF2 --- common/patches/rof2_structs.h | 1 - 1 file changed, 1 deletion(-) diff --git a/common/patches/rof2_structs.h b/common/patches/rof2_structs.h index 5be96e071..13ce49f6e 100644 --- a/common/patches/rof2_structs.h +++ b/common/patches/rof2_structs.h @@ -2346,7 +2346,6 @@ struct AltCurrencySelectItem_Struct /*064*/ uint32 unknown064; /*068*/ uint32 unknown068; /*072*/ uint32 unknown072; -/*076*/ uint32 unknown076; }; //Server -> Client From a828443b465e7c6ee67009a51c50659f5744679c Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Tue, 15 May 2018 22:12:18 -0400 Subject: [PATCH 171/670] Add OP_TaskRequestTimer to patch files This is the lockout timer before you can request a task again Currently unimplemented --- utils/patches/patch_RoF.conf | 1 + utils/patches/patch_RoF2.conf | 1 + utils/patches/patch_SoD.conf | 3 +++ utils/patches/patch_SoF.conf | 1 + utils/patches/patch_Titanium.conf | 1 + utils/patches/patch_UF.conf | 1 + 6 files changed, 8 insertions(+) diff --git a/utils/patches/patch_RoF.conf b/utils/patches/patch_RoF.conf index b348ea1ad..9467ab337 100644 --- a/utils/patches/patch_RoF.conf +++ b/utils/patches/patch_RoF.conf @@ -562,6 +562,7 @@ OP_AvaliableTask=0x2bf8 # Was 0x2377 OP_TaskHistoryRequest=0x6cf6 OP_TaskHistoryReply=0x25eb OP_DeclineAllTasks=0x0000 +OP_TaskRequestTimer=0x4b76 # Title opcodes OP_NewTitlesAvailable=0x45d1 diff --git a/utils/patches/patch_RoF2.conf b/utils/patches/patch_RoF2.conf index 9bd507bc1..f410a3193 100644 --- a/utils/patches/patch_RoF2.conf +++ b/utils/patches/patch_RoF2.conf @@ -567,6 +567,7 @@ OP_AvaliableTask=0x36e8 OP_TaskHistoryRequest=0x5f1c OP_TaskHistoryReply=0x3d05 OP_DeclineAllTasks=0x0000 +OP_TaskRequestTimer=0x7a48 # Title opcodes OP_NewTitlesAvailable=0x0d32 diff --git a/utils/patches/patch_SoD.conf b/utils/patches/patch_SoD.conf index ab8267a8a..d836c6360 100644 --- a/utils/patches/patch_SoD.conf +++ b/utils/patches/patch_SoD.conf @@ -533,6 +533,9 @@ OP_TaskHistoryRequest=0x29d7 # C OP_TaskHistoryReply=0x3d2a # C OP_CancelTask=0x726b # C OP_DeclineAllTasks=0x0000 # +OP_TaskRequestTimer=0x2e70 + + OP_Shroud=0x6d1f OP_ShroudRemove=0x17f6 OP_ShroudUnknown1=0x169a diff --git a/utils/patches/patch_SoF.conf b/utils/patches/patch_SoF.conf index 6360617a2..a10715918 100644 --- a/utils/patches/patch_SoF.conf +++ b/utils/patches/patch_SoF.conf @@ -509,6 +509,7 @@ OP_TaskAddPlayer=0x5d1d OP_TaskRemovePlayer=0x516f OP_TaskPlayerList=0x0ad6 OP_TaskQuit=0x2c8c +OP_TaskRequestTimer=0x0b08 #Title opcodes OP_NewTitlesAvailable=0x179c # diff --git a/utils/patches/patch_Titanium.conf b/utils/patches/patch_Titanium.conf index 27aa18376..9a7e1e800 100644 --- a/utils/patches/patch_Titanium.conf +++ b/utils/patches/patch_Titanium.conf @@ -474,6 +474,7 @@ OP_TaskAddPlayer=0x6bc4 OP_TaskRemovePlayer=0x37b9 OP_TaskPlayerList=0x3961 OP_TaskQuit=0x35dd +OP_TaskRequestTimer=0x6a1d #task complete related: 0x0000 (24 bytes), 0x0000 (8 bytes), 0x0000 (4 bytes) diff --git a/utils/patches/patch_UF.conf b/utils/patches/patch_UF.conf index c08edbca3..71966dcbb 100644 --- a/utils/patches/patch_UF.conf +++ b/utils/patches/patch_UF.conf @@ -556,6 +556,7 @@ OP_TaskHistoryRequest=0x547c # C OP_TaskHistoryReply=0x4524 # C OP_CancelTask=0x3bf5 # C OP_DeclineAllTasks=0x0000 # +OP_TaskRequestTimer=0x719e # Title opcodes OP_NewTitlesAvailable=0x4b49 # C From f46e4f9aa42b0e2392cff0e62cc3dd95686a7cd2 Mon Sep 17 00:00:00 2001 From: KimLS Date: Sun, 20 May 2018 17:24:00 -0700 Subject: [PATCH 172/670] Some tweaks so its harder to get npcs intentionally stuck --- zone/aggro.cpp | 9 ++++++++- zone/pathfinder_nav_mesh.cpp | 6 +++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/zone/aggro.cpp b/zone/aggro.cpp index d73b96f6f..91d14498f 100644 --- a/zone/aggro.cpp +++ b/zone/aggro.cpp @@ -931,7 +931,9 @@ bool Mob::CombatRange(Mob* other) if (size_mod > 10000) size_mod = size_mod / 7; - float _DistNoRoot = DistanceSquared(m_Position, other->GetPosition()); + float _DistNoRoot = DistanceSquaredNoZ(m_Position, other->GetPosition()); + float _zDist = m_Position.z - other->GetZ(); + _zDist *= _zDist; if (GetSpecialAbility(NPC_CHASE_DISTANCE)){ @@ -960,6 +962,11 @@ bool Mob::CombatRange(Mob* other) if (_DistNoRoot <= size_mod) { + //A hack to kill an exploit till we get something better. + if (flymode == 0 && _zDist > 500 && !CheckLastLosState()) { + return false; + } + return true; } return false; diff --git a/zone/pathfinder_nav_mesh.cpp b/zone/pathfinder_nav_mesh.cpp index ea6de52bb..fb2d23e9b 100644 --- a/zone/pathfinder_nav_mesh.cpp +++ b/zone/pathfinder_nav_mesh.cpp @@ -59,12 +59,12 @@ IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const gl filter.setAreaCost(6, 1.5f); //Ice filter.setAreaCost(7, 3.0f); //V Water (Frigid Water) filter.setAreaCost(8, 1.0f); //General Area - filter.setAreaCost(9, 1.0f); //Portal - filter.setAreaCost(10, 0.5f); //Prefer + filter.setAreaCost(9, 0.1f); //Portal + filter.setAreaCost(10, 0.1f); //Prefer dtPolyRef start_ref; dtPolyRef end_ref; - glm::vec3 ext(15.0f, 100.0f, 15.0f); + glm::vec3 ext(5.0f, 100.0f, 5.0f); m_impl->query->findNearestPoly(¤t_location[0], &ext[0], &filter, &start_ref, 0); m_impl->query->findNearestPoly(&dest_location[0], &ext[0], &filter, &end_ref, 0); From b8a844b9dc99e94fb54a7e537a5b5461634a330c Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Mon, 21 May 2018 18:40:22 -0400 Subject: [PATCH 173/670] Kerran illusion spell uses 562 not 23. --- zone/mob.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/mob.cpp b/zone/mob.cpp index d23aaf0b4..85bdc2888 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -2090,7 +2090,7 @@ bool Mob::IsPlayerRace(uint16 in_race) { uint8 Mob::GetDefaultGender(uint16 in_race, uint8 in_gender) { - if (Mob::IsPlayerRace(in_race) || in_race == 15 || in_race == 50 || in_race == 57 || in_race == 70 || in_race == 98 || in_race == 118 || in_race == 23) { + if (Mob::IsPlayerRace(in_race) || in_race == 15 || in_race == 50 || in_race == 57 || in_race == 70 || in_race == 98 || in_race == 118 || in_race == 562) { if (in_gender >= 2) { // Male default for PC Races return 0; From d0e960e64b14ffd1fd6325f71ed01477f22c41c7 Mon Sep 17 00:00:00 2001 From: Chris Miles Date: Mon, 21 May 2018 19:30:51 -0500 Subject: [PATCH 174/670] Ubuntu Server 18 LTS compile fix --- utils/scripts/linux_installer/install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/scripts/linux_installer/install.sh b/utils/scripts/linux_installer/install.sh index bffa2d939..8f6f2f4d4 100644 --- a/utils/scripts/linux_installer/install.sh +++ b/utils/scripts/linux_installer/install.sh @@ -120,6 +120,7 @@ if [[ "$OS" == "Debian" ]]; then apt-get $apt_options install libsodium-dev apt-get $apt_options install libsodium18 apt-get $apt_options install libjson-perl + apt-get $apt_options install libssl-dev # Install libsodium wget http://ftp.us.debian.org/debian/pool/main/libs/libsodium/libsodium-dev_1.0.11-1~bpo8+1_amd64.deb -O /home/eqemu/libsodium-dev.deb From add0c4de47539accd12f2ebf39d9b1ab7cf2956a Mon Sep 17 00:00:00 2001 From: KimLS Date: Thu, 24 May 2018 22:25:00 -0700 Subject: [PATCH 175/670] Added ignore flag for navmesh --- zone/pathfinder_nav_mesh.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/zone/pathfinder_nav_mesh.cpp b/zone/pathfinder_nav_mesh.cpp index fb2d23e9b..46e4ead56 100644 --- a/zone/pathfinder_nav_mesh.cpp +++ b/zone/pathfinder_nav_mesh.cpp @@ -50,14 +50,14 @@ IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const gl glm::vec3 dest_location(end.x, end.z, end.y); dtQueryFilter filter; - filter.setIncludeFlags(65535U); + filter.setIncludeFlags(65535U ^ 2048); filter.setAreaCost(0, 1.0f); //Normal - filter.setAreaCost(1, 2.0f); //Water - filter.setAreaCost(2, 4.0f); //Lava + filter.setAreaCost(1, 3.0f); //Water + filter.setAreaCost(2, 5.0f); //Lava filter.setAreaCost(4, 1.0f); //PvP - filter.setAreaCost(5, 1.5f); //Slime - filter.setAreaCost(6, 1.5f); //Ice - filter.setAreaCost(7, 3.0f); //V Water (Frigid Water) + filter.setAreaCost(5, 2.0f); //Slime + filter.setAreaCost(6, 2.0f); //Ice + filter.setAreaCost(7, 4.0f); //V Water (Frigid Water) filter.setAreaCost(8, 1.0f); //General Area filter.setAreaCost(9, 0.1f); //Portal filter.setAreaCost(10, 0.1f); //Prefer From 05ae8c8219d16c3bc26f5866e890e35a47191599 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Fri, 25 May 2018 22:41:46 -0500 Subject: [PATCH 176/670] Add rule Aggro:NPCAggroMaxDistanceEnabled - enabled by default If enabled, NPC's will drop aggro beyond 600 units or what is defined at the zone level --- common/ruletypes.h | 1 + zone/mob.cpp | 2 +- zone/mob.h | 2 +- zone/mob_ai.cpp | 6 +++++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/common/ruletypes.h b/common/ruletypes.h index 08adb5893..0233f0952 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -549,6 +549,7 @@ RULE_BOOL(Aggro, AllowTickPulling, false) // tick pulling is an exploit in an NP RULE_BOOL(Aggro, UseLevelAggro, true) // Level 18+ and Undead will aggro regardless of level difference. (this will disabled Rule:IntAggroThreshold if set to true) RULE_INT(Aggro, ClientAggroCheckInterval, 6) // Interval in which clients actually check for aggro - in seconds RULE_REAL(Aggro, PetAttackRange, 40000.0) // max squared range /pet attack works at default is 200 +RULE_BOOL(Aggro, NPCAggroMaxDistanceEnabled, true) /* If enabled, NPC's will drop aggro beyond 600 units or what is defined at the zone level */ RULE_CATEGORY_END() RULE_CATEGORY(TaskSystem) diff --git a/zone/mob.cpp b/zone/mob.cpp index 52f9059a9..c0130d5ae 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -116,7 +116,7 @@ Mob::Mob(const char* in_name, fix_z_timer_engaged(100), attack_anim_timer(1000), position_update_melee_push_timer(500), - mHateListCleanup(6000) + hate_list_cleanup_timer(6000) { targeted = 0; tar_ndx = 0; diff --git a/zone/mob.h b/zone/mob.h index 8e7189696..5be772643 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -1453,7 +1453,7 @@ protected: void AddItemFactionBonus(uint32 pFactionID,int32 bonus); int32 GetItemFactionBonus(uint32 pFactionID); void ClearItemFactionBonuses(); - Timer mHateListCleanup; + Timer hate_list_cleanup_timer; bool flee_mode; Timer flee_timer; diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 2efb80cc7..3d9bb842a 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -487,6 +487,10 @@ void Mob::AI_Start(uint32 iMoveDelay) { AI_feign_remember_timer = std::unique_ptr(new Timer(AIfeignremember_delay)); AI_scan_door_open_timer = std::unique_ptr(new Timer(AI_scan_door_open_interval)); + if(!RuleB(Aggro, NPCAggroMaxDistanceEnabled)) { + hate_list_cleanup_timer.Disable(); + } + if (CastToNPC()->WillAggroNPCs()) AI_scan_area_timer = std::unique_ptr(new Timer(RandomTimer(RuleI(NPC, NPCToNPCAggroTimerMin), RuleI(NPC, NPCToNPCAggroTimerMax)))); @@ -1163,7 +1167,7 @@ void Mob::AI_Process() { // NPCs will forget people after 10 mins of not interacting with them or out of range // both of these maybe zone specific, hardcoded for now - if (mHateListCleanup.Check()) { + if (hate_list_cleanup_timer.Check()) { hate_list.RemoveStaleEntries(600000, 600.0f); if (hate_list.IsHateListEmpty()) { AI_Event_NoLongerEngaged(); From 0e8672562a32324303bc50fd681697cc9be8bccb Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sat, 26 May 2018 17:39:57 -0500 Subject: [PATCH 177/670] Fix issue where some perl calls were unintentionally renamed --- zone/embparser_api.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/zone/embparser_api.cpp b/zone/embparser_api.cpp index bc25708bc..54c136c55 100644 --- a/zone/embparser_api.cpp +++ b/zone/embparser_api.cpp @@ -3385,20 +3385,20 @@ XS(XS__GetTimeSeconds) XSRETURN_UV(seconds); } -XS(XS__crosszonesignalclientbychar_id); -XS(XS__crosszonesignalclientbychar_id) +XS(XS__crosszonesignalclientbycharid); +XS(XS__crosszonesignalclientbycharid) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: crosszonesignalclientbychar_id(char_id, int_value)"); + Perl_croak(aTHX_ "Usage: crosszonesignalclientbycharid(char_id, int_value)"); if (items == 2) { int char_id = (int)SvIV(ST(0)); uint32 int_value = (uint32)SvIV(ST(1)); quest_manager.CrossZoneSignalPlayerByCharID(char_id, int_value); } else { - Perl_croak(aTHX_ "Usage: crosszonesignalclientbychar_id(char_id, int_value)"); + Perl_croak(aTHX_ "Usage: crosszonesignalclientbycharid(char_id, int_value)"); } XSRETURN_EMPTY; @@ -3410,14 +3410,14 @@ XS(XS__crosszonesignalclientbyname) dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: crosszonesignalclientbychar_id(name, int_value)"); + Perl_croak(aTHX_ "Usage: crosszonesignalclientbycharid(name, int_value)"); if (items == 2) { char *name = (char *)SvPV_nolen(ST(0)); uint32 int_value = (uint32)SvIV(ST(1)); quest_manager.CrossZoneSignalPlayerByName(name, int_value); } else { - Perl_croak(aTHX_ "Usage: crosszonesignalclientbychar_id(name, int_value)"); + Perl_croak(aTHX_ "Usage: crosszonesignalclientbycharid(name, int_value)"); } XSRETURN_EMPTY; @@ -3558,13 +3558,13 @@ XS(XS__crosszonesetentityvariablebynpctypeid) XSRETURN_EMPTY; } -XS(XS__crosszonesetentityvariablebyclient_name); -XS(XS__crosszonesetentityvariablebyclient_name) +XS(XS__crosszonesetentityvariablebyclientname); +XS(XS__crosszonesetentityvariablebyclientname) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: crosszonesetentityvariablebyclient_name(client_name, key, str_value)"); + Perl_croak(aTHX_ "Usage: crosszonesetentityvariablebyclientname(client_name, key, str_value)"); if (items == 3) { const char *client_name = (const char *)SvPV_nolen(ST(0)); @@ -3743,8 +3743,8 @@ EXTERN_C XS(boot_quest) newXS(strcpy(buf, "createguild"), XS__createguild, file); newXS(strcpy(buf, "crosszonemessageplayerbyname"), XS__crosszonemessageplayerbyname, file); newXS(strcpy(buf, "crosszonesetentityvariablebynpctypeid"), XS__crosszonesetentityvariablebynpctypeid, file); - newXS(strcpy(buf, "crosszonesetentityvariablebyclient_name"), XS__crosszonesetentityvariablebyclient_name, file); - newXS(strcpy(buf, "crosszonesignalclientbychar_id"), XS__crosszonesignalclientbychar_id, file); + newXS(strcpy(buf, "crosszonesetentityvariablebyclientname"), XS__crosszonesetentityvariablebyclientname, file); + newXS(strcpy(buf, "crosszonesignalclientbycharid"), XS__crosszonesignalclientbycharid, file); newXS(strcpy(buf, "crosszonesignalclientbyname"), XS__crosszonesignalclientbyname, file); newXS(strcpy(buf, "crosszonesignalnpcbynpctypeid"), XS__crosszonesignalnpcbynpctypeid, file); newXS(strcpy(buf, "worldwidemarquee"), XS__worldwidemarquee, file); From a20615ea1178f0c5ee548168e762b8e2e0aba285 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 27 May 2018 23:13:43 -0500 Subject: [PATCH 178/670] Add an up to date easy to read race defines list --- common/races.h | 1135 +++++++++++++++++++++++++++++++----------------- 1 file changed, 726 insertions(+), 409 deletions(-) diff --git a/common/races.h b/common/races.h index 4f4eea1cc..5e7411a25 100644 --- a/common/races.h +++ b/common/races.h @@ -878,415 +878,732 @@ namespace PlayerAppearance bool IsValidWoad(uint16 race_id, uint8 gender_id, uint8 woad_value, bool use_luclin = true); } -/* - -//pulled from the client by ksmith: -$races_table = array( - 1 => "Human", - 2 => "Barbarian", - 3 => "Erudite", - 4 => "Wood Elf", - 5 => "High Elf", - 6 => "Dark Elf", - 7 => "Half Elf", - 8 => "Dwarf", - 9 => "Troll", - 10 => "Ogre", - 11 => "Halfling", - 12 => "Gnome", - 13 => "Aviak", - 14 => "Were Wolf", - 15 => "Brownie", - 16 => "Centaur", - 17 => "Golem", - 18 => "Giant / Cyclops", - 19 => "Trakenon", - 20 => "Doppleganger", - 21 => "Evil Eye", - 22 => "Beetle", - 23 => "Kerra", - 24 => "Fish", - 25 => "Fairy", - 26 => "Old Froglok", - 27 => "Old Froglok Ghoul", - 28 => "Fungusman", - 29 => "Gargoyle", - 30 => "Gasbag", - 31 => "Gelatinous Cube", - 32 => "Ghost", - 33 => "Ghoul", - 34 => "Giant Bat", - 35 => "Giant Eel", - 36 => "Giant Rat", - 37 => "Giant Snake", - 38 => "Giant Spider", - 39 => "Gnoll", - 40 => "Goblin", - 41 => "Gorilla", - 42 => "Wolf", - 43 => "Bear", - 44 => "Freeport Guards", - 45 => "Demi Lich", - 46 => "Imp", - 47 => "Griffin", - 48 => "Kobold", - 49 => "Lava Dragon", - 50 => "Lion", - 51 => "Lizard Man", - 52 => "Mimic", - 53 => "Minotaur", - 54 => "Orc", - 55 => "Human Beggar", - 56 => "Pixie", - 57 => "Dracnid", - 58 => "Solusek Ro", - 59 => "Bloodgills", - 60 => "Skeleton", - 61 => "Shark", - 62 => "Tunare", - 63 => "Tiger", - 64 => "Treant", - 65 => "Vampire", - 66 => "Rallos Zek", - 67 => "Highpass Citizen", - 68 => "Tentacle", - 69 => "Will 'O Wisp", - 70 => "Zombie", - 71 => "Qeynos Citizen", - 72 => "Ship", - 73 => "Launch", - 74 => "Piranha", - 75 => "Elemental", - 76 => "Puma", - 77 => "Neriak Citizen", - 78 => "Erudite Citizen", - 79 => "Bixie", - 80 => "Reanimated Hand", - 81 => "Rivervale Citizen", - 82 => "Scarecrow", - 83 => "Skunk", - 84 => "Snake Elemental", - 85 => "Spectre", - 86 => "Sphinx", - 87 => "Armadillo", - 88 => "Clockwork Gnome", - 89 => "Drake", - 90 => "Halas Citizen", - 91 => "Alligator", - 92 => "Grobb Citizen", - 93 => "Oggok Citizen", - 94 => "Kaladim Citizen", - 95 => "Cazic Thule", - 96 => "Cockatrice", - 97 => "Daisy Man", - 98 => "Elf Vampire", - 99 => "Denizen", - 100 => "Dervish", - 101 => "Efreeti", - 102 => "Old Froglok Tadpole", - 103 => "Kedge", - 104 => "Leech", - 105 => "Swordfish", - 106 => "Felguard", - 107 => "Mammoth", - 108 => "Eye of Zomm", - 109 => "Wasp", - 110 => "Mermaid", - 111 => "Harpie", - 112 => "Fayguard", - 113 => "Drixie", - 114 => "Ghost Ship", - 115 => "Clam", - 116 => "Sea Horse", - 117 => "Ghost Dwarf", - 118 => "Erudite Ghost", - 119 => "Sabertooth Cat", - 120 => "Wolf Elemental", - 121 => "Gorgon", - 122 => "Dragon Skeleton", - 123 => "Innoruuk", - 124 => "Unicorn", - 125 => "Pegasus", - 126 => "Djinn", - 127 => "Invisible Man", - 128 => "Iksar", - 129 => "Scorpion", - 130 => "Vah Shir", - 131 => "Sarnak", - 132 => "Draglock", - 133 => "Lycanthrope", - 134 => "Mosquito", - 135 => "Rhino", - 136 => "Xalgoz", - 137 => "Kunark Goblin", - 138 => "Yeti", - 139 => "Iksar Citizen", - 140 => "Forest Giant", - 141 => "Boat", - 142 => "UNKNOWN RACE", - 143 => "UNKNOWN RACE", - 144 => "Burynai", - 145 => "Goo", - 146 => "Spectral Sarnak", - 147 => "Spectral Iksar", - 148 => "Kunark Fish", - 149 => "Iksar Scorpion", - 150 => "Erollisi", - 151 => "Tribunal", - 152 => "Bertoxxulous", - 153 => "Bristlebane", - 154 => "Fay Drake", - 155 => "Sarnak Skeleton", - 156 => "Ratman", - 157 => "Wyvern", - 158 => "Wurm", - 159 => "Devourer", - 160 => "Iksar Golem", - 161 => "Iksar Skeleton", - 162 => "Man Eating Plant", - 163 => "Raptor", - 164 => "Sarnak Golem", - 165 => "Water Dragon", - 166 => "Iksar Hand", - 167 => "Succulent", - 168 => "Flying Monkey", - 169 => "Brontotherium", - 170 => "Snow Dervish", - 171 => "Dire Wolf", - 172 => "Manticore", - 173 => "Totem", - 174 => "Cold Spectre", - 175 => "Enchanted Armor", - 176 => "Snow Bunny", - 177 => "Walrus", - 178 => "Rock-gem Men", - 179 => "UNKNOWN RACE", - 180 => "UNKNOWN RACE", - 181 => "Yak Man", - 182 => "Faun", - 183 => "Coldain", - 184 => "Velious Dragons", - 185 => "Hag", - 186 => "Hippogriff", - 187 => "Siren", - 188 => "Frost Giant", - 189 => "Storm Giant", - 190 => "Ottermen", - 191 => "Walrus Man", - 192 => "Clockwork Dragon", - 193 => "Abhorent", - 194 => "Sea Turtle", - 195 => "Black and White Dragons", - 196 => "Ghost Dragon", - 197 => "Ronnie Test", - 198 => "Prismatic Dragon", - 199 => "ShikNar", - 200 => "Rockhopper", - 201 => "Underbulk", - 202 => "Grimling", - 203 => "Vacuum Worm", - 204 => "Evan Test", - 205 => "Kahli Shah", - 206 => "Owlbear", - 207 => "Rhino Beetle", - 208 => "Vampyre", - 209 => "Earth Elemental", - 210 => "Air Elemental", - 211 => "Water Elemental", - 212 => "Fire Elemental", - 213 => "Wetfang Minnow", - 214 => "Thought Horror", - 215 => "Tegi", - 216 => "Horse", - 217 => "Shissar", - 218 => "Fungal Fiend", - 219 => "Vampire Volatalis", - 220 => "StoneGrabber", - 221 => "Scarlet Cheetah", - 222 => "Zelniak", - 223 => "Lightcrawler", - 224 => "Shade", - 225 => "Sunflower", - 226 => "Sun Revenant", - 227 => "Shrieker", - 228 => "Galorian", - 229 => "Netherbian", - 230 => "Akheva", - 231 => "Spire Spirit", - 232 => "Sonic Wolf", - 233 => "Ground Shaker", - 234 => "Vah Shir Skeleton", - 235 => "Mutant Humanoid", - 236 => "Seru", - 237 => "Recuso", - 238 => "Vah Shir King", - 239 => "Vah Shir Guard", - 240 => "Teleport Man", - 241 => "Lujein", - 242 => "Naiad", - 243 => "Nymph", - 244 => "Ent", - 245 => "Fly Man", - 246 => "Tarew Marr", - 247 => "Sol Ro", - 248 => "Clockwork Golem", - 249 => "Clockwork Brain", - 250 => "Spectral Banshee", - 251 => "Guard of Justice", - 252 => "UNKNOWN RACE", - 253 => "Disease Boss", - 254 => "Sol Ro Guard", - 255 => "New Bertox", - 256 => "New Tribunal", - 257 => "Terris Thule", - 258 => "Vegerog", - 259 => "Crocodile", - 260 => "Bat", - 261 => "Slarghilug", - 262 => "Tranquilion", - 263 => "Tin Soldier", - 264 => "Nightmare Wraith", - 265 => "Malarian", - 266 => "Knight of Pestilence", - 267 => "Lepertoloth", - 268 => "Bubonian Boss", - 269 => "Bubonian Underling", - 270 => "Pusling", - 271 => "Water Mephit", - 272 => "Stormrider", - 273 => "Junk Beast", - 274 => "Broken Clockwork", - 275 => "Giant Clockwork", - 276 => "Clockwork Beetle", - 277 => "Nightmare Goblin", - 278 => "Karana", - 279 => "Blood Raven", - 280 => "Nightmare Gargoyle", - 281 => "Mouths of Insanity", - 282 => "Skeletal Horse", - 283 => "Saryn", - 284 => "Fennin Ro", - 285 => "Tormentor", - 286 => "Necro Priest", - 287 => "Nightmare", - 288 => "New Rallos Zek", - 289 => "Vallon Zek", - 290 => "Tallon Zek", - 291 => "Air Mephit", - 292 => "Earth Mephit", - 293 => "Fire Mephit", - 294 => "Nightmare Mephit", - 295 => "Zebuxoruk", - 296 => "Mithaniel Marr", - 297 => "Undead Knight", - 298 => "The Rathe", - 299 => "Xegony", - 300 => "Fiend", - 301 => "Test Object", - 302 => "Crab", - 303 => "Phoenix", - 304 => "PoP Dragon", - 305 => "PoP Bear", - 306 => "Storm Taarid", - 307 => "Storm Satuur", - 308 => "Storm Kuraaln", - 309 => "Storm Volaas", - 310 => "Storm Mana", - 311 => "Storm Fire", - 312 => "Storm Celestial", - 313 => "War Wraith", - 314 => "Wrulon", - 315 => "Kraken", - 316 => "Poison Frog", - 317 => "Queztocoatal", - 318 => "Valorian", - 319 => "War Boar", - 320 => "PoP Efreeti", - 321 => "War Boar Unarmored", - 322 => "Black Knight", - 323 => "Animated Armor", - 324 => "Undead Footman", - 325 => "Rallos Zek Minion", - 326 => "Arachnid", - 327 => "Crystal Spider", - 328 => "Zeb Cage", - 329 => "BoT Portal", - 330 => "Froglok", - 331 => "Troll Buccaneer", - 332 => "Troll Freebooter", - 333 => "Troll Sea Rover", - 334 => "Spectre Pirate Boss", - 335 => "Pirate Boss", - 336 => "Pirate Dark Shaman", - 337 => "Pirate Officer", - 338 => "Gnome Pirate", - 339 => "Dark Elf Pirate", - 340 => "Ogre Pirate", - 341 => "Human Pirate", - 342 => "Erudite Pirate", - 343 => "Poison Dart Frog", - 344 => "Troll Zombie", - 345 => "Luggald Land", - 346 => "Luggald Armored", - 347 => "Luggald Robed", - 348 => "Froglok Mount", - 349 => "Froglok Skeleton", - 350 => "Undead Froglok", - 351 => "Chosen Warrior", - 352 => "Chosen Wizard", - 353 => "Veksar", - 354 => "Greater Veksar", - 355 => "Veksar Boss", - 356 => "Chokadai", - 357 => "Undead Chokadai", - 358 => "Undead Veksar", - 359 => "Vampire Lesser", - 360 => "Vampire Elite", - 361 => "Rujakian Orc", - 362 => "Bone Golem", - 363 => "Synarcana", - 364 => "Sand Elf", - 365 => "Vampire Master", - 366 => "Rujakian Orc Elite", - 367 => "Skeleton New", - 368 => "Mummy New", - 369 => "Goblin New", - 370 => "Insect", - 371 => "Froglok Ghost", - 372 => "Dervish New", - 373 => "Shadow Creatue", - 374 => "Golem New", - 375 => "Evil Eye New", - 376 => "Box", - 377 => "Barrel", - 378 => "Chest", - 379 => "Vase", - 380 => "Table", - 381 => "Weapons Rack", - 382 => "Coffin", - 383 => "Bones", - 384 => "Jokester", - 385 => "Talosian Nihil", - 386 => "Talosian Exile", - 387 => "Talosian Golem", - 388 => "Talosian Wolf", - 389 => "Talosian Amphibian", - 390 => "Talosian Mountain Beast", - 391 => "Talosian Trilobyte", - 392 => "Invader War Hound", - 393 => "Invader Elite Centaur", - 394 => "Invader Lamia", - 395 => "Invader Cyclops", - 396 => "Kyv", - 397 => "Invader Soldier", - 398 => "Invader Brute", - 399 => "Invader Force Commander", - 400 => "Invader Lieutenant Boss", - 401 => "Invader War Beast", - 402 => "Invader Soldier Elite", - 403 => "UNKNOWN RACE", - 404 => "Discord Ship", -*/ +#define RACE_DOUG_0 0 +#define RACE_HUMAN_1 1 +#define RACE_BARBARIAN_2 2 +#define RACE_ERUDITE_3 3 +#define RACE_WOOD_ELF_4 4 +#define RACE_HIGH_ELF_5 5 +#define RACE_DARK_ELF_6 6 +#define RACE_HALF_ELF_7 7 +#define RACE_DWARF_8 8 +#define RACE_TROLL_9 9 +#define RACE_OGRE_10 10 +#define RACE_HALFLING_11 11 +#define RACE_GNOME_12 12 +#define RACE_AVIAK_13 13 +#define RACE_WEREWOLF_14 14 +#define RACE_BROWNIE_15 15 +#define RACE_CENTAUR_16 16 +#define RACE_GOLEM_17 17 +#define RACE_GIANT_18 18 +#define RACE_TRAKANON_19 19 +#define RACE_VENRIL_SATHIR_20 20 +#define RACE_EVIL_EYE_21 21 +#define RACE_BEETLE_22 22 +#define RACE_KERRAN_23 23 +#define RACE_FISH_24 24 +#define RACE_FAIRY_25 25 +#define RACE_FROGLOK_26 26 +#define RACE_FROGLOK_GHOUL_27 27 +#define RACE_FUNGUSMAN_28 28 +#define RACE_GARGOYLE_29 29 +#define RACE_GASBAG_30 30 +#define RACE_GELATINOUS_CUBE_31 31 +#define RACE_GHOST_32 32 +#define RACE_GHOUL_33 33 +#define RACE_GIANT_BAT_34 34 +#define RACE_GIANT_EEL_35 35 +#define RACE_GIANT_RAT_36 36 +#define RACE_GIANT_SNAKE_37 37 +#define RACE_GIANT_SPIDER_38 38 +#define RACE_GNOLL_39 39 +#define RACE_GOBLIN_40 40 +#define RACE_GORILLA_41 41 +#define RACE_WOLF_42 42 +#define RACE_BEAR_43 43 +#define RACE_FREEPORT_GUARD_44 44 +#define RACE_DEMI_LICH_45 45 +#define RACE_IMP_46 46 +#define RACE_GRIFFIN_47 47 +#define RACE_KOBOLD_48 48 +#define RACE_LAVA_DRAGON_49 49 +#define RACE_LION_50 50 +#define RACE_LIZARD_MAN_51 51 +#define RACE_MIMIC_52 52 +#define RACE_MINOTAUR_53 53 +#define RACE_ORC_54 54 +#define RACE_HUMAN_BEGGAR_55 55 +#define RACE_PIXIE_56 56 +#define RACE_DRACNID_57 57 +#define RACE_SOLUSEK_RO_58 58 +#define RACE_BLOODGILL_59 59 +#define RACE_SKELETON_60 60 +#define RACE_SHARK_61 61 +#define RACE_TUNARE_62 62 +#define RACE_TIGER_63 63 +#define RACE_TREANT_64 64 +#define RACE_VAMPIRE_65 65 +#define RACE_STATUE_OF_RALLOS_ZEK_66 66 +#define RACE_HIGHPASS_CITIZEN_67 67 +#define RACE_TENTACLE_68 68 +#define RACE_WISP_69 69 +#define RACE_ZOMBIE_70 70 +#define RACE_QEYNOS_CITIZEN_71 71 +#define RACE_SHIP_72 72 +#define RACE_LAUNCH_73 73 +#define RACE_PIRANHA_74 74 +#define RACE_ELEMENTAL_75 75 +#define RACE_PUMA_76 76 +#define RACE_NERIAK_CITIZEN_77 77 +#define RACE_ERUDITE_CITIZEN_78 78 +#define RACE_BIXIE_79 79 +#define RACE_REANIMATED_HAND_80 80 +#define RACE_RIVERVALE_CITIZEN_81 81 +#define RACE_SCARECROW_82 82 +#define RACE_SKUNK_83 83 +#define RACE_SNAKE_ELEMENTAL_84 84 +#define RACE_SPECTRE_85 85 +#define RACE_SPHINX_86 86 +#define RACE_ARMADILLO_87 87 +#define RACE_CLOCKWORK_GNOME_88 88 +#define RACE_DRAKE_89 89 +#define RACE_HALAS_CITIZEN_90 90 +#define RACE_ALLIGATOR_91 91 +#define RACE_GROBB_CITIZEN_92 92 +#define RACE_OGGOK_CITIZEN_93 93 +#define RACE_KALADIM_CITIZEN_94 94 +#define RACE_CAZIC_THULE_95 95 +#define RACE_COCKATRICE_96 96 +#define RACE_DAISY_MAN_97 97 +#define RACE_ELF_VAMPIRE_98 98 +#define RACE_DENIZEN_99 99 +#define RACE_DERVISH_100 100 +#define RACE_EFREETI_101 101 +#define RACE_FROGLOK_TADPOLE_102 102 +#define RACE_PHINIGEL_AUTROPOS_103 103 +#define RACE_LEECH_104 104 +#define RACE_SWORDFISH_105 105 +#define RACE_FELGUARD_106 106 +#define RACE_MAMMOTH_107 107 +#define RACE_EYE_OF_ZOMM_108 108 +#define RACE_WASP_109 109 +#define RACE_MERMAID_110 110 +#define RACE_HARPIE_111 111 +#define RACE_FAYGUARD_112 112 +#define RACE_DRIXIE_113 113 +#define RACE_GHOST_SHIP_114 114 +#define RACE_CLAM_115 115 +#define RACE_SEA_HORSE_116 116 +#define RACE_DWARF_GHOST_117 117 +#define RACE_ERUDITE_GHOST_118 118 +#define RACE_SABERTOOTH_119 119 +#define RACE_WOLF_ELEMENTAL_120 120 +#define RACE_GORGON_121 121 +#define RACE_DRAGON_SKELETON_122 122 +#define RACE_INNORUUK_123 123 +#define RACE_UNICORN_124 124 +#define RACE_PEGASUS_125 125 +#define RACE_DJINN_126 126 +#define RACE_INVISIBLE_MAN_127 127 +#define RACE_IKSAR_128 128 +#define RACE_SCORPION_129 129 +#define RACE_VAH_SHIR_130 130 +#define RACE_SARNAK_131 131 +#define RACE_DRAGLOCK_132 132 +#define RACE_LYCANTHROPE_133 133 +#define RACE_MOSQUITO_134 134 +#define RACE_RHINO_135 135 +#define RACE_XALGOZ_136 136 +#define RACE_KUNARK_GOBLIN_137 137 +#define RACE_YETI_138 138 +#define RACE_IKSAR_CITIZEN_139 139 +#define RACE_FOREST_GIANT_140 140 +#define RACE_BOAT_141 141 +#define RACE_MINOR_ILLUSION_142 142 +#define RACE_TREE_ILLUSION_143 143 +#define RACE_BURYNAI_144 144 +#define RACE_GOO_145 145 +#define RACE_SPECTRAL_SARNAK_146 146 +#define RACE_SPECTRAL_IKSAR_147 147 +#define RACE_KUNARK_FISH_148 148 +#define RACE_IKSAR_SCORPION_149 149 +#define RACE_EROLLISI_150 150 +#define RACE_TRIBUNAL_151 151 +#define RACE_BERTOXXULOUS_152 152 +#define RACE_BRISTLEBANE_153 153 +#define RACE_FAY_DRAKE_154 154 +#define RACE_SARNAK_SKELETON_155 155 +#define RACE_RATMAN_156 156 +#define RACE_WYVERN_157 157 +#define RACE_WURM_158 158 +#define RACE_DEVOURER_159 159 +#define RACE_IKSAR_GOLEM_160 160 +#define RACE_IKSAR_SKELETON_161 161 +#define RACE_MAN_EATING_PLANT_162 162 +#define RACE_RAPTOR_163 163 +#define RACE_SARNAK_GOLEM_164 164 +#define RACE_WATER_DRAGON_165 165 +#define RACE_IKSAR_HAND_166 166 +#define RACE_SUCCULENT_167 167 +#define RACE_HOLGRESH_168 168 +#define RACE_BRONTOTHERIUM_169 169 +#define RACE_SNOW_DERVISH_170 170 +#define RACE_DIRE_WOLF_171 171 +#define RACE_MANTICORE_172 172 +#define RACE_TOTEM_173 173 +#define RACE_COLD_SPECTRE_174 174 +#define RACE_ENCHANTED_ARMOR_175 175 +#define RACE_SNOW_BUNNY_176 176 +#define RACE_WALRUS_177 177 +#define RACE_ROCK_GEM_MAN_178 178 +#define RACE_UNKNOWN179_179 179 +#define RACE_UNKNOWN180_180 180 +#define RACE_YAK_MAN_181 181 +#define RACE_FAUN_182 182 +#define RACE_COLDAIN_183 183 +#define RACE_VELIOUS_DRAGON_184 184 +#define RACE_HAG_185 185 +#define RACE_HIPPOGRIFF_186 186 +#define RACE_SIREN_187 187 +#define RACE_FROST_GIANT_188 188 +#define RACE_STORM_GIANT_189 189 +#define RACE_OTTERMAN_190 190 +#define RACE_WALRUS_MAN_191 191 +#define RACE_CLOCKWORK_DRAGON_192 192 +#define RACE_ABHORRENT_193 193 +#define RACE_SEA_TURTLE_194 194 +#define RACE_BLACK_AND_WHITE_DRAGON_195 195 +#define RACE_GHOST_DRAGON_196 196 +#define RACE_RONNIE_TEST_197 197 +#define RACE_PRISMATIC_DRAGON_198 198 +#define RACE_SHIKNAR_199 199 +#define RACE_ROCKHOPPER_200 200 +#define RACE_UNDERBULK_201 201 +#define RACE_GRIMLING_202 202 +#define RACE_VACUUM_WORM_203 203 +#define RACE_EVAN_TEST_204 204 +#define RACE_KAHLI_SHAH_205 205 +#define RACE_OWLBEAR_206 206 +#define RACE_RHINO_BEETLE_207 207 +#define RACE_VAMPYRE_208 208 +#define RACE_EARTH_ELEMENTAL_209 209 +#define RACE_AIR_ELEMENTAL_210 210 +#define RACE_WATER_ELEMENTAL_211 211 +#define RACE_FIRE_ELEMENTAL_212 212 +#define RACE_WETFANG_MINNOW_213 213 +#define RACE_THOUGHT_HORROR_214 214 +#define RACE_TEGI_215 215 +#define RACE_HORSE_216 216 +#define RACE_SHISSAR_217 217 +#define RACE_FUNGAL_FIEND_218 218 +#define RACE_VAMPIRE_VOLATALIS_219 219 +#define RACE_STONEGRABBER_220 220 +#define RACE_SCARLET_CHEETAH_221 221 +#define RACE_ZELNIAK_222 222 +#define RACE_LIGHTCRAWLER_223 223 +#define RACE_SHADE_224 224 +#define RACE_SUNFLOWER_225 225 +#define RACE_KHATI_SHA_226 226 +#define RACE_SHRIEKER_227 227 +#define RACE_GALORIAN_228 228 +#define RACE_NETHERBIAN_229 229 +#define RACE_AKHEVAN_230 230 +#define RACE_SPIRE_SPIRIT_231 231 +#define RACE_SONIC_WOLF_232 232 +#define RACE_GROUND_SHAKER_233 233 +#define RACE_VAH_SHIR_SKELETON_234 234 +#define RACE_MUTANT_HUMANOID_235 235 +#define RACE_LORD_INQUISITOR_SERU_236 236 +#define RACE_RECUSO_237 237 +#define RACE_VAH_SHIR_KING_238 238 +#define RACE_VAH_SHIR_GUARD_239 239 +#define RACE_TELEPORT_MAN_240 240 +#define RACE_LUJEIN_241 241 +#define RACE_NAIAD_242 242 +#define RACE_NYMPH_243 243 +#define RACE_ENT_244 244 +#define RACE_WRINNFLY_245 245 +#define RACE_COIRNAV_246 246 +#define RACE_SOLUSEK_RO_247 247 +#define RACE_CLOCKWORK_GOLEM_248 248 +#define RACE_CLOCKWORK_BRAIN_249 249 +#define RACE_SPECTRAL_BANSHEE_250 250 +#define RACE_GUARD_OF_JUSTICE_251 251 +#define RACE_POM_CASTLE_252 252 +#define RACE_DISEASE_BOSS_253 253 +#define RACE_SOLUSEK_RO_GUARD_254 254 +#define RACE_BERTOXXULOUS_NEW_255 255 +#define RACE_TRIBUNAL_NEW_256 256 +#define RACE_TERRIS_THULE_257 257 +#define RACE_VEGEROG_258 258 +#define RACE_CROCODILE_259 259 +#define RACE_BAT_260 260 +#define RACE_SLARGHILUG_261 261 +#define RACE_TRANQUILION_262 262 +#define RACE_TIN_SOLDIER_263 263 +#define RACE_NIGHTMARE_WRAITH_264 264 +#define RACE_MALARIAN_265 265 +#define RACE_KNIGHT_OF_PESTILENCE_266 266 +#define RACE_LEPERTOLOTH_267 267 +#define RACE_BUBONIAN_BOSS_268 268 +#define RACE_BUBONIAN_UNDERLING_269 269 +#define RACE_PUSLING_270 270 +#define RACE_WATER_MEPHIT_271 271 +#define RACE_STORMRIDER_272 272 +#define RACE_JUNK_BEAST_273 273 +#define RACE_BROKEN_CLOCKWORK_274 274 +#define RACE_GIANT_CLOCKWORK_275 275 +#define RACE_CLOCKWORK_BEETLE_276 276 +#define RACE_NIGHTMARE_GOBLIN_277 277 +#define RACE_KARANA_278 278 +#define RACE_BLOOD_RAVEN_279 279 +#define RACE_NIGHTMARE_GARGOYLE_280 280 +#define RACE_MOUTH_OF_INSANITY_281 281 +#define RACE_SKELETAL_HORSE_282 282 +#define RACE_SARYRN_283 283 +#define RACE_FENNIN_RO_284 284 +#define RACE_TORMENTOR_285 285 +#define RACE_NECROMANCER_PRIEST_286 286 +#define RACE_NIGHTMARE_287 287 +#define RACE_NEW_RALLOS_ZEK_288 288 +#define RACE_VALLON_ZEK_289 289 +#define RACE_TALLON_ZEK_290 290 +#define RACE_AIR_MEPHIT_291 291 +#define RACE_EARTH_MEPHIT_292 292 +#define RACE_FIRE_MEPHIT_293 293 +#define RACE_NIGHTMARE_MEPHIT_294 294 +#define RACE_ZEBUXORUK_295 295 +#define RACE_MITHANIEL_MARR_296 296 +#define RACE_KNIGHTMARE_RIDER_297 297 +#define RACE_RATHE_COUNCILMAN_298 298 +#define RACE_XEGONY_299 299 +#define RACE_DEMON_300 300 +#define RACE_TEST_OBJECT_301 301 +#define RACE_LOBSTER_MONSTER_302 302 +#define RACE_PHOENIX_303 303 +#define RACE_QUARM_304 304 +#define RACE_NEW_BEAR_305 305 +#define RACE_EARTH_GOLEM_306 306 +#define RACE_IRON_GOLEM_307 307 +#define RACE_STORM_GOLEM_308 308 +#define RACE_AIR_GOLEM_309 309 +#define RACE_WOOD_GOLEM_310 310 +#define RACE_FIRE_GOLEM_311 311 +#define RACE_WATER_GOLEM_312 312 +#define RACE_VEILED_GARGOYLE_313 313 +#define RACE_LYNX_314 314 +#define RACE_SQUID_315 315 +#define RACE_FROG_316 316 +#define RACE_FLYING_SERPENT_317 317 +#define RACE_TACTICS_SOLDIER_318 318 +#define RACE_ARMORED_BOAR_319 319 +#define RACE_DJINNI_320 320 +#define RACE_BOAR_321 321 +#define RACE_KNIGHT_OF_MARR_322 322 +#define RACE_ARMOR_OF_MARR_323 323 +#define RACE_NIGHTMARE_KNIGHT_324 324 +#define RACE_RALLOS_OGRE_325 325 +#define RACE_ARACHNID_326 326 +#define RACE_CRYSTAL_ARACHNID_327 327 +#define RACE_TOWER_MODEL_328 328 +#define RACE_PORTAL_329 329 +#define RACE_FROGLOK_330 330 +#define RACE_TROLL_CREW_MEMBER_331 331 +#define RACE_PIRATE_DECKHAND_332 332 +#define RACE_BROKEN_SKULL_PIRATE_333 333 +#define RACE_PIRATE_GHOST_334 334 +#define RACE_ONE_ARMED_PIRATE_335 335 +#define RACE_SPIRITMASTER_NADOX_336 336 +#define RACE_BROKEN_SKULL_TASKMASTER_337 337 +#define RACE_GNOME_PIRATE_338 338 +#define RACE_DARK_ELF_PIRATE_339 339 +#define RACE_OGRE_PIRATE_340 340 +#define RACE_HUMAN_PIRATE_341 341 +#define RACE_ERUDITE_PIRATE_342 342 +#define RACE_FROG_343 343 +#define RACE_UNDEAD_PIRATE_344 344 +#define RACE_LUGGALD_WORKER_345 345 +#define RACE_LUGGALD_SOLDIER_346 346 +#define RACE_LUGGALD_DISCIPLE_347 347 +#define RACE_DROGMOR_348 348 +#define RACE_FROGLOK_SKELETON_349 349 +#define RACE_UNDEAD_FROGLOK_350 350 +#define RACE_KNIGHT_OF_HATE_351 351 +#define RACE_WARLOCK_OF_HATE_352 352 +#define RACE_HIGHBORN_353 353 +#define RACE_HIGHBORN_DIVINER_354 354 +#define RACE_HIGHBORN_CRUSADER_355 355 +#define RACE_CHOKIDAI_356 356 +#define RACE_UNDEAD_CHOKIDAI_357 357 +#define RACE_UNDEAD_VEKSAR_358 358 +#define RACE_UNDEAD_VAMPIRE_359 359 +#define RACE_VAMPIRE_360 360 +#define RACE_RUJARKIAN_ORC_361 361 +#define RACE_BONE_GOLEM_362 362 +#define RACE_SYNARCANA_363 363 +#define RACE_SAND_ELF_364 364 +#define RACE_MASTER_VAMPIRE_365 365 +#define RACE_MASTER_ORC_366 366 +#define RACE_NEW_SKELETON_367 367 +#define RACE_CRYPT_CREEPER_368 368 +#define RACE_NEW_GOBLIN_369 369 +#define RACE_BURROWER_BUG_370 370 +#define RACE_FROGLOK_GHOST_371 371 +#define RACE_VORTEX_372 372 +#define RACE_SHADOW_373 373 +#define RACE_GOLEM_BEAST_374 374 +#define RACE_WATCHFUL_EYE_375 375 +#define RACE_BOX_376 376 +#define RACE_BARREL_377 377 +#define RACE_CHEST_378 378 +#define RACE_VASE_379 379 +#define RACE_FROZEN_TABLE_380 380 +#define RACE_WEAPON_RACK_381 381 +#define RACE_COFFIN_382 382 +#define RACE_SKULL_AND_BONES_383 383 +#define RACE_JESTER_384 384 +#define RACE_TAELOSIAN_NATIVE_385 385 +#define RACE_TAELOSIAN_EVOKER_386 386 +#define RACE_TAELOSIAN_GOLEM_387 387 +#define RACE_TAELOSIAN_WOLF_388 388 +#define RACE_TAELOSIAN_AMPHIBIAN_CREATURE_389 389 +#define RACE_TAELOSIAN_MOUNTAIN_BEAST_390 390 +#define RACE_TAELOSIAN_STONEMITE_391 391 +#define RACE_UKUN_WAR_HOUND_392 392 +#define RACE_IXT_CENTAUR_393 393 +#define RACE_IKAAV_SNAKEWOMAN_394 394 +#define RACE_ANEUK_395 395 +#define RACE_KYV_HUNTER_396 396 +#define RACE_NOC_SPRAYBLOOD_397 397 +#define RACE_RATUK_BRUTE_398 398 +#define RACE_IXT_399 399 +#define RACE_HUVUL_400 400 +#define RACE_MASTRUQ_WARFIEND_401 401 +#define RACE_MASTRUQ_402 402 +#define RACE_TAELOSIAN_403 403 +#define RACE_SHIP_404 404 +#define RACE_NEW_GOLEM_405 405 +#define RACE_OVERLORD_MATA_MURAM_406 406 +#define RACE_LIGHTING_WARRIOR_407 407 +#define RACE_SUCCUBUS_408 408 +#define RACE_BAZU_409 409 +#define RACE_FERAN_410 410 +#define RACE_PYRILEN_411 411 +#define RACE_CHIMERA_412 412 +#define RACE_DRAGORN_413 413 +#define RACE_MURKGLIDER_414 414 +#define RACE_RAT_415 415 +#define RACE_BAT_416 416 +#define RACE_GELIDRAN_417 417 +#define RACE_DISCORDLING_418 418 +#define RACE_GIRPLAN_419 419 +#define RACE_MINOTAUR_420 420 +#define RACE_DRAGORN_BOX_421 421 +#define RACE_RUNED_ORB_422 422 +#define RACE_DRAGON_BONES_423 423 +#define RACE_MURAMITE_ARMOR_PILE_424 424 +#define RACE_CRYSTAL_SHARD_425 425 +#define RACE_PORTAL_426 426 +#define RACE_COIN_PURSE_427 427 +#define RACE_ROCK_PILE_428 428 +#define RACE_MURKGLIDER_EGG_SACK_429 429 +#define RACE_DRAKE_430 430 +#define RACE_DERVISH_431 431 +#define RACE_DRAKE_432 432 +#define RACE_GOBLIN_433 433 +#define RACE_KIRIN_434 434 +#define RACE_DRAGON_435 435 +#define RACE_BASILISK_436 436 +#define RACE_DRAGON_437 437 +#define RACE_DRAGON_438 438 +#define RACE_PUMA_439 439 +#define RACE_SPIDER_440 440 +#define RACE_SPIDER_QUEEN_441 441 +#define RACE_ANIMATED_STATUE_442 442 +#define RACE_UNKNOWN443_443 443 +#define RACE_UNKNOWN444_444 444 +#define RACE_DRAGON_EGG_445 445 +#define RACE_DRAGON_STATUE_446 446 +#define RACE_LAVA_ROCK_447 447 +#define RACE_ANIMATED_STATUE_448 448 +#define RACE_SPIDER_EGG_SACK_449 449 +#define RACE_LAVA_SPIDER_450 450 +#define RACE_LAVA_SPIDER_QUEEN_451 451 +#define RACE_DRAGON_452 452 +#define RACE_GIANT_453 453 +#define RACE_WEREWOLF_454 454 +#define RACE_KOBOLD_455 455 +#define RACE_SPORALI_456 456 +#define RACE_GNOMEWORK_457 457 +#define RACE_ORC_458 458 +#define RACE_CORATHUS_459 459 +#define RACE_CORAL_460 460 +#define RACE_DRACHNID_461 461 +#define RACE_DRACHNID_COCOON_462 462 +#define RACE_FUNGUS_PATCH_463 463 +#define RACE_GARGOYLE_464 464 +#define RACE_WITHERAN_465 465 +#define RACE_DARK_LORD_466 466 +#define RACE_SHILISKIN_467 467 +#define RACE_SNAKE_468 468 +#define RACE_EVIL_EYE_469 469 +#define RACE_MINOTAUR_470 470 +#define RACE_ZOMBIE_471 471 +#define RACE_CLOCKWORK_BOAR_472 472 +#define RACE_FAIRY_473 473 +#define RACE_WITHERAN_474 474 +#define RACE_AIR_ELEMENTAL_475 475 +#define RACE_EARTH_ELEMENTAL_476 476 +#define RACE_FIRE_ELEMENTAL_477 477 +#define RACE_WATER_ELEMENTAL_478 478 +#define RACE_ALLIGATOR_479 479 +#define RACE_BEAR_480 480 +#define RACE_SCALED_WOLF_481 481 +#define RACE_WOLF_482 482 +#define RACE_SPIRIT_WOLF_483 483 +#define RACE_SKELETON_484 484 +#define RACE_SPECTRE_485 485 +#define RACE_BOLVIRK_486 486 +#define RACE_BANSHEE_487 487 +#define RACE_BANSHEE_488 488 +#define RACE_ELDDAR_489 489 +#define RACE_FOREST_GIANT_490 490 +#define RACE_BONE_GOLEM_491 491 +#define RACE_HORSE_492 492 +#define RACE_PEGASUS_493 493 +#define RACE_SHAMBLING_MOUND_494 494 +#define RACE_SCRYKIN_495 495 +#define RACE_TREANT_496 496 +#define RACE_VAMPIRE_497 497 +#define RACE_AYONAE_RO_498 498 +#define RACE_SULLON_ZEK_499 499 +#define RACE_BANNER_500 500 +#define RACE_FLAG_501 501 +#define RACE_ROWBOAT_502 502 +#define RACE_BEAR_TRAP_503 503 +#define RACE_CLOCKWORK_BOMB_504 504 +#define RACE_DYNAMITE_KEG_505 505 +#define RACE_PRESSURE_PLATE_506 506 +#define RACE_PUFFER_SPORE_507 507 +#define RACE_STONE_RING_508 508 +#define RACE_ROOT_TENTACLE_509 509 +#define RACE_RUNIC_SYMBOL_510 510 +#define RACE_SALTPETTER_BOMB_511 511 +#define RACE_FLOATING_SKULL_512 512 +#define RACE_SPIKE_TRAP_513 513 +#define RACE_TOTEM_514 514 +#define RACE_WEB_515 515 +#define RACE_WICKER_BASKET_516 516 +#define RACE_NIGHTMARE_517 517 +#define RACE_HORSE_518 518 +#define RACE_UNICORN_519 519 +#define RACE_BIXIE_520 520 +#define RACE_CENTAUR_521 521 +#define RACE_DRAKKIN_522 522 +#define RACE_GIANT_523 523 +#define RACE_GNOLL_524 524 +#define RACE_GRIFFIN_525 525 +#define RACE_GIANT_SHADE_526 526 +#define RACE_HARPY_527 527 +#define RACE_MAMMOTH_528 528 +#define RACE_SATYR_529 529 +#define RACE_DRAGON_530 530 +#define RACE_DRAGON_531 531 +#define RACE_DYNLETH_532 532 +#define RACE_BOAT_533 533 +#define RACE_WEAPON_RACK_534 534 +#define RACE_ARMOR_RACK_535 535 +#define RACE_HONEY_POT_536 536 +#define RACE_JUM_JUM_BUCKET_537 537 +#define RACE_PLANT_538 538 +#define RACE_PLANT_539 539 +#define RACE_PLANT_540 540 +#define RACE_TOOLBOX_541 541 +#define RACE_WINE_CASK_542 542 +#define RACE_STONE_JUG_543 543 +#define RACE_ELVEN_BOAT_544 544 +#define RACE_GNOMISH_BOAT_545 545 +#define RACE_BARREL_BARGE_SHIP_546 546 +#define RACE_GOO_547 547 +#define RACE_GOO_548 548 +#define RACE_GOO_549 549 +#define RACE_MERCHANT_SHIP_550 550 +#define RACE_PIRATE_SHIP_551 551 +#define RACE_GHOST_SHIP_552 552 +#define RACE_BANNER_553 553 +#define RACE_BANNER_554 554 +#define RACE_BANNER_555 555 +#define RACE_BANNER_556 556 +#define RACE_BANNER_557 557 +#define RACE_AVIAK_558 558 +#define RACE_BEETLE_559 559 +#define RACE_GORILLA_560 560 +#define RACE_KEDGE_561 561 +#define RACE_KERRAN_562 562 +#define RACE_SHISSAR_563 563 +#define RACE_SIREN_564 564 +#define RACE_SPHINX_565 565 +#define RACE_HUMAN_566 566 +#define RACE_CAMPFIRE_567 567 +#define RACE_BROWNIE_568 568 +#define RACE_DRAGON_569 569 +#define RACE_EXOSKELETON_570 570 +#define RACE_GHOUL_571 571 +#define RACE_CLOCKWORK_GUARDIAN_572 572 +#define RACE_MANTRAP_573 573 +#define RACE_MINOTAUR_574 574 +#define RACE_SCARECROW_575 575 +#define RACE_SHADE_576 576 +#define RACE_ROTOCOPTER_577 577 +#define RACE_TENTACLE_TERROR_578 578 +#define RACE_WEREORC_579 579 +#define RACE_WORG_580 580 +#define RACE_WYVERN_581 581 +#define RACE_CHIMERA_582 582 +#define RACE_KIRIN_583 583 +#define RACE_PUMA_584 584 +#define RACE_BOULDER_585 585 +#define RACE_BANNER_586 586 +#define RACE_ELVEN_GHOST_587 587 +#define RACE_HUMAN_GHOST_588 588 +#define RACE_CHEST_589 589 +#define RACE_CHEST_590 590 +#define RACE_CRYSTAL_591 591 +#define RACE_COFFIN_592 592 +#define RACE_GUARDIAN_CPU_593 593 +#define RACE_WORG_594 594 +#define RACE_MANSION_595 595 +#define RACE_FLOATING_ISLAND_596 596 +#define RACE_CRAGSLITHER_597 597 +#define RACE_WRULON_598 598 +#define RACE_SPELL_PARTICLE_1_599 599 +#define RACE_INVISIBLE_MAN_OF_ZOMM_600 600 +#define RACE_ROBOCOPTER_OF_ZOMM_601 601 +#define RACE_BURYNAI_602 602 +#define RACE_FROG_603 603 +#define RACE_DRACOLICH_604 604 +#define RACE_IKSAR_GHOST_605 605 +#define RACE_IKSAR_SKELETON_606 606 +#define RACE_MEPHIT_607 607 +#define RACE_MUDDITE_608 608 +#define RACE_RAPTOR_609 609 +#define RACE_SARNAK_610 610 +#define RACE_SCORPION_611 611 +#define RACE_TSETSIAN_612 612 +#define RACE_WURM_613 613 +#define RACE_BALROG_614 614 +#define RACE_HYDRA_CRYSTAL_615 615 +#define RACE_CRYSTAL_SPHERE_616 616 +#define RACE_GNOLL_617 617 +#define RACE_SOKOKAR_618 618 +#define RACE_STONE_PYLON_619 619 +#define RACE_DEMON_VULTURE_620 620 +#define RACE_WAGON_621 621 +#define RACE_GOD_OF_DISCORD_622 622 +#define RACE_WRULON_MOUNT_623 623 +#define RACE_OGRE_NPC_MALE_624 624 +#define RACE_SOKOKAR_MOUNT_625 625 +#define RACE_GIANT_626 626 +#define RACE_SOKOKAR_MOUNT_627 627 +#define RACE_10TH_ANNIVERSARY_BANNER_628 628 +#define RACE_10TH_ANNIVERSARY_CAKE_629 629 +#define RACE_WINE_CASK_630 630 +#define RACE_HYDRA_MOUNT_631 631 +#define RACE_HYDRA_NPC_632 632 +#define RACE_WEDDING_FLOWERS_633 633 +#define RACE_WEDDING_ARBOR_634 634 +#define RACE_WEDDING_ALTAR_635 635 +#define RACE_POWDER_KEG_636 636 +#define RACE_APEXUS_637 637 +#define RACE_BELLIKOS_638 638 +#define RACE_BRELLS_FIRST_CREATION_639 639 +#define RACE_BRELL_640 640 +#define RACE_CRYSTALSKIN_AMBULOID_641 641 +#define RACE_CLIKNAR_QUEEN_642 642 +#define RACE_CLIKNAR_SOLDIER_643 643 +#define RACE_CLIKNAR_WORKER_644 644 +#define RACE_COLDAIN_645 645 +#define RACE_COLDAIN_646 646 +#define RACE_CRYSTALSKIN_SESSILOID_647 647 +#define RACE_GENARI_648 648 +#define RACE_GIGYN_649 649 +#define RACE_GREKEN_YOUNG_ADULT_650 650 +#define RACE_GREKEN_YOUNG_651 651 +#define RACE_CLIKNAR_MOUNT_652 652 +#define RACE_TELMIRA_653 653 +#define RACE_SPIDER_MOUNT_654 654 +#define RACE_BEAR_MOUNT_655 655 +#define RACE_RAT_MOUNT_656 656 +#define RACE_SESSILOID_MOUNT_657 657 +#define RACE_MORELL_THULE_658 658 +#define RACE_MARIONETTE_659 659 +#define RACE_BOOK_DERVISH_660 660 +#define RACE_TOPIARY_LION_661 661 +#define RACE_ROTDOG_662 662 +#define RACE_AMYGDALAN_663 663 +#define RACE_SANDMAN_664 664 +#define RACE_GRANDFATHER_CLOCK_665 665 +#define RACE_GINGERBREAD_MAN_666 666 +#define RACE_BEEFEATER_667 667 +#define RACE_RABBIT_668 668 +#define RACE_BLIND_DREAMER_669 669 +#define RACE_CAZIC_THULE_670 670 +#define RACE_TOPIARY_LION_MOUNT_671 671 +#define RACE_ROT_DOG_MOUNT_672 672 +#define RACE_GORAL_MOUNT_673 673 +#define RACE_SELYRAN_MOUNT_674 674 +#define RACE_SCLERA_MOUNT_675 675 +#define RACE_BRAXY_MOUNT_676 676 +#define RACE_KANGON_MOUNT_677 677 +#define RACE_ERUDITE_678 678 +#define RACE_WURM_MOUNT_679 679 +#define RACE_RAPTOR_MOUNT_680 680 +#define RACE_INVISIBLE_MAN_681 681 +#define RACE_WHIRLIGIG_682 682 +#define RACE_GNOMISH_BALLOON_683 683 +#define RACE_GNOMISH_ROCKET_PACK_684 684 +#define RACE_GNOMISH_HOVERING_TRANSPORT_685 685 +#define RACE_SELYRAH_686 686 +#define RACE_GORAL_687 687 +#define RACE_BRAXI_688 688 +#define RACE_KANGON_689 689 +#define RACE_INVISIBLE_MAN_690 690 +#define RACE_FLOATING_TOWER_691 691 +#define RACE_EXPLOSIVE_CART_692 692 +#define RACE_BLIMP_SHIP_693 693 +#define RACE_TUMBLEWEED_694 694 +#define RACE_ALARAN_695 695 +#define RACE_SWINETOR_696 696 +#define RACE_TRIUMVIRATE_697 697 +#define RACE_HADAL_698 698 +#define RACE_HOVERING_PLATFORM_699 699 +#define RACE_PARASITIC_SCAVENGER_700 700 +#define RACE_GRENDLAEN_701 701 +#define RACE_SHIP_IN_A_BOTTLE_702 702 +#define RACE_ALARAN_SENTRY_STONE_703 703 +#define RACE_DERVISH_704 704 +#define RACE_REGENERATION_POOL_705 705 +#define RACE_TELEPORTATION_STAND_706 706 +#define RACE_RELIC_CASE_707 707 +#define RACE_ALARAN_GHOST_708 708 +#define RACE_SKYSTRIDER_709 709 +#define RACE_WATER_SPOUT_710 710 +#define RACE_AVIAK_PULL_ALONG_711 711 +#define RACE_GELATINOUS_CUBE_712 712 +#define RACE_CAT_713 713 +#define RACE_ELK_HEAD_714 714 +#define RACE_HOLGRESH_715 715 +#define RACE_BEETLE_716 716 +#define RACE_VINE_MAW_717 717 +#define RACE_RATMAN_718 718 +#define RACE_FALLEN_KNIGHT_719 719 +#define RACE_FLYING_CARPET_720 720 +#define RACE_CARRIER_HAND_721 721 +#define RACE_FALLEN_KNIGHT_722 722 +#define RACE_SERVANT_OF_SHADOW_723 723 +#define RACE_LUCLIN_724 724 +#define RACE_INTERACTIVE_OBJECT_2250 2250 #endif From 7a7069959f514dbbcc270f0cc3f0e0cd60bff87d Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 27 May 2018 23:14:32 -0500 Subject: [PATCH 179/670] Fix issue where size 0 NPC's would hop in and out of the ground because FixZ calculates the offset wrong by adding a default race size --- zone/mob.cpp | 57 +++++++++++++ zone/mob.h | 3 +- zone/waypoints.cpp | 209 +++++++++++++++++++++++---------------------- 3 files changed, 164 insertions(+), 105 deletions(-) diff --git a/zone/mob.cpp b/zone/mob.cpp index c0130d5ae..e47685ed6 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -6052,6 +6052,63 @@ void Mob::CommonBreakInvisible() CancelSneakHide(); } +float Mob::GetDefaultRaceSize() const { + switch (race) { + case RACE_HUMAN_1: + return 6.0; + break; + case RACE_BARBARIAN_2: + return 7.0; + break; + case RACE_ERUDITE_3: + return 6.0; + break; + case RACE_WOOD_ELF_4: + return 5.0; + break; + case RACE_HIGH_ELF_5: + return 6.0; + break; + case RACE_DARK_ELF_6: + return 5.0; + break; + case RACE_HALF_ELF_7: + return 5.5; + break; + case RACE_DWARF_8: + return 4.0; + break; + case RACE_TROLL_9: + return 8.0; + break; + case RACE_OGRE_10: + return 9.0; + break; + case RACE_HALFLING_11: + return 3.5; + break; + case RACE_GNOME_12: + return 3.0; + break; + case RACE_IKSAR_128: + return 6.0; + break; + case RACE_VAH_SHIR_130: + return 7.0; + break; + case RACE_FROGLOK_330: + return 5.0; + break; + case RACE_DRAKKIN_522: + return 5.0; + break; + default: + return 6.0; + break; + } +} + + #ifdef BOTS bool Mob::JoinHealRotationTargetPool(std::shared_ptr* heal_rotation) { diff --git a/zone/mob.h b/zone/mob.h index 5be772643..e0e818e3f 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -537,7 +537,7 @@ public: inline const float GetTarVZ() const { return m_TargetV.z; } inline const float GetTarVector() const { return tar_vector; } inline const uint8 GetTarNDX() const { return tar_ndx; } - inline const int8 GetFlyMode() const { return flymode; } + inline const int8 GetFlyMode() const { return static_cast(flymode); } bool IsBoat() const; //Group @@ -986,6 +986,7 @@ public: void SendTo(float new_x, float new_y, float new_z); void SendToFixZ(float new_x, float new_y, float new_z); float GetZOffset() const; + float GetDefaultRaceSize() const; void FixZ(int32 z_find_offset = 5); float GetFixedZ(glm::vec3 position, int32 z_find_offset = 5); diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index 8181fe4a2..2351e2686 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -746,8 +746,7 @@ void Mob::SendToFixZ(float new_x, float new_y, float new_z) { } } -float Mob::GetFixedZ(glm::vec3 dest, int32 z_find_offset) -{ +float Mob::GetFixedZ(glm::vec3 dest, int32 z_find_offset) { BenchTimer timer; timer.reset(); float new_z = dest.z; @@ -806,110 +805,112 @@ void Mob::FixZ(int32 z_find_offset /*= 5*/) { } float Mob::GetZOffset() const { - float offset = 3.125f; + float offset = 3.125f; - switch (race) { - case 436: - offset = 0.577f; - break; - case 430: - offset = 0.5f; - break; - case 432: - offset = 1.9f; - break; - case 435: - offset = 0.93f; - break; - case 450: - offset = 0.938f; - break; - case 479: - offset = 0.8f; - break; - case 451: - offset = 0.816f; - break; - case 437: - offset = 0.527f; - break; - case 439: - offset = 1.536f; - break; - case 415: - offset = 1.0f; - break; - case 438: - offset = 0.776f; - break; - case 452: - offset = 0.776f; - break; - case 441: - offset = 0.816f; - break; - case 440: - offset = 0.938f; - break; - case 468: - offset = 1.0f; - break; - case 459: - offset = 1.0f; - break; - case 462: - offset = 1.5f; - break; - case 530: - offset = 1.2f; - break; - case 549: - offset = 0.5f; - break; - case 548: - offset = 0.5f; - break; - case 547: - offset = 0.5f; - break; - case 604: - offset = 1.2f; - break; - case 653: - offset = 5.9f; - break; - case 658: - offset = 4.0f; - break; - case 323: - offset = 5.0f; - break; - case 663: - offset = 5.0f; - break; - case 664: - offset = 4.0f; - break; - case 703: - offset = 9.0f; - break; - case 688: - offset = 5.0f; - break; - case 669: - offset = 7.0f; - break; - case 687: - offset = 2.0f; - break; - case 686: - offset = 2.0f; - break; - default: - offset = 3.125f; - } + switch (race) { + case RACE_BASILISK_436: + offset = 0.577f; + break; + case RACE_DRAKE_430: + offset = 0.5f; + break; + case RACE_DRAKE_432: + offset = 1.9f; + break; + case RACE_DRAGON_435: + offset = 0.93f; + break; + case RACE_LAVA_SPIDER_450: + offset = 0.938f; + break; + case RACE_ALLIGATOR_479: + offset = 0.8f; + break; + case RACE_LAVA_SPIDER_QUEEN_451: + offset = 0.816f; + break; + case RACE_DRAGON_437: + offset = 0.527f; + break; + case RACE_PUMA_439: + offset = 1.536f; + break; + case RACE_RAT_415: + offset = 1.0f; + break; + case RACE_DRAGON_438: + offset = 0.776f; + break; + case RACE_DRAGON_452: + offset = 0.776f; + break; + case RACE_SPIDER_QUEEN_441: + offset = 0.816f; + break; + case RACE_SPIDER_440: + offset = 0.938f; + break; + case RACE_SNAKE_468: + offset = 1.0f; + break; + case RACE_CORATHUS_459: + offset = 1.0f; + break; + case RACE_DRACHNID_COCOON_462: + offset = 1.5f; + break; + case RACE_DRAGON_530: + offset = 1.2f; + break; + case RACE_GOO_549: + offset = 0.5f; + break; + case RACE_GOO_548: + offset = 0.5f; + break; + case RACE_GOO_547: + offset = 0.5f; + break; + case RACE_DRACOLICH_604: + offset = 1.2f; + break; + case RACE_TELMIRA_653: + offset = 5.9f; + break; + case RACE_MORELL_THULE_658: + offset = 4.0f; + break; + case RACE_ARMOR_OF_MARR_323: + offset = 5.0f; + break; + case RACE_AMYGDALAN_663: + offset = 5.0f; + break; + case RACE_SANDMAN_664: + offset = 4.0f; + break; + case RACE_ALARAN_SENTRY_STONE_703: + offset = 9.0f; + break; + case RACE_RABBIT_668: + offset = 5.0f; + break; + case RACE_BLIND_DREAMER_669: + offset = 7.0f; + break; + case RACE_GORAL_687: + offset = 2.0f; + break; + case RACE_SELYRAH_686: + offset = 2.0f; + break; + default: + offset = 3.125f; + } - return 0.2 * GetSize() * offset; + float mob_size = (GetSize() > 0 ? GetSize() : GetDefaultRaceSize()); + + return static_cast(0.2 * mob_size * offset); } // This function will try to move the mob along the relative angle a set distance From c8389103e3f12b2058f1c4218d8631e34968e275 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 27 May 2018 23:44:09 -0500 Subject: [PATCH 180/670] Few tweaks to rules loading code - broadcast all zones that have loaded when #reloadallrules is used --- common/rulesys.cpp | 55 ++++++++++++++++++++++++++------------------ zone/worldserver.cpp | 9 ++++++-- 2 files changed, 39 insertions(+), 25 deletions(-) diff --git a/common/rulesys.cpp b/common/rulesys.cpp index 82d471745..3ce748fb9 100644 --- a/common/rulesys.cpp +++ b/common/rulesys.cpp @@ -236,46 +236,51 @@ void RuleManager::SaveRules(Database *database, const char *ruleset_name) { } bool RuleManager::LoadRules(Database *database, const char *ruleset_name) { - - int ruleset_id = GetRulesetID(database, ruleset_name); + + int ruleset_id = this->GetRulesetID(database, ruleset_name); if (ruleset_id < 0) { Log(Logs::Detail, Logs::Rules, "Failed to find ruleset '%s' for load operation. Canceling.", ruleset_name); - return(false); + return (false); } Log(Logs::Detail, Logs::Rules, "Loading rule set '%s' (%d)", ruleset_name, ruleset_id); m_activeRuleset = ruleset_id; - m_activeName = ruleset_name; + m_activeName = ruleset_name; /* Load default ruleset values first if we're loading something other than default */ - if (strcasecmp(ruleset_name, "default") != 0){ + if (strcasecmp(ruleset_name, "default") != 0) { std::string default_ruleset_name = "default"; - int default_ruleset_id = GetRulesetID(database, default_ruleset_name.c_str()); + int default_ruleset_id = GetRulesetID(database, default_ruleset_name.c_str()); if (default_ruleset_id < 0) { - Log(Logs::Detail, Logs::Rules, "Failed to find default ruleset '%s' for load operation. Canceling.", default_ruleset_name.c_str()); - return(false); + Log(Logs::Detail, Logs::Rules, "Failed to find default ruleset '%s' for load operation. Canceling.", + default_ruleset_name.c_str()); + return (false); } Log(Logs::Detail, Logs::Rules, "Loading rule set '%s' (%d)", default_ruleset_name.c_str(), default_ruleset_id); - std::string query = StringFormat("SELECT rule_name, rule_value FROM rule_values WHERE ruleset_id = %d", default_ruleset_id); + std::string query = StringFormat( + "SELECT rule_name, rule_value FROM rule_values WHERE ruleset_id = %d", + default_ruleset_id + ); + auto results = database->QueryDatabase(query); if (!results.Success()) return false; for (auto row = results.begin(); row != results.end(); ++row) - if (!SetRule(row[0], row[1], nullptr, false)) - Log(Logs::Detail, Logs::Rules, "Unable to interpret rule record for %s", row[0]); + if (!SetRule(row[0], row[1], nullptr, false)) + Log(Logs::Detail, Logs::Rules, "Unable to interpret rule record for %s", row[0]); } - std::string query = StringFormat("SELECT rule_name, rule_value FROM rule_values WHERE ruleset_id=%d", ruleset_id); - auto results = database->QueryDatabase(query); + std::string query = StringFormat("SELECT rule_name, rule_value FROM rule_values WHERE ruleset_id=%d", ruleset_id); + auto results = database->QueryDatabase(query); if (!results.Success()) return false; for (auto row = results.begin(); row != results.end(); ++row) - if (!SetRule(row[0], row[1], nullptr, false)) - Log(Logs::Detail, Logs::Rules, "Unable to interpret rule record for %s", row[0]); + if (!SetRule(row[0], row[1], nullptr, false)) + Log(Logs::Detail, Logs::Rules, "Unable to interpret rule record for %s", row[0]); return true; } @@ -283,7 +288,7 @@ bool RuleManager::LoadRules(Database *database, const char *ruleset_name) { void RuleManager::_SaveRule(Database *database, RuleType type, uint16 index) { char value_string[100]; - switch(type) { + switch (type) { case IntRule: sprintf(value_string, "%d", m_RuleIntValues[index]); break; @@ -291,22 +296,26 @@ void RuleManager::_SaveRule(Database *database, RuleType type, uint16 index) { sprintf(value_string, "%.13f", m_RuleRealValues[index]); break; case BoolRule: - sprintf(value_string, "%s", m_RuleBoolValues[index]?"true":"false"); + sprintf(value_string, "%s", m_RuleBoolValues[index] ? "true" : "false"); break; } - std::string query = StringFormat("REPLACE INTO rule_values " - "(ruleset_id, rule_name, rule_value) " - " VALUES(%d, '%s', '%s')", - m_activeRuleset, _GetRuleName(type, index), value_string); - auto results = database->QueryDatabase(query); + std::string query = StringFormat( + "REPLACE INTO rule_values " + "(ruleset_id, rule_name, rule_value) " + " VALUES(%d, '%s', '%s')", + m_activeRuleset, + _GetRuleName(type, index), + value_string + ); + database->QueryDatabase(query); } int RuleManager::GetRulesetID(Database *database, const char *ruleset_name) { - uint32 len = strlen(ruleset_name); + uint32 len = static_cast(strlen(ruleset_name)); auto rst = new char[2 * len + 1]; database->DoEscapeString(rst, ruleset_name, len); diff --git a/zone/worldserver.cpp b/zone/worldserver.cpp index 7c60bffe0..7b5524605 100644 --- a/zone/worldserver.cpp +++ b/zone/worldserver.cpp @@ -1765,8 +1765,13 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) } break; } - case ServerOP_ReloadRules: - { + case ServerOP_ReloadRules: { + worldserver.SendEmoteMessage( + 0, 0, 0, 15, + "Rules reloaded for Zone: '%s' Instance ID: %u", + zone->GetLongName(), + zone->GetInstanceID() + ); RuleManager::Instance()->LoadRules(&database, RuleManager::Instance()->GetActiveRuleset()); break; } From 72349ddbb66ba0c536cdace045e974c96fd8e15a Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Mon, 28 May 2018 01:23:35 -0400 Subject: [PATCH 181/670] Fix condition to set default heights Was off by 1, if the height > 0 they don't get default height --- zone/npc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/npc.cpp b/zone/npc.cpp index 96df168ff..ae4dae217 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -135,7 +135,7 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, const glm::vec4& position, int if respawn2 = in_respawn; swarm_timer.Disable(); - if (size < 0.0f) + if (size <= 0.0f) size = GetRaceGenderDefaultHeight(race, gender); taunting = false; From c487acbf1a710fc9a8c9a6f2a0612e308a6d9784 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Mon, 28 May 2018 01:30:32 -0400 Subject: [PATCH 182/670] Off by 1 error in size check --- common/races.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/races.cpp b/common/races.cpp index 1e4d88664..331ee8e7e 100644 --- a/common/races.cpp +++ b/common/races.cpp @@ -1596,7 +1596,7 @@ float GetRaceGenderDefaultHeight(int race, int gender) const auto size = sizeof(male_height) / sizeof(male_height[0]); - if (race > size) + if (race >= size) return 6.0f; if (gender == 1) From 8a911682bffefc252b112cccaf3910a08d8d15af Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 28 May 2018 00:41:32 -0500 Subject: [PATCH 183/670] Use GetRaceGenderDefaultHeight in GetDefaultRaceSize constant --- common/races.cpp | 171 +++++++++++++++++++++++------------------------ zone/mob.cpp | 54 +-------------- 2 files changed, 85 insertions(+), 140 deletions(-) diff --git a/common/races.cpp b/common/races.cpp index 331ee8e7e..68f4717b6 100644 --- a/common/races.cpp +++ b/common/races.cpp @@ -1349,102 +1349,99 @@ const char* GetPlayerRaceName(uint32 player_race_value) return GetRaceIDName(GetRaceIDFromPlayerRaceValue(player_race_value)); } -uint32 GetPlayerRaceValue(uint16 race_id) -{ +uint32 GetPlayerRaceValue(uint16 race_id) { switch (race_id) { - case HUMAN: - case BARBARIAN: - case ERUDITE: - case WOOD_ELF: - case HIGH_ELF: - case DARK_ELF: - case HALF_ELF: - case DWARF: - case TROLL: - case OGRE: - case HALFLING: - case GNOME: - return race_id; - case IKSAR: - return PLAYER_RACE_IKSAR; - case VAHSHIR: - return PLAYER_RACE_VAHSHIR; - case FROGLOK: - case FROGLOK2: - return PLAYER_RACE_FROGLOK; - case DRAKKIN: - return PLAYER_RACE_DRAKKIN; - default: - return PLAYER_RACE_UNKNOWN; // watch + case HUMAN: + case BARBARIAN: + case ERUDITE: + case WOOD_ELF: + case HIGH_ELF: + case DARK_ELF: + case HALF_ELF: + case DWARF: + case TROLL: + case OGRE: + case HALFLING: + case GNOME: + return race_id; + case IKSAR: + return PLAYER_RACE_IKSAR; + case VAHSHIR: + return PLAYER_RACE_VAHSHIR; + case FROGLOK: + case FROGLOK2: + return PLAYER_RACE_FROGLOK; + case DRAKKIN: + return PLAYER_RACE_DRAKKIN; + default: + return PLAYER_RACE_UNKNOWN; // watch } } -uint32 GetPlayerRaceBit(uint16 race_id) -{ +uint32 GetPlayerRaceBit(uint16 race_id) { switch (race_id) { - case HUMAN: - return PLAYER_RACE_HUMAN_BIT; - case BARBARIAN: - return PLAYER_RACE_BARBARIAN_BIT; - case ERUDITE: - return PLAYER_RACE_ERUDITE_BIT; - case WOOD_ELF: - return PLAYER_RACE_WOOD_ELF_BIT; - case HIGH_ELF: - return PLAYER_RACE_HIGH_ELF_BIT; - case DARK_ELF: - return PLAYER_RACE_DARK_ELF_BIT; - case HALF_ELF: - return PLAYER_RACE_HALF_ELF_BIT; - case DWARF: - return PLAYER_RACE_DWARF_BIT; - case TROLL: - return PLAYER_RACE_TROLL_BIT; - case OGRE: - return PLAYER_RACE_OGRE_BIT; - case HALFLING: - return PLAYER_RACE_HALFLING_BIT; - case GNOME: - return PLAYER_RACE_GNOME_BIT; - case IKSAR: - return PLAYER_RACE_IKSAR_BIT; - case VAHSHIR: - return PLAYER_RACE_VAHSHIR_BIT; - case FROGLOK: - return PLAYER_RACE_FROGLOK_BIT; - case DRAKKIN: - return PLAYER_RACE_DRAKKIN_BIT; - default: - return PLAYER_RACE_UNKNOWN_BIT; + case HUMAN: + return PLAYER_RACE_HUMAN_BIT; + case BARBARIAN: + return PLAYER_RACE_BARBARIAN_BIT; + case ERUDITE: + return PLAYER_RACE_ERUDITE_BIT; + case WOOD_ELF: + return PLAYER_RACE_WOOD_ELF_BIT; + case HIGH_ELF: + return PLAYER_RACE_HIGH_ELF_BIT; + case DARK_ELF: + return PLAYER_RACE_DARK_ELF_BIT; + case HALF_ELF: + return PLAYER_RACE_HALF_ELF_BIT; + case DWARF: + return PLAYER_RACE_DWARF_BIT; + case TROLL: + return PLAYER_RACE_TROLL_BIT; + case OGRE: + return PLAYER_RACE_OGRE_BIT; + case HALFLING: + return PLAYER_RACE_HALFLING_BIT; + case GNOME: + return PLAYER_RACE_GNOME_BIT; + case IKSAR: + return PLAYER_RACE_IKSAR_BIT; + case VAHSHIR: + return PLAYER_RACE_VAHSHIR_BIT; + case FROGLOK: + return PLAYER_RACE_FROGLOK_BIT; + case DRAKKIN: + return PLAYER_RACE_DRAKKIN_BIT; + default: + return PLAYER_RACE_UNKNOWN_BIT; } } -uint16 GetRaceIDFromPlayerRaceValue(uint32 player_race_value) -{ +uint16 GetRaceIDFromPlayerRaceValue(uint32 player_race_value) { switch (player_race_value) { - case PLAYER_RACE_HUMAN: - case PLAYER_RACE_BARBARIAN: - case PLAYER_RACE_ERUDITE: - case PLAYER_RACE_WOOD_ELF: - case PLAYER_RACE_HIGH_ELF: - case PLAYER_RACE_DARK_ELF: - case PLAYER_RACE_HALF_ELF: - case PLAYER_RACE_DWARF: - case PLAYER_RACE_TROLL: - case PLAYER_RACE_OGRE: - case PLAYER_RACE_HALFLING: - case PLAYER_RACE_GNOME: - return player_race_value; - case PLAYER_RACE_IKSAR: - return IKSAR; - case PLAYER_RACE_VAHSHIR: - return VAHSHIR; - case PLAYER_RACE_FROGLOK: - return FROGLOK; - case PLAYER_RACE_DRAKKIN: - return DRAKKIN; - default: - return PLAYER_RACE_UNKNOWN; // watch + case PLAYER_RACE_HUMAN: + case PLAYER_RACE_BARBARIAN: + case PLAYER_RACE_ERUDITE: + case PLAYER_RACE_WOOD_ELF: + case PLAYER_RACE_HIGH_ELF: + case PLAYER_RACE_DARK_ELF: + case PLAYER_RACE_HALF_ELF: + case PLAYER_RACE_DWARF: + case PLAYER_RACE_TROLL: + case PLAYER_RACE_OGRE: + case PLAYER_RACE_HALFLING: + case PLAYER_RACE_GNOME: + return player_race_value; + case PLAYER_RACE_IKSAR: + return IKSAR; + case PLAYER_RACE_VAHSHIR: + return VAHSHIR; + case PLAYER_RACE_FROGLOK: + return FROGLOK; + case PLAYER_RACE_DRAKKIN: + return DRAKKIN; + default: + return PLAYER_RACE_UNKNOWN; // watch } } diff --git a/zone/mob.cpp b/zone/mob.cpp index e53a132a4..ee86e457b 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -6053,59 +6053,7 @@ void Mob::CommonBreakInvisible() } float Mob::GetDefaultRaceSize() const { - switch (race) { - case RACE_HUMAN_1: - return 6.0; - break; - case RACE_BARBARIAN_2: - return 7.0; - break; - case RACE_ERUDITE_3: - return 6.0; - break; - case RACE_WOOD_ELF_4: - return 5.0; - break; - case RACE_HIGH_ELF_5: - return 6.0; - break; - case RACE_DARK_ELF_6: - return 5.0; - break; - case RACE_HALF_ELF_7: - return 5.5; - break; - case RACE_DWARF_8: - return 4.0; - break; - case RACE_TROLL_9: - return 8.0; - break; - case RACE_OGRE_10: - return 9.0; - break; - case RACE_HALFLING_11: - return 3.5; - break; - case RACE_GNOME_12: - return 3.0; - break; - case RACE_IKSAR_128: - return 6.0; - break; - case RACE_VAH_SHIR_130: - return 7.0; - break; - case RACE_FROGLOK_330: - return 5.0; - break; - case RACE_DRAKKIN_522: - return 5.0; - break; - default: - return 6.0; - break; - } + return GetRaceGenderDefaultHeight(race, gender); } From ac25d49a62315733c5fd4fd310a308ae530c33b3 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 28 May 2018 00:59:02 -0500 Subject: [PATCH 184/670] Patch notes - navmesh merge --- changelog.txt | 17 ++++++++++++++++- zone/pathfinder_interface.cpp | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 33848c7d8..b4b20972a 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,10 +1,25 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 05/28/2018 == +Akkadius: Fixed an issue where size 0 NPC's hop in and out of the ground at idle +Akkadius: NPC's now open doors within proximity given the door doesn't have locked requirements +Akkadius: #reloadallrules will now display zones that have had their rules reloaded to GM's +Akkadius: Zones should now respect "shutdowndelay" in the zones table at all times +Akkadius: Fixed an issue where boats would snap to the bed of the water of body +Akkadius: Added rule Aggro:NPCAggroMaxDistanceEnabled - defaults to true +Akkadius: Changed map directory load structure + - maps/base/*.map + - maps/nav/*.nav + - maps/water/*.wtr + - maps/path/*.path + +KLS: Implemented navigation mesh + - All up to date maps and navs can be found https://github.com/Akkadius/EQEmuMaps + == 03/28/2018 == Kayen: SE_CastOnFadeEffect, SE_CastOnFadeEffectNPC, SE_CastOnFadeEffectAlway triggered spell will now hit the correct targets. - == 03/07/2018 == Uleat: Added command '#ucs' to force a reconnect to UCS server. - Works in place of client auto-reconnect packet in zones where feature is unsupported diff --git a/zone/pathfinder_interface.cpp b/zone/pathfinder_interface.cpp index aca0f96ad..983a85a01 100644 --- a/zone/pathfinder_interface.cpp +++ b/zone/pathfinder_interface.cpp @@ -8,7 +8,7 @@ IPathfinder *IPathfinder::Load(const std::string &zone) { struct stat statbuffer; - std::string waypoint_path = fmt::format("maps/{0}.path", zone); + std::string waypoint_path = fmt::format("maps/path/{0}.path", zone); std::string navmesh_path = fmt::format("maps/nav/{0}.nav", zone); if (stat(navmesh_path.c_str(), &statbuffer) == 0) { return new PathfinderNavmesh(navmesh_path); From 7e86337b80276c80dcc1570f46e613b4020bf454 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 28 May 2018 01:13:57 -0500 Subject: [PATCH 185/670] Update notes --- changelog.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/changelog.txt b/changelog.txt index b4b20972a..93ef43e46 100644 --- a/changelog.txt +++ b/changelog.txt @@ -15,6 +15,8 @@ Akkadius: Changed map directory load structure KLS: Implemented navigation mesh - All up to date maps and navs can be found https://github.com/Akkadius/EQEmuMaps + - To update maps either check out the maps found in the above repository or use the maintenance command: + perl eqemu_server.pl maps == 03/28/2018 == Kayen: SE_CastOnFadeEffect, SE_CastOnFadeEffectNPC, SE_CastOnFadeEffectAlway triggered spell will now hit From 7d0b7560bc370775418536cff0ed2825770155bb Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 28 May 2018 01:46:50 -0500 Subject: [PATCH 186/670] Fix for map download --- utils/scripts/eqemu_server.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/scripts/eqemu_server.pl b/utils/scripts/eqemu_server.pl index 8921cf89f..9201a9e27 100644 --- a/utils/scripts/eqemu_server.pl +++ b/utils/scripts/eqemu_server.pl @@ -1546,9 +1546,9 @@ sub map_files_fetch_bulk{ ); for my $file (@files) { $destination_file = $file; - $destination_file =~s/maps\/EQEmuMaps-master\/maps\///g; + $destination_file =~s/maps\/EQEmuMaps-master\///g; print "[Install] Installing :: " . $destination_file . "\n"; - copy_file($file, "maps/" . $new_file); + copy_file($file, "maps/" . $destination_file); } print "[Install] Fetched Latest Maps\n"; @@ -2396,4 +2396,4 @@ sub quest_heading_convert { print get_mysql_result("INSERT INTO `variables` (varname, value, information, ts) VALUES ('new_heading_conversion', 'true', 'Script ran against quests folder to convert new heading values', NOW())"); print "Total matches: " . $total_matches . "\n"; -} \ No newline at end of file +} From eae7183de209f88a8916c919afd215243539bcb4 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 28 May 2018 03:33:44 -0500 Subject: [PATCH 187/670] Word better --- changelog.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 93ef43e46..2af05c184 100644 --- a/changelog.txt +++ b/changelog.txt @@ -5,7 +5,7 @@ Akkadius: Fixed an issue where size 0 NPC's hop in and out of the ground at idle Akkadius: NPC's now open doors within proximity given the door doesn't have locked requirements Akkadius: #reloadallrules will now display zones that have had their rules reloaded to GM's Akkadius: Zones should now respect "shutdowndelay" in the zones table at all times -Akkadius: Fixed an issue where boats would snap to the bed of the water of body +Akkadius: Fixed an issue where boats would snap to the bed of the body of water Akkadius: Added rule Aggro:NPCAggroMaxDistanceEnabled - defaults to true Akkadius: Changed map directory load structure - maps/base/*.map From b475f66014238ba0e7f062cde010974d66dbc130 Mon Sep 17 00:00:00 2001 From: Uleat Date: Wed, 30 May 2018 22:05:27 -0400 Subject: [PATCH 188/670] Fix for bot-enabled compile (cursory seems to be ok) --- zone/bot.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/zone/bot.cpp b/zone/bot.cpp index a1f00b9ab..24a0a49d9 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -2508,7 +2508,7 @@ void Bot::AI_Process() { if (GetArchetype() == ARCHETYPE_CASTER || GetClass() == ROGUE) { if (tar_distance <= melee_distance_max) { if (PlotPositionAroundTarget(this, Goal.x, Goal.y, Goal.z)) { - CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetBotWalkspeed(), true, false); + CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetBotWalkspeed(), true, false); return; } } @@ -2520,7 +2520,7 @@ void Bot::AI_Process() { if (caster_distance_min && tar_distance < caster_distance_min && !tar->IsFeared()) { // Caster back-off adjustment if (PlotPositionAroundTarget(this, Goal.x, Goal.y, Goal.z)) { if (DistanceSquared(Goal, tar->GetPosition()) <= caster_distance_max) { - CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetBotWalkspeed(), true, false); + CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetBotWalkspeed(), true, false); return; } } @@ -2528,7 +2528,7 @@ void Bot::AI_Process() { else if (tar_distance < melee_distance_min) { // Melee back-off adjustment if (PlotPositionAroundTarget(this, Goal.x, Goal.y, Goal.z)) { if (DistanceSquared(Goal, tar->GetPosition()) <= melee_distance_max) { - CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetBotWalkspeed(), true, false); + CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetBotWalkspeed(), true, false); return; } } @@ -2536,7 +2536,7 @@ void Bot::AI_Process() { else if (backstab_weapon && !behind_mob) { // Move the rogue to behind the mob if (PlotPositionAroundTarget(tar, Goal.x, Goal.y, Goal.z)) { if (DistanceSquared(Goal, tar->GetPosition()) <= melee_distance_max) { - CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetBotRunspeed(), true, false); // rogues are agile enough to run in melee range + CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetBotRunspeed(), true, false); // rogues are agile enough to run in melee range return; } } @@ -2547,7 +2547,7 @@ void Bot::AI_Process() { PlotPositionAroundTarget(tar, Goal.x, Goal.y, Goal.z)) // If we're behind the mob, we can attack when it's enraged { if (DistanceSquared(Goal, tar->GetPosition()) <= melee_distance_max) { - CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetBotWalkspeed(), true, false); + CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetBotWalkspeed(), true, false); return; } } @@ -2699,7 +2699,7 @@ void Bot::AI_Process() { tar_ndx = 20; } - CalculateNewPosition2(Goal.x, Goal.y, Goal.z, GetBotRunspeed()); + CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetBotRunspeed()); return; } else { @@ -2827,7 +2827,7 @@ void Bot::AI_Process() { tar_ndx = 20; } - CalculateNewPosition2(Goal.x, Goal.y, Goal.z, speed); + CalculateNewPosition(Goal.x, Goal.y, Goal.z, speed); return; } } From c9853070575fd65d171818777d1a6a06f34d6d3d Mon Sep 17 00:00:00 2001 From: KimLS Date: Thu, 31 May 2018 19:24:26 -0700 Subject: [PATCH 189/670] Patch detour to avoid a crash if an invalid ref is returned --- libs/recast/detour/src/DetourNavMeshQuery.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/recast/detour/src/DetourNavMeshQuery.cpp b/libs/recast/detour/src/DetourNavMeshQuery.cpp index 024d4a1fe..d27a142d0 100644 --- a/libs/recast/detour/src/DetourNavMeshQuery.cpp +++ b/libs/recast/detour/src/DetourNavMeshQuery.cpp @@ -1096,7 +1096,9 @@ dtStatus dtNavMeshQuery::findPath(dtPolyRef startRef, dtPolyRef endRef, // The API input has been cheked already, skip checking internal data. const dtMeshTile* neighbourTile = 0; const dtPoly* neighbourPoly = 0; - m_nav->getTileAndPolyByRefUnsafe(neighbourRef, &neighbourTile, &neighbourPoly); + if (m_nav->getTileAndPolyByRef(neighbourRef, &neighbourTile, &neighbourPoly) == DT_FAILURE) { + continue; + } if (!filter->passFilter(neighbourRef, neighbourTile, neighbourPoly)) continue; From 65acefc6b1d081d197600b2697253ed1052e54d1 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Mon, 4 Jun 2018 23:54:57 -0400 Subject: [PATCH 190/670] Comment task selection packet some --- zone/tasks.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 06e3b4c59..42d12f270 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -1187,10 +1187,10 @@ void TaskManager::SendTaskSelectorNew(Client *c, Mob *mob, int TaskCount, int *T auto outapp = new EQApplicationPacket(OP_OpenNewTasksWindow, PacketLength); outapp->WriteUInt32(ValidTasks); // TaskCount - outapp->WriteUInt32(2); // Unknown2 + outapp->WriteUInt32(2); // Type outapp->WriteUInt32(mob->GetID()); // TaskGiver - for(int i=0; iIsTaskCompleted(TaskList[i])) continue; outapp->WriteUInt32(TaskList[i]); // TaskID - outapp->WriteFloat(1.0f); + outapp->WriteFloat(1.0f); // affects color, difficulty? outapp->WriteUInt32(Tasks[TaskList[i]]->Duration); - outapp->WriteUInt32(0); // Unknown7 + outapp->WriteUInt32(0); // 1 = Short, 2 = Medium, 3 = Long, anything else Unlimited - outapp->WriteString(Tasks[TaskList[i]]->Title); - outapp->WriteString(Tasks[TaskList[i]]->Description); + outapp->WriteString(Tasks[TaskList[i]]->Title); // max 64 with null + outapp->WriteString(Tasks[TaskList[i]]->Description); // max 4000 with null - outapp->WriteUInt8(0); // Unknown10 - Empty string ? + outapp->WriteUInt8(0); // Has reward set flag outapp->WriteUInt32(1); // ActivityCount - Hard set to 1 for now // Activity stuff below - Will need to iterate through each task @@ -1217,8 +1217,8 @@ void TaskManager::SendTaskSelectorNew(Client *c, Mob *mob, int TaskCount, int *T outapp->WriteUInt32(0); // ActivityNumber outapp->WriteUInt32(1); // ActivityType - outapp->WriteUInt32(0); // Unknown14 - outapp->WriteString("Text1 Test"); + outapp->WriteUInt32(0); // solo, group, raid? + outapp->WriteString("Text1 Test"); // max length 64 outapp->WriteUInt32(11); // Text2Len outapp->WriteString("Text2 Test"); outapp->WriteUInt32(1); // GoalCount @@ -1227,9 +1227,9 @@ void TaskManager::SendTaskSelectorNew(Client *c, Mob *mob, int TaskCount, int *T outapp->WriteUInt32(3); // NumString2Len outapp->WriteString("-1"); //outapp->WriteString(itoa(Tasks[TaskList[i]]->Activity[ActivityID].ZoneID)); - outapp->WriteString(StartZone); // Zone number in ascii - outapp->WriteString("Text3 Test"); - outapp->WriteString(StartZone); // Zone number in ascii + outapp->WriteString(StartZone); // Zone number in ascii max length 64, can be multiple with separated by ; + outapp->WriteString("Text3 Test"); // max length 128 + outapp->WriteString(StartZone); // Zone number in ascii max length 64, probably can be separated by ; too, haven't found it used } c->QueuePacket(outapp); From 49b90eae76244aec391db797479ba1bc4d0fee67 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Tue, 5 Jun 2018 13:12:29 -0400 Subject: [PATCH 191/670] More comments to task system --- zone/tasks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 42d12f270..deeded908 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -1187,7 +1187,7 @@ void TaskManager::SendTaskSelectorNew(Client *c, Mob *mob, int TaskCount, int *T auto outapp = new EQApplicationPacket(OP_OpenNewTasksWindow, PacketLength); outapp->WriteUInt32(ValidTasks); // TaskCount - outapp->WriteUInt32(2); // Type + outapp->WriteUInt32(2); // Type, valid values: 1-3, 1 is shared task outapp->WriteUInt32(mob->GetID()); // TaskGiver for(int i=0; i Date: Tue, 5 Jun 2018 22:16:53 -0400 Subject: [PATCH 192/670] Add ActivityCollect (unimplemented) and more comments --- zone/tasks.cpp | 8 ++++++++ zone/tasks.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index deeded908..8f8298a56 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -1219,13 +1219,21 @@ void TaskManager::SendTaskSelectorNew(Client *c, Mob *mob, int TaskCount, int *T outapp->WriteUInt32(1); // ActivityType outapp->WriteUInt32(0); // solo, group, raid? outapp->WriteString("Text1 Test"); // max length 64 + + // this string is item names outapp->WriteUInt32(11); // Text2Len outapp->WriteString("Text2 Test"); + outapp->WriteUInt32(1); // GoalCount + + // this string is skill IDs? probably one of the "use on" tasks outapp->WriteUInt32(3); // NumString1Len outapp->WriteString("-1"); + + // this string is spell IDs? probably one of the "use on" tasks outapp->WriteUInt32(3); // NumString2Len outapp->WriteString("-1"); + //outapp->WriteString(itoa(Tasks[TaskList[i]]->Activity[ActivityID].ZoneID)); outapp->WriteString(StartZone); // Zone number in ascii max length 64, can be multiple with separated by ; outapp->WriteString("Text3 Test"); // max length 128 diff --git a/zone/tasks.h b/zone/tasks.h index 5a6944639..b0b7956ab 100644 --- a/zone/tasks.h +++ b/zone/tasks.h @@ -138,7 +138,7 @@ typedef enum { ActivityHidden = 0, ActivityActive = 1, ActivityCompleted = 2 } A typedef enum { ActivityDeliver = 1, ActivityKill = 2, ActivityLoot = 3, ActivitySpeakWith = 4, ActivityExplore = 5, ActivityTradeSkill = 6, ActivityFish = 7, ActivityForage = 8, ActivityUse1 = 9, ActivityUse2 = 10, - ActivityTouch = 11, ActivityGiveCash = 100 } ActivityType; + ActivityTouch = 11, ActivityCollect = 13, ActivityGiveCash = 100 } ActivityType; struct ClientActivityInformation { From b61f612fbe7f84ba2297c989a7dd069dfae2ecaf Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Tue, 5 Jun 2018 22:39:48 -0400 Subject: [PATCH 193/670] More comments --- zone/tasks.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 8f8298a56..3c18e8cde 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -1218,7 +1218,7 @@ void TaskManager::SendTaskSelectorNew(Client *c, Mob *mob, int TaskCount, int *T outapp->WriteUInt32(0); // ActivityNumber outapp->WriteUInt32(1); // ActivityType outapp->WriteUInt32(0); // solo, group, raid? - outapp->WriteString("Text1 Test"); // max length 64 + outapp->WriteString("Text1 Test"); // max length 64 -- affects what string ID it will use for the description, should be a name here? // this string is item names outapp->WriteUInt32(11); // Text2Len @@ -1236,7 +1236,7 @@ void TaskManager::SendTaskSelectorNew(Client *c, Mob *mob, int TaskCount, int *T //outapp->WriteString(itoa(Tasks[TaskList[i]]->Activity[ActivityID].ZoneID)); outapp->WriteString(StartZone); // Zone number in ascii max length 64, can be multiple with separated by ; - outapp->WriteString("Text3 Test"); // max length 128 + outapp->WriteString("Text3 Test"); // max length 128 -- overrides the automatic descriptions outapp->WriteString(StartZone); // Zone number in ascii max length 64, probably can be separated by ; too, haven't found it used } From 653824ae9eb4adaf0ec08e20329daf680d9681e2 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 7 Jun 2018 18:14:09 -0400 Subject: [PATCH 194/670] More task comments .. --- zone/tasks.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 3c18e8cde..0ba1a72fe 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -1187,7 +1187,9 @@ void TaskManager::SendTaskSelectorNew(Client *c, Mob *mob, int TaskCount, int *T auto outapp = new EQApplicationPacket(OP_OpenNewTasksWindow, PacketLength); outapp->WriteUInt32(ValidTasks); // TaskCount - outapp->WriteUInt32(2); // Type, valid values: 1-3, 1 is shared task + outapp->WriteUInt32(2); // Type, valid values: 0-3. 0 = Task, 1 = Shared Task, 2 = Quest, 3 = ??? + // so I guess an NPC can only offer one type of quests or we can only open a selection with one type :P (so quest call can tell us I guess) + // this is also sent in OP_TaskDescription outapp->WriteUInt32(mob->GetID()); // TaskGiver for(int i=0; i Date: Mon, 11 Jun 2018 21:49:32 -0400 Subject: [PATCH 195/670] Switch TaskGoalListManager::TaskGoalLists to std::vector --- zone/tasks.cpp | 48 ++++++++++++++++++++++-------------------------- zone/tasks.h | 2 +- 2 files changed, 23 insertions(+), 27 deletions(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 0ba1a72fe..a0d21f61f 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -3099,7 +3099,6 @@ void ClientTaskState::ProcessTaskProximities(Client *c, float X, float Y, float TaskGoalListManager::TaskGoalListManager() { - TaskGoalLists = nullptr; NumberOfLists = 0; } @@ -3111,48 +3110,45 @@ TaskGoalListManager::~TaskGoalListManager() { safe_delete_array(TaskGoalLists[i].GoalItemEntries); } - safe_delete_array(TaskGoalLists); } -bool TaskGoalListManager::LoadLists() { +bool TaskGoalListManager::LoadLists() +{ Log(Logs::General, Logs::Tasks, "[GLOBALLOAD] TaskGoalListManager::LoadLists Called"); - for(int i=0; i< NumberOfLists; i++) + for (int i = 0; i < NumberOfLists; i++) safe_delete_array(TaskGoalLists[i].GoalItemEntries); - safe_delete_array(TaskGoalLists); + TaskGoalLists.clear(); - const char *ERR_MYSQLERROR = "Error in TaskGoalListManager::LoadLists: %s %s"; + const char *ERR_MYSQLERROR = "Error in TaskGoalListManager::LoadLists: %s %s"; NumberOfLists = 0; - std::string query = "SELECT `listid`, COUNT(`entry`) " - "FROM `goallists` GROUP by `listid` " - "ORDER BY `listid`"; - auto results = database.QueryDatabase(query); - if (!results.Success()) { + std::string query = "SELECT `listid`, COUNT(`entry`) " + "FROM `goallists` GROUP by `listid` " + "ORDER BY `listid`"; + auto results = database.QueryDatabase(query); + if (!results.Success()) { return false; - } + } - NumberOfLists = results.RowCount(); - Log(Logs::General, Logs::Tasks, "[GLOBALLOAD] Database returned a count of %i lists", NumberOfLists); + NumberOfLists = results.RowCount(); + Log(Logs::General, Logs::Tasks, "[GLOBALLOAD] Database returned a count of %i lists", NumberOfLists); - TaskGoalLists = new TaskGoalList_Struct[NumberOfLists]; + TaskGoalLists.reserve(NumberOfLists); - int listIndex = 0; + int listIndex = 0; - for(auto row = results.begin(); row != results.end(); ++row) { - int listID = atoi(row[0]); - int listSize = atoi(row[1]); + for (auto row = results.begin(); row != results.end(); ++row) { + int listID = atoi(row[0]); + int listSize = atoi(row[1]); + TaskGoalLists.push_back({listID, listSize, 0, 0, nullptr}); - TaskGoalLists[listIndex].ListID = listID; - TaskGoalLists[listIndex].Size = listSize; - TaskGoalLists[listIndex].Min = 0; - TaskGoalLists[listIndex].Max = 0; - TaskGoalLists[listIndex].GoalItemEntries = new int[listSize]; + TaskGoalLists[listIndex].GoalItemEntries = new int[listSize]; - listIndex++; - } + listIndex++; + } for(int listIndex = 0; listIndex < NumberOfLists; listIndex++) { diff --git a/zone/tasks.h b/zone/tasks.h index b0b7956ab..1ab7cd0f9 100644 --- a/zone/tasks.h +++ b/zone/tasks.h @@ -75,7 +75,7 @@ public: private: - TaskGoalList_Struct *TaskGoalLists; + std::vector TaskGoalLists; int NumberOfLists; }; From e3dfb2f19dffd144705e46d294c0b4f19d0d574e Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Mon, 11 Jun 2018 21:58:11 -0400 Subject: [PATCH 196/670] Switch TaskGoalList_Struct::GoalItemEntries to std::vector --- zone/tasks.cpp | 20 +++++--------------- zone/tasks.h | 2 +- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index a0d21f61f..687dbd6f4 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -3097,28 +3097,18 @@ void ClientTaskState::ProcessTaskProximities(Client *c, float X, float Y, float } } -TaskGoalListManager::TaskGoalListManager() { - +TaskGoalListManager::TaskGoalListManager() +{ NumberOfLists = 0; - } -TaskGoalListManager::~TaskGoalListManager() { - - for(int i=0; i< NumberOfLists; i++) { - - safe_delete_array(TaskGoalLists[i].GoalItemEntries); - - } -} +TaskGoalListManager::~TaskGoalListManager() {} bool TaskGoalListManager::LoadLists() { Log(Logs::General, Logs::Tasks, "[GLOBALLOAD] TaskGoalListManager::LoadLists Called"); - for (int i = 0; i < NumberOfLists; i++) - safe_delete_array(TaskGoalLists[i].GoalItemEntries); TaskGoalLists.clear(); const char *ERR_MYSQLERROR = "Error in TaskGoalListManager::LoadLists: %s %s"; @@ -3143,9 +3133,9 @@ bool TaskGoalListManager::LoadLists() for (auto row = results.begin(); row != results.end(); ++row) { int listID = atoi(row[0]); int listSize = atoi(row[1]); - TaskGoalLists.push_back({listID, listSize, 0, 0, nullptr}); + TaskGoalLists.push_back({listID, listSize, 0, 0}); - TaskGoalLists[listIndex].GoalItemEntries = new int[listSize]; + TaskGoalLists[listIndex].GoalItemEntries.reserve(listSize); listIndex++; } diff --git a/zone/tasks.h b/zone/tasks.h index 1ab7cd0f9..8bc14d956 100644 --- a/zone/tasks.h +++ b/zone/tasks.h @@ -55,7 +55,7 @@ struct TaskGoalList_Struct { int ListID; int Size; int Min, Max; - int *GoalItemEntries; + std::vector GoalItemEntries; }; // This is used for handling lists, loading them from the database, searching them. From 6399710c1dacc48c547e1d9d25ff900f09ae9150 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Mon, 11 Jun 2018 22:25:44 -0400 Subject: [PATCH 197/670] Update TaskGoalListManager::GetListByID to std algos --- zone/tasks.cpp | 67 ++++++++++++++++++++------------------------------ 1 file changed, 27 insertions(+), 40 deletions(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 687dbd6f4..d60fa5cd6 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -3140,41 +3140,39 @@ bool TaskGoalListManager::LoadLists() listIndex++; } - for(int listIndex = 0; listIndex < NumberOfLists; listIndex++) { + for (int listIndex = 0; listIndex < NumberOfLists; listIndex++) { int listID = TaskGoalLists[listIndex].ListID; unsigned int size = TaskGoalLists[listIndex].Size; - query = StringFormat("SELECT `entry` from `goallists` " - "WHERE `listid` = %i " - "ORDER BY `entry` ASC LIMIT %i", - listID, size); - results = database.QueryDatabase(query); - if (!results.Success()) { + query = StringFormat("SELECT `entry` from `goallists` " + "WHERE `listid` = %i " + "ORDER BY `entry` ASC LIMIT %i", + listID, size); + results = database.QueryDatabase(query); + if (!results.Success()) { TaskGoalLists[listIndex].Size = 0; continue; - } + } - // This should only happen if a row is deleted in between us retrieving the counts - // at the start of this method and getting to here. It should not be possible for - // an INSERT to cause a problem, as the SELECT is used with a LIMIT - if(results.RowCount() < size) - TaskGoalLists[listIndex].Size = results.RowCount(); + // This should only happen if a row is deleted in between us retrieving the counts + // at the start of this method and getting to here. It should not be possible for + // an INSERT to cause a problem, as the SELECT is used with a LIMIT + if (results.RowCount() < size) + TaskGoalLists[listIndex].Size = results.RowCount(); - int entryIndex = 0; - for (auto row = results.begin(); row != results.end(); ++row, ++entryIndex) { + int entryIndex = 0; + for (auto row = results.begin(); row != results.end(); ++row, ++entryIndex) { - int entry = atoi(row[0]); + int entry = atoi(row[0]); - if(entry < TaskGoalLists[listIndex].Min) - TaskGoalLists[listIndex].Min = entry; + if (entry < TaskGoalLists[listIndex].Min) + TaskGoalLists[listIndex].Min = entry; - if(entry > TaskGoalLists[listIndex].Max) - TaskGoalLists[listIndex].Max = entry; - - TaskGoalLists[listIndex].GoalItemEntries[entryIndex] = entry; - - } + if (entry > TaskGoalLists[listIndex].Max) + TaskGoalLists[listIndex].Max = entry; + TaskGoalLists[listIndex].GoalItemEntries[entryIndex] = entry; + } } return true; @@ -3184,24 +3182,13 @@ bool TaskGoalListManager::LoadLists() int TaskGoalListManager::GetListByID(int ListID) { // Find the list with the specified ListID and return the index + auto it = std::find_if(TaskGoalLists.begin(), TaskGoalLists.end(), + [ListID](const TaskGoalList_Struct &t) { return t.ListID == ListID; }); - int FirstEntry = 0; - int LastEntry = NumberOfLists - 1; - - while(FirstEntry <= LastEntry) { - int MiddleEntry = (FirstEntry + LastEntry) / 2; - - if(ListID > TaskGoalLists[MiddleEntry].ListID) - FirstEntry = MiddleEntry + 1; - else if(ListID < TaskGoalLists[MiddleEntry].ListID) - LastEntry = MiddleEntry - 1; - else - return MiddleEntry; - - } - - return -1; + if (it == TaskGoalLists.end()) + return -1; + return std::distance(TaskGoalLists.begin(), it); } int TaskGoalListManager::GetFirstEntry(int ListID) { From c3e007597e3a85446ac30e4bc3ea4af0f03e2c82 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Mon, 11 Jun 2018 22:49:20 -0400 Subject: [PATCH 198/670] Remove TaskGoalList_Struct::Size since it's not needed --- zone/tasks.cpp | 49 ++++++++++++++++--------------------------------- zone/tasks.h | 1 - 2 files changed, 16 insertions(+), 34 deletions(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index d60fa5cd6..55f01196d 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -3133,7 +3133,7 @@ bool TaskGoalListManager::LoadLists() for (auto row = results.begin(); row != results.end(); ++row) { int listID = atoi(row[0]); int listSize = atoi(row[1]); - TaskGoalLists.push_back({listID, listSize, 0, 0}); + TaskGoalLists.push_back({listID, 0, 0}); TaskGoalLists[listIndex].GoalItemEntries.reserve(listSize); @@ -3143,23 +3143,16 @@ bool TaskGoalListManager::LoadLists() for (int listIndex = 0; listIndex < NumberOfLists; listIndex++) { int listID = TaskGoalLists[listIndex].ListID; - unsigned int size = TaskGoalLists[listIndex].Size; + auto size = TaskGoalLists[listIndex].GoalItemEntries.capacity(); // this was only done for manual memory management, shouldn't need to do this query = StringFormat("SELECT `entry` from `goallists` " "WHERE `listid` = %i " "ORDER BY `entry` ASC LIMIT %i", listID, size); results = database.QueryDatabase(query); if (!results.Success()) { - TaskGoalLists[listIndex].Size = 0; continue; } - // This should only happen if a row is deleted in between us retrieving the counts - // at the start of this method and getting to here. It should not be possible for - // an INSERT to cause a problem, as the SELECT is used with a LIMIT - if (results.RowCount() < size) - TaskGoalLists[listIndex].Size = results.RowCount(); - int entryIndex = 0; for (auto row = results.begin(); row != results.end(); ++row, ++entryIndex) { @@ -3197,7 +3190,7 @@ int TaskGoalListManager::GetFirstEntry(int ListID) { if((ListIndex < 0) || (ListIndex >= NumberOfLists)) return -1; - if(TaskGoalLists[ListIndex].Size == 0) return -1; + if(TaskGoalLists[ListIndex].GoalItemEntries.empty()) return -1; return TaskGoalLists[ListIndex].GoalItemEntries[0]; } @@ -3210,45 +3203,35 @@ std::vector TaskGoalListManager::GetListContents(int ListID) { if((ListIndex < 0) || (ListIndex >= NumberOfLists)) return ListContents; - for(int i=0; i= NumberOfLists)) return false; + if ((ListIndex < 0) || (ListIndex >= NumberOfLists)) + return false; - if((Entry < TaskGoalLists[ListIndex].Min) || (Entry > TaskGoalLists[ListIndex].Max)) + if ((Entry < TaskGoalLists[ListIndex].Min) || (Entry > TaskGoalLists[ListIndex].Max)) return false; int FirstEntry = 0; - int LastEntry = TaskGoalLists[ListIndex].Size - 1; + auto &task = TaskGoalLists[ListIndex]; - while(FirstEntry <= LastEntry) { - int MiddleEntry = (FirstEntry + LastEntry) / 2; + auto it = std::find(task.GoalItemEntries.begin(), task.GoalItemEntries.end(), Entry); - if(Entry > TaskGoalLists[ListIndex].GoalItemEntries[MiddleEntry]) - FirstEntry = MiddleEntry + 1; - else if(Entry < TaskGoalLists[ListIndex].GoalItemEntries[MiddleEntry]) - LastEntry = MiddleEntry - 1; - else { - Log(Logs::General, Logs::Tasks, "[UPDATE] TaskGoalListManager::IsInList(%i, %i) returning true", ListIndex, Entry); - return true; - } - - } - - return false; + if (it == task.GoalItemEntries.end()) + return false; + Log(Logs::General, Logs::Tasks, "[UPDATE] TaskGoalListManager::IsInList(%i, %i) returning true", ListIndex, + Entry); + return true; } TaskProximityManager::TaskProximityManager() { diff --git a/zone/tasks.h b/zone/tasks.h index 8bc14d956..b55203918 100644 --- a/zone/tasks.h +++ b/zone/tasks.h @@ -53,7 +53,6 @@ namespace EQEmu struct TaskGoalList_Struct { int ListID; - int Size; int Min, Max; std::vector GoalItemEntries; }; From 6b64a8183dc918f6734abcb7c676b742ce425d21 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Mon, 11 Jun 2018 23:54:42 -0400 Subject: [PATCH 199/670] Fix issues with TaskGoalListManager::LoadLists --- zone/tasks.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 55f01196d..c406c8b73 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -3153,8 +3153,7 @@ bool TaskGoalListManager::LoadLists() continue; } - int entryIndex = 0; - for (auto row = results.begin(); row != results.end(); ++row, ++entryIndex) { + for (auto row = results.begin(); row != results.end(); ++row) { int entry = atoi(row[0]); @@ -3164,7 +3163,7 @@ bool TaskGoalListManager::LoadLists() if (entry > TaskGoalLists[listIndex].Max) TaskGoalLists[listIndex].Max = entry; - TaskGoalLists[listIndex].GoalItemEntries[entryIndex] = entry; + TaskGoalLists[listIndex].GoalItemEntries.push_back(entry); } } From 9e641322618bf5fff00246f1807bac89dbe8fa8c Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Tue, 12 Jun 2018 00:32:13 -0400 Subject: [PATCH 200/670] Change the ActivityInformation::Text*s to std::string --- zone/tasks.cpp | 277 ++++++++++++++++++++++++------------------------- zone/tasks.h | 7 +- 2 files changed, 138 insertions(+), 146 deletions(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index c406c8b73..e44fcb5a0 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -48,11 +48,6 @@ TaskManager::TaskManager() { TaskManager::~TaskManager() { for(int i=0; iActivityCount; j++) { - safe_delete_array(Tasks[i]->Activity[j].Text1); - safe_delete_array(Tasks[i]->Activity[j].Text2); - safe_delete_array(Tasks[i]->Activity[j].Text3); - } safe_delete_array(Tasks[i]->Title); safe_delete_array(Tasks[i]->Description); safe_delete_array(Tasks[i]->Reward); @@ -98,12 +93,6 @@ bool TaskManager::LoadSingleTask(int TaskID) { // If this task already exists in memory, free all the dynamically allocated strings. if(Tasks[TaskID]) { - - for(int j=0; jActivityCount; j++) { - safe_delete_array(Tasks[TaskID]->Activity[j].Text1); - safe_delete_array(Tasks[TaskID]->Activity[j].Text2); - safe_delete_array(Tasks[TaskID]->Activity[j].Text3); - } safe_delete_array(Tasks[TaskID]->Title); safe_delete_array(Tasks[TaskID]->Description); safe_delete_array(Tasks[TaskID]->Reward); @@ -119,46 +108,48 @@ void TaskManager::ReloadGoalLists() { Log(Logs::Detail, Logs::Tasks,"TaskManager::LoadTasks LoadLists failed"); } -bool TaskManager::LoadTasks(int singleTask) { - +bool TaskManager::LoadTasks(int singleTask) +{ // If TaskID !=0, then just load the task specified. Log(Logs::General, Logs::Tasks, "[GLOBALLOAD] TaskManager::LoadTasks Called"); - std::string query; - if(singleTask == 0) { - if(!GoalListManager.LoadLists()) - Log(Logs::Detail, Logs::Tasks,"TaskManager::LoadTasks LoadLists failed"); + std::string query; + if (singleTask == 0) { + if (!GoalListManager.LoadLists()) + Log(Logs::Detail, Logs::Tasks, "TaskManager::LoadTasks LoadLists failed"); - if(!LoadTaskSets()) - Log(Logs::Detail, Logs::Tasks,"TaskManager::LoadTasks LoadTaskSets failed"); + if (!LoadTaskSets()) + Log(Logs::Detail, Logs::Tasks, "TaskManager::LoadTasks LoadTaskSets failed"); query = StringFormat("SELECT `id`, `duration`, `title`, `description`, `reward`, " - "`rewardid`, `cashreward`, `xpreward`, `rewardmethod`, " - "`startzone`, `minlevel`, `maxlevel`, `repeatable` " - "FROM `tasks` WHERE `id` < %i", MAXTASKS); - } - else + "`rewardid`, `cashreward`, `xpreward`, `rewardmethod`, " + "`startzone`, `minlevel`, `maxlevel`, `repeatable` " + "FROM `tasks` WHERE `id` < %i", + MAXTASKS); + } else query = StringFormat("SELECT `id`, `duration`, `title`, `description`, `reward`, " - "`rewardid`, `cashreward`, `xpreward`, `rewardmethod`, " - "`startzone`, `minlevel`, `maxlevel`, `repeatable` " - "FROM `tasks` WHERE `id` = %i",singleTask); + "`rewardid`, `cashreward`, `xpreward`, `rewardmethod`, " + "`startzone`, `minlevel`, `maxlevel`, `repeatable` " + "FROM `tasks` WHERE `id` = %i", + singleTask); - const char *ERR_MYSQLERROR = "[TASKS]Error in TaskManager::LoadTasks: %s"; + const char *ERR_MYSQLERROR = "[TASKS]Error in TaskManager::LoadTasks: %s"; - auto results = database.QueryDatabase(query); - if (!results.Success()) { - Log(Logs::General, Logs::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str()); + auto results = database.QueryDatabase(query); + if (!results.Success()) { + Log(Logs::General, Logs::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str()); return false; - } + } - for(auto row = results.begin(); row != results.end(); ++row) { - int taskID = atoi(row[0]); + for (auto row = results.begin(); row != results.end(); ++row) { + int taskID = atoi(row[0]); - if((taskID <= 0) || (taskID >= MAXTASKS)) { - // This shouldn't happen, as the SELECT is bounded by MAXTASKS - Log(Logs::General, Logs::Error, "[TASKS]Task ID %i out of range while loading tasks from database", taskID); + if ((taskID <= 0) || (taskID >= MAXTASKS)) { + // This shouldn't happen, as the SELECT is bounded by MAXTASKS + Log(Logs::General, Logs::Error, + "[TASKS]Task ID %i out of range while loading tasks from database", taskID); continue; - } + } Tasks[taskID] = new TaskInformation; Tasks[taskID]->Duration = atoi(row[1]); @@ -180,114 +171,114 @@ bool TaskManager::LoadTasks(int singleTask) { Tasks[taskID]->SequenceMode = ActivitiesSequential; Tasks[taskID]->LastStep = 0; - Log(Logs::General, Logs::Tasks, "[GLOBALLOAD] TaskID: %5i, Duration: %8i, StartZone: %3i Reward: %s MinLevel %i MaxLevel %i Repeatable: %s", - taskID, Tasks[taskID]->Duration, Tasks[taskID]->StartZone, Tasks[taskID]->Reward, - Tasks[taskID]->MinLevel, Tasks[taskID]->MaxLevel, - Tasks[taskID]->Repeatable ? "Yes" : "No"); + Log(Logs::General, Logs::Tasks, + "[GLOBALLOAD] TaskID: %5i, Duration: %8i, StartZone: %3i Reward: %s MinLevel %i MaxLevel %i " + "Repeatable: %s", + taskID, Tasks[taskID]->Duration, Tasks[taskID]->StartZone, Tasks[taskID]->Reward, + Tasks[taskID]->MinLevel, Tasks[taskID]->MaxLevel, Tasks[taskID]->Repeatable ? "Yes" : "No"); Log(Logs::General, Logs::Tasks, "[GLOBALLOAD] Title: %s", Tasks[taskID]->Title); - } + } - - if(singleTask==0) + if (singleTask == 0) query = StringFormat("SELECT `taskid`, `step`, `activityid`, `activitytype`, " - "`text1`, `text2`, `text3`, `goalid`, `goalmethod`, " - "`goalcount`, `delivertonpc`, `zoneid`, `optional` " - "FROM `activities` " - "WHERE `taskid` < %i AND `activityid` < %i " - "ORDER BY taskid, activityid ASC", MAXTASKS, MAXACTIVITIESPERTASK); + "`text1`, `text2`, `text3`, `goalid`, `goalmethod`, " + "`goalcount`, `delivertonpc`, `zoneid`, `optional` " + "FROM `activities` " + "WHERE `taskid` < %i AND `activityid` < %i " + "ORDER BY taskid, activityid ASC", + MAXTASKS, MAXACTIVITIESPERTASK); else query = StringFormat("SELECT `taskid`, `step`, `activityid`, `activitytype`, " - "`text1`, `text2`, `text3`, `goalid`, `goalmethod`, " - "`goalcount`, `delivertonpc`, `zoneid`, `optional` " - "FROM `activities` " - "WHERE `taskid` = %i AND `activityid` < %i " - "ORDER BY taskid, activityid ASC", singleTask, MAXACTIVITIESPERTASK); - results = database.QueryDatabase(query); - if (!results.Success()) { - Log(Logs::General, Logs::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str()); + "`text1`, `text2`, `text3`, `goalid`, `goalmethod`, " + "`goalcount`, `delivertonpc`, `zoneid`, `optional` " + "FROM `activities` " + "WHERE `taskid` = %i AND `activityid` < %i " + "ORDER BY taskid, activityid ASC", + singleTask, MAXACTIVITIESPERTASK); + results = database.QueryDatabase(query); + if (!results.Success()) { + Log(Logs::General, Logs::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str()); return false; - } + } - for(auto row = results.begin(); row != results.end(); ++row) { - int taskID = atoi(row[0]); - int step = atoi(row[1]); + for (auto row = results.begin(); row != results.end(); ++row) { + int taskID = atoi(row[0]); + int step = atoi(row[1]); - int activityID = atoi(row[2]); + int activityID = atoi(row[2]); - if((taskID <= 0) || (taskID >= MAXTASKS) || (activityID < 0) || (activityID >= MAXACTIVITIESPERTASK)) { - // This shouldn't happen, as the SELECT is bounded by MAXTASKS - Log(Logs::General, Logs::Error, "[TASKS]Task or Activity ID (%i, %i) out of range while loading " - "activities from database", taskID, activityID); - continue; - } + if ((taskID <= 0) || (taskID >= MAXTASKS) || (activityID < 0) || (activityID >= MAXACTIVITIESPERTASK)) { + // This shouldn't happen, as the SELECT is bounded by MAXTASKS + Log(Logs::General, Logs::Error, + "[TASKS]Task or Activity ID (%i, %i) out of range while loading " + "activities from database", + taskID, activityID); + continue; + } - if(Tasks[taskID]==nullptr) { - Log(Logs::General, Logs::Error, "[TASKS]Activity for non-existent task (%i, %i) while loading activities from database", taskID, activityID); - continue; - } + if (Tasks[taskID] == nullptr) { + Log(Logs::General, Logs::Error, + "[TASKS]Activity for non-existent task (%i, %i) while loading activities from database", + taskID, activityID); + continue; + } - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].StepNumber = step; + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].StepNumber = step; - if(step != 0) - Tasks[taskID]->SequenceMode = ActivitiesStepped; + if (step != 0) + Tasks[taskID]->SequenceMode = ActivitiesStepped; - if(step >Tasks[taskID]->LastStep) - Tasks[taskID]->LastStep = step; + if (step > Tasks[taskID]->LastStep) + Tasks[taskID]->LastStep = step; - // Task Activities MUST be numbered sequentially from 0. If not, log an error - // and set the task to nullptr. Subsequent activities for this task will raise - // ERR_NOTASK errors. - // Change to (activityID != (Tasks[taskID]->ActivityCount + 1)) to index from 1 - if(activityID != Tasks[taskID]->ActivityCount) { - Log(Logs::General, Logs::Error, "[TASKS]Activities for Task %i are not sequential starting at 0. Not loading task.", taskID, activityID); - Tasks[taskID] = nullptr; - continue; - } + // Task Activities MUST be numbered sequentially from 0. If not, log an error + // and set the task to nullptr. Subsequent activities for this task will raise + // ERR_NOTASK errors. + // Change to (activityID != (Tasks[taskID]->ActivityCount + 1)) to index from 1 + if (activityID != Tasks[taskID]->ActivityCount) { + Log(Logs::General, Logs::Error, + "[TASKS]Activities for Task %i are not sequential starting at 0. Not loading task.", taskID, + activityID); + Tasks[taskID] = nullptr; + continue; + } - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Type = atoi(row[3]); + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Type = atoi(row[3]); - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text1 = new char[strlen(row[4]) + 1]; + if (row[4][0]) + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text1 = row[4]; - if(strlen(row[4])>0) - strcpy(Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text1, row[4]); - else - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text1[0]=0; + if (row[5][0]) + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text2 = row[5]; - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text2 = new char[strlen(row[5]) + 1]; + if (row[6][0]) + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text3 = row[6]; - if(strlen(row[5])>0) - strcpy(Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text2, row[5]); - else - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text2[0]=0; + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].GoalID = atoi(row[7]); + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].GoalMethod = (TaskMethodType)atoi(row[8]); + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].GoalCount = atoi(row[9]); + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].DeliverToNPC = atoi(row[10]); + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].ZoneID = atoi(row[11]); + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Optional = atoi(row[12]); - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text3 = new char[strlen(row[6]) + 1]; + Log(Logs::General, Logs::Tasks, + "[GLOBALLOAD] Activity Slot %2i: ID %i for Task %5i. Type: %3i, GoalID: %8i, " + "GoalMethod: %i, GoalCount: %3i, ZoneID:%3i", + Tasks[taskID]->ActivityCount, activityID, taskID, + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Type, + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].GoalID, + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].GoalMethod, + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].GoalCount, + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].ZoneID); - if(strlen(row[6])>0) - strcpy(Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text3, row[6]); - else - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text3[0]=0; + Log(Logs::General, Logs::Tasks, "[GLOBALLOAD] Text1: %s", + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text1.c_str()); + Log(Logs::General, Logs::Tasks, "[GLOBALLOAD] Text2: %s", + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text2.c_str()); + Log(Logs::General, Logs::Tasks, "[GLOBALLOAD] Text3: %s", + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text3.c_str()); - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].GoalID = atoi(row[7]); - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].GoalMethod = (TaskMethodType)atoi(row[8]); - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].GoalCount = atoi(row[9]); - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].DeliverToNPC = atoi(row[10]); - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].ZoneID = atoi(row[11]); - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Optional = atoi(row[12]); - - Log(Logs::General, Logs::Tasks, "[GLOBALLOAD] Activity Slot %2i: ID %i for Task %5i. Type: %3i, GoalID: %8i, " - "GoalMethod: %i, GoalCount: %3i, ZoneID:%3i", - Tasks[taskID]->ActivityCount, activityID, taskID, - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Type, - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].GoalID, - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].GoalMethod, - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].GoalCount, - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].ZoneID); - - Log(Logs::General, Logs::Tasks, "[GLOBALLOAD] Text1: %s", Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text1); - Log(Logs::General, Logs::Tasks, "[GLOBALLOAD] Text2: %s", Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text2); - Log(Logs::General, Logs::Tasks, "[GLOBALLOAD] Text3: %s", Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text3); - - Tasks[taskID]->ActivityCount++; + Tasks[taskID]->ActivityCount++; } return true; @@ -2348,10 +2339,10 @@ void ClientTaskState::SendTaskHistory(Client *c, int TaskIndex) { if(CompletedTasks[AdjustedTaskIndex].ActivityDone[i]) { CompletedActivityCount++; PacketLength = PacketLength + sizeof(TaskHistoryReplyData1_Struct) + - strlen(Task->Activity[i].Text1) + 1 + - strlen(Task->Activity[i].Text2) + 1 + + Task->Activity[i].Text1.size() + 1 + + Task->Activity[i].Text2.size() + 1 + sizeof(TaskHistoryReplyData2_Struct) + - strlen(Task->Activity[i].Text3) + 1; + Task->Activity[i].Text3.size() + 1; } } @@ -2371,8 +2362,8 @@ void ClientTaskState::SendTaskHistory(Client *c, int TaskIndex) { thd1 = (TaskHistoryReplyData1_Struct*)Ptr; thd1->ActivityType = Task->Activity[i].Type; Ptr = (char *)thd1 + sizeof(TaskHistoryReplyData1_Struct); - VARSTRUCT_ENCODE_STRING(Ptr, Task->Activity[i].Text1); - VARSTRUCT_ENCODE_STRING(Ptr, Task->Activity[i].Text2); + VARSTRUCT_ENCODE_STRING(Ptr, Task->Activity[i].Text1.c_str()); + VARSTRUCT_ENCODE_STRING(Ptr, Task->Activity[i].Text2.c_str()); thd2 = (TaskHistoryReplyData2_Struct*)Ptr; thd2->GoalCount = Task->Activity[i].GoalCount; thd2->unknown04 = 0xffffffff; @@ -2380,7 +2371,7 @@ void ClientTaskState::SendTaskHistory(Client *c, int TaskIndex) { thd2->ZoneID = Task->Activity[i].ZoneID; thd2->unknown16 = 0x00000000; Ptr = (char *)thd2 + sizeof(TaskHistoryReplyData2_Struct); - VARSTRUCT_ENCODE_STRING(Ptr, Task->Activity[i].Text3); + VARSTRUCT_ENCODE_STRING(Ptr, Task->Activity[i].Text3.c_str()); } } @@ -2562,9 +2553,9 @@ void TaskManager::SendTaskActivityLong(Client *c, int TaskID, int ActivityID, in TaskActivityTrailer_Struct* tat; long PacketLength = sizeof(TaskActivityHeader_Struct) + +sizeof(TaskActivityData1_Struct) + sizeof(TaskActivityTrailer_Struct); - PacketLength = PacketLength + strlen(Tasks[TaskID]->Activity[ActivityID].Text1) + 1 + - strlen(Tasks[TaskID]->Activity[ActivityID].Text2) + 1 + - strlen(Tasks[TaskID]->Activity[ActivityID].Text3) + 1; + PacketLength = PacketLength + Tasks[TaskID]->Activity[ActivityID].Text1.size() + 1 + + Tasks[TaskID]->Activity[ActivityID].Text2.size() + 1 + + Tasks[TaskID]->Activity[ActivityID].Text3.size() + 1; auto outapp = new EQApplicationPacket(OP_TaskActivity, PacketLength); @@ -2587,10 +2578,10 @@ void TaskManager::SendTaskActivityLong(Client *c, int TaskID, int ActivityID, in tah->unknown5 = 0x00000000; // One of these unknown fields maybe related to the 'Use On' activity types Ptr = (char *) tah + sizeof(TaskActivityHeader_Struct); - sprintf(Ptr, "%s", Tasks[TaskID]->Activity[ActivityID].Text1); + sprintf(Ptr, "%s", Tasks[TaskID]->Activity[ActivityID].Text1.c_str()); Ptr = Ptr + strlen(Ptr) + 1; - sprintf(Ptr, "%s", Tasks[TaskID]->Activity[ActivityID].Text2); + sprintf(Ptr, "%s", Tasks[TaskID]->Activity[ActivityID].Text2.c_str()); Ptr = Ptr + strlen(Ptr) + 1; tad1 = (TaskActivityData1_Struct*)Ptr; @@ -2614,7 +2605,7 @@ void TaskManager::SendTaskActivityLong(Client *c, int TaskID, int ActivityID, in tad1->unknown3 = 0x00000000; Ptr = (char *) tad1 + sizeof(TaskActivityData1_Struct); - sprintf(Ptr, "%s", Tasks[TaskID]->Activity[ActivityID].Text3); + sprintf(Ptr, "%s", Tasks[TaskID]->Activity[ActivityID].Text3.c_str()); Ptr = Ptr + strlen(Ptr) + 1; tat = (TaskActivityTrailer_Struct*)Ptr; @@ -2641,9 +2632,9 @@ void TaskManager::SendTaskActivityNew(Client *c, int TaskID, int ActivityID, int String2Len = 4; long PacketLength = 29 + 4 + 8 + 4 + 4 + 5; - PacketLength = PacketLength + strlen(Tasks[TaskID]->Activity[ActivityID].Text1) + 1 + - strlen(Tasks[TaskID]->Activity[ActivityID].Text2) + 1 + - strlen(Tasks[TaskID]->Activity[ActivityID].Text3) + 1 + + PacketLength = PacketLength + Tasks[TaskID]->Activity[ActivityID].Text1.size() + 1 + + Tasks[TaskID]->Activity[ActivityID].Text2.size() + 1 + + Tasks[TaskID]->Activity[ActivityID].Text3.size() + 1 + ((strlen(itoa(Tasks[TaskID]->Activity[ActivityID].ZoneID)) + 1) * 2) + 3 + String2Len; @@ -2666,10 +2657,10 @@ void TaskManager::SendTaskActivityNew(Client *c, int TaskID, int ActivityID, int outapp->WriteUInt8(0); // unknown5 // One of these unknown fields maybe related to the 'Use On' activity types - outapp->WriteString(Tasks[TaskID]->Activity[ActivityID].Text1); + outapp->WriteString(Tasks[TaskID]->Activity[ActivityID].Text1.c_str()); - outapp->WriteUInt32((strlen(Tasks[TaskID]->Activity[ActivityID].Text2) + 1)); // String Length - Add in null terminator - outapp->WriteString(Tasks[TaskID]->Activity[ActivityID].Text2); + outapp->WriteUInt32(Tasks[TaskID]->Activity[ActivityID].Text2.size() + 1); // String Length - Add in null terminator + outapp->WriteString(Tasks[TaskID]->Activity[ActivityID].Text2.c_str()); // Goal Count if(Tasks[TaskID]->Activity[ActivityID].Type != ActivityGiveCash) @@ -2693,7 +2684,7 @@ void TaskManager::SendTaskActivityNew(Client *c, int TaskID, int ActivityID, int outapp->WriteString(itoa(Tasks[TaskID]->Activity[ActivityID].ZoneID)); outapp->WriteUInt32(0); // unknown7 - outapp->WriteString(Tasks[TaskID]->Activity[ActivityID].Text3); + outapp->WriteString(Tasks[TaskID]->Activity[ActivityID].Text3.c_str()); if(Tasks[TaskID]->Activity[ActivityID].Type != ActivityGiveCash) outapp->WriteUInt32(c->GetTaskActivityDoneCount(ClientTaskIndex, ActivityID)); // DoneCount diff --git a/zone/tasks.h b/zone/tasks.h index b55203918..7b0bb2d4a 100644 --- a/zone/tasks.h +++ b/zone/tasks.h @@ -24,6 +24,7 @@ Copyright (C) 2001-2004 EQEMu Development Team (http://eqemulator.net) #include #include +#include #define MAXTASKS 10000 #define MAXTASKSETS 1000 @@ -101,9 +102,9 @@ typedef enum { METHODSINGLEID = 0, METHODLIST = 1, METHODQUEST = 2 } TaskMethodT struct ActivityInformation { int StepNumber; int Type; - char *Text1; - char *Text2; - char *Text3; + std::string Text1; + std::string Text2; + std::string Text3; int GoalID; TaskMethodType GoalMethod; int GoalCount; From 4662f29f11f12aea1a72a7fba8bcfba2ec9d6a86 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Tue, 12 Jun 2018 13:56:17 -0400 Subject: [PATCH 201/670] Change TaskInformation strings to std::string --- zone/tasks.cpp | 63 ++++++++++++++++++++++---------------------------- zone/tasks.h | 6 ++--- 2 files changed, 30 insertions(+), 39 deletions(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index e44fcb5a0..121ea130f 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -48,9 +48,6 @@ TaskManager::TaskManager() { TaskManager::~TaskManager() { for(int i=0; iTitle); - safe_delete_array(Tasks[i]->Description); - safe_delete_array(Tasks[i]->Reward); safe_delete(Tasks[i]); } } @@ -93,9 +90,6 @@ bool TaskManager::LoadSingleTask(int TaskID) { // If this task already exists in memory, free all the dynamically allocated strings. if(Tasks[TaskID]) { - safe_delete_array(Tasks[TaskID]->Title); - safe_delete_array(Tasks[TaskID]->Description); - safe_delete_array(Tasks[TaskID]->Reward); safe_delete(Tasks[TaskID]); } @@ -153,12 +147,9 @@ bool TaskManager::LoadTasks(int singleTask) Tasks[taskID] = new TaskInformation; Tasks[taskID]->Duration = atoi(row[1]); - Tasks[taskID]->Title = new char[strlen(row[2]) + 1]; - strcpy(Tasks[taskID]->Title, row[2]); - Tasks[taskID]->Description = new char[strlen(row[3]) + 1]; - strcpy(Tasks[taskID]->Description, row[3]); - Tasks[taskID]->Reward = new char[strlen(row[4]) + 1]; - strcpy(Tasks[taskID]->Reward, row[4]); + Tasks[taskID]->Title = row[2]; + Tasks[taskID]->Description = row[3]; + Tasks[taskID]->Reward = row[4]; Tasks[taskID]->RewardID = atoi(row[5]); Tasks[taskID]->CashReward = atoi(row[6]); Tasks[taskID]->XPReward = atoi(row[7]); @@ -174,9 +165,9 @@ bool TaskManager::LoadTasks(int singleTask) Log(Logs::General, Logs::Tasks, "[GLOBALLOAD] TaskID: %5i, Duration: %8i, StartZone: %3i Reward: %s MinLevel %i MaxLevel %i " "Repeatable: %s", - taskID, Tasks[taskID]->Duration, Tasks[taskID]->StartZone, Tasks[taskID]->Reward, + taskID, Tasks[taskID]->Duration, Tasks[taskID]->StartZone, Tasks[taskID]->Reward.c_str(), Tasks[taskID]->MinLevel, Tasks[taskID]->MaxLevel, Tasks[taskID]->Repeatable ? "Yes" : "No"); - Log(Logs::General, Logs::Tasks, "[GLOBALLOAD] Title: %s", Tasks[taskID]->Title); + Log(Logs::General, Logs::Tasks, "[GLOBALLOAD] Title: %s", Tasks[taskID]->Title.c_str()); } if (singleTask == 0) @@ -658,7 +649,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) { if(state->ActiveTasks[i].Activity[j].ActivityID != j) { c->Message(13, "Active Task %i, %s. Activity count does not match expected value." "Removing from memory. Contact a GM to resolve this.", - taskID, Tasks[taskID]->Title); + taskID, Tasks[taskID]->Title.c_str()); Log(Logs::General, Logs::Error, "[TASKS]Fatal error in character %i task state. Activity %i for " "Task %i either missing from client state or from task.", characterID, j, taskID); @@ -1043,8 +1034,8 @@ void TaskManager::SendTaskSelector(Client *c, Mob *mob, int TaskCount, int *Task ValidTasks++; - PacketLength = PacketLength + sizeof(AvailableTaskData1_Struct) + strlen(Tasks[TaskList[i]]->Title) + 1 + - strlen(Tasks[TaskList[i]]->Description) + 1 + sizeof(AvailableTaskData2_Struct) + 10 + + PacketLength = PacketLength + sizeof(AvailableTaskData1_Struct) + Tasks[TaskList[i]]->Title.size() + 1 + + Tasks[TaskList[i]]->Description.size() + 1 + sizeof(AvailableTaskData2_Struct) + 10 + sizeof(AvailableTaskTrailer_Struct) + 5; } @@ -1082,11 +1073,11 @@ void TaskManager::SendTaskSelector(Client *c, Mob *mob, int TaskCount, int *Task Ptr = (char *)AvailableTaskData1 + sizeof(AvailableTaskData1_Struct); - sprintf(Ptr, "%s", Tasks[TaskList[i]]->Title); + sprintf(Ptr, "%s", Tasks[TaskList[i]]->Title.c_str()); Ptr = Ptr + strlen(Ptr) + 1; - sprintf(Ptr, "%s", Tasks[TaskList[i]]->Description); + sprintf(Ptr, "%s", Tasks[TaskList[i]]->Description.c_str()); Ptr = Ptr + strlen(Ptr) + 1; @@ -1158,8 +1149,8 @@ void TaskManager::SendTaskSelectorNew(Client *c, Mob *mob, int TaskCount, int *T ValidTasks++; PacketLength += 21; // Task Data - strings - PacketLength += strlen(Tasks[TaskList[i]]->Title) + 1 + - strlen(Tasks[TaskList[i]]->Description) + 1; + PacketLength += Tasks[TaskList[i]]->Title.size() + 1 + + Tasks[TaskList[i]]->Description.size() + 1; sprintf(StartZone, "%i", Tasks[TaskList[i]]->StartZone); /* @@ -1196,8 +1187,8 @@ void TaskManager::SendTaskSelectorNew(Client *c, Mob *mob, int TaskCount, int *T outapp->WriteUInt32(Tasks[TaskList[i]]->Duration); outapp->WriteUInt32(0); // 1 = Short, 2 = Medium, 3 = Long, anything else Unlimited - outapp->WriteString(Tasks[TaskList[i]]->Title); // max 64 with null - outapp->WriteString(Tasks[TaskList[i]]->Description); // max 4000 with null + outapp->WriteString(Tasks[TaskList[i]]->Title.c_str()); // max 64 with null + outapp->WriteString(Tasks[TaskList[i]]->Description.c_str()); // max 4000 with null outapp->WriteUInt8(0); // Has reward set flag outapp->WriteUInt32(1); // ActivityCount - Hard set to 1 for now @@ -1269,7 +1260,7 @@ void TaskManager::ExplainTask(Client*c, int TaskID) { } char Explanation[1000], *ptr; - c->Message(0, "Task %4i: Title: %s", TaskID, Tasks[TaskID]->Description); + c->Message(0, "Task %4i: Title: %s", TaskID, Tasks[TaskID]->Description.c_str()); c->Message(0, "%3i Activities", Tasks[TaskID]->ActivityCount); ptr = Explanation; for(int i=0; iActivityCount; i++) { @@ -1851,7 +1842,7 @@ void ClientTaskState::IncrementDoneCount(Client *c, TaskInformation* Task, int T // Send the updated task/activity list to the client taskmanager->SendSingleActiveTaskToClient(c, TaskIndex, TaskComplete, false); // Inform the client the task has been updated, both by a chat message - c->Message(0, "Your task '%s' has been updated.", Task->Title); + c->Message(0, "Your task '%s' has been updated.", Task->Title.c_str()); if(Task->Activity[ActivityID].GoalMethod != METHODQUEST) { if (!ignore_quest_update){ @@ -2157,8 +2148,8 @@ void ClientTaskState::ShowClientTasks(Client *c) { if(ActiveTasks[i].TaskID==TASKSLOTEMPTY) continue; - c->Message(0, "Task: %i %s", ActiveTasks[i].TaskID, taskmanager->Tasks[ActiveTasks[i].TaskID]->Title); - c->Message(0, " Description: [%s]\n", taskmanager->Tasks[ActiveTasks[i].TaskID]->Description); + c->Message(0, "Task: %i %s", ActiveTasks[i].TaskID, taskmanager->Tasks[ActiveTasks[i].TaskID]->Title.c_str()); + c->Message(0, " Description: [%s]\n", taskmanager->Tasks[ActiveTasks[i].TaskID]->Description.c_str()); for(int j=0; jGetActivityCount(ActiveTasks[i].TaskID); j++) { c->Message(0, " Activity: %2d, DoneCount: %2d, Status: %d (0=Hidden, 1=Active, 2=Complete)", ActiveTasks[i].Activity[j].ActivityID, @@ -2466,7 +2457,7 @@ void TaskManager::SendCompletedTasksToClient(Client *c, ClientTaskState *State) for(int i = FirstTaskToSend; iCompletedTasks[i].TaskID; if(Tasks[TaskID] == nullptr) continue; - PacketLength = PacketLength + 8 + strlen(Tasks[TaskID]->Title) + 1; + PacketLength = PacketLength + 8 + Tasks[TaskID]->Title.size() + 1; } auto outapp = new EQApplicationPacket(OP_CompletedTasks, PacketLength); @@ -2483,7 +2474,7 @@ void TaskManager::SendCompletedTasksToClient(Client *c, ClientTaskState *State) *(uint32 *)buf = TaskID; buf = buf + 4; - sprintf(buf, "%s", Tasks[TaskID]->Title); + sprintf(buf, "%s", Tasks[TaskID]->Title.c_str()); buf = buf + strlen(buf) + 1; //*(uint32 *)buf = (*iterator).CompletedTime; *(uint32 *)buf = State->CompletedTasks[i].CompletedTime; @@ -2774,8 +2765,8 @@ void TaskManager::SendActiveTaskDescription(Client *c, int TaskID, int SequenceN if ((TaskID < 1) || (TaskID >= MAXTASKS) || !Tasks[TaskID]) return; - int PacketLength = sizeof(TaskDescriptionHeader_Struct) + strlen(Tasks[TaskID]->Title) + 1 - + sizeof(TaskDescriptionData1_Struct) + strlen(Tasks[TaskID]->Description) + 1 + int PacketLength = sizeof(TaskDescriptionHeader_Struct) + Tasks[TaskID]->Title.size() + 1 + + sizeof(TaskDescriptionData1_Struct) + Tasks[TaskID]->Description.size() + 1 + sizeof(TaskDescriptionData2_Struct) + 1 + sizeof(TaskDescriptionTrailer_Struct); std::string reward_text; @@ -2802,8 +2793,8 @@ void TaskManager::SendActiveTaskDescription(Client *c, int TaskID, int SequenceN linker.SetLinkType(EQEmu::saylink::SayLinkItemData); linker.SetItemData(reward_item); linker.SetTaskUse(); - if (strlen(Tasks[TaskID]->Reward) != 0) - linker.SetProxyText(Tasks[TaskID]->Reward); + if (!Tasks[TaskID]->Reward.empty()) + linker.SetProxyText(Tasks[TaskID]->Reward.c_str()); reward_text.append(linker.GenerateLink()); } @@ -2841,7 +2832,7 @@ void TaskManager::SendActiveTaskDescription(Client *c, int TaskID, int SequenceN Ptr = (char *) tdh + sizeof(TaskDescriptionHeader_Struct); - sprintf(Ptr, "%s", Tasks[TaskID]->Title); + sprintf(Ptr, "%s", Tasks[TaskID]->Title.c_str()); Ptr = Ptr + strlen(Ptr) + 1; tdd1 = (TaskDescriptionData1_Struct*)Ptr; @@ -2853,7 +2844,7 @@ void TaskManager::SendActiveTaskDescription(Client *c, int TaskID, int SequenceN Ptr = (char *) tdd1 + sizeof(TaskDescriptionData1_Struct); - sprintf(Ptr, "%s", Tasks[TaskID]->Description); + sprintf(Ptr, "%s", Tasks[TaskID]->Description.c_str()); Ptr = Ptr + strlen(Ptr) + 1; tdd2 = (TaskDescriptionData2_Struct*)Ptr; @@ -3053,7 +3044,7 @@ void ClientTaskState::AcceptNewTask(Client *c, int TaskID, int NPCID, bool enfor UnlockActivities(c->CharacterID(), FreeSlot); ActiveTaskCount++; taskmanager->SendSingleActiveTaskToClient(c, FreeSlot, false, true); - c->Message(0, "You have been assigned the task '%s'.", taskmanager->Tasks[TaskID]->Title); + c->Message(0, "You have been assigned the task '%s'.", taskmanager->Tasks[TaskID]->Title.c_str()); char *buf = 0; MakeAnyLenString(&buf, "%d", TaskID); diff --git a/zone/tasks.h b/zone/tasks.h index 7b0bb2d4a..0142f32fd 100644 --- a/zone/tasks.h +++ b/zone/tasks.h @@ -117,9 +117,9 @@ typedef enum { ActivitiesSequential = 0, ActivitiesStepped = 1 } SequenceType; struct TaskInformation { int Duration; - char *Title; - char *Description; - char *Reward; + std::string Title; // max length 64 + std::string Description; // max length 4000 + std::string Reward; int RewardID; int CashReward; // Expressed in copper int XPReward; From 0765d273ea424b159ebce6bdd8c8ec13f63dc324 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 13 Jun 2018 17:08:21 -0400 Subject: [PATCH 202/670] More changes to task system --- utils/sql/git/required/tasks_revamp.sql | 2 ++ zone/tasks.cpp | 44 ++++++++++++------------- zone/tasks.h | 18 +++++++++- 3 files changed, 41 insertions(+), 23 deletions(-) create mode 100644 utils/sql/git/required/tasks_revamp.sql diff --git a/utils/sql/git/required/tasks_revamp.sql b/utils/sql/git/required/tasks_revamp.sql new file mode 100644 index 000000000..d41900a1a --- /dev/null +++ b/utils/sql/git/required/tasks_revamp.sql @@ -0,0 +1,2 @@ +ALTER TABLE `tasks` ADD `type` TINYINT NOT NULL DEFAULT '0' AFTER `id`; +ALTER TABLE `tasks` ADD `duration_code` TINYINT NOT NULL DEFAULT '0' AFTER `duration`; diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 121ea130f..ffff61bd6 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -115,16 +115,14 @@ bool TaskManager::LoadTasks(int singleTask) if (!LoadTaskSets()) Log(Logs::Detail, Logs::Tasks, "TaskManager::LoadTasks LoadTaskSets failed"); - query = StringFormat("SELECT `id`, `duration`, `title`, `description`, `reward`, " - "`rewardid`, `cashreward`, `xpreward`, `rewardmethod`, " - "`startzone`, `minlevel`, `maxlevel`, `repeatable` " - "FROM `tasks` WHERE `id` < %i", + query = StringFormat("SELECT `id`, `type`, `duration`, `duration_code`, `title`, `description`, " + "`reward`, `rewardid`, `cashreward`, `xpreward`, `rewardmethod`, `startzone`, " + "`minlevel`, `maxlevel`, `repeatable` FROM `tasks` WHERE `id` < %i", MAXTASKS); } else - query = StringFormat("SELECT `id`, `duration`, `title`, `description`, `reward`, " - "`rewardid`, `cashreward`, `xpreward`, `rewardmethod`, " - "`startzone`, `minlevel`, `maxlevel`, `repeatable` " - "FROM `tasks` WHERE `id` = %i", + query = StringFormat("SELECT `id`, `type`, `duration`, `duration_code`, `title`, `description`, " + "`reward`, `rewardid`, `cashreward`, `xpreward`, `rewardmethod`, `startzone`, " + "`minlevel`, `maxlevel`, `repeatable` FROM `tasks` WHERE `id` = %i", singleTask); const char *ERR_MYSQLERROR = "[TASKS]Error in TaskManager::LoadTasks: %s"; @@ -146,18 +144,20 @@ bool TaskManager::LoadTasks(int singleTask) } Tasks[taskID] = new TaskInformation; - Tasks[taskID]->Duration = atoi(row[1]); - Tasks[taskID]->Title = row[2]; - Tasks[taskID]->Description = row[3]; - Tasks[taskID]->Reward = row[4]; - Tasks[taskID]->RewardID = atoi(row[5]); - Tasks[taskID]->CashReward = atoi(row[6]); - Tasks[taskID]->XPReward = atoi(row[7]); - Tasks[taskID]->RewardMethod = (TaskMethodType)atoi(row[8]); - Tasks[taskID]->StartZone = atoi(row[9]); - Tasks[taskID]->MinLevel = atoi(row[10]); - Tasks[taskID]->MaxLevel = atoi(row[11]); - Tasks[taskID]->Repeatable = atoi(row[12]); + Tasks[taskID]->type = static_cast(atoi(row[1])); + Tasks[taskID]->Duration = atoi(row[2]); + Tasks[taskID]->dur_code = static_cast(atoi(row[3])); + Tasks[taskID]->Title = row[4]; + Tasks[taskID]->Description = row[5]; + Tasks[taskID]->Reward = row[6]; + Tasks[taskID]->RewardID = atoi(row[7]); + Tasks[taskID]->CashReward = atoi(row[8]); + Tasks[taskID]->XPReward = atoi(row[9]); + Tasks[taskID]->RewardMethod = (TaskMethodType)atoi(row[10]); + Tasks[taskID]->StartZone = atoi(row[11]); + Tasks[taskID]->MinLevel = atoi(row[12]); + Tasks[taskID]->MaxLevel = atoi(row[13]); + Tasks[taskID]->Repeatable = atoi(row[14]); Tasks[taskID]->ActivityCount = 0; Tasks[taskID]->SequenceMode = ActivitiesSequential; Tasks[taskID]->LastStep = 0; @@ -1069,7 +1069,7 @@ void TaskManager::SendTaskSelector(Client *c, Mob *mob, int TaskCount, int *Task AvailableTaskData1->TimeLimit = Tasks[TaskList[i]]->Duration; - AvailableTaskData1->unknown2 = 0; + AvailableTaskData1->unknown2 = static_cast(Tasks[TaskList[i]]->dur_code); // guess Ptr = (char *)AvailableTaskData1 + sizeof(AvailableTaskData1_Struct); @@ -1185,7 +1185,7 @@ void TaskManager::SendTaskSelectorNew(Client *c, Mob *mob, int TaskCount, int *T outapp->WriteUInt32(TaskList[i]); // TaskID outapp->WriteFloat(1.0f); // affects color, difficulty? outapp->WriteUInt32(Tasks[TaskList[i]]->Duration); - outapp->WriteUInt32(0); // 1 = Short, 2 = Medium, 3 = Long, anything else Unlimited + outapp->WriteUInt32(static_cast(Tasks[TaskList[i]]->dur_code)); // 1 = Short, 2 = Medium, 3 = Long, anything else Unlimited outapp->WriteString(Tasks[TaskList[i]]->Title.c_str()); // max 64 with null outapp->WriteString(Tasks[TaskList[i]]->Description.c_str()); // max 4000 with null diff --git a/zone/tasks.h b/zone/tasks.h index 0142f32fd..f1f160b56 100644 --- a/zone/tasks.h +++ b/zone/tasks.h @@ -115,10 +115,26 @@ struct ActivityInformation { typedef enum { ActivitiesSequential = 0, ActivitiesStepped = 1 } SequenceType; +enum class TaskType { + Task = 0, // can have at max 1 + Shared = 1, // can have at max 1 + Quest = 2, // can have at max 19 or 29 depending on client + E = 3 // can have at max 19 or 29 depending on client, not present in live anymore +}; + +enum class DurationCode { + None = 0, + Short = 1, + Medium = 2, + Long = 3 +}; + struct TaskInformation { + TaskType type; int Duration; + DurationCode dur_code; // description for time investment for when Duration == 0 std::string Title; // max length 64 - std::string Description; // max length 4000 + std::string Description; // max length 4000, 2048 on Tit std::string Reward; int RewardID; int CashReward; // Expressed in copper From c35e010461bee727597bf4573f859f3d20ea9d62 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 13 Jun 2018 17:23:07 -0400 Subject: [PATCH 203/670] Tweak SQL --- utils/sql/git/required/tasks_revamp.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/sql/git/required/tasks_revamp.sql b/utils/sql/git/required/tasks_revamp.sql index d41900a1a..160a7e29a 100644 --- a/utils/sql/git/required/tasks_revamp.sql +++ b/utils/sql/git/required/tasks_revamp.sql @@ -1,2 +1,3 @@ ALTER TABLE `tasks` ADD `type` TINYINT NOT NULL DEFAULT '0' AFTER `id`; ALTER TABLE `tasks` ADD `duration_code` TINYINT NOT NULL DEFAULT '0' AFTER `duration`; +UPDATE `tasks` SET `type` = '2'; -- we were treating them all as quests From 247d4789906878e719a3167fb7ab080481814a67 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 13 Jun 2018 17:51:35 -0400 Subject: [PATCH 204/670] Rename MAXACTIVETASKS to MAXACTIVEQUESTS --- zone/tasks.cpp | 64 +++++++++++++++++++++++++------------------------- zone/tasks.h | 8 +++---- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index ffff61bd6..b0efc0cb0 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -292,7 +292,7 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) { Log(Logs::Detail, Logs::Tasks,"TaskManager::SaveClientState for character ID %d", characterID); if(state->ActiveTaskCount > 0) { - for(int task=0; taskActiveTasks[task].TaskID; if(taskID==TASKSLOTEMPTY) continue; @@ -464,7 +464,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) { continue; } - if((slot<0) || (slot>=MAXACTIVETASKS)) { + if((slot<0) || (slot>=MAXACTIVEQUESTS)) { Log(Logs::General, Logs::Error, "[TASKS] Slot %i out of range while loading character tasks from database", slot); continue; } @@ -518,7 +518,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) { // Find Active Task Slot int activeTaskIndex = -1; - for(int i=0; iActiveTasks[i].TaskID == taskID) { activeTaskIndex = i; break; @@ -632,7 +632,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) { // Check that there is an entry in the client task state for every activity in each task // This should only break if a ServerOP adds or deletes activites for a task that players already // have active, or due to a bug. - for(int i=0; iActiveTasks[i].TaskID; if(taskID==TASKSLOTEMPTY) continue; if(!Tasks[taskID]) { @@ -659,7 +659,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) { } } - for(int i=0; iActiveTasks[i].TaskID != TASKSLOTEMPTY) state->UnlockActivities(characterID, i); @@ -1281,7 +1281,7 @@ ClientTaskState::ClientTaskState() { LastCompletedTaskLoaded = 0; CheckedTouchActivities = false; - for(int i=0; i=MAXACTIVETASKS)) return 0; + if((index<0) || (index>=MAXACTIVEQUESTS)) return 0; return ActiveTasks[index].TaskID; } @@ -1485,7 +1485,7 @@ bool ClientTaskState::UpdateTasksByNPC(Client *c, int ActivityType, int NPCTypeI if(!taskmanager || ActiveTaskCount == 0) return false; - for(int i=0; iTasks[ActiveTasks[i].TaskID]; @@ -1569,7 +1569,7 @@ int ClientTaskState::ActiveSpeakActivity(int NPCTypeID, int TaskID) { if(!taskmanager || ActiveTaskCount == 0) return -1; if((TaskID<=0) || (TaskID>=MAXTASKS)) return -1; - for(int i=0; iTasks[ActiveTasks[i].TaskID]; @@ -1605,7 +1605,7 @@ void ClientTaskState::UpdateTasksForItem(Client *c, ActivityType Type, int ItemI if(ActiveTaskCount == 0) return; - for(int i=0; iSendTaskFailed(ActiveTasks[i].TaskID, i); @@ -2038,7 +2038,7 @@ bool ClientTaskState::IsTaskActivityActive(int TaskID, int ActivityID) { int ActiveTaskIndex = -1; - for(int i=0; iMessage(0, "Task Information:"); //for(int i=0; i=MAXACTIVETASKS)) return false; + if((Index < 0) || (Index>=MAXACTIVEQUESTS)) return false; if((ActiveTasks[Index].TaskID <= 0) || (ActiveTasks[Index].TaskID >= MAXTASKS)) return false; @@ -2237,7 +2237,7 @@ void ClientTaskState::TaskPeriodicChecks(Client *c) { // Check for tasks that have failed because they have not been completed in the specified time // - for(int i=0; iGetActiveTaskCount(); TaskIndex++) { - for(int TaskIndex=0; TaskIndexGetActiveTaskID(TaskIndex); if((TaskID==0) || (Tasks[TaskID] ==0)) continue; int StartTime = c->GetTaskStartTime(TaskIndex); @@ -2730,7 +2730,7 @@ void TaskManager::SendActiveTasksToClient(Client *c, bool TaskComplete) { void TaskManager::SendSingleActiveTaskToClient(Client *c, int TaskIndex, bool TaskComplete, bool BringUpTaskJournal) { - if((TaskIndex < 0) || (TaskIndex >= MAXACTIVETASKS)) return; + if((TaskIndex < 0) || (TaskIndex >= MAXACTIVEQUESTS)) return; int TaskID = c->GetActiveTaskID(TaskIndex); @@ -2893,7 +2893,7 @@ int ClientTaskState::GetTaskActivityDoneCount(int index, int ActivityID) { int ClientTaskState::GetTaskActivityDoneCountFromTaskID(int TaskID, int ActivityID){ int ActiveTaskIndex = -1; - for(int i=0; iMessage(13, "You already have the maximum allowable number of active tasks (%i)", MAXACTIVETASKS); + if(ActiveTaskCount==MAXACTIVEQUESTS) { + c->Message(13, "You already have the maximum allowable number of active tasks (%i)", MAXACTIVEQUESTS); return; } - for(int i=0; iMessage(13, "You have already been assigned this task."); return; @@ -3014,7 +3014,7 @@ void ClientTaskState::AcceptNewTask(Client *c, int TaskID, int NPCID, bool enfor // waste of bandwidth. // int FreeSlot = -1; - for(int i=0; iMessage(13, "You already have the maximum allowable number of active tasks (%i)", MAXACTIVETASKS); + c->Message(13, "You already have the maximum allowable number of active tasks (%i)", MAXACTIVEQUESTS); return; } diff --git a/zone/tasks.h b/zone/tasks.h index f1f160b56..ed6c01bff 100644 --- a/zone/tasks.h +++ b/zone/tasks.h @@ -28,8 +28,8 @@ Copyright (C) 2001-2004 EQEMu Development Team (http://eqemulator.net) #define MAXTASKS 10000 #define MAXTASKSETS 1000 -// The Client has a hard cap of 19 active tasks -#define MAXACTIVETASKS 19 +// The Client has a hard cap of 19 active tasks, 29 in RoF2 +#define MAXACTIVEQUESTS 19 // The Max Chooser (Task Selector entries) is capped at 40 in the Titanium Client. #define MAXCHOOSERENTRIES 40 // The Client has a hard cap of 20 activities per task. @@ -228,8 +228,8 @@ private: bool UnlockActivities(int CharID, int TaskIndex); void IncrementDoneCount(Client *c, TaskInformation *Task, int TaskIndex, int ActivityID, int Count = 1, bool ignore_quest_update = false); int ActiveTaskCount; - ClientTaskInformation ActiveTasks[MAXACTIVETASKS]; - std::vectorEnabledTasks; + ClientTaskInformation ActiveTasks[MAXACTIVEQUESTS]; + std::vector EnabledTasks; std::vector CompletedTasks; int LastCompletedTaskLoaded; bool CheckedTouchActivities; From 9bd5f361292ae9200eeb10a7d43615cb334d6040 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 13 Jun 2018 18:06:08 -0400 Subject: [PATCH 205/670] Rename ClientTaskState::ActiveTasks to ClientTaskState::ActiveQuests because that's what it is --- zone/tasks.cpp | 306 ++++++++++++++++++++++++------------------------- zone/tasks.h | 2 +- 2 files changed, 154 insertions(+), 154 deletions(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index b0efc0cb0..4fc05daf7 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -293,23 +293,23 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) { if(state->ActiveTaskCount > 0) { for(int task=0; taskActiveTasks[task].TaskID; + int taskID = state->ActiveQuests[task].TaskID; if(taskID==TASKSLOTEMPTY) continue; - if(state->ActiveTasks[task].Updated) { + if(state->ActiveQuests[task].Updated) { Log(Logs::General, Logs::Tasks, "[CLIENTSAVE] TaskManager::SaveClientState for character ID %d, Updating TaskIndex %i TaskID %i", characterID, task, taskID); std::string query = StringFormat("REPLACE INTO character_tasks (charid, taskid, slot, acceptedtime) " "VALUES (%i, %i, %i, %i)", - characterID, taskID, task, state->ActiveTasks[task].AcceptedTime); + characterID, taskID, task, state->ActiveQuests[task].AcceptedTime); auto results = database.QueryDatabase(query); if (!results.Success()) { Log(Logs::General, Logs::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str()); } else { - state->ActiveTasks[task].Updated = false; + state->ActiveQuests[task].Updated = false; } } @@ -320,7 +320,7 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) { int updatedActivityCount = 0; for(int activityIndex = 0; activityIndexActivityCount; ++activityIndex) { - if(!state->ActiveTasks[task].Activity[activityIndex].Updated) + if(!state->ActiveQuests[task].Activity[activityIndex].Updated) continue; Log(Logs::General, Logs::Tasks, "[CLIENTSAVE] TaskManager::SaveClientSate for character ID %d, Updating Activity %i, %i", @@ -329,13 +329,13 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) { if(updatedActivityCount==0) query += StringFormat("(%i, %i, %i, %i, %i)", characterID, taskID, activityIndex, - state->ActiveTasks[task].Activity[activityIndex].DoneCount, - state->ActiveTasks[task].Activity[activityIndex].State == ActivityCompleted); + state->ActiveQuests[task].Activity[activityIndex].DoneCount, + state->ActiveQuests[task].Activity[activityIndex].State == ActivityCompleted); else query += StringFormat(", (%i, %i, %i, %i, %i)", characterID, taskID, activityIndex, - state->ActiveTasks[task].Activity[activityIndex].DoneCount, - state->ActiveTasks[task].Activity[activityIndex].State == ActivityCompleted); + state->ActiveQuests[task].Activity[activityIndex].DoneCount, + state->ActiveQuests[task].Activity[activityIndex].State == ActivityCompleted); updatedActivityCount++; } @@ -351,9 +351,9 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) { continue; } - state->ActiveTasks[task].Updated=false; + state->ActiveQuests[task].Updated=false; for(int activityIndex=0; activityIndexActivityCount; ++activityIndex) - state->ActiveTasks[task].Activity[activityIndex].Updated=false; + state->ActiveQuests[task].Activity[activityIndex].Updated=false; } } @@ -469,20 +469,20 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) { continue; } - if(state->ActiveTasks[slot].TaskID != TASKSLOTEMPTY) { + if(state->ActiveQuests[slot].TaskID != TASKSLOTEMPTY) { Log(Logs::General, Logs::Error, "[TASKS] Slot %i for Task %is is already occupied.", slot, taskID); continue; } int acceptedtime = atoi(row[2]); - state->ActiveTasks[slot].TaskID = taskID; - state->ActiveTasks[slot].CurrentStep = -1; - state->ActiveTasks[slot].AcceptedTime = acceptedtime; - state->ActiveTasks[slot].Updated = false; + state->ActiveQuests[slot].TaskID = taskID; + state->ActiveQuests[slot].CurrentStep = -1; + state->ActiveQuests[slot].AcceptedTime = acceptedtime; + state->ActiveQuests[slot].Updated = false; for(int i=0; iActiveTasks[slot].Activity[i].ActivityID = -1; + state->ActiveQuests[slot].Activity[i].ActivityID = -1; ++state->ActiveTaskCount; @@ -519,7 +519,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) { int activeTaskIndex = -1; for(int i=0; iActiveTasks[i].TaskID == taskID) { + if(state->ActiveQuests[i].TaskID == taskID) { activeTaskIndex = i; break; } @@ -531,14 +531,14 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) { int doneCount = atoi(row[2]); bool completed = atoi(row[3]); - state->ActiveTasks[activeTaskIndex].Activity[activityID].ActivityID = activityID; - state->ActiveTasks[activeTaskIndex].Activity[activityID].DoneCount = doneCount; + state->ActiveQuests[activeTaskIndex].Activity[activityID].ActivityID = activityID; + state->ActiveQuests[activeTaskIndex].Activity[activityID].DoneCount = doneCount; if(completed) - state->ActiveTasks[activeTaskIndex].Activity[activityID].State = ActivityCompleted; + state->ActiveQuests[activeTaskIndex].Activity[activityID].State = ActivityCompleted; else - state->ActiveTasks[activeTaskIndex].Activity[activityID].State = ActivityHidden; + state->ActiveQuests[activeTaskIndex].Activity[activityID].State = ActivityHidden; - state->ActiveTasks[activeTaskIndex].Activity[activityID].Updated = false; + state->ActiveQuests[activeTaskIndex].Activity[activityID].Updated = false; Log(Logs::General, Logs::Tasks, "[CLIENTLOAD] TaskManager::LoadClientState. Char: %i Task ID %i, ActivityID: %i, DoneCount: %i, Completed: %i", characterID, taskID, activityID, doneCount, completed); @@ -633,34 +633,34 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) { // This should only break if a ServerOP adds or deletes activites for a task that players already // have active, or due to a bug. for(int i=0; iActiveTasks[i].TaskID; + int taskID = state->ActiveQuests[i].TaskID; if(taskID==TASKSLOTEMPTY) continue; if(!Tasks[taskID]) { c->Message(13, "Active Task Slot %i, references a task (%i), that does not exist. " "Removing from memory. Contact a GM to resolve this.",i, taskID); Log(Logs::General, Logs::Error, "[TASKS]Character %i has task %i which does not exist.", characterID, taskID); - state->ActiveTasks[i].TaskID=TASKSLOTEMPTY; + state->ActiveQuests[i].TaskID=TASKSLOTEMPTY; continue; } for(int j=0; jActivityCount; j++) { - if(state->ActiveTasks[i].Activity[j].ActivityID != j) { + if(state->ActiveQuests[i].Activity[j].ActivityID != j) { c->Message(13, "Active Task %i, %s. Activity count does not match expected value." "Removing from memory. Contact a GM to resolve this.", taskID, Tasks[taskID]->Title.c_str()); Log(Logs::General, Logs::Error, "[TASKS]Fatal error in character %i task state. Activity %i for " "Task %i either missing from client state or from task.", characterID, j, taskID); - state->ActiveTasks[i].TaskID=TASKSLOTEMPTY; + state->ActiveQuests[i].TaskID=TASKSLOTEMPTY; break; } } } for(int i=0; iActiveTasks[i].TaskID != TASKSLOTEMPTY) + if(state->ActiveQuests[i].TaskID != TASKSLOTEMPTY) state->UnlockActivities(characterID, i); Log(Logs::General, Logs::Tasks, "[CLIENTLOAD] LoadClientState for Character ID %d DONE!", characterID); @@ -1282,7 +1282,7 @@ ClientTaskState::ClientTaskState() { CheckedTouchActivities = false; for(int i=0; i=MAXACTIVEQUESTS)) return 0; - return ActiveTasks[index].TaskID; + return ActiveQuests[index].TaskID; } static void DeleteCompletedTaskFromDatabase(int charID, int taskID) { @@ -1315,7 +1315,7 @@ bool ClientTaskState::UnlockActivities(int CharID, int TaskIndex) { bool AllActivitiesComplete = true; - TaskInformation* Task = taskmanager->Tasks[ActiveTasks[TaskIndex].TaskID]; + TaskInformation* Task = taskmanager->Tasks[ActiveQuests[TaskIndex].TaskID]; if(Task==nullptr) return true; @@ -1323,21 +1323,21 @@ bool ClientTaskState::UnlockActivities(int CharID, int TaskIndex) { // marked as hidden. For Sequential (non-stepped) mode, we mark the first // activity as active if not complete. Log(Logs::General, Logs::Tasks, "[UPDATE] CharID: %i Task: %i Sequence mode is %i", - CharID, ActiveTasks[TaskIndex].TaskID, Task->SequenceMode); + CharID, ActiveQuests[TaskIndex].TaskID, Task->SequenceMode); if(Task->SequenceMode == ActivitiesSequential) { - if(ActiveTasks[TaskIndex].Activity[0].State != ActivityCompleted) - ActiveTasks[TaskIndex].Activity[0].State = ActivityActive; + if(ActiveQuests[TaskIndex].Activity[0].State != ActivityCompleted) + ActiveQuests[TaskIndex].Activity[0].State = ActivityActive; // Enable the next Hidden task. for(int i=0; iActivityCount; i++) { - if((ActiveTasks[TaskIndex].Activity[i].State == ActivityActive) && + if((ActiveQuests[TaskIndex].Activity[i].State == ActivityActive) && (!Task->Activity[i].Optional)) { AllActivitiesComplete = false; break; } - if(ActiveTasks[TaskIndex].Activity[i].State == ActivityHidden) { - ActiveTasks[TaskIndex].Activity[i].State = ActivityActive; + if(ActiveQuests[TaskIndex].Activity[i].State == ActivityHidden) { + ActiveQuests[TaskIndex].Activity[i].State = ActivityActive; AllActivitiesComplete = false; break; } @@ -1349,7 +1349,7 @@ bool ClientTaskState::UnlockActivities(int CharID, int TaskIndex) { int ErasedElements = 0; while(Iterator != CompletedTasks.end()) { int TaskID = (*Iterator).TaskID; - if(TaskID == ActiveTasks[TaskIndex].TaskID) { + if(TaskID == ActiveQuests[TaskIndex].TaskID) { Iterator = CompletedTasks.erase(Iterator); ErasedElements++; } @@ -1359,17 +1359,17 @@ bool ClientTaskState::UnlockActivities(int CharID, int TaskIndex) { Log(Logs::General, Logs::Tasks, "[UPDATE] Erased Element count is %i", ErasedElements); if(ErasedElements) { LastCompletedTaskLoaded -= ErasedElements; - DeleteCompletedTaskFromDatabase(CharID, ActiveTasks[TaskIndex].TaskID); + DeleteCompletedTaskFromDatabase(CharID, ActiveQuests[TaskIndex].TaskID); } } CompletedTaskInformation cti; - cti.TaskID = ActiveTasks[TaskIndex].TaskID; + cti.TaskID = ActiveQuests[TaskIndex].TaskID; cti.CompletedTime = time(nullptr); for(int i=0; iActivityCount; i++) - cti.ActivityDone[i] = (ActiveTasks[TaskIndex].Activity[i].State == ActivityCompleted); + cti.ActivityDone[i] = (ActiveQuests[TaskIndex].Activity[i].State == ActivityCompleted); CompletedTasks.push_back(cti); } @@ -1382,25 +1382,25 @@ bool ClientTaskState::UnlockActivities(int CharID, int TaskIndex) { bool CurrentStepComplete = true; - Log(Logs::General, Logs::Tasks, "[UPDATE] Current Step is %i, Last Step is %i", ActiveTasks[TaskIndex].CurrentStep, Task->LastStep); + Log(Logs::General, Logs::Tasks, "[UPDATE] Current Step is %i, Last Step is %i", ActiveQuests[TaskIndex].CurrentStep, Task->LastStep); // If CurrentStep is -1, this is the first call to this method since loading the // client state. Unlock all activities with a step number of 0 - if(ActiveTasks[TaskIndex].CurrentStep == -1) { + if(ActiveQuests[TaskIndex].CurrentStep == -1) { for(int i=0; iActivityCount; i++) { if((Task->Activity[i].StepNumber == 0) && - (ActiveTasks[TaskIndex].Activity[i].State == ActivityHidden)) { - ActiveTasks[TaskIndex].Activity[i].State = ActivityActive; - //ActiveTasks[TaskIndex].Activity[i].Updated=true; + (ActiveQuests[TaskIndex].Activity[i].State == ActivityHidden)) { + ActiveQuests[TaskIndex].Activity[i].State = ActivityActive; + //ActiveQuests[TaskIndex].Activity[i].Updated=true; } } - ActiveTasks[TaskIndex].CurrentStep = 0; + ActiveQuests[TaskIndex].CurrentStep = 0; } - for(int Step=ActiveTasks[TaskIndex].CurrentStep; Step<=Task->LastStep; Step++) { + for(int Step=ActiveQuests[TaskIndex].CurrentStep; Step<=Task->LastStep; Step++) { for(int Activity=0; ActivityActivityCount; Activity++) { - if(Task->Activity[Activity].StepNumber == (int)ActiveTasks[TaskIndex].CurrentStep) { - if((ActiveTasks[TaskIndex].Activity[Activity].State != ActivityCompleted) && + if(Task->Activity[Activity].StepNumber == (int)ActiveQuests[TaskIndex].CurrentStep) { + if((ActiveQuests[TaskIndex].Activity[Activity].State != ActivityCompleted) && (!Task->Activity[Activity].Optional)) { CurrentStepComplete = false; AllActivitiesComplete = false; @@ -1409,7 +1409,7 @@ bool ClientTaskState::UnlockActivities(int CharID, int TaskIndex) { } } if(!CurrentStepComplete) break; - ActiveTasks[TaskIndex].CurrentStep++; + ActiveQuests[TaskIndex].CurrentStep++; } if(AllActivitiesComplete) { @@ -1422,7 +1422,7 @@ bool ClientTaskState::UnlockActivities(int CharID, int TaskIndex) { int ErasedElements = 0; while(Iterator != CompletedTasks.end()) { int TaskID = (*Iterator).TaskID; - if(TaskID == ActiveTasks[TaskIndex].TaskID) { + if(TaskID == ActiveQuests[TaskIndex].TaskID) { Iterator = CompletedTasks.erase(Iterator); ErasedElements++; } @@ -1432,16 +1432,16 @@ bool ClientTaskState::UnlockActivities(int CharID, int TaskIndex) { Log(Logs::General, Logs::Tasks, "[UPDATE] Erased Element count is %i", ErasedElements); if(ErasedElements) { LastCompletedTaskLoaded -= ErasedElements; - DeleteCompletedTaskFromDatabase(CharID, ActiveTasks[TaskIndex].TaskID); + DeleteCompletedTaskFromDatabase(CharID, ActiveQuests[TaskIndex].TaskID); } } CompletedTaskInformation cti; - cti.TaskID = ActiveTasks[TaskIndex].TaskID; + cti.TaskID = ActiveQuests[TaskIndex].TaskID; cti.CompletedTime = time(nullptr); for(int i=0; iActivityCount; i++) - cti.ActivityDone[i] = (ActiveTasks[TaskIndex].Activity[i].State == ActivityCompleted); + cti.ActivityDone[i] = (ActiveQuests[TaskIndex].Activity[i].State == ActivityCompleted); CompletedTasks.push_back(cti); } @@ -1451,10 +1451,10 @@ bool ClientTaskState::UnlockActivities(int CharID, int TaskIndex) { // Mark all non-completed tasks in the current step as active // for(int Activity=0; ActivityActivityCount; Activity++) { - if((Task->Activity[Activity].StepNumber == (int)ActiveTasks[TaskIndex].CurrentStep) && - (ActiveTasks[TaskIndex].Activity[Activity].State == ActivityHidden)) { - ActiveTasks[TaskIndex].Activity[Activity].State = ActivityActive; - ActiveTasks[TaskIndex].Activity[Activity].Updated=true; + if((Task->Activity[Activity].StepNumber == (int)ActiveQuests[TaskIndex].CurrentStep) && + (ActiveQuests[TaskIndex].Activity[Activity].State == ActivityHidden)) { + ActiveQuests[TaskIndex].Activity[Activity].State = ActivityActive; + ActiveQuests[TaskIndex].Activity[Activity].Updated=true; } } @@ -1486,23 +1486,23 @@ bool ClientTaskState::UpdateTasksByNPC(Client *c, int ActivityType, int NPCTypeI if(!taskmanager || ActiveTaskCount == 0) return false; for(int i=0; iTasks[ActiveTasks[i].TaskID]; + TaskInformation* Task = taskmanager->Tasks[ActiveQuests[i].TaskID]; if(Task == nullptr) return false; for(int j=0; jActivityCount; j++) { // We are not interested in completed or hidden activities - if(ActiveTasks[i].Activity[j].State != ActivityActive) continue; + if(ActiveQuests[i].Activity[j].State != ActivityActive) continue; // We are only interested in Kill activities if(Task->Activity[j].Type != ActivityType) continue; // Is there a zone restriction on the activity ? if((Task->Activity[j].ZoneID >0) && (Task->Activity[j].ZoneID != (int)zone->GetZoneID())) { Log(Logs::General, Logs::Tasks, "[UPDATE] Char: %s Task: %i, Activity %i, Activity type %i for NPC %i failed zone check", - c->GetName(), ActiveTasks[i].TaskID, j, ActivityType, NPCTypeID); + c->GetName(), ActiveQuests[i].TaskID, j, ActivityType, NPCTypeID); continue; } // Is the activity to kill this type of NPC ? @@ -1539,15 +1539,15 @@ int ClientTaskState::ActiveSpeakTask(int NPCTypeID) { if(!taskmanager || ActiveTaskCount == 0) return 0; for(int i=0; iTasks[ActiveTasks[i].TaskID]; + TaskInformation* Task = taskmanager->Tasks[ActiveQuests[i].TaskID]; if(Task == nullptr) continue; for(int j=0; jActivityCount; j++) { // We are not interested in completed or hidden activities - if(ActiveTasks[i].Activity[j].State != ActivityActive) continue; + if(ActiveQuests[i].Activity[j].State != ActivityActive) continue; if(Task->Activity[j].Type != ActivitySpeakWith) continue; // Is there a zone restriction on the activity ? if((Task->Activity[j].ZoneID >0) && (Task->Activity[j].ZoneID != (int)zone->GetZoneID())) { @@ -1555,7 +1555,7 @@ int ClientTaskState::ActiveSpeakTask(int NPCTypeID) { } // Is the activity to speak with this type of NPC ? if((Task->Activity[j].GoalMethod == METHODQUEST) && - (Task->Activity[j].GoalID == NPCTypeID)) return ActiveTasks[i].TaskID; + (Task->Activity[j].GoalID == NPCTypeID)) return ActiveQuests[i].TaskID; } } return 0; @@ -1570,15 +1570,15 @@ int ClientTaskState::ActiveSpeakActivity(int NPCTypeID, int TaskID) { if((TaskID<=0) || (TaskID>=MAXTASKS)) return -1; for(int i=0; iTasks[ActiveTasks[i].TaskID]; + TaskInformation* Task = taskmanager->Tasks[ActiveQuests[i].TaskID]; if(Task == nullptr) continue; for(int j=0; jActivityCount; j++) { // We are not interested in completed or hidden activities - if(ActiveTasks[i].Activity[j].State != ActivityActive) continue; + if(ActiveQuests[i].Activity[j].State != ActivityActive) continue; if(Task->Activity[j].Type != ActivitySpeakWith) continue; // Is there a zone restriction on the activity ? if((Task->Activity[j].ZoneID >0) && (Task->Activity[j].ZoneID != (int)zone->GetZoneID())) { @@ -1606,17 +1606,17 @@ void ClientTaskState::UpdateTasksForItem(Client *c, ActivityType Type, int ItemI if(ActiveTaskCount == 0) return; for(int i=0; iTasks[ActiveTasks[i].TaskID]; + TaskInformation* Task = taskmanager->Tasks[ActiveQuests[i].TaskID]; if(Task == nullptr) return; for(int j=0; jActivityCount; j++) { // We are not interested in completed or hidden activities - if(ActiveTasks[i].Activity[j].State != ActivityActive) continue; + if(ActiveQuests[i].Activity[j].State != ActivityActive) continue; // We are only interested in the ActivityType we were called with if(Task->Activity[j].Type != (int)Type) continue; // Is there a zone restriction on the activity ? @@ -1658,17 +1658,17 @@ void ClientTaskState::UpdateTasksOnExplore(Client *c, int ExploreID) { if(ActiveTaskCount == 0) return; for(int i=0; iTasks[ActiveTasks[i].TaskID]; + TaskInformation* Task = taskmanager->Tasks[ActiveQuests[i].TaskID]; if(Task == nullptr) return; for(int j=0; jActivityCount; j++) { // We are not interested in completed or hidden activities - if(ActiveTasks[i].Activity[j].State != ActivityActive) continue; + if(ActiveQuests[i].Activity[j].State != ActivityActive) continue; // We are only interested in explore activities if(Task->Activity[j].Type != ActivityExplore) continue; if((Task->Activity[j].ZoneID >0) && (Task->Activity[j].ZoneID != (int)zone->GetZoneID())) { @@ -1696,7 +1696,7 @@ void ClientTaskState::UpdateTasksOnExplore(Client *c, int ExploreID) { // (Only a goal count of 1 makes sense for explore activities?) Log(Logs::General, Logs::Tasks, "[UPDATE] Increment on explore"); IncrementDoneCount(c, Task, i, j, - Task->Activity[j].GoalCount - ActiveTasks[i].Activity[j].DoneCount); + Task->Activity[j].GoalCount - ActiveQuests[i].Activity[j].DoneCount); } } @@ -1713,17 +1713,17 @@ bool ClientTaskState::UpdateTasksOnDeliver(Client *c, std::listTasks[ActiveTasks[i].TaskID]; + TaskInformation* Task = taskmanager->Tasks[ActiveQuests[i].TaskID]; if(Task == nullptr) return false; for(int j=0; jActivityCount; j++) { // We are not interested in completed or hidden activities - if(ActiveTasks[i].Activity[j].State != ActivityActive) continue; + if(ActiveQuests[i].Activity[j].State != ActivityActive) continue; // We are only interested in Deliver activities if((Task->Activity[j].Type != ActivityDeliver) && (Task->Activity[j].Type != ActivityGiveCash)) continue; @@ -1779,17 +1779,17 @@ void ClientTaskState::UpdateTasksOnTouch(Client *c, int ZoneID) { if(ActiveTaskCount == 0) return; for(int i=0; iTasks[ActiveTasks[i].TaskID]; + TaskInformation* Task = taskmanager->Tasks[ActiveQuests[i].TaskID]; if(Task == nullptr) return; for(int j=0; jActivityCount; j++) { // We are not interested in completed or hidden activities - if(ActiveTasks[i].Activity[j].State != ActivityActive) continue; + if(ActiveQuests[i].Activity[j].State != ActivityActive) continue; // We are only interested in touch activities if(Task->Activity[j].Type != ActivityTouch) continue; if(Task->Activity[j].GoalMethod != METHODSINGLEID) continue; @@ -1802,7 +1802,7 @@ void ClientTaskState::UpdateTasksOnTouch(Client *c, int ZoneID) { // (Only a goal count of 1 makes sense for touch activities?) Log(Logs::General, Logs::Tasks, "[UPDATE] Increment on Touch"); IncrementDoneCount(c, Task, i, j, - Task->Activity[j].GoalCount - ActiveTasks[i].Activity[j].DoneCount); + Task->Activity[j].GoalCount - ActiveQuests[i].Activity[j].DoneCount); } } @@ -1812,33 +1812,33 @@ void ClientTaskState::IncrementDoneCount(Client *c, TaskInformation* Task, int T Log(Logs::General, Logs::Tasks, "[UPDATE] IncrementDoneCount"); - ActiveTasks[TaskIndex].Activity[ActivityID].DoneCount += Count; + ActiveQuests[TaskIndex].Activity[ActivityID].DoneCount += Count; - if(ActiveTasks[TaskIndex].Activity[ActivityID].DoneCount > Task->Activity[ActivityID].GoalCount) - ActiveTasks[TaskIndex].Activity[ActivityID].DoneCount = Task->Activity[ActivityID].GoalCount; + if(ActiveQuests[TaskIndex].Activity[ActivityID].DoneCount > Task->Activity[ActivityID].GoalCount) + ActiveQuests[TaskIndex].Activity[ActivityID].DoneCount = Task->Activity[ActivityID].GoalCount; if (!ignore_quest_update){ char buf[24]; - snprintf(buf, 23, "%d %d %d", ActiveTasks[TaskIndex].Activity[ActivityID].DoneCount, ActiveTasks[TaskIndex].Activity[ActivityID].ActivityID, ActiveTasks[TaskIndex].TaskID); + snprintf(buf, 23, "%d %d %d", ActiveQuests[TaskIndex].Activity[ActivityID].DoneCount, ActiveQuests[TaskIndex].Activity[ActivityID].ActivityID, ActiveQuests[TaskIndex].TaskID); buf[23] = '\0'; parse->EventPlayer(EVENT_TASK_UPDATE, c, buf, 0); } - ActiveTasks[TaskIndex].Activity[ActivityID].Updated=true; + ActiveQuests[TaskIndex].Activity[ActivityID].Updated=true; // Have we reached the goal count for this activity ? - if(ActiveTasks[TaskIndex].Activity[ActivityID].DoneCount >= Task->Activity[ActivityID].GoalCount) { + if(ActiveQuests[TaskIndex].Activity[ActivityID].DoneCount >= Task->Activity[ActivityID].GoalCount) { Log(Logs::General, Logs::Tasks, "[UPDATE] Done (%i) = Goal (%i) for Activity %i", - ActiveTasks[TaskIndex].Activity[ActivityID].DoneCount, + ActiveQuests[TaskIndex].Activity[ActivityID].DoneCount, Task->Activity[ActivityID].GoalCount, ActivityID); // Flag the activity as complete - ActiveTasks[TaskIndex].Activity[ActivityID].State = ActivityCompleted; + ActiveQuests[TaskIndex].Activity[ActivityID].State = ActivityCompleted; // Unlock subsequent activities for this task bool TaskComplete = UnlockActivities(c->CharacterID(), TaskIndex); Log(Logs::General, Logs::Tasks, "[UPDATE] TaskCompleted is %i", TaskComplete); // and by the 'Task Stage Completed' message - c->SendTaskActivityComplete(ActiveTasks[TaskIndex].TaskID, ActivityID, TaskIndex); + c->SendTaskActivityComplete(ActiveQuests[TaskIndex].TaskID, ActivityID, TaskIndex); // Send the updated task/activity list to the client taskmanager->SendSingleActiveTaskToClient(c, TaskIndex, TaskComplete, false); // Inform the client the task has been updated, both by a chat message @@ -1847,13 +1847,13 @@ void ClientTaskState::IncrementDoneCount(Client *c, TaskInformation* Task, int T if(Task->Activity[ActivityID].GoalMethod != METHODQUEST) { if (!ignore_quest_update){ char buf[24]; - snprintf(buf, 23, "%d %d", ActiveTasks[TaskIndex].TaskID, ActiveTasks[TaskIndex].Activity[ActivityID].ActivityID); + snprintf(buf, 23, "%d %d", ActiveQuests[TaskIndex].TaskID, ActiveQuests[TaskIndex].Activity[ActivityID].ActivityID); buf[23] = '\0'; parse->EventPlayer(EVENT_TASK_STAGE_COMPLETE, c, buf, 0); } /* QS: PlayerLogTaskUpdates :: Update */ if (RuleB(QueryServ, PlayerLogTaskUpdates)){ - std::string event_desc = StringFormat("Task Stage Complete :: taskid:%i activityid:%i donecount:%i in zoneid:%i instid:%i", ActiveTasks[TaskIndex].TaskID, ActiveTasks[TaskIndex].Activity[ActivityID].ActivityID, ActiveTasks[TaskIndex].Activity[ActivityID].DoneCount, c->GetZoneID(), c->GetInstanceID()); + std::string event_desc = StringFormat("Task Stage Complete :: taskid:%i activityid:%i donecount:%i in zoneid:%i instid:%i", ActiveQuests[TaskIndex].TaskID, ActiveQuests[TaskIndex].Activity[ActivityID].ActivityID, ActiveQuests[TaskIndex].Activity[ActivityID].DoneCount, c->GetZoneID(), c->GetInstanceID()); QServ->PlayerLogEvent(Player_Log_Task_Updates, c->CharacterID(), event_desc); } } @@ -1863,18 +1863,18 @@ void ClientTaskState::IncrementDoneCount(Client *c, TaskInformation* Task, int T // client. This is the same sequence the packets are sent on live. if(TaskComplete) { char buf[24]; - snprintf(buf, 23, "%d %d %d", ActiveTasks[TaskIndex].Activity[ActivityID].DoneCount, ActiveTasks[TaskIndex].Activity[ActivityID].ActivityID, ActiveTasks[TaskIndex].TaskID); + snprintf(buf, 23, "%d %d %d", ActiveQuests[TaskIndex].Activity[ActivityID].DoneCount, ActiveQuests[TaskIndex].Activity[ActivityID].ActivityID, ActiveQuests[TaskIndex].TaskID); buf[23] = '\0'; parse->EventPlayer(EVENT_TASK_COMPLETE, c, buf, 0); /* QS: PlayerLogTaskUpdates :: Complete */ if (RuleB(QueryServ, PlayerLogTaskUpdates)){ - std::string event_desc = StringFormat("Task Complete :: taskid:%i activityid:%i donecount:%i in zoneid:%i instid:%i", ActiveTasks[TaskIndex].TaskID, ActiveTasks[TaskIndex].Activity[ActivityID].ActivityID, ActiveTasks[TaskIndex].Activity[ActivityID].DoneCount, c->GetZoneID(), c->GetInstanceID()); + std::string event_desc = StringFormat("Task Complete :: taskid:%i activityid:%i donecount:%i in zoneid:%i instid:%i", ActiveQuests[TaskIndex].TaskID, ActiveQuests[TaskIndex].Activity[ActivityID].ActivityID, ActiveQuests[TaskIndex].Activity[ActivityID].DoneCount, c->GetZoneID(), c->GetInstanceID()); QServ->PlayerLogEvent(Player_Log_Task_Updates, c->CharacterID(), event_desc); } taskmanager->SendCompletedTasksToClient(c, this); - c->SendTaskActivityComplete(ActiveTasks[TaskIndex].TaskID, 0, TaskIndex, false); + c->SendTaskActivityComplete(ActiveQuests[TaskIndex].TaskID, 0, TaskIndex, false); taskmanager->SaveClientState(c, this); //c->SendTaskComplete(TaskIndex); c->CancelTask(TaskIndex); @@ -1888,7 +1888,7 @@ void ClientTaskState::IncrementDoneCount(Client *c, TaskInformation* Task, int T } else // Send an update packet for this single activity - taskmanager->SendTaskActivityLong(c, ActiveTasks[TaskIndex].TaskID, ActivityID, + taskmanager->SendTaskActivityLong(c, ActiveQuests[TaskIndex].TaskID, ActivityID, TaskIndex, Task->Activity[ActivityID].Optional); } @@ -2004,7 +2004,7 @@ bool ClientTaskState::IsTaskActive(int TaskID) { for(int i=0; iSendTaskFailed(ActiveTasks[i].TaskID, i); + if(ActiveQuests[i].TaskID==TaskID) { + c->SendTaskFailed(ActiveQuests[i].TaskID, i); // Remove the task from the client c->CancelTask(i); return; @@ -2039,7 +2039,7 @@ bool ClientTaskState::IsTaskActivityActive(int TaskID, int ActivityID) { int ActiveTaskIndex = -1; for(int i=0; iTasks[ActiveTasks[ActiveTaskIndex].TaskID]; + TaskInformation* Task = taskmanager->Tasks[ActiveQuests[ActiveTaskIndex].TaskID]; // The task is invalid if(Task==nullptr) return false; @@ -2057,10 +2057,10 @@ bool ClientTaskState::IsTaskActivityActive(int TaskID, int ActivityID) { if(ActivityID >= Task->ActivityCount) return false; Log(Logs::General, Logs::Tasks, "[UPDATE] ClientTaskState IsTaskActivityActive(%i, %i). State is %i ", TaskID, ActivityID, - ActiveTasks[ActiveTaskIndex].Activity[ActivityID].State); + ActiveQuests[ActiveTaskIndex].Activity[ActivityID].State); - return (ActiveTasks[ActiveTaskIndex].Activity[ActivityID].State == ActivityActive); + return (ActiveQuests[ActiveTaskIndex].Activity[ActivityID].State == ActivityActive); } @@ -2075,7 +2075,7 @@ void ClientTaskState::UpdateTaskActivity(Client *c, int TaskID, int ActivityID, int ActiveTaskIndex = -1; for (int i = 0; i < MAXACTIVEQUESTS; i++) { - if (ActiveTasks[i].TaskID == TaskID) { + if (ActiveQuests[i].TaskID == TaskID) { ActiveTaskIndex = i; break; } @@ -2084,7 +2084,7 @@ void ClientTaskState::UpdateTaskActivity(Client *c, int TaskID, int ActivityID, // The client does not have this task if(ActiveTaskIndex == -1) return; - TaskInformation* Task = taskmanager->Tasks[ActiveTasks[ActiveTaskIndex].TaskID]; + TaskInformation* Task = taskmanager->Tasks[ActiveQuests[ActiveTaskIndex].TaskID]; // The task is invalid if(Task==nullptr) return; @@ -2093,7 +2093,7 @@ void ClientTaskState::UpdateTaskActivity(Client *c, int TaskID, int ActivityID, if(ActivityID >= Task->ActivityCount) return; // The Activity is not currently active - if(ActiveTasks[ActiveTaskIndex].Activity[ActivityID].State != ActivityActive) return; + if(ActiveQuests[ActiveTaskIndex].Activity[ActivityID].State != ActivityActive) return; Log(Logs::General, Logs::Tasks, "[UPDATE] Increment done count on UpdateTaskActivity"); IncrementDoneCount(c, Task, ActiveTaskIndex, ActivityID, Count, ignore_quest_update); @@ -2109,7 +2109,7 @@ void ClientTaskState::ResetTaskActivity(Client *c, int TaskID, int ActivityID) { int ActiveTaskIndex = -1; for(int i=0; iTasks[ActiveTasks[ActiveTaskIndex].TaskID]; + TaskInformation* Task = taskmanager->Tasks[ActiveQuests[ActiveTaskIndex].TaskID]; // The task is invalid if(Task==nullptr) return; @@ -2127,16 +2127,16 @@ void ClientTaskState::ResetTaskActivity(Client *c, int TaskID, int ActivityID) { if(ActivityID >= Task->ActivityCount) return; // The Activity is not currently active - if(ActiveTasks[ActiveTaskIndex].Activity[ActivityID].State != ActivityActive) return; + if(ActiveQuests[ActiveTaskIndex].Activity[ActivityID].State != ActivityActive) return; Log(Logs::General, Logs::Tasks, "[UPDATE] ResetTaskActivityCount"); - ActiveTasks[ActiveTaskIndex].Activity[ActivityID].DoneCount = 0; + ActiveQuests[ActiveTaskIndex].Activity[ActivityID].DoneCount = 0; - ActiveTasks[ActiveTaskIndex].Activity[ActivityID].Updated=true; + ActiveQuests[ActiveTaskIndex].Activity[ActivityID].Updated=true; // Send an update packet for this single activity - taskmanager->SendTaskActivityLong(c, ActiveTasks[ActiveTaskIndex].TaskID, ActivityID, + taskmanager->SendTaskActivityLong(c, ActiveQuests[ActiveTaskIndex].TaskID, ActivityID, ActiveTaskIndex, Task->Activity[ActivityID].Optional); } @@ -2145,16 +2145,16 @@ void ClientTaskState::ShowClientTasks(Client *c) { c->Message(0, "Task Information:"); //for(int i=0; iMessage(0, "Task: %i %s", ActiveTasks[i].TaskID, taskmanager->Tasks[ActiveTasks[i].TaskID]->Title.c_str()); - c->Message(0, " Description: [%s]\n", taskmanager->Tasks[ActiveTasks[i].TaskID]->Description.c_str()); - for(int j=0; jGetActivityCount(ActiveTasks[i].TaskID); j++) { + c->Message(0, "Task: %i %s", ActiveQuests[i].TaskID, taskmanager->Tasks[ActiveQuests[i].TaskID]->Title.c_str()); + c->Message(0, " Description: [%s]\n", taskmanager->Tasks[ActiveQuests[i].TaskID]->Description.c_str()); + for(int j=0; jGetActivityCount(ActiveQuests[i].TaskID); j++) { c->Message(0, " Activity: %2d, DoneCount: %2d, Status: %d (0=Hidden, 1=Active, 2=Complete)", - ActiveTasks[i].Activity[j].ActivityID, - ActiveTasks[i].Activity[j].DoneCount, - ActiveTasks[i].Activity[j].State); + ActiveQuests[i].Activity[j].ActivityID, + ActiveQuests[i].Activity[j].DoneCount, + ActiveQuests[i].Activity[j].State); } } @@ -2166,17 +2166,17 @@ int ClientTaskState::TaskTimeLeft(int TaskID) { for(int i=0; iTasks[ActiveTasks[i].TaskID]; + TaskInformation* Task = taskmanager->Tasks[ActiveQuests[i].TaskID]; if(Task == nullptr) return -1; if(!Task->Duration) return -1; - int TimeLeft = (ActiveTasks[i].AcceptedTime + Task->Duration - Now); + int TimeLeft = (ActiveQuests[i].AcceptedTime + Task->Duration - Now); // If Timeleft is negative, return 0, else return the number of seconds left @@ -2219,15 +2219,15 @@ bool ClientTaskState::TaskOutOfTime(int Index) { if((Index < 0) || (Index>=MAXACTIVEQUESTS)) return false; - if((ActiveTasks[Index].TaskID <= 0) || (ActiveTasks[Index].TaskID >= MAXTASKS)) return false; + if((ActiveQuests[Index].TaskID <= 0) || (ActiveQuests[Index].TaskID >= MAXTASKS)) return false; int Now = time(nullptr); - TaskInformation* Task = taskmanager->Tasks[ActiveTasks[Index].TaskID]; + TaskInformation* Task = taskmanager->Tasks[ActiveQuests[Index].TaskID]; if(Task == nullptr) return false; - return (Task->Duration && (ActiveTasks[Index].AcceptedTime + Task->Duration <= Now)); + return (Task->Duration && (ActiveQuests[Index].AcceptedTime + Task->Duration <= Now)); } @@ -2239,11 +2239,11 @@ void ClientTaskState::TaskPeriodicChecks(Client *c) { // for(int i=0; iSendTaskFailed(ActiveTasks[i].TaskID, i); + c->SendTaskFailed(ActiveQuests[i].TaskID, i); // Remove the task from the client c->CancelTask(i); // It is a conscious decision to only fail one task per call to this method, @@ -2876,25 +2876,25 @@ void TaskManager::SendActiveTaskDescription(Client *c, int TaskID, int SequenceN bool ClientTaskState::IsTaskActivityCompleted(int index, int ActivityID) { - return (ActiveTasks[index].Activity[ActivityID].State == ActivityCompleted); + return (ActiveQuests[index].Activity[ActivityID].State == ActivityCompleted); } ActivityState ClientTaskState::GetTaskActivityState(int index, int ActivityID) { - return ActiveTasks[index].Activity[ActivityID].State; + return ActiveQuests[index].Activity[ActivityID].State; } int ClientTaskState::GetTaskActivityDoneCount(int index, int ActivityID) { - return ActiveTasks[index].Activity[ActivityID].DoneCount; + return ActiveQuests[index].Activity[ActivityID].DoneCount; } int ClientTaskState::GetTaskActivityDoneCountFromTaskID(int TaskID, int ActivityID){ int ActiveTaskIndex = -1; for(int i=0; iMessage(13, "You have already been assigned this task."); return; } @@ -3016,8 +3016,8 @@ void ClientTaskState::AcceptNewTask(Client *c, int TaskID, int NPCID, bool enfor int FreeSlot = -1; for(int i=0; iTasks[TaskID]->ActivityCount; i++) { - ActiveTasks[FreeSlot].Activity[i].ActivityID = i; - ActiveTasks[FreeSlot].Activity[i].DoneCount = 0; - ActiveTasks[FreeSlot].Activity[i].State = ActivityHidden; - ActiveTasks[FreeSlot].Activity[i].Updated = true; + ActiveQuests[FreeSlot].Activity[i].ActivityID = i; + ActiveQuests[FreeSlot].Activity[i].DoneCount = 0; + ActiveQuests[FreeSlot].Activity[i].State = ActivityHidden; + ActiveQuests[FreeSlot].Activity[i].Updated = true; } UnlockActivities(c->CharacterID(), FreeSlot); ActiveTaskCount++; diff --git a/zone/tasks.h b/zone/tasks.h index ed6c01bff..b9bcb8876 100644 --- a/zone/tasks.h +++ b/zone/tasks.h @@ -228,7 +228,7 @@ private: bool UnlockActivities(int CharID, int TaskIndex); void IncrementDoneCount(Client *c, TaskInformation *Task, int TaskIndex, int ActivityID, int Count = 1, bool ignore_quest_update = false); int ActiveTaskCount; - ClientTaskInformation ActiveTasks[MAXACTIVEQUESTS]; + ClientTaskInformation ActiveQuests[MAXACTIVEQUESTS]; std::vector EnabledTasks; std::vector CompletedTasks; int LastCompletedTaskLoaded; From 6708cd3d751fb35982efd262417aa07aea048c11 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 16 Jun 2018 22:42:26 -0400 Subject: [PATCH 206/670] More work on tasks --- zone/string_ids.h | 1 + zone/tasks.cpp | 131 ++++++++++++++++++++++++---------------------- zone/tasks.h | 8 ++- 3 files changed, 76 insertions(+), 64 deletions(-) diff --git a/zone/string_ids.h b/zone/string_ids.h index 7786d12dc..a760f8bbe 100644 --- a/zone/string_ids.h +++ b/zone/string_ids.h @@ -322,6 +322,7 @@ #define FAILED_TAUNT 5811 //You have failed to taunt your target. #define PHYSICAL_RESIST_FAIL 5817 //Your target avoided your %1 ability. #define AA_NO_TARGET 5825 //You must first select a target for this ability! +#define MAX_ACTIVE_TASKS 6010 //Sorry %3, you already have the maximum number of active tasks. #define FORAGE_MASTERY 6012 //Your forage mastery has enabled you to find something else! #define GUILD_BANK_CANNOT_DEPOSIT 6097 // Cannot deposit this item. Containers must be empty, and only one of each LORE and no NO TRADE or TEMPORARY items may be deposited. #define GUILD_BANK_FULL 6098 // There is no more room in the Guild Bank. diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 4fc05daf7..98d8de5e1 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -34,6 +34,7 @@ Copyright (C) 2001-2008 EQEMu Development Team (http://eqemulator.net) #include "client.h" #include "entity.h" #include "mob.h" +#include "string_ids.h" #include "queryserv.h" #include "quest_parser_collection.h" @@ -846,6 +847,27 @@ int ClientTaskState::CompletedTasksInSet(int TaskSetID) { return Count; } +bool ClientTaskState::HasSlotForTask(TaskInformation *task) +{ + if (task == nullptr) + return false; + + switch (task->type) { + case TaskType::Task: + return ActiveTask.TaskID == TASKSLOTEMPTY; + case TaskType::Shared: + return false; // todo + case TaskType::Quest: + for (int i = 0; i < MAXACTIVEQUESTS; ++i) + if (ActiveQuests[i].TaskID == TASKSLOTEMPTY) + return true; + case TaskType::E: + return false; // removed on live + } + + return false; +} + int TaskManager::FirstTaskInSet(int TaskSetID) { if((TaskSetID<=0) || (TaskSetID>=MAXTASKSETS)) return 0; @@ -917,77 +939,57 @@ int TaskManager::GetTaskMaxLevel(int TaskID) return -1; } -void TaskManager::TaskSetSelector(Client *c, ClientTaskState *state, Mob *mob, int TaskSetID) { - +void TaskManager::TaskSetSelector(Client *c, ClientTaskState *state, Mob *mob, int TaskSetID) +{ unsigned int EnabledTaskIndex = 0; unsigned int TaskSetIndex = 0; int TaskList[MAXCHOOSERENTRIES]; int TaskListIndex = 0; int PlayerLevel = c->GetLevel(); - Log(Logs::General, Logs::Tasks, "[UPDATE] TaskSetSelector called for taskset %i. EnableTaskSize is %i", TaskSetID, - state->EnabledTasks.size()); - if((TaskSetID<=0) || (TaskSetID>=MAXTASKSETS)) return; + Log(Logs::General, Logs::Tasks, "[UPDATE] TaskSetSelector called for taskset %i. EnableTaskSize is %i", + TaskSetID, state->EnabledTasks.size()); - if(!TaskSets[TaskSetID].empty()) { + if (TaskSetID <= 0 || TaskSetID >= MAXTASKSETS) + return; - // A TaskID of 0 in a TaskSet indicates that all Tasks in the set are enabled for all players. - - if(TaskSets[TaskSetID][0] == 0) { - - Log(Logs::General, Logs::Tasks, "[UPDATE] TaskSets[%i][0] == 0. All Tasks in Set enabled.", TaskSetID); - auto Iterator = TaskSets[TaskSetID].begin(); - - while((Iterator != TaskSets[TaskSetID].end()) && (TaskListIndex < MAXCHOOSERENTRIES)) { - if(AppropriateLevel((*Iterator), PlayerLevel) && !state->IsTaskActive((*Iterator)) && - (IsTaskRepeatable((*Iterator)) || !state->IsTaskCompleted((*Iterator)))) - TaskList[TaskListIndex++] = (*Iterator); - - ++Iterator; - } - if(TaskListIndex > 0) - { - SendTaskSelector(c, mob, TaskListIndex, TaskList); - } - - return; - } + if (TaskSets[TaskSetID].empty()) { + c->Message_StringID(15, MAX_ACTIVE_TASKS, c->GetName()); // check color + return; } + bool all_enabled = false; - while((EnabledTaskIndex < state->EnabledTasks.size()) && (TaskSetIndex < TaskSets[TaskSetID].size()) && - (TaskListIndex < MAXCHOOSERENTRIES)) { - - Log(Logs::General, Logs::Tasks, "[UPDATE] Comparing EnabledTasks[%i] (%i) with TaskSets[%i][%i] (%i)", - EnabledTaskIndex, state->EnabledTasks[EnabledTaskIndex], TaskSetID, TaskSetIndex, - TaskSets[TaskSetID][TaskSetIndex]); - - if((TaskSets[TaskSetID][TaskSetIndex] > 0) && - (state->EnabledTasks[EnabledTaskIndex] == TaskSets[TaskSetID][TaskSetIndex])) { - - if(AppropriateLevel(TaskSets[TaskSetID][TaskSetIndex], PlayerLevel) && - !state->IsTaskActive(TaskSets[TaskSetID][TaskSetIndex]) && - (IsTaskRepeatable(TaskSets[TaskSetID][TaskSetIndex]) || - !state->IsTaskCompleted(TaskSets[TaskSetID][TaskSetIndex]))) { - - TaskList[TaskListIndex++] = TaskSets[TaskSetID][TaskSetIndex]; - - EnabledTaskIndex++; - TaskSetIndex++; - continue; - } - } - - if(state->EnabledTasks[EnabledTaskIndex] < TaskSets[TaskSetID][TaskSetIndex]) - EnabledTaskIndex++; - else - TaskSetIndex++; + // A TaskID of 0 in a TaskSet indicates that all Tasks in the set are enabled for all players. + if (TaskSets[TaskSetID][0] == 0) { + Log(Logs::General, Logs::Tasks, "[UPDATE] TaskSets[%i][0] == 0. All Tasks in Set enabled.", TaskSetID); + all_enabled = true; } - if(TaskListIndex == 0) return; + auto Iterator = TaskSets[TaskSetID].begin(); - SendTaskSelector(c, mob, TaskListIndex, TaskList); + if (all_enabled) + ++Iterator; // skip first when all enabled since it's useless data + while (Iterator != TaskSets[TaskSetID].end() && TaskListIndex < MAXCHOOSERENTRIES) { + auto task = *Iterator; + // verify level, we're not currently on it, repeatable status, if it's a (shared) task + // we aren't currently on another, and if it's enabled if not all_enabled + if ((all_enabled || state->IsTaskEnabled(task)) && AppropriateLevel(task, PlayerLevel) && + !state->IsTaskActive(task) && state->HasSlotForTask(Tasks[task]) && // this slot checking is a bit silly, but we allow mixing of task types ... + (IsTaskRepeatable(task) || !state->IsTaskCompleted(task))) + TaskList[TaskListIndex++] = task; + + ++Iterator; + } + + if (TaskListIndex > 0) { + SendTaskSelector(c, mob, TaskListIndex, TaskList); + } else { + c->Message_StringID(15, MAX_ACTIVE_TASKS, c->GetName()); // check color, I think this might be only for (Shared) Tasks, w/e + } + + return; } void TaskManager::SendTaskSelector(Client *c, Mob *mob, int TaskCount, int *TaskList) { @@ -1998,16 +2000,19 @@ void ClientTaskState::RewardTask(Client *c, TaskInformation *Task) { c->SendSound(); } -bool ClientTaskState::IsTaskActive(int TaskID) { - - if((ActiveTaskCount == 0) || (TaskID == 0)) return false; - - for(int i=0; i EnabledTasks; std::vector CompletedTasks; int LastCompletedTaskLoaded; From 4c826dfbcc9146eacfc72a7ea3a50b6b260d22c9 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 16 Jun 2018 23:06:46 -0400 Subject: [PATCH 207/670] Change task selector quest function to not directly call the Send function --- zone/client.h | 1 + zone/questmgr.cpp | 2 +- zone/tasks.cpp | 34 ++++++++++++++++++++++++++++++++-- zone/tasks.h | 1 + 4 files changed, 35 insertions(+), 3 deletions(-) diff --git a/zone/client.h b/zone/client.h index b216a0e38..f958b20d5 100644 --- a/zone/client.h +++ b/zone/client.h @@ -1019,6 +1019,7 @@ public: inline bool UpdateTasksOnSpeakWith(int NPCTypeID) { if(taskstate) return taskstate->UpdateTasksOnSpeakWith(this, NPCTypeID); else return false; } inline bool UpdateTasksOnDeliver(std::list& Items, int Cash, int NPCTypeID) { if (taskstate) return taskstate->UpdateTasksOnDeliver(this, Items, Cash, NPCTypeID); else return false; } inline void TaskSetSelector(Mob *mob, int TaskSetID) { if(taskmanager) taskmanager->TaskSetSelector(this, taskstate, mob, TaskSetID); } + inline void TaskQuestSetSelector(Mob *mob, int count, int *tasks) { if(taskmanager) taskmanager->TaskQuestSetSelector(this, taskstate, mob, count, tasks); } inline void EnableTask(int TaskCount, int *TaskList) { if(taskstate) taskstate->EnableTask(CharacterID(), TaskCount, TaskList); } inline void DisableTask(int TaskCount, int *TaskList) { if(taskstate) taskstate->DisableTask(CharacterID(), TaskCount, TaskList); } inline bool IsTaskEnabled(int TaskID) { return (taskstate ? taskstate->IsTaskEnabled(TaskID) : false); } diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index 490d3b1f8..ab7a95f24 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -2149,7 +2149,7 @@ bool QuestManager::createBot(const char *name, const char *lastname, uint8 level void QuestManager::taskselector(int taskcount, int *tasks) { QuestManagerCurrentQuestVars(); if(RuleB(TaskSystem, EnableTaskSystem) && initiator && owner && taskmanager) - taskmanager->SendTaskSelector(initiator, owner, taskcount, tasks); + initiator->TaskQuestSetSelector(owner, taskcount, tasks); } void QuestManager::enabletask(int taskcount, int *tasks) { QuestManagerCurrentQuestVars(); diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 98d8de5e1..b14a2b162 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -941,8 +941,6 @@ int TaskManager::GetTaskMaxLevel(int TaskID) void TaskManager::TaskSetSelector(Client *c, ClientTaskState *state, Mob *mob, int TaskSetID) { - unsigned int EnabledTaskIndex = 0; - unsigned int TaskSetIndex = 0; int TaskList[MAXCHOOSERENTRIES]; int TaskListIndex = 0; int PlayerLevel = c->GetLevel(); @@ -992,6 +990,38 @@ void TaskManager::TaskSetSelector(Client *c, ClientTaskState *state, Mob *mob, i return; } +// unlike the non-Quest version of this function, it does not check enabled, that is assumed the responsibility of the quest to handle +// we do however still want it to check the other stuff like level, active, room, etc +void TaskManager::TaskQuestSetSelector(Client *c, ClientTaskState *state, Mob *mob, int count, int *tasks) +{ + int TaskList[MAXCHOOSERENTRIES]; + int TaskListIndex = 0; + int PlayerLevel = c->GetLevel(); + + Log(Logs::General, Logs::Tasks, "[UPDATE] TaskQuestSetSelector called for array size %d", count); + + if (count <= 0) + return; + + for (int i = 0; i < count; ++i) { + auto task = tasks[i]; + // verify level, we're not currently on it, repeatable status, if it's a (shared) task + // we aren't currently on another, and if it's enabled if not all_enabled + if (AppropriateLevel(task, PlayerLevel) && + !state->IsTaskActive(task) && state->HasSlotForTask(Tasks[task]) && // this slot checking is a bit silly, but we allow mixing of task types ... + (IsTaskRepeatable(task) || !state->IsTaskCompleted(task))) + TaskList[TaskListIndex++] = task; + } + + if (TaskListIndex > 0) { + SendTaskSelector(c, mob, TaskListIndex, TaskList); + } else { + c->Message_StringID(15, MAX_ACTIVE_TASKS, c->GetName()); // check color, I think this might be only for (Shared) Tasks, w/e + } + + return; +} + void TaskManager::SendTaskSelector(Client *c, Mob *mob, int TaskCount, int *TaskList) { if (c->ClientVersion() >= EQEmu::versions::ClientVersion::RoF) diff --git a/zone/tasks.h b/zone/tasks.h index 03cc8f8e1..8db0c4ef8 100644 --- a/zone/tasks.h +++ b/zone/tasks.h @@ -261,6 +261,7 @@ public: int GetTaskMinLevel(int TaskID); int GetTaskMaxLevel(int TaskID); void TaskSetSelector(Client *c, ClientTaskState *state, Mob *mob, int TaskSetID); + void TaskQuestSetSelector(Client *c, ClientTaskState *state, Mob *mob, int count, int *tasks); // task list provided by QuestManager (perl/lua) void SendActiveTasksToClient(Client *c, bool TaskComplete=false); void SendSingleActiveTaskToClient(Client *c, int TaskIndex, bool TaskComplete, bool BringUpTaskJournal=false); void SendTaskActivityShort(Client *c, int TaskID, int ActivityID, int ClientTaskIndex); From 18c73526aaa317db0ddb398ee3ccc880afa8b21a Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 16 Jun 2018 23:52:25 -0400 Subject: [PATCH 208/670] Gotta initialize stuff ... --- zone/tasks.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index b14a2b162..b6e1543de 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -1315,6 +1315,8 @@ ClientTaskState::ClientTaskState() { for(int i=0; i Date: Sun, 17 Jun 2018 00:05:53 -0400 Subject: [PATCH 209/670] Fix string IDs to be embedded in says --- zone/tasks.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index b6e1543de..c9a1712d3 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -952,7 +952,7 @@ void TaskManager::TaskSetSelector(Client *c, ClientTaskState *state, Mob *mob, i return; if (TaskSets[TaskSetID].empty()) { - c->Message_StringID(15, MAX_ACTIVE_TASKS, c->GetName()); // check color + mob->SayTo_StringID(c, MAX_ACTIVE_TASKS, c->GetName()); // I think this is suppose to be yellow return; } @@ -984,7 +984,7 @@ void TaskManager::TaskSetSelector(Client *c, ClientTaskState *state, Mob *mob, i if (TaskListIndex > 0) { SendTaskSelector(c, mob, TaskListIndex, TaskList); } else { - c->Message_StringID(15, MAX_ACTIVE_TASKS, c->GetName()); // check color, I think this might be only for (Shared) Tasks, w/e + mob->SayTo_StringID(c, MAX_ACTIVE_TASKS, c->GetName()); // check color, I think this might be only for (Shared) Tasks, w/e -- think should be yellow } return; From 7d18b90788e35e5faae1a776cd395356df650346 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 17 Jun 2018 00:17:59 -0400 Subject: [PATCH 210/670] Fix MAX_ACTIVE_TASK messages --- zone/tasks.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index c9a1712d3..8c7cd3aa2 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -952,7 +952,7 @@ void TaskManager::TaskSetSelector(Client *c, ClientTaskState *state, Mob *mob, i return; if (TaskSets[TaskSetID].empty()) { - mob->SayTo_StringID(c, MAX_ACTIVE_TASKS, c->GetName()); // I think this is suppose to be yellow + mob->SayTo_StringID(c, CC_Yellow, MAX_ACTIVE_TASKS, c->GetName()); // I think this is suppose to be yellow return; } @@ -984,7 +984,7 @@ void TaskManager::TaskSetSelector(Client *c, ClientTaskState *state, Mob *mob, i if (TaskListIndex > 0) { SendTaskSelector(c, mob, TaskListIndex, TaskList); } else { - mob->SayTo_StringID(c, MAX_ACTIVE_TASKS, c->GetName()); // check color, I think this might be only for (Shared) Tasks, w/e -- think should be yellow + mob->SayTo_StringID(c, CC_Yellow, MAX_ACTIVE_TASKS, c->GetName()); // check color, I think this might be only for (Shared) Tasks, w/e -- think should be yellow } return; @@ -1016,7 +1016,7 @@ void TaskManager::TaskQuestSetSelector(Client *c, ClientTaskState *state, Mob *m if (TaskListIndex > 0) { SendTaskSelector(c, mob, TaskListIndex, TaskList); } else { - c->Message_StringID(15, MAX_ACTIVE_TASKS, c->GetName()); // check color, I think this might be only for (Shared) Tasks, w/e + mob->SayTo_StringID(c, CC_Yellow, MAX_ACTIVE_TASKS, c->GetName()); // check color, I think this might be only for (Shared) Tasks, w/e -- think should be yellow } return; From bce92c5e02f0460e4de9d83ef958191bf8d4aa3d Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 20 Jun 2018 14:18:39 -0400 Subject: [PATCH 211/670] Add support for innate self targeted spells Currently this just includes checking SpellType_InCombatBuffs --- zone/mob_ai.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 3d9bb842a..415b67c3b 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -2032,14 +2032,17 @@ bool NPC::AI_EngagedCastCheck() { // first try innate (spam) spells if(!AICastSpell(GetTarget(), 0, SpellType_Nuke | SpellType_Lifetap | SpellType_DOT | SpellType_Dispel | SpellType_Mez | SpellType_Slow | SpellType_Debuff | SpellType_Charm | SpellType_Root, true)) { - // try casting a heal or gate - if (!AICastSpell(this, AISpellVar.engaged_beneficial_self_chance, SpellType_Heal | SpellType_Escape | SpellType_InCombatBuff)) { - // try casting a heal on nearby - if (!entity_list.AICheckCloseBeneficialSpells(this, AISpellVar.engaged_beneficial_other_chance, MobAISpellRange, SpellType_Heal)) { - //nobody to heal, try some detrimental spells. - if(!AICastSpell(GetTarget(), AISpellVar.engaged_detrimental_chance, SpellType_Nuke | SpellType_Lifetap | SpellType_DOT | SpellType_Dispel | SpellType_Mez | SpellType_Slow | SpellType_Debuff | SpellType_Charm | SpellType_Root)) { - //no spell to cast, try again soon. - AIautocastspell_timer->Start(RandomTimer(AISpellVar.engaged_no_sp_recast_min, AISpellVar.engaged_no_sp_recast_max), false); + // try innate (spam) self targeted spells + if (!AICastSpell(this, 0, SpellType_InCombatBuff, true)) { + // try casting a heal or gate + if (!AICastSpell(this, AISpellVar.engaged_beneficial_self_chance, SpellType_Heal | SpellType_Escape | SpellType_InCombatBuff)) { + // try casting a heal on nearby + if (!entity_list.AICheckCloseBeneficialSpells(this, AISpellVar.engaged_beneficial_other_chance, MobAISpellRange, SpellType_Heal)) { + //nobody to heal, try some detrimental spells. + if(!AICastSpell(GetTarget(), AISpellVar.engaged_detrimental_chance, SpellType_Nuke | SpellType_Lifetap | SpellType_DOT | SpellType_Dispel | SpellType_Mez | SpellType_Slow | SpellType_Debuff | SpellType_Charm | SpellType_Root)) { + //no spell to cast, try again soon. + AIautocastspell_timer->Start(RandomTimer(AISpellVar.engaged_no_sp_recast_min, AISpellVar.engaged_no_sp_recast_max), false); + } } } } From 2b38dbf1fbb2fd5f352d69753c3ba6162c0da1f4 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Sun, 24 Jun 2018 12:13:09 -0400 Subject: [PATCH 212/670] Changes to make Harmony work. --- common/spdat.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/spdat.cpp b/common/spdat.cpp index 064b8fb61..a5764a625 100644 --- a/common/spdat.cpp +++ b/common/spdat.cpp @@ -244,8 +244,7 @@ bool IsBeneficialSpell(uint16 spell_id) } else { // If the resisttype is not magic and spell is Bind Sight or Cast Sight // It's not beneficial - if (sai == SAI_Dispell_Sight && spells[spell_id].skill == 18 && - !IsEffectInSpell(spell_id, SE_VoiceGraft)) + if ((sai == SAI_Calm && IsEffectInSpell(spell_id, SE_Harmony)) || (sai == SAI_Calm_Song && IsEffectInSpell(spell_id, SE_BindSight)) || (sai == SAI_Dispell_Sight && spells[spell_id].skill == 18 && !IsEffectInSpell(spell_id, SE_VoiceGraft))) return false; } } From 3498f7a56ff2982a4335e657f66605d29ad05395 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 24 Jun 2018 23:21:35 -0400 Subject: [PATCH 213/670] Bunch of work --- common/eq_packet_structs.h | 24 +- common/patches/rof.cpp | 7 +- common/patches/rof2.cpp | 7 +- common/patches/sod.cpp | 7 +- common/patches/sof.cpp | 7 +- common/patches/titanium.cpp | 8 +- common/patches/uf.cpp | 7 +- utils/sql/git/required/tasks_revamp.sql | 2 + zone/client.h | 3 +- zone/client_packet.cpp | 2 +- zone/tasks.cpp | 466 +++++++++++++----------- zone/tasks.h | 12 +- 12 files changed, 312 insertions(+), 240 deletions(-) diff --git a/common/eq_packet_structs.h b/common/eq_packet_structs.h index fd09f4d56..6240222d4 100644 --- a/common/eq_packet_structs.h +++ b/common/eq_packet_structs.h @@ -3782,7 +3782,7 @@ struct AcceptNewTask_Struct { //was all 0's from client, server replied with same op, all 0's struct CancelTask_Struct { uint32 SequenceNumber; - uint32 unknown4; // Only seen 0x00000002 + uint32 type; // Only seen 0x00000002 }; #if 0 @@ -3836,28 +3836,28 @@ struct AvailableTaskTrailer_Struct { struct TaskDescriptionHeader_Struct { uint32 SequenceNumber; // The order the tasks appear in the journal. 0 for first task, 1 for second, etc. uint32 TaskID; - uint32 unknown2; - uint32 unknown3; - uint8 unknown4; + uint8 open_window; + uint32 task_type; + uint32 reward_type; // if this != 4 says Ebon Crystals else Radiant Crystals }; struct TaskDescriptionData1_Struct { uint32 Duration; - uint32 unknown2; + uint32 dur_code; // if Duration == 0 uint32 StartTime; }; struct TaskDescriptionData2_Struct { - uint32 RewardCount; // ?? - uint32 unknown1; - uint32 unknown2; - uint16 unknown3; - //uint8 unknown4; + uint8 has_rewards; + uint32 coin_reward; + uint32 xp_reward; + uint32 unknown3; // don't see it affecting display, faction maybe }; struct TaskDescriptionTrailer_Struct { //uint16 unknown1; // 0x0012 uint32 Points; + uint8 has_reward_selection; // uses newer reward selection window, not in all clients }; struct TaskActivityHeader_Struct { @@ -5302,7 +5302,7 @@ struct MercenaryMerchantResponse_Struct { struct ServerLootItem_Struct { uint32 item_id; // uint32 item_id; int16 equip_slot; // int16 equip_slot; - uint16 charges; // uint8 charges; + uint16 charges; // uint8 charges; uint16 lootslot; // uint16 lootslot; uint32 aug_1; // uint32 aug_1; uint32 aug_2; // uint32 aug_2; @@ -5330,7 +5330,7 @@ struct ClientMarqueeMessage_Struct { uint32 fade_out_time; //The fade out time, in ms uint32 duration; //in ms char msg[1]; //message plus null terminator - + }; typedef std::list ItemList; diff --git a/common/patches/rof.cpp b/common/patches/rof.cpp index 62ef6751a..499ca31ec 100644 --- a/common/patches/rof.cpp +++ b/common/patches/rof.cpp @@ -3368,13 +3368,16 @@ namespace RoF InBuffer += description_size; InBuffer += sizeof(TaskDescriptionData2_Struct); - std::string old_message = InBuffer; // start 'Reward' as string + uint32 reward_size = strlen(InBuffer) + 1; + InBuffer += reward_size; + + std::string old_message = InBuffer; // start item link string std::string new_message; ServerToRoFSayLink(new_message, old_message); in->size = sizeof(TaskDescriptionHeader_Struct) + sizeof(TaskDescriptionData1_Struct)+ sizeof(TaskDescriptionData2_Struct) + sizeof(TaskDescriptionTrailer_Struct)+ - title_size + description_size + new_message.length() + 1; + title_size + description_size + reward_size + new_message.length() + 1; in->pBuffer = new unsigned char[in->size]; diff --git a/common/patches/rof2.cpp b/common/patches/rof2.cpp index 5a30c1695..28bfb569e 100644 --- a/common/patches/rof2.cpp +++ b/common/patches/rof2.cpp @@ -3437,13 +3437,16 @@ namespace RoF2 InBuffer += description_size; InBuffer += sizeof(TaskDescriptionData2_Struct); - std::string old_message = InBuffer; // start 'Reward' as string + uint32 reward_size = strlen(InBuffer) + 1; + InBuffer += reward_size; + + std::string old_message = InBuffer; // start item link string std::string new_message; ServerToRoF2SayLink(new_message, old_message); in->size = sizeof(TaskDescriptionHeader_Struct) + sizeof(TaskDescriptionData1_Struct)+ sizeof(TaskDescriptionData2_Struct) + sizeof(TaskDescriptionTrailer_Struct)+ - title_size + description_size + new_message.length() + 1; + title_size + description_size + reward_size + new_message.length() + 1; in->pBuffer = new unsigned char[in->size]; diff --git a/common/patches/sod.cpp b/common/patches/sod.cpp index 560151bfa..0ac9d1b84 100644 --- a/common/patches/sod.cpp +++ b/common/patches/sod.cpp @@ -2249,13 +2249,16 @@ namespace SoD InBuffer += description_size; InBuffer += sizeof(TaskDescriptionData2_Struct); - std::string old_message = InBuffer; // start 'Reward' as string + uint32 reward_size = strlen(InBuffer) + 1; + InBuffer += reward_size; + + std::string old_message = InBuffer; // start item link string std::string new_message; ServerToSoDSayLink(new_message, old_message); in->size = sizeof(TaskDescriptionHeader_Struct) + sizeof(TaskDescriptionData1_Struct)+ sizeof(TaskDescriptionData2_Struct) + sizeof(TaskDescriptionTrailer_Struct)+ - title_size + description_size + new_message.length() + 1; + title_size + description_size + reward_size + new_message.length() + 1; in->pBuffer = new unsigned char[in->size]; diff --git a/common/patches/sof.cpp b/common/patches/sof.cpp index c16bed086..05bb95a6a 100644 --- a/common/patches/sof.cpp +++ b/common/patches/sof.cpp @@ -1879,13 +1879,16 @@ namespace SoF InBuffer += description_size; InBuffer += sizeof(TaskDescriptionData2_Struct); - std::string old_message = InBuffer; // start 'Reward' as string + uint32 reward_size = strlen(InBuffer) + 1; + InBuffer += reward_size; + + std::string old_message = InBuffer; // start item link string std::string new_message; ServerToSoFSayLink(new_message, old_message); in->size = sizeof(TaskDescriptionHeader_Struct) + sizeof(TaskDescriptionData1_Struct)+ sizeof(TaskDescriptionData2_Struct) + sizeof(TaskDescriptionTrailer_Struct)+ - title_size + description_size + new_message.length() + 1; + title_size + description_size + reward_size + new_message.length() + 1; in->pBuffer = new unsigned char[in->size]; diff --git a/common/patches/titanium.cpp b/common/patches/titanium.cpp index bf3c3d359..41e3e9206 100644 --- a/common/patches/titanium.cpp +++ b/common/patches/titanium.cpp @@ -1459,13 +1459,16 @@ namespace Titanium InBuffer += description_size; InBuffer += sizeof(TaskDescriptionData2_Struct); - std::string old_message = InBuffer; // start 'Reward' as string + uint32 reward_size = strlen(InBuffer) + 1; + InBuffer += reward_size; + + std::string old_message = InBuffer; // start item link string std::string new_message; ServerToTitaniumSayLink(new_message, old_message); in->size = sizeof(TaskDescriptionHeader_Struct) + sizeof(TaskDescriptionData1_Struct) + sizeof(TaskDescriptionData2_Struct) + sizeof(TaskDescriptionTrailer_Struct) + - title_size + description_size + new_message.length() + 1; + title_size + description_size + reward_size + new_message.length() + 1; in->pBuffer = new unsigned char[in->size]; @@ -1479,6 +1482,7 @@ namespace Titanium InBuffer += strlen(InBuffer) + 1; memcpy(OutBuffer, InBuffer, sizeof(TaskDescriptionTrailer_Struct)); + // we have an extra DWORD in the trailer struct, client should ignore it so w/e delete[] __emu_buffer; dest->FastQueuePacket(&in, ack_req); diff --git a/common/patches/uf.cpp b/common/patches/uf.cpp index 79fdca333..608c6622f 100644 --- a/common/patches/uf.cpp +++ b/common/patches/uf.cpp @@ -2528,13 +2528,16 @@ namespace UF InBuffer += description_size; InBuffer += sizeof(TaskDescriptionData2_Struct); - std::string old_message = InBuffer; // start 'Reward' as string + uint32 reward_size = strlen(InBuffer) + 1; + InBuffer += reward_size; + + std::string old_message = InBuffer; // start item link string std::string new_message; ServerToUFSayLink(new_message, old_message); in->size = sizeof(TaskDescriptionHeader_Struct) + sizeof(TaskDescriptionData1_Struct)+ sizeof(TaskDescriptionData2_Struct) + sizeof(TaskDescriptionTrailer_Struct)+ - title_size + description_size + new_message.length() + 1; + title_size + description_size + reward_size + new_message.length() + 1; in->pBuffer = new unsigned char[in->size]; diff --git a/utils/sql/git/required/tasks_revamp.sql b/utils/sql/git/required/tasks_revamp.sql index 160a7e29a..4e1452fcc 100644 --- a/utils/sql/git/required/tasks_revamp.sql +++ b/utils/sql/git/required/tasks_revamp.sql @@ -1,3 +1,5 @@ ALTER TABLE `tasks` ADD `type` TINYINT NOT NULL DEFAULT '0' AFTER `id`; ALTER TABLE `tasks` ADD `duration_code` TINYINT NOT NULL DEFAULT '0' AFTER `duration`; UPDATE `tasks` SET `type` = '2'; -- we were treating them all as quests +ALTER TABLE `character_tasks` ADD `type` TINYINT NOT NULL DEFAULT '0' AFTER `slot`; +UPDATE `character_tasks` SET `type` = '2'; -- we were treating them all as quests diff --git a/zone/client.h b/zone/client.h index f958b20d5..989edf7dd 100644 --- a/zone/client.h +++ b/zone/client.h @@ -1004,8 +1004,9 @@ public: void SendTaskActivityComplete(int TaskID, int ActivityID, int TaskIndex, int TaskIncomplete=1); void SendTaskFailed(int TaskID, int TaskIndex); void SendTaskComplete(int TaskIndex); + inline ClientTaskState *GetTaskState() const { return taskstate; } - inline void CancelTask(int TaskIndex) { if(taskstate) taskstate->CancelTask(this, TaskIndex); } + inline void CancelTask(int TaskIndex, TaskType type) { if(taskstate) taskstate->CancelTask(this, TaskIndex, type); } inline bool SaveTaskState() { return (taskmanager ? taskmanager->SaveClientState(this, taskstate) : false); } inline bool IsTaskStateLoaded() { return taskstate != nullptr; } inline bool IsTaskActive(int TaskID) { return (taskstate ? taskstate->IsTaskActive(TaskID) : false); } diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 5fe4291bd..362658e97 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -4031,7 +4031,7 @@ void Client::Handle_OP_CancelTask(const EQApplicationPacket *app) CancelTask_Struct *cts = (CancelTask_Struct*)app->pBuffer; if (RuleB(TaskSystem, EnableTaskSystem) && taskstate) - taskstate->CancelTask(this, cts->SequenceNumber); + taskstate->CancelTask(this, cts->SequenceNumber, static_cast(cts->type)); } void Client::Handle_OP_CancelTrade(const EQApplicationPacket *app) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 8c7cd3aa2..15458c22e 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -292,7 +292,7 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) { Log(Logs::Detail, Logs::Tasks,"TaskManager::SaveClientState for character ID %d", characterID); - if(state->ActiveTaskCount > 0) { + if(state->ActiveTaskCount > 0) { // TODO: tasks for(int task=0; taskActiveQuests[task].TaskID; if(taskID==TASKSLOTEMPTY) @@ -302,9 +302,9 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) { Log(Logs::General, Logs::Tasks, "[CLIENTSAVE] TaskManager::SaveClientState for character ID %d, Updating TaskIndex %i TaskID %i", characterID, task, taskID); - std::string query = StringFormat("REPLACE INTO character_tasks (charid, taskid, slot, acceptedtime) " - "VALUES (%i, %i, %i, %i)", - characterID, taskID, task, state->ActiveQuests[task].AcceptedTime); + std::string query = StringFormat("REPLACE INTO character_tasks (charid, taskid, slot, type, acceptedtime) " + "VALUES (%i, %i, %i, %i, %i)", + characterID, taskID, task, static_cast(Tasks[taskID]->type), state->ActiveQuests[task].AcceptedTime); auto results = database.QueryDatabase(query); if (!results.Success()) { Log(Logs::General, Logs::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str()); @@ -660,9 +660,12 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) { } } - for(int i=0; iActiveQuests[i].TaskID != TASKSLOTEMPTY) - state->UnlockActivities(characterID, i); + if (state->ActiveTask.TaskID != TASKSLOTEMPTY) + state->UnlockActivities(characterID, state->ActiveTask); + // TODO: shared + for (int i = 0; i < MAXACTIVEQUESTS; i++) + if (state->ActiveQuests[i].TaskID != TASKSLOTEMPTY) + state->UnlockActivities(characterID, state->ActiveQuests[i]); Log(Logs::General, Logs::Tasks, "[CLIENTLOAD] LoadClientState for Character ID %d DONE!", characterID); return true; @@ -1313,10 +1316,14 @@ ClientTaskState::ClientTaskState() { LastCompletedTaskLoaded = 0; CheckedTouchActivities = false; - for(int i=0; iTasks[ActiveQuests[TaskIndex].TaskID]; + TaskInformation* Task = taskmanager->Tasks[task_info.TaskID]; - if(Task==nullptr) return true; + if (Task == nullptr) + return true; // On loading the client state, all activities that are not completed, are // marked as hidden. For Sequential (non-stepped) mode, we mark the first // activity as active if not complete. Log(Logs::General, Logs::Tasks, "[UPDATE] CharID: %i Task: %i Sequence mode is %i", - CharID, ActiveQuests[TaskIndex].TaskID, Task->SequenceMode); - if(Task->SequenceMode == ActivitiesSequential) { + CharID, task_info.TaskID, Task->SequenceMode); - if(ActiveQuests[TaskIndex].Activity[0].State != ActivityCompleted) - ActiveQuests[TaskIndex].Activity[0].State = ActivityActive; + if (Task->SequenceMode == ActivitiesSequential) { + if (task_info.Activity[0].State != ActivityCompleted) + task_info.Activity[0].State = ActivityActive; // Enable the next Hidden task. - for(int i=0; iActivityCount; i++) { - if((ActiveQuests[TaskIndex].Activity[i].State == ActivityActive) && - (!Task->Activity[i].Optional)) { + for (int i = 0; i < Task->ActivityCount; i++) { + if ((task_info.Activity[i].State == ActivityActive) && + (!Task->Activity[i].Optional)) { AllActivitiesComplete = false; break; } - if(ActiveQuests[TaskIndex].Activity[i].State == ActivityHidden) { - ActiveQuests[TaskIndex].Activity[i].State = ActivityActive; + + if (task_info.Activity[i].State == ActivityHidden) { + task_info.Activity[i].State = ActivityActive; AllActivitiesComplete = false; break; } } - if(AllActivitiesComplete && RuleB(TaskSystem, RecordCompletedTasks)) { - if(RuleB(TasksSystem, KeepOneRecordPerCompletedTask)) { + + if (AllActivitiesComplete && RuleB(TaskSystem, RecordCompletedTasks)) { + if (RuleB(TasksSystem, KeepOneRecordPerCompletedTask)) { Log(Logs::General, Logs::Tasks, "[UPDATE] KeepOneRecord enabled"); auto Iterator = CompletedTasks.begin(); int ErasedElements = 0; - while(Iterator != CompletedTasks.end()) { + while (Iterator != CompletedTasks.end()) { int TaskID = (*Iterator).TaskID; - if(TaskID == ActiveQuests[TaskIndex].TaskID) { + if (TaskID == task_info.TaskID) { Iterator = CompletedTasks.erase(Iterator); ErasedElements++; - } - else + } else ++Iterator; } - Log(Logs::General, Logs::Tasks, "[UPDATE] Erased Element count is %i", ErasedElements); - if(ErasedElements) { - LastCompletedTaskLoaded -= ErasedElements; - DeleteCompletedTaskFromDatabase(CharID, ActiveQuests[TaskIndex].TaskID); - } + Log(Logs::General, Logs::Tasks, "[UPDATE] Erased Element count is %i", ErasedElements); + + if (ErasedElements) { + LastCompletedTaskLoaded -= ErasedElements; + DeleteCompletedTaskFromDatabase(CharID, task_info.TaskID); + } } CompletedTaskInformation cti; - cti.TaskID = ActiveQuests[TaskIndex].TaskID; + cti.TaskID = task_info.TaskID; cti.CompletedTime = time(nullptr); - for(int i=0; iActivityCount; i++) - cti.ActivityDone[i] = (ActiveQuests[TaskIndex].Activity[i].State == ActivityCompleted); + for (int i = 0; i < Task->ActivityCount; i++) + cti.ActivityDone[i] = (task_info.Activity[i].State == ActivityCompleted); CompletedTasks.push_back(cti); } - Log(Logs::General, Logs::Tasks, "[UPDATE] Returning sequential task, AllActivitiesComplete is %i", AllActivitiesComplete); + + Log(Logs::General, Logs::Tasks, "[UPDATE] Returning sequential task, AllActivitiesComplete is %i", + AllActivitiesComplete); + return AllActivitiesComplete; } @@ -1416,66 +1429,69 @@ bool ClientTaskState::UnlockActivities(int CharID, int TaskIndex) { bool CurrentStepComplete = true; - Log(Logs::General, Logs::Tasks, "[UPDATE] Current Step is %i, Last Step is %i", ActiveQuests[TaskIndex].CurrentStep, Task->LastStep); + Log(Logs::General, Logs::Tasks, "[UPDATE] Current Step is %i, Last Step is %i", task_info.CurrentStep, + Task->LastStep); // If CurrentStep is -1, this is the first call to this method since loading the // client state. Unlock all activities with a step number of 0 - if(ActiveQuests[TaskIndex].CurrentStep == -1) { - for(int i=0; iActivityCount; i++) { - if((Task->Activity[i].StepNumber == 0) && - (ActiveQuests[TaskIndex].Activity[i].State == ActivityHidden)) { - ActiveQuests[TaskIndex].Activity[i].State = ActivityActive; - //ActiveQuests[TaskIndex].Activity[i].Updated=true; + if (task_info.CurrentStep == -1) { + for (int i = 0; i < Task->ActivityCount; i++) { + if (Task->Activity[i].StepNumber == 0 && task_info.Activity[i].State == ActivityHidden) { + task_info.Activity[i].State = ActivityActive; + // task_info.Activity[i].Updated=true; } } - ActiveQuests[TaskIndex].CurrentStep = 0; + task_info.CurrentStep = 0; } - for(int Step=ActiveQuests[TaskIndex].CurrentStep; Step<=Task->LastStep; Step++) { - for(int Activity=0; ActivityActivityCount; Activity++) { - if(Task->Activity[Activity].StepNumber == (int)ActiveQuests[TaskIndex].CurrentStep) { - if((ActiveQuests[TaskIndex].Activity[Activity].State != ActivityCompleted) && - (!Task->Activity[Activity].Optional)) { + for (int Step = task_info.CurrentStep; Step <= Task->LastStep; Step++) { + for (int Activity = 0; Activity < Task->ActivityCount; Activity++) { + if (Task->Activity[Activity].StepNumber == (int)task_info.CurrentStep) { + if ((task_info.Activity[Activity].State != ActivityCompleted) && + (!Task->Activity[Activity].Optional)) { CurrentStepComplete = false; AllActivitiesComplete = false; break; } } } - if(!CurrentStepComplete) break; - ActiveQuests[TaskIndex].CurrentStep++; + if (!CurrentStepComplete) + break; + task_info.CurrentStep++; } - if(AllActivitiesComplete) { - if(RuleB(TaskSystem, RecordCompletedTasks)) { + if (AllActivitiesComplete) { + if (RuleB(TaskSystem, RecordCompletedTasks)) { // If we are only keeping one completed record per task, and the player has done // the same task again, erase the previous completed entry for this task. - if(RuleB(TasksSystem, KeepOneRecordPerCompletedTask)) { + if (RuleB(TasksSystem, KeepOneRecordPerCompletedTask)) { Log(Logs::General, Logs::Tasks, "[UPDATE] KeepOneRecord enabled"); auto Iterator = CompletedTasks.begin(); int ErasedElements = 0; - while(Iterator != CompletedTasks.end()) { + + while (Iterator != CompletedTasks.end()) { int TaskID = (*Iterator).TaskID; - if(TaskID == ActiveQuests[TaskIndex].TaskID) { + if (TaskID == task_info.TaskID) { Iterator = CompletedTasks.erase(Iterator); ErasedElements++; - } - else + } else ++Iterator; } - Log(Logs::General, Logs::Tasks, "[UPDATE] Erased Element count is %i", ErasedElements); - if(ErasedElements) { - LastCompletedTaskLoaded -= ErasedElements; - DeleteCompletedTaskFromDatabase(CharID, ActiveQuests[TaskIndex].TaskID); - } + Log(Logs::General, Logs::Tasks, "[UPDATE] Erased Element count is %i", ErasedElements); + + if (ErasedElements) { + LastCompletedTaskLoaded -= ErasedElements; + DeleteCompletedTaskFromDatabase(CharID, task_info.TaskID); + } } + CompletedTaskInformation cti; - cti.TaskID = ActiveQuests[TaskIndex].TaskID; + cti.TaskID = task_info.TaskID; cti.CompletedTime = time(nullptr); - for(int i=0; iActivityCount; i++) - cti.ActivityDone[i] = (ActiveQuests[TaskIndex].Activity[i].State == ActivityCompleted); + for (int i = 0; i < Task->ActivityCount; i++) + cti.ActivityDone[i] = (task_info.Activity[i].State == ActivityCompleted); CompletedTasks.push_back(cti); } @@ -1484,19 +1500,17 @@ bool ClientTaskState::UnlockActivities(int CharID, int TaskIndex) { // Mark all non-completed tasks in the current step as active // - for(int Activity=0; ActivityActivityCount; Activity++) { - if((Task->Activity[Activity].StepNumber == (int)ActiveQuests[TaskIndex].CurrentStep) && - (ActiveQuests[TaskIndex].Activity[Activity].State == ActivityHidden)) { - ActiveQuests[TaskIndex].Activity[Activity].State = ActivityActive; - ActiveQuests[TaskIndex].Activity[Activity].Updated=true; + for (int Activity = 0; Activity < Task->ActivityCount; Activity++) { + if ((Task->Activity[Activity].StepNumber == (int)task_info.CurrentStep) && + (task_info.Activity[Activity].State == ActivityHidden)) { + task_info.Activity[Activity].State = ActivityActive; + task_info.Activity[Activity].Updated = true; } } return false; - } - void ClientTaskState::UpdateTasksOnKill(Client *c, int NPCTypeID) { UpdateTasksByNPC(c, ActivityKill, NPCTypeID); @@ -1869,12 +1883,12 @@ void ClientTaskState::IncrementDoneCount(Client *c, TaskInformation* Task, int T // Flag the activity as complete ActiveQuests[TaskIndex].Activity[ActivityID].State = ActivityCompleted; // Unlock subsequent activities for this task - bool TaskComplete = UnlockActivities(c->CharacterID(), TaskIndex); + bool TaskComplete = UnlockActivities(c->CharacterID(), ActiveQuests[TaskIndex]); // TODO: fix this function Log(Logs::General, Logs::Tasks, "[UPDATE] TaskCompleted is %i", TaskComplete); // and by the 'Task Stage Completed' message c->SendTaskActivityComplete(ActiveQuests[TaskIndex].TaskID, ActivityID, TaskIndex); // Send the updated task/activity list to the client - taskmanager->SendSingleActiveTaskToClient(c, TaskIndex, TaskComplete, false); + taskmanager->SendSingleActiveTaskToClient(c, ActiveQuests[TaskIndex], TaskComplete, false); // Inform the client the task has been updated, both by a chat message c->Message(0, "Your task '%s' has been updated.", Task->Title.c_str()); @@ -1911,7 +1925,7 @@ void ClientTaskState::IncrementDoneCount(Client *c, TaskInformation* Task, int T c->SendTaskActivityComplete(ActiveQuests[TaskIndex].TaskID, 0, TaskIndex, false); taskmanager->SaveClientState(c, this); //c->SendTaskComplete(TaskIndex); - c->CancelTask(TaskIndex); + c->CancelTask(TaskIndex, TaskType::Quest); // TODO: fix //if(Task->RewardMethod != METHODQUEST) RewardTask(c, Task); // If Experience and/or cash rewards are set, reward them from the task even if RewardMethod is METHODQUEST RewardTask(c, Task); @@ -2058,7 +2072,7 @@ void ClientTaskState::FailTask(Client *c, int TaskID) { if(ActiveQuests[i].TaskID==TaskID) { c->SendTaskFailed(ActiveQuests[i].TaskID, i); // Remove the task from the client - c->CancelTask(i); + c->CancelTask(i, TaskType::Quest); // TODO: fix return; } @@ -2282,7 +2296,7 @@ void ClientTaskState::TaskPeriodicChecks(Client *c) { // Send Red Task Failed Message c->SendTaskFailed(ActiveQuests[i].TaskID, i); // Remove the task from the client - c->CancelTask(i); + c->CancelTask(i, TaskType::Quest); // TODO: Fix // It is a conscious decision to only fail one task per call to this method, // otherwise the player will not see all the failed messages where multiple // tasks fail at the same time. @@ -2536,7 +2550,7 @@ void TaskManager::SendTaskActivityShort(Client *c, int TaskID, int ActivityID, i { auto outapp = new EQApplicationPacket(OP_TaskActivity, 25); outapp->WriteUInt32(ClientTaskIndex); - outapp->WriteUInt32(2); + outapp->WriteUInt32(static_cast(Tasks[TaskID]->type)); outapp->WriteUInt32(TaskID); outapp->WriteUInt32(ActivityID); outapp->WriteUInt32(0); @@ -2552,7 +2566,7 @@ void TaskManager::SendTaskActivityShort(Client *c, int TaskID, int ActivityID, i tass = (TaskActivityShort_Struct*)outapp->pBuffer; tass->TaskSequenceNumber = ClientTaskIndex; - tass->unknown2 = 0x00000002; + tass->unknown2 = static_cast(Tasks[TaskID]->type); tass->TaskID = TaskID; tass->ActivityID = ActivityID; tass->unknown3 = 0x000000; @@ -2669,7 +2683,7 @@ void TaskManager::SendTaskActivityNew(Client *c, int TaskID, int ActivityID, int auto outapp = new EQApplicationPacket(OP_TaskActivity, PacketLength); outapp->WriteUInt32(ClientTaskIndex); // TaskSequenceNumber - outapp->WriteUInt32(2); // unknown2 + outapp->WriteUInt32(static_cast(Tasks[TaskID]->type)); // task type outapp->WriteUInt32(TaskID); outapp->WriteUInt32(ActivityID); outapp->WriteUInt32(0); // unknown3 @@ -2687,7 +2701,7 @@ void TaskManager::SendTaskActivityNew(Client *c, int TaskID, int ActivityID, int // One of these unknown fields maybe related to the 'Use On' activity types outapp->WriteString(Tasks[TaskID]->Activity[ActivityID].Text1.c_str()); - outapp->WriteUInt32(Tasks[TaskID]->Activity[ActivityID].Text2.size() + 1); // String Length - Add in null terminator + outapp->WriteUInt32(Tasks[TaskID]->Activity[ActivityID].Text2.length() + 1); // String Length - Add in null terminator outapp->WriteString(Tasks[TaskID]->Activity[ActivityID].Text2.c_str()); // Goal Count @@ -2730,15 +2744,18 @@ void TaskManager::SendTaskActivityNew(Client *c, int TaskID, int ActivityID, int } -void TaskManager::SendActiveTasksToClient(Client *c, bool TaskComplete) { +void TaskManager::SendActiveTasksToClient(Client *c, bool TaskComplete) +{ + auto state = c->GetTaskState(); + if (!state) + return; - //for(int TaskIndex=0; TaskIndexGetActiveTaskCount(); TaskIndex++) { - for(int TaskIndex=0; TaskIndexGetActiveTaskID(TaskIndex); if((TaskID==0) || (Tasks[TaskID] ==0)) continue; int StartTime = c->GetTaskStartTime(TaskIndex); - SendActiveTaskDescription(c, TaskID, TaskIndex, StartTime, Tasks[TaskID]->Duration, false); + SendActiveTaskDescription(c, TaskID, state->ActiveQuests[TaskIndex], StartTime, Tasks[TaskID]->Duration, false); Log(Logs::General, Logs::Tasks, "[UPDATE] SendActiveTasksToClient: Task %i, Activities: %i", TaskID, GetActivityCount(TaskID)); int Sequence = 0; @@ -2764,62 +2781,54 @@ void TaskManager::SendActiveTasksToClient(Client *c, bool TaskComplete) { } } +void TaskManager::SendSingleActiveTaskToClient(Client *c, ClientTaskInformation &task_info, bool TaskComplete, + bool BringUpTaskJournal) +{ + int TaskID = task_info.TaskID; -void TaskManager::SendSingleActiveTaskToClient(Client *c, int TaskIndex, bool TaskComplete, bool BringUpTaskJournal) { + if (TaskID == 0 || Tasks[TaskID] == nullptr) + return; - if((TaskIndex < 0) || (TaskIndex >= MAXACTIVEQUESTS)) return; - - int TaskID = c->GetActiveTaskID(TaskIndex); - - if((TaskID==0) || (Tasks[TaskID] ==0)) return; - - int StartTime = c->GetTaskStartTime(TaskIndex); - SendActiveTaskDescription(c, TaskID, TaskIndex, StartTime, Tasks[TaskID]->Duration, BringUpTaskJournal); + int StartTime = task_info.AcceptedTime; + SendActiveTaskDescription(c, TaskID, task_info, StartTime, Tasks[TaskID]->Duration, BringUpTaskJournal); Log(Logs::General, Logs::Tasks, "[UPDATE] SendSingleActiveTasksToClient: Task %i, Activities: %i", TaskID, GetActivityCount(TaskID)); - int Sequence = 0; - - for(int Activity=0; ActivityGetTaskActivityState(TaskIndex, Activity) != ActivityHidden) { - Log(Logs::General, Logs::Tasks, "[UPDATE] Long: %i, %i, %i Complete=%i", TaskID, Activity, TaskIndex, TaskComplete); - if(Activity==GetActivityCount(TaskID)-1) - SendTaskActivityLong(c, TaskID, Activity, TaskIndex, + for (int Activity = 0; Activity < GetActivityCount(TaskID); Activity++) { + if(task_info.Activity[Activity].State != ActivityHidden) { + Log(Logs::General, Logs::Tasks, "[UPDATE] Long: %i, %i Complete=%i", TaskID, Activity, TaskComplete); + if (Activity == GetActivityCount(TaskID) - 1) + SendTaskActivityLong(c, TaskID, Activity, task_info.slot, Tasks[TaskID]->Activity[Activity].Optional, TaskComplete); else - SendTaskActivityLong(c, TaskID, Activity, TaskIndex, + SendTaskActivityLong(c, TaskID, Activity, task_info.slot, Tasks[TaskID]->Activity[Activity].Optional, 0); + } else { + Log(Logs::General, Logs::Tasks, "[UPDATE] Short: %i, %i", TaskID, Activity); + SendTaskActivityShort(c, TaskID, Activity, task_info.slot); } - else { - Log(Logs::General, Logs::Tasks, "[UPDATE] Short: %i, %i, %i", TaskID, Activity, TaskIndex); - SendTaskActivityShort(c, TaskID, Activity, TaskIndex); - } - Sequence++; } } -void TaskManager::SendActiveTaskDescription(Client *c, int TaskID, int SequenceNumber, int StartTime, int Duration, bool BringUpTaskJournal) +void TaskManager::SendActiveTaskDescription(Client *c, int TaskID, ClientTaskInformation &task_info, int StartTime, int Duration, bool BringUpTaskJournal) { if ((TaskID < 1) || (TaskID >= MAXTASKS) || !Tasks[TaskID]) return; - int PacketLength = sizeof(TaskDescriptionHeader_Struct) + Tasks[TaskID]->Title.size() + 1 - + sizeof(TaskDescriptionData1_Struct) + Tasks[TaskID]->Description.size() + 1 + int PacketLength = sizeof(TaskDescriptionHeader_Struct) + Tasks[TaskID]->Title.length() + 1 + + sizeof(TaskDescriptionData1_Struct) + Tasks[TaskID]->Description.length() + 1 + sizeof(TaskDescriptionData2_Struct) + 1 + sizeof(TaskDescriptionTrailer_Struct); - std::string reward_text; - int ItemID = 0; - // If there is an item make the Reward text into a link to the item (only the first item if a list // is specified). I have been unable to get multiple item links to work. // - if(Tasks[TaskID]->RewardID) { + if(Tasks[TaskID]->RewardID && Tasks[TaskID]->item_link.empty()) { + int ItemID = 0; // If the reward is a list of items, and the first entry on the list is valid - if(Tasks[TaskID]->RewardMethod==METHODSINGLEID) { + if (Tasks[TaskID]->RewardMethod == METHODSINGLEID) { ItemID = Tasks[TaskID]->RewardID; - } - else if(Tasks[TaskID]->RewardMethod==METHODLIST) { + } else if (Tasks[TaskID]->RewardMethod == METHODLIST) { ItemID = GoalListManager.GetFirstEntry(Tasks[TaskID]->RewardID); - if(ItemID < 0) + if (ItemID < 0) ItemID = 0; } @@ -2830,20 +2839,11 @@ void TaskManager::SendActiveTaskDescription(Client *c, int TaskID, int SequenceN linker.SetLinkType(EQEmu::saylink::SayLinkItemData); linker.SetItemData(reward_item); linker.SetTaskUse(); - if (!Tasks[TaskID]->Reward.empty()) - linker.SetProxyText(Tasks[TaskID]->Reward.c_str()); - - reward_text.append(linker.GenerateLink()); - } - else { - reward_text.append(Tasks[TaskID]->Reward); + Tasks[TaskID]->item_link = linker.GenerateLink(); } + } - } - else { - reward_text.append(Tasks[TaskID]->Reward); - } - PacketLength += reward_text.length() + 1; + PacketLength += Tasks[TaskID]->Reward.length() + 1 + Tasks[TaskID]->item_link.length() + 1; char *Ptr; TaskDescriptionHeader_Struct* tdh; @@ -2855,60 +2855,57 @@ void TaskManager::SendActiveTaskDescription(Client *c, int TaskID, int SequenceN tdh = (TaskDescriptionHeader_Struct*)outapp->pBuffer; - tdh->SequenceNumber = SequenceNumber; + tdh->SequenceNumber = task_info.slot; tdh->TaskID = TaskID; - - if(BringUpTaskJournal) - tdh->unknown2 = 0x00000201; - else - tdh->unknown2 = 0x00000200; - //tdh->unknown2 = 0x00000100; // This makes the Task Description have an S instead of Q, but the description doesn't show - - tdh->unknown3 = 0x00000000; - tdh->unknown4 = 0x00; + tdh->open_window = BringUpTaskJournal; + tdh->task_type = static_cast(Tasks[TaskID]->type); + tdh->reward_type = 0; // TODO: 4 says Radiant Crystals else Ebon Crystals when shared task Ptr = (char *) tdh + sizeof(TaskDescriptionHeader_Struct); sprintf(Ptr, "%s", Tasks[TaskID]->Title.c_str()); - Ptr = Ptr + strlen(Ptr) + 1; + Ptr += Tasks[TaskID]->Title.length() + 1; tdd1 = (TaskDescriptionData1_Struct*)Ptr; tdd1->Duration = Duration; - tdd1->unknown2 = 0x00000000; + tdd1->dur_code = static_cast(Tasks[TaskID]->dur_code); tdd1->StartTime = StartTime; Ptr = (char *) tdd1 + sizeof(TaskDescriptionData1_Struct); sprintf(Ptr, "%s", Tasks[TaskID]->Description.c_str()); - Ptr = Ptr + strlen(Ptr) + 1; + Ptr += Tasks[TaskID]->Description.length() + 1; tdd2 = (TaskDescriptionData2_Struct*)Ptr; - // This next field may not be a reward count. It is always 1 in the packets I have seen. Setting it to 2 and trying - // to include multiple item links has so far proven futile. Setting it to 0 ends the packet after the next byte. - tdd2->RewardCount = 1; + // we have this reward stuff! + // if we ever don't hardcode this, TaskDescriptionTrailer_Struct will need to be fixed since + // "has_reward_selection" is after this bool! Smaller packet when this is 0 + tdd2->has_rewards = 1; - if(Tasks[TaskID]->XPReward) - tdd2->unknown1 = 0x00000100; - else - tdd2->unknown1 = 0x00000000; + tdd2->coin_reward = Tasks[TaskID]->CashReward; + tdd2->xp_reward = Tasks[TaskID]->XPReward ? 1 : 0; // just booled + tdd2->unknown3 = 0; // STRONGLY suspect this is faction reward, also just booled to hide details? - tdd2->unknown2 = 0x00000000; - tdd2->unknown3 = 0x0000; Ptr = (char *) tdd2 + sizeof(TaskDescriptionData2_Struct); - sprintf(Ptr, "%s", reward_text.c_str()); - Ptr = Ptr + strlen(Ptr) + 1; + // we actually have 2 strings here. One is max length 96 and not parsed for item links + // We actually skipped past that string incorrectly before, so TODO: fix item link string + sprintf(Ptr, "%s", Tasks[TaskID]->Reward.c_str()); + Ptr += Tasks[TaskID]->Reward.length() + 1; + + // second string is parsed for item links + sprintf(Ptr, "%s", Tasks[TaskID]->item_link.c_str()); + Ptr += Tasks[TaskID]->item_link.length() + 1; tdt = (TaskDescriptionTrailer_Struct*)Ptr; - tdt->Points = 0x00000000; // Points Count - + tdt->Points = 0x00000000; // Points Count TODO: this does have a visible affect on the client ... + tdt->has_reward_selection = 0; // TODO: new rewards window c->QueuePacket(outapp); safe_delete(outapp); - } bool ClientTaskState::IsTaskActivityCompleted(int index, int ActivityID) { @@ -2960,21 +2957,25 @@ void ClientTaskState::CancelAllTasks(Client *c) { // It removes tasks from the in-game client state ready for them to be // resent to the client, in case an updated task fails to load + CancelTask(c, 0, TaskType::Task, false); + ActiveTask.TaskID = TASKSLOTEMPTY; + for(int i=0; ipBuffer; cts->SequenceNumber = SequenceNumber; - cts->unknown4 = 0x00000002; + cts->type = static_cast(type); Log(Logs::General, Logs::Tasks, "[UPDATE] CancelTask"); @@ -2982,11 +2983,11 @@ void ClientTaskState::CancelTask(Client *c, int SequenceNumber, bool RemoveFromD safe_delete(outapp); if(RemoveFromDB) - RemoveTask(c, SequenceNumber); + RemoveTask(c, SequenceNumber, type); } -void ClientTaskState::RemoveTask(Client *c, int sequenceNumber) { - +void ClientTaskState::RemoveTask(Client *c, int sequenceNumber, TaskType type) +{ int characterID = c->CharacterID(); Log(Logs::General, Logs::Tasks, "[UPDATE] ClientTaskState Cancel Task %i ", sequenceNumber); @@ -2999,104 +3000,151 @@ void ClientTaskState::RemoveTask(Client *c, int sequenceNumber) { } Log(Logs::General, Logs::Tasks, "[UPDATE] CancelTask: %s", query.c_str()); - query = StringFormat("DELETE FROM character_tasks WHERE charid=%i AND taskid = %i", - characterID, ActiveQuests[sequenceNumber].TaskID); + query = StringFormat("DELETE FROM character_tasks WHERE charid=%i AND taskid = %i AND type=%i", + characterID, ActiveQuests[sequenceNumber].TaskID, static_cast(type)); results = database.QueryDatabase(query); if(!results.Success()) Log(Logs::General, Logs::Error, "[TASKS] Error in CientTaskState::CancelTask %s", results.ErrorMessage().c_str()); Log(Logs::General, Logs::Tasks, "[UPDATE] CancelTask: %s", query.c_str()); - ActiveQuests[sequenceNumber].TaskID = TASKSLOTEMPTY; - ActiveTaskCount--; + switch (type) { + case TaskType::Task: + ActiveTask.TaskID = TASKSLOTEMPTY; + break; + case TaskType::Shared: + break; // TODO: shared tasks + case TaskType::Quest: + ActiveQuests[sequenceNumber].TaskID = TASKSLOTEMPTY; + ActiveTaskCount--; + break; + default: + break; + } } -void ClientTaskState::AcceptNewTask(Client *c, int TaskID, int NPCID, bool enforce_level_requirement) { - - if(!taskmanager || TaskID<0 || TaskID>=MAXTASKS) { +void ClientTaskState::AcceptNewTask(Client *c, int TaskID, int NPCID, bool enforce_level_requirement) +{ + if (!taskmanager || TaskID < 0 || TaskID >= MAXTASKS) { c->Message(13, "Task system not functioning, or TaskID %i out of range.", TaskID); return; - } - if(taskmanager->Tasks[TaskID] == nullptr) { + auto task = taskmanager->Tasks[TaskID]; + + if (task == nullptr) { c->Message(13, "Invalid TaskID %i", TaskID); return; } - if(ActiveTaskCount==MAXACTIVEQUESTS) { + bool max_tasks = false; + + switch (task->type) { + case TaskType::Task: + if (ActiveTask.TaskID != TASKSLOTEMPTY) + max_tasks = true; + break; + case TaskType::Shared: // TODO: shared tasks + // if (something) + max_tasks = true; + break; + case TaskType::Quest: + if (ActiveTaskCount == MAXACTIVEQUESTS) + max_tasks = true; + break; + default: + break; + } + + if (max_tasks) { c->Message(13, "You already have the maximum allowable number of active tasks (%i)", MAXACTIVEQUESTS); return; } - for(int i=0; iMessage(13, "You have already been assigned this task."); - return; + // only Quests can have more than one, so don't need to check others + if (task->type == TaskType::Quest) { + for (int i = 0; i < MAXACTIVEQUESTS; i++) { + if (ActiveQuests[i].TaskID == TaskID) { + c->Message(13, "You have already been assigned this task."); + return; + } } } - if (enforce_level_requirement && !taskmanager->AppropriateLevel(TaskID, c->GetLevel())) - { + if (enforce_level_requirement && !taskmanager->AppropriateLevel(TaskID, c->GetLevel())) { c->Message(13, "You are outside the level range of this task."); return; } - if(!taskmanager->IsTaskRepeatable(TaskID) && IsTaskCompleted(TaskID)) return; + if (!taskmanager->IsTaskRepeatable(TaskID) && IsTaskCompleted(TaskID)) + return; // We do it this way, because when the Client cancels a task, it retains the sequence number of the remaining // tasks in it's window, until something causes the TaskDescription packets to be sent again. We could just // resend all the active task data to the client when it cancels a task, but that could be construed as a // waste of bandwidth. // - int FreeSlot = -1; - for(int i=0; itype) { + case TaskType::Task: + active_slot = &ActiveTask; + break; + case TaskType::Shared: // TODO: shared + active_slot = nullptr; + break; + case TaskType::Quest: + for (int i = 0; i < MAXACTIVEQUESTS; i++) { + Log(Logs::General, Logs::Tasks, + "[UPDATE] ClientTaskState Looking for free slot in slot %i, found TaskID of %i", i, + ActiveQuests[i].TaskID); + if (ActiveQuests[i].TaskID == 0) { + active_slot = &ActiveQuests[i]; + break; + } } + break; + default: + break; } // This shouldn't happen unless there is a bug in the handling of ActiveTaskCount somewhere - if(FreeSlot == -1) { + if (active_slot == nullptr) { c->Message(13, "You already have the maximum allowable number of active tasks (%i)", MAXACTIVEQUESTS); return; } + active_slot->TaskID = TaskID; + active_slot->AcceptedTime = time(nullptr); + active_slot->Updated = true; + active_slot->CurrentStep = -1; - ActiveQuests[FreeSlot].TaskID = TaskID; - ActiveQuests[FreeSlot].AcceptedTime = time(nullptr); - ActiveQuests[FreeSlot].Updated = true; - ActiveQuests[FreeSlot].CurrentStep = -1; - - for(int i=0; iTasks[TaskID]->ActivityCount; i++) { - ActiveQuests[FreeSlot].Activity[i].ActivityID = i; - ActiveQuests[FreeSlot].Activity[i].DoneCount = 0; - ActiveQuests[FreeSlot].Activity[i].State = ActivityHidden; - ActiveQuests[FreeSlot].Activity[i].Updated = true; + for (int i = 0; i < taskmanager->Tasks[TaskID]->ActivityCount; i++) { + active_slot->Activity[i].ActivityID = i; + active_slot->Activity[i].DoneCount = 0; + active_slot->Activity[i].State = ActivityHidden; + active_slot->Activity[i].Updated = true; } - UnlockActivities(c->CharacterID(), FreeSlot); - ActiveTaskCount++; - taskmanager->SendSingleActiveTaskToClient(c, FreeSlot, false, true); + + UnlockActivities(c->CharacterID(), *active_slot); + + if (task->type == TaskType::Quest) + ActiveTaskCount++; + + taskmanager->SendSingleActiveTaskToClient(c, *active_slot, false, true); c->Message(0, "You have been assigned the task '%s'.", taskmanager->Tasks[TaskID]->Title.c_str()); - char *buf = 0; - MakeAnyLenString(&buf, "%d", TaskID); + std::string buf = std::to_string(TaskID); NPC *npc = entity_list.GetID(NPCID)->CastToNPC(); if(!npc) { c->Message(clientMessageYellow, "Task Giver ID is %i", NPCID); c->Message(clientMessageError, "Unable to find NPC to send EVENT_TASKACCEPTED to. Report this bug."); - safe_delete_array(buf); return; } - taskmanager->SaveClientState(c, this); - parse->EventNPC(EVENT_TASK_ACCEPTED, npc, c, buf, 0); - safe_delete_array(buf); + taskmanager->SaveClientState(c, this); + parse->EventNPC(EVENT_TASK_ACCEPTED, npc, c, buf.c_str(), 0); } void ClientTaskState::ProcessTaskProximities(Client *c, float X, float Y, float Z) { diff --git a/zone/tasks.h b/zone/tasks.h index 8db0c4ef8..5fd074300 100644 --- a/zone/tasks.h +++ b/zone/tasks.h @@ -136,6 +136,7 @@ struct TaskInformation { std::string Title; // max length 64 std::string Description; // max length 4000, 2048 on Tit std::string Reward; + std::string item_link; // max length 128 older clients, item link gets own string int RewardID; int CashReward; // Expressed in copper int XPReward; @@ -165,6 +166,7 @@ struct ClientActivityInformation { }; struct ClientTaskInformation { + int slot; // intrusive, but makes things easier :P int TaskID; int CurrentStep; int AcceptedTime; @@ -199,9 +201,9 @@ public: ActivityState GetTaskActivityState(int index, int ActivityID); void UpdateTaskActivity(Client *c, int TaskID, int ActivityID, int Count, bool ignore_quest_update = false); void ResetTaskActivity(Client *c, int TaskID, int ActivityID); - void CancelTask(Client *c, int SequenceNumber, bool RemoveFromDB = true); + void CancelTask(Client *c, int SequenceNumber, TaskType type, bool RemoveFromDB = true); void CancelAllTasks(Client *c); - void RemoveTask(Client *c, int SequenceNumber); + void RemoveTask(Client *c, int SequenceNumber, TaskType type); bool UpdateTasksByNPC(Client *c, int ActivityType, int NPCTypeID); void UpdateTasksOnKill(Client *c, int NPCTypeID); void UpdateTasksForItem(Client *c, ActivityType Type, int ItemID, int Count=1); @@ -229,7 +231,7 @@ public: friend class TaskManager; private: - bool UnlockActivities(int CharID, int TaskIndex); + bool UnlockActivities(int CharID, ClientTaskInformation &task_info); void IncrementDoneCount(Client *c, TaskInformation *Task, int TaskIndex, int ActivityID, int Count = 1, bool ignore_quest_update = false); int ActiveTaskCount; ClientTaskInformation ActiveTask; // only one @@ -263,7 +265,7 @@ public: void TaskSetSelector(Client *c, ClientTaskState *state, Mob *mob, int TaskSetID); void TaskQuestSetSelector(Client *c, ClientTaskState *state, Mob *mob, int count, int *tasks); // task list provided by QuestManager (perl/lua) void SendActiveTasksToClient(Client *c, bool TaskComplete=false); - void SendSingleActiveTaskToClient(Client *c, int TaskIndex, bool TaskComplete, bool BringUpTaskJournal=false); + void SendSingleActiveTaskToClient(Client *c, ClientTaskInformation &task_info, bool TaskComplete, bool BringUpTaskJournal = false); void SendTaskActivityShort(Client *c, int TaskID, int ActivityID, int ClientTaskIndex); void SendTaskActivityLong(Client *c, int TaskID, int ActivityID, int ClientTaskIndex, bool Optional, bool TaskComplete=false); @@ -283,7 +285,7 @@ private: TaskProximityManager ProximityManager; TaskInformation* Tasks[MAXTASKS]; std::vector TaskSets[MAXTASKSETS]; - void SendActiveTaskDescription(Client *c, int TaskID, int SequenceNumber, int StartTime, int Duration, bool BringUpTaskJournal=false); + void SendActiveTaskDescription(Client *c, int TaskID, ClientTaskInformation &task_info, int StartTime, int Duration, bool BringUpTaskJournal=false); }; From 352e70cf28d6f4447146e040b015b64a559c4fb7 Mon Sep 17 00:00:00 2001 From: KimLS Date: Tue, 26 Jun 2018 22:50:44 -0700 Subject: [PATCH 214/670] Fix for duplicate luabind --- CMakeLists.txt | 2 +- luabind/CMakeLists.txt | 39 - luabind/luabind/adopt_policy.hpp | 142 -- luabind/luabind/back_reference.hpp | 112 -- luabind/luabind/back_reference_fwd.hpp | 37 - luabind/luabind/class.hpp | 879 ---------- luabind/luabind/class_info.hpp | 50 - luabind/luabind/config.hpp | 128 -- luabind/luabind/container_policy.hpp | 143 -- luabind/luabind/copy_policy.hpp | 61 - luabind/luabind/dependency_policy.hpp | 119 -- luabind/luabind/detail/calc_arity.hpp | 61 - luabind/luabind/detail/call.hpp | 323 ---- luabind/luabind/detail/call_function.hpp | 442 ------ luabind/luabind/detail/call_member.hpp | 365 ----- .../luabind/detail/call_operator_iterate.hpp | 66 - luabind/luabind/detail/class_cache.hpp | 89 -- luabind/luabind/detail/class_registry.hpp | 85 - luabind/luabind/detail/class_rep.hpp | 213 --- luabind/luabind/detail/compute_score.hpp | 73 - luabind/luabind/detail/constructor.hpp | 111 -- luabind/luabind/detail/conversion_storage.hpp | 41 - luabind/luabind/detail/convert_to_lua.hpp | 92 -- luabind/luabind/detail/debug.hpp | 55 - luabind/luabind/detail/decorate_type.hpp | 266 ---- luabind/luabind/detail/deduce_signature.hpp | 118 -- luabind/luabind/detail/enum_maker.hpp | 123 -- luabind/luabind/detail/format_signature.hpp | 153 -- luabind/luabind/detail/garbage_collector.hpp | 53 - luabind/luabind/detail/has_get_pointer.hpp | 107 -- luabind/luabind/detail/inheritance.hpp | 168 -- luabind/luabind/detail/instance_holder.hpp | 131 -- luabind/luabind/detail/is_indirect_const.hpp | 70 - luabind/luabind/detail/link_compatibility.hpp | 60 - luabind/luabind/detail/make_instance.hpp | 105 -- luabind/luabind/detail/most_derived.hpp | 44 - luabind/luabind/detail/object_call.hpp | 52 - luabind/luabind/detail/object_funs.hpp | 224 --- luabind/luabind/detail/object_rep.hpp | 133 -- luabind/luabind/detail/open.hpp | 45 - luabind/luabind/detail/operator_id.hpp | 79 - luabind/luabind/detail/other.hpp | 119 -- luabind/luabind/detail/pcall.hpp | 36 - luabind/luabind/detail/pointee_sizeof.hpp | 54 - luabind/luabind/detail/pointee_typeid.hpp | 40 - luabind/luabind/detail/policy.hpp | 1022 ------------ luabind/luabind/detail/primitives.hpp | 85 - luabind/luabind/detail/property.hpp | 33 - luabind/luabind/detail/ref.hpp | 112 -- luabind/luabind/detail/signature_match.hpp | 61 - luabind/luabind/detail/stack_utils.hpp | 52 - luabind/luabind/detail/typetraits.hpp | 190 --- luabind/luabind/detail/yes_no.hpp | 34 - luabind/luabind/discard_result_policy.hpp | 72 - luabind/luabind/error.hpp | 93 -- luabind/luabind/exception_handler.hpp | 110 -- luabind/luabind/from_stack.hpp | 42 - luabind/luabind/function.hpp | 62 - luabind/luabind/get_main_thread.hpp | 16 - luabind/luabind/get_pointer.hpp | 39 - luabind/luabind/handle.hpp | 144 -- luabind/luabind/iterator_policy.hpp | 112 -- luabind/luabind/lua502.hpp | 56 - luabind/luabind/lua_include.hpp | 39 - luabind/luabind/luabind.hpp | 32 - luabind/luabind/make_function.hpp | 123 -- luabind/luabind/nil.hpp | 40 - luabind/luabind/object.hpp | 1412 ----------------- luabind/luabind/open.hpp | 36 - luabind/luabind/operator.hpp | 355 ----- luabind/luabind/out_value_policy.hpp | 280 ---- luabind/luabind/prefix.hpp | 31 - luabind/luabind/raw_policy.hpp | 85 - .../luabind/return_reference_to_policy.hpp | 73 - luabind/luabind/scope.hpp | 103 -- luabind/luabind/shared_ptr_converter.hpp | 83 - luabind/luabind/tag_function.hpp | 88 - luabind/luabind/typeid.hpp | 65 - luabind/luabind/value_wrapper.hpp | 168 -- luabind/luabind/version.hpp | 16 - luabind/luabind/weak_ref.hpp | 59 - luabind/luabind/wrapper_base.hpp | 192 --- luabind/luabind/yield_policy.hpp | 67 - luabind/src/class.cpp | 337 ---- luabind/src/class_info.cpp | 120 -- luabind/src/class_registry.cpp | 166 -- luabind/src/class_rep.cpp | 390 ----- luabind/src/create_class.cpp | 139 -- luabind/src/error.cpp | 78 - luabind/src/exception_handler.cpp | 87 - luabind/src/function.cpp | 136 -- luabind/src/inheritance.cpp | 258 --- luabind/src/link_compatibility.cpp | 43 - luabind/src/object_rep.cpp | 273 ---- luabind/src/open.cpp | 196 --- luabind/src/pcall.cpp | 65 - luabind/src/scope.cpp | 208 --- luabind/src/stack_content_by_name.cpp | 59 - luabind/src/weak_ref.cpp | 157 -- luabind/src/wrapper_base.cpp | 55 - 100 files changed, 1 insertion(+), 14356 deletions(-) delete mode 100644 luabind/CMakeLists.txt delete mode 100644 luabind/luabind/adopt_policy.hpp delete mode 100644 luabind/luabind/back_reference.hpp delete mode 100644 luabind/luabind/back_reference_fwd.hpp delete mode 100644 luabind/luabind/class.hpp delete mode 100644 luabind/luabind/class_info.hpp delete mode 100644 luabind/luabind/config.hpp delete mode 100644 luabind/luabind/container_policy.hpp delete mode 100644 luabind/luabind/copy_policy.hpp delete mode 100644 luabind/luabind/dependency_policy.hpp delete mode 100644 luabind/luabind/detail/calc_arity.hpp delete mode 100644 luabind/luabind/detail/call.hpp delete mode 100644 luabind/luabind/detail/call_function.hpp delete mode 100644 luabind/luabind/detail/call_member.hpp delete mode 100644 luabind/luabind/detail/call_operator_iterate.hpp delete mode 100644 luabind/luabind/detail/class_cache.hpp delete mode 100644 luabind/luabind/detail/class_registry.hpp delete mode 100644 luabind/luabind/detail/class_rep.hpp delete mode 100644 luabind/luabind/detail/compute_score.hpp delete mode 100644 luabind/luabind/detail/constructor.hpp delete mode 100644 luabind/luabind/detail/conversion_storage.hpp delete mode 100644 luabind/luabind/detail/convert_to_lua.hpp delete mode 100644 luabind/luabind/detail/debug.hpp delete mode 100644 luabind/luabind/detail/decorate_type.hpp delete mode 100644 luabind/luabind/detail/deduce_signature.hpp delete mode 100644 luabind/luabind/detail/enum_maker.hpp delete mode 100644 luabind/luabind/detail/format_signature.hpp delete mode 100644 luabind/luabind/detail/garbage_collector.hpp delete mode 100644 luabind/luabind/detail/has_get_pointer.hpp delete mode 100644 luabind/luabind/detail/inheritance.hpp delete mode 100644 luabind/luabind/detail/instance_holder.hpp delete mode 100644 luabind/luabind/detail/is_indirect_const.hpp delete mode 100644 luabind/luabind/detail/link_compatibility.hpp delete mode 100644 luabind/luabind/detail/make_instance.hpp delete mode 100644 luabind/luabind/detail/most_derived.hpp delete mode 100644 luabind/luabind/detail/object_call.hpp delete mode 100644 luabind/luabind/detail/object_funs.hpp delete mode 100644 luabind/luabind/detail/object_rep.hpp delete mode 100644 luabind/luabind/detail/open.hpp delete mode 100644 luabind/luabind/detail/operator_id.hpp delete mode 100644 luabind/luabind/detail/other.hpp delete mode 100644 luabind/luabind/detail/pcall.hpp delete mode 100644 luabind/luabind/detail/pointee_sizeof.hpp delete mode 100644 luabind/luabind/detail/pointee_typeid.hpp delete mode 100644 luabind/luabind/detail/policy.hpp delete mode 100644 luabind/luabind/detail/primitives.hpp delete mode 100644 luabind/luabind/detail/property.hpp delete mode 100644 luabind/luabind/detail/ref.hpp delete mode 100644 luabind/luabind/detail/signature_match.hpp delete mode 100644 luabind/luabind/detail/stack_utils.hpp delete mode 100644 luabind/luabind/detail/typetraits.hpp delete mode 100644 luabind/luabind/detail/yes_no.hpp delete mode 100644 luabind/luabind/discard_result_policy.hpp delete mode 100644 luabind/luabind/error.hpp delete mode 100644 luabind/luabind/exception_handler.hpp delete mode 100644 luabind/luabind/from_stack.hpp delete mode 100644 luabind/luabind/function.hpp delete mode 100644 luabind/luabind/get_main_thread.hpp delete mode 100644 luabind/luabind/get_pointer.hpp delete mode 100644 luabind/luabind/handle.hpp delete mode 100644 luabind/luabind/iterator_policy.hpp delete mode 100644 luabind/luabind/lua502.hpp delete mode 100644 luabind/luabind/lua_include.hpp delete mode 100644 luabind/luabind/luabind.hpp delete mode 100644 luabind/luabind/make_function.hpp delete mode 100644 luabind/luabind/nil.hpp delete mode 100644 luabind/luabind/object.hpp delete mode 100644 luabind/luabind/open.hpp delete mode 100644 luabind/luabind/operator.hpp delete mode 100644 luabind/luabind/out_value_policy.hpp delete mode 100644 luabind/luabind/prefix.hpp delete mode 100644 luabind/luabind/raw_policy.hpp delete mode 100644 luabind/luabind/return_reference_to_policy.hpp delete mode 100644 luabind/luabind/scope.hpp delete mode 100644 luabind/luabind/shared_ptr_converter.hpp delete mode 100644 luabind/luabind/tag_function.hpp delete mode 100644 luabind/luabind/typeid.hpp delete mode 100644 luabind/luabind/value_wrapper.hpp delete mode 100644 luabind/luabind/version.hpp delete mode 100644 luabind/luabind/weak_ref.hpp delete mode 100644 luabind/luabind/wrapper_base.hpp delete mode 100644 luabind/luabind/yield_policy.hpp delete mode 100644 luabind/src/class.cpp delete mode 100644 luabind/src/class_info.cpp delete mode 100644 luabind/src/class_registry.cpp delete mode 100644 luabind/src/class_rep.cpp delete mode 100644 luabind/src/create_class.cpp delete mode 100644 luabind/src/error.cpp delete mode 100644 luabind/src/exception_handler.cpp delete mode 100644 luabind/src/function.cpp delete mode 100644 luabind/src/inheritance.cpp delete mode 100644 luabind/src/link_compatibility.cpp delete mode 100644 luabind/src/object_rep.cpp delete mode 100644 luabind/src/open.cpp delete mode 100644 luabind/src/pcall.cpp delete mode 100644 luabind/src/scope.cpp delete mode 100644 luabind/src/stack_content_by_name.cpp delete mode 100644 luabind/src/weak_ref.cpp delete mode 100644 luabind/src/wrapper_base.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index a3d38e1bd..7ec2593f9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -342,7 +342,7 @@ IF(EQEMU_BUILD_LUA) FIND_PACKAGE(Boost REQUIRED) INCLUDE_DIRECTORIES(SYSTEM "${LUA_INCLUDE_DIR}" "${Boost_INCLUDE_DIRS}") - INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/luabind") + INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/libs/luabind") OPTION(EQEMU_SANITIZE_LUA_LIBS "Sanitize Lua Libraries (Remove OS and IO standard libraries from being able to run)." ON) IF(EQEMU_SANITIZE_LUA_LIBS) diff --git a/luabind/CMakeLists.txt b/luabind/CMakeLists.txt deleted file mode 100644 index 5efdf562f..000000000 --- a/luabind/CMakeLists.txt +++ /dev/null @@ -1,39 +0,0 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) - -SET(lb_sources - src/class.cpp - src/class_info.cpp - src/class_registry.cpp - src/class_rep.cpp - src/create_class.cpp - src/error.cpp - src/exception_handler.cpp - src/function.cpp - src/inheritance.cpp - src/link_compatibility.cpp - src/object_rep.cpp - src/open.cpp - src/pcall.cpp - src/scope.cpp - src/stack_content_by_name.cpp - src/weak_ref.cpp - src/wrapper_base.cpp -) - -SET(lb_headers - -) - -ADD_LIBRARY(luabind ${lb_sources} ${lb_headers}) - - -IF(UNIX) - ADD_DEFINITIONS(-fPIC) - set_source_files_properties(${lb_sources} PROPERTY COMPILE_FLAGS -Wno-deprecated-declarations) -ENDIF(UNIX) - -IF(MSVC) - set_source_files_properties(${lb_sources} PROPERTY COMPILE_FLAGS " /W0 " ) -ENDIF(MSVC) - -SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) diff --git a/luabind/luabind/adopt_policy.hpp b/luabind/luabind/adopt_policy.hpp deleted file mode 100644 index 5e81b948b..000000000 --- a/luabind/luabind/adopt_policy.hpp +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#ifndef LUABIND_ADOPT_POLICY_HPP_INCLUDED -#define LUABIND_ADOPT_POLICY_HPP_INCLUDED - -#include -#include -#include -#include -#include -#include - -namespace luabind { namespace detail -{ - template - void adjust_backref_ownership(T* ptr, mpl::true_) - { - if (wrap_base* p = dynamic_cast(ptr)) - { - wrapped_self_t& wrapper = wrap_access::ref(*p); - wrapper.get(wrapper.state()); - wrapper.m_strong_ref.set(wrapper.state()); - } - } - - inline void adjust_backref_ownership(void*, mpl::false_) - {} - - template - struct adopt_pointer : pointer_converter - { - typedef adopt_pointer type; - - int const consumed_args(...) - { - return 1; - } - - template - T* apply(lua_State* L, by_pointer, int index) - { - T* ptr = pointer_converter::apply( - L, LUABIND_DECORATE_TYPE(T*), index); - - object_rep* obj = static_cast( - lua_touserdata(L, index)); - obj->release(); - - adjust_backref_ownership(ptr, boost::is_polymorphic()); - - return ptr; - } - - template - int match(lua_State* L, by_pointer, int index) - { - return pointer_converter::match( - L, LUABIND_DECORATE_TYPE(T*), index); - } - - template - void converter_postcall(lua_State*, T, int) {} - }; - - template<> - struct adopt_pointer - { - typedef adopt_pointer type; - - template - void apply(lua_State* L, T* ptr) - { - if (ptr == 0) - { - lua_pushnil(L); - return; - } - - // if there is a back_reference, then the - // ownership will be removed from the - // back reference and put on the lua stack. - if (luabind::move_back_reference(L, ptr)) - return; - - make_instance(L, std::auto_ptr(ptr)); - } - }; - - template -// struct adopt_policy : converter_policy_tag - struct adopt_policy : conversion_policy - { -// BOOST_STATIC_CONSTANT(int, index = N); - - static void precall(lua_State*, const index_map&) {} - static void postcall(lua_State*, const index_map&) {} - - struct only_accepts_nonconst_pointers {}; - - template - struct apply - { - typedef luabind::detail::is_nonconst_pointer is_nonconst_p; - typedef typename boost::mpl::if_, only_accepts_nonconst_pointers>::type type; - }; - }; - -}} - -namespace luabind -{ - template - detail::policy_cons, detail::null_type> - adopt(LUABIND_PLACEHOLDER_ARG(N)) - { - return detail::policy_cons, detail::null_type>(); - } -} - -#endif // LUABIND_ADOPT_POLICY_HPP_INCLUDE - diff --git a/luabind/luabind/back_reference.hpp b/luabind/luabind/back_reference.hpp deleted file mode 100644 index 5027618fb..000000000 --- a/luabind/luabind/back_reference.hpp +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) 2004 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef LUABIND_BACK_REFERENCE_040510_HPP -#define LUABIND_BACK_REFERENCE_040510_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace luabind { - -namespace detail -{ - namespace mpl = boost::mpl; - - template - wrap_base const* get_back_reference_aux0(T const* p, mpl::true_) - { - return dynamic_cast(p); - } - - template - wrap_base const* get_back_reference_aux0(T const*, mpl::false_) - { - return 0; - } - - template - wrap_base const* get_back_reference_aux1(T const* p) - { - return get_back_reference_aux0(p, boost::is_polymorphic()); - } - - template - wrap_base const* get_back_reference_aux2(T const& x, mpl::true_) - { - return get_back_reference_aux1(get_pointer(x)); - } - - template - wrap_base const* get_back_reference_aux2(T const& x, mpl::false_) - { - return get_back_reference_aux1(&x); - } - - template - wrap_base const* get_back_reference(T const& x) - { - return detail::get_back_reference_aux2( - x - , has_get_pointer() - ); - } - -} // namespace detail - -template -bool get_back_reference(lua_State* L, T const& x) -{ -#ifndef LUABIND_NO_RTTI - if (wrap_base const* w = detail::get_back_reference(x)) - { - detail::wrap_access::ref(*w).get(L); - return true; - } -#endif - return false; -} - -template -bool move_back_reference(lua_State* L, T const& x) -{ -#ifndef LUABIND_NO_RTTI - if (wrap_base* w = const_cast(detail::get_back_reference(x))) - { - assert(detail::wrap_access::ref(*w).m_strong_ref.is_valid()); - detail::wrap_access::ref(*w).get(L); - detail::wrap_access::ref(*w).m_strong_ref.reset(); - return true; - } -#endif - return false; -} - -} // namespace luabind - -#endif // LUABIND_BACK_REFERENCE_040510_HPP - diff --git a/luabind/luabind/back_reference_fwd.hpp b/luabind/luabind/back_reference_fwd.hpp deleted file mode 100644 index ffe141dba..000000000 --- a/luabind/luabind/back_reference_fwd.hpp +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2004 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef LUABIND_BACK_REFERENCE_FWD_040510_HPP -#define LUABIND_BACK_REFERENCE_FWD_040510_HPP - -namespace luabind { - -template -bool get_back_reference(lua_State* L, T const& x); - -template -bool move_back_reference(lua_State* L, T const& x); - -} // namespace luabind - -#endif // LUABIND_BACK_REFERENCE_FWD_040510_HPP - diff --git a/luabind/luabind/class.hpp b/luabind/luabind/class.hpp deleted file mode 100644 index 10fb8e03d..000000000 --- a/luabind/luabind/class.hpp +++ /dev/null @@ -1,879 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#ifndef LUABIND_CLASS_HPP_INCLUDED -#define LUABIND_CLASS_HPP_INCLUDED - -/* - ISSUES: - ------------------------------------------------------ - - * solved for member functions, not application operator * - if we have a base class that defines a function a derived class must be able to - override that function (not just overload). Right now we just add the other overload - to the overloads list and will probably get an ambiguity. If we want to support this - each method_rep must include a vector of type_info pointers for each parameter. - Operators do not have this problem, since operators always have to have - it's own type as one of the arguments, no ambiguity can occur. Application - operator, on the other hand, would have this problem. - Properties cannot be overloaded, so they should always be overridden. - If this is to work for application operator, we really need to specify if an application - operator is const or not. - - If one class registers two functions with the same name and the same - signature, there's currently no error. The last registered function will - be the one that's used. - How do we know which class registered the function? If the function was - defined by the base class, it is a legal operation, to override it. - we cannot look at the pointer offset, since it always will be zero for one of the bases. - - - - TODO: - ------------------------------------------------------ - - finish smart pointer support - * the adopt policy should not be able to adopt pointers to held_types. This - must be prohibited. - * name_of_type must recognize holder_types and not return "custom" - - document custom policies, custom converters - - store the instance object for policies. - - support the __concat metamethod. This is a bit tricky, since it cannot be - treated as a normal operator. It is a binary operator but we want to use the - __tostring implementation for both arguments. - -*/ - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// to remove the 'this' used in initialization list-warning -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable: 4355) -#endif - -namespace boost -{ - - template class shared_ptr; - -} // namespace boost - -namespace luabind -{ - namespace detail - { - struct unspecified {}; - - template struct operator_; - - struct you_need_to_define_a_get_const_holder_function_for_your_smart_ptr {}; - } - - template - struct class_; - - // TODO: this function will only be invoked if the user hasn't defined a correct overload - // maybe we should have a static assert in here? - inline detail::you_need_to_define_a_get_const_holder_function_for_your_smart_ptr* - get_const_holder(...) - { - return 0; - } - - template - boost::shared_ptr* get_const_holder(boost::shared_ptr*) - { - return 0; - } - - template < - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( - LUABIND_MAX_BASES, class A, detail::null_type) - > - struct bases - {}; - - typedef bases no_bases; - - namespace detail - { - template - struct is_bases - : mpl::false_ - {}; - - template - struct is_bases > - : mpl::true_ - {}; - - template - struct is_unspecified - : mpl::apply1 - {}; - - template - struct is_unspecified - : mpl::true_ - {}; - - template - struct is_unspecified_mfn - { - template - struct apply - : is_unspecified - {}; - }; - - template - struct get_predicate - { - typedef mpl::protect > type; - }; - - template - struct result_or_default - { - typedef Result type; - }; - - template - struct result_or_default - { - typedef Default type; - }; - - template - struct extract_parameter - { - typedef typename get_predicate::type pred; - typedef typename boost::mpl::find_if::type iterator; - typedef typename result_or_default< - typename iterator::type, DefaultValue - >::type type; - }; - - // prints the types of the values on the stack, in the - // range [start_index, lua_gettop()] - - LUABIND_API std::string stack_content_by_name(lua_State* L, int start_index); - - struct LUABIND_API create_class - { - static int stage1(lua_State* L); - static int stage2(lua_State* L); - }; - - } // detail - - namespace detail { - - template - struct static_scope - { - static_scope(T& self_) : self(self_) - { - } - - T& operator[](scope s) const - { - self.add_inner_scope(s); - return self; - } - - private: - template void operator,(U const&) const; - void operator=(static_scope const&); - - T& self; - }; - - struct class_registration; - - struct LUABIND_API class_base : scope - { - public: - class_base(char const* name); - - struct base_desc - { - type_id type; - int ptr_offset; - }; - - void init( - type_id const& type, class_id id - , type_id const& wrapped_type, class_id wrapper_id); - - void add_base(type_id const& base, cast_function cast); - - void add_member(registration* member); - void add_default_member(registration* member); - - const char* name() const; - - void add_static_constant(const char* name, int val); - void add_inner_scope(scope& s); - - void add_cast(class_id src, class_id target, cast_function cast); - - private: - class_registration* m_registration; - }; - -// MSVC complains about member being sensitive to alignment (C4121) -// when F is a pointer to member of a class with virtual bases. -# ifdef BOOST_MSVC -# pragma pack(push) -# pragma pack(16) -# endif - - template - struct memfun_registration : registration - { - memfun_registration(char const* name, F f, Policies const& policies) - : name(name) - , f(f) - , policies(policies) - {} - - void register_(lua_State* L) const - { - object fn = make_function( - L, f, deduce_signature(f, (Class*)0), policies); - - add_overload( - object(from_stack(L, -1)) - , name - , fn - ); - } - - char const* name; - F f; - Policies policies; - }; - -# ifdef BOOST_MSVC -# pragma pack(pop) -# endif - - template - struct default_pointer - { - typedef P type; - }; - - template - struct default_pointer - { - typedef std::auto_ptr type; - }; - - template - struct constructor_registration : registration - { - constructor_registration(Policies const& policies) - : policies(policies) - {} - - void register_(lua_State* L) const - { - typedef typename default_pointer::type pointer; - - object fn = make_function( - L - , construct(), Signature() - , policies - ); - - add_overload( - object(from_stack(L, -1)) - , "__init" - , fn - ); - } - - Policies policies; - }; - - template - struct reference_result - : mpl::if_< - mpl::or_, is_primitive > - , T - , typename boost::add_reference::type - > - {}; - - template - struct inject_dependency_policy - : mpl::if_< - is_primitive - , Policies - , policy_cons, Policies> - > - {}; - - template < - class Class - , class Get, class GetPolicies - , class Set = null_type, class SetPolicies = null_type - > - struct property_registration : registration - { - property_registration( - char const* name - , Get const& get - , GetPolicies const& get_policies - , Set const& set = Set() - , SetPolicies const& set_policies = SetPolicies() - ) - : name(name) - , get(get) - , get_policies(get_policies) - , set(set) - , set_policies(set_policies) - {} - - void register_(lua_State* L) const - { - object context(from_stack(L, -1)); - register_aux( - L - , context - , make_get(L, get, boost::is_member_object_pointer()) - , set - ); - } - - template - object make_get(lua_State* L, F const& f, mpl::false_) const - { - return make_function( - L, f, deduce_signature(f, (Class*)0), get_policies); - } - - template - object make_get(lua_State* L, D T::* mem_ptr, mpl::true_) const - { - typedef typename reference_result::type result_type; - typedef typename inject_dependency_policy< - D, GetPolicies>::type policies; - - return make_function( - L - , access_member_ptr(mem_ptr) - , mpl::vector2() - , policies() - ); - } - - template - object make_set(lua_State* L, F const& f, mpl::false_) const - { - return make_function( - L, f, deduce_signature(f, (Class*)0), set_policies); - } - - template - object make_set(lua_State* L, D T::* mem_ptr, mpl::true_) const - { - return make_function( - L - , access_member_ptr(mem_ptr) - , mpl::vector3() - , set_policies - ); - } - - template - void register_aux( - lua_State* L, object const& context - , object const& get_, S const&) const - { - context[name] = property( - get_ - , make_set(L, set, boost::is_member_object_pointer()) - ); - } - - void register_aux( - lua_State*, object const& context - , object const& get_, null_type) const - { - context[name] = property(get_); - } - - char const* name; - Get get; - GetPolicies get_policies; - Set set; - SetPolicies set_policies; - }; - - } // namespace detail - - // registers a class in the lua environment - template - struct class_: detail::class_base - { - typedef class_ self_t; - - private: - - template - class_(const class_&); - - public: - - typedef boost::mpl::vector4 parameters_type; - - // WrappedType MUST inherit from T - typedef typename detail::extract_parameter< - parameters_type - , boost::is_base_and_derived - , detail::null_type - >::type WrappedType; - - typedef typename detail::extract_parameter< - parameters_type - , boost::mpl::not_< - boost::mpl::or_< - detail::is_bases - , boost::is_base_and_derived - , boost::is_base_and_derived - > - > - , detail::null_type - >::type HeldType; - - template - void add_downcast(Src*, Target*, boost::mpl::true_) - { - add_cast( - detail::registered_class::id - , detail::registered_class::id - , detail::dynamic_cast_::execute - ); - } - - template - void add_downcast(Src*, Target*, boost::mpl::false_) - {} - - // this function generates conversion information - // in the given class_rep structure. It will be able - // to implicitly cast to the given template type - template - void gen_base_info(detail::type_) - { - add_base(typeid(To), detail::static_cast_::execute); - add_cast( - detail::registered_class::id - , detail::registered_class::id - , detail::static_cast_::execute - ); - - add_downcast((To*)0, (T*)0, boost::is_polymorphic()); - } - - void gen_base_info(detail::type_) - {} - -#define LUABIND_GEN_BASE_INFO(z, n, text) gen_base_info(detail::type_()); - - template - void generate_baseclass_list(detail::type_ >) - { - BOOST_PP_REPEAT(LUABIND_MAX_BASES, LUABIND_GEN_BASE_INFO, _) - } - -#undef LUABIND_GEN_BASE_INFO - - class_(const char* name): class_base(name), scope(*this) - { -#ifndef NDEBUG - detail::check_link_compatibility(); -#endif - init(); - } - - template - class_& def(const char* name, F f) - { - return this->virtual_def( - name, f, detail::null_type() - , detail::null_type(), boost::mpl::true_()); - } - - // virtual functions - template - class_& def(char const* name, F fn, DefaultOrPolicies default_or_policies) - { - return this->virtual_def( - name, fn, default_or_policies, detail::null_type() - , LUABIND_MSVC_TYPENAME detail::is_policy_cons::type()); - } - - template - class_& def(char const* name, F fn - , Default default_, Policies const& policies) - { - return this->virtual_def( - name, fn, default_ - , policies, boost::mpl::false_()); - } - - template - class_& def(constructor sig) - { - return this->def_constructor(&sig, detail::null_type()); - } - - template - class_& def(constructor sig, const Policies& policies) - { - return this->def_constructor(&sig, policies); - } - - template - class_& property(const char* name, Getter g) - { - this->add_member( - new detail::property_registration( - name, g, detail::null_type())); - return *this; - } - - template - class_& property(const char* name, Getter g, MaybeSetter s) - { - return property_impl( - name, g, s - , boost::mpl::bool_::value>() - ); - } - - template - class_& property(const char* name, Getter g, Setter s, const GetPolicies& get_policies) - { - typedef detail::property_registration< - T, Getter, GetPolicies, Setter, detail::null_type - > registration_type; - - this->add_member( - new registration_type(name, g, get_policies, s)); - return *this; - } - - template - class_& property( - const char* name - , Getter g, Setter s - , GetPolicies const& get_policies - , SetPolicies const& set_policies) - { - typedef detail::property_registration< - T, Getter, GetPolicies, Setter, SetPolicies - > registration_type; - - this->add_member( - new registration_type(name, g, get_policies, s, set_policies)); - return *this; - } - - template - class_& def_readonly(const char* name, D C::*mem_ptr) - { - typedef detail::property_registration - registration_type; - - this->add_member( - new registration_type(name, mem_ptr, detail::null_type())); - return *this; - } - - template - class_& def_readonly(const char* name, D C::*mem_ptr, Policies const& policies) - { - typedef detail::property_registration - registration_type; - - this->add_member( - new registration_type(name, mem_ptr, policies)); - return *this; - } - - template - class_& def_readwrite(const char* name, D C::*mem_ptr) - { - typedef detail::property_registration< - T, D C::*, detail::null_type, D C::* - > registration_type; - - this->add_member( - new registration_type( - name, mem_ptr, detail::null_type(), mem_ptr)); - return *this; - } - - template - class_& def_readwrite( - const char* name, D C::*mem_ptr, GetPolicies const& get_policies) - { - typedef detail::property_registration< - T, D C::*, GetPolicies, D C::* - > registration_type; - - this->add_member( - new registration_type( - name, mem_ptr, get_policies, mem_ptr)); - return *this; - } - - template - class_& def_readwrite( - const char* name - , D C::*mem_ptr - , GetPolicies const& get_policies - , SetPolicies const& set_policies - ) - { - typedef detail::property_registration< - T, D C::*, GetPolicies, D C::*, SetPolicies - > registration_type; - - this->add_member( - new registration_type( - name, mem_ptr, get_policies, mem_ptr, set_policies)); - return *this; - } - - template - class_& def(detail::operator_, Policies const& policies) - { - return this->def( - Derived::name() - , &Derived::template apply::execute - , policies - ); - } - - template - class_& def(detail::operator_) - { - return this->def( - Derived::name() - , &Derived::template apply::execute - ); - } - - detail::enum_maker enum_(const char*) - { - return detail::enum_maker(*this); - } - - detail::static_scope scope; - - private: - void operator=(class_ const&); - - void add_wrapper_cast(detail::null_type*) - {} - - template - void add_wrapper_cast(U*) - { - add_cast( - detail::registered_class::id - , detail::registered_class::id - , detail::static_cast_::execute - ); - - add_downcast((T*)0, (U*)0, boost::is_polymorphic()); - } - - void init() - { - typedef typename detail::extract_parameter< - parameters_type - , boost::mpl::or_< - detail::is_bases - , boost::is_base_and_derived - > - , no_bases - >::type bases_t; - - typedef typename - boost::mpl::if_ - , bases_t - , bases - >::type Base; - - class_base::init( - typeid(T) - , detail::registered_class::id - , typeid(WrappedType) - , detail::registered_class::id - ); - - add_wrapper_cast((WrappedType*)0); - - generate_baseclass_list(detail::type_()); - } - - template - class_& property_impl(const char* name, - Getter g, - GetPolicies policies, - boost::mpl::bool_) - { - this->add_member( - new detail::property_registration( - name, g, policies)); - return *this; - } - - template - class_& property_impl(const char* name, - Getter g, - Setter s, - boost::mpl::bool_) - { - typedef detail::property_registration< - T, Getter, detail::null_type, Setter, detail::null_type - > registration_type; - - this->add_member( - new registration_type(name, g, detail::null_type(), s)); - return *this; - } - - // these handle default implementation of virtual functions - template - class_& virtual_def(char const* name, F const& fn - , Policies const&, detail::null_type, boost::mpl::true_) - { - this->add_member( - new detail::memfun_registration( - name, fn, Policies())); - return *this; - } - - template - class_& virtual_def(char const* name, F const& fn - , Default const& default_, Policies const&, boost::mpl::false_) - { - this->add_member( - new detail::memfun_registration( - name, fn, Policies())); - - this->add_default_member( - new detail::memfun_registration( - name, default_, Policies())); - - return *this; - } - - template - class_& def_constructor(Signature*, Policies const&) - { - typedef typename Signature::signature signature; - - typedef typename boost::mpl::if_< - boost::is_same - , T - , WrappedType - >::type construct_type; - - this->add_member( - new detail::constructor_registration< - construct_type, HeldType, signature, Policies>( - Policies())); - - this->add_default_member( - new detail::constructor_registration< - construct_type, HeldType, signature, Policies>( - Policies())); - - return *this; - } - }; - -} - -#ifdef _MSC_VER -#pragma warning(pop) -#endif - -#endif // LUABIND_CLASS_HPP_INCLUDED - diff --git a/luabind/luabind/class_info.hpp b/luabind/luabind/class_info.hpp deleted file mode 100644 index a4f18a8cc..000000000 --- a/luabind/luabind/class_info.hpp +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#ifndef LUABIND_CLASS_INFO_HPP_INCLUDED -#define LUABIND_CLASS_INFO_HPP_INCLUDED - -#include -#include -#include -#include - -namespace luabind -{ - struct LUABIND_API class_info - { - std::string name; - object methods; - object attributes; - }; - - LUABIND_API class_info get_class_info(argument const&); - - // returns a table of bound class names - LUABIND_API object get_class_names(lua_State* L); - - LUABIND_API void bind_class_info(lua_State*); -} - -#endif - diff --git a/luabind/luabind/config.hpp b/luabind/luabind/config.hpp deleted file mode 100644 index e8eea875c..000000000 --- a/luabind/luabind/config.hpp +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#ifndef LUABIND_CONFIG_HPP_INCLUDED -#define LUABIND_CONFIG_HPP_INCLUDED - -#include - -#ifdef BOOST_MSVC - #define LUABIND_ANONYMOUS_FIX static -#else - #define LUABIND_ANONYMOUS_FIX -#endif - -#if defined (BOOST_MSVC) && (BOOST_MSVC <= 1200) - -#define for if (false) {} else for - -#include - -namespace std -{ - using ::strlen; - using ::strcmp; - using ::type_info; -} - -#endif - - -#if defined (BOOST_MSVC) && (BOOST_MSVC <= 1300) - #define LUABIND_MSVC_TYPENAME -#else - #define LUABIND_MSVC_TYPENAME typename -#endif - -// the maximum number of arguments of functions that's -// registered. Must at least be 2 -#ifndef LUABIND_MAX_ARITY - #define LUABIND_MAX_ARITY 10 -#elif LUABIND_MAX_ARITY <= 1 - #undef LUABIND_MAX_ARITY - #define LUABIND_MAX_ARITY 2 -#endif - -// the maximum number of classes one class -// can derive from -// max bases must at least be 1 -#ifndef LUABIND_MAX_BASES - #define LUABIND_MAX_BASES 4 -#elif LUABIND_MAX_BASES <= 0 - #undef LUABIND_MAX_BASES - #define LUABIND_MAX_BASES 1 -#endif - -// LUABIND_NO_ERROR_CHECKING -// define this to remove all error checks -// this will improve performance and memory -// footprint. -// if it is defined matchers will only be called on -// overloaded functions, functions that's -// not overloaded will be called directly. The -// parameters on the lua stack are assumed -// to match those of the function. -// exceptions will still be catched when there's -// no error checking. - -// LUABIND_NOT_THREADSAFE -// this define will make luabind non-thread safe. That is, -// it will rely on a static variable. You can still have -// multiple lua states and use coroutines, but only -// one of your real threads may run lua code. - -// LUABIND_NO_EXCEPTIONS -// this define will disable all usage of try, catch and throw in -// luabind. This will in many cases disable runtime-errors, such -// as invalid casts, when calling lua-functions that fails or -// returns values that cannot be converted by the given policy. -// Luabind requires that no function called directly or indirectly -// by luabind throws an exception (throwing exceptions through -// C code has undefined behavior, lua is written in C). - -#ifdef LUABIND_DYNAMIC_LINK -# ifdef BOOST_WINDOWS -# ifdef LUABIND_BUILDING -# define LUABIND_API __declspec(dllexport) -# else -# define LUABIND_API __declspec(dllimport) -# endif -# else -# if defined(_GNUC_) && _GNUC_ >=4 -# define LUABIND_API __attribute__ ((visibility("default"))) -# endif -# endif -#endif - -#ifndef LUABIND_API -# define LUABIND_API -#endif - -namespace luabind { - -LUABIND_API void disable_super_deprecation(); - -} // namespace luabind - -#endif // LUABIND_CONFIG_HPP_INCLUDED - diff --git a/luabind/luabind/container_policy.hpp b/luabind/luabind/container_policy.hpp deleted file mode 100644 index 68ad0a90f..000000000 --- a/luabind/luabind/container_policy.hpp +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#ifndef LUABIND_CONTAINER_POLICY_HPP_INCLUDED -#define LUABIND_CONTAINER_POLICY_HPP_INCLUDED - -#include -#include -#include - -namespace luabind { namespace detail { - - namespace mpl = boost::mpl; - - template - struct container_converter_lua_to_cpp - { - int const consumed_args(...) - { - return 1; - } - - template - T apply(lua_State* L, by_const_reference, int index) - { - typedef typename T::value_type value_type; - - typedef typename find_conversion_policy<1, Policies>::type converter_policy; - typename mpl::apply_wrap2::type converter; - - T container; - - lua_pushnil(L); - while (lua_next(L, index)) - { - container.push_back(converter.apply(L, LUABIND_DECORATE_TYPE(value_type), -1)); - lua_pop(L, 1); // pop value - } - - return container; - } - - template - T apply(lua_State* L, by_value, int index) - { - return apply(L, by_const_reference(), index); - } - - template - static int match(lua_State* L, by_const_reference, int index) - { - if (lua_istable(L, index)) return 0; else return -1; - } - - template - void converter_postcall(lua_State*, T, int) {} - }; - - template - struct container_converter_cpp_to_lua - { - template - void apply(lua_State* L, const T& container) - { - typedef typename T::value_type value_type; - - typedef typename find_conversion_policy<1, Policies>::type converter_policy; - typename mpl::apply_wrap2::type converter; - - lua_newtable(L); - - int index = 1; - - for (typename T::const_iterator i = container.begin(); i != container.end(); ++i) - { - converter.apply(L, *i); - lua_rawseti(L, -2, index); - ++index; - } - } - }; - - template -// struct container_policy : converter_policy_tag - struct container_policy : conversion_policy - { -// BOOST_STATIC_CONSTANT(int, index = N); - - static void precall(lua_State*, const index_map&) {} - static void postcall(lua_State*, const index_map&) {} - - struct only_accepts_nonconst_pointers {}; - - template - struct apply - { - typedef typename boost::mpl::if_ - , container_converter_lua_to_cpp - , container_converter_cpp_to_lua - >::type type; - }; - }; - -}} - -namespace luabind -{ - template - detail::policy_cons, detail::null_type> - container(LUABIND_PLACEHOLDER_ARG(N)) - { - return detail::policy_cons, detail::null_type>(); - } - - template - detail::policy_cons, detail::null_type> - container(LUABIND_PLACEHOLDER_ARG(N), const Policies&) - { - return detail::policy_cons, detail::null_type>(); - } -} - -#endif // LUABIND_CONTAINER_POLICY_HPP_INCLUDED diff --git a/luabind/luabind/copy_policy.hpp b/luabind/luabind/copy_policy.hpp deleted file mode 100644 index 1a18b729b..000000000 --- a/luabind/luabind/copy_policy.hpp +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright Daniel Wallin 2008. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef LUABIND_COPY_POLICY_081021_HPP -# define LUABIND_COPY_POLICY_081021_HPP - -# include - -namespace luabind { - -namespace detail -{ - - struct copy_converter - { - template - void apply(lua_State* L, T const& x) - { - value_converter().apply(L, x); - } - - template - void apply(lua_State* L, T* x) - { - if (!x) - lua_pushnil(L); - else - apply(L, *x); - } - }; - - template - struct copy_policy : conversion_policy - { - static void precall(lua_State*, index_map const&) - {} - - static void postcall(lua_State*, index_map const&) - {} - - template - struct apply - { - typedef copy_converter type; - }; - }; - -} // namespace detail - -template -detail::policy_cons, detail::null_type> -copy(LUABIND_PLACEHOLDER_ARG(N)) -{ - return detail::policy_cons, detail::null_type>(); -} - -} // namespace luabind - -#endif // LUABIND_COPY_POLICY_081021_HPP - diff --git a/luabind/luabind/dependency_policy.hpp b/luabind/luabind/dependency_policy.hpp deleted file mode 100644 index cafa49aa1..000000000 --- a/luabind/luabind/dependency_policy.hpp +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#ifndef LUABIND_DEPENDENCY_POLICY_HPP_INCLUDED -#define LUABIND_DEPENDENCY_POLICY_HPP_INCLUDED - -#include -#include - -namespace luabind { namespace detail -{ - // makes A dependent on B, meaning B will outlive A. - // internally A stores a reference to B - template - struct dependency_policy - { - static void postcall(lua_State* L, const index_map& indices) - { - int nurse_index = indices[A]; - int patient = indices[B]; - - object_rep* nurse = static_cast(lua_touserdata(L, nurse_index)); - - // If the nurse isn't an object_rep, just make this a nop. - if (nurse == 0) - return; - - nurse->add_dependency(L, patient); - } - }; - -}} - -#if defined (BOOST_MSVC) && (BOOST_MSVC <= 1200) - -namespace luabind -{ - // most absurd workaround of all time? - namespace detail - { - template - struct size_char_array - { - char storage[N + 2]; - }; - - template - size_char_array deduce_size(LUABIND_PLACEHOLDER_ARG(N)); - - template - struct get_index_workaround - { - static T t; - BOOST_STATIC_CONSTANT(int, value = sizeof(deduce_size(t)) - 2); - }; - } - - template - detail::policy_cons::value - , detail::get_index_workaround::value>, detail::null_type> dependency(A,B) - { - return detail::policy_cons::value, detail::get_index_workaround::value> - , detail::null_type>(); - } - - template - detail::policy_cons::value>, detail::null_type> - return_internal_reference(A) - { - return detail::policy_cons::value>, detail::null_type>(); - } -} - -#else - -namespace luabind -{ - template - detail::policy_cons, detail::null_type> - dependency(LUABIND_PLACEHOLDER_ARG(A), LUABIND_PLACEHOLDER_ARG(B)) - { - return detail::policy_cons, detail::null_type>(); - } - - template - detail::policy_cons, detail::null_type> - return_internal_reference(LUABIND_PLACEHOLDER_ARG(A)) - { - return detail::policy_cons, detail::null_type>(); - } -} - -#endif - -#endif // LUABIND_DEPENDENCY_POLICY_HPP_INCLUDED - diff --git a/luabind/luabind/detail/calc_arity.hpp b/luabind/luabind/detail/calc_arity.hpp deleted file mode 100644 index c2e0aad91..000000000 --- a/luabind/luabind/detail/calc_arity.hpp +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#if !BOOST_PP_IS_ITERATING - -# include - -#ifndef LUABIND_CALC_ARITY_HPP_INCLUDED -#define LUABIND_CALC_ARITY_HPP_INCLUDED - -#define LUABIND_FIND_CONV(z,n,text) typedef typename find_conversion_policy::type p##n; -#define LUABIND_CALC_ARITY(z,n,text) + BOOST_PP_CAT(p,n)::has_arg - -namespace luabind { namespace detail -{ - template struct calc_arity; - - #define BOOST_PP_ITERATION_PARAMS_1 (4, (0, LUABIND_MAX_ARITY, , 1)) - #include BOOST_PP_ITERATE() -}} - -#undef LUABIND_CALC_ARITY -#undef LUABIND_FIND_CONV - - -#endif // LUABIND_CALC_ARITY_HPP_INCLUDED - -#else // BOOST_PP_ITERATE - - template<> - struct calc_arity - { - template - static int apply(constructor, Policies*) - { - BOOST_PP_REPEAT(BOOST_PP_ITERATION(), LUABIND_FIND_CONV, _) - return 0 BOOST_PP_REPEAT(BOOST_PP_ITERATION(), LUABIND_CALC_ARITY, _); - } - }; - -#endif - diff --git a/luabind/luabind/detail/call.hpp b/luabind/luabind/detail/call.hpp deleted file mode 100644 index cd9402ef3..000000000 --- a/luabind/luabind/detail/call.hpp +++ /dev/null @@ -1,323 +0,0 @@ -// Copyright Daniel Wallin 2008. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#if !BOOST_PP_IS_ITERATING - -# ifndef LUABIND_CALL2_080911_HPP -# define LUABIND_CALL2_080911_HPP - -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include - -# include -# include -# include - -namespace luabind { namespace detail { - -struct invoke_context; - -struct LUABIND_API function_object -{ - function_object(lua_CFunction entry) - : entry(entry) - , next(0) - {} - - virtual ~function_object() - {} - - virtual int call( - lua_State* L, invoke_context& ctx) const = 0; - virtual void format_signature(lua_State* L, char const* function) const = 0; - - lua_CFunction entry; - std::string name; - function_object* next; - object keepalive; -}; - -struct LUABIND_API invoke_context -{ - invoke_context() - : best_score((std::numeric_limits::max)()) - , candidate_index(0) - {} - - operator bool() const - { - return candidate_index == 1; - } - - void format_error(lua_State* L, function_object const* overloads) const; - - int best_score; - function_object const* candidates[10]; - int candidate_index; -}; - -template -inline int invoke0( - lua_State* L, function_object const& self, invoke_context& ctx - , F const& f, Signature, Policies const& policies, IsVoid, mpl::true_) -{ - return invoke_member( - L, self, ctx, f, Signature(), policies - , mpl::long_::value - 1>(), IsVoid() - ); -} - -template -inline int invoke0( - lua_State* L, function_object const& self, invoke_context& ctx, - F const& f, Signature, Policies const& policies, IsVoid, mpl::false_) -{ - return invoke_normal( - L, self, ctx, f, Signature(), policies - , mpl::long_::value - 1>(), IsVoid() - ); -} - -template -inline int invoke( - lua_State* L, function_object const& self, invoke_context& ctx - , F const& f, Signature, Policies const& policies) -{ - return invoke0( - L, self, ctx, f, Signature(), policies - , boost::is_void::type>() - , boost::is_member_function_pointer() - ); -} - -inline int maybe_yield_aux(lua_State*, int results, mpl::false_) -{ - return results; -} - -inline int maybe_yield_aux(lua_State* L, int results, mpl::true_) -{ - return lua_yield(L, results); -} - -template -int maybe_yield(lua_State* L, int results, Policies*) -{ - return maybe_yield_aux( - L, results, mpl::bool_::value>()); -} - -inline int sum_scores(int const* first, int const* last) -{ - int result = 0; - - for (; first != last; ++first) - { - if (*first < 0) - return *first; - result += *first; - } - - return result; -} - -# define LUABIND_INVOKE_NEXT_ITER(n) \ - typename mpl::next< \ - BOOST_PP_IF( \ - n, BOOST_PP_CAT(iter,BOOST_PP_DEC(n)), first) \ - >::type - -# define LUABIND_INVOKE_NEXT_INDEX(n) \ - BOOST_PP_IF( \ - n \ - , BOOST_PP_CAT(index,BOOST_PP_DEC(n)) + \ - BOOST_PP_CAT(c,BOOST_PP_DEC(n)).consumed_args() \ - , 1 \ - ) - -# define LUABIND_INVOKE_COMPUTE_ARITY(n) + BOOST_PP_CAT(c,n).consumed_args() - -# define LUABIND_INVOKE_DECLARE_CONVERTER(n) \ - typedef LUABIND_INVOKE_NEXT_ITER(n) BOOST_PP_CAT(iter,n); \ - typedef typename mpl::deref::type \ - BOOST_PP_CAT(a,n); \ - typedef typename find_conversion_policy::type \ - BOOST_PP_CAT(p,n); \ - typename mpl::apply_wrap2< \ - BOOST_PP_CAT(p,n), BOOST_PP_CAT(a,n), lua_to_cpp>::type BOOST_PP_CAT(c,n); \ - int const BOOST_PP_CAT(index,n) = LUABIND_INVOKE_NEXT_INDEX(n); - -# define LUABIND_INVOKE_COMPUTE_SCORE(n) \ - , BOOST_PP_CAT(c,n).match( \ - L, LUABIND_DECORATE_TYPE(BOOST_PP_CAT(a,n)), BOOST_PP_CAT(index,n)) - -# define LUABIND_INVOKE_ARG(z, n, base) \ - BOOST_PP_CAT(c,base(n)).apply( \ - L, LUABIND_DECORATE_TYPE(BOOST_PP_CAT(a,base(n))), BOOST_PP_CAT(index,base(n))) - -# define LUABIND_INVOKE_CONVERTER_POSTCALL(n) \ - BOOST_PP_CAT(c,n).converter_postcall( \ - L, LUABIND_DECORATE_TYPE(BOOST_PP_CAT(a,n)), BOOST_PP_CAT(index,n)); - -# define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (0, LUABIND_MAX_ARITY, )) -# include BOOST_PP_ITERATE() - -# define LUABIND_INVOKE_VOID -# define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (0, LUABIND_MAX_ARITY, )) -# include BOOST_PP_ITERATE() - -# undef LUABIND_INVOKE_VOID -# define LUABIND_INVOKE_MEMBER -# define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (0, LUABIND_MAX_ARITY, )) -# include BOOST_PP_ITERATE() - -# define LUABIND_INVOKE_VOID -# define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (0, LUABIND_MAX_ARITY, )) -# include BOOST_PP_ITERATE() - -}} // namespace luabind::detail - -# endif // LUABIND_CALL2_080911_HPP - -#else // BOOST_PP_IS_ITERATING - -# ifdef LUABIND_INVOKE_MEMBER -# define N BOOST_PP_INC(BOOST_PP_ITERATION()) -# else -# define N BOOST_PP_ITERATION() -# endif - -template -inline int -# ifdef LUABIND_INVOKE_MEMBER -invoke_member -# else -invoke_normal -# endif -( - lua_State* L, function_object const& self, invoke_context& ctx - , F const& f, Signature, Policies const&, mpl::long_ -# ifdef LUABIND_INVOKE_VOID - , mpl::true_ -# else - , mpl::false_ -# endif -) -{ - typedef typename mpl::begin::type first; -# ifndef LUABIND_INVOKE_VOID - typedef typename mpl::deref::type result_type; - typedef typename find_conversion_policy<0, Policies>::type result_policy; - typename mpl::apply_wrap2< - result_policy, result_type, cpp_to_lua>::type result_converter; -# endif - -# if N > 0 -# define BOOST_PP_LOCAL_MACRO(n) LUABIND_INVOKE_DECLARE_CONVERTER(n) -# define BOOST_PP_LOCAL_LIMITS (0,N-1) -# include BOOST_PP_LOCAL_ITERATE() -# endif - - int const arity = 0 -# if N > 0 -# define BOOST_PP_LOCAL_MACRO(n) LUABIND_INVOKE_COMPUTE_ARITY(n) -# define BOOST_PP_LOCAL_LIMITS (0,N-1) -# include BOOST_PP_LOCAL_ITERATE() -# endif - ; - - int const arguments = lua_gettop(L); - - int score = -1; - - if (arity == arguments) - { - int const scores[] = { - 0 -# if N > 0 -# define BOOST_PP_LOCAL_MACRO(n) LUABIND_INVOKE_COMPUTE_SCORE(n) -# define BOOST_PP_LOCAL_LIMITS (0,N-1) -# include BOOST_PP_LOCAL_ITERATE() -# endif - }; - - score = sum_scores(scores + 1, scores + 1 + N); - } - - if (score >= 0 && score < ctx.best_score) - { - ctx.best_score = score; - ctx.candidates[0] = &self; - ctx.candidate_index = 1; - } - else if (score == ctx.best_score) - { - ctx.candidates[ctx.candidate_index++] = &self; - } - - int results = 0; - - if (self.next) - { - results = self.next->call(L, ctx); - } - - if (score == ctx.best_score && ctx.candidate_index == 1) - { -# ifndef LUABIND_INVOKE_VOID - result_converter.apply( - L, -# endif -# ifdef LUABIND_INVOKE_MEMBER - (c0.apply(L, LUABIND_DECORATE_TYPE(a0), index0).*f)( - BOOST_PP_ENUM(BOOST_PP_DEC(N), LUABIND_INVOKE_ARG, BOOST_PP_INC) - ) -# else -# define LUABIND_INVOKE_IDENTITY(x) x - f( - BOOST_PP_ENUM(N, LUABIND_INVOKE_ARG, LUABIND_INVOKE_IDENTITY) - ) -# undef LUABIND_INVOKE_IDENTITY -# endif -# ifndef LUABIND_INVOKE_VOID - ) -# endif - ; - -# if N > 0 -# define BOOST_PP_LOCAL_MACRO(n) LUABIND_INVOKE_CONVERTER_POSTCALL(n) -# define BOOST_PP_LOCAL_LIMITS (0,N-1) -# include BOOST_PP_LOCAL_ITERATE() -# endif - - results = maybe_yield(L, lua_gettop(L) - arguments, (Policies*)0); - - int const indices[] = { - arguments + results BOOST_PP_ENUM_TRAILING_PARAMS(N, index) - }; - - policy_list_postcall::apply(L, indices); - } - - return results; -} - -# undef N - -#endif - diff --git a/luabind/luabind/detail/call_function.hpp b/luabind/luabind/detail/call_function.hpp deleted file mode 100644 index e3ac2b761..000000000 --- a/luabind/luabind/detail/call_function.hpp +++ /dev/null @@ -1,442 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#if !BOOST_PP_IS_ITERATING - -#ifndef LUABIND_CALL_FUNCTION_HPP_INCLUDED -#define LUABIND_CALL_FUNCTION_HPP_INCLUDED - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -namespace luabind -{ - namespace detail - { - - // if the proxy_function_caller returns non-void - template - class proxy_function_caller - { -// friend class luabind::object; - public: - - typedef int(*function_t)(lua_State*, int, int); - - proxy_function_caller( - lua_State* L - , int params - , function_t fun - , const Tuple args) - : m_state(L) - , m_params(params) - , m_fun(fun) - , m_args(args) - , m_called(false) - { - } - - proxy_function_caller(const proxy_function_caller& rhs) - : m_state(rhs.m_state) - , m_params(rhs.m_params) - , m_fun(rhs.m_fun) - , m_args(rhs.m_args) - , m_called(rhs.m_called) - { - rhs.m_called = true; - } - - ~proxy_function_caller() - { - if (m_called) return; - - m_called = true; - lua_State* L = m_state; - - int top = lua_gettop(L); - - push_args_from_tuple<1>::apply(L, m_args); - if (m_fun(L, boost::tuples::length::value, 0)) - { - assert(lua_gettop(L) == top - m_params + 1); -#ifndef LUABIND_NO_EXCEPTIONS - throw luabind::error(L); -#else - error_callback_fun e = get_error_callback(); - if (e) e(L); - - assert(0 && "the lua function threw an error and exceptions are disabled." - " If you want to handle the error you can use luabind::set_error_callback()"); - std::terminate(); - -#endif - } - - // pops the return values from the function call - stack_pop pop(L, lua_gettop(L) - top + m_params); - } - - operator Ret() - { - typename mpl::apply_wrap2::type converter; - - m_called = true; - lua_State* L = m_state; - - int top = lua_gettop(L); - - push_args_from_tuple<1>::apply(L, m_args); - if (m_fun(L, boost::tuples::length::value, 1)) - { - assert(lua_gettop(L) == top - m_params + 1); -#ifndef LUABIND_NO_EXCEPTIONS - throw luabind::error(L); -#else - error_callback_fun e = get_error_callback(); - if (e) e(L); - - assert(0 && "the lua function threw an error and exceptions are disabled." - " If you want to handle the error you can use luabind::set_error_callback()"); - std::terminate(); -#endif - } - - // pops the return values from the function call - stack_pop pop(L, lua_gettop(L) - top + m_params); - -#ifndef LUABIND_NO_ERROR_CHECKING - - if (converter.match(L, LUABIND_DECORATE_TYPE(Ret), -1) < 0) - { -#ifndef LUABIND_NO_EXCEPTIONS - throw cast_failed(L, typeid(Ret)); -#else - cast_failed_callback_fun e = get_cast_failed_callback(); - if (e) e(L, typeid(Ret)); - - assert(0 && "the lua function's return value could not be converted." - " If you want to handle the error you can use luabind::set_error_callback()"); - std::terminate(); - -#endif - } -#endif - return converter.apply(L, LUABIND_DECORATE_TYPE(Ret), -1); - } - - template - Ret operator[](const Policies& p) - { - typedef typename detail::find_conversion_policy<0, Policies>::type converter_policy; - typename mpl::apply_wrap2::type converter; - - m_called = true; - lua_State* L = m_state; - - int top = lua_gettop(L); - - detail::push_args_from_tuple<1>::apply(L, m_args, p); - if (m_fun(L, boost::tuples::length::value, 1)) - { - assert(lua_gettop(L) == top - m_params + 1); -#ifndef LUABIND_NO_EXCEPTIONS - throw error(L); -#else - error_callback_fun e = get_error_callback(); - if (e) e(L); - - assert(0 && "the lua function threw an error and exceptions are disabled." - " If you want to handle the error you can use luabind::set_error_callback()"); - std::terminate(); -#endif - } - - // pops the return values from the function call - stack_pop pop(L, lua_gettop(L) - top + m_params); - -#ifndef LUABIND_NO_ERROR_CHECKING - - if (converter.match(L, LUABIND_DECORATE_TYPE(Ret), -1) < 0) - { -#ifndef LUABIND_NO_EXCEPTIONS - throw cast_failed(L, typeid(Ret)); -#else - cast_failed_callback_fun e = get_cast_failed_callback(); - if (e) e(L, typeid(Ret)); - - assert(0 && "the lua function's return value could not be converted." - " If you want to handle the error you can use luabind::set_error_callback()"); - std::terminate(); - -#endif - } -#endif - return converter.apply(L, LUABIND_DECORATE_TYPE(Ret), -1); - } - - private: - - lua_State* m_state; - int m_params; - function_t m_fun; - Tuple m_args; - mutable bool m_called; - - }; - - // if the proxy_member_caller returns void - template - class proxy_function_void_caller - { - friend class luabind::object; - public: - - typedef int(*function_t)(lua_State*, int, int); - - proxy_function_void_caller( - lua_State* L - , int params - , function_t fun - , const Tuple args) - : m_state(L) - , m_params(params) - , m_fun(fun) - , m_args(args) - , m_called(false) - { - } - - proxy_function_void_caller(const proxy_function_void_caller& rhs) - : m_state(rhs.m_state) - , m_params(rhs.m_params) - , m_fun(rhs.m_fun) - , m_args(rhs.m_args) - , m_called(rhs.m_called) - { - rhs.m_called = true; - } - - ~proxy_function_void_caller() - { - if (m_called) return; - - m_called = true; - lua_State* L = m_state; - - int top = lua_gettop(L); - - push_args_from_tuple<1>::apply(L, m_args); - if (m_fun(L, boost::tuples::length::value, 0)) - { - assert(lua_gettop(L) == top - m_params + 1); -#ifndef LUABIND_NO_EXCEPTIONS - throw luabind::error(L); -#else - error_callback_fun e = get_error_callback(); - if (e) e(L); - - assert(0 && "the lua function threw an error and exceptions are disabled." - " If you want to handle the error you can use luabind::set_error_callback()"); - std::terminate(); -#endif - } - // pops the return values from the function call - stack_pop pop(L, lua_gettop(L) - top + m_params); - } - - template - void operator[](const Policies& p) - { - m_called = true; - lua_State* L = m_state; - - int top = lua_gettop(L); - - detail::push_args_from_tuple<1>::apply(L, m_args, p); - if (m_fun(L, boost::tuples::length::value, 0)) - { - assert(lua_gettop(L) == top - m_params + 1); -#ifndef LUABIND_NO_EXCEPTIONS - throw error(L); -#else - error_callback_fun e = get_error_callback(); - if (e) e(L); - - assert(0 && "the lua function threw an error and exceptions are disabled." - " If you want to handle the error you can use luabind::set_error_callback()"); - std::terminate(); -#endif - } - // pops the return values from the function call - stack_pop pop(L, lua_gettop(L) - top + m_params); - } - - private: - - lua_State* m_state; - int m_params; - function_t m_fun; - Tuple m_args; - mutable bool m_called; - - }; - - } - - #define BOOST_PP_ITERATION_PARAMS_1 (4, (0, LUABIND_MAX_ARITY, , 1)) - #include BOOST_PP_ITERATE() - -} - -#endif // LUABIND_CALL_FUNCTION_HPP_INCLUDED - -#else -#if BOOST_PP_ITERATION_FLAGS() == 1 - -#define LUABIND_TUPLE_PARAMS(z, n, data) const A##n * -#define LUABIND_OPERATOR_PARAMS(z, n, data) const A##n & a##n - - - template - typename boost::mpl::if_ - , luabind::detail::proxy_function_void_caller > - , luabind::detail::proxy_function_caller > >::type - call_function(lua_State* L, const char* name BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM(BOOST_PP_ITERATION(), LUABIND_OPERATOR_PARAMS, _) ) - { - assert(name && "luabind::call_function() expects a function name"); - typedef boost::tuples::tuple tuple_t; -#if BOOST_PP_ITERATION() == 0 - tuple_t args; -#else - tuple_t args(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), &a)); -#endif - typedef typename boost::mpl::if_ - , luabind::detail::proxy_function_void_caller > - , luabind::detail::proxy_function_caller > >::type proxy_type; - - lua_getglobal(L, name); - - return proxy_type(L, 1, &detail::pcall, args); - } - - template - typename boost::mpl::if_ - , luabind::detail::proxy_function_void_caller > - , luabind::detail::proxy_function_caller > >::type - call_function(luabind::object const& obj BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM(BOOST_PP_ITERATION(), LUABIND_OPERATOR_PARAMS, _) ) - { - typedef boost::tuples::tuple tuple_t; -#if BOOST_PP_ITERATION() == 0 - tuple_t args; -#else - tuple_t args(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), &a)); -#endif - typedef typename boost::mpl::if_ - , luabind::detail::proxy_function_void_caller > - , luabind::detail::proxy_function_caller > >::type proxy_type; - - obj.push(obj.interpreter()); - return proxy_type(obj.interpreter(), 1, &detail::pcall, args); - } - - template - typename boost::mpl::if_ - , luabind::detail::proxy_function_void_caller > - , luabind::detail::proxy_function_caller > >::type - resume_function(lua_State* L, const char* name BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM(BOOST_PP_ITERATION(), LUABIND_OPERATOR_PARAMS, _) ) - { - assert(name && "luabind::resume_function() expects a function name"); - typedef boost::tuples::tuple tuple_t; -#if BOOST_PP_ITERATION() == 0 - tuple_t args; -#else - tuple_t args(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), &a)); -#endif - typedef typename boost::mpl::if_ - , luabind::detail::proxy_function_void_caller > - , luabind::detail::proxy_function_caller > >::type proxy_type; - - lua_getglobal(L, name); - - return proxy_type(L, 1, &detail::resume_impl, args); - } - - template - typename boost::mpl::if_ - , luabind::detail::proxy_function_void_caller > - , luabind::detail::proxy_function_caller > >::type - resume_function(luabind::object const& obj BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM(BOOST_PP_ITERATION(), LUABIND_OPERATOR_PARAMS, _) ) - { - typedef boost::tuples::tuple tuple_t; -#if BOOST_PP_ITERATION() == 0 - tuple_t args; -#else - tuple_t args(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), &a)); -#endif - typedef typename boost::mpl::if_ - , luabind::detail::proxy_function_void_caller > - , luabind::detail::proxy_function_caller > >::type proxy_type; - - obj.push(obj.interpreter()); - return proxy_type(obj.interpreter(), 1, &detail::resume_impl, args); - } - - template - typename boost::mpl::if_ - , luabind::detail::proxy_function_void_caller > - , luabind::detail::proxy_function_caller > >::type - resume(lua_State* L BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM(BOOST_PP_ITERATION(), LUABIND_OPERATOR_PARAMS, _) ) - { - typedef boost::tuples::tuple tuple_t; -#if BOOST_PP_ITERATION() == 0 - tuple_t args; -#else - tuple_t args(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), &a)); -#endif - typedef typename boost::mpl::if_ - , luabind::detail::proxy_function_void_caller > - , luabind::detail::proxy_function_caller > >::type proxy_type; - - return proxy_type(L, 0, &detail::resume_impl, args); - } - - -#undef LUABIND_OPERATOR_PARAMS -#undef LUABIND_TUPLE_PARAMS - -#endif -#endif - diff --git a/luabind/luabind/detail/call_member.hpp b/luabind/luabind/detail/call_member.hpp deleted file mode 100644 index e63555bc6..000000000 --- a/luabind/luabind/detail/call_member.hpp +++ /dev/null @@ -1,365 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#if !BOOST_PP_IS_ITERATING - -#ifndef LUABIND_CALL_MEMBER_HPP_INCLUDED -#define LUABIND_CALL_MEMBER_HPP_INCLUDED - -#include -#include -#include -#include -#include -#include // TODO: REMOVE DEPENDENCY - -#include - -#include -#include -#include - -#include - -namespace luabind -{ - namespace detail - { - - namespace mpl = boost::mpl; - - // if the proxy_member_caller returns non-void - template - class proxy_member_caller - { -// friend class luabind::object; - public: - - proxy_member_caller(lua_State* L_, const Tuple args) - : L(L_) - , m_args(args) - , m_called(false) - { - } - - proxy_member_caller(const proxy_member_caller& rhs) - : L(rhs.L) - , m_args(rhs.m_args) - , m_called(rhs.m_called) - { - rhs.m_called = true; - } - - ~proxy_member_caller() - { - if (m_called) return; - - m_called = true; - - // don't count the function and self-reference - // since those will be popped by pcall - int top = lua_gettop(L) - 2; - - // pcall will pop the function and self reference - // and all the parameters - - push_args_from_tuple<1>::apply(L, m_args); - if (pcall(L, boost::tuples::length::value + 1, 0)) - { - assert(lua_gettop(L) == top + 1); -#ifndef LUABIND_NO_EXCEPTIONS - throw luabind::error(L); -#else - error_callback_fun e = get_error_callback(); - if (e) e(L); - - assert(0 && "the lua function threw an error and exceptions are disabled." - "If you want to handle this error use luabind::set_error_callback()"); - std::terminate(); -#endif - } - // pops the return values from the function - stack_pop pop(L, lua_gettop(L) - top); - } - - operator Ret() - { - typename mpl::apply_wrap2::type converter; - - m_called = true; - - // don't count the function and self-reference - // since those will be popped by pcall - int top = lua_gettop(L) - 2; - - // pcall will pop the function and self reference - // and all the parameters - push_args_from_tuple<1>::apply(L, m_args); - if (pcall(L, boost::tuples::length::value + 1, 1)) - { - assert(lua_gettop(L) == top + 1); -#ifndef LUABIND_NO_EXCEPTIONS - throw luabind::error(L); -#else - error_callback_fun e = get_error_callback(); - if (e) e(L); - - assert(0 && "the lua function threw an error and exceptions are disabled." - "If you want to handle this error use luabind::set_error_callback()"); - std::terminate(); -#endif - } - - // pops the return values from the function - stack_pop pop(L, lua_gettop(L) - top); - -#ifndef LUABIND_NO_ERROR_CHECKING - - if (converter.match(L, LUABIND_DECORATE_TYPE(Ret), -1) < 0) - { - assert(lua_gettop(L) == top + 1); -#ifndef LUABIND_NO_EXCEPTIONS - throw cast_failed(L, typeid(Ret)); -#else - cast_failed_callback_fun e = get_cast_failed_callback(); - if (e) e(L, typeid(Ret)); - - assert(0 && "the lua function's return value could not be converted." - "If you want to handle this error use luabind::set_error_callback()"); - std::terminate(); -#endif - } -#endif - return converter.apply(L, LUABIND_DECORATE_TYPE(Ret), -1); - } - - template - Ret operator[](const Policies& p) - { - typedef typename find_conversion_policy<0, Policies>::type converter_policy; - typename mpl::apply_wrap2::type converter; - - m_called = true; - - // don't count the function and self-reference - // since those will be popped by pcall - int top = lua_gettop(L) - 2; - - // pcall will pop the function and self reference - // and all the parameters - - detail::push_args_from_tuple<1>::apply(L, m_args, p); - if (pcall(L, boost::tuples::length::value + 1, 1)) - { - assert(lua_gettop(L) == top + 1); -#ifndef LUABIND_NO_EXCEPTIONS - throw error(L); -#else - error_callback_fun e = get_error_callback(); - if (e) e(L); - - assert(0 && "the lua function threw an error and exceptions are disabled." - "If you want to handle this error use luabind::set_error_callback()"); - std::terminate(); -#endif - } - - // pops the return values from the function - stack_pop pop(L, lua_gettop(L) - top); - -#ifndef LUABIND_NO_ERROR_CHECKING - - if (converter.match(L, LUABIND_DECORATE_TYPE(Ret), -1) < 0) - { - assert(lua_gettop(L) == top + 1); -#ifndef LUABIND_NO_EXCEPTIONS - throw cast_failed(L, typeid(Ret)); -#else - cast_failed_callback_fun e = get_cast_failed_callback(); - if (e) e(L, typeid(Ret)); - - assert(0 && "the lua function's return value could not be converted." - "If you want to handle this error use luabind::set_error_callback()"); - std::terminate(); -#endif - } -#endif - return converter.apply(L, LUABIND_DECORATE_TYPE(Ret), -1); - } - - private: - - lua_State* L; - Tuple m_args; - mutable bool m_called; - - }; - - // if the proxy_member_caller returns void - template - class proxy_member_void_caller - { - friend class luabind::object; - public: - - proxy_member_void_caller(lua_State* L_, const Tuple args) - : L(L_) - , m_args(args) - , m_called(false) - { - } - - proxy_member_void_caller(const proxy_member_void_caller& rhs) - : L(rhs.L) - , m_args(rhs.m_args) - , m_called(rhs.m_called) - { - rhs.m_called = true; - } - - ~proxy_member_void_caller() - { - if (m_called) return; - - m_called = true; - - // don't count the function and self-reference - // since those will be popped by pcall - int top = lua_gettop(L) - 2; - - // pcall will pop the function and self reference - // and all the parameters - - push_args_from_tuple<1>::apply(L, m_args); - if (pcall(L, boost::tuples::length::value + 1, 0)) - { - assert(lua_gettop(L) == top + 1); -#ifndef LUABIND_NO_EXCEPTIONS - throw luabind::error(L); -#else - error_callback_fun e = get_error_callback(); - if (e) e(L); - - assert(0 && "the lua function threw an error and exceptions are disabled." - "If you want to handle this error use luabind::set_error_callback()"); - std::terminate(); -#endif - } - // pops the return values from the function - stack_pop pop(L, lua_gettop(L) - top); - } - - template - void operator[](const Policies& p) - { - m_called = true; - - // don't count the function and self-reference - // since those will be popped by pcall - int top = lua_gettop(L) - 2; - - // pcall will pop the function and self reference - // and all the parameters - - detail::push_args_from_tuple<1>::apply(L, m_args, p); - if (pcall(L, boost::tuples::length::value + 1, 0)) - { - assert(lua_gettop(L) == top + 1); -#ifndef LUABIND_NO_EXCEPTIONS - throw error(L); -#else - error_callback_fun e = get_error_callback(); - if (e) e(L); - - assert(0 && "the lua function threw an error and exceptions are disabled." - "If you want to handle this error use luabind::set_error_callback()"); - std::terminate(); -#endif - } - // pops the return values from the function - stack_pop pop(L, lua_gettop(L) - top); - } - - private: - lua_State* L; - Tuple m_args; - mutable bool m_called; - - }; - - } // detail - - #define BOOST_PP_ITERATION_PARAMS_1 (4, (0, LUABIND_MAX_ARITY, , 1)) - #include BOOST_PP_ITERATE() - -} - -#endif // LUABIND_CALL_MEMBER_HPP_INCLUDED - -#else -#if BOOST_PP_ITERATION_FLAGS() == 1 - -#define LUABIND_TUPLE_PARAMS(z, n, data) const A##n * -#define LUABIND_OPERATOR_PARAMS(z, n, data) const A##n & a##n - - template - typename boost::mpl::if_ - , luabind::detail::proxy_member_void_caller > - , luabind::detail::proxy_member_caller > >::type - call_member(object const& obj, const char* name BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM(BOOST_PP_ITERATION(), LUABIND_OPERATOR_PARAMS, _)) - { - typedef boost::tuples::tuple tuple_t; -#if BOOST_PP_ITERATION() == 0 - tuple_t args; -#else - tuple_t args(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), &a)); -#endif - - typedef typename boost::mpl::if_ - , luabind::detail::proxy_member_void_caller > - , luabind::detail::proxy_member_caller > >::type proxy_type; - - // this will be cleaned up by the proxy object - // once the call has been made - - // get the function - obj.push(obj.interpreter()); - lua_pushstring(obj.interpreter(), name); - lua_gettable(obj.interpreter(), -2); - // duplicate the self-object - lua_pushvalue(obj.interpreter(), -2); - // remove the bottom self-object - lua_remove(obj.interpreter(), -3); - - // now the function and self objects - // are on the stack. These will both - // be popped by pcall - return proxy_type(obj.interpreter(), args); - } - -#undef LUABIND_OPERATOR_PARAMS -#undef LUABIND_TUPLE_PARAMS - -#endif -#endif - diff --git a/luabind/luabind/detail/call_operator_iterate.hpp b/luabind/luabind/detail/call_operator_iterate.hpp deleted file mode 100644 index c6f95a10c..000000000 --- a/luabind/luabind/detail/call_operator_iterate.hpp +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2004 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#define N BOOST_PP_ITERATION() - -#define LUABIND_UNWRAP_PARAMETER(z, n, _) \ - typename detail::unwrap_parameter_type::type \ - BOOST_PP_CAT(_, n) - -template -struct BOOST_PP_CAT(call_operator, N) - : detail::operator_< - BOOST_PP_CAT(call_operator, N)< - Self BOOST_PP_ENUM_TRAILING_PARAMS(N, A) - > - > -{ - BOOST_PP_CAT(call_operator, N)(int) {} - - template - struct apply - { - static void execute( - lua_State* L - , typename detail::unwrap_parameter_type::type self - BOOST_PP_ENUM_TRAILING(N, LUABIND_UNWRAP_PARAMETER, _) - ) - { - using namespace detail; - operator_result( - L -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) - , self(BOOST_PP_ENUM_PARAMS(N, _)) -#else - , (self(BOOST_PP_ENUM_PARAMS(N, _)), detail::operator_void_return()) -#endif - , (Policies*)0 - ); - } - }; - - static char const* name() { return "__call"; } -}; - -#undef LUABIND_UNWRAP_PARAMETER -#undef N - diff --git a/luabind/luabind/detail/class_cache.hpp b/luabind/luabind/detail/class_cache.hpp deleted file mode 100644 index f49687c30..000000000 --- a/luabind/luabind/detail/class_cache.hpp +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) 2004 Daniel Wallin - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef CLASS_CACHE_040218_HPP -#define CLASS_CACHE_040218_HPP - -#include -#include -#include - -namespace luabind { namespace detail { - -#ifdef LUABIND_NOT_THREADSAFE - - class class_rep; - - template - struct class_cache_impl - { - static lua_State* state; - static class_rep* class_; - }; - - template - lua_State* class_cache_impl::state = 0; - - template - class_rep* class_cache_impl::class_ = 0; - - template - struct class_cache - : class_cache_impl< - typename boost::add_reference< - typename boost::add_const< - T - >::type - >::type - > - { - }; - - template - class_rep* get_class_rep(lua_State* L, void(*)(T*) = 0) - { - if (class_cache::state != L) - { - class_cache::state = L; - - class_registry* registry = class_registry::get_registry(L); - class_cache::class_ = registry->find_class(typeid(T)); - } - - return class_cache::class_; - } - -#else - - template - class_rep* get_class_rep(lua_State* L, void(*)(T*) = 0) - { - class_registry* registry = class_registry::get_registry(L); - return registry->find_class(typeid(T)); - } - -#endif - -}} // namespace luabind::detail - -#endif // CLASS_CACHE_040218_HPP - diff --git a/luabind/luabind/detail/class_registry.hpp b/luabind/luabind/detail/class_registry.hpp deleted file mode 100644 index 12ed03cfe..000000000 --- a/luabind/luabind/detail/class_registry.hpp +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#ifndef LUABIND_CLASS_REGISTRY_HPP_INCLUDED -#define LUABIND_CLASS_REGISTRY_HPP_INCLUDED - -#include - -#include -#include -#include - -namespace luabind { namespace detail -{ - class class_rep; - - struct LUABIND_API class_registry - { - class_registry(lua_State* L); - - static class_registry* get_registry(lua_State* L); - - int cpp_instance() const { return m_instance_metatable; } - int cpp_class() const { return m_cpp_class_metatable; } - - int lua_instance() const { return m_instance_metatable; } - int lua_class() const { return m_lua_class_metatable; } - int lua_function() const { return m_lua_function_metatable; } - - void add_class(type_id const& info, class_rep* crep); - - class_rep* find_class(type_id const& info) const; - - std::map const& get_classes() const - { - return m_classes; - } - - private: - - std::map m_classes; - - // this is a lua reference that points to the lua table - // that is to be used as meta table for all C++ class - // instances. It is a kind of v-table. - int m_instance_metatable; - - // this is a lua reference to the metatable to be used - // for all classes defined in C++. - int m_cpp_class_metatable; - - // this is a lua reference to the metatable to be used - // for all classes defined in lua - int m_lua_class_metatable; - - // this metatable only contains a destructor - // for luabind::Detail::free_functions::function_rep - int m_lua_function_metatable; - - }; - -}} - -#endif // LUABIND_CLASS_REGISTRY_HPP_INCLUDED - diff --git a/luabind/luabind/detail/class_rep.hpp b/luabind/luabind/detail/class_rep.hpp deleted file mode 100644 index aa5e866d3..000000000 --- a/luabind/luabind/detail/class_rep.hpp +++ /dev/null @@ -1,213 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#ifndef LUABIND_CLASS_REP_HPP_INCLUDED -#define LUABIND_CLASS_REP_HPP_INCLUDED - -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace luabind { namespace detail -{ - - LUABIND_API std::string stack_content_by_name(lua_State* L, int start_index); - - struct class_registration; - - struct conversion_storage; - - // This function is used as a tag to identify "properties". - LUABIND_API int property_tag(lua_State*); - - // this is class-specific information, poor man's vtable - // this is allocated statically (removed by the compiler) - // a pointer to this structure is stored in the lua tables' - // metatable with the name __classrep - // it is used when matching parameters to function calls - // to determine possible implicit casts - // it is also used when finding the best match for overloaded - // methods - - class cast_graph; - class class_id_map; - - class LUABIND_API class_rep - { - friend struct class_registration; - friend int super_callback(lua_State*); -//TODO: avoid the lua-prefix - friend int lua_class_gettable(lua_State*); - friend int lua_class_settable(lua_State*); - friend int static_class_gettable(lua_State*); - public: - - enum class_type - { - cpp_class = 0, - lua_class = 1 - }; - - // EXPECTS THE TOP VALUE ON THE LUA STACK TO - // BE THE USER DATA WHERE THIS CLASS IS BEING - // INSTANTIATED! - class_rep(type_id const& type - , const char* name - , lua_State* L - ); - - // used when creating a lua class - // EXPECTS THE TOP VALUE ON THE LUA STACK TO - // BE THE USER DATA WHERE THIS CLASS IS BEING - // INSTANTIATED! - class_rep(lua_State* L, const char* name); - - ~class_rep(); - - std::pair allocate(lua_State* L) const; - - // this is called as metamethod __call on the class_rep. - static int constructor_dispatcher(lua_State* L); - - struct base_info - { - int pointer_offset; // the offset added to the pointer to obtain a basepointer (due to multiple-inheritance) - class_rep* base; - }; - - void add_base_class(const base_info& binfo); - - const std::vector& bases() const throw() { return m_bases; } - - void set_type(type_id const& t) { m_type = t; } - type_id const& type() const throw() { return m_type; } - - const char* name() const throw() { return m_name; } - - // the lua reference to the metatable for this class' instances - int metatable_ref() const throw() { return m_instance_metatable; } - - void get_table(lua_State* L) const { m_table.push(L); } - void get_default_table(lua_State* L) const { m_default_table.push(L); } - - class_type get_class_type() const { return m_class_type; } - - void add_static_constant(const char* name, int val); - - static int super_callback(lua_State* L); - - static int lua_settable_dispatcher(lua_State* L); - - // called from the metamethod for __index - // obj is the object pointer - static int static_class_gettable(lua_State* L); - - bool has_operator_in_lua(lua_State*, int id); - - cast_graph const& casts() const - { - return *m_casts; - } - - class_id_map const& classes() const - { - return *m_classes; - } - - private: - - void cache_operators(lua_State*); - - // this is a pointer to the type_info structure for - // this type - // warning: this may be a problem when using dll:s, since - // typeid() may actually return different pointers for the same - // type. - type_id m_type; - - // a list of info for every class this class derives from - // the information stored here is sufficient to do - // type casts to the base classes - std::vector m_bases; - - // the class' name (as given when registered to lua with class_) - const char* m_name; - - // a reference to this structure itself. Since this struct - // is kept inside lua (to let lua collect it when lua_close() - // is called) we need to lock it to prevent collection. - // the actual reference is not currently used. - detail::lua_reference m_self_ref; - - // this should always be used when accessing - // members in instances of a class. - // this table contains c closures for all - // member functions in this class, they - // may point to both static and virtual functions - handle m_table; - - // this table contains default implementations of the - // virtual functions in m_table. - handle m_default_table; - - // the type of this class.. determines if it's written in c++ or lua - class_type m_class_type; - - // this is a lua reference that points to the lua table - // that is to be used as meta table for all instances - // of this class. - int m_instance_metatable; - - std::map m_static_constants; - - // the first time an operator is invoked - // we check the associated lua table - // and cache the result - int m_operator_cache; - - cast_graph* m_casts; - class_id_map* m_classes; - }; - - bool is_class_rep(lua_State* L, int index); - -}} - -//#include - -#endif // LUABIND_CLASS_REP_HPP_INCLUDED diff --git a/luabind/luabind/detail/compute_score.hpp b/luabind/luabind/detail/compute_score.hpp deleted file mode 100644 index c9a7e9ea1..000000000 --- a/luabind/luabind/detail/compute_score.hpp +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright Daniel Wallin 2008. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef LUABIND_COMPUTE_RANK_081006_HPP -# define LUABIND_COMPUTE_RANK_081006_HPP - -# include -# include -# include -# include -# include -# include - -namespace luabind { namespace detail { - -namespace mpl = boost::mpl; - -template -int compute_score_aux( - lua_State*L, int index, Idx, Iter, End end, Policies const& policies) -{ - typedef typename Iter::type arg_type; - typedef typename find_conversion_policy::type - conversion_policy; - typedef typename mpl::apply_wrap2< - conversion_policy, arg_type, lua_to_cpp>::type converter; - - int score = converter::match(L, LUABIND_DECORATE_TYPE(arg_type), index); - - if (score < 0) - return score; - - if (conversion_policy::has_arg) - ++index; - - int next = compute_score_aux( - L - , index - , typename mpl::next::type() - , typename mpl::next::type() - , end - , policies - ); - - if (next < 0) - return next; - - return score + next; -} - -template -int compute_score_aux(lua_State*, int, Idx, End, End, Policies const&) -{ - return 0; -} - -template -int compute_score(lua_State* L, Signature, Policies const& policies) -{ - return compute_score_aux( - L - , 1 - , mpl::int_<1>() - , typename mpl::next::type>::type() - , typename mpl::end::type() - , policies - ); -} - -}} // namespace luabind::detail - -#endif // LUABIND_COMPUTE_RANK_081006_HPP diff --git a/luabind/luabind/detail/constructor.hpp b/luabind/luabind/detail/constructor.hpp deleted file mode 100644 index 1cbceb789..000000000 --- a/luabind/luabind/detail/constructor.hpp +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright Daniel Wallin 2008. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#if !BOOST_PP_IS_ITERATING - -# ifndef LUABIND_DETAIL_CONSTRUCTOR_081018_HPP -# define LUABIND_DETAIL_CONSTRUCTOR_081018_HPP - -# include -# include -# include -# include - -# include -# include -# include -# include - -namespace luabind { namespace detail { - -inline void inject_backref(lua_State*, void*, void*) -{} - -template -void inject_backref(lua_State* L, T* p, wrap_base*) -{ - weak_ref(get_main_thread(L), L, 1).swap(wrap_access::ref(*p)); -} - -template -struct construct_aux; - -template -struct construct - : construct_aux::value - 2, T, Pointer, Signature> -{}; - -template -struct construct_aux<0, T, Pointer, Signature> -{ - typedef pointer_holder holder_type; - - void operator()(argument const& self_) const - { - object_rep* self = touserdata(self_); - class_rep* cls = self->crep(); - - std::auto_ptr instance(new T); - inject_backref(self_.interpreter(), instance.get(), instance.get()); - - void* naked_ptr = instance.get(); - Pointer ptr(instance.release()); - - void* storage = self->allocate(sizeof(holder_type)); - - self->set_instance(new (storage) holder_type( - ptr, registered_class::id, naked_ptr, cls)); - } -}; - -# define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (1, LUABIND_MAX_ARITY, )) -# include BOOST_PP_ITERATE() - -}} // namespace luabind::detail - -# endif // LUABIND_DETAIL_CONSTRUCTOR_081018_HPP - -#else // !BOOST_PP_IS_ITERATING - -# define N BOOST_PP_ITERATION() - -template -struct construct_aux -{ - typedef typename mpl::begin::type first; - typedef typename mpl::next::type iter0; - -# define BOOST_PP_LOCAL_MACRO(n) \ - typedef typename mpl::next< \ - BOOST_PP_CAT(iter,BOOST_PP_DEC(n))>::type BOOST_PP_CAT(iter,n); \ - typedef typename BOOST_PP_CAT(iter,n)::type BOOST_PP_CAT(a,BOOST_PP_DEC(n)); - -# define BOOST_PP_LOCAL_LIMITS (1,N) -# include BOOST_PP_LOCAL_ITERATE() - - typedef pointer_holder holder_type; - - void operator()(argument const& self_, BOOST_PP_ENUM_BINARY_PARAMS(N,a,_)) const - { - object_rep* self = touserdata(self_); - class_rep* cls = self->crep(); - - std::auto_ptr instance(new T(BOOST_PP_ENUM_PARAMS(N,_))); - inject_backref(self_.interpreter(), instance.get(), instance.get()); - - void* naked_ptr = instance.get(); - Pointer ptr(instance.release()); - - void* storage = self->allocate(sizeof(holder_type)); - - self->set_instance(new (storage) holder_type( - ptr, registered_class::id, naked_ptr, cls)); - } -}; - -# undef N - -#endif - diff --git a/luabind/luabind/detail/conversion_storage.hpp b/luabind/luabind/detail/conversion_storage.hpp deleted file mode 100644 index 153112d62..000000000 --- a/luabind/luabind/detail/conversion_storage.hpp +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright Daniel Wallin 2008. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef LUABIND_CONVERSION_STORAGE_080930_HPP -# define LUABIND_CONVERSION_STORAGE_080930_HPP - -# include -# include - -namespace luabind { namespace detail { - -typedef void(*destruction_function)(void*); - -// This is used by the converters in policy.hpp, and -// class_rep::convert_to as temporary storage when constructing -// holders. - -struct conversion_storage -{ - conversion_storage() - : destructor(0) - {} - - ~conversion_storage() - { - if (destructor) - destructor(&data); - } - - // Unfortunately the converters currently doesn't have access to - // the actual type being converted when this is instantiated, so - // we have to guess a max size. - boost::aligned_storage<128> data; - destruction_function destructor; -}; - -}} // namespace luabind::detail - -#endif // LUABIND_CONVERSION_STORAGE_080930_HPP - diff --git a/luabind/luabind/detail/convert_to_lua.hpp b/luabind/luabind/detail/convert_to_lua.hpp deleted file mode 100644 index f5aa89aea..000000000 --- a/luabind/luabind/detail/convert_to_lua.hpp +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#ifndef LUABIND_CONVERT_TO_LUA_HPP_INCLUDED -#define LUABIND_CONVERT_TO_LUA_HPP_INCLUDED - -#include -#include -#include - -#include - -namespace luabind { namespace detail -{ - template - struct unwrap_ref - { - template - static const T& get(const T& r) { return r; } - - template - struct apply - { - typedef T type; - }; - }; - - template<> - struct unwrap_ref - { - template - static T& get(const boost::reference_wrapper& r) { return r.get(); } - - template - struct apply - { - typedef typename T::type& type; - }; - }; - - namespace mpl = boost::mpl; - - template - void convert_to_lua(lua_State* L, const T& v) - { - typedef typename mpl::apply_wrap1< - unwrap_ref::value> - , T - >::type value_type; - - typename mpl::apply_wrap2::type converter; - - converter.apply(L, unwrap_ref::value>::get(v)); - } - - template - void convert_to_lua_p(lua_State* L, const T& v, const Policies&) - { - typedef typename mpl::apply_wrap1< - unwrap_ref::value> - , T - >::type value_type; - - typedef typename find_conversion_policy::type converter_policy; - typename mpl::apply_wrap2::type converter; - - converter.apply(L, unwrap_ref::value>::get(v)); - } -}} - -#endif - diff --git a/luabind/luabind/detail/debug.hpp b/luabind/luabind/detail/debug.hpp deleted file mode 100644 index ef13bc886..000000000 --- a/luabind/luabind/detail/debug.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef LUABIND_DEBUG_HPP_INCLUDED -#define LUABIND_DEBUG_HPP_INCLUDED - -#ifndef NDEBUG - -#include -#include - -namespace luabind { namespace detail -{ - struct stack_checker_type - { - stack_checker_type(lua_State* L) - : m_L(L) - , m_stack(lua_gettop(m_L)) - {} - - ~stack_checker_type() - { - assert(m_stack == lua_gettop(m_L)); - } - - lua_State* m_L; - int m_stack; - }; - -}} -#define LUABIND_CHECK_STACK(L) luabind::detail::stack_checker_type stack_checker_object(L) -#else -#define LUABIND_CHECK_STACK(L) do {} while (0) -#endif - -#endif // LUABIND_DEBUG_HPP_INCLUDED diff --git a/luabind/luabind/detail/decorate_type.hpp b/luabind/luabind/detail/decorate_type.hpp deleted file mode 100644 index bb144c463..000000000 --- a/luabind/luabind/detail/decorate_type.hpp +++ /dev/null @@ -1,266 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#ifndef LUABIND_DECORATE_TYPE_HPP_INCLUDED -#define LUABIND_DECORATE_TYPE_HPP_INCLUDED - -#include -#include - -namespace luabind { namespace detail -{ - -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - - template - struct decorated_type - { - static by_value t; - static inline by_value& get() { return /*by_value()*/t; } - }; - - template - by_value decorated_type::t; - - template - struct decorated_type - { - static by_pointer t; - static inline by_pointer& get() { return /*by_pointer()*/t; } - }; - - template - by_pointer decorated_type::t; - - template - struct decorated_type - { - static by_const_pointer t; - static inline by_const_pointer get() { return /*by_const_pointer()*/t; } - }; - - template - by_const_pointer decorated_type::t; - - template - struct decorated_type - { - static by_const_pointer t; - static inline by_const_pointer& get() { return /*by_const_pointer()*/t; } - }; - - template - by_const_pointer decorated_type::t; - - template - struct decorated_type - { - static by_reference t; - static inline by_reference& get() { return /*by_reference()*/t; } - }; - - template - by_reference decorated_type::t; - - template - struct decorated_type - { - static by_const_reference t; - static inline by_const_reference& get() { return /*by_const_reference()*/t; } - }; - - template - by_const_reference decorated_type::t; - - #define LUABIND_DECORATE_TYPE(t) luabind::detail::decorated_type::get() - -#else - -#include - - namespace - { - LUABIND_ANONYMOUS_FIX char decorated_type_array[64]; - } - - template - struct decorated_type_cref_impl - { -#if defined(BOOST_MSVC) && BOOST_MSVC == 1200 - template - static by_const_reference get(const U&) - { - return by_const_reference(); - } - static T data() { return reinterpret_cast(decorated_type_array); } -#else - - static void(*data())(T) - { return (void(*)(T))0; } - - template - static by_const_reference get(void(*f)(const U&)) - { return by_const_reference(); } -#endif - }; - - template - struct decorated_type_ref_impl - { -#if defined(BOOST_MSVC) && BOOST_MSVC == 1200 - template - static by_reference get(U&) - { - return by_reference(); - } - static T data() { return reinterpret_cast(decorated_type_array); } -#else - static void(*data())(T) - { return (void(*)(T))0; } - - template - static by_reference get(void(*)(U&)) - { return by_reference(); } -#endif - }; - - template - struct decorated_type_cptr_impl - { -#if defined(BOOST_MSVC) && BOOST_MSVC == 1200 - template - static by_const_pointer get(const U*) - { - return by_const_pointer(); - } - static T& data() { return reinterpret_cast(decorated_type_array); } -#else - static void(*data())(T) - { return (void(*)(T))0; } - - template - static by_const_pointer get(void(*)(const U*)) - { return by_const_pointer(); } -#endif - }; - - template - struct decorated_type_ptr_impl - { -#if defined(BOOST_MSVC) && BOOST_MSVC == 1200 - template - static by_pointer get(U*) - { - return by_pointer(); - } - static T& data() { return reinterpret_cast(decorated_type_array); } -#else - static void(*data())(T) - { return (void(*)(T))0; } - - template - static by_pointer get(void(*)(U*)) - { return by_pointer(); } -#endif - }; - - template - struct decorated_type_value_impl - { -#if defined(BOOST_MSVC) && BOOST_MSVC == 1200 - template - static by_value get(U&) - { - return by_value(); - } - static T& data() { return reinterpret_cast(decorated_type_array); } -#else - static void(*data())(T&) - { return (void(*)(T&))0; } - - template - static by_value get(void(*)(U&)) - { return by_value(); } -#endif - }; - - template<> - struct decorated_type_value_impl - { - static by_value get(int) - { - return by_value(); - } - static int data() { return 0; } - }; - - template - struct decorated_type_array_impl - { - template - static by_pointer get(U*) - { - return by_pointer(); - } - - template - static by_pointer get(void(*)(U)) - { return by_pointer(); } - - static T& data() { return reinterpret_cast(decorated_type_array); } - }; - - template - struct decorated_type -// : boost::mpl::if_ -// , decorated_type_array_impl - : boost::mpl::if_ - , decorated_type_cref_impl - , typename boost::mpl::if_ - , decorated_type_ref_impl - , typename boost::mpl::if_ - , decorated_type_ptr_impl - , typename boost::mpl::if_ - , decorated_type_cptr_impl - , decorated_type_value_impl - >::type - >::type - >::type - >::type -// >::type - { - }; - -#if defined(BOOST_MSVC) && BOOST_MSVC == 1200 - #define LUABIND_DECORATE_TYPE(t) luabind::detail::decorated_type::get(luabind::detail::decorated_type::data()) -#else -// #define LUABIND_DECORATE_TYPE(t) luabind::detail::decorated_type::get((void(*)(type))0) - #define LUABIND_DECORATE_TYPE(t) luabind::detail::decorated_type::get(luabind::detail::decorated_type::data()) - //#define LUABIND_DECORATE_TYPE(t) luabind::detail::decorated_type::get(type()) -#endif - -#endif - -}} - -#endif // LUABIND_DECORATE_TYPE_HPP_INCLUDED diff --git a/luabind/luabind/detail/deduce_signature.hpp b/luabind/luabind/detail/deduce_signature.hpp deleted file mode 100644 index e47e22f4e..000000000 --- a/luabind/luabind/detail/deduce_signature.hpp +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright Daniel Wallin 2008. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#if !BOOST_PP_IS_ITERATING - -# ifndef LUABIND_DEDUCE_SIGNATURE_080911_HPP -# define LUABIND_DEDUCE_SIGNATURE_080911_HPP - -# include - -# if LUABIND_MAX_ARITY <= 8 -# include -# else -# include -# endif -# include -# include -# include - -namespace luabind { namespace detail { - -namespace mpl = boost::mpl; - -template -mpl::vector1 deduce_signature(R(*)(), ...) -{ - return mpl::vector1(); -} - -template -mpl::vector2 deduce_signature(R(T::*)()) -{ - return mpl::vector2(); -} - -template -mpl::vector2::type&> -deduce_signature(R(T::*)(), Wrapped*) -{ - return mpl::vector2::type&>(); -} - -template -mpl::vector2 deduce_signature(R(T::*)() const) -{ - return mpl::vector2(); -} - -template -mpl::vector2::type const&> -deduce_signature(R(T::*)() const, Wrapped*) -{ - return mpl::vector2::type const&>(); -} - -# define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (1, LUABIND_MAX_ARITY, )) -# include BOOST_PP_ITERATE() - -}} // namespace luabind::detail - -# endif // LUABIND_DEDUCE_SIGNATURE_080911_HPP - -#else // BOOST_PP_IS_ITERATING - -# define N BOOST_PP_ITERATION() -# define NPLUS1 BOOST_PP_INC(N) - -template -BOOST_PP_CAT(mpl::vector,NPLUS1) -deduce_signature(R(*)(BOOST_PP_ENUM_PARAMS(N,A)), ...) -{ - return BOOST_PP_CAT(mpl::vector,NPLUS1)(); -} - -# define NPLUS2 BOOST_PP_INC(NPLUS1) - -template -BOOST_PP_CAT(mpl::vector,NPLUS2) -deduce_signature(R(T::*)(BOOST_PP_ENUM_PARAMS(N,A))) -{ - return BOOST_PP_CAT(mpl::vector,NPLUS2)(); -} - -template -BOOST_PP_CAT(mpl::vector,NPLUS2)< - R, typename most_derived::type&, BOOST_PP_ENUM_PARAMS(N,A) -> -deduce_signature(R(T::*)(BOOST_PP_ENUM_PARAMS(N,A)), Wrapped*) -{ - return BOOST_PP_CAT(mpl::vector,NPLUS2)< - R,typename most_derived::type&,BOOST_PP_ENUM_PARAMS(N,A)>(); -} - -template -BOOST_PP_CAT(mpl::vector,NPLUS2) -deduce_signature(R(T::*)(BOOST_PP_ENUM_PARAMS(N,A)) const) -{ - return BOOST_PP_CAT(mpl::vector,NPLUS2)(); -} - -template -BOOST_PP_CAT(mpl::vector,NPLUS2)< - R, typename most_derived::type const&, BOOST_PP_ENUM_PARAMS(N,A) -> -deduce_signature(R(T::*)(BOOST_PP_ENUM_PARAMS(N,A)) const, Wrapped*) -{ - return BOOST_PP_CAT(mpl::vector,NPLUS2)< - R,typename most_derived::type const&,BOOST_PP_ENUM_PARAMS(N,A)>(); -} - -# undef NPLUS2 -# undef NPLUS1 -# undef N - -#endif // BOOST_PP_IS_ITERATING - diff --git a/luabind/luabind/detail/enum_maker.hpp b/luabind/luabind/detail/enum_maker.hpp deleted file mode 100644 index fadbe3e52..000000000 --- a/luabind/luabind/detail/enum_maker.hpp +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#ifndef LUABIND_ENUM_MAKER_HPP_INCLUDED -#define LUABIND_ENUM_MAKER_HPP_INCLUDED - -#include -#include - -#include -#include - -namespace luabind -{ - struct value; - - struct value_vector : public std::vector - { - // a bug in intel's compiler forces us to declare these constructors explicitly. - value_vector(); - virtual ~value_vector(); - value_vector(const value_vector& v); - value_vector& operator,(const value& rhs); - }; - - struct value - { - friend class std::vector; - template - value(const char* name, T v) - : name_(name) - , val_(v) - {} - - const char* name_; - int val_; - - value_vector operator,(const value& rhs) const - { - value_vector v; - - v.push_back(*this); - v.push_back(rhs); - - return v; - } - - private: - - value() {} - }; - - inline value_vector::value_vector() - : std::vector() - { - } - - inline value_vector::~value_vector() {} - - inline value_vector::value_vector(const value_vector& rhs) - : std::vector(rhs) - { - } - - inline value_vector& value_vector::operator,(const value& rhs) - { - push_back(rhs); - return *this; - } - - namespace detail - { - template - struct enum_maker - { - explicit enum_maker(From& from): from_(from) {} - - From& operator[](const value& val) - { - from_.add_static_constant(val.name_, val.val_); - return from_; - } - - From& operator[](const value_vector& values) - { - for (value_vector::const_iterator i = values.begin(); i != values.end(); ++i) - { - from_.add_static_constant(i->name_, i->val_); - } - - return from_; - } - - From& from_; - - private: - void operator=(enum_maker const&); // C4512, assignment operator could not be generated - template void operator,(T const&) const; - }; - } -} - -#endif // LUABIND_ENUM_MAKER_HPP_INCLUDED diff --git a/luabind/luabind/detail/format_signature.hpp b/luabind/luabind/detail/format_signature.hpp deleted file mode 100644 index ec56b6196..000000000 --- a/luabind/luabind/detail/format_signature.hpp +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright Daniel Wallin 2008. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef LUABIND_FORMAT_SIGNATURE_081014_HPP -# define LUABIND_FORMAT_SIGNATURE_081014_HPP - -# include -# include -# include - -# include -# include -# include - -namespace luabind { namespace adl { - - class object; - class argument; - template - struct table; -} // namespace adl - -using adl::object; -using adl::argument; -using adl::table; - -} // namespace luabind - -namespace luabind { namespace detail { - -LUABIND_API std::string get_class_name(lua_State* L, type_id const& i); - -template -struct type_to_string -{ - static void get(lua_State* L) - { - lua_pushstring(L, get_class_name(L, typeid(T)).c_str()); - } -}; - -template -struct type_to_string -{ - static void get(lua_State* L) - { - type_to_string::get(L); - lua_pushstring(L, "*"); - lua_concat(L, 2); - } -}; - -template -struct type_to_string -{ - static void get(lua_State* L) - { - type_to_string::get(L); - lua_pushstring(L, "&"); - lua_concat(L, 2); - } -}; - -template -struct type_to_string -{ - static void get(lua_State* L) - { - type_to_string::get(L); - lua_pushstring(L, " const"); - lua_concat(L, 2); - } -}; - -# define LUABIND_TYPE_TO_STRING(x) \ - template <> \ - struct type_to_string \ - { \ - static void get(lua_State* L) \ - { \ - lua_pushstring(L, #x); \ - } \ - }; - -# define LUABIND_INTEGRAL_TYPE_TO_STRING(x) \ - LUABIND_TYPE_TO_STRING(x) \ - LUABIND_TYPE_TO_STRING(unsigned x) - -LUABIND_INTEGRAL_TYPE_TO_STRING(char) -LUABIND_INTEGRAL_TYPE_TO_STRING(short) -LUABIND_INTEGRAL_TYPE_TO_STRING(int) -LUABIND_INTEGRAL_TYPE_TO_STRING(long) - -LUABIND_TYPE_TO_STRING(void) -LUABIND_TYPE_TO_STRING(bool) -LUABIND_TYPE_TO_STRING(std::string) -LUABIND_TYPE_TO_STRING(lua_State) - -LUABIND_TYPE_TO_STRING(luabind::object) -LUABIND_TYPE_TO_STRING(luabind::argument) - -# undef LUABIND_INTEGRAL_TYPE_TO_STRING -# undef LUABIND_TYPE_TO_STRING - -template -struct type_to_string > -{ - static void get(lua_State* L) - { - lua_pushstring(L, "table"); - } -}; - -template -void format_signature_aux(lua_State*, bool, End, End) -{} - -template -void format_signature_aux(lua_State* L, bool first, Iter, End end) -{ - if (!first) - lua_pushstring(L, ","); - type_to_string::get(L); - format_signature_aux(L, false, typename mpl::next::type(), end); -} - -template -void format_signature(lua_State* L, char const* function, Signature) -{ - typedef typename mpl::begin::type first; - - type_to_string::get(L); - - lua_pushstring(L, " "); - lua_pushstring(L, function); - - lua_pushstring(L, "("); - format_signature_aux( - L - , true - , typename mpl::next::type() - , typename mpl::end::type() - ); - lua_pushstring(L, ")"); - - lua_concat(L, static_cast(mpl::size()) * 2 + 2); -} - -}} // namespace luabind::detail - -#endif // LUABIND_FORMAT_SIGNATURE_081014_HPP - diff --git a/luabind/luabind/detail/garbage_collector.hpp b/luabind/luabind/detail/garbage_collector.hpp deleted file mode 100644 index c0d68aa36..000000000 --- a/luabind/luabind/detail/garbage_collector.hpp +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#ifndef LUABIND_GARBAGE_COLLECTOR_HPP_INCLUDED -#define LUABIND_GARBAGE_COLLECTOR_HPP_INCLUDED - -#include - -namespace luabind { namespace detail -{ - // function that is used as __gc metafunction on several objects - template - inline int garbage_collector(lua_State* L) - { - T* obj = static_cast(lua_touserdata(L, -1)); - obj->~T(); - return 0; - } - - template - struct garbage_collector_s - { - static int apply(lua_State* L) - { - T* obj = static_cast(lua_touserdata(L, -1)); - obj->~T(); - return 0; - } - }; - -}} - -#endif // LUABIND_GARBAGE_COLLECTOR_HPP_INCLUDED diff --git a/luabind/luabind/detail/has_get_pointer.hpp b/luabind/luabind/detail/has_get_pointer.hpp deleted file mode 100644 index 8a001ddda..000000000 --- a/luabind/luabind/detail/has_get_pointer.hpp +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) 2005 Daniel Wallin - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef LUABIND_HAS_GET_POINTER_051022_HPP -# define LUABIND_HAS_GET_POINTER_051022_HPP - -# include - -# ifndef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP -# include -# endif - -namespace luabind { namespace detail { - -namespace has_get_pointer_ -{ - - struct any - { - template any(T const&); - }; - - struct no_overload_tag - {}; - - typedef char (&yes)[1]; - typedef char (&no)[2]; - - no_overload_tag operator,(no_overload_tag, int); - -// -// On compilers with ADL, we need these generic overloads in this -// namespace as well as in luabind::. Otherwise get_pointer(any) -// will be found before them. -// -# ifndef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP - - template - T* get_pointer(T const volatile*); - - template - T* get_pointer(std::auto_ptr const&); - -# endif - -// -// On compilers that doesn't support ADL, the overload below has to -// live in luabind::. -// -# ifdef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP -}} // namespace detail::has_get_pointer_ -# endif - -detail::has_get_pointer_::no_overload_tag - get_pointer(detail::has_get_pointer_::any); - -# ifdef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP -namespace detail { namespace has_get_pointer_ -{ -# endif - - template - yes check(T const&); - no check(no_overload_tag); - - template - struct impl - { - static typename boost::add_reference::type x; - - BOOST_STATIC_CONSTANT(bool, - value = sizeof(has_get_pointer_::check( (get_pointer(x),0) )) == 1 - ); - - typedef boost::mpl::bool_ type; - }; - -} // namespace has_get_pointer_ - -template -struct has_get_pointer - : has_get_pointer_::impl::type -{}; - -}} // namespace luabind::detail - -#endif // LUABIND_HAS_GET_POINTER_051022_HPP - diff --git a/luabind/luabind/detail/inheritance.hpp b/luabind/luabind/detail/inheritance.hpp deleted file mode 100644 index a7afe0156..000000000 --- a/luabind/luabind/detail/inheritance.hpp +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright Daniel Wallin 2009. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef LUABIND_INHERITANCE_090217_HPP -# define LUABIND_INHERITANCE_090217_HPP - -# include -# include -# include -# include -# include -# include -# include - -namespace luabind { namespace detail { - -typedef void*(*cast_function)(void*); -typedef std::size_t class_id; - -class_id const unknown_class = (std::numeric_limits::max)(); - -class class_rep; - -class LUABIND_API cast_graph -{ -public: - cast_graph(); - ~cast_graph(); - - // `src` and `p` here describe the *most derived* object. This means that - // for a polymorphic type, the pointer must be cast with - // dynamic_cast before being passed in here, and `src` has to - // match typeid(*p). - std::pair cast( - void* p, class_id src, class_id target - , class_id dynamic_id, void const* dynamic_ptr) const; - void insert(class_id src, class_id target, cast_function cast); - -private: - class impl; - boost::scoped_ptr m_impl; -}; - -// Maps a type_id to a class_id. Note that this actually partitions the -// id-space into two, using one half for "local" ids; ids that are used only as -// keys into the conversion cache. This is needed because we need a unique key -// even for types that hasn't been registered explicitly. -class LUABIND_API class_id_map -{ -public: - class_id_map(); - - class_id get(type_id const& type) const; - class_id get_local(type_id const& type); - void put(class_id id, type_id const& type); - -private: - typedef std::map map_type; - map_type m_classes; - class_id m_local_id; - - static class_id const local_id_base; -}; - -inline class_id_map::class_id_map() - : m_local_id(local_id_base) -{} - -inline class_id class_id_map::get(type_id const& type) const -{ - map_type::const_iterator i = m_classes.find(type); - if (i == m_classes.end() || i->second >= local_id_base) - return unknown_class; - return i->second; -} - -inline class_id class_id_map::get_local(type_id const& type) -{ - std::pair result = m_classes.insert( - std::make_pair(type, 0)); - - if (result.second) - result.first->second = m_local_id++; - - assert(m_local_id >= local_id_base); - - return result.first->second; -} - -inline void class_id_map::put(class_id id, type_id const& type) -{ - assert(id < local_id_base); - - std::pair result = m_classes.insert( - std::make_pair(type, 0)); - - assert( - result.second - || result.first->second == id - || result.first->second >= local_id_base - ); - - result.first->second = id; -} - -class class_map -{ -public: - class_rep* get(class_id id) const; - void put(class_id id, class_rep* cls); - -private: - std::vector m_classes; -}; - -inline class_rep* class_map::get(class_id id) const -{ - if (id >= m_classes.size()) - return 0; - return m_classes[id]; -} - -inline void class_map::put(class_id id, class_rep* cls) -{ - if (id >= m_classes.size()) - m_classes.resize(id + 1); - m_classes[id] = cls; -} - -template -struct static_cast_ -{ - static void* execute(void* p) - { - return static_cast(static_cast(p)); - } -}; - -template -struct dynamic_cast_ -{ - static void* execute(void* p) - { - return dynamic_cast(static_cast(p)); - } -}; - -// Thread safe class_id allocation. -LUABIND_API class_id allocate_class_id(type_id const& cls); - -template -struct registered_class -{ - static class_id const id; -}; - -template -class_id const registered_class::id = allocate_class_id(typeid(T)); - -template -struct registered_class - : registered_class -{}; - -}} // namespace luabind::detail - -#endif // LUABIND_INHERITANCE_090217_HPP diff --git a/luabind/luabind/detail/instance_holder.hpp b/luabind/luabind/detail/instance_holder.hpp deleted file mode 100644 index 456e13e6b..000000000 --- a/luabind/luabind/detail/instance_holder.hpp +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright Daniel Wallin 2008. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef LUABIND_INSTANCE_HOLDER_081024_HPP -# define LUABIND_INSTANCE_HOLDER_081024_HPP - -# include -# include // TODO -# include -# include -# include -# include - -namespace luabind { namespace detail { - -class instance_holder -{ -public: - instance_holder(class_rep* cls, bool pointee_const) - : m_cls(cls) - , m_pointee_const(pointee_const) - {} - - virtual ~instance_holder() - {} - - virtual std::pair get(class_id target) const = 0; - - virtual void release() = 0; - - class_rep* get_class() const - { - return m_cls; - } - - bool pointee_const() const - { - return m_pointee_const; - } - -private: - class_rep* m_cls; - bool m_pointee_const; -}; - -namespace mpl = boost::mpl; - -inline mpl::false_ check_const_pointer(void*) -{ - return mpl::false_(); -} - -inline mpl::true_ check_const_pointer(void const*) -{ - return mpl::true_(); -} - -template -void release_ownership(std::auto_ptr& p) -{ - p.release(); -} - -template -void release_ownership(P const&) -{ - throw std::runtime_error( - "luabind: smart pointer does not allow ownership transfer"); -} - -template -class_id static_class_id(T*) -{ - return registered_class::id; -} - -template -class pointer_holder : public instance_holder -{ -public: - pointer_holder( - P p, class_id dynamic_id, void* dynamic_ptr, class_rep* cls - ) - : instance_holder(cls, check_const_pointer(false ? get_pointer(p) : 0)) - , p(p) - , weak(0) - , dynamic_id(dynamic_id) - , dynamic_ptr(dynamic_ptr) - {} - - std::pair get(class_id target) const - { - if (target == registered_class

::id) - return std::pair(&this->p, 0); - - void* naked_ptr = const_cast(static_cast( - weak ? weak : get_pointer(p))); - - if (!naked_ptr) - return std::pair((void*)0, 0); - - return get_class()->casts().cast( - naked_ptr - , static_class_id(false ? get_pointer(p) : 0) - , target - , dynamic_id - , dynamic_ptr - ); - } - - void release() - { - weak = const_cast(static_cast( - get_pointer(p))); - release_ownership(p); - } - -private: - mutable P p; - // weak will hold a possibly stale pointer to the object owned - // by p once p has released it's owership. This is a workaround - // to make adopt() work with virtual function wrapper classes. - void* weak; - class_id dynamic_id; - void* dynamic_ptr; -}; - -}} // namespace luabind::detail - -#endif // LUABIND_INSTANCE_HOLDER_081024_HPP diff --git a/luabind/luabind/detail/is_indirect_const.hpp b/luabind/luabind/detail/is_indirect_const.hpp deleted file mode 100644 index b6c1282fb..000000000 --- a/luabind/luabind/detail/is_indirect_const.hpp +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2004 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef IS_INDIRECT_CONST_040211_HPP -#define IS_INDIRECT_CONST_040211_HPP - -#include -#include -#include - -namespace luabind { - - namespace detail { - - template - typename boost::is_const::type - is_indirect_const_check(T(*)(), int); - - template - typename boost::is_const::type - is_indirect_const_check(T*(*)(), long); - - template - typename boost::is_const::type - is_indirect_const_check(T&(*)(), long); - - yes_t to_yes_no(boost::mpl::true_); - no_t to_yes_no(boost::mpl::false_); - - } // namespace detail - - // returns true for: - // T = U* is_const - // T = U& is_const - // T = U is_const - template - struct is_indirect_const - { - BOOST_STATIC_CONSTANT(int, value = ( - sizeof( - detail::to_yes_no( - detail::is_indirect_const_check((T(*)())0, 0L) - )) - == sizeof(detail::yes_t) - )); - }; - -} // namespace luabind - -#endif // IS_INDIRECT_CONST_040211_HPP - diff --git a/luabind/luabind/detail/link_compatibility.hpp b/luabind/luabind/detail/link_compatibility.hpp deleted file mode 100644 index 6f0006afa..000000000 --- a/luabind/luabind/detail/link_compatibility.hpp +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef LUABIND_LINK_COMPATIBILITY_HPP_INCLUDED -#define LUABIND_LINK_COMPATIBILITY_HPP_INCLUDED - -#include - -namespace luabind { namespace detail -{ - -#ifdef LUABIND_NOT_THREADSAFE - LUABIND_API void not_threadsafe_defined_conflict(); -#else - LUABIND_API void not_threadsafe_not_defined_conflict(); -#endif - -#ifdef LUABIND_NO_ERROR_CHECKING - LUABIND_API void no_error_checking_defined_conflict(); -#else - LUABIND_API void no_error_checking_not_defined_conflict(); -#endif - - inline void check_link_compatibility() - { - #ifdef LUABIND_NOT_THREADSAFE - not_threadsafe_defined_conflict(); - #else - not_threadsafe_not_defined_conflict(); - #endif - - #ifdef LUABIND_NO_ERROR_CHECKING - no_error_checking_defined_conflict(); - #else - no_error_checking_not_defined_conflict(); - #endif - } - -}} - -#endif diff --git a/luabind/luabind/detail/make_instance.hpp b/luabind/luabind/detail/make_instance.hpp deleted file mode 100644 index 3150cf048..000000000 --- a/luabind/luabind/detail/make_instance.hpp +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright Daniel Wallin 2009. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef LUABIND_DETAIL_MAKE_INSTANCE_090310_HPP -# define LUABIND_DETAIL_MAKE_INSTANCE_090310_HPP - -# include -# include -# include - -namespace luabind { namespace detail { - -template -std::pair get_dynamic_class_aux( - lua_State* L, T const* p, mpl::true_) -{ - lua_pushliteral(L, "__luabind_class_id_map"); - lua_rawget(L, LUA_REGISTRYINDEX); - - class_id_map& class_ids = *static_cast( - lua_touserdata(L, -1)); - - lua_pop(L, 1); - - return std::make_pair( - class_ids.get_local(typeid(*p)) - , dynamic_cast(const_cast(p)) - ); -} - -template -std::pair get_dynamic_class_aux( - lua_State*, T const* p, mpl::false_) -{ - return std::make_pair(registered_class::id, (void*)p); -} - -template -std::pair get_dynamic_class(lua_State* L, T* p) -{ - return get_dynamic_class_aux(L, p, boost::is_polymorphic()); -} - -template -class_rep* get_pointee_class(class_map const& classes, T*) -{ - return classes.get(registered_class::id); -} - -template -class_rep* get_pointee_class(lua_State* L, P const& p, class_id dynamic_id) -{ - lua_pushliteral(L, "__luabind_class_map"); - lua_rawget(L, LUA_REGISTRYINDEX); - - class_map const& classes = *static_cast( - lua_touserdata(L, -1)); - - lua_pop(L, 1); - - class_rep* cls = classes.get(dynamic_id); - - if (!cls) - cls = get_pointee_class(classes, get_pointer(p)); - - return cls; -} - -// Create an appropriate instance holder for the given pointer like object. -template -void make_instance(lua_State* L, P p) -{ - std::pair dynamic = get_dynamic_class(L, get_pointer(p)); - - class_rep* cls = get_pointee_class(L, p, dynamic.first); - - if (!cls) - { - throw std::runtime_error("Trying to use unregistered class"); - } - - object_rep* instance = push_new_instance(L, cls); - - typedef pointer_holder

holder_type; - - void* storage = instance->allocate(sizeof(holder_type)); - - try - { - new (storage) holder_type(p, dynamic.first, dynamic.second, cls); - } - catch (...) - { - instance->deallocate(storage); - lua_pop(L, 1); - throw; - } - - instance->set_instance(static_cast(storage)); -} - -}} // namespace luabind::detail - -#endif // LUABIND_DETAIL_MAKE_INSTANCE_090310_HPP diff --git a/luabind/luabind/detail/most_derived.hpp b/luabind/luabind/detail/most_derived.hpp deleted file mode 100644 index 4dd9d9159..000000000 --- a/luabind/luabind/detail/most_derived.hpp +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2005 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef MOST_DERIVED_051018_HPP -# define MOST_DERIVED_051018_HPP - -# include -# include - -namespace luabind { namespace detail { - -template -struct most_derived -{ - typedef typename boost::mpl::if_< - boost::is_base_and_derived - , WrappedClass - , Class - >::type type; -}; - -}} // namespace luabind::detail - -#endif // MOST_DERIVED_051018_HPP - diff --git a/luabind/luabind/detail/object_call.hpp b/luabind/luabind/detail/object_call.hpp deleted file mode 100644 index 46ab0d958..000000000 --- a/luabind/luabind/detail/object_call.hpp +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2005 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#if !BOOST_PP_IS_ITERATING -# error Do not include object_call.hpp directly! -#endif - -#include -#include -#include - -#define N BOOST_PP_ITERATION() - -template -call_proxy< - Derived - , boost::tuples::tuple< - BOOST_PP_ENUM_BINARY_PARAMS(N, A, const* BOOST_PP_INTERCEPT) - > -> operator()(BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& a)) -{ - typedef boost::tuples::tuple< - BOOST_PP_ENUM_BINARY_PARAMS(N, A, const* BOOST_PP_INTERCEPT) - > arguments; - - return call_proxy( - derived() - , arguments(BOOST_PP_ENUM_PARAMS(N, &a)) - ); -} - -#undef N - diff --git a/luabind/luabind/detail/object_funs.hpp b/luabind/luabind/detail/object_funs.hpp deleted file mode 100644 index 2600238d9..000000000 --- a/luabind/luabind/detail/object_funs.hpp +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef LUABIND_OBJECT_PROXY_HPP_INCLUDED -#define LUABIND_OBJECT_PROXY_HPP_INCLUDED - -#include - -#include -#include -#include -#include -#include -#include - -#include - -namespace luabind -{ - - namespace detail - { - - namespace mpl = boost::mpl; - - template - inline T object_cast_impl(const Obj& obj, const Policies&) - { - if (obj.lua_state() == 0) - { -#ifndef LUABIND_NO_EXCEPTIONS - throw cast_failed(0, typeid(T)); -#else - lua_State* L = obj.lua_state(); - cast_failed_callback_fun e = get_cast_failed_callback(); - if (e) e(L, typeid(T)); - - assert(0 && "object_cast failed. If you want to handle this error use luabind::set_error_callback()"); - std::terminate(); -#endif - } - - LUABIND_CHECK_STACK(obj.lua_state()); - - typedef typename detail::find_conversion_policy<0, Policies>::type converter_policy; - typename mpl::apply_wrap2::type converter; - - obj.pushvalue(); - - lua_State* L = obj.lua_state(); - detail::stack_pop p(L, 1); - -#ifndef LUABIND_NO_ERROR_CHECKING - - if (converter.match(L, LUABIND_DECORATE_TYPE(T), -1) < 0) - { -#ifndef LUABIND_NO_EXCEPTIONS - throw cast_failed(L, typeid(T)); -#else - cast_failed_callback_fun e = get_cast_failed_callback(); - if (e) e(L, typeid(T)); - - assert(0 && "object_cast failed. If you want to handle this error use luabind::set_error_callback()"); - std::terminate(); -#endif - } -#endif - - return converter.apply(L, LUABIND_DECORATE_TYPE(T), -1); - } - - template - boost::optional object_cast_nothrow_impl(const Obj& obj, const Policies&) - { - typedef typename detail::find_conversion_policy<0, Policies>::type converter_policy; - typename mpl::apply_wrap2::type converter; - - if (obj.lua_state() == 0) return boost::optional(); - LUABIND_CHECK_STACK(obj.lua_state()); - - obj.pushvalue(); - - lua_State* L = obj.lua_state(); - detail::stack_pop p(L, 1); - -#ifndef LUABIND_NO_ERROR_CHECKING - - if (converter.match(L, LUABIND_DECORATE_TYPE(T), -1) < 0) - return boost::optional(); -#endif - - return boost::optional(converter.apply(L, LUABIND_DECORATE_TYPE(T), -1)); - } - } - - template - T object_cast(const object& obj) - { return detail::object_cast_impl(obj, detail::null_type()); } - - template - T object_cast(const object& obj, const Policies& p) - { return detail::object_cast_impl(obj, p); } - - template - boost::optional object_cast_nothrow(const object& obj) - { return detail::object_cast_nothrow_impl(obj, detail::null_type()); } - - template - boost::optional object_cast_nothrow(const object& obj, const Policies& p) - { return detail::object_cast_nothrow_impl(obj, p); } - - - template - T object_cast(const detail::proxy_object& obj) - { return detail::object_cast_impl(obj, detail::null_type()); } - - template - T object_cast(const detail::proxy_object& obj, const Policies& p) - { return detail::object_cast_impl(obj, p); } - - template - boost::optional object_cast_nothrow(const detail::proxy_object& obj) - { return detail::object_cast_nothrow_impl(obj, detail::null_type()); } - - template - boost::optional object_cast_nothrow(const detail::proxy_object& obj, const Policies& p) - { return detail::object_cast_nothrow_impl(obj, p); } - - - template - T object_cast(const detail::proxy_raw_object& obj) - { return detail::object_cast_impl(obj, detail::null_type()); } - - template - T object_cast(const detail::proxy_raw_object& obj, const Policies& p) - { return detail::object_cast_impl(obj, p); } - - template - boost::optional object_cast_nothrow(const detail::proxy_raw_object& obj) - { return detail::object_cast_nothrow_impl(obj, detail::null_type()); } - - template - boost::optional object_cast_nothrow(const detail::proxy_raw_object& obj, const Policies& p) - { return detail::object_cast_nothrow_impl(obj, p); } - - - template - T object_cast(const detail::proxy_array_object& obj) - { return detail::object_cast_impl(obj, detail::null_type()); } - - template - T object_cast(const detail::proxy_array_object& obj, const Policies& p) - { return detail::object_cast_impl(obj, p); } - - template - boost::optional object_cast_nothrow(const detail::proxy_array_object& obj) - { return detail::object_cast_nothrow_impl(obj, detail::null_type()); } - - template - boost::optional object_cast_nothrow(const detail::proxy_array_object& obj, const Policies& p) - { return detail::object_cast_nothrow_impl(obj, p); } - - - - - inline object get_globals(lua_State* L) - { - lua_pushvalue(L, LUA_GLOBALSINDEX); - detail::lua_reference ref; - ref.set(L); - return object(L, ref, true/*object::reference()*/); - } - - inline object get_registry(lua_State* L) - { - lua_pushvalue(L, LUA_REGISTRYINDEX); - detail::lua_reference ref; - ref.set(L); - return object(L, ref, true/*object::reference()*/); - } - - inline object newtable(lua_State* L) - { - lua_newtable(L); - detail::lua_reference ref; - ref.set(L); - return object(L, ref, true/*object::reference()*/); - } -} - -/* - -struct A -{ -}; - -object f = class_(); - -A* ptr = object_cast(f(), adopt(_1)); - -delete ptr; - -*/ - -#endif // LUABIND_OBJECT_PROXY_HPP_INCLUDED diff --git a/luabind/luabind/detail/object_rep.hpp b/luabind/luabind/detail/object_rep.hpp deleted file mode 100644 index 93b3e39d6..000000000 --- a/luabind/luabind/detail/object_rep.hpp +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#ifndef LUABIND_OBJECT_REP_HPP_INCLUDED -#define LUABIND_OBJECT_REP_HPP_INCLUDED - -#include -#include -#include -#include -#include - -namespace luabind { namespace detail -{ - class class_rep; - - void finalize(lua_State* L, class_rep* crep); - - // this class is allocated inside lua for each pointer. - // it contains the actual c++ object-pointer. - // it also tells if it is const or not. - class LUABIND_API object_rep - { - public: - object_rep(instance_holder* instance, class_rep* crep); - ~object_rep(); - - const class_rep* crep() const { return m_classrep; } - class_rep* crep() { return m_classrep; } - - void set_instance(instance_holder* instance) { m_instance = instance; } - - void add_dependency(lua_State* L, int index); - void release_dependency_refs(lua_State* L); - - std::pair get_instance(class_id target) const - { - if (m_instance == 0) - return std::pair((void*)0, -1); - return m_instance->get(target); - } - - bool is_const() const - { - return m_instance && m_instance->pointee_const(); - } - - void release() - { - if (m_instance) - m_instance->release(); - } - - void* allocate(std::size_t size) - { - if (size <= 32) - return &m_instance_buffer; - return std::malloc(size); - } - - void deallocate(void* storage) - { - if (storage == &m_instance_buffer) - return; - std::free(storage); - } - - private: - - object_rep(object_rep const&) - {} - - void operator=(object_rep const&) - {} - - instance_holder* m_instance; - boost::aligned_storage<32> m_instance_buffer; - class_rep* m_classrep; // the class information about this object's type - std::size_t m_dependency_cnt; // counts dependencies - }; - - template - struct delete_s - { - static void apply(void* ptr) - { - delete static_cast(ptr); - } - }; - - template - struct destruct_only_s - { - static void apply(void* ptr) - { - // Removes unreferenced formal parameter warning on VC7. - (void)ptr; -#ifndef NDEBUG - int completeness_check[sizeof(T)]; - (void)completeness_check; -#endif - static_cast(ptr)->~T(); - } - }; - - LUABIND_API object_rep* get_instance(lua_State* L, int index); - LUABIND_API void push_instance_metatable(lua_State* L); - LUABIND_API object_rep* push_new_instance(lua_State* L, class_rep* cls); - -}} - -#endif // LUABIND_OBJECT_REP_HPP_INCLUDED - diff --git a/luabind/luabind/detail/open.hpp b/luabind/luabind/detail/open.hpp deleted file mode 100644 index a30faeef8..000000000 --- a/luabind/luabind/detail/open.hpp +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#ifndef LUABIND_OPEN_HPP_INCLUDED -#define LUABIND_OPEN_HPP_INCLUDED - -#include - -namespace luabind -{ - namespace detail - { - LUABIND_API void add_operator_to_metatable(lua_State* L, int op_index); - LUABIND_API int create_cpp_class_metatable(lua_State* L); - LUABIND_API int create_cpp_instance_metatable(lua_State* L); - LUABIND_API int create_lua_class_metatable(lua_State* L); - LUABIND_API int create_lua_instance_metatable(lua_State* L); - LUABIND_API int create_lua_function_metatable(lua_State* L); - } - - LUABIND_API void open(lua_State* L); -} - -#endif // LUABIND_OPEN_HPP_INCLUDED - diff --git a/luabind/luabind/detail/operator_id.hpp b/luabind/luabind/detail/operator_id.hpp deleted file mode 100644 index ed64ba6d5..000000000 --- a/luabind/luabind/detail/operator_id.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#ifndef LUABIND_OPERATOR_ID_HPP_INCLUDED -#define LUABIND_OPERATOR_ID_HPP_INCLUDED - -#include - -namespace luabind { namespace detail { - - enum operator_id - { - op_add = 0, - op_sub, - op_mul, - op_div, - op_pow, - op_lt, - op_le, - op_eq, - op_call, - op_unm, - op_tostring, - op_concat, - op_len, - - number_of_operators - }; - - inline const char* get_operator_name(int i) - { - static const char* a[number_of_operators] = { - "__add", "__sub", "__mul", "__div", "__pow", - "__lt", "__le", "__eq", "__call", "__unm", - "__tostring", "__concat", "__len" }; - return a[i]; - } - - inline const char* get_operator_symbol(int i) - { - static const char* a[number_of_operators] = { - "+", "-", "*", "/", "^", "<", - "<=", "==", "()", "- (unary)", - "tostring", "..", "#" }; - return a[i]; - } - - inline bool is_unary(int i) - { - // the reason why unary minus is not considered a unary operator here is - // that it always is given two parameters, where the second parameter always - // is nil. - return i == op_tostring; - } - - -}} - -#endif // LUABIND_OPERATOR_ID_HPP_INCLUDED diff --git a/luabind/luabind/detail/other.hpp b/luabind/luabind/detail/other.hpp deleted file mode 100644 index 679058c9e..000000000 --- a/luabind/luabind/detail/other.hpp +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#ifndef LUABIND_OTHER_HPP_INCLUDED -#define LUABIND_OTHER_HPP_INCLUDED - -// header derived from source code found in Boost.Python - -// Copyright David Abrahams 2002. Permission to copy, use, -// modify, sell and distribute this software is granted provided this -// copyright notice appears in all copies. This software is provided -// "as is" without express or implied warranty, and with no claim as -// to its suitability for any purpose. - -#include -#include - -namespace luabind -{ - template - struct other - { - typedef T type; - }; -} - -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -namespace luabind { namespace detail -{ - template - class unwrap_other - { - public: - typedef T type; - }; - - template - class unwrap_other > - { - public: - typedef T type; - }; -}} // namespace luabind::detail - -# else // no partial specialization - -#include - -namespace luabind { namespace detail -{ - typedef char (&yes_other_t)[1]; - typedef char (&no_other_t)[2]; - - no_other_t is_other_test(...); - - template - yes_other_t is_other_test(type_< other >); - - template - struct other_unwrapper - { - template - struct apply - { - typedef T type; - }; - }; - - template<> - struct other_unwrapper - { - template - struct apply - { - typedef typename T::type type; - }; - }; - - template - class is_other - { - public: - BOOST_STATIC_CONSTANT( - bool, value = ( - sizeof(detail::is_other_test(type_())) - == sizeof(detail::yes_other_t))); - }; - - template - class unwrap_other - : public detail::other_unwrapper< - is_other::value - >::template apply - {}; - -}} // namespace luabind::detail -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -#endif // LUABIND_OTHER_HPP_INCLUDED diff --git a/luabind/luabind/detail/pcall.hpp b/luabind/luabind/detail/pcall.hpp deleted file mode 100644 index f0d72b162..000000000 --- a/luabind/luabind/detail/pcall.hpp +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef LUABIND_PCALL_HPP_INCLUDED -#define LUABIND_PCALL_HPP_INCLUDED - -#include - -struct lua_State; - -namespace luabind { namespace detail -{ - LUABIND_API int pcall(lua_State *L, int nargs, int nresults); - LUABIND_API int resume_impl(lua_State *L, int nargs, int nresults); -}} - -#endif diff --git a/luabind/luabind/detail/pointee_sizeof.hpp b/luabind/luabind/detail/pointee_sizeof.hpp deleted file mode 100644 index 3875c09dd..000000000 --- a/luabind/luabind/detail/pointee_sizeof.hpp +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2004 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef POINTEE_SIZEOF_040211_HPP -#define POINTEE_SIZEOF_040211_HPP - -#include - -namespace luabind { - - namespace detail { - - template T& deref_type(T(*)(), int); - template T& deref_type(T*(*)(), long); - - } // namespace detail - - // returns the indirect sizeof U, as in - // sizeof(T*) = sizeof(T) - // sizeof(T&) = sizeof(T) - // sizeof(T) = sizeof(T) - template - struct pointee_sizeof - { - BOOST_STATIC_CONSTANT(int, value = ( - sizeof(detail::deref_type((T(*)())0), 0L) - )); - - typedef boost::mpl::int_ type; - }; - -} // namespace luabind - -#endif // POINTEE_SIZEOF_040211_HPP - diff --git a/luabind/luabind/detail/pointee_typeid.hpp b/luabind/luabind/detail/pointee_typeid.hpp deleted file mode 100644 index ab4113711..000000000 --- a/luabind/luabind/detail/pointee_typeid.hpp +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2004 Daniel Wallin - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef POINTEE_TYPEID_040211_HPP -#define POINTEE_TYPEID_040211_HPP - -#include -#include - -namespace luabind { namespace detail { - - template - type_id pointee_typeid(T*) - { - return typeid(T); - } - -}} // namespace luabind::detail - -#endif // POINTEE_TYPEID_040211_HPP - diff --git a/luabind/luabind/detail/policy.hpp b/luabind/luabind/detail/policy.hpp deleted file mode 100644 index 79577c9a4..000000000 --- a/luabind/luabind/detail/policy.hpp +++ /dev/null @@ -1,1022 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#ifndef LUABIND_POLICY_HPP_INCLUDED -#define LUABIND_POLICY_HPP_INCLUDED - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include -#include - -namespace luabind -{ - namespace detail - { - struct conversion_policy_base {}; - } - - template - struct conversion_policy : detail::conversion_policy_base - { - BOOST_STATIC_CONSTANT(int, index = N); - BOOST_STATIC_CONSTANT(bool, has_arg = HasArg); - }; - - class index_map - { - public: - index_map(const int* m): m_map(m) {} - - int operator[](int index) const - { - return m_map[index]; - } - - private: - const int* m_map; - }; - -// template class functor; - class weak_ref; -} - -namespace luabind { namespace detail -{ - template - struct policy_cons - { - typedef H head; - typedef T tail; - - template - policy_cons > operator,(policy_cons) - { - return policy_cons >(); - } - - template - policy_cons > operator+(policy_cons) - { - return policy_cons >(); - } - - template - policy_cons > operator|(policy_cons) - { - return policy_cons >(); - } - }; - - struct indirection_layer - { - template - indirection_layer(const T&); - }; - - yes_t is_policy_cons_test(const null_type&); - template - yes_t is_policy_cons_test(const policy_cons&); - no_t is_policy_cons_test(...); - - template - struct is_policy_cons - { - static const T& t; - - BOOST_STATIC_CONSTANT(bool, value = - sizeof(is_policy_cons_test(t)) == sizeof(yes_t)); - - typedef boost::mpl::bool_ type; - }; - - template - struct is_string_literal - { - static no_t helper(indirection_layer); - static yes_t helper(const char*); - }; - - template<> - struct is_string_literal - { - static no_t helper(indirection_layer); - }; - - - namespace mpl = boost::mpl; - - template - void make_pointee_instance(lua_State* L, T& x, mpl::true_, Clone) - { - if (get_pointer(x)) - { - make_instance(L, x); - } - else - { - lua_pushnil(L); - } - } - - template - void make_pointee_instance(lua_State* L, T& x, mpl::false_, mpl::true_) - { - std::auto_ptr ptr(new T(x)); - make_instance(L, ptr); - } - - template - void make_pointee_instance(lua_State* L, T& x, mpl::false_, mpl::false_) - { - make_instance(L, &x); - } - - template - void make_pointee_instance(lua_State* L, T& x, Clone) - { - make_pointee_instance(L, x, has_get_pointer(), Clone()); - } - -// ********** pointer converter *********** - - struct pointer_converter - { - typedef pointer_converter type; - typedef mpl::false_ is_native; - - pointer_converter() - : result(0) - {} - - void* result; - - int const consumed_args(...) - { - return 1; - } - - template - void apply(lua_State* L, T* ptr) - { - if (ptr == 0) - { - lua_pushnil(L); - return; - } - - if (luabind::get_back_reference(L, ptr)) - return; - - make_instance(L, ptr); - } - - template - T* apply(lua_State*, by_pointer, int) - { - return static_cast(result); - } - - template - int match(lua_State* L, by_pointer, int index) - { - if (lua_isnil(L, index)) return 0; - object_rep* obj = get_instance(L, index); - if (obj == 0) return -1; - - if (obj->is_const()) - return -1; - - std::pair s = obj->get_instance(registered_class::id); - result = s.first; - return s.second; - } - - template - void converter_postcall(lua_State*, by_pointer, int) - {} - }; - -// ******* value converter ******* - - struct value_converter - { - typedef value_converter type; - typedef mpl::false_ is_native; - - int const consumed_args(...) - { - return 1; - } - - value_converter() - : result(0) - {} - - void* result; - - template - void apply(lua_State* L, T x) - { - if (luabind::get_back_reference(L, x)) - return; - - make_pointee_instance(L, x, mpl::true_()); - } - - template - T apply(lua_State*, by_value, int) - { - return *static_cast(result); - } - - template - int match(lua_State* L, by_value, int index) - { - // special case if we get nil in, try to match the holder type - if (lua_isnil(L, index)) - return -1; - - object_rep* obj = get_instance(L, index); - if (obj == 0) return -1; - - std::pair s = obj->get_instance(registered_class::id); - result = s.first; - return s.second; - } - - template - void converter_postcall(lua_State*, T, int) {} - }; - -// ******* const pointer converter ******* - - struct const_pointer_converter - { - typedef const_pointer_converter type; - typedef mpl::false_ is_native; - - int const consumed_args(...) - { - return 1; - } - - const_pointer_converter() - : result(0) - {} - - void* result; - - template - void apply(lua_State* L, const T* ptr) - { - if (ptr == 0) - { - lua_pushnil(L); - return; - } - - if (luabind::get_back_reference(L, ptr)) - return; - - make_instance(L, ptr); - } - - template - T const* apply(lua_State*, by_const_pointer, int) - { - return static_cast(result); - } - - template - int match(lua_State* L, by_const_pointer, int index) - { - if (lua_isnil(L, index)) return 0; - object_rep* obj = get_instance(L, index); - if (obj == 0) return -1; // if the type is not one of our own registered types, classify it as a non-match - std::pair s = obj->get_instance(registered_class::id); - if (s.second >= 0 && !obj->is_const()) - s.second += 10; - result = s.first; - return s.second; - } - - template - void converter_postcall(lua_State*, T, int) {} - }; - -// ******* reference converter ******* - - struct ref_converter : pointer_converter - { - typedef ref_converter type; - typedef mpl::false_ is_native; - - int const consumed_args(...) - { - return 1; - } - - template - void apply(lua_State* L, T& ref) - { - if (luabind::get_back_reference(L, ref)) - return; - - make_pointee_instance(L, ref, mpl::false_()); - } - - template - T& apply(lua_State* L, by_reference, int index) - { - assert(!lua_isnil(L, index)); - return *pointer_converter::apply(L, by_pointer(), index); - } - - template - int match(lua_State* L, by_reference, int index) - { - object_rep* obj = get_instance(L, index); - if (obj == 0) return -1; - - if (obj->is_const()) - return -1; - - std::pair s = obj->get_instance(registered_class::id); - result = s.first; - return s.second; - } - - template - void converter_postcall(lua_State*, T, int) {} - }; - -// ******** const reference converter ********* - - struct const_ref_converter - { - typedef const_ref_converter type; - typedef mpl::false_ is_native; - - int const consumed_args(...) - { - return 1; - } - - const_ref_converter() - : result(0) - {} - - void* result; - - template - void apply(lua_State* L, T const& ref) - { - if (luabind::get_back_reference(L, ref)) - return; - - make_pointee_instance(L, ref, mpl::false_()); - } - - template - T const& apply(lua_State*, by_const_reference, int) - { - return *static_cast(result); - } - - template - int match(lua_State* L, by_const_reference, int index) - { - object_rep* obj = get_instance(L, index); - if (obj == 0) return -1; // if the type is not one of our own registered types, classify it as a non-match - - std::pair s = obj->get_instance(registered_class::id); - if (s.second >= 0 && !obj->is_const()) - s.second += 10; - result = s.first; - return s.second; - } - - template - void converter_postcall(lua_State*, by_const_reference, int) - { - } - }; - - // ****** enum converter ******** - - struct enum_converter - { - typedef enum_converter type; - typedef mpl::true_ is_native; - - int const consumed_args(...) - { - return 1; - } - - void apply(lua_State* L, int val) - { - lua_pushnumber(L, val); - } - - template - T apply(lua_State* L, by_value, int index) - { - return static_cast(static_cast(lua_tonumber(L, index))); - } - - template - static int match(lua_State* L, by_value, int index) - { - if (lua_isnumber(L, index)) return 0; else return -1; - } - - template - T apply(lua_State* L, by_const_reference, int index) - { - return static_cast(static_cast(lua_tonumber(L, index))); - } - - template - static int match(lua_State* L, by_const_reference, int index) - { - if (lua_isnumber(L, index)) return 0; else return -1; - } - - template - void converter_postcall(lua_State*, T, int) {} - }; - - template - struct value_wrapper_converter - { - typedef value_wrapper_converter type; - typedef mpl::true_ is_native; - - int const consumed_args(...) - { - return 1; - } - - template - T apply(lua_State* L, by_const_reference, int index) - { - return T(from_stack(L, index)); - } - - template - T apply(lua_State* L, by_value, int index) - { - return apply(L, by_const_reference(), index); - } - - template - static int match(lua_State* L, by_const_reference, int index) - { - return value_wrapper_traits::check(L, index) - ? (std::numeric_limits::max)() / LUABIND_MAX_ARITY - : -1; - } - - template - static int match(lua_State* L, by_value, int index) - { - return match(L, by_const_reference(), index); - } - - void converter_postcall(...) {} - - template - void apply(lua_State* interpreter, T const& value_wrapper) - { - value_wrapper_traits::unwrap(interpreter, value_wrapper); - } - }; - - template - struct default_converter_generator - : mpl::eval_if< - is_value_wrapper_arg - , value_wrapper_converter - , mpl::eval_if< - boost::is_enum::type> - , enum_converter - , mpl::eval_if< - is_nonconst_pointer - , pointer_converter - , mpl::eval_if< - is_const_pointer - , const_pointer_converter - , mpl::eval_if< - is_nonconst_reference - , ref_converter - , mpl::eval_if< - is_const_reference - , const_ref_converter - , value_converter - > - > - > - > - > - > - {}; - -} // namespace detail - -// *********** default_policy ***************** - -template -struct default_converter - : detail::default_converter_generator::type -{}; - -template > -struct native_converter_base -{ - typedef boost::mpl::true_ is_native; - - int const consumed_args(...) - { - return 1; - } - - template - void converter_postcall(lua_State*, U const&, int) - {} - - int match(lua_State* L, detail::by_value, int index) - { - return derived().compute_score(L, index); - } - - int match(lua_State* L, detail::by_value, int index) - { - return derived().compute_score(L, index); - } - - int match(lua_State* L, detail::by_const_reference, int index) - { - return derived().compute_score(L, index); - } - - T apply(lua_State* L, detail::by_value, int index) - { - return derived().from(L, index); - } - - T apply(lua_State* L, detail::by_value, int index) - { - return derived().from(L, index); - } - - T apply(lua_State* L, detail::by_const_reference, int index) - { - return derived().from(L, index); - } - - void apply(lua_State* L, T const& value) - { - derived().to(L, value); - } - - Derived& derived() - { - return static_cast(*this); - } -}; - -template -lua_Integer as_lua_integer(T v) -{ - return static_cast(v); -} - -template -lua_Number as_lua_number(T v) -{ - return static_cast(v); -} - -# define LUABIND_NUMBER_CONVERTER(type, kind) \ - template <> \ -struct default_converter \ - : native_converter_base \ -{ \ - int compute_score(lua_State* L, int index) \ - { \ - return lua_type(L, index) == LUA_TNUMBER ? 0 : -1; \ - }; \ - \ - type from(lua_State* L, int index) \ - { \ - return static_cast(BOOST_PP_CAT(lua_to, kind)(L, index)); \ - } \ - \ - void to(lua_State* L, type const& value) \ - { \ - BOOST_PP_CAT(lua_push, kind)(L, BOOST_PP_CAT(as_lua_, kind)(value)); \ - } \ -}; \ -\ -template <> \ -struct default_converter \ - : default_converter \ -{}; \ -\ -template <> \ -struct default_converter \ - : default_converter \ -{}; - -LUABIND_NUMBER_CONVERTER(char, integer) -LUABIND_NUMBER_CONVERTER(signed char, integer) -LUABIND_NUMBER_CONVERTER(unsigned char, integer) -LUABIND_NUMBER_CONVERTER(signed short, integer) -LUABIND_NUMBER_CONVERTER(unsigned short, integer) -LUABIND_NUMBER_CONVERTER(signed int, integer) - -LUABIND_NUMBER_CONVERTER(unsigned int, number) -LUABIND_NUMBER_CONVERTER(unsigned long, number) - -LUABIND_NUMBER_CONVERTER(signed long, integer) -LUABIND_NUMBER_CONVERTER(float, number) -LUABIND_NUMBER_CONVERTER(double, number) -LUABIND_NUMBER_CONVERTER(long double, number) - -# undef LUABIND_NUMBER_CONVERTER - -template <> -struct default_converter - : native_converter_base -{ - static int compute_score(lua_State* L, int index) - { - return lua_type(L, index) == LUA_TBOOLEAN ? 0 : -1; - } - - bool from(lua_State* L, int index) - { - return lua_toboolean(L, index) == 1; - } - - void to(lua_State* L, bool value) - { - lua_pushboolean(L, value); - } -}; - -template <> -struct default_converter - : default_converter -{}; - -template <> -struct default_converter - : default_converter -{}; - -template <> -struct default_converter - : native_converter_base -{ - static int compute_score(lua_State* L, int index) - { - return lua_type(L, index) == LUA_TSTRING ? 0 : -1; - } - - std::string from(lua_State* L, int index) - { - return std::string(lua_tostring(L, index), lua_strlen(L, index)); - } - - void to(lua_State* L, std::string const& value) - { - lua_pushlstring(L, value.data(), value.size()); - } -}; - -template <> -struct default_converter - : default_converter -{}; - -template <> -struct default_converter - : default_converter -{}; - -template <> -struct default_converter -{ - typedef boost::mpl::true_ is_native; - - int const consumed_args(...) - { - return 1; - } - - template - static int match(lua_State* L, U, int index) - { - int type = lua_type(L, index); - return (type == LUA_TSTRING || type == LUA_TNIL) ? 0 : -1; - } - - template - char const* apply(lua_State* L, U, int index) - { - return lua_tostring(L, index); - } - - void apply(lua_State* L, char const* str) - { - lua_pushstring(L, str); - } - - template - void converter_postcall(lua_State*, U, int) - {} -}; - -template <> -struct default_converter - : default_converter -{}; - -template <> -struct default_converter - : default_converter -{}; - -template -struct default_converter - : default_converter -{}; - -template -struct default_converter - : default_converter -{}; - -template <> -struct default_converter -{ - int const consumed_args(...) - { - return 0; - } - - template - lua_State* apply(lua_State* L, U, int) - { - return L; - } - - template - static int match(lua_State*, U, int) - { - return 0; - } - - template - void converter_postcall(lua_State*, U, int) {} -}; - -namespace detail -{ - - struct default_policy : converter_policy_tag - { - BOOST_STATIC_CONSTANT(bool, has_arg = true); - - template - static void precall(lua_State*, T, int) {} - - template - struct apply - { - typedef default_converter type; - }; - }; - - template - struct is_primitive - : default_converter::is_native - {}; - -// ============== new policy system ================= - - template struct find_conversion_policy; - - template - struct find_conversion_impl - { - template - struct apply - { - typedef typename find_conversion_policy::type type; - }; - }; - - template<> - struct find_conversion_impl - { - template - struct apply - { - typedef typename Policies::head head; - typedef typename Policies::tail tail; - - BOOST_STATIC_CONSTANT(bool, found = (N == head::index)); - - typedef typename - boost::mpl::if_c::type - >::type type; - }; - }; - - template - struct find_conversion_impl2 - { - template - struct apply - : find_conversion_impl< - boost::is_base_and_derived::value - >::template apply - { - }; - }; - - template<> - struct find_conversion_impl2 - { - template - struct apply - { - typedef default_policy type; - }; - }; - - template - struct find_conversion_policy : find_conversion_impl2::template apply - { - }; - - template - struct policy_list_postcall - { - typedef typename List::head head; - typedef typename List::tail tail; - - static void apply(lua_State* L, const index_map& i) - { - head::postcall(L, i); - policy_list_postcall::apply(L, i); - } - }; - - template<> - struct policy_list_postcall - { - static void apply(lua_State*, const index_map&) {} - }; - -// ================================================== - -// ************** precall and postcall on policy_cons ********************* - - - template - struct policy_precall - { - typedef typename List::head head; - typedef typename List::tail tail; - - static void apply(lua_State* L, int index) - { - head::precall(L, index); - policy_precall::apply(L, index); - } - }; - - template<> - struct policy_precall - { - static void apply(lua_State*, int) {} - }; - - template - struct policy_postcall - { - typedef typename List::head head; - typedef typename List::tail tail; - - static void apply(lua_State* L, int index) - { - head::postcall(L, index); - policy_postcall::apply(L, index); - } - }; - - template<> - struct policy_postcall - { - static void apply(lua_State*, int) {} - }; - -}} // namespace luabind::detail - - -namespace luabind { namespace -{ -#if defined(__GNUC__) && ( \ - (BOOST_VERSION < 103500) \ - || (BOOST_VERSION < 103900 && (__GNUC__ * 100 + __GNUC_MINOR__ <= 400)) \ - || (__GNUC__ * 100 + __GNUC_MINOR__ < 400)) - static inline boost::arg<0> return_value() - { - return boost::arg<0>(); - } - - static inline boost::arg<0> result() - { - return boost::arg<0>(); - } -# define LUABIND_PLACEHOLDER_ARG(N) boost::arg(*)() -#elif defined(BOOST_MSVC) || defined(__MWERKS__) \ - || (BOOST_VERSION >= 103900 && defined(__GNUC__) \ - && (__GNUC__ * 100 + __GNUC_MINOR__ == 400)) - static boost::arg<0> return_value; - static boost::arg<0> result; -# define LUABIND_PLACEHOLDER_ARG(N) boost::arg -#else - boost::arg<0> return_value; - boost::arg<0> result; -# define LUABIND_PLACEHOLDER_ARG(N) boost::arg -#endif -}} - -#endif // LUABIND_POLICY_HPP_INCLUDED - diff --git a/luabind/luabind/detail/primitives.hpp b/luabind/luabind/detail/primitives.hpp deleted file mode 100644 index 04ce17b87..000000000 --- a/luabind/luabind/detail/primitives.hpp +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#ifndef LUABIND_PRIMITIVES_HPP_INCLUDED -#define LUABIND_PRIMITIVES_HPP_INCLUDED - -#include -#include - -#include -#include - -namespace luabind { namespace detail -{ - template - struct identity - { - typedef T type; - }; - - template - struct type_ {}; - - struct null_type {}; - -/* typedef char yes_t; - typedef double no_t;*/ - - struct lua_to_cpp {}; - struct cpp_to_lua {}; - - template struct by_value {}; - template struct by_reference {}; - template struct by_const_reference {}; - template struct by_pointer {}; - template struct by_const_pointer {}; - - struct converter_policy_tag {}; - - struct ltstr - { - bool operator()(const char* s1, const char* s2) const { return std::strcmp(s1, s2) < 0; } - }; - - template - struct aligned - { - char storage[N]; - }; - - // returns the offset added to a Derived* when cast to a Base* - // TODO: return ptrdiff - template - int ptr_offset(type_, type_) - { - aligned obj; - Derived* ptr = reinterpret_cast(&obj); - - return int(static_cast(static_cast(static_cast(ptr))) - - static_cast(static_cast(ptr))); - } - -}} - -#endif // LUABIND_PRIMITIVES_HPP_INCLUDED diff --git a/luabind/luabind/detail/property.hpp b/luabind/luabind/detail/property.hpp deleted file mode 100644 index 2c30ce000..000000000 --- a/luabind/luabind/detail/property.hpp +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright Daniel Wallin 2008. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef LUABIND_PROPERTY_081020_HPP -# define LUABIND_PROPERTY_081020_HPP - -namespace luabind { namespace detail { - -template -struct access_member_ptr -{ - access_member_ptr(T Class::* mem_ptr) - : mem_ptr(mem_ptr) - {} - - Result operator()(Class const& x) const - { - return const_cast(x).*mem_ptr; - } - - void operator()(Class& x, T const& value) const - { - x.*mem_ptr = value; - } - - T Class::* mem_ptr; -}; - -}} // namespace luabind::detail - -#endif // LUABIND_PROPERTY_081020_HPP - diff --git a/luabind/luabind/detail/ref.hpp b/luabind/luabind/detail/ref.hpp deleted file mode 100644 index 3edbfebfb..000000000 --- a/luabind/luabind/detail/ref.hpp +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#ifndef LUABIND_REF_HPP_INCLUDED -#define LUABIND_REF_HPP_INCLUDED - -#include -#include - -#include -#include - -namespace luabind -{ - -namespace detail -{ - - struct lua_reference - { - lua_reference(lua_State* L_ = 0) - : L(L_) - , m_ref(LUA_NOREF) - {} - lua_reference(lua_reference const& r) - : L(r.L) - , m_ref(LUA_NOREF) - { - if (!r.is_valid()) return; - r.get(L); - set(L); - } - ~lua_reference() { reset(); } - - lua_State* state() const { return L; } - - void operator=(lua_reference const& r) - { - // TODO: self assignment problems - reset(); - if (!r.is_valid()) return; - r.get(r.state()); - set(r.state()); - } - - bool is_valid() const - { return m_ref != LUA_NOREF; } - - void set(lua_State* L_) - { - reset(); - L = L_; - m_ref = luaL_ref(L, LUA_REGISTRYINDEX); - } - - void replace(lua_State* L_) - { - lua_rawseti(L_, LUA_REGISTRYINDEX, m_ref); - } - - // L may not be the same pointer as - // was used when creating this reference - // since it may be a thread that shares - // the same globals table. - void get(lua_State* L_) const - { - assert(m_ref != LUA_NOREF); - assert(L_); - lua_rawgeti(L_, LUA_REGISTRYINDEX, m_ref); - } - - void reset() - { - if (L && m_ref != LUA_NOREF) luaL_unref(L, LUA_REGISTRYINDEX, m_ref); - m_ref = LUA_NOREF; - } - - void swap(lua_reference& r) - { - assert(r.L == L); - std::swap(r.m_ref, m_ref); - } - - private: - lua_State* L; - int m_ref; - }; - -}} - -#endif // LUABIND_REF_HPP_INCLUDED - diff --git a/luabind/luabind/detail/signature_match.hpp b/luabind/luabind/detail/signature_match.hpp deleted file mode 100644 index d76ed6627..000000000 --- a/luabind/luabind/detail/signature_match.hpp +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef LUABIND_SIGNATURE_MATCH_HPP_INCLUDED -#define LUABIND_SIGNATURE_MATCH_HPP_INCLUDED - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -namespace luabind -{ - - namespace adl - { - class argument; - } - - template - struct constructor - { - typedef BOOST_PP_CAT( - boost::mpl::vector, BOOST_PP_INC(BOOST_PP_INC(LUABIND_MAX_ARITY)))< - void, argument const&, BOOST_PP_ENUM_PARAMS(LUABIND_MAX_ARITY, A) - > signature0; - - typedef typename boost::mpl::remove< - signature0, detail::null_type>::type signature; - }; - -} - -#endif // LUABIND_SIGNATURE_MATCH_HPP_INCLUDED - diff --git a/luabind/luabind/detail/stack_utils.hpp b/luabind/luabind/detail/stack_utils.hpp deleted file mode 100644 index 15f3a7fce..000000000 --- a/luabind/luabind/detail/stack_utils.hpp +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef LUABIND_STACK_UTILS_HPP_INCLUDED -#define LUABIND_STACK_UTILS_HPP_INCLUDED - -#include - -namespace luabind { namespace detail -{ - - struct stack_pop - { - stack_pop(lua_State* L, int n) - : m_state(L) - , m_n(n) - { - } - - ~stack_pop() - { - lua_pop(m_state, m_n); - } - - private: - - lua_State* m_state; - int m_n; - }; -}} - -#endif // LUABIND_STACK_UTILS_HPP_INCLUDED - diff --git a/luabind/luabind/detail/typetraits.hpp b/luabind/luabind/detail/typetraits.hpp deleted file mode 100644 index f27934e98..000000000 --- a/luabind/luabind/detail/typetraits.hpp +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#ifndef LUABIND_TYPETRAITS_HPP_INCLUDED -#define LUABIND_TYPETRAITS_HPP_INCLUDED - -#include -#include -#include -#include -#include - -namespace luabind { namespace detail -{ - -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - - template - struct is_const_type - { - typedef typename boost::mpl::if_ - , yes_t - , no_t - >::type type; - }; - - template - struct is_const_reference_helper - { - template - struct apply - { - enum - { - value = false - }; - }; - }; - - template - typename is_const_type::type is_const_reference_tester(T&); - no_t is_const_reference_tester(...); - - template<> - struct is_const_reference_helper - { - template - struct apply - { - static T getT(); - - enum - { - value = sizeof(is_const_reference_tester(getT())) == sizeof(yes_t) - }; - }; - }; - - template - struct is_const_reference - : is_const_reference_helper::value>::template apply - { - typedef boost::mpl::bool_ type; - }; - -#else - - template - struct is_const_reference - { - enum { value = false }; - typedef boost::mpl::bool_ type; - }; - - template - struct is_const_reference - { - enum { value = true }; - typedef boost::mpl::bool_ type; - }; - -#endif - - - template - struct is_nonconst_reference - { - enum - { - value = boost::is_reference::value && !is_const_reference::value - }; - typedef boost::mpl::bool_ type; - }; - - template - yes_t is_const_pointer_helper(void(*)(const A*)); - no_t is_const_pointer_helper(...); - - template - struct is_const_pointer - { - enum { value = sizeof(is_const_pointer_helper((void(*)(T))0)) == sizeof(yes_t) }; - typedef boost::mpl::bool_ type; - }; - - template - yes_t is_nonconst_pointer_helper(void(*)(A*)); - no_t is_nonconst_pointer_helper(...); - - template - struct is_nonconst_pointer - { - enum { value = sizeof(is_nonconst_pointer_helper((void(*)(T))0)) == sizeof(yes_t) && !is_const_pointer::value }; - typedef boost::mpl::bool_ type; - }; -/* - template - struct is_constructable_from_helper - { - static yes_t check(const T&); - static no_t check(...); - }; - - template - struct is_constructable_from - { - static From getFrom(); - - enum - { - value = sizeof(is_constructable_from_helper::check(getFrom())) == sizeof(yes_t) - }; - }; - - template - struct is_const_member_function_helper - { - static no_t test(...); - template - static yes_t test(R(T::*)() const); - template - static yes_t test(R(T::*)(A1) const); - template - static yes_t test(R(T::*)(A1,A2) const); - template - static yes_t test(R(T::*)(A1,A2,A3) const); - }; - - template - struct is_const_member_function - { - static U getU(); - - enum - { - value = sizeof(is_const_member_function_helper::test(getU())) == sizeof(yes_t) - }; - }; -*/ - - template - struct max_c - { - enum { value = (v1>v2)?v1:v2 }; - }; - -}} - -#endif // LUABIND_TYPETRAITS_HPP_INCLUDED - diff --git a/luabind/luabind/detail/yes_no.hpp b/luabind/luabind/detail/yes_no.hpp deleted file mode 100644 index 931847c60..000000000 --- a/luabind/luabind/detail/yes_no.hpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2004 Daniel Wallin - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef YES_NO_040211_HPP -#define YES_NO_040211_HPP - -namespace luabind { namespace detail { - - typedef char(&yes_t)[1]; - typedef char(&no_t)[2]; - -}} // namespace luabind::detail - -#endif // YES_NO_040211_HPP - diff --git a/luabind/luabind/discard_result_policy.hpp b/luabind/luabind/discard_result_policy.hpp deleted file mode 100644 index 149a7b1bc..000000000 --- a/luabind/luabind/discard_result_policy.hpp +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#ifndef LUABIND_DISCARD_RESULT_POLICY_HPP_INCLUDED -#define LUABIND_DISCARD_RESULT_POLICY_HPP_INCLUDED - -#include -#include - -namespace luabind { namespace detail -{ - struct discard_converter - { - template - void apply(lua_State*, T) {} - }; - - struct discard_result_policy : conversion_policy<0> - { - static void precall(lua_State*, const index_map&) {} - static void postcall(lua_State*, const index_map&) {} - - struct can_only_convert_from_cpp_to_lua {}; - - template - struct apply - { - typedef typename boost::mpl::if_ - , discard_converter - , can_only_convert_from_cpp_to_lua - >::type type; - }; - }; - -}} - -namespace luabind -{ - detail::policy_cons< - detail::discard_result_policy, detail::null_type> const discard_result = {}; - - namespace detail - { - inline void ignore_unused_discard_result() - { - (void)discard_result; - } - } -} - -#endif // LUABIND_DISCARD_RESULT_POLICY_HPP_INCLUDED - diff --git a/luabind/luabind/error.hpp b/luabind/luabind/error.hpp deleted file mode 100644 index b282a411a..000000000 --- a/luabind/luabind/error.hpp +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef LUABIND_ERROR_HPP_INCLUDED -#define LUABIND_ERROR_HPP_INCLUDED - -#include -#include -#include -#include - -struct lua_State; - -namespace luabind -{ - -#ifndef LUABIND_NO_EXCEPTIONS - - // this exception usually means that the lua function you called - // from C++ failed with an error code. You will have to - // read the error code from the top of the lua stack - // the reason why this exception class doesn't contain - // the message itself is that std::string's copy constructor - // may throw, if the copy constructor of an exception that is - // being thrown throws another exception, terminate will be called - // and the entire application is killed. - class LUABIND_API error : public std::exception - { - public: - explicit error(lua_State* L): m_L(L) {} - lua_State* state() const throw() { return m_L; } - virtual const char* what() const throw() - { - return "lua runtime error"; - } - private: - lua_State* m_L; - }; - - // if an object_cast<>() fails, this is thrown - // it is also thrown if the return value of - // a lua function cannot be converted - class LUABIND_API cast_failed : public std::exception - { - public: - cast_failed(lua_State* L, type_id const& i): m_L(L), m_info(i) {} - lua_State* state() const throw() { return m_L; } - type_id info() const throw() { return m_info; } - virtual const char* what() const throw() { return "unable to make cast"; } - private: - lua_State* m_L; - type_id m_info; - }; - -#else - - typedef void(*error_callback_fun)(lua_State*); - typedef void(*cast_failed_callback_fun)(lua_State*, type_id const&); - - LUABIND_API void set_error_callback(error_callback_fun e); - LUABIND_API void set_cast_failed_callback(cast_failed_callback_fun c); - LUABIND_API error_callback_fun get_error_callback(); - LUABIND_API cast_failed_callback_fun get_cast_failed_callback(); - -#endif - - typedef int(*pcall_callback_fun)(lua_State*); - LUABIND_API void set_pcall_callback(pcall_callback_fun e); - LUABIND_API pcall_callback_fun get_pcall_callback(); - -} - -#endif // LUABIND_ERROR_HPP_INCLUDED - diff --git a/luabind/luabind/exception_handler.hpp b/luabind/luabind/exception_handler.hpp deleted file mode 100644 index 0048563af..000000000 --- a/luabind/luabind/exception_handler.hpp +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright Daniel Wallin 2005. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef LUABIND_EXCEPTION_HANDLER_050601_HPP -# define LUABIND_EXCEPTION_HANDLER_050601_HPP - -# include -# include -# include -# include - -# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) -# include -# include -# endif - -namespace luabind { - -# ifndef LUABIND_NO_EXCEPTIONS - -namespace detail -{ - - struct LUABIND_API exception_handler_base - { - exception_handler_base() - : next(0) - {} - - virtual ~exception_handler_base() {} - virtual void handle(lua_State*) const = 0; - - void try_next(lua_State*) const; - - exception_handler_base* next; - }; - - namespace mpl = boost::mpl; - - template - struct exception_handler : exception_handler_base - { -# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) - typedef typename mpl::if_< - boost::is_pointer, E, E const& - >::type argument; -# else - typedef E const& argument; -# endif - - exception_handler(Handler handler) - : handler(handler) - {} - - void handle(lua_State* L) const - { - try - { - try_next(L); - } - catch (argument e) - { - handler(L, e); - } - } - - Handler handler; - }; - - LUABIND_API void handle_exception_aux(lua_State* L); - LUABIND_API void register_exception_handler(exception_handler_base*); - -} // namespace detail - -# endif - -template -void register_exception_handler(Handler handler, boost::type* = 0) -{ -# ifndef LUABIND_NO_EXCEPTIONS - detail::register_exception_handler( - new detail::exception_handler(handler) - ); -# endif -} - -template -boost::optional handle_exceptions(lua_State* L, F fn, boost::type* = 0) -{ -# ifndef LUABIND_NO_EXCEPTIONS - try - { - return fn(); - } - catch (...) - { - detail::handle_exception_aux(L); - } - - return boost::optional(); -# else - return fn(); -# endif -} - -} // namespace luabind - -#endif // LUABIND_EXCEPTION_HANDLER_050601_HPP - diff --git a/luabind/luabind/from_stack.hpp b/luabind/luabind/from_stack.hpp deleted file mode 100644 index 56bc268d8..000000000 --- a/luabind/luabind/from_stack.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2005 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef LUABIND_FROM_STACK_050715_HPP -#define LUABIND_FROM_STACK_050715_HPP - -namespace luabind { - -struct from_stack -{ - from_stack(lua_State* interpreter, int index) - : interpreter(interpreter) - , index(index) - {} - - lua_State* interpreter; - int index; -}; - -} // namespace luabind - -#endif // LUABIND_FROM_STACK_050715_HPP - diff --git a/luabind/luabind/function.hpp b/luabind/luabind/function.hpp deleted file mode 100644 index e156fbfcb..000000000 --- a/luabind/luabind/function.hpp +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright Daniel Wallin 2008. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef LUABIND_FUNCTION2_081014_HPP -# define LUABIND_FUNCTION2_081014_HPP - -# include -# include -# include - -namespace luabind { - -namespace detail -{ - - template - struct function_registration : registration - { - function_registration(char const* name, F f, Policies const& policies) - : name(name) - , f(f) - , policies(policies) - {} - - void register_(lua_State* L) const - { - object fn = make_function(L, f, deduce_signature(f), policies); - - add_overload( - object(from_stack(L, -1)) - , name - , fn - ); - } - - char const* name; - F f; - Policies policies; - }; - - LUABIND_API bool is_luabind_function(lua_State* L, int index); - -} // namespace detail - -template -scope def(char const* name, F f, Policies const& policies) -{ - return scope(std::auto_ptr( - new detail::function_registration(name, f, policies))); -} - -template -scope def(char const* name, F f) -{ - return def(name, f, detail::null_type()); -} - -} // namespace luabind - -#endif // LUABIND_FUNCTION2_081014_HPP - diff --git a/luabind/luabind/get_main_thread.hpp b/luabind/luabind/get_main_thread.hpp deleted file mode 100644 index f94d6e4bc..000000000 --- a/luabind/luabind/get_main_thread.hpp +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright Daniel Wallin 2009. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef LUABIND_GET_MAIN_THREAD_090321_HPP -# define LUABIND_GET_MAIN_THREAD_090321_HPP - -# include - -namespace luabind { - -LUABIND_API lua_State* get_main_thread(lua_State* L); - -} // namespace luabind - -#endif // LUABIND_GET_MAIN_THREAD_090321_HPP diff --git a/luabind/luabind/get_pointer.hpp b/luabind/luabind/get_pointer.hpp deleted file mode 100644 index b9aae48a7..000000000 --- a/luabind/luabind/get_pointer.hpp +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2005 Daniel Wallin - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef LUABIND_GET_POINTER_051023_HPP -# define LUABIND_GET_POINTER_051023_HPP - -// -// We need these overloads in the luabind namespace. -// - -# include - -namespace luabind { - -using boost::get_pointer; - -} // namespace luabind - -#endif // LUABIND_GET_POINTER_051023_HPP - diff --git a/luabind/luabind/handle.hpp b/luabind/luabind/handle.hpp deleted file mode 100644 index 14adacbae..000000000 --- a/luabind/luabind/handle.hpp +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) 2005 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef LUABIND_HANDLE_050420_HPP -#define LUABIND_HANDLE_050420_HPP - -#include -#include - -namespace luabind { - -// A reference to a Lua value. Represents an entry in the -// registry table. -class handle -{ -public: - handle(); - handle(lua_State* interpreter, int stack_index); - handle(lua_State* main, lua_State* interpreter, int stack_index); - handle(handle const& other); - ~handle(); - - handle& operator=(handle const& other); - void swap(handle& other); - - void push(lua_State* interpreter) const; - - lua_State* interpreter() const; - - void replace(lua_State* interpreter, int stack_index); - -private: - lua_State* m_interpreter; - int m_index; -}; - -inline handle::handle() - : m_interpreter(0) - , m_index(LUA_NOREF) -{} - -inline handle::handle(handle const& other) - : m_interpreter(other.m_interpreter) - , m_index(LUA_NOREF) -{ - if (m_interpreter == 0) return; - lua_rawgeti(m_interpreter, LUA_REGISTRYINDEX, other.m_index); - m_index = luaL_ref(m_interpreter, LUA_REGISTRYINDEX); -} - -inline handle::handle(lua_State* interpreter, int stack_index) - : m_interpreter(interpreter) - , m_index(LUA_NOREF) -{ - lua_pushvalue(interpreter, stack_index); - m_index = luaL_ref(interpreter, LUA_REGISTRYINDEX); -} - -inline handle::handle(lua_State* main, lua_State* interpreter, int stack_index) - : m_interpreter(main) - , m_index(LUA_NOREF) -{ - lua_pushvalue(interpreter, stack_index); - m_index = luaL_ref(interpreter, LUA_REGISTRYINDEX); -} - -inline handle::~handle() -{ - if (m_interpreter && m_index != LUA_NOREF) - luaL_unref(m_interpreter, LUA_REGISTRYINDEX, m_index); -} - -inline handle& handle::operator=(handle const& other) -{ - handle(other).swap(*this); - return *this; -} - -inline void handle::swap(handle& other) -{ - std::swap(m_interpreter, other.m_interpreter); - std::swap(m_index, other.m_index); -} - -inline void handle::push(lua_State* interpreter) const -{ - lua_rawgeti(interpreter, LUA_REGISTRYINDEX, m_index); -} - -inline lua_State* handle::interpreter() const -{ - return m_interpreter; -} - -inline void handle::replace(lua_State* interpreter, int stack_index) -{ - lua_pushvalue(interpreter, stack_index); - lua_rawseti(interpreter, LUA_REGISTRYINDEX, m_index); -} - -template<> -struct value_wrapper_traits -{ - typedef boost::mpl::true_ is_specialized; - - static lua_State* interpreter(handle const& value) - { - return value.interpreter(); - } - - static void unwrap(lua_State* interpreter, handle const& value) - { - value.push(interpreter); - } - - static bool check(...) - { - return true; - } -}; - -} // namespace luabind - -#endif // LUABIND_HANDLE_050420_HPP - diff --git a/luabind/luabind/iterator_policy.hpp b/luabind/luabind/iterator_policy.hpp deleted file mode 100644 index b1f827fe3..000000000 --- a/luabind/luabind/iterator_policy.hpp +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright Daniel Wallin 2007. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef LUABIND_ITERATOR_POLICY__071111_HPP -# define LUABIND_ITERATOR_POLICY__071111_HPP - -# include -# include -# include - -namespace luabind { namespace detail { - -template -struct iterator -{ - static int next(lua_State* L) - { - iterator* self = static_cast( - lua_touserdata(L, lua_upvalueindex(1))); - - if (self->first != self->last) - { - convert_to_lua(L, *self->first); - ++self->first; - } - else - { - lua_pushnil(L); - } - - return 1; - } - - static int destroy(lua_State* L) - { - iterator* self = static_cast(lua_touserdata(L, 1)); - self->~iterator(); - return 0; - } - - iterator(Iterator first, Iterator last) - : first(first) - , last(last) - {} - - Iterator first; - Iterator last; -}; - -template -int make_range(lua_State* L, Iterator first, Iterator last) -{ - void* storage = lua_newuserdata(L, sizeof(iterator)); - lua_newtable(L); - lua_pushcclosure(L, iterator::destroy, 0); - lua_setfield(L, -2, "__gc"); - lua_setmetatable(L, -2); - lua_pushcclosure(L, iterator::next, 1); - new (storage) iterator(first, last); - return 1; -} - -template -int make_range(lua_State* L, Container& container) -{ - return make_range(L, container.begin(), container.end()); -} - -struct iterator_converter -{ - typedef iterator_converter type; - - template - void apply(lua_State* L, Container& container) - { - make_range(L, container); - } - - template - void apply(lua_State* L, Container const& container) - { - make_range(L, container); - } -}; - -struct iterator_policy : conversion_policy<0> -{ - static void precall(lua_State*, index_map const&) - {} - - static void postcall(lua_State*, index_map const&) - {} - - template - struct apply - { - typedef iterator_converter type; - }; -}; - -}} // namespace luabind::detail - -namespace luabind { namespace { - -LUABIND_ANONYMOUS_FIX detail::policy_cons< - detail::iterator_policy, detail::null_type> return_stl_iterator; - -}} // namespace luabind::unnamed - -#endif // LUABIND_ITERATOR_POLICY__071111_HPP - diff --git a/luabind/luabind/lua502.hpp b/luabind/luabind/lua502.hpp deleted file mode 100644 index 5006128ec..000000000 --- a/luabind/luabind/lua502.hpp +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2004 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef LUA_502_HPP -#define LUA_502_HPP - -#if LUA_VERSION_NUM >= 502 - -inline LUA_API int lua_equal(lua_State *L, int idx1, int idx2) -{ - return lua_compare(L, idx1, idx2, LUA_OPEQ); -} - -inline LUA_API int lua_lessthan(lua_State *L, int idx1, int idx2) -{ - return lua_compare(L, idx1, idx2, LUA_OPLT); -} - -#undef lua_strlen -#define lua_strlen lua_rawlen - -#undef lua_getfenv -#define lua_getfenv lua_getuservalue - -#undef lua_setfenv -#define lua_setfenv lua_setuservalue - -#undef lua_open -#define lua_open luaL_newstate - -#else // LUA_VERSION_NUM >= 502 - -#define lua_pushglobaltable(L) lua_pushvalue(L, LUA_GLOBALSINDEX) - -#endif // LUA_VERSION_NUM >= 502 - -#endif \ No newline at end of file diff --git a/luabind/luabind/lua_include.hpp b/luabind/luabind/lua_include.hpp deleted file mode 100644 index 7327b533e..000000000 --- a/luabind/luabind/lua_include.hpp +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef LUA_INCLUDE_HPP_INCLUDED -#define LUA_INCLUDE_HPP_INCLUDED - -#ifndef LUABIND_CPLUSPLUS_LUA -extern "C" -{ -#endif - - #include "lua.h" - #include "lauxlib.h" - -#ifndef LUABIND_CPLUSPLUS_LUA -} -#endif - -#endif - diff --git a/luabind/luabind/luabind.hpp b/luabind/luabind/luabind.hpp deleted file mode 100644 index 82298484c..000000000 --- a/luabind/luabind/luabind.hpp +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#ifndef LUABIND_BIND_HPP_INCLUDED -#define LUABIND_BIND_HPP_INCLUDED - -#include -#include -#include -#include - -#endif // LUABIND_BIND_HPP_INCLUDED diff --git a/luabind/luabind/make_function.hpp b/luabind/luabind/make_function.hpp deleted file mode 100644 index a1ac8716b..000000000 --- a/luabind/luabind/make_function.hpp +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright Daniel Wallin 2008. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef LUABIND_MAKE_FUNCTION_081014_HPP -# define LUABIND_MAKE_FUNCTION_081014_HPP - -# include -# include -# include -# include -# include -# include - -namespace luabind { - -namespace detail -{ -# ifndef LUABIND_NO_EXCEPTIONS - LUABIND_API void handle_exception_aux(lua_State* L); -# endif - -// MSVC complains about member being sensitive to alignment (C4121) -// when F is a pointer to member of a class with virtual bases. -# ifdef BOOST_MSVC -# pragma pack(push) -# pragma pack(16) -# endif - - template - struct function_object_impl : function_object - { - function_object_impl(F f, Policies const& policies) - : function_object(&entry_point) - , f(f) - , policies(policies) - {} - - int call(lua_State* L, invoke_context& ctx) const - { - return invoke(L, *this, ctx, f, Signature(), policies); - } - - void format_signature(lua_State* L, char const* function) const - { - detail::format_signature(L, function, Signature()); - } - - static int entry_point(lua_State* L) - { - function_object_impl const* impl = - *(function_object_impl const**)lua_touserdata(L, lua_upvalueindex(1)); - - invoke_context ctx; - - int results = 0; - -# ifndef LUABIND_NO_EXCEPTIONS - bool exception_caught = false; - - try - { - results = invoke( - L, *impl, ctx, impl->f, Signature(), impl->policies); - } - catch (...) - { - exception_caught = true; - handle_exception_aux(L); - } - - if (exception_caught) - lua_error(L); -# else - results = invoke(L, *impl, ctx, impl->f, Signature(), impl->policies); -# endif - - if (!ctx) - { - ctx.format_error(L, impl); - lua_error(L); - } - - return results; - } - - F f; - Policies policies; - }; - -# ifdef BOOST_MSVC -# pragma pack(pop) -# endif - - LUABIND_API object make_function_aux( - lua_State* L, function_object* impl - ); - - LUABIND_API void add_overload(object const&, char const*, object const&); - -} // namespace detail - -template -object make_function(lua_State* L, F f, Signature, Policies) -{ - return detail::make_function_aux( - L - , new detail::function_object_impl( - f, Policies() - ) - ); -} - -template -object make_function(lua_State* L, F f) -{ - return make_function(L, detail::deduce_signature(f), detail::null_type()); -} - -} // namespace luabind - -#endif // LUABIND_MAKE_FUNCTION_081014_HPP - diff --git a/luabind/luabind/nil.hpp b/luabind/luabind/nil.hpp deleted file mode 100644 index 5f9ba4db1..000000000 --- a/luabind/luabind/nil.hpp +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2004 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef LUABIND_NIL_HPP -#define LUABIND_NIL_HPP - -#include - -namespace luabind -{ - namespace detail - { - struct nil_type {}; - } - - // defined in class.cpp - extern LUABIND_API detail::nil_type nil; -} - -#endif - diff --git a/luabind/luabind/object.hpp b/luabind/luabind/object.hpp deleted file mode 100644 index 0feb7bd48..000000000 --- a/luabind/luabind/object.hpp +++ /dev/null @@ -1,1412 +0,0 @@ -// Copyright (c) 2005 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef LUABIND_OBJECT_050419_HPP -#define LUABIND_OBJECT_050419_HPP - -#include // detail::push() -#include // detail::push() -#include // value_wrapper_traits specializations -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include // REFACTOR -#include - -#include // iterator - -#include -#include - -namespace luabind { - -namespace detail -{ - namespace mpl = boost::mpl; - - template - void push_aux(lua_State* interpreter, T& value, ConverterGenerator*) - { - typedef typename boost::mpl::if_< - boost::is_reference_wrapper - , BOOST_DEDUCED_TYPENAME boost::unwrap_reference::type& - , T - >::type unwrapped_type; - - typename mpl::apply_wrap2< - ConverterGenerator,unwrapped_type,cpp_to_lua - >::type cv; - - cv.apply( - interpreter - , boost::implicit_cast< - BOOST_DEDUCED_TYPENAME boost::unwrap_reference::type& - >(value) - ); - } - - template - void push(lua_State* interpreter, T& value, Policies const&) - { - typedef typename find_conversion_policy< - 0 - , Policies - >::type converter_policy; - - push_aux(interpreter, value, (converter_policy*)0); - } - - template - void push(lua_State* interpreter, T& value) - { - push(interpreter, value, null_type()); - } - -} // namespace detail - -namespace adl -{ - namespace mpl = boost::mpl; - - template - class object_interface; - - namespace is_object_interface_aux - { - typedef char (&yes)[1]; - typedef char (&no)[2]; - - template - yes check(object_interface*); - no check(void*); - - template - struct impl - { - BOOST_STATIC_CONSTANT(bool, value = - sizeof(is_object_interface_aux::check((T*)0)) == sizeof(yes) - ); - - typedef mpl::bool_ type; - }; - - } // namespace detail - - template - struct is_object_interface - : is_object_interface_aux::impl::type - {}; - - template - struct enable_binary -# ifndef BOOST_NO_SFINAE - : boost::enable_if< - mpl::or_< - is_object_interface - , is_object_interface - > - , R - > - {}; -# else - { - typedef R type; - }; -# endif - - template - int binary_interpreter(lua_State*& L, T const& lhs, U const& rhs - , boost::mpl::true_, boost::mpl::true_) - { - L = value_wrapper_traits::interpreter(lhs); - lua_State* L2 = value_wrapper_traits::interpreter(rhs); - - // you are comparing objects with different interpreters - // that's not allowed. - assert(L == L2 || L == 0 || L2 == 0); - - // if the two objects we compare have different interpreters - // then they - - if (L != L2) return -1; - if (L == 0) return 1; - return 0; - } - - template - int binary_interpreter(lua_State*& L, T const& x, U const& - , boost::mpl::true_, boost::mpl::false_) - { - L = value_wrapper_traits::interpreter(x); - return 0; - } - - template - int binary_interpreter(lua_State*& L, T const&, U const& x, boost::mpl::false_, boost::mpl::true_) - { - L = value_wrapper_traits::interpreter(x); - return 0; - } - - template - int binary_interpreter(lua_State*& L, T const& x, U const& y) - { - return binary_interpreter( - L - , x - , y - , is_value_wrapper() - , is_value_wrapper() - ); - } - -#define LUABIND_BINARY_OP_DEF(op, fn) \ - template \ - typename enable_binary::type \ - operator op(LHS const& lhs, RHS const& rhs) \ - { \ - lua_State* L = 0; \ - switch (binary_interpreter(L, lhs, rhs)) \ - { \ - case 1: \ - return true; \ - case -1: \ - return false; \ - } \ -\ - assert(L); \ -\ - detail::stack_pop pop1(L, 1); \ - detail::push(L, lhs); \ - detail::stack_pop pop2(L, 1); \ - detail::push(L, rhs); \ -\ - return fn(L, -1, -2) != 0; \ - } - -LUABIND_BINARY_OP_DEF(==, lua_equal) -LUABIND_BINARY_OP_DEF(<, lua_lessthan) - - template - std::ostream& operator<<(std::ostream& os - , object_interface const& v) - { - using namespace luabind; - lua_State* interpreter = value_wrapper_traits::interpreter( - static_cast(v)); - detail::stack_pop pop(interpreter, 1); - value_wrapper_traits::unwrap(interpreter - , static_cast(v)); - char const* p = lua_tostring(interpreter, -1); - std::size_t len = lua_strlen(interpreter, -1); - std::copy(p, p + len, std::ostream_iterator(os)); - return os; - } - -#undef LUABIND_BINARY_OP_DEF - - template - typename enable_binary::type - operator>(LHS const& lhs, RHS const& rhs) - { - return !(lhs < rhs || lhs == rhs); - } - - template - typename enable_binary::type - operator<=(LHS const& lhs, RHS const& rhs) - { - return lhs < rhs || lhs == rhs; - } - - template - typename enable_binary::type - operator>=(LHS const& lhs, RHS const& rhs) - { - return !(lhs < rhs); - } - - template - typename enable_binary::type - operator!=(LHS const& lhs, RHS const& rhs) - { - return !(lhs == rhs); - } - - template - struct call_proxy; - - template - class index_proxy; - - class object; - - template - class object_interface - { - struct safe_bool_type {}; - public: - ~object_interface() {} - - call_proxy > operator()(); - - template - call_proxy< - Derived - , boost::tuples::tuple - > operator()(A0 const& a0) - { - typedef boost::tuples::tuple arguments; - - return call_proxy( - derived() - , arguments(&a0) - ); - } - - template - call_proxy< - Derived - , boost::tuples::tuple - > operator()(A0 const& a0, A1 const& a1) - { - typedef boost::tuples::tuple arguments; - - return call_proxy( - derived() - , arguments(&a0, &a1) - ); - } - - // The rest of the overloads are PP-generated. - #define BOOST_PP_ITERATION_PARAMS_1 (3, \ - (3, LUABIND_MAX_ARITY, )) - #include BOOST_PP_ITERATE() - - operator safe_bool_type*() const - { - lua_State* L = value_wrapper_traits::interpreter(derived()); - - if (!L) - return 0; - - value_wrapper_traits::unwrap(L, derived()); - detail::stack_pop pop(L, 1); - - return lua_toboolean(L, -1) == 1 ? (safe_bool_type*)1 : 0; - } - - private: - Derived& derived() - { - return *static_cast(this); - } - - Derived const& derived() const - { - return *static_cast(this); - } - }; - -#ifdef LUABIND_USE_VALUE_WRAPPER_TAG - struct iterator_proxy_tag; -#endif - - template - class iterator_proxy - : public object_interface > - { - public: -#ifdef LUABIND_USE_VALUE_WRAPPER_TAG - typedef iterator_proxy_tag value_wrapper_tag; -#endif - - iterator_proxy(lua_State* interpreter, handle const& table, handle const& key) - : m_interpreter(interpreter) - , m_table_index(lua_gettop(interpreter) + 1) - , m_key_index(m_table_index + 1) - { - table.push(m_interpreter); - key.push(m_interpreter); - } - - iterator_proxy(iterator_proxy const& other) - : m_interpreter(other.m_interpreter) - , m_table_index(other.m_table_index) - , m_key_index(other.m_key_index) - { - other.m_interpreter = 0; - } - - ~iterator_proxy() - { - if (m_interpreter) - lua_pop(m_interpreter, 2); - } - - // this will set the value to nil - iterator_proxy & operator=(luabind::detail::nil_type) - { - lua_pushvalue(m_interpreter, m_key_index); - lua_pushnil(m_interpreter); - AccessPolicy::set(m_interpreter, m_table_index); - return *this; - } - - template - iterator_proxy& operator=(T const& value) - { - lua_pushvalue(m_interpreter, m_key_index); - detail::push(m_interpreter, value); - AccessPolicy::set(m_interpreter, m_table_index); - return *this; - } - - template - index_proxy > operator[](Key const& key) - { - return index_proxy >( - *this, m_interpreter, key - ); - } - - // This is non-const to prevent conversion on lvalues. - operator object(); - - lua_State* interpreter() const - { - return m_interpreter; - } - - // TODO: Why is it non-const? - void push(lua_State* interpreter) - { - assert(interpreter == m_interpreter); - lua_pushvalue(m_interpreter, m_key_index); - AccessPolicy::get(m_interpreter, m_table_index); - } - - private: - mutable lua_State* m_interpreter; - int m_table_index; - int m_key_index; - }; - -} // namespace adl - -namespace detail -{ - struct basic_access - { - static void set(lua_State* interpreter, int table) - { - lua_settable(interpreter, table); - } - - static void get(lua_State* interpreter, int table) - { - lua_gettable(interpreter, table); - } - }; - - struct raw_access - { - static void set(lua_State* interpreter, int table) - { - lua_rawset(interpreter, table); - } - - static void get(lua_State* interpreter, int table) - { - lua_rawget(interpreter, table); - } - }; - - template - class basic_iterator - : public boost::iterator_facade< - basic_iterator - , adl::iterator_proxy - , boost::single_pass_traversal_tag - , adl::iterator_proxy - > - { - public: - basic_iterator() - : m_interpreter(0) - {} - - template - explicit basic_iterator(ValueWrapper const& value_wrapper) - : m_interpreter( - value_wrapper_traits::interpreter(value_wrapper) - ) - { - detail::stack_pop pop(m_interpreter, 1); - value_wrapper_traits::unwrap(m_interpreter, value_wrapper); - - lua_pushnil(m_interpreter); - if (lua_next(m_interpreter, -2) != 0) - { - detail::stack_pop pop(m_interpreter, 2); - handle(m_interpreter, -2).swap(m_key); - } - else - { - m_interpreter = 0; - return; - } - - handle(m_interpreter, -1).swap(m_table); - } - - adl::object key() const; - - private: - friend class boost::iterator_core_access; - - void increment() - { - m_table.push(m_interpreter); - m_key.push(m_interpreter); - - detail::stack_pop pop(m_interpreter, 1); - - if (lua_next(m_interpreter, -2) != 0) - { - m_key.replace(m_interpreter, -2); - lua_pop(m_interpreter, 2); - } - else - { - m_interpreter = 0; - handle().swap(m_table); - handle().swap(m_key); - } - } - - bool equal(basic_iterator const& other) const - { - if (m_interpreter == 0 && other.m_interpreter == 0) - return true; - - if (m_interpreter != other.m_interpreter) - return false; - - detail::stack_pop pop(m_interpreter, 2); - m_key.push(m_interpreter); - other.m_key.push(m_interpreter); - return lua_equal(m_interpreter, -2, -1) != 0; - } - - adl::iterator_proxy dereference() const - { - return adl::iterator_proxy(m_interpreter, m_table, m_key); - } - - lua_State* m_interpreter; - handle m_table; - handle m_key; - }; - -// Needed because of some strange ADL issues. -#if BOOST_VERSION < 105700 - -#define LUABIND_OPERATOR_ADL_WKND(op) \ - inline bool operator op( \ - basic_iterator const& x \ - , basic_iterator const& y) \ - { \ - return boost::operator op(x, y); \ - } \ - \ - inline bool operator op( \ - basic_iterator const& x \ - , basic_iterator const& y) \ - { \ - return boost::operator op(x, y); \ - } - - LUABIND_OPERATOR_ADL_WKND(==) - LUABIND_OPERATOR_ADL_WKND(!=) - -#undef LUABIND_OPERATOR_ADL_WKND -#endif - -} // namespace detail - -namespace adl -{ - -#ifdef LUABIND_USE_VALUE_WRAPPER_TAG - struct index_proxy_tag; -#endif - - template - class index_proxy - : public object_interface > - { - public: -#ifdef LUABIND_USE_VALUE_WRAPPER_TAG - typedef index_proxy_tag value_wrapper_tag; -#endif - - typedef index_proxy this_type; - - template - index_proxy(Next const& next, lua_State* interpreter, Key const& key) - : m_interpreter(interpreter) - , m_key_index(lua_gettop(interpreter) + 1) - , m_next(next) - { - detail::push(m_interpreter, key); - } - - index_proxy(index_proxy const& other) - : m_interpreter(other.m_interpreter) - , m_key_index(other.m_key_index) - , m_next(other.m_next) - { - other.m_interpreter = 0; - } - - ~index_proxy() - { - if (m_interpreter) - lua_pop(m_interpreter, 1); - } - - // This is non-const to prevent conversion on lvalues. - operator object(); - - // this will set the value to nil - this_type& operator=(luabind::detail::nil_type) - { - value_wrapper_traits::unwrap(m_interpreter, m_next); - detail::stack_pop pop(m_interpreter, 1); - - lua_pushvalue(m_interpreter, m_key_index); - lua_pushnil(m_interpreter); - lua_settable(m_interpreter, -3); - return *this; - } - - template - this_type& operator=(T const& value) - { - value_wrapper_traits::unwrap(m_interpreter, m_next); - detail::stack_pop pop(m_interpreter, 1); - - lua_pushvalue(m_interpreter, m_key_index); - detail::push(m_interpreter, value); - lua_settable(m_interpreter, -3); - return *this; - } - - this_type& operator=(this_type const& value) - { - value_wrapper_traits::unwrap(m_interpreter, m_next); - detail::stack_pop pop(m_interpreter, 1); - - lua_pushvalue(m_interpreter, m_key_index); - detail::push(m_interpreter, value); - lua_settable(m_interpreter, -3); - return *this; - } - - template - index_proxy operator[](T const& key) - { - return index_proxy(*this, m_interpreter, key); - } - - void push(lua_State* interpreter); - - lua_State* interpreter() const - { - return m_interpreter; - } - - private: - struct hidden_type {}; - -// this_type& operator=(index_proxy const&); - - mutable lua_State* m_interpreter; - int m_key_index; - - Next const& m_next; - }; - -} // namespace adl - -typedef detail::basic_iterator iterator; -typedef detail::basic_iterator raw_iterator; - -#ifndef LUABIND_USE_VALUE_WRAPPER_TAG -template -struct value_wrapper_traits > -#else -template<> -struct value_wrapper_traits -#endif -{ - typedef boost::mpl::true_ is_specialized; - - template - static lua_State* interpreter(adl::index_proxy const& proxy) - { - return proxy.interpreter(); - } - - template - static void unwrap(lua_State* interpreter, adl::index_proxy const& proxy) - { - const_cast&>(proxy).push(interpreter); - } -}; - -#ifndef LUABIND_USE_VALUE_WRAPPER_TAG -template -struct value_wrapper_traits > -#else -template<> -struct value_wrapper_traits -#endif -{ - typedef boost::mpl::true_ is_specialized; - - template - static lua_State* interpreter(Proxy const& p) - { - return p.interpreter(); - } - - template - static void unwrap(lua_State* interpreter, Proxy const& p) - { - // TODO: Why const_cast? - const_cast(p).push(interpreter); - } -}; - -namespace adl -{ - - // An object holds a reference to a Lua value residing - // in the registry. - class object : public object_interface - { - public: - object() - {} - - explicit object(handle const& other) - : m_handle(other) - {} - - explicit object(from_stack const& stack_reference) - : m_handle(stack_reference.interpreter, stack_reference.index) - { - } - - template - object(lua_State* interpreter, T const& value) - { - detail::push(interpreter, value); - detail::stack_pop pop(interpreter, 1); - handle(interpreter, -1).swap(m_handle); - } - - template - object(lua_State* interpreter, T const& value, Policies const&) - { - detail::push(interpreter, value, Policies()); - detail::stack_pop pop(interpreter, 1); - handle(interpreter, -1).swap(m_handle); - } - - void push(lua_State* interpreter) const; - lua_State* interpreter() const; - bool is_valid() const; - - template - index_proxy operator[](T const& key) const - { - return index_proxy( - *this, m_handle.interpreter(), key - ); - } - - void swap(object& other) - { - m_handle.swap(other.m_handle); - } - - private: - handle m_handle; - }; - - inline void object::push(lua_State* interpreter) const - { - m_handle.push(interpreter); - } - - inline lua_State* object::interpreter() const - { - return m_handle.interpreter(); - } - - inline bool object::is_valid() const - { - return m_handle.interpreter() != 0; - } - - class argument : public object_interface - { - public: - argument(from_stack const& stack_reference) - : m_interpreter(stack_reference.interpreter) - , m_index(stack_reference.index) - { - if (m_index < 0) - m_index = lua_gettop(m_interpreter) - m_index + 1; - } - - template - index_proxy operator[](T const& key) const - { - return index_proxy(*this, m_interpreter, key); - } - - void push(lua_State* L) const - { - lua_pushvalue(L, m_index); - } - - lua_State* interpreter() const - { - return m_interpreter; - } - - private: - lua_State* m_interpreter; - int m_index; - }; - -} // namespace adl - -using adl::object; -using adl::argument; - -#ifndef LUABIND_USE_VALUE_WRAPPER_TAG -template -struct value_wrapper_traits > -#else -template<> -struct value_wrapper_traits -#endif -{ - typedef boost::mpl::true_ is_specialized; - - template - static lua_State* interpreter(adl::call_proxy const& proxy) - { - return value_wrapper_traits::interpreter(*proxy.value_wrapper); - } - - template - static void unwrap(lua_State*, adl::call_proxy const& proxy) - { - object result = const_cast&>(proxy); - result.push(result.interpreter()); - } -}; - -template<> -struct value_wrapper_traits -{ - typedef boost::mpl::true_ is_specialized; - - static lua_State* interpreter(object const& value) - { - return value.interpreter(); - } - - static void unwrap(lua_State* interpreter, object const& value) - { - value.push(interpreter); - } - - static bool check(...) - { - return true; - } -}; - -template<> -struct value_wrapper_traits -{ - typedef boost::mpl::true_ is_specialized; - - static lua_State* interpreter(argument const& value) - { - return value.interpreter(); - } - - static void unwrap(lua_State* interpreter, argument const& value) - { - value.push(interpreter); - } - - static bool check(...) - { - return true; - } -}; - -template -inline void adl::index_proxy::push(lua_State* interpreter) -{ - assert(interpreter == m_interpreter); - - value_wrapper_traits::unwrap(m_interpreter, m_next); - - lua_pushvalue(m_interpreter, m_key_index); - lua_gettable(m_interpreter, -2); - lua_remove(m_interpreter, -2); -} - -template -inline adl::index_proxy::operator object() -{ - detail::stack_pop pop(m_interpreter, 1); - push(m_interpreter); - return object(from_stack(m_interpreter, -1)); -} - -template -adl::iterator_proxy::operator object() -{ - lua_pushvalue(m_interpreter, m_key_index); - AccessPolicy::get(m_interpreter, m_table_index); - detail::stack_pop pop(m_interpreter, 1); - return object(from_stack(m_interpreter, -1)); -} - -template -object detail::basic_iterator::key() const -{ - return object(m_key); -} - -namespace detail -{ - - template< - class T - , class ValueWrapper - , class Policies - , class ErrorPolicy - , class ReturnType - > - ReturnType object_cast_aux( - ValueWrapper const& value_wrapper - , T* - , Policies* - , ErrorPolicy* - , ReturnType* - ) - { - lua_State* interpreter = value_wrapper_traits::interpreter( - value_wrapper - ); - -#ifndef LUABIND_NO_ERROR_CHECKING - if (!interpreter) - return ErrorPolicy::handle_error(interpreter, typeid(void)); -#endif - - value_wrapper_traits::unwrap(interpreter, value_wrapper); - - detail::stack_pop pop(interpreter, 1); - - typedef typename detail::find_conversion_policy< - 0 - , Policies - >::type converter_generator; - - typename mpl::apply_wrap2::type cv; - -#ifndef LUABIND_NO_ERROR_CHECKING - if (cv.match(interpreter, LUABIND_DECORATE_TYPE(T), -1) < 0) - { - return ErrorPolicy::handle_error(interpreter, typeid(T)); - } -#endif - - return cv.apply(interpreter, LUABIND_DECORATE_TYPE(T), -1); - } - -# ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable:4702) // unreachable code -# endif - - template - struct throw_error_policy - { - static T handle_error(lua_State* interpreter, type_id const& type_info) - { -#ifndef LUABIND_NO_EXCEPTIONS - throw cast_failed(interpreter, type_info); -#else - cast_failed_callback_fun e = get_cast_failed_callback(); - if (e) e(interpreter, type_info); - - assert(0 && "object_cast failed. If you want to handle this error use " - "luabind::set_error_callback()"); - std::terminate(); -#endif - return *(typename boost::remove_reference::type*)0; - } - }; - -# ifdef BOOST_MSVC -# pragma warning(pop) -# endif - - template - struct nothrow_error_policy - { - static boost::optional handle_error(lua_State*, type_id const&) - { - return boost::optional(); - } - }; - -} // namespace detail - -template -T object_cast(ValueWrapper const& value_wrapper) -{ - return detail::object_cast_aux( - value_wrapper - , (T*)0 - , (detail::null_type*)0 - , (detail::throw_error_policy*)0 - , (T*)0 - ); -} - -template -T object_cast(ValueWrapper const& value_wrapper, Policies const&) -{ - return detail::object_cast_aux( - value_wrapper - , (T*)0 - , (Policies*)0 - , (detail::throw_error_policy*)0 - , (T*)0 - ); -} - -template -boost::optional object_cast_nothrow(ValueWrapper const& value_wrapper) -{ - return detail::object_cast_aux( - value_wrapper - , (T*)0 - , (detail::null_type*)0 - , (detail::nothrow_error_policy*)0 - , (boost::optional*)0 - ); -} - -template -boost::optional object_cast_nothrow(ValueWrapper const& value_wrapper, Policies const&) -{ - return detail::object_cast_aux( - value_wrapper - , (T*)0 - , (Policies*)0 - , (detail::nothrow_error_policy*)0 - , (boost::optional*)0 - ); -} - -namespace detail -{ - - template - struct push_args_from_tuple - { - template - inline static void apply(lua_State* L, const boost::tuples::cons& x, const Policies& p) - { - convert_to_lua_p(L, *x.get_head(), p); - push_args_from_tuple::apply(L, x.get_tail(), p); - } - - template - inline static void apply(lua_State* L, const boost::tuples::cons& x) - { - convert_to_lua(L, *x.get_head()); - push_args_from_tuple::apply(L, x.get_tail()); - } - - template - inline static void apply(lua_State*, const boost::tuples::null_type&, const Policies&) {} - - inline static void apply(lua_State*, const boost::tuples::null_type&) {} - }; - -} // namespace detail - -namespace adl -{ - - template - struct call_proxy - { - call_proxy(ValueWrapper& value_wrapper, Arguments arguments) - : value_wrapper(&value_wrapper) - , arguments(arguments) - {} - - call_proxy(call_proxy const& other) - : value_wrapper(other.value_wrapper) - , arguments(other.arguments) - { - other.value_wrapper = 0; - } - - ~call_proxy() - { - if (value_wrapper) - call((detail::null_type*)0); - } - - operator object() - { - return call((detail::null_type*)0); - } - - template - object operator[](Policies const&) - { - return call((Policies*)0); - } - - template - object call(Policies*) - { - lua_State* interpreter = value_wrapper_traits::interpreter( - *value_wrapper - ); - - value_wrapper_traits::unwrap( - interpreter - , *value_wrapper - ); - - value_wrapper = 0; - - detail::push_args_from_tuple<1>::apply(interpreter, arguments, Policies()); - - if (detail::pcall(interpreter, boost::tuples::length::value, 1)) - { -#ifndef LUABIND_NO_EXCEPTIONS - throw luabind::error(interpreter); -#else - error_callback_fun e = get_error_callback(); - if (e) e(interpreter); - - assert(0 && "the lua function threw an error and exceptions are disabled." - "if you want to handle this error use luabind::set_error_callback()"); - std::terminate(); -#endif - } - - detail::stack_pop pop(interpreter, 1); - return object(from_stack(interpreter, -1)); - } - - mutable ValueWrapper* value_wrapper; - Arguments arguments; - }; - - template - call_proxy > - object_interface::operator()() - { - return call_proxy >( - derived() - , boost::tuples::tuple<>() - ); - } - - // Simple value_wrapper adaptor with the sole purpose of helping with - // overload resolution. Use this as a function parameter type instead - // of "object" or "argument" to restrict the parameter to Lua tables. - template - struct table : Base - { - table(from_stack const& stack_reference) - : Base(stack_reference) - {} - }; - -} // namespace adl - -using adl::table; - -template -struct value_wrapper_traits > - : value_wrapper_traits -{ - static bool check(lua_State* L, int idx) - { - return value_wrapper_traits::check(L, idx) && - lua_istable(L, idx); - } -}; - -inline object newtable(lua_State* interpreter) -{ - lua_newtable(interpreter); - detail::stack_pop pop(interpreter, 1); - return object(from_stack(interpreter, -1)); -} - -// this could be optimized by returning a proxy -inline object globals(lua_State* interpreter) -{ - lua_pushglobaltable(interpreter); - detail::stack_pop pop(interpreter, 1); - return object(from_stack(interpreter, -1)); -} - -// this could be optimized by returning a proxy -inline object registry(lua_State* interpreter) -{ - lua_pushvalue(interpreter, LUA_REGISTRYINDEX); - detail::stack_pop pop(interpreter, 1); - return object(from_stack(interpreter, -1)); -} - -template -inline object gettable(ValueWrapper const& table, K const& key) -{ - lua_State* interpreter = value_wrapper_traits::interpreter( - table - ); - - value_wrapper_traits::unwrap(interpreter, table); - detail::stack_pop pop(interpreter, 2); - detail::push(interpreter, key); - lua_gettable(interpreter, -2); - return object(from_stack(interpreter, -1)); -} - -template -inline void settable(ValueWrapper const& table, K const& key, T const& value) -{ - lua_State* interpreter = value_wrapper_traits::interpreter( - table - ); - - // TODO: Exception safe? - - value_wrapper_traits::unwrap(interpreter, table); - detail::stack_pop pop(interpreter, 1); - detail::push(interpreter, key); - detail::push(interpreter, value); - lua_settable(interpreter, -3); -} - -template -inline object rawget(ValueWrapper const& table, K const& key) -{ - lua_State* interpreter = value_wrapper_traits::interpreter( - table - ); - - value_wrapper_traits::unwrap(interpreter, table); - detail::stack_pop pop(interpreter, 2); - detail::push(interpreter, key); - lua_rawget(interpreter, -2); - return object(from_stack(interpreter, -1)); -} - -template -inline void rawset(ValueWrapper const& table, K const& key, T const& value) -{ - lua_State* interpreter = value_wrapper_traits::interpreter( - table - ); - - // TODO: Exception safe? - - value_wrapper_traits::unwrap(interpreter, table); - detail::stack_pop pop(interpreter, 1); - detail::push(interpreter, key); - detail::push(interpreter, value); - lua_rawset(interpreter, -3); -} - -template -inline int type(ValueWrapper const& value) -{ - lua_State* interpreter = value_wrapper_traits::interpreter( - value - ); - - value_wrapper_traits::unwrap(interpreter, value); - detail::stack_pop pop(interpreter, 1); - return lua_type(interpreter, -1); -} - -template -inline object getmetatable(ValueWrapper const& obj) -{ - lua_State* interpreter = value_wrapper_traits::interpreter( - obj - ); - - value_wrapper_traits::unwrap(interpreter, obj); - detail::stack_pop pop(interpreter, 2); - lua_getmetatable(interpreter, -1); - return object(from_stack(interpreter, -1)); -} - -template -inline void setmetatable( - ValueWrapper1 const& obj, ValueWrapper2 const& metatable) -{ - lua_State* interpreter = value_wrapper_traits::interpreter( - obj - ); - - value_wrapper_traits::unwrap(interpreter, obj); - detail::stack_pop pop(interpreter, 1); - value_wrapper_traits::unwrap(interpreter, metatable); - lua_setmetatable(interpreter, -2); -} - -template -inline lua_CFunction tocfunction(ValueWrapper const& value) -{ - lua_State* interpreter = value_wrapper_traits::interpreter( - value - ); - - value_wrapper_traits::unwrap(interpreter, value); - detail::stack_pop pop(interpreter, 1); - return lua_tocfunction(interpreter, -1); -} - -template -inline T* touserdata(ValueWrapper const& value) -{ - lua_State* interpreter = value_wrapper_traits::interpreter( - value - ); - - value_wrapper_traits::unwrap(interpreter, value); - detail::stack_pop pop(interpreter, 1); - return static_cast(lua_touserdata(interpreter, -1)); -} - -template -inline object getupvalue(ValueWrapper const& value, int index) -{ - lua_State* interpreter = value_wrapper_traits::interpreter( - value - ); - - value_wrapper_traits::unwrap(interpreter, value); - detail::stack_pop pop(interpreter, 2); - lua_getupvalue(interpreter, -1, index); - return object(from_stack(interpreter, -1)); -} - -template -inline void setupvalue( - ValueWrapper1 const& function, int index, ValueWrapper2 const& value) -{ - lua_State* interpreter = value_wrapper_traits::interpreter( - function - ); - - value_wrapper_traits::unwrap(interpreter, function); - detail::stack_pop pop(interpreter, 1); - value_wrapper_traits::unwrap(interpreter, value); - lua_setupvalue(interpreter, -2, index); -} - -template -object property(GetValueWrapper const& get) -{ - lua_State* interpreter = value_wrapper_traits::interpreter( - get - ); - - value_wrapper_traits::unwrap(interpreter, get); - lua_pushnil(interpreter); - - lua_pushcclosure(interpreter, &detail::property_tag, 2); - detail::stack_pop pop(interpreter, 1); - - return object(from_stack(interpreter, -1)); -} - -template -object property(GetValueWrapper const& get, SetValueWrapper const& set) -{ - lua_State* interpreter = value_wrapper_traits::interpreter( - get - ); - - value_wrapper_traits::unwrap(interpreter, get); - value_wrapper_traits::unwrap(interpreter, set); - - lua_pushcclosure(interpreter, &detail::property_tag, 2); - detail::stack_pop pop(interpreter, 1); - - return object(from_stack(interpreter, -1)); - -} - - -} // namespace luabind - -#endif // LUABIND_OBJECT_050419_HPP - diff --git a/luabind/luabind/open.hpp b/luabind/luabind/open.hpp deleted file mode 100644 index cca4c7a52..000000000 --- a/luabind/luabind/open.hpp +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#ifndef LUABIND_OPEN_HPP_INCLUDED -#define LUABIND_OPEN_HPP_INCLUDED - -#include - -namespace luabind { - - LUABIND_API void open(lua_State* L); - -} - -#endif // LUABIND_OPEN_HPP_INCLUDED - diff --git a/luabind/luabind/operator.hpp b/luabind/luabind/operator.hpp deleted file mode 100644 index aeb651c03..000000000 --- a/luabind/luabind/operator.hpp +++ /dev/null @@ -1,355 +0,0 @@ -// Copyright (c) 2004 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef OPERATOR_040729_HPP -#define OPERATOR_040729_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(__GNUC__) && __GNUC__ < 3 -# define LUABIND_NO_STRINGSTREAM -#else -# if defined(BOOST_NO_STRINGSTREAM) -# define LUABIND_NO_STRINGSTREAM -# endif -#endif - -#ifdef LUABIND_NO_STRINGSTREAM -#include -#else -#include -#endif - -namespace luabind { namespace detail { - - template struct unwrap_parameter_type; - template struct operator_ {}; - - struct operator_void_return {}; - -#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) - template - inline T const& operator,(T const& x, operator_void_return) - { - return x; - } -#endif - -}} // namespace luabind - -namespace luabind { namespace operators { - - #define BOOST_PP_ITERATION_PARAMS_1 (3, \ - (0, LUABIND_MAX_ARITY, )) - #include BOOST_PP_ITERATE() - -}} // namespace luabind::operators - -#include - -namespace luabind { - - template - struct self_base - { - operators::call_operator0 operator()() const - { - return 0; - } - -#define BOOST_PP_LOCAL_MACRO(n) \ - template \ - BOOST_PP_CAT(operators::call_operator, n)< \ - Derived \ - BOOST_PP_ENUM_TRAILING_PARAMS(n, A) \ - >\ - operator()( \ - BOOST_PP_ENUM_BINARY_PARAMS(n, A, const& BOOST_PP_INTERCEPT) \ - ) const \ - { \ - return 0; \ - } - -#define BOOST_PP_LOCAL_LIMITS (1, LUABIND_MAX_ARITY) -#include BOOST_PP_LOCAL_ITERATE() - - }; - - struct self_type : self_base - { - }; - - struct const_self_type : self_base - { - }; - -namespace detail { - - template - struct unwrap_parameter_type - { - typedef typename boost::mpl::eval_if< - boost::is_same - , boost::mpl::identity - , boost::mpl::eval_if< - boost::is_same - , boost::mpl::identity - , unwrap_other - > - >::type type; - }; - - template - struct binary_operator - : operator_ > - { - binary_operator(int) {} - - template - struct apply - { - typedef typename unwrap_parameter_type::type arg0; - typedef typename unwrap_parameter_type::type arg1; - - static void execute(lua_State* L, arg0 _0, arg1 _1) - { - Derived::template apply::execute( - L, _0, _1); - } - }; - - static char const* name() - { - return Derived::name(); - } - }; - - template - struct unary_operator - : operator_ > - { - unary_operator(int) {} - - template - struct apply - { - typedef typename unwrap_parameter_type::type arg0; - - static void execute(lua_State* L, arg0 _0) - { - Derived::template apply::execute(L, _0); - } - }; - - static char const* name() - { - return Derived::name(); - } - }; - - template - inline void operator_result(lua_State* L, operator_void_return, Policies*) - { - } - - namespace mpl = boost::mpl; - - template - inline void operator_result(lua_State* L, T const& x, Policies*) - { - typedef typename find_conversion_policy< - 0 - , Policies - >::type cv_policy; - - typename mpl::apply_wrap2::type cv; - - cv.apply(L, x); - } - -}} // namespace detail::luabind - -namespace luabind { - -#define LUABIND_BINARY_OPERATOR(name_, op) \ - namespace operators { \ -\ - struct name_ \ - { \ - template \ - struct apply \ - { \ - static void execute(lua_State* L, T0 _0, T1 _1) \ - { \ - detail::operator_result(L, _0 op _1, (Policies*)0); \ - } \ - }; \ -\ - static char const* name() \ - { \ - return "__" # name_; \ - } \ - }; \ -\ - } \ - \ - template \ - detail::binary_operator< \ - operators::name_ \ - , U \ - , T \ - > \ - inline operator op(self_base, T const&) \ - { \ - return 0; \ - } \ - \ - template \ - detail::binary_operator< \ - operators::name_ \ - , T \ - , U \ - > \ - inline operator op(T const&, self_base) \ - { \ - return 0; \ - } \ - \ - detail::binary_operator< \ - operators::name_ \ - , self_type \ - , self_type \ - > \ - inline operator op(self_type, self_type) \ - { \ - return 0; \ - } \ - \ - detail::binary_operator< \ - operators::name_ \ - , self_type \ - , const_self_type \ - > \ - inline operator op(self_type, const_self_type) \ - { \ - return 0; \ - } \ - \ - detail::binary_operator< \ - operators::name_ \ - , const_self_type \ - , self_type \ - > \ - inline operator op(const_self_type, self_type) \ - { \ - return 0; \ - } \ - \ - detail::binary_operator< \ - operators::name_ \ - , const_self_type \ - , const_self_type \ - > \ - inline operator op(const_self_type, const_self_type) \ - { \ - return 0; \ - } - - LUABIND_BINARY_OPERATOR(add, +) - LUABIND_BINARY_OPERATOR(sub, -) - LUABIND_BINARY_OPERATOR(mul, *) - LUABIND_BINARY_OPERATOR(div, /) - LUABIND_BINARY_OPERATOR(pow, ^) - LUABIND_BINARY_OPERATOR(lt, <) - LUABIND_BINARY_OPERATOR(le, <=) - LUABIND_BINARY_OPERATOR(eq, ==) - -#undef LUABIND_UNARY_OPERATOR - -#define LUABIND_UNARY_OPERATOR(name_, op, fn) \ - namespace operators { \ -\ - struct name_ \ - { \ - template \ - struct apply \ - { \ - static void execute(lua_State* L, T x) \ - { \ - detail::operator_result(L, op(x), (Policies*)0); \ - } \ - }; \ -\ - static char const* name() \ - { \ - return "__" # name_; \ - } \ - }; \ -\ - } \ - \ - template \ - detail::unary_operator< \ - operators::name_ \ - , T \ - > \ - inline fn(self_base) \ - { \ - return 0; \ - } - - template - std::string tostring_operator(T const& x) - { -#ifdef LUABIND_NO_STRINGSTREAM - std::strstream s; - s << x << std::ends; -#else - std::stringstream s; - s << x; -#endif - return s.str(); - } - - LUABIND_UNARY_OPERATOR(tostring, tostring_operator, tostring) - LUABIND_UNARY_OPERATOR(unm, -, operator-) - -#undef LUABIND_BINARY_OPERATOR - - namespace { - - LUABIND_ANONYMOUS_FIX self_type self; - LUABIND_ANONYMOUS_FIX const_self_type const_self; - - } // namespace unnamed - -} // namespace luabind - -#endif // OPERATOR_040729_HPP - diff --git a/luabind/luabind/out_value_policy.hpp b/luabind/luabind/out_value_policy.hpp deleted file mode 100644 index ca496b527..000000000 --- a/luabind/luabind/out_value_policy.hpp +++ /dev/null @@ -1,280 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#ifndef LUABIND_OUT_VALUE_POLICY_HPP_INCLUDED -#define LUABIND_OUT_VALUE_POLICY_HPP_INCLUDED - -#include -#include -#include - -namespace luabind { namespace detail -{ - template - struct char_array - { - char storage[N]; - }; - -#if defined(__GNUC__) && ( __GNUC__ == 3 && __GNUC_MINOR__ == 1 ) - - template - char_array indirect_sizeof_test(by_reference); - - template - char_array indirect_sizeof_test(by_const_reference); - - template - char_array indirect_sizeof_test(by_pointer); - - template - char_array indirect_sizeof_test(by_const_pointer); - - template - char_array indirect_sizeof_test(by_value); - -#else - - template - char_array::type)> indirect_sizeof_test(by_reference); - - template - char_array::type)> indirect_sizeof_test(by_const_reference); - - template - char_array::type)> indirect_sizeof_test(by_pointer); - - template - char_array::type)> indirect_sizeof_test(by_const_pointer); - - template - char_array::type)> indirect_sizeof_test(by_value); - -#endif - - template - struct indirect_sizeof - { - BOOST_STATIC_CONSTANT(int, value = sizeof(indirect_sizeof_test(LUABIND_DECORATE_TYPE(T)))); - }; - - namespace mpl = boost::mpl; - - template - struct out_value_converter - { - int const consumed_args(...) - { - return 1; - } - - template - T& apply(lua_State* L, by_reference, int index) - { - typedef typename find_conversion_policy<1, Policies>::type converter_policy; - typename mpl::apply_wrap2::type converter; - new (m_storage) T(converter.apply(L, LUABIND_DECORATE_TYPE(T), index)); - return *reinterpret_cast(m_storage); - } - - template - static int match(lua_State* L, by_reference, int index) - { - typedef typename find_conversion_policy<1, Policies>::type converter_policy; - typedef typename mpl::apply_wrap2::type converter; - return converter::match(L, LUABIND_DECORATE_TYPE(T), index); - } - - template - void converter_postcall(lua_State* L, by_reference, int) - { - typedef typename find_conversion_policy<2, Policies>::type converter_policy; - typename mpl::apply_wrap2::type converter; - converter.apply(L, *reinterpret_cast(m_storage)); - reinterpret_cast(m_storage)->~T(); - } - - template - T* apply(lua_State* L, by_pointer, int index) - { - typedef typename find_conversion_policy<1, Policies>::type converter_policy; - typename mpl::apply_wrap2::type converter; - new (m_storage) T(converter.apply(L, LUABIND_DECORATE_TYPE(T), index)); - return reinterpret_cast(m_storage); - } - - template - static int match(lua_State* L, by_pointer, int index) - { - typedef typename find_conversion_policy<1, Policies>::type converter_policy; - typedef typename mpl::apply_wrap2::type converter; - return converter::match(L, LUABIND_DECORATE_TYPE(T), index); - } - - template - void converter_postcall(lua_State* L, by_pointer, int) - { - typedef typename find_conversion_policy<2, Policies>::type converter_policy; - typename mpl::apply_wrap2::type converter; - converter.apply(L, *reinterpret_cast(m_storage)); - reinterpret_cast(m_storage)->~T(); - } - - char m_storage[Size]; - }; - - template - struct out_value_policy : conversion_policy - { - static void precall(lua_State*, const index_map&) {} - static void postcall(lua_State*, const index_map&) {} - - struct only_accepts_nonconst_references_or_pointers {}; - struct can_only_convert_from_lua_to_cpp {}; - - template - struct apply - { - typedef typename boost::mpl::if_ - , typename boost::mpl::if_, is_nonconst_pointer > - , out_value_converter::value, Policies> - , only_accepts_nonconst_references_or_pointers - >::type - , can_only_convert_from_lua_to_cpp - >::type type; - }; - }; - - template - struct pure_out_value_converter - { - int const consumed_args(...) - { - return 0; - } - - template - T& apply(lua_State*, by_reference, int) - { - new (m_storage) T(); - return *reinterpret_cast(m_storage); - } - - template - static int match(lua_State*, by_reference, int) - { - return 0; - } - - template - void converter_postcall(lua_State* L, by_reference, int) - { - typedef typename find_conversion_policy<1, Policies>::type converter_policy; - typename mpl::apply_wrap2::type converter; - converter.apply(L, *reinterpret_cast(m_storage)); - reinterpret_cast(m_storage)->~T(); - } - - template - T* apply(lua_State*, by_pointer, int) - { - new (m_storage) T(); - return reinterpret_cast(m_storage); - } - - template - static int match(lua_State*, by_pointer, int) - { - return 0; - } - - template - void converter_postcall(lua_State* L, by_pointer, int) - { - typedef typename find_conversion_policy<1, Policies>::type converter_policy; - typename mpl::apply_wrap2::type converter; - converter.apply(L, *reinterpret_cast(m_storage)); - reinterpret_cast(m_storage)->~T(); - } - - - char m_storage[Size]; - }; - - template - struct pure_out_value_policy : conversion_policy - { - static void precall(lua_State*, const index_map&) {} - static void postcall(lua_State*, const index_map&) {} - - struct only_accepts_nonconst_references_or_pointers {}; - struct can_only_convert_from_lua_to_cpp {}; - - template - struct apply - { - typedef typename boost::mpl::if_ - , typename boost::mpl::if_, is_nonconst_pointer > - , pure_out_value_converter::value, Policies> - , only_accepts_nonconst_references_or_pointers - >::type - , can_only_convert_from_lua_to_cpp - >::type type; - }; - }; - -}} - -namespace luabind -{ - template - detail::policy_cons, detail::null_type> - out_value(LUABIND_PLACEHOLDER_ARG(N)) - { - return detail::policy_cons, detail::null_type>(); - } - - template - detail::policy_cons, detail::null_type> - out_value(LUABIND_PLACEHOLDER_ARG(N), const Policies&) - { - return detail::policy_cons, detail::null_type>(); - } - - template - detail::policy_cons, detail::null_type> - pure_out_value(LUABIND_PLACEHOLDER_ARG(N)) - { - return detail::policy_cons, detail::null_type>(); - } - - template - detail::policy_cons, detail::null_type> - pure_out_value(LUABIND_PLACEHOLDER_ARG(N), const Policies&) - { - return detail::policy_cons, detail::null_type>(); - } -} - -#endif // LUABIND_OUT_VALUE_POLICY_HPP_INCLUDED - diff --git a/luabind/luabind/prefix.hpp b/luabind/luabind/prefix.hpp deleted file mode 100644 index 86f2db1b5..000000000 --- a/luabind/luabind/prefix.hpp +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2004 Daniel Wallin - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef PREFIX_040218_HPP -#define PREFIX_040218_HPP - -#ifdef LUABIND_PREFIX_INCLUDE -# include LUABIND_PREFIX_INCLUDE -#endif - -#endif // PREFIX_040218_HPP - diff --git a/luabind/luabind/raw_policy.hpp b/luabind/luabind/raw_policy.hpp deleted file mode 100644 index 6d22da246..000000000 --- a/luabind/luabind/raw_policy.hpp +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#ifndef LUABIND_RAW_POLICY_HPP_INCLUDED -#define LUABIND_RAW_POLICY_HPP_INCLUDED - -#include -#include - -namespace luabind { namespace detail { - - struct raw_converter - { - int const consumed_args(...) - { - return 0; - } - - lua_State* apply(lua_State* L, by_pointer, int) - { - return L; - } - - static int match(...) - { - return 0; - } - - void converter_postcall(lua_State*, by_pointer, int) {} - }; - - template - struct raw_policy : conversion_policy - { - static void precall(lua_State*, const index_map&) {} - static void postcall(lua_State*, const index_map&) {} - - template - struct apply - { - typedef raw_converter type; - }; - }; - -}} // namespace luabind::detail - -namespace luabind { - - template - detail::policy_cons< - detail::raw_policy - , detail::null_type - > - inline raw(LUABIND_PLACEHOLDER_ARG(N)) - { - return detail::policy_cons< - detail::raw_policy - , detail::null_type - >(); - } - -} // namespace luabind - -#endif // LUABIND_RAW_POLICY_HPP_INCLUDED - diff --git a/luabind/luabind/return_reference_to_policy.hpp b/luabind/luabind/return_reference_to_policy.hpp deleted file mode 100644 index 1432f79e0..000000000 --- a/luabind/luabind/return_reference_to_policy.hpp +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef LUABIND_RETURN_REFERENCE_TO_POLICY_HPP_INCLUDED -#define LUABIND_RETURN_REFERENCE_TO_POLICY_HPP_INCLUDED - -namespace luabind { namespace detail -{ - template - struct return_reference_to_converter; - - template<> - struct return_reference_to_converter - { - template - void apply(lua_State* L, const T&) - { - lua_pushnil(L); - } - }; - - template - struct return_reference_to_policy : conversion_policy<0> - { - static void precall(lua_State*, const index_map&) {} - static void postcall(lua_State* L, const index_map& indices) - { - int result_index = indices[0]; - int ref_to_index = indices[N]; - - lua_pushvalue(L, ref_to_index); - lua_replace(L, result_index); - } - - template - struct apply - { - typedef return_reference_to_converter type; - }; - }; -}} - -namespace luabind -{ - template - detail::policy_cons, detail::null_type> - return_reference_to(LUABIND_PLACEHOLDER_ARG(N)) - { - return detail::policy_cons, detail::null_type>(); - } -} - -#endif // LUABIND_RETURN_REFERENCE_TO_POLICY_HPP_INCLUDED - diff --git a/luabind/luabind/scope.hpp b/luabind/luabind/scope.hpp deleted file mode 100644 index 3b5f293bf..000000000 --- a/luabind/luabind/scope.hpp +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) 2004 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef NEW_SCOPE_040211_HPP -#define NEW_SCOPE_040211_HPP - -#include -#include -#include -#include - -namespace luabind { - - struct scope; - -} // namespace luabind - -namespace luabind { namespace detail { - - struct LUABIND_API registration - { - registration(); - virtual ~registration(); - - protected: - virtual void register_(lua_State*) const = 0; - - private: - friend struct ::luabind::scope; - registration* m_next; - }; - -}} // namespace luabind::detail - -namespace luabind { - - struct LUABIND_API scope - { - scope(); - explicit scope(std::auto_ptr reg); - scope(scope const& other_); - ~scope(); - - scope& operator=(scope const& other_); - - scope& operator,(scope s); - - void register_(lua_State* L) const; - - private: - detail::registration* m_chain; - }; - - class LUABIND_API namespace_ : public scope - { - public: - explicit namespace_(char const* name); - namespace_& operator[](scope s); - - private: - struct registration_; - registration_* m_registration; - }; - - class LUABIND_API module_ - { - public: - module_(lua_State* L_, char const* name); - void operator[](scope s); - - private: - lua_State* m_state; - char const* m_name; - }; - - inline module_ module(lua_State* L, char const* name = 0) - { - return module_(L, name); - } - -} // namespace luabind - -#endif // NEW_SCOPE_040211_HPP - diff --git a/luabind/luabind/shared_ptr_converter.hpp b/luabind/luabind/shared_ptr_converter.hpp deleted file mode 100644 index 2f61b5cff..000000000 --- a/luabind/luabind/shared_ptr_converter.hpp +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright Daniel Wallin 2009. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef LUABIND_SHARED_PTR_CONVERTER_090211_HPP -# define LUABIND_SHARED_PTR_CONVERTER_090211_HPP - -# include -# include -# include -# include - -namespace luabind { - -namespace detail -{ - - struct shared_ptr_deleter - { - shared_ptr_deleter(lua_State* L, int index) - : life_support(get_main_thread(L), L, index) - {} - - void operator()(void const*) - { - handle().swap(life_support); - } - - handle life_support; - }; - -} // namespace detail - -template -struct default_converter > - : default_converter -{ - typedef boost::mpl::false_ is_native; - - template - int match(lua_State* L, U, int index) - { - return default_converter::match( - L, LUABIND_DECORATE_TYPE(T*), index); - } - - template - boost::shared_ptr apply(lua_State* L, U, int index) - { - T* raw_ptr = default_converter::apply( - L, LUABIND_DECORATE_TYPE(T*), index); - if (!raw_ptr) - return boost::shared_ptr(); - return boost::shared_ptr( - raw_ptr, detail::shared_ptr_deleter(L, index)); - } - - void apply(lua_State* L, boost::shared_ptr const& p) - { - if (detail::shared_ptr_deleter* d = - boost::get_deleter(p)) - { - d->life_support.push(L); - } - else - { - detail::value_converter().apply(L, p); - } - } - - template - void converter_postcall(lua_State*, U const&, int) - {} -}; - -template -struct default_converter const&> - : default_converter > -{}; - -} // namespace luabind - -#endif // LUABIND_SHARED_PTR_CONVERTER_090211_HPP diff --git a/luabind/luabind/tag_function.hpp b/luabind/luabind/tag_function.hpp deleted file mode 100644 index 51fe97b75..000000000 --- a/luabind/luabind/tag_function.hpp +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright Daniel Wallin 2008. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#if !BOOST_PP_IS_ITERATING - -# ifndef LUABIND_TAG_FUNCTION_081129_HPP -# define LUABIND_TAG_FUNCTION_081129_HPP - -# if LUABIND_MAX_ARITY <= 8 -# include -# else -# include -# endif -# include -# include -# include -# include - -namespace luabind { - -namespace detail -{ - - template - struct tagged_function - { - tagged_function(F f) - : f(f) - {} - - F f; - }; - - template - Signature deduce_signature(tagged_function const&, ...) - { - return Signature(); - } - - template - int invoke( - lua_State* L, function_object const& self, invoke_context& ctx - , tagged_function const& tagged - , Signature, Policies const& policies) - { - return invoke(L, self, ctx, tagged.f, Signature(), policies); - } - - template - struct signature_from_function; - -# define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (0, LUABIND_MAX_ARITY, )) -# include BOOST_PP_ITERATE() - -} // namespace detail - -template -detail::tagged_function< - typename detail::signature_from_function::type - , F -> -tag_function(F f) -{ - return f; -} - -} // namespace luabind - -# endif // LUABIND_TAG_FUNCTION_081129_HPP - -#else // BOOST_PP_IS_ITERATING - -# define N BOOST_PP_ITERATION() -# define NPLUS1 BOOST_PP_INC(N) - -template -struct signature_from_function -{ - typedef BOOST_PP_CAT(mpl::vector, NPLUS1)< - R BOOST_PP_ENUM_TRAILING_PARAMS(N, A) - > type; -}; - -#endif // BOOST_PP_IS_ITERATING - - diff --git a/luabind/luabind/typeid.hpp b/luabind/luabind/typeid.hpp deleted file mode 100644 index d92d8fbac..000000000 --- a/luabind/luabind/typeid.hpp +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright Daniel Wallin 2008. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef LUABIND_TYPEID_081227_HPP -# define LUABIND_TYPEID_081227_HPP - -# include -# include -# include - -namespace luabind { - -# ifdef BOOST_MSVC -# pragma warning(push) -// std::type_info::before() returns int, rather than bool. -// At least on MSVC7.1, this is true for the comparison -// operators as well. -# pragma warning(disable:4800) -# endif - -class type_id - : public boost::less_than_comparable -{ -public: - type_id() - : id(&typeid(detail::null_type)) - {} - - type_id(std::type_info const& id) - : id(&id) - {} - - bool operator!=(type_id const& other) const - { - return *id != *other.id; - } - - bool operator==(type_id const& other) const - { - return *id == *other.id; - } - - bool operator<(type_id const& other) const - { - return id->before(*other.id); - } - - char const* name() const - { - return id->name(); - } - -private: - std::type_info const* id; -}; - -# ifdef BOOST_MSVC -# pragma warning(pop) -# endif - -} // namespace luabind - -#endif // LUABIND_TYPEID_081227_HPP - diff --git a/luabind/luabind/value_wrapper.hpp b/luabind/luabind/value_wrapper.hpp deleted file mode 100644 index 8e09395d5..000000000 --- a/luabind/luabind/value_wrapper.hpp +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) 2005 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef LUABIND_VALUE_WRAPPER_050419_HPP -#define LUABIND_VALUE_WRAPPER_050419_HPP - -#include -#include -#include - -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -# define LUABIND_USE_VALUE_WRAPPER_TAG -#else -#endif - -#ifdef LUABIND_USE_VALUE_WRAPPER_TAG -# include -# include -# include -# include -# include -# include -# include -# include -# include -#endif - -namespace luabind { - -// -// Concept ``ValueWrapper`` -// - -#ifdef LUABIND_USE_VALUE_WRAPPER_TAG -template -struct value_wrapper_traits; - -namespace detail -{ - - BOOST_MPL_HAS_XXX_TRAIT_DEF(value_wrapper_tag); - - struct unspecialized_value_wrapper_traits - { - typedef boost::mpl::false_ is_specialized; - }; - - template - struct value_wrapper_traits_aux - { - typedef value_wrapper_traits type; - }; - -} // namespace detail -#endif - -template -struct value_wrapper_traits -#ifdef LUABIND_USE_VALUE_WRAPPER_TAG - : boost::mpl::eval_if< - boost::mpl::and_< - boost::mpl::not_< - boost::mpl::or_< - boost::is_reference - , boost::is_pointer - , boost::is_array - > - > - , detail::has_value_wrapper_tag - > - , detail::value_wrapper_traits_aux - , boost::mpl::identity - >::type -{}; -#else -{ - typedef boost::mpl::false_ is_specialized; -}; -#endif - -template -struct is_value_wrapper - : boost::mpl::aux::msvc_eti_base< - typename value_wrapper_traits::is_specialized - >::type -{}; - -} // namespace luabind - -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -# include -# include - -namespace luabind { - -template -struct is_value_wrapper_arg - : is_value_wrapper< - typename boost::remove_const< - typename boost::remove_reference::type - >::type - > -{}; - -} // namespace luabind - -#else - -# include -# include - -namespace luabind { - -namespace detail -{ - template - typename is_value_wrapper::type is_value_wrapper_arg_check(T const*); - - yes_t to_yesno(boost::mpl::true_); - no_t to_yesno(boost::mpl::false_); - - template - struct is_value_wrapper_arg_aux - { - static typename boost::add_reference::type x; - - BOOST_STATIC_CONSTANT(bool, value = - sizeof(to_yesno(is_value_wrapper_arg_check(&x))) - == sizeof(yes_t) - ); - - typedef boost::mpl::bool_ type; - }; - -} // namespace detail - -template -struct is_value_wrapper_arg - : detail::is_value_wrapper_arg_aux::type -{ -}; - -} // namespace luabind - -#endif - -#endif // LUABIND_VALUE_WRAPPER_050419_HPP - diff --git a/luabind/luabind/version.hpp b/luabind/luabind/version.hpp deleted file mode 100644 index 63acaf765..000000000 --- a/luabind/luabind/version.hpp +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright Daniel Wallin 2009. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef LUABIND_VERSION_090216_HPP -# define LUABIND_VERSION_090216_HPP - -# define LUABIND_VERSION 900 - -// Each component uses two digits, so: -// -// major = LUABIND_VERSION / 10000 -// minor = LUABIND_VERSION / 100 % 100 -// patch = LUABIND_VERSION % 100 - -#endif // LUABIND_VERSION_090216_HPP diff --git a/luabind/luabind/weak_ref.hpp b/luabind/luabind/weak_ref.hpp deleted file mode 100644 index e08e250dc..000000000 --- a/luabind/luabind/weak_ref.hpp +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2004 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef WEAK_REF_040402_HPP -#define WEAK_REF_040402_HPP - -#include - -struct lua_State; - -namespace luabind { - - class LUABIND_API weak_ref - { - public: - weak_ref(); - weak_ref(lua_State* main, lua_State* L, int index); - weak_ref(weak_ref const&); - ~weak_ref(); - - weak_ref& operator=(weak_ref const&); - - void swap(weak_ref&); - - // returns a unique id that no - // other weak ref will return - int id() const; - - lua_State* state() const; - void get(lua_State* L) const; - - private: - struct impl; - impl* m_impl; - }; - -} // namespace luabind - -#endif // WEAK_REF_040402_HPP - diff --git a/luabind/luabind/wrapper_base.hpp b/luabind/luabind/wrapper_base.hpp deleted file mode 100644 index 9adc05a35..000000000 --- a/luabind/luabind/wrapper_base.hpp +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#if !BOOST_PP_IS_ITERATING - -#ifndef LUABIND_WRAPPER_BASE_HPP_INCLUDED -#define LUABIND_WRAPPER_BASE_HPP_INCLUDED - -#include -#include -#include -#include - -#include -#include - -#include - -namespace luabind -{ - namespace detail - { - struct wrap_access; - - // implements the selection between dynamic dispatch - // or default implementation calls from within a virtual - // function wrapper. The input is the self reference on - // the top of the stack. Output is the function to call - // on the top of the stack (the input self reference will - // be popped) - LUABIND_API void do_call_member_selection(lua_State* L, char const* name); - } - - struct wrapped_self_t: weak_ref - { - detail::lua_reference m_strong_ref; - }; - - struct wrap_base - { - friend struct detail::wrap_access; - wrap_base() {} - - #define BOOST_PP_ITERATION_PARAMS_1 (4, (0, LUABIND_MAX_ARITY, , 1)) - #include BOOST_PP_ITERATE() - - private: - wrapped_self_t m_self; - }; - -#define BOOST_PP_ITERATION_PARAMS_1 (4, (0, LUABIND_MAX_ARITY, , 2)) -#include BOOST_PP_ITERATE() - - namespace detail - { - struct wrap_access - { - static wrapped_self_t const& ref(wrap_base const& b) - { - return b.m_self; - } - - static wrapped_self_t& ref(wrap_base& b) - { - return b.m_self; - } - }; - } -} - -#endif // LUABIND_WRAPPER_BASE_HPP_INCLUDED - -#else -#if BOOST_PP_ITERATION_FLAGS() == 1 - -#define LUABIND_TUPLE_PARAMS(z, n, data) const A##n * -#define LUABIND_OPERATOR_PARAMS(z, n, data) const A##n & a##n - - template - typename boost::mpl::if_ - , luabind::detail::proxy_member_void_caller > - , luabind::detail::proxy_member_caller > >::type - call(char const* name BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM(BOOST_PP_ITERATION(), LUABIND_OPERATOR_PARAMS, _), detail::type_* = 0) const - { - typedef boost::tuples::tuple tuple_t; - #if BOOST_PP_ITERATION() == 0 - tuple_t args; - #else - tuple_t args(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), &a)); - #endif - - typedef typename boost::mpl::if_ - , luabind::detail::proxy_member_void_caller > - , luabind::detail::proxy_member_caller > >::type proxy_type; - - // this will be cleaned up by the proxy object - // once the call has been made - - // TODO: what happens if this virtual function is - // dispatched from a lua thread where the state - // pointer is different? - - // get the function - lua_State* L = m_self.state(); - m_self.get(L); - assert(!lua_isnil(L, -1)); - detail::do_call_member_selection(L, name); - - if (lua_isnil(L, -1)) - { - lua_pop(L, 1); - throw std::runtime_error("Attempt to call nonexistent function"); - } - - // push the self reference as the first parameter - m_self.get(L); - - // now the function and self objects - // are on the stack. These will both - // be popped by pcall - return proxy_type(L, args); - } - -#undef LUABIND_CALL_MEMBER_NAME -#undef LUABIND_OPERATOR_PARAMS -#undef LUABIND_TUPLE_PARAMS - -#else // free call_member forwardarding functions - -#define N BOOST_PP_ITERATION() - -#define LUABIND_TUPLE_PARAMS(z, n, data) const A##n * -#define LUABIND_OPERATOR_PARAMS(z, n, data) const A##n & a##n - - template< - class R - BOOST_PP_ENUM_TRAILING_PARAMS(N, class A) - > - typename boost::mpl::if_< - boost::is_void - , detail::proxy_member_void_caller< - boost::tuples::tuple< - BOOST_PP_ENUM(N, LUABIND_TUPLE_PARAMS, _) - > - > - , detail::proxy_member_caller< - R - , boost::tuples::tuple< - BOOST_PP_ENUM(N, LUABIND_TUPLE_PARAMS, _) - > - > - >::type - call_member( - wrap_base const* self - , char const* fn - BOOST_PP_ENUM_TRAILING_BINARY_PARAMS(N, A, &a) - , detail::type_* = 0 - ) - { - return self->call( - fn - BOOST_PP_ENUM_TRAILING_PARAMS(N, a) - , (detail::type_*)0 - ); - } - -#undef LUABIND_OPERATOR_PARAMS -#undef LUABIND_TUPLE_PARAMS - -#undef N - -#endif -#endif \ No newline at end of file diff --git a/luabind/luabind/yield_policy.hpp b/luabind/luabind/yield_policy.hpp deleted file mode 100644 index 9dbbefa29..000000000 --- a/luabind/luabind/yield_policy.hpp +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - - -#ifndef LUABIND_YIELD_POLICY_HPP_INCLUDED -#define LUABIND_YIELD_POLICY_HPP_INCLUDED - -#include -#include - -namespace luabind { namespace detail -{ - struct yield_policy - { - static void precall(lua_State*, const index_map&) {} - static void postcall(lua_State*, const index_map&) {} - }; - - template - struct has_yield - { - BOOST_STATIC_CONSTANT(bool, - value = (boost::is_same::value || - has_yield::value)); - }; - - template<> - struct has_yield - { - BOOST_STATIC_CONSTANT(bool, value = false); - }; -}} - -namespace luabind -{ - detail::policy_cons const yield = {}; - - namespace detail - { - inline void ignore_unused_yield() - { - (void)yield; - } - } -} - -#endif // LUABIND_YIELD_POLICY_HPP_INCLUDED - diff --git a/luabind/src/class.cpp b/luabind/src/class.cpp deleted file mode 100644 index 8a67cf6f3..000000000 --- a/luabind/src/class.cpp +++ /dev/null @@ -1,337 +0,0 @@ -// Copyright (c) 2004 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#define LUABIND_BUILDING - -#include - -#include - -#include -#include -#include - -#include -#include - -namespace luabind -{ - LUABIND_API detail::nil_type nil; -} - -namespace luabind { namespace detail { - - - namespace - { - struct cast_entry - { - cast_entry(class_id src, class_id target, cast_function cast) - : src(src) - , target(target) - , cast(cast) - {} - - class_id src; - class_id target; - cast_function cast; - }; - - } // namespace unnamed - - struct class_registration : registration - { - class_registration(char const* name); - - void register_(lua_State* L) const; - - const char* m_name; - - mutable std::map m_static_constants; - - typedef std::pair base_desc; - mutable std::vector m_bases; - - type_id m_type; - class_id m_id; - class_id m_wrapper_id; - type_id m_wrapper_type; - std::vector m_casts; - - scope m_scope; - scope m_members; - scope m_default_members; - }; - - class_registration::class_registration(char const* name) - { - m_name = name; - } - - void class_registration::register_(lua_State* L) const - { - LUABIND_CHECK_STACK(L); - - assert(lua_type(L, -1) == LUA_TTABLE); - - lua_pushstring(L, m_name); - - detail::class_rep* crep; - - detail::class_registry* r = detail::class_registry::get_registry(L); - // create a class_rep structure for this class. - // allocate it within lua to let lua collect it on - // lua_close(). This is better than allocating it - // as a static, since it will then be destructed - // when the program exits instead. - // warning: we assume that lua will not - // move the userdata memory. - lua_newuserdata(L, sizeof(detail::class_rep)); - crep = reinterpret_cast(lua_touserdata(L, -1)); - - new(crep) detail::class_rep( - m_type - , m_name - , L - ); - - // register this new type in the class registry - r->add_class(m_type, crep); - - lua_pushstring(L, "__luabind_class_map"); - lua_rawget(L, LUA_REGISTRYINDEX); - class_map& classes = *static_cast( - lua_touserdata(L, -1)); - lua_pop(L, 1); - - classes.put(m_id, crep); - - bool const has_wrapper = m_wrapper_id != registered_class::id; - - if (has_wrapper) - classes.put(m_wrapper_id, crep); - - crep->m_static_constants.swap(m_static_constants); - - detail::class_registry* registry = detail::class_registry::get_registry(L); - - crep->get_default_table(L); - m_scope.register_(L); - m_default_members.register_(L); - lua_pop(L, 1); - - crep->get_table(L); - m_members.register_(L); - lua_pop(L, 1); - - lua_pushstring(L, "__luabind_cast_graph"); - lua_gettable(L, LUA_REGISTRYINDEX); - cast_graph* const casts = static_cast( - lua_touserdata(L, -1)); - lua_pop(L, 1); - - lua_pushstring(L, "__luabind_class_id_map"); - lua_gettable(L, LUA_REGISTRYINDEX); - class_id_map* const class_ids = static_cast( - lua_touserdata(L, -1)); - lua_pop(L, 1); - - class_ids->put(m_id, m_type); - - if (has_wrapper) - class_ids->put(m_wrapper_id, m_wrapper_type); - - BOOST_FOREACH(cast_entry const& e, m_casts) - { - casts->insert(e.src, e.target, e.cast); - } - - for (std::vector::iterator i = m_bases.begin(); - i != m_bases.end(); ++i) - { - LUABIND_CHECK_STACK(L); - - // the baseclass' class_rep structure - detail::class_rep* bcrep = registry->find_class(i->first); - - detail::class_rep::base_info base; - base.pointer_offset = 0; - base.base = bcrep; - - crep->add_base_class(base); - - // copy base class table - crep->get_table(L); - bcrep->get_table(L); - lua_pushnil(L); - - while (lua_next(L, -2)) - { - lua_pushvalue(L, -2); // copy key - lua_gettable(L, -5); - - if (!lua_isnil(L, -1)) - { - lua_pop(L, 2); - continue; - } - - lua_pop(L, 1); - lua_pushvalue(L, -2); // copy key - lua_insert(L, -2); - - lua_settable(L, -5); - } - lua_pop(L, 2); - - // copy base class detaults table - crep->get_default_table(L); - bcrep->get_default_table(L); - lua_pushnil(L); - - while (lua_next(L, -2)) - { - lua_pushvalue(L, -2); // copy key - lua_gettable(L, -5); - - if (!lua_isnil(L, -1)) - { - lua_pop(L, 2); - continue; - } - - lua_pop(L, 1); - lua_pushvalue(L, -2); // copy key - lua_insert(L, -2); - - lua_settable(L, -5); - } - lua_pop(L, 2); - - } - - lua_settable(L, -3); - } - - // -- interface --------------------------------------------------------- - - class_base::class_base(char const* name) - : scope(std::auto_ptr( - m_registration = new class_registration(name)) - ) - { - } - - void class_base::init( - type_id const& type_id_, class_id id - , type_id const& wrapper_type, class_id wrapper_id) - { - m_registration->m_type = type_id_; - m_registration->m_id = id; - m_registration->m_wrapper_type = wrapper_type; - m_registration->m_wrapper_id = wrapper_id; - } - - void class_base::add_base(type_id const& base, cast_function cast) - { - m_registration->m_bases.push_back(std::make_pair(base, cast)); - } - - void class_base::add_member(registration* member) - { - std::auto_ptr ptr(member); - m_registration->m_members.operator,(scope(ptr)); - } - - void class_base::add_default_member(registration* member) - { - std::auto_ptr ptr(member); - m_registration->m_default_members.operator,(scope(ptr)); - } - - const char* class_base::name() const - { - return m_registration->m_name; - } - - void class_base::add_static_constant(const char* name, int val) - { - m_registration->m_static_constants[name] = val; - } - - void class_base::add_inner_scope(scope& s) - { - m_registration->m_scope.operator,(s); - } - - void class_base::add_cast( - class_id src, class_id target, cast_function cast) - { - m_registration->m_casts.push_back(cast_entry(src, target, cast)); - } - - void add_custom_name(type_id const& i, std::string& s) - { - s += " ["; - s += i.name(); - s += "]"; - } - - std::string get_class_name(lua_State* L, type_id const& i) - { - std::string ret; - - assert(L); - - class_registry* r = class_registry::get_registry(L); - class_rep* crep = r->find_class(i); - - if (crep == 0) - { - ret = "custom"; - add_custom_name(i, ret); - } - else - { - /* TODO reimplement this? - if (i == crep->holder_type()) - { - ret += "smart_ptr<"; - ret += crep->name(); - ret += ">"; - } - else if (i == crep->const_holder_type()) - { - ret += "smart_ptrname(); - ret += ">"; - } - else*/ - { - ret += crep->name(); - } - } - return ret; - } - -}} // namespace luabind::detail - diff --git a/luabind/src/class_info.cpp b/luabind/src/class_info.cpp deleted file mode 100644 index 531f6e0cc..000000000 --- a/luabind/src/class_info.cpp +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#define LUABIND_BUILDING - -#include - -#include -#include -#include - -namespace luabind -{ - LUABIND_API class_info get_class_info(argument const& o) - { - lua_State* L = o.interpreter(); - - o.push(L); - detail::object_rep* obj = detail::get_instance(L, -1); - - if (!obj) - { - class_info result; - result.name = lua_typename(L, lua_type(L, -1)); - lua_pop(L, 1); - result.methods = newtable(L); - result.attributes = newtable(L); - return result; - } - - lua_pop(L, 1); - - obj->crep()->get_table(L); - object table(from_stack(L, -1)); - lua_pop(L, 1); - - class_info result; - result.name = obj->crep()->name(); - result.methods = newtable(L); - result.attributes = newtable(L); - - std::size_t index = 1; - - for (iterator i(table), e; i != e; ++i) - { - if (type(*i) != LUA_TFUNCTION) - continue; - - // We have to create a temporary `object` here, otherwise the proxy - // returned by operator->() will mess up the stack. This is a known - // problem that probably doesn't show up in real code very often. - object member(*i); - member.push(L); - detail::stack_pop pop(L, 1); - - if (lua_tocfunction(L, -1) == &detail::property_tag) - { - result.attributes[index++] = i.key(); - } - else - { - result.methods[i.key()] = *i; - } - } - - return result; - } - - LUABIND_API object get_class_names(lua_State* L) - { - detail::class_registry* reg = detail::class_registry::get_registry(L); - - std::map const& classes = reg->get_classes(); - - object result = newtable(L); - std::size_t index = 1; - - for (std::map::const_iterator iter = classes.begin(); - iter != classes.end(); ++iter) - { - result[index++] = iter->second->name(); - } - - return result; - } - - LUABIND_API void bind_class_info(lua_State* L) - { - module(L) - [ - class_("class_info_data") - .def_readonly("name", &class_info::name) - .def_readonly("methods", &class_info::methods) - .def_readonly("attributes", &class_info::attributes), - - def("class_info", &get_class_info), - def("class_names", &get_class_names) - ]; - } -} - diff --git a/luabind/src/class_registry.cpp b/luabind/src/class_registry.cpp deleted file mode 100644 index 79df30ade..000000000 --- a/luabind/src/class_registry.cpp +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) 2004 Daniel Wallin - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#define LUABIND_BUILDING - -#include - -#include -#include -#include -#include - -namespace luabind { namespace detail { - - LUABIND_API void push_instance_metatable(lua_State* L); - - namespace { - - int create_cpp_class_metatable(lua_State* L) - { - lua_newtable(L); - - // mark the table with our (hopefully) unique tag - // that says that the user data that has this - // metatable is a class_rep - lua_pushstring(L, "__luabind_classrep"); - lua_pushboolean(L, 1); - lua_rawset(L, -3); - - lua_pushstring(L, "__gc"); - lua_pushcclosure( - L - , &garbage_collector_s< - detail::class_rep - >::apply - , 0); - - lua_rawset(L, -3); - - lua_pushstring(L, "__call"); - lua_pushcclosure(L, &class_rep::constructor_dispatcher, 0); - lua_rawset(L, -3); - - lua_pushstring(L, "__index"); - lua_pushcclosure(L, &class_rep::static_class_gettable, 0); - lua_rawset(L, -3); - - lua_pushstring(L, "__newindex"); - lua_pushcclosure(L, &class_rep::lua_settable_dispatcher, 0); - lua_rawset(L, -3); - - return luaL_ref(L, LUA_REGISTRYINDEX); - } - - int create_lua_class_metatable(lua_State* L) - { - lua_newtable(L); - - lua_pushstring(L, "__luabind_classrep"); - lua_pushboolean(L, 1); - lua_rawset(L, -3); - - lua_pushstring(L, "__gc"); - lua_pushcclosure( - L - , &detail::garbage_collector_s< - detail::class_rep - >::apply - , 0); - - lua_rawset(L, -3); - - lua_pushstring(L, "__newindex"); - lua_pushcclosure(L, &class_rep::lua_settable_dispatcher, 0); - lua_rawset(L, -3); - - lua_pushstring(L, "__call"); - lua_pushcclosure(L, &class_rep::constructor_dispatcher, 0); - lua_rawset(L, -3); - - lua_pushstring(L, "__index"); - lua_pushcclosure(L, &class_rep::static_class_gettable, 0); - lua_rawset(L, -3); - - return luaL_ref(L, LUA_REGISTRYINDEX); - } - - } // namespace unnamed - - class class_rep; - - class_registry::class_registry(lua_State* L) - : m_cpp_class_metatable(create_cpp_class_metatable(L)) - , m_lua_class_metatable(create_lua_class_metatable(L)) - { - push_instance_metatable(L); - m_instance_metatable = luaL_ref(L, LUA_REGISTRYINDEX); - } - - class_registry* class_registry::get_registry(lua_State* L) - { - -#ifdef LUABIND_NOT_THREADSAFE - - // if we don't have to be thread safe, we can keep a - // chache of the class_registry pointer without the - // need of a mutex - static lua_State* cache_key = 0; - static class_registry* registry_cache = 0; - if (cache_key == L) return registry_cache; - -#endif - - lua_pushstring(L, "__luabind_classes"); - lua_gettable(L, LUA_REGISTRYINDEX); - class_registry* p = static_cast(lua_touserdata(L, -1)); - lua_pop(L, 1); - -#ifdef LUABIND_NOT_THREADSAFE - - cache_key = L; - registry_cache = p; - -#endif - - return p; - } - - void class_registry::add_class(type_id const& info, class_rep* crep) - { - // class is already registered - assert((m_classes.find(info) == m_classes.end()) - && "you are trying to register a class twice"); - m_classes[info] = crep; - } - - class_rep* class_registry::find_class(type_id const& info) const - { - std::map::const_iterator i( - m_classes.find(info)); - - if (i == m_classes.end()) return 0; // the type is not registered - return i->second; - } - -}} // namespace luabind::detail - diff --git a/luabind/src/class_rep.cpp b/luabind/src/class_rep.cpp deleted file mode 100644 index 5f03f3931..000000000 --- a/luabind/src/class_rep.cpp +++ /dev/null @@ -1,390 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#define LUABIND_BUILDING - -#include - -#include -#include -#include -#include -#include -#include - -using namespace luabind::detail; - -namespace luabind { namespace detail -{ - LUABIND_API int property_tag(lua_State* L) - { - lua_pushstring(L, "luabind: property_tag function can't be called"); - lua_error(L); - return 0; - } -}} - -luabind::detail::class_rep::class_rep(type_id const& type - , const char* name - , lua_State* L -) - : m_type(type) - , m_name(name) - , m_class_type(cpp_class) - , m_operator_cache(0) -{ - lua_newtable(L); - handle(L, -1).swap(m_table); - lua_newtable(L); - handle(L, -1).swap(m_default_table); - lua_pop(L, 2); - - class_registry* r = class_registry::get_registry(L); - assert((r->cpp_class() != LUA_NOREF) && "you must call luabind::open()"); - - lua_rawgeti(L, LUA_REGISTRYINDEX, r->cpp_class()); - lua_setmetatable(L, -2); - - lua_pushvalue(L, -1); // duplicate our user data - m_self_ref.set(L); - - m_instance_metatable = r->cpp_instance(); - - lua_pushstring(L, "__luabind_cast_graph"); - lua_gettable(L, LUA_REGISTRYINDEX); - m_casts = static_cast(lua_touserdata(L, -1)); - lua_pop(L, 1); - - lua_pushstring(L, "__luabind_class_id_map"); - lua_gettable(L, LUA_REGISTRYINDEX); - m_classes = static_cast(lua_touserdata(L, -1)); - lua_pop(L, 1); -} - -luabind::detail::class_rep::class_rep(lua_State* L, const char* name) - : m_type(typeid(null_type)) - , m_name(name) - , m_class_type(lua_class) - , m_operator_cache(0) -{ - lua_newtable(L); - handle(L, -1).swap(m_table); - lua_newtable(L); - handle(L, -1).swap(m_default_table); - lua_pop(L, 2); - - class_registry* r = class_registry::get_registry(L); - assert((r->cpp_class() != LUA_NOREF) && "you must call luabind::open()"); - - lua_rawgeti(L, LUA_REGISTRYINDEX, r->lua_class()); - lua_setmetatable(L, -2); - lua_pushvalue(L, -1); // duplicate our user data - m_self_ref.set(L); - - m_instance_metatable = r->lua_instance(); - - lua_pushstring(L, "__luabind_cast_graph"); - lua_gettable(L, LUA_REGISTRYINDEX); - m_casts = static_cast(lua_touserdata(L, -1)); - lua_pop(L, 1); - - lua_pushstring(L, "__luabind_class_id_map"); - lua_gettable(L, LUA_REGISTRYINDEX); - m_classes = static_cast(lua_touserdata(L, -1)); - lua_pop(L, 1); -} - -luabind::detail::class_rep::~class_rep() -{ -} - -// leaves object on lua stack -std::pair -luabind::detail::class_rep::allocate(lua_State* L) const -{ - const int size = sizeof(object_rep); - char* mem = static_cast(lua_newuserdata(L, size)); - return std::pair(mem, (void*)0); -} - -namespace -{ - - bool super_deprecation_disabled = false; - -} // namespace unnamed - -// this is called as metamethod __call on the class_rep. -int luabind::detail::class_rep::constructor_dispatcher(lua_State* L) -{ - class_rep* cls = static_cast(lua_touserdata(L, 1)); - - int args = lua_gettop(L); - - push_new_instance(L, cls); - - if (super_deprecation_disabled - && cls->get_class_type() == class_rep::lua_class - && !cls->bases().empty()) - { - lua_pushvalue(L, 1); - lua_pushvalue(L, -2); - lua_pushcclosure(L, super_callback, 2); - lua_setglobal(L, "super"); - } - - lua_pushvalue(L, -1); - lua_replace(L, 1); - - cls->get_table(L); - lua_pushliteral(L, "__init"); - lua_gettable(L, -2); - - lua_insert(L, 1); - - lua_pop(L, 1); - lua_insert(L, 1); - - lua_call(L, args, 0); - - if (super_deprecation_disabled) - { - lua_pushnil(L); - lua_setglobal(L, "super"); - } - - return 1; -} - -void luabind::detail::class_rep::add_base_class(const luabind::detail::class_rep::base_info& binfo) -{ - // If you hit this assert you are deriving from a type that is not registered - // in lua. That is, in the class_<> you are giving a baseclass that isn't registered. - // Please note that if you don't need to have access to the base class or the - // conversion from the derived class to the base class, you don't need - // to tell luabind that it derives. - assert(binfo.base && "You cannot derive from an unregistered type"); - - class_rep* bcrep = binfo.base; - - // import all static constants - for (std::map::const_iterator i = bcrep->m_static_constants.begin(); - i != bcrep->m_static_constants.end(); ++i) - { - int& v = m_static_constants[i->first]; - v = i->second; - } - - // also, save the baseclass info to be used for typecasts - m_bases.push_back(binfo); -} - -LUABIND_API void luabind::disable_super_deprecation() -{ - super_deprecation_disabled = true; -} - -int luabind::detail::class_rep::super_callback(lua_State* L) -{ - int args = lua_gettop(L); - - class_rep* crep = static_cast(lua_touserdata(L, lua_upvalueindex(1))); - class_rep* base = crep->bases()[0].base; - - if (base->bases().empty()) - { - lua_pushnil(L); - lua_setglobal(L, "super"); - } - else - { - lua_pushlightuserdata(L, base); - lua_pushvalue(L, lua_upvalueindex(2)); - lua_pushcclosure(L, super_callback, 2); - lua_setglobal(L, "super"); - } - - base->get_table(L); - lua_pushstring(L, "__init"); - lua_gettable(L, -2); - lua_insert(L, 1); - lua_pop(L, 1); - - lua_pushvalue(L, lua_upvalueindex(2)); - lua_insert(L, 2); - - lua_call(L, args + 1, 0); - - // TODO: instead of clearing the global variable "super" - // store it temporarily in the registry. maybe we should - // have some kind of warning if the super global is used? - lua_pushnil(L); - lua_setglobal(L, "super"); - - return 0; -} - - - -int luabind::detail::class_rep::lua_settable_dispatcher(lua_State* L) -{ - class_rep* crep = static_cast(lua_touserdata(L, 1)); - - // get first table - crep->get_table(L); - - // copy key, value - lua_pushvalue(L, -3); - lua_pushvalue(L, -3); - lua_rawset(L, -3); - // pop table - lua_pop(L, 1); - - // get default table - crep->get_default_table(L); - lua_replace(L, 1); - lua_rawset(L, -3); - - crep->m_operator_cache = 0; // invalidate cache - - return 0; -} - -/* - stack: - 1: class_rep - 2: member name -*/ -int luabind::detail::class_rep::static_class_gettable(lua_State* L) -{ - class_rep* crep = static_cast(lua_touserdata(L, 1)); - - // look in the static function table - crep->get_default_table(L); - lua_pushvalue(L, 2); - lua_gettable(L, -2); - if (!lua_isnil(L, -1)) return 1; - else lua_pop(L, 2); - - const char* key = lua_tostring(L, 2); - - if (std::strlen(key) != lua_strlen(L, 2)) - { - lua_pushnil(L); - return 1; - } - - std::map::const_iterator j = crep->m_static_constants.find(key); - - if (j != crep->m_static_constants.end()) - { - lua_pushnumber(L, j->second); - return 1; - } - -#ifndef LUABIND_NO_ERROR_CHECKING - - { - std::string msg = "no static '"; - msg += key; - msg += "' in class '"; - msg += crep->name(); - msg += "'"; - lua_pushstring(L, msg.c_str()); - } - lua_error(L); - -#endif - - lua_pushnil(L); - - return 1; -} - -bool luabind::detail::is_class_rep(lua_State* L, int index) -{ - if (lua_getmetatable(L, index) == 0) return false; - - lua_pushstring(L, "__luabind_classrep"); - lua_gettable(L, -2); - if (lua_toboolean(L, -1)) - { - lua_pop(L, 2); - return true; - } - - lua_pop(L, 2); - return false; -} - -void luabind::detail::finalize(lua_State* L, class_rep* crep) -{ - if (crep->get_class_type() != class_rep::lua_class) return; - -// lua_pushvalue(L, -1); // copy the object ref - crep->get_table(L); - lua_pushliteral(L, "__finalize"); - lua_gettable(L, -2); - lua_remove(L, -2); - - if (lua_isnil(L, -1)) - { - lua_pop(L, 1); - } - else - { - lua_pushvalue(L, -2); - lua_call(L, 1, 0); - } - - for (std::vector::const_iterator - i = crep->bases().begin(); i != crep->bases().end(); ++i) - { - if (i->base) finalize(L, i->base); - } -} - -void luabind::detail::class_rep::cache_operators(lua_State* L) -{ - m_operator_cache = 0x1; - - for (int i = 0; i < number_of_operators; ++i) - { - get_table(L); - lua_pushstring(L, get_operator_name(i)); - lua_rawget(L, -2); - - if (lua_isfunction(L, -1)) m_operator_cache |= 1 << (i + 1); - - lua_pop(L, 2); - } -} - -bool luabind::detail::class_rep::has_operator_in_lua(lua_State* L, int id) -{ - if ((m_operator_cache & 0x1) == 0) - cache_operators(L); - - const int mask = 1 << (id + 1); - - return (m_operator_cache & mask) != 0; -} diff --git a/luabind/src/create_class.cpp b/luabind/src/create_class.cpp deleted file mode 100644 index 47251ef23..000000000 --- a/luabind/src/create_class.cpp +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#define LUABIND_BUILDING - -#include - -#include - -namespace luabind { namespace detail -{ - namespace - { - // expects two tables on the lua stack: - // 1: destination - // 2: source - void copy_member_table(lua_State* L) - { - lua_pushnil(L); - - while (lua_next(L, -2)) - { - lua_pushstring(L, "__init"); - if (lua_equal(L, -1, -3)) - { - lua_pop(L, 2); - continue; - } - else lua_pop(L, 1); // __init string - - lua_pushstring(L, "__finalize"); - if (lua_equal(L, -1, -3)) - { - lua_pop(L, 2); - continue; - } - else lua_pop(L, 1); // __finalize string - - lua_pushvalue(L, -2); // copy key - lua_insert(L, -2); - lua_settable(L, -5); - } - } - } - - - int create_class::stage2(lua_State* L) - { - class_rep* crep = static_cast(lua_touserdata(L, lua_upvalueindex(1))); - assert((crep != 0) && "internal error, please report"); - assert((is_class_rep(L, lua_upvalueindex(1))) && "internal error, please report"); - - #ifndef LUABIND_NO_ERROR_CHECKING - - if (!is_class_rep(L, 1)) - { - lua_pushstring(L, "expected class to derive from or a newline"); - lua_error(L); - } - - #endif - - class_rep* base = static_cast(lua_touserdata(L, 1)); - class_rep::base_info binfo; - - binfo.pointer_offset = 0; - binfo.base = base; - crep->add_base_class(binfo); - - // copy base class members - - crep->get_table(L); - base->get_table(L); - copy_member_table(L); - - crep->get_default_table(L); - base->get_default_table(L); - copy_member_table(L); - - crep->set_type(base->type()); - - return 0; - } - - int create_class::stage1(lua_State* L) - { - - #ifndef LUABIND_NO_ERROR_CHECKING - - if (lua_gettop(L) != 1 || lua_type(L, 1) != LUA_TSTRING || lua_isnumber(L, 1)) - { - lua_pushstring(L, "invalid construct, expected class name"); - lua_error(L); - } - - if (std::strlen(lua_tostring(L, 1)) != lua_strlen(L, 1)) - { - lua_pushstring(L, "luabind does not support class names with extra nulls"); - lua_error(L); - } - - #endif - - const char* name = lua_tostring(L, 1); - - void* c = lua_newuserdata(L, sizeof(class_rep)); - new(c) class_rep(L, name); - - // make the class globally available - lua_pushvalue(L, -1); - lua_setglobal(L, name); - - // also add it to the closure as return value - lua_pushcclosure(L, &stage2, 1); - - return 1; - } - -}} - diff --git a/luabind/src/error.cpp b/luabind/src/error.cpp deleted file mode 100644 index 73bbf5c62..000000000 --- a/luabind/src/error.cpp +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#define LUABIND_BUILDING - -#include - - -namespace luabind -{ - - namespace - { - pcall_callback_fun pcall_callback = 0; -#ifdef LUABIND_NO_EXCEPTIONS - error_callback_fun error_callback = 0; - cast_failed_callback_fun cast_failed_callback = 0; -#endif - } - - -#ifdef LUABIND_NO_EXCEPTIONS - - typedef void(*error_callback_fun)(lua_State*); - typedef void(*cast_failed_callback_fun)(lua_State*, type_id const&); - - void set_error_callback(error_callback_fun e) - { - error_callback = e; - } - - void set_cast_failed_callback(cast_failed_callback_fun c) - { - cast_failed_callback = c; - } - - error_callback_fun get_error_callback() - { - return error_callback; - } - - cast_failed_callback_fun get_cast_failed_callback() - { - return cast_failed_callback; - } - -#endif - - void set_pcall_callback(pcall_callback_fun e) - { - pcall_callback = e; - } - - pcall_callback_fun get_pcall_callback() - { - return pcall_callback; - } - -} diff --git a/luabind/src/exception_handler.cpp b/luabind/src/exception_handler.cpp deleted file mode 100644 index 555d3858c..000000000 --- a/luabind/src/exception_handler.cpp +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright Daniel Wallin 2005. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#define LUABIND_BUILDING - -#include -#include -#include -#include - -#ifndef LUABIND_NO_EXCEPTIONS - -namespace luabind { namespace detail { - -namespace -{ - exception_handler_base* handler_chain = 0; - - void push_exception_string(lua_State* L, char const* exception, char const* what) - { - lua_pushstring(L, exception); - lua_pushstring(L, ": '"); - lua_pushstring(L, what); - lua_pushstring(L, "'"); - lua_concat(L, 4); - } -} - -void exception_handler_base::try_next(lua_State* L) const -{ - if (next) - next->handle(L); - else - throw; -} - -LUABIND_API void handle_exception_aux(lua_State* L) -{ - try - { - if (handler_chain) - handler_chain->handle(L); - else - throw; - } - catch (error const&) - {} - catch (std::logic_error const& e) - { - push_exception_string(L, "std::logic_error", e.what()); - } - catch (std::runtime_error const& e) - { - push_exception_string(L, "std::runtime_error", e.what()); - } - catch (std::exception const& e) - { - push_exception_string(L, "std::exception", e.what()); - } - catch (char const* str) - { - push_exception_string(L, "c-string", str); - } - catch (...) - { - lua_pushstring(L, "Unknown C++ exception"); - } -} - -LUABIND_API void register_exception_handler(exception_handler_base* handler) -{ - if (!handler_chain) handler_chain = handler; - else - { - exception_handler_base* p = handler_chain; - - for (; p->next; p = p->next); - - handler->next = 0; - p->next = handler; - } -} - -}} // namespace luabind::detail - -#endif // LUABIND_NO_EXCEPTIONS diff --git a/luabind/src/function.cpp b/luabind/src/function.cpp deleted file mode 100644 index 20569b2bd..000000000 --- a/luabind/src/function.cpp +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright Daniel Wallin 2008. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#define LUABIND_BUILDING - -#include - -namespace luabind { namespace detail { - -namespace -{ - - int function_destroy(lua_State* L) - { - function_object* fn = *(function_object**)lua_touserdata(L, 1); - delete fn; - return 0; - } - - void push_function_metatable(lua_State* L) - { - lua_pushstring(L, "luabind.function"); - lua_rawget(L, LUA_REGISTRYINDEX); - - if (lua_istable(L, -1)) - return; - - lua_pop(L, 1); - - lua_newtable(L); - - lua_pushstring(L, "__gc"); - lua_pushcclosure(L, &function_destroy, 0); - lua_rawset(L, -3); - - lua_pushstring(L, "luabind.function"); - lua_pushvalue(L, -2); - lua_rawset(L, LUA_REGISTRYINDEX); - } - - // A pointer to this is used as a tag value to identify functions exported - // by luabind. - int function_tag = 0; - -} // namespace unnamed - -LUABIND_API bool is_luabind_function(lua_State* L, int index) -{ - if (!lua_getupvalue(L, index, 2)) - return false; - bool result = lua_touserdata(L, -1) == &function_tag; - lua_pop(L, 1); - return result; -} - -namespace -{ - - inline bool is_luabind_function(object const& obj) - { - obj.push(obj.interpreter()); - bool result = detail::is_luabind_function(obj.interpreter(), -1); - lua_pop(obj.interpreter(), 1); - return result; - } - -} // namespace unnamed - -LUABIND_API void add_overload( - object const& context, char const* name, object const& fn) -{ - function_object* f = *touserdata(getupvalue(fn, 1)); - f->name = name; - - if (object overloads = context[name]) - { - if (is_luabind_function(overloads) && is_luabind_function(fn)) - { - f->next = *touserdata(getupvalue(overloads, 1)); - f->keepalive = overloads; - } - } - - context[name] = fn; -} - -LUABIND_API object make_function_aux(lua_State* L, function_object* impl) -{ - void* storage = lua_newuserdata(L, sizeof(function_object*)); - push_function_metatable(L); - *(function_object**)storage = impl; - lua_setmetatable(L, -2); - - lua_pushlightuserdata(L, &function_tag); - lua_pushcclosure(L, impl->entry, 2); - stack_pop pop(L, 1); - - return object(from_stack(L, -1)); -} - -void invoke_context::format_error( - lua_State* L, function_object const* overloads) const -{ - char const* function_name = - overloads->name.empty() ? "" : overloads->name.c_str(); - - if (candidate_index == 0) - { - lua_pushstring(L, "No matching overload found, candidates:\n"); - int count = 0; - for (function_object const* f = overloads; f != 0; f = f->next) - { - if (count != 0) - lua_pushstring(L, "\n"); - f->format_signature(L, function_name); - ++count; - } - lua_concat(L, count * 2); - } - else - { - // Ambiguous - lua_pushstring(L, "Ambiguous, candidates:\n"); - for (int i = 0; i < candidate_index; ++i) - { - if (i != 0) - lua_pushstring(L, "\n"); - candidates[i]->format_signature(L, function_name); - } - lua_concat(L, candidate_index * 2); - } -} - -}} // namespace luabind::detail - diff --git a/luabind/src/inheritance.cpp b/luabind/src/inheritance.cpp deleted file mode 100644 index 2e2ec902a..000000000 --- a/luabind/src/inheritance.cpp +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright Daniel Wallin 2009. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#define LUABIND_BUILDING - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace luabind { namespace detail { - -class_id const class_id_map::local_id_base = - std::numeric_limits::max() / 2; - -namespace -{ - - struct edge - { - edge(class_id target, cast_function cast) - : target(target) - , cast(cast) - {} - - class_id target; - cast_function cast; - }; - - bool operator<(edge const& x, edge const& y) - { - return x.target < y.target; - } - - struct vertex - { - vertex(class_id id) - : id(id) - {} - - class_id id; - std::vector edges; - }; - - typedef std::pair cache_entry; - - class cache - { - public: - static std::ptrdiff_t const unknown; - static std::ptrdiff_t const invalid; - - cache_entry get( - class_id src, class_id target, class_id dynamic_id - , std::ptrdiff_t object_offset) const; - - void put( - class_id src, class_id target, class_id dynamic_id - , std::ptrdiff_t object_offset - , std::size_t distance, std::ptrdiff_t offset); - - void invalidate(); - - private: - typedef boost::tuple< - class_id, class_id, class_id, std::ptrdiff_t> key_type; - typedef std::map map_type; - map_type m_cache; - }; - - std::ptrdiff_t const cache::unknown = - std::numeric_limits::max(); - std::ptrdiff_t const cache::invalid = cache::unknown - 1; - - cache_entry cache::get( - class_id src, class_id target, class_id dynamic_id - , std::ptrdiff_t object_offset) const - { - map_type::const_iterator i = m_cache.find( - key_type(src, target, dynamic_id, object_offset)); - return i != m_cache.end() ? i->second : cache_entry(unknown, -1); - } - - void cache::put( - class_id src, class_id target, class_id dynamic_id - , std::ptrdiff_t object_offset, std::size_t distance, std::ptrdiff_t offset) - { - m_cache.insert(std::make_pair( - key_type(src, target, dynamic_id, object_offset) - , cache_entry(offset, distance) - )); - } - - void cache::invalidate() - { - m_cache.clear(); - } - -} // namespace unnamed - -class cast_graph::impl -{ -public: - std::pair cast( - void* p, class_id src, class_id target - , class_id dynamic_id, void const* dynamic_ptr) const; - void insert(class_id src, class_id target, cast_function cast); - -private: - std::vector m_vertices; - mutable cache m_cache; -}; - -namespace -{ - - struct queue_entry - { - queue_entry(void* p, class_id vertex_id, int distance) - : p(p) - , vertex_id(vertex_id) - , distance(distance) - {} - - void* p; - class_id vertex_id; - int distance; - }; - -} // namespace unnamed - -std::pair cast_graph::impl::cast( - void* const p, class_id src, class_id target - , class_id dynamic_id, void const* dynamic_ptr) const -{ - if (src == target) - return std::make_pair(p, 0); - - if (src >= m_vertices.size() || target >= m_vertices.size()) - return std::pair((void*)0, -1); - - std::ptrdiff_t const object_offset = - (char const*)dynamic_ptr - (char const*)p; - - cache_entry cached = m_cache.get(src, target, dynamic_id, object_offset); - - if (cached.first != cache::unknown) - { - if (cached.first == cache::invalid) - return std::pair((void*)0, -1); - return std::make_pair((char*)p + cached.first, cached.second); - } - - std::queue q; - q.push(queue_entry(p, src, 0)); - - boost::dynamic_bitset<> visited(m_vertices.size()); - - while (!q.empty()) - { - queue_entry const qe = q.front(); - q.pop(); - - visited[qe.vertex_id] = true; - vertex const& v = m_vertices[qe.vertex_id]; - - if (v.id == target) - { - m_cache.put( - src, target, dynamic_id, object_offset - , qe.distance, (char*)qe.p - (char*)p - ); - - return std::make_pair(qe.p, qe.distance); - } - - BOOST_FOREACH(edge const& e, v.edges) - { - if (visited[e.target]) - continue; - if (void* casted = e.cast(qe.p)) - q.push(queue_entry(casted, e.target, qe.distance + 1)); - } - } - - m_cache.put(src, target, dynamic_id, object_offset, cache::invalid, -1); - - return std::pair((void*)0, -1); -} - -void cast_graph::impl::insert( - class_id src, class_id target, cast_function cast) -{ - class_id const max_id = std::max(src, target); - - if (max_id >= m_vertices.size()) - { - m_vertices.reserve(max_id + 1); - for (class_id i = m_vertices.size(); i < max_id + 1; ++i) - m_vertices.push_back(vertex(i)); - } - - std::vector& edges = m_vertices[src].edges; - - std::vector::iterator i = std::lower_bound( - edges.begin(), edges.end(), edge(target, 0) - ); - - if (i == edges.end() || i->target != target) - { - edges.insert(i, edge(target, cast)); - m_cache.invalidate(); - } -} - -std::pair cast_graph::cast( - void* p, class_id src, class_id target - , class_id dynamic_id, void const* dynamic_ptr) const -{ - return m_impl->cast(p, src, target, dynamic_id, dynamic_ptr); -} - -void cast_graph::insert(class_id src, class_id target, cast_function cast) -{ - m_impl->insert(src, target, cast); -} - -cast_graph::cast_graph() - : m_impl(new impl) -{} - -cast_graph::~cast_graph() -{} - -LUABIND_API class_id allocate_class_id(type_id const& cls) -{ - typedef std::map map_type; - - static map_type registered; - static class_id id = 0; - - std::pair inserted = registered.insert( - std::make_pair(cls, id)); - - if (inserted.second) - ++id; - - return inserted.first->second; -} - -}} // namespace luabind::detail diff --git a/luabind/src/link_compatibility.cpp b/luabind/src/link_compatibility.cpp deleted file mode 100644 index 515e0e392..000000000 --- a/luabind/src/link_compatibility.cpp +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#define LUABIND_BUILDING - -#include - -namespace luabind { namespace detail -{ - -#ifdef LUABIND_NOT_THREADSAFE - void not_threadsafe_defined_conflict() {} -#else - void not_threadsafe_not_defined_conflict() {} -#endif - -#ifdef LUABIND_NO_ERROR_CHECKING - void no_error_checking_defined_conflict() {} -#else - void no_error_checking_not_defined_conflict() {} -#endif - -}} - diff --git a/luabind/src/object_rep.cpp b/luabind/src/object_rep.cpp deleted file mode 100644 index afc6d9800..000000000 --- a/luabind/src/object_rep.cpp +++ /dev/null @@ -1,273 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#define LUABIND_BUILDING - -#include -#include -#include - -namespace luabind { namespace detail -{ - - // dest is a function that is called to delete the c++ object this struct holds - object_rep::object_rep(instance_holder* instance, class_rep* crep) - : m_instance(instance) - , m_classrep(crep) - , m_dependency_cnt(0) - {} - - object_rep::~object_rep() - { - if (!m_instance) - return; - m_instance->~instance_holder(); - deallocate(m_instance); - } - - void object_rep::add_dependency(lua_State* L, int index) - { - assert(m_dependency_cnt < sizeof(object_rep)); - - void* key = (char*)this + m_dependency_cnt; - - lua_pushlightuserdata(L, key); - lua_pushvalue(L, index); - lua_rawset(L, LUA_REGISTRYINDEX); - - ++m_dependency_cnt; - } - - void object_rep::release_dependency_refs(lua_State* L) - { - for (std::size_t i = 0; i < m_dependency_cnt; ++i) - { - void* key = (char*)this + i; - lua_pushlightuserdata(L, key); - lua_pushnil(L); - lua_rawset(L, LUA_REGISTRYINDEX); - } - } - - int destroy_instance(lua_State* L) - { - object_rep* instance = static_cast(lua_touserdata(L, 1)); - - lua_pushstring(L, "__finalize"); - lua_gettable(L, 1); - - if (lua_isnil(L, -1)) - { - lua_pop(L, 1); - } - else - { - lua_pushvalue(L, 1); - lua_call(L, 1, 0); - } - - instance->release_dependency_refs(L); - instance->~object_rep(); - return 0; - } - - namespace - { - - int set_instance_value(lua_State* L) - { - lua_getfenv(L, 1); - lua_pushvalue(L, 2); - lua_rawget(L, -2); - - if (lua_isnil(L, -1) && lua_getmetatable(L, -2)) - { - lua_pushvalue(L, 2); - lua_rawget(L, -2); - lua_replace(L, -3); - lua_pop(L, 1); - } - - if (lua_tocfunction(L, -1) == &property_tag) - { - // this member is a property, extract the "set" function and call it. - lua_getupvalue(L, -1, 2); - - if (lua_isnil(L, -1)) - { - lua_pushfstring(L, "property '%s' is read only", lua_tostring(L, 2)); - lua_error(L); - } - - lua_pushvalue(L, 1); - lua_pushvalue(L, 3); - lua_call(L, 2, 0); - return 0; - } - - lua_pop(L, 1); - - if (!lua_getmetatable(L, 4)) - { - lua_newtable(L); - lua_pushvalue(L, -1); - lua_setfenv(L, 1); - lua_pushvalue(L, 4); - lua_setmetatable(L, -2); - } - else - { - lua_pop(L, 1); - } - - lua_pushvalue(L, 2); - lua_pushvalue(L, 3); - lua_rawset(L, -3); - - return 0; - } - - int get_instance_value(lua_State* L) - { - lua_getfenv(L, 1); - lua_pushvalue(L, 2); - lua_rawget(L, -2); - - if (lua_isnil(L, -1) && lua_getmetatable(L, -2)) - { - lua_pushvalue(L, 2); - lua_rawget(L, -2); - } - - if (lua_tocfunction(L, -1) == &property_tag) - { - // this member is a property, extract the "get" function and call it. - lua_getupvalue(L, -1, 1); - lua_pushvalue(L, 1); - lua_call(L, 1, 1); - } - - return 1; - } - - int dispatch_operator(lua_State* L) - { - for (int i = 0; i < 2; ++i) - { - if (get_instance(L, 1 + i)) - { - int nargs = lua_gettop(L); - - lua_pushvalue(L, lua_upvalueindex(1)); - lua_gettable(L, 1 + i); - - if (lua_isnil(L, -1)) - { - lua_pop(L, 1); - continue; - } - - lua_insert(L, 1); // move the function to the bottom - - nargs = lua_toboolean(L, lua_upvalueindex(2)) ? 1 : nargs; - - if (lua_toboolean(L, lua_upvalueindex(2))) // remove trailing nil - lua_remove(L, 3); - - lua_call(L, nargs, 1); - return 1; - } - } - - lua_pop(L, lua_gettop(L)); - lua_pushstring(L, "No such operator defined"); - lua_error(L); - - return 0; - } - - } // namespace unnamed - - LUABIND_API void push_instance_metatable(lua_State* L) - { - lua_newtable(L); - - // just indicate that this really is a class and not just - // any user data - lua_pushboolean(L, 1); - lua_setfield(L, -2, "__luabind_class"); - - // This is used as a tag to determine if a userdata is a luabind - // instance. We use a numeric key and a cclosure for fast comparision. - lua_pushnumber(L, 1); - lua_pushcclosure(L, get_instance_value, 0); - lua_rawset(L, -3); - - lua_pushcclosure(L, destroy_instance, 0); - lua_setfield(L, -2, "__gc"); - - lua_pushcclosure(L, get_instance_value, 0); - lua_setfield(L, -2, "__index"); - - lua_pushcclosure(L, set_instance_value, 0); - lua_setfield(L, -2, "__newindex"); - - for (int op = 0; op < number_of_operators; ++op) - { - lua_pushstring(L, get_operator_name(op)); - lua_pushvalue(L, -1); - lua_pushboolean(L, op == op_unm || op == op_len); - lua_pushcclosure(L, &dispatch_operator, 2); - lua_settable(L, -3); - } - } - - LUABIND_API object_rep* get_instance(lua_State* L, int index) - { - object_rep* result = static_cast(lua_touserdata(L, index)); - - if (!result || !lua_getmetatable(L, index)) - return 0; - - lua_rawgeti(L, -1, 1); - - if (lua_tocfunction(L, -1) != &get_instance_value) - result = 0; - - lua_pop(L, 2); - - return result; - } - - LUABIND_API object_rep* push_new_instance(lua_State* L, class_rep* cls) - { - void* storage = lua_newuserdata(L, sizeof(object_rep)); - object_rep* result = new (storage) object_rep(0, cls); - cls->get_table(L); - lua_setfenv(L, -2); - lua_rawgeti(L, LUA_REGISTRYINDEX, cls->metatable_ref()); - lua_setmetatable(L, -2); - return result; - } - -}} - diff --git a/luabind/src/open.cpp b/luabind/src/open.cpp deleted file mode 100644 index ec8e4ff64..000000000 --- a/luabind/src/open.cpp +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#define LUABIND_BUILDING - -#include - -#include -#include -#include - -namespace luabind { - -namespace -{ - - int make_property(lua_State* L) - { - int args = lua_gettop(L); - - if (args == 0 || args > 2) - { - lua_pushstring(L, "make_property() called with wrong number of arguments."); - lua_error(L); - } - - if (args == 1) - lua_pushnil(L); - - lua_pushcclosure(L, &detail::property_tag, 2); - return 1; - } - - int main_thread_tag; - - int deprecated_super(lua_State* L) - { - lua_pushstring(L, - "DEPRECATION: 'super' has been deprecated in favor of " - "directly calling the base class __init() function. " - "This error can be disabled by calling 'luabind::disable_super_deprecation()'." - ); - lua_error(L); - - return 0; - } - - int destroy_class_id_map(lua_State* L) - { - detail::class_id_map* m = - (detail::class_id_map*)lua_touserdata(L, 1); - m->~class_id_map(); - return 0; - } - - int destroy_cast_graph(lua_State* L) - { - detail::cast_graph* g = - (detail::cast_graph*)lua_touserdata(L, 1); - g->~cast_graph(); - return 0; - } - - int destroy_class_map(lua_State* L) - { - detail::class_map* m = - (detail::class_map*)lua_touserdata(L, 1); - m->~class_map(); - return 0; - } - -} // namespace unnamed - - LUABIND_API lua_State* get_main_thread(lua_State* L) - { - lua_pushlightuserdata(L, &main_thread_tag); - lua_rawget(L, LUA_REGISTRYINDEX); - lua_State* result = static_cast(lua_touserdata(L, -1)); - lua_pop(L, 1); - - if (!result) - throw std::runtime_error("Unable to get main thread, luabind::open() not called?"); - - return result; - } - - LUABIND_API void open(lua_State* L) - { - bool is_main_thread = lua_pushthread(L) == 1; - lua_pop(L, 1); - - if (!is_main_thread) - { - throw std::runtime_error( - "luabind::open() must be called with the main thread " - "lua_State*" - ); - } - - if (detail::class_registry::get_registry(L)) - return; - - lua_pushstring(L, "__luabind_classes"); - detail::class_registry* r = static_cast( - lua_newuserdata(L, sizeof(detail::class_registry))); - - // set gc metatable - lua_newtable(L); - lua_pushstring(L, "__gc"); - lua_pushcclosure( - L - , detail::garbage_collector_s< - detail::class_registry - >::apply - , 0); - - lua_settable(L, -3); - lua_setmetatable(L, -2); - - new(r) detail::class_registry(L); - lua_settable(L, LUA_REGISTRYINDEX); - - lua_pushstring(L, "__luabind_class_id_map"); - void* classes_storage = lua_newuserdata(L, sizeof(detail::class_id_map)); - detail::class_id_map* class_ids = new (classes_storage) detail::class_id_map; - (void)class_ids; - - lua_newtable(L); - lua_pushcclosure(L, &destroy_class_id_map, 0); - lua_setfield(L, -2, "__gc"); - lua_setmetatable(L, -2); - - lua_settable(L, LUA_REGISTRYINDEX); - - lua_pushstring(L, "__luabind_cast_graph"); - void* cast_graph_storage = lua_newuserdata( - L, sizeof(detail::cast_graph)); - detail::cast_graph* graph = new (cast_graph_storage) detail::cast_graph; - (void)graph; - - lua_newtable(L); - lua_pushcclosure(L, &destroy_cast_graph, 0); - lua_setfield(L, -2, "__gc"); - lua_setmetatable(L, -2); - - lua_settable(L, LUA_REGISTRYINDEX); - - lua_pushstring(L, "__luabind_class_map"); - void* class_map_storage = lua_newuserdata( - L, sizeof(detail::class_map)); - detail::class_map* classes = new (class_map_storage) detail::class_map; - (void)classes; - - lua_newtable(L); - lua_pushcclosure(L, &destroy_class_map, 0); - lua_setfield(L, -2, "__gc"); - lua_setmetatable(L, -2); - - lua_settable(L, LUA_REGISTRYINDEX); - - // add functions (class, cast etc...) - lua_pushcclosure(L, detail::create_class::stage1, 0); - lua_setglobal(L, "class"); - - lua_pushcclosure(L, &make_property, 0); - lua_setglobal(L, "property"); - - lua_pushlightuserdata(L, &main_thread_tag); - lua_pushlightuserdata(L, L); - lua_rawset(L, LUA_REGISTRYINDEX); - - lua_pushcclosure(L, &deprecated_super, 0); - lua_setglobal(L, "super"); - } - -} // namespace luabind - diff --git a/luabind/src/pcall.cpp b/luabind/src/pcall.cpp deleted file mode 100644 index 1bf642531..000000000 --- a/luabind/src/pcall.cpp +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#define LUABIND_BUILDING - -#include -#include -#include - -namespace luabind { namespace detail -{ - int pcall(lua_State *L, int nargs, int nresults) - { - pcall_callback_fun e = get_pcall_callback(); - int en = 0; - if ( e ) - { - int base = lua_gettop(L) - nargs; - lua_pushcfunction(L, e); - lua_insert(L, base); // push pcall_callback under chunk and args - en = base; - } - int result = lua_pcall(L, nargs, nresults, en); - if ( en ) - lua_remove(L, en); // remove pcall_callback - return result; - } - - int resume_impl(lua_State *L, int nargs, int) - { -#if LUA_VERSION_NUM >= 502 - int res = lua_resume(L, NULL, nargs); -#else - int res = lua_resume(L, nargs); -#endif - -#if LUA_VERSION_NUM >= 501 - // Lua 5.1 added LUA_YIELD as a possible return value, - // this was causing crashes, because the caller expects 0 on success. - return (res == LUA_YIELD) ? 0 : res; -#else - return res; -#endif - } - -}} diff --git a/luabind/src/scope.cpp b/luabind/src/scope.cpp deleted file mode 100644 index 52bd132f9..000000000 --- a/luabind/src/scope.cpp +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright (c) 2004 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#define LUABIND_BUILDING - -#include - -#include -#include -#include -#include -#include - -namespace luabind { namespace detail { - - registration::registration() - : m_next(0) - { - } - - registration::~registration() - { - delete m_next; - } - - } // namespace detail - - scope::scope() - : m_chain(0) - { - } - - scope::scope(std::auto_ptr reg) - : m_chain(reg.release()) - { - } - - scope::scope(scope const& other) - : m_chain(other.m_chain) - { - const_cast(other).m_chain = 0; - } - - scope& scope::operator=(scope const& other_) - { - delete m_chain; - m_chain = other_.m_chain; - const_cast(other_).m_chain = 0; - return *this; - } - - scope::~scope() - { - delete m_chain; - } - - scope& scope::operator,(scope s) - { - if (!m_chain) - { - m_chain = s.m_chain; - s.m_chain = 0; - return *this; - } - - for (detail::registration* c = m_chain;; c = c->m_next) - { - if (!c->m_next) - { - c->m_next = s.m_chain; - s.m_chain = 0; - break; - } - } - - return *this; - } - - void scope::register_(lua_State* L) const - { - for (detail::registration* r = m_chain; r != 0; r = r->m_next) - { - LUABIND_CHECK_STACK(L); - r->register_(L); - } - } - -} // namespace luabind - -namespace luabind { - - namespace { - - struct lua_pop_stack - { - lua_pop_stack(lua_State* L) - : m_state(L) - { - } - - ~lua_pop_stack() - { - lua_pop(m_state, 1); - } - - lua_State* m_state; - }; - - } // namespace unnamed - - module_::module_(lua_State* L, char const* name = 0) - : m_state(L) - , m_name(name) - { - } - - void module_::operator[](scope s) - { - if (m_name) - { - lua_getglobal(m_state, m_name); - - if (!lua_istable(m_state, -1)) - { - lua_pop(m_state, 1); - - lua_newtable(m_state); - lua_pushvalue(m_state, -1); - lua_setglobal(m_state, m_name); - } - } - else - { - lua_pushglobaltable(m_state); - } - - lua_pop_stack guard(m_state); - - s.register_(m_state); - } - - struct namespace_::registration_ : detail::registration - { - registration_(char const* name) - : m_name(name) - { - } - - void register_(lua_State* L) const - { - LUABIND_CHECK_STACK(L); - assert(lua_gettop(L) >= 1); - - lua_pushstring(L, m_name); - lua_gettable(L, -2); - - detail::stack_pop p(L, 1); // pops the table on exit - - if (!lua_istable(L, -1)) - { - lua_pop(L, 1); - - lua_newtable(L); - lua_pushstring(L, m_name); - lua_pushvalue(L, -2); - lua_settable(L, -4); - } - - m_scope.register_(L); - } - - char const* m_name; - scope m_scope; - }; - - namespace_::namespace_(char const* name) - : scope(std::auto_ptr( - m_registration = new registration_(name))) - { - } - - namespace_& namespace_::operator[](scope s) - { - m_registration->m_scope.operator,(s); - return *this; - } - -} // namespace luabind - diff --git a/luabind/src/stack_content_by_name.cpp b/luabind/src/stack_content_by_name.cpp deleted file mode 100644 index 38b5c691d..000000000 --- a/luabind/src/stack_content_by_name.cpp +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#define LUABIND_BUILDING - -#include - -#include - -using namespace luabind::detail; - -std::string luabind::detail::stack_content_by_name(lua_State* L, int start_index) -{ - std::string ret; - int top = lua_gettop(L); - for (int i = start_index; i <= top; ++i) - { - object_rep* obj = get_instance(L, i); - class_rep* crep = is_class_rep(L, i)?(class_rep*)lua_touserdata(L, i):0; - if (obj == 0 && crep == 0) - { - int type = lua_type(L, i); - ret += lua_typename(L, type); - } - else if (obj) - { - if (obj->is_const()) ret += "const "; - ret += obj->crep()->name(); - } - else if (crep) - { - ret += "<"; - ret += crep->name(); - ret += ">"; - } - if (i < top) ret += ", "; - } - return ret; -} - diff --git a/luabind/src/weak_ref.cpp b/luabind/src/weak_ref.cpp deleted file mode 100644 index 245b26c2e..000000000 --- a/luabind/src/weak_ref.cpp +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) 2004 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#define LUABIND_BUILDING - -#include - -#include - -#include -#include -#include - -namespace luabind { - -namespace -{ - - int weak_table_tag; - -} // namespace unnamed - -LUABIND_API void get_weak_table(lua_State* L) -{ - lua_pushlightuserdata(L, &weak_table_tag); - lua_rawget(L, LUA_REGISTRYINDEX); - - if (lua_isnil(L, -1)) - { - lua_pop(L, 1); - lua_newtable(L); - // metatable - lua_newtable(L); - lua_pushliteral(L, "__mode"); - lua_pushliteral(L, "v"); - lua_rawset(L, -3); - // set metatable - lua_setmetatable(L, -2); - - lua_pushlightuserdata(L, &weak_table_tag); - lua_pushvalue(L, -2); - lua_rawset(L, LUA_REGISTRYINDEX); - } -} - -} // namespace luabind - -namespace luabind -{ - - struct weak_ref::impl - { - impl(lua_State* main, lua_State* s, int index) - : count(0) - , state(main) - , ref(0) - { - get_weak_table(s); - lua_pushvalue(s, index); - ref = luaL_ref(s, -2); - lua_pop(s, 1); - } - - ~impl() - { - get_weak_table(state); - luaL_unref(state, -1, ref); - lua_pop(state, 1); - } - - int count; - lua_State* state; - int ref; - }; - - weak_ref::weak_ref() - : m_impl(0) - { - } - - weak_ref::weak_ref(lua_State* main, lua_State* L, int index) - : m_impl(new impl(main, L, index)) - { - m_impl->count = 1; - } - - weak_ref::weak_ref(weak_ref const& other) - : m_impl(other.m_impl) - { - if (m_impl) ++m_impl->count; - } - - weak_ref::~weak_ref() - { - if (m_impl && --m_impl->count == 0) - { - delete m_impl; - } - } - - weak_ref& weak_ref::operator=(weak_ref const& other) - { - weak_ref(other).swap(*this); - return *this; - } - - void weak_ref::swap(weak_ref& other) - { - std::swap(m_impl, other.m_impl); - } - - int weak_ref::id() const - { - assert(m_impl); - return m_impl->ref; - } - - // L may not be the same pointer as - // was used when creating this reference - // since it may be a thread that shares - // the same globals table. - void weak_ref::get(lua_State* L) const - { - assert(m_impl); - assert(L); - get_weak_table(L); - lua_rawgeti(L, -1, m_impl->ref); - lua_remove(L, -2); - } - - lua_State* weak_ref::state() const - { - assert(m_impl); - return m_impl->state; - } - -} // namespace luabind - diff --git a/luabind/src/wrapper_base.cpp b/luabind/src/wrapper_base.cpp deleted file mode 100644 index 9fb54a5db..000000000 --- a/luabind/src/wrapper_base.cpp +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2003 Daniel Wallin and Arvid Norberg - -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -// OR OTHER DEALINGS IN THE SOFTWARE. - -#define LUABIND_BUILDING - -#include -#include -#include -#include -#include -#include - -namespace luabind { namespace detail -{ - LUABIND_API void do_call_member_selection(lua_State* L, char const* name) - { - object_rep* obj = static_cast(lua_touserdata(L, -1)); - lua_pop(L, 1); // pop self - - obj->crep()->get_table(L); // push the crep table - lua_pushstring(L, name); - lua_gettable(L, -2); - lua_remove(L, -2); // remove the crep table - - if (!is_luabind_function(L, -1)) - return; - - // this (usually) means the function has not been - // overridden by lua, call the default implementation - lua_pop(L, 1); - obj->crep()->get_default_table(L); // push the crep table - lua_pushstring(L, name); - lua_gettable(L, -2); - lua_remove(L, -2); // remove the crep table - } -}} From 254764c1e616eff5025b8f0422d37b52d1672eb4 Mon Sep 17 00:00:00 2001 From: KimLS Date: Tue, 26 Jun 2018 23:00:20 -0700 Subject: [PATCH 215/670] Fix for failed build due to lb changes --- common/net/console_server_connection.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common/net/console_server_connection.cpp b/common/net/console_server_connection.cpp index 249817818..7cff94cbb 100644 --- a/common/net/console_server_connection.cpp +++ b/common/net/console_server_connection.cpp @@ -1,9 +1,9 @@ #include "console_server.h" -#include "../common/util/uuid.h" -#include "../common/net/packet.h" -#include "../common/eqemu_logsys.h" -#include "../common/servertalk.h" -#include "../common/rulesys.h" +#include "../util/uuid.h" +#include "../net/packet.h" +#include "../eqemu_logsys.h" +#include "../servertalk.h" +#include "../rulesys.h" EQ::Net::ConsoleServerConnection::ConsoleServerConnection(ConsoleServer *parent, std::shared_ptr connection) { From ee95a2a0c8df6ee3e9b6c734ca42d60ece997a34 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 27 Jun 2018 21:22:39 -0400 Subject: [PATCH 216/670] Remove uneeded DumpPacket in Handle_OP_ItemLinkClick --- zone/client_packet.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 5fe4291bd..e318fe274 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -8248,7 +8248,6 @@ void Client::Handle_OP_ItemLinkClick(const EQApplicationPacket *app) return; } - DumpPacket(app); ItemViewRequest_Struct *ivrs = (ItemViewRequest_Struct *)app->pBuffer; // todo: verify ivrs->link_hash based on a rule, in case we don't care about people being able to sniff data From 50eededd9fab7d9aa695353ac7044cb394bc7539 Mon Sep 17 00:00:00 2001 From: KimLS Date: Wed, 27 Jun 2018 19:54:33 -0700 Subject: [PATCH 217/670] Some build fixes and changes --- .gitignore | 1 + CMakeLists.txt | 54 ++++------------------------------ loginserver/database_mysql.cpp | 2 +- world/CMakeLists.txt | 2 +- zone/CMakeLists.txt | 2 +- 5 files changed, 9 insertions(+), 52 deletions(-) diff --git a/.gitignore b/.gitignore index 9741cae65..5698779e8 100644 --- a/.gitignore +++ b/.gitignore @@ -37,5 +37,6 @@ x64/ x86/ log/ logs/ +vcpkg/ .idea/* \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ec2593f9..cc3f497e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,9 +27,11 @@ #EQEMU_USE_MAP_MMFS #EQEMU_MAP_DIR -#We set a fairly new version (as of 2013) because I found finding perl was a bit... buggy on older ones -#Can change this if you really want but you should upgrade! -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +#Require 3.10.2 as that's the earliest version that vcpkg supports officially which we will use on the build server. +CMAKE_MINIMUM_REQUIRED(VERSION 3.10.2) + +SET(CMAKE_CXX_STANDARD 11) +SET(CMAKE_CXX_STANDARD_REQUIRED ON) #FindMySQL is located here so lets make it so CMake can find it SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/" ${CMAKE_MODULE_PATH}) @@ -53,35 +55,6 @@ IF(MSVC OR MINGW) ENDIF(MSVC OR MINGW) IF(MSVC) - #Set our default locations for zlib/mysql based on x86/x64 - IF(CMAKE_CL_64) - SET(ZLIB_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/zlib_x64") - SET(MYSQL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/mysql_x64") - SET(LUA_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/luaj_x64") - SET(OPENSSL_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/openssl_x64") - SET(SODIUM_INCLUDE_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/include") - IF(MSVC_VERSION GREATER 1800) - SET(SODIUM_LIBRARY_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/x64/Release/v140/dynamic") - ELSEIF(MSVC_VERSION EQUAL 1800) - SET(SODIUM_LIBRARY_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/x64/Release/v120/dynamic") - ELSE() - SET(SODIUM_LIBRARY_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/x64/Release/v110/dynamic") - ENDIF() - ELSE(CMAKE_CL_64) - SET(ZLIB_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/zlib_x86") - SET(MYSQL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/mysql_x86") - SET(LUA_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/luaj_x86") - SET(SODIUM_INCLUDE_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/include") - SET(OPENSSL_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/openssl_x86") - IF(MSVC_VERSION GREATER 1800) - SET(SODIUM_LIBRARY_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/Win32/Release/v140/dynamic") - ELSEIF(MSVC_VERSION EQUAL 1800) - SET(SODIUM_LIBRARY_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/Win32/Release/v120/dynamic") - ELSE() - SET(SODIUM_LIBRARY_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/Win32/Release/v110/dynamic") - ENDIF() - ENDIF(CMAKE_CL_64) - #disable CRT warnings on windows cause they're annoying as shit and we use C functions everywhere OPTION(EQEMU_DISABLE_CRT_SECURE_WARNINGS "Disable Secure CRT Warnings" ON) IF(EQEMU_DISABLE_CRT_SECURE_WARNINGS) @@ -100,23 +73,6 @@ IF(MSVC) ADD_DEFINITIONS(-DCRASH_LOGGING) ENDIF(EQEMU_ENABLE_CRASH_LOGGING) - #Disable safe SEH or not? - OPTION(EQEMU_DISABLE_SAFESEH "Disable Safe SEH (Needed for Strawberry Perl)" OFF) - IF(EQEMU_DISABLE_SAFESEH) - SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /SAFESEH:NO") - SET(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL} /SAFESEH:NO") - SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /SAFESEH:NO") - SET(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /SAFESEH:NO") - SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /SAFESEH:NO") - SET(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "${CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL} /SAFESEH:NO") - SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /SAFESEH:NO") - SET(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO} /SAFESEH:NO") - SET(CMAKE_MODULE_LINKER_FLAGS_DEBUG "${CMAKE_MODULE_LINKER_FLAGS_DEBUG} /SAFESEH:NO") - SET(CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL "${CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL} /SAFESEH:NO") - SET(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} /SAFESEH:NO") - SET(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO} /SAFESEH:NO") - ENDIF(EQEMU_DISABLE_SAFESEH) - OPTION(EQEMU_BUILD_MSVC_MP "Enable build with multiple processes." ON) IF(EQEMU_BUILD_MSVC_MP) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") diff --git a/loginserver/database_mysql.cpp b/loginserver/database_mysql.cpp index b40c77a0f..83c980086 100644 --- a/loginserver/database_mysql.cpp +++ b/loginserver/database_mysql.cpp @@ -36,7 +36,7 @@ DatabaseMySQL::DatabaseMySQL(std::string user, std::string pass, std::string hos database = mysql_init(nullptr); if (database) { - my_bool r = 1; + char r = 1; mysql_options(database, MYSQL_OPT_RECONNECT, &r); if (!mysql_real_connect(database, host.c_str(), user.c_str(), pass.c_str(), name.c_str(), atoi(port.c_str()), nullptr, 0)) { diff --git a/world/CMakeLists.txt b/world/CMakeLists.txt index 233c2e1c9..e8b999107 100644 --- a/world/CMakeLists.txt +++ b/world/CMakeLists.txt @@ -65,6 +65,6 @@ TARGET_LINK_LIBRARIES(world ${SERVER_LIBS}) IF(EQEMU_BUILD_PERL) TARGET_LINK_LIBRARIES(world ${PERL_LIBRARY}) -ENDIF(EQEMU_BUILD_PERL) +ENDIF() SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) diff --git a/zone/CMakeLists.txt b/zone/CMakeLists.txt index 24eb4a9db..b9aa7631e 100644 --- a/zone/CMakeLists.txt +++ b/zone/CMakeLists.txt @@ -257,7 +257,7 @@ TARGET_LINK_LIBRARIES(zone ${SERVER_LIBS}) IF(EQEMU_BUILD_PERL) TARGET_LINK_LIBRARIES(zone ${PERL_LIBRARY}) -ENDIF(EQEMU_BUILD_PERL) +ENDIF() IF(EQEMU_BUILD_LUA) TARGET_LINK_LIBRARIES(zone luabind ${LUA_LIBRARY}) From 97ee8e59a14bbb2144d074d93890b28fb84bc53e Mon Sep 17 00:00:00 2001 From: KimLS Date: Wed, 27 Jun 2018 22:50:08 -0700 Subject: [PATCH 218/670] Travis test --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9eda6fca6..a8cec8be1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ script: branches: only: - master - - stable + - build_improvements notifications: email: false irc: From 90c18c1dc97bc8ec827a2d489806b3e588ba7832 Mon Sep 17 00:00:00 2001 From: KimLS Date: Wed, 27 Jun 2018 23:05:12 -0700 Subject: [PATCH 219/670] Change travis --- .travis.yml | 45 ++++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/.travis.yml b/.travis.yml index a8cec8be1..faed5b846 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,32 +1,27 @@ language: cpp compiler: gcc -sudo: false -addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - gcc-4.8 - - g++-4.8 - - libmysqlclient-dev - - libperl-dev - - libboost-dev - - liblua5.1-0-dev - - zlib1g-dev - - uuid-dev - - libssl-dev +dist: trusty + +before_install: + - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test + - sudo apt-get update -qq + - mkdir $HOME/usr + - export PATH="$HOME/usr/bin:$PATH" + - wget https://cmake.org/files/v3.11/cmake-3.11.2-Linux-x86_64.sh + - chmod +x cmake-3.11.2-Linux-x86_64.sh + - ./cmake-3.11.2-Linux-x86_64.sh --prefix=$HOME/usr --exclude-subdir --skip-license + install: - - if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi + - sudo apt-get install -qq g++-7 + - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 90 + - sudo apt-get install libmysqlclient-dev + - sudo apt-get install libperl-dev + - sudo apt-get install libboost-dev + - sudo apt-get install liblua5.1-0-dev + - sudo apt-get install zlib1g-dev + - sudo apt-get install uuid-dev + - sudo apt-get install libssl-dev script: - cmake -G "Unix Makefiles" -DEQEMU_BUILD_TESTS=ON -DEQEMU_ENABLE_BOTS=ON -DEQEMU_BUILD_LOGIN=ON - make -j2 - ./bin/tests -branches: - only: - - master - - build_improvements -notifications: - email: false - irc: - channels: "irc.eqemulator.net#eqemucoders" -os: linux \ No newline at end of file From 58725b061e68706f8eb1f80505fe9f4cd5777c02 Mon Sep 17 00:00:00 2001 From: KimLS Date: Thu, 28 Jun 2018 13:17:11 -0700 Subject: [PATCH 220/670] Add appveyor yml [skip-ci] --- appveyor-bots.yml | 39 +++++++++++++++++++++++++++++++++++++++ appveyor-no-bots.yml | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 appveyor-bots.yml create mode 100644 appveyor-no-bots.yml diff --git a/appveyor-bots.yml b/appveyor-bots.yml new file mode 100644 index 000000000..f7cf48d75 --- /dev/null +++ b/appveyor-bots.yml @@ -0,0 +1,39 @@ +version: 1.0.{build} +branches: + only: + - master +image: Visual Studio 2017 +configuration: RelWithDebInfo +clone_folder: c:\projects\eqemu +init: +- ps: git config --global core.autocrlf input +before_build: +- ps: >- + $wc = New-Object System.Net.WebClient + + $wc.DownloadFile("https://github.com/EQEmu/eqemu.github.com/blob/master/downloads/appveyor/vcpkg-export.7z?raw=true", "c:\projects\eqemu\vcpkg-export.7z") + + $wc.DownloadFile("http://strawberryperl.com/download/5.26.2.1/strawberry-perl-5.26.2.1-64bit-portable.zip", "c:\projects\eqemu\strawberry-perl-5.26.2.1-64bit-portable.zip") + + cd c:\projects\eqemu + + 7z x c:/projects/eqemu/vcpkg-export.7z -oc:/projects/eqemu/vcpkg -y + + 7z x c:/projects/eqemu/strawberry-perl-5.26.2.1-64bit-portable.zip -oc:/projects/eqemu/strawberry-perl-portable -y + + (Get-Content C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE/config.h).replace('#define PERL_STATIC_INLINE static __inline__', '#define PERL_STATIC_INLINE static __inline') | Set-Content C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE/config.h + + mkdir build + + cd build + + cmake -G "Visual Studio 15 2017 Win64" -DEQEMU_BUILD_TESTS=ON -DEQEMU_BUILD_LOGIN=ON -EQEMU_ENABLE_BOTS=ON -DPERL_EXECUTABLE="C:/projects/eqemu/strawberry-perl-portable/perl/bin/perl.exe" -DPERL_INCLUDE_PATH="C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE" -DPERL_LIBRARY="C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE/libperl526.a" -DCMAKE_TOOLCHAIN_FILE="C:/projects/eqemu/vcpkg/vcpkg-export-20180627-133249/scripts/buildsystems/vcpkg.cmake" .. +build: + project: C:\projects\eqemu\build\EQEmu.sln + parallel: true + verbosity: minimal +after_build: +- cmd: >- + 7z a build_x64-bots.zip C:\projects\eqemu\build\bin\RelWithDebInfo\*.exe C:\projects\eqemu\build\bin\RelWithDebInfo\*.dll C:\projects\eqemu\build\bin\RelWithDebInfo\*.pdb + + appveyor PushArtifact build_x64-bots.zip \ No newline at end of file diff --git a/appveyor-no-bots.yml b/appveyor-no-bots.yml new file mode 100644 index 000000000..bb309a163 --- /dev/null +++ b/appveyor-no-bots.yml @@ -0,0 +1,39 @@ +version: 1.0.{build} +branches: + only: + - master +image: Visual Studio 2017 +configuration: RelWithDebInfo +clone_folder: c:\projects\eqemu +init: +- ps: git config --global core.autocrlf input +before_build: +- ps: >- + $wc = New-Object System.Net.WebClient + + $wc.DownloadFile("https://github.com/EQEmu/eqemu.github.com/blob/master/downloads/appveyor/vcpkg-export.7z?raw=true", "c:\projects\eqemu\vcpkg-export.7z") + + $wc.DownloadFile("http://strawberryperl.com/download/5.26.2.1/strawberry-perl-5.26.2.1-64bit-portable.zip", "c:\projects\eqemu\strawberry-perl-5.26.2.1-64bit-portable.zip") + + cd c:\projects\eqemu + + 7z x c:/projects/eqemu/vcpkg-export.7z -oc:/projects/eqemu/vcpkg -y + + 7z x c:/projects/eqemu/strawberry-perl-5.26.2.1-64bit-portable.zip -oc:/projects/eqemu/strawberry-perl-portable -y + + (Get-Content C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE/config.h).replace('#define PERL_STATIC_INLINE static __inline__', '#define PERL_STATIC_INLINE static __inline') | Set-Content C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE/config.h + + mkdir build + + cd build + + cmake -G "Visual Studio 15 2017 Win64" -DEQEMU_BUILD_TESTS=ON -DEQEMU_BUILD_LOGIN=ON -EQEMU_ENABLE_BOTS=OFF -DPERL_EXECUTABLE="C:/projects/eqemu/strawberry-perl-portable/perl/bin/perl.exe" -DPERL_INCLUDE_PATH="C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE" -DPERL_LIBRARY="C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE/libperl526.a" -DCMAKE_TOOLCHAIN_FILE="C:/projects/eqemu/vcpkg/vcpkg-export-20180627-133249/scripts/buildsystems/vcpkg.cmake" .. +build: + project: C:\projects\eqemu\build\EQEmu.sln + parallel: true + verbosity: minimal +after_build: +- cmd: >- + 7z a build_x64-no-bots.zip C:\projects\eqemu\build\bin\RelWithDebInfo\*.exe C:\projects\eqemu\build\bin\RelWithDebInfo\*.dll C:\projects\eqemu\build\bin\RelWithDebInfo\*.pdb + + appveyor PushArtifact build_x64-no-bots.zip \ No newline at end of file From 213a496efbaa8eb13b172c8a68ede20fe399207a Mon Sep 17 00:00:00 2001 From: KimLS Date: Thu, 28 Jun 2018 13:21:46 -0700 Subject: [PATCH 221/670] Add cmake prefix path [skip-ci] --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index cc3f497e2..04338f2a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,6 +44,8 @@ IF(NOT CMAKE_BUILD_TYPE) SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build." FORCE) ENDIF(NOT CMAKE_BUILD_TYPE) +SET(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/dependencies" "${CMAKE_PREFIX_PATH}") + #Add our various windows definitions IF(MSVC OR MINGW) ADD_DEFINITIONS(-D_WINDOWS) From a2e12667b4e072b203506ab90acc2390d5c39c36 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 28 Jun 2018 13:25:50 -0700 Subject: [PATCH 222/670] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 47b835788..e1126241c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # EQEmulator Core Server -|Travis CI (Linux)|Appveyor (Windows) | -|:---:|:---:| -|[![Linux CI](https://travis-ci.org/EQEmu/Server.svg?branch=master)](https://travis-ci.org/EQEmu/Server) |[![Windows CI](https://ci.appveyor.com/api/projects/status/d0cvokm7u732v8vl/branch/master?svg=true)](https://ci.appveyor.com/project/KimLS/server/branch/master) | +|Travis CI (Linux)|Appveyor w/ Bots (Windows) |Appveyor w/o Bots (Windows) | +|:---:|:---:|:---:| +|[![Linux CI](https://travis-ci.org/EQEmu/Server.svg?branch=master)](https://travis-ci.org/EQEmu/Server) |[![Build status](https://ci.appveyor.com/api/projects/status/scr25kmntx36c1ub/branch/master?svg=true)](https://ci.appveyor.com/project/KimLS/server-87crp/branch/master) |[![Build status](https://ci.appveyor.com/api/projects/status/mdwbr4o9l6mxqofj/branch/master?svg=true)](https://ci.appveyor.com/project/KimLS/server-w0pq2/branch/master) | *** From 70f55179b68b5c60efb4ca7237f16117686b5e8a Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 28 Jun 2018 22:16:25 -0400 Subject: [PATCH 223/670] Switch netcode to steady_clock --- common/net/daybreak_connection.cpp | 2 +- common/net/daybreak_connection.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/net/daybreak_connection.cpp b/common/net/daybreak_connection.cpp index d32f9f678..73bb51e82 100644 --- a/common/net/daybreak_connection.cpp +++ b/common/net/daybreak_connection.cpp @@ -747,7 +747,7 @@ void EQ::Net::DaybreakConnection::ProcessDecodedPacket(const Packet &p) response.zero = 0; response.opcode = OP_SessionStatResponse; response.timestamp = request.timestamp; - response.our_timestamp = EQ::Net::HostToNetwork(std::chrono::duration_cast(std::chrono::high_resolution_clock::now().time_since_epoch()).count()); + response.our_timestamp = EQ::Net::HostToNetwork(std::chrono::duration_cast(std::chrono::steady_clock::now().time_since_epoch()).count()); response.client_sent = request.packets_sent; response.client_recv = request.packets_recv; response.server_sent = EQ::Net::HostToNetwork(m_stats.sent_packets); diff --git a/common/net/daybreak_connection.h b/common/net/daybreak_connection.h index 016ef3258..05b420133 100644 --- a/common/net/daybreak_connection.h +++ b/common/net/daybreak_connection.h @@ -68,8 +68,8 @@ namespace EQ SequencePast }; - typedef std::chrono::high_resolution_clock::time_point Timestamp; - typedef std::chrono::high_resolution_clock Clock; + typedef std::chrono::steady_clock::time_point Timestamp; + typedef std::chrono::steady_clock Clock; struct DaybreakConnectionStats { @@ -282,4 +282,4 @@ namespace EQ friend class DaybreakConnection; }; } -} \ No newline at end of file +} From 842a40f76d601e166fbfda953c946fa286c773fb Mon Sep 17 00:00:00 2001 From: KimLS Date: Thu, 28 Jun 2018 21:03:32 -0700 Subject: [PATCH 224/670] lower cmake version --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 04338f2a5..02f047a87 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,8 +27,7 @@ #EQEMU_USE_MAP_MMFS #EQEMU_MAP_DIR -#Require 3.10.2 as that's the earliest version that vcpkg supports officially which we will use on the build server. -CMAKE_MINIMUM_REQUIRED(VERSION 3.10.2) +CMAKE_MINIMUM_REQUIRED(VERSION 3.0) SET(CMAKE_CXX_STANDARD 11) SET(CMAKE_CXX_STANDARD_REQUIRED ON) From e7cf687d2beffdf5c3536f49576f27bae8f162a3 Mon Sep 17 00:00:00 2001 From: KimLS Date: Fri, 29 Jun 2018 22:12:11 -0700 Subject: [PATCH 225/670] Don't set c++ vers --- CMakeLists.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 02f047a87..dcd687560 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,10 +27,7 @@ #EQEMU_USE_MAP_MMFS #EQEMU_MAP_DIR -CMAKE_MINIMUM_REQUIRED(VERSION 3.0) - -SET(CMAKE_CXX_STANDARD 11) -SET(CMAKE_CXX_STANDARD_REQUIRED ON) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) #FindMySQL is located here so lets make it so CMake can find it SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/" ${CMAKE_MODULE_PATH}) From 7dbf24b95d304dc892a8b17438edd4f5a92ead21 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 18:14:31 -0500 Subject: [PATCH 226/670] Cleanup perl_client.cpp Usage types --- zone/perl_client.cpp | 807 ++++++++++++++++++++----------------------- 1 file changed, 383 insertions(+), 424 deletions(-) diff --git a/zone/perl_client.cpp b/zone/perl_client.cpp index 622551ce0..2b7d51c42 100644 --- a/zone/perl_client.cpp +++ b/zone/perl_client.cpp @@ -69,7 +69,7 @@ XS(XS_Client_Save) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::Save(THIS, iCommitNow)"); + Perl_croak(aTHX_ "Usage: Client::Save(THIS, uint8 commit_now)"); { Client * THIS; bool RETVAL; @@ -338,7 +338,7 @@ XS(XS_Client_SetGM) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::SetGM(THIS, toggle)"); + Perl_croak(aTHX_ "Usage: Client::SetGM(THIS, bool toggle)"); { Client * THIS; bool toggle = (bool)SvTRUE(ST(1)); @@ -362,7 +362,7 @@ XS(XS_Client_SetPVP) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::SetPVP(THIS, toggle)"); + Perl_croak(aTHX_ "Usage: Client::SetPVP(THIS, bool toggle)"); { Client * THIS; bool toggle = (bool)SvTRUE(ST(1)); @@ -438,7 +438,7 @@ XS(XS_Client_SetBaseClass) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::SetBaseClass(THIS, i)"); + Perl_croak(aTHX_ "Usage: Client::SetBaseClass(THIS, uint32 class_id)"); { Client * THIS; uint32 i = (uint32)SvUV(ST(1)); @@ -462,7 +462,7 @@ XS(XS_Client_SetBaseRace) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::SetBaseRace(THIS, i)"); + Perl_croak(aTHX_ "Usage: Client::SetBaseRace(THIS, uint32 race_id)"); { Client * THIS; uint32 i = (uint32)SvUV(ST(1)); @@ -486,7 +486,7 @@ XS(XS_Client_SetBaseGender) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::SetBaseGender(THIS, i)"); + Perl_croak(aTHX_ "Usage: Client::SetBaseGender(THIS, uint32 gender_id)"); { Client * THIS; uint32 i = (uint32)SvUV(ST(1)); @@ -536,7 +536,7 @@ XS(XS_Client_GetLanguageSkill) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::GetLanguageSkill(THIS, n)"); + Perl_croak(aTHX_ "Usage: Client::GetLanguageSkill(THIS, uint16 lanuage_id)"); { Client * THIS; uint8 RETVAL; @@ -559,27 +559,27 @@ XS(XS_Client_GetLanguageSkill) } XS(XS_Client_GetLastName); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetLastName) -{ +XS(XS_Client_GetLastName) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetLastName(THIS)"); { - Client * THIS; - Const_char * RETVAL; + Client *THIS; + Const_char *RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetLastName(); - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; + sv_setpv(TARG, RETVAL); + XSprePUSH; + PUSHTARG; } XSRETURN(1); } @@ -589,7 +589,7 @@ XS(XS_Client_GetLDoNPointsTheme) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::GetLDoNPointsTheme(THIS, theme)"); + Perl_croak(aTHX_ "Usage: Client::GetLDoNPointsTheme(THIS, int32 theme)"); { Client * THIS; uint32 RETVAL; @@ -928,7 +928,7 @@ XS(XS_Client_UpdateLDoNPoints) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Client::UpdateLDoNPoints(THIS, points, theme)"); + Perl_croak(aTHX_ "Usage: Client::UpdateLDoNPoints(THIS, int32 points, uint32 theme)"); { Client * THIS; bool RETVAL; @@ -956,7 +956,7 @@ XS(XS_Client_SetDeity) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::SetDeity(THIS, i)"); + Perl_croak(aTHX_ "Usage: Client::SetDeity(THIS, uint32 deity_id)"); { Client * THIS; uint32 i = (uint32)SvUV(ST(1)); @@ -980,7 +980,7 @@ XS(XS_Client_AddEXP) { dXSARGS; if (items < 2 || items > 4) - Perl_croak(aTHX_ "Usage: Client::AddEXP(THIS, add_exp, conlevel= 0xFF, resexp= false)"); + Perl_croak(aTHX_ "Usage: Client::AddEXP(THIS, uint32 experience_points)"); { Client * THIS; uint32 add_exp = (uint32)SvUV(ST(1)); @@ -1018,7 +1018,7 @@ XS(XS_Client_SetEXP) { dXSARGS; if (items < 3 || items > 4) - Perl_croak(aTHX_ "Usage: Client::SetEXP(THIS, set_exp, set_aaxp, resexp=false)"); + Perl_croak(aTHX_ "Usage: Client::SetEXP(THIS, uint32 experience_points, uint32 aa_experience_points, [bool resexp=false])"); { Client * THIS; uint32 set_exp = (uint32)SvUV(ST(1)); @@ -1050,7 +1050,7 @@ XS(XS_Client_SetBindPoint) { dXSARGS; if (items < 1 || items > 6) - Perl_croak(aTHX_ "Usage: Client::SetBindPoint(THIS, to_zone= -1, to_instance = 0, new_x= 0.0f, new_y= 0.0f, new_z= 0.0f)"); + Perl_croak(aTHX_ "Usage: Client::SetBindPoint(THIS, int to_zone = -1, int to_instance = 0, float new_x = 0.0f, float new_y = 0.0f, float new_z = 0.0f)"); { Client * THIS; int to_zone; @@ -1108,7 +1108,7 @@ XS(XS_Client_GetBindX) { dXSARGS; if (items < 1 || items > 2) - Perl_croak(aTHX_ "Usage: Client::GetBindX(index)"); + Perl_croak(aTHX_ "Usage: Client::GetBindX(int index = 0)"); { Client * THIS; int index = 0; @@ -1141,7 +1141,7 @@ XS(XS_Client_GetBindY) { dXSARGS; if (items < 1 || items > 2) - Perl_croak(aTHX_ "Usage: Client::GetBindY(index)"); + Perl_croak(aTHX_ "Usage: Client::GetBindY(int index = 0)"); { Client * THIS; int index = 0; @@ -1174,7 +1174,7 @@ XS(XS_Client_GetBindZ) { dXSARGS; if (items < 1 || items > 2) - Perl_croak(aTHX_ "Usage: Client::GetBindZ(index)"); + Perl_croak(aTHX_ "Usage: Client::GetBindZ(int index = 0)"); { Client * THIS; int index = 0; @@ -1207,7 +1207,7 @@ XS(XS_Client_GetBindHeading) { dXSARGS; if (items < 1 || items > 2) - Perl_croak(aTHX_ "Usage: Client::GetBindHeading(index)"); + Perl_croak(aTHX_ "Usage: Client::GetBindHeading(int index = 0)"); { Client * THIS; int index = 0; @@ -1240,7 +1240,7 @@ XS(XS_Client_GetBindZoneID) { dXSARGS; if (items < 1 || items > 2) - Perl_croak(aTHX_ "Usage: Client::GetBindZoneID(index)"); + Perl_croak(aTHX_ "Usage: Client::GetBindZoneID(int index = 0)"); { Client * THIS; uint32 index = 0; @@ -1274,7 +1274,7 @@ XS(XS_Client_MovePC) { dXSARGS; if (items != 6) - Perl_croak(aTHX_ "Usage: Client::MovePC(THIS, zoneID, x, y, z, heading)"); + Perl_croak(aTHX_ "Usage: Client::MovePC(THIS, uint32 zone_id, float x, float y, float z, float heading)"); { Client * THIS; uint32 zoneID = (uint32)SvUV(ST(1)); @@ -1323,7 +1323,7 @@ XS(XS_Client_MovePCInstance) { dXSARGS; if (items != 7) - Perl_croak(aTHX_ "Usage: Client::MovePCInstance(THIS, zoneID, instanceID, x, y, z, heading)"); + Perl_croak(aTHX_ "Usage: Client::MovePCInstance(THIS, uint32 zone_id, uint32 instance_id, float x, float y, float z, float heading)"); { Client * THIS; uint32 zoneID = (uint32)SvUV(ST(1)); @@ -1374,7 +1374,7 @@ XS(XS_Client_ChangeLastName) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::ChangeLastName(THIS, in_lastname)"); + Perl_croak(aTHX_ "Usage: Client::ChangeLastName(THIS, string last_name)"); { Client * THIS; char* in_lastname = (char *)SvPV_nolen(ST(1)); @@ -1398,7 +1398,7 @@ XS(XS_Client_GetFactionLevel) { dXSARGS; if (items != 8) - Perl_croak(aTHX_ "Usage: Client::GetFactionLevel(THIS, char_id, npc_id, p_race, p_class, p_deity, pFaction, tnpc)"); + Perl_croak(aTHX_ "Usage: Client::GetFactionLevel(THIS, uint32 character_id, uint32 npc_id, uint32 player_race_id, uint32 player_class_id, uint32 player_deity_id, uint32 player_faction_id, Mob*)"); { Client * THIS; FACTION_VALUE RETVAL; @@ -1440,7 +1440,7 @@ XS(XS_Client_SetFactionLevel) { dXSARGS; if (items != 6) - Perl_croak(aTHX_ "Usage: Client::SetFactionLevel(THIS, char_id, npc_id, char_class, char_race, char_deity)"); + Perl_croak(aTHX_ "Usage: Client::SetFactionLevel(THIS, uint32 character_id, uint32 npc_id, uint8 character_class, uint8 character_race, uint8 character_deity)"); { Client * THIS; uint32 char_id = (uint32)SvUV(ST(1)); @@ -1468,30 +1468,29 @@ XS(XS_Client_SetFactionLevel2) { dXSARGS; if (items < 7 || items > 8) - Perl_croak(aTHX_ "Usage: Client::SetFactionLevel2(THIS, char_id, faction_id, char_class, char_race, char_deity, value, temp)"); + Perl_croak(aTHX_ "Usage: Client::SetFactionLevel2(THIS, uint32 character_id, int32 faction_id, uint8 character_class, uint8 character_race, uint8 character_deity, int32 value, uint8 temp)"); { - Client * THIS; - uint32 char_id = (uint32)SvUV(ST(1)); - int32 faction_id = (int32)SvIV(ST(2)); - uint8 char_class = (uint8)SvUV(ST(3)); - uint8 char_race = (uint8)SvUV(ST(4)); - uint8 char_deity = (uint8)SvUV(ST(5)); - int32 value = (int32)SvIV(ST(6)); - uint8 temp; + Client *THIS; + uint32 char_id = (uint32) SvUV(ST(1)); + int32 faction_id = (int32) SvIV(ST(2)); + uint8 char_class = (uint8) SvUV(ST(3)); + uint8 char_race = (uint8) SvUV(ST(4)); + uint8 char_deity = (uint8) SvUV(ST(5)); + int32 value = (int32) SvIV(ST(6)); + uint8 temp; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items == 7) temp = 0; else { - temp = (uint8)SvUV(ST(7)); + temp = (uint8) SvUV(ST(7)); } THIS->SetFactionLevel2(char_id, faction_id, char_class, char_race, char_deity, value, temp); @@ -1552,27 +1551,27 @@ XS(XS_Client_AccountID) } XS(XS_Client_AccountName); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_AccountName) -{ +XS(XS_Client_AccountName) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::AccountName(THIS)"); { - Client * THIS; - Const_char * RETVAL; + Client *THIS; + Const_char *RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->AccountName(); - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; + sv_setpv(TARG, RETVAL); + XSprePUSH; + PUSHTARG; } XSRETURN(1); } @@ -1634,7 +1633,7 @@ XS(XS_Client_UpdateAdmin) { dXSARGS; if (items < 1 || items > 2) - Perl_croak(aTHX_ "Usage: Client::UpdateAdmin(THIS, iFromDB= true)"); + Perl_croak(aTHX_ "Usage: Client::UpdateAdmin(THIS, bool from_db = true)"); { Client * THIS; bool iFromDB; @@ -1660,28 +1659,26 @@ XS(XS_Client_UpdateAdmin) } XS(XS_Client_UpdateWho); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_UpdateWho) -{ +XS(XS_Client_UpdateWho) { dXSARGS; if (items < 1 || items > 2) - Perl_croak(aTHX_ "Usage: Client::UpdateWho(THIS, remove= 0)"); + Perl_croak(aTHX_ "Usage: Client::UpdateWho(THIS, uint8 remove = 0)"); { - Client * THIS; - uint8 remove; + Client *THIS; + uint8 remove; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 2) remove = 0; else { - remove = (uint8)SvUV(ST(1)); + remove = (uint8) SvUV(ST(1)); } THIS->UpdateWho(remove); @@ -1772,7 +1769,7 @@ XS(XS_Client_TakeMoneyFromPP) { dXSARGS; if (items < 2 || items > 3) - Perl_croak(aTHX_ "Usage: Client::TakeMoneyFromPP(THIS, copper, updateclient=false)"); + Perl_croak(aTHX_ "Usage: Client::TakeMoneyFromPP(THIS, uint32 copper, bool update_client = false)"); { Client * THIS; bool RETVAL; @@ -1799,26 +1796,25 @@ XS(XS_Client_TakeMoneyFromPP) } XS(XS_Client_AddMoneyToPP); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_AddMoneyToPP) -{ +XS(XS_Client_AddMoneyToPP) { dXSARGS; if (items != 6) - Perl_croak(aTHX_ "Usage: Client::AddMoneyToPP(THIS, copper, silver, gold, platinum, updateclient)"); + Perl_croak(aTHX_ + "Usage: Client::AddMoneyToPP(THIS, uint32 copper, uint32 silver, uint32 gold, uint32 platinum, bool update_client)"); { - Client * THIS; - uint32 copper = (uint32)SvUV(ST(1)); - uint32 silver = (uint32)SvUV(ST(2)); - uint32 gold = (uint32)SvUV(ST(3)); - uint32 platinum = (uint32)SvUV(ST(4)); - bool updateclient = (bool)SvTRUE(ST(5)); + Client *THIS; + uint32 copper = (uint32) SvUV(ST(1)); + uint32 silver = (uint32) SvUV(ST(2)); + uint32 gold = (uint32) SvUV(ST(3)); + uint32 platinum = (uint32) SvUV(ST(4)); + bool updateclient = (bool) SvTRUE(ST(5)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->AddMoneyToPP(copper, silver, gold, platinum, updateclient); @@ -1907,7 +1903,7 @@ XS(XS_Client_IncreaseSkill) { dXSARGS; if (items < 2 || items > 3) - Perl_croak(aTHX_ "Usage: Client::IncreaseSkill(THIS, skill_id, value= 1)"); + Perl_croak(aTHX_ "Usage: Client::IncreaseSkill(THIS, int skill_id, int value = 1)"); { Client * THIS; int skill_id = (int)SvIV(ST(1)); @@ -1938,7 +1934,7 @@ XS(XS_Client_IncreaseLanguageSkill) { dXSARGS; if (items < 2 || items > 3) - Perl_croak(aTHX_ "Usage: Client::IncreaseLanguageSkill(THIS, skill_id, value= 1)"); + Perl_croak(aTHX_ "Usage: Client::IncreaseLanguageSkill(THIS, int skill_id, int value = 1)"); { Client * THIS; int skill_id = (int)SvIV(ST(1)); @@ -1969,7 +1965,7 @@ XS(XS_Client_GetSkill) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::GetSkill(THIS, skill_id)"); + Perl_croak(aTHX_ "Usage: Client::GetSkill(THIS, uint16 skill_id)"); { Client * THIS; uint16 RETVAL; @@ -1996,7 +1992,7 @@ XS(XS_Client_GetRawSkill) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::GetRawSkill(THIS, skill_id)"); + Perl_croak(aTHX_ "Usage: Client::GetRawSkill(THIS, int skill_id)"); { Client * THIS; uint32 RETVAL; @@ -2023,7 +2019,7 @@ XS(XS_Client_HasSkill) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::HasSkill(THIS, skill_id)"); + Perl_croak(aTHX_ "Usage: Client::HasSkill(THIS, int skill_id)"); { Client * THIS; bool RETVAL; @@ -2050,7 +2046,7 @@ XS(XS_Client_CanHaveSkill) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::CanHaveSkill(THIS, skill_id)"); + Perl_croak(aTHX_ "Usage: Client::CanHaveSkill(THIS, int skill_id)"); { Client * THIS; bool RETVAL; @@ -2077,7 +2073,7 @@ XS(XS_Client_SetSkill) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Client::SetSkill(THIS, skill_num, value)"); + Perl_croak(aTHX_ "Usage: Client::SetSkill(THIS, int skill_id, uint16 value)"); { Client * THIS; EQEmu::skills::SkillType skill_num = (EQEmu::skills::SkillType)SvUV(ST(1)); @@ -2098,23 +2094,21 @@ XS(XS_Client_SetSkill) } XS(XS_Client_AddSkill); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_AddSkill) -{ +XS(XS_Client_AddSkill) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Client::AddSkill(THIS, skillid, value)"); + Perl_croak(aTHX_ "Usage: Client::AddSkill(THIS, int skill_id, uint16 value)"); { - Client * THIS; - EQEmu::skills::SkillType skillid = (EQEmu::skills::SkillType)SvUV(ST(1)); - uint16 value = (uint16)SvUV(ST(2)); + Client *THIS; + EQEmu::skills::SkillType skillid = (EQEmu::skills::SkillType) SvUV(ST(1)); + uint16 value = (uint16) SvUV(ST(2)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->AddSkill(skillid, value); @@ -2127,7 +2121,7 @@ XS(XS_Client_CheckSpecializeIncrease) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::CheckSpecializeIncrease(THIS, spell_id)"); + Perl_croak(aTHX_ "Usage: Client::CheckSpecializeIncrease(THIS, uint16 spell_id)"); { Client * THIS; uint16 spell_id = (uint16)SvUV(ST(1)); @@ -2151,7 +2145,7 @@ XS(XS_Client_CheckIncreaseSkill) { dXSARGS; if (items < 2 || items > 3) - Perl_croak(aTHX_ "Usage: Client::CheckIncreaseSkill(THIS, skillid, chancemodi= 0)"); + Perl_croak(aTHX_ "Usage: Client::CheckIncreaseSkill(THIS, int skill_id, int chance_modifier = 0)"); { Client * THIS; bool RETVAL; @@ -2181,65 +2175,63 @@ XS(XS_Client_CheckIncreaseSkill) } XS(XS_Client_SetLanguageSkill); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetLanguageSkill) -{ +XS(XS_Client_SetLanguageSkill) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Client::SetLanguageSkill(THIS, langid, value)"); + Perl_croak(aTHX_ "Usage: Client::SetLanguageSkill(THIS, int language_id, int value)"); { - Client * THIS; - int langid = (int)SvIV(ST(1)); - int value = (int)SvIV(ST(2)); + Client *THIS; + int langid = (int) SvIV(ST(1)); + int value = (int) SvIV(ST(2)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetLanguageSkill(langid, value); } XSRETURN_EMPTY; + } XS(XS_Client_MaxSkill); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_MaxSkill) -{ +XS(XS_Client_MaxSkill) { dXSARGS; if (items < 2 || items > 4) - Perl_croak(aTHX_ "Usage: Client::MaxSkill(THIS, skillid, class, level)"); + Perl_croak(aTHX_ "Usage: Client::MaxSkill(THIS, uint16 skill_id, uint16 class_id, uint16 level)"); { - Client * THIS; - uint16 RETVAL; - EQEmu::skills::SkillType skillid = (EQEmu::skills::SkillType)SvUV(ST(1)); - uint16 class_ = 0; - uint16 level = 0; + Client *THIS; + uint16 RETVAL; + EQEmu::skills::SkillType skillid = (EQEmu::skills::SkillType) SvUV(ST(1)); + uint16 class_ = 0; + uint16 level = 0; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - if(items > 2) - class_ = (uint16)SvUV(ST(2)); + if (items > 2) + class_ = (uint16) SvUV(ST(2)); else class_ = THIS->GetClass(); - if(items > 3) - level = (uint16)SvUV(ST(3)); + if (items > 3) + level = (uint16) SvUV(ST(3)); else level = THIS->GetLevel(); RETVAL = THIS->MaxSkill(skillid, class_, level); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } @@ -2417,30 +2409,28 @@ XS(XS_Client_ResetAA) } XS(XS_Client_MemSpell); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_MemSpell) -{ +XS(XS_Client_MemSpell) { dXSARGS; if (items < 3 || items > 4) - Perl_croak(aTHX_ "Usage: Client::MemSpell(THIS, spell_id, slot, update_client= true)"); + Perl_croak(aTHX_ "Usage: Client::MemSpell(THIS, uint16 spell_id, int slot, [bool update_client = true])"); { - Client * THIS; - uint16 spell_id = (uint16)SvUV(ST(1)); - int slot = (int)SvIV(ST(2)); - bool update_client; + Client *THIS; + uint16 spell_id = (uint16) SvUV(ST(1)); + int slot = (int) SvIV(ST(2)); + bool update_client; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 4) update_client = true; else { - update_client = (bool)SvTRUE(ST(3)); + update_client = (bool) SvTRUE(ST(3)); } THIS->MemSpell(spell_id, slot, update_client); @@ -2449,29 +2439,27 @@ XS(XS_Client_MemSpell) } XS(XS_Client_UnmemSpell); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_UnmemSpell) -{ +XS(XS_Client_UnmemSpell) { dXSARGS; if (items < 2 || items > 3) - Perl_croak(aTHX_ "Usage: Client::UnmemSpell(THIS, slot, update_client= true)"); + Perl_croak(aTHX_ "Usage: Client::UnmemSpell(THIS, int slot, [bool update_client = true])"); { - Client * THIS; - int slot = (int)SvIV(ST(1)); - bool update_client; + Client *THIS; + int slot = (int) SvIV(ST(1)); + bool update_client; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 3) update_client = true; else { - update_client = (bool)SvTRUE(ST(2)); + update_client = (bool) SvTRUE(ST(2)); } THIS->UnmemSpell(slot, update_client); @@ -2480,22 +2468,20 @@ XS(XS_Client_UnmemSpell) } XS(XS_Client_UnmemSpellBySpellID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_UnmemSpellBySpellID) -{ +XS(XS_Client_UnmemSpellBySpellID) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::UnmemSpellBySpellID(THIS, spell_id)"); + Perl_croak(aTHX_ "Usage: Client::UnmemSpellBySpellID(THIS, int32 spell_id)"); { - Client * THIS; - int32 spell_id = (int32)SvIV(ST(1)); + Client *THIS; + int32 spell_id = (int32) SvIV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->UnmemSpellBySpellID(spell_id); @@ -2504,28 +2490,26 @@ XS(XS_Client_UnmemSpellBySpellID) } XS(XS_Client_UnmemSpellAll); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_UnmemSpellAll) -{ +XS(XS_Client_UnmemSpellAll) { dXSARGS; if (items < 1 || items > 2) - Perl_croak(aTHX_ "Usage: Client::UnmemSpellAll(THIS, update_client= true)"); + Perl_croak(aTHX_ "Usage: Client::UnmemSpellAll(THIS, [bool update_client = true])"); { - Client * THIS; - bool update_client; + Client *THIS; + bool update_client; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 2) update_client = true; else { - update_client = (bool)SvTRUE(ST(1)); + update_client = (bool) SvTRUE(ST(1)); } THIS->UnmemSpellAll(update_client); @@ -2534,30 +2518,28 @@ XS(XS_Client_UnmemSpellAll) } XS(XS_Client_ScribeSpell); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_ScribeSpell) -{ +XS(XS_Client_ScribeSpell) { dXSARGS; if (items < 3 || items > 4) - Perl_croak(aTHX_ "Usage: Client::ScribeSpell(THIS, spell_id, slot, update_client= true)"); + Perl_croak(aTHX_ "Usage: Client::ScribeSpell(THIS, uint16 spell_id, int slot, [bool update_client = true])"); { - Client * THIS; - uint16 spell_id = (uint16)SvUV(ST(1)); - int slot = (int)SvIV(ST(2)); - bool update_client; + Client *THIS; + uint16 spell_id = (uint16) SvUV(ST(1)); + int slot = (int) SvIV(ST(2)); + bool update_client; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 4) update_client = true; else { - update_client = (bool)SvTRUE(ST(3)); + update_client = (bool) SvTRUE(ST(3)); } THIS->ScribeSpell(spell_id, slot, update_client); @@ -2566,29 +2548,27 @@ XS(XS_Client_ScribeSpell) } XS(XS_Client_UnscribeSpell); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_UnscribeSpell) -{ +XS(XS_Client_UnscribeSpell) { dXSARGS; if (items < 2 || items > 3) - Perl_croak(aTHX_ "Usage: Client::UnscribeSpell(THIS, slot, update_client= true)"); + Perl_croak(aTHX_ "Usage: Client::UnscribeSpell(THIS, int slot, [bool update_client = true])"); { - Client * THIS; - int slot = (int)SvIV(ST(1)); - bool update_client; + Client *THIS; + int slot = (int) SvIV(ST(1)); + bool update_client; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 3) update_client = true; else { - update_client = (bool)SvTRUE(ST(2)); + update_client = (bool) SvTRUE(ST(2)); } THIS->UnscribeSpell(slot, update_client); @@ -2601,7 +2581,7 @@ XS(XS_Client_UnscribeSpellAll) { dXSARGS; if (items < 1 || items > 2) - Perl_croak(aTHX_ "Usage: Client::UnscribeSpellAll(THIS, update_client= true)"); + Perl_croak(aTHX_ "Usage: Client::UnscribeSpellAll(THIS, [bool update_client = true])"); { Client * THIS; bool update_client; @@ -2631,7 +2611,7 @@ XS(XS_Client_TrainDiscBySpellID) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::TrainDiscBySpellID(THIS, spell_id)"); + Perl_croak(aTHX_ "Usage: Client::TrainDiscBySpellID(THIS, int32 spell_id)"); { Client * THIS; int32 spell_id = (int32)SvIV(ST(1)); @@ -2655,7 +2635,7 @@ XS(XS_Client_GetDiscSlotBySpellID) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::GetDiscSlotBySpellID(THIS, spell_id)"); + Perl_croak(aTHX_ "Usage: Client::GetDiscSlotBySpellID(THIS, int32 spell_id)"); { Client * THIS; int RETVAL; @@ -2678,29 +2658,27 @@ XS(XS_Client_GetDiscSlotBySpellID) } XS(XS_Client_UntrainDisc); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_UntrainDisc) -{ +XS(XS_Client_UntrainDisc) { dXSARGS; if (items < 2 || items > 3) - Perl_croak(aTHX_ "Usage: Client::UntrainDisc(THIS, slot, update_client= true)"); + Perl_croak(aTHX_ "Usage: Client::UntrainDisc(THIS, int slot, [bool update_client = true])"); { - Client * THIS; - int slot = (int)SvIV(ST(1)); - bool update_client; + Client *THIS; + int slot = (int) SvIV(ST(1)); + bool update_client; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 3) update_client = true; else { - update_client = (bool)SvTRUE(ST(2)); + update_client = (bool) SvTRUE(ST(2)); } THIS->UntrainDisc(slot, update_client); @@ -2709,28 +2687,26 @@ XS(XS_Client_UntrainDisc) } XS(XS_Client_UntrainDiscAll); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_UntrainDiscAll) -{ +XS(XS_Client_UntrainDiscAll) { dXSARGS; if (items < 1 || items > 2) - Perl_croak(aTHX_ "Usage: Client::UntrainDiscAll(THIS, update_client= true)"); + Perl_croak(aTHX_ "Usage: Client::UntrainDiscAll(THIS, [update_client = true])"); { - Client * THIS; - bool update_client; + Client *THIS; + bool update_client; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 2) update_client = true; else { - update_client = (bool)SvTRUE(ST(1)); + update_client = (bool) SvTRUE(ST(1)); } THIS->UntrainDiscAll(update_client); @@ -2991,58 +2967,55 @@ XS(XS_Client_GetHorseId) } XS(XS_Client_NukeItem); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_NukeItem) -{ +XS(XS_Client_NukeItem) { dXSARGS; if (items != 3 && items != 2) - Perl_croak(aTHX_ "Usage: Client::NukeItem(THIS, itemnum, [where_to_check])"); + Perl_croak(aTHX_ "Usage: Client::NukeItem(THIS, uint32 item_id, [uint8 slot_to_check])"); { - Client * THIS; - uint32 RETVAL; + Client *THIS; + uint32 RETVAL; dXSTARG; - uint32 itemnum = (uint32)SvUV(ST(1)); - uint8 where_to_check; + uint32 itemnum = (uint32) SvUV(ST(1)); + uint8 where_to_check; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - if(items < 3){ + if (items < 3) { where_to_check = 0xFF; } - if(items == 3){ - where_to_check = (uint8)SvUV(ST(2)); + if (items == 3) { + where_to_check = (uint8) SvUV(ST(2)); } RETVAL = THIS->NukeItem(itemnum, where_to_check); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_SetTint); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetTint) -{ +XS(XS_Client_SetTint) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Client::SetTint(THIS, slot_id, color)"); + Perl_croak(aTHX_ "Usage: Client::SetTint(THIS, int16 slot_id, uint32 color)"); { - Client * THIS; - int16 slot_id = (int16)SvIV(ST(1)); - uint32 color = (uint32)SvUV(ST(2)); + Client *THIS; + int16 slot_id = (int16) SvIV(ST(1)); + uint32 color = (uint32) SvUV(ST(2)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetTint(slot_id, color); @@ -3051,23 +3024,21 @@ XS(XS_Client_SetTint) } XS(XS_Client_SetMaterial); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetMaterial) -{ +XS(XS_Client_SetMaterial) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Client::SetMaterial(THIS, slot_id, item_id)"); + Perl_croak(aTHX_ "Usage: Client::SetMaterial(THIS, int16 slot_id, uint32 item_id)"); { - Client * THIS; - int16 slot_id = (int16)SvIV(ST(1)); - uint32 item_id = (uint32)SvUV(ST(2)); + Client *THIS; + int16 slot_id = (int16) SvIV(ST(1)); + uint32 item_id = (uint32) SvUV(ST(2)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetMaterial(slot_id, item_id); @@ -3103,7 +3074,7 @@ XS(XS_Client_GetItemIDAt) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::GetItemIDAt(THIS, slot_id)"); + Perl_croak(aTHX_ "Usage: Client::GetItemIDAt(THIS, int16 slot_id)"); { Client * THIS; int32 RETVAL; @@ -3130,7 +3101,7 @@ XS(XS_Client_GetAugmentIDAt) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Client::GetAugmentIDAt(THIS, slot_id, augslot)"); + Perl_croak(aTHX_ "Usage: Client::GetAugmentIDAt(THIS, int16 slot_id, int16 aug_slot)"); { Client * THIS; int32 RETVAL; @@ -3154,36 +3125,35 @@ XS(XS_Client_GetAugmentIDAt) } XS(XS_Client_DeleteItemInInventory); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_DeleteItemInInventory) -{ +XS(XS_Client_DeleteItemInInventory) { dXSARGS; if (items < 2 || items > 4) - Perl_croak(aTHX_ "Usage: Client::DeleteItemInInventory(THIS, slot_id, quantity= 0, client_update= false)"); + Perl_croak(aTHX_ + "Usage: Client::DeleteItemInInventory(THIS, int16 slot_id, [int8 quantity = 0], [bool client_update = false])"); { - Client * THIS; - int16 slot_id = (int16)SvIV(ST(1)); - int8 quantity; - bool client_update; + Client *THIS; + int16 slot_id = (int16) SvIV(ST(1)); + int8 quantity; + bool client_update; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 3) quantity = 0; else { - quantity = (int8)SvIV(ST(2)); + quantity = (int8) SvIV(ST(2)); } if (items < 4) client_update = false; else { - client_update = (bool)SvTRUE(ST(3)); + client_update = (bool) SvTRUE(ST(3)); } THIS->DeleteItemInInventory(slot_id, quantity, client_update); @@ -3196,7 +3166,7 @@ XS(XS_Client_SummonItem) { dXSARGS; if (items < 2 || items > 10) - Perl_croak(aTHX_ "Usage: Client::SummonItem(THIS, item_id, charges=0, attune=0, aug1=0, aug2=0, aug3=0, aug4=0, aug5=0, slot_id=30)"); + Perl_croak(aTHX_ "Usage: Client::SummonItem(THIS, uint32 item_id, [int16 charges = -1], [bool attune = false], [uint32 aug1 = 0], [uint32 aug2 = 0], [uint32 aug3 = 0], [uint32 aug4 = 0], [uint32 aug5 = 0], [uint16 slot_id = 30])"); { Client * THIS; uint32 item_id = (uint32)SvUV(ST(1)); @@ -3253,7 +3223,7 @@ XS(XS_Client_SetStats) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Client::SetStats(THIS, type, increase_val)"); + Perl_croak(aTHX_ "Usage: Client::SetStats(THIS, uint8 type, uint16 increase_val)"); { Client * THIS; uint8 type = (uint8)SvUV(ST(1)); @@ -3278,7 +3248,7 @@ XS(XS_Client_IncStats) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Client::IncStats(THIS, type, increase_val)"); + Perl_croak(aTHX_ "Usage: Client::IncStats(THIS, uint8 type, uint16 increase_val)"); { Client * THIS; uint8 type = (uint8)SvUV(ST(1)); @@ -3303,7 +3273,7 @@ XS(XS_Client_DropItem) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::DropItem(THIS, slot_id)"); + Perl_croak(aTHX_ "Usage: Client::DropItem(THIS, int16 slot_id)"); { Client * THIS; int16 slot_id = (int16)SvIV(ST(1)); @@ -3529,7 +3499,7 @@ XS(XS_Client_GetInstrumentMod) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::GetInstrumentMod(THIS, spell_id)"); + Perl_croak(aTHX_ "Usage: Client::GetInstrumentMod(THIS, uint16 spell_id)"); { Client * THIS; uint16 RETVAL; @@ -3556,7 +3526,7 @@ XS(XS_Client_DecreaseByID) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Client::DecreaseByID(THIS, type, amt)"); + Perl_croak(aTHX_ "Usage: Client::DecreaseByID(THIS, uint32 type, unit8 amount)"); { Client * THIS; bool RETVAL; @@ -3584,7 +3554,7 @@ XS(XS_Client_SlotConvert2) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::SlotConvert2(THIS, slot)"); + Perl_croak(aTHX_ "Usage: Client::SlotConvert2(THIS, uint8 slot)"); { Client * THIS; uint8 RETVAL; @@ -3699,68 +3669,64 @@ XS(XS_Client_ForageItem) } XS(XS_Client_CalcPriceMod); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_CalcPriceMod) -{ +XS(XS_Client_CalcPriceMod) { dXSARGS; if (items < 1 || items > 3) - Perl_croak(aTHX_ "Usage: Client::CalcPriceMod(THIS, other= 0, reverse= false)"); + Perl_croak(aTHX_ "Usage: Client::CalcPriceMod(THIS, Mob*, [bool reverse = false])"); { - Client * THIS; - float RETVAL; + Client *THIS; + float RETVAL; dXSTARG; - Mob* other; - bool reverse; + Mob *other; + bool reverse; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 2) other = 0; else { if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - other = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + other = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "other is not of type Mob"); - if(other == nullptr) + if (other == nullptr) Perl_croak(aTHX_ "other is nullptr, avoiding crash."); } if (items < 3) reverse = false; else { - reverse = (bool)SvTRUE(ST(2)); + reverse = (bool) SvTRUE(ST(2)); } RETVAL = THIS->CalcPriceMod(other, reverse); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Client_ResetTrade); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_ResetTrade) -{ +XS(XS_Client_ResetTrade) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::ResetTrade(THIS)"); { - Client * THIS; + Client *THIS; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->ResetTrade(); @@ -3769,77 +3735,72 @@ XS(XS_Client_ResetTrade) } XS(XS_Client_UseDiscipline); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_UseDiscipline) -{ +XS(XS_Client_UseDiscipline) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Client::UseDiscipline(THIS, spell_id, target)"); + Perl_croak(aTHX_ "Usage: Client::UseDiscipline(THIS, int32 spell_id, int32 target)"); { - Client * THIS; - bool RETVAL; - uint32 spell_id = (uint32)SvUV(ST(1)); - uint32 target = (uint32)SvUV(ST(2)); + Client *THIS; + bool RETVAL; + uint32 spell_id = (uint32) SvUV(ST(1)); + uint32 target = (uint32) SvUV(ST(2)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->UseDiscipline(spell_id, target); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Client_GetCharacterFactionLevel); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetCharacterFactionLevel) -{ +XS(XS_Client_GetCharacterFactionLevel) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::GetCharacterFactionLevel(THIS, faction_id)"); + Perl_croak(aTHX_ "Usage: Client::GetCharacterFactionLevel(THIS, int32 faction_id)"); { - Client * THIS; - int32 RETVAL; + Client *THIS; + int32 RETVAL; dXSTARG; - int32 faction_id = (int32)SvIV(ST(1)); + int32 faction_id = (int32) SvIV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetCharacterFactionLevel(faction_id); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Client_SetZoneFlag); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetZoneFlag) -{ +XS(XS_Client_SetZoneFlag) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::SetZoneFlag(THIS, zone_id)"); + Perl_croak(aTHX_ "Usage: Client::SetZoneFlag(THIS, uint32 zone_id)"); { - Client * THIS; - uint32 zone_id = (uint32)SvUV(ST(1)); + Client *THIS; + uint32 zone_id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetZoneFlag(zone_id); @@ -3848,22 +3809,20 @@ XS(XS_Client_SetZoneFlag) } XS(XS_Client_ClearZoneFlag); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_ClearZoneFlag) -{ +XS(XS_Client_ClearZoneFlag) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::ClearZoneFlag(THIS, zone_id)"); + Perl_croak(aTHX_ "Usage: Client::ClearZoneFlag(THIS, uint32 zone_id)"); { - Client * THIS; - uint32 zone_id = (uint32)SvUV(ST(1)); + Client *THIS; + uint32 zone_id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->ClearZoneFlag(zone_id); @@ -3876,7 +3835,7 @@ XS(XS_Client_HasZoneFlag) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::HasZoneFlag(THIS, zone_id)"); + Perl_croak(aTHX_ "Usage: Client::HasZoneFlag(THIS, uint32 zone_id)"); { Client * THIS; bool RETVAL; @@ -3903,7 +3862,7 @@ XS(XS_Client_SendZoneFlagInfo) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::SendZoneFlagInfo(THIS, to)"); + Perl_croak(aTHX_ "Usage: Client::SendZoneFlagInfo(THIS, Client* to)"); { Client * THIS; Client * to; @@ -3959,7 +3918,7 @@ XS(XS_Client_SetAATitle) { dXSARGS; if ((items < 2) || (items > 3)) - Perl_croak(aTHX_ "Usage: Client::SetAATitle(THIS, txt, [save])"); + Perl_croak(aTHX_ "Usage: Client::SetAATitle(THIS, string text, [bool save = false])"); { Client * THIS; char * txt = (char *)SvPV_nolen(ST(1)); @@ -4044,7 +4003,7 @@ XS(XS_Client_SetTitleSuffix); XS(XS_Client_SetTitleSuffix) { dXSARGS; if ((items < 2) || (items > 3)) - Perl_croak(aTHX_ "Usage: Client::SetTitleSuffix(THIS, txt, [save])"); + Perl_croak(aTHX_ "Usage: Client::SetTitleSuffix(THIS, string text, [bool save = false])"); { Client * THIS; char * txt = (char *)SvPV_nolen(ST(1)); @@ -4077,7 +4036,7 @@ XS(XS_Client_SetAAPoints); XS(XS_Client_SetAAPoints) { dXSARGS; if(items != 2) - Perl_croak(aTHX_ "Usage: Client::SetAAPoints(THIS, points)"); + Perl_croak(aTHX_ "Usage: Client::SetAAPoints(THIS, uint32 points)"); { Client * THIS; uint32 points = SvUV(ST(1)); @@ -4150,7 +4109,7 @@ XS(XS_Client_AddAAPoints); XS(XS_Client_AddAAPoints) { dXSARGS; if(items != 2) - Perl_croak(aTHX_ "Usage: Client::AddAAPoints(THIS, number)"); + Perl_croak(aTHX_ "Usage: Client::AddAAPoints(THIS, uint32 points)"); { Client * THIS; uint32 points = SvUV(ST(1)); @@ -4196,7 +4155,7 @@ XS(XS_Client_GetModCharacterFactionLevel) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::GetModCharacterFactionLevel(THIS, faction_id)"); + Perl_croak(aTHX_ "Usage: Client::GetModCharacterFactionLevel(THIS, int32 faction_id)"); { Client * THIS; int32 RETVAL; @@ -4275,7 +4234,7 @@ XS(XS_Client_GetLDoNWinsTheme) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::GetLDoNWinsTheme(THIS, theme)"); + Perl_croak(aTHX_ "Usage: Client::GetLDoNWinsTheme(THIS, int32 theme)"); { Client * THIS; uint32 RETVAL; @@ -4302,7 +4261,7 @@ XS(XS_Client_GetLDoNLossesTheme) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::GetLDoNLossesTheme(THIS, theme)"); + Perl_croak(aTHX_ "Usage: Client::GetLDoNLossesTheme(THIS, int32 theme)"); { Client * THIS; uint32 RETVAL; @@ -4329,7 +4288,7 @@ XS(XS_Client_GetItemAt) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::GetItemAt(THIS, slot)"); + Perl_croak(aTHX_ "Usage: Client::GetItemAt(THIS, uint32 slot)"); { Client * THIS; EQEmu::ItemInstance * RETVAL; @@ -4356,7 +4315,7 @@ XS(XS_Client_GetAugmentAt) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Client::GetAugmentAt(THIS, slot, aug_slot)"); + Perl_croak(aTHX_ "Usage: Client::GetAugmentAt(THIS, uint32 slot, uint32 aug_slot)"); { Client * THIS; EQEmu::ItemInstance * RETVAL; @@ -4419,7 +4378,7 @@ XS(XS_Client_SetStartZone) { dXSARGS; if (items != 2 && items != 5) - Perl_croak(aTHX_ "Usage: Client::SetStartZone(THIS, zoneid [, x, y, z])"); + Perl_croak(aTHX_ "Usage: Client::SetStartZone(THIS, uint32 zone_id, [float x = 0], [float y = 0], [float z = 0])"); { Client * THIS; uint32 zoneid = (uint32)SvUV(ST(1)); @@ -4452,7 +4411,7 @@ XS(XS_Client_KeyRingAdd) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::KeyRingAdd(THIS, item_id)"); + Perl_croak(aTHX_ "Usage: Client::KeyRingAdd(THIS, uint32 item_id)"); { Client * THIS; uint32 item_id = (uint32)SvUV(ST(1)); @@ -4476,7 +4435,7 @@ XS(XS_Client_KeyRingCheck) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::KeyRingCheck(THIS, item_id)"); + Perl_croak(aTHX_ "Usage: Client::KeyRingCheck(THIS, uint32 item_id)"); { Client * THIS; bool RETVAL; @@ -4503,7 +4462,7 @@ XS(XS_Client_AddPVPPoints) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::AddPVPPoints(THIS, Points)"); + Perl_croak(aTHX_ "Usage: Client::AddPVPPoints(THIS, uint32 points)"); { Client * THIS; uint32 Points = (uint32)SvUV(ST(1)); @@ -4527,7 +4486,7 @@ XS(XS_Client_AddCrystals) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Client::AddCrystals(THIS, RadiantCount, EbonCount)"); + Perl_croak(aTHX_ "Usage: Client::AddCrystals(THIS, uint32 radiant_count, uint32 ebon_count)"); { Client * THIS; uint32 Radiant = (uint32)SvUV(ST(1)); @@ -4630,7 +4589,7 @@ XS(XS_Client_ReadBook) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Client::ReadBook(THIS, Book Text, Type)"); + Perl_croak(aTHX_ "Usage: Client::ReadBook(THIS, char* book_test, uint8 type)"); { Client * THIS; char* in_txt = (char *)SvPV_nolen(ST(1)); @@ -4655,7 +4614,7 @@ XS(XS_Client_UpdateGroupAAs) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Client::UpdateGroupAAs(THIS, points, type)"); + Perl_croak(aTHX_ "Usage: Client::UpdateGroupAAs(THIS, int32 points, uint32 type)"); { Client * THIS; int32 points = (int32)SvIV(ST(1)); @@ -4732,7 +4691,7 @@ XS(XS_Client_LearnRecipe) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::LearnRecipe(THIS, recipe_id)"); + Perl_croak(aTHX_ "Usage: Client::LearnRecipe(THIS, uint32 recipe_id)"); { Client * THIS; uint32 recipe_id = (uint32)SvUV(ST(1)); @@ -4858,7 +4817,7 @@ XS(XS_Client_SendOPTranslocateConfirm) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Client::SendOPTranslocateConfirm(THIS, Caster, SpellID)"); + Perl_croak(aTHX_ "Usage: Client::SendOPTranslocateConfirm(THIS, Mob* caster, int32 spell_id)"); { Client * THIS; Mob * caster = nullptr; @@ -4892,7 +4851,7 @@ XS(XS_Client_NPCSpawn) { dXSARGS; if (items < 3 || items > 4) - Perl_croak(aTHX_ "Usage: Client::NPCSpawn(THIS, target_npc, option, respawntime=1200)"); + Perl_croak(aTHX_ "Usage: Client::NPCSpawn(THIS, NPC*, string option, uint32 respawn_time=1200)"); { Client * THIS; NPC * target_npc = nullptr; @@ -4956,7 +4915,7 @@ XS(XS_Client_AddLevelBasedExp) { dXSARGS; if (items < 2 || items > 3 ) - Perl_croak(aTHX_ "Usage: Client::AddLevelBasedExp(THIS, exp_percentage, max_level=0)"); + Perl_croak(aTHX_ "Usage: Client::AddLevelBasedExp(THIS, uint8 exp_percentage, uint8 max_level = 0)"); { Client * THIS; uint8 exp_percentage = (uint8)SvUV(ST(1)); @@ -4984,7 +4943,7 @@ XS(XS_Client_IncrementAA) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::IncrementAA(THIS, aaskillid)"); + Perl_croak(aTHX_ "Usage: Client::IncrementAA(THIS, uint32 aa_skill_id)"); { Client * THIS; uint32 aaskillid = SvUV(ST(1)); @@ -5008,7 +4967,7 @@ XS(XS_Client_GrantAlternateAdvancementAbility) { dXSARGS; if(items < 3 || items > 4) - Perl_croak(aTHX_ "Usage: Client::GrantAlternateAdvancementAbility(THIS, aa_id, points, [ignore_cost])"); + Perl_croak(aTHX_ "Usage: Client::GrantAlternateAdvancementAbility(THIS, int aa_id, int points, [bool ignore_cost = false])"); { Client * THIS; bool RETVAL; @@ -5041,7 +5000,7 @@ XS(XS_Client_GetAALevel) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::GetAALevel(THIS, aaskillid)"); + Perl_croak(aTHX_ "Usage: Client::GetAALevel(THIS, uint32 aa_skill_id)"); { Client * THIS; uint32 RETVAL; @@ -5068,7 +5027,7 @@ XS(XS_Client_MarkCompassLoc) { dXSARGS; if (items != 4) - Perl_croak(aTHX_ "Usage: Client::MarkCompassLoc(THIS, x, y, z)"); + Perl_croak(aTHX_ "Usage: Client::MarkCompassLoc(THIS, float x, float y, float z)"); { Client * THIS; float x = SvNV(ST(1)); @@ -5117,7 +5076,7 @@ XS(XS_Client_GetFreeSpellBookSlot) { dXSARGS; if (items < 1 || items > 2) - Perl_croak(aTHX_ "Usage: Client::GetFreeSpellBookSlot(THIS, start_slot=0)"); + Perl_croak(aTHX_ "Usage: Client::GetFreeSpellBookSlot(THIS, uint32 start_slot = 0)"); { Client * THIS; int RETVAL; @@ -5147,7 +5106,7 @@ XS(XS_Client_GetSpellBookSlotBySpellID) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::GetSpellBookSlotBySpellID(THIS, spell_id)"); + Perl_croak(aTHX_ "Usage: Client::GetSpellBookSlotBySpellID(THIS, uint32 spell_id)"); { Client * THIS; int RETVAL; @@ -5174,7 +5133,7 @@ XS(XS_Client_UpdateTaskActivity) { dXSARGS; if (items < 4) - Perl_croak(aTHX_ "Usage: Client::UpdateTaskActivity(THIS, TaskID, ActivityID, Count, [ignore_quest_update])"); + Perl_croak(aTHX_ "Usage: Client::UpdateTaskActivity(THIS, int task_id, int activity_id, int count, [bool ignore_quest_update = false])"); { bool ignore_quest_update = false; @@ -5207,7 +5166,7 @@ XS(XS_Client_GetTaskActivityDoneCount) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Client::GetTaskActivityDoneCount(THIS, TaskID, ActivityID)"); + Perl_croak(aTHX_ "Usage: Client::GetTaskActivityDoneCount(THIS, int task_id, int activity_id)"); { Client * THIS; int RETVAL; @@ -5236,7 +5195,7 @@ XS(XS_Client_AssignTask) { dXSARGS; if (items != 3 && items != 4) - Perl_croak(aTHX_ "Usage: Client::AssignTask(THIS, TaskID, NPCID, enforce_level_requirement)"); + Perl_croak(aTHX_ "Usage: Client::AssignTask(THIS, int task_id, int npc_id, [bool enforce_level_requirement = false])"); { Client * THIS; int TaskID = (int)SvIV(ST(1)); @@ -5268,7 +5227,7 @@ XS(XS_Client_FailTask) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::FailTask(THIS, TaskID)"); + Perl_croak(aTHX_ "Usage: Client::FailTask(THIS, int task_id)"); { Client * THIS; int TaskID = (int)SvIV(ST(1)); @@ -5292,7 +5251,7 @@ XS(XS_Client_IsTaskCompleted) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::IsTaskCompleted(THIS, TaskID)"); + Perl_croak(aTHX_ "Usage: Client::IsTaskCompleted(THIS, int task_id)"); { Client * THIS; int RETVAL; @@ -5319,7 +5278,7 @@ XS(XS_Client_IsTaskActive) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::IsTaskActive(THIS, TaskID)"); + Perl_croak(aTHX_ "Usage: Client::IsTaskActive(THIS, int task_id)"); { Client * THIS; bool RETVAL; @@ -5346,7 +5305,7 @@ XS(XS_Client_IsTaskActivityActive) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Client::IsTaskActivityActive(THIS, TaskID, ActivityID)"); + Perl_croak(aTHX_ "Usage: Client::IsTaskActivityActive(THIS, int task_id, int activity_id)"); { Client * THIS; bool RETVAL; @@ -5400,7 +5359,7 @@ XS(XS_Client_GetCorpseID) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::GetCorpseID(THIS, corpse)"); + Perl_croak(aTHX_ "Usage: Client::GetCorpseID(THIS, uint8 corpse)"); { Client * THIS; uint8 corpse = (uint8)SvIV(ST(1)); @@ -5427,7 +5386,7 @@ XS(XS_Client_GetCorpseItemAt) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Client::GetCorpseItemAt(THIS, corpse_id, slotid)"); + Perl_croak(aTHX_ "Usage: Client::GetCorpseItemAt(THIS, uint32 corpse_id, uint16 slot_id)"); { Client * THIS; uint32 corpse_id = (uint32)SvIV(ST(1)); @@ -5455,7 +5414,7 @@ XS(XS_Client_AssignToInstance) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::AssignToInstance(THIS, instance_id)"); + Perl_croak(aTHX_ "Usage: Client::AssignToInstance(THIS, uint16 instance_id)"); { Client * THIS; uint16 instance_id = (uint16)SvUV(ST(1)); @@ -5479,7 +5438,7 @@ XS(XS_Client_RemoveFromInstance) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::RemoveFromInstance(THIS, instance_id)"); + Perl_croak(aTHX_ "Usage: Client::RemoveFromInstance(THIS, uint16 instance_id)"); { Client * THIS; uint16 instance_id = (uint16)SvUV(ST(1)); @@ -5631,7 +5590,7 @@ XS(XS_Client_GetItemInInventory) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::GetItemInInventory(THIS, slot_id)"); + Perl_croak(aTHX_ "Usage: Client::GetItemInInventory(THIS, int16 slot_id)"); { Client * THIS; int16 slot_id = (int16)SvIV(ST(1)); @@ -5658,7 +5617,7 @@ XS(XS_Client_SetCustomItemData) { dXSARGS; if (items != 4) - Perl_croak(aTHX_ "Usage: Client::SetCustomItemData(THIS, slot_id, identifier, value)"); + Perl_croak(aTHX_ "Usage: Client::SetCustomItemData(THIS, int16 slot_id, string identifier, string value)"); { Client * THIS; int16 slot_id = (int16)SvIV(ST(1)); @@ -5684,7 +5643,7 @@ XS(XS_Client_GetCustomItemData) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Client::GetCustomItemData(THIS, slot_id, identifier)"); + Perl_croak(aTHX_ "Usage: Client::GetCustomItemData(THIS, int16 slot_id, string identifier)"); { Client * THIS; int16 slot_id = (int16)SvIV(ST(1)); @@ -5736,7 +5695,7 @@ XS(XS_Client_SignalClient) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::SignalClient(THIS, data)"); + Perl_croak(aTHX_ "Usage: Client::SignalClient(THIS, uint32 data)"); { Client * THIS; uint32 data = (uint32)SvUV(ST(1)); @@ -5785,7 +5744,7 @@ XS(XS_Client_SendWebLink) { dXSARGS; if (items < 1 || items > 2) - Perl_croak(aTHX_ "Usage: Client::SendWebLink(THIS, website)"); + Perl_croak(aTHX_ "Usage: Client::SendWebLink(THIS, string website_url)"); { Client * THIS; char * website = nullptr; @@ -5837,7 +5796,7 @@ XS(XS_Client_HasSpellScribed) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::HasSpellScribed(THIS, spell_id)"); + Perl_croak(aTHX_ "Usage: Client::HasSpellScribed(THIS, int spell_id)"); { Client * THIS; bool RETVAL; @@ -5864,7 +5823,7 @@ XS(XS_Client_SetAccountFlag) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Client::SetAccountFlag(THIS, flag, value)"); + Perl_croak(aTHX_ "Usage: Client::SetAccountFlag(THIS, string flag, string value)"); { Client * THIS; //char* flag = (char *)SvPV_nolen(ST(1)); @@ -5892,7 +5851,7 @@ XS(XS_Client_GetAccountFlag) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::GetAccountFlag(THIS, flag)"); + Perl_croak(aTHX_ "Usage: Client::GetAccountFlag(THIS, string flag)"); { Client * THIS; //char* flag = (char *)SvPV_nolen(ST(1)); @@ -5998,7 +5957,7 @@ XS(XS_Client_SetThirst) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::SetThirst(THIS, in_thirst)"); + Perl_croak(aTHX_ "Usage: Client::SetThirst(THIS, int32 in_thirst)"); { Client * THIS; int32 in_thirst = (uint32)SvUV(ST(1)); @@ -6022,7 +5981,7 @@ XS(XS_Client_SendTargetCommand) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::SendTargetCommand(THIS, in_entid)"); + Perl_croak(aTHX_ "Usage: Client::SendTargetCommand(THIS, int32 entity_id)"); { Client * THIS; int32 in_entid = (uint32)SvUV(ST(1)); @@ -6046,7 +6005,7 @@ XS(XS_Client_SetConsumption) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Client::SetHunger(THIS, in_hunger, in_thirst)"); + Perl_croak(aTHX_ "Usage: Client::SetHunger(THIS, int32 hunger_amount, int32 thirst_amount)"); { Client * THIS; int32 in_hunger = (uint32)SvUV(ST(1)); @@ -6071,7 +6030,7 @@ XS(XS_Client_SilentMessage) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Client::SilentMessage(THIS, Message)"); + Perl_croak(aTHX_ "Usage: Client::SilentMessage(THIS, string message)"); { Client * THIS; dXSTARG; @@ -6102,7 +6061,7 @@ XS(XS_Client_PlayMP3) { dXSARGS; if (items < 1 || items > 2) - Perl_croak(aTHX_ "Usage: Client::PlayMP3(THIS, fname)"); + Perl_croak(aTHX_ "Usage: Client::PlayMP3(THIS, string file_name)"); { Client * THIS; char * fname = nullptr; @@ -6128,7 +6087,7 @@ XS(XS_Client_ExpeditionMessage) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Client::ExpeditionMessage(THIS, ExpdID, Message)"); + Perl_croak(aTHX_ "Usage: Client::ExpeditionMessage(THIS, int expedition_id, string message)"); { Client * THIS; int ExpdID = (int)SvUV(ST(1)); @@ -6156,7 +6115,7 @@ XS(XS_Client_SendMarqueeMessage) { dXSARGS; if (items != 7) - Perl_croak(aTHX_ "Usage: Client::SendMarqueeMessage(THIS, type, priority, fade_in, fade_out, duration, msg)"); + Perl_croak(aTHX_ "Usage: Client::SendMarqueeMessage(THIS, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, string msg)"); { Client * THIS; uint32 type = (uint32)SvUV(ST(1)); @@ -6186,7 +6145,7 @@ XS(XS_Client_SendColoredText) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Client::SendColoredText(color, message)"); + Perl_croak(aTHX_ "Usage: Client::SendColoredText(uint32 color, string message)"); { Client * THIS; uint32 color = (uint32)SvUV(ST(1)); @@ -6212,7 +6171,7 @@ XS(XS_Client_SendSpellAnim) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: SendSpellAnim(uint16 spell_id, uint32 seq)"); + Perl_croak(aTHX_ "Usage: SendSpellAnim(uint16 target_id, uint32 spell_animation_id)"); { Client * THIS; uint16 targetid = (uint16)SvUV(ST(1)); @@ -6228,7 +6187,7 @@ XS(XS_Client_SendSpellAnim) if(THIS == NULL) Perl_croak(aTHX_ "THIS is NULL, avoiding crash."); - THIS->SendSpellAnim(targetid,spell_id); + THIS->SendSpellAnim(targetid, spell_id); } XSRETURN_EMPTY; } @@ -6345,7 +6304,7 @@ XS(XS_Client_QuestReward) { dXSARGS; if (items < 1 || items > 9) - Perl_croak(aTHX_ "Usage: Client::QuestReward(THIS, mob, copper, silver, gold, platinum, itemid, exp, faction)"); + Perl_croak(aTHX_ "Usage: Client::QuestReward(THIS, int32 mob, int32 copper, int32 silver, int32 gold, int32 platinum, int32 item_id, int32 exp, [bool faction = false])"); { Client* THIS; Mob * mob = nullptr; @@ -6394,7 +6353,7 @@ XS(XS_Client_GetMoney) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: GetMoney(THIS, type, subtype)"); + Perl_croak(aTHX_ "Usage: GetMoney(THIS, int8 type, int8 subtype)"); { Client* THIS; uint32 RETVAL; @@ -6449,7 +6408,7 @@ XS(XS_Client_Popup2) { dXSARGS; if (items < 3 || items > 10) - Perl_croak(aTHX_ "Usage: Client::SendFullPopup(THIS, Title, Text, PopupID, NegativeID, Buttons, Duration, ButtonName0, ButtonName1, SoundControls)"); + Perl_croak(aTHX_ "Usage: Client::SendFullPopup(THIS, string title, string text, uint32 popup_id, uint32 negative_id, uint32 buttons, uint32 duration, string button_name_0, string button_name_1, uint32 sound_controls)"); { Client * THIS; char* Title = (char *)SvPV_nolen(ST(1)); From 4d87216ec633deedb1f3b8849e8bee997f791339 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 18:16:04 -0500 Subject: [PATCH 227/670] Format perl_client.cpp --- zone/perl_client.cpp | 4896 ++++++++++++++++++++---------------------- 1 file changed, 2289 insertions(+), 2607 deletions(-) diff --git a/zone/perl_client.cpp b/zone/perl_client.cpp index 2b7d51c42..47d5dd89a 100644 --- a/zone/perl_client.cpp +++ b/zone/perl_client.cpp @@ -26,7 +26,9 @@ */ #include "../common/features.h" + #ifdef EMBPERL_XS_CLASSES + #include "../common/global_define.h" #include "embperl.h" @@ -37,26 +39,24 @@ #include "client.h" #include "titles.h" -#ifdef THIS /* this macro seems to leak out on some systems */ +#ifdef THIS /* this macro seems to leak out on some systems */ #undef THIS #endif XS(XS_Client_SendSound); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SendSound) -{ +XS(XS_Client_SendSound) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::SendSound(THIS)"); { - Client * THIS; + Client *THIS; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SendSound(); @@ -65,48 +65,44 @@ XS(XS_Client_SendSound) } XS(XS_Client_Save); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_Save) -{ +XS(XS_Client_Save) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::Save(THIS, uint8 commit_now)"); { - Client * THIS; - bool RETVAL; - uint8 iCommitNow = (uint8)SvUV(ST(1)); + Client *THIS; + bool RETVAL; + uint8 iCommitNow = (uint8) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->Save(iCommitNow); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Client_SaveBackup); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SaveBackup) -{ +XS(XS_Client_SaveBackup) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::SaveBackup(THIS)"); { - Client * THIS; + Client *THIS; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SaveBackup(); @@ -115,22 +111,20 @@ XS(XS_Client_SaveBackup) } XS(XS_Client_Connected); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_Connected) -{ +XS(XS_Client_Connected) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::Connected(THIS)"); { - Client * THIS; - bool RETVAL; + Client *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->Connected(); @@ -141,22 +135,20 @@ XS(XS_Client_Connected) } XS(XS_Client_InZone); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_InZone) -{ +XS(XS_Client_InZone) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::InZone(THIS)"); { - Client * THIS; - bool RETVAL; + Client *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->InZone(); @@ -167,21 +159,19 @@ XS(XS_Client_InZone) } XS(XS_Client_Kick); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_Kick) -{ +XS(XS_Client_Kick) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::Kick(THIS)"); { - Client * THIS; + Client *THIS; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->Kick(); @@ -190,21 +180,19 @@ XS(XS_Client_Kick) } XS(XS_Client_Disconnect); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_Disconnect) -{ +XS(XS_Client_Disconnect) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::Disconnect(THIS)"); { - Client * THIS; + Client *THIS; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->Disconnect(); @@ -213,22 +201,20 @@ XS(XS_Client_Disconnect) } XS(XS_Client_IsLD); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_IsLD) -{ +XS(XS_Client_IsLD) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::IsLD(THIS)"); { - Client * THIS; - bool RETVAL; + Client *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsLD(); @@ -239,21 +225,19 @@ XS(XS_Client_IsLD) } XS(XS_Client_WorldKick); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_WorldKick) -{ +XS(XS_Client_WorldKick) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::WorldKick(THIS)"); { - Client * THIS; + Client *THIS; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->WorldKick(); @@ -262,47 +246,44 @@ XS(XS_Client_WorldKick) } XS(XS_Client_GetAnon); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetAnon) -{ +XS(XS_Client_GetAnon) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetAnon(THIS)"); { - Client * THIS; - uint8 RETVAL; + Client *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetAnon(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_Duck); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_Duck) -{ +XS(XS_Client_Duck) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::Duck(THIS)"); { - Client * THIS; + Client *THIS; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->Duck(); @@ -311,21 +292,19 @@ XS(XS_Client_Duck) } XS(XS_Client_Stand); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_Stand) -{ +XS(XS_Client_Stand) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::Stand(THIS)"); { - Client * THIS; + Client *THIS; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->Stand(); @@ -334,22 +313,20 @@ XS(XS_Client_Stand) } XS(XS_Client_SetGM); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetGM) -{ +XS(XS_Client_SetGM) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::SetGM(THIS, bool toggle)"); { - Client * THIS; - bool toggle = (bool)SvTRUE(ST(1)); + Client *THIS; + bool toggle = (bool) SvTRUE(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetGM(toggle); @@ -358,22 +335,20 @@ XS(XS_Client_SetGM) } XS(XS_Client_SetPVP); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetPVP) -{ +XS(XS_Client_SetPVP) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::SetPVP(THIS, bool toggle)"); { - Client * THIS; - bool toggle = (bool)SvTRUE(ST(1)); + Client *THIS; + bool toggle = (bool) SvTRUE(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetPVP(toggle); @@ -382,22 +357,20 @@ XS(XS_Client_SetPVP) } XS(XS_Client_GetPVP); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetPVP) -{ +XS(XS_Client_GetPVP) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetPVP(THIS)"); { - Client * THIS; - bool RETVAL; + Client *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetPVP(); @@ -408,22 +381,20 @@ XS(XS_Client_GetPVP) } XS(XS_Client_GetGM); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetGM) -{ +XS(XS_Client_GetGM) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetGM(THIS)"); { - Client * THIS; - bool RETVAL; + Client *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetGM(); @@ -434,22 +405,20 @@ XS(XS_Client_GetGM) } XS(XS_Client_SetBaseClass); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetBaseClass) -{ +XS(XS_Client_SetBaseClass) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::SetBaseClass(THIS, uint32 class_id)"); { - Client * THIS; - uint32 i = (uint32)SvUV(ST(1)); + Client *THIS; + uint32 i = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetBaseClass(i); @@ -458,22 +427,20 @@ XS(XS_Client_SetBaseClass) } XS(XS_Client_SetBaseRace); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetBaseRace) -{ +XS(XS_Client_SetBaseRace) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::SetBaseRace(THIS, uint32 race_id)"); { - Client * THIS; - uint32 i = (uint32)SvUV(ST(1)); + Client *THIS; + uint32 i = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetBaseRace(i); @@ -482,22 +449,20 @@ XS(XS_Client_SetBaseRace) } XS(XS_Client_SetBaseGender); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetBaseGender) -{ +XS(XS_Client_SetBaseGender) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::SetBaseGender(THIS, uint32 gender_id)"); { - Client * THIS; - uint32 i = (uint32)SvUV(ST(1)); + Client *THIS; + uint32 i = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetBaseGender(i); @@ -506,54 +471,52 @@ XS(XS_Client_SetBaseGender) } XS(XS_Client_GetBaseFace); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetBaseFace) -{ +XS(XS_Client_GetBaseFace) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetBaseFace(THIS)"); { - Client * THIS; - uint8 RETVAL; + Client *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetBaseFace(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetLanguageSkill); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetLanguageSkill) -{ +XS(XS_Client_GetLanguageSkill) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::GetLanguageSkill(THIS, uint16 lanuage_id)"); { - Client * THIS; - uint8 RETVAL; + Client *THIS; + uint8 RETVAL; dXSTARG; - uint16 n = (uint16)SvUV(ST(1)); + uint16 n = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetLanguageSkill(n); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } @@ -585,389 +548,372 @@ XS(XS_Client_GetLastName) { } XS(XS_Client_GetLDoNPointsTheme); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetLDoNPointsTheme) -{ +XS(XS_Client_GetLDoNPointsTheme) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::GetLDoNPointsTheme(THIS, int32 theme)"); { - Client * THIS; - uint32 RETVAL; + Client *THIS; + uint32 RETVAL; dXSTARG; - int32 theme_out = (int32)SvIV(ST(1)); + int32 theme_out = (int32) SvIV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetLDoNPointsTheme(theme_out); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetBaseSTR); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetBaseSTR) -{ +XS(XS_Client_GetBaseSTR) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetBaseSTR(THIS)"); { - Client * THIS; - uint8 RETVAL; + Client *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetBaseSTR(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetBaseSTA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetBaseSTA) -{ +XS(XS_Client_GetBaseSTA) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetBaseSTA(THIS)"); { - Client * THIS; - uint8 RETVAL; + Client *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetBaseSTA(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetBaseCHA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetBaseCHA) -{ +XS(XS_Client_GetBaseCHA) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetBaseCHA(THIS)"); { - Client * THIS; - uint8 RETVAL; + Client *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetBaseCHA(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetBaseDEX); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetBaseDEX) -{ +XS(XS_Client_GetBaseDEX) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetBaseDEX(THIS)"); { - Client * THIS; - uint8 RETVAL; + Client *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetBaseDEX(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetBaseINT); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetBaseINT) -{ +XS(XS_Client_GetBaseINT) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetBaseINT(THIS)"); { - Client * THIS; - uint8 RETVAL; + Client *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetBaseINT(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetBaseAGI); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetBaseAGI) -{ +XS(XS_Client_GetBaseAGI) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetBaseAGI(THIS)"); { - Client * THIS; - uint8 RETVAL; + Client *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetBaseAGI(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetBaseWIS); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetBaseWIS) -{ +XS(XS_Client_GetBaseWIS) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetBaseWIS(THIS)"); { - Client * THIS; - uint8 RETVAL; + Client *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetBaseWIS(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetWeight); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetWeight) -{ +XS(XS_Client_GetWeight) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetWeight(THIS)"); { - Client * THIS; - uint16 RETVAL; + Client *THIS; + uint16 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetWeight(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetEXP); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetEXP) -{ +XS(XS_Client_GetEXP) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetEXP(THIS)"); { - Client * THIS; - uint32 RETVAL; + Client *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetEXP(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetAAExp); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetAAExp) -{ +XS(XS_Client_GetAAExp) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetAAExp(THIS)"); { - Client * THIS; - uint32 RETVAL; + Client *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetAAXP(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetAAPercent); -XS(XS_Client_GetAAPercent) -{ +XS(XS_Client_GetAAPercent) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetAAPercent(THIS)"); { - Client* THIS; + Client *THIS; uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetAAPercent(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetTotalSecondsPlayed); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetTotalSecondsPlayed) -{ +XS(XS_Client_GetTotalSecondsPlayed) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetTotalSecondsPlayed(THIS)"); { - Client * THIS; - uint32 RETVAL; + Client *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetTotalSecondsPlayed(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_UpdateLDoNPoints); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_UpdateLDoNPoints) -{ +XS(XS_Client_UpdateLDoNPoints) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Client::UpdateLDoNPoints(THIS, int32 points, uint32 theme)"); { - Client * THIS; - bool RETVAL; - int32 points = (int32)SvIV(ST(1)); - uint32 theme = (uint32)SvUV(ST(2)); + Client *THIS; + bool RETVAL; + int32 points = (int32) SvIV(ST(1)); + uint32 theme = (uint32) SvUV(ST(2)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->UpdateLDoNPoints(points, theme); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Client_SetDeity); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetDeity) -{ +XS(XS_Client_SetDeity) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::SetDeity(THIS, uint32 deity_id)"); { - Client * THIS; - uint32 i = (uint32)SvUV(ST(1)); + Client *THIS; + uint32 i = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetDeity(i); @@ -976,36 +922,34 @@ XS(XS_Client_SetDeity) } XS(XS_Client_AddEXP); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_AddEXP) -{ +XS(XS_Client_AddEXP) { dXSARGS; if (items < 2 || items > 4) Perl_croak(aTHX_ "Usage: Client::AddEXP(THIS, uint32 experience_points)"); { - Client * THIS; - uint32 add_exp = (uint32)SvUV(ST(1)); - uint8 conlevel; - bool resexp; + Client *THIS; + uint32 add_exp = (uint32) SvUV(ST(1)); + uint8 conlevel; + bool resexp; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 3) conlevel = 0xFF; else { - conlevel = (uint8)SvUV(ST(2)); + conlevel = (uint8) SvUV(ST(2)); } if (items < 4) resexp = false; else { - resexp = (bool)SvTRUE(ST(3)); + resexp = (bool) SvTRUE(ST(3)); } THIS->AddEXP(add_exp, conlevel, resexp); @@ -1014,30 +958,29 @@ XS(XS_Client_AddEXP) } XS(XS_Client_SetEXP); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetEXP) -{ +XS(XS_Client_SetEXP) { dXSARGS; if (items < 3 || items > 4) - Perl_croak(aTHX_ "Usage: Client::SetEXP(THIS, uint32 experience_points, uint32 aa_experience_points, [bool resexp=false])"); + Perl_croak(aTHX_ + "Usage: Client::SetEXP(THIS, uint32 experience_points, uint32 aa_experience_points, [bool resexp=false])"); { - Client * THIS; - uint32 set_exp = (uint32)SvUV(ST(1)); - uint32 set_aaxp = (uint32)SvUV(ST(2)); - bool resexp; + Client *THIS; + uint32 set_exp = (uint32) SvUV(ST(1)); + uint32 set_aaxp = (uint32) SvUV(ST(2)); + bool resexp; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 4) resexp = false; else { - resexp = (bool)SvTRUE(ST(3)); + resexp = (bool) SvTRUE(ST(3)); } THIS->SetEXP(set_exp, set_aaxp, resexp); @@ -1046,56 +989,55 @@ XS(XS_Client_SetEXP) } XS(XS_Client_SetBindPoint); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetBindPoint) -{ +XS(XS_Client_SetBindPoint) { dXSARGS; if (items < 1 || items > 6) - Perl_croak(aTHX_ "Usage: Client::SetBindPoint(THIS, int to_zone = -1, int to_instance = 0, float new_x = 0.0f, float new_y = 0.0f, float new_z = 0.0f)"); + Perl_croak(aTHX_ + "Usage: Client::SetBindPoint(THIS, int to_zone = -1, int to_instance = 0, float new_x = 0.0f, float new_y = 0.0f, float new_z = 0.0f)"); { - Client * THIS; - int to_zone; - int to_instance; - float new_x; - float new_y; - float new_z; + Client *THIS; + int to_zone; + int to_instance; + float new_x; + float new_y; + float new_z; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 2) to_zone = -1; else { - to_zone = (int)SvIV(ST(1)); + to_zone = (int) SvIV(ST(1)); } - if(items < 3) + if (items < 3) to_instance = 0; else { - to_instance = (int)SvIV(ST(2)); + to_instance = (int) SvIV(ST(2)); } if (items < 4) new_x = 0.0f; else { - new_x = (float)SvNV(ST(3)); + new_x = (float) SvNV(ST(3)); } if (items < 5) new_y = 0.0f; else { - new_y = (float)SvNV(ST(4)); + new_y = (float) SvNV(ST(4)); } if (items < 6) new_z = 0.0f; else { - new_z = (float)SvNV(ST(5)); + new_z = (float) SvNV(ST(5)); } THIS->SetBindPoint(0, to_zone, to_instance, glm::vec3(new_x, new_y, new_z)); @@ -1104,211 +1046,205 @@ XS(XS_Client_SetBindPoint) } XS(XS_Client_GetBindX); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetBindX) -{ +XS(XS_Client_GetBindX) { dXSARGS; if (items < 1 || items > 2) Perl_croak(aTHX_ "Usage: Client::GetBindX(int index = 0)"); { - Client * THIS; - int index = 0; + Client *THIS; + int index = 0; float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items == 1) index = 0; else if (items == 2) { - index = (uint32)SvUV(ST(1)); + index = (uint32) SvUV(ST(1)); } RETVAL = THIS->GetBindX(index); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Client_GetBindY); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetBindY) -{ +XS(XS_Client_GetBindY) { dXSARGS; if (items < 1 || items > 2) Perl_croak(aTHX_ "Usage: Client::GetBindY(int index = 0)"); { - Client * THIS; - int index = 0; + Client *THIS; + int index = 0; float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items == 1) index = 0; else if (items == 2) { - index = (uint32)SvUV(ST(1));; + index = (uint32) SvUV(ST(1));; } RETVAL = THIS->GetBindY(index); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Client_GetBindZ); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetBindZ) -{ +XS(XS_Client_GetBindZ) { dXSARGS; if (items < 1 || items > 2) Perl_croak(aTHX_ "Usage: Client::GetBindZ(int index = 0)"); { - Client * THIS; - int index = 0; + Client *THIS; + int index = 0; float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items == 1) index = 0; else if (items == 2) { - index = (uint32)SvUV(ST(1)); + index = (uint32) SvUV(ST(1)); } RETVAL = THIS->GetBindZ(index); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Client_GetBindHeading); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetBindHeading) -{ +XS(XS_Client_GetBindHeading) { dXSARGS; if (items < 1 || items > 2) Perl_croak(aTHX_ "Usage: Client::GetBindHeading(int index = 0)"); { - Client * THIS; - int index = 0; + Client *THIS; + int index = 0; float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items == 1) index = 0; else if (items == 2) { - index = (uint32)SvUV(ST(1)); + index = (uint32) SvUV(ST(1)); } RETVAL = THIS->GetBindHeading(index); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Client_GetBindZoneID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetBindZoneID) -{ +XS(XS_Client_GetBindZoneID) { dXSARGS; if (items < 1 || items > 2) Perl_croak(aTHX_ "Usage: Client::GetBindZoneID(int index = 0)"); { - Client * THIS; + Client *THIS; uint32 index = 0; uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items == 1) index = 0; else if (items == 2) { - index = (uint32)SvUV(ST(1)); + index = (uint32) SvUV(ST(1)); } RETVAL = THIS->GetBindZoneID(index); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_MovePC); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_MovePC) -{ +XS(XS_Client_MovePC) { dXSARGS; if (items != 6) Perl_croak(aTHX_ "Usage: Client::MovePC(THIS, uint32 zone_id, float x, float y, float z, float heading)"); { - Client * THIS; - uint32 zoneID = (uint32)SvUV(ST(1)); - float x = (float)SvNV(ST(2)); - float y = (float)SvNV(ST(3)); - float z = (float)SvNV(ST(4)); - float heading = (float)SvNV(ST(5)); + Client *THIS; + uint32 zoneID = (uint32) SvUV(ST(1)); + float x = (float) SvNV(ST(2)); + float y = (float) SvNV(ST(3)); + float z = (float) SvNV(ST(4)); + float heading = (float) SvNV(ST(5)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (THIS->IsClient()) { THIS->MovePC(zoneID, x, y, z, heading); - } - else { + } else { if (THIS->IsMerc()) { - Log(Logs::Detail, Logs::None, "[CLIENT] Perl(XS_Client_MovePC) attempted to process a type Merc reference"); + Log(Logs::Detail, Logs::None, + "[CLIENT] Perl(XS_Client_MovePC) attempted to process a type Merc reference"); + } else if (THIS->IsNPC()) { + Log(Logs::Detail, Logs::None, + "[CLIENT] Perl(XS_Client_MovePC) attempted to process a type NPC reference"); } - else if (THIS->IsNPC()) { - Log(Logs::Detail, Logs::None, "[CLIENT] Perl(XS_Client_MovePC) attempted to process a type NPC reference"); - } - #ifdef BOTS - else if (THIS->IsBot()) { - Log(Logs::Detail, Logs::None, "[CLIENT] Perl(XS_Client_MovePC) attempted to process a type Bot reference"); - } - #endif +#ifdef BOTS + else if (THIS->IsBot()) { + Log(Logs::Detail, Logs::None, "[CLIENT] Perl(XS_Client_MovePC) attempted to process a type Bot reference"); + } +#endif else { - Log(Logs::Detail, Logs::None, "[CLIENT] Perl(XS_Client_MovePC) attempted to process an Unknown type reference"); + Log(Logs::Detail, Logs::None, + "[CLIENT] Perl(XS_Client_MovePC) attempted to process an Unknown type reference"); } Perl_croak(aTHX_ "THIS is not of type Client"); @@ -1319,46 +1255,46 @@ XS(XS_Client_MovePC) } XS(XS_Client_MovePCInstance); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_MovePCInstance) -{ +XS(XS_Client_MovePCInstance) { dXSARGS; if (items != 7) - Perl_croak(aTHX_ "Usage: Client::MovePCInstance(THIS, uint32 zone_id, uint32 instance_id, float x, float y, float z, float heading)"); + Perl_croak(aTHX_ + "Usage: Client::MovePCInstance(THIS, uint32 zone_id, uint32 instance_id, float x, float y, float z, float heading)"); { - Client * THIS; - uint32 zoneID = (uint32)SvUV(ST(1)); - uint32 instanceID = (uint32)SvUV(ST(2)); - float x = (float)SvNV(ST(3)); - float y = (float)SvNV(ST(4)); - float z = (float)SvNV(ST(5)); - float heading = (float)SvNV(ST(6)); + Client *THIS; + uint32 zoneID = (uint32) SvUV(ST(1)); + uint32 instanceID = (uint32) SvUV(ST(2)); + float x = (float) SvNV(ST(3)); + float y = (float) SvNV(ST(4)); + float z = (float) SvNV(ST(5)); + float heading = (float) SvNV(ST(6)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (THIS->IsClient()) { THIS->MovePC(zoneID, instanceID, x, y, z, heading); - } - else { + } else { if (THIS->IsMerc()) { - Log(Logs::Detail, Logs::None, "[CLIENT] Perl(XS_Client_MovePCInstance) attempted to process a type Merc reference"); + Log(Logs::Detail, Logs::None, + "[CLIENT] Perl(XS_Client_MovePCInstance) attempted to process a type Merc reference"); + } else if (THIS->IsNPC()) { + Log(Logs::Detail, Logs::None, + "[CLIENT] Perl(XS_Client_MovePCInstance) attempted to process a type NPC reference"); } - else if (THIS->IsNPC()) { - Log(Logs::Detail, Logs::None, "[CLIENT] Perl(XS_Client_MovePCInstance) attempted to process a type NPC reference"); - } - #ifdef BOTS - else if (THIS->IsBot()) { - Log(Logs::Detail, Logs::None, "[CLIENT] Perl(XS_Client_MovePCInstance) attempted to process a type Bot reference"); - } - #endif +#ifdef BOTS + else if (THIS->IsBot()) { + Log(Logs::Detail, Logs::None, "[CLIENT] Perl(XS_Client_MovePCInstance) attempted to process a type Bot reference"); + } +#endif else { - Log(Logs::Detail, Logs::None, "[CLIENT] Perl(XS_Client_MovePCInstance) attempted to process an Unknown type reference"); + Log(Logs::Detail, Logs::None, + "[CLIENT] Perl(XS_Client_MovePCInstance) attempted to process an Unknown type reference"); } Perl_croak(aTHX_ "THIS is not of type Client"); @@ -1370,22 +1306,20 @@ XS(XS_Client_MovePCInstance) } XS(XS_Client_ChangeLastName); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_ChangeLastName) -{ +XS(XS_Client_ChangeLastName) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::ChangeLastName(THIS, string last_name)"); { - Client * THIS; - char* in_lastname = (char *)SvPV_nolen(ST(1)); + Client *THIS; + char *in_lastname = (char *) SvPV_nolen(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->ChangeLastName(in_lastname); @@ -1394,68 +1328,66 @@ XS(XS_Client_ChangeLastName) } XS(XS_Client_GetFactionLevel); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetFactionLevel) -{ +XS(XS_Client_GetFactionLevel) { dXSARGS; if (items != 8) - Perl_croak(aTHX_ "Usage: Client::GetFactionLevel(THIS, uint32 character_id, uint32 npc_id, uint32 player_race_id, uint32 player_class_id, uint32 player_deity_id, uint32 player_faction_id, Mob*)"); + Perl_croak(aTHX_ + "Usage: Client::GetFactionLevel(THIS, uint32 character_id, uint32 npc_id, uint32 player_race_id, uint32 player_class_id, uint32 player_deity_id, uint32 player_faction_id, Mob*)"); { - Client * THIS; - FACTION_VALUE RETVAL; + Client *THIS; + FACTION_VALUE RETVAL; dXSTARG; - uint32 char_id = (uint32)SvUV(ST(1)); - uint32 npc_id = (uint32)SvUV(ST(2)); - uint32 p_race = (uint32)SvUV(ST(3)); - uint32 p_class = (uint32)SvUV(ST(4)); - uint32 p_deity = (uint32)SvUV(ST(5)); - int32 pFaction = (int32)SvIV(ST(6)); - Mob* tnpc; + uint32 char_id = (uint32) SvUV(ST(1)); + uint32 npc_id = (uint32) SvUV(ST(2)); + uint32 p_race = (uint32) SvUV(ST(3)); + uint32 p_class = (uint32) SvUV(ST(4)); + uint32 p_deity = (uint32) SvUV(ST(5)); + int32 pFaction = (int32) SvIV(ST(6)); + Mob *tnpc; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(7), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(7))); - tnpc = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(7))); + tnpc = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "tnpc is not of type Mob"); - if(tnpc == nullptr) + if (tnpc == nullptr) Perl_croak(aTHX_ "tnpc is nullptr, avoiding crash."); RETVAL = THIS->GetFactionLevel(char_id, npc_id, p_race, p_class, p_deity, pFaction, tnpc); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Client_SetFactionLevel); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetFactionLevel) -{ +XS(XS_Client_SetFactionLevel) { dXSARGS; if (items != 6) - Perl_croak(aTHX_ "Usage: Client::SetFactionLevel(THIS, uint32 character_id, uint32 npc_id, uint8 character_class, uint8 character_race, uint8 character_deity)"); + Perl_croak(aTHX_ + "Usage: Client::SetFactionLevel(THIS, uint32 character_id, uint32 npc_id, uint8 character_class, uint8 character_race, uint8 character_deity)"); { - Client * THIS; - uint32 char_id = (uint32)SvUV(ST(1)); - uint32 npc_id = (uint32)SvUV(ST(2)); - uint8 char_class = (uint8)SvUV(ST(3)); - uint8 char_race = (uint8)SvUV(ST(4)); - uint8 char_deity = (uint8)SvUV(ST(5)); + Client *THIS; + uint32 char_id = (uint32) SvUV(ST(1)); + uint32 npc_id = (uint32) SvUV(ST(2)); + uint8 char_class = (uint8) SvUV(ST(3)); + uint8 char_race = (uint8) SvUV(ST(4)); + uint8 char_deity = (uint8) SvUV(ST(5)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetFactionLevel(char_id, npc_id, char_class, char_race, char_deity); @@ -1464,11 +1396,11 @@ XS(XS_Client_SetFactionLevel) } XS(XS_Client_SetFactionLevel2); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetFactionLevel2) -{ +XS(XS_Client_SetFactionLevel2) { dXSARGS; if (items < 7 || items > 8) - Perl_croak(aTHX_ "Usage: Client::SetFactionLevel2(THIS, uint32 character_id, int32 faction_id, uint8 character_class, uint8 character_race, uint8 character_deity, int32 value, uint8 temp)"); + Perl_croak(aTHX_ + "Usage: Client::SetFactionLevel2(THIS, uint32 character_id, int32 faction_id, uint8 character_class, uint8 character_race, uint8 character_deity, int32 value, uint8 temp)"); { Client *THIS; uint32 char_id = (uint32) SvUV(ST(1)); @@ -1499,53 +1431,51 @@ XS(XS_Client_SetFactionLevel2) } XS(XS_Client_GetRawItemAC); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetRawItemAC) -{ +XS(XS_Client_GetRawItemAC) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetRawItemAC(THIS)"); { - Client * THIS; - int16 RETVAL; + Client *THIS; + int16 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetRawItemAC(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Client_AccountID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_AccountID) -{ +XS(XS_Client_AccountID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::AccountID(THIS)"); { - Client * THIS; - uint32 RETVAL; + Client *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->AccountID(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } @@ -1577,80 +1507,76 @@ XS(XS_Client_AccountName) { } XS(XS_Client_Admin); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_Admin) -{ +XS(XS_Client_Admin) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::Admin(THIS)"); { - Client * THIS; - int16 RETVAL; + Client *THIS; + int16 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->Admin(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Client_CharacterID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_CharacterID) -{ +XS(XS_Client_CharacterID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::CharacterID(THIS)"); { - Client * THIS; - uint32 RETVAL; + Client *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->CharacterID(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_UpdateAdmin); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_UpdateAdmin) -{ +XS(XS_Client_UpdateAdmin) { dXSARGS; if (items < 1 || items > 2) Perl_croak(aTHX_ "Usage: Client::UpdateAdmin(THIS, bool from_db = true)"); { - Client * THIS; - bool iFromDB; + Client *THIS; + bool iFromDB; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 2) iFromDB = true; else { - iFromDB = (bool)SvTRUE(ST(1)); + iFromDB = (bool) SvTRUE(ST(1)); } THIS->UpdateAdmin(iFromDB); @@ -1665,7 +1591,7 @@ XS(XS_Client_UpdateWho) { Perl_croak(aTHX_ "Usage: Client::UpdateWho(THIS, uint8 remove = 0)"); { Client *THIS; - uint8 remove; + uint8 remove; if (sv_derived_from(ST(0), "Client")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -1687,109 +1613,104 @@ XS(XS_Client_UpdateWho) { } XS(XS_Client_GuildRank); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GuildRank) -{ +XS(XS_Client_GuildRank) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GuildRank(THIS)"); { - Client * THIS; - uint8 RETVAL; + Client *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GuildRank(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_GuildID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GuildID) -{ +XS(XS_Client_GuildID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GuildID(THIS)"); { - Client * THIS; - uint32 RETVAL; + Client *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GuildID(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetFace); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetFace) -{ +XS(XS_Client_GetFace) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetFace(THIS)"); { - Client * THIS; - uint8 RETVAL; + Client *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetFace(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_TakeMoneyFromPP); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_TakeMoneyFromPP) -{ +XS(XS_Client_TakeMoneyFromPP) { dXSARGS; if (items < 2 || items > 3) Perl_croak(aTHX_ "Usage: Client::TakeMoneyFromPP(THIS, uint32 copper, bool update_client = false)"); { - Client * THIS; - bool RETVAL; - bool updateclient = false; - uint32 copper = (uint32)SvUV(ST(1)); + Client *THIS; + bool RETVAL; + bool updateclient = false; + uint32 copper = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items > 2) - updateclient = (bool)SvTRUE(ST(2)); + updateclient = (bool) SvTRUE(ST(2)); RETVAL = THIS->TakeMoneyFromPP(copper, updateclient); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); @@ -1823,22 +1744,20 @@ XS(XS_Client_AddMoneyToPP) { } XS(XS_Client_TGB); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_TGB) -{ +XS(XS_Client_TGB) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::TGB(THIS)"); { - Client * THIS; - bool RETVAL; + Client *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->TGB(); @@ -1849,48 +1768,45 @@ XS(XS_Client_TGB) } XS(XS_Client_GetSkillPoints); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetSkillPoints) -{ +XS(XS_Client_GetSkillPoints) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetSkillPoints(THIS)"); { - Client * THIS; - uint16 RETVAL; + Client *THIS; + uint16 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSkillPoints(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_SetSkillPoints); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetSkillPoints) -{ +XS(XS_Client_SetSkillPoints) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::SetSkillPoints(THIS, inp)"); { - Client * THIS; - int inp = (int)SvIV(ST(1)); + Client *THIS; + int inp = (int) SvIV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetSkillPoints(inp); @@ -1899,29 +1815,27 @@ XS(XS_Client_SetSkillPoints) } XS(XS_Client_IncreaseSkill); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_IncreaseSkill) -{ +XS(XS_Client_IncreaseSkill) { dXSARGS; if (items < 2 || items > 3) Perl_croak(aTHX_ "Usage: Client::IncreaseSkill(THIS, int skill_id, int value = 1)"); { - Client * THIS; - int skill_id = (int)SvIV(ST(1)); - int value; + Client *THIS; + int skill_id = (int) SvIV(ST(1)); + int value; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 3) value = 1; else { - value = (int)SvIV(ST(2)); + value = (int) SvIV(ST(2)); } THIS->IncreaseSkill(skill_id, value); @@ -1930,29 +1844,27 @@ XS(XS_Client_IncreaseSkill) } XS(XS_Client_IncreaseLanguageSkill); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_IncreaseLanguageSkill) -{ +XS(XS_Client_IncreaseLanguageSkill) { dXSARGS; if (items < 2 || items > 3) Perl_croak(aTHX_ "Usage: Client::IncreaseLanguageSkill(THIS, int skill_id, int value = 1)"); { - Client * THIS; - int skill_id = (int)SvIV(ST(1)); - int value; + Client *THIS; + int skill_id = (int) SvIV(ST(1)); + int value; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 3) value = 1; else { - value = (int)SvIV(ST(2)); + value = (int) SvIV(ST(2)); } THIS->IncreaseLanguageSkill(skill_id, value); @@ -1961,131 +1873,123 @@ XS(XS_Client_IncreaseLanguageSkill) } XS(XS_Client_GetSkill); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetSkill) -{ +XS(XS_Client_GetSkill) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::GetSkill(THIS, uint16 skill_id)"); { - Client * THIS; - uint16 RETVAL; + Client *THIS; + uint16 RETVAL; dXSTARG; - EQEmu::skills::SkillType skill_id = (EQEmu::skills::SkillType)SvUV(ST(1)); + EQEmu::skills::SkillType skill_id = (EQEmu::skills::SkillType) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSkill(skill_id); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetRawSkill); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetRawSkill) -{ +XS(XS_Client_GetRawSkill) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::GetRawSkill(THIS, int skill_id)"); { - Client * THIS; - uint32 RETVAL; + Client *THIS; + uint32 RETVAL; dXSTARG; - EQEmu::skills::SkillType skill_id = (EQEmu::skills::SkillType)SvUV(ST(1)); + EQEmu::skills::SkillType skill_id = (EQEmu::skills::SkillType) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetRawSkill(skill_id); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_HasSkill); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_HasSkill) -{ +XS(XS_Client_HasSkill) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::HasSkill(THIS, int skill_id)"); { - Client * THIS; - bool RETVAL; - EQEmu::skills::SkillType skill_id = (EQEmu::skills::SkillType)SvUV(ST(1)); + Client *THIS; + bool RETVAL; + EQEmu::skills::SkillType skill_id = (EQEmu::skills::SkillType) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->HasSkill(skill_id); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Client_CanHaveSkill); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_CanHaveSkill) -{ +XS(XS_Client_CanHaveSkill) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::CanHaveSkill(THIS, int skill_id)"); { - Client * THIS; - bool RETVAL; - EQEmu::skills::SkillType skill_id = (EQEmu::skills::SkillType)SvUV(ST(1)); + Client *THIS; + bool RETVAL; + EQEmu::skills::SkillType skill_id = (EQEmu::skills::SkillType) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->CanHaveSkill(skill_id); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Client_SetSkill); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetSkill) -{ +XS(XS_Client_SetSkill) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Client::SetSkill(THIS, int skill_id, uint16 value)"); { - Client * THIS; - EQEmu::skills::SkillType skill_num = (EQEmu::skills::SkillType)SvUV(ST(1)); - uint16 value = (uint16)SvUV(ST(2)); + Client *THIS; + EQEmu::skills::SkillType skill_num = (EQEmu::skills::SkillType) SvUV(ST(1)); + uint16 value = (uint16) SvUV(ST(2)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetSkill(skill_num, value); @@ -2099,7 +2003,7 @@ XS(XS_Client_AddSkill) { if (items != 3) Perl_croak(aTHX_ "Usage: Client::AddSkill(THIS, int skill_id, uint16 value)"); { - Client *THIS; + Client *THIS; EQEmu::skills::SkillType skillid = (EQEmu::skills::SkillType) SvUV(ST(1)); uint16 value = (uint16) SvUV(ST(2)); @@ -2117,22 +2021,20 @@ XS(XS_Client_AddSkill) { } XS(XS_Client_CheckSpecializeIncrease); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_CheckSpecializeIncrease) -{ +XS(XS_Client_CheckSpecializeIncrease) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::CheckSpecializeIncrease(THIS, uint16 spell_id)"); { - Client * THIS; - uint16 spell_id = (uint16)SvUV(ST(1)); + Client *THIS; + uint16 spell_id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->CheckSpecializeIncrease(spell_id); @@ -2141,34 +2043,32 @@ XS(XS_Client_CheckSpecializeIncrease) } XS(XS_Client_CheckIncreaseSkill); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_CheckIncreaseSkill) -{ +XS(XS_Client_CheckIncreaseSkill) { dXSARGS; if (items < 2 || items > 3) Perl_croak(aTHX_ "Usage: Client::CheckIncreaseSkill(THIS, int skill_id, int chance_modifier = 0)"); { - Client * THIS; - bool RETVAL; - EQEmu::skills::SkillType skillid = (EQEmu::skills::SkillType)SvUV(ST(1)); - int chancemodi; + Client *THIS; + bool RETVAL; + EQEmu::skills::SkillType skillid = (EQEmu::skills::SkillType) SvUV(ST(1)); + int chancemodi; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 3) chancemodi = 0; else { - chancemodi = (int)SvIV(ST(2)); + chancemodi = (int) SvIV(ST(2)); } RETVAL = THIS->CheckIncreaseSkill(skillid, nullptr, chancemodi); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); @@ -2181,8 +2081,8 @@ XS(XS_Client_SetLanguageSkill) { Perl_croak(aTHX_ "Usage: Client::SetLanguageSkill(THIS, int language_id, int value)"); { Client *THIS; - int langid = (int) SvIV(ST(1)); - int value = (int) SvIV(ST(2)); + int langid = (int) SvIV(ST(1)); + int value = (int) SvIV(ST(2)); if (sv_derived_from(ST(0), "Client")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -2204,7 +2104,7 @@ XS(XS_Client_MaxSkill) { if (items < 2 || items > 4) Perl_croak(aTHX_ "Usage: Client::MaxSkill(THIS, uint16 skill_id, uint16 class_id, uint16 level)"); { - Client *THIS; + Client *THIS; uint16 RETVAL; EQEmu::skills::SkillType skillid = (EQEmu::skills::SkillType) SvUV(ST(1)); uint16 class_ = 0; @@ -2237,21 +2137,19 @@ XS(XS_Client_MaxSkill) { } XS(XS_Client_GMKill); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GMKill) -{ +XS(XS_Client_GMKill) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GMKill(THIS)"); { - Client * THIS; + Client *THIS; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->GMKill(); @@ -2260,22 +2158,20 @@ XS(XS_Client_GMKill) } XS(XS_Client_IsMedding); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_IsMedding) -{ +XS(XS_Client_IsMedding) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::IsMedding(THIS)"); { - Client * THIS; - bool RETVAL; + Client *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsMedding(); @@ -2286,48 +2182,45 @@ XS(XS_Client_IsMedding) } XS(XS_Client_GetDuelTarget); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetDuelTarget) -{ +XS(XS_Client_GetDuelTarget) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetDuelTarget(THIS)"); { - Client * THIS; - uint16 RETVAL; + Client *THIS; + uint16 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetDuelTarget(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_IsDueling); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_IsDueling) -{ +XS(XS_Client_IsDueling) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::IsDueling(THIS)"); { - Client * THIS; - bool RETVAL; + Client *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsDueling(); @@ -2338,22 +2231,20 @@ XS(XS_Client_IsDueling) } XS(XS_Client_SetDuelTarget); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetDuelTarget) -{ +XS(XS_Client_SetDuelTarget) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::SetDuelTarget(THIS, set_id)"); { - Client * THIS; - uint16 set_id = (uint16)SvUV(ST(1)); + Client *THIS; + uint16 set_id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetDuelTarget(set_id); @@ -2362,22 +2253,20 @@ XS(XS_Client_SetDuelTarget) } XS(XS_Client_SetDueling); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetDueling) -{ +XS(XS_Client_SetDueling) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::SetDueling(THIS, duel)"); { - Client * THIS; - bool duel = (bool)SvTRUE(ST(1)); + Client *THIS; + bool duel = (bool) SvTRUE(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetDueling(duel); @@ -2386,21 +2275,19 @@ XS(XS_Client_SetDueling) } XS(XS_Client_ResetAA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_ResetAA) -{ +XS(XS_Client_ResetAA) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::ResetAA(THIS)"); { - Client * THIS; + Client *THIS; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->ResetAA(); @@ -2445,8 +2332,8 @@ XS(XS_Client_UnmemSpell) { Perl_croak(aTHX_ "Usage: Client::UnmemSpell(THIS, int slot, [bool update_client = true])"); { Client *THIS; - int slot = (int) SvIV(ST(1)); - bool update_client; + int slot = (int) SvIV(ST(1)); + bool update_client; if (sv_derived_from(ST(0), "Client")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -2474,7 +2361,7 @@ XS(XS_Client_UnmemSpellBySpellID) { Perl_croak(aTHX_ "Usage: Client::UnmemSpellBySpellID(THIS, int32 spell_id)"); { Client *THIS; - int32 spell_id = (int32) SvIV(ST(1)); + int32 spell_id = (int32) SvIV(ST(1)); if (sv_derived_from(ST(0), "Client")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -2496,7 +2383,7 @@ XS(XS_Client_UnmemSpellAll) { Perl_croak(aTHX_ "Usage: Client::UnmemSpellAll(THIS, [bool update_client = true])"); { Client *THIS; - bool update_client; + bool update_client; if (sv_derived_from(ST(0), "Client")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -2554,8 +2441,8 @@ XS(XS_Client_UnscribeSpell) { Perl_croak(aTHX_ "Usage: Client::UnscribeSpell(THIS, int slot, [bool update_client = true])"); { Client *THIS; - int slot = (int) SvIV(ST(1)); - bool update_client; + int slot = (int) SvIV(ST(1)); + bool update_client; if (sv_derived_from(ST(0), "Client")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -2577,28 +2464,26 @@ XS(XS_Client_UnscribeSpell) { } XS(XS_Client_UnscribeSpellAll); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_UnscribeSpellAll) -{ +XS(XS_Client_UnscribeSpellAll) { dXSARGS; if (items < 1 || items > 2) Perl_croak(aTHX_ "Usage: Client::UnscribeSpellAll(THIS, [bool update_client = true])"); { - Client * THIS; - bool update_client; + Client *THIS; + bool update_client; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 2) update_client = true; else { - update_client = (bool)SvTRUE(ST(1)); + update_client = (bool) SvTRUE(ST(1)); } THIS->UnscribeSpellAll(update_client); @@ -2607,22 +2492,20 @@ XS(XS_Client_UnscribeSpellAll) } XS(XS_Client_TrainDiscBySpellID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_TrainDiscBySpellID) -{ +XS(XS_Client_TrainDiscBySpellID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::TrainDiscBySpellID(THIS, int32 spell_id)"); { - Client * THIS; - int32 spell_id = (int32)SvIV(ST(1)); + Client *THIS; + int32 spell_id = (int32) SvIV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->TrainDiscBySpellID(spell_id); @@ -2631,28 +2514,27 @@ XS(XS_Client_TrainDiscBySpellID) } XS(XS_Client_GetDiscSlotBySpellID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetDiscSlotBySpellID) -{ +XS(XS_Client_GetDiscSlotBySpellID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::GetDiscSlotBySpellID(THIS, int32 spell_id)"); { - Client * THIS; - int RETVAL; - int32 spell_id = (int32)SvIV(ST(1)); + Client *THIS; + int RETVAL; + int32 spell_id = (int32) SvIV(ST(1)); dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetDiscSlotBySpellID(spell_id); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } @@ -2664,8 +2546,8 @@ XS(XS_Client_UntrainDisc) { Perl_croak(aTHX_ "Usage: Client::UntrainDisc(THIS, int slot, [bool update_client = true])"); { Client *THIS; - int slot = (int) SvIV(ST(1)); - bool update_client; + int slot = (int) SvIV(ST(1)); + bool update_client; if (sv_derived_from(ST(0), "Client")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -2693,7 +2575,7 @@ XS(XS_Client_UntrainDiscAll) { Perl_croak(aTHX_ "Usage: Client::UntrainDiscAll(THIS, [update_client = true])"); { Client *THIS; - bool update_client; + bool update_client; if (sv_derived_from(ST(0), "Client")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -2715,22 +2597,20 @@ XS(XS_Client_UntrainDiscAll) { } XS(XS_Client_IsSitting); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_IsSitting) -{ +XS(XS_Client_IsSitting) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::IsSitting(THIS)"); { - Client * THIS; - bool RETVAL; + Client *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsSitting(); @@ -2741,22 +2621,20 @@ XS(XS_Client_IsSitting) } XS(XS_Client_IsBecomeNPC); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_IsBecomeNPC) -{ +XS(XS_Client_IsBecomeNPC) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::IsBecomeNPC(THIS)"); { - Client * THIS; - bool RETVAL; + Client *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsBecomeNPC(); @@ -2767,48 +2645,45 @@ XS(XS_Client_IsBecomeNPC) } XS(XS_Client_GetBecomeNPCLevel); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetBecomeNPCLevel) -{ +XS(XS_Client_GetBecomeNPCLevel) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetBecomeNPCLevel(THIS)"); { - Client * THIS; - uint8 RETVAL; + Client *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetBecomeNPCLevel(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_SetBecomeNPC); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetBecomeNPC) -{ +XS(XS_Client_SetBecomeNPC) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::SetBecomeNPC(THIS, flag)"); { - Client * THIS; - bool flag = (bool)SvTRUE(ST(1)); + Client *THIS; + bool flag = (bool) SvTRUE(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetBecomeNPC(flag); @@ -2817,22 +2692,20 @@ XS(XS_Client_SetBecomeNPC) } XS(XS_Client_SetBecomeNPCLevel); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetBecomeNPCLevel) -{ +XS(XS_Client_SetBecomeNPCLevel) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::SetBecomeNPCLevel(THIS, level)"); { - Client * THIS; - uint8 level = (uint8)SvUV(ST(1)); + Client *THIS; + uint8 level = (uint8) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetBecomeNPCLevel(level); @@ -2841,22 +2714,20 @@ XS(XS_Client_SetBecomeNPCLevel) } XS(XS_Client_SetFeigned); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetFeigned) -{ +XS(XS_Client_SetFeigned) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::SetFeigned(THIS, in_feigned)"); { - Client * THIS; - bool in_feigned = (bool)SvTRUE(ST(1)); + Client *THIS; + bool in_feigned = (bool) SvTRUE(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetFeigned(in_feigned); @@ -2865,22 +2736,20 @@ XS(XS_Client_SetFeigned) } XS(XS_Client_GetFeigned); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetFeigned) -{ +XS(XS_Client_GetFeigned) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetFeigned(THIS)"); { - Client * THIS; - bool RETVAL; + Client *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetFeigned(); @@ -2891,22 +2760,20 @@ XS(XS_Client_GetFeigned) } XS(XS_Client_AutoSplitEnabled); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_AutoSplitEnabled) -{ +XS(XS_Client_AutoSplitEnabled) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::AutoSplitEnabled(THIS)"); { - Client * THIS; - bool RETVAL; + Client *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->AutoSplitEnabled(); @@ -2917,22 +2784,20 @@ XS(XS_Client_AutoSplitEnabled) } XS(XS_Client_SetHorseId); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetHorseId) -{ +XS(XS_Client_SetHorseId) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::SetHorseId(THIS, horseid_in)"); { - Client * THIS; - uint16 horseid_in = (uint16)SvUV(ST(1)); + Client *THIS; + uint16 horseid_in = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetHorseId(horseid_in); @@ -2941,27 +2806,26 @@ XS(XS_Client_SetHorseId) } XS(XS_Client_GetHorseId); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetHorseId) -{ +XS(XS_Client_GetHorseId) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetHorseId(THIS)"); { - Client * THIS; - uint16 RETVAL; + Client *THIS; + uint16 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetHorseId(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } @@ -3047,21 +2911,19 @@ XS(XS_Client_SetMaterial) { } XS(XS_Client_Undye); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_Undye) -{ +XS(XS_Client_Undye) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::Undye(THIS)"); { - Client * THIS; + Client *THIS; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->Undye(); @@ -3070,56 +2932,54 @@ XS(XS_Client_Undye) } XS(XS_Client_GetItemIDAt); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetItemIDAt) -{ +XS(XS_Client_GetItemIDAt) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::GetItemIDAt(THIS, int16 slot_id)"); { - Client * THIS; - int32 RETVAL; + Client *THIS; + int32 RETVAL; dXSTARG; - int16 slot_id = (int16)SvIV(ST(1)); + int16 slot_id = (int16) SvIV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetItemIDAt(slot_id); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetAugmentIDAt); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetAugmentIDAt) -{ +XS(XS_Client_GetAugmentIDAt) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Client::GetAugmentIDAt(THIS, int16 slot_id, int16 aug_slot)"); { - Client * THIS; - int32 RETVAL; + Client *THIS; + int32 RETVAL; dXSTARG; - int16 slot_id = (int16)SvIV(ST(1)); - int16 augslot = (uint8)SvIV(ST(2)); + int16 slot_id = (int16) SvIV(ST(1)); + int16 augslot = (uint8) SvIV(ST(2)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetAugmentIDAt(slot_id, augslot); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } @@ -3162,55 +3022,54 @@ XS(XS_Client_DeleteItemInInventory) { } XS(XS_Client_SummonItem); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SummonItem) -{ +XS(XS_Client_SummonItem) { dXSARGS; if (items < 2 || items > 10) - Perl_croak(aTHX_ "Usage: Client::SummonItem(THIS, uint32 item_id, [int16 charges = -1], [bool attune = false], [uint32 aug1 = 0], [uint32 aug2 = 0], [uint32 aug3 = 0], [uint32 aug4 = 0], [uint32 aug5 = 0], [uint16 slot_id = 30])"); + Perl_croak(aTHX_ + "Usage: Client::SummonItem(THIS, uint32 item_id, [int16 charges = -1], [bool attune = false], [uint32 aug1 = 0], [uint32 aug2 = 0], [uint32 aug3 = 0], [uint32 aug4 = 0], [uint32 aug5 = 0], [uint16 slot_id = 30])"); { - Client * THIS; - uint32 item_id = (uint32)SvUV(ST(1)); - int16 charges = -1; - bool attune = false; - uint32 aug1 = 0; - uint32 aug2 = 0; - uint32 aug3 = 0; - uint32 aug4 = 0; - uint32 aug5 = 0; - uint16 slot_id = 30; + Client *THIS; + uint32 item_id = (uint32) SvUV(ST(1)); + int16 charges = -1; + bool attune = false; + uint32 aug1 = 0; + uint32 aug2 = 0; + uint32 aug3 = 0; + uint32 aug4 = 0; + uint32 aug5 = 0; + uint16 slot_id = 30; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items > 2) { - charges = (int16)SvIV(ST(2)); + charges = (int16) SvIV(ST(2)); } if (items > 3) { - attune = (bool)SvTRUE(ST(3)); + attune = (bool) SvTRUE(ST(3)); } if (items > 4) { - aug1 = (uint32)SvUV(ST(4)); + aug1 = (uint32) SvUV(ST(4)); } if (items > 5) { - aug2 = (uint32)SvUV(ST(5)); + aug2 = (uint32) SvUV(ST(5)); } if (items > 6) { - aug3 = (uint32)SvUV(ST(6)); + aug3 = (uint32) SvUV(ST(6)); } if (items > 7) { - aug4 = (uint32)SvUV(ST(7)); + aug4 = (uint32) SvUV(ST(7)); } if (items > 8) { - aug5 = (uint32)SvUV(ST(8)); + aug5 = (uint32) SvUV(ST(8)); } if (items > 9) { - slot_id = (uint16)SvUV(ST(9)); + slot_id = (uint16) SvUV(ST(9)); } THIS->SummonItem(item_id, charges, aug1, aug2, aug3, aug4, aug5, 0, attune, slot_id); @@ -3219,23 +3078,21 @@ XS(XS_Client_SummonItem) } XS(XS_Client_SetStats); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetStats) -{ +XS(XS_Client_SetStats) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Client::SetStats(THIS, uint8 type, uint16 increase_val)"); { - Client * THIS; - uint8 type = (uint8)SvUV(ST(1)); - int16 increase_val = (int16)SvIV(ST(2)); + Client *THIS; + uint8 type = (uint8) SvUV(ST(1)); + int16 increase_val = (int16) SvIV(ST(2)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetStats(type, increase_val); @@ -3244,23 +3101,21 @@ XS(XS_Client_SetStats) } XS(XS_Client_IncStats); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_IncStats) -{ +XS(XS_Client_IncStats) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Client::IncStats(THIS, uint8 type, uint16 increase_val)"); { - Client * THIS; - uint8 type = (uint8)SvUV(ST(1)); - int16 increase_val = (int16)SvIV(ST(2)); + Client *THIS; + uint8 type = (uint8) SvUV(ST(1)); + int16 increase_val = (int16) SvIV(ST(2)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->IncStats(type, increase_val); @@ -3269,22 +3124,20 @@ XS(XS_Client_IncStats) } XS(XS_Client_DropItem); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_DropItem) -{ +XS(XS_Client_DropItem) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::DropItem(THIS, int16 slot_id)"); { - Client * THIS; - int16 slot_id = (int16)SvIV(ST(1)); + Client *THIS; + int16 slot_id = (int16) SvIV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->DropItem(slot_id); @@ -3293,21 +3146,19 @@ XS(XS_Client_DropItem) } XS(XS_Client_BreakInvis); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_BreakInvis) -{ +XS(XS_Client_BreakInvis) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::BreakInvis(THIS)"); { - Client * THIS; + Client *THIS; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->BreakInvis(); @@ -3316,47 +3167,43 @@ XS(XS_Client_BreakInvis) } XS(XS_Client_GetGroup); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetGroup) -{ +XS(XS_Client_GetGroup) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetGroup(THIS)"); { - Client * THIS; - Group * RETVAL; + Client *THIS; + Group *RETVAL; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetGroup(); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Group", (void*)RETVAL); + sv_setref_pv(ST(0), "Group", (void *) RETVAL); } XSRETURN(1); } XS(XS_Client_LeaveGroup); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_LeaveGroup) -{ +XS(XS_Client_LeaveGroup) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::LeaveGroup(THIS)"); { - Client * THIS; + Client *THIS; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->LeaveGroup(); @@ -3365,48 +3212,44 @@ XS(XS_Client_LeaveGroup) } XS(XS_Client_GetRaid); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetRaid) -{ +XS(XS_Client_GetRaid) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetRaid(THIS)"); { - Client * THIS; - Raid * RETVAL; + Client *THIS; + Raid *RETVAL; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetRaid(); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Raid", (void*)RETVAL); + sv_setref_pv(ST(0), "Raid", (void *) RETVAL); } XSRETURN(1); } XS(XS_Client_IsGrouped); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_IsGrouped) -{ +XS(XS_Client_IsGrouped) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::IsGrouped(THIS)"); { - Client * THIS; - bool RETVAL; + Client *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsGrouped(); @@ -3417,22 +3260,20 @@ XS(XS_Client_IsGrouped) } XS(XS_Client_IsRaidGrouped); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_IsRaidGrouped) -{ +XS(XS_Client_IsRaidGrouped) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::IsRaidGrouped(THIS)"); { - Client * THIS; - bool RETVAL; + Client *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsRaidGrouped(); @@ -3443,22 +3284,20 @@ XS(XS_Client_IsRaidGrouped) } XS(XS_Client_Hungry); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_Hungry) -{ +XS(XS_Client_Hungry) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::Hungry(THIS)"); { - Client * THIS; - bool RETVAL; + Client *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->Hungry(); @@ -3469,22 +3308,20 @@ XS(XS_Client_Hungry) } XS(XS_Client_Thirsty); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_Thirsty) -{ +XS(XS_Client_Thirsty) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::Thirsty(THIS)"); { - Client * THIS; - bool RETVAL; + Client *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->Thirsty(); @@ -3495,103 +3332,97 @@ XS(XS_Client_Thirsty) } XS(XS_Client_GetInstrumentMod); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetInstrumentMod) -{ +XS(XS_Client_GetInstrumentMod) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::GetInstrumentMod(THIS, uint16 spell_id)"); { - Client * THIS; - uint16 RETVAL; + Client *THIS; + uint16 RETVAL; dXSTARG; - uint16 spell_id = (uint16)SvUV(ST(1)); + uint16 spell_id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetInstrumentMod(spell_id); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_DecreaseByID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_DecreaseByID) -{ +XS(XS_Client_DecreaseByID) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Client::DecreaseByID(THIS, uint32 type, unit8 amount)"); { - Client * THIS; - bool RETVAL; - uint32 type = (uint32)SvUV(ST(1)); - uint8 amt = (uint8)SvUV(ST(2)); + Client *THIS; + bool RETVAL; + uint32 type = (uint32) SvUV(ST(1)); + uint8 amt = (uint8) SvUV(ST(2)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->DecreaseByID(type, amt); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Client_SlotConvert2); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SlotConvert2) -{ +XS(XS_Client_SlotConvert2) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::SlotConvert2(THIS, uint8 slot)"); { - Client * THIS; - uint8 RETVAL; + Client *THIS; + uint8 RETVAL; dXSTARG; - uint8 slot = (uint8)SvUV(ST(1)); + uint8 slot = (uint8) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->SlotConvert2(slot); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_Escape); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_Escape) -{ +XS(XS_Client_Escape) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::Escape(THIS)"); { - Client * THIS; + Client *THIS; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->Escape(); @@ -3600,21 +3431,19 @@ XS(XS_Client_Escape) } XS(XS_Client_RemoveNoRent); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_RemoveNoRent) -{ +XS(XS_Client_RemoveNoRent) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::RemoveNoRent(THIS)"); { - Client * THIS; + Client *THIS; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->RemoveNoRent(); @@ -3623,21 +3452,19 @@ XS(XS_Client_RemoveNoRent) } XS(XS_Client_GoFish); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GoFish) -{ +XS(XS_Client_GoFish) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GoFish(THIS)"); { - Client * THIS; + Client *THIS; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->GoFish(); @@ -3646,21 +3473,19 @@ XS(XS_Client_GoFish) } XS(XS_Client_ForageItem); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_ForageItem) -{ +XS(XS_Client_ForageItem) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::ForageItem(THIS)"); { - Client * THIS; + Client *THIS; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->ForageItem(); @@ -3675,10 +3500,10 @@ XS(XS_Client_CalcPriceMod) { Perl_croak(aTHX_ "Usage: Client::CalcPriceMod(THIS, Mob*, [bool reverse = false])"); { Client *THIS; - float RETVAL; + float RETVAL; dXSTARG; - Mob *other; - bool reverse; + Mob *other; + bool reverse; if (sv_derived_from(ST(0), "Client")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -3767,9 +3592,9 @@ XS(XS_Client_GetCharacterFactionLevel) { Perl_croak(aTHX_ "Usage: Client::GetCharacterFactionLevel(THIS, int32 faction_id)"); { Client *THIS; - int32 RETVAL; + int32 RETVAL; dXSTARG; - int32 faction_id = (int32) SvIV(ST(1)); + int32 faction_id = (int32) SvIV(ST(1)); if (sv_derived_from(ST(0), "Client")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -3831,58 +3656,53 @@ XS(XS_Client_ClearZoneFlag) { } XS(XS_Client_HasZoneFlag); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_HasZoneFlag) -{ +XS(XS_Client_HasZoneFlag) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::HasZoneFlag(THIS, uint32 zone_id)"); { - Client * THIS; - bool RETVAL; - uint32 zone_id = (uint32)SvUV(ST(1)); + Client *THIS; + bool RETVAL; + uint32 zone_id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->HasZoneFlag(zone_id); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Client_SendZoneFlagInfo); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SendZoneFlagInfo) -{ +XS(XS_Client_SendZoneFlagInfo) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::SendZoneFlagInfo(THIS, Client* to)"); { - Client * THIS; - Client * to; + Client *THIS; + Client *to; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - to = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + to = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "to is not of type Client"); - if(to == nullptr) + if (to == nullptr) Perl_croak(aTHX_ "to is nullptr, avoiding crash."); THIS->SendZoneFlagInfo(to); @@ -3891,21 +3711,19 @@ XS(XS_Client_SendZoneFlagInfo) } XS(XS_Client_LoadZoneFlags); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_LoadZoneFlags) -{ +XS(XS_Client_LoadZoneFlags) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::LoadZoneFlags(THIS)"); { - Client * THIS; + Client *THIS; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->LoadZoneFlags(); @@ -3914,32 +3732,30 @@ XS(XS_Client_LoadZoneFlags) } XS(XS_Client_SetAATitle); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetAATitle) -{ +XS(XS_Client_SetAATitle) { dXSARGS; if ((items < 2) || (items > 3)) Perl_croak(aTHX_ "Usage: Client::SetAATitle(THIS, string text, [bool save = false])"); { - Client * THIS; - char * txt = (char *)SvPV_nolen(ST(1)); + Client *THIS; + char *txt = (char *) SvPV_nolen(ST(1)); bool SaveTitle = false; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - if(strlen(txt) > 31) + if (strlen(txt) > 31) Perl_croak(aTHX_ "Title must be 31 characters or less"); - if(items == 3) + if (items == 3) SaveTitle = (SvIV(ST(2)) != 0); - if(!SaveTitle) + if (!SaveTitle) THIS->SetAATitle(txt); else title_manager.CreateNewPlayerTitle(THIS, txt); @@ -3948,53 +3764,51 @@ XS(XS_Client_SetAATitle) } XS(XS_Client_GetClientVersion); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetClientVersion) -{ +XS(XS_Client_GetClientVersion) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetClientVersion(THIS)"); { - Client * THIS; - uint32 RETVAL; + Client *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = static_cast(THIS->ClientVersion()); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetClientVersionBit); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetClientVersionBit) -{ +XS(XS_Client_GetClientVersionBit) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetClientVersionBit(THIS)"); { - Client * THIS; - uint32 RETVAL; + Client *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->ClientVersionBit(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } @@ -4005,26 +3819,25 @@ XS(XS_Client_SetTitleSuffix) { if ((items < 2) || (items > 3)) Perl_croak(aTHX_ "Usage: Client::SetTitleSuffix(THIS, string text, [bool save = false])"); { - Client * THIS; - char * txt = (char *)SvPV_nolen(ST(1)); + Client *THIS; + char *txt = (char *) SvPV_nolen(ST(1)); bool SaveSuffix = false; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - if(strlen(txt) > 31) + if (strlen(txt) > 31) Perl_croak(aTHX_ "Title must be 31 characters or less"); - if(items == 3) + if (items == 3) SaveSuffix = (SvIV(ST(2)) != 0); - if(!SaveSuffix) + if (!SaveSuffix) THIS->SetTitleSuffix(txt); else title_manager.CreateNewPlayerSuffix(THIS, txt); @@ -4035,19 +3848,18 @@ XS(XS_Client_SetTitleSuffix) { XS(XS_Client_SetAAPoints); XS(XS_Client_SetAAPoints) { dXSARGS; - if(items != 2) + if (items != 2) Perl_croak(aTHX_ "Usage: Client::SetAAPoints(THIS, uint32 points)"); { - Client * THIS; + Client *THIS; uint32 points = SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetAAPoints(points); @@ -4058,24 +3870,24 @@ XS(XS_Client_SetAAPoints) { XS(XS_Client_GetAAPoints); XS(XS_Client_GetAAPoints) { dXSARGS; - if(items != 1) + if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetAAPoints(THIS)"); dXSTARG; { - Client * THIS; + Client *THIS; uint32 RETVAL; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetAAPoints(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } @@ -4083,24 +3895,24 @@ XS(XS_Client_GetAAPoints) { XS(XS_Client_GetSpentAA); XS(XS_Client_GetSpentAA) { dXSARGS; - if(items != 1) + if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetSpentAA(THIS)"); dXSTARG; { - Client * THIS; + Client *THIS; uint32 RETVAL; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSpentAA(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } @@ -4108,19 +3920,18 @@ XS(XS_Client_GetSpentAA) { XS(XS_Client_AddAAPoints); XS(XS_Client_AddAAPoints) { dXSARGS; - if(items != 2) + if (items != 2) Perl_croak(aTHX_ "Usage: Client::AddAAPoints(THIS, uint32 points)"); { - Client * THIS; + Client *THIS; uint32 points = SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->AddAAPoints(points); @@ -4131,18 +3942,17 @@ XS(XS_Client_AddAAPoints) { XS(XS_Client_RefundAA); XS(XS_Client_RefundAA) { dXSARGS; - if(items != 1) + if (items != 1) Perl_croak(aTHX_ "Usage: Client::RefundAA(THIS)"); { - Client * THIS; + Client *THIS; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->RefundAA(); @@ -4151,278 +3961,262 @@ XS(XS_Client_RefundAA) { } XS(XS_Client_GetModCharacterFactionLevel); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetModCharacterFactionLevel) -{ +XS(XS_Client_GetModCharacterFactionLevel) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::GetModCharacterFactionLevel(THIS, int32 faction_id)"); { - Client * THIS; - int32 RETVAL; + Client *THIS; + int32 RETVAL; dXSTARG; - int32 faction_id = (int32)SvIV(ST(1)); + int32 faction_id = (int32) SvIV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetModCharacterFactionLevel(faction_id); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetLDoNWins); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetLDoNWins) -{ +XS(XS_Client_GetLDoNWins) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetLDoNWins(THIS)"); { - Client * THIS; - uint32 RETVAL; + Client *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetLDoNWins(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetLDoNLosses); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetLDoNLosses) -{ +XS(XS_Client_GetLDoNLosses) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetLDoNLosses(THIS)"); { - Client * THIS; - uint32 RETVAL; + Client *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetLDoNLosses(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetLDoNWinsTheme); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetLDoNWinsTheme) -{ +XS(XS_Client_GetLDoNWinsTheme) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::GetLDoNWinsTheme(THIS, int32 theme)"); { - Client * THIS; - uint32 RETVAL; + Client *THIS; + uint32 RETVAL; dXSTARG; - int32 theme_out = (int32)SvIV(ST(1)); + int32 theme_out = (int32) SvIV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetLDoNWinsTheme(theme_out); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetLDoNLossesTheme); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetLDoNLossesTheme) -{ +XS(XS_Client_GetLDoNLossesTheme) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::GetLDoNLossesTheme(THIS, int32 theme)"); { - Client * THIS; - uint32 RETVAL; + Client *THIS; + uint32 RETVAL; dXSTARG; - int32 theme_out = (int32)SvIV(ST(1)); + int32 theme_out = (int32) SvIV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetLDoNLossesTheme(theme_out); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetItemAt); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetItemAt) -{ +XS(XS_Client_GetItemAt) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::GetItemAt(THIS, uint32 slot)"); { - Client * THIS; - EQEmu::ItemInstance * RETVAL; - uint32 slot = (int32)SvIV(ST(1)); + Client *THIS; + EQEmu::ItemInstance *RETVAL; + uint32 slot = (int32) SvIV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetInv().GetItem(slot); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "QuestItem", (void*)RETVAL); + sv_setref_pv(ST(0), "QuestItem", (void *) RETVAL); } XSRETURN(1); } XS(XS_Client_GetAugmentAt); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetAugmentAt) -{ +XS(XS_Client_GetAugmentAt) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Client::GetAugmentAt(THIS, uint32 slot, uint32 aug_slot)"); { - Client * THIS; - EQEmu::ItemInstance * RETVAL; - uint32 slot = (int32)SvIV(ST(1)); - uint32 aug_slot = (int32)SvIV(ST(1)); + Client *THIS; + EQEmu::ItemInstance *RETVAL; + uint32 slot = (int32) SvIV(ST(1)); + uint32 aug_slot = (int32) SvIV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - EQEmu::ItemInstance * inst = THIS->GetInv().GetItem(slot); - if(inst) - { + EQEmu::ItemInstance *inst = THIS->GetInv().GetItem(slot); + if (inst) { RETVAL = inst->GetAugment(aug_slot); - } - else - { + } else { RETVAL = nullptr; } ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "QuestItem", (void*)RETVAL); + sv_setref_pv(ST(0), "QuestItem", (void *) RETVAL); } XSRETURN(1); } XS(XS_Client_GetStartZone); -XS(XS_Client_GetStartZone) -{ +XS(XS_Client_GetStartZone) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetStartZone(THIS)"); { - Client * THIS; - uint32 RETVAL; + Client *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetStartZone(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_SetStartZone); -XS(XS_Client_SetStartZone) -{ +XS(XS_Client_SetStartZone) { dXSARGS; if (items != 2 && items != 5) - Perl_croak(aTHX_ "Usage: Client::SetStartZone(THIS, uint32 zone_id, [float x = 0], [float y = 0], [float z = 0])"); + Perl_croak(aTHX_ + "Usage: Client::SetStartZone(THIS, uint32 zone_id, [float x = 0], [float y = 0], [float z = 0])"); { - Client * THIS; - uint32 zoneid = (uint32)SvUV(ST(1)); - float x = 0; - float y = 0; - float z = 0; + Client *THIS; + uint32 zoneid = (uint32) SvUV(ST(1)); + float x = 0; + float y = 0; + float z = 0; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - if(items == 5) { + if (items == 5) { x = SvNV(ST(2)); y = SvNV(ST(3)); z = SvNV(ST(4)); } - THIS->SetStartZone(zoneid,x,y,z); + THIS->SetStartZone(zoneid, x, y, z); } XSRETURN_EMPTY; } XS(XS_Client_KeyRingAdd); -XS(XS_Client_KeyRingAdd) -{ +XS(XS_Client_KeyRingAdd) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::KeyRingAdd(THIS, uint32 item_id)"); { - Client * THIS; - uint32 item_id = (uint32)SvUV(ST(1)); + Client *THIS; + uint32 item_id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->KeyRingAdd(item_id);; @@ -4431,49 +4225,45 @@ XS(XS_Client_KeyRingAdd) } XS(XS_Client_KeyRingCheck); -XS(XS_Client_KeyRingCheck) -{ +XS(XS_Client_KeyRingCheck) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::KeyRingCheck(THIS, uint32 item_id)"); { - Client * THIS; - bool RETVAL; - uint32 item_id = (uint32)SvUV(ST(1)); + Client *THIS; + bool RETVAL; + uint32 item_id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->KeyRingCheck(item_id);; - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Client_AddPVPPoints); -XS(XS_Client_AddPVPPoints) -{ +XS(XS_Client_AddPVPPoints) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::AddPVPPoints(THIS, uint32 points)"); { - Client * THIS; - uint32 Points = (uint32)SvUV(ST(1)); + Client *THIS; + uint32 Points = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->AddPVPPoints(Points); @@ -4482,23 +4272,21 @@ XS(XS_Client_AddPVPPoints) } XS(XS_Client_AddCrystals); -XS(XS_Client_AddCrystals) -{ +XS(XS_Client_AddCrystals) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Client::AddCrystals(THIS, uint32 radiant_count, uint32 ebon_count)"); { - Client * THIS; - uint32 Radiant = (uint32)SvUV(ST(1)); - uint32 Ebon = (uint32)SvUV(ST(2)); + Client *THIS; + uint32 Radiant = (uint32) SvUV(ST(1)); + uint32 Ebon = (uint32) SvUV(ST(2)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->AddCrystals(Radiant, Ebon); @@ -4507,126 +4295,119 @@ XS(XS_Client_AddCrystals) } XS(XS_Client_GetPVPPoints); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetPVPPoints) -{ +XS(XS_Client_GetPVPPoints) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetPVPPoints(THIS)"); { - Client * THIS; - uint32 RETVAL; + Client *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetPVPPoints(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetRadiantCrystals); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetRadiantCrystals) -{ +XS(XS_Client_GetRadiantCrystals) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetRadiantCrystals(THIS)"); { - Client * THIS; - uint32 RETVAL; + Client *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetRadiantCrystals(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetEbonCrystals); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetEbonCrystals) -{ +XS(XS_Client_GetEbonCrystals) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetEbonCrystals(THIS)"); { - Client * THIS; - uint32 RETVAL; + Client *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetEbonCrystals(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_ReadBook); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_ReadBook) -{ +XS(XS_Client_ReadBook) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Client::ReadBook(THIS, char* book_test, uint8 type)"); { - Client * THIS; - char* in_txt = (char *)SvPV_nolen(ST(1)); - uint8 type = (uint8)SvUV(ST(2)); + Client *THIS; + char *in_txt = (char *) SvPV_nolen(ST(1)); + uint8 type = (uint8) SvUV(ST(2)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - THIS->QuestReadBook(in_txt, type); + THIS->QuestReadBook(in_txt, type); } -XSRETURN_EMPTY; + XSRETURN_EMPTY; } XS(XS_Client_UpdateGroupAAs); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_UpdateGroupAAs) -{ +XS(XS_Client_UpdateGroupAAs) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Client::UpdateGroupAAs(THIS, int32 points, uint32 type)"); { - Client * THIS; - int32 points = (int32)SvIV(ST(1)); - uint32 type = (uint32)SvUV(ST(2)); + Client *THIS; + int32 points = (int32) SvIV(ST(1)); + uint32 type = (uint32) SvUV(ST(2)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->UpdateGroupAAs(points, type); @@ -4635,74 +4416,70 @@ XS(XS_Client_UpdateGroupAAs) } XS(XS_Client_GetGroupPoints); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetGroupPoints) -{ +XS(XS_Client_GetGroupPoints) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetGroupPoints(THIS)"); { - Client * THIS; - uint32 RETVAL; + Client *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetGroupPoints(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetRaidPoints); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetRaidPoints) -{ +XS(XS_Client_GetRaidPoints) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetRaidPoints(THIS)"); { - Client * THIS; - uint32 RETVAL; + Client *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetRaidPoints(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_LearnRecipe); -XS(XS_Client_LearnRecipe) -{ +XS(XS_Client_LearnRecipe) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::LearnRecipe(THIS, uint32 recipe_id)"); { - Client * THIS; - uint32 recipe_id = (uint32)SvUV(ST(1)); + Client *THIS; + uint32 recipe_id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->LearnRecipe(recipe_id);; @@ -4711,100 +4488,95 @@ XS(XS_Client_LearnRecipe) } XS(XS_Client_GetEndurance); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetEndurance) -{ +XS(XS_Client_GetEndurance) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetEndurance(THIS)"); { - Client * THIS; - uint32 RETVAL; + Client *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetEndurance(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetMaxEndurance); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetMaxEndurance) -{ +XS(XS_Client_GetMaxEndurance) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetMaxEndurance(THIS)"); { - Client * THIS; - uint32 RETVAL; + Client *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetMaxEndurance(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetEnduranceRatio); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetEnduranceRatio) -{ +XS(XS_Client_GetEnduranceRatio) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetEnduranceRatio(THIS)"); { - Client * THIS; - uint8 RETVAL; + Client *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetEndurancePercent(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_SetEndurance); -XS(XS_Client_SetEndurance) -{ +XS(XS_Client_SetEndurance) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::SetEndurance(THIS, Endurance)"); { - Client * THIS; - int32 Endurance = (int32)SvUV(ST(1)); + Client *THIS; + int32 Endurance = (int32) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetEndurance(Endurance); @@ -4813,32 +4585,29 @@ XS(XS_Client_SetEndurance) } XS(XS_Client_SendOPTranslocateConfirm); -XS(XS_Client_SendOPTranslocateConfirm) -{ +XS(XS_Client_SendOPTranslocateConfirm) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Client::SendOPTranslocateConfirm(THIS, Mob* caster, int32 spell_id)"); { - Client * THIS; - Mob * caster = nullptr; - int32 spell_id = (int32)SvUV(ST(2)); + Client *THIS; + Mob *caster = nullptr; + int32 spell_id = (int32) SvUV(ST(2)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - caster = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + caster = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "caster is not of type Mob"); - if(caster == nullptr) + if (caster == nullptr) Perl_croak(aTHX_ "caster is nullptr, avoiding crash."); THIS->SendOPTranslocateConfirm(caster, spell_id); @@ -4847,37 +4616,34 @@ XS(XS_Client_SendOPTranslocateConfirm) } XS(XS_Client_NPCSpawn); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_NPCSpawn) -{ +XS(XS_Client_NPCSpawn) { dXSARGS; if (items < 3 || items > 4) Perl_croak(aTHX_ "Usage: Client::NPCSpawn(THIS, NPC*, string option, uint32 respawn_time=1200)"); { - Client * THIS; - NPC * target_npc = nullptr; - Const_char * option = (Const_char *)SvPV_nolen(ST(2)); - uint32 respawntime = 1200; + Client *THIS; + NPC *target_npc = nullptr; + Const_char *option = (Const_char *) SvPV_nolen(ST(2)); + uint32 respawntime = 1200; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - target_npc = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + target_npc = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(target_npc == nullptr) + if (target_npc == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items > 3) - respawntime = (uint32)SvUV(ST(3)); + respawntime = (uint32) SvUV(ST(3)); THIS->NPCSpawn(target_npc, option, respawntime); } @@ -4885,53 +4651,50 @@ XS(XS_Client_NPCSpawn) } XS(XS_Client_GetIP); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetIP) -{ +XS(XS_Client_GetIP) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetIP(THIS)"); { - Client * THIS; - uint32 RETVAL; + Client *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetIP(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_AddLevelBasedExp); -XS(XS_Client_AddLevelBasedExp) -{ +XS(XS_Client_AddLevelBasedExp) { dXSARGS; - if (items < 2 || items > 3 ) + if (items < 2 || items > 3) Perl_croak(aTHX_ "Usage: Client::AddLevelBasedExp(THIS, uint8 exp_percentage, uint8 max_level = 0)"); { - Client * THIS; - uint8 exp_percentage = (uint8)SvUV(ST(1)); - uint8 max_level = 0; + Client *THIS; + uint8 exp_percentage = (uint8) SvUV(ST(1)); + uint8 max_level = 0; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items > 2) - max_level = (uint8)SvUV(ST(2)); + max_level = (uint8) SvUV(ST(2)); THIS->AddLevelBasedExp(exp_percentage, max_level); } @@ -4939,22 +4702,20 @@ XS(XS_Client_AddLevelBasedExp) } XS(XS_Client_IncrementAA); -XS(XS_Client_IncrementAA) -{ +XS(XS_Client_IncrementAA) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::IncrementAA(THIS, uint32 aa_skill_id)"); { - Client * THIS; - uint32 aaskillid = SvUV(ST(1)); + Client *THIS; + uint32 aaskillid = SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->IncrementAlternateAdvancementRank(aaskillid); @@ -4963,197 +4724,188 @@ XS(XS_Client_IncrementAA) } XS(XS_Client_GrantAlternateAdvancementAbility); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GrantAlternateAdvancementAbility) -{ +XS(XS_Client_GrantAlternateAdvancementAbility) { dXSARGS; - if(items < 3 || items > 4) - Perl_croak(aTHX_ "Usage: Client::GrantAlternateAdvancementAbility(THIS, int aa_id, int points, [bool ignore_cost = false])"); + if (items < 3 || items > 4) + Perl_croak(aTHX_ + "Usage: Client::GrantAlternateAdvancementAbility(THIS, int aa_id, int points, [bool ignore_cost = false])"); { - Client * THIS; - bool RETVAL; - int aa_id = (int)SvIV(ST(1)); - int points = (int)SvIV(ST(2)); - bool ignore_cost = false; + Client *THIS; + bool RETVAL; + int aa_id = (int) SvIV(ST(1)); + int points = (int) SvIV(ST(2)); + bool ignore_cost = false; - if(sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + if (sv_derived_from(ST(0), "Client")) { + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Client *, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - if(items > 3) { - ignore_cost = (bool)SvTRUE(ST(3)); + if (items > 3) { + ignore_cost = (bool) SvTRUE(ST(3)); } RETVAL = THIS->GrantAlternateAdvancementAbility(aa_id, points, ignore_cost); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Client_GetAALevel); -XS(XS_Client_GetAALevel) -{ +XS(XS_Client_GetAALevel) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::GetAALevel(THIS, uint32 aa_skill_id)"); { - Client * THIS; - uint32 RETVAL; + Client *THIS; + uint32 RETVAL; dXSTARG; - uint32 aaskillid = SvUV(ST(1)); + uint32 aaskillid = SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetAA(aaskillid); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_MarkCompassLoc); -XS(XS_Client_MarkCompassLoc) -{ +XS(XS_Client_MarkCompassLoc) { dXSARGS; if (items != 4) Perl_croak(aTHX_ "Usage: Client::MarkCompassLoc(THIS, float x, float y, float z)"); { - Client * THIS; - float x = SvNV(ST(1)); - float y = SvNV(ST(2)); - float z = SvNV(ST(3)); + Client *THIS; + float x = SvNV(ST(1)); + float y = SvNV(ST(2)); + float z = SvNV(ST(3)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - THIS->MarkSingleCompassLoc(x,y,z); + THIS->MarkSingleCompassLoc(x, y, z); } XSRETURN_EMPTY; } XS(XS_Client_ClearCompassMark); -XS(XS_Client_ClearCompassMark) -{ +XS(XS_Client_ClearCompassMark) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::ClearCompassMark(THIS)"); { - Client * THIS; + Client *THIS; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - THIS->MarkSingleCompassLoc(0,0,0,0); + THIS->MarkSingleCompassLoc(0, 0, 0, 0); } XSRETURN_EMPTY; } XS(XS_Client_GetFreeSpellBookSlot); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetFreeSpellBookSlot) -{ +XS(XS_Client_GetFreeSpellBookSlot) { dXSARGS; if (items < 1 || items > 2) Perl_croak(aTHX_ "Usage: Client::GetFreeSpellBookSlot(THIS, uint32 start_slot = 0)"); { - Client * THIS; - int RETVAL; - uint32 start_slot = 0; + Client *THIS; + int RETVAL; + uint32 start_slot = 0; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items > 1) start_slot = SvUV(ST(1)); RETVAL = THIS->GetNextAvailableSpellBookSlot(start_slot); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetSpellBookSlotBySpellID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetSpellBookSlotBySpellID) -{ +XS(XS_Client_GetSpellBookSlotBySpellID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::GetSpellBookSlotBySpellID(THIS, uint32 spell_id)"); { - Client * THIS; - int RETVAL; - uint32 spell_id = SvUV(ST(1)); + Client *THIS; + int RETVAL; + uint32 spell_id = SvUV(ST(1)); dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->FindSpellBookSlotBySpellID(spell_id); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Client_UpdateTaskActivity); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_UpdateTaskActivity) -{ +XS(XS_Client_UpdateTaskActivity) { dXSARGS; if (items < 4) - Perl_croak(aTHX_ "Usage: Client::UpdateTaskActivity(THIS, int task_id, int activity_id, int count, [bool ignore_quest_update = false])"); + Perl_croak(aTHX_ + "Usage: Client::UpdateTaskActivity(THIS, int task_id, int activity_id, int count, [bool ignore_quest_update = false])"); { bool ignore_quest_update = false; - Client * THIS; + Client *THIS; - int TaskID = (int)SvIV(ST(1)); - int ActivityID = (int)SvIV(ST(2)); - int Count = (int)SvUV(ST(3)); + int TaskID = (int) SvIV(ST(1)); + int ActivityID = (int) SvIV(ST(2)); + int Count = (int) SvUV(ST(3)); - if (items == 5){ - ignore_quest_update = (bool)SvTRUE(ST(4)); + if (items == 5) { + ignore_quest_update = (bool) SvTRUE(ST(4)); } if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->UpdateTaskActivity(TaskID, ActivityID, Count, ignore_quest_update); @@ -5162,59 +4914,55 @@ XS(XS_Client_UpdateTaskActivity) } XS(XS_Client_GetTaskActivityDoneCount); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetTaskActivityDoneCount) -{ +XS(XS_Client_GetTaskActivityDoneCount) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Client::GetTaskActivityDoneCount(THIS, int task_id, int activity_id)"); { - Client * THIS; - int RETVAL; - int TaskID = (int)SvIV(ST(1)); - int ActivityID = (int)SvIV(ST(2)); + Client *THIS; + int RETVAL; + int TaskID = (int) SvIV(ST(1)); + int ActivityID = (int) SvIV(ST(2)); dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Client *, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Client"); if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetTaskActivityDoneCountFromTaskID(TaskID, ActivityID); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Client_AssignTask); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_AssignTask) -{ +XS(XS_Client_AssignTask) { dXSARGS; if (items != 3 && items != 4) - Perl_croak(aTHX_ "Usage: Client::AssignTask(THIS, int task_id, int npc_id, [bool enforce_level_requirement = false])"); + Perl_croak(aTHX_ + "Usage: Client::AssignTask(THIS, int task_id, int npc_id, [bool enforce_level_requirement = false])"); { - Client * THIS; - int TaskID = (int)SvIV(ST(1)); - int NPCID = (int)SvIV(ST(2)); - bool enforce_level_requirement = false; - if (items == 4) - { - if ((int)SvIV(ST(3)) == 1) - { + Client *THIS; + int TaskID = (int) SvIV(ST(1)); + int NPCID = (int) SvIV(ST(2)); + bool enforce_level_requirement = false; + if (items == 4) { + if ((int) SvIV(ST(3)) == 1) { enforce_level_requirement = true; } } if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->AssignTask(TaskID, NPCID, enforce_level_requirement); @@ -5223,22 +4971,20 @@ XS(XS_Client_AssignTask) } XS(XS_Client_FailTask); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_FailTask) -{ +XS(XS_Client_FailTask) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::FailTask(THIS, int task_id)"); { - Client * THIS; - int TaskID = (int)SvIV(ST(1)); + Client *THIS; + int TaskID = (int) SvIV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->FailTask(TaskID); @@ -5247,185 +4993,174 @@ XS(XS_Client_FailTask) } XS(XS_Client_IsTaskCompleted); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_IsTaskCompleted) -{ +XS(XS_Client_IsTaskCompleted) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::IsTaskCompleted(THIS, int task_id)"); { - Client * THIS; - int RETVAL; - int TaskID = (int)SvIV(ST(1)); + Client *THIS; + int RETVAL; + int TaskID = (int) SvIV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsTaskCompleted(TaskID); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Client_IsTaskActive); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_IsTaskActive) -{ +XS(XS_Client_IsTaskActive) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::IsTaskActive(THIS, int task_id)"); { - Client * THIS; - bool RETVAL; - int TaskID = (int)SvIV(ST(1)); + Client *THIS; + bool RETVAL; + int TaskID = (int) SvIV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsTaskActive(TaskID); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Client_IsTaskActivityActive); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_IsTaskActivityActive) -{ +XS(XS_Client_IsTaskActivityActive) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Client::IsTaskActivityActive(THIS, int task_id, int activity_id)"); { - Client * THIS; - bool RETVAL; - int TaskID = (int)SvIV(ST(1)); - int ActivityID = (int)SvIV(ST(2)); + Client *THIS; + bool RETVAL; + int TaskID = (int) SvIV(ST(1)); + int ActivityID = (int) SvIV(ST(2)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsTaskActivityActive(TaskID, ActivityID); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Client_GetCorpseCount); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetCorpseCount) -{ +XS(XS_Client_GetCorpseCount) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetCorpseCount(THIS)"); { - Client * THIS; - uint32 RETVAL; + Client *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetCorpseCount(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetCorpseID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetCorpseID) -{ +XS(XS_Client_GetCorpseID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::GetCorpseID(THIS, uint8 corpse)"); { - Client * THIS; - uint8 corpse = (uint8)SvIV(ST(1)); - uint32 RETVAL; + Client *THIS; + uint8 corpse = (uint8) SvIV(ST(1)); + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetCorpseID(corpse); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetCorpseItemAt); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetCorpseItemAt) -{ +XS(XS_Client_GetCorpseItemAt) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Client::GetCorpseItemAt(THIS, uint32 corpse_id, uint16 slot_id)"); { - Client * THIS; - uint32 corpse_id = (uint32)SvIV(ST(1)); - uint16 slotid = (uint16)SvIV(ST(2)); - uint32 RETVAL; + Client *THIS; + uint32 corpse_id = (uint32) SvIV(ST(1)); + uint16 slotid = (uint16) SvIV(ST(2)); + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetCorpseItemAt(corpse_id, slotid); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Client_AssignToInstance); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_AssignToInstance) -{ +XS(XS_Client_AssignToInstance) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::AssignToInstance(THIS, uint16 instance_id)"); { - Client * THIS; - uint16 instance_id = (uint16)SvUV(ST(1)); + Client *THIS; + uint16 instance_id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->AssignToInstance(instance_id); @@ -5434,20 +5169,18 @@ XS(XS_Client_AssignToInstance) } XS(XS_Client_RemoveFromInstance); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_RemoveFromInstance) -{ +XS(XS_Client_RemoveFromInstance) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::RemoveFromInstance(THIS, uint16 instance_id)"); { - Client * THIS; - uint16 instance_id = (uint16)SvUV(ST(1)); + Client *THIS; + uint16 instance_id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Client *, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Client"); if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); @@ -5458,21 +5191,19 @@ XS(XS_Client_RemoveFromInstance) } XS(XS_Client_Freeze); -XS(XS_Client_Freeze) -{ +XS(XS_Client_Freeze) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client:Freeze(THIS)"); { - Client * THIS; + Client *THIS; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SendAppearancePacket(AT_Anim, ANIM_FREEZE); @@ -5481,21 +5212,19 @@ XS(XS_Client_Freeze) } XS(XS_Client_UnFreeze); -XS(XS_Client_UnFreeze) -{ +XS(XS_Client_UnFreeze) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client:UnFreeze(THIS)"); { - Client * THIS; + Client *THIS; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SendAppearancePacket(AT_Anim, ANIM_STAND); @@ -5505,132 +5234,125 @@ XS(XS_Client_UnFreeze) XS(XS_Client_GetAggroCount); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetAggroCount) -{ +XS(XS_Client_GetAggroCount) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetAggroCount(THIS)"); { - Client * THIS; - int RETVAL; + Client *THIS; + int RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetAggroCount(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetCarriedMoney); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetCarriedMoney) -{ +XS(XS_Client_GetCarriedMoney) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetCarriedMoney(THIS)"); { - Client * THIS; - int RETVAL; + Client *THIS; + int RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetCarriedMoney(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetAllMoney); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetAllMoney) -{ +XS(XS_Client_GetAllMoney) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetAllMoney(THIS)"); { - Client * THIS; - int RETVAL; + Client *THIS; + int RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetAllMoney(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Client_GetItemInInventory); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetItemInInventory) -{ +XS(XS_Client_GetItemInInventory) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::GetItemInInventory(THIS, int16 slot_id)"); { - Client * THIS; - int16 slot_id = (int16)SvIV(ST(1)); - EQEmu::ItemInstance *RETVAL = nullptr; + Client *THIS; + int16 slot_id = (int16) SvIV(ST(1)); + EQEmu::ItemInstance *RETVAL = nullptr; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetInv().GetItem(slot_id); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "QuestItem", (void*)RETVAL); + sv_setref_pv(ST(0), "QuestItem", (void *) RETVAL); } XSRETURN(1); } XS(XS_Client_SetCustomItemData); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetCustomItemData) -{ +XS(XS_Client_SetCustomItemData) { dXSARGS; if (items != 4) Perl_croak(aTHX_ "Usage: Client::SetCustomItemData(THIS, int16 slot_id, string identifier, string value)"); { - Client * THIS; - int16 slot_id = (int16)SvIV(ST(1)); - Const_char* identifier = SvPV_nolen(ST(2)); - Const_char* value = SvPV_nolen(ST(3)); + Client *THIS; + int16 slot_id = (int16) SvIV(ST(1)); + Const_char *identifier = SvPV_nolen(ST(2)); + Const_char *value = SvPV_nolen(ST(3)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->GetInv().SetCustomItemData(THIS->CharacterID(), slot_id, std::string(identifier), std::string(value)); @@ -5639,50 +5361,48 @@ XS(XS_Client_SetCustomItemData) } XS(XS_Client_GetCustomItemData); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetCustomItemData) -{ +XS(XS_Client_GetCustomItemData) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Client::GetCustomItemData(THIS, int16 slot_id, string identifier)"); { - Client * THIS; - int16 slot_id = (int16)SvIV(ST(1)); - Const_char* identifier = SvPV_nolen(ST(2)); - Const_char * RETVAL; + Client *THIS; + int16 slot_id = (int16) SvIV(ST(1)); + Const_char *identifier = SvPV_nolen(ST(2)); + Const_char *RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); std::string ret_val = THIS->GetInv().GetCustomItemData(slot_id, std::string(identifier)); RETVAL = ret_val.c_str(); - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; + sv_setpv(TARG, RETVAL); + XSprePUSH; + PUSHTARG; } XSRETURN(1); } XS(XS_Client_OpenLFGuildWindow); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_OpenLFGuildWindow) -{ +XS(XS_Client_OpenLFGuildWindow) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::OpenLFGuildWindow(THIS)"); { - Client * THIS; + Client *THIS; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->OpenLFGuildWindow(); @@ -5691,22 +5411,20 @@ XS(XS_Client_OpenLFGuildWindow) } XS(XS_Client_SignalClient); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SignalClient) -{ +XS(XS_Client_SignalClient) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Client::SignalClient(THIS, uint32 data)"); { - Client * THIS; - uint32 data = (uint32)SvUV(ST(1)); + Client *THIS; + uint32 data = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->Signal(data); @@ -5715,23 +5433,21 @@ XS(XS_Client_SignalClient) } XS(XS_Client_AddAlternateCurrencyValue); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_AddAlternateCurrencyValue) -{ +XS(XS_Client_AddAlternateCurrencyValue) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Client::AddAlternateCurrencyValue(THIS, uint32 currency_id, int32 amount)"); { - Client * THIS; - uint32 currency_id = (uint32)SvUV(ST(1)); - int32 amount = (int32)SvUV(ST(2)); + Client *THIS; + uint32 currency_id = (uint32) SvUV(ST(1)); + int32 amount = (int32) SvUV(ST(2)); if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->AddAlternateCurrencyValue(currency_id, amount); @@ -5740,25 +5456,23 @@ XS(XS_Client_AddAlternateCurrencyValue) } XS(XS_Client_SendWebLink); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SendWebLink) -{ +XS(XS_Client_SendWebLink) { dXSARGS; if (items < 1 || items > 2) Perl_croak(aTHX_ "Usage: Client::SendWebLink(THIS, string website_url)"); { - Client * THIS; - char * website = nullptr; + Client *THIS; + char *website = nullptr; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - if (items > 1) { website = (char *)SvPV_nolen(ST(1)); } + if (items > 1) { website = (char *) SvPV_nolen(ST(1)); } THIS->SendWebLink(website); } @@ -5766,316 +5480,298 @@ XS(XS_Client_SendWebLink) } XS(XS_Client_GetInstanceID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetInstanceID) -{ +XS(XS_Client_GetInstanceID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Client::GetInstanceID(THIS)"); { - Client * THIS; - int8 RETVAL; + Client *THIS; + int8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetInstanceID(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Client_HasSpellScribed); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_HasSpellScribed) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: Client::HasSpellScribed(THIS, int spell_id)"); - { - Client * THIS; - bool RETVAL; - int spell_id = (int)SvUV(ST(1)); +XS(XS_Client_HasSpellScribed) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: Client::HasSpellScribed(THIS, int spell_id)"); + { + Client *THIS; + bool RETVAL; + int spell_id = (int) SvUV(ST(1)); - if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else - Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == NULL) - Perl_croak(aTHX_ "THIS is NULL, avoiding crash."); + if (sv_derived_from(ST(0), "Client")) { + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else + Perl_croak(aTHX_ "THIS is not of type Client"); + if (THIS == NULL) + Perl_croak(aTHX_ "THIS is NULL, avoiding crash."); - RETVAL = THIS->HasSpellScribed(spell_id); - ST(0) = boolSV(RETVAL); - sv_2mortal(ST(0)); - } - XSRETURN(1); + RETVAL = THIS->HasSpellScribed(spell_id); + ST(0) = boolSV(RETVAL); + sv_2mortal(ST(0)); + } + XSRETURN(1); } XS(XS_Client_SetAccountFlag); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetAccountFlag) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: Client::SetAccountFlag(THIS, string flag, string value)"); - { - Client * THIS; - //char* flag = (char *)SvPV_nolen(ST(1)); - //char* value = (char *)SvTRUE(ST(2)); +XS(XS_Client_SetAccountFlag) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: Client::SetAccountFlag(THIS, string flag, string value)"); + { + Client *THIS; + //char* flag = (char *)SvPV_nolen(ST(1)); + //char* value = (char *)SvTRUE(ST(2)); - std::string flag( (char *)SvPV_nolen(ST(1)) ); - std::string value( (char *)SvTRUE(ST(2)) ); + std::string flag((char *) SvPV_nolen(ST(1))); + std::string value((char *) SvTRUE(ST(2))); - if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else - Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == NULL) - Perl_croak(aTHX_ "THIS is NULL, avoiding crash."); + if (sv_derived_from(ST(0), "Client")) { + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else + Perl_croak(aTHX_ "THIS is not of type Client"); + if (THIS == NULL) + Perl_croak(aTHX_ "THIS is NULL, avoiding crash."); - THIS->SetAccountFlag(flag, value); - } - XSRETURN_EMPTY; + THIS->SetAccountFlag(flag, value); + } + XSRETURN_EMPTY; } XS(XS_Client_GetAccountFlag); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetAccountFlag) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: Client::GetAccountFlag(THIS, string flag)"); - { - Client * THIS; - //char* flag = (char *)SvPV_nolen(ST(1)); - //char* value = (char *)SvTRUE(ST(2)); +XS(XS_Client_GetAccountFlag) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: Client::GetAccountFlag(THIS, string flag)"); + { + Client *THIS; + //char* flag = (char *)SvPV_nolen(ST(1)); + //char* value = (char *)SvTRUE(ST(2)); - std::string flag( (char *)SvPV_nolen(ST(1)) ); - dXSTARG; + std::string flag((char *) SvPV_nolen(ST(1))); + dXSTARG; - if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else - Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == NULL) - Perl_croak(aTHX_ "THIS is NULL, avoiding crash."); + if (sv_derived_from(ST(0), "Client")) { + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else + Perl_croak(aTHX_ "THIS is not of type Client"); + if (THIS == NULL) + Perl_croak(aTHX_ "THIS is NULL, avoiding crash."); - std::string value = THIS->GetAccountFlag(flag); + std::string value = THIS->GetAccountFlag(flag); - sv_setpv(TARG, value.c_str()); XSprePUSH; PUSHTARG; - } - XSRETURN(1); + sv_setpv(TARG, value.c_str()); + XSprePUSH; + PUSHTARG; + } + XSRETURN(1); } XS(XS_Client_GetHunger); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetHunger) -{ +XS(XS_Client_GetHunger) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: Client::GetHunger(THIS)"); - { - Client * THIS; - int32 RETVAL; - dXSTARG; + Perl_croak(aTHX_ "Usage: Client::GetHunger(THIS)"); + { + Client *THIS; + int32 RETVAL; + dXSTARG; - if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else - Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) - Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); + if (sv_derived_from(ST(0), "Client")) { + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else + Perl_croak(aTHX_ "THIS is not of type Client"); + if (THIS == nullptr) + Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - RETVAL = THIS->GetHunger(); - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); + RETVAL = THIS->GetHunger(); + XSprePUSH; + PUSHi((IV) RETVAL); + } + XSRETURN(1); } XS(XS_Client_GetThirst); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetThirst) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: Client::GetThirst(THIS)"); - { - Client * THIS; - int32 RETVAL; - dXSTARG; +XS(XS_Client_GetThirst) { + dXSARGS; + if (items != 1) + Perl_croak(aTHX_ "Usage: Client::GetThirst(THIS)"); + { + Client *THIS; + int32 RETVAL; + dXSTARG; - if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else - Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) - Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); + if (sv_derived_from(ST(0), "Client")) { + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else + Perl_croak(aTHX_ "THIS is not of type Client"); + if (THIS == nullptr) + Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - RETVAL = THIS->GetThirst(); - XSprePUSH; PUSHi((IV)RETVAL); - } - XSRETURN(1); + RETVAL = THIS->GetThirst(); + XSprePUSH; + PUSHi((IV) RETVAL); + } + XSRETURN(1); } XS(XS_Client_SetHunger); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetHunger) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: Client::SetHunger(THIS, in_hunger)"); - { - Client * THIS; - int32 in_hunger = (uint32)SvUV(ST(1)); +XS(XS_Client_SetHunger) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: Client::SetHunger(THIS, in_hunger)"); + { + Client *THIS; + int32 in_hunger = (uint32) SvUV(ST(1)); - if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else - Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) - Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); + if (sv_derived_from(ST(0), "Client")) { + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else + Perl_croak(aTHX_ "THIS is not of type Client"); + if (THIS == nullptr) + Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - THIS->SetHunger(in_hunger); - } - XSRETURN_EMPTY; + THIS->SetHunger(in_hunger); + } + XSRETURN_EMPTY; } XS(XS_Client_SetThirst); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetThirst) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: Client::SetThirst(THIS, int32 in_thirst)"); - { - Client * THIS; - int32 in_thirst = (uint32)SvUV(ST(1)); +XS(XS_Client_SetThirst) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: Client::SetThirst(THIS, int32 in_thirst)"); + { + Client *THIS; + int32 in_thirst = (uint32) SvUV(ST(1)); - if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else - Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) - Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); + if (sv_derived_from(ST(0), "Client")) { + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else + Perl_croak(aTHX_ "THIS is not of type Client"); + if (THIS == nullptr) + Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - THIS->SetThirst(in_thirst); - } - XSRETURN_EMPTY; + THIS->SetThirst(in_thirst); + } + XSRETURN_EMPTY; } XS(XS_Client_SendTargetCommand); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SendTargetCommand) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: Client::SendTargetCommand(THIS, int32 entity_id)"); - { - Client * THIS; - int32 in_entid = (uint32)SvUV(ST(1)); +XS(XS_Client_SendTargetCommand) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: Client::SendTargetCommand(THIS, int32 entity_id)"); + { + Client *THIS; + int32 in_entid = (uint32) SvUV(ST(1)); - if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else - Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) - Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); + if (sv_derived_from(ST(0), "Client")) { + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else + Perl_croak(aTHX_ "THIS is not of type Client"); + if (THIS == nullptr) + Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - THIS->SendTargetCommand(in_entid); - } - XSRETURN_EMPTY; + THIS->SendTargetCommand(in_entid); + } + XSRETURN_EMPTY; } XS(XS_Client_SetConsumption); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SetConsumption) -{ - dXSARGS; - if (items != 3) - Perl_croak(aTHX_ "Usage: Client::SetHunger(THIS, int32 hunger_amount, int32 thirst_amount)"); - { - Client * THIS; - int32 in_hunger = (uint32)SvUV(ST(1)); - int32 in_thirst = (uint32)SvUV(ST(2)); +XS(XS_Client_SetConsumption) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: Client::SetHunger(THIS, int32 hunger_amount, int32 thirst_amount)"); + { + Client *THIS; + int32 in_hunger = (uint32) SvUV(ST(1)); + int32 in_thirst = (uint32) SvUV(ST(2)); - if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else - Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) - Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); + if (sv_derived_from(ST(0), "Client")) { + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else + Perl_croak(aTHX_ "THIS is not of type Client"); + if (THIS == nullptr) + Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - THIS->SetConsumption(in_hunger, in_thirst); - } - XSRETURN_EMPTY; + THIS->SetConsumption(in_hunger, in_thirst); + } + XSRETURN_EMPTY; } XS(XS_Client_SilentMessage); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SilentMessage) -{ - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: Client::SilentMessage(THIS, string message)"); - { - Client * THIS; - dXSTARG; +XS(XS_Client_SilentMessage) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: Client::SilentMessage(THIS, string message)"); + { + Client *THIS; + dXSTARG; - if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else - Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == NULL) - Perl_croak(aTHX_ "THIS is NULL, avoiding crash."); - if(THIS->GetTarget() != NULL){ - if(THIS->GetTarget()->IsNPC()){ - if (DistanceSquaredNoZ(THIS->GetPosition(), THIS->GetTarget()->GetPosition()) <= 200) { - if(THIS->GetTarget()->CastToNPC()->IsMoving() && !THIS->GetTarget()->CastToNPC()->IsOnHatelist(THIS->GetTarget())) - THIS->GetTarget()->CastToNPC()->PauseWandering(RuleI(NPC, SayPauseTimeInSec)); - THIS->ChannelMessageReceived(8, 0, 100, SvPV_nolen(ST(1))); - } - } - } - } - XSRETURN_EMPTY; + if (sv_derived_from(ST(0), "Client")) { + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else + Perl_croak(aTHX_ "THIS is not of type Client"); + if (THIS == NULL) + Perl_croak(aTHX_ "THIS is NULL, avoiding crash."); + if (THIS->GetTarget() != NULL) { + if (THIS->GetTarget()->IsNPC()) { + if (DistanceSquaredNoZ(THIS->GetPosition(), THIS->GetTarget()->GetPosition()) <= 200) { + if (THIS->GetTarget()->CastToNPC()->IsMoving() && + !THIS->GetTarget()->CastToNPC()->IsOnHatelist(THIS->GetTarget())) + THIS->GetTarget()->CastToNPC()->PauseWandering(RuleI(NPC, SayPauseTimeInSec)); + THIS->ChannelMessageReceived(8, 0, 100, SvPV_nolen(ST(1))); + } + } + } + } + XSRETURN_EMPTY; } XS(XS_Client_PlayMP3); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_PlayMP3) -{ +XS(XS_Client_PlayMP3) { dXSARGS; if (items < 1 || items > 2) Perl_croak(aTHX_ "Usage: Client::PlayMP3(THIS, string file_name)"); { - Client * THIS; - char * fname = nullptr; + Client *THIS; + char *fname = nullptr; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - if (items > 1) { fname = (char *)SvPV_nolen(ST(1)); } + if (items > 1) { fname = (char *) SvPV_nolen(ST(1)); } THIS->PlayMP3(fname); } @@ -6083,24 +5779,22 @@ XS(XS_Client_PlayMP3) } XS(XS_Client_ExpeditionMessage); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_ExpeditionMessage) -{ +XS(XS_Client_ExpeditionMessage) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Client::ExpeditionMessage(THIS, int expedition_id, string message)"); { - Client * THIS; - int ExpdID = (int)SvUV(ST(1)); - const char * Message = (const char *)SvPV_nolen(ST(2)); + Client *THIS; + int ExpdID = (int) SvUV(ST(1)); + const char *Message = (const char *) SvPV_nolen(ST(2)); dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == NULL) + if (THIS == NULL) Perl_croak(aTHX_ "THIS is NULL, avoiding crash."); THIS->ExpeditionSay(Message, ExpdID); @@ -6111,28 +5805,27 @@ XS(XS_Client_ExpeditionMessage) //Client::SendMarqueeMessage(uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, std::string msg) XS(XS_Client_SendMarqueeMessage); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SendMarqueeMessage) -{ +XS(XS_Client_SendMarqueeMessage) { dXSARGS; if (items != 7) - Perl_croak(aTHX_ "Usage: Client::SendMarqueeMessage(THIS, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, string msg)"); + Perl_croak(aTHX_ + "Usage: Client::SendMarqueeMessage(THIS, uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, string msg)"); { - Client * THIS; - uint32 type = (uint32)SvUV(ST(1)); - uint32 priority = (uint32)SvUV(ST(2)); - uint32 fade_in = (uint32)SvUV(ST(3)); - uint32 fade_out = (uint32)SvUV(ST(4)); - uint32 duration = (uint32)SvUV(ST(5)); - std::string msg = (std::string)SvPV_nolen(ST(6)); + Client *THIS; + uint32 type = (uint32) SvUV(ST(1)); + uint32 priority = (uint32) SvUV(ST(2)); + uint32 fade_in = (uint32) SvUV(ST(3)); + uint32 fade_out = (uint32) SvUV(ST(4)); + uint32 duration = (uint32) SvUV(ST(5)); + std::string msg = (std::string) SvPV_nolen(ST(6)); dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == NULL) + if (THIS == NULL) Perl_croak(aTHX_ "THIS is NULL, avoiding crash."); THIS->SendMarqueeMessage(type, priority, fade_in, fade_out, duration, msg); @@ -6141,24 +5834,22 @@ XS(XS_Client_SendMarqueeMessage) } XS(XS_Client_SendColoredText); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SendColoredText) -{ +XS(XS_Client_SendColoredText) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Client::SendColoredText(uint32 color, string message)"); { - Client * THIS; - uint32 color = (uint32)SvUV(ST(1)); - std::string msg = (std::string)SvPV_nolen(ST(2)); + Client *THIS; + uint32 color = (uint32) SvUV(ST(1)); + std::string msg = (std::string) SvPV_nolen(ST(2)); dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == NULL) + if (THIS == NULL) Perl_croak(aTHX_ "THIS is NULL, avoiding crash."); THIS->SendColoredText(color, msg); @@ -6167,24 +5858,22 @@ XS(XS_Client_SendColoredText) } XS(XS_Client_SendSpellAnim); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_SendSpellAnim) -{ +XS(XS_Client_SendSpellAnim) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: SendSpellAnim(uint16 target_id, uint32 spell_animation_id)"); { - Client * THIS; - uint16 targetid = (uint16)SvUV(ST(1)); - uint16 spell_id = (uint16)SvUV(ST(2)); + Client *THIS; + uint16 targetid = (uint16) SvUV(ST(1)); + uint16 spell_id = (uint16) SvUV(ST(2)); dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == NULL) + if (THIS == NULL) Perl_croak(aTHX_ "THIS is NULL, avoiding crash."); THIS->SendSpellAnim(targetid, spell_id); @@ -6193,155 +5882,149 @@ XS(XS_Client_SendSpellAnim) } XS(XS_Client_GetTargetRingX); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetTargetRingX) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: Client::GetTargetRingX(THIS)"); - { - Client * THIS; - float RETVAL; - dXSTARG; +XS(XS_Client_GetTargetRingX) { + dXSARGS; + if (items != 1) + Perl_croak(aTHX_ "Usage: Client::GetTargetRingX(THIS)"); + { + Client *THIS; + float RETVAL; + dXSTARG; - if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else - Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) - Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); + if (sv_derived_from(ST(0), "Client")) { + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else + Perl_croak(aTHX_ "THIS is not of type Client"); + if (THIS == nullptr) + Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetTargetRingX(); - XSprePUSH; PUSHn((double)RETVAL); - } - XSRETURN(1); + XSprePUSH; + PUSHn((double) RETVAL); + } + XSRETURN(1); } XS(XS_Client_GetTargetRingY); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetTargetRingY) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: Client::GetTargetRingY(THIS)"); - { - Client * THIS; - float RETVAL; - dXSTARG; +XS(XS_Client_GetTargetRingY) { + dXSARGS; + if (items != 1) + Perl_croak(aTHX_ "Usage: Client::GetTargetRingY(THIS)"); + { + Client *THIS; + float RETVAL; + dXSTARG; - if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else - Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) - Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); + if (sv_derived_from(ST(0), "Client")) { + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else + Perl_croak(aTHX_ "THIS is not of type Client"); + if (THIS == nullptr) + Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetTargetRingY(); - XSprePUSH; PUSHn((double)RETVAL); - } - XSRETURN(1); + XSprePUSH; + PUSHn((double) RETVAL); + } + XSRETURN(1); } XS(XS_Client_GetTargetRingZ); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_GetTargetRingZ) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: Client::GetTargetRingZ(THIS)"); - { - Client * THIS; - float RETVAL; - dXSTARG; +XS(XS_Client_GetTargetRingZ) { + dXSARGS; + if (items != 1) + Perl_croak(aTHX_ "Usage: Client::GetTargetRingZ(THIS)"); + { + Client *THIS; + float RETVAL; + dXSTARG; - if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else - Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) - Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); + if (sv_derived_from(ST(0), "Client")) { + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else + Perl_croak(aTHX_ "THIS is not of type Client"); + if (THIS == nullptr) + Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetTargetRingZ(); - XSprePUSH; PUSHn((double)RETVAL); - } - XSRETURN(1); + XSprePUSH; + PUSHn((double) RETVAL); + } + XSRETURN(1); } XS(XS_Client_CalcEXP); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_CalcEXP) -{ +XS(XS_Client_CalcEXP) { dXSARGS; if (items < 1 || items > 2) Perl_croak(aTHX_ "Usage: CalcEXP(THIS, uint8 conlevel)"); { - Client * THIS; - uint8 conlevel = 0xFF; + Client *THIS; + uint8 conlevel = 0xFF; uint32 RETVAL; - if(items == 2) - conlevel = (uint16)SvUV(ST(1)); + if (items == 2) + conlevel = (uint16) SvUV(ST(1)); dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == NULL) + if (THIS == NULL) Perl_croak(aTHX_ "THIS is NULL, avoiding crash."); RETVAL = THIS->CalcEXP(conlevel); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Client_QuestReward); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_QuestReward) -{ +XS(XS_Client_QuestReward) { dXSARGS; if (items < 1 || items > 9) - Perl_croak(aTHX_ "Usage: Client::QuestReward(THIS, int32 mob, int32 copper, int32 silver, int32 gold, int32 platinum, int32 item_id, int32 exp, [bool faction = false])"); + Perl_croak(aTHX_ + "Usage: Client::QuestReward(THIS, int32 mob, int32 copper, int32 silver, int32 gold, int32 platinum, int32 item_id, int32 exp, [bool faction = false])"); { - Client* THIS; - Mob * mob = nullptr; - int32 copper = 0; - int32 silver = 0; - int32 gold = 0; - int32 platinum = 0; - int32 itemid = 0; - int32 exp = 0; - bool faction = false; + Client *THIS; + Mob *mob = nullptr; + int32 copper = 0; + int32 silver = 0; + int32 gold = 0; + int32 platinum = 0; + int32 itemid = 0; + int32 exp = 0; + bool faction = false; if (sv_derived_from(ST(0), "THIS")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Client *, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type client"); if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - if (items > 1) { + if (items > 1) { if (sv_derived_from(ST(1), "mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); + IV tmp = SvIV((SV *) SvRV(ST(1))); mob = INT2PTR(Mob *, tmp); - } - else + } else Perl_croak(aTHX_ "mob is not of type Mob"); if (mob == nullptr) Perl_croak(aTHX_ "mob is nullptr, avoiding crash."); } - if (items > 2) { copper = (int32)SvIV(ST(2)); } - if (items > 3) { silver = (int32)SvIV(ST(3)); } - if (items > 4) { gold = (int32)SvIV(ST(4)); } - if (items > 5) { platinum = (int32)SvIV(ST(5)); } - if (items > 6) { itemid = (int32)SvIV(ST(6)); } - if (items > 7) { exp = (int32)SvIV(ST(7)); } - if (items > 8) { faction = (bool)SvIV(ST(8)); } + if (items > 2) { copper = (int32) SvIV(ST(2)); } + if (items > 3) { silver = (int32) SvIV(ST(3)); } + if (items > 4) { gold = (int32) SvIV(ST(4)); } + if (items > 5) { platinum = (int32) SvIV(ST(5)); } + if (items > 6) { itemid = (int32) SvIV(ST(6)); } + if (items > 7) { exp = (int32) SvIV(ST(7)); } + if (items > 8) { faction = (bool) SvIV(ST(8)); } THIS->QuestReward(mob, copper, silver, gold, platinum, itemid, exp, faction); } @@ -6349,30 +6032,29 @@ XS(XS_Client_QuestReward) } XS(XS_Client_GetMoney); -XS(XS_Client_GetMoney) -{ +XS(XS_Client_GetMoney) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: GetMoney(THIS, int8 type, int8 subtype)"); { - Client* THIS; + Client *THIS; uint32 RETVAL; - uint8 type = (uint8)SvUV(ST(1)); - uint8 subtype = (uint8)SvUV(ST(2)); + uint8 type = (uint8) SvUV(ST(1)); + uint8 subtype = (uint8) SvUV(ST(2)); dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - - if(THIS == nullptr) + + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetMoney(type, subtype); - XSprePUSH; PUSHn((uint32)RETVAL); + XSprePUSH; + PUSHn((uint32) RETVAL); } XSRETURN(1); } @@ -6383,63 +6065,63 @@ XS(XS_Client_GetAccountAge) { if (items != 1) Perl_croak(aTHX_ "Usage: GetAccountAge(THIS)"); { - Client* THIS; + Client *THIS; int RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - - if(THIS == nullptr) + + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetAccountAge(); - XSprePUSH; PUSHn((int)RETVAL); + XSprePUSH; + PUSHn((int) RETVAL); } XSRETURN(1); } XS(XS_Client_Popup2); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Client_Popup2) -{ +XS(XS_Client_Popup2) { dXSARGS; if (items < 3 || items > 10) - Perl_croak(aTHX_ "Usage: Client::SendFullPopup(THIS, string title, string text, uint32 popup_id, uint32 negative_id, uint32 buttons, uint32 duration, string button_name_0, string button_name_1, uint32 sound_controls)"); + Perl_croak(aTHX_ + "Usage: Client::SendFullPopup(THIS, string title, string text, uint32 popup_id, uint32 negative_id, uint32 buttons, uint32 duration, string button_name_0, string button_name_1, uint32 sound_controls)"); { - Client * THIS; - char* Title = (char *)SvPV_nolen(ST(1)); - char* Text = (char *)SvPV_nolen(ST(2)); - uint32 PopupID = 0; - uint32 NegativeID = 0; - uint32 Buttons = 0; - uint32 Duration = 0; - char* ButtonName0 = 0; - char* ButtonName1 = 0; - uint32 SoundControls = 0; + Client *THIS; + char *Title = (char *) SvPV_nolen(ST(1)); + char *Text = (char *) SvPV_nolen(ST(2)); + uint32 PopupID = 0; + uint32 NegativeID = 0; + uint32 Buttons = 0; + uint32 Duration = 0; + char *ButtonName0 = 0; + char *ButtonName1 = 0; + uint32 SoundControls = 0; if (sv_derived_from(ST(0), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Client"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - - if (items > 3) { PopupID = (uint32)SvUV(ST(3)); } - if (items > 4) { NegativeID = (uint32)SvUV(ST(4)); } - if (items > 5) { Buttons = (uint32)SvUV(ST(5)); } - if (items > 6) { Duration = (uint32)SvUV(ST(6)); } - if (items > 7) { ButtonName0 = (char *)SvPV_nolen(ST(7)); } - if (items > 8) { ButtonName1 = (char *)SvPV_nolen(ST(8)); } - if (items > 9) { SoundControls = (uint32)SvUV(ST(9)); } + + if (items > 3) { PopupID = (uint32) SvUV(ST(3)); } + if (items > 4) { NegativeID = (uint32) SvUV(ST(4)); } + if (items > 5) { Buttons = (uint32) SvUV(ST(5)); } + if (items > 6) { Duration = (uint32) SvUV(ST(6)); } + if (items > 7) { ButtonName0 = (char *) SvPV_nolen(ST(7)); } + if (items > 8) { ButtonName1 = (char *) SvPV_nolen(ST(8)); } + if (items > 9) { SoundControls = (uint32) SvUV(ST(9)); } - THIS->SendFullPopup(Title, Text, PopupID, NegativeID, Buttons, Duration, ButtonName0, ButtonName1, SoundControls); + THIS->SendFullPopup(Title, Text, PopupID, NegativeID, Buttons, Duration, ButtonName0, ButtonName1, + SoundControls); } XSRETURN_EMPTY; } @@ -6449,14 +6131,13 @@ XS(XS_Client_Popup2) extern "C" #endif XS(boot_Client); /* prototype to pass -Wmissing-prototypes */ -XS(boot_Client) -{ +XS(boot_Client) { dXSARGS; char file[256]; strncpy(file, __FILE__, 256); file[255] = 0; - if(items != 1) + if (items != 1) fprintf(stderr, "boot_quest does not take any arguments."); char buf[128]; @@ -6464,242 +6145,243 @@ XS(boot_Client) - XS_VERSION_BOOTCHECK ; + XS_VERSION_BOOTCHECK; - newXSproto(strcpy(buf, "SendSound"), XS_Client_SendSound, file, "$"); - newXSproto(strcpy(buf, "Save"), XS_Client_Save, file, "$$"); - newXSproto(strcpy(buf, "SaveBackup"), XS_Client_SaveBackup, file, "$"); - newXSproto(strcpy(buf, "Connected"), XS_Client_Connected, file, "$"); - newXSproto(strcpy(buf, "InZone"), XS_Client_InZone, file, "$"); - newXSproto(strcpy(buf, "Kick"), XS_Client_Kick, file, "$"); - newXSproto(strcpy(buf, "Disconnect"), XS_Client_Disconnect, file, "$"); - newXSproto(strcpy(buf, "IsLD"), XS_Client_IsLD, file, "$"); - newXSproto(strcpy(buf, "WorldKick"), XS_Client_WorldKick, file, "$"); - newXSproto(strcpy(buf, "GetAnon"), XS_Client_GetAnon, file, "$"); - newXSproto(strcpy(buf, "Duck"), XS_Client_Duck, file, "$"); - newXSproto(strcpy(buf, "Stand"), XS_Client_Stand, file, "$"); - newXSproto(strcpy(buf, "SetGM"), XS_Client_SetGM, file, "$$"); - newXSproto(strcpy(buf, "SetPVP"), XS_Client_SetPVP, file, "$$"); - newXSproto(strcpy(buf, "GetPVP"), XS_Client_GetPVP, file, "$"); - newXSproto(strcpy(buf, "GetGM"), XS_Client_GetGM, file, "$"); - newXSproto(strcpy(buf, "SetBaseClass"), XS_Client_SetBaseClass, file, "$$"); - newXSproto(strcpy(buf, "SetBaseRace"), XS_Client_SetBaseRace, file, "$$"); - newXSproto(strcpy(buf, "SetBaseGender"), XS_Client_SetBaseGender, file, "$$"); - newXSproto(strcpy(buf, "GetBaseFace"), XS_Client_GetBaseFace, file, "$"); - newXSproto(strcpy(buf, "GetLanguageSkill"), XS_Client_GetLanguageSkill, file, "$$"); - newXSproto(strcpy(buf, "GetLastName"), XS_Client_GetLastName, file, "$"); - newXSproto(strcpy(buf, "GetLDoNPointsTheme"), XS_Client_GetLDoNPointsTheme, file, "$"); - newXSproto(strcpy(buf, "GetBaseSTR"), XS_Client_GetBaseSTR, file, "$"); - newXSproto(strcpy(buf, "GetBaseSTA"), XS_Client_GetBaseSTA, file, "$"); - newXSproto(strcpy(buf, "GetBaseCHA"), XS_Client_GetBaseCHA, file, "$"); - newXSproto(strcpy(buf, "GetBaseDEX"), XS_Client_GetBaseDEX, file, "$"); - newXSproto(strcpy(buf, "GetBaseINT"), XS_Client_GetBaseINT, file, "$"); - newXSproto(strcpy(buf, "GetBaseAGI"), XS_Client_GetBaseAGI, file, "$"); - newXSproto(strcpy(buf, "GetBaseWIS"), XS_Client_GetBaseWIS, file, "$"); - newXSproto(strcpy(buf, "GetWeight"), XS_Client_GetWeight, file, "$"); - newXSproto(strcpy(buf, "GetEXP"), XS_Client_GetEXP, file, "$"); - newXSproto(strcpy(buf, "GetAAExp"), XS_Client_GetAAExp, file, "$"); - newXSproto(strcpy(buf, "GetAAPercent"), XS_Client_GetAAPercent, file, "$"); - newXSproto(strcpy(buf, "GetTotalSecondsPlayed"), XS_Client_GetTotalSecondsPlayed, file, "$"); - newXSproto(strcpy(buf, "UpdateLDoNPoints"), XS_Client_UpdateLDoNPoints, file, "$$$"); - newXSproto(strcpy(buf, "SetDeity"), XS_Client_SetDeity, file, "$$"); - newXSproto(strcpy(buf, "AddEXP"), XS_Client_AddEXP, file, "$$;$$"); - newXSproto(strcpy(buf, "SetEXP"), XS_Client_SetEXP, file, "$$$;$"); - newXSproto(strcpy(buf, "SetBindPoint"), XS_Client_SetBindPoint, file, "$;$$$$$"); - newXSproto(strcpy(buf, "GetBindX"), XS_Client_GetBindX, file, "$$"); - newXSproto(strcpy(buf, "GetBindY"), XS_Client_GetBindY, file, "$$"); - newXSproto(strcpy(buf, "GetBindZ"), XS_Client_GetBindZ, file, "$$"); - newXSproto(strcpy(buf, "GetBindHeading"), XS_Client_GetBindHeading, file, "$$"); - newXSproto(strcpy(buf, "GetBindZoneID"), XS_Client_GetBindZoneID, file, "$$"); - newXSproto(strcpy(buf, "MovePC"), XS_Client_MovePC, file, "$$$$$$"); - newXSproto(strcpy(buf, "MovePCInstance"), XS_Client_MovePCInstance, file, "$$$$$$$"); - newXSproto(strcpy(buf, "ChangeLastName"), XS_Client_ChangeLastName, file, "$$"); - newXSproto(strcpy(buf, "GetFactionLevel"), XS_Client_GetFactionLevel, file, "$$$$$$$$"); - newXSproto(strcpy(buf, "SetFactionLevel"), XS_Client_SetFactionLevel, file, "$$$$$$"); - newXSproto(strcpy(buf, "SetFactionLevel2"), XS_Client_SetFactionLevel2, file, "$$$$$$$"); - newXSproto(strcpy(buf, "GetRawItemAC"), XS_Client_GetRawItemAC, file, "$"); - newXSproto(strcpy(buf, "AccountID"), XS_Client_AccountID, file, "$"); - newXSproto(strcpy(buf, "AccountName"), XS_Client_AccountName, file, "$"); - newXSproto(strcpy(buf, "Admin"), XS_Client_Admin, file, "$"); - newXSproto(strcpy(buf, "CharacterID"), XS_Client_CharacterID, file, "$"); - newXSproto(strcpy(buf, "UpdateAdmin"), XS_Client_UpdateAdmin, file, "$;$"); - newXSproto(strcpy(buf, "UpdateWho"), XS_Client_UpdateWho, file, "$;$"); - newXSproto(strcpy(buf, "GuildRank"), XS_Client_GuildRank, file, "$"); - newXSproto(strcpy(buf, "GuildID"), XS_Client_GuildID, file, "$"); - newXSproto(strcpy(buf, "GetFace"), XS_Client_GetFace, file, "$"); - newXSproto(strcpy(buf, "TakeMoneyFromPP"), XS_Client_TakeMoneyFromPP, file, "$$;$"); - newXSproto(strcpy(buf, "AddMoneyToPP"), XS_Client_AddMoneyToPP, file, "$$$$$$"); - newXSproto(strcpy(buf, "TGB"), XS_Client_TGB, file, "$"); - newXSproto(strcpy(buf, "GetSkillPoints"), XS_Client_GetSkillPoints, file, "$"); - newXSproto(strcpy(buf, "SetSkillPoints"), XS_Client_SetSkillPoints, file, "$$"); - newXSproto(strcpy(buf, "IncreaseSkill"), XS_Client_IncreaseSkill, file, "$$;$"); - newXSproto(strcpy(buf, "IncreaseLanguageSkill"), XS_Client_IncreaseLanguageSkill, file, "$$;$"); - newXSproto(strcpy(buf, "GetSkill"), XS_Client_GetSkill, file, "$$"); - newXSproto(strcpy(buf, "GetRawSkill"), XS_Client_GetRawSkill, file, "$$"); - newXSproto(strcpy(buf, "HasSkill"), XS_Client_HasSkill, file, "$$"); - newXSproto(strcpy(buf, "CanHaveSkill"), XS_Client_CanHaveSkill, file, "$$"); - newXSproto(strcpy(buf, "SetSkill"), XS_Client_SetSkill, file, "$$$"); - newXSproto(strcpy(buf, "AddSkill"), XS_Client_AddSkill, file, "$$$"); - newXSproto(strcpy(buf, "CheckSpecializeIncrease"), XS_Client_CheckSpecializeIncrease, file, "$$"); - newXSproto(strcpy(buf, "CheckIncreaseSkill"), XS_Client_CheckIncreaseSkill, file, "$$;$"); - newXSproto(strcpy(buf, "SetLanguageSkill"), XS_Client_SetLanguageSkill, file, "$$$"); - newXSproto(strcpy(buf, "MaxSkill"), XS_Client_MaxSkill, file, "$$;$$"); - newXSproto(strcpy(buf, "GMKill"), XS_Client_GMKill, file, "$"); - newXSproto(strcpy(buf, "IsMedding"), XS_Client_IsMedding, file, "$"); - newXSproto(strcpy(buf, "GetDuelTarget"), XS_Client_GetDuelTarget, file, "$"); - newXSproto(strcpy(buf, "IsDueling"), XS_Client_IsDueling, file, "$"); - newXSproto(strcpy(buf, "SetDuelTarget"), XS_Client_SetDuelTarget, file, "$$"); - newXSproto(strcpy(buf, "SetDueling"), XS_Client_SetDueling, file, "$$"); - newXSproto(strcpy(buf, "ResetAA"), XS_Client_ResetAA, file, "$"); - newXSproto(strcpy(buf, "MemSpell"), XS_Client_MemSpell, file, "$$$;$"); - newXSproto(strcpy(buf, "UnmemSpell"), XS_Client_UnmemSpell, file, "$$;$"); - newXSproto(strcpy(buf, "UnmemSpellBySpellID"), XS_Client_UnmemSpellBySpellID, file, "$$"); - newXSproto(strcpy(buf, "UnmemSpellAll"), XS_Client_UnmemSpellAll, file, "$;$"); - newXSproto(strcpy(buf, "ScribeSpell"), XS_Client_ScribeSpell, file, "$$$;$"); - newXSproto(strcpy(buf, "UnscribeSpell"), XS_Client_UnscribeSpell, file, "$$;$"); - newXSproto(strcpy(buf, "UnscribeSpellAll"), XS_Client_UnscribeSpellAll, file, "$;$"); - newXSproto(strcpy(buf, "TrainDiscBySpellID"), XS_Client_TrainDiscBySpellID, file, "$$"); - newXSproto(strcpy(buf, "GetDiscSlotBySpellID"), XS_Client_GetDiscSlotBySpellID, file, "$$"); - newXSproto(strcpy(buf, "UntrainDisc"), XS_Client_UntrainDisc, file, "$$;$"); - newXSproto(strcpy(buf, "UntrainDiscAll"), XS_Client_UntrainDiscAll, file, "$;$"); - newXSproto(strcpy(buf, "IsSitting"), XS_Client_IsSitting, file, "$"); - newXSproto(strcpy(buf, "IsBecomeNPC"), XS_Client_IsBecomeNPC, file, "$"); - newXSproto(strcpy(buf, "GetBecomeNPCLevel"), XS_Client_GetBecomeNPCLevel, file, "$"); - newXSproto(strcpy(buf, "SetBecomeNPC"), XS_Client_SetBecomeNPC, file, "$$"); - newXSproto(strcpy(buf, "SetBecomeNPCLevel"), XS_Client_SetBecomeNPCLevel, file, "$$"); - newXSproto(strcpy(buf, "SetFeigned"), XS_Client_SetFeigned, file, "$$"); - newXSproto(strcpy(buf, "GetFeigned"), XS_Client_GetFeigned, file, "$"); - newXSproto(strcpy(buf, "AutoSplitEnabled"), XS_Client_AutoSplitEnabled, file, "$"); - newXSproto(strcpy(buf, "SetHorseId"), XS_Client_SetHorseId, file, "$$"); - newXSproto(strcpy(buf, "GetHorseId"), XS_Client_GetHorseId, file, "$"); - newXSproto(strcpy(buf, "NukeItem"), XS_Client_NukeItem, file, "$$;$"); - newXSproto(strcpy(buf, "SetTint"), XS_Client_SetTint, file, "$$$"); - newXSproto(strcpy(buf, "SetMaterial"), XS_Client_SetMaterial, file, "$$$"); - newXSproto(strcpy(buf, "Undye"), XS_Client_Undye, file, "$"); - newXSproto(strcpy(buf, "GetItemIDAt"), XS_Client_GetItemIDAt, file, "$$"); - newXSproto(strcpy(buf, "GetAugmentIDAt"), XS_Client_GetAugmentIDAt, file, "$$$"); - newXSproto(strcpy(buf, "DeleteItemInInventory"), XS_Client_DeleteItemInInventory, file, "$$;$$"); - newXSproto(strcpy(buf, "SummonItem"), XS_Client_SummonItem, file, "$$;$$$$$$$$"); - newXSproto(strcpy(buf, "SetStats"), XS_Client_SetStats, file, "$$$"); - newXSproto(strcpy(buf, "IncStats"), XS_Client_IncStats, file, "$$$"); - newXSproto(strcpy(buf, "DropItem"), XS_Client_DropItem, file, "$$"); - newXSproto(strcpy(buf, "BreakInvis"), XS_Client_BreakInvis, file, "$"); - newXSproto(strcpy(buf, "GetGroup"), XS_Client_GetGroup, file, "$"); - newXSproto(strcpy(buf, "LeaveGroup"), XS_Client_LeaveGroup, file, "$"); - newXSproto(strcpy(buf, "GetRaid"), XS_Client_GetRaid, file, "$"); - newXSproto(strcpy(buf, "IsGrouped"), XS_Client_IsGrouped, file, "$"); - newXSproto(strcpy(buf, "IsRaidGrouped"), XS_Client_IsRaidGrouped, file, "$"); - newXSproto(strcpy(buf, "Hungry"), XS_Client_Hungry, file, "$"); - newXSproto(strcpy(buf, "Thirsty"), XS_Client_Thirsty, file, "$"); - newXSproto(strcpy(buf, "GetInstrumentMod"), XS_Client_GetInstrumentMod, file, "$$"); - newXSproto(strcpy(buf, "DecreaseByID"), XS_Client_DecreaseByID, file, "$$$"); - newXSproto(strcpy(buf, "SlotConvert2"), XS_Client_SlotConvert2, file, "$$"); - newXSproto(strcpy(buf, "Escape"), XS_Client_Escape, file, "$"); - newXSproto(strcpy(buf, "RemoveNoRent"), XS_Client_RemoveNoRent, file, "$"); - newXSproto(strcpy(buf, "GoFish"), XS_Client_GoFish, file, "$"); - newXSproto(strcpy(buf, "ForageItem"), XS_Client_ForageItem, file, "$"); - newXSproto(strcpy(buf, "CalcPriceMod"), XS_Client_CalcPriceMod, file, "$;$$"); - newXSproto(strcpy(buf, "ResetTrade"), XS_Client_ResetTrade, file, "$"); - newXSproto(strcpy(buf, "UseDiscipline"), XS_Client_UseDiscipline, file, "$$$"); - newXSproto(strcpy(buf, "GetCharacterFactionLevel"), XS_Client_GetCharacterFactionLevel, file, "$$"); - newXSproto(strcpy(buf, "SetZoneFlag"), XS_Client_SetZoneFlag, file, "$$"); - newXSproto(strcpy(buf, "ClearZoneFlag"), XS_Client_ClearZoneFlag, file, "$$"); - newXSproto(strcpy(buf, "HasZoneFlag"), XS_Client_HasZoneFlag, file, "$$"); - newXSproto(strcpy(buf, "SendZoneFlagInfo"), XS_Client_SendZoneFlagInfo, file, "$$"); - newXSproto(strcpy(buf, "LoadZoneFlags"), XS_Client_LoadZoneFlags, file, "$"); - newXSproto(strcpy(buf, "SetAATitle"), XS_Client_SetAATitle, file, "$$;$"); - newXSproto(strcpy(buf, "GetClientVersion"), XS_Client_GetClientVersion, file, "$"); - newXSproto(strcpy(buf, "GetClientVersionBit"), XS_Client_GetClientVersionBit, file, "$"); - newXSproto(strcpy(buf, "SetTitleSuffix"), XS_Client_SetTitleSuffix, file, "$$;$"); - newXSproto(strcpy(buf, "SetAAPoints"), XS_Client_SetAAPoints, file, "$$"); - newXSproto(strcpy(buf, "GetAAPoints"), XS_Client_GetAAPoints, file, "$$"); - newXSproto(strcpy(buf, "GetSpentAA"), XS_Client_GetSpentAA, file, "$$"); - newXSproto(strcpy(buf, "AddAAPoints"), XS_Client_AddAAPoints, file, "$$"); - newXSproto(strcpy(buf, "RefundAA"), XS_Client_RefundAA, file, "$$"); - newXSproto(strcpy(buf, "GetModCharacterFactionLevel"), XS_Client_GetModCharacterFactionLevel, file, "$$"); - newXSproto(strcpy(buf, "GetLDoNWins"), XS_Client_GetLDoNWins, file, "$"); - newXSproto(strcpy(buf, "GetLDoNLosses"), XS_Client_GetLDoNLosses, file, "$"); - newXSproto(strcpy(buf, "GetLDoNWinsTheme"), XS_Client_GetLDoNWinsTheme, file, "$$"); - newXSproto(strcpy(buf, "GetLDoNLossesTheme"), XS_Client_GetLDoNLossesTheme, file, "$$"); - newXSproto(strcpy(buf, "GetItemAt"), XS_Client_GetItemAt, file, "$$"); - newXSproto(strcpy(buf, "GetAugmentAt"), XS_Client_GetAugmentAt, file, "$$$"); - newXSproto(strcpy(buf, "GetStartZone"), XS_Client_GetStartZone, file, "$"); - newXSproto(strcpy(buf, "SetStartZone"), XS_Client_SetStartZone, file, "$$"); - newXSproto(strcpy(buf, "KeyRingAdd"), XS_Client_KeyRingAdd, file, "$$"); - newXSproto(strcpy(buf, "KeyRingCheck"), XS_Client_KeyRingCheck, file, "$$"); - newXSproto(strcpy(buf, "AddPVPPoints"), XS_Client_AddPVPPoints, file, "$$"); - newXSproto(strcpy(buf, "AddCrystals"), XS_Client_AddCrystals, file, "$$"); - newXSproto(strcpy(buf, "GetPVPPoints"), XS_Client_GetPVPPoints, file, "$"); - newXSproto(strcpy(buf, "GetRadiantCrystals"), XS_Client_GetRadiantCrystals, file, "$"); - newXSproto(strcpy(buf, "GetEbonCrystals"), XS_Client_GetEbonCrystals, file, "$"); - newXSproto(strcpy(buf, "ReadBook"), XS_Client_ReadBook, file, "$$$"); - newXSproto(strcpy(buf, "UpdateGroupAAs"), XS_Client_UpdateGroupAAs, file, "$$$"); - newXSproto(strcpy(buf, "GetGroupPoints"), XS_Client_GetGroupPoints, file, "$"); - newXSproto(strcpy(buf, "GetRaidPoints"), XS_Client_GetRaidPoints, file, "$"); - newXSproto(strcpy(buf, "LearnRecipe"), XS_Client_LearnRecipe, file, "$$"); - newXSproto(strcpy(buf, "GetEndurance"), XS_Client_GetEndurance, file, "$"); - newXSproto(strcpy(buf, "GetMaxEndurance"), XS_Client_GetMaxEndurance, file, "$"); - newXSproto(strcpy(buf, "GetEnduranceRatio"), XS_Client_GetEnduranceRatio, file, "$"); - newXSproto(strcpy(buf, "SetEndurance"), XS_Client_SetEndurance, file, "$$"); - newXSproto(strcpy(buf, "SendOPTranslocateConfirm"), XS_Client_SendOPTranslocateConfirm, file, "$$$"); - newXSproto(strcpy(buf, "NPCSpawn"), XS_Client_NPCSpawn, file, "$$$;$"); - newXSproto(strcpy(buf, "GetIP"), XS_Client_GetIP, file, "$"); - newXSproto(strcpy(buf, "AddLevelBasedExp"), XS_Client_AddLevelBasedExp, file, "$$;$"); - newXSproto(strcpy(buf, "IncrementAA"), XS_Client_IncrementAA, file, "$$"); - newXSproto(strcpy(buf, "GrantAlternateAdvancementAbility"), XS_Client_GrantAlternateAdvancementAbility, file, "$$$;$"); - newXSproto(strcpy(buf, "GetAALevel"), XS_Client_GetAALevel, file, "$$"); - newXSproto(strcpy(buf, "MarkCompassLoc"), XS_Client_MarkCompassLoc, file, "$$$$"); - newXSproto(strcpy(buf, "ClearCompassMark"), XS_Client_ClearCompassMark, file, "$"); - newXSproto(strcpy(buf, "GetFreeSpellBookSlot"), XS_Client_GetFreeSpellBookSlot, file, "$;$"); - newXSproto(strcpy(buf, "GetSpellBookSlotBySpellID"), XS_Client_GetSpellBookSlotBySpellID, file, "$$"); - newXSproto(strcpy(buf, "UpdateTaskActivity"), XS_Client_UpdateTaskActivity, file, "$$$$;$"); - newXSproto(strcpy(buf, "AssignTask"), XS_Client_AssignTask, file, "$$$;$"); - newXSproto(strcpy(buf, "FailTask"), XS_Client_FailTask, file, "$$"); - newXSproto(strcpy(buf, "IsTaskCompleted"), XS_Client_IsTaskCompleted, file, "$$"); - newXSproto(strcpy(buf, "IsTaskActive"), XS_Client_IsTaskActive, file, "$$"); - newXSproto(strcpy(buf, "IsTaskActivityActive"), XS_Client_IsTaskActivityActive, file, "$$$"); - newXSproto(strcpy(buf, "GetTaskActivityDoneCount"), XS_Client_GetTaskActivityDoneCount, file, "$$$"); - newXSproto(strcpy(buf, "GetCorpseCount"), XS_Client_GetCorpseCount, file, "$"); - newXSproto(strcpy(buf, "GetCorpseID"), XS_Client_GetCorpseID, file, "$$"); - newXSproto(strcpy(buf, "GetCorpseItemAt"), XS_Client_GetCorpseItemAt, file, "$$$"); - newXSproto(strcpy(buf, "AssignToInstance"), XS_Client_AssignToInstance, file, "$$"); - newXSproto(strcpy(buf, "Freeze"), XS_Client_Freeze, file, "$"); - newXSproto(strcpy(buf, "UnFreeze"), XS_Client_UnFreeze, file, "$"); - newXSproto(strcpy(buf, "GetAggroCount"), XS_Client_GetAggroCount, file, "$"); - newXSproto(strcpy(buf, "GetCarriedMoney"), XS_Client_GetCarriedMoney, file, "$"); - newXSproto(strcpy(buf, "GetAllMoney"), XS_Client_GetAllMoney, file, "$"); - newXSproto(strcpy(buf, "GetItemInInventory"), XS_Client_GetItemInInventory, file, "$$"); - newXSproto(strcpy(buf, "SetCustomItemData"), XS_Client_SetCustomItemData, file, "$$$$"); - newXSproto(strcpy(buf, "GetCustomItemData"), XS_Client_GetCustomItemData, file, "$$$"); - newXSproto(strcpy(buf, "OpenLFGuildWindow"), XS_Client_OpenLFGuildWindow, file, "$"); - newXSproto(strcpy(buf, "SignalClient"), XS_Client_SignalClient, file, "$"); - newXSproto(strcpy(buf, "AddAlternateCurrencyValue"), XS_Client_AddAlternateCurrencyValue, file, "$$$"); - newXSproto(strcpy(buf, "SendWebLink"), XS_Client_SendWebLink, file, "$:$"); - newXSproto(strcpy(buf, "GetInstanceID"), XS_Client_GetInstanceID, file, "$$"); - newXSproto(strcpy(buf, "HasSpellScribed"), XS_Client_HasSkill, file, "$$"); - newXSproto(strcpy(buf, "SetAccountFlag"), XS_Client_SetAccountFlag, file, "$$"); - newXSproto(strcpy(buf, "GetAccountFlag"), XS_Client_GetAccountFlag, file, "$$"); - newXSproto(strcpy(buf, "GetHunger"), XS_Client_GetHunger, file, "$$"); - newXSproto(strcpy(buf, "GetThirst"), XS_Client_GetThirst, file, "$$"); - newXSproto(strcpy(buf, "SetHunger"), XS_Client_SetHunger, file, "$$"); - newXSproto(strcpy(buf, "SetThirst"), XS_Client_SetThirst, file, "$$"); - newXSproto(strcpy(buf, "SetConsumption"), XS_Client_SetConsumption, file, "$$$"); - newXSproto(strcpy(buf, "SilentMessage"), XS_Client_SilentMessage, file, "$$"); - newXSproto(strcpy(buf, "PlayMP3"), XS_Client_PlayMP3, file, "$;$"); - newXSproto(strcpy(buf, "SendTargetCommand"), XS_Client_SendTargetCommand, file, "$$"); - newXSproto(strcpy(buf, "ExpeditionMessage"), XS_Client_ExpeditionMessage, file, "$$$"); - newXSproto(strcpy(buf, "SendMarqueeMessage"), XS_Client_SendMarqueeMessage, file, "$$$$$$$"); - newXSproto(strcpy(buf, "SendColoredText"), XS_Client_SendColoredText, file, "$$$"); - newXSproto(strcpy(buf, "SendSpellAnim"), XS_Client_SendSpellAnim, file, "$$$"); - newXSproto(strcpy(buf, "GetTargetRingX"), XS_Client_GetTargetRingX, file, "$$"); - newXSproto(strcpy(buf, "GetTargetRingY"), XS_Client_GetTargetRingY, file, "$$"); - newXSproto(strcpy(buf, "GetTargetRingZ"), XS_Client_GetTargetRingZ, file, "$$"); - newXSproto(strcpy(buf, "QuestReward"), XS_Client_QuestReward, file, "$$;$$$$$$$"); - newXSproto(strcpy(buf, "CalcEXP"), XS_Client_CalcEXP, file, "$"); - newXSproto(strcpy(buf, "GetMoney"), XS_Client_GetMoney, file, "$$$"); - newXSproto(strcpy(buf, "GetAccountAge"), XS_Client_GetAccountAge, file, "$"); - newXSproto(strcpy(buf, "Popup2"), XS_Client_Popup2, file, "$$$;$$$$$$$"); - XSRETURN_YES; + newXSproto(strcpy(buf, "SendSound"), XS_Client_SendSound, file, "$"); + newXSproto(strcpy(buf, "Save"), XS_Client_Save, file, "$$"); + newXSproto(strcpy(buf, "SaveBackup"), XS_Client_SaveBackup, file, "$"); + newXSproto(strcpy(buf, "Connected"), XS_Client_Connected, file, "$"); + newXSproto(strcpy(buf, "InZone"), XS_Client_InZone, file, "$"); + newXSproto(strcpy(buf, "Kick"), XS_Client_Kick, file, "$"); + newXSproto(strcpy(buf, "Disconnect"), XS_Client_Disconnect, file, "$"); + newXSproto(strcpy(buf, "IsLD"), XS_Client_IsLD, file, "$"); + newXSproto(strcpy(buf, "WorldKick"), XS_Client_WorldKick, file, "$"); + newXSproto(strcpy(buf, "GetAnon"), XS_Client_GetAnon, file, "$"); + newXSproto(strcpy(buf, "Duck"), XS_Client_Duck, file, "$"); + newXSproto(strcpy(buf, "Stand"), XS_Client_Stand, file, "$"); + newXSproto(strcpy(buf, "SetGM"), XS_Client_SetGM, file, "$$"); + newXSproto(strcpy(buf, "SetPVP"), XS_Client_SetPVP, file, "$$"); + newXSproto(strcpy(buf, "GetPVP"), XS_Client_GetPVP, file, "$"); + newXSproto(strcpy(buf, "GetGM"), XS_Client_GetGM, file, "$"); + newXSproto(strcpy(buf, "SetBaseClass"), XS_Client_SetBaseClass, file, "$$"); + newXSproto(strcpy(buf, "SetBaseRace"), XS_Client_SetBaseRace, file, "$$"); + newXSproto(strcpy(buf, "SetBaseGender"), XS_Client_SetBaseGender, file, "$$"); + newXSproto(strcpy(buf, "GetBaseFace"), XS_Client_GetBaseFace, file, "$"); + newXSproto(strcpy(buf, "GetLanguageSkill"), XS_Client_GetLanguageSkill, file, "$$"); + newXSproto(strcpy(buf, "GetLastName"), XS_Client_GetLastName, file, "$"); + newXSproto(strcpy(buf, "GetLDoNPointsTheme"), XS_Client_GetLDoNPointsTheme, file, "$"); + newXSproto(strcpy(buf, "GetBaseSTR"), XS_Client_GetBaseSTR, file, "$"); + newXSproto(strcpy(buf, "GetBaseSTA"), XS_Client_GetBaseSTA, file, "$"); + newXSproto(strcpy(buf, "GetBaseCHA"), XS_Client_GetBaseCHA, file, "$"); + newXSproto(strcpy(buf, "GetBaseDEX"), XS_Client_GetBaseDEX, file, "$"); + newXSproto(strcpy(buf, "GetBaseINT"), XS_Client_GetBaseINT, file, "$"); + newXSproto(strcpy(buf, "GetBaseAGI"), XS_Client_GetBaseAGI, file, "$"); + newXSproto(strcpy(buf, "GetBaseWIS"), XS_Client_GetBaseWIS, file, "$"); + newXSproto(strcpy(buf, "GetWeight"), XS_Client_GetWeight, file, "$"); + newXSproto(strcpy(buf, "GetEXP"), XS_Client_GetEXP, file, "$"); + newXSproto(strcpy(buf, "GetAAExp"), XS_Client_GetAAExp, file, "$"); + newXSproto(strcpy(buf, "GetAAPercent"), XS_Client_GetAAPercent, file, "$"); + newXSproto(strcpy(buf, "GetTotalSecondsPlayed"), XS_Client_GetTotalSecondsPlayed, file, "$"); + newXSproto(strcpy(buf, "UpdateLDoNPoints"), XS_Client_UpdateLDoNPoints, file, "$$$"); + newXSproto(strcpy(buf, "SetDeity"), XS_Client_SetDeity, file, "$$"); + newXSproto(strcpy(buf, "AddEXP"), XS_Client_AddEXP, file, "$$;$$"); + newXSproto(strcpy(buf, "SetEXP"), XS_Client_SetEXP, file, "$$$;$"); + newXSproto(strcpy(buf, "SetBindPoint"), XS_Client_SetBindPoint, file, "$;$$$$$"); + newXSproto(strcpy(buf, "GetBindX"), XS_Client_GetBindX, file, "$$"); + newXSproto(strcpy(buf, "GetBindY"), XS_Client_GetBindY, file, "$$"); + newXSproto(strcpy(buf, "GetBindZ"), XS_Client_GetBindZ, file, "$$"); + newXSproto(strcpy(buf, "GetBindHeading"), XS_Client_GetBindHeading, file, "$$"); + newXSproto(strcpy(buf, "GetBindZoneID"), XS_Client_GetBindZoneID, file, "$$"); + newXSproto(strcpy(buf, "MovePC"), XS_Client_MovePC, file, "$$$$$$"); + newXSproto(strcpy(buf, "MovePCInstance"), XS_Client_MovePCInstance, file, "$$$$$$$"); + newXSproto(strcpy(buf, "ChangeLastName"), XS_Client_ChangeLastName, file, "$$"); + newXSproto(strcpy(buf, "GetFactionLevel"), XS_Client_GetFactionLevel, file, "$$$$$$$$"); + newXSproto(strcpy(buf, "SetFactionLevel"), XS_Client_SetFactionLevel, file, "$$$$$$"); + newXSproto(strcpy(buf, "SetFactionLevel2"), XS_Client_SetFactionLevel2, file, "$$$$$$$"); + newXSproto(strcpy(buf, "GetRawItemAC"), XS_Client_GetRawItemAC, file, "$"); + newXSproto(strcpy(buf, "AccountID"), XS_Client_AccountID, file, "$"); + newXSproto(strcpy(buf, "AccountName"), XS_Client_AccountName, file, "$"); + newXSproto(strcpy(buf, "Admin"), XS_Client_Admin, file, "$"); + newXSproto(strcpy(buf, "CharacterID"), XS_Client_CharacterID, file, "$"); + newXSproto(strcpy(buf, "UpdateAdmin"), XS_Client_UpdateAdmin, file, "$;$"); + newXSproto(strcpy(buf, "UpdateWho"), XS_Client_UpdateWho, file, "$;$"); + newXSproto(strcpy(buf, "GuildRank"), XS_Client_GuildRank, file, "$"); + newXSproto(strcpy(buf, "GuildID"), XS_Client_GuildID, file, "$"); + newXSproto(strcpy(buf, "GetFace"), XS_Client_GetFace, file, "$"); + newXSproto(strcpy(buf, "TakeMoneyFromPP"), XS_Client_TakeMoneyFromPP, file, "$$;$"); + newXSproto(strcpy(buf, "AddMoneyToPP"), XS_Client_AddMoneyToPP, file, "$$$$$$"); + newXSproto(strcpy(buf, "TGB"), XS_Client_TGB, file, "$"); + newXSproto(strcpy(buf, "GetSkillPoints"), XS_Client_GetSkillPoints, file, "$"); + newXSproto(strcpy(buf, "SetSkillPoints"), XS_Client_SetSkillPoints, file, "$$"); + newXSproto(strcpy(buf, "IncreaseSkill"), XS_Client_IncreaseSkill, file, "$$;$"); + newXSproto(strcpy(buf, "IncreaseLanguageSkill"), XS_Client_IncreaseLanguageSkill, file, "$$;$"); + newXSproto(strcpy(buf, "GetSkill"), XS_Client_GetSkill, file, "$$"); + newXSproto(strcpy(buf, "GetRawSkill"), XS_Client_GetRawSkill, file, "$$"); + newXSproto(strcpy(buf, "HasSkill"), XS_Client_HasSkill, file, "$$"); + newXSproto(strcpy(buf, "CanHaveSkill"), XS_Client_CanHaveSkill, file, "$$"); + newXSproto(strcpy(buf, "SetSkill"), XS_Client_SetSkill, file, "$$$"); + newXSproto(strcpy(buf, "AddSkill"), XS_Client_AddSkill, file, "$$$"); + newXSproto(strcpy(buf, "CheckSpecializeIncrease"), XS_Client_CheckSpecializeIncrease, file, "$$"); + newXSproto(strcpy(buf, "CheckIncreaseSkill"), XS_Client_CheckIncreaseSkill, file, "$$;$"); + newXSproto(strcpy(buf, "SetLanguageSkill"), XS_Client_SetLanguageSkill, file, "$$$"); + newXSproto(strcpy(buf, "MaxSkill"), XS_Client_MaxSkill, file, "$$;$$"); + newXSproto(strcpy(buf, "GMKill"), XS_Client_GMKill, file, "$"); + newXSproto(strcpy(buf, "IsMedding"), XS_Client_IsMedding, file, "$"); + newXSproto(strcpy(buf, "GetDuelTarget"), XS_Client_GetDuelTarget, file, "$"); + newXSproto(strcpy(buf, "IsDueling"), XS_Client_IsDueling, file, "$"); + newXSproto(strcpy(buf, "SetDuelTarget"), XS_Client_SetDuelTarget, file, "$$"); + newXSproto(strcpy(buf, "SetDueling"), XS_Client_SetDueling, file, "$$"); + newXSproto(strcpy(buf, "ResetAA"), XS_Client_ResetAA, file, "$"); + newXSproto(strcpy(buf, "MemSpell"), XS_Client_MemSpell, file, "$$$;$"); + newXSproto(strcpy(buf, "UnmemSpell"), XS_Client_UnmemSpell, file, "$$;$"); + newXSproto(strcpy(buf, "UnmemSpellBySpellID"), XS_Client_UnmemSpellBySpellID, file, "$$"); + newXSproto(strcpy(buf, "UnmemSpellAll"), XS_Client_UnmemSpellAll, file, "$;$"); + newXSproto(strcpy(buf, "ScribeSpell"), XS_Client_ScribeSpell, file, "$$$;$"); + newXSproto(strcpy(buf, "UnscribeSpell"), XS_Client_UnscribeSpell, file, "$$;$"); + newXSproto(strcpy(buf, "UnscribeSpellAll"), XS_Client_UnscribeSpellAll, file, "$;$"); + newXSproto(strcpy(buf, "TrainDiscBySpellID"), XS_Client_TrainDiscBySpellID, file, "$$"); + newXSproto(strcpy(buf, "GetDiscSlotBySpellID"), XS_Client_GetDiscSlotBySpellID, file, "$$"); + newXSproto(strcpy(buf, "UntrainDisc"), XS_Client_UntrainDisc, file, "$$;$"); + newXSproto(strcpy(buf, "UntrainDiscAll"), XS_Client_UntrainDiscAll, file, "$;$"); + newXSproto(strcpy(buf, "IsSitting"), XS_Client_IsSitting, file, "$"); + newXSproto(strcpy(buf, "IsBecomeNPC"), XS_Client_IsBecomeNPC, file, "$"); + newXSproto(strcpy(buf, "GetBecomeNPCLevel"), XS_Client_GetBecomeNPCLevel, file, "$"); + newXSproto(strcpy(buf, "SetBecomeNPC"), XS_Client_SetBecomeNPC, file, "$$"); + newXSproto(strcpy(buf, "SetBecomeNPCLevel"), XS_Client_SetBecomeNPCLevel, file, "$$"); + newXSproto(strcpy(buf, "SetFeigned"), XS_Client_SetFeigned, file, "$$"); + newXSproto(strcpy(buf, "GetFeigned"), XS_Client_GetFeigned, file, "$"); + newXSproto(strcpy(buf, "AutoSplitEnabled"), XS_Client_AutoSplitEnabled, file, "$"); + newXSproto(strcpy(buf, "SetHorseId"), XS_Client_SetHorseId, file, "$$"); + newXSproto(strcpy(buf, "GetHorseId"), XS_Client_GetHorseId, file, "$"); + newXSproto(strcpy(buf, "NukeItem"), XS_Client_NukeItem, file, "$$;$"); + newXSproto(strcpy(buf, "SetTint"), XS_Client_SetTint, file, "$$$"); + newXSproto(strcpy(buf, "SetMaterial"), XS_Client_SetMaterial, file, "$$$"); + newXSproto(strcpy(buf, "Undye"), XS_Client_Undye, file, "$"); + newXSproto(strcpy(buf, "GetItemIDAt"), XS_Client_GetItemIDAt, file, "$$"); + newXSproto(strcpy(buf, "GetAugmentIDAt"), XS_Client_GetAugmentIDAt, file, "$$$"); + newXSproto(strcpy(buf, "DeleteItemInInventory"), XS_Client_DeleteItemInInventory, file, "$$;$$"); + newXSproto(strcpy(buf, "SummonItem"), XS_Client_SummonItem, file, "$$;$$$$$$$$"); + newXSproto(strcpy(buf, "SetStats"), XS_Client_SetStats, file, "$$$"); + newXSproto(strcpy(buf, "IncStats"), XS_Client_IncStats, file, "$$$"); + newXSproto(strcpy(buf, "DropItem"), XS_Client_DropItem, file, "$$"); + newXSproto(strcpy(buf, "BreakInvis"), XS_Client_BreakInvis, file, "$"); + newXSproto(strcpy(buf, "GetGroup"), XS_Client_GetGroup, file, "$"); + newXSproto(strcpy(buf, "LeaveGroup"), XS_Client_LeaveGroup, file, "$"); + newXSproto(strcpy(buf, "GetRaid"), XS_Client_GetRaid, file, "$"); + newXSproto(strcpy(buf, "IsGrouped"), XS_Client_IsGrouped, file, "$"); + newXSproto(strcpy(buf, "IsRaidGrouped"), XS_Client_IsRaidGrouped, file, "$"); + newXSproto(strcpy(buf, "Hungry"), XS_Client_Hungry, file, "$"); + newXSproto(strcpy(buf, "Thirsty"), XS_Client_Thirsty, file, "$"); + newXSproto(strcpy(buf, "GetInstrumentMod"), XS_Client_GetInstrumentMod, file, "$$"); + newXSproto(strcpy(buf, "DecreaseByID"), XS_Client_DecreaseByID, file, "$$$"); + newXSproto(strcpy(buf, "SlotConvert2"), XS_Client_SlotConvert2, file, "$$"); + newXSproto(strcpy(buf, "Escape"), XS_Client_Escape, file, "$"); + newXSproto(strcpy(buf, "RemoveNoRent"), XS_Client_RemoveNoRent, file, "$"); + newXSproto(strcpy(buf, "GoFish"), XS_Client_GoFish, file, "$"); + newXSproto(strcpy(buf, "ForageItem"), XS_Client_ForageItem, file, "$"); + newXSproto(strcpy(buf, "CalcPriceMod"), XS_Client_CalcPriceMod, file, "$;$$"); + newXSproto(strcpy(buf, "ResetTrade"), XS_Client_ResetTrade, file, "$"); + newXSproto(strcpy(buf, "UseDiscipline"), XS_Client_UseDiscipline, file, "$$$"); + newXSproto(strcpy(buf, "GetCharacterFactionLevel"), XS_Client_GetCharacterFactionLevel, file, "$$"); + newXSproto(strcpy(buf, "SetZoneFlag"), XS_Client_SetZoneFlag, file, "$$"); + newXSproto(strcpy(buf, "ClearZoneFlag"), XS_Client_ClearZoneFlag, file, "$$"); + newXSproto(strcpy(buf, "HasZoneFlag"), XS_Client_HasZoneFlag, file, "$$"); + newXSproto(strcpy(buf, "SendZoneFlagInfo"), XS_Client_SendZoneFlagInfo, file, "$$"); + newXSproto(strcpy(buf, "LoadZoneFlags"), XS_Client_LoadZoneFlags, file, "$"); + newXSproto(strcpy(buf, "SetAATitle"), XS_Client_SetAATitle, file, "$$;$"); + newXSproto(strcpy(buf, "GetClientVersion"), XS_Client_GetClientVersion, file, "$"); + newXSproto(strcpy(buf, "GetClientVersionBit"), XS_Client_GetClientVersionBit, file, "$"); + newXSproto(strcpy(buf, "SetTitleSuffix"), XS_Client_SetTitleSuffix, file, "$$;$"); + newXSproto(strcpy(buf, "SetAAPoints"), XS_Client_SetAAPoints, file, "$$"); + newXSproto(strcpy(buf, "GetAAPoints"), XS_Client_GetAAPoints, file, "$$"); + newXSproto(strcpy(buf, "GetSpentAA"), XS_Client_GetSpentAA, file, "$$"); + newXSproto(strcpy(buf, "AddAAPoints"), XS_Client_AddAAPoints, file, "$$"); + newXSproto(strcpy(buf, "RefundAA"), XS_Client_RefundAA, file, "$$"); + newXSproto(strcpy(buf, "GetModCharacterFactionLevel"), XS_Client_GetModCharacterFactionLevel, file, "$$"); + newXSproto(strcpy(buf, "GetLDoNWins"), XS_Client_GetLDoNWins, file, "$"); + newXSproto(strcpy(buf, "GetLDoNLosses"), XS_Client_GetLDoNLosses, file, "$"); + newXSproto(strcpy(buf, "GetLDoNWinsTheme"), XS_Client_GetLDoNWinsTheme, file, "$$"); + newXSproto(strcpy(buf, "GetLDoNLossesTheme"), XS_Client_GetLDoNLossesTheme, file, "$$"); + newXSproto(strcpy(buf, "GetItemAt"), XS_Client_GetItemAt, file, "$$"); + newXSproto(strcpy(buf, "GetAugmentAt"), XS_Client_GetAugmentAt, file, "$$$"); + newXSproto(strcpy(buf, "GetStartZone"), XS_Client_GetStartZone, file, "$"); + newXSproto(strcpy(buf, "SetStartZone"), XS_Client_SetStartZone, file, "$$"); + newXSproto(strcpy(buf, "KeyRingAdd"), XS_Client_KeyRingAdd, file, "$$"); + newXSproto(strcpy(buf, "KeyRingCheck"), XS_Client_KeyRingCheck, file, "$$"); + newXSproto(strcpy(buf, "AddPVPPoints"), XS_Client_AddPVPPoints, file, "$$"); + newXSproto(strcpy(buf, "AddCrystals"), XS_Client_AddCrystals, file, "$$"); + newXSproto(strcpy(buf, "GetPVPPoints"), XS_Client_GetPVPPoints, file, "$"); + newXSproto(strcpy(buf, "GetRadiantCrystals"), XS_Client_GetRadiantCrystals, file, "$"); + newXSproto(strcpy(buf, "GetEbonCrystals"), XS_Client_GetEbonCrystals, file, "$"); + newXSproto(strcpy(buf, "ReadBook"), XS_Client_ReadBook, file, "$$$"); + newXSproto(strcpy(buf, "UpdateGroupAAs"), XS_Client_UpdateGroupAAs, file, "$$$"); + newXSproto(strcpy(buf, "GetGroupPoints"), XS_Client_GetGroupPoints, file, "$"); + newXSproto(strcpy(buf, "GetRaidPoints"), XS_Client_GetRaidPoints, file, "$"); + newXSproto(strcpy(buf, "LearnRecipe"), XS_Client_LearnRecipe, file, "$$"); + newXSproto(strcpy(buf, "GetEndurance"), XS_Client_GetEndurance, file, "$"); + newXSproto(strcpy(buf, "GetMaxEndurance"), XS_Client_GetMaxEndurance, file, "$"); + newXSproto(strcpy(buf, "GetEnduranceRatio"), XS_Client_GetEnduranceRatio, file, "$"); + newXSproto(strcpy(buf, "SetEndurance"), XS_Client_SetEndurance, file, "$$"); + newXSproto(strcpy(buf, "SendOPTranslocateConfirm"), XS_Client_SendOPTranslocateConfirm, file, "$$$"); + newXSproto(strcpy(buf, "NPCSpawn"), XS_Client_NPCSpawn, file, "$$$;$"); + newXSproto(strcpy(buf, "GetIP"), XS_Client_GetIP, file, "$"); + newXSproto(strcpy(buf, "AddLevelBasedExp"), XS_Client_AddLevelBasedExp, file, "$$;$"); + newXSproto(strcpy(buf, "IncrementAA"), XS_Client_IncrementAA, file, "$$"); + newXSproto(strcpy(buf, "GrantAlternateAdvancementAbility"), XS_Client_GrantAlternateAdvancementAbility, file, + "$$$;$"); + newXSproto(strcpy(buf, "GetAALevel"), XS_Client_GetAALevel, file, "$$"); + newXSproto(strcpy(buf, "MarkCompassLoc"), XS_Client_MarkCompassLoc, file, "$$$$"); + newXSproto(strcpy(buf, "ClearCompassMark"), XS_Client_ClearCompassMark, file, "$"); + newXSproto(strcpy(buf, "GetFreeSpellBookSlot"), XS_Client_GetFreeSpellBookSlot, file, "$;$"); + newXSproto(strcpy(buf, "GetSpellBookSlotBySpellID"), XS_Client_GetSpellBookSlotBySpellID, file, "$$"); + newXSproto(strcpy(buf, "UpdateTaskActivity"), XS_Client_UpdateTaskActivity, file, "$$$$;$"); + newXSproto(strcpy(buf, "AssignTask"), XS_Client_AssignTask, file, "$$$;$"); + newXSproto(strcpy(buf, "FailTask"), XS_Client_FailTask, file, "$$"); + newXSproto(strcpy(buf, "IsTaskCompleted"), XS_Client_IsTaskCompleted, file, "$$"); + newXSproto(strcpy(buf, "IsTaskActive"), XS_Client_IsTaskActive, file, "$$"); + newXSproto(strcpy(buf, "IsTaskActivityActive"), XS_Client_IsTaskActivityActive, file, "$$$"); + newXSproto(strcpy(buf, "GetTaskActivityDoneCount"), XS_Client_GetTaskActivityDoneCount, file, "$$$"); + newXSproto(strcpy(buf, "GetCorpseCount"), XS_Client_GetCorpseCount, file, "$"); + newXSproto(strcpy(buf, "GetCorpseID"), XS_Client_GetCorpseID, file, "$$"); + newXSproto(strcpy(buf, "GetCorpseItemAt"), XS_Client_GetCorpseItemAt, file, "$$$"); + newXSproto(strcpy(buf, "AssignToInstance"), XS_Client_AssignToInstance, file, "$$"); + newXSproto(strcpy(buf, "Freeze"), XS_Client_Freeze, file, "$"); + newXSproto(strcpy(buf, "UnFreeze"), XS_Client_UnFreeze, file, "$"); + newXSproto(strcpy(buf, "GetAggroCount"), XS_Client_GetAggroCount, file, "$"); + newXSproto(strcpy(buf, "GetCarriedMoney"), XS_Client_GetCarriedMoney, file, "$"); + newXSproto(strcpy(buf, "GetAllMoney"), XS_Client_GetAllMoney, file, "$"); + newXSproto(strcpy(buf, "GetItemInInventory"), XS_Client_GetItemInInventory, file, "$$"); + newXSproto(strcpy(buf, "SetCustomItemData"), XS_Client_SetCustomItemData, file, "$$$$"); + newXSproto(strcpy(buf, "GetCustomItemData"), XS_Client_GetCustomItemData, file, "$$$"); + newXSproto(strcpy(buf, "OpenLFGuildWindow"), XS_Client_OpenLFGuildWindow, file, "$"); + newXSproto(strcpy(buf, "SignalClient"), XS_Client_SignalClient, file, "$"); + newXSproto(strcpy(buf, "AddAlternateCurrencyValue"), XS_Client_AddAlternateCurrencyValue, file, "$$$"); + newXSproto(strcpy(buf, "SendWebLink"), XS_Client_SendWebLink, file, "$:$"); + newXSproto(strcpy(buf, "GetInstanceID"), XS_Client_GetInstanceID, file, "$$"); + newXSproto(strcpy(buf, "HasSpellScribed"), XS_Client_HasSkill, file, "$$"); + newXSproto(strcpy(buf, "SetAccountFlag"), XS_Client_SetAccountFlag, file, "$$"); + newXSproto(strcpy(buf, "GetAccountFlag"), XS_Client_GetAccountFlag, file, "$$"); + newXSproto(strcpy(buf, "GetHunger"), XS_Client_GetHunger, file, "$$"); + newXSproto(strcpy(buf, "GetThirst"), XS_Client_GetThirst, file, "$$"); + newXSproto(strcpy(buf, "SetHunger"), XS_Client_SetHunger, file, "$$"); + newXSproto(strcpy(buf, "SetThirst"), XS_Client_SetThirst, file, "$$"); + newXSproto(strcpy(buf, "SetConsumption"), XS_Client_SetConsumption, file, "$$$"); + newXSproto(strcpy(buf, "SilentMessage"), XS_Client_SilentMessage, file, "$$"); + newXSproto(strcpy(buf, "PlayMP3"), XS_Client_PlayMP3, file, "$;$"); + newXSproto(strcpy(buf, "SendTargetCommand"), XS_Client_SendTargetCommand, file, "$$"); + newXSproto(strcpy(buf, "ExpeditionMessage"), XS_Client_ExpeditionMessage, file, "$$$"); + newXSproto(strcpy(buf, "SendMarqueeMessage"), XS_Client_SendMarqueeMessage, file, "$$$$$$$"); + newXSproto(strcpy(buf, "SendColoredText"), XS_Client_SendColoredText, file, "$$$"); + newXSproto(strcpy(buf, "SendSpellAnim"), XS_Client_SendSpellAnim, file, "$$$"); + newXSproto(strcpy(buf, "GetTargetRingX"), XS_Client_GetTargetRingX, file, "$$"); + newXSproto(strcpy(buf, "GetTargetRingY"), XS_Client_GetTargetRingY, file, "$$"); + newXSproto(strcpy(buf, "GetTargetRingZ"), XS_Client_GetTargetRingZ, file, "$$"); + newXSproto(strcpy(buf, "QuestReward"), XS_Client_QuestReward, file, "$$;$$$$$$$"); + newXSproto(strcpy(buf, "CalcEXP"), XS_Client_CalcEXP, file, "$"); + newXSproto(strcpy(buf, "GetMoney"), XS_Client_GetMoney, file, "$$$"); + newXSproto(strcpy(buf, "GetAccountAge"), XS_Client_GetAccountAge, file, "$"); + newXSproto(strcpy(buf, "Popup2"), XS_Client_Popup2, file, "$$$;$$$$$$$"); + XSRETURN_YES; } #endif //EMBPERL_XS_CLASSES From 0786b1158aa8b8bea1d217bd2adc5232276a0566 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 18:16:23 -0500 Subject: [PATCH 228/670] Add initial perl-doc-parser.pl for Client --- utils/scripts/perl-doc-parser.pl | 64 ++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100755 utils/scripts/perl-doc-parser.pl diff --git a/utils/scripts/perl-doc-parser.pl b/utils/scripts/perl-doc-parser.pl new file mode 100755 index 000000000..e64ea85d6 --- /dev/null +++ b/utils/scripts/perl-doc-parser.pl @@ -0,0 +1,64 @@ +use File::Find; +use Data::Dumper; + +my @files; +my $start_dir = "zone/"; +find( + sub { push @files, $File::Find::name unless -d; }, + $start_dir +); +for my $file (@files) { + + #::: Skip non Perl files + if($file!~/perl_/i){ + next; + } + + @methods = (); + + #::: Open File + print "Opening '" . $file . "'\n"; + open (FILE, $file); + while () { + chomp; + $line = $_; + + if ($line=~/Client::/i) { + + $split_key = "Client::"; + $object_prefix = "\$client->"; + + #::: Split on croak usage + @data = split($split_key, $line); + $usage = trim($data[1]); + + #::: Split out param borders and get method name + @params_begin = split('\(', $usage); + $method_name = trim($params_begin[0]); + + #::: Get params string built + @params_end = split('\)', $params_begin[1]); + $params_string = trim($params_end[0]); + $params_string =~s/THIS\,//g; + $params_string =~s/THIS//g; + $params_string = trim($params_string); + + $method = $object_prefix . $method_name . "(" . lc($params_string) . ")\n"; + + push @methods, $method; + } + } + + @methods = sort @methods; + foreach $method (@methods) { + print $method; + } +} + +#::: Trim Whitespaces +sub trim { + my $string = $_[0]; + $string =~ s/^\s+//; + $string =~ s/\s+$//; + return $string; +} \ No newline at end of file From 1a1cce859ab76bde06f41257151582311c807165 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 19:26:50 -0500 Subject: [PATCH 229/670] Update perl_mob.cpp croak usage blocks --- zone/perl_mob.cpp | 333 +++++++++++++++++++++------------------------- 1 file changed, 148 insertions(+), 185 deletions(-) diff --git a/zone/perl_mob.cpp b/zone/perl_mob.cpp index a085309d8..82e22132a 100644 --- a/zone/perl_mob.cpp +++ b/zone/perl_mob.cpp @@ -529,7 +529,7 @@ XS(XS_Mob_BehindMob) { dXSARGS; if (items < 1 || items > 4) - Perl_croak(aTHX_ "Usage: Mob::BehindMob(THIS, other= 0, playerx= 0.0f, playery= 0.0f)"); + Perl_croak(aTHX_ "Usage: Mob::BehindMob(THIS, Mob* other = 0, [float x = 0.0f], [float y= 0.0f])"); { Mob * THIS; bool RETVAL; @@ -583,7 +583,7 @@ XS(XS_Mob_SetLevel) { dXSARGS; if (items < 2 || items > 3) - Perl_croak(aTHX_ "Usage: Mob::SetLevel(THIS, in_level, command= false)"); + Perl_croak(aTHX_ "Usage: Mob::SetLevel(THIS, uint8 in_level, [bool command = false])"); { Mob * THIS; uint8 in_level = (uint8)SvUV(ST(1)); @@ -614,7 +614,7 @@ XS(XS_Mob_GetSkill) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::GetSkill(THIS, skill_num)"); + Perl_croak(aTHX_ "Usage: Mob::GetSkill(THIS, int skill_id)"); { Mob * THIS; uint32 RETVAL; @@ -641,7 +641,7 @@ XS(XS_Mob_SendWearChange) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::SendWearChange(THIS, material_slot)"); + Perl_croak(aTHX_ "Usage: Mob::SendWearChange(THIS, uint8 material_slot)"); { Mob * THIS; uint8 material_slot = (uint8)SvUV(ST(1)); @@ -665,7 +665,7 @@ XS(XS_Mob_GetEquipment) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::GetEquipment(THIS, material_slot)"); + Perl_croak(aTHX_ "Usage: Mob::GetEquipment(THIS, uint8 material_slot)"); { Mob * THIS; int32 RETVAL; @@ -692,7 +692,7 @@ XS(XS_Mob_GetEquipmentMaterial) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::GetEquipmentMaterial(THIS, material_slot)"); + Perl_croak(aTHX_ "Usage: Mob::GetEquipmentMaterial(THIS, uint8 material_slot)"); { Mob * THIS; int32 RETVAL; @@ -719,7 +719,7 @@ XS(XS_Mob_GetEquipmentColor) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::GetEquipmentColor(THIS, material_slot)"); + Perl_croak(aTHX_ "Usage: Mob::GetEquipmentColor(THIS, uint8 material_slot)"); { Mob * THIS; int32 RETVAL; @@ -746,7 +746,7 @@ XS(XS_Mob_GetArmorTint) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::GetArmorTint(THIS, material_slot)"); + Perl_croak(aTHX_ "Usage: Mob::GetArmorTint(THIS, uint8 material_slot)"); { Mob * THIS; int32 RETVAL; @@ -845,7 +845,7 @@ XS(XS_Mob_Attack) { dXSARGS; if (items < 2 || items > 4) - Perl_croak(aTHX_ "Usage: Mob::Attack(THIS, other, Hand= 13, FromRiposte= false)"); + Perl_croak(aTHX_ "Usage: Mob::Attack(THIS, Mob* other, [int hand = 13 [prim|sec]], [bool from_riposte = false])"); { Mob * THIS; bool RETVAL; @@ -895,7 +895,7 @@ XS(XS_Mob_Damage) { dXSARGS; if (items < 5 || items > 8) - Perl_croak(aTHX_ "Usage: Mob::Damage(THIS, from, damage, spell_id, attack_skill, avoidable= true, buffslot= -1, iBuffTic= false)"); + Perl_croak(aTHX_ "Usage: Mob::Damage(THIS, Mob* from, int32 damage, uint16 spell_id, int attack_skill, [bool avoidable = true], [int8 buffslot = -1], [bool buff_tic = false])"); { Mob * THIS; Mob* from; @@ -952,7 +952,7 @@ XS(XS_Mob_RangedAttack) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::RangedAttack(THIS, other)"); + Perl_croak(aTHX_ "Usage: Mob::RangedAttack(THIS, Mob* other)"); { Mob * THIS; Mob* other; @@ -985,7 +985,7 @@ XS(XS_Mob_ThrowingAttack) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::ThrowingAttack(THIS, other)"); + Perl_croak(aTHX_ "Usage: Mob::ThrowingAttack(THIS, Mob* other)"); { Mob * THIS; Mob* other; @@ -1042,7 +1042,7 @@ XS(XS_Mob_HealDamage) { dXSARGS; if (items < 2 || items > 3) - Perl_croak(aTHX_ "Usage: Mob::HealDamage(THIS, amount, caster = 0)"); + Perl_croak(aTHX_ "Usage: Mob::HealDamage(THIS, int32 amount, [Mob* caster = 0])"); { Mob * THIS; int32 heal_amt = (int32)SvIV(ST(1)); @@ -1102,7 +1102,7 @@ XS(XS_Mob_GetLevelCon) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::GetLevelCon(THIS, iOtherLevel)"); + Perl_croak(aTHX_ "Usage: Mob::GetLevelCon(THIS, uint8 other_level)"); { Mob * THIS; uint32 RETVAL; @@ -1129,7 +1129,7 @@ XS(XS_Mob_SetHP) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::SetHP(THIS, hp)"); + Perl_croak(aTHX_ "Usage: Mob::SetHP(THIS, int32 hp)"); { Mob * THIS; int32 hp = (int32)SvIV(ST(1)); @@ -1153,7 +1153,7 @@ XS(XS_Mob_DoAnim) { dXSARGS; if (items < 2 || items > 3) - Perl_croak(aTHX_ "Usage: Mob::DoAnim(THIS, animnum, type=0)"); + Perl_croak(aTHX_ "Usage: Mob::DoAnim(THIS, int animation_number, [int type = 0])"); { Mob * THIS; int animnum = (int)SvIV(ST(1)); @@ -1184,7 +1184,7 @@ XS(XS_Mob_ChangeSize) { dXSARGS; if (items < 2 || items > 3) - Perl_croak(aTHX_ "Usage: Mob::ChangeSize(THIS, in_size, bNoRestriction= false)"); + Perl_croak(aTHX_ "Usage: Mob::ChangeSize(THIS, float in_size, [bool no_restriction = false])"); { Mob * THIS; float in_size = (float)SvNV(ST(1)); @@ -1215,7 +1215,7 @@ XS(XS_Mob_GMMove) { dXSARGS; if (items < 4 || items > 5) - Perl_croak(aTHX_ "Usage: Mob::GMMove(THIS, x, y, z, heading= 0.01)"); + Perl_croak(aTHX_ "Usage: Mob::GMMove(THIS, float x, float y, float z, [float heading = 0.01])"); { Mob * THIS; float x = (float)SvNV(ST(1)); @@ -1248,7 +1248,7 @@ XS(XS_Mob_SendPosUpdate) { dXSARGS; if (items < 1 || items > 2) - Perl_croak(aTHX_ "Usage: Mob::SendPosUpdate(THIS, iSendToSelf= 0)"); + Perl_croak(aTHX_ "Usage: Mob::SendPosUpdate(THIS, [uint8 send_to_self = 0])"); { Mob * THIS; uint8 iSendToSelf; @@ -1327,7 +1327,7 @@ XS(XS_Mob_IsInvisible) { dXSARGS; if (items < 1 || items > 2) - Perl_croak(aTHX_ "Usage: Mob::IsInvisible(THIS, other= 0)"); + Perl_croak(aTHX_ "Usage: Mob::IsInvisible(THIS, [Mob* other = 0])"); { Mob * THIS; bool RETVAL; @@ -1367,7 +1367,7 @@ XS(XS_Mob_SetInvisible) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::SetInvisible(THIS, state)"); + Perl_croak(aTHX_ "Usage: Mob::SetInvisible(THIS, uint8 state)"); { Mob * THIS; uint8 state = (uint8)SvUV(ST(1)); @@ -1391,7 +1391,7 @@ XS(XS_Mob_FindBuff) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::FindBuff(THIS, spellid)"); + Perl_croak(aTHX_ "Usage: Mob::FindBuff(THIS, uint16 spell_id)"); { Mob * THIS; bool RETVAL; @@ -1418,7 +1418,7 @@ XS(XS_Mob_FindType) { dXSARGS; if (items < 2 || items > 4) - Perl_croak(aTHX_ "Usage: Mob::FindType(THIS, type, bOffensive= false, threshold= 100)"); + Perl_croak(aTHX_ "Usage: Mob::FindType(THIS, uint8 type, [bool offensive = false], [uint16 threshold = 100])"); { Mob * THIS; bool RETVAL; @@ -1459,7 +1459,7 @@ XS(XS_Mob_GetBuffSlotFromType) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::GetBuffSlotFromType(THIS, type)"); + Perl_croak(aTHX_ "Usage: Mob::GetBuffSlotFromType(THIS, uint16 type)"); { Mob * THIS; int8 RETVAL; @@ -1486,7 +1486,7 @@ XS(XS_Mob_MakePet) { dXSARGS; if (items < 3 || items > 4) - Perl_croak(aTHX_ "Usage: Mob::MakePet(THIS, spell_id, pettype, name=nullptr)"); + Perl_croak(aTHX_ "Usage: Mob::MakePet(THIS, uint16 spell_id, string pet_type, [string name = nullptr])"); { Mob * THIS; uint16 spell_id = (uint16)SvUV(ST(1)); @@ -1518,7 +1518,7 @@ XS(XS_Mob_MakeTempPet) { dXSARGS; if (items < 2 || items > 6) - Perl_croak(aTHX_ "Usage: Mob::MakeTempPet(THIS, spell_id, name=nullptr, duration=0, target=nullptr, sticktarg=0)"); + Perl_croak(aTHX_ "Usage: Mob::MakeTempPet(THIS, uint16 spell_id, [string name = nullptr], [uint32 duration = 0], [Mob* target = nullptr], [bool sticktarg = 0])"); { Mob * THIS; uint16 spell_id = (uint16)SvUV(ST(1)); @@ -1571,7 +1571,7 @@ XS(XS_Mob_TypesTempPet) { dXSARGS; if (items < 2 || items > 7) - Perl_croak(aTHX_ "Usage: Mob::TypesTempPet(THIS, typesid, name=nullptr, duration=0, follow=0, target=nullptr, sticktarg=0,)"); + Perl_croak(aTHX_ "Usage: Mob::TypesTempPet(THIS, uint32 type_id, [string name = nullptr], [uint32 duration = 0], [bool follow = 0], [Mob* target = nullptr], [bool stick_targ = 0])"); { Mob * THIS; uint32 typesid = (uint32)SvUV(ST(1)); @@ -3177,7 +3177,7 @@ XS(XS_Mob_GetActSpellRange) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Mob::GetActSpellRange(THIS, spell_id, range)"); + Perl_croak(aTHX_ "Usage: Mob::GetActSpellRange(THIS, uint16 spell_id, float range)"); { Mob * THIS; float RETVAL; @@ -3205,7 +3205,7 @@ XS(XS_Mob_GetActSpellDamage) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Mob::GetActSpellDamage(THIS, spell_id, value)"); + Perl_croak(aTHX_ "Usage: Mob::GetActSpellDamage(THIS, uint16 spell_id, int32 value)"); { Mob * THIS; int32 RETVAL; @@ -3233,7 +3233,7 @@ XS(XS_Mob_GetActSpellHealing) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Mob::GetActSpellHealing(THIS, spell_id, value)"); + Perl_croak(aTHX_ "Usage: Mob::GetActSpellHealing(THIS, uint16 spell_id, int32 value)"); { Mob * THIS; int32 RETVAL; @@ -3261,7 +3261,7 @@ XS(XS_Mob_GetActSpellCost) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Mob::GetActSpellCost(THIS, spell_id, cost)"); + Perl_croak(aTHX_ "Usage: Mob::GetActSpellCost(THIS, uint16 spell_id, int32 cost)"); { Mob * THIS; int32 RETVAL; @@ -3289,7 +3289,7 @@ XS(XS_Mob_GetActSpellDuration) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Mob::GetActSpellDuration(THIS, spell_id, duration)"); + Perl_croak(aTHX_ "Usage: Mob::GetActSpellDuration(THIS, uint16 spell_id, int32 duration)"); { Mob * THIS; int32 RETVAL; @@ -3317,7 +3317,7 @@ XS(XS_Mob_GetActSpellCasttime) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Mob::GetActSpellCasttime(THIS, spell_id, casttime)"); + Perl_croak(aTHX_ "Usage: Mob::GetActSpellCasttime(THIS, uint16 spell_id, uint32 cast_time)"); { Mob * THIS; int32 RETVAL; @@ -3345,7 +3345,7 @@ XS(XS_Mob_ResistSpell) { dXSARGS; if (items != 4) - Perl_croak(aTHX_ "Usage: Mob::ResistSpell(THIS, ressit_type, spell_id, caster)"); + Perl_croak(aTHX_ "Usage: Mob::ResistSpell(THIS, uint8 resist_type, uint16 spell_id, [Mob* caster = nullptr])"); { Mob * THIS; double RETVAL; @@ -3383,7 +3383,7 @@ XS(XS_Mob_GetSpecializeSkillValue) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::GetSpecializeSkillValue(THIS, spell_id)"); + Perl_croak(aTHX_ "Usage: Mob::GetSpecializeSkillValue(THIS, uint16 spell_id)"); { Mob * THIS; uint16 RETVAL; @@ -3823,7 +3823,7 @@ XS(XS_Mob_Message) { dXSARGS; if (items < 3) - Perl_croak(aTHX_ "Usage: Mob::Message(THIS, type, message, ...)"); + Perl_croak(aTHX_ "Usage: Mob::Message(THIS, uint32 emote_color_type, string message)"); { Mob * THIS; uint32 type = (uint32)SvUV(ST(1)); @@ -3848,7 +3848,7 @@ XS(XS_Mob_Message_StringID) { dXSARGS; if (items < 3 || items > 4) - Perl_croak(aTHX_ "Usage: Mob::Message_StringID(THIS, type, string_id, distance= 0)"); + Perl_croak(aTHX_ "Usage: Mob::Message_StringID(THIS, uint32 emote_color_type, uint32 string_id, [uint32 distance = 0])"); { Mob * THIS; uint32 type = (uint32)SvUV(ST(1)); @@ -3880,7 +3880,7 @@ XS(XS_Mob_Say) { dXSARGS; if (items < 2) - Perl_croak(aTHX_ "Usage: Mob::Say(THIS, format, ...)"); + Perl_croak(aTHX_ "Usage: Mob::Say(THIS, string message)"); { Mob * THIS; char * format = (char *)SvPV_nolen(ST(1)); @@ -3904,7 +3904,7 @@ XS(XS_Mob_Shout) { dXSARGS; if (items < 2) - Perl_croak(aTHX_ "Usage: Mob::Shout(THIS, format, ...)"); + Perl_croak(aTHX_ "Usage: Mob::Shout(THIS, string message)"); { Mob * THIS; char * format = (char *)SvPV_nolen(ST(1)); @@ -3928,7 +3928,7 @@ XS(XS_Mob_Emote) { dXSARGS; if (items < 2) - Perl_croak(aTHX_ "Usage: Mob::Emote(THIS, format, ...)"); + Perl_croak(aTHX_ "Usage: Mob::Emote(THIS, string message)"); { Mob * THIS; char * format = (char *)SvPV_nolen(ST(1)); @@ -3952,7 +3952,7 @@ XS(XS_Mob_InterruptSpell) { dXSARGS; if (items < 1 || items > 2) - Perl_croak(aTHX_ "Usage: Mob::InterruptSpell(THIS, spellid= 0xFFFF)"); + Perl_croak(aTHX_ "Usage: Mob::InterruptSpell(THIS, [uint16 spell_id = 0xFFFF])"); { Mob * THIS; uint16 spellid; @@ -3982,7 +3982,7 @@ XS(XS_Mob_CastSpell) { dXSARGS; if (items < 3 || items > 7) - Perl_croak(aTHX_ "Usage: Mob::CastSpell(THIS, spell_id, target_id, slot= 22, casttime= -1, mana_cost= -1, resist_adjust = 0)"); + Perl_croak(aTHX_ "Usage: Mob::CastSpell(THIS, uint16 spell_id, uint16 target_id, [int slot = 22], [int32 cast_time = -1], [int32 mana_cost = -1], [int16 resist_adjust = 0])"); { Mob * THIS; uint16 spell_id = (uint16)SvUV(ST(1)); @@ -4041,7 +4041,7 @@ XS(XS_Mob_SpellFinished) { dXSARGS; if (items < 2 || items > 5) - Perl_croak(aTHX_ "Usage: Mob::SpellFinished(spell_id, spell_target = this, mana_cost = 0, resist_diff = 0)"); + Perl_croak(aTHX_ "Usage: Mob::SpellFinished(uint16 spell_id, [Mob* spell_target = this], [uint16 mana_cost = 0], [uint16 resist_diff = 0])"); { Mob * THIS; uint16 spell_id = (uint16)SvUV(ST(1)); @@ -4095,7 +4095,7 @@ XS(XS_Mob_IsImmuneToSpell) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Mob::IsImmuneToSpell(THIS, spell_id, caster)"); + Perl_croak(aTHX_ "Usage: Mob::IsImmuneToSpell(THIS, uint16 spell_id, [Mob* caster = nullptr])"); { Mob * THIS; bool RETVAL; @@ -4132,7 +4132,7 @@ XS(XS_Mob_BuffFadeBySpellID) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::BuffFadeBySpellID(THIS, spell_id)"); + Perl_croak(aTHX_ "Usage: Mob::BuffFadeBySpellID(THIS, uint16 spell_id)"); { Mob * THIS; uint16 spell_id = (uint16)SvUV(ST(1)); @@ -4156,7 +4156,7 @@ XS(XS_Mob_BuffFadeByEffect) { dXSARGS; if (items < 2 || items > 3) - Perl_croak(aTHX_ "Usage: Mob::BuffFadeByEffect(THIS, effectid, skipslot= -1)"); + Perl_croak(aTHX_ "Usage: Mob::BuffFadeByEffect(THIS, int effect_id, int skip_slot = -1)"); { Mob * THIS; int effectid = (int)SvIV(ST(1)); @@ -4210,7 +4210,7 @@ XS(XS_Mob_BuffFadeBySlot) { dXSARGS; if (items < 2 || items > 3) - Perl_croak(aTHX_ "Usage: Mob::BuffFadeBySlot(THIS, slot, iRecalcBonuses= true)"); + Perl_croak(aTHX_ "Usage: Mob::BuffFadeBySlot(THIS, int slot, bool recalc_bonuses = true)"); { Mob * THIS; int slot = (int)SvIV(ST(1)); @@ -4241,7 +4241,7 @@ XS(XS_Mob_CanBuffStack) { dXSARGS; if (items < 3 || items > 4) - Perl_croak(aTHX_ "Usage: Mob::CanBuffStack(THIS, spellid, caster_level, iFailIfOverwrite= false)"); + Perl_croak(aTHX_ "Usage: Mob::CanBuffStack(THIS, uint16 spell_id, uint8 caster_level, [bool fail_if_overwritten = false])"); { Mob * THIS; int RETVAL; @@ -4328,7 +4328,7 @@ XS(XS_Mob_SetAppearance) { dXSARGS; if (items < 2 || items > 3) - Perl_croak(aTHX_ "Usage: Mob::SetAppearance(THIS, app, iIgnoreSelf= true)"); + Perl_croak(aTHX_ "Usage: Mob::SetAppearance(THIS, int appearance [0|1|2|3|4], [ignore_self = true])"); { Mob * THIS; EmuAppearance app = (EmuAppearance)SvUV(ST(1)); @@ -4411,7 +4411,7 @@ XS(XS_Mob_SetRunAnimSpeed) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::SetRunAnimSpeed(THIS, in)"); + Perl_croak(aTHX_ "Usage: Mob::SetRunAnimSpeed(THIS, int8 speed)"); { Mob * THIS; int8 in = (int8)SvIV(ST(1)); @@ -4435,7 +4435,7 @@ XS(XS_Mob_SetPetID) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::SetPetID(THIS, NewPetID)"); + Perl_croak(aTHX_ "Usage: Mob::SetPetID(THIS, uint16 new_pet_id)"); { Mob * THIS; uint16 NewPetID = (uint16)SvUV(ST(1)); @@ -4485,7 +4485,7 @@ XS(XS_Mob_SetOwnerID) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::SetOwnerID(THIS, NewOwnerID)"); + Perl_croak(aTHX_ "Usage: Mob::SetOwnerID(THIS, uint16 new_owner_id)"); { Mob * THIS; uint16 NewOwnerID = (uint16)SvUV(ST(1)); @@ -4587,7 +4587,7 @@ XS(XS_Mob_Stun) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::Stun(THIS, duration)"); + Perl_croak(aTHX_ "Usage: Mob::Stun(THIS, int duration)"); { Mob * THIS; int duration = (int)SvIV(ST(1)); @@ -4657,7 +4657,7 @@ XS(XS_Mob_SetInvul) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::SetInvul(THIS, invul)"); + Perl_croak(aTHX_ "Usage: Mob::SetInvul(THIS, bool set_invulnerable)"); { Mob * THIS; bool invul = (bool)SvTRUE(ST(1)); @@ -4707,7 +4707,7 @@ XS(XS_Mob_SetExtraHaste) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::SetExtraHaste(THIS, Haste)"); + Perl_croak(aTHX_ "Usage: Mob::SetExtraHaste(THIS, int haste)"); { Mob * THIS; int Haste = (int)SvIV(ST(1)); @@ -5306,7 +5306,7 @@ XS(XS_Mob_AddToHateList) { dXSARGS; if (items < 2 || items > 7) - Perl_croak(aTHX_ "Usage: Mob::AddToHateList(THIS, other, hate= 0, damage= 0, iYellForHelp= true, bFrenzy= false, iBuffTic= false)"); + Perl_croak(aTHX_ "Usage: Mob::AddToHateList(THIS, Mob* other, [int32 hate = 0], [int32 damage = 0], [bool yell_for_help = true], [bool frenzy = false], [bool buff_tic = false])"); { Mob * THIS; Mob* other; @@ -5374,7 +5374,7 @@ XS(XS_Mob_SetHate) { dXSARGS; if (items < 2 || items > 4) - Perl_croak(aTHX_ "Usage: Mob::SetHate(THIS, other, hate= 0, damage= 0)"); + Perl_croak(aTHX_ "Usage: Mob::SetHate(THIS, Mob* other, [int32 hate = 0], [int32 damage = 0])"); { Mob * THIS; Mob* other; @@ -5421,7 +5421,7 @@ XS(XS_Mob_HalveAggro) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::HalveAggro(THIS, other)"); + Perl_croak(aTHX_ "Usage: Mob::HalveAggro(THIS, Mob* other)"); { Mob * THIS; Mob * other; @@ -5454,7 +5454,7 @@ XS(XS_Mob_DoubleAggro) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::DoubleAggro(THIS, other)"); + Perl_croak(aTHX_ "Usage: Mob::DoubleAggro(THIS, Mob* other)"); { Mob * THIS; Mob * other; @@ -5487,7 +5487,7 @@ XS(XS_Mob_GetHateAmount) { dXSARGS; if (items < 2 || items > 3) - Perl_croak(aTHX_ "Usage: Mob::GetHateAmount(THIS, tmob, is_dam= false)"); + Perl_croak(aTHX_ "Usage: Mob::GetHateAmount(THIS, Mob* mob, [bool is_damage = false])"); { Mob * THIS; uint32 RETVAL; @@ -5530,7 +5530,7 @@ XS(XS_Mob_GetDamageAmount) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::GetDamageAmount(THIS, tmob)"); + Perl_croak(aTHX_ "Usage: Mob::GetDamageAmount(THIS, Mob* target_mob)"); { Mob * THIS; uint32 RETVAL; @@ -5592,7 +5592,7 @@ XS(XS_Mob_GetHateDamageTop) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::GetHateDamageTop(THIS, other)"); + Perl_croak(aTHX_ "Usage: Mob::GetHateDamageTop(THIS, Mob* other)"); { Mob * THIS; Mob * RETVAL; @@ -5702,34 +5702,31 @@ XS(XS_Mob_HateSummon) } XS(XS_Mob_FaceTarget); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_FaceTarget) -{ +XS(XS_Mob_FaceTarget) { dXSARGS; if (items < 1 || items > 3) - Perl_croak(aTHX_ "Usage: Mob::FaceTarget(THIS, MobToFace= 0)"); + Perl_croak(aTHX_ "Usage: Mob::FaceTarget(THIS, [Mob* target = 0])"); { - Mob * THIS; - Mob* MobToFace; + Mob *THIS; + Mob *MobToFace; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 2) MobToFace = 0; else { if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - MobToFace = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + MobToFace = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "MobToFace is not of type Mob"); - if(MobToFace == nullptr) + if (MobToFace == nullptr) Perl_croak(aTHX_ "MobToFace is nullptr, avoiding crash."); } @@ -5743,7 +5740,7 @@ XS(XS_Mob_SetHeading) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::SetHeading(THIS, iHeading)"); + Perl_croak(aTHX_ "Usage: Mob::SetHeading(THIS, float heading)"); { Mob * THIS; float iHeading = (float)SvNV(ST(1)); @@ -5790,7 +5787,7 @@ XS(XS_Mob_CheckAggro) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::CheckAggro(THIS, other)"); + Perl_croak(aTHX_ "Usage: Mob::CheckAggro(THIS, Mob* other)"); { Mob * THIS; bool RETVAL; @@ -5826,7 +5823,7 @@ XS(XS_Mob_CalculateHeadingToTarget) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Mob::CalculateHeadingToTarget(THIS, in_x, in_y)"); + Perl_croak(aTHX_ "Usage: Mob::CalculateHeadingToTarget(THIS, float x, float y)"); { Mob * THIS; int8 RETVAL; @@ -5854,7 +5851,7 @@ XS(XS_Mob_CalculateNewPosition) { dXSARGS; if (items < 5 || items > 6) - Perl_croak(aTHX_ "Usage: Mob::CalculateNewPosition(THIS, x, y, z, speed, checkZ= false)"); + Perl_croak(aTHX_ "Usage: Mob::CalculateNewPosition(THIS, float x, float y, float z, float speed, [bool check_z = false])"); { Mob * THIS; bool RETVAL; @@ -5891,7 +5888,7 @@ XS(XS_Mob_CalculateDistance) { dXSARGS; if (items != 4) - Perl_croak(aTHX_ "Usage: Mob::CalculateDistance(THIS, x, y, z)"); + Perl_croak(aTHX_ "Usage: Mob::CalculateDistance(THIS, float x, float y, float z)"); { Mob * THIS; float RETVAL; @@ -5920,7 +5917,7 @@ XS(XS_Mob_SendTo) { dXSARGS; if (items != 4) - Perl_croak(aTHX_ "Usage: Mob::SendTo(THIS, new_x, new_y, new_z)"); + Perl_croak(aTHX_ "Usage: Mob::SendTo(THIS, float new_x, float new_y, float new_z)"); { Mob * THIS; float new_x = (float)SvNV(ST(1)); @@ -5946,7 +5943,7 @@ XS(XS_Mob_SendToFixZ) { dXSARGS; if (items != 4) - Perl_croak(aTHX_ "Usage: Mob::SendToFixZ(THIS, new_x, new_y, new_z)"); + Perl_croak(aTHX_ "Usage: Mob::SendToFixZ(THIS, float new_x, float new_y, float new_z)"); { Mob * THIS; float new_x = (float)SvNV(ST(1)); @@ -5972,7 +5969,7 @@ XS(XS_Mob_NPCSpecialAttacks) { dXSARGS; if (items < 3 || items > 5) - Perl_croak(aTHX_ "Usage: Mob::NPCSpecialAttacks(THIS, parse, permtag, [reset], [remove])"); + Perl_croak(aTHX_ "Usage: Mob::NPCSpecialAttacks(THIS, string abilities_string, int perm_tag, [bool reset = true], [bool remove = true])"); { Mob * THIS; char* parse = (char *)SvPV_nolen(ST(1)); @@ -6241,7 +6238,7 @@ XS(XS_Mob_GetLevelHP) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::GetLevelHP(THIS, tlevel)"); + Perl_croak(aTHX_ "Usage: Mob::GetLevelHP(THIS, uint8 level)"); { Mob * THIS; uint32 RETVAL; @@ -6294,7 +6291,7 @@ XS(XS_Mob_CheckAggroAmount) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::CheckAggroAmount(THIS, spellid)"); + Perl_croak(aTHX_ "Usage: Mob::CheckAggroAmount(THIS, uint16 spell_id)"); { Mob * THIS; uint32 RETVAL; @@ -6321,7 +6318,7 @@ XS(XS_Mob_CheckHealAggroAmount) { dXSARGS; if (items != 2 && items != 3) - Perl_croak(aTHX_ "Usage: Mob::CheckHealAggroAmount(THIS, spellid, possible_heal_amt)"); + Perl_croak(aTHX_ "Usage: Mob::CheckHealAggroAmount(THIS, uint16 spell_id, uint32 possible_heal_amt)"); { Mob * THIS; uint32 RETVAL; @@ -6354,7 +6351,7 @@ XS(XS_Mob_GetAA) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::GetAA(THIS, rank_id)"); + Perl_croak(aTHX_ "Usage: Mob::GetAA(THIS, uint32 rank_id)"); { Mob * THIS; uint32 RETVAL; @@ -6381,7 +6378,7 @@ XS(XS_Mob_GetAAByAAID) { dXSARGS; if(items != 2) - Perl_croak(aTHX_ "Usage: Mob::GetAAByAAID(THIS, aa_id)"); + Perl_croak(aTHX_ "Usage: Mob::GetAAByAAID(THIS, uint32 aa_id)"); { Mob * THIS; uint32 RETVAL; @@ -6408,7 +6405,7 @@ XS(XS_Mob_SetAA) { dXSARGS; if(items < 3 || items > 4) - Perl_croak(aTHX_ "Usage: Mob::SetAA(THIS, aa_id, points, [charges])"); + Perl_croak(aTHX_ "Usage: Mob::SetAA(THIS, int aa_id, int points, [int charges = 0])"); { Mob * THIS; bool RETVAL; @@ -6463,7 +6460,7 @@ XS(XS_Mob_AddFeignMemory) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::AddFeignMemory(THIS, attacker)"); + Perl_croak(aTHX_ "Usage: Mob::AddFeignMemory(THIS, Client* attacker)"); { Mob * THIS; Client* attacker; @@ -6496,7 +6493,7 @@ XS(XS_Mob_RemoveFromFeignMemory) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::RemoveFromFeignMemory(THIS, attacker)"); + Perl_croak(aTHX_ "Usage: Mob::RemoveFromFeignMemory(THIS, Client* attacker)"); { Mob * THIS; Client* attacker; @@ -6552,7 +6549,7 @@ XS(XS_Mob_SetOOCRegen) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::SetOOCRegen(THIS, newoocregen)"); + Perl_croak(aTHX_ "Usage: Mob::SetOOCRegen(THIS, int32 new_ooc_regen)"); { Mob * THIS; int32 newoocregen = (int32)SvIV(ST(1)); @@ -6576,7 +6573,7 @@ XS(XS_Mob_GetEntityVariable) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::GetEntityVariable(THIS, id)"); + Perl_croak(aTHX_ "Usage: Mob::GetEntityVariable(THIS, string id)"); { Mob * THIS; Const_char * id = SvPV_nolen(ST(1)); @@ -6603,7 +6600,7 @@ XS(XS_Mob_EntityVariableExists) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::EntityVariableExists(THIS, id)"); + Perl_croak(aTHX_ "Usage: Mob::EntityVariableExists(THIS, string id)"); { Mob * THIS; Const_char * id = SvPV_nolen(ST(1)); @@ -6630,7 +6627,7 @@ XS(XS_Mob_SetEntityVariable) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Mob::SetEntityVariable(THIS, id, var)"); + Perl_croak(aTHX_ "Usage: Mob::SetEntityVariable(THIS, string id, string var)"); { Mob * THIS; Const_char * id = SvPV_nolen(ST(1)); @@ -6686,46 +6683,12 @@ XS(XS_Mob_GetHateList) XSRETURN(num_entries); } -/* - dXSARGS; - int num_mobs = 0; - if (items != 1) - Perl_croak(aTHX_ "Usage: EntityList::GetCorpseList(THIS)"); - { - EntityList *THIS; - - if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else - Perl_croak(aTHX_ "THIS is not of type EntityList"); - - if(THIS == nullptr) - Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - - std::list corpse_list = entity_list.GetCorpseList(); - std::list::iterator iter = corpse_list.begin(); - - while(iter != corpse_list.end()) - { - Corpse *entry = (*iter); - ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Corpse", (void*)entry); - XPUSHs(ST(0)); - num_mobs++; - iter++; - } - } - XSRETURN(num_mobs); -*/ - XS(XS_Mob_SignalClient); /* prototype to pass -Wmissing-prototypes */ XS(XS_Mob_SignalClient) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Mob::SignalClient(THIS, client, data)"); + Perl_croak(aTHX_ "Usage: Mob::SignalClient(THIS, Client* client, uint32 data)"); { Mob * THIS; Client* client = nullptr; @@ -6759,7 +6722,7 @@ XS(XS_Mob_CombatRange) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::CombatRange(THIS, target)"); + Perl_croak(aTHX_ "Usage: Mob::CombatRange(THIS, Mob* target)"); { Mob * THIS; Mob * target = nullptr; @@ -6795,7 +6758,7 @@ XS(XS_Mob_DoSpecialAttackDamage) { dXSARGS; if (items < 4 || items > 6) - Perl_croak(aTHX_ "Usage: Mob::DoSpecialAttackDamage(THIS, target, skill, max_damage, min_damage = 1, hate_override = -1)"); + Perl_croak(aTHX_ "Usage: Mob::DoSpecialAttackDamage(THIS, Mob* target, int skill, int32 max_damage, [int32 min_damage = 1], [int32 hate_override = -11])"); { Mob * THIS; Mob* target; @@ -6842,7 +6805,7 @@ XS(XS_Mob_CheckLoS) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::CheckLoS(THIS, mob)"); + Perl_croak(aTHX_ "Usage: Mob::CheckLoS(THIS, Mob*)"); { Mob * THIS; Mob* mob; @@ -6878,7 +6841,7 @@ XS(XS_Mob_CheckLoSToLoc) { dXSARGS; if (items != 4 && items != 5) - Perl_croak(aTHX_ "Usage: Mob::CheckLoSToLoc(THIS, loc_x, loc_y, loc_z, mob_size)"); + Perl_croak(aTHX_ "Usage: Mob::CheckLoSToLoc(THIS, float x, float y, float z, float mob_size)"); { Mob * THIS; float loc_x = (float)SvNV(ST(1)); @@ -6915,7 +6878,7 @@ XS(XS_Mob_FindGroundZ) { dXSARGS; if (items != 3 && items != 4) - Perl_croak(aTHX_ "Usage: Mob::FindGroundZ(THIS, new_x, new_y, z_offset)"); + Perl_croak(aTHX_ "Usage: Mob::FindGroundZ(THIS, float x, float y, float z_offset)"); { Mob * THIS; float new_x = (float)SvNV(ST(1)); @@ -6951,7 +6914,7 @@ XS(XS_Mob_ProjectileAnim) { dXSARGS; if (items < 3 || items > 9) - Perl_croak(aTHX_ "Usage: Mob::ProjectileAnim(THIS, mob, item_id, IsArrow?, speed, angle, tilt, arc)"); + Perl_croak(aTHX_ "Usage: Mob::ProjectileAnim(THIS, Mob* mob, int item_id, [bool is_arrow = false], [float speed = 0], [float angle = 0], [float tilt = 0], [float arc = 0])"); { Mob * THIS; @@ -7011,7 +6974,7 @@ XS(XS_Mob_HasNPCSpecialAtk) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::HasNPCSpecialAtk(THIS, parse)"); + Perl_croak(aTHX_ "Usage: Mob::HasNPCSpecialAtk(THIS, string ability_string)"); { Mob * THIS; char* parse = (char *)SvPV_nolen(ST(1)); @@ -7038,7 +7001,7 @@ XS(XS_Mob_SendAppearanceEffect) { dXSARGS; if (items < 2 || items > 7) - Perl_croak(aTHX_ "Usage: Mob::SendAppearanceEffect(THIS, parm1, parm2, parm3, parm4, parm5, singleclient)"); + Perl_croak(aTHX_ "Usage: Mob::SendAppearanceEffect(THIS, int32 param_1, [int32 param_2 = 0], [int32 param_3 = 0], [int32 param_4 = 0], [int32 param_5 = 0], [Client* single_client_to_send_to = null])"); { Mob * THIS; int32 parm1 = (int32)SvIV(ST(1)); @@ -7082,7 +7045,7 @@ XS(XS_Mob_SetFlyMode) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::SetFlyMode(THIS, 0|1|2|3)"); + Perl_croak(aTHX_ "Usage: Mob::SetFlyMode(THIS, uint8 flymode[0|1|2|3])"); { Mob * THIS; uint8 flymode = (uint8)SvIV(ST(1)); @@ -7106,7 +7069,7 @@ XS(XS_Mob_SetTexture) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::SetTexture(THIS, texture)"); + Perl_croak(aTHX_ "Usage: Mob::SetTexture(THIS, int32 texture)"); { Mob * THIS; int32 texture = (int32)SvIV(ST(1)); @@ -7130,7 +7093,7 @@ XS(XS_Mob_SetRace) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::SetRace(THIS, race)"); + Perl_croak(aTHX_ "Usage: Mob::SetRace(THIS, int32 race)"); { Mob * THIS; int32 race = (int32)SvIV(ST(1)); @@ -7154,7 +7117,7 @@ XS(XS_Mob_SetGender) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::SetGender(THIS, gender)"); + Perl_croak(aTHX_ "Usage: Mob::SetGender(THIS, int32 gender)"); { Mob * THIS; int32 gender = (int32)SvIV(ST(1)); @@ -7178,7 +7141,7 @@ XS(XS_Mob_SendIllusion) { dXSARGS; if (items < 2 || items > 14) - Perl_croak(aTHX_ "Usage: Mob::SendIllusion(THIS,race,gender,texture,helmtexture,face,hairstyle,haircolor,beard,beardcolor,drakkin_heritage,drakkin_tattoo,drakkin_details,size)"); + Perl_croak(aTHX_ "Usage: Mob::SendIllusion(THIS, uint16 race, [uint8 gender = 0xFF], [uint8 texture = 0xFF], [unit8 helmtexture = 0xFF], [unit8 face = 0xFF], [unit8 hairstyle = 0xFF], [uint8 hair_color = 0xFF], [uint8 beard = 0xFF], [uint8 beard_color = 0xFF], [uint32 drakkin_heritage = 0xFFFFFFFF], [uint32 drakkin_tattoo = 0xFFFFFFFF], [uint32 drakkin_details = 0xFFFFFFFF], [float size = -1])"); { Mob * THIS; uint16 race = (uint16)SvIV(ST(1)); @@ -7228,7 +7191,7 @@ XS(XS_Mob_CameraEffect) { dXSARGS; if (items < 2 || items > 5) - Perl_croak(aTHX_ "Usage: Mob::CameraEffect(THIS, duration, intensity, singleclient, global)"); + Perl_croak(aTHX_ "Usage: Mob::CameraEffect(THIS, uint32 duration, [uint32 intensity = 0], [Client* single_client = nullptr], [bool is_world_wide = false])"); { Mob * THIS; uint32 duration = (uint32)SvUV(ST(1)); @@ -7273,7 +7236,7 @@ XS(XS_Mob_SpellEffect) { dXSARGS; if (items < 2 || items > 8) - Perl_croak(aTHX_ "Usage: Mob::SpellEffect(THIS, effect, [duration, finish_delay, zone_wide, unk20, perm_effect, client])"); + Perl_croak(aTHX_ "Usage: Mob::SpellEffect(THIS, uint32 effect, [uint32 duration = 5000], [uint32 finish_delay = 0], [bool zone_wide = false], [uint32 unk20 = 3000], [bool perm_effect = false], [Client* single_client])"); { Mob * THIS; uint32 effect = (uint32)SvUV(ST(1)); @@ -7322,7 +7285,7 @@ XS(XS_Mob_TempName) { dXSARGS; if (items < 1 || items > 2) - Perl_croak(aTHX_ "Usage: Mob::TempName(THIS, name)"); + Perl_croak(aTHX_ "Usage: Mob::TempName(THIS, string name)"); { Mob * THIS; char * name = nullptr; @@ -7348,7 +7311,7 @@ XS(XS_Mob_GetItemStat) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Mob::GetItemStat(THIS, itemid, stat)"); + Perl_croak(aTHX_ "Usage: Mob::GetItemStat(THIS, uint32 item_id, string stat)"); { Mob * THIS; int32 RETVAL; @@ -7376,7 +7339,7 @@ XS(XS_Mob_GetGlobal) { dXSARGS; if (items < 2) - Perl_croak(aTHX_ "Usage: GetGlobal(THIS, varname)"); + Perl_croak(aTHX_ "Usage: GetGlobal(THIS, string var_name)"); { Mob* THIS; Const_char* varname = (Const_char*)SvPV_nolen(ST(1)); @@ -7407,7 +7370,7 @@ XS(XS_Mob_SetGlobal) { dXSARGS; if (items < 5 || items > 6) - Perl_croak(aTHX_ "Usage: SetGlobal(THIS, varname, newvalue, options, duration, other=nullptr)"); + Perl_croak(aTHX_ "Usage: SetGlobal(THIS, string var_name, string new_value, int options, string duration, [Mob* other = nullptr])"); { Mob * THIS; char * varname = (char *)SvPV_nolen(ST(1)); @@ -7446,7 +7409,7 @@ XS(XS_Mob_TarGlobal) { dXSARGS; if (items != 7) - Perl_croak(aTHX_ "Usage: TarGlobal(THIS, varname, value, duration, npcid, charid, zoneid)"); + Perl_croak(aTHX_ "Usage: TarGlobal(THIS, string var_name, string value, string duration, int npc_id, int character_id, int zone_id)"); { Mob * THIS; char * varname = (char *)SvPV_nolen(ST(1)); @@ -7475,7 +7438,7 @@ XS(XS_Mob_DelGlobal) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: DelGlobal(THIS, varname)"); + Perl_croak(aTHX_ "Usage: DelGlobal(THIS, string var_name)"); { Mob * THIS; char * varname = (char *)SvPV_nolen(ST(1)); @@ -7499,7 +7462,7 @@ XS(XS_Mob_SetSlotTint) { dXSARGS; if (items != 5) - Perl_croak(aTHX_ "Usage: Mob::SetSlotTint(THIS, material_slot, red_tint, green_tint, blue_tint)"); + Perl_croak(aTHX_ "Usage: Mob::SetSlotTint(THIS, uint8 material_slot, uint8 red_tint, uint8 green_tint, uint8 blue_tint)"); { Mob * THIS; uint8 material_slot = (uint8)SvIV(ST(1)); @@ -7526,7 +7489,7 @@ XS(XS_Mob_WearChange) { dXSARGS; if (items < 3 || items > 4) - Perl_croak(aTHX_ "Usage: Mob::WearChange(THIS, material_slot, texture, [color, hero_forge_model])"); + Perl_croak(aTHX_ "Usage: Mob::WearChange(THIS, uint8 material_slot, uint16 texture, [uint32 color = 0, uint32 hero_forge_model = 0])"); { Mob * THIS; uint8 material_slot = (uint8)SvIV(ST(1)); @@ -7560,7 +7523,7 @@ XS(XS_Mob_DoKnockback) { dXSARGS; if (items != 4) - Perl_croak(aTHX_ "Usage: Mob::DoKnockback(THIS, caster, pushback, pushup)"); + Perl_croak(aTHX_ "Usage: Mob::DoKnockback(THIS, Mob* caster, uint32 push_back_amount, uint32 push_up_amount)"); { Mob * THIS; Mob * caster; @@ -7595,7 +7558,7 @@ XS(XS_Mob_RemoveNimbusEffect) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::RemoveNimbusEffect(THIS, effectid)"); + Perl_croak(aTHX_ "Usage: Mob::RemoveNimbusEffect(THIS, int32 effect_id)"); { Mob * THIS; int32 effectid = (int32)SvIV(ST(1)); @@ -7619,7 +7582,7 @@ XS(XS_Mob_SetRunning) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::SetRunning(THIS, value)"); + Perl_croak(aTHX_ "Usage: Mob::SetRunning(THIS, bool value)"); { Mob * THIS; bool value = (bool)SvTRUE(ST(1)); @@ -7670,7 +7633,7 @@ XS(XS_Mob_SetBodyType) { dXSARGS; if (items < 2 || items > 3) - Perl_croak(aTHX_ "Usage: Mob::SetBodyType(THIS, type, overwrite_orig = false)"); + Perl_croak(aTHX_ "Usage: Mob::SetBodyType(THIS, int32 type, [bool overwrite_orig = false])"); { Mob * THIS; int32 type = (int32)SvIV(ST(1)); @@ -7699,7 +7662,7 @@ XS(XS_Mob_SetDeltas) { dXSARGS; if (items != 5) - Perl_croak(aTHX_ "Usage: Mob::SetDeltas(THIS, delta_x, delta_y, delta_z, delta_h)"); + Perl_croak(aTHX_ "Usage: Mob::SetDeltas(THIS, float delta_x, float delta_y, float delta_z, float delta_h)"); { Mob * THIS; auto delta = glm::vec4((float)SvNV(ST(1)), (float)SvNV(ST(2)), (float)SvNV(ST(3)), (float)SvNV(ST(4))); @@ -7723,7 +7686,7 @@ XS(XS_Mob_SetLD) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::SetLD(THIS, value)"); + Perl_croak(aTHX_ "Usage: Mob::SetLD(THIS, bool value)"); { Mob * THIS; bool value = (bool)SvTRUE(ST(1)); @@ -7747,7 +7710,7 @@ XS(XS_Mob_SetTargetDestSteps) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::SetTargetDestSteps(THIS, target_steps)"); + Perl_croak(aTHX_ "Usage: Mob::SetTargetDestSteps(THIS, uint8 target_steps)"); { Mob * THIS; uint8 target_steps = (uint8)SvIV(ST(1)); @@ -7771,7 +7734,7 @@ XS(XS_Mob_SetTargetable) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::SetTargetable(THIS, on)"); + Perl_croak(aTHX_ "Usage: Mob::SetTargetable(THIS, bool targetable)"); { Mob * THIS; bool on = (bool)SvTRUE(ST(1)); @@ -7795,7 +7758,7 @@ XS(XS_Mob_ModSkillDmgTaken) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Mob::ModSkillDmgTaken(THIS, skill, value)"); + Perl_croak(aTHX_ "Usage: Mob::ModSkillDmgTaken(THIS, int skill, int16 value)"); { Mob * THIS; EQEmu::skills::SkillType skill_num = (EQEmu::skills::SkillType)SvUV(ST(1)); @@ -7820,7 +7783,7 @@ XS(XS_Mob_GetModSkillDmgTaken) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::GetModSkillDmgTaken(THIS, skill_num)"); + Perl_croak(aTHX_ "Usage: Mob::GetModSkillDmgTaken(THIS, int skill_id)"); { Mob * THIS; int16 RETVAL; @@ -7847,7 +7810,7 @@ XS(XS_Mob_GetSkillDmgTaken) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::GetSkillDmgTaken(THIS, skill_num)"); + Perl_croak(aTHX_ "Usage: Mob::GetSkillDmgTaken(THIS, int skill_id)"); { Mob * THIS; int32 RETVAL; @@ -7874,7 +7837,7 @@ XS(XS_Mob_SetAllowBeneficial) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::SetAllowBeneficial(THIS, value)"); + Perl_croak(aTHX_ "Usage: Mob::SetAllowBeneficial(THIS, bool value)"); { Mob * THIS; bool value = (bool)SvTRUE(ST(1)); @@ -7924,7 +7887,7 @@ XS(XS_Mob_IsBeneficialAllowed) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::IsBeneficialAllowed(THIS, target)"); + Perl_croak(aTHX_ "Usage: Mob::IsBeneficialAllowed(THIS, Mob* target)"); { dXSTARG; Mob * THIS; @@ -7961,7 +7924,7 @@ XS(XS_Mob_ModVulnerability) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Mob::ModVulnerability(THIS, resist, value)"); + Perl_croak(aTHX_ "Usage: Mob::ModVulnerability(THIS, uint8 resist, int16 value)"); { Mob * THIS; uint8 resist = (uint8)SvIV(ST(1)); @@ -7986,7 +7949,7 @@ XS(XS_Mob_GetModVulnerability) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::GetModVulnerability(THIS, resist)"); + Perl_croak(aTHX_ "Usage: Mob::GetModVulnerability(THIS, uint8 resist)"); { Mob * THIS; int32 RETVAL; @@ -8013,7 +7976,7 @@ XS(XS_Mob_DoMeleeSkillAttackDmg) { dXSARGS; if (items != 7) - Perl_croak(aTHX_ "Usage: Mob::DoMeleeSkillAttackDmg(THIS, target, weapon_damage, skill, chance_mod, focus, CanRiposte)"); + Perl_croak(aTHX_ "Usage: Mob::DoMeleeSkillAttackDmg(THIS, Mob* target, uint16 weapon_damage, int skill, int16 chance_mod, int16 focus, uint8 can_riposte)"); { Mob * THIS; Mob* target; @@ -8051,7 +8014,7 @@ XS(XS_Mob_DoArcheryAttackDmg) { dXSARGS; if (items != 7) - Perl_croak(aTHX_ "Usage: Mob::DoArcheryAttackDmg(THIS, target, RangeWeapon=nullptr, Ammo=nullptr, weapon_damage, chance_mod, focus)"); + Perl_croak(aTHX_ "Usage: Mob::DoArcheryAttackDmg(THIS, Mob* target, [range_weapon_item_instance = nullptr], [ammo_item_instance = nullptr], uint16 weapon_damage, int16 chance_mod, int16 focus)"); { Mob * THIS; Mob* target; @@ -8089,7 +8052,7 @@ XS(XS_Mob_DoThrowingAttackDmg) { dXSARGS; if (items != 7) - Perl_croak(aTHX_ "Usage: Mob::DoThrowingAttackDmg(THIS, target, RangeWeapon=nullptr,item=nullptr,weapon_damage, chance_mod, focus)"); + Perl_croak(aTHX_ "Usage: Mob::DoThrowingAttackDmg(THIS, Mob* target, [range_weapon_item_instance = nullptr], [ammo_item_instance = nullptr], uint16 weapon_damage, int16 chance_mod, int16 focus)"); { Mob * THIS; Mob* target; @@ -8127,7 +8090,7 @@ XS(XS_Mob_SetDisableMelee) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::SetDisableMelee(THIS, value)"); + Perl_croak(aTHX_ "Usage: Mob::SetDisableMelee(THIS, bool value)"); { Mob * THIS; bool value = (bool)SvTRUE(ST(1)); @@ -8177,7 +8140,7 @@ XS(XS_Mob_SetFlurryChance) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::SetFlurryChance(THIS, value)"); + Perl_croak(aTHX_ "Usage: Mob::SetFlurryChance(THIS, uint8 value)"); { Mob * THIS; uint8 value = (uint8)SvIV(ST(1)); @@ -8227,7 +8190,7 @@ XS(XS_Mob_GetSpellStat) { dXSARGS; if (items < 3 || items > 4) - Perl_croak(aTHX_ "Usage: Mob::GetSpellStat(THIS, itemid, stat, slot)"); + Perl_croak(aTHX_ "Usage: Mob::GetSpellStat(THIS, uint32 spell_id, string stat, uint8 slot)"); { Mob * THIS; int32 RETVAL; @@ -8259,7 +8222,7 @@ XS(XS_Mob_GetSpecialAbility) { dXSARGS; if(items != 2) - Perl_croak(aTHX_ "Usage: Mob::GetSpecialAbility(THIS, special_ability)"); + Perl_croak(aTHX_ "Usage: Mob::GetSpecialAbility(THIS, int special_ability)"); { int RETVAL; Mob* THIS; @@ -8286,7 +8249,7 @@ XS(XS_Mob_GetSpecialAbilityParam) { dXSARGS; if(items != 3) - Perl_croak(aTHX_ "Usage: Mob::GetSpecialAbilityParam(THIS, special_ability, param)"); + Perl_croak(aTHX_ "Usage: Mob::GetSpecialAbilityParam(THIS, int special_ability, int param)"); { int RETVAL; Mob* THIS; @@ -8314,7 +8277,7 @@ XS(XS_Mob_SetSpecialAbility) { dXSARGS; if(items != 3) - Perl_croak(aTHX_ "Usage: Mob::SetSpecialAbility(THIS, ability, value)"); + Perl_croak(aTHX_ "Usage: Mob::SetSpecialAbility(THIS, int ability, int value)"); { Mob* THIS; int ability = SvIV(ST(1)); @@ -8339,7 +8302,7 @@ XS(XS_Mob_SetSpecialAbilityParam) { dXSARGS; if(items != 4) - Perl_croak(aTHX_ "Usage: Mob::SetSpecialAbilityParam(THIS, ability, param, value)"); + Perl_croak(aTHX_ "Usage: Mob::SetSpecialAbilityParam(THIS, int ability, int param, int value)"); { Mob* THIS; int ability = SvIV(ST(1)); @@ -8388,7 +8351,7 @@ XS(XS_Mob_ProcessSpecialAbilities) { dXSARGS; if(items != 2) - Perl_croak(aTHX_ "Usage: Mob::ProcessSpecialAbilities(THIS, str)"); + Perl_croak(aTHX_ "Usage: Mob::ProcessSpecialAbilities(THIS, string str)"); { Mob* THIS; const char *str = (const char*)SvPV_nolen(ST(1)); @@ -8412,7 +8375,7 @@ XS(XS_Mob_CanClassEquipItem) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::CanClassEquipItem(THIS, item_id)"); + Perl_croak(aTHX_ "Usage: Mob::CanClassEquipItem(THIS, uint32 item_id)"); { Mob * THIS; bool RETVAL; @@ -8771,7 +8734,7 @@ XS(XS_Mob_GetHerosForgeModel); XS(XS_Mob_GetHerosForgeModel) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::GetHerosForgeModel(THIS, material_slot)"); + Perl_croak(aTHX_ "Usage: Mob::GetHerosForgeModel(THIS, uint8 material_slot)"); { Mob* THIS; int32 RETVAL; @@ -8799,7 +8762,7 @@ XS(XS_Mob_IsEliteMaterialItem); XS(XS_Mob_IsEliteMaterialItem) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::IsEliteMaterialItem(THIS, material_slot)"); + Perl_croak(aTHX_ "Usage: Mob::IsEliteMaterialItem(THIS, uint8 material_slot)"); { Mob* THIS; uint32 RETVAL; @@ -9006,7 +8969,7 @@ XS(XS_Mob_TryMoveAlong); XS(XS_Mob_TryMoveAlong) { dXSARGS; if (items < 3 || items > 4) - Perl_croak(aTHX_ "Usage: Mob::TryMoveAlong(THIS, distance, angle, send?)"); + Perl_croak(aTHX_ "Usage: Mob::TryMoveAlong(THIS, float distance, float angle, bool send)"); { Mob* THIS; float distance = (float)SvNV(ST(1)); From 214503617ebc73c7b8d26b0e932124b1a7025ddb Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 19:28:01 -0500 Subject: [PATCH 230/670] perl_mob.cpp formatting --- zone/perl_mob.cpp | 7100 +++++++++++++++++++++------------------------ 1 file changed, 3301 insertions(+), 3799 deletions(-) diff --git a/zone/perl_mob.cpp b/zone/perl_mob.cpp index 82e22132a..c295da59c 100644 --- a/zone/perl_mob.cpp +++ b/zone/perl_mob.cpp @@ -26,7 +26,9 @@ */ #include "../common/features.h" + #ifdef EMBPERL_XS_CLASSES + #include "../common/global_define.h" #include "embperl.h" @@ -46,22 +48,20 @@ typedef const char Const_char; XS(XS_Mob_IsClient); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_IsClient) -{ +XS(XS_Mob_IsClient) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsClient(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsClient(); @@ -72,22 +72,20 @@ XS(XS_Mob_IsClient) } XS(XS_Mob_IsNPC); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_IsNPC) -{ +XS(XS_Mob_IsNPC) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsNPC(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsNPC(); @@ -98,22 +96,20 @@ XS(XS_Mob_IsNPC) } XS(XS_Mob_IsMob); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_IsMob) -{ +XS(XS_Mob_IsMob) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsMob(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsMob(); @@ -124,22 +120,20 @@ XS(XS_Mob_IsMob) } XS(XS_Mob_IsCorpse); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_IsCorpse) -{ +XS(XS_Mob_IsCorpse) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsCorpse(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsCorpse(); @@ -150,22 +144,20 @@ XS(XS_Mob_IsCorpse) } XS(XS_Mob_IsPlayerCorpse); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_IsPlayerCorpse) -{ +XS(XS_Mob_IsPlayerCorpse) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsPlayerCorpse(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsPlayerCorpse(); @@ -176,22 +168,20 @@ XS(XS_Mob_IsPlayerCorpse) } XS(XS_Mob_IsNPCCorpse); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_IsNPCCorpse) -{ +XS(XS_Mob_IsNPCCorpse) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsNPCCorpse(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsNPCCorpse(); @@ -202,22 +192,20 @@ XS(XS_Mob_IsNPCCorpse) } XS(XS_Mob_IsObject); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_IsObject) -{ +XS(XS_Mob_IsObject) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsObject(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsObject(); @@ -228,22 +216,20 @@ XS(XS_Mob_IsObject) } XS(XS_Mob_IsDoor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_IsDoor) -{ +XS(XS_Mob_IsDoor) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsDoor(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsDoor(); @@ -254,22 +240,20 @@ XS(XS_Mob_IsDoor) } XS(XS_Mob_IsTrap); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_IsTrap) -{ +XS(XS_Mob_IsTrap) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsTrap(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsTrap(); @@ -280,22 +264,20 @@ XS(XS_Mob_IsTrap) } XS(XS_Mob_IsBeacon); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_IsBeacon) -{ +XS(XS_Mob_IsBeacon) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsBeacon(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsBeacon(); @@ -306,184 +288,173 @@ XS(XS_Mob_IsBeacon) } XS(XS_Mob_CastToClient); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_CastToClient) -{ +XS(XS_Mob_CastToClient) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::CastToClient(THIS)"); { - Mob * THIS; - Client * RETVAL; + Mob *THIS; + Client *RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->CastToClient(); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Client", (void*)RETVAL); + sv_setref_pv(ST(0), "Client", (void *) RETVAL); } XSRETURN(1); } XS(XS_Mob_CastToNPC); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_CastToNPC) -{ +XS(XS_Mob_CastToNPC) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::CastToNPC(THIS)"); { - Mob * THIS; - NPC * RETVAL; + Mob *THIS; + NPC *RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->CastToNPC(); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "NPC", (void*)RETVAL); + sv_setref_pv(ST(0), "NPC", (void *) RETVAL); } XSRETURN(1); } XS(XS_Mob_CastToMob); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_CastToMob) -{ +XS(XS_Mob_CastToMob) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::CastToMob(THIS)"); { - Mob * THIS; - Mob * RETVAL; + Mob *THIS; + Mob *RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->CastToMob(); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Mob", (void*)RETVAL); + sv_setref_pv(ST(0), "Mob", (void *) RETVAL); } XSRETURN(1); } XS(XS_Mob_CastToCorpse); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_CastToCorpse) -{ +XS(XS_Mob_CastToCorpse) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::CastToCorpse(THIS)"); { - Mob * THIS; - Corpse * RETVAL; + Mob *THIS; + Corpse *RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->CastToCorpse(); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Corpse", (void*)RETVAL); + sv_setref_pv(ST(0), "Corpse", (void *) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetID) -{ +XS(XS_Mob_GetID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetID(THIS)"); { - Mob * THIS; - uint16 RETVAL; + Mob *THIS; + uint16 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetID(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetName); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetName) -{ +XS(XS_Mob_GetName) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetName(THIS)"); { - Mob * THIS; - Const_char * RETVAL; + Mob *THIS; + Const_char *RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetName(); - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; + sv_setpv(TARG, RETVAL); + XSprePUSH; + PUSHTARG; } XSRETURN(1); } XS(XS_Mob_Depop); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_Depop) -{ +XS(XS_Mob_Depop) { dXSARGS; if (items < 1 || items > 2) Perl_croak(aTHX_ "Usage: Mob::Depop(THIS, StartSpawnTimer = true)"); { - Mob * THIS; - bool StartSpawnTimer; + Mob *THIS; + bool StartSpawnTimer; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 2) StartSpawnTimer = true; else { - StartSpawnTimer = (bool)SvTRUE(ST(1)); + StartSpawnTimer = (bool) SvTRUE(ST(1)); } THIS->Depop(StartSpawnTimer); @@ -492,31 +463,28 @@ XS(XS_Mob_Depop) } XS(XS_Mob_RogueAssassinate); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_RogueAssassinate) -{ +XS(XS_Mob_RogueAssassinate) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::RogueAssassinate(THIS, other)"); { - Mob * THIS; - Mob* other; + Mob *THIS; + Mob *other; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - other = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + other = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "other is not of type Mob"); - if(other == nullptr) + if (other == nullptr) Perl_croak(aTHX_ "other is nullptr, avoiding crash."); THIS->RogueAssassinate(other); @@ -525,50 +493,47 @@ XS(XS_Mob_RogueAssassinate) } XS(XS_Mob_BehindMob); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_BehindMob) -{ +XS(XS_Mob_BehindMob) { dXSARGS; if (items < 1 || items > 4) Perl_croak(aTHX_ "Usage: Mob::BehindMob(THIS, Mob* other = 0, [float x = 0.0f], [float y= 0.0f])"); { - Mob * THIS; - bool RETVAL; - Mob* other; - float playerx; - float playery; + Mob *THIS; + bool RETVAL; + Mob *other; + float playerx; + float playery; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 2) other = 0; else { if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - other = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + other = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "other is not of type Mob"); - if(other == nullptr) + if (other == nullptr) Perl_croak(aTHX_ "other is nullptr, avoiding crash."); } if (items < 3) playerx = 0.0f; else { - playerx = (float)SvNV(ST(2)); + playerx = (float) SvNV(ST(2)); } if (items < 4) playery = 0.0f; else { - playery = (float)SvNV(ST(3)); + playery = (float) SvNV(ST(3)); } RETVAL = THIS->BehindMob(other, playerx, playery); @@ -579,29 +544,27 @@ XS(XS_Mob_BehindMob) } XS(XS_Mob_SetLevel); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetLevel) -{ +XS(XS_Mob_SetLevel) { dXSARGS; if (items < 2 || items > 3) Perl_croak(aTHX_ "Usage: Mob::SetLevel(THIS, uint8 in_level, [bool command = false])"); { - Mob * THIS; - uint8 in_level = (uint8)SvUV(ST(1)); - bool command; + Mob *THIS; + uint8 in_level = (uint8) SvUV(ST(1)); + bool command; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 3) command = false; else { - command = (bool)SvTRUE(ST(2)); + command = (bool) SvTRUE(ST(2)); } THIS->SetLevel(in_level, command); @@ -610,49 +573,46 @@ XS(XS_Mob_SetLevel) } XS(XS_Mob_GetSkill); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetSkill) -{ +XS(XS_Mob_GetSkill) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::GetSkill(THIS, int skill_id)"); { - Mob * THIS; - uint32 RETVAL; + Mob *THIS; + uint32 RETVAL; dXSTARG; - EQEmu::skills::SkillType skill_num = (EQEmu::skills::SkillType)SvUV(ST(1)); + EQEmu::skills::SkillType skill_num = (EQEmu::skills::SkillType) SvUV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSkill(skill_num); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_SendWearChange); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SendWearChange) -{ +XS(XS_Mob_SendWearChange) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::SendWearChange(THIS, uint8 material_slot)"); { - Mob * THIS; - uint8 material_slot = (uint8)SvUV(ST(1)); + Mob *THIS; + uint8 material_slot = (uint8) SvUV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SendWearChange(material_slot); @@ -661,130 +621,124 @@ XS(XS_Mob_SendWearChange) } XS(XS_Mob_GetEquipment); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetEquipment) -{ +XS(XS_Mob_GetEquipment) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::GetEquipment(THIS, uint8 material_slot)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; - uint8 material_slot = (uint8)SvUV(ST(1)); + uint8 material_slot = (uint8) SvUV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetEquipment(material_slot); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetEquipmentMaterial); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetEquipmentMaterial) -{ +XS(XS_Mob_GetEquipmentMaterial) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::GetEquipmentMaterial(THIS, uint8 material_slot)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; - uint8 material_slot = (uint8)SvUV(ST(1)); + uint8 material_slot = (uint8) SvUV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetEquipmentMaterial(material_slot); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetEquipmentColor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetEquipmentColor) -{ +XS(XS_Mob_GetEquipmentColor) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::GetEquipmentColor(THIS, uint8 material_slot)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; - uint8 material_slot = (uint8)SvUV(ST(1)); + uint8 material_slot = (uint8) SvUV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetEquipmentColor(material_slot); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetArmorTint); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetArmorTint) -{ +XS(XS_Mob_GetArmorTint) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::GetArmorTint(THIS, uint8 material_slot)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; - uint8 material_slot = (uint8)SvUV(ST(1)); + uint8 material_slot = (uint8) SvUV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetArmorTint(material_slot); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_IsMoving); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_IsMoving) -{ +XS(XS_Mob_IsMoving) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsMoving(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsMoving(); @@ -795,21 +749,19 @@ XS(XS_Mob_IsMoving) } XS(XS_Mob_GoToBind); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GoToBind) -{ +XS(XS_Mob_GoToBind) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GoToBind(THIS)"); { - Mob * THIS; + Mob *THIS; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->GoToBind(); @@ -818,21 +770,19 @@ XS(XS_Mob_GoToBind) } XS(XS_Mob_Gate); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_Gate) -{ +XS(XS_Mob_Gate) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::Gate(THIS)"); { - Mob * THIS; + Mob *THIS; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->Gate(); @@ -841,46 +791,44 @@ XS(XS_Mob_Gate) } XS(XS_Mob_Attack); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_Attack) -{ +XS(XS_Mob_Attack) { dXSARGS; if (items < 2 || items > 4) - Perl_croak(aTHX_ "Usage: Mob::Attack(THIS, Mob* other, [int hand = 13 [prim|sec]], [bool from_riposte = false])"); + Perl_croak(aTHX_ + "Usage: Mob::Attack(THIS, Mob* other, [int hand = 13 [prim|sec]], [bool from_riposte = false])"); { - Mob * THIS; - bool RETVAL; - Mob* other; - int Hand; - bool FromRiposte; + Mob *THIS; + bool RETVAL; + Mob *other; + int Hand; + bool FromRiposte; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - other = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + other = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "other is not of type Mob"); - if(other == nullptr) + if (other == nullptr) Perl_croak(aTHX_ "other is nullptr, avoiding crash."); if (items < 3) Hand = 13; else { - Hand = (int)SvIV(ST(2)); + Hand = (int) SvIV(ST(2)); } if (items < 4) FromRiposte = false; else { - FromRiposte = (bool)SvTRUE(ST(3)); + FromRiposte = (bool) SvTRUE(ST(3)); } RETVAL = THIS->Attack(other, Hand, FromRiposte); @@ -891,55 +839,53 @@ XS(XS_Mob_Attack) } XS(XS_Mob_Damage); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_Damage) -{ +XS(XS_Mob_Damage) { dXSARGS; if (items < 5 || items > 8) - Perl_croak(aTHX_ "Usage: Mob::Damage(THIS, Mob* from, int32 damage, uint16 spell_id, int attack_skill, [bool avoidable = true], [int8 buffslot = -1], [bool buff_tic = false])"); + Perl_croak(aTHX_ + "Usage: Mob::Damage(THIS, Mob* from, int32 damage, uint16 spell_id, int attack_skill, [bool avoidable = true], [int8 buffslot = -1], [bool buff_tic = false])"); { - Mob * THIS; - Mob* from; - int32 damage = (int32)SvIV(ST(2)); - uint16 spell_id = (uint16)SvUV(ST(3)); - EQEmu::skills::SkillType attack_skill = (EQEmu::skills::SkillType)SvUV(ST(4)); - bool avoidable; - int8 buffslot; - bool iBuffTic; + Mob *THIS; + Mob *from; + int32 damage = (int32) SvIV(ST(2)); + uint16 spell_id = (uint16) SvUV(ST(3)); + EQEmu::skills::SkillType attack_skill = (EQEmu::skills::SkillType) SvUV(ST(4)); + bool avoidable; + int8 buffslot; + bool iBuffTic; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - from = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + from = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "from is not of type Mob"); - if(from == nullptr) + if (from == nullptr) Perl_croak(aTHX_ "from is nullptr, avoiding crash."); if (items < 6) avoidable = true; else { - avoidable = (bool)SvTRUE(ST(5)); + avoidable = (bool) SvTRUE(ST(5)); } if (items < 7) buffslot = -1; else { - buffslot = (int8)SvIV(ST(6)); + buffslot = (int8) SvIV(ST(6)); } if (items < 8) iBuffTic = false; else { - iBuffTic = (bool)SvTRUE(ST(7)); + iBuffTic = (bool) SvTRUE(ST(7)); } THIS->Damage(from, damage, spell_id, attack_skill, avoidable, buffslot, iBuffTic); @@ -948,31 +894,28 @@ XS(XS_Mob_Damage) } XS(XS_Mob_RangedAttack); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_RangedAttack) -{ +XS(XS_Mob_RangedAttack) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::RangedAttack(THIS, Mob* other)"); { - Mob * THIS; - Mob* other; + Mob *THIS; + Mob *other; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - other = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + other = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "other is not of type Mob"); - if(other == nullptr) + if (other == nullptr) Perl_croak(aTHX_ "other is nullptr, avoiding crash."); THIS->RangedAttack(other); @@ -981,31 +924,28 @@ XS(XS_Mob_RangedAttack) } XS(XS_Mob_ThrowingAttack); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_ThrowingAttack) -{ +XS(XS_Mob_ThrowingAttack) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::ThrowingAttack(THIS, Mob* other)"); { - Mob * THIS; - Mob* other; + Mob *THIS; + Mob *other; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - other = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + other = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "other is not of type Mob"); - if(other == nullptr) + if (other == nullptr) Perl_croak(aTHX_ "other is nullptr, avoiding crash."); THIS->ThrowingAttack(other); @@ -1014,21 +954,19 @@ XS(XS_Mob_ThrowingAttack) } XS(XS_Mob_Heal); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_Heal) -{ +XS(XS_Mob_Heal) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::Heal(THIS)"); { - Mob * THIS; + Mob *THIS; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->Heal(); @@ -1038,34 +976,30 @@ XS(XS_Mob_Heal) XS(XS_Mob_HealDamage); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_HealDamage) -{ +XS(XS_Mob_HealDamage) { dXSARGS; if (items < 2 || items > 3) Perl_croak(aTHX_ "Usage: Mob::HealDamage(THIS, int32 amount, [Mob* caster = 0])"); { - Mob * THIS; - int32 heal_amt = (int32)SvIV(ST(1)); - Mob * caster = nullptr; + Mob *THIS; + int32 heal_amt = (int32) SvIV(ST(1)); + Mob *caster = nullptr; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - if(items == 3) - { + if (items == 3) { if (sv_derived_from(ST(2), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(2))); - caster = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(2))); + caster = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "caster is not of type Mob"); - if(caster == nullptr) + if (caster == nullptr) Perl_croak(aTHX_ "caster is nullptr, avoiding crash."); } @@ -1075,21 +1009,19 @@ XS(XS_Mob_HealDamage) } XS(XS_Mob_SetMaxHP); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetMaxHP) -{ +XS(XS_Mob_SetMaxHP) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::SetMaxHP(THIS)"); { - Mob * THIS; + Mob *THIS; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetMaxHP(); @@ -1098,49 +1030,46 @@ XS(XS_Mob_SetMaxHP) } XS(XS_Mob_GetLevelCon); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetLevelCon) -{ +XS(XS_Mob_GetLevelCon) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::GetLevelCon(THIS, uint8 other_level)"); { - Mob * THIS; - uint32 RETVAL; + Mob *THIS; + uint32 RETVAL; dXSTARG; - uint8 iOtherLevel = (uint8)SvUV(ST(1)); + uint8 iOtherLevel = (uint8) SvUV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetLevelCon(iOtherLevel); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_SetHP); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetHP) -{ +XS(XS_Mob_SetHP) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::SetHP(THIS, int32 hp)"); { - Mob * THIS; - int32 hp = (int32)SvIV(ST(1)); + Mob *THIS; + int32 hp = (int32) SvIV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetHP(hp); @@ -1149,29 +1078,27 @@ XS(XS_Mob_SetHP) } XS(XS_Mob_DoAnim); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_DoAnim) -{ +XS(XS_Mob_DoAnim) { dXSARGS; if (items < 2 || items > 3) Perl_croak(aTHX_ "Usage: Mob::DoAnim(THIS, int animation_number, [int type = 0])"); { - Mob * THIS; - int animnum = (int)SvIV(ST(1)); - int type; + Mob *THIS; + int animnum = (int) SvIV(ST(1)); + int type; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 3) type = 0; else { - type = (int)SvIV(ST(2)); + type = (int) SvIV(ST(2)); } THIS->DoAnim(animnum, type); @@ -1180,29 +1107,27 @@ XS(XS_Mob_DoAnim) } XS(XS_Mob_ChangeSize); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_ChangeSize) -{ +XS(XS_Mob_ChangeSize) { dXSARGS; if (items < 2 || items > 3) Perl_croak(aTHX_ "Usage: Mob::ChangeSize(THIS, float in_size, [bool no_restriction = false])"); { - Mob * THIS; - float in_size = (float)SvNV(ST(1)); - bool bNoRestriction; + Mob *THIS; + float in_size = (float) SvNV(ST(1)); + bool bNoRestriction; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 3) bNoRestriction = false; else { - bNoRestriction = (bool)SvTRUE(ST(2)); + bNoRestriction = (bool) SvTRUE(ST(2)); } THIS->ChangeSize(in_size, bNoRestriction); @@ -1211,31 +1136,29 @@ XS(XS_Mob_ChangeSize) } XS(XS_Mob_GMMove); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GMMove) -{ +XS(XS_Mob_GMMove) { dXSARGS; if (items < 4 || items > 5) Perl_croak(aTHX_ "Usage: Mob::GMMove(THIS, float x, float y, float z, [float heading = 0.01])"); { - Mob * THIS; - float x = (float)SvNV(ST(1)); - float y = (float)SvNV(ST(2)); - float z = (float)SvNV(ST(3)); - float heading; + Mob *THIS; + float x = (float) SvNV(ST(1)); + float y = (float) SvNV(ST(2)); + float z = (float) SvNV(ST(3)); + float heading; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 5) heading = 0.01; else { - heading = (float)SvNV(ST(4)); + heading = (float) SvNV(ST(4)); } THIS->GMMove(x, y, z, heading); @@ -1244,28 +1167,26 @@ XS(XS_Mob_GMMove) } XS(XS_Mob_SendPosUpdate); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SendPosUpdate) -{ +XS(XS_Mob_SendPosUpdate) { dXSARGS; if (items < 1 || items > 2) Perl_croak(aTHX_ "Usage: Mob::SendPosUpdate(THIS, [uint8 send_to_self = 0])"); { - Mob * THIS; - uint8 iSendToSelf; + Mob *THIS; + uint8 iSendToSelf; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 2) iSendToSelf = 0; else { - iSendToSelf = (uint8)SvUV(ST(1)); + iSendToSelf = (uint8) SvUV(ST(1)); } THIS->SendPositionUpdate(iSendToSelf); @@ -1274,21 +1195,19 @@ XS(XS_Mob_SendPosUpdate) } XS(XS_Mob_SendPosition); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SendPosition) -{ +XS(XS_Mob_SendPosition) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::SendPosition(THIS)"); { - Mob * THIS; + Mob *THIS; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SendPosition(); @@ -1297,22 +1216,20 @@ XS(XS_Mob_SendPosition) } XS(XS_Mob_HasProcs); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_HasProcs) -{ +XS(XS_Mob_HasProcs) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::HasProcs(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->HasProcs(); @@ -1323,35 +1240,32 @@ XS(XS_Mob_HasProcs) } XS(XS_Mob_IsInvisible); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_IsInvisible) -{ +XS(XS_Mob_IsInvisible) { dXSARGS; if (items < 1 || items > 2) Perl_croak(aTHX_ "Usage: Mob::IsInvisible(THIS, [Mob* other = 0])"); { - Mob * THIS; - bool RETVAL; - Mob * other; + Mob *THIS; + bool RETVAL; + Mob *other; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 2) other = 0; else { if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - other = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + other = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "other is not of type Mob"); - if(other == nullptr) + if (other == nullptr) Perl_croak(aTHX_ "other is nullptr, avoiding crash."); } @@ -1363,22 +1277,20 @@ XS(XS_Mob_IsInvisible) } XS(XS_Mob_SetInvisible); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetInvisible) -{ +XS(XS_Mob_SetInvisible) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::SetInvisible(THIS, uint8 state)"); { - Mob * THIS; - uint8 state = (uint8)SvUV(ST(1)); + Mob *THIS; + uint8 state = (uint8) SvUV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetInvisible(state); @@ -1387,125 +1299,118 @@ XS(XS_Mob_SetInvisible) } XS(XS_Mob_FindBuff); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_FindBuff) -{ +XS(XS_Mob_FindBuff) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::FindBuff(THIS, uint16 spell_id)"); { - Mob * THIS; - bool RETVAL; - uint16 spellid = (uint16)SvUV(ST(1)); + Mob *THIS; + bool RETVAL; + uint16 spellid = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->FindBuff(spellid); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Mob_FindType); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_FindType) -{ +XS(XS_Mob_FindType) { dXSARGS; if (items < 2 || items > 4) Perl_croak(aTHX_ "Usage: Mob::FindType(THIS, uint8 type, [bool offensive = false], [uint16 threshold = 100])"); { - Mob * THIS; - bool RETVAL; - uint8 type = (uint8)SvUV(ST(1)); - bool bOffensive; - uint16 threshold; + Mob *THIS; + bool RETVAL; + uint8 type = (uint8) SvUV(ST(1)); + bool bOffensive; + uint16 threshold; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 3) bOffensive = false; else { - bOffensive = (bool)SvTRUE(ST(2)); + bOffensive = (bool) SvTRUE(ST(2)); } if (items < 4) threshold = 100; else { - threshold = (uint16)SvUV(ST(3)); + threshold = (uint16) SvUV(ST(3)); } RETVAL = THIS->FindType(type, bOffensive, threshold); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Mob_GetBuffSlotFromType); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetBuffSlotFromType) -{ +XS(XS_Mob_GetBuffSlotFromType) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::GetBuffSlotFromType(THIS, uint16 type)"); { - Mob * THIS; - int8 RETVAL; + Mob *THIS; + int8 RETVAL; dXSTARG; - uint16 type = (uint16)SvUV(ST(1)); + uint16 type = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetBuffSlotFromType(type); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_MakePet); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_MakePet) -{ +XS(XS_Mob_MakePet) { dXSARGS; if (items < 3 || items > 4) Perl_croak(aTHX_ "Usage: Mob::MakePet(THIS, uint16 spell_id, string pet_type, [string name = nullptr])"); { - Mob * THIS; - uint16 spell_id = (uint16)SvUV(ST(1)); - char* pettype = (char *)SvPV_nolen(ST(2)); - char * name; + Mob *THIS; + uint16 spell_id = (uint16) SvUV(ST(1)); + char *pettype = (char *) SvPV_nolen(ST(2)); + char *name; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 4) name = nullptr; else { - name = (char *)SvPV_nolen(ST(3)); + name = (char *) SvPV_nolen(ST(3)); } THIS->MakePet(spell_id, pettype, name); @@ -1514,51 +1419,49 @@ XS(XS_Mob_MakePet) } XS(XS_Mob_MakeTempPet); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_MakeTempPet) -{ +XS(XS_Mob_MakeTempPet) { dXSARGS; if (items < 2 || items > 6) - Perl_croak(aTHX_ "Usage: Mob::MakeTempPet(THIS, uint16 spell_id, [string name = nullptr], [uint32 duration = 0], [Mob* target = nullptr], [bool sticktarg = 0])"); + Perl_croak(aTHX_ + "Usage: Mob::MakeTempPet(THIS, uint16 spell_id, [string name = nullptr], [uint32 duration = 0], [Mob* target = nullptr], [bool sticktarg = 0])"); { - Mob * THIS; - uint16 spell_id = (uint16)SvUV(ST(1)); - char * name; - uint32 duration; - Mob * target; - bool sticktarg; + Mob *THIS; + uint16 spell_id = (uint16) SvUV(ST(1)); + char *name; + uint32 duration; + Mob *target; + bool sticktarg; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 3) name = nullptr; else - name = (char *)SvPV_nolen(ST(2)); + name = (char *) SvPV_nolen(ST(2)); if (items < 4) duration = 0; else - duration = (uint32)SvUV(ST(3)); + duration = (uint32) SvUV(ST(3)); if (items < 5) target = nullptr; else if (sv_derived_from(ST(4), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(4))); - target = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(4))); + target = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "owner is not of type Mob"); if (items < 6) sticktarg = false; else { - sticktarg = (bool)SvTRUE(ST(5)); + sticktarg = (bool) SvTRUE(ST(5)); } THIS->TemporaryPets(spell_id, target, name, duration, true, sticktarg); @@ -1567,59 +1470,57 @@ XS(XS_Mob_MakeTempPet) } XS(XS_Mob_TypesTempPet); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_TypesTempPet) -{ +XS(XS_Mob_TypesTempPet) { dXSARGS; if (items < 2 || items > 7) - Perl_croak(aTHX_ "Usage: Mob::TypesTempPet(THIS, uint32 type_id, [string name = nullptr], [uint32 duration = 0], [bool follow = 0], [Mob* target = nullptr], [bool stick_targ = 0])"); + Perl_croak(aTHX_ + "Usage: Mob::TypesTempPet(THIS, uint32 type_id, [string name = nullptr], [uint32 duration = 0], [bool follow = 0], [Mob* target = nullptr], [bool stick_targ = 0])"); { - Mob * THIS; - uint32 typesid = (uint32)SvUV(ST(1)); - char * name; - uint32 duration; - bool follow; - Mob * target; - bool sticktarg; + Mob *THIS; + uint32 typesid = (uint32) SvUV(ST(1)); + char *name; + uint32 duration; + bool follow; + Mob *target; + bool sticktarg; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 3) name = nullptr; else - name = (char *)SvPV_nolen(ST(2)); + name = (char *) SvPV_nolen(ST(2)); if (items < 4) duration = 0; else - duration = (uint32)SvUV(ST(3)); + duration = (uint32) SvUV(ST(3)); if (items < 5) follow = true; else { - follow = (bool)SvTRUE(ST(4)); + follow = (bool) SvTRUE(ST(4)); } if (items < 6) target = nullptr; else if (sv_derived_from(ST(5), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(5))); - target = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(5))); + target = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "target is not of type Mob"); if (items < 7) sticktarg = false; else { - sticktarg = (bool)SvTRUE(ST(6)); + sticktarg = (bool) SvTRUE(ST(6)); } THIS->TypesTemporaryPets(typesid, target, name, duration, follow, sticktarg); @@ -1628,577 +1529,553 @@ XS(XS_Mob_TypesTempPet) } XS(XS_Mob_GetBaseRace); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetBaseRace) -{ +XS(XS_Mob_GetBaseRace) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetBaseRace(THIS)"); { - Mob * THIS; - uint16 RETVAL; + Mob *THIS; + uint16 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetBaseRace(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetBaseGender); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetBaseGender) -{ +XS(XS_Mob_GetBaseGender) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetBaseGender(THIS)"); { - Mob * THIS; - uint8 RETVAL; + Mob *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetBaseGender(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetDeity); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetDeity) -{ +XS(XS_Mob_GetDeity) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetDeity(THIS)"); { - Mob * THIS; - uint8 RETVAL; + Mob *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetDeity(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetRace); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetRace) -{ +XS(XS_Mob_GetRace) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetRace(THIS)"); { - Mob * THIS; - uint16 RETVAL; + Mob *THIS; + uint16 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetRace(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetGender); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetGender) -{ +XS(XS_Mob_GetGender) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetGender(THIS)"); { - Mob * THIS; - uint8 RETVAL; + Mob *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetGender(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetTexture); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetTexture) -{ +XS(XS_Mob_GetTexture) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetTexture(THIS)"); { - Mob * THIS; - uint8 RETVAL; + Mob *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetTexture(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetHelmTexture); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetHelmTexture) -{ +XS(XS_Mob_GetHelmTexture) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetHelmTexture(THIS)"); { - Mob * THIS; - uint8 RETVAL; + Mob *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetHelmTexture(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetHairColor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetHairColor) -{ +XS(XS_Mob_GetHairColor) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetHairColor(THIS)"); { - Mob * THIS; - uint8 RETVAL; + Mob *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetHairColor(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetBeardColor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetBeardColor) -{ +XS(XS_Mob_GetBeardColor) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetBeardColor(THIS)"); { - Mob * THIS; - uint8 RETVAL; + Mob *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetBeardColor(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetEyeColor1); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetEyeColor1) -{ +XS(XS_Mob_GetEyeColor1) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetEyeColor1(THIS)"); { - Mob * THIS; - uint8 RETVAL; + Mob *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetEyeColor1(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetEyeColor2); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetEyeColor2) -{ +XS(XS_Mob_GetEyeColor2) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetEyeColor2(THIS)"); { - Mob * THIS; - uint8 RETVAL; + Mob *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetEyeColor2(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetHairStyle); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetHairStyle) -{ +XS(XS_Mob_GetHairStyle) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetHairStyle(THIS)"); { - Mob * THIS; - uint8 RETVAL; + Mob *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetHairStyle(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetLuclinFace); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetLuclinFace) -{ +XS(XS_Mob_GetLuclinFace) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetLuclinFace(THIS)"); { - Mob * THIS; - uint8 RETVAL; + Mob *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetLuclinFace(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetBeard); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetBeard) -{ +XS(XS_Mob_GetBeard) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetBeard(THIS)"); { - Mob * THIS; - uint8 RETVAL; + Mob *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetBeard(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetDrakkinHeritage); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetDrakkinHeritage) -{ +XS(XS_Mob_GetDrakkinHeritage) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetDrakkinHeritage(THIS)"); { - Mob * THIS; - uint8 RETVAL; + Mob *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetDrakkinHeritage(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetDrakkinTattoo); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetDrakkinTattoo) -{ +XS(XS_Mob_GetDrakkinTattoo) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetDrakkinTattoo(THIS)"); { - Mob * THIS; - uint8 RETVAL; + Mob *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetDrakkinTattoo(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetDrakkinDetails); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetDrakkinDetails) -{ +XS(XS_Mob_GetDrakkinDetails) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetDrakkinDetails(THIS)"); { - Mob * THIS; - uint8 RETVAL; + Mob *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetDrakkinDetails(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetClass); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetClass) -{ +XS(XS_Mob_GetClass) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetClass(THIS)"); { - Mob * THIS; - uint8 RETVAL; + Mob *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetClass(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetLevel); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetLevel) -{ +XS(XS_Mob_GetLevel) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetLevel(THIS)"); { - Mob * THIS; - uint8 RETVAL; + Mob *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetLevel(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetCleanName); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetCleanName) -{ +XS(XS_Mob_GetCleanName) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetCleanName(THIS)"); { - Mob * THIS; - Const_char * RETVAL; + Mob *THIS; + Const_char *RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetCleanName(); - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; + sv_setpv(TARG, RETVAL); + XSprePUSH; + PUSHTARG; } XSRETURN(1); } XS(XS_Mob_GetTarget); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetTarget) -{ +XS(XS_Mob_GetTarget) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetTarget(THIS)"); { - Mob * THIS; - Mob * RETVAL; + Mob *THIS; + Mob *RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetTarget(); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Mob", (void*)RETVAL); + sv_setref_pv(ST(0), "Mob", (void *) RETVAL); } XSRETURN(1); } XS(XS_Mob_SetTarget); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetTarget) -{ +XS(XS_Mob_SetTarget) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::SetTarget(THIS, mob)"); { - Mob * THIS; - Mob* mob; + Mob *THIS; + Mob *mob; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - mob = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + mob = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "mob is not of type Mob"); - if(mob == nullptr) + if (mob == nullptr) Perl_croak(aTHX_ "mob is nullptr, avoiding crash."); THIS->SetTarget(mob); @@ -2207,48 +2084,45 @@ XS(XS_Mob_SetTarget) } XS(XS_Mob_GetHPRatio); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetHPRatio) -{ +XS(XS_Mob_GetHPRatio) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetHPRatio(THIS)"); { - Mob * THIS; - float RETVAL; + Mob *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetHPRatio(); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Mob_IsWarriorClass); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_IsWarriorClass) -{ +XS(XS_Mob_IsWarriorClass) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsWarriorClass(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsWarriorClass(); @@ -2259,288 +2133,276 @@ XS(XS_Mob_IsWarriorClass) } XS(XS_Mob_GetHP); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetHP) -{ +XS(XS_Mob_GetHP) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetHP(THIS)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetHP(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetMaxHP); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetMaxHP) -{ +XS(XS_Mob_GetMaxHP) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetMaxHP(THIS)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetMaxHP(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetItemHPBonuses); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetItemHPBonuses) -{ +XS(XS_Mob_GetItemHPBonuses) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetItemHPBonuses(THIS)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetItemHPBonuses(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetSpellHPBonuses); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetSpellHPBonuses) -{ +XS(XS_Mob_GetSpellHPBonuses) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetSpellHPBonuses(THIS)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSpellHPBonuses(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetSpellIDFromSlot); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetSpellIDFromSlot) -{ +XS(XS_Mob_GetSpellIDFromSlot) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::GetSpellIDFromSlot(THIS, slot)"); { - Mob * THIS; - int RETVAL; + Mob *THIS; + int RETVAL; dXSTARG; - uint8 slot = (uint16)SvUV(ST(1)); + uint8 slot = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob *, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (slot > THIS->GetMaxBuffSlots()) RETVAL = -1; - else + else RETVAL = THIS->GetSpellIDFromSlot(slot); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetWalkspeed); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetWalkspeed) -{ +XS(XS_Mob_GetWalkspeed) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetWalkspeed(THIS)"); { - Mob * THIS; - float RETVAL; + Mob *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetWalkspeed(); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetRunspeed); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetRunspeed) -{ +XS(XS_Mob_GetRunspeed) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetRunspeed(THIS)"); { - Mob * THIS; - float RETVAL; + Mob *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetRunspeed(); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetCasterLevel); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetCasterLevel) -{ +XS(XS_Mob_GetCasterLevel) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::GetCasterLevel(THIS, spell_id)"); { - Mob * THIS; - int RETVAL; + Mob *THIS; + int RETVAL; dXSTARG; - uint16 spell_id = (uint16)SvUV(ST(1)); + uint16 spell_id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetCasterLevel(spell_id); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetMaxMana); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetMaxMana) -{ +XS(XS_Mob_GetMaxMana) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetMaxMana(THIS)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetMaxMana(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetMana); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetMana) -{ +XS(XS_Mob_GetMana) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetMana(THIS)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetMana(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_SetMana); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetMana) -{ +XS(XS_Mob_SetMana) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::SetMana(THIS, amount)"); { - Mob * THIS; - int32 amount = (int32)SvIV(ST(1)); + Mob *THIS; + int32 amount = (int32) SvIV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetMana(amount); @@ -2549,905 +2411,869 @@ XS(XS_Mob_SetMana) } XS(XS_Mob_GetManaRatio); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetManaRatio) -{ +XS(XS_Mob_GetManaRatio) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetManaRatio(THIS)"); { - Mob * THIS; - float RETVAL; + Mob *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetManaRatio(); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetAC); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetAC) -{ +XS(XS_Mob_GetAC) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetAC(THIS)"); { - Mob * THIS; - uint32 RETVAL; + Mob *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetAC(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetATK); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetATK) -{ +XS(XS_Mob_GetATK) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetATK(THIS)"); { - Mob * THIS; - uint32 RETVAL; + Mob *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetATK(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetSTR); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetSTR) -{ +XS(XS_Mob_GetSTR) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetSTR(THIS)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSTR(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetSTA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetSTA) -{ +XS(XS_Mob_GetSTA) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetSTA(THIS)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSTA(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetDEX); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetDEX) -{ +XS(XS_Mob_GetDEX) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetDEX(THIS)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetDEX(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetAGI); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetAGI) -{ +XS(XS_Mob_GetAGI) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetAGI(THIS)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetAGI(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetINT); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetINT) -{ +XS(XS_Mob_GetINT) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetINT(THIS)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetINT(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetWIS); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetWIS) -{ +XS(XS_Mob_GetWIS) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetWIS(THIS)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetWIS(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetCHA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetCHA) -{ +XS(XS_Mob_GetCHA) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetCHA(THIS)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetCHA(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetMR); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetMR) -{ +XS(XS_Mob_GetMR) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetMR(THIS)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetMR(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetFR); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetFR) -{ +XS(XS_Mob_GetFR) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetFR(THIS)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetFR(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetDR); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetDR) -{ +XS(XS_Mob_GetDR) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetDR(THIS)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetDR(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetPR); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetPR) -{ +XS(XS_Mob_GetPR) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetPR(THIS)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetPR(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetCR); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetCR) -{ +XS(XS_Mob_GetCR) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetCR(THIS)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetCR(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetCorruption); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetCorruption) -{ +XS(XS_Mob_GetCorruption) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetCorruption(THIS)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetCorrup(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetPhR); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetPhR) -{ +XS(XS_Mob_GetPhR) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetPhR(THIS)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob *, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetPhR(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetMaxSTR); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetMaxSTR) -{ +XS(XS_Mob_GetMaxSTR) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetMaxSTR(THIS)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetMaxSTR(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetMaxSTA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetMaxSTA) -{ +XS(XS_Mob_GetMaxSTA) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetMaxSTA(THIS)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetMaxSTA(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetMaxDEX); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetMaxDEX) -{ +XS(XS_Mob_GetMaxDEX) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetMaxDEX(THIS)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetMaxDEX(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetMaxAGI); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetMaxAGI) -{ +XS(XS_Mob_GetMaxAGI) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetMaxAGI(THIS)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetMaxAGI(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetMaxINT); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetMaxINT) -{ +XS(XS_Mob_GetMaxINT) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetMaxINT(THIS)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetMaxINT(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetMaxWIS); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetMaxWIS) -{ +XS(XS_Mob_GetMaxWIS) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetMaxWIS(THIS)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetMaxWIS(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetMaxCHA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetMaxCHA) -{ +XS(XS_Mob_GetMaxCHA) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetMaxCHA(THIS)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetMaxCHA(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetActSpellRange); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetActSpellRange) -{ +XS(XS_Mob_GetActSpellRange) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Mob::GetActSpellRange(THIS, uint16 spell_id, float range)"); { - Mob * THIS; - float RETVAL; + Mob *THIS; + float RETVAL; dXSTARG; - uint16 spell_id = (uint16)SvUV(ST(1)); - float range = (float)SvNV(ST(2)); + uint16 spell_id = (uint16) SvUV(ST(1)); + float range = (float) SvNV(ST(2)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetActSpellRange(spell_id, range); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetActSpellDamage); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetActSpellDamage) -{ +XS(XS_Mob_GetActSpellDamage) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Mob::GetActSpellDamage(THIS, uint16 spell_id, int32 value)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; - uint16 spell_id = (uint16)SvUV(ST(1)); - int32 value = (int32)SvIV(ST(2)); + uint16 spell_id = (uint16) SvUV(ST(1)); + int32 value = (int32) SvIV(ST(2)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetActSpellDamage(spell_id, value); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetActSpellHealing); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetActSpellHealing) -{ +XS(XS_Mob_GetActSpellHealing) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Mob::GetActSpellHealing(THIS, uint16 spell_id, int32 value)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; - uint16 spell_id = (uint16)SvUV(ST(1)); - int32 value = (int32)SvIV(ST(2)); + uint16 spell_id = (uint16) SvUV(ST(1)); + int32 value = (int32) SvIV(ST(2)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetActSpellHealing(spell_id, value); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetActSpellCost); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetActSpellCost) -{ +XS(XS_Mob_GetActSpellCost) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Mob::GetActSpellCost(THIS, uint16 spell_id, int32 cost)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; - uint16 spell_id = (uint16)SvUV(ST(1)); - int32 cost = (int32)SvIV(ST(2)); + uint16 spell_id = (uint16) SvUV(ST(1)); + int32 cost = (int32) SvIV(ST(2)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetActSpellCost(spell_id, cost); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetActSpellDuration); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetActSpellDuration) -{ +XS(XS_Mob_GetActSpellDuration) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Mob::GetActSpellDuration(THIS, uint16 spell_id, int32 duration)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; - uint16 spell_id = (uint16)SvUV(ST(1)); - int32 duration = (int32)SvIV(ST(2)); + uint16 spell_id = (uint16) SvUV(ST(1)); + int32 duration = (int32) SvIV(ST(2)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetActSpellDuration(spell_id, duration); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetActSpellCasttime); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetActSpellCasttime) -{ +XS(XS_Mob_GetActSpellCasttime) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Mob::GetActSpellCasttime(THIS, uint16 spell_id, uint32 cast_time)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; - uint16 spell_id = (uint16)SvUV(ST(1)); - int32 casttime = (int32)SvIV(ST(2)); + uint16 spell_id = (uint16) SvUV(ST(1)); + int32 casttime = (int32) SvIV(ST(2)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetActSpellCasttime(spell_id, casttime); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_ResistSpell); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_ResistSpell) -{ +XS(XS_Mob_ResistSpell) { dXSARGS; if (items != 4) Perl_croak(aTHX_ "Usage: Mob::ResistSpell(THIS, uint8 resist_type, uint16 spell_id, [Mob* caster = nullptr])"); { - Mob * THIS; - double RETVAL; + Mob *THIS; + double RETVAL; dXSTARG; - uint8 ressit_type = (uint8)SvUV(ST(1)); - uint16 spell_id = (uint16)SvUV(ST(2)); - Mob * caster; + uint8 ressit_type = (uint8) SvUV(ST(1)); + uint16 spell_id = (uint16) SvUV(ST(2)); + Mob *caster; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(3), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(3))); - caster = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(3))); + caster = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "caster is not of type Mob"); - if(caster == nullptr) + if (caster == nullptr) Perl_croak(aTHX_ "caster is nullptr, avoiding crash."); RETVAL = THIS->ResistSpell(ressit_type, spell_id, caster); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetSpecializeSkillValue); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetSpecializeSkillValue) -{ +XS(XS_Mob_GetSpecializeSkillValue) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::GetSpecializeSkillValue(THIS, uint16 spell_id)"); { - Mob * THIS; - uint16 RETVAL; + Mob *THIS; + uint16 RETVAL; dXSTARG; - uint16 spell_id = (uint16)SvUV(ST(1)); + uint16 spell_id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSpecializeSkillValue(spell_id); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetNPCTypeID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetNPCTypeID) -{ +XS(XS_Mob_GetNPCTypeID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetNPCTypeID(THIS)"); { - Mob * THIS; - uint32 RETVAL; + Mob *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetNPCTypeID(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_IsTargeted); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_IsTargeted) -{ +XS(XS_Mob_IsTargeted) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsTargeted(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsTargeted(); @@ -3458,283 +3284,271 @@ XS(XS_Mob_IsTargeted) } XS(XS_Mob_GetX); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetX) -{ +XS(XS_Mob_GetX) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetX(THIS)"); { - Mob * THIS; - float RETVAL; + Mob *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetX(); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetY); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetY) -{ +XS(XS_Mob_GetY) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetY(THIS)"); { - Mob * THIS; - float RETVAL; + Mob *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetY(); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetZ); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetZ) -{ +XS(XS_Mob_GetZ) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetZ(THIS)"); { - Mob * THIS; - float RETVAL; + Mob *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetZ(); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetHeading); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetHeading) -{ +XS(XS_Mob_GetHeading) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetHeading(THIS)"); { - Mob * THIS; - float RETVAL; + Mob *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetHeading(); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetWaypointX); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetWaypointX) -{ +XS(XS_Mob_GetWaypointX) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetWaypointX(THIS)"); { - Mob * THIS; - float RETVAL; + Mob *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetCurrentWayPoint().x; - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetWaypointY); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetWaypointY) -{ +XS(XS_Mob_GetWaypointY) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetWaypointY(THIS)"); { - Mob * THIS; - float RETVAL; + Mob *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetCurrentWayPoint().y; - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetWaypointZ); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetWaypointZ) -{ +XS(XS_Mob_GetWaypointZ) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetWaypointZ(THIS)"); { - Mob * THIS; - float RETVAL; + Mob *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetCurrentWayPoint().z; - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetWaypointH); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetWaypointH) -{ +XS(XS_Mob_GetWaypointH) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetWaypointH(THIS)"); { - Mob * THIS; - float RETVAL; + Mob *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetCurrentWayPoint().w; - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetWaypointPause); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetWaypointPause) -{ +XS(XS_Mob_GetWaypointPause) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetWaypointPause(THIS)"); { - Mob * THIS; - uint32 RETVAL; + Mob *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetCWPP(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetWaypointID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetWaypointID) -{ +XS(XS_Mob_GetWaypointID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetWaypointID(THIS)"); { - Mob * THIS; - uint32 RETVAL; + Mob *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetCWP(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_SetCurrentWP); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetCurrentWP) -{ +XS(XS_Mob_SetCurrentWP) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::SetCurrentWP(THIS, waypoint)"); { - Mob * THIS; - uint16 waypoint = (uint16)SvUV(ST(1)); + Mob *THIS; + uint16 waypoint = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetCurrentWP(waypoint); @@ -3743,48 +3557,45 @@ XS(XS_Mob_SetCurrentWP) } XS(XS_Mob_GetSize); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetSize) -{ +XS(XS_Mob_GetSize) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetSize(THIS)"); { - Mob * THIS; - float RETVAL; + Mob *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSize(); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Mob_SetFollowID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetFollowID) -{ +XS(XS_Mob_SetFollowID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::SetFollowID(THIS, id)"); { - Mob * THIS; - uint32 id = (uint32)SvUV(ST(1)); + Mob *THIS; + uint32 id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetFollowID(id); @@ -3793,49 +3604,46 @@ XS(XS_Mob_SetFollowID) } XS(XS_Mob_GetFollowID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetFollowID) -{ +XS(XS_Mob_GetFollowID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetFollowID(THIS)"); { - Mob * THIS; - uint32 RETVAL; + Mob *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetFollowID(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_Message); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_Message) -{ +XS(XS_Mob_Message) { dXSARGS; if (items < 3) Perl_croak(aTHX_ "Usage: Mob::Message(THIS, uint32 emote_color_type, string message)"); { - Mob * THIS; - uint32 type = (uint32)SvUV(ST(1)); - char* message = (char *)SvPV_nolen(ST(2)); + Mob *THIS; + uint32 type = (uint32) SvUV(ST(1)); + char *message = (char *) SvPV_nolen(ST(2)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->Message(type, message); @@ -3844,30 +3652,29 @@ XS(XS_Mob_Message) } XS(XS_Mob_Message_StringID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_Message_StringID) -{ +XS(XS_Mob_Message_StringID) { dXSARGS; if (items < 3 || items > 4) - Perl_croak(aTHX_ "Usage: Mob::Message_StringID(THIS, uint32 emote_color_type, uint32 string_id, [uint32 distance = 0])"); + Perl_croak(aTHX_ + "Usage: Mob::Message_StringID(THIS, uint32 emote_color_type, uint32 string_id, [uint32 distance = 0])"); { - Mob * THIS; - uint32 type = (uint32)SvUV(ST(1)); - uint32 string_id = (uint32)SvUV(ST(2)); - uint32 distance; + Mob *THIS; + uint32 type = (uint32) SvUV(ST(1)); + uint32 string_id = (uint32) SvUV(ST(2)); + uint32 distance; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 4) distance = 0; else { - distance = (uint32)SvUV(ST(3)); + distance = (uint32) SvUV(ST(3)); } THIS->Message_StringID(type, string_id, distance); @@ -3876,22 +3683,20 @@ XS(XS_Mob_Message_StringID) } XS(XS_Mob_Say); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_Say) -{ +XS(XS_Mob_Say) { dXSARGS; if (items < 2) Perl_croak(aTHX_ "Usage: Mob::Say(THIS, string message)"); { - Mob * THIS; - char * format = (char *)SvPV_nolen(ST(1)); + Mob *THIS; + char *format = (char *) SvPV_nolen(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->Say(format); @@ -3900,22 +3705,20 @@ XS(XS_Mob_Say) } XS(XS_Mob_Shout); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_Shout) -{ +XS(XS_Mob_Shout) { dXSARGS; if (items < 2) Perl_croak(aTHX_ "Usage: Mob::Shout(THIS, string message)"); { - Mob * THIS; - char * format = (char *)SvPV_nolen(ST(1)); + Mob *THIS; + char *format = (char *) SvPV_nolen(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->Shout(format); @@ -3924,22 +3727,20 @@ XS(XS_Mob_Shout) } XS(XS_Mob_Emote); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_Emote) -{ +XS(XS_Mob_Emote) { dXSARGS; if (items < 2) Perl_croak(aTHX_ "Usage: Mob::Emote(THIS, string message)"); { - Mob * THIS; - char * format = (char *)SvPV_nolen(ST(1)); + Mob *THIS; + char *format = (char *) SvPV_nolen(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->Emote(format); @@ -3948,28 +3749,26 @@ XS(XS_Mob_Emote) } XS(XS_Mob_InterruptSpell); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_InterruptSpell) -{ +XS(XS_Mob_InterruptSpell) { dXSARGS; if (items < 1 || items > 2) Perl_croak(aTHX_ "Usage: Mob::InterruptSpell(THIS, [uint16 spell_id = 0xFFFF])"); { - Mob * THIS; - uint16 spellid; + Mob *THIS; + uint16 spellid; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 2) spellid = 0xFFFF; else { - spellid = (uint16)SvUV(ST(1)); + spellid = (uint16) SvUV(ST(1)); } THIS->InterruptSpell(spellid); @@ -3978,27 +3777,26 @@ XS(XS_Mob_InterruptSpell) } XS(XS_Mob_CastSpell); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_CastSpell) -{ +XS(XS_Mob_CastSpell) { dXSARGS; if (items < 3 || items > 7) - Perl_croak(aTHX_ "Usage: Mob::CastSpell(THIS, uint16 spell_id, uint16 target_id, [int slot = 22], [int32 cast_time = -1], [int32 mana_cost = -1], [int16 resist_adjust = 0])"); + Perl_croak(aTHX_ + "Usage: Mob::CastSpell(THIS, uint16 spell_id, uint16 target_id, [int slot = 22], [int32 cast_time = -1], [int32 mana_cost = -1], [int16 resist_adjust = 0])"); { - Mob * THIS; - uint16 spell_id = (uint16)SvUV(ST(1)); - uint16 target_id = (uint16)SvUV(ST(2)); + Mob *THIS; + uint16 spell_id = (uint16) SvUV(ST(1)); + uint16 target_id = (uint16) SvUV(ST(2)); EQEmu::CastingSlot slot; - int32 casttime; - int32 mana_cost; - int16 resist_adjust; + int32 casttime; + int32 mana_cost; + int16 resist_adjust; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 4) @@ -4010,80 +3808,73 @@ XS(XS_Mob_CastSpell) if (items < 5) casttime = -1; else { - casttime = (int32)SvIV(ST(4)); + casttime = (int32) SvIV(ST(4)); } if (items < 6) mana_cost = -1; else { - mana_cost = (int32)SvIV(ST(5)); + mana_cost = (int32) SvIV(ST(5)); } - if(items < 7) - { - resist_adjust = 0; - } - else - { - resist_adjust = (int16)SvIV(ST(6)); - } + if (items < 7) { + resist_adjust = 0; + } else { + resist_adjust = (int16) SvIV(ST(6)); + } - if (resist_adjust == 0)//If you do not pass resist adjust as nullptr it will ignore the spells default resist adjust + if (resist_adjust == + 0)//If you do not pass resist adjust as nullptr it will ignore the spells default resist adjust THIS->CastSpell(spell_id, target_id, slot, casttime, mana_cost, 0, 0xFFFFFFFF, 0xFFFFFFFF, 0); else - THIS->CastSpell(spell_id, target_id, slot, casttime, mana_cost, 0, 0xFFFFFFFF, 0xFFFFFFFF, 0, &resist_adjust); + THIS->CastSpell(spell_id, target_id, slot, casttime, mana_cost, 0, 0xFFFFFFFF, 0xFFFFFFFF, 0, + &resist_adjust); } XSRETURN_EMPTY; } XS(XS_Mob_SpellFinished); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SpellFinished) -{ +XS(XS_Mob_SpellFinished) { dXSARGS; if (items < 2 || items > 5) - Perl_croak(aTHX_ "Usage: Mob::SpellFinished(uint16 spell_id, [Mob* spell_target = this], [uint16 mana_cost = 0], [uint16 resist_diff = 0])"); + Perl_croak(aTHX_ + "Usage: Mob::SpellFinished(uint16 spell_id, [Mob* spell_target = this], [uint16 mana_cost = 0], [uint16 resist_diff = 0])"); { - Mob * THIS; - uint16 spell_id = (uint16)SvUV(ST(1)); - Mob * spell_target; - uint16 mana_cost = 0; - int16 resist_diff; + Mob *THIS; + uint16 spell_id = (uint16) SvUV(ST(1)); + Mob *spell_target; + uint16 mana_cost = 0; + int16 resist_diff; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); spell_target = THIS; - if (items > 2) - { + if (items > 2) { if (sv_derived_from(ST(2), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(2))); - spell_target = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(2))); + spell_target = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "spell_target is not of type Mob"); - if(spell_target == nullptr) + if (spell_target == nullptr) Perl_croak(aTHX_ "spell_target is nullptr, avoiding crash."); } if (items > 3) - mana_cost = (uint16)SvUV(ST(3)); + mana_cost = (uint16) SvUV(ST(3)); - if (items > 4) - { - resist_diff = (int16)SvUV(ST(4)); - } - else - { - resist_diff = spells[spell_id].ResistDiff; - } + if (items > 4) { + resist_diff = (int16) SvUV(ST(4)); + } else { + resist_diff = spells[spell_id].ResistDiff; + } THIS->SpellFinished(spell_id, spell_target, EQEmu::CastingSlot::Item, mana_cost, -1, resist_diff); } @@ -4091,59 +3882,54 @@ XS(XS_Mob_SpellFinished) } XS(XS_Mob_IsImmuneToSpell); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_IsImmuneToSpell) -{ +XS(XS_Mob_IsImmuneToSpell) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Mob::IsImmuneToSpell(THIS, uint16 spell_id, [Mob* caster = nullptr])"); { - Mob * THIS; - bool RETVAL; - uint16 spell_id = (uint16)SvUV(ST(1)); - Mob * caster; + Mob *THIS; + bool RETVAL; + uint16 spell_id = (uint16) SvUV(ST(1)); + Mob *caster; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(2), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(2))); - caster = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(2))); + caster = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "caster is not of type Mob"); - if(caster == nullptr) + if (caster == nullptr) Perl_croak(aTHX_ "caster is nullptr, avoiding crash."); RETVAL = THIS->IsImmuneToSpell(spell_id, caster); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Mob_BuffFadeBySpellID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_BuffFadeBySpellID) -{ +XS(XS_Mob_BuffFadeBySpellID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::BuffFadeBySpellID(THIS, uint16 spell_id)"); { - Mob * THIS; - uint16 spell_id = (uint16)SvUV(ST(1)); + Mob *THIS; + uint16 spell_id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->BuffFadeBySpellID(spell_id); @@ -4152,29 +3938,27 @@ XS(XS_Mob_BuffFadeBySpellID) } XS(XS_Mob_BuffFadeByEffect); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_BuffFadeByEffect) -{ +XS(XS_Mob_BuffFadeByEffect) { dXSARGS; if (items < 2 || items > 3) Perl_croak(aTHX_ "Usage: Mob::BuffFadeByEffect(THIS, int effect_id, int skip_slot = -1)"); { - Mob * THIS; - int effectid = (int)SvIV(ST(1)); - int skipslot; + Mob *THIS; + int effectid = (int) SvIV(ST(1)); + int skipslot; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 3) skipslot = -1; else { - skipslot = (int)SvIV(ST(2)); + skipslot = (int) SvIV(ST(2)); } THIS->BuffFadeByEffect(effectid, skipslot); @@ -4183,21 +3967,19 @@ XS(XS_Mob_BuffFadeByEffect) } XS(XS_Mob_BuffFadeAll); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_BuffFadeAll) -{ +XS(XS_Mob_BuffFadeAll) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::BuffFadeAll(THIS)"); { - Mob * THIS; + Mob *THIS; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->BuffFadeAll(); @@ -4206,29 +3988,27 @@ XS(XS_Mob_BuffFadeAll) } XS(XS_Mob_BuffFadeBySlot); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_BuffFadeBySlot) -{ +XS(XS_Mob_BuffFadeBySlot) { dXSARGS; if (items < 2 || items > 3) Perl_croak(aTHX_ "Usage: Mob::BuffFadeBySlot(THIS, int slot, bool recalc_bonuses = true)"); { - Mob * THIS; - int slot = (int)SvIV(ST(1)); - bool iRecalcBonuses; + Mob *THIS; + int slot = (int) SvIV(ST(1)); + bool iRecalcBonuses; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 3) iRecalcBonuses = true; else { - iRecalcBonuses = (bool)SvTRUE(ST(2)); + iRecalcBonuses = (bool) SvTRUE(ST(2)); } THIS->BuffFadeBySlot(slot, iRecalcBonuses); @@ -4237,57 +4017,55 @@ XS(XS_Mob_BuffFadeBySlot) } XS(XS_Mob_CanBuffStack); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_CanBuffStack) -{ +XS(XS_Mob_CanBuffStack) { dXSARGS; if (items < 3 || items > 4) - Perl_croak(aTHX_ "Usage: Mob::CanBuffStack(THIS, uint16 spell_id, uint8 caster_level, [bool fail_if_overwritten = false])"); + Perl_croak(aTHX_ + "Usage: Mob::CanBuffStack(THIS, uint16 spell_id, uint8 caster_level, [bool fail_if_overwritten = false])"); { - Mob * THIS; - int RETVAL; + Mob *THIS; + int RETVAL; dXSTARG; - uint16 spellid = (uint16)SvUV(ST(1)); - uint8 caster_level = (uint8)SvUV(ST(2)); - bool iFailIfOverwrite; + uint16 spellid = (uint16) SvUV(ST(1)); + uint8 caster_level = (uint8) SvUV(ST(2)); + bool iFailIfOverwrite; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 4) iFailIfOverwrite = false; else { - iFailIfOverwrite = (bool)SvTRUE(ST(3)); + iFailIfOverwrite = (bool) SvTRUE(ST(3)); } RETVAL = THIS->CanBuffStack(spellid, caster_level, iFailIfOverwrite); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_IsCasting); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_IsCasting) -{ +XS(XS_Mob_IsCasting) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsCasting(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsCasting(); @@ -4298,55 +4076,52 @@ XS(XS_Mob_IsCasting) } XS(XS_Mob_CastingSpellID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_CastingSpellID) -{ +XS(XS_Mob_CastingSpellID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::CastingSpellID(THIS)"); { - Mob * THIS; - uint16 RETVAL; + Mob *THIS; + uint16 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->CastingSpellID(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_SetAppearance); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetAppearance) -{ +XS(XS_Mob_SetAppearance) { dXSARGS; if (items < 2 || items > 3) Perl_croak(aTHX_ "Usage: Mob::SetAppearance(THIS, int appearance [0|1|2|3|4], [ignore_self = true])"); { - Mob * THIS; - EmuAppearance app = (EmuAppearance)SvUV(ST(1)); - bool iIgnoreSelf; + Mob *THIS; + EmuAppearance app = (EmuAppearance) SvUV(ST(1)); + bool iIgnoreSelf; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 3) iIgnoreSelf = true; else { - iIgnoreSelf = (bool)SvTRUE(ST(2)); + iIgnoreSelf = (bool) SvTRUE(ST(2)); } THIS->SetAppearance(app, iIgnoreSelf); @@ -4355,74 +4130,70 @@ XS(XS_Mob_SetAppearance) } XS(XS_Mob_GetAppearance); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetAppearance) -{ +XS(XS_Mob_GetAppearance) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetAppearance(THIS)"); { - Mob * THIS; - EmuAppearance RETVAL; + Mob *THIS; + EmuAppearance RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetAppearance(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetRunAnimSpeed); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetRunAnimSpeed) -{ +XS(XS_Mob_GetRunAnimSpeed) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetRunAnimSpeed(THIS)"); { - Mob * THIS; - uint8 RETVAL; + Mob *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetRunAnimSpeed(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_SetRunAnimSpeed); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetRunAnimSpeed) -{ +XS(XS_Mob_SetRunAnimSpeed) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::SetRunAnimSpeed(THIS, int8 speed)"); { - Mob * THIS; - int8 in = (int8)SvIV(ST(1)); + Mob *THIS; + int8 in = (int8) SvIV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetRunAnimSpeed(in); @@ -4431,22 +4202,20 @@ XS(XS_Mob_SetRunAnimSpeed) } XS(XS_Mob_SetPetID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetPetID) -{ +XS(XS_Mob_SetPetID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::SetPetID(THIS, uint16 new_pet_id)"); { - Mob * THIS; - uint16 NewPetID = (uint16)SvUV(ST(1)); + Mob *THIS; + uint16 NewPetID = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetPetID(NewPetID); @@ -4455,48 +4224,45 @@ XS(XS_Mob_SetPetID) } XS(XS_Mob_GetPetID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetPetID) -{ +XS(XS_Mob_GetPetID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetPetID(THIS)"); { - Mob * THIS; - uint16 RETVAL; + Mob *THIS; + uint16 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetPetID(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_SetOwnerID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetOwnerID) -{ +XS(XS_Mob_SetOwnerID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::SetOwnerID(THIS, uint16 new_owner_id)"); { - Mob * THIS; - uint16 NewOwnerID = (uint16)SvUV(ST(1)); + Mob *THIS; + uint16 NewOwnerID = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetOwnerID(NewOwnerID); @@ -4505,100 +4271,95 @@ XS(XS_Mob_SetOwnerID) } XS(XS_Mob_GetOwnerID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetOwnerID) -{ +XS(XS_Mob_GetOwnerID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetOwnerID(THIS)"); { - Mob * THIS; - uint16 RETVAL; + Mob *THIS; + uint16 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetOwnerID(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetPetType); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetPetType) -{ +XS(XS_Mob_GetPetType) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetPetType(THIS)"); { - Mob * THIS; - uint16 RETVAL; + Mob *THIS; + uint16 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetPetType(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetBodyType); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetBodyType) -{ +XS(XS_Mob_GetBodyType) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetBodyType(THIS)"); { - Mob * THIS; - uint8 RETVAL; + Mob *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetBodyType(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_Stun); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_Stun) -{ +XS(XS_Mob_Stun) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::Stun(THIS, int duration)"); { - Mob * THIS; - int duration = (int)SvIV(ST(1)); + Mob *THIS; + int duration = (int) SvIV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->Stun(duration); @@ -4607,21 +4368,19 @@ XS(XS_Mob_Stun) } XS(XS_Mob_Spin); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_Spin) -{ +XS(XS_Mob_Spin) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::Spin(THIS)"); { - Mob * THIS; + Mob *THIS; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->Spin(); @@ -4630,21 +4389,19 @@ XS(XS_Mob_Spin) } XS(XS_Mob_Kill); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_Kill) -{ +XS(XS_Mob_Kill) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::Kill(THIS)"); { - Mob * THIS; + Mob *THIS; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->Kill(); @@ -4653,22 +4410,20 @@ XS(XS_Mob_Kill) } XS(XS_Mob_SetInvul); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetInvul) -{ +XS(XS_Mob_SetInvul) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::SetInvul(THIS, bool set_invulnerable)"); { - Mob * THIS; - bool invul = (bool)SvTRUE(ST(1)); + Mob *THIS; + bool invul = (bool) SvTRUE(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetInvul(invul); @@ -4677,22 +4432,20 @@ XS(XS_Mob_SetInvul) } XS(XS_Mob_GetInvul); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetInvul) -{ +XS(XS_Mob_GetInvul) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetInvul(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetInvul(); @@ -4703,22 +4456,20 @@ XS(XS_Mob_GetInvul) } XS(XS_Mob_SetExtraHaste); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetExtraHaste) -{ +XS(XS_Mob_SetExtraHaste) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::SetExtraHaste(THIS, int haste)"); { - Mob * THIS; - int Haste = (int)SvIV(ST(1)); + Mob *THIS; + int Haste = (int) SvIV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetExtraHaste(Haste); @@ -4727,74 +4478,70 @@ XS(XS_Mob_SetExtraHaste) } XS(XS_Mob_GetHaste); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetHaste) -{ +XS(XS_Mob_GetHaste) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetHaste(THIS)"); { - Mob * THIS; - int RETVAL; + Mob *THIS; + int RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetHaste(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetHandToHandDamage); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetHandToHandDamage) -{ +XS(XS_Mob_GetHandToHandDamage) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetHandToHandDamage(THIS)"); { - Mob * THIS; - int RETVAL; + Mob *THIS; + int RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetHandToHandDamage(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_CanThisClassDoubleAttack); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_CanThisClassDoubleAttack) -{ +XS(XS_Mob_CanThisClassDoubleAttack) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::CanThisClassDoubleAttack(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->CanThisClassDoubleAttack(); @@ -4805,22 +4552,20 @@ XS(XS_Mob_CanThisClassDoubleAttack) } XS(XS_Mob_CanThisClassDualWield); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_CanThisClassDualWield) -{ +XS(XS_Mob_CanThisClassDualWield) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::CanThisClassDualWield(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->CanThisClassDualWield(); @@ -4831,22 +4576,20 @@ XS(XS_Mob_CanThisClassDualWield) } XS(XS_Mob_CanThisClassRiposte); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_CanThisClassRiposte) -{ +XS(XS_Mob_CanThisClassRiposte) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::CanThisClassRiposte(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->CanThisClassRiposte(); @@ -4857,22 +4600,20 @@ XS(XS_Mob_CanThisClassRiposte) } XS(XS_Mob_CanThisClassDodge); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_CanThisClassDodge) -{ +XS(XS_Mob_CanThisClassDodge) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::CanThisClassDodge(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->CanThisClassDodge(); @@ -4883,22 +4624,20 @@ XS(XS_Mob_CanThisClassDodge) } XS(XS_Mob_CanThisClassParry); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_CanThisClassParry) -{ +XS(XS_Mob_CanThisClassParry) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::CanThisClassParry(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->CanThisClassParry(); @@ -4909,73 +4648,69 @@ XS(XS_Mob_CanThisClassParry) } XS(XS_Mob_GetHandToHandDelay); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetHandToHandDelay) -{ +XS(XS_Mob_GetHandToHandDelay) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetHandToHandDelay(THIS)"); { - Mob * THIS; - int RETVAL; + Mob *THIS; + int RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetHandToHandDelay(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetClassLevelFactor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetClassLevelFactor) -{ +XS(XS_Mob_GetClassLevelFactor) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetClassLevelFactor(THIS)"); { - Mob * THIS; - uint8 RETVAL; + Mob *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetClassLevelFactor(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_Mesmerize); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_Mesmerize) -{ +XS(XS_Mob_Mesmerize) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::Mesmerize(THIS)"); { - Mob * THIS; + Mob *THIS; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->Mesmerize(); @@ -4984,22 +4719,20 @@ XS(XS_Mob_Mesmerize) } XS(XS_Mob_IsMezzed); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_IsMezzed) -{ +XS(XS_Mob_IsMezzed) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsMezzed(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsMezzed(); @@ -5010,22 +4743,20 @@ XS(XS_Mob_IsMezzed) } XS(XS_Mob_IsStunned); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_IsStunned) -{ +XS(XS_Mob_IsStunned) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsStunned(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsStunned(); @@ -5037,21 +4768,19 @@ XS(XS_Mob_IsStunned) XS(XS_Mob_StartEnrage); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_StartEnrage) -{ +XS(XS_Mob_StartEnrage) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::StartEnrage(THIS)"); { - Mob * THIS; + Mob *THIS; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->StartEnrage(); @@ -5060,22 +4789,20 @@ XS(XS_Mob_StartEnrage) } XS(XS_Mob_IsEnraged); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_IsEnraged) -{ +XS(XS_Mob_IsEnraged) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsEnraged(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsEnraged(); @@ -5086,58 +4813,54 @@ XS(XS_Mob_IsEnraged) } XS(XS_Mob_GetReverseFactionCon); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetReverseFactionCon) -{ +XS(XS_Mob_GetReverseFactionCon) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::GetReverseFactionCon(THIS, iOther)"); { - Mob * THIS; - FACTION_VALUE RETVAL; + Mob *THIS; + FACTION_VALUE RETVAL; dXSTARG; - Mob* iOther; + Mob *iOther; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - iOther = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + iOther = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "iOther is not of type Mob"); - if(iOther == nullptr) + if (iOther == nullptr) Perl_croak(aTHX_ "iOther is nullptr, avoiding crash."); RETVAL = THIS->GetReverseFactionCon(iOther); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_IsAIControlled); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_IsAIControlled) -{ +XS(XS_Mob_IsAIControlled) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsAIControlled(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsAIControlled(); @@ -5148,74 +4871,70 @@ XS(XS_Mob_IsAIControlled) } XS(XS_Mob_GetAggroRange); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetAggroRange) -{ +XS(XS_Mob_GetAggroRange) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetAggroRange(THIS)"); { - Mob * THIS; - float RETVAL; + Mob *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetAggroRange(); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetAssistRange); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetAssistRange) -{ +XS(XS_Mob_GetAssistRange) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetAssistRange(THIS)"); { - Mob * THIS; - float RETVAL; + Mob *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetAssistRange(); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Mob_SetPetOrder); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetPetOrder) -{ +XS(XS_Mob_SetPetOrder) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::SetPetOrder(THIS, i)"); { - Mob * THIS; - Mob::eStandingPetOrder i = (Mob::eStandingPetOrder)SvIV(ST(1)); + Mob *THIS; + Mob::eStandingPetOrder i = (Mob::eStandingPetOrder) SvIV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetPetOrder(i); @@ -5224,48 +4943,45 @@ XS(XS_Mob_SetPetOrder) } XS(XS_Mob_GetPetOrder); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetPetOrder) -{ +XS(XS_Mob_GetPetOrder) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetPetOrder(THIS)"); { - Mob * THIS; - Mob::eStandingPetOrder RETVAL; + Mob *THIS; + Mob::eStandingPetOrder RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetPetOrder(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_IsRoamer); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_IsRoamer) -{ +XS(XS_Mob_IsRoamer) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsRoamer(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsRoamer(); @@ -5276,22 +4992,20 @@ XS(XS_Mob_IsRoamer) } XS(XS_Mob_IsRooted); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_IsRooted) -{ +XS(XS_Mob_IsRooted) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsRooted(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsRooted(); @@ -5302,66 +5016,64 @@ XS(XS_Mob_IsRooted) } XS(XS_Mob_AddToHateList); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_AddToHateList) -{ +XS(XS_Mob_AddToHateList) { dXSARGS; if (items < 2 || items > 7) - Perl_croak(aTHX_ "Usage: Mob::AddToHateList(THIS, Mob* other, [int32 hate = 0], [int32 damage = 0], [bool yell_for_help = true], [bool frenzy = false], [bool buff_tic = false])"); + Perl_croak(aTHX_ + "Usage: Mob::AddToHateList(THIS, Mob* other, [int32 hate = 0], [int32 damage = 0], [bool yell_for_help = true], [bool frenzy = false], [bool buff_tic = false])"); { - Mob * THIS; - Mob* other; - int32 hate; - int32 damage; - bool iYellForHelp; - bool bFrenzy; - bool iBuffTic; + Mob *THIS; + Mob *other; + int32 hate; + int32 damage; + bool iYellForHelp; + bool bFrenzy; + bool iBuffTic; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - other = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + other = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "other is not of type Mob"); - if(other == nullptr) + if (other == nullptr) Perl_croak(aTHX_ "other is nullptr, avoiding crash."); if (items < 3) hate = 0; else { - hate = (int32)SvIV(ST(2)); + hate = (int32) SvIV(ST(2)); } if (items < 4) damage = 0; else { - damage = (int32)SvIV(ST(3)); + damage = (int32) SvIV(ST(3)); } if (items < 5) iYellForHelp = true; else { - iYellForHelp = (bool)SvTRUE(ST(4)); + iYellForHelp = (bool) SvTRUE(ST(4)); } if (items < 6) bFrenzy = false; else { - bFrenzy = (bool)SvTRUE(ST(5)); + bFrenzy = (bool) SvTRUE(ST(5)); } if (items < 7) iBuffTic = false; else { - iBuffTic = (bool)SvTRUE(ST(6)); + iBuffTic = (bool) SvTRUE(ST(6)); } THIS->AddToHateList(other, hate, damage, iYellForHelp, bFrenzy, iBuffTic); @@ -5370,45 +5082,42 @@ XS(XS_Mob_AddToHateList) } XS(XS_Mob_SetHate); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetHate) -{ +XS(XS_Mob_SetHate) { dXSARGS; if (items < 2 || items > 4) Perl_croak(aTHX_ "Usage: Mob::SetHate(THIS, Mob* other, [int32 hate = 0], [int32 damage = 0])"); { - Mob * THIS; - Mob* other; - int32 hate; - int32 damage; + Mob *THIS; + Mob *other; + int32 hate; + int32 damage; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - other = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + other = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "other is not of type Mob"); - if(other == nullptr) + if (other == nullptr) Perl_croak(aTHX_ "other is nullptr, avoiding crash."); if (items < 3) hate = 0; else { - hate = (int32)SvIV(ST(2)); + hate = (int32) SvIV(ST(2)); } if (items < 4) damage = 0; else { - damage = (int32)SvIV(ST(3)); + damage = (int32) SvIV(ST(3)); } THIS->SetHateAmountOnEnt(other, hate, damage); @@ -5417,31 +5126,28 @@ XS(XS_Mob_SetHate) } XS(XS_Mob_HalveAggro); -XS(XS_Mob_HalveAggro) -{ +XS(XS_Mob_HalveAggro) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::HalveAggro(THIS, Mob* other)"); { - Mob * THIS; - Mob * other; + Mob *THIS; + Mob *other; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - other = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + other = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "other is not of type Mob"); - if(other == nullptr) + if (other == nullptr) Perl_croak(aTHX_ "other is nullptr, avoiding crash."); THIS->HalveAggro(other); @@ -5450,31 +5156,28 @@ XS(XS_Mob_HalveAggro) } XS(XS_Mob_DoubleAggro); -XS(XS_Mob_DoubleAggro) -{ +XS(XS_Mob_DoubleAggro) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::DoubleAggro(THIS, Mob* other)"); { - Mob * THIS; - Mob * other; + Mob *THIS; + Mob *other; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - other = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + other = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "other is not of type Mob"); - if(other == nullptr) + if (other == nullptr) Perl_croak(aTHX_ "other is nullptr, avoiding crash."); THIS->DoubleAggro(other); @@ -5483,189 +5186,176 @@ XS(XS_Mob_DoubleAggro) } XS(XS_Mob_GetHateAmount); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetHateAmount) -{ +XS(XS_Mob_GetHateAmount) { dXSARGS; if (items < 2 || items > 3) Perl_croak(aTHX_ "Usage: Mob::GetHateAmount(THIS, Mob* mob, [bool is_damage = false])"); { - Mob * THIS; - uint32 RETVAL; + Mob *THIS; + uint32 RETVAL; dXSTARG; - Mob* tmob; - bool is_dam; + Mob *tmob; + bool is_dam; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - tmob = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + tmob = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "tmob is not of type Mob"); - if(tmob == nullptr) + if (tmob == nullptr) Perl_croak(aTHX_ "tmob is nullptr, avoiding crash."); if (items < 3) is_dam = false; else { - is_dam = (bool)SvTRUE(ST(2)); + is_dam = (bool) SvTRUE(ST(2)); } RETVAL = THIS->GetHateAmount(tmob, is_dam); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetDamageAmount); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetDamageAmount) -{ +XS(XS_Mob_GetDamageAmount) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::GetDamageAmount(THIS, Mob* target_mob)"); { - Mob * THIS; - uint32 RETVAL; + Mob *THIS; + uint32 RETVAL; dXSTARG; - Mob* tmob; + Mob *tmob; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - tmob = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + tmob = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "tmob is not of type Mob"); - if(tmob == nullptr) + if (tmob == nullptr) Perl_croak(aTHX_ "tmob is nullptr, avoiding crash."); RETVAL = THIS->GetDamageAmount(tmob); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetHateTop); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetHateTop) -{ +XS(XS_Mob_GetHateTop) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetHateTop(THIS)"); { - Mob * THIS; - Mob * RETVAL; + Mob *THIS; + Mob *RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetHateTop(); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Mob", (void*)RETVAL); + sv_setref_pv(ST(0), "Mob", (void *) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetHateDamageTop); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetHateDamageTop) -{ +XS(XS_Mob_GetHateDamageTop) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::GetHateDamageTop(THIS, Mob* other)"); { - Mob * THIS; - Mob * RETVAL; - Mob* other; + Mob *THIS; + Mob *RETVAL; + Mob *other; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - other = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + other = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "other is not of type Mob"); - if(other == nullptr) + if (other == nullptr) Perl_croak(aTHX_ "other is nullptr, avoiding crash."); RETVAL = THIS->GetHateDamageTop(other); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Mob", (void*)RETVAL); + sv_setref_pv(ST(0), "Mob", (void *) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetHateRandom); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetHateRandom) -{ +XS(XS_Mob_GetHateRandom) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetHateRandom(THIS)"); { - Mob * THIS; - Mob * RETVAL; + Mob *THIS; + Mob *RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetHateRandom(); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Mob", (void*)RETVAL); + sv_setref_pv(ST(0), "Mob", (void *) RETVAL); } XSRETURN(1); } XS(XS_Mob_IsEngaged); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_IsEngaged) -{ +XS(XS_Mob_IsEngaged) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsEngaged(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsEngaged(); @@ -5676,22 +5366,20 @@ XS(XS_Mob_IsEngaged) } XS(XS_Mob_HateSummon); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_HateSummon) -{ +XS(XS_Mob_HateSummon) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::HateSummon(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->HateSummon(); @@ -5736,22 +5424,20 @@ XS(XS_Mob_FaceTarget) { } XS(XS_Mob_SetHeading); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetHeading) -{ +XS(XS_Mob_SetHeading) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::SetHeading(THIS, float heading)"); { - Mob * THIS; - float iHeading = (float)SvNV(ST(1)); + Mob *THIS; + float iHeading = (float) SvNV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetHeading(iHeading); @@ -5760,21 +5446,19 @@ XS(XS_Mob_SetHeading) } XS(XS_Mob_WipeHateList); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_WipeHateList) -{ +XS(XS_Mob_WipeHateList) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::WipeHateList(THIS)"); { - Mob * THIS; + Mob *THIS; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->WipeHateList(); @@ -5783,32 +5467,29 @@ XS(XS_Mob_WipeHateList) } XS(XS_Mob_CheckAggro); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_CheckAggro) -{ +XS(XS_Mob_CheckAggro) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::CheckAggro(THIS, Mob* other)"); { - Mob * THIS; - bool RETVAL; - Mob* other; + Mob *THIS; + bool RETVAL; + Mob *other; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - other = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + other = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "other is not of type Mob"); - if(other == nullptr) + if (other == nullptr) Perl_croak(aTHX_ "other is nullptr, avoiding crash."); RETVAL = THIS->CheckAggro(other); @@ -5819,118 +5500,113 @@ XS(XS_Mob_CheckAggro) } XS(XS_Mob_CalculateHeadingToTarget); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_CalculateHeadingToTarget) -{ +XS(XS_Mob_CalculateHeadingToTarget) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Mob::CalculateHeadingToTarget(THIS, float x, float y)"); { - Mob * THIS; - int8 RETVAL; + Mob *THIS; + int8 RETVAL; dXSTARG; - float in_x = (float)SvNV(ST(1)); - float in_y = (float)SvNV(ST(2)); + float in_x = (float) SvNV(ST(1)); + float in_y = (float) SvNV(ST(2)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->CalculateHeadingToTarget(in_x, in_y); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_CalculateNewPosition); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_CalculateNewPosition) -{ +XS(XS_Mob_CalculateNewPosition) { dXSARGS; if (items < 5 || items > 6) - Perl_croak(aTHX_ "Usage: Mob::CalculateNewPosition(THIS, float x, float y, float z, float speed, [bool check_z = false])"); + Perl_croak(aTHX_ + "Usage: Mob::CalculateNewPosition(THIS, float x, float y, float z, float speed, [bool check_z = false])"); { - Mob * THIS; - bool RETVAL; - float x = (float)SvNV(ST(1)); - float y = (float)SvNV(ST(2)); - float z = (float)SvNV(ST(3)); - float speed = (float)SvNV(ST(4)); - bool checkZ; + Mob *THIS; + bool RETVAL; + float x = (float) SvNV(ST(1)); + float y = (float) SvNV(ST(2)); + float z = (float) SvNV(ST(3)); + float speed = (float) SvNV(ST(4)); + bool checkZ; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 6) checkZ = false; else { - checkZ = (bool)SvTRUE(ST(5)); + checkZ = (bool) SvTRUE(ST(5)); } RETVAL = THIS->CalculateNewPosition(x, y, z, speed, checkZ); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Mob_CalculateDistance); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_CalculateDistance) -{ +XS(XS_Mob_CalculateDistance) { dXSARGS; if (items != 4) Perl_croak(aTHX_ "Usage: Mob::CalculateDistance(THIS, float x, float y, float z)"); { - Mob * THIS; - float RETVAL; + Mob *THIS; + float RETVAL; dXSTARG; - float x = (float)SvNV(ST(1)); - float y = (float)SvNV(ST(2)); - float z = (float)SvNV(ST(3)); + float x = (float) SvNV(ST(1)); + float y = (float) SvNV(ST(2)); + float z = (float) SvNV(ST(3)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->CalculateDistance(x, y, z); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Mob_SendTo); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SendTo) -{ +XS(XS_Mob_SendTo) { dXSARGS; if (items != 4) Perl_croak(aTHX_ "Usage: Mob::SendTo(THIS, float new_x, float new_y, float new_z)"); { - Mob * THIS; - float new_x = (float)SvNV(ST(1)); - float new_y = (float)SvNV(ST(2)); - float new_z = (float)SvNV(ST(3)); + Mob *THIS; + float new_x = (float) SvNV(ST(1)); + float new_y = (float) SvNV(ST(2)); + float new_z = (float) SvNV(ST(3)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SendTo(new_x, new_y, new_z); @@ -5939,24 +5615,22 @@ XS(XS_Mob_SendTo) } XS(XS_Mob_SendToFixZ); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SendToFixZ) -{ +XS(XS_Mob_SendToFixZ) { dXSARGS; if (items != 4) Perl_croak(aTHX_ "Usage: Mob::SendToFixZ(THIS, float new_x, float new_y, float new_z)"); { - Mob * THIS; - float new_x = (float)SvNV(ST(1)); - float new_y = (float)SvNV(ST(2)); - float new_z = (float)SvNV(ST(3)); + Mob *THIS; + float new_x = (float) SvNV(ST(1)); + float new_y = (float) SvNV(ST(2)); + float new_z = (float) SvNV(ST(3)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SendToFixZ(new_x, new_y, new_z); @@ -5965,25 +5639,24 @@ XS(XS_Mob_SendToFixZ) } XS(XS_Mob_NPCSpecialAttacks); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_NPCSpecialAttacks) -{ +XS(XS_Mob_NPCSpecialAttacks) { dXSARGS; if (items < 3 || items > 5) - Perl_croak(aTHX_ "Usage: Mob::NPCSpecialAttacks(THIS, string abilities_string, int perm_tag, [bool reset = true], [bool remove = true])"); + Perl_croak(aTHX_ + "Usage: Mob::NPCSpecialAttacks(THIS, string abilities_string, int perm_tag, [bool reset = true], [bool remove = true])"); { - Mob * THIS; - char* parse = (char *)SvPV_nolen(ST(1)); - int permtag = (int)SvIV(ST(2)); - bool reset = items == 4 ? (bool)SvTRUE(ST(3)) : true; - bool remove = items == 5 ? (bool)SvTRUE(ST(4)) : false; + Mob *THIS; + char *parse = (char *) SvPV_nolen(ST(1)); + int permtag = (int) SvIV(ST(2)); + bool reset = items == 4 ? (bool) SvTRUE(ST(3)) : true; + bool remove = items == 5 ? (bool) SvTRUE(ST(4)) : false; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->NPCSpecialAttacks(parse, permtag, reset, remove); @@ -5992,214 +5665,203 @@ XS(XS_Mob_NPCSpecialAttacks) } XS(XS_Mob_DontHealMeBefore); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_DontHealMeBefore) -{ +XS(XS_Mob_DontHealMeBefore) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::DontHealMeBefore(THIS)"); { - Mob * THIS; - uint32 RETVAL; + Mob *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->DontHealMeBefore(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_DontBuffMeBefore); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_DontBuffMeBefore) -{ +XS(XS_Mob_DontBuffMeBefore) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::DontBuffMeBefore(THIS)"); { - Mob * THIS; - uint32 RETVAL; + Mob *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->DontBuffMeBefore(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_DontDotMeBefore); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_DontDotMeBefore) -{ +XS(XS_Mob_DontDotMeBefore) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::DontDotMeBefore(THIS)"); { - Mob * THIS; - uint32 RETVAL; + Mob *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->DontDotMeBefore(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_DontRootMeBefore); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_DontRootMeBefore) -{ +XS(XS_Mob_DontRootMeBefore) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::DontRootMeBefore(THIS)"); { - Mob * THIS; - uint32 RETVAL; + Mob *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->DontRootMeBefore(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_DontSnareMeBefore); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_DontSnareMeBefore) -{ +XS(XS_Mob_DontSnareMeBefore) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::DontSnareMeBefore(THIS)"); { - Mob * THIS; - uint32 RETVAL; + Mob *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->DontSnareMeBefore(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetResist); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetResist) -{ +XS(XS_Mob_GetResist) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::GetResist(THIS, type)"); { - Mob * THIS; - int16 RETVAL; + Mob *THIS; + int16 RETVAL; dXSTARG; - uint8 type = (uint8)SvUV(ST(1)); + uint8 type = (uint8) SvUV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetResist(type); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetShieldTarget); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetShieldTarget) -{ +XS(XS_Mob_GetShieldTarget) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetShieldTarget(THIS)"); { - Mob * THIS; - Mob * RETVAL; + Mob *THIS; + Mob *RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetShieldTarget(); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Mob", (void*)RETVAL); + sv_setref_pv(ST(0), "Mob", (void *) RETVAL); } XSRETURN(1); } XS(XS_Mob_SetShieldTarget); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetShieldTarget) -{ +XS(XS_Mob_SetShieldTarget) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::SetShieldTarget(THIS, mob)"); { - Mob * THIS; - Mob* mob; + Mob *THIS; + Mob *mob; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - mob = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + mob = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "mob is not of type Mob"); - if(mob == nullptr) + if (mob == nullptr) Perl_croak(aTHX_ "mob is nullptr, avoiding crash."); THIS->SetShieldTarget(mob); @@ -6208,22 +5870,20 @@ XS(XS_Mob_SetShieldTarget) } XS(XS_Mob_Charmed); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_Charmed) -{ +XS(XS_Mob_Charmed) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::Charmed(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->Charmed(); @@ -6234,218 +5894,207 @@ XS(XS_Mob_Charmed) } XS(XS_Mob_GetLevelHP); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetLevelHP) -{ +XS(XS_Mob_GetLevelHP) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::GetLevelHP(THIS, uint8 level)"); { - Mob * THIS; - uint32 RETVAL; + Mob *THIS; + uint32 RETVAL; dXSTARG; - uint8 tlevel = (uint8)SvUV(ST(1)); + uint8 tlevel = (uint8) SvUV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetLevelHP(tlevel); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetZoneID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetZoneID) -{ +XS(XS_Mob_GetZoneID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetZoneID(THIS)"); { - Mob * THIS; - uint32 RETVAL; + Mob *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetZoneID(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_CheckAggroAmount); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_CheckAggroAmount) -{ +XS(XS_Mob_CheckAggroAmount) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::CheckAggroAmount(THIS, uint16 spell_id)"); { - Mob * THIS; - uint32 RETVAL; + Mob *THIS; + uint32 RETVAL; dXSTARG; - uint16 spellid = (uint16)SvUV(ST(1)); + uint16 spellid = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->CheckAggroAmount(spellid, nullptr); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_CheckHealAggroAmount); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_CheckHealAggroAmount) -{ +XS(XS_Mob_CheckHealAggroAmount) { dXSARGS; if (items != 2 && items != 3) Perl_croak(aTHX_ "Usage: Mob::CheckHealAggroAmount(THIS, uint16 spell_id, uint32 possible_heal_amt)"); { - Mob * THIS; - uint32 RETVAL; + Mob *THIS; + uint32 RETVAL; dXSTARG; - uint16 spellid = (uint16)SvUV(ST(1)); - uint32 possible = 0; + uint16 spellid = (uint16) SvUV(ST(1)); + uint32 possible = 0; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - if(items == 3) - { - possible = (uint32)SvUV(ST(2)); + if (items == 3) { + possible = (uint32) SvUV(ST(2)); } RETVAL = THIS->CheckHealAggroAmount(spellid, nullptr, possible); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetAA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetAA) -{ +XS(XS_Mob_GetAA) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::GetAA(THIS, uint32 rank_id)"); { - Mob * THIS; - uint32 RETVAL; + Mob *THIS; + uint32 RETVAL; dXSTARG; - uint32 rank_id = (uint32)SvUV(ST(1)); + uint32 rank_id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetAA(rank_id); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetAAByAAID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetAAByAAID) -{ +XS(XS_Mob_GetAAByAAID) { dXSARGS; - if(items != 2) + if (items != 2) Perl_croak(aTHX_ "Usage: Mob::GetAAByAAID(THIS, uint32 aa_id)"); { - Mob * THIS; - uint32 RETVAL; + Mob *THIS; + uint32 RETVAL; dXSTARG; - uint32 aa_id = (uint32)SvUV(ST(1)); + uint32 aa_id = (uint32) SvUV(ST(1)); - if(sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + if (sv_derived_from(ST(0), "Mob")) { + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob *, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetAAByAAID(aa_id); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_SetAA); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetAA) -{ +XS(XS_Mob_SetAA) { dXSARGS; - if(items < 3 || items > 4) + if (items < 3 || items > 4) Perl_croak(aTHX_ "Usage: Mob::SetAA(THIS, int aa_id, int points, [int charges = 0])"); { - Mob * THIS; - bool RETVAL; - int aa_id = (int)SvIV(ST(1)); - int points = (int)SvIV(ST(2)); - int charges = (items == 4) ? (int)SvIV(ST(3)) : 0; + Mob *THIS; + bool RETVAL; + int aa_id = (int) SvIV(ST(1)); + int points = (int) SvIV(ST(2)); + int charges = (items == 4) ? (int) SvIV(ST(3)) : 0; - if(sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + if (sv_derived_from(ST(0), "Mob")) { + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob *, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->SetAA(aa_id, points, charges); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Mob_DivineAura); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_DivineAura) -{ +XS(XS_Mob_DivineAura) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::DivineAura(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->DivineAura(); @@ -6456,31 +6105,28 @@ XS(XS_Mob_DivineAura) } XS(XS_Mob_AddFeignMemory); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_AddFeignMemory) -{ +XS(XS_Mob_AddFeignMemory) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::AddFeignMemory(THIS, Client* attacker)"); { - Mob * THIS; - Client* attacker; + Mob *THIS; + Client *attacker; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - attacker = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + attacker = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "attacker is not of type Client"); - if(attacker == nullptr) + if (attacker == nullptr) Perl_croak(aTHX_ "attacker is nullptr, avoiding crash."); THIS->AddFeignMemory(attacker); @@ -6489,31 +6135,28 @@ XS(XS_Mob_AddFeignMemory) } XS(XS_Mob_RemoveFromFeignMemory); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_RemoveFromFeignMemory) -{ +XS(XS_Mob_RemoveFromFeignMemory) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::RemoveFromFeignMemory(THIS, Client* attacker)"); { - Mob * THIS; - Client* attacker; + Mob *THIS; + Client *attacker; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - attacker = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + attacker = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "attacker is not of type Client"); - if(attacker == nullptr) + if (attacker == nullptr) Perl_croak(aTHX_ "attacker is nullptr, avoiding crash."); THIS->RemoveFromFeignMemory(attacker); @@ -6522,21 +6165,19 @@ XS(XS_Mob_RemoveFromFeignMemory) } XS(XS_Mob_ClearFeignMemory); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_ClearFeignMemory) -{ +XS(XS_Mob_ClearFeignMemory) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::ClearFeignMemory(THIS)"); { - Mob * THIS; + Mob *THIS; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->ClearFeignMemory(); @@ -6545,22 +6186,20 @@ XS(XS_Mob_ClearFeignMemory) } XS(XS_Mob_SetOOCRegen); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetOOCRegen) -{ +XS(XS_Mob_SetOOCRegen) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::SetOOCRegen(THIS, int32 new_ooc_regen)"); { - Mob * THIS; - int32 newoocregen = (int32)SvIV(ST(1)); + Mob *THIS; + int32 newoocregen = (int32) SvIV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetOOCRegen(newoocregen); @@ -6569,77 +6208,73 @@ XS(XS_Mob_SetOOCRegen) } XS(XS_Mob_GetEntityVariable); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetEntityVariable) -{ +XS(XS_Mob_GetEntityVariable) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::GetEntityVariable(THIS, string id)"); { - Mob * THIS; - Const_char * id = SvPV_nolen(ST(1)); - Const_char * RETVAL; + Mob *THIS; + Const_char *id = SvPV_nolen(ST(1)); + Const_char *RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetEntityVariable(id); - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; + sv_setpv(TARG, RETVAL); + XSprePUSH; + PUSHTARG; } XSRETURN(1); } XS(XS_Mob_EntityVariableExists); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_EntityVariableExists) -{ +XS(XS_Mob_EntityVariableExists) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::EntityVariableExists(THIS, string id)"); { - Mob * THIS; - Const_char * id = SvPV_nolen(ST(1)); - bool RETVAL; + Mob *THIS; + Const_char *id = SvPV_nolen(ST(1)); + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->EntityVariableExists(id); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Mob_SetEntityVariable); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetEntityVariable) -{ +XS(XS_Mob_SetEntityVariable) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Mob::SetEntityVariable(THIS, string id, string var)"); { - Mob * THIS; - Const_char * id = SvPV_nolen(ST(1)); - const char * var = (const char *)SvPV_nolen(ST(2)); + Mob *THIS; + Const_char *id = SvPV_nolen(ST(1)); + const char *var = (const char *) SvPV_nolen(ST(2)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetEntityVariable(id, var); @@ -6648,8 +6283,7 @@ XS(XS_Mob_SetEntityVariable) } XS(XS_Mob_GetHateList); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetHateList) -{ +XS(XS_Mob_GetHateList) { dXSARGS; int num_entries = 0; if (items != 1) @@ -6658,23 +6292,21 @@ XS(XS_Mob_GetHateList) Mob *THIS; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); auto hate_list = THIS->GetHateList(); - auto iter = hate_list.begin(); + auto iter = hate_list.begin(); - while(iter != hate_list.end()) - { + while (iter != hate_list.end()) { struct_HateList *entry = (*iter); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "HateEntry", (void*)entry); + sv_setref_pv(ST(0), "HateEntry", (void *) entry); XPUSHs(ST(0)); num_entries++; iter++; @@ -6684,32 +6316,29 @@ XS(XS_Mob_GetHateList) } XS(XS_Mob_SignalClient); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SignalClient) -{ +XS(XS_Mob_SignalClient) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Mob::SignalClient(THIS, Client* client, uint32 data)"); { - Mob * THIS; - Client* client = nullptr; - uint32 data = (uint32)SvUV(ST(2)); + Mob *THIS; + Client *client = nullptr; + uint32 data = (uint32) SvUV(ST(2)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - client = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + client = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "client is not of type Client"); - if(client == nullptr) + if (client == nullptr) Perl_croak(aTHX_ "client is nullptr, avoiding crash."); client->Signal(data); @@ -6718,81 +6347,74 @@ XS(XS_Mob_SignalClient) } XS(XS_Mob_CombatRange); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_CombatRange) -{ +XS(XS_Mob_CombatRange) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::CombatRange(THIS, Mob* target)"); { - Mob * THIS; - Mob * target = nullptr; - bool RETVAL; + Mob *THIS; + Mob *target = nullptr; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - target = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + target = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "target is not of type Mob"); - if(target == nullptr) + if (target == nullptr) Perl_croak(aTHX_ "target is nullptr, avoiding crash."); RETVAL = THIS->CombatRange(target); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Mob_DoSpecialAttackDamage); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_DoSpecialAttackDamage) -{ +XS(XS_Mob_DoSpecialAttackDamage) { dXSARGS; if (items < 4 || items > 6) - Perl_croak(aTHX_ "Usage: Mob::DoSpecialAttackDamage(THIS, Mob* target, int skill, int32 max_damage, [int32 min_damage = 1], [int32 hate_override = -11])"); + Perl_croak(aTHX_ + "Usage: Mob::DoSpecialAttackDamage(THIS, Mob* target, int skill, int32 max_damage, [int32 min_damage = 1], [int32 hate_override = -11])"); { - Mob * THIS; - Mob* target; - EQEmu::skills::SkillType attack_skill = (EQEmu::skills::SkillType)SvUV(ST(2)); - int32 max_damage = (int32)SvIV(ST(3)); - int32 min_damage = 1; - int32 hate_override = -11; + Mob *THIS; + Mob *target; + EQEmu::skills::SkillType attack_skill = (EQEmu::skills::SkillType) SvUV(ST(2)); + int32 max_damage = (int32) SvIV(ST(3)); + int32 min_damage = 1; + int32 hate_override = -11; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - target = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + target = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "target is not of type Mob"); - if(target == nullptr) + if (target == nullptr) Perl_croak(aTHX_ "target is nullptr, avoiding crash."); - if (items > 4) - { - min_damage = (int32)SvIV(ST(4)); + if (items > 4) { + min_damage = (int32) SvIV(ST(4)); } - if (items == 6) - { - hate_override = (int32)SvIV(ST(5)); + if (items == 6) { + hate_override = (int32) SvIV(ST(5)); } THIS->DoSpecialAttackDamage(target, attack_skill, max_damage, min_damage, hate_override); @@ -6801,32 +6423,29 @@ XS(XS_Mob_DoSpecialAttackDamage) } XS(XS_Mob_CheckLoS); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_CheckLoS) -{ +XS(XS_Mob_CheckLoS) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::CheckLoS(THIS, Mob*)"); { - Mob * THIS; - Mob* mob; - bool RETVAL; + Mob *THIS; + Mob *mob; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - mob = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + mob = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "mob is not of type Mob"); - if(mob == nullptr) + if (mob == nullptr) Perl_croak(aTHX_ "mob is nullptr, avoiding crash."); RETVAL = THIS->CheckLosFN(mob); @@ -6837,33 +6456,30 @@ XS(XS_Mob_CheckLoS) } XS(XS_Mob_CheckLoSToLoc); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_CheckLoSToLoc) -{ +XS(XS_Mob_CheckLoSToLoc) { dXSARGS; if (items != 4 && items != 5) Perl_croak(aTHX_ "Usage: Mob::CheckLoSToLoc(THIS, float x, float y, float z, float mob_size)"); { - Mob * THIS; - float loc_x = (float)SvNV(ST(1)); - float loc_y = (float)SvNV(ST(2)); - float loc_z = (float)SvNV(ST(3)); - float mob_size; - bool RETVAL; + Mob *THIS; + float loc_x = (float) SvNV(ST(1)); + float loc_y = (float) SvNV(ST(2)); + float loc_z = (float) SvNV(ST(3)); + float mob_size; + bool RETVAL; if (items == 5) { - mob_size = (float)SvNV(ST(4)); - } - else { + mob_size = (float) SvNV(ST(4)); + } else { mob_size = 6; } if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->CheckLosFN(loc_x, loc_y, loc_z, mob_size); @@ -6874,94 +6490,90 @@ XS(XS_Mob_CheckLoSToLoc) } XS(XS_Mob_FindGroundZ); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_FindGroundZ) -{ +XS(XS_Mob_FindGroundZ) { dXSARGS; if (items != 3 && items != 4) Perl_croak(aTHX_ "Usage: Mob::FindGroundZ(THIS, float x, float y, float z_offset)"); { - Mob * THIS; - float new_x = (float)SvNV(ST(1)); - float new_y = (float)SvNV(ST(2)); - float z_offset; - float RETVAL; + Mob *THIS; + float new_x = (float) SvNV(ST(1)); + float new_y = (float) SvNV(ST(2)); + float z_offset; + float RETVAL; dXSTARG; if (items == 4) { - z_offset = (float)SvNV(ST(3)); - } - else { + z_offset = (float) SvNV(ST(3)); + } else { z_offset = 10; } if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetGroundZ(new_x, new_y, z_offset); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Mob_ProjectileAnim); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_ProjectileAnim) -{ +XS(XS_Mob_ProjectileAnim) { dXSARGS; if (items < 3 || items > 9) - Perl_croak(aTHX_ "Usage: Mob::ProjectileAnim(THIS, Mob* mob, int item_id, [bool is_arrow = false], [float speed = 0], [float angle = 0], [float tilt = 0], [float arc = 0])"); + Perl_croak(aTHX_ + "Usage: Mob::ProjectileAnim(THIS, Mob* mob, int item_id, [bool is_arrow = false], [float speed = 0], [float angle = 0], [float tilt = 0], [float arc = 0])"); { - Mob * THIS; - Mob* mob; - int item_id = SvUV(ST(2)); - bool IsArrow = false; - float speed = 0; - float angle = 0; - float tilt = 0; - float arc = 0; - char * IDFile = nullptr; + Mob *THIS; + Mob *mob; + int item_id = SvUV(ST(2)); + bool IsArrow = false; + float speed = 0; + float angle = 0; + float tilt = 0; + float arc = 0; + char *IDFile = nullptr; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - mob = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + mob = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "mob is not of type Mob"); - if(mob == nullptr) + if (mob == nullptr) Perl_croak(aTHX_ "mob is nullptr, avoiding crash."); - if(items > 3){ - IsArrow = (bool)SvTRUE(ST(3)); + if (items > 3) { + IsArrow = (bool) SvTRUE(ST(3)); } - if(items > 4){ - speed = (float)SvNV(ST(4)); + if (items > 4) { + speed = (float) SvNV(ST(4)); } - if(items > 5){ - angle = (float)SvNV(ST(5)); + if (items > 5) { + angle = (float) SvNV(ST(5)); } - if(items > 6){ - tilt = (float)SvNV(ST(6)); + if (items > 6) { + tilt = (float) SvNV(ST(6)); } - if(items > 7){ - arc = (float)SvNV(ST(7)); + if (items > 7) { + arc = (float) SvNV(ST(7)); } - if (items > 8) { IDFile = (char *)SvPV_nolen(ST(8)); } + if (items > 8) { IDFile = (char *) SvPV_nolen(ST(8)); } THIS->ProjectileAnimation(mob, item_id, IsArrow, speed, angle, tilt, arc, IDFile); @@ -6970,68 +6582,64 @@ XS(XS_Mob_ProjectileAnim) } XS(XS_Mob_HasNPCSpecialAtk); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_HasNPCSpecialAtk) -{ +XS(XS_Mob_HasNPCSpecialAtk) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::HasNPCSpecialAtk(THIS, string ability_string)"); { - Mob * THIS; - char* parse = (char *)SvPV_nolen(ST(1)); - bool RETVAL; + Mob *THIS; + char *parse = (char *) SvPV_nolen(ST(1)); + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->HasNPCSpecialAtk(parse); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Mob_SendAppearanceEffect); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SendAppearanceEffect) -{ +XS(XS_Mob_SendAppearanceEffect) { dXSARGS; if (items < 2 || items > 7) - Perl_croak(aTHX_ "Usage: Mob::SendAppearanceEffect(THIS, int32 param_1, [int32 param_2 = 0], [int32 param_3 = 0], [int32 param_4 = 0], [int32 param_5 = 0], [Client* single_client_to_send_to = null])"); + Perl_croak(aTHX_ + "Usage: Mob::SendAppearanceEffect(THIS, int32 param_1, [int32 param_2 = 0], [int32 param_3 = 0], [int32 param_4 = 0], [int32 param_5 = 0], [Client* single_client_to_send_to = null])"); { - Mob * THIS; - int32 parm1 = (int32)SvIV(ST(1)); - int32 parm2 = 0; - int32 parm3 = 0; - int32 parm4 = 0; - int32 parm5 = 0; - Client* client = nullptr; + Mob *THIS; + int32 parm1 = (int32) SvIV(ST(1)); + int32 parm2 = 0; + int32 parm3 = 0; + int32 parm4 = 0; + int32 parm5 = 0; + Client *client = nullptr; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - if (items > 2) { parm2 = (int32)SvIV(ST(2)); } - if (items > 3) { parm3 = (int32)SvIV(ST(3)); } - if (items > 4) { parm4 = (int32)SvIV(ST(4)); } - if (items > 5) { parm5 = (int32)SvIV(ST(5)); } - if (items > 6) { + if (items > 2) { parm2 = (int32) SvIV(ST(2)); } + if (items > 3) { parm3 = (int32) SvIV(ST(3)); } + if (items > 4) { parm4 = (int32) SvIV(ST(4)); } + if (items > 5) { parm5 = (int32) SvIV(ST(5)); } + if (items > 6) { if (sv_derived_from(ST(6), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(6))); - client = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(6))); + client = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "client is not of type Client"); - if(client == nullptr) + if (client == nullptr) Perl_croak(aTHX_ "client is nullptr, avoiding crash."); } @@ -7041,22 +6649,20 @@ XS(XS_Mob_SendAppearanceEffect) } XS(XS_Mob_SetFlyMode); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetFlyMode) -{ +XS(XS_Mob_SetFlyMode) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::SetFlyMode(THIS, uint8 flymode[0|1|2|3])"); { - Mob * THIS; - uint8 flymode = (uint8)SvIV(ST(1)); + Mob *THIS; + uint8 flymode = (uint8) SvIV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetFlyMode(flymode); @@ -7065,22 +6671,20 @@ XS(XS_Mob_SetFlyMode) } XS(XS_Mob_SetTexture); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetTexture) -{ +XS(XS_Mob_SetTexture) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::SetTexture(THIS, int32 texture)"); { - Mob * THIS; - int32 texture = (int32)SvIV(ST(1)); + Mob *THIS; + int32 texture = (int32) SvIV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SendIllusionPacket(THIS->GetRace(), 0xFF, texture); @@ -7089,22 +6693,20 @@ XS(XS_Mob_SetTexture) } XS(XS_Mob_SetRace); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetRace) -{ +XS(XS_Mob_SetRace) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::SetRace(THIS, int32 race)"); { - Mob * THIS; - int32 race = (int32)SvIV(ST(1)); + Mob *THIS; + int32 race = (int32) SvIV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SendIllusionPacket(race); @@ -7113,163 +6715,156 @@ XS(XS_Mob_SetRace) } XS(XS_Mob_SetGender); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetGender) -{ +XS(XS_Mob_SetGender) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::SetGender(THIS, int32 gender)"); { - Mob * THIS; - int32 gender = (int32)SvIV(ST(1)); + Mob *THIS; + int32 gender = (int32) SvIV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - THIS->SendIllusionPacket(THIS->GetRace(),gender); + THIS->SendIllusionPacket(THIS->GetRace(), gender); } XSRETURN_EMPTY; } XS(XS_Mob_SendIllusion); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SendIllusion) -{ +XS(XS_Mob_SendIllusion) { dXSARGS; if (items < 2 || items > 14) - Perl_croak(aTHX_ "Usage: Mob::SendIllusion(THIS, uint16 race, [uint8 gender = 0xFF], [uint8 texture = 0xFF], [unit8 helmtexture = 0xFF], [unit8 face = 0xFF], [unit8 hairstyle = 0xFF], [uint8 hair_color = 0xFF], [uint8 beard = 0xFF], [uint8 beard_color = 0xFF], [uint32 drakkin_heritage = 0xFFFFFFFF], [uint32 drakkin_tattoo = 0xFFFFFFFF], [uint32 drakkin_details = 0xFFFFFFFF], [float size = -1])"); + Perl_croak(aTHX_ + "Usage: Mob::SendIllusion(THIS, uint16 race, [uint8 gender = 0xFF], [uint8 texture = 0xFF], [unit8 helmtexture = 0xFF], [unit8 face = 0xFF], [unit8 hairstyle = 0xFF], [uint8 hair_color = 0xFF], [uint8 beard = 0xFF], [uint8 beard_color = 0xFF], [uint32 drakkin_heritage = 0xFFFFFFFF], [uint32 drakkin_tattoo = 0xFFFFFFFF], [uint32 drakkin_details = 0xFFFFFFFF], [float size = -1])"); { - Mob * THIS; - uint16 race = (uint16)SvIV(ST(1)); - uint8 gender = 0xFF; - uint8 texture = 0xFF; - uint8 helmtexture = 0xFF; - uint8 face = 0xFF; - uint8 hairstyle = 0xFF; - uint8 haircolor = 0xFF; - uint8 beard = 0xFF; - uint8 beardcolor = 0xFF; - uint32 drakkin_heritage = 0xFFFFFFFF; - uint32 drakkin_tattoo = 0xFFFFFFFF; - uint32 drakkin_details = 0xFFFFFFFF; - float size = -1.0f; + Mob *THIS; + uint16 race = (uint16) SvIV(ST(1)); + uint8 gender = 0xFF; + uint8 texture = 0xFF; + uint8 helmtexture = 0xFF; + uint8 face = 0xFF; + uint8 hairstyle = 0xFF; + uint8 haircolor = 0xFF; + uint8 beard = 0xFF; + uint8 beardcolor = 0xFF; + uint32 drakkin_heritage = 0xFFFFFFFF; + uint32 drakkin_tattoo = 0xFFFFFFFF; + uint32 drakkin_details = 0xFFFFFFFF; + float size = -1.0f; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - if(items > 2) {gender = (uint8)SvIV(ST(2));} - if(items > 3) {texture = (uint8)SvIV(ST(3));} - if(items > 4) {helmtexture = (uint8)SvIV(ST(4));} - if(items > 5) {face = (uint8)SvIV(ST(5));} - if(items > 6) {hairstyle = (uint8)SvIV(ST(6));} - if(items > 7) {haircolor = (uint8)SvIV(ST(7));} - if(items > 8) {beard = (uint8)SvIV(ST(8));} - if(items > 9) {beardcolor = (uint8)SvIV(ST(9));} - if(items > 10) {drakkin_heritage = (uint32)SvIV(ST(10));} - if(items > 11) {drakkin_tattoo = (uint32)SvIV(ST(11));} - if(items > 12) {drakkin_details = (uint32)SvIV(ST(12));} - if(items > 13) {size = (float)SvNV(ST(13));} + if (items > 2) { gender = (uint8) SvIV(ST(2)); } + if (items > 3) { texture = (uint8) SvIV(ST(3)); } + if (items > 4) { helmtexture = (uint8) SvIV(ST(4)); } + if (items > 5) { face = (uint8) SvIV(ST(5)); } + if (items > 6) { hairstyle = (uint8) SvIV(ST(6)); } + if (items > 7) { haircolor = (uint8) SvIV(ST(7)); } + if (items > 8) { beard = (uint8) SvIV(ST(8)); } + if (items > 9) { beardcolor = (uint8) SvIV(ST(9)); } + if (items > 10) { drakkin_heritage = (uint32) SvIV(ST(10)); } + if (items > 11) { drakkin_tattoo = (uint32) SvIV(ST(11)); } + if (items > 12) { drakkin_details = (uint32) SvIV(ST(12)); } + if (items > 13) { size = (float) SvNV(ST(13)); } - THIS->SendIllusionPacket(race,gender,texture,helmtexture,haircolor,beardcolor,0xFF,0xFF, - hairstyle,face,beard,0xFF,drakkin_heritage,drakkin_tattoo,drakkin_details,size); + THIS->SendIllusionPacket(race, gender, texture, helmtexture, haircolor, beardcolor, 0xFF, 0xFF, + hairstyle, face, beard, 0xFF, drakkin_heritage, drakkin_tattoo, drakkin_details, size); } XSRETURN_EMPTY; } XS(XS_Mob_CameraEffect); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_CameraEffect) -{ +XS(XS_Mob_CameraEffect) { dXSARGS; if (items < 2 || items > 5) - Perl_croak(aTHX_ "Usage: Mob::CameraEffect(THIS, uint32 duration, [uint32 intensity = 0], [Client* single_client = nullptr], [bool is_world_wide = false])"); + Perl_croak(aTHX_ + "Usage: Mob::CameraEffect(THIS, uint32 duration, [uint32 intensity = 0], [Client* single_client = nullptr], [bool is_world_wide = false])"); { - Mob * THIS; - uint32 duration = (uint32)SvUV(ST(1)); - uint32 intensity = 0; - Client* client = nullptr; - bool global = false; - bool nullcli = false; + Mob *THIS; + uint32 duration = (uint32) SvUV(ST(1)); + uint32 intensity = 0; + Client *client = nullptr; + bool global = false; + bool nullcli = false; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - if (items > 2) { intensity = (uint32)SvUV(ST(2)); } - if (items > 3) { + if (items > 2) { intensity = (uint32) SvUV(ST(2)); } + if (items > 3) { if (sv_derived_from(ST(3), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(3))); - client = INT2PTR(Client *,tmp); - } - else - nullcli = true; - if(client == nullptr) - nullcli = true; - //Perl_croak(aTHX_ "client is nullptr, avoiding crash."); + IV tmp = SvIV((SV *) SvRV(ST(3))); + client = INT2PTR(Client *, tmp); + } else + nullcli = true; + if (client == nullptr) + nullcli = true; + //Perl_croak(aTHX_ "client is nullptr, avoiding crash."); } - if (items > 4) { global = (bool)SvTRUE(ST(4)); } + if (items > 4) { global = (bool) SvTRUE(ST(4)); } - if(nullcli) - THIS->CameraEffect(duration, intensity, 0, global); + if (nullcli) + THIS->CameraEffect(duration, intensity, 0, global); else - THIS->CameraEffect(duration, intensity, client, global); + THIS->CameraEffect(duration, intensity, client, global); } XSRETURN_EMPTY; } XS(XS_Mob_SpellEffect); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SpellEffect) -{ +XS(XS_Mob_SpellEffect) { dXSARGS; if (items < 2 || items > 8) - Perl_croak(aTHX_ "Usage: Mob::SpellEffect(THIS, uint32 effect, [uint32 duration = 5000], [uint32 finish_delay = 0], [bool zone_wide = false], [uint32 unk20 = 3000], [bool perm_effect = false], [Client* single_client])"); + Perl_croak(aTHX_ + "Usage: Mob::SpellEffect(THIS, uint32 effect, [uint32 duration = 5000], [uint32 finish_delay = 0], [bool zone_wide = false], [uint32 unk20 = 3000], [bool perm_effect = false], [Client* single_client])"); { - Mob * THIS; - uint32 effect = (uint32)SvUV(ST(1)); - uint32 duration = 5000; - uint32 finish_delay = 0; - bool zone_wide = true; - uint32 unk20 = 3000; - bool perm_effect = false; - Client* client = nullptr; + Mob *THIS; + uint32 effect = (uint32) SvUV(ST(1)); + uint32 duration = 5000; + uint32 finish_delay = 0; + bool zone_wide = true; + uint32 unk20 = 3000; + bool perm_effect = false; + Client *client = nullptr; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - if (items > 2) { duration = (uint32)SvUV(ST(2)); } - if (items > 3) { finish_delay = (uint32)SvUV(ST(3)); } - if (items > 4) { zone_wide = (bool)SvTRUE(ST(4)); } - if (items > 5) { unk20 = (uint32)SvUV(ST(5)); } - if (items > 6) { perm_effect = (bool)SvTRUE(ST(6)); } - if (items > 7) { + if (items > 2) { duration = (uint32) SvUV(ST(2)); } + if (items > 3) { finish_delay = (uint32) SvUV(ST(3)); } + if (items > 4) { zone_wide = (bool) SvTRUE(ST(4)); } + if (items > 5) { unk20 = (uint32) SvUV(ST(5)); } + if (items > 6) { perm_effect = (bool) SvTRUE(ST(6)); } + if (items > 7) { if (sv_derived_from(ST(7), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(7))); - client = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(7))); + client = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "client is not of type Client"); - if(client == nullptr) + if (client == nullptr) Perl_croak(aTHX_ "client is nullptr, avoiding crash."); } @@ -7281,25 +6876,23 @@ XS(XS_Mob_SpellEffect) XS(XS_Mob_TempName); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_TempName) -{ +XS(XS_Mob_TempName) { dXSARGS; if (items < 1 || items > 2) Perl_croak(aTHX_ "Usage: Mob::TempName(THIS, string name)"); { - Mob * THIS; - char * name = nullptr; + Mob *THIS; + char *name = nullptr; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - if (items > 1) { name = (char *)SvPV_nolen(ST(1)); } + if (items > 1) { name = (char *) SvPV_nolen(ST(1)); } THIS->TempName(name); } @@ -7307,51 +6900,48 @@ XS(XS_Mob_TempName) } XS(XS_Mob_GetItemStat); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetItemStat) -{ +XS(XS_Mob_GetItemStat) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Mob::GetItemStat(THIS, uint32 item_id, string stat)"); { - Mob * THIS; - int32 RETVAL; - uint32 itemid = (uint32)SvUV(ST(1)); - Const_char * stat = (Const_char *)SvPV_nolen(ST(2)); + Mob *THIS; + int32 RETVAL; + uint32 itemid = (uint32) SvUV(ST(1)); + Const_char *stat = (Const_char *) SvPV_nolen(ST(2)); dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetItemStat(itemid, stat); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetGlobal); -XS(XS_Mob_GetGlobal) -{ +XS(XS_Mob_GetGlobal) { dXSARGS; if (items < 2) Perl_croak(aTHX_ "Usage: GetGlobal(THIS, string var_name)"); { - Mob* THIS; - Const_char* varname = (Const_char*)SvPV_nolen(ST(1)); + Mob *THIS; + Const_char *varname = (Const_char *) SvPV_nolen(ST(1)); std::string ret_val = "Undefined"; - Const_char* RETVAL; + Const_char *RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob *, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); @@ -7360,42 +6950,42 @@ XS(XS_Mob_GetGlobal) ret_val = THIS->GetGlobal(varname); RETVAL = ret_val.c_str(); - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; + sv_setpv(TARG, RETVAL); + XSprePUSH; + PUSHTARG; } XSRETURN(1); } XS(XS_Mob_SetGlobal); -XS(XS_Mob_SetGlobal) -{ +XS(XS_Mob_SetGlobal) { dXSARGS; if (items < 5 || items > 6) - Perl_croak(aTHX_ "Usage: SetGlobal(THIS, string var_name, string new_value, int options, string duration, [Mob* other = nullptr])"); + Perl_croak(aTHX_ + "Usage: SetGlobal(THIS, string var_name, string new_value, int options, string duration, [Mob* other = nullptr])"); { - Mob * THIS; - char * varname = (char *)SvPV_nolen(ST(1)); - char * newvalue = (char *)SvPV_nolen(ST(2)); - int options = (int)SvIV(ST(3)); - char * duration = (char *)SvPV_nolen(ST(4)); - Mob * other = nullptr; + Mob *THIS; + char *varname = (char *) SvPV_nolen(ST(1)); + char *newvalue = (char *) SvPV_nolen(ST(2)); + int options = (int) SvIV(ST(3)); + char *duration = (char *) SvPV_nolen(ST(4)); + Mob *other = nullptr; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items > 5) { if (sv_derived_from(ST(5), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(5))); - other = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(5))); + other = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(other == nullptr) + if (other == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); } @@ -7405,27 +6995,26 @@ XS(XS_Mob_SetGlobal) } XS(XS_Mob_TarGlobal); -XS(XS_Mob_TarGlobal) -{ +XS(XS_Mob_TarGlobal) { dXSARGS; if (items != 7) - Perl_croak(aTHX_ "Usage: TarGlobal(THIS, string var_name, string value, string duration, int npc_id, int character_id, int zone_id)"); + Perl_croak(aTHX_ + "Usage: TarGlobal(THIS, string var_name, string value, string duration, int npc_id, int character_id, int zone_id)"); { - Mob * THIS; - char * varname = (char *)SvPV_nolen(ST(1)); - char * value = (char *)SvPV_nolen(ST(2)); - char * duration = (char *)SvPV_nolen(ST(3)); - int npcid = (int)SvIV(ST(4)); - int charid = (int)SvIV(ST(5)); - int zoneid = (int)SvIV(ST(6)); + Mob *THIS; + char *varname = (char *) SvPV_nolen(ST(1)); + char *value = (char *) SvPV_nolen(ST(2)); + char *duration = (char *) SvPV_nolen(ST(3)); + int npcid = (int) SvIV(ST(4)); + int charid = (int) SvIV(ST(5)); + int zoneid = (int) SvIV(ST(6)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->TarGlobal(varname, value, duration, npcid, charid, zoneid); @@ -7434,22 +7023,20 @@ XS(XS_Mob_TarGlobal) } XS(XS_Mob_DelGlobal); -XS(XS_Mob_DelGlobal) -{ +XS(XS_Mob_DelGlobal) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: DelGlobal(THIS, string var_name)"); { - Mob * THIS; - char * varname = (char *)SvPV_nolen(ST(1)); + Mob *THIS; + char *varname = (char *) SvPV_nolen(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->DelGlobal(varname); @@ -7458,25 +7045,24 @@ XS(XS_Mob_DelGlobal) } XS(XS_Mob_SetSlotTint); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetSlotTint) -{ +XS(XS_Mob_SetSlotTint) { dXSARGS; if (items != 5) - Perl_croak(aTHX_ "Usage: Mob::SetSlotTint(THIS, uint8 material_slot, uint8 red_tint, uint8 green_tint, uint8 blue_tint)"); + Perl_croak(aTHX_ + "Usage: Mob::SetSlotTint(THIS, uint8 material_slot, uint8 red_tint, uint8 green_tint, uint8 blue_tint)"); { - Mob * THIS; - uint8 material_slot = (uint8)SvIV(ST(1)); - uint8 red_tint = (uint8)SvIV(ST(2)); - uint8 green_tint = (uint8)SvIV(ST(3)); - uint8 blue_tint = (uint8)SvIV(ST(4)); + Mob *THIS; + uint8 material_slot = (uint8) SvIV(ST(1)); + uint8 red_tint = (uint8) SvIV(ST(2)); + uint8 green_tint = (uint8) SvIV(ST(3)); + uint8 blue_tint = (uint8) SvIV(ST(4)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetSlotTint(material_slot, red_tint, green_tint, blue_tint); @@ -7485,32 +7071,31 @@ XS(XS_Mob_SetSlotTint) } XS(XS_Mob_WearChange); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_WearChange) -{ +XS(XS_Mob_WearChange) { dXSARGS; if (items < 3 || items > 4) - Perl_croak(aTHX_ "Usage: Mob::WearChange(THIS, uint8 material_slot, uint16 texture, [uint32 color = 0, uint32 hero_forge_model = 0])"); + Perl_croak(aTHX_ + "Usage: Mob::WearChange(THIS, uint8 material_slot, uint16 texture, [uint32 color = 0, uint32 hero_forge_model = 0])"); { - Mob * THIS; - uint8 material_slot = (uint8)SvIV(ST(1)); - uint16 texture = (uint16)SvUV(ST(2)); - uint32 color = 0; - uint32 hero_forge_model = 0; + Mob *THIS; + uint8 material_slot = (uint8) SvIV(ST(1)); + uint16 texture = (uint16) SvUV(ST(2)); + uint32 color = 0; + uint32 hero_forge_model = 0; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items > 3) { - color = (uint32)SvUV(ST(3)); + color = (uint32) SvUV(ST(3)); } if (items > 4) { - hero_forge_model = (uint32)SvUV(ST(3)); + hero_forge_model = (uint32) SvUV(ST(3)); } THIS->WearChange(material_slot, texture, color, hero_forge_model); @@ -7519,33 +7104,30 @@ XS(XS_Mob_WearChange) } XS(XS_Mob_DoKnockback); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_DoKnockback) -{ +XS(XS_Mob_DoKnockback) { dXSARGS; if (items != 4) Perl_croak(aTHX_ "Usage: Mob::DoKnockback(THIS, Mob* caster, uint32 push_back_amount, uint32 push_up_amount)"); { - Mob * THIS; - Mob * caster; - uint32 pushback = (uint16)SvUV(ST(2)); - uint32 pushup = (uint16)SvUV(ST(2)); + Mob *THIS; + Mob *caster; + uint32 pushback = (uint16) SvUV(ST(2)); + uint32 pushup = (uint16) SvUV(ST(2)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - caster = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + caster = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "caster is not of type Mob"); - if(caster == nullptr) + if (caster == nullptr) Perl_croak(aTHX_ "caster is nullptr, avoiding crash."); THIS->DoKnockback(caster, pushback, pushup); @@ -7554,22 +7136,20 @@ XS(XS_Mob_DoKnockback) } XS(XS_Mob_RemoveNimbusEffect); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_RemoveNimbusEffect) -{ +XS(XS_Mob_RemoveNimbusEffect) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::RemoveNimbusEffect(THIS, int32 effect_id)"); { - Mob * THIS; - int32 effectid = (int32)SvIV(ST(1)); + Mob *THIS; + int32 effectid = (int32) SvIV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->RemoveNimbusEffect(effectid); @@ -7578,22 +7158,20 @@ XS(XS_Mob_RemoveNimbusEffect) } XS(XS_Mob_SetRunning); -XS(XS_Mob_SetRunning) -{ +XS(XS_Mob_SetRunning) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::SetRunning(THIS, bool value)"); { - Mob * THIS; - bool value = (bool)SvTRUE(ST(1)); + Mob *THIS; + bool value = (bool) SvTRUE(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetRunning(value); @@ -7602,23 +7180,21 @@ XS(XS_Mob_SetRunning) } XS(XS_Mob_IsRunning); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_IsRunning) -{ +XS(XS_Mob_IsRunning) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob:::IsRunning(THIS)"); { - Mob * THIS; + Mob *THIS; bool RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsRunning(); @@ -7629,51 +7205,47 @@ XS(XS_Mob_IsRunning) } XS(XS_Mob_SetBodyType); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetBodyType) -{ +XS(XS_Mob_SetBodyType) { dXSARGS; if (items < 2 || items > 3) Perl_croak(aTHX_ "Usage: Mob::SetBodyType(THIS, int32 type, [bool overwrite_orig = false])"); { - Mob * THIS; - int32 type = (int32)SvIV(ST(1)); - bool overwrite_orig = false; + Mob *THIS; + int32 type = (int32) SvIV(ST(1)); + bool overwrite_orig = false; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - if(items == 3) { - overwrite_orig = (bool)SvTRUE(ST(2)); + if (items == 3) { + overwrite_orig = (bool) SvTRUE(ST(2)); } - THIS->SetBodyType((bodyType)type, overwrite_orig); + THIS->SetBodyType((bodyType) type, overwrite_orig); } XSRETURN_EMPTY; } XS(XS_Mob_SetDeltas); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetDeltas) -{ +XS(XS_Mob_SetDeltas) { dXSARGS; if (items != 5) Perl_croak(aTHX_ "Usage: Mob::SetDeltas(THIS, float delta_x, float delta_y, float delta_z, float delta_h)"); { - Mob * THIS; - auto delta = glm::vec4((float)SvNV(ST(1)), (float)SvNV(ST(2)), (float)SvNV(ST(3)), (float)SvNV(ST(4))); + Mob *THIS; + auto delta = glm::vec4((float) SvNV(ST(1)), (float) SvNV(ST(2)), (float) SvNV(ST(3)), (float) SvNV(ST(4))); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetDelta(delta); @@ -7682,22 +7254,20 @@ XS(XS_Mob_SetDeltas) } XS(XS_Mob_SetLD); -XS(XS_Mob_SetLD) -{ +XS(XS_Mob_SetLD) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::SetLD(THIS, bool value)"); { - Mob * THIS; - bool value = (bool)SvTRUE(ST(1)); + Mob *THIS; + bool value = (bool) SvTRUE(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SendAppearancePacket(AT_Linkdead, value); @@ -7706,22 +7276,20 @@ XS(XS_Mob_SetLD) } XS(XS_Mob_SetTargetDestSteps); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetTargetDestSteps) -{ +XS(XS_Mob_SetTargetDestSteps) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::SetTargetDestSteps(THIS, uint8 target_steps)"); { - Mob * THIS; - uint8 target_steps = (uint8)SvIV(ST(1)); + Mob *THIS; + uint8 target_steps = (uint8) SvIV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetTargetDestSteps(target_steps); @@ -7730,22 +7298,20 @@ XS(XS_Mob_SetTargetDestSteps) } XS(XS_Mob_SetTargetable); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetTargetable) -{ +XS(XS_Mob_SetTargetable) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::SetTargetable(THIS, bool targetable)"); { - Mob * THIS; - bool on = (bool)SvTRUE(ST(1)); + Mob *THIS; + bool on = (bool) SvTRUE(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetTargetable(on); @@ -7754,101 +7320,95 @@ XS(XS_Mob_SetTargetable) } XS(XS_Mob_ModSkillDmgTaken); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_ModSkillDmgTaken) -{ +XS(XS_Mob_ModSkillDmgTaken) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Mob::ModSkillDmgTaken(THIS, int skill, int16 value)"); { - Mob * THIS; - EQEmu::skills::SkillType skill_num = (EQEmu::skills::SkillType)SvUV(ST(1)); - int16 value = (int16)SvIV(ST(2)); + Mob *THIS; + EQEmu::skills::SkillType skill_num = (EQEmu::skills::SkillType) SvUV(ST(1)); + int16 value = (int16) SvIV(ST(2)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - THIS->ModSkillDmgTaken(skill_num,value); + THIS->ModSkillDmgTaken(skill_num, value); } XSRETURN_EMPTY; } XS(XS_Mob_GetModSkillDmgTaken); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetModSkillDmgTaken) -{ +XS(XS_Mob_GetModSkillDmgTaken) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::GetModSkillDmgTaken(THIS, int skill_id)"); { - Mob * THIS; - int16 RETVAL; + Mob *THIS; + int16 RETVAL; dXSTARG; - EQEmu::skills::SkillType skill_num = (EQEmu::skills::SkillType)SvUV(ST(1)); + EQEmu::skills::SkillType skill_num = (EQEmu::skills::SkillType) SvUV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetModSkillDmgTaken(skill_num); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetSkillDmgTaken); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetSkillDmgTaken) -{ +XS(XS_Mob_GetSkillDmgTaken) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::GetSkillDmgTaken(THIS, int skill_id)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; - EQEmu::skills::SkillType skill_num = (EQEmu::skills::SkillType)SvUV(ST(1)); + EQEmu::skills::SkillType skill_num = (EQEmu::skills::SkillType) SvUV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSkillDmgTaken(skill_num); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_SetAllowBeneficial); -XS(XS_Mob_SetAllowBeneficial) -{ +XS(XS_Mob_SetAllowBeneficial) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::SetAllowBeneficial(THIS, bool value)"); { - Mob * THIS; - bool value = (bool)SvTRUE(ST(1)); + Mob *THIS; + bool value = (bool) SvTRUE(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetAllowBeneficial(value); @@ -7857,22 +7417,20 @@ XS(XS_Mob_SetAllowBeneficial) } XS(XS_Mob_GetAllowBeneficial); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetAllowBeneficial) -{ +XS(XS_Mob_GetAllowBeneficial) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetAllowBeneficial(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetAllowBeneficial(); @@ -7883,34 +7441,31 @@ XS(XS_Mob_GetAllowBeneficial) } XS(XS_Mob_IsBeneficialAllowed); -XS(XS_Mob_IsBeneficialAllowed) -{ +XS(XS_Mob_IsBeneficialAllowed) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::IsBeneficialAllowed(THIS, Mob* target)"); + Perl_croak(aTHX_ "Usage: Mob::IsBeneficialAllowed(THIS, Mob* target)"); { dXSTARG; - Mob * THIS; - Mob * target; + Mob *THIS; + Mob *target; bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - target = INT2PTR(Mob *,tmp); - } - else - Perl_croak(aTHX_ "target is not of type Mob"); - if(target == nullptr) - Perl_croak(aTHX_ "target is nullptr, avoiding crash."); + IV tmp = SvIV((SV *) SvRV(ST(1))); + target = INT2PTR(Mob *, tmp); + } else + Perl_croak(aTHX_ "target is not of type Mob"); + if (target == nullptr) + Perl_croak(aTHX_ "target is nullptr, avoiding crash."); RETVAL = THIS->IsBeneficialAllowed(target); ST(0) = boolSV(RETVAL); @@ -7920,23 +7475,21 @@ XS(XS_Mob_IsBeneficialAllowed) } XS(XS_Mob_ModVulnerability); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_ModVulnerability) -{ +XS(XS_Mob_ModVulnerability) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Mob::ModVulnerability(THIS, uint8 resist, int16 value)"); { - Mob * THIS; - uint8 resist = (uint8)SvIV(ST(1)); - int16 value = (int16)SvIV(ST(2)); + Mob *THIS; + uint8 resist = (uint8) SvIV(ST(1)); + int16 value = (int16) SvIV(ST(2)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->ModVulnerability(resist, value); @@ -7945,63 +7498,60 @@ XS(XS_Mob_ModVulnerability) } XS(XS_Mob_GetModVulnerability); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetModVulnerability) -{ +XS(XS_Mob_GetModVulnerability) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::GetModVulnerability(THIS, uint8 resist)"); { - Mob * THIS; - int32 RETVAL; + Mob *THIS; + int32 RETVAL; dXSTARG; - uint8 resist = (uint8)SvUV(ST(1)); + uint8 resist = (uint8) SvUV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetModVulnerability(resist); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_DoMeleeSkillAttackDmg); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_DoMeleeSkillAttackDmg) -{ +XS(XS_Mob_DoMeleeSkillAttackDmg) { dXSARGS; if (items != 7) - Perl_croak(aTHX_ "Usage: Mob::DoMeleeSkillAttackDmg(THIS, Mob* target, uint16 weapon_damage, int skill, int16 chance_mod, int16 focus, uint8 can_riposte)"); + Perl_croak(aTHX_ + "Usage: Mob::DoMeleeSkillAttackDmg(THIS, Mob* target, uint16 weapon_damage, int skill, int16 chance_mod, int16 focus, uint8 can_riposte)"); { - Mob * THIS; - Mob* target; - uint16 weapon_damage = (uint16)SvIV(ST(2)); - EQEmu::skills::SkillType skill = (EQEmu::skills::SkillType)SvUV(ST(3)); - int16 chance_mod = (int16)SvIV(ST(4)); - int16 focus = (int16)SvIV(ST(5)); - uint8 CanRiposte = (uint8)SvIV(ST(6)); + Mob *THIS; + Mob *target; + uint16 weapon_damage = (uint16) SvIV(ST(2)); + EQEmu::skills::SkillType skill = (EQEmu::skills::SkillType) SvUV(ST(3)); + int16 chance_mod = (int16) SvIV(ST(4)); + int16 focus = (int16) SvIV(ST(5)); + uint8 CanRiposte = (uint8) SvIV(ST(6)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - target = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + target = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "target is not of type Mob"); - if(target == nullptr) + if (target == nullptr) Perl_croak(aTHX_ "target is nullptr, avoiding crash."); THIS->DoMeleeSkillAttackDmg(target, weapon_damage, skill, chance_mod, focus, CanRiposte); @@ -8010,36 +7560,34 @@ XS(XS_Mob_DoMeleeSkillAttackDmg) } XS(XS_Mob_DoArcheryAttackDmg); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_DoArcheryAttackDmg) -{ +XS(XS_Mob_DoArcheryAttackDmg) { dXSARGS; if (items != 7) - Perl_croak(aTHX_ "Usage: Mob::DoArcheryAttackDmg(THIS, Mob* target, [range_weapon_item_instance = nullptr], [ammo_item_instance = nullptr], uint16 weapon_damage, int16 chance_mod, int16 focus)"); + Perl_croak(aTHX_ + "Usage: Mob::DoArcheryAttackDmg(THIS, Mob* target, [range_weapon_item_instance = nullptr], [ammo_item_instance = nullptr], uint16 weapon_damage, int16 chance_mod, int16 focus)"); { - Mob * THIS; - Mob* target; - EQEmu::ItemInstance* RangeWeapon = nullptr; - EQEmu::ItemInstance* Ammo = nullptr; - uint16 weapon_damage = (uint16)SvIV(ST(4)); - int16 chance_mod = (int16)SvIV(ST(5)); - int16 focus = (int16)SvIV(ST(6)); + Mob *THIS; + Mob *target; + EQEmu::ItemInstance *RangeWeapon = nullptr; + EQEmu::ItemInstance *Ammo = nullptr; + uint16 weapon_damage = (uint16) SvIV(ST(4)); + int16 chance_mod = (int16) SvIV(ST(5)); + int16 focus = (int16) SvIV(ST(6)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - target = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + target = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "target is not of type Mob"); - if(target == nullptr) + if (target == nullptr) Perl_croak(aTHX_ "target is nullptr, avoiding crash."); THIS->DoArcheryAttackDmg(target, RangeWeapon, Ammo, weapon_damage, chance_mod, focus); @@ -8048,36 +7596,34 @@ XS(XS_Mob_DoArcheryAttackDmg) } XS(XS_Mob_DoThrowingAttackDmg); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_DoThrowingAttackDmg) -{ +XS(XS_Mob_DoThrowingAttackDmg) { dXSARGS; if (items != 7) - Perl_croak(aTHX_ "Usage: Mob::DoThrowingAttackDmg(THIS, Mob* target, [range_weapon_item_instance = nullptr], [ammo_item_instance = nullptr], uint16 weapon_damage, int16 chance_mod, int16 focus)"); + Perl_croak(aTHX_ + "Usage: Mob::DoThrowingAttackDmg(THIS, Mob* target, [range_weapon_item_instance = nullptr], [ammo_item_instance = nullptr], uint16 weapon_damage, int16 chance_mod, int16 focus)"); { - Mob * THIS; - Mob* target; - EQEmu::ItemInstance* RangeWeapon = nullptr; - EQEmu::ItemData* item = nullptr; - uint16 weapon_damage = (uint16)SvIV(ST(4)); - int16 chance_mod = (int16)SvIV(ST(5)); - int16 focus = (int16)SvIV(ST(6)); + Mob *THIS; + Mob *target; + EQEmu::ItemInstance *RangeWeapon = nullptr; + EQEmu::ItemData *item = nullptr; + uint16 weapon_damage = (uint16) SvIV(ST(4)); + int16 chance_mod = (int16) SvIV(ST(5)); + int16 focus = (int16) SvIV(ST(6)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - target = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + target = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "target is not of type Mob"); - if(target == nullptr) + if (target == nullptr) Perl_croak(aTHX_ "target is nullptr, avoiding crash."); THIS->DoThrowingAttackDmg(target, RangeWeapon, item, weapon_damage, chance_mod, focus); @@ -8086,22 +7632,20 @@ XS(XS_Mob_DoThrowingAttackDmg) } XS(XS_Mob_SetDisableMelee); -XS(XS_Mob_SetDisableMelee) -{ +XS(XS_Mob_SetDisableMelee) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::SetDisableMelee(THIS, bool value)"); { - Mob * THIS; - bool value = (bool)SvTRUE(ST(1)); + Mob *THIS; + bool value = (bool) SvTRUE(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetDisableMelee(value); @@ -8110,22 +7654,20 @@ XS(XS_Mob_SetDisableMelee) } XS(XS_Mob_IsMeleeDisabled); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_IsMeleeDisabled) -{ +XS(XS_Mob_IsMeleeDisabled) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsMeleeDisabled(THIS)"); { - Mob * THIS; - bool RETVAL; + Mob *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsMeleeDisabled(); @@ -8136,22 +7678,20 @@ XS(XS_Mob_IsMeleeDisabled) } XS(XS_Mob_SetFlurryChance); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetFlurryChance) -{ +XS(XS_Mob_SetFlurryChance) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::SetFlurryChance(THIS, uint8 value)"); { - Mob * THIS; - uint8 value = (uint8)SvIV(ST(1)); + Mob *THIS; + uint8 value = (uint8) SvIV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetFlurryChance(value); @@ -8160,136 +7700,130 @@ XS(XS_Mob_SetFlurryChance) } XS(XS_Mob_GetFlurryChance); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetFlurryChance) -{ +XS(XS_Mob_GetFlurryChance) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetFlurryChance(THIS)"); { - Mob * THIS; - uint8 RETVAL; + Mob *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetFlurryChance(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetSpellStat); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetSpellStat) -{ +XS(XS_Mob_GetSpellStat) { dXSARGS; if (items < 3 || items > 4) Perl_croak(aTHX_ "Usage: Mob::GetSpellStat(THIS, uint32 spell_id, string stat, uint8 slot)"); { - Mob * THIS; - int32 RETVAL; - uint32 spellid = (uint32)SvUV(ST(1)); - Const_char * stat = (Const_char *)SvPV_nolen(ST(2)); - uint8 slot = (uint8)SvUV(ST(3)); + Mob *THIS; + int32 RETVAL; + uint32 spellid = (uint32) SvUV(ST(1)); + Const_char *stat = (Const_char *) SvPV_nolen(ST(2)); + uint8 slot = (uint8) SvUV(ST(3)); dXSTARG; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - if (items > 4) { slot = 0; } + if (items > 4) { slot = 0; } RETVAL = THIS->GetSpellStat(spellid, stat, slot); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetSpecialAbility); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetSpecialAbility) -{ +XS(XS_Mob_GetSpecialAbility) { dXSARGS; - if(items != 2) + if (items != 2) Perl_croak(aTHX_ "Usage: Mob::GetSpecialAbility(THIS, int special_ability)"); { int RETVAL; - Mob* THIS; + Mob *THIS; int ability = SvIV(ST(1)); dXSTARG; - if(sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + if (sv_derived_from(ST(0), "Mob")) { + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob *, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSpecialAbility(ability); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_GetSpecialAbilityParam); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_GetSpecialAbilityParam) -{ +XS(XS_Mob_GetSpecialAbilityParam) { dXSARGS; - if(items != 3) + if (items != 3) Perl_croak(aTHX_ "Usage: Mob::GetSpecialAbilityParam(THIS, int special_ability, int param)"); { int RETVAL; - Mob* THIS; + Mob *THIS; int ability = SvIV(ST(1)); - int param = SvIV(ST(2)); + int param = SvIV(ST(2)); dXSTARG; - if(sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + if (sv_derived_from(ST(0), "Mob")) { + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob *, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSpecialAbilityParam(ability, param); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_Mob_SetSpecialAbility); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetSpecialAbility) -{ +XS(XS_Mob_SetSpecialAbility) { dXSARGS; - if(items != 3) + if (items != 3) Perl_croak(aTHX_ "Usage: Mob::SetSpecialAbility(THIS, int ability, int value)"); { - Mob* THIS; + Mob *THIS; int ability = SvIV(ST(1)); - int value = SvIV(ST(2)); + int value = SvIV(ST(2)); - if(sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + if (sv_derived_from(ST(0), "Mob")) { + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob *, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetSpecialAbility(ability, value); @@ -8298,24 +7832,22 @@ XS(XS_Mob_SetSpecialAbility) } XS(XS_Mob_SetSpecialAbilityParam); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetSpecialAbilityParam) -{ +XS(XS_Mob_SetSpecialAbilityParam) { dXSARGS; - if(items != 4) + if (items != 4) Perl_croak(aTHX_ "Usage: Mob::SetSpecialAbilityParam(THIS, int ability, int param, int value)"); { - Mob* THIS; + Mob *THIS; int ability = SvIV(ST(1)); - int param = SvIV(ST(2)); - int value = SvIV(ST(3)); + int param = SvIV(ST(2)); + int value = SvIV(ST(3)); - if(sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + if (sv_derived_from(ST(0), "Mob")) { + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob *, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetSpecialAbilityParam(ability, param, value); @@ -8324,21 +7856,19 @@ XS(XS_Mob_SetSpecialAbilityParam) } XS(XS_Mob_ClearSpecialAbilities); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_ClearSpecialAbilities) -{ +XS(XS_Mob_ClearSpecialAbilities) { dXSARGS; - if(items != 1) + if (items != 1) Perl_croak(aTHX_ "Usage: Mob::ClearSpecialAbilities(THIS)"); { - Mob* THIS; + Mob *THIS; - if(sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + if (sv_derived_from(ST(0), "Mob")) { + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob *, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->ClearSpecialAbilities(); @@ -8347,22 +7877,20 @@ XS(XS_Mob_ClearSpecialAbilities) } XS(XS_Mob_ProcessSpecialAbilities); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_ProcessSpecialAbilities) -{ +XS(XS_Mob_ProcessSpecialAbilities) { dXSARGS; - if(items != 2) + if (items != 2) Perl_croak(aTHX_ "Usage: Mob::ProcessSpecialAbilities(THIS, string str)"); { - Mob* THIS; - const char *str = (const char*)SvPV_nolen(ST(1)); + Mob *THIS; + const char *str = (const char *) SvPV_nolen(ST(1)); - if(sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + if (sv_derived_from(ST(0), "Mob")) { + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob *, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->ProcessSpecialAbilities(str); @@ -8371,27 +7899,25 @@ XS(XS_Mob_ProcessSpecialAbilities) } XS(XS_Mob_CanClassEquipItem); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_CanClassEquipItem) -{ +XS(XS_Mob_CanClassEquipItem) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Mob::CanClassEquipItem(THIS, uint32 item_id)"); { - Mob * THIS; - bool RETVAL; - uint32 item_id = (uint32)SvUV(ST(1)); + Mob *THIS; + bool RETVAL; + uint32 item_id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->CanClassEquipItem(item_id); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); @@ -8403,18 +7929,17 @@ XS(XS_Mob_IsFeared) { if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsFeared(THIS)"); { - Mob* THIS; + Mob *THIS; bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob*, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - + RETVAL = THIS->IsFeared(); ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); @@ -8428,18 +7953,17 @@ XS(XS_Mob_IsBlind) { if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsBlind(THIS)"); { - Mob* THIS; + Mob *THIS; bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob*, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - + RETVAL = THIS->IsBlind(); ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); @@ -8453,23 +7977,22 @@ XS(XS_Mob_SeeInvisible) { if (items != 1) Perl_croak(aTHX_ "Usage: Mob::SeeInvisible(THIS)"); { - Mob* THIS; + Mob *THIS; uint8 RETVAL; dXSTARG; - + if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob*, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - + RETVAL = THIS->SeeInvisible(); XSprePUSH; - PUSHu((UV)RETVAL); + PUSHu((UV) RETVAL); } XSRETURN(1); } @@ -8480,18 +8003,17 @@ XS(XS_Mob_SeeInvisibleUndead) { if (items != 1) Perl_croak(aTHX_ "Usage: Mob::SeeInvisibleUndead(THIS)"); { - Mob* THIS; + Mob *THIS; bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob*, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - + RETVAL = THIS->SeeInvisibleUndead(); ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); @@ -8505,18 +8027,17 @@ XS(XS_Mob_SeeHide) { if (items != 1) Perl_croak(aTHX_ "Usage: Mob::SeeHide(THIS)"); { - Mob* THIS; + Mob *THIS; bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob*, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - + RETVAL = THIS->SeeHide(); ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); @@ -8530,18 +8051,17 @@ XS(XS_Mob_SeeImprovedHide) { if (items != 1) Perl_croak(aTHX_ "Usage: Mob::SeeImprovedHide(THIS)"); { - Mob* THIS; + Mob *THIS; bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob*, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - + RETVAL = THIS->SeeImprovedHide(); ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); @@ -8555,23 +8075,22 @@ XS(XS_Mob_GetNimbusEffect1) { if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetNimbusEffect1(THIS)"); { - Mob* THIS; + Mob *THIS; uint8 RETVAL; dXSTARG; - + if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob*, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - + RETVAL = THIS->GetNimbusEffect1(); XSprePUSH; - PUSHu((UV)RETVAL); + PUSHu((UV) RETVAL); } XSRETURN(1); } @@ -8582,23 +8101,22 @@ XS(XS_Mob_GetNimbusEffect2) { if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetNimbusEffect2(THIS)"); { - Mob* THIS; + Mob *THIS; uint8 RETVAL; dXSTARG; - + if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob*, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - + RETVAL = THIS->GetNimbusEffect2(); XSprePUSH; - PUSHu((UV)RETVAL); + PUSHu((UV) RETVAL); } XSRETURN(1); } @@ -8609,23 +8127,22 @@ XS(XS_Mob_GetNimbusEffect3) { if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetNimbusEffect3(THIS)"); { - Mob* THIS; + Mob *THIS; uint8 RETVAL; dXSTARG; - + if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob*, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - + RETVAL = THIS->GetNimbusEffect3(); XSprePUSH; - PUSHu((UV)RETVAL); + PUSHu((UV) RETVAL); } XSRETURN(1); } @@ -8636,18 +8153,17 @@ XS(XS_Mob_IsTargetable) { if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsTargetable(THIS)"); { - Mob* THIS; + Mob *THIS; bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob*, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - + RETVAL = THIS->IsTargetable(); ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); @@ -8661,18 +8177,17 @@ XS(XS_Mob_HasShieldEquiped) { if (items != 1) Perl_croak(aTHX_ "Usage: Mob::HasShieldEquiped(THIS)"); { - Mob* THIS; + Mob *THIS; bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob*, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - + RETVAL = THIS->HasShieldEquiped(); ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); @@ -8686,18 +8201,17 @@ XS(XS_Mob_HasTwoHandBluntEquiped) { if (items != 1) Perl_croak(aTHX_ "Usage: Mob::HasTwoHandBluntEquiped(THIS)"); { - Mob* THIS; + Mob *THIS; bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob*, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - + RETVAL = THIS->HasTwoHandBluntEquiped(); ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); @@ -8711,18 +8225,17 @@ XS(XS_Mob_HasTwoHanderEquipped) { if (items != 1) Perl_croak(aTHX_ "Usage: Mob::HasTwoHanderEquipped(THIS)"); { - Mob* THIS; + Mob *THIS; bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob*, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - + RETVAL = THIS->HasTwoHanderEquipped(); ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); @@ -8736,24 +8249,23 @@ XS(XS_Mob_GetHerosForgeModel) { if (items != 2) Perl_croak(aTHX_ "Usage: Mob::GetHerosForgeModel(THIS, uint8 material_slot)"); { - Mob* THIS; + Mob *THIS; int32 RETVAL; - uint8 material_slot = (uint8)SvUV(ST(1)); + uint8 material_slot = (uint8) SvUV(ST(1)); dXSTARG; - + if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob*, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - + RETVAL = THIS->GetHerosForgeModel(material_slot); XSprePUSH; - PUSHi((IV)RETVAL); + PUSHi((IV) RETVAL); } XSRETURN(1); } @@ -8764,24 +8276,23 @@ XS(XS_Mob_IsEliteMaterialItem) { if (items != 2) Perl_croak(aTHX_ "Usage: Mob::IsEliteMaterialItem(THIS, uint8 material_slot)"); { - Mob* THIS; + Mob *THIS; uint32 RETVAL; - uint8 material_slot = (uint8)SvUV(ST(1)); + uint8 material_slot = (uint8) SvUV(ST(1)); dXSTARG; - + if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob*, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - + RETVAL = THIS->IsEliteMaterialItem(material_slot); XSprePUSH; - PUSHu((UV)RETVAL); + PUSHu((UV) RETVAL); } XSRETURN(1); } @@ -8792,23 +8303,22 @@ XS(XS_Mob_GetBaseSize) { if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetBaseSize(THIS)"); { - Mob* THIS; + Mob *THIS; float RETVAL; dXSTARG; - + if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob*, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - + RETVAL = THIS->GetBaseSize(); XSprePUSH; - PUSHn((double)RETVAL); + PUSHn((double) RETVAL); } XSRETURN(1); } @@ -8819,18 +8329,17 @@ XS(XS_Mob_HasOwner) { if (items != 1) Perl_croak(aTHX_ "Usage: Mob::HasOwner(THIS)"); { - Mob* THIS; + Mob *THIS; bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob*, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - + RETVAL = THIS->HasOwner(); ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); @@ -8844,18 +8353,17 @@ XS(XS_Mob_IsPet) { if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsPet(THIS)"); { - Mob* THIS; + Mob *THIS; bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob*, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - + RETVAL = THIS->IsPet(); ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); @@ -8869,18 +8377,17 @@ XS(XS_Mob_HasPet) { if (items != 1) Perl_croak(aTHX_ "Usage: Mob::HasPet(THIS)"); { - Mob* THIS; + Mob *THIS; bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob*, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - + RETVAL = THIS->HasPet(); ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); @@ -8894,18 +8401,17 @@ XS(XS_Mob_IsSilenced) { if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsSilenced(THIS)"); { - Mob* THIS; + Mob *THIS; bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob*, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - + RETVAL = THIS->IsSilenced(); ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); @@ -8919,18 +8425,17 @@ XS(XS_Mob_IsAmnesiad) { if (items != 1) Perl_croak(aTHX_ "Usage: Mob::IsAmnesiad(THIS)"); { - Mob* THIS; + Mob *THIS; bool RETVAL; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob*, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - + RETVAL = THIS->IsAmnesiad(); ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); @@ -8944,23 +8449,22 @@ XS(XS_Mob_GetMeleeMitigation) { if (items != 1) Perl_croak(aTHX_ "Usage: Mob::GetMeleeMitigation(THIS)"); { - Mob* THIS; + Mob *THIS; int32 RETVAL; dXSTARG; - + if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); + IV tmp = SvIV((SV *) SvRV(ST(0))); THIS = INT2PTR(Mob*, tmp); - } - else + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - + RETVAL = THIS->GetMeleeMitigation(); XSprePUSH; - PUSHi((IV)RETVAL); + PUSHi((IV) RETVAL); } XSRETURN(1); } @@ -8971,23 +8475,22 @@ XS(XS_Mob_TryMoveAlong) { if (items < 3 || items > 4) Perl_croak(aTHX_ "Usage: Mob::TryMoveAlong(THIS, float distance, float angle, bool send)"); { - Mob* THIS; - float distance = (float)SvNV(ST(1)); - float angle = (float)SvNV(ST(2)); - bool send = true; + Mob *THIS; + float distance = (float) SvNV(ST(1)); + float angle = (float) SvNV(ST(2)); + bool send = true; if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Mob"); - - if(THIS == nullptr) + + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items == 4) - send = (bool)SvTRUE(ST(3)); + send = (bool) SvTRUE(ST(3)); THIS->TryMoveAlong(distance, angle, send); } @@ -8998,336 +8501,335 @@ XS(XS_Mob_TryMoveAlong) { extern "C" #endif XS(boot_Mob); /* prototype to pass -Wmissing-prototypes */ -XS(boot_Mob) -{ +XS(boot_Mob) { dXSARGS; char file[256]; strncpy(file, __FILE__, 256); file[255] = 0; - if(items != 1) + if (items != 1) fprintf(stderr, "boot_quest does not take any arguments."); char buf[128]; //add the strcpy stuff to get rid of const warnings.... - XS_VERSION_BOOTCHECK ; + XS_VERSION_BOOTCHECK; - newXSproto(strcpy(buf, "IsClient"), XS_Mob_IsClient, file, "$"); - newXSproto(strcpy(buf, "IsNPC"), XS_Mob_IsNPC, file, "$"); - newXSproto(strcpy(buf, "IsMob"), XS_Mob_IsMob, file, "$"); - newXSproto(strcpy(buf, "IsCorpse"), XS_Mob_IsCorpse, file, "$"); - newXSproto(strcpy(buf, "IsPlayerCorpse"), XS_Mob_IsPlayerCorpse, file, "$"); - newXSproto(strcpy(buf, "IsNPCCorpse"), XS_Mob_IsNPCCorpse, file, "$"); - newXSproto(strcpy(buf, "IsObject"), XS_Mob_IsObject, file, "$"); - newXSproto(strcpy(buf, "IsDoor"), XS_Mob_IsDoor, file, "$"); - newXSproto(strcpy(buf, "IsTrap"), XS_Mob_IsTrap, file, "$"); - newXSproto(strcpy(buf, "IsBeacon"), XS_Mob_IsBeacon, file, "$"); - newXSproto(strcpy(buf, "CastToClient"), XS_Mob_CastToClient, file, "$"); - newXSproto(strcpy(buf, "CastToNPC"), XS_Mob_CastToNPC, file, "$"); - newXSproto(strcpy(buf, "CastToMob"), XS_Mob_CastToMob, file, "$"); - newXSproto(strcpy(buf, "CastToCorpse"), XS_Mob_CastToCorpse, file, "$"); - newXSproto(strcpy(buf, "GetID"), XS_Mob_GetID, file, "$"); - newXSproto(strcpy(buf, "GetName"), XS_Mob_GetName, file, "$"); - newXSproto(strcpy(buf, "Depop"), XS_Mob_Depop, file, "$;$"); - newXSproto(strcpy(buf, "RogueAssassinate"), XS_Mob_RogueAssassinate, file, "$$"); - newXSproto(strcpy(buf, "BehindMob"), XS_Mob_BehindMob, file, "$;$$$"); - newXSproto(strcpy(buf, "SetLevel"), XS_Mob_SetLevel, file, "$$;$"); - newXSproto(strcpy(buf, "GetSkill"), XS_Mob_GetSkill, file, "$$"); - newXSproto(strcpy(buf, "SendWearChange"), XS_Mob_SendWearChange, file, "$$"); - newXSproto(strcpy(buf, "GetEquipment"), XS_Mob_GetEquipment, file, "$$"); - newXSproto(strcpy(buf, "GetEquipmentMaterial"), XS_Mob_GetEquipmentMaterial, file, "$$"); - newXSproto(strcpy(buf, "GetEquipmentColor"), XS_Mob_GetEquipmentColor, file, "$$"); - newXSproto(strcpy(buf, "GetArmorTint"), XS_Mob_GetArmorTint, file, "$$"); - newXSproto(strcpy(buf, "IsMoving"), XS_Mob_IsMoving, file, "$"); - newXSproto(strcpy(buf, "GoToBind"), XS_Mob_GoToBind, file, "$"); - newXSproto(strcpy(buf, "Gate"), XS_Mob_Gate, file, "$"); - newXSproto(strcpy(buf, "Attack"), XS_Mob_Attack, file, "$$;$$"); - newXSproto(strcpy(buf, "Damage"), XS_Mob_Damage, file, "$$$$$;$$$"); - newXSproto(strcpy(buf, "RangedAttack"), XS_Mob_RangedAttack, file, "$$"); - newXSproto(strcpy(buf, "ThrowingAttack"), XS_Mob_ThrowingAttack, file, "$$"); - newXSproto(strcpy(buf, "Heal"), XS_Mob_Heal, file, "$"); - newXSproto(strcpy(buf, "HealDamage"), XS_Mob_HealDamage, file, "$$;$"); - newXSproto(strcpy(buf, "SetMaxHP"), XS_Mob_SetMaxHP, file, "$"); - newXSproto(strcpy(buf, "GetLevelCon"), XS_Mob_GetLevelCon, file, "$$"); - newXSproto(strcpy(buf, "SetHP"), XS_Mob_SetHP, file, "$$"); - newXSproto(strcpy(buf, "DoAnim"), XS_Mob_DoAnim, file, "$$;$"); - newXSproto(strcpy(buf, "ChangeSize"), XS_Mob_ChangeSize, file, "$$;$"); - newXSproto(strcpy(buf, "GMMove"), XS_Mob_GMMove, file, "$$$$;$"); - newXSproto(strcpy(buf, "SendPosUpdate"), XS_Mob_SendPosUpdate, file, "$;$"); - newXSproto(strcpy(buf, "SendPosition"), XS_Mob_SendPosition, file, "$"); - newXSproto(strcpy(buf, "HasProcs"), XS_Mob_HasProcs, file, "$"); - newXSproto(strcpy(buf, "IsInvisible"), XS_Mob_IsInvisible, file, "$;$"); - newXSproto(strcpy(buf, "SetInvisible"), XS_Mob_SetInvisible, file, "$$"); - newXSproto(strcpy(buf, "FindBuff"), XS_Mob_FindBuff, file, "$$"); - newXSproto(strcpy(buf, "FindType"), XS_Mob_FindType, file, "$$;$$"); - newXSproto(strcpy(buf, "GetBuffSlotFromType"), XS_Mob_GetBuffSlotFromType, file, "$$"); - newXSproto(strcpy(buf, "MakePet"), XS_Mob_MakePet, file, "$$$;$"); - newXSproto(strcpy(buf, "GetBaseRace"), XS_Mob_GetBaseRace, file, "$"); - newXSproto(strcpy(buf, "GetBaseGender"), XS_Mob_GetBaseGender, file, "$"); - newXSproto(strcpy(buf, "GetDeity"), XS_Mob_GetDeity, file, "$"); - newXSproto(strcpy(buf, "GetRace"), XS_Mob_GetRace, file, "$"); - newXSproto(strcpy(buf, "GetGender"), XS_Mob_GetGender, file, "$"); - newXSproto(strcpy(buf, "GetTexture"), XS_Mob_GetTexture, file, "$"); - newXSproto(strcpy(buf, "GetHelmTexture"), XS_Mob_GetHelmTexture, file, "$"); - newXSproto(strcpy(buf, "GetHairColor"), XS_Mob_GetHairColor, file, "$"); - newXSproto(strcpy(buf, "GetBeardColor"), XS_Mob_GetBeardColor, file, "$"); - newXSproto(strcpy(buf, "GetEyeColor1"), XS_Mob_GetEyeColor1, file, "$"); - newXSproto(strcpy(buf, "GetEyeColor2"), XS_Mob_GetEyeColor2, file, "$"); - newXSproto(strcpy(buf, "GetHairStyle"), XS_Mob_GetHairStyle, file, "$"); - newXSproto(strcpy(buf, "GetLuclinFace"), XS_Mob_GetLuclinFace, file, "$"); - newXSproto(strcpy(buf, "GetBeard"), XS_Mob_GetBeard, file, "$"); - newXSproto(strcpy(buf, "GetDrakkinHeritage"), XS_Mob_GetDrakkinHeritage, file, "$"); - newXSproto(strcpy(buf, "GetDrakkinTattoo"), XS_Mob_GetDrakkinTattoo, file, "$"); - newXSproto(strcpy(buf, "GetDrakkinDetails"), XS_Mob_GetDrakkinDetails, file, "$"); - newXSproto(strcpy(buf, "GetClass"), XS_Mob_GetClass, file, "$"); - newXSproto(strcpy(buf, "GetLevel"), XS_Mob_GetLevel, file, "$"); - newXSproto(strcpy(buf, "GetCleanName"), XS_Mob_GetCleanName, file, "$"); - newXSproto(strcpy(buf, "GetTarget"), XS_Mob_GetTarget, file, "$"); - newXSproto(strcpy(buf, "SetTarget"), XS_Mob_SetTarget, file, "$$"); - newXSproto(strcpy(buf, "GetHPRatio"), XS_Mob_GetHPRatio, file, "$"); - newXSproto(strcpy(buf, "IsWarriorClass"), XS_Mob_IsWarriorClass, file, "$"); - newXSproto(strcpy(buf, "GetHP"), XS_Mob_GetHP, file, "$"); - newXSproto(strcpy(buf, "GetMaxHP"), XS_Mob_GetMaxHP, file, "$"); - newXSproto(strcpy(buf, "GetItemHPBonuses"), XS_Mob_GetItemHPBonuses, file, "$"); - newXSproto(strcpy(buf, "GetSpellHPBonuses"), XS_Mob_GetSpellHPBonuses, file, "$"); - newXSproto(strcpy(buf, "GetSpellIDFromSlot"), XS_Mob_GetSpellIDFromSlot, file, "$$"); - newXSproto(strcpy(buf, "GetWalkspeed"), XS_Mob_GetWalkspeed, file, "$"); - newXSproto(strcpy(buf, "GetRunspeed"), XS_Mob_GetRunspeed, file, "$"); - newXSproto(strcpy(buf, "GetCasterLevel"), XS_Mob_GetCasterLevel, file, "$$"); - newXSproto(strcpy(buf, "GetMaxMana"), XS_Mob_GetMaxMana, file, "$"); - newXSproto(strcpy(buf, "GetMana"), XS_Mob_GetMana, file, "$"); - newXSproto(strcpy(buf, "SetMana"), XS_Mob_SetMana, file, "$$"); - newXSproto(strcpy(buf, "GetManaRatio"), XS_Mob_GetManaRatio, file, "$"); - newXSproto(strcpy(buf, "GetAC"), XS_Mob_GetAC, file, "$"); - newXSproto(strcpy(buf, "GetATK"), XS_Mob_GetATK, file, "$"); - newXSproto(strcpy(buf, "GetSTR"), XS_Mob_GetSTR, file, "$"); - newXSproto(strcpy(buf, "GetSTA"), XS_Mob_GetSTA, file, "$"); - newXSproto(strcpy(buf, "GetDEX"), XS_Mob_GetDEX, file, "$"); - newXSproto(strcpy(buf, "GetAGI"), XS_Mob_GetAGI, file, "$"); - newXSproto(strcpy(buf, "GetINT"), XS_Mob_GetINT, file, "$"); - newXSproto(strcpy(buf, "GetWIS"), XS_Mob_GetWIS, file, "$"); - newXSproto(strcpy(buf, "GetCHA"), XS_Mob_GetCHA, file, "$"); - newXSproto(strcpy(buf, "GetMR"), XS_Mob_GetMR, file, "$"); - newXSproto(strcpy(buf, "GetFR"), XS_Mob_GetFR, file, "$"); - newXSproto(strcpy(buf, "GetDR"), XS_Mob_GetDR, file, "$"); - newXSproto(strcpy(buf, "GetPR"), XS_Mob_GetPR, file, "$"); - newXSproto(strcpy(buf, "GetCR"), XS_Mob_GetCR, file, "$"); - newXSproto(strcpy(buf, "GetCorruption"), XS_Mob_GetCorruption, file, "$"); - newXSproto(strcpy(buf, "GetPhR"), XS_Mob_GetPhR, file, "$"); - newXSproto(strcpy(buf, "GetMaxSTR"), XS_Mob_GetMaxSTR, file, "$"); - newXSproto(strcpy(buf, "GetMaxSTA"), XS_Mob_GetMaxSTA, file, "$"); - newXSproto(strcpy(buf, "GetMaxDEX"), XS_Mob_GetMaxDEX, file, "$"); - newXSproto(strcpy(buf, "GetMaxAGI"), XS_Mob_GetMaxAGI, file, "$"); - newXSproto(strcpy(buf, "GetMaxINT"), XS_Mob_GetMaxINT, file, "$"); - newXSproto(strcpy(buf, "GetMaxWIS"), XS_Mob_GetMaxWIS, file, "$"); - newXSproto(strcpy(buf, "GetMaxCHA"), XS_Mob_GetMaxCHA, file, "$"); - newXSproto(strcpy(buf, "GetActSpellRange"), XS_Mob_GetActSpellRange, file, "$$$"); - newXSproto(strcpy(buf, "GetActSpellDamage"), XS_Mob_GetActSpellDamage, file, "$$$"); - newXSproto(strcpy(buf, "GetActSpellHealing"), XS_Mob_GetActSpellHealing, file, "$$$"); - newXSproto(strcpy(buf, "GetActSpellCost"), XS_Mob_GetActSpellCost, file, "$$$"); - newXSproto(strcpy(buf, "GetActSpellDuration"), XS_Mob_GetActSpellDuration, file, "$$$"); - newXSproto(strcpy(buf, "GetActSpellCasttime"), XS_Mob_GetActSpellCasttime, file, "$$$"); - newXSproto(strcpy(buf, "ResistSpell"), XS_Mob_ResistSpell, file, "$$$$"); - newXSproto(strcpy(buf, "GetSpecializeSkillValue"), XS_Mob_GetSpecializeSkillValue, file, "$$"); - newXSproto(strcpy(buf, "GetNPCTypeID"), XS_Mob_GetNPCTypeID, file, "$"); - newXSproto(strcpy(buf, "IsTargeted"), XS_Mob_IsTargeted, file, "$"); - newXSproto(strcpy(buf, "GetX"), XS_Mob_GetX, file, "$"); - newXSproto(strcpy(buf, "GetY"), XS_Mob_GetY, file, "$"); - newXSproto(strcpy(buf, "GetZ"), XS_Mob_GetZ, file, "$"); - newXSproto(strcpy(buf, "GetHeading"), XS_Mob_GetHeading, file, "$"); - newXSproto(strcpy(buf, "GetWaypointX"), XS_Mob_GetWaypointX, file, "$"); - newXSproto(strcpy(buf, "GetWaypointY"), XS_Mob_GetWaypointY, file, "$"); - newXSproto(strcpy(buf, "GetWaypointZ"), XS_Mob_GetWaypointZ, file, "$"); - newXSproto(strcpy(buf, "GetWaypointH"), XS_Mob_GetWaypointH, file, "$"); - newXSproto(strcpy(buf, "GetWaypointPause"), XS_Mob_GetWaypointPause, file, "$"); - newXSproto(strcpy(buf, "GetWaypointID"), XS_Mob_GetWaypointID, file, "$"); - newXSproto(strcpy(buf, "SetCurrentWP"), XS_Mob_SetCurrentWP, file, "$$"); - newXSproto(strcpy(buf, "GetSize"), XS_Mob_GetSize, file, "$"); - newXSproto(strcpy(buf, "SetFollowID"), XS_Mob_SetFollowID, file, "$$"); - newXSproto(strcpy(buf, "GetFollowID"), XS_Mob_GetFollowID, file, "$"); - newXSproto(strcpy(buf, "Message"), XS_Mob_Message, file, "$$$;@"); - newXSproto(strcpy(buf, "Message_StringID"), XS_Mob_Message_StringID, file, "$$$;$"); - newXSproto(strcpy(buf, "Say"), XS_Mob_Say, file, "$$;@"); - newXSproto(strcpy(buf, "Shout"), XS_Mob_Shout, file, "$$;@"); - newXSproto(strcpy(buf, "Emote"), XS_Mob_Emote, file, "$$;@"); - newXSproto(strcpy(buf, "InterruptSpell"), XS_Mob_InterruptSpell, file, "$;$"); - newXSproto(strcpy(buf, "CastSpell"), XS_Mob_CastSpell, file, "$$$;$$$"); - newXSproto(strcpy(buf, "SpellFinished"), XS_Mob_SpellFinished, file, "$$;$$"); - newXSproto(strcpy(buf, "IsImmuneToSpell"), XS_Mob_IsImmuneToSpell, file, "$$$"); - newXSproto(strcpy(buf, "BuffFadeBySpellID"), XS_Mob_BuffFadeBySpellID, file, "$$"); - newXSproto(strcpy(buf, "BuffFadeByEffect"), XS_Mob_BuffFadeByEffect, file, "$$;$"); - newXSproto(strcpy(buf, "BuffFadeAll"), XS_Mob_BuffFadeAll, file, "$"); - newXSproto(strcpy(buf, "BuffFadeBySlot"), XS_Mob_BuffFadeBySlot, file, "$$;$"); - newXSproto(strcpy(buf, "CanBuffStack"), XS_Mob_CanBuffStack, file, "$$$;$"); - newXSproto(strcpy(buf, "IsCasting"), XS_Mob_IsCasting, file, "$"); - newXSproto(strcpy(buf, "CastingSpellID"), XS_Mob_CastingSpellID, file, "$"); - newXSproto(strcpy(buf, "SetAppearance"), XS_Mob_SetAppearance, file, "$$;$"); - newXSproto(strcpy(buf, "GetAppearance"), XS_Mob_GetAppearance, file, "$"); - newXSproto(strcpy(buf, "GetRunAnimSpeed"), XS_Mob_GetRunAnimSpeed, file, "$"); - newXSproto(strcpy(buf, "SetRunAnimSpeed"), XS_Mob_SetRunAnimSpeed, file, "$$"); - newXSproto(strcpy(buf, "SetPetID"), XS_Mob_SetPetID, file, "$$"); - newXSproto(strcpy(buf, "GetPetID"), XS_Mob_GetPetID, file, "$"); - newXSproto(strcpy(buf, "SetOwnerID"), XS_Mob_SetOwnerID, file, "$$"); - newXSproto(strcpy(buf, "GetOwnerID"), XS_Mob_GetOwnerID, file, "$"); - newXSproto(strcpy(buf, "GetPetType"), XS_Mob_GetPetType, file, "$"); - newXSproto(strcpy(buf, "GetBodyType"), XS_Mob_GetBodyType, file, "$"); - newXSproto(strcpy(buf, "Stun"), XS_Mob_Stun, file, "$$"); - newXSproto(strcpy(buf, "Spin"), XS_Mob_Spin, file, "$"); - newXSproto(strcpy(buf, "Kill"), XS_Mob_Kill, file, "$"); - newXSproto(strcpy(buf, "SetInvul"), XS_Mob_SetInvul, file, "$$"); - newXSproto(strcpy(buf, "GetInvul"), XS_Mob_GetInvul, file, "$"); - newXSproto(strcpy(buf, "SetExtraHaste"), XS_Mob_SetExtraHaste, file, "$$"); - newXSproto(strcpy(buf, "GetHaste"), XS_Mob_GetHaste, file, "$"); - newXSproto(strcpy(buf, "GetHandToHandDamage"), XS_Mob_GetHandToHandDamage, file, "$"); - newXSproto(strcpy(buf, "CanThisClassDoubleAttack"), XS_Mob_CanThisClassDoubleAttack, file, "$"); - newXSproto(strcpy(buf, "CanThisClassDualWield"), XS_Mob_CanThisClassDualWield, file, "$"); - newXSproto(strcpy(buf, "CanThisClassRiposte"), XS_Mob_CanThisClassRiposte, file, "$"); - newXSproto(strcpy(buf, "CanThisClassDodge"), XS_Mob_CanThisClassDodge, file, "$"); - newXSproto(strcpy(buf, "CanThisClassParry"), XS_Mob_CanThisClassParry, file, "$"); - newXSproto(strcpy(buf, "GetHandToHandDelay"), XS_Mob_GetHandToHandDelay, file, "$"); - newXSproto(strcpy(buf, "GetClassLevelFactor"), XS_Mob_GetClassLevelFactor, file, "$"); - newXSproto(strcpy(buf, "Mesmerize"), XS_Mob_Mesmerize, file, "$"); - newXSproto(strcpy(buf, "IsMezzed"), XS_Mob_IsMezzed, file, "$"); - newXSproto(strcpy(buf, "IsStunned"), XS_Mob_IsStunned, file, "$"); - newXSproto(strcpy(buf, "StartEnrage"), XS_Mob_StartEnrage, file, "$"); - newXSproto(strcpy(buf, "IsEnraged"), XS_Mob_IsEnraged, file, "$"); - newXSproto(strcpy(buf, "GetReverseFactionCon"), XS_Mob_GetReverseFactionCon, file, "$$"); - newXSproto(strcpy(buf, "IsAIControlled"), XS_Mob_IsAIControlled, file, "$"); - newXSproto(strcpy(buf, "GetAggroRange"), XS_Mob_GetAggroRange, file, "$"); - newXSproto(strcpy(buf, "GetAssistRange"), XS_Mob_GetAssistRange, file, "$"); - newXSproto(strcpy(buf, "SetPetOrder"), XS_Mob_SetPetOrder, file, "$$"); - newXSproto(strcpy(buf, "GetPetOrder"), XS_Mob_GetPetOrder, file, "$"); - newXSproto(strcpy(buf, "IsRoamer"), XS_Mob_IsRoamer, file, "$"); - newXSproto(strcpy(buf, "IsRooted"), XS_Mob_IsRooted, file, "$"); - newXSproto(strcpy(buf, "AddToHateList"), XS_Mob_AddToHateList, file, "$$;$$$$$"); - newXSproto(strcpy(buf, "SetHate"), XS_Mob_SetHate, file, "$$;$$"); - newXSproto(strcpy(buf, "HalveAggro"), XS_Mob_HalveAggro, file, "$$"); - newXSproto(strcpy(buf, "DoubleAggro"), XS_Mob_DoubleAggro, file, "$$"); - newXSproto(strcpy(buf, "GetHateAmount"), XS_Mob_GetHateAmount, file, "$$;$"); - newXSproto(strcpy(buf, "GetDamageAmount"), XS_Mob_GetDamageAmount, file, "$$"); - newXSproto(strcpy(buf, "GetHateTop"), XS_Mob_GetHateTop, file, "$"); - newXSproto(strcpy(buf, "GetHateDamageTop"), XS_Mob_GetHateDamageTop, file, "$$"); - newXSproto(strcpy(buf, "GetHateRandom"), XS_Mob_GetHateRandom, file, "$"); - newXSproto(strcpy(buf, "IsEngaged"), XS_Mob_IsEngaged, file, "$"); - newXSproto(strcpy(buf, "HateSummon"), XS_Mob_HateSummon, file, "$"); - newXSproto(strcpy(buf, "FaceTarget"), XS_Mob_FaceTarget, file, "$;$$"); - newXSproto(strcpy(buf, "SetHeading"), XS_Mob_SetHeading, file, "$$"); - newXSproto(strcpy(buf, "WipeHateList"), XS_Mob_WipeHateList, file, "$"); - newXSproto(strcpy(buf, "CheckAggro"), XS_Mob_CheckAggro, file, "$$"); - newXSproto(strcpy(buf, "CalculateHeadingToTarget"), XS_Mob_CalculateHeadingToTarget, file, "$$$"); - newXSproto(strcpy(buf, "CalculateNewPosition"), XS_Mob_CalculateNewPosition, file, "$$$$$;$"); - newXSproto(strcpy(buf, "CalculateDistance"), XS_Mob_CalculateDistance, file, "$$$$"); - newXSproto(strcpy(buf, "SendTo"), XS_Mob_SendTo, file, "$$$$"); - newXSproto(strcpy(buf, "SendToFixZ"), XS_Mob_SendToFixZ, file, "$$$$"); - newXSproto(strcpy(buf, "NPCSpecialAttacks"), XS_Mob_NPCSpecialAttacks, file, "$$$;$$"); - newXSproto(strcpy(buf, "DontHealMeBefore"), XS_Mob_DontHealMeBefore, file, "$"); - newXSproto(strcpy(buf, "DontBuffMeBefore"), XS_Mob_DontBuffMeBefore, file, "$"); - newXSproto(strcpy(buf, "DontDotMeBefore"), XS_Mob_DontDotMeBefore, file, "$"); - newXSproto(strcpy(buf, "DontRootMeBefore"), XS_Mob_DontRootMeBefore, file, "$"); - newXSproto(strcpy(buf, "DontSnareMeBefore"), XS_Mob_DontSnareMeBefore, file, "$"); - newXSproto(strcpy(buf, "GetResist"), XS_Mob_GetResist, file, "$$"); - newXSproto(strcpy(buf, "GetShieldTarget"), XS_Mob_GetShieldTarget, file, "$"); - newXSproto(strcpy(buf, "SetShieldTarget"), XS_Mob_SetShieldTarget, file, "$$"); - newXSproto(strcpy(buf, "Charmed"), XS_Mob_Charmed, file, "$"); - newXSproto(strcpy(buf, "GetLevelHP"), XS_Mob_GetLevelHP, file, "$$"); - newXSproto(strcpy(buf, "GetZoneID"), XS_Mob_GetZoneID, file, "$"); - newXSproto(strcpy(buf, "CheckAggroAmount"), XS_Mob_CheckAggroAmount, file, "$$"); - newXSproto(strcpy(buf, "CheckHealAggroAmount"), XS_Mob_CheckHealAggroAmount, file, "$$"); - newXSproto(strcpy(buf, "GetAA"), XS_Mob_GetAA, file, "$$"); - newXSproto(strcpy(buf, "GetAAByAAID"), XS_Mob_GetAAByAAID, file, "$$"); - newXSproto(strcpy(buf, "SetAA"), XS_Mob_SetAA, file, "$$$;$"); - newXSproto(strcpy(buf, "DivineAura"), XS_Mob_DivineAura, file, "$"); - newXSproto(strcpy(buf, "AddFeignMemory"), XS_Mob_AddFeignMemory, file, "$$"); - newXSproto(strcpy(buf, "RemoveFromFeignMemory"), XS_Mob_RemoveFromFeignMemory, file, "$$"); - newXSproto(strcpy(buf, "ClearFeignMemory"), XS_Mob_ClearFeignMemory, file, "$"); - newXSproto(strcpy(buf, "SetOOCRegen"), XS_Mob_SetOOCRegen, file, "$$"); - newXSproto(strcpy(buf, "GetEntityVariable"), XS_Mob_GetEntityVariable, file, "$$"); - newXSproto(strcpy(buf, "SetEntityVariable"), XS_Mob_SetEntityVariable, file, "$$$"); - newXSproto(strcpy(buf, "EntityVariableExists"), XS_Mob_EntityVariableExists, file, "$$"); - newXSproto(strcpy(buf, "GetHateList"), XS_Mob_GetHateList, file, "$"); - newXSproto(strcpy(buf, "SignalClient"), XS_Mob_SignalClient, file, "$$$"); - newXSproto(strcpy(buf, "CombatRange"), XS_Mob_CombatRange, file, "$$"); - newXSproto(strcpy(buf, "DoSpecialAttackDamage"), XS_Mob_DoSpecialAttackDamage, file, "$$$$;$$"); - newXSproto(strcpy(buf, "CheckLoS"), XS_Mob_CheckLoS, file, "$$"); - newXSproto(strcpy(buf, "CheckLoSToLoc"), XS_Mob_CheckLoSToLoc, file, "$$$$;$"); - newXSproto(strcpy(buf, "FindGroundZ"), XS_Mob_FindGroundZ, file, "$$$;$"); - newXSproto(strcpy(buf, "ProjectileAnim"), XS_Mob_ProjectileAnim, file, "$$$;$$$$$$"); - newXSproto(strcpy(buf, "HasNPCSpecialAtk"), XS_Mob_HasNPCSpecialAtk, file, "$$"); - newXSproto(strcpy(buf, "SendAppearanceEffect"), XS_Mob_SendAppearanceEffect, file, "$$;$$$$"); - newXSproto(strcpy(buf, "SetFlyMode"), XS_Mob_SetFlyMode, file, "$$"); - newXSproto(strcpy(buf, "SetTexture"), XS_Mob_SetTexture, file, "$$"); - newXSproto(strcpy(buf, "SetRace"), XS_Mob_SetRace, file, "$$"); - newXSproto(strcpy(buf, "SetGender"), XS_Mob_SetGender, file, "$$"); - newXSproto(strcpy(buf, "SendIllusion"), XS_Mob_SendIllusion, file, "$$;$$$$$$$$$$$$"); - newXSproto(strcpy(buf, "MakeTempPet"), XS_Mob_MakeTempPet, file, "$$;$$$$"); - newXSproto(strcpy(buf, "TypesTempPet"), XS_Mob_TypesTempPet, file, "$$;$$$$$"); - newXSproto(strcpy(buf, "CameraEffect"), XS_Mob_CameraEffect, file, "$$;$$$"); - newXSproto(strcpy(buf, "SpellEffect"), XS_Mob_SpellEffect, file, "$$;$$$$$$"); - newXSproto(strcpy(buf, "TempName"), XS_Mob_TempName, file, "$:$"); - newXSproto(strcpy(buf, "GetItemStat"), XS_Mob_GetItemStat, file, "$$$"); - newXSproto(strcpy(buf, "GetGlobal"), XS_Mob_GetGlobal, file, "$$"); - newXSproto(strcpy(buf, "SetGlobal"), XS_Mob_SetGlobal, file, "$$$$$;$"); - newXSproto(strcpy(buf, "TarGlobal"), XS_Mob_TarGlobal, file, "$$$$$$$"); - newXSproto(strcpy(buf, "DelGlobal"), XS_Mob_DelGlobal, file, "$$"); - newXSproto(strcpy(buf, "SetSlotTint"), XS_Mob_SetSlotTint, file, "$$$$$"); - newXSproto(strcpy(buf, "WearChange"), XS_Mob_WearChange, file, "$$$;$$"); - newXSproto(strcpy(buf, "DoKnockback"), XS_Mob_DoKnockback, file, "$$$$"); - newXSproto(strcpy(buf, "RemoveNimbusEffect"), XS_Mob_RemoveNimbusEffect, file, "$$"); - newXSproto(strcpy(buf, "IsRunning"), XS_Mob_IsRunning, file, "$"); - newXSproto(strcpy(buf, "SetRunning"), XS_Mob_SetRunning, file, "$$"); - newXSproto(strcpy(buf, "SetBodyType"), XS_Mob_SetBodyType, file, "$$;$"); - newXSproto(strcpy(buf, "SetDeltas"), XS_Mob_SetDeltas, file, "$$$$$"); - newXSproto(strcpy(buf, "SetLD"), XS_Mob_SetLD, file, "$$"); - newXSproto(strcpy(buf, "SetTargetDestSteps"), XS_Mob_SetTargetDestSteps, file, "$$"); - newXSproto(strcpy(buf, "SetTargetable"), XS_Mob_SetTargetable, file, "$$"); - newXSproto(strcpy(buf, "MakeTempPet"), XS_Mob_MakeTempPet, file, "$$;$$$$"); - newXSproto(strcpy(buf, "ModSkillDmgTaken"), XS_Mob_ModSkillDmgTaken, file, "$$$"); - newXSproto(strcpy(buf, "GetModSkillDmgTaken"), XS_Mob_GetModSkillDmgTaken, file, "$$"); - newXSproto(strcpy(buf, "GetSkillDmgTaken"), XS_Mob_GetSkillDmgTaken, file, "$$"); - newXSproto(strcpy(buf, "SetAllowBeneficial"), XS_Mob_SetAllowBeneficial, file, "$$"); - newXSproto(strcpy(buf, "GetAllowBeneficial"), XS_Mob_GetAllowBeneficial, file, "$$"); - newXSproto(strcpy(buf, "IsBeneficialAllowed"), XS_Mob_IsBeneficialAllowed, file, "$$"); - newXSproto(strcpy(buf, "ModVulnerability"), XS_Mob_ModVulnerability, file, "$$$"); - newXSproto(strcpy(buf, "GetModVulnerability"), XS_Mob_GetModVulnerability, file, "$$"); - newXSproto(strcpy(buf, "DoMeleeSkillAttackDmg"), XS_Mob_DoMeleeSkillAttackDmg, file, "$$$$$$$"); - newXSproto(strcpy(buf, "DoArcheryAttackDmg"), XS_Mob_DoArcheryAttackDmg, file, "$$$$$$$"); - newXSproto(strcpy(buf, "DoThrowingAttackDmg"), XS_Mob_DoThrowingAttackDmg, file, "$$$$$$$"); - newXSproto(strcpy(buf, "SetDisableMelee"), XS_Mob_SetDisableMelee, file, "$$"); - newXSproto(strcpy(buf, "IsMeleeDisabled"), XS_Mob_IsMeleeDisabled, file, "$"); - newXSproto(strcpy(buf, "SetFlurryChance"), XS_Mob_SetFlurryChance, file, "$$"); - newXSproto(strcpy(buf, "GetFlurryChance"), XS_Mob_GetFlurryChance, file, "$"); - newXSproto(strcpy(buf, "GetSpellStat"), XS_Mob_GetSpellStat, file, "$$$$"); - newXSproto(strcpy(buf, "GetSpecialAbility"), XS_Mob_GetSpecialAbility, file, "$$"); - newXSproto(strcpy(buf, "GetSpecialAbilityParam"), XS_Mob_GetSpecialAbilityParam, file, "$$$"); - newXSproto(strcpy(buf, "SetSpecialAbility"), XS_Mob_SetSpecialAbility, file, "$$$"); - newXSproto(strcpy(buf, "SetSpecialAbilityParam"), XS_Mob_SetSpecialAbilityParam, file, "$$$$"); - newXSproto(strcpy(buf, "ClearSpecialAbilities"), XS_Mob_ClearSpecialAbilities, file, "$"); - newXSproto(strcpy(buf, "ProcessSpecialAbilities"), XS_Mob_ProcessSpecialAbilities, file, "$$"); - newXSproto(strcpy(buf, "CanClassEquipItem"), XS_Mob_CanClassEquipItem, file, "$$"); - newXSproto(strcpy(buf, "IsFeared"), XS_Mob_IsFeared, file, "$"); - newXSproto(strcpy(buf, "IsBlind"), XS_Mob_IsBlind, file, "$"); - newXSproto(strcpy(buf, "SeeInvisible"), XS_Mob_SeeInvisible, file, "$"); - newXSproto(strcpy(buf, "SeeInvisibleUndead"), XS_Mob_SeeInvisibleUndead, file, "$"); - newXSproto(strcpy(buf, "SeeHide"), XS_Mob_SeeHide, file, "$"); - newXSproto(strcpy(buf, "SeeImprovedHide"), XS_Mob_SeeImprovedHide, file, "$"); - newXSproto(strcpy(buf, "GetNimbusEffect1"), XS_Mob_GetNimbusEffect1, file, "$"); - newXSproto(strcpy(buf, "GetNimbusEffect2"), XS_Mob_GetNimbusEffect2, file, "$"); - newXSproto(strcpy(buf, "GetNimbusEffect3"), XS_Mob_GetNimbusEffect3, file, "$"); - newXSproto(strcpy(buf, "IsTargetable"), XS_Mob_IsTargetable, file, "$"); - newXSproto(strcpy(buf, "HasShieldEquiped"), XS_Mob_HasShieldEquiped, file, "$"); - newXSproto(strcpy(buf, "HasTwoHandBluntEquiped"), XS_Mob_HasTwoHandBluntEquiped, file, "$"); - newXSproto(strcpy(buf, "HasTwoHanderEquipped"), XS_Mob_HasTwoHanderEquipped, file, "$"); - newXSproto(strcpy(buf, "GetHerosForgeModel"), XS_Mob_GetHerosForgeModel, file, "$$"); - newXSproto(strcpy(buf, "IsEliteMaterialItem"), XS_Mob_IsEliteMaterialItem, file, "$$"); - newXSproto(strcpy(buf, "GetBaseSize"), XS_Mob_GetBaseSize, file, "$"); - newXSproto(strcpy(buf, "HasOwner"), XS_Mob_HasOwner, file, "$"); - newXSproto(strcpy(buf, "IsPet"), XS_Mob_IsPet, file, "$"); - newXSproto(strcpy(buf, "HasPet"), XS_Mob_HasPet, file, "$"); - newXSproto(strcpy(buf, "IsSilenced"), XS_Mob_IsSilenced, file, "$"); - newXSproto(strcpy(buf, "IsAmnesiad"), XS_Mob_IsAmnesiad, file, "$"); - newXSproto(strcpy(buf, "GetMeleeMitigation"), XS_Mob_GetMeleeMitigation, file, "$"); - newXSproto(strcpy(buf, "TryMoveAlong"), XS_Mob_TryMoveAlong, file, "$$$;$"); + newXSproto(strcpy(buf, "IsClient"), XS_Mob_IsClient, file, "$"); + newXSproto(strcpy(buf, "IsNPC"), XS_Mob_IsNPC, file, "$"); + newXSproto(strcpy(buf, "IsMob"), XS_Mob_IsMob, file, "$"); + newXSproto(strcpy(buf, "IsCorpse"), XS_Mob_IsCorpse, file, "$"); + newXSproto(strcpy(buf, "IsPlayerCorpse"), XS_Mob_IsPlayerCorpse, file, "$"); + newXSproto(strcpy(buf, "IsNPCCorpse"), XS_Mob_IsNPCCorpse, file, "$"); + newXSproto(strcpy(buf, "IsObject"), XS_Mob_IsObject, file, "$"); + newXSproto(strcpy(buf, "IsDoor"), XS_Mob_IsDoor, file, "$"); + newXSproto(strcpy(buf, "IsTrap"), XS_Mob_IsTrap, file, "$"); + newXSproto(strcpy(buf, "IsBeacon"), XS_Mob_IsBeacon, file, "$"); + newXSproto(strcpy(buf, "CastToClient"), XS_Mob_CastToClient, file, "$"); + newXSproto(strcpy(buf, "CastToNPC"), XS_Mob_CastToNPC, file, "$"); + newXSproto(strcpy(buf, "CastToMob"), XS_Mob_CastToMob, file, "$"); + newXSproto(strcpy(buf, "CastToCorpse"), XS_Mob_CastToCorpse, file, "$"); + newXSproto(strcpy(buf, "GetID"), XS_Mob_GetID, file, "$"); + newXSproto(strcpy(buf, "GetName"), XS_Mob_GetName, file, "$"); + newXSproto(strcpy(buf, "Depop"), XS_Mob_Depop, file, "$;$"); + newXSproto(strcpy(buf, "RogueAssassinate"), XS_Mob_RogueAssassinate, file, "$$"); + newXSproto(strcpy(buf, "BehindMob"), XS_Mob_BehindMob, file, "$;$$$"); + newXSproto(strcpy(buf, "SetLevel"), XS_Mob_SetLevel, file, "$$;$"); + newXSproto(strcpy(buf, "GetSkill"), XS_Mob_GetSkill, file, "$$"); + newXSproto(strcpy(buf, "SendWearChange"), XS_Mob_SendWearChange, file, "$$"); + newXSproto(strcpy(buf, "GetEquipment"), XS_Mob_GetEquipment, file, "$$"); + newXSproto(strcpy(buf, "GetEquipmentMaterial"), XS_Mob_GetEquipmentMaterial, file, "$$"); + newXSproto(strcpy(buf, "GetEquipmentColor"), XS_Mob_GetEquipmentColor, file, "$$"); + newXSproto(strcpy(buf, "GetArmorTint"), XS_Mob_GetArmorTint, file, "$$"); + newXSproto(strcpy(buf, "IsMoving"), XS_Mob_IsMoving, file, "$"); + newXSproto(strcpy(buf, "GoToBind"), XS_Mob_GoToBind, file, "$"); + newXSproto(strcpy(buf, "Gate"), XS_Mob_Gate, file, "$"); + newXSproto(strcpy(buf, "Attack"), XS_Mob_Attack, file, "$$;$$"); + newXSproto(strcpy(buf, "Damage"), XS_Mob_Damage, file, "$$$$$;$$$"); + newXSproto(strcpy(buf, "RangedAttack"), XS_Mob_RangedAttack, file, "$$"); + newXSproto(strcpy(buf, "ThrowingAttack"), XS_Mob_ThrowingAttack, file, "$$"); + newXSproto(strcpy(buf, "Heal"), XS_Mob_Heal, file, "$"); + newXSproto(strcpy(buf, "HealDamage"), XS_Mob_HealDamage, file, "$$;$"); + newXSproto(strcpy(buf, "SetMaxHP"), XS_Mob_SetMaxHP, file, "$"); + newXSproto(strcpy(buf, "GetLevelCon"), XS_Mob_GetLevelCon, file, "$$"); + newXSproto(strcpy(buf, "SetHP"), XS_Mob_SetHP, file, "$$"); + newXSproto(strcpy(buf, "DoAnim"), XS_Mob_DoAnim, file, "$$;$"); + newXSproto(strcpy(buf, "ChangeSize"), XS_Mob_ChangeSize, file, "$$;$"); + newXSproto(strcpy(buf, "GMMove"), XS_Mob_GMMove, file, "$$$$;$"); + newXSproto(strcpy(buf, "SendPosUpdate"), XS_Mob_SendPosUpdate, file, "$;$"); + newXSproto(strcpy(buf, "SendPosition"), XS_Mob_SendPosition, file, "$"); + newXSproto(strcpy(buf, "HasProcs"), XS_Mob_HasProcs, file, "$"); + newXSproto(strcpy(buf, "IsInvisible"), XS_Mob_IsInvisible, file, "$;$"); + newXSproto(strcpy(buf, "SetInvisible"), XS_Mob_SetInvisible, file, "$$"); + newXSproto(strcpy(buf, "FindBuff"), XS_Mob_FindBuff, file, "$$"); + newXSproto(strcpy(buf, "FindType"), XS_Mob_FindType, file, "$$;$$"); + newXSproto(strcpy(buf, "GetBuffSlotFromType"), XS_Mob_GetBuffSlotFromType, file, "$$"); + newXSproto(strcpy(buf, "MakePet"), XS_Mob_MakePet, file, "$$$;$"); + newXSproto(strcpy(buf, "GetBaseRace"), XS_Mob_GetBaseRace, file, "$"); + newXSproto(strcpy(buf, "GetBaseGender"), XS_Mob_GetBaseGender, file, "$"); + newXSproto(strcpy(buf, "GetDeity"), XS_Mob_GetDeity, file, "$"); + newXSproto(strcpy(buf, "GetRace"), XS_Mob_GetRace, file, "$"); + newXSproto(strcpy(buf, "GetGender"), XS_Mob_GetGender, file, "$"); + newXSproto(strcpy(buf, "GetTexture"), XS_Mob_GetTexture, file, "$"); + newXSproto(strcpy(buf, "GetHelmTexture"), XS_Mob_GetHelmTexture, file, "$"); + newXSproto(strcpy(buf, "GetHairColor"), XS_Mob_GetHairColor, file, "$"); + newXSproto(strcpy(buf, "GetBeardColor"), XS_Mob_GetBeardColor, file, "$"); + newXSproto(strcpy(buf, "GetEyeColor1"), XS_Mob_GetEyeColor1, file, "$"); + newXSproto(strcpy(buf, "GetEyeColor2"), XS_Mob_GetEyeColor2, file, "$"); + newXSproto(strcpy(buf, "GetHairStyle"), XS_Mob_GetHairStyle, file, "$"); + newXSproto(strcpy(buf, "GetLuclinFace"), XS_Mob_GetLuclinFace, file, "$"); + newXSproto(strcpy(buf, "GetBeard"), XS_Mob_GetBeard, file, "$"); + newXSproto(strcpy(buf, "GetDrakkinHeritage"), XS_Mob_GetDrakkinHeritage, file, "$"); + newXSproto(strcpy(buf, "GetDrakkinTattoo"), XS_Mob_GetDrakkinTattoo, file, "$"); + newXSproto(strcpy(buf, "GetDrakkinDetails"), XS_Mob_GetDrakkinDetails, file, "$"); + newXSproto(strcpy(buf, "GetClass"), XS_Mob_GetClass, file, "$"); + newXSproto(strcpy(buf, "GetLevel"), XS_Mob_GetLevel, file, "$"); + newXSproto(strcpy(buf, "GetCleanName"), XS_Mob_GetCleanName, file, "$"); + newXSproto(strcpy(buf, "GetTarget"), XS_Mob_GetTarget, file, "$"); + newXSproto(strcpy(buf, "SetTarget"), XS_Mob_SetTarget, file, "$$"); + newXSproto(strcpy(buf, "GetHPRatio"), XS_Mob_GetHPRatio, file, "$"); + newXSproto(strcpy(buf, "IsWarriorClass"), XS_Mob_IsWarriorClass, file, "$"); + newXSproto(strcpy(buf, "GetHP"), XS_Mob_GetHP, file, "$"); + newXSproto(strcpy(buf, "GetMaxHP"), XS_Mob_GetMaxHP, file, "$"); + newXSproto(strcpy(buf, "GetItemHPBonuses"), XS_Mob_GetItemHPBonuses, file, "$"); + newXSproto(strcpy(buf, "GetSpellHPBonuses"), XS_Mob_GetSpellHPBonuses, file, "$"); + newXSproto(strcpy(buf, "GetSpellIDFromSlot"), XS_Mob_GetSpellIDFromSlot, file, "$$"); + newXSproto(strcpy(buf, "GetWalkspeed"), XS_Mob_GetWalkspeed, file, "$"); + newXSproto(strcpy(buf, "GetRunspeed"), XS_Mob_GetRunspeed, file, "$"); + newXSproto(strcpy(buf, "GetCasterLevel"), XS_Mob_GetCasterLevel, file, "$$"); + newXSproto(strcpy(buf, "GetMaxMana"), XS_Mob_GetMaxMana, file, "$"); + newXSproto(strcpy(buf, "GetMana"), XS_Mob_GetMana, file, "$"); + newXSproto(strcpy(buf, "SetMana"), XS_Mob_SetMana, file, "$$"); + newXSproto(strcpy(buf, "GetManaRatio"), XS_Mob_GetManaRatio, file, "$"); + newXSproto(strcpy(buf, "GetAC"), XS_Mob_GetAC, file, "$"); + newXSproto(strcpy(buf, "GetATK"), XS_Mob_GetATK, file, "$"); + newXSproto(strcpy(buf, "GetSTR"), XS_Mob_GetSTR, file, "$"); + newXSproto(strcpy(buf, "GetSTA"), XS_Mob_GetSTA, file, "$"); + newXSproto(strcpy(buf, "GetDEX"), XS_Mob_GetDEX, file, "$"); + newXSproto(strcpy(buf, "GetAGI"), XS_Mob_GetAGI, file, "$"); + newXSproto(strcpy(buf, "GetINT"), XS_Mob_GetINT, file, "$"); + newXSproto(strcpy(buf, "GetWIS"), XS_Mob_GetWIS, file, "$"); + newXSproto(strcpy(buf, "GetCHA"), XS_Mob_GetCHA, file, "$"); + newXSproto(strcpy(buf, "GetMR"), XS_Mob_GetMR, file, "$"); + newXSproto(strcpy(buf, "GetFR"), XS_Mob_GetFR, file, "$"); + newXSproto(strcpy(buf, "GetDR"), XS_Mob_GetDR, file, "$"); + newXSproto(strcpy(buf, "GetPR"), XS_Mob_GetPR, file, "$"); + newXSproto(strcpy(buf, "GetCR"), XS_Mob_GetCR, file, "$"); + newXSproto(strcpy(buf, "GetCorruption"), XS_Mob_GetCorruption, file, "$"); + newXSproto(strcpy(buf, "GetPhR"), XS_Mob_GetPhR, file, "$"); + newXSproto(strcpy(buf, "GetMaxSTR"), XS_Mob_GetMaxSTR, file, "$"); + newXSproto(strcpy(buf, "GetMaxSTA"), XS_Mob_GetMaxSTA, file, "$"); + newXSproto(strcpy(buf, "GetMaxDEX"), XS_Mob_GetMaxDEX, file, "$"); + newXSproto(strcpy(buf, "GetMaxAGI"), XS_Mob_GetMaxAGI, file, "$"); + newXSproto(strcpy(buf, "GetMaxINT"), XS_Mob_GetMaxINT, file, "$"); + newXSproto(strcpy(buf, "GetMaxWIS"), XS_Mob_GetMaxWIS, file, "$"); + newXSproto(strcpy(buf, "GetMaxCHA"), XS_Mob_GetMaxCHA, file, "$"); + newXSproto(strcpy(buf, "GetActSpellRange"), XS_Mob_GetActSpellRange, file, "$$$"); + newXSproto(strcpy(buf, "GetActSpellDamage"), XS_Mob_GetActSpellDamage, file, "$$$"); + newXSproto(strcpy(buf, "GetActSpellHealing"), XS_Mob_GetActSpellHealing, file, "$$$"); + newXSproto(strcpy(buf, "GetActSpellCost"), XS_Mob_GetActSpellCost, file, "$$$"); + newXSproto(strcpy(buf, "GetActSpellDuration"), XS_Mob_GetActSpellDuration, file, "$$$"); + newXSproto(strcpy(buf, "GetActSpellCasttime"), XS_Mob_GetActSpellCasttime, file, "$$$"); + newXSproto(strcpy(buf, "ResistSpell"), XS_Mob_ResistSpell, file, "$$$$"); + newXSproto(strcpy(buf, "GetSpecializeSkillValue"), XS_Mob_GetSpecializeSkillValue, file, "$$"); + newXSproto(strcpy(buf, "GetNPCTypeID"), XS_Mob_GetNPCTypeID, file, "$"); + newXSproto(strcpy(buf, "IsTargeted"), XS_Mob_IsTargeted, file, "$"); + newXSproto(strcpy(buf, "GetX"), XS_Mob_GetX, file, "$"); + newXSproto(strcpy(buf, "GetY"), XS_Mob_GetY, file, "$"); + newXSproto(strcpy(buf, "GetZ"), XS_Mob_GetZ, file, "$"); + newXSproto(strcpy(buf, "GetHeading"), XS_Mob_GetHeading, file, "$"); + newXSproto(strcpy(buf, "GetWaypointX"), XS_Mob_GetWaypointX, file, "$"); + newXSproto(strcpy(buf, "GetWaypointY"), XS_Mob_GetWaypointY, file, "$"); + newXSproto(strcpy(buf, "GetWaypointZ"), XS_Mob_GetWaypointZ, file, "$"); + newXSproto(strcpy(buf, "GetWaypointH"), XS_Mob_GetWaypointH, file, "$"); + newXSproto(strcpy(buf, "GetWaypointPause"), XS_Mob_GetWaypointPause, file, "$"); + newXSproto(strcpy(buf, "GetWaypointID"), XS_Mob_GetWaypointID, file, "$"); + newXSproto(strcpy(buf, "SetCurrentWP"), XS_Mob_SetCurrentWP, file, "$$"); + newXSproto(strcpy(buf, "GetSize"), XS_Mob_GetSize, file, "$"); + newXSproto(strcpy(buf, "SetFollowID"), XS_Mob_SetFollowID, file, "$$"); + newXSproto(strcpy(buf, "GetFollowID"), XS_Mob_GetFollowID, file, "$"); + newXSproto(strcpy(buf, "Message"), XS_Mob_Message, file, "$$$;@"); + newXSproto(strcpy(buf, "Message_StringID"), XS_Mob_Message_StringID, file, "$$$;$"); + newXSproto(strcpy(buf, "Say"), XS_Mob_Say, file, "$$;@"); + newXSproto(strcpy(buf, "Shout"), XS_Mob_Shout, file, "$$;@"); + newXSproto(strcpy(buf, "Emote"), XS_Mob_Emote, file, "$$;@"); + newXSproto(strcpy(buf, "InterruptSpell"), XS_Mob_InterruptSpell, file, "$;$"); + newXSproto(strcpy(buf, "CastSpell"), XS_Mob_CastSpell, file, "$$$;$$$"); + newXSproto(strcpy(buf, "SpellFinished"), XS_Mob_SpellFinished, file, "$$;$$"); + newXSproto(strcpy(buf, "IsImmuneToSpell"), XS_Mob_IsImmuneToSpell, file, "$$$"); + newXSproto(strcpy(buf, "BuffFadeBySpellID"), XS_Mob_BuffFadeBySpellID, file, "$$"); + newXSproto(strcpy(buf, "BuffFadeByEffect"), XS_Mob_BuffFadeByEffect, file, "$$;$"); + newXSproto(strcpy(buf, "BuffFadeAll"), XS_Mob_BuffFadeAll, file, "$"); + newXSproto(strcpy(buf, "BuffFadeBySlot"), XS_Mob_BuffFadeBySlot, file, "$$;$"); + newXSproto(strcpy(buf, "CanBuffStack"), XS_Mob_CanBuffStack, file, "$$$;$"); + newXSproto(strcpy(buf, "IsCasting"), XS_Mob_IsCasting, file, "$"); + newXSproto(strcpy(buf, "CastingSpellID"), XS_Mob_CastingSpellID, file, "$"); + newXSproto(strcpy(buf, "SetAppearance"), XS_Mob_SetAppearance, file, "$$;$"); + newXSproto(strcpy(buf, "GetAppearance"), XS_Mob_GetAppearance, file, "$"); + newXSproto(strcpy(buf, "GetRunAnimSpeed"), XS_Mob_GetRunAnimSpeed, file, "$"); + newXSproto(strcpy(buf, "SetRunAnimSpeed"), XS_Mob_SetRunAnimSpeed, file, "$$"); + newXSproto(strcpy(buf, "SetPetID"), XS_Mob_SetPetID, file, "$$"); + newXSproto(strcpy(buf, "GetPetID"), XS_Mob_GetPetID, file, "$"); + newXSproto(strcpy(buf, "SetOwnerID"), XS_Mob_SetOwnerID, file, "$$"); + newXSproto(strcpy(buf, "GetOwnerID"), XS_Mob_GetOwnerID, file, "$"); + newXSproto(strcpy(buf, "GetPetType"), XS_Mob_GetPetType, file, "$"); + newXSproto(strcpy(buf, "GetBodyType"), XS_Mob_GetBodyType, file, "$"); + newXSproto(strcpy(buf, "Stun"), XS_Mob_Stun, file, "$$"); + newXSproto(strcpy(buf, "Spin"), XS_Mob_Spin, file, "$"); + newXSproto(strcpy(buf, "Kill"), XS_Mob_Kill, file, "$"); + newXSproto(strcpy(buf, "SetInvul"), XS_Mob_SetInvul, file, "$$"); + newXSproto(strcpy(buf, "GetInvul"), XS_Mob_GetInvul, file, "$"); + newXSproto(strcpy(buf, "SetExtraHaste"), XS_Mob_SetExtraHaste, file, "$$"); + newXSproto(strcpy(buf, "GetHaste"), XS_Mob_GetHaste, file, "$"); + newXSproto(strcpy(buf, "GetHandToHandDamage"), XS_Mob_GetHandToHandDamage, file, "$"); + newXSproto(strcpy(buf, "CanThisClassDoubleAttack"), XS_Mob_CanThisClassDoubleAttack, file, "$"); + newXSproto(strcpy(buf, "CanThisClassDualWield"), XS_Mob_CanThisClassDualWield, file, "$"); + newXSproto(strcpy(buf, "CanThisClassRiposte"), XS_Mob_CanThisClassRiposte, file, "$"); + newXSproto(strcpy(buf, "CanThisClassDodge"), XS_Mob_CanThisClassDodge, file, "$"); + newXSproto(strcpy(buf, "CanThisClassParry"), XS_Mob_CanThisClassParry, file, "$"); + newXSproto(strcpy(buf, "GetHandToHandDelay"), XS_Mob_GetHandToHandDelay, file, "$"); + newXSproto(strcpy(buf, "GetClassLevelFactor"), XS_Mob_GetClassLevelFactor, file, "$"); + newXSproto(strcpy(buf, "Mesmerize"), XS_Mob_Mesmerize, file, "$"); + newXSproto(strcpy(buf, "IsMezzed"), XS_Mob_IsMezzed, file, "$"); + newXSproto(strcpy(buf, "IsStunned"), XS_Mob_IsStunned, file, "$"); + newXSproto(strcpy(buf, "StartEnrage"), XS_Mob_StartEnrage, file, "$"); + newXSproto(strcpy(buf, "IsEnraged"), XS_Mob_IsEnraged, file, "$"); + newXSproto(strcpy(buf, "GetReverseFactionCon"), XS_Mob_GetReverseFactionCon, file, "$$"); + newXSproto(strcpy(buf, "IsAIControlled"), XS_Mob_IsAIControlled, file, "$"); + newXSproto(strcpy(buf, "GetAggroRange"), XS_Mob_GetAggroRange, file, "$"); + newXSproto(strcpy(buf, "GetAssistRange"), XS_Mob_GetAssistRange, file, "$"); + newXSproto(strcpy(buf, "SetPetOrder"), XS_Mob_SetPetOrder, file, "$$"); + newXSproto(strcpy(buf, "GetPetOrder"), XS_Mob_GetPetOrder, file, "$"); + newXSproto(strcpy(buf, "IsRoamer"), XS_Mob_IsRoamer, file, "$"); + newXSproto(strcpy(buf, "IsRooted"), XS_Mob_IsRooted, file, "$"); + newXSproto(strcpy(buf, "AddToHateList"), XS_Mob_AddToHateList, file, "$$;$$$$$"); + newXSproto(strcpy(buf, "SetHate"), XS_Mob_SetHate, file, "$$;$$"); + newXSproto(strcpy(buf, "HalveAggro"), XS_Mob_HalveAggro, file, "$$"); + newXSproto(strcpy(buf, "DoubleAggro"), XS_Mob_DoubleAggro, file, "$$"); + newXSproto(strcpy(buf, "GetHateAmount"), XS_Mob_GetHateAmount, file, "$$;$"); + newXSproto(strcpy(buf, "GetDamageAmount"), XS_Mob_GetDamageAmount, file, "$$"); + newXSproto(strcpy(buf, "GetHateTop"), XS_Mob_GetHateTop, file, "$"); + newXSproto(strcpy(buf, "GetHateDamageTop"), XS_Mob_GetHateDamageTop, file, "$$"); + newXSproto(strcpy(buf, "GetHateRandom"), XS_Mob_GetHateRandom, file, "$"); + newXSproto(strcpy(buf, "IsEngaged"), XS_Mob_IsEngaged, file, "$"); + newXSproto(strcpy(buf, "HateSummon"), XS_Mob_HateSummon, file, "$"); + newXSproto(strcpy(buf, "FaceTarget"), XS_Mob_FaceTarget, file, "$;$$"); + newXSproto(strcpy(buf, "SetHeading"), XS_Mob_SetHeading, file, "$$"); + newXSproto(strcpy(buf, "WipeHateList"), XS_Mob_WipeHateList, file, "$"); + newXSproto(strcpy(buf, "CheckAggro"), XS_Mob_CheckAggro, file, "$$"); + newXSproto(strcpy(buf, "CalculateHeadingToTarget"), XS_Mob_CalculateHeadingToTarget, file, "$$$"); + newXSproto(strcpy(buf, "CalculateNewPosition"), XS_Mob_CalculateNewPosition, file, "$$$$$;$"); + newXSproto(strcpy(buf, "CalculateDistance"), XS_Mob_CalculateDistance, file, "$$$$"); + newXSproto(strcpy(buf, "SendTo"), XS_Mob_SendTo, file, "$$$$"); + newXSproto(strcpy(buf, "SendToFixZ"), XS_Mob_SendToFixZ, file, "$$$$"); + newXSproto(strcpy(buf, "NPCSpecialAttacks"), XS_Mob_NPCSpecialAttacks, file, "$$$;$$"); + newXSproto(strcpy(buf, "DontHealMeBefore"), XS_Mob_DontHealMeBefore, file, "$"); + newXSproto(strcpy(buf, "DontBuffMeBefore"), XS_Mob_DontBuffMeBefore, file, "$"); + newXSproto(strcpy(buf, "DontDotMeBefore"), XS_Mob_DontDotMeBefore, file, "$"); + newXSproto(strcpy(buf, "DontRootMeBefore"), XS_Mob_DontRootMeBefore, file, "$"); + newXSproto(strcpy(buf, "DontSnareMeBefore"), XS_Mob_DontSnareMeBefore, file, "$"); + newXSproto(strcpy(buf, "GetResist"), XS_Mob_GetResist, file, "$$"); + newXSproto(strcpy(buf, "GetShieldTarget"), XS_Mob_GetShieldTarget, file, "$"); + newXSproto(strcpy(buf, "SetShieldTarget"), XS_Mob_SetShieldTarget, file, "$$"); + newXSproto(strcpy(buf, "Charmed"), XS_Mob_Charmed, file, "$"); + newXSproto(strcpy(buf, "GetLevelHP"), XS_Mob_GetLevelHP, file, "$$"); + newXSproto(strcpy(buf, "GetZoneID"), XS_Mob_GetZoneID, file, "$"); + newXSproto(strcpy(buf, "CheckAggroAmount"), XS_Mob_CheckAggroAmount, file, "$$"); + newXSproto(strcpy(buf, "CheckHealAggroAmount"), XS_Mob_CheckHealAggroAmount, file, "$$"); + newXSproto(strcpy(buf, "GetAA"), XS_Mob_GetAA, file, "$$"); + newXSproto(strcpy(buf, "GetAAByAAID"), XS_Mob_GetAAByAAID, file, "$$"); + newXSproto(strcpy(buf, "SetAA"), XS_Mob_SetAA, file, "$$$;$"); + newXSproto(strcpy(buf, "DivineAura"), XS_Mob_DivineAura, file, "$"); + newXSproto(strcpy(buf, "AddFeignMemory"), XS_Mob_AddFeignMemory, file, "$$"); + newXSproto(strcpy(buf, "RemoveFromFeignMemory"), XS_Mob_RemoveFromFeignMemory, file, "$$"); + newXSproto(strcpy(buf, "ClearFeignMemory"), XS_Mob_ClearFeignMemory, file, "$"); + newXSproto(strcpy(buf, "SetOOCRegen"), XS_Mob_SetOOCRegen, file, "$$"); + newXSproto(strcpy(buf, "GetEntityVariable"), XS_Mob_GetEntityVariable, file, "$$"); + newXSproto(strcpy(buf, "SetEntityVariable"), XS_Mob_SetEntityVariable, file, "$$$"); + newXSproto(strcpy(buf, "EntityVariableExists"), XS_Mob_EntityVariableExists, file, "$$"); + newXSproto(strcpy(buf, "GetHateList"), XS_Mob_GetHateList, file, "$"); + newXSproto(strcpy(buf, "SignalClient"), XS_Mob_SignalClient, file, "$$$"); + newXSproto(strcpy(buf, "CombatRange"), XS_Mob_CombatRange, file, "$$"); + newXSproto(strcpy(buf, "DoSpecialAttackDamage"), XS_Mob_DoSpecialAttackDamage, file, "$$$$;$$"); + newXSproto(strcpy(buf, "CheckLoS"), XS_Mob_CheckLoS, file, "$$"); + newXSproto(strcpy(buf, "CheckLoSToLoc"), XS_Mob_CheckLoSToLoc, file, "$$$$;$"); + newXSproto(strcpy(buf, "FindGroundZ"), XS_Mob_FindGroundZ, file, "$$$;$"); + newXSproto(strcpy(buf, "ProjectileAnim"), XS_Mob_ProjectileAnim, file, "$$$;$$$$$$"); + newXSproto(strcpy(buf, "HasNPCSpecialAtk"), XS_Mob_HasNPCSpecialAtk, file, "$$"); + newXSproto(strcpy(buf, "SendAppearanceEffect"), XS_Mob_SendAppearanceEffect, file, "$$;$$$$"); + newXSproto(strcpy(buf, "SetFlyMode"), XS_Mob_SetFlyMode, file, "$$"); + newXSproto(strcpy(buf, "SetTexture"), XS_Mob_SetTexture, file, "$$"); + newXSproto(strcpy(buf, "SetRace"), XS_Mob_SetRace, file, "$$"); + newXSproto(strcpy(buf, "SetGender"), XS_Mob_SetGender, file, "$$"); + newXSproto(strcpy(buf, "SendIllusion"), XS_Mob_SendIllusion, file, "$$;$$$$$$$$$$$$"); + newXSproto(strcpy(buf, "MakeTempPet"), XS_Mob_MakeTempPet, file, "$$;$$$$"); + newXSproto(strcpy(buf, "TypesTempPet"), XS_Mob_TypesTempPet, file, "$$;$$$$$"); + newXSproto(strcpy(buf, "CameraEffect"), XS_Mob_CameraEffect, file, "$$;$$$"); + newXSproto(strcpy(buf, "SpellEffect"), XS_Mob_SpellEffect, file, "$$;$$$$$$"); + newXSproto(strcpy(buf, "TempName"), XS_Mob_TempName, file, "$:$"); + newXSproto(strcpy(buf, "GetItemStat"), XS_Mob_GetItemStat, file, "$$$"); + newXSproto(strcpy(buf, "GetGlobal"), XS_Mob_GetGlobal, file, "$$"); + newXSproto(strcpy(buf, "SetGlobal"), XS_Mob_SetGlobal, file, "$$$$$;$"); + newXSproto(strcpy(buf, "TarGlobal"), XS_Mob_TarGlobal, file, "$$$$$$$"); + newXSproto(strcpy(buf, "DelGlobal"), XS_Mob_DelGlobal, file, "$$"); + newXSproto(strcpy(buf, "SetSlotTint"), XS_Mob_SetSlotTint, file, "$$$$$"); + newXSproto(strcpy(buf, "WearChange"), XS_Mob_WearChange, file, "$$$;$$"); + newXSproto(strcpy(buf, "DoKnockback"), XS_Mob_DoKnockback, file, "$$$$"); + newXSproto(strcpy(buf, "RemoveNimbusEffect"), XS_Mob_RemoveNimbusEffect, file, "$$"); + newXSproto(strcpy(buf, "IsRunning"), XS_Mob_IsRunning, file, "$"); + newXSproto(strcpy(buf, "SetRunning"), XS_Mob_SetRunning, file, "$$"); + newXSproto(strcpy(buf, "SetBodyType"), XS_Mob_SetBodyType, file, "$$;$"); + newXSproto(strcpy(buf, "SetDeltas"), XS_Mob_SetDeltas, file, "$$$$$"); + newXSproto(strcpy(buf, "SetLD"), XS_Mob_SetLD, file, "$$"); + newXSproto(strcpy(buf, "SetTargetDestSteps"), XS_Mob_SetTargetDestSteps, file, "$$"); + newXSproto(strcpy(buf, "SetTargetable"), XS_Mob_SetTargetable, file, "$$"); + newXSproto(strcpy(buf, "MakeTempPet"), XS_Mob_MakeTempPet, file, "$$;$$$$"); + newXSproto(strcpy(buf, "ModSkillDmgTaken"), XS_Mob_ModSkillDmgTaken, file, "$$$"); + newXSproto(strcpy(buf, "GetModSkillDmgTaken"), XS_Mob_GetModSkillDmgTaken, file, "$$"); + newXSproto(strcpy(buf, "GetSkillDmgTaken"), XS_Mob_GetSkillDmgTaken, file, "$$"); + newXSproto(strcpy(buf, "SetAllowBeneficial"), XS_Mob_SetAllowBeneficial, file, "$$"); + newXSproto(strcpy(buf, "GetAllowBeneficial"), XS_Mob_GetAllowBeneficial, file, "$$"); + newXSproto(strcpy(buf, "IsBeneficialAllowed"), XS_Mob_IsBeneficialAllowed, file, "$$"); + newXSproto(strcpy(buf, "ModVulnerability"), XS_Mob_ModVulnerability, file, "$$$"); + newXSproto(strcpy(buf, "GetModVulnerability"), XS_Mob_GetModVulnerability, file, "$$"); + newXSproto(strcpy(buf, "DoMeleeSkillAttackDmg"), XS_Mob_DoMeleeSkillAttackDmg, file, "$$$$$$$"); + newXSproto(strcpy(buf, "DoArcheryAttackDmg"), XS_Mob_DoArcheryAttackDmg, file, "$$$$$$$"); + newXSproto(strcpy(buf, "DoThrowingAttackDmg"), XS_Mob_DoThrowingAttackDmg, file, "$$$$$$$"); + newXSproto(strcpy(buf, "SetDisableMelee"), XS_Mob_SetDisableMelee, file, "$$"); + newXSproto(strcpy(buf, "IsMeleeDisabled"), XS_Mob_IsMeleeDisabled, file, "$"); + newXSproto(strcpy(buf, "SetFlurryChance"), XS_Mob_SetFlurryChance, file, "$$"); + newXSproto(strcpy(buf, "GetFlurryChance"), XS_Mob_GetFlurryChance, file, "$"); + newXSproto(strcpy(buf, "GetSpellStat"), XS_Mob_GetSpellStat, file, "$$$$"); + newXSproto(strcpy(buf, "GetSpecialAbility"), XS_Mob_GetSpecialAbility, file, "$$"); + newXSproto(strcpy(buf, "GetSpecialAbilityParam"), XS_Mob_GetSpecialAbilityParam, file, "$$$"); + newXSproto(strcpy(buf, "SetSpecialAbility"), XS_Mob_SetSpecialAbility, file, "$$$"); + newXSproto(strcpy(buf, "SetSpecialAbilityParam"), XS_Mob_SetSpecialAbilityParam, file, "$$$$"); + newXSproto(strcpy(buf, "ClearSpecialAbilities"), XS_Mob_ClearSpecialAbilities, file, "$"); + newXSproto(strcpy(buf, "ProcessSpecialAbilities"), XS_Mob_ProcessSpecialAbilities, file, "$$"); + newXSproto(strcpy(buf, "CanClassEquipItem"), XS_Mob_CanClassEquipItem, file, "$$"); + newXSproto(strcpy(buf, "IsFeared"), XS_Mob_IsFeared, file, "$"); + newXSproto(strcpy(buf, "IsBlind"), XS_Mob_IsBlind, file, "$"); + newXSproto(strcpy(buf, "SeeInvisible"), XS_Mob_SeeInvisible, file, "$"); + newXSproto(strcpy(buf, "SeeInvisibleUndead"), XS_Mob_SeeInvisibleUndead, file, "$"); + newXSproto(strcpy(buf, "SeeHide"), XS_Mob_SeeHide, file, "$"); + newXSproto(strcpy(buf, "SeeImprovedHide"), XS_Mob_SeeImprovedHide, file, "$"); + newXSproto(strcpy(buf, "GetNimbusEffect1"), XS_Mob_GetNimbusEffect1, file, "$"); + newXSproto(strcpy(buf, "GetNimbusEffect2"), XS_Mob_GetNimbusEffect2, file, "$"); + newXSproto(strcpy(buf, "GetNimbusEffect3"), XS_Mob_GetNimbusEffect3, file, "$"); + newXSproto(strcpy(buf, "IsTargetable"), XS_Mob_IsTargetable, file, "$"); + newXSproto(strcpy(buf, "HasShieldEquiped"), XS_Mob_HasShieldEquiped, file, "$"); + newXSproto(strcpy(buf, "HasTwoHandBluntEquiped"), XS_Mob_HasTwoHandBluntEquiped, file, "$"); + newXSproto(strcpy(buf, "HasTwoHanderEquipped"), XS_Mob_HasTwoHanderEquipped, file, "$"); + newXSproto(strcpy(buf, "GetHerosForgeModel"), XS_Mob_GetHerosForgeModel, file, "$$"); + newXSproto(strcpy(buf, "IsEliteMaterialItem"), XS_Mob_IsEliteMaterialItem, file, "$$"); + newXSproto(strcpy(buf, "GetBaseSize"), XS_Mob_GetBaseSize, file, "$"); + newXSproto(strcpy(buf, "HasOwner"), XS_Mob_HasOwner, file, "$"); + newXSproto(strcpy(buf, "IsPet"), XS_Mob_IsPet, file, "$"); + newXSproto(strcpy(buf, "HasPet"), XS_Mob_HasPet, file, "$"); + newXSproto(strcpy(buf, "IsSilenced"), XS_Mob_IsSilenced, file, "$"); + newXSproto(strcpy(buf, "IsAmnesiad"), XS_Mob_IsAmnesiad, file, "$"); + newXSproto(strcpy(buf, "GetMeleeMitigation"), XS_Mob_GetMeleeMitigation, file, "$"); + newXSproto(strcpy(buf, "TryMoveAlong"), XS_Mob_TryMoveAlong, file, "$$$;$"); XSRETURN_YES; } From 332a3d6c6a5e13d92c27796fa2fdbabf7fcadb9b Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 19:30:52 -0500 Subject: [PATCH 231/670] Add "mob" to perl-doc-parser.pl --- utils/scripts/perl-doc-parser.pl | 37 +++++++++++++++++++++++++++++--- zone/perl_mob.cpp | 2 +- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/utils/scripts/perl-doc-parser.pl b/utils/scripts/perl-doc-parser.pl index e64ea85d6..1a3f20d6f 100755 --- a/utils/scripts/perl-doc-parser.pl +++ b/utils/scripts/perl-doc-parser.pl @@ -1,6 +1,21 @@ use File::Find; use Data::Dumper; +sub usage() { + print "Usage:\n"; + print " --client - Prints methods for just client class methods\n"; + print " --mob - Prints methods for just mob class methods\n"; + print " --all - Prints methods for all classes\n"; + exit(1); +} + +if($#ARGV < 0) { + usage(); +} + +my $export = $ARGV[0]; +$export=~s/--//g; + my @files; my $start_dir = "zone/"; find( @@ -14,6 +29,13 @@ for my $file (@files) { next; } + #::: If we are specifying a specific class type, skip everything else + if ($export ne "all" && $export ne "") { + if ($file!~/$export/i) { + next; + } + } + @methods = (); #::: Open File @@ -23,10 +45,19 @@ for my $file (@files) { chomp; $line = $_; - if ($line=~/Client::/i) { + if ($line=~/Client::|Mob::/i && $line=~/_croak/i) { - $split_key = "Client::"; - $object_prefix = "\$client->"; + #::: Client export + if ($export=~/all|client/i) { + $split_key = "Client::"; + $object_prefix = "\$client->"; + } + + #::: Mob export + if ($export=~/all|mob/i) { + $split_key = "Mob::"; + $object_prefix = "\$mob->"; + } #::: Split on croak usage @data = split($split_key, $line); diff --git a/zone/perl_mob.cpp b/zone/perl_mob.cpp index c295da59c..0a6275169 100644 --- a/zone/perl_mob.cpp +++ b/zone/perl_mob.cpp @@ -7183,7 +7183,7 @@ XS(XS_Mob_IsRunning); /* prototype to pass -Wmissing-prototypes */ XS(XS_Mob_IsRunning) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: Mob:::IsRunning(THIS)"); + Perl_croak(aTHX_ "Usage: Mob::IsRunning(THIS)"); { Mob *THIS; bool RETVAL; From 2010d1ba83033e89441acd71195cc57158f1848d Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 19:36:35 -0500 Subject: [PATCH 232/670] Update usage docs for perl_player_corpse --- zone/perl_player_corpse.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/zone/perl_player_corpse.cpp b/zone/perl_player_corpse.cpp index a417284c8..c16a05d57 100644 --- a/zone/perl_player_corpse.cpp +++ b/zone/perl_player_corpse.cpp @@ -245,7 +245,7 @@ XS(XS_Corpse_SetDecayTimer) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Corpse::SetDecayTimer(THIS, decaytime)"); + Perl_croak(aTHX_ "Usage: Corpse::SetDecayTimer(THIS, uint32 decay_time)"); { Corpse * THIS; uint32 decaytime = (uint32)SvUV(ST(1)); @@ -295,7 +295,7 @@ XS(XS_Corpse_AddItem) { dXSARGS; if (items < 3 || items > 4) - Perl_croak(aTHX_ "Usage: Corpse::AddItem(THIS, itemnum, charges, slot= 0)"); + Perl_croak(aTHX_ "Usage: Corpse::AddItem(THIS, uint32 item_id, uint16 charges, [unt16 slot = 0])"); { Corpse * THIS; uint32 itemnum = (uint32)SvUV(ST(1)); @@ -354,7 +354,7 @@ XS(XS_Corpse_RemoveItem) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Corpse::RemoveItem(THIS, lootslot)"); + Perl_croak(aTHX_ "Usage: Corpse::RemoveItem(THIS, uint16 loot_slot)"); { Corpse * THIS; uint16 lootslot = (uint16)SvUV(ST(1)); @@ -378,7 +378,7 @@ XS(XS_Corpse_SetCash) { dXSARGS; if (items != 5) - Perl_croak(aTHX_ "Usage: Corpse::SetCash(THIS, in_copper, in_silver, in_gold, in_platinum)"); + Perl_croak(aTHX_ "Usage: Corpse::SetCash(THIS, uint16 copper, uint16 silver, uint16 gold, uint16 platinum)"); { Corpse * THIS; uint16 in_copper = (uint16)SvUV(ST(1)); @@ -581,7 +581,7 @@ XS(XS_Corpse_Summon) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Corpse::Summon(THIS, client, spell)"); + Perl_croak(aTHX_ "Usage: Corpse::Summon(THIS, Client* client, bool is_spell)"); { Corpse * THIS; Client* client; @@ -615,7 +615,7 @@ XS(XS_Corpse_CastRezz) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Corpse::CastRezz(THIS, spellid, Caster)"); + Perl_croak(aTHX_ "Usage: Corpse::CastRezz(THIS, uint16 spell_id, [Mob* caster = nullptr])"); { Corpse * THIS; uint16 spellid = (uint16)SvUV(ST(1)); @@ -672,7 +672,7 @@ XS(XS_Corpse_CanMobLoot) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Corpse::CanMobLoot(THIS, charid)"); + Perl_croak(aTHX_ "Usage: Corpse::CanMobLoot(THIS, int character_id)"); { Corpse * THIS; bool RETVAL; @@ -699,7 +699,7 @@ XS(XS_Corpse_AllowMobLoot) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Corpse::AllowMobLoot(THIS, them, slot)"); + Perl_croak(aTHX_ "Usage: Corpse::AllowMobLoot(THIS, Mob* them, uint8 slot)"); { Corpse * THIS; Mob * them; @@ -733,7 +733,7 @@ XS(XS_Corpse_AddLooter) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Corpse::AddLooter(THIS, who)"); + Perl_croak(aTHX_ "Usage: Corpse::AddLooter(THIS, Mob* who)"); { Corpse * THIS; Mob * who; From 88ed2e64bbc500f0d9effb2bfc23c7e232c01225 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 19:36:47 -0500 Subject: [PATCH 233/670] perl_player_corpse.cpp formatting --- zone/perl_player_corpse.cpp | 592 +++++++++++++++++------------------- 1 file changed, 272 insertions(+), 320 deletions(-) diff --git a/zone/perl_player_corpse.cpp b/zone/perl_player_corpse.cpp index c16a05d57..69be0f48c 100644 --- a/zone/perl_player_corpse.cpp +++ b/zone/perl_player_corpse.cpp @@ -26,7 +26,9 @@ */ #include "../common/features.h" + #ifdef EMBPERL_XS_CLASSES + #include "../common/global_define.h" #include "embperl.h" @@ -42,73 +44,69 @@ XS(XS_Corpse_GetCharID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_GetCharID) -{ +XS(XS_Corpse_GetCharID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Corpse::GetCharID(THIS)"); { - Corpse * THIS; - uint32 RETVAL; + Corpse *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetCharID(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Corpse_GetDecayTime); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_GetDecayTime) -{ +XS(XS_Corpse_GetDecayTime) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Corpse::GetDecayTime(THIS)"); { - Corpse * THIS; - uint32 RETVAL; + Corpse *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetDecayTime(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Corpse_Lock); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_Lock) -{ +XS(XS_Corpse_Lock) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Corpse::Lock(THIS)"); { - Corpse * THIS; + Corpse *THIS; if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->Lock(); @@ -117,21 +115,19 @@ XS(XS_Corpse_Lock) } XS(XS_Corpse_UnLock); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_UnLock) -{ +XS(XS_Corpse_UnLock) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Corpse::UnLock(THIS)"); { - Corpse * THIS; + Corpse *THIS; if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->UnLock(); @@ -140,22 +136,20 @@ XS(XS_Corpse_UnLock) } XS(XS_Corpse_IsLocked); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_IsLocked) -{ +XS(XS_Corpse_IsLocked) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Corpse::IsLocked(THIS)"); { - Corpse * THIS; - bool RETVAL; + Corpse *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsLocked(); @@ -166,21 +160,19 @@ XS(XS_Corpse_IsLocked) } XS(XS_Corpse_ResetLooter); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_ResetLooter) -{ +XS(XS_Corpse_ResetLooter) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Corpse::ResetLooter(THIS)"); { - Corpse * THIS; + Corpse *THIS; if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->ResetLooter(); @@ -189,74 +181,71 @@ XS(XS_Corpse_ResetLooter) } XS(XS_Corpse_GetDBID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_GetDBID) -{ +XS(XS_Corpse_GetDBID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Corpse::GetDBID(THIS)"); { - Corpse * THIS; - uint32 RETVAL; + Corpse *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetCorpseDBID(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Corpse_GetOwnerName); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_GetOwnerName) -{ +XS(XS_Corpse_GetOwnerName) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Corpse::GetOwnerName(THIS)"); { - Corpse * THIS; - char * RETVAL; + Corpse *THIS; + char *RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetOwnerName(); - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; + sv_setpv(TARG, RETVAL); + XSprePUSH; + PUSHTARG; } XSRETURN(1); } XS(XS_Corpse_SetDecayTimer); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_SetDecayTimer) -{ +XS(XS_Corpse_SetDecayTimer) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Corpse::SetDecayTimer(THIS, uint32 decay_time)"); { - Corpse * THIS; - uint32 decaytime = (uint32)SvUV(ST(1)); + Corpse *THIS; + uint32 decaytime = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetDecayTimer(decaytime); @@ -265,22 +254,20 @@ XS(XS_Corpse_SetDecayTimer) } XS(XS_Corpse_IsEmpty); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_IsEmpty) -{ +XS(XS_Corpse_IsEmpty) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Corpse::IsEmpty(THIS)"); { - Corpse * THIS; - bool RETVAL; + Corpse *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsEmpty(); @@ -291,30 +278,28 @@ XS(XS_Corpse_IsEmpty) } XS(XS_Corpse_AddItem); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_AddItem) -{ +XS(XS_Corpse_AddItem) { dXSARGS; if (items < 3 || items > 4) Perl_croak(aTHX_ "Usage: Corpse::AddItem(THIS, uint32 item_id, uint16 charges, [unt16 slot = 0])"); { - Corpse * THIS; - uint32 itemnum = (uint32)SvUV(ST(1)); - uint16 charges = (uint16)SvUV(ST(2)); - int16 slot; + Corpse *THIS; + uint32 itemnum = (uint32) SvUV(ST(1)); + uint16 charges = (uint16) SvUV(ST(2)); + int16 slot; if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 4) slot = 0; else { - slot = (int16)SvIV(ST(3)); + slot = (int16) SvIV(ST(3)); } THIS->AddItem(itemnum, charges, slot); @@ -323,49 +308,46 @@ XS(XS_Corpse_AddItem) } XS(XS_Corpse_GetWornItem); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_GetWornItem) -{ +XS(XS_Corpse_GetWornItem) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Corpse::GetWornItem(THIS, equipSlot)"); { - Corpse * THIS; - uint32 RETVAL; + Corpse *THIS; + uint32 RETVAL; dXSTARG; - int16 equipSlot = (int16)SvIV(ST(1)); + int16 equipSlot = (int16) SvIV(ST(1)); if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetWornItem(equipSlot); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Corpse_RemoveItem); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_RemoveItem) -{ +XS(XS_Corpse_RemoveItem) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Corpse::RemoveItem(THIS, uint16 loot_slot)"); { - Corpse * THIS; - uint16 lootslot = (uint16)SvUV(ST(1)); + Corpse *THIS; + uint16 lootslot = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->RemoveItem(lootslot); @@ -374,25 +356,23 @@ XS(XS_Corpse_RemoveItem) } XS(XS_Corpse_SetCash); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_SetCash) -{ +XS(XS_Corpse_SetCash) { dXSARGS; if (items != 5) Perl_croak(aTHX_ "Usage: Corpse::SetCash(THIS, uint16 copper, uint16 silver, uint16 gold, uint16 platinum)"); { - Corpse * THIS; - uint16 in_copper = (uint16)SvUV(ST(1)); - uint16 in_silver = (uint16)SvUV(ST(2)); - uint16 in_gold = (uint16)SvUV(ST(3)); - uint16 in_platinum = (uint16)SvUV(ST(4)); + Corpse *THIS; + uint16 in_copper = (uint16) SvUV(ST(1)); + uint16 in_silver = (uint16) SvUV(ST(2)); + uint16 in_gold = (uint16) SvUV(ST(3)); + uint16 in_platinum = (uint16) SvUV(ST(4)); if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetCash(in_copper, in_silver, in_gold, in_platinum); @@ -401,21 +381,19 @@ XS(XS_Corpse_SetCash) } XS(XS_Corpse_RemoveCash); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_RemoveCash) -{ +XS(XS_Corpse_RemoveCash) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Corpse::RemoveCash(THIS)"); { - Corpse * THIS; + Corpse *THIS; if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->RemoveCash(); @@ -424,47 +402,44 @@ XS(XS_Corpse_RemoveCash) } XS(XS_Corpse_CountItems); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_CountItems) -{ +XS(XS_Corpse_CountItems) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Corpse::CountItems(THIS)"); { - Corpse * THIS; - uint32 RETVAL; + Corpse *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->CountItems(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Corpse_Delete); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_Delete) -{ +XS(XS_Corpse_Delete) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Corpse::Delete(THIS)"); { - Corpse * THIS; + Corpse *THIS; if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->Delete(); @@ -473,136 +448,129 @@ XS(XS_Corpse_Delete) } XS(XS_Corpse_GetCopper); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_GetCopper) -{ +XS(XS_Corpse_GetCopper) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Corpse::GetCopper(THIS)"); { - Corpse * THIS; - uint32 RETVAL; + Corpse *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetCopper(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Corpse_GetSilver); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_GetSilver) -{ +XS(XS_Corpse_GetSilver) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Corpse::GetSilver(THIS)"); { - Corpse * THIS; - uint32 RETVAL; + Corpse *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSilver(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Corpse_GetGold); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_GetGold) -{ +XS(XS_Corpse_GetGold) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Corpse::GetGold(THIS)"); { - Corpse * THIS; - uint32 RETVAL; + Corpse *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetGold(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Corpse_GetPlatinum); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_GetPlatinum) -{ +XS(XS_Corpse_GetPlatinum) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Corpse::GetPlatinum(THIS)"); { - Corpse * THIS; - uint32 RETVAL; + Corpse *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetPlatinum(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Corpse_Summon); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_Summon) -{ +XS(XS_Corpse_Summon) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Corpse::Summon(THIS, Client* client, bool is_spell)"); { - Corpse * THIS; - Client* client; - bool spell = (bool)SvTRUE(ST(2)); + Corpse *THIS; + Client *client; + bool spell = (bool) SvTRUE(ST(2)); if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - client = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + client = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "client is not of type Client"); - if(client == nullptr) + if (client == nullptr) Perl_croak(aTHX_ "client is nullptr, avoiding crash."); THIS->Summon(client, spell, true); @@ -611,32 +579,29 @@ XS(XS_Corpse_Summon) } XS(XS_Corpse_CastRezz); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_CastRezz) -{ +XS(XS_Corpse_CastRezz) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Corpse::CastRezz(THIS, uint16 spell_id, [Mob* caster = nullptr])"); { - Corpse * THIS; - uint16 spellid = (uint16)SvUV(ST(1)); - Mob* Caster; + Corpse *THIS; + uint16 spellid = (uint16) SvUV(ST(1)); + Mob *Caster; if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(2), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(2))); - Caster = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(2))); + Caster = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "Caster is not of type Mob"); - if(Caster == nullptr) + if (Caster == nullptr) Perl_croak(aTHX_ "Caster is nullptr, avoiding crash."); THIS->CastRezz(spellid, Caster); @@ -645,21 +610,19 @@ XS(XS_Corpse_CastRezz) } XS(XS_Corpse_CompleteRezz); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_CompleteRezz) -{ +XS(XS_Corpse_CompleteRezz) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Corpse::CompleteRezz(THIS)"); { - Corpse * THIS; + Corpse *THIS; if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->CompleteResurrection(); @@ -668,59 +631,54 @@ XS(XS_Corpse_CompleteRezz) } XS(XS_Corpse_CanMobLoot); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_CanMobLoot) -{ +XS(XS_Corpse_CanMobLoot) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Corpse::CanMobLoot(THIS, int character_id)"); { - Corpse * THIS; - bool RETVAL; - int charid = (int)SvIV(ST(1)); + Corpse *THIS; + bool RETVAL; + int charid = (int) SvIV(ST(1)); if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->CanPlayerLoot(charid); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Corpse_AllowMobLoot); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_AllowMobLoot) -{ +XS(XS_Corpse_AllowMobLoot) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Corpse::AllowMobLoot(THIS, Mob* them, uint8 slot)"); { - Corpse * THIS; - Mob * them; - uint8 slot = (uint8)SvUV(ST(2)); + Corpse *THIS; + Mob *them; + uint8 slot = (uint8) SvUV(ST(2)); if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - them = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + them = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "them is not of type Mob"); - if(them == nullptr) + if (them == nullptr) Perl_croak(aTHX_ "them is nullptr, avoiding crash."); THIS->AllowPlayerLoot(them, slot); @@ -729,31 +687,28 @@ XS(XS_Corpse_AllowMobLoot) } XS(XS_Corpse_AddLooter); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_AddLooter) -{ +XS(XS_Corpse_AddLooter) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Corpse::AddLooter(THIS, Mob* who)"); { - Corpse * THIS; - Mob * who; + Corpse *THIS; + Mob *who; if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - who = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + who = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "who is not of type Mob"); - if(who == nullptr) + if (who == nullptr) Perl_croak(aTHX_ "who is nullptr, avoiding crash."); THIS->AddLooter(who); @@ -762,22 +717,20 @@ XS(XS_Corpse_AddLooter) } XS(XS_Corpse_IsRezzed); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Corpse_IsRezzed) -{ +XS(XS_Corpse_IsRezzed) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Corpse::IsRezzed(THIS)"); { - Corpse * THIS; - bool RETVAL; + Corpse *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Corpse")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Corpse *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Corpse *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Corpse"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsRezzed(); @@ -791,49 +744,48 @@ XS(XS_Corpse_IsRezzed) extern "C" #endif XS(boot_Corpse); /* prototype to pass -Wmissing-prototypes */ -XS(boot_Corpse) -{ +XS(boot_Corpse) { dXSARGS; char file[256]; strncpy(file, __FILE__, 256); file[255] = 0; - if(items != 1) + if (items != 1) fprintf(stderr, "boot_quest does not take any arguments."); char buf[128]; //add the strcpy stuff to get rid of const warnings.... - XS_VERSION_BOOTCHECK ; + XS_VERSION_BOOTCHECK; - newXSproto(strcpy(buf, "GetCharID"), XS_Corpse_GetCharID, file, "$"); - newXSproto(strcpy(buf, "GetDecayTime"), XS_Corpse_GetDecayTime, file, "$"); - newXSproto(strcpy(buf, "Lock"), XS_Corpse_Lock, file, "$"); - newXSproto(strcpy(buf, "UnLock"), XS_Corpse_UnLock, file, "$"); - newXSproto(strcpy(buf, "IsLocked"), XS_Corpse_IsLocked, file, "$"); - newXSproto(strcpy(buf, "ResetLooter"), XS_Corpse_ResetLooter, file, "$"); - newXSproto(strcpy(buf, "GetDBID"), XS_Corpse_GetDBID, file, "$"); - newXSproto(strcpy(buf, "GetOwnerName"), XS_Corpse_GetOwnerName, file, "$"); - newXSproto(strcpy(buf, "SetDecayTimer"), XS_Corpse_SetDecayTimer, file, "$$"); - newXSproto(strcpy(buf, "IsEmpty"), XS_Corpse_IsEmpty, file, "$"); - newXSproto(strcpy(buf, "AddItem"), XS_Corpse_AddItem, file, "$$$;$"); - newXSproto(strcpy(buf, "GetWornItem"), XS_Corpse_GetWornItem, file, "$$"); - newXSproto(strcpy(buf, "RemoveItem"), XS_Corpse_RemoveItem, file, "$$"); - newXSproto(strcpy(buf, "SetCash"), XS_Corpse_SetCash, file, "$$$$$"); - newXSproto(strcpy(buf, "RemoveCash"), XS_Corpse_RemoveCash, file, "$"); - newXSproto(strcpy(buf, "CountItems"), XS_Corpse_CountItems, file, "$"); - newXSproto(strcpy(buf, "Delete"), XS_Corpse_Delete, file, "$"); - newXSproto(strcpy(buf, "GetCopper"), XS_Corpse_GetCopper, file, "$"); - newXSproto(strcpy(buf, "GetSilver"), XS_Corpse_GetSilver, file, "$"); - newXSproto(strcpy(buf, "GetGold"), XS_Corpse_GetGold, file, "$"); - newXSproto(strcpy(buf, "GetPlatinum"), XS_Corpse_GetPlatinum, file, "$"); - newXSproto(strcpy(buf, "Summon"), XS_Corpse_Summon, file, "$$$"); - newXSproto(strcpy(buf, "CastRezz"), XS_Corpse_CastRezz, file, "$$$"); - newXSproto(strcpy(buf, "CompleteRezz"), XS_Corpse_CompleteRezz, file, "$"); - newXSproto(strcpy(buf, "CanMobLoot"), XS_Corpse_CanMobLoot, file, "$$"); - newXSproto(strcpy(buf, "AllowMobLoot"), XS_Corpse_AllowMobLoot, file, "$$$"); - newXSproto(strcpy(buf, "AddLooter"), XS_Corpse_AddLooter, file, "$$"); - newXSproto(strcpy(buf, "IsRezzed"), XS_Corpse_IsRezzed, file, "$"); + newXSproto(strcpy(buf, "GetCharID"), XS_Corpse_GetCharID, file, "$"); + newXSproto(strcpy(buf, "GetDecayTime"), XS_Corpse_GetDecayTime, file, "$"); + newXSproto(strcpy(buf, "Lock"), XS_Corpse_Lock, file, "$"); + newXSproto(strcpy(buf, "UnLock"), XS_Corpse_UnLock, file, "$"); + newXSproto(strcpy(buf, "IsLocked"), XS_Corpse_IsLocked, file, "$"); + newXSproto(strcpy(buf, "ResetLooter"), XS_Corpse_ResetLooter, file, "$"); + newXSproto(strcpy(buf, "GetDBID"), XS_Corpse_GetDBID, file, "$"); + newXSproto(strcpy(buf, "GetOwnerName"), XS_Corpse_GetOwnerName, file, "$"); + newXSproto(strcpy(buf, "SetDecayTimer"), XS_Corpse_SetDecayTimer, file, "$$"); + newXSproto(strcpy(buf, "IsEmpty"), XS_Corpse_IsEmpty, file, "$"); + newXSproto(strcpy(buf, "AddItem"), XS_Corpse_AddItem, file, "$$$;$"); + newXSproto(strcpy(buf, "GetWornItem"), XS_Corpse_GetWornItem, file, "$$"); + newXSproto(strcpy(buf, "RemoveItem"), XS_Corpse_RemoveItem, file, "$$"); + newXSproto(strcpy(buf, "SetCash"), XS_Corpse_SetCash, file, "$$$$$"); + newXSproto(strcpy(buf, "RemoveCash"), XS_Corpse_RemoveCash, file, "$"); + newXSproto(strcpy(buf, "CountItems"), XS_Corpse_CountItems, file, "$"); + newXSproto(strcpy(buf, "Delete"), XS_Corpse_Delete, file, "$"); + newXSproto(strcpy(buf, "GetCopper"), XS_Corpse_GetCopper, file, "$"); + newXSproto(strcpy(buf, "GetSilver"), XS_Corpse_GetSilver, file, "$"); + newXSproto(strcpy(buf, "GetGold"), XS_Corpse_GetGold, file, "$"); + newXSproto(strcpy(buf, "GetPlatinum"), XS_Corpse_GetPlatinum, file, "$"); + newXSproto(strcpy(buf, "Summon"), XS_Corpse_Summon, file, "$$$"); + newXSproto(strcpy(buf, "CastRezz"), XS_Corpse_CastRezz, file, "$$$"); + newXSproto(strcpy(buf, "CompleteRezz"), XS_Corpse_CompleteRezz, file, "$"); + newXSproto(strcpy(buf, "CanMobLoot"), XS_Corpse_CanMobLoot, file, "$$"); + newXSproto(strcpy(buf, "AllowMobLoot"), XS_Corpse_AllowMobLoot, file, "$$$"); + newXSproto(strcpy(buf, "AddLooter"), XS_Corpse_AddLooter, file, "$$"); + newXSproto(strcpy(buf, "IsRezzed"), XS_Corpse_IsRezzed, file, "$"); XSRETURN_YES; } From b87e355db3009ef14845a63f4dfc034967dee96e Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 19:36:57 -0500 Subject: [PATCH 234/670] Add corpse to perl-doc-parser.pl --- utils/scripts/perl-doc-parser.pl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/utils/scripts/perl-doc-parser.pl b/utils/scripts/perl-doc-parser.pl index 1a3f20d6f..d54e39ebc 100755 --- a/utils/scripts/perl-doc-parser.pl +++ b/utils/scripts/perl-doc-parser.pl @@ -5,6 +5,7 @@ sub usage() { print "Usage:\n"; print " --client - Prints methods for just client class methods\n"; print " --mob - Prints methods for just mob class methods\n"; + print " --corpse - Prints methods for just corpse class methods\n"; print " --all - Prints methods for all classes\n"; exit(1); } @@ -45,7 +46,7 @@ for my $file (@files) { chomp; $line = $_; - if ($line=~/Client::|Mob::/i && $line=~/_croak/i) { + if ($line=~/Client::|Mob::|Corpse::/i && $line=~/_croak/i) { #::: Client export if ($export=~/all|client/i) { @@ -59,6 +60,12 @@ for my $file (@files) { $object_prefix = "\$mob->"; } + #::: Corpse export + if ($export=~/all|corpse/i) { + $split_key = "Corpse::"; + $object_prefix = "\$corpse->"; + } + #::: Split on croak usage @data = split($split_key, $line); $usage = trim($data[1]); From 979e54daa75df917f6d6b79a57504f1528ae02f6 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 19:49:21 -0500 Subject: [PATCH 235/670] Update usage croak docs perl_entity.cpp --- zone/perl_entity.cpp | 62 ++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/zone/perl_entity.cpp b/zone/perl_entity.cpp index eafc5c822..1397702f4 100644 --- a/zone/perl_entity.cpp +++ b/zone/perl_entity.cpp @@ -263,7 +263,7 @@ XS(XS_EntityList_GetClientByAccID) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: EntityList::GetClientByAccID(THIS, accid)"); + Perl_croak(aTHX_ "Usage: EntityList::GetClientByAccID(THIS, uint32 account_id)"); { EntityList * THIS; Client * RETVAL; @@ -290,7 +290,7 @@ XS(XS_EntityList_GetClientByID) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: EntityList::GetClientByID(THIS, id)"); + Perl_croak(aTHX_ "Usage: EntityList::GetClientByID(THIS, uint16 client_id)"); { EntityList * THIS; Client * RETVAL; @@ -317,7 +317,7 @@ XS(XS_EntityList_GetClientByCharID) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: EntityList::GetClientByCharID(THIS, iCharID)"); + Perl_croak(aTHX_ "Usage: EntityList::GetClientByCharID(THIS, uint32 character_id)"); { EntityList * THIS; Client * RETVAL; @@ -344,7 +344,7 @@ XS(XS_EntityList_GetClientByWID) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: EntityList::GetClientByWID(THIS, iWID)"); + Perl_croak(aTHX_ "Usage: EntityList::GetClientByWID(THIS, uint32 wid)"); { EntityList * THIS; Client * RETVAL; @@ -371,7 +371,7 @@ XS(XS_EntityList_GetObjectByDBID) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: EntityList::GetObjectByDBID(THIS, id)"); + Perl_croak(aTHX_ "Usage: EntityList::GetObjectByDBID(THIS, uint32 database_id)"); { EntityList * THIS; Object * RETVAL; @@ -398,7 +398,7 @@ XS(XS_EntityList_GetObjectByID) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: EntityList::GetObjectByID(THIS, id)"); + Perl_croak(aTHX_ "Usage: EntityList::GetObjectByID(THIS, uint32 entity_id)"); { EntityList * THIS; Object * RETVAL; @@ -425,7 +425,7 @@ XS(XS_EntityList_GetDoorsByDBID) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: EntityList::GetDoorsByDBID(THIS, id)"); + Perl_croak(aTHX_ "Usage: EntityList::GetDoorsByDBID(THIS, uint32 database_id)"); { EntityList * THIS; Doors * RETVAL; @@ -452,7 +452,7 @@ XS(XS_EntityList_GetDoorsByDoorID) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: EntityList::GetDoorsByDoorID(THIS, id)"); + Perl_croak(aTHX_ "Usage: EntityList::GetDoorsByDoorID(THIS, uint32 door_id)"); { EntityList * THIS; Doors * RETVAL; @@ -479,7 +479,7 @@ XS(XS_EntityList_GetDoorsByID) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: EntityList::GetDoorsByID(THIS, id)"); + Perl_croak(aTHX_ "Usage: EntityList::GetDoorsByID(THIS, uint32 entity_id)"); { EntityList * THIS; Doors * RETVAL; @@ -506,7 +506,7 @@ XS(XS_EntityList_FindDoor) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: EntityList::FindDoor(THIS, id)"); + Perl_croak(aTHX_ "Usage: EntityList::FindDoor(THIS, uint32 door_id)"); { EntityList * THIS; Doors * RETVAL; @@ -533,7 +533,7 @@ XS(XS_EntityList_GetGroupByMob) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: EntityList::GetGroupByMob(THIS, mob)"); + Perl_croak(aTHX_ "Usage: EntityList::GetGroupByMob(THIS, Mob* mob)"); { EntityList * THIS; Group * RETVAL; @@ -569,7 +569,7 @@ XS(XS_EntityList_GetGroupByClient) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: EntityList::GetGroupByClient(THIS, client)"); + Perl_croak(aTHX_ "Usage: EntityList::GetGroupByClient(THIS, Client* client)"); { EntityList * THIS; Group * RETVAL; @@ -835,7 +835,7 @@ XS(XS_EntityList_CanAddHateForMob) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: EntityList::CanAddHateForMob(THIS, p)"); + Perl_croak(aTHX_ "Usage: EntityList::CanAddHateForMob(THIS, Mob* target)"); { EntityList * THIS; bool RETVAL; @@ -1294,7 +1294,7 @@ XS(XS_EntityList_Message) { dXSARGS; if (items < 4) - Perl_croak(aTHX_ "Usage: EntityList::Message(THIS, to_guilddbid, type, message, ...)"); + Perl_croak(aTHX_ "Usage: EntityList::Message(THIS, uint32 guild_id, uint32 emote_color_type, string message)"); { EntityList * THIS; uint32 to_guilddbid = (uint32)SvUV(ST(1)); @@ -1320,7 +1320,7 @@ XS(XS_EntityList_MessageStatus) { dXSARGS; if (items < 5) - Perl_croak(aTHX_ "Usage: EntityList::MessageStatus(THIS, to_guilddbid, to_minstatus, type, message, ...)"); + Perl_croak(aTHX_ "Usage: EntityList::MessageStatus(THIS, uint32 guild_id, uint32 emote_color_type, string message)"); { EntityList * THIS; uint32 to_guilddbid = (uint32)SvUV(ST(1)); @@ -1347,7 +1347,7 @@ XS(XS_EntityList_MessageClose) { dXSARGS; if (items < 6) - Perl_croak(aTHX_ "Usage: EntityList::MessageClose(THIS, sender, skipsender, dist, type, message, ...)"); + Perl_croak(aTHX_ "Usage: EntityList::MessageClose(THIS, Mob* sender, bool skip_sender, float distance, uint32 emote_color_type, string message)"); { EntityList * THIS; Mob* sender; @@ -1384,7 +1384,7 @@ XS(XS_EntityList_RemoveFromTargets) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: EntityList::RemoveFromTargets(THIS, mob)"); + Perl_croak(aTHX_ "Usage: EntityList::RemoveFromTargets(THIS, Mob* target)"); { EntityList * THIS; Mob* mob; @@ -1417,7 +1417,7 @@ XS(XS_EntityList_ReplaceWithTarget) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: EntityList::ReplaceWithTarget(THIS, pOldMob, pNewTarget)"); + Perl_croak(aTHX_ "Usage: EntityList::ReplaceWithTarget(THIS, Mob* old_mob, Mob* new_target)"); { EntityList * THIS; Mob* pOldMob; @@ -1460,7 +1460,7 @@ XS(XS_EntityList_OpenDoorsNear) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: EntityList::OpenDoorsNear(THIS, opener)"); + Perl_croak(aTHX_ "Usage: EntityList::OpenDoorsNear(THIS, NPC* opener)"); { EntityList * THIS; NPC* opener; @@ -1493,7 +1493,7 @@ XS(XS_EntityList_MakeNameUnique) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: EntityList::MakeNameUnique(THIS, name)"); + Perl_croak(aTHX_ "Usage: EntityList::MakeNameUnique(THIS, string name)"); { EntityList * THIS; char * RETVAL; @@ -1520,7 +1520,7 @@ XS(XS_EntityList_RemoveNumbers) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: EntityList::RemoveNumbers(CLASS, name)"); + Perl_croak(aTHX_ "Usage: EntityListDeprecated::RemoveNumbers(CLASS, name)"); { char * RETVAL; dXSTARG; @@ -1537,7 +1537,7 @@ XS(XS_EntityList_SignalMobsByNPCID) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: EntityList::SignalMobsByNPCID(THIS, npc_type, signal_id)"); + Perl_croak(aTHX_ "Usage: EntityList::SignalMobsByNPCID(THIS, uint32 npc_type_id, int signal_id)"); { EntityList * THIS; uint32 npc_type = (uint32)SvUV(ST(1)); @@ -1562,7 +1562,7 @@ XS(XS_EntityList_RemoveEntity) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: EntityList::RemoveEntity(THIS, id)"); + Perl_croak(aTHX_ "Usage: EntityList::RemoveEntity(THIS, uint16 id)"); { EntityList * THIS; uint16 id = (uint16)SvUV(ST(1)); @@ -1638,7 +1638,7 @@ XS(XS_EntityList_HalveAggro) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: EntityList::HalveAggro(THIS, who)"); + Perl_croak(aTHX_ "Usage: EntityList::HalveAggro(THIS, Mob* target)"); { EntityList * THIS; Mob* who; @@ -1671,7 +1671,7 @@ XS(XS_EntityList_DoubleAggro) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: EntityList::DoubleAggro(THIS, who)"); + Perl_croak(aTHX_ "Usage: EntityList::DoubleAggro(THIS, *Mob target)"); { EntityList * THIS; Mob* who; @@ -1704,7 +1704,7 @@ XS(XS_EntityList_ClearFeignAggro) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: EntityList::ClearFeignAggro(THIS, targ)"); + Perl_croak(aTHX_ "Usage: EntityList::ClearFeignAggro(THIS, Mob* target)"); { EntityList * THIS; Mob* targ; @@ -1737,7 +1737,7 @@ XS(XS_EntityList_Fighting) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: EntityList::Fighting(THIS, targ)"); + Perl_croak(aTHX_ "Usage: EntityList::Fighting(THIS, Mob* target)"); { EntityList * THIS; bool RETVAL; @@ -1773,7 +1773,7 @@ XS(XS_EntityList_RemoveFromHateLists) { dXSARGS; if (items < 2 || items > 3) - Perl_croak(aTHX_ "Usage: EntityList::RemoveFromHateLists(THIS, mob, settoone= false)"); + Perl_croak(aTHX_ "Usage: EntityList::RemoveFromHateLists(THIS, Mob* mob, [bool set_to_one = false])"); { EntityList * THIS; Mob* mob; @@ -1813,7 +1813,7 @@ XS(XS_EntityList_MessageGroup) { dXSARGS; if (items < 5) - Perl_croak(aTHX_ "Usage: EntityList::MessageGroup(THIS, sender, skipclose, type, message, ...)"); + Perl_croak(aTHX_ "Usage: EntityList::MessageGroup(THIS, Mob* sender, bool skip_close, uint32 emote_color_type, string message)"); { EntityList * THIS; Mob* sender; @@ -1849,7 +1849,7 @@ XS(XS_EntityList_GetRandomClient) { dXSARGS; if ((items < 5) || (items > 6)) - Perl_croak(aTHX_ "Usage: EntityList::GetRandomClient(THIS, x, y, z, distance, excludeclient = nullptr)"); + Perl_croak(aTHX_ "Usage: EntityList::GetRandomClient(THIS, float x, float y, float z, float distance, [Client* exclude_client = nullptr])"); { EntityList *THIS; Client *RETVAL, *c = nullptr; @@ -2109,7 +2109,7 @@ XS(XS_EntityList_SignalAllClients) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: EntityList::SignalAllClients(THIS, data)"); + Perl_croak(aTHX_ "Usage: EntityList::SignalAllClients(THIS, uint32 data)"); { EntityList *THIS; uint32 data = (uint32)SvUV(ST(1)); From a6c1314e3ef9e2ef7db3a57ca3c518b4809fe661 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 19:49:31 -0500 Subject: [PATCH 236/670] perl_entity.cpp formatting --- zone/perl_entity.cpp | 1667 +++++++++++++++++++----------------------- 1 file changed, 756 insertions(+), 911 deletions(-) diff --git a/zone/perl_entity.cpp b/zone/perl_entity.cpp index 1397702f4..6653983a0 100644 --- a/zone/perl_entity.cpp +++ b/zone/perl_entity.cpp @@ -26,7 +26,9 @@ */ #include "../common/features.h" + #ifdef EMBPERL_XS_CLASSES + #include "../common/global_define.h" #include #include "embperl.h" @@ -43,786 +45,726 @@ XS(XS_EntityList_GetMobID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetMobID) -{ +XS(XS_EntityList_GetMobID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::GetMobID(THIS, id)"); { - EntityList * THIS; - Mob * RETVAL; - uint16 id = (uint16)SvUV(ST(1)); + EntityList *THIS; + Mob *RETVAL; + uint16 id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetMobID(id); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Mob", (void*)RETVAL); + sv_setref_pv(ST(0), "Mob", (void *) RETVAL); } XSRETURN(1); } XS(XS_EntityList_GetMob); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetMob) -{ +XS(XS_EntityList_GetMob) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::GetMob(THIS, name)"); { - EntityList * THIS; - Mob * RETVAL; - char* name = (char *)SvPV_nolen(ST(1)); + EntityList *THIS; + Mob *RETVAL; + char *name = (char *) SvPV_nolen(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetMob(name); - ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Mob", (void*)RETVAL); + ST(0) = sv_newmortal(); + sv_setref_pv(ST(0), "Mob", (void *) RETVAL); } XSRETURN(1); } XS(XS_EntityList_GetMobByID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetMobByID) -{ +XS(XS_EntityList_GetMobByID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::GetMobByID(THIS, id)"); { - EntityList * THIS; - Mob * RETVAL; - uint16 id = (uint16)SvUV(ST(1)); + EntityList *THIS; + Mob *RETVAL; + uint16 id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetMob(id); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Mob", (void*)RETVAL); + sv_setref_pv(ST(0), "Mob", (void *) RETVAL); } XSRETURN(1); } XS(XS_EntityList_GetMobByNpcTypeID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetMobByNpcTypeID) -{ +XS(XS_EntityList_GetMobByNpcTypeID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::GetMobByNpcTypeID(THIS, get_id)"); { - EntityList * THIS; - Mob * RETVAL; - uint32 get_id = (uint32)SvUV(ST(1)); + EntityList *THIS; + Mob *RETVAL; + uint32 get_id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetMobByNpcTypeID(get_id); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Mob", (void*)RETVAL); + sv_setref_pv(ST(0), "Mob", (void *) RETVAL); } XSRETURN(1); } XS(XS_EntityList_IsMobSpawnedByNpcTypeID); /* prototype pass -Wmissing-prototypes */ -XS(XS_EntityList_IsMobSpawnedByNpcTypeID) -{ +XS(XS_EntityList_IsMobSpawnedByNpcTypeID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::ValidMobByNpcTypeID(THIS, get_id)"); { - EntityList * THIS; - bool RETVAL; - uint32 get_id = (uint32)SvUV(ST(1)); + EntityList *THIS; + bool RETVAL; + uint32 get_id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsMobSpawnedByNpcTypeID(get_id); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_EntityList_GetNPCByID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetNPCByID) -{ +XS(XS_EntityList_GetNPCByID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::GetNPCByID(THIS, id)"); { - EntityList * THIS; - NPC * RETVAL; - uint16 id = (uint16)SvUV(ST(1)); + EntityList *THIS; + NPC *RETVAL; + uint16 id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetNPCByID(id); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "NPC", (void*)RETVAL); + sv_setref_pv(ST(0), "NPC", (void *) RETVAL); } XSRETURN(1); } XS(XS_EntityList_GetNPCByNPCTypeID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetNPCByNPCTypeID) -{ +XS(XS_EntityList_GetNPCByNPCTypeID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::GetNPCByNPCTypeID(THIS, npc_id)"); { - EntityList * THIS; - NPC * RETVAL; - uint32 npc_id = (uint32)SvUV(ST(1)); + EntityList *THIS; + NPC *RETVAL; + uint32 npc_id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetNPCByNPCTypeID(npc_id); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "NPC", (void*)RETVAL); + sv_setref_pv(ST(0), "NPC", (void *) RETVAL); } XSRETURN(1); } XS(XS_EntityList_GetClientByName); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetClientByName) -{ +XS(XS_EntityList_GetClientByName) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::GetClientByName(THIS, name)"); { - EntityList * THIS; - Client * RETVAL; - char * name = (char *)SvPV_nolen(ST(1)); + EntityList *THIS; + Client *RETVAL; + char *name = (char *) SvPV_nolen(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetClientByName(name); - ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Client", (void*)RETVAL); + ST(0) = sv_newmortal(); + sv_setref_pv(ST(0), "Client", (void *) RETVAL); } XSRETURN(1); } XS(XS_EntityList_GetClientByAccID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetClientByAccID) -{ +XS(XS_EntityList_GetClientByAccID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::GetClientByAccID(THIS, uint32 account_id)"); { - EntityList * THIS; - Client * RETVAL; - uint32 accid = (uint32)SvUV(ST(1)); + EntityList *THIS; + Client *RETVAL; + uint32 accid = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetClientByAccID(accid); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Client", (void*)RETVAL); + sv_setref_pv(ST(0), "Client", (void *) RETVAL); } XSRETURN(1); } XS(XS_EntityList_GetClientByID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetClientByID) -{ +XS(XS_EntityList_GetClientByID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::GetClientByID(THIS, uint16 client_id)"); { - EntityList * THIS; - Client * RETVAL; - uint16 id = (uint16)SvUV(ST(1)); + EntityList *THIS; + Client *RETVAL; + uint16 id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetClientByID(id); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Client", (void*)RETVAL); + sv_setref_pv(ST(0), "Client", (void *) RETVAL); } XSRETURN(1); } XS(XS_EntityList_GetClientByCharID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetClientByCharID) -{ +XS(XS_EntityList_GetClientByCharID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::GetClientByCharID(THIS, uint32 character_id)"); { - EntityList * THIS; - Client * RETVAL; - uint32 iCharID = (uint32)SvUV(ST(1)); + EntityList *THIS; + Client *RETVAL; + uint32 iCharID = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetClientByCharID(iCharID); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Client", (void*)RETVAL); + sv_setref_pv(ST(0), "Client", (void *) RETVAL); } XSRETURN(1); } XS(XS_EntityList_GetClientByWID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetClientByWID) -{ +XS(XS_EntityList_GetClientByWID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::GetClientByWID(THIS, uint32 wid)"); { - EntityList * THIS; - Client * RETVAL; - uint32 iWID = (uint32)SvUV(ST(1)); + EntityList *THIS; + Client *RETVAL; + uint32 iWID = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetClientByWID(iWID); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Client", (void*)RETVAL); + sv_setref_pv(ST(0), "Client", (void *) RETVAL); } XSRETURN(1); } XS(XS_EntityList_GetObjectByDBID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetObjectByDBID) -{ +XS(XS_EntityList_GetObjectByDBID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::GetObjectByDBID(THIS, uint32 database_id)"); { - EntityList * THIS; - Object * RETVAL; - uint32 id = (uint32)SvUV(ST(1)); + EntityList *THIS; + Object *RETVAL; + uint32 id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetObjectByDBID(id); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Object", (void*)RETVAL); + sv_setref_pv(ST(0), "Object", (void *) RETVAL); } XSRETURN(1); } XS(XS_EntityList_GetObjectByID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetObjectByID) -{ +XS(XS_EntityList_GetObjectByID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::GetObjectByID(THIS, uint32 entity_id)"); { - EntityList * THIS; - Object * RETVAL; - uint32 id = (uint32)SvUV(ST(1)); + EntityList *THIS; + Object *RETVAL; + uint32 id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetObjectByID(id); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Object", (void*)RETVAL); + sv_setref_pv(ST(0), "Object", (void *) RETVAL); } XSRETURN(1); } XS(XS_EntityList_GetDoorsByDBID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetDoorsByDBID) -{ +XS(XS_EntityList_GetDoorsByDBID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::GetDoorsByDBID(THIS, uint32 database_id)"); { - EntityList * THIS; - Doors * RETVAL; - uint32 id = (uint32)SvUV(ST(1)); + EntityList *THIS; + Doors *RETVAL; + uint32 id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetDoorsByDBID(id); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Doors", (void*)RETVAL); + sv_setref_pv(ST(0), "Doors", (void *) RETVAL); } XSRETURN(1); } XS(XS_EntityList_GetDoorsByDoorID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetDoorsByDoorID) -{ +XS(XS_EntityList_GetDoorsByDoorID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::GetDoorsByDoorID(THIS, uint32 door_id)"); { - EntityList * THIS; - Doors * RETVAL; - uint32 id = (uint32)SvUV(ST(1)); + EntityList *THIS; + Doors *RETVAL; + uint32 id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetDoorsByDoorID(id); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Doors", (void*)RETVAL); + sv_setref_pv(ST(0), "Doors", (void *) RETVAL); } XSRETURN(1); } XS(XS_EntityList_GetDoorsByID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetDoorsByID) -{ +XS(XS_EntityList_GetDoorsByID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::GetDoorsByID(THIS, uint32 entity_id)"); { - EntityList * THIS; - Doors * RETVAL; - uint32 id = (uint32)SvUV(ST(1)); + EntityList *THIS; + Doors *RETVAL; + uint32 id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetDoorsByID(id); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Doors", (void*)RETVAL); + sv_setref_pv(ST(0), "Doors", (void *) RETVAL); } XSRETURN(1); } XS(XS_EntityList_FindDoor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_FindDoor) -{ +XS(XS_EntityList_FindDoor) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::FindDoor(THIS, uint32 door_id)"); { - EntityList * THIS; - Doors * RETVAL; - uint32 id = (uint32)SvUV(ST(1)); + EntityList *THIS; + Doors *RETVAL; + uint32 id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->FindDoor(id); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Doors", (void*)RETVAL); + sv_setref_pv(ST(0), "Doors", (void *) RETVAL); } XSRETURN(1); } XS(XS_EntityList_GetGroupByMob); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetGroupByMob) -{ +XS(XS_EntityList_GetGroupByMob) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::GetGroupByMob(THIS, Mob* mob)"); { - EntityList * THIS; - Group * RETVAL; - Mob* mob; + EntityList *THIS; + Group *RETVAL; + Mob *mob; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - mob = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + mob = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "mob is not of type Mob"); - if(mob == nullptr) + if (mob == nullptr) Perl_croak(aTHX_ "mob is nullptr, avoiding crash."); RETVAL = THIS->GetGroupByMob(mob); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Group", (void*)RETVAL); + sv_setref_pv(ST(0), "Group", (void *) RETVAL); } XSRETURN(1); } XS(XS_EntityList_GetGroupByClient); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetGroupByClient) -{ +XS(XS_EntityList_GetGroupByClient) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::GetGroupByClient(THIS, Client* client)"); { - EntityList * THIS; - Group * RETVAL; - Client* client; + EntityList *THIS; + Group *RETVAL; + Client *client; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - client = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + client = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "client is not of type Client"); - if(client == nullptr) + if (client == nullptr) Perl_croak(aTHX_ "client is nullptr, avoiding crash."); RETVAL = THIS->GetGroupByClient(client); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Group", (void*)RETVAL); + sv_setref_pv(ST(0), "Group", (void *) RETVAL); } XSRETURN(1); } XS(XS_EntityList_GetGroupByID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetGroupByID) -{ +XS(XS_EntityList_GetGroupByID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::GetGroupByID(THIS, id)"); { - EntityList * THIS; - Group * RETVAL; - uint32 id = (uint32)SvUV(ST(1)); + EntityList *THIS; + Group *RETVAL; + uint32 id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetGroupByID(id); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Group", (void*)RETVAL); + sv_setref_pv(ST(0), "Group", (void *) RETVAL); } XSRETURN(1); } XS(XS_EntityList_GetGroupByLeaderName); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetGroupByLeaderName) -{ +XS(XS_EntityList_GetGroupByLeaderName) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::GetGroupByLeaderName(THIS, leader)"); { - EntityList * THIS; - Group * RETVAL; - char* leader = (char *)SvPV_nolen(ST(1)); + EntityList *THIS; + Group *RETVAL; + char *leader = (char *) SvPV_nolen(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetGroupByLeaderName(leader); - ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Group", (void*)RETVAL); + ST(0) = sv_newmortal(); + sv_setref_pv(ST(0), "Group", (void *) RETVAL); } XSRETURN(1); } XS(XS_EntityList_GetRaidByID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetRaidByID) -{ +XS(XS_EntityList_GetRaidByID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::GetRaidByID(THIS, id)"); { - EntityList * THIS; - Raid * RETVAL; - uint32 id = (uint32)SvUV(ST(1)); + EntityList *THIS; + Raid *RETVAL; + uint32 id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetRaidByID(id); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Raid", (void*)RETVAL); + sv_setref_pv(ST(0), "Raid", (void *) RETVAL); } XSRETURN(1); } XS(XS_EntityList_GetRaidByClient); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetRaidByClient) -{ +XS(XS_EntityList_GetRaidByClient) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::GetRaidByClient(THIS, client)"); { - EntityList * THIS; - Raid * RETVAL; - Client* client; + EntityList *THIS; + Raid *RETVAL; + Client *client; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - client = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + client = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "client is not of type Client"); - if(client == nullptr) + if (client == nullptr) Perl_croak(aTHX_ "client is nullptr, avoiding crash."); RETVAL = THIS->GetRaidByClient(client); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Raid", (void*)RETVAL); + sv_setref_pv(ST(0), "Raid", (void *) RETVAL); } XSRETURN(1); } XS(XS_EntityList_GetCorpseByOwner); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetCorpseByOwner) -{ +XS(XS_EntityList_GetCorpseByOwner) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::GetCorpseByOwner(THIS, client)"); { - EntityList * THIS; - Corpse * RETVAL; - Client* client; + EntityList *THIS; + Corpse *RETVAL; + Client *client; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - client = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + client = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "client is not of type Client"); - if(client == nullptr) + if (client == nullptr) Perl_croak(aTHX_ "client is nullptr, avoiding crash."); RETVAL = THIS->GetCorpseByOwner(client); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Corpse", (void*)RETVAL); + sv_setref_pv(ST(0), "Corpse", (void *) RETVAL); } XSRETURN(1); } XS(XS_EntityList_GetCorpseByID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetCorpseByID) -{ +XS(XS_EntityList_GetCorpseByID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::GetCorpseByID(THIS, id)"); { - EntityList * THIS; - Corpse * RETVAL; - uint16 id = (uint16)SvUV(ST(1)); + EntityList *THIS; + Corpse *RETVAL; + uint16 id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetCorpseByID(id); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Corpse", (void*)RETVAL); + sv_setref_pv(ST(0), "Corpse", (void *) RETVAL); } XSRETURN(1); } XS(XS_EntityList_GetCorpseByName); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetCorpseByName) -{ +XS(XS_EntityList_GetCorpseByName) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::GetCorpseByName(THIS, name)"); { - EntityList * THIS; - Corpse * RETVAL; - char* name = (char *)SvPV_nolen(ST(1)); + EntityList *THIS; + Corpse *RETVAL; + char *name = (char *) SvPV_nolen(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetCorpseByName(name); - ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Corpse", (void*)RETVAL); + ST(0) = sv_newmortal(); + sv_setref_pv(ST(0), "Corpse", (void *) RETVAL); } XSRETURN(1); } XS(XS_EntityList_ClearClientPetitionQueue); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_ClearClientPetitionQueue) -{ +XS(XS_EntityList_ClearClientPetitionQueue) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: EntityList::ClearClientPetitionQueue(THIS)"); { - EntityList * THIS; + EntityList *THIS; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->ClearClientPetitionQueue(); @@ -831,32 +773,29 @@ XS(XS_EntityList_ClearClientPetitionQueue) } XS(XS_EntityList_CanAddHateForMob); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_CanAddHateForMob) -{ +XS(XS_EntityList_CanAddHateForMob) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::CanAddHateForMob(THIS, Mob* target)"); { - EntityList * THIS; - bool RETVAL; - Mob * p; + EntityList *THIS; + bool RETVAL; + Mob *p; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - p = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + p = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "p is not of type Mob"); - if(p == nullptr) + if (p == nullptr) Perl_croak(aTHX_ "p is nullptr, avoiding crash."); RETVAL = THIS->CanAddHateForMob(p); @@ -867,21 +806,19 @@ XS(XS_EntityList_CanAddHateForMob) } XS(XS_EntityList_Clear); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_Clear) -{ +XS(XS_EntityList_Clear) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: EntityList::Clear(THIS)"); { - EntityList * THIS; + EntityList *THIS; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->Clear(); @@ -890,237 +827,219 @@ XS(XS_EntityList_Clear) } XS(XS_EntityList_RemoveMob); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_RemoveMob) -{ +XS(XS_EntityList_RemoveMob) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::RemoveMob(THIS, delete_id)"); { - EntityList * THIS; - bool RETVAL; - uint16 delete_id = (uint16)SvUV(ST(1)); + EntityList *THIS; + bool RETVAL; + uint16 delete_id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->RemoveMob(delete_id); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_EntityList_RemoveClient); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_RemoveClient) -{ +XS(XS_EntityList_RemoveClient) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::RemoveClient(THIS, delete_id)"); { - EntityList * THIS; - bool RETVAL; - uint16 delete_id = (uint16)SvUV(ST(1)); + EntityList *THIS; + bool RETVAL; + uint16 delete_id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->RemoveClient(delete_id); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_EntityList_RemoveNPC); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_RemoveNPC) -{ +XS(XS_EntityList_RemoveNPC) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::RemoveNPC(THIS, delete_id)"); { - EntityList * THIS; - bool RETVAL; - uint16 delete_id = (uint16)SvUV(ST(1)); + EntityList *THIS; + bool RETVAL; + uint16 delete_id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->RemoveNPC(delete_id); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_EntityList_RemoveGroup); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_RemoveGroup) -{ +XS(XS_EntityList_RemoveGroup) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::RemoveGroup(THIS, delete_id)"); { - EntityList * THIS; - bool RETVAL; - uint32 delete_id = (uint32)SvUV(ST(1)); + EntityList *THIS; + bool RETVAL; + uint32 delete_id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->RemoveGroup(delete_id); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_EntityList_RemoveCorpse); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_RemoveCorpse) -{ +XS(XS_EntityList_RemoveCorpse) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::RemoveCorpse(THIS, delete_id)"); { - EntityList * THIS; - bool RETVAL; - uint16 delete_id = (uint16)SvUV(ST(1)); + EntityList *THIS; + bool RETVAL; + uint16 delete_id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->RemoveCorpse(delete_id); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_EntityList_RemoveDoor); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_RemoveDoor) -{ +XS(XS_EntityList_RemoveDoor) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::RemoveDoor(THIS, delete_id)"); { - EntityList * THIS; - bool RETVAL; - uint16 delete_id = (uint16)SvUV(ST(1)); + EntityList *THIS; + bool RETVAL; + uint16 delete_id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->RemoveDoor(delete_id); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_EntityList_RemoveTrap); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_RemoveTrap) -{ +XS(XS_EntityList_RemoveTrap) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::RemoveTrap(THIS, delete_id)"); { - EntityList * THIS; - bool RETVAL; - uint16 delete_id = (uint16)SvUV(ST(1)); + EntityList *THIS; + bool RETVAL; + uint16 delete_id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->RemoveTrap(delete_id); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_EntityList_RemoveObject); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_RemoveObject) -{ +XS(XS_EntityList_RemoveObject) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::RemoveObject(THIS, delete_id)"); { - EntityList * THIS; - bool RETVAL; - uint16 delete_id = (uint16)SvUV(ST(1)); + EntityList *THIS; + bool RETVAL; + uint16 delete_id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->RemoveObject(delete_id); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_EntityList_RemoveAllMobs); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_RemoveAllMobs) -{ +XS(XS_EntityList_RemoveAllMobs) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: EntityList::RemoveAllMobs(THIS)"); { - EntityList * THIS; + EntityList *THIS; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->RemoveAllMobs(); @@ -1129,21 +1048,19 @@ XS(XS_EntityList_RemoveAllMobs) } XS(XS_EntityList_RemoveAllClients); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_RemoveAllClients) -{ +XS(XS_EntityList_RemoveAllClients) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: EntityList::RemoveAllClients(THIS)"); { - EntityList * THIS; + EntityList *THIS; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->RemoveAllClients(); @@ -1152,21 +1069,19 @@ XS(XS_EntityList_RemoveAllClients) } XS(XS_EntityList_RemoveAllNPCs); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_RemoveAllNPCs) -{ +XS(XS_EntityList_RemoveAllNPCs) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: EntityList::RemoveAllNPCs(THIS)"); { - EntityList * THIS; + EntityList *THIS; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->RemoveAllNPCs(); @@ -1175,21 +1090,19 @@ XS(XS_EntityList_RemoveAllNPCs) } XS(XS_EntityList_RemoveAllGroups); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_RemoveAllGroups) -{ +XS(XS_EntityList_RemoveAllGroups) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: EntityList::RemoveAllGroups(THIS)"); { - EntityList * THIS; + EntityList *THIS; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->RemoveAllGroups(); @@ -1198,21 +1111,19 @@ XS(XS_EntityList_RemoveAllGroups) } XS(XS_EntityList_RemoveAllCorpses); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_RemoveAllCorpses) -{ +XS(XS_EntityList_RemoveAllCorpses) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: EntityList::RemoveAllCorpses(THIS)"); { - EntityList * THIS; + EntityList *THIS; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->RemoveAllCorpses(); @@ -1221,21 +1132,19 @@ XS(XS_EntityList_RemoveAllCorpses) } XS(XS_EntityList_RemoveAllDoors); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_RemoveAllDoors) -{ +XS(XS_EntityList_RemoveAllDoors) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: EntityList::RemoveAllDoors(THIS)"); { - EntityList * THIS; + EntityList *THIS; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->RemoveAllDoors(); @@ -1244,21 +1153,19 @@ XS(XS_EntityList_RemoveAllDoors) } XS(XS_EntityList_RemoveAllTraps); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_RemoveAllTraps) -{ +XS(XS_EntityList_RemoveAllTraps) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: EntityList::RemoveAllTraps(THIS)"); { - EntityList * THIS; + EntityList *THIS; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->RemoveAllTraps(); @@ -1267,21 +1174,19 @@ XS(XS_EntityList_RemoveAllTraps) } XS(XS_EntityList_RemoveAllObjects); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_RemoveAllObjects) -{ +XS(XS_EntityList_RemoveAllObjects) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: EntityList::RemoveAllObjects(THIS)"); { - EntityList * THIS; + EntityList *THIS; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->RemoveAllObjects(); @@ -1290,24 +1195,22 @@ XS(XS_EntityList_RemoveAllObjects) } XS(XS_EntityList_Message); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_Message) -{ +XS(XS_EntityList_Message) { dXSARGS; if (items < 4) Perl_croak(aTHX_ "Usage: EntityList::Message(THIS, uint32 guild_id, uint32 emote_color_type, string message)"); { - EntityList * THIS; - uint32 to_guilddbid = (uint32)SvUV(ST(1)); - uint32 type = (uint32)SvUV(ST(2)); - char* message = (char *)SvPV_nolen(ST(3)); + EntityList *THIS; + uint32 to_guilddbid = (uint32) SvUV(ST(1)); + uint32 type = (uint32) SvUV(ST(2)); + char *message = (char *) SvPV_nolen(ST(3)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->Message(to_guilddbid, type, message); @@ -1316,25 +1219,24 @@ XS(XS_EntityList_Message) } XS(XS_EntityList_MessageStatus); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_MessageStatus) -{ +XS(XS_EntityList_MessageStatus) { dXSARGS; if (items < 5) - Perl_croak(aTHX_ "Usage: EntityList::MessageStatus(THIS, uint32 guild_id, uint32 emote_color_type, string message)"); + Perl_croak(aTHX_ + "Usage: EntityList::MessageStatus(THIS, uint32 guild_id, uint32 emote_color_type, string message)"); { - EntityList * THIS; - uint32 to_guilddbid = (uint32)SvUV(ST(1)); - int to_minstatus = (int)SvIV(ST(2)); - uint32 type = (uint32)SvUV(ST(3)); - char* message = (char *)SvPV_nolen(ST(4)); + EntityList *THIS; + uint32 to_guilddbid = (uint32) SvUV(ST(1)); + int to_minstatus = (int) SvIV(ST(2)); + uint32 type = (uint32) SvUV(ST(3)); + char *message = (char *) SvPV_nolen(ST(4)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->MessageStatus(to_guilddbid, to_minstatus, type, message); @@ -1343,35 +1245,33 @@ XS(XS_EntityList_MessageStatus) } XS(XS_EntityList_MessageClose); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_MessageClose) -{ +XS(XS_EntityList_MessageClose) { dXSARGS; if (items < 6) - Perl_croak(aTHX_ "Usage: EntityList::MessageClose(THIS, Mob* sender, bool skip_sender, float distance, uint32 emote_color_type, string message)"); + Perl_croak(aTHX_ + "Usage: EntityList::MessageClose(THIS, Mob* sender, bool skip_sender, float distance, uint32 emote_color_type, string message)"); { - EntityList * THIS; - Mob* sender; - bool skipsender = (bool)SvTRUE(ST(2)); - float dist = (float)SvNV(ST(3)); - uint32 type = (uint32)SvUV(ST(4)); - char* message = (char *)SvPV_nolen(ST(5)); + EntityList *THIS; + Mob *sender; + bool skipsender = (bool) SvTRUE(ST(2)); + float dist = (float) SvNV(ST(3)); + uint32 type = (uint32) SvUV(ST(4)); + char *message = (char *) SvPV_nolen(ST(5)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - sender = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + sender = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "sender is not of type Mob"); - if(sender == nullptr) + if (sender == nullptr) Perl_croak(aTHX_ "sender is nullptr, avoiding crash."); THIS->MessageClose(sender, skipsender, dist, type, message); @@ -1380,31 +1280,28 @@ XS(XS_EntityList_MessageClose) } XS(XS_EntityList_RemoveFromTargets); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_RemoveFromTargets) -{ +XS(XS_EntityList_RemoveFromTargets) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::RemoveFromTargets(THIS, Mob* target)"); { - EntityList * THIS; - Mob* mob; + EntityList *THIS; + Mob *mob; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - mob = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + mob = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "mob is not of type Mob"); - if(mob == nullptr) + if (mob == nullptr) Perl_croak(aTHX_ "mob is nullptr, avoiding crash."); THIS->RemoveFromTargets(mob); @@ -1413,41 +1310,37 @@ XS(XS_EntityList_RemoveFromTargets) } XS(XS_EntityList_ReplaceWithTarget); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_ReplaceWithTarget) -{ +XS(XS_EntityList_ReplaceWithTarget) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: EntityList::ReplaceWithTarget(THIS, Mob* old_mob, Mob* new_target)"); { - EntityList * THIS; - Mob* pOldMob; - Mob* pNewTarget; + EntityList *THIS; + Mob *pOldMob; + Mob *pNewTarget; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - pOldMob = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + pOldMob = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "pOldMob is not of type Mob"); - if(pOldMob == nullptr) + if (pOldMob == nullptr) Perl_croak(aTHX_ "pOldMob is nullptr, avoiding crash."); if (sv_derived_from(ST(2), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(2))); - pNewTarget = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(2))); + pNewTarget = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "pNewTarget is not of type Mob"); - if(pNewTarget == nullptr) + if (pNewTarget == nullptr) Perl_croak(aTHX_ "pNewTarget is nullptr, avoiding crash."); THIS->ReplaceWithTarget(pOldMob, pNewTarget); @@ -1456,31 +1349,28 @@ XS(XS_EntityList_ReplaceWithTarget) } XS(XS_EntityList_OpenDoorsNear); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_OpenDoorsNear) -{ +XS(XS_EntityList_OpenDoorsNear) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::OpenDoorsNear(THIS, NPC* opener)"); { - EntityList * THIS; - NPC* opener; + EntityList *THIS; + NPC *opener; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - opener = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + opener = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "opener is not of type NPC"); - if(opener == nullptr) + if (opener == nullptr) Perl_croak(aTHX_ "opener is nullptr, avoiding crash."); THIS->OpenDoorsNear(opener); @@ -1489,67 +1379,66 @@ XS(XS_EntityList_OpenDoorsNear) } XS(XS_EntityList_MakeNameUnique); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_MakeNameUnique) -{ +XS(XS_EntityList_MakeNameUnique) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::MakeNameUnique(THIS, string name)"); { - EntityList * THIS; - char * RETVAL; + EntityList *THIS; + char *RETVAL; dXSTARG; - char* name = (char *)SvPV_nolen(ST(1)); + char *name = (char *) SvPV_nolen(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->MakeNameUnique(name); - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; + sv_setpv(TARG, RETVAL); + XSprePUSH; + PUSHTARG; } XSRETURN(1); } XS(XS_EntityList_RemoveNumbers); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_RemoveNumbers) -{ +XS(XS_EntityList_RemoveNumbers) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityListDeprecated::RemoveNumbers(CLASS, name)"); { - char * RETVAL; + char *RETVAL; dXSTARG; - char* name = (char *)SvPV_nolen(ST(1)); + char *name = (char *) SvPV_nolen(ST(1)); RETVAL = EntityList::RemoveNumbers(name); - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; + sv_setpv(TARG, RETVAL); + XSprePUSH; + PUSHTARG; } XSRETURN(1); } XS(XS_EntityList_SignalMobsByNPCID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_SignalMobsByNPCID) -{ +XS(XS_EntityList_SignalMobsByNPCID) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: EntityList::SignalMobsByNPCID(THIS, uint32 npc_type_id, int signal_id)"); { - EntityList * THIS; - uint32 npc_type = (uint32)SvUV(ST(1)); - int signal_id = (int)SvIV(ST(2)); + EntityList *THIS; + uint32 npc_type = (uint32) SvUV(ST(1)); + int signal_id = (int) SvIV(ST(2)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SignalMobsByNPCID(npc_type, signal_id); @@ -1558,22 +1447,20 @@ XS(XS_EntityList_SignalMobsByNPCID) } XS(XS_EntityList_RemoveEntity); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_RemoveEntity) -{ +XS(XS_EntityList_RemoveEntity) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::RemoveEntity(THIS, uint16 id)"); { - EntityList * THIS; - uint16 id = (uint16)SvUV(ST(1)); + EntityList *THIS; + uint16 id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->RemoveEntity(id); @@ -1582,83 +1469,78 @@ XS(XS_EntityList_RemoveEntity) } XS(XS_EntityList_DeleteNPCCorpses); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_DeleteNPCCorpses) -{ +XS(XS_EntityList_DeleteNPCCorpses) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: EntityList::DeleteNPCCorpses(THIS)"); { - EntityList * THIS; - int32 RETVAL; + EntityList *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->DeleteNPCCorpses(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_EntityList_DeletePlayerCorpses); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_DeletePlayerCorpses) -{ +XS(XS_EntityList_DeletePlayerCorpses) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: EntityList::DeletePlayerCorpses(THIS)"); { - EntityList * THIS; - int32 RETVAL; + EntityList *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->DeletePlayerCorpses(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_EntityList_HalveAggro); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_HalveAggro) -{ +XS(XS_EntityList_HalveAggro) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::HalveAggro(THIS, Mob* target)"); { - EntityList * THIS; - Mob* who; + EntityList *THIS; + Mob *who; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - who = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + who = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "who is not of type Mob"); - if(who == nullptr) + if (who == nullptr) Perl_croak(aTHX_ "who is nullptr, avoiding crash."); THIS->HalveAggro(who); @@ -1667,31 +1549,28 @@ XS(XS_EntityList_HalveAggro) } XS(XS_EntityList_DoubleAggro); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_DoubleAggro) -{ +XS(XS_EntityList_DoubleAggro) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::DoubleAggro(THIS, *Mob target)"); { - EntityList * THIS; - Mob* who; + EntityList *THIS; + Mob *who; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - who = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + who = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "who is not of type Mob"); - if(who == nullptr) + if (who == nullptr) Perl_croak(aTHX_ "who is nullptr, avoiding crash."); THIS->DoubleAggro(who); @@ -1700,31 +1579,28 @@ XS(XS_EntityList_DoubleAggro) } XS(XS_EntityList_ClearFeignAggro); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_ClearFeignAggro) -{ +XS(XS_EntityList_ClearFeignAggro) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::ClearFeignAggro(THIS, Mob* target)"); { - EntityList * THIS; - Mob* targ; + EntityList *THIS; + Mob *targ; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - targ = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + targ = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "targ is not of type Mob"); - if(targ == nullptr) + if (targ == nullptr) Perl_croak(aTHX_ "targ is nullptr, avoiding crash."); THIS->ClearFeignAggro(targ); @@ -1733,32 +1609,29 @@ XS(XS_EntityList_ClearFeignAggro) } XS(XS_EntityList_Fighting); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_Fighting) -{ +XS(XS_EntityList_Fighting) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::Fighting(THIS, Mob* target)"); { - EntityList * THIS; - bool RETVAL; - Mob* targ; + EntityList *THIS; + bool RETVAL; + Mob *targ; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - targ = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + targ = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "targ is not of type Mob"); - if(targ == nullptr) + if (targ == nullptr) Perl_croak(aTHX_ "targ is nullptr, avoiding crash."); RETVAL = THIS->Fighting(targ); @@ -1769,38 +1642,35 @@ XS(XS_EntityList_Fighting) } XS(XS_EntityList_RemoveFromHateLists); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_RemoveFromHateLists) -{ +XS(XS_EntityList_RemoveFromHateLists) { dXSARGS; if (items < 2 || items > 3) Perl_croak(aTHX_ "Usage: EntityList::RemoveFromHateLists(THIS, Mob* mob, [bool set_to_one = false])"); { - EntityList * THIS; - Mob* mob; - bool settoone; + EntityList *THIS; + Mob *mob; + bool settoone; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - mob = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + mob = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "mob is not of type Mob"); - if(mob == nullptr) + if (mob == nullptr) Perl_croak(aTHX_ "mob is nullptr, avoiding crash."); if (items < 3) settoone = false; else { - settoone = (bool)SvTRUE(ST(2)); + settoone = (bool) SvTRUE(ST(2)); } THIS->RemoveFromHateLists(mob, settoone); @@ -1809,34 +1679,32 @@ XS(XS_EntityList_RemoveFromHateLists) } XS(XS_EntityList_MessageGroup); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_MessageGroup) -{ +XS(XS_EntityList_MessageGroup) { dXSARGS; if (items < 5) - Perl_croak(aTHX_ "Usage: EntityList::MessageGroup(THIS, Mob* sender, bool skip_close, uint32 emote_color_type, string message)"); + Perl_croak(aTHX_ + "Usage: EntityList::MessageGroup(THIS, Mob* sender, bool skip_close, uint32 emote_color_type, string message)"); { - EntityList * THIS; - Mob* sender; - bool skipclose = (bool)SvTRUE(ST(2)); - uint32 type = (uint32)SvUV(ST(3)); - char* message = (char *)SvPV_nolen(ST(4)); + EntityList *THIS; + Mob *sender; + bool skipclose = (bool) SvTRUE(ST(2)); + uint32 type = (uint32) SvUV(ST(3)); + char *message = (char *) SvPV_nolen(ST(4)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - sender = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + sender = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "sender is not of type Mob"); - if(sender == nullptr) + if (sender == nullptr) Perl_croak(aTHX_ "sender is nullptr, avoiding crash."); THIS->MessageGroup(sender, skipclose, type, message); @@ -1845,46 +1713,43 @@ XS(XS_EntityList_MessageGroup) } XS(XS_EntityList_GetRandomClient); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetRandomClient) -{ +XS(XS_EntityList_GetRandomClient) { dXSARGS; if ((items < 5) || (items > 6)) - Perl_croak(aTHX_ "Usage: EntityList::GetRandomClient(THIS, float x, float y, float z, float distance, [Client* exclude_client = nullptr])"); + Perl_croak(aTHX_ + "Usage: EntityList::GetRandomClient(THIS, float x, float y, float z, float distance, [Client* exclude_client = nullptr])"); { EntityList *THIS; - Client *RETVAL, *c = nullptr; - float x = (float)SvNV(ST(1)); - float y = (float)SvNV(ST(2)); - float z = (float)SvNV(ST(3)); - float d = (float)SvNV(ST(4)); + Client *RETVAL, *c = nullptr; + float x = (float) SvNV(ST(1)); + float y = (float) SvNV(ST(2)); + float z = (float) SvNV(ST(3)); + float d = (float) SvNV(ST(4)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - if(items == 6) - { + if (items == 6) { if (sv_derived_from(ST(5), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(5))); - c = INT2PTR(Client *,tmp); + IV tmp = SvIV((SV *) SvRV(ST(5))); + c = INT2PTR(Client *, tmp); } } - RETVAL = entity_list.GetRandomClient(glm::vec3(x, y, z), d * d, c); - ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Client", (void*)RETVAL); + RETVAL = entity_list.GetRandomClient(glm::vec3(x, y, z), d * d, c); + ST(0) = sv_newmortal(); + sv_setref_pv(ST(0), "Client", (void *) RETVAL); } XSRETURN(1); } XS(XS_EntityList_GetMobList); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetMobList) -{ +XS(XS_EntityList_GetMobList) { dXSARGS; int num_mobs = 0; if (items != 1) @@ -1893,24 +1758,22 @@ XS(XS_EntityList_GetMobList) EntityList *THIS; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - std::list mob_list; + std::list mob_list; entity_list.GetMobList(mob_list); auto iter = mob_list.begin(); - while(iter != mob_list.end()) - { + while (iter != mob_list.end()) { Mob *entry = (*iter); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Mob", (void*)entry); + sv_setref_pv(ST(0), "Mob", (void *) entry); XPUSHs(ST(0)); num_mobs++; iter++; @@ -1920,8 +1783,7 @@ XS(XS_EntityList_GetMobList) } XS(XS_EntityList_GetClientList); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetClientList) -{ +XS(XS_EntityList_GetClientList) { dXSARGS; int num_clients = 0; if (items != 1) @@ -1930,24 +1792,22 @@ XS(XS_EntityList_GetClientList) EntityList *THIS; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - std::list client_list; + std::list client_list; entity_list.GetClientList(client_list); auto iter = client_list.begin(); - while(iter != client_list.end()) - { + while (iter != client_list.end()) { Client *entry = (*iter); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Client", (void*)entry); + sv_setref_pv(ST(0), "Client", (void *) entry); XPUSHs(ST(0)); num_clients++; iter++; @@ -1957,8 +1817,7 @@ XS(XS_EntityList_GetClientList) } XS(XS_EntityList_GetNPCList); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetNPCList) -{ +XS(XS_EntityList_GetNPCList) { dXSARGS; int num_npcs = 0; if (items != 1) @@ -1967,24 +1826,22 @@ XS(XS_EntityList_GetNPCList) EntityList *THIS; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - std::list npc_list; + std::list npc_list; entity_list.GetNPCList(npc_list); auto iter = npc_list.begin(); - while(iter != npc_list.end()) - { + while (iter != npc_list.end()) { NPC *entry = (*iter); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "NPC", (void*)entry); + sv_setref_pv(ST(0), "NPC", (void *) entry); XPUSHs(ST(0)); num_npcs++; iter++; @@ -1994,8 +1851,7 @@ XS(XS_EntityList_GetNPCList) } XS(XS_EntityList_GetCorpseList); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetCorpseList) -{ +XS(XS_EntityList_GetCorpseList) { dXSARGS; int num_corpses = 0; if (items != 1) @@ -2004,24 +1860,22 @@ XS(XS_EntityList_GetCorpseList) EntityList *THIS; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - std::list corpse_list; + std::list corpse_list; entity_list.GetCorpseList(corpse_list); auto iter = corpse_list.begin(); - while(iter != corpse_list.end()) - { + while (iter != corpse_list.end()) { Corpse *entry = (*iter); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Corpse", (void*)entry); + sv_setref_pv(ST(0), "Corpse", (void *) entry); XPUSHs(ST(0)); num_corpses++; iter++; @@ -2031,8 +1885,7 @@ XS(XS_EntityList_GetCorpseList) } XS(XS_EntityList_GetObjectList); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetObjectList) -{ +XS(XS_EntityList_GetObjectList) { dXSARGS; int num_objects = 0; if (items != 1) @@ -2041,24 +1894,22 @@ XS(XS_EntityList_GetObjectList) EntityList *THIS; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - std::list object_list; + std::list object_list; entity_list.GetObjectList(object_list); auto iter = object_list.begin(); - while(iter != object_list.end()) - { + while (iter != object_list.end()) { Object *entry = (*iter); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Object", (void*)entry); + sv_setref_pv(ST(0), "Object", (void *) entry); XPUSHs(ST(0)); num_objects++; iter++; @@ -2068,8 +1919,7 @@ XS(XS_EntityList_GetObjectList) } XS(XS_EntityList_GetDoorsList); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_GetDoorsList) -{ +XS(XS_EntityList_GetDoorsList) { dXSARGS; int num_objects = 0; if (items != 1) @@ -2078,24 +1928,22 @@ XS(XS_EntityList_GetDoorsList) EntityList *THIS; if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - std::list door_list; + std::list door_list; entity_list.GetDoorsList(door_list); auto iter = door_list.begin(); - while(iter != door_list.end()) - { + while (iter != door_list.end()) { Doors *entry = (*iter); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Doors", (void*)entry); + sv_setref_pv(ST(0), "Doors", (void *) entry); XPUSHs(ST(0)); num_objects++; iter++; @@ -2105,23 +1953,21 @@ XS(XS_EntityList_GetDoorsList) } XS(XS_EntityList_SignalAllClients); /* prototype to pass -Wmissing-prototypes */ -XS(XS_EntityList_SignalAllClients) -{ +XS(XS_EntityList_SignalAllClients) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: EntityList::SignalAllClients(THIS, uint32 data)"); { EntityList *THIS; - uint32 data = (uint32)SvUV(ST(1)); + uint32 data = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EntityList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EntityList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EntityList"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); entity_list.SignalAllClients(data); @@ -2133,14 +1979,13 @@ XS(XS_EntityList_SignalAllClients) extern "C" #endif XS(boot_EntityList); /* prototype to pass -Wmissing-prototypes */ -XS(boot_EntityList) -{ +XS(boot_EntityList) { dXSARGS; char file[256]; strncpy(file, __FILE__, 256); file[255] = 0; - if(items != 1) + if (items != 1) fprintf(stderr, "boot_quest does not take any arguments."); char buf[128]; @@ -2148,80 +1993,80 @@ XS(boot_EntityList) - XS_VERSION_BOOTCHECK ; + XS_VERSION_BOOTCHECK; - newXSproto(strcpy(buf, "GetMobID"), XS_EntityList_GetMobID, file, "$$"); - newXSproto(strcpy(buf, "GetMob"), XS_EntityList_GetMob, file, "$$"); - newXSproto(strcpy(buf, "GetMobByID"), XS_EntityList_GetMobByID, file, "$$"); - newXSproto(strcpy(buf, "GetMobByNpcTypeID"), XS_EntityList_GetMobByNpcTypeID, file, "$$"); - newXSproto(strcpy(buf, "IsMobSpawnedByNpcTypeID"), XS_EntityList_IsMobSpawnedByNpcTypeID, file, "$$"); - newXSproto(strcpy(buf, "GetNPCByID"), XS_EntityList_GetNPCByID, file, "$$"); - newXSproto(strcpy(buf, "GetNPCByNPCTypeID"), XS_EntityList_GetNPCByNPCTypeID, file, "$$"); - newXSproto(strcpy(buf, "GetClientByName"), XS_EntityList_GetClientByName, file, "$$"); - newXSproto(strcpy(buf, "GetClientByAccID"), XS_EntityList_GetClientByAccID, file, "$$"); - newXSproto(strcpy(buf, "GetClientByID"), XS_EntityList_GetClientByID, file, "$$"); - newXSproto(strcpy(buf, "GetClientByCharID"), XS_EntityList_GetClientByCharID, file, "$$"); - newXSproto(strcpy(buf, "GetClientByWID"), XS_EntityList_GetClientByWID, file, "$$"); - newXSproto(strcpy(buf, "GetObjectByID"), XS_EntityList_GetObjectByID, file, "$"); - newXSproto(strcpy(buf, "GetObjectByDBID"), XS_EntityList_GetObjectByDBID, file, "$"); - newXSproto(strcpy(buf, "GetDoorsByID"), XS_EntityList_GetDoorsByID, file, "$$"); - newXSproto(strcpy(buf, "GetDoorsByDBID"), XS_EntityList_GetDoorsByDBID, file, "$$"); - newXSproto(strcpy(buf, "GetDoorsByDoorID"), XS_EntityList_GetDoorsByDoorID, file, "$$"); - newXSproto(strcpy(buf, "FindDoor"), XS_EntityList_FindDoor, file, "$$"); - newXSproto(strcpy(buf, "GetGroupByMob"), XS_EntityList_GetGroupByMob, file, "$$"); - newXSproto(strcpy(buf, "GetGroupByClient"), XS_EntityList_GetGroupByClient, file, "$$"); - newXSproto(strcpy(buf, "GetGroupByID"), XS_EntityList_GetGroupByID, file, "$$"); - newXSproto(strcpy(buf, "GetGroupByLeaderName"), XS_EntityList_GetGroupByLeaderName, file, "$$"); - newXSproto(strcpy(buf, "GetRaidByID"), XS_EntityList_GetRaidByID, file, "$$"); - newXSproto(strcpy(buf, "GetRaidByClient"), XS_EntityList_GetRaidByClient, file, "$$"); - newXSproto(strcpy(buf, "GetCorpseByOwner"), XS_EntityList_GetCorpseByOwner, file, "$$"); - newXSproto(strcpy(buf, "GetCorpseByID"), XS_EntityList_GetCorpseByID, file, "$$"); - newXSproto(strcpy(buf, "GetCorpseByName"), XS_EntityList_GetCorpseByName, file, "$$"); - newXSproto(strcpy(buf, "ClearClientPetitionQueue"), XS_EntityList_ClearClientPetitionQueue, file, "$"); - newXSproto(strcpy(buf, "CanAddHateForMob"), XS_EntityList_CanAddHateForMob, file, "$$"); - newXSproto(strcpy(buf, "Clear"), XS_EntityList_Clear, file, "$"); - newXSproto(strcpy(buf, "RemoveMob"), XS_EntityList_RemoveMob, file, "$$"); - newXSproto(strcpy(buf, "RemoveClient"), XS_EntityList_RemoveClient, file, "$$"); - newXSproto(strcpy(buf, "RemoveNPC"), XS_EntityList_RemoveNPC, file, "$$"); - newXSproto(strcpy(buf, "RemoveGroup"), XS_EntityList_RemoveGroup, file, "$$"); - newXSproto(strcpy(buf, "RemoveCorpse"), XS_EntityList_RemoveCorpse, file, "$$"); - newXSproto(strcpy(buf, "RemoveDoor"), XS_EntityList_RemoveDoor, file, "$$"); - newXSproto(strcpy(buf, "RemoveTrap"), XS_EntityList_RemoveTrap, file, "$$"); - newXSproto(strcpy(buf, "RemoveObject"), XS_EntityList_RemoveObject, file, "$$"); - newXSproto(strcpy(buf, "RemoveAllMobs"), XS_EntityList_RemoveAllMobs, file, "$"); - newXSproto(strcpy(buf, "RemoveAllClients"), XS_EntityList_RemoveAllClients, file, "$"); - newXSproto(strcpy(buf, "RemoveAllNPCs"), XS_EntityList_RemoveAllNPCs, file, "$"); - newXSproto(strcpy(buf, "RemoveAllGroups"), XS_EntityList_RemoveAllGroups, file, "$"); - newXSproto(strcpy(buf, "RemoveAllCorpses"), XS_EntityList_RemoveAllCorpses, file, "$"); - newXSproto(strcpy(buf, "RemoveAllDoors"), XS_EntityList_RemoveAllDoors, file, "$"); - newXSproto(strcpy(buf, "RemoveAllTraps"), XS_EntityList_RemoveAllTraps, file, "$"); - newXSproto(strcpy(buf, "RemoveAllObjects"), XS_EntityList_RemoveAllObjects, file, "$"); - newXSproto(strcpy(buf, "Message"), XS_EntityList_Message, file, "$$$$;@"); - newXSproto(strcpy(buf, "MessageStatus"), XS_EntityList_MessageStatus, file, "$$$$$;@"); - newXSproto(strcpy(buf, "MessageClose"), XS_EntityList_MessageClose, file, "$$$$$$;@"); - newXSproto(strcpy(buf, "RemoveFromTargets"), XS_EntityList_RemoveFromTargets, file, "$$"); - newXSproto(strcpy(buf, "ReplaceWithTarget"), XS_EntityList_ReplaceWithTarget, file, "$$$"); - newXSproto(strcpy(buf, "OpenDoorsNear"), XS_EntityList_OpenDoorsNear, file, "$$"); - newXSproto(strcpy(buf, "MakeNameUnique"), XS_EntityList_MakeNameUnique, file, "$$"); - newXSproto(strcpy(buf, "RemoveNumbers"), XS_EntityList_RemoveNumbers, file, "$$"); - newXSproto(strcpy(buf, "SignalMobsByNPCID"), XS_EntityList_SignalMobsByNPCID, file, "$$$"); - newXSproto(strcpy(buf, "RemoveEntity"), XS_EntityList_RemoveEntity, file, "$$"); - newXSproto(strcpy(buf, "DeleteNPCCorpses"), XS_EntityList_DeleteNPCCorpses, file, "$"); - newXSproto(strcpy(buf, "DeletePlayerCorpses"), XS_EntityList_DeletePlayerCorpses, file, "$"); - newXSproto(strcpy(buf, "HalveAggro"), XS_EntityList_HalveAggro, file, "$$"); - newXSproto(strcpy(buf, "DoubleAggro"), XS_EntityList_DoubleAggro, file, "$$"); - newXSproto(strcpy(buf, "ClearFeignAggro"), XS_EntityList_ClearFeignAggro, file, "$$"); - newXSproto(strcpy(buf, "Fighting"), XS_EntityList_Fighting, file, "$$"); - newXSproto(strcpy(buf, "RemoveFromHateLists"), XS_EntityList_RemoveFromHateLists, file, "$$;$"); - newXSproto(strcpy(buf, "MessageGroup"), XS_EntityList_MessageGroup, file, "$$$$$;@"); - newXSproto(strcpy(buf, "GetRandomClient"), XS_EntityList_GetRandomClient, file, "$$$$$;$"); - newXSproto(strcpy(buf, "GetMobList"), XS_EntityList_GetMobList, file, "$"); - newXSproto(strcpy(buf, "GetClientList"), XS_EntityList_GetClientList, file, "$"); - newXSproto(strcpy(buf, "GetNPCList"), XS_EntityList_GetNPCList, file, "$"); - newXSproto(strcpy(buf, "GetCorpseList"), XS_EntityList_GetCorpseList, file, "$"); - newXSproto(strcpy(buf, "GetObjectList"), XS_EntityList_GetObjectList, file, "$"); - newXSproto(strcpy(buf, "GetDoorsList"), XS_EntityList_GetDoorsList, file, "$"); - newXSproto(strcpy(buf, "SignalAllClients"), XS_EntityList_SignalAllClients, file, "$$"); + newXSproto(strcpy(buf, "GetMobID"), XS_EntityList_GetMobID, file, "$$"); + newXSproto(strcpy(buf, "GetMob"), XS_EntityList_GetMob, file, "$$"); + newXSproto(strcpy(buf, "GetMobByID"), XS_EntityList_GetMobByID, file, "$$"); + newXSproto(strcpy(buf, "GetMobByNpcTypeID"), XS_EntityList_GetMobByNpcTypeID, file, "$$"); + newXSproto(strcpy(buf, "IsMobSpawnedByNpcTypeID"), XS_EntityList_IsMobSpawnedByNpcTypeID, file, "$$"); + newXSproto(strcpy(buf, "GetNPCByID"), XS_EntityList_GetNPCByID, file, "$$"); + newXSproto(strcpy(buf, "GetNPCByNPCTypeID"), XS_EntityList_GetNPCByNPCTypeID, file, "$$"); + newXSproto(strcpy(buf, "GetClientByName"), XS_EntityList_GetClientByName, file, "$$"); + newXSproto(strcpy(buf, "GetClientByAccID"), XS_EntityList_GetClientByAccID, file, "$$"); + newXSproto(strcpy(buf, "GetClientByID"), XS_EntityList_GetClientByID, file, "$$"); + newXSproto(strcpy(buf, "GetClientByCharID"), XS_EntityList_GetClientByCharID, file, "$$"); + newXSproto(strcpy(buf, "GetClientByWID"), XS_EntityList_GetClientByWID, file, "$$"); + newXSproto(strcpy(buf, "GetObjectByID"), XS_EntityList_GetObjectByID, file, "$"); + newXSproto(strcpy(buf, "GetObjectByDBID"), XS_EntityList_GetObjectByDBID, file, "$"); + newXSproto(strcpy(buf, "GetDoorsByID"), XS_EntityList_GetDoorsByID, file, "$$"); + newXSproto(strcpy(buf, "GetDoorsByDBID"), XS_EntityList_GetDoorsByDBID, file, "$$"); + newXSproto(strcpy(buf, "GetDoorsByDoorID"), XS_EntityList_GetDoorsByDoorID, file, "$$"); + newXSproto(strcpy(buf, "FindDoor"), XS_EntityList_FindDoor, file, "$$"); + newXSproto(strcpy(buf, "GetGroupByMob"), XS_EntityList_GetGroupByMob, file, "$$"); + newXSproto(strcpy(buf, "GetGroupByClient"), XS_EntityList_GetGroupByClient, file, "$$"); + newXSproto(strcpy(buf, "GetGroupByID"), XS_EntityList_GetGroupByID, file, "$$"); + newXSproto(strcpy(buf, "GetGroupByLeaderName"), XS_EntityList_GetGroupByLeaderName, file, "$$"); + newXSproto(strcpy(buf, "GetRaidByID"), XS_EntityList_GetRaidByID, file, "$$"); + newXSproto(strcpy(buf, "GetRaidByClient"), XS_EntityList_GetRaidByClient, file, "$$"); + newXSproto(strcpy(buf, "GetCorpseByOwner"), XS_EntityList_GetCorpseByOwner, file, "$$"); + newXSproto(strcpy(buf, "GetCorpseByID"), XS_EntityList_GetCorpseByID, file, "$$"); + newXSproto(strcpy(buf, "GetCorpseByName"), XS_EntityList_GetCorpseByName, file, "$$"); + newXSproto(strcpy(buf, "ClearClientPetitionQueue"), XS_EntityList_ClearClientPetitionQueue, file, "$"); + newXSproto(strcpy(buf, "CanAddHateForMob"), XS_EntityList_CanAddHateForMob, file, "$$"); + newXSproto(strcpy(buf, "Clear"), XS_EntityList_Clear, file, "$"); + newXSproto(strcpy(buf, "RemoveMob"), XS_EntityList_RemoveMob, file, "$$"); + newXSproto(strcpy(buf, "RemoveClient"), XS_EntityList_RemoveClient, file, "$$"); + newXSproto(strcpy(buf, "RemoveNPC"), XS_EntityList_RemoveNPC, file, "$$"); + newXSproto(strcpy(buf, "RemoveGroup"), XS_EntityList_RemoveGroup, file, "$$"); + newXSproto(strcpy(buf, "RemoveCorpse"), XS_EntityList_RemoveCorpse, file, "$$"); + newXSproto(strcpy(buf, "RemoveDoor"), XS_EntityList_RemoveDoor, file, "$$"); + newXSproto(strcpy(buf, "RemoveTrap"), XS_EntityList_RemoveTrap, file, "$$"); + newXSproto(strcpy(buf, "RemoveObject"), XS_EntityList_RemoveObject, file, "$$"); + newXSproto(strcpy(buf, "RemoveAllMobs"), XS_EntityList_RemoveAllMobs, file, "$"); + newXSproto(strcpy(buf, "RemoveAllClients"), XS_EntityList_RemoveAllClients, file, "$"); + newXSproto(strcpy(buf, "RemoveAllNPCs"), XS_EntityList_RemoveAllNPCs, file, "$"); + newXSproto(strcpy(buf, "RemoveAllGroups"), XS_EntityList_RemoveAllGroups, file, "$"); + newXSproto(strcpy(buf, "RemoveAllCorpses"), XS_EntityList_RemoveAllCorpses, file, "$"); + newXSproto(strcpy(buf, "RemoveAllDoors"), XS_EntityList_RemoveAllDoors, file, "$"); + newXSproto(strcpy(buf, "RemoveAllTraps"), XS_EntityList_RemoveAllTraps, file, "$"); + newXSproto(strcpy(buf, "RemoveAllObjects"), XS_EntityList_RemoveAllObjects, file, "$"); + newXSproto(strcpy(buf, "Message"), XS_EntityList_Message, file, "$$$$;@"); + newXSproto(strcpy(buf, "MessageStatus"), XS_EntityList_MessageStatus, file, "$$$$$;@"); + newXSproto(strcpy(buf, "MessageClose"), XS_EntityList_MessageClose, file, "$$$$$$;@"); + newXSproto(strcpy(buf, "RemoveFromTargets"), XS_EntityList_RemoveFromTargets, file, "$$"); + newXSproto(strcpy(buf, "ReplaceWithTarget"), XS_EntityList_ReplaceWithTarget, file, "$$$"); + newXSproto(strcpy(buf, "OpenDoorsNear"), XS_EntityList_OpenDoorsNear, file, "$$"); + newXSproto(strcpy(buf, "MakeNameUnique"), XS_EntityList_MakeNameUnique, file, "$$"); + newXSproto(strcpy(buf, "RemoveNumbers"), XS_EntityList_RemoveNumbers, file, "$$"); + newXSproto(strcpy(buf, "SignalMobsByNPCID"), XS_EntityList_SignalMobsByNPCID, file, "$$$"); + newXSproto(strcpy(buf, "RemoveEntity"), XS_EntityList_RemoveEntity, file, "$$"); + newXSproto(strcpy(buf, "DeleteNPCCorpses"), XS_EntityList_DeleteNPCCorpses, file, "$"); + newXSproto(strcpy(buf, "DeletePlayerCorpses"), XS_EntityList_DeletePlayerCorpses, file, "$"); + newXSproto(strcpy(buf, "HalveAggro"), XS_EntityList_HalveAggro, file, "$$"); + newXSproto(strcpy(buf, "DoubleAggro"), XS_EntityList_DoubleAggro, file, "$$"); + newXSproto(strcpy(buf, "ClearFeignAggro"), XS_EntityList_ClearFeignAggro, file, "$$"); + newXSproto(strcpy(buf, "Fighting"), XS_EntityList_Fighting, file, "$$"); + newXSproto(strcpy(buf, "RemoveFromHateLists"), XS_EntityList_RemoveFromHateLists, file, "$$;$"); + newXSproto(strcpy(buf, "MessageGroup"), XS_EntityList_MessageGroup, file, "$$$$$;@"); + newXSproto(strcpy(buf, "GetRandomClient"), XS_EntityList_GetRandomClient, file, "$$$$$;$"); + newXSproto(strcpy(buf, "GetMobList"), XS_EntityList_GetMobList, file, "$"); + newXSproto(strcpy(buf, "GetClientList"), XS_EntityList_GetClientList, file, "$"); + newXSproto(strcpy(buf, "GetNPCList"), XS_EntityList_GetNPCList, file, "$"); + newXSproto(strcpy(buf, "GetCorpseList"), XS_EntityList_GetCorpseList, file, "$"); + newXSproto(strcpy(buf, "GetObjectList"), XS_EntityList_GetObjectList, file, "$"); + newXSproto(strcpy(buf, "GetDoorsList"), XS_EntityList_GetDoorsList, file, "$"); + newXSproto(strcpy(buf, "SignalAllClients"), XS_EntityList_SignalAllClients, file, "$$"); XSRETURN_YES; } From 26ed80bdda4b861246cc5dd565b8c5668d94ef20 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 19:49:52 -0500 Subject: [PATCH 237/670] Add --entity to perl-doc-parser.pl --- utils/scripts/perl-doc-parser.pl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/utils/scripts/perl-doc-parser.pl b/utils/scripts/perl-doc-parser.pl index d54e39ebc..80f72982c 100755 --- a/utils/scripts/perl-doc-parser.pl +++ b/utils/scripts/perl-doc-parser.pl @@ -5,6 +5,7 @@ sub usage() { print "Usage:\n"; print " --client - Prints methods for just client class methods\n"; print " --mob - Prints methods for just mob class methods\n"; + print " --entity - Prints methods for just entity class methods\n"; print " --corpse - Prints methods for just corpse class methods\n"; print " --all - Prints methods for all classes\n"; exit(1); @@ -46,7 +47,7 @@ for my $file (@files) { chomp; $line = $_; - if ($line=~/Client::|Mob::|Corpse::/i && $line=~/_croak/i) { + if ($line=~/Client::|Mob::|Corpse::|EntityList::/i && $line=~/_croak/i) { #::: Client export if ($export=~/all|client/i) { @@ -66,6 +67,12 @@ for my $file (@files) { $object_prefix = "\$corpse->"; } + #::: Entity export + if ($export=~/all|entity/i) { + $split_key = "EntityList::"; + $object_prefix = "\$entity_list->"; + } + #::: Split on croak usage @data = split($split_key, $line); $usage = trim($data[1]); From 2bab945c340d8368e68645d75dfa6eeed93cc58b Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 19:50:56 -0500 Subject: [PATCH 238/670] perl_entity.cpp formatting --- zone/perl_entity.cpp | 176 +++++++++++++++++++++---------------------- 1 file changed, 88 insertions(+), 88 deletions(-) diff --git a/zone/perl_entity.cpp b/zone/perl_entity.cpp index 6653983a0..a38852b9c 100644 --- a/zone/perl_entity.cpp +++ b/zone/perl_entity.cpp @@ -52,7 +52,7 @@ XS(XS_EntityList_GetMobID) { { EntityList *THIS; Mob *RETVAL; - uint16 id = (uint16) SvUV(ST(1)); + uint16 id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -63,7 +63,7 @@ XS(XS_EntityList_GetMobID) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetMobID(id); - ST(0) = sv_newmortal(); + ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "Mob", (void *) RETVAL); } XSRETURN(1); @@ -102,7 +102,7 @@ XS(XS_EntityList_GetMobByID) { { EntityList *THIS; Mob *RETVAL; - uint16 id = (uint16) SvUV(ST(1)); + uint16 id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -113,7 +113,7 @@ XS(XS_EntityList_GetMobByID) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetMob(id); - ST(0) = sv_newmortal(); + ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "Mob", (void *) RETVAL); } XSRETURN(1); @@ -127,7 +127,7 @@ XS(XS_EntityList_GetMobByNpcTypeID) { { EntityList *THIS; Mob *RETVAL; - uint32 get_id = (uint32) SvUV(ST(1)); + uint32 get_id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -138,7 +138,7 @@ XS(XS_EntityList_GetMobByNpcTypeID) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetMobByNpcTypeID(get_id); - ST(0) = sv_newmortal(); + ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "Mob", (void *) RETVAL); } XSRETURN(1); @@ -151,8 +151,8 @@ XS(XS_EntityList_IsMobSpawnedByNpcTypeID) { Perl_croak(aTHX_ "Usage: EntityList::ValidMobByNpcTypeID(THIS, get_id)"); { EntityList *THIS; - bool RETVAL; - uint32 get_id = (uint32) SvUV(ST(1)); + bool RETVAL; + uint32 get_id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -163,7 +163,7 @@ XS(XS_EntityList_IsMobSpawnedByNpcTypeID) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsMobSpawnedByNpcTypeID(get_id); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); @@ -177,7 +177,7 @@ XS(XS_EntityList_GetNPCByID) { { EntityList *THIS; NPC *RETVAL; - uint16 id = (uint16) SvUV(ST(1)); + uint16 id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -188,7 +188,7 @@ XS(XS_EntityList_GetNPCByID) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetNPCByID(id); - ST(0) = sv_newmortal(); + ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "NPC", (void *) RETVAL); } XSRETURN(1); @@ -202,7 +202,7 @@ XS(XS_EntityList_GetNPCByNPCTypeID) { { EntityList *THIS; NPC *RETVAL; - uint32 npc_id = (uint32) SvUV(ST(1)); + uint32 npc_id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -213,7 +213,7 @@ XS(XS_EntityList_GetNPCByNPCTypeID) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetNPCByNPCTypeID(npc_id); - ST(0) = sv_newmortal(); + ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "NPC", (void *) RETVAL); } XSRETURN(1); @@ -252,7 +252,7 @@ XS(XS_EntityList_GetClientByAccID) { { EntityList *THIS; Client *RETVAL; - uint32 accid = (uint32) SvUV(ST(1)); + uint32 accid = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -263,7 +263,7 @@ XS(XS_EntityList_GetClientByAccID) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetClientByAccID(accid); - ST(0) = sv_newmortal(); + ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "Client", (void *) RETVAL); } XSRETURN(1); @@ -277,7 +277,7 @@ XS(XS_EntityList_GetClientByID) { { EntityList *THIS; Client *RETVAL; - uint16 id = (uint16) SvUV(ST(1)); + uint16 id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -288,7 +288,7 @@ XS(XS_EntityList_GetClientByID) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetClientByID(id); - ST(0) = sv_newmortal(); + ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "Client", (void *) RETVAL); } XSRETURN(1); @@ -302,7 +302,7 @@ XS(XS_EntityList_GetClientByCharID) { { EntityList *THIS; Client *RETVAL; - uint32 iCharID = (uint32) SvUV(ST(1)); + uint32 iCharID = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -313,7 +313,7 @@ XS(XS_EntityList_GetClientByCharID) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetClientByCharID(iCharID); - ST(0) = sv_newmortal(); + ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "Client", (void *) RETVAL); } XSRETURN(1); @@ -327,7 +327,7 @@ XS(XS_EntityList_GetClientByWID) { { EntityList *THIS; Client *RETVAL; - uint32 iWID = (uint32) SvUV(ST(1)); + uint32 iWID = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -338,7 +338,7 @@ XS(XS_EntityList_GetClientByWID) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetClientByWID(iWID); - ST(0) = sv_newmortal(); + ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "Client", (void *) RETVAL); } XSRETURN(1); @@ -352,7 +352,7 @@ XS(XS_EntityList_GetObjectByDBID) { { EntityList *THIS; Object *RETVAL; - uint32 id = (uint32) SvUV(ST(1)); + uint32 id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -363,7 +363,7 @@ XS(XS_EntityList_GetObjectByDBID) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetObjectByDBID(id); - ST(0) = sv_newmortal(); + ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "Object", (void *) RETVAL); } XSRETURN(1); @@ -377,7 +377,7 @@ XS(XS_EntityList_GetObjectByID) { { EntityList *THIS; Object *RETVAL; - uint32 id = (uint32) SvUV(ST(1)); + uint32 id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -388,7 +388,7 @@ XS(XS_EntityList_GetObjectByID) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetObjectByID(id); - ST(0) = sv_newmortal(); + ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "Object", (void *) RETVAL); } XSRETURN(1); @@ -402,7 +402,7 @@ XS(XS_EntityList_GetDoorsByDBID) { { EntityList *THIS; Doors *RETVAL; - uint32 id = (uint32) SvUV(ST(1)); + uint32 id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -413,7 +413,7 @@ XS(XS_EntityList_GetDoorsByDBID) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetDoorsByDBID(id); - ST(0) = sv_newmortal(); + ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "Doors", (void *) RETVAL); } XSRETURN(1); @@ -427,7 +427,7 @@ XS(XS_EntityList_GetDoorsByDoorID) { { EntityList *THIS; Doors *RETVAL; - uint32 id = (uint32) SvUV(ST(1)); + uint32 id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -438,7 +438,7 @@ XS(XS_EntityList_GetDoorsByDoorID) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetDoorsByDoorID(id); - ST(0) = sv_newmortal(); + ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "Doors", (void *) RETVAL); } XSRETURN(1); @@ -452,7 +452,7 @@ XS(XS_EntityList_GetDoorsByID) { { EntityList *THIS; Doors *RETVAL; - uint32 id = (uint32) SvUV(ST(1)); + uint32 id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -463,7 +463,7 @@ XS(XS_EntityList_GetDoorsByID) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetDoorsByID(id); - ST(0) = sv_newmortal(); + ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "Doors", (void *) RETVAL); } XSRETURN(1); @@ -477,7 +477,7 @@ XS(XS_EntityList_FindDoor) { { EntityList *THIS; Doors *RETVAL; - uint32 id = (uint32) SvUV(ST(1)); + uint32 id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -488,7 +488,7 @@ XS(XS_EntityList_FindDoor) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->FindDoor(id); - ST(0) = sv_newmortal(); + ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "Doors", (void *) RETVAL); } XSRETURN(1); @@ -568,7 +568,7 @@ XS(XS_EntityList_GetGroupByID) { { EntityList *THIS; Group *RETVAL; - uint32 id = (uint32) SvUV(ST(1)); + uint32 id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -579,7 +579,7 @@ XS(XS_EntityList_GetGroupByID) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetGroupByID(id); - ST(0) = sv_newmortal(); + ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "Group", (void *) RETVAL); } XSRETURN(1); @@ -618,7 +618,7 @@ XS(XS_EntityList_GetRaidByID) { { EntityList *THIS; Raid *RETVAL; - uint32 id = (uint32) SvUV(ST(1)); + uint32 id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -629,7 +629,7 @@ XS(XS_EntityList_GetRaidByID) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetRaidByID(id); - ST(0) = sv_newmortal(); + ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "Raid", (void *) RETVAL); } XSRETURN(1); @@ -709,7 +709,7 @@ XS(XS_EntityList_GetCorpseByID) { { EntityList *THIS; Corpse *RETVAL; - uint16 id = (uint16) SvUV(ST(1)); + uint16 id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -720,7 +720,7 @@ XS(XS_EntityList_GetCorpseByID) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetCorpseByID(id); - ST(0) = sv_newmortal(); + ST(0) = sv_newmortal(); sv_setref_pv(ST(0), "Corpse", (void *) RETVAL); } XSRETURN(1); @@ -779,8 +779,8 @@ XS(XS_EntityList_CanAddHateForMob) { Perl_croak(aTHX_ "Usage: EntityList::CanAddHateForMob(THIS, Mob* target)"); { EntityList *THIS; - bool RETVAL; - Mob *p; + bool RETVAL; + Mob *p; if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -833,8 +833,8 @@ XS(XS_EntityList_RemoveMob) { Perl_croak(aTHX_ "Usage: EntityList::RemoveMob(THIS, delete_id)"); { EntityList *THIS; - bool RETVAL; - uint16 delete_id = (uint16) SvUV(ST(1)); + bool RETVAL; + uint16 delete_id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -845,7 +845,7 @@ XS(XS_EntityList_RemoveMob) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->RemoveMob(delete_id); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); @@ -858,8 +858,8 @@ XS(XS_EntityList_RemoveClient) { Perl_croak(aTHX_ "Usage: EntityList::RemoveClient(THIS, delete_id)"); { EntityList *THIS; - bool RETVAL; - uint16 delete_id = (uint16) SvUV(ST(1)); + bool RETVAL; + uint16 delete_id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -870,7 +870,7 @@ XS(XS_EntityList_RemoveClient) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->RemoveClient(delete_id); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); @@ -883,8 +883,8 @@ XS(XS_EntityList_RemoveNPC) { Perl_croak(aTHX_ "Usage: EntityList::RemoveNPC(THIS, delete_id)"); { EntityList *THIS; - bool RETVAL; - uint16 delete_id = (uint16) SvUV(ST(1)); + bool RETVAL; + uint16 delete_id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -895,7 +895,7 @@ XS(XS_EntityList_RemoveNPC) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->RemoveNPC(delete_id); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); @@ -908,8 +908,8 @@ XS(XS_EntityList_RemoveGroup) { Perl_croak(aTHX_ "Usage: EntityList::RemoveGroup(THIS, delete_id)"); { EntityList *THIS; - bool RETVAL; - uint32 delete_id = (uint32) SvUV(ST(1)); + bool RETVAL; + uint32 delete_id = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -920,7 +920,7 @@ XS(XS_EntityList_RemoveGroup) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->RemoveGroup(delete_id); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); @@ -933,8 +933,8 @@ XS(XS_EntityList_RemoveCorpse) { Perl_croak(aTHX_ "Usage: EntityList::RemoveCorpse(THIS, delete_id)"); { EntityList *THIS; - bool RETVAL; - uint16 delete_id = (uint16) SvUV(ST(1)); + bool RETVAL; + uint16 delete_id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -945,7 +945,7 @@ XS(XS_EntityList_RemoveCorpse) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->RemoveCorpse(delete_id); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); @@ -958,8 +958,8 @@ XS(XS_EntityList_RemoveDoor) { Perl_croak(aTHX_ "Usage: EntityList::RemoveDoor(THIS, delete_id)"); { EntityList *THIS; - bool RETVAL; - uint16 delete_id = (uint16) SvUV(ST(1)); + bool RETVAL; + uint16 delete_id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -970,7 +970,7 @@ XS(XS_EntityList_RemoveDoor) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->RemoveDoor(delete_id); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); @@ -983,8 +983,8 @@ XS(XS_EntityList_RemoveTrap) { Perl_croak(aTHX_ "Usage: EntityList::RemoveTrap(THIS, delete_id)"); { EntityList *THIS; - bool RETVAL; - uint16 delete_id = (uint16) SvUV(ST(1)); + bool RETVAL; + uint16 delete_id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -995,7 +995,7 @@ XS(XS_EntityList_RemoveTrap) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->RemoveTrap(delete_id); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); @@ -1008,8 +1008,8 @@ XS(XS_EntityList_RemoveObject) { Perl_croak(aTHX_ "Usage: EntityList::RemoveObject(THIS, delete_id)"); { EntityList *THIS; - bool RETVAL; - uint16 delete_id = (uint16) SvUV(ST(1)); + bool RETVAL; + uint16 delete_id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -1020,7 +1020,7 @@ XS(XS_EntityList_RemoveObject) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->RemoveObject(delete_id); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); @@ -1201,9 +1201,9 @@ XS(XS_EntityList_Message) { Perl_croak(aTHX_ "Usage: EntityList::Message(THIS, uint32 guild_id, uint32 emote_color_type, string message)"); { EntityList *THIS; - uint32 to_guilddbid = (uint32) SvUV(ST(1)); - uint32 type = (uint32) SvUV(ST(2)); - char *message = (char *) SvPV_nolen(ST(3)); + uint32 to_guilddbid = (uint32) SvUV(ST(1)); + uint32 type = (uint32) SvUV(ST(2)); + char *message = (char *) SvPV_nolen(ST(3)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -1226,10 +1226,10 @@ XS(XS_EntityList_MessageStatus) { "Usage: EntityList::MessageStatus(THIS, uint32 guild_id, uint32 emote_color_type, string message)"); { EntityList *THIS; - uint32 to_guilddbid = (uint32) SvUV(ST(1)); - int to_minstatus = (int) SvIV(ST(2)); - uint32 type = (uint32) SvUV(ST(3)); - char *message = (char *) SvPV_nolen(ST(4)); + uint32 to_guilddbid = (uint32) SvUV(ST(1)); + int to_minstatus = (int) SvIV(ST(2)); + uint32 type = (uint32) SvUV(ST(3)); + char *message = (char *) SvPV_nolen(ST(4)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -1253,10 +1253,10 @@ XS(XS_EntityList_MessageClose) { { EntityList *THIS; Mob *sender; - bool skipsender = (bool) SvTRUE(ST(2)); - float dist = (float) SvNV(ST(3)); - uint32 type = (uint32) SvUV(ST(4)); - char *message = (char *) SvPV_nolen(ST(5)); + bool skipsender = (bool) SvTRUE(ST(2)); + float dist = (float) SvNV(ST(3)); + uint32 type = (uint32) SvUV(ST(4)); + char *message = (char *) SvPV_nolen(ST(5)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -1387,7 +1387,7 @@ XS(XS_EntityList_MakeNameUnique) { EntityList *THIS; char *RETVAL; dXSTARG; - char *name = (char *) SvPV_nolen(ST(1)); + char *name = (char *) SvPV_nolen(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -1430,8 +1430,8 @@ XS(XS_EntityList_SignalMobsByNPCID) { Perl_croak(aTHX_ "Usage: EntityList::SignalMobsByNPCID(THIS, uint32 npc_type_id, int signal_id)"); { EntityList *THIS; - uint32 npc_type = (uint32) SvUV(ST(1)); - int signal_id = (int) SvIV(ST(2)); + uint32 npc_type = (uint32) SvUV(ST(1)); + int signal_id = (int) SvIV(ST(2)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -1453,7 +1453,7 @@ XS(XS_EntityList_RemoveEntity) { Perl_croak(aTHX_ "Usage: EntityList::RemoveEntity(THIS, uint16 id)"); { EntityList *THIS; - uint16 id = (uint16) SvUV(ST(1)); + uint16 id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -1475,7 +1475,7 @@ XS(XS_EntityList_DeleteNPCCorpses) { Perl_croak(aTHX_ "Usage: EntityList::DeleteNPCCorpses(THIS)"); { EntityList *THIS; - int32 RETVAL; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "EntityList")) { @@ -1500,7 +1500,7 @@ XS(XS_EntityList_DeletePlayerCorpses) { Perl_croak(aTHX_ "Usage: EntityList::DeletePlayerCorpses(THIS)"); { EntityList *THIS; - int32 RETVAL; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "EntityList")) { @@ -1615,8 +1615,8 @@ XS(XS_EntityList_Fighting) { Perl_croak(aTHX_ "Usage: EntityList::Fighting(THIS, Mob* target)"); { EntityList *THIS; - bool RETVAL; - Mob *targ; + bool RETVAL; + Mob *targ; if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -1649,7 +1649,7 @@ XS(XS_EntityList_RemoveFromHateLists) { { EntityList *THIS; Mob *mob; - bool settoone; + bool settoone; if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -1687,9 +1687,9 @@ XS(XS_EntityList_MessageGroup) { { EntityList *THIS; Mob *sender; - bool skipclose = (bool) SvTRUE(ST(2)); - uint32 type = (uint32) SvUV(ST(3)); - char *message = (char *) SvPV_nolen(ST(4)); + bool skipclose = (bool) SvTRUE(ST(2)); + uint32 type = (uint32) SvUV(ST(3)); + char *message = (char *) SvPV_nolen(ST(4)); if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); From 4a036116dd8dee83facb03fc1899ca9f2f055e97 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 19:55:50 -0500 Subject: [PATCH 239/670] Update perl_doors.cpp usage doc --- zone/perl_doors.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/zone/perl_doors.cpp b/zone/perl_doors.cpp index 0024f877e..27eacb701 100644 --- a/zone/perl_doors.cpp +++ b/zone/perl_doors.cpp @@ -305,7 +305,7 @@ XS(XS_Doors_GetNoKeyring) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Doors::GetNoKeyring(THIS, type)"); + Perl_croak(aTHX_ "Usage: Doors::GetNoKeyring(THIS, uint8 type)"); { Doors * THIS; uint8 type = (uint8)SvUV(ST(1)); @@ -383,7 +383,7 @@ XS(XS_Doors_SetOpenType) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Doors::SetOpenType(THIS, type)"); + Perl_croak(aTHX_ "Usage: Doors::SetOpenType(THIS, uint32 open_type)"); { Doors * THIS; uint32 type = (uint32)SvUV(ST(1)); @@ -407,7 +407,7 @@ XS(XS_Doors_SetLockpick) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Doors::SetLockpick(THIS, type)"); + Perl_croak(aTHX_ "Usage: Doors::SetLockpick(THIS, uint32 lockpick_type)"); { Doors * THIS; uint32 type = (uint32)SvUV(ST(1)); @@ -431,7 +431,7 @@ XS(XS_Doors_SetKeyItem) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Doors::SetKeyItem(THIS, type)"); + Perl_croak(aTHX_ "Usage: Doors::SetKeyItem(THIS, uint32 key_item_id)"); { Doors * THIS; uint32 type = (uint32)SvUV(ST(1)); @@ -455,7 +455,7 @@ XS(XS_Doors_SetNoKeyring) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Doors::SetNoKeyring(THIS, type)"); + Perl_croak(aTHX_ "Usage: Doors::SetNoKeyring(THIS, uint8 no_key_ring)"); { Doors * THIS; uint8 type = (uint8)SvUV(ST(1)); @@ -479,7 +479,7 @@ XS(XS_Doors_SetIncline) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Doors::SetIncline(THIS, type)"); + Perl_croak(aTHX_ "Usage: Doors::SetIncline(THIS, uint32 incline)"); { Doors * THIS; uint32 type = (uint32)SvUV(ST(1)); @@ -503,7 +503,7 @@ XS(XS_Doors_SetSize) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Doors::SetSize(THIS, size)"); + Perl_croak(aTHX_ "Usage: Doors::SetSize(THIS, uint32 size)"); { Doors * THIS; uint32 type = (uint32)SvUV(ST(1)); @@ -527,7 +527,7 @@ XS(XS_Doors_SetLocation) { dXSARGS; if (items != 4) - Perl_croak(aTHX_ "Usage: Doors::SetLocation(THIS, x, y, z)"); + Perl_croak(aTHX_ "Usage: Doors::SetLocation(THIS, float x, float y, float z)"); { Doors * THIS; float x = (float)SvNV(ST(1)); @@ -553,7 +553,7 @@ XS(XS_Doors_SetX) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Doors::SetX(THIS, XPos)"); + Perl_croak(aTHX_ "Usage: Doors::SetX(THIS, float x)"); { Doors * THIS; float x = (float)SvNV(ST(1)); @@ -578,7 +578,7 @@ XS(XS_Doors_SetY) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Doors::SetY(THIS, YPos)"); + Perl_croak(aTHX_ "Usage: Doors::SetY(THIS, float y)"); { Doors * THIS; float y = (float)SvNV(ST(1)); @@ -604,7 +604,7 @@ XS(XS_Doors_SetZ) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Doors::SetZ(THIS, ZPos)"); + Perl_croak(aTHX_ "Usage: Doors::SetZ(THIS, float z)"); { Doors * THIS; float z = (float)SvNV(ST(1)); @@ -630,7 +630,7 @@ XS(XS_Doors_SetHeading) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Doors::SetHeading(THIS, heading)"); + Perl_croak(aTHX_ "Usage: Doors::SetHeading(THIS, float heading)"); { Doors * THIS; float heading = (float)SvNV(ST(1)); @@ -656,7 +656,7 @@ XS(XS_Doors_SetModelName) { dXSARGS; if (items < 1 || items > 2) - Perl_croak(aTHX_ "Usage: Doors::SetModelName(THIS, name)"); + Perl_croak(aTHX_ "Usage: Doors::SetModelName(THIS, string name)"); { Doors * THIS; char * name = nullptr; From 86c9b6b079f87340dfd2d811766d42adfcbe4a00 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 19:56:02 -0500 Subject: [PATCH 240/670] perl_doors.cpp formatting --- zone/perl_doors.cpp | 553 ++++++++++++++++++++------------------------ 1 file changed, 256 insertions(+), 297 deletions(-) diff --git a/zone/perl_doors.cpp b/zone/perl_doors.cpp index 27eacb701..8c4f4ea98 100644 --- a/zone/perl_doors.cpp +++ b/zone/perl_doors.cpp @@ -26,7 +26,9 @@ */ #include "../common/features.h" + #ifdef EMBPERL_XS_CLASSES + #include "../common/global_define.h" #include "embperl.h" @@ -41,282 +43,270 @@ #endif XS(XS_Doors_GetDoorDBID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Doors_GetDoorDBID) -{ +XS(XS_Doors_GetDoorDBID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Doors::GetDoorDBID(THIS)"); { - Doors * THIS; - uint32 RETVAL; + Doors *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Doors")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Doors *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Doors *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Doors"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetDoorDBID(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Doors_GetDoorID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Doors_GetDoorID) -{ +XS(XS_Doors_GetDoorID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Doors::GetDoorID(THIS)"); { - Doors * THIS; - uint32 RETVAL; + Doors *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Doors")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Doors *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Doors *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Doors"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetDoorID(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Doors_GetID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Doors_GetID) -{ +XS(XS_Doors_GetID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Doors::GetID(THIS)"); { - Doors * THIS; - uint16 RETVAL; + Doors *THIS; + uint16 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Doors")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Doors *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Doors *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Doors"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetEntityID(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Doors_GetX); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Doors_GetX) -{ +XS(XS_Doors_GetX) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Doors::GetX(THIS)"); { - Doors * THIS; - float RETVAL; + Doors *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Doors")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Doors *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Doors *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Doors"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetPosition().x; - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Doors_GetY); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Doors_GetY) -{ +XS(XS_Doors_GetY) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Doors::GetY(THIS)"); { - Doors * THIS; - float RETVAL; + Doors *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Doors")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Doors *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Doors *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Doors"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetPosition().y; - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Doors_GetZ); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Doors_GetZ) -{ +XS(XS_Doors_GetZ) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Doors::GetZ(THIS)"); { - Doors * THIS; - float RETVAL; + Doors *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Doors")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Doors *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Doors *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Doors"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetPosition().z; - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Doors_GetHeading); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Doors_GetHeading) -{ +XS(XS_Doors_GetHeading) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Doors::GetHeading(THIS)"); { - Doors * THIS; - float RETVAL; + Doors *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Doors")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Doors *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Doors *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Doors"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetPosition().w; - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Doors_GetOpenType); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Doors_GetOpenType) -{ +XS(XS_Doors_GetOpenType) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Doors::GetOpenType(THIS)"); { - Doors * THIS; - uint32 RETVAL; + Doors *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Doors")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Doors *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Doors *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Doors"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetOpenType(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Doors_GetLockpick); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Doors_GetLockpick) -{ +XS(XS_Doors_GetLockpick) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Doors::GetLockpick(THIS)"); { - Doors * THIS; - uint32 RETVAL; + Doors *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Doors")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Doors *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Doors *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Doors"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetLockpick(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Doors_GetKeyItem); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Doors_GetKeyItem) -{ +XS(XS_Doors_GetKeyItem) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Doors::GetKeyItem(THIS)"); { - Doors * THIS; - uint32 RETVAL; + Doors *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Doors")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Doors *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Doors *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Doors"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetKeyItem(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Doors_GetNoKeyring); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Doors_GetNoKeyring) -{ +XS(XS_Doors_GetNoKeyring) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Doors::GetNoKeyring(THIS, uint8 type)"); { - Doors * THIS; - uint8 type = (uint8)SvUV(ST(1)); + Doors *THIS; + uint8 type = (uint8) SvUV(ST(1)); if (sv_derived_from(ST(0), "Doors")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Doors *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Doors *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Doors"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->GetNoKeyring(); @@ -325,76 +315,71 @@ XS(XS_Doors_GetNoKeyring) } XS(XS_Doors_GetIncline); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Doors_GetIncline) -{ +XS(XS_Doors_GetIncline) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Doors::GetIncline(THIS)"); { - Doors * THIS; - uint32 RETVAL; + Doors *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Doors")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Doors *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Doors *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Doors"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetIncline(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Doors_GetSize); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Doors_GetSize) -{ +XS(XS_Doors_GetSize) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Doors::GetIncline(THIS)"); { - Doors * THIS; - uint32 RETVAL; + Doors *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Doors")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Doors *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Doors *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Doors"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSize(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } - XS(XS_Doors_SetOpenType); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Doors_SetOpenType) -{ +XS(XS_Doors_SetOpenType) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Doors::SetOpenType(THIS, uint32 open_type)"); { - Doors * THIS; - uint32 type = (uint32)SvUV(ST(1)); + Doors *THIS; + uint32 type = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "Doors")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Doors *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Doors *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Doors"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetOpenType(type); @@ -403,22 +388,20 @@ XS(XS_Doors_SetOpenType) } XS(XS_Doors_SetLockpick); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Doors_SetLockpick) -{ +XS(XS_Doors_SetLockpick) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Doors::SetLockpick(THIS, uint32 lockpick_type)"); { - Doors * THIS; - uint32 type = (uint32)SvUV(ST(1)); + Doors *THIS; + uint32 type = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "Doors")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Doors *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Doors *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Doors"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetLockpick(type); @@ -427,22 +410,20 @@ XS(XS_Doors_SetLockpick) } XS(XS_Doors_SetKeyItem); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Doors_SetKeyItem) -{ +XS(XS_Doors_SetKeyItem) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Doors::SetKeyItem(THIS, uint32 key_item_id)"); { - Doors * THIS; - uint32 type = (uint32)SvUV(ST(1)); + Doors *THIS; + uint32 type = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "Doors")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Doors *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Doors *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Doors"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetKeyItem(type); @@ -451,22 +432,20 @@ XS(XS_Doors_SetKeyItem) } XS(XS_Doors_SetNoKeyring); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Doors_SetNoKeyring) -{ +XS(XS_Doors_SetNoKeyring) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Doors::SetNoKeyring(THIS, uint8 no_key_ring)"); { - Doors * THIS; - uint8 type = (uint8)SvUV(ST(1)); + Doors *THIS; + uint8 type = (uint8) SvUV(ST(1)); if (sv_derived_from(ST(0), "Doors")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Doors *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Doors *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Doors"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetNoKeyring(type); @@ -475,22 +454,20 @@ XS(XS_Doors_SetNoKeyring) } XS(XS_Doors_SetIncline); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Doors_SetIncline) -{ +XS(XS_Doors_SetIncline) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Doors::SetIncline(THIS, uint32 incline)"); { - Doors * THIS; - uint32 type = (uint32)SvUV(ST(1)); + Doors *THIS; + uint32 type = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "Doors")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Doors *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Doors *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Doors"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetIncline(type); @@ -499,22 +476,20 @@ XS(XS_Doors_SetIncline) } XS(XS_Doors_SetSize); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Doors_SetSize) -{ +XS(XS_Doors_SetSize) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Doors::SetSize(THIS, uint32 size)"); { - Doors * THIS; - uint32 type = (uint32)SvUV(ST(1)); + Doors *THIS; + uint32 type = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "Doors")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Doors *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Doors *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Doors"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetSize(type); @@ -523,24 +498,22 @@ XS(XS_Doors_SetSize) } XS(XS_Doors_SetLocation); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Doors_SetLocation) -{ +XS(XS_Doors_SetLocation) { dXSARGS; if (items != 4) Perl_croak(aTHX_ "Usage: Doors::SetLocation(THIS, float x, float y, float z)"); { - Doors * THIS; - float x = (float)SvNV(ST(1)); - float y = (float)SvNV(ST(2)); - float z = (float)SvNV(ST(3)); + Doors *THIS; + float x = (float) SvNV(ST(1)); + float y = (float) SvNV(ST(2)); + float z = (float) SvNV(ST(3)); if (sv_derived_from(ST(0), "Doors")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Doors *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Doors *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Doors"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetLocation(x, y, z); @@ -549,175 +522,163 @@ XS(XS_Doors_SetLocation) } XS(XS_Doors_SetX); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Doors_SetX) -{ +XS(XS_Doors_SetX) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Doors::SetX(THIS, float x)"); { - Doors * THIS; - float x = (float)SvNV(ST(1)); + Doors *THIS; + float x = (float) SvNV(ST(1)); if (sv_derived_from(ST(0), "Doors")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Doors *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Doors *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Doors"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - auto position = THIS->GetPosition(); - position.x = x; + auto position = THIS->GetPosition(); + position.x = x; THIS->SetPosition(position); } XSRETURN_EMPTY; } XS(XS_Doors_SetY); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Doors_SetY) -{ +XS(XS_Doors_SetY) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Doors::SetY(THIS, float y)"); { - Doors * THIS; - float y = (float)SvNV(ST(1)); + Doors *THIS; + float y = (float) SvNV(ST(1)); if (sv_derived_from(ST(0), "Doors")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Doors *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Doors *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Doors"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - auto position = THIS->GetPosition(); - position.y = y; + auto position = THIS->GetPosition(); + position.y = y; THIS->SetPosition(position); } XSRETURN_EMPTY; } XS(XS_Doors_SetZ); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Doors_SetZ) -{ +XS(XS_Doors_SetZ) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Doors::SetZ(THIS, float z)"); { - Doors * THIS; - float z = (float)SvNV(ST(1)); + Doors *THIS; + float z = (float) SvNV(ST(1)); if (sv_derived_from(ST(0), "Doors")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Doors *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Doors *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Doors"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); auto position = THIS->GetPosition(); - position.z = z; + position.z = z; THIS->SetPosition(position); } XSRETURN_EMPTY; } XS(XS_Doors_SetHeading); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Doors_SetHeading) -{ +XS(XS_Doors_SetHeading) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Doors::SetHeading(THIS, float heading)"); { - Doors * THIS; - float heading = (float)SvNV(ST(1)); + Doors *THIS; + float heading = (float) SvNV(ST(1)); if (sv_derived_from(ST(0), "Doors")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Doors *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Doors *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Doors"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); auto position = THIS->GetPosition(); - position.w = heading; + position.w = heading; THIS->SetPosition(position); } XSRETURN_EMPTY; } XS(XS_Doors_SetModelName); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Doors_SetModelName) -{ +XS(XS_Doors_SetModelName) { dXSARGS; if (items < 1 || items > 2) Perl_croak(aTHX_ "Usage: Doors::SetModelName(THIS, string name)"); { - Doors * THIS; - char * name = nullptr; + Doors *THIS; + char *name = nullptr; if (sv_derived_from(ST(0), "Doors")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Doors *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Doors *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Doors"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - if (items > 1) { name = (char *)SvPV_nolen(ST(1)); } + if (items > 1) { name = (char *) SvPV_nolen(ST(1)); } THIS->SetDoorName(name); } XSRETURN_EMPTY; } XS(XS_Doors_GetModelName); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Doors_GetModelName) -{ +XS(XS_Doors_GetModelName) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Doors::GetModelName(THIS)"); { - Doors * THIS; - Const_char * RETVAL; + Doors *THIS; + Const_char *RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Doors")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Doors *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Doors *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Doors"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetDoorName(); - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; + sv_setpv(TARG, RETVAL); + XSprePUSH; + PUSHTARG; } XSRETURN(1); } XS(XS_Doors_CreateDatabaseEntry); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Doors_CreateDatabaseEntry) -{ +XS(XS_Doors_CreateDatabaseEntry) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Doors::InsertDoor(THIS)"); { - Doors * THIS; + Doors *THIS; if (sv_derived_from(ST(0), "Doors")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Doors *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Doors *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Doors"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->CreateDatabaseEntry(); @@ -726,52 +687,50 @@ XS(XS_Doors_CreateDatabaseEntry) } - #ifdef __cplusplus extern "C" #endif XS(boot_Doors); /* prototype to pass -Wmissing-prototypes */ -XS(boot_Doors) -{ +XS(boot_Doors) { dXSARGS; char file[256]; strncpy(file, __FILE__, 256); file[255] = 0; - if(items != 1) + if (items != 1) fprintf(stderr, "boot_quest does not take any arguments."); char buf[128]; //add the strcpy stuff to get rid of const warnings.... - XS_VERSION_BOOTCHECK ; - newXSproto(strcpy(buf, "GetID"),XS_Doors_GetID, file, "$"); - newXSproto(strcpy(buf, "SetModelName"),XS_Doors_SetModelName, file, "$$"); - newXSproto(strcpy(buf, "GetModelName"),XS_Doors_GetModelName, file, "$"); - newXSproto(strcpy(buf, "GetX"),XS_Doors_GetX, file, "$"); - newXSproto(strcpy(buf, "GetY"),XS_Doors_GetY, file, "$"); - newXSproto(strcpy(buf, "GetZ"),XS_Doors_GetZ, file, "$"); - newXSproto(strcpy(buf, "GetHeading"),XS_Doors_GetHeading, file, "$"); - newXSproto(strcpy(buf, "SetX"),XS_Doors_SetX, file, "$$"); - newXSproto(strcpy(buf, "SetY"),XS_Doors_SetY, file, "$$"); - newXSproto(strcpy(buf, "SetZ"),XS_Doors_SetZ, file, "$$"); - newXSproto(strcpy(buf, "SetHeading"),XS_Doors_SetHeading, file, "$$"); - newXSproto(strcpy(buf, "SetLocation"),XS_Doors_SetLocation, file, "$$$$"); - newXSproto(strcpy(buf, "GetDoorDBID"),XS_Doors_GetDoorDBID, file, "$"); - newXSproto(strcpy(buf, "GetDoorID"),XS_Doors_GetDoorID, file, "$"); - newXSproto(strcpy(buf, "SetSize"),XS_Doors_SetSize, file, "$$"); - newXSproto(strcpy(buf, "GetSize"),XS_Doors_GetSize, file, "$"); - newXSproto(strcpy(buf, "SetIncline"),XS_Doors_SetIncline, file, "$$"); - newXSproto(strcpy(buf, "GetIncline"),XS_Doors_GetIncline, file, "$"); - newXSproto(strcpy(buf, "SetOpenType"),XS_Doors_SetOpenType, file, "$$"); - newXSproto(strcpy(buf, "GetOpenType"),XS_Doors_GetOpenType, file, "$"); - newXSproto(strcpy(buf, "SetLockPick"),XS_Doors_SetLockpick, file, "$$"); - newXSproto(strcpy(buf, "GetLockPick"),XS_Doors_GetLockpick, file, "$"); - newXSproto(strcpy(buf, "SetKeyItem"),XS_Doors_SetKeyItem, file, "$$"); - newXSproto(strcpy(buf, "GetKeyItem"),XS_Doors_GetKeyItem, file, "$"); - newXSproto(strcpy(buf, "SetNoKeyring"),XS_Doors_SetNoKeyring, file, "$$"); - newXSproto(strcpy(buf, "GetNoKeyring"),XS_Doors_GetNoKeyring, file, "$"); - newXSproto(strcpy(buf, "CreateDatabaseEntry"),XS_Doors_CreateDatabaseEntry, file, "$"); + XS_VERSION_BOOTCHECK; + newXSproto(strcpy(buf, "GetID"), XS_Doors_GetID, file, "$"); + newXSproto(strcpy(buf, "SetModelName"), XS_Doors_SetModelName, file, "$$"); + newXSproto(strcpy(buf, "GetModelName"), XS_Doors_GetModelName, file, "$"); + newXSproto(strcpy(buf, "GetX"), XS_Doors_GetX, file, "$"); + newXSproto(strcpy(buf, "GetY"), XS_Doors_GetY, file, "$"); + newXSproto(strcpy(buf, "GetZ"), XS_Doors_GetZ, file, "$"); + newXSproto(strcpy(buf, "GetHeading"), XS_Doors_GetHeading, file, "$"); + newXSproto(strcpy(buf, "SetX"), XS_Doors_SetX, file, "$$"); + newXSproto(strcpy(buf, "SetY"), XS_Doors_SetY, file, "$$"); + newXSproto(strcpy(buf, "SetZ"), XS_Doors_SetZ, file, "$$"); + newXSproto(strcpy(buf, "SetHeading"), XS_Doors_SetHeading, file, "$$"); + newXSproto(strcpy(buf, "SetLocation"), XS_Doors_SetLocation, file, "$$$$"); + newXSproto(strcpy(buf, "GetDoorDBID"), XS_Doors_GetDoorDBID, file, "$"); + newXSproto(strcpy(buf, "GetDoorID"), XS_Doors_GetDoorID, file, "$"); + newXSproto(strcpy(buf, "SetSize"), XS_Doors_SetSize, file, "$$"); + newXSproto(strcpy(buf, "GetSize"), XS_Doors_GetSize, file, "$"); + newXSproto(strcpy(buf, "SetIncline"), XS_Doors_SetIncline, file, "$$"); + newXSproto(strcpy(buf, "GetIncline"), XS_Doors_GetIncline, file, "$"); + newXSproto(strcpy(buf, "SetOpenType"), XS_Doors_SetOpenType, file, "$$"); + newXSproto(strcpy(buf, "GetOpenType"), XS_Doors_GetOpenType, file, "$"); + newXSproto(strcpy(buf, "SetLockPick"), XS_Doors_SetLockpick, file, "$$"); + newXSproto(strcpy(buf, "GetLockPick"), XS_Doors_GetLockpick, file, "$"); + newXSproto(strcpy(buf, "SetKeyItem"), XS_Doors_SetKeyItem, file, "$$"); + newXSproto(strcpy(buf, "GetKeyItem"), XS_Doors_GetKeyItem, file, "$"); + newXSproto(strcpy(buf, "SetNoKeyring"), XS_Doors_SetNoKeyring, file, "$$"); + newXSproto(strcpy(buf, "GetNoKeyring"), XS_Doors_GetNoKeyring, file, "$"); + newXSproto(strcpy(buf, "CreateDatabaseEntry"), XS_Doors_CreateDatabaseEntry, file, "$"); XSRETURN_YES; } #endif //EMBPERL_XS_CLASSES From ef39395580a5d307c6f92a9619008c648426978a Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 19:56:11 -0500 Subject: [PATCH 241/670] Add Doors to perl-doc-parser.pl --- utils/scripts/perl-doc-parser.pl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/utils/scripts/perl-doc-parser.pl b/utils/scripts/perl-doc-parser.pl index 80f72982c..98baf0b73 100755 --- a/utils/scripts/perl-doc-parser.pl +++ b/utils/scripts/perl-doc-parser.pl @@ -6,6 +6,7 @@ sub usage() { print " --client - Prints methods for just client class methods\n"; print " --mob - Prints methods for just mob class methods\n"; print " --entity - Prints methods for just entity class methods\n"; + print " --door - Prints methods for just door class methods\n"; print " --corpse - Prints methods for just corpse class methods\n"; print " --all - Prints methods for all classes\n"; exit(1); @@ -47,7 +48,7 @@ for my $file (@files) { chomp; $line = $_; - if ($line=~/Client::|Mob::|Corpse::|EntityList::/i && $line=~/_croak/i) { + if ($line=~/Client::|Mob::|Corpse::|EntityList::|Doors::/i && $line=~/_croak/i) { #::: Client export if ($export=~/all|client/i) { @@ -73,6 +74,12 @@ for my $file (@files) { $object_prefix = "\$entity_list->"; } + #::: Doors export + if ($export=~/all|door/i) { + $split_key = "Doors::"; + $object_prefix = "\$door->"; + } + #::: Split on croak usage @data = split($split_key, $line); $usage = trim($data[1]); From 782c5ebc7532fcd47ea1008ff5e5625723506162 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 20:00:52 -0500 Subject: [PATCH 242/670] Add group to perl-doc-parser.pl - update usage docs for perl_groups.cpp --- utils/scripts/perl-doc-parser.pl | 9 ++++++++- zone/perl_groups.cpp | 22 +++++++++++----------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/utils/scripts/perl-doc-parser.pl b/utils/scripts/perl-doc-parser.pl index 98baf0b73..0bc01b6c5 100755 --- a/utils/scripts/perl-doc-parser.pl +++ b/utils/scripts/perl-doc-parser.pl @@ -7,6 +7,7 @@ sub usage() { print " --mob - Prints methods for just mob class methods\n"; print " --entity - Prints methods for just entity class methods\n"; print " --door - Prints methods for just door class methods\n"; + print " --group - Prints methods for just group class methods\n"; print " --corpse - Prints methods for just corpse class methods\n"; print " --all - Prints methods for all classes\n"; exit(1); @@ -48,7 +49,7 @@ for my $file (@files) { chomp; $line = $_; - if ($line=~/Client::|Mob::|Corpse::|EntityList::|Doors::/i && $line=~/_croak/i) { + if ($line=~/Client::|Mob::|Corpse::|EntityList::|Doors::|Group::/i && $line=~/_croak/i) { #::: Client export if ($export=~/all|client/i) { @@ -80,6 +81,12 @@ for my $file (@files) { $object_prefix = "\$door->"; } + #::: Group export + if ($export=~/all|group/i) { + $split_key = "Group::"; + $object_prefix = "\$group->"; + } + #::: Split on croak usage @data = split($split_key, $line); $usage = trim($data[1]); diff --git a/zone/perl_groups.cpp b/zone/perl_groups.cpp index e264b7d7a..fbc0355dd 100644 --- a/zone/perl_groups.cpp +++ b/zone/perl_groups.cpp @@ -105,7 +105,7 @@ XS(XS_Group_CastGroupSpell) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Group::CastGroupSpell(THIS, caster, spellid)"); + Perl_croak(aTHX_ "Usage: Group::CastGroupSpell(THIS, Mob* caster, uint16 spell_id)"); { Group * THIS; Mob* caster; @@ -139,7 +139,7 @@ XS(XS_Group_SplitExp) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Group::SplitExp(THIS, exp, other)"); + Perl_croak(aTHX_ "Usage: Group::SplitExp(THIS, uint32 exp, Mob* other)"); { Group * THIS; uint32 exp = (uint32)SvUV(ST(1)); @@ -173,7 +173,7 @@ XS(XS_Group_GroupMessage) { dXSARGS; if ((items != 3) && (items != 4)) // the 3 item version is kept for backwards compatability - Perl_croak(aTHX_ "Usage: Group::GroupMessage(THIS, sender, language, message)"); + Perl_croak(aTHX_ "Usage: Group::GroupMessage(THIS, Mob* sender, uint8 language, string message)"); { Group * THIS; Mob* sender; @@ -218,7 +218,7 @@ XS(XS_Group_GetTotalGroupDamage) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Group::GetTotalGroupDamage(THIS, other)"); + Perl_croak(aTHX_ "Usage: Group::GetTotalGroupDamage(THIS, Mob* other)"); { Group * THIS; uint32 RETVAL; @@ -254,7 +254,7 @@ XS(XS_Group_SplitMoney) { dXSARGS; if (items != 5) - Perl_croak(aTHX_ "Usage: Group::SplitMoney(THIS, copper, silver, gold, platinum)"); + Perl_croak(aTHX_ "Usage: Group::SplitMoney(THIS, uint32 copper, uint32 silver, uint32 gold, uint32 platinum)"); { Group * THIS; uint32 copper = (uint32)SvUV(ST(1)); @@ -281,7 +281,7 @@ XS(XS_Group_SetLeader) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Group::SetLeader(THIS, newleader)"); + Perl_croak(aTHX_ "Usage: Group::SetLeader(THIS, Mob* new_leader)"); { Group * THIS; Mob* newleader; @@ -366,7 +366,7 @@ XS(XS_Group_SendHPPacketsTo) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Group::SendHPPacketsTo(THIS, newmember)"); + Perl_croak(aTHX_ "Usage: Group::SendHPPacketsTo(THIS, Mob* new_member)"); { Group * THIS; Mob* newmember; @@ -399,7 +399,7 @@ XS(XS_Group_SendHPPacketsFrom) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Group::SendHPPacketsFrom(THIS, newmember)"); + Perl_croak(aTHX_ "Usage: Group::SendHPPacketsFrom(THIS, Mob* new_member)"); { Group * THIS; Mob* newmember; @@ -432,7 +432,7 @@ XS(XS_Group_IsLeader) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Group::IsLeader(THIS, leadertest)"); + Perl_croak(aTHX_ "Usage: Group::IsLeader(THIS, Mob* target)"); { Group * THIS; bool RETVAL; @@ -520,7 +520,7 @@ XS(XS_Group_TeleportGroup) { dXSARGS; if (items != 7) - Perl_croak(aTHX_ "Usage: Group::TeleportGroup(THIS, sender, zoneID, x, y, z, heading)"); + Perl_croak(aTHX_ "Usage: Group::TeleportGroup(THIS, Mob* sender, uint32 zone_id, float x, float y, float z, float heading)"); { Group * THIS; Mob* sender; @@ -584,7 +584,7 @@ XS(XS_Group_GetMember) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Group::GetMember(THIS, index)"); + Perl_croak(aTHX_ "Usage: Group::GetMember(THIS, int group_index)"); { Group * THIS; Mob* member; From cf6a9d6b2a982f9ec3385051cee2a5cc8ff390a9 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 20:01:03 -0500 Subject: [PATCH 243/670] perl_groups.cpp formatting --- zone/perl_groups.cpp | 495 ++++++++++++++++++++----------------------- 1 file changed, 228 insertions(+), 267 deletions(-) diff --git a/zone/perl_groups.cpp b/zone/perl_groups.cpp index fbc0355dd..0eaf8f45e 100644 --- a/zone/perl_groups.cpp +++ b/zone/perl_groups.cpp @@ -26,7 +26,9 @@ */ #include "../common/features.h" + #ifdef EMBPERL_XS_CLASSES + #include "../common/global_define.h" #include "embperl.h" @@ -42,21 +44,19 @@ XS(XS_Group_DisbandGroup); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Group_DisbandGroup) -{ +XS(XS_Group_DisbandGroup) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Group::DisbandGroup(THIS)"); { - Group * THIS; + Group *THIS; if (sv_derived_from(ST(0), "Group")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Group *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Group *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Group"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->DisbandGroup(); @@ -65,32 +65,29 @@ XS(XS_Group_DisbandGroup) } XS(XS_Group_IsGroupMember); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Group_IsGroupMember) -{ +XS(XS_Group_IsGroupMember) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Group::IsGroupMember(THIS, client)"); { - Group * THIS; - bool RETVAL; - Mob* client; + Group *THIS; + bool RETVAL; + Mob *client; if (sv_derived_from(ST(0), "Group")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Group *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Group *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Group"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - client = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + client = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "client is not of type Mob"); - if(client == nullptr) + if (client == nullptr) Perl_croak(aTHX_ "client is nullptr, avoiding crash."); RETVAL = THIS->IsGroupMember(client); @@ -101,32 +98,29 @@ XS(XS_Group_IsGroupMember) } XS(XS_Group_CastGroupSpell); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Group_CastGroupSpell) -{ +XS(XS_Group_CastGroupSpell) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Group::CastGroupSpell(THIS, Mob* caster, uint16 spell_id)"); { - Group * THIS; - Mob* caster; - uint16 spellid = (uint16)SvUV(ST(2)); + Group *THIS; + Mob *caster; + uint16 spellid = (uint16) SvUV(ST(2)); if (sv_derived_from(ST(0), "Group")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Group *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Group *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Group"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - caster = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + caster = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "caster is not of type Mob"); - if(caster == nullptr) + if (caster == nullptr) Perl_croak(aTHX_ "caster is nullptr, avoiding crash."); THIS->CastGroupSpell(caster, spellid); @@ -135,32 +129,29 @@ XS(XS_Group_CastGroupSpell) } XS(XS_Group_SplitExp); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Group_SplitExp) -{ +XS(XS_Group_SplitExp) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Group::SplitExp(THIS, uint32 exp, Mob* other)"); { - Group * THIS; - uint32 exp = (uint32)SvUV(ST(1)); - Mob* other; + Group *THIS; + uint32 exp = (uint32) SvUV(ST(1)); + Mob *other; if (sv_derived_from(ST(0), "Group")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Group *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Group *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Group"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(2), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(2))); - other = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(2))); + other = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "other is not of type Mob"); - if(other == nullptr) + if (other == nullptr) Perl_croak(aTHX_ "other is nullptr, avoiding crash."); THIS->SplitExp(exp, other); @@ -169,106 +160,98 @@ XS(XS_Group_SplitExp) } XS(XS_Group_GroupMessage); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Group_GroupMessage) -{ +XS(XS_Group_GroupMessage) { dXSARGS; - if ((items != 3) && (items != 4)) // the 3 item version is kept for backwards compatability + if ((items != 3) && (items != 4)) // the 3 item version is kept for backwards compatability Perl_croak(aTHX_ "Usage: Group::GroupMessage(THIS, Mob* sender, uint8 language, string message)"); { - Group * THIS; - Mob* sender; - uint8 language; - char* message; + Group *THIS; + Mob *sender; + uint8 language; + char *message; if (sv_derived_from(ST(0), "Group")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Group *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Group *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Group"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - sender = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + sender = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "sender is not of type Mob"); - if(sender == nullptr) + if (sender == nullptr) Perl_croak(aTHX_ "sender is nullptr, avoiding crash."); if (items == 4) { - language = (uint8)SvUV(ST(2)); + language = (uint8) SvUV(ST(2)); if ((language >= MAX_PP_LANGUAGE) || (language < 0)) language = 0; - message = (char *)SvPV_nolen(ST(3)); + message = (char *) SvPV_nolen(ST(3)); THIS->GroupMessage(sender, language, 100, message); - } - else { // if no language is specificed, send it in common - message = (char *)SvPV_nolen(ST(2)); - THIS->GroupMessage(sender,0, 100, message); + } else { // if no language is specificed, send it in common + message = (char *) SvPV_nolen(ST(2)); + THIS->GroupMessage(sender, 0, 100, message); } } XSRETURN_EMPTY; } XS(XS_Group_GetTotalGroupDamage); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Group_GetTotalGroupDamage) -{ +XS(XS_Group_GetTotalGroupDamage) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Group::GetTotalGroupDamage(THIS, Mob* other)"); { - Group * THIS; - uint32 RETVAL; + Group *THIS; + uint32 RETVAL; dXSTARG; - Mob* other; + Mob *other; if (sv_derived_from(ST(0), "Group")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Group *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Group *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Group"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - other = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + other = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "other is not of type Mob"); - if(other == nullptr) + if (other == nullptr) Perl_croak(aTHX_ "other is nullptr, avoiding crash."); RETVAL = THIS->GetTotalGroupDamage(other); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Group_SplitMoney); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Group_SplitMoney) -{ +XS(XS_Group_SplitMoney) { dXSARGS; if (items != 5) Perl_croak(aTHX_ "Usage: Group::SplitMoney(THIS, uint32 copper, uint32 silver, uint32 gold, uint32 platinum)"); { - Group * THIS; - uint32 copper = (uint32)SvUV(ST(1)); - uint32 silver = (uint32)SvUV(ST(2)); - uint32 gold = (uint32)SvUV(ST(3)); - uint32 platinum = (uint32)SvUV(ST(4)); + Group *THIS; + uint32 copper = (uint32) SvUV(ST(1)); + uint32 silver = (uint32) SvUV(ST(2)); + uint32 gold = (uint32) SvUV(ST(3)); + uint32 platinum = (uint32) SvUV(ST(4)); if (sv_derived_from(ST(0), "Group")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Group *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Group *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Group"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SplitMoney(copper, silver, gold, platinum); @@ -277,31 +260,28 @@ XS(XS_Group_SplitMoney) } XS(XS_Group_SetLeader); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Group_SetLeader) -{ +XS(XS_Group_SetLeader) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Group::SetLeader(THIS, Mob* new_leader)"); { - Group * THIS; - Mob* newleader; + Group *THIS; + Mob *newleader; if (sv_derived_from(ST(0), "Group")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Group *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Group *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Group"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - newleader = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + newleader = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "newleader is not of type Mob"); - if(newleader == nullptr) + if (newleader == nullptr) Perl_croak(aTHX_ "newleader is nullptr, avoiding crash."); THIS->SetLeader(newleader); @@ -310,83 +290,78 @@ XS(XS_Group_SetLeader) } XS(XS_Group_GetLeader); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Group_GetLeader) -{ +XS(XS_Group_GetLeader) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Group::GetLeader(THIS)"); { - Group * THIS; - Mob * RETVAL; + Group *THIS; + Mob *RETVAL; if (sv_derived_from(ST(0), "Group")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Group *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Group *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Group"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetLeader(); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Mob", (void*)RETVAL); + sv_setref_pv(ST(0), "Mob", (void *) RETVAL); } XSRETURN(1); } XS(XS_Group_GetLeaderName); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Group_GetLeaderName) -{ +XS(XS_Group_GetLeaderName) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Group::GetLeaderName(THIS)"); { - Group * THIS; - const char * RETVAL; + Group *THIS; + const char *RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Group")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Group *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Group *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Group"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetLeaderName(); - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; + sv_setpv(TARG, RETVAL); + XSprePUSH; + PUSHTARG; } XSRETURN(1); } XS(XS_Group_SendHPPacketsTo); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Group_SendHPPacketsTo) -{ +XS(XS_Group_SendHPPacketsTo) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Group::SendHPPacketsTo(THIS, Mob* new_member)"); { - Group * THIS; - Mob* newmember; + Group *THIS; + Mob *newmember; if (sv_derived_from(ST(0), "Group")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Group *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Group *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Group"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - newmember = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + newmember = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "newmember is not of type Mob"); - if(newmember == nullptr) + if (newmember == nullptr) Perl_croak(aTHX_ "newmember is nullptr, avoiding crash."); THIS->SendHPManaEndPacketsTo(newmember); @@ -395,31 +370,28 @@ XS(XS_Group_SendHPPacketsTo) } XS(XS_Group_SendHPPacketsFrom); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Group_SendHPPacketsFrom) -{ +XS(XS_Group_SendHPPacketsFrom) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Group::SendHPPacketsFrom(THIS, Mob* new_member)"); { - Group * THIS; - Mob* newmember; + Group *THIS; + Mob *newmember; if (sv_derived_from(ST(0), "Group")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Group *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Group *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Group"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - newmember = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + newmember = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "newmember is not of type Mob"); - if(newmember == nullptr) + if (newmember == nullptr) Perl_croak(aTHX_ "newmember is nullptr, avoiding crash."); THIS->SendHPPacketsFrom(newmember); @@ -428,32 +400,29 @@ XS(XS_Group_SendHPPacketsFrom) } XS(XS_Group_IsLeader); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Group_IsLeader) -{ +XS(XS_Group_IsLeader) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Group::IsLeader(THIS, Mob* target)"); { - Group * THIS; - bool RETVAL; - Mob* leadertest; + Group *THIS; + bool RETVAL; + Mob *leadertest; if (sv_derived_from(ST(0), "Group")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Group *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Group *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Group"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - leadertest = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + leadertest = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "leadertest is not of type Mob"); - if(leadertest == nullptr) + if (leadertest == nullptr) Perl_croak(aTHX_ "leadertest is nullptr, avoiding crash."); RETVAL = THIS->IsLeader(leadertest); @@ -464,88 +433,84 @@ XS(XS_Group_IsLeader) } XS(XS_Group_GroupCount); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Group_GroupCount) -{ +XS(XS_Group_GroupCount) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Group::GroupCount(THIS)"); { - Group * THIS; - uint8 RETVAL; + Group *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Group")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Group *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Group *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Group"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GroupCount(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Group_GetHighestLevel); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Group_GetHighestLevel) -{ +XS(XS_Group_GetHighestLevel) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Group::GetHighestLevel(THIS)"); { - Group * THIS; - uint32 RETVAL; + Group *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Group")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Group *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Group *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Group"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetHighestLevel(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Group_TeleportGroup); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Group_TeleportGroup) -{ +XS(XS_Group_TeleportGroup) { dXSARGS; if (items != 7) - Perl_croak(aTHX_ "Usage: Group::TeleportGroup(THIS, Mob* sender, uint32 zone_id, float x, float y, float z, float heading)"); + Perl_croak(aTHX_ + "Usage: Group::TeleportGroup(THIS, Mob* sender, uint32 zone_id, float x, float y, float z, float heading)"); { - Group * THIS; - Mob* sender; - uint32 zoneID = (uint32)SvUV(ST(2)); - float x = (float)SvNV(ST(3)); - float y = (float)SvNV(ST(4)); - float z = (float)SvNV(ST(5)); - float heading = (float)SvNV(ST(6)); + Group *THIS; + Mob *sender; + uint32 zoneID = (uint32) SvUV(ST(2)); + float x = (float) SvNV(ST(3)); + float y = (float) SvNV(ST(4)); + float z = (float) SvNV(ST(5)); + float heading = (float) SvNV(ST(6)); if (sv_derived_from(ST(0), "Group")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Group *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Group *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Group"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - sender = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + sender = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "sender is not of type Mob"); - if(sender == nullptr) + if (sender == nullptr) Perl_croak(aTHX_ "sender is nullptr, avoiding crash."); THIS->TeleportGroup(sender, zoneID, 0, x, y, z, heading); @@ -554,63 +519,60 @@ XS(XS_Group_TeleportGroup) } XS(XS_Group_GetID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Group_GetID) -{ +XS(XS_Group_GetID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Group::GetID(THIS)"); { - Group * THIS; - uint32 RETVAL; + Group *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Group")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Group *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Group *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Group"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetID(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Group_GetMember); -XS(XS_Group_GetMember) -{ +XS(XS_Group_GetMember) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Group::GetMember(THIS, int group_index)"); { - Group * THIS; - Mob* member; - Client* RETVAL = nullptr; + Group *THIS; + Mob *member; + Client *RETVAL = nullptr; dXSTARG; if (sv_derived_from(ST(0), "Group")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Group *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Group *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Group"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - int index = (int)SvUV(ST(1)); + int index = (int) SvUV(ST(1)); if (index < 0 || index > 5) RETVAL = nullptr; else { - member = THIS->members[index]; + member = THIS->members[index]; if (member != nullptr) RETVAL = member->CastToClient(); } - ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Client", (void*)RETVAL); + ST(0) = sv_newmortal(); + sv_setref_pv(ST(0), "Client", (void *) RETVAL); } XSRETURN(1); } @@ -619,39 +581,38 @@ XS(XS_Group_GetMember) extern "C" #endif XS(boot_Group); /* prototype to pass -Wmissing-prototypes */ -XS(boot_Group) -{ +XS(boot_Group) { dXSARGS; char file[256]; strncpy(file, __FILE__, 256); file[255] = 0; - if(items != 1) + if (items != 1) fprintf(stderr, "boot_quest does not take any arguments."); char buf[128]; //add the strcpy stuff to get rid of const warnings.... - XS_VERSION_BOOTCHECK ; + XS_VERSION_BOOTCHECK; - newXSproto(strcpy(buf, "DisbandGroup"), XS_Group_DisbandGroup, file, "$"); - newXSproto(strcpy(buf, "IsGroupMember"), XS_Group_IsGroupMember, file, "$$"); - newXSproto(strcpy(buf, "CastGroupSpell"), XS_Group_CastGroupSpell, file, "$$$"); - newXSproto(strcpy(buf, "SplitExp"), XS_Group_SplitExp, file, "$$$"); - newXSproto(strcpy(buf, "GroupMessage"), XS_Group_GroupMessage, file, "$$$"); - newXSproto(strcpy(buf, "GetTotalGroupDamage"), XS_Group_GetTotalGroupDamage, file, "$$"); - newXSproto(strcpy(buf, "SplitMoney"), XS_Group_SplitMoney, file, "$$$$$"); - newXSproto(strcpy(buf, "SetLeader"), XS_Group_SetLeader, file, "$$"); - newXSproto(strcpy(buf, "GetLeader"), XS_Group_GetLeader, file, "$"); - newXSproto(strcpy(buf, "GetLeaderName"), XS_Group_GetLeaderName, file, "$"); - newXSproto(strcpy(buf, "SendHPPacketsTo"), XS_Group_SendHPPacketsTo, file, "$$"); - newXSproto(strcpy(buf, "SendHPPacketsFrom"), XS_Group_SendHPPacketsFrom, file, "$$"); - newXSproto(strcpy(buf, "IsLeader"), XS_Group_IsLeader, file, "$$"); - newXSproto(strcpy(buf, "GroupCount"), XS_Group_GroupCount, file, "$"); - newXSproto(strcpy(buf, "GetHighestLevel"), XS_Group_GetHighestLevel, file, "$"); - newXSproto(strcpy(buf, "TeleportGroup"), XS_Group_TeleportGroup, file, "$$$$$$$"); - newXSproto(strcpy(buf, "GetID"), XS_Group_GetID, file, "$"); - newXSproto(strcpy(buf, "GetMember"), XS_Group_GetMember, file, "$$"); + newXSproto(strcpy(buf, "DisbandGroup"), XS_Group_DisbandGroup, file, "$"); + newXSproto(strcpy(buf, "IsGroupMember"), XS_Group_IsGroupMember, file, "$$"); + newXSproto(strcpy(buf, "CastGroupSpell"), XS_Group_CastGroupSpell, file, "$$$"); + newXSproto(strcpy(buf, "SplitExp"), XS_Group_SplitExp, file, "$$$"); + newXSproto(strcpy(buf, "GroupMessage"), XS_Group_GroupMessage, file, "$$$"); + newXSproto(strcpy(buf, "GetTotalGroupDamage"), XS_Group_GetTotalGroupDamage, file, "$$"); + newXSproto(strcpy(buf, "SplitMoney"), XS_Group_SplitMoney, file, "$$$$$"); + newXSproto(strcpy(buf, "SetLeader"), XS_Group_SetLeader, file, "$$"); + newXSproto(strcpy(buf, "GetLeader"), XS_Group_GetLeader, file, "$"); + newXSproto(strcpy(buf, "GetLeaderName"), XS_Group_GetLeaderName, file, "$"); + newXSproto(strcpy(buf, "SendHPPacketsTo"), XS_Group_SendHPPacketsTo, file, "$$"); + newXSproto(strcpy(buf, "SendHPPacketsFrom"), XS_Group_SendHPPacketsFrom, file, "$$"); + newXSproto(strcpy(buf, "IsLeader"), XS_Group_IsLeader, file, "$$"); + newXSproto(strcpy(buf, "GroupCount"), XS_Group_GroupCount, file, "$"); + newXSproto(strcpy(buf, "GetHighestLevel"), XS_Group_GetHighestLevel, file, "$"); + newXSproto(strcpy(buf, "TeleportGroup"), XS_Group_TeleportGroup, file, "$$$$$$$"); + newXSproto(strcpy(buf, "GetID"), XS_Group_GetID, file, "$"); + newXSproto(strcpy(buf, "GetMember"), XS_Group_GetMember, file, "$$"); XSRETURN_YES; } From 465071c2cfda6f72ed8958082e620c7018b76d86 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 20:02:53 -0500 Subject: [PATCH 244/670] More perl_groups.cpp formatting --- zone/perl_groups.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/zone/perl_groups.cpp b/zone/perl_groups.cpp index 0eaf8f45e..33ed9689d 100644 --- a/zone/perl_groups.cpp +++ b/zone/perl_groups.cpp @@ -71,8 +71,8 @@ XS(XS_Group_IsGroupMember) { Perl_croak(aTHX_ "Usage: Group::IsGroupMember(THIS, client)"); { Group *THIS; - bool RETVAL; - Mob *client; + bool RETVAL; + Mob *client; if (sv_derived_from(ST(0), "Group")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -103,8 +103,8 @@ XS(XS_Group_CastGroupSpell) { if (items != 3) Perl_croak(aTHX_ "Usage: Group::CastGroupSpell(THIS, Mob* caster, uint16 spell_id)"); { - Group *THIS; - Mob *caster; + Group *THIS; + Mob *caster; uint16 spellid = (uint16) SvUV(ST(2)); if (sv_derived_from(ST(0), "Group")) { @@ -134,9 +134,9 @@ XS(XS_Group_SplitExp) { if (items != 3) Perl_croak(aTHX_ "Usage: Group::SplitExp(THIS, uint32 exp, Mob* other)"); { - Group *THIS; + Group *THIS; uint32 exp = (uint32) SvUV(ST(1)); - Mob *other; + Mob *other; if (sv_derived_from(ST(0), "Group")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -168,7 +168,7 @@ XS(XS_Group_GroupMessage) { Group *THIS; Mob *sender; uint8 language; - char *message; + char *message; if (sv_derived_from(ST(0), "Group")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -206,10 +206,10 @@ XS(XS_Group_GetTotalGroupDamage) { if (items != 2) Perl_croak(aTHX_ "Usage: Group::GetTotalGroupDamage(THIS, Mob* other)"); { - Group *THIS; + Group *THIS; uint32 RETVAL; dXSTARG; - Mob *other; + Mob *other; if (sv_derived_from(ST(0), "Group")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -240,7 +240,7 @@ XS(XS_Group_SplitMoney) { if (items != 5) Perl_croak(aTHX_ "Usage: Group::SplitMoney(THIS, uint32 copper, uint32 silver, uint32 gold, uint32 platinum)"); { - Group *THIS; + Group *THIS; uint32 copper = (uint32) SvUV(ST(1)); uint32 silver = (uint32) SvUV(ST(2)); uint32 gold = (uint32) SvUV(ST(3)); @@ -406,8 +406,8 @@ XS(XS_Group_IsLeader) { Perl_croak(aTHX_ "Usage: Group::IsLeader(THIS, Mob* target)"); { Group *THIS; - bool RETVAL; - Mob *leadertest; + bool RETVAL; + Mob *leadertest; if (sv_derived_from(ST(0), "Group")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -463,7 +463,7 @@ XS(XS_Group_GetHighestLevel) { if (items != 1) Perl_croak(aTHX_ "Usage: Group::GetHighestLevel(THIS)"); { - Group *THIS; + Group *THIS; uint32 RETVAL; dXSTARG; @@ -489,8 +489,8 @@ XS(XS_Group_TeleportGroup) { Perl_croak(aTHX_ "Usage: Group::TeleportGroup(THIS, Mob* sender, uint32 zone_id, float x, float y, float z, float heading)"); { - Group *THIS; - Mob *sender; + Group *THIS; + Mob *sender; uint32 zoneID = (uint32) SvUV(ST(2)); float x = (float) SvNV(ST(3)); float y = (float) SvNV(ST(4)); @@ -524,7 +524,7 @@ XS(XS_Group_GetID) { if (items != 1) Perl_croak(aTHX_ "Usage: Group::GetID(THIS)"); { - Group *THIS; + Group *THIS; uint32 RETVAL; dXSTARG; From 6faaff31be1422fdc398c152d6478eee4ef96bdd Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 20:04:53 -0500 Subject: [PATCH 245/670] Add --hateentry to perl-doc-parser.pl - format perl_hateentry.cpp --- utils/scripts/perl-doc-parser.pl | 9 ++++- zone/perl_hateentry.cpp | 69 +++++++++++++++----------------- 2 files changed, 41 insertions(+), 37 deletions(-) diff --git a/utils/scripts/perl-doc-parser.pl b/utils/scripts/perl-doc-parser.pl index 0bc01b6c5..79d0ba821 100755 --- a/utils/scripts/perl-doc-parser.pl +++ b/utils/scripts/perl-doc-parser.pl @@ -9,6 +9,7 @@ sub usage() { print " --door - Prints methods for just door class methods\n"; print " --group - Prints methods for just group class methods\n"; print " --corpse - Prints methods for just corpse class methods\n"; + print " --hateentry - Prints methods for just hateentry class methods\n"; print " --all - Prints methods for all classes\n"; exit(1); } @@ -49,7 +50,7 @@ for my $file (@files) { chomp; $line = $_; - if ($line=~/Client::|Mob::|Corpse::|EntityList::|Doors::|Group::/i && $line=~/_croak/i) { + if ($line=~/Client::|Mob::|Corpse::|EntityList::|Doors::|Group::|HateEntry::/i && $line=~/_croak/i) { #::: Client export if ($export=~/all|client/i) { @@ -87,6 +88,12 @@ for my $file (@files) { $object_prefix = "\$group->"; } + #::: Hateentry export + if ($export=~/all|hateentry/i) { + $split_key = "HateEntry::"; + $object_prefix = "\$hate_entry->"; + } + #::: Split on croak usage @data = split($split_key, $line); $usage = trim($data[1]); diff --git a/zone/perl_hateentry.cpp b/zone/perl_hateentry.cpp index 7c346a748..85b5d67dd 100644 --- a/zone/perl_hateentry.cpp +++ b/zone/perl_hateentry.cpp @@ -18,7 +18,9 @@ #include "../common/features.h" #include "client.h" + #ifdef EMBPERL_XS_CLASSES + #include "../common/global_define.h" #include "embperl.h" @@ -29,84 +31,80 @@ #include "../common/linked_list.h" #include "hate_list.h" -#ifdef THIS /* this macro seems to leak out on some systems */ +#ifdef THIS /* this macro seems to leak out on some systems */ #undef THIS #endif XS(XS_HateEntry_GetEnt); /* prototype to pass -Wmissing-prototypes */ -XS(XS_HateEntry_GetEnt) -{ +XS(XS_HateEntry_GetEnt) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: HateEntry::GetData(THIS)"); { - struct_HateList * THIS; - Mob * RETVAL; + struct_HateList *THIS; + Mob *RETVAL; if (sv_derived_from(ST(0), "HateEntry")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(struct_HateList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(struct_HateList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type tHateEntry"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->entity_on_hatelist; ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Mob", (void*)RETVAL); + sv_setref_pv(ST(0), "Mob", (void *) RETVAL); } XSRETURN(1); } XS(XS_HateEntry_GetHate); /* prototype to pass -Wmissing-prototypes */ -XS(XS_HateEntry_GetHate) -{ +XS(XS_HateEntry_GetHate) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: HateEntry::GetHate(THIS)"); { - struct_HateList * THIS; + struct_HateList *THIS; int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "HateEntry")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(struct_HateList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(struct_HateList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type tHateEntry"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->stored_hate_amount; - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_HateEntry_GetDamage); /* prototype to pass -Wmissing-prototypes */ -XS(XS_HateEntry_GetDamage) -{ +XS(XS_HateEntry_GetDamage) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: HateEntry::GetDamage(THIS)"); { - struct_HateList * THIS; + struct_HateList *THIS; int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "HateEntry")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(struct_HateList *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(struct_HateList *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type tHateEntry"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->hatelist_damage; - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } @@ -116,24 +114,23 @@ extern "C" #endif XS(boot_HateEntry); -XS(boot_HateEntry) -{ +XS(boot_HateEntry) { dXSARGS; char file[256]; strncpy(file, __FILE__, 256); file[255] = 0; - if(items != 1) + if (items != 1) fprintf(stderr, "boot_quest does not take any arguments."); char buf[128]; //add the strcpy stuff to get rid of const warnings.... - XS_VERSION_BOOTCHECK ; + XS_VERSION_BOOTCHECK; - newXSproto(strcpy(buf, "GetEnt"), XS_HateEntry_GetEnt, file, "$"); - newXSproto(strcpy(buf, "GetDamage"), XS_HateEntry_GetDamage, file, "$"); - newXSproto(strcpy(buf, "GetHate"), XS_HateEntry_GetHate, file, "$"); + newXSproto(strcpy(buf, "GetEnt"), XS_HateEntry_GetEnt, file, "$"); + newXSproto(strcpy(buf, "GetDamage"), XS_HateEntry_GetDamage, file, "$"); + newXSproto(strcpy(buf, "GetHate"), XS_HateEntry_GetHate, file, "$"); XSRETURN_YES; } From 880285afa618d419d7da08a93efd8eabea1ecc60 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 20:20:09 -0500 Subject: [PATCH 246/670] Add --npc to perl-doc-parser.pl and update usage docs in perl_npc.cpp --- utils/scripts/perl-doc-parser.pl | 9 ++- zone/perl_npc.cpp | 96 ++++++++++++++++---------------- 2 files changed, 56 insertions(+), 49 deletions(-) diff --git a/utils/scripts/perl-doc-parser.pl b/utils/scripts/perl-doc-parser.pl index 79d0ba821..e5de41102 100755 --- a/utils/scripts/perl-doc-parser.pl +++ b/utils/scripts/perl-doc-parser.pl @@ -5,6 +5,7 @@ sub usage() { print "Usage:\n"; print " --client - Prints methods for just client class methods\n"; print " --mob - Prints methods for just mob class methods\n"; + print " --npc - Prints methods for just npc class methods\n"; print " --entity - Prints methods for just entity class methods\n"; print " --door - Prints methods for just door class methods\n"; print " --group - Prints methods for just group class methods\n"; @@ -50,7 +51,7 @@ for my $file (@files) { chomp; $line = $_; - if ($line=~/Client::|Mob::|Corpse::|EntityList::|Doors::|Group::|HateEntry::/i && $line=~/_croak/i) { + if ($line=~/Client::|Mob::|Corpse::|EntityList::|Doors::|Group::|HateEntry::|NPC::/i && $line=~/_croak/i) { #::: Client export if ($export=~/all|client/i) { @@ -64,6 +65,12 @@ for my $file (@files) { $object_prefix = "\$mob->"; } + #::: NPC export + if ($export=~/all|npc/i) { + $split_key = "NPC::"; + $object_prefix = "\$npc->"; + } + #::: Corpse export if ($export=~/all|corpse/i) { $split_key = "Corpse::"; diff --git a/zone/perl_npc.cpp b/zone/perl_npc.cpp index eef7b1717..acff193e6 100644 --- a/zone/perl_npc.cpp +++ b/zone/perl_npc.cpp @@ -48,7 +48,7 @@ XS(XS_NPC_SignalNPC) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::SignalNPC(THIS, _signal_id)"); + Perl_croak(aTHX_ "Usage: NPC::SignalNPC(THIS, int signal_id)"); { NPC * THIS; int _signal_id = (int)SvIV(ST(1)); @@ -72,7 +72,7 @@ XS(XS_NPC_CheckNPCFactionAlly) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::CheckNPCFactionAlly(THIS, other_faction)"); + Perl_croak(aTHX_ "Usage: NPC::CheckNPCFactionAlly(THIS, int32 faction_id)"); { NPC * THIS; FACTION_VALUE RETVAL; @@ -99,7 +99,7 @@ XS(XS_NPC_AddItem) { dXSARGS; if (items < 2 || items > 10) - Perl_croak(aTHX_ "Usage: NPC::AddItem(THIS, itemid, charges = 0, equipitem = true, aug1 = 0, aug2 = 0, aug3 = 0, aug4 = 0, aug5 = 0, aug6 = 0)"); + Perl_croak(aTHX_ "Usage: NPC::AddItem(THIS, uint32 item_id, [uint16 charges = 0], [bool equip_item = true], [uint32 aug1 = 0], [uint32 aug2 = 0], [uint32 aug3 = 0], [uint32 aug4 = 0], [uint32 aug5 = 0], [uint32 aug6 = 0])"); { NPC * THIS; uint32 itemid = (uint32)SvUV(ST(1)); @@ -148,7 +148,7 @@ XS(XS_NPC_AddLootTable) { dXSARGS; if (items < 1) - Perl_croak(aTHX_ "Usage: NPC::AddLootTable(THIS, [loottable_id])"); + Perl_croak(aTHX_ "Usage: NPC::AddLootTable(THIS, [uint32 loottable_id])"); { NPC * THIS; @@ -181,7 +181,7 @@ XS(XS_NPC_RemoveItem) { dXSARGS; if (items < 2 || items > 4) - Perl_croak(aTHX_ "Usage: NPC::RemoveItem(THIS, item_id, quantity= 0, slot= 0)"); + Perl_croak(aTHX_ "Usage: NPC::RemoveItem(THIS, uint32 item_id, [uint16 quantity = 0], [uint16 slot_id = 0])"); { NPC * THIS; uint32 item_id = (uint32)SvUV(ST(1)); @@ -242,7 +242,7 @@ XS(XS_NPC_AddCash) { dXSARGS; if (items != 5) - Perl_croak(aTHX_ "Usage: NPC::AddCash(THIS, in_copper, in_silver, in_gold, in_platinum)"); + Perl_croak(aTHX_ "Usage: NPC::AddCash(THIS, uint16 copper, uint16 silver, uint16 gold, uint16 platinum)"); { NPC * THIS; uint16 in_copper = (uint16)SvUV(ST(1)); @@ -448,7 +448,7 @@ XS(XS_NPC_SetCopper) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::SetCopper(THIS, amt)"); + Perl_croak(aTHX_ "Usage: NPC::SetCopper(THIS, uint32 copper_amount)"); { NPC * THIS; uint32 amt = (uint32)SvUV(ST(1)); @@ -472,7 +472,7 @@ XS(XS_NPC_SetSilver) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::SetSilver(THIS, amt)"); + Perl_croak(aTHX_ "Usage: NPC::SetSilver(THIS, uint32 silver_amount)"); { NPC * THIS; uint32 amt = (uint32)SvUV(ST(1)); @@ -496,7 +496,7 @@ XS(XS_NPC_SetGold) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::SetGold(THIS, amt)"); + Perl_croak(aTHX_ "Usage: NPC::SetGold(THIS, uint32 gold_amount)"); { NPC * THIS; uint32 amt = (uint32)SvUV(ST(1)); @@ -520,7 +520,7 @@ XS(XS_NPC_SetPlatinum) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::SetPlatinum(THIS, amt)"); + Perl_croak(aTHX_ "Usage: NPC::SetPlatinum(THIS, uint32 platinum_amount)"); { NPC * THIS; uint32 amt = (uint32)SvUV(ST(1)); @@ -544,7 +544,7 @@ XS(XS_NPC_SetGrid) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::SetGrid(THIS, grid_)"); + Perl_croak(aTHX_ "Usage: NPC::SetGrid(THIS, int32 grid_id)"); { NPC * THIS; int32 grid_ = (int32)SvIV(ST(1)); @@ -568,7 +568,7 @@ XS(XS_NPC_SetSaveWaypoint) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::SetSaveWaypoint(THIS, waypoint)"); + Perl_croak(aTHX_ "Usage: NPC::SetSaveWaypoint(THIS, uint16 waypoint)"); { NPC * THIS; uint16 waypoint = (uint16)SvUV(ST(1)); @@ -592,7 +592,7 @@ XS(XS_NPC_SetSp2) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::SetSp2(THIS, sg2)"); + Perl_croak(aTHX_ "Usage: NPC::SetSp2(THIS, uint32 set_spawn_group_id)"); { NPC * THIS; uint32 sg2 = (uint32)SvUV(ST(1)); @@ -746,7 +746,7 @@ XS(XS_NPC_GetNPCHate) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::GetNPCHate(THIS, in_ent)"); + Perl_croak(aTHX_ "Usage: NPC::GetNPCHate(THIS, Mob* entity)"); { NPC * THIS; int32 RETVAL; @@ -782,7 +782,7 @@ XS(XS_NPC_IsOnHatelist) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::IsOnHatelist(THIS, p)"); + Perl_croak(aTHX_ "Usage: NPC::IsOnHatelist(THIS, Mob* target)"); { NPC * THIS; bool RETVAL; @@ -818,7 +818,7 @@ XS(XS_NPC_RemoveFromHateList) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::RemoveFromHateList(THIS, ent)"); + Perl_croak(aTHX_ "Usage: NPC::RemoveFromHateList(THIS, Mob* target)"); { NPC * THIS; Mob* ent; @@ -854,7 +854,7 @@ XS(XS_NPC_SetNPCFactionID) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::SetNPCFactionID(THIS, in)"); + Perl_croak(aTHX_ "Usage: NPC::SetNPCFactionID(THIS, int32 faction_id)"); { NPC * THIS; int32 in = (int32)SvIV(ST(1)); @@ -983,7 +983,7 @@ XS(XS_NPC_SetPetSpellID) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::SetPetSpellID(THIS, amt)"); + Perl_croak(aTHX_ "Usage: NPC::SetPetSpellID(THIS, uint16 amount)"); { NPC * THIS; uint16 amt = (uint16)SvUV(ST(1)); @@ -1007,7 +1007,7 @@ XS(XS_NPC_GetMaxDamage) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::GetMaxDamage(THIS, tlevel)"); + Perl_croak(aTHX_ "Usage: NPC::GetMaxDamage(THIS, uint8 target_level)"); { NPC * THIS; uint32 RETVAL; @@ -1034,10 +1034,10 @@ XS(XS_NPC_SetTaunting) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::SetTaunting(THIS, tog)"); + Perl_croak(aTHX_ "Usage: NPC::SetTaunting(THIS, bool toggle)"); { NPC * THIS; - bool tog = (bool)SvTRUE(ST(1)); + bool toggle = (bool)SvTRUE(ST(1)); if (sv_derived_from(ST(0), "NPC")) { IV tmp = SvIV((SV*)SvRV(ST(0))); @@ -1048,7 +1048,7 @@ XS(XS_NPC_SetTaunting) if(THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - THIS->SetTaunting(tog); + THIS->SetTaunting(toggle); } XSRETURN_EMPTY; } @@ -1058,7 +1058,7 @@ XS(XS_NPC_PickPocket) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::PickPocket(THIS, thief)"); + Perl_croak(aTHX_ "Usage: NPC::PickPocket(THIS, Client* thief)"); { NPC * THIS; Client* thief; @@ -1091,7 +1091,7 @@ XS(XS_NPC_StartSwarmTimer) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::StartSwarmTimer(THIS, duration)"); + Perl_croak(aTHX_ "Usage: NPC::StartSwarmTimer(THIS, uint32 duration)"); { NPC * THIS; uint32 duration = (uint32)SvUV(ST(1)); @@ -1115,7 +1115,7 @@ XS(XS_NPC_DoClassAttacks) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::DoClassAttacks(THIS, target)"); + Perl_croak(aTHX_ "Usage: NPC::DoClassAttacks(THIS, Mob* target)"); { NPC * THIS; Mob * target; @@ -1174,7 +1174,7 @@ XS(XS_NPC_DisplayWaypointInfo) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::DisplayWaypointInfo(THIS, to)"); + Perl_croak(aTHX_ "Usage: NPC::DisplayWaypointInfo(THIS, Client* target)"); { NPC * THIS; Client * to; @@ -1230,7 +1230,7 @@ XS(XS_NPC_AssignWaypoints) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::AssignWaypoints(THIS, grid)"); + Perl_croak(aTHX_ "Usage: NPC::AssignWaypoints(THIS, uint32 grid_id)"); { NPC * THIS; uint32 grid = (uint32)SvUV(ST(1)); @@ -1277,7 +1277,7 @@ XS(XS_NPC_UpdateWaypoint) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::UpdateWaypoint(THIS, wp_index)"); + Perl_croak(aTHX_ "Usage: NPC::UpdateWaypoint(THIS, int wp_index)"); { NPC * THIS; int wp_index = (int)SvIV(ST(1)); @@ -1347,7 +1347,7 @@ XS(XS_NPC_PauseWandering) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::PauseWandering(THIS, pausetime)"); + Perl_croak(aTHX_ "Usage: NPC::PauseWandering(THIS, int pause_time)"); { NPC * THIS; int pausetime = (int)SvIV(ST(1)); @@ -1371,7 +1371,7 @@ XS(XS_NPC_MoveTo) { dXSARGS; if (items != 4 && items != 5 && items != 6) - Perl_croak(aTHX_ "Usage: NPC::MoveTo(THIS, mtx, mty, mtz, [mth, saveguard?])"); + Perl_croak(aTHX_ "Usage: NPC::MoveTo(THIS, float x, float y, float z, [float heading], [bool save_guard_location = false])"); { NPC * THIS; float mtx = (float)SvNV(ST(1)); @@ -1433,7 +1433,7 @@ XS(XS_NPC_SaveGuardSpot) { dXSARGS; if (items < 1 || items > 2) - Perl_croak(aTHX_ "Usage: NPC::SaveGuardSpot(THIS, iClearGuardSpot= false)"); + Perl_croak(aTHX_ "Usage: NPC::SaveGuardSpot(THIS, [bool clear_guard_spot = false])"); { NPC * THIS; bool iClearGuardSpot; @@ -1489,7 +1489,7 @@ XS(XS_NPC_AI_SetRoambox) { dXSARGS; if (items < 6 || items > 8) - Perl_croak(aTHX_ "Usage: NPC::AI_SetRoambox(THIS, iDist, iMaxX, iMinX, iMaxY, iMinY, iDelay= 2500, iMinDelay= 2500)"); + Perl_croak(aTHX_ "Usage: NPC::AI_SetRoambox(THIS, float distance, float max_x, float min_x, float max_y, float min_y, [uint32 max_delay = 2500], [uint32 min_delay = 2500])"); { NPC * THIS; float iDist = (float)SvNV(ST(1)); @@ -1773,7 +1773,7 @@ XS(XS_NPC_SetPrimSkill) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::SetPrimSkill(THIS, skill_id)"); + Perl_croak(aTHX_ "Usage: NPC::SetPrimSkill(THIS, int skill_id)"); { NPC * THIS; int skill_id = (int)SvIV(ST(1)); @@ -1797,7 +1797,7 @@ XS(XS_NPC_SetSecSkill) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::SetSecSkill(THIS, skill_id)"); + Perl_croak(aTHX_ "Usage: NPC::SetSecSkill(THIS, int skill_id)"); { NPC * THIS; int skill_id = (int)SvIV(ST(1)); @@ -1925,7 +1925,7 @@ XS(XS_NPC_SetSwarmTarget) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::SetSwarmTarget(THIS, target_id)"); + Perl_croak(aTHX_ "Usage: NPC::SetSwarmTarget(THIS, int target_id)"); { NPC * THIS; int target_id = (int)SvIV(ST(1)); @@ -1949,7 +1949,7 @@ XS(XS_NPC_ModifyNPCStat) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: NPC::ModifyNPCStat(THIS, identifier, newValue)"); + Perl_croak(aTHX_ "Usage: NPC::ModifyNPCStat(THIS, string key, string value)"); { NPC * THIS; Const_char * identifier = (Const_char *)SvPV_nolen(ST(1)); @@ -1974,7 +1974,7 @@ XS(XS_NPC_AddSpellToNPCList) { dXSARGS; if (items != 7) - Perl_croak(aTHX_ "Usage: NPC::AddAISpell(THIS, priority, spell_id, type, mana_cost, recast_delay, resist_adjust)"); + Perl_croak(aTHX_ "Usage: NPC::AddAISpell(THIS, int priority, int spell_id, int type, int mana_cost, int recast_delay, int resist_adjust)"); { NPC * THIS; int priority = (int)SvIV(ST(1)); @@ -2003,7 +2003,7 @@ XS(XS_NPC_RemoveSpellFromNPCList) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::RemoveAISpell(THIS, spell_id)"); + Perl_croak(aTHX_ "Usage: NPC::RemoveAISpell(THIS, int spell_id)"); { NPC * THIS; int spell_id = (int)SvIV(ST(1)); @@ -2027,7 +2027,7 @@ XS(XS_NPC_SetSpellFocusDMG) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::SetSpellFocusDMG(THIS, NewSpellFocusDMG)"); + Perl_croak(aTHX_ "Usage: NPC::SetSpellFocusDMG(THIS, int new_spell_focus_dmg)"); { NPC * THIS; int32 NewSpellFocusDMG = (int32)SvIV(ST(1)); @@ -2077,7 +2077,7 @@ XS(XS_NPC_SetSpellFocusHeal) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::SetSpellFocusHeal(THIS, NewSpellFocusHeal)"); + Perl_croak(aTHX_ "Usage: NPC::SetSpellFocusHeal(THIS, int32 new_spell_focus_heal)"); { NPC * THIS; int32 NewSpellFocusHeal = (int32)SvIV(ST(1)); @@ -2308,7 +2308,7 @@ XS(XS_NPC_AddMeleeProc); XS(XS_NPC_AddMeleeProc) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: NPC::AddMeleeProc(THIS,spellid,chance)"); + Perl_croak(aTHX_ "Usage: NPC::AddMeleeProc(THIS, int spell_id, int chance)"); { NPC * THIS; int spell_id = (int)SvIV(ST(1)); @@ -2333,7 +2333,7 @@ XS(XS_NPC_AddRangedProc); XS(XS_NPC_AddRangedProc) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: NPC::AddRangedProc(THIS,spellid,chance)"); + Perl_croak(aTHX_ "Usage: NPC::AddRangedProc(THIS, int spell_id, int chance)"); { NPC * THIS; int spell_id = (int)SvIV(ST(1)); @@ -2358,7 +2358,7 @@ XS(XS_NPC_AddDefensiveProc); XS(XS_NPC_AddDefensiveProc) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: NPC::AddDefensiveProc(THIS,spellid,chance)"); + Perl_croak(aTHX_ "Usage: NPC::AddDefensiveProc(THIS, int spell_id, int chance)"); { NPC * THIS; int spell_id = (int)SvIV(ST(1)); @@ -2383,7 +2383,7 @@ XS(XS_NPC_RemoveMeleeProc); XS(XS_NPC_RemoveMeleeProc) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::RemoveMeleeProc(THIS,spellid)"); + Perl_croak(aTHX_ "Usage: NPC::RemoveMeleeProc(THIS, int spell_id)"); { NPC * THIS; int spell_id = (int)SvIV(ST(1)); @@ -2407,7 +2407,7 @@ XS(XS_NPC_RemoveRangedProc); XS(XS_NPC_RemoveRangedProc) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::RemoveRangedProc(THIS,spellid)"); + Perl_croak(aTHX_ "Usage: NPC::RemoveRangedProc(THIS, int spell_id)"); { NPC * THIS; int spell_id = (int)SvIV(ST(1)); @@ -2431,7 +2431,7 @@ XS(XS_NPC_RemoveDefensiveProc); XS(XS_NPC_RemoveDefensiveProc) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: NPC::RemoveDefensiveProc(THIS,spellid)"); + Perl_croak(aTHX_ "Usage: NPC::RemoveDefensiveProc(THIS, int spell_id)"); { NPC * THIS; int spell_id = (int)SvIV(ST(1)); @@ -2456,7 +2456,7 @@ XS(XS_NPC_ChangeLastName) { dXSARGS; if (items < 1 || items > 2) - Perl_croak(aTHX_ "Usage: Mob::ChangeLastName(THIS, name)"); + Perl_croak(aTHX_ "Usage: NPC::ChangeLastName(THIS, string name)"); { NPC * THIS; char * name = nullptr; @@ -2482,7 +2482,7 @@ XS(XS_NPC_ClearLastName) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: Mob::ClearLastName(THIS)"); + Perl_croak(aTHX_ "Usage: NPC::ClearLastName(THIS)"); { NPC * THIS; From d079feeb66d95728767f00e437ced7345c56b48b Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 20:20:40 -0500 Subject: [PATCH 247/670] perl_npc.cpp formatting --- zone/perl_npc.cpp | 1969 +++++++++++++++++++++------------------------ 1 file changed, 911 insertions(+), 1058 deletions(-) diff --git a/zone/perl_npc.cpp b/zone/perl_npc.cpp index acff193e6..1eaddf3a2 100644 --- a/zone/perl_npc.cpp +++ b/zone/perl_npc.cpp @@ -26,7 +26,9 @@ */ #include "../common/features.h" + #ifdef EMBPERL_XS_CLASSES + #include "../common/global_define.h" #include "embperl.h" @@ -44,22 +46,20 @@ typedef const char Const_char; XS(XS_NPC_SignalNPC); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_SignalNPC) -{ +XS(XS_NPC_SignalNPC) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::SignalNPC(THIS, int signal_id)"); { - NPC * THIS; - int _signal_id = (int)SvIV(ST(1)); + NPC *THIS; + int _signal_id = (int) SvIV(ST(1)); if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SignalNPC(_signal_id); @@ -68,75 +68,73 @@ XS(XS_NPC_SignalNPC) } XS(XS_NPC_CheckNPCFactionAlly); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_CheckNPCFactionAlly) -{ +XS(XS_NPC_CheckNPCFactionAlly) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::CheckNPCFactionAlly(THIS, int32 faction_id)"); { - NPC * THIS; - FACTION_VALUE RETVAL; + NPC *THIS; + FACTION_VALUE RETVAL; dXSTARG; - int32 other_faction = (int32)SvIV(ST(1)); + int32 other_faction = (int32) SvIV(ST(1)); if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->CheckNPCFactionAlly(other_faction); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_NPC_AddItem); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_AddItem) -{ +XS(XS_NPC_AddItem) { dXSARGS; if (items < 2 || items > 10) - Perl_croak(aTHX_ "Usage: NPC::AddItem(THIS, uint32 item_id, [uint16 charges = 0], [bool equip_item = true], [uint32 aug1 = 0], [uint32 aug2 = 0], [uint32 aug3 = 0], [uint32 aug4 = 0], [uint32 aug5 = 0], [uint32 aug6 = 0])"); + Perl_croak(aTHX_ + "Usage: NPC::AddItem(THIS, uint32 item_id, [uint16 charges = 0], [bool equip_item = true], [uint32 aug1 = 0], [uint32 aug2 = 0], [uint32 aug3 = 0], [uint32 aug4 = 0], [uint32 aug5 = 0], [uint32 aug6 = 0])"); { - NPC * THIS; - uint32 itemid = (uint32)SvUV(ST(1)); - uint16 charges = 0; - bool equipitem = true; - uint32 aug1 = 0; - uint32 aug2 = 0; - uint32 aug3 = 0; - uint32 aug4 = 0; - uint32 aug5 = 0; - uint32 aug6 = 0; + NPC *THIS; + uint32 itemid = (uint32) SvUV(ST(1)); + uint16 charges = 0; + bool equipitem = true; + uint32 aug1 = 0; + uint32 aug2 = 0; + uint32 aug3 = 0; + uint32 aug4 = 0; + uint32 aug5 = 0; + uint32 aug6 = 0; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items > 2) - charges = (uint16)SvUV(ST(2)); + charges = (uint16) SvUV(ST(2)); if (items > 3) - equipitem = (bool)SvTRUE(ST(3)); + equipitem = (bool) SvTRUE(ST(3)); if (items > 4) - aug1 = (uint32)SvUV(ST(4)); + aug1 = (uint32) SvUV(ST(4)); if (items > 5) - aug2 = (uint32)SvUV(ST(5)); + aug2 = (uint32) SvUV(ST(5)); if (items > 6) - aug3 = (uint32)SvUV(ST(6)); + aug3 = (uint32) SvUV(ST(6)); if (items > 7) - aug4 = (uint32)SvUV(ST(7)); + aug4 = (uint32) SvUV(ST(7)); if (items > 8) - aug5 = (uint32)SvUV(ST(8)); + aug5 = (uint32) SvUV(ST(8)); if (items > 9) - aug6 = (uint32)SvUV(ST(9)); + aug6 = (uint32) SvUV(ST(9)); THIS->AddItem(itemid, charges, equipitem, aug1, aug2, aug3, aug4, aug5, aug6); } @@ -144,32 +142,27 @@ XS(XS_NPC_AddItem) } XS(XS_NPC_AddLootTable); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_AddLootTable) -{ +XS(XS_NPC_AddLootTable) { dXSARGS; if (items < 1) Perl_croak(aTHX_ "Usage: NPC::AddLootTable(THIS, [uint32 loottable_id])"); { - NPC * THIS; + NPC *THIS; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); uint32 loottable_id = 0; - if(items > 1) - { - loottable_id = (uint32)SvUV(ST(1)); + if (items > 1) { + loottable_id = (uint32) SvUV(ST(1)); THIS->AddLootTable(loottable_id); - } - else - { + } else { THIS->AddLootTable(); } } @@ -177,36 +170,34 @@ XS(XS_NPC_AddLootTable) } XS(XS_NPC_RemoveItem); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_RemoveItem) -{ +XS(XS_NPC_RemoveItem) { dXSARGS; if (items < 2 || items > 4) Perl_croak(aTHX_ "Usage: NPC::RemoveItem(THIS, uint32 item_id, [uint16 quantity = 0], [uint16 slot_id = 0])"); { - NPC * THIS; - uint32 item_id = (uint32)SvUV(ST(1)); - uint16 quantity; - uint16 slot; + NPC *THIS; + uint32 item_id = (uint32) SvUV(ST(1)); + uint16 quantity; + uint16 slot; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 3) quantity = 0; else { - quantity = (uint16)SvUV(ST(2)); + quantity = (uint16) SvUV(ST(2)); } if (items < 4) slot = 0; else { - slot = (uint16)SvUV(ST(3)); + slot = (uint16) SvUV(ST(3)); } THIS->RemoveItem(item_id, quantity, slot); @@ -215,21 +206,19 @@ XS(XS_NPC_RemoveItem) } XS(XS_NPC_ClearItemList); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_ClearItemList) -{ +XS(XS_NPC_ClearItemList) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::ClearItemList(THIS)"); { - NPC * THIS; + NPC *THIS; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->ClearItemList(); @@ -238,25 +227,23 @@ XS(XS_NPC_ClearItemList) } XS(XS_NPC_AddCash); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_AddCash) -{ +XS(XS_NPC_AddCash) { dXSARGS; if (items != 5) Perl_croak(aTHX_ "Usage: NPC::AddCash(THIS, uint16 copper, uint16 silver, uint16 gold, uint16 platinum)"); { - NPC * THIS; - uint16 in_copper = (uint16)SvUV(ST(1)); - uint16 in_silver = (uint16)SvUV(ST(2)); - uint16 in_gold = (uint16)SvUV(ST(3)); - uint16 in_platinum = (uint16)SvUV(ST(4)); + NPC *THIS; + uint16 in_copper = (uint16) SvUV(ST(1)); + uint16 in_silver = (uint16) SvUV(ST(2)); + uint16 in_gold = (uint16) SvUV(ST(3)); + uint16 in_platinum = (uint16) SvUV(ST(4)); if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->AddCash(in_copper, in_silver, in_gold, in_platinum); @@ -265,21 +252,19 @@ XS(XS_NPC_AddCash) } XS(XS_NPC_RemoveCash); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_RemoveCash) -{ +XS(XS_NPC_RemoveCash) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::RemoveCash(THIS)"); { - NPC * THIS; + NPC *THIS; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->RemoveCash(); @@ -288,178 +273,170 @@ XS(XS_NPC_RemoveCash) } XS(XS_NPC_CountLoot); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_CountLoot) -{ +XS(XS_NPC_CountLoot) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::CountLoot(THIS)"); { - NPC * THIS; - uint32 RETVAL; + NPC *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->CountLoot(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetLoottableID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetLoottableID) -{ +XS(XS_NPC_GetLoottableID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetLoottableID(THIS)"); { - NPC * THIS; - uint32 RETVAL; + NPC *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetLoottableID(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetCopper); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetCopper) -{ +XS(XS_NPC_GetCopper) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetCopper(THIS)"); { - NPC * THIS; - uint32 RETVAL; + NPC *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetCopper(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetSilver); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetSilver) -{ +XS(XS_NPC_GetSilver) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetSilver(THIS)"); { - NPC * THIS; - uint32 RETVAL; + NPC *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSilver(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetGold); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetGold) -{ +XS(XS_NPC_GetGold) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetGold(THIS)"); { - NPC * THIS; - uint32 RETVAL; + NPC *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetGold(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetPlatinum); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetPlatinum) -{ +XS(XS_NPC_GetPlatinum) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetPlatinum(THIS)"); { - NPC * THIS; - uint32 RETVAL; + NPC *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetPlatinum(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_NPC_SetCopper); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_SetCopper) -{ +XS(XS_NPC_SetCopper) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::SetCopper(THIS, uint32 copper_amount)"); { - NPC * THIS; - uint32 amt = (uint32)SvUV(ST(1)); + NPC *THIS; + uint32 amt = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetCopper(amt); @@ -468,22 +445,20 @@ XS(XS_NPC_SetCopper) } XS(XS_NPC_SetSilver); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_SetSilver) -{ +XS(XS_NPC_SetSilver) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::SetSilver(THIS, uint32 silver_amount)"); { - NPC * THIS; - uint32 amt = (uint32)SvUV(ST(1)); + NPC *THIS; + uint32 amt = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetSilver(amt); @@ -492,22 +467,20 @@ XS(XS_NPC_SetSilver) } XS(XS_NPC_SetGold); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_SetGold) -{ +XS(XS_NPC_SetGold) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::SetGold(THIS, uint32 gold_amount)"); { - NPC * THIS; - uint32 amt = (uint32)SvUV(ST(1)); + NPC *THIS; + uint32 amt = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetGold(amt); @@ -516,22 +489,20 @@ XS(XS_NPC_SetGold) } XS(XS_NPC_SetPlatinum); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_SetPlatinum) -{ +XS(XS_NPC_SetPlatinum) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::SetPlatinum(THIS, uint32 platinum_amount)"); { - NPC * THIS; - uint32 amt = (uint32)SvUV(ST(1)); + NPC *THIS; + uint32 amt = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetPlatinum(amt); @@ -540,22 +511,20 @@ XS(XS_NPC_SetPlatinum) } XS(XS_NPC_SetGrid); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_SetGrid) -{ +XS(XS_NPC_SetGrid) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::SetGrid(THIS, int32 grid_id)"); { - NPC * THIS; - int32 grid_ = (int32)SvIV(ST(1)); + NPC *THIS; + int32 grid_ = (int32) SvIV(ST(1)); if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetGrid(grid_); @@ -564,22 +533,20 @@ XS(XS_NPC_SetGrid) } XS(XS_NPC_SetSaveWaypoint); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_SetSaveWaypoint) -{ +XS(XS_NPC_SetSaveWaypoint) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::SetSaveWaypoint(THIS, uint16 waypoint)"); { - NPC * THIS; - uint16 waypoint = (uint16)SvUV(ST(1)); + NPC *THIS; + uint16 waypoint = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetSaveWaypoint(waypoint); @@ -588,22 +555,20 @@ XS(XS_NPC_SetSaveWaypoint) } XS(XS_NPC_SetSp2); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_SetSp2) -{ +XS(XS_NPC_SetSp2) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::SetSp2(THIS, uint32 set_spawn_group_id)"); { - NPC * THIS; - uint32 sg2 = (uint32)SvUV(ST(1)); + NPC *THIS; + uint32 sg2 = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetSp2(sg2); @@ -612,198 +577,188 @@ XS(XS_NPC_SetSp2) } XS(XS_NPC_GetWaypointMax); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetWaypointMax) -{ +XS(XS_NPC_GetWaypointMax) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetWaypointMax(THIS)"); { - NPC * THIS; - uint16 RETVAL; + NPC *THIS; + uint16 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetWaypointMax(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetGrid); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetGrid) -{ +XS(XS_NPC_GetGrid) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetGrid(THIS)"); { - NPC * THIS; - int32 RETVAL; + NPC *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetGrid(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetSp2); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetSp2) -{ +XS(XS_NPC_GetSp2) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetSp2(THIS)"); { - NPC * THIS; - uint32 RETVAL; + NPC *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSp2(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetNPCFactionID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetNPCFactionID) -{ +XS(XS_NPC_GetNPCFactionID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetNPCFactionID(THIS)"); { - NPC * THIS; - int32 RETVAL; + NPC *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetNPCFactionID(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetPrimaryFaction); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetPrimaryFaction) -{ +XS(XS_NPC_GetPrimaryFaction) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetPrimaryFaction(THIS)"); { - NPC * THIS; - int32 RETVAL; + NPC *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetPrimaryFaction(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetNPCHate); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetNPCHate) -{ +XS(XS_NPC_GetNPCHate) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::GetNPCHate(THIS, Mob* entity)"); { - NPC * THIS; - int32 RETVAL; + NPC *THIS; + int32 RETVAL; dXSTARG; - Mob* in_ent; + Mob *in_ent; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - in_ent = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + in_ent = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "in_ent is not of type Mob"); - if(in_ent == nullptr) + if (in_ent == nullptr) Perl_croak(aTHX_ "in_ent is nullptr, avoiding crash."); RETVAL = THIS->GetNPCHate(in_ent); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_NPC_IsOnHatelist); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_IsOnHatelist) -{ +XS(XS_NPC_IsOnHatelist) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::IsOnHatelist(THIS, Mob* target)"); { - NPC * THIS; - bool RETVAL; - Mob* p; + NPC *THIS; + bool RETVAL; + Mob *p; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - p = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + p = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "p is not of type Mob"); - if(p == nullptr) + if (p == nullptr) Perl_croak(aTHX_ "p is nullptr, avoiding crash."); RETVAL = THIS->IsOnHatelist(p); @@ -814,31 +769,28 @@ XS(XS_NPC_IsOnHatelist) } XS(XS_NPC_RemoveFromHateList); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_RemoveFromHateList) -{ +XS(XS_NPC_RemoveFromHateList) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::RemoveFromHateList(THIS, Mob* target)"); { - NPC * THIS; - Mob* ent; + NPC *THIS; + Mob *ent; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - ent = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + ent = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "ent is not of type Mob"); - if(ent == nullptr) + if (ent == nullptr) Perl_croak(aTHX_ "ent is nullptr, avoiding crash."); THIS->RemoveFromHateList(ent); @@ -848,24 +800,21 @@ XS(XS_NPC_RemoveFromHateList) } - XS(XS_NPC_SetNPCFactionID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_SetNPCFactionID) -{ +XS(XS_NPC_SetNPCFactionID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::SetNPCFactionID(THIS, int32 faction_id)"); { - NPC * THIS; - int32 in = (int32)SvIV(ST(1)); + NPC *THIS; + int32 in = (int32) SvIV(ST(1)); if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetNPCFactionID(in); @@ -874,75 +823,71 @@ XS(XS_NPC_SetNPCFactionID) } XS(XS_NPC_GetMaxDMG); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetMaxDMG) -{ +XS(XS_NPC_GetMaxDMG) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetMaxDMG(THIS)"); { - NPC * THIS; - uint32 RETVAL; + NPC *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetMaxDMG(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetMinDMG); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetMinDMG) -{ +XS(XS_NPC_GetMinDMG) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetMinDMG(THIS)"); { - NPC * THIS; - uint32 RETVAL; + NPC *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetMinDMG(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_NPC_IsAnimal); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_IsAnimal) -{ +XS(XS_NPC_IsAnimal) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::IsAnimal(THIS)"); { - NPC * THIS; - bool RETVAL; + NPC *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsAnimal(); @@ -953,48 +898,45 @@ XS(XS_NPC_IsAnimal) } XS(XS_NPC_GetPetSpellID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetPetSpellID) -{ +XS(XS_NPC_GetPetSpellID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetPetSpellID(THIS)"); { - NPC * THIS; - uint16 RETVAL; + NPC *THIS; + uint16 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetPetSpellID(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_NPC_SetPetSpellID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_SetPetSpellID) -{ +XS(XS_NPC_SetPetSpellID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::SetPetSpellID(THIS, uint16 amount)"); { - NPC * THIS; - uint16 amt = (uint16)SvUV(ST(1)); + NPC *THIS; + uint16 amt = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetPetSpellID(amt); @@ -1003,49 +945,46 @@ XS(XS_NPC_SetPetSpellID) } XS(XS_NPC_GetMaxDamage); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetMaxDamage) -{ +XS(XS_NPC_GetMaxDamage) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::GetMaxDamage(THIS, uint8 target_level)"); { - NPC * THIS; - uint32 RETVAL; + NPC *THIS; + uint32 RETVAL; dXSTARG; - uint8 tlevel = (uint8)SvUV(ST(1)); + uint8 tlevel = (uint8) SvUV(ST(1)); if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetMaxDamage(tlevel); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_NPC_SetTaunting); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_SetTaunting) -{ +XS(XS_NPC_SetTaunting) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::SetTaunting(THIS, bool toggle)"); { - NPC * THIS; - bool toggle = (bool)SvTRUE(ST(1)); + NPC *THIS; + bool toggle = (bool) SvTRUE(ST(1)); if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetTaunting(toggle); @@ -1054,31 +993,28 @@ XS(XS_NPC_SetTaunting) } XS(XS_NPC_PickPocket); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_PickPocket) -{ +XS(XS_NPC_PickPocket) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::PickPocket(THIS, Client* thief)"); { - NPC * THIS; - Client* thief; + NPC *THIS; + Client *thief; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - thief = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + thief = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "thief is not of type Client"); - if(thief == nullptr) + if (thief == nullptr) Perl_croak(aTHX_ "thief is nullptr, avoiding crash."); THIS->PickPocket(thief); @@ -1087,22 +1023,20 @@ XS(XS_NPC_PickPocket) } XS(XS_NPC_StartSwarmTimer); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_StartSwarmTimer) -{ +XS(XS_NPC_StartSwarmTimer) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::StartSwarmTimer(THIS, uint32 duration)"); { - NPC * THIS; - uint32 duration = (uint32)SvUV(ST(1)); + NPC *THIS; + uint32 duration = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->StartSwarmTimer(duration); @@ -1111,31 +1045,28 @@ XS(XS_NPC_StartSwarmTimer) } XS(XS_NPC_DoClassAttacks); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_DoClassAttacks) -{ +XS(XS_NPC_DoClassAttacks) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::DoClassAttacks(THIS, Mob* target)"); { - NPC * THIS; - Mob * target; + NPC *THIS; + Mob *target; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - target = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + target = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "target is not of type Mob"); - if(target == nullptr) + if (target == nullptr) Perl_croak(aTHX_ "target is nullptr, avoiding crash."); THIS->DoClassAttacks(target); @@ -1144,57 +1075,53 @@ XS(XS_NPC_DoClassAttacks) } XS(XS_NPC_GetMaxWp); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetMaxWp) -{ +XS(XS_NPC_GetMaxWp) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetMaxWp(THIS)"); { - NPC * THIS; - int RETVAL; + NPC *THIS; + int RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetMaxWp(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_NPC_DisplayWaypointInfo); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_DisplayWaypointInfo) -{ +XS(XS_NPC_DisplayWaypointInfo) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::DisplayWaypointInfo(THIS, Client* target)"); { - NPC * THIS; - Client * to; + NPC *THIS; + Client *to; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Client")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - to = INT2PTR(Client *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + to = INT2PTR(Client *, tmp); + } else Perl_croak(aTHX_ "to is not of type Client"); - if(to == nullptr) + if (to == nullptr) Perl_croak(aTHX_ "to is nullptr, avoiding crash."); THIS->DisplayWaypointInfo(to); @@ -1203,21 +1130,19 @@ XS(XS_NPC_DisplayWaypointInfo) } XS(XS_NPC_CalculateNewWaypoint); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_CalculateNewWaypoint) -{ +XS(XS_NPC_CalculateNewWaypoint) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::CalculateNewWaypoint(THIS)"); { - NPC * THIS; + NPC *THIS; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->CalculateNewWaypoint(); @@ -1226,22 +1151,20 @@ XS(XS_NPC_CalculateNewWaypoint) } XS(XS_NPC_AssignWaypoints); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_AssignWaypoints) -{ +XS(XS_NPC_AssignWaypoints) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::AssignWaypoints(THIS, uint32 grid_id)"); { - NPC * THIS; - uint32 grid = (uint32)SvUV(ST(1)); + NPC *THIS; + uint32 grid = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->AssignWaypoints(grid); @@ -1250,21 +1173,19 @@ XS(XS_NPC_AssignWaypoints) } XS(XS_NPC_SetWaypointPause); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_SetWaypointPause) -{ +XS(XS_NPC_SetWaypointPause) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::SetWaypointPause(THIS)"); { - NPC * THIS; + NPC *THIS; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetWaypointPause(); @@ -1273,22 +1194,20 @@ XS(XS_NPC_SetWaypointPause) } XS(XS_NPC_UpdateWaypoint); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_UpdateWaypoint) -{ +XS(XS_NPC_UpdateWaypoint) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::UpdateWaypoint(THIS, int wp_index)"); { - NPC * THIS; - int wp_index = (int)SvIV(ST(1)); + NPC *THIS; + int wp_index = (int) SvIV(ST(1)); if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->UpdateWaypoint(wp_index); @@ -1297,21 +1216,19 @@ XS(XS_NPC_UpdateWaypoint) } XS(XS_NPC_StopWandering); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_StopWandering) -{ +XS(XS_NPC_StopWandering) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::StopWandering(THIS)"); { - NPC * THIS; + NPC *THIS; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->StopWandering(); @@ -1320,21 +1237,19 @@ XS(XS_NPC_StopWandering) } XS(XS_NPC_ResumeWandering); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_ResumeWandering) -{ +XS(XS_NPC_ResumeWandering) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::ResumeWandering(THIS)"); { - NPC * THIS; + NPC *THIS; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->ResumeWandering(); @@ -1343,22 +1258,20 @@ XS(XS_NPC_ResumeWandering) } XS(XS_NPC_PauseWandering); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_PauseWandering) -{ +XS(XS_NPC_PauseWandering) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::PauseWandering(THIS, int pause_time)"); { - NPC * THIS; - int pausetime = (int)SvIV(ST(1)); + NPC *THIS; + int pausetime = (int) SvIV(ST(1)); if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->PauseWandering(pausetime); @@ -1367,60 +1280,57 @@ XS(XS_NPC_PauseWandering) } XS(XS_NPC_MoveTo); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_MoveTo) -{ +XS(XS_NPC_MoveTo) { dXSARGS; if (items != 4 && items != 5 && items != 6) - Perl_croak(aTHX_ "Usage: NPC::MoveTo(THIS, float x, float y, float z, [float heading], [bool save_guard_location = false])"); + Perl_croak(aTHX_ + "Usage: NPC::MoveTo(THIS, float x, float y, float z, [float heading], [bool save_guard_location = false])"); { - NPC * THIS; - float mtx = (float)SvNV(ST(1)); - float mty = (float)SvNV(ST(2)); - float mtz = (float)SvNV(ST(3)); - float mth; - bool saveguard; + NPC *THIS; + float mtx = (float) SvNV(ST(1)); + float mty = (float) SvNV(ST(2)); + float mtz = (float) SvNV(ST(3)); + float mth; + bool saveguard; - if(items > 4) - mth = (float)SvNV(ST(4)); + if (items > 4) + mth = (float) SvNV(ST(4)); else mth = 0; - if(items > 5) - saveguard = (bool)SvTRUE(ST(5)); + if (items > 5) + saveguard = (bool) SvTRUE(ST(5)); else saveguard = false; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - auto position = glm::vec4(mtx, mty, mtz, mth); + auto position = glm::vec4(mtx, mty, mtz, mth); THIS->MoveTo(position, saveguard); } XSRETURN_EMPTY; } XS(XS_NPC_NextGuardPosition); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_NextGuardPosition) -{ +XS(XS_NPC_NextGuardPosition) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::NextGuardPosition(THIS)"); { - NPC * THIS; + NPC *THIS; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->NextGuardPosition(); @@ -1429,28 +1339,26 @@ XS(XS_NPC_NextGuardPosition) } XS(XS_NPC_SaveGuardSpot); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_SaveGuardSpot) -{ +XS(XS_NPC_SaveGuardSpot) { dXSARGS; if (items < 1 || items > 2) Perl_croak(aTHX_ "Usage: NPC::SaveGuardSpot(THIS, [bool clear_guard_spot = false])"); { - NPC * THIS; - bool iClearGuardSpot; + NPC *THIS; + bool iClearGuardSpot; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 2) iClearGuardSpot = false; else { - iClearGuardSpot = (bool)SvTRUE(ST(1)); + iClearGuardSpot = (bool) SvTRUE(ST(1)); } THIS->SaveGuardSpot(iClearGuardSpot); @@ -1459,22 +1367,20 @@ XS(XS_NPC_SaveGuardSpot) } XS(XS_NPC_IsGuarding); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_IsGuarding) -{ +XS(XS_NPC_IsGuarding) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::IsGuarding(THIS)"); { - NPC * THIS; - bool RETVAL; + NPC *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsGuarding(); @@ -1485,41 +1391,38 @@ XS(XS_NPC_IsGuarding) } XS(XS_NPC_AI_SetRoambox); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_AI_SetRoambox) -{ +XS(XS_NPC_AI_SetRoambox) { dXSARGS; if (items < 6 || items > 8) - Perl_croak(aTHX_ "Usage: NPC::AI_SetRoambox(THIS, float distance, float max_x, float min_x, float max_y, float min_y, [uint32 max_delay = 2500], [uint32 min_delay = 2500])"); + Perl_croak(aTHX_ + "Usage: NPC::AI_SetRoambox(THIS, float distance, float max_x, float min_x, float max_y, float min_y, [uint32 max_delay = 2500], [uint32 min_delay = 2500])"); { - NPC * THIS; - float iDist = (float)SvNV(ST(1)); - float iMaxX = (float)SvNV(ST(2)); - float iMinX = (float)SvNV(ST(3)); - float iMaxY = (float)SvNV(ST(4)); - float iMinY = (float)SvNV(ST(5)); - uint32 iDelay; - uint32 iMinDelay; + NPC *THIS; + float iDist = (float) SvNV(ST(1)); + float iMaxX = (float) SvNV(ST(2)); + float iMinX = (float) SvNV(ST(3)); + float iMaxY = (float) SvNV(ST(4)); + float iMinY = (float) SvNV(ST(5)); + uint32 iDelay; + uint32 iMinDelay; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - if (items < 7){ + if (items < 7) { iMinDelay = 2500; - iDelay = 2500; - } - else if (items < 8){ + iDelay = 2500; + } else if (items < 8) { iMinDelay = 2500; - iDelay = (uint32)SvUV(ST(6)); - } - else { - iDelay = (uint32)SvUV(ST(6)); - iMinDelay = (uint32)SvUV(ST(7)); + iDelay = (uint32) SvUV(ST(6)); + } else { + iDelay = (uint32) SvUV(ST(6)); + iMinDelay = (uint32) SvUV(ST(7)); } THIS->AI_SetRoambox(iDist, iMaxX, iMinX, iMaxY, iMinY, iDelay, iMinDelay); @@ -1528,263 +1431,252 @@ XS(XS_NPC_AI_SetRoambox) } XS(XS_NPC_GetNPCSpellsID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetNPCSpellsID) -{ +XS(XS_NPC_GetNPCSpellsID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetNPCSpellsID(THIS)"); { - NPC * THIS; - uint32 RETVAL; + NPC *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetNPCSpellsID(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetSpawnPointID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetSpawnPointID) -{ +XS(XS_NPC_GetSpawnPointID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetSpawnPointID(THIS)"); { - NPC * THIS; - uint32 RETVAL; + NPC *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSpawnPointID(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetSpawnPointX); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetSpawnPointX) -{ +XS(XS_NPC_GetSpawnPointX) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetSpawnPointX(THIS)"); { - NPC * THIS; - float RETVAL; + NPC *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSpawnPoint().x; - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetSpawnPointY); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetSpawnPointY) -{ +XS(XS_NPC_GetSpawnPointY) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetSpawnPointY(THIS)"); { - NPC * THIS; - float RETVAL; + NPC *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSpawnPoint().y; - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetSpawnPointZ); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetSpawnPointZ) -{ +XS(XS_NPC_GetSpawnPointZ) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetSpawnPointZ(THIS)"); { - NPC * THIS; - float RETVAL; + NPC *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSpawnPoint().z; - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetSpawnPointH); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetSpawnPointH) -{ +XS(XS_NPC_GetSpawnPointH) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetSpawnPointH(THIS)"); { - NPC * THIS; - float RETVAL; + NPC *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSpawnPoint().w; - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetGuardPointX); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetGuardPointX) -{ +XS(XS_NPC_GetGuardPointX) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetGuardPointX(THIS)"); { - NPC * THIS; - float RETVAL; + NPC *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetGuardPoint().x; - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetGuardPointY); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetGuardPointY) -{ +XS(XS_NPC_GetGuardPointY) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetGuardPointY(THIS)"); { - NPC * THIS; - float RETVAL; + NPC *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetGuardPoint().y; - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetGuardPointZ); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetGuardPointZ) -{ +XS(XS_NPC_GetGuardPointZ) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetGuardPointZ(THIS)"); { - NPC * THIS; - float RETVAL; + NPC *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetGuardPoint().z; - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_NPC_SetPrimSkill); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_SetPrimSkill) -{ +XS(XS_NPC_SetPrimSkill) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::SetPrimSkill(THIS, int skill_id)"); { - NPC * THIS; - int skill_id = (int)SvIV(ST(1)); + NPC *THIS; + int skill_id = (int) SvIV(ST(1)); if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetPrimSkill(skill_id); @@ -1793,22 +1685,20 @@ XS(XS_NPC_SetPrimSkill) } XS(XS_NPC_SetSecSkill); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_SetSecSkill) -{ +XS(XS_NPC_SetSecSkill) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::SetSecSkill(THIS, int skill_id)"); { - NPC * THIS; - int skill_id = (int)SvIV(ST(1)); + NPC *THIS; + int skill_id = (int) SvIV(ST(1)); if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetSecSkill(skill_id); @@ -1817,126 +1707,120 @@ XS(XS_NPC_SetSecSkill) } XS(XS_NPC_GetPrimSkill); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetPrimSkill) -{ +XS(XS_NPC_GetPrimSkill) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetPrimSkill(THIS)"); { - NPC * THIS; - uint32 RETVAL; + NPC *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetPrimSkill(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetSecSkill); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetSecSkill) -{ +XS(XS_NPC_GetSecSkill) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetSecSkill(THIS)"); { - NPC * THIS; - uint32 RETVAL; + NPC *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSecSkill(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetSwarmOwner); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetSwarmOwner) -{ +XS(XS_NPC_GetSwarmOwner) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetSwarmOwner(THIS)"); { - NPC * THIS; - uint32 RETVAL; + NPC *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSwarmOwner(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetSwarmTarget); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetSwarmTarget) -{ +XS(XS_NPC_GetSwarmTarget) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetSwarmTarget(THIS)"); { - NPC * THIS; - uint32 RETVAL; + NPC *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSwarmTarget(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_NPC_SetSwarmTarget); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_SetSwarmTarget) -{ +XS(XS_NPC_SetSwarmTarget) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::SetSwarmTarget(THIS, int target_id)"); { - NPC * THIS; - int target_id = (int)SvIV(ST(1)); + NPC *THIS; + int target_id = (int) SvIV(ST(1)); if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetSwarmTarget(target_id); @@ -1945,23 +1829,21 @@ XS(XS_NPC_SetSwarmTarget) } XS(XS_NPC_ModifyNPCStat); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_ModifyNPCStat) -{ +XS(XS_NPC_ModifyNPCStat) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: NPC::ModifyNPCStat(THIS, string key, string value)"); { - NPC * THIS; - Const_char * identifier = (Const_char *)SvPV_nolen(ST(1)); - Const_char * newValue = (Const_char *)SvPV_nolen(ST(2)); + NPC *THIS; + Const_char *identifier = (Const_char *) SvPV_nolen(ST(1)); + Const_char *newValue = (Const_char *) SvPV_nolen(ST(2)); if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->ModifyNPCStat(identifier, newValue); @@ -1970,27 +1852,26 @@ XS(XS_NPC_ModifyNPCStat) } XS(XS_NPC_AddSpellToNPCList); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_AddSpellToNPCList) -{ +XS(XS_NPC_AddSpellToNPCList) { dXSARGS; if (items != 7) - Perl_croak(aTHX_ "Usage: NPC::AddAISpell(THIS, int priority, int spell_id, int type, int mana_cost, int recast_delay, int resist_adjust)"); + Perl_croak(aTHX_ + "Usage: NPC::AddAISpell(THIS, int priority, int spell_id, int type, int mana_cost, int recast_delay, int resist_adjust)"); { - NPC * THIS; - int priority = (int)SvIV(ST(1)); - int spell_id = (int)SvIV(ST(2)); - int type = (int)SvIV(ST(3)); - int mana_cost = (int)SvIV(ST(4)); - int recast_delay = (int)SvIV(ST(5)); - int resist_adjust = (int)SvIV(ST(6)); + NPC *THIS; + int priority = (int) SvIV(ST(1)); + int spell_id = (int) SvIV(ST(2)); + int type = (int) SvIV(ST(3)); + int mana_cost = (int) SvIV(ST(4)); + int recast_delay = (int) SvIV(ST(5)); + int resist_adjust = (int) SvIV(ST(6)); if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->AddSpellToNPCList(priority, spell_id, type, mana_cost, recast_delay, resist_adjust, 0, 0); @@ -1999,22 +1880,20 @@ XS(XS_NPC_AddSpellToNPCList) } XS(XS_NPC_RemoveSpellFromNPCList); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_RemoveSpellFromNPCList) -{ +XS(XS_NPC_RemoveSpellFromNPCList) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::RemoveAISpell(THIS, int spell_id)"); { - NPC * THIS; - int spell_id = (int)SvIV(ST(1)); + NPC *THIS; + int spell_id = (int) SvIV(ST(1)); if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->RemoveSpellFromNPCList(spell_id); @@ -2023,22 +1902,20 @@ XS(XS_NPC_RemoveSpellFromNPCList) } XS(XS_NPC_SetSpellFocusDMG); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_SetSpellFocusDMG) -{ +XS(XS_NPC_SetSpellFocusDMG) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::SetSpellFocusDMG(THIS, int new_spell_focus_dmg)"); { - NPC * THIS; - int32 NewSpellFocusDMG = (int32)SvIV(ST(1)); + NPC *THIS; + int32 NewSpellFocusDMG = (int32) SvIV(ST(1)); if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetSpellFocusDMG(NewSpellFocusDMG); @@ -2047,48 +1924,45 @@ XS(XS_NPC_SetSpellFocusDMG) } XS(XS_NPC_GetSpellFocusDMG); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetSpellFocusDMG) -{ +XS(XS_NPC_GetSpellFocusDMG) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetSpellFocusDMG(THIS)"); { - NPC * THIS; - int32 RETVAL; + NPC *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSpellFocusDMG(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_NPC_SetSpellFocusHeal); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_SetSpellFocusHeal) -{ +XS(XS_NPC_SetSpellFocusHeal) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: NPC::SetSpellFocusHeal(THIS, int32 new_spell_focus_heal)"); { - NPC * THIS; - int32 NewSpellFocusHeal = (int32)SvIV(ST(1)); + NPC *THIS; + int32 NewSpellFocusHeal = (int32) SvIV(ST(1)); if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetSpellFocusHeal(NewSpellFocusHeal); @@ -2097,209 +1971,201 @@ XS(XS_NPC_SetSpellFocusHeal) } XS(XS_NPC_GetSpellFocusHeal); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetSpellFocusHeal) -{ +XS(XS_NPC_GetSpellFocusHeal) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetSpellFocusHeal(THIS)"); { - NPC * THIS; - int32 RETVAL; + NPC *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSpellFocusHeal(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetSlowMitigation); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetSlowMitigation) -{ +XS(XS_NPC_GetSlowMitigation) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetSlowMitigation(THIS)"); { - NPC * THIS; - float RETVAL; + NPC *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSlowMitigation(); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetAttackSpeed); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetAttackSpeed) -{ +XS(XS_NPC_GetAttackSpeed) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetAttackSpeed(THIS)"); { - NPC * THIS; - float RETVAL; + NPC *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetAttackSpeed(); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetAttackDelay); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetAttackDelay) -{ +XS(XS_NPC_GetAttackDelay) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetAttackDelay(THIS)"); { - NPC * THIS; - float RETVAL; + NPC *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetAttackDelay(); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetAccuracyRating); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetAccuracyRating) -{ +XS(XS_NPC_GetAccuracyRating) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetAccuracyRating(THIS)"); { - NPC * THIS; - int32 RETVAL; + NPC *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetAccuracyRating(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetAvoidanceRating); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetAvoidanceRating) -{ +XS(XS_NPC_GetAvoidanceRating) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetAvoidanceyRating(THIS)"); { - NPC * THIS; - int32 RETVAL; + NPC *THIS; + int32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetAvoidanceRating(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetSpawnKillCount); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetSpawnKillCount) -{ +XS(XS_NPC_GetSpawnKillCount) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetSpawnKillCount(THIS)"); { - NPC * THIS; - uint32 RETVAL; + NPC *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == NULL) + if (THIS == NULL) Perl_croak(aTHX_ "THIS is NULL, avoiding crash."); RETVAL = THIS->GetSpawnKillCount(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_NPC_GetScore); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetScore) -{ +XS(XS_NPC_GetScore) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetScore(THIS)"); { - NPC * THIS; - int RETVAL; + NPC *THIS; + int RETVAL; dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == NULL) + if (THIS == NULL) Perl_croak(aTHX_ "THIS is NULL, avoiding crash."); RETVAL = THIS->GetScore(); - XSprePUSH; PUSHi((UV)RETVAL); + XSprePUSH; + PUSHi((UV) RETVAL); } XSRETURN(1); } @@ -2310,18 +2176,17 @@ XS(XS_NPC_AddMeleeProc) { if (items != 3) Perl_croak(aTHX_ "Usage: NPC::AddMeleeProc(THIS, int spell_id, int chance)"); { - NPC * THIS; - int spell_id = (int)SvIV(ST(1)); - int chance = (int)SvIV(ST(2)); + NPC *THIS; + int spell_id = (int) SvIV(ST(1)); + int chance = (int) SvIV(ST(2)); dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == NULL) + if (THIS == NULL) Perl_croak(aTHX_ "THIS is NULL, avoiding crash."); THIS->AddProcToWeapon(spell_id, true, chance); @@ -2335,21 +2200,20 @@ XS(XS_NPC_AddRangedProc) { if (items != 3) Perl_croak(aTHX_ "Usage: NPC::AddRangedProc(THIS, int spell_id, int chance)"); { - NPC * THIS; - int spell_id = (int)SvIV(ST(1)); - int chance = (int)SvIV(ST(2)); + NPC *THIS; + int spell_id = (int) SvIV(ST(1)); + int chance = (int) SvIV(ST(2)); dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == NULL) + if (THIS == NULL) Perl_croak(aTHX_ "THIS is NULL, avoiding crash."); - THIS->AddRangedProc(spell_id,chance); + THIS->AddRangedProc(spell_id, chance); } XSRETURN_EMPTY; } @@ -2360,21 +2224,20 @@ XS(XS_NPC_AddDefensiveProc) { if (items != 3) Perl_croak(aTHX_ "Usage: NPC::AddDefensiveProc(THIS, int spell_id, int chance)"); { - NPC * THIS; - int spell_id = (int)SvIV(ST(1)); - int chance = (int)SvIV(ST(2)); + NPC *THIS; + int spell_id = (int) SvIV(ST(1)); + int chance = (int) SvIV(ST(2)); dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == NULL) + if (THIS == NULL) Perl_croak(aTHX_ "THIS is NULL, avoiding crash."); - THIS->AddDefensiveProc(spell_id,chance); + THIS->AddDefensiveProc(spell_id, chance); } XSRETURN_EMPTY; } @@ -2385,17 +2248,16 @@ XS(XS_NPC_RemoveMeleeProc) { if (items != 2) Perl_croak(aTHX_ "Usage: NPC::RemoveMeleeProc(THIS, int spell_id)"); { - NPC * THIS; - int spell_id = (int)SvIV(ST(1)); + NPC *THIS; + int spell_id = (int) SvIV(ST(1)); dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == NULL) + if (THIS == NULL) Perl_croak(aTHX_ "THIS is NULL, avoiding crash."); THIS->RemoveProcFromWeapon(spell_id, false); @@ -2409,17 +2271,16 @@ XS(XS_NPC_RemoveRangedProc) { if (items != 2) Perl_croak(aTHX_ "Usage: NPC::RemoveRangedProc(THIS, int spell_id)"); { - NPC * THIS; - int spell_id = (int)SvIV(ST(1)); + NPC *THIS; + int spell_id = (int) SvIV(ST(1)); dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == NULL) + if (THIS == NULL) Perl_croak(aTHX_ "THIS is NULL, avoiding crash."); THIS->RemoveRangedProc(spell_id, false); @@ -2433,17 +2294,16 @@ XS(XS_NPC_RemoveDefensiveProc) { if (items != 2) Perl_croak(aTHX_ "Usage: NPC::RemoveDefensiveProc(THIS, int spell_id)"); { - NPC * THIS; - int spell_id = (int)SvIV(ST(1)); + NPC *THIS; + int spell_id = (int) SvIV(ST(1)); dXSTARG; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == NULL) + if (THIS == NULL) Perl_croak(aTHX_ "THIS is NULL, avoiding crash."); THIS->RemoveDefensiveProc(spell_id, false); @@ -2452,25 +2312,23 @@ XS(XS_NPC_RemoveDefensiveProc) { } XS(XS_NPC_ChangeLastName); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_ChangeLastName) -{ +XS(XS_NPC_ChangeLastName) { dXSARGS; if (items < 1 || items > 2) Perl_croak(aTHX_ "Usage: NPC::ChangeLastName(THIS, string name)"); { - NPC * THIS; - char * name = nullptr; + NPC *THIS; + char *name = nullptr; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - if (items > 1) { name = (char *)SvPV_nolen(ST(1)); } + if (items > 1) { name = (char *) SvPV_nolen(ST(1)); } THIS->ChangeLastName(name); } @@ -2478,21 +2336,19 @@ XS(XS_NPC_ChangeLastName) } XS(XS_NPC_ClearLastName); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_ClearLastName) -{ +XS(XS_NPC_ClearLastName) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::ClearLastName(THIS)"); { - NPC * THIS; + NPC *THIS; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->ClearLastName(); @@ -2501,22 +2357,20 @@ XS(XS_NPC_ClearLastName) } XS(XS_NPC_GetCombatState); /* prototype to pass -Wmissing-prototypes */ -XS(XS_NPC_GetCombatState) -{ +XS(XS_NPC_GetCombatState) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: NPC::GetCombatState(THIS)"); { - NPC * THIS; - bool RETVAL; + NPC *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "NPC")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(NPC *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(NPC *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type NPC"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetCombatEvent(); @@ -2530,114 +2384,113 @@ XS(XS_NPC_GetCombatState) extern "C" #endif XS(boot_NPC); /* prototype to pass -Wmissing-prototypes */ -XS(boot_NPC) -{ +XS(boot_NPC) { dXSARGS; char file[256]; strncpy(file, __FILE__, 256); file[255] = 0; - if(items != 1) + if (items != 1) fprintf(stderr, "boot_quest does not take any arguments."); char buf[128]; //add the strcpy stuff to get rid of const warnings.... - XS_VERSION_BOOTCHECK ; + XS_VERSION_BOOTCHECK; - newXSproto(strcpy(buf, "SignalNPC"), XS_NPC_SignalNPC, file, "$$"); - newXSproto(strcpy(buf, "CheckNPCFactionAlly"), XS_NPC_CheckNPCFactionAlly, file, "$$"); - newXSproto(strcpy(buf, "AddItem"), XS_NPC_AddItem, file, "$$;$$$$$$$$"); - newXSproto(strcpy(buf, "AddLootTable"), XS_NPC_AddLootTable, file, "$"); - newXSproto(strcpy(buf, "RemoveItem"), XS_NPC_RemoveItem, file, "$$;$$"); - newXSproto(strcpy(buf, "ClearItemList"), XS_NPC_ClearItemList, file, "$"); - newXSproto(strcpy(buf, "AddCash"), XS_NPC_AddCash, file, "$$$$$"); - newXSproto(strcpy(buf, "RemoveCash"), XS_NPC_RemoveCash, file, "$"); - newXSproto(strcpy(buf, "CountLoot"), XS_NPC_CountLoot, file, "$"); - newXSproto(strcpy(buf, "GetLoottableID"), XS_NPC_GetLoottableID, file, "$"); - newXSproto(strcpy(buf, "GetCopper"), XS_NPC_GetCopper, file, "$"); - newXSproto(strcpy(buf, "GetSilver"), XS_NPC_GetSilver, file, "$"); - newXSproto(strcpy(buf, "GetGold"), XS_NPC_GetGold, file, "$"); - newXSproto(strcpy(buf, "GetPlatinum"), XS_NPC_GetPlatinum, file, "$"); - newXSproto(strcpy(buf, "SetCopper"), XS_NPC_SetCopper, file, "$$"); - newXSproto(strcpy(buf, "SetSilver"), XS_NPC_SetSilver, file, "$$"); - newXSproto(strcpy(buf, "SetGold"), XS_NPC_SetGold, file, "$$"); - newXSproto(strcpy(buf, "SetPlatinum"), XS_NPC_SetPlatinum, file, "$$"); - newXSproto(strcpy(buf, "SetGrid"), XS_NPC_SetGrid, file, "$$"); - newXSproto(strcpy(buf, "SetSaveWaypoint"), XS_NPC_SetSaveWaypoint, file, "$$"); - newXSproto(strcpy(buf, "SetSp2"), XS_NPC_SetSp2, file, "$$"); - newXSproto(strcpy(buf, "GetWaypointMax"), XS_NPC_GetWaypointMax, file, "$"); - newXSproto(strcpy(buf, "GetGrid"), XS_NPC_GetGrid, file, "$"); - newXSproto(strcpy(buf, "GetSp2"), XS_NPC_GetSp2, file, "$"); - newXSproto(strcpy(buf, "GetNPCFactionID"), XS_NPC_GetNPCFactionID, file, "$"); - newXSproto(strcpy(buf, "GetPrimaryFaction"), XS_NPC_GetPrimaryFaction, file, "$"); - newXSproto(strcpy(buf, "GetNPCHate"), XS_NPC_GetNPCHate, file, "$$"); - newXSproto(strcpy(buf, "IsOnHatelist"), XS_NPC_IsOnHatelist, file, "$$"); - newXSproto(strcpy(buf, "RemoveFromHateList"), XS_NPC_RemoveFromHateList, file, "$$"); - newXSproto(strcpy(buf, "SetNPCFactionID"), XS_NPC_SetNPCFactionID, file, "$$"); - newXSproto(strcpy(buf, "GetMaxDMG"), XS_NPC_GetMaxDMG, file, "$"); - newXSproto(strcpy(buf, "GetMinDMG"), XS_NPC_GetMinDMG, file, "$"); - newXSproto(strcpy(buf, "IsAnimal"), XS_NPC_IsAnimal, file, "$"); - newXSproto(strcpy(buf, "GetPetSpellID"), XS_NPC_GetPetSpellID, file, "$"); - newXSproto(strcpy(buf, "SetPetSpellID"), XS_NPC_SetPetSpellID, file, "$$"); - newXSproto(strcpy(buf, "GetMaxDamage"), XS_NPC_GetMaxDamage, file, "$$"); - newXSproto(strcpy(buf, "SetTaunting"), XS_NPC_SetTaunting, file, "$$"); - newXSproto(strcpy(buf, "PickPocket"), XS_NPC_PickPocket, file, "$$"); - newXSproto(strcpy(buf, "StartSwarmTimer"), XS_NPC_StartSwarmTimer, file, "$$"); - newXSproto(strcpy(buf, "DoClassAttacks"), XS_NPC_DoClassAttacks, file, "$$"); - newXSproto(strcpy(buf, "GetMaxWp"), XS_NPC_GetMaxWp, file, "$"); - newXSproto(strcpy(buf, "DisplayWaypointInfo"), XS_NPC_DisplayWaypointInfo, file, "$$"); - newXSproto(strcpy(buf, "CalculateNewWaypoint"), XS_NPC_CalculateNewWaypoint, file, "$"); - newXSproto(strcpy(buf, "AssignWaypoints"), XS_NPC_AssignWaypoints, file, "$$"); - newXSproto(strcpy(buf, "SetWaypointPause"), XS_NPC_SetWaypointPause, file, "$"); - newXSproto(strcpy(buf, "UpdateWaypoint"), XS_NPC_UpdateWaypoint, file, "$$"); - newXSproto(strcpy(buf, "StopWandering"), XS_NPC_StopWandering, file, "$"); - newXSproto(strcpy(buf, "ResumeWandering"), XS_NPC_ResumeWandering, file, "$"); - newXSproto(strcpy(buf, "PauseWandering"), XS_NPC_PauseWandering, file, "$$"); - newXSproto(strcpy(buf, "MoveTo"), XS_NPC_MoveTo, file, "$$$$"); - newXSproto(strcpy(buf, "NextGuardPosition"), XS_NPC_NextGuardPosition, file, "$"); - newXSproto(strcpy(buf, "SaveGuardSpot"), XS_NPC_SaveGuardSpot, file, "$;$"); - newXSproto(strcpy(buf, "IsGuarding"), XS_NPC_IsGuarding, file, "$"); - newXSproto(strcpy(buf, "AI_SetRoambox"), XS_NPC_AI_SetRoambox, file, "$$$$$$;$$"); - newXSproto(strcpy(buf, "GetNPCSpellsID"), XS_NPC_GetNPCSpellsID, file, "$"); - newXSproto(strcpy(buf, "GetSpawnPointID"), XS_NPC_GetSpawnPointID, file, "$"); - newXSproto(strcpy(buf, "GetSpawnPointX"), XS_NPC_GetSpawnPointX, file, "$"); - newXSproto(strcpy(buf, "GetSpawnPointY"), XS_NPC_GetSpawnPointY, file, "$"); - newXSproto(strcpy(buf, "GetSpawnPointZ"), XS_NPC_GetSpawnPointZ, file, "$"); - newXSproto(strcpy(buf, "GetSpawnPointH"), XS_NPC_GetSpawnPointH, file, "$"); - newXSproto(strcpy(buf, "GetGuardPointX"), XS_NPC_GetGuardPointX, file, "$"); - newXSproto(strcpy(buf, "GetGuardPointY"), XS_NPC_GetGuardPointY, file, "$"); - newXSproto(strcpy(buf, "GetGuardPointZ"), XS_NPC_GetGuardPointZ, file, "$"); - newXSproto(strcpy(buf, "SetPrimSkill"), XS_NPC_SetPrimSkill, file, "$$"); - newXSproto(strcpy(buf, "SetSecSkill"), XS_NPC_SetSecSkill, file, "$$"); - newXSproto(strcpy(buf, "GetPrimSkill"), XS_NPC_GetPrimSkill, file, "$"); - newXSproto(strcpy(buf, "GetSecSkill"), XS_NPC_GetSecSkill, file, "$"); - newXSproto(strcpy(buf, "GetSwarmOwner"), XS_NPC_GetSwarmOwner, file, "$"); - newXSproto(strcpy(buf, "GetSwarmTarget"), XS_NPC_GetSwarmTarget, file, "$"); - newXSproto(strcpy(buf, "SetSwarmTarget"), XS_NPC_SetSwarmTarget, file, "$$"); - newXSproto(strcpy(buf, "ModifyNPCStat"), XS_NPC_ModifyNPCStat, file, "$$$"); - newXSproto(strcpy(buf, "AddAISpell"), XS_NPC_AddSpellToNPCList, file, "$$$$$$$"); - newXSproto(strcpy(buf, "RemoveAISpell"), XS_NPC_RemoveSpellFromNPCList, file, "$$"); - newXSproto(strcpy(buf, "SetSpellFocusDMG"), XS_NPC_SetSpellFocusDMG, file, "$$"); - newXSproto(strcpy(buf, "SetSpellFocusHeal"), XS_NPC_SetSpellFocusHeal, file, "$$"); - newXSproto(strcpy(buf, "GetSpellFocusDMG"), XS_NPC_GetSpellFocusDMG, file, "$"); - newXSproto(strcpy(buf, "GetSpellFocusHeal"), XS_NPC_GetSpellFocusHeal, file, "$"); - newXSproto(strcpy(buf, "GetSlowMitigation"), XS_NPC_GetSlowMitigation, file, "$"); - newXSproto(strcpy(buf, "GetAttackSpeed"), XS_NPC_GetAttackSpeed, file, "$"); - newXSproto(strcpy(buf, "GetAttackDelay"), XS_NPC_GetAttackDelay, file, "$"); - newXSproto(strcpy(buf, "GetAccuracyRating"), XS_NPC_GetAccuracyRating, file, "$"); - newXSproto(strcpy(buf, "GetAvoidanceRating"), XS_NPC_GetAvoidanceRating, file, "$"); - newXSproto(strcpy(buf, "GetSpawnKillCount"), XS_NPC_GetSpawnKillCount, file, "$"); - newXSproto(strcpy(buf, "GetScore"), XS_NPC_GetScore, file, "$"); - newXSproto(strcpy(buf, "AddMeleeProc"), XS_NPC_AddMeleeProc, file, "$$$"); - newXSproto(strcpy(buf, "AddRangedProc"), XS_NPC_AddRangedProc, file, "$$$"); - newXSproto(strcpy(buf, "AddDefensiveProc"), XS_NPC_AddDefensiveProc, file, "$$$"); - newXSproto(strcpy(buf, "RemoveMeleeProc"), XS_NPC_RemoveMeleeProc, file, "$$"); - newXSproto(strcpy(buf, "RemoveRangedProc"), XS_NPC_RemoveRangedProc, file, "$$"); - newXSproto(strcpy(buf, "RemoveDefensiveProc"), XS_NPC_RemoveDefensiveProc, file, "$$"); - newXSproto(strcpy(buf, "ChangeLastName"), XS_NPC_ChangeLastName, file, "$:$"); - newXSproto(strcpy(buf, "ClearLastName"), XS_NPC_ClearLastName, file, "$"); - newXSproto(strcpy(buf, "GetCombatState"), XS_NPC_GetCombatState, file, "$"); + newXSproto(strcpy(buf, "SignalNPC"), XS_NPC_SignalNPC, file, "$$"); + newXSproto(strcpy(buf, "CheckNPCFactionAlly"), XS_NPC_CheckNPCFactionAlly, file, "$$"); + newXSproto(strcpy(buf, "AddItem"), XS_NPC_AddItem, file, "$$;$$$$$$$$"); + newXSproto(strcpy(buf, "AddLootTable"), XS_NPC_AddLootTable, file, "$"); + newXSproto(strcpy(buf, "RemoveItem"), XS_NPC_RemoveItem, file, "$$;$$"); + newXSproto(strcpy(buf, "ClearItemList"), XS_NPC_ClearItemList, file, "$"); + newXSproto(strcpy(buf, "AddCash"), XS_NPC_AddCash, file, "$$$$$"); + newXSproto(strcpy(buf, "RemoveCash"), XS_NPC_RemoveCash, file, "$"); + newXSproto(strcpy(buf, "CountLoot"), XS_NPC_CountLoot, file, "$"); + newXSproto(strcpy(buf, "GetLoottableID"), XS_NPC_GetLoottableID, file, "$"); + newXSproto(strcpy(buf, "GetCopper"), XS_NPC_GetCopper, file, "$"); + newXSproto(strcpy(buf, "GetSilver"), XS_NPC_GetSilver, file, "$"); + newXSproto(strcpy(buf, "GetGold"), XS_NPC_GetGold, file, "$"); + newXSproto(strcpy(buf, "GetPlatinum"), XS_NPC_GetPlatinum, file, "$"); + newXSproto(strcpy(buf, "SetCopper"), XS_NPC_SetCopper, file, "$$"); + newXSproto(strcpy(buf, "SetSilver"), XS_NPC_SetSilver, file, "$$"); + newXSproto(strcpy(buf, "SetGold"), XS_NPC_SetGold, file, "$$"); + newXSproto(strcpy(buf, "SetPlatinum"), XS_NPC_SetPlatinum, file, "$$"); + newXSproto(strcpy(buf, "SetGrid"), XS_NPC_SetGrid, file, "$$"); + newXSproto(strcpy(buf, "SetSaveWaypoint"), XS_NPC_SetSaveWaypoint, file, "$$"); + newXSproto(strcpy(buf, "SetSp2"), XS_NPC_SetSp2, file, "$$"); + newXSproto(strcpy(buf, "GetWaypointMax"), XS_NPC_GetWaypointMax, file, "$"); + newXSproto(strcpy(buf, "GetGrid"), XS_NPC_GetGrid, file, "$"); + newXSproto(strcpy(buf, "GetSp2"), XS_NPC_GetSp2, file, "$"); + newXSproto(strcpy(buf, "GetNPCFactionID"), XS_NPC_GetNPCFactionID, file, "$"); + newXSproto(strcpy(buf, "GetPrimaryFaction"), XS_NPC_GetPrimaryFaction, file, "$"); + newXSproto(strcpy(buf, "GetNPCHate"), XS_NPC_GetNPCHate, file, "$$"); + newXSproto(strcpy(buf, "IsOnHatelist"), XS_NPC_IsOnHatelist, file, "$$"); + newXSproto(strcpy(buf, "RemoveFromHateList"), XS_NPC_RemoveFromHateList, file, "$$"); + newXSproto(strcpy(buf, "SetNPCFactionID"), XS_NPC_SetNPCFactionID, file, "$$"); + newXSproto(strcpy(buf, "GetMaxDMG"), XS_NPC_GetMaxDMG, file, "$"); + newXSproto(strcpy(buf, "GetMinDMG"), XS_NPC_GetMinDMG, file, "$"); + newXSproto(strcpy(buf, "IsAnimal"), XS_NPC_IsAnimal, file, "$"); + newXSproto(strcpy(buf, "GetPetSpellID"), XS_NPC_GetPetSpellID, file, "$"); + newXSproto(strcpy(buf, "SetPetSpellID"), XS_NPC_SetPetSpellID, file, "$$"); + newXSproto(strcpy(buf, "GetMaxDamage"), XS_NPC_GetMaxDamage, file, "$$"); + newXSproto(strcpy(buf, "SetTaunting"), XS_NPC_SetTaunting, file, "$$"); + newXSproto(strcpy(buf, "PickPocket"), XS_NPC_PickPocket, file, "$$"); + newXSproto(strcpy(buf, "StartSwarmTimer"), XS_NPC_StartSwarmTimer, file, "$$"); + newXSproto(strcpy(buf, "DoClassAttacks"), XS_NPC_DoClassAttacks, file, "$$"); + newXSproto(strcpy(buf, "GetMaxWp"), XS_NPC_GetMaxWp, file, "$"); + newXSproto(strcpy(buf, "DisplayWaypointInfo"), XS_NPC_DisplayWaypointInfo, file, "$$"); + newXSproto(strcpy(buf, "CalculateNewWaypoint"), XS_NPC_CalculateNewWaypoint, file, "$"); + newXSproto(strcpy(buf, "AssignWaypoints"), XS_NPC_AssignWaypoints, file, "$$"); + newXSproto(strcpy(buf, "SetWaypointPause"), XS_NPC_SetWaypointPause, file, "$"); + newXSproto(strcpy(buf, "UpdateWaypoint"), XS_NPC_UpdateWaypoint, file, "$$"); + newXSproto(strcpy(buf, "StopWandering"), XS_NPC_StopWandering, file, "$"); + newXSproto(strcpy(buf, "ResumeWandering"), XS_NPC_ResumeWandering, file, "$"); + newXSproto(strcpy(buf, "PauseWandering"), XS_NPC_PauseWandering, file, "$$"); + newXSproto(strcpy(buf, "MoveTo"), XS_NPC_MoveTo, file, "$$$$"); + newXSproto(strcpy(buf, "NextGuardPosition"), XS_NPC_NextGuardPosition, file, "$"); + newXSproto(strcpy(buf, "SaveGuardSpot"), XS_NPC_SaveGuardSpot, file, "$;$"); + newXSproto(strcpy(buf, "IsGuarding"), XS_NPC_IsGuarding, file, "$"); + newXSproto(strcpy(buf, "AI_SetRoambox"), XS_NPC_AI_SetRoambox, file, "$$$$$$;$$"); + newXSproto(strcpy(buf, "GetNPCSpellsID"), XS_NPC_GetNPCSpellsID, file, "$"); + newXSproto(strcpy(buf, "GetSpawnPointID"), XS_NPC_GetSpawnPointID, file, "$"); + newXSproto(strcpy(buf, "GetSpawnPointX"), XS_NPC_GetSpawnPointX, file, "$"); + newXSproto(strcpy(buf, "GetSpawnPointY"), XS_NPC_GetSpawnPointY, file, "$"); + newXSproto(strcpy(buf, "GetSpawnPointZ"), XS_NPC_GetSpawnPointZ, file, "$"); + newXSproto(strcpy(buf, "GetSpawnPointH"), XS_NPC_GetSpawnPointH, file, "$"); + newXSproto(strcpy(buf, "GetGuardPointX"), XS_NPC_GetGuardPointX, file, "$"); + newXSproto(strcpy(buf, "GetGuardPointY"), XS_NPC_GetGuardPointY, file, "$"); + newXSproto(strcpy(buf, "GetGuardPointZ"), XS_NPC_GetGuardPointZ, file, "$"); + newXSproto(strcpy(buf, "SetPrimSkill"), XS_NPC_SetPrimSkill, file, "$$"); + newXSproto(strcpy(buf, "SetSecSkill"), XS_NPC_SetSecSkill, file, "$$"); + newXSproto(strcpy(buf, "GetPrimSkill"), XS_NPC_GetPrimSkill, file, "$"); + newXSproto(strcpy(buf, "GetSecSkill"), XS_NPC_GetSecSkill, file, "$"); + newXSproto(strcpy(buf, "GetSwarmOwner"), XS_NPC_GetSwarmOwner, file, "$"); + newXSproto(strcpy(buf, "GetSwarmTarget"), XS_NPC_GetSwarmTarget, file, "$"); + newXSproto(strcpy(buf, "SetSwarmTarget"), XS_NPC_SetSwarmTarget, file, "$$"); + newXSproto(strcpy(buf, "ModifyNPCStat"), XS_NPC_ModifyNPCStat, file, "$$$"); + newXSproto(strcpy(buf, "AddAISpell"), XS_NPC_AddSpellToNPCList, file, "$$$$$$$"); + newXSproto(strcpy(buf, "RemoveAISpell"), XS_NPC_RemoveSpellFromNPCList, file, "$$"); + newXSproto(strcpy(buf, "SetSpellFocusDMG"), XS_NPC_SetSpellFocusDMG, file, "$$"); + newXSproto(strcpy(buf, "SetSpellFocusHeal"), XS_NPC_SetSpellFocusHeal, file, "$$"); + newXSproto(strcpy(buf, "GetSpellFocusDMG"), XS_NPC_GetSpellFocusDMG, file, "$"); + newXSproto(strcpy(buf, "GetSpellFocusHeal"), XS_NPC_GetSpellFocusHeal, file, "$"); + newXSproto(strcpy(buf, "GetSlowMitigation"), XS_NPC_GetSlowMitigation, file, "$"); + newXSproto(strcpy(buf, "GetAttackSpeed"), XS_NPC_GetAttackSpeed, file, "$"); + newXSproto(strcpy(buf, "GetAttackDelay"), XS_NPC_GetAttackDelay, file, "$"); + newXSproto(strcpy(buf, "GetAccuracyRating"), XS_NPC_GetAccuracyRating, file, "$"); + newXSproto(strcpy(buf, "GetAvoidanceRating"), XS_NPC_GetAvoidanceRating, file, "$"); + newXSproto(strcpy(buf, "GetSpawnKillCount"), XS_NPC_GetSpawnKillCount, file, "$"); + newXSproto(strcpy(buf, "GetScore"), XS_NPC_GetScore, file, "$"); + newXSproto(strcpy(buf, "AddMeleeProc"), XS_NPC_AddMeleeProc, file, "$$$"); + newXSproto(strcpy(buf, "AddRangedProc"), XS_NPC_AddRangedProc, file, "$$$"); + newXSproto(strcpy(buf, "AddDefensiveProc"), XS_NPC_AddDefensiveProc, file, "$$$"); + newXSproto(strcpy(buf, "RemoveMeleeProc"), XS_NPC_RemoveMeleeProc, file, "$$"); + newXSproto(strcpy(buf, "RemoveRangedProc"), XS_NPC_RemoveRangedProc, file, "$$"); + newXSproto(strcpy(buf, "RemoveDefensiveProc"), XS_NPC_RemoveDefensiveProc, file, "$$"); + newXSproto(strcpy(buf, "ChangeLastName"), XS_NPC_ChangeLastName, file, "$:$"); + newXSproto(strcpy(buf, "ClearLastName"), XS_NPC_ClearLastName, file, "$"); + newXSproto(strcpy(buf, "GetCombatState"), XS_NPC_GetCombatState, file, "$"); XSRETURN_YES; } From ed377159938d51308fdbfb12960debb6ce349fa4 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 20:29:00 -0500 Subject: [PATCH 248/670] Add --objet to perl-doc-parser.pl and update usage doc for perl_object.cpp --- utils/scripts/perl-doc-parser.pl | 9 +++++++- zone/perl_object.cpp | 38 ++++++++++++++++---------------- 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/utils/scripts/perl-doc-parser.pl b/utils/scripts/perl-doc-parser.pl index e5de41102..6a0d6f61e 100755 --- a/utils/scripts/perl-doc-parser.pl +++ b/utils/scripts/perl-doc-parser.pl @@ -8,6 +8,7 @@ sub usage() { print " --npc - Prints methods for just npc class methods\n"; print " --entity - Prints methods for just entity class methods\n"; print " --door - Prints methods for just door class methods\n"; + print " --object - Prints methods for just object class methods\n"; print " --group - Prints methods for just group class methods\n"; print " --corpse - Prints methods for just corpse class methods\n"; print " --hateentry - Prints methods for just hateentry class methods\n"; @@ -51,7 +52,7 @@ for my $file (@files) { chomp; $line = $_; - if ($line=~/Client::|Mob::|Corpse::|EntityList::|Doors::|Group::|HateEntry::|NPC::/i && $line=~/_croak/i) { + if ($line=~/Client::|Mob::|Corpse::|EntityList::|Doors::|Group::|HateEntry::|NPC::|Object::/i && $line=~/_croak/i) { #::: Client export if ($export=~/all|client/i) { @@ -89,6 +90,12 @@ for my $file (@files) { $object_prefix = "\$door->"; } + #::: Object export + if ($export=~/all|object/i) { + $split_key = "Object::"; + $object_prefix = "\$object->"; + } + #::: Group export if ($export=~/all|group/i) { $split_key = "Group::"; diff --git a/zone/perl_object.cpp b/zone/perl_object.cpp index f8fc9a4ee..c5a3991e7 100644 --- a/zone/perl_object.cpp +++ b/zone/perl_object.cpp @@ -97,7 +97,7 @@ XS(XS_Object_Delete) { dXSARGS; if (items < 1 || items > 2) - Perl_croak(aTHX_ "Usage: Object::Delete(THIS, reset_state=false)"); + Perl_croak(aTHX_ "Usage: Object::Delete(THIS, [bool reset_state = false])"); { Object * THIS; bool reset_state; @@ -150,7 +150,7 @@ XS(XS_Object_DeleteItem) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Object::DeleteItem(THIS, index)"); + Perl_croak(aTHX_ "Usage: Object::DeleteItem(THIS, uint8 index)"); { Object * THIS; uint8 index = (uint8)SvUV(ST(1)); @@ -228,7 +228,7 @@ XS(XS_Object_SetID) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Object::SetID(THIS, set_id)"); + Perl_croak(aTHX_ "Usage: Object::SetID(THIS, uint16 id)"); { Object * THIS; uint16 set_id = (uint16)SvUV(ST(1)); @@ -487,7 +487,7 @@ XS(XS_Object_SetType) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Object::SetType(THIS, type)"); + Perl_croak(aTHX_ "Usage: Object::SetType(THIS, uint32 type)"); { Object * THIS; uint32 type = (uint32)SvUV(ST(1)); @@ -539,7 +539,7 @@ XS(XS_Object_SetIcon) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Object::SetIcon(THIS, icon)"); + Perl_croak(aTHX_ "Usage: Object::SetIcon(THIS, uint32 icon)"); { Object * THIS; uint32 icon = (uint32)SvUV(ST(1)); @@ -591,7 +591,7 @@ XS(XS_Object_SetItemID) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Object::SetItemID(THIS, itemid)"); + Perl_croak(aTHX_ "Usage: Object::SetItemID(THIS, uint32 item_id)"); { Object * THIS; uint32 itemid = (uint32)SvUV(ST(1)); @@ -615,7 +615,7 @@ XS(XS_Object_SetLocation) { dXSARGS; if (items != 4) - Perl_croak(aTHX_ "Usage: Object::SetLocation(THIS, x, y, z)"); + Perl_croak(aTHX_ "Usage: Object::SetLocation(THIS, float x, float y, float z)"); { Object * THIS; float x = (float)SvNV(ST(1)); @@ -641,7 +641,7 @@ XS(XS_Object_SetX) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Object::SetX(THIS, XPos)"); + Perl_croak(aTHX_ "Usage: Object::SetX(THIS, float x)"); { Object * THIS; float pos = (float)SvNV(ST(1)); @@ -665,7 +665,7 @@ XS(XS_Object_SetY) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Object::SetY(THIS, YPos)"); + Perl_croak(aTHX_ "Usage: Object::SetY(THIS, float y)"); { Object * THIS; float pos = (float)SvNV(ST(1)); @@ -689,7 +689,7 @@ XS(XS_Object_SetZ) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Object::SetZ(THIS, ZPos)"); + Perl_croak(aTHX_ "Usage: Object::SetZ(THIS, float z)"); { Object * THIS; float pos = (float)SvNV(ST(1)); @@ -713,7 +713,7 @@ XS(XS_Object_SetHeading) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Object::SetHeading(THIS, heading)"); + Perl_croak(aTHX_ "Usage: Object::SetHeading(THIS, float heading)"); { Object * THIS; float heading = (float)SvNV(ST(1)); @@ -737,7 +737,7 @@ XS(XS_Object_SetModelName) { dXSARGS; if (items < 1 || items > 2) - Perl_croak(aTHX_ "Usage: Object::SetModelName(THIS, name)"); + Perl_croak(aTHX_ "Usage: Object::SetModelName(THIS, string name)"); { Object * THIS; char * name = nullptr; @@ -835,7 +835,7 @@ XS(XS_Object_GetEntityVariable) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Object::GetEntityVariable(THIS, id)"); + Perl_croak(aTHX_ "Usage: Object::GetEntityVariable(THIS, string key)"); { Object * THIS; Const_char *id = SvPV_nolen(ST(1)); @@ -862,7 +862,7 @@ XS(XS_Object_EntityVariableExists) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Object::EntityVariableExists(THIS, id)"); + Perl_croak(aTHX_ "Usage: Object::EntityVariableExists(THIS, string key)"); { Object * THIS; Const_char *id = SvPV_nolen(ST(1)); @@ -889,7 +889,7 @@ XS(XS_Object_SetEntityVariable) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Object::SetEntityVariable(THIS, id, var)"); + Perl_croak(aTHX_ "Usage: Object::SetEntityVariable(THIS, string key, string var)"); { Object * THIS; Const_char *id = SvPV_nolen(ST(1)); @@ -941,7 +941,7 @@ XS(XS_Object_SetSolidType) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Object::SetSolidType(THIS, type)"); + Perl_croak(aTHX_ "Usage: Object::SetSolidType(THIS, uint16 type)"); { Object * THIS; uint16 type = (uint16)SvUV(ST(1)); @@ -992,7 +992,7 @@ XS(XS_Object_SetSize) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Object::SetSize(THIS, type)"); + Perl_croak(aTHX_ "Usage: Object::SetSize(THIS, float size)"); { Object * THIS; float size = (float)SvNV(ST(1)); @@ -1016,7 +1016,7 @@ XS(XS_Object_SetTiltX) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Object::SetTiltX(THIS, pos)"); + Perl_croak(aTHX_ "Usage: Object::SetTiltX(THIS, float tilt_x)"); { Object * THIS; float pos = (float)SvNV(ST(1)); @@ -1040,7 +1040,7 @@ XS(XS_Object_SetTiltY) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Object::SetTiltY(THIS, pos)"); + Perl_croak(aTHX_ "Usage: Object::SetTiltY(THIS, float tilt_y)"); { Object * THIS; float pos = (float)SvNV(ST(1)); From 5b05987e27720cba44d5e979067d86131b9e9be9 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 20:29:09 -0500 Subject: [PATCH 249/670] perl_object.cpp formatting --- zone/perl_object.cpp | 812 ++++++++++++++++++++----------------------- 1 file changed, 373 insertions(+), 439 deletions(-) diff --git a/zone/perl_object.cpp b/zone/perl_object.cpp index c5a3991e7..062c2c0a3 100644 --- a/zone/perl_object.cpp +++ b/zone/perl_object.cpp @@ -26,7 +26,9 @@ */ #include "../common/features.h" + #ifdef EMBPERL_XS_CLASSES + #include "../common/global_define.h" #include "embperl.h" @@ -41,22 +43,20 @@ #endif XS(XS_Object_IsGroundSpawn); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_IsGroundSpawn) -{ +XS(XS_Object_IsGroundSpawn) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Object::IsGroundSpawn(THIS)"); { - Object * THIS; - bool RETVAL; + Object *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsGroundSpawn(); @@ -67,23 +67,20 @@ XS(XS_Object_IsGroundSpawn) } - XS(XS_Object_Close); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_Close) -{ +XS(XS_Object_Close) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Object::Close(THIS)"); { - Object * THIS; + Object *THIS; if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->Close(); @@ -93,28 +90,26 @@ XS(XS_Object_Close) XS(XS_Object_Delete); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_Delete) -{ +XS(XS_Object_Delete) { dXSARGS; if (items < 1 || items > 2) Perl_croak(aTHX_ "Usage: Object::Delete(THIS, [bool reset_state = false])"); { - Object * THIS; - bool reset_state; + Object *THIS; + bool reset_state; if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (items < 2) reset_state = false; else { - reset_state = (bool)SvTRUE(ST(1)); + reset_state = (bool) SvTRUE(ST(1)); } THIS->Delete(reset_state); @@ -122,21 +117,19 @@ XS(XS_Object_Delete) XSRETURN_EMPTY; } XS(XS_Object_StartDecay); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_StartDecay) -{ +XS(XS_Object_StartDecay) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Object::StartDecay(THIS)"); { - Object * THIS; + Object *THIS; if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->StartDecay(); @@ -146,22 +139,20 @@ XS(XS_Object_StartDecay) XS(XS_Object_DeleteItem); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_DeleteItem) -{ +XS(XS_Object_DeleteItem) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Object::DeleteItem(THIS, uint8 index)"); { - Object * THIS; - uint8 index = (uint8)SvUV(ST(1)); + Object *THIS; + uint8 index = (uint8) SvUV(ST(1)); if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->DeleteItem(index); @@ -170,22 +161,20 @@ XS(XS_Object_DeleteItem) } XS(XS_Object_IsObject); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_IsObject) -{ +XS(XS_Object_IsObject) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Object::IsObject(THIS)"); { - Object * THIS; - bool RETVAL; + Object *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsObject(); @@ -197,22 +186,20 @@ XS(XS_Object_IsObject) XS(XS_Object_Save); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_Save) -{ +XS(XS_Object_Save) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Object::Save(THIS)"); { - Object * THIS; - bool RETVAL; + Object *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->Save(); @@ -224,22 +211,20 @@ XS(XS_Object_Save) XS(XS_Object_SetID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_SetID) -{ +XS(XS_Object_SetID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Object::SetID(THIS, uint16 id)"); { - Object * THIS; - uint16 set_id = (uint16)SvUV(ST(1)); + Object *THIS; + uint16 set_id = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetID(set_id); @@ -249,21 +234,19 @@ XS(XS_Object_SetID) XS(XS_Object_ClearUser); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_ClearUser) -{ +XS(XS_Object_ClearUser) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Object::ClearUser(THIS)"); { - Object * THIS; + Object *THIS; if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->ClearUser(); @@ -273,232 +256,222 @@ XS(XS_Object_ClearUser) XS(XS_Object_GetDBID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_GetDBID) -{ +XS(XS_Object_GetDBID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Object::GetDBID(THIS)"); { - Object * THIS; - uint32 RETVAL; + Object *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetDBID(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Object_GetID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_GetID) -{ +XS(XS_Object_GetID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Object::GetID(THIS)"); { - Object * THIS; - uint16 RETVAL; + Object *THIS; + uint16 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetID(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Object_GetX); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_GetX) -{ +XS(XS_Object_GetX) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Object::GetX(THIS)"); { - Object * THIS; - float RETVAL; + Object *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetX(); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Object_GetY); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_GetY) -{ +XS(XS_Object_GetY) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Object::GetY(THIS)"); { - Object * THIS; - float RETVAL; + Object *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetY(); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Object_GetZ); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_GetZ) -{ +XS(XS_Object_GetZ) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Object::GetZ(THIS)"); { - Object * THIS; - float RETVAL; + Object *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetZ(); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Object_GetHeading); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_GetHeading) -{ +XS(XS_Object_GetHeading) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Object::GetHeading(THIS)"); { - Object * THIS; - float RETVAL; + Object *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetHeadingData(); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Object_VarSave); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_VarSave) -{ +XS(XS_Object_VarSave) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Object::VarSave(THIS)"); { - Object * THIS; - uint32 RETVAL; + Object *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->VarSave(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Object_GetType); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_GetType) -{ +XS(XS_Object_GetType) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Object::GetType(THIS)"); { - Object * THIS; - uint32 RETVAL; + Object *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetType(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Object_SetType); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_SetType) -{ +XS(XS_Object_SetType) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Object::SetType(THIS, uint32 type)"); { - Object * THIS; - uint32 type = (uint32)SvUV(ST(1)); + Object *THIS; + uint32 type = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetType(type); @@ -508,49 +481,46 @@ XS(XS_Object_SetType) XS(XS_Object_GetIcon); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_GetIcon) -{ +XS(XS_Object_GetIcon) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Object::GetIcon(THIS)"); { - Object * THIS; - uint32 RETVAL; + Object *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetIcon(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Object_SetIcon); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_SetIcon) -{ +XS(XS_Object_SetIcon) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Object::SetIcon(THIS, uint32 icon)"); { - Object * THIS; - uint32 icon = (uint32)SvUV(ST(1)); + Object *THIS; + uint32 icon = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetIcon(icon); @@ -560,49 +530,46 @@ XS(XS_Object_SetIcon) XS(XS_Object_GetItemID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_GetItemID) -{ +XS(XS_Object_GetItemID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Object::GetItemID(THIS)"); { - Object * THIS; - uint32 RETVAL; + Object *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetItemID(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Object_SetItemID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_SetItemID) -{ +XS(XS_Object_SetItemID) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Object::SetItemID(THIS, uint32 item_id)"); { - Object * THIS; - uint32 itemid = (uint32)SvUV(ST(1)); + Object *THIS; + uint32 itemid = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetItemID(itemid); @@ -611,24 +578,22 @@ XS(XS_Object_SetItemID) } XS(XS_Object_SetLocation); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_SetLocation) -{ +XS(XS_Object_SetLocation) { dXSARGS; if (items != 4) Perl_croak(aTHX_ "Usage: Object::SetLocation(THIS, float x, float y, float z)"); { - Object * THIS; - float x = (float)SvNV(ST(1)); - float y = (float)SvNV(ST(2)); - float z = (float)SvNV(ST(3)); + Object *THIS; + float x = (float) SvNV(ST(1)); + float y = (float) SvNV(ST(2)); + float z = (float) SvNV(ST(3)); if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetLocation(x, y, z); @@ -637,22 +602,20 @@ XS(XS_Object_SetLocation) } XS(XS_Object_SetX); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_SetX) -{ +XS(XS_Object_SetX) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Object::SetX(THIS, float x)"); { - Object * THIS; - float pos = (float)SvNV(ST(1)); + Object *THIS; + float pos = (float) SvNV(ST(1)); if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetX(pos); @@ -661,22 +624,20 @@ XS(XS_Object_SetX) } XS(XS_Object_SetY); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_SetY) -{ +XS(XS_Object_SetY) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Object::SetY(THIS, float y)"); { - Object * THIS; - float pos = (float)SvNV(ST(1)); + Object *THIS; + float pos = (float) SvNV(ST(1)); if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetY(pos); @@ -685,22 +646,20 @@ XS(XS_Object_SetY) } XS(XS_Object_SetZ); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_SetZ) -{ +XS(XS_Object_SetZ) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Object::SetZ(THIS, float z)"); { - Object * THIS; - float pos = (float)SvNV(ST(1)); + Object *THIS; + float pos = (float) SvNV(ST(1)); if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetZ(pos); @@ -709,22 +668,20 @@ XS(XS_Object_SetZ) } XS(XS_Object_SetHeading); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_SetHeading) -{ +XS(XS_Object_SetHeading) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Object::SetHeading(THIS, float heading)"); { - Object * THIS; - float heading = (float)SvNV(ST(1)); + Object *THIS; + float heading = (float) SvNV(ST(1)); if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetHeading(heading); @@ -733,73 +690,69 @@ XS(XS_Object_SetHeading) } XS(XS_Object_SetModelName); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_SetModelName) -{ +XS(XS_Object_SetModelName) { dXSARGS; if (items < 1 || items > 2) Perl_croak(aTHX_ "Usage: Object::SetModelName(THIS, string name)"); { - Object * THIS; - char * name = nullptr; + Object *THIS; + char *name = nullptr; if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - if (items > 1) { name = (char *)SvPV_nolen(ST(1)); } + if (items > 1) { name = (char *) SvPV_nolen(ST(1)); } THIS->SetModelName(name); } XSRETURN_EMPTY; } XS(XS_Object_GetModelName); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_GetModelName) -{ +XS(XS_Object_GetModelName) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Object::GetModelName(THIS)"); { - Object * THIS; - Const_char * RETVAL; + Object *THIS; + Const_char *RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetModelName(); - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; + sv_setpv(TARG, RETVAL); + XSprePUSH; + PUSHTARG; } XSRETURN(1); } XS(XS_Object_Repop); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_Repop) -{ +XS(XS_Object_Repop) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Object::Repop(THIS)"); { - Object * THIS; + Object *THIS; dXSTARG; if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->Repop(); } @@ -807,22 +760,20 @@ XS(XS_Object_Repop) } XS(XS_Object_Depop); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_Depop) -{ +XS(XS_Object_Depop) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Object::Depop(THIS)"); { - Object * THIS; + Object *THIS; dXSTARG; if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->Depop(); } @@ -831,50 +782,48 @@ XS(XS_Object_Depop) XS(XS_Object_GetEntityVariable); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_GetEntityVariable) -{ +XS(XS_Object_GetEntityVariable) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Object::GetEntityVariable(THIS, string key)"); { - Object * THIS; + Object *THIS; Const_char *id = SvPV_nolen(ST(1)); - Const_char * RETVAL; + Const_char *RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetEntityVariable(id); - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; + sv_setpv(TARG, RETVAL); + XSprePUSH; + PUSHTARG; } XSRETURN(1); } XS(XS_Object_EntityVariableExists); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_EntityVariableExists) -{ +XS(XS_Object_EntityVariableExists) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Object::EntityVariableExists(THIS, string key)"); { - Object * THIS; + Object *THIS; Const_char *id = SvPV_nolen(ST(1)); - bool RETVAL; + bool RETVAL; if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->EntityVariableExists(id); @@ -885,23 +834,21 @@ XS(XS_Object_EntityVariableExists) } XS(XS_Object_SetEntityVariable); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_SetEntityVariable) -{ +XS(XS_Object_SetEntityVariable) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Object::SetEntityVariable(THIS, string key, string var)"); { - Object * THIS; + Object *THIS; Const_char *id = SvPV_nolen(ST(1)); - const char * var = (const char *)SvPV_nolen(ST(2)); + const char *var = (const char *) SvPV_nolen(ST(2)); if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetEntityVariable(id, var); @@ -910,49 +857,46 @@ XS(XS_Object_SetEntityVariable) } XS(XS_Object_GetSolidType); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_GetSolidType) -{ +XS(XS_Object_GetSolidType) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Object::GetSolidType(THIS)"); { - Object * THIS; - uint16 RETVAL; + Object *THIS; + uint16 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSolidType(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Object_SetSolidType); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_SetSolidType) -{ +XS(XS_Object_SetSolidType) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Object::SetSolidType(THIS, uint16 type)"); { - Object * THIS; - uint16 type = (uint16)SvUV(ST(1)); + Object *THIS; + uint16 type = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetSolidType(type); @@ -961,49 +905,46 @@ XS(XS_Object_SetSolidType) } XS(XS_Object_GetSize); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_GetSize) -{ +XS(XS_Object_GetSize) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Object::GetSize(THIS)"); { - Object * THIS; - float RETVAL; + Object *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetSize(); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Object_SetSize); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_SetSize) -{ +XS(XS_Object_SetSize) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Object::SetSize(THIS, float size)"); { - Object * THIS; - float size = (float)SvNV(ST(1)); + Object *THIS; + float size = (float) SvNV(ST(1)); if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetSize(size); @@ -1012,22 +953,20 @@ XS(XS_Object_SetSize) } XS(XS_Object_SetTiltX); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_SetTiltX) -{ +XS(XS_Object_SetTiltX) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Object::SetTiltX(THIS, float tilt_x)"); { - Object * THIS; - float pos = (float)SvNV(ST(1)); + Object *THIS; + float pos = (float) SvNV(ST(1)); if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetTiltX(pos); @@ -1036,22 +975,20 @@ XS(XS_Object_SetTiltX) } XS(XS_Object_SetTiltY); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_SetTiltY) -{ +XS(XS_Object_SetTiltY) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Object::SetTiltY(THIS, float tilt_y)"); { - Object * THIS; - float pos = (float)SvNV(ST(1)); + Object *THIS; + float pos = (float) SvNV(ST(1)); if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SetTiltY(pos); @@ -1060,53 +997,51 @@ XS(XS_Object_SetTiltY) } XS(XS_Object_GetTiltX); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_GetTiltX) -{ +XS(XS_Object_GetTiltX) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Object::GetSize(THIS)"); { - Object * THIS; - float RETVAL; + Object *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetTiltX(); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } XS(XS_Object_GetTiltY); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Object_GetTiltY) -{ +XS(XS_Object_GetTiltY) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Object::GetSize(THIS)"); { - Object * THIS; - float RETVAL; + Object *THIS; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Object")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Object *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Object *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Object"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetTiltY(); - XSprePUSH; PUSHn((double)RETVAL); + XSprePUSH; + PUSHn((double) RETVAL); } XSRETURN(1); } @@ -1115,61 +1050,60 @@ XS(XS_Object_GetTiltY) extern "C" #endif XS(boot_Object); /* prototype to pass -Wmissing-prototypes */ -XS(boot_Object) -{ +XS(boot_Object) { dXSARGS; char file[256]; strncpy(file, __FILE__, 256); file[255] = 0; - if(items != 1) + if (items != 1) fprintf(stderr, "boot_quest does not take any arguments."); char buf[128]; //add the strcpy stuff to get rid of const warnings.... - XS_VERSION_BOOTCHECK ; - newXSproto(strcpy(buf, "Depop"),XS_Object_Depop, file, "$"); - newXSproto(strcpy(buf, "Repop"),XS_Object_Repop, file, "$"); - newXSproto(strcpy(buf, "SetModelName"),XS_Object_SetModelName, file, "$$"); - newXSproto(strcpy(buf, "GetModelName"),XS_Object_GetModelName, file, "$"); - newXSproto(strcpy(buf, "GetX"),XS_Object_GetX, file, "$"); - newXSproto(strcpy(buf, "GetY"),XS_Object_GetY, file, "$"); - newXSproto(strcpy(buf, "GetZ"),XS_Object_GetZ, file, "$"); - newXSproto(strcpy(buf, "GetHeading"),XS_Object_GetHeading, file, "$"); - newXSproto(strcpy(buf, "SetX"),XS_Object_SetX, file, "$$"); - newXSproto(strcpy(buf, "SetY"),XS_Object_SetY, file, "$$"); - newXSproto(strcpy(buf, "SetZ"),XS_Object_SetZ, file, "$$"); - newXSproto(strcpy(buf, "SetHeading"),XS_Object_SetHeading, file, "$$"); - newXSproto(strcpy(buf, "SetLocation"),XS_Object_SetLocation, file, "$$$$"); - newXSproto(strcpy(buf, "SetItemID"),XS_Object_SetItemID, file, "$$"); - newXSproto(strcpy(buf, "GetItemID"),XS_Object_GetItemID, file, "$"); - newXSproto(strcpy(buf, "SetIcon"),XS_Object_SetIcon, file, "$$"); - newXSproto(strcpy(buf, "GetIcon"),XS_Object_GetIcon, file, "$"); - newXSproto(strcpy(buf, "SetType"),XS_Object_SetType, file, "$$"); - newXSproto(strcpy(buf, "GetType"),XS_Object_GetType, file, "$"); - newXSproto(strcpy(buf, "GetDBID"),XS_Object_GetDBID, file, "$"); - newXSproto(strcpy(buf, "ClearUser"),XS_Object_ClearUser, file, "$"); - newXSproto(strcpy(buf, "SetID"),XS_Object_SetID, file, "$$"); - newXSproto(strcpy(buf, "GetID"),XS_Object_GetID, file, "$"); - newXSproto(strcpy(buf, "Save"),XS_Object_Save, file, "$"); - newXSproto(strcpy(buf, "VarSave"),XS_Object_VarSave, file, "$"); - newXSproto(strcpy(buf, "DeleteItem"),XS_Object_DeleteItem, file, "$$"); - newXSproto(strcpy(buf, "StartDecay"),XS_Object_StartDecay, file, "$$"); - newXSproto(strcpy(buf, "Delete"),XS_Object_Delete, file, "$$"); - newXSproto(strcpy(buf, "IsGroundSpawn"),XS_Object_IsGroundSpawn, file, "$"); - newXSproto(strcpy(buf, "Close"),XS_Object_Close, file, "$"); - newXSproto(strcpy(buf, "GetEntityVariable"), XS_Object_GetEntityVariable, file, "$$"); - newXSproto(strcpy(buf, "SetEntityVariable"), XS_Object_SetEntityVariable, file, "$$$"); - newXSproto(strcpy(buf, "EntityVariableExists"), XS_Object_EntityVariableExists, file, "$$"); - newXSproto(strcpy(buf, "SetSolidType"),XS_Object_SetSolidType, file, "$$"); - newXSproto(strcpy(buf, "GetSolidType"),XS_Object_GetSolidType, file, "$"); - newXSproto(strcpy(buf, "SetSize"),XS_Object_SetSize, file, "$$"); - newXSproto(strcpy(buf, "GetSize"),XS_Object_GetSize, file, "$"); - newXSproto(strcpy(buf, "SetTiltX"),XS_Object_SetTiltX, file, "$$"); - newXSproto(strcpy(buf, "SetTiltY"),XS_Object_SetTiltY, file, "$"); - newXSproto(strcpy(buf, "GetTiltX"),XS_Object_GetTiltX, file, "$$"); - newXSproto(strcpy(buf, "GetTiltY"),XS_Object_GetTiltY, file, "$"); + XS_VERSION_BOOTCHECK; + newXSproto(strcpy(buf, "Depop"), XS_Object_Depop, file, "$"); + newXSproto(strcpy(buf, "Repop"), XS_Object_Repop, file, "$"); + newXSproto(strcpy(buf, "SetModelName"), XS_Object_SetModelName, file, "$$"); + newXSproto(strcpy(buf, "GetModelName"), XS_Object_GetModelName, file, "$"); + newXSproto(strcpy(buf, "GetX"), XS_Object_GetX, file, "$"); + newXSproto(strcpy(buf, "GetY"), XS_Object_GetY, file, "$"); + newXSproto(strcpy(buf, "GetZ"), XS_Object_GetZ, file, "$"); + newXSproto(strcpy(buf, "GetHeading"), XS_Object_GetHeading, file, "$"); + newXSproto(strcpy(buf, "SetX"), XS_Object_SetX, file, "$$"); + newXSproto(strcpy(buf, "SetY"), XS_Object_SetY, file, "$$"); + newXSproto(strcpy(buf, "SetZ"), XS_Object_SetZ, file, "$$"); + newXSproto(strcpy(buf, "SetHeading"), XS_Object_SetHeading, file, "$$"); + newXSproto(strcpy(buf, "SetLocation"), XS_Object_SetLocation, file, "$$$$"); + newXSproto(strcpy(buf, "SetItemID"), XS_Object_SetItemID, file, "$$"); + newXSproto(strcpy(buf, "GetItemID"), XS_Object_GetItemID, file, "$"); + newXSproto(strcpy(buf, "SetIcon"), XS_Object_SetIcon, file, "$$"); + newXSproto(strcpy(buf, "GetIcon"), XS_Object_GetIcon, file, "$"); + newXSproto(strcpy(buf, "SetType"), XS_Object_SetType, file, "$$"); + newXSproto(strcpy(buf, "GetType"), XS_Object_GetType, file, "$"); + newXSproto(strcpy(buf, "GetDBID"), XS_Object_GetDBID, file, "$"); + newXSproto(strcpy(buf, "ClearUser"), XS_Object_ClearUser, file, "$"); + newXSproto(strcpy(buf, "SetID"), XS_Object_SetID, file, "$$"); + newXSproto(strcpy(buf, "GetID"), XS_Object_GetID, file, "$"); + newXSproto(strcpy(buf, "Save"), XS_Object_Save, file, "$"); + newXSproto(strcpy(buf, "VarSave"), XS_Object_VarSave, file, "$"); + newXSproto(strcpy(buf, "DeleteItem"), XS_Object_DeleteItem, file, "$$"); + newXSproto(strcpy(buf, "StartDecay"), XS_Object_StartDecay, file, "$$"); + newXSproto(strcpy(buf, "Delete"), XS_Object_Delete, file, "$$"); + newXSproto(strcpy(buf, "IsGroundSpawn"), XS_Object_IsGroundSpawn, file, "$"); + newXSproto(strcpy(buf, "Close"), XS_Object_Close, file, "$"); + newXSproto(strcpy(buf, "GetEntityVariable"), XS_Object_GetEntityVariable, file, "$$"); + newXSproto(strcpy(buf, "SetEntityVariable"), XS_Object_SetEntityVariable, file, "$$$"); + newXSproto(strcpy(buf, "EntityVariableExists"), XS_Object_EntityVariableExists, file, "$$"); + newXSproto(strcpy(buf, "SetSolidType"), XS_Object_SetSolidType, file, "$$"); + newXSproto(strcpy(buf, "GetSolidType"), XS_Object_GetSolidType, file, "$"); + newXSproto(strcpy(buf, "SetSize"), XS_Object_SetSize, file, "$$"); + newXSproto(strcpy(buf, "GetSize"), XS_Object_GetSize, file, "$"); + newXSproto(strcpy(buf, "SetTiltX"), XS_Object_SetTiltX, file, "$$"); + newXSproto(strcpy(buf, "SetTiltY"), XS_Object_SetTiltY, file, "$"); + newXSproto(strcpy(buf, "GetTiltX"), XS_Object_GetTiltX, file, "$$"); + newXSproto(strcpy(buf, "GetTiltY"), XS_Object_GetTiltY, file, "$"); XSRETURN_YES; } #endif //EMBPERL_XS_CLASSES From d331114f71ff0e760eef6f4a04550ab961bc039b Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 20:29:44 -0500 Subject: [PATCH 250/670] Format perl_object.cpp --- zone/perl_object.cpp | 54 ++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/zone/perl_object.cpp b/zone/perl_object.cpp index 062c2c0a3..df2589de4 100644 --- a/zone/perl_object.cpp +++ b/zone/perl_object.cpp @@ -49,7 +49,7 @@ XS(XS_Object_IsGroundSpawn) { Perl_croak(aTHX_ "Usage: Object::IsGroundSpawn(THIS)"); { Object *THIS; - bool RETVAL; + bool RETVAL; if (sv_derived_from(ST(0), "Object")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -96,7 +96,7 @@ XS(XS_Object_Delete) { Perl_croak(aTHX_ "Usage: Object::Delete(THIS, [bool reset_state = false])"); { Object *THIS; - bool reset_state; + bool reset_state; if (sv_derived_from(ST(0), "Object")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -145,7 +145,7 @@ XS(XS_Object_DeleteItem) { Perl_croak(aTHX_ "Usage: Object::DeleteItem(THIS, uint8 index)"); { Object *THIS; - uint8 index = (uint8) SvUV(ST(1)); + uint8 index = (uint8) SvUV(ST(1)); if (sv_derived_from(ST(0), "Object")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -167,7 +167,7 @@ XS(XS_Object_IsObject) { Perl_croak(aTHX_ "Usage: Object::IsObject(THIS)"); { Object *THIS; - bool RETVAL; + bool RETVAL; if (sv_derived_from(ST(0), "Object")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -192,7 +192,7 @@ XS(XS_Object_Save) { Perl_croak(aTHX_ "Usage: Object::Save(THIS)"); { Object *THIS; - bool RETVAL; + bool RETVAL; if (sv_derived_from(ST(0), "Object")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -312,7 +312,7 @@ XS(XS_Object_GetX) { Perl_croak(aTHX_ "Usage: Object::GetX(THIS)"); { Object *THIS; - float RETVAL; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Object")) { @@ -337,7 +337,7 @@ XS(XS_Object_GetY) { Perl_croak(aTHX_ "Usage: Object::GetY(THIS)"); { Object *THIS; - float RETVAL; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Object")) { @@ -362,7 +362,7 @@ XS(XS_Object_GetZ) { Perl_croak(aTHX_ "Usage: Object::GetZ(THIS)"); { Object *THIS; - float RETVAL; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Object")) { @@ -387,7 +387,7 @@ XS(XS_Object_GetHeading) { Perl_croak(aTHX_ "Usage: Object::GetHeading(THIS)"); { Object *THIS; - float RETVAL; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Object")) { @@ -584,9 +584,9 @@ XS(XS_Object_SetLocation) { Perl_croak(aTHX_ "Usage: Object::SetLocation(THIS, float x, float y, float z)"); { Object *THIS; - float x = (float) SvNV(ST(1)); - float y = (float) SvNV(ST(2)); - float z = (float) SvNV(ST(3)); + float x = (float) SvNV(ST(1)); + float y = (float) SvNV(ST(2)); + float z = (float) SvNV(ST(3)); if (sv_derived_from(ST(0), "Object")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -608,7 +608,7 @@ XS(XS_Object_SetX) { Perl_croak(aTHX_ "Usage: Object::SetX(THIS, float x)"); { Object *THIS; - float pos = (float) SvNV(ST(1)); + float pos = (float) SvNV(ST(1)); if (sv_derived_from(ST(0), "Object")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -630,7 +630,7 @@ XS(XS_Object_SetY) { Perl_croak(aTHX_ "Usage: Object::SetY(THIS, float y)"); { Object *THIS; - float pos = (float) SvNV(ST(1)); + float pos = (float) SvNV(ST(1)); if (sv_derived_from(ST(0), "Object")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -652,7 +652,7 @@ XS(XS_Object_SetZ) { Perl_croak(aTHX_ "Usage: Object::SetZ(THIS, float z)"); { Object *THIS; - float pos = (float) SvNV(ST(1)); + float pos = (float) SvNV(ST(1)); if (sv_derived_from(ST(0), "Object")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -674,7 +674,7 @@ XS(XS_Object_SetHeading) { Perl_croak(aTHX_ "Usage: Object::SetHeading(THIS, float heading)"); { Object *THIS; - float heading = (float) SvNV(ST(1)); + float heading = (float) SvNV(ST(1)); if (sv_derived_from(ST(0), "Object")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -787,7 +787,7 @@ XS(XS_Object_GetEntityVariable) { if (items != 2) Perl_croak(aTHX_ "Usage: Object::GetEntityVariable(THIS, string key)"); { - Object *THIS; + Object *THIS; Const_char *id = SvPV_nolen(ST(1)); Const_char *RETVAL; dXSTARG; @@ -814,7 +814,7 @@ XS(XS_Object_EntityVariableExists) { if (items != 2) Perl_croak(aTHX_ "Usage: Object::EntityVariableExists(THIS, string key)"); { - Object *THIS; + Object *THIS; Const_char *id = SvPV_nolen(ST(1)); bool RETVAL; @@ -827,7 +827,7 @@ XS(XS_Object_EntityVariableExists) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->EntityVariableExists(id); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); @@ -839,8 +839,8 @@ XS(XS_Object_SetEntityVariable) { if (items != 3) Perl_croak(aTHX_ "Usage: Object::SetEntityVariable(THIS, string key, string var)"); { - Object *THIS; - Const_char *id = SvPV_nolen(ST(1)); + Object *THIS; + Const_char *id = SvPV_nolen(ST(1)); const char *var = (const char *) SvPV_nolen(ST(2)); if (sv_derived_from(ST(0), "Object")) { @@ -911,7 +911,7 @@ XS(XS_Object_GetSize) { Perl_croak(aTHX_ "Usage: Object::GetSize(THIS)"); { Object *THIS; - float RETVAL; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Object")) { @@ -937,7 +937,7 @@ XS(XS_Object_SetSize) { Perl_croak(aTHX_ "Usage: Object::SetSize(THIS, float size)"); { Object *THIS; - float size = (float) SvNV(ST(1)); + float size = (float) SvNV(ST(1)); if (sv_derived_from(ST(0), "Object")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -959,7 +959,7 @@ XS(XS_Object_SetTiltX) { Perl_croak(aTHX_ "Usage: Object::SetTiltX(THIS, float tilt_x)"); { Object *THIS; - float pos = (float) SvNV(ST(1)); + float pos = (float) SvNV(ST(1)); if (sv_derived_from(ST(0), "Object")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -981,7 +981,7 @@ XS(XS_Object_SetTiltY) { Perl_croak(aTHX_ "Usage: Object::SetTiltY(THIS, float tilt_y)"); { Object *THIS; - float pos = (float) SvNV(ST(1)); + float pos = (float) SvNV(ST(1)); if (sv_derived_from(ST(0), "Object")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -1003,7 +1003,7 @@ XS(XS_Object_GetTiltX) { Perl_croak(aTHX_ "Usage: Object::GetSize(THIS)"); { Object *THIS; - float RETVAL; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Object")) { @@ -1028,7 +1028,7 @@ XS(XS_Object_GetTiltY) { Perl_croak(aTHX_ "Usage: Object::GetSize(THIS)"); { Object *THIS; - float RETVAL; + float RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Object")) { From 57c1cd0be41b8a9587da01d7463948baaffd2b63 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 20:39:07 -0500 Subject: [PATCH 251/670] Add --raid to perl-doc-parser.pl and update usage docs for perl_raids.cpp --- utils/scripts/perl-doc-parser.pl | 9 ++++++++- zone/perl_raids.cpp | 28 ++++++++++++++-------------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/utils/scripts/perl-doc-parser.pl b/utils/scripts/perl-doc-parser.pl index 6a0d6f61e..715286f38 100755 --- a/utils/scripts/perl-doc-parser.pl +++ b/utils/scripts/perl-doc-parser.pl @@ -10,6 +10,7 @@ sub usage() { print " --door - Prints methods for just door class methods\n"; print " --object - Prints methods for just object class methods\n"; print " --group - Prints methods for just group class methods\n"; + print " --raid - Prints methods for just raid class methods\n"; print " --corpse - Prints methods for just corpse class methods\n"; print " --hateentry - Prints methods for just hateentry class methods\n"; print " --all - Prints methods for all classes\n"; @@ -52,7 +53,7 @@ for my $file (@files) { chomp; $line = $_; - if ($line=~/Client::|Mob::|Corpse::|EntityList::|Doors::|Group::|HateEntry::|NPC::|Object::/i && $line=~/_croak/i) { + if ($line=~/Client::|Mob::|Corpse::|EntityList::|Doors::|Group::|HateEntry::|NPC::|Object::|Raid::/i && $line=~/_croak/i) { #::: Client export if ($export=~/all|client/i) { @@ -102,6 +103,12 @@ for my $file (@files) { $object_prefix = "\$group->"; } + #::: Raid export + if ($export=~/all|raid/i) { + $split_key = "Raid::"; + $object_prefix = "\$raid->"; + } + #::: Hateentry export if ($export=~/all|hateentry/i) { $split_key = "HateEntry::"; diff --git a/zone/perl_raids.cpp b/zone/perl_raids.cpp index 60d94600a..26964658c 100644 --- a/zone/perl_raids.cpp +++ b/zone/perl_raids.cpp @@ -47,7 +47,7 @@ XS(XS_Raid_IsRaidMember) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Raid::IsRaidMember(THIS, name)"); + Perl_croak(aTHX_ "Usage: Raid::IsRaidMember(THIS, string name)"); { Raid * THIS; bool RETVAL; @@ -74,7 +74,7 @@ XS(XS_Raid_CastGroupSpell) { dXSARGS; if (items != 4) - Perl_croak(aTHX_ "Usage: Raid::CastGroupSpell(THIS, caster, spellid, gid)"); + Perl_croak(aTHX_ "Usage: Raid::CastGroupSpell(THIS, Mob* caster, uint16 spell_id, uint32 group_id)"); { Raid * THIS; Mob* caster; @@ -109,7 +109,7 @@ XS(XS_Raid_GroupCount) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Raid::GroupCount(THIS, gid)"); + Perl_croak(aTHX_ "Usage: Raid::GroupCount(THIS, uint32 group_id)"); { Raid * THIS; uint8 RETVAL; @@ -162,7 +162,7 @@ XS(XS_Raid_GetGroup) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Raid::GetGroup(THIS, name)"); + Perl_croak(aTHX_ "Usage: Raid::GetGroup(THIS, string name)"); { Raid * THIS; uint32 RETVAL; @@ -189,7 +189,7 @@ XS(XS_Raid_SplitExp) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Raid::SplitExp(THIS, exp, other)"); + Perl_croak(aTHX_ "Usage: Raid::SplitExp(THIS, uint32 experience, [Mob* other = nullptr])"); { Raid * THIS; uint32 exp = (uint32)SvUV(ST(1)); @@ -223,7 +223,7 @@ XS(XS_Raid_GetTotalRaidDamage) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Raid::GetTotalRaidDamage(THIS, other)"); + Perl_croak(aTHX_ "Usage: Raid::GetTotalRaidDamage(THIS, [Mob* other = nullptr])"); { Raid * THIS; uint32 RETVAL; @@ -259,7 +259,7 @@ XS(XS_Raid_SplitMoney) { dXSARGS; if (items != 5) - Perl_croak(aTHX_ "Usage: Raid::SplitMoney(THIS, copper, silver, gold, platinum)"); + Perl_croak(aTHX_ "Usage: Raid::SplitMoney(THIS, uint32 copper, uint32 silver, uint32 gold, uint32 platinum)"); { Raid * THIS; uint32 copper = (uint32)SvUV(ST(1)); @@ -286,7 +286,7 @@ XS(XS_Raid_BalanceHP) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: Raid::BalanceHP(THIS, penalty, gid)"); + Perl_croak(aTHX_ "Usage: Raid::BalanceHP(THIS, int32 penalty, uint32 group_id)"); { Raid * THIS; int32 penalty = (int32)SvUV(ST(1)); @@ -311,7 +311,7 @@ XS(XS_Raid_IsLeader) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Raid::IsLeader(THIS, name)"); + Perl_croak(aTHX_ "Usage: Raid::IsLeader(THIS, string name)"); { Raid * THIS; bool RETVAL; @@ -338,7 +338,7 @@ XS(XS_Raid_IsGroupLeader) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Raid::IsGroupLeader(THIS, who)"); + Perl_croak(aTHX_ "Usage: Raid::IsGroupLeader(THIS, string name)"); { Raid * THIS; bool RETVAL; @@ -417,7 +417,7 @@ XS(XS_Raid_GetClientByIndex) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Raid::GetClientByIndex(THIS, index)"); + Perl_croak(aTHX_ "Usage: Raid::GetClientByIndex(THIS, uint16 raid_indez)"); { Raid * THIS; Client * RETVAL; @@ -444,7 +444,7 @@ XS(XS_Raid_TeleportGroup) { dXSARGS; if (items != 8) - Perl_croak(aTHX_ "Usage: Raid::TeleportGroup(THIS, sender, zoneID, x, y, z, heading, gid)"); + Perl_croak(aTHX_ "Usage: Raid::TeleportGroup(THIS, Mob* sender, uint32 zone_id, float x, float y, float z, float heading, uint32 group_id)"); { Raid * THIS; Mob* sender; @@ -483,7 +483,7 @@ XS(XS_Raid_TeleportRaid) { dXSARGS; if (items != 7) - Perl_croak(aTHX_ "Usage: Raid::TeleportRaid(THIS, sender, zoneID, x, y, z, heading)"); + Perl_croak(aTHX_ "Usage: Raid::TeleportRaid(THIS, Mob* sender, uint32 zone_id, float x, float y, float z, float heading)"); { Raid * THIS; Mob* sender; @@ -547,7 +547,7 @@ XS(XS_Raid_GetMember) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Raid::GetMember(THIS, index)"); + Perl_croak(aTHX_ "Usage: Raid::GetMember(THIS, int raid_index)"); { Raid * THIS; Client* RETVAL = nullptr; From 94aa271a84f183e3a6a58194eacb6e840da98db7 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 20:39:21 -0500 Subject: [PATCH 252/670] perl_raids.cpp formatting --- zone/perl_raids.cpp | 473 +++++++++++++++++++++----------------------- 1 file changed, 221 insertions(+), 252 deletions(-) diff --git a/zone/perl_raids.cpp b/zone/perl_raids.cpp index 26964658c..f5b91448e 100644 --- a/zone/perl_raids.cpp +++ b/zone/perl_raids.cpp @@ -26,7 +26,9 @@ */ #include "../common/features.h" + #ifdef EMBPERL_XS_CLASSES + #include "../common/global_define.h" #include "embperl.h" @@ -43,60 +45,55 @@ XS(XS_Raid_IsRaidMember); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Raid_IsRaidMember) -{ +XS(XS_Raid_IsRaidMember) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Raid::IsRaidMember(THIS, string name)"); { - Raid * THIS; - bool RETVAL; - const char* name = (char *)SvPV_nolen(ST(1)); + Raid *THIS; + bool RETVAL; + const char *name = (char *) SvPV_nolen(ST(1)); if (sv_derived_from(ST(0), "Raid")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Raid *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Raid *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Raid"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsRaidMember(name); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Raid_CastGroupSpell); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Raid_CastGroupSpell) -{ +XS(XS_Raid_CastGroupSpell) { dXSARGS; if (items != 4) Perl_croak(aTHX_ "Usage: Raid::CastGroupSpell(THIS, Mob* caster, uint16 spell_id, uint32 group_id)"); { - Raid * THIS; - Mob* caster; - uint16 spellid = (uint16)SvUV(ST(2)); - uint32 gid = (uint32)SvUV(ST(3)); + Raid *THIS; + Mob *caster; + uint16 spellid = (uint16) SvUV(ST(2)); + uint32 gid = (uint32) SvUV(ST(3)); if (sv_derived_from(ST(0), "Raid")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Raid *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Raid *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Raid"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - caster = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + caster = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "caster is not of type Mob"); - if(caster == nullptr) + if (caster == nullptr) Perl_croak(aTHX_ "caster is nullptr, avoiding crash."); THIS->CastGroupSpell(caster, spellid, gid); @@ -105,112 +102,106 @@ XS(XS_Raid_CastGroupSpell) } XS(XS_Raid_GroupCount); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Raid_GroupCount) -{ +XS(XS_Raid_GroupCount) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Raid::GroupCount(THIS, uint32 group_id)"); { - Raid * THIS; - uint8 RETVAL; + Raid *THIS; + uint8 RETVAL; dXSTARG; - uint32 gid = (uint32)SvUV(ST(1)); + uint32 gid = (uint32) SvUV(ST(1)); if (sv_derived_from(ST(0), "Raid")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Raid *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Raid *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Raid"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GroupCount(gid); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Raid_RaidCount); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Raid_RaidCount) -{ +XS(XS_Raid_RaidCount) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Raid::RaidCount(THIS)"); { - Raid * THIS; - uint8 RETVAL; + Raid *THIS; + uint8 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Raid")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Raid *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Raid *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Raid"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->RaidCount(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Raid_GetGroup); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Raid_GetGroup) -{ +XS(XS_Raid_GetGroup) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Raid::GetGroup(THIS, string name)"); { - Raid * THIS; - uint32 RETVAL; + Raid *THIS; + uint32 RETVAL; dXSTARG; - const char* name = (char *)SvPV_nolen(ST(1)); + const char *name = (char *) SvPV_nolen(ST(1)); if (sv_derived_from(ST(0), "Raid")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Raid *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Raid *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Raid"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetGroup(name); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Raid_SplitExp); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Raid_SplitExp) -{ +XS(XS_Raid_SplitExp) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Raid::SplitExp(THIS, uint32 experience, [Mob* other = nullptr])"); { - Raid * THIS; - uint32 exp = (uint32)SvUV(ST(1)); - Mob* other; + Raid *THIS; + uint32 exp = (uint32) SvUV(ST(1)); + Mob *other; if (sv_derived_from(ST(0), "Raid")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Raid *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Raid *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Raid"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(2), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(2))); - other = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(2))); + other = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "other is not of type Mob"); - if(other == nullptr) + if (other == nullptr) Perl_croak(aTHX_ "other is nullptr, avoiding crash."); THIS->SplitExp(exp, other); @@ -219,61 +210,57 @@ XS(XS_Raid_SplitExp) } XS(XS_Raid_GetTotalRaidDamage); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Raid_GetTotalRaidDamage) -{ +XS(XS_Raid_GetTotalRaidDamage) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Raid::GetTotalRaidDamage(THIS, [Mob* other = nullptr])"); { - Raid * THIS; - uint32 RETVAL; + Raid *THIS; + uint32 RETVAL; dXSTARG; - Mob* other; + Mob *other; if (sv_derived_from(ST(0), "Raid")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Raid *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Raid *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Raid"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - other = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + other = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "other is not of type Mob"); - if(other == nullptr) + if (other == nullptr) Perl_croak(aTHX_ "other is nullptr, avoiding crash."); RETVAL = THIS->GetTotalRaidDamage(other); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Raid_SplitMoney); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Raid_SplitMoney) -{ +XS(XS_Raid_SplitMoney) { dXSARGS; if (items != 5) Perl_croak(aTHX_ "Usage: Raid::SplitMoney(THIS, uint32 copper, uint32 silver, uint32 gold, uint32 platinum)"); { - Raid * THIS; - uint32 copper = (uint32)SvUV(ST(1)); - uint32 silver = (uint32)SvUV(ST(2)); - uint32 gold = (uint32)SvUV(ST(3)); - uint32 platinum = (uint32)SvUV(ST(4)); + Raid *THIS; + uint32 copper = (uint32) SvUV(ST(1)); + uint32 silver = (uint32) SvUV(ST(2)); + uint32 gold = (uint32) SvUV(ST(3)); + uint32 platinum = (uint32) SvUV(ST(4)); if (sv_derived_from(ST(0), "Raid")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Raid *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Raid *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Raid"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->SplitMoney(copper, silver, gold, platinum); @@ -282,23 +269,21 @@ XS(XS_Raid_SplitMoney) } XS(XS_Raid_BalanceHP); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Raid_BalanceHP) -{ +XS(XS_Raid_BalanceHP) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: Raid::BalanceHP(THIS, int32 penalty, uint32 group_id)"); { - Raid * THIS; - int32 penalty = (int32)SvUV(ST(1)); - uint32 gid = (uint32)SvUV(ST(2)); + Raid *THIS; + int32 penalty = (int32) SvUV(ST(1)); + uint32 gid = (uint32) SvUV(ST(2)); if (sv_derived_from(ST(0), "Raid")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Raid *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Raid *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Raid"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); THIS->BalanceHP(penalty, gid); @@ -307,170 +292,160 @@ XS(XS_Raid_BalanceHP) } XS(XS_Raid_IsLeader); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Raid_IsLeader) -{ +XS(XS_Raid_IsLeader) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Raid::IsLeader(THIS, string name)"); { - Raid * THIS; - bool RETVAL; - const char* name = (char *)SvPV_nolen(ST(1)); + Raid *THIS; + bool RETVAL; + const char *name = (char *) SvPV_nolen(ST(1)); if (sv_derived_from(ST(0), "Raid")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Raid *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Raid *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Raid"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsLeader(name); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Raid_IsGroupLeader); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Raid_IsGroupLeader) -{ +XS(XS_Raid_IsGroupLeader) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Raid::IsGroupLeader(THIS, string name)"); { - Raid * THIS; - bool RETVAL; - const char* who = (char *)SvPV_nolen(ST(1)); + Raid *THIS; + bool RETVAL; + const char *who = (char *) SvPV_nolen(ST(1)); if (sv_derived_from(ST(0), "Raid")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Raid *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Raid *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Raid"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsGroupLeader(who); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_Raid_GetHighestLevel); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Raid_GetHighestLevel) -{ +XS(XS_Raid_GetHighestLevel) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Raid::GetHighestLevel(THIS)"); { - Raid * THIS; - uint32 RETVAL; + Raid *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Raid")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Raid *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Raid *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Raid"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetHighestLevel(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Raid_GetLowestLevel); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Raid_GetLowestLevel) -{ +XS(XS_Raid_GetLowestLevel) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Raid::GetLowestLevel(THIS)"); { - Raid * THIS; - uint32 RETVAL; + Raid *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Raid")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Raid *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Raid *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Raid"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetLowestLevel(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Raid_GetClientByIndex); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Raid_GetClientByIndex) -{ +XS(XS_Raid_GetClientByIndex) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Raid::GetClientByIndex(THIS, uint16 raid_indez)"); { - Raid * THIS; - Client * RETVAL; - uint16 index = (uint16)SvUV(ST(1)); + Raid *THIS; + Client *RETVAL; + uint16 index = (uint16) SvUV(ST(1)); if (sv_derived_from(ST(0), "Raid")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Raid *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Raid *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Raid"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetClientByIndex(index); - ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Client", (void*)RETVAL); + ST(0) = sv_newmortal(); + sv_setref_pv(ST(0), "Client", (void *) RETVAL); } XSRETURN(1); } XS(XS_Raid_TeleportGroup); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Raid_TeleportGroup) -{ +XS(XS_Raid_TeleportGroup) { dXSARGS; if (items != 8) - Perl_croak(aTHX_ "Usage: Raid::TeleportGroup(THIS, Mob* sender, uint32 zone_id, float x, float y, float z, float heading, uint32 group_id)"); + Perl_croak(aTHX_ + "Usage: Raid::TeleportGroup(THIS, Mob* sender, uint32 zone_id, float x, float y, float z, float heading, uint32 group_id)"); { - Raid * THIS; - Mob* sender; - uint32 zoneID = (uint32)SvUV(ST(2)); - float x = (float)SvNV(ST(3)); - float y = (float)SvNV(ST(4)); - float z = (float)SvNV(ST(5)); - float heading = (float)SvNV(ST(6)); - uint32 gid = (uint32)SvUV(ST(7)); + Raid *THIS; + Mob *sender; + uint32 zoneID = (uint32) SvUV(ST(2)); + float x = (float) SvNV(ST(3)); + float y = (float) SvNV(ST(4)); + float z = (float) SvNV(ST(5)); + float heading = (float) SvNV(ST(6)); + uint32 gid = (uint32) SvUV(ST(7)); if (sv_derived_from(ST(0), "Raid")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Raid *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Raid *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Raid"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - sender = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + sender = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "sender is not of type Mob"); - if(sender == nullptr) + if (sender == nullptr) Perl_croak(aTHX_ "sender is nullptr, avoiding crash."); THIS->TeleportGroup(sender, zoneID, 0, x, y, z, heading, gid); @@ -479,36 +454,34 @@ XS(XS_Raid_TeleportGroup) } XS(XS_Raid_TeleportRaid); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Raid_TeleportRaid) -{ +XS(XS_Raid_TeleportRaid) { dXSARGS; if (items != 7) - Perl_croak(aTHX_ "Usage: Raid::TeleportRaid(THIS, Mob* sender, uint32 zone_id, float x, float y, float z, float heading)"); + Perl_croak(aTHX_ + "Usage: Raid::TeleportRaid(THIS, Mob* sender, uint32 zone_id, float x, float y, float z, float heading)"); { - Raid * THIS; - Mob* sender; - uint32 zoneID = (uint32)SvUV(ST(2)); - float x = (float)SvNV(ST(3)); - float y = (float)SvNV(ST(4)); - float z = (float)SvNV(ST(5)); - float heading = (float)SvNV(ST(6)); + Raid *THIS; + Mob *sender; + uint32 zoneID = (uint32) SvUV(ST(2)); + float x = (float) SvNV(ST(3)); + float y = (float) SvNV(ST(4)); + float z = (float) SvNV(ST(5)); + float heading = (float) SvNV(ST(6)); if (sv_derived_from(ST(0), "Raid")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Raid *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Raid *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Raid"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); if (sv_derived_from(ST(1), "Mob")) { - IV tmp = SvIV((SV*)SvRV(ST(1))); - sender = INT2PTR(Mob *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(1))); + sender = INT2PTR(Mob *, tmp); + } else Perl_croak(aTHX_ "sender is not of type Mob"); - if(sender == nullptr) + if (sender == nullptr) Perl_croak(aTHX_ "sender is nullptr, avoiding crash."); THIS->TeleportRaid(sender, zoneID, 0, x, y, z, heading); @@ -517,61 +490,58 @@ XS(XS_Raid_TeleportRaid) } XS(XS_Raid_GetID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Raid_GetID) -{ +XS(XS_Raid_GetID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Raid::GetID(THIS)"); { - Raid * THIS; - uint32 RETVAL; + Raid *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "Raid")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Raid *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Raid *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Raid"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetID(); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } XSRETURN(1); } XS(XS_Raid_GetMember); -XS(XS_Raid_GetMember) -{ +XS(XS_Raid_GetMember) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: Raid::GetMember(THIS, int raid_index)"); { - Raid * THIS; - Client* RETVAL = nullptr; + Raid *THIS; + Client *RETVAL = nullptr; dXSTARG; if (sv_derived_from(ST(0), "Raid")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(Raid *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(Raid *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type Raid"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - int index = (int)SvUV(ST(1)); + int index = (int) SvUV(ST(1)); if (index < 0 || index > 71) RETVAL = nullptr; else { - if(THIS->members[index].member != nullptr) + if (THIS->members[index].member != nullptr) RETVAL = THIS->members[index].member->CastToClient(); } - ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "Client", (void*)RETVAL); + ST(0) = sv_newmortal(); + sv_setref_pv(ST(0), "Client", (void *) RETVAL); } XSRETURN(1); } @@ -580,39 +550,38 @@ XS(XS_Raid_GetMember) extern "C" #endif XS(boot_Raid); /* prototype to pass -Wmissing-prototypes */ -XS(boot_Raid) -{ +XS(boot_Raid) { dXSARGS; char file[256]; strncpy(file, __FILE__, 256); file[255] = 0; - if(items != 1) + if (items != 1) fprintf(stderr, "boot_quest does not take any arguments."); char buf[128]; //add the strcpy stuff to get rid of const warnings.... - XS_VERSION_BOOTCHECK ; + XS_VERSION_BOOTCHECK; - newXSproto(strcpy(buf, "IsRaidMember"), XS_Raid_IsRaidMember, file, "$$"); - newXSproto(strcpy(buf, "CastGroupSpell"), XS_Raid_CastGroupSpell, file, "$$$$"); - newXSproto(strcpy(buf, "GroupCount"), XS_Raid_GroupCount, file, "$$"); - newXSproto(strcpy(buf, "RaidCount"), XS_Raid_RaidCount, file, "$"); - newXSproto(strcpy(buf, "GetGroup"), XS_Raid_GetGroup, file, "$$"); - newXSproto(strcpy(buf, "SplitExp"), XS_Raid_SplitExp, file, "$$$"); - newXSproto(strcpy(buf, "GetTotalRaidDamage"), XS_Raid_GetTotalRaidDamage, file, "$$"); - newXSproto(strcpy(buf, "SplitMoney"), XS_Raid_SplitMoney, file, "$$$$$"); - newXSproto(strcpy(buf, "BalanceHP"), XS_Raid_BalanceHP, file, "$$$"); - newXSproto(strcpy(buf, "IsLeader"), XS_Raid_IsLeader, file, "$$"); - newXSproto(strcpy(buf, "IsGroupLeader"), XS_Raid_IsGroupLeader, file, "$$"); - newXSproto(strcpy(buf, "GetHighestLevel"), XS_Raid_GetHighestLevel, file, "$"); - newXSproto(strcpy(buf, "GetLowestLevel"), XS_Raid_GetLowestLevel, file, "$"); - newXSproto(strcpy(buf, "GetClientByIndex"), XS_Raid_GetClientByIndex, file, "$$"); - newXSproto(strcpy(buf, "TeleportGroup"), XS_Raid_TeleportGroup, file, "$$$$$$$$"); - newXSproto(strcpy(buf, "TeleportRaid"), XS_Raid_TeleportRaid, file, "$$$$$$$"); - newXSproto(strcpy(buf, "GetID"), XS_Raid_GetID, file, "$"); - newXSproto(strcpy(buf, "GetMember"), XS_Raid_GetMember, file, "$$"); + newXSproto(strcpy(buf, "IsRaidMember"), XS_Raid_IsRaidMember, file, "$$"); + newXSproto(strcpy(buf, "CastGroupSpell"), XS_Raid_CastGroupSpell, file, "$$$$"); + newXSproto(strcpy(buf, "GroupCount"), XS_Raid_GroupCount, file, "$$"); + newXSproto(strcpy(buf, "RaidCount"), XS_Raid_RaidCount, file, "$"); + newXSproto(strcpy(buf, "GetGroup"), XS_Raid_GetGroup, file, "$$"); + newXSproto(strcpy(buf, "SplitExp"), XS_Raid_SplitExp, file, "$$$"); + newXSproto(strcpy(buf, "GetTotalRaidDamage"), XS_Raid_GetTotalRaidDamage, file, "$$"); + newXSproto(strcpy(buf, "SplitMoney"), XS_Raid_SplitMoney, file, "$$$$$"); + newXSproto(strcpy(buf, "BalanceHP"), XS_Raid_BalanceHP, file, "$$$"); + newXSproto(strcpy(buf, "IsLeader"), XS_Raid_IsLeader, file, "$$"); + newXSproto(strcpy(buf, "IsGroupLeader"), XS_Raid_IsGroupLeader, file, "$$"); + newXSproto(strcpy(buf, "GetHighestLevel"), XS_Raid_GetHighestLevel, file, "$"); + newXSproto(strcpy(buf, "GetLowestLevel"), XS_Raid_GetLowestLevel, file, "$"); + newXSproto(strcpy(buf, "GetClientByIndex"), XS_Raid_GetClientByIndex, file, "$$"); + newXSproto(strcpy(buf, "TeleportGroup"), XS_Raid_TeleportGroup, file, "$$$$$$$$"); + newXSproto(strcpy(buf, "TeleportRaid"), XS_Raid_TeleportRaid, file, "$$$$$$$"); + newXSproto(strcpy(buf, "GetID"), XS_Raid_GetID, file, "$"); + newXSproto(strcpy(buf, "GetMember"), XS_Raid_GetMember, file, "$$"); XSRETURN_YES; } From 9e03d762115ebd19c7669d1040317ddde9c6ad88 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 20:45:24 -0500 Subject: [PATCH 253/670] perl-doc-parser.pl fix --all option --- utils/scripts/perl-doc-parser.pl | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/utils/scripts/perl-doc-parser.pl b/utils/scripts/perl-doc-parser.pl index 715286f38..3ffdeb3b8 100755 --- a/utils/scripts/perl-doc-parser.pl +++ b/utils/scripts/perl-doc-parser.pl @@ -10,7 +10,7 @@ sub usage() { print " --door - Prints methods for just door class methods\n"; print " --object - Prints methods for just object class methods\n"; print " --group - Prints methods for just group class methods\n"; - print " --raid - Prints methods for just raid class methods\n"; + print " --raid - Prints methods for just raid class methods\n"; print " --corpse - Prints methods for just corpse class methods\n"; print " --hateentry - Prints methods for just hateentry class methods\n"; print " --all - Prints methods for all classes\n"; @@ -47,7 +47,7 @@ for my $file (@files) { @methods = (); #::: Open File - print "Opening '" . $file . "'\n"; + print "\nOpening '" . $file . "'\n"; open (FILE, $file); while () { chomp; @@ -56,61 +56,61 @@ for my $file (@files) { if ($line=~/Client::|Mob::|Corpse::|EntityList::|Doors::|Group::|HateEntry::|NPC::|Object::|Raid::/i && $line=~/_croak/i) { #::: Client export - if ($export=~/all|client/i) { + if ($export=~/all|client/i && $line=~/Client::/i) { $split_key = "Client::"; $object_prefix = "\$client->"; } #::: Mob export - if ($export=~/all|mob/i) { + if ($export=~/all|mob/i && $line=~/Mob::/i) { $split_key = "Mob::"; $object_prefix = "\$mob->"; } #::: NPC export - if ($export=~/all|npc/i) { + if ($export=~/all|npc/i && $line=~/NPC::/i) { $split_key = "NPC::"; $object_prefix = "\$npc->"; } #::: Corpse export - if ($export=~/all|corpse/i) { + if ($export=~/all|corpse/i && $line=~/Corpse::/i) { $split_key = "Corpse::"; $object_prefix = "\$corpse->"; } #::: Entity export - if ($export=~/all|entity/i) { + if ($export=~/all|entity/i && $line=~/EntityList::/i) { $split_key = "EntityList::"; $object_prefix = "\$entity_list->"; } #::: Doors export - if ($export=~/all|door/i) { + if ($export=~/all|door/i && $line=~/Doors::/i) { $split_key = "Doors::"; $object_prefix = "\$door->"; } #::: Object export - if ($export=~/all|object/i) { + if ($export=~/all|object/i && $line=~/Object::/i) { $split_key = "Object::"; $object_prefix = "\$object->"; } #::: Group export - if ($export=~/all|group/i) { + if ($export=~/all|group/i && $line=~/Group::/i) { $split_key = "Group::"; $object_prefix = "\$group->"; } #::: Raid export - if ($export=~/all|raid/i) { + if ($export=~/all|raid/i && $line=~/Raid::/i) { $split_key = "Raid::"; $object_prefix = "\$raid->"; } #::: Hateentry export - if ($export=~/all|hateentry/i) { + if ($export=~/all|hateentry/i && $line=~/HateEntry::/i) { $split_key = "HateEntry::"; $object_prefix = "\$hate_entry->"; } From 595138679d0acfc2010375685d8dbb61b7f044a6 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 20:52:56 -0500 Subject: [PATCH 254/670] add --questitem to perl-doc-parser.pl - format and add usage doc to perl_questitem.cpp --- utils/scripts/perl-doc-parser.pl | 11 +- zone/perl_questitem.cpp | 192 +++++++++++++++---------------- 2 files changed, 101 insertions(+), 102 deletions(-) diff --git a/utils/scripts/perl-doc-parser.pl b/utils/scripts/perl-doc-parser.pl index 3ffdeb3b8..8f5f5ac7e 100755 --- a/utils/scripts/perl-doc-parser.pl +++ b/utils/scripts/perl-doc-parser.pl @@ -11,6 +11,7 @@ sub usage() { print " --object - Prints methods for just object class methods\n"; print " --group - Prints methods for just group class methods\n"; print " --raid - Prints methods for just raid class methods\n"; + print " --questitem - Prints methods for just questitem class methods\n"; print " --corpse - Prints methods for just corpse class methods\n"; print " --hateentry - Prints methods for just hateentry class methods\n"; print " --all - Prints methods for all classes\n"; @@ -45,6 +46,8 @@ for my $file (@files) { } @methods = (); + $split_key = ""; + $object_prefix = ""; #::: Open File print "\nOpening '" . $file . "'\n"; @@ -53,7 +56,7 @@ for my $file (@files) { chomp; $line = $_; - if ($line=~/Client::|Mob::|Corpse::|EntityList::|Doors::|Group::|HateEntry::|NPC::|Object::|Raid::/i && $line=~/_croak/i) { + if ($line=~/Perl_croak/i && $line=~/Usa/i && $line=~/::/i) { #::: Client export if ($export=~/all|client/i && $line=~/Client::/i) { @@ -115,6 +118,12 @@ for my $file (@files) { $object_prefix = "\$hate_entry->"; } + #::: Hateentry export + if ($export=~/all|questitem/i && $line=~/QuestItem::/i) { + $split_key = "QuestItem::"; + $object_prefix = "\$quest_item->"; + } + #::: Split on croak usage @data = split($split_key, $line); $usage = trim($data[1]); diff --git a/zone/perl_questitem.cpp b/zone/perl_questitem.cpp index 742a00814..6d728e65e 100644 --- a/zone/perl_questitem.cpp +++ b/zone/perl_questitem.cpp @@ -18,7 +18,9 @@ #include "../common/features.h" #include "client.h" + #ifdef EMBPERL_XS_CLASSES + #include "../common/global_define.h" #include "embperl.h" @@ -28,7 +30,7 @@ #include "../common/item_instance.h" -#ifdef THIS /* this macro seems to leak out on some systems */ +#ifdef THIS /* this macro seems to leak out on some systems */ #undef THIS #endif @@ -38,76 +40,73 @@ XS(XS_QuestItem_GetName) { if (items != 1) Perl_croak(aTHX_ "Usage: QuestItem::GetName(THIS)"); { - EQEmu::ItemInstance * THIS; - Const_char * RETVAL; + EQEmu::ItemInstance *THIS; + Const_char *RETVAL; dXSTARG; if (sv_derived_from(ST(0), "QuestItem")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EQEmu::ItemInstance *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EQEmu::ItemInstance *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EQEmu::ItemInstance"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetItem()->Name; - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; + sv_setpv(TARG, RETVAL); + XSprePUSH; + PUSHTARG; } XSRETURN(1); } XS(XS_QuestItem_SetScale); -XS(XS_QuestItem_SetScale) -{ +XS(XS_QuestItem_SetScale) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: QuestItem::SetScale(THIS, scale factor)"); + Perl_croak(aTHX_ "Usage: QuestItem::SetScale(THIS, float scale_multiplier)"); { - EQEmu::ItemInstance * THIS; - float Mult; + EQEmu::ItemInstance *THIS; + float Mult; if (sv_derived_from(ST(0), "QuestItem")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EQEmu::ItemInstance *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EQEmu::ItemInstance *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EQEmu::ItemInstance"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - Mult = (float)SvNV(ST(1)); + Mult = (float) SvNV(ST(1)); - if(THIS->IsScaling()) { - THIS->SetExp((int)(Mult*10000+.5)); + if (THIS->IsScaling()) { + THIS->SetExp((int) (Mult * 10000 + .5)); } } XSRETURN_EMPTY; } XS(XS_QuestItem_ItemSay); -XS(XS_QuestItem_ItemSay) -{ +XS(XS_QuestItem_ItemSay) { dXSARGS; if (items != 2 && items != 3) - Perl_croak(aTHX_ "Usage: QuestItem::ItemSay(THIS, text [, language])"); + Perl_croak(aTHX_ "Usage: QuestItem::ItemSay(THIS, string text [int language_id])"); { - EQEmu::ItemInstance* THIS; - Const_char* text; - int lang = 0; + EQEmu::ItemInstance *THIS; + Const_char *text; + int lang = 0; if (sv_derived_from(ST(0), "QuestItem")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EQEmu::ItemInstance *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EQEmu::ItemInstance *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EQEmu::ItemInstance"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - text = SvPV_nolen(ST(1)); - if(items == 3) - lang = (int)SvUV(ST(2)); + text = SvPV_nolen(ST(1)); + if (items == 3) + lang = (int) SvUV(ST(2)); quest_manager.GetInitiator()->ChannelMessageSend(THIS->GetItem()->Name, 0, 8, lang, 100, text); } @@ -115,49 +114,45 @@ XS(XS_QuestItem_ItemSay) } XS(XS_QuestItem_IsType); /* prototype to pass -Wmissing-prototypes */ -XS(XS_QuestItem_IsType) -{ +XS(XS_QuestItem_IsType) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: QuestItem::IsType(THIS, type)"); { - EQEmu::ItemInstance* THIS; - bool RETVAL; - uint32 type = (int32)SvIV(ST(1)); + EQEmu::ItemInstance *THIS; + bool RETVAL; + uint32 type = (int32) SvIV(ST(1)); if (sv_derived_from(ST(0), "QuestItem")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EQEmu::ItemInstance *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EQEmu::ItemInstance *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EQEmu::ItemInstance"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - RETVAL = THIS->IsType((EQEmu::item::ItemClass)type); - ST(0) = boolSV(RETVAL); + RETVAL = THIS->IsType((EQEmu::item::ItemClass) type); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); } XSRETURN(1); } XS(XS_QuestItem_IsAttuned); /* prototype to pass -Wmissing-prototypes */ -XS(XS_QuestItem_IsAttuned) -{ +XS(XS_QuestItem_IsAttuned) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: QuestItem::IsAttuned(THIS)"); { - EQEmu::ItemInstance* THIS; - bool RETVAL; + EQEmu::ItemInstance *THIS; + bool RETVAL; if (sv_derived_from(ST(0), "QuestItem")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EQEmu::ItemInstance *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EQEmu::ItemInstance *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EQEmu::ItemInstance"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->IsAttuned(); @@ -168,80 +163,76 @@ XS(XS_QuestItem_IsAttuned) } XS(XS_QuestItem_GetCharges); /* prototype to pass -Wmissing-prototypes */ -XS(XS_QuestItem_GetCharges) -{ +XS(XS_QuestItem_GetCharges) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: QuestItem::GetCharges(THIS)"); { - EQEmu::ItemInstance* THIS; - int16 RETVAL; + EQEmu::ItemInstance *THIS; + int16 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "QuestItem")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EQEmu::ItemInstance *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EQEmu::ItemInstance *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EQEmu::ItemInstance"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetCharges(); - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } XS(XS_QuestItem_GetAugment); /* prototype to pass -Wmissing-prototypes */ -XS(XS_QuestItem_GetAugment) -{ +XS(XS_QuestItem_GetAugment) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: QuestItem::GetAugment(THIS, augment_id)"); + Perl_croak(aTHX_ "Usage: QuestItem::GetAugment(THIS, int16 slot_id)"); { - EQEmu::ItemInstance* THIS; - int16 slot_id = (int16)SvIV(ST(1)); - EQEmu::ItemInstance* RETVAL; + EQEmu::ItemInstance *THIS; + int16 slot_id = (int16) SvIV(ST(1)); + EQEmu::ItemInstance *RETVAL; if (sv_derived_from(ST(0), "QuestItem")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EQEmu::ItemInstance *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EQEmu::ItemInstance *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EQEmu::ItemInstance"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetAugment(slot_id); ST(0) = sv_newmortal(); - sv_setref_pv(ST(0), "QuestItem", (void*)RETVAL); + sv_setref_pv(ST(0), "QuestItem", (void *) RETVAL); } XSRETURN(1); } XS(XS_QuestItem_GetID); /* prototype to pass -Wmissing-prototypes */ -XS(XS_QuestItem_GetID) -{ +XS(XS_QuestItem_GetID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: QuestItem::GetID(THIS)"); { - EQEmu::ItemInstance* THIS; - uint32 RETVAL; + EQEmu::ItemInstance *THIS; + uint32 RETVAL; dXSTARG; if (sv_derived_from(ST(0), "QuestItem")) { - IV tmp = SvIV((SV*)SvRV(ST(0))); - THIS = INT2PTR(EQEmu::ItemInstance *,tmp); - } - else + IV tmp = SvIV((SV *) SvRV(ST(0))); + THIS = INT2PTR(EQEmu::ItemInstance *, tmp); + } else Perl_croak(aTHX_ "THIS is not of type EQEmu::ItemInstance"); - if(THIS == nullptr) + if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetItem()->ID; - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); } XSRETURN(1); } @@ -251,29 +242,28 @@ extern "C" #endif XS(boot_QuestItem); -XS(boot_QuestItem) -{ +XS(boot_QuestItem) { dXSARGS; char file[256]; strncpy(file, __FILE__, 256); file[255] = 0; - if(items != 1) + if (items != 1) fprintf(stderr, "boot_quest does not take any arguments."); char buf[128]; //add the strcpy stuff to get rid of const warnings.... - XS_VERSION_BOOTCHECK ; + XS_VERSION_BOOTCHECK; - newXSproto(strcpy(buf, "GetName"), XS_QuestItem_GetName, file, "$"); - newXSproto(strcpy(buf, "SetScale"), XS_QuestItem_SetScale, file, "$"); - newXSproto(strcpy(buf, "ItemSay"), XS_QuestItem_ItemSay, file, "$"); - newXSproto(strcpy(buf, "IsType"), XS_QuestItem_IsType, file, "$$"); - newXSproto(strcpy(buf, "IsAttuned"), XS_QuestItem_IsAttuned, file, "$"); - newXSproto(strcpy(buf, "GetCharges"), XS_QuestItem_GetCharges, file, "$"); - newXSproto(strcpy(buf, "GetAugment"), XS_QuestItem_GetAugment, file, "$$"); - newXSproto(strcpy(buf, "GetID"), XS_QuestItem_GetID, file, "$"); + newXSproto(strcpy(buf, "GetName"), XS_QuestItem_GetName, file, "$"); + newXSproto(strcpy(buf, "SetScale"), XS_QuestItem_SetScale, file, "$"); + newXSproto(strcpy(buf, "ItemSay"), XS_QuestItem_ItemSay, file, "$"); + newXSproto(strcpy(buf, "IsType"), XS_QuestItem_IsType, file, "$$"); + newXSproto(strcpy(buf, "IsAttuned"), XS_QuestItem_IsAttuned, file, "$"); + newXSproto(strcpy(buf, "GetCharges"), XS_QuestItem_GetCharges, file, "$"); + newXSproto(strcpy(buf, "GetAugment"), XS_QuestItem_GetAugment, file, "$$"); + newXSproto(strcpy(buf, "GetID"), XS_QuestItem_GetID, file, "$"); XSRETURN_YES; } From 5b6f9d3bfb89efbd960abca9aede621be3f86324 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 21:47:34 -0500 Subject: [PATCH 255/670] Add --quest to perl-doc-parser.pl and update usage doc in embparser_api.cpp for quest:: --- utils/scripts/perl-doc-parser.pl | 21 +- zone/embparser_api.cpp | 430 +++++++++++++++---------------- 2 files changed, 231 insertions(+), 220 deletions(-) diff --git a/utils/scripts/perl-doc-parser.pl b/utils/scripts/perl-doc-parser.pl index 8f5f5ac7e..295ba96a4 100755 --- a/utils/scripts/perl-doc-parser.pl +++ b/utils/scripts/perl-doc-parser.pl @@ -14,6 +14,7 @@ sub usage() { print " --questitem - Prints methods for just questitem class methods\n"; print " --corpse - Prints methods for just corpse class methods\n"; print " --hateentry - Prints methods for just hateentry class methods\n"; + print " --quest - Prints methods for just quest class methods\n"; print " --all - Prints methods for all classes\n"; exit(1); } @@ -25,6 +26,12 @@ if($#ARGV < 0) { my $export = $ARGV[0]; $export=~s/--//g; +my $export_file_search = $export; + +if ($export eq "quest") { + $export_file_search = "embparser_api"; +} + my @files; my $start_dir = "zone/"; find( @@ -34,13 +41,13 @@ find( for my $file (@files) { #::: Skip non Perl files - if($file!~/perl_/i){ + if($file!~/perl_|embparser_api/i){ next; } #::: If we are specifying a specific class type, skip everything else if ($export ne "all" && $export ne "") { - if ($file!~/$export/i) { + if ($file!~/$export_file_search/i) { next; } } @@ -56,7 +63,7 @@ for my $file (@files) { chomp; $line = $_; - if ($line=~/Perl_croak/i && $line=~/Usa/i && $line=~/::/i) { + if ($line=~/Perl_croak/i && $line=~/Usa/i && $line=~/::/i && $line!~/::new/i) { #::: Client export if ($export=~/all|client/i && $line=~/Client::/i) { @@ -118,12 +125,18 @@ for my $file (@files) { $object_prefix = "\$hate_entry->"; } - #::: Hateentry export + #::: Questitem export if ($export=~/all|questitem/i && $line=~/QuestItem::/i) { $split_key = "QuestItem::"; $object_prefix = "\$quest_item->"; } + #::: Quest:: exports + if ($export=~/all|quest/i && $line=~/quest::/i) { + $split_key = "quest::"; + $object_prefix = "\quest::"; + } + #::: Split on croak usage @data = split($split_key, $line); $usage = trim($data[1]); diff --git a/zone/embparser_api.cpp b/zone/embparser_api.cpp index 54c136c55..0f160f152 100644 --- a/zone/embparser_api.cpp +++ b/zone/embparser_api.cpp @@ -54,7 +54,7 @@ XS(XS_Client_new) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: Client::new()"); + Perl_croak(aTHX_ "Usage: quest::Client::new()"); { Client * RETVAL; @@ -72,7 +72,7 @@ XS(XS_NPC_new) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: NPC::new()"); + Perl_croak(aTHX_ "Usage: quest::NPC::new()"); { NPC * RETVAL; @@ -90,7 +90,7 @@ XS(XS_EntityList_new) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: EntityList::new()"); + Perl_croak(aTHX_ "Usage: quest::EntityList::new()"); { EntityList * RETVAL; @@ -108,7 +108,7 @@ XS(XS_QuestItem_new) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: QuestItem::new()"); + Perl_croak(aTHX_ "Usage: quest::QuestItem::new()"); EQEmu::ItemInstance* RETVAL; @@ -126,7 +126,7 @@ XS(XS_MobList_new) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: MobList::new()"); + Perl_croak(aTHX_ "Usage: quest::MobList::new()"); ListElement* RETVAL; @@ -146,7 +146,7 @@ XS(XS__echo) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: echo(color_id, message)"); + Perl_croak(aTHX_ "Usage: quest::echo(int emote_color_id, string message)"); quest_manager.echo(SvUV(ST(0)), SvPV_nolen(ST(1))); @@ -162,7 +162,7 @@ XS(XS__say) { else if (items == 2) quest_manager.say(SvPV_nolen(ST(0)), (int)SvIV(ST(1))); else - Perl_croak(aTHX_ "Usage: say(message [, language_id])"); + Perl_croak(aTHX_ "Usage: quest::say(string message, int language_id])"); XSRETURN_EMPTY; } @@ -172,7 +172,7 @@ XS(XS__me) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: %s(message)", "me"); + Perl_croak(aTHX_ "Usage: quest::me(string message)"); quest_manager.me(SvPV_nolen(ST(0))); @@ -188,7 +188,7 @@ XS(XS__summonitem) else if(items == 2) quest_manager.summonitem(SvUV(ST(0)), SvUV(ST(1))); else - Perl_croak(aTHX_ "Usage: summonitem(item_id, [charges])"); + Perl_croak(aTHX_ "Usage: quest::summonitem(int item_id, [int charges])"); XSRETURN_EMPTY; } @@ -197,7 +197,7 @@ XS(XS__write) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: write(file, message)"); + Perl_croak(aTHX_ "Usage: quest::write(string file_name, string message)"); char * file = (char *)SvPV_nolen(ST(0)); char * message = (char *)SvPV_nolen(ST(1)); @@ -212,7 +212,7 @@ XS(XS__spawn) { dXSARGS; if (items != 6) - Perl_croak(aTHX_ "Usage: spawn(npc_type_id, grid_id, int_unused, x, y, z)"); + Perl_croak(aTHX_ "Usage: quest::spawn(int npc_type_id, int grid_id, int int_unused, float x, float y, float z)"); uint16 RETVAL; dXSTARG; @@ -234,7 +234,7 @@ XS(XS__spawn2) { dXSARGS; if (items != 7) - Perl_croak(aTHX_ "Usage: spawn2(npc_type_id, grid_id, int_unused, x, y, z, heading)"); + Perl_croak(aTHX_ "Usage: quest::spawn2(int npc_type_id, int grid_id, int int_unused, float x, float y, float z, float heading)"); uint16 RETVAL; dXSTARG; @@ -256,7 +256,7 @@ XS(XS__unique_spawn) { dXSARGS; if (items != 6 && items != 7) - Perl_croak(aTHX_ "Usage: unique_spawn(npc_type_id, grid_id, int_unused, x, y, z, [heading])"); + Perl_croak(aTHX_ "Usage: quest::unique_spawn(int npc_type_id, int grid_id, int int_unused, float x, float y, float z, [float heading])"); uint16 RETVAL; dXSTARG; @@ -284,7 +284,7 @@ XS(XS__spawn_from_spawn2) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: spawn_from_spawn2(spawn2_id)"); + Perl_croak(aTHX_ "Usage: quest::spawn_from_spawn2(int spawn2_id)"); uint16 RETVAL; dXSTARG; @@ -304,7 +304,7 @@ XS(XS__enable_spawn2) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: enable_spawn2(spawn2_id)"); + Perl_croak(aTHX_ "Usage: quest::enable_spawn2(int spawn2_id)"); int spawn2_id = (int)SvIV(ST(0)); @@ -317,7 +317,7 @@ XS(XS__disable_spawn2) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: disable_spawn2(spawn2_id)"); + Perl_croak(aTHX_ "Usage: quest::disable_spawn2(int spawn2_id)"); int spawn2_id = (int)SvIV(ST(0)); @@ -330,7 +330,7 @@ XS(XS__setstat) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: setstat(stat_id, int_value)"); + Perl_croak(aTHX_ "Usage: quest::setstat(stat_id, int_value)"); int stat_id = (int)SvIV(ST(0)); int int_value = (int)SvIV(ST(1)); @@ -345,7 +345,7 @@ XS(XS__incstat) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: incstat(stat_id, int_value)"); + Perl_croak(aTHX_ "Usage: quest::incstat(int stat_id, int value)"); int stat_id = (int)SvIV(ST(0)); int int_value = (int)SvIV(ST(1)); @@ -360,7 +360,7 @@ XS(XS__castspell) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: castspell(spell_id, target_id)"); + Perl_croak(aTHX_ "Usage: quest::castspell(int spell_id, int target_id)"); int spell_id = (int)SvIV(ST(0)); int target_id = (int)SvIV(ST(1)); @@ -375,7 +375,7 @@ XS(XS__selfcast) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: selfcast(spell_id)"); + Perl_croak(aTHX_ "Usage: quest::selfcast(int spell_id)"); int spell_id = (int)SvIV(ST(0)); @@ -389,7 +389,7 @@ XS(XS__addloot) { dXSARGS; if(items < 1 || items > 3) - Perl_croak(aTHX_ "Usage: addloot(item_id, charges = 0, equipitem = true)"); + Perl_croak(aTHX_ "Usage: quest::addloot(uint32 item_id, uint16 charges = 0, [bool equip_item = true])"); uint32 item_id = (uint32)SvUV(ST(0)); uint16 charges = 0; @@ -410,7 +410,7 @@ XS(XS__zone) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: zone(zone_name)"); + Perl_croak(aTHX_ "Usage: quest::zone(string zone_name)"); char * zone_name = (char *)SvPV_nolen(ST(0)); @@ -424,7 +424,7 @@ XS(XS__settimer) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: settimer(timer_name, seconds)"); + Perl_croak(aTHX_ "Usage: quest::settimer(string timer_name, int seconds)"); char * timer_name = (char *)SvPV_nolen(ST(0)); int seconds = (int)SvIV(ST(1)); @@ -439,7 +439,7 @@ XS(XS__settimerMS) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: settimerMS(timer_name, milliseconds)"); + Perl_croak(aTHX_ "Usage: quest::settimerMS(string timer_name, int milliseconds)"); char * timer_name = (char *)SvPV_nolen(ST(0)); int milliseconds = (int)SvIV(ST(1)); @@ -454,7 +454,7 @@ XS(XS__stoptimer) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: stoptimer(timer_name)"); + Perl_croak(aTHX_ "Usage: quest::stoptimer(string timer_name)"); char * timer_name = (char *)SvPV_nolen(ST(0)); @@ -468,7 +468,7 @@ XS(XS__stopalltimers) { dXSARGS; if (items != 0) - Perl_croak(aTHX_ "Usage: stopalltimers()"); + Perl_croak(aTHX_ "Usage: quest::stopalltimers()"); quest_manager.stopalltimers(); @@ -480,7 +480,7 @@ XS(XS__emote) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: emote(message)"); + Perl_croak(aTHX_ "Usage: quest::emote(string message)"); char * message = (char *)SvPV_nolen(ST(0)); @@ -494,7 +494,7 @@ XS(XS__shout) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: shout(message)"); + Perl_croak(aTHX_ "Usage: quest::shout(string message)"); char * message = (char *)SvPV_nolen(ST(0)); @@ -508,7 +508,7 @@ XS(XS__shout2) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: shout2(message)"); + Perl_croak(aTHX_ "Usage: quest::shout2(string message)"); char * message = (char *)SvPV_nolen(ST(0)); @@ -522,7 +522,7 @@ XS(XS__gmsay) { dXSARGS; if ((items < 1) || (items > 5)) - Perl_croak(aTHX_ "Usage: gmsay(message, color_id, send_to_world)"); + Perl_croak(aTHX_ "Usage: quest::gmsay(string message, [int color_id], [bool send_to_world = 0])"); char * message = (char *)SvPV_nolen(ST(0)); int color_id = 7; @@ -554,7 +554,7 @@ XS(XS__depop) { dXSARGS; if (items < 0 || items > 1) - Perl_croak(aTHX_ "Usage: depop(npc_type_id = 0)"); + Perl_croak(aTHX_ "Usage: quest::depop(int npc_type_id = 0)"); int npc_type_id; @@ -574,7 +574,7 @@ XS(XS__depop_withtimer) { dXSARGS; if (items < 0 || items > 1) - Perl_croak(aTHX_ "Usage: depop_withtimer(npc_type_id= 0)"); + Perl_croak(aTHX_ "Usage: quest::depop_withtimer(int npc_type_id = 0)"); int npc_type_id; @@ -594,7 +594,7 @@ XS(XS__depopall) { dXSARGS; if (items < 0 || items > 1) - Perl_croak(aTHX_ "Usage: depopall(npc_type_id= 0)"); + Perl_croak(aTHX_ "Usage: quest::depopall(int npc_type_id = 0)"); int npc_type_id; @@ -614,7 +614,7 @@ XS(XS__settarget) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: settarget(target_enum, target_id)"); + Perl_croak(aTHX_ "Usage: quest::settarget(string target_enum ['npc_type', 'entity'], int target_id)"); char * target_enum = (char *)SvPV_nolen(ST(0)); int target_id = (int)SvIV(ST(1)); @@ -629,7 +629,7 @@ XS(XS__follow) { dXSARGS; if (items != 1 && items != 2) - Perl_croak(aTHX_ "Usage: follow(entity_id, [distance])"); + Perl_croak(aTHX_ "Usage: quest::follow(int entity_id, [int distance = 10])"); int entity_id = (int)SvIV(ST(0)); int distance; @@ -649,7 +649,7 @@ XS(XS__sfollow) { dXSARGS; if (items != 0) - Perl_croak(aTHX_ "Usage: sfollow()"); + Perl_croak(aTHX_ "Usage: quest::sfollow()"); quest_manager.sfollow(); @@ -662,7 +662,7 @@ XS(XS__changedeity) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: changedeity(diety_id)"); + Perl_croak(aTHX_ "Usage: quest::changedeity(int deity_id)"); int diety_id = (int)SvIV(ST(0)); @@ -676,7 +676,7 @@ XS(XS__exp) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: exp(amt)"); + Perl_croak(aTHX_ "Usage: quest::exp(int amount)"); int amt = (int)SvIV(ST(0)); @@ -690,7 +690,7 @@ XS(XS__level) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: level(newlevel)"); + Perl_croak(aTHX_ "Usage: quest::level(int new_level)"); int newlevel = (int)SvIV(ST(0)); @@ -704,7 +704,7 @@ XS(XS__traindisc) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: traindisc(discipline_tome_item_id)"); + Perl_croak(aTHX_ "Usage: quest::traindisc(int tome_item_id)"); int discipline_tome_item_id = (int)SvIV(ST(0)); @@ -718,7 +718,7 @@ XS(XS__isdisctome) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: isdisctome(item_id)"); + Perl_croak(aTHX_ "Usage: quest::isdisctome(int item_id)"); bool RETVAL; int item_id = (int)SvIV(ST(0)); @@ -735,7 +735,7 @@ XS(XS__safemove) { dXSARGS; if (items != 0) - Perl_croak(aTHX_ "Usage: safemove()"); + Perl_croak(aTHX_ "Usage: quest::safemove()"); quest_manager.safemove(); @@ -748,7 +748,7 @@ XS(XS__rain) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: rain(weather)"); + Perl_croak(aTHX_ "Usage: quest::rain(int weather)"); int weather = (int)SvIV(ST(0)); @@ -762,7 +762,7 @@ XS(XS__snow) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: snow(weather)"); + Perl_croak(aTHX_ "Usage: quest::snow(int weather)"); int weather = (int)SvIV(ST(0)); @@ -776,7 +776,7 @@ XS(XS__surname) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: surname(name)"); + Perl_croak(aTHX_ "Usage: quest::surname(string name)"); char * name = (char *)SvPV_nolen(ST(0)); @@ -790,7 +790,7 @@ XS(XS__permaclass) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: permaclass(class_id)"); + Perl_croak(aTHX_ "Usage: quest::permaclass(int class_id)"); int class_id = (int)SvIV(ST(0)); @@ -804,7 +804,7 @@ XS(XS__permarace) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: permarace(race_id)"); + Perl_croak(aTHX_ "Usage: quest::permarace(int race_id)"); int race_id = (int)SvIV(ST(0)); @@ -818,7 +818,7 @@ XS(XS__permagender) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: permagender(gender_id)"); + Perl_croak(aTHX_ "Usage: quest::permagender(int gender_id)"); int gender_id = (int)SvIV(ST(0)); @@ -832,7 +832,7 @@ XS(XS__scribespells) { dXSARGS; if (items < 1) - Perl_croak(aTHX_ "Usage: scribespells(max_level, min_level = 1)"); + Perl_croak(aTHX_ "Usage: quest::scribespells(int max_level, [int min_level = 1])"); uint16 RETVAL; dXSTARG; @@ -854,7 +854,7 @@ XS(XS__traindiscs) { dXSARGS; if (items < 1) - Perl_croak(aTHX_ "Usage: traindiscs(max_level, min_level = 1)"); + Perl_croak(aTHX_ "Usage: quest::traindiscs(int max_level, [int min_level = 1])"); uint16 RETVAL; dXSTARG; @@ -876,7 +876,7 @@ XS(XS__unscribespells) { dXSARGS; if (items != 0) - Perl_croak(aTHX_ "Usage: unscribespells()"); + Perl_croak(aTHX_ "Usage: quest::unscribespells()"); quest_manager.unscribespells(); @@ -889,7 +889,7 @@ XS(XS__untraindiscs) { dXSARGS; if (items != 0) - Perl_croak(aTHX_ "Usage: untraindiscs()"); + Perl_croak(aTHX_ "Usage: quest::untraindiscs()"); quest_manager.untraindiscs(); @@ -902,7 +902,7 @@ XS(XS__givecash) { dXSARGS; if (items != 4) - Perl_croak(aTHX_ "Usage: givecash(copper, silver, gold, platinum)"); + Perl_croak(aTHX_ "Usage: quest::givecash(int copper, int silver, int gold, int platinum)"); int copper = (int)SvIV(ST(0)); int silver = (int)SvIV(ST(1)); @@ -919,7 +919,7 @@ XS(XS__pvp) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: pvp(mode)"); + Perl_croak(aTHX_ "Usage: quest::pvp(string mode [on|off])"); char * mode = (char *)SvPV_nolen(ST(0)); @@ -933,7 +933,7 @@ XS(XS__movepc) { dXSARGS; if (items != 4 && items != 5) - Perl_croak(aTHX_ "Usage: movepc(zone_id, x, y, z [,heading])"); + Perl_croak(aTHX_ "Usage: quest::movepc(int zone_id, float x, float y, float z [float heading])"); int zone_id = (int)SvIV(ST(0)); float x = (float)SvNV(ST(1)); @@ -957,7 +957,7 @@ XS(XS__gmmove) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: gmmove(x, y, z)"); + Perl_croak(aTHX_ "Usage: quest::gmmove(float x, float y, float z)"); float x = (float)SvNV(ST(0)); float y = (float)SvNV(ST(1)); @@ -973,7 +973,7 @@ XS(XS__movegrp) { dXSARGS; if (items != 4) - Perl_croak(aTHX_ "Usage: movegrp(zone_id, x, y, z)"); + Perl_croak(aTHX_ "Usage: quest::movegrp(int zone_id, float x, float y, float z)"); int zone_id = (int)SvIV(ST(0)); float x = (float)SvNV(ST(1)); @@ -990,7 +990,7 @@ XS(XS__doanim) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: doanim(anim_id)"); + Perl_croak(aTHX_ "Usage: quest::doanim(int animation_id)"); int anim_id = (int)SvIV(ST(0)); @@ -1004,7 +1004,7 @@ XS(XS__addskill) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: addskill(skill_id, int_value)"); + Perl_croak(aTHX_ "Usage: quest::addskill(int skill_id, int value)"); int skill_id = (int)SvIV(ST(0)); int int_value = (int)SvIV(ST(1)); @@ -1019,7 +1019,7 @@ XS(XS__setlanguage) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: setlanguage(skill_id, int_value)"); + Perl_croak(aTHX_ "Usage: quest::setlanguage(int skill_id, int value)"); int skill_id = (int)SvIV(ST(0)); int int_value = (int)SvIV(ST(1)); @@ -1034,7 +1034,7 @@ XS(XS__setskill) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: setskill(skill_id, int_value)"); + Perl_croak(aTHX_ "Usage: quest::setskill(int skill_id, int value)"); int skill_id = (int)SvIV(ST(0)); int int_value = (int)SvIV(ST(1)); @@ -1049,7 +1049,7 @@ XS(XS__setallskill) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: setallskill(int_value)"); + Perl_croak(aTHX_ "Usage: quest::setallskill(int value)"); int int_value = (int)SvIV(ST(0)); @@ -1063,7 +1063,7 @@ XS(XS__attack) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: attack(client_name)"); + Perl_croak(aTHX_ "Usage: quest::attack(string client_name)"); char * client_name = (char *)SvPV_nolen(ST(0)); @@ -1077,7 +1077,7 @@ XS(XS__attacknpc) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: attacknpc(npc_entity_id)"); + Perl_croak(aTHX_ "Usage: quest::attacknpc(int npc_entity_id)"); int npc_entity_id = (int)SvIV(ST(0)); @@ -1091,7 +1091,7 @@ XS(XS__attacknpctype) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: attacknpctype(npc_type_id)"); + Perl_croak(aTHX_ "Usage: quest::attacknpctype(int npc_type_id)"); int npc_type_id = (int)SvIV(ST(0)); @@ -1105,7 +1105,7 @@ XS(XS__save) { dXSARGS; if (items != 0) - Perl_croak(aTHX_ "Usage: save()"); + Perl_croak(aTHX_ "Usage: quest::save()"); quest_manager.save(); @@ -1118,7 +1118,7 @@ XS(XS__faction) { dXSARGS; if (items < 2 || items > 3) - Perl_croak(aTHX_ "Usage: faction(faction_id, int_value, temp)"); + Perl_croak(aTHX_ "Usage: quest::faction(int faction_id, int value, [int temp = 0])"); int faction_id = (int)SvIV(ST(0)); int int_value = (int)SvIV(ST(1)); @@ -1139,7 +1139,7 @@ XS(XS__setsky) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: setsky(new_sky)"); + Perl_croak(aTHX_ "Usage: quest::setsky(uint8 sky)"); unsigned char new_sky = (unsigned char)SvUV(ST(0)); @@ -1153,7 +1153,7 @@ XS(XS__setguild) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: setguild(new_guild_id, guild_rank_id)"); + Perl_croak(aTHX_ "Usage: quest::setguild(int guild_id, int guild_rank_id)"); unsigned long new_guild_id = (unsigned long)SvUV(ST(0)); int guild_rank_id = (int)SvIV(ST(1)); @@ -1168,7 +1168,7 @@ XS(XS__createguild) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: createguild(guild_name, leader_name)"); + Perl_croak(aTHX_ "Usage: quest::createguild(string guild_name, string leader_name)"); char * guild_name = (char *)SvPV_nolen(ST(0)); char * leader_name = (char *)SvPV_nolen(ST(1)); @@ -1183,7 +1183,7 @@ XS(XS__settime) { dXSARGS; if (items < 2) - Perl_croak(aTHX_ "Usage: settime(new_hour, new_min, [update_world = true])"); + Perl_croak(aTHX_ "Usage: quest::settime(int new_hour, int new_min, [bool update_world = true])"); if (items == 2){ int new_hour = (int)SvIV(ST(0)); @@ -1211,7 +1211,7 @@ XS(XS__itemlink) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: itemlink(item_id)"); + Perl_croak(aTHX_ "Usage: quest::itemlink(int item_id)"); int item_id = (int)SvIV(ST(0)); @@ -1235,7 +1235,7 @@ XS(XS__signalwith) int wait = (int)SvIV(ST(2)); quest_manager.signalwith(npc_id, signal_id, wait); } else { - Perl_croak(aTHX_ "Usage: signalwith(npc_id,signal_id[,wait_ms])"); + Perl_croak(aTHX_ "Usage: quest::signalwith(int npc_id, int signal_id, [int wait_ms])"); } XSRETURN_EMPTY; @@ -1254,7 +1254,7 @@ XS(XS__signal) int wait = (int)SvIV(ST(1)); quest_manager.signal(npc_id, wait); } else { - Perl_croak(aTHX_ "Usage: signal(npc_id[,wait_ms])"); + Perl_croak(aTHX_ "Usage: quest::signal(int npc_id, [int wait_ms])"); } XSRETURN_EMPTY; @@ -1265,7 +1265,7 @@ XS(XS__setglobal) { dXSARGS; if (items != 4) - Perl_croak(aTHX_ "Usage: setglobal(key, str_value, options, duration)"); + Perl_croak(aTHX_ "Usage: quest::setglobal(stirng key, string value, int options, string duration)"); char * key = (char *)SvPV_nolen(ST(0)); char * str_value = (char *)SvPV_nolen(ST(1)); @@ -1282,7 +1282,7 @@ XS(XS__targlobal) { dXSARGS; if (items != 6) - Perl_croak(aTHX_ "Usage: targlobal(key, str_value, duration, npc_id, char_id, zone_id)"); + Perl_croak(aTHX_ "Usage: quest::targlobal(stirng key, string value, string duration, int npc_id, int chararacter_id, int zone_id)"); char * key = (char *)SvPV_nolen(ST(0)); char * str_value = (char *)SvPV_nolen(ST(1)); @@ -1301,7 +1301,7 @@ XS(XS__delglobal) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: delglobal(key)"); + Perl_croak(aTHX_ "Usage: quest::delglobal(string key)"); char * key = (char *)SvPV_nolen(ST(0)); @@ -1315,7 +1315,7 @@ XS(XS__ding) { dXSARGS; if (items != 0) - Perl_croak(aTHX_ "Usage: ding()"); + Perl_croak(aTHX_ "Usage: quest::ding()"); quest_manager.ding(); @@ -1328,7 +1328,7 @@ XS(XS__rebind) { dXSARGS; if (items != 4) - Perl_croak(aTHX_ "Usage: rebind(zone_id, x, y, z)"); + Perl_croak(aTHX_ "Usage: quest::rebind(int zone_id, float x, float y, float z)"); int zone_id = (int)SvIV(ST(0)); auto location = glm::vec3((float)SvNV(ST(1)),(float)SvNV(ST(2)),(float)SvNV(ST(3))); @@ -1343,7 +1343,7 @@ XS(XS__start) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: start(wp)"); + Perl_croak(aTHX_ "Usage: quest::start(int waypoint)"); int wp = (int)SvIV(ST(0)); @@ -1357,7 +1357,7 @@ XS(XS__stop) { dXSARGS; if (items != 0) - Perl_croak(aTHX_ "Usage: stop()"); + Perl_croak(aTHX_ "Usage: quest::stop()"); quest_manager.stop(); @@ -1370,7 +1370,7 @@ XS(XS__pause) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: pause(duration)"); + Perl_croak(aTHX_ "Usage: quest::pause(int duration-ms)"); int duration = (int)SvIV(ST(0)); @@ -1384,7 +1384,7 @@ XS(XS__moveto) { dXSARGS; if (items != 3 && items != 4 && items != 5) - Perl_croak(aTHX_ "Usage: moveto(x, y, z, [heading], [saveguard?])"); + Perl_croak(aTHX_ "Usage: quest::moveto(float x, float y, float z, [float heading], [bool save_guard_location])"); float x = (float)SvNV(ST(0)); float y = (float)SvNV(ST(1)); @@ -1412,7 +1412,7 @@ XS(XS__resume) { dXSARGS; if (items != 0) - Perl_croak(aTHX_ "Usage: resume()"); + Perl_croak(aTHX_ "Usage: quest::resume()"); quest_manager.resume(); @@ -1425,7 +1425,7 @@ XS(XS__addldonpoints) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: addldonpoints(points, theme_id)"); + Perl_croak(aTHX_ "Usage: quest::addldonpoints(int points, int theme_id)"); long points = (long)SvIV(ST(0)); unsigned long theme_id = (unsigned long)SvUV(ST(1)); @@ -1440,7 +1440,7 @@ XS(XS__addldonwin) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: addldonwin(wins, theme_id)"); + Perl_croak(aTHX_ "Usage: quest::addldonwin(int wins, int theme_id)"); long wins = (long)SvIV(ST(0)); unsigned long theme_id = (unsigned long)SvUV(ST(1)); @@ -1455,7 +1455,7 @@ XS(XS__addldonloss) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: addldonloss(losses, theme_id)"); + Perl_croak(aTHX_ "Usage: quest::addldonloss(int losses, int theme_id)"); long losses = (long)SvIV(ST(0)); unsigned long theme_id = (unsigned long)SvUV(ST(1)); @@ -1470,7 +1470,7 @@ XS(XS__setnexthpevent) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: setnexthpevent(at)"); + Perl_croak(aTHX_ "Usage: quest::setnexthpevent(int at_mob_percentage)"); int at = (int)SvIV(ST(0)); @@ -1484,7 +1484,7 @@ XS(XS__setnextinchpevent) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: setnextinchpevent(at)"); + Perl_croak(aTHX_ "Usage: quest::setnextinchpevent(int at_mob_percentage)"); int at = (int)SvIV(ST(0)); @@ -1498,7 +1498,7 @@ XS(XS__sethp) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: sethp(percentage)"); + Perl_croak(aTHX_ "Usage: quest::sethp(int mob_health_percentage [0-100])"); int hpperc = (int)SvIV(ST(0)); @@ -1512,7 +1512,7 @@ XS(XS__respawn) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: respawn(npc_type_id, grid_id)"); + Perl_croak(aTHX_ "Usage: quest::respawn(int npc_type_id, int grid_id)"); int npc_type_id = (int)SvIV(ST(0)); int grid_id = (int)SvIV(ST(1)); @@ -1527,7 +1527,7 @@ XS(XS__ChooseRandom) { dXSARGS; if (items < 1) - Perl_croak(aTHX_ "Usage: ChooseRandom(... list ...)"); + Perl_croak(aTHX_ "Usage: quest::ChooseRandom(option1, option2, option3, option4, option5...[no limit])"); int index = zone->random.Int(0, items-1); @@ -1543,7 +1543,7 @@ XS(XS__set_proximity) { dXSARGS; if (items != 4 && items != 6 && items != 7) - Perl_croak(aTHX_ "Usage: set_proximity(min_x, max_x, min_y, max_y [, min_z, max_z], [say])"); + Perl_croak(aTHX_ "Usage: quest::set_proximity(float min_x, float max_x, float min_y, float max_y, [float min_z], [float max_z], [say])"); float min_x = (float)SvNV(ST(0)); float max_x = (float)SvNV(ST(1)); @@ -1569,7 +1569,7 @@ XS(XS__clear_proximity) { dXSARGS; if (items != 0) - Perl_croak(aTHX_ "Usage: clear_proximity()"); + Perl_croak(aTHX_ "Usage: quest::clear_proximity()"); quest_manager.clear_proximity(); @@ -1581,7 +1581,7 @@ XS(XS__enable_proximity_say) { dXSARGS; if (items != 0) - Perl_croak(aTHX_ "Usage: enable_proximity_say()"); + Perl_croak(aTHX_ "Usage: quest::enable_proximity_say()"); quest_manager.enable_proximity_say(); @@ -1593,7 +1593,7 @@ XS(XS__disable_proximity_say) { dXSARGS; if (items != 0) - Perl_croak(aTHX_ "Usage: disable_proximity_say()"); + Perl_croak(aTHX_ "Usage: quest::disable_proximity_say()"); quest_manager.disable_proximity_say(); @@ -1605,7 +1605,7 @@ XS(XS__setanim) //Cisyouc: mob->setappearance() addition { dXSARGS; if(items != 2) - Perl_croak(aTHX_ "Usage: quest::setanim(npc_type_id, anim_num);"); + Perl_croak(aTHX_ "Usage: quest::setanim(int npc_type_id, int appearance_number[0-4]);"); quest_manager.setanim(SvUV(ST(0)), SvUV(ST(1))); @@ -1617,7 +1617,7 @@ XS(XS__showgrid) { dXSARGS; if(items != 1) - Perl_croak(aTHX_ "Usage: quest::showgrid(grid_id);"); + Perl_croak(aTHX_ "Usage: quest::showgrid(int grid_id);"); quest_manager.showgrid(SvUV(ST(0))); @@ -1629,7 +1629,7 @@ XS(XS__spawn_condition) { dXSARGS; if (items < 3 || items > 4) - Perl_croak(aTHX_ "Usage: spawn_condition(zone_short, [instance_id], condition_id, int_value)"); + Perl_croak(aTHX_ "Usage: quest::spawn_condition(string zone_short, [int instance_id], uint16 condition_id, int16 value)"); if(items == 3) { @@ -1656,7 +1656,7 @@ XS(XS__get_spawn_condition) { dXSARGS; if (items < 2 || items > 3) - Perl_croak(aTHX_ "Usage: get_spawn_condition(zone_short, [instance_id], condition_id)"); + Perl_croak(aTHX_ "Usage: quest::get_spawn_condition(string zone_short, [int instance_id], int condition_id)"); if(items == 2) { @@ -1692,7 +1692,7 @@ XS(XS__toggle_spawn_event) { dXSARGS; if (items != 4) - Perl_croak(aTHX_ "Usage: toggle_spawn_event(event_id, is_enabled, is_strict, reset_base)"); + Perl_croak(aTHX_ "Usage: quest::toggle_spawn_event(uint32 event_id, [bool is_enabled = false], [bool is_strict = false], [bool reset_base = false])"); uint32 event_id = (int)SvIV(ST(0)); bool is_enabled = ((int)SvIV(ST(1))) == 0?false:true; @@ -1709,7 +1709,7 @@ XS(XS__has_zone_flag) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: has_zone_flag(zone_id)"); + Perl_croak(aTHX_ "Usage: quest::has_zone_flag(uint32 zone_id)"); int16 RETVAL; dXSTARG; @@ -1728,7 +1728,7 @@ XS(XS__set_zone_flag) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: set_zone_flag(zone_id)"); + Perl_croak(aTHX_ "Usage: quest::set_zone_flag(uint32 zone_id)"); uint32 zone_id = (int)SvIV(ST(0)); @@ -1742,7 +1742,7 @@ XS(XS__clear_zone_flag) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: clear_zone_flag(zone_id)"); + Perl_croak(aTHX_ "Usage: quest::clear_zone_flag(uint32 zone_id)"); uint32 zone_id = (int)SvIV(ST(0)); @@ -1756,7 +1756,7 @@ XS(XS__summonburiedplayercorpse) { dXSARGS; if (items != 5) - Perl_croak(aTHX_ "Usage: summonburiedplayercorpse(char_id,dest_x,dest_y,dest_z,dest_heading)"); + Perl_croak(aTHX_ "Usage: quest::summonburiedplayercorpse(uint32 char_id, float dest_x, float dest_y, float dest_z, float dest_heading)"); bool RETVAL; uint32 char_id = (int)SvIV(ST(0)); @@ -1774,7 +1774,7 @@ XS(XS__summonallplayercorpses) { dXSARGS; if (items != 5) - Perl_croak(aTHX_ "Usage: summonallplayercorpses(char_id,dest_x,dest_y,dest_z,dest_heading)"); + Perl_croak(aTHX_ "Usage: quest::summonallplayercorpses(int char_id, float dest_x, float dest_y, float dest_z, float dest_heading)"); bool RETVAL; uint32 char_id = (int)SvIV(ST(0)); @@ -1792,7 +1792,7 @@ XS(XS__getplayerburiedcorpsecount) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: getplayerburiedcorpsecount(char_id)"); + Perl_croak(aTHX_ "Usage: quest::getplayerburiedcorpsecount(int character_id)"); uint32 RETVAL; dXSTARG; @@ -1810,7 +1810,7 @@ XS(XS__buryplayercorpse) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: buryplayercorpse(char_id)"); + Perl_croak(aTHX_ "Usage: quest::buryplayercorpse(int character_id)"); uint32 RETVAL; dXSTARG; @@ -1828,7 +1828,7 @@ XS(XS__forcedooropen) { dXSARGS; if (items < 1 || items > 2) - Perl_croak(aTHX_ "Usage: forcedooropen(door_id, [alt_mode=0])"); + Perl_croak(aTHX_ "Usage: quest::forcedooropen(int door_id, [int alt_mode=0])"); if (items == 1) { @@ -1854,7 +1854,7 @@ XS(XS__forcedoorclose) { dXSARGS; if (items < 1 || items > 2) - Perl_croak(aTHX_ "Usage: forcedoorclose(door_id, [alt_mode=0])"); + Perl_croak(aTHX_ "Usage: quest::forcedoorclose(int door_id, [bool alt_mode = 0])"); if (items == 1) { @@ -1880,7 +1880,7 @@ XS(XS__toggledoorstate) { dXSARGS; if (items !=1) - Perl_croak(aTHX_ "Usage: toggledoorstate(door_id)"); + Perl_croak(aTHX_ "Usage: quest::toggledoorstate(int door_id)"); uint32 door_id = (int)SvIV(ST(0)); @@ -1894,7 +1894,7 @@ XS(XS__isdooropen) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: isdooropen(door_id)"); + Perl_croak(aTHX_ "Usage: quest::isdooropen(int door_id)"); bool RETVAL; dXSTARG; @@ -1912,7 +1912,7 @@ XS(XS__depopzone) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: depopzone(StartSpawnStatus)"); + Perl_croak(aTHX_ "Usage: quest::depopzone([bool start_spawn_status = false])"); bool StartSpawnStatus = ((int)SvIV(ST(0))) == 0?false:true; @@ -1926,7 +1926,7 @@ XS(XS__repopzone) { dXSARGS; if (items != 0) - Perl_croak(aTHX_ "Usage: repopzone()"); + Perl_croak(aTHX_ "Usage: quest::repopzone()"); quest_manager.repopzone(); @@ -1938,7 +1938,7 @@ XS(XS__npcrace) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: npcrace(race_id)"); + Perl_croak(aTHX_ "Usage: quest::npcrace(int race_id)"); int race_id = (int)SvIV(ST(0)); @@ -1952,7 +1952,7 @@ XS(XS__npcgender) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: npcgender(gender_id)"); + Perl_croak(aTHX_ "Usage: quest::npcgender(int gender_id)"); int gender_id= (int)SvIV(ST(0)); @@ -1966,7 +1966,7 @@ XS(XS__npcsize) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: npcsize(size)"); + Perl_croak(aTHX_ "Usage: quest::npcsize(int size)"); int size = (int)SvIV(ST(0)); @@ -1980,7 +1980,7 @@ XS(XS__npctexture) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: npctexture(texture_id)"); + Perl_croak(aTHX_ "Usage: quest::npctexture(int texture_id)"); int texture_id = (int)SvIV(ST(0)); @@ -1994,7 +1994,7 @@ XS(XS__playerrace) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: playerrace(race_id)"); + Perl_croak(aTHX_ "Usage: quest::playerrace(int race_id)"); int race_id = (int)SvIV(ST(0)); @@ -2008,7 +2008,7 @@ XS(XS__playergender) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: playergender(gender_id)"); + Perl_croak(aTHX_ "Usage: quest::playergender(int gender_id)"); int gender_id= (int)SvIV(ST(0)); @@ -2022,7 +2022,7 @@ XS(XS__playersize) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: playersize(newsize)"); + Perl_croak(aTHX_ "Usage: quest::playersize(int newsize)"); int newsize = (int)SvIV(ST(0)); @@ -2036,7 +2036,7 @@ XS(XS__playertexture) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: playertexture(texture_id)"); + Perl_croak(aTHX_ "Usage: quest::playertexture(int texture_id)"); int texture_id = (int)SvIV(ST(0)); @@ -2050,7 +2050,7 @@ XS(XS__playerfeature) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: playerfeature(str_value, int_value)"); + Perl_croak(aTHX_ "Usage: quest::playerfeature(string feature [race|gender|texture|helm|haircolor|beardcolor|eyecolor1|eyecolor2|hair|face|beard|heritage|tatoo|details|size], int setting)"); char * str_value = (char *)SvPV_nolen(ST(0)); int int_value = (int)SvIV(ST(1)); @@ -2065,7 +2065,7 @@ XS(XS__npcfeature) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: npcfeature(str_value, int_value)"); + Perl_croak(aTHX_ "Usage: quest::npcfeature(string feature [race|gender|texture|helm|haircolor|beardcolor|eyecolor1|eyecolor2|hair|face|beard|heritage|tatoo|details|size], int value)"); char * str_value = (char *)SvPV_nolen(ST(0)); int int_value = (int)SvIV(ST(1)); @@ -2125,7 +2125,7 @@ XS(XS__createBot) if(items != 6) { - Perl_croak(aTHX_ "Usage: createBot(firstname, lastname, level, race_id, class_id, gender_id)"); + Perl_croak(aTHX_ "Usage: quest::createBot(string first_name, string last_name, int level, int race_id, int class_id, int gender_id)"); } char *firstname = (char *)SvPV_nolen(ST(0)); @@ -2153,7 +2153,7 @@ XS(XS__taskselector) } quest_manager.taskselector(items, tasks); } else { - Perl_croak(aTHX_ "Usage: taskselector(task_id1, task_id2, ..., task_id%i)", MAXCHOOSERENTRIES); + Perl_croak(aTHX_ "Usage: quest::taskselector(int task_id, 2, 3, 4, 5 [up to 40])"); } XSRETURN_EMPTY; @@ -2166,7 +2166,7 @@ XS(XS__task_setselector) int task_setid = (int)SvIV(ST(0)); quest_manager.tasksetselector(task_setid); } else { - Perl_croak(aTHX_ "Usage: task_setselector(task_setid)"); + Perl_croak(aTHX_ "Usage: quest::task_setselector(int task_set_id)"); } XSRETURN_EMPTY; @@ -2182,7 +2182,7 @@ XS(XS__enabletask) } quest_manager.enabletask(items, tasks); } else { - Perl_croak(aTHX_ "Usage: enabletask(task_id1, task_id2, ..., task_id10"); + Perl_croak(aTHX_ "Usage: quest::enabletask(int task_id, 2, 3, [up to 10])"); } XSRETURN_EMPTY; @@ -2198,7 +2198,7 @@ XS(XS__disabletask) } quest_manager.disabletask(items, tasks); } else { - Perl_croak(aTHX_ "Usage: disabletask(task_id1, task_id2, ..., task_id10"); + Perl_croak(aTHX_ "Usage: quest::disabletask(int task_id, 2, 3, [up to 10])"); } XSRETURN_EMPTY; @@ -2215,7 +2215,7 @@ XS(XS__istaskenabled) unsigned int task_id = (int)SvIV(ST(0)); RETVAL = quest_manager.istaskenabled(task_id); } else { - Perl_croak(aTHX_ "Usage: istaskenabled(task_id)"); + Perl_croak(aTHX_ "Usage: quest::istaskenabled(int task_id)"); } XSprePUSH; PUSHu((IV)RETVAL); @@ -2233,7 +2233,7 @@ XS(XS__istaskactive) unsigned int task_id = (int)SvIV(ST(0)); RETVAL = quest_manager.istaskactive(task_id); } else { - Perl_croak(aTHX_ "Usage: istaskactive(task_id)"); + Perl_croak(aTHX_ "Usage: quest::istaskactive(int task_id)"); } XSprePUSH; PUSHu((IV)RETVAL); @@ -2252,7 +2252,7 @@ XS(XS__istaskactivityactive) unsigned int activity_id = (int)SvIV(ST(1)); RETVAL = quest_manager.istaskactivityactive(task_id, activity_id); } else { - Perl_croak(aTHX_ "Usage: istaskactivityactive(task_id, activity_id)"); + Perl_croak(aTHX_ "Usage: quest::istaskactivityactive(int task_id, int activity_id)"); } XSprePUSH; PUSHu((IV)RETVAL); @@ -2272,7 +2272,7 @@ XS(XS__gettaskactivitydonecount) RETVAL = quest_manager.gettaskactivitydonecount(task_id, activity_id); XSprePUSH; PUSHu((UV)RETVAL); } else { - Perl_croak(aTHX_ "Usage: gettaskactivitydonecount(task_id, activity_id)"); + Perl_croak(aTHX_ "Usage: quest::gettaskactivitydonecount(int task_id, int activity_id)"); } XSRETURN(1); @@ -2298,7 +2298,7 @@ XS(XS__updatetaskactivity) } quest_manager.updatetaskactivity(task_id, activity_id, count, ignore_quest_update); } else { - Perl_croak(aTHX_ "Usage: updatetaskactivity(task_id, activity_id, [count], [ignore_quest_update])"); + Perl_croak(aTHX_ "Usage: quest::updatetaskactivity(int task_id, int activity_id, [int count], [bool ignore_quest_update = false])"); } XSRETURN_EMPTY; @@ -2316,7 +2316,7 @@ XS(XS__resettaskactivity) quest_manager.resettaskactivity(task_id, activity_id); } else { - Perl_croak(aTHX_ "Usage: resettaskactivity(task_id, activity_id)"); + Perl_croak(aTHX_ "Usage: quest::resettaskactivity(int task_id, int activity_id)"); } XSRETURN_EMPTY; @@ -2331,7 +2331,7 @@ XS(XS__taskexploredarea) explore_id = (int)SvIV(ST(0)); quest_manager.taskexploredarea(explore_id); } else { - Perl_croak(aTHX_ "Usage: taskexplorearea(explore_id)"); + Perl_croak(aTHX_ "Usage: quest::taskexplorearea(int explore_id)"); } XSRETURN_EMPTY; @@ -2354,7 +2354,7 @@ XS(XS__assigntask) } quest_manager.assigntask(task_id, enforce_level_requirement); } else { - Perl_croak(aTHX_ "Usage: assigntask(task_id, enforce_level_requirement)"); + Perl_croak(aTHX_ "Usage: quest::assigntask(int task_id, [bool enforce_level_requirement = false])"); } XSRETURN_EMPTY; @@ -2369,7 +2369,7 @@ XS(XS__failtask) task_id = (int)SvIV(ST(0)); quest_manager.failtask(task_id); } else { - Perl_croak(aTHX_ "Usage: failtask(task_id)"); + Perl_croak(aTHX_ "Usage: quest::failtask(int task_id)"); } XSRETURN_EMPTY; @@ -2386,7 +2386,7 @@ XS(XS__tasktimeleft) unsigned int task_id = (int)SvIV(ST(0)); RETVAL = quest_manager.tasktimeleft(task_id); } else { - Perl_croak(aTHX_ "Usage: tasktimeleft(task_id)"); + Perl_croak(aTHX_ "Usage: quest::tasktimeleft(int task_id)"); } XSprePUSH; PUSHi((IV)RETVAL); @@ -2405,7 +2405,7 @@ XS(XS__istaskcompleted) unsigned int task_id = (int)SvIV(ST(0)); RETVAL = quest_manager.istaskcompleted(task_id); } else { - Perl_croak(aTHX_ "Usage: istaskcompleted(task_id)"); + Perl_croak(aTHX_ "Usage: quest::istaskcompleted(int task_id)"); } XSprePUSH; PUSHi((IV)RETVAL); @@ -2424,7 +2424,7 @@ XS(XS__enabledtaskcount) unsigned int task_set = (int)SvIV(ST(0)); RETVAL = quest_manager.enabledtaskcount(task_set); } else { - Perl_croak(aTHX_ "Usage: enabledtaskcount(task_set)"); + Perl_croak(aTHX_ "Usage: quest::enabledtaskcount(int task_set)"); } XSprePUSH; PUSHi((IV)RETVAL); @@ -2443,7 +2443,7 @@ XS(XS__firsttaskinset) unsigned int task_set = (int)SvIV(ST(0)); RETVAL = quest_manager.firsttaskinset(task_set); } else { - Perl_croak(aTHX_ "Usage: firsttaskinset(task_set)"); + Perl_croak(aTHX_ "Usage: quest::firsttaskinset(int task_set)"); } XSprePUSH; PUSHi((IV)RETVAL); @@ -2462,7 +2462,7 @@ XS(XS__lasttaskinset) unsigned int task_set = (int)SvIV(ST(0)); RETVAL = quest_manager.lasttaskinset(task_set); } else { - Perl_croak(aTHX_ "Usage: lasttaskinset(task_set)"); + Perl_croak(aTHX_ "Usage: quest::lasttaskinset(int task_set)"); } XSprePUSH; PUSHi((IV)RETVAL); @@ -2482,7 +2482,7 @@ XS(XS__nexttaskinset) unsigned int task_id = (int)SvIV(ST(1)); RETVAL = quest_manager.nexttaskinset(task_set, task_id); } else { - Perl_croak(aTHX_ "Usage: nexttaskinset(task_set, task_id)"); + Perl_croak(aTHX_ "Usage: quest::nexttaskinset(int task_set, int task_id)"); } XSprePUSH; PUSHi((IV)RETVAL); @@ -2499,7 +2499,7 @@ XS(XS__activespeaktask) if(items == 0) { RETVAL = quest_manager.activespeaktask(); } else { - Perl_croak(aTHX_ "Usage: activespeaktask()"); + Perl_croak(aTHX_ "Usage: quest::activespeaktask()"); } XSprePUSH; PUSHi((IV)RETVAL); @@ -2518,7 +2518,7 @@ XS(XS__activespeakactivity) unsigned int task_id = (int)SvIV(ST(0)); RETVAL = quest_manager.activespeakactivity(task_id); } else { - Perl_croak(aTHX_ "Usage: activespeakactivity(task_id)"); + Perl_croak(aTHX_ "Usage: quest::activespeakactivity(int task_id)"); } XSprePUSH; PUSHi((IV)RETVAL); @@ -2537,7 +2537,7 @@ XS(XS__activetasksinset) unsigned int task_set = (int)SvIV(ST(0)); RETVAL = quest_manager.activetasksinset(task_set); } else { - Perl_croak(aTHX_ "Usage: activetasksinset(task_set)"); + Perl_croak(aTHX_ "Usage: quest::activetasksinset(int task_set)"); } XSprePUSH; PUSHi((IV)RETVAL); @@ -2556,7 +2556,7 @@ XS(XS__completedtasksinset) unsigned int task_set = (int)SvIV(ST(0)); RETVAL = quest_manager.completedtasksinset(task_set); } else { - Perl_croak(aTHX_ "Usage: completedtasksinset(task_set)"); + Perl_croak(aTHX_ "Usage: quest::completedtasksinset(int task_set)"); } XSprePUSH; PUSHi((IV)RETVAL); @@ -2576,7 +2576,7 @@ XS(XS__istaskappropriate) unsigned int task = (int)SvIV(ST(0)); RETVAL = quest_manager.istaskappropriate(task); } else { - Perl_croak(aTHX_ "Usage: istaskaappropriate(task)"); + Perl_croak(aTHX_ "Usage: quest::istaskaappropriate(int task_id)"); } XSprePUSH; PUSHu((IV)RETVAL); @@ -2592,7 +2592,7 @@ XS(XS__istaskappropriate) int duration = 0; if((items < 2) || (items > 5)) - Perl_croak(aTHX_ "Usage: popup(window_title, message, popup_id, buttons, duration)"); + Perl_croak(aTHX_ "Usage: quest::popup(string window_title, string message, int popup_id, int buttons, int duration)"); if(items >= 3) popup_id = (int)SvIV(ST(2)); @@ -2613,7 +2613,7 @@ XS(XS__clearspawntimers) { dXSARGS; if (items != 0) - Perl_croak(aTHX_ "Usage: clearspawntimers()"); + Perl_croak(aTHX_ "Usage: quest::clearspawntimers()"); quest_manager.clearspawntimers(); @@ -2625,7 +2625,7 @@ XS(XS__ze) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: ze(channel_id, message)"); + Perl_croak(aTHX_ "Usage: quest::ze(int emote_color_id, string message)"); int channel_id = (int)SvIV(ST(0)); char * message = (char *)SvPV_nolen(ST(1)); @@ -2640,7 +2640,7 @@ XS(XS__we) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: we(channel_id, message)"); + Perl_croak(aTHX_ "Usage: quest::we(int emote_color_id, string message)"); int channel_id = (int)SvIV(ST(0)); char * message = (char *)SvPV_nolen(ST(1)); @@ -2655,7 +2655,7 @@ XS(XS__getlevel) { dXSARGS; if (items > 1) - Perl_croak(aTHX_ "Usage: getlevel(type)"); + Perl_croak(aTHX_ "Usage: quest::getlevel(int type)"); int RETVAL; dXSTARG; @@ -2677,7 +2677,7 @@ XS(XS__CreateGroundObject) { dXSARGS; if (items != 5 && items != 6) - Perl_croak(aTHX_ "Usage: creategroundobject(item_id, x, y, z, heading, [decay_time])"); + Perl_croak(aTHX_ "Usage: quest::creategroundobject(int item_id, float x, float y, float z, float heading, [uint32 decay_time-ms = 300000])"); int item_id = (int)SvIV(ST(0)); float x = (float)SvNV(ST(1)); @@ -2701,7 +2701,7 @@ XS(XS__CreateGroundObjectFromModel) { dXSARGS; if (items < 5 || items > 7) - Perl_croak(aTHX_ "Usage: creategroundobjectfrommodel(modelname, x, y, z, heading, [object_type], [decay_time])"); + Perl_croak(aTHX_ "Usage: quest::creategroundobjectfrommodel(string model_name, float x, float y, float z, float heading, [int object_type], [uint32 decay_time-ms = 300000])"); char * modelname = (char *)SvPV_nolen(ST(0)); float x = (float)SvNV(ST(1)); @@ -2727,7 +2727,7 @@ XS(XS__CreateDoor) { dXSARGS; if (items < 5 || items > 7) - Perl_croak(aTHX_ "Usage: createdoor(modelname, x, y, z, heading, [object_type], [size])"); + Perl_croak(aTHX_ "Usage: quest::createdoor(string model_name, float x, float y, float z, float heading, [int object_type = 58], [int size = 100])"); char * modelname = (char *)SvPV_nolen(ST(0)); float x = (float)SvNV(ST(1)); @@ -2753,7 +2753,7 @@ XS(XS__ModifyNPCStat) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: ModifyNPCStat(stat_id, str_value)"); + Perl_croak(aTHX_ "Usage: quest::ModifyNPCStat(string key, string value)"); quest_manager.ModifyNPCStat(SvPV_nolen(ST(0)), SvPV_nolen(ST(1))); @@ -2765,7 +2765,7 @@ XS(XS__collectitems) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: collectitems(item_id, remove_item)"); + Perl_croak(aTHX_ "Usage: quest::collectitems(int item_id, [bool remove_item = true])"); uint32 item_id = (int)SvIV(ST(0)); bool remove_item = ((int)SvIV(ST(1))) == 0?false:true; @@ -2781,7 +2781,7 @@ XS(XS__UpdateSpawnTimer) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: UpdateSpawnTimer(spawn2_id, updated_time_till_repop)"); + Perl_croak(aTHX_ "Usage: quest::UpdateSpawnTimer(uint32 spawn2_id, uint32 updated_time_till_repop)"); uint32 spawn2_id = (int)SvIV(ST(0)); uint32 updated_time_till_repop = (int)SvIV(ST(1)); @@ -2795,7 +2795,7 @@ XS(XS__MerchantSetItem); XS(XS__MerchantSetItem) { dXSARGS; if (items != 2 && items != 3) - Perl_croak(aTHX_ "Usage: MerchantSetItem(npc_id, item_id [, quantity])"); + Perl_croak(aTHX_ "Usage: quest::MerchantSetItem(uint32 npc_id, uint32 item_id, [uint32 quantity])"); uint32 npc_id = (int)SvUV(ST(0)); uint32 item_id = (int)SvUV(ST(1)); @@ -2812,7 +2812,7 @@ XS(XS__MerchantCountItem); XS(XS__MerchantCountItem) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: MerchantCountItem(npc_id, item_id)"); + Perl_croak(aTHX_ "Usage: quest::MerchantCountItem(uint32 npc_id, uint32 item_id)"); uint32 npc_id = (int)SvUV(ST(0)); uint32 item_id = (int)SvUV(ST(1)); @@ -2825,7 +2825,7 @@ XS(XS__varlink); XS(XS__varlink) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: varlink(item_id)"); + Perl_croak(aTHX_ "Usage: quest::varlink(uint32 item_id)"); dXSTARG; Const_char * RETVAL; @@ -2843,7 +2843,7 @@ XS(XS__CreateInstance); XS(XS__CreateInstance) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: CreateInstance(zone_name, version, duration)"); + Perl_croak(aTHX_ "Usage: quest::CreateInstance(string zone_name, uint16 version, uint32 duration)"); char * zone = (char *)SvPV_nolen(ST(0)); uint16 version = (int)SvUV(ST(1)); @@ -2857,7 +2857,7 @@ XS(XS__DestroyInstance); XS(XS__DestroyInstance) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: DestroyInstance(id)"); + Perl_croak(aTHX_ "Usage: quest::DestroyInstance(int id)"); uint16 id = (int)SvUV(ST(0)); quest_manager.DestroyInstance(id); @@ -2869,7 +2869,7 @@ XS(XS__UpdateInstanceTimer); XS(XS__UpdateInstanceTimer) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: UpdateInstanceTimer(instance_id, duration)"); + Perl_croak(aTHX_ "Usage: quest::UpdateInstanceTimer(int16 instance_id, uint32 duration)"); uint16 instance_id = (uint16)SvUV(ST(0)); uint32 duration = (uint32)SvUV(ST(1)); @@ -2882,7 +2882,7 @@ XS(XS__GetInstanceTimer); XS(XS__GetInstanceTimer) { dXSARGS; if (items != 0) - Perl_croak(aTHX_ "Usage: GetInstanceTimer()"); + Perl_croak(aTHX_ "Usage: quest::GetInstanceTimer()"); uint32 timer = quest_manager.GetInstanceTimer(); @@ -2893,7 +2893,7 @@ XS(XS__GetInstanceTimerByID); XS(XS__GetInstanceTimerByID) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: GetInstanceTimerByID(instance_id)"); + Perl_croak(aTHX_ "Usage: quest::GetInstanceTimerByID(uint16 instance_id)"); uint16 instance_id = (uint16)SvUV(ST(0)); uint32 timer = quest_manager.GetInstanceTimerByID(instance_id); @@ -2905,7 +2905,7 @@ XS(XS__GetInstanceID); XS(XS__GetInstanceID) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: GetInstanceID(zone_name, version)"); + Perl_croak(aTHX_ "Usage: quest::GetInstanceID(string zone_name, uint16 version)"); char * zone = (char *)SvPV_nolen(ST(0)); uint16 version = (int)SvUV(ST(1)); @@ -2918,7 +2918,7 @@ XS(XS__GetCharactersInInstance); XS(XS__GetCharactersInInstance) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: GetCharactersInInstance(instance_id)"); + Perl_croak(aTHX_ "Usage: quest::GetCharactersInInstance(uint16 instance_id)"); dXSTARG; Const_char * RETVAL; @@ -2958,7 +2958,7 @@ XS(XS__AssignToInstance); XS(XS__AssignToInstance) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: AssignToInstance(instance_id)"); + Perl_croak(aTHX_ "Usage: quest::AssignToInstance(uint16 instance_id)"); uint16 instance_id = (int)SvUV(ST(0)); quest_manager.AssignToInstance(instance_id); @@ -2970,7 +2970,7 @@ XS(XS__AssignGroupToInstance); XS(XS__AssignGroupToInstance) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: AssignGroupToInstance(instance_id)"); + Perl_croak(aTHX_ "Usage: quest::AssignGroupToInstance(uint16 instance_id)"); uint16 instance_id = (int)SvUV(ST(0)); quest_manager.AssignGroupToInstance(instance_id); @@ -2982,7 +2982,7 @@ XS(XS__AssignRaidToInstance); XS(XS__AssignRaidToInstance) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: AssignRaidToInstance(instance_id)"); + Perl_croak(aTHX_ "Usage: quest::AssignRaidToInstance(uint16 instance_id)"); uint16 instance_id = (int)SvUV(ST(0)); quest_manager.AssignRaidToInstance(instance_id); @@ -2994,7 +2994,7 @@ XS(XS__RemoveFromInstance); XS(XS__RemoveFromInstance) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: RemoveFromInstance(instance_id)"); + Perl_croak(aTHX_ "Usage: quest::RemoveFromInstance(uint16 instance_id)"); uint16 instance_id = (int)SvUV(ST(0)); quest_manager.RemoveFromInstance(instance_id); @@ -3006,7 +3006,7 @@ XS(XS__RemoveAllFromInstance); XS(XS__RemoveAllFromInstance) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: RemoveAllFromInstance(instance_id)"); + Perl_croak(aTHX_ "Usage: quest::RemoveAllFromInstance(uint16 instance_id)"); uint16 instance_id = (int)SvUV(ST(0)); quest_manager.RemoveAllFromInstance(instance_id); @@ -3019,7 +3019,7 @@ XS(XS__MovePCInstance) { dXSARGS; if (items != 5 && items != 6) - Perl_croak(aTHX_ "Usage: MovePCInstance(zone_id, instance_id, x, y, z [,heading])"); + Perl_croak(aTHX_ "Usage: quest::MovePCInstance(int zone_id, int instance_id, float x, float y, float z, [float heading])"); int zone_id = (int)SvIV(ST(0)); int instanceid = (int)SvIV(ST(1)); @@ -3044,7 +3044,7 @@ XS(XS__FlagInstanceByGroupLeader); XS(XS__FlagInstanceByGroupLeader) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: FlagInstanceByGroupLeader(zone, version)"); + Perl_croak(aTHX_ "Usage: quest::FlagInstanceByGroupLeader(uint32 zone, uint16 version)"); uint32 zone = (int)SvUV(ST(0)); uint16 version = (int)SvUV(ST(1)); @@ -3057,7 +3057,7 @@ XS(XS__FlagInstanceByRaidLeader); XS(XS__FlagInstanceByRaidLeader) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: FlagInstanceByRaidLeader(zone, version)"); + Perl_croak(aTHX_ "Usage: quest::FlagInstanceByRaidLeader(uint32 zone, uint16 version)"); uint32 zone = (int)SvUV(ST(0)); uint16 version = (int)SvUV(ST(1)); @@ -3070,7 +3070,7 @@ XS(XS__saylink); XS(XS__saylink) { dXSARGS; if (items < 1 || items > 3) - Perl_croak(aTHX_ "Usage: saylink(message, [silent?], [link_name])"); + Perl_croak(aTHX_ "Usage: quest::saylink(string message, [bool silent = false], [link_name = message])"); dXSTARG; Const_char * RETVAL; @@ -3095,7 +3095,7 @@ XS(XS__getguildnamebyid); XS(XS__getguildnamebyid) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: getguildnamebyid(guild_id)"); + Perl_croak(aTHX_ "Usage: quest::getguildnamebyid(uint32 guild_id)"); dXSTARG; Const_char * RETVAL; @@ -3112,7 +3112,7 @@ XS(XS__SetRunning) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: SetRunning(val)"); + Perl_croak(aTHX_ "Usage: quest::SetRunning(bool is_running)"); bool val = ((int)SvIV(ST(0))) == 0?false:true; @@ -3126,7 +3126,7 @@ XS(XS__IsRunning) { dXSARGS; if (items >= 1) - Perl_croak(aTHX_ "Usage: IsRunning()"); + Perl_croak(aTHX_ "Usage: quest::IsRunning()"); bool RETVAL; dXSTARG; @@ -3143,7 +3143,7 @@ XS(XS__IsEffectInSpell) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: IsEffectInSpell(spell_id, effect_id)"); + Perl_croak(aTHX_ "Usage: quest::IsEffectInSpell(uint32 spell_id, uint32 effect_id)"); uint32 spell_id = (uint32)SvUV(ST(0)); uint32 effect_id = (uint32)SvUV(ST(1)); @@ -3162,7 +3162,7 @@ XS(XS__IsBeneficialSpell) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: IsBeneficialSpell(spell_id)"); + Perl_croak(aTHX_ "Usage: quest::IsBeneficialSpell(uint32 spell_id)"); uint32 spell_id = (uint32)SvUV(ST(0)); bool RETVAL; @@ -3180,7 +3180,7 @@ XS(XS__GetSpellResistType) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: GetSpellResistType(spell_id)"); + Perl_croak(aTHX_ "Usage: quest::GetSpellResistType(uint32 spell_id)"); uint32 spell_id = (uint32)SvUV(ST(0)); int32 spell_val = 0; @@ -3195,7 +3195,7 @@ XS(XS__GetSpellTargetType) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: GetSpellTargetType(spell_id)"); + Perl_croak(aTHX_ "Usage: quest::GetSpellTargetType(uint32 spell_id)"); uint32 spell_id = (uint32)SvUV(ST(0)); int32 spell_val = 0; @@ -3209,7 +3209,7 @@ XS(XS__FlyMode); XS(XS__FlyMode) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: FlyMode([0/1/2])"); + Perl_croak(aTHX_ "Usage: quest::FlyMode(uint8 mode [0-3])"); uint8 flymode = (int)SvUV(ST(0)); quest_manager.FlyMode(flymode); @@ -3221,7 +3221,7 @@ XS(XS_FactionValue); XS(XS_FactionValue) { dXSARGS; if (items != 0) - Perl_croak(aTHX_ "Usage: factionvalue()"); + Perl_croak(aTHX_ "Usage: quest::factionvalue()"); uint8 fac = quest_manager.FactionValue(); XSRETURN_UV(fac); @@ -3232,7 +3232,7 @@ XS(XS__enabletitle) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: enabletitle(titleset)"); + Perl_croak(aTHX_ "Usage: quest::enabletitle(int title_set_id)"); int titleset = (int)SvIV(ST(0)); @@ -3246,7 +3246,7 @@ XS(XS__checktitle) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: checktitle(titleset)"); + Perl_croak(aTHX_ "Usage: quest::checktitle(int title_set_id)"); bool RETVAL; int titleset = (int)SvIV(ST(0)); @@ -3263,7 +3263,7 @@ XS(XS__removetitle) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: removetitle(titleset)"); + Perl_croak(aTHX_ "Usage: quest::removetitle(int title_set_id)"); int titleset = (int)SvIV(ST(0)); @@ -3277,7 +3277,7 @@ XS(XS__wearchange) { dXSARGS; if (items < 2) - Perl_croak(aTHX_ "Usage: wearchange(slot, texture_id, [hero_forge_model_id], [elite_material_id])"); + Perl_croak(aTHX_ "Usage: quest::wearchange(uint8 slot, uint16 texture_id, [uint32 hero_forge_model_id = 0], [uint32 elite_material_id = 0])"); uint8 slot = (int)SvUV(ST(0)); uint16 texture_id = (int)SvUV(ST(1)); @@ -3301,7 +3301,7 @@ XS(XS__voicetell) { dXSARGS; if (items != 4) - Perl_croak(aTHX_ "Usage: voicetell(client_name, macro_id, race_id, gender_id)"); + Perl_croak(aTHX_ "Usage: quest::voicetell(string client_name, int macro_id, int ace_id, int gender_id)"); char * client_name = (char *)SvPV_nolen(ST(0)); int macro_id = (int)SvIV(ST(1)); @@ -3318,7 +3318,7 @@ XS(XS__LearnRecipe) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: LearnRecipe(recipe_id)"); + Perl_croak(aTHX_ "Usage: quest::LearnRecipe(int recipe_id)"); uint32 recipe_id = (uint32)SvIV(ST(0)); @@ -3332,7 +3332,7 @@ XS(XS__SendMail) { dXSARGS; if (items != 4) - Perl_croak(aTHX_ "Usage: SendMail(to, from, subject, message)"); + Perl_croak(aTHX_ "Usage: quest::SendMail(stirng to, string from, string subject, string message)"); char *to = (char *)SvPV_nolen(ST(0)); char *from = (char *)SvPV_nolen(ST(1)); @@ -3349,7 +3349,7 @@ XS(XS__GetZoneID) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: GetZoneID(zone)"); + Perl_croak(aTHX_ "Usage: quest::GetZoneID(string zone)"); char *zone = (char *)SvPV_nolen(ST(0)); int32 id = quest_manager.GetZoneID(zone); @@ -3362,7 +3362,7 @@ XS(XS__GetZoneLongName) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: GetZoneLongName(zone)"); + Perl_croak(aTHX_ "Usage: quest::GetZoneLongName(string zone)"); dXSTARG; char *zone = (char *)SvPV_nolen(ST(0)); Const_char* RETVAL = quest_manager.GetZoneLongName(zone); @@ -3376,7 +3376,7 @@ XS(XS__GetTimeSeconds) { dXSARGS; if (items != 0) - Perl_croak(aTHX_ "Usage: GetTimeSeconds()"); + Perl_croak(aTHX_ "Usage: quest::GetTimeSeconds()"); uint32 seconds = 0; dXSTARG; @@ -3391,14 +3391,14 @@ XS(XS__crosszonesignalclientbycharid) dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: crosszonesignalclientbycharid(char_id, int_value)"); + Perl_croak(aTHX_ "Usage: quest::crosszonesignalclientbycharid(int character_id, int value)"); if (items == 2) { int char_id = (int)SvIV(ST(0)); uint32 int_value = (uint32)SvIV(ST(1)); quest_manager.CrossZoneSignalPlayerByCharID(char_id, int_value); } else { - Perl_croak(aTHX_ "Usage: crosszonesignalclientbycharid(char_id, int_value)"); + Perl_croak(aTHX_ "Usage: quest::crosszonesignalclientbycharid(int character_id, int value)"); } XSRETURN_EMPTY; @@ -3410,14 +3410,14 @@ XS(XS__crosszonesignalclientbyname) dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: crosszonesignalclientbycharid(name, int_value)"); + Perl_croak(aTHX_ "Usage: quest::crosszonesignalclientbycharid(string name, int value)"); if (items == 2) { char *name = (char *)SvPV_nolen(ST(0)); uint32 int_value = (uint32)SvIV(ST(1)); quest_manager.CrossZoneSignalPlayerByName(name, int_value); } else { - Perl_croak(aTHX_ "Usage: crosszonesignalclientbycharid(name, int_value)"); + Perl_croak(aTHX_ "Usage: quest::crosszonesignalclientbycharid(string name, int value)"); } XSRETURN_EMPTY; @@ -3430,15 +3430,13 @@ XS(XS__crosszonemessageplayerbyname) dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: crosszonemessageplayerbyname(channel_id, name, message)"); + Perl_croak(aTHX_ "Usage: quest::crosszonemessageplayerbyname(int channel_id, string name, string message)"); if (items == 3) { uint32 channel_id = (uint32)SvIV(ST(0)); char *name = (char *)SvPV_nolen(ST(1)); char *message = (char *)SvPV_nolen(ST(2)); quest_manager.CrossZoneMessagePlayerByName(channel_id, name, message); - } else { - Perl_croak(aTHX_ "Usage: crosszonemessageplayerbyname(channel_id, name, message)"); } XSRETURN_EMPTY; @@ -3451,7 +3449,7 @@ XS(XS__enablerecipe) bool success = false; if (items != 1) { - Perl_croak(aTHX_ "Usage: enablerecipe(recipe_id)"); + Perl_croak(aTHX_ "Usage: quest::enablerecipe(int recipe_id)"); } else { uint32 recipe_id = (uint32)SvIV(ST(0)); @@ -3471,7 +3469,7 @@ XS(XS__disablerecipe) bool success = false; if (items != 1) { - Perl_croak(aTHX_ "Usage: disablerecipe(recipe_id)"); + Perl_croak(aTHX_ "Usage: quest::disablerecipe(int recipe_id)"); } else { uint32 recipe_id = (uint32)SvIV(ST(0)); @@ -3490,7 +3488,7 @@ XS(XS__clear_npctype_cache) dXSARGS; if (items != 1) { - Perl_croak(aTHX_ "Usage: clear_npctype_cache(npc_type_id)"); + Perl_croak(aTHX_ "Usage: quest::clear_npctype_cache(int npc_type_id)"); } else { int32 npc_type_id = (int32)SvIV(ST(0)); @@ -3515,7 +3513,7 @@ XS(XS__qs_send_query) { dXSARGS; if (items != 1){ - Perl_croak(aTHX_ "Usage: qs_send_query(query)"); + Perl_croak(aTHX_ "Usage: quest::qs_send_query(string query)"); } else{ // char *Query = (char *)SvPV_nolen(ST(0)); @@ -3530,7 +3528,7 @@ XS(XS__qs_player_event) { dXSARGS; if (items != 2){ - Perl_croak(aTHX_ "Usage: qs_player_event(char_id, message)"); + Perl_croak(aTHX_ "Usage: quest::qs_player_event(int character_id, string message)"); } else{ int char_id = (int)SvIV(ST(0)); @@ -3546,7 +3544,7 @@ XS(XS__crosszonesetentityvariablebynpctypeid) dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: crosszonesetentityvariablebynpctypeid(npc_type_id, key, str_value)"); + Perl_croak(aTHX_ "Usage: quest::crosszonesetentityvariablebynpctypeid(int npc_type_id, string key, string value)"); if (items == 3) { uint32 npc_type_id = (uint32)SvIV(ST(0)); @@ -3564,7 +3562,7 @@ XS(XS__crosszonesetentityvariablebyclientname) dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: crosszonesetentityvariablebyclientname(client_name, key, str_value)"); + Perl_croak(aTHX_ "Usage: quest::crosszonesetentityvariablebyclientname(string client_name, string key, string value)"); if (items == 3) { const char *client_name = (const char *)SvPV_nolen(ST(0)); @@ -3582,7 +3580,7 @@ XS(XS__crosszonesignalnpcbynpctypeid) dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: crosszonesignalnpcbynpctypeid(npc_type_id, int_value)"); + Perl_croak(aTHX_ "Usage: quest::crosszonesignalnpcbynpctypeid(uint32 npc_type_id, uint32 value)"); if (items == 2) { uint32 npc_type_id = (uint32)SvIV(ST(0)); @@ -3598,7 +3596,7 @@ XS(XS__worldwidemarquee) { dXSARGS; if (items != 6) - Perl_croak(aTHX_ "Usage: worldwidemarquee(color_id, priority, fade_in, fade_out, duration, message)"); + Perl_croak(aTHX_ "Usage: quest::worldwidemarquee(uint32 color_id, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, string message)"); if (items == 6) { uint32 color_id = (uint32)SvIV(ST(0)); @@ -3618,7 +3616,7 @@ XS(XS__debug) { dXSARGS; if (items != 1 && items != 2){ - Perl_croak(aTHX_ "Usage: debug(message, [debug_level])"); + Perl_croak(aTHX_ "Usage: quest::debug(string message, [uint8 debug_level = 1 [1-3]])"); } else{ std::string log_message = (std::string)SvPV_nolen(ST(0)); @@ -3647,7 +3645,7 @@ XS(XS__UpdateZoneHeader); XS(XS__UpdateZoneHeader) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: UpdateZoneHeader(key, str_value)"); + Perl_croak(aTHX_ "Usage: quest::UpdateZoneHeader(string key, string value)"); std::string key = (std::string)SvPV_nolen(ST(0)); std::string str_value = (std::string)SvPV_nolen(ST(1)); From 1c5f0fba4f37ba1b69a6f8c567a4e72702c33734 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 1 Jul 2018 21:48:18 -0500 Subject: [PATCH 256/670] embparser_api.cpp formatting --- zone/embparser_api.cpp | 2364 +++++++++++++++++++--------------------- 1 file changed, 1105 insertions(+), 1259 deletions(-) diff --git a/zone/embparser_api.cpp b/zone/embparser_api.cpp index 0f160f152..04b2882d2 100644 --- a/zone/embparser_api.cpp +++ b/zone/embparser_api.cpp @@ -32,8 +32,8 @@ #include "questmgr.h" #include "zone.h" -extern Zone* zone; -extern QueryServ* QServ; +extern Zone *zone; +extern QueryServ *QServ; /* @@ -50,90 +50,85 @@ SvPV_nolen == string with no length restriction //Any creation of new Client objects gets the current quest Client XS(XS_Client_new); -XS(XS_Client_new) -{ +XS(XS_Client_new) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::Client::new()"); { - Client * RETVAL; + Client *RETVAL; RETVAL = quest_manager.GetInitiator(); ST(0) = sv_newmortal(); - if(RETVAL) - sv_setref_pv(ST(0), "Client", (void*)RETVAL); + if (RETVAL) + sv_setref_pv(ST(0), "Client", (void *) RETVAL); } XSRETURN(1); } //Any creation of new NPC objects gets the current quest NPC XS(XS_NPC_new); -XS(XS_NPC_new) -{ +XS(XS_NPC_new) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::NPC::new()"); { - NPC * RETVAL; + NPC *RETVAL; RETVAL = quest_manager.GetNPC(); ST(0) = sv_newmortal(); - if(RETVAL) - sv_setref_pv(ST(0), "NPC", (void*)RETVAL); + if (RETVAL) + sv_setref_pv(ST(0), "NPC", (void *) RETVAL); } XSRETURN(1); } //Any creation of new NPC objects gets the current quest NPC XS(XS_EntityList_new); -XS(XS_EntityList_new) -{ +XS(XS_EntityList_new) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::EntityList::new()"); { - EntityList * RETVAL; + EntityList *RETVAL; RETVAL = &entity_list; ST(0) = sv_newmortal(); - if(RETVAL) - sv_setref_pv(ST(0), "EntityList", (void*)RETVAL); + if (RETVAL) + sv_setref_pv(ST(0), "EntityList", (void *) RETVAL); } XSRETURN(1); } //Any creation of new quest items gets the current quest item XS(XS_QuestItem_new); -XS(XS_QuestItem_new) -{ +XS(XS_QuestItem_new) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::QuestItem::new()"); - EQEmu::ItemInstance* RETVAL; + EQEmu::ItemInstance *RETVAL; RETVAL = quest_manager.GetQuestItem(); ST(0) = sv_newmortal(); - if(RETVAL) - sv_setref_pv(ST(0), "QuestItem", (void*)RETVAL); + if (RETVAL) + sv_setref_pv(ST(0), "QuestItem", (void *) RETVAL); XSRETURN(1); } //Any creation of new quest items gets the current quest item XS(XS_MobList_new); -XS(XS_MobList_new) -{ +XS(XS_MobList_new) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::MobList::new()"); - ListElement* RETVAL; + ListElement *RETVAL; RETVAL = nullptr; ST(0) = sv_newmortal(); - if(RETVAL) - sv_setref_pv(ST(0), "MobList", (void*)RETVAL); + if (RETVAL) + sv_setref_pv(ST(0), "MobList", (void *) RETVAL); XSRETURN(1); } @@ -145,8 +140,8 @@ XS(XS__echo); // prototype to pass -Wmissing-prototypes XS(XS__echo) { dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: quest::echo(int emote_color_id, string message)"); + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::echo(int emote_color_id, string message)"); quest_manager.echo(SvUV(ST(0)), SvPV_nolen(ST(1))); @@ -160,7 +155,7 @@ XS(XS__say) { if (items == 1) quest_manager.say(SvPV_nolen(ST(0))); else if (items == 2) - quest_manager.say(SvPV_nolen(ST(0)), (int)SvIV(ST(1))); + quest_manager.say(SvPV_nolen(ST(0)), (int) SvIV(ST(1))); else Perl_croak(aTHX_ "Usage: quest::say(string message, int language_id])"); @@ -180,12 +175,11 @@ XS(XS__me) { } XS(XS__summonitem); // prototype to pass -Wmissing-prototypes -XS(XS__summonitem) -{ +XS(XS__summonitem) { dXSARGS; if (items == 1) quest_manager.summonitem(SvUV(ST(0))); - else if(items == 2) + else if (items == 2) quest_manager.summonitem(SvUV(ST(0)), SvUV(ST(1))); else Perl_croak(aTHX_ "Usage: quest::summonitem(int item_id, [int charges])"); @@ -193,14 +187,13 @@ XS(XS__summonitem) } XS(XS__write); -XS(XS__write) -{ +XS(XS__write) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::write(string file_name, string message)"); - char * file = (char *)SvPV_nolen(ST(0)); - char * message = (char *)SvPV_nolen(ST(1)); + char *file = (char *) SvPV_nolen(ST(0)); + char *message = (char *) SvPV_nolen(ST(1)); quest_manager.write(file, message); @@ -208,132 +201,132 @@ XS(XS__write) } XS(XS__spawn); -XS(XS__spawn) -{ +XS(XS__spawn) { dXSARGS; if (items != 6) - Perl_croak(aTHX_ "Usage: quest::spawn(int npc_type_id, int grid_id, int int_unused, float x, float y, float z)"); + Perl_croak(aTHX_ + "Usage: quest::spawn(int npc_type_id, int grid_id, int int_unused, float x, float y, float z)"); - uint16 RETVAL; + uint16 RETVAL; dXSTARG; - int npc_type_id = (int)SvIV(ST(0)); - int grid_id = (int)SvIV(ST(1)); - int int_unused = (int)SvIV(ST(2)); - auto position = glm::vec4((float)SvNV(ST(3)), (float)SvNV(ST(4)), (float)SvNV(ST(5)), 0.0f); + int npc_type_id = (int) SvIV(ST(0)); + int grid_id = (int) SvIV(ST(1)); + int int_unused = (int) SvIV(ST(2)); + auto position = glm::vec4((float) SvNV(ST(3)), (float) SvNV(ST(4)), (float) SvNV(ST(5)), 0.0f); Mob *r = quest_manager.spawn2(npc_type_id, grid_id, int_unused, position); RETVAL = (r != nullptr) ? r->GetID() : 0; - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); XSRETURN(1); } XS(XS__spawn2); -XS(XS__spawn2) -{ +XS(XS__spawn2) { dXSARGS; if (items != 7) - Perl_croak(aTHX_ "Usage: quest::spawn2(int npc_type_id, int grid_id, int int_unused, float x, float y, float z, float heading)"); + Perl_croak(aTHX_ + "Usage: quest::spawn2(int npc_type_id, int grid_id, int int_unused, float x, float y, float z, float heading)"); - uint16 RETVAL; + uint16 RETVAL; dXSTARG; - int npc_type_id = (int)SvIV(ST(0)); - int grid_id = (int)SvIV(ST(1)); - int int_unused = (int)SvIV(ST(2)); - auto position = glm::vec4((float)SvNV(ST(3)), (float)SvNV(ST(4)), (float)SvNV(ST(5)), (float)SvNV(ST(6))); + int npc_type_id = (int) SvIV(ST(0)); + int grid_id = (int) SvIV(ST(1)); + int int_unused = (int) SvIV(ST(2)); + auto position = glm::vec4((float) SvNV(ST(3)), (float) SvNV(ST(4)), (float) SvNV(ST(5)), (float) SvNV(ST(6))); Mob *r = quest_manager.spawn2(npc_type_id, grid_id, int_unused, position); RETVAL = (r != nullptr) ? r->GetID() : 0; - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); XSRETURN(1); } XS(XS__unique_spawn); -XS(XS__unique_spawn) -{ +XS(XS__unique_spawn) { dXSARGS; if (items != 6 && items != 7) - Perl_croak(aTHX_ "Usage: quest::unique_spawn(int npc_type_id, int grid_id, int int_unused, float x, float y, float z, [float heading])"); + Perl_croak(aTHX_ + "Usage: quest::unique_spawn(int npc_type_id, int grid_id, int int_unused, float x, float y, float z, [float heading])"); - uint16 RETVAL; + uint16 RETVAL; dXSTARG; - int npc_type_id = (int)SvIV(ST(0)); - int grid_id = (int)SvIV(ST(1)); - int int_unused = (int)SvIV(ST(2)); - float x = (float)SvNV(ST(3)); - float y = (float)SvNV(ST(4)); - float z = (float)SvNV(ST(5)); - float heading = 0; - if(items == 7) - heading = (float)SvNV(ST(6)); + int npc_type_id = (int) SvIV(ST(0)); + int grid_id = (int) SvIV(ST(1)); + int int_unused = (int) SvIV(ST(2)); + float x = (float) SvNV(ST(3)); + float y = (float) SvNV(ST(4)); + float z = (float) SvNV(ST(5)); + float heading = 0; + if (items == 7) + heading = (float) SvNV(ST(6)); - Mob *r = quest_manager.unique_spawn(npc_type_id, grid_id, int_unused, glm::vec4(x, y, z, heading)); + Mob *r = quest_manager.unique_spawn(npc_type_id, grid_id, int_unused, glm::vec4(x, y, z, heading)); RETVAL = (r != nullptr) ? r->GetID() : 0; - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); XSRETURN(1); } XS(XS__spawn_from_spawn2); -XS(XS__spawn_from_spawn2) -{ +XS(XS__spawn_from_spawn2) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::spawn_from_spawn2(int spawn2_id)"); - uint16 RETVAL; + uint16 RETVAL; dXSTARG; - int spawn2_id = (int)SvIV(ST(0)); + int spawn2_id = (int) SvIV(ST(0)); - Mob *r = quest_manager.spawn_from_spawn2(spawn2_id); + Mob *r = quest_manager.spawn_from_spawn2(spawn2_id); RETVAL = (r != nullptr) ? r->GetID() : 0; - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); XSRETURN(1); } XS(XS__enable_spawn2); -XS(XS__enable_spawn2) -{ +XS(XS__enable_spawn2) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::enable_spawn2(int spawn2_id)"); - int spawn2_id = (int)SvIV(ST(0)); + int spawn2_id = (int) SvIV(ST(0)); quest_manager.enable_spawn2(spawn2_id); XSRETURN_EMPTY; } XS(XS__disable_spawn2); -XS(XS__disable_spawn2) -{ +XS(XS__disable_spawn2) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::disable_spawn2(int spawn2_id)"); - int spawn2_id = (int)SvIV(ST(0)); + int spawn2_id = (int) SvIV(ST(0)); quest_manager.disable_spawn2(spawn2_id); XSRETURN_EMPTY; } XS(XS__setstat); -XS(XS__setstat) -{ +XS(XS__setstat) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::setstat(stat_id, int_value)"); - int stat_id = (int)SvIV(ST(0)); - int int_value = (int)SvIV(ST(1)); + int stat_id = (int) SvIV(ST(0)); + int int_value = (int) SvIV(ST(1)); quest_manager.setstat(stat_id, int_value); @@ -341,14 +334,13 @@ XS(XS__setstat) } XS(XS__incstat); //old setstat command aza -XS(XS__incstat) -{ +XS(XS__incstat) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::incstat(int stat_id, int value)"); - int stat_id = (int)SvIV(ST(0)); - int int_value = (int)SvIV(ST(1)); + int stat_id = (int) SvIV(ST(0)); + int int_value = (int) SvIV(ST(1)); quest_manager.incstat(stat_id, int_value); @@ -356,14 +348,13 @@ XS(XS__incstat) } XS(XS__castspell); -XS(XS__castspell) -{ +XS(XS__castspell) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::castspell(int spell_id, int target_id)"); - int spell_id = (int)SvIV(ST(0)); - int target_id = (int)SvIV(ST(1)); + int spell_id = (int) SvIV(ST(0)); + int target_id = (int) SvIV(ST(1)); quest_manager.castspell(spell_id, target_id); @@ -371,13 +362,12 @@ XS(XS__castspell) } XS(XS__selfcast); -XS(XS__selfcast) -{ +XS(XS__selfcast) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::selfcast(int spell_id)"); - int spell_id = (int)SvIV(ST(0)); + int spell_id = (int) SvIV(ST(0)); quest_manager.selfcast(spell_id); @@ -385,20 +375,19 @@ XS(XS__selfcast) } XS(XS__addloot); -XS(XS__addloot) -{ +XS(XS__addloot) { dXSARGS; - if(items < 1 || items > 3) + if (items < 1 || items > 3) Perl_croak(aTHX_ "Usage: quest::addloot(uint32 item_id, uint16 charges = 0, [bool equip_item = true])"); - uint32 item_id = (uint32)SvUV(ST(0)); - uint16 charges = 0; - bool equipitem = true; + uint32 item_id = (uint32) SvUV(ST(0)); + uint16 charges = 0; + bool equipitem = true; if (items > 1) - charges = (uint16)SvUV(ST(1)); + charges = (uint16) SvUV(ST(1)); if (items > 2) - equipitem = (bool)SvTRUE(ST(2)); + equipitem = (bool) SvTRUE(ST(2)); quest_manager.addloot(item_id, charges, equipitem); @@ -406,13 +395,12 @@ XS(XS__addloot) } XS(XS__zone); -XS(XS__zone) -{ +XS(XS__zone) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::zone(string zone_name)"); - char * zone_name = (char *)SvPV_nolen(ST(0)); + char *zone_name = (char *) SvPV_nolen(ST(0)); quest_manager.Zone(zone_name); @@ -420,14 +408,13 @@ XS(XS__zone) } XS(XS__settimer); -XS(XS__settimer) -{ +XS(XS__settimer) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::settimer(string timer_name, int seconds)"); - char * timer_name = (char *)SvPV_nolen(ST(0)); - int seconds = (int)SvIV(ST(1)); + char *timer_name = (char *) SvPV_nolen(ST(0)); + int seconds = (int) SvIV(ST(1)); quest_manager.settimer(timer_name, seconds); @@ -435,14 +422,13 @@ XS(XS__settimer) } XS(XS__settimerMS); -XS(XS__settimerMS) -{ +XS(XS__settimerMS) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::settimerMS(string timer_name, int milliseconds)"); - char * timer_name = (char *)SvPV_nolen(ST(0)); - int milliseconds = (int)SvIV(ST(1)); + char *timer_name = (char *) SvPV_nolen(ST(0)); + int milliseconds = (int) SvIV(ST(1)); quest_manager.settimerMS(timer_name, milliseconds); @@ -450,13 +436,12 @@ XS(XS__settimerMS) } XS(XS__stoptimer); -XS(XS__stoptimer) -{ +XS(XS__stoptimer) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::stoptimer(string timer_name)"); - char * timer_name = (char *)SvPV_nolen(ST(0)); + char *timer_name = (char *) SvPV_nolen(ST(0)); quest_manager.stoptimer(timer_name); @@ -464,8 +449,7 @@ XS(XS__stoptimer) } XS(XS__stopalltimers); -XS(XS__stopalltimers) -{ +XS(XS__stopalltimers) { dXSARGS; if (items != 0) Perl_croak(aTHX_ "Usage: quest::stopalltimers()"); @@ -476,13 +460,12 @@ XS(XS__stopalltimers) } XS(XS__emote); -XS(XS__emote) -{ +XS(XS__emote) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::emote(string message)"); - char * message = (char *)SvPV_nolen(ST(0)); + char *message = (char *) SvPV_nolen(ST(0)); quest_manager.emote(message); @@ -490,13 +473,12 @@ XS(XS__emote) } XS(XS__shout); -XS(XS__shout) -{ +XS(XS__shout) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::shout(string message)"); - char * message = (char *)SvPV_nolen(ST(0)); + char *message = (char *) SvPV_nolen(ST(0)); quest_manager.shout(message); @@ -504,13 +486,12 @@ XS(XS__shout) } XS(XS__shout2); -XS(XS__shout2) -{ +XS(XS__shout2) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::shout2(string message)"); - char * message = (char *)SvPV_nolen(ST(0)); + char *message = (char *) SvPV_nolen(ST(0)); quest_manager.shout2(message); @@ -518,31 +499,30 @@ XS(XS__shout2) } XS(XS__gmsay); -XS(XS__gmsay) -{ +XS(XS__gmsay) { dXSARGS; if ((items < 1) || (items > 5)) Perl_croak(aTHX_ "Usage: quest::gmsay(string message, [int color_id], [bool send_to_world = 0])"); - char * message = (char *)SvPV_nolen(ST(0)); - int color_id = 7; - bool send_to_world = 0; - uint32 to_guilddbid = 0; - uint16 to_minstatus = 80; + char *message = (char *) SvPV_nolen(ST(0)); + int color_id = 7; + bool send_to_world = 0; + uint32 to_guilddbid = 0; + uint16 to_minstatus = 80; if (items > 1) { - color_id = (int)SvIV(ST(1)); + color_id = (int) SvIV(ST(1)); } if (items > 2) { - send_to_world = ((int)SvIV(ST(2))) == 0?false:true; + send_to_world = ((int) SvIV(ST(2))) == 0 ? false : true; } if (items > 3) - to_guilddbid = (int)SvUV(ST(3)); + to_guilddbid = (int) SvUV(ST(3)); if (items > 4) - to_minstatus = (int)SvUV(ST(4)); + to_minstatus = (int) SvUV(ST(4)); quest_manager.gmsay(message, color_id, send_to_world, to_guilddbid, to_minstatus); @@ -550,18 +530,17 @@ XS(XS__gmsay) } XS(XS__depop); -XS(XS__depop) -{ +XS(XS__depop) { dXSARGS; if (items < 0 || items > 1) Perl_croak(aTHX_ "Usage: quest::depop(int npc_type_id = 0)"); - int npc_type_id; + int npc_type_id; if (items < 1) npc_type_id = 0; else - npc_type_id = (int)SvIV(ST(0)); + npc_type_id = (int) SvIV(ST(0)); quest_manager.depop(npc_type_id); @@ -570,18 +549,17 @@ XS(XS__depop) } XS(XS__depop_withtimer); -XS(XS__depop_withtimer) -{ +XS(XS__depop_withtimer) { dXSARGS; if (items < 0 || items > 1) Perl_croak(aTHX_ "Usage: quest::depop_withtimer(int npc_type_id = 0)"); - int npc_type_id; + int npc_type_id; if (items < 1) npc_type_id = 0; else - npc_type_id = (int)SvIV(ST(0)); + npc_type_id = (int) SvIV(ST(0)); quest_manager.depop_withtimer(npc_type_id); @@ -590,18 +568,17 @@ XS(XS__depop_withtimer) } XS(XS__depopall); -XS(XS__depopall) -{ +XS(XS__depopall) { dXSARGS; if (items < 0 || items > 1) Perl_croak(aTHX_ "Usage: quest::depopall(int npc_type_id = 0)"); - int npc_type_id; + int npc_type_id; if (items < 1) npc_type_id = 0; else - npc_type_id = (int)SvIV(ST(0)); + npc_type_id = (int) SvIV(ST(0)); quest_manager.depopall(npc_type_id); @@ -610,14 +587,13 @@ XS(XS__depopall) } XS(XS__settarget); -XS(XS__settarget) -{ +XS(XS__settarget) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::settarget(string target_enum ['npc_type', 'entity'], int target_id)"); - char * target_enum = (char *)SvPV_nolen(ST(0)); - int target_id = (int)SvIV(ST(1)); + char *target_enum = (char *) SvPV_nolen(ST(0)); + int target_id = (int) SvIV(ST(1)); quest_manager.settarget(target_enum, target_id); @@ -625,17 +601,16 @@ XS(XS__settarget) } XS(XS__follow); -XS(XS__follow) -{ +XS(XS__follow) { dXSARGS; if (items != 1 && items != 2) Perl_croak(aTHX_ "Usage: quest::follow(int entity_id, [int distance = 10])"); - int entity_id = (int)SvIV(ST(0)); - int distance; + int entity_id = (int) SvIV(ST(0)); + int distance; if (items == 2) - distance = (int)SvIV(ST(1)); + distance = (int) SvIV(ST(1)); else distance = 10; @@ -645,8 +620,7 @@ XS(XS__follow) } XS(XS__sfollow); -XS(XS__sfollow) -{ +XS(XS__sfollow) { dXSARGS; if (items != 0) Perl_croak(aTHX_ "Usage: quest::sfollow()"); @@ -658,13 +632,12 @@ XS(XS__sfollow) } XS(XS__changedeity); -XS(XS__changedeity) -{ +XS(XS__changedeity) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::changedeity(int deity_id)"); - int diety_id = (int)SvIV(ST(0)); + int diety_id = (int) SvIV(ST(0)); quest_manager.changedeity(diety_id); @@ -672,13 +645,12 @@ XS(XS__changedeity) } XS(XS__exp); -XS(XS__exp) -{ +XS(XS__exp) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::exp(int amount)"); - int amt = (int)SvIV(ST(0)); + int amt = (int) SvIV(ST(0)); quest_manager.exp(amt); @@ -686,13 +658,12 @@ XS(XS__exp) } XS(XS__level); -XS(XS__level) -{ +XS(XS__level) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::level(int new_level)"); - int newlevel = (int)SvIV(ST(0)); + int newlevel = (int) SvIV(ST(0)); quest_manager.level(newlevel); @@ -700,13 +671,12 @@ XS(XS__level) } XS(XS__traindisc); -XS(XS__traindisc) -{ +XS(XS__traindisc) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::traindisc(int tome_item_id)"); - int discipline_tome_item_id = (int)SvIV(ST(0)); + int discipline_tome_item_id = (int) SvIV(ST(0)); quest_manager.traindisc(discipline_tome_item_id); @@ -714,25 +684,23 @@ XS(XS__traindisc) } XS(XS__isdisctome); -XS(XS__isdisctome) -{ +XS(XS__isdisctome) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::isdisctome(int item_id)"); bool RETVAL; - int item_id = (int)SvIV(ST(0)); + int item_id = (int) SvIV(ST(0)); RETVAL = quest_manager.isdisctome(item_id); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); XSRETURN(1); } XS(XS__safemove); -XS(XS__safemove) -{ +XS(XS__safemove) { dXSARGS; if (items != 0) Perl_croak(aTHX_ "Usage: quest::safemove()"); @@ -744,13 +712,12 @@ XS(XS__safemove) } XS(XS__rain); -XS(XS__rain) -{ +XS(XS__rain) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::rain(int weather)"); - int weather = (int)SvIV(ST(0)); + int weather = (int) SvIV(ST(0)); quest_manager.rain(weather); @@ -758,13 +725,12 @@ XS(XS__rain) } XS(XS__snow); -XS(XS__snow) -{ +XS(XS__snow) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::snow(int weather)"); - int weather = (int)SvIV(ST(0)); + int weather = (int) SvIV(ST(0)); quest_manager.snow(weather); @@ -772,13 +738,12 @@ XS(XS__snow) } XS(XS__surname); -XS(XS__surname) -{ +XS(XS__surname) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::surname(string name)"); - char * name = (char *)SvPV_nolen(ST(0)); + char *name = (char *) SvPV_nolen(ST(0)); quest_manager.surname(name); @@ -786,13 +751,12 @@ XS(XS__surname) } XS(XS__permaclass); -XS(XS__permaclass) -{ +XS(XS__permaclass) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::permaclass(int class_id)"); - int class_id = (int)SvIV(ST(0)); + int class_id = (int) SvIV(ST(0)); quest_manager.permaclass(class_id); @@ -800,13 +764,12 @@ XS(XS__permaclass) } XS(XS__permarace); -XS(XS__permarace) -{ +XS(XS__permarace) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::permarace(int race_id)"); - int race_id = (int)SvIV(ST(0)); + int race_id = (int) SvIV(ST(0)); quest_manager.permarace(race_id); @@ -814,13 +777,12 @@ XS(XS__permarace) } XS(XS__permagender); -XS(XS__permagender) -{ +XS(XS__permagender) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::permagender(int gender_id)"); - int gender_id = (int)SvIV(ST(0)); + int gender_id = (int) SvIV(ST(0)); quest_manager.permagender(gender_id); @@ -828,52 +790,51 @@ XS(XS__permagender) } XS(XS__scribespells); -XS(XS__scribespells) -{ +XS(XS__scribespells) { dXSARGS; if (items < 1) Perl_croak(aTHX_ "Usage: quest::scribespells(int max_level, [int min_level = 1])"); - uint16 RETVAL; + uint16 RETVAL; dXSTARG; - uint8 max_level = (uint8)SvIV(ST(0)); - uint8 min_level = (uint8)SvIV(ST(1)); + uint8 max_level = (uint8) SvIV(ST(0)); + uint8 min_level = (uint8) SvIV(ST(1)); if (min_level) RETVAL = quest_manager.scribespells(max_level, min_level); else RETVAL = quest_manager.scribespells(max_level); - XSprePUSH; PUSHu((IV)RETVAL); + XSprePUSH; + PUSHu((IV) RETVAL); XSRETURN(1); } XS(XS__traindiscs); -XS(XS__traindiscs) -{ +XS(XS__traindiscs) { dXSARGS; if (items < 1) Perl_croak(aTHX_ "Usage: quest::traindiscs(int max_level, [int min_level = 1])"); - uint16 RETVAL; + uint16 RETVAL; dXSTARG; - uint8 max_level = (uint8)SvIV(ST(0)); - uint8 min_level = (uint8)SvIV(ST(1)); + uint8 max_level = (uint8) SvIV(ST(0)); + uint8 min_level = (uint8) SvIV(ST(1)); if (min_level) RETVAL = quest_manager.traindiscs(max_level, min_level); else RETVAL = quest_manager.traindiscs(max_level); - XSprePUSH; PUSHu((IV)RETVAL); + XSprePUSH; + PUSHu((IV) RETVAL); XSRETURN(1); } XS(XS__unscribespells); -XS(XS__unscribespells) -{ +XS(XS__unscribespells) { dXSARGS; if (items != 0) Perl_croak(aTHX_ "Usage: quest::unscribespells()"); @@ -885,8 +846,7 @@ XS(XS__unscribespells) } XS(XS__untraindiscs); -XS(XS__untraindiscs) -{ +XS(XS__untraindiscs) { dXSARGS; if (items != 0) Perl_croak(aTHX_ "Usage: quest::untraindiscs()"); @@ -898,16 +858,15 @@ XS(XS__untraindiscs) } XS(XS__givecash); -XS(XS__givecash) -{ +XS(XS__givecash) { dXSARGS; if (items != 4) Perl_croak(aTHX_ "Usage: quest::givecash(int copper, int silver, int gold, int platinum)"); - int copper = (int)SvIV(ST(0)); - int silver = (int)SvIV(ST(1)); - int gold = (int)SvIV(ST(2)); - int platinum = (int)SvIV(ST(3)); + int copper = (int) SvIV(ST(0)); + int silver = (int) SvIV(ST(1)); + int gold = (int) SvIV(ST(2)); + int platinum = (int) SvIV(ST(3)); quest_manager.givecash(copper, silver, gold, platinum); @@ -915,13 +874,12 @@ XS(XS__givecash) } XS(XS__pvp); -XS(XS__pvp) -{ +XS(XS__pvp) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::pvp(string mode [on|off])"); - char * mode = (char *)SvPV_nolen(ST(0)); + char *mode = (char *) SvPV_nolen(ST(0)); quest_manager.pvp(mode); @@ -929,39 +887,37 @@ XS(XS__pvp) } XS(XS__movepc); -XS(XS__movepc) -{ +XS(XS__movepc) { dXSARGS; if (items != 4 && items != 5) Perl_croak(aTHX_ "Usage: quest::movepc(int zone_id, float x, float y, float z [float heading])"); - int zone_id = (int)SvIV(ST(0)); - float x = (float)SvNV(ST(1)); - float y = (float)SvNV(ST(2)); - float z = (float)SvNV(ST(3)); + int zone_id = (int) SvIV(ST(0)); + float x = (float) SvNV(ST(1)); + float y = (float) SvNV(ST(2)); + float z = (float) SvNV(ST(3)); if (items == 4) - quest_manager.movepc(zone_id, x, y, z, 0.0f); + quest_manager.movepc(zone_id, x, y, z, 0.0f); else { - float heading = (float)SvNV(ST(4)); - quest_manager.movepc(zone_id, x, y, z, heading); + float heading = (float) SvNV(ST(4)); + quest_manager.movepc(zone_id, x, y, z, heading); } XSRETURN_EMPTY; } XS(XS__gmmove); -XS(XS__gmmove) -{ +XS(XS__gmmove) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: quest::gmmove(float x, float y, float z)"); - float x = (float)SvNV(ST(0)); - float y = (float)SvNV(ST(1)); - float z = (float)SvNV(ST(2)); + float x = (float) SvNV(ST(0)); + float y = (float) SvNV(ST(1)); + float z = (float) SvNV(ST(2)); quest_manager.gmmove(x, y, z); @@ -969,16 +925,15 @@ XS(XS__gmmove) } XS(XS__movegrp); -XS(XS__movegrp) -{ +XS(XS__movegrp) { dXSARGS; if (items != 4) Perl_croak(aTHX_ "Usage: quest::movegrp(int zone_id, float x, float y, float z)"); - int zone_id = (int)SvIV(ST(0)); - float x = (float)SvNV(ST(1)); - float y = (float)SvNV(ST(2)); - float z = (float)SvNV(ST(3)); + int zone_id = (int) SvIV(ST(0)); + float x = (float) SvNV(ST(1)); + float y = (float) SvNV(ST(2)); + float z = (float) SvNV(ST(3)); quest_manager.movegrp(zone_id, x, y, z); @@ -986,13 +941,12 @@ XS(XS__movegrp) } XS(XS__doanim); -XS(XS__doanim) -{ +XS(XS__doanim) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::doanim(int animation_id)"); - int anim_id = (int)SvIV(ST(0)); + int anim_id = (int) SvIV(ST(0)); quest_manager.doanim(anim_id); @@ -1000,14 +954,13 @@ XS(XS__doanim) } XS(XS__addskill); -XS(XS__addskill) -{ +XS(XS__addskill) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::addskill(int skill_id, int value)"); - int skill_id = (int)SvIV(ST(0)); - int int_value = (int)SvIV(ST(1)); + int skill_id = (int) SvIV(ST(0)); + int int_value = (int) SvIV(ST(1)); quest_manager.addskill(skill_id, int_value); @@ -1015,14 +968,13 @@ XS(XS__addskill) } XS(XS__setlanguage); -XS(XS__setlanguage) -{ +XS(XS__setlanguage) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::setlanguage(int skill_id, int value)"); - int skill_id = (int)SvIV(ST(0)); - int int_value = (int)SvIV(ST(1)); + int skill_id = (int) SvIV(ST(0)); + int int_value = (int) SvIV(ST(1)); quest_manager.setlanguage(skill_id, int_value); @@ -1030,14 +982,13 @@ XS(XS__setlanguage) } XS(XS__setskill); -XS(XS__setskill) -{ +XS(XS__setskill) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::setskill(int skill_id, int value)"); - int skill_id = (int)SvIV(ST(0)); - int int_value = (int)SvIV(ST(1)); + int skill_id = (int) SvIV(ST(0)); + int int_value = (int) SvIV(ST(1)); quest_manager.setskill(skill_id, int_value); @@ -1045,13 +996,12 @@ XS(XS__setskill) } XS(XS__setallskill); -XS(XS__setallskill) -{ +XS(XS__setallskill) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::setallskill(int value)"); - int int_value = (int)SvIV(ST(0)); + int int_value = (int) SvIV(ST(0)); quest_manager.setallskill(int_value); @@ -1059,13 +1009,12 @@ XS(XS__setallskill) } XS(XS__attack); -XS(XS__attack) -{ +XS(XS__attack) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::attack(string client_name)"); - char * client_name = (char *)SvPV_nolen(ST(0)); + char *client_name = (char *) SvPV_nolen(ST(0)); quest_manager.attack(client_name); @@ -1073,13 +1022,12 @@ XS(XS__attack) } XS(XS__attacknpc); -XS(XS__attacknpc) -{ +XS(XS__attacknpc) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::attacknpc(int npc_entity_id)"); - int npc_entity_id = (int)SvIV(ST(0)); + int npc_entity_id = (int) SvIV(ST(0)); quest_manager.attacknpc(npc_entity_id); @@ -1087,13 +1035,12 @@ XS(XS__attacknpc) } XS(XS__attacknpctype); -XS(XS__attacknpctype) -{ +XS(XS__attacknpctype) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::attacknpctype(int npc_type_id)"); - int npc_type_id = (int)SvIV(ST(0)); + int npc_type_id = (int) SvIV(ST(0)); quest_manager.attacknpctype(npc_type_id); @@ -1101,8 +1048,7 @@ XS(XS__attacknpctype) } XS(XS__save); -XS(XS__save) -{ +XS(XS__save) { dXSARGS; if (items != 0) Perl_croak(aTHX_ "Usage: quest::save()"); @@ -1114,20 +1060,19 @@ XS(XS__save) } XS(XS__faction); -XS(XS__faction) -{ +XS(XS__faction) { dXSARGS; if (items < 2 || items > 3) Perl_croak(aTHX_ "Usage: quest::faction(int faction_id, int value, [int temp = 0])"); - int faction_id = (int)SvIV(ST(0)); - int int_value = (int)SvIV(ST(1)); + int faction_id = (int) SvIV(ST(0)); + int int_value = (int) SvIV(ST(1)); int temp; - if(items == 2) + if (items == 2) temp = 0; else - temp = (int)SvIV(ST(2)); + temp = (int) SvIV(ST(2)); quest_manager.faction(faction_id, int_value, temp); @@ -1135,13 +1080,12 @@ XS(XS__faction) } XS(XS__setsky); -XS(XS__setsky) -{ +XS(XS__setsky) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::setsky(uint8 sky)"); - unsigned char new_sky = (unsigned char)SvUV(ST(0)); + unsigned char new_sky = (unsigned char) SvUV(ST(0)); quest_manager.setsky(new_sky); @@ -1149,14 +1093,13 @@ XS(XS__setsky) } XS(XS__setguild); -XS(XS__setguild) -{ +XS(XS__setguild) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::setguild(int guild_id, int guild_rank_id)"); - unsigned long new_guild_id = (unsigned long)SvUV(ST(0)); - int guild_rank_id = (int)SvIV(ST(1)); + unsigned long new_guild_id = (unsigned long) SvUV(ST(0)); + int guild_rank_id = (int) SvIV(ST(1)); quest_manager.setguild(new_guild_id, guild_rank_id); @@ -1164,14 +1107,13 @@ XS(XS__setguild) } XS(XS__createguild); -XS(XS__createguild) -{ +XS(XS__createguild) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::createguild(string guild_name, string leader_name)"); - char * guild_name = (char *)SvPV_nolen(ST(0)); - char * leader_name = (char *)SvPV_nolen(ST(1)); + char *guild_name = (char *) SvPV_nolen(ST(0)); + char *leader_name = (char *) SvPV_nolen(ST(1)); quest_manager.CreateGuild(guild_name, leader_name); @@ -1179,26 +1121,23 @@ XS(XS__createguild) } XS(XS__settime); -XS(XS__settime) -{ +XS(XS__settime) { dXSARGS; if (items < 2) Perl_croak(aTHX_ "Usage: quest::settime(int new_hour, int new_min, [bool update_world = true])"); - if (items == 2){ - int new_hour = (int)SvIV(ST(0)); - int new_min = (int)SvIV(ST(1)); + if (items == 2) { + int new_hour = (int) SvIV(ST(0)); + int new_min = (int) SvIV(ST(1)); quest_manager.settime(new_hour, new_min, true); - } - else if (items == 3){ - int new_hour = (int)SvIV(ST(0)); - int new_min = (int)SvIV(ST(1)); + } else if (items == 3) { + int new_hour = (int) SvIV(ST(0)); + int new_min = (int) SvIV(ST(1)); - int update_world = (int)SvIV(ST(2)); - if (update_world == 1){ + int update_world = (int) SvIV(ST(2)); + if (update_world == 1) { quest_manager.settime(new_hour, new_min, true); - } - else{ + } else { quest_manager.settime(new_hour, new_min, false); } } @@ -1207,13 +1146,12 @@ XS(XS__settime) } XS(XS__itemlink); -XS(XS__itemlink) -{ +XS(XS__itemlink) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::itemlink(int item_id)"); - int item_id = (int)SvIV(ST(0)); + int item_id = (int) SvIV(ST(0)); quest_manager.itemlink(item_id); @@ -1221,18 +1159,17 @@ XS(XS__itemlink) } XS(XS__signalwith); -XS(XS__signalwith) -{ +XS(XS__signalwith) { dXSARGS; if (items == 2) { - int npc_id = (int)SvIV(ST(0)); - int signal_id = (int)SvIV(ST(1)); + int npc_id = (int) SvIV(ST(0)); + int signal_id = (int) SvIV(ST(1)); quest_manager.signalwith(npc_id, signal_id); - } else if(items == 3) { - int npc_id = (int)SvIV(ST(0)); - int signal_id = (int)SvIV(ST(1)); - int wait = (int)SvIV(ST(2)); + } else if (items == 3) { + int npc_id = (int) SvIV(ST(0)); + int signal_id = (int) SvIV(ST(1)); + int wait = (int) SvIV(ST(2)); quest_manager.signalwith(npc_id, signal_id, wait); } else { Perl_croak(aTHX_ "Usage: quest::signalwith(int npc_id, int signal_id, [int wait_ms])"); @@ -1242,16 +1179,15 @@ XS(XS__signalwith) } XS(XS__signal); -XS(XS__signal) -{ +XS(XS__signal) { dXSARGS; if (items == 1) { - int npc_id = (int)SvIV(ST(0)); + int npc_id = (int) SvIV(ST(0)); quest_manager.signal(npc_id); - } else if(items == 2) { - int npc_id = (int)SvIV(ST(0)); - int wait = (int)SvIV(ST(1)); + } else if (items == 2) { + int npc_id = (int) SvIV(ST(0)); + int wait = (int) SvIV(ST(1)); quest_manager.signal(npc_id, wait); } else { Perl_croak(aTHX_ "Usage: quest::signal(int npc_id, [int wait_ms])"); @@ -1261,16 +1197,15 @@ XS(XS__signal) } XS(XS__setglobal); -XS(XS__setglobal) -{ +XS(XS__setglobal) { dXSARGS; if (items != 4) Perl_croak(aTHX_ "Usage: quest::setglobal(stirng key, string value, int options, string duration)"); - char * key = (char *)SvPV_nolen(ST(0)); - char * str_value = (char *)SvPV_nolen(ST(1)); - int options = (int)SvIV(ST(2)); - char * duration = (char *)SvPV_nolen(ST(3)); + char *key = (char *) SvPV_nolen(ST(0)); + char *str_value = (char *) SvPV_nolen(ST(1)); + int options = (int) SvIV(ST(2)); + char *duration = (char *) SvPV_nolen(ST(3)); quest_manager.setglobal(key, str_value, options, duration); @@ -1278,18 +1213,18 @@ XS(XS__setglobal) } XS(XS__targlobal); -XS(XS__targlobal) -{ +XS(XS__targlobal) { dXSARGS; if (items != 6) - Perl_croak(aTHX_ "Usage: quest::targlobal(stirng key, string value, string duration, int npc_id, int chararacter_id, int zone_id)"); + Perl_croak(aTHX_ + "Usage: quest::targlobal(stirng key, string value, string duration, int npc_id, int chararacter_id, int zone_id)"); - char * key = (char *)SvPV_nolen(ST(0)); - char * str_value = (char *)SvPV_nolen(ST(1)); - char * duration = (char *)SvPV_nolen(ST(2)); - int npc_id = (int)SvIV(ST(3)); - int char_id = (int)SvIV(ST(4)); - int zone_id = (int)SvIV(ST(5)); + char *key = (char *) SvPV_nolen(ST(0)); + char *str_value = (char *) SvPV_nolen(ST(1)); + char *duration = (char *) SvPV_nolen(ST(2)); + int npc_id = (int) SvIV(ST(3)); + int char_id = (int) SvIV(ST(4)); + int zone_id = (int) SvIV(ST(5)); quest_manager.targlobal(key, str_value, duration, npc_id, char_id, zone_id); @@ -1297,13 +1232,12 @@ XS(XS__targlobal) } XS(XS__delglobal); -XS(XS__delglobal) -{ +XS(XS__delglobal) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::delglobal(string key)"); - char * key = (char *)SvPV_nolen(ST(0)); + char *key = (char *) SvPV_nolen(ST(0)); quest_manager.delglobal(key); @@ -1311,8 +1245,7 @@ XS(XS__delglobal) } XS(XS__ding); -XS(XS__ding) -{ +XS(XS__ding) { dXSARGS; if (items != 0) Perl_croak(aTHX_ "Usage: quest::ding()"); @@ -1324,14 +1257,13 @@ XS(XS__ding) } XS(XS__rebind); -XS(XS__rebind) -{ +XS(XS__rebind) { dXSARGS; if (items != 4) Perl_croak(aTHX_ "Usage: quest::rebind(int zone_id, float x, float y, float z)"); - int zone_id = (int)SvIV(ST(0)); - auto location = glm::vec3((float)SvNV(ST(1)),(float)SvNV(ST(2)),(float)SvNV(ST(3))); + int zone_id = (int) SvIV(ST(0)); + auto location = glm::vec3((float) SvNV(ST(1)), (float) SvNV(ST(2)), (float) SvNV(ST(3))); quest_manager.rebind(zone_id, location); @@ -1339,13 +1271,12 @@ XS(XS__rebind) } XS(XS__start); -XS(XS__start) -{ +XS(XS__start) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::start(int waypoint)"); - int wp = (int)SvIV(ST(0)); + int wp = (int) SvIV(ST(0)); quest_manager.start(wp); @@ -1353,8 +1284,7 @@ XS(XS__start) } XS(XS__stop); -XS(XS__stop) -{ +XS(XS__stop) { dXSARGS; if (items != 0) Perl_croak(aTHX_ "Usage: quest::stop()"); @@ -1366,13 +1296,12 @@ XS(XS__stop) } XS(XS__pause); -XS(XS__pause) -{ +XS(XS__pause) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::pause(int duration-ms)"); - int duration = (int)SvIV(ST(0)); + int duration = (int) SvIV(ST(0)); quest_manager.pause(duration); @@ -1380,25 +1309,25 @@ XS(XS__pause) } XS(XS__moveto); -XS(XS__moveto) -{ +XS(XS__moveto) { dXSARGS; if (items != 3 && items != 4 && items != 5) - Perl_croak(aTHX_ "Usage: quest::moveto(float x, float y, float z, [float heading], [bool save_guard_location])"); + Perl_croak(aTHX_ + "Usage: quest::moveto(float x, float y, float z, [float heading], [bool save_guard_location])"); - float x = (float)SvNV(ST(0)); - float y = (float)SvNV(ST(1)); - float z = (float)SvNV(ST(2)); - float h; - bool saveguard; + float x = (float) SvNV(ST(0)); + float y = (float) SvNV(ST(1)); + float z = (float) SvNV(ST(2)); + float h; + bool saveguard; - if(items > 3) - h = (float)SvNV(ST(3)); + if (items > 3) + h = (float) SvNV(ST(3)); else h = 0; - if(items > 4) - saveguard = (bool)SvTRUE(ST(4)); + if (items > 4) + saveguard = (bool) SvTRUE(ST(4)); else saveguard = false; @@ -1408,8 +1337,7 @@ XS(XS__moveto) } XS(XS__resume); -XS(XS__resume) -{ +XS(XS__resume) { dXSARGS; if (items != 0) Perl_croak(aTHX_ "Usage: quest::resume()"); @@ -1421,14 +1349,13 @@ XS(XS__resume) } XS(XS__addldonpoints); -XS(XS__addldonpoints) -{ +XS(XS__addldonpoints) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::addldonpoints(int points, int theme_id)"); - long points = (long)SvIV(ST(0)); - unsigned long theme_id = (unsigned long)SvUV(ST(1)); + long points = (long) SvIV(ST(0)); + unsigned long theme_id = (unsigned long) SvUV(ST(1)); quest_manager.addldonpoints(points, theme_id); @@ -1436,14 +1363,13 @@ XS(XS__addldonpoints) } XS(XS__addldonwin); -XS(XS__addldonwin) -{ +XS(XS__addldonwin) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::addldonwin(int wins, int theme_id)"); - long wins = (long)SvIV(ST(0)); - unsigned long theme_id = (unsigned long)SvUV(ST(1)); + long wins = (long) SvIV(ST(0)); + unsigned long theme_id = (unsigned long) SvUV(ST(1)); quest_manager.addldonwin(wins, theme_id); @@ -1451,14 +1377,13 @@ XS(XS__addldonwin) } XS(XS__addldonloss); -XS(XS__addldonloss) -{ +XS(XS__addldonloss) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::addldonloss(int losses, int theme_id)"); - long losses = (long)SvIV(ST(0)); - unsigned long theme_id = (unsigned long)SvUV(ST(1)); + long losses = (long) SvIV(ST(0)); + unsigned long theme_id = (unsigned long) SvUV(ST(1)); quest_manager.addldonloss(losses, theme_id); @@ -1466,13 +1391,12 @@ XS(XS__addldonloss) } XS(XS__setnexthpevent); -XS(XS__setnexthpevent) -{ +XS(XS__setnexthpevent) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::setnexthpevent(int at_mob_percentage)"); - int at = (int)SvIV(ST(0)); + int at = (int) SvIV(ST(0)); quest_manager.setnexthpevent(at); @@ -1480,13 +1404,12 @@ XS(XS__setnexthpevent) } XS(XS__setnextinchpevent); -XS(XS__setnextinchpevent) -{ +XS(XS__setnextinchpevent) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::setnextinchpevent(int at_mob_percentage)"); - int at = (int)SvIV(ST(0)); + int at = (int) SvIV(ST(0)); quest_manager.setnextinchpevent(at); @@ -1494,13 +1417,12 @@ XS(XS__setnextinchpevent) } XS(XS__sethp); -XS(XS__sethp) -{ +XS(XS__sethp) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::sethp(int mob_health_percentage [0-100])"); - int hpperc = (int)SvIV(ST(0)); + int hpperc = (int) SvIV(ST(0)); quest_manager.sethp(hpperc); @@ -1508,14 +1430,13 @@ XS(XS__sethp) } XS(XS__respawn); -XS(XS__respawn) -{ +XS(XS__respawn) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::respawn(int npc_type_id, int grid_id)"); - int npc_type_id = (int)SvIV(ST(0)); - int grid_id = (int)SvIV(ST(1)); + int npc_type_id = (int) SvIV(ST(0)); + int grid_id = (int) SvIV(ST(1)); quest_manager.respawn(npc_type_id, grid_id); @@ -1523,41 +1444,40 @@ XS(XS__respawn) } XS(XS__ChooseRandom); -XS(XS__ChooseRandom) -{ +XS(XS__ChooseRandom) { dXSARGS; if (items < 1) Perl_croak(aTHX_ "Usage: quest::ChooseRandom(option1, option2, option3, option4, option5...[no limit])"); - int index = zone->random.Int(0, items-1); + int index = zone->random.Int(0, items - 1); SV *tmp = ST(0); - ST(0) = ST(index); + ST(0) = ST(index); ST(index) = tmp; - XSRETURN(1); //return 1 element from the stack (ST(0)) + XSRETURN(1); //return 1 element from the stack (ST(0)) } XS(XS__set_proximity); -XS(XS__set_proximity) -{ +XS(XS__set_proximity) { dXSARGS; if (items != 4 && items != 6 && items != 7) - Perl_croak(aTHX_ "Usage: quest::set_proximity(float min_x, float max_x, float min_y, float max_y, [float min_z], [float max_z], [say])"); + Perl_croak(aTHX_ + "Usage: quest::set_proximity(float min_x, float max_x, float min_y, float max_y, [float min_z], [float max_z], [say])"); - float min_x = (float)SvNV(ST(0)); - float max_x = (float)SvNV(ST(1)); - float min_y = (float)SvNV(ST(2)); - float max_y = (float)SvNV(ST(3)); + float min_x = (float) SvNV(ST(0)); + float max_x = (float) SvNV(ST(1)); + float min_y = (float) SvNV(ST(2)); + float max_y = (float) SvNV(ST(3)); - if(items == 4) + if (items == 4) quest_manager.set_proximity(min_x, max_x, min_y, max_y); else { - float min_z = (float)SvNV(ST(4)); - float max_z = (float)SvNV(ST(5)); - bool bSay = false; + float min_z = (float) SvNV(ST(4)); + float max_z = (float) SvNV(ST(5)); + bool bSay = false; if (items == 7) - bSay = (bool)SvTRUE(ST(6)); + bSay = (bool) SvTRUE(ST(6)); quest_manager.set_proximity(min_x, max_x, min_y, max_y, min_z, max_z, bSay); } @@ -1565,8 +1485,7 @@ XS(XS__set_proximity) } XS(XS__clear_proximity); -XS(XS__clear_proximity) -{ +XS(XS__clear_proximity) { dXSARGS; if (items != 0) Perl_croak(aTHX_ "Usage: quest::clear_proximity()"); @@ -1577,8 +1496,7 @@ XS(XS__clear_proximity) } XS(XS__enable_proximity_say); -XS(XS__enable_proximity_say) -{ +XS(XS__enable_proximity_say) { dXSARGS; if (items != 0) Perl_croak(aTHX_ "Usage: quest::enable_proximity_say()"); @@ -1589,8 +1507,7 @@ XS(XS__enable_proximity_say) } XS(XS__disable_proximity_say); -XS(XS__disable_proximity_say) -{ +XS(XS__disable_proximity_say) { dXSARGS; if (items != 0) Perl_croak(aTHX_ "Usage: quest::disable_proximity_say()"); @@ -1604,7 +1521,7 @@ XS(XS__setanim); XS(XS__setanim) //Cisyouc: mob->setappearance() addition { dXSARGS; - if(items != 2) + if (items != 2) Perl_croak(aTHX_ "Usage: quest::setanim(int npc_type_id, int appearance_number[0-4]);"); quest_manager.setanim(SvUV(ST(0)), SvUV(ST(1))); @@ -1613,10 +1530,9 @@ XS(XS__setanim) //Cisyouc: mob->setappearance() addition } XS(XS__showgrid); -XS(XS__showgrid) -{ +XS(XS__showgrid) { dXSARGS; - if(items != 1) + if (items != 1) Perl_croak(aTHX_ "Usage: quest::showgrid(int grid_id);"); quest_manager.showgrid(SvUV(ST(0))); @@ -1625,26 +1541,23 @@ XS(XS__showgrid) } XS(XS__spawn_condition); -XS(XS__spawn_condition) -{ +XS(XS__spawn_condition) { dXSARGS; if (items < 3 || items > 4) - Perl_croak(aTHX_ "Usage: quest::spawn_condition(string zone_short, [int instance_id], uint16 condition_id, int16 value)"); + Perl_croak(aTHX_ + "Usage: quest::spawn_condition(string zone_short, [int instance_id], uint16 condition_id, int16 value)"); - if(items == 3) - { - char * zone_short = (char *)SvPV_nolen(ST(0)); - uint16 condition_id = (int)SvUV(ST(1)); - int16 int_value = (int)SvIV(ST(2)); + if (items == 3) { + char *zone_short = (char *) SvPV_nolen(ST(0)); + uint16 condition_id = (int) SvUV(ST(1)); + int16 int_value = (int) SvIV(ST(2)); quest_manager.spawn_condition(zone_short, zone->GetInstanceID(), condition_id, int_value); - } - else - { - char * zone_short = (char *)SvPV_nolen(ST(0)); - uint32 instance_id = (int)SvUV(ST(1)); - uint16 condition_id = (int)SvUV(ST(2)); - int16 int_value = (int)SvIV(ST(3)); + } else { + char *zone_short = (char *) SvPV_nolen(ST(0)); + uint32 instance_id = (int) SvUV(ST(1)); + uint16 condition_id = (int) SvUV(ST(2)); + int16 int_value = (int) SvIV(ST(3)); quest_manager.spawn_condition(zone_short, instance_id, condition_id, int_value); } @@ -1652,52 +1565,50 @@ XS(XS__spawn_condition) } XS(XS__get_spawn_condition); -XS(XS__get_spawn_condition) -{ +XS(XS__get_spawn_condition) { dXSARGS; if (items < 2 || items > 3) Perl_croak(aTHX_ "Usage: quest::get_spawn_condition(string zone_short, [int instance_id], int condition_id)"); - if(items == 2) - { - int16 RETVAL; + if (items == 2) { + int16 RETVAL; dXSTARG; - char * zone_short = (char *)SvPV_nolen(ST(0)); - uint16 cond_id = (int)SvIV(ST(1)); + char *zone_short = (char *) SvPV_nolen(ST(0)); + uint16 cond_id = (int) SvIV(ST(1)); RETVAL = quest_manager.get_spawn_condition(zone_short, zone->GetInstanceID(), cond_id); - XSprePUSH; PUSHu((IV)RETVAL); + XSprePUSH; + PUSHu((IV) RETVAL); XSRETURN(1); - } - else - { - int16 RETVAL; + } else { + int16 RETVAL; dXSTARG; - char * zone_short = (char *)SvPV_nolen(ST(0)); - uint16 instance_id = (int)SvIV(ST(1)); - uint16 cond_id = (int)SvIV(ST(2)); + char *zone_short = (char *) SvPV_nolen(ST(0)); + uint16 instance_id = (int) SvIV(ST(1)); + uint16 cond_id = (int) SvIV(ST(2)); RETVAL = quest_manager.get_spawn_condition(zone_short, instance_id, cond_id); - XSprePUSH; PUSHu((IV)RETVAL); + XSprePUSH; + PUSHu((IV) RETVAL); XSRETURN(1); } } XS(XS__toggle_spawn_event); -XS(XS__toggle_spawn_event) -{ +XS(XS__toggle_spawn_event) { dXSARGS; if (items != 4) - Perl_croak(aTHX_ "Usage: quest::toggle_spawn_event(uint32 event_id, [bool is_enabled = false], [bool is_strict = false], [bool reset_base = false])"); + Perl_croak(aTHX_ + "Usage: quest::toggle_spawn_event(uint32 event_id, [bool is_enabled = false], [bool is_strict = false], [bool reset_base = false])"); - uint32 event_id = (int)SvIV(ST(0)); - bool is_enabled = ((int)SvIV(ST(1))) == 0?false:true; - bool is_strict = ((int)SvIV(ST(2))) == 0?false:true; - bool reset_base = ((int)SvIV(ST(3))) == 0?false:true; + uint32 event_id = (int) SvIV(ST(0)); + bool is_enabled = ((int) SvIV(ST(1))) == 0 ? false : true; + bool is_strict = ((int) SvIV(ST(2))) == 0 ? false : true; + bool reset_base = ((int) SvIV(ST(3))) == 0 ? false : true; quest_manager.toggle_spawn_event(event_id, is_enabled, is_strict, reset_base); @@ -1705,32 +1616,31 @@ XS(XS__toggle_spawn_event) } XS(XS__has_zone_flag); -XS(XS__has_zone_flag) -{ +XS(XS__has_zone_flag) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::has_zone_flag(uint32 zone_id)"); - int16 RETVAL; + int16 RETVAL; dXSTARG; - uint32 zone_id = (int)SvIV(ST(0)); + uint32 zone_id = (int) SvIV(ST(0)); RETVAL = quest_manager.has_zone_flag(zone_id); - XSprePUSH; PUSHu((IV)RETVAL); + XSprePUSH; + PUSHu((IV) RETVAL); XSRETURN(1); } XS(XS__set_zone_flag); -XS(XS__set_zone_flag) -{ +XS(XS__set_zone_flag) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::set_zone_flag(uint32 zone_id)"); - uint32 zone_id = (int)SvIV(ST(0)); + uint32 zone_id = (int) SvIV(ST(0)); quest_manager.set_zone_flag(zone_id); @@ -1738,13 +1648,12 @@ XS(XS__set_zone_flag) } XS(XS__clear_zone_flag); -XS(XS__clear_zone_flag) -{ +XS(XS__clear_zone_flag) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::clear_zone_flag(uint32 zone_id)"); - uint32 zone_id = (int)SvIV(ST(0)); + uint32 zone_id = (int) SvIV(ST(0)); quest_manager.clear_zone_flag(zone_id); @@ -1752,137 +1661,128 @@ XS(XS__clear_zone_flag) } XS(XS__summonburiedplayercorpse); -XS(XS__summonburiedplayercorpse) -{ +XS(XS__summonburiedplayercorpse) { dXSARGS; if (items != 5) - Perl_croak(aTHX_ "Usage: quest::summonburiedplayercorpse(uint32 char_id, float dest_x, float dest_y, float dest_z, float dest_heading)"); + Perl_croak(aTHX_ + "Usage: quest::summonburiedplayercorpse(uint32 char_id, float dest_x, float dest_y, float dest_z, float dest_heading)"); - bool RETVAL; - uint32 char_id = (int)SvIV(ST(0)); - auto position = glm::vec4((float)SvIV(ST(1)), (float)SvIV(ST(2)), (float)SvIV(ST(3)),(float)SvIV(ST(4))); + bool RETVAL; + uint32 char_id = (int) SvIV(ST(0)); + auto position = glm::vec4((float) SvIV(ST(1)), (float) SvIV(ST(2)), (float) SvIV(ST(3)), (float) SvIV(ST(4))); RETVAL = quest_manager.summonburiedplayercorpse(char_id, position); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); XSRETURN(1); } XS(XS__summonallplayercorpses); -XS(XS__summonallplayercorpses) -{ +XS(XS__summonallplayercorpses) { dXSARGS; if (items != 5) - Perl_croak(aTHX_ "Usage: quest::summonallplayercorpses(int char_id, float dest_x, float dest_y, float dest_z, float dest_heading)"); + Perl_croak(aTHX_ + "Usage: quest::summonallplayercorpses(int char_id, float dest_x, float dest_y, float dest_z, float dest_heading)"); - bool RETVAL; - uint32 char_id = (int)SvIV(ST(0)); - auto position = glm::vec4((float)SvIV(ST(1)),(float)SvIV(ST(2)),(float)SvIV(ST(3)),(float)SvIV(ST(4))); + bool RETVAL; + uint32 char_id = (int) SvIV(ST(0)); + auto position = glm::vec4((float) SvIV(ST(1)), (float) SvIV(ST(2)), (float) SvIV(ST(3)), (float) SvIV(ST(4))); RETVAL = quest_manager.summonallplayercorpses(char_id, position); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); XSRETURN(1); } XS(XS__getplayerburiedcorpsecount); -XS(XS__getplayerburiedcorpsecount) -{ +XS(XS__getplayerburiedcorpsecount) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::getplayerburiedcorpsecount(int character_id)"); - uint32 RETVAL; + uint32 RETVAL; dXSTARG; - uint32 char_id = (int)SvIV(ST(0)); + uint32 char_id = (int) SvIV(ST(0)); RETVAL = quest_manager.getplayerburiedcorpsecount(char_id); - XSprePUSH; PUSHu((IV)RETVAL); + XSprePUSH; + PUSHu((IV) RETVAL); XSRETURN(1); } XS(XS__buryplayercorpse); -XS(XS__buryplayercorpse) -{ +XS(XS__buryplayercorpse) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::buryplayercorpse(int character_id)"); - uint32 RETVAL; + uint32 RETVAL; dXSTARG; - uint32 char_id = (int)SvIV(ST(0)); + uint32 char_id = (int) SvIV(ST(0)); RETVAL = quest_manager.buryplayercorpse(char_id); - XSprePUSH; PUSHu((IV)RETVAL); + XSprePUSH; + PUSHu((IV) RETVAL); XSRETURN(1); } XS(XS__forcedooropen); -XS(XS__forcedooropen) -{ +XS(XS__forcedooropen) { dXSARGS; if (items < 1 || items > 2) Perl_croak(aTHX_ "Usage: quest::forcedooropen(int door_id, [int alt_mode=0])"); - if (items == 1) - { - uint32 door_id = (int)SvIV(ST(0)); + if (items == 1) { + uint32 door_id = (int) SvIV(ST(0)); - quest_manager.forcedooropen(door_id, false); + quest_manager.forcedooropen(door_id, false); - XSRETURN_EMPTY; - } - else - { - uint32 door_id = (int)SvIV(ST(0)); - bool alt_mode = (int)SvIV(ST(1)) == 0?false:true; + XSRETURN_EMPTY; + } else { + uint32 door_id = (int) SvIV(ST(0)); + bool alt_mode = (int) SvIV(ST(1)) == 0 ? false : true; - quest_manager.forcedooropen(door_id, alt_mode); + quest_manager.forcedooropen(door_id, alt_mode); - XSRETURN_EMPTY; + XSRETURN_EMPTY; } } XS(XS__forcedoorclose); -XS(XS__forcedoorclose) -{ +XS(XS__forcedoorclose) { dXSARGS; if (items < 1 || items > 2) Perl_croak(aTHX_ "Usage: quest::forcedoorclose(int door_id, [bool alt_mode = 0])"); - if (items == 1) - { - uint32 door_id = (int)SvIV(ST(0)); + if (items == 1) { + uint32 door_id = (int) SvIV(ST(0)); - quest_manager.forcedoorclose(door_id, false); + quest_manager.forcedoorclose(door_id, false); - XSRETURN_EMPTY; - } - else - { - uint32 door_id = (int)SvIV(ST(0)); - bool alt_mode = (int)SvIV(ST(1)) == 0?false:true; + XSRETURN_EMPTY; + } else { + uint32 door_id = (int) SvIV(ST(0)); + bool alt_mode = (int) SvIV(ST(1)) == 0 ? false : true; - quest_manager.forcedoorclose(door_id, alt_mode); + quest_manager.forcedoorclose(door_id, alt_mode); - XSRETURN_EMPTY; + XSRETURN_EMPTY; } } XS(XS__toggledoorstate); -XS(XS__toggledoorstate) -{ +XS(XS__toggledoorstate) { dXSARGS; - if (items !=1) - Perl_croak(aTHX_ "Usage: quest::toggledoorstate(int door_id)"); + if (items != 1) + Perl_croak(aTHX_ "Usage: quest::toggledoorstate(int door_id)"); - uint32 door_id = (int)SvIV(ST(0)); + uint32 door_id = (int) SvIV(ST(0)); quest_manager.toggledoorstate(door_id); @@ -1890,31 +1790,30 @@ XS(XS__toggledoorstate) } XS(XS__isdooropen); -XS(XS__isdooropen) -{ +XS(XS__isdooropen) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::isdooropen(int door_id)"); - bool RETVAL; + bool RETVAL; dXSTARG; - uint32 door_id = (int)SvIV(ST(0)); + uint32 door_id = (int) SvIV(ST(0)); RETVAL = quest_manager.isdooropen(door_id); - XSprePUSH; PUSHu((IV)RETVAL); + XSprePUSH; + PUSHu((IV) RETVAL); XSRETURN(1); } XS(XS__depopzone); -XS(XS__depopzone) -{ +XS(XS__depopzone) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::depopzone([bool start_spawn_status = false])"); - bool StartSpawnStatus = ((int)SvIV(ST(0))) == 0?false:true; + bool StartSpawnStatus = ((int) SvIV(ST(0))) == 0 ? false : true; quest_manager.depopzone(StartSpawnStatus); @@ -1922,8 +1821,7 @@ XS(XS__depopzone) } XS(XS__repopzone); -XS(XS__repopzone) -{ +XS(XS__repopzone) { dXSARGS; if (items != 0) Perl_croak(aTHX_ "Usage: quest::repopzone()"); @@ -1934,13 +1832,12 @@ XS(XS__repopzone) } XS(XS__npcrace); -XS(XS__npcrace) -{ +XS(XS__npcrace) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::npcrace(int race_id)"); - int race_id = (int)SvIV(ST(0)); + int race_id = (int) SvIV(ST(0)); quest_manager.npcrace(race_id); @@ -1948,13 +1845,12 @@ XS(XS__npcrace) } XS(XS__npcgender); -XS(XS__npcgender) -{ +XS(XS__npcgender) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::npcgender(int gender_id)"); - int gender_id= (int)SvIV(ST(0)); + int gender_id = (int) SvIV(ST(0)); quest_manager.npcgender(gender_id); @@ -1962,13 +1858,12 @@ XS(XS__npcgender) } XS(XS__npcsize); -XS(XS__npcsize) -{ +XS(XS__npcsize) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::npcsize(int size)"); - int size = (int)SvIV(ST(0)); + int size = (int) SvIV(ST(0)); quest_manager.npcsize(size); @@ -1976,13 +1871,12 @@ XS(XS__npcsize) } XS(XS__npctexture); -XS(XS__npctexture) -{ +XS(XS__npctexture) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::npctexture(int texture_id)"); - int texture_id = (int)SvIV(ST(0)); + int texture_id = (int) SvIV(ST(0)); quest_manager.npctexture(texture_id); @@ -1990,13 +1884,12 @@ XS(XS__npctexture) } XS(XS__playerrace); -XS(XS__playerrace) -{ +XS(XS__playerrace) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::playerrace(int race_id)"); - int race_id = (int)SvIV(ST(0)); + int race_id = (int) SvIV(ST(0)); quest_manager.playerrace(race_id); @@ -2004,13 +1897,12 @@ XS(XS__playerrace) } XS(XS__playergender); -XS(XS__playergender) -{ +XS(XS__playergender) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::playergender(int gender_id)"); - int gender_id= (int)SvIV(ST(0)); + int gender_id = (int) SvIV(ST(0)); quest_manager.playergender(gender_id); @@ -2018,13 +1910,12 @@ XS(XS__playergender) } XS(XS__playersize); -XS(XS__playersize) -{ +XS(XS__playersize) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::playersize(int newsize)"); - int newsize = (int)SvIV(ST(0)); + int newsize = (int) SvIV(ST(0)); quest_manager.playersize(newsize); @@ -2032,13 +1923,12 @@ XS(XS__playersize) } XS(XS__playertexture); -XS(XS__playertexture) -{ +XS(XS__playertexture) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::playertexture(int texture_id)"); - int texture_id = (int)SvIV(ST(0)); + int texture_id = (int) SvIV(ST(0)); quest_manager.playertexture(texture_id); @@ -2046,14 +1936,14 @@ XS(XS__playertexture) } XS(XS__playerfeature); -XS(XS__playerfeature) -{ +XS(XS__playerfeature) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: quest::playerfeature(string feature [race|gender|texture|helm|haircolor|beardcolor|eyecolor1|eyecolor2|hair|face|beard|heritage|tatoo|details|size], int setting)"); + Perl_croak(aTHX_ + "Usage: quest::playerfeature(string feature [race|gender|texture|helm|haircolor|beardcolor|eyecolor1|eyecolor2|hair|face|beard|heritage|tatoo|details|size], int setting)"); - char * str_value = (char *)SvPV_nolen(ST(0)); - int int_value = (int)SvIV(ST(1)); + char *str_value = (char *) SvPV_nolen(ST(0)); + int int_value = (int) SvIV(ST(1)); quest_manager.playerfeature(str_value, int_value); @@ -2061,14 +1951,14 @@ XS(XS__playerfeature) } XS(XS__npcfeature); -XS(XS__npcfeature) -{ +XS(XS__npcfeature) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: quest::npcfeature(string feature [race|gender|texture|helm|haircolor|beardcolor|eyecolor1|eyecolor2|hair|face|beard|heritage|tatoo|details|size], int value)"); + Perl_croak(aTHX_ + "Usage: quest::npcfeature(string feature [race|gender|texture|helm|haircolor|beardcolor|eyecolor1|eyecolor2|hair|face|beard|heritage|tatoo|details|size], int value)"); - char * str_value = (char *)SvPV_nolen(ST(0)); - int int_value = (int)SvIV(ST(1)); + char *str_value = (char *) SvPV_nolen(ST(0)); + int int_value = (int) SvIV(ST(1)); quest_manager.npcfeature(str_value, int_value); @@ -2143,13 +2033,12 @@ XS(XS__createBot) #endif //BOTS XS(XS__taskselector); -XS(XS__taskselector) -{ +XS(XS__taskselector) { dXSARGS; - if((items >= 1) && (items <=MAXCHOOSERENTRIES)) { - int tasks[MAXCHOOSERENTRIES]; - for(int i=0; i< items; i++) { - tasks[i] = (int)SvIV(ST(i)); + if ((items >= 1) && (items <= MAXCHOOSERENTRIES)) { + int tasks[MAXCHOOSERENTRIES]; + for (int i = 0; i < items; i++) { + tasks[i] = (int) SvIV(ST(i)); } quest_manager.taskselector(items, tasks); } else { @@ -2159,11 +2048,10 @@ XS(XS__taskselector) XSRETURN_EMPTY; } XS(XS__task_setselector); -XS(XS__task_setselector) -{ +XS(XS__task_setselector) { dXSARGS; - if(items == 1) { - int task_setid = (int)SvIV(ST(0)); + if (items == 1) { + int task_setid = (int) SvIV(ST(0)); quest_manager.tasksetselector(task_setid); } else { Perl_croak(aTHX_ "Usage: quest::task_setselector(int task_set_id)"); @@ -2172,13 +2060,12 @@ XS(XS__task_setselector) XSRETURN_EMPTY; } XS(XS__enabletask); -XS(XS__enabletask) -{ +XS(XS__enabletask) { dXSARGS; - if((items >= 1) && (items <=10)) { - int tasks[10]; - for(int i=0; i< items; i++) { - tasks[i] = (int)SvIV(ST(i)); + if ((items >= 1) && (items <= 10)) { + int tasks[10]; + for (int i = 0; i < items; i++) { + tasks[i] = (int) SvIV(ST(i)); } quest_manager.enabletask(items, tasks); } else { @@ -2188,13 +2075,12 @@ XS(XS__enabletask) XSRETURN_EMPTY; } XS(XS__disabletask); -XS(XS__disabletask) -{ +XS(XS__disabletask) { dXSARGS; - if((items >= 1) && (items <=10)) { - int tasks[10]; - for(int i=0; i< items; i++) { - tasks[i] = (int)SvIV(ST(i)); + if ((items >= 1) && (items <= 10)) { + int tasks[10]; + for (int i = 0; i < items; i++) { + tasks[i] = (int) SvIV(ST(i)); } quest_manager.disabletask(items, tasks); } else { @@ -2205,72 +2091,72 @@ XS(XS__disabletask) } XS(XS__istaskenabled); -XS(XS__istaskenabled) -{ +XS(XS__istaskenabled) { dXSARGS; - bool RETVAL; + bool RETVAL; dXSTARG; - if(items == 1) { - unsigned int task_id = (int)SvIV(ST(0)); + if (items == 1) { + unsigned int task_id = (int) SvIV(ST(0)); RETVAL = quest_manager.istaskenabled(task_id); } else { Perl_croak(aTHX_ "Usage: quest::istaskenabled(int task_id)"); } - XSprePUSH; PUSHu((IV)RETVAL); + XSprePUSH; + PUSHu((IV) RETVAL); XSRETURN(1); } XS(XS__istaskactive); -XS(XS__istaskactive) -{ +XS(XS__istaskactive) { dXSARGS; - bool RETVAL; + bool RETVAL; dXSTARG; - if(items == 1) { - unsigned int task_id = (int)SvIV(ST(0)); + if (items == 1) { + unsigned int task_id = (int) SvIV(ST(0)); RETVAL = quest_manager.istaskactive(task_id); } else { Perl_croak(aTHX_ "Usage: quest::istaskactive(int task_id)"); } - XSprePUSH; PUSHu((IV)RETVAL); + XSprePUSH; + PUSHu((IV) RETVAL); XSRETURN(1); } XS(XS__istaskactivityactive); -XS(XS__istaskactivityactive) -{ +XS(XS__istaskactivityactive) { dXSARGS; - bool RETVAL; + bool RETVAL; dXSTARG; - if(items == 2) { - unsigned int task_id = (int)SvIV(ST(0)); - unsigned int activity_id = (int)SvIV(ST(1)); + if (items == 2) { + unsigned int task_id = (int) SvIV(ST(0)); + unsigned int activity_id = (int) SvIV(ST(1)); RETVAL = quest_manager.istaskactivityactive(task_id, activity_id); } else { Perl_croak(aTHX_ "Usage: quest::istaskactivityactive(int task_id, int activity_id)"); } - XSprePUSH; PUSHu((IV)RETVAL); + XSprePUSH; + PUSHu((IV) RETVAL); XSRETURN(1); } XS(XS__gettaskactivitydonecount); -XS(XS__gettaskactivitydonecount) -{ +XS(XS__gettaskactivitydonecount) { dXSARGS; - uint32 RETVAL; + uint32 RETVAL; dXSTARG; - if(items == 2) { - unsigned int task_id = (int)SvIV(ST(0)); - unsigned int activity_id = (int)SvIV(ST(1)); + if (items == 2) { + unsigned int task_id = (int) SvIV(ST(0)); + unsigned int activity_id = (int) SvIV(ST(1)); RETVAL = quest_manager.gettaskactivitydonecount(task_id, activity_id); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; + PUSHu((UV) RETVAL); } else { Perl_croak(aTHX_ "Usage: quest::gettaskactivitydonecount(int task_id, int activity_id)"); } @@ -2278,40 +2164,38 @@ XS(XS__gettaskactivitydonecount) XSRETURN(1); } XS(XS__updatetaskactivity); -XS(XS__updatetaskactivity) -{ +XS(XS__updatetaskactivity) { dXSARGS; unsigned int task_id, activity_id; - int count = 1; - bool ignore_quest_update = false; - if(items == 2) { - task_id = (int)SvIV(ST(0)); - activity_id = (int)SvIV(ST(1)); + int count = 1; + bool ignore_quest_update = false; + if (items == 2) { + task_id = (int) SvIV(ST(0)); + activity_id = (int) SvIV(ST(1)); quest_manager.updatetaskactivity(task_id, activity_id, count, false); - } - else if (items == 3 || items == 4) { - task_id = (int)SvIV(ST(0)); - activity_id = (int)SvIV(ST(1)); - count = (int)SvIV(ST(2)); - if (items == 4){ - bool ignore_quest_update = (bool)SvTRUE(ST(3)); + } else if (items == 3 || items == 4) { + task_id = (int) SvIV(ST(0)); + activity_id = (int) SvIV(ST(1)); + count = (int) SvIV(ST(2)); + if (items == 4) { + bool ignore_quest_update = (bool) SvTRUE(ST(3)); } quest_manager.updatetaskactivity(task_id, activity_id, count, ignore_quest_update); } else { - Perl_croak(aTHX_ "Usage: quest::updatetaskactivity(int task_id, int activity_id, [int count], [bool ignore_quest_update = false])"); + Perl_croak(aTHX_ + "Usage: quest::updatetaskactivity(int task_id, int activity_id, [int count], [bool ignore_quest_update = false])"); } XSRETURN_EMPTY; } XS(XS__resettaskactivity); -XS(XS__resettaskactivity) -{ +XS(XS__resettaskactivity) { dXSARGS; unsigned int task, activity; - if(items == 2) { - int task_id = (int)SvIV(ST(0)); - int activity_id = (int)SvIV(ST(1)); + if (items == 2) { + int task_id = (int) SvIV(ST(0)); + int activity_id = (int) SvIV(ST(1)); quest_manager.resettaskactivity(task_id, activity_id); @@ -2323,12 +2207,11 @@ XS(XS__resettaskactivity) } XS(XS__taskexploredarea); -XS(XS__taskexploredarea) -{ +XS(XS__taskexploredarea) { dXSARGS; unsigned int explore_id; - if(items == 1) { - explore_id = (int)SvIV(ST(0)); + if (items == 1) { + explore_id = (int) SvIV(ST(0)); quest_manager.taskexploredarea(explore_id); } else { Perl_croak(aTHX_ "Usage: quest::taskexplorearea(int explore_id)"); @@ -2338,17 +2221,14 @@ XS(XS__taskexploredarea) } XS(XS__assigntask); -XS(XS__assigntask) -{ +XS(XS__assigntask) { dXSARGS; unsigned int task_id; - bool enforce_level_requirement = false; - if(items == 1 || items == 2) { - task_id = (int)SvIV(ST(0)); - if (items == 2) - { - if ((int)SvIV(ST(1)) == 1) - { + bool enforce_level_requirement = false; + if (items == 1 || items == 2) { + task_id = (int) SvIV(ST(0)); + if (items == 2) { + if ((int) SvIV(ST(1)) == 1) { enforce_level_requirement = true; } } @@ -2361,12 +2241,11 @@ XS(XS__assigntask) } XS(XS__failtask); -XS(XS__failtask) -{ +XS(XS__failtask) { dXSARGS; unsigned int task_id; - if(items == 1) { - task_id = (int)SvIV(ST(0)); + if (items == 1) { + task_id = (int) SvIV(ST(0)); quest_manager.failtask(task_id); } else { Perl_croak(aTHX_ "Usage: quest::failtask(int task_id)"); @@ -2376,241 +2255,241 @@ XS(XS__failtask) } XS(XS__tasktimeleft); -XS(XS__tasktimeleft) -{ +XS(XS__tasktimeleft) { dXSARGS; - int RETVAL; + int RETVAL; dXSTARG; - if(items == 1) { - unsigned int task_id = (int)SvIV(ST(0)); + if (items == 1) { + unsigned int task_id = (int) SvIV(ST(0)); RETVAL = quest_manager.tasktimeleft(task_id); } else { Perl_croak(aTHX_ "Usage: quest::tasktimeleft(int task_id)"); } - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); XSRETURN(1); } XS(XS__istaskcompleted); -XS(XS__istaskcompleted) -{ +XS(XS__istaskcompleted) { dXSARGS; - int RETVAL; + int RETVAL; dXSTARG; - if(items == 1) { - unsigned int task_id = (int)SvIV(ST(0)); + if (items == 1) { + unsigned int task_id = (int) SvIV(ST(0)); RETVAL = quest_manager.istaskcompleted(task_id); } else { Perl_croak(aTHX_ "Usage: quest::istaskcompleted(int task_id)"); } - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); XSRETURN(1); } XS(XS__enabledtaskcount); -XS(XS__enabledtaskcount) -{ +XS(XS__enabledtaskcount) { dXSARGS; - int RETVAL; + int RETVAL; dXSTARG; - if(items == 1) { - unsigned int task_set = (int)SvIV(ST(0)); + if (items == 1) { + unsigned int task_set = (int) SvIV(ST(0)); RETVAL = quest_manager.enabledtaskcount(task_set); } else { Perl_croak(aTHX_ "Usage: quest::enabledtaskcount(int task_set)"); } - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); XSRETURN(1); } XS(XS__firsttaskinset); -XS(XS__firsttaskinset) -{ +XS(XS__firsttaskinset) { dXSARGS; - int RETVAL; + int RETVAL; dXSTARG; - if(items == 1) { - unsigned int task_set = (int)SvIV(ST(0)); + if (items == 1) { + unsigned int task_set = (int) SvIV(ST(0)); RETVAL = quest_manager.firsttaskinset(task_set); } else { Perl_croak(aTHX_ "Usage: quest::firsttaskinset(int task_set)"); } - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); XSRETURN(1); } XS(XS__lasttaskinset); -XS(XS__lasttaskinset) -{ +XS(XS__lasttaskinset) { dXSARGS; - int RETVAL; + int RETVAL; dXSTARG; - if(items == 1) { - unsigned int task_set = (int)SvIV(ST(0)); + if (items == 1) { + unsigned int task_set = (int) SvIV(ST(0)); RETVAL = quest_manager.lasttaskinset(task_set); } else { Perl_croak(aTHX_ "Usage: quest::lasttaskinset(int task_set)"); } - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); XSRETURN(1); } XS(XS__nexttaskinset); -XS(XS__nexttaskinset) -{ +XS(XS__nexttaskinset) { dXSARGS; - int RETVAL; + int RETVAL; dXSTARG; - if(items == 2) { - unsigned int task_set = (int)SvIV(ST(0)); - unsigned int task_id = (int)SvIV(ST(1)); + if (items == 2) { + unsigned int task_set = (int) SvIV(ST(0)); + unsigned int task_id = (int) SvIV(ST(1)); RETVAL = quest_manager.nexttaskinset(task_set, task_id); } else { Perl_croak(aTHX_ "Usage: quest::nexttaskinset(int task_set, int task_id)"); } - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); XSRETURN(1); } XS(XS__activespeaktask); -XS(XS__activespeaktask) -{ +XS(XS__activespeaktask) { dXSARGS; - int RETVAL; + int RETVAL; dXSTARG; - if(items == 0) { + if (items == 0) { RETVAL = quest_manager.activespeaktask(); } else { Perl_croak(aTHX_ "Usage: quest::activespeaktask()"); } - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); XSRETURN(1); } XS(XS__activespeakactivity); -XS(XS__activespeakactivity) -{ +XS(XS__activespeakactivity) { dXSARGS; - int RETVAL; + int RETVAL; dXSTARG; - if(items == 1) { - unsigned int task_id = (int)SvIV(ST(0)); + if (items == 1) { + unsigned int task_id = (int) SvIV(ST(0)); RETVAL = quest_manager.activespeakactivity(task_id); } else { Perl_croak(aTHX_ "Usage: quest::activespeakactivity(int task_id)"); } - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); XSRETURN(1); } XS(XS__activetasksinset); -XS(XS__activetasksinset) -{ +XS(XS__activetasksinset) { dXSARGS; - int RETVAL; + int RETVAL; dXSTARG; - if(items == 1) { - unsigned int task_set = (int)SvIV(ST(0)); + if (items == 1) { + unsigned int task_set = (int) SvIV(ST(0)); RETVAL = quest_manager.activetasksinset(task_set); } else { Perl_croak(aTHX_ "Usage: quest::activetasksinset(int task_set)"); } - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); XSRETURN(1); } XS(XS__completedtasksinset); -XS(XS__completedtasksinset) -{ +XS(XS__completedtasksinset) { dXSARGS; - int RETVAL; + int RETVAL; dXSTARG; - if(items == 1) { - unsigned int task_set = (int)SvIV(ST(0)); + if (items == 1) { + unsigned int task_set = (int) SvIV(ST(0)); RETVAL = quest_manager.completedtasksinset(task_set); } else { Perl_croak(aTHX_ "Usage: quest::completedtasksinset(int task_set)"); } - XSprePUSH; PUSHi((IV)RETVAL); + XSprePUSH; + PUSHi((IV) RETVAL); XSRETURN(1); } XS(XS__istaskappropriate); -XS(XS__istaskappropriate) -{ +XS(XS__istaskappropriate) { dXSARGS; - bool RETVAL; + bool RETVAL; dXSTARG; - if(items == 1) { - unsigned int task = (int)SvIV(ST(0)); + if (items == 1) { + unsigned int task = (int) SvIV(ST(0)); RETVAL = quest_manager.istaskappropriate(task); } else { Perl_croak(aTHX_ "Usage: quest::istaskaappropriate(int task_id)"); } - XSprePUSH; PUSHu((IV)RETVAL); + XSprePUSH; + PUSHu((IV) RETVAL); XSRETURN(1); } - XS(XS__popup); // prototype to pass -Wmissing-prototypes - XS(XS__popup) { - dXSARGS; +XS(XS__popup); // prototype to pass -Wmissing-prototypes +XS(XS__popup) { + dXSARGS; int popup_id = 0; - int buttons = 0; + int buttons = 0; int duration = 0; - if((items < 2) || (items > 5)) - Perl_croak(aTHX_ "Usage: quest::popup(string window_title, string message, int popup_id, int buttons, int duration)"); + if ((items < 2) || (items > 5)) + Perl_croak(aTHX_ + "Usage: quest::popup(string window_title, string message, int popup_id, int buttons, int duration)"); - if(items >= 3) - popup_id = (int)SvIV(ST(2)); + if (items >= 3) + popup_id = (int) SvIV(ST(2)); - if(items >= 4) - buttons = (int)SvIV(ST(3)); + if (items >= 4) + buttons = (int) SvIV(ST(3)); - if(items == 5) - duration = (int)SvIV(ST(4)); + if (items == 5) + duration = (int) SvIV(ST(4)); - quest_manager.popup(SvPV_nolen(ST(0)), SvPV_nolen(ST(1)), popup_id, buttons, duration); + quest_manager.popup(SvPV_nolen(ST(0)), SvPV_nolen(ST(1)), popup_id, buttons, duration); - XSRETURN_EMPTY; + XSRETURN_EMPTY; } XS(XS__clearspawntimers); -XS(XS__clearspawntimers) -{ +XS(XS__clearspawntimers) { dXSARGS; if (items != 0) Perl_croak(aTHX_ "Usage: quest::clearspawntimers()"); @@ -2621,14 +2500,13 @@ XS(XS__clearspawntimers) } XS(XS__ze); -XS(XS__ze) -{ +XS(XS__ze) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::ze(int emote_color_id, string message)"); - int channel_id = (int)SvIV(ST(0)); - char * message = (char *)SvPV_nolen(ST(1)); + int channel_id = (int) SvIV(ST(0)); + char *message = (char *) SvPV_nolen(ST(1)); quest_manager.ze(channel_id, message); @@ -2636,14 +2514,13 @@ XS(XS__ze) } XS(XS__we); -XS(XS__we) -{ +XS(XS__we) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::we(int emote_color_id, string message)"); - int channel_id = (int)SvIV(ST(0)); - char * message = (char *)SvPV_nolen(ST(1)); + int channel_id = (int) SvIV(ST(0)); + char *message = (char *) SvPV_nolen(ST(1)); quest_manager.we(channel_id, message); @@ -2651,45 +2528,45 @@ XS(XS__we) } XS(XS__getlevel); -XS(XS__getlevel) -{ +XS(XS__getlevel) { dXSARGS; if (items > 1) Perl_croak(aTHX_ "Usage: quest::getlevel(int type)"); - int RETVAL; + int RETVAL; dXSTARG; - int type; + int type; if (items == 1) - type = (int)SvIV(ST(0)); + type = (int) SvIV(ST(0)); else type = 0; RETVAL = quest_manager.getlevel(type); - XSprePUSH; PUSHu((IV)RETVAL); + XSprePUSH; + PUSHu((IV) RETVAL); XSRETURN(1); } XS(XS__CreateGroundObject); -XS(XS__CreateGroundObject) -{ +XS(XS__CreateGroundObject) { dXSARGS; if (items != 5 && items != 6) - Perl_croak(aTHX_ "Usage: quest::creategroundobject(int item_id, float x, float y, float z, float heading, [uint32 decay_time-ms = 300000])"); + Perl_croak(aTHX_ + "Usage: quest::creategroundobject(int item_id, float x, float y, float z, float heading, [uint32 decay_time-ms = 300000])"); - int item_id = (int)SvIV(ST(0)); - float x = (float)SvNV(ST(1)); - float y = (float)SvNV(ST(2)); - float z = (float)SvNV(ST(3)); - float heading = (float)SvNV(ST(4)); - uint16 id = 0; + int item_id = (int) SvIV(ST(0)); + float x = (float) SvNV(ST(1)); + float y = (float) SvNV(ST(2)); + float z = (float) SvNV(ST(3)); + float heading = (float) SvNV(ST(4)); + uint16 id = 0; - if(items == 5) + if (items == 5) id = quest_manager.CreateGroundObject(item_id, glm::vec4(x, y, z, heading)); - else{ - uint32 decay_time = (uint32)SvIV(ST(5)); + else { + uint32 decay_time = (uint32) SvIV(ST(5)); id = quest_manager.CreateGroundObject(item_id, glm::vec4(x, y, z, heading), decay_time); } @@ -2697,60 +2574,59 @@ XS(XS__CreateGroundObject) } XS(XS__CreateGroundObjectFromModel); -XS(XS__CreateGroundObjectFromModel) -{ +XS(XS__CreateGroundObjectFromModel) { dXSARGS; if (items < 5 || items > 7) - Perl_croak(aTHX_ "Usage: quest::creategroundobjectfrommodel(string model_name, float x, float y, float z, float heading, [int object_type], [uint32 decay_time-ms = 300000])"); + Perl_croak(aTHX_ + "Usage: quest::creategroundobjectfrommodel(string model_name, float x, float y, float z, float heading, [int object_type], [uint32 decay_time-ms = 300000])"); - char * modelname = (char *)SvPV_nolen(ST(0)); - float x = (float)SvNV(ST(1)); - float y = (float)SvNV(ST(2)); - float z = (float)SvNV(ST(3)); - float heading = (float)SvNV(ST(4)); + char *modelname = (char *) SvPV_nolen(ST(0)); + float x = (float) SvNV(ST(1)); + float y = (float) SvNV(ST(2)); + float z = (float) SvNV(ST(3)); + float heading = (float) SvNV(ST(4)); uint32 object_type = 0; - uint32 decay_time = 0; - uint16 id = 0; + uint32 decay_time = 0; + uint16 id = 0; if (items > 5) - object_type = (uint32)SvIV(ST(5)); + object_type = (uint32) SvIV(ST(5)); if (items > 6) - decay_time = (uint32)SvIV(ST(6)); + decay_time = (uint32) SvIV(ST(6)); id = quest_manager.CreateGroundObjectFromModel(modelname, glm::vec4(x, y, z, heading), object_type, decay_time); XSRETURN_IV(id); } XS(XS__CreateDoor); -XS(XS__CreateDoor) -{ +XS(XS__CreateDoor) { dXSARGS; if (items < 5 || items > 7) - Perl_croak(aTHX_ "Usage: quest::createdoor(string model_name, float x, float y, float z, float heading, [int object_type = 58], [int size = 100])"); + Perl_croak(aTHX_ + "Usage: quest::createdoor(string model_name, float x, float y, float z, float heading, [int object_type = 58], [int size = 100])"); - char * modelname = (char *)SvPV_nolen(ST(0)); - float x = (float)SvNV(ST(1)); - float y = (float)SvNV(ST(2)); - float z = (float)SvNV(ST(3)); - float heading = (float)SvNV(ST(4)); + char *modelname = (char *) SvPV_nolen(ST(0)); + float x = (float) SvNV(ST(1)); + float y = (float) SvNV(ST(2)); + float z = (float) SvNV(ST(3)); + float heading = (float) SvNV(ST(4)); uint32 object_type = 58; - uint32 size = 100; - uint16 id = 0; + uint32 size = 100; + uint16 id = 0; if (items > 5) - object_type = (uint32)SvIV(ST(5)); + object_type = (uint32) SvIV(ST(5)); if (items > 6) - size = (uint32)SvIV(ST(6)); + size = (uint32) SvIV(ST(6)); id = quest_manager.CreateDoor(modelname, x, y, z, heading, object_type, size); XSRETURN_IV(id); } XS(XS__ModifyNPCStat); -XS(XS__ModifyNPCStat) -{ +XS(XS__ModifyNPCStat) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::ModifyNPCStat(string key, string value)"); @@ -2761,30 +2637,28 @@ XS(XS__ModifyNPCStat) } XS(XS__collectitems); -XS(XS__collectitems) -{ +XS(XS__collectitems) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::collectitems(int item_id, [bool remove_item = true])"); - uint32 item_id = (int)SvIV(ST(0)); - bool remove_item = ((int)SvIV(ST(1))) == 0?false:true; + uint32 item_id = (int) SvIV(ST(0)); + bool remove_item = ((int) SvIV(ST(1))) == 0 ? false : true; int quantity = - quest_manager.collectitems(item_id, remove_item); + quest_manager.collectitems(item_id, remove_item); XSRETURN_IV(quantity); } XS(XS__UpdateSpawnTimer); -XS(XS__UpdateSpawnTimer) -{ +XS(XS__UpdateSpawnTimer) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::UpdateSpawnTimer(uint32 spawn2_id, uint32 updated_time_till_repop)"); - uint32 spawn2_id = (int)SvIV(ST(0)); - uint32 updated_time_till_repop = (int)SvIV(ST(1)); + uint32 spawn2_id = (int) SvIV(ST(0)); + uint32 updated_time_till_repop = (int) SvIV(ST(1)); quest_manager.UpdateSpawnTimer(spawn2_id, updated_time_till_repop); @@ -2797,11 +2671,11 @@ XS(XS__MerchantSetItem) { if (items != 2 && items != 3) Perl_croak(aTHX_ "Usage: quest::MerchantSetItem(uint32 npc_id, uint32 item_id, [uint32 quantity])"); - uint32 npc_id = (int)SvUV(ST(0)); - uint32 item_id = (int)SvUV(ST(1)); + uint32 npc_id = (int) SvUV(ST(0)); + uint32 item_id = (int) SvUV(ST(1)); uint32 quantity = 0; if (items == 3) - quantity = (int)SvUV(ST(2)); + quantity = (int) SvUV(ST(2)); quest_manager.MerchantSetItem(npc_id, item_id, quantity); @@ -2814,8 +2688,8 @@ XS(XS__MerchantCountItem) { if (items != 2) Perl_croak(aTHX_ "Usage: quest::MerchantCountItem(uint32 npc_id, uint32 item_id)"); - uint32 npc_id = (int)SvUV(ST(0)); - uint32 item_id = (int)SvUV(ST(1)); + uint32 npc_id = (int) SvUV(ST(0)); + uint32 item_id = (int) SvUV(ST(1)); uint32 quantity = quest_manager.MerchantCountItem(npc_id, item_id); XSRETURN_UV(quantity); @@ -2828,14 +2702,16 @@ XS(XS__varlink) { Perl_croak(aTHX_ "Usage: quest::varlink(uint32 item_id)"); dXSTARG; - Const_char * RETVAL; - char text[250]; - uint32 item_id; - item_id = (int)SvUV(ST(0)); + Const_char *RETVAL; + char text[250]; + uint32 item_id; + item_id = (int) SvUV(ST(0)); RETVAL = quest_manager.varlink(text, item_id); - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; + sv_setpv(TARG, RETVAL); + XSprePUSH; + PUSHTARG; XSRETURN(1); } @@ -2845,10 +2721,10 @@ XS(XS__CreateInstance) { if (items != 3) Perl_croak(aTHX_ "Usage: quest::CreateInstance(string zone_name, uint16 version, uint32 duration)"); - char * zone = (char *)SvPV_nolen(ST(0)); - uint16 version = (int)SvUV(ST(1)); - uint32 duration = (int)SvUV(ST(2)); - uint32 id = quest_manager.CreateInstance(zone, version, duration); + char *zone = (char *) SvPV_nolen(ST(0)); + uint16 version = (int) SvUV(ST(1)); + uint32 duration = (int) SvUV(ST(2)); + uint32 id = quest_manager.CreateInstance(zone, version, duration); XSRETURN_UV(id); } @@ -2859,7 +2735,7 @@ XS(XS__DestroyInstance) { if (items != 1) Perl_croak(aTHX_ "Usage: quest::DestroyInstance(int id)"); - uint16 id = (int)SvUV(ST(0)); + uint16 id = (int) SvUV(ST(0)); quest_manager.DestroyInstance(id); XSRETURN_EMPTY; @@ -2871,8 +2747,8 @@ XS(XS__UpdateInstanceTimer) { if (items != 2) Perl_croak(aTHX_ "Usage: quest::UpdateInstanceTimer(int16 instance_id, uint32 duration)"); - uint16 instance_id = (uint16)SvUV(ST(0)); - uint32 duration = (uint32)SvUV(ST(1)); + uint16 instance_id = (uint16) SvUV(ST(0)); + uint32 duration = (uint32) SvUV(ST(1)); quest_manager.UpdateInstanceTimer(instance_id, duration); XSRETURN_EMPTY; @@ -2883,9 +2759,9 @@ XS(XS__GetInstanceTimer) { dXSARGS; if (items != 0) Perl_croak(aTHX_ "Usage: quest::GetInstanceTimer()"); - + uint32 timer = quest_manager.GetInstanceTimer(); - + XSRETURN_UV(timer); } @@ -2894,10 +2770,10 @@ XS(XS__GetInstanceTimerByID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::GetInstanceTimerByID(uint16 instance_id)"); - - uint16 instance_id = (uint16)SvUV(ST(0)); - uint32 timer = quest_manager.GetInstanceTimerByID(instance_id); - + + uint16 instance_id = (uint16) SvUV(ST(0)); + uint32 timer = quest_manager.GetInstanceTimerByID(instance_id); + XSRETURN_UV(timer); } @@ -2907,9 +2783,9 @@ XS(XS__GetInstanceID) { if (items != 2) Perl_croak(aTHX_ "Usage: quest::GetInstanceID(string zone_name, uint16 version)"); - char * zone = (char *)SvPV_nolen(ST(0)); - uint16 version = (int)SvUV(ST(1)); - uint16 id = quest_manager.GetInstanceID(zone, version); + char *zone = (char *) SvPV_nolen(ST(0)); + uint16 version = (int) SvUV(ST(1)); + uint16 id = quest_manager.GetInstanceID(zone, version); XSRETURN_UV(id); } @@ -2921,20 +2797,18 @@ XS(XS__GetCharactersInInstance) { Perl_croak(aTHX_ "Usage: quest::GetCharactersInInstance(uint16 instance_id)"); dXSTARG; - Const_char * RETVAL; - uint16 instance_id = (int)SvUV(ST(0)); + Const_char *RETVAL; + uint16 instance_id = (int) SvUV(ST(0)); std::list char_id_list; - std::string char_id_string; + std::string char_id_string; database.GetCharactersInInstance(instance_id, char_id_list); - if (char_id_list.size() > 0) - { + if (char_id_list.size() > 0) { char_id_string = itoa(char_id_list.size()); char_id_string += " player(s) in instance: "; auto iter = char_id_list.begin(); - while (iter != char_id_list.end()) - { + while (iter != char_id_list.end()) { char char_name[64]; database.GetCharName(*iter, char_name); char_id_string += char_name; @@ -2945,12 +2819,13 @@ XS(XS__GetCharactersInInstance) { if (iter != char_id_list.end()) char_id_string += ", "; } - RETVAL = char_id_string.c_str(); - } - else + RETVAL = char_id_string.c_str(); + } else RETVAL = "No players in that instance."; - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; + sv_setpv(TARG, RETVAL); + XSprePUSH; + PUSHTARG; XSRETURN(1); } @@ -2960,7 +2835,7 @@ XS(XS__AssignToInstance) { if (items != 1) Perl_croak(aTHX_ "Usage: quest::AssignToInstance(uint16 instance_id)"); - uint16 instance_id = (int)SvUV(ST(0)); + uint16 instance_id = (int) SvUV(ST(0)); quest_manager.AssignToInstance(instance_id); XSRETURN_EMPTY; @@ -2972,7 +2847,7 @@ XS(XS__AssignGroupToInstance) { if (items != 1) Perl_croak(aTHX_ "Usage: quest::AssignGroupToInstance(uint16 instance_id)"); - uint16 instance_id = (int)SvUV(ST(0)); + uint16 instance_id = (int) SvUV(ST(0)); quest_manager.AssignGroupToInstance(instance_id); XSRETURN_EMPTY; @@ -2984,7 +2859,7 @@ XS(XS__AssignRaidToInstance) { if (items != 1) Perl_croak(aTHX_ "Usage: quest::AssignRaidToInstance(uint16 instance_id)"); - uint16 instance_id = (int)SvUV(ST(0)); + uint16 instance_id = (int) SvUV(ST(0)); quest_manager.AssignRaidToInstance(instance_id); XSRETURN_EMPTY; @@ -2996,7 +2871,7 @@ XS(XS__RemoveFromInstance) { if (items != 1) Perl_croak(aTHX_ "Usage: quest::RemoveFromInstance(uint16 instance_id)"); - uint16 instance_id = (int)SvUV(ST(0)); + uint16 instance_id = (int) SvUV(ST(0)); quest_manager.RemoveFromInstance(instance_id); XSRETURN_EMPTY; @@ -3008,32 +2883,29 @@ XS(XS__RemoveAllFromInstance) { if (items != 1) Perl_croak(aTHX_ "Usage: quest::RemoveAllFromInstance(uint16 instance_id)"); - uint16 instance_id = (int)SvUV(ST(0)); + uint16 instance_id = (int) SvUV(ST(0)); quest_manager.RemoveAllFromInstance(instance_id); XSRETURN_EMPTY; } XS(XS__MovePCInstance); -XS(XS__MovePCInstance) -{ +XS(XS__MovePCInstance) { dXSARGS; if (items != 5 && items != 6) - Perl_croak(aTHX_ "Usage: quest::MovePCInstance(int zone_id, int instance_id, float x, float y, float z, [float heading])"); + Perl_croak(aTHX_ + "Usage: quest::MovePCInstance(int zone_id, int instance_id, float x, float y, float z, [float heading])"); - int zone_id = (int)SvIV(ST(0)); - int instanceid = (int)SvIV(ST(1)); - float x = (float)SvNV(ST(2)); - float y = (float)SvNV(ST(3)); - float z = (float)SvNV(ST(4)); + int zone_id = (int) SvIV(ST(0)); + int instanceid = (int) SvIV(ST(1)); + float x = (float) SvNV(ST(2)); + float y = (float) SvNV(ST(3)); + float z = (float) SvNV(ST(4)); - if (items == 4) - { + if (items == 4) { quest_manager.MovePCInstance(zone_id, instanceid, glm::vec4(x, y, z, 0.0f)); - } - else - { - float heading = (float)SvNV(ST(5)); + } else { + float heading = (float) SvNV(ST(5)); quest_manager.MovePCInstance(zone_id, instanceid, glm::vec4(x, y, z, heading)); } @@ -3046,8 +2918,8 @@ XS(XS__FlagInstanceByGroupLeader) { if (items != 2) Perl_croak(aTHX_ "Usage: quest::FlagInstanceByGroupLeader(uint32 zone, uint16 version)"); - uint32 zone = (int)SvUV(ST(0)); - uint16 version = (int)SvUV(ST(1)); + uint32 zone = (int) SvUV(ST(0)); + uint16 version = (int) SvUV(ST(1)); quest_manager.FlagInstanceByGroupLeader(zone, version); XSRETURN_EMPTY; @@ -3059,8 +2931,8 @@ XS(XS__FlagInstanceByRaidLeader) { if (items != 2) Perl_croak(aTHX_ "Usage: quest::FlagInstanceByRaidLeader(uint32 zone, uint16 version)"); - uint32 zone = (int)SvUV(ST(0)); - uint16 version = (int)SvUV(ST(1)); + uint32 zone = (int) SvUV(ST(0)); + uint16 version = (int) SvUV(ST(1)); quest_manager.FlagInstanceByRaidLeader(zone, version); XSRETURN_EMPTY; @@ -3073,21 +2945,23 @@ XS(XS__saylink) { Perl_croak(aTHX_ "Usage: quest::saylink(string message, [bool silent = false], [link_name = message])"); dXSTARG; - Const_char * RETVAL; - char message[250]; - char link_name[250]; - bool silent = false; - strcpy(message,(char *)SvPV_nolen(ST(0))); - if(items >= 2) { - silent = ((int)SvIV(ST(1))) == 0 ? false : true; + Const_char *RETVAL; + char message[250]; + char link_name[250]; + bool silent = false; + strcpy(message, (char *) SvPV_nolen(ST(0))); + if (items >= 2) { + silent = ((int) SvIV(ST(1))) == 0 ? false : true; } if (items == 3) - strcpy(link_name,(char *)SvPV_nolen(ST(2))); + strcpy(link_name, (char *) SvPV_nolen(ST(2))); else - strcpy(link_name,message); + strcpy(link_name, message); RETVAL = quest_manager.saylink(message, silent, link_name); - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; + sv_setpv(TARG, RETVAL); + XSprePUSH; + PUSHTARG; XSRETURN(1); } @@ -3098,23 +2972,24 @@ XS(XS__getguildnamebyid) { Perl_croak(aTHX_ "Usage: quest::getguildnamebyid(uint32 guild_id)"); dXSTARG; - Const_char * RETVAL; - uint32 guild_id = (int)SvUV(ST(0)); + Const_char *RETVAL; + uint32 guild_id = (int) SvUV(ST(0)); RETVAL = quest_manager.getguildnamebyid(guild_id); - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; + sv_setpv(TARG, RETVAL); + XSprePUSH; + PUSHTARG; XSRETURN(1); } XS(XS__SetRunning); -XS(XS__SetRunning) -{ +XS(XS__SetRunning) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::SetRunning(bool is_running)"); - bool val = ((int)SvIV(ST(0))) == 0?false:true; + bool val = ((int) SvIV(ST(0))) == 0 ? false : true; quest_manager.SetRunning(val); @@ -3122,68 +2997,67 @@ XS(XS__SetRunning) } XS(XS__IsRunning); -XS(XS__IsRunning) -{ +XS(XS__IsRunning) { dXSARGS; if (items >= 1) Perl_croak(aTHX_ "Usage: quest::IsRunning()"); - bool RETVAL; + bool RETVAL; dXSTARG; RETVAL = quest_manager.IsRunning(); - XSprePUSH; PUSHu((IV)RETVAL); + XSprePUSH; + PUSHu((IV) RETVAL); XSRETURN(1); } XS(XS__IsEffectInSpell); -XS(XS__IsEffectInSpell) -{ +XS(XS__IsEffectInSpell) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::IsEffectInSpell(uint32 spell_id, uint32 effect_id)"); - uint32 spell_id = (uint32)SvUV(ST(0)); - uint32 effect_id = (uint32)SvUV(ST(1)); - bool RETVAL; + uint32 spell_id = (uint32) SvUV(ST(0)); + uint32 effect_id = (uint32) SvUV(ST(1)); + bool RETVAL; dXSTARG; RETVAL = IsEffectInSpell(spell_id, effect_id); - XSprePUSH; PUSHu((IV)RETVAL); + XSprePUSH; + PUSHu((IV) RETVAL); XSRETURN(1); } XS(XS__IsBeneficialSpell); -XS(XS__IsBeneficialSpell) -{ +XS(XS__IsBeneficialSpell) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::IsBeneficialSpell(uint32 spell_id)"); - uint32 spell_id = (uint32)SvUV(ST(0)); - bool RETVAL; + uint32 spell_id = (uint32) SvUV(ST(0)); + bool RETVAL; dXSTARG; RETVAL = BeneficialSpell(spell_id); - XSprePUSH; PUSHu((IV)RETVAL); + XSprePUSH; + PUSHu((IV) RETVAL); XSRETURN(1); } XS(XS__GetSpellResistType); -XS(XS__GetSpellResistType) -{ +XS(XS__GetSpellResistType) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::GetSpellResistType(uint32 spell_id)"); - uint32 spell_id = (uint32)SvUV(ST(0)); - int32 spell_val = 0; + uint32 spell_id = (uint32) SvUV(ST(0)); + int32 spell_val = 0; dXSTARG; spell_val = GetSpellResistType(spell_id); @@ -3191,14 +3065,13 @@ XS(XS__GetSpellResistType) } XS(XS__GetSpellTargetType); -XS(XS__GetSpellTargetType) -{ +XS(XS__GetSpellTargetType) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::GetSpellTargetType(uint32 spell_id)"); - uint32 spell_id = (uint32)SvUV(ST(0)); - int32 spell_val = 0; + uint32 spell_id = (uint32) SvUV(ST(0)); + int32 spell_val = 0; dXSTARG; spell_val = GetSpellTargetType(spell_id); @@ -3211,7 +3084,7 @@ XS(XS__FlyMode) { if (items != 1) Perl_croak(aTHX_ "Usage: quest::FlyMode(uint8 mode [0-3])"); - uint8 flymode = (int)SvUV(ST(0)); + uint8 flymode = (int) SvUV(ST(0)); quest_manager.FlyMode(flymode); XSRETURN_EMPTY; @@ -3228,68 +3101,65 @@ XS(XS_FactionValue) { } XS(XS__enabletitle); -XS(XS__enabletitle) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: quest::enabletitle(int title_set_id)"); +XS(XS__enabletitle) { + dXSARGS; + if (items != 1) + Perl_croak(aTHX_ "Usage: quest::enabletitle(int title_set_id)"); - int titleset = (int)SvIV(ST(0)); + int titleset = (int) SvIV(ST(0)); - quest_manager.enabletitle(titleset); + quest_manager.enabletitle(titleset); - XSRETURN_EMPTY; + XSRETURN_EMPTY; } XS(XS__checktitle); -XS(XS__checktitle) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: quest::checktitle(int title_set_id)"); +XS(XS__checktitle) { + dXSARGS; + if (items != 1) + Perl_croak(aTHX_ "Usage: quest::checktitle(int title_set_id)"); - bool RETVAL; - int titleset = (int)SvIV(ST(0)); + bool RETVAL; + int titleset = (int) SvIV(ST(0)); - RETVAL = quest_manager.checktitle(titleset); + RETVAL = quest_manager.checktitle(titleset); - ST(0) = boolSV(RETVAL); + ST(0) = boolSV(RETVAL); sv_2mortal(ST(0)); XSRETURN(1); } XS(XS__removetitle); -XS(XS__removetitle) -{ - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: quest::removetitle(int title_set_id)"); +XS(XS__removetitle) { + dXSARGS; + if (items != 1) + Perl_croak(aTHX_ "Usage: quest::removetitle(int title_set_id)"); - int titleset = (int)SvIV(ST(0)); + int titleset = (int) SvIV(ST(0)); - quest_manager.removetitle(titleset); + quest_manager.removetitle(titleset); - XSRETURN_EMPTY; + XSRETURN_EMPTY; } XS(XS__wearchange); -XS(XS__wearchange) -{ +XS(XS__wearchange) { dXSARGS; if (items < 2) - Perl_croak(aTHX_ "Usage: quest::wearchange(uint8 slot, uint16 texture_id, [uint32 hero_forge_model_id = 0], [uint32 elite_material_id = 0])"); + Perl_croak(aTHX_ + "Usage: quest::wearchange(uint8 slot, uint16 texture_id, [uint32 hero_forge_model_id = 0], [uint32 elite_material_id = 0])"); - uint8 slot = (int)SvUV(ST(0)); - uint16 texture_id = (int)SvUV(ST(1)); + uint8 slot = (int) SvUV(ST(0)); + uint16 texture_id = (int) SvUV(ST(1)); - uint32 hero_forge_model_id= 0; - uint32 elite_material_id = 0; + uint32 hero_forge_model_id = 0; + uint32 elite_material_id = 0; if (items > 2) - hero_forge_model_id= (int)SvUV(ST(2)); + hero_forge_model_id = (int) SvUV(ST(2)); if (items > 3) - elite_material_id = (int)SvUV(ST(3)); + elite_material_id = (int) SvUV(ST(3)); quest_manager.wearchange(slot, texture_id, hero_forge_model_id, elite_material_id); @@ -3297,16 +3167,15 @@ XS(XS__wearchange) } XS(XS__voicetell); -XS(XS__voicetell) -{ +XS(XS__voicetell) { dXSARGS; if (items != 4) Perl_croak(aTHX_ "Usage: quest::voicetell(string client_name, int macro_id, int ace_id, int gender_id)"); - char * client_name = (char *)SvPV_nolen(ST(0)); - int macro_id = (int)SvIV(ST(1)); - int race_id = (int)SvIV(ST(2)); - int gender_id = (int)SvIV(ST(3)); + char *client_name = (char *) SvPV_nolen(ST(0)); + int macro_id = (int) SvIV(ST(1)); + int race_id = (int) SvIV(ST(2)); + int gender_id = (int) SvIV(ST(3)); quest_manager.voicetell(client_name, macro_id, race_id, gender_id); @@ -3314,13 +3183,12 @@ XS(XS__voicetell) } XS(XS__LearnRecipe); -XS(XS__LearnRecipe) -{ +XS(XS__LearnRecipe) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::LearnRecipe(int recipe_id)"); - uint32 recipe_id = (uint32)SvIV(ST(0)); + uint32 recipe_id = (uint32) SvIV(ST(0)); quest_manager.LearnRecipe(recipe_id); @@ -3328,16 +3196,15 @@ XS(XS__LearnRecipe) } XS(XS__SendMail); -XS(XS__SendMail) -{ +XS(XS__SendMail) { dXSARGS; if (items != 4) Perl_croak(aTHX_ "Usage: quest::SendMail(stirng to, string from, string subject, string message)"); - char *to = (char *)SvPV_nolen(ST(0)); - char *from = (char *)SvPV_nolen(ST(1)); - char *subject = (char *)SvPV_nolen(ST(2)); - char *message = (char *)SvPV_nolen(ST(3)); + char *to = (char *) SvPV_nolen(ST(0)); + char *from = (char *) SvPV_nolen(ST(1)); + char *subject = (char *) SvPV_nolen(ST(2)); + char *message = (char *) SvPV_nolen(ST(3)); quest_manager.SendMail(to, from, subject, message); @@ -3345,40 +3212,39 @@ XS(XS__SendMail) } XS(XS__GetZoneID); -XS(XS__GetZoneID) -{ +XS(XS__GetZoneID) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::GetZoneID(string zone)"); - char *zone = (char *)SvPV_nolen(ST(0)); - int32 id = quest_manager.GetZoneID(zone); + char *zone = (char *) SvPV_nolen(ST(0)); + int32 id = quest_manager.GetZoneID(zone); XSRETURN_IV(id); } XS(XS__GetZoneLongName); -XS(XS__GetZoneLongName) -{ +XS(XS__GetZoneLongName) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: quest::GetZoneLongName(string zone)"); dXSTARG; - char *zone = (char *)SvPV_nolen(ST(0)); - Const_char* RETVAL = quest_manager.GetZoneLongName(zone); + char *zone = (char *) SvPV_nolen(ST(0)); + Const_char *RETVAL = quest_manager.GetZoneLongName(zone); - sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG; + sv_setpv(TARG, RETVAL); + XSprePUSH; + PUSHTARG; XSRETURN(1); } XS(XS__GetTimeSeconds); -XS(XS__GetTimeSeconds) -{ +XS(XS__GetTimeSeconds) { dXSARGS; if (items != 0) Perl_croak(aTHX_ "Usage: quest::GetTimeSeconds()"); - uint32 seconds = 0; + uint32 seconds = 0; dXSTARG; seconds = Timer::GetTimeSeconds(); @@ -3386,16 +3252,15 @@ XS(XS__GetTimeSeconds) } XS(XS__crosszonesignalclientbycharid); -XS(XS__crosszonesignalclientbycharid) -{ +XS(XS__crosszonesignalclientbycharid) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::crosszonesignalclientbycharid(int character_id, int value)"); if (items == 2) { - int char_id = (int)SvIV(ST(0)); - uint32 int_value = (uint32)SvIV(ST(1)); + int char_id = (int) SvIV(ST(0)); + uint32 int_value = (uint32) SvIV(ST(1)); quest_manager.CrossZoneSignalPlayerByCharID(char_id, int_value); } else { Perl_croak(aTHX_ "Usage: quest::crosszonesignalclientbycharid(int character_id, int value)"); @@ -3405,16 +3270,15 @@ XS(XS__crosszonesignalclientbycharid) } XS(XS__crosszonesignalclientbyname); -XS(XS__crosszonesignalclientbyname) -{ +XS(XS__crosszonesignalclientbyname) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::crosszonesignalclientbycharid(string name, int value)"); if (items == 2) { - char *name = (char *)SvPV_nolen(ST(0)); - uint32 int_value = (uint32)SvIV(ST(1)); + char *name = (char *) SvPV_nolen(ST(0)); + uint32 int_value = (uint32) SvIV(ST(1)); quest_manager.CrossZoneSignalPlayerByName(name, int_value); } else { Perl_croak(aTHX_ "Usage: quest::crosszonesignalclientbycharid(string name, int value)"); @@ -3425,17 +3289,16 @@ XS(XS__crosszonesignalclientbyname) XS(XS__crosszonemessageplayerbyname); -XS(XS__crosszonemessageplayerbyname) -{ +XS(XS__crosszonemessageplayerbyname) { dXSARGS; if (items != 3) Perl_croak(aTHX_ "Usage: quest::crosszonemessageplayerbyname(int channel_id, string name, string message)"); if (items == 3) { - uint32 channel_id = (uint32)SvIV(ST(0)); - char *name = (char *)SvPV_nolen(ST(1)); - char *message = (char *)SvPV_nolen(ST(2)); + uint32 channel_id = (uint32) SvIV(ST(0)); + char *name = (char *) SvPV_nolen(ST(1)); + char *message = (char *) SvPV_nolen(ST(2)); quest_manager.CrossZoneMessagePlayerByName(channel_id, name, message); } @@ -3443,16 +3306,14 @@ XS(XS__crosszonemessageplayerbyname) } XS(XS__enablerecipe); -XS(XS__enablerecipe) -{ +XS(XS__enablerecipe) { dXSARGS; bool success = false; if (items != 1) { Perl_croak(aTHX_ "Usage: quest::enablerecipe(int recipe_id)"); - } - else { - uint32 recipe_id = (uint32)SvIV(ST(0)); + } else { + uint32 recipe_id = (uint32) SvIV(ST(0)); success = quest_manager.EnableRecipe(recipe_id); } if (!success) { @@ -3463,16 +3324,14 @@ XS(XS__enablerecipe) } XS(XS__disablerecipe); -XS(XS__disablerecipe) -{ +XS(XS__disablerecipe) { dXSARGS; bool success = false; if (items != 1) { Perl_croak(aTHX_ "Usage: quest::disablerecipe(int recipe_id)"); - } - else { - uint32 recipe_id = (uint32)SvIV(ST(0)); + } else { + uint32 recipe_id = (uint32) SvIV(ST(0)); success = quest_manager.DisableRecipe(recipe_id); } if (!success) { @@ -3483,15 +3342,13 @@ XS(XS__disablerecipe) } XS(XS__clear_npctype_cache); -XS(XS__clear_npctype_cache) -{ +XS(XS__clear_npctype_cache) { dXSARGS; if (items != 1) { Perl_croak(aTHX_ "Usage: quest::clear_npctype_cache(int npc_type_id)"); - } - else { - int32 npc_type_id = (int32)SvIV(ST(0)); + } else { + int32 npc_type_id = (int32) SvIV(ST(0)); quest_manager.ClearNPCTypeCache(npc_type_id); } @@ -3499,8 +3356,7 @@ XS(XS__clear_npctype_cache) } XS(XS__reloadzonestaticdata); -XS(XS__reloadzonestaticdata) -{ +XS(XS__reloadzonestaticdata) { dXSARGS; quest_manager.ReloadZoneStaticData(); @@ -3509,47 +3365,43 @@ XS(XS__reloadzonestaticdata) } XS(XS__qs_send_query); -XS(XS__qs_send_query) -{ +XS(XS__qs_send_query) { dXSARGS; - if (items != 1){ + if (items != 1) { Perl_croak(aTHX_ "Usage: quest::qs_send_query(string query)"); - } - else{ + } else { // char *Query = (char *)SvPV_nolen(ST(0)); - std::string Query = (std::string)SvPV_nolen(ST(0)); + std::string Query = (std::string) SvPV_nolen(ST(0)); QServ->SendQuery(Query); } XSRETURN_EMPTY; } XS(XS__qs_player_event); -XS(XS__qs_player_event) -{ +XS(XS__qs_player_event) { dXSARGS; - if (items != 2){ + if (items != 2) { Perl_croak(aTHX_ "Usage: quest::qs_player_event(int character_id, string message)"); - } - else{ - int char_id = (int)SvIV(ST(0)); - std::string message = (std::string)SvPV_nolen(ST(1)); + } else { + int char_id = (int) SvIV(ST(0)); + std::string message = (std::string) SvPV_nolen(ST(1)); QServ->PlayerLogEvent(Player_Log_Quest, char_id, message); } XSRETURN_EMPTY; } XS(XS__crosszonesetentityvariablebynpctypeid); -XS(XS__crosszonesetentityvariablebynpctypeid) -{ +XS(XS__crosszonesetentityvariablebynpctypeid) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: quest::crosszonesetentityvariablebynpctypeid(int npc_type_id, string key, string value)"); + Perl_croak(aTHX_ + "Usage: quest::crosszonesetentityvariablebynpctypeid(int npc_type_id, string key, string value)"); if (items == 3) { - uint32 npc_type_id = (uint32)SvIV(ST(0)); - const char *key = (const char *)SvPV_nolen(ST(1)); - const char *str_value = (const char *)SvPV_nolen(ST(2)); + uint32 npc_type_id = (uint32) SvIV(ST(0)); + const char *key = (const char *) SvPV_nolen(ST(1)); + const char *str_value = (const char *) SvPV_nolen(ST(2)); quest_manager.CrossZoneSetEntityVariableByNPCTypeID(npc_type_id, key, str_value); } @@ -3557,17 +3409,17 @@ XS(XS__crosszonesetentityvariablebynpctypeid) } XS(XS__crosszonesetentityvariablebyclientname); -XS(XS__crosszonesetentityvariablebyclientname) -{ +XS(XS__crosszonesetentityvariablebyclientname) { dXSARGS; if (items != 3) - Perl_croak(aTHX_ "Usage: quest::crosszonesetentityvariablebyclientname(string client_name, string key, string value)"); + Perl_croak(aTHX_ + "Usage: quest::crosszonesetentityvariablebyclientname(string client_name, string key, string value)"); if (items == 3) { - const char *client_name = (const char *)SvPV_nolen(ST(0)); - const char *key = (const char *)SvPV_nolen(ST(1)); - const char *str_value = (const char *)SvPV_nolen(ST(2)); + const char *client_name = (const char *) SvPV_nolen(ST(0)); + const char *key = (const char *) SvPV_nolen(ST(1)); + const char *str_value = (const char *) SvPV_nolen(ST(2)); quest_manager.CrossZoneSetEntityVariableByClientName(client_name, key, str_value); } @@ -3575,16 +3427,15 @@ XS(XS__crosszonesetentityvariablebyclientname) } XS(XS__crosszonesignalnpcbynpctypeid); -XS(XS__crosszonesignalnpcbynpctypeid) -{ +XS(XS__crosszonesignalnpcbynpctypeid) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::crosszonesignalnpcbynpctypeid(uint32 npc_type_id, uint32 value)"); if (items == 2) { - uint32 npc_type_id = (uint32)SvIV(ST(0)); - uint32 int_value = (uint32)SvIV(ST(1)); + uint32 npc_type_id = (uint32) SvIV(ST(0)); + uint32 int_value = (uint32) SvIV(ST(1)); quest_manager.CrossZoneSignalNPCByNPCTypeID(npc_type_id, int_value); } @@ -3592,49 +3443,45 @@ XS(XS__crosszonesignalnpcbynpctypeid) } XS(XS__worldwidemarquee); -XS(XS__worldwidemarquee) -{ +XS(XS__worldwidemarquee) { dXSARGS; if (items != 6) - Perl_croak(aTHX_ "Usage: quest::worldwidemarquee(uint32 color_id, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, string message)"); - + Perl_croak(aTHX_ + "Usage: quest::worldwidemarquee(uint32 color_id, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, string message)"); + if (items == 6) { - uint32 color_id = (uint32)SvIV(ST(0)); - uint32 priority = (uint32)SvIV(ST(1)); - uint32 fade_in = (uint32)SvIV(ST(2)); - uint32 fade_out = (uint32)SvIV(ST(3)); - uint32 duration = (uint32)SvIV(ST(4)); - char* message = (char *)SvPV_nolen(ST(5)); + uint32 color_id = (uint32) SvIV(ST(0)); + uint32 priority = (uint32) SvIV(ST(1)); + uint32 fade_in = (uint32) SvIV(ST(2)); + uint32 fade_out = (uint32) SvIV(ST(3)); + uint32 duration = (uint32) SvIV(ST(4)); + char *message = (char *) SvPV_nolen(ST(5)); quest_manager.WorldWideMarquee(color_id, priority, fade_in, fade_out, duration, message); } - + XSRETURN_EMPTY; } XS(XS__debug); -XS(XS__debug) -{ +XS(XS__debug) { dXSARGS; - if (items != 1 && items != 2){ + if (items != 1 && items != 2) { Perl_croak(aTHX_ "Usage: quest::debug(string message, [uint8 debug_level = 1 [1-3]])"); - } - else{ - std::string log_message = (std::string)SvPV_nolen(ST(0)); - uint8 debug_level = 1; + } else { + std::string log_message = (std::string) SvPV_nolen(ST(0)); + uint8 debug_level = 1; if (items == 2) - debug_level = (uint8)SvIV(ST(1)); + debug_level = (uint8) SvIV(ST(1)); if (debug_level > Logs::Detail) return; - if (debug_level == Logs::General){ + if (debug_level == Logs::General) { Log(Logs::General, Logs::QuestDebug, log_message); - } - else if (debug_level == Logs::Moderate){ + } else if (debug_level == Logs::Moderate) { Log(Logs::Moderate, Logs::QuestDebug, log_message); - } - else if (debug_level == Logs::Detail){ + } else if (debug_level == Logs::Detail) { Log(Logs::Detail, Logs::QuestDebug, log_message); } } @@ -3646,11 +3493,11 @@ XS(XS__UpdateZoneHeader) { dXSARGS; if (items != 2) Perl_croak(aTHX_ "Usage: quest::UpdateZoneHeader(string key, string value)"); - - std::string key = (std::string)SvPV_nolen(ST(0)); - std::string str_value = (std::string)SvPV_nolen(ST(1)); + + std::string key = (std::string) SvPV_nolen(ST(0)); + std::string str_value = (std::string) SvPV_nolen(ST(1)); quest_manager.UpdateZoneHeader(key, str_value); - + XSRETURN_EMPTY; } @@ -3660,21 +3507,20 @@ This is the callback perl will look for to setup the quest package's XSUBs */ EXTERN_C XS(boot_quest); // prototype to pass -Wmissing-prototypes -EXTERN_C XS(boot_quest) -{ +EXTERN_C XS(boot_quest) { dXSARGS; char file[256]; strncpy(file, __FILE__, 256); file[255] = '\0'; - if(items != 1) + if (items != 1) Log(Logs::General, Logs::Error, "boot_quest does not take any arguments."); - char buf[128]; //shouldent have any function names longer than this. + char buf[128]; //shouldent have any function names longer than this. //add the strcpy stuff to get rid of const warnings.... - XS_VERSION_BOOTCHECK ; + XS_VERSION_BOOTCHECK; #ifdef BOTS newXS(strcpy(buf, "botquest"), XS__botquest, file); @@ -3683,216 +3529,216 @@ EXTERN_C XS(boot_quest) newXS(strcpy(buf, "createBot"), XS__createBot, file); #endif //BOTS - newXS(strcpy(buf, "AssignGroupToInstance"), XS__AssignGroupToInstance, file); - newXS(strcpy(buf, "AssignRaidToInstance"), XS__AssignRaidToInstance, file); - newXS(strcpy(buf, "AssignToInstance"), XS__AssignToInstance, file); - newXS(strcpy(buf, "ChooseRandom"), XS__ChooseRandom, file); - newXS(strcpy(buf, "CreateInstance"), XS__CreateInstance, file); - newXS(strcpy(buf, "DestroyInstance"), XS__DestroyInstance, file); - newXS(strcpy(buf, "UpdateInstanceTimer"), XS__UpdateInstanceTimer, file); - newXS(strcpy(buf, "GetInstanceTimer"), XS__GetInstanceTimer, file); - newXS(strcpy(buf, "GetInstanceTimerByID"), XS__GetInstanceTimerByID, file); - newXS(strcpy(buf, "FlagInstanceByGroupLeader"), XS__FlagInstanceByGroupLeader, file); - newXS(strcpy(buf, "FlagInstanceByRaidLeader"), XS__FlagInstanceByRaidLeader, file); - newXS(strcpy(buf, "FlyMode"), XS__FlyMode, file); - newXS(strcpy(buf, "GetCharactersInInstance"), XS__GetCharactersInInstance, file); - newXS(strcpy(buf, "GetInstanceID"), XS__GetInstanceID, file); - newXS(strcpy(buf, "GetSpellResistType"), XS__GetSpellResistType, file); - newXS(strcpy(buf, "GetSpellTargetType"), XS__GetSpellTargetType, file); - newXS(strcpy(buf, "GetTimeSeconds"), XS__GetTimeSeconds, file); - newXS(strcpy(buf, "GetZoneID"), XS__GetZoneID, file); - newXS(strcpy(buf, "GetZoneLongName"), XS__GetZoneLongName, file); - newXS(strcpy(buf, "IsBeneficialSpell"), XS__IsBeneficialSpell, file); - newXS(strcpy(buf, "IsEffectInSpell"), XS__IsEffectInSpell, file); - newXS(strcpy(buf, "IsRunning"), XS__IsRunning, file); - newXS(strcpy(buf, "LearnRecipe"), XS__LearnRecipe, file); - newXS(strcpy(buf, "MerchantCountItem"), XS__MerchantCountItem, file); - newXS(strcpy(buf, "MerchantSetItem"), XS__MerchantSetItem, file); - newXS(strcpy(buf, "MovePCInstance"), XS__MovePCInstance, file); - newXS(strcpy(buf, "RemoveAllFromInstance"), XS__RemoveAllFromInstance, file); - newXS(strcpy(buf, "RemoveFromInstance"), XS__RemoveFromInstance, file); - newXS(strcpy(buf, "SendMail"), XS__SendMail, file); - newXS(strcpy(buf, "SetRunning"), XS__SetRunning, file); - newXS(strcpy(buf, "activespeakactivity"), XS__activespeakactivity, file); - newXS(strcpy(buf, "activespeaktask"), XS__activespeaktask, file); - newXS(strcpy(buf, "activetasksinset"), XS__activetasksinset, file); - newXS(strcpy(buf, "addldonloss"), XS__addldonpoints, file); - newXS(strcpy(buf, "addldonpoints"), XS__addldonpoints, file); - newXS(strcpy(buf, "addldonwin"), XS__addldonpoints, file); - newXS(strcpy(buf, "addloot"), XS__addloot, file); - newXS(strcpy(buf, "addskill"), XS__addskill, file); - newXS(strcpy(buf, "assigntask"), XS__assigntask, file); - newXS(strcpy(buf, "attack"), XS__attack, file); - newXS(strcpy(buf, "attacknpc"), XS__attacknpc, file); - newXS(strcpy(buf, "attacknpctype"), XS__attacknpctype, file); - newXS(strcpy(buf, "buryplayercorpse"), XS__buryplayercorpse, file); - newXS(strcpy(buf, "castspell"), XS__castspell, file); - newXS(strcpy(buf, "changedeity"), XS__changedeity, file); - newXS(strcpy(buf, "checktitle"), XS__checktitle, file); - newXS(strcpy(buf, "clear_npctype_cache"), XS__clear_npctype_cache, file); - newXS(strcpy(buf, "clear_proximity"), XS__clear_proximity, file); - newXS(strcpy(buf, "clear_zone_flag"), XS__clear_zone_flag, file); - newXS(strcpy(buf, "clearspawntimers"), XS__clearspawntimers, file); - newXS(strcpy(buf, "collectitems"), XS__collectitems, file); - newXS(strcpy(buf, "completedtasksinset"), XS__completedtasksinset, file); - newXS(strcpy(buf, "createdoor"), XS__CreateDoor, file); - newXS(strcpy(buf, "creategroundobject"), XS__CreateGroundObject, file); - newXS(strcpy(buf, "creategroundobjectfrommodel"), XS__CreateGroundObjectFromModel, file); - newXS(strcpy(buf, "createguild"), XS__createguild, file); - newXS(strcpy(buf, "crosszonemessageplayerbyname"), XS__crosszonemessageplayerbyname, file); - newXS(strcpy(buf, "crosszonesetentityvariablebynpctypeid"), XS__crosszonesetentityvariablebynpctypeid, file); - newXS(strcpy(buf, "crosszonesetentityvariablebyclientname"), XS__crosszonesetentityvariablebyclientname, file); - newXS(strcpy(buf, "crosszonesignalclientbycharid"), XS__crosszonesignalclientbycharid, file); - newXS(strcpy(buf, "crosszonesignalclientbyname"), XS__crosszonesignalclientbyname, file); - newXS(strcpy(buf, "crosszonesignalnpcbynpctypeid"), XS__crosszonesignalnpcbynpctypeid, file); - newXS(strcpy(buf, "worldwidemarquee"), XS__worldwidemarquee, file); - newXS(strcpy(buf, "debug"), XS__debug, file); - newXS(strcpy(buf, "delglobal"), XS__delglobal, file); - newXS(strcpy(buf, "depop"), XS__depop, file); - newXS(strcpy(buf, "depop_withtimer"), XS__depop_withtimer, file); - newXS(strcpy(buf, "depopall"), XS__depopall, file); - newXS(strcpy(buf, "depopzone"), XS__depopzone, file); - newXS(strcpy(buf, "ding"), XS__ding, file); - newXS(strcpy(buf, "disable_proximity_say"), XS__disable_proximity_say, file); - newXS(strcpy(buf, "disable_spawn2"), XS__disable_spawn2, file); - newXS(strcpy(buf, "disablerecipe"), XS__disablerecipe, file); - newXS(strcpy(buf, "disabletask"), XS__disabletask, file); - newXS(strcpy(buf, "doanim"), XS__doanim, file); - newXS(strcpy(buf, "echo"), XS__echo, file); - newXS(strcpy(buf, "emote"), XS__emote, file); - newXS(strcpy(buf, "enable_proximity_say"), XS__enable_proximity_say, file); - newXS(strcpy(buf, "enable_spawn2"), XS__enable_spawn2, file); - newXS(strcpy(buf, "enabledtaskcount"), XS__enabledtaskcount, file); - newXS(strcpy(buf, "enablerecipe"), XS__enablerecipe, file); - newXS(strcpy(buf, "enabletask"), XS__enabletask, file); - newXS(strcpy(buf, "enabletitle"), XS__enabletitle, file); - newXS(strcpy(buf, "exp"), XS__exp, file); - newXS(strcpy(buf, "faction"), XS__faction, file); - newXS(strcpy(buf, "factionvalue"), XS_FactionValue, file); - newXS(strcpy(buf, "failtask"), XS__failtask, file); - newXS(strcpy(buf, "firsttaskinset"), XS__firsttaskinset, file); - newXS(strcpy(buf, "follow"), XS__follow, file); - newXS(strcpy(buf, "forcedoorclose"), XS__forcedoorclose, file); - newXS(strcpy(buf, "forcedooropen"), XS__forcedooropen, file); - newXS(strcpy(buf, "getItemName"), XS_qc_getItemName, file); - newXS(strcpy(buf, "get_spawn_condition"), XS__get_spawn_condition, file); - newXS(strcpy(buf, "getguildnamebyid"), XS__getguildnamebyid, file); - newXS(strcpy(buf, "getlevel"), XS__getlevel, file); - newXS(strcpy(buf, "getplayerburiedcorpsecount"), XS__getplayerburiedcorpsecount, file); - newXS(strcpy(buf, "gettaskactivitydonecount"), XS__gettaskactivitydonecount, file); - newXS(strcpy(buf, "givecash"), XS__givecash, file); - newXS(strcpy(buf, "gmmove"), XS__gmmove, file); - newXS(strcpy(buf, "gmsay"), XS__gmsay, file); - newXS(strcpy(buf, "has_zone_flag"), XS__has_zone_flag, file); - newXS(strcpy(buf, "incstat"), XS__incstat, file); - newXS(strcpy(buf, "isdisctome"), XS__isdisctome, file); - newXS(strcpy(buf, "isdooropen"), XS__isdooropen, file); - newXS(strcpy(buf, "istaskactive"), XS__istaskactive, file); - newXS(strcpy(buf, "istaskactivityactive"), XS__istaskactivityactive, file); - newXS(strcpy(buf, "istaskappropriate"), XS__istaskappropriate, file); - newXS(strcpy(buf, "istaskcompleted"), XS__istaskcompleted, file); - newXS(strcpy(buf, "istaskenabled"), XS__istaskenabled, file); - newXS(strcpy(buf, "itemlink"), XS__itemlink, file); - newXS(strcpy(buf, "lasttaskinset"), XS__lasttaskinset, file); - newXS(strcpy(buf, "level"), XS__level, file); - newXS(strcpy(buf, "me"), XS__me, file); - newXS(strcpy(buf, "modifynpcstat"), XS__ModifyNPCStat, file); - newXS(strcpy(buf, "movegrp"), XS__movegrp, file); - newXS(strcpy(buf, "movepc"), XS__movepc, file); - newXS(strcpy(buf, "moveto"), XS__moveto, file); - newXS(strcpy(buf, "nexttaskinset"), XS__nexttaskinset, file); - newXS(strcpy(buf, "npcfeature"), XS__npcfeature, file); - newXS(strcpy(buf, "npcgender"), XS__npcgender, file); - newXS(strcpy(buf, "npcrace"), XS__npcrace, file); - newXS(strcpy(buf, "npcsize"), XS__npcsize, file); - newXS(strcpy(buf, "npctexture"), XS__npctexture, file); - newXS(strcpy(buf, "pause"), XS__pause, file); - newXS(strcpy(buf, "permaclass"), XS__permaclass, file); - newXS(strcpy(buf, "permagender"), XS__permagender, file); - newXS(strcpy(buf, "permarace"), XS__permarace, file); - newXS(strcpy(buf, "playerfeature"), XS__playerfeature, file); - newXS(strcpy(buf, "playergender"), XS__playergender, file); - newXS(strcpy(buf, "playerrace"), XS__playerrace, file); - newXS(strcpy(buf, "playersize"), XS__playersize, file); - newXS(strcpy(buf, "playertexture"), XS__playertexture, file); - newXS(strcpy(buf, "popup"), XS__popup, file); - newXS(strcpy(buf, "pvp"), XS__pvp, file); - newXS(strcpy(buf, "qs_player_event"), XS__qs_player_event, file); - newXS(strcpy(buf, "qs_send_query"), XS__qs_send_query, file); - newXS(strcpy(buf, "rain"), XS__rain, file); - newXS(strcpy(buf, "rebind"), XS__rebind, file); - newXS(strcpy(buf, "reloadzonestaticdata"), XS__reloadzonestaticdata, file); - newXS(strcpy(buf, "removetitle"), XS__removetitle, file); - newXS(strcpy(buf, "repopzone"), XS__repopzone, file); - newXS(strcpy(buf, "resettaskactivity"), XS__resettaskactivity, file); - newXS(strcpy(buf, "respawn"), XS__respawn, file); - newXS(strcpy(buf, "resume"), XS__resume, file); - newXS(strcpy(buf, "safemove"), XS__safemove, file); - newXS(strcpy(buf, "save"), XS__save, file); - newXS(strcpy(buf, "say"), XS__say, file); - newXS(strcpy(buf, "saylink"), XS__saylink, file); - newXS(strcpy(buf, "scribespells"), XS__scribespells, file); - newXS(strcpy(buf, "selfcast"), XS__selfcast, file); - newXS(strcpy(buf, "set_proximity"), XS__set_proximity, file); - newXS(strcpy(buf, "set_zone_flag"), XS__set_zone_flag, file); - newXS(strcpy(buf, "setallskill"), XS__setallskill, file); - newXS(strcpy(buf, "setanim"), XS__setanim, file); - newXS(strcpy(buf, "setglobal"), XS__setglobal, file); - newXS(strcpy(buf, "setguild"), XS__setguild, file); - newXS(strcpy(buf, "sethp"), XS__sethp, file); - newXS(strcpy(buf, "setlanguage"), XS__setlanguage, file); - newXS(strcpy(buf, "setnexthpevent"), XS__setnexthpevent, file); - newXS(strcpy(buf, "setnextinchpevent"), XS__setnextinchpevent, file); - newXS(strcpy(buf, "setskill"), XS__setskill, file); - newXS(strcpy(buf, "setsky"), XS__setsky, file); - newXS(strcpy(buf, "setstat"), XS__setstat, file); - newXS(strcpy(buf, "settarget"), XS__settarget, file); - newXS(strcpy(buf, "settime"), XS__settime, file); - newXS(strcpy(buf, "settimer"), XS__settimer, file); - newXS(strcpy(buf, "settimerMS"), XS__settimerMS, file); - newXS(strcpy(buf, "sfollow"), XS__sfollow, file); - newXS(strcpy(buf, "shout"), XS__shout, file); - newXS(strcpy(buf, "shout2"), XS__shout2, file); - newXS(strcpy(buf, "showgrid"), XS__showgrid, file); - newXS(strcpy(buf, "signal"), XS__signal, file); - newXS(strcpy(buf, "signalwith"), XS__signalwith, file); - newXS(strcpy(buf, "snow"), XS__snow, file); - newXS(strcpy(buf, "spawn"), XS__spawn, file); - newXS(strcpy(buf, "spawn2"), XS__spawn2, file); - newXS(strcpy(buf, "spawn_condition"), XS__spawn_condition, file); - newXS(strcpy(buf, "spawn_from_spawn2"), XS__spawn_from_spawn2, file); - newXS(strcpy(buf, "start"), XS__start, file); - newXS(strcpy(buf, "stop"), XS__stop, file); - newXS(strcpy(buf, "stopalltimers"), XS__stopalltimers, file); - newXS(strcpy(buf, "stoptimer"), XS__stoptimer, file); - newXS(strcpy(buf, "summonallplayercorpses"), XS__summonallplayercorpses, file); - newXS(strcpy(buf, "summonburiedplayercorpse"), XS__summonburiedplayercorpse, file); - newXS(strcpy(buf, "summonitem"), XS__summonitem, file); - newXS(strcpy(buf, "surname"), XS__surname, file); - newXS(strcpy(buf, "targlobal"), XS__targlobal, file); - newXS(strcpy(buf, "taskexploredarea"), XS__taskexploredarea, file); - newXS(strcpy(buf, "taskselector"), XS__taskselector, file); - newXS(strcpy(buf, "task_setselector"), XS__task_setselector, file); - newXS(strcpy(buf, "tasktimeleft"), XS__tasktimeleft, file); - newXS(strcpy(buf, "toggle_spawn_event"), XS__toggle_spawn_event, file); - newXS(strcpy(buf, "toggledoorstate"), XS__toggledoorstate, file); - newXS(strcpy(buf, "traindisc"), XS__traindisc, file); - newXS(strcpy(buf, "traindiscs"), XS__traindiscs, file); - newXS(strcpy(buf, "unique_spawn"), XS__unique_spawn, file); - newXS(strcpy(buf, "unscribespells"), XS__unscribespells, file); - newXS(strcpy(buf, "untraindiscs"), XS__untraindiscs, file); - newXS(strcpy(buf, "updatespawntimer"), XS__UpdateSpawnTimer, file); - newXS(strcpy(buf, "updatetaskactivity"), XS__updatetaskactivity, file); - newXS(strcpy(buf, "UpdateZoneHeader"), XS__UpdateZoneHeader, file); - newXS(strcpy(buf, "varlink"), XS__varlink, file); - newXS(strcpy(buf, "voicetell"), XS__voicetell, file); - newXS(strcpy(buf, "we"), XS__we, file); - newXS(strcpy(buf, "wearchange"), XS__wearchange, file); - newXS(strcpy(buf, "write"), XS__write, file); - newXS(strcpy(buf, "ze"), XS__ze, file); - newXS(strcpy(buf, "zone"), XS__zone, file); + newXS(strcpy(buf, "AssignGroupToInstance"), XS__AssignGroupToInstance, file); + newXS(strcpy(buf, "AssignRaidToInstance"), XS__AssignRaidToInstance, file); + newXS(strcpy(buf, "AssignToInstance"), XS__AssignToInstance, file); + newXS(strcpy(buf, "ChooseRandom"), XS__ChooseRandom, file); + newXS(strcpy(buf, "CreateInstance"), XS__CreateInstance, file); + newXS(strcpy(buf, "DestroyInstance"), XS__DestroyInstance, file); + newXS(strcpy(buf, "UpdateInstanceTimer"), XS__UpdateInstanceTimer, file); + newXS(strcpy(buf, "GetInstanceTimer"), XS__GetInstanceTimer, file); + newXS(strcpy(buf, "GetInstanceTimerByID"), XS__GetInstanceTimerByID, file); + newXS(strcpy(buf, "FlagInstanceByGroupLeader"), XS__FlagInstanceByGroupLeader, file); + newXS(strcpy(buf, "FlagInstanceByRaidLeader"), XS__FlagInstanceByRaidLeader, file); + newXS(strcpy(buf, "FlyMode"), XS__FlyMode, file); + newXS(strcpy(buf, "GetCharactersInInstance"), XS__GetCharactersInInstance, file); + newXS(strcpy(buf, "GetInstanceID"), XS__GetInstanceID, file); + newXS(strcpy(buf, "GetSpellResistType"), XS__GetSpellResistType, file); + newXS(strcpy(buf, "GetSpellTargetType"), XS__GetSpellTargetType, file); + newXS(strcpy(buf, "GetTimeSeconds"), XS__GetTimeSeconds, file); + newXS(strcpy(buf, "GetZoneID"), XS__GetZoneID, file); + newXS(strcpy(buf, "GetZoneLongName"), XS__GetZoneLongName, file); + newXS(strcpy(buf, "IsBeneficialSpell"), XS__IsBeneficialSpell, file); + newXS(strcpy(buf, "IsEffectInSpell"), XS__IsEffectInSpell, file); + newXS(strcpy(buf, "IsRunning"), XS__IsRunning, file); + newXS(strcpy(buf, "LearnRecipe"), XS__LearnRecipe, file); + newXS(strcpy(buf, "MerchantCountItem"), XS__MerchantCountItem, file); + newXS(strcpy(buf, "MerchantSetItem"), XS__MerchantSetItem, file); + newXS(strcpy(buf, "MovePCInstance"), XS__MovePCInstance, file); + newXS(strcpy(buf, "RemoveAllFromInstance"), XS__RemoveAllFromInstance, file); + newXS(strcpy(buf, "RemoveFromInstance"), XS__RemoveFromInstance, file); + newXS(strcpy(buf, "SendMail"), XS__SendMail, file); + newXS(strcpy(buf, "SetRunning"), XS__SetRunning, file); + newXS(strcpy(buf, "activespeakactivity"), XS__activespeakactivity, file); + newXS(strcpy(buf, "activespeaktask"), XS__activespeaktask, file); + newXS(strcpy(buf, "activetasksinset"), XS__activetasksinset, file); + newXS(strcpy(buf, "addldonloss"), XS__addldonpoints, file); + newXS(strcpy(buf, "addldonpoints"), XS__addldonpoints, file); + newXS(strcpy(buf, "addldonwin"), XS__addldonpoints, file); + newXS(strcpy(buf, "addloot"), XS__addloot, file); + newXS(strcpy(buf, "addskill"), XS__addskill, file); + newXS(strcpy(buf, "assigntask"), XS__assigntask, file); + newXS(strcpy(buf, "attack"), XS__attack, file); + newXS(strcpy(buf, "attacknpc"), XS__attacknpc, file); + newXS(strcpy(buf, "attacknpctype"), XS__attacknpctype, file); + newXS(strcpy(buf, "buryplayercorpse"), XS__buryplayercorpse, file); + newXS(strcpy(buf, "castspell"), XS__castspell, file); + newXS(strcpy(buf, "changedeity"), XS__changedeity, file); + newXS(strcpy(buf, "checktitle"), XS__checktitle, file); + newXS(strcpy(buf, "clear_npctype_cache"), XS__clear_npctype_cache, file); + newXS(strcpy(buf, "clear_proximity"), XS__clear_proximity, file); + newXS(strcpy(buf, "clear_zone_flag"), XS__clear_zone_flag, file); + newXS(strcpy(buf, "clearspawntimers"), XS__clearspawntimers, file); + newXS(strcpy(buf, "collectitems"), XS__collectitems, file); + newXS(strcpy(buf, "completedtasksinset"), XS__completedtasksinset, file); + newXS(strcpy(buf, "createdoor"), XS__CreateDoor, file); + newXS(strcpy(buf, "creategroundobject"), XS__CreateGroundObject, file); + newXS(strcpy(buf, "creategroundobjectfrommodel"), XS__CreateGroundObjectFromModel, file); + newXS(strcpy(buf, "createguild"), XS__createguild, file); + newXS(strcpy(buf, "crosszonemessageplayerbyname"), XS__crosszonemessageplayerbyname, file); + newXS(strcpy(buf, "crosszonesetentityvariablebynpctypeid"), XS__crosszonesetentityvariablebynpctypeid, file); + newXS(strcpy(buf, "crosszonesetentityvariablebyclientname"), XS__crosszonesetentityvariablebyclientname, file); + newXS(strcpy(buf, "crosszonesignalclientbycharid"), XS__crosszonesignalclientbycharid, file); + newXS(strcpy(buf, "crosszonesignalclientbyname"), XS__crosszonesignalclientbyname, file); + newXS(strcpy(buf, "crosszonesignalnpcbynpctypeid"), XS__crosszonesignalnpcbynpctypeid, file); + newXS(strcpy(buf, "worldwidemarquee"), XS__worldwidemarquee, file); + newXS(strcpy(buf, "debug"), XS__debug, file); + newXS(strcpy(buf, "delglobal"), XS__delglobal, file); + newXS(strcpy(buf, "depop"), XS__depop, file); + newXS(strcpy(buf, "depop_withtimer"), XS__depop_withtimer, file); + newXS(strcpy(buf, "depopall"), XS__depopall, file); + newXS(strcpy(buf, "depopzone"), XS__depopzone, file); + newXS(strcpy(buf, "ding"), XS__ding, file); + newXS(strcpy(buf, "disable_proximity_say"), XS__disable_proximity_say, file); + newXS(strcpy(buf, "disable_spawn2"), XS__disable_spawn2, file); + newXS(strcpy(buf, "disablerecipe"), XS__disablerecipe, file); + newXS(strcpy(buf, "disabletask"), XS__disabletask, file); + newXS(strcpy(buf, "doanim"), XS__doanim, file); + newXS(strcpy(buf, "echo"), XS__echo, file); + newXS(strcpy(buf, "emote"), XS__emote, file); + newXS(strcpy(buf, "enable_proximity_say"), XS__enable_proximity_say, file); + newXS(strcpy(buf, "enable_spawn2"), XS__enable_spawn2, file); + newXS(strcpy(buf, "enabledtaskcount"), XS__enabledtaskcount, file); + newXS(strcpy(buf, "enablerecipe"), XS__enablerecipe, file); + newXS(strcpy(buf, "enabletask"), XS__enabletask, file); + newXS(strcpy(buf, "enabletitle"), XS__enabletitle, file); + newXS(strcpy(buf, "exp"), XS__exp, file); + newXS(strcpy(buf, "faction"), XS__faction, file); + newXS(strcpy(buf, "factionvalue"), XS_FactionValue, file); + newXS(strcpy(buf, "failtask"), XS__failtask, file); + newXS(strcpy(buf, "firsttaskinset"), XS__firsttaskinset, file); + newXS(strcpy(buf, "follow"), XS__follow, file); + newXS(strcpy(buf, "forcedoorclose"), XS__forcedoorclose, file); + newXS(strcpy(buf, "forcedooropen"), XS__forcedooropen, file); + newXS(strcpy(buf, "getItemName"), XS_qc_getItemName, file); + newXS(strcpy(buf, "get_spawn_condition"), XS__get_spawn_condition, file); + newXS(strcpy(buf, "getguildnamebyid"), XS__getguildnamebyid, file); + newXS(strcpy(buf, "getlevel"), XS__getlevel, file); + newXS(strcpy(buf, "getplayerburiedcorpsecount"), XS__getplayerburiedcorpsecount, file); + newXS(strcpy(buf, "gettaskactivitydonecount"), XS__gettaskactivitydonecount, file); + newXS(strcpy(buf, "givecash"), XS__givecash, file); + newXS(strcpy(buf, "gmmove"), XS__gmmove, file); + newXS(strcpy(buf, "gmsay"), XS__gmsay, file); + newXS(strcpy(buf, "has_zone_flag"), XS__has_zone_flag, file); + newXS(strcpy(buf, "incstat"), XS__incstat, file); + newXS(strcpy(buf, "isdisctome"), XS__isdisctome, file); + newXS(strcpy(buf, "isdooropen"), XS__isdooropen, file); + newXS(strcpy(buf, "istaskactive"), XS__istaskactive, file); + newXS(strcpy(buf, "istaskactivityactive"), XS__istaskactivityactive, file); + newXS(strcpy(buf, "istaskappropriate"), XS__istaskappropriate, file); + newXS(strcpy(buf, "istaskcompleted"), XS__istaskcompleted, file); + newXS(strcpy(buf, "istaskenabled"), XS__istaskenabled, file); + newXS(strcpy(buf, "itemlink"), XS__itemlink, file); + newXS(strcpy(buf, "lasttaskinset"), XS__lasttaskinset, file); + newXS(strcpy(buf, "level"), XS__level, file); + newXS(strcpy(buf, "me"), XS__me, file); + newXS(strcpy(buf, "modifynpcstat"), XS__ModifyNPCStat, file); + newXS(strcpy(buf, "movegrp"), XS__movegrp, file); + newXS(strcpy(buf, "movepc"), XS__movepc, file); + newXS(strcpy(buf, "moveto"), XS__moveto, file); + newXS(strcpy(buf, "nexttaskinset"), XS__nexttaskinset, file); + newXS(strcpy(buf, "npcfeature"), XS__npcfeature, file); + newXS(strcpy(buf, "npcgender"), XS__npcgender, file); + newXS(strcpy(buf, "npcrace"), XS__npcrace, file); + newXS(strcpy(buf, "npcsize"), XS__npcsize, file); + newXS(strcpy(buf, "npctexture"), XS__npctexture, file); + newXS(strcpy(buf, "pause"), XS__pause, file); + newXS(strcpy(buf, "permaclass"), XS__permaclass, file); + newXS(strcpy(buf, "permagender"), XS__permagender, file); + newXS(strcpy(buf, "permarace"), XS__permarace, file); + newXS(strcpy(buf, "playerfeature"), XS__playerfeature, file); + newXS(strcpy(buf, "playergender"), XS__playergender, file); + newXS(strcpy(buf, "playerrace"), XS__playerrace, file); + newXS(strcpy(buf, "playersize"), XS__playersize, file); + newXS(strcpy(buf, "playertexture"), XS__playertexture, file); + newXS(strcpy(buf, "popup"), XS__popup, file); + newXS(strcpy(buf, "pvp"), XS__pvp, file); + newXS(strcpy(buf, "qs_player_event"), XS__qs_player_event, file); + newXS(strcpy(buf, "qs_send_query"), XS__qs_send_query, file); + newXS(strcpy(buf, "rain"), XS__rain, file); + newXS(strcpy(buf, "rebind"), XS__rebind, file); + newXS(strcpy(buf, "reloadzonestaticdata"), XS__reloadzonestaticdata, file); + newXS(strcpy(buf, "removetitle"), XS__removetitle, file); + newXS(strcpy(buf, "repopzone"), XS__repopzone, file); + newXS(strcpy(buf, "resettaskactivity"), XS__resettaskactivity, file); + newXS(strcpy(buf, "respawn"), XS__respawn, file); + newXS(strcpy(buf, "resume"), XS__resume, file); + newXS(strcpy(buf, "safemove"), XS__safemove, file); + newXS(strcpy(buf, "save"), XS__save, file); + newXS(strcpy(buf, "say"), XS__say, file); + newXS(strcpy(buf, "saylink"), XS__saylink, file); + newXS(strcpy(buf, "scribespells"), XS__scribespells, file); + newXS(strcpy(buf, "selfcast"), XS__selfcast, file); + newXS(strcpy(buf, "set_proximity"), XS__set_proximity, file); + newXS(strcpy(buf, "set_zone_flag"), XS__set_zone_flag, file); + newXS(strcpy(buf, "setallskill"), XS__setallskill, file); + newXS(strcpy(buf, "setanim"), XS__setanim, file); + newXS(strcpy(buf, "setglobal"), XS__setglobal, file); + newXS(strcpy(buf, "setguild"), XS__setguild, file); + newXS(strcpy(buf, "sethp"), XS__sethp, file); + newXS(strcpy(buf, "setlanguage"), XS__setlanguage, file); + newXS(strcpy(buf, "setnexthpevent"), XS__setnexthpevent, file); + newXS(strcpy(buf, "setnextinchpevent"), XS__setnextinchpevent, file); + newXS(strcpy(buf, "setskill"), XS__setskill, file); + newXS(strcpy(buf, "setsky"), XS__setsky, file); + newXS(strcpy(buf, "setstat"), XS__setstat, file); + newXS(strcpy(buf, "settarget"), XS__settarget, file); + newXS(strcpy(buf, "settime"), XS__settime, file); + newXS(strcpy(buf, "settimer"), XS__settimer, file); + newXS(strcpy(buf, "settimerMS"), XS__settimerMS, file); + newXS(strcpy(buf, "sfollow"), XS__sfollow, file); + newXS(strcpy(buf, "shout"), XS__shout, file); + newXS(strcpy(buf, "shout2"), XS__shout2, file); + newXS(strcpy(buf, "showgrid"), XS__showgrid, file); + newXS(strcpy(buf, "signal"), XS__signal, file); + newXS(strcpy(buf, "signalwith"), XS__signalwith, file); + newXS(strcpy(buf, "snow"), XS__snow, file); + newXS(strcpy(buf, "spawn"), XS__spawn, file); + newXS(strcpy(buf, "spawn2"), XS__spawn2, file); + newXS(strcpy(buf, "spawn_condition"), XS__spawn_condition, file); + newXS(strcpy(buf, "spawn_from_spawn2"), XS__spawn_from_spawn2, file); + newXS(strcpy(buf, "start"), XS__start, file); + newXS(strcpy(buf, "stop"), XS__stop, file); + newXS(strcpy(buf, "stopalltimers"), XS__stopalltimers, file); + newXS(strcpy(buf, "stoptimer"), XS__stoptimer, file); + newXS(strcpy(buf, "summonallplayercorpses"), XS__summonallplayercorpses, file); + newXS(strcpy(buf, "summonburiedplayercorpse"), XS__summonburiedplayercorpse, file); + newXS(strcpy(buf, "summonitem"), XS__summonitem, file); + newXS(strcpy(buf, "surname"), XS__surname, file); + newXS(strcpy(buf, "targlobal"), XS__targlobal, file); + newXS(strcpy(buf, "taskexploredarea"), XS__taskexploredarea, file); + newXS(strcpy(buf, "taskselector"), XS__taskselector, file); + newXS(strcpy(buf, "task_setselector"), XS__task_setselector, file); + newXS(strcpy(buf, "tasktimeleft"), XS__tasktimeleft, file); + newXS(strcpy(buf, "toggle_spawn_event"), XS__toggle_spawn_event, file); + newXS(strcpy(buf, "toggledoorstate"), XS__toggledoorstate, file); + newXS(strcpy(buf, "traindisc"), XS__traindisc, file); + newXS(strcpy(buf, "traindiscs"), XS__traindiscs, file); + newXS(strcpy(buf, "unique_spawn"), XS__unique_spawn, file); + newXS(strcpy(buf, "unscribespells"), XS__unscribespells, file); + newXS(strcpy(buf, "untraindiscs"), XS__untraindiscs, file); + newXS(strcpy(buf, "updatespawntimer"), XS__UpdateSpawnTimer, file); + newXS(strcpy(buf, "updatetaskactivity"), XS__updatetaskactivity, file); + newXS(strcpy(buf, "UpdateZoneHeader"), XS__UpdateZoneHeader, file); + newXS(strcpy(buf, "varlink"), XS__varlink, file); + newXS(strcpy(buf, "voicetell"), XS__voicetell, file); + newXS(strcpy(buf, "we"), XS__we, file); + newXS(strcpy(buf, "wearchange"), XS__wearchange, file); + newXS(strcpy(buf, "write"), XS__write, file); + newXS(strcpy(buf, "ze"), XS__ze, file); + newXS(strcpy(buf, "zone"), XS__zone, file); - XSRETURN_YES; + XSRETURN_YES; } #endif From 3443d8eb25598e5ae4609bca5343ea0e6783e667 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 2 Jul 2018 01:03:02 -0500 Subject: [PATCH 257/670] Upload lua-doc-parser.pl --- utils/scripts/lua-doc-parser.pl | 225 +++++++++++++++++++++++++++++++ utils/scripts/perl-doc-parser.pl | 6 + zone/lua_client.cpp | 6 +- 3 files changed, 233 insertions(+), 4 deletions(-) create mode 100644 utils/scripts/lua-doc-parser.pl diff --git a/utils/scripts/lua-doc-parser.pl b/utils/scripts/lua-doc-parser.pl new file mode 100644 index 000000000..4a9e9862d --- /dev/null +++ b/utils/scripts/lua-doc-parser.pl @@ -0,0 +1,225 @@ +#!/usr/bin/perl + +# Author: Akkadius +# @file: lua-doc-parser.pl +# @description: Script meant to parse the source code to build the LUA API list + +use File::Find; +use Data::Dumper; + +sub usage() { + print "Usage:\n"; + print " --client - Prints methods for just client class methods\n"; + print " --mob - Prints methods for just mob class methods\n"; + print " --npc - Prints methods for just npc class methods\n"; + print " --entity - Prints methods for just entity class methods\n"; + print " --entity_list - Prints methods for just entity_list class methods\n"; + print " --door - Prints methods for just door class methods\n"; + print " --object - Prints methods for just object class methods\n"; + print " --group - Prints methods for just group class methods\n"; + print " --raid - Prints methods for just raid class methods\n"; + print " --item - Prints methods for just item class methods\n"; + print " --iteminst - Prints methods for just iteminst class methods\n"; + print " --inventory - Prints methods for just inventory class methods\n"; + print " --corpse - Prints methods for just corpse class methods\n"; + print " --hate_entry - Prints methods for just hate_entry class methods\n"; + print " --quest - Prints methods for just quest class methods\n"; + print " --spell - Prints methods for just spell class methods\n"; + print " --spawn - Prints methods for just spawn class methods\n"; + print " --packet - Prints methods for just packet class methods\n"; + print " --stat_bonuses - Prints methods for just stat_bonuses class methods\n"; + print " --all - Prints methods for all classes\n"; + exit(1); +} + +if($#ARGV < 0) { + usage(); +} + +my $export = $ARGV[0]; +$export=~s/--//g; + +my $export_file_search = $export; + +if ($export eq "quest") { + $export_file_search = "lua_general"; +} + +my @files; +my $start_dir = "zone/"; +find( + sub { push @files, $File::Find::name unless -d; }, + $start_dir +); +for my $file (@files) { + + #::: Skip non lua.cpp files + if($file!~/lua_/i || $file!~/cpp/i){ + next; + } + + #::: If we are specifying a specific class type, skip everything else + if ($export ne "all" && $export ne "") { + if ($file!~/$export_file_search\.cpp/i) { + next; + } + } + + @methods = (); + $split_key = ""; + $object_prefix = ""; + + #::: Client Export + if ($export=~/all|client/i && $file=~/_client/i) { + $split_key = "Client::"; + $object_prefix = "client:"; + } + + #::: Mob Export + if ($export=~/all|mob/i && $file=~/_mob/i) { + $split_key = "Mob::"; + $object_prefix = "mob:"; + } + + #::: NPC Export + if ($export=~/all|npc/i && $file=~/_npc/i) { + $split_key = "NPC::"; + $object_prefix = "npc:"; + } + + #::: Object Export + if ($export=~/all|object/i && $file=~/_object/i) { + $split_key = "Object::"; + $object_prefix = "object:"; + } + + #::: Door Export + if ($export=~/all|door/i && $file=~/_door/i) { + $split_key = "Door::"; + $object_prefix = "door:"; + } + + #::: Entity Export + if ($export=~/all|entity/i && $file=~/_entity/i) { + $split_key = "Entity::"; + $object_prefix = "entity:"; + } + + #::: Entity List Export + if ($export=~/all|entity_list/i && $file=~/_entity_list/i) { + $split_key = "EntityList::"; + $object_prefix = "entity_list:"; + } + + #::: Group + if ($export=~/all|group/i && $file=~/_group/i) { + $split_key = "Group::"; + $object_prefix = "group:"; + } + + #::: Raid + if ($export=~/all|raid/i && $file=~/_raid/i) { + $split_key = "Raid::"; + $object_prefix = "raid:"; + } + + #::: Corpse + if ($export=~/all|corpse/i && $file=~/_corpse/i) { + $split_key = "Corpse::"; + $object_prefix = "corpse:"; + } + + #::: Hateentry + if ($export=~/all|hate_entry/i && $file=~/_hate_entry/i) { + $split_key = "HateEntry::"; + $object_prefix = "hate_entry:"; + } + + #::: Spell + if ($export=~/all|spell/i && $file=~/_spell/i) { + $split_key = "Spell::"; + $object_prefix = "spell:"; + } + + #::: Spawn + if ($export=~/all|spawn/i && $file=~/_spawn/i) { + $split_key = "Spawn::"; + $object_prefix = "spawn:"; + } + + #::: StatBonuses + if ($export=~/all|stat_bonuses/i && $file=~/stat_bonuses/i) { + $split_key = "StatBonuses::"; + $object_prefix = "statbonuses:"; + } + + #::: Item + if ($export=~/all|item/i && $file=~/_item/i) { + $split_key = "Item::"; + $object_prefix = "item:"; + } + + #::: ItemInst + if ($export=~/all|iteminst/i && $file=~/_iteminst/i) { + $split_key = "ItemInst::"; + $object_prefix = "iteminst:"; + } + + #::: Inventory + if ($export=~/all|inventory/i && $file=~/_inventory/i) { + $split_key = "Inventory::"; + $object_prefix = "inventory:"; + } + + #::: Packet + if ($export=~/all|packet/i && $file=~/_packet/i) { + $split_key = "Packet::"; + $object_prefix = "packet:"; + } + + #::: Quest + if ($export=~/all|quest/i && $file=~/lua_general/i) { + $split_key = " lua_"; + $object_prefix = "eq."; + } + + #::: Open File + print "\nOpening '" . $file . "'\n"; + + if ($split_key eq "") { + next; + } + + open (FILE, $file); + while () { + chomp; + $line = $_; + + @data = split(" ", $line); + + if ((lc(substr($data[1], 0, 4)) eq "lua_") && $line!~/luabind/i && $line!~/return |#ifdef|struct /i) { + #::: Get return type + $return_type = trim($data[0]); + + @method_split = split($split_key, $line); + @method_end = split("{", $method_split[1]); + + $method = $object_prefix . trim($method_end[0]) . "; -- " . $return_type . "\n"; + + push @methods, $method; + } + } + + @methods = sort @methods; + foreach $method (@methods) { + print $method; + } +} + +#::: Trim Whitespaces +sub trim { + my $string = $_[0]; + $string =~ s/^\s+//; + $string =~ s/\s+$//; + return $string; +} \ No newline at end of file diff --git a/utils/scripts/perl-doc-parser.pl b/utils/scripts/perl-doc-parser.pl index 295ba96a4..30cf6e116 100755 --- a/utils/scripts/perl-doc-parser.pl +++ b/utils/scripts/perl-doc-parser.pl @@ -1,3 +1,9 @@ +#!/usr/bin/perl + +# Author: Akkadius +# @file: perl-doc-parser.pl +# @description: Script meant to parse the source code to build the Perl API list + use File::Find; use Data::Dumper; diff --git a/zone/lua_client.cpp b/zone/lua_client.cpp index 45ea8472e..7a8d954d8 100644 --- a/zone/lua_client.cpp +++ b/zone/lua_client.cpp @@ -725,14 +725,12 @@ void Lua_Client::SummonItem(uint32 item_id, int charges, uint32 aug1, uint32 aug self->SummonItem(item_id, charges, aug1, aug2, aug3, aug4, aug5); } -void Lua_Client::SummonItem(uint32 item_id, int charges, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5, - bool attuned) { +void Lua_Client::SummonItem(uint32 item_id, int charges, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5, bool attuned) { Lua_Safe_Call_Void(); self->SummonItem(item_id, charges, aug1, aug2, aug3, aug4, aug5, 0, attuned); } -void Lua_Client::SummonItem(uint32 item_id, int charges, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5, - bool attuned, int to_slot) { +void Lua_Client::SummonItem(uint32 item_id, int charges, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5, bool attuned, int to_slot) { Lua_Safe_Call_Void(); self->SummonItem(item_id, charges, aug1, aug2, aug3, aug4, aug5, 0, attuned, to_slot); } From 2d7267cb4e612a9d5b835a1385d339946f7c95be Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 2 Jul 2018 01:15:00 -0500 Subject: [PATCH 258/670] Add file export to lua-api.md --- utils/scripts/lua-doc-parser.pl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/utils/scripts/lua-doc-parser.pl b/utils/scripts/lua-doc-parser.pl index 4a9e9862d..a5608944a 100644 --- a/utils/scripts/lua-doc-parser.pl +++ b/utils/scripts/lua-doc-parser.pl @@ -36,6 +36,10 @@ if($#ARGV < 0) { usage(); } +#::: Open File +my $filename = 'lua-api.md'; +open(my $fh, '>', $filename) or die "Could not open file '$filename' $!"; + my $export = $ARGV[0]; $export=~s/--//g; @@ -210,12 +214,24 @@ for my $file (@files) { } } + #::: Header + $header = $split_key; + $header =~s/:://g; + + print $fh "# " . $header . "\n"; + print $fh "```lua\n"; + @methods = sort @methods; foreach $method (@methods) { + print $fh $method; print $method; } + + print $fh "```\n\n"; } +close $fh; + #::: Trim Whitespaces sub trim { my $string = $_[0]; From 0ea82b5d88709a25262aae878cd3ceeaae2462b4 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Mon, 2 Jul 2018 22:01:17 -0400 Subject: [PATCH 259/670] Bunch more work on fixing up DB and packets --- common/CMakeLists.txt | 2 + common/base_packet.h | 2 + common/eq_packet.h | 1 + common/serialize_buffer.cpp | 23 ++ common/serialize_buffer.h | 186 ++++++++++++++++ utils/sql/git/required/tasks_revamp.sql | 14 ++ zone/tasks.cpp | 284 ++++++++++-------------- zone/tasks.h | 10 +- 8 files changed, 360 insertions(+), 162 deletions(-) create mode 100644 common/serialize_buffer.cpp create mode 100644 common/serialize_buffer.h diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 8a9d2c673..f3171d185 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -61,6 +61,7 @@ SET(common_sources rdtsc.cpp rulesys.cpp say_link.cpp + serialize_buffer.cpp serverinfo.cpp shareddb.cpp skills.cpp @@ -192,6 +193,7 @@ SET(common_headers ruletypes.h say_link.h seperator.h + serialize_buffer.h serverinfo.h servertalk.h shareddb.h diff --git a/common/base_packet.h b/common/base_packet.h index bdd774aa2..8d64e6d62 100644 --- a/common/base_packet.h +++ b/common/base_packet.h @@ -63,6 +63,8 @@ public: void WriteFloat(float value) { *(float *)(pBuffer + _wpos) = value; _wpos += sizeof(float); } void WriteDouble(double value) { *(double *)(pBuffer + _wpos) = value; _wpos += sizeof(double); } void WriteString(const char * str) { uint32 len = static_cast(strlen(str)) + 1; memcpy(pBuffer + _wpos, str, len); _wpos += len; } + // this is used in task system a lot, it is NOT null-termed + void WriteLengthString(uint32 len, const char *str) { *(uint32 *)(pBuffer + _wpos) = len; _wpos += sizeof(uint32); memcpy(pBuffer + _wpos, str, len); _wpos += len; } void WriteData(const void *ptr, size_t n) { memcpy(pBuffer + _wpos, ptr, n); _wpos += n; } uint8 ReadUInt8() { uint8 value = *(uint8 *)(pBuffer + _rpos); _rpos += sizeof(uint8); return value; } diff --git a/common/eq_packet.h b/common/eq_packet.h index 1fea3b9d1..29588cbc1 100644 --- a/common/eq_packet.h +++ b/common/eq_packet.h @@ -20,6 +20,7 @@ #include "base_packet.h" #include "platform.h" +#include "serialize_buffer.h" #include #ifdef STATIC_OPCODE diff --git a/common/serialize_buffer.cpp b/common/serialize_buffer.cpp new file mode 100644 index 000000000..065bd9f2d --- /dev/null +++ b/common/serialize_buffer.cpp @@ -0,0 +1,23 @@ +#include "serialize_buffer.h" + +void SerializeBuffer::Grow(size_t new_size) +{ + assert(new_size > m_capacity); + auto new_buffer = new unsigned char[new_size * 2]; + memset(new_buffer, 0, new_size * 2); + + if (m_buffer) + memcpy(new_buffer, m_buffer, m_capacity); + m_capacity = new_size * 2; + delete[] m_buffer; + m_buffer = new_buffer; +} + +void SerializeBuffer::Reset() +{ + delete[] m_buffer; + m_buffer = nullptr; + m_capacity = 0; + m_pos = 0; +} + diff --git a/common/serialize_buffer.h b/common/serialize_buffer.h new file mode 100644 index 000000000..665a76d3a --- /dev/null +++ b/common/serialize_buffer.h @@ -0,0 +1,186 @@ +#ifndef SERIALIZE_BUFFER_H +#define SERIALIZE_BUFFER_H + +#include +#include +#include +#include + +class SerializeBuffer +{ +public: + SerializeBuffer() : m_buffer(nullptr), m_capacity(0), m_pos(0) {} + + explicit SerializeBuffer(size_t size) : m_capacity(size), m_pos(0) + { + m_buffer = new unsigned char[size]; + memset(m_buffer, 0, size); + } + + SerializeBuffer(const SerializeBuffer &rhs) + : m_buffer(new unsigned char[rhs.m_capacity]), m_capacity(rhs.m_capacity), m_pos(rhs.m_pos) + { + memcpy(m_buffer, rhs.m_buffer, rhs.m_capacity); + } + + SerializeBuffer &operator=(const SerializeBuffer &rhs) + { + if (this != &rhs) { + delete[] m_buffer; + m_buffer = new unsigned char[rhs.m_capacity]; + m_capacity = rhs.m_capacity; + m_pos = rhs.m_pos; + memcpy(m_buffer, rhs.m_buffer, m_capacity); + } + return *this; + } + + SerializeBuffer(SerializeBuffer &&rhs) : m_buffer(rhs.m_buffer), m_capacity(rhs.m_capacity), m_pos(rhs.m_pos) + { + rhs.m_buffer = nullptr; + rhs.m_capacity = 0; + rhs.m_pos = 0; + } + + SerializeBuffer &operator=(SerializeBuffer &&rhs) + { + if (this != &rhs) { + delete[] m_buffer; + + m_buffer = rhs.m_buffer; + m_capacity = rhs.m_capacity; + m_pos = rhs.m_pos; + + rhs.m_buffer = nullptr; + rhs.m_capacity = 0; + rhs.m_pos = 0; + } + return *this; + } + + ~SerializeBuffer() { delete[] m_buffer; } + + void WriteUInt8(uint8_t v) + { + if (m_pos + sizeof(uint8_t) > m_capacity) + Grow(m_capacity + sizeof(uint8_t)); + *(uint8_t *)(m_buffer + m_pos) = v; + m_pos += sizeof(uint8_t); + } + + void WriteUInt16(uint16_t v) + { + if (m_pos + sizeof(uint16_t) > m_capacity) + Grow(m_capacity + sizeof(uint16_t)); + *(uint16_t *)(m_buffer + m_pos) = v; + m_pos += sizeof(uint16_t); + } + + void WriteUInt32(uint32_t v) + { + if (m_pos + sizeof(uint32_t) > m_capacity) + Grow(m_capacity + sizeof(uint32_t)); + *(uint32_t *)(m_buffer + m_pos) = v; + m_pos += sizeof(uint32_t); + } + + void WriteUInt64(uint64_t v) + { + if (m_pos + sizeof(uint64_t) > m_capacity) + Grow(m_capacity + sizeof(uint64_t)); + *(uint64_t *)(m_buffer + m_pos) = v; + m_pos += sizeof(uint64_t); + } + + void WriteInt8(int8_t v) + { + if (m_pos + sizeof(int8_t) > m_capacity) + Grow(m_capacity + sizeof(int8_t)); + *(int8_t *)(m_buffer + m_pos) = v; + m_pos += sizeof(int8_t); + } + + void WriteInt16(int16_t v) + { + if (m_pos + sizeof(int16_t) > m_capacity) + Grow(m_capacity + sizeof(int16_t)); + *(int16_t *)(m_buffer + m_pos) = v; + m_pos += sizeof(int16_t); + } + + void WriteInt32(int32_t v) + { + if (m_pos + sizeof(int32_t) > m_capacity) + Grow(m_capacity + sizeof(int32_t)); + *(int32_t *)(m_buffer + m_pos) = v; + m_pos += sizeof(int32_t); + } + + void WriteInt64(int64_t v) + { + if (m_pos + sizeof(int64_t) > m_capacity) + Grow(m_capacity + sizeof(int64_t)); + *(int64_t *)(m_buffer + m_pos) = v; + m_pos += sizeof(int64_t); + } + + void WriteFloat(float v) + { + if (m_pos + sizeof(float) > m_capacity) + Grow(m_capacity + sizeof(float)); + *(float *)(m_buffer + m_pos) = v; + m_pos += sizeof(float); + } + + void WriteDouble(double v) + { + if (m_pos + sizeof(double) > m_capacity) + Grow(m_capacity + sizeof(double)); + *(double *)(m_buffer + m_pos) = v; + m_pos += sizeof(double); + } + + void WriteString(const char *str) + { + assert(str != nullptr); + auto len = strlen(str) + 1; + if (m_pos + len > m_capacity) + Grow(m_capacity + len); + memcpy(m_buffer + m_pos, str, len); + m_pos += len; + } + + void WriteString(const std::string &str) + { + auto len = str.length() + 1; + if (m_pos + len > m_capacity) + Grow(m_capacity + len); + memcpy(m_buffer + m_pos, str.c_str(), len); + m_pos += len; + } + + void WriteLengthString(uint32_t len, const char *str) + { + assert(str != nullptr); + if (m_pos + len + sizeof(uint32_t) > m_capacity) + Grow(m_capacity + len + sizeof(uint32_t)); + *(uint32_t *)(m_buffer + m_pos) = len; + m_pos += sizeof(uint32_t); + memcpy(m_buffer + m_pos, str, len); + m_pos += len; + } + + size_t size() const { return m_pos; } + size_t length() const { return size(); } + size_t capacity() const { return m_capacity; } + const unsigned char *buffer() const { return m_buffer; } + +private: + void Grow(size_t new_size); + void Reset(); + unsigned char *m_buffer; + size_t m_capacity; + size_t m_pos; +}; + +#endif /* !SERIALIZE_BUFFER_H */ diff --git a/utils/sql/git/required/tasks_revamp.sql b/utils/sql/git/required/tasks_revamp.sql index 4e1452fcc..bd751e12c 100644 --- a/utils/sql/git/required/tasks_revamp.sql +++ b/utils/sql/git/required/tasks_revamp.sql @@ -3,3 +3,17 @@ ALTER TABLE `tasks` ADD `duration_code` TINYINT NOT NULL DEFAULT '0' AFTER `dura UPDATE `tasks` SET `type` = '2'; -- we were treating them all as quests ALTER TABLE `character_tasks` ADD `type` TINYINT NOT NULL DEFAULT '0' AFTER `slot`; UPDATE `character_tasks` SET `type` = '2'; -- we were treating them all as quests +ALTER TABLE `activities` ADD `target_name` VARCHAR(64) NOT NULL DEFAULT '' AFTER `activitytype`; +ALTER TABLE `activities` ADD `item_list` VARCHAR(128) NOT NULL DEFAULT '' AFTER `target_name`; +ALTER TABLE `activities` ADD `skill_list` VARCHAR(64) NOT NULL DEFAULT '-1' AFTER `item_list`; +ALTER TABLE `activities` ADD `spell_list` VARCHAR(64) NOT NULL DEFAULT '0' AFTER `skill_list`; +ALTER TABLE `activities` ADD `description_override` VARCHAR(128) NOT NULL DEFAULT '' AFTER `spell_list`; +ALTER TABLE `activities` ADD `zones` VARCHAR(64) NOT NULL DEFAULT '' AFTER `zoneid`; +UPDATE `activities` SET `description_override` = `text3`; +UPDATE `activities` SET `target_name` = `text1`; +UPDATE `activities` SET `item_list` = `text2`; +UPDATE `activities` SET `zones` = `zoneid`; -- should be safe for us ... +ALTER TABLE `activities` DROP COLUMN `text1`; +ALTER TABLE `activities` DROP COLUMN `text2`; +ALTER TABLE `activities` DROP COLUMN `text3`; +ALTER TABLE `activities` DROP COLUMN `zoneid`; diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 15458c22e..9e82b1db5 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -172,21 +172,19 @@ bool TaskManager::LoadTasks(int singleTask) } if (singleTask == 0) - query = StringFormat("SELECT `taskid`, `step`, `activityid`, `activitytype`, " - "`text1`, `text2`, `text3`, `goalid`, `goalmethod`, " - "`goalcount`, `delivertonpc`, `zoneid`, `optional` " - "FROM `activities` " - "WHERE `taskid` < %i AND `activityid` < %i " - "ORDER BY taskid, activityid ASC", - MAXTASKS, MAXACTIVITIESPERTASK); + query = + StringFormat("SELECT `taskid`, `step`, `activityid`, `activitytype`, `target_name`, `item_list`, " + "`skill_list`, `spell_list`, `description_override`, `goalid`, `goalmethod`, " + "`goalcount`, `delivertonpc`, `zones`, `optional` FROM `activities` WHERE `taskid` < " + "%i AND `activityid` < %i ORDER BY taskid, activityid ASC", + MAXTASKS, MAXACTIVITIESPERTASK); else - query = StringFormat("SELECT `taskid`, `step`, `activityid`, `activitytype`, " - "`text1`, `text2`, `text3`, `goalid`, `goalmethod`, " - "`goalcount`, `delivertonpc`, `zoneid`, `optional` " - "FROM `activities` " - "WHERE `taskid` = %i AND `activityid` < %i " - "ORDER BY taskid, activityid ASC", - singleTask, MAXACTIVITIESPERTASK); + query = + StringFormat("SELECT `taskid`, `step`, `activityid`, `activitytype`, `target_name`, `item_list`, " + "`skill_list`, `spell_list`, `description_override`, `goalid`, `goalmethod`, " + "`goalcount`, `delivertonpc`, `zones`, `optional` FROM `activities` WHERE `taskid` = " + "%i AND `activityid` < %i ORDER BY taskid, activityid ASC", + singleTask, MAXACTIVITIESPERTASK); results = database.QueryDatabase(query); if (!results.Success()) { Log(Logs::General, Logs::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str()); @@ -237,38 +235,42 @@ bool TaskManager::LoadTasks(int singleTask) Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Type = atoi(row[3]); - if (row[4][0]) - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text1 = row[4]; + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].target_name = row[4]; + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].item_list = row[5]; + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].skill_list = row[6]; + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].skill_id = atoi(row[6]); // for older clients + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].spell_list = row[7]; + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].spell_id = atoi(row[7]); // for older clients + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].desc_override = row[8]; - if (row[5][0]) - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text2 = row[5]; - - if (row[6][0]) - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text3 = row[6]; - - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].GoalID = atoi(row[7]); - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].GoalMethod = (TaskMethodType)atoi(row[8]); - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].GoalCount = atoi(row[9]); - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].DeliverToNPC = atoi(row[10]); - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].ZoneID = atoi(row[11]); - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Optional = atoi(row[12]); + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].GoalID = atoi(row[9]); + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].GoalMethod = (TaskMethodType)atoi(row[10]); + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].GoalCount = atoi(row[11]); + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].DeliverToNPC = atoi(row[12]); + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].zones = row[13]; + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].ZoneID = atoi(row[13]); // for older clients + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Optional = atoi(row[14]); Log(Logs::General, Logs::Tasks, "[GLOBALLOAD] Activity Slot %2i: ID %i for Task %5i. Type: %3i, GoalID: %8i, " - "GoalMethod: %i, GoalCount: %3i, ZoneID:%3i", + "GoalMethod: %i, GoalCount: %3i, Zones:%s", Tasks[taskID]->ActivityCount, activityID, taskID, Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Type, Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].GoalID, Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].GoalMethod, Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].GoalCount, - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].ZoneID); + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].zones.c_str()); - Log(Logs::General, Logs::Tasks, "[GLOBALLOAD] Text1: %s", - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text1.c_str()); - Log(Logs::General, Logs::Tasks, "[GLOBALLOAD] Text2: %s", - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text2.c_str()); - Log(Logs::General, Logs::Tasks, "[GLOBALLOAD] Text3: %s", - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Text3.c_str()); + Log(Logs::General, Logs::Tasks, "[GLOBALLOAD] target_name: %s", + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].target_name.c_str()); + Log(Logs::General, Logs::Tasks, "[GLOBALLOAD] item_list: %s", + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].item_list.c_str()); + Log(Logs::General, Logs::Tasks, "[GLOBALLOAD] skill_list: %s", + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].skill_list.c_str()); + Log(Logs::General, Logs::Tasks, "[GLOBALLOAD] spell_list: %s", + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].spell_list.c_str()); + Log(Logs::General, Logs::Tasks, "[GLOBALLOAD] description_override: %s", + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].desc_override.c_str()); Tasks[taskID]->ActivityCount++; } @@ -1155,110 +1157,88 @@ void TaskManager::SendTaskSelector(Client *c, Mob *mob, int TaskCount, int *Task } -void TaskManager::SendTaskSelectorNew(Client *c, Mob *mob, int TaskCount, int *TaskList) { - +void TaskManager::SendTaskSelectorNew(Client *c, Mob *mob, int TaskCount, int *TaskList) +{ Log(Logs::General, Logs::Tasks, "[UPDATE] TaskSelector for %i Tasks", TaskCount); int PlayerLevel = c->GetLevel(); // Check if any of the tasks exist - for(int i=0; iIsTaskActive(TaskList[i])) continue; - - if(!IsTaskRepeatable(TaskList[i]) && c->IsTaskCompleted(TaskList[i])) continue; + for (int i = 0; i < TaskCount; i++) { + if (!AppropriateLevel(TaskList[i], PlayerLevel)) + continue; + if (c->IsTaskActive(TaskList[i])) + continue; + if (!IsTaskRepeatable(TaskList[i]) && c->IsTaskCompleted(TaskList[i])) + continue; ValidTasks++; - - PacketLength += 21; // Task Data - strings - PacketLength += Tasks[TaskList[i]]->Title.size() + 1 + - Tasks[TaskList[i]]->Description.size() + 1; - - sprintf(StartZone, "%i", Tasks[TaskList[i]]->StartZone); - /* - PacketLength += strlen(Tasks[TaskList[i]]->Activity[ActivityID].Text1) + 1 + - strlen(Tasks[TaskList[i]]->Activity[ActivityID].Text2) + - strlen(Tasks[TaskList[i]]->Activity[ActivityID].Text3) + 1 + - strlen(itoa(Tasks[TaskList[i]]->Activity[ActivityID].ZoneID)) + 1 + - 3 + 3 + 5; // Other strings (Hard set for now) - */ - PacketLength += 11 + 11 + 11 + 3 + 3 + (strlen(StartZone) * 2) + 2; // Other strings (Hard set for now) - PacketLength += 28; // Activity Data - strings (Hard set for 1 activity per task for now) } - if(ValidTasks == 0) return; + if (ValidTasks == 0) + return; - auto outapp = new EQApplicationPacket(OP_OpenNewTasksWindow, PacketLength); + SerializeBuffer buf(50 * ValidTasks); - outapp->WriteUInt32(ValidTasks); // TaskCount - outapp->WriteUInt32(2); // Type, valid values: 0-3. 0 = Task, 1 = Shared Task, 2 = Quest, 3 = ??? + buf.WriteUInt32(ValidTasks); // TaskCount + buf.WriteUInt32(2); // Type, valid values: 0-3. 0 = Task, 1 = Shared Task, 2 = Quest, 3 = ??? -- should fix maybe some day, but we let more than 1 type through :P // so I guess an NPC can only offer one type of quests or we can only open a selection with one type :P (so quest call can tell us I guess) // this is also sent in OP_TaskDescription - outapp->WriteUInt32(mob->GetID()); // TaskGiver + buf.WriteUInt32(mob->GetID()); // TaskGiver - for(int i=0; iIsTaskActive(TaskList[i])) + continue; + if (!IsTaskRepeatable(TaskList[i]) && c->IsTaskCompleted(TaskList[i])) + continue; - if(!AppropriateLevel(TaskList[i], PlayerLevel)) continue; + buf.WriteUInt32(TaskList[i]); // TaskID + buf.WriteFloat(1.0f); // affects color, difficulty? + buf.WriteUInt32(Tasks[TaskList[i]]->Duration); + buf.WriteUInt32(static_cast(Tasks[TaskList[i]]->dur_code)); // 1 = Short, 2 = Medium, 3 = Long, anything else Unlimited - if(c->IsTaskActive(TaskList[i])) continue; + buf.WriteString(Tasks[TaskList[i]]->Title.c_str()); // max 64 with null + buf.WriteString(Tasks[TaskList[i]]->Description.c_str()); // max 4000 with null - if(!IsTaskRepeatable(TaskList[i]) && c->IsTaskCompleted(TaskList[i])) continue; + buf.WriteUInt8(0); // Has reward set flag + buf.WriteUInt32(Tasks[TaskList[i]]->ActivityCount); // ActivityCount - outapp->WriteUInt32(TaskList[i]); // TaskID - outapp->WriteFloat(1.0f); // affects color, difficulty? - outapp->WriteUInt32(Tasks[TaskList[i]]->Duration); - outapp->WriteUInt32(static_cast(Tasks[TaskList[i]]->dur_code)); // 1 = Short, 2 = Medium, 3 = Long, anything else Unlimited + for (int j = 0; j < Tasks[TaskList[i]]->ActivityCount; ++j) { + buf.WriteUInt32(j); // ActivityNumber + auto &activity = Tasks[TaskList[i]]->Activity[j]; + buf.WriteUInt32(activity.Type); // ActivityType + buf.WriteUInt32(0); // solo, group, raid? + buf.WriteString(activity.target_name); // max length 64, "target name" so like loot x foo from bar (this is bar) - outapp->WriteString(Tasks[TaskList[i]]->Title.c_str()); // max 64 with null - outapp->WriteString(Tasks[TaskList[i]]->Description.c_str()); // max 4000 with null + // this string is item names + buf.WriteLengthString(activity.item_list.length(), activity.item_list.c_str()); - outapp->WriteUInt8(0); // Has reward set flag - outapp->WriteUInt32(1); // ActivityCount - Hard set to 1 for now + buf.WriteUInt32(activity.GoalCount); // GoalCount - // Activity stuff below - Will need to iterate through each task - // Currently hard set for testing + // this string is skill IDs? probably one of the "use on" tasks + buf.WriteLengthString(activity.skill_list.length(), activity.skill_list.c_str()); + // this string is spell IDs? probably one of the "use on" tasks + buf.WriteLengthString(activity.spell_list.length(), activity.spell_list.c_str()); - sprintf(StartZone, "%i", Tasks[TaskList[i]]->StartZone); - - outapp->WriteUInt32(0); // ActivityNumber - outapp->WriteUInt32(1); // ActivityType - outapp->WriteUInt32(0); // solo, group, raid? - outapp->WriteString("Text1 Test"); // max length 64 -- affects what string ID it will use for the description, should be a name here? - - // this string is item names - outapp->WriteUInt32(11); // Text2Len - outapp->WriteString("Text2 Test"); - - outapp->WriteUInt32(1); // GoalCount - - // this string is skill IDs? probably one of the "use on" tasks - outapp->WriteUInt32(3); // NumString1Len - outapp->WriteString("-1"); - - // this string is spell IDs? probably one of the "use on" tasks - outapp->WriteUInt32(3); // NumString2Len - outapp->WriteString("-1"); - - //outapp->WriteString(itoa(Tasks[TaskList[i]]->Activity[ActivityID].ZoneID)); - outapp->WriteString(StartZone); // Zone number in ascii max length 64, can be multiple with separated by ; - outapp->WriteString("Text3 Test"); // max length 128 -- overrides the automatic descriptions - outapp->WriteString(StartZone); // Zone number in ascii max length 64, probably can be separated by ; too, haven't found it used + //buf.WriteString(itoa(Tasks[TaskList[i]]->Activity[ActivityID].ZoneID)); + buf.WriteString(activity.zones); // Zone number in ascii max length 64, can be multiple with separated by ; + buf.WriteString(activity.desc_override); // max length 128 -- overrides the automatic descriptions + // this doesn't appear to be shown to the client at all and isn't the same as zones ... defaults to '0' though + buf.WriteString(activity.zones); // Zone number in ascii max length 64, probably can be separated by ; too, haven't found it used + } } + auto outapp = new EQApplicationPacket(OP_OpenNewTasksWindow, buf.buffer(), buf.length()); + c->QueuePacket(outapp); safe_delete(outapp); @@ -2609,12 +2589,12 @@ void TaskManager::SendTaskActivityLong(Client *c, int TaskID, int ActivityID, in tah->ActivityID = ActivityID; tah->unknown3 = 0x00000000; - // We send our 'internal' types as ActivityUse1. text3 should be set to the activity description, so it makes + // We send our 'internal' types as ActivityCastOn. text3 should be set to the activity description, so it makes // no difference to the client. All activity updates will be done based on our interal activity types. if((Tasks[TaskID]->Activity[ActivityID].Type > 0) && Tasks[TaskID]->Activity[ActivityID].Type < 100) tah->ActivityType = Tasks[TaskID]->Activity[ActivityID].Type; else - tah->ActivityType = ActivityUse1; + tah->ActivityType = ActivityCastOn; tah->Optional = Optional; tah->unknown5 = 0x00000000; @@ -2667,77 +2647,59 @@ void TaskManager::SendTaskActivityLong(Client *c, int TaskID, int ActivityID, in } // Used only by RoF+ Clients -void TaskManager::SendTaskActivityNew(Client *c, int TaskID, int ActivityID, int ClientTaskIndex, bool Optional, bool TaskComplete) { +void TaskManager::SendTaskActivityNew(Client *c, int TaskID, int ActivityID, int ClientTaskIndex, bool Optional, bool TaskComplete) +{ + SerializeBuffer buf(100); - uint32 String2Len = 3; - if(TaskComplete) - String2Len = 4; + buf.WriteUInt32(ClientTaskIndex); // TaskSequenceNumber + buf.WriteUInt32(static_cast(Tasks[TaskID]->type)); // task type + buf.WriteUInt32(TaskID); + buf.WriteUInt32(ActivityID); + buf.WriteUInt32(0); // unknown3 - long PacketLength = 29 + 4 + 8 + 4 + 4 + 5; - PacketLength = PacketLength + Tasks[TaskID]->Activity[ActivityID].Text1.size() + 1 + - Tasks[TaskID]->Activity[ActivityID].Text2.size() + 1 + - Tasks[TaskID]->Activity[ActivityID].Text3.size() + 1 + - ((strlen(itoa(Tasks[TaskID]->Activity[ActivityID].ZoneID)) + 1) * 2) + - 3 + String2Len; - - auto outapp = new EQApplicationPacket(OP_TaskActivity, PacketLength); - - outapp->WriteUInt32(ClientTaskIndex); // TaskSequenceNumber - outapp->WriteUInt32(static_cast(Tasks[TaskID]->type)); // task type - outapp->WriteUInt32(TaskID); - outapp->WriteUInt32(ActivityID); - outapp->WriteUInt32(0); // unknown3 - - // We send our 'internal' types as ActivityUse1. text3 should be set to the activity description, so it makes + // We send our 'internal' types as ActivityCastOn. text3 should be set to the activity description, so it makes // no difference to the client. All activity updates will be done based on our interal activity types. if((Tasks[TaskID]->Activity[ActivityID].Type > 0) && Tasks[TaskID]->Activity[ActivityID].Type < 100) - outapp->WriteUInt32(Tasks[TaskID]->Activity[ActivityID].Type); + buf.WriteUInt32(Tasks[TaskID]->Activity[ActivityID].Type); else - outapp->WriteUInt32(ActivityUse1); + buf.WriteUInt32(ActivityCastOn); // w/e! - outapp->WriteUInt32(Optional); - outapp->WriteUInt8(0); // unknown5 + buf.WriteUInt8(Optional); + buf.WriteUInt32(0); // solo, group, raid // One of these unknown fields maybe related to the 'Use On' activity types - outapp->WriteString(Tasks[TaskID]->Activity[ActivityID].Text1.c_str()); + buf.WriteString(Tasks[TaskID]->Activity[ActivityID].target_name); // target name string - outapp->WriteUInt32(Tasks[TaskID]->Activity[ActivityID].Text2.length() + 1); // String Length - Add in null terminator - outapp->WriteString(Tasks[TaskID]->Activity[ActivityID].Text2.c_str()); + buf.WriteLengthString(Tasks[TaskID]->Activity[ActivityID].item_list.length(), Tasks[TaskID]->Activity[ActivityID].item_list.c_str()); // item name list // Goal Count if(Tasks[TaskID]->Activity[ActivityID].Type != ActivityGiveCash) - outapp->WriteUInt32(Tasks[TaskID]->Activity[ActivityID].GoalCount); + buf.WriteUInt32(Tasks[TaskID]->Activity[ActivityID].GoalCount); else - outapp->WriteUInt32(1); // GoalCount + buf.WriteUInt32(1); // GoalCount - outapp->WriteUInt32(3); // String Length - Add in null terminator - outapp->WriteString("-1"); + // skill ID list ; separated + buf.WriteLengthString(Tasks[TaskID]->Activity[ActivityID].skill_list.length(), Tasks[TaskID]->Activity[ActivityID].skill_list.c_str()); - if(!TaskComplete) { - outapp->WriteUInt32(3); // String Length - Add in null terminator - outapp->WriteString("-1"); - } - else - { - outapp->WriteUInt32(4); // String Length - Add in null terminator - outapp->WriteString("-54"); - } + // spelll ID list ; separated -- unsure wtf we're doing here + buf.WriteLengthString(Tasks[TaskID]->Activity[ActivityID].spell_list.length(), Tasks[TaskID]->Activity[ActivityID].spell_list.c_str()); - outapp->WriteString(itoa(Tasks[TaskID]->Activity[ActivityID].ZoneID)); - outapp->WriteUInt32(0); // unknown7 + buf.WriteString(Tasks[TaskID]->Activity[ActivityID].zones); + buf.WriteUInt32(0); // unknown7 - outapp->WriteString(Tasks[TaskID]->Activity[ActivityID].Text3.c_str()); + buf.WriteString(Tasks[TaskID]->Activity[ActivityID].desc_override); // description override if(Tasks[TaskID]->Activity[ActivityID].Type != ActivityGiveCash) - outapp->WriteUInt32(c->GetTaskActivityDoneCount(ClientTaskIndex, ActivityID)); // DoneCount + buf.WriteUInt32(c->GetTaskActivityDoneCount(ClientTaskIndex, ActivityID)); // DoneCount else // For internal activity types, DoneCount is either 1 if the activity is complete, 0 otherwise. - outapp->WriteUInt32((c->GetTaskActivityDoneCount(ClientTaskIndex, ActivityID) >= Tasks[TaskID]->Activity[ActivityID].GoalCount)); + buf.WriteUInt32((c->GetTaskActivityDoneCount(ClientTaskIndex, ActivityID) >= Tasks[TaskID]->Activity[ActivityID].GoalCount)); - outapp->WriteUInt8(1); // unknown9 + buf.WriteUInt8(1); // unknown9 - outapp->WriteString(itoa(Tasks[TaskID]->Activity[ActivityID].ZoneID)); + buf.WriteString(Tasks[TaskID]->Activity[ActivityID].zones); + auto outapp = new EQApplicationPacket(OP_TaskActivity, buf.buffer(), buf.length()); c->QueuePacket(outapp); safe_delete(outapp); diff --git a/zone/tasks.h b/zone/tasks.h index 5fd074300..01c08f4a1 100644 --- a/zone/tasks.h +++ b/zone/tasks.h @@ -105,11 +105,19 @@ struct ActivityInformation { std::string Text1; std::string Text2; std::string Text3; + std::string target_name; // name mob, location -- default empty + std::string item_list; // likely defaults to empty + std::string skill_list; // IDs ; separated -- default -1 + std::string spell_list; // IDs ; separated -- default 0 + std::string desc_override; // overrides auto generated description -- default empty + int skill_id; // older clients, first id from above + int spell_id; // older clients, first id from above int GoalID; TaskMethodType GoalMethod; int GoalCount; int DeliverToNPC; int ZoneID; + std::string zones; // IDs ; searated, ZoneID is the first in this list for older clients -- default empty string bool Optional; }; @@ -154,7 +162,7 @@ struct TaskInformation { typedef enum { ActivityHidden = 0, ActivityActive = 1, ActivityCompleted = 2 } ActivityState; typedef enum { ActivityDeliver = 1, ActivityKill = 2, ActivityLoot = 3, ActivitySpeakWith = 4, ActivityExplore = 5, - ActivityTradeSkill = 6, ActivityFish = 7, ActivityForage = 8, ActivityUse1 = 9, ActivityUse2 = 10, + ActivityTradeSkill = 6, ActivityFish = 7, ActivityForage = 8, ActivityCastOn = 9, ActivitySkillOn = 10, ActivityTouch = 11, ActivityCollect = 13, ActivityGiveCash = 100 } ActivityType; From 2533de1d62ac163a00259a2e8072a52abe1b9964 Mon Sep 17 00:00:00 2001 From: KimLS Date: Mon, 2 Jul 2018 22:08:04 -0700 Subject: [PATCH 260/670] Appveyor scripts that are in use, and added back in the old dependency stuff for windows --- CMakeLists.txt | 28 ++++++++++++++++++++++++++++ appveyor-bots.yml | 22 ++-------------------- appveyor-no-bots.yml | 22 ++-------------------- 3 files changed, 32 insertions(+), 40 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dcd687560..817af542c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,6 +53,34 @@ IF(MSVC OR MINGW) ENDIF(MSVC OR MINGW) IF(MSVC) + IF(CMAKE_CL_64) + SET(ZLIB_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/zlib_x64") + SET(MYSQL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/mysql_x64") + SET(LUA_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/luaj_x64") + SET(OPENSSL_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/openssl_x64") + SET(SODIUM_INCLUDE_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/include") + IF(MSVC_VERSION GREATER 1800) + SET(SODIUM_LIBRARY_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/x64/Release/v140/dynamic") + ELSEIF(MSVC_VERSION EQUAL 1800) + SET(SODIUM_LIBRARY_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/x64/Release/v120/dynamic") + ELSE() + SET(SODIUM_LIBRARY_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/x64/Release/v110/dynamic") + ENDIF() + ELSE(CMAKE_CL_64) + SET(ZLIB_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/zlib_x86") + SET(MYSQL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/mysql_x86") + SET(LUA_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/luaj_x86") + SET(SODIUM_INCLUDE_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/include") + SET(OPENSSL_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/openssl_x86") + IF(MSVC_VERSION GREATER 1800) + SET(SODIUM_LIBRARY_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/Win32/Release/v140/dynamic") + ELSEIF(MSVC_VERSION EQUAL 1800) + SET(SODIUM_LIBRARY_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/Win32/Release/v120/dynamic") + ELSE() + SET(SODIUM_LIBRARY_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/Win32/Release/v110/dynamic") + ENDIF() + ENDIF(CMAKE_CL_64) + #disable CRT warnings on windows cause they're annoying as shit and we use C functions everywhere OPTION(EQEMU_DISABLE_CRT_SECURE_WARNINGS "Disable Secure CRT Warnings" ON) IF(EQEMU_DISABLE_CRT_SECURE_WARNINGS) diff --git a/appveyor-bots.yml b/appveyor-bots.yml index f7cf48d75..9edb00593 100644 --- a/appveyor-bots.yml +++ b/appveyor-bots.yml @@ -7,27 +7,9 @@ configuration: RelWithDebInfo clone_folder: c:\projects\eqemu init: - ps: git config --global core.autocrlf input +cache: c:\tools\vcpkg\installed\ before_build: -- ps: >- - $wc = New-Object System.Net.WebClient - - $wc.DownloadFile("https://github.com/EQEmu/eqemu.github.com/blob/master/downloads/appveyor/vcpkg-export.7z?raw=true", "c:\projects\eqemu\vcpkg-export.7z") - - $wc.DownloadFile("http://strawberryperl.com/download/5.26.2.1/strawberry-perl-5.26.2.1-64bit-portable.zip", "c:\projects\eqemu\strawberry-perl-5.26.2.1-64bit-portable.zip") - - cd c:\projects\eqemu - - 7z x c:/projects/eqemu/vcpkg-export.7z -oc:/projects/eqemu/vcpkg -y - - 7z x c:/projects/eqemu/strawberry-perl-5.26.2.1-64bit-portable.zip -oc:/projects/eqemu/strawberry-perl-portable -y - - (Get-Content C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE/config.h).replace('#define PERL_STATIC_INLINE static __inline__', '#define PERL_STATIC_INLINE static __inline') | Set-Content C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE/config.h - - mkdir build - - cd build - - cmake -G "Visual Studio 15 2017 Win64" -DEQEMU_BUILD_TESTS=ON -DEQEMU_BUILD_LOGIN=ON -EQEMU_ENABLE_BOTS=ON -DPERL_EXECUTABLE="C:/projects/eqemu/strawberry-perl-portable/perl/bin/perl.exe" -DPERL_INCLUDE_PATH="C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE" -DPERL_LIBRARY="C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE/libperl526.a" -DCMAKE_TOOLCHAIN_FILE="C:/projects/eqemu/vcpkg/vcpkg-export-20180627-133249/scripts/buildsystems/vcpkg.cmake" .. +- ps: "$wc = New-Object System.Net.WebClient\n$wc.DownloadFile(\"http://strawberryperl.com/download/5.26.2.1/strawberry-perl-5.26.2.1-64bit-portable.zip\", \"c:\\projects\\eqemu\\strawberry-perl-5.26.2.1-64bit-portable.zip\")\ncd c:\\projects\\eqemu\n7z x c:/projects/eqemu/strawberry-perl-5.26.2.1-64bit-portable.zip -oc:/projects/eqemu/strawberry-perl-portable -y\n(Get-Content C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE/config.h).replace('#define PERL_STATIC_INLINE static __inline__', '#define PERL_STATIC_INLINE static __inline') | Set-Content C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE/config.h\nvcpkg install boost-geometry:x64-windows boost-dynamic-bitset:x64-windows luajit:x64-windows libsodium:x64-windows libmysql:x64-windows openssl:x64-windows zlib:x64-windows \nmkdir build\ncd build\ncmake -G \"Visual Studio 15 2017 Win64\" -DEQEMU_BUILD_TESTS=ON -DEQEMU_BUILD_LOGIN=ON -EQEMU_ENABLE_BOTS=ON -DPERL_EXECUTABLE=\"C:/projects/eqemu/strawberry-perl-portable/perl/bin/perl.exe\" -DPERL_INCLUDE_PATH=\"C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE\" -DPERL_LIBRARY=\"C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE/libperl526.a\" -DCMAKE_TOOLCHAIN_FILE=\"c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake\" .." build: project: C:\projects\eqemu\build\EQEmu.sln parallel: true diff --git a/appveyor-no-bots.yml b/appveyor-no-bots.yml index bb309a163..7aea00332 100644 --- a/appveyor-no-bots.yml +++ b/appveyor-no-bots.yml @@ -7,27 +7,9 @@ configuration: RelWithDebInfo clone_folder: c:\projects\eqemu init: - ps: git config --global core.autocrlf input +cache: c:\tools\vcpkg\installed\ before_build: -- ps: >- - $wc = New-Object System.Net.WebClient - - $wc.DownloadFile("https://github.com/EQEmu/eqemu.github.com/blob/master/downloads/appveyor/vcpkg-export.7z?raw=true", "c:\projects\eqemu\vcpkg-export.7z") - - $wc.DownloadFile("http://strawberryperl.com/download/5.26.2.1/strawberry-perl-5.26.2.1-64bit-portable.zip", "c:\projects\eqemu\strawberry-perl-5.26.2.1-64bit-portable.zip") - - cd c:\projects\eqemu - - 7z x c:/projects/eqemu/vcpkg-export.7z -oc:/projects/eqemu/vcpkg -y - - 7z x c:/projects/eqemu/strawberry-perl-5.26.2.1-64bit-portable.zip -oc:/projects/eqemu/strawberry-perl-portable -y - - (Get-Content C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE/config.h).replace('#define PERL_STATIC_INLINE static __inline__', '#define PERL_STATIC_INLINE static __inline') | Set-Content C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE/config.h - - mkdir build - - cd build - - cmake -G "Visual Studio 15 2017 Win64" -DEQEMU_BUILD_TESTS=ON -DEQEMU_BUILD_LOGIN=ON -EQEMU_ENABLE_BOTS=OFF -DPERL_EXECUTABLE="C:/projects/eqemu/strawberry-perl-portable/perl/bin/perl.exe" -DPERL_INCLUDE_PATH="C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE" -DPERL_LIBRARY="C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE/libperl526.a" -DCMAKE_TOOLCHAIN_FILE="C:/projects/eqemu/vcpkg/vcpkg-export-20180627-133249/scripts/buildsystems/vcpkg.cmake" .. +- ps: "$wc = New-Object System.Net.WebClient\n$wc.DownloadFile(\"http://strawberryperl.com/download/5.26.2.1/strawberry-perl-5.26.2.1-64bit-portable.zip\", \"c:\\projects\\eqemu\\strawberry-perl-5.26.2.1-64bit-portable.zip\")\ncd c:\\projects\\eqemu\n7z x c:/projects/eqemu/strawberry-perl-5.26.2.1-64bit-portable.zip -oc:/projects/eqemu/strawberry-perl-portable -y\n(Get-Content C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE/config.h).replace('#define PERL_STATIC_INLINE static __inline__', '#define PERL_STATIC_INLINE static __inline') | Set-Content C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE/config.h\nvcpkg install boost-geometry:x64-windows boost-dynamic-bitset:x64-windows luajit:x64-windows libsodium:x64-windows libmysql:x64-windows openssl:x64-windows zlib:x64-windows \nmkdir build\ncd build\ncmake -G \"Visual Studio 15 2017 Win64\" -DEQEMU_BUILD_TESTS=ON -DEQEMU_BUILD_LOGIN=ON -EQEMU_ENABLE_BOTS=OFF -DPERL_EXECUTABLE=\"C:/projects/eqemu/strawberry-perl-portable/perl/bin/perl.exe\" -DPERL_INCLUDE_PATH=\"C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE\" -DPERL_LIBRARY=\"C:/projects/eqemu/strawberry-perl-portable/perl/lib/CORE/libperl526.a\" -DCMAKE_TOOLCHAIN_FILE=\"c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake\" .." build: project: C:\projects\eqemu\build\EQEmu.sln parallel: true From 887b71eebb481f575448e7c126337c7b6ce519fb Mon Sep 17 00:00:00 2001 From: KimLS Date: Mon, 2 Jul 2018 22:09:37 -0700 Subject: [PATCH 261/670] Change license to GPL3 instead of LGPL3 I'm not sure why this happened it should of always been GPL3 as per the attributions in the source --- LICENSE | 759 ++++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 634 insertions(+), 125 deletions(-) diff --git a/LICENSE b/LICENSE index 65c5ca88a..f288702d2 100644 --- a/LICENSE +++ b/LICENSE @@ -1,165 +1,674 @@ - GNU LESSER GENERAL PUBLIC LICENSE + GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + Preamble - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. + The GNU General Public License is a free, copyleft license for +software and other kinds of works. - 0. Additional Definitions. + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. - 1. Exception to Section 3 of the GNU GPL. + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. + The precise terms and conditions for copying, distribution and +modification follow. - 2. Conveying Modified Versions. + TERMS AND CONDITIONS - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: + 0. Definitions. - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or + "This License" refers to version 3 of the GNU General Public License. - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. - 3. Object Code Incorporating Material from Library Header Files. + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. + A "covered work" means either the unmodified Program or a work based +on the Program. - b) Accompany the object code with a copy of the GNU GPL and this license - document. + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. - 4. Combined Works. + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. + 1. Source Code. - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. - d) Do one of the following: + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) + The Corresponding Source for a work in source code form is that +same work. - 5. Combined Libraries. + 2. Basic Permissions. - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. - 6. Revised Versions of the GNU Lesser General Public License. + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. From 60ac0f7888a96583f3d65178cd1908ffc0f321c4 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Tue, 3 Jul 2018 01:15:40 -0400 Subject: [PATCH 262/670] Add WriteLengthString(const std::string &str) --- common/serialize_buffer.h | 11 +++++++++++ zone/tasks.cpp | 12 ++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/common/serialize_buffer.h b/common/serialize_buffer.h index 665a76d3a..ef6b92593 100644 --- a/common/serialize_buffer.h +++ b/common/serialize_buffer.h @@ -170,6 +170,17 @@ public: m_pos += len; } + void WriteLengthString(const std::string &str) + { + uint32_t len = str.length(); + if (m_pos + len + sizeof(uint32_t) > m_capacity) + Grow(m_capacity + len + sizeof(uint32_t)); + *(uint32_t *)(m_buffer + m_pos) = len; + m_pos += sizeof(uint32_t); + memcpy(m_buffer + m_pos, str.c_str(), len); + m_pos += len; + } + size_t size() const { return m_pos; } size_t length() const { return size(); } size_t capacity() const { return m_capacity; } diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 9e82b1db5..19dd702e8 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -1219,15 +1219,15 @@ void TaskManager::SendTaskSelectorNew(Client *c, Mob *mob, int TaskCount, int *T buf.WriteString(activity.target_name); // max length 64, "target name" so like loot x foo from bar (this is bar) // this string is item names - buf.WriteLengthString(activity.item_list.length(), activity.item_list.c_str()); + buf.WriteLengthString(activity.item_list); buf.WriteUInt32(activity.GoalCount); // GoalCount // this string is skill IDs? probably one of the "use on" tasks - buf.WriteLengthString(activity.skill_list.length(), activity.skill_list.c_str()); + buf.WriteLengthString(activity.skill_list); // this string is spell IDs? probably one of the "use on" tasks - buf.WriteLengthString(activity.spell_list.length(), activity.spell_list.c_str()); + buf.WriteLengthString(activity.spell_list); //buf.WriteString(itoa(Tasks[TaskList[i]]->Activity[ActivityID].ZoneID)); buf.WriteString(activity.zones); // Zone number in ascii max length 64, can be multiple with separated by ; @@ -2670,7 +2670,7 @@ void TaskManager::SendTaskActivityNew(Client *c, int TaskID, int ActivityID, int // One of these unknown fields maybe related to the 'Use On' activity types buf.WriteString(Tasks[TaskID]->Activity[ActivityID].target_name); // target name string - buf.WriteLengthString(Tasks[TaskID]->Activity[ActivityID].item_list.length(), Tasks[TaskID]->Activity[ActivityID].item_list.c_str()); // item name list + buf.WriteLengthString(Tasks[TaskID]->Activity[ActivityID].item_list); // item name list // Goal Count if(Tasks[TaskID]->Activity[ActivityID].Type != ActivityGiveCash) @@ -2679,10 +2679,10 @@ void TaskManager::SendTaskActivityNew(Client *c, int TaskID, int ActivityID, int buf.WriteUInt32(1); // GoalCount // skill ID list ; separated - buf.WriteLengthString(Tasks[TaskID]->Activity[ActivityID].skill_list.length(), Tasks[TaskID]->Activity[ActivityID].skill_list.c_str()); + buf.WriteLengthString(Tasks[TaskID]->Activity[ActivityID].skill_list); // spelll ID list ; separated -- unsure wtf we're doing here - buf.WriteLengthString(Tasks[TaskID]->Activity[ActivityID].spell_list.length(), Tasks[TaskID]->Activity[ActivityID].spell_list.c_str()); + buf.WriteLengthString(Tasks[TaskID]->Activity[ActivityID].spell_list); buf.WriteString(Tasks[TaskID]->Activity[ActivityID].zones); buf.WriteUInt32(0); // unknown7 From a7c1fad2132479cd003576ab0f9b9179c29fb09c Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 4 Jul 2018 01:57:54 -0400 Subject: [PATCH 263/670] Fix up OP_OpenNewTasksWindow for older clients --- common/patches/rof.cpp | 114 ------------------------------ common/patches/rof2.cpp | 114 ------------------------------ common/patches/rof2_ops.h | 1 - common/patches/rof_ops.h | 1 - common/patches/sod.cpp | 108 ----------------------------- common/patches/sod_ops.h | 1 - common/patches/sof.cpp | 112 ------------------------------ common/patches/sof_ops.h | 1 - common/patches/uf.cpp | 111 ------------------------------ common/patches/uf_ops.h | 1 - zone/tasks.cpp | 141 +++++++++++++------------------------- 11 files changed, 49 insertions(+), 656 deletions(-) diff --git a/common/patches/rof.cpp b/common/patches/rof.cpp index 499ca31ec..baecdf218 100644 --- a/common/patches/rof.cpp +++ b/common/patches/rof.cpp @@ -1863,120 +1863,6 @@ namespace RoF FINISH_ENCODE(); } - /* - ENCODE(OP_OpenNewTasksWindow) - { - AvailableTaskHeader_Struct* __emu_AvailableTaskHeader; - AvailableTaskData1_Struct* __emu_AvailableTaskData1; - AvailableTaskData2_Struct* __emu_AvailableTaskData2; - AvailableTaskTrailer_Struct* __emu_AvailableTaskTrailer; - - structs::AvailableTaskHeader_Struct* __eq_AvailableTaskHeader; - structs::AvailableTaskData1_Struct* __eq_AvailableTaskData1; - structs::AvailableTaskData2_Struct* __eq_AvailableTaskData2; - structs::AvailableTaskTrailer_Struct* __eq_AvailableTaskTrailer; - - EQApplicationPacket *in = *p; - *p = nullptr; - - unsigned char *__emu_buffer = in->pBuffer; - - __emu_AvailableTaskHeader = (AvailableTaskHeader_Struct*)__emu_buffer; - - // For each task, SoF has an extra uint32 and what appears to be space for a null terminated string. - // - in->size = in->size + (__emu_AvailableTaskHeader->TaskCount * 5); - - in->pBuffer = new unsigned char[in->size]; - - unsigned char *__eq_buffer = in->pBuffer; - - __eq_AvailableTaskHeader = (structs::AvailableTaskHeader_Struct*)__eq_buffer; - - char *__eq_ptr, *__emu_Ptr; - - // Copy Header - // - // - - __eq_AvailableTaskHeader->TaskCount = __emu_AvailableTaskHeader->TaskCount; - __eq_AvailableTaskHeader->unknown1 = __emu_AvailableTaskHeader->unknown1; - __eq_AvailableTaskHeader->TaskGiver = __emu_AvailableTaskHeader->TaskGiver; - - __emu_Ptr = (char *) __emu_AvailableTaskHeader + sizeof(AvailableTaskHeader_Struct); - __eq_ptr = (char *) __eq_AvailableTaskHeader + sizeof(structs::AvailableTaskHeader_Struct); - - for(uint32 i=0; i<__emu_AvailableTaskHeader->TaskCount; i++) { - - __emu_AvailableTaskData1 = (AvailableTaskData1_Struct*)__emu_Ptr; - __eq_AvailableTaskData1 = (structs::AvailableTaskData1_Struct*)__eq_ptr; - - __eq_AvailableTaskData1->TaskID = __emu_AvailableTaskData1->TaskID; - // This next unknown seems to affect the colour of the task title. 0x3f80000 is what I have seen - // in RoF packets. Changing it to 0x3f000000 makes the title red. - __eq_AvailableTaskData1->unknown1 = 0x3f800000; - __eq_AvailableTaskData1->TimeLimit = __emu_AvailableTaskData1->TimeLimit; - __eq_AvailableTaskData1->unknown2 = __emu_AvailableTaskData1->unknown2; - - __emu_Ptr += sizeof(AvailableTaskData1_Struct); - __eq_ptr += sizeof(structs::AvailableTaskData1_Struct); - - strcpy(__eq_ptr, __emu_Ptr); // Title - - __emu_Ptr += strlen(__emu_Ptr) + 1; - __eq_ptr += strlen(__eq_ptr) + 1; - - strcpy(__eq_ptr, __emu_Ptr); // Description - - __emu_Ptr += strlen(__emu_Ptr) + 1; - __eq_ptr += strlen(__eq_ptr) + 1; - - __eq_ptr[0] = 0; - __eq_ptr += strlen(__eq_ptr) + 1; - - __emu_AvailableTaskData2 = (AvailableTaskData2_Struct*)__emu_Ptr; - __eq_AvailableTaskData2 = (structs::AvailableTaskData2_Struct*)__eq_ptr; - - __eq_AvailableTaskData2->unknown1 = __emu_AvailableTaskData2->unknown1; - __eq_AvailableTaskData2->unknown2 = __emu_AvailableTaskData2->unknown2; - __eq_AvailableTaskData2->unknown3 = __emu_AvailableTaskData2->unknown3; - __eq_AvailableTaskData2->unknown4 = __emu_AvailableTaskData2->unknown4; - - __emu_Ptr += sizeof(AvailableTaskData2_Struct); - __eq_ptr += sizeof(structs::AvailableTaskData2_Struct); - - strcpy(__eq_ptr, __emu_Ptr); // Unknown string - - __emu_Ptr += strlen(__emu_Ptr) + 1; - __eq_ptr += strlen(__eq_ptr) + 1; - - strcpy(__eq_ptr, __emu_Ptr); // Unknown string - - __emu_Ptr += strlen(__emu_Ptr) + 1; - __eq_ptr += strlen(__eq_ptr) + 1; - - __emu_AvailableTaskTrailer = (AvailableTaskTrailer_Struct*)__emu_Ptr; - __eq_AvailableTaskTrailer = (structs::AvailableTaskTrailer_Struct*)__eq_ptr; - - __eq_AvailableTaskTrailer->ItemCount = __emu_AvailableTaskTrailer->ItemCount; - __eq_AvailableTaskTrailer->unknown1 = __emu_AvailableTaskTrailer->unknown1; - __eq_AvailableTaskTrailer->unknown2 = __emu_AvailableTaskTrailer->unknown2; - __eq_AvailableTaskTrailer->StartZone = __emu_AvailableTaskTrailer->StartZone; - - __emu_Ptr += sizeof(AvailableTaskTrailer_Struct); - __eq_ptr += sizeof(structs::AvailableTaskTrailer_Struct); - - strcpy(__eq_ptr, __emu_Ptr); // Unknown string - - __emu_Ptr += strlen(__emu_Ptr) + 1; - __eq_ptr += strlen(__eq_ptr) + 1; - } - - delete[] __emu_buffer; - dest->FastQueuePacket(&in, ack_req); - } - */ - ENCODE(OP_PetBuffWindow) { // The format of the RoF packet is identical to the OP_BuffCreate packet. diff --git a/common/patches/rof2.cpp b/common/patches/rof2.cpp index 28bfb569e..be18c27b6 100644 --- a/common/patches/rof2.cpp +++ b/common/patches/rof2.cpp @@ -1940,120 +1940,6 @@ namespace RoF2 FINISH_ENCODE(); } - /* - ENCODE(OP_OpenNewTasksWindow) - { - AvailableTaskHeader_Struct* __emu_AvailableTaskHeader; - AvailableTaskData1_Struct* __emu_AvailableTaskData1; - AvailableTaskData2_Struct* __emu_AvailableTaskData2; - AvailableTaskTrailer_Struct* __emu_AvailableTaskTrailer; - - structs::AvailableTaskHeader_Struct* __eq_AvailableTaskHeader; - structs::AvailableTaskData1_Struct* __eq_AvailableTaskData1; - structs::AvailableTaskData2_Struct* __eq_AvailableTaskData2; - structs::AvailableTaskTrailer_Struct* __eq_AvailableTaskTrailer; - - EQApplicationPacket *in = *p; - *p = nullptr; - - unsigned char *__emu_buffer = in->pBuffer; - - __emu_AvailableTaskHeader = (AvailableTaskHeader_Struct*)__emu_buffer; - - // For each task, SoF has an extra uint32 and what appears to be space for a null terminated string. - // - in->size = in->size + (__emu_AvailableTaskHeader->TaskCount * 5); - - in->pBuffer = new unsigned char[in->size]; - - unsigned char *__eq_buffer = in->pBuffer; - - __eq_AvailableTaskHeader = (structs::AvailableTaskHeader_Struct*)__eq_buffer; - - char *__eq_ptr, *__emu_Ptr; - - // Copy Header - // - // - - __eq_AvailableTaskHeader->TaskCount = __emu_AvailableTaskHeader->TaskCount; - __eq_AvailableTaskHeader->unknown1 = __emu_AvailableTaskHeader->unknown1; - __eq_AvailableTaskHeader->TaskGiver = __emu_AvailableTaskHeader->TaskGiver; - - __emu_Ptr = (char *) __emu_AvailableTaskHeader + sizeof(AvailableTaskHeader_Struct); - __eq_ptr = (char *) __eq_AvailableTaskHeader + sizeof(structs::AvailableTaskHeader_Struct); - - for(uint32 i=0; i<__emu_AvailableTaskHeader->TaskCount; i++) { - - __emu_AvailableTaskData1 = (AvailableTaskData1_Struct*)__emu_Ptr; - __eq_AvailableTaskData1 = (structs::AvailableTaskData1_Struct*)__eq_ptr; - - __eq_AvailableTaskData1->TaskID = __emu_AvailableTaskData1->TaskID; - // This next unknown seems to affect the colour of the task title. 0x3f80000 is what I have seen - // in RoF2 packets. Changing it to 0x3f000000 makes the title red. - __eq_AvailableTaskData1->unknown1 = 0x3f800000; - __eq_AvailableTaskData1->TimeLimit = __emu_AvailableTaskData1->TimeLimit; - __eq_AvailableTaskData1->unknown2 = __emu_AvailableTaskData1->unknown2; - - __emu_Ptr += sizeof(AvailableTaskData1_Struct); - __eq_ptr += sizeof(structs::AvailableTaskData1_Struct); - - strcpy(__eq_ptr, __emu_Ptr); // Title - - __emu_Ptr += strlen(__emu_Ptr) + 1; - __eq_ptr += strlen(__eq_ptr) + 1; - - strcpy(__eq_ptr, __emu_Ptr); // Description - - __emu_Ptr += strlen(__emu_Ptr) + 1; - __eq_ptr += strlen(__eq_ptr) + 1; - - __eq_ptr[0] = 0; - __eq_ptr += strlen(__eq_ptr) + 1; - - __emu_AvailableTaskData2 = (AvailableTaskData2_Struct*)__emu_Ptr; - __eq_AvailableTaskData2 = (structs::AvailableTaskData2_Struct*)__eq_ptr; - - __eq_AvailableTaskData2->unknown1 = __emu_AvailableTaskData2->unknown1; - __eq_AvailableTaskData2->unknown2 = __emu_AvailableTaskData2->unknown2; - __eq_AvailableTaskData2->unknown3 = __emu_AvailableTaskData2->unknown3; - __eq_AvailableTaskData2->unknown4 = __emu_AvailableTaskData2->unknown4; - - __emu_Ptr += sizeof(AvailableTaskData2_Struct); - __eq_ptr += sizeof(structs::AvailableTaskData2_Struct); - - strcpy(__eq_ptr, __emu_Ptr); // Unknown string - - __emu_Ptr += strlen(__emu_Ptr) + 1; - __eq_ptr += strlen(__eq_ptr) + 1; - - strcpy(__eq_ptr, __emu_Ptr); // Unknown string - - __emu_Ptr += strlen(__emu_Ptr) + 1; - __eq_ptr += strlen(__eq_ptr) + 1; - - __emu_AvailableTaskTrailer = (AvailableTaskTrailer_Struct*)__emu_Ptr; - __eq_AvailableTaskTrailer = (structs::AvailableTaskTrailer_Struct*)__eq_ptr; - - __eq_AvailableTaskTrailer->ItemCount = __emu_AvailableTaskTrailer->ItemCount; - __eq_AvailableTaskTrailer->unknown1 = __emu_AvailableTaskTrailer->unknown1; - __eq_AvailableTaskTrailer->unknown2 = __emu_AvailableTaskTrailer->unknown2; - __eq_AvailableTaskTrailer->StartZone = __emu_AvailableTaskTrailer->StartZone; - - __emu_Ptr += sizeof(AvailableTaskTrailer_Struct); - __eq_ptr += sizeof(structs::AvailableTaskTrailer_Struct); - - strcpy(__eq_ptr, __emu_Ptr); // Unknown string - - __emu_Ptr += strlen(__emu_Ptr) + 1; - __eq_ptr += strlen(__eq_ptr) + 1; - } - - delete[] __emu_buffer; - dest->FastQueuePacket(&in, ack_req); - } - */ - ENCODE(OP_PetBuffWindow) { // The format of the RoF2 packet is identical to the OP_BuffCreate packet. diff --git a/common/patches/rof2_ops.h b/common/patches/rof2_ops.h index 2cd81aaee..7ee120c97 100644 --- a/common/patches/rof2_ops.h +++ b/common/patches/rof2_ops.h @@ -98,7 +98,6 @@ E(OP_MoveItem) E(OP_NewSpawn) E(OP_NewZone) E(OP_OnLevelMessage) -//E(OP_OpenNewTasksWindow) E(OP_PetBuffWindow) E(OP_PlayerProfile) E(OP_RaidJoin) diff --git a/common/patches/rof_ops.h b/common/patches/rof_ops.h index 9030a480b..11fd83f51 100644 --- a/common/patches/rof_ops.h +++ b/common/patches/rof_ops.h @@ -83,7 +83,6 @@ E(OP_MoveItem) E(OP_NewSpawn) E(OP_NewZone) E(OP_OnLevelMessage) -//E(OP_OpenNewTasksWindow) E(OP_PetBuffWindow) E(OP_PlayerProfile) E(OP_RaidJoin) diff --git a/common/patches/sod.cpp b/common/patches/sod.cpp index 0ac9d1b84..779ccd29f 100644 --- a/common/patches/sod.cpp +++ b/common/patches/sod.cpp @@ -1383,114 +1383,6 @@ namespace SoD FINISH_ENCODE(); } - ENCODE(OP_OpenNewTasksWindow) - { - AvailableTaskHeader_Struct* __emu_AvailableTaskHeader; - AvailableTaskData1_Struct* __emu_AvailableTaskData1; - AvailableTaskData2_Struct* __emu_AvailableTaskData2; - AvailableTaskTrailer_Struct* __emu_AvailableTaskTrailer; - - structs::AvailableTaskHeader_Struct* __eq_AvailableTaskHeader; - structs::AvailableTaskData1_Struct* __eq_AvailableTaskData1; - structs::AvailableTaskData2_Struct* __eq_AvailableTaskData2; - structs::AvailableTaskTrailer_Struct* __eq_AvailableTaskTrailer; - - EQApplicationPacket *in = *p; - *p = nullptr; - - unsigned char *__emu_buffer = in->pBuffer; - - __emu_AvailableTaskHeader = (AvailableTaskHeader_Struct*)__emu_buffer; - - // For each task, SoF has an extra uint32 and what appears to be space for a null terminated string. - // - in->size = in->size + (__emu_AvailableTaskHeader->TaskCount * 5); - in->pBuffer = new unsigned char[in->size]; - unsigned char *__eq_buffer = in->pBuffer; - __eq_AvailableTaskHeader = (structs::AvailableTaskHeader_Struct*)__eq_buffer; - char *__eq_ptr, *__emu_Ptr; - - // Copy Header - // - // - - __eq_AvailableTaskHeader->TaskCount = __emu_AvailableTaskHeader->TaskCount; - __eq_AvailableTaskHeader->unknown1 = __emu_AvailableTaskHeader->unknown1; - __eq_AvailableTaskHeader->TaskGiver = __emu_AvailableTaskHeader->TaskGiver; - - __emu_Ptr = (char *)__emu_AvailableTaskHeader + sizeof(AvailableTaskHeader_Struct); - __eq_ptr = (char *)__eq_AvailableTaskHeader + sizeof(structs::AvailableTaskHeader_Struct); - - for (uint32 i = 0; i<__emu_AvailableTaskHeader->TaskCount; i++) { - - __emu_AvailableTaskData1 = (AvailableTaskData1_Struct*)__emu_Ptr; - __eq_AvailableTaskData1 = (structs::AvailableTaskData1_Struct*)__eq_ptr; - - __eq_AvailableTaskData1->TaskID = __emu_AvailableTaskData1->TaskID; - // This next unknown seems to affect the colour of the task title. 0x3f80000 is what I have seen - // in Live packets. Changing it to 0x3f000000 makes the title red. - __eq_AvailableTaskData1->unknown1 = 0x3f800000; - __eq_AvailableTaskData1->TimeLimit = __emu_AvailableTaskData1->TimeLimit; - __eq_AvailableTaskData1->unknown2 = __emu_AvailableTaskData1->unknown2; - - __emu_Ptr += sizeof(AvailableTaskData1_Struct); - __eq_ptr += sizeof(structs::AvailableTaskData1_Struct); - - strcpy(__eq_ptr, __emu_Ptr); // Title - - __emu_Ptr += strlen(__emu_Ptr) + 1; - __eq_ptr += strlen(__eq_ptr) + 1; - - strcpy(__eq_ptr, __emu_Ptr); // Description - - __emu_Ptr += strlen(__emu_Ptr) + 1; - __eq_ptr += strlen(__eq_ptr) + 1; - - __eq_ptr[0] = 0; - __eq_ptr += strlen(__eq_ptr) + 1; - - __emu_AvailableTaskData2 = (AvailableTaskData2_Struct*)__emu_Ptr; - __eq_AvailableTaskData2 = (structs::AvailableTaskData2_Struct*)__eq_ptr; - - __eq_AvailableTaskData2->unknown1 = __emu_AvailableTaskData2->unknown1; - __eq_AvailableTaskData2->unknown2 = __emu_AvailableTaskData2->unknown2; - __eq_AvailableTaskData2->unknown3 = __emu_AvailableTaskData2->unknown3; - __eq_AvailableTaskData2->unknown4 = __emu_AvailableTaskData2->unknown4; - - __emu_Ptr += sizeof(AvailableTaskData2_Struct); - __eq_ptr += sizeof(structs::AvailableTaskData2_Struct); - - strcpy(__eq_ptr, __emu_Ptr); // Unknown string - - __emu_Ptr += strlen(__emu_Ptr) + 1; - __eq_ptr += strlen(__eq_ptr) + 1; - - strcpy(__eq_ptr, __emu_Ptr); // Unknown string - - __emu_Ptr += strlen(__emu_Ptr) + 1; - __eq_ptr += strlen(__eq_ptr) + 1; - - __emu_AvailableTaskTrailer = (AvailableTaskTrailer_Struct*)__emu_Ptr; - __eq_AvailableTaskTrailer = (structs::AvailableTaskTrailer_Struct*)__eq_ptr; - - __eq_AvailableTaskTrailer->ItemCount = __emu_AvailableTaskTrailer->ItemCount; - __eq_AvailableTaskTrailer->unknown1 = __emu_AvailableTaskTrailer->unknown1; - __eq_AvailableTaskTrailer->unknown2 = __emu_AvailableTaskTrailer->unknown2; - __eq_AvailableTaskTrailer->StartZone = __emu_AvailableTaskTrailer->StartZone; - - __emu_Ptr += sizeof(AvailableTaskTrailer_Struct); - __eq_ptr += sizeof(structs::AvailableTaskTrailer_Struct); - - strcpy(__eq_ptr, __emu_Ptr); // Unknown string - - __emu_Ptr += strlen(__emu_Ptr) + 1; - __eq_ptr += strlen(__eq_ptr) + 1; - } - - delete[] __emu_buffer; - dest->FastQueuePacket(&in, ack_req); - } - ENCODE(OP_PetBuffWindow) { EQApplicationPacket *in = *p; diff --git a/common/patches/sod_ops.h b/common/patches/sod_ops.h index 7c1109499..6909e1f28 100644 --- a/common/patches/sod_ops.h +++ b/common/patches/sod_ops.h @@ -67,7 +67,6 @@ E(OP_MoveItem) E(OP_NewSpawn) E(OP_NewZone) E(OP_OnLevelMessage) -E(OP_OpenNewTasksWindow) E(OP_PetBuffWindow) E(OP_PlayerProfile) E(OP_RaidJoin) diff --git a/common/patches/sof.cpp b/common/patches/sof.cpp index 05bb95a6a..0e14add16 100644 --- a/common/patches/sof.cpp +++ b/common/patches/sof.cpp @@ -1060,118 +1060,6 @@ namespace SoF FINISH_ENCODE(); } - ENCODE(OP_OpenNewTasksWindow) - { - AvailableTaskHeader_Struct* __emu_AvailableTaskHeader; - AvailableTaskData1_Struct* __emu_AvailableTaskData1; - AvailableTaskData2_Struct* __emu_AvailableTaskData2; - AvailableTaskTrailer_Struct* __emu_AvailableTaskTrailer; - - structs::AvailableTaskHeader_Struct* __eq_AvailableTaskHeader; - structs::AvailableTaskData1_Struct* __eq_AvailableTaskData1; - structs::AvailableTaskData2_Struct* __eq_AvailableTaskData2; - structs::AvailableTaskTrailer_Struct* __eq_AvailableTaskTrailer; - - EQApplicationPacket *in = *p; - *p = nullptr; - - unsigned char *__emu_buffer = in->pBuffer; - - __emu_AvailableTaskHeader = (AvailableTaskHeader_Struct*)__emu_buffer; - - // For each task, SoF has an extra uint32 and what appears to be space for a null terminated string. - // - in->size = in->size + (__emu_AvailableTaskHeader->TaskCount * 5); - - in->pBuffer = new unsigned char[in->size]; - - unsigned char *__eq_buffer = in->pBuffer; - - __eq_AvailableTaskHeader = (structs::AvailableTaskHeader_Struct*)__eq_buffer; - - char *__eq_ptr, *__emu_Ptr; - - // Copy Header - // - // - - __eq_AvailableTaskHeader->TaskCount = __emu_AvailableTaskHeader->TaskCount; - __eq_AvailableTaskHeader->unknown1 = __emu_AvailableTaskHeader->unknown1; - __eq_AvailableTaskHeader->TaskGiver = __emu_AvailableTaskHeader->TaskGiver; - - __emu_Ptr = (char *)__emu_AvailableTaskHeader + sizeof(AvailableTaskHeader_Struct); - __eq_ptr = (char *)__eq_AvailableTaskHeader + sizeof(structs::AvailableTaskHeader_Struct); - - for (uint32 i = 0; i<__emu_AvailableTaskHeader->TaskCount; i++) { - - __emu_AvailableTaskData1 = (AvailableTaskData1_Struct*)__emu_Ptr; - __eq_AvailableTaskData1 = (structs::AvailableTaskData1_Struct*)__eq_ptr; - - __eq_AvailableTaskData1->TaskID = __emu_AvailableTaskData1->TaskID; - // This next unknown seems to affect the colour of the task title. 0x3f80000 is what I have seen - // in Live packets. Changing it to 0x3f000000 makes the title red. - __eq_AvailableTaskData1->unknown1 = 0x3f800000; - __eq_AvailableTaskData1->TimeLimit = __emu_AvailableTaskData1->TimeLimit; - __eq_AvailableTaskData1->unknown2 = __emu_AvailableTaskData1->unknown2; - - __emu_Ptr += sizeof(AvailableTaskData1_Struct); - __eq_ptr += sizeof(structs::AvailableTaskData1_Struct); - - strcpy(__eq_ptr, __emu_Ptr); // Title - - __emu_Ptr += strlen(__emu_Ptr) + 1; - __eq_ptr += strlen(__eq_ptr) + 1; - - strcpy(__eq_ptr, __emu_Ptr); // Description - - __emu_Ptr += strlen(__emu_Ptr) + 1; - __eq_ptr += strlen(__eq_ptr) + 1; - - __eq_ptr[0] = 0; - __eq_ptr += strlen(__eq_ptr) + 1; - - __emu_AvailableTaskData2 = (AvailableTaskData2_Struct*)__emu_Ptr; - __eq_AvailableTaskData2 = (structs::AvailableTaskData2_Struct*)__eq_ptr; - - __eq_AvailableTaskData2->unknown1 = __emu_AvailableTaskData2->unknown1; - __eq_AvailableTaskData2->unknown2 = __emu_AvailableTaskData2->unknown2; - __eq_AvailableTaskData2->unknown3 = __emu_AvailableTaskData2->unknown3; - __eq_AvailableTaskData2->unknown4 = __emu_AvailableTaskData2->unknown4; - - __emu_Ptr += sizeof(AvailableTaskData2_Struct); - __eq_ptr += sizeof(structs::AvailableTaskData2_Struct); - - strcpy(__eq_ptr, __emu_Ptr); // Unknown string - - __emu_Ptr += strlen(__emu_Ptr) + 1; - __eq_ptr += strlen(__eq_ptr) + 1; - - strcpy(__eq_ptr, __emu_Ptr); // Unknown string - - __emu_Ptr += strlen(__emu_Ptr) + 1; - __eq_ptr += strlen(__eq_ptr) + 1; - - __emu_AvailableTaskTrailer = (AvailableTaskTrailer_Struct*)__emu_Ptr; - __eq_AvailableTaskTrailer = (structs::AvailableTaskTrailer_Struct*)__eq_ptr; - - __eq_AvailableTaskTrailer->ItemCount = __emu_AvailableTaskTrailer->ItemCount; - __eq_AvailableTaskTrailer->unknown1 = __emu_AvailableTaskTrailer->unknown1; - __eq_AvailableTaskTrailer->unknown2 = __emu_AvailableTaskTrailer->unknown2; - __eq_AvailableTaskTrailer->StartZone = __emu_AvailableTaskTrailer->StartZone; - - __emu_Ptr += sizeof(AvailableTaskTrailer_Struct); - __eq_ptr += sizeof(structs::AvailableTaskTrailer_Struct); - - strcpy(__eq_ptr, __emu_Ptr); // Unknown string - - __emu_Ptr += strlen(__emu_Ptr) + 1; - __eq_ptr += strlen(__eq_ptr) + 1; - } - - delete[] __emu_buffer; - dest->FastQueuePacket(&in, ack_req); - } - ENCODE(OP_PetBuffWindow) { ENCODE_LENGTH_EXACT(PetBuff_Struct); diff --git a/common/patches/sof_ops.h b/common/patches/sof_ops.h index c4e42d8d4..0ff2cfd2f 100644 --- a/common/patches/sof_ops.h +++ b/common/patches/sof_ops.h @@ -62,7 +62,6 @@ E(OP_MoveItem) E(OP_NewSpawn) E(OP_NewZone) E(OP_OnLevelMessage) -E(OP_OpenNewTasksWindow) E(OP_PetBuffWindow) E(OP_PlayerProfile) E(OP_RaidJoin) diff --git a/common/patches/uf.cpp b/common/patches/uf.cpp index 608c6622f..a2c816678 100644 --- a/common/patches/uf.cpp +++ b/common/patches/uf.cpp @@ -1609,117 +1609,6 @@ namespace UF FINISH_ENCODE(); } - ENCODE(OP_OpenNewTasksWindow) - { - AvailableTaskHeader_Struct* __emu_AvailableTaskHeader; - AvailableTaskData1_Struct* __emu_AvailableTaskData1; - AvailableTaskData2_Struct* __emu_AvailableTaskData2; - AvailableTaskTrailer_Struct* __emu_AvailableTaskTrailer; - - structs::AvailableTaskHeader_Struct* __eq_AvailableTaskHeader; - structs::AvailableTaskData1_Struct* __eq_AvailableTaskData1; - structs::AvailableTaskData2_Struct* __eq_AvailableTaskData2; - structs::AvailableTaskTrailer_Struct* __eq_AvailableTaskTrailer; - - EQApplicationPacket *in = *p; - *p = nullptr; - - unsigned char *__emu_buffer = in->pBuffer; - - __emu_AvailableTaskHeader = (AvailableTaskHeader_Struct*)__emu_buffer; - - // For each task, SoF has an extra uint32 and what appears to be space for a null terminated string. - // - in->size = in->size + (__emu_AvailableTaskHeader->TaskCount * 5); - in->pBuffer = new unsigned char[in->size]; - - unsigned char *__eq_buffer = in->pBuffer; - - __eq_AvailableTaskHeader = (structs::AvailableTaskHeader_Struct*)__eq_buffer; - - char *__eq_ptr, *__emu_Ptr; - - // Copy Header - // - // - - __eq_AvailableTaskHeader->TaskCount = __emu_AvailableTaskHeader->TaskCount; - __eq_AvailableTaskHeader->unknown1 = __emu_AvailableTaskHeader->unknown1; - __eq_AvailableTaskHeader->TaskGiver = __emu_AvailableTaskHeader->TaskGiver; - - __emu_Ptr = (char *)__emu_AvailableTaskHeader + sizeof(AvailableTaskHeader_Struct); - __eq_ptr = (char *)__eq_AvailableTaskHeader + sizeof(structs::AvailableTaskHeader_Struct); - - for (uint32 i = 0; i<__emu_AvailableTaskHeader->TaskCount; i++) { - - __emu_AvailableTaskData1 = (AvailableTaskData1_Struct*)__emu_Ptr; - __eq_AvailableTaskData1 = (structs::AvailableTaskData1_Struct*)__eq_ptr; - - __eq_AvailableTaskData1->TaskID = __emu_AvailableTaskData1->TaskID; - // This next unknown seems to affect the colour of the task title. 0x3f80000 is what I have seen - // in Underfoot packets. Changing it to 0x3f000000 makes the title red. - __eq_AvailableTaskData1->unknown1 = 0x3f800000; - __eq_AvailableTaskData1->TimeLimit = __emu_AvailableTaskData1->TimeLimit; - __eq_AvailableTaskData1->unknown2 = __emu_AvailableTaskData1->unknown2; - - __emu_Ptr += sizeof(AvailableTaskData1_Struct); - __eq_ptr += sizeof(structs::AvailableTaskData1_Struct); - - strcpy(__eq_ptr, __emu_Ptr); // Title - - __emu_Ptr += strlen(__emu_Ptr) + 1; - __eq_ptr += strlen(__eq_ptr) + 1; - - strcpy(__eq_ptr, __emu_Ptr); // Description - - __emu_Ptr += strlen(__emu_Ptr) + 1; - __eq_ptr += strlen(__eq_ptr) + 1; - - __eq_ptr[0] = 0; - __eq_ptr += strlen(__eq_ptr) + 1; - - __emu_AvailableTaskData2 = (AvailableTaskData2_Struct*)__emu_Ptr; - __eq_AvailableTaskData2 = (structs::AvailableTaskData2_Struct*)__eq_ptr; - - __eq_AvailableTaskData2->unknown1 = __emu_AvailableTaskData2->unknown1; - __eq_AvailableTaskData2->unknown2 = __emu_AvailableTaskData2->unknown2; - __eq_AvailableTaskData2->unknown3 = __emu_AvailableTaskData2->unknown3; - __eq_AvailableTaskData2->unknown4 = __emu_AvailableTaskData2->unknown4; - - __emu_Ptr += sizeof(AvailableTaskData2_Struct); - __eq_ptr += sizeof(structs::AvailableTaskData2_Struct); - - strcpy(__eq_ptr, __emu_Ptr); // Unknown string - - __emu_Ptr += strlen(__emu_Ptr) + 1; - __eq_ptr += strlen(__eq_ptr) + 1; - - strcpy(__eq_ptr, __emu_Ptr); // Unknown string - - __emu_Ptr += strlen(__emu_Ptr) + 1; - __eq_ptr += strlen(__eq_ptr) + 1; - - __emu_AvailableTaskTrailer = (AvailableTaskTrailer_Struct*)__emu_Ptr; - __eq_AvailableTaskTrailer = (structs::AvailableTaskTrailer_Struct*)__eq_ptr; - - __eq_AvailableTaskTrailer->ItemCount = __emu_AvailableTaskTrailer->ItemCount; - __eq_AvailableTaskTrailer->unknown1 = __emu_AvailableTaskTrailer->unknown1; - __eq_AvailableTaskTrailer->unknown2 = __emu_AvailableTaskTrailer->unknown2; - __eq_AvailableTaskTrailer->StartZone = __emu_AvailableTaskTrailer->StartZone; - - __emu_Ptr += sizeof(AvailableTaskTrailer_Struct); - __eq_ptr += sizeof(structs::AvailableTaskTrailer_Struct); - - strcpy(__eq_ptr, __emu_Ptr); // Unknown string - - __emu_Ptr += strlen(__emu_Ptr) + 1; - __eq_ptr += strlen(__eq_ptr) + 1; - } - - delete[] __emu_buffer; - dest->FastQueuePacket(&in, ack_req); - } - ENCODE(OP_PetBuffWindow) { EQApplicationPacket *in = *p; diff --git a/common/patches/uf_ops.h b/common/patches/uf_ops.h index 2287f0cd1..9d7742cf0 100644 --- a/common/patches/uf_ops.h +++ b/common/patches/uf_ops.h @@ -72,7 +72,6 @@ E(OP_MoveItem) E(OP_NewSpawn) E(OP_NewZone) E(OP_OnLevelMessage) -E(OP_OpenNewTasksWindow) E(OP_PetBuffWindow) E(OP_PlayerProfile) E(OP_RaidJoin) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 19dd702e8..f518dfde2 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -1036,121 +1036,78 @@ void TaskManager::SendTaskSelector(Client *c, Mob *mob, int TaskCount, int *Task } // Titanium OpCode: 0x5e7c Log(Logs::General, Logs::Tasks, "[UPDATE] TaskSelector for %i Tasks", TaskCount); - char *Ptr; int PlayerLevel = c->GetLevel(); - AvailableTaskHeader_Struct* AvailableTaskHeader; - AvailableTaskData1_Struct* AvailableTaskData1; - AvailableTaskData2_Struct* AvailableTaskData2; - AvailableTaskTrailer_Struct* AvailableTaskTrailer; - // Check if any of the tasks exist - - - for(int i=0; iIsTaskActive(TaskList[i])) continue; - - if(!IsTaskRepeatable(TaskList[i]) && c->IsTaskCompleted(TaskList[i])) continue; + for (int i = 0; i < TaskCount; i++) { + if (!AppropriateLevel(TaskList[i], PlayerLevel)) + continue; + if (c->IsTaskActive(TaskList[i])) + continue; + if (!IsTaskRepeatable(TaskList[i]) && c->IsTaskCompleted(TaskList[i])) + continue; ValidTasks++; - - PacketLength = PacketLength + sizeof(AvailableTaskData1_Struct) + Tasks[TaskList[i]]->Title.size() + 1 + - Tasks[TaskList[i]]->Description.size() + 1 + sizeof(AvailableTaskData2_Struct) + 10 + - sizeof(AvailableTaskTrailer_Struct) + 5; } - if(ValidTasks == 0) return; + if (ValidTasks == 0) + return; - auto outapp = new EQApplicationPacket(OP_OpenNewTasksWindow, PacketLength); + SerializeBuffer buf(50 * ValidTasks); - AvailableTaskHeader = (AvailableTaskHeader_Struct*)outapp->pBuffer; - AvailableTaskHeader->TaskCount = ValidTasks; + buf.WriteUInt32(ValidTasks); + buf.WriteUInt32(2); // task type, live doesn't let you send more than one type, but we do? + buf.WriteUInt32(mob->GetID()); - // unknown1 is always 2 in the packets I have ssen. It may be a 'Task Type'. Given that the - // task system was apparently first introduced for LDoN missions, type 1 may be for missions. - // - AvailableTaskHeader->unknown1 = 2; - AvailableTaskHeader->TaskGiver = mob->GetID(); + for (int i = 0; i < TaskCount; i++) { + if (!AppropriateLevel(TaskList[i], PlayerLevel)) + continue; + if (c->IsTaskActive(TaskList[i])) + continue; + if (!IsTaskRepeatable(TaskList[i]) && c->IsTaskCompleted(TaskList[i])) + continue; - Ptr = (char *) AvailableTaskHeader + sizeof(AvailableTaskHeader_Struct); + buf.WriteUInt32(TaskList[i]); // TaskID + if (c->ClientVersion() != EQEmu::versions::ClientVersion::Titanium) + buf.WriteFloat(1.0f); // affects color, difficulty? + buf.WriteUInt32(Tasks[TaskList[i]]->Duration); + buf.WriteUInt32(static_cast(Tasks[TaskList[i]]->dur_code)); - for(int i=0; iTitle); // max 64 with null + buf.WriteString(Tasks[TaskList[i]]->Description); // max 4000 with null - if(!AppropriateLevel(TaskList[i], PlayerLevel)) continue; + if (c->ClientVersion() != EQEmu::versions::ClientVersion::Titanium) + buf.WriteUInt8(0); // Has reward set flag - if(c->IsTaskActive(TaskList[i])) continue; + buf.WriteUInt32(Tasks[TaskList[i]]->ActivityCount); - if(!IsTaskRepeatable(TaskList[i]) && c->IsTaskCompleted(TaskList[i])) continue; + for (int j = 0; j < Tasks[TaskList[i]]->ActivityCount; ++j) { + buf.WriteUInt32(j); // ActivityNumber + auto &activity = Tasks[TaskList[i]]->Activity[j]; + buf.WriteUInt32(activity.Type); + buf.WriteUInt32(0); // solo, group, raid? + buf.WriteString(activity.target_name); // max length 64, "target name" so like loot x foo from bar (this is bar) - AvailableTaskData1 = (AvailableTaskData1_Struct*)Ptr; + buf.WriteString(activity.item_list); // max length 64 in these clients - AvailableTaskData1->TaskID = TaskList[i]; + buf.WriteUInt32(activity.GoalCount); - AvailableTaskData1->TimeLimit = Tasks[TaskList[i]]->Duration; - - AvailableTaskData1->unknown2 = static_cast(Tasks[TaskList[i]]->dur_code); // guess - - Ptr = (char *)AvailableTaskData1 + sizeof(AvailableTaskData1_Struct); - - sprintf(Ptr, "%s", Tasks[TaskList[i]]->Title.c_str()); - - Ptr = Ptr + strlen(Ptr) + 1; - - sprintf(Ptr, "%s", Tasks[TaskList[i]]->Description.c_str()); - - Ptr = Ptr + strlen(Ptr) + 1; - - AvailableTaskData2 = (AvailableTaskData2_Struct*)Ptr; - - AvailableTaskData2->unknown1 = 1; - AvailableTaskData2->unknown2 = 0; - AvailableTaskData2->unknown3 = 1; - AvailableTaskData2->unknown4 = 0; - - Ptr = (char *)AvailableTaskData2 + sizeof(AvailableTaskData2_Struct); - - // FIXME: In live packets, these two strings appear to be the same as the Text1 and Text2 - // strings from the first activity in the task, however the task chooser/selector - // does not appear to make use of them. - sprintf(Ptr, "ABCD"); - Ptr = Ptr + strlen(Ptr) + 1; - sprintf(Ptr, "ABCD"); - Ptr = Ptr + strlen(Ptr) + 1; - - AvailableTaskTrailer = (AvailableTaskTrailer_Struct*)Ptr; - - // The name of this ItemCount field may be incorrect, but 1 works. - AvailableTaskTrailer->ItemCount = 1; - AvailableTaskTrailer->unknown1 = 0xFFFFFFFF; - AvailableTaskTrailer->unknown2 = 0xFFFFFFFF; - AvailableTaskTrailer->StartZone = Tasks[TaskList[i]]->StartZone; - - Ptr = (char *)AvailableTaskTrailer + sizeof(AvailableTaskTrailer_Struct); - - // In some packets, this next string looks like a short task summary, however it doesn't - // appear anywhere in the client window. - sprintf(Ptr, "ABCD"); - Ptr = Ptr + strlen(Ptr) + 1; + buf.WriteInt32(activity.skill_id); + buf.WriteInt32(activity.spell_id); + buf.WriteInt32(activity.ZoneID); + buf.WriteString(activity.desc_override); + } } + auto outapp = new EQApplicationPacket(OP_OpenNewTasksWindow, buf.buffer(), buf.length()); c->QueuePacket(outapp); safe_delete(outapp); @@ -1205,8 +1162,8 @@ void TaskManager::SendTaskSelectorNew(Client *c, Mob *mob, int TaskCount, int *T buf.WriteUInt32(Tasks[TaskList[i]]->Duration); buf.WriteUInt32(static_cast(Tasks[TaskList[i]]->dur_code)); // 1 = Short, 2 = Medium, 3 = Long, anything else Unlimited - buf.WriteString(Tasks[TaskList[i]]->Title.c_str()); // max 64 with null - buf.WriteString(Tasks[TaskList[i]]->Description.c_str()); // max 4000 with null + buf.WriteString(Tasks[TaskList[i]]->Title); // max 64 with null + buf.WriteString(Tasks[TaskList[i]]->Description); // max 4000 with null buf.WriteUInt8(0); // Has reward set flag buf.WriteUInt32(Tasks[TaskList[i]]->ActivityCount); // ActivityCount From 26f1d450fcd0246b38f73c883f57e3780382fbde Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 4 Jul 2018 13:30:24 -0400 Subject: [PATCH 264/670] OP_TaskActivity for older clients --- zone/tasks.cpp | 72 ++++++++++++++++---------------------------------- 1 file changed, 23 insertions(+), 49 deletions(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index f518dfde2..b3b700a44 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -2525,78 +2525,52 @@ void TaskManager::SendTaskActivityLong(Client *c, int TaskID, int ActivityID, in return; } - char *Ptr; + SerializeBuffer buf(100); - TaskActivityHeader_Struct* tah; - TaskActivityData1_Struct* tad1; - TaskActivityTrailer_Struct* tat; - - long PacketLength = sizeof(TaskActivityHeader_Struct) + +sizeof(TaskActivityData1_Struct) + sizeof(TaskActivityTrailer_Struct); - PacketLength = PacketLength + Tasks[TaskID]->Activity[ActivityID].Text1.size() + 1 + - Tasks[TaskID]->Activity[ActivityID].Text2.size() + 1 + - Tasks[TaskID]->Activity[ActivityID].Text3.size() + 1; - - auto outapp = new EQApplicationPacket(OP_TaskActivity, PacketLength); - - tah = (TaskActivityHeader_Struct*)outapp->pBuffer; - - tah->TaskSequenceNumber = ClientTaskIndex; - tah->unknown2 = 0x00000002; - tah->TaskID = TaskID; - tah->ActivityID = ActivityID; - tah->unknown3 = 0x00000000; + buf.WriteUInt32(ClientTaskIndex); + buf.WriteUInt32(static_cast(Tasks[TaskID]->type)); + buf.WriteUInt32(TaskID); + buf.WriteUInt32(ActivityID); + buf.WriteUInt32(0); // unknown3 // We send our 'internal' types as ActivityCastOn. text3 should be set to the activity description, so it makes // no difference to the client. All activity updates will be done based on our interal activity types. if((Tasks[TaskID]->Activity[ActivityID].Type > 0) && Tasks[TaskID]->Activity[ActivityID].Type < 100) - tah->ActivityType = Tasks[TaskID]->Activity[ActivityID].Type; + buf.WriteUInt32(Tasks[TaskID]->Activity[ActivityID].Type); else - tah->ActivityType = ActivityCastOn; + buf.WriteUInt32(ActivityCastOn); // w/e! - tah->Optional = Optional; - tah->unknown5 = 0x00000000; - // One of these unknown fields maybe related to the 'Use On' activity types - Ptr = (char *) tah + sizeof(TaskActivityHeader_Struct); - sprintf(Ptr, "%s", Tasks[TaskID]->Activity[ActivityID].Text1.c_str()); - Ptr = Ptr + strlen(Ptr) + 1; + buf.WriteUInt8(Optional); + buf.WriteUInt32(0); // solo, group, raid - sprintf(Ptr, "%s", Tasks[TaskID]->Activity[ActivityID].Text2.c_str()); - Ptr = Ptr + strlen(Ptr) + 1; - - tad1 = (TaskActivityData1_Struct*)Ptr; - tat = (TaskActivityTrailer_Struct*)Ptr; + buf.WriteString(Tasks[TaskID]->Activity[ActivityID].target_name); // target name string + buf.WriteString(Tasks[TaskID]->Activity[ActivityID].item_list); // item name list if(Tasks[TaskID]->Activity[ActivityID].Type != ActivityGiveCash) - tad1->GoalCount = Tasks[TaskID]->Activity[ActivityID].GoalCount; + buf.WriteUInt32(Tasks[TaskID]->Activity[ActivityID].GoalCount); else // For our internal type GiveCash, where the goal count has the amount of cash that must be given, // we don't want the donecount and goalcount fields cluttered up with potentially large numbers, so we just // send a goalcount of 1, and a bit further down, a donecount of 1 if the activity is complete, 0 otherwise. // The text3 field should decribe the exact activity goal, e.g. give 3500gp to Hasten Bootstrutter. - tad1->GoalCount = 1; + buf.WriteUInt32(1); - tad1->unknown1 = 0xffffffff; - if(!TaskComplete) tad1->unknown2 = 0xffffffff; - else - tad1->unknown2 = 0xcaffffff; + buf.WriteUInt32(Tasks[TaskID]->Activity[ActivityID].skill_id); + buf.WriteUInt32(Tasks[TaskID]->Activity[ActivityID].spell_id); + buf.WriteUInt32(Tasks[TaskID]->Activity[ActivityID].ZoneID); + buf.WriteUInt32(0); - tad1->ZoneID = Tasks[TaskID]->Activity[ActivityID].ZoneID; - tad1->unknown3 = 0x00000000; - - Ptr = (char *) tad1 + sizeof(TaskActivityData1_Struct); - sprintf(Ptr, "%s", Tasks[TaskID]->Activity[ActivityID].Text3.c_str()); - Ptr = Ptr + strlen(Ptr) + 1; - - tat = (TaskActivityTrailer_Struct*)Ptr; + buf.WriteString(Tasks[TaskID]->Activity[ActivityID].desc_override); if(Tasks[TaskID]->Activity[ActivityID].Type != ActivityGiveCash) - tat->DoneCount = c->GetTaskActivityDoneCount(ClientTaskIndex, ActivityID); + buf.WriteUInt32(c->GetTaskActivityDoneCount(ClientTaskIndex, ActivityID)); else // For internal activity types, DoneCount is either 1 if the activity is complete, 0 otherwise. - tat->DoneCount = (c->GetTaskActivityDoneCount(ClientTaskIndex, ActivityID) >= Tasks[TaskID]->Activity[ActivityID].GoalCount); + buf.WriteUInt32((c->GetTaskActivityDoneCount(ClientTaskIndex, ActivityID) >= Tasks[TaskID]->Activity[ActivityID].GoalCount)); - tat->unknown1 = 0x00000001; + buf.WriteUInt32(1); // unknown + auto outapp = new EQApplicationPacket(OP_TaskActivity, buf.buffer(), buf.length()); c->QueuePacket(outapp); safe_delete(outapp); From 2f4fb460070e55e2309da7219599751c989f418f Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 4 Jul 2018 14:36:18 -0400 Subject: [PATCH 265/670] Optional is a DWORD in older packets --- zone/tasks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index b3b700a44..79542510c 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -2540,7 +2540,7 @@ void TaskManager::SendTaskActivityLong(Client *c, int TaskID, int ActivityID, in else buf.WriteUInt32(ActivityCastOn); // w/e! - buf.WriteUInt8(Optional); + buf.WriteUInt32(Optional); buf.WriteUInt32(0); // solo, group, raid buf.WriteString(Tasks[TaskID]->Activity[ActivityID].target_name); // target name string From 0367bc34652a626399332c3866e8b578c18d3c97 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 5 Jul 2018 00:13:19 -0400 Subject: [PATCH 266/670] Task update events should be task type aware now --- common/eq_packet_structs.h | 8 +- zone/client.h | 4 +- zone/tasks.cpp | 392 +++++++++++++++++++++---------------- zone/tasks.h | 28 ++- 4 files changed, 257 insertions(+), 175 deletions(-) diff --git a/common/eq_packet_structs.h b/common/eq_packet_structs.h index 6240222d4..e9ac04939 100644 --- a/common/eq_packet_structs.h +++ b/common/eq_packet_structs.h @@ -3897,11 +3897,11 @@ struct TaskActivityShort_Struct { struct TaskActivityComplete_Struct { uint32 TaskIndex; - uint32 unknown2; // 0x00000002 - uint32 unknown3; + uint32 TaskType; // task, shared task, quest + uint32 TaskID; // must match uint32 ActivityID; - uint32 unknown4; // 0x00000001 - uint32 unknown5; // 0x00000001 + uint32 task_completed; // Broadcasts "Task '%1' Completed" it not 0 and "Task '%1' Failed." if 0 + uint32 stage_complete; // Broadcasts "Task Stage Completed" }; #if 0 diff --git a/zone/client.h b/zone/client.h index 989edf7dd..cb4dbb1ba 100644 --- a/zone/client.h +++ b/zone/client.h @@ -1001,8 +1001,8 @@ public: // Task System Methods void LoadClientTaskState(); void RemoveClientTaskState(); - void SendTaskActivityComplete(int TaskID, int ActivityID, int TaskIndex, int TaskIncomplete=1); - void SendTaskFailed(int TaskID, int TaskIndex); + void SendTaskActivityComplete(int TaskID, int ActivityID, int TaskIndex, TaskType type, int TaskIncomplete=1); + void SendTaskFailed(int TaskID, int TaskIndex, TaskType type); void SendTaskComplete(int TaskIndex); inline ClientTaskState *GetTaskState() const { return taskstate; } diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 79542510c..b77d8c911 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -1468,43 +1468,53 @@ bool ClientTaskState::UpdateTasksByNPC(Client *c, int ActivityType, int NPCTypeI // If the client has no tasks, there is nothing further to check. - if(!taskmanager || ActiveTaskCount == 0) return false; + if (!taskmanager || (ActiveTaskCount == 0 && ActiveTask.TaskID == TASKSLOTEMPTY)) // could be better ... + return false; - for(int i=0; iTaskID == TASKSLOTEMPTY) + continue; // Check if there are any active kill activities for this task - TaskInformation* Task = taskmanager->Tasks[ActiveQuests[i].TaskID]; + auto Task = taskmanager->Tasks[cur_task->TaskID]; - if(Task == nullptr) return false; + if (Task == nullptr) + return false; - for(int j=0; jActivityCount; j++) { + for (int j = 0; j < Task->ActivityCount; j++) { // We are not interested in completed or hidden activities - if(ActiveQuests[i].Activity[j].State != ActivityActive) continue; + if (cur_task->Activity[j].State != ActivityActive) + continue; // We are only interested in Kill activities - if(Task->Activity[j].Type != ActivityType) continue; + if (Task->Activity[j].Type != ActivityType) + continue; // Is there a zone restriction on the activity ? - if((Task->Activity[j].ZoneID >0) && (Task->Activity[j].ZoneID != (int)zone->GetZoneID())) { - Log(Logs::General, Logs::Tasks, "[UPDATE] Char: %s Task: %i, Activity %i, Activity type %i for NPC %i failed zone check", - c->GetName(), ActiveQuests[i].TaskID, j, ActivityType, NPCTypeID); + if ((Task->Activity[j].ZoneID > 0) && (Task->Activity[j].ZoneID != (int)zone->GetZoneID())) { + Log(Logs::General, Logs::Tasks, + "[UPDATE] Char: %s Task: %i, Activity %i, Activity type %i for NPC %i failed zone " + "check", + c->GetName(), cur_task->TaskID, j, ActivityType, NPCTypeID); continue; } // Is the activity to kill this type of NPC ? - switch(Task->Activity[j].GoalMethod) { + switch (Task->Activity[j].GoalMethod) { - case METHODSINGLEID: - if(Task->Activity[j].GoalID != NPCTypeID) continue; - break; - - case METHODLIST: - if(!taskmanager->GoalListManager.IsInList(Task->Activity[j].GoalID, - NPCTypeID)) continue; - break; - - default: - // If METHODQUEST, don't update the activity here + case METHODSINGLEID: + if (Task->Activity[j].GoalID != NPCTypeID) continue; + break; + + case METHODLIST: + if (!taskmanager->GoalListManager.IsInList(Task->Activity[j].GoalID, NPCTypeID)) + continue; + break; + + default: + // If METHODQUEST, don't update the activity here + continue; } // We found an active task to kill this type of NPC, so increment the done count Log(Logs::General, Logs::Tasks, "[UPDATE] Calling increment done count ByNPC"); @@ -1521,26 +1531,32 @@ int ClientTaskState::ActiveSpeakTask(int NPCTypeID) { // This method is to be used from Perl quests only and returns the TaskID of the first // active task found which has an active SpeakWith activity for this NPC. - if(!taskmanager || ActiveTaskCount == 0) return 0; + if (!taskmanager || (ActiveTaskCount == 0 && ActiveTask.TaskID == TASKSLOTEMPTY)) // could be better ... + return 0; - for(int i=0; iTaskID == TASKSLOTEMPTY) + continue; - TaskInformation* Task = taskmanager->Tasks[ActiveQuests[i].TaskID]; + TaskInformation* Task = taskmanager->Tasks[cur_task->TaskID]; - if(Task == nullptr) continue; + if (Task == nullptr) + continue; - for(int j=0; jActivityCount; j++) { + for (int j = 0; j < Task->ActivityCount; j++) { // We are not interested in completed or hidden activities - if(ActiveQuests[i].Activity[j].State != ActivityActive) continue; - if(Task->Activity[j].Type != ActivitySpeakWith) continue; - // Is there a zone restriction on the activity ? - if((Task->Activity[j].ZoneID >0) && (Task->Activity[j].ZoneID != (int)zone->GetZoneID())) { + if (cur_task->Activity[j].State != ActivityActive) + continue; + if (Task->Activity[j].Type != ActivitySpeakWith) + continue; + // Is there a zone restriction on the activity ? + if (Task->Activity[j].ZoneID > 0 && Task->Activity[j].ZoneID != (int)zone->GetZoneID()) continue; - } // Is the activity to speak with this type of NPC ? - if((Task->Activity[j].GoalMethod == METHODQUEST) && - (Task->Activity[j].GoalID == NPCTypeID)) return ActiveQuests[i].TaskID; + if (Task->Activity[j].GoalMethod == METHODQUEST && Task->Activity[j].GoalID == NPCTypeID) + return cur_task->TaskID; } } return 0; @@ -1551,27 +1567,34 @@ int ClientTaskState::ActiveSpeakActivity(int NPCTypeID, int TaskID) { // This method is to be used from Perl quests only and returns the ActivityID of the first // active activity found in the specified task which is to SpeakWith this NPC. - if(!taskmanager || ActiveTaskCount == 0) return -1; - if((TaskID<=0) || (TaskID>=MAXTASKS)) return -1; + if (!taskmanager || (ActiveTaskCount == 0 && ActiveTask.TaskID == TASKSLOTEMPTY)) // could be better ... + return -1; + if (TaskID <= 0 || TaskID >= MAXTASKS) + return -1; - for(int i=0; iTaskID != TaskID) + continue; - TaskInformation* Task = taskmanager->Tasks[ActiveQuests[i].TaskID]; + TaskInformation* Task = taskmanager->Tasks[cur_task->TaskID]; - if(Task == nullptr) continue; + if (Task == nullptr) + continue; - for(int j=0; jActivityCount; j++) { + for (int j = 0; j < Task->ActivityCount; j++) { // We are not interested in completed or hidden activities - if(ActiveQuests[i].Activity[j].State != ActivityActive) continue; - if(Task->Activity[j].Type != ActivitySpeakWith) continue; - // Is there a zone restriction on the activity ? - if((Task->Activity[j].ZoneID >0) && (Task->Activity[j].ZoneID != (int)zone->GetZoneID())) { + if (cur_task->Activity[j].State != ActivityActive) + continue; + if (Task->Activity[j].Type != ActivitySpeakWith) + continue; + // Is there a zone restriction on the activity ? + if (Task->Activity[j].ZoneID > 0 && Task->Activity[j].ZoneID != (int)zone->GetZoneID()) continue; - } // Is the activity to speak with this type of NPC ? - if((Task->Activity[j].GoalMethod == METHODQUEST) && - (Task->Activity[j].GoalID == NPCTypeID)) return j; + if (Task->Activity[j].GoalMethod == METHODQUEST && Task->Activity[j].GoalID == NPCTypeID) + return j; } return 0; } @@ -1588,24 +1611,31 @@ void ClientTaskState::UpdateTasksForItem(Client *c, ActivityType Type, int ItemI Log(Logs::General, Logs::Tasks, "[UPDATE] ClientTaskState::UpdateTasksForItem(%d,%d)", Type, ItemID); - if(ActiveTaskCount == 0) return; + if (!taskmanager || (ActiveTaskCount == 0 && ActiveTask.TaskID == TASKSLOTEMPTY)) // could be better ... + return; - for(int i=0; iTaskID == TASKSLOTEMPTY) + continue; // Check if there are any active loot activities for this task - TaskInformation* Task = taskmanager->Tasks[ActiveQuests[i].TaskID]; + TaskInformation* Task = taskmanager->Tasks[cur_task->TaskID]; - if(Task == nullptr) return; + if (Task == nullptr) + return; - for(int j=0; jActivityCount; j++) { + for (int j = 0; j < Task->ActivityCount; j++) { // We are not interested in completed or hidden activities - if(ActiveQuests[i].Activity[j].State != ActivityActive) continue; + if (cur_task->Activity[j].State != ActivityActive) + continue; // We are only interested in the ActivityType we were called with - if(Task->Activity[j].Type != (int)Type) continue; + if (Task->Activity[j].Type != (int)Type) + continue; // Is there a zone restriction on the activity ? - if((Task->Activity[j].ZoneID >0) && (Task->Activity[j].ZoneID != (int)zone->GetZoneID())) { + if (Task->Activity[j].ZoneID > 0 && Task->Activity[j].ZoneID != (int)zone->GetZoneID()) { Log(Logs::General, Logs::Tasks, "[UPDATE] Char: %s Activity type %i for Item %i failed zone check", c->GetName(), Type, ItemID); continue; @@ -1635,114 +1665,133 @@ void ClientTaskState::UpdateTasksForItem(Client *c, ActivityType Type, int ItemI return; } -void ClientTaskState::UpdateTasksOnExplore(Client *c, int ExploreID) { +void ClientTaskState::UpdateTasksOnExplore(Client *c, int ExploreID) +{ // If the client has no tasks, there is nothing further to check. Log(Logs::General, Logs::Tasks, "[UPDATE] ClientTaskState::UpdateTasksOnExplore(%i)", ExploreID); - if(ActiveTaskCount == 0) return; + if (!taskmanager || (ActiveTaskCount == 0 && ActiveTask.TaskID == TASKSLOTEMPTY)) // could be better ... + return; - for(int i=0; iTaskID == TASKSLOTEMPTY) + continue; // Check if there are any active explore activities for this task - TaskInformation* Task = taskmanager->Tasks[ActiveQuests[i].TaskID]; + TaskInformation *Task = taskmanager->Tasks[cur_task->TaskID]; - if(Task == nullptr) return; + if (Task == nullptr) + return; - for(int j=0; jActivityCount; j++) { + for (int j = 0; j < Task->ActivityCount; j++) { // We are not interested in completed or hidden activities - if(ActiveQuests[i].Activity[j].State != ActivityActive) continue; + if (cur_task->Activity[j].State != ActivityActive) + continue; // We are only interested in explore activities - if(Task->Activity[j].Type != ActivityExplore) continue; - if((Task->Activity[j].ZoneID >0) && (Task->Activity[j].ZoneID != (int)zone->GetZoneID())) { - Log(Logs::General, Logs::Tasks, "[UPDATE] Char: %s Explore exploreid %i failed zone check", - c->GetName(), ExploreID); + if (Task->Activity[j].Type != ActivityExplore) + continue; + if (Task->Activity[j].ZoneID > 0 && Task->Activity[j].ZoneID != (int)zone->GetZoneID()) { + Log(Logs::General, Logs::Tasks, + "[UPDATE] Char: %s Explore exploreid %i failed zone check", c->GetName(), + ExploreID); continue; } // Is the activity to explore this area id ? - switch(Task->Activity[j].GoalMethod) { + switch (Task->Activity[j].GoalMethod) { - case METHODSINGLEID: - if(Task->Activity[j].GoalID != ExploreID) continue; - break; - - case METHODLIST: - if(!taskmanager->GoalListManager.IsInList(Task->Activity[j].GoalID, - ExploreID)) continue; - break; - - default: - // If METHODQUEST, don't update the activity here + case METHODSINGLEID: + if (Task->Activity[j].GoalID != ExploreID) continue; + break; + + case METHODLIST: + if (!taskmanager->GoalListManager.IsInList(Task->Activity[j].GoalID, ExploreID)) + continue; + break; + + default: + // If METHODQUEST, don't update the activity here + continue; } // We found an active task to explore this area, so set done count to goal count // (Only a goal count of 1 makes sense for explore activities?) Log(Logs::General, Logs::Tasks, "[UPDATE] Increment on explore"); IncrementDoneCount(c, Task, i, j, - Task->Activity[j].GoalCount - ActiveQuests[i].Activity[j].DoneCount); - + Task->Activity[j].GoalCount - cur_task->Activity[j].DoneCount); } } return; } -bool ClientTaskState::UpdateTasksOnDeliver(Client *c, std::list& Items, int Cash, int NPCTypeID) { - +bool ClientTaskState::UpdateTasksOnDeliver(Client *c, std::list &Items, int Cash, int NPCTypeID) +{ bool Ret = false; Log(Logs::General, Logs::Tasks, "[UPDATE] ClientTaskState::UpdateTasksForOnDeliver(%d)", NPCTypeID); - if(ActiveTaskCount == 0) return false; + if (!taskmanager || (ActiveTaskCount == 0 && ActiveTask.TaskID == TASKSLOTEMPTY)) // could be better ... + return false; - for(int i=0; iTaskID == TASKSLOTEMPTY) + continue; // Check if there are any active deliver activities for this task - TaskInformation* Task = taskmanager->Tasks[ActiveQuests[i].TaskID]; + TaskInformation *Task = taskmanager->Tasks[cur_task->TaskID]; - if(Task == nullptr) return false; + if (Task == nullptr) + return false; - for(int j=0; jActivityCount; j++) { + for (int j = 0; j < Task->ActivityCount; j++) { // We are not interested in completed or hidden activities - if(ActiveQuests[i].Activity[j].State != ActivityActive) continue; + if (cur_task->Activity[j].State != ActivityActive) + continue; // We are only interested in Deliver activities - if((Task->Activity[j].Type != ActivityDeliver) && - (Task->Activity[j].Type != ActivityGiveCash)) continue; + if (Task->Activity[j].Type != ActivityDeliver && Task->Activity[j].Type != ActivityGiveCash) + continue; // Is there a zone restriction on the activity ? - if((Task->Activity[j].ZoneID >0) && (Task->Activity[j].ZoneID != (int)zone->GetZoneID())) { - Log(Logs::General, Logs::Tasks, "[UPDATE] Char: %s Deliver activity failed zone check (current zone %i, need zone %i", - c->GetName(), zone->GetZoneID(), Task->Activity[j].ZoneID); + if (Task->Activity[j].ZoneID > 0 && Task->Activity[j].ZoneID != (int)zone->GetZoneID()) { + Log(Logs::General, Logs::Tasks, + "[UPDATE] Char: %s Deliver activity failed zone check (current zone %i, need zone " + "%i", + c->GetName(), zone->GetZoneID(), Task->Activity[j].ZoneID); continue; } // Is the activity to deliver to this NPCTypeID ? - if(Task->Activity[j].DeliverToNPC != NPCTypeID) continue; + if (Task->Activity[j].DeliverToNPC != NPCTypeID) + continue; // Is the activity related to these items ? // - if((Task->Activity[j].Type == ActivityGiveCash) && Cash) { + if ((Task->Activity[j].Type == ActivityGiveCash) && Cash) { Log(Logs::General, Logs::Tasks, "[UPDATE] Increment on GiveCash"); IncrementDoneCount(c, Task, i, j, Cash); Ret = true; - } - else { - for(auto& k : Items) { - switch(Task->Activity[j].GoalMethod) { + } else { + for (auto &k : Items) { + switch (Task->Activity[j].GoalMethod) { - case METHODSINGLEID: - if(Task->Activity[j].GoalID != k->GetID()) continue; - break; - - case METHODLIST: - if (!taskmanager->GoalListManager.IsInList(Task->Activity[j].GoalID, k->GetID())) - continue; - break; - - default: - // If METHODQUEST, don't update the activity here + case METHODSINGLEID: + if (Task->Activity[j].GoalID != k->GetID()) continue; + break; + + case METHODLIST: + if (!taskmanager->GoalListManager.IsInList(Task->Activity[j].GoalID, + k->GetID())) + continue; + break; + + default: + // If METHODQUEST, don't update the activity here + continue; } // We found an active task related to this item, so increment the done count Log(Logs::General, Logs::Tasks, "[UPDATE] Increment on GiveItem"); @@ -1756,74 +1805,89 @@ bool ClientTaskState::UpdateTasksOnDeliver(Client *c, std::listTaskID == TASKSLOTEMPTY) + continue; // Check if there are any active explore activities for this task - TaskInformation* Task = taskmanager->Tasks[ActiveQuests[i].TaskID]; + TaskInformation *Task = taskmanager->Tasks[cur_task->TaskID]; - if(Task == nullptr) return; + if (Task == nullptr) + return; - for(int j=0; jActivityCount; j++) { + for (int j = 0; j < Task->ActivityCount; j++) { // We are not interested in completed or hidden activities - if(ActiveQuests[i].Activity[j].State != ActivityActive) continue; + if (cur_task->Activity[j].State != ActivityActive) + continue; // We are only interested in touch activities - if(Task->Activity[j].Type != ActivityTouch) continue; - if(Task->Activity[j].GoalMethod != METHODSINGLEID) continue; - if(Task->Activity[j].ZoneID != ZoneID) { + if (Task->Activity[j].Type != ActivityTouch) + continue; + if (Task->Activity[j].GoalMethod != METHODSINGLEID) + continue; + if (Task->Activity[j].ZoneID != ZoneID) { Log(Logs::General, Logs::Tasks, "[UPDATE] Char: %s Touch activity failed zone check", - c->GetName()); + c->GetName()); continue; } // We found an active task to zone into this zone, so set done count to goal count // (Only a goal count of 1 makes sense for touch activities?) Log(Logs::General, Logs::Tasks, "[UPDATE] Increment on Touch"); IncrementDoneCount(c, Task, i, j, - Task->Activity[j].GoalCount - ActiveQuests[i].Activity[j].DoneCount); + Task->Activity[j].GoalCount - cur_task->Activity[j].DoneCount); } } return; } -void ClientTaskState::IncrementDoneCount(Client *c, TaskInformation* Task, int TaskIndex, int ActivityID, int Count, bool ignore_quest_update) { +void ClientTaskState::IncrementDoneCount(Client *c, TaskInformation *Task, int TaskIndex, int ActivityID, int Count, + bool ignore_quest_update) +{ Log(Logs::General, Logs::Tasks, "[UPDATE] IncrementDoneCount"); - ActiveQuests[TaskIndex].Activity[ActivityID].DoneCount += Count; + auto info = GetClientTaskInfo(Task->type, TaskIndex); - if(ActiveQuests[TaskIndex].Activity[ActivityID].DoneCount > Task->Activity[ActivityID].GoalCount) - ActiveQuests[TaskIndex].Activity[ActivityID].DoneCount = Task->Activity[ActivityID].GoalCount; + if (info == nullptr) + return; + + info->Activity[ActivityID].DoneCount += Count; + + if(info->Activity[ActivityID].DoneCount > Task->Activity[ActivityID].GoalCount) + info->Activity[ActivityID].DoneCount = Task->Activity[ActivityID].GoalCount; if (!ignore_quest_update){ char buf[24]; - snprintf(buf, 23, "%d %d %d", ActiveQuests[TaskIndex].Activity[ActivityID].DoneCount, ActiveQuests[TaskIndex].Activity[ActivityID].ActivityID, ActiveQuests[TaskIndex].TaskID); + snprintf(buf, 23, "%d %d %d", info->Activity[ActivityID].DoneCount, info->Activity[ActivityID].ActivityID, info->TaskID); buf[23] = '\0'; parse->EventPlayer(EVENT_TASK_UPDATE, c, buf, 0); } - ActiveQuests[TaskIndex].Activity[ActivityID].Updated=true; + info->Activity[ActivityID].Updated=true; // Have we reached the goal count for this activity ? - if(ActiveQuests[TaskIndex].Activity[ActivityID].DoneCount >= Task->Activity[ActivityID].GoalCount) { + if(info->Activity[ActivityID].DoneCount >= Task->Activity[ActivityID].GoalCount) { Log(Logs::General, Logs::Tasks, "[UPDATE] Done (%i) = Goal (%i) for Activity %i", - ActiveQuests[TaskIndex].Activity[ActivityID].DoneCount, + info->Activity[ActivityID].DoneCount, Task->Activity[ActivityID].GoalCount, ActivityID); // Flag the activity as complete - ActiveQuests[TaskIndex].Activity[ActivityID].State = ActivityCompleted; + info->Activity[ActivityID].State = ActivityCompleted; // Unlock subsequent activities for this task - bool TaskComplete = UnlockActivities(c->CharacterID(), ActiveQuests[TaskIndex]); // TODO: fix this function + bool TaskComplete = UnlockActivities(c->CharacterID(), *info); Log(Logs::General, Logs::Tasks, "[UPDATE] TaskCompleted is %i", TaskComplete); // and by the 'Task Stage Completed' message - c->SendTaskActivityComplete(ActiveQuests[TaskIndex].TaskID, ActivityID, TaskIndex); + c->SendTaskActivityComplete(info->TaskID, ActivityID, TaskIndex, Task->type); // Send the updated task/activity list to the client taskmanager->SendSingleActiveTaskToClient(c, ActiveQuests[TaskIndex], TaskComplete, false); // Inform the client the task has been updated, both by a chat message @@ -1832,13 +1896,13 @@ void ClientTaskState::IncrementDoneCount(Client *c, TaskInformation* Task, int T if(Task->Activity[ActivityID].GoalMethod != METHODQUEST) { if (!ignore_quest_update){ char buf[24]; - snprintf(buf, 23, "%d %d", ActiveQuests[TaskIndex].TaskID, ActiveQuests[TaskIndex].Activity[ActivityID].ActivityID); + snprintf(buf, 23, "%d %d", info->TaskID, info->Activity[ActivityID].ActivityID); buf[23] = '\0'; parse->EventPlayer(EVENT_TASK_STAGE_COMPLETE, c, buf, 0); } /* QS: PlayerLogTaskUpdates :: Update */ if (RuleB(QueryServ, PlayerLogTaskUpdates)){ - std::string event_desc = StringFormat("Task Stage Complete :: taskid:%i activityid:%i donecount:%i in zoneid:%i instid:%i", ActiveQuests[TaskIndex].TaskID, ActiveQuests[TaskIndex].Activity[ActivityID].ActivityID, ActiveQuests[TaskIndex].Activity[ActivityID].DoneCount, c->GetZoneID(), c->GetInstanceID()); + std::string event_desc = StringFormat("Task Stage Complete :: taskid:%i activityid:%i donecount:%i in zoneid:%i instid:%i", info->TaskID, info->Activity[ActivityID].ActivityID, info->Activity[ActivityID].DoneCount, c->GetZoneID(), c->GetInstanceID()); QServ->PlayerLogEvent(Player_Log_Task_Updates, c->CharacterID(), event_desc); } } @@ -1848,21 +1912,21 @@ void ClientTaskState::IncrementDoneCount(Client *c, TaskInformation* Task, int T // client. This is the same sequence the packets are sent on live. if(TaskComplete) { char buf[24]; - snprintf(buf, 23, "%d %d %d", ActiveQuests[TaskIndex].Activity[ActivityID].DoneCount, ActiveQuests[TaskIndex].Activity[ActivityID].ActivityID, ActiveQuests[TaskIndex].TaskID); + snprintf(buf, 23, "%d %d %d", info->Activity[ActivityID].DoneCount, info->Activity[ActivityID].ActivityID, info->TaskID); buf[23] = '\0'; parse->EventPlayer(EVENT_TASK_COMPLETE, c, buf, 0); /* QS: PlayerLogTaskUpdates :: Complete */ if (RuleB(QueryServ, PlayerLogTaskUpdates)){ - std::string event_desc = StringFormat("Task Complete :: taskid:%i activityid:%i donecount:%i in zoneid:%i instid:%i", ActiveQuests[TaskIndex].TaskID, ActiveQuests[TaskIndex].Activity[ActivityID].ActivityID, ActiveQuests[TaskIndex].Activity[ActivityID].DoneCount, c->GetZoneID(), c->GetInstanceID()); + std::string event_desc = StringFormat("Task Complete :: taskid:%i activityid:%i donecount:%i in zoneid:%i instid:%i", info->TaskID, info->Activity[ActivityID].ActivityID, info->Activity[ActivityID].DoneCount, c->GetZoneID(), c->GetInstanceID()); QServ->PlayerLogEvent(Player_Log_Task_Updates, c->CharacterID(), event_desc); } taskmanager->SendCompletedTasksToClient(c, this); - c->SendTaskActivityComplete(ActiveQuests[TaskIndex].TaskID, 0, TaskIndex, false); + c->SendTaskActivityComplete(info->TaskID, 0, TaskIndex, Task->type, 0); taskmanager->SaveClientState(c, this); //c->SendTaskComplete(TaskIndex); - c->CancelTask(TaskIndex, TaskType::Quest); // TODO: fix + c->CancelTask(TaskIndex, Task->type); //if(Task->RewardMethod != METHODQUEST) RewardTask(c, Task); // If Experience and/or cash rewards are set, reward them from the task even if RewardMethod is METHODQUEST RewardTask(c, Task); @@ -2007,7 +2071,7 @@ void ClientTaskState::FailTask(Client *c, int TaskID) { for(int i=0; iSendTaskFailed(ActiveQuests[i].TaskID, i); + c->SendTaskFailed(ActiveQuests[i].TaskID, i, TaskType::Quest); // TODO: fix // Remove the task from the client c->CancelTask(i, TaskType::Quest); // TODO: fix return; @@ -2231,7 +2295,7 @@ void ClientTaskState::TaskPeriodicChecks(Client *c) { if(TaskOutOfTime(i)) { // Send Red Task Failed Message - c->SendTaskFailed(ActiveQuests[i].TaskID, i); + c->SendTaskFailed(ActiveQuests[i].TaskID, i, TaskType::Quest); // TODO: fix // Remove the task from the client c->CancelTask(i, TaskType::Quest); // TODO: Fix // It is a conscious decision to only fail one task per call to this method, @@ -2362,8 +2426,8 @@ void ClientTaskState::SendTaskHistory(Client *c, int TaskIndex) { } -void Client::SendTaskActivityComplete(int TaskID, int ActivityID, int TaskIndex, int TaskIncomplete) { - +void Client::SendTaskActivityComplete(int TaskID, int ActivityID, int TaskIndex, TaskType type, int TaskIncomplete) +{ // 0x54eb TaskActivityComplete_Struct* tac; @@ -2372,15 +2436,12 @@ void Client::SendTaskActivityComplete(int TaskID, int ActivityID, int TaskIndex, tac = (TaskActivityComplete_Struct*)outapp->pBuffer; - //tac->unknown1 = 0x00000000; tac->TaskIndex = TaskIndex; - tac->unknown2 = 0x00000002; - //tac->unknown3 = 0x00000000; - tac->unknown3 = TaskID; // Correct ? + tac->TaskType = static_cast(type); + tac->TaskID = TaskID; tac->ActivityID = ActivityID; - tac->unknown4 = 0x00000001; - //tac->unknown5 = 0x00000001; - tac->unknown5 = TaskIncomplete; + tac->task_completed = 0x00000001; + tac->stage_complete = TaskIncomplete; QueuePacket(outapp); @@ -2388,8 +2449,8 @@ void Client::SendTaskActivityComplete(int TaskID, int ActivityID, int TaskIndex, } -void Client::SendTaskFailed(int TaskID, int TaskIndex) { - +void Client::SendTaskFailed(int TaskID, int TaskIndex, TaskType type) +{ // 0x54eb char buf[24]; snprintf(buf, 23, "%d", TaskID); @@ -2402,15 +2463,12 @@ void Client::SendTaskFailed(int TaskID, int TaskIndex) { tac = (TaskActivityComplete_Struct*)outapp->pBuffer; - //tac->unknown1 = 0x00000000; tac->TaskIndex = TaskIndex; - tac->unknown2 = 0x00000002; - //tac->unknown3 = 0x00000000; - tac->unknown3 = TaskID; // Correct ? + tac->TaskType = static_cast(type); + tac->TaskID = TaskID; tac->ActivityID = 0; - tac->unknown4 = 0x00000000; //Fail - //tac->unknown5 = 0x00000001; - tac->unknown5 = 0; // 0 for task complete or failed. + tac->task_completed = 0; //Fail + tac->stage_complete = 0; // 0 for task complete or failed. Log(Logs::General, Logs::Tasks, "[UPDATE] TaskFailed"); diff --git a/zone/tasks.h b/zone/tasks.h index 01c08f4a1..91a264f67 100644 --- a/zone/tasks.h +++ b/zone/tasks.h @@ -241,9 +241,33 @@ public: private: bool UnlockActivities(int CharID, ClientTaskInformation &task_info); void IncrementDoneCount(Client *c, TaskInformation *Task, int TaskIndex, int ActivityID, int Count = 1, bool ignore_quest_update = false); + inline ClientTaskInformation *GetClientTaskInfo(TaskType type, int index) + { + ClientTaskInformation *info = nullptr; + switch (type) { + case TaskType::Task: + if (index == 0) + info = &ActiveTask; + break; + case TaskType::Shared: + break; + case TaskType::Quest: + if (index < MAXACTIVEQUESTS) + info = &ActiveQuests[index]; + break; + default: + break; + } + return info; + } int ActiveTaskCount; - ClientTaskInformation ActiveTask; // only one - ClientTaskInformation ActiveQuests[MAXACTIVEQUESTS]; + union { // easier to loop over + struct { + ClientTaskInformation ActiveTask; // only one + ClientTaskInformation ActiveQuests[MAXACTIVEQUESTS]; + }; + ClientTaskInformation ActiveTasks[MAXACTIVEQUESTS + 1]; + }; // Shared tasks should be limited to 1 as well std::vector EnabledTasks; std::vector CompletedTasks; From cf30056cf633c56a537e67e220c6be8871cb59b0 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 5 Jul 2018 00:45:51 -0400 Subject: [PATCH 267/670] Update FailTask, TaskOutOfTime, and TaskPeriodicChecks --- zone/tasks.cpp | 89 ++++++++++++++++++++++++++++++++------------------ zone/tasks.h | 2 +- 2 files changed, 59 insertions(+), 32 deletions(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index b77d8c911..40e03bac3 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -2063,24 +2063,33 @@ bool ClientTaskState::IsTaskActive(int TaskID) return false; } -void ClientTaskState::FailTask(Client *c, int TaskID) { - +void ClientTaskState::FailTask(Client *c, int TaskID) +{ Log(Logs::General, Logs::Tasks, "[UPDATE] FailTask %i, ActiveTaskCount is %i", TaskID, ActiveTaskCount); - if(ActiveTaskCount == 0) return; - - for(int i=0; iSendTaskFailed(ActiveQuests[i].TaskID, i, TaskType::Quest); // TODO: fix - // Remove the task from the client - c->CancelTask(i, TaskType::Quest); // TODO: fix - return; - } + if (ActiveTask.TaskID == TaskID) { + c->SendTaskFailed(TaskID, 0, TaskType::Task); + // Remove the task from the client + c->CancelTask(0, TaskType::Task); + return; } + // TODO: shared tasks + + if (ActiveTaskCount == 0) + return; + + for (int i = 0; i < MAXACTIVEQUESTS; i++) { + if (ActiveQuests[i].TaskID == TaskID) { + c->SendTaskFailed(ActiveQuests[i].TaskID, i, TaskType::Quest); + // Remove the task from the client + c->CancelTask(i, TaskType::Quest); + return; + } + } } +// TODO: tasks bool ClientTaskState::IsTaskActivityActive(int TaskID, int ActivityID) { Log(Logs::General, Logs::Tasks, "[UPDATE] ClientTaskState IsTaskActivityActive(%i, %i).", TaskID, ActivityID); @@ -2265,44 +2274,63 @@ bool TaskManager::IsTaskRepeatable(int TaskID) { return Task->Repeatable; } -bool ClientTaskState::TaskOutOfTime(int Index) { - +bool ClientTaskState::TaskOutOfTime(TaskType type, int Index) +{ // Returns true if the Task in the specified slot has a time limit that has been exceeded. + auto info = GetClientTaskInfo(type, Index); - if((Index < 0) || (Index>=MAXACTIVEQUESTS)) return false; + if (info == nullptr) + return false; - if((ActiveQuests[Index].TaskID <= 0) || (ActiveQuests[Index].TaskID >= MAXTASKS)) return false; + // make sure the TaskID is at least maybe in our array + if (info->TaskID <= 0 || info->TaskID >= MAXTASKS) + return false; int Now = time(nullptr); - TaskInformation* Task = taskmanager->Tasks[ActiveQuests[Index].TaskID]; + TaskInformation *Task = taskmanager->Tasks[info->TaskID]; - if(Task == nullptr) return false; - - return (Task->Duration && (ActiveQuests[Index].AcceptedTime + Task->Duration <= Now)); + if (Task == nullptr) + return false; + return (Task->Duration && (info->AcceptedTime + Task->Duration <= Now)); } -void ClientTaskState::TaskPeriodicChecks(Client *c) { +void ClientTaskState::TaskPeriodicChecks(Client *c) +{ + if (ActiveTask.TaskID == TASKSLOTEMPTY) { + if (TaskOutOfTime(TaskType::Task, 0)) { + // Send Red Task Failed Message + c->SendTaskFailed(ActiveTask.TaskID, 0, TaskType::Task); + // Remove the task from the client + c->CancelTask(0, TaskType::Task); + // It is a conscious decision to only fail one task per call to this method, + // otherwise the player will not see all the failed messages where multiple + // tasks fail at the same time. + return; + } + } - if(ActiveTaskCount == 0) return; + // TODO: shared tasks -- although that will probably be manager in world checking and telling zones to fail us + + if (ActiveTaskCount == 0) + return; // Check for tasks that have failed because they have not been completed in the specified time // - for(int i=0; iSendTaskFailed(ActiveQuests[i].TaskID, i, TaskType::Quest); // TODO: fix + c->SendTaskFailed(ActiveQuests[i].TaskID, i, TaskType::Quest); // Remove the task from the client - c->CancelTask(i, TaskType::Quest); // TODO: Fix + c->CancelTask(i, TaskType::Quest); // It is a conscious decision to only fail one task per call to this method, // otherwise the player will not see all the failed messages where multiple // tasks fail at the same time. break; - } } @@ -2310,13 +2338,12 @@ void ClientTaskState::TaskPeriodicChecks(Client *c) { // This is done in this method because it gives an extra few seconds for the client screen to display // the zone before we send the 'Task Activity Completed' message. // - if(!CheckedTouchActivities) { + if (!CheckedTouchActivities) { UpdateTasksOnTouch(c, zone->GetZoneID()); CheckedTouchActivities = true; } } - #if 0 void Client::SendTaskComplete(int TaskIndex) { diff --git a/zone/tasks.h b/zone/tasks.h index 91a264f67..0208bcb28 100644 --- a/zone/tasks.h +++ b/zone/tasks.h @@ -220,7 +220,7 @@ public: bool UpdateTasksOnDeliver(Client *c, std::list& Items, int Cash, int NPCTypeID); void UpdateTasksOnTouch(Client *c, int ZoneID); void ProcessTaskProximities(Client *c, float X, float Y, float Z); - bool TaskOutOfTime(int Index); + bool TaskOutOfTime(TaskType type, int Index); void TaskPeriodicChecks(Client *c); void SendTaskHistory(Client *c, int TaskIndex); void RewardTask(Client *c, TaskInformation *Task); From 0600b6834a9c7114cfd1c58f09c4eeb09d26e4d4 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 5 Jul 2018 14:58:01 -0400 Subject: [PATCH 268/670] Update IsTaskActivityCompleted, GetTaskActivityDoneCount, GetTaskActivityState --- zone/client.h | 6 ++--- zone/tasks.cpp | 66 ++++++++++++++++++++++++++++++++++++++------------ zone/tasks.h | 6 ++--- 3 files changed, 57 insertions(+), 21 deletions(-) diff --git a/zone/client.h b/zone/client.h index cb4dbb1ba..50282b5c3 100644 --- a/zone/client.h +++ b/zone/client.h @@ -1011,7 +1011,7 @@ public: inline bool IsTaskStateLoaded() { return taskstate != nullptr; } inline bool IsTaskActive(int TaskID) { return (taskstate ? taskstate->IsTaskActive(TaskID) : false); } inline bool IsTaskActivityActive(int TaskID, int ActivityID) { return (taskstate ? taskstate->IsTaskActivityActive(TaskID, ActivityID) : false); } - inline ActivityState GetTaskActivityState(int index, int ActivityID) { return (taskstate ? taskstate->GetTaskActivityState(index, ActivityID) : ActivityHidden); } + inline ActivityState GetTaskActivityState(TaskType type, int index, int ActivityID) { return (taskstate ? taskstate->GetTaskActivityState(type, index, ActivityID) : ActivityHidden); } inline void UpdateTaskActivity(int TaskID, int ActivityID, int Count, bool ignore_quest_update = false) { if (taskstate) taskstate->UpdateTaskActivity(this, TaskID, ActivityID, Count, ignore_quest_update); } inline void ResetTaskActivity(int TaskID, int ActivityID) { if(taskstate) taskstate->ResetTaskActivity(this, TaskID, ActivityID); } inline void UpdateTasksOnKill(int NPCTypeID) { if(taskstate) taskstate->UpdateTasksOnKill(this, NPCTypeID); } @@ -1037,8 +1037,8 @@ public: inline int GetActiveTaskCount() { return (taskstate ? taskstate->GetActiveTaskCount() : 0); } inline int GetActiveTaskID(int index) { return (taskstate ? taskstate->GetActiveTaskID(index) : -1); } inline int GetTaskStartTime(int index) { return (taskstate ? taskstate->GetTaskStartTime(index) : -1); } - inline bool IsTaskActivityCompleted(int index, int ActivityID) { return (taskstate ? taskstate->IsTaskActivityCompleted(index, ActivityID) : false); } - inline int GetTaskActivityDoneCount(int ClientTaskIndex, int ActivityID) { return (taskstate ? taskstate->GetTaskActivityDoneCount(ClientTaskIndex, ActivityID) :0); } + inline bool IsTaskActivityCompleted(TaskType type, int index, int ActivityID) { return (taskstate ? taskstate->IsTaskActivityCompleted(type, index, ActivityID) : false); } + inline int GetTaskActivityDoneCount(TaskType type, int ClientTaskIndex, int ActivityID) { return (taskstate ? taskstate->GetTaskActivityDoneCount(type, ClientTaskIndex, ActivityID) :0); } inline int GetTaskActivityDoneCountFromTaskID(int TaskID, int ActivityID) { return (taskstate ? taskstate->GetTaskActivityDoneCountFromTaskID(TaskID, ActivityID) :0); } inline int ActiveTasksInSet(int TaskSet) { return (taskstate ? taskstate->ActiveTasksInSet(TaskSet) :0); } inline int CompletedTasksInSet(int TaskSet) { return (taskstate ? taskstate->CompletedTasksInSet(TaskSet) :0); } diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 40e03bac3..6dca0c7e9 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -2648,10 +2648,10 @@ void TaskManager::SendTaskActivityLong(Client *c, int TaskID, int ActivityID, in buf.WriteString(Tasks[TaskID]->Activity[ActivityID].desc_override); if(Tasks[TaskID]->Activity[ActivityID].Type != ActivityGiveCash) - buf.WriteUInt32(c->GetTaskActivityDoneCount(ClientTaskIndex, ActivityID)); + buf.WriteUInt32(c->GetTaskActivityDoneCount(Tasks[TaskID]->type, ClientTaskIndex, ActivityID)); else // For internal activity types, DoneCount is either 1 if the activity is complete, 0 otherwise. - buf.WriteUInt32((c->GetTaskActivityDoneCount(ClientTaskIndex, ActivityID) >= Tasks[TaskID]->Activity[ActivityID].GoalCount)); + buf.WriteUInt32((c->GetTaskActivityDoneCount(Tasks[TaskID]->type, ClientTaskIndex, ActivityID) >= Tasks[TaskID]->Activity[ActivityID].GoalCount)); buf.WriteUInt32(1); // unknown @@ -2706,10 +2706,10 @@ void TaskManager::SendTaskActivityNew(Client *c, int TaskID, int ActivityID, int buf.WriteString(Tasks[TaskID]->Activity[ActivityID].desc_override); // description override if(Tasks[TaskID]->Activity[ActivityID].Type != ActivityGiveCash) - buf.WriteUInt32(c->GetTaskActivityDoneCount(ClientTaskIndex, ActivityID)); // DoneCount + buf.WriteUInt32(c->GetTaskActivityDoneCount(Tasks[TaskID]->type, ClientTaskIndex, ActivityID)); // DoneCount else // For internal activity types, DoneCount is either 1 if the activity is complete, 0 otherwise. - buf.WriteUInt32((c->GetTaskActivityDoneCount(ClientTaskIndex, ActivityID) >= Tasks[TaskID]->Activity[ActivityID].GoalCount)); + buf.WriteUInt32((c->GetTaskActivityDoneCount(Tasks[TaskID]->type, ClientTaskIndex, ActivityID) >= Tasks[TaskID]->Activity[ActivityID].GoalCount)); buf.WriteUInt8(1); // unknown9 @@ -2738,7 +2738,7 @@ void TaskManager::SendActiveTasksToClient(Client *c, bool TaskComplete) int Sequence = 0; for(int Activity=0; ActivityGetTaskActivityState(TaskIndex, Activity) != ActivityHidden) { + if(c->GetTaskActivityState(Tasks[TaskID]->type, TaskIndex, Activity) != ActivityHidden) { Log(Logs::General, Logs::Tasks, "[UPDATE] Long: %i, %i, %i Complete=%i", TaskID, Activity, TaskIndex, TaskComplete); if(Activity==GetActivityCount(TaskID)-1) SendTaskActivityLong(c, TaskID, Activity, TaskIndex, @@ -2886,21 +2886,57 @@ void TaskManager::SendActiveTaskDescription(Client *c, int TaskID, ClientTaskInf safe_delete(outapp); } -bool ClientTaskState::IsTaskActivityCompleted(int index, int ActivityID) { +bool ClientTaskState::IsTaskActivityCompleted(TaskType type, int index, int ActivityID) +{ + switch (type) { + case TaskType::Task: + if (index != 0) + return false; + return ActiveTask.Activity[ActivityID].State == ActivityCompleted; + case TaskType::Shared: + return false; // TODO: shared tasks + case TaskType::Quest: + if (index < MAXACTIVEQUESTS) + return ActiveQuests[index].Activity[ActivityID].State == ActivityCompleted; + default: + return false; + } - return (ActiveQuests[index].Activity[ActivityID].State == ActivityCompleted); } -ActivityState ClientTaskState::GetTaskActivityState(int index, int ActivityID) { - - - return ActiveQuests[index].Activity[ActivityID].State; +// should we be defaulting to hidden? +ActivityState ClientTaskState::GetTaskActivityState(TaskType type, int index, int ActivityID) +{ + switch (type) { + case TaskType::Task: + if (index != 0) + return ActivityHidden; + return ActiveTask.Activity[ActivityID].State; + case TaskType::Shared: + return ActivityHidden; // TODO: shared tasks + case TaskType::Quest: + if (index < MAXACTIVEQUESTS) + return ActiveQuests[index].Activity[ActivityID].State; + default: + return ActivityHidden; + } } -int ClientTaskState::GetTaskActivityDoneCount(int index, int ActivityID) { - - return ActiveQuests[index].Activity[ActivityID].DoneCount; - +int ClientTaskState::GetTaskActivityDoneCount(TaskType type, int index, int ActivityID) +{ + switch (type) { + case TaskType::Task: + if (index != 0) + return 0; + return ActiveTask.Activity[ActivityID].DoneCount; + case TaskType::Shared: + return 0; // TODO: shared tasks + case TaskType::Quest: + if (index < MAXACTIVEQUESTS) + return ActiveQuests[index].Activity[ActivityID].DoneCount; + default: + return 0; + } } int ClientTaskState::GetTaskActivityDoneCountFromTaskID(int TaskID, int ActivityID){ diff --git a/zone/tasks.h b/zone/tasks.h index 0208bcb28..32acbc23b 100644 --- a/zone/tasks.h +++ b/zone/tasks.h @@ -196,8 +196,8 @@ public: void ShowClientTasks(Client *c); inline int GetActiveTaskCount() { return ActiveTaskCount; } int GetActiveTaskID(int index); - bool IsTaskActivityCompleted(int index, int ActivityID); - int GetTaskActivityDoneCount(int index, int ActivityID); + bool IsTaskActivityCompleted(TaskType type, int index, int ActivityID); + int GetTaskActivityDoneCount(TaskType type, int index, int ActivityID); int GetTaskActivityDoneCountFromTaskID(int TaskID, int ActivityID); int GetTaskStartTime(int index); void AcceptNewTask(Client *c, int TaskID, int NPCID, bool enforce_level_requirement = false); @@ -206,7 +206,7 @@ public: int IsTaskCompleted(int TaskID); bool IsTaskActive(int TaskID); bool IsTaskActivityActive(int TaskID, int ActivityID); - ActivityState GetTaskActivityState(int index, int ActivityID); + ActivityState GetTaskActivityState(TaskType type, int index, int ActivityID); void UpdateTaskActivity(Client *c, int TaskID, int ActivityID, int Count, bool ignore_quest_update = false); void ResetTaskActivity(Client *c, int TaskID, int ActivityID); void CancelTask(Client *c, int SequenceNumber, TaskType type, bool RemoveFromDB = true); From 5c4ed0becf131b712cb82e2d7d04ad004a89862e Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Thu, 5 Jul 2018 19:46:56 -0400 Subject: [PATCH 269/670] Fix HT and LOH to retry after failure to cast --- zone/special_attacks.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/zone/special_attacks.cpp b/zone/special_attacks.cpp index 7c91c97a7..94a6e99a3 100644 --- a/zone/special_attacks.cpp +++ b/zone/special_attacks.cpp @@ -1540,16 +1540,19 @@ void NPC::DoClassAttacks(Mob *target) { if(ka_time){ int knightreuse = 1000; //lets give it a small cooldown actually. + switch(GetClass()){ case SHADOWKNIGHT: case SHADOWKNIGHTGM:{ - CastSpell(SPELL_NPC_HARM_TOUCH, target->GetID()); - knightreuse = HarmTouchReuseTime * 1000; + if (CastSpell(SPELL_NPC_HARM_TOUCH, target->GetID())) { + knightreuse = HarmTouchReuseTime * 1000; + } break; } case PALADIN: case PALADINGM:{ if(GetHPRatio() < 20) { - CastSpell(SPELL_LAY_ON_HANDS, GetID()); - knightreuse = LayOnHandsReuseTime * 1000; + if (CastSpell(SPELL_LAY_ON_HANDS, GetID())) { + knightreuse = LayOnHandsReuseTime * 1000; + } } else { knightreuse = 2000; //Check again in two seconds. } From c435a7781371f1be70745155dd9db428651eb86c Mon Sep 17 00:00:00 2001 From: Uleat Date: Thu, 5 Jul 2018 21:05:26 -0400 Subject: [PATCH 270/670] Reintegration of inventory-based EQDictionary references --- changelog.txt | 7 + common/CMakeLists.txt | 2 - common/database.cpp | 14 +- common/database_conversions.cpp | 7 +- common/emu_constants.cpp | 35 + common/emu_constants.h | 258 +++-- common/emu_legacy.cpp | 20 - common/emu_legacy.h | 182 ---- common/emu_limits.h | 69 +- common/eq_constants.h | 14 + common/eq_limits.cpp | 1458 ++++++++++++++-------------- common/eq_limits.h | 25 +- common/eq_packet_structs.h | 12 +- common/inventory_profile.cpp | 285 +++--- common/inventory_profile.h | 17 +- common/inventory_slot.cpp | 156 +-- common/inventory_slot.h | 24 +- common/item_data.h | 6 +- common/item_instance.cpp | 118 +-- common/misc_functions.cpp | 2 +- common/misc_functions.h | 2 +- common/patches/rof.cpp | 192 ++-- common/patches/rof2.cpp | 204 ++-- common/patches/rof2_limits.cpp | 272 +++--- common/patches/rof2_limits.h | 344 ++++--- common/patches/rof2_structs.h | 10 +- common/patches/rof_limits.cpp | 266 ++--- common/patches/rof_limits.h | 340 ++++--- common/patches/rof_structs.h | 10 +- common/patches/sod.cpp | 72 +- common/patches/sod_limits.cpp | 238 ++--- common/patches/sod_limits.h | 400 ++++---- common/patches/sod_structs.h | 6 +- common/patches/sof.cpp | 72 +- common/patches/sof_limits.cpp | 238 ++--- common/patches/sof_limits.h | 400 ++++---- common/patches/sof_structs.h | 6 +- common/patches/titanium.cpp | 22 +- common/patches/titanium_limits.cpp | 236 ++--- common/patches/titanium_limits.h | 398 ++++---- common/patches/titanium_structs.h | 6 +- common/patches/uf.cpp | 72 +- common/patches/uf_limits.cpp | 238 ++--- common/patches/uf_limits.h | 400 ++++---- common/patches/uf_structs.h | 6 +- common/say_link.cpp | 14 +- common/shareddb.cpp | 44 +- world/client.cpp | 8 +- world/worlddb.cpp | 4 +- zone/aa.cpp | 2 +- zone/attack.cpp | 110 +-- zone/beacon.h | 2 +- zone/bonuses.cpp | 72 +- zone/bot.cpp | 264 ++--- zone/bot.h | 6 +- zone/bot_command.cpp | 72 +- zone/bot_database.cpp | 28 +- zone/client.cpp | 87 +- zone/client.h | 4 +- zone/client_mods.cpp | 14 +- zone/client_packet.cpp | 70 +- zone/client_process.cpp | 34 +- zone/command.cpp | 58 +- zone/corpse.cpp | 44 +- zone/corpse.h | 2 +- zone/doors.cpp | 2 +- zone/encounter.h | 2 +- zone/entity.h | 2 +- zone/forage.cpp | 14 +- zone/inventory.cpp | 360 +++---- zone/loottables.cpp | 24 +- zone/lua_general.cpp | 82 +- zone/merc.cpp | 28 +- zone/merc.h | 4 +- zone/mob.cpp | 4 +- zone/mob.h | 16 +- zone/mob_ai.cpp | 8 +- zone/npc.cpp | 4 +- zone/npc.h | 4 +- zone/object.cpp | 12 +- zone/pets.cpp | 10 +- zone/questmgr.cpp | 4 +- zone/special_attacks.cpp | 112 +-- zone/spell_effects.cpp | 22 +- zone/spells.cpp | 4 +- zone/tradeskills.cpp | 12 +- zone/trading.cpp | 86 +- zone/tribute.cpp | 30 +- zone/tune.cpp | 42 +- zone/zonedb.cpp | 30 +- zone/zonedb.h | 2 +- 91 files changed, 4474 insertions(+), 4546 deletions(-) delete mode 100644 common/emu_legacy.cpp delete mode 100644 common/emu_legacy.h diff --git a/changelog.txt b/changelog.txt index 2af05c184..ec97647c4 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,12 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 07/05/2018 == +Uleat: Reintegration of inventory-based EQDictionary references + - Standardized 'CONSTANT_DECLARATION' and 'enumerationValue' tokens for most of the affected references + - Added 'BEGIN' and 'END' constants to many inventory-based ranges to help eliminate '< SIZE'-type comparisons + - Eliminated multiple, duplicated reference points of the same value context (bye, bye namespace legacy!) + - Most server values are now linked to the implementation client directly through a 'using ##' directive + == 05/28/2018 == Akkadius: Fixed an issue where size 0 NPC's hop in and out of the ground at idle Akkadius: NPC's now open doors within proximity given the door doesn't have locked requirements diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 8a9d2c673..a00d775ff 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -14,7 +14,6 @@ SET(common_sources dbcore.cpp deity.cpp emu_constants.cpp - emu_legacy.cpp emu_limits.cpp emu_opcodes.cpp emu_versions.cpp @@ -124,7 +123,6 @@ SET(common_headers dbcore.h deity.h emu_constants.h - emu_legacy.h emu_limits.h emu_opcodes.h emu_oplist.h diff --git a/common/database.cpp b/common/database.cpp index 62a8453d1..94a6a2a32 100644 --- a/common/database.cpp +++ b/common/database.cpp @@ -708,7 +708,7 @@ bool Database::StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, EQEmu /* Insert starting inventory... */ std::string invquery; - for (int16 i = EQEmu::legacy::EQUIPMENT_BEGIN; i <= EQEmu::legacy::BANK_BAGS_END;) { + for (int16 i = EQEmu::invslot::EQUIPMENT_BEGIN; i <= EQEmu::invbag::BANK_BAGS_END;) { const EQEmu::ItemInstance* newinv = inv->GetItem(i); if (newinv) { invquery = StringFormat("INSERT INTO `inventory` (charid, slotid, itemid, charges, color) VALUES (%u, %i, %u, %i, %u)", @@ -717,16 +717,16 @@ bool Database::StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, EQEmu auto results = QueryDatabase(invquery); } - if (i == EQEmu::inventory::slotCursor) { - i = EQEmu::legacy::GENERAL_BAGS_BEGIN; + if (i == EQEmu::invslot::slotCursor) { + i = EQEmu::invbag::GENERAL_BAGS_BEGIN; continue; } - else if (i == EQEmu::legacy::CURSOR_BAG_END) { - i = EQEmu::legacy::BANK_BEGIN; + else if (i == EQEmu::invbag::CURSOR_BAG_END) { + i = EQEmu::invslot::BANK_BEGIN; continue; } - else if (i == EQEmu::legacy::BANK_END) { - i = EQEmu::legacy::BANK_BAGS_BEGIN; + else if (i == EQEmu::invslot::BANK_END) { + i = EQEmu::invbag::BANK_BAGS_BEGIN; continue; } i++; diff --git a/common/database_conversions.cpp b/common/database_conversions.cpp index f04e9a93b..0e6c40a6f 100644 --- a/common/database_conversions.cpp +++ b/common/database_conversions.cpp @@ -41,6 +41,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #pragma pack(1) +// all const/macro reference values should really be converted to a magic number for this +// process to ensure that the struct sizes and offsets match up to the corresponding blob + /* Conversion Structs */ namespace Convert { @@ -330,7 +333,7 @@ namespace Convert { /*7212*/ uint32 tribute_points; /*7216*/ uint32 unknown7252; /*7220*/ uint32 tribute_active; //1=active - /*7224*/ Convert::Tribute_Struct tributes[EQEmu::legacy::TRIBUTE_SIZE]; + /*7224*/ Convert::Tribute_Struct tributes[5]; /*7264*/ Convert::Disciplines_Struct disciplines; /*7664*/ uint32 recastTimers[MAX_RECAST_TYPES]; // Timers (GMT of last use) /*7744*/ char unknown7780[160]; @@ -1405,7 +1408,7 @@ bool Database::CheckDatabaseConvertPPDeblob(){ if (rquery != ""){ results = QueryDatabase(rquery); } /* Run Tribute Convert */ first_entry = 0; rquery = ""; - for (i = 0; i < EQEmu::legacy::TRIBUTE_SIZE; i++){ + for (i = 0; i < 5; i++){ if (pp->tributes[i].tribute > 0 && pp->tributes[i].tribute != 4294967295){ if (first_entry != 1){ rquery = StringFormat("REPLACE INTO `character_tribute` (id, tier, tribute) VALUES (%u, %u, %u)", character_id, pp->tributes[i].tier, pp->tributes[i].tribute); diff --git a/common/emu_constants.cpp b/common/emu_constants.cpp index e5e9ae841..e229b7d6d 100644 --- a/common/emu_constants.cpp +++ b/common/emu_constants.cpp @@ -20,6 +20,41 @@ #include "emu_constants.h" +int16 EQEmu::invtype::GetInvTypeSize(int16 inv_type) { + static const int16 local_array[] = { + POSSESSIONS_SIZE, + BANK_SIZE, + SHARED_BANK_SIZE, + TRADE_SIZE, + WORLD_SIZE, + LIMBO_SIZE, + TRIBUTE_SIZE, + TROPHY_TRIBUTE_SIZE, + GUILD_TRIBUTE_SIZE, + MERCHANT_SIZE, + DELETED_SIZE, + CORPSE_SIZE, + BAZAAR_SIZE, + INSPECT_SIZE, + REAL_ESTATE_SIZE, + VIEW_MOD_PC_SIZE, + VIEW_MOD_BANK_SIZE, + VIEW_MOD_SHARED_BANK_SIZE, + VIEW_MOD_LIMBO_SIZE, + ALT_STORAGE_SIZE, + ARCHIVED_SIZE, + MAIL_SIZE, + GUILD_TROPHY_TRIBUTE_SIZE, + KRONO_SIZE, + OTHER_SIZE, + }; + + if (inv_type < TYPE_BEGIN || inv_type > TYPE_END) + return INULL; + + return local_array[inv_type]; +} + const char* EQEmu::bug::CategoryIDToCategoryName(CategoryID category_id) { switch (category_id) { case catVideo: diff --git a/common/emu_constants.h b/common/emu_constants.h index 32968458c..fcddeac09 100644 --- a/common/emu_constants.h +++ b/common/emu_constants.h @@ -21,104 +21,173 @@ #define COMMON_EMU_CONSTANTS_H #include "eq_limits.h" -#include "emu_legacy.h" #include "emu_versions.h" #include +// local definitions are the result of using hybrid-client or server-only values and methods namespace EQEmu { + using RoF2::IINVALID; + using RoF2::INULL; + namespace inventory { - //using namespace RoF2::invtype; - //using namespace RoF2::invslot; - //using namespace RoF2::invbag; - //using namespace RoF2::invaug; - - enum : int16 { typeInvalid = -1, slotInvalid = -1, containerInvalid = -1, socketInvalid = -1 }; // temporary - enum : int16 { typeBegin = 0, slotBegin = 0, containerBegin = 0, socketBegin = 0 }; // temporary - - enum PossessionsSlots : int16 { // temporary - slotCharm = 0, - slotEar1, - slotHead, - slotFace, - slotEar2, - slotNeck, // 5 - slotShoulders, - slotArms, - slotBack, - slotWrist1, - slotWrist2, // 10 - slotRange, - slotHands, - slotPrimary, - slotSecondary, - slotFinger1, // 15 - slotFinger2, - slotChest, - slotLegs, - slotFeet, - slotWaist, // 20 - slotPowerSource = 9999, - slotAmmo = 21, - slotGeneral1, - slotGeneral2, - slotGeneral3, - slotGeneral4, // 25 - slotGeneral5, - slotGeneral6, - slotGeneral7, - slotGeneral8, - slotCursor, // 30 - slotCount - }; - - enum InventoryTypes : int16 { // temporary - typePossessions = 0, - typeBank, - typeSharedBank, - typeTrade, - typeWorld, - typeLimbo, // 5 - typeTribute, - typeTrophyTribute, - typeGuildTribute, - typeMerchant, - typeDeleted, // 10 - typeCorpse, - typeBazaar, - typeInspect, - typeRealEstate, - typeViewMODPC, // 15 - typeViewMODBank, - typeViewMODSharedBank, - typeViewMODLimbo, - typeAltStorage, - typeArchived, // 20 - typeMail, - typeGuildTrophyTribute, - typeKrono, - typeOther, - typeCount - }; - - static int16 SlotCount(int16 type_index) { return 0; } // temporary - - const int16 ContainerCount = 10; // temporary - const int16 SocketCount = 6; // temporary - + } /*inventory*/ - namespace constants { - const EQEmu::versions::ClientVersion CharacterCreationClient = EQEmu::versions::ClientVersion::RoF2; - const size_t CharacterCreationMax = RoF2::constants::CharacterCreationLimit; + namespace invtype { + using namespace RoF2::invtype::enum_; - const size_t SayLinkOpenerSize = 1; - const size_t SayLinkBodySize = RoF2::constants::SayLinkBodySize; - const size_t SayLinkTextSize = 256; // this may be varied until it breaks something (tested:374) - the others are constant - const size_t SayLinkCloserSize = 1; - const size_t SayLinkMaximumSize = (SayLinkOpenerSize + SayLinkBodySize + SayLinkTextSize + SayLinkCloserSize); + using RoF2::invtype::POSSESSIONS_SIZE; + using RoF2::invtype::BANK_SIZE; + using RoF2::invtype::SHARED_BANK_SIZE; + using RoF2::invtype::TRADE_SIZE; + using RoF2::invtype::WORLD_SIZE; + using RoF2::invtype::LIMBO_SIZE; + using RoF2::invtype::TRIBUTE_SIZE; + using RoF2::invtype::TROPHY_TRIBUTE_SIZE; + using RoF2::invtype::GUILD_TRIBUTE_SIZE; + using RoF2::invtype::MERCHANT_SIZE; + using RoF2::invtype::DELETED_SIZE; + using RoF2::invtype::CORPSE_SIZE; + using RoF2::invtype::BAZAAR_SIZE; + using RoF2::invtype::INSPECT_SIZE; + using RoF2::invtype::REAL_ESTATE_SIZE; + using RoF2::invtype::VIEW_MOD_PC_SIZE; + using RoF2::invtype::VIEW_MOD_BANK_SIZE; + using RoF2::invtype::VIEW_MOD_SHARED_BANK_SIZE; + using RoF2::invtype::VIEW_MOD_LIMBO_SIZE; + using RoF2::invtype::ALT_STORAGE_SIZE; + using RoF2::invtype::ARCHIVED_SIZE; + using RoF2::invtype::MAIL_SIZE; + using RoF2::invtype::GUILD_TROPHY_TRIBUTE_SIZE; + using RoF2::invtype::KRONO_SIZE; + using RoF2::invtype::OTHER_SIZE; + + using Titanium::invtype::TRADE_NPC_SIZE; + + using RoF2::invtype::TYPE_INVALID; + using RoF2::invtype::TYPE_BEGIN; + using RoF2::invtype::TYPE_END; + using RoF2::invtype::TYPE_COUNT; + + int16 GetInvTypeSize(int16 inv_type); + using RoF2::invtype::GetInvTypeName; + + } // namespace invtype + + namespace invslot { + using namespace Titanium::invslot::enum_; + + const int16 SLOT_POWER_SOURCE = 9999; + + using RoF2::invslot::SLOT_INVALID; + using RoF2::invslot::SLOT_BEGIN; + + using Titanium::invslot::POSSESSIONS_BEGIN; + using Titanium::invslot::POSSESSIONS_END; + using SoF::invslot::POSSESSIONS_COUNT; + + using Titanium::invslot::EQUIPMENT_BEGIN; + using Titanium::invslot::EQUIPMENT_END; + using Titanium::invslot::EQUIPMENT_COUNT; + + using Titanium::invslot::GENERAL_BEGIN; + using Titanium::invslot::GENERAL_END; + using Titanium::invslot::GENERAL_COUNT; + + using Titanium::invslot::BONUS_BEGIN; + using Titanium::invslot::BONUS_STAT_END; + using Titanium::invslot::BONUS_SKILL_END; + + using Titanium::invslot::BANK_BEGIN; + using SoF::invslot::BANK_END; + + using Titanium::invslot::SHARED_BANK_BEGIN; + using Titanium::invslot::SHARED_BANK_END; + + using Titanium::invslot::TRADE_BEGIN; + using Titanium::invslot::TRADE_END; + + using Titanium::invslot::TRADE_NPC_END; + + using Titanium::invslot::WORLD_BEGIN; + using Titanium::invslot::WORLD_END; + + using Titanium::invslot::TRIBUTE_BEGIN; + using Titanium::invslot::TRIBUTE_END; + + using Titanium::invslot::GUILD_TRIBUTE_BEGIN; + using Titanium::invslot::GUILD_TRIBUTE_END; + + const int16 CORPSE_BEGIN = invslot::slotGeneral1; + const int16 CORPSE_END = CORPSE_BEGIN + invslot::slotCursor; + + using RoF2::invslot::POSSESSIONS_BITMASK; + using RoF2::invslot::CORPSE_BITMASK; + + using RoF2::invslot::GetInvPossessionsSlotName; + using RoF2::invslot::GetInvSlotName; + + } // namespace invslot + + namespace invbag { + using Titanium::invbag::SLOT_INVALID; + using Titanium::invbag::SLOT_BEGIN; + using Titanium::invbag::SLOT_END; + using Titanium::invbag::SLOT_COUNT; + + using Titanium::invbag::GENERAL_BAGS_BEGIN; + const int16 GENERAL_BAGS_COUNT = invslot::GENERAL_COUNT * SLOT_COUNT; + const int16 GENERAL_BAGS_END = (GENERAL_BAGS_BEGIN + GENERAL_BAGS_COUNT) - 1; + + const int16 GENERAL_BAGS_8_COUNT = 8 * SLOT_COUNT; + const int16 GENERAL_BAGS_8_END = (GENERAL_BAGS_BEGIN + GENERAL_BAGS_8_COUNT) - 1; + + const int16 CURSOR_BAG_BEGIN = 331; + const int16 CURSOR_BAG_COUNT = SLOT_COUNT; + const int16 CURSOR_BAG_END = (CURSOR_BAG_BEGIN + CURSOR_BAG_COUNT) - 1; + + using Titanium::invbag::BANK_BAGS_BEGIN; + const int16 BANK_BAGS_COUNT = (invtype::BANK_SIZE * SLOT_COUNT); + const int16 BANK_BAGS_END = (BANK_BAGS_BEGIN + BANK_BAGS_COUNT) - 1; + + const int16 BANK_BAGS_16_COUNT = 16 * SLOT_COUNT; + const int16 BANK_BAGS_16_END = (BANK_BAGS_BEGIN + BANK_BAGS_16_COUNT) - 1; + + using Titanium::invbag::SHARED_BANK_BAGS_BEGIN; + const int16 SHARED_BANK_BAGS_COUNT = invtype::SHARED_BANK_SIZE * SLOT_COUNT; + const int16 SHARED_BANK_BAGS_END = (SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_COUNT) - 1; + + using Titanium::invbag::TRADE_BAGS_BEGIN; + const int16 TRADE_BAGS_COUNT = invtype::TRADE_SIZE * SLOT_COUNT; + const int16 TRADE_BAGS_END = (TRADE_BAGS_BEGIN + TRADE_BAGS_COUNT) - 1; + + using Titanium::invbag::GetInvBagIndexName; + + } // namespace invbag + + namespace invaug { + using RoF2::invaug::SOCKET_INVALID; + using RoF2::invaug::SOCKET_BEGIN; + using RoF2::invaug::SOCKET_END; + using RoF2::invaug::SOCKET_COUNT; + + using RoF2::invaug::GetInvAugIndexName; + + } // namespace invaug + + namespace constants { + const EQEmu::versions::ClientVersion CHARACTER_CREATION_CLIENT = EQEmu::versions::ClientVersion::Titanium; + + using RoF2::constants::CHARACTER_CREATION_LIMIT; + + const size_t SAY_LINK_OPENER_SIZE = 1; + using RoF2::constants::SAY_LINK_BODY_SIZE; + const size_t SAY_LINK_TEXT_SIZE = 256; // this may be varied until it breaks something (tested:374) - the others are constant + const size_t SAY_LINK_CLOSER_SIZE = 1; + const size_t SAY_LINK_MAXIMUM_SIZE = (SAY_LINK_OPENER_SIZE + SAY_LINK_BODY_SIZE + SAY_LINK_TEXT_SIZE + SAY_LINK_CLOSER_SIZE); const int LongBuffs = RoF2::constants::LongBuffs; const int ShortBuffs = RoF2::constants::ShortBuffs; @@ -130,6 +199,21 @@ namespace EQEmu } /*constants*/ + namespace profile { + using RoF2::profile::BANDOLIERS_SIZE; + using RoF2::profile::BANDOLIER_ITEM_COUNT; + + using RoF2::profile::POTION_BELT_SIZE; + + using RoF2::profile::SKILL_ARRAY_SIZE; + + } // namespace profile + + namespace behavior { + using RoF2::behavior::CoinHasWeight; + + } // namespace behavior + namespace bug { enum CategoryID : uint32 { catOther = 0, diff --git a/common/emu_legacy.cpp b/common/emu_legacy.cpp deleted file mode 100644 index 36cb21c36..000000000 --- a/common/emu_legacy.cpp +++ /dev/null @@ -1,20 +0,0 @@ -/* EQEMu: Everquest Server Emulator - - Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY except by those people which sell it, which - are required to give you total support for your newly bought product; - without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#include "emu_legacy.h" diff --git a/common/emu_legacy.h b/common/emu_legacy.h deleted file mode 100644 index 812a33ca1..000000000 --- a/common/emu_legacy.h +++ /dev/null @@ -1,182 +0,0 @@ -/* EQEMu: Everquest Server Emulator - - Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY except by those people which sell it, which - are required to give you total support for your newly bought product; - without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#ifndef COMMON_EMU_LEGACY_H -#define COMMON_EMU_LEGACY_H - -#include "types.h" - -#include - - -namespace EQEmu -{ - // this is for perl and other legacy systems - namespace legacy { - enum InventorySlot { - SLOT_CHARM = 0, - SLOT_EAR01 = 1, - SLOT_HEAD = 2, - SLOT_FACE = 3, - SLOT_EAR02 = 4, - SLOT_NECK = 5, - SLOT_SHOULDER = 6, - SLOT_ARMS = 7, - SLOT_BACK = 8, - SLOT_BRACER01 = 9, - SLOT_BRACER02 = 10, - SLOT_RANGE = 11, - SLOT_HANDS = 12, - SLOT_PRIMARY = 13, - SLOT_SECONDARY = 14, - SLOT_RING01 = 15, - SLOT_RING02 = 16, - SLOT_CHEST = 17, - SLOT_LEGS = 18, - SLOT_FEET = 19, - SLOT_WAIST = 20, - SLOT_POWER_SOURCE = 9999, - SLOT_AMMO = 21, - SLOT_GENERAL_1 = 22, - SLOT_GENERAL_2 = 23, - SLOT_GENERAL_3 = 24, - SLOT_GENERAL_4 = 25, - SLOT_GENERAL_5 = 26, - SLOT_GENERAL_6 = 27, - SLOT_GENERAL_7 = 28, - SLOT_GENERAL_8 = 29, - SLOT_CURSOR = 30, - SLOT_CURSOR_END = (int16)0xFFFE, // I hope no one is using this... - SLOT_TRADESKILL = 1000, - SLOT_AUGMENT = 1001, - SLOT_INVALID = (int16)0xFFFF, - SLOT_POSSESSIONS_BEGIN = 0, - SLOT_POSSESSIONS_END = 30, - SLOT_EQUIPMENT_BEGIN = 0, - SLOT_EQUIPMENT_END = 21, - SLOT_PERSONAL_BEGIN = 22, - SLOT_PERSONAL_END = 29, - SLOT_PERSONAL_BAGS_BEGIN = 251, - SLOT_PERSONAL_BAGS_END = 330, - SLOT_CURSOR_BAG_BEGIN = 331, - SLOT_CURSOR_BAG_END = 340, - SLOT_TRIBUTE_BEGIN = 400, - SLOT_TRIBUTE_END = 404, - SLOT_GUILD_TRIBUTE_BEGIN = 450, - SLOT_GUILD_TRIBUTE_END = 451, - SLOT_BANK_BEGIN = 2000, - SLOT_BANK_END = 2023, - SLOT_BANK_BAGS_BEGIN = 2031, - SLOT_BANK_BAGS_END = 2270, - SLOT_SHARED_BANK_BEGIN = 2500, - SLOT_SHARED_BANK_END = 2501, - SLOT_SHARED_BANK_BAGS_BEGIN = 2531, - SLOT_SHARED_BANK_BAGS_END = 2550, - SLOT_TRADE_BEGIN = 3000, - SLOT_TRADE_END = 3007, - SLOT_TRADE_BAGS_BEGIN = 3031, - SLOT_TRADE_BAGS_END = 3110, - SLOT_WORLD_BEGIN = 4000, - SLOT_WORLD_END = 4009 - }; - - // these are currently hard-coded for existing inventory system..do not use in place of special client version handlers until ready - static const uint16 TYPE_POSSESSIONS_SIZE = 31; - static const uint16 TYPE_BANK_SIZE = 24; - static const uint16 TYPE_SHARED_BANK_SIZE = 2; - static const uint16 TYPE_TRADE_SIZE = 8; - static const uint16 TYPE_WORLD_SIZE = 10; - static const uint16 TYPE_LIMBO_SIZE = 36; - static const uint16 TYPE_TRIBUTE_SIZE = 5; // (need client values) - static const uint16 TYPE_TROPHY_TRIBUTE_SIZE = 0; - static const uint16 TYPE_GUILD_TRIBUTE_SIZE = 0; - static const uint16 TYPE_MERCHANT_SIZE = 0; - static const uint16 TYPE_DELETED_SIZE = 0; - static const uint16 TYPE_CORPSE_SIZE = 31; // no bitmask use..limits to size of client corpse window (see EQLimits::InventoryMapSize(MapCorpse, (m_mob_version), static_cast(inventory_version)); + return false; + } +} + void EQEmu::InventoryProfile::CleanDirty() { auto iter = dirty_inst.begin(); while (iter != dirty_inst.end()) { @@ -140,63 +155,63 @@ EQEmu::ItemInstance* EQEmu::InventoryProfile::GetItem(int16 slot_id) const ItemInstance* result = nullptr; // Cursor - if (slot_id == inventory::slotCursor) { + if (slot_id == invslot::slotCursor) { // Cursor slot result = m_cursor.peek_front(); } // Non bag slots - else if (slot_id >= legacy::TRADE_BEGIN && slot_id <= legacy::TRADE_END) { + else if (slot_id >= invslot::TRADE_BEGIN && slot_id <= invslot::TRADE_END) { result = _GetItem(m_trade, slot_id); } - else if (slot_id >= legacy::SHARED_BANK_BEGIN && slot_id <= legacy::SHARED_BANK_END) { + else if (slot_id >= invslot::SHARED_BANK_BEGIN && slot_id <= invslot::SHARED_BANK_END) { // Shared Bank slots result = _GetItem(m_shbank, slot_id); } - else if (slot_id >= legacy::BANK_BEGIN && slot_id <= legacy::BANK_END) { + else if (slot_id >= invslot::BANK_BEGIN && slot_id <= invslot::BANK_END) { // Bank slots result = _GetItem(m_bank, slot_id); } - else if ((slot_id >= legacy::GENERAL_BEGIN && slot_id <= legacy::GENERAL_END)) { + else if ((slot_id >= invslot::GENERAL_BEGIN && slot_id <= invslot::GENERAL_END)) { // Personal inventory slots result = _GetItem(m_inv, slot_id); } - else if ((slot_id >= legacy::EQUIPMENT_BEGIN && slot_id <= legacy::EQUIPMENT_END) || - (slot_id >= legacy::TRIBUTE_BEGIN && slot_id <= legacy::TRIBUTE_END) || (slot_id == inventory::slotPowerSource)) { + else if ((slot_id >= invslot::EQUIPMENT_BEGIN && slot_id <= invslot::EQUIPMENT_END) || + (slot_id >= invslot::TRIBUTE_BEGIN && slot_id <= invslot::TRIBUTE_END) || (slot_id == invslot::SLOT_POWER_SOURCE)) { // Equippable slots (on body) result = _GetItem(m_worn, slot_id); } // Inner bag slots - else if (slot_id >= legacy::TRADE_BAGS_BEGIN && slot_id <= legacy::TRADE_BAGS_END) { + else if (slot_id >= invbag::TRADE_BAGS_BEGIN && slot_id <= invbag::TRADE_BAGS_END) { // Trade bag slots ItemInstance* inst = _GetItem(m_trade, InventoryProfile::CalcSlotId(slot_id)); if (inst && inst->IsClassBag()) { result = inst->GetItem(InventoryProfile::CalcBagIdx(slot_id)); } } - else if (slot_id >= legacy::SHARED_BANK_BAGS_BEGIN && slot_id <= legacy::SHARED_BANK_BAGS_END) { + else if (slot_id >= invbag::SHARED_BANK_BAGS_BEGIN && slot_id <= invbag::SHARED_BANK_BAGS_END) { // Shared Bank bag slots ItemInstance* inst = _GetItem(m_shbank, InventoryProfile::CalcSlotId(slot_id)); if (inst && inst->IsClassBag()) { result = inst->GetItem(InventoryProfile::CalcBagIdx(slot_id)); } } - else if (slot_id >= legacy::BANK_BAGS_BEGIN && slot_id <= legacy::BANK_BAGS_END) { + else if (slot_id >= invbag::BANK_BAGS_BEGIN && slot_id <= invbag::BANK_BAGS_END) { // Bank bag slots ItemInstance* inst = _GetItem(m_bank, InventoryProfile::CalcSlotId(slot_id)); if (inst && inst->IsClassBag()) { result = inst->GetItem(InventoryProfile::CalcBagIdx(slot_id)); } } - else if (slot_id >= legacy::CURSOR_BAG_BEGIN && slot_id <= legacy::CURSOR_BAG_END) { + else if (slot_id >= invbag::CURSOR_BAG_BEGIN && slot_id <= invbag::CURSOR_BAG_END) { // Cursor bag slots ItemInstance* inst = m_cursor.peek_front(); if (inst && inst->IsClassBag()) { result = inst->GetItem(InventoryProfile::CalcBagIdx(slot_id)); } } - else if (slot_id >= legacy::GENERAL_BAGS_BEGIN && slot_id <= legacy::GENERAL_BAGS_END) { + else if (slot_id >= invbag::GENERAL_BAGS_BEGIN && slot_id <= invbag::GENERAL_BAGS_END) { // Personal inventory bag slots ItemInstance* inst = _GetItem(m_inv, InventoryProfile::CalcSlotId(slot_id)); if (inst && inst->IsClassBag()) { @@ -232,7 +247,7 @@ int16 EQEmu::InventoryProfile::PutItem(int16 slot_id, const ItemInstance& inst) int16 EQEmu::InventoryProfile::PushCursor(const ItemInstance& inst) { m_cursor.push(inst.Clone()); - return inventory::slotCursor; + return invslot::slotCursor; } EQEmu::ItemInstance* EQEmu::InventoryProfile::GetCursorItem() @@ -254,7 +269,7 @@ bool EQEmu::InventoryProfile::SwapItem(int16 slot_a, int16 slot_b, SwapItemFailS fail_state = swapNotAllowed; return false; } - if ((slot_b >= legacy::EQUIPMENT_BEGIN && slot_b <= legacy::EQUIPMENT_END) || slot_b == inventory::slotPowerSource) { + if ((slot_b >= invslot::EQUIPMENT_BEGIN && slot_b <= invslot::EQUIPMENT_END) || slot_b == invslot::SLOT_POWER_SOURCE) { auto item_a = inst_a->GetItem(); if (!item_a) { fail_state = swapNullData; @@ -280,7 +295,7 @@ bool EQEmu::InventoryProfile::SwapItem(int16 slot_a, int16 slot_b, SwapItemFailS fail_state = swapNotAllowed; return false; } - if ((slot_a >= legacy::EQUIPMENT_BEGIN && slot_a <= legacy::EQUIPMENT_END) || slot_a == inventory::slotPowerSource) { + if ((slot_a >= invslot::EQUIPMENT_BEGIN && slot_a <= invslot::EQUIPMENT_END) || slot_a == invslot::SLOT_POWER_SOURCE) { auto item_b = inst_b->GetItem(); if (!item_b) { fail_state = swapNullData; @@ -361,30 +376,30 @@ EQEmu::ItemInstance* EQEmu::InventoryProfile::PopItem(int16 slot_id) { ItemInstance* p = nullptr; - if (slot_id == inventory::slotCursor) { + if (slot_id == invslot::slotCursor) { p = m_cursor.pop(); } - else if ((slot_id >= legacy::EQUIPMENT_BEGIN && slot_id <= legacy::EQUIPMENT_END) || (slot_id == inventory::slotPowerSource)) { + else if ((slot_id >= invslot::EQUIPMENT_BEGIN && slot_id <= invslot::EQUIPMENT_END) || (slot_id == invslot::SLOT_POWER_SOURCE)) { p = m_worn[slot_id]; m_worn.erase(slot_id); } - else if ((slot_id >= legacy::GENERAL_BEGIN && slot_id <= legacy::GENERAL_END)) { + else if ((slot_id >= invslot::GENERAL_BEGIN && slot_id <= invslot::GENERAL_END)) { p = m_inv[slot_id]; m_inv.erase(slot_id); } - else if (slot_id >= legacy::TRIBUTE_BEGIN && slot_id <= legacy::TRIBUTE_END) { + else if (slot_id >= invslot::TRIBUTE_BEGIN && slot_id <= invslot::TRIBUTE_END) { p = m_worn[slot_id]; m_worn.erase(slot_id); } - else if (slot_id >= legacy::BANK_BEGIN && slot_id <= legacy::BANK_END) { + else if (slot_id >= invslot::BANK_BEGIN && slot_id <= invslot::BANK_END) { p = m_bank[slot_id]; m_bank.erase(slot_id); } - else if (slot_id >= legacy::SHARED_BANK_BEGIN && slot_id <= legacy::SHARED_BANK_END) { + else if (slot_id >= invslot::SHARED_BANK_BEGIN && slot_id <= invslot::SHARED_BANK_END) { p = m_shbank[slot_id]; m_shbank.erase(slot_id); } - else if (slot_id >= legacy::TRADE_BEGIN && slot_id <= legacy::TRADE_END) { + else if (slot_id >= invslot::TRADE_BEGIN && slot_id <= invslot::TRADE_END) { p = m_trade[slot_id]; m_trade.erase(slot_id); } @@ -404,7 +419,7 @@ bool EQEmu::InventoryProfile::HasSpaceForItem(const ItemData *ItemToTry, int16 Q if (ItemToTry->Stackable) { - for (int16 i = legacy::GENERAL_BEGIN; i <= legacy::GENERAL_END; i++) { + for (int16 i = invslot::GENERAL_BEGIN; i <= invslot::GENERAL_END; i++) { ItemInstance* InvItem = GetItem(i); @@ -420,9 +435,9 @@ bool EQEmu::InventoryProfile::HasSpaceForItem(const ItemData *ItemToTry, int16 Q } if (InvItem && InvItem->IsClassBag()) { - int16 BaseSlotID = InventoryProfile::CalcSlotId(i, inventory::containerBegin); + int16 BaseSlotID = InventoryProfile::CalcSlotId(i, invbag::SLOT_BEGIN); uint8 BagSize = InvItem->GetItem()->BagSlots; - for (uint8 BagSlot = inventory::containerBegin; BagSlot < BagSize; BagSlot++) { + for (uint8 BagSlot = invbag::SLOT_BEGIN; BagSlot < BagSize; BagSlot++) { InvItem = GetItem(BaseSlotID + BagSlot); @@ -441,7 +456,7 @@ bool EQEmu::InventoryProfile::HasSpaceForItem(const ItemData *ItemToTry, int16 Q } } - for (int16 i = legacy::GENERAL_BEGIN; i <= legacy::GENERAL_END; i++) { + for (int16 i = invslot::GENERAL_BEGIN; i <= invslot::GENERAL_END; i++) { ItemInstance* InvItem = GetItem(i); @@ -464,11 +479,11 @@ bool EQEmu::InventoryProfile::HasSpaceForItem(const ItemData *ItemToTry, int16 Q } else if (InvItem->IsClassBag() && CanItemFitInContainer(ItemToTry, InvItem->GetItem())) { - int16 BaseSlotID = InventoryProfile::CalcSlotId(i, inventory::containerBegin); + int16 BaseSlotID = InventoryProfile::CalcSlotId(i, invbag::SLOT_BEGIN); uint8 BagSize = InvItem->GetItem()->BagSlots; - for (uint8 BagSlot = inventory::containerBegin; BagSlotIsClassBag() && inst->GetItem()->BagSize >= min_size) { @@ -663,11 +678,11 @@ int16 EQEmu::InventoryProfile::FindFreeSlot(bool for_bag, bool try_cursor, uint8 continue; } - int16 base_slot_id = InventoryProfile::CalcSlotId(i, inventory::containerBegin); + int16 base_slot_id = InventoryProfile::CalcSlotId(i, invbag::SLOT_BEGIN); uint8 slots = inst->GetItem()->BagSlots; uint8 j; - for (j = inventory::containerBegin; j legacy::GENERAL_END)) + if ((general_start < invslot::GENERAL_BEGIN) || (general_start > invslot::GENERAL_END)) return INVALID_INDEX; - if (bag_start >= inventory::ContainerCount) + if (bag_start > invbag::SLOT_END) return INVALID_INDEX; if (!inst || !inst->GetID()) @@ -704,17 +719,17 @@ int16 EQEmu::InventoryProfile::FindFreeSlotForTradeItem(const ItemInstance* inst // step 1: find room for bags (caller should really ask for slots for bags first to avoid sending them to cursor..and bag item loss) if (inst->IsClassBag()) { - for (int16 free_slot = general_start; free_slot <= legacy::GENERAL_END; ++free_slot) { + for (int16 free_slot = general_start; free_slot <= invslot::GENERAL_END; ++free_slot) { if (!m_inv[free_slot]) return free_slot; } - return inventory::slotCursor; // return cursor since bags do not stack and will not fit inside other bags..yet...) + return invslot::slotCursor; // return cursor since bags do not stack and will not fit inside other bags..yet...) } // step 2: find partial room for stackables if (inst->IsStackable()) { - for (int16 free_slot = general_start; free_slot <= legacy::GENERAL_END; ++free_slot) { + for (int16 free_slot = general_start; free_slot <= invslot::GENERAL_END; ++free_slot) { const ItemInstance* main_inst = m_inv[free_slot]; if (!main_inst) @@ -724,15 +739,15 @@ int16 EQEmu::InventoryProfile::FindFreeSlotForTradeItem(const ItemInstance* inst return free_slot; } - for (int16 free_slot = general_start; free_slot <= legacy::GENERAL_END; ++free_slot) { + for (int16 free_slot = general_start; free_slot <= invslot::GENERAL_END; ++free_slot) { const ItemInstance* main_inst = m_inv[free_slot]; if (!main_inst) continue; if (main_inst->IsClassBag()) { // if item-specific containers already have bad items, we won't fix it here... - uint8 _bag_start = (free_slot > general_start) ? inventory::containerBegin : bag_start; - for (uint8 free_bag_slot = _bag_start; (free_bag_slot < main_inst->GetItem()->BagSlots) && (free_bag_slot < inventory::ContainerCount); ++free_bag_slot) { + uint8 _bag_start = (free_slot > general_start) ? invbag::SLOT_BEGIN : bag_start; + for (uint8 free_bag_slot = _bag_start; (free_bag_slot < main_inst->GetItem()->BagSlots) && (free_bag_slot <= invbag::SLOT_END); ++free_bag_slot) { const ItemInstance* sub_inst = main_inst->GetItem(free_bag_slot); if (!sub_inst) @@ -747,14 +762,14 @@ int16 EQEmu::InventoryProfile::FindFreeSlotForTradeItem(const ItemInstance* inst // step 3a: find room for container-specific items (ItemClassArrow) if (inst->GetItem()->ItemType == item::ItemTypeArrow) { - for (int16 free_slot = general_start; free_slot <= legacy::GENERAL_END; ++free_slot) { + for (int16 free_slot = general_start; free_slot <= invslot::GENERAL_END; ++free_slot) { const ItemInstance* main_inst = m_inv[free_slot]; if (!main_inst || (main_inst->GetItem()->BagType != item::BagTypeQuiver) || !main_inst->IsClassBag()) continue; - uint8 _bag_start = (free_slot > general_start) ? inventory::containerBegin : bag_start; - for (uint8 free_bag_slot = _bag_start; (free_bag_slot < main_inst->GetItem()->BagSlots) && (free_bag_slot < inventory::ContainerCount); ++free_bag_slot) { + uint8 _bag_start = (free_slot > general_start) ? invbag::SLOT_BEGIN : bag_start; + for (uint8 free_bag_slot = _bag_start; (free_bag_slot < main_inst->GetItem()->BagSlots) && (free_bag_slot <= invbag::SLOT_END); ++free_bag_slot) { if (!main_inst->GetItem(free_bag_slot)) return InventoryProfile::CalcSlotId(free_slot, free_bag_slot); } @@ -763,14 +778,14 @@ int16 EQEmu::InventoryProfile::FindFreeSlotForTradeItem(const ItemInstance* inst // step 3b: find room for container-specific items (ItemClassSmallThrowing) if (inst->GetItem()->ItemType == item::ItemTypeSmallThrowing) { - for (int16 free_slot = general_start; free_slot <= legacy::GENERAL_END; ++free_slot) { + for (int16 free_slot = general_start; free_slot <= invslot::GENERAL_END; ++free_slot) { const ItemInstance* main_inst = m_inv[free_slot]; if (!main_inst || (main_inst->GetItem()->BagType != item::BagTypeBandolier) || !main_inst->IsClassBag()) continue; - uint8 _bag_start = (free_slot > general_start) ? inventory::containerBegin : bag_start; - for (uint8 free_bag_slot = _bag_start; (free_bag_slot < main_inst->GetItem()->BagSlots) && (free_bag_slot < inventory::ContainerCount); ++free_bag_slot) { + uint8 _bag_start = (free_slot > general_start) ? invbag::SLOT_BEGIN : bag_start; + for (uint8 free_bag_slot = _bag_start; (free_bag_slot < main_inst->GetItem()->BagSlots) && (free_bag_slot <= invbag::SLOT_END); ++free_bag_slot) { if (!main_inst->GetItem(free_bag_slot)) return InventoryProfile::CalcSlotId(free_slot, free_bag_slot); } @@ -778,22 +793,22 @@ int16 EQEmu::InventoryProfile::FindFreeSlotForTradeItem(const ItemInstance* inst } // step 4: just find an empty slot - for (int16 free_slot = general_start; free_slot <= legacy::GENERAL_END; ++free_slot) { + for (int16 free_slot = general_start; free_slot <= invslot::GENERAL_END; ++free_slot) { const ItemInstance* main_inst = m_inv[free_slot]; if (!main_inst) return free_slot; } - for (int16 free_slot = general_start; free_slot <= legacy::GENERAL_END; ++free_slot) { + for (int16 free_slot = general_start; free_slot <= invslot::GENERAL_END; ++free_slot) { const ItemInstance* main_inst = m_inv[free_slot]; if (main_inst && main_inst->IsClassBag()) { if ((main_inst->GetItem()->BagSize < inst->GetItem()->Size) || (main_inst->GetItem()->BagType == item::BagTypeBandolier) || (main_inst->GetItem()->BagType == item::BagTypeQuiver)) continue; - uint8 _bag_start = (free_slot > general_start) ? inventory::containerBegin : bag_start; - for (uint8 free_bag_slot = _bag_start; (free_bag_slot < main_inst->GetItem()->BagSlots) && (free_bag_slot < inventory::ContainerCount); ++free_bag_slot) { + uint8 _bag_start = (free_slot > general_start) ? invbag::SLOT_BEGIN : bag_start; + for (uint8 free_bag_slot = _bag_start; (free_bag_slot < main_inst->GetItem()->BagSlots) && (free_bag_slot <= invbag::SLOT_END); ++free_bag_slot) { if (!main_inst->GetItem(free_bag_slot)) return InventoryProfile::CalcSlotId(free_slot, free_bag_slot); } @@ -801,7 +816,7 @@ int16 EQEmu::InventoryProfile::FindFreeSlotForTradeItem(const ItemInstance* inst } //return INVALID_INDEX; // everything else pushes to the cursor - return inventory::slotCursor; + return invslot::slotCursor; } // Opposite of below: Get parent bag slot_id from a slot inside of bag @@ -813,20 +828,20 @@ int16 EQEmu::InventoryProfile::CalcSlotId(int16 slot_id) { // parent_slot_id = EmuConstants::BANK_BEGIN + (slot_id - EmuConstants::BANK_BEGIN) / EmuConstants::ITEM_CONTAINER_SIZE; //else if (slot_id >= 3100 && slot_id <= 3179) should be {3031..3110}..where did this range come from!!? (verified db save range) - if (slot_id >= legacy::GENERAL_BAGS_BEGIN && slot_id <= legacy::GENERAL_BAGS_END) { - parent_slot_id = legacy::GENERAL_BEGIN + (slot_id - legacy::GENERAL_BAGS_BEGIN) / inventory::ContainerCount; + if (slot_id >= invbag::GENERAL_BAGS_BEGIN && slot_id <= invbag::GENERAL_BAGS_END) { + parent_slot_id = invslot::GENERAL_BEGIN + (slot_id - invbag::GENERAL_BAGS_BEGIN) / invbag::SLOT_COUNT; } - else if (slot_id >= legacy::CURSOR_BAG_BEGIN && slot_id <= legacy::CURSOR_BAG_END) { - parent_slot_id = inventory::slotCursor; + else if (slot_id >= invbag::CURSOR_BAG_BEGIN && slot_id <= invbag::CURSOR_BAG_END) { + parent_slot_id = invslot::slotCursor; } - else if (slot_id >= legacy::BANK_BAGS_BEGIN && slot_id <= legacy::BANK_BAGS_END) { - parent_slot_id = legacy::BANK_BEGIN + (slot_id - legacy::BANK_BAGS_BEGIN) / inventory::ContainerCount; + else if (slot_id >= invbag::BANK_BAGS_BEGIN && slot_id <= invbag::BANK_BAGS_END) { + parent_slot_id = invslot::BANK_BEGIN + (slot_id - invbag::BANK_BAGS_BEGIN) / invbag::SLOT_COUNT; } - else if (slot_id >= legacy::SHARED_BANK_BAGS_BEGIN && slot_id <= legacy::SHARED_BANK_BAGS_END) { - parent_slot_id = legacy::SHARED_BANK_BEGIN + (slot_id - legacy::SHARED_BANK_BAGS_BEGIN) / inventory::ContainerCount; + else if (slot_id >= invbag::SHARED_BANK_BAGS_BEGIN && slot_id <= invbag::SHARED_BANK_BAGS_END) { + parent_slot_id = invslot::SHARED_BANK_BEGIN + (slot_id - invbag::SHARED_BANK_BAGS_BEGIN) / invbag::SLOT_COUNT; } - else if (slot_id >= legacy::TRADE_BAGS_BEGIN && slot_id <= legacy::TRADE_BAGS_END) { - parent_slot_id = legacy::TRADE_BEGIN + (slot_id - legacy::TRADE_BAGS_BEGIN) / inventory::ContainerCount; + else if (slot_id >= invbag::TRADE_BAGS_BEGIN && slot_id <= invbag::TRADE_BAGS_END) { + parent_slot_id = invslot::TRADE_BEGIN + (slot_id - invbag::TRADE_BAGS_BEGIN) / invbag::SLOT_COUNT; } return parent_slot_id; @@ -839,20 +854,20 @@ int16 EQEmu::InventoryProfile::CalcSlotId(int16 bagslot_id, uint8 bagidx) { int16 slot_id = INVALID_INDEX; - if (bagslot_id == inventory::slotCursor || bagslot_id == 8000) { - slot_id = legacy::CURSOR_BAG_BEGIN + bagidx; + if (bagslot_id == invslot::slotCursor || bagslot_id == 8000) { + slot_id = invbag::CURSOR_BAG_BEGIN + bagidx; } - else if (bagslot_id >= legacy::GENERAL_BEGIN && bagslot_id <= legacy::GENERAL_END) { - slot_id = legacy::GENERAL_BAGS_BEGIN + (bagslot_id - legacy::GENERAL_BEGIN) * inventory::ContainerCount + bagidx; + else if (bagslot_id >= invslot::GENERAL_BEGIN && bagslot_id <= invslot::GENERAL_END) { + slot_id = invbag::GENERAL_BAGS_BEGIN + (bagslot_id - invslot::GENERAL_BEGIN) * invbag::SLOT_COUNT + bagidx; } - else if (bagslot_id >= legacy::BANK_BEGIN && bagslot_id <= legacy::BANK_END) { - slot_id = legacy::BANK_BAGS_BEGIN + (bagslot_id - legacy::BANK_BEGIN) * inventory::ContainerCount + bagidx; + else if (bagslot_id >= invslot::BANK_BEGIN && bagslot_id <= invslot::BANK_END) { + slot_id = invbag::BANK_BAGS_BEGIN + (bagslot_id - invslot::BANK_BEGIN) * invbag::SLOT_COUNT + bagidx; } - else if (bagslot_id >= legacy::SHARED_BANK_BEGIN && bagslot_id <= legacy::SHARED_BANK_END) { - slot_id = legacy::SHARED_BANK_BAGS_BEGIN + (bagslot_id - legacy::SHARED_BANK_BEGIN) * inventory::ContainerCount + bagidx; + else if (bagslot_id >= invslot::SHARED_BANK_BEGIN && bagslot_id <= invslot::SHARED_BANK_END) { + slot_id = invbag::SHARED_BANK_BAGS_BEGIN + (bagslot_id - invslot::SHARED_BANK_BEGIN) * invbag::SLOT_COUNT + bagidx; } - else if (bagslot_id >= legacy::TRADE_BEGIN && bagslot_id <= legacy::TRADE_END) { - slot_id = legacy::TRADE_BAGS_BEGIN + (bagslot_id - legacy::TRADE_BEGIN) * inventory::ContainerCount + bagidx; + else if (bagslot_id >= invslot::TRADE_BEGIN && bagslot_id <= invslot::TRADE_END) { + slot_id = invbag::TRADE_BAGS_BEGIN + (bagslot_id - invslot::TRADE_BEGIN) * invbag::SLOT_COUNT + bagidx; } return slot_id; @@ -865,23 +880,23 @@ uint8 EQEmu::InventoryProfile::CalcBagIdx(int16 slot_id) { //else if (slot_id >= EmuConstants::BANK_BEGIN && slot_id <= EmuConstants::BANK_END) // index = (slot_id - EmuConstants::BANK_BEGIN) % EmuConstants::ITEM_CONTAINER_SIZE; - if (slot_id >= legacy::GENERAL_BAGS_BEGIN && slot_id <= legacy::GENERAL_BAGS_END) { - index = (slot_id - legacy::GENERAL_BAGS_BEGIN) % inventory::ContainerCount; + if (slot_id >= invbag::GENERAL_BAGS_BEGIN && slot_id <= invbag::GENERAL_BAGS_END) { + index = (slot_id - invbag::GENERAL_BAGS_BEGIN) % invbag::SLOT_COUNT; } - else if (slot_id >= legacy::CURSOR_BAG_BEGIN && slot_id <= legacy::CURSOR_BAG_END) { - index = (slot_id - legacy::CURSOR_BAG_BEGIN); // % inventory::ContainerCount; - not needed since range is 10 slots + else if (slot_id >= invbag::CURSOR_BAG_BEGIN && slot_id <= invbag::CURSOR_BAG_END) { + index = (slot_id - invbag::CURSOR_BAG_BEGIN); // % invbag::SLOT_COUNT; - not needed since range is 10 slots } - else if (slot_id >= legacy::BANK_BAGS_BEGIN && slot_id <= legacy::BANK_BAGS_END) { - index = (slot_id - legacy::BANK_BAGS_BEGIN) % inventory::ContainerCount; + else if (slot_id >= invbag::BANK_BAGS_BEGIN && slot_id <= invbag::BANK_BAGS_END) { + index = (slot_id - invbag::BANK_BAGS_BEGIN) % invbag::SLOT_COUNT; } - else if (slot_id >= legacy::SHARED_BANK_BAGS_BEGIN && slot_id <= legacy::SHARED_BANK_BAGS_END) { - index = (slot_id - legacy::SHARED_BANK_BAGS_BEGIN) % inventory::ContainerCount; + else if (slot_id >= invbag::SHARED_BANK_BAGS_BEGIN && slot_id <= invbag::SHARED_BANK_BAGS_END) { + index = (slot_id - invbag::SHARED_BANK_BAGS_BEGIN) % invbag::SLOT_COUNT; } - else if (slot_id >= legacy::TRADE_BAGS_BEGIN && slot_id <= legacy::TRADE_BAGS_END) { - index = (slot_id - legacy::TRADE_BAGS_BEGIN) % inventory::ContainerCount; + else if (slot_id >= invbag::TRADE_BAGS_BEGIN && slot_id <= invbag::TRADE_BAGS_END) { + index = (slot_id - invbag::TRADE_BAGS_BEGIN) % invbag::SLOT_COUNT; } - else if (slot_id >= legacy::WORLD_BEGIN && slot_id <= legacy::WORLD_END) { - index = (slot_id - legacy::WORLD_BEGIN); // % inventory::ContainerCount; - not needed since range is 10 slots + else if (slot_id >= invslot::WORLD_BEGIN && slot_id <= invslot::WORLD_END) { + index = (slot_id - invslot::WORLD_BEGIN); // % invbag::SLOT_COUNT; - not needed since range is 10 slots } return index; @@ -892,23 +907,23 @@ int16 EQEmu::InventoryProfile::CalcSlotFromMaterial(uint8 material) switch (material) { case textures::armorHead: - return inventory::slotHead; + return invslot::slotHead; case textures::armorChest: - return inventory::slotChest; + return invslot::slotChest; case textures::armorArms: - return inventory::slotArms; + return invslot::slotArms; case textures::armorWrist: - return inventory::slotWrist1; // there's 2 bracers, only one bracer material + return invslot::slotWrist1; // there's 2 bracers, only one bracer material case textures::armorHands: - return inventory::slotHands; + return invslot::slotHands; case textures::armorLegs: - return inventory::slotLegs; + return invslot::slotLegs; case textures::armorFeet: - return inventory::slotFeet; + return invslot::slotFeet; case textures::weaponPrimary: - return inventory::slotPrimary; + return invslot::slotPrimary; case textures::weaponSecondary: - return inventory::slotSecondary; + return invslot::slotSecondary; default: return INVALID_INDEX; } @@ -918,24 +933,24 @@ uint8 EQEmu::InventoryProfile::CalcMaterialFromSlot(int16 equipslot) { switch (equipslot) { - case inventory::slotHead: + case invslot::slotHead: return textures::armorHead; - case inventory::slotChest: + case invslot::slotChest: return textures::armorChest; - case inventory::slotArms: + case invslot::slotArms: return textures::armorArms; - case inventory::slotWrist1: + case invslot::slotWrist1: //case SLOT_BRACER02: // non-live behavior return textures::armorWrist; - case inventory::slotHands: + case invslot::slotHands: return textures::armorHands; - case inventory::slotLegs: + case invslot::slotLegs: return textures::armorLegs; - case inventory::slotFeet: + case invslot::slotFeet: return textures::armorFeet; - case inventory::slotPrimary: + case invslot::slotPrimary: return textures::weaponPrimary; - case inventory::slotSecondary: + case invslot::slotSecondary: return textures::weaponSecondary; default: return textures::materialInvalid; @@ -962,11 +977,11 @@ bool EQEmu::InventoryProfile::CanItemFitInContainer(const ItemData *ItemToTry, c bool EQEmu::InventoryProfile::SupportsClickCasting(int16 slot_id) { // there are a few non-potion items that identify as ItemTypePotion..so, we still need to ubiquitously include the equipment range - if ((uint16)slot_id <= legacy::GENERAL_END || slot_id == inventory::slotPowerSource) + if ((uint16)slot_id <= invslot::GENERAL_END || slot_id == invslot::SLOT_POWER_SOURCE) { return true; } - else if (slot_id >= legacy::GENERAL_BAGS_BEGIN && slot_id <= legacy::GENERAL_BAGS_END) + else if (slot_id >= invbag::GENERAL_BAGS_BEGIN && slot_id <= invbag::GENERAL_BAGS_END) { if (inventory::Lookup(m_mob_version)->AllowClickCastFromBag) return true; @@ -977,7 +992,7 @@ bool EQEmu::InventoryProfile::SupportsClickCasting(int16 slot_id) bool EQEmu::InventoryProfile::SupportsPotionBeltCasting(int16 slot_id) { - if ((uint16)slot_id <= legacy::GENERAL_END || slot_id == inventory::slotPowerSource || (slot_id >= legacy::GENERAL_BAGS_BEGIN && slot_id <= legacy::GENERAL_BAGS_END)) + if ((uint16)slot_id <= invslot::GENERAL_END || slot_id == invslot::SLOT_POWER_SOURCE || (slot_id >= invbag::GENERAL_BAGS_BEGIN && slot_id <= invbag::GENERAL_BAGS_END)) return true; return false; @@ -986,11 +1001,11 @@ bool EQEmu::InventoryProfile::SupportsPotionBeltCasting(int16 slot_id) // Test whether a given slot can support a container item bool EQEmu::InventoryProfile::SupportsContainers(int16 slot_id) { - if ((slot_id == inventory::slotCursor) || - (slot_id >= legacy::GENERAL_BEGIN && slot_id <= legacy::GENERAL_END) || - (slot_id >= legacy::BANK_BEGIN && slot_id <= legacy::BANK_END) || - (slot_id >= legacy::SHARED_BANK_BEGIN && slot_id <= legacy::SHARED_BANK_END) || - (slot_id >= legacy::TRADE_BEGIN && slot_id <= legacy::TRADE_END) + if ((slot_id == invslot::slotCursor) || + (slot_id >= invslot::GENERAL_BEGIN && slot_id <= invslot::GENERAL_END) || + (slot_id >= invslot::BANK_BEGIN && slot_id <= invslot::BANK_END) || + (slot_id >= invslot::SHARED_BANK_BEGIN && slot_id <= invslot::SHARED_BANK_END) || + (slot_id >= invslot::TRADE_BEGIN && slot_id <= invslot::TRADE_END) ) { return true; } @@ -1028,7 +1043,7 @@ int EQEmu::InventoryProfile::GetSlotByItemInst(ItemInstance *inst) { } if (m_cursor.peek_front() == inst) { - return inventory::slotCursor; + return invslot::slotCursor; } return INVALID_INDEX; @@ -1039,8 +1054,8 @@ uint8 EQEmu::InventoryProfile::FindBrightestLightType() uint8 brightest_light_type = 0; for (auto iter = m_worn.begin(); iter != m_worn.end(); ++iter) { - if ((iter->first < legacy::EQUIPMENT_BEGIN || iter->first > legacy::EQUIPMENT_END) && iter->first != inventory::slotPowerSource) { continue; } - if (iter->first == inventory::slotAmmo) { continue; } + if ((iter->first < invslot::EQUIPMENT_BEGIN || iter->first > invslot::EQUIPMENT_END) && iter->first != invslot::SLOT_POWER_SOURCE) { continue; } + if (iter->first == invslot::slotAmmo) { continue; } auto inst = iter->second; if (inst == nullptr) { continue; } @@ -1053,7 +1068,7 @@ uint8 EQEmu::InventoryProfile::FindBrightestLightType() uint8 general_light_type = 0; for (auto iter = m_inv.begin(); iter != m_inv.end(); ++iter) { - if (iter->first < legacy::GENERAL_BEGIN || iter->first > legacy::GENERAL_END) { continue; } + if (iter->first < invslot::GENERAL_BEGIN || iter->first > invslot::GENERAL_END) { continue; } auto inst = iter->second; if (inst == nullptr) { continue; } @@ -1184,33 +1199,33 @@ int16 EQEmu::InventoryProfile::_PutItem(int16 slot_id, ItemInstance* inst) int16 result = INVALID_INDEX; int16 parentSlot = INVALID_INDEX; - if (slot_id == inventory::slotCursor) { + if (slot_id == invslot::slotCursor) { // Replace current item on cursor, if exists m_cursor.pop(); // no memory delete, clients of this function know what they are doing m_cursor.push_front(inst); result = slot_id; } - else if ((slot_id >= legacy::EQUIPMENT_BEGIN && slot_id <= legacy::EQUIPMENT_END) || (slot_id == inventory::slotPowerSource)) { + else if ((slot_id >= invslot::EQUIPMENT_BEGIN && slot_id <= invslot::EQUIPMENT_END) || (slot_id == invslot::SLOT_POWER_SOURCE)) { m_worn[slot_id] = inst; result = slot_id; } - else if ((slot_id >= legacy::GENERAL_BEGIN && slot_id <= legacy::GENERAL_END)) { + else if ((slot_id >= invslot::GENERAL_BEGIN && slot_id <= invslot::GENERAL_END)) { m_inv[slot_id] = inst; result = slot_id; } - else if (slot_id >= legacy::TRIBUTE_BEGIN && slot_id <= legacy::TRIBUTE_END) { + else if (slot_id >= invslot::TRIBUTE_BEGIN && slot_id <= invslot::TRIBUTE_END) { m_worn[slot_id] = inst; result = slot_id; } - else if (slot_id >= legacy::BANK_BEGIN && slot_id <= legacy::BANK_END) { + else if (slot_id >= invslot::BANK_BEGIN && slot_id <= invslot::BANK_END) { m_bank[slot_id] = inst; result = slot_id; } - else if (slot_id >= legacy::SHARED_BANK_BEGIN && slot_id <= legacy::SHARED_BANK_END) { + else if (slot_id >= invslot::SHARED_BANK_BEGIN && slot_id <= invslot::SHARED_BANK_END) { m_shbank[slot_id] = inst; result = slot_id; } - else if (slot_id >= legacy::TRADE_BEGIN && slot_id <= legacy::TRADE_END) { + else if (slot_id >= invslot::TRADE_BEGIN && slot_id <= invslot::TRADE_END) { m_trade[slot_id] = inst; result = slot_id; } @@ -1248,7 +1263,7 @@ int16 EQEmu::InventoryProfile::_HasItem(std::map& bucket, return iter->first; } - for (int index = inventory::socketBegin; index < inventory::SocketCount; ++index) { + for (int index = invaug::SOCKET_BEGIN; index <= invaug::SOCKET_END; ++index) { if (inst->GetAugmentItemID(index) == item_id && quantity <= 1) return legacy::SLOT_AUGMENT; } @@ -1265,7 +1280,7 @@ int16 EQEmu::InventoryProfile::_HasItem(std::map& bucket, return InventoryProfile::CalcSlotId(iter->first, bag_iter->first); } - for (int index = inventory::socketBegin; index < inventory::SocketCount; ++index) { + for (int index = invaug::SOCKET_BEGIN; index <= invaug::SOCKET_END; ++index) { if (bag_inst->GetAugmentItemID(index) == item_id && quantity <= 1) return legacy::SLOT_AUGMENT; } @@ -1293,10 +1308,10 @@ int16 EQEmu::InventoryProfile::_HasItem(ItemInstQueue& iqueue, uint32 item_id, u if (inst->GetID() == item_id) { quantity_found += (inst->GetCharges() <= 0) ? 1 : inst->GetCharges(); if (quantity_found >= quantity) - return inventory::slotCursor; + return invslot::slotCursor; } - for (int index = inventory::socketBegin; index < inventory::SocketCount; ++index) { + for (int index = invaug::SOCKET_BEGIN; index <= invaug::SOCKET_END; ++index) { if (inst->GetAugmentItemID(index) == item_id && quantity <= 1) return legacy::SLOT_AUGMENT; } @@ -1310,10 +1325,10 @@ int16 EQEmu::InventoryProfile::_HasItem(ItemInstQueue& iqueue, uint32 item_id, u if (bag_inst->GetID() == item_id) { quantity_found += (bag_inst->GetCharges() <= 0) ? 1 : bag_inst->GetCharges(); if (quantity_found >= quantity) - return InventoryProfile::CalcSlotId(inventory::slotCursor, bag_iter->first); + return InventoryProfile::CalcSlotId(invslot::slotCursor, bag_iter->first); } - for (int index = inventory::socketBegin; index < inventory::SocketCount; ++index) { + for (int index = invaug::SOCKET_BEGIN; index <= invaug::SOCKET_END; ++index) { if (bag_inst->GetAugmentItemID(index) == item_id && quantity <= 1) return legacy::SLOT_AUGMENT; } @@ -1370,7 +1385,7 @@ int16 EQEmu::InventoryProfile::_HasItemByUse(ItemInstQueue& iqueue, uint8 use, u if (inst->IsClassCommon() && inst->GetItem()->ItemType == use) { quantity_found += (inst->GetCharges() <= 0) ? 1 : inst->GetCharges(); if (quantity_found >= quantity) - return inventory::slotCursor; + return invslot::slotCursor; } if (!inst->IsClassBag()) { continue; } @@ -1382,7 +1397,7 @@ int16 EQEmu::InventoryProfile::_HasItemByUse(ItemInstQueue& iqueue, uint8 use, u if (bag_inst->IsClassCommon() && bag_inst->GetItem()->ItemType == use) { quantity_found += (bag_inst->GetCharges() <= 0) ? 1 : bag_inst->GetCharges(); if (quantity_found >= quantity) - return InventoryProfile::CalcSlotId(inventory::slotCursor, bag_iter->first); + return InventoryProfile::CalcSlotId(invslot::slotCursor, bag_iter->first); } } @@ -1402,7 +1417,7 @@ int16 EQEmu::InventoryProfile::_HasItemByLoreGroup(std::mapGetItem()->LoreGroup == loregroup) return iter->first; - for (int index = inventory::socketBegin; index < inventory::SocketCount; ++index) { + for (int index = invaug::SOCKET_BEGIN; index <= invaug::SOCKET_END; ++index) { auto aug_inst = inst->GetAugment(index); if (aug_inst == nullptr) { continue; } @@ -1419,7 +1434,7 @@ int16 EQEmu::InventoryProfile::_HasItemByLoreGroup(std::mapIsClassCommon() && bag_inst->GetItem()->LoreGroup == loregroup) return InventoryProfile::CalcSlotId(iter->first, bag_iter->first); - for (int index = inventory::socketBegin; index < inventory::SocketCount; ++index) { + for (int index = invaug::SOCKET_BEGIN; index <= invaug::SOCKET_END; ++index) { auto aug_inst = bag_inst->GetAugment(index); if (aug_inst == nullptr) { continue; } @@ -1440,9 +1455,9 @@ int16 EQEmu::InventoryProfile::_HasItemByLoreGroup(ItemInstQueue& iqueue, uint32 if (inst == nullptr) { continue; } if (inst->GetItem()->LoreGroup == loregroup) - return inventory::slotCursor; + return invslot::slotCursor; - for (int index = inventory::socketBegin; index < inventory::SocketCount; ++index) { + for (int index = invaug::SOCKET_BEGIN; index <= invaug::SOCKET_END; ++index) { auto aug_inst = inst->GetAugment(index); if (aug_inst == nullptr) { continue; } @@ -1457,9 +1472,9 @@ int16 EQEmu::InventoryProfile::_HasItemByLoreGroup(ItemInstQueue& iqueue, uint32 if (bag_inst == nullptr) { continue; } if (bag_inst->IsClassCommon() && bag_inst->GetItem()->LoreGroup == loregroup) - return InventoryProfile::CalcSlotId(inventory::slotCursor, bag_iter->first); + return InventoryProfile::CalcSlotId(invslot::slotCursor, bag_iter->first); - for (int index = inventory::socketBegin; index < inventory::SocketCount; ++index) { + for (int index = invaug::SOCKET_BEGIN; index <= invaug::SOCKET_END; ++index) { auto aug_inst = bag_inst->GetAugment(index); if (aug_inst == nullptr) { continue; } diff --git a/common/inventory_profile.h b/common/inventory_profile.h index 5be7ed8d3..1f28b00f9 100644 --- a/common/inventory_profile.h +++ b/common/inventory_profile.h @@ -92,22 +92,13 @@ namespace EQEmu } ~InventoryProfile(); - bool SetInventoryVersion(versions::MobVersion inventory_version) { - if (!m_mob_version_set) { - m_mob_version = versions::ValidateMobVersion(inventory_version); - m_lookup = inventory::Lookup(m_mob_version); - m_mob_version_set = true; - return true; - } - else { - m_lookup = inventory::Lookup(versions::MobVersion::Unknown); - return false; - } - } + bool SetInventoryVersion(versions::MobVersion inventory_version); bool SetInventoryVersion(versions::ClientVersion client_version) { return SetInventoryVersion(versions::ConvertClientVersionToMobVersion(client_version)); } versions::MobVersion InventoryVersion() { return m_mob_version; } + const inventory::LookupEntry* GetLookup() const { return m_lookup; } + static void CleanDirty(); static void MarkDirty(ItemInstance *inst); @@ -163,7 +154,7 @@ namespace EQEmu // Locate an available inventory slot int16 FindFreeSlot(bool for_bag, bool try_cursor, uint8 min_size = 0, bool is_arrow = false); - int16 FindFreeSlotForTradeItem(const ItemInstance* inst, int16 general_start = legacy::GENERAL_BEGIN, uint8 bag_start = inventory::containerBegin); + int16 FindFreeSlotForTradeItem(const ItemInstance* inst, int16 general_start = invslot::GENERAL_BEGIN, uint8 bag_start = invbag::SLOT_BEGIN); // Calculate slot_id for an item within a bag static int16 CalcSlotId(int16 slot_id); // Calc parent bag's slot_id diff --git a/common/inventory_slot.cpp b/common/inventory_slot.cpp index 8158e0bbf..ac4aaa412 100644 --- a/common/inventory_slot.cpp +++ b/common/inventory_slot.cpp @@ -25,23 +25,23 @@ int8 EQEmu::inventory::ConvertEquipmentIndexToTextureIndex(int16 slot_index) { switch (slot_index) { - case slotHead: + case invslot::slotHead: return textures::armorHead; - case slotChest: + case invslot::slotChest: return textures::armorChest; - case slotArms: + case invslot::slotArms: return textures::armorArms; - case slotWrist1: + case invslot::slotWrist1: return textures::armorWrist; - case slotHands: + case invslot::slotHands: return textures::armorHands; - case slotLegs: + case invslot::slotLegs: return textures::armorLegs; - case slotFeet: + case invslot::slotFeet: return textures::armorFeet; - case slotPrimary: + case invslot::slotPrimary: return textures::weaponPrimary; - case slotSecondary: + case invslot::slotSecondary: return textures::weaponSecondary; default: return textures::textureInvalid; @@ -50,7 +50,7 @@ int8 EQEmu::inventory::ConvertEquipmentIndexToTextureIndex(int16 slot_index) int8 EQEmu::inventory::ConvertEquipmentSlotToTextureIndex(const InventorySlot& inventory_slot) { - if ((!inventory_slot.Typeless() && !inventory_slot.IsTypeIndex(typePossessions)) || !inventory_slot.IsContainerIndex(containerInvalid) || !inventory_slot.IsSocketIndex(socketInvalid)) + if ((!inventory_slot.Typeless() && !inventory_slot.IsTypeIndex(invtype::typePossessions)) || !inventory_slot.IsContainerIndex(invbag::SLOT_INVALID) || !inventory_slot.IsSocketIndex(invaug::SOCKET_INVALID)) return textures::textureInvalid; return ConvertEquipmentIndexToTextureIndex(inventory_slot.SlotIndex()); @@ -60,25 +60,25 @@ int16 EQEmu::inventory::ConvertTextureIndexToEquipmentIndex(int8 texture_index) { switch (texture_index) { case textures::armorHead: - return slotHead; + return invslot::slotHead; case textures::armorChest: - return slotChest; + return invslot::slotChest; case textures::armorArms: - return slotArms; + return invslot::slotArms; case textures::armorWrist: - return slotWrist1; + return invslot::slotWrist1; case textures::armorHands: - return slotHands; + return invslot::slotHands; case textures::armorLegs: - return slotLegs; + return invslot::slotLegs; case textures::armorFeet: - return slotFeet; + return invslot::slotFeet; case textures::weaponPrimary: - return slotPrimary; + return invslot::slotPrimary; case textures::weaponSecondary: - return slotSecondary; + return invslot::slotSecondary; default: - return slotInvalid; + return invslot::SLOT_INVALID; } } @@ -87,14 +87,14 @@ bool EQEmu::InventorySlot::IsValidSlot() const if (_typeless) return false; - int16 slot_count = inventory::SlotCount(_type_index); - if (!slot_count || _slot_index < inventory::slotBegin || _slot_index >= slot_count) + int16 slot_count = invtype::GetInvTypeSize(_type_index); + if (!slot_count || _slot_index < invslot::SLOT_BEGIN || _slot_index >= slot_count) return false; - if (_container_index < inventory::containerInvalid || _container_index >= inventory::ContainerCount) + if (_container_index < invbag::SLOT_INVALID || _container_index >= invbag::SLOT_COUNT) return false; - if (_socket_index < inventory::socketInvalid || _socket_index >= inventory::SocketCount) + if (_socket_index < invaug::SOCKET_INVALID || _socket_index >= invaug::SOCKET_COUNT) return false; return true; @@ -103,16 +103,16 @@ bool EQEmu::InventorySlot::IsValidSlot() const bool EQEmu::InventorySlot::IsDeleteSlot() const { if (_typeless) - return (_slot_index == inventory::slotInvalid && _container_index == inventory::containerInvalid && _socket_index == inventory::socketInvalid); + return (_slot_index == invslot::SLOT_INVALID && _container_index == invbag::SLOT_INVALID && _socket_index == invaug::SOCKET_INVALID); else - return (_type_index == inventory::typeInvalid && _slot_index == inventory::slotInvalid && _container_index == inventory::containerInvalid && _socket_index == inventory::socketInvalid); + return (_type_index == invtype::TYPE_INVALID && _slot_index == invslot::SLOT_INVALID && _container_index == invbag::SLOT_INVALID && _socket_index == invaug::SOCKET_INVALID); } bool EQEmu::InventorySlot::IsEquipmentIndex(int16 slot_index) { /*if (slot_index < inventory::EquipmentBegin || slot_index > inventory::EquipmentEnd) return false;*/ - if ((slot_index < legacy::EQUIPMENT_BEGIN || slot_index > legacy::EQUIPMENT_END) && slot_index != legacy::SLOT_POWER_SOURCE) + if ((slot_index < invslot::EQUIPMENT_BEGIN || slot_index > invslot::EQUIPMENT_END) && slot_index != invslot::SLOT_POWER_SOURCE) return false; return true; @@ -122,7 +122,7 @@ bool EQEmu::InventorySlot::IsGeneralIndex(int16 slot_index) { /*if (slot_index < inventory::GeneralBegin || slot_index > inventory::GeneralEnd) return false;*/ - if (slot_index < legacy::GENERAL_BEGIN || slot_index > legacy::GENERAL_END) + if (slot_index < invslot::GENERAL_BEGIN || slot_index > invslot::GENERAL_END) return false; return true; @@ -132,7 +132,7 @@ bool EQEmu::InventorySlot::IsCursorIndex(int16 slot_index) { /*if (slot_index != inventory::slotCursor) return false;*/ - if (slot_index != legacy::SLOT_CURSOR) + if (slot_index != invslot::slotCursor) return false; return true; @@ -142,7 +142,7 @@ bool EQEmu::InventorySlot::IsWeaponIndex(int16 slot_index) { /*if ((slot_index != inventory::slotRange) && (slot_index != inventory::slotPrimary) && (slot_index != inventory::slotSecondary)) return false;*/ - if ((slot_index != legacy::SLOT_RANGE) && (slot_index != legacy::SLOT_PRIMARY) && (slot_index != legacy::SLOT_SECONDARY)) + if ((slot_index != invslot::slotRange) && (slot_index != invslot::slotPrimary) && (slot_index != invslot::slotSecondary)) return false; return true; @@ -151,15 +151,15 @@ bool EQEmu::InventorySlot::IsWeaponIndex(int16 slot_index) bool EQEmu::InventorySlot::IsTextureIndex(int16 slot_index) { switch (slot_index) { - case inventory::slotHead: - case inventory::slotChest: - case inventory::slotArms: - case inventory::slotWrist1: - case inventory::slotHands: - case inventory::slotLegs: - case inventory::slotFeet: - case inventory::slotPrimary: - case inventory::slotSecondary: + case invslot::slotHead: + case invslot::slotChest: + case invslot::slotArms: + case invslot::slotWrist1: + case invslot::slotHands: + case invslot::slotLegs: + case invslot::slotFeet: + case invslot::slotPrimary: + case invslot::slotSecondary: return true; default: return false; @@ -169,13 +169,13 @@ bool EQEmu::InventorySlot::IsTextureIndex(int16 slot_index) bool EQEmu::InventorySlot::IsTintableIndex(int16 slot_index) { switch (slot_index) { - case inventory::slotHead: - case inventory::slotChest: - case inventory::slotArms: - case inventory::slotWrist1: - case inventory::slotHands: - case inventory::slotLegs: - case inventory::slotFeet: + case invslot::slotHead: + case invslot::slotChest: + case invslot::slotArms: + case invslot::slotWrist1: + case invslot::slotHands: + case invslot::slotLegs: + case invslot::slotFeet: return true; default: return false; @@ -184,10 +184,10 @@ bool EQEmu::InventorySlot::IsTintableIndex(int16 slot_index) bool EQEmu::InventorySlot::IsEquipmentSlot() const { - if (!_typeless && (_type_index != inventory::typePossessions)) + if (!_typeless && (_type_index != invtype::typePossessions)) return false; - if ((_container_index != inventory::containerInvalid) || (_socket_index != inventory::socketInvalid)) + if ((_container_index != invbag::SLOT_INVALID) || (_socket_index != invaug::SOCKET_INVALID)) return false; return IsEquipmentIndex(_slot_index); @@ -195,10 +195,10 @@ bool EQEmu::InventorySlot::IsEquipmentSlot() const bool EQEmu::InventorySlot::IsGeneralSlot() const { - if (!_typeless && (_type_index != inventory::typePossessions)) + if (!_typeless && (_type_index != invtype::typePossessions)) return false; - if ((_container_index != inventory::containerInvalid) || (_socket_index != inventory::socketInvalid)) + if ((_container_index != invbag::SLOT_INVALID) || (_socket_index != invaug::SOCKET_INVALID)) return false; return IsGeneralIndex(_socket_index); @@ -206,10 +206,10 @@ bool EQEmu::InventorySlot::IsGeneralSlot() const bool EQEmu::InventorySlot::IsCursorSlot() const { - if (!_typeless && (_type_index != inventory::typePossessions)) + if (!_typeless && (_type_index != invtype::typePossessions)) return false; - if ((_container_index != inventory::containerInvalid) || (_socket_index != inventory::socketInvalid)) + if ((_container_index != invbag::SLOT_INVALID) || (_socket_index != invaug::SOCKET_INVALID)) return false; return IsCursorIndex(_slot_index); @@ -217,10 +217,10 @@ bool EQEmu::InventorySlot::IsCursorSlot() const bool EQEmu::InventorySlot::IsWeaponSlot() const { - if (!_typeless && (_type_index != inventory::typePossessions)) + if (!_typeless && (_type_index != invtype::typePossessions)) return false; - if ((_container_index != inventory::containerInvalid) || (_socket_index != inventory::socketInvalid)) + if ((_container_index != invbag::SLOT_INVALID) || (_socket_index != invaug::SOCKET_INVALID)) return false; return IsWeaponIndex(_slot_index); @@ -228,10 +228,10 @@ bool EQEmu::InventorySlot::IsWeaponSlot() const bool EQEmu::InventorySlot::IsTextureSlot() const { - if (!_typeless && (_type_index != inventory::typePossessions)) + if (!_typeless && (_type_index != invtype::typePossessions)) return false; - if ((_container_index != inventory::containerInvalid) || (_socket_index != inventory::socketInvalid)) + if ((_container_index != invbag::SLOT_INVALID) || (_socket_index != invaug::SOCKET_INVALID)) return false; return IsTextureIndex(_slot_index); @@ -239,10 +239,10 @@ bool EQEmu::InventorySlot::IsTextureSlot() const bool EQEmu::InventorySlot::IsTintableSlot() const { - if (!_typeless && (_type_index != inventory::typePossessions)) + if (!_typeless && (_type_index != invtype::typePossessions)) return false; - if ((_container_index != inventory::containerInvalid) || (_socket_index != inventory::socketInvalid)) + if ((_container_index != invbag::SLOT_INVALID) || (_socket_index != invaug::SOCKET_INVALID)) return false; return IsTintableIndex(_slot_index); @@ -250,13 +250,13 @@ bool EQEmu::InventorySlot::IsTintableSlot() const bool EQEmu::InventorySlot::IsSlot() const { - if (!_typeless && (_type_index == inventory::typeInvalid)) + if (!_typeless && (_type_index == invtype::TYPE_INVALID)) return false; - if (_slot_index == inventory::slotInvalid) + if (_slot_index == invslot::SLOT_INVALID) return false; - if (_container_index != inventory::containerInvalid) + if (_container_index != invbag::SLOT_INVALID) return false; - if (_socket_index != inventory::socketInvalid) + if (_socket_index != invaug::SOCKET_INVALID) return false; return true; @@ -264,13 +264,13 @@ bool EQEmu::InventorySlot::IsSlot() const bool EQEmu::InventorySlot::IsSlotSocket() const { - if (!_typeless && (_type_index == inventory::typeInvalid)) + if (!_typeless && (_type_index == invtype::TYPE_INVALID)) return false; - if (_slot_index == inventory::slotInvalid) + if (_slot_index == invslot::SLOT_INVALID) return false; - if (_container_index != inventory::containerInvalid) + if (_container_index != invbag::SLOT_INVALID) return false; - if (_socket_index == inventory::socketInvalid) + if (_socket_index == invaug::SOCKET_INVALID) return false; return true; @@ -278,13 +278,13 @@ bool EQEmu::InventorySlot::IsSlotSocket() const bool EQEmu::InventorySlot::IsContainer() const { - if (!_typeless && (_type_index == inventory::typeInvalid)) + if (!_typeless && (_type_index == invtype::TYPE_INVALID)) return false; - if (_slot_index == inventory::slotInvalid) + if (_slot_index == invslot::SLOT_INVALID) return false; - if (_container_index == inventory::containerInvalid) + if (_container_index == invbag::SLOT_INVALID) return false; - if (_socket_index != inventory::socketInvalid) + if (_socket_index != invaug::SOCKET_INVALID) return false; return true; @@ -292,13 +292,13 @@ bool EQEmu::InventorySlot::IsContainer() const bool EQEmu::InventorySlot::IsContainerSocket() const { - if (!_typeless && (_type_index == inventory::typeInvalid)) + if (!_typeless && (_type_index == invtype::TYPE_INVALID)) return false; - if (_slot_index == inventory::slotInvalid) + if (_slot_index == invslot::SLOT_INVALID) return false; - if (_container_index == inventory::containerInvalid) + if (_container_index == invbag::SLOT_INVALID) return false; - if (_socket_index == inventory::socketInvalid) + if (_socket_index == invaug::SOCKET_INVALID) return false; return true; @@ -332,10 +332,10 @@ const std::string EQEmu::InventorySlot::ToName() const void EQEmu::InventorySlot::SetInvalidSlot() { - _type_index = inventory::typeInvalid; - _slot_index = inventory::slotInvalid; - _container_index = inventory::containerInvalid; - _socket_index = inventory::socketInvalid; + _type_index = invtype::TYPE_INVALID; + _slot_index = invslot::SLOT_INVALID; + _container_index = invbag::SLOT_INVALID; + _socket_index = invaug::SOCKET_INVALID; } //bool EQEmu::InventorySlot::IsBonusIndex(int16 slot_index) diff --git a/common/inventory_slot.h b/common/inventory_slot.h index 695282e34..967673f99 100644 --- a/common/inventory_slot.h +++ b/common/inventory_slot.h @@ -35,10 +35,10 @@ namespace EQEmu class InventorySlot { public: - InventorySlot() : _type_index(inventory::typeInvalid), _slot_index(inventory::slotInvalid), _container_index(inventory::containerInvalid), _socket_index(inventory::socketInvalid), _typeless(false) { } - InventorySlot(int16 type_index) : _type_index(type_index), _slot_index(inventory::slotInvalid), _container_index(inventory::containerInvalid), _socket_index(inventory::socketInvalid), _typeless(false) { } - InventorySlot(int16 type_index, int16 parent_index) : _type_index(type_index), _slot_index(parent_index), _container_index(inventory::containerInvalid), _socket_index(inventory::socketInvalid), _typeless(false) { } - InventorySlot(int16 type_index, int16 parent_index, int16 bag_index) : _type_index(type_index), _slot_index(parent_index), _container_index(bag_index), _socket_index(inventory::socketInvalid), _typeless(false) { } + InventorySlot() : _type_index(invtype::TYPE_INVALID), _slot_index(invslot::SLOT_INVALID), _container_index(invbag::SLOT_INVALID), _socket_index(invaug::SOCKET_INVALID), _typeless(false) { } + InventorySlot(int16 type_index) : _type_index(type_index), _slot_index(invslot::SLOT_INVALID), _container_index(invbag::SLOT_INVALID), _socket_index(invaug::SOCKET_INVALID), _typeless(false) { } + InventorySlot(int16 type_index, int16 parent_index) : _type_index(type_index), _slot_index(parent_index), _container_index(invbag::SLOT_INVALID), _socket_index(invaug::SOCKET_INVALID), _typeless(false) { } + InventorySlot(int16 type_index, int16 parent_index, int16 bag_index) : _type_index(type_index), _slot_index(parent_index), _container_index(bag_index), _socket_index(invaug::SOCKET_INVALID), _typeless(false) { } InventorySlot(int16 type_index, int16 parent_index, int16 bag_index, int16 aug_index) : _type_index(type_index), _slot_index(parent_index), _container_index(bag_index), _socket_index(aug_index), _typeless(false) { } InventorySlot(const InventorySlot& r) : _type_index(r._type_index), _slot_index(r._slot_index), _container_index(r._container_index), _socket_index(r._socket_index), _typeless(r._typeless) { } InventorySlot(int16 type_index, const InventorySlot& r) : _type_index(type_index), _slot_index(r._slot_index), _container_index(r._container_index), _socket_index(r._socket_index), _typeless(false) { } @@ -90,15 +90,15 @@ namespace EQEmu void SetInvalidSlot(); - void SetTypeInvalid() { _type_index = inventory::typeInvalid; } - void SetSlotInvalid() { _slot_index = inventory::slotInvalid; } - void SetContainerInvalid() { _container_index = inventory::containerInvalid; } - void SetSocketInvalid() { _socket_index = inventory::socketInvalid; } + void SetTypeInvalid() { _type_index = invtype::TYPE_INVALID; } + void SetSlotInvalid() { _slot_index = invslot::SLOT_INVALID; } + void SetContainerInvalid() { _container_index = invbag::SLOT_INVALID; } + void SetSocketInvalid() { _socket_index = invaug::SOCKET_INVALID; } - void SetTypeBegin() { _type_index = inventory::typeBegin; } - void SetSlotBegin() { _slot_index = inventory::slotBegin; } - void SetContainerBegin() { _container_index = inventory::containerBegin; } - void SetSocketBegin() { _socket_index = inventory::socketBegin; } + void SetTypeBegin() { _type_index = invtype::TYPE_BEGIN; } + void SetSlotBegin() { _slot_index = invslot::SLOT_BEGIN; } + void SetContainerBegin() { _container_index = invbag::SLOT_BEGIN; } + void SetSocketBegin() { _socket_index = invaug::SOCKET_BEGIN; } void IncrementType() { ++_type_index; } void IncrementSlot() { ++_slot_index; } diff --git a/common/item_data.h b/common/item_data.h index ae7e3bbdb..45ca8e9e0 100644 --- a/common/item_data.h +++ b/common/item_data.h @@ -464,9 +464,9 @@ namespace EQEmu int32 FactionAmt4; // Faction Amt 4 char CharmFile[32]; // ? uint32 AugType; - uint8 AugSlotType[inventory::SocketCount]; // RoF: Augment Slot 1-6 Type - uint8 AugSlotVisible[inventory::SocketCount]; // RoF: Augment Slot 1-6 Visible - uint8 AugSlotUnk2[inventory::SocketCount]; // RoF: Augment Slot 1-6 Unknown Most likely Powersource related + uint8 AugSlotType[invaug::SOCKET_COUNT]; // RoF: Augment Slot 1-6 Type + uint8 AugSlotVisible[invaug::SOCKET_COUNT]; // RoF: Augment Slot 1-6 Visible + uint8 AugSlotUnk2[invaug::SOCKET_COUNT]; // RoF: Augment Slot 1-6 Unknown Most likely Powersource related uint32 LDoNTheme; uint32 LDoNPrice; uint32 LDoNSold; diff --git a/common/item_instance.cpp b/common/item_instance.cpp index a2860f3e5..922d0e032 100644 --- a/common/item_instance.cpp +++ b/common/item_instance.cpp @@ -273,8 +273,8 @@ bool EQEmu::ItemInstance::IsEquipable(int16 slot_id) const // another "shouldn't do" fix..will be fixed in future updates (requires code and database work) int16 use_slot = INVALID_INDEX; - if (slot_id == inventory::slotPowerSource) { use_slot = inventory::slotGeneral1; } - if ((uint16)slot_id <= legacy::EQUIPMENT_END) { use_slot = slot_id; } + if (slot_id == invslot::SLOT_POWER_SOURCE) { use_slot = invslot::slotGeneral1; } + if ((uint16)slot_id <= invslot::EQUIPMENT_END) { use_slot = slot_id; } if (use_slot != INVALID_INDEX) { if (m_item->Slots & (1 << use_slot)) @@ -289,7 +289,7 @@ bool EQEmu::ItemInstance::IsAugmentable() const if (!m_item) return false; - for (int index = inventory::socketBegin; index < inventory::SocketCount; ++index) { + for (int index = invaug::SOCKET_BEGIN; index <= invaug::SOCKET_END; ++index) { if (m_item->AugSlotType[index] != 0) return true; } @@ -303,8 +303,8 @@ bool EQEmu::ItemInstance::AvailableWearSlot(uint32 aug_wear_slots) const { if (!m_item || !m_item->IsClassCommon()) return false; - int index = legacy::EQUIPMENT_BEGIN; - for (; index <= inventory::slotGeneral1; ++index) { // MainGeneral1 should be legacy::EQUIPMENT_END + int index = invslot::EQUIPMENT_BEGIN; + for (; index <= invslot::slotGeneral1; ++index) { // MainGeneral1 should be legacy::EQUIPMENT_END if (m_item->Slots & (1 << index)) { if (aug_wear_slots & (1 << index)) break; @@ -319,14 +319,14 @@ int8 EQEmu::ItemInstance::AvailableAugmentSlot(int32 augtype) const if (!m_item || !m_item->IsClassCommon()) return INVALID_INDEX; - int index = inventory::socketBegin; - for (; index < inventory::SocketCount; ++index) { + int index = invaug::SOCKET_BEGIN; + for (; index <= invaug::SOCKET_END; ++index) { if (GetItem(index)) { continue; } if (augtype == -1 || (m_item->AugSlotType[index] && ((1 << (m_item->AugSlotType[index] - 1)) & augtype))) break; } - return (index < inventory::SocketCount) ? index : INVALID_INDEX; + return (index <= invaug::SOCKET_END) ? index : INVALID_INDEX; } bool EQEmu::ItemInstance::IsAugmentSlotAvailable(int32 augtype, uint8 slot) const @@ -469,7 +469,7 @@ uint8 EQEmu::ItemInstance::FirstOpenSlot() const return INVALID_INDEX; uint8 slots = m_item->BagSlots, i; - for (i = inventory::containerBegin; i < slots; i++) { + for (i = invbag::SLOT_BEGIN; i < slots; i++) { if (!GetItem(i)) break; } @@ -486,7 +486,7 @@ uint8 EQEmu::ItemInstance::GetTotalItemCount() const if (m_item && !m_item->IsClassBag()) { return item_count; } - for (int index = inventory::containerBegin; index < m_item->BagSlots; ++index) { if (GetItem(index)) { ++item_count; } } + for (int index = invbag::SLOT_BEGIN; index < m_item->BagSlots; ++index) { if (GetItem(index)) { ++item_count; } } return item_count; } @@ -496,7 +496,7 @@ bool EQEmu::ItemInstance::IsNoneEmptyContainer() if (!m_item || !m_item->IsClassBag()) return false; - for (int index = inventory::containerBegin; index < m_item->BagSlots; ++index) { + for (int index = invbag::SLOT_BEGIN; index < m_item->BagSlots; ++index) { if (GetItem(index)) return true; } @@ -518,7 +518,7 @@ EQEmu::ItemInstance* EQEmu::ItemInstance::GetOrnamentationAug(int32 ornamentatio if (!m_item || !m_item->IsClassCommon()) { return nullptr; } if (ornamentationAugtype == 0) { return nullptr; } - for (int i = inventory::socketBegin; i < inventory::SocketCount; i++) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; i++) { if (GetAugment(i) && m_item->AugSlotType[i] == ornamentationAugtype) { @@ -686,7 +686,7 @@ bool EQEmu::ItemInstance::IsAugmented() if (!m_item || !m_item->IsClassCommon()) return false; - for (int index = inventory::socketBegin; index < inventory::SocketCount; ++index) { + for (int index = invaug::SOCKET_BEGIN; index <= invaug::SOCKET_END; ++index) { if (GetAugmentItemID(index)) return true; } @@ -814,8 +814,8 @@ bool EQEmu::ItemInstance::IsSlotAllowed(int16 slot_id) const { if (!m_item) { return false; } else if (InventoryProfile::SupportsContainers(slot_id)) { return true; } else if (m_item->Slots & (1 << slot_id)) { return true; } - else if (slot_id == inventory::slotPowerSource && (m_item->Slots & (1 << 22))) { return true; } // got lazy... - else if (slot_id != inventory::slotPowerSource && slot_id > legacy::EQUIPMENT_END) { return true; } + else if (slot_id == invslot::SLOT_POWER_SOURCE && (m_item->Slots & (1 << 22))) { return true; } // got lazy... + else if (slot_id != invslot::SLOT_POWER_SOURCE && slot_id > invslot::EQUIPMENT_END) { return true; } else { return false; } } @@ -993,7 +993,7 @@ int EQEmu::ItemInstance::GetItemArmorClass(bool augments) const if (item) { ac = item->AC; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) ac += GetAugment(i)->GetItemArmorClass(); } @@ -1035,7 +1035,7 @@ int EQEmu::ItemInstance::GetItemElementalDamage(int &magic, int &fire, int &cold } if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) GetAugment(i)->GetItemElementalDamage(magic, fire, cold, poison, disease, chromatic, prismatic, physical, corruption); } @@ -1052,7 +1052,7 @@ int EQEmu::ItemInstance::GetItemElementalFlag(bool augments) const return flag; if (augments) { - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) { + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) { if (GetAugment(i)) flag = GetAugment(i)->GetItemElementalFlag(); if (flag) @@ -1073,7 +1073,7 @@ int EQEmu::ItemInstance::GetItemElementalDamage(bool augments) const return damage; if (augments) { - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) { + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) { if (GetAugment(i)) damage = GetAugment(i)->GetItemElementalDamage(); if (damage) @@ -1092,7 +1092,7 @@ int EQEmu::ItemInstance::GetItemRecommendedLevel(bool augments) const level = item->RecLevel; if (augments) { - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) { + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) { int temp = 0; if (GetAugment(i)) { temp = GetAugment(i)->GetItemRecommendedLevel(); @@ -1114,7 +1114,7 @@ int EQEmu::ItemInstance::GetItemRequiredLevel(bool augments) const level = item->ReqLevel; if (augments) { - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) { + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) { int temp = 0; if (GetAugment(i)) { temp = GetAugment(i)->GetItemRequiredLevel(); @@ -1136,7 +1136,7 @@ int EQEmu::ItemInstance::GetItemWeaponDamage(bool augments) const damage = item->Damage; if (augments) { - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) damage += GetAugment(i)->GetItemWeaponDamage(); } @@ -1152,7 +1152,7 @@ int EQEmu::ItemInstance::GetItemBackstabDamage(bool augments) const damage = item->BackstabDmg; if (augments) { - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) damage += GetAugment(i)->GetItemBackstabDamage(); } @@ -1170,7 +1170,7 @@ int EQEmu::ItemInstance::GetItemBaneDamageBody(bool augments) const return body; if (augments) { - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) { body = GetAugment(i)->GetItemBaneDamageBody(); if (body) @@ -1191,7 +1191,7 @@ int EQEmu::ItemInstance::GetItemBaneDamageRace(bool augments) const return race; if (augments) { - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) { race = GetAugment(i)->GetItemBaneDamageRace(); if (race) @@ -1211,7 +1211,7 @@ int EQEmu::ItemInstance::GetItemBaneDamageBody(bodyType against, bool augments) damage += item->BaneDmgAmt; if (augments) { - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) damage += GetAugment(i)->GetItemBaneDamageBody(against); } @@ -1228,7 +1228,7 @@ int EQEmu::ItemInstance::GetItemBaneDamageRace(uint16 against, bool augments) co damage += item->BaneDmgRaceAmt; if (augments) { - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) damage += GetAugment(i)->GetItemBaneDamageRace(against); } @@ -1244,7 +1244,7 @@ int EQEmu::ItemInstance::GetItemMagical(bool augments) const return 1; if (augments) { - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i) && GetAugment(i)->GetItemMagical()) return 1; } @@ -1259,7 +1259,7 @@ int EQEmu::ItemInstance::GetItemHP(bool augments) const if (item) { hp = item->HP; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) hp += GetAugment(i)->GetItemHP(); } @@ -1273,7 +1273,7 @@ int EQEmu::ItemInstance::GetItemMana(bool augments) const if (item) { mana = item->Mana; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) mana += GetAugment(i)->GetItemMana(); } @@ -1287,7 +1287,7 @@ int EQEmu::ItemInstance::GetItemEndur(bool augments) const if (item) { endur = item->Endur; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) endur += GetAugment(i)->GetItemEndur(); } @@ -1301,7 +1301,7 @@ int EQEmu::ItemInstance::GetItemAttack(bool augments) const if (item) { atk = item->Attack; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) atk += GetAugment(i)->GetItemAttack(); } @@ -1315,7 +1315,7 @@ int EQEmu::ItemInstance::GetItemStr(bool augments) const if (item) { str = item->AStr; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) str += GetAugment(i)->GetItemStr(); } @@ -1329,7 +1329,7 @@ int EQEmu::ItemInstance::GetItemSta(bool augments) const if (item) { sta = item->ASta; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) sta += GetAugment(i)->GetItemSta(); } @@ -1343,7 +1343,7 @@ int EQEmu::ItemInstance::GetItemDex(bool augments) const if (item) { total = item->ADex; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) total += GetAugment(i)->GetItemDex(); } @@ -1357,7 +1357,7 @@ int EQEmu::ItemInstance::GetItemAgi(bool augments) const if (item) { total = item->AAgi; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) total += GetAugment(i)->GetItemAgi(); } @@ -1371,7 +1371,7 @@ int EQEmu::ItemInstance::GetItemInt(bool augments) const if (item) { total = item->AInt; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) total += GetAugment(i)->GetItemInt(); } @@ -1385,7 +1385,7 @@ int EQEmu::ItemInstance::GetItemWis(bool augments) const if (item) { total = item->AWis; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) total += GetAugment(i)->GetItemWis(); } @@ -1399,7 +1399,7 @@ int EQEmu::ItemInstance::GetItemCha(bool augments) const if (item) { total = item->ACha; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) total += GetAugment(i)->GetItemCha(); } @@ -1413,7 +1413,7 @@ int EQEmu::ItemInstance::GetItemMR(bool augments) const if (item) { total = item->MR; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) total += GetAugment(i)->GetItemMR(); } @@ -1427,7 +1427,7 @@ int EQEmu::ItemInstance::GetItemFR(bool augments) const if (item) { total = item->FR; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) total += GetAugment(i)->GetItemFR(); } @@ -1441,7 +1441,7 @@ int EQEmu::ItemInstance::GetItemCR(bool augments) const if (item) { total = item->CR; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) total += GetAugment(i)->GetItemCR(); } @@ -1455,7 +1455,7 @@ int EQEmu::ItemInstance::GetItemPR(bool augments) const if (item) { total = item->PR; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) total += GetAugment(i)->GetItemPR(); } @@ -1469,7 +1469,7 @@ int EQEmu::ItemInstance::GetItemDR(bool augments) const if (item) { total = item->DR; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) total += GetAugment(i)->GetItemDR(); } @@ -1483,7 +1483,7 @@ int EQEmu::ItemInstance::GetItemCorrup(bool augments) const if (item) { total = item->SVCorruption; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) total += GetAugment(i)->GetItemCorrup(); } @@ -1497,7 +1497,7 @@ int EQEmu::ItemInstance::GetItemHeroicStr(bool augments) const if (item) { total = item->HeroicStr; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) total += GetAugment(i)->GetItemHeroicStr(); } @@ -1511,7 +1511,7 @@ int EQEmu::ItemInstance::GetItemHeroicSta(bool augments) const if (item) { total = item->HeroicSta; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) total += GetAugment(i)->GetItemHeroicSta(); } @@ -1525,7 +1525,7 @@ int EQEmu::ItemInstance::GetItemHeroicDex(bool augments) const if (item) { total = item->HeroicDex; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) total += GetAugment(i)->GetItemHeroicDex(); } @@ -1539,7 +1539,7 @@ int EQEmu::ItemInstance::GetItemHeroicAgi(bool augments) const if (item) { total = item->HeroicAgi; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) total += GetAugment(i)->GetItemHeroicAgi(); } @@ -1553,7 +1553,7 @@ int EQEmu::ItemInstance::GetItemHeroicInt(bool augments) const if (item) { total = item->HeroicInt; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) total += GetAugment(i)->GetItemHeroicInt(); } @@ -1567,7 +1567,7 @@ int EQEmu::ItemInstance::GetItemHeroicWis(bool augments) const if (item) { total = item->HeroicWis; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) total += GetAugment(i)->GetItemHeroicWis(); } @@ -1581,7 +1581,7 @@ int EQEmu::ItemInstance::GetItemHeroicCha(bool augments) const if (item) { total = item->HeroicCha; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) total += GetAugment(i)->GetItemHeroicCha(); } @@ -1595,7 +1595,7 @@ int EQEmu::ItemInstance::GetItemHeroicMR(bool augments) const if (item) { total = item->HeroicMR; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) total += GetAugment(i)->GetItemHeroicMR(); } @@ -1609,7 +1609,7 @@ int EQEmu::ItemInstance::GetItemHeroicFR(bool augments) const if (item) { total = item->HeroicFR; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) total += GetAugment(i)->GetItemHeroicFR(); } @@ -1623,7 +1623,7 @@ int EQEmu::ItemInstance::GetItemHeroicCR(bool augments) const if (item) { total = item->HeroicCR; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) total += GetAugment(i)->GetItemHeroicCR(); } @@ -1637,7 +1637,7 @@ int EQEmu::ItemInstance::GetItemHeroicPR(bool augments) const if (item) { total = item->HeroicPR; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) total += GetAugment(i)->GetItemHeroicPR(); } @@ -1651,7 +1651,7 @@ int EQEmu::ItemInstance::GetItemHeroicDR(bool augments) const if (item) { total = item->HeroicDR; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) total += GetAugment(i)->GetItemHeroicDR(); } @@ -1665,7 +1665,7 @@ int EQEmu::ItemInstance::GetItemHeroicCorrup(bool augments) const if (item) { total = item->HeroicSVCorrup; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) total += GetAugment(i)->GetItemHeroicCorrup(); } @@ -1679,7 +1679,7 @@ int EQEmu::ItemInstance::GetItemHaste(bool augments) const if (item) { total = item->Haste; if (augments) - for (int i = inventory::socketBegin; i < inventory::SocketCount; ++i) + for (int i = invaug::SOCKET_BEGIN; i <= invaug::SOCKET_END; ++i) if (GetAugment(i)) { int temp = GetAugment(i)->GetItemHaste(); if (temp > total) diff --git a/common/misc_functions.cpp b/common/misc_functions.cpp index e31da211f..a85ca9c2b 100644 --- a/common/misc_functions.cpp +++ b/common/misc_functions.cpp @@ -275,7 +275,7 @@ float EQHtoFloat(int d) } // returns a swapped-bit value for use in client translator and inventory functions -uint32 SwapBits21and22(uint32 mask) +uint32 SwapBits21And22(uint32 mask) { static const uint32 BIT21 = 1 << 21; static const uint32 BIT22 = 1 << 22; diff --git a/common/misc_functions.h b/common/misc_functions.h index 8214c7df0..2ead697e7 100644 --- a/common/misc_functions.h +++ b/common/misc_functions.h @@ -69,7 +69,7 @@ int FloatToEQSpeedRun(float d); // brings heading back into EQ angles range float FixHeading(float in); -uint32 SwapBits21and22(uint32 mask); +uint32 SwapBits21And22(uint32 mask); uint32 Catch22(uint32 mask); // macro to catch fp errors (provided by noudness) diff --git a/common/patches/rof.cpp b/common/patches/rof.cpp index 62ef6751a..4573b0cc7 100644 --- a/common/patches/rof.cpp +++ b/common/patches/rof.cpp @@ -2338,12 +2338,12 @@ namespace RoF outapp->WriteUInt8(0); // Unknown outapp->WriteUInt8(0); // Unknown - outapp->WriteUInt32(profile::BandoliersSize); + outapp->WriteUInt32(profile::BANDOLIERS_SIZE); // Copy bandoliers where server and client indexes converge - for (uint32 r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < profile::BandoliersSize; ++r) { + for (uint32 r = 0; r < EQEmu::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) { outapp->WriteString(emu->bandoliers[r].Name); - for (uint32 j = 0; j < profile::BandolierItemCount; ++j) { // Will need adjusting if 'server != client' is ever true + for (uint32 j = 0; j < profile::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true outapp->WriteString(emu->bandoliers[r].Items[j].Name); outapp->WriteUInt32(emu->bandoliers[r].Items[j].ID); if (emu->bandoliers[r].Items[j].Icon) { @@ -2356,19 +2356,19 @@ namespace RoF } } // Nullify bandoliers where server and client indexes diverge, with a client bias - for (uint32 r = EQEmu::legacy::BANDOLIERS_SIZE; r < profile::BandoliersSize; ++r) { + for (uint32 r = EQEmu::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) { outapp->WriteString(""); - for (uint32 j = 0; j < profile::BandolierItemCount; ++j) { // Will need adjusting if 'server != client' is ever true + for (uint32 j = 0; j < profile::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true outapp->WriteString(""); outapp->WriteUInt32(0); outapp->WriteSInt32(-1); } } - outapp->WriteUInt32(profile::PotionBeltSize); + outapp->WriteUInt32(profile::POTION_BELT_SIZE); // Copy potion belt where server and client indexes converge - for (uint32 r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < profile::PotionBeltSize; ++r) { + for (uint32 r = 0; r < EQEmu::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++r) { outapp->WriteString(emu->potionbelt.Items[r].Name); outapp->WriteUInt32(emu->potionbelt.Items[r].ID); if (emu->potionbelt.Items[r].Icon) { @@ -2380,7 +2380,7 @@ namespace RoF } } // Nullify potion belt where server and client indexes diverge, with a client bias - for (uint32 r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < profile::PotionBeltSize; ++r) { + for (uint32 r = EQEmu::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) { outapp->WriteString(""); outapp->WriteUInt32(0); outapp->WriteSInt32(-1); @@ -2501,9 +2501,9 @@ namespace RoF outapp->WriteUInt8(0); // Unknown outapp->WriteUInt8(0); // Unknown - outapp->WriteUInt32(EQEmu::legacy::TRIBUTE_SIZE); + outapp->WriteUInt32(EQEmu::invtype::TRIBUTE_SIZE); - for (uint32 r = 0; r < EQEmu::legacy::TRIBUTE_SIZE; r++) + for (uint32 r = 0; r < EQEmu::invtype::TRIBUTE_SIZE; r++) { outapp->WriteUInt32(emu->tributes[r].tribute); outapp->WriteUInt32(emu->tributes[r].tier); @@ -2994,7 +2994,7 @@ namespace RoF size_t names_length = 0; size_t character_count = 0; - for (; character_count < emu->CharCount && character_count < constants::SayLinkBodySize; ++character_count) { + for (; character_count < emu->CharCount && character_count < constants::CHARACTER_CREATION_LIMIT; ++character_count) { emu_cse = (CharacterSelectEntry_Struct *)emu_ptr; names_length += strlen(emu_cse->Name); emu_ptr += sizeof(CharacterSelectEntry_Struct); @@ -4811,7 +4811,7 @@ namespace RoF IN(item_id); int r; - for (r = EQEmu::inventory::socketBegin; r < EQEmu::inventory::SocketCount; r++) { + for (r = EQEmu::invaug::SOCKET_BEGIN; r <= EQEmu::invaug::SOCKET_END; r++) { IN(augments[r]); } IN(link_hash); @@ -5205,7 +5205,7 @@ namespace RoF structs::InventorySlot_Struct slot_id = ServerToRoFSlot(slot_id_in); - hdr.slot_type = (inst->GetMerchantSlot() ? invtype::InvTypeMerchant : slot_id.Type); + hdr.slot_type = (inst->GetMerchantSlot() ? invtype::typeMerchant : slot_id.Type); hdr.main_slot = (inst->GetMerchantSlot() ? inst->GetMerchantSlot() : slot_id.Slot); hdr.sub_slot = (inst->GetMerchantSlot() ? 0xffff : slot_id.SubIndex); hdr.aug_slot = (inst->GetMerchantSlot() ? 0xffff : slot_id.AugIndex); @@ -5299,7 +5299,7 @@ namespace RoF ibs.nodrop = item->NoDrop; ibs.attune = item->Attuneable; ibs.size = item->Size; - ibs.slots = SwapBits21and22(item->Slots); + ibs.slots = SwapBits21And22(item->Slots); ibs.price = item->Price; ibs.icon = item->Icon; ibs.unknown1 = 1; @@ -5393,7 +5393,7 @@ namespace RoF isbs.augdistiller = 65535; isbs.augrestrict = item->AugRestrict; - for (int index = 0; index < invaug::ItemAugSize; ++index) { + for (int index = invaug::SOCKET_BEGIN; index <= invaug::SOCKET_END; ++index) { isbs.augslots[index].type = item->AugSlotType[index]; isbs.augslots[index].visible = item->AugSlotVisible[index]; isbs.augslots[index].unknown = item->AugSlotUnk2[index]; @@ -5603,18 +5603,18 @@ namespace RoF ob.write((const char*)&subitem_count, sizeof(uint32)); - for (uint32 index = EQEmu::inventory::containerBegin; index < EQEmu::inventory::ContainerCount; ++index) { + for (uint32 index = EQEmu::invbag::SLOT_BEGIN; index <= EQEmu::invbag::SLOT_END; ++index) { EQEmu::ItemInstance* sub = inst->GetItem(index); if (!sub) continue; int SubSlotNumber = INVALID_INDEX; - if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END) - SubSlotNumber = (((slot_id_in + 3) * EQEmu::inventory::ContainerCount) + index + 1); - else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END) - SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::BANK_BAGS_BEGIN + index); - else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END) - SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index); + if (slot_id_in >= EQEmu::invslot::GENERAL_BEGIN && slot_id_in <= EQEmu::invslot::GENERAL_END) + SubSlotNumber = (((slot_id_in + 3) * EQEmu::invbag::SLOT_COUNT) + index + 1); + else if (slot_id_in >= EQEmu::invslot::BANK_BEGIN && slot_id_in <= EQEmu::invslot::BANK_END) + SubSlotNumber = (((slot_id_in - EQEmu::invslot::BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::BANK_BAGS_BEGIN + index); + else if (slot_id_in >= EQEmu::invslot::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::invslot::SHARED_BANK_END) + SubSlotNumber = (((slot_id_in - EQEmu::invslot::SHARED_BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + index); else SubSlotNumber = slot_id_in; @@ -5640,17 +5640,17 @@ namespace RoF uint32 TempSlot = 0; - if (serverSlot < 56 || serverSlot == EQEmu::inventory::slotPowerSource) { // Main Inventory and Cursor - RoFSlot.Type = invtype::InvTypePossessions; + if (serverSlot < 56 || serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE) { // Main Inventory and Cursor + RoFSlot.Type = invtype::typePossessions; RoFSlot.Slot = serverSlot; - if (serverSlot == EQEmu::inventory::slotPowerSource) - RoFSlot.Slot = invslot::PossessionsPowerSource; + if (serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE) + RoFSlot.Slot = invslot::slotPowerSource; - else if (serverSlot >= EQEmu::inventory::slotCursor) // Cursor and Extended Corpse Inventory + else if (serverSlot >= EQEmu::invslot::slotCursor) // Cursor and Extended Corpse Inventory RoFSlot.Slot += 3; - else if (serverSlot >= EQEmu::inventory::slotAmmo) // (> 20) + else if (serverSlot >= EQEmu::invslot::slotAmmo) // (> 20) RoFSlot.Slot += 1; } @@ -5659,51 +5659,51 @@ namespace RoF RoFSlot.MainSlot = ServerSlot - 31; }*/ - else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) { // (> 250 && < 341) - RoFSlot.Type = invtype::InvTypePossessions; + else if (serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::invbag::CURSOR_BAG_END) { // (> 250 && < 341) + RoFSlot.Type = invtype::typePossessions; TempSlot = serverSlot - 1; - RoFSlot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 2; - RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::inventory::ContainerCount); + RoFSlot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 2; + RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::invbag::SLOT_COUNT); - if (RoFSlot.Slot >= invslot::PossessionsGeneral9) // (> 30) - RoFSlot.Slot = invslot::PossessionsCursor; + if (RoFSlot.Slot >= invslot::slotGeneral9) // (> 30) + RoFSlot.Slot = invslot::slotCursor; } - else if (serverSlot >= EQEmu::legacy::TRIBUTE_BEGIN && serverSlot <= EQEmu::legacy::TRIBUTE_END) { // Tribute - RoFSlot.Type = invtype::InvTypeTribute; - RoFSlot.Slot = serverSlot - EQEmu::legacy::TRIBUTE_BEGIN; + else if (serverSlot >= EQEmu::invslot::TRIBUTE_BEGIN && serverSlot <= EQEmu::invslot::TRIBUTE_END) { // Tribute + RoFSlot.Type = invtype::typeTribute; + RoFSlot.Slot = serverSlot - EQEmu::invslot::TRIBUTE_BEGIN; } - else if (serverSlot >= EQEmu::legacy::BANK_BEGIN && serverSlot <= EQEmu::legacy::BANK_BAGS_END) { - RoFSlot.Type = invtype::InvTypeBank; - TempSlot = serverSlot - EQEmu::legacy::BANK_BEGIN; + else if (serverSlot >= EQEmu::invslot::BANK_BEGIN && serverSlot <= EQEmu::invbag::BANK_BAGS_END) { + RoFSlot.Type = invtype::typeBank; + TempSlot = serverSlot - EQEmu::invslot::BANK_BEGIN; RoFSlot.Slot = TempSlot; if (TempSlot > 30) { // (> 30) - RoFSlot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3; - RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::inventory::ContainerCount); + RoFSlot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 3; + RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::invbag::SLOT_COUNT); } } - else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END) { - RoFSlot.Type = invtype::InvTypeSharedBank; - TempSlot = serverSlot - EQEmu::legacy::SHARED_BANK_BEGIN; + else if (serverSlot >= EQEmu::invslot::SHARED_BANK_BEGIN && serverSlot <= EQEmu::invbag::SHARED_BANK_BAGS_END) { + RoFSlot.Type = invtype::typeSharedBank; + TempSlot = serverSlot - EQEmu::invslot::SHARED_BANK_BEGIN; RoFSlot.Slot = TempSlot; if (TempSlot > 30) { // (> 30) - RoFSlot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3; - RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::inventory::ContainerCount); + RoFSlot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 3; + RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::invbag::SLOT_COUNT); } } - else if (serverSlot >= EQEmu::legacy::TRADE_BEGIN && serverSlot <= EQEmu::legacy::TRADE_BAGS_END) { - RoFSlot.Type = invtype::InvTypeTrade; - TempSlot = serverSlot - EQEmu::legacy::TRADE_BEGIN; + else if (serverSlot >= EQEmu::invslot::TRADE_BEGIN && serverSlot <= EQEmu::invbag::TRADE_BAGS_END) { + RoFSlot.Type = invtype::typeTrade; + TempSlot = serverSlot - EQEmu::invslot::TRADE_BEGIN; RoFSlot.Slot = TempSlot; if (TempSlot > 30) { - RoFSlot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3; - RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::inventory::ContainerCount); + RoFSlot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 3; + RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::invbag::SLOT_COUNT); } /* @@ -5720,9 +5720,9 @@ namespace RoF */ } - else if (serverSlot >= EQEmu::legacy::WORLD_BEGIN && serverSlot <= EQEmu::legacy::WORLD_END) { - RoFSlot.Type = invtype::InvTypeWorld; - TempSlot = serverSlot - EQEmu::legacy::WORLD_BEGIN; + else if (serverSlot >= EQEmu::invslot::WORLD_BEGIN && serverSlot <= EQEmu::invslot::WORLD_END) { + RoFSlot.Type = invtype::typeWorld; + TempSlot = serverSlot - EQEmu::invslot::WORLD_BEGIN; RoFSlot.Slot = TempSlot; } @@ -5741,16 +5741,16 @@ namespace RoF uint32 TempSlot = 0; - if (serverSlot < 56 || serverSlot == EQEmu::inventory::slotPowerSource) { // (< 52) + if (serverSlot < 56 || serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE) { // (< 52) RoFSlot.Slot = serverSlot; - if (serverSlot == EQEmu::inventory::slotPowerSource) - RoFSlot.Slot = invslot::PossessionsPowerSource; + if (serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE) + RoFSlot.Slot = invslot::slotPowerSource; - else if (serverSlot >= EQEmu::inventory::slotCursor) // Cursor and Extended Corpse Inventory + else if (serverSlot >= EQEmu::invslot::slotCursor) // Cursor and Extended Corpse Inventory RoFSlot.Slot += 3; - else if (serverSlot >= EQEmu::inventory::slotAmmo) // Ammo and Personl Inventory + else if (serverSlot >= EQEmu::invslot::slotAmmo) // Ammo and Personl Inventory RoFSlot.Slot += 1; /*else if (ServerSlot >= MainCursor) { // Cursor @@ -5761,10 +5761,10 @@ namespace RoF }*/ } - else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) { + else if (serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::invbag::CURSOR_BAG_END) { TempSlot = serverSlot - 1; - RoFSlot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 2; - RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::inventory::ContainerCount); + RoFSlot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 2; + RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::invbag::SLOT_COUNT); } Log(Logs::General, Logs::Netcode, "[ERROR] Convert Server Slot %i to RoF Slots: Main %i, Sub %i, Aug %i, Unk1 %i", serverSlot, RoFSlot.Slot, RoFSlot.SubIndex, RoFSlot.AugIndex, RoFSlot.Unknown01); @@ -5782,11 +5782,11 @@ namespace RoF uint32 ServerSlot = INVALID_INDEX; uint32 TempSlot = 0; - if (rofSlot.Type == invtype::InvTypePossessions && rofSlot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 51) - if (rofSlot.Slot == invslot::PossessionsPowerSource) - TempSlot = EQEmu::inventory::slotPowerSource; + if (rofSlot.Type == invtype::typePossessions && rofSlot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 51) + if (rofSlot.Slot == invslot::slotPowerSource) + TempSlot = EQEmu::invslot::SLOT_POWER_SOURCE; - else if (rofSlot.Slot >= invslot::PossessionsCursor) // Cursor and Extended Corpse Inventory + else if (rofSlot.Slot >= invslot::slotCursor) // Cursor and Extended Corpse Inventory TempSlot = rofSlot.Slot - 3; /*else if (RoFSlot.MainSlot == slots::MainGeneral9 || RoFSlot.MainSlot == slots::MainGeneral10) { // 9th and 10th RoF inventory/corpse slots @@ -5800,23 +5800,23 @@ namespace RoF // For now, it's probably best to leave as-is and let this work itself out in the inventory rework. }*/ - else if (rofSlot.Slot >= invslot::PossessionsAmmo) // Ammo and Main Inventory + else if (rofSlot.Slot >= invslot::slotAmmo) // Ammo and Main Inventory TempSlot = rofSlot.Slot - 1; else // Worn Slots TempSlot = rofSlot.Slot; - if (rofSlot.SubIndex >= EQEmu::inventory::containerBegin) // Bag Slots - TempSlot = ((TempSlot + 3) * EQEmu::inventory::ContainerCount) + rofSlot.SubIndex + 1; + if (rofSlot.SubIndex >= EQEmu::invbag::SLOT_BEGIN) // Bag Slots + TempSlot = ((TempSlot + 3) * EQEmu::invbag::SLOT_COUNT) + rofSlot.SubIndex + 1; ServerSlot = TempSlot; } - else if (rofSlot.Type == invtype::InvTypeBank) { - TempSlot = EQEmu::legacy::BANK_BEGIN; + else if (rofSlot.Type == invtype::typeBank) { + TempSlot = EQEmu::invslot::BANK_BEGIN; - if (rofSlot.SubIndex >= EQEmu::inventory::containerBegin) - TempSlot += ((rofSlot.Slot + 3) * EQEmu::inventory::ContainerCount) + rofSlot.SubIndex + 1; + if (rofSlot.SubIndex >= EQEmu::invbag::SLOT_BEGIN) + TempSlot += ((rofSlot.Slot + 3) * EQEmu::invbag::SLOT_COUNT) + rofSlot.SubIndex + 1; else TempSlot += rofSlot.Slot; @@ -5824,11 +5824,11 @@ namespace RoF ServerSlot = TempSlot; } - else if (rofSlot.Type == invtype::InvTypeSharedBank) { - TempSlot = EQEmu::legacy::SHARED_BANK_BEGIN; + else if (rofSlot.Type == invtype::typeSharedBank) { + TempSlot = EQEmu::invslot::SHARED_BANK_BEGIN; - if (rofSlot.SubIndex >= EQEmu::inventory::containerBegin) - TempSlot += ((rofSlot.Slot + 3) * EQEmu::inventory::ContainerCount) + rofSlot.SubIndex + 1; + if (rofSlot.SubIndex >= EQEmu::invbag::SLOT_BEGIN) + TempSlot += ((rofSlot.Slot + 3) * EQEmu::invbag::SLOT_COUNT) + rofSlot.SubIndex + 1; else TempSlot += rofSlot.Slot; @@ -5836,11 +5836,11 @@ namespace RoF ServerSlot = TempSlot; } - else if (rofSlot.Type == invtype::InvTypeTrade) { - TempSlot = EQEmu::legacy::TRADE_BEGIN; + else if (rofSlot.Type == invtype::typeTrade) { + TempSlot = EQEmu::invslot::TRADE_BEGIN; - if (rofSlot.SubIndex >= EQEmu::inventory::containerBegin) - TempSlot += ((rofSlot.Slot + 3) * EQEmu::inventory::ContainerCount) + rofSlot.SubIndex + 1; + if (rofSlot.SubIndex >= EQEmu::invbag::SLOT_BEGIN) + TempSlot += ((rofSlot.Slot + 3) * EQEmu::invbag::SLOT_COUNT) + rofSlot.SubIndex + 1; // OLD CODE: //TempSlot += 100 + (RoFSlot.MainSlot * EQEmu::inventory::ContainerCount) + RoFSlot.SubSlot; @@ -5850,10 +5850,10 @@ namespace RoF ServerSlot = TempSlot; } - else if (rofSlot.Type == invtype::InvTypeWorld) { - TempSlot = EQEmu::legacy::WORLD_BEGIN; + else if (rofSlot.Type == invtype::typeWorld) { + TempSlot = EQEmu::invslot::WORLD_BEGIN; - if (rofSlot.Slot >= EQEmu::inventory::containerBegin) + if (rofSlot.Slot >= EQEmu::invbag::SLOT_BEGIN) TempSlot += rofSlot.Slot; ServerSlot = TempSlot; @@ -5868,7 +5868,7 @@ namespace RoF ServerSlot = TempSlot; }*/ - else if (rofSlot.Type == invtype::InvTypeGuildTribute) { + else if (rofSlot.Type == invtype::typeGuildTribute) { ServerSlot = INVALID_INDEX; } @@ -5883,10 +5883,10 @@ namespace RoF uint32 TempSlot = 0; if (rofSlot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 33) - if (rofSlot.Slot == invslot::PossessionsPowerSource) - TempSlot = EQEmu::inventory::slotPowerSource; + if (rofSlot.Slot == invslot::slotPowerSource) + TempSlot = EQEmu::invslot::SLOT_POWER_SOURCE; - else if (rofSlot.Slot >= invslot::PossessionsCursor) // Cursor and Extended Corpse Inventory + else if (rofSlot.Slot >= invslot::slotCursor) // Cursor and Extended Corpse Inventory TempSlot = rofSlot.Slot - 3; /*else if (RoFSlot.MainSlot == slots::MainGeneral9 || RoFSlot.MainSlot == slots::MainGeneral10) { // 9th and 10th RoF inventory slots @@ -5895,14 +5895,14 @@ namespace RoF // Same as above }*/ - else if (rofSlot.Slot >= invslot::PossessionsAmmo) // Main Inventory and Ammo Slots + else if (rofSlot.Slot >= invslot::slotAmmo) // Main Inventory and Ammo Slots TempSlot = rofSlot.Slot - 1; else TempSlot = rofSlot.Slot; - if (rofSlot.SubIndex >= EQEmu::inventory::containerBegin) // Bag Slots - TempSlot = ((TempSlot + 3) * EQEmu::inventory::ContainerCount) + rofSlot.SubIndex + 1; + if (rofSlot.SubIndex >= EQEmu::invbag::SLOT_BEGIN) // Bag Slots + TempSlot = ((TempSlot + 3) * EQEmu::invbag::SLOT_COUNT) + rofSlot.SubIndex + 1; ServerSlot = TempSlot; } @@ -5919,7 +5919,7 @@ namespace RoF static inline void ServerToRoFSayLink(std::string& rofSayLink, const std::string& serverSayLink) { - if ((constants::SayLinkBodySize == EQEmu::constants::SayLinkBodySize) || (serverSayLink.find('\x12') == std::string::npos)) { + if ((constants::SAY_LINK_BODY_SIZE == EQEmu::constants::SAY_LINK_BODY_SIZE) || (serverSayLink.find('\x12') == std::string::npos)) { rofSayLink = serverSayLink; return; } @@ -5928,7 +5928,7 @@ namespace RoF for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { - if (segments[segment_iter].length() <= EQEmu::constants::SayLinkBodySize) { + if (segments[segment_iter].length() <= EQEmu::constants::SAY_LINK_BODY_SIZE) { rofSayLink.append(segments[segment_iter]); // TODO: log size mismatch error continue; @@ -5958,7 +5958,7 @@ namespace RoF static inline void RoFToServerSayLink(std::string& serverSayLink, const std::string& rofSayLink) { - if ((EQEmu::constants::SayLinkBodySize == constants::SayLinkBodySize) || (rofSayLink.find('\x12') == std::string::npos)) { + if ((EQEmu::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (rofSayLink.find('\x12') == std::string::npos)) { serverSayLink = rofSayLink; return; } @@ -5967,7 +5967,7 @@ namespace RoF for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { - if (segments[segment_iter].length() <= constants::SayLinkBodySize) { + if (segments[segment_iter].length() <= constants::SAY_LINK_BODY_SIZE) { serverSayLink.append(segments[segment_iter]); // TODO: log size mismatch error continue; diff --git a/common/patches/rof2.cpp b/common/patches/rof2.cpp index 5a30c1695..5b7016d52 100644 --- a/common/patches/rof2.cpp +++ b/common/patches/rof2.cpp @@ -2415,12 +2415,12 @@ namespace RoF2 outapp->WriteUInt8(0); // Unknown outapp->WriteUInt8(0); // Unknown - outapp->WriteUInt32(profile::BandoliersSize); + outapp->WriteUInt32(profile::BANDOLIERS_SIZE); // Copy bandoliers where server and client indexes converge - for (uint32 r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < profile::BandoliersSize; ++r) { + for (uint32 r = 0; r < EQEmu::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) { outapp->WriteString(emu->bandoliers[r].Name); - for (uint32 j = 0; j < profile::BandolierItemCount; ++j) { // Will need adjusting if 'server != client' is ever true + for (uint32 j = 0; j < profile::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true outapp->WriteString(emu->bandoliers[r].Items[j].Name); outapp->WriteUInt32(emu->bandoliers[r].Items[j].ID); if (emu->bandoliers[r].Items[j].Icon) { @@ -2433,19 +2433,19 @@ namespace RoF2 } } // Nullify bandoliers where server and client indexes diverge, with a client bias - for (uint32 r = EQEmu::legacy::BANDOLIERS_SIZE; r < profile::BandoliersSize; ++r) { + for (uint32 r = EQEmu::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) { outapp->WriteString(""); - for (uint32 j = 0; j < profile::BandolierItemCount; ++j) { // Will need adjusting if 'server != client' is ever true + for (uint32 j = 0; j < profile::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true outapp->WriteString(""); outapp->WriteUInt32(0); outapp->WriteSInt32(-1); } } - outapp->WriteUInt32(profile::PotionBeltSize); + outapp->WriteUInt32(profile::POTION_BELT_SIZE); // Copy potion belt where server and client indexes converge - for (uint32 r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < profile::PotionBeltSize; ++r) { + for (uint32 r = 0; r < EQEmu::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++r) { outapp->WriteString(emu->potionbelt.Items[r].Name); outapp->WriteUInt32(emu->potionbelt.Items[r].ID); if (emu->potionbelt.Items[r].Icon) { @@ -2457,7 +2457,7 @@ namespace RoF2 } } // Nullify potion belt where server and client indexes diverge, with a client bias - for (uint32 r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < profile::PotionBeltSize; ++r) { + for (uint32 r = EQEmu::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) { outapp->WriteString(""); outapp->WriteUInt32(0); outapp->WriteSInt32(-1); @@ -2574,9 +2574,9 @@ namespace RoF2 outapp->WriteUInt8(0); // Unknown outapp->WriteUInt8(0); // Unknown - outapp->WriteUInt32(EQEmu::legacy::TRIBUTE_SIZE); + outapp->WriteUInt32(EQEmu::invtype::TRIBUTE_SIZE); - for (uint32 r = 0; r < EQEmu::legacy::TRIBUTE_SIZE; r++) + for (uint32 r = 0; r < EQEmu::invtype::TRIBUTE_SIZE; r++) { outapp->WriteUInt32(emu->tributes[r].tribute); outapp->WriteUInt32(emu->tributes[r].tier); @@ -3081,7 +3081,7 @@ namespace RoF2 size_t names_length = 0; size_t character_count = 0; - for (; character_count < emu->CharCount && character_count < constants::CharacterCreationLimit; ++character_count) { + for (; character_count < emu->CharCount && character_count < constants::CHARACTER_CREATION_LIMIT; ++character_count) { emu_cse = (CharacterSelectEntry_Struct *)emu_ptr; names_length += strlen(emu_cse->Name); emu_ptr += sizeof(CharacterSelectEntry_Struct); @@ -5051,7 +5051,7 @@ namespace RoF2 IN(item_id); int r; - for (r = EQEmu::inventory::socketBegin; r < EQEmu::inventory::SocketCount; r++) { + for (r = EQEmu::invaug::SOCKET_BEGIN; r <= EQEmu::invaug::SOCKET_END; r++) { IN(augments[r]); } IN(link_hash); @@ -5500,7 +5500,7 @@ namespace RoF2 structs::InventorySlot_Struct slot_id = ServerToRoF2Slot(slot_id_in, packet_type); - hdr.slot_type = (inst->GetMerchantSlot() ? invtype::InvTypeMerchant : slot_id.Type); + hdr.slot_type = (inst->GetMerchantSlot() ? invtype::typeMerchant : slot_id.Type); hdr.main_slot = (inst->GetMerchantSlot() ? inst->GetMerchantSlot() : slot_id.Slot); hdr.sub_slot = (inst->GetMerchantSlot() ? 0xffff : slot_id.SubIndex); hdr.aug_slot = (inst->GetMerchantSlot() ? 0xffff : slot_id.AugIndex); @@ -5594,7 +5594,7 @@ namespace RoF2 ibs.nodrop = item->NoDrop; ibs.attune = item->Attuneable; ibs.size = item->Size; - ibs.slots = SwapBits21and22(item->Slots); + ibs.slots = SwapBits21And22(item->Slots); ibs.price = item->Price; ibs.icon = item->Icon; ibs.unknown1 = 1; @@ -5688,7 +5688,7 @@ namespace RoF2 isbs.augrestrict2 = -1; isbs.augrestrict = item->AugRestrict; - for (int index = 0; index < invaug::ItemAugSize; ++index) { + for (int index = invaug::SOCKET_BEGIN; index <= invaug::SOCKET_END; ++index) { isbs.augslots[index].type = item->AugSlotType[index]; isbs.augslots[index].visible = item->AugSlotVisible[index]; isbs.augslots[index].unknown = item->AugSlotUnk2[index]; @@ -5908,18 +5908,18 @@ namespace RoF2 ob.write((const char*)&subitem_count, sizeof(uint32)); - for (uint32 index = EQEmu::inventory::containerBegin; index < EQEmu::inventory::ContainerCount; ++index) { + for (uint32 index = EQEmu::invbag::SLOT_BEGIN; index <= EQEmu::invbag::SLOT_END; ++index) { EQEmu::ItemInstance* sub = inst->GetItem(index); if (!sub) continue; int SubSlotNumber = INVALID_INDEX; - if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END) - SubSlotNumber = (((slot_id_in + 3) * EQEmu::inventory::ContainerCount) + index + 1); - else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END) - SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::BANK_BAGS_BEGIN + index); - else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END) - SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index); + if (slot_id_in >= EQEmu::invslot::GENERAL_BEGIN && slot_id_in <= EQEmu::invslot::GENERAL_END) + SubSlotNumber = (((slot_id_in + 3) * EQEmu::invbag::SLOT_COUNT) + index + 1); + else if (slot_id_in >= EQEmu::invslot::BANK_BEGIN && slot_id_in <= EQEmu::invslot::BANK_END) + SubSlotNumber = (((slot_id_in - EQEmu::invslot::BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::BANK_BAGS_BEGIN + index); + else if (slot_id_in >= EQEmu::invslot::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::invslot::SHARED_BANK_END) + SubSlotNumber = (((slot_id_in - EQEmu::invslot::SHARED_BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + index); else SubSlotNumber = slot_id_in; @@ -5945,25 +5945,25 @@ namespace RoF2 uint32 TempSlot = 0; - if (serverSlot < 56 || serverSlot == EQEmu::inventory::slotPowerSource) { // Main Inventory and Cursor + if (serverSlot < 56 || serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE) { // Main Inventory and Cursor if (PacketType == ItemPacketLoot) { - RoF2Slot.Type = invtype::InvTypeCorpse; - RoF2Slot.Slot = serverSlot - EQEmu::legacy::CORPSE_BEGIN; + RoF2Slot.Type = invtype::typeCorpse; + RoF2Slot.Slot = serverSlot - EQEmu::invslot::CORPSE_BEGIN; } else { - RoF2Slot.Type = invtype::InvTypePossessions; + RoF2Slot.Type = invtype::typePossessions; RoF2Slot.Slot = serverSlot; } - if (serverSlot == EQEmu::inventory::slotPowerSource) - RoF2Slot.Slot = invslot::PossessionsPowerSource; + if (serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE) + RoF2Slot.Slot = invslot::slotPowerSource; - else if (serverSlot >= EQEmu::inventory::slotCursor && PacketType != ItemPacketLoot) // Cursor and Extended Corpse Inventory + else if (serverSlot >= EQEmu::invslot::slotCursor && PacketType != ItemPacketLoot) // Cursor and Extended Corpse Inventory RoF2Slot.Slot += 3; - else if (serverSlot >= EQEmu::inventory::slotAmmo) // (> 20) + else if (serverSlot >= EQEmu::invslot::slotAmmo) // (> 20) RoF2Slot.Slot += 1; } @@ -5972,51 +5972,51 @@ namespace RoF2 RoF2Slot.MainSlot = ServerSlot - 31; }*/ - else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) { // (> 250 && < 341) - RoF2Slot.Type = invtype::InvTypePossessions; + else if (serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::invbag::CURSOR_BAG_END) { // (> 250 && < 341) + RoF2Slot.Type = invtype::typePossessions; TempSlot = serverSlot - 1; - RoF2Slot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 2; - RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::inventory::ContainerCount); + RoF2Slot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 2; + RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::invbag::SLOT_COUNT); - if (RoF2Slot.Slot >= invslot::PossessionsGeneral9) // (> 30) - RoF2Slot.Slot = invslot::PossessionsCursor; + if (RoF2Slot.Slot >= invslot::slotGeneral9) // (> 30) + RoF2Slot.Slot = invslot::slotCursor; } - else if (serverSlot >= EQEmu::legacy::TRIBUTE_BEGIN && serverSlot <= EQEmu::legacy::TRIBUTE_END) { // Tribute - RoF2Slot.Type = invtype::InvTypeTribute; - RoF2Slot.Slot = serverSlot - EQEmu::legacy::TRIBUTE_BEGIN; + else if (serverSlot >= EQEmu::invslot::TRIBUTE_BEGIN && serverSlot <= EQEmu::invslot::TRIBUTE_END) { // Tribute + RoF2Slot.Type = invtype::typeTribute; + RoF2Slot.Slot = serverSlot - EQEmu::invslot::TRIBUTE_BEGIN; } - else if (serverSlot >= EQEmu::legacy::BANK_BEGIN && serverSlot <= EQEmu::legacy::BANK_BAGS_END) { - RoF2Slot.Type = invtype::InvTypeBank; - TempSlot = serverSlot - EQEmu::legacy::BANK_BEGIN; + else if (serverSlot >= EQEmu::invslot::BANK_BEGIN && serverSlot <= EQEmu::invbag::BANK_BAGS_END) { + RoF2Slot.Type = invtype::typeBank; + TempSlot = serverSlot - EQEmu::invslot::BANK_BEGIN; RoF2Slot.Slot = TempSlot; if (TempSlot > 30) { // (> 30) - RoF2Slot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3; - RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::inventory::ContainerCount); + RoF2Slot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 3; + RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::invbag::SLOT_COUNT); } } - else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END) { - RoF2Slot.Type = invtype::InvTypeSharedBank; - TempSlot = serverSlot - EQEmu::legacy::SHARED_BANK_BEGIN; + else if (serverSlot >= EQEmu::invslot::SHARED_BANK_BEGIN && serverSlot <= EQEmu::invbag::SHARED_BANK_BAGS_END) { + RoF2Slot.Type = invtype::typeSharedBank; + TempSlot = serverSlot - EQEmu::invslot::SHARED_BANK_BEGIN; RoF2Slot.Slot = TempSlot; if (TempSlot > 30) { // (> 30) - RoF2Slot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3; - RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::inventory::ContainerCount); + RoF2Slot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 3; + RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::invbag::SLOT_COUNT); } } - else if (serverSlot >= EQEmu::legacy::TRADE_BEGIN && serverSlot <= EQEmu::legacy::TRADE_BAGS_END) { - RoF2Slot.Type = invtype::InvTypeTrade; - TempSlot = serverSlot - EQEmu::legacy::TRADE_BEGIN; + else if (serverSlot >= EQEmu::invslot::TRADE_BEGIN && serverSlot <= EQEmu::invbag::TRADE_BAGS_END) { + RoF2Slot.Type = invtype::typeTrade; + TempSlot = serverSlot - EQEmu::invslot::TRADE_BEGIN; RoF2Slot.Slot = TempSlot; if (TempSlot > 30) { - RoF2Slot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 3; - RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::inventory::ContainerCount); + RoF2Slot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 3; + RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::invbag::SLOT_COUNT); } /* @@ -6033,9 +6033,9 @@ namespace RoF2 */ } - else if (serverSlot >= EQEmu::legacy::WORLD_BEGIN && serverSlot <= EQEmu::legacy::WORLD_END) { - RoF2Slot.Type = invtype::InvTypeWorld; - TempSlot = serverSlot - EQEmu::legacy::WORLD_BEGIN; + else if (serverSlot >= EQEmu::invslot::WORLD_BEGIN && serverSlot <= EQEmu::invslot::WORLD_END) { + RoF2Slot.Type = invtype::typeWorld; + TempSlot = serverSlot - EQEmu::invslot::WORLD_BEGIN; RoF2Slot.Slot = TempSlot; } @@ -6054,16 +6054,16 @@ namespace RoF2 uint32 TempSlot = 0; - if (serverSlot < 56 || serverSlot == EQEmu::inventory::slotPowerSource) { // (< 52) + if (serverSlot < 56 || serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE) { // (< 52) RoF2Slot.Slot = serverSlot; - if (serverSlot == EQEmu::inventory::slotPowerSource) - RoF2Slot.Slot = invslot::PossessionsPowerSource; + if (serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE) + RoF2Slot.Slot = invslot::slotPowerSource; - else if (serverSlot >= EQEmu::inventory::slotCursor) // Cursor and Extended Corpse Inventory + else if (serverSlot >= EQEmu::invslot::slotCursor) // Cursor and Extended Corpse Inventory RoF2Slot.Slot += 3; - else if (serverSlot >= EQEmu::inventory::slotAmmo) // Ammo and Personl Inventory + else if (serverSlot >= EQEmu::invslot::slotAmmo) // Ammo and Personl Inventory RoF2Slot.Slot += 1; /*else if (ServerSlot >= MainCursor) { // Cursor @@ -6074,10 +6074,10 @@ namespace RoF2 }*/ } - else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) { + else if (serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::invbag::CURSOR_BAG_END) { TempSlot = serverSlot - 1; - RoF2Slot.Slot = int(TempSlot / EQEmu::inventory::ContainerCount) - 2; - RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::inventory::ContainerCount); + RoF2Slot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 2; + RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::invbag::SLOT_COUNT); } Log(Logs::General, Logs::Netcode, "[ERROR] Convert Server Slot %i to RoF2 Slots: Main %i, Sub %i, Aug %i, Unk1 %i", serverSlot, RoF2Slot.Slot, RoF2Slot.SubIndex, RoF2Slot.AugIndex, RoF2Slot.Unknown01); @@ -6087,7 +6087,7 @@ namespace RoF2 static inline uint32 ServerToRoF2CorpseSlot(uint32 serverCorpseSlot) { - return (serverCorpseSlot - EQEmu::legacy::CORPSE_BEGIN + 1); + return (serverCorpseSlot - EQEmu::invslot::CORPSE_BEGIN + 1); } static inline uint32 RoF2ToServerSlot(structs::InventorySlot_Struct rof2Slot, ItemPacketType PacketType) @@ -6095,11 +6095,11 @@ namespace RoF2 uint32 ServerSlot = INVALID_INDEX; uint32 TempSlot = 0; - if (rof2Slot.Type == invtype::InvTypePossessions && rof2Slot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 51) - if (rof2Slot.Slot == invslot::PossessionsPowerSource) - TempSlot = EQEmu::inventory::slotPowerSource; + if (rof2Slot.Type == invtype::typePossessions && rof2Slot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 51) + if (rof2Slot.Slot == invslot::slotPowerSource) + TempSlot = EQEmu::invslot::SLOT_POWER_SOURCE; - else if (rof2Slot.Slot >= invslot::PossessionsCursor) // Cursor and Extended Corpse Inventory + else if (rof2Slot.Slot >= invslot::slotCursor) // Cursor and Extended Corpse Inventory TempSlot = rof2Slot.Slot - 3; /*else if (RoF2Slot.MainSlot == slots::MainGeneral9 || RoF2Slot.MainSlot == slots::MainGeneral10) { // 9th and 10th RoF2 inventory/corpse slots @@ -6113,23 +6113,23 @@ namespace RoF2 // For now, it's probably best to leave as-is and let this work itself out in the inventory rework. }*/ - else if (rof2Slot.Slot >= invslot::PossessionsAmmo) // Ammo and Main Inventory + else if (rof2Slot.Slot >= invslot::slotAmmo) // Ammo and Main Inventory TempSlot = rof2Slot.Slot - 1; else // Worn Slots TempSlot = rof2Slot.Slot; - if (rof2Slot.SubIndex >= EQEmu::inventory::containerBegin) // Bag Slots - TempSlot = ((TempSlot + 3) * EQEmu::inventory::ContainerCount) + rof2Slot.SubIndex + 1; + if (rof2Slot.SubIndex >= EQEmu::invbag::SLOT_BEGIN) // Bag Slots + TempSlot = ((TempSlot + 3) * EQEmu::invbag::SLOT_COUNT) + rof2Slot.SubIndex + 1; ServerSlot = TempSlot; } - else if (rof2Slot.Type == invtype::InvTypeBank) { - TempSlot = EQEmu::legacy::BANK_BEGIN; + else if (rof2Slot.Type == invtype::typeBank) { + TempSlot = EQEmu::invslot::BANK_BEGIN; - if (rof2Slot.SubIndex >= EQEmu::inventory::containerBegin) - TempSlot += ((rof2Slot.Slot + 3) * EQEmu::inventory::ContainerCount) + rof2Slot.SubIndex + 1; + if (rof2Slot.SubIndex >= EQEmu::invbag::SLOT_BEGIN) + TempSlot += ((rof2Slot.Slot + 3) * EQEmu::invbag::SLOT_COUNT) + rof2Slot.SubIndex + 1; else TempSlot += rof2Slot.Slot; @@ -6137,11 +6137,11 @@ namespace RoF2 ServerSlot = TempSlot; } - else if (rof2Slot.Type == invtype::InvTypeSharedBank) { - TempSlot = EQEmu::legacy::SHARED_BANK_BEGIN; + else if (rof2Slot.Type == invtype::typeSharedBank) { + TempSlot = EQEmu::invslot::SHARED_BANK_BEGIN; - if (rof2Slot.SubIndex >= EQEmu::inventory::containerBegin) - TempSlot += ((rof2Slot.Slot + 3) * EQEmu::inventory::ContainerCount) + rof2Slot.SubIndex + 1; + if (rof2Slot.SubIndex >= EQEmu::invbag::SLOT_BEGIN) + TempSlot += ((rof2Slot.Slot + 3) * EQEmu::invbag::SLOT_COUNT) + rof2Slot.SubIndex + 1; else TempSlot += rof2Slot.Slot; @@ -6149,11 +6149,11 @@ namespace RoF2 ServerSlot = TempSlot; } - else if (rof2Slot.Type == invtype::InvTypeTrade) { - TempSlot = EQEmu::legacy::TRADE_BEGIN; + else if (rof2Slot.Type == invtype::typeTrade) { + TempSlot = EQEmu::invslot::TRADE_BEGIN; - if (rof2Slot.SubIndex >= EQEmu::inventory::containerBegin) - TempSlot += ((rof2Slot.Slot + 3) * EQEmu::inventory::ContainerCount) + rof2Slot.SubIndex + 1; + if (rof2Slot.SubIndex >= EQEmu::invbag::SLOT_BEGIN) + TempSlot += ((rof2Slot.Slot + 3) * EQEmu::invbag::SLOT_COUNT) + rof2Slot.SubIndex + 1; // OLD CODE: //TempSlot += 100 + (RoF2Slot.MainSlot * EmuConstants::ITEM_CONTAINER_SIZE) + RoF2Slot.SubSlot; @@ -6163,10 +6163,10 @@ namespace RoF2 ServerSlot = TempSlot; } - else if (rof2Slot.Type == invtype::InvTypeWorld) { - TempSlot = EQEmu::legacy::WORLD_BEGIN; + else if (rof2Slot.Type == invtype::typeWorld) { + TempSlot = EQEmu::invslot::WORLD_BEGIN; - if (rof2Slot.Slot >= EQEmu::inventory::containerBegin) + if (rof2Slot.Slot >= EQEmu::invbag::SLOT_BEGIN) TempSlot += rof2Slot.Slot; ServerSlot = TempSlot; @@ -6181,12 +6181,12 @@ namespace RoF2 ServerSlot = TempSlot; }*/ - else if (rof2Slot.Type == invtype::InvTypeGuildTribute) { + else if (rof2Slot.Type == invtype::typeGuildTribute) { ServerSlot = INVALID_INDEX; } - else if (rof2Slot.Type == invtype::InvTypeCorpse) { - ServerSlot = rof2Slot.Slot + EQEmu::legacy::CORPSE_BEGIN; + else if (rof2Slot.Type == invtype::typeCorpse) { + ServerSlot = rof2Slot.Slot + EQEmu::invslot::CORPSE_BEGIN; } Log(Logs::General, Logs::Netcode, "[ERROR] Convert RoF2 Slots: Type %i, Unk2 %i, Main %i, Sub %i, Aug %i, Unk1 %i to Server Slot %i", rof2Slot.Type, rof2Slot.Unknown02, rof2Slot.Slot, rof2Slot.SubIndex, rof2Slot.AugIndex, rof2Slot.Unknown01, ServerSlot); @@ -6200,10 +6200,10 @@ namespace RoF2 uint32 TempSlot = 0; if (rof2Slot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 33) - if (rof2Slot.Slot == invslot::PossessionsPowerSource) - TempSlot = EQEmu::inventory::slotPowerSource; + if (rof2Slot.Slot == invslot::slotPowerSource) + TempSlot = EQEmu::invslot::SLOT_POWER_SOURCE; - else if (rof2Slot.Slot >= invslot::PossessionsCursor) // Cursor and Extended Corpse Inventory + else if (rof2Slot.Slot >= invslot::slotCursor) // Cursor and Extended Corpse Inventory TempSlot = rof2Slot.Slot - 3; /*else if (RoF2Slot.MainSlot == slots::MainGeneral9 || RoF2Slot.MainSlot == slots::MainGeneral10) { // 9th and 10th RoF2 inventory slots @@ -6212,14 +6212,14 @@ namespace RoF2 // Same as above }*/ - else if (rof2Slot.Slot >= invslot::PossessionsAmmo) // Main Inventory and Ammo Slots + else if (rof2Slot.Slot >= invslot::slotAmmo) // Main Inventory and Ammo Slots TempSlot = rof2Slot.Slot - 1; else TempSlot = rof2Slot.Slot; - if (rof2Slot.SubIndex >= EQEmu::inventory::containerBegin) // Bag Slots - TempSlot = ((TempSlot + 3) * EQEmu::inventory::ContainerCount) + rof2Slot.SubIndex + 1; + if (rof2Slot.SubIndex >= EQEmu::invbag::SLOT_BEGIN) // Bag Slots + TempSlot = ((TempSlot + 3) * EQEmu::invbag::SLOT_COUNT) + rof2Slot.SubIndex + 1; ServerSlot = TempSlot; } @@ -6231,12 +6231,12 @@ namespace RoF2 static inline uint32 RoF2ToServerCorpseSlot(uint32 rof2CorpseSlot) { - return (rof2CorpseSlot + EQEmu::legacy::CORPSE_BEGIN - 1); + return (rof2CorpseSlot + EQEmu::invslot::CORPSE_BEGIN - 1); } static inline void ServerToRoF2SayLink(std::string& rof2SayLink, const std::string& serverSayLink) { - if ((constants::SayLinkBodySize == EQEmu::constants::SayLinkBodySize) || (serverSayLink.find('\x12') == std::string::npos)) { + if ((constants::SAY_LINK_BODY_SIZE == EQEmu::constants::SAY_LINK_BODY_SIZE) || (serverSayLink.find('\x12') == std::string::npos)) { rof2SayLink = serverSayLink; return; } @@ -6245,7 +6245,7 @@ namespace RoF2 for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { - if (segments[segment_iter].length() <= EQEmu::constants::SayLinkBodySize) { + if (segments[segment_iter].length() <= EQEmu::constants::SAY_LINK_BODY_SIZE) { rof2SayLink.append(segments[segment_iter]); // TODO: log size mismatch error continue; @@ -6268,7 +6268,7 @@ namespace RoF2 static inline void RoF2ToServerSayLink(std::string& serverSayLink, const std::string& rof2SayLink) { - if ((EQEmu::constants::SayLinkBodySize == constants::SayLinkBodySize) || (rof2SayLink.find('\x12') == std::string::npos)) { + if ((EQEmu::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (rof2SayLink.find('\x12') == std::string::npos)) { serverSayLink = rof2SayLink; return; } @@ -6277,7 +6277,7 @@ namespace RoF2 for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { - if (segments[segment_iter].length() <= constants::SayLinkBodySize) { + if (segments[segment_iter].length() <= constants::SAY_LINK_BODY_SIZE) { serverSayLink.append(segments[segment_iter]); // TODO: log size mismatch error continue; diff --git a/common/patches/rof2_limits.cpp b/common/patches/rof2_limits.cpp index 85e15e21d..c67ccf3ad 100644 --- a/common/patches/rof2_limits.cpp +++ b/common/patches/rof2_limits.cpp @@ -22,231 +22,231 @@ #include "../string_util.h" -size_t RoF2::invtype::GetInvTypeSize(int inv_type) +int16 RoF2::invtype::GetInvTypeSize(int16 inv_type) { switch (inv_type) { - case invtype::InvTypePossessions: - return invtype::InvTypePossessionsSize; - case invtype::InvTypeBank: - return invtype::InvTypeBankSize; - case invtype::InvTypeSharedBank: - return invtype::InvTypeSharedBankSize; - case invtype::InvTypeTrade: - return invtype::InvTypeTradeSize; - case invtype::InvTypeWorld: - return invtype::InvTypeWorldSize; - case invtype::InvTypeLimbo: - return invtype::InvTypeLimboSize; - case invtype::InvTypeTribute: - return invtype::InvTypeTributeSize; - case invtype::InvTypeTrophyTribute: - return invtype::InvTypeTrophyTributeSize; - case invtype::InvTypeGuildTribute: - return invtype::InvTypeGuildTributeSize; - case invtype::InvTypeMerchant: - return invtype::InvTypeMerchantSize; - case invtype::InvTypeDeleted: - return invtype::InvTypeDeletedSize; - case invtype::InvTypeCorpse: - return invtype::InvTypeCorpseSize; - case invtype::InvTypeBazaar: - return invtype::InvTypeBazaarSize; - case invtype::InvTypeInspect: - return invtype::InvTypeInspectSize; - case invtype::InvTypeRealEstate: - return invtype::InvTypeRealEstateSize; - case invtype::InvTypeViewMODPC: - return invtype::InvTypeViewMODPCSize; - case invtype::InvTypeViewMODBank: - return invtype::InvTypeViewMODBankSize; - case invtype::InvTypeViewMODSharedBank: - return invtype::InvTypeViewMODSharedBankSize; - case invtype::InvTypeViewMODLimbo: - return invtype::InvTypeViewMODLimboSize; - case invtype::InvTypeAltStorage: - return invtype::InvTypeAltStorageSize; - case invtype::InvTypeArchived: - return invtype::InvTypeArchivedSize; - case invtype::InvTypeMail: - return invtype::InvTypeMailSize; - case invtype::InvTypeGuildTrophyTribute: - return invtype::InvTypeGuildTrophyTributeSize; - case invtype::InvTypeKrono: - return invtype::InvTypeKronoSize; - case invtype::InvTypeOther: - return invtype::InvTypeOtherSize; + case invtype::typePossessions: + return invtype::POSSESSIONS_SIZE; + case invtype::typeBank: + return invtype::BANK_SIZE; + case invtype::typeSharedBank: + return invtype::SHARED_BANK_SIZE; + case invtype::typeTrade: + return invtype::TRADE_SIZE; + case invtype::typeWorld: + return invtype::WORLD_SIZE; + case invtype::typeLimbo: + return invtype::LIMBO_SIZE; + case invtype::typeTribute: + return invtype::TRIBUTE_SIZE; + case invtype::typeTrophyTribute: + return invtype::TROPHY_TRIBUTE_SIZE; + case invtype::typeGuildTribute: + return invtype::GUILD_TRIBUTE_SIZE; + case invtype::typeMerchant: + return invtype::MERCHANT_SIZE; + case invtype::typeDeleted: + return invtype::DELETED_SIZE; + case invtype::typeCorpse: + return invtype::CORPSE_SIZE; + case invtype::typeBazaar: + return invtype::BAZAAR_SIZE; + case invtype::typeInspect: + return invtype::INSPECT_SIZE; + case invtype::typeRealEstate: + return invtype::REAL_ESTATE_SIZE; + case invtype::typeViewMODPC: + return invtype::VIEW_MOD_PC_SIZE; + case invtype::typeViewMODBank: + return invtype::VIEW_MOD_BANK_SIZE; + case invtype::typeViewMODSharedBank: + return invtype::VIEW_MOD_SHARED_BANK_SIZE; + case invtype::typeViewMODLimbo: + return invtype::VIEW_MOD_LIMBO_SIZE; + case invtype::typeAltStorage: + return invtype::ALT_STORAGE_SIZE; + case invtype::typeArchived: + return invtype::ARCHIVED_SIZE; + case invtype::typeMail: + return invtype::MAIL_SIZE; + case invtype::typeGuildTrophyTribute: + return invtype::GUILD_TROPHY_TRIBUTE_SIZE; + case invtype::typeKrono: + return invtype::KRONO_SIZE; + case invtype::typeOther: + return invtype::OTHER_SIZE; default: - return 0; + return INULL; } } -const char* RoF2::invtype::GetInvTypeName(int inv_type) +const char* RoF2::invtype::GetInvTypeName(int16 inv_type) { switch (inv_type) { - case invtype::InvTypeInvalid: + case invtype::TYPE_INVALID: return "Invalid Type"; - case invtype::InvTypePossessions: + case invtype::typePossessions: return "Possessions"; - case invtype::InvTypeBank: + case invtype::typeBank: return "Bank"; - case invtype::InvTypeSharedBank: + case invtype::typeSharedBank: return "Shared Bank"; - case invtype::InvTypeTrade: + case invtype::typeTrade: return "Trade"; - case invtype::InvTypeWorld: + case invtype::typeWorld: return "World"; - case invtype::InvTypeLimbo: + case invtype::typeLimbo: return "Limbo"; - case invtype::InvTypeTribute: + case invtype::typeTribute: return "Tribute"; - case invtype::InvTypeTrophyTribute: + case invtype::typeTrophyTribute: return "Trophy Tribute"; - case invtype::InvTypeGuildTribute: + case invtype::typeGuildTribute: return "Guild Tribute"; - case invtype::InvTypeMerchant: + case invtype::typeMerchant: return "Merchant"; - case invtype::InvTypeDeleted: + case invtype::typeDeleted: return "Deleted"; - case invtype::InvTypeCorpse: + case invtype::typeCorpse: return "Corpse"; - case invtype::InvTypeBazaar: + case invtype::typeBazaar: return "Bazaar"; - case invtype::InvTypeInspect: + case invtype::typeInspect: return "Inspect"; - case invtype::InvTypeRealEstate: + case invtype::typeRealEstate: return "Real Estate"; - case invtype::InvTypeViewMODPC: + case invtype::typeViewMODPC: return "View MOD PC"; - case invtype::InvTypeViewMODBank: + case invtype::typeViewMODBank: return "View MOD Bank"; - case invtype::InvTypeViewMODSharedBank: + case invtype::typeViewMODSharedBank: return "View MOD Shared Bank"; - case invtype::InvTypeViewMODLimbo: + case invtype::typeViewMODLimbo: return "View MOD Limbo"; - case invtype::InvTypeAltStorage: + case invtype::typeAltStorage: return "Alt Storage"; - case invtype::InvTypeArchived: + case invtype::typeArchived: return "Archived"; - case invtype::InvTypeMail: + case invtype::typeMail: return "Mail"; - case invtype::InvTypeGuildTrophyTribute: + case invtype::typeGuildTrophyTribute: return "Guild Trophy Tribute"; - case invtype::InvTypeKrono: + case invtype::typeKrono: return "Krono"; - case invtype::InvTypeOther: + case invtype::typeOther: return "Other"; default: return "Unknown Type"; } } -bool RoF2::invtype::IsInvTypePersistent(int inv_type) +bool RoF2::invtype::IsInvTypePersistent(int16 inv_type) { switch (inv_type) { - case invtype::InvTypePossessions: - case invtype::InvTypeBank: - case invtype::InvTypeSharedBank: - case invtype::InvTypeTrade: - case invtype::InvTypeWorld: - case invtype::InvTypeLimbo: - case invtype::InvTypeTribute: - case invtype::InvTypeTrophyTribute: - case invtype::InvTypeGuildTribute: + case invtype::typePossessions: + case invtype::typeBank: + case invtype::typeSharedBank: + case invtype::typeTrade: + case invtype::typeWorld: + case invtype::typeLimbo: + case invtype::typeTribute: + case invtype::typeTrophyTribute: + case invtype::typeGuildTribute: return true; default: return false; } } -const char* RoF2::invslot::GetInvPossessionsSlotName(int inv_slot) +const char* RoF2::invslot::GetInvPossessionsSlotName(int16 inv_slot) { switch (inv_slot) { - case invslot::InvSlotInvalid: + case invslot::SLOT_INVALID: return "Invalid Slot"; - case invslot::PossessionsCharm: + case invslot::slotCharm: return "Charm"; - case invslot::PossessionsEar1: + case invslot::slotEar1: return "Ear 1"; - case invslot::PossessionsHead: + case invslot::slotHead: return "Head"; - case invslot::PossessionsFace: + case invslot::slotFace: return "Face"; - case invslot::PossessionsEar2: + case invslot::slotEar2: return "Ear 2"; - case invslot::PossessionsNeck: + case invslot::slotNeck: return "Neck"; - case invslot::PossessionsShoulders: + case invslot::slotShoulders: return "Shoulders"; - case invslot::PossessionsArms: + case invslot::slotArms: return "Arms"; - case invslot::PossessionsBack: + case invslot::slotBack: return "Back"; - case invslot::PossessionsWrist1: + case invslot::slotWrist1: return "Wrist 1"; - case invslot::PossessionsWrist2: + case invslot::slotWrist2: return "Wrist 2"; - case invslot::PossessionsRange: + case invslot::slotRange: return "Range"; - case invslot::PossessionsHands: + case invslot::slotHands: return "Hands"; - case invslot::PossessionsPrimary: + case invslot::slotPrimary: return "Primary"; - case invslot::PossessionsSecondary: + case invslot::slotSecondary: return "Secondary"; - case invslot::PossessionsFinger1: + case invslot::slotFinger1: return "Finger 1"; - case invslot::PossessionsFinger2: + case invslot::slotFinger2: return "Finger 2"; - case invslot::PossessionsChest: + case invslot::slotChest: return "Chest"; - case invslot::PossessionsLegs: + case invslot::slotLegs: return "Legs"; - case invslot::PossessionsFeet: + case invslot::slotFeet: return "Feet"; - case invslot::PossessionsWaist: + case invslot::slotWaist: return "Waist"; - case invslot::PossessionsPowerSource: + case invslot::slotPowerSource: return "Power Source"; - case invslot::PossessionsAmmo: + case invslot::slotAmmo: return "Ammo"; - case invslot::PossessionsGeneral1: + case invslot::slotGeneral1: return "General 1"; - case invslot::PossessionsGeneral2: + case invslot::slotGeneral2: return "General 2"; - case invslot::PossessionsGeneral3: + case invslot::slotGeneral3: return "General 3"; - case invslot::PossessionsGeneral4: + case invslot::slotGeneral4: return "General 4"; - case invslot::PossessionsGeneral5: + case invslot::slotGeneral5: return "General 5"; - case invslot::PossessionsGeneral6: + case invslot::slotGeneral6: return "General 6"; - case invslot::PossessionsGeneral7: + case invslot::slotGeneral7: return "General 7"; - case invslot::PossessionsGeneral8: + case invslot::slotGeneral8: return "General 8"; - case invslot::PossessionsGeneral9: + case invslot::slotGeneral9: return "General 9"; - case invslot::PossessionsGeneral10: + case invslot::slotGeneral10: return "General 10"; - case invslot::PossessionsCursor: + case invslot::slotCursor: return "Cursor"; default: return "Unknown Slot"; } } -const char* RoF2::invslot::GetInvSlotName(int inv_type, int inv_slot) +const char* RoF2::invslot::GetInvSlotName(int16 inv_type, int16 inv_slot) { - if (inv_type == invtype::InvTypePossessions) + if (inv_type == invtype::typePossessions) return invslot::GetInvPossessionsSlotName(inv_slot); - size_t type_size = invtype::GetInvTypeSize(inv_type); + int16 type_size = invtype::GetInvTypeSize(inv_type); - if (!type_size || inv_slot == invslot::InvSlotInvalid) + if (!type_size || inv_slot == invslot::SLOT_INVALID) return "Invalid Slot"; - if ((size_t)(inv_slot + 1) >= type_size) + if ((inv_slot + 1) >= type_size) return "Unknown Slot"; static std::string ret_str; @@ -255,12 +255,12 @@ const char* RoF2::invslot::GetInvSlotName(int inv_type, int inv_slot) return ret_str.c_str(); } -const char* RoF2::invbag::GetInvBagIndexName(int bag_index) +const char* RoF2::invbag::GetInvBagIndexName(int16 bag_index) { - if (bag_index == invbag::InvBagInvalid) + if (bag_index == invbag::SLOT_INVALID) return "Invalid Bag"; - if ((size_t)bag_index >= invbag::ItemBagSize) + if (bag_index >= invbag::SLOT_COUNT) return "Unknown Bag"; static std::string ret_str; @@ -269,12 +269,12 @@ const char* RoF2::invbag::GetInvBagIndexName(int bag_index) return ret_str.c_str(); } -const char* RoF2::invaug::GetInvAugIndexName(int aug_index) +const char* RoF2::invaug::GetInvAugIndexName(int16 aug_index) { - if (aug_index == invaug::InvAugInvalid) + if (aug_index == invaug::SOCKET_INVALID) return "Invalid Augment"; - if ((size_t)aug_index >= invaug::ItemAugSize) + if (aug_index >= invaug::SOCKET_COUNT) return "Unknown Augment"; static std::string ret_str; diff --git a/common/patches/rof2_limits.h b/common/patches/rof2_limits.h index 0dd7067a9..96c231cf4 100644 --- a/common/patches/rof2_limits.h +++ b/common/patches/rof2_limits.h @@ -27,116 +27,191 @@ namespace RoF2 { - enum : int { Invalid = -1, Null, Safety }; + const int16 IINVALID = -1; + const int16 INULL = 0; - enum : bool { False = false, True = true }; - - // pre-declarations namespace inventory { inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::RoF2; } + const bool ConcatenateInvTypeLimbo = false; + + const bool AllowOverLevelEquipment = true; + + const bool AllowEmptyBagInBag = true; + const bool AllowClickCastFromBag = true; + } /*inventory*/ namespace invtype { inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::RoF2; } - enum : int { InvTypeInvalid = -1, InvTypeBegin }; + namespace enum_ { + enum InventoryTypes : int16 { + typePossessions = INULL, + typeBank, + typeSharedBank, + typeTrade, + typeWorld, + typeLimbo, + typeTribute, + typeTrophyTribute, + typeGuildTribute, + typeMerchant, + typeDeleted, + typeCorpse, + typeBazaar, + typeInspect, + typeRealEstate, + typeViewMODPC, + typeViewMODBank, + typeViewMODSharedBank, + typeViewMODLimbo, + typeAltStorage, + typeArchived, + typeMail, + typeGuildTrophyTribute, + typeKrono, + typeOther + }; - enum InventoryType : int { - InvTypePossessions = InvTypeBegin, - InvTypeBank, - InvTypeSharedBank, - InvTypeTrade, - InvTypeWorld, - InvTypeLimbo, - InvTypeTribute, - InvTypeTrophyTribute, - InvTypeGuildTribute, - InvTypeMerchant, - InvTypeDeleted, - InvTypeCorpse, - InvTypeBazaar, - InvTypeInspect, - InvTypeRealEstate, - InvTypeViewMODPC, - InvTypeViewMODBank, - InvTypeViewMODSharedBank, - InvTypeViewMODLimbo, - InvTypeAltStorage, - InvTypeArchived, - InvTypeMail, - InvTypeGuildTrophyTribute, - InvTypeKrono, - InvTypeOther, - InvTypeCount - }; + } // namespace enum_ + using namespace enum_; + + const int16 POSSESSIONS_SIZE = 34; + const int16 BANK_SIZE = 24; + const int16 SHARED_BANK_SIZE = 2; + const int16 TRADE_SIZE = 8; + const int16 WORLD_SIZE = 10; + const int16 LIMBO_SIZE = 36; + const int16 TRIBUTE_SIZE = 5; + const int16 TROPHY_TRIBUTE_SIZE = 0;//unknown + const int16 GUILD_TRIBUTE_SIZE = 2;//unverified + const int16 MERCHANT_SIZE = 200; + const int16 DELETED_SIZE = 0;//unknown - "Recovery Tab" + const int16 CORPSE_SIZE = POSSESSIONS_SIZE; + const int16 BAZAAR_SIZE = 200; + const int16 INSPECT_SIZE = 23; + const int16 REAL_ESTATE_SIZE = 0;//unknown + const int16 VIEW_MOD_PC_SIZE = POSSESSIONS_SIZE; + const int16 VIEW_MOD_BANK_SIZE = BANK_SIZE; + const int16 VIEW_MOD_SHARED_BANK_SIZE = SHARED_BANK_SIZE; + const int16 VIEW_MOD_LIMBO_SIZE = LIMBO_SIZE; + const int16 ALT_STORAGE_SIZE = 0;//unknown - "Shroud Bank" + const int16 ARCHIVED_SIZE = 0;//unknown + const int16 MAIL_SIZE = 0;//unknown + const int16 GUILD_TROPHY_TRIBUTE_SIZE = 0;//unknown + const int16 KRONO_SIZE = 0;//unknown + const int16 OTHER_SIZE = 0;//unknown + + const int16 TRADE_NPC_SIZE = 4; // defined by implication + + const int16 TYPE_INVALID = IINVALID; + const int16 TYPE_BEGIN = typePossessions; + const int16 TYPE_END = typeOther; + const int16 TYPE_COUNT = (TYPE_END - TYPE_BEGIN) + 1; + + int16 GetInvTypeSize(int16 inv_type); + const char* GetInvTypeName(int16 inv_type); + + bool IsInvTypePersistent(int16 inv_type); } /*invtype*/ namespace invslot { inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::RoF2; } - enum : int { InvSlotInvalid = -1, InvSlotBegin }; + namespace enum_ { + enum InventorySlots : int16 { + slotCharm = INULL, + slotEar1, + slotHead, + slotFace, + slotEar2, + slotNeck, + slotShoulders, + slotArms, + slotBack, + slotWrist1, + slotWrist2, + slotRange, + slotHands, + slotPrimary, + slotSecondary, + slotFinger1, + slotFinger2, + slotChest, + slotLegs, + slotFeet, + slotWaist, + slotPowerSource, + slotAmmo, + slotGeneral1, + slotGeneral2, + slotGeneral3, + slotGeneral4, + slotGeneral5, + slotGeneral6, + slotGeneral7, + slotGeneral8, + slotGeneral9, + slotGeneral10, + slotCursor + }; - enum PossessionsSlot : int { - PossessionsCharm = InvSlotBegin, - PossessionsEar1, - PossessionsHead, - PossessionsFace, - PossessionsEar2, - PossessionsNeck, - PossessionsShoulders, - PossessionsArms, - PossessionsBack, - PossessionsWrist1, - PossessionsWrist2, - PossessionsRange, - PossessionsHands, - PossessionsPrimary, - PossessionsSecondary, - PossessionsFinger1, - PossessionsFinger2, - PossessionsChest, - PossessionsLegs, - PossessionsFeet, - PossessionsWaist, - PossessionsPowerSource, - PossessionsAmmo, - PossessionsGeneral1, - PossessionsGeneral2, - PossessionsGeneral3, - PossessionsGeneral4, - PossessionsGeneral5, - PossessionsGeneral6, - PossessionsGeneral7, - PossessionsGeneral8, - PossessionsGeneral9, - PossessionsGeneral10, - PossessionsCursor, - PossessionsCount - }; + } // namespace enum_ + using namespace enum_; - const int EquipmentBegin = PossessionsCharm; - const int EquipmentEnd = PossessionsAmmo; - const int EquipmentCount = (EquipmentEnd - EquipmentBegin + 1); + const int16 SLOT_INVALID = IINVALID; + const int16 SLOT_BEGIN = INULL; - const int GeneralBegin = PossessionsGeneral1; - const int GeneralEnd = PossessionsGeneral10; - const int GeneralCount = (GeneralEnd - GeneralBegin + 1); + const int16 POSSESSIONS_BEGIN = slotCharm; + const int16 POSSESSIONS_END = slotCursor; + const int16 POSSESSIONS_COUNT = (POSSESSIONS_END - POSSESSIONS_BEGIN) + 1; + + const int16 EQUIPMENT_BEGIN = slotCharm; + const int16 EQUIPMENT_END = slotAmmo; + const int16 EQUIPMENT_COUNT = (EQUIPMENT_END - EQUIPMENT_BEGIN) + 1; + + const int16 GENERAL_BEGIN = slotGeneral1; + const int16 GENERAL_END = slotGeneral10; + const int16 GENERAL_COUNT = (GENERAL_END - GENERAL_BEGIN) + 1; + + const int16 BONUS_BEGIN = invslot::slotCharm; + const int16 BONUS_STAT_END = invslot::slotPowerSource; + const int16 BONUS_SKILL_END = invslot::slotAmmo; + + const int16 CORPSE_BEGIN = invslot::slotGeneral1; + const int16 CORPSE_END = invslot::slotGeneral1 + invslot::slotCursor; + + const uint64 POSSESSIONS_BITMASK = 0x00000003FFFFFFFF; // based on 34-slot count (RoF+) + const uint64 CORPSE_BITMASK = 0x01FFFFFFFF800000; // based on 34-slot count (RoF+) + + const char* GetInvPossessionsSlotName(int16 inv_slot); + const char* GetInvSlotName(int16 inv_type, int16 inv_slot); } /*invslot*/ namespace invbag { inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::RoF2; } - enum : int { InvBagInvalid = -1, InvBagBegin }; + const int16 SLOT_INVALID = IINVALID; + const int16 SLOT_BEGIN = INULL; + const int16 SLOT_END = 9; //254; + const int16 SLOT_COUNT = 10; //255; // server Size will be 255..unsure what actual client is (test) + + const char* GetInvBagIndexName(int16 bag_index); } /*invbag*/ namespace invaug { inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::RoF2; } - enum : int { InvAugInvalid = -1, InvAugBegin }; + const int16 SOCKET_INVALID = IINVALID; + const int16 SOCKET_BEGIN = INULL; + const int16 SOCKET_END = 5; + const int16 SOCKET_COUNT = 6; + + const char* GetInvAugIndexName(int16 aug_index); } /*invaug*/ @@ -172,110 +247,21 @@ namespace RoF2 namespace profile { inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::RoF2; } + const int16 BANDOLIERS_SIZE = 20; // number of bandolier instances + const int16 BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance + + const int16 POTION_BELT_SIZE = 5; + + const int16 SKILL_ARRAY_SIZE = 100; + } /*profile*/ namespace constants { inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::RoF2; } - } /*constants*/ + const size_t CHARACTER_CREATION_LIMIT = 12; - namespace behavior { - inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::RoF2; } - - } /*behavior*/ - - namespace skills { - inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::RoF2; } - - } /*skills*/ - - - // declarations - namespace inventory { - const bool ConcatenateInvTypeLimbo = false; - - const bool AllowOverLevelEquipment = true; - - const bool AllowEmptyBagInBag = true; - const bool AllowClickCastFromBag = true; - - } /*inventory*/ - - namespace invtype { - const size_t InvTypePossessionsSize = invslot::PossessionsCount; - const size_t InvTypeBankSize = 24; - const size_t InvTypeSharedBankSize = 2; - const size_t InvTypeTradeSize = 8; - const size_t InvTypeWorldSize = 10; - const size_t InvTypeLimboSize = 36; - const size_t InvTypeTributeSize = 5; - const size_t InvTypeTrophyTributeSize = 0;//unknown - const size_t InvTypeGuildTributeSize = 2;//unverified - const size_t InvTypeMerchantSize = 200; - const size_t InvTypeDeletedSize = 0;//unknown - "Recovery Tab" - const size_t InvTypeCorpseSize = InvTypePossessionsSize; - const size_t InvTypeBazaarSize = 200; - const size_t InvTypeInspectSize = invslot::EquipmentCount; - const size_t InvTypeRealEstateSize = 0;//unknown - const size_t InvTypeViewMODPCSize = InvTypePossessionsSize; - const size_t InvTypeViewMODBankSize = InvTypeBankSize; - const size_t InvTypeViewMODSharedBankSize = InvTypeSharedBankSize; - const size_t InvTypeViewMODLimboSize = InvTypeLimboSize; - const size_t InvTypeAltStorageSize = 0;//unknown - "Shroud Bank" - const size_t InvTypeArchivedSize = 0;//unknown - const size_t InvTypeMailSize = 0;//unknown - const size_t InvTypeGuildTrophyTributeSize = 0;//unknown - const size_t InvTypeKronoSize = 0;//unknown - const size_t InvTypeOtherSize = 0;//unknown - - extern size_t GetInvTypeSize(int inv_type); - extern const char* GetInvTypeName(int inv_type); - - extern bool IsInvTypePersistent(int inv_type); - - } /*invtype*/ - - namespace invslot { - extern const char* GetInvPossessionsSlotName(int inv_slot); - extern const char* GetInvSlotName(int inv_type, int inv_slot); - - } /*invslot*/ - - namespace invbag { - const size_t ItemBagSize = 255; // server Size will be 255..unsure what actual client is (test) - - extern const char* GetInvBagIndexName(int bag_index); - - } /*invbag*/ - - namespace invaug { - const size_t ItemAugSize = 6; - - extern const char* GetInvAugIndexName(int aug_index); - - } /*invaug*/ - - namespace item { - - } /*item*/ - - namespace profile { - const size_t TributeSize = invtype::InvTypeTributeSize; - const size_t GuildTributeSize = invtype::InvTypeGuildTributeSize; - - const size_t BandoliersSize = 20; // number of bandolier instances - const size_t BandolierItemCount = 4; // number of equipment slots in bandolier instance - - const size_t PotionBeltSize = 5; - - const size_t SkillArraySize = 100; - - } /*profile*/ - - namespace constants { - const size_t CharacterCreationLimit = 12; - - const size_t SayLinkBodySize = 56; + const size_t SAY_LINK_BODY_SIZE = 56; const int LongBuffs = 42; const int ShortBuffs = 20; @@ -288,11 +274,15 @@ namespace RoF2 } /*constants*/ namespace behavior { + inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::RoF2; } + const bool CoinHasWeight = false; } /*behavior*/ namespace skills { + inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::RoF2; } + const size_t LastUsableSkill = EQEmu::skills::Skill2HPiercing; } /*skills*/ diff --git a/common/patches/rof2_structs.h b/common/patches/rof2_structs.h index 13ce49f6e..f53675f83 100644 --- a/common/patches/rof2_structs.h +++ b/common/patches/rof2_structs.h @@ -957,13 +957,13 @@ struct BandolierItem_Struct_Old struct Bandolier_Struct { char Name[1]; // Variable Length - BandolierItem_Struct Items[profile::BandolierItemCount]; + BandolierItem_Struct Items[profile::BANDOLIER_ITEM_COUNT]; }; struct Bandolier_Struct_Old { char Name[32]; - BandolierItem_Struct Items[profile::BandolierItemCount]; + BandolierItem_Struct Items[profile::BANDOLIER_ITEM_COUNT]; }; struct PotionBeltItem_Struct @@ -983,12 +983,12 @@ struct PotionBeltItem_Struct_Old struct PotionBelt_Struct { - PotionBeltItem_Struct Items[profile::PotionBeltSize]; + PotionBeltItem_Struct Items[profile::POTION_BELT_SIZE]; }; struct PotionBelt_Struct_Old { - PotionBeltItem_Struct_Old Items[profile::PotionBeltSize]; + PotionBeltItem_Struct_Old Items[profile::POTION_BELT_SIZE]; }; struct GroupLeadershipAA_Struct { @@ -1198,7 +1198,7 @@ union /*12949*/ uint32 aapoints; // Unspent AA points - Seen 1 /*12953*/ uint16 unknown_rof20; // /*12955*/ uint32 bandolier_count; // Seen 20 -/*12959*/ Bandolier_Struct bandoliers[profile::BandoliersSize]; // [20] 740 bytes (Variable Name Sizes) - bandolier contents +/*12959*/ Bandolier_Struct bandoliers[profile::BANDOLIERS_SIZE]; // [20] 740 bytes (Variable Name Sizes) - bandolier contents /*13699*/ uint32 potionbelt_count; // Seen 5 /*13703*/ PotionBelt_Struct potionbelt; // [5] 45 bytes potion belt - (Variable Name Sizes) /*13748*/ int32 unknown_rof21; // Seen -1 diff --git a/common/patches/rof_limits.cpp b/common/patches/rof_limits.cpp index c78ffc59d..6c30b85f7 100644 --- a/common/patches/rof_limits.cpp +++ b/common/patches/rof_limits.cpp @@ -22,227 +22,227 @@ #include "../string_util.h" -size_t RoF::invtype::GetInvTypeSize(int inv_type) +int16 RoF::invtype::GetInvTypeSize(int16 inv_type) { switch (inv_type) { - case invtype::InvTypePossessions: - return invtype::InvTypePossessionsSize; - case invtype::InvTypeBank: - return invtype::InvTypeBankSize; - case invtype::InvTypeSharedBank: - return invtype::InvTypeSharedBankSize; - case invtype::InvTypeTrade: - return invtype::InvTypeTradeSize; - case invtype::InvTypeWorld: - return invtype::InvTypeWorldSize; - case invtype::InvTypeLimbo: - return invtype::InvTypeLimboSize; - case invtype::InvTypeTribute: - return invtype::InvTypeTributeSize; - case invtype::InvTypeTrophyTribute: - return invtype::InvTypeTrophyTributeSize; - case invtype::InvTypeGuildTribute: - return invtype::InvTypeGuildTributeSize; - case invtype::InvTypeMerchant: - return invtype::InvTypeMerchantSize; - case invtype::InvTypeDeleted: - return invtype::InvTypeDeletedSize; - case invtype::InvTypeCorpse: - return invtype::InvTypeCorpseSize; - case invtype::InvTypeBazaar: - return invtype::InvTypeBazaarSize; - case invtype::InvTypeInspect: - return invtype::InvTypeInspectSize; - case invtype::InvTypeRealEstate: - return invtype::InvTypeRealEstateSize; - case invtype::InvTypeViewMODPC: - return invtype::InvTypeViewMODPCSize; - case invtype::InvTypeViewMODBank: - return invtype::InvTypeViewMODBankSize; - case invtype::InvTypeViewMODSharedBank: - return invtype::InvTypeViewMODSharedBankSize; - case invtype::InvTypeViewMODLimbo: - return invtype::InvTypeViewMODLimboSize; - case invtype::InvTypeAltStorage: - return invtype::InvTypeAltStorageSize; - case invtype::InvTypeArchived: - return invtype::InvTypeArchivedSize; - case invtype::InvTypeMail: - return invtype::InvTypeMailSize; - case invtype::InvTypeGuildTrophyTribute: - return invtype::InvTypeGuildTrophyTributeSize; - case invtype::InvTypeOther: - return invtype::InvTypeOtherSize; + case invtype::typePossessions: + return invtype::POSSESSIONS_SIZE; + case invtype::typeBank: + return invtype::BANK_SIZE; + case invtype::typeSharedBank: + return invtype::SHARED_BANK_SIZE; + case invtype::typeTrade: + return invtype::TRADE_SIZE; + case invtype::typeWorld: + return invtype::WORLD_SIZE; + case invtype::typeLimbo: + return invtype::LIMBO_SIZE; + case invtype::typeTribute: + return invtype::TRIBUTE_SIZE; + case invtype::typeTrophyTribute: + return invtype::TROPHY_TRIBUTE_SIZE; + case invtype::typeGuildTribute: + return invtype::GUILD_TRIBUTE_SIZE; + case invtype::typeMerchant: + return invtype::MERCHANT_SIZE; + case invtype::typeDeleted: + return invtype::DELETED_SIZE; + case invtype::typeCorpse: + return invtype::CORPSE_SIZE; + case invtype::typeBazaar: + return invtype::BAZAAR_SIZE; + case invtype::typeInspect: + return invtype::INSPECT_SIZE; + case invtype::typeRealEstate: + return invtype::REAL_ESTATE_SIZE; + case invtype::typeViewMODPC: + return invtype::VIEW_MOD_PC_SIZE; + case invtype::typeViewMODBank: + return invtype::VIEW_MOD_BANK_SIZE; + case invtype::typeViewMODSharedBank: + return invtype::VIEW_MOD_SHARED_BANK_SIZE; + case invtype::typeViewMODLimbo: + return invtype::VIEW_MOD_LIMBO_SIZE; + case invtype::typeAltStorage: + return invtype::ALT_STORAGE_SIZE; + case invtype::typeArchived: + return invtype::ARCHIVED_SIZE; + case invtype::typeMail: + return invtype::MAIL_SIZE; + case invtype::typeGuildTrophyTribute: + return invtype::GUILD_TROPHY_TRIBUTE_SIZE; + case invtype::typeOther: + return invtype::OTHER_SIZE; default: - return 0; + return INULL; } } -const char* RoF::invtype::GetInvTypeName(int inv_type) +const char* RoF::invtype::GetInvTypeName(int16 inv_type) { switch (inv_type) { - case invtype::InvTypeInvalid: + case invtype::TYPE_INVALID: return "Invalid Type"; - case invtype::InvTypePossessions: + case invtype::typePossessions: return "Possessions"; - case invtype::InvTypeBank: + case invtype::typeBank: return "Bank"; - case invtype::InvTypeSharedBank: + case invtype::typeSharedBank: return "Shared Bank"; - case invtype::InvTypeTrade: + case invtype::typeTrade: return "Trade"; - case invtype::InvTypeWorld: + case invtype::typeWorld: return "World"; - case invtype::InvTypeLimbo: + case invtype::typeLimbo: return "Limbo"; - case invtype::InvTypeTribute: + case invtype::typeTribute: return "Tribute"; - case invtype::InvTypeTrophyTribute: + case invtype::typeTrophyTribute: return "Trophy Tribute"; - case invtype::InvTypeGuildTribute: + case invtype::typeGuildTribute: return "Guild Tribute"; - case invtype::InvTypeMerchant: + case invtype::typeMerchant: return "Merchant"; - case invtype::InvTypeDeleted: + case invtype::typeDeleted: return "Deleted"; - case invtype::InvTypeCorpse: + case invtype::typeCorpse: return "Corpse"; - case invtype::InvTypeBazaar: + case invtype::typeBazaar: return "Bazaar"; - case invtype::InvTypeInspect: + case invtype::typeInspect: return "Inspect"; - case invtype::InvTypeRealEstate: + case invtype::typeRealEstate: return "Real Estate"; - case invtype::InvTypeViewMODPC: + case invtype::typeViewMODPC: return "View MOD PC"; - case invtype::InvTypeViewMODBank: + case invtype::typeViewMODBank: return "View MOD Bank"; - case invtype::InvTypeViewMODSharedBank: + case invtype::typeViewMODSharedBank: return "View MOD Shared Bank"; - case invtype::InvTypeViewMODLimbo: + case invtype::typeViewMODLimbo: return "View MOD Limbo"; - case invtype::InvTypeAltStorage: + case invtype::typeAltStorage: return "Alt Storage"; - case invtype::InvTypeArchived: + case invtype::typeArchived: return "Archived"; - case invtype::InvTypeMail: + case invtype::typeMail: return "Mail"; - case invtype::InvTypeGuildTrophyTribute: + case invtype::typeGuildTrophyTribute: return "Guild Trophy Tribute"; - case invtype::InvTypeOther: + case invtype::typeOther: return "Other"; default: return "Unknown Type"; } } -bool RoF::invtype::IsInvTypePersistent(int inv_type) +bool RoF::invtype::IsInvTypePersistent(int16 inv_type) { switch (inv_type) { - case invtype::InvTypePossessions: - case invtype::InvTypeBank: - case invtype::InvTypeSharedBank: - case invtype::InvTypeTrade: - case invtype::InvTypeWorld: - case invtype::InvTypeLimbo: - case invtype::InvTypeTribute: - case invtype::InvTypeTrophyTribute: - case invtype::InvTypeGuildTribute: + case invtype::typePossessions: + case invtype::typeBank: + case invtype::typeSharedBank: + case invtype::typeTrade: + case invtype::typeWorld: + case invtype::typeLimbo: + case invtype::typeTribute: + case invtype::typeTrophyTribute: + case invtype::typeGuildTribute: return true; default: return false; } } -const char* RoF::invslot::GetInvPossessionsSlotName(int inv_slot) +const char* RoF::invslot::GetInvPossessionsSlotName(int16 inv_slot) { switch (inv_slot) { - case invslot::InvSlotInvalid: + case invslot::SLOT_INVALID: return "Invalid Slot"; - case invslot::PossessionsCharm: + case invslot::slotCharm: return "Charm"; - case invslot::PossessionsEar1: + case invslot::slotEar1: return "Ear 1"; - case invslot::PossessionsHead: + case invslot::slotHead: return "Head"; - case invslot::PossessionsFace: + case invslot::slotFace: return "Face"; - case invslot::PossessionsEar2: + case invslot::slotEar2: return "Ear 2"; - case invslot::PossessionsNeck: + case invslot::slotNeck: return "Neck"; - case invslot::PossessionsShoulders: + case invslot::slotShoulders: return "Shoulders"; - case invslot::PossessionsArms: + case invslot::slotArms: return "Arms"; - case invslot::PossessionsBack: + case invslot::slotBack: return "Back"; - case invslot::PossessionsWrist1: + case invslot::slotWrist1: return "Wrist 1"; - case invslot::PossessionsWrist2: + case invslot::slotWrist2: return "Wrist 2"; - case invslot::PossessionsRange: + case invslot::slotRange: return "Range"; - case invslot::PossessionsHands: + case invslot::slotHands: return "Hands"; - case invslot::PossessionsPrimary: + case invslot::slotPrimary: return "Primary"; - case invslot::PossessionsSecondary: + case invslot::slotSecondary: return "Secondary"; - case invslot::PossessionsFinger1: + case invslot::slotFinger1: return "Finger 1"; - case invslot::PossessionsFinger2: + case invslot::slotFinger2: return "Finger 2"; - case invslot::PossessionsChest: + case invslot::slotChest: return "Chest"; - case invslot::PossessionsLegs: + case invslot::slotLegs: return "Legs"; - case invslot::PossessionsFeet: + case invslot::slotFeet: return "Feet"; - case invslot::PossessionsWaist: + case invslot::slotWaist: return "Waist"; - case invslot::PossessionsPowerSource: + case invslot::slotPowerSource: return "Power Source"; - case invslot::PossessionsAmmo: + case invslot::slotAmmo: return "Ammo"; - case invslot::PossessionsGeneral1: + case invslot::slotGeneral1: return "General 1"; - case invslot::PossessionsGeneral2: + case invslot::slotGeneral2: return "General 2"; - case invslot::PossessionsGeneral3: + case invslot::slotGeneral3: return "General 3"; - case invslot::PossessionsGeneral4: + case invslot::slotGeneral4: return "General 4"; - case invslot::PossessionsGeneral5: + case invslot::slotGeneral5: return "General 5"; - case invslot::PossessionsGeneral6: + case invslot::slotGeneral6: return "General 6"; - case invslot::PossessionsGeneral7: + case invslot::slotGeneral7: return "General 7"; - case invslot::PossessionsGeneral8: + case invslot::slotGeneral8: return "General 8"; - case invslot::PossessionsGeneral9: + case invslot::slotGeneral9: return "General 9"; - case invslot::PossessionsGeneral10: + case invslot::slotGeneral10: return "General 10"; - case invslot::PossessionsCursor: + case invslot::slotCursor: return "Cursor"; default: return "Unknown Slot"; } } -const char* RoF::invslot::GetInvSlotName(int inv_type, int inv_slot) +const char* RoF::invslot::GetInvSlotName(int16 inv_type, int16 inv_slot) { - if (inv_type == invtype::InvTypePossessions) + if (inv_type == invtype::typePossessions) return invslot::GetInvPossessionsSlotName(inv_slot); - size_t type_size = invtype::GetInvTypeSize(inv_type); + int16 type_size = invtype::GetInvTypeSize(inv_type); - if (!type_size || inv_slot == invslot::InvSlotInvalid) + if (!type_size || inv_slot == invslot::SLOT_INVALID) return "Invalid Slot"; - if ((size_t)(inv_slot + 1) >= type_size) + if ((inv_slot + 1) >= type_size) return "Unknown Slot"; static std::string ret_str; @@ -251,12 +251,12 @@ const char* RoF::invslot::GetInvSlotName(int inv_type, int inv_slot) return ret_str.c_str(); } -const char* RoF::invbag::GetInvBagIndexName(int bag_index) +const char* RoF::invbag::GetInvBagIndexName(int16 bag_index) { - if (bag_index == invbag::InvBagInvalid) + if (bag_index == invbag::SLOT_INVALID) return "Invalid Bag"; - if ((size_t)bag_index >= invbag::ItemBagSize) + if (bag_index >= invbag::SLOT_COUNT) return "Unknown Bag"; static std::string ret_str; @@ -265,12 +265,12 @@ const char* RoF::invbag::GetInvBagIndexName(int bag_index) return ret_str.c_str(); } -const char* RoF::invaug::GetInvAugIndexName(int aug_index) +const char* RoF::invaug::GetInvAugIndexName(int16 aug_index) { - if (aug_index == invaug::InvAugInvalid) + if (aug_index == invaug::SOCKET_INVALID) return "Invalid Augment"; - if ((size_t)aug_index >= invaug::ItemAugSize) + if (aug_index >= invaug::SOCKET_COUNT) return "Unknown Augment"; static std::string ret_str; diff --git a/common/patches/rof_limits.h b/common/patches/rof_limits.h index 952d14b20..69db29f8f 100644 --- a/common/patches/rof_limits.h +++ b/common/patches/rof_limits.h @@ -27,115 +27,189 @@ namespace RoF { - enum : int { Invalid = -1, Null, Safety }; + const int16 IINVALID = -1; + const int16 INULL = 0; - enum : bool { False = false, True = true }; - - // pre-declarations namespace inventory { inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::RoF; } + const bool ConcatenateInvTypeLimbo = false; + + const bool AllowOverLevelEquipment = true; + + const bool AllowEmptyBagInBag = true; + const bool AllowClickCastFromBag = true; + } /*inventory*/ namespace invtype { inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::RoF; } - enum : int { InvTypeInvalid = -1, InvTypeBegin }; + namespace enum_ { + enum InventoryTypes : int16 { + typePossessions = INULL, + typeBank, + typeSharedBank, + typeTrade, + typeWorld, + typeLimbo, + typeTribute, + typeTrophyTribute, + typeGuildTribute, + typeMerchant, + typeDeleted, + typeCorpse, + typeBazaar, + typeInspect, + typeRealEstate, + typeViewMODPC, + typeViewMODBank, + typeViewMODSharedBank, + typeViewMODLimbo, + typeAltStorage, + typeArchived, + typeMail, + typeGuildTrophyTribute, + typeOther + }; - enum InventoryType : int { - InvTypePossessions = InvTypeBegin, - InvTypeBank, - InvTypeSharedBank, - InvTypeTrade, - InvTypeWorld, - InvTypeLimbo, - InvTypeTribute, - InvTypeTrophyTribute, - InvTypeGuildTribute, - InvTypeMerchant, - InvTypeDeleted, - InvTypeCorpse, - InvTypeBazaar, - InvTypeInspect, - InvTypeRealEstate, - InvTypeViewMODPC, - InvTypeViewMODBank, - InvTypeViewMODSharedBank, - InvTypeViewMODLimbo, - InvTypeAltStorage, - InvTypeArchived, - InvTypeMail, - InvTypeGuildTrophyTribute, - InvTypeOther, - InvTypeCount - }; + } // namespace enum_ + using namespace enum_; + + const int16 POSSESSIONS_SIZE = 34; + const int16 BANK_SIZE = 24; + const int16 SHARED_BANK_SIZE = 2; + const int16 TRADE_SIZE = 8; + const int16 WORLD_SIZE = 10; + const int16 LIMBO_SIZE = 36; + const int16 TRIBUTE_SIZE = 5; + const int16 TROPHY_TRIBUTE_SIZE = 0;//unknown + const int16 GUILD_TRIBUTE_SIZE = 2;//unverified + const int16 MERCHANT_SIZE = 200; + const int16 DELETED_SIZE = 0;//unknown - "Recovery Tab" + const int16 CORPSE_SIZE = POSSESSIONS_SIZE; + const int16 BAZAAR_SIZE = 200; + const int16 INSPECT_SIZE = 23; + const int16 REAL_ESTATE_SIZE = 0;//unknown + const int16 VIEW_MOD_PC_SIZE = POSSESSIONS_SIZE; + const int16 VIEW_MOD_BANK_SIZE = BANK_SIZE; + const int16 VIEW_MOD_SHARED_BANK_SIZE = SHARED_BANK_SIZE; + const int16 VIEW_MOD_LIMBO_SIZE = LIMBO_SIZE; + const int16 ALT_STORAGE_SIZE = 0;//unknown - "Shroud Bank" + const int16 ARCHIVED_SIZE = 0;//unknown + const int16 MAIL_SIZE = 0;//unknown + const int16 GUILD_TROPHY_TRIBUTE_SIZE = 0;//unknown + const int16 OTHER_SIZE = 0;//unknown + + const int16 TRADE_NPC_SIZE = 4; // defined by implication + + const int16 TYPE_INVALID = IINVALID; + const int16 TYPE_BEGIN = typePossessions; + const int16 TYPE_END = typeOther; + const int16 TYPE_COUNT = (TYPE_END - TYPE_BEGIN) + 1; + + int16 GetInvTypeSize(int16 inv_type); + const char* GetInvTypeName(int16 inv_type); + + bool IsInvTypePersistent(int16 inv_type); } /*invtype*/ namespace invslot { inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::RoF; } - enum : int { InvSlotInvalid = -1, InvSlotBegin }; + namespace enum_ { + enum InventorySlots : int16 { + slotCharm = INULL, + slotEar1, + slotHead, + slotFace, + slotEar2, + slotNeck, + slotShoulders, + slotArms, + slotBack, + slotWrist1, + slotWrist2, + slotRange, + slotHands, + slotPrimary, + slotSecondary, + slotFinger1, + slotFinger2, + slotChest, + slotLegs, + slotFeet, + slotWaist, + slotPowerSource, + slotAmmo, + slotGeneral1, + slotGeneral2, + slotGeneral3, + slotGeneral4, + slotGeneral5, + slotGeneral6, + slotGeneral7, + slotGeneral8, + slotGeneral9, + slotGeneral10, + slotCursor + }; - enum PossessionsSlot : int { - PossessionsCharm = InvSlotBegin, - PossessionsEar1, - PossessionsHead, - PossessionsFace, - PossessionsEar2, - PossessionsNeck, - PossessionsShoulders, - PossessionsArms, - PossessionsBack, - PossessionsWrist1, - PossessionsWrist2, - PossessionsRange, - PossessionsHands, - PossessionsPrimary, - PossessionsSecondary, - PossessionsFinger1, - PossessionsFinger2, - PossessionsChest, - PossessionsLegs, - PossessionsFeet, - PossessionsWaist, - PossessionsPowerSource, - PossessionsAmmo, - PossessionsGeneral1, - PossessionsGeneral2, - PossessionsGeneral3, - PossessionsGeneral4, - PossessionsGeneral5, - PossessionsGeneral6, - PossessionsGeneral7, - PossessionsGeneral8, - PossessionsGeneral9, - PossessionsGeneral10, - PossessionsCursor, - PossessionsCount - }; + } // namespace enum_ + using namespace enum_; - const int EquipmentBegin = PossessionsCharm; - const int EquipmentEnd = PossessionsAmmo; - const int EquipmentCount = (EquipmentEnd - EquipmentBegin + 1); + const int16 SLOT_INVALID = IINVALID; + const int16 SLOT_BEGIN = INULL; - const int GeneralBegin = PossessionsGeneral1; - const int GeneralEnd = PossessionsGeneral10; - const int GeneralCount = (GeneralEnd - GeneralBegin + 1); + const int16 POSSESSIONS_BEGIN = slotCharm; + const int16 POSSESSIONS_END = slotCursor; + const int16 POSSESSIONS_COUNT = (POSSESSIONS_END - POSSESSIONS_BEGIN) + 1; + + const int16 EQUIPMENT_BEGIN = slotCharm; + const int16 EQUIPMENT_END = slotAmmo; + const int16 EQUIPMENT_COUNT = (EQUIPMENT_END - EQUIPMENT_BEGIN + 1); + + const int16 GENERAL_BEGIN = slotGeneral1; + const int16 GENERAL_END = slotGeneral10; + const int16 GENERAL_COUNT = (GENERAL_END - GENERAL_BEGIN + 1); + + const int16 BONUS_BEGIN = invslot::slotCharm; + const int16 BONUS_STAT_END = invslot::slotPowerSource; + const int16 BONUS_SKILL_END = invslot::slotAmmo; + + const int16 CORPSE_BEGIN = invslot::slotGeneral1; + const int16 CORPSE_END = invslot::slotGeneral1 + invslot::slotCursor; + + const uint64 POSSESSIONS_BITMASK = 0x00000003FFFFFFFF; // based on 34-slot count (RoF+) + const uint64 CORPSE_BITMASK = 0x01FFFFFFFF800000; // based on 34-slot count (RoF+) + + const char* GetInvPossessionsSlotName(int16 inv_slot); + const char* GetInvSlotName(int16 inv_type, int16 inv_slot); } /*invslot*/ namespace invbag { inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::RoF; } - enum : int { InvBagInvalid = -1, InvBagBegin }; + const int16 SLOT_INVALID = IINVALID; + const int16 SLOT_BEGIN = INULL; + const int16 SLOT_END = 9; //254; + const int16 SLOT_COUNT = 10; //255; // server Size will be 255..unsure what actual client is (test) + + const char* GetInvBagIndexName(int16 bag_index); } /*invbag*/ namespace invaug { inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::RoF; } - enum : int { InvAugInvalid = -1, InvAugBegin }; + const int16 SOCKET_INVALID = IINVALID; + const int16 SOCKET_BEGIN = INULL; + const int16 SOCKET_END = 5; + const int16 SOCKET_COUNT = 6; + + const char* GetInvAugIndexName(int16 aug_index); } /*invaug*/ @@ -164,109 +238,21 @@ namespace RoF namespace profile { inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::RoF; } + const int16 BANDOLIERS_SIZE = 20; // number of bandolier instances + const int16 BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance + + const int16 POTION_BELT_SIZE = 5; + + const int16 SKILL_ARRAY_SIZE = 100; + } /*profile*/ namespace constants { inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::RoF; } - } /*constants*/ + const size_t CHARACTER_CREATION_LIMIT = 12; - namespace behavior { - inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::RoF; } - - } /*behavior*/ - - namespace skills { - inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::RoF; } - - } /*skills*/ - - - // declarations - namespace inventory { - const bool ConcatenateInvTypeLimbo = false; - - const bool AllowOverLevelEquipment = true; - - const bool AllowEmptyBagInBag = true; - const bool AllowClickCastFromBag = true; - - } /*inventory*/ - - namespace invtype { - const size_t InvTypePossessionsSize = invslot::PossessionsCount; - const size_t InvTypeBankSize = 24; - const size_t InvTypeSharedBankSize = 2; - const size_t InvTypeTradeSize = 8; - const size_t InvTypeWorldSize = 10; - const size_t InvTypeLimboSize = 36; - const size_t InvTypeTributeSize = 5; - const size_t InvTypeTrophyTributeSize = 0;//unknown - const size_t InvTypeGuildTributeSize = 2;//unverified - const size_t InvTypeMerchantSize = 200; - const size_t InvTypeDeletedSize = 0;//unknown - "Recovery Tab" - const size_t InvTypeCorpseSize = InvTypePossessionsSize; - const size_t InvTypeBazaarSize = 200; - const size_t InvTypeInspectSize = invslot::EquipmentCount; - const size_t InvTypeRealEstateSize = 0;//unknown - const size_t InvTypeViewMODPCSize = InvTypePossessionsSize; - const size_t InvTypeViewMODBankSize = InvTypeBankSize; - const size_t InvTypeViewMODSharedBankSize = InvTypeSharedBankSize; - const size_t InvTypeViewMODLimboSize = InvTypeLimboSize; - const size_t InvTypeAltStorageSize = 0;//unknown - "Shroud Bank" - const size_t InvTypeArchivedSize = 0;//unknown - const size_t InvTypeMailSize = 0;//unknown - const size_t InvTypeGuildTrophyTributeSize = 0;//unknown - const size_t InvTypeOtherSize = 0;//unknown - - extern size_t GetInvTypeSize(int inv_type); - extern const char* GetInvTypeName(int inv_type); - - extern bool IsInvTypePersistent(int inv_type); - - } /*invtype*/ - - namespace invslot { - extern const char* GetInvPossessionsSlotName(int inv_slot); - extern const char* GetInvSlotName(int inv_type, int inv_slot); - - } /*invslot*/ - - namespace invbag { - const size_t ItemBagSize = 255; // server Size will be 255..unsure what actual client is (test) - - extern const char* GetInvBagIndexName(int bag_index); - - } /*invbag*/ - - namespace invaug { - const size_t ItemAugSize = 6; - - extern const char* GetInvAugIndexName(int aug_index); - - } /*invaug*/ - - namespace item { - - } /*item*/ - - namespace profile { - const size_t TributeSize = invtype::InvTypeTributeSize; - const size_t GuildTributeSize = invtype::InvTypeGuildTributeSize; - - const size_t BandoliersSize = 20; // number of bandolier instances - const size_t BandolierItemCount = 4; // number of equipment slots in bandolier instance - - const size_t PotionBeltSize = 5; - - const size_t SkillArraySize = 100; - - } /*profile*/ - - namespace constants { - const size_t CharacterCreationLimit = 12; - - const size_t SayLinkBodySize = 55; + const size_t SAY_LINK_BODY_SIZE = 55; const int LongBuffs = 42; const int ShortBuffs = 20; @@ -279,11 +265,15 @@ namespace RoF } /*constants*/ namespace behavior { + inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::RoF; } + const bool CoinHasWeight = false; } /*behavior*/ namespace skills { + inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::RoF; } + const size_t LastUsableSkill = EQEmu::skills::SkillTripleAttack; } /*skills*/ diff --git a/common/patches/rof_structs.h b/common/patches/rof_structs.h index 08e3647be..dcc5e4ccc 100644 --- a/common/patches/rof_structs.h +++ b/common/patches/rof_structs.h @@ -898,13 +898,13 @@ struct BandolierItem_Struct_Old struct Bandolier_Struct { char Name[1]; // Variable Length - BandolierItem_Struct Items[profile::BandolierItemCount]; + BandolierItem_Struct Items[profile::BANDOLIER_ITEM_COUNT]; }; struct Bandolier_Struct_Old { char Name[32]; - BandolierItem_Struct Items[profile::BandolierItemCount]; + BandolierItem_Struct Items[profile::BANDOLIER_ITEM_COUNT]; }; struct PotionBeltItem_Struct @@ -924,12 +924,12 @@ struct PotionBeltItem_Struct_Old struct PotionBelt_Struct { - PotionBeltItem_Struct Items[profile::PotionBeltSize]; + PotionBeltItem_Struct Items[profile::POTION_BELT_SIZE]; }; struct PotionBelt_Struct_Old { - PotionBeltItem_Struct_Old Items[profile::PotionBeltSize]; + PotionBeltItem_Struct_Old Items[profile::POTION_BELT_SIZE]; }; struct GroupLeadershipAA_Struct { @@ -1139,7 +1139,7 @@ union /*12949*/ uint32 aapoints; // Unspent AA points - Seen 1 /*12953*/ uint16 unknown_rof20; // /*12955*/ uint32 bandolier_count; // Seen 20 -/*12959*/ Bandolier_Struct bandoliers[profile::BandoliersSize]; // [20] 740 bytes (Variable Name Sizes) - bandolier contents +/*12959*/ Bandolier_Struct bandoliers[profile::BANDOLIERS_SIZE]; // [20] 740 bytes (Variable Name Sizes) - bandolier contents /*13699*/ uint32 potionbelt_count; // Seen 5 /*13703*/ PotionBelt_Struct potionbelt; // [5] 45 bytes potion belt - (Variable Name Sizes) /*13748*/ int32 unknown_rof21; // Seen -1 diff --git a/common/patches/sod.cpp b/common/patches/sod.cpp index 560151bfa..e208d2778 100644 --- a/common/patches/sod.cpp +++ b/common/patches/sod.cpp @@ -1632,18 +1632,18 @@ namespace SoD // OUT(unknown06160[4]); // Copy bandoliers where server and client indexes converge - for (r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < profile::BandoliersSize; ++r) { + for (r = 0; r < EQEmu::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) { OUT_str(bandoliers[r].Name); - for (uint32 k = 0; k < profile::BandolierItemCount; ++k) { // Will need adjusting if 'server != client' is ever true + for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true OUT(bandoliers[r].Items[k].ID); OUT(bandoliers[r].Items[k].Icon); OUT_str(bandoliers[r].Items[k].Name); } } // Nullify bandoliers where server and client indexes diverge, with a client bias - for (r = EQEmu::legacy::BANDOLIERS_SIZE; r < profile::BandoliersSize; ++r) { + for (r = EQEmu::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) { eq->bandoliers[r].Name[0] = '\0'; - for (uint32 k = 0; k < profile::BandolierItemCount; ++k) { // Will need adjusting if 'server != client' is ever true + for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true eq->bandoliers[r].Items[k].ID = 0; eq->bandoliers[r].Items[k].Icon = 0; eq->bandoliers[r].Items[k].Name[0] = '\0'; @@ -1653,13 +1653,13 @@ namespace SoD // OUT(unknown07444[5120]); // Copy potion belt where server and client indexes converge - for (r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < profile::PotionBeltSize; ++r) { + for (r = 0; r < EQEmu::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++r) { OUT(potionbelt.Items[r].ID); OUT(potionbelt.Items[r].Icon); OUT_str(potionbelt.Items[r].Name); } // Nullify potion belt where server and client indexes diverge, with a client bias - for (r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < profile::PotionBeltSize; ++r) { + for (r = EQEmu::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) { eq->potionbelt.Items[r].ID = 0; eq->potionbelt.Items[r].Icon = 0; eq->potionbelt.Items[r].Name[0] = '\0'; @@ -1947,8 +1947,8 @@ namespace SoD eq->CharCount = emu->CharCount; eq->TotalChars = emu->TotalChars; - if (eq->TotalChars > constants::CharacterCreationLimit) - eq->TotalChars = constants::CharacterCreationLimit; + if (eq->TotalChars > constants::CHARACTER_CREATION_LIMIT) + eq->TotalChars = constants::CHARACTER_CREATION_LIMIT; FINISH_ENCODE(); return; @@ -1960,7 +1960,7 @@ namespace SoD size_t names_length = 0; size_t character_count = 0; - for (; character_count < emu->CharCount && character_count < constants::CharacterCreationLimit; ++character_count) { + for (; character_count < emu->CharCount && character_count < constants::CHARACTER_CREATION_LIMIT; ++character_count) { emu_cse = (CharacterSelectEntry_Struct *)emu_ptr; names_length += strlen(emu_cse->Name); emu_ptr += sizeof(CharacterSelectEntry_Struct); @@ -1976,8 +1976,8 @@ namespace SoD eq->CharCount = character_count; eq->TotalChars = emu->TotalChars; - if (eq->TotalChars > constants::CharacterCreationLimit) - eq->TotalChars = constants::CharacterCreationLimit; + if (eq->TotalChars > constants::CHARACTER_CREATION_LIMIT) + eq->TotalChars = constants::CHARACTER_CREATION_LIMIT; emu_ptr = __emu_buffer; emu_ptr += sizeof(CharacterSelect_Struct); @@ -3578,7 +3578,7 @@ namespace SoD ibs.nodrop = item->NoDrop; ibs.attune = item->Attuneable; ibs.size = item->Size; - ibs.slots = SwapBits21and22(item->Slots); + ibs.slots = SwapBits21And22(item->Slots); ibs.price = item->Price; ibs.icon = item->Icon; ibs.unknown1 = 1; @@ -3668,7 +3668,7 @@ namespace SoD isbs.augtype = item->AugType; isbs.augrestrict = item->AugRestrict; - for (int index = 0; index < invaug::ItemAugSize; ++index) { + for (int index = invaug::SOCKET_BEGIN; index <= invaug::SOCKET_END; ++index) { isbs.augslots[index].type = item->AugSlotType[index]; isbs.augslots[index].visible = item->AugSlotVisible[index]; isbs.augslots[index].unknown = item->AugSlotUnk2[index]; @@ -3841,18 +3841,18 @@ namespace SoD ob.write((const char*)&subitem_count, sizeof(uint32)); - for (uint32 index = EQEmu::inventory::containerBegin; index < EQEmu::inventory::ContainerCount; ++index) { + for (uint32 index = EQEmu::invbag::SLOT_BEGIN; index <= EQEmu::invbag::SLOT_END; ++index) { EQEmu::ItemInstance* sub = inst->GetItem(index); if (!sub) continue; int SubSlotNumber = INVALID_INDEX; - if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END) - SubSlotNumber = (((slot_id_in + 3) * EQEmu::inventory::ContainerCount) + index + 1); - else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END) - SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::BANK_BAGS_BEGIN + index); - else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END) - SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index); + if (slot_id_in >= EQEmu::invslot::GENERAL_BEGIN && slot_id_in <= EQEmu::invslot::GENERAL_END) + SubSlotNumber = (((slot_id_in + 3) * EQEmu::invbag::SLOT_COUNT) + index + 1); + else if (slot_id_in >= EQEmu::invslot::BANK_BEGIN && slot_id_in <= EQEmu::invslot::BANK_END) + SubSlotNumber = (((slot_id_in - EQEmu::invslot::BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::BANK_BAGS_BEGIN + index); + else if (slot_id_in >= EQEmu::invslot::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::invslot::SHARED_BANK_END) + SubSlotNumber = (((slot_id_in - EQEmu::invslot::SHARED_BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + index); else SubSlotNumber = slot_id_in; @@ -3870,16 +3870,16 @@ namespace SoD { uint32 SoDSlot = 0; - if (serverSlot >= EQEmu::inventory::slotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots + if (serverSlot >= EQEmu::invslot::slotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots SoDSlot = serverSlot + 1; - else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) + else if (serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::invbag::CURSOR_BAG_END) SoDSlot = serverSlot + 11; - else if (serverSlot >= EQEmu::legacy::BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::BANK_BAGS_END) + else if (serverSlot >= EQEmu::invbag::BANK_BAGS_BEGIN && serverSlot <= EQEmu::invbag::BANK_BAGS_END) SoDSlot = serverSlot + 1; - else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END) + else if (serverSlot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::invbag::SHARED_BANK_BAGS_END) SoDSlot = serverSlot + 1; - else if (serverSlot == EQEmu::inventory::slotPowerSource) - SoDSlot = invslot::PossessionsPowerSource; + else if (serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE) + SoDSlot = invslot::slotPowerSource; else SoDSlot = serverSlot; return SoDSlot; @@ -3895,16 +3895,16 @@ namespace SoD { uint32 ServerSlot = 0; - if (sodSlot >= invslot::PossessionsAmmo && sodSlot <= invslot::CorpseEnd) // Cursor/Ammo/Power Source and Normal Inventory Slots + if (sodSlot >= invslot::slotAmmo && sodSlot <= invslot::CORPSE_END) // Cursor/Ammo/Power Source and Normal Inventory Slots ServerSlot = sodSlot - 1; - else if (sodSlot >= invbag::GeneralBagsBegin && sodSlot <= invbag::CursorBagEnd) + else if (sodSlot >= invbag::GENERAL_BAGS_BEGIN && sodSlot <= invbag::CURSOR_BAG_END) ServerSlot = sodSlot - 11; - else if (sodSlot >= invbag::BankBagsBegin && sodSlot <= invbag::BankBagsEnd) + else if (sodSlot >= invbag::BANK_BAGS_BEGIN && sodSlot <= invbag::BANK_BAGS_END) ServerSlot = sodSlot - 1; - else if (sodSlot >= invbag::SharedBankBagsBegin && sodSlot <= invbag::SharedBankBagsEnd) + else if (sodSlot >= invbag::SHARED_BANK_BAGS_BEGIN && sodSlot <= invbag::SHARED_BANK_BAGS_END) ServerSlot = sodSlot - 1; - else if (sodSlot == invslot::PossessionsPowerSource) - ServerSlot = EQEmu::inventory::slotPowerSource; + else if (sodSlot == invslot::slotPowerSource) + ServerSlot = EQEmu::invslot::SLOT_POWER_SOURCE; else ServerSlot = sodSlot; return ServerSlot; @@ -3918,7 +3918,7 @@ namespace SoD static inline void ServerToSoDSayLink(std::string& sodSayLink, const std::string& serverSayLink) { - if ((constants::SayLinkBodySize == EQEmu::constants::SayLinkBodySize) || (serverSayLink.find('\x12') == std::string::npos)) { + if ((constants::SAY_LINK_BODY_SIZE == EQEmu::constants::SAY_LINK_BODY_SIZE) || (serverSayLink.find('\x12') == std::string::npos)) { sodSayLink = serverSayLink; return; } @@ -3927,7 +3927,7 @@ namespace SoD for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { - if (segments[segment_iter].length() <= EQEmu::constants::SayLinkBodySize) { + if (segments[segment_iter].length() <= EQEmu::constants::SAY_LINK_BODY_SIZE) { sodSayLink.append(segments[segment_iter]); // TODO: log size mismatch error continue; @@ -3958,7 +3958,7 @@ namespace SoD static inline void SoDToServerSayLink(std::string& serverSayLink, const std::string& sodSayLink) { - if ((EQEmu::constants::SayLinkBodySize == constants::SayLinkBodySize) || (sodSayLink.find('\x12') == std::string::npos)) { + if ((EQEmu::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (sodSayLink.find('\x12') == std::string::npos)) { serverSayLink = sodSayLink; return; } @@ -3967,7 +3967,7 @@ namespace SoD for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { - if (segments[segment_iter].length() <= constants::SayLinkBodySize) { + if (segments[segment_iter].length() <= constants::SAY_LINK_BODY_SIZE) { serverSayLink.append(segments[segment_iter]); // TODO: log size mismatch error continue; diff --git a/common/patches/sod_limits.cpp b/common/patches/sod_limits.cpp index 8ff257665..dc1676d5a 100644 --- a/common/patches/sod_limits.cpp +++ b/common/patches/sod_limits.cpp @@ -22,198 +22,198 @@ #include "../string_util.h" -size_t SoD::invtype::GetInvTypeSize(int inv_type) +int16 SoD::invtype::GetInvTypeSize(int16 inv_type) { switch (inv_type) { - case invtype::InvTypePossessions: - return invtype::InvTypePossessionsSize; - case invtype::InvTypeBank: - return invtype::InvTypeBankSize; - case invtype::InvTypeSharedBank: - return invtype::InvTypeSharedBankSize; - case invtype::InvTypeTrade: - return invtype::InvTypeTradeSize; - case invtype::InvTypeWorld: - return invtype::InvTypeWorldSize; - case invtype::InvTypeLimbo: - return invtype::InvTypeLimboSize; - case invtype::InvTypeTribute: - return invtype::InvTypeTributeSize; - case invtype::InvTypeGuildTribute: - return invtype::InvTypeGuildTributeSize; - case invtype::InvTypeMerchant: - return invtype::InvTypeMerchantSize; - case invtype::InvTypeCorpse: - return invtype::InvTypeCorpseSize; - case invtype::InvTypeBazaar: - return invtype::InvTypeBazaarSize; - case invtype::InvTypeInspect: - return invtype::InvTypeInspectSize; - case invtype::InvTypeViewMODPC: - return invtype::InvTypeViewMODPCSize; - case invtype::InvTypeViewMODBank: - return invtype::InvTypeViewMODBankSize; - case invtype::InvTypeViewMODSharedBank: - return invtype::InvTypeViewMODSharedBankSize; - case invtype::InvTypeViewMODLimbo: - return invtype::InvTypeViewMODLimboSize; - case invtype::InvTypeAltStorage: - return invtype::InvTypeAltStorageSize; - case invtype::InvTypeArchived: - return invtype::InvTypeArchivedSize; - case invtype::InvTypeOther: - return invtype::InvTypeOtherSize; + case invtype::typePossessions: + return invtype::POSSESSIONS_SIZE; + case invtype::typeBank: + return invtype::BANK_SIZE; + case invtype::typeSharedBank: + return invtype::SHARED_BANK_SIZE; + case invtype::typeTrade: + return invtype::TRADE_SIZE; + case invtype::typeWorld: + return invtype::WORLD_SIZE; + case invtype::typeLimbo: + return invtype::LIMBO_SIZE; + case invtype::typeTribute: + return invtype::TRIBUTE_SIZE; + case invtype::typeGuildTribute: + return invtype::GUILD_TRIBUTE_SIZE; + case invtype::typeMerchant: + return invtype::MERCHANT_SIZE; + case invtype::typeCorpse: + return invtype::CORPSE_SIZE; + case invtype::typeBazaar: + return invtype::BAZAAR_SIZE; + case invtype::typeInspect: + return invtype::INSPECT_SIZE; + case invtype::typeViewMODPC: + return invtype::VIEW_MOD_PC_SIZE; + case invtype::typeViewMODBank: + return invtype::VIEW_MOD_BANK_SIZE; + case invtype::typeViewMODSharedBank: + return invtype::VIEW_MOD_SHARED_BANK_SIZE; + case invtype::typeViewMODLimbo: + return invtype::VIEW_MOD_LIMBO_SIZE; + case invtype::typeAltStorage: + return invtype::ALT_STORAGE_SIZE; + case invtype::typeArchived: + return invtype::ARCHIVED_SIZE; + case invtype::typeOther: + return invtype::OTHER_SIZE; default: - return 0; + return INULL; } } -const char* SoD::invtype::GetInvTypeName(int inv_type) +const char* SoD::invtype::GetInvTypeName(int16 inv_type) { switch (inv_type) { - case invtype::InvTypeInvalid: + case invtype::TYPE_INVALID: return "Invalid Type"; - case invtype::InvTypePossessions: + case invtype::typePossessions: return "Possessions"; - case invtype::InvTypeBank: + case invtype::typeBank: return "Bank"; - case invtype::InvTypeSharedBank: + case invtype::typeSharedBank: return "Shared Bank"; - case invtype::InvTypeTrade: + case invtype::typeTrade: return "Trade"; - case invtype::InvTypeWorld: + case invtype::typeWorld: return "World"; - case invtype::InvTypeLimbo: + case invtype::typeLimbo: return "Limbo"; - case invtype::InvTypeTribute: + case invtype::typeTribute: return "Tribute"; - case invtype::InvTypeGuildTribute: + case invtype::typeGuildTribute: return "Guild Tribute"; - case invtype::InvTypeMerchant: + case invtype::typeMerchant: return "Merchant"; - case invtype::InvTypeCorpse: + case invtype::typeCorpse: return "Corpse"; - case invtype::InvTypeBazaar: + case invtype::typeBazaar: return "Bazaar"; - case invtype::InvTypeInspect: + case invtype::typeInspect: return "Inspect"; - case invtype::InvTypeViewMODPC: + case invtype::typeViewMODPC: return "View MOD PC"; - case invtype::InvTypeViewMODBank: + case invtype::typeViewMODBank: return "View MOD Bank"; - case invtype::InvTypeViewMODSharedBank: + case invtype::typeViewMODSharedBank: return "View MOD Shared Bank"; - case invtype::InvTypeViewMODLimbo: + case invtype::typeViewMODLimbo: return "View MOD Limbo"; - case invtype::InvTypeAltStorage: + case invtype::typeAltStorage: return "Alt Storage"; - case invtype::InvTypeArchived: + case invtype::typeArchived: return "Archived"; - case invtype::InvTypeOther: + case invtype::typeOther: return "Other"; default: return "Unknown Type"; } } -bool SoD::invtype::IsInvTypePersistent(int inv_type) +bool SoD::invtype::IsInvTypePersistent(int16 inv_type) { switch (inv_type) { - case invtype::InvTypePossessions: - case invtype::InvTypeBank: - case invtype::InvTypeSharedBank: - case invtype::InvTypeTrade: - case invtype::InvTypeWorld: - case invtype::InvTypeLimbo: - case invtype::InvTypeTribute: - case invtype::InvTypeGuildTribute: + case invtype::typePossessions: + case invtype::typeBank: + case invtype::typeSharedBank: + case invtype::typeTrade: + case invtype::typeWorld: + case invtype::typeLimbo: + case invtype::typeTribute: + case invtype::typeGuildTribute: return true; default: return false; } } -const char* SoD::invslot::GetInvPossessionsSlotName(int inv_slot) +const char* SoD::invslot::GetInvPossessionsSlotName(int16 inv_slot) { switch (inv_slot) { - case invslot::InvSlotInvalid: + case invslot::SLOT_INVALID: return "Invalid Slot"; - case invslot::PossessionsCharm: + case invslot::slotCharm: return "Charm"; - case invslot::PossessionsEar1: + case invslot::slotEar1: return "Ear 1"; - case invslot::PossessionsHead: + case invslot::slotHead: return "Head"; - case invslot::PossessionsFace: + case invslot::slotFace: return "Face"; - case invslot::PossessionsEar2: + case invslot::slotEar2: return "Ear 2"; - case invslot::PossessionsNeck: + case invslot::slotNeck: return "Neck"; - case invslot::PossessionsShoulders: + case invslot::slotShoulders: return "Shoulders"; - case invslot::PossessionsArms: + case invslot::slotArms: return "Arms"; - case invslot::PossessionsBack: + case invslot::slotBack: return "Back"; - case invslot::PossessionsWrist1: + case invslot::slotWrist1: return "Wrist 1"; - case invslot::PossessionsWrist2: + case invslot::slotWrist2: return "Wrist 2"; - case invslot::PossessionsRange: + case invslot::slotRange: return "Range"; - case invslot::PossessionsHands: + case invslot::slotHands: return "Hands"; - case invslot::PossessionsPrimary: + case invslot::slotPrimary: return "Primary"; - case invslot::PossessionsSecondary: + case invslot::slotSecondary: return "Secondary"; - case invslot::PossessionsFinger1: + case invslot::slotFinger1: return "Finger 1"; - case invslot::PossessionsFinger2: + case invslot::slotFinger2: return "Finger 2"; - case invslot::PossessionsChest: + case invslot::slotChest: return "Chest"; - case invslot::PossessionsLegs: + case invslot::slotLegs: return "Legs"; - case invslot::PossessionsFeet: + case invslot::slotFeet: return "Feet"; - case invslot::PossessionsWaist: + case invslot::slotWaist: return "Waist"; - case invslot::PossessionsPowerSource: + case invslot::slotPowerSource: return "Power Source"; - case invslot::PossessionsAmmo: + case invslot::slotAmmo: return "Ammo"; - case invslot::PossessionsGeneral1: + case invslot::slotGeneral1: return "General 1"; - case invslot::PossessionsGeneral2: + case invslot::slotGeneral2: return "General 2"; - case invslot::PossessionsGeneral3: + case invslot::slotGeneral3: return "General 3"; - case invslot::PossessionsGeneral4: + case invslot::slotGeneral4: return "General 4"; - case invslot::PossessionsGeneral5: + case invslot::slotGeneral5: return "General 5"; - case invslot::PossessionsGeneral6: + case invslot::slotGeneral6: return "General 6"; - case invslot::PossessionsGeneral7: + case invslot::slotGeneral7: return "General 7"; - case invslot::PossessionsGeneral8: + case invslot::slotGeneral8: return "General 8"; - case invslot::PossessionsCursor: + case invslot::slotCursor: return "Cursor"; default: return "Unknown Slot"; } } -const char* SoD::invslot::GetInvCorpseSlotName(int inv_slot) +const char* SoD::invslot::GetInvCorpseSlotName(int16 inv_slot) { - if (!invtype::GetInvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid) + if (!invtype::GetInvTypeSize(invtype::typeCorpse) || inv_slot == invslot::SLOT_INVALID) return "Invalid Slot"; // needs work - if ((size_t)(inv_slot + 1) < invslot::CorpseBegin || (size_t)(inv_slot + 1) >= invslot::CorpseEnd) + if ((inv_slot + 1) < invslot::CORPSE_BEGIN || (inv_slot + 1) >= invslot::CORPSE_END) return "Unknown Slot"; static std::string ret_str; @@ -222,19 +222,19 @@ const char* SoD::invslot::GetInvCorpseSlotName(int inv_slot) return ret_str.c_str(); } -const char* SoD::invslot::GetInvSlotName(int inv_type, int inv_slot) +const char* SoD::invslot::GetInvSlotName(int16 inv_type, int16 inv_slot) { - if (inv_type == invtype::InvTypePossessions) + if (inv_type == invtype::typePossessions) return invslot::GetInvPossessionsSlotName(inv_slot); - else if (inv_type == invtype::InvTypeCorpse) + else if (inv_type == invtype::typeCorpse) return invslot::GetInvCorpseSlotName(inv_slot); - size_t type_size = invtype::GetInvTypeSize(inv_type); + int16 type_size = invtype::GetInvTypeSize(inv_type); - if (!type_size || inv_slot == invslot::InvSlotInvalid) + if (!type_size || inv_slot == invslot::SLOT_INVALID) return "Invalid Slot"; - if ((size_t)(inv_slot + 1) >= type_size) + if ((inv_slot + 1) >= type_size) return "Unknown Slot"; static std::string ret_str; @@ -243,12 +243,12 @@ const char* SoD::invslot::GetInvSlotName(int inv_type, int inv_slot) return ret_str.c_str(); } -const char* SoD::invbag::GetInvBagIndexName(int bag_index) +const char* SoD::invbag::GetInvBagIndexName(int16 bag_index) { - if (bag_index == invbag::InvBagInvalid) + if (bag_index == invbag::SLOT_INVALID) return "Invalid Bag"; - if ((size_t)bag_index >= invbag::ItemBagSize) + if (bag_index >= invbag::SLOT_COUNT) return "Unknown Bag"; static std::string ret_str; @@ -257,12 +257,12 @@ const char* SoD::invbag::GetInvBagIndexName(int bag_index) return ret_str.c_str(); } -const char* SoD::invaug::GetInvAugIndexName(int aug_index) +const char* SoD::invaug::GetInvAugIndexName(int16 aug_index) { - if (aug_index == invaug::InvAugInvalid) + if (aug_index == invaug::SOCKET_INVALID) return "Invalid Augment"; - if ((size_t)aug_index >= invaug::ItemAugSize) + if (aug_index >= invaug::SOCKET_COUNT) return "Unknown Augment"; static std::string ret_str; diff --git a/common/patches/sod_limits.h b/common/patches/sod_limits.h index 8f8031a3d..555425cc1 100644 --- a/common/patches/sod_limits.h +++ b/common/patches/sod_limits.h @@ -27,108 +27,218 @@ namespace SoD { - enum : int { Invalid = -1, Null, Safety }; + const int16 IINVALID = -1; + const int16 INULL = 0; - enum : bool { False = false, True = true }; - - // pre-declarations namespace inventory { inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::SoD; } + const bool ConcatenateInvTypeLimbo = true; + + const bool AllowOverLevelEquipment = false; + + const bool AllowEmptyBagInBag = false; + const bool AllowClickCastFromBag = false; + } /*inventory*/ namespace invtype { inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::SoD; } - enum : int { InvTypeInvalid = -1, InvTypeBegin }; + namespace enum_ { + enum InventoryTypes : int16 { + typePossessions = INULL, + typeBank, + typeSharedBank, + typeTrade, + typeWorld, + typeLimbo, + typeTribute, + typeGuildTribute, + typeMerchant, + typeCorpse, + typeBazaar, + typeInspect, + typeViewMODPC, + typeViewMODBank, + typeViewMODSharedBank, + typeViewMODLimbo, + typeAltStorage, + typeArchived, + typeOther + }; - enum InventoryType : int { - InvTypePossessions = InvTypeBegin, - InvTypeBank, - InvTypeSharedBank, - InvTypeTrade, - InvTypeWorld, - InvTypeLimbo, - InvTypeTribute, - InvTypeGuildTribute, - InvTypeMerchant, - InvTypeCorpse, - InvTypeBazaar, - InvTypeInspect, - InvTypeViewMODPC, - InvTypeViewMODBank, - InvTypeViewMODSharedBank, - InvTypeViewMODLimbo, - InvTypeAltStorage, - InvTypeArchived, - InvTypeOther, - InvTypeCount - }; + } // namespace enum_ + using namespace enum_; + + const int16 POSSESSIONS_SIZE = 32; + const int16 BANK_SIZE = 24; + const int16 SHARED_BANK_SIZE = 2; + const int16 TRADE_SIZE = 8; + const int16 WORLD_SIZE = 10; + const int16 LIMBO_SIZE = 36; + const int16 TRIBUTE_SIZE = 5; + const int16 GUILD_TRIBUTE_SIZE = 2; + const int16 MERCHANT_SIZE = 80; + const int16 CORPSE_SIZE = POSSESSIONS_SIZE; + const int16 BAZAAR_SIZE = 80; + const int16 INSPECT_SIZE = 23; + const int16 VIEW_MOD_PC_SIZE = POSSESSIONS_SIZE; + const int16 VIEW_MOD_BANK_SIZE = BANK_SIZE; + const int16 VIEW_MOD_SHARED_BANK_SIZE = SHARED_BANK_SIZE; + const int16 VIEW_MOD_LIMBO_SIZE = LIMBO_SIZE; + const int16 ALT_STORAGE_SIZE = 0;//unknown - "Shroud Bank" + const int16 ARCHIVED_SIZE = 0;//unknown + const int16 OTHER_SIZE = 0;//unknown + + const int16 TRADE_NPC_SIZE = 4; // defined by implication + + const int16 TYPE_INVALID = IINVALID; + const int16 TYPE_BEGIN = typePossessions; + const int16 TYPE_END = typeOther; + const int16 TYPE_COUNT = (TYPE_END - TYPE_BEGIN) + 1; + + int16 GetInvTypeSize(int16 inv_type); + const char* GetInvTypeName(int16 inv_type); + + bool IsInvTypePersistent(int16 inv_type); } /*invtype*/ namespace invslot { inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::SoD; } - enum : int { InvSlotInvalid = -1, InvSlotBegin }; + namespace enum_ { + enum InventorySlots : int16 { + slotCharm = INULL, + slotEar1, + slotHead, + slotFace, + slotEar2, + slotNeck, + slotShoulders, + slotArms, + slotBack, + slotWrist1, + slotWrist2, + slotRange, + slotHands, + slotPrimary, + slotSecondary, + slotFinger1, + slotFinger2, + slotChest, + slotLegs, + slotFeet, + slotWaist, + slotPowerSource, + slotAmmo, + slotGeneral1, + slotGeneral2, + slotGeneral3, + slotGeneral4, + slotGeneral5, + slotGeneral6, + slotGeneral7, + slotGeneral8, + slotCursor + }; - enum PossessionsSlot : int { - PossessionsCharm = InvSlotBegin, - PossessionsEar1, - PossessionsHead, - PossessionsFace, - PossessionsEar2, - PossessionsNeck, - PossessionsShoulders, - PossessionsArms, - PossessionsBack, - PossessionsWrist1, - PossessionsWrist2, - PossessionsRange, - PossessionsHands, - PossessionsPrimary, - PossessionsSecondary, - PossessionsFinger1, - PossessionsFinger2, - PossessionsChest, - PossessionsLegs, - PossessionsFeet, - PossessionsWaist, - PossessionsPowerSource, - PossessionsAmmo, - PossessionsGeneral1, - PossessionsGeneral2, - PossessionsGeneral3, - PossessionsGeneral4, - PossessionsGeneral5, - PossessionsGeneral6, - PossessionsGeneral7, - PossessionsGeneral8, - PossessionsCursor, - PossessionsCount - }; + } // namespace enum_ + using namespace enum_; - const int EquipmentBegin = PossessionsCharm; - const int EquipmentEnd = PossessionsAmmo; - const int EquipmentCount = (EquipmentEnd - EquipmentBegin + 1); + const int16 SLOT_INVALID = IINVALID; + const int16 SLOT_BEGIN = INULL; - const int GeneralBegin = PossessionsGeneral1; - const int GeneralEnd = PossessionsGeneral8; - const int GeneralCount = (GeneralEnd - GeneralBegin + 1); + const int16 POSSESSIONS_BEGIN = slotCharm; + const int16 POSSESSIONS_END = slotCursor; + const int16 POSSESSIONS_COUNT = (POSSESSIONS_END - POSSESSIONS_BEGIN) + 1; + + const int16 EQUIPMENT_BEGIN = slotCharm; + const int16 EQUIPMENT_END = slotAmmo; + const int16 EQUIPMENT_COUNT = (EQUIPMENT_END - EQUIPMENT_BEGIN + 1); + + const int16 GENERAL_BEGIN = slotGeneral1; + const int16 GENERAL_END = slotGeneral8; + const int16 GENERAL_COUNT = (GENERAL_END - GENERAL_BEGIN + 1); + + const int16 BONUS_BEGIN = invslot::slotCharm; + const int16 BONUS_STAT_END = invslot::slotPowerSource; + const int16 BONUS_SKILL_END = invslot::slotAmmo; + + const int16 BANK_BEGIN = 2000; + const int16 BANK_END = (BANK_BEGIN + invtype::BANK_SIZE) - 1; + + const int16 SHARED_BANK_BEGIN = 2500; + const int16 SHARED_BANK_END = (SHARED_BANK_BEGIN + invtype::SHARED_BANK_SIZE) - 1; + + const int16 TRADE_BEGIN = 3000; + const int16 TRADE_END = (TRADE_BEGIN + invtype::TRADE_SIZE) - 1; + + const int16 TRADE_NPC_END = (TRADE_BEGIN + invtype::TRADE_NPC_SIZE) - 1; // defined by implication + + const int16 WORLD_BEGIN = 4000; + const int16 WORLD_END = (WORLD_BEGIN + invtype::WORLD_SIZE) - 1; + + const int16 TRIBUTE_BEGIN = 400; + const int16 TRIBUTE_END = (TRIBUTE_BEGIN + invtype::TRIBUTE_SIZE) - 1; + + const int16 GUILD_TRIBUTE_BEGIN = 450; + const int16 GUILD_TRIBUTE_END = (GUILD_TRIBUTE_BEGIN + invtype::GUILD_TRIBUTE_SIZE) - 1; + + const int16 CORPSE_BEGIN = invslot::slotGeneral1; + const int16 CORPSE_END = invslot::slotGeneral1 + invslot::slotCursor; + + const uint64 POSSESSIONS_BITMASK = 0x000000027FFFFFFF; // based on 34-slot count (RoF+) + const uint64 CORPSE_BITMASK = 0x01FFFFFE7F800000; // based on 34-slot count (RoF+) + + const char* GetInvPossessionsSlotName(int16 inv_slot); + const char* GetInvCorpseSlotName(int16 inv_slot); + const char* GetInvSlotName(int16 inv_type, int16 inv_slot); } /*invslot*/ namespace invbag { inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::SoD; } - enum : int { InvBagInvalid = -1, InvBagBegin }; + const int16 SLOT_INVALID = IINVALID; + const int16 SLOT_BEGIN = INULL; + const int16 SLOT_END = 9; + const int16 SLOT_COUNT = 10; + + const int16 GENERAL_BAGS_BEGIN = 262; + const int16 GENERAL_BAGS_COUNT = invslot::GENERAL_COUNT * SLOT_COUNT; + const int16 GENERAL_BAGS_END = (GENERAL_BAGS_BEGIN + GENERAL_BAGS_COUNT) - 1; + + const int16 CURSOR_BAG_BEGIN = 342; + const int16 CURSOR_BAG_COUNT = SLOT_COUNT; + const int16 CURSOR_BAG_END = (CURSOR_BAG_BEGIN + CURSOR_BAG_COUNT) - 1; + + const int16 BANK_BAGS_BEGIN = 2032; + const int16 BANK_BAGS_COUNT = (invtype::BANK_SIZE * SLOT_COUNT); + const int16 BANK_BAGS_END = (BANK_BAGS_BEGIN + BANK_BAGS_COUNT) - 1; + + const int16 SHARED_BANK_BAGS_BEGIN = 2532; + const int16 SHARED_BANK_BAGS_COUNT = invtype::SHARED_BANK_SIZE * SLOT_COUNT; + const int16 SHARED_BANK_BAGS_END = (SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_COUNT) - 1; + + const int16 TRADE_BAGS_BEGIN = 3031; + const int16 TRADE_BAGS_COUNT = invtype::TRADE_SIZE * SLOT_COUNT; + const int16 TRADE_BAGS_END = (TRADE_BAGS_BEGIN + TRADE_BAGS_COUNT) - 1; + + const char* GetInvBagIndexName(int16 bag_index); } /*invbag*/ namespace invaug { inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::SoD; } - enum : int { InvAugInvalid = -1, InvAugBegin }; + const int16 SOCKET_INVALID = IINVALID; + const int16 SOCKET_BEGIN = INULL; + const int16 SOCKET_END = 4; + const int16 SOCKET_COUNT = 5; + + const char* GetInvAugIndexName(int16 aug_index); } /*invaug*/ @@ -153,147 +263,21 @@ namespace SoD namespace profile { inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::SoD; } + const int16 BANDOLIERS_SIZE = 20; // number of bandolier instances + const int16 BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance + + const int16 POTION_BELT_SIZE = 5; + + const int16 SKILL_ARRAY_SIZE = 100; + } /*profile*/ namespace constants { inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::SoD; } - } /*constants*/ + const size_t CHARACTER_CREATION_LIMIT = 12; - namespace behavior { - inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::SoD; } - - } /*behavior*/ - - namespace skills { - inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::SoD; } - - } /*skills*/ - - - // declarations - namespace inventory { - const bool ConcatenateInvTypeLimbo = true; - - const bool AllowOverLevelEquipment = false; - - const bool AllowEmptyBagInBag = false; - const bool AllowClickCastFromBag = false; - - } /*inventory*/ - - namespace invtype { - const size_t InvTypePossessionsSize = invslot::PossessionsCount; - const size_t InvTypeBankSize = 24; - const size_t InvTypeSharedBankSize = 2; - const size_t InvTypeTradeSize = 8; - const size_t InvTypeWorldSize = 10; - const size_t InvTypeLimboSize = 36; - const size_t InvTypeTributeSize = 5; - const size_t InvTypeGuildTributeSize = 2; - const size_t InvTypeMerchantSize = 80; - const size_t InvTypeCorpseSize = InvTypePossessionsSize; - const size_t InvTypeBazaarSize = 80; - const size_t InvTypeInspectSize = invslot::EquipmentCount; - const size_t InvTypeViewMODPCSize = InvTypePossessionsSize; - const size_t InvTypeViewMODBankSize = InvTypeBankSize; - const size_t InvTypeViewMODSharedBankSize = InvTypeSharedBankSize; - const size_t InvTypeViewMODLimboSize = InvTypeLimboSize; - const size_t InvTypeAltStorageSize = 0;//unknown - "Shroud Bank" - const size_t InvTypeArchivedSize = 0;//unknown - const size_t InvTypeOtherSize = 0;//unknown - - extern size_t GetInvTypeSize(int inv_type); - extern const char* GetInvTypeName(int inv_type); - - extern bool IsInvTypePersistent(int inv_type); - - } /*invtype*/ - - namespace invslot { - const int BankBegin = 2000; - const int BankEnd = (BankBegin + invtype::InvTypeBankSize) - 1; - - const int SharedBankBegin = 2500; - const int SharedBankEnd = (SharedBankBegin + invtype::InvTypeSharedBankSize) - 1; - - const int TradeBegin = 3000; - const int TradeEnd = (TradeBegin + invtype::InvTypeTradeSize) - 1; - const int TradeNPCEnd = 3003; - - const int WorldBegin = 4000; - const int WorldEnd = (WorldBegin + invtype::InvTypeWorldSize) - 1; - - const int TributeBegin = 400; - const int TributeEnd = (TributeBegin + invtype::InvTypeTributeSize) - 1; - - const int GuildTributeBegin = 450; - const int GuildTributeEnd = (GuildTributeBegin + invtype::InvTypeGuildTributeSize) - 1; - - const int CorpseBegin = invslot::PossessionsGeneral1; - const int CorpseEnd = invslot::PossessionsGeneral1 + invslot::PossessionsCursor; - - extern const char* GetInvPossessionsSlotName(int inv_slot); - extern const char* GetInvCorpseSlotName(int inv_slot); - extern const char* GetInvSlotName(int inv_type, int inv_slot); - - } /*invslot*/ - - namespace invbag { - const size_t ItemBagSize = 10; - - const int GeneralBagsBegin = 262; - const int GeneralBagsSize = invslot::GeneralCount * ItemBagSize; - const int GeneralBagsEnd = (GeneralBagsBegin + GeneralBagsSize) - 1; - - const int CursorBagBegin = 342; - const int CursorBagSize = ItemBagSize; - const int CursorBagEnd = (CursorBagBegin + CursorBagSize) - 1; - - const int BankBagsBegin = 2032; - const int BankBagsSize = (invtype::InvTypeBankSize * ItemBagSize); - const int BankBagsEnd = (BankBagsBegin + BankBagsSize) - 1; - - const int SharedBankBagsBegin = 2532; - const int SharedBankBagsSize = invtype::InvTypeSharedBankSize * ItemBagSize; - const int SharedBankBagsEnd = (SharedBankBagsBegin + SharedBankBagsSize) - 1; - - const int TradeBagsBegin = 3031; - const int TradeBagsSize = invtype::InvTypeTradeSize * ItemBagSize; - const int TradeBagsEnd = (TradeBagsBegin + TradeBagsSize) - 1; - - extern const char* GetInvBagIndexName(int bag_index); - - } /*invbag*/ - - namespace invaug { - const size_t ItemAugSize = 5; - - extern const char* GetInvAugIndexName(int aug_index); - - } /*invaug*/ - - namespace item { - - } /*item*/ - - namespace profile { - const size_t TributeSize = invtype::InvTypeTributeSize; - const size_t GuildTributeSize = invtype::InvTypeGuildTributeSize; - - const size_t BandoliersSize = 20; // number of bandolier instances - const size_t BandolierItemCount = 4; // number of equipment slots in bandolier instance - - const size_t PotionBeltSize = 5; - - const size_t SkillArraySize = 100; - - } /*profile*/ - - namespace constants { - const size_t CharacterCreationLimit = 12; - - const size_t SayLinkBodySize = 50; + const size_t SAY_LINK_BODY_SIZE = 50; const int LongBuffs = 25; const int ShortBuffs = 15; @@ -306,11 +290,15 @@ namespace SoD } /*constants*/ namespace behavior { + inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::SoD; } + const bool CoinHasWeight = false; } /*behavior*/ namespace skills { + inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::SoD; } + const size_t LastUsableSkill = EQEmu::skills::SkillTripleAttack; } /*skills*/ diff --git a/common/patches/sod_structs.h b/common/patches/sod_structs.h index 6b5c2f72c..80d0faae9 100644 --- a/common/patches/sod_structs.h +++ b/common/patches/sod_structs.h @@ -716,7 +716,7 @@ struct BandolierItem_Struct struct Bandolier_Struct { char Name[32]; - BandolierItem_Struct Items[profile::BandolierItemCount]; + BandolierItem_Struct Items[profile::BANDOLIER_ITEM_COUNT]; }; //len = 72 @@ -730,7 +730,7 @@ struct PotionBeltItem_Struct //len = 288 struct PotionBelt_Struct { - PotionBeltItem_Struct Items[profile::PotionBeltSize]; + PotionBeltItem_Struct Items[profile::POTION_BELT_SIZE]; }; static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16; @@ -937,7 +937,7 @@ struct PlayerProfile_Struct /*08288*/ uint32 aapoints_spent; // Number of spent AA points /*08292*/ uint32 aapoints; // Unspent AA points /*08296*/ uint8 unknown06160[4]; -/*08300*/ Bandolier_Struct bandoliers[profile::BandoliersSize]; // [6400] bandolier contents +/*08300*/ Bandolier_Struct bandoliers[profile::BANDOLIERS_SIZE]; // [6400] bandolier contents /*14700*/ PotionBelt_Struct potionbelt; // [360] potion belt 72 extra octets by adding 1 more belt slot /*15060*/ uint8 unknown12852[8]; /*15068*/ uint32 available_slots; diff --git a/common/patches/sof.cpp b/common/patches/sof.cpp index c16bed086..ee087e669 100644 --- a/common/patches/sof.cpp +++ b/common/patches/sof.cpp @@ -1303,18 +1303,18 @@ namespace SoF // OUT(unknown06160[4]); // Copy bandoliers where server and client indexes converge - for (r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < profile::BandoliersSize; ++r) { + for (r = 0; r < EQEmu::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) { OUT_str(bandoliers[r].Name); - for (uint32 k = 0; k < profile::BandolierItemCount; ++k) { // Will need adjusting if 'server != client' is ever true + for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true OUT(bandoliers[r].Items[k].ID); OUT(bandoliers[r].Items[k].Icon); OUT_str(bandoliers[r].Items[k].Name); } } // Nullify bandoliers where server and client indexes diverge, with a client bias - for (r = EQEmu::legacy::BANDOLIERS_SIZE; r < profile::BandoliersSize; ++r) { + for (r = EQEmu::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) { eq->bandoliers[r].Name[0] = '\0'; - for (uint32 k = 0; k < profile::BandolierItemCount; ++k) { // Will need adjusting if 'server != client' is ever true + for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true eq->bandoliers[r].Items[k].ID = 0; eq->bandoliers[r].Items[k].Icon = 0; eq->bandoliers[r].Items[k].Name[0] = '\0'; @@ -1324,13 +1324,13 @@ namespace SoF // OUT(unknown07444[5120]); // Copy potion belt where server and client indexes converge - for (r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < profile::PotionBeltSize; ++r) { + for (r = 0; r < EQEmu::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++r) { OUT(potionbelt.Items[r].ID); OUT(potionbelt.Items[r].Icon); OUT_str(potionbelt.Items[r].Name); } // Nullify potion belt where server and client indexes diverge, with a client bias - for (r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < profile::PotionBeltSize; ++r) { + for (r = EQEmu::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) { eq->potionbelt.Items[r].ID = 0; eq->potionbelt.Items[r].Icon = 0; eq->potionbelt.Items[r].Name[0] = '\0'; @@ -1618,8 +1618,8 @@ namespace SoF eq->CharCount = emu->CharCount; eq->TotalChars = emu->TotalChars; - if (eq->TotalChars > constants::CharacterCreationLimit) - eq->TotalChars = constants::CharacterCreationLimit; + if (eq->TotalChars > constants::CHARACTER_CREATION_LIMIT) + eq->TotalChars = constants::CHARACTER_CREATION_LIMIT; FINISH_ENCODE(); return; @@ -1631,7 +1631,7 @@ namespace SoF size_t names_length = 0; size_t character_count = 0; - for (; character_count < emu->CharCount && character_count < constants::CharacterCreationLimit; ++character_count) { + for (; character_count < emu->CharCount && character_count < constants::CHARACTER_CREATION_LIMIT; ++character_count) { emu_cse = (CharacterSelectEntry_Struct *)emu_ptr; names_length += strlen(emu_cse->Name); emu_ptr += sizeof(CharacterSelectEntry_Struct); @@ -1647,8 +1647,8 @@ namespace SoF eq->CharCount = character_count; eq->TotalChars = emu->TotalChars; - if (eq->TotalChars > constants::CharacterCreationLimit) - eq->TotalChars = constants::CharacterCreationLimit; + if (eq->TotalChars > constants::CHARACTER_CREATION_LIMIT) + eq->TotalChars = constants::CHARACTER_CREATION_LIMIT; emu_ptr = __emu_buffer; emu_ptr += sizeof(CharacterSelect_Struct); @@ -2976,7 +2976,7 @@ namespace SoF ibs.nodrop = item->NoDrop; ibs.attune = item->Attuneable; ibs.size = item->Size; - ibs.slots = SwapBits21and22(item->Slots); + ibs.slots = SwapBits21And22(item->Slots); ibs.price = item->Price; ibs.icon = item->Icon; ibs.unknown1 = 1; @@ -3066,7 +3066,7 @@ namespace SoF isbs.augtype = item->AugType; isbs.augrestrict = item->AugRestrict; - for (int index = 0; index < invaug::ItemAugSize; ++index) { + for (int index = invaug::SOCKET_BEGIN; index <= invaug::SOCKET_END; ++index) { isbs.augslots[index].type = item->AugSlotType[index]; isbs.augslots[index].visible = item->AugSlotVisible[index]; isbs.augslots[index].unknown = item->AugSlotUnk2[index]; @@ -3238,18 +3238,18 @@ namespace SoF ob.write((const char*)&subitem_count, sizeof(uint32)); - for (uint32 index = EQEmu::inventory::containerBegin; index < EQEmu::inventory::ContainerCount; ++index) { + for (uint32 index = EQEmu::invbag::SLOT_BEGIN; index <= EQEmu::invbag::SLOT_END; ++index) { EQEmu::ItemInstance* sub = inst->GetItem(index); if (!sub) continue; int SubSlotNumber = INVALID_INDEX; - if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END) - SubSlotNumber = (((slot_id_in + 3) * EQEmu::inventory::ContainerCount) + index + 1); - else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END) - SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::BANK_BAGS_BEGIN + index); - else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END) - SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index); + if (slot_id_in >= EQEmu::invslot::GENERAL_BEGIN && slot_id_in <= EQEmu::invslot::GENERAL_END) + SubSlotNumber = (((slot_id_in + 3) * EQEmu::invbag::SLOT_COUNT) + index + 1); + else if (slot_id_in >= EQEmu::invslot::BANK_BEGIN && slot_id_in <= EQEmu::invslot::BANK_END) + SubSlotNumber = (((slot_id_in - EQEmu::invslot::BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::BANK_BAGS_BEGIN + index); + else if (slot_id_in >= EQEmu::invslot::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::invslot::SHARED_BANK_END) + SubSlotNumber = (((slot_id_in - EQEmu::invslot::SHARED_BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + index); else SubSlotNumber = slot_id_in; @@ -3267,16 +3267,16 @@ namespace SoF { uint32 SoFSlot = 0; - if (serverSlot >= EQEmu::inventory::slotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots + if (serverSlot >= EQEmu::invslot::slotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots SoFSlot = serverSlot + 1; - else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) + else if (serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::invbag::CURSOR_BAG_END) SoFSlot = serverSlot + 11; - else if (serverSlot >= EQEmu::legacy::BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::BANK_BAGS_END) + else if (serverSlot >= EQEmu::invbag::BANK_BAGS_BEGIN && serverSlot <= EQEmu::invbag::BANK_BAGS_END) SoFSlot = serverSlot + 1; - else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END) + else if (serverSlot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::invbag::SHARED_BANK_BAGS_END) SoFSlot = serverSlot + 1; - else if (serverSlot == EQEmu::inventory::slotPowerSource) - SoFSlot = invslot::PossessionsPowerSource; + else if (serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE) + SoFSlot = invslot::slotPowerSource; else SoFSlot = serverSlot; @@ -3293,16 +3293,16 @@ namespace SoF { uint32 ServerSlot = 0; - if (sofSlot >= invslot::PossessionsAmmo && sofSlot <= invslot::CorpseEnd) // Cursor/Ammo/Power Source and Normal Inventory Slots + if (sofSlot >= invslot::slotAmmo && sofSlot <= invslot::CORPSE_END) // Cursor/Ammo/Power Source and Normal Inventory Slots ServerSlot = sofSlot - 1; - else if (sofSlot >= invbag::GeneralBagsBegin && sofSlot <= invbag::CursorBagEnd) + else if (sofSlot >= invbag::GENERAL_BAGS_BEGIN && sofSlot <= invbag::CURSOR_BAG_END) ServerSlot = sofSlot - 11; - else if (sofSlot >= invbag::BankBagsBegin && sofSlot <= invbag::BankBagsEnd) + else if (sofSlot >= invbag::BANK_BAGS_BEGIN && sofSlot <= invbag::BANK_BAGS_END) ServerSlot = sofSlot - 1; - else if (sofSlot >= invbag::SharedBankBagsBegin && sofSlot <= invbag::SharedBankBagsEnd) + else if (sofSlot >= invbag::SHARED_BANK_BAGS_BEGIN && sofSlot <= invbag::SHARED_BANK_BAGS_END) ServerSlot = sofSlot - 1; - else if (sofSlot == invslot::PossessionsPowerSource) - ServerSlot = EQEmu::inventory::slotPowerSource; + else if (sofSlot == invslot::slotPowerSource) + ServerSlot = EQEmu::invslot::SLOT_POWER_SOURCE; else ServerSlot = sofSlot; @@ -3317,7 +3317,7 @@ namespace SoF static inline void ServerToSoFSayLink(std::string& sofSayLink, const std::string& serverSayLink) { - if ((constants::SayLinkBodySize == EQEmu::constants::SayLinkBodySize) || (serverSayLink.find('\x12') == std::string::npos)) { + if ((constants::SAY_LINK_BODY_SIZE == EQEmu::constants::SAY_LINK_BODY_SIZE) || (serverSayLink.find('\x12') == std::string::npos)) { sofSayLink = serverSayLink; return; } @@ -3326,7 +3326,7 @@ namespace SoF for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { - if (segments[segment_iter].length() <= EQEmu::constants::SayLinkBodySize) { + if (segments[segment_iter].length() <= EQEmu::constants::SAY_LINK_BODY_SIZE) { sofSayLink.append(segments[segment_iter]); // TODO: log size mismatch error continue; @@ -3357,7 +3357,7 @@ namespace SoF static inline void SoFToServerSayLink(std::string& serverSayLink, const std::string& sofSayLink) { - if ((EQEmu::constants::SayLinkBodySize == constants::SayLinkBodySize) || (sofSayLink.find('\x12') == std::string::npos)) { + if ((EQEmu::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (sofSayLink.find('\x12') == std::string::npos)) { serverSayLink = sofSayLink; return; } @@ -3366,7 +3366,7 @@ namespace SoF for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { - if (segments[segment_iter].length() <= constants::SayLinkBodySize) { + if (segments[segment_iter].length() <= constants::SAY_LINK_BODY_SIZE) { serverSayLink.append(segments[segment_iter]); // TODO: log size mismatch error continue; diff --git a/common/patches/sof_limits.cpp b/common/patches/sof_limits.cpp index b33943905..aa42320c8 100644 --- a/common/patches/sof_limits.cpp +++ b/common/patches/sof_limits.cpp @@ -22,198 +22,198 @@ #include "../string_util.h" -size_t SoF::invtype::GetInvTypeSize(int inv_type) +int16 SoF::invtype::GetInvTypeSize(int16 inv_type) { switch (inv_type) { - case invtype::InvTypePossessions: - return invtype::InvTypePossessionsSize; - case invtype::InvTypeBank: - return invtype::InvTypeBankSize; - case invtype::InvTypeSharedBank: - return invtype::InvTypeSharedBankSize; - case invtype::InvTypeTrade: - return invtype::InvTypeTradeSize; - case invtype::InvTypeWorld: - return invtype::InvTypeWorldSize; - case invtype::InvTypeLimbo: - return invtype::InvTypeLimboSize; - case invtype::InvTypeTribute: - return invtype::InvTypeTributeSize; - case invtype::InvTypeGuildTribute: - return invtype::InvTypeGuildTributeSize; - case invtype::InvTypeMerchant: - return invtype::InvTypeMerchantSize; - case invtype::InvTypeCorpse: - return invtype::InvTypeCorpseSize; - case invtype::InvTypeBazaar: - return invtype::InvTypeBazaarSize; - case invtype::InvTypeInspect: - return invtype::InvTypeInspectSize; - case invtype::InvTypeViewMODPC: - return invtype::InvTypeViewMODPCSize; - case invtype::InvTypeViewMODBank: - return invtype::InvTypeViewMODBankSize; - case invtype::InvTypeViewMODSharedBank: - return invtype::InvTypeViewMODSharedBankSize; - case invtype::InvTypeViewMODLimbo: - return invtype::InvTypeViewMODLimboSize; - case invtype::InvTypeAltStorage: - return invtype::InvTypeAltStorageSize; - case invtype::InvTypeArchived: - return invtype::InvTypeArchivedSize; - case invtype::InvTypeOther: - return invtype::InvTypeOtherSize; + case invtype::typePossessions: + return invtype::POSSESSIONS_SIZE; + case invtype::typeBank: + return invtype::BANK_SIZE; + case invtype::typeSharedBank: + return invtype::SHARED_BANK_SIZE; + case invtype::typeTrade: + return invtype::TRADE_SIZE; + case invtype::typeWorld: + return invtype::WORLD_SIZE; + case invtype::typeLimbo: + return invtype::LIMBO_SIZE; + case invtype::typeTribute: + return invtype::TRIBUTE_SIZE; + case invtype::typeGuildTribute: + return invtype::GUILD_TRIBUTE_SIZE; + case invtype::typeMerchant: + return invtype::MERCHANT_SIZE; + case invtype::typeCorpse: + return invtype::CORPSE_SIZE; + case invtype::typeBazaar: + return invtype::BAZAAR_SIZE; + case invtype::typeInspect: + return invtype::INSPECT_SIZE; + case invtype::typeViewMODPC: + return invtype::VIEW_MOD_PC_SIZE; + case invtype::typeViewMODBank: + return invtype::VIEW_MOD_BANK_SIZE; + case invtype::typeViewMODSharedBank: + return invtype::VIEW_MOD_SHARED_BANK_SIZE; + case invtype::typeViewMODLimbo: + return invtype::VIEW_MOD_LIMBO_SIZE; + case invtype::typeAltStorage: + return invtype::ALT_STORAGE_SIZE; + case invtype::typeArchived: + return invtype::ARCHIVED_SIZE; + case invtype::typeOther: + return invtype::OTHER_SIZE; default: - return 0; + return INULL; } } -const char* SoF::invtype::GetInvTypeName(int inv_type) +const char* SoF::invtype::GetInvTypeName(int16 inv_type) { switch (inv_type) { - case invtype::InvTypeInvalid: + case invtype::TYPE_INVALID: return "Invalid Type"; - case invtype::InvTypePossessions: + case invtype::typePossessions: return "Possessions"; - case invtype::InvTypeBank: + case invtype::typeBank: return "Bank"; - case invtype::InvTypeSharedBank: + case invtype::typeSharedBank: return "Shared Bank"; - case invtype::InvTypeTrade: + case invtype::typeTrade: return "Trade"; - case invtype::InvTypeWorld: + case invtype::typeWorld: return "World"; - case invtype::InvTypeLimbo: + case invtype::typeLimbo: return "Limbo"; - case invtype::InvTypeTribute: + case invtype::typeTribute: return "Tribute"; - case invtype::InvTypeGuildTribute: + case invtype::typeGuildTribute: return "Guild Tribute"; - case invtype::InvTypeMerchant: + case invtype::typeMerchant: return "Merchant"; - case invtype::InvTypeCorpse: + case invtype::typeCorpse: return "Corpse"; - case invtype::InvTypeBazaar: + case invtype::typeBazaar: return "Bazaar"; - case invtype::InvTypeInspect: + case invtype::typeInspect: return "Inspect"; - case invtype::InvTypeViewMODPC: + case invtype::typeViewMODPC: return "View MOD PC"; - case invtype::InvTypeViewMODBank: + case invtype::typeViewMODBank: return "View MOD Bank"; - case invtype::InvTypeViewMODSharedBank: + case invtype::typeViewMODSharedBank: return "View MOD Shared Bank"; - case invtype::InvTypeViewMODLimbo: + case invtype::typeViewMODLimbo: return "View MOD Limbo"; - case invtype::InvTypeAltStorage: + case invtype::typeAltStorage: return "Alt Storage"; - case invtype::InvTypeArchived: + case invtype::typeArchived: return "Archived"; - case invtype::InvTypeOther: + case invtype::typeOther: return "Other"; default: return "Unknown Type"; } } -bool SoF::invtype::IsInvTypePersistent(int inv_type) +bool SoF::invtype::IsInvTypePersistent(int16 inv_type) { switch (inv_type) { - case invtype::InvTypePossessions: - case invtype::InvTypeBank: - case invtype::InvTypeSharedBank: - case invtype::InvTypeTrade: - case invtype::InvTypeWorld: - case invtype::InvTypeLimbo: - case invtype::InvTypeTribute: - case invtype::InvTypeGuildTribute: + case invtype::typePossessions: + case invtype::typeBank: + case invtype::typeSharedBank: + case invtype::typeTrade: + case invtype::typeWorld: + case invtype::typeLimbo: + case invtype::typeTribute: + case invtype::typeGuildTribute: return true; default: return false; } } -const char* SoF::invslot::GetInvPossessionsSlotName(int inv_slot) +const char* SoF::invslot::GetInvPossessionsSlotName(int16 inv_slot) { switch (inv_slot) { - case invslot::InvSlotInvalid: + case invslot::SLOT_INVALID: return "Invalid Slot"; - case invslot::PossessionsCharm: + case invslot::slotCharm: return "Charm"; - case invslot::PossessionsEar1: + case invslot::slotEar1: return "Ear 1"; - case invslot::PossessionsHead: + case invslot::slotHead: return "Head"; - case invslot::PossessionsFace: + case invslot::slotFace: return "Face"; - case invslot::PossessionsEar2: + case invslot::slotEar2: return "Ear 2"; - case invslot::PossessionsNeck: + case invslot::slotNeck: return "Neck"; - case invslot::PossessionsShoulders: + case invslot::slotShoulders: return "Shoulders"; - case invslot::PossessionsArms: + case invslot::slotArms: return "Arms"; - case invslot::PossessionsBack: + case invslot::slotBack: return "Back"; - case invslot::PossessionsWrist1: + case invslot::slotWrist1: return "Wrist 1"; - case invslot::PossessionsWrist2: + case invslot::slotWrist2: return "Wrist 2"; - case invslot::PossessionsRange: + case invslot::slotRange: return "Range"; - case invslot::PossessionsHands: + case invslot::slotHands: return "Hands"; - case invslot::PossessionsPrimary: + case invslot::slotPrimary: return "Primary"; - case invslot::PossessionsSecondary: + case invslot::slotSecondary: return "Secondary"; - case invslot::PossessionsFinger1: + case invslot::slotFinger1: return "Finger 1"; - case invslot::PossessionsFinger2: + case invslot::slotFinger2: return "Finger 2"; - case invslot::PossessionsChest: + case invslot::slotChest: return "Chest"; - case invslot::PossessionsLegs: + case invslot::slotLegs: return "Legs"; - case invslot::PossessionsFeet: + case invslot::slotFeet: return "Feet"; - case invslot::PossessionsWaist: + case invslot::slotWaist: return "Waist"; - case invslot::PossessionsPowerSource: + case invslot::slotPowerSource: return "Power Source"; - case invslot::PossessionsAmmo: + case invslot::slotAmmo: return "Ammo"; - case invslot::PossessionsGeneral1: + case invslot::slotGeneral1: return "General 1"; - case invslot::PossessionsGeneral2: + case invslot::slotGeneral2: return "General 2"; - case invslot::PossessionsGeneral3: + case invslot::slotGeneral3: return "General 3"; - case invslot::PossessionsGeneral4: + case invslot::slotGeneral4: return "General 4"; - case invslot::PossessionsGeneral5: + case invslot::slotGeneral5: return "General 5"; - case invslot::PossessionsGeneral6: + case invslot::slotGeneral6: return "General 6"; - case invslot::PossessionsGeneral7: + case invslot::slotGeneral7: return "General 7"; - case invslot::PossessionsGeneral8: + case invslot::slotGeneral8: return "General 8"; - case invslot::PossessionsCursor: + case invslot::slotCursor: return "Cursor"; default: return "Unknown Slot"; } } -const char* SoF::invslot::GetInvCorpseSlotName(int inv_slot) +const char* SoF::invslot::GetInvCorpseSlotName(int16 inv_slot) { - if (!invtype::GetInvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid) + if (!invtype::GetInvTypeSize(invtype::typeCorpse) || inv_slot == invslot::SLOT_INVALID) return "Invalid Slot"; // needs work - if ((size_t)(inv_slot + 1) < invslot::CorpseBegin || (size_t)(inv_slot + 1) >= invslot::CorpseEnd) + if ((inv_slot + 1) < invslot::CORPSE_BEGIN || (inv_slot + 1) >= invslot::CORPSE_END) return "Unknown Slot"; static std::string ret_str; @@ -222,19 +222,19 @@ const char* SoF::invslot::GetInvCorpseSlotName(int inv_slot) return ret_str.c_str(); } -const char* SoF::invslot::GetInvSlotName(int inv_type, int inv_slot) +const char* SoF::invslot::GetInvSlotName(int16 inv_type, int16 inv_slot) { - if (inv_type == invtype::InvTypePossessions) + if (inv_type == invtype::typePossessions) return invslot::GetInvPossessionsSlotName(inv_slot); - else if (inv_type == invtype::InvTypeCorpse) + else if (inv_type == invtype::typeCorpse) return invslot::GetInvCorpseSlotName(inv_slot); - size_t type_size = invtype::GetInvTypeSize(inv_type); + int16 type_size = invtype::GetInvTypeSize(inv_type); - if (!type_size || inv_slot == invslot::InvSlotInvalid) + if (!type_size || inv_slot == invslot::SLOT_INVALID) return "Invalid Slot"; - if ((size_t)(inv_slot + 1) >= type_size) + if ((inv_slot + 1) >= type_size) return "Unknown Slot"; static std::string ret_str; @@ -243,12 +243,12 @@ const char* SoF::invslot::GetInvSlotName(int inv_type, int inv_slot) return ret_str.c_str(); } -const char* SoF::invbag::GetInvBagIndexName(int bag_index) +const char* SoF::invbag::GetInvBagIndexName(int16 bag_index) { - if (bag_index == invbag::InvBagInvalid) + if (bag_index == invbag::SLOT_INVALID) return "Invalid Bag"; - if ((size_t)bag_index >= invbag::ItemBagSize) + if (bag_index >= invbag::SLOT_COUNT) return "Unknown Bag"; static std::string ret_str; @@ -257,12 +257,12 @@ const char* SoF::invbag::GetInvBagIndexName(int bag_index) return ret_str.c_str(); } -const char* SoF::invaug::GetInvAugIndexName(int aug_index) +const char* SoF::invaug::GetInvAugIndexName(int16 aug_index) { - if (aug_index == invaug::InvAugInvalid) + if (aug_index == invaug::SOCKET_INVALID) return "Invalid Augment"; - if ((size_t)aug_index >= invaug::ItemAugSize) + if (aug_index >= invaug::SOCKET_COUNT) return "Unknown Augment"; static std::string ret_str; diff --git a/common/patches/sof_limits.h b/common/patches/sof_limits.h index d34197a90..fdc688370 100644 --- a/common/patches/sof_limits.h +++ b/common/patches/sof_limits.h @@ -27,108 +27,218 @@ namespace SoF { - enum : int { Invalid = -1, Null, Safety }; + const int16 IINVALID = -1; + const int16 INULL = 0; - enum : bool { False = false, True = true }; - - // pre-declarations namespace inventory { inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::SoF; } + const bool ConcatenateInvTypeLimbo = true; + + const bool AllowOverLevelEquipment = false; + + const bool AllowEmptyBagInBag = false; + const bool AllowClickCastFromBag = false; + } /*inventory*/ namespace invtype { inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::SoF; } - enum : int { InvTypeInvalid = -1, InvTypeBegin }; + namespace enum_ { + enum InventoryTypes : int16 { + typePossessions = INULL, + typeBank, + typeSharedBank, + typeTrade, + typeWorld, + typeLimbo, + typeTribute, + typeGuildTribute, + typeMerchant, + typeCorpse, + typeBazaar, + typeInspect, + typeViewMODPC, + typeViewMODBank, + typeViewMODSharedBank, + typeViewMODLimbo, + typeAltStorage, + typeArchived, + typeOther + }; - enum InventoryType : int { - InvTypePossessions = InvTypeBegin, - InvTypeBank, - InvTypeSharedBank, - InvTypeTrade, - InvTypeWorld, - InvTypeLimbo, - InvTypeTribute, - InvTypeGuildTribute, - InvTypeMerchant, - InvTypeCorpse, - InvTypeBazaar, - InvTypeInspect, - InvTypeViewMODPC, - InvTypeViewMODBank, - InvTypeViewMODSharedBank, - InvTypeViewMODLimbo, - InvTypeAltStorage, - InvTypeArchived, - InvTypeOther, - InvTypeCount - }; + } // namespace enum_ + using namespace enum_; + + const int16 POSSESSIONS_SIZE = 32; + const int16 BANK_SIZE = 24; + const int16 SHARED_BANK_SIZE = 2; + const int16 TRADE_SIZE = 8; + const int16 WORLD_SIZE = 10; + const int16 LIMBO_SIZE = 36; + const int16 TRIBUTE_SIZE = 5; + const int16 GUILD_TRIBUTE_SIZE = 2; + const int16 MERCHANT_SIZE = 80; + const int16 CORPSE_SIZE = POSSESSIONS_SIZE; + const int16 BAZAAR_SIZE = 80; + const int16 INSPECT_SIZE = 23; + const int16 VIEW_MOD_PC_SIZE = POSSESSIONS_SIZE; + const int16 VIEW_MOD_BANK_SIZE = BANK_SIZE; + const int16 VIEW_MOD_SHARED_BANK_SIZE = SHARED_BANK_SIZE; + const int16 VIEW_MOD_LIMBO_SIZE = LIMBO_SIZE; + const int16 ALT_STORAGE_SIZE = 0;//unknown - "Shroud Bank" + const int16 ARCHIVED_SIZE = 0;//unknown + const int16 OTHER_SIZE = 0;//unknown + + const int16 TRADE_NPC_SIZE = 4; // defined by implication + + const int16 TYPE_INVALID = IINVALID; + const int16 TYPE_BEGIN = typePossessions; + const int16 TYPE_END = typeOther; + const int16 TYPE_COUNT = (TYPE_END - TYPE_BEGIN) + 1; + + int16 GetInvTypeSize(int16 inv_type); + const char* GetInvTypeName(int16 inv_type); + + bool IsInvTypePersistent(int16 inv_type); } /*invtype*/ namespace invslot { inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::SoF; } - enum : int { InvSlotInvalid = -1, InvSlotBegin }; + namespace enum_ { + enum InventorySlots : int16 { + slotCharm = INULL, + slotEar1, + slotHead, + slotFace, + slotEar2, + slotNeck, + slotShoulders, + slotArms, + slotBack, + slotWrist1, + slotWrist2, + slotRange, + slotHands, + slotPrimary, + slotSecondary, + slotFinger1, + slotFinger2, + slotChest, + slotLegs, + slotFeet, + slotWaist, + slotPowerSource, + slotAmmo, + slotGeneral1, + slotGeneral2, + slotGeneral3, + slotGeneral4, + slotGeneral5, + slotGeneral6, + slotGeneral7, + slotGeneral8, + slotCursor + }; - enum PossessionsSlot : int { - PossessionsCharm = InvSlotBegin, - PossessionsEar1, - PossessionsHead, - PossessionsFace, - PossessionsEar2, - PossessionsNeck, - PossessionsShoulders, - PossessionsArms, - PossessionsBack, - PossessionsWrist1, - PossessionsWrist2, - PossessionsRange, - PossessionsHands, - PossessionsPrimary, - PossessionsSecondary, - PossessionsFinger1, - PossessionsFinger2, - PossessionsChest, - PossessionsLegs, - PossessionsFeet, - PossessionsWaist, - PossessionsPowerSource, - PossessionsAmmo, - PossessionsGeneral1, - PossessionsGeneral2, - PossessionsGeneral3, - PossessionsGeneral4, - PossessionsGeneral5, - PossessionsGeneral6, - PossessionsGeneral7, - PossessionsGeneral8, - PossessionsCursor, - PossessionsCount - }; + } // namespace enum_ + using namespace enum_; - const int EquipmentBegin = PossessionsCharm; - const int EquipmentEnd = PossessionsAmmo; - const int EquipmentCount = (EquipmentEnd - EquipmentBegin + 1); + const int16 SLOT_INVALID = IINVALID; + const int16 SLOT_BEGIN = INULL; - const int GeneralBegin = PossessionsGeneral1; - const int GeneralEnd = PossessionsGeneral8; - const int GeneralCount = (GeneralEnd - GeneralBegin + 1); + const int16 POSSESSIONS_BEGIN = slotCharm; + const int16 POSSESSIONS_END = slotCursor; + const int16 POSSESSIONS_COUNT = (POSSESSIONS_END - POSSESSIONS_BEGIN) + 1; + + const int16 EQUIPMENT_BEGIN = slotCharm; + const int16 EQUIPMENT_END = slotAmmo; + const int16 EQUIPMENT_COUNT = (EQUIPMENT_END - EQUIPMENT_BEGIN + 1); + + const int16 GENERAL_BEGIN = slotGeneral1; + const int16 GENERAL_END = slotGeneral8; + const int16 GENERAL_COUNT = (GENERAL_END - GENERAL_BEGIN + 1); + + const int16 BONUS_BEGIN = invslot::slotCharm; + const int16 BONUS_STAT_END = invslot::slotPowerSource; + const int16 BONUS_SKILL_END = invslot::slotAmmo; + + const int16 BANK_BEGIN = 2000; + const int16 BANK_END = (BANK_BEGIN + invtype::BANK_SIZE) - 1; + + const int16 SHARED_BANK_BEGIN = 2500; + const int16 SHARED_BANK_END = (SHARED_BANK_BEGIN + invtype::SHARED_BANK_SIZE) - 1; + + const int16 TRADE_BEGIN = 3000; + const int16 TRADE_END = (TRADE_BEGIN + invtype::TRADE_SIZE) - 1; + + const int16 TRADE_NPC_END = (TRADE_BEGIN + invtype::TRADE_NPC_SIZE) - 1; // defined by implication + + const int16 WORLD_BEGIN = 4000; + const int16 WORLD_END = (WORLD_BEGIN + invtype::WORLD_SIZE) - 1; + + const int16 TRIBUTE_BEGIN = 400; + const int16 TRIBUTE_END = (TRIBUTE_BEGIN + invtype::TRIBUTE_SIZE) - 1; + + const int16 GUILD_TRIBUTE_BEGIN = 450; + const int16 GUILD_TRIBUTE_END = (GUILD_TRIBUTE_BEGIN + invtype::GUILD_TRIBUTE_SIZE) - 1; + + const int16 CORPSE_BEGIN = invslot::slotGeneral1; + const int16 CORPSE_END = invslot::slotGeneral1 + invslot::slotCursor; + + const uint64 POSSESSIONS_BITMASK = 0x000000027FFFFFFF; // based on 34-slot count (RoF+) + const uint64 CORPSE_BITMASK = 0x01FFFFFE7F800000; // based on 34-slot count (RoF+) + + const char* GetInvPossessionsSlotName(int16 inv_slot); + const char* GetInvCorpseSlotName(int16 inv_slot); + const char* GetInvSlotName(int16 inv_type, int16 inv_slot); } /*invslot*/ namespace invbag { inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::SoF; } - enum : int { InvBagInvalid = -1, InvBagBegin }; + const int16 SLOT_INVALID = IINVALID; + const int16 SLOT_BEGIN = INULL; + const int16 SLOT_END = 9; + const int16 SLOT_COUNT = 10; + + const int16 GENERAL_BAGS_BEGIN = 262; + const int16 GENERAL_BAGS_COUNT = invslot::GENERAL_COUNT * SLOT_COUNT; + const int16 GENERAL_BAGS_END = (GENERAL_BAGS_BEGIN + GENERAL_BAGS_COUNT) - 1; + + const int16 CURSOR_BAG_BEGIN = 342; + const int16 CURSOR_BAG_COUNT = SLOT_COUNT; + const int16 CURSOR_BAG_END = (CURSOR_BAG_BEGIN + CURSOR_BAG_COUNT) - 1; + + const int16 BANK_BAGS_BEGIN = 2032; + const int16 BANK_BAGS_COUNT = (invtype::BANK_SIZE * SLOT_COUNT); + const int16 BANK_BAGS_END = (BANK_BAGS_BEGIN + BANK_BAGS_COUNT) - 1; + + const int16 SHARED_BANK_BAGS_BEGIN = 2532; + const int16 SHARED_BANK_BAGS_COUNT = invtype::SHARED_BANK_SIZE * SLOT_COUNT; + const int16 SHARED_BANK_BAGS_END = (SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_COUNT) - 1; + + const int16 TRADE_BAGS_BEGIN = 3031; + const int16 TRADE_BAGS_COUNT = invtype::TRADE_SIZE * SLOT_COUNT; + const int16 TRADE_BAGS_END = (TRADE_BAGS_BEGIN + TRADE_BAGS_COUNT) - 1; + + const char* GetInvBagIndexName(int16 bag_index); } /*invbag*/ namespace invaug { inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::SoF; } - enum : int { InvAugInvalid = -1, InvAugBegin }; + const int16 SOCKET_INVALID = IINVALID; + const int16 SOCKET_BEGIN = INULL; + const int16 SOCKET_END = 4; + const int16 SOCKET_COUNT = 5; + + const char* GetInvAugIndexName(int16 aug_index); } /*invaug*/ @@ -153,147 +263,21 @@ namespace SoF namespace profile { inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::SoF; } + const int16 BANDOLIERS_SIZE = 20; // number of bandolier instances + const int16 BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance + + const int16 POTION_BELT_SIZE = 5; + + const int16 SKILL_ARRAY_SIZE = 100; + } /*profile*/ namespace constants { inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::SoF; } - } /*constants*/ + const size_t CHARACTER_CREATION_LIMIT = 12; - namespace behavior { - inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::SoF; } - - } /*behavior*/ - - namespace skills { - inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::SoF; } - - } /*skills*/ - - - // declarations - namespace inventory { - const bool ConcatenateInvTypeLimbo = true; - - const bool AllowOverLevelEquipment = false; - - const bool AllowEmptyBagInBag = false; - const bool AllowClickCastFromBag = false; - - } /*inventory*/ - - namespace invtype { - const size_t InvTypePossessionsSize = invslot::PossessionsCount; - const size_t InvTypeBankSize = 24; - const size_t InvTypeSharedBankSize = 2; - const size_t InvTypeTradeSize = 8; - const size_t InvTypeWorldSize = 10; - const size_t InvTypeLimboSize = 36; - const size_t InvTypeTributeSize = 5; - const size_t InvTypeGuildTributeSize = 2; - const size_t InvTypeMerchantSize = 80; - const size_t InvTypeCorpseSize = InvTypePossessionsSize; - const size_t InvTypeBazaarSize = 80; - const size_t InvTypeInspectSize = invslot::EquipmentCount; - const size_t InvTypeViewMODPCSize = InvTypePossessionsSize; - const size_t InvTypeViewMODBankSize = InvTypeBankSize; - const size_t InvTypeViewMODSharedBankSize = InvTypeSharedBankSize; - const size_t InvTypeViewMODLimboSize = InvTypeLimboSize; - const size_t InvTypeAltStorageSize = 0;//unknown - "Shroud Bank" - const size_t InvTypeArchivedSize = 0;//unknown - const size_t InvTypeOtherSize = 0;//unknown - - extern size_t GetInvTypeSize(int inv_type); - extern const char* GetInvTypeName(int inv_type); - - extern bool IsInvTypePersistent(int inv_type); - - } /*invtype*/ - - namespace invslot { - const int BankBegin = 2000; - const int BankEnd = (BankBegin + invtype::InvTypeBankSize) - 1; - - const int SharedBankBegin = 2500; - const int SharedBankEnd = (SharedBankBegin + invtype::InvTypeSharedBankSize) - 1; - - const int TradeBegin = 3000; - const int TradeEnd = (TradeBegin + invtype::InvTypeTradeSize) - 1; - const int TradeNPCEnd = 3003; - - const int WorldBegin = 4000; - const int WorldEnd = (WorldBegin + invtype::InvTypeWorldSize) - 1; - - const int TributeBegin = 400; - const int TributeEnd = (TributeBegin + invtype::InvTypeTributeSize) - 1; - - const int GuildTributeBegin = 450; - const int GuildTributeEnd = (GuildTributeBegin + invtype::InvTypeGuildTributeSize) - 1; - - const int CorpseBegin = PossessionsGeneral1; - const int CorpseEnd = PossessionsGeneral1 + PossessionsCursor; - - extern const char* GetInvPossessionsSlotName(int inv_slot); - extern const char* GetInvCorpseSlotName(int inv_slot); - extern const char* GetInvSlotName(int inv_type, int inv_slot); - - } /*invslot*/ - - namespace invbag { - const size_t ItemBagSize = 10; - - const int GeneralBagsBegin = 262; - const int GeneralBagsSize = invslot::GeneralCount * ItemBagSize; - const int GeneralBagsEnd = (GeneralBagsBegin + GeneralBagsSize) - 1; - - const int CursorBagBegin = 342; - const int CursorBagSize = ItemBagSize; - const int CursorBagEnd = (CursorBagBegin + CursorBagSize) - 1; - - const int BankBagsBegin = 2032; - const int BankBagsSize = (invtype::InvTypeBankSize * ItemBagSize); - const int BankBagsEnd = (BankBagsBegin + BankBagsSize) - 1; - - const int SharedBankBagsBegin = 2532; - const int SharedBankBagsSize = invtype::InvTypeSharedBankSize * ItemBagSize; - const int SharedBankBagsEnd = (SharedBankBagsBegin + SharedBankBagsSize) - 1; - - const int TradeBagsBegin = 3031; - const int TradeBagsSize = invtype::InvTypeTradeSize * ItemBagSize; - const int TradeBagsEnd = (TradeBagsBegin + TradeBagsSize) - 1; - - extern const char* GetInvBagIndexName(int bag_index); - - } /*invbag*/ - - namespace invaug { - const size_t ItemAugSize = 5; - - extern const char* GetInvAugIndexName(int aug_index); - - } /*invaug*/ - - namespace item { - - } /*item*/ - - namespace profile { - const size_t TributeSize = invtype::InvTypeTributeSize; - const size_t GuildTributeSize = invtype::InvTypeGuildTributeSize; - - const size_t BandoliersSize = 20; // number of bandolier instances - const size_t BandolierItemCount = 4; // number of equipment slots in bandolier instance - - const size_t PotionBeltSize = 5; - - const size_t SkillArraySize = 100; - - } /*profile*/ - - namespace constants { - const size_t CharacterCreationLimit = 12; - - const size_t SayLinkBodySize = 50; + const size_t SAY_LINK_BODY_SIZE = 50; const int LongBuffs = 25; const int ShortBuffs = 15; @@ -306,11 +290,15 @@ namespace SoF } /*constants*/ namespace behavior { + inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::SoF; } + const bool CoinHasWeight = true; } /*behavior*/ namespace skills { + inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::SoF; } + const size_t LastUsableSkill = EQEmu::skills::SkillTripleAttack; } /*skills*/ diff --git a/common/patches/sof_structs.h b/common/patches/sof_structs.h index 29272a7a6..a312b48a8 100644 --- a/common/patches/sof_structs.h +++ b/common/patches/sof_structs.h @@ -717,7 +717,7 @@ struct BandolierItem_Struct struct Bandolier_Struct { char Name[32]; - BandolierItem_Struct Items[profile::BandolierItemCount]; + BandolierItem_Struct Items[profile::BANDOLIER_ITEM_COUNT]; }; //len = 72 @@ -731,7 +731,7 @@ struct PotionBeltItem_Struct //len = 288 struct PotionBelt_Struct { - PotionBeltItem_Struct Items[profile::PotionBeltSize]; + PotionBeltItem_Struct Items[profile::POTION_BELT_SIZE]; }; static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16; @@ -937,7 +937,7 @@ struct PlayerProfile_Struct //23576 Octets /*08288*/ uint32 aapoints_spent; // Number of spent AA points /*08292*/ uint32 aapoints; // Unspent AA points /*08296*/ uint8 unknown06160[4]; -/*08300*/ Bandolier_Struct bandoliers[profile::BandoliersSize]; // [6400] bandolier contents +/*08300*/ Bandolier_Struct bandoliers[profile::BANDOLIERS_SIZE]; // [6400] bandolier contents /*14700*/ PotionBelt_Struct potionbelt; // [360] potion belt 72 extra octets by adding 1 more belt slot /*15060*/ uint8 unknown12852[8]; /*15068*/ uint32 available_slots; diff --git a/common/patches/titanium.cpp b/common/patches/titanium.cpp index bf3c3d359..6d0e0dcaa 100644 --- a/common/patches/titanium.cpp +++ b/common/patches/titanium.cpp @@ -1051,18 +1051,18 @@ namespace Titanium // OUT(unknown06160[4]); // Copy bandoliers where server and client indexes converge - for (r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < profile::BandoliersSize; ++r) { + for (r = 0; r < EQEmu::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) { OUT_str(bandoliers[r].Name); - for (uint32 k = 0; k < profile::BandolierItemCount; ++k) { // Will need adjusting if 'server != client' is ever true + for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true OUT(bandoliers[r].Items[k].ID); OUT(bandoliers[r].Items[k].Icon); OUT_str(bandoliers[r].Items[k].Name); } } // Nullify bandoliers where server and client indexes diverge, with a client bias - for (r = EQEmu::legacy::BANDOLIERS_SIZE; r < profile::BandoliersSize; ++r) { + for (r = EQEmu::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) { eq->bandoliers[r].Name[0] = '\0'; - for (uint32 k = 0; k < profile::BandolierItemCount; ++k) { // Will need adjusting if 'server != client' is ever true + for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true eq->bandoliers[r].Items[k].ID = 0; eq->bandoliers[r].Items[k].Icon = 0; eq->bandoliers[r].Items[k].Name[0] = '\0'; @@ -1072,13 +1072,13 @@ namespace Titanium // OUT(unknown07444[5120]); // Copy potion belt where server and client indexes converge - for (r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < profile::PotionBeltSize; ++r) { + for (r = 0; r < EQEmu::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++r) { OUT(potionbelt.Items[r].ID); OUT(potionbelt.Items[r].Icon); OUT_str(potionbelt.Items[r].Name); } // Nullify potion belt where server and client indexes diverge, with a client bias - for (r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < profile::PotionBeltSize; ++r) { + for (r = EQEmu::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) { eq->potionbelt.Items[r].ID = 0; eq->potionbelt.Items[r].Icon = 0; eq->potionbelt.Items[r].Name[0] = '\0'; @@ -2442,7 +2442,7 @@ namespace Titanium ob << StringFormat("%.*s\"", depth, protection); // Quotes (and protection, if needed) around static data // Sub data - for (int index = EQEmu::inventory::containerBegin; index < invbag::ItemBagSize; ++index) { + for (int index = EQEmu::invbag::SLOT_BEGIN; index <= invbag::SLOT_END; ++index) { ob << '|'; EQEmu::ItemInstance* sub = inst->GetItem(index); @@ -2490,7 +2490,7 @@ namespace Titanium static inline void ServerToTitaniumSayLink(std::string& titaniumSayLink, const std::string& serverSayLink) { - if ((constants::SayLinkBodySize == EQEmu::constants::SayLinkBodySize) || (serverSayLink.find('\x12') == std::string::npos)) { + if ((constants::SAY_LINK_BODY_SIZE == EQEmu::constants::SAY_LINK_BODY_SIZE) || (serverSayLink.find('\x12') == std::string::npos)) { titaniumSayLink = serverSayLink; return; } @@ -2499,7 +2499,7 @@ namespace Titanium for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { - if (segments[segment_iter].length() <= EQEmu::constants::SayLinkBodySize) { + if (segments[segment_iter].length() <= EQEmu::constants::SAY_LINK_BODY_SIZE) { titaniumSayLink.append(segments[segment_iter]); // TODO: log size mismatch error continue; @@ -2530,7 +2530,7 @@ namespace Titanium static inline void TitaniumToServerSayLink(std::string& serverSayLink, const std::string& titaniumSayLink) { - if ((EQEmu::constants::SayLinkBodySize == constants::SayLinkBodySize) || (titaniumSayLink.find('\x12') == std::string::npos)) { + if ((EQEmu::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (titaniumSayLink.find('\x12') == std::string::npos)) { serverSayLink = titaniumSayLink; return; } @@ -2539,7 +2539,7 @@ namespace Titanium for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { - if (segments[segment_iter].length() <= constants::SayLinkBodySize) { + if (segments[segment_iter].length() <= constants::SAY_LINK_BODY_SIZE) { serverSayLink.append(segments[segment_iter]); // TODO: log size mismatch error continue; diff --git a/common/patches/titanium_limits.cpp b/common/patches/titanium_limits.cpp index 3976e8217..2cab723f0 100644 --- a/common/patches/titanium_limits.cpp +++ b/common/patches/titanium_limits.cpp @@ -22,196 +22,196 @@ #include "../string_util.h" -size_t Titanium::invtype::GetInvTypeSize(int inv_type) +int16 Titanium::invtype::GetInvTypeSize(int16 inv_type) { switch (inv_type) { - case invtype::InvTypePossessions: - return invtype::InvTypePossessionsSize; - case invtype::InvTypeBank: - return invtype::InvTypeBankSize; - case invtype::InvTypeSharedBank: - return invtype::InvTypeSharedBankSize; - case invtype::InvTypeTrade: - return invtype::InvTypeTradeSize; - case invtype::InvTypeWorld: - return invtype::InvTypeWorldSize; - case invtype::InvTypeLimbo: - return invtype::InvTypeLimboSize; - case invtype::InvTypeTribute: - return invtype::InvTypeTributeSize; - case invtype::InvTypeGuildTribute: - return invtype::InvTypeGuildTributeSize; - case invtype::InvTypeMerchant: - return invtype::InvTypeMerchantSize; - case invtype::InvTypeCorpse: - return invtype::InvTypeCorpseSize; - case invtype::InvTypeBazaar: - return invtype::InvTypeBazaarSize; - case invtype::InvTypeInspect: - return invtype::InvTypeInspectSize; - case invtype::InvTypeViewMODPC: - return invtype::InvTypeViewMODPCSize; - case invtype::InvTypeViewMODBank: - return invtype::InvTypeViewMODBankSize; - case invtype::InvTypeViewMODSharedBank: - return invtype::InvTypeViewMODSharedBankSize; - case invtype::InvTypeViewMODLimbo: - return invtype::InvTypeViewMODLimboSize; - case invtype::InvTypeAltStorage: - return invtype::InvTypeAltStorageSize; - case invtype::InvTypeArchived: - return invtype::InvTypeArchivedSize; - case invtype::InvTypeOther: - return invtype::InvTypeOtherSize; + case invtype::typePossessions: + return invtype::POSSESSIONS_SIZE; + case invtype::typeBank: + return invtype::BANK_SIZE; + case invtype::typeSharedBank: + return invtype::SHARED_BANK_SIZE; + case invtype::typeTrade: + return invtype::TRADE_SIZE; + case invtype::typeWorld: + return invtype::WORLD_SIZE; + case invtype::typeLimbo: + return invtype::LIMBO_SIZE; + case invtype::typeTribute: + return invtype::TRIBUTE_SIZE; + case invtype::typeGuildTribute: + return invtype::GUILD_TRIBUTE_SIZE; + case invtype::typeMerchant: + return invtype::MERCHANT_SIZE; + case invtype::typeCorpse: + return invtype::CORPSE_SIZE; + case invtype::typeBazaar: + return invtype::BAZAAR_SIZE; + case invtype::typeInspect: + return invtype::INSPECT_SIZE; + case invtype::typeViewMODPC: + return invtype::VIEW_MOD_PC_SIZE; + case invtype::typeViewMODBank: + return invtype::VIEW_MOD_BANK_SIZE; + case invtype::typeViewMODSharedBank: + return invtype::VIEW_MOD_SHARED_BANK_SIZE; + case invtype::typeViewMODLimbo: + return invtype::VIEW_MOD_LIMBO_SIZE; + case invtype::typeAltStorage: + return invtype::ALT_STORAGE_SIZE; + case invtype::typeArchived: + return invtype::ARCHIVED_SIZE; + case invtype::typeOther: + return invtype::OTHER_SIZE; default: - return 0; + return INULL; } } -const char* Titanium::invtype::GetInvTypeName(int inv_type) +const char* Titanium::invtype::GetInvTypeName(int16 inv_type) { switch (inv_type) { - case invtype::InvTypeInvalid: + case invtype::TYPE_INVALID: return "Invalid Type"; - case invtype::InvTypePossessions: + case invtype::typePossessions: return "Possessions"; - case invtype::InvTypeBank: + case invtype::typeBank: return "Bank"; - case invtype::InvTypeSharedBank: + case invtype::typeSharedBank: return "Shared Bank"; - case invtype::InvTypeTrade: + case invtype::typeTrade: return "Trade"; - case invtype::InvTypeWorld: + case invtype::typeWorld: return "World"; - case invtype::InvTypeLimbo: + case invtype::typeLimbo: return "Limbo"; - case invtype::InvTypeTribute: + case invtype::typeTribute: return "Tribute"; - case invtype::InvTypeGuildTribute: + case invtype::typeGuildTribute: return "Guild Tribute"; - case invtype::InvTypeMerchant: + case invtype::typeMerchant: return "Merchant"; - case invtype::InvTypeCorpse: + case invtype::typeCorpse: return "Corpse"; - case invtype::InvTypeBazaar: + case invtype::typeBazaar: return "Bazaar"; - case invtype::InvTypeInspect: + case invtype::typeInspect: return "Inspect"; - case invtype::InvTypeViewMODPC: + case invtype::typeViewMODPC: return "View MOD PC"; - case invtype::InvTypeViewMODBank: + case invtype::typeViewMODBank: return "View MOD Bank"; - case invtype::InvTypeViewMODSharedBank: + case invtype::typeViewMODSharedBank: return "View MOD Shared Bank"; - case invtype::InvTypeViewMODLimbo: + case invtype::typeViewMODLimbo: return "View MOD Limbo"; - case invtype::InvTypeAltStorage: + case invtype::typeAltStorage: return "Alt Storage"; - case invtype::InvTypeArchived: + case invtype::typeArchived: return "Archived"; - case invtype::InvTypeOther: + case invtype::typeOther: return "Other"; default: return "Unknown Type"; } } -bool Titanium::invtype::IsInvTypePersistent(int inv_type) +bool Titanium::invtype::IsInvTypePersistent(int16 inv_type) { switch (inv_type) { - case invtype::InvTypePossessions: - case invtype::InvTypeBank: - case invtype::InvTypeSharedBank: - case invtype::InvTypeTrade: - case invtype::InvTypeWorld: - case invtype::InvTypeLimbo: - case invtype::InvTypeTribute: - case invtype::InvTypeGuildTribute: + case invtype::typePossessions: + case invtype::typeBank: + case invtype::typeSharedBank: + case invtype::typeTrade: + case invtype::typeWorld: + case invtype::typeLimbo: + case invtype::typeTribute: + case invtype::typeGuildTribute: return true; default: return false; } } -const char* Titanium::invslot::GetInvPossessionsSlotName(int inv_slot) +const char* Titanium::invslot::GetInvPossessionsSlotName(int16 inv_slot) { switch (inv_slot) { - case invslot::InvSlotInvalid: + case invslot::SLOT_INVALID: return "Invalid Slot"; - case invslot::PossessionsCharm: + case invslot::slotCharm: return "Charm"; - case invslot::PossessionsEar1: + case invslot::slotEar1: return "Ear 1"; - case invslot::PossessionsHead: + case invslot::slotHead: return "Head"; - case invslot::PossessionsFace: + case invslot::slotFace: return "Face"; - case invslot::PossessionsEar2: + case invslot::slotEar2: return "Ear 2"; - case invslot::PossessionsNeck: + case invslot::slotNeck: return "Neck"; - case invslot::PossessionsShoulders: + case invslot::slotShoulders: return "Shoulders"; - case invslot::PossessionsArms: + case invslot::slotArms: return "Arms"; - case invslot::PossessionsBack: + case invslot::slotBack: return "Back"; - case invslot::PossessionsWrist1: + case invslot::slotWrist1: return "Wrist 1"; - case invslot::PossessionsWrist2: + case invslot::slotWrist2: return "Wrist 2"; - case invslot::PossessionsRange: + case invslot::slotRange: return "Range"; - case invslot::PossessionsHands: + case invslot::slotHands: return "Hands"; - case invslot::PossessionsPrimary: + case invslot::slotPrimary: return "Primary"; - case invslot::PossessionsSecondary: + case invslot::slotSecondary: return "Secondary"; - case invslot::PossessionsFinger1: + case invslot::slotFinger1: return "Finger 1"; - case invslot::PossessionsFinger2: + case invslot::slotFinger2: return "Finger 2"; - case invslot::PossessionsChest: + case invslot::slotChest: return "Chest"; - case invslot::PossessionsLegs: + case invslot::slotLegs: return "Legs"; - case invslot::PossessionsFeet: + case invslot::slotFeet: return "Feet"; - case invslot::PossessionsWaist: + case invslot::slotWaist: return "Waist"; - case invslot::PossessionsAmmo: + case invslot::slotAmmo: return "Ammo"; - case invslot::PossessionsGeneral1: + case invslot::slotGeneral1: return "General 1"; - case invslot::PossessionsGeneral2: + case invslot::slotGeneral2: return "General 2"; - case invslot::PossessionsGeneral3: + case invslot::slotGeneral3: return "General 3"; - case invslot::PossessionsGeneral4: + case invslot::slotGeneral4: return "General 4"; - case invslot::PossessionsGeneral5: + case invslot::slotGeneral5: return "General 5"; - case invslot::PossessionsGeneral6: + case invslot::slotGeneral6: return "General 6"; - case invslot::PossessionsGeneral7: + case invslot::slotGeneral7: return "General 7"; - case invslot::PossessionsGeneral8: + case invslot::slotGeneral8: return "General 8"; - case invslot::PossessionsCursor: + case invslot::slotCursor: return "Cursor"; default: return "Unknown Slot"; } } -const char* Titanium::invslot::GetInvCorpseSlotName(int inv_slot) +const char* Titanium::invslot::GetInvCorpseSlotName(int16 inv_slot) { - if (!invtype::GetInvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid) + if (!invtype::GetInvTypeSize(invtype::typeCorpse) || inv_slot == invslot::SLOT_INVALID) return "Invalid Slot"; // needs work - if ((size_t)(inv_slot + 1) < invslot::CorpseBegin || (size_t)(inv_slot + 1) >= invslot::CorpseEnd) + if ((inv_slot + 1) < invslot::CORPSE_BEGIN || (inv_slot + 1) >= invslot::CORPSE_END) return "Unknown Slot"; static std::string ret_str; @@ -220,19 +220,19 @@ const char* Titanium::invslot::GetInvCorpseSlotName(int inv_slot) return ret_str.c_str(); } -const char* Titanium::invslot::GetInvSlotName(int inv_type, int inv_slot) +const char* Titanium::invslot::GetInvSlotName(int16 inv_type, int16 inv_slot) { - if (inv_type == invtype::InvTypePossessions) + if (inv_type == invtype::typePossessions) return invslot::GetInvPossessionsSlotName(inv_slot); - else if (inv_type == invtype::InvTypeCorpse) + else if (inv_type == invtype::typeCorpse) return invslot::GetInvCorpseSlotName(inv_slot); - size_t type_size = invtype::GetInvTypeSize(inv_type); + int16 type_size = invtype::GetInvTypeSize(inv_type); - if (!type_size || inv_slot == invslot::InvSlotInvalid) + if (!type_size || inv_slot == invslot::SLOT_INVALID) return "Invalid Slot"; - if ((size_t)(inv_slot + 1) >= type_size) + if ((inv_slot + 1) >= type_size) return "Unknown Slot"; static std::string ret_str; @@ -241,12 +241,12 @@ const char* Titanium::invslot::GetInvSlotName(int inv_type, int inv_slot) return ret_str.c_str(); } -const char* Titanium::invbag::GetInvBagIndexName(int bag_index) +const char* Titanium::invbag::GetInvBagIndexName(int16 bag_index) { - if (bag_index == invbag::InvBagInvalid) + if (bag_index == invbag::SLOT_INVALID) return "Invalid Bag"; - if ((size_t)bag_index >= invbag::ItemBagSize) + if (bag_index >= invbag::SLOT_COUNT) return "Unknown Bag"; static std::string ret_str; @@ -255,12 +255,12 @@ const char* Titanium::invbag::GetInvBagIndexName(int bag_index) return ret_str.c_str(); } -const char* Titanium::invaug::GetInvAugIndexName(int aug_index) +const char* Titanium::invaug::GetInvAugIndexName(int16 aug_index) { - if (aug_index == invaug::InvAugInvalid) + if (aug_index == invaug::SOCKET_INVALID) return "Invalid Augment"; - if ((size_t)aug_index >= invaug::ItemAugSize) + if (aug_index >= invaug::SOCKET_COUNT) return "Unknown Augment"; static std::string ret_str; diff --git a/common/patches/titanium_limits.h b/common/patches/titanium_limits.h index 3266ade6f..cd69c21e1 100644 --- a/common/patches/titanium_limits.h +++ b/common/patches/titanium_limits.h @@ -27,107 +27,217 @@ namespace Titanium { - enum : int { Invalid = -1, Null, Safety }; + const int16 IINVALID = -1; + const int16 INULL = 0; - enum : bool { False = false, True = true }; - - // pre-declarations namespace inventory { inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::Titanium; } + const bool ConcatenateInvTypeLimbo = true; + + const bool AllowOverLevelEquipment = false; + + const bool AllowEmptyBagInBag = false; + const bool AllowClickCastFromBag = false; + } /*inventory*/ namespace invtype { inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::Titanium; } - enum : int { InvTypeInvalid = -1, InvTypeBegin }; + namespace enum_ { + enum InventoryTypes : int16 { + typePossessions = INULL, + typeBank, + typeSharedBank, + typeTrade, + typeWorld, + typeLimbo, + typeTribute, + typeGuildTribute, + typeMerchant, + typeCorpse, + typeBazaar, + typeInspect, + typeViewMODPC, + typeViewMODBank, + typeViewMODSharedBank, + typeViewMODLimbo, + typeAltStorage, + typeArchived, + typeOther + }; - enum InventoryType : int { - InvTypePossessions = InvTypeBegin, - InvTypeBank, - InvTypeSharedBank, - InvTypeTrade, - InvTypeWorld, - InvTypeLimbo, - InvTypeTribute, - InvTypeGuildTribute, - InvTypeMerchant, - InvTypeCorpse, - InvTypeBazaar, - InvTypeInspect, - InvTypeViewMODPC, - InvTypeViewMODBank, - InvTypeViewMODSharedBank, - InvTypeViewMODLimbo, - InvTypeAltStorage, - InvTypeArchived, - InvTypeOther, - InvTypeCount - }; + } // namespace enum_ + using namespace enum_; + + const int16 POSSESSIONS_SIZE = 31; + const int16 BANK_SIZE = 16; + const int16 SHARED_BANK_SIZE = 2; + const int16 TRADE_SIZE = 8; + const int16 WORLD_SIZE = 10; + const int16 LIMBO_SIZE = 36; + const int16 TRIBUTE_SIZE = 5; + const int16 GUILD_TRIBUTE_SIZE = 2; + const int16 MERCHANT_SIZE = 80; + const int16 CORPSE_SIZE = POSSESSIONS_SIZE; + const int16 BAZAAR_SIZE = 80; + const int16 INSPECT_SIZE = 22; + const int16 VIEW_MOD_PC_SIZE = POSSESSIONS_SIZE; + const int16 VIEW_MOD_BANK_SIZE = BANK_SIZE; + const int16 VIEW_MOD_SHARED_BANK_SIZE = SHARED_BANK_SIZE; + const int16 VIEW_MOD_LIMBO_SIZE = LIMBO_SIZE; + const int16 ALT_STORAGE_SIZE = 0;//unknown - "Shroud Bank" + const int16 ARCHIVED_SIZE = 0;//unknown + const int16 OTHER_SIZE = 0;//unknown + + const int16 TRADE_NPC_SIZE = 4; // defined by implication + + const int16 TYPE_INVALID = IINVALID; + const int16 TYPE_BEGIN = typePossessions; + const int16 TYPE_END = typeOther; + const int16 TYPE_COUNT = (TYPE_END - TYPE_BEGIN) + 1; + + int16 GetInvTypeSize(int16 inv_type); + const char* GetInvTypeName(int16 inv_type); + + bool IsInvTypePersistent(int16 inv_type); } /*invtype*/ namespace invslot { inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::Titanium; } - enum : int { InvSlotInvalid = -1, InvSlotBegin }; + namespace enum_ { + enum InventorySlots : int16 { + slotCharm = INULL, + slotEar1, + slotHead, + slotFace, + slotEar2, + slotNeck, + slotShoulders, + slotArms, + slotBack, + slotWrist1, + slotWrist2, + slotRange, + slotHands, + slotPrimary, + slotSecondary, + slotFinger1, + slotFinger2, + slotChest, + slotLegs, + slotFeet, + slotWaist, + slotAmmo, + slotGeneral1, + slotGeneral2, + slotGeneral3, + slotGeneral4, + slotGeneral5, + slotGeneral6, + slotGeneral7, + slotGeneral8, + slotCursor + }; - enum PossessionsSlot : int { - PossessionsCharm = InvSlotBegin, - PossessionsEar1, - PossessionsHead, - PossessionsFace, - PossessionsEar2, - PossessionsNeck, - PossessionsShoulders, - PossessionsArms, - PossessionsBack, - PossessionsWrist1, - PossessionsWrist2, - PossessionsRange, - PossessionsHands, - PossessionsPrimary, - PossessionsSecondary, - PossessionsFinger1, - PossessionsFinger2, - PossessionsChest, - PossessionsLegs, - PossessionsFeet, - PossessionsWaist, - PossessionsAmmo, - PossessionsGeneral1, - PossessionsGeneral2, - PossessionsGeneral3, - PossessionsGeneral4, - PossessionsGeneral5, - PossessionsGeneral6, - PossessionsGeneral7, - PossessionsGeneral8, - PossessionsCursor, - PossessionsCount - }; + } // namespace enum_ + using namespace enum_; - const int EquipmentBegin = PossessionsCharm; - const int EquipmentEnd = PossessionsAmmo; - const int EquipmentCount = (EquipmentEnd - EquipmentBegin + 1); + const int16 SLOT_INVALID = IINVALID; + const int16 SLOT_BEGIN = INULL; - const int GeneralBegin = PossessionsGeneral1; - const int GeneralEnd = PossessionsGeneral8; - const int GeneralCount = (GeneralEnd - GeneralBegin + 1); + const int16 POSSESSIONS_BEGIN = slotCharm; + const int16 POSSESSIONS_END = slotCursor; + const int16 POSSESSIONS_COUNT = (POSSESSIONS_END - POSSESSIONS_BEGIN) + 1; + + const int16 EQUIPMENT_BEGIN = slotCharm; + const int16 EQUIPMENT_END = slotAmmo; + const int16 EQUIPMENT_COUNT = (EQUIPMENT_END - EQUIPMENT_BEGIN + 1); + + const int16 GENERAL_BEGIN = slotGeneral1; + const int16 GENERAL_END = slotGeneral8; + const int16 GENERAL_COUNT = (GENERAL_END - GENERAL_BEGIN + 1); + + const int16 BONUS_BEGIN = invslot::slotCharm; + const int16 BONUS_STAT_END = invslot::slotWaist; + const int16 BONUS_SKILL_END = invslot::slotAmmo; + + const int16 BANK_BEGIN = 2000; + const int16 BANK_END = (BANK_BEGIN + invtype::BANK_SIZE) - 1; + + const int16 SHARED_BANK_BEGIN = 2500; + const int16 SHARED_BANK_END = (SHARED_BANK_BEGIN + invtype::SHARED_BANK_SIZE) - 1; + + const int16 TRADE_BEGIN = 3000; + const int16 TRADE_END = (TRADE_BEGIN + invtype::TRADE_SIZE) - 1; + + const int16 TRADE_NPC_END = (TRADE_BEGIN + invtype::TRADE_NPC_SIZE) - 1; // defined by implication + + const int16 WORLD_BEGIN = 4000; + const int16 WORLD_END = (WORLD_BEGIN + invtype::WORLD_SIZE) - 1; + + const int16 TRIBUTE_BEGIN = 400; + const int16 TRIBUTE_END = (TRIBUTE_BEGIN + invtype::TRIBUTE_SIZE) - 1; + + const int16 GUILD_TRIBUTE_BEGIN = 450; + const int16 GUILD_TRIBUTE_END = (GUILD_TRIBUTE_BEGIN + invtype::GUILD_TRIBUTE_SIZE) - 1; + + const int16 CORPSE_BEGIN = invslot::slotGeneral1; + const int16 CORPSE_END = invslot::slotGeneral1 + invslot::slotCursor; + + const uint64 POSSESSIONS_BITMASK = 0x000000027FDFFFFF; // based on 34-slot count (RoF+) + const uint64 CORPSE_BITMASK = 0x017FFFFE7F800000; // based on 34-slot count (RoF+) + + const char* GetInvPossessionsSlotName(int16 inv_slot); + const char* GetInvCorpseSlotName(int16 inv_slot); + const char* GetInvSlotName(int16 inv_type, int16 inv_slot); } /*invslot*/ namespace invbag { inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::Titanium; } - enum : int { InvBagInvalid = -1, InvBagBegin }; + const int16 SLOT_INVALID = IINVALID; + const int16 SLOT_BEGIN = INULL; + const int16 SLOT_END = 9; + const int16 SLOT_COUNT = 10; + + const int16 GENERAL_BAGS_BEGIN = 251; + const int16 GENERAL_BAGS_COUNT = invslot::GENERAL_COUNT * SLOT_COUNT; + const int16 GENERAL_BAGS_END = (GENERAL_BAGS_BEGIN + GENERAL_BAGS_COUNT) - 1; + + const int16 CURSOR_BAG_BEGIN = 331; + const int16 CURSOR_BAG_COUNT = SLOT_COUNT; + const int16 CURSOR_BAG_END = (CURSOR_BAG_BEGIN + CURSOR_BAG_COUNT) - 1; + + const int16 BANK_BAGS_BEGIN = 2031; + const int16 BANK_BAGS_COUNT = (invtype::BANK_SIZE * SLOT_COUNT); + const int16 BANK_BAGS_END = (BANK_BAGS_BEGIN + BANK_BAGS_COUNT) - 1; + + const int16 SHARED_BANK_BAGS_BEGIN = 2531; + const int16 SHARED_BANK_BAGS_COUNT = invtype::SHARED_BANK_SIZE * SLOT_COUNT; + const int16 SHARED_BANK_BAGS_END = (SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_COUNT) - 1; + + const int16 TRADE_BAGS_BEGIN = 3031; + const int16 TRADE_BAGS_COUNT = invtype::TRADE_SIZE * SLOT_COUNT; + const int16 TRADE_BAGS_END = (TRADE_BAGS_BEGIN + TRADE_BAGS_COUNT) - 1; + + const char* GetInvBagIndexName(int16 bag_index); } /*invbag*/ namespace invaug { inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::Titanium; } - enum : int { InvAugInvalid = -1, InvAugBegin }; + const int16 SOCKET_INVALID = IINVALID; + const int16 SOCKET_BEGIN = INULL; + const int16 SOCKET_END = 4; + const int16 SOCKET_COUNT = 5; + + const char* GetInvAugIndexName(int16 aug_index); } /*invaug*/ @@ -152,147 +262,21 @@ namespace Titanium namespace profile { inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::Titanium; } + const int16 BANDOLIERS_SIZE = 4; // number of bandolier instances + const int16 BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance + + const int16 POTION_BELT_SIZE = 4; + + const int16 SKILL_ARRAY_SIZE = 100; + } /*profile*/ namespace constants { inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::Titanium; } - } /*constants*/ + const size_t CHARACTER_CREATION_LIMIT = 8; // Hard-coded in client - DO NOT ALTER - namespace behavior { - inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::Titanium; } - - } /*behavior*/ - - namespace skills { - inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::Titanium; } - - } /*skills*/ - - - // declarations - namespace inventory { - const bool ConcatenateInvTypeLimbo = true; - - const bool AllowOverLevelEquipment = false; - - const bool AllowEmptyBagInBag = false; - const bool AllowClickCastFromBag = false; - - } /*inventory*/ - - namespace invtype { - const size_t InvTypePossessionsSize = invslot::PossessionsCount; - const size_t InvTypeBankSize = 16; - const size_t InvTypeSharedBankSize = 2; - const size_t InvTypeTradeSize = 8; - const size_t InvTypeWorldSize = 10; - const size_t InvTypeLimboSize = 36; - const size_t InvTypeTributeSize = 5; - const size_t InvTypeGuildTributeSize = 2; - const size_t InvTypeMerchantSize = 80; - const size_t InvTypeCorpseSize = InvTypePossessionsSize; - const size_t InvTypeBazaarSize = 80; - const size_t InvTypeInspectSize = invslot::EquipmentCount; - const size_t InvTypeViewMODPCSize = InvTypePossessionsSize; - const size_t InvTypeViewMODBankSize = InvTypeBankSize; - const size_t InvTypeViewMODSharedBankSize = InvTypeSharedBankSize; - const size_t InvTypeViewMODLimboSize = InvTypeLimboSize; - const size_t InvTypeAltStorageSize = 0;//unknown - "Shroud Bank" - const size_t InvTypeArchivedSize = 0;//unknown - const size_t InvTypeOtherSize = 0;//unknown - - extern size_t GetInvTypeSize(int inv_type); - extern const char* GetInvTypeName(int inv_type); - - extern bool IsInvTypePersistent(int inv_type); - - } /*invtype*/ - - namespace invslot { - const int BankBegin = 2000; - const int BankEnd = (BankBegin + invtype::InvTypeBankSize) - 1; - - const int SharedBankBegin = 2500; - const int SharedBankEnd = (SharedBankBegin + invtype::InvTypeSharedBankSize) - 1; - - const int TradeBegin = 3000; - const int TradeEnd = (TradeBegin + invtype::InvTypeTradeSize) - 1; - const int TradeNPCEnd = 3003; - - const int WorldBegin = 4000; - const int WorldEnd = (WorldBegin + invtype::InvTypeWorldSize) - 1; - - const int TributeBegin = 400; - const int TributeEnd = (TributeBegin + invtype::InvTypeTributeSize) - 1; - - const int GuildTributeBegin = 450; - const int GuildTributeEnd = (GuildTributeBegin + invtype::InvTypeGuildTributeSize) - 1; - - const int CorpseBegin = PossessionsGeneral1; - const int CorpseEnd = PossessionsGeneral1 + PossessionsCursor; - - extern const char* GetInvPossessionsSlotName(int inv_slot); - extern const char* GetInvCorpseSlotName(int inv_slot); - extern const char* GetInvSlotName(int inv_type, int inv_slot); - - } /*invslot*/ - - namespace invbag { - const size_t ItemBagSize = 10; - - const int GeneralBagsBegin = 251; - const int GeneralBagsSize = invslot::GeneralCount * ItemBagSize; - const int GeneralBagsEnd = (GeneralBagsBegin + GeneralBagsSize) - 1; - - const int CursorBagBegin = 331; - const int CursorBagSize = ItemBagSize; - const int CursorBagEnd = (CursorBagBegin + CursorBagSize) - 1; - - const int BankBagsBegin = 2031; - const int BankBagsSize = (invtype::InvTypeBankSize * ItemBagSize); - const int BankBagsEnd = (BankBagsBegin + BankBagsSize) - 1; - - const int SharedBankBagsBegin = 2531; - const int SharedBankBagsSize = invtype::InvTypeSharedBankSize * ItemBagSize; - const int SharedBankBagsEnd = (SharedBankBagsBegin + SharedBankBagsSize) - 1; - - const int TradeBagsBegin = 3031; - const int TradeBagsSize = invtype::InvTypeTradeSize * ItemBagSize; - const int TradeBagsEnd = (TradeBagsBegin + TradeBagsSize) - 1; - - extern const char* GetInvBagIndexName(int bag_index); - - } /*invbag*/ - - namespace invaug { - const size_t ItemAugSize = 5; - - extern const char* GetInvAugIndexName(int aug_index); - - } /*invaug*/ - - namespace item { - - } /*item*/ - - namespace profile { - const size_t TributeSize = invtype::InvTypeTributeSize; - const size_t GuildTributeSize = invtype::InvTypeGuildTributeSize; - - const size_t BandoliersSize = 4; // number of bandolier instances - const size_t BandolierItemCount = 4; // number of equipment slots in bandolier instance - - const size_t PotionBeltSize = 4; - - const size_t SkillArraySize = 100; - - } /*profile*/ - - namespace constants { - const size_t CharacterCreationLimit = 8; // Hard-coded in client - DO NOT ALTER - - const size_t SayLinkBodySize = 45; + const size_t SAY_LINK_BODY_SIZE = 45; const int LongBuffs = 25; const int ShortBuffs = 12; @@ -305,11 +289,15 @@ namespace Titanium } /*constants*/ namespace behavior { + inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::Titanium; } + const bool CoinHasWeight = true; } /*behavior*/ namespace skills { + inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::Titanium; } + const size_t LastUsableSkill = EQEmu::skills::SkillFrenzy; } /*skills*/ diff --git a/common/patches/titanium_structs.h b/common/patches/titanium_structs.h index 9f2d9423d..8cf202e31 100644 --- a/common/patches/titanium_structs.h +++ b/common/patches/titanium_structs.h @@ -655,7 +655,7 @@ struct BandolierItem_Struct struct Bandolier_Struct { char Name[32]; - BandolierItem_Struct Items[profile::BandolierItemCount]; + BandolierItem_Struct Items[profile::BANDOLIER_ITEM_COUNT]; }; //len = 72 @@ -669,7 +669,7 @@ struct PotionBeltItem_Struct //len = 288 struct PotionBelt_Struct { - PotionBeltItem_Struct Items[profile::PotionBeltSize]; + PotionBeltItem_Struct Items[profile::POTION_BELT_SIZE]; }; static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16; @@ -875,7 +875,7 @@ struct PlayerProfile_Struct /*06152*/ uint32 aapoints_spent; // Number of spent AA points /*06156*/ uint32 aapoints; // Unspent AA points /*06160*/ uint8 unknown06160[4]; -/*06164*/ Bandolier_Struct bandoliers[profile::BandoliersSize]; // bandolier contents +/*06164*/ Bandolier_Struct bandoliers[profile::BANDOLIERS_SIZE]; // bandolier contents /*07444*/ uint8 unknown07444[5120]; /*12564*/ PotionBelt_Struct potionbelt; // potion belt /*12852*/ uint8 unknown12852[8]; diff --git a/common/patches/uf.cpp b/common/patches/uf.cpp index 79fdca333..a947c65ff 100644 --- a/common/patches/uf.cpp +++ b/common/patches/uf.cpp @@ -1881,18 +1881,18 @@ namespace UF // OUT(unknown06160[4]); // Copy bandoliers where server and client indexes converge - for (r = 0; r < EQEmu::legacy::BANDOLIERS_SIZE && r < profile::BandoliersSize; ++r) { + for (r = 0; r < EQEmu::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) { OUT_str(bandoliers[r].Name); - for (uint32 k = 0; k < profile::BandolierItemCount; ++k) { // Will need adjusting if 'server != client' is ever true + for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true OUT(bandoliers[r].Items[k].ID); OUT(bandoliers[r].Items[k].Icon); OUT_str(bandoliers[r].Items[k].Name); } } // Nullify bandoliers where server and client indexes diverge, with a client bias - for (r = EQEmu::legacy::BANDOLIERS_SIZE; r < profile::BandoliersSize; ++r) { + for (r = EQEmu::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) { eq->bandoliers[r].Name[0] = '\0'; - for (uint32 k = 0; k < profile::BandolierItemCount; ++k) { // Will need adjusting if 'server != client' is ever true + for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true eq->bandoliers[r].Items[k].ID = 0; eq->bandoliers[r].Items[k].Icon = 0; eq->bandoliers[r].Items[k].Name[0] = '\0'; @@ -1902,13 +1902,13 @@ namespace UF // OUT(unknown07444[5120]); // Copy potion belt where server and client indexes converge - for (r = 0; r < EQEmu::legacy::POTION_BELT_ITEM_COUNT && r < profile::PotionBeltSize; ++r) { + for (r = 0; r < EQEmu::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++r) { OUT(potionbelt.Items[r].ID); OUT(potionbelt.Items[r].Icon); OUT_str(potionbelt.Items[r].Name); } // Nullify potion belt where server and client indexes diverge, with a client bias - for (r = EQEmu::legacy::POTION_BELT_ITEM_COUNT; r < profile::PotionBeltSize; ++r) { + for (r = EQEmu::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) { eq->potionbelt.Items[r].ID = 0; eq->potionbelt.Items[r].Icon = 0; eq->potionbelt.Items[r].Name[0] = '\0'; @@ -2217,8 +2217,8 @@ namespace UF eq->CharCount = emu->CharCount; eq->TotalChars = emu->TotalChars; - if (eq->TotalChars > constants::CharacterCreationLimit) - eq->TotalChars = constants::CharacterCreationLimit; + if (eq->TotalChars > constants::CHARACTER_CREATION_LIMIT) + eq->TotalChars = constants::CHARACTER_CREATION_LIMIT; // Special Underfoot adjustment - field should really be 'AdditionalChars' or 'BonusChars' uint32 adjusted_total = eq->TotalChars - 8; // Yes, it rolls under for '< 8' - probably an int32 field @@ -2234,7 +2234,7 @@ namespace UF size_t names_length = 0; size_t character_count = 0; - for (; character_count < emu->CharCount && character_count < constants::CharacterCreationLimit; ++character_count) { + for (; character_count < emu->CharCount && character_count < constants::CHARACTER_CREATION_LIMIT; ++character_count) { emu_cse = (CharacterSelectEntry_Struct *)emu_ptr; names_length += strlen(emu_cse->Name); emu_ptr += sizeof(CharacterSelectEntry_Struct); @@ -2250,8 +2250,8 @@ namespace UF eq->CharCount = character_count; eq->TotalChars = emu->TotalChars; - if (eq->TotalChars > constants::CharacterCreationLimit) - eq->TotalChars = constants::CharacterCreationLimit; + if (eq->TotalChars > constants::CHARACTER_CREATION_LIMIT) + eq->TotalChars = constants::CHARACTER_CREATION_LIMIT; // Special Underfoot adjustment - field should really be 'AdditionalChars' or 'BonusChars' in this client uint32 adjusted_total = eq->TotalChars - 8; // Yes, it rolls under for '< 8' - probably an int32 field @@ -3918,7 +3918,7 @@ namespace UF ibs.nodrop = item->NoDrop; ibs.attune = item->Attuneable; ibs.size = item->Size; - ibs.slots = SwapBits21and22(item->Slots); + ibs.slots = SwapBits21And22(item->Slots); ibs.price = item->Price; ibs.icon = item->Icon; ibs.unknown1 = 1; @@ -4008,7 +4008,7 @@ namespace UF isbs.augtype = item->AugType; isbs.augrestrict = item->AugRestrict; - for (int index = 0; index < invaug::ItemAugSize; ++index) { + for (int index = invaug::SOCKET_BEGIN; index <= invaug::SOCKET_END; ++index) { isbs.augslots[index].type = item->AugSlotType[index]; isbs.augslots[index].visible = item->AugSlotVisible[index]; isbs.augslots[index].unknown = item->AugSlotUnk2[index]; @@ -4204,18 +4204,18 @@ namespace UF ob.write((const char*)&subitem_count, sizeof(uint32)); - for (uint32 index = EQEmu::inventory::containerBegin; index < EQEmu::inventory::ContainerCount; ++index) { + for (uint32 index = EQEmu::invbag::SLOT_BEGIN; index <= EQEmu::invbag::SLOT_END; ++index) { EQEmu::ItemInstance* sub = inst->GetItem(index); if (!sub) continue; int SubSlotNumber = INVALID_INDEX; - if (slot_id_in >= EQEmu::legacy::GENERAL_BEGIN && slot_id_in <= EQEmu::legacy::GENERAL_END) - SubSlotNumber = (((slot_id_in + 3) * EQEmu::inventory::ContainerCount) + index + 1); - else if (slot_id_in >= EQEmu::legacy::BANK_BEGIN && slot_id_in <= EQEmu::legacy::BANK_END) - SubSlotNumber = (((slot_id_in - EQEmu::legacy::BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::BANK_BAGS_BEGIN + index); - else if (slot_id_in >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::legacy::SHARED_BANK_END) - SubSlotNumber = (((slot_id_in - EQEmu::legacy::SHARED_BANK_BEGIN) * EQEmu::inventory::ContainerCount) + EQEmu::legacy::SHARED_BANK_BAGS_BEGIN + index); + if (slot_id_in >= EQEmu::invslot::GENERAL_BEGIN && slot_id_in <= EQEmu::invslot::GENERAL_END) + SubSlotNumber = (((slot_id_in + 3) * EQEmu::invbag::SLOT_COUNT) + index + 1); + else if (slot_id_in >= EQEmu::invslot::BANK_BEGIN && slot_id_in <= EQEmu::invslot::BANK_END) + SubSlotNumber = (((slot_id_in - EQEmu::invslot::BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::BANK_BAGS_BEGIN + index); + else if (slot_id_in >= EQEmu::invslot::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::invslot::SHARED_BANK_END) + SubSlotNumber = (((slot_id_in - EQEmu::invslot::SHARED_BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + index); else SubSlotNumber = slot_id_in; @@ -4233,16 +4233,16 @@ namespace UF { uint32 UnderfootSlot = 0; - if (serverSlot >= EQEmu::inventory::slotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots + if (serverSlot >= EQEmu::invslot::slotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots UnderfootSlot = serverSlot + 1; - else if (serverSlot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::legacy::CURSOR_BAG_END) + else if (serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::invbag::CURSOR_BAG_END) UnderfootSlot = serverSlot + 11; - else if (serverSlot >= EQEmu::legacy::BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::BANK_BAGS_END) + else if (serverSlot >= EQEmu::invbag::BANK_BAGS_BEGIN && serverSlot <= EQEmu::invbag::BANK_BAGS_END) UnderfootSlot = serverSlot + 1; - else if (serverSlot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::legacy::SHARED_BANK_BAGS_END) + else if (serverSlot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::invbag::SHARED_BANK_BAGS_END) UnderfootSlot = serverSlot + 1; - else if (serverSlot == EQEmu::inventory::slotPowerSource) - UnderfootSlot = invslot::PossessionsPowerSource; + else if (serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE) + UnderfootSlot = invslot::slotPowerSource; else UnderfootSlot = serverSlot; @@ -4259,16 +4259,16 @@ namespace UF { uint32 ServerSlot = 0; - if (ufSlot >= invslot::PossessionsAmmo && ufSlot <= invslot::CorpseEnd) // Cursor/Ammo/Power Source and Normal Inventory Slots + if (ufSlot >= invslot::slotAmmo && ufSlot <= invslot::CORPSE_END) // Cursor/Ammo/Power Source and Normal Inventory Slots ServerSlot = ufSlot - 1; - else if (ufSlot >= invbag::GeneralBagsBegin && ufSlot <= invbag::CursorBagEnd) + else if (ufSlot >= invbag::GENERAL_BAGS_BEGIN && ufSlot <= invbag::CURSOR_BAG_END) ServerSlot = ufSlot - 11; - else if (ufSlot >= invbag::BankBagsBegin && ufSlot <= invbag::BankBagsEnd) + else if (ufSlot >= invbag::BANK_BAGS_BEGIN && ufSlot <= invbag::BANK_BAGS_END) ServerSlot = ufSlot - 1; - else if (ufSlot >= invbag::SharedBankBagsBegin && ufSlot <= invbag::SharedBankBagsEnd) + else if (ufSlot >= invbag::SHARED_BANK_BAGS_BEGIN && ufSlot <= invbag::SHARED_BANK_BAGS_END) ServerSlot = ufSlot - 1; - else if (ufSlot == invslot::PossessionsPowerSource) - ServerSlot = EQEmu::inventory::slotPowerSource; + else if (ufSlot == invslot::slotPowerSource) + ServerSlot = EQEmu::invslot::SLOT_POWER_SOURCE; else ServerSlot = ufSlot; @@ -4283,7 +4283,7 @@ namespace UF static inline void ServerToUFSayLink(std::string& ufSayLink, const std::string& serverSayLink) { - if ((constants::SayLinkBodySize == EQEmu::constants::SayLinkBodySize) || (serverSayLink.find('\x12') == std::string::npos)) { + if ((constants::SAY_LINK_BODY_SIZE == EQEmu::constants::SAY_LINK_BODY_SIZE) || (serverSayLink.find('\x12') == std::string::npos)) { ufSayLink = serverSayLink; return; } @@ -4292,7 +4292,7 @@ namespace UF for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { - if (segments[segment_iter].length() <= EQEmu::constants::SayLinkBodySize) { + if (segments[segment_iter].length() <= EQEmu::constants::SAY_LINK_BODY_SIZE) { ufSayLink.append(segments[segment_iter]); // TODO: log size mismatch error continue; @@ -4323,7 +4323,7 @@ namespace UF static inline void UFToServerSayLink(std::string& serverSayLink, const std::string& ufSayLink) { - if ((EQEmu::constants::SayLinkBodySize == constants::SayLinkBodySize) || (ufSayLink.find('\x12') == std::string::npos)) { + if ((EQEmu::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (ufSayLink.find('\x12') == std::string::npos)) { serverSayLink = ufSayLink; return; } @@ -4332,7 +4332,7 @@ namespace UF for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { - if (segments[segment_iter].length() <= constants::SayLinkBodySize) { + if (segments[segment_iter].length() <= constants::SAY_LINK_BODY_SIZE) { serverSayLink.append(segments[segment_iter]); // TODO: log size mismatch error continue; diff --git a/common/patches/uf_limits.cpp b/common/patches/uf_limits.cpp index ae415ddd8..7cf5ec63e 100644 --- a/common/patches/uf_limits.cpp +++ b/common/patches/uf_limits.cpp @@ -22,198 +22,198 @@ #include "../string_util.h" -size_t UF::invtype::GetInvTypeSize(int inv_type) +int16 UF::invtype::GetInvTypeSize(int16 inv_type) { switch (inv_type) { - case invtype::InvTypePossessions: - return invtype::InvTypePossessionsSize; - case invtype::InvTypeBank: - return invtype::InvTypeBankSize; - case invtype::InvTypeSharedBank: - return invtype::InvTypeSharedBankSize; - case invtype::InvTypeTrade: - return invtype::InvTypeTradeSize; - case invtype::InvTypeWorld: - return invtype::InvTypeWorldSize; - case invtype::InvTypeLimbo: - return invtype::InvTypeLimboSize; - case invtype::InvTypeTribute: - return invtype::InvTypeTributeSize; - case invtype::InvTypeGuildTribute: - return invtype::InvTypeGuildTributeSize; - case invtype::InvTypeMerchant: - return invtype::InvTypeMerchantSize; - case invtype::InvTypeCorpse: - return invtype::InvTypeCorpseSize; - case invtype::InvTypeBazaar: - return invtype::InvTypeBazaarSize; - case invtype::InvTypeInspect: - return invtype::InvTypeInspectSize; - case invtype::InvTypeViewMODPC: - return invtype::InvTypeViewMODPCSize; - case invtype::InvTypeViewMODBank: - return invtype::InvTypeViewMODBankSize; - case invtype::InvTypeViewMODSharedBank: - return invtype::InvTypeViewMODSharedBankSize; - case invtype::InvTypeViewMODLimbo: - return invtype::InvTypeViewMODLimboSize; - case invtype::InvTypeAltStorage: - return invtype::InvTypeAltStorageSize; - case invtype::InvTypeArchived: - return invtype::InvTypeArchivedSize; - case invtype::InvTypeOther: - return invtype::InvTypeOtherSize; + case invtype::typePossessions: + return invtype::POSSESSIONS_SIZE; + case invtype::typeBank: + return invtype::BANK_SIZE; + case invtype::typeSharedBank: + return invtype::SHARED_BANK_SIZE; + case invtype::typeTrade: + return invtype::TRADE_SIZE; + case invtype::typeWorld: + return invtype::WORLD_SIZE; + case invtype::typeLimbo: + return invtype::LIMBO_SIZE; + case invtype::typeTribute: + return invtype::TRIBUTE_SIZE; + case invtype::typeGuildTribute: + return invtype::GUILD_TRIBUTE_SIZE; + case invtype::typeMerchant: + return invtype::MERCHANT_SIZE; + case invtype::typeCorpse: + return invtype::CORPSE_SIZE; + case invtype::typeBazaar: + return invtype::BAZAAR_SIZE; + case invtype::typeInspect: + return invtype::INSPECT_SIZE; + case invtype::typeViewMODPC: + return invtype::VIEW_MOD_PC_SIZE; + case invtype::typeViewMODBank: + return invtype::VIEW_MOD_BANK_SIZE; + case invtype::typeViewMODSharedBank: + return invtype::VIEW_MOD_SHARED_BANK_SIZE; + case invtype::typeViewMODLimbo: + return invtype::VIEW_MOD_LIMBO_SIZE; + case invtype::typeAltStorage: + return invtype::ALT_STORAGE_SIZE; + case invtype::typeArchived: + return invtype::ARCHIVED_SIZE; + case invtype::typeOther: + return invtype::OTHER_SIZE; default: - return 0; + return INULL; } } -const char* UF::invtype::GetInvTypeName(int inv_type) +const char* UF::invtype::GetInvTypeName(int16 inv_type) { switch (inv_type) { - case invtype::InvTypeInvalid: + case invtype::TYPE_INVALID: return "Invalid Type"; - case invtype::InvTypePossessions: + case invtype::typePossessions: return "Possessions"; - case invtype::InvTypeBank: + case invtype::typeBank: return "Bank"; - case invtype::InvTypeSharedBank: + case invtype::typeSharedBank: return "Shared Bank"; - case invtype::InvTypeTrade: + case invtype::typeTrade: return "Trade"; - case invtype::InvTypeWorld: + case invtype::typeWorld: return "World"; - case invtype::InvTypeLimbo: + case invtype::typeLimbo: return "Limbo"; - case invtype::InvTypeTribute: + case invtype::typeTribute: return "Tribute"; - case invtype::InvTypeGuildTribute: + case invtype::typeGuildTribute: return "Guild Tribute"; - case invtype::InvTypeMerchant: + case invtype::typeMerchant: return "Merchant"; - case invtype::InvTypeCorpse: + case invtype::typeCorpse: return "Corpse"; - case invtype::InvTypeBazaar: + case invtype::typeBazaar: return "Bazaar"; - case invtype::InvTypeInspect: + case invtype::typeInspect: return "Inspect"; - case invtype::InvTypeViewMODPC: + case invtype::typeViewMODPC: return "View MOD PC"; - case invtype::InvTypeViewMODBank: + case invtype::typeViewMODBank: return "View MOD Bank"; - case invtype::InvTypeViewMODSharedBank: + case invtype::typeViewMODSharedBank: return "View MOD Shared Bank"; - case invtype::InvTypeViewMODLimbo: + case invtype::typeViewMODLimbo: return "View MOD Limbo"; - case invtype::InvTypeAltStorage: + case invtype::typeAltStorage: return "Alt Storage"; - case invtype::InvTypeArchived: + case invtype::typeArchived: return "Archived"; - case invtype::InvTypeOther: + case invtype::typeOther: return "Other"; default: return "Unknown Type"; } } -bool UF::invtype::IsInvTypePersistent(int inv_type) +bool UF::invtype::IsInvTypePersistent(int16 inv_type) { switch (inv_type) { - case invtype::InvTypePossessions: - case invtype::InvTypeBank: - case invtype::InvTypeSharedBank: - case invtype::InvTypeTrade: - case invtype::InvTypeWorld: - case invtype::InvTypeLimbo: - case invtype::InvTypeTribute: - case invtype::InvTypeGuildTribute: + case invtype::typePossessions: + case invtype::typeBank: + case invtype::typeSharedBank: + case invtype::typeTrade: + case invtype::typeWorld: + case invtype::typeLimbo: + case invtype::typeTribute: + case invtype::typeGuildTribute: return true; default: return false; } } -const char* UF::invslot::GetInvPossessionsSlotName(int inv_slot) +const char* UF::invslot::GetInvPossessionsSlotName(int16 inv_slot) { switch (inv_slot) { - case invslot::InvSlotInvalid: + case invslot::SLOT_INVALID: return "Invalid Slot"; - case invslot::PossessionsCharm: + case invslot::slotCharm: return "Charm"; - case invslot::PossessionsEar1: + case invslot::slotEar1: return "Ear 1"; - case invslot::PossessionsHead: + case invslot::slotHead: return "Head"; - case invslot::PossessionsFace: + case invslot::slotFace: return "Face"; - case invslot::PossessionsEar2: + case invslot::slotEar2: return "Ear 2"; - case invslot::PossessionsNeck: + case invslot::slotNeck: return "Neck"; - case invslot::PossessionsShoulders: + case invslot::slotShoulders: return "Shoulders"; - case invslot::PossessionsArms: + case invslot::slotArms: return "Arms"; - case invslot::PossessionsBack: + case invslot::slotBack: return "Back"; - case invslot::PossessionsWrist1: + case invslot::slotWrist1: return "Wrist 1"; - case invslot::PossessionsWrist2: + case invslot::slotWrist2: return "Wrist 2"; - case invslot::PossessionsRange: + case invslot::slotRange: return "Range"; - case invslot::PossessionsHands: + case invslot::slotHands: return "Hands"; - case invslot::PossessionsPrimary: + case invslot::slotPrimary: return "Primary"; - case invslot::PossessionsSecondary: + case invslot::slotSecondary: return "Secondary"; - case invslot::PossessionsFinger1: + case invslot::slotFinger1: return "Finger 1"; - case invslot::PossessionsFinger2: + case invslot::slotFinger2: return "Finger 2"; - case invslot::PossessionsChest: + case invslot::slotChest: return "Chest"; - case invslot::PossessionsLegs: + case invslot::slotLegs: return "Legs"; - case invslot::PossessionsFeet: + case invslot::slotFeet: return "Feet"; - case invslot::PossessionsWaist: + case invslot::slotWaist: return "Waist"; - case invslot::PossessionsPowerSource: + case invslot::slotPowerSource: return "Power Source"; - case invslot::PossessionsAmmo: + case invslot::slotAmmo: return "Ammo"; - case invslot::PossessionsGeneral1: + case invslot::slotGeneral1: return "General 1"; - case invslot::PossessionsGeneral2: + case invslot::slotGeneral2: return "General 2"; - case invslot::PossessionsGeneral3: + case invslot::slotGeneral3: return "General 3"; - case invslot::PossessionsGeneral4: + case invslot::slotGeneral4: return "General 4"; - case invslot::PossessionsGeneral5: + case invslot::slotGeneral5: return "General 5"; - case invslot::PossessionsGeneral6: + case invslot::slotGeneral6: return "General 6"; - case invslot::PossessionsGeneral7: + case invslot::slotGeneral7: return "General 7"; - case invslot::PossessionsGeneral8: + case invslot::slotGeneral8: return "General 8"; - case invslot::PossessionsCursor: + case invslot::slotCursor: return "Cursor"; default: return "Unknown Slot"; } } -const char* UF::invslot::GetInvCorpseSlotName(int inv_slot) +const char* UF::invslot::GetInvCorpseSlotName(int16 inv_slot) { - if (!invtype::GetInvTypeSize(invtype::InvTypeCorpse) || inv_slot == invslot::InvSlotInvalid) + if (!invtype::GetInvTypeSize(invtype::typeCorpse) || inv_slot == invslot::SLOT_INVALID) return "Invalid Slot"; // needs work - if ((size_t)(inv_slot + 1) < invslot::CorpseBegin || (size_t)(inv_slot + 1) >= invslot::CorpseEnd) + if ((inv_slot + 1) < invslot::CORPSE_BEGIN || (inv_slot + 1) >= invslot::CORPSE_END) return "Unknown Slot"; static std::string ret_str; @@ -222,19 +222,19 @@ const char* UF::invslot::GetInvCorpseSlotName(int inv_slot) return ret_str.c_str(); } -const char* UF::invslot::GetInvSlotName(int inv_type, int inv_slot) +const char* UF::invslot::GetInvSlotName(int16 inv_type, int16 inv_slot) { - if (inv_type == invtype::InvTypePossessions) + if (inv_type == invtype::typePossessions) return invslot::GetInvPossessionsSlotName(inv_slot); - else if (inv_type == invtype::InvTypeCorpse) + else if (inv_type == invtype::typeCorpse) return invslot::GetInvCorpseSlotName(inv_slot); - size_t type_size = invtype::GetInvTypeSize(inv_type); + int16 type_size = invtype::GetInvTypeSize(inv_type); - if (!type_size || inv_slot == invslot::InvSlotInvalid) + if (!type_size || inv_slot == invslot::SLOT_INVALID) return "Invalid Slot"; - if ((size_t)(inv_slot + 1) >= type_size) + if ((inv_slot + 1) >= type_size) return "Unknown Slot"; static std::string ret_str; @@ -243,12 +243,12 @@ const char* UF::invslot::GetInvSlotName(int inv_type, int inv_slot) return ret_str.c_str(); } -const char* UF::invbag::GetInvBagIndexName(int bag_index) +const char* UF::invbag::GetInvBagIndexName(int16 bag_index) { - if (bag_index == invbag::InvBagInvalid) + if (bag_index == invbag::SLOT_INVALID) return "Invalid Bag"; - if ((size_t)bag_index >= invbag::ItemBagSize) + if (bag_index >= invbag::SLOT_COUNT) return "Unknown Bag"; static std::string ret_str; @@ -257,12 +257,12 @@ const char* UF::invbag::GetInvBagIndexName(int bag_index) return ret_str.c_str(); } -const char* UF::invaug::GetInvAugIndexName(int aug_index) +const char* UF::invaug::GetInvAugIndexName(int16 aug_index) { - if (aug_index == invaug::InvAugInvalid) + if (aug_index == invaug::SOCKET_INVALID) return "Invalid Augment"; - if ((size_t)aug_index >= invaug::ItemAugSize) + if (aug_index >= invaug::SOCKET_COUNT) return "Unknown Augment"; static std::string ret_str; diff --git a/common/patches/uf_limits.h b/common/patches/uf_limits.h index 719fcc394..52924f94d 100644 --- a/common/patches/uf_limits.h +++ b/common/patches/uf_limits.h @@ -27,109 +27,219 @@ namespace UF { - enum : int { Invalid = -1, Null, Safety }; + const int16 IINVALID = -1; + const int16 INULL = 0; - enum : bool { False = false, True = true }; - - // pre-declarations namespace inventory { inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::UF; } + const bool ConcatenateInvTypeLimbo = true; + + const bool AllowOverLevelEquipment = true; + + const bool AllowEmptyBagInBag = false; + const bool AllowClickCastFromBag = false; + } /*inventory*/ namespace invtype { inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::UF; } - enum : int { InvTypeInvalid = -1, InvTypeBegin }; + namespace enum_ { + enum InventoryTypes : int16 { + typePossessions = INULL, + typeBank, + typeSharedBank, + typeTrade, + typeWorld, + typeLimbo, + typeTribute, + typeGuildTribute, + typeMerchant, + typeCorpse, + typeBazaar, + typeInspect, + typeViewMODPC, + typeViewMODBank, + typeViewMODSharedBank, + typeViewMODLimbo, + typeAltStorage, + typeArchived, + typeOther + }; - enum InventoryType : int { - InvTypePossessions = InvTypeBegin, - InvTypeBank, - InvTypeSharedBank, - InvTypeTrade, - InvTypeWorld, - InvTypeLimbo, - InvTypeTribute, - InvTypeGuildTribute, - InvTypeMerchant, - InvTypeCorpse, - InvTypeBazaar, - InvTypeInspect, - InvTypeViewMODPC, - InvTypeViewMODBank, - InvTypeViewMODSharedBank, - InvTypeViewMODLimbo, - InvTypeAltStorage, - InvTypeArchived, - InvTypeOther, - InvTypeCount - }; + } // namespace enum_ + using namespace enum_; + + const int16 POSSESSIONS_SIZE = 32; + const int16 BANK_SIZE = 24; + const int16 SHARED_BANK_SIZE = 2; + const int16 TRADE_SIZE = 8; + const int16 WORLD_SIZE = 10; + const int16 LIMBO_SIZE = 36; + const int16 TRIBUTE_SIZE = 5; + const int16 GUILD_TRIBUTE_SIZE = 2; + const int16 MERCHANT_SIZE = 80; + const int16 CORPSE_SIZE = POSSESSIONS_SIZE; + const int16 BAZAAR_SIZE = 80; + const int16 INSPECT_SIZE = 23; + const int16 VIEW_MOD_PC_SIZE = POSSESSIONS_SIZE; + const int16 VIEW_MOD_BANK_SIZE = BANK_SIZE; + const int16 VIEW_MOD_SHARED_BANK_SIZE = SHARED_BANK_SIZE; + const int16 VIEW_MOD_LIMBO_SIZE = LIMBO_SIZE; + const int16 ALT_STORAGE_SIZE = 0;//unknown - "Shroud Bank" + const int16 ARCHIVED_SIZE = 0;//unknown + const int16 OTHER_SIZE = 0;//unknown + + const int16 TRADE_NPC_SIZE = 4; // defined by implication + + const int16 TYPE_INVALID = IINVALID; + const int16 TYPE_BEGIN = typePossessions; + const int16 TYPE_END = typeOther; + const int16 TYPE_COUNT = (TYPE_END - TYPE_BEGIN) + 1; + + int16 GetInvTypeSize(int16 inv_type); + const char* GetInvTypeName(int16 inv_type); + + bool IsInvTypePersistent(int16 inv_type); } /*invtype*/ namespace invslot { inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::UF; } - enum : int { InvSlotInvalid = -1, InvSlotBegin }; + namespace enum_ { + enum InventorySlots : int16 { + slotCharm = INULL, + slotEar1, + slotHead, + slotFace, + slotEar2, + slotNeck, + slotShoulders, + slotArms, + slotBack, + slotWrist1, + slotWrist2, + slotRange, + slotHands, + slotPrimary, + slotSecondary, + slotFinger1, + slotFinger2, + slotChest, + slotLegs, + slotFeet, + slotWaist, + slotPowerSource, + slotAmmo, + slotGeneral1, + slotGeneral2, + slotGeneral3, + slotGeneral4, + slotGeneral5, + slotGeneral6, + slotGeneral7, + slotGeneral8, + slotCursor + }; - enum PossessionsSlot : int { - PossessionsCharm = InvSlotBegin, - PossessionsEar1, - PossessionsHead, - PossessionsFace, - PossessionsEar2, - PossessionsNeck, - PossessionsShoulders, - PossessionsArms, - PossessionsBack, - PossessionsWrist1, - PossessionsWrist2, - PossessionsRange, - PossessionsHands, - PossessionsPrimary, - PossessionsSecondary, - PossessionsFinger1, - PossessionsFinger2, - PossessionsChest, - PossessionsLegs, - PossessionsFeet, - PossessionsWaist, - PossessionsPowerSource, - PossessionsAmmo, - PossessionsGeneral1, - PossessionsGeneral2, - PossessionsGeneral3, - PossessionsGeneral4, - PossessionsGeneral5, - PossessionsGeneral6, - PossessionsGeneral7, - PossessionsGeneral8, - PossessionsCursor, - PossessionsCount - }; + } // namespace enum_ + using namespace enum_; - const int EquipmentBegin = PossessionsCharm; - const int EquipmentEnd = PossessionsAmmo; - const int EquipmentCount = (EquipmentEnd - EquipmentBegin + 1); + const int16 SLOT_INVALID = IINVALID; + const int16 SLOT_BEGIN = INULL; - const int GeneralBegin = PossessionsGeneral1; - const int GeneralEnd = PossessionsGeneral8; - const int GeneralCount = (GeneralEnd - GeneralBegin + 1); + const int16 POSSESSIONS_BEGIN = slotCharm; + const int16 POSSESSIONS_END = slotCursor; + const int16 POSSESSIONS_COUNT = (POSSESSIONS_END - POSSESSIONS_BEGIN) + 1; + + const int16 EQUIPMENT_BEGIN = slotCharm; + const int16 EQUIPMENT_END = slotAmmo; + const int16 EQUIPMENT_COUNT = (EQUIPMENT_END - EQUIPMENT_BEGIN + 1); + + const int16 GENERAL_BEGIN = slotGeneral1; + const int16 GENERAL_END = slotGeneral8; + const int16 GENERAL_COUNT = (GENERAL_END - GENERAL_BEGIN + 1); + + const int16 BONUS_BEGIN = invslot::slotCharm; + const int16 BONUS_STAT_END = invslot::slotPowerSource; + const int16 BONUS_SKILL_END = invslot::slotAmmo; + + const int16 BANK_BEGIN = 2000; + const int16 BANK_END = (BANK_BEGIN + invtype::BANK_SIZE) - 1; + + const int16 SHARED_BANK_BEGIN = 2500; + const int16 SHARED_BANK_END = (SHARED_BANK_BEGIN + invtype::SHARED_BANK_SIZE) - 1; + + const int16 TRADE_BEGIN = 3000; + const int16 TRADE_END = (TRADE_BEGIN + invtype::TRADE_SIZE) - 1; + + const int16 TRADE_NPC_END = (TRADE_BEGIN + invtype::TRADE_NPC_SIZE) - 1; // defined by implication + + const int16 WORLD_BEGIN = 4000; + const int16 WORLD_END = (WORLD_BEGIN + invtype::WORLD_SIZE) - 1; + + const int16 TRIBUTE_BEGIN = 400; + const int16 TRIBUTE_END = (TRIBUTE_BEGIN + invtype::TRIBUTE_SIZE) - 1; + + const int16 GUILD_TRIBUTE_BEGIN = 450; + const int16 GUILD_TRIBUTE_END = (GUILD_TRIBUTE_BEGIN + invtype::GUILD_TRIBUTE_SIZE) - 1; + + const int16 CORPSE_BEGIN = invslot::slotGeneral1; + const int16 CORPSE_END = invslot::slotGeneral1 + invslot::slotCursor; + + const uint64 POSSESSIONS_BITMASK = 0x000000027FFFFFFF; // based on 34-slot count (RoF+) + const uint64 CORPSE_BITMASK = 0x01FFFFFE7F800000; // based on 34-slot count (RoF+) + + const char* GetInvPossessionsSlotName(int16 inv_slot); + const char* GetInvCorpseSlotName(int16 inv_slot); + const char* GetInvSlotName(int16 inv_type, int16 inv_slot); } /*invslot*/ namespace invbag { inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::UF; } - enum : int { InvBagInvalid = -1, InvBagBegin }; + const int16 SLOT_INVALID = IINVALID; + const int16 SLOT_BEGIN = INULL; + const int16 SLOT_END = 9; + const int16 SLOT_COUNT = 10; + + const int16 GENERAL_BAGS_BEGIN = 262; + const int16 GENERAL_BAGS_COUNT = invslot::GENERAL_COUNT * SLOT_COUNT; + const int16 GENERAL_BAGS_END = (GENERAL_BAGS_BEGIN + GENERAL_BAGS_COUNT) - 1; + + const int16 CURSOR_BAG_BEGIN = 342; + const int16 CURSOR_BAG_COUNT = SLOT_COUNT; + const int16 CURSOR_BAG_END = (CURSOR_BAG_BEGIN + CURSOR_BAG_COUNT) - 1; + + const int16 BANK_BAGS_BEGIN = 2032; + const int16 BANK_BAGS_COUNT = (invtype::BANK_SIZE * SLOT_COUNT); + const int16 BANK_BAGS_END = (BANK_BAGS_BEGIN + BANK_BAGS_COUNT) - 1; + + const int16 SHARED_BANK_BAGS_BEGIN = 2532; + const int16 SHARED_BANK_BAGS_COUNT = invtype::SHARED_BANK_SIZE * SLOT_COUNT; + const int16 SHARED_BANK_BAGS_END = (SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_COUNT) - 1; + + const int16 TRADE_BAGS_BEGIN = 3031; + const int16 TRADE_BAGS_COUNT = invtype::TRADE_SIZE * SLOT_COUNT; + const int16 TRADE_BAGS_END = (TRADE_BAGS_BEGIN + TRADE_BAGS_COUNT) - 1; + + const char* GetInvBagIndexName(int16 bag_index); } /*invbag*/ namespace invaug { inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::UF; } - enum : int { InvAugInvalid = -1, InvAugBegin }; + const int16 SOCKET_INVALID = IINVALID; + const int16 SOCKET_BEGIN = INULL; + const int16 SOCKET_END = 4; + const int16 SOCKET_COUNT = 5; + const char* GetInvAugIndexName(int16 aug_index); + } /*invaug*/ namespace item { @@ -154,147 +264,21 @@ namespace UF namespace profile { inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::UF; } + const int16 BANDOLIERS_SIZE = 20; // number of bandolier instances + const int16 BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance + + const int16 POTION_BELT_SIZE = 5; + + const int16 SKILL_ARRAY_SIZE = 100; + } /*profile*/ namespace constants { inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::UF; } - } /*constants*/ + const size_t CHARACTER_CREATION_LIMIT = 12; - namespace behavior { - inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::UF; } - - } /*behavior*/ - - namespace skills { - inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::UF; } - - } /*skills*/ - - - // declarations - namespace inventory { - const bool ConcatenateInvTypeLimbo = true; - - const bool AllowOverLevelEquipment = true; - - const bool AllowEmptyBagInBag = false; - const bool AllowClickCastFromBag = false; - - } /*inventory*/ - - namespace invtype { - const size_t InvTypePossessionsSize = invslot::PossessionsCount; - const size_t InvTypeBankSize = 24; - const size_t InvTypeSharedBankSize = 2; - const size_t InvTypeTradeSize = 8; - const size_t InvTypeWorldSize = 10; - const size_t InvTypeLimboSize = 36; - const size_t InvTypeTributeSize = 5; - const size_t InvTypeGuildTributeSize = 2; - const size_t InvTypeMerchantSize = 80; - const size_t InvTypeCorpseSize = InvTypePossessionsSize; - const size_t InvTypeBazaarSize = 80; - const size_t InvTypeInspectSize = invslot::EquipmentCount; - const size_t InvTypeViewMODPCSize = InvTypePossessionsSize; - const size_t InvTypeViewMODBankSize = InvTypeBankSize; - const size_t InvTypeViewMODSharedBankSize = InvTypeSharedBankSize; - const size_t InvTypeViewMODLimboSize = InvTypeLimboSize; - const size_t InvTypeAltStorageSize = 0;//unknown - "Shroud Bank" - const size_t InvTypeArchivedSize = 0;//unknown - const size_t InvTypeOtherSize = 0;//unknown - - extern size_t GetInvTypeSize(int inv_type); - extern const char* GetInvTypeName(int inv_type); - - extern bool IsInvTypePersistent(int inv_type); - - } /*invtype*/ - - namespace invslot { - const int BankBegin = 2000; - const int BankEnd = (BankBegin + invtype::InvTypeBankSize) - 1; - - const int SharedBankBegin = 2500; - const int SharedBankEnd = (SharedBankBegin + invtype::InvTypeSharedBankSize) - 1; - - const int TradeBegin = 3000; - const int TradeEnd = (TradeBegin + invtype::InvTypeTradeSize) - 1; - const int TradeNPCEnd = 3003; - - const int WorldBegin = 4000; - const int WorldEnd = (WorldBegin + invtype::InvTypeWorldSize) - 1; - - const int TributeBegin = 400; - const int TributeEnd = (TributeBegin + invtype::InvTypeTributeSize) - 1; - - const int GuildTributeBegin = 450; - const int GuildTributeEnd = (GuildTributeBegin + invtype::InvTypeGuildTributeSize) - 1; - - const int CorpseBegin = invslot::PossessionsGeneral1; - const int CorpseEnd = invslot::PossessionsGeneral1 + invslot::PossessionsCursor; - - extern const char* GetInvPossessionsSlotName(int inv_slot); - extern const char* GetInvCorpseSlotName(int inv_slot); - extern const char* GetInvSlotName(int inv_type, int inv_slot); - - } /*invslot*/ - - namespace invbag { - const size_t ItemBagSize = 10; - - const int GeneralBagsBegin = 262; - const int GeneralBagsSize = invslot::GeneralCount * ItemBagSize; - const int GeneralBagsEnd = (GeneralBagsBegin + GeneralBagsSize) - 1; - - const int CursorBagBegin = 342; - const int CursorBagSize = ItemBagSize; - const int CursorBagEnd = (CursorBagBegin + CursorBagSize) - 1; - - const int BankBagsBegin = 2032; - const int BankBagsSize = (invtype::InvTypeBankSize * ItemBagSize); - const int BankBagsEnd = (BankBagsBegin + BankBagsSize) - 1; - - const int SharedBankBagsBegin = 2532; - const int SharedBankBagsSize = invtype::InvTypeSharedBankSize * ItemBagSize; - const int SharedBankBagsEnd = (SharedBankBagsBegin + SharedBankBagsSize) - 1; - - const int TradeBagsBegin = 3031; - const int TradeBagsSize = invtype::InvTypeTradeSize * ItemBagSize; - const int TradeBagsEnd = (TradeBagsBegin + TradeBagsSize) - 1; - - extern const char* GetInvBagIndexName(int bag_index); - - } /*invbag*/ - - namespace invaug { - const size_t ItemAugSize = 5; - - extern const char* GetInvAugIndexName(int aug_index); - - } /*invaug*/ - - namespace item { - - } /*item*/ - - namespace profile { - const size_t TributeSize = invtype::InvTypeTributeSize; - const size_t GuildTributeSize = invtype::InvTypeGuildTributeSize; - - const size_t BandoliersSize = 20; // number of bandolier instances - const size_t BandolierItemCount = 4; // number of equipment slots in bandolier instance - - const size_t PotionBeltSize = 5; - - const size_t SkillArraySize = 100; - - } /*profile*/ - - namespace constants { - const size_t CharacterCreationLimit = 12; - - const size_t SayLinkBodySize = 50; + const size_t SAY_LINK_BODY_SIZE = 50; const int LongBuffs = 30; const int ShortBuffs = 20; @@ -307,11 +291,15 @@ namespace UF } /*constants*/ namespace behavior { + inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::UF; } + const bool CoinHasWeight = false; } /*behavior*/ namespace skills { + inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::UF; } + const size_t LastUsableSkill = EQEmu::skills::SkillTripleAttack; } /*skills*/ diff --git a/common/patches/uf_structs.h b/common/patches/uf_structs.h index dc66afd43..02361cf1f 100644 --- a/common/patches/uf_structs.h +++ b/common/patches/uf_structs.h @@ -746,7 +746,7 @@ struct BandolierItem_Struct struct Bandolier_Struct { char Name[32]; - BandolierItem_Struct Items[profile::BandolierItemCount]; + BandolierItem_Struct Items[profile::BANDOLIER_ITEM_COUNT]; }; //len = 72 @@ -760,7 +760,7 @@ struct PotionBeltItem_Struct //len = 288 struct PotionBelt_Struct { - PotionBeltItem_Struct Items[profile::PotionBeltSize]; + PotionBeltItem_Struct Items[profile::POTION_BELT_SIZE]; }; static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16; @@ -969,7 +969,7 @@ struct PlayerProfile_Struct /*11236*/ uint32 aapoints_spent; // Number of spent AA points /*11240*/ uint32 aapoints; // Unspent AA points /*11244*/ uint8 unknown11244[4]; -/*11248*/ Bandolier_Struct bandoliers[profile::BandoliersSize]; // [6400] bandolier contents +/*11248*/ Bandolier_Struct bandoliers[profile::BANDOLIERS_SIZE]; // [6400] bandolier contents /*17648*/ PotionBelt_Struct potionbelt; // [360] potion belt 72 extra octets by adding 1 more belt slot /*18008*/ uint8 unknown18008[8]; /*18016*/ uint32 available_slots; diff --git a/common/say_link.cpp b/common/say_link.cpp index e2b43c107..a215bdc46 100644 --- a/common/say_link.cpp +++ b/common/say_link.cpp @@ -29,7 +29,7 @@ bool EQEmu::saylink::DegenerateLinkBody(SayLinkBody_Struct& say_link_body_struct, const std::string& say_link_body) { memset(&say_link_body_struct, 0, sizeof(say_link_body_struct)); - if (say_link_body.length() != EQEmu::constants::SayLinkBodySize) + if (say_link_body.length() != EQEmu::constants::SAY_LINK_BODY_SIZE) return false; say_link_body_struct.action_id = (uint8)strtol(say_link_body.substr(0, 1).c_str(), nullptr, 16); @@ -68,7 +68,7 @@ bool EQEmu::saylink::GenerateLinkBody(std::string& say_link_body, const SayLinkB (0xFFFFFFFF & say_link_body_struct.hash) ); - if (say_link_body.length() != EQEmu::constants::SayLinkBodySize) + if (say_link_body.length() != EQEmu::constants::SAY_LINK_BODY_SIZE) return false; return true; @@ -88,25 +88,25 @@ const std::string& EQEmu::SayLinkEngine::GenerateLink() generate_body(); generate_text(); - if ((m_LinkBody.length() == EQEmu::constants::SayLinkBodySize) && (m_LinkText.length() > 0)) { + if ((m_LinkBody.length() == EQEmu::constants::SAY_LINK_BODY_SIZE) && (m_LinkText.length() > 0)) { m_Link.push_back(0x12); m_Link.append(m_LinkBody); m_Link.append(m_LinkText); m_Link.push_back(0x12); } - if ((m_Link.length() == 0) || (m_Link.length() > (EQEmu::constants::SayLinkMaximumSize))) { + if ((m_Link.length() == 0) || (m_Link.length() > (EQEmu::constants::SAY_LINK_MAXIMUM_SIZE))) { m_Error = true; m_Link = ""; Log(Logs::General, Logs::Error, "SayLinkEngine::GenerateLink() failed to generate a useable say link"); Log(Logs::General, Logs::Error, ">> LinkType: %i, Lengths: {link: %u(%u), body: %u(%u), text: %u(%u)}", m_LinkType, m_Link.length(), - EQEmu::constants::SayLinkMaximumSize, + EQEmu::constants::SAY_LINK_MAXIMUM_SIZE, m_LinkBody.length(), - EQEmu::constants::SayLinkBodySize, + EQEmu::constants::SAY_LINK_BODY_SIZE, m_LinkText.length(), - EQEmu::constants::SayLinkTextSize + EQEmu::constants::SAY_LINK_TEXT_SIZE ); Log(Logs::General, Logs::Error, ">> LinkBody: %s", m_LinkBody.c_str()); Log(Logs::General, Logs::Error, ">> LinkText: %s", m_LinkText.c_str()); diff --git a/common/shareddb.cpp b/common/shareddb.cpp index a4c6e54d1..00fdaea96 100644 --- a/common/shareddb.cpp +++ b/common/shareddb.cpp @@ -151,8 +151,8 @@ bool SharedDatabase::SaveCursor(uint32 char_id, std::list: std::string query = StringFormat("DELETE FROM inventory WHERE charid = %i " "AND ((slotid >= 8000 AND slotid <= 8999) " "OR slotid = %i OR (slotid >= %i AND slotid <= %i) )", - char_id, EQEmu::inventory::slotCursor, - EQEmu::legacy::CURSOR_BAG_BEGIN, EQEmu::legacy::CURSOR_BAG_END); + char_id, EQEmu::invslot::slotCursor, + EQEmu::invbag::CURSOR_BAG_BEGIN, EQEmu::invbag::CURSOR_BAG_END); auto results = QueryDatabase(query); if (!results.Success()) { std::cout << "Clearing cursor failed: " << results.ErrorMessage() << std::endl; @@ -163,7 +163,7 @@ bool SharedDatabase::SaveCursor(uint32 char_id, std::list: for(auto it = start; it != end; ++it, i++) { if (i > 8999) { break; } // shouldn't be anything in the queue that indexes this high EQEmu::ItemInstance *inst = *it; - int16 use_slot = (i == 8000) ? EQEmu::inventory::slotCursor : i; + int16 use_slot = (i == 8000) ? EQEmu::invslot::slotCursor : i; if (!SaveInventory(char_id, inst, use_slot)) { return false; } @@ -208,10 +208,12 @@ bool SharedDatabase::VerifyInventory(uint32 account_id, int16 slot_id, const EQE bool SharedDatabase::SaveInventory(uint32 char_id, const EQEmu::ItemInstance* inst, int16 slot_id) { //never save tribute slots: - if (slot_id >= EQEmu::legacy::TRIBUTE_BEGIN && slot_id <= EQEmu::legacy::TRIBUTE_END) + if (slot_id >= EQEmu::invslot::TRIBUTE_BEGIN && slot_id <= EQEmu::invslot::TRIBUTE_END) + return true; + if (slot_id >= EQEmu::invslot::GUILD_TRIBUTE_BEGIN && slot_id <= EQEmu::invslot::GUILD_TRIBUTE_END) return true; - if (slot_id >= EQEmu::legacy::SHARED_BANK_BEGIN && slot_id <= EQEmu::legacy::SHARED_BANK_BAGS_END) { + if (slot_id >= EQEmu::invslot::SHARED_BANK_BEGIN && slot_id <= EQEmu::invbag::SHARED_BANK_BAGS_END) { // Shared bank inventory if (!inst) { return DeleteSharedBankSlot(char_id, slot_id); @@ -238,9 +240,9 @@ bool SharedDatabase::SaveInventory(uint32 char_id, const EQEmu::ItemInstance* in bool SharedDatabase::UpdateInventorySlot(uint32 char_id, const EQEmu::ItemInstance* inst, int16 slot_id) { // need to check 'inst' argument for valid pointer - uint32 augslot[EQEmu::inventory::SocketCount] = { 0, 0, 0, 0, 0, 0 }; + uint32 augslot[EQEmu::invaug::SOCKET_COUNT] = { 0, 0, 0, 0, 0, 0 }; if (inst->IsClassCommon()) { - for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) { + for (int i = EQEmu::invaug::SOCKET_BEGIN; i <= EQEmu::invaug::SOCKET_END; i++) { EQEmu::ItemInstance *auginst = inst->GetItem(i); augslot[i] = (auginst && auginst->GetItem()) ? auginst->GetItem()->ID : 0; } @@ -270,7 +272,7 @@ bool SharedDatabase::UpdateInventorySlot(uint32 char_id, const EQEmu::ItemInstan if (inst->IsClassBag() && EQEmu::InventoryProfile::SupportsContainers(slot_id)) // Limiting to bag slot count will get rid of 'hidden' duplicated items and 'Invalid Slot ID' // messages through attrition (and the modded code in SaveInventory) - for (uint8 idx = EQEmu::inventory::containerBegin; idx < inst->GetItem()->BagSlots && idx < EQEmu::inventory::ContainerCount; idx++) { + for (uint8 idx = EQEmu::invbag::SLOT_BEGIN; idx < inst->GetItem()->BagSlots && idx <= EQEmu::invbag::SLOT_END; idx++) { const EQEmu::ItemInstance* baginst = inst->GetItem(idx); SaveInventory(char_id, baginst, EQEmu::InventoryProfile::CalcSlotId(slot_id, idx)); } @@ -285,9 +287,9 @@ bool SharedDatabase::UpdateInventorySlot(uint32 char_id, const EQEmu::ItemInstan bool SharedDatabase::UpdateSharedBankSlot(uint32 char_id, const EQEmu::ItemInstance* inst, int16 slot_id) { // need to check 'inst' argument for valid pointer - uint32 augslot[EQEmu::inventory::SocketCount] = { 0, 0, 0, 0, 0, 0 }; + uint32 augslot[EQEmu::invaug::SOCKET_COUNT] = { 0, 0, 0, 0, 0, 0 }; if (inst->IsClassCommon()) { - for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) { + for (int i = EQEmu::invaug::SOCKET_BEGIN; i <= EQEmu::invaug::SOCKET_END; i++) { EQEmu::ItemInstance *auginst = inst->GetItem(i); augslot[i] = (auginst && auginst->GetItem()) ? auginst->GetItem()->ID : 0; } @@ -316,7 +318,7 @@ bool SharedDatabase::UpdateSharedBankSlot(uint32 char_id, const EQEmu::ItemInsta if (inst->IsClassBag() && EQEmu::InventoryProfile::SupportsContainers(slot_id)) { // Limiting to bag slot count will get rid of 'hidden' duplicated items and 'Invalid Slot ID' // messages through attrition (and the modded code in SaveInventory) - for (uint8 idx = EQEmu::inventory::containerBegin; idx < inst->GetItem()->BagSlots && idx < EQEmu::inventory::ContainerCount; idx++) { + for (uint8 idx = EQEmu::invbag::SLOT_BEGIN; idx < inst->GetItem()->BagSlots && idx <= EQEmu::invbag::SLOT_END; idx++) { const EQEmu::ItemInstance* baginst = inst->GetItem(idx); SaveInventory(char_id, baginst, EQEmu::InventoryProfile::CalcSlotId(slot_id, idx)); } @@ -342,7 +344,7 @@ bool SharedDatabase::DeleteInventorySlot(uint32 char_id, int16 slot_id) { if (!EQEmu::InventoryProfile::SupportsContainers(slot_id)) return true; - int16 base_slot_id = EQEmu::InventoryProfile::CalcSlotId(slot_id, EQEmu::inventory::containerBegin); + int16 base_slot_id = EQEmu::InventoryProfile::CalcSlotId(slot_id, EQEmu::invbag::SLOT_BEGIN); query = StringFormat("DELETE FROM inventory WHERE charid = %i AND slotid >= %i AND slotid < %i", char_id, base_slot_id, (base_slot_id+10)); results = QueryDatabase(query); @@ -368,7 +370,7 @@ bool SharedDatabase::DeleteSharedBankSlot(uint32 char_id, int16 slot_id) { if (!EQEmu::InventoryProfile::SupportsContainers(slot_id)) return true; - int16 base_slot_id = EQEmu::InventoryProfile::CalcSlotId(slot_id, EQEmu::inventory::containerBegin); + int16 base_slot_id = EQEmu::InventoryProfile::CalcSlotId(slot_id, EQEmu::invbag::SLOT_BEGIN); query = StringFormat("DELETE FROM sharedbank WHERE acctid = %i " "AND slotid >= %i AND slotid < %i", account_id, base_slot_id, (base_slot_id+10)); @@ -474,7 +476,7 @@ bool SharedDatabase::GetSharedBank(uint32 id, EQEmu::InventoryProfile *inv, bool uint32 item_id = (uint32)atoi(row[1]); int8 charges = (int8)atoi(row[2]); - uint32 aug[EQEmu::inventory::SocketCount]; + uint32 aug[EQEmu::invaug::SOCKET_COUNT]; aug[0] = (uint32)atoi(row[3]); aug[1] = (uint32)atoi(row[4]); aug[2] = (uint32)atoi(row[5]); @@ -495,7 +497,7 @@ bool SharedDatabase::GetSharedBank(uint32 id, EQEmu::InventoryProfile *inv, bool EQEmu::ItemInstance *inst = CreateBaseItem(item, charges); if (inst && item->IsClassCommon()) { - for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) { + for (int i = EQEmu::invaug::SOCKET_BEGIN; i <= EQEmu::invaug::SOCKET_END; i++) { if (aug[i]) inst->PutAugment(this, i, aug[i]); } @@ -570,7 +572,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, EQEmu::InventoryProfile *inv) uint16 charges = atoi(row[2]); uint32 color = atoul(row[3]); - uint32 aug[EQEmu::inventory::SocketCount]; + uint32 aug[EQEmu::invaug::SOCKET_COUNT]; aug[0] = (uint32)atoul(row[4]); aug[1] = (uint32)atoul(row[5]); @@ -632,8 +634,8 @@ bool SharedDatabase::GetInventory(uint32 char_id, EQEmu::InventoryProfile *inv) inst->SetOrnamentHeroModel(item->HerosForgeModel); if (instnodrop || - (((slot_id >= EQEmu::legacy::EQUIPMENT_BEGIN && slot_id <= EQEmu::legacy::EQUIPMENT_END) || - slot_id == EQEmu::inventory::slotPowerSource) && + (((slot_id >= EQEmu::invslot::EQUIPMENT_BEGIN && slot_id <= EQEmu::invslot::EQUIPMENT_END) || + slot_id == EQEmu::invslot::SLOT_POWER_SOURCE) && inst->GetItem()->Attuneable)) inst->SetAttuned(true); @@ -655,7 +657,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, EQEmu::InventoryProfile *inv) } if (item->IsClassCommon()) { - for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) { + for (int i = EQEmu::invaug::SOCKET_BEGIN; i <= EQEmu::invaug::SOCKET_END; i++) { if (aug[i]) inst->PutAugment(this, i, aug[i]); } @@ -712,7 +714,7 @@ bool SharedDatabase::GetInventory(uint32 account_id, char *name, EQEmu::Inventor int8 charges = atoi(row[2]); uint32 color = atoul(row[3]); - uint32 aug[EQEmu::inventory::SocketCount]; + uint32 aug[EQEmu::invaug::SOCKET_COUNT]; aug[0] = (uint32)atoi(row[4]); aug[1] = (uint32)atoi(row[5]); aug[2] = (uint32)atoi(row[6]); @@ -773,7 +775,7 @@ bool SharedDatabase::GetInventory(uint32 account_id, char *name, EQEmu::Inventor inst->SetCharges(charges); if (item->IsClassCommon()) { - for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) { + for (int i = EQEmu::invaug::SOCKET_BEGIN; i <= EQEmu::invaug::SOCKET_END; i++) { if (aug[i]) inst->PutAugment(this, i, aug[i]); } diff --git a/world/client.cpp b/world/client.cpp index d3b74ae3f..f8b4fe3f4 100644 --- a/world/client.cpp +++ b/world/client.cpp @@ -212,8 +212,8 @@ void Client::SendMaxCharCreate() { MaxCharacters_Struct* mc = (MaxCharacters_Struct*)outapp->pBuffer; mc->max_chars = EQEmu::constants::Lookup(m_ClientVersion)->CharacterCreationLimit; - if (mc->max_chars > EQEmu::constants::CharacterCreationMax) - mc->max_chars = EQEmu::constants::CharacterCreationMax; + if (mc->max_chars > EQEmu::constants::CHARACTER_CREATION_LIMIT) + mc->max_chars = EQEmu::constants::CHARACTER_CREATION_LIMIT; QueuePacket(outapp); safe_delete(outapp); @@ -766,8 +766,8 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) { // (This is a literal translation of the original process..I don't see why it can't be changed to a single-target query over account iteration) if (!is_player_zoning) { size_t character_limit = EQEmu::constants::Lookup(eqs->ClientVersion())->CharacterCreationLimit; - if (character_limit > EQEmu::constants::CharacterCreationMax) { character_limit = EQEmu::constants::CharacterCreationMax; } - if (eqs->ClientVersion() == EQEmu::versions::ClientVersion::Titanium) { character_limit = 8; } + if (character_limit > EQEmu::constants::CHARACTER_CREATION_LIMIT) { character_limit = EQEmu::constants::CHARACTER_CREATION_LIMIT; } + if (eqs->ClientVersion() == EQEmu::versions::ClientVersion::Titanium) { character_limit = Titanium::constants::CHARACTER_CREATION_LIMIT; } std::string tgh_query = StringFormat( "SELECT " diff --git a/world/worlddb.cpp b/world/worlddb.cpp index cbf901cf7..67b0eab38 100644 --- a/world/worlddb.cpp +++ b/world/worlddb.cpp @@ -39,8 +39,8 @@ void WorldDatabase::GetCharSelectInfo(uint32 accountID, EQApplicationPacket **ou size_t character_limit = EQEmu::constants::Lookup(client_version)->CharacterCreationLimit; // Validate against absolute server max - if (character_limit > EQEmu::constants::CharacterCreationMax) - character_limit = EQEmu::constants::CharacterCreationMax; + if (character_limit > EQEmu::constants::CHARACTER_CREATION_LIMIT) + character_limit = EQEmu::constants::CHARACTER_CREATION_LIMIT; // Force Titanium clients to use '8' if (client_version == EQEmu::versions::ClientVersion::Titanium) diff --git a/zone/aa.cpp b/zone/aa.cpp index 38d477fb8..9fa76a9d4 100644 --- a/zone/aa.cpp +++ b/zone/aa.cpp @@ -435,7 +435,7 @@ void Mob::WakeTheDead(uint16 spell_id, Mob *target, uint32 duration) //gear stuff, need to make sure there's //no situation where this stuff can be duped - for (int x = EQEmu::legacy::EQUIPMENT_BEGIN; x <= EQEmu::legacy::EQUIPMENT_END; x++) // (< 21) added MainAmmo + for (int x = EQEmu::invslot::EQUIPMENT_BEGIN; x <= EQEmu::invslot::EQUIPMENT_END; x++) { uint32 sitem = 0; sitem = CorpseToUse->GetWornItem(x); diff --git a/zone/attack.cpp b/zone/attack.cpp index 817a8e359..a48d68934 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -136,7 +136,7 @@ EQEmu::skills::SkillType Mob::AttackAnimation(int Hand, const EQEmu::ItemInstanc } // If we're attacking with the secondary hand, play the dual wield anim - if (Hand == EQEmu::inventory::slotSecondary) // DW anim + if (Hand == EQEmu::invslot::slotSecondary) // DW anim type = animDualWield; DoAnim(type, 0, false); @@ -386,7 +386,7 @@ bool Mob::AvoidDamage(Mob *other, DamageHitInfo &hit) // riposte -- it may seem crazy, but if the attacker has SPA 173 on them, they are immune to Ripo bool ImmuneRipo = attacker->aabonuses.RiposteChance || attacker->spellbonuses.RiposteChance || attacker->itembonuses.RiposteChance || attacker->IsEnraged(); // Need to check if we have something in MainHand to actually attack with (or fists) - if (hit.hand != EQEmu::inventory::slotRange && (CanThisClassRiposte() || IsEnraged()) && InFront && !ImmuneRipo) { + if (hit.hand != EQEmu::invslot::slotRange && (CanThisClassRiposte() || IsEnraged()) && InFront && !ImmuneRipo) { if (IsEnraged()) { hit.damage_done = DMG_RIPOSTED; Log(Logs::Detail, Logs::Combat, "I am enraged, riposting frontal attack."); @@ -408,7 +408,7 @@ bool Mob::AvoidDamage(Mob *other, DamageHitInfo &hit) chance -= chance * counter; } // AA Slippery Attacks - if (hit.hand == EQEmu::inventory::slotSecondary) { + if (hit.hand == EQEmu::invslot::slotSecondary) { int slip = aabonuses.OffhandRiposteFail + itembonuses.OffhandRiposteFail + spellbonuses.OffhandRiposteFail; chance += chance * slip / 100; } @@ -453,7 +453,7 @@ bool Mob::AvoidDamage(Mob *other, DamageHitInfo &hit) } // parry - if (CanThisClassParry() && InFront && hit.hand != EQEmu::inventory::slotRange) { + if (CanThisClassParry() && InFront && hit.hand != EQEmu::invslot::slotRange) { if (IsClient()) CastToClient()->CheckIncreaseSkill(EQEmu::skills::SkillParry, other, -10); // check auto discs ... I guess aa/items too :P @@ -783,7 +783,7 @@ int Mob::ACSum() int shield_ac = 0; if (HasShieldEquiped() && IsClient()) { auto client = CastToClient(); - auto inst = client->GetInv().GetItem(EQEmu::inventory::slotSecondary); + auto inst = client->GetInv().GetItem(EQEmu::invslot::slotSecondary); if (inst) { if (inst->GetItemRecommendedLevel(true) <= GetLevel()) shield_ac = inst->GetItemArmorClass(true); @@ -1111,7 +1111,7 @@ int Mob::GetWeaponDamage(Mob *against, const EQEmu::ItemInstance *weapon_item, u else { bool MagicGloves = false; if (IsClient()) { - const EQEmu::ItemInstance *gloves = CastToClient()->GetInv().GetItem(EQEmu::inventory::slotHands); + const EQEmu::ItemInstance *gloves = CastToClient()->GetInv().GetItem(EQEmu::invslot::slotHands); if (gloves) MagicGloves = gloves->GetItemMagical(true); } @@ -1397,12 +1397,12 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b return false; // Rogean: How can you attack while feigned? Moved up from Aggro Code. EQEmu::ItemInstance* weapon = nullptr; - if (Hand == EQEmu::inventory::slotSecondary) { // Kaiyodo - Pick weapon from the attacking hand - weapon = GetInv().GetItem(EQEmu::inventory::slotSecondary); + if (Hand == EQEmu::invslot::slotSecondary) { // Kaiyodo - Pick weapon from the attacking hand + weapon = GetInv().GetItem(EQEmu::invslot::slotSecondary); OffHandAtk(true); } else { - weapon = GetInv().GetItem(EQEmu::inventory::slotPrimary); + weapon = GetInv().GetItem(EQEmu::invslot::slotPrimary); OffHandAtk(false); } @@ -1440,10 +1440,10 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b if (my_hit.base_damage > 0) { // if we revamp this function be more general, we will have to make sure this isn't // executed for anything BUT normal melee damage weapons from auto attack - if (Hand == EQEmu::inventory::slotPrimary || Hand == EQEmu::inventory::slotSecondary) + if (Hand == EQEmu::invslot::slotPrimary || Hand == EQEmu::invslot::slotSecondary) my_hit.base_damage = DoDamageCaps(my_hit.base_damage); auto shield_inc = spellbonuses.ShieldEquipDmgMod + itembonuses.ShieldEquipDmgMod + aabonuses.ShieldEquipDmgMod; - if (shield_inc > 0 && HasShieldEquiped() && Hand == EQEmu::inventory::slotPrimary) { + if (shield_inc > 0 && HasShieldEquiped() && Hand == EQEmu::invslot::slotPrimary) { my_hit.base_damage = my_hit.base_damage * (100 + shield_inc) / 100; hate = hate * (100 + shield_inc) / 100; } @@ -1465,7 +1465,7 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b int ucDamageBonus = 0; - if (Hand == EQEmu::inventory::slotPrimary && GetLevel() >= 28 && IsWarriorClass()) + if (Hand == EQEmu::invslot::slotPrimary && GetLevel() >= 28 && IsWarriorClass()) { // Damage bonuses apply only to hits from the main hand (Hand == MainPrimary) by characters level 28 and above // who belong to a melee class. If we're here, then all of these conditions apply. @@ -1477,7 +1477,7 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b } #endif //Live AA - Sinister Strikes *Adds weapon damage bonus to offhand weapon. - if (Hand == EQEmu::inventory::slotSecondary) { + if (Hand == EQEmu::invslot::slotSecondary) { if (aabonuses.SecondaryDmgInc || itembonuses.SecondaryDmgInc || spellbonuses.SecondaryDmgInc) { ucDamageBonus = GetWeaponDamageBonus(weapon ? weapon->GetItem() : (const EQEmu::ItemData*) nullptr, true); @@ -1927,28 +1927,28 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool my_hit.skill = EQEmu::skills::SkillHandtoHand; my_hit.hand = Hand; my_hit.damage_done = 1; - if (Hand == EQEmu::inventory::slotPrimary) { + if (Hand == EQEmu::invslot::slotPrimary) { my_hit.skill = static_cast(GetPrimSkill()); OffHandAtk(false); } - if (Hand == EQEmu::inventory::slotSecondary) { + if (Hand == EQEmu::invslot::slotSecondary) { my_hit.skill = static_cast(GetSecSkill()); OffHandAtk(true); } //figure out what weapon they are using, if any const EQEmu::ItemData* weapon = nullptr; - if (Hand == EQEmu::inventory::slotPrimary && equipment[EQEmu::inventory::slotPrimary] > 0) - weapon = database.GetItem(equipment[EQEmu::inventory::slotPrimary]); - else if (equipment[EQEmu::inventory::slotSecondary]) - weapon = database.GetItem(equipment[EQEmu::inventory::slotSecondary]); + if (Hand == EQEmu::invslot::slotPrimary && equipment[EQEmu::invslot::slotPrimary] > 0) + weapon = database.GetItem(equipment[EQEmu::invslot::slotPrimary]); + else if (equipment[EQEmu::invslot::slotSecondary]) + weapon = database.GetItem(equipment[EQEmu::invslot::slotSecondary]); //We dont factor much from the weapon into the attack. //Just the skill type so it doesn't look silly using punching animations and stuff while wielding weapons if (weapon) { Log(Logs::Detail, Logs::Combat, "Attacking with weapon: %s (%d) (too bad im not using it for much)", weapon->Name, weapon->ID); - if (Hand == EQEmu::inventory::slotSecondary && weapon->ItemType == EQEmu::item::ItemTypeShield) { + if (Hand == EQEmu::invslot::slotSecondary && weapon->ItemType == EQEmu::item::ItemTypeShield) { Log(Logs::Detail, Logs::Combat, "Attack with shield canceled."); return false; } @@ -3896,7 +3896,7 @@ void Mob::TryDefensiveProc(Mob *on, uint16 hand) { float ProcChance, ProcBonus; on->GetDefensiveProcChances(ProcBonus, ProcChance, hand, this); - if (hand != EQEmu::inventory::slotPrimary) + if (hand != EQEmu::invslot::slotPrimary) ProcChance /= 2; int level_penalty = 0; @@ -3969,7 +3969,7 @@ void Mob::TryWeaponProc(const EQEmu::ItemInstance *inst, const EQEmu::ItemData * ProcBonus += static_cast(itembonuses.ProcChance) / 10.0f; // Combat Effects float ProcChance = GetProcChances(ProcBonus, hand); - if (hand != EQEmu::inventory::slotPrimary) //Is Archery intened to proc at 50% rate? + if (hand != EQEmu::invslot::slotPrimary) //Is Archery intened to proc at 50% rate? ProcChance /= 2; // Try innate proc on weapon @@ -4008,7 +4008,7 @@ void Mob::TryWeaponProc(const EQEmu::ItemInstance *inst, const EQEmu::ItemData * proced = false; if (!proced && inst) { - for (int r = EQEmu::inventory::socketBegin; r < EQEmu::inventory::SocketCount; r++) { + for (int r = EQEmu::invaug::SOCKET_BEGIN; r <= EQEmu::invaug::SOCKET_END; r++) { const EQEmu::ItemInstance *aug_i = inst->GetAugment(r); if (!aug_i) // no aug, try next slot! continue; @@ -4051,11 +4051,11 @@ void Mob::TrySpellProc(const EQEmu::ItemInstance *inst, const EQEmu::ItemData *w float ProcChance = 0.0f; ProcChance = GetProcChances(ProcBonus, hand); - if (hand != EQEmu::inventory::slotPrimary) //Is Archery intened to proc at 50% rate? + if (hand != EQEmu::invslot::slotPrimary) //Is Archery intened to proc at 50% rate? ProcChance /= 2; bool rangedattk = false; - if (weapon && hand == EQEmu::inventory::slotRange) { + if (weapon && hand == EQEmu::invslot::slotRange) { if (weapon->ItemType == EQEmu::item::ItemTypeArrow || weapon->ItemType == EQEmu::item::ItemTypeLargeThrowing || weapon->ItemType == EQEmu::item::ItemTypeSmallThrowing || @@ -4064,11 +4064,11 @@ void Mob::TrySpellProc(const EQEmu::ItemInstance *inst, const EQEmu::ItemData *w } } - if (!weapon && hand == EQEmu::inventory::slotRange && GetSpecialAbility(SPECATK_RANGED_ATK)) + if (!weapon && hand == EQEmu::invslot::slotRange && GetSpecialAbility(SPECATK_RANGED_ATK)) rangedattk = true; for (uint32 i = 0; i < MAX_PROCS; i++) { - if (IsPet() && hand != EQEmu::inventory::slotPrimary) //Pets can only proc spell procs from their primay hand (ie; beastlord pets) + if (IsPet() && hand != EQEmu::invslot::slotPrimary) //Pets can only proc spell procs from their primay hand (ie; beastlord pets) continue; // If pets ever can proc from off hand, this will need to change // Not ranged @@ -4128,7 +4128,7 @@ void Mob::TrySpellProc(const EQEmu::ItemInstance *inst, const EQEmu::ItemData *w } } - if (HasSkillProcs() && hand != EQEmu::inventory::slotRange) { //We check ranged skill procs within the attack functions. + if (HasSkillProcs() && hand != EQEmu::invslot::slotRange) { //We check ranged skill procs within the attack functions. uint16 skillinuse = 28; if (weapon) skillinuse = GetSkillByItemType(weapon->ItemType); @@ -4451,7 +4451,7 @@ void Mob::DoRiposte(Mob *defender) return; } - defender->Attack(this, EQEmu::inventory::slotPrimary, true); + defender->Attack(this, EQEmu::invslot::slotPrimary, true); if (HasDied()) return; @@ -4462,7 +4462,7 @@ void Mob::DoRiposte(Mob *defender) if (DoubleRipChance && zone->random.Roll(DoubleRipChance)) { Log(Logs::Detail, Logs::Combat, "Preforming a double riposted from SE_DoubleRiposte (%d percent chance)", DoubleRipChance); - defender->Attack(this, EQEmu::inventory::slotPrimary, true); + defender->Attack(this, EQEmu::invslot::slotPrimary, true); if (HasDied()) return; } @@ -4475,7 +4475,7 @@ void Mob::DoRiposte(Mob *defender) Log(Logs::Detail, Logs::Combat, "Preforming a double riposted from SE_GiveDoubleRiposte base1 == 0 (%d percent chance)", DoubleRipChance); - defender->Attack(this, EQEmu::inventory::slotPrimary, true); + defender->Attack(this, EQEmu::invslot::slotPrimary, true); if (HasDied()) return; } @@ -4888,7 +4888,7 @@ float Mob::GetSkillProcChances(uint16 ReuseTime, uint16 hand) { if (!ReuseTime && hand) { weapon_speed = GetWeaponSpeedbyHand(hand); ProcChance = static_cast(weapon_speed) * (RuleR(Combat, AvgProcsPerMinute) / 60000.0f); - if (hand != EQEmu::inventory::slotPrimary) + if (hand != EQEmu::invslot::slotPrimary) ProcChance /= 2; } @@ -5182,13 +5182,13 @@ void Client::SetAttackTimer() Timer *TimerToUse = nullptr; - for (int i = EQEmu::inventory::slotRange; i <= EQEmu::inventory::slotSecondary; i++) { + for (int i = EQEmu::invslot::slotRange; i <= EQEmu::invslot::slotSecondary; i++) { //pick a timer - if (i == EQEmu::inventory::slotPrimary) + if (i == EQEmu::invslot::slotPrimary) TimerToUse = &attack_timer; - else if (i == EQEmu::inventory::slotRange) + else if (i == EQEmu::invslot::slotRange) TimerToUse = &ranged_timer; - else if (i == EQEmu::inventory::slotSecondary) + else if (i == EQEmu::invslot::slotSecondary) TimerToUse = &attack_dw_timer; else //invalid slot (hands will always hit this) continue; @@ -5201,7 +5201,7 @@ void Client::SetAttackTimer() ItemToUse = ci->GetItem(); //special offhand stuff - if (i == EQEmu::inventory::slotSecondary) { + if (i == EQEmu::invslot::slotSecondary) { //if we cant dual wield, skip it if (!CanThisClassDualWield() || HasTwoHanderEquipped()) { attack_dw_timer.Disable(); @@ -5276,19 +5276,19 @@ void NPC::SetAttackTimer() else speed = static_cast((attack_delay / haste_mod) + ((hhe / 100.0f) * attack_delay)); - for (int i = EQEmu::inventory::slotRange; i <= EQEmu::inventory::slotSecondary; i++) { + for (int i = EQEmu::invslot::slotRange; i <= EQEmu::invslot::slotSecondary; i++) { //pick a timer - if (i == EQEmu::inventory::slotPrimary) + if (i == EQEmu::invslot::slotPrimary) TimerToUse = &attack_timer; - else if (i == EQEmu::inventory::slotRange) + else if (i == EQEmu::invslot::slotRange) TimerToUse = &ranged_timer; - else if (i == EQEmu::inventory::slotSecondary) + else if (i == EQEmu::invslot::slotSecondary) TimerToUse = &attack_dw_timer; else //invalid slot (hands will always hit this) continue; //special offhand stuff - if (i == EQEmu::inventory::slotSecondary) { + if (i == EQEmu::invslot::slotSecondary) { // SPECATK_QUAD is uncheesable if (!CanThisClassDualWield() || (HasTwoHanderEquipped() && !GetSpecialAbility(SPECATK_QUAD))) { attack_dw_timer.Disable(); @@ -5310,7 +5310,7 @@ void Client::DoAttackRounds(Mob *target, int hand, bool IsFromSpell) bool candouble = CanThisClassDoubleAttack(); // extra off hand non-sense, can only double with skill of 150 or above // or you have any amount of GiveDoubleAttack - if (candouble && hand == EQEmu::inventory::slotSecondary) + if (candouble && hand == EQEmu::invslot::slotSecondary) candouble = GetSkill(EQEmu::skills::SkillDoubleAttack) > 149 || (aabonuses.GiveDoubleAttack + spellbonuses.GiveDoubleAttack + itembonuses.GiveDoubleAttack) > 0; @@ -5321,7 +5321,7 @@ void Client::DoAttackRounds(Mob *target, int hand, bool IsFromSpell) Attack(target, hand, false, false, IsFromSpell); // Modern AA description: Increases your chance of ... performing one additional hit with a 2-handed weapon when double attacking by 2%. - if (hand == EQEmu::inventory::slotPrimary) { + if (hand == EQEmu::invslot::slotPrimary) { auto extraattackchance = aabonuses.ExtraAttackChance + spellbonuses.ExtraAttackChance + itembonuses.ExtraAttackChance; if (extraattackchance && HasTwoHanderEquipped() && zone->random.Roll(extraattackchance)) @@ -5329,7 +5329,7 @@ void Client::DoAttackRounds(Mob *target, int hand, bool IsFromSpell) } // you can only triple from the main hand - if (hand == EQEmu::inventory::slotPrimary && CanThisClassTripleAttack()) { + if (hand == EQEmu::invslot::slotPrimary && CanThisClassTripleAttack()) { CheckIncreaseSkill(EQEmu::skills::SkillTripleAttack, target, -10); if (CheckTripleAttack()) { Attack(target, hand, false, false, IsFromSpell); @@ -5383,9 +5383,9 @@ void Mob::DoMainHandAttackRounds(Mob *target, ExtraAttackOptions *opts) if (RuleB(Combat, UseLiveCombatRounds)) { // A "quad" on live really is just a successful dual wield where both double attack // The mobs that could triple lost the ability to when the triple attack skill was added in - Attack(target, EQEmu::inventory::slotPrimary, false, false, false, opts); + Attack(target, EQEmu::invslot::slotPrimary, false, false, false, opts); if (CanThisClassDoubleAttack() && CheckDoubleAttack()) { - Attack(target, EQEmu::inventory::slotPrimary, false, false, false, opts); + Attack(target, EQEmu::invslot::slotPrimary, false, false, false, opts); if ((IsPet() || IsTempPet()) && IsPetOwnerClient()) { int chance = spellbonuses.PC_Pet_Flurry + itembonuses.PC_Pet_Flurry + aabonuses.PC_Pet_Flurry; if (chance && zone->random.Roll(chance)) @@ -5398,16 +5398,16 @@ void Mob::DoMainHandAttackRounds(Mob *target, ExtraAttackOptions *opts) if (IsNPC()) { int16 n_atk = CastToNPC()->GetNumberOfAttacks(); if (n_atk <= 1) { - Attack(target, EQEmu::inventory::slotPrimary, false, false, false, opts); + Attack(target, EQEmu::invslot::slotPrimary, false, false, false, opts); } else { for (int i = 0; i < n_atk; ++i) { - Attack(target, EQEmu::inventory::slotPrimary, false, false, false, opts); + Attack(target, EQEmu::invslot::slotPrimary, false, false, false, opts); } } } else { - Attack(target, EQEmu::inventory::slotPrimary, false, false, false, opts); + Attack(target, EQEmu::invslot::slotPrimary, false, false, false, opts); } // we use this random value in three comparisons with different @@ -5418,15 +5418,15 @@ void Mob::DoMainHandAttackRounds(Mob *target, ExtraAttackOptions *opts) // check double attack, this is NOT the same rules that clients use... && RandRoll < (GetLevel() + NPCDualAttackModifier)) { - Attack(target, EQEmu::inventory::slotPrimary, false, false, false, opts); + Attack(target, EQEmu::invslot::slotPrimary, false, false, false, opts); // lets see if we can do a triple attack with the main hand // pets are excluded from triple and quads... if ((GetSpecialAbility(SPECATK_TRIPLE) || GetSpecialAbility(SPECATK_QUAD)) && !IsPet() && RandRoll < (GetLevel() + NPCTripleAttackModifier)) { - Attack(target, EQEmu::inventory::slotPrimary, false, false, false, opts); + Attack(target, EQEmu::invslot::slotPrimary, false, false, false, opts); // now lets check the quad attack if (GetSpecialAbility(SPECATK_QUAD) && RandRoll < (GetLevel() + NPCQuadAttackModifier)) { - Attack(target, EQEmu::inventory::slotPrimary, false, false, false, opts); + Attack(target, EQEmu::invslot::slotPrimary, false, false, false, opts); } } } @@ -5442,9 +5442,9 @@ void Mob::DoOffHandAttackRounds(Mob *target, ExtraAttackOptions *opts) (RuleB(Combat, UseLiveCombatRounds) && GetSpecialAbility(SPECATK_QUAD))) || GetEquipment(EQEmu::textures::weaponSecondary) != 0) { if (CheckDualWield()) { - Attack(target, EQEmu::inventory::slotSecondary, false, false, false, opts); + Attack(target, EQEmu::invslot::slotSecondary, false, false, false, opts); if (CanThisClassDoubleAttack() && GetLevel() > 35 && CheckDoubleAttack()) { - Attack(target, EQEmu::inventory::slotSecondary, false, false, false, opts); + Attack(target, EQEmu::invslot::slotSecondary, false, false, false, opts); if ((IsPet() || IsTempPet()) && IsPetOwnerClient()) { int chance = spellbonuses.PC_Pet_Flurry + itembonuses.PC_Pet_Flurry + aabonuses.PC_Pet_Flurry; diff --git a/zone/beacon.h b/zone/beacon.h index c22189dfd..3e8f6edcc 100644 --- a/zone/beacon.h +++ b/zone/beacon.h @@ -36,7 +36,7 @@ public: //abstract virtual function implementations requird by base abstract class virtual bool Death(Mob* killerMob, int32 damage, uint16 spell_id, EQEmu::skills::SkillType attack_skill) { return true; } virtual void Damage(Mob* from, int32 damage, uint16 spell_id, EQEmu::skills::SkillType attack_skill, bool avoidable = true, int8 buffslot = -1, bool iBuffTic = false, eSpecialAttacks special = eSpecialAttacks::None) { return; } - virtual bool Attack(Mob* other, int Hand = EQEmu::inventory::slotPrimary, bool FromRiposte = false, bool IsStrikethrough = false, bool IsFromSpell = false, + virtual bool Attack(Mob* other, int Hand = EQEmu::invslot::slotPrimary, bool FromRiposte = false, bool IsStrikethrough = false, bool IsFromSpell = false, ExtraAttackOptions *opts = nullptr) { return false; } virtual bool HasRaid() { return false; } virtual bool HasGroup() { return false; } diff --git a/zone/bonuses.cpp b/zone/bonuses.cpp index c444ff9dd..b6de679d1 100644 --- a/zone/bonuses.cpp +++ b/zone/bonuses.cpp @@ -161,35 +161,35 @@ void Client::CalcItemBonuses(StatBonuses* newbon) { unsigned int i; // Update: MainAmmo should only calc skill mods (TODO: Check for other cases) - for (i = EQEmu::inventory::slotCharm; i <= EQEmu::inventory::slotAmmo; i++) { + for (i = EQEmu::invslot::BONUS_BEGIN; i <= EQEmu::invslot::BONUS_SKILL_END; i++) { const EQEmu::ItemInstance* inst = m_inv[i]; if(inst == 0) continue; - AddItemBonuses(inst, newbon, false, false, 0, (i == EQEmu::inventory::slotAmmo)); + AddItemBonuses(inst, newbon, false, false, 0, (i == EQEmu::invslot::slotAmmo)); //These are given special flags due to how often they are checked for various spell effects. const EQEmu::ItemData *item = inst->GetItem(); - if (i == EQEmu::inventory::slotSecondary && (item && item->ItemType == EQEmu::item::ItemTypeShield)) + if (i == EQEmu::invslot::slotSecondary && (item && item->ItemType == EQEmu::item::ItemTypeShield)) SetShieldEquiped(true); - else if (i == EQEmu::inventory::slotPrimary && (item && item->ItemType == EQEmu::item::ItemType2HBlunt)) { + else if (i == EQEmu::invslot::slotPrimary && (item && item->ItemType == EQEmu::item::ItemType2HBlunt)) { SetTwoHandBluntEquiped(true); SetTwoHanderEquipped(true); } - else if (i == EQEmu::inventory::slotPrimary && (item && (item->ItemType == EQEmu::item::ItemType2HSlash || item->ItemType == EQEmu::item::ItemType2HPiercing))) + else if (i == EQEmu::invslot::slotPrimary && (item && (item->ItemType == EQEmu::item::ItemType2HSlash || item->ItemType == EQEmu::item::ItemType2HPiercing))) SetTwoHanderEquipped(true); } //Power Source Slot if (ClientVersion() >= EQEmu::versions::ClientVersion::SoF) { - const EQEmu::ItemInstance* inst = m_inv[EQEmu::inventory::slotPowerSource]; + const EQEmu::ItemInstance* inst = m_inv[EQEmu::invslot::SLOT_POWER_SOURCE]; if(inst) AddItemBonuses(inst, newbon); } //tribute items - for (i = 0; i < EQEmu::legacy::TRIBUTE_SIZE; i++) { - const EQEmu::ItemInstance* inst = m_inv[EQEmu::legacy::TRIBUTE_BEGIN + i]; + for (i = EQEmu::invslot::TRIBUTE_BEGIN; i <= EQEmu::invslot::TRIBUTE_END; i++) { + const EQEmu::ItemInstance* inst = m_inv[i]; if(inst == 0) continue; AddItemBonuses(inst, newbon, false, true); @@ -197,7 +197,7 @@ void Client::CalcItemBonuses(StatBonuses* newbon) { //Optional ability to have worn effects calculate as an addititive bonus instead of highest value if (RuleI(Spells, AdditiveBonusWornType) && RuleI(Spells, AdditiveBonusWornType) != EQEmu::item::ItemEffectWorn){ - for (i = EQEmu::inventory::slotCharm; i < EQEmu::inventory::slotAmmo; i++) { + for (i = EQEmu::invslot::BONUS_BEGIN; i <= EQEmu::invslot::BONUS_STAT_END; i++) { const EQEmu::ItemInstance* inst = m_inv[i]; if(inst == 0) continue; @@ -543,7 +543,7 @@ void Client::AddItemBonuses(const EQEmu::ItemInstance *inst, StatBonuses *newbon } if (!isAug) { - for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) + for (int i = EQEmu::invaug::SOCKET_BEGIN; i <= EQEmu::invaug::SOCKET_END; i++) AddItemBonuses(inst->GetAugment(i), newbon, true, false, rec_level, ammo_slot_item); } } @@ -581,7 +581,7 @@ void Client::AdditiveWornBonuses(const EQEmu::ItemInstance *inst, StatBonuses* n if (!isAug) { int i; - for (i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) { + for (i = EQEmu::invaug::SOCKET_BEGIN; i <= EQEmu::invaug::SOCKET_END; i++) { AdditiveWornBonuses(inst->GetAugment(i),newbon,true); } } @@ -592,32 +592,32 @@ void Client::CalcEdibleBonuses(StatBonuses* newbon) { bool food = false; bool drink = false; - for (i = EQEmu::legacy::GENERAL_BEGIN; i <= EQEmu::legacy::GENERAL_BAGS_BEGIN; i++) + for (i = EQEmu::invslot::GENERAL_BEGIN; i <= EQEmu::invslot::GENERAL_END; i++) { if (food && drink) break; const EQEmu::ItemInstance* inst = GetInv().GetItem(i); if (inst && inst->GetItem() && inst->IsClassCommon()) { const EQEmu::ItemData *item = inst->GetItem(); - if (item->ItemType == EQEmu::item::ItemTypeFood && !food) + if (!food && item->ItemType == EQEmu::item::ItemTypeFood) food = true; - else if (item->ItemType == EQEmu::item::ItemTypeDrink && !drink) + else if (!drink && item->ItemType == EQEmu::item::ItemTypeDrink) drink = true; else continue; AddItemBonuses(inst, newbon); } } - for (i = EQEmu::legacy::GENERAL_BAGS_BEGIN; i <= EQEmu::legacy::GENERAL_BAGS_END; i++) + for (i = EQEmu::invbag::GENERAL_BAGS_BEGIN; i <= EQEmu::invbag::GENERAL_BAGS_END; i++) { if (food && drink) break; const EQEmu::ItemInstance* inst = GetInv().GetItem(i); if (inst && inst->GetItem() && inst->IsClassCommon()) { const EQEmu::ItemData *item = inst->GetItem(); - if (item->ItemType == EQEmu::item::ItemTypeFood && !food) + if (!food && item->ItemType == EQEmu::item::ItemTypeFood) food = true; - else if (item->ItemType == EQEmu::item::ItemTypeDrink && !drink) + else if (!drink && item->ItemType == EQEmu::item::ItemTypeDrink) drink = true; else continue; @@ -3261,7 +3261,7 @@ void NPC::CalcItemBonuses(StatBonuses *newbon) { if(newbon){ - for (int i = 0; i < EQEmu::legacy::EQUIPMENT_SIZE; i++){ + for (int i = EQEmu::invslot::EQUIPMENT_BEGIN; i <= EQEmu::invslot::EQUIPMENT_END; i++){ const EQEmu::ItemData *cur = database.GetItem(equipment[i]); if(cur){ //basic stats @@ -3339,24 +3339,24 @@ void Client::CalcItemScale() { bool changed = false; // MainAmmo excluded in helper function below - if (CalcItemScale(EQEmu::legacy::EQUIPMENT_BEGIN, EQEmu::legacy::EQUIPMENT_END)) // original coding excluded MainAmmo (< 21) + if (CalcItemScale(EQEmu::invslot::EQUIPMENT_BEGIN, EQEmu::invslot::EQUIPMENT_END)) // original coding excluded MainAmmo (< 21) changed = true; - if (CalcItemScale(EQEmu::legacy::GENERAL_BEGIN, EQEmu::legacy::GENERAL_END)) // original coding excluded MainCursor (< 30) + if (CalcItemScale(EQEmu::invslot::GENERAL_BEGIN, EQEmu::invslot::GENERAL_END)) // original coding excluded MainCursor (< 30) changed = true; // I excluded cursor bag slots here because cursor was excluded above..if this is incorrect, change 'slot_y' here to CURSOR_BAG_END // and 'slot_y' above to CURSOR from GENERAL_END above - or however it is supposed to be... - if (CalcItemScale(EQEmu::legacy::GENERAL_BAGS_BEGIN, EQEmu::legacy::GENERAL_BAGS_END)) // (< 341) + if (CalcItemScale(EQEmu::invbag::GENERAL_BAGS_BEGIN, EQEmu::invbag::GENERAL_BAGS_END)) // (< 341) changed = true; - if (CalcItemScale(EQEmu::legacy::TRIBUTE_BEGIN, EQEmu::legacy::TRIBUTE_END)) // (< 405) + if (CalcItemScale(EQEmu::invslot::TRIBUTE_BEGIN, EQEmu::invslot::TRIBUTE_END)) // (< 405) changed = true; //Power Source Slot if (ClientVersion() >= EQEmu::versions::ClientVersion::SoF) { - if (CalcItemScale(EQEmu::inventory::slotPowerSource, EQEmu::inventory::slotPowerSource)) + if (CalcItemScale(EQEmu::invslot::SLOT_POWER_SOURCE, EQEmu::invslot::SLOT_POWER_SOURCE)) changed = true; } @@ -3371,7 +3371,7 @@ bool Client::CalcItemScale(uint32 slot_x, uint32 slot_y) { bool changed = false; uint32 i; for (i = slot_x; i <= slot_y; i++) { - if (i == EQEmu::inventory::slotAmmo) // moved here from calling procedure to facilitate future range changes where MainAmmo may not be the last slot + if (i == EQEmu::invslot::slotAmmo) // moved here from calling procedure to facilitate future range changes where MainAmmo may not be the last slot continue; EQEmu::ItemInstance* inst = m_inv.GetItem(i); @@ -3381,7 +3381,7 @@ bool Client::CalcItemScale(uint32 slot_x, uint32 slot_y) { // TEST CODE: test for bazaar trader crashing with charm items if (Trader) - if (i >= EQEmu::legacy::GENERAL_BAGS_BEGIN && i <= EQEmu::legacy::GENERAL_BAGS_END) { + if (i >= EQEmu::invbag::GENERAL_BAGS_BEGIN && i <= EQEmu::invbag::GENERAL_BAGS_END) { EQEmu::ItemInstance* parent_item = m_inv.GetItem(EQEmu::InventoryProfile::CalcSlotId(i)); if (parent_item && parent_item->GetItem()->ID == 17899) // trader satchel continue; @@ -3401,7 +3401,7 @@ bool Client::CalcItemScale(uint32 slot_x, uint32 slot_y) { } //iterate all augments - for (int x = EQEmu::inventory::socketBegin; x < EQEmu::inventory::SocketCount; ++x) + for (int x = EQEmu::invaug::SOCKET_BEGIN; x <= EQEmu::invaug::SOCKET_END; ++x) { EQEmu::ItemInstance * a_inst = inst->GetAugment(x); if(!a_inst) @@ -3433,24 +3433,24 @@ void Client::DoItemEnterZone() { bool changed = false; // MainAmmo excluded in helper function below - if (DoItemEnterZone(EQEmu::legacy::EQUIPMENT_BEGIN, EQEmu::legacy::EQUIPMENT_END)) // original coding excluded MainAmmo (< 21) + if (DoItemEnterZone(EQEmu::invslot::EQUIPMENT_BEGIN, EQEmu::invslot::EQUIPMENT_END)) // original coding excluded MainAmmo (< 21) changed = true; - if (DoItemEnterZone(EQEmu::legacy::GENERAL_BEGIN, EQEmu::legacy::GENERAL_END)) // original coding excluded MainCursor (< 30) + if (DoItemEnterZone(EQEmu::invslot::GENERAL_BEGIN, EQEmu::invslot::GENERAL_END)) // original coding excluded MainCursor (< 30) changed = true; // I excluded cursor bag slots here because cursor was excluded above..if this is incorrect, change 'slot_y' here to CURSOR_BAG_END // and 'slot_y' above to CURSOR from GENERAL_END above - or however it is supposed to be... - if (DoItemEnterZone(EQEmu::legacy::GENERAL_BAGS_BEGIN, EQEmu::legacy::GENERAL_BAGS_END)) // (< 341) + if (DoItemEnterZone(EQEmu::invbag::GENERAL_BAGS_BEGIN, EQEmu::invbag::GENERAL_BAGS_END)) // (< 341) changed = true; - if (DoItemEnterZone(EQEmu::legacy::TRIBUTE_BEGIN, EQEmu::legacy::TRIBUTE_END)) // (< 405) + if (DoItemEnterZone(EQEmu::invslot::TRIBUTE_BEGIN, EQEmu::invslot::TRIBUTE_END)) // (< 405) changed = true; //Power Source Slot if (ClientVersion() >= EQEmu::versions::ClientVersion::SoF) { - if (DoItemEnterZone(EQEmu::inventory::slotPowerSource, EQEmu::inventory::slotPowerSource)) + if (DoItemEnterZone(EQEmu::invslot::SLOT_POWER_SOURCE, EQEmu::invslot::SLOT_POWER_SOURCE)) changed = true; } @@ -3464,7 +3464,7 @@ bool Client::DoItemEnterZone(uint32 slot_x, uint32 slot_y) { // behavior change: 'slot_y' is now [RANGE]_END and not [RANGE]_END + 1 bool changed = false; for(uint32 i = slot_x; i <= slot_y; i++) { - if (i == EQEmu::inventory::slotAmmo) // moved here from calling procedure to facilitate future range changes where MainAmmo may not be the last slot + if (i == EQEmu::invslot::slotAmmo) // moved here from calling procedure to facilitate future range changes where MainAmmo may not be the last slot continue; EQEmu::ItemInstance* inst = m_inv.GetItem(i); @@ -3474,7 +3474,7 @@ bool Client::DoItemEnterZone(uint32 slot_x, uint32 slot_y) { // TEST CODE: test for bazaar trader crashing with charm items if (Trader) - if (i >= EQEmu::legacy::GENERAL_BAGS_BEGIN && i <= EQEmu::legacy::GENERAL_BAGS_END) { + if (i >= EQEmu::invbag::GENERAL_BAGS_BEGIN && i <= EQEmu::invbag::GENERAL_BAGS_END) { EQEmu::ItemInstance* parent_item = m_inv.GetItem(EQEmu::InventoryProfile::CalcSlotId(i)); if (parent_item && parent_item->GetItem()->ID == 17899) // trader satchel continue; @@ -3486,7 +3486,7 @@ bool Client::DoItemEnterZone(uint32 slot_x, uint32 slot_y) { uint16 oldexp = inst->GetExp(); parse->EventItem(EVENT_ITEM_ENTER_ZONE, this, inst, nullptr, "", 0); - if (i <= EQEmu::inventory::slotAmmo || i == EQEmu::inventory::slotPowerSource) { + if (i <= EQEmu::invslot::slotAmmo || i == EQEmu::invslot::SLOT_POWER_SOURCE) { parse->EventItem(EVENT_EQUIP_ITEM, this, inst, nullptr, "", i); } @@ -3496,7 +3496,7 @@ bool Client::DoItemEnterZone(uint32 slot_x, uint32 slot_y) { update_slot = true; } } else { - if (i <= EQEmu::inventory::slotAmmo || i == EQEmu::inventory::slotPowerSource) { + if (i <= EQEmu::invslot::slotAmmo || i == EQEmu::invslot::SLOT_POWER_SOURCE) { parse->EventItem(EVENT_EQUIP_ITEM, this, inst, nullptr, "", i); } @@ -3504,7 +3504,7 @@ bool Client::DoItemEnterZone(uint32 slot_x, uint32 slot_y) { } //iterate all augments - for (int x = EQEmu::inventory::socketBegin; x < EQEmu::inventory::SocketCount; ++x) + for (int x = EQEmu::invaug::SOCKET_BEGIN; x <= EQEmu::invaug::SOCKET_END; ++x) { EQEmu::ItemInstance *a_inst = inst->GetAugment(x); if(!a_inst) diff --git a/zone/bot.cpp b/zone/bot.cpp index 24a0a49d9..30918138d 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -243,8 +243,8 @@ void Bot::SetBotSpellID(uint32 newSpellID) { } uint32 Bot::GetBotArcheryRange() { - const EQEmu::ItemInstance *range_inst = GetBotItem(EQEmu::inventory::slotRange); - const EQEmu::ItemInstance *ammo_inst = GetBotItem(EQEmu::inventory::slotAmmo); + const EQEmu::ItemInstance *range_inst = GetBotItem(EQEmu::invslot::slotRange); + const EQEmu::ItemInstance *ammo_inst = GetBotItem(EQEmu::invslot::slotAmmo); if (!range_inst || !ammo_inst) return 0; @@ -260,15 +260,15 @@ uint32 Bot::GetBotArcheryRange() { void Bot::ChangeBotArcherWeapons(bool isArcher) { if((GetClass()==WARRIOR) || (GetClass()==PALADIN) || (GetClass()==RANGER) || (GetClass()==SHADOWKNIGHT) || (GetClass()==ROGUE)) { if(!isArcher) { - BotAddEquipItem(EQEmu::inventory::slotPrimary, GetBotItemBySlot(EQEmu::inventory::slotPrimary)); - BotAddEquipItem(EQEmu::inventory::slotSecondary, GetBotItemBySlot(EQEmu::inventory::slotSecondary)); + BotAddEquipItem(EQEmu::invslot::slotPrimary, GetBotItemBySlot(EQEmu::invslot::slotPrimary)); + BotAddEquipItem(EQEmu::invslot::slotSecondary, GetBotItemBySlot(EQEmu::invslot::slotSecondary)); SetAttackTimer(); BotGroupSay(this, "My blade is ready"); } else { - BotRemoveEquipItem(EQEmu::inventory::slotPrimary); - BotRemoveEquipItem(EQEmu::inventory::slotSecondary); - BotAddEquipItem(EQEmu::inventory::slotAmmo, GetBotItemBySlot(EQEmu::inventory::slotAmmo)); - BotAddEquipItem(EQEmu::inventory::slotSecondary, GetBotItemBySlot(EQEmu::inventory::slotRange)); + BotRemoveEquipItem(EQEmu::invslot::slotPrimary); + BotRemoveEquipItem(EQEmu::invslot::slotSecondary); + BotAddEquipItem(EQEmu::invslot::slotAmmo, GetBotItemBySlot(EQEmu::invslot::slotAmmo)); + BotAddEquipItem(EQEmu::invslot::slotSecondary, GetBotItemBySlot(EQEmu::invslot::slotRange)); SetAttackTimer(); BotGroupSay(this, "My bow is true and ready"); } @@ -1166,11 +1166,11 @@ int32 Bot::acmod() { uint16 Bot::GetPrimarySkillValue() { EQEmu::skills::SkillType skill = EQEmu::skills::HIGHEST_SKILL; //because nullptr == 0, which is 1H Slashing, & we want it to return 0 from GetSkill - bool equiped = m_inv.GetItem(EQEmu::inventory::slotPrimary); + bool equiped = m_inv.GetItem(EQEmu::invslot::slotPrimary); if(!equiped) skill = EQEmu::skills::SkillHandtoHand; else { - uint8 type = m_inv.GetItem(EQEmu::inventory::slotPrimary)->GetItem()->ItemType; //is this the best way to do this? + uint8 type = m_inv.GetItem(EQEmu::invslot::slotPrimary)->GetItem()->ItemType; //is this the best way to do this? switch(type) { case EQEmu::item::ItemType1HSlash: skill = EQEmu::skills::Skill1HSlashing; @@ -1718,8 +1718,8 @@ bool Bot::LoadPet() if (!botdb.LoadPetBuffs(GetBotID(), pet_buffs)) bot_owner->Message(13, "%s for %s's pet", BotDatabase::fail::LoadPetBuffs(), GetCleanName()); - uint32 pet_items[EQEmu::legacy::EQUIPMENT_SIZE]; - memset(pet_items, 0, (sizeof(uint32) * EQEmu::legacy::EQUIPMENT_SIZE)); + uint32 pet_items[EQEmu::invslot::EQUIPMENT_COUNT]; + memset(pet_items, 0, (sizeof(uint32) * EQEmu::invslot::EQUIPMENT_COUNT)); if (!botdb.LoadPetItems(GetBotID(), pet_items)) bot_owner->Message(13, "%s for %s's pet", BotDatabase::fail::LoadPetItems(), GetCleanName()); @@ -1746,11 +1746,11 @@ bool Bot::SavePet() char* pet_name = new char[64]; SpellBuff_Struct pet_buffs[PET_BUFF_COUNT]; - uint32 pet_items[EQEmu::legacy::EQUIPMENT_SIZE]; + uint32 pet_items[EQEmu::invslot::EQUIPMENT_COUNT]; memset(pet_name, 0, 64); memset(pet_buffs, 0, (sizeof(SpellBuff_Struct) * PET_BUFF_COUNT)); - memset(pet_items, 0, (sizeof(uint32) * EQEmu::legacy::EQUIPMENT_SIZE)); + memset(pet_items, 0, (sizeof(uint32) * EQEmu::invslot::EQUIPMENT_COUNT)); pet_inst->GetPetState(pet_buffs, pet_items, pet_name); @@ -1904,12 +1904,12 @@ void Bot::BotRangedAttack(Mob* other) { return; } - EQEmu::ItemInstance* rangedItem = GetBotItem(EQEmu::inventory::slotRange); + EQEmu::ItemInstance* rangedItem = GetBotItem(EQEmu::invslot::slotRange); const EQEmu::ItemData* RangeWeapon = nullptr; if(rangedItem) RangeWeapon = rangedItem->GetItem(); - EQEmu::ItemInstance* ammoItem = GetBotItem(EQEmu::inventory::slotAmmo); + EQEmu::ItemInstance* ammoItem = GetBotItem(EQEmu::invslot::slotAmmo); const EQEmu::ItemData* Ammo = nullptr; if(ammoItem) Ammo = ammoItem->GetItem(); @@ -2003,19 +2003,19 @@ void Bot::ApplySpecialAttackMod(EQEmu::skills::SkillType skill, int32 &dmg, int3 case EQEmu::skills::SkillFlyingKick: case EQEmu::skills::SkillRoundKick: case EQEmu::skills::SkillKick: - item_slot = EQEmu::inventory::slotFeet; + item_slot = EQEmu::invslot::slotFeet; break; case EQEmu::skills::SkillBash: - item_slot = EQEmu::inventory::slotSecondary; + item_slot = EQEmu::invslot::slotSecondary; break; case EQEmu::skills::SkillDragonPunch: case EQEmu::skills::SkillEagleStrike: case EQEmu::skills::SkillTigerClaw: - item_slot = EQEmu::inventory::slotHands; + item_slot = EQEmu::invslot::slotHands; break; } - if (item_slot >= EQEmu::legacy::EQUIPMENT_BEGIN){ + if (item_slot >= EQEmu::invslot::EQUIPMENT_BEGIN){ const EQEmu::ItemInstance* inst = GetBotItem(item_slot); const EQEmu::ItemData* botweapon = nullptr; if(inst) @@ -2312,8 +2312,8 @@ void Bot::AI_Process() { bool atCombatRange = false; - const auto* p_item = GetBotItem(EQEmu::inventory::slotPrimary); - const auto* s_item = GetBotItem(EQEmu::inventory::slotSecondary); + const auto* p_item = GetBotItem(EQEmu::invslot::slotPrimary); + const auto* s_item = GetBotItem(EQEmu::invslot::slotSecondary); bool behind_mob = false; bool backstab_weapon = false; @@ -2589,31 +2589,31 @@ void Bot::AI_Process() { TEST_TARGET(); if (attack_timer.Check()) { // Process primary weapon attacks - Attack(tar, EQEmu::inventory::slotPrimary); + Attack(tar, EQEmu::invslot::slotPrimary); TEST_TARGET(); - TriggerDefensiveProcs(tar, EQEmu::inventory::slotPrimary, false); + TriggerDefensiveProcs(tar, EQEmu::invslot::slotPrimary, false); TEST_TARGET(); - TryWeaponProc(p_item, tar, EQEmu::inventory::slotPrimary); + TryWeaponProc(p_item, tar, EQEmu::invslot::slotPrimary); //bool tripleSuccess = false; TEST_TARGET(); if (CanThisClassDoubleAttack()) { if (CheckBotDoubleAttack()) - Attack(tar, EQEmu::inventory::slotPrimary, true); + Attack(tar, EQEmu::invslot::slotPrimary, true); TEST_TARGET(); if (GetSpecialAbility(SPECATK_TRIPLE) && CheckBotDoubleAttack(true)) { //tripleSuccess = true; - Attack(tar, EQEmu::inventory::slotPrimary, true); + Attack(tar, EQEmu::invslot::slotPrimary, true); } TEST_TARGET(); //quad attack, does this belong here?? if (GetSpecialAbility(SPECATK_QUAD) && CheckBotDoubleAttack(true)) - Attack(tar, EQEmu::inventory::slotPrimary, true); + Attack(tar, EQEmu::invslot::slotPrimary, true); } TEST_TARGET(); @@ -2622,10 +2622,10 @@ void Bot::AI_Process() { if (flurrychance) { if (zone->random.Int(0, 100) < flurrychance) { Message_StringID(MT_NPCFlurry, YOU_FLURRY); - Attack(tar, EQEmu::inventory::slotPrimary, false); + Attack(tar, EQEmu::invslot::slotPrimary, false); TEST_TARGET(); - Attack(tar, EQEmu::inventory::slotPrimary, false); + Attack(tar, EQEmu::invslot::slotPrimary, false); } } @@ -2634,7 +2634,7 @@ void Bot::AI_Process() { if (ExtraAttackChanceBonus) { if (p_item && p_item->GetItem()->IsType2HWeapon()) { if (zone->random.Int(0, 100) < ExtraAttackChanceBonus) - Attack(tar, EQEmu::inventory::slotPrimary, false); + Attack(tar, EQEmu::invslot::slotPrimary, false); } } } @@ -2666,15 +2666,15 @@ void Bot::AI_Process() { float random = zone->random.Real(0, 1); if (random < DualWieldProbability){ // Max 78% of DW - Attack(tar, EQEmu::inventory::slotSecondary); // Single attack with offhand + Attack(tar, EQEmu::invslot::slotSecondary); // Single attack with offhand TEST_TARGET(); - TryWeaponProc(s_item, tar, EQEmu::inventory::slotSecondary); + TryWeaponProc(s_item, tar, EQEmu::invslot::slotSecondary); TEST_TARGET(); if (CanThisClassDoubleAttack() && CheckBotDoubleAttack()) { if (tar->GetHP() > -10) - Attack(tar, EQEmu::inventory::slotSecondary); // Single attack with offhand + Attack(tar, EQEmu::invslot::slotSecondary); // Single attack with offhand } } } @@ -2945,12 +2945,12 @@ void Bot::PetAIProcess() { if(!botPet->BehindMob(botPet->GetTarget(), botPet->GetX(), botPet->GetY()) && botPet->GetTarget()->IsEnraged()) return; - if (botPet->Attack(GetTarget(), EQEmu::inventory::slotPrimary)) // try the main hand + if (botPet->Attack(GetTarget(), EQEmu::invslot::slotPrimary)) // try the main hand if (botPet->GetTarget()) { // We're a pet so we re able to dual attack int32 RandRoll = zone->random.Int(0, 99); if (botPet->CanThisClassDoubleAttack() && (RandRoll < (botPet->GetLevel() + NPCDualAttackModifier))) { - if (botPet->Attack(botPet->GetTarget(), EQEmu::inventory::slotPrimary)) {} + if (botPet->Attack(botPet->GetTarget(), EQEmu::invslot::slotPrimary)) {} } } @@ -2988,11 +2988,11 @@ void Bot::PetAIProcess() { float DualWieldProbability = ((botPet->GetSkill(EQEmu::skills::SkillDualWield) + botPet->GetLevel()) / 400.0f); DualWieldProbability -= zone->random.Real(0, 1); if(DualWieldProbability < 0) { - botPet->Attack(botPet->GetTarget(), EQEmu::inventory::slotSecondary); + botPet->Attack(botPet->GetTarget(), EQEmu::invslot::slotSecondary); if (botPet->CanThisClassDoubleAttack()) { int32 RandRoll = zone->random.Int(0, 99); if (RandRoll < (botPet->GetLevel() + 20)) - botPet->Attack(botPet->GetTarget(), EQEmu::inventory::slotSecondary); + botPet->Attack(botPet->GetTarget(), EQEmu::invslot::slotSecondary); } } } @@ -3117,7 +3117,7 @@ bool Bot::Spawn(Client* botCharacterOwner) { // I re-enabled this until I can sort it out uint32 itemID = 0; uint8 materialFromSlot = 0xFF; - for (int i = EQEmu::legacy::EQUIPMENT_BEGIN; i <= EQEmu::legacy::EQUIPMENT_END; ++i) { + for (int i = EQEmu::invslot::EQUIPMENT_BEGIN; i <= EQEmu::invslot::EQUIPMENT_END; ++i) { itemID = GetBotItemBySlot(i); if(itemID != 0) { materialFromSlot = EQEmu::InventoryProfile::CalcMaterialFromSlot(i); @@ -3225,7 +3225,7 @@ void Bot::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) { } } - inst = GetBotItem(EQEmu::inventory::slotPrimary); + inst = GetBotItem(EQEmu::invslot::slotPrimary); if(inst) { item = inst->GetItem(); if(item) { @@ -3236,7 +3236,7 @@ void Bot::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) { } } - inst = GetBotItem(EQEmu::inventory::slotSecondary); + inst = GetBotItem(EQEmu::invslot::slotSecondary); if(inst) { item = inst->GetItem(); if(item) { @@ -3617,12 +3617,12 @@ void Bot::FinishTrade(Client* client, BotTradeType tradeType) if (tradeType == BotTradeClientNormal) { // Items being traded are found in the normal trade window used to trade between a Client and a Client or NPC // Items in this mode are found in slot ids 3000 thru 3003 - thought bots used the full 8-slot window..? - PerformTradeWithClient(EQEmu::legacy::TRADE_BEGIN, EQEmu::legacy::TRADE_END, client); // {3000..3007} + PerformTradeWithClient(EQEmu::invslot::TRADE_BEGIN, EQEmu::invslot::TRADE_END, client); // {3000..3007} } else if (tradeType == BotTradeClientNoDropNoTrade) { // Items being traded are found on the Client's cursor slot, slot id 30. This item can be either a single item or it can be a bag. // If it is a bag, then we have to search for items in slots 331 thru 340 - PerformTradeWithClient(EQEmu::inventory::slotCursor, EQEmu::inventory::slotCursor, client); + PerformTradeWithClient(EQEmu::invslot::slotCursor, EQEmu::invslot::slotCursor, client); // TODO: Add logic here to test if the item in SLOT_CURSOR is a container type, if it is then we need to call the following: // PerformTradeWithClient(331, 340, client); @@ -3641,7 +3641,7 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli int adjustStackSize; std::string acceptedItemName; - ClientTrade(const ItemInstance* item, int16 from, const char* name = "") : tradeItemInstance(item), fromClientSlot(from), toBotSlot(legacy::SLOT_INVALID), adjustStackSize(0), acceptedItemName(name) { } + ClientTrade(const ItemInstance* item, int16 from, const char* name = "") : tradeItemInstance(item), fromClientSlot(from), toBotSlot(invslot::SLOT_INVALID), adjustStackSize(0), acceptedItemName(name) { } }; struct ClientReturn { @@ -3651,18 +3651,18 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli int adjustStackSize; std::string failedItemName; - ClientReturn(const ItemInstance* item, int16 from, const char* name = "") : returnItemInstance(item), fromBotSlot(from), toClientSlot(legacy::SLOT_INVALID), adjustStackSize(0), failedItemName(name) { } + ClientReturn(const ItemInstance* item, int16 from, const char* name = "") : returnItemInstance(item), fromBotSlot(from), toClientSlot(invslot::SLOT_INVALID), adjustStackSize(0), failedItemName(name) { } }; static const int16 proxyPowerSource = 22; - static const int16 bot_equip_order[(legacy::EQUIPMENT_SIZE + 1)] = { - inventory::slotCharm, inventory::slotEar1, inventory::slotHead, inventory::slotFace, - inventory::slotEar2, inventory::slotNeck, inventory::slotShoulders, inventory::slotArms, - inventory::slotBack, inventory::slotWrist1, inventory::slotWrist2, inventory::slotRange, - inventory::slotHands, inventory::slotPrimary, inventory::slotSecondary, inventory::slotFinger1, - inventory::slotFinger2, inventory::slotChest, inventory::slotLegs, inventory::slotFeet, - inventory::slotWaist, inventory::slotAmmo, proxyPowerSource // inventory::slotPowerSource + static const int16 bot_equip_order[(invslot::CORPSE_BEGIN + 1)] = { + invslot::slotCharm, invslot::slotEar1, invslot::slotHead, invslot::slotFace, + invslot::slotEar2, invslot::slotNeck, invslot::slotShoulders, invslot::slotArms, + invslot::slotBack, invslot::slotWrist1, invslot::slotWrist2, invslot::slotRange, + invslot::slotHands, invslot::slotPrimary, invslot::slotSecondary, invslot::slotFinger1, + invslot::slotFinger2, invslot::slotChest, invslot::slotLegs, invslot::slotFeet, + invslot::slotWaist, invslot::slotAmmo, proxyPowerSource // invslot::SLOT_POWER_SOURCE }; enum { stageStackable = 0, stageEmpty, stageReplaceable }; @@ -3677,17 +3677,17 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli client->ResetTrade(); return; } - if ((beginSlotID != legacy::TRADE_BEGIN) && (beginSlotID != inventory::slotCursor)) { + if ((beginSlotID != invslot::TRADE_BEGIN) && (beginSlotID != invslot::slotCursor)) { client->Message(CC_Red, "Trade request processing from illegal 'begin' slot - Trade Canceled."); client->ResetTrade(); return; } - if ((endSlotID != legacy::TRADE_END) && (endSlotID != inventory::slotCursor)) { + if ((endSlotID != invslot::TRADE_END) && (endSlotID != invslot::slotCursor)) { client->Message(CC_Red, "Trade request processing from illegal 'end' slot - Trade Canceled."); client->ResetTrade(); return; } - if (((beginSlotID == inventory::slotCursor) && (endSlotID != inventory::slotCursor)) || ((beginSlotID != inventory::slotCursor) && (endSlotID == inventory::slotCursor))) { + if (((beginSlotID == invslot::slotCursor) && (endSlotID != invslot::slotCursor)) || ((beginSlotID != invslot::slotCursor) && (endSlotID == invslot::slotCursor))) { client->Message(CC_Red, "Trade request processing illegal slot range - Trade Canceled."); client->ResetTrade(); return; @@ -3718,7 +3718,7 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli client->ResetTrade(); return; } - if ((trade_index != inventory::slotCursor) && !trade_instance->IsDroppable()) { + if ((trade_index != invslot::slotCursor) && !trade_instance->IsDroppable()) { // TODO: add logging client->Message(CC_Red, "Trade hack detected - Trade Canceled."); client->ResetTrade(); @@ -3781,7 +3781,7 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli //for (unsigned stage_loop = stageStackable; stage_loop <= stageReplaceable; ++stage_loop) { // awaiting implementation for (unsigned stage_loop = stageEmpty; stage_loop <= stageReplaceable; ++stage_loop) { for (auto& trade_iterator : client_trade) { - if (trade_iterator.toBotSlot != legacy::SLOT_INVALID) + if (trade_iterator.toBotSlot != invslot::SLOT_INVALID) continue; auto trade_instance = trade_iterator.tradeItemInstance; @@ -3798,7 +3798,7 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli //} if (stage_loop != stageReplaceable) { - if ((index == proxyPowerSource) && m_inv[inventory::slotPowerSource]) + if ((index == proxyPowerSource) && m_inv[invslot::SLOT_POWER_SOURCE]) continue; else if (m_inv[index]) continue; @@ -3817,28 +3817,28 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli if (slot_taken) continue; - if (index == inventory::slotPrimary) { + if (index == invslot::slotPrimary) { if (trade_instance->GetItem()->IsType2HWeapon()) { if (!melee_secondary) { melee_2h_weapon = true; - auto equipped_secondary_weapon = m_inv[inventory::slotSecondary]; + auto equipped_secondary_weapon = m_inv[invslot::slotSecondary]; if (equipped_secondary_weapon) - client_return.push_back(ClientReturn(equipped_secondary_weapon, inventory::slotSecondary)); + client_return.push_back(ClientReturn(equipped_secondary_weapon, invslot::slotSecondary)); } else { continue; } } } - if (index == inventory::slotSecondary) { + if (index == invslot::slotSecondary) { if (!melee_2h_weapon) { if ((can_dual_wield && trade_instance->GetItem()->IsType1HWeapon()) || trade_instance->GetItem()->IsTypeShield() || !trade_instance->IsWeapon()) { melee_secondary = true; - auto equipped_primary_weapon = m_inv[inventory::slotPrimary]; + auto equipped_primary_weapon = m_inv[invslot::slotPrimary]; if (equipped_primary_weapon && equipped_primary_weapon->GetItem()->IsType2HWeapon()) - client_return.push_back(ClientReturn(equipped_primary_weapon, inventory::slotPrimary)); + client_return.push_back(ClientReturn(equipped_primary_weapon, invslot::slotPrimary)); } else { continue; @@ -3850,10 +3850,10 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli } if (index == proxyPowerSource) { - trade_iterator.toBotSlot = inventory::slotPowerSource; + trade_iterator.toBotSlot = invslot::SLOT_POWER_SOURCE; - if (m_inv[inventory::slotPowerSource]) - client_return.push_back(ClientReturn(m_inv[inventory::slotPowerSource], inventory::slotPowerSource)); + if (m_inv[invslot::SLOT_POWER_SOURCE]) + client_return.push_back(ClientReturn(m_inv[invslot::SLOT_POWER_SOURCE], invslot::SLOT_POWER_SOURCE)); } else { trade_iterator.toBotSlot = index; @@ -3869,7 +3869,7 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli // move unassignable items from trade list to return list for (std::list::iterator trade_iterator = client_trade.begin(); trade_iterator != client_trade.end();) { - if (trade_iterator->toBotSlot == legacy::SLOT_INVALID) { + if (trade_iterator->toBotSlot == invslot::SLOT_INVALID) { client_return.push_back(ClientReturn(trade_iterator->tradeItemInstance, trade_iterator->fromClientSlot, trade_iterator->tradeItemInstance->GetItem()->Name)); trade_iterator = client_trade.erase(trade_iterator); continue; @@ -3895,17 +3895,17 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli return; } - if (return_iterator.fromBotSlot == inventory::slotCursor) { - return_iterator.toClientSlot = inventory::slotCursor; + if (return_iterator.fromBotSlot == invslot::slotCursor) { + return_iterator.toClientSlot = invslot::slotCursor; } else { - int16 client_search_general = legacy::GENERAL_BEGIN; - uint8 client_search_bag = inventory::containerBegin; + int16 client_search_general = invslot::GENERAL_BEGIN; + uint8 client_search_bag = invbag::SLOT_BEGIN; bool run_search = true; while (run_search) { int16 client_test_slot = client->GetInv().FindFreeSlotForTradeItem(return_instance, client_search_general, client_search_bag); - if (client_test_slot == legacy::SLOT_INVALID) { + if (client_test_slot == invslot::SLOT_INVALID) { run_search = false; continue; } @@ -3915,26 +3915,26 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli if (check_iterator.fromBotSlot == return_iterator.fromBotSlot) continue; - if ((check_iterator.toClientSlot == client_test_slot) && (client_test_slot != inventory::slotCursor)) { + if ((check_iterator.toClientSlot == client_test_slot) && (client_test_slot != invslot::slotCursor)) { slot_taken = true; break; } } if (slot_taken) { - if ((client_test_slot >= legacy::GENERAL_BEGIN) && (client_test_slot <= legacy::GENERAL_END)) { + if ((client_test_slot >= invslot::GENERAL_BEGIN) && (client_test_slot <= invslot::GENERAL_END)) { ++client_search_general; - client_search_bag = inventory::containerBegin; + client_search_bag = invbag::SLOT_BEGIN; } else { client_search_general = InventoryProfile::CalcSlotId(client_test_slot); client_search_bag = InventoryProfile::CalcBagIdx(client_test_slot); ++client_search_bag; - if (client_search_bag >= inventory::ContainerCount) { + if (client_search_bag >= invbag::SLOT_COUNT) { // incrementing this past legacy::GENERAL_END triggers the (client_test_slot == legacy::SLOT_INVALID) at the beginning of the search loop // ideally, this will never occur because we always start fresh with each loop iteration and should receive SLOT_CURSOR as a return value ++client_search_general; - client_search_bag = inventory::containerBegin; + client_search_bag = invbag::SLOT_BEGIN; } } @@ -3946,7 +3946,7 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli } } - if (return_iterator.toClientSlot == legacy::SLOT_INVALID) { + if (return_iterator.toClientSlot == invslot::SLOT_INVALID) { client->Message(CC_Yellow, "You do not have room to complete this trade - Trade Canceled!"); client->ResetTrade(); return; @@ -3958,10 +3958,10 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli for (auto& return_iterator : client_return) { // TODO: code for stackables - if (return_iterator.fromBotSlot == inventory::slotCursor) { // failed trade return + if (return_iterator.fromBotSlot == invslot::slotCursor) { // failed trade return // no movement action required } - else if ((return_iterator.fromBotSlot >= legacy::TRADE_BEGIN) && (return_iterator.fromBotSlot <= legacy::TRADE_END)) { // failed trade returns + else if ((return_iterator.fromBotSlot >= invslot::TRADE_BEGIN) && (return_iterator.fromBotSlot <= invslot::TRADE_END)) { // failed trade returns client->PutItemInInventory(return_iterator.toClientSlot, *return_iterator.returnItemInstance); client->SendItemPacket(return_iterator.toClientSlot, return_iterator.returnItemInstance, ItemPacketTrade); client->DeleteItemInInventory(return_iterator.fromBotSlot); @@ -4174,13 +4174,13 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b FaceTarget(GetTarget()); EQEmu::ItemInstance* weapon = nullptr; - if (Hand == EQEmu::inventory::slotPrimary) { - weapon = GetBotItem(EQEmu::inventory::slotPrimary); + if (Hand == EQEmu::invslot::slotPrimary) { + weapon = GetBotItem(EQEmu::invslot::slotPrimary); OffHandAtk(false); } - if (Hand == EQEmu::inventory::slotSecondary) { - weapon = GetBotItem(EQEmu::inventory::slotSecondary); + if (Hand == EQEmu::invslot::slotSecondary) { + weapon = GetBotItem(EQEmu::invslot::slotSecondary); OffHandAtk(true); } @@ -4229,7 +4229,7 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b // This is not recommended for normal usage, as the damage bonus represents a non-trivial component of the DPS output // of weapons wielded by higher-level melee characters (especially for two-handed weapons). int ucDamageBonus = 0; - if (Hand == EQEmu::inventory::slotPrimary && GetLevel() >= 28 && IsWarriorClass()) { + if (Hand == EQEmu::invslot::slotPrimary && GetLevel() >= 28 && IsWarriorClass()) { // Damage bonuses apply only to hits from the main hand (Hand == MainPrimary) by characters level 28 and above // who belong to a melee class. If we're here, then all of these conditions apply. ucDamageBonus = GetWeaponDamageBonus(weapon ? weapon->GetItem() : (const EQEmu::ItemData*) nullptr); @@ -4238,7 +4238,7 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b } #endif //Live AA - Sinister Strikes *Adds weapon damage bonus to offhand weapon. - if (Hand == EQEmu::inventory::slotSecondary) { + if (Hand == EQEmu::invslot::slotSecondary) { if (aabonuses.SecondaryDmgInc || itembonuses.SecondaryDmgInc || spellbonuses.SecondaryDmgInc){ ucDamageBonus = GetWeaponDamageBonus(weapon ? weapon->GetItem() : (const EQEmu::ItemData*) nullptr); my_hit.min_damage = ucDamageBonus; @@ -4645,7 +4645,7 @@ int32 Bot::GetBotFocusEffect(BotfocusType bottype, uint16 spell_id) { int32 focus_max = 0; int32 focus_max_real = 0; //item focus - for (int x = EQEmu::legacy::EQUIPMENT_BEGIN; x <= EQEmu::legacy::EQUIPMENT_END; x++) { + for (int x = EQEmu::invslot::EQUIPMENT_BEGIN; x <= EQEmu::invslot::EQUIPMENT_END; x++) { TempItem = nullptr; EQEmu::ItemInstance* ins = GetBotItem(x); if (!ins) @@ -4670,7 +4670,7 @@ int32 Bot::GetBotFocusEffect(BotfocusType bottype, uint16 spell_id) { } } - for (int y = EQEmu::inventory::socketBegin; y < EQEmu::inventory::SocketCount; ++y) { + for (int y = EQEmu::invaug::SOCKET_BEGIN; y <= EQEmu::invaug::SOCKET_END; ++y) { EQEmu::ItemInstance *aug = nullptr; aug = ins->GetAugment(y); if(aug) { @@ -5106,13 +5106,13 @@ float Bot::GetProcChances(float ProcBonus, uint16 hand) { float ProcChance = 0.0f; uint32 weapon_speed = 0; switch (hand) { - case EQEmu::inventory::slotPrimary: + case EQEmu::invslot::slotPrimary: weapon_speed = attack_timer.GetDuration(); break; - case EQEmu::inventory::slotSecondary: + case EQEmu::invslot::slotSecondary: weapon_speed = attack_dw_timer.GetDuration(); break; - case EQEmu::inventory::slotRange: + case EQEmu::invslot::slotRange: weapon_speed = ranged_timer.GetDuration(); break; } @@ -5202,11 +5202,11 @@ void Bot::DoRiposte(Mob* defender) { if (!defender) return; - defender->Attack(this, EQEmu::inventory::slotPrimary, true); + defender->Attack(this, EQEmu::invslot::slotPrimary, true); int32 DoubleRipChance = (defender->GetAABonuses().GiveDoubleRiposte[0] + defender->GetSpellBonuses().GiveDoubleRiposte[0] + defender->GetItemBonuses().GiveDoubleRiposte[0]); if(DoubleRipChance && (DoubleRipChance >= zone->random.Int(0, 100))) { Log(Logs::Detail, Logs::Combat, "Preforming a double riposte (%d percent chance)", DoubleRipChance); - defender->Attack(this, EQEmu::inventory::slotPrimary, true); + defender->Attack(this, EQEmu::invslot::slotPrimary, true); } DoubleRipChance = defender->GetAABonuses().GiveDoubleRiposte[1]; @@ -5236,7 +5236,7 @@ int Bot::GetBaseSkillDamage(EQEmu::skills::SkillType skill, Mob *target) base++; return base; case EQEmu::skills::SkillFrenzy: - if (GetBotItem(EQEmu::inventory::slotPrimary)) { + if (GetBotItem(EQEmu::invslot::slotPrimary)) { if (GetLevel() > 15) base += GetLevel() - 15; if (base > 23) @@ -5252,7 +5252,7 @@ int Bot::GetBaseSkillDamage(EQEmu::skills::SkillType skill, Mob *target) case EQEmu::skills::SkillFlyingKick: { float skill_bonus = skill_level / 9.0f; float ac_bonus = 0.0f; - auto inst = GetBotItem(EQEmu::inventory::slotFeet); + auto inst = GetBotItem(EQEmu::invslot::slotFeet); if (inst) ac_bonus = inst->GetItemArmorClass(true) / 25.0f; if (ac_bonus > skill_bonus) @@ -5262,7 +5262,7 @@ int Bot::GetBaseSkillDamage(EQEmu::skills::SkillType skill, Mob *target) case EQEmu::skills::SkillKick: { float skill_bonus = skill_level / 10.0f; float ac_bonus = 0.0f; - auto inst = GetBotItem(EQEmu::inventory::slotFeet); + auto inst = GetBotItem(EQEmu::invslot::slotFeet); if (inst) ac_bonus = inst->GetItemArmorClass(true) / 25.0f; if (ac_bonus > skill_bonus) @@ -5274,9 +5274,9 @@ int Bot::GetBaseSkillDamage(EQEmu::skills::SkillType skill, Mob *target) float ac_bonus = 0.0f; const EQEmu::ItemInstance *inst = nullptr; if (HasShieldEquiped()) - inst = GetBotItem(EQEmu::inventory::slotSecondary); + inst = GetBotItem(EQEmu::invslot::slotSecondary); else if (HasTwoHanderEquipped()) - inst = GetBotItem(EQEmu::inventory::slotPrimary); + inst = GetBotItem(EQEmu::invslot::slotPrimary); if (inst) ac_bonus = inst->GetItemArmorClass(true) / 25.0f; if (ac_bonus > skill_bonus) @@ -5285,7 +5285,7 @@ int Bot::GetBaseSkillDamage(EQEmu::skills::SkillType skill, Mob *target) } case EQEmu::skills::SkillBackstab: { float skill_bonus = static_cast(skill_level) * 0.02f; - auto inst = GetBotItem(EQEmu::inventory::slotPrimary); + auto inst = GetBotItem(EQEmu::invslot::slotPrimary); if (inst && inst->GetItem() && inst->GetItem()->ItemType == EQEmu::item::ItemType1HPiercing) { base = inst->GetItemBackstabDamage(true); if (!inst->GetItemBackstabDamage()) @@ -5310,7 +5310,7 @@ void Bot::DoSpecialAttackDamage(Mob *who, EQEmu::skills::SkillType skill, int32 hate = hate_override; if (skill == EQEmu::skills::SkillBash) { - const EQEmu::ItemInstance* inst = GetBotItem(EQEmu::inventory::slotSecondary); + const EQEmu::ItemInstance* inst = GetBotItem(EQEmu::invslot::slotSecondary); const EQEmu::ItemData* botweapon = nullptr; if(inst) botweapon = inst->GetItem(); @@ -5331,10 +5331,10 @@ void Bot::DoSpecialAttackDamage(Mob *who, EQEmu::skills::SkillType skill, int32 my_hit.skill = skill; my_hit.offense = offense(my_hit.skill); my_hit.tohit = GetTotalToHit(my_hit.skill, 0); - my_hit.hand = EQEmu::inventory::slotPrimary; + my_hit.hand = EQEmu::invslot::slotPrimary; if (skill == EQEmu::skills::SkillThrowing || skill == EQEmu::skills::SkillArchery) - my_hit.hand = EQEmu::inventory::slotRange; + my_hit.hand = EQEmu::invslot::slotRange; DoAttack(who, my_hit); @@ -5371,7 +5371,7 @@ void Bot::TryBackstab(Mob *other, int ReuseTime) { bool bIsBehind = false; bool bCanFrontalBS = false; - const EQEmu::ItemInstance* inst = GetBotItem(EQEmu::inventory::slotPrimary); + const EQEmu::ItemInstance* inst = GetBotItem(EQEmu::invslot::slotPrimary); const EQEmu::ItemData* botpiercer = nullptr; if(inst) botpiercer = inst->GetItem(); @@ -5414,7 +5414,7 @@ void Bot::TryBackstab(Mob *other, int ReuseTime) { m_specialattacks = eSpecialAttacks::None; } else - Attack(other, EQEmu::inventory::slotPrimary); + Attack(other, EQEmu::invslot::slotPrimary); } void Bot::RogueBackstab(Mob *other, bool min_damage, int ReuseTime) @@ -5422,7 +5422,7 @@ void Bot::RogueBackstab(Mob *other, bool min_damage, int ReuseTime) if (!other) return; - EQEmu::ItemInstance *botweaponInst = GetBotItem(EQEmu::inventory::slotPrimary); + EQEmu::ItemInstance *botweaponInst = GetBotItem(EQEmu::invslot::slotPrimary); if (botweaponInst) { if (!GetWeaponDamage(other, botweaponInst)) return; @@ -5440,7 +5440,7 @@ void Bot::RogueBackstab(Mob *other, bool min_damage, int ReuseTime) } void Bot::RogueAssassinate(Mob* other) { - EQEmu::ItemInstance* botweaponInst = GetBotItem(EQEmu::inventory::slotPrimary); + EQEmu::ItemInstance* botweaponInst = GetBotItem(EQEmu::invslot::slotPrimary); if(botweaponInst) { if(GetWeaponDamage(other, botweaponInst)) other->Damage(this, 32000, SPELL_UNKNOWN, EQEmu::skills::SkillBackstab); @@ -5505,7 +5505,7 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) { case WARRIOR: if(level >= RuleI(Combat, NPCBashKickLevel)){ bool canBash = false; - if ((GetRace() == OGRE || GetRace() == TROLL || GetRace() == BARBARIAN) || (m_inv.GetItem(EQEmu::inventory::slotSecondary) && m_inv.GetItem(EQEmu::inventory::slotSecondary)->GetItem()->ItemType == EQEmu::item::ItemTypeShield) || (m_inv.GetItem(EQEmu::inventory::slotPrimary) && m_inv.GetItem(EQEmu::inventory::slotPrimary)->GetItem()->IsType2HWeapon() && GetAA(aa2HandBash) >= 1)) + if ((GetRace() == OGRE || GetRace() == TROLL || GetRace() == BARBARIAN) || (m_inv.GetItem(EQEmu::invslot::slotSecondary) && m_inv.GetItem(EQEmu::invslot::slotSecondary)->GetItem()->ItemType == EQEmu::item::ItemTypeShield) || (m_inv.GetItem(EQEmu::invslot::slotPrimary) && m_inv.GetItem(EQEmu::invslot::slotPrimary)->GetItem()->IsType2HWeapon() && GetAA(aa2HandBash) >= 1)) canBash = true; if(!canBash || zone->random.Int(0, 100) > 25) @@ -5524,7 +5524,7 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) { case SHADOWKNIGHT: case PALADIN: if(level >= RuleI(Combat, NPCBashKickLevel)){ - if ((GetRace() == OGRE || GetRace() == TROLL || GetRace() == BARBARIAN) || (m_inv.GetItem(EQEmu::inventory::slotSecondary) && m_inv.GetItem(EQEmu::inventory::slotSecondary)->GetItem()->ItemType == EQEmu::item::ItemTypeShield) || (m_inv.GetItem(EQEmu::inventory::slotPrimary) && m_inv.GetItem(EQEmu::inventory::slotPrimary)->GetItem()->IsType2HWeapon() && GetAA(aa2HandBash) >= 1)) + if ((GetRace() == OGRE || GetRace() == TROLL || GetRace() == BARBARIAN) || (m_inv.GetItem(EQEmu::invslot::slotSecondary) && m_inv.GetItem(EQEmu::invslot::slotSecondary)->GetItem()->ItemType == EQEmu::item::ItemTypeShield) || (m_inv.GetItem(EQEmu::invslot::slotPrimary) && m_inv.GetItem(EQEmu::invslot::slotPrimary)->GetItem()->IsType2HWeapon() && GetAA(aa2HandBash) >= 1)) skill_to_use = EQEmu::skills::SkillBash; } break; @@ -5555,7 +5555,7 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) { if (skill_to_use == EQEmu::skills::SkillBash) { if (target != this) { DoAnim(animTailRake); - if (GetWeaponDamage(target, GetBotItem(EQEmu::inventory::slotSecondary)) <= 0 && GetWeaponDamage(target, GetBotItem(EQEmu::inventory::slotShoulders)) <= 0) + if (GetWeaponDamage(target, GetBotItem(EQEmu::invslot::slotSecondary)) <= 0 && GetWeaponDamage(target, GetBotItem(EQEmu::invslot::slotShoulders)) <= 0) dmg = DMG_INVULNERABLE; reuse = (BashReuseTime * 1000); @@ -5582,7 +5582,7 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) { if (skill_to_use == EQEmu::skills::SkillKick) { if(target != this) { DoAnim(animKick); - if (GetWeaponDamage(target, GetBotItem(EQEmu::inventory::slotFeet)) <= 0) + if (GetWeaponDamage(target, GetBotItem(EQEmu::invslot::slotFeet)) <= 0) dmg = DMG_INVULNERABLE; reuse = (KickReuseTime * 1000); @@ -5720,7 +5720,7 @@ void Bot::EquipBot(std::string* errorMessage) { GetBotItems(m_inv, errorMessage); const EQEmu::ItemInstance* inst = nullptr; const EQEmu::ItemData* item = nullptr; - for (int i = EQEmu::legacy::EQUIPMENT_BEGIN; i <= EQEmu::legacy::EQUIPMENT_END; ++i) { + for (int i = EQEmu::invslot::EQUIPMENT_BEGIN; i <= EQEmu::invslot::EQUIPMENT_END; ++i) { inst = GetBotItem(i); if(inst) { item = inst->GetItem(); @@ -5847,12 +5847,12 @@ void Bot::SetAttackTimer() { attack_timer.SetAtTrigger(4000, true); Timer* TimerToUse = nullptr; const EQEmu::ItemData* PrimaryWeapon = nullptr; - for (int i = EQEmu::inventory::slotRange; i <= EQEmu::inventory::slotSecondary; i++) { - if (i == EQEmu::inventory::slotPrimary) + for (int i = EQEmu::invslot::slotRange; i <= EQEmu::invslot::slotSecondary; i++) { + if (i == EQEmu::invslot::slotPrimary) TimerToUse = &attack_timer; - else if (i == EQEmu::inventory::slotRange) + else if (i == EQEmu::invslot::slotRange) TimerToUse = &ranged_timer; - else if (i == EQEmu::inventory::slotSecondary) + else if (i == EQEmu::invslot::slotSecondary) TimerToUse = &attack_dw_timer; else continue; @@ -5862,7 +5862,7 @@ void Bot::SetAttackTimer() { if (ci) ItemToUse = ci->GetItem(); - if (i == EQEmu::inventory::slotSecondary) { + if (i == EQEmu::invslot::slotSecondary) { if (PrimaryWeapon != nullptr) { if (PrimaryWeapon->IsClassCommon() && PrimaryWeapon->IsType2HWeapon()) { attack_dw_timer.Disable(); @@ -5893,7 +5893,7 @@ void Bot::SetAttackTimer() { speed = (RuleB(Spells, Jun182014HundredHandsRevamp) ? static_cast(((delay / haste_mod) + ((hhe / 1000.0f) * (delay / haste_mod))) * 100) : static_cast(((delay / haste_mod) + ((hhe / 100.0f) * delay)) * 100)); TimerToUse->SetAtTrigger(std::max(RuleI(Combat, MinHastedDelay), speed), true, true); - if (i == EQEmu::inventory::slotPrimary) + if (i == EQEmu::invslot::slotPrimary) PrimaryWeapon = ItemToUse; } } @@ -7603,7 +7603,7 @@ void Bot::ProcessBotInspectionRequest(Bot* inspectedBot, Client* client) { // Modded to display power source items (will only show up on SoF+ client inspect windows though.) // I don't think bots are currently coded to use them..but, you'll have to use '#bot inventory list' // to see them on a Titanium client when/if they are activated. - for (int16 L = EQEmu::legacy::EQUIPMENT_BEGIN; L <= EQEmu::inventory::slotWaist; L++) { + for (int16 L = EQEmu::invslot::EQUIPMENT_BEGIN; L <= EQEmu::invslot::slotWaist; L++) { inst = inspectedBot->GetBotItem(L); if(inst) { @@ -7617,28 +7617,28 @@ void Bot::ProcessBotInspectionRequest(Bot* inspectedBot, Client* client) { } } - inst = inspectedBot->GetBotItem(EQEmu::inventory::slotPowerSource); + inst = inspectedBot->GetBotItem(EQEmu::invslot::SLOT_POWER_SOURCE); if(inst) { item = inst->GetItem(); if(item) { - strcpy(insr->itemnames[SoF::invslot::PossessionsPowerSource], item->Name); - insr->itemicons[SoF::invslot::PossessionsPowerSource] = item->Icon; + strcpy(insr->itemnames[SoF::invslot::slotPowerSource], item->Name); + insr->itemicons[SoF::invslot::slotPowerSource] = item->Icon; } else - insr->itemicons[SoF::invslot::PossessionsPowerSource] = 0xFFFFFFFF; + insr->itemicons[SoF::invslot::slotPowerSource] = 0xFFFFFFFF; } - inst = inspectedBot->GetBotItem(EQEmu::inventory::slotAmmo); + inst = inspectedBot->GetBotItem(EQEmu::invslot::slotAmmo); if(inst) { item = inst->GetItem(); if(item) { - strcpy(insr->itemnames[SoF::invslot::PossessionsAmmo], item->Name); - insr->itemicons[SoF::invslot::PossessionsAmmo] = item->Icon; + strcpy(insr->itemnames[SoF::invslot::slotAmmo], item->Name); + insr->itemicons[SoF::invslot::slotAmmo] = item->Icon; } else - insr->itemicons[SoF::invslot::PossessionsAmmo] = 0xFFFFFFFF; + insr->itemicons[SoF::invslot::slotAmmo] = 0xFFFFFFFF; } strcpy(insr->text, inspectedBot->GetInspectMessage().text); @@ -7651,7 +7651,7 @@ void Bot::CalcItemBonuses(StatBonuses* newbon) { const EQEmu::ItemData* itemtmp = nullptr; - for (int i = EQEmu::legacy::EQUIPMENT_BEGIN; i <= (EQEmu::legacy::EQUIPMENT_END + 1); ++i) { + for (int i = EQEmu::invslot::EQUIPMENT_BEGIN; i <= (EQEmu::invslot::EQUIPMENT_END + 1); ++i) { const EQEmu::ItemInstance* item = GetBotItem((i == 22 ? 9999 : i)); if(item) { AddItemBonuses(item, newbon); @@ -7964,7 +7964,7 @@ void Bot::AddItemBonuses(const EQEmu::ItemInstance *inst, StatBonuses* newbon, b if (!isAug) { - for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) + for (int i = EQEmu::invaug::SOCKET_BEGIN; i <= EQEmu::invaug::SOCKET_END; i++) AddItemBonuses(inst->GetAugment(i),newbon,true, false, rec_level); } @@ -8473,12 +8473,12 @@ uint8 Bot::GetNumberNeedingHealedInGroup(uint8 hpr, bool includePets) { int Bot::GetRawACNoShield(int &shield_ac) { int ac = itembonuses.AC + spellbonuses.AC; shield_ac = 0; - EQEmu::ItemInstance* inst = GetBotItem(EQEmu::inventory::slotSecondary); + EQEmu::ItemInstance* inst = GetBotItem(EQEmu::invslot::slotSecondary); if(inst) { if (inst->GetItem()->ItemType == EQEmu::item::ItemTypeShield) { ac -= inst->GetItem()->AC; shield_ac = inst->GetItem()->AC; - for (uint8 i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) { + for (uint8 i = EQEmu::invaug::SOCKET_BEGIN; i <= EQEmu::invaug::SOCKET_END; i++) { if(inst->GetAugment(i)) { ac -= inst->GetAugment(i)->GetItem()->AC; shield_ac += inst->GetAugment(i)->GetItem()->AC; @@ -8493,7 +8493,7 @@ uint32 Bot::CalcCurrentWeight() { const EQEmu::ItemData* TempItem = nullptr; EQEmu::ItemInstance* inst = nullptr; uint32 Total = 0; - for (int i = EQEmu::legacy::EQUIPMENT_BEGIN; i <= EQEmu::legacy::EQUIPMENT_END; ++i) { + for (int i = EQEmu::invslot::EQUIPMENT_BEGIN; i <= EQEmu::invslot::EQUIPMENT_END; ++i) { inst = GetBotItem(i); if(inst) { TempItem = inst->GetItem(); diff --git a/zone/bot.h b/zone/bot.h index c72e83f5c..0c48b6483 100644 --- a/zone/bot.h +++ b/zone/bot.h @@ -80,9 +80,9 @@ static const std::string bot_stance_name[BOT_STANCE_COUNT] = { static const char* GetBotStanceName(int stance_id) { return bot_stance_name[VALIDBOTSTANCE(stance_id)].c_str(); } -#define VALIDBOTEQUIPSLOT(x) ((x >= EQEmu::legacy::EQUIPMENT_BEGIN && x <= EQEmu::legacy::EQUIPMENT_END) ? (x) : ((x == EQEmu::inventory::slotPowerSource) ? (22) : (23))) +#define VALIDBOTEQUIPSLOT(x) ((x >= EQEmu::invslot::EQUIPMENT_BEGIN && x <= EQEmu::invslot::EQUIPMENT_END) ? (x) : ((x == EQEmu::invslot::SLOT_POWER_SOURCE) ? (22) : (23))) -static std::string bot_equip_slot_name[EQEmu::legacy::EQUIPMENT_SIZE + 2] = +static std::string bot_equip_slot_name[EQEmu::invslot::EQUIPMENT_COUNT + 2] = { "Charm", // MainCharm "Left Ear", // MainEar1 @@ -256,7 +256,7 @@ public: //abstract virtual function implementations requird by base abstract class virtual bool Death(Mob* killerMob, int32 damage, uint16 spell_id, EQEmu::skills::SkillType attack_skill); virtual void Damage(Mob* from, int32 damage, uint16 spell_id, EQEmu::skills::SkillType attack_skill, bool avoidable = true, int8 buffslot = -1, bool iBuffTic = false, eSpecialAttacks special = eSpecialAttacks::None); - virtual bool Attack(Mob* other, int Hand = EQEmu::inventory::slotPrimary, bool FromRiposte = false, bool IsStrikethrough = false, bool IsFromSpell = false, + virtual bool Attack(Mob* other, int Hand = EQEmu::invslot::slotPrimary, bool FromRiposte = false, bool IsStrikethrough = false, bool IsFromSpell = false, ExtraAttackOptions *opts = nullptr); virtual bool HasRaid() { return (GetRaid() ? true : false); } virtual bool HasGroup() { return (GetGroup() ? true : false); } diff --git a/zone/bot_command.cpp b/zone/bot_command.cpp index 7f5aa1a94..3344fd0fb 100644 --- a/zone/bot_command.cpp +++ b/zone/bot_command.cpp @@ -2403,7 +2403,7 @@ namespace ActionableBots continue; mod_skill_value = base_skill_value; - for (int16 index = EQEmu::legacy::EQUIPMENT_BEGIN; index <= EQEmu::legacy::EQUIPMENT_END; ++index) { + for (int16 index = EQEmu::invslot::EQUIPMENT_BEGIN; index <= EQEmu::invslot::EQUIPMENT_END; ++index) { const EQEmu::ItemInstance* indexed_item = bot_iter->GetBotItem(index); if (indexed_item && indexed_item->GetItem()->SkillModType == skill_type) mod_skill_value += (base_skill_value * (((float)indexed_item->GetItem()->SkillModValue) / 100.0f)); @@ -7137,23 +7137,23 @@ void bot_subcommand_inventory_list(Client *c, const Seperator *sep) linker.SetLinkType(EQEmu::saylink::SayLinkItemInst); uint32 inventory_count = 0; - for (int i = EQEmu::legacy::EQUIPMENT_BEGIN; i <= (EQEmu::legacy::EQUIPMENT_END + 1); ++i) { - if ((i == EQEmu::inventory::slotSecondary) && is2Hweapon) + for (int i = EQEmu::invslot::EQUIPMENT_BEGIN; i <= (EQEmu::invslot::EQUIPMENT_END + 1); ++i) { + if ((i == EQEmu::invslot::slotSecondary) && is2Hweapon) continue; - inst = my_bot->CastToBot()->GetBotItem(i == 22 ? EQEmu::inventory::slotPowerSource : i); + inst = my_bot->CastToBot()->GetBotItem(i == 22 ? EQEmu::invslot::SLOT_POWER_SOURCE : i); if (!inst || !inst->GetItem()) { - c->Message(m_message, "I need something for my %s (slot %i)", GetBotEquipSlotName(i), (i == 22 ? EQEmu::inventory::slotPowerSource : i)); + c->Message(m_message, "I need something for my %s (slot %i)", GetBotEquipSlotName(i), (i == 22 ? EQEmu::invslot::SLOT_POWER_SOURCE : i)); continue; } item = inst->GetItem(); - if ((i == EQEmu::inventory::slotPrimary) && item->IsType2HWeapon()) { + if ((i == EQEmu::invslot::slotPrimary) && item->IsType2HWeapon()) { is2Hweapon = true; } linker.SetItemInst(inst); - c->Message(m_message, "Using %s in my %s (slot %i)", linker.GenerateLink().c_str(), GetBotEquipSlotName(i), (i == 22 ? EQEmu::inventory::slotPowerSource : i)); + c->Message(m_message, "Using %s in my %s (slot %i)", linker.GenerateLink().c_str(), GetBotEquipSlotName(i), (i == 22 ? EQEmu::invslot::SLOT_POWER_SOURCE : i)); ++inventory_count; } @@ -7192,7 +7192,7 @@ void bot_subcommand_inventory_remove(Client *c, const Seperator *sep) } int slotId = atoi(sep->arg[1]); - if (!sep->IsNumber(1) || ((slotId > EQEmu::legacy::EQUIPMENT_END || slotId < EQEmu::legacy::EQUIPMENT_BEGIN) && slotId != EQEmu::inventory::slotPowerSource)) { + if (!sep->IsNumber(1) || ((slotId > EQEmu::invslot::EQUIPMENT_END || slotId < EQEmu::invslot::EQUIPMENT_BEGIN) && slotId != EQEmu::invslot::SLOT_POWER_SOURCE)) { c->Message(m_fail, "Valid slots are 0-21 or 9999"); return; } @@ -7207,7 +7207,7 @@ void bot_subcommand_inventory_remove(Client *c, const Seperator *sep) return; } - for (int m = EQEmu::inventory::socketBegin; m < EQEmu::inventory::SocketCount; ++m) { + for (int m = EQEmu::invaug::SOCKET_BEGIN; m <= EQEmu::invaug::SOCKET_END; ++m) { if (!itminst) break; @@ -7224,7 +7224,7 @@ void bot_subcommand_inventory_remove(Client *c, const Seperator *sep) std::string error_message; if (itm) { c->PushItemOnCursor(*itminst, true); - if ((slotId == EQEmu::inventory::slotRange) || (slotId == EQEmu::inventory::slotAmmo) || (slotId == EQEmu::inventory::slotPrimary) || (slotId == EQEmu::inventory::slotSecondary)) + if ((slotId == EQEmu::invslot::slotRange) || (slotId == EQEmu::invslot::slotAmmo) || (slotId == EQEmu::invslot::slotPrimary) || (slotId == EQEmu::invslot::slotSecondary)) my_bot->SetBotArcher(false); my_bot->RemoveBotItemBySlot(slotId, &error_message); @@ -7238,31 +7238,31 @@ void bot_subcommand_inventory_remove(Client *c, const Seperator *sep) } switch (slotId) { - case EQEmu::inventory::slotCharm: - case EQEmu::inventory::slotEar1: - case EQEmu::inventory::slotHead: - case EQEmu::inventory::slotFace: - case EQEmu::inventory::slotEar2: - case EQEmu::inventory::slotNeck: - case EQEmu::inventory::slotBack: - case EQEmu::inventory::slotWrist1: - case EQEmu::inventory::slotWrist2: - case EQEmu::inventory::slotRange: - case EQEmu::inventory::slotPrimary: - case EQEmu::inventory::slotSecondary: - case EQEmu::inventory::slotFinger1: - case EQEmu::inventory::slotFinger2: - case EQEmu::inventory::slotChest: - case EQEmu::inventory::slotWaist: - case EQEmu::inventory::slotPowerSource: - case EQEmu::inventory::slotAmmo: + case EQEmu::invslot::slotCharm: + case EQEmu::invslot::slotEar1: + case EQEmu::invslot::slotHead: + case EQEmu::invslot::slotFace: + case EQEmu::invslot::slotEar2: + case EQEmu::invslot::slotNeck: + case EQEmu::invslot::slotBack: + case EQEmu::invslot::slotWrist1: + case EQEmu::invslot::slotWrist2: + case EQEmu::invslot::slotRange: + case EQEmu::invslot::slotPrimary: + case EQEmu::invslot::slotSecondary: + case EQEmu::invslot::slotFinger1: + case EQEmu::invslot::slotFinger2: + case EQEmu::invslot::slotChest: + case EQEmu::invslot::slotWaist: + case EQEmu::invslot::SLOT_POWER_SOURCE: + case EQEmu::invslot::slotAmmo: c->Message(m_message, "My %s is %s unequipped", GetBotEquipSlotName(slotId), ((itm) ? ("now") : ("already"))); break; - case EQEmu::inventory::slotShoulders: - case EQEmu::inventory::slotArms: - case EQEmu::inventory::slotHands: - case EQEmu::inventory::slotLegs: - case EQEmu::inventory::slotFeet: + case EQEmu::invslot::slotShoulders: + case EQEmu::invslot::slotArms: + case EQEmu::invslot::slotHands: + case EQEmu::invslot::slotLegs: + case EQEmu::invslot::slotFeet: c->Message(m_message, "My %s are %s unequipped", GetBotEquipSlotName(slotId), ((itm) ? ("now") : ("already"))); break; default: @@ -7299,14 +7299,14 @@ void bot_subcommand_inventory_window(Client *c, const Seperator *sep) //EQEmu::SayLinkEngine linker; //linker.SetLinkType(EQEmu::saylink::SayLinkItemInst); - for (int i = EQEmu::legacy::EQUIPMENT_BEGIN; i <= (EQEmu::legacy::EQUIPMENT_END + 1); ++i) { + for (int i = EQEmu::invslot::EQUIPMENT_BEGIN; i <= (EQEmu::invslot::EQUIPMENT_END + 1); ++i) { const EQEmu::ItemData* item = nullptr; - const EQEmu::ItemInstance* inst = my_bot->CastToBot()->GetBotItem(i == 22 ? EQEmu::inventory::slotPowerSource : i); + const EQEmu::ItemInstance* inst = my_bot->CastToBot()->GetBotItem(i == 22 ? EQEmu::invslot::SLOT_POWER_SOURCE : i); if (inst) item = inst->GetItem(); window_text.append(""); - window_text.append(GetBotEquipSlotName(i == 22 ? EQEmu::inventory::slotPowerSource : i)); + window_text.append(GetBotEquipSlotName(i == 22 ? EQEmu::invslot::SLOT_POWER_SOURCE : i)); window_text.append(": "); if (item) { //window_text.append(""); diff --git a/zone/bot_database.cpp b/zone/bot_database.cpp index 10449ab7a..a5e50fdec 100644 --- a/zone/bot_database.cpp +++ b/zone/bot_database.cpp @@ -1138,7 +1138,7 @@ bool BotDatabase::LoadItems(const uint32 bot_id, EQEmu::InventoryProfile& invent for (auto row = results.begin(); row != results.end(); ++row) { int16 slot_id = atoi(row[0]); - if ((slot_id < EQEmu::legacy::EQUIPMENT_BEGIN || slot_id > EQEmu::legacy::EQUIPMENT_END) && slot_id != EQEmu::inventory::slotPowerSource) + if ((slot_id < EQEmu::invslot::EQUIPMENT_BEGIN || slot_id > EQEmu::invslot::EQUIPMENT_END) && slot_id != EQEmu::invslot::SLOT_POWER_SOURCE) continue; uint32 item_id = atoi(row[1]); @@ -1173,7 +1173,7 @@ bool BotDatabase::LoadItems(const uint32 bot_id, EQEmu::InventoryProfile& invent if (item_inst->GetItem()->Attuneable) { if (atoi(row[4])) item_inst->SetAttuned(true); - else if (((slot_id >= EQEmu::legacy::EQUIPMENT_BEGIN) && (slot_id <= EQEmu::legacy::EQUIPMENT_END) || slot_id == EQEmu::inventory::slotPowerSource)) + else if (((slot_id >= EQEmu::invslot::EQUIPMENT_BEGIN) && (slot_id <= EQEmu::invslot::EQUIPMENT_END) || slot_id == EQEmu::invslot::SLOT_POWER_SOURCE)) item_inst->SetAttuned(true); } @@ -1241,7 +1241,7 @@ bool BotDatabase::LoadItemBySlot(Bot* bot_inst) bool BotDatabase::LoadItemBySlot(const uint32 bot_id, const uint32 slot_id, uint32& item_id) { - if (!bot_id || (slot_id > EQEmu::legacy::EQUIPMENT_END && slot_id != EQEmu::inventory::slotPowerSource)) + if (!bot_id || (slot_id > EQEmu::invslot::EQUIPMENT_END && slot_id != EQEmu::invslot::SLOT_POWER_SOURCE)) return false; query = StringFormat("SELECT `item_id` FROM `bot_inventories` WHERE `bot_id` = '%i' AND `slot_id` = '%i' LIMIT 1", bot_id, slot_id); @@ -1259,7 +1259,7 @@ bool BotDatabase::LoadItemBySlot(const uint32 bot_id, const uint32 slot_id, uint bool BotDatabase::SaveItemBySlot(Bot* bot_inst, const uint32 slot_id, const EQEmu::ItemInstance* item_inst) { - if (!bot_inst || !bot_inst->GetBotID() || (slot_id > EQEmu::legacy::EQUIPMENT_END && slot_id != EQEmu::inventory::slotPowerSource)) + if (!bot_inst || !bot_inst->GetBotID() || (slot_id > EQEmu::invslot::EQUIPMENT_END && slot_id != EQEmu::invslot::SLOT_POWER_SOURCE)) return false; if (!DeleteItemBySlot(bot_inst->GetBotID(), slot_id)) @@ -1268,8 +1268,8 @@ bool BotDatabase::SaveItemBySlot(Bot* bot_inst, const uint32 slot_id, const EQEm if (!item_inst || !item_inst->GetID()) return true; - uint32 augment_id[EQEmu::inventory::SocketCount] = { 0, 0, 0, 0, 0, 0 }; - for (int augment_iter = EQEmu::inventory::socketBegin; augment_iter < EQEmu::inventory::SocketCount; ++augment_iter) + uint32 augment_id[EQEmu::invaug::SOCKET_COUNT] = { 0, 0, 0, 0, 0, 0 }; + for (int augment_iter = EQEmu::invaug::SOCKET_BEGIN; augment_iter <= EQEmu::invaug::SOCKET_END; ++augment_iter) augment_id[augment_iter] = item_inst->GetAugmentItemID(augment_iter); uint16 item_charges = 0; @@ -1343,7 +1343,7 @@ bool BotDatabase::SaveItemBySlot(Bot* bot_inst, const uint32 slot_id, const EQEm bool BotDatabase::DeleteItemBySlot(const uint32 bot_id, const uint32 slot_id) { - if (!bot_id || (slot_id > EQEmu::legacy::EQUIPMENT_END && slot_id != EQEmu::inventory::slotPowerSource)) + if (!bot_id || (slot_id > EQEmu::invslot::EQUIPMENT_END && slot_id != EQEmu::invslot::SLOT_POWER_SOURCE)) return false; query = StringFormat("DELETE FROM `bot_inventories` WHERE `bot_id` = '%u' AND `slot_id` = '%u'", bot_id, slot_id); @@ -1382,12 +1382,12 @@ bool BotDatabase::SaveEquipmentColor(const uint32 bot_id, const int16 slot_id, c return false; bool all_flag = (slot_id == -2); - if ((slot_id < EQEmu::legacy::EQUIPMENT_BEGIN || slot_id > EQEmu::legacy::EQUIPMENT_END) && slot_id != EQEmu::inventory::slotPowerSource && !all_flag) + if ((slot_id < EQEmu::invslot::EQUIPMENT_BEGIN || slot_id > EQEmu::invslot::EQUIPMENT_END) && slot_id != EQEmu::invslot::SLOT_POWER_SOURCE && !all_flag) return false; std::string where_clause; if (all_flag) - where_clause = StringFormat(" AND `slot_id` IN ('%u', '%u', '%u', '%u', '%u', '%u', '%u')", EQEmu::inventory::slotHead, EQEmu::inventory::slotArms, EQEmu::inventory::slotWrist1, EQEmu::inventory::slotHands, EQEmu::inventory::slotChest, EQEmu::inventory::slotLegs, EQEmu::inventory::slotFeet); + where_clause = StringFormat(" AND `slot_id` IN ('%u', '%u', '%u', '%u', '%u', '%u', '%u')", EQEmu::invslot::slotHead, EQEmu::invslot::slotArms, EQEmu::invslot::slotWrist1, EQEmu::invslot::slotHands, EQEmu::invslot::slotChest, EQEmu::invslot::slotLegs, EQEmu::invslot::slotFeet); else where_clause = StringFormat(" AND `slot_id` = '%u'", slot_id); @@ -1658,8 +1658,8 @@ bool BotDatabase::LoadPetItems(const uint32 bot_id, uint32* pet_items) if (!results.RowCount()) return true; - int item_index = 0; - for (auto row = results.begin(); row != results.end() && item_index < EQEmu::legacy::EQUIPMENT_SIZE; ++row) { + int item_index = EQEmu::invslot::EQUIPMENT_BEGIN; + for (auto row = results.begin(); row != results.end() && item_index <= EQEmu::invslot::EQUIPMENT_END; ++row) { pet_items[item_index] = atoi(row[0]); ++item_index; } @@ -1683,7 +1683,7 @@ bool BotDatabase::SavePetItems(const uint32 bot_id, const uint32* pet_items, boo if (!saved_pet_index) return true; - for (int item_index = 0; item_index < EQEmu::legacy::EQUIPMENT_SIZE; ++item_index) { + for (int item_index = EQEmu::invslot::SLOT_BEGIN; item_index <= EQEmu::invslot::EQUIPMENT_END; ++item_index) { if (!pet_items[item_index]) continue; @@ -1832,7 +1832,7 @@ bool BotDatabase::SaveAllArmorColorBySlot(const uint32 owner_id, const int16 slo " AND bi.`slot_id` = '%i'", owner_id, rgb_value, - EQEmu::inventory::slotHead, EQEmu::inventory::slotChest, EQEmu::inventory::slotArms, EQEmu::inventory::slotWrist1, EQEmu::inventory::slotWrist2, EQEmu::inventory::slotHands, EQEmu::inventory::slotLegs, EQEmu::inventory::slotFeet, + EQEmu::invslot::slotHead, EQEmu::invslot::slotChest, EQEmu::invslot::slotArms, EQEmu::invslot::slotWrist1, EQEmu::invslot::slotWrist2, EQEmu::invslot::slotHands, EQEmu::invslot::slotLegs, EQEmu::invslot::slotFeet, slot_id ); auto results = QueryDatabase(query); @@ -1856,7 +1856,7 @@ bool BotDatabase::SaveAllArmorColors(const uint32 owner_id, const uint32 rgb_val " AND bi.`slot_id` IN ('%u', '%u', '%u', '%u', '%u', '%u', '%u', '%u')", owner_id, rgb_value, - EQEmu::inventory::slotHead, EQEmu::inventory::slotChest, EQEmu::inventory::slotArms, EQEmu::inventory::slotWrist1, EQEmu::inventory::slotWrist2, EQEmu::inventory::slotHands, EQEmu::inventory::slotLegs, EQEmu::inventory::slotFeet + EQEmu::invslot::slotHead, EQEmu::invslot::slotChest, EQEmu::invslot::slotArms, EQEmu::invslot::slotWrist1, EQEmu::invslot::slotWrist2, EQEmu::invslot::slotHands, EQEmu::invslot::slotLegs, EQEmu::invslot::slotFeet ); auto results = QueryDatabase(query); if (!results.Success()) diff --git a/zone/client.cpp b/zone/client.cpp index 16157c807..bbe2c2512 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -33,7 +33,6 @@ extern volatile bool RunLoops; #include "../common/eqemu_logsys.h" #include "../common/features.h" -#include "../common/emu_legacy.h" #include "../common/spdat.h" #include "../common/guilds.h" #include "../common/rulesys.h" @@ -2108,7 +2107,7 @@ void Client::ReadBook(BookRequest_Struct *book) { const EQEmu::ItemInstance *inst = nullptr; - if (read_from_slot <= EQEmu::legacy::SLOT_PERSONAL_BAGS_END) + if (read_from_slot <= EQEmu::invbag::GENERAL_BAGS_END) { inst = m_inv[read_from_slot]; } @@ -3322,28 +3321,28 @@ void Client::LinkDead() uint8 Client::SlotConvert(uint8 slot,bool bracer){ uint8 slot2 = 0; // why are we returning MainCharm instead of INVALID_INDEX? (must be a pre-charm segment...) if(bracer) - return EQEmu::inventory::slotWrist2; + return EQEmu::invslot::slotWrist2; switch(slot) { case EQEmu::textures::armorHead: - slot2 = EQEmu::inventory::slotHead; + slot2 = EQEmu::invslot::slotHead; break; case EQEmu::textures::armorChest: - slot2 = EQEmu::inventory::slotChest; + slot2 = EQEmu::invslot::slotChest; break; case EQEmu::textures::armorArms: - slot2 = EQEmu::inventory::slotArms; + slot2 = EQEmu::invslot::slotArms; break; case EQEmu::textures::armorWrist: - slot2 = EQEmu::inventory::slotWrist1; + slot2 = EQEmu::invslot::slotWrist1; break; case EQEmu::textures::armorHands: - slot2 = EQEmu::inventory::slotHands; + slot2 = EQEmu::invslot::slotHands; break; case EQEmu::textures::armorLegs: - slot2 = EQEmu::inventory::slotLegs; + slot2 = EQEmu::invslot::slotLegs; break; case EQEmu::textures::armorFeet: - slot2 = EQEmu::inventory::slotFeet; + slot2 = EQEmu::invslot::slotFeet; break; } return slot2; @@ -3352,25 +3351,25 @@ uint8 Client::SlotConvert(uint8 slot,bool bracer){ uint8 Client::SlotConvert2(uint8 slot){ uint8 slot2 = 0; // same as above... switch(slot){ - case EQEmu::inventory::slotHead: + case EQEmu::invslot::slotHead: slot2 = EQEmu::textures::armorHead; break; - case EQEmu::inventory::slotChest: + case EQEmu::invslot::slotChest: slot2 = EQEmu::textures::armorChest; break; - case EQEmu::inventory::slotArms: + case EQEmu::invslot::slotArms: slot2 = EQEmu::textures::armorArms; break; - case EQEmu::inventory::slotWrist1: + case EQEmu::invslot::slotWrist1: slot2 = EQEmu::textures::armorWrist; break; - case EQEmu::inventory::slotHands: + case EQEmu::invslot::slotHands: slot2 = EQEmu::textures::armorHands; break; - case EQEmu::inventory::slotLegs: + case EQEmu::invslot::slotLegs: slot2 = EQEmu::textures::armorLegs; break; - case EQEmu::inventory::slotFeet: + case EQEmu::invslot::slotFeet: slot2 = EQEmu::textures::armorFeet; break; } @@ -4425,14 +4424,14 @@ bool Client::GroupFollow(Client* inviter) { uint16 Client::GetPrimarySkillValue() { EQEmu::skills::SkillType skill = EQEmu::skills::HIGHEST_SKILL; //because nullptr == 0, which is 1H Slashing, & we want it to return 0 from GetSkill - bool equiped = m_inv.GetItem(EQEmu::inventory::slotPrimary); + bool equiped = m_inv.GetItem(EQEmu::invslot::slotPrimary); if (!equiped) skill = EQEmu::skills::SkillHandtoHand; else { - uint8 type = m_inv.GetItem(EQEmu::inventory::slotPrimary)->GetItem()->ItemType; //is this the best way to do this? + uint8 type = m_inv.GetItem(EQEmu::invslot::slotPrimary)->GetItem()->ItemType; //is this the best way to do this? switch (type) { case EQEmu::item::ItemType1HSlash: // 1H Slashing @@ -5596,7 +5595,7 @@ bool Client::TryReward(uint32 claim_id) // save uint32 free_slot = 0xFFFFFFFF; - for (int i = EQEmu::legacy::GENERAL_BEGIN; i <= EQEmu::legacy::GENERAL_END; ++i) { + for (int i = EQEmu::invslot::GENERAL_BEGIN; i <= EQEmu::invslot::GENERAL_END; ++i) { EQEmu::ItemInstance *item = GetInv().GetItem(i); if (!item) { free_slot = i; @@ -5956,30 +5955,30 @@ void Client::ProcessInspectRequest(Client* requestee, Client* requester) { } } - inst = requestee->GetInv().GetItem(EQEmu::inventory::slotPowerSource); + inst = requestee->GetInv().GetItem(EQEmu::invslot::SLOT_POWER_SOURCE); if(inst) { item = inst->GetItem(); if(item) { // we shouldn't do this..but, that's the way it's coded atm... // (this type of action should be handled exclusively in the client translator) - strcpy(insr->itemnames[SoF::invslot::PossessionsPowerSource], item->Name); - insr->itemicons[SoF::invslot::PossessionsPowerSource] = item->Icon; + strcpy(insr->itemnames[SoF::invslot::slotPowerSource], item->Name); + insr->itemicons[SoF::invslot::slotPowerSource] = item->Icon; } else - insr->itemicons[SoF::invslot::PossessionsPowerSource] = 0xFFFFFFFF; + insr->itemicons[SoF::invslot::slotPowerSource] = 0xFFFFFFFF; } - inst = requestee->GetInv().GetItem(EQEmu::inventory::slotAmmo); + inst = requestee->GetInv().GetItem(EQEmu::invslot::slotAmmo); if(inst) { item = inst->GetItem(); if(item) { - strcpy(insr->itemnames[SoF::invslot::PossessionsAmmo], item->Name); - insr->itemicons[SoF::invslot::PossessionsAmmo] = item->Icon; + strcpy(insr->itemnames[SoF::invslot::slotAmmo], item->Name); + insr->itemicons[SoF::invslot::slotAmmo] = item->Icon; } else - insr->itemicons[SoF::invslot::PossessionsAmmo] = 0xFFFFFFFF; + insr->itemicons[SoF::invslot::slotAmmo] = 0xFFFFFFFF; } strcpy(insr->text, requestee->GetInspectMessage().text); @@ -7035,7 +7034,7 @@ void Client::SendStatsWindow(Client* client, bool use_window) } EQEmu::skills::SkillType skill = EQEmu::skills::SkillHandtoHand; - auto *inst = GetInv().GetItem(EQEmu::inventory::slotPrimary); + auto *inst = GetInv().GetItem(EQEmu::invslot::slotPrimary); if (inst && inst->IsClassCommon()) { switch (inst->GetItem()->ItemType) { case EQEmu::item::ItemType1HSlash: @@ -7908,7 +7907,7 @@ void Client::GarbleMessage(char *message, uint8 variance) for (size_t i = 0; i < strlen(message); i++) { // Client expects hex values inside of a text link body if (message[i] == delimiter) { - if (!(delimiter_count & 1)) { i += EQEmu::constants::SayLinkBodySize; } + if (!(delimiter_count & 1)) { i += EQEmu::constants::SAY_LINK_BODY_SIZE; } ++delimiter_count; continue; } @@ -8333,17 +8332,17 @@ void Client::TickItemCheck() if(zone->tick_items.empty()) { return; } //Scan equip slots for items - for (i = EQEmu::legacy::EQUIPMENT_BEGIN; i <= EQEmu::legacy::EQUIPMENT_END; i++) + for (i = EQEmu::invslot::EQUIPMENT_BEGIN; i <= EQEmu::invslot::EQUIPMENT_END; i++) { TryItemTick(i); } //Scan main inventory + cursor - for (i = EQEmu::legacy::GENERAL_BEGIN; i <= EQEmu::inventory::slotCursor; i++) + for (i = EQEmu::invslot::GENERAL_BEGIN; i <= EQEmu::invslot::slotCursor; i++) { TryItemTick(i); } //Scan bags - for (i = EQEmu::legacy::GENERAL_BAGS_BEGIN; i <= EQEmu::legacy::CURSOR_BAG_END; i++) + for (i = EQEmu::invbag::GENERAL_BAGS_BEGIN; i <= EQEmu::invbag::CURSOR_BAG_END; i++) { TryItemTick(i); } @@ -8359,7 +8358,7 @@ void Client::TryItemTick(int slot) if(zone->tick_items.count(iid) > 0) { - if (GetLevel() >= zone->tick_items[iid].level && zone->random.Int(0, 100) >= (100 - zone->tick_items[iid].chance) && (zone->tick_items[iid].bagslot || slot <= EQEmu::legacy::EQUIPMENT_END)) + if (GetLevel() >= zone->tick_items[iid].level && zone->random.Int(0, 100) >= (100 - zone->tick_items[iid].chance) && (zone->tick_items[iid].bagslot || slot <= EQEmu::invslot::EQUIPMENT_END)) { EQEmu::ItemInstance* e_inst = (EQEmu::ItemInstance*)inst; parse->EventItem(EVENT_ITEM_TICK, this, e_inst, nullptr, "", slot); @@ -8367,9 +8366,9 @@ void Client::TryItemTick(int slot) } //Only look at augs in main inventory - if (slot > EQEmu::legacy::EQUIPMENT_END) { return; } + if (slot > EQEmu::invslot::EQUIPMENT_END) { return; } - for (int x = EQEmu::inventory::socketBegin; x < EQEmu::inventory::SocketCount; ++x) + for (int x = EQEmu::invaug::SOCKET_BEGIN; x <= EQEmu::invaug::SOCKET_END; ++x) { EQEmu::ItemInstance * a_inst = inst->GetAugment(x); if(!a_inst) { continue; } @@ -8390,17 +8389,17 @@ void Client::TryItemTick(int slot) void Client::ItemTimerCheck() { int i; - for (i = EQEmu::legacy::EQUIPMENT_BEGIN; i <= EQEmu::legacy::EQUIPMENT_END; i++) + for (i = EQEmu::invslot::EQUIPMENT_BEGIN; i <= EQEmu::invslot::EQUIPMENT_END; i++) { TryItemTimer(i); } - for (i = EQEmu::legacy::GENERAL_BEGIN; i <= EQEmu::inventory::slotCursor; i++) + for (i = EQEmu::invslot::GENERAL_BEGIN; i <= EQEmu::invslot::slotCursor; i++) { TryItemTimer(i); } - for (i = EQEmu::legacy::GENERAL_BAGS_BEGIN; i <= EQEmu::legacy::CURSOR_BAG_END; i++) + for (i = EQEmu::invbag::GENERAL_BAGS_BEGIN; i <= EQEmu::invbag::CURSOR_BAG_END; i++) { TryItemTimer(i); } @@ -8422,11 +8421,11 @@ void Client::TryItemTimer(int slot) ++it_iter; } - if (slot > EQEmu::legacy::EQUIPMENT_END) { + if (slot > EQEmu::invslot::EQUIPMENT_END) { return; } - for (int x = EQEmu::inventory::socketBegin; x < EQEmu::inventory::SocketCount; ++x) + for (int x = EQEmu::invaug::SOCKET_BEGIN; x <= EQEmu::invaug::SOCKET_END; ++x) { EQEmu::ItemInstance * a_inst = inst->GetAugment(x); if(!a_inst) { @@ -8715,12 +8714,12 @@ void Client::ShowNumHits() int Client::GetQuiverHaste(int delay) { const EQEmu::ItemInstance *pi = nullptr; - for (int r = EQEmu::legacy::GENERAL_BEGIN; r <= EQEmu::legacy::GENERAL_END; r++) { + for (int r = EQEmu::invslot::GENERAL_BEGIN; r <= EQEmu::invslot::GENERAL_END; r++) { pi = GetInv().GetItem(r); if (pi && pi->IsClassBag() && pi->GetItem()->BagType == EQEmu::item::BagTypeQuiver && pi->GetItem()->BagWR > 0) break; - if (r == EQEmu::legacy::GENERAL_END) + if (r == EQEmu::invslot::GENERAL_END) // we will get here if we don't find a valid quiver return 0; } @@ -8760,7 +8759,7 @@ void Client::QuestReward(Mob* target, uint32 copper, uint32 silver, uint32 gold, AddMoneyToPP(copper, silver, gold, platinum, false); if (itemid > 0) - SummonItem(itemid, 0, 0, 0, 0, 0, 0, false, EQEmu::inventory::slotPowerSource); + SummonItem(itemid, 0, 0, 0, 0, 0, 0, false, EQEmu::invslot::slotCursor); if (faction) { diff --git a/zone/client.h b/zone/client.h index b216a0e38..ac998fb4c 100644 --- a/zone/client.h +++ b/zone/client.h @@ -249,7 +249,7 @@ public: //abstract virtual function implementations required by base abstract class virtual bool Death(Mob* killerMob, int32 damage, uint16 spell_id, EQEmu::skills::SkillType attack_skill); virtual void Damage(Mob* from, int32 damage, uint16 spell_id, EQEmu::skills::SkillType attack_skill, bool avoidable = true, int8 buffslot = -1, bool iBuffTic = false, eSpecialAttacks special = eSpecialAttacks::None); - virtual bool Attack(Mob* other, int Hand = EQEmu::inventory::slotPrimary, bool FromRiposte = false, bool IsStrikethrough = false, bool IsFromSpell = false, + virtual bool Attack(Mob* other, int Hand = EQEmu::invslot::slotPrimary, bool FromRiposte = false, bool IsStrikethrough = false, bool IsFromSpell = false, ExtraAttackOptions *opts = nullptr); virtual bool HasRaid() { return (GetRaid() ? true : false); } virtual bool HasGroup() { return (GetGroup() ? true : false); } @@ -871,7 +871,7 @@ public: void QSSwapItemAuditor(MoveItem_Struct* move_in, bool postaction_call = false); void PutLootInInventory(int16 slot_id, const EQEmu::ItemInstance &inst, ServerLootItem_Struct** bag_item_data = 0); bool AutoPutLootInInventory(EQEmu::ItemInstance& inst, bool try_worn = false, bool try_cursor = true, ServerLootItem_Struct** bag_item_data = 0); - bool SummonItem(uint32 item_id, int16 charges = -1, uint32 aug1 = 0, uint32 aug2 = 0, uint32 aug3 = 0, uint32 aug4 = 0, uint32 aug5 = 0, uint32 aug6 = 0, bool attuned = false, uint16 to_slot = EQEmu::inventory::slotCursor, uint32 ornament_icon = 0, uint32 ornament_idfile = 0, uint32 ornament_hero_model = 0); + bool SummonItem(uint32 item_id, int16 charges = -1, uint32 aug1 = 0, uint32 aug2 = 0, uint32 aug3 = 0, uint32 aug4 = 0, uint32 aug5 = 0, uint32 aug6 = 0, bool attuned = false, uint16 to_slot = EQEmu::invslot::slotCursor, uint32 ornament_icon = 0, uint32 ornament_idfile = 0, uint32 ornament_hero_model = 0); void SetStats(uint8 type,int16 set_val); void IncStats(uint8 type,int16 increase_val); void DropItem(int16 slot_id, bool recurse = true); diff --git a/zone/client_mods.cpp b/zone/client_mods.cpp index 696214113..f342fff9f 100644 --- a/zone/client_mods.cpp +++ b/zone/client_mods.cpp @@ -552,7 +552,7 @@ int32 Client::GetRawItemAC() { int32 Total = 0; // this skips MainAmmo..add an '=' conditional if that slot is required (original behavior) - for (int16 slot_id = EQEmu::legacy::EQUIPMENT_BEGIN; slot_id < EQEmu::legacy::EQUIPMENT_END; slot_id++) { + for (int16 slot_id = EQEmu::invslot::BONUS_BEGIN; slot_id <= EQEmu::invslot::BONUS_STAT_END; slot_id++) { const EQEmu::ItemInstance* inst = m_inv[slot_id]; if (inst && inst->IsClassCommon()) { Total += inst->GetItem()->AC; @@ -1319,7 +1319,7 @@ uint32 Client::CalcCurrentWeight() EQEmu::ItemInstance* ins = nullptr; uint32 Total = 0; int x; - for (x = EQEmu::legacy::EQUIPMENT_BEGIN; x <= EQEmu::inventory::slotCursor; x++) { // include cursor or not? + for (x = EQEmu::invslot::POSSESSIONS_BEGIN; x <= EQEmu::invslot::POSSESSIONS_END; x++) { TempItem = 0; ins = GetInv().GetItem(x); if (ins) { @@ -1329,7 +1329,7 @@ uint32 Client::CalcCurrentWeight() Total += TempItem->Weight; } } - for (x = EQEmu::legacy::GENERAL_BAGS_BEGIN; x <= EQEmu::legacy::GENERAL_BAGS_END; x++) { // include cursor bags or not? + for (x = EQEmu::invbag::GENERAL_BAGS_BEGIN; x <= EQEmu::invbag::CURSOR_BAG_END; x++) { int TmpWeight = 0; TempItem = 0; ins = GetInv().GetItem(x); @@ -1342,9 +1342,9 @@ uint32 Client::CalcCurrentWeight() if (TmpWeight > 0) { // this code indicates that weight redux bags can only be in the first general inventory slot to be effective... // is this correct? or can we scan for the highest weight redux and use that? (need client verifications) - int bagslot = EQEmu::inventory::slotGeneral1; + int bagslot = EQEmu::invslot::slotGeneral1; int reduction = 0; - for (int m = EQEmu::legacy::GENERAL_BAGS_BEGIN + 10; m <= EQEmu::legacy::GENERAL_BAGS_END; m += 10) { // include cursor bags or not? + for (int m = EQEmu::invbag::GENERAL_BAGS_BEGIN + EQEmu::invbag::SLOT_COUNT; m <= EQEmu::invbag::CURSOR_BAG_END; m += EQEmu::invbag::SLOT_COUNT) { if (x >= m) { bagslot += 1; } @@ -2293,12 +2293,12 @@ int Client::GetRawACNoShield(int &shield_ac) const { int ac = itembonuses.AC + spellbonuses.AC + aabonuses.AC; shield_ac = 0; - const EQEmu::ItemInstance *inst = m_inv.GetItem(EQEmu::inventory::slotSecondary); + const EQEmu::ItemInstance *inst = m_inv.GetItem(EQEmu::invslot::slotSecondary); if (inst) { if (inst->GetItem()->ItemType == EQEmu::item::ItemTypeShield) { ac -= inst->GetItem()->AC; shield_ac = inst->GetItem()->AC; - for (uint8 i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) { + for (uint8 i = EQEmu::invaug::SOCKET_BEGIN; i <= EQEmu::invaug::SOCKET_END; i++) { if (inst->GetAugment(i)) { ac -= inst->GetAugment(i)->GetItem()->AC; shield_ac += inst->GetAugment(i)->GetItem()->AC; diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index e318fe274..558bdca86 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -1731,7 +1731,7 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app) if (iter == m_inv.cursor_cbegin()) continue; const EQEmu::ItemInstance *inst = *iter; - SendItemPacket(EQEmu::inventory::slotCursor, inst, ItemPacketLimbo); + SendItemPacket(EQEmu::invslot::slotCursor, inst, ItemPacketLimbo); } } @@ -2069,7 +2069,7 @@ void Client::Handle_OP_AdventureMerchantPurchase(const EQApplicationPacket *app) EQEmu::ItemInstance *inst = database.CreateItem(item, charges); if (!AutoPutLootInInventory(*inst, true, true)) { - PutLootInInventory(EQEmu::inventory::slotCursor, *inst); + PutLootInInventory(EQEmu::invslot::slotCursor, *inst); } Save(1); } @@ -2603,7 +2603,7 @@ void Client::Handle_OP_AltCurrencyPurchase(const EQApplicationPacket *app) EQEmu::ItemInstance *inst = database.CreateItem(item, charges); if (!AutoPutLootInInventory(*inst, true, true)) { - PutLootInInventory(EQEmu::inventory::slotCursor, *inst); + PutLootInInventory(EQEmu::invslot::slotCursor, *inst); } Save(1); @@ -2653,7 +2653,7 @@ void Client::Handle_OP_AltCurrencyReclaim(const EQApplicationPacket *app) SetAlternateCurrencyValue(reclaim->currency_id, 0); } else { - SummonItem(item_id, reclaim->count, 0, 0, 0, 0, 0, 0, false, EQEmu::inventory::slotCursor); + SummonItem(item_id, reclaim->count, 0, 0, 0, 0, 0, 0, false, EQEmu::invslot::slotCursor); AddAlternateCurrencyValue(reclaim->currency_id, -((int32)reclaim->count)); } /* QS: PlayerLogAlternateCurrencyTransactions :: Cursor to Item Storage */ @@ -2866,8 +2866,8 @@ void Client::Handle_OP_ApplyPoison(const EQApplicationPacket *app) uint32 ApplyPoisonSuccessResult = 0; ApplyPoison_Struct* ApplyPoisonData = (ApplyPoison_Struct*)app->pBuffer; - const EQEmu::ItemInstance* PrimaryWeapon = GetInv().GetItem(EQEmu::inventory::slotPrimary); - const EQEmu::ItemInstance* SecondaryWeapon = GetInv().GetItem(EQEmu::inventory::slotSecondary); + const EQEmu::ItemInstance* PrimaryWeapon = GetInv().GetItem(EQEmu::invslot::slotPrimary); + const EQEmu::ItemInstance* SecondaryWeapon = GetInv().GetItem(EQEmu::invslot::slotSecondary); const EQEmu::ItemInstance* PoisonItemInstance = GetInv()[ApplyPoisonData->inventorySlot]; const EQEmu::ItemData* poison=PoisonItemInstance->GetItem(); const EQEmu::ItemData* primary=nullptr; @@ -3001,14 +3001,14 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app) bool deleteItems = false; if (ClientVersion() >= EQEmu::versions::ClientVersion::RoF) { - if ((in_augment->container_slot < 0 || in_augment->container_slot >= EQEmu::legacy::SLOT_CURSOR) && - in_augment->container_slot != EQEmu::legacy::SLOT_POWER_SOURCE && - (in_augment->container_slot < EQEmu::legacy::SLOT_PERSONAL_BAGS_BEGIN || in_augment->container_slot > EQEmu::legacy::SLOT_PERSONAL_BAGS_END)) + if ((in_augment->container_slot < 0 || in_augment->container_slot >= EQEmu::invslot::slotCursor) && + in_augment->container_slot != EQEmu::invslot::SLOT_POWER_SOURCE && + (in_augment->container_slot < EQEmu::invbag::GENERAL_BAGS_BEGIN || in_augment->container_slot > EQEmu::invbag::GENERAL_BAGS_END)) { Message(13, "The server does not allow augmentation actions from this slot."); - auto cursor_item = m_inv[EQEmu::legacy::SLOT_CURSOR]; + auto cursor_item = m_inv[EQEmu::invslot::slotCursor]; auto augmented_item = m_inv[in_augment->container_slot]; - SendItemPacket(EQEmu::legacy::SLOT_CURSOR, cursor_item, ItemPacketCharInventory); + SendItemPacket(EQEmu::invslot::slotCursor, cursor_item, ItemPacketCharInventory); // this may crash clients on certain slots SendItemPacket(in_augment->container_slot, augmented_item, ItemPacketCharInventory); return; @@ -3083,7 +3083,7 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app) { case 0: // Adding an augment case 2: // Swapping augment - new_aug = user_inv.GetItem(EQEmu::inventory::slotCursor); + new_aug = user_inv.GetItem(EQEmu::invslot::slotCursor); if (!new_aug) // Shouldn't get the OP code without the augment on the user's cursor, but maybe it's h4x. { @@ -3141,7 +3141,7 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app) if (itemOneToPush) { DeleteItemInInventory(item_slot, 0, true); - DeleteItemInInventory(EQEmu::inventory::slotCursor, new_aug->IsStackable() ? 1 : 0, true); + DeleteItemInInventory(EQEmu::invslot::slotCursor, new_aug->IsStackable() ? 1 : 0, true); if (solvent) { @@ -3152,7 +3152,7 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app) if (itemTwoToPush) { // This is a swap. Return the old aug to the player's cursor. - if (!PutItemInInventory(EQEmu::inventory::slotCursor, *itemTwoToPush, true)) + if (!PutItemInInventory(EQEmu::invslot::slotCursor, *itemTwoToPush, true)) { Log(Logs::General, Logs::Error, "Problem returning old augment to player's cursor after augmentation swap."); Message(15, "Error: Failed to retrieve old augment after augmentation swap!"); @@ -3237,7 +3237,7 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app) } // Drop the removed augment on the player's cursor - if (!PutItemInInventory(EQEmu::inventory::slotCursor, *itemTwoToPush, true)) + if (!PutItemInInventory(EQEmu::invslot::slotCursor, *itemTwoToPush, true)) { Log(Logs::General, Logs::Error, "Problem returning augment to player's cursor after safe removal."); Message(15, "Error: Failed to return augment after removal from item!"); @@ -4175,7 +4175,7 @@ void Client::Handle_OP_CastSpell(const EQApplicationPacket *app) } else { - Message(0, "Error: castspell->inventoryslot >= %i (0x%04x)", EQEmu::inventory::slotCursor, castspell->inventoryslot); + Message(0, "Error: castspell->inventoryslot >= %i (0x%04x)", EQEmu::invslot::slotCursor, castspell->inventoryslot); InterruptSpell(castspell->spell_id); } } @@ -5123,7 +5123,7 @@ void Client::Handle_OP_CreateObject(const EQApplicationPacket *app) if (LogSys.log_settings[Logs::Inventory].is_category_enabled) Log(Logs::Detail, Logs::Inventory, "Handle_OP_CreateObject() [psize: %u] %s", app->size, DumpPacketToString(app).c_str()); - DropItem(EQEmu::inventory::slotCursor); + DropItem(EQEmu::invslot::slotCursor); return; } @@ -7049,7 +7049,7 @@ void Client::Handle_OP_GuildBank(const EQApplicationPacket *app) return; } - EQEmu::ItemInstance *CursorItemInst = GetInv().GetItem(EQEmu::inventory::slotCursor); + EQEmu::ItemInstance *CursorItemInst = GetInv().GetItem(EQEmu::invslot::slotCursor); bool Allowed = true; @@ -7097,7 +7097,7 @@ void Client::Handle_OP_GuildBank(const EQApplicationPacket *app) { GuildBankDepositAck(false, sentAction); - DeleteItemInInventory(EQEmu::inventory::slotCursor, 0, false); + DeleteItemInInventory(EQEmu::invslot::slotCursor, 0, false); } break; @@ -7118,7 +7118,7 @@ void Client::Handle_OP_GuildBank(const EQApplicationPacket *app) case GuildBankWithdraw: { - if (GetInv()[EQEmu::inventory::slotCursor]) + if (GetInv()[EQEmu::invslot::slotCursor]) { Message_StringID(13, GUILD_BANK_EMPTY_HANDS); @@ -7164,7 +7164,7 @@ void Client::Handle_OP_GuildBank(const EQApplicationPacket *app) { PushItemOnCursor(*inst); - SendItemPacket(EQEmu::inventory::slotCursor, inst, ItemPacketLimbo); + SendItemPacket(EQEmu::invslot::slotCursor, inst, ItemPacketLimbo); GuildBanks->DeleteItem(GuildID(), gbwis->Area, gbwis->SlotID, gbwis->Quantity); } @@ -8147,7 +8147,7 @@ void Client::Handle_OP_InspectAnswer(const EQApplicationPacket *app) const EQEmu::ItemData* item = nullptr; int ornamentationAugtype = RuleI(Character, OrnamentationAugmentType); - for (int16 L = EQEmu::legacy::EQUIPMENT_BEGIN; L <= EQEmu::inventory::slotWaist; L++) { + for (int16 L = EQEmu::invslot::EQUIPMENT_BEGIN; L <= EQEmu::invslot::slotWaist; L++) { const EQEmu::ItemInstance* inst = GetInv().GetItem(L); item = inst ? inst->GetItem() : nullptr; @@ -8167,15 +8167,15 @@ void Client::Handle_OP_InspectAnswer(const EQApplicationPacket *app) else { insr->itemicons[L] = 0xFFFFFFFF; } } - const EQEmu::ItemInstance* inst = GetInv().GetItem(EQEmu::inventory::slotAmmo); + const EQEmu::ItemInstance* inst = GetInv().GetItem(EQEmu::invslot::slotAmmo); item = inst ? inst->GetItem() : nullptr; if (item) { // another one..I did these, didn't I!!? - strcpy(insr->itemnames[SoF::invslot::PossessionsAmmo], item->Name); - insr->itemicons[SoF::invslot::PossessionsAmmo] = item->Icon; + strcpy(insr->itemnames[SoF::invslot::slotAmmo], item->Name); + insr->itemicons[SoF::invslot::slotAmmo] = item->Icon; } - else { insr->itemicons[SoF::invslot::PossessionsAmmo] = 0xFFFFFFFF; } + else { insr->itemicons[SoF::invslot::slotAmmo] = 0xFFFFFFFF; } InspectMessage_Struct* newmessage = (InspectMessage_Struct*)insr->text; InspectMessage_Struct& playermessage = this->GetInspectMessage(); @@ -8637,7 +8637,7 @@ void Client::Handle_OP_ItemVerifyRequest(const EQApplicationPacket *app) EQEmu::ItemInstance* clickaug = nullptr; EQEmu::ItemData* augitem = nullptr; - for (r = EQEmu::inventory::socketBegin; r < EQEmu::inventory::SocketCount; r++) { + for (r = EQEmu::invaug::SOCKET_BEGIN; r <= EQEmu::invaug::SOCKET_END; r++) { const EQEmu::ItemInstance* aug_i = inst->GetAugment(r); if (!aug_i) continue; @@ -9817,7 +9817,7 @@ void Client::Handle_OP_MoveItem(const EQApplicationPacket *app) MoveItem_Struct* mi = (MoveItem_Struct*)app->pBuffer; if (spellend_timer.Enabled() && casting_spell_id && !IsBardSong(casting_spell_id)) { - if (mi->from_slot != mi->to_slot && (mi->from_slot <= EQEmu::legacy::GENERAL_END || mi->from_slot > 39) && IsValidSlot(mi->from_slot) && IsValidSlot(mi->to_slot)) + if (mi->from_slot != mi->to_slot && (mi->from_slot <= EQEmu::invslot::GENERAL_END || mi->from_slot > 39) && IsValidSlot(mi->from_slot) && IsValidSlot(mi->to_slot)) { char *detect = nullptr; const EQEmu::ItemInstance *itm_from = GetInv().GetItem(mi->from_slot); @@ -9838,8 +9838,8 @@ void Client::Handle_OP_MoveItem(const EQApplicationPacket *app) // Illegal bagslot usage checks. Currently, user only receives a message if this check is triggered. bool mi_hack = false; - if (mi->from_slot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && mi->from_slot <= EQEmu::legacy::CURSOR_BAG_END) { - if (mi->from_slot >= EQEmu::legacy::CURSOR_BAG_BEGIN) { mi_hack = true; } + if (mi->from_slot >= EQEmu::invbag::GENERAL_BAGS_BEGIN && mi->from_slot <= EQEmu::invbag::CURSOR_BAG_END) { + if (mi->from_slot >= EQEmu::invbag::CURSOR_BAG_BEGIN) { mi_hack = true; } else { int16 from_parent = m_inv.CalcSlotId(mi->from_slot); if (!m_inv[from_parent]) { mi_hack = true; } @@ -9848,8 +9848,8 @@ void Client::Handle_OP_MoveItem(const EQApplicationPacket *app) } } - if (mi->to_slot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && mi->to_slot <= EQEmu::legacy::CURSOR_BAG_END) { - if (mi->to_slot >= EQEmu::legacy::CURSOR_BAG_BEGIN) { mi_hack = true; } + if (mi->to_slot >= EQEmu::invbag::GENERAL_BAGS_BEGIN && mi->to_slot <= EQEmu::invbag::CURSOR_BAG_END) { + if (mi->to_slot >= EQEmu::invbag::CURSOR_BAG_BEGIN) { mi_hack = true; } else { int16 to_parent = m_inv.CalcSlotId(mi->to_slot); if (!m_inv[to_parent]) { mi_hack = true; } @@ -12475,7 +12475,7 @@ void Client::Handle_OP_Shielding(const EQApplicationPacket *app) Shielding_Struct* shield = (Shielding_Struct*)app->pBuffer; shield_target = entity_list.GetMob(shield->target_id); bool ack = false; - EQEmu::ItemInstance* inst = GetInv().GetItem(EQEmu::inventory::slotSecondary); + EQEmu::ItemInstance* inst = GetInv().GetItem(EQEmu::invslot::slotSecondary); if (!shield_target) return; if (inst) @@ -12687,8 +12687,8 @@ void Client::Handle_OP_ShopPlayerBuy(const EQApplicationPacket *app) // shouldn't we be reimbursing if these two fail? //make sure we are not completely full... - if (freeslotid == EQEmu::inventory::slotCursor) { - if (m_inv.GetItem(EQEmu::inventory::slotCursor) != nullptr) { + if (freeslotid == EQEmu::invslot::slotCursor) { + if (m_inv.GetItem(EQEmu::invslot::slotCursor) != nullptr) { Message(13, "You do not have room for any more items."); safe_delete(outapp); safe_delete(inst); diff --git a/zone/client_process.cpp b/zone/client_process.cpp index f8e077e74..ce5e6d5c9 100644 --- a/zone/client_process.cpp +++ b/zone/client_process.cpp @@ -310,7 +310,7 @@ bool Client::Process() { } if (AutoFireEnabled()) { - EQEmu::ItemInstance *ranged = GetInv().GetItem(EQEmu::inventory::slotRange); + EQEmu::ItemInstance *ranged = GetInv().GetItem(EQEmu::invslot::slotRange); if (ranged) { if (ranged->GetItem() && ranged->GetItem()->ItemType == EQEmu::item::ItemTypeBow) { @@ -405,11 +405,11 @@ bool Client::Process() { } else if (auto_attack_target->GetHP() > -10) // -10 so we can watch people bleed in PvP { - EQEmu::ItemInstance *wpn = GetInv().GetItem(EQEmu::inventory::slotPrimary); - TryWeaponProc(wpn, auto_attack_target, EQEmu::inventory::slotPrimary); - TriggerDefensiveProcs(auto_attack_target, EQEmu::inventory::slotPrimary, false); + EQEmu::ItemInstance *wpn = GetInv().GetItem(EQEmu::invslot::slotPrimary); + TryWeaponProc(wpn, auto_attack_target, EQEmu::invslot::slotPrimary); + TriggerDefensiveProcs(auto_attack_target, EQEmu::invslot::slotPrimary, false); - DoAttackRounds(auto_attack_target, EQEmu::inventory::slotPrimary); + DoAttackRounds(auto_attack_target, EQEmu::invslot::slotPrimary); if (CheckAATimer(aaTimerRampage)) entity_list.AEAttack(this, 30); } @@ -445,10 +445,10 @@ bool Client::Process() { else if (auto_attack_target->GetHP() > -10) { CheckIncreaseSkill(EQEmu::skills::SkillDualWield, auto_attack_target, -10); if (CheckDualWield()) { - EQEmu::ItemInstance *wpn = GetInv().GetItem(EQEmu::inventory::slotSecondary); - TryWeaponProc(wpn, auto_attack_target, EQEmu::inventory::slotSecondary); + EQEmu::ItemInstance *wpn = GetInv().GetItem(EQEmu::invslot::slotSecondary); + TryWeaponProc(wpn, auto_attack_target, EQEmu::invslot::slotSecondary); - DoAttackRounds(auto_attack_target, EQEmu::inventory::slotSecondary); + DoAttackRounds(auto_attack_target, EQEmu::invslot::slotSecondary); } } } @@ -776,7 +776,7 @@ void Client::BulkSendInventoryItems() { // LINKDEAD TRADE ITEMS // Move trade slot items back into normal inventory..need them there now for the proceeding validity checks - for (int16 slot_id = EQEmu::legacy::TRADE_BEGIN; slot_id <= EQEmu::legacy::TRADE_END; slot_id++) { + for (int16 slot_id = EQEmu::invslot::TRADE_BEGIN; slot_id <= EQEmu::invslot::TRADE_END; slot_id++) { EQEmu::ItemInstance* inst = m_inv.PopItem(slot_id); if(inst) { bool is_arrow = (inst->GetItem()->ItemType == EQEmu::item::ItemTypeArrow) ? true : false; @@ -802,7 +802,7 @@ void Client::BulkSendInventoryItems() EQEmu::OutBuffer::pos_type last_pos = ob.tellp(); // Possessions items - for (int16 slot_id = EQEmu::inventory::slotBegin; slot_id < EQEmu::legacy::TYPE_POSSESSIONS_SIZE; slot_id++) { + for (int16 slot_id = EQEmu::invslot::POSSESSIONS_BEGIN; slot_id <= EQEmu::invslot::POSSESSIONS_END; slot_id++) { const EQEmu::ItemInstance* inst = m_inv[slot_id]; if (!inst) continue; @@ -817,19 +817,19 @@ void Client::BulkSendInventoryItems() // PowerSource item if (ClientVersion() >= EQEmu::versions::ClientVersion::SoF) { - const EQEmu::ItemInstance* inst = m_inv[EQEmu::inventory::slotPowerSource]; + const EQEmu::ItemInstance* inst = m_inv[EQEmu::invslot::SLOT_POWER_SOURCE]; if (inst) { - inst->Serialize(ob, EQEmu::inventory::slotPowerSource); + inst->Serialize(ob, EQEmu::invslot::SLOT_POWER_SOURCE); if (ob.tellp() == last_pos) - Log(Logs::General, Logs::Inventory, "Serialization failed on item slot %d during BulkSendInventoryItems. Item skipped.", EQEmu::inventory::slotPowerSource); + Log(Logs::General, Logs::Inventory, "Serialization failed on item slot %d during BulkSendInventoryItems. Item skipped.", EQEmu::invslot::SLOT_POWER_SOURCE); last_pos = ob.tellp(); } } // Bank items - for (int16 slot_id = EQEmu::legacy::BANK_BEGIN; slot_id <= EQEmu::legacy::BANK_END; slot_id++) { + for (int16 slot_id = EQEmu::invslot::BANK_BEGIN; slot_id <= EQEmu::invslot::BANK_END; slot_id++) { const EQEmu::ItemInstance* inst = m_inv[slot_id]; if (!inst) continue; @@ -843,7 +843,7 @@ void Client::BulkSendInventoryItems() } // SharedBank items - for (int16 slot_id = EQEmu::legacy::SHARED_BANK_BEGIN; slot_id <= EQEmu::legacy::SHARED_BANK_END; slot_id++) { + for (int16 slot_id = EQEmu::invslot::SHARED_BANK_BEGIN; slot_id <= EQEmu::invslot::SHARED_BANK_END; slot_id++) { const EQEmu::ItemInstance* inst = m_inv[slot_id]; if (!inst) continue; @@ -1133,7 +1133,7 @@ void Client::OPMemorizeSpell(const EQApplicationPacket* app) switch(memspell->scribing) { case memSpellScribing: { // scribing spell to book - const EQEmu::ItemInstance* inst = m_inv[EQEmu::inventory::slotCursor]; + const EQEmu::ItemInstance* inst = m_inv[EQEmu::invslot::slotCursor]; if (inst && inst->IsClassCommon()) { @@ -1147,7 +1147,7 @@ void Client::OPMemorizeSpell(const EQApplicationPacket* app) if(item && item->Scroll.Effect == (int32)(memspell->spell_id)) { ScribeSpell(memspell->spell_id, memspell->slot); - DeleteItemInInventory(EQEmu::inventory::slotCursor, 1, true); + DeleteItemInInventory(EQEmu::invslot::slotCursor, 1, true); } else Message(0,"Scribing spell: inst exists but item does not or spell ids do not match."); diff --git a/zone/command.cpp b/zone/command.cpp index 62a83c866..4bae60820 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -2537,15 +2537,15 @@ void command_peekinv(Client *c, const Seperator *sep) static char* scope_prefix[] = { "Equip", "Gen", "Cursor", "Limbo", "Trib", "Bank", "ShBank", "Trade", "World" }; static int16 scope_range[][2] = { - { EQEmu::legacy::EQUIPMENT_BEGIN, EQEmu::legacy::EQUIPMENT_END }, - { EQEmu::legacy::GENERAL_BEGIN, EQEmu::legacy::GENERAL_END }, - { EQEmu::legacy::SLOT_CURSOR, EQEmu::legacy::SLOT_CURSOR }, - { EQEmu::legacy::SLOT_INVALID, EQEmu::legacy::SLOT_INVALID }, - { EQEmu::legacy::TRIBUTE_BEGIN, EQEmu::legacy::TRIBUTE_END }, - { EQEmu::legacy::BANK_BEGIN, EQEmu::legacy::BANK_END }, - { EQEmu::legacy::SHARED_BANK_BEGIN, EQEmu::legacy::SHARED_BANK_END }, - { EQEmu::legacy::TRADE_BEGIN, EQEmu::legacy::TRADE_END }, - { EQEmu::inventory::slotBegin, (EQEmu::legacy::WORLD_SIZE - 1) } + { EQEmu::invslot::EQUIPMENT_BEGIN, EQEmu::invslot::EQUIPMENT_END }, + { EQEmu::invslot::GENERAL_BEGIN, EQEmu::invslot::GENERAL_END }, + { EQEmu::invslot::slotCursor, EQEmu::invslot::slotCursor }, + { EQEmu::invslot::SLOT_INVALID, EQEmu::invslot::SLOT_INVALID }, + { EQEmu::invslot::TRIBUTE_BEGIN, EQEmu::invslot::TRIBUTE_END }, + { EQEmu::invslot::BANK_BEGIN, EQEmu::invslot::BANK_END }, + { EQEmu::invslot::SHARED_BANK_BEGIN, EQEmu::invslot::SHARED_BANK_END }, + { EQEmu::invslot::TRADE_BEGIN, EQEmu::invslot::TRADE_END }, + { EQEmu::invslot::SLOT_BEGIN, (EQEmu::invtype::WORLD_SIZE - 1) } }; static bool scope_bag[] = { false, true, true, true, false, true, true, true, true }; @@ -2614,7 +2614,7 @@ void command_peekinv(Client *c, const Seperator *sep) } for (int16 indexMain = scope_range[scopeIndex][0]; indexMain <= scope_range[scopeIndex][1]; ++indexMain) { - if (indexMain == EQEmu::legacy::SLOT_INVALID) + if (indexMain == EQEmu::invslot::SLOT_INVALID) continue; inst_main = ((scopeBit & peekWorld) ? objectTradeskill->GetItem(indexMain) : targetClient->GetInv().GetItem(indexMain)); @@ -2632,14 +2632,14 @@ void command_peekinv(Client *c, const Seperator *sep) (item_data == nullptr), "%sSlot: %i, Item: %i (%s), Charges: %i", scope_prefix[scopeIndex], - ((scopeBit & peekWorld) ? (EQEmu::legacy::WORLD_BEGIN + indexMain) : indexMain), + ((scopeBit & peekWorld) ? (EQEmu::invslot::WORLD_BEGIN + indexMain) : indexMain), ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges()) ); if (inst_main && inst_main->IsClassCommon()) { - for (uint8 indexAug = EQEmu::inventory::socketBegin; indexAug < EQEmu::inventory::SocketCount; ++indexAug) { + for (uint8 indexAug = EQEmu::invaug::SOCKET_BEGIN; indexAug <= EQEmu::invaug::SOCKET_END; ++indexAug) { inst_aug = inst_main->GetItem(indexAug); if (!inst_aug) // extant only continue; @@ -2652,7 +2652,7 @@ void command_peekinv(Client *c, const Seperator *sep) ".%sAugSlot: %i (Slot #%i, Aug idx #%i), Item: %i (%s), Charges: %i", scope_prefix[scopeIndex], INVALID_INDEX, - ((scopeBit & peekWorld) ? (EQEmu::legacy::WORLD_BEGIN + indexMain) : indexMain), + ((scopeBit & peekWorld) ? (EQEmu::invslot::WORLD_BEGIN + indexMain) : indexMain), indexAug, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), @@ -2664,7 +2664,7 @@ void command_peekinv(Client *c, const Seperator *sep) if (!scope_bag[scopeIndex] || !(inst_main && inst_main->IsClassBag())) continue; - for (uint8 indexSub = EQEmu::inventory::containerBegin; indexSub < EQEmu::inventory::ContainerCount; ++indexSub) { + for (uint8 indexSub = EQEmu::invbag::SLOT_BEGIN; indexSub <= EQEmu::invbag::SLOT_END; ++indexSub) { inst_sub = inst_main->GetItem(indexSub); if (!inst_sub) // extant only continue; @@ -2677,7 +2677,7 @@ void command_peekinv(Client *c, const Seperator *sep) "..%sBagSlot: %i (Slot #%i, Bag idx #%i), Item: %i (%s), Charges: %i", scope_prefix[scopeIndex], ((scopeBit & peekWorld) ? INVALID_INDEX : EQEmu::InventoryProfile::CalcSlotId(indexMain, indexSub)), - ((scopeBit & peekWorld) ? (EQEmu::legacy::WORLD_BEGIN + indexMain) : indexMain), + ((scopeBit & peekWorld) ? (EQEmu::invslot::WORLD_BEGIN + indexMain) : indexMain), indexSub, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), @@ -2685,7 +2685,7 @@ void command_peekinv(Client *c, const Seperator *sep) ); if (inst_sub->IsClassCommon()) { - for (uint8 indexAug = EQEmu::inventory::socketBegin; indexAug < EQEmu::inventory::SocketCount; ++indexAug) { + for (uint8 indexAug = EQEmu::invaug::SOCKET_BEGIN; indexAug <= EQEmu::invaug::SOCKET_END; ++indexAug) { inst_aug = inst_sub->GetItem(indexAug); if (!inst_aug) // extant only continue; @@ -2711,7 +2711,7 @@ void command_peekinv(Client *c, const Seperator *sep) } if ((scopeBit & peekEquip) && (targetClient->ClientVersion() >= EQEmu::versions::ClientVersion::SoF)) { - inst_main = targetClient->GetInv().GetItem(EQEmu::inventory::slotPowerSource); + inst_main = targetClient->GetInv().GetItem(EQEmu::invslot::SLOT_POWER_SOURCE); if (inst_main) { itemsFound = true; item_data = inst_main->GetItem(); @@ -2726,14 +2726,14 @@ void command_peekinv(Client *c, const Seperator *sep) (item_data == nullptr), "%sSlot: %i, Item: %i (%s), Charges: %i", scope_prefix[scopeIndex], - EQEmu::inventory::slotPowerSource, + EQEmu::invslot::SLOT_POWER_SOURCE, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), ((inst_main == nullptr) ? 0 : inst_main->GetCharges()) ); if (inst_main && inst_main->IsClassCommon()) { - for (uint8 indexAug = EQEmu::inventory::socketBegin; indexAug < EQEmu::inventory::SocketCount; ++indexAug) { + for (uint8 indexAug = EQEmu::invaug::SOCKET_BEGIN; indexAug <= EQEmu::invaug::SOCKET_END; ++indexAug) { inst_aug = inst_main->GetItem(indexAug); if (!inst_aug) // extant only continue; @@ -2746,7 +2746,7 @@ void command_peekinv(Client *c, const Seperator *sep) ".%sAugSlot: %i (Slot #%i, Aug idx #%i), Item: %i (%s), Charges: %i", scope_prefix[scopeIndex], INVALID_INDEX, - EQEmu::inventory::slotPowerSource, + EQEmu::invslot::SLOT_POWER_SOURCE, indexAug, ((item_data == nullptr) ? 0 : item_data->ID), linker.GenerateLink().c_str(), @@ -2784,7 +2784,7 @@ void command_peekinv(Client *c, const Seperator *sep) ); if (inst_main && inst_main->IsClassCommon()) { - for (uint8 indexAug = EQEmu::inventory::socketBegin; indexAug < EQEmu::inventory::SocketCount; ++indexAug) { + for (uint8 indexAug = EQEmu::invaug::SOCKET_BEGIN; indexAug <= EQEmu::invaug::SOCKET_END; ++indexAug) { inst_aug = inst_main->GetItem(indexAug); if (!inst_aug) // extant only continue; @@ -2809,7 +2809,7 @@ void command_peekinv(Client *c, const Seperator *sep) if (!scope_bag[scopeIndex] || !(inst_main && inst_main->IsClassBag())) continue; - for (uint8 indexSub = EQEmu::inventory::containerBegin; indexSub < EQEmu::inventory::ContainerCount; ++indexSub) { + for (uint8 indexSub = EQEmu::invbag::SLOT_BEGIN; indexSub <= EQEmu::invbag::SLOT_END; ++indexSub) { inst_sub = inst_main->GetItem(indexSub); if (!inst_sub) continue; @@ -2831,7 +2831,7 @@ void command_peekinv(Client *c, const Seperator *sep) ); if (inst_sub->IsClassCommon()) { - for (uint8 indexAug = EQEmu::inventory::socketBegin; indexAug < EQEmu::inventory::SocketCount; ++indexAug) { + for (uint8 indexAug = EQEmu::invaug::SOCKET_BEGIN; indexAug <= EQEmu::invaug::SOCKET_END; ++indexAug) { inst_aug = inst_sub->GetItem(indexAug); if (!inst_aug) // extant only continue; @@ -3266,8 +3266,8 @@ void command_listpetition(Client *c, const Seperator *sep) void command_equipitem(Client *c, const Seperator *sep) { uint32 slot_id = atoi(sep->arg[1]); - if (sep->IsNumber(1) && ((slot_id >= EQEmu::legacy::EQUIPMENT_BEGIN) && (slot_id <= EQEmu::legacy::EQUIPMENT_END) || (slot_id == EQEmu::inventory::slotPowerSource))) { - const EQEmu::ItemInstance* from_inst = c->GetInv().GetItem(EQEmu::inventory::slotCursor); + if (sep->IsNumber(1) && ((slot_id >= EQEmu::invslot::EQUIPMENT_BEGIN) && (slot_id <= EQEmu::invslot::EQUIPMENT_END) || (slot_id == EQEmu::invslot::SLOT_POWER_SOURCE))) { + const EQEmu::ItemInstance* from_inst = c->GetInv().GetItem(EQEmu::invslot::slotCursor); const EQEmu::ItemInstance* to_inst = c->GetInv().GetItem(slot_id); // added (desync issue when forcing stack to stack) bool partialmove = false; int16 movecount; @@ -3275,7 +3275,7 @@ void command_equipitem(Client *c, const Seperator *sep) if (from_inst && from_inst->IsClassCommon()) { auto outapp = new EQApplicationPacket(OP_MoveItem, sizeof(MoveItem_Struct)); MoveItem_Struct* mi = (MoveItem_Struct*)outapp->pBuffer; - mi->from_slot = EQEmu::inventory::slotCursor; + mi->from_slot = EQEmu::invslot::slotCursor; mi->to_slot = slot_id; // mi->number_in_stack = from_inst->GetCharges(); // replaced with con check for stacking @@ -4521,7 +4521,7 @@ void command_goto(Client *c, const Seperator *sep) void command_iteminfo(Client *c, const Seperator *sep) { - auto inst = c->GetInv()[EQEmu::inventory::slotCursor]; + auto inst = c->GetInv()[EQEmu::invslot::slotCursor]; if (!inst) { c->Message(13, "Error: You need an item on your cursor for this command"); return; @@ -5681,9 +5681,9 @@ void command_summonitem(Client *c, const Seperator *sep) std::string cmd_msg = sep->msg; size_t link_open = cmd_msg.find('\x12'); size_t link_close = cmd_msg.find_last_of('\x12'); - if (link_open != link_close && (cmd_msg.length() - link_open) > EQEmu::constants::SayLinkBodySize) { + if (link_open != link_close && (cmd_msg.length() - link_open) > EQEmu::constants::SAY_LINK_BODY_SIZE) { EQEmu::SayLinkBody_Struct link_body; - EQEmu::saylink::DegenerateLinkBody(link_body, cmd_msg.substr(link_open + 1, EQEmu::constants::SayLinkBodySize)); + EQEmu::saylink::DegenerateLinkBody(link_body, cmd_msg.substr(link_open + 1, EQEmu::constants::SAY_LINK_BODY_SIZE)); itemid = link_body.item_id; } else if (!sep->IsNumber(1)) { diff --git a/zone/corpse.cpp b/zone/corpse.cpp index 63031ec45..586789f0f 100644 --- a/zone/corpse.cpp +++ b/zone/corpse.cpp @@ -322,12 +322,12 @@ Corpse::Corpse(Client* client, int32 in_rezexp) : Mob ( // to go into the regular slots on the player, out of bags std::list removed_list; - for (i = EQEmu::inventory::slotBegin; i < EQEmu::legacy::TYPE_POSSESSIONS_SIZE; ++i) { - if (i == EQEmu::inventory::slotAmmo && client->ClientVersion() >= EQEmu::versions::ClientVersion::SoF) { - item = client->GetInv().GetItem(EQEmu::inventory::slotPowerSource); + for (i = EQEmu::invslot::POSSESSIONS_BEGIN; i <= EQEmu::invslot::POSSESSIONS_END; ++i) { + if (i == EQEmu::invslot::slotAmmo && client->ClientVersion() >= EQEmu::versions::ClientVersion::SoF) { + item = client->GetInv().GetItem(EQEmu::invslot::SLOT_POWER_SOURCE); if (item != nullptr) { if (!client->IsBecomeNPC() || (client->IsBecomeNPC() && !item->GetItem()->NoRent)) - MoveItemToCorpse(client, item, EQEmu::inventory::slotPowerSource, removed_list); + MoveItemToCorpse(client, item, EQEmu::invslot::SLOT_POWER_SOURCE, removed_list); } } @@ -404,9 +404,9 @@ void Corpse::MoveItemToCorpse(Client *client, EQEmu::ItemInstance *inst, int16 e while (true) { if (!inst->IsClassBag()) { break; } - if (equipSlot < EQEmu::legacy::GENERAL_BEGIN || equipSlot > EQEmu::inventory::slotCursor) { break; } + if (equipSlot < EQEmu::invslot::GENERAL_BEGIN || equipSlot > EQEmu::invslot::slotCursor) { break; } - for (int16 sub_index = EQEmu::inventory::containerBegin; sub_index < EQEmu::inventory::ContainerCount; ++sub_index) { + for (int16 sub_index = EQEmu::invbag::SLOT_BEGIN; sub_index <= EQEmu::invbag::SLOT_END; ++sub_index) { int16 real_bag_slot = EQEmu::InventoryProfile::CalcSlotId(equipSlot, sub_index); auto bag_inst = client->GetInv().GetItem(real_bag_slot); if (bag_inst == nullptr) { continue; } @@ -684,7 +684,7 @@ ServerLootItem_Struct* Corpse::GetItem(uint16 lootslot, ServerLootItem_Struct** } if (sitem && bag_item_data && EQEmu::InventoryProfile::SupportsContainers(sitem->equip_slot)) { - int16 bagstart = EQEmu::InventoryProfile::CalcSlotId(sitem->equip_slot, EQEmu::inventory::containerBegin); + int16 bagstart = EQEmu::InventoryProfile::CalcSlotId(sitem->equip_slot, EQEmu::invbag::SLOT_BEGIN); cur = itemlist.begin(); end = itemlist.end(); @@ -983,7 +983,7 @@ void Corpse::MakeLootRequestPackets(Client* client, const EQApplicationPacket* a if(inst) { if (item->RecastDelay) inst->SetRecastTimestamp(timestamps.count(item->RecastType) ? timestamps.at(item->RecastType) : 0); - client->SendItemPacket(EQEmu::legacy::CORPSE_BEGIN, inst, ItemPacketLoot); + client->SendItemPacket(EQEmu::invslot::CORPSE_BEGIN, inst, ItemPacketLoot); safe_delete(inst); } else { client->Message(13, "Could not find item number %i to send!!", GetPlayerKillItem()); } @@ -998,7 +998,7 @@ void Corpse::MakeLootRequestPackets(Client* client, const EQApplicationPacket* a cur = itemlist.begin(); end = itemlist.end(); - int corpselootlimit = EQEmu::inventory::Lookup(EQEmu::versions::ConvertClientVersionToMobVersion(client->ClientVersion()))->InventoryTypeSize[EQEmu::inventory::typeCorpse]; + int corpselootlimit = EQEmu::inventory::Lookup(EQEmu::versions::ConvertClientVersionToMobVersion(client->ClientVersion()))->InventoryTypeSize[EQEmu::invtype::typeCorpse]; for(; cur != end; ++cur) { ServerLootItem_Struct* item_data = *cur; @@ -1007,7 +1007,7 @@ void Corpse::MakeLootRequestPackets(Client* client, const EQApplicationPacket* a // Dont display the item if it's in a bag // Added cursor queue slots to corpse item visibility list. Nothing else should be making it to corpse. - if (!IsPlayerCorpse() || item_data->equip_slot <= EQEmu::inventory::slotCursor || item_data->equip_slot == EQEmu::inventory::slotPowerSource || Loot_Request_Type >= 3 || + if (!IsPlayerCorpse() || item_data->equip_slot <= EQEmu::invslot::slotCursor || item_data->equip_slot == EQEmu::invslot::SLOT_POWER_SOURCE || Loot_Request_Type >= 3 || (item_data->equip_slot >= 8000 && item_data->equip_slot <= 8999)) { if(i < corpselootlimit) { item = database.GetItem(item_data->item_id); @@ -1017,7 +1017,7 @@ void Corpse::MakeLootRequestPackets(Client* client, const EQApplicationPacket* a if (item->RecastDelay) inst->SetRecastTimestamp(timestamps.count(item->RecastType) ? timestamps.at(item->RecastType) : 0); // SlotGeneral1 is the corpse inventory start offset for Ti(EMu) - CORPSE_END = SlotGeneral1 + SlotCursor - client->SendItemPacket(i + EQEmu::legacy::CORPSE_BEGIN, inst, ItemPacketLoot); + client->SendItemPacket(i + EQEmu::invslot::CORPSE_BEGIN, inst, ItemPacketLoot); safe_delete(inst); } @@ -1126,9 +1126,9 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app) } else if (GetPlayerKillItem() == -1 || GetPlayerKillItem() == 1) { item_data = GetItem(lootitem->slot_id - - EQEmu::legacy::CORPSE_BEGIN); // dont allow them to loot entire bags of items as pvp reward + EQEmu::invslot::CORPSE_BEGIN); // dont allow them to loot entire bags of items as pvp reward } else { - item_data = GetItem(lootitem->slot_id - EQEmu::legacy::CORPSE_BEGIN, bag_item_data); + item_data = GetItem(lootitem->slot_id - EQEmu::invslot::CORPSE_BEGIN, bag_item_data); } if (GetPlayerKillItem() <= 1 && item_data != 0) { @@ -1156,7 +1156,7 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app) } if (inst->IsAugmented()) { - for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) { + for (int i = EQEmu::invaug::SOCKET_BEGIN; i <= EQEmu::invaug::SOCKET_END; i++) { EQEmu::ItemInstance *itm = inst->GetAugment(i); if (itm) { if (client->CheckLoreConflict(itm->GetItem())) { @@ -1210,9 +1210,9 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app) /* First add it to the looter - this will do the bag contents too */ if (lootitem->auto_loot > 0) { if (!client->AutoPutLootInInventory(*inst, true, true, bag_item_data)) - client->PutLootInInventory(EQEmu::inventory::slotCursor, *inst, bag_item_data); + client->PutLootInInventory(EQEmu::invslot::slotCursor, *inst, bag_item_data); } else { - client->PutLootInInventory(EQEmu::inventory::slotCursor, *inst, bag_item_data); + client->PutLootInInventory(EQEmu::invslot::slotCursor, *inst, bag_item_data); } /* Update any tasks that have an activity to loot this item */ @@ -1231,7 +1231,7 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app) /* Remove Bag Contents */ if (item->IsClassBag() && (GetPlayerKillItem() != -1 || GetPlayerKillItem() != 1)) { - for (int i = EQEmu::inventory::containerBegin; i < EQEmu::inventory::ContainerCount; i++) { + for (int i = EQEmu::invbag::SLOT_BEGIN; i <= EQEmu::invbag::SLOT_END; i++) { if (bag_item_data[i]) { /* Delete needs to be before RemoveItem because its deletes the pointer for * item_data/bag_item_data */ @@ -1317,13 +1317,13 @@ void Corpse::QueryLoot(Client* to) { cur = itemlist.begin(); end = itemlist.end(); - int corpselootlimit = EQEmu::inventory::Lookup(EQEmu::versions::ConvertClientVersionToMobVersion(to->ClientVersion()))->InventoryTypeSize[EQEmu::inventory::typeCorpse]; + int corpselootlimit = EQEmu::inventory::Lookup(EQEmu::versions::ConvertClientVersionToMobVersion(to->ClientVersion()))->InventoryTypeSize[EQEmu::invtype::typeCorpse]; for(; cur != end; ++cur) { ServerLootItem_Struct* sitem = *cur; if (IsPlayerCorpse()) { - if (sitem->equip_slot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && sitem->equip_slot <= EQEmu::legacy::CURSOR_BAG_END) + if (sitem->equip_slot >= EQEmu::invbag::GENERAL_BAGS_BEGIN && sitem->equip_slot <= EQEmu::invbag::CURSOR_BAG_END) sitem->lootslot = 0xFFFF; else x < corpselootlimit ? sitem->lootslot = x : sitem->lootslot = 0xFFFF; @@ -1457,8 +1457,8 @@ void Corpse::UpdateEquipmentLight() m_Light.Level[EQEmu::lightsource::LightEquipment] = 0; for (auto iter = itemlist.begin(); iter != itemlist.end(); ++iter) { - if (((*iter)->equip_slot < EQEmu::legacy::EQUIPMENT_BEGIN || (*iter)->equip_slot > EQEmu::legacy::EQUIPMENT_END) && (*iter)->equip_slot != EQEmu::inventory::slotPowerSource) { continue; } - if ((*iter)->equip_slot == EQEmu::inventory::slotAmmo) { continue; } + if (((*iter)->equip_slot < EQEmu::invslot::EQUIPMENT_BEGIN || (*iter)->equip_slot > EQEmu::invslot::EQUIPMENT_END) && (*iter)->equip_slot != EQEmu::invslot::SLOT_POWER_SOURCE) { continue; } + if ((*iter)->equip_slot == EQEmu::invslot::slotAmmo) { continue; } auto item = database.GetItem((*iter)->item_id); if (item == nullptr) { continue; } @@ -1469,7 +1469,7 @@ void Corpse::UpdateEquipmentLight() uint8 general_light_type = 0; for (auto iter = itemlist.begin(); iter != itemlist.end(); ++iter) { - if ((*iter)->equip_slot < EQEmu::legacy::GENERAL_BEGIN || (*iter)->equip_slot > EQEmu::legacy::GENERAL_END) { continue; } + if ((*iter)->equip_slot < EQEmu::invslot::GENERAL_BEGIN || (*iter)->equip_slot > EQEmu::invslot::GENERAL_END) { continue; } auto item = database.GetItem((*iter)->item_id); if (item == nullptr) { continue; } diff --git a/zone/corpse.h b/zone/corpse.h index e601f2aa3..84bce15fa 100644 --- a/zone/corpse.h +++ b/zone/corpse.h @@ -53,7 +53,7 @@ class Corpse : public Mob { /* Corpse: General */ virtual bool Death(Mob* killerMob, int32 damage, uint16 spell_id, EQEmu::skills::SkillType attack_skill) { return true; } virtual void Damage(Mob* from, int32 damage, uint16 spell_id, EQEmu::skills::SkillType attack_skill, bool avoidable = true, int8 buffslot = -1, bool iBuffTic = false, eSpecialAttacks special = eSpecialAttacks::None) { return; } - virtual bool Attack(Mob* other, int Hand = EQEmu::inventory::slotPrimary, bool FromRiposte = false, bool IsStrikethrough = true, bool IsFromSpell = false, ExtraAttackOptions *opts = nullptr) { return false; } + virtual bool Attack(Mob* other, int Hand = EQEmu::invslot::slotPrimary, bool FromRiposte = false, bool IsStrikethrough = true, bool IsFromSpell = false, ExtraAttackOptions *opts = nullptr) { return false; } virtual bool HasRaid() { return false; } virtual bool HasGroup() { return false; } virtual Raid* GetRaid() { return 0; } diff --git a/zone/doors.cpp b/zone/doors.cpp index b4cff6679..9561757df 100644 --- a/zone/doors.cpp +++ b/zone/doors.cpp @@ -210,7 +210,7 @@ void Doors::HandleClick(Client* sender, uint8 trigger) { uint32 player_has_key = 0; uint32 player_key = 0; - const EQEmu::ItemInstance *lock_pick_item = sender->GetInv().GetItem(EQEmu::inventory::slotCursor); + const EQEmu::ItemInstance *lock_pick_item = sender->GetInv().GetItem(EQEmu::invslot::slotCursor); player_has_key = static_cast(sender->GetInv().HasItem(required_key_item, 1)); if (player_has_key != INVALID_INDEX) { diff --git a/zone/encounter.h b/zone/encounter.h index e0d8dbcb0..eeeba8e0f 100644 --- a/zone/encounter.h +++ b/zone/encounter.h @@ -36,7 +36,7 @@ public: //abstract virtual function implementations required by base abstract class virtual bool Death(Mob* killerMob, int32 damage, uint16 spell_id, EQEmu::skills::SkillType attack_skill) { return true; } virtual void Damage(Mob* from, int32 damage, uint16 spell_id, EQEmu::skills::SkillType attack_skill, bool avoidable = true, int8 buffslot = -1, bool iBuffTic = false, eSpecialAttacks special = eSpecialAttacks::None) { return; } - virtual bool Attack(Mob* other, int Hand = EQEmu::inventory::slotPrimary, bool FromRiposte = false, bool IsStrikethrough = false, bool IsFromSpell = false, + virtual bool Attack(Mob* other, int Hand = EQEmu::invslot::slotPrimary, bool FromRiposte = false, bool IsStrikethrough = false, bool IsFromSpell = false, ExtraAttackOptions *opts = nullptr) { return false; } diff --git a/zone/entity.h b/zone/entity.h index c56cbbb05..ce3215ac5 100644 --- a/zone/entity.h +++ b/zone/entity.h @@ -357,7 +357,7 @@ public: void QueueToGroupsForNPCHealthAA(Mob* sender, const EQApplicationPacket* app); void QueueManaged(Mob* sender, const EQApplicationPacket* app, bool ignore_sender=false, bool ackreq = true); - void AEAttack(Mob *attacker, float dist, int Hand = EQEmu::inventory::slotPrimary, int count = 0, bool IsFromSpell = false); + void AEAttack(Mob *attacker, float dist, int Hand = EQEmu::invslot::slotPrimary, int count = 0, bool IsFromSpell = false); void AETaunt(Client *caster, float range=0, int32 bonus_hate=0); void AESpell(Mob *caster, Mob *center, uint16 spell_id, bool affect_caster = true, int16 resist_adjust = 0, int *max_targets = nullptr); void MassGroupBuff(Mob *caster, Mob *center, uint16 spell_id, bool affect_caster = true); diff --git a/zone/forage.cpp b/zone/forage.cpp index 7adb245ee..e5248cf01 100644 --- a/zone/forage.cpp +++ b/zone/forage.cpp @@ -153,7 +153,7 @@ uint32 ZoneDatabase::GetZoneFishing(uint32 ZoneID, uint8 skill, uint32 &npc_id, //we need this function to immediately determine, after we receive OP_Fishing, if we can even try to fish, otherwise we have to wait a while to get the failure bool Client::CanFish() { //make sure we still have a fishing pole on: - const EQEmu::ItemInstance* Pole = m_inv[EQEmu::inventory::slotPrimary]; + const EQEmu::ItemInstance* Pole = m_inv[EQEmu::invslot::slotPrimary]; int32 bslot = m_inv.HasItemByUse(EQEmu::item::ItemTypeFishingBait, 1, invWhereWorn | invWherePersonal); const EQEmu::ItemInstance* Bait = nullptr; if (bslot != INVALID_INDEX) @@ -258,7 +258,7 @@ void Client::GoFish() Bait = m_inv.GetItem(bslot); //if the bait isnt equipped, need to add its skill bonus - if (bslot >= EQEmu::legacy::GENERAL_BEGIN && Bait != nullptr && Bait->GetItem()->SkillModType == EQEmu::skills::SkillFishing) { + if (bslot >= EQEmu::invslot::GENERAL_BEGIN && Bait != nullptr && Bait->GetItem()->SkillModType == EQEmu::skills::SkillFishing) { fishing_skill += Bait->GetItem()->SkillModValue; } @@ -331,12 +331,12 @@ void Client::GoFish() else { PushItemOnCursor(*inst); - SendItemPacket(EQEmu::inventory::slotCursor, inst, ItemPacketLimbo); + SendItemPacket(EQEmu::invslot::slotCursor, inst, ItemPacketLimbo); if(RuleB(TaskSystem, EnableTaskSystem)) UpdateTasksForItem(ActivityFish, food_id); safe_delete(inst); - inst = m_inv.GetItem(EQEmu::inventory::slotCursor); + inst = m_inv.GetItem(EQEmu::invslot::slotCursor); } if(inst) { @@ -368,7 +368,7 @@ void Client::GoFish() //and then swap out items in primary slot... too lazy to fix right now if (zone->random.Int(0, 49) == 1) { Message_StringID(MT_Skills, FISHING_POLE_BROKE); //Your fishing pole broke! - DeleteItemInInventory(EQEmu::inventory::slotPrimary, 0, true); + DeleteItemInInventory(EQEmu::invslot::slotPrimary, 0, true); } if (CheckIncreaseSkill(EQEmu::skills::SkillFishing, nullptr, 5)) @@ -445,12 +445,12 @@ void Client::ForageItem(bool guarantee) { } else { PushItemOnCursor(*inst); - SendItemPacket(EQEmu::inventory::slotCursor, inst, ItemPacketLimbo); + SendItemPacket(EQEmu::invslot::slotCursor, inst, ItemPacketLimbo); if(RuleB(TaskSystem, EnableTaskSystem)) UpdateTasksForItem(ActivityForage, foragedfood); safe_delete(inst); - inst = m_inv.GetItem(EQEmu::inventory::slotCursor); + inst = m_inv.GetItem(EQEmu::invslot::slotCursor); } if(inst) { diff --git a/zone/inventory.cpp b/zone/inventory.cpp index 17cfc1aa1..d375d94b6 100644 --- a/zone/inventory.cpp +++ b/zone/inventory.cpp @@ -35,7 +35,7 @@ uint32 Client::NukeItem(uint32 itemnum, uint8 where_to_check) { int i; if(where_to_check & invWhereWorn) { - for (i = EQEmu::legacy::EQUIPMENT_BEGIN; i <= EQEmu::legacy::EQUIPMENT_END; i++) { + for (i = EQEmu::invslot::EQUIPMENT_BEGIN; i <= EQEmu::invslot::EQUIPMENT_END; i++) { if (GetItemIDAt(i) == itemnum || (itemnum == 0xFFFE && GetItemIDAt(i) != INVALID_ID)) { cur = m_inv.GetItem(i); if(cur && cur->GetItem()->Stackable) { @@ -48,8 +48,8 @@ uint32 Client::NukeItem(uint32 itemnum, uint8 where_to_check) { } } - if (GetItemIDAt(EQEmu::inventory::slotPowerSource) == itemnum || (itemnum == 0xFFFE && GetItemIDAt(EQEmu::inventory::slotPowerSource) != INVALID_ID)) { - cur = m_inv.GetItem(EQEmu::inventory::slotPowerSource); + if (GetItemIDAt(EQEmu::invslot::SLOT_POWER_SOURCE) == itemnum || (itemnum == 0xFFFE && GetItemIDAt(EQEmu::invslot::SLOT_POWER_SOURCE) != INVALID_ID)) { + cur = m_inv.GetItem(EQEmu::invslot::SLOT_POWER_SOURCE); if(cur && cur->GetItem()->Stackable) { x += cur->GetCharges(); } else { @@ -57,25 +57,25 @@ uint32 Client::NukeItem(uint32 itemnum, uint8 where_to_check) { } if (ClientVersion() >= EQEmu::versions::ClientVersion::SoF) - DeleteItemInInventory(EQEmu::inventory::slotPowerSource, 0, true); + DeleteItemInInventory(EQEmu::invslot::SLOT_POWER_SOURCE, 0, true); else - DeleteItemInInventory(EQEmu::inventory::slotPowerSource, 0, false); // Prevents Titanium crash + DeleteItemInInventory(EQEmu::invslot::SLOT_POWER_SOURCE, 0, false); // Prevents Titanium crash } } if(where_to_check & invWhereCursor) { - if (GetItemIDAt(EQEmu::inventory::slotCursor) == itemnum || (itemnum == 0xFFFE && GetItemIDAt(EQEmu::inventory::slotCursor) != INVALID_ID)) { - cur = m_inv.GetItem(EQEmu::inventory::slotCursor); + if (GetItemIDAt(EQEmu::invslot::slotCursor) == itemnum || (itemnum == 0xFFFE && GetItemIDAt(EQEmu::invslot::slotCursor) != INVALID_ID)) { + cur = m_inv.GetItem(EQEmu::invslot::slotCursor); if(cur && cur->GetItem()->Stackable) { x += cur->GetCharges(); } else { x++; } - DeleteItemInInventory(EQEmu::inventory::slotCursor, 0, true); + DeleteItemInInventory(EQEmu::invslot::slotCursor, 0, true); } - for (i = EQEmu::legacy::CURSOR_BAG_BEGIN; i <= EQEmu::legacy::CURSOR_BAG_END; i++) { + for (i = EQEmu::invbag::CURSOR_BAG_BEGIN; i <= EQEmu::invbag::CURSOR_BAG_END; i++) { if (GetItemIDAt(i) == itemnum || (itemnum == 0xFFFE && GetItemIDAt(i) != INVALID_ID)) { cur = m_inv.GetItem(i); if(cur && cur->GetItem()->Stackable) { @@ -90,7 +90,7 @@ uint32 Client::NukeItem(uint32 itemnum, uint8 where_to_check) { } if(where_to_check & invWherePersonal) { - for (i = EQEmu::legacy::GENERAL_BEGIN; i <= EQEmu::legacy::GENERAL_END; i++) { + for (i = EQEmu::invslot::GENERAL_BEGIN; i <= EQEmu::invslot::GENERAL_END; i++) { if (GetItemIDAt(i) == itemnum || (itemnum == 0xFFFE && GetItemIDAt(i) != INVALID_ID)) { cur = m_inv.GetItem(i); if(cur && cur->GetItem()->Stackable) { @@ -103,7 +103,7 @@ uint32 Client::NukeItem(uint32 itemnum, uint8 where_to_check) { } } - for (i = EQEmu::legacy::GENERAL_BAGS_BEGIN; i <= EQEmu::legacy::GENERAL_BAGS_END; i++) { + for (i = EQEmu::invbag::GENERAL_BAGS_BEGIN; i <= EQEmu::invbag::GENERAL_BAGS_END; i++) { if (GetItemIDAt(i) == itemnum || (itemnum == 0xFFFE && GetItemIDAt(i) != INVALID_ID)) { cur = m_inv.GetItem(i); if(cur && cur->GetItem()->Stackable) { @@ -118,7 +118,7 @@ uint32 Client::NukeItem(uint32 itemnum, uint8 where_to_check) { } if(where_to_check & invWhereBank) { - for (i = EQEmu::legacy::BANK_BEGIN; i <= EQEmu::legacy::BANK_END; i++) { + for (i = EQEmu::invslot::BANK_BEGIN; i <= EQEmu::invslot::BANK_END; i++) { if (GetItemIDAt(i) == itemnum || (itemnum == 0xFFFE && GetItemIDAt(i) != INVALID_ID)) { cur = m_inv.GetItem(i); if(cur && cur->GetItem()->Stackable) { @@ -131,7 +131,7 @@ uint32 Client::NukeItem(uint32 itemnum, uint8 where_to_check) { } } - for (i = EQEmu::legacy::BANK_BAGS_BEGIN; i <= EQEmu::legacy::BANK_BAGS_END; i++) { + for (i = EQEmu::invbag::BANK_BAGS_BEGIN; i <= EQEmu::invbag::BANK_BAGS_END; i++) { if (GetItemIDAt(i) == itemnum || (itemnum == 0xFFFE && GetItemIDAt(i) != INVALID_ID)) { cur = m_inv.GetItem(i); if(cur && cur->GetItem()->Stackable) { @@ -146,7 +146,7 @@ uint32 Client::NukeItem(uint32 itemnum, uint8 where_to_check) { } if(where_to_check & invWhereSharedBank) { - for (i = EQEmu::legacy::SHARED_BANK_BEGIN; i <= EQEmu::legacy::SHARED_BANK_END; i++) { + for (i = EQEmu::invslot::SHARED_BANK_BEGIN; i <= EQEmu::invslot::SHARED_BANK_END; i++) { if (GetItemIDAt(i) == itemnum || (itemnum == 0xFFFE && GetItemIDAt(i) != INVALID_ID)) { cur = m_inv.GetItem(i); if(cur && cur->GetItem()->Stackable) { @@ -159,7 +159,7 @@ uint32 Client::NukeItem(uint32 itemnum, uint8 where_to_check) { } } - for (i = EQEmu::legacy::SHARED_BANK_BAGS_BEGIN; i <= EQEmu::legacy::SHARED_BANK_BAGS_END; i++) { + for (i = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN; i <= EQEmu::invbag::SHARED_BANK_BAGS_END; i++) { if (GetItemIDAt(i) == itemnum || (itemnum == 0xFFFE && GetItemIDAt(i) != INVALID_ID)) { cur = m_inv.GetItem(i); if(cur && cur->GetItem()->Stackable) { @@ -236,7 +236,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2, } */ - uint32 augments[EQEmu::inventory::SocketCount] = { aug1, aug2, aug3, aug4, aug5, aug6 }; + uint32 augments[EQEmu::invaug::SOCKET_COUNT] = { aug1, aug2, aug3, aug4, aug5, aug6 }; uint32 classes = item->Classes; uint32 races = item->Races; @@ -246,7 +246,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2, bool enforcerestr = RuleB(Inventory, EnforceAugmentRestriction); bool enforceusable = RuleB(Inventory, EnforceAugmentUsability); - for (int iter = EQEmu::inventory::socketBegin; iter < EQEmu::inventory::SocketCount; ++iter) { + for (int iter = EQEmu::invaug::SOCKET_BEGIN; iter <= EQEmu::invaug::SOCKET_END; ++iter) { const EQEmu::ItemData* augtest = database.GetItem(augments[iter]); if(augtest == nullptr) { @@ -540,7 +540,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2, } // add any validated augments - for (int iter = EQEmu::inventory::socketBegin; iter < EQEmu::inventory::SocketCount; ++iter) { + for (int iter = EQEmu::invaug::SOCKET_BEGIN; iter <= EQEmu::invaug::SOCKET_END; ++iter) { if(augments[iter]) inst->PutAugment(&database, iter, augments[iter]); } @@ -554,22 +554,22 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2, inst->SetOrnamentHeroModel(ornament_hero_model); // check to see if item is usable in requested slot - if (enforceusable && (((to_slot >= EQEmu::inventory::slotCharm) && (to_slot <= EQEmu::inventory::slotAmmo)) || (to_slot == EQEmu::inventory::slotPowerSource))) { - uint32 slottest = (to_slot == EQEmu::inventory::slotPowerSource) ? 22 : to_slot; // can't change '22' just yet... + if (enforceusable && (((to_slot >= EQEmu::invslot::slotCharm) && (to_slot <= EQEmu::invslot::slotAmmo)) || (to_slot == EQEmu::invslot::SLOT_POWER_SOURCE))) { + uint32 slottest = (to_slot == EQEmu::invslot::SLOT_POWER_SOURCE) ? 22 : to_slot; // can't change '22' just yet... if(!(slots & ((uint32)1 << slottest))) { Message(0, "This item is not equipable at slot %u - moving to cursor.", to_slot); Log(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to equip an item unusable in slot %u - moved to cursor.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n", GetName(), account_name, to_slot, item->ID, aug1, aug2, aug3, aug4, aug5, aug6); - to_slot = EQEmu::inventory::slotCursor; + to_slot = EQEmu::invslot::slotCursor; } } // put item into inventory - if (to_slot == EQEmu::inventory::slotCursor) { + if (to_slot == EQEmu::invslot::slotCursor) { PushItemOnCursor(*inst); - SendItemPacket(EQEmu::inventory::slotCursor, inst, ItemPacketLimbo); + SendItemPacket(EQEmu::invslot::slotCursor, inst, ItemPacketLimbo); } else { PutItemInInventory(to_slot, *inst, true); @@ -671,7 +671,7 @@ void Client::DropItem(int16 slot_id, bool recurse) } // Save client inventory change to database - if (slot_id == EQEmu::inventory::slotCursor) { + if (slot_id == EQEmu::invslot::slotCursor) { SendCursorBuffer(); auto s = m_inv.cursor_cbegin(), e = m_inv.cursor_cend(); database.SaveCursor(CharacterID(), s, e); @@ -762,11 +762,11 @@ void Client::SendCursorBuffer() GetName(), test_item->Name, test_item->ID); Message_StringID(MT_LootMessages, 290); parse->EventItem(EVENT_DESTROY_ITEM, this, test_inst, nullptr, "", 0); - DeleteItemInInventory(EQEmu::inventory::slotCursor); + DeleteItemInInventory(EQEmu::invslot::slotCursor); SendCursorBuffer(); } else { - SendItemPacket(EQEmu::inventory::slotCursor, test_inst, ItemPacketLimbo); + SendItemPacket(EQEmu::invslot::slotCursor, test_inst, ItemPacketLimbo); } } @@ -819,7 +819,7 @@ void Client::DeleteItemInInventory(int16 slot_id, int8 quantity, bool client_upd qsaudit->items[parent_offset].aug_5 = m_inv[slot_id]->GetAugmentItemID(5); if (m_inv[slot_id]->IsClassBag()) { - for (uint8 bag_idx = EQEmu::inventory::containerBegin; bag_idx < m_inv[slot_id]->GetItem()->BagSlots; bag_idx++) { + for (uint8 bag_idx = EQEmu::invbag::SLOT_BEGIN; bag_idx < m_inv[slot_id]->GetItem()->BagSlots; bag_idx++) { EQEmu::ItemInstance* bagitem = m_inv[slot_id]->GetItem(bag_idx); if(bagitem) { @@ -845,7 +845,7 @@ void Client::DeleteItemInInventory(int16 slot_id, int8 quantity, bool client_upd bool isDeleted = m_inv.DeleteItem(slot_id, quantity); const EQEmu::ItemInstance* inst = nullptr; - if (slot_id == EQEmu::inventory::slotCursor) { + if (slot_id == EQEmu::invslot::slotCursor) { auto s = m_inv.cursor_cbegin(), e = m_inv.cursor_cend(); if(update_db) database.SaveCursor(character_id, s, e); @@ -897,7 +897,7 @@ bool Client::PushItemOnCursor(const EQEmu::ItemInstance& inst, bool client_updat m_inv.PushCursor(inst); if (client_update) { - SendItemPacket(EQEmu::inventory::slotCursor, &inst, ItemPacketLimbo); + SendItemPacket(EQEmu::invslot::slotCursor, &inst, ItemPacketLimbo); } auto s = m_inv.cursor_cbegin(), e = m_inv.cursor_cend(); @@ -911,7 +911,7 @@ bool Client::PushItemOnCursor(const EQEmu::ItemInstance& inst, bool client_updat bool Client::PutItemInInventory(int16 slot_id, const EQEmu::ItemInstance& inst, bool client_update) { Log(Logs::Detail, Logs::Inventory, "Putting item %s (%d) into slot %d", inst.GetItem()->Name, inst.GetItem()->ID, slot_id); - if (slot_id == EQEmu::inventory::slotCursor) { // don't trust macros before conditional statements... + if (slot_id == EQEmu::invslot::slotCursor) { // don't trust macros before conditional statements... return PushItemOnCursor(inst, client_update); } else { @@ -920,11 +920,11 @@ bool Client::PutItemInInventory(int16 slot_id, const EQEmu::ItemInstance& inst, if (client_update) { - SendItemPacket(slot_id, &inst, ((slot_id == EQEmu::inventory::slotCursor) ? ItemPacketLimbo : ItemPacketTrade)); + SendItemPacket(slot_id, &inst, ((slot_id == EQEmu::invslot::slotCursor) ? ItemPacketLimbo : ItemPacketTrade)); //SendWearChange(EQEmu::InventoryProfile::CalcMaterialFromSlot(slot_id)); } - if (slot_id == EQEmu::inventory::slotCursor) { + if (slot_id == EQEmu::invslot::slotCursor) { auto s = m_inv.cursor_cbegin(), e = m_inv.cursor_cend(); return database.SaveCursor(this->CharacterID(), s, e); } @@ -942,7 +942,7 @@ void Client::PutLootInInventory(int16 slot_id, const EQEmu::ItemInstance &inst, bool cursor_empty = m_inv.CursorEmpty(); - if (slot_id == EQEmu::inventory::slotCursor) { + if (slot_id == EQEmu::invslot::slotCursor) { m_inv.PushCursor(inst); auto s = m_inv.cursor_cbegin(), e = m_inv.cursor_cend(); database.SaveCursor(this->CharacterID(), s, e); @@ -953,7 +953,7 @@ void Client::PutLootInInventory(int16 slot_id, const EQEmu::ItemInstance &inst, } // Subordinate items in cursor buffer must be sent via ItemPacketSummonItem or we just overwrite the visible cursor and desync the client - if (slot_id == EQEmu::inventory::slotCursor && !cursor_empty) { + if (slot_id == EQEmu::invslot::slotCursor && !cursor_empty) { // RoF+ currently has a specialized cursor handler if (ClientVersion() < EQEmu::versions::ClientVersion::RoF) SendItemPacket(slot_id, &inst, ItemPacketLimbo); @@ -963,7 +963,7 @@ void Client::PutLootInInventory(int16 slot_id, const EQEmu::ItemInstance &inst, } if (bag_item_data) { - for (int index = 0; index < EQEmu::inventory::ContainerCount; ++index) { + for (int index = 0; index < EQEmu::invbag::SLOT_COUNT; ++index) { if (bag_item_data[index] == nullptr) continue; @@ -981,12 +981,12 @@ void Client::PutLootInInventory(int16 slot_id, const EQEmu::ItemInstance &inst, // Dump bag contents to cursor in the event that owning bag is not the first cursor item // (This assumes that the data passed is correctly associated..no safety checks are implemented) - if (slot_id == EQEmu::inventory::slotCursor && !cursor_empty) { + if (slot_id == EQEmu::invslot::slotCursor && !cursor_empty) { Log(Logs::Detail, Logs::Inventory, "Putting bag loot item %s (%d) into slot %d (non-empty cursor override)", - inst.GetItem()->Name, inst.GetItem()->ID, EQEmu::inventory::slotCursor); + inst.GetItem()->Name, inst.GetItem()->ID, EQEmu::invslot::slotCursor); - PutLootInInventory(EQEmu::inventory::slotCursor, *bagitem); + PutLootInInventory(EQEmu::invslot::slotCursor, *bagitem); } else { auto bag_slot = EQEmu::InventoryProfile::CalcSlotId(slot_id, index); @@ -1008,7 +1008,7 @@ bool Client::TryStacking(EQEmu::ItemInstance* item, uint8 type, bool try_worn, b return false; int16 i; uint32 item_id = item->GetItem()->ID; - for (i = EQEmu::legacy::GENERAL_BEGIN; i <= EQEmu::legacy::GENERAL_END; i++) { + for (i = EQEmu::invslot::GENERAL_BEGIN; i <= EQEmu::invslot::GENERAL_END; i++) { EQEmu::ItemInstance* tmp_inst = m_inv.GetItem(i); if(tmp_inst && tmp_inst->GetItem()->ID == item_id && tmp_inst->GetCharges() < tmp_inst->GetItem()->StackSize){ MoveItemCharges(*item, i, type); @@ -1019,8 +1019,8 @@ bool Client::TryStacking(EQEmu::ItemInstance* item, uint8 type, bool try_worn, b return true; } } - for (i = EQEmu::legacy::GENERAL_BEGIN; i <= EQEmu::legacy::GENERAL_END; i++) { - for (uint8 j = EQEmu::inventory::containerBegin; j < EQEmu::inventory::ContainerCount; j++) { + for (i = EQEmu::invslot::GENERAL_BEGIN; i <= EQEmu::invslot::GENERAL_END; i++) { + for (uint8 j = EQEmu::invbag::SLOT_BEGIN; j <= EQEmu::invbag::SLOT_END; j++) { uint16 slotid = EQEmu::InventoryProfile::CalcSlotId(i, j); EQEmu::ItemInstance* tmp_inst = m_inv.GetItem(slotid); @@ -1045,28 +1045,28 @@ bool Client::AutoPutLootInInventory(EQEmu::ItemInstance& inst, bool try_worn, bo // #1: Try to auto equip if (try_worn && inst.IsEquipable(GetBaseRace(), GetClass()) && inst.GetItem()->ReqLevel <= level && (!inst.GetItem()->Attuneable || inst.IsAttuned()) && inst.GetItem()->ItemType != EQEmu::item::ItemTypeAugmentation) { // too messy as-is... - for (int16 i = EQEmu::legacy::EQUIPMENT_BEGIN; i < EQEmu::inventory::slotPowerSource; i++) { // originally (i < 22) - if (i == EQEmu::legacy::GENERAL_BEGIN) { + for (int16 i = EQEmu::invslot::EQUIPMENT_BEGIN; i < EQEmu::invslot::SLOT_POWER_SOURCE; i++) { // originally (i < 22) + if (i == EQEmu::invslot::GENERAL_BEGIN) { // added power source check for SoF+ clients if (this->ClientVersion() >= EQEmu::versions::ClientVersion::SoF) - i = EQEmu::inventory::slotPowerSource; + i = EQEmu::invslot::SLOT_POWER_SOURCE; else break; } if (!m_inv[i]) { - if (i == EQEmu::inventory::slotPrimary && inst.IsWeapon()) { // If item is primary slot weapon + if (i == EQEmu::invslot::slotPrimary && inst.IsWeapon()) { // If item is primary slot weapon if (inst.GetItem()->IsType2HWeapon()) { // and uses 2hs \ 2hb \ 2hp - if (m_inv[EQEmu::inventory::slotSecondary]) { // and if secondary slot is not empty + if (m_inv[EQEmu::invslot::slotSecondary]) { // and if secondary slot is not empty continue; // Can't auto-equip } } } - if (i == EQEmu::inventory::slotSecondary && m_inv[EQEmu::inventory::slotPrimary]) { // check to see if primary slot is a two hander - if (m_inv[EQEmu::inventory::slotPrimary]->GetItem()->IsType2HWeapon()) + if (i == EQEmu::invslot::slotSecondary && m_inv[EQEmu::invslot::slotPrimary]) { // check to see if primary slot is a two hander + if (m_inv[EQEmu::invslot::slotPrimary]->GetItem()->IsType2HWeapon()) continue; } - if (i == EQEmu::inventory::slotSecondary && inst.IsWeapon() && !CanThisClassDualWield()) { + if (i == EQEmu::invslot::slotSecondary && inst.IsWeapon() && !CanThisClassDualWield()) { continue; } @@ -1117,7 +1117,7 @@ void Client::MoveItemCharges(EQEmu::ItemInstance &from, int16 to_slot, uint8 typ tmp_inst->SetCharges(tmp_inst->GetCharges() + charges_to_move); from.SetCharges(from.GetCharges() - charges_to_move); SendLootItemInPacket(tmp_inst, to_slot); - if (to_slot == EQEmu::inventory::slotCursor) { + if (to_slot == EQEmu::invslot::slotCursor) { auto s = m_inv.cursor_cbegin(), e = m_inv.cursor_cend(); database.SaveCursor(this->CharacterID(), s, e); } @@ -1374,16 +1374,16 @@ void Client::SendLootItemInPacket(const EQEmu::ItemInstance* inst, int16 slot_id bool Client::IsValidSlot(uint32 slot) { if ((slot == (uint32)INVALID_INDEX) || - (slot >= EQEmu::inventory::slotBegin && slot < EQEmu::legacy::TYPE_POSSESSIONS_SIZE) || - (slot >= EQEmu::legacy::GENERAL_BAGS_BEGIN && slot <= EQEmu::legacy::CURSOR_BAG_END) || - (slot >= EQEmu::legacy::TRIBUTE_BEGIN && slot <= EQEmu::legacy::TRIBUTE_END) || - (slot >= EQEmu::legacy::BANK_BEGIN && slot <= EQEmu::legacy::BANK_END) || - (slot >= EQEmu::legacy::BANK_BAGS_BEGIN && slot <= EQEmu::legacy::BANK_BAGS_END) || - (slot >= EQEmu::legacy::SHARED_BANK_BEGIN && slot <= EQEmu::legacy::SHARED_BANK_END) || - (slot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && slot <= EQEmu::legacy::SHARED_BANK_BAGS_END) || - (slot >= EQEmu::legacy::TRADE_BEGIN && slot <= EQEmu::legacy::TRADE_END) || - (slot >= EQEmu::legacy::WORLD_BEGIN && slot <= EQEmu::legacy::WORLD_END) || - (slot == EQEmu::inventory::slotPowerSource) + (slot >= EQEmu::invslot::POSSESSIONS_BEGIN && slot <= EQEmu::invslot::POSSESSIONS_END) || + (slot >= EQEmu::invbag::GENERAL_BAGS_BEGIN && slot <= EQEmu::invbag::CURSOR_BAG_END) || + (slot >= EQEmu::invslot::TRIBUTE_BEGIN && slot <= EQEmu::invslot::TRIBUTE_END) || + (slot >= EQEmu::invslot::BANK_BEGIN && slot <= EQEmu::invslot::BANK_END) || + (slot >= EQEmu::invbag::BANK_BAGS_BEGIN && slot <= EQEmu::invbag::BANK_BAGS_END) || + (slot >= EQEmu::invslot::SHARED_BANK_BEGIN && slot <= EQEmu::invslot::SHARED_BANK_END) || + (slot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN && slot <= EQEmu::invbag::SHARED_BANK_BAGS_END) || + (slot >= EQEmu::invslot::TRADE_BEGIN && slot <= EQEmu::invslot::TRADE_END) || + (slot >= EQEmu::invslot::WORLD_BEGIN && slot <= EQEmu::invslot::WORLD_END) || + (slot == EQEmu::invslot::SLOT_POWER_SOURCE) ) { return true; } @@ -1394,10 +1394,10 @@ bool Client::IsValidSlot(uint32 slot) { bool Client::IsBankSlot(uint32 slot) { - if ((slot >= EQEmu::legacy::BANK_BEGIN && slot <= EQEmu::legacy::BANK_END) || - (slot >= EQEmu::legacy::BANK_BAGS_BEGIN && slot <= EQEmu::legacy::BANK_BAGS_END) || - (slot >= EQEmu::legacy::SHARED_BANK_BEGIN && slot <= EQEmu::legacy::SHARED_BANK_END) || - (slot >= EQEmu::legacy::SHARED_BANK_BAGS_BEGIN && slot <= EQEmu::legacy::SHARED_BANK_BAGS_END)) + if ((slot >= EQEmu::invslot::BANK_BEGIN && slot <= EQEmu::invslot::BANK_END) || + (slot >= EQEmu::invbag::BANK_BAGS_BEGIN && slot <= EQEmu::invbag::BANK_BAGS_END) || + (slot >= EQEmu::invslot::SHARED_BANK_BEGIN && slot <= EQEmu::invslot::SHARED_BANK_END) || + (slot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN && slot <= EQEmu::invbag::SHARED_BANK_BAGS_END)) { return true; } @@ -1433,8 +1433,8 @@ bool Client::SwapItem(MoveItem_Struct* move_in) { if(RuleB(QueryServ, PlayerLogMoves)) { QSSwapItemAuditor(move_in); } // QS Audit if (ClientVersion() >= EQEmu::versions::ClientVersion::RoF) { return true; } // Can't do RoF+ - if (move_in->to_slot == EQEmu::inventory::slotCursor) { - auto test_inst = m_inv.GetItem(EQEmu::inventory::slotCursor); + if (move_in->to_slot == EQEmu::invslot::slotCursor) { + auto test_inst = m_inv.GetItem(EQEmu::invslot::slotCursor); if (test_inst == nullptr) { return true; } auto test_item = test_inst->GetItem(); if (test_item == nullptr) { return true; } @@ -1453,18 +1453,18 @@ bool Client::SwapItem(MoveItem_Struct* move_in) { GetName(), test_item->Name, test_item->ID); Message_StringID(MT_LootMessages, 290); parse->EventItem(EVENT_DESTROY_ITEM, this, test_inst, nullptr, "", 0); - DeleteItemInInventory(EQEmu::inventory::slotCursor, 0, true); + DeleteItemInInventory(EQEmu::invslot::slotCursor, 0, true); } } return true; } if (move_in->to_slot == (uint32)INVALID_INDEX) { - if (move_in->from_slot == (uint32)EQEmu::inventory::slotCursor) { + if (move_in->from_slot == (uint32)EQEmu::invslot::slotCursor) { Log(Logs::Detail, Logs::Inventory, "Client destroyed item from cursor slot %d", move_in->from_slot); if(RuleB(QueryServ, PlayerLogMoves)) { QSSwapItemAuditor(move_in); } // QS Audit - EQEmu::ItemInstance *inst = m_inv.GetItem(EQEmu::inventory::slotCursor); + EQEmu::ItemInstance *inst = m_inv.GetItem(EQEmu::invslot::slotCursor); if(inst) { parse->EventItem(EVENT_DESTROY_ITEM, this, inst, nullptr, "", 0); } @@ -1481,9 +1481,9 @@ bool Client::SwapItem(MoveItem_Struct* move_in) { return true; // Item deletion } } - if (auto_attack && (move_in->from_slot == EQEmu::inventory::slotPrimary || move_in->from_slot == EQEmu::inventory::slotSecondary || move_in->from_slot == EQEmu::inventory::slotRange)) + if (auto_attack && (move_in->from_slot == EQEmu::invslot::slotPrimary || move_in->from_slot == EQEmu::invslot::slotSecondary || move_in->from_slot == EQEmu::invslot::slotRange)) SetAttackTimer(); - else if (auto_attack && (move_in->to_slot == EQEmu::inventory::slotPrimary || move_in->to_slot == EQEmu::inventory::slotSecondary || move_in->to_slot == EQEmu::inventory::slotRange)) + else if (auto_attack && (move_in->to_slot == EQEmu::invslot::slotPrimary || move_in->to_slot == EQEmu::invslot::slotSecondary || move_in->to_slot == EQEmu::invslot::slotRange)) SetAttackTimer(); // Step 1: Variables int16 src_slot_id = (int16)move_in->from_slot; @@ -1531,13 +1531,13 @@ bool Client::SwapItem(MoveItem_Struct* move_in) { uint32 dstbagid = 0; //if (src_slot_id >= 250 && src_slot_id < 330) { - if (src_slot_id >= EQEmu::legacy::GENERAL_BAGS_BEGIN && src_slot_id <= EQEmu::legacy::GENERAL_BAGS_END) { + if (src_slot_id >= EQEmu::invbag::GENERAL_BAGS_BEGIN && src_slot_id <= EQEmu::invbag::GENERAL_BAGS_END) { srcbag = m_inv.GetItem(((int)(src_slot_id / 10)) - 3); if (srcbag) srcbagid = srcbag->GetItem()->ID; } //if (dst_slot_id >= 250 && dst_slot_id < 330) { - if (dst_slot_id >= EQEmu::legacy::GENERAL_BAGS_BEGIN && dst_slot_id <= EQEmu::legacy::GENERAL_BAGS_END) { + if (dst_slot_id >= EQEmu::invbag::GENERAL_BAGS_BEGIN && dst_slot_id <= EQEmu::invbag::GENERAL_BAGS_END) { dstbag = m_inv.GetItem(((int)(dst_slot_id / 10)) - 3); if (dstbag) dstbagid = dstbag->GetItem()->ID; @@ -1550,7 +1550,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) { // Step 2: Validate item in from_slot // After this, we can assume src_inst is a valid ptr - if (!src_inst && (src_slot_id < EQEmu::legacy::WORLD_BEGIN || src_slot_id > EQEmu::legacy::WORLD_END)) { + if (!src_inst && (src_slot_id < EQEmu::invslot::WORLD_BEGIN || src_slot_id > EQEmu::invslot::WORLD_END)) { if (dst_inst) { // If there is no source item, but there is a destination item, // move the slots around before deleting the invalid source slot item, @@ -1564,14 +1564,14 @@ bool Client::SwapItem(MoveItem_Struct* move_in) { return false; } //verify shared bank transactions in the database - if (src_inst && src_slot_id >= EQEmu::legacy::SHARED_BANK_BEGIN && src_slot_id <= EQEmu::legacy::SHARED_BANK_BAGS_END) { + if (src_inst && src_slot_id >= EQEmu::invslot::SHARED_BANK_BEGIN && src_slot_id <= EQEmu::invbag::SHARED_BANK_BAGS_END) { if(!database.VerifyInventory(account_id, src_slot_id, src_inst)) { Log(Logs::General, Logs::Error, "Player %s on account %s was found exploiting the shared bank.\n", GetName(), account_name); DeleteItemInInventory(dst_slot_id,0,true); return(false); } - if (src_slot_id >= EQEmu::legacy::SHARED_BANK_BEGIN && src_slot_id <= EQEmu::legacy::SHARED_BANK_END && src_inst->IsClassBag()){ - for (uint8 idx = EQEmu::inventory::containerBegin; idx < EQEmu::inventory::ContainerCount; idx++) { + if (src_slot_id >= EQEmu::invslot::SHARED_BANK_BEGIN && src_slot_id <= EQEmu::invslot::SHARED_BANK_END && src_inst->IsClassBag()){ + for (uint8 idx = EQEmu::invbag::SLOT_BEGIN; idx <= EQEmu::invbag::SLOT_END; idx++) { const EQEmu::ItemInstance* baginst = src_inst->GetItem(idx); if (baginst && !database.VerifyInventory(account_id, EQEmu::InventoryProfile::CalcSlotId(src_slot_id, idx), baginst)){ DeleteItemInInventory(EQEmu::InventoryProfile::CalcSlotId(src_slot_id, idx), 0, false); @@ -1579,14 +1579,14 @@ bool Client::SwapItem(MoveItem_Struct* move_in) { } } } - if (dst_inst && dst_slot_id >= EQEmu::legacy::SHARED_BANK_BEGIN && dst_slot_id <= EQEmu::legacy::SHARED_BANK_BAGS_END) { + if (dst_inst && dst_slot_id >= EQEmu::invslot::SHARED_BANK_BEGIN && dst_slot_id <= EQEmu::invbag::SHARED_BANK_BAGS_END) { if(!database.VerifyInventory(account_id, dst_slot_id, dst_inst)) { Log(Logs::General, Logs::Error, "Player %s on account %s was found exploting the shared bank.\n", GetName(), account_name); DeleteItemInInventory(src_slot_id,0,true); return(false); } - if (dst_slot_id >= EQEmu::legacy::SHARED_BANK_BEGIN && dst_slot_id <= EQEmu::legacy::SHARED_BANK_END && dst_inst->IsClassBag()){ - for (uint8 idx = EQEmu::inventory::containerBegin; idx < EQEmu::inventory::ContainerCount; idx++) { + if (dst_slot_id >= EQEmu::invslot::SHARED_BANK_BEGIN && dst_slot_id <= EQEmu::invslot::SHARED_BANK_END && dst_inst->IsClassBag()){ + for (uint8 idx = EQEmu::invbag::SLOT_BEGIN; idx <= EQEmu::invbag::SLOT_END; idx++) { const EQEmu::ItemInstance* baginst = dst_inst->GetItem(idx); if (baginst && !database.VerifyInventory(account_id, EQEmu::InventoryProfile::CalcSlotId(dst_slot_id, idx), baginst)){ DeleteItemInInventory(EQEmu::InventoryProfile::CalcSlotId(dst_slot_id, idx), 0, false); @@ -1598,8 +1598,8 @@ bool Client::SwapItem(MoveItem_Struct* move_in) { // Check for No Drop Hacks Mob* with = trade->With(); - if (((with && with->IsClient() && dst_slot_id >= EQEmu::legacy::TRADE_BEGIN && dst_slot_id <= EQEmu::legacy::TRADE_END) || - (dst_slot_id >= EQEmu::legacy::SHARED_BANK_BEGIN && dst_slot_id <= EQEmu::legacy::SHARED_BANK_BAGS_END)) + if (((with && with->IsClient() && dst_slot_id >= EQEmu::invslot::TRADE_BEGIN && dst_slot_id <= EQEmu::invslot::TRADE_END) || + (dst_slot_id >= EQEmu::invslot::SHARED_BANK_BEGIN && dst_slot_id <= EQEmu::invbag::SHARED_BANK_BAGS_END)) && GetInv().CheckNoDrop(src_slot_id) && RuleI(World, FVNoDropFlag) == 0 || RuleI(Character, MinStatusForNoDropExemptions) < Admin() && RuleI(World, FVNoDropFlag) == 2) { auto ndh_inst = m_inv[src_slot_id]; @@ -1629,7 +1629,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) { // Step 3: Check for interaction with World Container (tradeskills) if(m_tradeskill_object != nullptr) { - if (src_slot_id >= EQEmu::legacy::WORLD_BEGIN && src_slot_id <= EQEmu::legacy::WORLD_END) { + if (src_slot_id >= EQEmu::invslot::WORLD_BEGIN && src_slot_id <= EQEmu::invslot::WORLD_END) { // Picking up item from world container EQEmu::ItemInstance* inst = m_tradeskill_object->PopItem(EQEmu::InventoryProfile::CalcBagIdx(src_slot_id)); if (inst) { @@ -1641,7 +1641,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) { return true; } - else if (dst_slot_id >= EQEmu::legacy::WORLD_BEGIN && dst_slot_id <= EQEmu::legacy::WORLD_END) { + else if (dst_slot_id >= EQEmu::invslot::WORLD_BEGIN && dst_slot_id <= EQEmu::invslot::WORLD_END) { // Putting item into world container, which may swap (or pile onto) with existing item uint8 world_idx = EQEmu::InventoryProfile::CalcBagIdx(dst_slot_id); EQEmu::ItemInstance* world_inst = m_tradeskill_object->PopItem(world_idx); @@ -1693,7 +1693,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) { } safe_delete(world_inst); - if (src_slot_id == EQEmu::inventory::slotCursor) + if (src_slot_id == EQEmu::invslot::slotCursor) { if (dstitemid == 0) { @@ -1714,15 +1714,15 @@ bool Client::SwapItem(MoveItem_Struct* move_in) { } // Step 4: Check for entity trade - if (dst_slot_id >= EQEmu::legacy::TRADE_BEGIN && dst_slot_id <= EQEmu::legacy::TRADE_END) { - if (src_slot_id != EQEmu::inventory::slotCursor) { + if (dst_slot_id >= EQEmu::invslot::TRADE_BEGIN && dst_slot_id <= EQEmu::invslot::TRADE_END) { + if (src_slot_id != EQEmu::invslot::slotCursor) { Kick(); return false; } if (with) { Log(Logs::Detail, Logs::Inventory, "Trade item move from slot %d to slot %d (trade with %s)", src_slot_id, dst_slot_id, with->GetName()); // Fill Trade list with items from cursor - if (!m_inv[EQEmu::inventory::slotCursor]) { + if (!m_inv[EQEmu::invslot::slotCursor]) { Message(13, "Error: Cursor item not located on server!"); return false; } @@ -1742,7 +1742,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) { if(RuleB(QueryServ, PlayerLogMoves)) { QSSwapItemAuditor(move_in); } // QS Audit SummonItem(src_inst->GetID(), src_inst->GetCharges()); - DeleteItemInInventory(EQEmu::inventory::slotCursor); + DeleteItemInInventory(EQEmu::invslot::slotCursor); return true; } @@ -1808,12 +1808,12 @@ bool Client::SwapItem(MoveItem_Struct* move_in) { } else { // Not dealing with charges - just do direct swap - if (src_inst && (dst_slot_id <= EQEmu::legacy::EQUIPMENT_END || dst_slot_id == EQEmu::inventory::slotPowerSource) && dst_slot_id >= EQEmu::legacy::EQUIPMENT_BEGIN) { + if (src_inst && (dst_slot_id <= EQEmu::invslot::EQUIPMENT_END || dst_slot_id == EQEmu::invslot::SLOT_POWER_SOURCE) && dst_slot_id >= EQEmu::invslot::EQUIPMENT_BEGIN) { if (src_inst->GetItem()->Attuneable) { src_inst->SetAttuned(true); } if (src_inst->IsAugmented()) { - for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) { + for (int i = EQEmu::invaug::SOCKET_BEGIN; i <= EQEmu::invaug::SOCKET_END; i++) { if (src_inst->GetAugment(i)) { if (src_inst->GetAugment(i)->GetItem()->Attuneable) { src_inst->GetAugment(i)->SetAttuned(true); @@ -1840,7 +1840,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) { Log(Logs::Detail, Logs::Inventory, "Moving entire item from slot %d to slot %d", src_slot_id, dst_slot_id); - if (src_slot_id <= EQEmu::legacy::EQUIPMENT_END || src_slot_id == EQEmu::inventory::slotPowerSource) { + if (src_slot_id <= EQEmu::invslot::EQUIPMENT_END || src_slot_id == EQEmu::invslot::SLOT_POWER_SOURCE) { if(src_inst) { parse->EventItem(EVENT_UNEQUIP_ITEM, this, src_inst, nullptr, "", src_slot_id); } @@ -1850,7 +1850,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) { } } - if (dst_slot_id <= EQEmu::legacy::EQUIPMENT_END || dst_slot_id == EQEmu::inventory::slotPowerSource) { + if (dst_slot_id <= EQEmu::invslot::EQUIPMENT_END || dst_slot_id == EQEmu::invslot::SLOT_POWER_SOURCE) { if(dst_inst) { parse->EventItem(EVENT_UNEQUIP_ITEM, this, dst_inst, nullptr, "", dst_slot_id); } @@ -1862,12 +1862,12 @@ bool Client::SwapItem(MoveItem_Struct* move_in) { } int matslot = SlotConvert2(dst_slot_id); - if (dst_slot_id <= EQEmu::legacy::EQUIPMENT_END && matslot != EQEmu::textures::armorHead) { // think this is to allow the client to update with /showhelm + if (dst_slot_id <= EQEmu::invslot::EQUIPMENT_END && matslot != EQEmu::textures::armorHead) { // think this is to allow the client to update with /showhelm SendWearChange(matslot); } // Step 7: Save change to the database - if (src_slot_id == EQEmu::inventory::slotCursor) { + if (src_slot_id == EQEmu::invslot::slotCursor) { // If not swapping another item to cursor and stacking items were depleted if (dstitemid == 0 || all_to_stack == true) { @@ -1880,7 +1880,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) { database.SaveInventory(character_id, m_inv.GetItem(src_slot_id), src_slot_id); } - if (dst_slot_id == EQEmu::inventory::slotCursor) { + if (dst_slot_id == EQEmu::invslot::slotCursor) { auto s = m_inv.cursor_cbegin(), e = m_inv.cursor_cend(); database.SaveCursor(character_id, s, e); } @@ -1904,7 +1904,7 @@ void Client::SwapItemResync(MoveItem_Struct* move_slots) { Log(Logs::Detail, Logs::Inventory, "Inventory desyncronization. (charname: %s, source: %i, destination: %i)", GetName(), move_slots->from_slot, move_slots->to_slot); Message(15, "Inventory Desyncronization detected: Resending slot data..."); - if ((move_slots->from_slot >= EQEmu::legacy::EQUIPMENT_BEGIN && move_slots->from_slot <= EQEmu::legacy::CURSOR_BAG_END) || move_slots->from_slot == EQEmu::inventory::slotPowerSource) { + if ((move_slots->from_slot >= EQEmu::invslot::EQUIPMENT_BEGIN && move_slots->from_slot <= EQEmu::invbag::CURSOR_BAG_END) || move_slots->from_slot == EQEmu::invslot::SLOT_POWER_SOURCE) { int16 resync_slot = (EQEmu::InventoryProfile::CalcSlotId(move_slots->from_slot) == INVALID_INDEX) ? move_slots->from_slot : EQEmu::InventoryProfile::CalcSlotId(move_slots->from_slot); if (IsValidSlot(resync_slot) && resync_slot != INVALID_INDEX) { // This prevents the client from crashing when closing any 'phantom' bags @@ -1947,7 +1947,7 @@ void Client::SwapItemResync(MoveItem_Struct* move_slots) { else { Message(13, "Could not resyncronize source slot %i.", move_slots->from_slot); } } - if ((move_slots->to_slot >= EQEmu::legacy::EQUIPMENT_BEGIN && move_slots->to_slot <= EQEmu::legacy::CURSOR_BAG_END) || move_slots->to_slot == EQEmu::inventory::slotPowerSource) { + if ((move_slots->to_slot >= EQEmu::invslot::EQUIPMENT_BEGIN && move_slots->to_slot <= EQEmu::invbag::CURSOR_BAG_END) || move_slots->to_slot == EQEmu::invslot::SLOT_POWER_SOURCE) { int16 resync_slot = (EQEmu::InventoryProfile::CalcSlotId(move_slots->to_slot) == INVALID_INDEX) ? move_slots->to_slot : EQEmu::InventoryProfile::CalcSlotId(move_slots->to_slot); if (IsValidSlot(resync_slot) && resync_slot != INVALID_INDEX) { const EQEmu::ItemData* token_struct = database.GetItem(22292); // 'Copper Coin' @@ -2029,7 +2029,7 @@ void Client::QSSwapItemAuditor(MoveItem_Struct* move_in, bool postaction_call) { qsaudit->items[move_count++].aug_5 = from_inst->GetAugmentItemID(5); if (from_inst->IsType(EQEmu::item::ItemClassBag)) { - for (uint8 bag_idx = EQEmu::inventory::containerBegin; bag_idx < from_inst->GetItem()->BagSlots; bag_idx++) { + for (uint8 bag_idx = EQEmu::invbag::SLOT_BEGIN; bag_idx < from_inst->GetItem()->BagSlots; bag_idx++) { const EQEmu::ItemInstance* from_baginst = from_inst->GetItem(bag_idx); if(from_baginst) { @@ -2062,7 +2062,7 @@ void Client::QSSwapItemAuditor(MoveItem_Struct* move_in, bool postaction_call) { qsaudit->items[move_count++].aug_5 = to_inst->GetAugmentItemID(5); if (to_inst->IsType(EQEmu::item::ItemClassBag)) { - for (uint8 bag_idx = EQEmu::inventory::containerBegin; bag_idx < to_inst->GetItem()->BagSlots; bag_idx++) { + for (uint8 bag_idx = EQEmu::invbag::SLOT_BEGIN; bag_idx < to_inst->GetItem()->BagSlots; bag_idx++) { const EQEmu::ItemInstance* to_baginst = to_inst->GetItem(bag_idx); if(to_baginst) { @@ -2182,10 +2182,10 @@ bool Client::DecreaseByID(uint32 type, uint8 amt) { EQEmu::ItemInstance* ins = nullptr; int x; int num = 0; - for(x = EQEmu::legacy::EQUIPMENT_BEGIN; x <= EQEmu::legacy::GENERAL_BAGS_END; x++) + for(x = EQEmu::invslot::EQUIPMENT_BEGIN; x <= EQEmu::invbag::GENERAL_BAGS_END; x++) { - if (x == EQEmu::inventory::slotCursor + 1) - x = EQEmu::legacy::GENERAL_BAGS_BEGIN; + if (x == EQEmu::invslot::slotCursor + 1) + x = EQEmu::invbag::GENERAL_BAGS_BEGIN; TempItem = nullptr; ins = GetInv().GetItem(x); if (ins) @@ -2199,10 +2199,10 @@ bool Client::DecreaseByID(uint32 type, uint8 amt) { } if (num < amt) return false; - for(x = EQEmu::legacy::EQUIPMENT_BEGIN; x <= EQEmu::legacy::GENERAL_BAGS_END; x++) // should this be CURSOR_BAG_END? + for(x = EQEmu::invslot::EQUIPMENT_BEGIN; x <= EQEmu::invbag::GENERAL_BAGS_END; x++) // should this be CURSOR_BAG_END? { - if (x == EQEmu::inventory::slotCursor + 1) - x = EQEmu::legacy::GENERAL_BAGS_BEGIN; + if (x == EQEmu::invslot::slotCursor + 1) + x = EQEmu::invbag::GENERAL_BAGS_BEGIN; TempItem = nullptr; ins = GetInv().GetItem(x); if (ins) @@ -2298,7 +2298,7 @@ static bool CopyBagContents(EQEmu::ItemInstance* new_bag, const EQEmu::ItemInsta void Client::DisenchantSummonedBags(bool client_update) { - for (auto slot_id = EQEmu::legacy::GENERAL_BEGIN; slot_id <= EQEmu::legacy::GENERAL_END; ++slot_id) { + for (auto slot_id = EQEmu::invslot::GENERAL_BEGIN; slot_id <= EQEmu::invslot::GENERAL_END; ++slot_id) { auto inst = m_inv[slot_id]; if (!inst) { continue; } if (!IsSummonedBagID(inst->GetItem()->ID)) { continue; } @@ -2319,7 +2319,7 @@ void Client::DisenchantSummonedBags(bool client_update) safe_delete(new_inst); } - for (auto slot_id = EQEmu::legacy::BANK_BEGIN; slot_id <= EQEmu::legacy::BANK_END; ++slot_id) { + for (auto slot_id = EQEmu::invslot::BANK_BEGIN; slot_id <= EQEmu::invslot::BANK_END; ++slot_id) { auto inst = m_inv[slot_id]; if (!inst) { continue; } if (!IsSummonedBagID(inst->GetItem()->ID)) { continue; } @@ -2340,7 +2340,7 @@ void Client::DisenchantSummonedBags(bool client_update) safe_delete(new_inst); } - for (auto slot_id = EQEmu::legacy::SHARED_BANK_BEGIN; slot_id <= EQEmu::legacy::SHARED_BANK_END; ++slot_id) { + for (auto slot_id = EQEmu::invslot::SHARED_BANK_BEGIN; slot_id <= EQEmu::invslot::SHARED_BANK_END; ++slot_id) { auto inst = m_inv[slot_id]; if (!inst) { continue; } if (!IsSummonedBagID(inst->GetItem()->ID)) { continue; } @@ -2362,7 +2362,7 @@ void Client::DisenchantSummonedBags(bool client_update) } while (!m_inv.CursorEmpty()) { - auto inst = m_inv[EQEmu::inventory::slotCursor]; + auto inst = m_inv[EQEmu::invslot::slotCursor]; if (!inst) { break; } if (!IsSummonedBagID(inst->GetItem()->ID)) { break; } if (!inst->GetItem()->IsClassBag()) { break; } @@ -2376,14 +2376,14 @@ void Client::DisenchantSummonedBags(bool client_update) if (!new_inst) { break; } if (CopyBagContents(new_inst, inst)) { - Log(Logs::General, Logs::Inventory, "Disenchant Summoned Bags: Replacing %s with %s in slot %i", inst->GetItem()->Name, new_inst->GetItem()->Name, EQEmu::inventory::slotCursor); + Log(Logs::General, Logs::Inventory, "Disenchant Summoned Bags: Replacing %s with %s in slot %i", inst->GetItem()->Name, new_inst->GetItem()->Name, EQEmu::invslot::slotCursor); std::list local; local.push_front(new_inst); - m_inv.PopItem(EQEmu::inventory::slotCursor); + m_inv.PopItem(EQEmu::invslot::slotCursor); safe_delete(inst); while (!m_inv.CursorEmpty()) { - auto limbo_inst = m_inv.PopItem(EQEmu::inventory::slotCursor); + auto limbo_inst = m_inv.PopItem(EQEmu::invslot::slotCursor); if (limbo_inst == nullptr) { continue; } local.push_back(limbo_inst); } @@ -2409,7 +2409,7 @@ void Client::DisenchantSummonedBags(bool client_update) void Client::RemoveNoRent(bool client_update) { - for (auto slot_id = EQEmu::legacy::EQUIPMENT_BEGIN; slot_id <= EQEmu::legacy::EQUIPMENT_END; ++slot_id) { + for (auto slot_id = EQEmu::invslot::EQUIPMENT_BEGIN; slot_id <= EQEmu::invslot::EQUIPMENT_END; ++slot_id) { auto inst = m_inv[slot_id]; if(inst && !inst->GetItem()->NoRent) { Log(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id); @@ -2417,7 +2417,7 @@ void Client::RemoveNoRent(bool client_update) } } - for (auto slot_id = EQEmu::legacy::GENERAL_BEGIN; slot_id <= EQEmu::legacy::GENERAL_END; ++slot_id) { + for (auto slot_id = EQEmu::invslot::GENERAL_BEGIN; slot_id <= EQEmu::invslot::GENERAL_END; ++slot_id) { auto inst = m_inv[slot_id]; if (inst && !inst->GetItem()->NoRent) { Log(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id); @@ -2425,15 +2425,15 @@ void Client::RemoveNoRent(bool client_update) } } - if (m_inv[EQEmu::inventory::slotPowerSource]) { - auto inst = m_inv[EQEmu::inventory::slotPowerSource]; + if (m_inv[EQEmu::invslot::SLOT_POWER_SOURCE]) { + auto inst = m_inv[EQEmu::invslot::SLOT_POWER_SOURCE]; if (inst && !inst->GetItem()->NoRent) { - Log(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, EQEmu::inventory::slotPowerSource); - DeleteItemInInventory(EQEmu::inventory::slotPowerSource, 0, (ClientVersion() >= EQEmu::versions::ClientVersion::SoF) ? client_update : false); // Ti slot non-existent + Log(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, EQEmu::invslot::SLOT_POWER_SOURCE); + DeleteItemInInventory(EQEmu::invslot::SLOT_POWER_SOURCE, 0, (ClientVersion() >= EQEmu::versions::ClientVersion::SoF) ? client_update : false); // Ti slot non-existent } } - for (auto slot_id = EQEmu::legacy::GENERAL_BAGS_BEGIN; slot_id <= EQEmu::legacy::CURSOR_BAG_END; ++slot_id) { + for (auto slot_id = EQEmu::invbag::GENERAL_BAGS_BEGIN; slot_id <= EQEmu::invbag::CURSOR_BAG_END; ++slot_id) { auto inst = m_inv[slot_id]; if(inst && !inst->GetItem()->NoRent) { Log(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id); @@ -2441,7 +2441,7 @@ void Client::RemoveNoRent(bool client_update) } } - for (auto slot_id = EQEmu::legacy::BANK_BEGIN; slot_id <= EQEmu::legacy::BANK_END; ++slot_id) { + for (auto slot_id = EQEmu::invslot::BANK_BEGIN; slot_id <= EQEmu::invslot::BANK_END; ++slot_id) { auto inst = m_inv[slot_id]; if(inst && !inst->GetItem()->NoRent) { Log(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id); @@ -2449,7 +2449,7 @@ void Client::RemoveNoRent(bool client_update) } } - for (auto slot_id = EQEmu::legacy::BANK_BAGS_BEGIN; slot_id <= EQEmu::legacy::BANK_BAGS_END; ++slot_id) { + for (auto slot_id = EQEmu::invbag::BANK_BAGS_BEGIN; slot_id <= EQEmu::invbag::BANK_BAGS_END; ++slot_id) { auto inst = m_inv[slot_id]; if(inst && !inst->GetItem()->NoRent) { Log(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id); @@ -2457,7 +2457,7 @@ void Client::RemoveNoRent(bool client_update) } } - for (auto slot_id = EQEmu::legacy::SHARED_BANK_BEGIN; slot_id <= EQEmu::legacy::SHARED_BANK_END; ++slot_id) { + for (auto slot_id = EQEmu::invslot::SHARED_BANK_BEGIN; slot_id <= EQEmu::invslot::SHARED_BANK_END; ++slot_id) { auto inst = m_inv[slot_id]; if(inst && !inst->GetItem()->NoRent) { Log(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id); @@ -2465,7 +2465,7 @@ void Client::RemoveNoRent(bool client_update) } } - for (auto slot_id = EQEmu::legacy::SHARED_BANK_BAGS_BEGIN; slot_id <= EQEmu::legacy::SHARED_BANK_BAGS_END; ++slot_id) { + for (auto slot_id = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN; slot_id <= EQEmu::invbag::SHARED_BANK_BAGS_END; ++slot_id) { auto inst = m_inv[slot_id]; if(inst && !inst->GetItem()->NoRent) { Log(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id); @@ -2477,7 +2477,7 @@ void Client::RemoveNoRent(bool client_update) std::list local; while (!m_inv.CursorEmpty()) { - auto inst = m_inv.PopItem(EQEmu::inventory::slotCursor); + auto inst = m_inv.PopItem(EQEmu::invslot::slotCursor); if (inst == nullptr) { continue; } local.push_back(inst); } @@ -2503,7 +2503,7 @@ void Client::RemoveNoRent(bool client_update) // Two new methods to alleviate perpetual login desyncs void Client::RemoveDuplicateLore(bool client_update) { - for (auto slot_id = EQEmu::legacy::EQUIPMENT_BEGIN; slot_id <= EQEmu::legacy::EQUIPMENT_END; ++slot_id) { + for (auto slot_id = EQEmu::invslot::EQUIPMENT_BEGIN; slot_id <= EQEmu::invslot::EQUIPMENT_END; ++slot_id) { auto inst = m_inv.PopItem(slot_id); if (inst == nullptr) { continue; } if(CheckLoreConflict(inst->GetItem())) { @@ -2516,7 +2516,7 @@ void Client::RemoveDuplicateLore(bool client_update) safe_delete(inst); } - for (auto slot_id = EQEmu::legacy::GENERAL_BEGIN; slot_id <= EQEmu::legacy::GENERAL_END; ++slot_id) { + for (auto slot_id = EQEmu::invslot::GENERAL_BEGIN; slot_id <= EQEmu::invslot::GENERAL_END; ++slot_id) { auto inst = m_inv.PopItem(slot_id); if (inst == nullptr) { continue; } if (CheckLoreConflict(inst->GetItem())) { @@ -2529,21 +2529,21 @@ void Client::RemoveDuplicateLore(bool client_update) safe_delete(inst); } - if (m_inv[EQEmu::inventory::slotPowerSource]) { - auto inst = m_inv.PopItem(EQEmu::inventory::slotPowerSource); + if (m_inv[EQEmu::invslot::SLOT_POWER_SOURCE]) { + auto inst = m_inv.PopItem(EQEmu::invslot::SLOT_POWER_SOURCE); if (inst) { if (CheckLoreConflict(inst->GetItem())) { - Log(Logs::Detail, Logs::Inventory, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, EQEmu::inventory::slotPowerSource); - database.SaveInventory(character_id, nullptr, EQEmu::inventory::slotPowerSource); + Log(Logs::Detail, Logs::Inventory, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, EQEmu::invslot::SLOT_POWER_SOURCE); + database.SaveInventory(character_id, nullptr, EQEmu::invslot::SLOT_POWER_SOURCE); } else { - m_inv.PutItem(EQEmu::inventory::slotPowerSource, *inst); + m_inv.PutItem(EQEmu::invslot::SLOT_POWER_SOURCE, *inst); } safe_delete(inst); } } - for (auto slot_id = EQEmu::legacy::GENERAL_BAGS_BEGIN; slot_id <= EQEmu::legacy::CURSOR_BAG_END; ++slot_id) { + for (auto slot_id = EQEmu::invbag::GENERAL_BAGS_BEGIN; slot_id <= EQEmu::invbag::CURSOR_BAG_END; ++slot_id) { auto inst = m_inv.PopItem(slot_id); if (inst == nullptr) { continue; } if(CheckLoreConflict(inst->GetItem())) { @@ -2556,7 +2556,7 @@ void Client::RemoveDuplicateLore(bool client_update) safe_delete(inst); } - for (auto slot_id = EQEmu::legacy::BANK_BEGIN; slot_id <= EQEmu::legacy::BANK_END; ++slot_id) { + for (auto slot_id = EQEmu::invslot::BANK_BEGIN; slot_id <= EQEmu::invslot::BANK_END; ++slot_id) { auto inst = m_inv.PopItem(slot_id); if (inst == nullptr) { continue; } if(CheckLoreConflict(inst->GetItem())) { @@ -2569,7 +2569,7 @@ void Client::RemoveDuplicateLore(bool client_update) safe_delete(inst); } - for (auto slot_id = EQEmu::legacy::BANK_BAGS_BEGIN; slot_id <= EQEmu::legacy::BANK_BAGS_END; ++slot_id) { + for (auto slot_id = EQEmu::invbag::BANK_BAGS_BEGIN; slot_id <= EQEmu::invbag::BANK_BAGS_END; ++slot_id) { auto inst = m_inv.PopItem(slot_id); if (inst == nullptr) { continue; } if(CheckLoreConflict(inst->GetItem())) { @@ -2589,7 +2589,7 @@ void Client::RemoveDuplicateLore(bool client_update) std::list local_2; while (!m_inv.CursorEmpty()) { - auto inst = m_inv.PopItem(EQEmu::inventory::slotCursor); + auto inst = m_inv.PopItem(EQEmu::invslot::slotCursor); if (inst == nullptr) { continue; } local_1.push_back(inst); } @@ -2630,7 +2630,7 @@ void Client::RemoveDuplicateLore(bool client_update) void Client::MoveSlotNotAllowed(bool client_update) { - for (auto slot_id = EQEmu::legacy::EQUIPMENT_BEGIN; slot_id <= EQEmu::legacy::EQUIPMENT_END; ++slot_id) { + for (auto slot_id = EQEmu::invslot::EQUIPMENT_BEGIN; slot_id <= EQEmu::invslot::EQUIPMENT_END; ++slot_id) { if(m_inv[slot_id] && !m_inv[slot_id]->IsSlotAllowed(slot_id)) { auto inst = m_inv.PopItem(slot_id); bool is_arrow = (inst->GetItem()->ItemType == EQEmu::item::ItemTypeArrow) ? true : false; @@ -2642,13 +2642,13 @@ void Client::MoveSlotNotAllowed(bool client_update) } } - if (m_inv[EQEmu::inventory::slotPowerSource] && !m_inv[EQEmu::inventory::slotPowerSource]->IsSlotAllowed(EQEmu::inventory::slotPowerSource)) { - auto inst = m_inv.PopItem(EQEmu::inventory::slotPowerSource); + if (m_inv[EQEmu::invslot::SLOT_POWER_SOURCE] && !m_inv[EQEmu::invslot::SLOT_POWER_SOURCE]->IsSlotAllowed(EQEmu::invslot::SLOT_POWER_SOURCE)) { + auto inst = m_inv.PopItem(EQEmu::invslot::SLOT_POWER_SOURCE); bool is_arrow = (inst->GetItem()->ItemType == EQEmu::item::ItemTypeArrow) ? true : false; int16 free_slot_id = m_inv.FindFreeSlot(inst->IsClassBag(), true, inst->GetItem()->Size, is_arrow); - Log(Logs::Detail, Logs::Inventory, "Slot Assignment Error: Moving %s from slot %i to %i", inst->GetItem()->Name, EQEmu::inventory::slotPowerSource, free_slot_id); + Log(Logs::Detail, Logs::Inventory, "Slot Assignment Error: Moving %s from slot %i to %i", inst->GetItem()->Name, EQEmu::invslot::SLOT_POWER_SOURCE, free_slot_id); PutItemInInventory(free_slot_id, *inst, (ClientVersion() >= EQEmu::versions::ClientVersion::SoF) ? client_update : false); - database.SaveInventory(character_id, nullptr, EQEmu::inventory::slotPowerSource); + database.SaveInventory(character_id, nullptr, EQEmu::invslot::SLOT_POWER_SOURCE); safe_delete(inst); } @@ -2766,13 +2766,13 @@ static int16 BandolierSlotToWeaponSlot(int BandolierSlot) switch (BandolierSlot) { case bandolierPrimary: - return EQEmu::inventory::slotPrimary; + return EQEmu::invslot::slotPrimary; case bandolierSecondary: - return EQEmu::inventory::slotSecondary; + return EQEmu::invslot::slotSecondary; case bandolierRange: - return EQEmu::inventory::slotRange; + return EQEmu::invslot::slotRange; default: - return EQEmu::inventory::slotAmmo; + return EQEmu::invslot::slotAmmo; } } @@ -2847,13 +2847,13 @@ void Client::SetBandolier(const EQApplicationPacket *app) // removed 'invWhereCursor' argument from above and implemented slots 30, 331-340 checks here if (slot == INVALID_INDEX) { - if (m_inv.GetItem(EQEmu::inventory::slotCursor)) { - if (m_inv.GetItem(EQEmu::inventory::slotCursor)->GetItem()->ID == m_pp.bandoliers[bss->Number].Items[BandolierSlot].ID && - m_inv.GetItem(EQEmu::inventory::slotCursor)->GetCharges() >= 1) { // '> 0' the same, but this matches Inventory::_HasItem conditional check - slot = EQEmu::inventory::slotCursor; + if (m_inv.GetItem(EQEmu::invslot::slotCursor)) { + if (m_inv.GetItem(EQEmu::invslot::slotCursor)->GetItem()->ID == m_pp.bandoliers[bss->Number].Items[BandolierSlot].ID && + m_inv.GetItem(EQEmu::invslot::slotCursor)->GetCharges() >= 1) { // '> 0' the same, but this matches Inventory::_HasItem conditional check + slot = EQEmu::invslot::slotCursor; } - else if (m_inv.GetItem(EQEmu::inventory::slotCursor)->GetItem()->ItemClass == 1) { - for(int16 CursorBagSlot = EQEmu::legacy::CURSOR_BAG_BEGIN; CursorBagSlot <= EQEmu::legacy::CURSOR_BAG_END; CursorBagSlot++) { + else if (m_inv.GetItem(EQEmu::invslot::slotCursor)->GetItem()->ItemClass == 1) { + for(int16 CursorBagSlot = EQEmu::invbag::CURSOR_BAG_BEGIN; CursorBagSlot <= EQEmu::invbag::CURSOR_BAG_END; CursorBagSlot++) { if (m_inv.GetItem(CursorBagSlot)) { if (m_inv.GetItem(CursorBagSlot)->GetItem()->ID == m_pp.bandoliers[bss->Number].Items[BandolierSlot].ID && m_inv.GetItem(CursorBagSlot)->GetCharges() >= 1) { // ditto @@ -2999,7 +2999,7 @@ bool Client::MoveItemToInventory(EQEmu::ItemInstance *ItemToReturn, bool UpdateC // if(ItemToReturn->IsStackable()) { - for (int16 i = EQEmu::legacy::GENERAL_BEGIN; i <= EQEmu::inventory::slotCursor; i++) { // changed slot max to 30 from 29. client will stack into slot 30 (bags too) before moving. + for (int16 i = EQEmu::invslot::GENERAL_BEGIN; i <= EQEmu::invslot::slotCursor; i++) { // changed slot max to 30 from 29. client will stack into slot 30 (bags too) before moving. EQEmu::ItemInstance* InvItem = m_inv.GetItem(i); @@ -3025,12 +3025,12 @@ bool Client::MoveItemToInventory(EQEmu::ItemInstance *ItemToReturn, bool UpdateC // if (InvItem && InvItem->IsClassBag()) { - int16 BaseSlotID = EQEmu::InventoryProfile::CalcSlotId(i, EQEmu::inventory::containerBegin); + int16 BaseSlotID = EQEmu::InventoryProfile::CalcSlotId(i, EQEmu::invbag::SLOT_BEGIN); uint8 BagSize=InvItem->GetItem()->BagSlots; uint8 BagSlot; - for (BagSlot = EQEmu::inventory::containerBegin; BagSlot < BagSize; BagSlot++) { + for (BagSlot = EQEmu::invbag::SLOT_BEGIN; BagSlot < BagSize; BagSlot++) { InvItem = m_inv.GetItem(BaseSlotID + BagSlot); if (InvItem && (InvItem->GetItem()->ID == ItemID) && (InvItem->GetCharges() < InvItem->GetItem()->StackSize)) { @@ -3058,7 +3058,7 @@ bool Client::MoveItemToInventory(EQEmu::ItemInstance *ItemToReturn, bool UpdateC // We have tried stacking items, now just try and find an empty slot. - for (int16 i = EQEmu::legacy::GENERAL_BEGIN; i <= EQEmu::inventory::slotCursor; i++) { // changed slot max to 30 from 29. client will move into slot 30 (bags too) before pushing onto cursor. + for (int16 i = EQEmu::invslot::GENERAL_BEGIN; i <= EQEmu::invslot::slotCursor; i++) { // changed slot max to 30 from 29. client will move into slot 30 (bags too) before pushing onto cursor. EQEmu::ItemInstance* InvItem = m_inv.GetItem(i); @@ -3077,11 +3077,11 @@ bool Client::MoveItemToInventory(EQEmu::ItemInstance *ItemToReturn, bool UpdateC } if (InvItem->IsClassBag() && EQEmu::InventoryProfile::CanItemFitInContainer(ItemToReturn->GetItem(), InvItem->GetItem())) { - int16 BaseSlotID = EQEmu::InventoryProfile::CalcSlotId(i, EQEmu::inventory::containerBegin); + int16 BaseSlotID = EQEmu::InventoryProfile::CalcSlotId(i, EQEmu::invbag::SLOT_BEGIN); uint8 BagSize=InvItem->GetItem()->BagSlots; - for (uint8 BagSlot = EQEmu::inventory::containerBegin; BagSlot < BagSize; BagSlot++) { + for (uint8 BagSlot = EQEmu::invbag::SLOT_BEGIN; BagSlot < BagSize; BagSlot++) { InvItem = m_inv.GetItem(BaseSlotID + BagSlot); @@ -3119,27 +3119,27 @@ bool Client::InterrogateInventory(Client* requester, bool log, bool silent, bool std::map instmap; // build reference map - for (int16 index = EQEmu::inventory::slotBegin; index < EQEmu::legacy::TYPE_POSSESSIONS_SIZE; ++index) { + for (int16 index = EQEmu::invslot::EQUIPMENT_BEGIN; index <= EQEmu::invslot::POSSESSIONS_END; ++index) { auto inst = m_inv[index]; if (inst == nullptr) { continue; } instmap[index] = inst; } - for (int16 index = EQEmu::legacy::TRIBUTE_BEGIN; index <= EQEmu::legacy::TRIBUTE_END; ++index) { + for (int16 index = EQEmu::invslot::TRIBUTE_BEGIN; index <= EQEmu::invslot::TRIBUTE_END; ++index) { auto inst = m_inv[index]; if (inst == nullptr) { continue; } instmap[index] = inst; } - for (int16 index = EQEmu::legacy::BANK_BEGIN; index <= EQEmu::legacy::BANK_END; ++index) { + for (int16 index = EQEmu::invslot::BANK_BEGIN; index <= EQEmu::invslot::BANK_END; ++index) { auto inst = m_inv[index]; if (inst == nullptr) { continue; } instmap[index] = inst; } - for (int16 index = EQEmu::legacy::SHARED_BANK_BEGIN; index <= EQEmu::legacy::SHARED_BANK_END; ++index) { + for (int16 index = EQEmu::invslot::SHARED_BANK_BEGIN; index <= EQEmu::invslot::SHARED_BANK_END; ++index) { auto inst = m_inv[index]; if (inst == nullptr) { continue; } instmap[index] = inst; } - for (int16 index = EQEmu::legacy::TRADE_BEGIN; index <= EQEmu::legacy::TRADE_END; ++index) { + for (int16 index = EQEmu::invslot::TRADE_BEGIN; index <= EQEmu::invslot::TRADE_END; ++index) { auto inst = m_inv[index]; if (inst == nullptr) { continue; } instmap[index] = inst; @@ -3147,10 +3147,10 @@ bool Client::InterrogateInventory(Client* requester, bool log, bool silent, bool auto tsobject = GetTradeskillObject(); if (tsobject != nullptr) { - for (int16 index = EQEmu::inventory::slotBegin; index < EQEmu::legacy::TYPE_WORLD_SIZE; ++index) { + for (int16 index = EQEmu::invslot::SLOT_BEGIN; index < EQEmu::invtype::WORLD_SIZE; ++index) { auto inst = tsobject->GetItem(index); if (inst == nullptr) { continue; } - instmap[EQEmu::legacy::WORLD_BEGIN + index] = inst; + instmap[EQEmu::invslot::WORLD_BEGIN + index] = inst; } } @@ -3163,8 +3163,8 @@ bool Client::InterrogateInventory(Client* requester, bool log, bool silent, bool instmap[8000 + limbo] = *cursor_itr; } - if (m_inv[EQEmu::inventory::slotPowerSource]) - instmap[EQEmu::inventory::slotPowerSource] = m_inv[EQEmu::inventory::slotPowerSource]; + if (m_inv[EQEmu::invslot::SLOT_POWER_SOURCE]) + instmap[EQEmu::invslot::SLOT_POWER_SOURCE] = m_inv[EQEmu::invslot::SLOT_POWER_SOURCE]; // call InterrogateInventory_ for error check for (auto instmap_itr = instmap.begin(); (instmap_itr != instmap.end()) && (!error); ++instmap_itr) { @@ -3222,7 +3222,7 @@ void Client::InterrogateInventory_(bool errorcheck, Client* requester, int16 hea } else { if (inst) { - for (int16 sub = EQEmu::inventory::containerBegin; (sub < EQEmu::inventory::ContainerCount) && (!error); ++sub) { // treat any EQEmu::ItemInstance as having the max internal slots available + for (int16 sub = EQEmu::invbag::SLOT_BEGIN; (sub <= EQEmu::invbag::SLOT_END) && (!error); ++sub) { // treat any EQEmu::ItemInstance as having the max internal slots available if (inst->GetItem(sub)) InterrogateInventory_(true, requester, head, sub, inst->GetItem(sub), inst, log, silent, error, depth + 1); } @@ -3252,7 +3252,7 @@ void Client::InterrogateInventory_(bool errorcheck, Client* requester, int16 hea } if (inst) { - for (int16 sub = EQEmu::inventory::containerBegin; (sub < EQEmu::inventory::ContainerCount); ++sub) { + for (int16 sub = EQEmu::invbag::SLOT_BEGIN; (sub <= EQEmu::invbag::SLOT_END); ++sub) { if (inst->GetItem(sub)) InterrogateInventory_(false, requester, head, sub, inst->GetItem(sub), inst, log, silent, error, depth + 1); } @@ -3267,11 +3267,11 @@ bool Client::InterrogateInventory_error(int16 head, int16 index, const EQEmu::It // very basic error checking - can be elaborated upon if more in-depth testing is needed... if ( - (head >= EQEmu::legacy::EQUIPMENT_BEGIN && head <= EQEmu::legacy::EQUIPMENT_END) || - (head >= EQEmu::legacy::TRIBUTE_BEGIN && head <= EQEmu::legacy::TRIBUTE_END) || - (head >= EQEmu::legacy::WORLD_BEGIN && head <= EQEmu::legacy::WORLD_END) || + (head >= EQEmu::invslot::EQUIPMENT_BEGIN && head <= EQEmu::invslot::EQUIPMENT_END) || + (head >= EQEmu::invslot::TRIBUTE_BEGIN && head <= EQEmu::invslot::TRIBUTE_END) || + (head >= EQEmu::invslot::WORLD_BEGIN && head <= EQEmu::invslot::WORLD_END) || (head >= 8000 && head <= 8101) || - (head == EQEmu::inventory::slotPowerSource)) { + (head == EQEmu::invslot::SLOT_POWER_SOURCE)) { switch (depth) { case 0: // requirement: inst is extant @@ -3283,7 +3283,7 @@ bool Client::InterrogateInventory_error(int16 head, int16 index, const EQEmu::It return true; if (!parent->IsType(EQEmu::item::ItemClassCommon)) return true; - if (index >= EQEmu::inventory::SocketCount) + if (index > EQEmu::invaug::SOCKET_END) return true; break; default: // requirement: none (something bad happened...) @@ -3291,11 +3291,11 @@ bool Client::InterrogateInventory_error(int16 head, int16 index, const EQEmu::It } } else if ( - (head >= EQEmu::legacy::GENERAL_BEGIN && head <= EQEmu::legacy::GENERAL_END) || - (head == EQEmu::inventory::slotCursor) || - (head >= EQEmu::legacy::BANK_BEGIN && head <= EQEmu::legacy::BANK_END) || - (head >= EQEmu::legacy::SHARED_BANK_BEGIN && head <= EQEmu::legacy::SHARED_BANK_END) || - (head >= EQEmu::legacy::TRADE_BEGIN && head <= EQEmu::legacy::TRADE_END)) { + (head >= EQEmu::invslot::GENERAL_BEGIN && head <= EQEmu::invslot::GENERAL_END) || + (head == EQEmu::invslot::slotCursor) || + (head >= EQEmu::invslot::BANK_BEGIN && head <= EQEmu::invslot::BANK_END) || + (head >= EQEmu::invslot::SHARED_BANK_BEGIN && head <= EQEmu::invslot::SHARED_BANK_END) || + (head >= EQEmu::invslot::TRADE_BEGIN && head <= EQEmu::invslot::TRADE_END)) { switch (depth) { case 0: // requirement: inst is extant @@ -3312,7 +3312,7 @@ bool Client::InterrogateInventory_error(int16 head, int16 index, const EQEmu::It if (parent->IsClassCommon()) { if (!(inst->GetItem()->AugType > 0)) return true; - if (index >= EQEmu::inventory::SocketCount) + if (index > EQEmu::invaug::SOCKET_END) return true; } break; @@ -3326,7 +3326,7 @@ bool Client::InterrogateInventory_error(int16 head, int16 index, const EQEmu::It if (parent->IsClassCommon()) { if (!(inst->GetItem()->AugType > 0)) return true; - if (index >= EQEmu::inventory::SocketCount) + if (index > EQEmu::invaug::SOCKET_END) return true; } break; diff --git a/zone/loottables.cpp b/zone/loottables.cpp index 961d66781..70a7e2bc4 100644 --- a/zone/loottables.cpp +++ b/zone/loottables.cpp @@ -263,7 +263,7 @@ void NPC::AddLootDrop(const EQEmu::ItemData *item2, ItemList* itemlist, int16 ch item->attuned = 0; item->min_level = minlevel; item->max_level = maxlevel; - item->equip_slot = EQEmu::inventory::slotInvalid; + item->equip_slot = EQEmu::invslot::SLOT_INVALID; if (equipit) { uint8 eslot = 0xFF; @@ -282,7 +282,7 @@ void NPC::AddLootDrop(const EQEmu::ItemData *item2, ItemList* itemlist, int16 ch // it is an improvement. if (!item2->NoPet) { - for (int i = 0; !found && i < EQEmu::legacy::EQUIPMENT_SIZE; i++) { + for (int i = EQEmu::invslot::EQUIPMENT_BEGIN; !found && i <= EQEmu::invslot::EQUIPMENT_END; i++) { uint32 slots = (1 << i); if (item2->Slots & slots) { if(equipment[i]) @@ -323,7 +323,7 @@ void NPC::AddLootDrop(const EQEmu::ItemData *item2, ItemList* itemlist, int16 ch // @merth: IDFile size has been increased, this needs to change uint16 emat; if(item2->Material <= 0 - || item2->Slots & (1 << EQEmu::inventory::slotPrimary | 1 << EQEmu::inventory::slotSecondary)) { + || item2->Slots & (1 << EQEmu::invslot::slotPrimary | 1 << EQEmu::invslot::slotSecondary)) { memset(newid, 0, sizeof(newid)); for(int i=0;i<7;i++){ if (!isalpha(item2->IDFile[i])){ @@ -337,7 +337,7 @@ void NPC::AddLootDrop(const EQEmu::ItemData *item2, ItemList* itemlist, int16 ch emat = item2->Material; } - if (foundslot == EQEmu::inventory::slotPrimary) { + if (foundslot == EQEmu::invslot::slotPrimary) { if (item2->Proc.Effect != 0) CastToMob()->AddProcToWeapon(item2->Proc.Effect, true); @@ -350,7 +350,7 @@ void NPC::AddLootDrop(const EQEmu::ItemData *item2, ItemList* itemlist, int16 ch if (item2->IsType2HWeapon()) SetTwoHanderEquipped(true); } - else if (foundslot == EQEmu::inventory::slotSecondary + else if (foundslot == EQEmu::invslot::slotSecondary && (GetOwner() != nullptr || (CanThisClassDualWield() && zone->random.Roll(NPC_DW_CHANCE)) || (item2->Damage==0)) && (item2->IsType1HWeapon() || item2->ItemType == EQEmu::item::ItemTypeShield)) { @@ -361,25 +361,25 @@ void NPC::AddLootDrop(const EQEmu::ItemData *item2, ItemList* itemlist, int16 ch if (item2->Damage > 0) SendAddPlayerState(PlayerState::SecondaryWeaponEquipped); } - else if (foundslot == EQEmu::inventory::slotHead) { + else if (foundslot == EQEmu::invslot::slotHead) { eslot = EQEmu::textures::armorHead; } - else if (foundslot == EQEmu::inventory::slotChest) { + else if (foundslot == EQEmu::invslot::slotChest) { eslot = EQEmu::textures::armorChest; } - else if (foundslot == EQEmu::inventory::slotArms) { + else if (foundslot == EQEmu::invslot::slotArms) { eslot = EQEmu::textures::armorArms; } - else if (foundslot == EQEmu::inventory::slotWrist1 || foundslot == EQEmu::inventory::slotWrist2) { + else if (foundslot == EQEmu::invslot::slotWrist1 || foundslot == EQEmu::invslot::slotWrist2) { eslot = EQEmu::textures::armorWrist; } - else if (foundslot == EQEmu::inventory::slotHands) { + else if (foundslot == EQEmu::invslot::slotHands) { eslot = EQEmu::textures::armorHands; } - else if (foundslot == EQEmu::inventory::slotLegs) { + else if (foundslot == EQEmu::invslot::slotLegs) { eslot = EQEmu::textures::armorLegs; } - else if (foundslot == EQEmu::inventory::slotFeet) { + else if (foundslot == EQEmu::invslot::slotFeet) { eslot = EQEmu::textures::armorFeet; } diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp index 3d309c542..7f59bc918 100644 --- a/zone/lua_general.cpp +++ b/zone/lua_general.cpp @@ -1841,47 +1841,47 @@ luabind::scope lua_register_slot() { return luabind::class_("Slot") .enum_("constants") [ - luabind::value("Charm", static_cast(EQEmu::inventory::slotCharm)), - luabind::value("Ear1", static_cast(EQEmu::inventory::slotEar1)), - luabind::value("Head", static_cast(EQEmu::inventory::slotHead)), - luabind::value("Face", static_cast(EQEmu::inventory::slotFace)), - luabind::value("Ear2", static_cast(EQEmu::inventory::slotEar2)), - luabind::value("Neck", static_cast(EQEmu::inventory::slotNeck)), - luabind::value("Shoulder", static_cast(EQEmu::inventory::slotShoulders)), // deprecated - luabind::value("Shoulders", static_cast(EQEmu::inventory::slotShoulders)), - luabind::value("Arms", static_cast(EQEmu::inventory::slotArms)), - luabind::value("Back", static_cast(EQEmu::inventory::slotBack)), - luabind::value("Bracer1", static_cast(EQEmu::inventory::slotWrist1)), // deprecated - luabind::value("Wrist1", static_cast(EQEmu::inventory::slotWrist1)), - luabind::value("Bracer2", static_cast(EQEmu::inventory::slotWrist2)), // deprecated - luabind::value("Wrist2", static_cast(EQEmu::inventory::slotWrist2)), - luabind::value("Range", static_cast(EQEmu::inventory::slotRange)), - luabind::value("Hands", static_cast(EQEmu::inventory::slotHands)), - luabind::value("Primary", static_cast(EQEmu::inventory::slotPrimary)), - luabind::value("Secondary", static_cast(EQEmu::inventory::slotSecondary)), - luabind::value("Ring1", static_cast(EQEmu::inventory::slotFinger1)), // deprecated - luabind::value("Finger1", static_cast(EQEmu::inventory::slotFinger1)), - luabind::value("Ring2", static_cast(EQEmu::inventory::slotFinger2)), // deprecated - luabind::value("Finger2", static_cast(EQEmu::inventory::slotFinger2)), - luabind::value("Chest", static_cast(EQEmu::inventory::slotChest)), - luabind::value("Legs", static_cast(EQEmu::inventory::slotLegs)), - luabind::value("Feet", static_cast(EQEmu::inventory::slotFeet)), - luabind::value("Waist", static_cast(EQEmu::inventory::slotWaist)), - luabind::value("PowerSource", static_cast(EQEmu::inventory::slotPowerSource)), - luabind::value("Ammo", static_cast(EQEmu::inventory::slotAmmo)), - luabind::value("General1", static_cast(EQEmu::inventory::slotGeneral1)), - luabind::value("General2", static_cast(EQEmu::inventory::slotGeneral2)), - luabind::value("General3", static_cast(EQEmu::inventory::slotGeneral3)), - luabind::value("General4", static_cast(EQEmu::inventory::slotGeneral4)), - luabind::value("General5", static_cast(EQEmu::inventory::slotGeneral5)), - luabind::value("General6", static_cast(EQEmu::inventory::slotGeneral6)), - luabind::value("General7", static_cast(EQEmu::inventory::slotGeneral7)), - luabind::value("General8", static_cast(EQEmu::inventory::slotGeneral8)), - luabind::value("Cursor", static_cast(EQEmu::inventory::slotCursor)), - luabind::value("PersonalBegin", static_cast(EQEmu::legacy::GENERAL_BEGIN)), // deprecated - luabind::value("GeneralBegin", static_cast(EQEmu::legacy::GENERAL_BEGIN)), - luabind::value("PersonalEnd", static_cast(EQEmu::legacy::GENERAL_END)), // deprecated - luabind::value("GeneralEnd", static_cast(EQEmu::legacy::GENERAL_END)), + luabind::value("Charm", static_cast(EQEmu::invslot::slotCharm)), + luabind::value("Ear1", static_cast(EQEmu::invslot::slotEar1)), + luabind::value("Head", static_cast(EQEmu::invslot::slotHead)), + luabind::value("Face", static_cast(EQEmu::invslot::slotFace)), + luabind::value("Ear2", static_cast(EQEmu::invslot::slotEar2)), + luabind::value("Neck", static_cast(EQEmu::invslot::slotNeck)), + luabind::value("Shoulder", static_cast(EQEmu::invslot::slotShoulders)), // deprecated + luabind::value("Shoulders", static_cast(EQEmu::invslot::slotShoulders)), + luabind::value("Arms", static_cast(EQEmu::invslot::slotArms)), + luabind::value("Back", static_cast(EQEmu::invslot::slotBack)), + luabind::value("Bracer1", static_cast(EQEmu::invslot::slotWrist1)), // deprecated + luabind::value("Wrist1", static_cast(EQEmu::invslot::slotWrist1)), + luabind::value("Bracer2", static_cast(EQEmu::invslot::slotWrist2)), // deprecated + luabind::value("Wrist2", static_cast(EQEmu::invslot::slotWrist2)), + luabind::value("Range", static_cast(EQEmu::invslot::slotRange)), + luabind::value("Hands", static_cast(EQEmu::invslot::slotHands)), + luabind::value("Primary", static_cast(EQEmu::invslot::slotPrimary)), + luabind::value("Secondary", static_cast(EQEmu::invslot::slotSecondary)), + luabind::value("Ring1", static_cast(EQEmu::invslot::slotFinger1)), // deprecated + luabind::value("Finger1", static_cast(EQEmu::invslot::slotFinger1)), + luabind::value("Ring2", static_cast(EQEmu::invslot::slotFinger2)), // deprecated + luabind::value("Finger2", static_cast(EQEmu::invslot::slotFinger2)), + luabind::value("Chest", static_cast(EQEmu::invslot::slotChest)), + luabind::value("Legs", static_cast(EQEmu::invslot::slotLegs)), + luabind::value("Feet", static_cast(EQEmu::invslot::slotFeet)), + luabind::value("Waist", static_cast(EQEmu::invslot::slotWaist)), + luabind::value("PowerSource", static_cast(EQEmu::invslot::SLOT_POWER_SOURCE)), + luabind::value("Ammo", static_cast(EQEmu::invslot::slotAmmo)), + luabind::value("General1", static_cast(EQEmu::invslot::slotGeneral1)), + luabind::value("General2", static_cast(EQEmu::invslot::slotGeneral2)), + luabind::value("General3", static_cast(EQEmu::invslot::slotGeneral3)), + luabind::value("General4", static_cast(EQEmu::invslot::slotGeneral4)), + luabind::value("General5", static_cast(EQEmu::invslot::slotGeneral5)), + luabind::value("General6", static_cast(EQEmu::invslot::slotGeneral6)), + luabind::value("General7", static_cast(EQEmu::invslot::slotGeneral7)), + luabind::value("General8", static_cast(EQEmu::invslot::slotGeneral8)), + luabind::value("Cursor", static_cast(EQEmu::invslot::slotCursor)), + luabind::value("PersonalBegin", static_cast(EQEmu::invslot::GENERAL_BEGIN)), // deprecated + luabind::value("GeneralBegin", static_cast(EQEmu::invslot::GENERAL_BEGIN)), + luabind::value("PersonalEnd", static_cast(EQEmu::invslot::GENERAL_END)), // deprecated + luabind::value("GeneralEnd", static_cast(EQEmu::invslot::GENERAL_END)), luabind::value("CursorEnd", 0xFFFE), // deprecated luabind::value("Tradeskill", static_cast(EQEmu::legacy::SLOT_TRADESKILL)), // deprecated luabind::value("Augment", static_cast(EQEmu::legacy::SLOT_AUGMENT)), // deprecated diff --git a/zone/merc.cpp b/zone/merc.cpp index 9d0ed2b9f..a32fab994 100644 --- a/zone/merc.cpp +++ b/zone/merc.cpp @@ -217,7 +217,7 @@ void Merc::CalcItemBonuses(StatBonuses* newbon) { unsigned int i; //should not include 21 (SLOT_AMMO) - for (i = 0; i < EQEmu::inventory::slotAmmo; i++) { + for (i = 0; i < EQEmu::invslot::slotAmmo; i++) { if(equipment[i] == 0) continue; const EQEmu::ItemData * itm = database.GetItem(equipment[i]); @@ -1610,24 +1610,24 @@ void Merc::AI_Process() { //try main hand first if(attack_timer.Check()) { - Attack(GetTarget(), EQEmu::inventory::slotPrimary); + Attack(GetTarget(), EQEmu::invslot::slotPrimary); bool tripleSuccess = false; if(GetOwner() && GetTarget() && CanThisClassDoubleAttack()) { if(GetOwner()) { - Attack(GetTarget(), EQEmu::inventory::slotPrimary, true); + Attack(GetTarget(), EQEmu::invslot::slotPrimary, true); } if(GetOwner() && GetTarget() && GetSpecialAbility(SPECATK_TRIPLE)) { tripleSuccess = true; - Attack(GetTarget(), EQEmu::inventory::slotPrimary, true); + Attack(GetTarget(), EQEmu::invslot::slotPrimary, true); } //quad attack, does this belong here?? if(GetOwner() && GetTarget() && GetSpecialAbility(SPECATK_QUAD)) { - Attack(GetTarget(), EQEmu::inventory::slotPrimary, true); + Attack(GetTarget(), EQEmu::invslot::slotPrimary, true); } } @@ -1639,8 +1639,8 @@ void Merc::AI_Process() { if(zone->random.Roll(flurrychance)) { Message_StringID(MT_NPCFlurry, YOU_FLURRY); - Attack(GetTarget(), EQEmu::inventory::slotPrimary, false); - Attack(GetTarget(), EQEmu::inventory::slotPrimary, false); + Attack(GetTarget(), EQEmu::invslot::slotPrimary, false); + Attack(GetTarget(), EQEmu::invslot::slotPrimary, false); } } @@ -1649,7 +1649,7 @@ void Merc::AI_Process() { if (GetTarget() && ExtraAttackChanceBonus) { if(zone->random.Roll(ExtraAttackChanceBonus)) { - Attack(GetTarget(), EQEmu::inventory::slotPrimary, false); + Attack(GetTarget(), EQEmu::invslot::slotPrimary, false); } } } @@ -1685,11 +1685,11 @@ void Merc::AI_Process() { // Max 78% of DW if (zone->random.Roll(DualWieldProbability)) { - Attack(GetTarget(), EQEmu::inventory::slotSecondary); // Single attack with offhand + Attack(GetTarget(), EQEmu::invslot::slotSecondary); // Single attack with offhand if(CanThisClassDoubleAttack()) { if(GetTarget() && GetTarget()->GetHP() > -10) - Attack(GetTarget(), EQEmu::inventory::slotSecondary); // Single attack with offhand + Attack(GetTarget(), EQEmu::invslot::slotSecondary); // Single attack with offhand } } } @@ -2614,7 +2614,7 @@ int16 Merc::GetFocusEffect(focusType type, uint16 spell_id) { int16 focus_max_real = 0; //item focus - for (int x = 0; x < EQEmu::legacy::EQUIPMENT_SIZE; ++x) + for (int x = EQEmu::invslot::EQUIPMENT_BEGIN; x <= EQEmu::invslot::EQUIPMENT_END; ++x) { TempItem = nullptr; if (equipment[x] == 0) @@ -5093,7 +5093,7 @@ void Merc::UpdateMercAppearance() { // Copied from Bot Code: uint32 itemID = 0; uint8 materialFromSlot = EQEmu::textures::materialInvalid; - for (int i = EQEmu::legacy::EQUIPMENT_BEGIN; i <= EQEmu::legacy::EQUIPMENT_END; ++i) { + for (int i = EQEmu::invslot::EQUIPMENT_BEGIN; i <= EQEmu::invslot::EQUIPMENT_END; ++i) { itemID = equipment[i]; if(itemID != 0) { materialFromSlot = EQEmu::InventoryProfile::CalcMaterialFromSlot(i); @@ -5111,8 +5111,8 @@ void Merc::UpdateEquipmentLight() m_Light.Type[EQEmu::lightsource::LightEquipment] = 0; m_Light.Level[EQEmu::lightsource::LightEquipment] = 0; - for (int index = EQEmu::inventory::slotBegin; index < EQEmu::legacy::EQUIPMENT_SIZE; ++index) { - if (index == EQEmu::inventory::slotAmmo) { continue; } + for (int index = EQEmu::invslot::EQUIPMENT_BEGIN; index <= EQEmu::invslot::EQUIPMENT_END; ++index) { + if (index == EQEmu::invslot::slotAmmo) { continue; } auto item = database.GetItem(equipment[index]); if (item == nullptr) { continue; } diff --git a/zone/merc.h b/zone/merc.h index abd7e65d6..cf6a14009 100644 --- a/zone/merc.h +++ b/zone/merc.h @@ -66,7 +66,7 @@ public: //abstract virtual function implementations requird by base abstract class virtual bool Death(Mob* killerMob, int32 damage, uint16 spell_id, EQEmu::skills::SkillType attack_skill); virtual void Damage(Mob* from, int32 damage, uint16 spell_id, EQEmu::skills::SkillType attack_skill, bool avoidable = true, int8 buffslot = -1, bool iBuffTic = false, eSpecialAttacks special = eSpecialAttacks::None); - virtual bool Attack(Mob* other, int Hand = EQEmu::inventory::slotPrimary, bool FromRiposte = false, bool IsStrikethrough = false, + virtual bool Attack(Mob* other, int Hand = EQEmu::invslot::slotPrimary, bool FromRiposte = false, bool IsStrikethrough = false, bool IsFromSpell = false, ExtraAttackOptions *opts = nullptr); virtual bool HasRaid() { return false; } virtual bool HasGroup() { return (GetGroup() ? true : false); } @@ -293,7 +293,7 @@ protected: Timer evade_timer; // can be moved to pTimers at some point uint16 skills[EQEmu::skills::HIGHEST_SKILL + 1]; - uint32 equipment[EQEmu::legacy::EQUIPMENT_SIZE]; //this is an array of item IDs + uint32 equipment[EQEmu::invslot::EQUIPMENT_COUNT]; //this is an array of item IDs uint16 d_melee_texture1; //this is an item Material value uint16 d_melee_texture2; //this is an item Material value (offhand) uint8 prim_melee_type; //Sets the Primary Weapon attack message and animation diff --git a/zone/mob.cpp b/zone/mob.cpp index ee86e457b..5f998347d 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -2486,8 +2486,8 @@ bool Mob::CanThisClassDualWield(void) const { return(GetSkill(EQEmu::skills::SkillDualWield) > 0); } else if (CastToClient()->HasSkill(EQEmu::skills::SkillDualWield)) { - const EQEmu::ItemInstance* pinst = CastToClient()->GetInv().GetItem(EQEmu::inventory::slotPrimary); - const EQEmu::ItemInstance* sinst = CastToClient()->GetInv().GetItem(EQEmu::inventory::slotSecondary); + const EQEmu::ItemInstance* pinst = CastToClient()->GetInv().GetItem(EQEmu::invslot::slotPrimary); + const EQEmu::ItemInstance* sinst = CastToClient()->GetInv().GetItem(EQEmu::invslot::slotSecondary); // 2HS, 2HB, or 2HP if(pinst && pinst->IsWeapon()) { diff --git a/zone/mob.h b/zone/mob.h index e0e818e3f..5561ef0da 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -184,7 +184,7 @@ public: virtual void RangedAttack(Mob* other) { } virtual void ThrowingAttack(Mob* other) { } // 13 = Primary (default), 14 = secondary - virtual bool Attack(Mob* other, int Hand = EQEmu::inventory::slotPrimary, bool FromRiposte = false, bool IsStrikethrough = false, + virtual bool Attack(Mob* other, int Hand = EQEmu::invslot::slotPrimary, bool FromRiposte = false, bool IsStrikethrough = false, bool IsFromSpell = false, ExtraAttackOptions *opts = nullptr) = 0; void DoAttack(Mob *other, DamageHitInfo &hit, ExtraAttackOptions *opts = nullptr); int MonkSpecialAttack(Mob* other, uint8 skill_used); @@ -675,7 +675,7 @@ public: inline AuraMgr &GetAuraMgr() { return aura_mgr; } // mainly used for zone db loading/saving //Procs - void TriggerDefensiveProcs(Mob *on, uint16 hand = EQEmu::inventory::slotPrimary, bool FromSkillProc = false, int damage = 0); + void TriggerDefensiveProcs(Mob *on, uint16 hand = EQEmu::invslot::slotPrimary, bool FromSkillProc = false, int damage = 0); bool AddRangedProc(uint16 spell_id, uint16 iChance = 3, uint16 base_spell_id = SPELL_UNKNOWN); bool RemoveRangedProc(uint16 spell_id, bool bAll = false); bool HasRangedProcs() const; @@ -1286,13 +1286,13 @@ protected: void TrySkillProc(Mob *on, uint16 skill, uint16 ReuseTime, bool Success = false, uint16 hand = 0, bool IsDefensive = false); // hand = SlotCharm? bool PassLimitToSkill(uint16 spell_id, uint16 skill); bool PassLimitClass(uint32 Classes_, uint16 Class_); - void TryDefensiveProc(Mob *on, uint16 hand = EQEmu::inventory::slotPrimary); - void TryWeaponProc(const EQEmu::ItemInstance* inst, const EQEmu::ItemData* weapon, Mob *on, uint16 hand = EQEmu::inventory::slotPrimary); - void TrySpellProc(const EQEmu::ItemInstance* inst, const EQEmu::ItemData* weapon, Mob *on, uint16 hand = EQEmu::inventory::slotPrimary); - void TryWeaponProc(const EQEmu::ItemInstance* weapon, Mob *on, uint16 hand = EQEmu::inventory::slotPrimary); + void TryDefensiveProc(Mob *on, uint16 hand = EQEmu::invslot::slotPrimary); + void TryWeaponProc(const EQEmu::ItemInstance* inst, const EQEmu::ItemData* weapon, Mob *on, uint16 hand = EQEmu::invslot::slotPrimary); + void TrySpellProc(const EQEmu::ItemInstance* inst, const EQEmu::ItemData* weapon, Mob *on, uint16 hand = EQEmu::invslot::slotPrimary); + void TryWeaponProc(const EQEmu::ItemInstance* weapon, Mob *on, uint16 hand = EQEmu::invslot::slotPrimary); void ExecWeaponProc(const EQEmu::ItemInstance* weapon, uint16 spell_id, Mob *on, int level_override = -1); - virtual float GetProcChances(float ProcBonus, uint16 hand = EQEmu::inventory::slotPrimary); - virtual float GetDefensiveProcChances(float &ProcBonus, float &ProcChance, uint16 hand = EQEmu::inventory::slotPrimary, Mob *on = nullptr); + virtual float GetProcChances(float ProcBonus, uint16 hand = EQEmu::invslot::slotPrimary); + virtual float GetDefensiveProcChances(float &ProcBonus, float &ProcChance, uint16 hand = EQEmu::invslot::slotPrimary, Mob *on = nullptr); virtual float GetSkillProcChances(uint16 ReuseTime, uint16 hand = 0); // hand = MainCharm? uint16 GetWeaponSpeedbyHand(uint16 hand); #ifdef BOTS diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 415b67c3b..2a2023599 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -861,7 +861,7 @@ void Client::AI_Process() if (GetTarget() && !IsStunned() && !IsMezzed() && !GetFeigned()) { if (attack_timer.Check()) { // Should charmed clients not be procing? - DoAttackRounds(GetTarget(), EQEmu::inventory::slotPrimary); + DoAttackRounds(GetTarget(), EQEmu::invslot::slotPrimary); } } @@ -869,7 +869,7 @@ void Client::AI_Process() if (attack_dw_timer.Check()) { if (CheckDualWield()) { // Should charmed clients not be procing? - DoAttackRounds(GetTarget(), EQEmu::inventory::slotSecondary); + DoAttackRounds(GetTarget(), EQEmu::invslot::slotSecondary); } } } @@ -1275,7 +1275,7 @@ void Mob::AI_Process() { //try main hand first if (attack_timer.Check()) { DoMainHandAttackRounds(target); - TriggerDefensiveProcs(target, EQEmu::inventory::slotPrimary, false); + TriggerDefensiveProcs(target, EQEmu::invslot::slotPrimary, false); bool specialed = false; // NPCs can only do one of these a round if (GetSpecialAbility(SPECATK_FLURRY)) { @@ -2154,7 +2154,7 @@ bool Mob::Flurry(ExtraAttackOptions *opts) int num_attacks = GetSpecialAbilityParam(SPECATK_FLURRY, 1); num_attacks = num_attacks > 0 ? num_attacks : RuleI(Combat, MaxFlurryHits); for (int i = 0; i < num_attacks; i++) - Attack(target, EQEmu::inventory::slotPrimary, false, false, false, opts); + Attack(target, EQEmu::invslot::slotPrimary, false, false, false, opts); } return true; } diff --git a/zone/npc.cpp b/zone/npc.cpp index ae4dae217..29e2f20ef 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -837,8 +837,8 @@ void NPC::UpdateEquipmentLight() m_Light.Type[EQEmu::lightsource::LightEquipment] = 0; m_Light.Level[EQEmu::lightsource::LightEquipment] = 0; - for (int index = EQEmu::inventory::slotBegin; index < EQEmu::legacy::EQUIPMENT_SIZE; ++index) { - if (index == EQEmu::inventory::slotAmmo) { continue; } + for (int index = EQEmu::invslot::EQUIPMENT_BEGIN; index <= EQEmu::invslot::EQUIPMENT_END; ++index) { + if (index == EQEmu::invslot::slotAmmo) { continue; } auto item = database.GetItem(equipment[index]); if (item == nullptr) { continue; } diff --git a/zone/npc.h b/zone/npc.h index 2e264ce24..a2cad8b95 100644 --- a/zone/npc.h +++ b/zone/npc.h @@ -113,7 +113,7 @@ public: //abstract virtual function implementations requird by base abstract class virtual bool Death(Mob* killerMob, int32 damage, uint16 spell_id, EQEmu::skills::SkillType attack_skill); virtual void Damage(Mob* from, int32 damage, uint16 spell_id, EQEmu::skills::SkillType attack_skill, bool avoidable = true, int8 buffslot = -1, bool iBuffTic = false, eSpecialAttacks special = eSpecialAttacks::None); - virtual bool Attack(Mob* other, int Hand = EQEmu::inventory::slotPrimary, bool FromRiposte = false, bool IsStrikethrough = false, + virtual bool Attack(Mob* other, int Hand = EQEmu::invslot::slotPrimary, bool FromRiposte = false, bool IsStrikethrough = false, bool IsFromSpell = false, ExtraAttackOptions *opts = nullptr); virtual bool HasRaid() { return false; } virtual bool HasGroup() { return false; } @@ -534,7 +534,7 @@ protected: uint16 skills[EQEmu::skills::HIGHEST_SKILL + 1]; - uint32 equipment[EQEmu::legacy::EQUIPMENT_SIZE]; //this is an array of item IDs + uint32 equipment[EQEmu::invslot::EQUIPMENT_COUNT]; //this is an array of item IDs uint32 herosforgemodel; //this is the Hero Forge Armor Model (i.e 63 or 84 or 203) uint16 d_melee_texture1; //this is an item Material value diff --git a/zone/object.cpp b/zone/object.cpp index 0ba5f9fa3..3ad4a6a9c 100644 --- a/zone/object.cpp +++ b/zone/object.cpp @@ -328,7 +328,7 @@ void Object::Delete(bool reset_state) } const EQEmu::ItemInstance* Object::GetItem(uint8 index) { - if (index < EQEmu::legacy::TYPE_WORLD_SIZE) { + if (index < EQEmu::invtype::WORLD_SIZE) { return m_inst->GetItem(index); } @@ -366,7 +366,7 @@ void Object::Close() { EQEmu::ItemInstance* container = this->m_inst; if(container != nullptr) { - for (uint8 i = EQEmu::inventory::containerBegin; i < EQEmu::inventory::ContainerCount; i++) + for (uint8 i = EQEmu::invbag::SLOT_BEGIN; i <= EQEmu::invbag::SLOT_END; i++) { EQEmu::ItemInstance* inst = container->PopItem(i); if(inst != nullptr) @@ -522,11 +522,11 @@ bool Object::HandleClick(Client* sender, const ClickObject_Struct* click_object) // Transfer item to client - sender->PutItemInInventory(EQEmu::inventory::slotCursor, *m_inst, false); - sender->SendItemPacket(EQEmu::inventory::slotCursor, m_inst, ItemPacketTrade); + sender->PutItemInInventory(EQEmu::invslot::slotCursor, *m_inst, false); + sender->SendItemPacket(EQEmu::invslot::slotCursor, m_inst, ItemPacketTrade); if(cursordelete) // delete the item if it's a duplicate lore. We have to do this because the client expects the item packet - sender->DeleteItemInInventory(EQEmu::inventory::slotCursor); + sender->DeleteItemInInventory(EQEmu::invslot::slotCursor); if(!m_ground_spawn) safe_delete(m_inst); @@ -603,7 +603,7 @@ bool Object::HandleClick(Client* sender, const ClickObject_Struct* click_object) auto outapp = new EQApplicationPacket(OP_ClientReady, 0); sender->QueuePacket(outapp); safe_delete(outapp); - for (uint8 i = EQEmu::inventory::containerBegin; i < EQEmu::inventory::ContainerCount; i++) { + for (uint8 i = EQEmu::invbag::SLOT_BEGIN; i <= EQEmu::invbag::SLOT_END; i++) { const EQEmu::ItemInstance* inst = m_inst->GetItem(i); if (inst) { //sender->GetInv().PutItem(i+4000,inst); diff --git a/zone/pets.cpp b/zone/pets.cpp index be17a3293..e4f7c417b 100644 --- a/zone/pets.cpp +++ b/zone/pets.cpp @@ -385,12 +385,12 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower, // the base items for the pet. These are always loaded // so that a rank 1 suspend minion does not kill things // like the special back items some focused pets may receive. - uint32 petinv[EQEmu::legacy::EQUIPMENT_SIZE]; + uint32 petinv[EQEmu::invslot::EQUIPMENT_COUNT]; memset(petinv, 0, sizeof(petinv)); const EQEmu::ItemData *item = nullptr; if (database.GetBasePetItems(record.equipmentset, petinv)) { - for (int i = 0; i < EQEmu::legacy::EQUIPMENT_SIZE; i++) + for (int i = EQEmu::invslot::EQUIPMENT_BEGIN; i <= EQEmu::invslot::EQUIPMENT_END; i++) if (petinv[i]) { item = database.GetItem(petinv[i]); npc->AddLootDrop(item, &npc->itemlist, 0, 1, 127, true, true); @@ -524,7 +524,7 @@ void NPC::GetPetState(SpellBuff_Struct *pet_buffs, uint32 *items, char *name) { strn0cpy(name, GetName(), 64); //save their items, we only care about what they are actually wearing - memcpy(items, equipment, sizeof(uint32) * EQEmu::legacy::EQUIPMENT_SIZE); + memcpy(items, equipment, sizeof(uint32) * EQEmu::invslot::EQUIPMENT_COUNT); //save their buffs. for (int i=0; i < GetPetMaxTotalSlots(); i++) { @@ -612,7 +612,7 @@ void NPC::SetPetState(SpellBuff_Struct *pet_buffs, uint32 *items) { } //restore their equipment... - for (i = 0; i < EQEmu::legacy::EQUIPMENT_SIZE; i++) { + for (i = EQEmu::invslot::EQUIPMENT_BEGIN; i <= EQEmu::invslot::EQUIPMENT_END; i++) { if(items[i] == 0) continue; @@ -679,7 +679,7 @@ bool ZoneDatabase::GetBasePetItems(int32 equipmentset, uint32 *items) { { slot = atoi(row[0]); - if (slot >= EQEmu::legacy::EQUIPMENT_SIZE) + if (slot > EQEmu::invslot::EQUIPMENT_END) continue; if (items[slot] == 0) diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index 490d3b1f8..6fe4e547b 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -2478,12 +2478,12 @@ int QuestManager::collectitems(uint32 item_id, bool remove) int quantity = 0; int slot_id; - for (slot_id = EQEmu::legacy::GENERAL_BEGIN; slot_id <= EQEmu::legacy::GENERAL_END; ++slot_id) + for (slot_id = EQEmu::invslot::GENERAL_BEGIN; slot_id <= EQEmu::invslot::GENERAL_END; ++slot_id) { quantity += collectitems_processSlot(slot_id, item_id, remove); } - for (slot_id = EQEmu::legacy::GENERAL_BAGS_BEGIN; slot_id <= EQEmu::legacy::GENERAL_BAGS_END; ++slot_id) + for (slot_id = EQEmu::invbag::GENERAL_BAGS_BEGIN; slot_id <= EQEmu::invbag::GENERAL_BAGS_END; ++slot_id) { quantity += collectitems_processSlot(slot_id, item_id, remove); } diff --git a/zone/special_attacks.cpp b/zone/special_attacks.cpp index 7c91c97a7..e8fd76c97 100644 --- a/zone/special_attacks.cpp +++ b/zone/special_attacks.cpp @@ -48,7 +48,7 @@ int Mob::GetBaseSkillDamage(EQEmu::skills::SkillType skill, Mob *target) base++; return base; case EQEmu::skills::SkillFrenzy: - if (IsClient() && CastToClient()->GetInv().GetItem(EQEmu::inventory::slotPrimary)) { + if (IsClient() && CastToClient()->GetInv().GetItem(EQEmu::invslot::slotPrimary)) { if (GetLevel() > 15) base += GetLevel() - 15; if (base > 23) @@ -65,7 +65,7 @@ int Mob::GetBaseSkillDamage(EQEmu::skills::SkillType skill, Mob *target) float skill_bonus = skill_level / 9.0f; float ac_bonus = 0.0f; if (IsClient()) { - auto inst = CastToClient()->GetInv().GetItem(EQEmu::inventory::slotFeet); + auto inst = CastToClient()->GetInv().GetItem(EQEmu::invslot::slotFeet); if (inst) ac_bonus = inst->GetItemArmorClass(true) / 25.0f; } @@ -78,7 +78,7 @@ int Mob::GetBaseSkillDamage(EQEmu::skills::SkillType skill, Mob *target) float skill_bonus = skill_level / 10.0f; float ac_bonus = 0.0f; if (IsClient()) { - auto inst = CastToClient()->GetInv().GetItem(EQEmu::inventory::slotFeet); + auto inst = CastToClient()->GetInv().GetItem(EQEmu::invslot::slotFeet); if (inst) ac_bonus = inst->GetItemArmorClass(true) / 25.0f; } @@ -92,9 +92,9 @@ int Mob::GetBaseSkillDamage(EQEmu::skills::SkillType skill, Mob *target) const EQEmu::ItemInstance *inst = nullptr; if (IsClient()) { if (HasShieldEquiped()) - inst = CastToClient()->GetInv().GetItem(EQEmu::inventory::slotSecondary); + inst = CastToClient()->GetInv().GetItem(EQEmu::invslot::slotSecondary); else if (HasTwoHanderEquipped()) - inst = CastToClient()->GetInv().GetItem(EQEmu::inventory::slotPrimary); + inst = CastToClient()->GetInv().GetItem(EQEmu::invslot::slotPrimary); } if (inst) ac_bonus = inst->GetItemArmorClass(true) / 25.0f; @@ -109,7 +109,7 @@ int Mob::GetBaseSkillDamage(EQEmu::skills::SkillType skill, Mob *target) base = 3; // There seems to be a base 3 for NPCs or some how BS w/o weapon? // until we get a better inv system for NPCs they get nerfed! if (IsClient()) { - auto *inst = CastToClient()->GetInv().GetItem(EQEmu::inventory::slotPrimary); + auto *inst = CastToClient()->GetInv().GetItem(EQEmu::invslot::slotPrimary); if (inst && inst->GetItem() && inst->GetItem()->ItemType == EQEmu::item::ItemType1HPiercing) { base = inst->GetItemBackstabDamage(true); if (!inst->GetItemBackstabDamage()) @@ -168,7 +168,7 @@ void Mob::DoSpecialAttackDamage(Mob *who, EQEmu::skills::SkillType skill, int32 if (skill == EQEmu::skills::SkillBash) { if (IsClient()) { - EQEmu::ItemInstance *item = CastToClient()->GetInv().GetItem(EQEmu::inventory::slotSecondary); + EQEmu::ItemInstance *item = CastToClient()->GetInv().GetItem(EQEmu::invslot::slotSecondary); if (item) { if (item->GetItem()->ItemType == EQEmu::item::ItemTypeShield) { hate += item->GetItem()->AC; @@ -185,10 +185,10 @@ void Mob::DoSpecialAttackDamage(Mob *who, EQEmu::skills::SkillType skill, int32 my_hit.offense = offense(my_hit.skill); my_hit.tohit = GetTotalToHit(my_hit.skill, 0); - my_hit.hand = EQEmu::inventory::slotPrimary; // Avoid checks hand for throwing/archery exclusion, primary should + my_hit.hand = EQEmu::invslot::slotPrimary; // Avoid checks hand for throwing/archery exclusion, primary should // work for most if (skill == EQEmu::skills::SkillThrowing || skill == EQEmu::skills::SkillArchery) - my_hit.hand = EQEmu::inventory::slotRange; + my_hit.hand = EQEmu::invslot::slotRange; DoAttack(who, my_hit); @@ -259,7 +259,7 @@ void Client::OPCombatAbility(const CombatAbility_Struct *ca_atk) // These two are not subject to the combat ability timer, as they // allready do their checking in conjunction with the attack timer // throwing weapons - if (ca_atk->m_atk == EQEmu::inventory::slotRange) { + if (ca_atk->m_atk == EQEmu::invslot::slotRange) { if (ca_atk->m_skill == EQEmu::skills::SkillThrowing) { SetAttackTimer(); ThrowingAttack(GetTarget()); @@ -309,8 +309,8 @@ void Client::OPCombatAbility(const CombatAbility_Struct *ca_atk) DoAnim(animTailRake, 0, false); int32 ht = 0; - if (GetWeaponDamage(GetTarget(), GetInv().GetItem(EQEmu::inventory::slotSecondary)) <= 0 && - GetWeaponDamage(GetTarget(), GetInv().GetItem(EQEmu::inventory::slotShoulders)) <= 0) + if (GetWeaponDamage(GetTarget(), GetInv().GetItem(EQEmu::invslot::slotSecondary)) <= 0 && + GetWeaponDamage(GetTarget(), GetInv().GetItem(EQEmu::invslot::slotShoulders)) <= 0) dmg = -5; else ht = dmg = GetBaseSkillDamage(EQEmu::skills::SkillBash, GetTarget()); @@ -366,7 +366,7 @@ void Client::OPCombatAbility(const CombatAbility_Struct *ca_atk) DoAnim(animKick, 0, false); int32 ht = 0; - if (GetWeaponDamage(GetTarget(), GetInv().GetItem(EQEmu::inventory::slotFeet)) <= 0) + if (GetWeaponDamage(GetTarget(), GetInv().GetItem(EQEmu::invslot::slotFeet)) <= 0) dmg = -5; else ht = dmg = GetBaseSkillDamage(EQEmu::skills::SkillKick, GetTarget()); @@ -445,7 +445,7 @@ int Mob::MonkSpecialAttack(Mob *other, uint8 unchecked_type) int32 min_dmg = 0; int reuse = 0; EQEmu::skills::SkillType skill_type; // to avoid casting... even though it "would work" - uint8 itemslot = EQEmu::inventory::slotFeet; + uint8 itemslot = EQEmu::invslot::slotFeet; if (IsNPC()) { auto *npc = CastToNPC(); min_dmg = npc->GetMinDamage(); @@ -462,21 +462,21 @@ int Mob::MonkSpecialAttack(Mob *other, uint8 unchecked_type) case EQEmu::skills::SkillDragonPunch: skill_type = EQEmu::skills::SkillDragonPunch; max_dmg = GetBaseSkillDamage(skill_type); - itemslot = EQEmu::inventory::slotHands; + itemslot = EQEmu::invslot::slotHands; DoAnim(animTailRake, 0, false); reuse = TailRakeReuseTime; break; case EQEmu::skills::SkillEagleStrike: skill_type = EQEmu::skills::SkillEagleStrike; max_dmg = GetBaseSkillDamage(skill_type); - itemslot = EQEmu::inventory::slotHands; + itemslot = EQEmu::invslot::slotHands; DoAnim(animEagleStrike, 0, false); reuse = EagleStrikeReuseTime; break; case EQEmu::skills::SkillTigerClaw: skill_type = EQEmu::skills::SkillTigerClaw; max_dmg = GetBaseSkillDamage(skill_type); - itemslot = EQEmu::inventory::slotHands; + itemslot = EQEmu::invslot::slotHands; DoAnim(animTigerClaw, 0, false); reuse = TigerClawReuseTime; break; @@ -528,7 +528,7 @@ void Mob::TryBackstab(Mob *other, int ReuseTime) { //make sure we have a proper weapon if we are a client. if(IsClient()) { - const EQEmu::ItemInstance *wpn = CastToClient()->GetInv().GetItem(EQEmu::inventory::slotPrimary); + const EQEmu::ItemInstance *wpn = CastToClient()->GetInv().GetItem(EQEmu::invslot::slotPrimary); if (!wpn || (wpn->GetItem()->ItemType != EQEmu::item::ItemType1HPiercing)){ Message_StringID(13, BACKSTAB_WEAPON); return; @@ -583,7 +583,7 @@ void Mob::TryBackstab(Mob *other, int ReuseTime) { m_specialattacks = eSpecialAttacks::None; } else { //We do a single regular attack if we attack from the front without chaotic stab - Attack(other, EQEmu::inventory::slotPrimary); + Attack(other, EQEmu::invslot::slotPrimary); } } @@ -597,7 +597,7 @@ void Mob::RogueBackstab(Mob* other, bool min_damage, int ReuseTime) // make sure we can hit (bane, magical, etc) if (IsClient()) { - const EQEmu::ItemInstance *wpn = CastToClient()->GetInv().GetItem(EQEmu::inventory::slotPrimary); + const EQEmu::ItemInstance *wpn = CastToClient()->GetInv().GetItem(EQEmu::invslot::slotPrimary); if (!GetWeaponDamage(other, wpn)) return; } else if (!GetWeaponDamage(other, (const EQEmu::ItemData*)nullptr)){ @@ -616,7 +616,7 @@ void Mob::RogueAssassinate(Mob* other) { //can you dodge, parry, etc.. an assassinate?? //if so, use DoSpecialAttackDamage(other, BACKSTAB, 32000); instead - if (GetWeaponDamage(other, IsClient() ? CastToClient()->GetInv().GetItem(EQEmu::inventory::slotPrimary) : (const EQEmu::ItemInstance*)nullptr) > 0){ + if (GetWeaponDamage(other, IsClient() ? CastToClient()->GetInv().GetItem(EQEmu::invslot::slotPrimary) : (const EQEmu::ItemInstance*)nullptr) > 0){ other->Damage(this, 32000, SPELL_UNKNOWN, EQEmu::skills::SkillBackstab); }else{ other->Damage(this, -5, SPELL_UNKNOWN, EQEmu::skills::SkillBackstab); @@ -636,20 +636,20 @@ void Client::RangedAttack(Mob* other, bool CanDoubleAttack) { //Message(0, "Error: Timer not up. Attack %d, ranged %d", attack_timer.GetRemainingTime(), ranged_timer.GetRemainingTime()); return; } - const EQEmu::ItemInstance* RangeWeapon = m_inv[EQEmu::inventory::slotRange]; + const EQEmu::ItemInstance* RangeWeapon = m_inv[EQEmu::invslot::slotRange]; //locate ammo - int ammo_slot = EQEmu::inventory::slotAmmo; - const EQEmu::ItemInstance* Ammo = m_inv[EQEmu::inventory::slotAmmo]; + int ammo_slot = EQEmu::invslot::slotAmmo; + const EQEmu::ItemInstance* Ammo = m_inv[EQEmu::invslot::slotAmmo]; if (!RangeWeapon || !RangeWeapon->IsClassCommon()) { - Log(Logs::Detail, Logs::Combat, "Ranged attack canceled. Missing or invalid ranged weapon (%d) in slot %d", GetItemIDAt(EQEmu::inventory::slotRange), EQEmu::inventory::slotRange); - Message(0, "Error: Rangeweapon: GetItem(%i)==0, you have no bow!", GetItemIDAt(EQEmu::inventory::slotRange)); + Log(Logs::Detail, Logs::Combat, "Ranged attack canceled. Missing or invalid ranged weapon (%d) in slot %d", GetItemIDAt(EQEmu::invslot::slotRange), EQEmu::invslot::slotRange); + Message(0, "Error: Rangeweapon: GetItem(%i)==0, you have no bow!", GetItemIDAt(EQEmu::invslot::slotRange)); return; } if (!Ammo || !Ammo->IsClassCommon()) { - Log(Logs::Detail, Logs::Combat, "Ranged attack canceled. Missing or invalid ammo item (%d) in slot %d", GetItemIDAt(EQEmu::inventory::slotAmmo), EQEmu::inventory::slotAmmo); - Message(0, "Error: Ammo: GetItem(%i)==0, you have no ammo!", GetItemIDAt(EQEmu::inventory::slotAmmo)); + Log(Logs::Detail, Logs::Combat, "Ranged attack canceled. Missing or invalid ammo item (%d) in slot %d", GetItemIDAt(EQEmu::invslot::slotAmmo), EQEmu::invslot::slotAmmo); + Message(0, "Error: Ammo: GetItem(%i)==0, you have no ammo!", GetItemIDAt(EQEmu::invslot::slotAmmo)); return; } @@ -674,7 +674,7 @@ void Client::RangedAttack(Mob* other, bool CanDoubleAttack) { //first look for quivers int r; bool found = false; - for (r = EQEmu::legacy::GENERAL_BEGIN; r <= EQEmu::legacy::GENERAL_END; r++) { + for (r = EQEmu::invslot::GENERAL_BEGIN; r <= EQEmu::invslot::GENERAL_END; r++) { const EQEmu::ItemInstance *pi = m_inv[r]; if (pi == nullptr || !pi->IsClassBag()) continue; @@ -791,7 +791,7 @@ void Mob::DoArcheryAttackDmg(Mob *other, const EQEmu::ItemInstance *RangeWeapon, if (!RangeWeapon && !Ammo && range_id && ammo_id) { if (IsClient()) { - _RangeWeapon = CastToClient()->m_inv[EQEmu::inventory::slotRange]; + _RangeWeapon = CastToClient()->m_inv[EQEmu::invslot::slotRange]; if (_RangeWeapon && _RangeWeapon->GetItem() && _RangeWeapon->GetItem()->ID == range_id) RangeWeapon = _RangeWeapon; @@ -859,7 +859,7 @@ void Mob::DoArcheryAttackDmg(Mob *other, const EQEmu::ItemInstance *RangeWeapon, my_hit.skill = EQEmu::skills::SkillArchery; my_hit.offense = offense(my_hit.skill); my_hit.tohit = GetTotalToHit(my_hit.skill, chance_mod); - my_hit.hand = EQEmu::inventory::slotRange; + my_hit.hand = EQEmu::invslot::slotRange; DoAttack(other, my_hit); TotalDmg = my_hit.damage_done; @@ -877,7 +877,7 @@ void Mob::DoArcheryAttackDmg(Mob *other, const EQEmu::ItemInstance *RangeWeapon, if (ReuseTime) TrySkillProc(other, EQEmu::skills::SkillArchery, ReuseTime); else - TrySkillProc(other, EQEmu::skills::SkillArchery, 0, true, EQEmu::inventory::slotRange); + TrySkillProc(other, EQEmu::skills::SkillArchery, 0, true, EQEmu::invslot::slotRange); } // end of old fuck @@ -886,20 +886,20 @@ void Mob::DoArcheryAttackDmg(Mob *other, const EQEmu::ItemInstance *RangeWeapon, // Weapon Proc if (RangeWeapon && other && !other->HasDied()) - TryWeaponProc(RangeWeapon, other, EQEmu::inventory::slotRange); + TryWeaponProc(RangeWeapon, other, EQEmu::invslot::slotRange); // Ammo Proc if (ammo_lost) - TryWeaponProc(nullptr, ammo_lost, other, EQEmu::inventory::slotRange); + TryWeaponProc(nullptr, ammo_lost, other, EQEmu::invslot::slotRange); else if (Ammo && other && !other->HasDied()) - TryWeaponProc(Ammo, other, EQEmu::inventory::slotRange); + TryWeaponProc(Ammo, other, EQEmu::invslot::slotRange); // Skill Proc if (HasSkillProcs() && other && !other->HasDied()) { if (ReuseTime) TrySkillProc(other, EQEmu::skills::SkillArchery, ReuseTime); else - TrySkillProc(other, EQEmu::skills::SkillArchery, 0, false, EQEmu::inventory::slotRange); + TrySkillProc(other, EQEmu::skills::SkillArchery, 0, false, EQEmu::invslot::slotRange); } } @@ -1190,7 +1190,7 @@ void NPC::DoRangedAttackDmg(Mob* other, bool Launch, int16 damage_mod, int16 cha my_hit.skill = skill; my_hit.offense = offense(my_hit.skill); my_hit.tohit = GetTotalToHit(my_hit.skill, chance_mod); - my_hit.hand = EQEmu::inventory::slotRange; + my_hit.hand = EQEmu::invslot::slotRange; DoAttack(other, my_hit); @@ -1206,14 +1206,14 @@ void NPC::DoRangedAttackDmg(Mob* other, bool Launch, int16 damage_mod, int16 cha other->Damage(this, TotalDmg, SPELL_UNKNOWN, skillInUse); if (TotalDmg > 0 && HasSkillProcSuccess() && !other->HasDied()) - TrySkillProc(other, skillInUse, 0, true, EQEmu::inventory::slotRange); + TrySkillProc(other, skillInUse, 0, true, EQEmu::invslot::slotRange); //try proc on hits and misses if(other && !other->HasDied()) - TrySpellProc(nullptr, (const EQEmu::ItemData*)nullptr, other, EQEmu::inventory::slotRange); + TrySpellProc(nullptr, (const EQEmu::ItemData*)nullptr, other, EQEmu::invslot::slotRange); if (HasSkillProcs() && other && !other->HasDied()) - TrySkillProc(other, skillInUse, 0, false, EQEmu::inventory::slotRange); + TrySkillProc(other, skillInUse, 0, false, EQEmu::invslot::slotRange); } void Client::ThrowingAttack(Mob* other, bool CanDoubleAttack) { //old was 51 @@ -1229,19 +1229,19 @@ void Client::ThrowingAttack(Mob* other, bool CanDoubleAttack) { //old was 51 return; } - int ammo_slot = EQEmu::inventory::slotRange; - const EQEmu::ItemInstance* RangeWeapon = m_inv[EQEmu::inventory::slotRange]; + int ammo_slot = EQEmu::invslot::slotRange; + const EQEmu::ItemInstance* RangeWeapon = m_inv[EQEmu::invslot::slotRange]; if (!RangeWeapon || !RangeWeapon->IsClassCommon()) { - Log(Logs::Detail, Logs::Combat, "Ranged attack canceled. Missing or invalid ranged weapon (%d) in slot %d", GetItemIDAt(EQEmu::inventory::slotRange), EQEmu::inventory::slotRange); - Message(0, "Error: Rangeweapon: GetItem(%i)==0, you have nothing to throw!", GetItemIDAt(EQEmu::inventory::slotRange)); + Log(Logs::Detail, Logs::Combat, "Ranged attack canceled. Missing or invalid ranged weapon (%d) in slot %d", GetItemIDAt(EQEmu::invslot::slotRange), EQEmu::invslot::slotRange); + Message(0, "Error: Rangeweapon: GetItem(%i)==0, you have nothing to throw!", GetItemIDAt(EQEmu::invslot::slotRange)); return; } const EQEmu::ItemData* item = RangeWeapon->GetItem(); if (item->ItemType != EQEmu::item::ItemTypeLargeThrowing && item->ItemType != EQEmu::item::ItemTypeSmallThrowing) { Log(Logs::Detail, Logs::Combat, "Ranged attack canceled. Ranged item %d is not a throwing weapon. type %d.", item->ItemType); - Message(0, "Error: Rangeweapon: GetItem(%i)==0, you have nothing useful to throw!", GetItemIDAt(EQEmu::inventory::slotRange)); + Message(0, "Error: Rangeweapon: GetItem(%i)==0, you have nothing useful to throw!", GetItemIDAt(EQEmu::invslot::slotRange)); return; } @@ -1249,11 +1249,11 @@ void Client::ThrowingAttack(Mob* other, bool CanDoubleAttack) { //old was 51 if(RangeWeapon->GetCharges() == 1) { //first check ammo - const EQEmu::ItemInstance* AmmoItem = m_inv[EQEmu::inventory::slotAmmo]; + const EQEmu::ItemInstance* AmmoItem = m_inv[EQEmu::invslot::slotAmmo]; if(AmmoItem != nullptr && AmmoItem->GetID() == RangeWeapon->GetID()) { //more in the ammo slot, use it RangeWeapon = AmmoItem; - ammo_slot = EQEmu::inventory::slotAmmo; + ammo_slot = EQEmu::invslot::slotAmmo; Log(Logs::Detail, Logs::Combat, "Using ammo from ammo slot, stack at slot %d. %d in stack.", ammo_slot, RangeWeapon->GetCharges()); } else { //look through our inventory for more @@ -1371,7 +1371,7 @@ void Mob::DoThrowingAttackDmg(Mob *other, const EQEmu::ItemInstance *RangeWeapon my_hit.skill = EQEmu::skills::SkillThrowing; my_hit.offense = offense(my_hit.skill); my_hit.tohit = GetTotalToHit(my_hit.skill, chance_mod); - my_hit.hand = EQEmu::inventory::slotRange; + my_hit.hand = EQEmu::invslot::slotRange; DoAttack(other, my_hit); TotalDmg = my_hit.damage_done; @@ -1390,7 +1390,7 @@ void Mob::DoThrowingAttackDmg(Mob *other, const EQEmu::ItemInstance *RangeWeapon if (ReuseTime) TrySkillProc(other, EQEmu::skills::SkillThrowing, ReuseTime); else - TrySkillProc(other, EQEmu::skills::SkillThrowing, 0, true, EQEmu::inventory::slotRange); + TrySkillProc(other, EQEmu::skills::SkillThrowing, 0, true, EQEmu::invslot::slotRange); } // end old shit @@ -1399,15 +1399,15 @@ void Mob::DoThrowingAttackDmg(Mob *other, const EQEmu::ItemInstance *RangeWeapon // Throwing item Proc if (ammo_lost) - TryWeaponProc(nullptr, ammo_lost, other, EQEmu::inventory::slotRange); + TryWeaponProc(nullptr, ammo_lost, other, EQEmu::invslot::slotRange); else if (RangeWeapon && other && !other->HasDied()) - TryWeaponProc(RangeWeapon, other, EQEmu::inventory::slotRange); + TryWeaponProc(RangeWeapon, other, EQEmu::invslot::slotRange); if (HasSkillProcs() && other && !other->HasDied()) { if (ReuseTime) TrySkillProc(other, EQEmu::skills::SkillThrowing, ReuseTime); else - TrySkillProc(other, EQEmu::skills::SkillThrowing, 0, false, EQEmu::inventory::slotRange); + TrySkillProc(other, EQEmu::skills::SkillThrowing, 0, false, EQEmu::invslot::slotRange); } } @@ -1766,7 +1766,7 @@ void Client::DoClassAttacks(Mob *ca_target, uint16 skill, bool IsRiposte) if (ca_target!=this) { DoAnim(animTailRake, 0, false); - if (GetWeaponDamage(ca_target, GetInv().GetItem(EQEmu::inventory::slotSecondary)) <= 0 && GetWeaponDamage(ca_target, GetInv().GetItem(EQEmu::inventory::slotShoulders)) <= 0) + if (GetWeaponDamage(ca_target, GetInv().GetItem(EQEmu::invslot::slotSecondary)) <= 0 && GetWeaponDamage(ca_target, GetInv().GetItem(EQEmu::invslot::slotShoulders)) <= 0) dmg = DMG_INVULNERABLE; ReuseTime = (BashReuseTime - 1) / HasteMod; @@ -1812,7 +1812,7 @@ void Client::DoClassAttacks(Mob *ca_target, uint16 skill, bool IsRiposte) if(ca_target!=this){ DoAnim(animKick, 0, false); - if (GetWeaponDamage(ca_target, GetInv().GetItem(EQEmu::inventory::slotFeet)) <= 0) + if (GetWeaponDamage(ca_target, GetInv().GetItem(EQEmu::invslot::slotFeet)) <= 0) dmg = DMG_INVULNERABLE; ReuseTime = KickReuseTime-1; @@ -2111,7 +2111,7 @@ void Mob::DoMeleeSkillAttackDmg(Mob *other, uint16 weapon_damage, EQEmu::skills: if (skillinuse == EQEmu::skills::SkillBash) { if (IsClient()) { EQEmu::ItemInstance *item = - CastToClient()->GetInv().GetItem(EQEmu::inventory::slotSecondary); + CastToClient()->GetInv().GetItem(EQEmu::invslot::slotSecondary); if (item) { if (item->GetItem()->ItemType == EQEmu::item::ItemTypeShield) { hate += item->GetItem()->AC; @@ -2131,7 +2131,7 @@ void Mob::DoMeleeSkillAttackDmg(Mob *other, uint16 weapon_damage, EQEmu::skills: my_hit.offense = offense(my_hit.skill); my_hit.tohit = GetTotalToHit(my_hit.skill, chance_mod); // slot range exclude ripe etc ... - my_hit.hand = CanRiposte ? EQEmu::inventory::slotRange : EQEmu::inventory::slotPrimary; + my_hit.hand = CanRiposte ? EQEmu::invslot::slotRange : EQEmu::invslot::slotPrimary; if (IsNPC()) my_hit.min_damage = CastToNPC()->GetMinDamage(); diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 1cb376e98..ee71a627b 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -624,7 +624,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove snprintf(effect_desc, _EDLEN, "Flesh To Bone"); #endif if(IsClient()){ - EQEmu::ItemInstance* transI = CastToClient()->GetInv().GetItem(EQEmu::inventory::slotCursor); + EQEmu::ItemInstance* transI = CastToClient()->GetInv().GetItem(EQEmu::invslot::slotCursor); if (transI && transI->IsClassCommon() && transI->IsStackable()){ uint32 fcharges = transI->GetCharges(); //Does it sound like meat... maybe should check if it looks like meat too... @@ -634,7 +634,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove strstr(transI->GetItem()->Name, "Flesh") || strstr(transI->GetItem()->Name, "parts") || strstr(transI->GetItem()->Name, "Parts")){ - CastToClient()->DeleteItemInInventory(EQEmu::inventory::slotCursor, fcharges, true); + CastToClient()->DeleteItemInInventory(EQEmu::invslot::slotCursor, fcharges, true); CastToClient()->SummonItem(13073, fcharges); } else{ @@ -1176,7 +1176,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove if (SummonedItem) { c->PushItemOnCursor(*SummonedItem); - c->SendItemPacket(EQEmu::inventory::slotCursor, SummonedItem, ItemPacketLimbo); + c->SendItemPacket(EQEmu::invslot::slotCursor, SummonedItem, ItemPacketLimbo); safe_delete(SummonedItem); } SummonedItem = database.CreateItem(spell.base[i], charges); @@ -2213,7 +2213,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove snprintf(effect_desc, _EDLEN, "Rampage"); #endif if(caster) - entity_list.AEAttack(caster, 30, EQEmu::inventory::slotPrimary, 0, true); // on live wars dont get a duration ramp, its a one shot deal + entity_list.AEAttack(caster, 30, EQEmu::invslot::slotPrimary, 0, true); // on live wars dont get a duration ramp, its a one shot deal break; } @@ -3015,7 +3015,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove if (SummonedItem) { Client *c=CastToClient(); c->PushItemOnCursor(*SummonedItem); - c->SendItemPacket(EQEmu::inventory::slotCursor, SummonedItem, ItemPacketLimbo); + c->SendItemPacket(EQEmu::invslot::slotCursor, SummonedItem, ItemPacketLimbo); safe_delete(SummonedItem); } @@ -5169,7 +5169,7 @@ uint16 Client::GetSympatheticFocusEffect(focusType type, uint16 spell_id) { const EQEmu::ItemData* TempItem = nullptr; - for (int x = EQEmu::legacy::EQUIPMENT_BEGIN; x <= EQEmu::legacy::EQUIPMENT_END; x++) + for (int x = EQEmu::invslot::EQUIPMENT_BEGIN; x <= EQEmu::invslot::EQUIPMENT_END; x++) { if (SympatheticProcList.size() > MAX_SYMPATHETIC_PROCS) continue; @@ -5189,7 +5189,7 @@ uint16 Client::GetSympatheticFocusEffect(focusType type, uint16 spell_id) { } } - for (int y = EQEmu::inventory::socketBegin; y < EQEmu::inventory::SocketCount; ++y) + for (int y = EQEmu::invaug::SOCKET_BEGIN; y <= EQEmu::invaug::SOCKET_END; ++y) { if (SympatheticProcList.size() > MAX_SYMPATHETIC_PROCS) continue; @@ -5304,7 +5304,7 @@ int16 Client::GetFocusEffect(focusType type, uint16 spell_id) int16 focus_max_real = 0; //item focus - for (int x = EQEmu::legacy::EQUIPMENT_BEGIN; x <= EQEmu::legacy::EQUIPMENT_END; x++) + for (int x = EQEmu::invslot::EQUIPMENT_BEGIN; x <= EQEmu::invslot::EQUIPMENT_END; x++) { TempItem = nullptr; EQEmu::ItemInstance* ins = GetInv().GetItem(x); @@ -5338,7 +5338,7 @@ int16 Client::GetFocusEffect(focusType type, uint16 spell_id) } } - for (int y = EQEmu::inventory::socketBegin; y < EQEmu::inventory::SocketCount; ++y) + for (int y = EQEmu::invaug::SOCKET_BEGIN; y <= EQEmu::invaug::SOCKET_END; ++y) { EQEmu::ItemInstance *aug = nullptr; aug = ins->GetAugment(y); @@ -5376,7 +5376,7 @@ int16 Client::GetFocusEffect(focusType type, uint16 spell_id) } //Tribute Focus - for (int x = EQEmu::legacy::TRIBUTE_BEGIN; x <= EQEmu::legacy::TRIBUTE_END; ++x) + for (int x = EQEmu::invslot::TRIBUTE_BEGIN; x <= EQEmu::invslot::TRIBUTE_END; ++x) { TempItem = nullptr; EQEmu::ItemInstance* ins = GetInv().GetItem(x); @@ -5576,7 +5576,7 @@ int16 NPC::GetFocusEffect(focusType type, uint16 spell_id) { int16 focus_max_real = 0; //item focus - for (int i = 0; i < EQEmu::legacy::EQUIPMENT_SIZE; i++){ + for (int i = EQEmu::invslot::EQUIPMENT_BEGIN; i <= EQEmu::invslot::EQUIPMENT_END; i++){ const EQEmu::ItemData *cur = database.GetItem(equipment[i]); if(!cur) diff --git a/zone/spells.cpp b/zone/spells.cpp index 1c17e80f4..537e7358e 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -281,7 +281,7 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot, return(false); } } - if (itm && (itm->GetItem()->Click.Type == EQEmu::item::ItemEffectEquipClick) && !(item_slot <= EQEmu::inventory::slotAmmo || item_slot == EQEmu::inventory::slotPowerSource)){ + if (itm && (itm->GetItem()->Click.Type == EQEmu::item::ItemEffectEquipClick) && !(item_slot <= EQEmu::invslot::slotAmmo || item_slot == EQEmu::invslot::SLOT_POWER_SOURCE)){ if (CastToClient()->ClientVersion() < EQEmu::versions::ClientVersion::SoF) { // They are attempting to cast a must equip clicky without having it equipped Log(Logs::General, Logs::Error, "HACKER: %s (account: %s) attempted to click an equip-only effect on item %s (id: %d) without equiping it!", CastToClient()->GetCleanName(), CastToClient()->AccountName(), itm->GetItem()->Name, itm->GetItem()->ID); @@ -1294,7 +1294,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo if (inst == nullptr) break; - for (int r = EQEmu::inventory::socketBegin; r < EQEmu::inventory::SocketCount; r++) { + for (int r = EQEmu::invaug::SOCKET_BEGIN; r <= EQEmu::invaug::SOCKET_END; r++) { const EQEmu::ItemInstance* aug_i = inst->GetAugment(r); if (!aug_i) diff --git a/zone/tradeskills.cpp b/zone/tradeskills.cpp index 262f46234..a6e0dbd34 100644 --- a/zone/tradeskills.cpp +++ b/zone/tradeskills.cpp @@ -69,7 +69,7 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme // Verify that no more than two items are in container to guarantee no inadvertant wipes. uint8 itemsFound = 0; - for (uint8 i = EQEmu::inventory::slotBegin; i < EQEmu::legacy::TYPE_WORLD_SIZE; i++) + for (uint8 i = EQEmu::invbag::SLOT_BEGIN; i < EQEmu::invtype::WORLD_SIZE; i++) { const EQEmu::ItemInstance* inst = container->GetItem(i); if (inst) @@ -222,7 +222,7 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme else { // Delete items in our inventory container... - for (uint8 i = EQEmu::inventory::slotBegin; i < EQEmu::legacy::TYPE_WORLD_SIZE; i++) + for (uint8 i = EQEmu::invbag::SLOT_BEGIN; i < EQEmu::invtype::WORLD_SIZE; i++) { const EQEmu::ItemInstance* inst = container->GetItem(i); if (inst) @@ -303,7 +303,7 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob const EQEmu::ItemData* new_weapon = inst->GetItem(); user->DeleteItemInInventory(EQEmu::InventoryProfile::CalcSlotId(in_combine->container_slot, 0), 0, true); container->Clear(); - user->SummonItem(new_weapon->ID, inst->GetCharges(), inst->GetAugmentItemID(0), inst->GetAugmentItemID(1), inst->GetAugmentItemID(2), inst->GetAugmentItemID(3), inst->GetAugmentItemID(4), inst->GetAugmentItemID(5), inst->IsAttuned(), EQEmu::inventory::slotCursor, container->GetItem()->Icon, atoi(container->GetItem()->IDFile + 2)); + user->SummonItem(new_weapon->ID, inst->GetCharges(), inst->GetAugmentItemID(0), inst->GetAugmentItemID(1), inst->GetAugmentItemID(2), inst->GetAugmentItemID(3), inst->GetAugmentItemID(4), inst->GetAugmentItemID(5), inst->IsAttuned(), EQEmu::invslot::slotCursor, container->GetItem()->Icon, atoi(container->GetItem()->IDFile + 2)); user->Message_StringID(4, TRANSFORM_COMPLETE, inst->GetItem()->Name); if (RuleB(Inventory, DeleteTransformationMold)) user->DeleteItemInInventory(in_combine->container_slot, 0, true); @@ -323,7 +323,7 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob const EQEmu::ItemData* new_weapon = inst->GetItem(); user->DeleteItemInInventory(EQEmu::InventoryProfile::CalcSlotId(in_combine->container_slot, 0), 0, true); container->Clear(); - user->SummonItem(new_weapon->ID, inst->GetCharges(), inst->GetAugmentItemID(0), inst->GetAugmentItemID(1), inst->GetAugmentItemID(2), inst->GetAugmentItemID(3), inst->GetAugmentItemID(4), inst->GetAugmentItemID(5), inst->IsAttuned(), EQEmu::inventory::slotCursor, 0, 0); + user->SummonItem(new_weapon->ID, inst->GetCharges(), inst->GetAugmentItemID(0), inst->GetAugmentItemID(1), inst->GetAugmentItemID(2), inst->GetAugmentItemID(3), inst->GetAugmentItemID(4), inst->GetAugmentItemID(5), inst->IsAttuned(), EQEmu::invslot::slotCursor, 0, 0); user->Message_StringID(4, TRANSFORM_COMPLETE, inst->GetItem()->Name); } else if (inst) { @@ -407,7 +407,7 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob safe_delete(outapp); database.DeleteWorldContainer(worldo->m_id, zone->GetZoneID()); } else{ - for (uint8 i = EQEmu::inventory::slotBegin; i < EQEmu::legacy::TYPE_WORLD_SIZE; i++) { + for (uint8 i = EQEmu::invbag::SLOT_BEGIN; i < EQEmu::invtype::WORLD_SIZE; i++) { const EQEmu::ItemInstance* inst = container->GetItem(i); if (inst) { user->DeleteItemInInventory(EQEmu::InventoryProfile::CalcSlotId(in_combine->container_slot, i), 0, true); @@ -1243,7 +1243,7 @@ bool ZoneDatabase::GetTradeRecipe(const EQEmu::ItemInstance* container, uint8 c_ for (auto row = results.begin(); row != results.end(); ++row) { int ccnt = 0; - for (int x = EQEmu::inventory::slotBegin; x < EQEmu::legacy::TYPE_WORLD_SIZE; x++) { + for (int x = EQEmu::invbag::SLOT_BEGIN; x < EQEmu::invtype::WORLD_SIZE; x++) { const EQEmu::ItemInstance* inst = container->GetItem(x); if(!inst) continue; diff --git a/zone/trading.cpp b/zone/trading.cpp index 70d5c85c1..d3456fbf2 100644 --- a/zone/trading.cpp +++ b/zone/trading.cpp @@ -99,7 +99,7 @@ void Trade::AddEntity(uint16 trade_slot_id, uint32 stack_size) { // Item always goes into trade bucket from cursor Client* client = owner->CastToClient(); - EQEmu::ItemInstance* inst = client->GetInv().GetItem(EQEmu::inventory::slotCursor); + EQEmu::ItemInstance* inst = client->GetInv().GetItem(EQEmu::invslot::slotCursor); if (!inst) { client->Message(13, "Error: Could not find item on your cursor!"); @@ -132,7 +132,7 @@ void Trade::AddEntity(uint16 trade_slot_id, uint32 stack_size) { if (_stack_size > 0) inst->SetCharges(_stack_size); else - client->DeleteItemInInventory(EQEmu::inventory::slotCursor); + client->DeleteItemInInventory(EQEmu::invslot::slotCursor); SendItemData(inst2, trade_slot_id); } @@ -147,7 +147,7 @@ void Trade::AddEntity(uint16 trade_slot_id, uint32 stack_size) { Log(Logs::Detail, Logs::Trading, "%s added item '%s' to trade slot %i", owner->GetName(), inst->GetItem()->Name, trade_slot_id); client->PutItemInInventory(trade_slot_id, *inst); - client->DeleteItemInInventory(EQEmu::inventory::slotCursor); + client->DeleteItemInInventory(EQEmu::invslot::slotCursor); } } @@ -172,13 +172,13 @@ void Trade::SendItemData(const EQEmu::ItemInstance* inst, int16 dest_slot_id) Client* with = mob->CastToClient(); Client* trader = owner->CastToClient(); if (with && with->IsClient()) { - with->SendItemPacket(dest_slot_id - EQEmu::legacy::TRADE_BEGIN, inst, ItemPacketTradeView); + with->SendItemPacket(dest_slot_id - EQEmu::invslot::TRADE_BEGIN, inst, ItemPacketTradeView); if (inst->GetItem()->ItemClass == 1) { - for (uint16 i = EQEmu::inventory::containerBegin; i < EQEmu::inventory::ContainerCount; i++) { + for (uint16 i = EQEmu::invbag::SLOT_BEGIN; i <= EQEmu::invbag::SLOT_END; i++) { uint16 bagslot_id = EQEmu::InventoryProfile::CalcSlotId(dest_slot_id, i); const EQEmu::ItemInstance* bagitem = trader->GetInv().GetItem(bagslot_id); if (bagitem) { - with->SendItemPacket(bagslot_id - EQEmu::legacy::TRADE_BEGIN, bagitem, ItemPacketTradeView); + with->SendItemPacket(bagslot_id - EQEmu::invslot::TRADE_BEGIN, bagitem, ItemPacketTradeView); } } } @@ -200,7 +200,7 @@ void Trade::LogTrade() uint8 item_count = 0; if (zone->tradevar != 0) { - for (uint16 i = EQEmu::legacy::TRADE_BEGIN; i <= EQEmu::legacy::TRADE_END; i++) { + for (uint16 i = EQEmu::invslot::TRADE_BEGIN; i <= EQEmu::invslot::TRADE_END; i++) { if (trader->GetInv().GetItem(i)) item_count++; } @@ -252,7 +252,7 @@ void Trade::LogTrade() if (item_count > 0) { strcat(logtext, "items {"); - for (uint16 i = EQEmu::legacy::TRADE_BEGIN; i <= EQEmu::legacy::TRADE_END; i++) { + for (uint16 i = EQEmu::invslot::TRADE_BEGIN; i <= EQEmu::invslot::TRADE_END; i++) { const EQEmu::ItemInstance* inst = trader->GetInv().GetItem(i); if (!comma) @@ -268,7 +268,7 @@ void Trade::LogTrade() strcat(logtext, item_num); if (inst->IsClassBag()) { - for (uint8 j = EQEmu::inventory::containerBegin; j < EQEmu::inventory::ContainerCount; j++) { + for (uint8 j = EQEmu::invbag::SLOT_BEGIN; j <= EQEmu::invbag::SLOT_END; j++) { inst = trader->GetInv().GetItem(i, j); if (inst) { strcat(logtext, ","); @@ -304,7 +304,7 @@ void Trade::DumpTrade() return; Client* trader = owner->CastToClient(); - for (uint16 i = EQEmu::legacy::TRADE_BEGIN; i <= EQEmu::legacy::TRADE_END; i++) { + for (uint16 i = EQEmu::invslot::TRADE_BEGIN; i <= EQEmu::invslot::TRADE_END; i++) { const EQEmu::ItemInstance* inst = trader->GetInv().GetItem(i); if (inst) { @@ -313,7 +313,7 @@ void Trade::DumpTrade() i, ((inst->IsClassBag()) ? "True" : "False")); if (inst->IsClassBag()) { - for (uint8 j = EQEmu::inventory::containerBegin; j < EQEmu::inventory::ContainerCount; j++) { + for (uint8 j = EQEmu::invbag::SLOT_BEGIN; j <= EQEmu::invbag::SLOT_END; j++) { inst = trader->GetInv().GetItem(i, j); if (inst) { Log(Logs::Detail, Logs::Trading, "\tBagItem %i (Charges=%i, Slot=%i)", @@ -333,7 +333,7 @@ void Client::ResetTrade() { AddMoneyToPP(trade->cp, trade->sp, trade->gp, trade->pp, true); // step 1: process bags - for (int16 trade_slot = EQEmu::legacy::TRADE_BEGIN; trade_slot <= EQEmu::legacy::TRADE_END; ++trade_slot) { + for (int16 trade_slot = EQEmu::invslot::TRADE_BEGIN; trade_slot <= EQEmu::invslot::TRADE_END; ++trade_slot) { const EQEmu::ItemInstance* inst = m_inv[trade_slot]; if (inst && inst->IsClassBag()) { @@ -352,7 +352,7 @@ void Client::ResetTrade() { } // step 2a: process stackables - for (int16 trade_slot = EQEmu::legacy::TRADE_BEGIN; trade_slot <= EQEmu::legacy::TRADE_END; ++trade_slot) { + for (int16 trade_slot = EQEmu::invslot::TRADE_BEGIN; trade_slot <= EQEmu::invslot::TRADE_END; ++trade_slot) { EQEmu::ItemInstance* inst = GetInv().GetItem(trade_slot); if (inst && inst->IsStackable()) { @@ -360,7 +360,7 @@ void Client::ResetTrade() { // there's no built-in safety check against an infinite loop..but, it should break on one of the conditional checks int16 free_slot = m_inv.FindFreeSlotForTradeItem(inst); - if ((free_slot == EQEmu::inventory::slotCursor) || (free_slot == INVALID_INDEX)) + if ((free_slot == EQEmu::invslot::slotCursor) || (free_slot == INVALID_INDEX)) break; EQEmu::ItemInstance* partial_inst = GetInv().GetItem(free_slot); @@ -399,11 +399,11 @@ void Client::ResetTrade() { // step 2b: adjust trade stack bias // (if any partial stacks exist before the final stack, FindFreeSlotForTradeItem() will return that slot in step 3 and an overwrite will occur) - for (int16 trade_slot = EQEmu::legacy::TRADE_END; trade_slot >= EQEmu::legacy::TRADE_BEGIN; --trade_slot) { + for (int16 trade_slot = EQEmu::invslot::TRADE_END; trade_slot >= EQEmu::invslot::TRADE_BEGIN; --trade_slot) { EQEmu::ItemInstance* inst = GetInv().GetItem(trade_slot); if (inst && inst->IsStackable()) { - for (int16 bias_slot = EQEmu::legacy::TRADE_BEGIN; bias_slot <= EQEmu::legacy::TRADE_END; ++bias_slot) { + for (int16 bias_slot = EQEmu::invslot::TRADE_BEGIN; bias_slot <= EQEmu::invslot::TRADE_END; ++bias_slot) { if (bias_slot >= trade_slot) break; @@ -433,7 +433,7 @@ void Client::ResetTrade() { } // step 3: process everything else - for (int16 trade_slot = EQEmu::legacy::TRADE_BEGIN; trade_slot <= EQEmu::legacy::TRADE_END; ++trade_slot) { + for (int16 trade_slot = EQEmu::invslot::TRADE_BEGIN; trade_slot <= EQEmu::invslot::TRADE_END; ++trade_slot) { const EQEmu::ItemInstance* inst = m_inv[trade_slot]; if (inst) { @@ -488,7 +488,7 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st } // step 1: process bags - for (int16 trade_slot = EQEmu::legacy::TRADE_BEGIN; trade_slot <= EQEmu::legacy::TRADE_END; ++trade_slot) { + for (int16 trade_slot = EQEmu::invslot::TRADE_BEGIN; trade_slot <= EQEmu::invslot::TRADE_END; ++trade_slot) { const EQEmu::ItemInstance* inst = m_inv[trade_slot]; if (inst && inst->IsClassBag()) { @@ -523,7 +523,7 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st else qs_audit->char1_count += detail->charges; - for (uint8 sub_slot = EQEmu::inventory::containerBegin; (sub_slot < EQEmu::inventory::ContainerCount); ++sub_slot) { // this is to catch ALL items + for (uint8 sub_slot = EQEmu::invbag::SLOT_BEGIN; (sub_slot <= EQEmu::invbag::SLOT_END); ++sub_slot) { // this is to catch ALL items const EQEmu::ItemInstance* bag_inst = inst->GetItem(sub_slot); if (bag_inst) { @@ -571,7 +571,7 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st } // step 2a: process stackables - for (int16 trade_slot = EQEmu::legacy::TRADE_BEGIN; trade_slot <= EQEmu::legacy::TRADE_END; ++trade_slot) { + for (int16 trade_slot = EQEmu::invslot::TRADE_BEGIN; trade_slot <= EQEmu::invslot::TRADE_END; ++trade_slot) { EQEmu::ItemInstance* inst = GetInv().GetItem(trade_slot); if (inst && inst->IsStackable()) { @@ -579,7 +579,7 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st // there's no built-in safety check against an infinite loop..but, it should break on one of the conditional checks int16 partial_slot = other->GetInv().FindFreeSlotForTradeItem(inst); - if ((partial_slot == EQEmu::inventory::slotCursor) || (partial_slot == INVALID_INDEX)) + if ((partial_slot == EQEmu::invslot::slotCursor) || (partial_slot == INVALID_INDEX)) break; EQEmu::ItemInstance* partial_inst = other->GetInv().GetItem(partial_slot); @@ -653,11 +653,11 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st // step 2b: adjust trade stack bias // (if any partial stacks exist before the final stack, FindFreeSlotForTradeItem() will return that slot in step 3 and an overwrite will occur) - for (int16 trade_slot = EQEmu::legacy::TRADE_END; trade_slot >= EQEmu::legacy::TRADE_BEGIN; --trade_slot) { + for (int16 trade_slot = EQEmu::invslot::TRADE_END; trade_slot >= EQEmu::invslot::TRADE_BEGIN; --trade_slot) { EQEmu::ItemInstance* inst = GetInv().GetItem(trade_slot); if (inst && inst->IsStackable()) { - for (int16 bias_slot = EQEmu::legacy::TRADE_BEGIN; bias_slot <= EQEmu::legacy::TRADE_END; ++bias_slot) { + for (int16 bias_slot = EQEmu::invslot::TRADE_BEGIN; bias_slot <= EQEmu::invslot::TRADE_END; ++bias_slot) { if (bias_slot >= trade_slot) break; @@ -706,7 +706,7 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st } // step 3: process everything else - for (int16 trade_slot = EQEmu::legacy::TRADE_BEGIN; trade_slot <= EQEmu::legacy::TRADE_END; ++trade_slot) { + for (int16 trade_slot = EQEmu::invslot::TRADE_BEGIN; trade_slot <= EQEmu::invslot::TRADE_END; ++trade_slot) { const EQEmu::ItemInstance* inst = m_inv[trade_slot]; if (inst) { @@ -742,7 +742,7 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st qs_audit->char1_count += detail->charges; // 'step 3' should never really see containers..but, just in case... - for (uint8 sub_slot = EQEmu::inventory::containerBegin; (sub_slot < EQEmu::inventory::ContainerCount); ++sub_slot) { // this is to catch ALL items + for (uint8 sub_slot = EQEmu::invbag::SLOT_BEGIN; (sub_slot <= EQEmu::invbag::SLOT_END); ++sub_slot) { // this is to catch ALL items const EQEmu::ItemInstance* bag_inst = inst->GetItem(sub_slot); if (bag_inst) { @@ -819,7 +819,7 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st } if(qs_log) { // This can be incorporated below when revisions are made - for (int16 trade_slot = EQEmu::legacy::TRADE_BEGIN; trade_slot <= EQEmu::legacy::TRADE_NPC_END; ++trade_slot) { + for (int16 trade_slot = EQEmu::invslot::TRADE_BEGIN; trade_slot <= EQEmu::invslot::TRADE_NPC_END; ++trade_slot) { const EQEmu::ItemInstance* trade_inst = m_inv[trade_slot]; if(trade_inst) { @@ -840,7 +840,7 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st qs_audit->char_count += detail->charges; if (trade_inst->IsClassBag()) { - for (uint8 sub_slot = EQEmu::inventory::containerBegin; sub_slot < trade_inst->GetItem()->BagSlots; ++sub_slot) { + for (uint8 sub_slot = EQEmu::invbag::SLOT_BEGIN; sub_slot < trade_inst->GetItem()->BagSlots; ++sub_slot) { const EQEmu::ItemInstance* trade_baginst = trade_inst->GetItem(sub_slot); if(trade_baginst) { @@ -874,7 +874,7 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st std::vector item_list; std::list items; - for (int i = EQEmu::legacy::TRADE_BEGIN; i <= EQEmu::legacy::TRADE_NPC_END; ++i) { + for (int i = EQEmu::invslot::TRADE_BEGIN; i <= EQEmu::invslot::TRADE_NPC_END; ++i) { EQEmu::ItemInstance *inst = m_inv.GetItem(i); if(inst) { items.push_back(inst); @@ -894,7 +894,7 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st (item->NoDrop != 0 || isPetAndCanHaveNoDrop))) { // pets need to look inside bags and try to equip items found there if (item->IsClassBag() && item->BagSlots > 0) { - for (int16 bslot = EQEmu::inventory::containerBegin; bslot < item->BagSlots; bslot++) { + for (int16 bslot = EQEmu::invbag::SLOT_BEGIN; bslot < item->BagSlots; bslot++) { const EQEmu::ItemInstance* baginst = inst->GetItem(bslot); if (baginst) { const EQEmu::ItemData* bagitem = baginst->GetItem(); @@ -951,8 +951,8 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st } EQEmu::ItemInstance *insts[4] = { 0 }; - for (int i = EQEmu::legacy::TRADE_BEGIN; i <= EQEmu::legacy::TRADE_NPC_END; ++i) { - insts[i - EQEmu::legacy::TRADE_BEGIN] = m_inv.PopItem(i); + for (int i = EQEmu::invslot::TRADE_BEGIN; i <= EQEmu::invslot::TRADE_NPC_END; ++i) { + insts[i - EQEmu::invslot::TRADE_BEGIN] = m_inv.PopItem(i); database.SaveInventory(CharacterID(), nullptr, i); } @@ -971,7 +971,7 @@ bool Client::CheckTradeLoreConflict(Client* other) if (!other) return true; - for (int16 index = EQEmu::legacy::TRADE_BEGIN; index <= EQEmu::legacy::TRADE_END; ++index) { + for (int16 index = EQEmu::invslot::TRADE_BEGIN; index <= EQEmu::invslot::TRADE_END; ++index) { const EQEmu::ItemInstance* inst = m_inv[index]; if (!inst || !inst->GetItem()) continue; @@ -980,7 +980,7 @@ bool Client::CheckTradeLoreConflict(Client* other) return true; } - for (int16 index = EQEmu::legacy::TRADE_BAGS_BEGIN; index <= EQEmu::legacy::TRADE_BAGS_END; ++index) { + for (int16 index = EQEmu::invbag::TRADE_BAGS_BEGIN; index <= EQEmu::invbag::TRADE_BAGS_END; ++index) { const EQEmu::ItemInstance* inst = m_inv[index]; if (!inst || !inst->GetItem()) continue; @@ -994,7 +994,7 @@ bool Client::CheckTradeLoreConflict(Client* other) bool Client::CheckTradeNonDroppable() { - for (int16 index = EQEmu::legacy::TRADE_BEGIN; index <= EQEmu::legacy::TRADE_END; ++index){ + for (int16 index = EQEmu::invslot::TRADE_BEGIN; index <= EQEmu::invslot::TRADE_END; ++index){ const EQEmu::ItemInstance* inst = m_inv[index]; if (!inst) continue; @@ -1213,7 +1213,7 @@ void Client::BulkSendTraderInventory(uint32 char_id) { TraderCharges_Struct* TraderItems = database.LoadTraderItemWithCharges(char_id); - for (uint8 i = 0;i < 80; i++) { + for (uint8 i = 0;i < 80; i++) { // need to transition away from 'magic number' if((TraderItems->ItemID[i] == 0) || (TraderItems->ItemCost[i] <= 0)) { continue; } @@ -1249,10 +1249,10 @@ uint32 Client::FindTraderItemSerialNumber(int32 ItemID) { EQEmu::ItemInstance* item = nullptr; uint16 SlotID = 0; - for (int i = EQEmu::legacy::GENERAL_BEGIN; i <= EQEmu::legacy::GENERAL_END; i++){ + for (int i = EQEmu::invslot::GENERAL_BEGIN; i <= EQEmu::invslot::GENERAL_END; i++){ item = this->GetInv().GetItem(i); if (item && item->GetItem()->ID == 17899){ //Traders Satchel - for (int x = EQEmu::inventory::containerBegin; x < EQEmu::inventory::ContainerCount; x++) { + for (int x = EQEmu::invbag::SLOT_BEGIN; x <= EQEmu::invbag::SLOT_END; x++) { // we already have the parent bag and a contents iterator..why not just iterate the bag!?? SlotID = EQEmu::InventoryProfile::CalcSlotId(i, x); item = this->GetInv().GetItem(SlotID); @@ -1272,10 +1272,10 @@ EQEmu::ItemInstance* Client::FindTraderItemBySerialNumber(int32 SerialNumber){ EQEmu::ItemInstance* item = nullptr; uint16 SlotID = 0; - for (int i = EQEmu::legacy::GENERAL_BEGIN; i <= EQEmu::legacy::GENERAL_END; i++){ + for (int i = EQEmu::invslot::GENERAL_BEGIN; i <= EQEmu::invslot::GENERAL_END; i++){ item = this->GetInv().GetItem(i); if(item && item->GetItem()->ID == 17899){ //Traders Satchel - for (int x = EQEmu::inventory::containerBegin; x < EQEmu::inventory::ContainerCount; x++) { + for (int x = EQEmu::invbag::SLOT_BEGIN; x <= EQEmu::invbag::SLOT_END; x++) { // we already have the parent bag and a contents iterator..why not just iterate the bag!?? SlotID = EQEmu::InventoryProfile::CalcSlotId(i, x); item = this->GetInv().GetItem(SlotID); @@ -1303,10 +1303,10 @@ GetItems_Struct* Client::GetTraderItems(){ uint8 ndx = 0; - for (int i = EQEmu::legacy::GENERAL_BEGIN; i <= EQEmu::legacy::GENERAL_END; i++) { + for (int i = EQEmu::invslot::GENERAL_BEGIN; i <= EQEmu::invslot::GENERAL_END; i++) { item = this->GetInv().GetItem(i); if(item && item->GetItem()->ID == 17899){ //Traders Satchel - for (int x = EQEmu::inventory::containerBegin; x < EQEmu::inventory::ContainerCount; x++) { + for (int x = EQEmu::invbag::SLOT_BEGIN; x <= EQEmu::invbag::SLOT_END; x++) { SlotID = EQEmu::InventoryProfile::CalcSlotId(i, x); item = this->GetInv().GetItem(SlotID); @@ -1327,10 +1327,10 @@ uint16 Client::FindTraderItem(int32 SerialNumber, uint16 Quantity){ const EQEmu::ItemInstance* item= nullptr; uint16 SlotID = 0; - for (int i = EQEmu::legacy::GENERAL_BEGIN; i <= EQEmu::legacy::GENERAL_END; i++) { + for (int i = EQEmu::invslot::GENERAL_BEGIN; i <= EQEmu::invslot::GENERAL_END; i++) { item = this->GetInv().GetItem(i); if(item && item->GetItem()->ID == 17899){ //Traders Satchel - for (int x = EQEmu::inventory::containerBegin; x < EQEmu::inventory::ContainerCount; x++){ + for (int x = EQEmu::invbag::SLOT_BEGIN; x <= EQEmu::invbag::SLOT_END; x++){ SlotID = EQEmu::InventoryProfile::CalcSlotId(i, x); item = this->GetInv().GetItem(SlotID); diff --git a/zone/tribute.cpp b/zone/tribute.cpp index 641549cda..ce1eb5f6d 100644 --- a/zone/tribute.cpp +++ b/zone/tribute.cpp @@ -66,7 +66,7 @@ void Client::ToggleTribute(bool enabled) { int r; uint32 cost = 0; uint32 level = GetLevel(); - for (r = 0; r < EQEmu::legacy::TRIBUTE_SIZE; r++) { + for (r = 0; r < EQEmu::invtype::TRIBUTE_SIZE; r++) { uint32 tid = m_pp.tributes[r].tribute; if(tid == TRIBUTE_NONE) continue; @@ -119,7 +119,7 @@ void Client::DoTributeUpdate() { tis->tribute_master_id = tribute_master_id; //Dont know what this is for int r; - for (r = 0; r < EQEmu::legacy::TRIBUTE_SIZE; r++) { + for (r = 0; r < EQEmu::invtype::TRIBUTE_SIZE; r++) { if(m_pp.tributes[r].tribute != TRIBUTE_NONE) { tis->tributes[r] = m_pp.tributes[r].tribute; tis->tiers[r] = m_pp.tributes[r].tier; @@ -134,24 +134,24 @@ void Client::DoTributeUpdate() { if(m_pp.tribute_active) { //send and equip tribute items... - for (r = 0; r < EQEmu::legacy::TRIBUTE_SIZE; r++) { + for (r = 0; r < EQEmu::invtype::TRIBUTE_SIZE; r++) { uint32 tid = m_pp.tributes[r].tribute; if(tid == TRIBUTE_NONE) { - if (m_inv[EQEmu::legacy::TRIBUTE_BEGIN + r]) - DeleteItemInInventory(EQEmu::legacy::TRIBUTE_BEGIN + r, 0, false); + if (m_inv[EQEmu::invslot::TRIBUTE_BEGIN + r]) + DeleteItemInInventory(EQEmu::invslot::TRIBUTE_BEGIN + r, 0, false); continue; } if(tribute_list.count(tid) != 1) { - if (m_inv[EQEmu::legacy::TRIBUTE_BEGIN + r]) - DeleteItemInInventory(EQEmu::legacy::TRIBUTE_BEGIN + r, 0, false); + if (m_inv[EQEmu::invslot::TRIBUTE_BEGIN + r]) + DeleteItemInInventory(EQEmu::invslot::TRIBUTE_BEGIN + r, 0, false); continue; } //sanity check if(m_pp.tributes[r].tier >= MAX_TRIBUTE_TIERS) { - if (m_inv[EQEmu::legacy::TRIBUTE_BEGIN + r]) - DeleteItemInInventory(EQEmu::legacy::TRIBUTE_BEGIN + r, 0, false); + if (m_inv[EQEmu::invslot::TRIBUTE_BEGIN + r]) + DeleteItemInInventory(EQEmu::invslot::TRIBUTE_BEGIN + r, 0, false); m_pp.tributes[r].tier = 0; continue; } @@ -165,15 +165,15 @@ void Client::DoTributeUpdate() { if(inst == nullptr) continue; - PutItemInInventory(EQEmu::legacy::TRIBUTE_BEGIN + r, *inst, false); - SendItemPacket(EQEmu::legacy::TRIBUTE_BEGIN + r, inst, ItemPacketTributeItem); + PutItemInInventory(EQEmu::invslot::TRIBUTE_BEGIN + r, *inst, false); + SendItemPacket(EQEmu::invslot::TRIBUTE_BEGIN + r, inst, ItemPacketTributeItem); safe_delete(inst); } } else { //unequip tribute items... - for (r = 0; r < EQEmu::legacy::TRIBUTE_SIZE; r++) { - if (m_inv[EQEmu::legacy::TRIBUTE_BEGIN + r]) - DeleteItemInInventory(EQEmu::legacy::TRIBUTE_BEGIN + r, 0, false); + for (r = 0; r < EQEmu::invtype::TRIBUTE_SIZE; r++) { + if (m_inv[EQEmu::invslot::TRIBUTE_BEGIN + r]) + DeleteItemInInventory(EQEmu::invslot::TRIBUTE_BEGIN + r, 0, false); } } CalcBonuses(); @@ -192,7 +192,7 @@ void Client::SendTributeTimer() { void Client::ChangeTributeSettings(TributeInfo_Struct *t) { int r; - for (r = 0; r < EQEmu::legacy::TRIBUTE_SIZE; r++) { + for (r = 0; r < EQEmu::invtype::TRIBUTE_SIZE; r++) { m_pp.tributes[r].tribute = TRIBUTE_NONE; diff --git a/zone/tune.cpp b/zone/tune.cpp index 36be51905..c0510f94a 100644 --- a/zone/tune.cpp +++ b/zone/tune.cpp @@ -582,13 +582,13 @@ int32 Client::Tune_GetMeleeMitDmg(Mob* GM, Mob *attacker, int32 damage, int32 mi int32 Client::GetMeleeDamage(Mob* other, bool GetMinDamage) { - int Hand = EQEmu::inventory::slotPrimary; + int Hand = EQEmu::invslot::slotPrimary; if (!other) return 0; EQEmu::ItemInstance* weapon; - weapon = GetInv().GetItem(EQEmu::inventory::slotPrimary); + weapon = GetInv().GetItem(EQEmu::invslot::slotPrimary); if(weapon != nullptr) { if (!weapon->IsWeapon()) { @@ -627,7 +627,7 @@ int32 Client::GetMeleeDamage(Mob* other, bool GetMinDamage) int ucDamageBonus = 0; - if (Hand == EQEmu::inventory::slotPrimary && GetLevel() >= 28 && IsWarriorClass()) + if (Hand == EQEmu::invslot::slotPrimary && GetLevel() >= 28 && IsWarriorClass()) { ucDamageBonus = GetWeaponDamageBonus(weapon ? weapon->GetItem() : (const EQEmu::ItemData*) nullptr); @@ -661,24 +661,24 @@ void Mob::Tune_FindAccuaryByHitChance(Mob* defender, Mob *attacker, float hit_ch if (attacker->IsClient()) {//Will check first equiped weapon for skill. Ie. remove wepaons to assess bow. EQEmu::ItemInstance* weapon; - weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::inventory::slotPrimary); + weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::invslot::slotPrimary); if(weapon && weapon->IsWeapon()){ - skillinuse = attacker->CastToClient()->AttackAnimation(EQEmu::inventory::slotPrimary, weapon); + skillinuse = attacker->CastToClient()->AttackAnimation(EQEmu::invslot::slotPrimary, weapon); } else { - weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::inventory::slotSecondary); + weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::invslot::slotSecondary); if (weapon && weapon->IsWeapon()) - skillinuse = attacker->CastToClient()->AttackAnimation(EQEmu::inventory::slotSecondary, weapon); + skillinuse = attacker->CastToClient()->AttackAnimation(EQEmu::invslot::slotSecondary, weapon); else { - weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::inventory::slotRange); + weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::invslot::slotRange); if (weapon && weapon->IsWeapon()) - skillinuse = attacker->CastToClient()->AttackAnimation(EQEmu::inventory::slotRange, weapon); + skillinuse = attacker->CastToClient()->AttackAnimation(EQEmu::invslot::slotRange, weapon); } } } - tmp_hit_chance = Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::inventory::slotPrimary, 0, 0, 0, avoid_override); + tmp_hit_chance = Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::invslot::slotPrimary, 0, 0, 0, avoid_override); Message(0, "#Tune - Begin Parse [Interval %i Max Loop Iterations %i]", interval, max_loop); @@ -690,7 +690,7 @@ void Mob::Tune_FindAccuaryByHitChance(Mob* defender, Mob *attacker, float hit_ch for (int j=0; j < max_loop; j++) { - tmp_hit_chance = Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::inventory::slotPrimary, 0, false, 0, avoid_override, add_acc); + tmp_hit_chance = Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::invslot::slotPrimary, 0, false, 0, avoid_override, add_acc); if (Msg >= 3) Message(15, "#Tune - Processing... [%i] [ACCURACY %i] Hit Chance %.2f ",j,add_acc,tmp_hit_chance); @@ -705,7 +705,7 @@ void Mob::Tune_FindAccuaryByHitChance(Mob* defender, Mob *attacker, float hit_ch if (end){ - Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::inventory::slotPrimary, 0, Msg, 0, avoid_override);//Display Stat Report + Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::invslot::slotPrimary, 0, Msg, 0, avoid_override);//Display Stat Report Message(0, " "); @@ -741,24 +741,24 @@ void Mob::Tune_FindAvoidanceByHitChance(Mob* defender, Mob *attacker, float hit_ if (attacker->IsClient()) {//Will check first equiped weapon for skill. Ie. remove wepaons to assess bow. EQEmu::ItemInstance* weapon; - weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::inventory::slotPrimary); + weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::invslot::slotPrimary); if(weapon && weapon->IsWeapon()){ - skillinuse = attacker->CastToClient()->AttackAnimation(EQEmu::inventory::slotPrimary, weapon); + skillinuse = attacker->CastToClient()->AttackAnimation(EQEmu::invslot::slotPrimary, weapon); } else { - weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::inventory::slotSecondary); + weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::invslot::slotSecondary); if (weapon && weapon->IsWeapon()) - skillinuse = attacker->CastToClient()->AttackAnimation(EQEmu::inventory::slotSecondary, weapon); + skillinuse = attacker->CastToClient()->AttackAnimation(EQEmu::invslot::slotSecondary, weapon); else { - weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::inventory::slotRange); + weapon = attacker->CastToClient()->GetInv().GetItem(EQEmu::invslot::slotRange); if (weapon && weapon->IsWeapon()) - skillinuse = attacker->CastToClient()->AttackAnimation(EQEmu::inventory::slotRange, weapon); + skillinuse = attacker->CastToClient()->AttackAnimation(EQEmu::invslot::slotRange, weapon); } } } - tmp_hit_chance = Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::inventory::slotPrimary, 0, 0, acc_override, 0); + tmp_hit_chance = Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::invslot::slotPrimary, 0, 0, acc_override, 0); Message(0, "#Tune - Begin Parse [Interval %i Max Loop Iterations %i]", interval, max_loop); Message(0, "#Tune - Processing... Find Avoidance for hit chance on defender of (%.0f) pct from attacker. [Current Hit Chance %.2f]", hit_chance, tmp_hit_chance); @@ -768,7 +768,7 @@ void Mob::Tune_FindAvoidanceByHitChance(Mob* defender, Mob *attacker, float hit_ for (int j=0; j < max_loop; j++) { - tmp_hit_chance = Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::inventory::slotPrimary, 0, 0, acc_override, 0, 0, add_avoid); + tmp_hit_chance = Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::invslot::slotPrimary, 0, 0, acc_override, 0, 0, add_avoid); if (Msg >= 3) Message(0, "#Tune - Processing... [%i] [AVOIDANCE %i] Hit Chance %.2f ",j,add_avoid,tmp_hit_chance); @@ -783,7 +783,7 @@ void Mob::Tune_FindAvoidanceByHitChance(Mob* defender, Mob *attacker, float hit_ if (end){ - Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::inventory::slotPrimary, 0, Msg, acc_override, 0);//Display Stat Report + Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::invslot::slotPrimary, 0, Msg, acc_override, 0);//Display Stat Report Message(0, " "); diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index cef24a649..acb06bf19 100644 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -673,7 +673,7 @@ void ZoneDatabase::LoadWorldContainer(uint32 parentid, EQEmu::ItemInstance* cont uint8 index = (uint8)atoi(row[0]); uint32 item_id = (uint32)atoi(row[1]); int8 charges = (int8)atoi(row[2]); - uint32 aug[EQEmu::inventory::SocketCount]; + uint32 aug[EQEmu::invaug::SOCKET_COUNT]; aug[0] = (uint32)atoi(row[3]); aug[1] = (uint32)atoi(row[4]); aug[2] = (uint32)atoi(row[5]); @@ -683,7 +683,7 @@ void ZoneDatabase::LoadWorldContainer(uint32 parentid, EQEmu::ItemInstance* cont EQEmu::ItemInstance* inst = database.CreateItem(item_id, charges); if (inst && inst->GetItem()->IsClassCommon()) { - for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) + for (int i = EQEmu::invaug::SOCKET_BEGIN; i <= EQEmu::invaug::SOCKET_END; i++) if (aug[i]) inst->PutAugment(&database, i, aug[i]); // Put item inside world container @@ -706,17 +706,17 @@ void ZoneDatabase::SaveWorldContainer(uint32 zone_id, uint32 parent_id, const EQ DeleteWorldContainer(parent_id,zone_id); // Save all 10 items, if they exist - for (uint8 index = EQEmu::inventory::containerBegin; index < EQEmu::inventory::ContainerCount; index++) { + for (uint8 index = EQEmu::invbag::SLOT_BEGIN; index <= EQEmu::invbag::SLOT_END; index++) { EQEmu::ItemInstance* inst = container->GetItem(index); if (!inst) continue; uint32 item_id = inst->GetItem()->ID; - uint32 augslot[EQEmu::inventory::SocketCount] = { 0, 0, 0, 0, 0, 0 }; + uint32 augslot[EQEmu::invaug::SOCKET_COUNT] = { 0, 0, 0, 0, 0, 0 }; if (inst->IsType(EQEmu::item::ItemClassCommon)) { - for (int i = EQEmu::inventory::socketBegin; i < EQEmu::inventory::SocketCount; i++) { + for (int i = EQEmu::invaug::SOCKET_BEGIN; i <= EQEmu::invaug::SOCKET_END; i++) { EQEmu::ItemInstance *auginst=inst->GetAugment(i); augslot[i]=(auginst && auginst->GetItem()) ? auginst->GetItem()->ID : 0; } @@ -1367,11 +1367,11 @@ bool ZoneDatabase::LoadCharacterMaterialColor(uint32 character_id, PlayerProfile bool ZoneDatabase::LoadCharacterBandolier(uint32 character_id, PlayerProfile_Struct* pp) { std::string query = StringFormat("SELECT `bandolier_id`, `bandolier_slot`, `item_id`, `icon`, `bandolier_name` FROM `character_bandolier` WHERE `id` = %u LIMIT %u", - character_id, EQEmu::legacy::BANDOLIERS_SIZE); + character_id, EQEmu::profile::BANDOLIERS_SIZE); auto results = database.QueryDatabase(query); int i = 0; int r = 0; int si = 0; - for (i = 0; i < EQEmu::legacy::BANDOLIERS_SIZE; i++) { + for (i = 0; i < EQEmu::profile::BANDOLIERS_SIZE; i++) { pp->bandoliers[i].Name[0] = '\0'; - for (int si = 0; si < EQEmu::legacy::BANDOLIER_ITEM_COUNT; si++) { + for (int si = 0; si < EQEmu::profile::BANDOLIER_ITEM_COUNT; si++) { pp->bandoliers[i].Items[si].ID = 0; pp->bandoliers[i].Items[si].Icon = 0; pp->bandoliers[i].Items[si].Name[0] = '\0'; @@ -1405,7 +1405,7 @@ bool ZoneDatabase::LoadCharacterTribute(uint32 character_id, PlayerProfile_Struc std::string query = StringFormat("SELECT `tier`, `tribute` FROM `character_tribute` WHERE `id` = %u", character_id); auto results = database.QueryDatabase(query); int i = 0; - for (i = 0; i < EQEmu::legacy::TRIBUTE_SIZE; i++){ + for (i = 0; i < EQEmu::invtype::TRIBUTE_SIZE; i++){ pp->tributes[i].tribute = 0xFFFFFFFF; pp->tributes[i].tier = 0; } @@ -1424,10 +1424,10 @@ bool ZoneDatabase::LoadCharacterPotions(uint32 character_id, PlayerProfile_Struc { std::string query = StringFormat("SELECT `potion_id`, `item_id`, `icon` FROM `character_potionbelt` WHERE `id` = %u LIMIT %u", - character_id, EQEmu::legacy::POTION_BELT_ITEM_COUNT); + character_id, EQEmu::profile::POTION_BELT_SIZE); auto results = database.QueryDatabase(query); int i = 0; - for (i = 0; i < EQEmu::legacy::POTION_BELT_ITEM_COUNT; i++) { + for (i = 0; i < EQEmu::profile::POTION_BELT_SIZE; i++) { pp->potionbelt.Items[i].Icon = 0; pp->potionbelt.Items[i].ID = 0; pp->potionbelt.Items[i].Name[0] = '\0'; @@ -1525,7 +1525,7 @@ bool ZoneDatabase::SaveCharacterTribute(uint32 character_id, PlayerProfile_Struc std::string query = StringFormat("DELETE FROM `character_tribute` WHERE `id` = %u", character_id); QueryDatabase(query); /* Save Tributes only if we have values... */ - for (int i = 0; i < EQEmu::legacy::TRIBUTE_SIZE; i++){ + for (int i = 0; i < EQEmu::invtype::TRIBUTE_SIZE; i++){ if (pp->tributes[i].tribute > 0 && pp->tributes[i].tribute != TRIBUTE_NONE){ std::string query = StringFormat("REPLACE INTO `character_tribute` (id, tier, tribute) VALUES (%u, %u, %u)", character_id, pp->tributes[i].tier, pp->tributes[i].tribute); QueryDatabase(query); @@ -2906,7 +2906,7 @@ void ZoneDatabase::LoadMercEquipment(Merc *merc) { int itemCount = 0; for(auto row = results.begin(); row != results.end(); ++row) { - if (itemCount == EQEmu::legacy::EQUIPMENT_SIZE) + if (itemCount == EQEmu::invslot::EQUIPMENT_COUNT) break; if(atoi(row[0]) == 0) @@ -3456,7 +3456,7 @@ void ZoneDatabase::SavePetInfo(Client *client) query.clear(); // pet inventory! - for (int index = EQEmu::legacy::EQUIPMENT_BEGIN; index <= EQEmu::legacy::EQUIPMENT_END; index++) { + for (int index = EQEmu::invslot::EQUIPMENT_BEGIN; index <= EQEmu::invslot::EQUIPMENT_END; index++) { if (!petinfo->Items[index]) continue; @@ -3588,7 +3588,7 @@ void ZoneDatabase::LoadPetInfo(Client *client) continue; int slot = atoi(row[1]); - if (slot < EQEmu::legacy::EQUIPMENT_BEGIN || slot > EQEmu::legacy::EQUIPMENT_END) + if (slot < EQEmu::invslot::EQUIPMENT_BEGIN || slot > EQEmu::invslot::EQUIPMENT_END) continue; pi->Items[slot] = atoul(row[2]); diff --git a/zone/zonedb.h b/zone/zonedb.h index 20bfd897a..8943f6f01 100644 --- a/zone/zonedb.h +++ b/zone/zonedb.h @@ -148,7 +148,7 @@ struct PetInfo { uint32 Mana; float size; SpellBuff_Struct Buffs[PET_BUFF_COUNT]; - uint32 Items[EQEmu::legacy::EQUIPMENT_SIZE]; + uint32 Items[EQEmu::invslot::EQUIPMENT_COUNT]; char Name[64]; }; From 69f621f3618dfe4bb0fbabd62fd74085e3ba6d02 Mon Sep 17 00:00:00 2001 From: Uleat Date: Thu, 5 Jul 2018 22:40:15 -0400 Subject: [PATCH 271/670] Fix for ISO C++ warning in command_peekinv --- zone/command.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zone/command.cpp b/zone/command.cpp index 4bae60820..3705124fc 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -2534,9 +2534,9 @@ void command_peekinv(Client *c, const Seperator *sep) peekOutOfScope = (peekWorld * 2) // less than }; - static char* scope_prefix[] = { "Equip", "Gen", "Cursor", "Limbo", "Trib", "Bank", "ShBank", "Trade", "World" }; + static const char* scope_prefix[] = { "equip", "gen", "cursor", "limbo", "trib", "bank", "shbank", "trade", "world" }; - static int16 scope_range[][2] = { + static const int16 scope_range[][2] = { { EQEmu::invslot::EQUIPMENT_BEGIN, EQEmu::invslot::EQUIPMENT_END }, { EQEmu::invslot::GENERAL_BEGIN, EQEmu::invslot::GENERAL_END }, { EQEmu::invslot::slotCursor, EQEmu::invslot::slotCursor }, @@ -2548,7 +2548,7 @@ void command_peekinv(Client *c, const Seperator *sep) { EQEmu::invslot::SLOT_BEGIN, (EQEmu::invtype::WORLD_SIZE - 1) } }; - static bool scope_bag[] = { false, true, true, true, false, true, true, true, true }; + static const bool scope_bag[] = { false, true, true, true, false, true, true, true, true }; if (!c) return; From 955b2afb1805588fe9823b274034b3800a40899b Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Fri, 6 Jul 2018 00:59:19 -0400 Subject: [PATCH 272/670] Update GetTaskActivityDoneCountFromTaskID and GetTaskStartTime --- zone/client.h | 2 +- zone/tasks.cpp | 25 +++++++++++++++++++------ zone/tasks.h | 2 +- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/zone/client.h b/zone/client.h index 50282b5c3..660f7e24c 100644 --- a/zone/client.h +++ b/zone/client.h @@ -1036,7 +1036,7 @@ public: inline void CancelAllTasks() { if(taskstate) taskstate->CancelAllTasks(this); } inline int GetActiveTaskCount() { return (taskstate ? taskstate->GetActiveTaskCount() : 0); } inline int GetActiveTaskID(int index) { return (taskstate ? taskstate->GetActiveTaskID(index) : -1); } - inline int GetTaskStartTime(int index) { return (taskstate ? taskstate->GetTaskStartTime(index) : -1); } + inline int GetTaskStartTime(TaskType type, int index) { return (taskstate ? taskstate->GetTaskStartTime(type, index) : -1); } inline bool IsTaskActivityCompleted(TaskType type, int index, int ActivityID) { return (taskstate ? taskstate->IsTaskActivityCompleted(type, index, ActivityID) : false); } inline int GetTaskActivityDoneCount(TaskType type, int ClientTaskIndex, int ActivityID) { return (taskstate ? taskstate->GetTaskActivityDoneCount(type, ClientTaskIndex, ActivityID) :0); } inline int GetTaskActivityDoneCountFromTaskID(int TaskID, int ActivityID) { return (taskstate ? taskstate->GetTaskActivityDoneCountFromTaskID(TaskID, ActivityID) :0); } diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 6dca0c7e9..5c3c245e0 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -2731,7 +2731,7 @@ void TaskManager::SendActiveTasksToClient(Client *c, bool TaskComplete) for (int TaskIndex=0; TaskIndexGetActiveTaskID(TaskIndex); if((TaskID==0) || (Tasks[TaskID] ==0)) continue; - int StartTime = c->GetTaskStartTime(TaskIndex); + int StartTime = c->GetTaskStartTime(Tasks[TaskID]->type, TaskIndex); SendActiveTaskDescription(c, TaskID, state->ActiveQuests[TaskIndex], StartTime, Tasks[TaskID]->Duration, false); Log(Logs::General, Logs::Tasks, "[UPDATE] SendActiveTasksToClient: Task %i, Activities: %i", TaskID, GetActivityCount(TaskID)); @@ -2939,7 +2939,13 @@ int ClientTaskState::GetTaskActivityDoneCount(TaskType type, int index, int Acti } } -int ClientTaskState::GetTaskActivityDoneCountFromTaskID(int TaskID, int ActivityID){ +int ClientTaskState::GetTaskActivityDoneCountFromTaskID(int TaskID, int ActivityID) +{ + if (ActiveTask.TaskID == TaskID) + return ActiveTask.Activity[ActivityID].DoneCount; + + // TODO: shared tasks + int ActiveTaskIndex = -1; for(int i=0; i Date: Sun, 8 Jul 2018 00:29:46 -0400 Subject: [PATCH 273/670] Update more functions --- zone/tasks.cpp | 156 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 103 insertions(+), 53 deletions(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 5c3c245e0..d076a3bb0 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -1889,7 +1889,7 @@ void ClientTaskState::IncrementDoneCount(Client *c, TaskInformation *Task, int T // and by the 'Task Stage Completed' message c->SendTaskActivityComplete(info->TaskID, ActivityID, TaskIndex, Task->type); // Send the updated task/activity list to the client - taskmanager->SendSingleActiveTaskToClient(c, ActiveQuests[TaskIndex], TaskComplete, false); + taskmanager->SendSingleActiveTaskToClient(c, *info, TaskComplete, false); // Inform the client the task has been updated, both by a chat message c->Message(0, "Your task '%s' has been updated.", Task->Title.c_str()); @@ -1934,11 +1934,11 @@ void ClientTaskState::IncrementDoneCount(Client *c, TaskInformation *Task, int T } - } - else + } else { // Send an update packet for this single activity - taskmanager->SendTaskActivityLong(c, ActiveQuests[TaskIndex].TaskID, ActivityID, - TaskIndex, Task->Activity[ActivityID].Optional); + taskmanager->SendTaskActivityLong(c, info->TaskID, ActivityID, TaskIndex, + Task->Activity[ActivityID].Optional); + } } void ClientTaskState::RewardTask(Client *c, TaskInformation *Task) { @@ -2049,6 +2049,9 @@ void ClientTaskState::RewardTask(Client *c, TaskInformation *Task) { bool ClientTaskState::IsTaskActive(int TaskID) { + if (ActiveTask.TaskID == TaskID) + return true; + if (ActiveTaskCount == 0 || TaskID == 0) return false; @@ -2057,9 +2060,6 @@ bool ClientTaskState::IsTaskActive(int TaskID) return true; } - if (ActiveTask.TaskID == TaskID) - return true; - return false; } @@ -2089,116 +2089,166 @@ void ClientTaskState::FailTask(Client *c, int TaskID) } } -// TODO: tasks -bool ClientTaskState::IsTaskActivityActive(int TaskID, int ActivityID) { +// TODO: Shared tasks +bool ClientTaskState::IsTaskActivityActive(int TaskID, int ActivityID) +{ Log(Logs::General, Logs::Tasks, "[UPDATE] ClientTaskState IsTaskActivityActive(%i, %i).", TaskID, ActivityID); // Quick sanity check - if(ActivityID<0) return false; - if(ActiveTaskCount == 0) return false; + if (ActivityID < 0) + return false; + if (ActiveTaskCount == 0 && ActiveTask.TaskID == TASKSLOTEMPTY) + return false; int ActiveTaskIndex = -1; + auto type = TaskType::Task; - for(int i=0; iTasks[ActiveQuests[ActiveTaskIndex].TaskID]; + auto info = GetClientTaskInfo(type, ActiveTaskIndex); + + if (info == nullptr) + return false; + + TaskInformation *Task = taskmanager->Tasks[info->TaskID]; // The task is invalid - if(Task==nullptr) return false; + if (Task == nullptr) + return false; // The ActivityID is out of range - if(ActivityID >= Task->ActivityCount) return false; + if (ActivityID >= Task->ActivityCount) + return false; - Log(Logs::General, Logs::Tasks, "[UPDATE] ClientTaskState IsTaskActivityActive(%i, %i). State is %i ", TaskID, ActivityID, - ActiveQuests[ActiveTaskIndex].Activity[ActivityID].State); - - - return (ActiveQuests[ActiveTaskIndex].Activity[ActivityID].State == ActivityActive); + Log(Logs::General, Logs::Tasks, "[UPDATE] ClientTaskState IsTaskActivityActive(%i, %i). State is %i ", TaskID, + ActivityID, info->Activity[ActivityID].State); + return (info->Activity[ActivityID].State == ActivityActive); } void ClientTaskState::UpdateTaskActivity(Client *c, int TaskID, int ActivityID, int Count, bool ignore_quest_update /*= false*/) { - Log(Logs::General, Logs::Tasks, "[UPDATE] ClientTaskState UpdateTaskActivity(%i, %i, %i).", TaskID, ActivityID, Count); + Log(Logs::General, Logs::Tasks, "[UPDATE] ClientTaskState UpdateTaskActivity(%i, %i, %i).", TaskID, ActivityID, + Count); // Quick sanity check - if((ActivityID<0) || (ActiveTaskCount==0)) return; + if (ActivityID < 0 || (ActiveTaskCount == 0 && ActiveTask.TaskID == TASKSLOTEMPTY)) + return; int ActiveTaskIndex = -1; + auto type = TaskType::Task; - for (int i = 0; i < MAXACTIVEQUESTS; i++) { - if (ActiveQuests[i].TaskID == TaskID) { - ActiveTaskIndex = i; - break; + if (ActiveTask.TaskID == TaskID) + ActiveTaskIndex = 0; + + if (ActiveTaskIndex == -1) { + for (int i = 0; i < MAXACTIVEQUESTS; i++) { + if (ActiveQuests[i].TaskID == TaskID) { + ActiveTaskIndex = i; + type = TaskType::Quest; + break; + } } } // The client does not have this task - if(ActiveTaskIndex == -1) return; + if (ActiveTaskIndex == -1) + return; - TaskInformation* Task = taskmanager->Tasks[ActiveQuests[ActiveTaskIndex].TaskID]; + auto info = GetClientTaskInfo(type, ActiveTaskIndex); + + if (info == nullptr) + return; + + TaskInformation *Task = taskmanager->Tasks[info->TaskID]; // The task is invalid - if(Task==nullptr) return; + if (Task == nullptr) + return; // The ActivityID is out of range - if(ActivityID >= Task->ActivityCount) return; + if (ActivityID >= Task->ActivityCount) + return; // The Activity is not currently active - if(ActiveQuests[ActiveTaskIndex].Activity[ActivityID].State != ActivityActive) return; + if (info->Activity[ActivityID].State != ActivityActive) + return; Log(Logs::General, Logs::Tasks, "[UPDATE] Increment done count on UpdateTaskActivity"); IncrementDoneCount(c, Task, ActiveTaskIndex, ActivityID, Count, ignore_quest_update); - } -void ClientTaskState::ResetTaskActivity(Client *c, int TaskID, int ActivityID) { - +void ClientTaskState::ResetTaskActivity(Client *c, int TaskID, int ActivityID) +{ Log(Logs::General, Logs::Tasks, "[UPDATE] ClientTaskState UpdateTaskActivity(%i, %i, 0).", TaskID, ActivityID); // Quick sanity check - if((ActivityID<0) || (ActiveTaskCount==0)) return; + if (ActivityID < 0 || (ActiveTaskCount == 0 && ActiveTask.TaskID == TASKSLOTEMPTY)) + return; int ActiveTaskIndex = -1; + auto type = TaskType::Task; - for(int i=0; iTasks[ActiveQuests[ActiveTaskIndex].TaskID]; + auto info = GetClientTaskInfo(type, ActiveTaskIndex); + + if (info == nullptr) + return; + + TaskInformation *Task = taskmanager->Tasks[info->TaskID]; // The task is invalid - if(Task==nullptr) return; + if (Task == nullptr) + return; // The ActivityID is out of range - if(ActivityID >= Task->ActivityCount) return; + if (ActivityID >= Task->ActivityCount) + return; // The Activity is not currently active - if(ActiveQuests[ActiveTaskIndex].Activity[ActivityID].State != ActivityActive) return; + if (info->Activity[ActivityID].State != ActivityActive) + return; Log(Logs::General, Logs::Tasks, "[UPDATE] ResetTaskActivityCount"); - ActiveQuests[ActiveTaskIndex].Activity[ActivityID].DoneCount = 0; + info->Activity[ActivityID].DoneCount = 0; - ActiveQuests[ActiveTaskIndex].Activity[ActivityID].Updated=true; + info->Activity[ActivityID].Updated = true; // Send an update packet for this single activity - taskmanager->SendTaskActivityLong(c, ActiveQuests[ActiveTaskIndex].TaskID, ActivityID, - ActiveTaskIndex, Task->Activity[ActivityID].Optional); + taskmanager->SendTaskActivityLong(c, info->TaskID, ActivityID, ActiveTaskIndex, + Task->Activity[ActivityID].Optional); } void ClientTaskState::ShowClientTasks(Client *c) { From 41ab51234964523402fd1ae8b7ec9484a28f4ec5 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sat, 7 Jul 2018 23:59:23 -0500 Subject: [PATCH 274/670] Implemented qglobals replacement and/or alternative called "Data Buckets" see changelog for more details --- changelog.txt | 4 + common/database.cpp | 9 ++ common/database.h | 2 + common/version.h | 2 +- utils/sql/db_update_manifest.txt | 1 + .../git/required/2018_07_07_data_buckets.sql | 8 ++ world/net.cpp | 9 +- zone/CMakeLists.txt | 2 + zone/data_bucket.cpp | 105 ++++++++++++++++++ zone/data_bucket.h | 22 ++++ zone/embparser_api.cpp | 52 +++++++++ zone/lua_general.cpp | 21 ++++ 12 files changed, 234 insertions(+), 3 deletions(-) create mode 100644 utils/sql/git/required/2018_07_07_data_buckets.sql create mode 100644 zone/data_bucket.cpp create mode 100644 zone/data_bucket.h diff --git a/changelog.txt b/changelog.txt index ec97647c4..1217ee9d5 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,9 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 07/07/2018 == +Akkadius: Implemented a much better replacement for qglobals called 'DataBuckets' + - A much more detailed example can be found at: https://github.com/EQEmu/Server/wiki/Data-Buckets + == 07/05/2018 == Uleat: Reintegration of inventory-based EQDictionary references - Standardized 'CONSTANT_DECLARATION' and 'enumerationValue' tokens for most of the affected references diff --git a/common/database.cpp b/common/database.cpp index 94a6a2a32..447037ae7 100644 --- a/common/database.cpp +++ b/common/database.cpp @@ -1752,6 +1752,15 @@ void Database::ClearRaidDetails(uint32 rid) { std::cout << "Unable to clear raid details: " << results.ErrorMessage() << std::endl; } +void Database::PurgeAllDeletedDataBuckets() { + std::string query = StringFormat( + "DELETE FROM `data_buckets` WHERE (`expires` < %lld AND `expires` > 0)", + (long long) std::time(nullptr) + ); + + QueryDatabase(query); +} + // returns 0 on error or no raid for that character, or // the raid id that the character is a member of. uint32 Database::GetRaidID(const char* name) diff --git a/common/database.h b/common/database.h index 6f3fd0642..c6d90e422 100644 --- a/common/database.h +++ b/common/database.h @@ -221,6 +221,8 @@ public: void GetRaidLeadershipInfo(uint32 rid, char* maintank = nullptr, char* assist = nullptr, char* puller = nullptr, char *marknpc = nullptr, RaidLeadershipAA_Struct* RLAA = nullptr); void SetRaidGroupLeaderInfo(uint32 gid, uint32 rid); + void PurgeAllDeletedDataBuckets(); + /* Database Conversions 'database_conversions.cpp' */ bool CheckDatabaseConversions(); diff --git a/common/version.h b/common/version.h index a222c057c..31345e996 100644 --- a/common/version.h +++ b/common/version.h @@ -30,7 +30,7 @@ Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt */ -#define CURRENT_BINARY_DATABASE_VERSION 9122 +#define CURRENT_BINARY_DATABASE_VERSION 9123 #ifdef BOTS #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9019 #else diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index db0a04ca8..c6d5f0333 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -376,6 +376,7 @@ 9120|2018_02_13_Heading.sql|SELECT value FROM variables WHERE varname = 'fixed_heading'|empty| 9121|2018_02_18_bug_reports.sql|SHOW TABLES LIKE 'bug_reports'|empty| 9122|2018_03_07_ucs_command.sql|SELECT * FROM `command_settings` WHERE `command` LIKE 'ucs'|empty| +9123|2018_07_07_data_buckets.sql|SHOW TABLES LIKE 'data_buckets'|empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/utils/sql/git/required/2018_07_07_data_buckets.sql b/utils/sql/git/required/2018_07_07_data_buckets.sql new file mode 100644 index 000000000..d2a842f64 --- /dev/null +++ b/utils/sql/git/required/2018_07_07_data_buckets.sql @@ -0,0 +1,8 @@ +CREATE TABLE `data_buckets` ( + `id` bigint(11) unsigned NOT NULL AUTO_INCREMENT, + `key` varchar(100) DEFAULT NULL, + `value` text, + `expires` int(11) unsigned DEFAULT '0', + PRIMARY KEY (`id`), + KEY `key_index` (`key`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4; \ No newline at end of file diff --git a/world/net.cpp b/world/net.cpp index c9a3f134c..7065ea6c3 100644 --- a/world/net.cpp +++ b/world/net.cpp @@ -85,6 +85,7 @@ union semun { #include "console.h" #include "../common/net/servertalk_server.h" +#include "../zone/data_bucket.h" ClientList client_list; GroupLFPList LFPGroupList; @@ -309,6 +310,9 @@ int main(int argc, char** argv) { } } + Log(Logs::General, Logs::World_Server, "Purging expired data buckets..."); + database.PurgeAllDeletedDataBuckets(); + Log(Logs::General, Logs::World_Server, "Loading zones.."); database.LoadZoneNames(); Log(Logs::General, Logs::World_Server, "Clearing groups.."); @@ -389,6 +393,7 @@ int main(int argc, char** argv) { Log(Logs::General, Logs::World_Server, "Purging expired instances"); database.PurgeExpiredInstances(); + Timer PurgeInstanceTimer(450000); PurgeInstanceTimer.Start(450000); @@ -545,9 +550,9 @@ int main(int argc, char** argv) { client_list.Process(); - if (PurgeInstanceTimer.Check()) - { + if (PurgeInstanceTimer.Check()) { database.PurgeExpiredInstances(); + database.PurgeAllDeletedDataBuckets(); } if (EQTimeTimer.Check()) { diff --git a/zone/CMakeLists.txt b/zone/CMakeLists.txt index b9aa7631e..0414a8d2b 100644 --- a/zone/CMakeLists.txt +++ b/zone/CMakeLists.txt @@ -19,6 +19,7 @@ SET(zone_sources client_process.cpp command.cpp corpse.cpp + data_bucket.cpp doors.cpp effects.cpp embparser.cpp @@ -155,6 +156,7 @@ SET(zone_headers command.h common.h corpse.h + data_bucket.h doors.h embparser.h embperl.h diff --git a/zone/data_bucket.cpp b/zone/data_bucket.cpp new file mode 100644 index 000000000..29ec9e0e7 --- /dev/null +++ b/zone/data_bucket.cpp @@ -0,0 +1,105 @@ +#include "data_bucket.h" +#include +#include "../common/string_util.h" +#include "zonedb.h" +#include + +/** + * Persists data via bucket_name as key + * @param bucket_key + * @param bucket_value + */ +void DataBucket::SetData(std::string bucket_key, std::string bucket_value, uint32 expires_at_unix) { + uint64 bucket_id = DataBucket::DoesBucketExist(bucket_key); + + std::string query; + + if (bucket_id > 0) { + std::string update_expired_time; + if (expires_at_unix > 0) { + update_expired_time = StringFormat(", `expires` = %u ", expires_at_unix); + } + + query = StringFormat( + "UPDATE `data_buckets` SET `value` = '%s' %s WHERE `id` = %i", + EscapeString(bucket_value).c_str(), + EscapeString(update_expired_time).c_str(), + bucket_id + ); + } + else { + query = StringFormat( + "INSERT INTO `data_buckets` (`key`, `value`, `expires`) VALUES ('%s', '%s', '%u')", + EscapeString(bucket_key).c_str(), + EscapeString(bucket_value).c_str(), + expires_at_unix + ); + } + + database.QueryDatabase(query); +} + +/** + * Retrieves data via bucket_name as key + * @param bucket_key + * @return + */ +std::string DataBucket::GetData(std::string bucket_key) { + std::string query = StringFormat( + "SELECT `value` from `data_buckets` WHERE `key` = '%s' AND (`expires` > %lld OR `expires` = 0) LIMIT 1", + bucket_key.c_str(), + (long long) std::time(nullptr) + ); + + auto results = database.QueryDatabase(query); + if (!results.Success()) { + return std::string(); + } + + if (results.RowCount() != 1) + return std::string(); + + auto row = results.begin(); + + return std::string(row[0]); +} + +/** + * Checks for bucket existence by bucket_name key + * @param bucket_key + * @return + */ +uint64 DataBucket::DoesBucketExist(std::string bucket_key) { + std::string query = StringFormat( + "SELECT `id` from `data_buckets` WHERE `key` = '%s' AND (`expires` > %lld OR `expires` = 0) LIMIT 1", + EscapeString(bucket_key).c_str(), + (long long) std::time(nullptr) + ); + + auto results = database.QueryDatabase(query); + if (!results.Success()) { + return 0; + } + + auto row = results.begin(); + if (results.RowCount() != 1) + return 0; + + return std::stoull(row[0]); +} + +/** + * Deletes data bucket by key + * @param bucket_key + * @return + */ +bool DataBucket::DeleteData(std::string bucket_key) { + std::string query = StringFormat( + "DELETE FROM `data_buckets` WHERE `key` = '%s' AND (`expires` > %lld OR `expires` = 0)", + EscapeString(bucket_key).c_str() + ); + + auto results = database.QueryDatabase(query); + + return results.Success(); +} \ No newline at end of file diff --git a/zone/data_bucket.h b/zone/data_bucket.h new file mode 100644 index 000000000..364ff1cc0 --- /dev/null +++ b/zone/data_bucket.h @@ -0,0 +1,22 @@ +// +// Created by Akkadius on 7/7/18. +// + +#ifndef EQEMU_DATABUCKET_H +#define EQEMU_DATABUCKET_H + + +#include +#include "../common/types.h" + +class DataBucket { +public: + static void SetData(std::string bucket_key, std::string bucket_value, uint32 expires_at_unix = 0); + static bool DeleteData(std::string bucket_key); + static std::string GetData(std::string bucket_key); +private: + static uint64 DoesBucketExist(std::string bucket_key); +}; + + +#endif //EQEMU_DATABUCKET_H diff --git a/zone/embparser_api.cpp b/zone/embparser_api.cpp index 04b2882d2..7725ea37a 100644 --- a/zone/embparser_api.cpp +++ b/zone/embparser_api.cpp @@ -31,6 +31,7 @@ #include "queryserv.h" #include "questmgr.h" #include "zone.h" +#include "data_bucket.h" extern Zone *zone; extern QueryServ *QServ; @@ -3501,6 +3502,54 @@ XS(XS__UpdateZoneHeader) { XSRETURN_EMPTY; } +XS(XS__get_data); +XS(XS__get_data) { + dXSARGS; + if (items != 1) + Perl_croak(aTHX_ "Usage: quest::get_data(string bucket_key)"); + + dXSTARG; + std::string key = (std::string) SvPV_nolen(ST(0)); + + sv_setpv(TARG, DataBucket::GetData(key).c_str()); + XSprePUSH; + PUSHTARG; + XSRETURN(1); +} + +XS(XS__set_data); +XS(XS__set_data) { + dXSARGS; + if (items != 2 && items != 3) { + Perl_croak(aTHX_ "Usage: quest::set_data(string key, string value, [uint32 expire_time_unix = 0])"); + } else { + std::string key = (std::string) SvPV_nolen(ST(0)); + std::string value = (std::string) SvPV_nolen(ST(1)); + + uint32 expires_at_unix = 0; + if (items == 3) + expires_at_unix = (uint32) SvIV(ST(2)); + + DataBucket::SetData(key, value, expires_at_unix); + } + XSRETURN_EMPTY; +} + +XS(XS__delete_data); +XS(XS__delete_data) { + dXSARGS; + if (items != 1) + Perl_croak(aTHX_ "Usage: quest::delete_data(string bucket_key)"); + + dXSTARG; + std::string key = (std::string) SvPV_nolen(ST(0)); + + XSprePUSH; + PUSHu((IV) DataBucket::DeleteData(key)); + + XSRETURN(1); +} + /* This is the callback perl will look for to setup the @@ -3548,6 +3597,9 @@ EXTERN_C XS(boot_quest) { newXS(strcpy(buf, "GetTimeSeconds"), XS__GetTimeSeconds, file); newXS(strcpy(buf, "GetZoneID"), XS__GetZoneID, file); newXS(strcpy(buf, "GetZoneLongName"), XS__GetZoneLongName, file); + newXS(strcpy(buf, "get_data"), XS__get_data, file); + newXS(strcpy(buf, "set_data"), XS__set_data, file); + newXS(strcpy(buf, "delete_data"), XS__delete_data, file); newXS(strcpy(buf, "IsBeneficialSpell"), XS__IsBeneficialSpell, file); newXS(strcpy(buf, "IsEffectInSpell"), XS__IsEffectInSpell, file); newXS(strcpy(buf, "IsRunning"), XS__IsRunning, file); diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp index 7f59bc918..b7a075c17 100644 --- a/zone/lua_general.cpp +++ b/zone/lua_general.cpp @@ -22,6 +22,7 @@ #include "qglobals.h" #include "encounter.h" #include "lua_encounter.h" +#include "data_bucket.h" struct Events { }; struct Factions { }; @@ -817,6 +818,22 @@ std::string lua_say_link(const char *phrase) { return std::string(text); } +std::string lua_get_data(std::string bucket_key) { + return DataBucket::GetData(bucket_key); +} + +void lua_set_data(std::string bucket_key, std::string bucket_value) { + DataBucket::SetData(bucket_key, bucket_value); +} + +void lua_set_data(std::string bucket_key, std::string bucket_value, uint32 expires_at_unix) { + DataBucket::SetData(bucket_key, bucket_value, expires_at_unix); +} + +bool lua_delete_data(std::string bucket_key) { + return DataBucket::DeleteData(bucket_key); +} + const char *lua_get_guild_name_by_id(uint32 guild_id) { return quest_manager.getguildnamebyid(guild_id); } @@ -1658,6 +1675,10 @@ luabind::scope lua_register_general() { luabind::def("say_link", (std::string(*)(const char*,bool,const char*))&lua_say_link), luabind::def("say_link", (std::string(*)(const char*,bool))&lua_say_link), luabind::def("say_link", (std::string(*)(const char*))&lua_say_link), + luabind::def("get_data", (std::string(*)(std::string))&lua_get_data), + luabind::def("set_data", (void(*)(std::string, std::string))&lua_set_data), + luabind::def("set_data", (void(*)(std::string, std::string, uint32))&lua_set_data), + luabind::def("delete_data", (bool(*)(std::string))&lua_delete_data), luabind::def("get_guild_name_by_id", &lua_get_guild_name_by_id), luabind::def("create_instance", &lua_create_instance), luabind::def("destroy_instance", &lua_destroy_instance), From 5060de9b58fa104611b3629e375c2f3d2fb6721d Mon Sep 17 00:00:00 2001 From: KimLS Date: Sat, 7 Jul 2018 22:19:24 -0700 Subject: [PATCH 275/670] Keep alive implemented for world->zone --- world/zonelist.cpp | 10 +++++++++- world/zonelist.h | 2 ++ world/zoneserver.cpp | 7 +++++++ world/zoneserver.h | 1 + 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/world/zonelist.cpp b/world/zonelist.cpp index d86f727f6..db831e941 100644 --- a/world/zonelist.cpp +++ b/world/zonelist.cpp @@ -43,6 +43,7 @@ ZSList::ZSList() memset(pLockedZones, 0, sizeof(pLockedZones)); m_tick.reset(new EQ::Timer(5000, true, std::bind(&ZSList::OnTick, this, std::placeholders::_1))); + m_keepalive.reset(new EQ::Timer(2500, true, std::bind(&ZSList::OnKeepAlive, this, std::placeholders::_1))); } ZSList::~ZSList() { @@ -745,4 +746,11 @@ void ZSList::OnTick(EQ::Timer *t) } web_interface.SendEvent(out); -} \ No newline at end of file +} + +void ZSList::OnKeepAlive(EQ::Timer *t) +{ + for (auto &zone : list) { + zone->SendKeepAlive(); + } +} diff --git a/world/zonelist.h b/world/zonelist.h index 9911b87e0..c63e1686b 100644 --- a/world/zonelist.h +++ b/world/zonelist.h @@ -63,6 +63,7 @@ public: private: void OnTick(EQ::Timer *t); + void OnKeepAlive(EQ::Timer *t); uint32 NextID; std::list> list; uint16 pLockedZones[MaxLockedZones]; @@ -70,6 +71,7 @@ private: uint16 LastAllocatedPort; std::unique_ptr m_tick; + std::unique_ptr m_keepalive; }; #endif /*ZONELIST_H_*/ diff --git a/world/zoneserver.cpp b/world/zoneserver.cpp index e685b280e..263aeee2f 100644 --- a/world/zoneserver.cpp +++ b/world/zoneserver.cpp @@ -1400,6 +1400,13 @@ void ZoneServer::SendGroupIDs() { delete pack; } + +void ZoneServer::SendKeepAlive() +{ + ServerPacket pack(ServerOP_KeepAlive, 0); + SendPacket(&pack); +} + void ZoneServer::ChangeWID(uint32 iCharID, uint32 iWID) { auto pack = new ServerPacket(ServerOP_ChangeWID, sizeof(ServerChangeWID_Struct)); ServerChangeWID_Struct* scw = (ServerChangeWID_Struct*)pack->pBuffer; diff --git a/world/zoneserver.h b/world/zoneserver.h index 1f9e9516c..f5d7296df 100644 --- a/world/zoneserver.h +++ b/world/zoneserver.h @@ -39,6 +39,7 @@ public: void SendPacket(ServerPacket* pack) { tcpc->SendPacket(pack); } void SendEmoteMessage(const char* to, uint32 to_guilddbid, int16 to_minstatus, uint32 type, const char* message, ...); void SendEmoteMessageRaw(const char* to, uint32 to_guilddbid, int16 to_minstatus, uint32 type, const char* message); + void SendKeepAlive(); bool SetZone(uint32 iZoneID, uint32 iInstanceID = 0, bool iStaticZone = false); void TriggerBootup(uint32 iZoneID = 0, uint32 iInstanceID = 0, const char* iAdminName = 0, bool iMakeStatic = false); void Disconnect() { auto handle = tcpc->Handle(); if (handle) { handle->Disconnect(); } } From b59a41829b9ad79ab5ef02a267213eecf19a0dcf Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 8 Jul 2018 16:36:00 -0400 Subject: [PATCH 276/670] Fix more functions --- zone/tasks.cpp | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index d076a3bb0..125b58f20 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -2271,27 +2271,48 @@ void ClientTaskState::ShowClientTasks(Client *c) { } -int ClientTaskState::TaskTimeLeft(int TaskID) { +// TODO: Shared Task +int ClientTaskState::TaskTimeLeft(int TaskID) +{ + if (ActiveTask.TaskID == TaskID) { + int Now = time(nullptr); - if(ActiveTaskCount == 0) return -1; + TaskInformation *Task = taskmanager->Tasks[TaskID]; - for(int i=0; iDuration) + return -1; + + int TimeLeft = (ActiveTask.AcceptedTime + Task->Duration - Now); + + return (TimeLeft > 0 ? TimeLeft : 0); + } + + if (ActiveTaskCount == 0) + return -1; + + for (int i = 0; i < MAXACTIVEQUESTS; i++) { + + if (ActiveQuests[i].TaskID != TaskID) + continue; int Now = time(nullptr); - TaskInformation* Task = taskmanager->Tasks[ActiveQuests[i].TaskID]; + TaskInformation *Task = taskmanager->Tasks[ActiveQuests[i].TaskID]; - if(Task == nullptr) return -1; + if (Task == nullptr) + return -1; - if(!Task->Duration) return -1; + if (!Task->Duration) + return -1; int TimeLeft = (ActiveQuests[i].AcceptedTime + Task->Duration - Now); // If Timeleft is negative, return 0, else return the number of seconds left - return (TimeLeft>0 ? TimeLeft : 0); + return (TimeLeft > 0 ? TimeLeft : 0); } return -1; @@ -2348,7 +2369,7 @@ bool ClientTaskState::TaskOutOfTime(TaskType type, int Index) void ClientTaskState::TaskPeriodicChecks(Client *c) { - if (ActiveTask.TaskID == TASKSLOTEMPTY) { + if (ActiveTask.TaskID != TASKSLOTEMPTY) { if (TaskOutOfTime(TaskType::Task, 0)) { // Send Red Task Failed Message c->SendTaskFailed(ActiveTask.TaskID, 0, TaskType::Task); From 9b229779db7da73bfc37ba8169882cd66d599ebb Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 8 Jul 2018 16:55:08 -0400 Subject: [PATCH 277/670] Bunch more functions --- zone/tasks.cpp | 89 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 53 insertions(+), 36 deletions(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 125b58f20..91d91cff1 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -2480,10 +2480,10 @@ void ClientTaskState::SendTaskHistory(Client *c, int TaskIndex) { if(CompletedTasks[AdjustedTaskIndex].ActivityDone[i]) { CompletedActivityCount++; PacketLength = PacketLength + sizeof(TaskHistoryReplyData1_Struct) + - Task->Activity[i].Text1.size() + 1 + - Task->Activity[i].Text2.size() + 1 + + Task->Activity[i].target_name.size() + 1 + + Task->Activity[i].item_list.size() + 1 + sizeof(TaskHistoryReplyData2_Struct) + - Task->Activity[i].Text3.size() + 1; + Task->Activity[i].desc_override.size() + 1; } } @@ -2503,8 +2503,8 @@ void ClientTaskState::SendTaskHistory(Client *c, int TaskIndex) { thd1 = (TaskHistoryReplyData1_Struct*)Ptr; thd1->ActivityType = Task->Activity[i].Type; Ptr = (char *)thd1 + sizeof(TaskHistoryReplyData1_Struct); - VARSTRUCT_ENCODE_STRING(Ptr, Task->Activity[i].Text1.c_str()); - VARSTRUCT_ENCODE_STRING(Ptr, Task->Activity[i].Text2.c_str()); + VARSTRUCT_ENCODE_STRING(Ptr, Task->Activity[i].target_name.c_str()); + VARSTRUCT_ENCODE_STRING(Ptr, Task->Activity[i].item_list.c_str()); thd2 = (TaskHistoryReplyData2_Struct*)Ptr; thd2->GoalCount = Task->Activity[i].GoalCount; thd2->unknown04 = 0xffffffff; @@ -2512,7 +2512,7 @@ void ClientTaskState::SendTaskHistory(Client *c, int TaskIndex) { thd2->ZoneID = Task->Activity[i].ZoneID; thd2->unknown16 = 0x00000000; Ptr = (char *)thd2 + sizeof(TaskHistoryReplyData2_Struct); - VARSTRUCT_ENCODE_STRING(Ptr, Task->Activity[i].Text3.c_str()); + VARSTRUCT_ENCODE_STRING(Ptr, Task->Activity[i].desc_override.c_str()); } } @@ -2799,34 +2799,35 @@ void TaskManager::SendActiveTasksToClient(Client *c, bool TaskComplete) if (!state) return; - for (int TaskIndex=0; TaskIndexGetActiveTaskID(TaskIndex); - if((TaskID==0) || (Tasks[TaskID] ==0)) continue; - int StartTime = c->GetTaskStartTime(Tasks[TaskID]->type, TaskIndex); + for (int TaskIndex = 0; TaskIndex < MAXACTIVEQUESTS + 1; TaskIndex++) { + int TaskID = state->ActiveTasks[TaskIndex].TaskID; + if ((TaskID == 0) || (Tasks[TaskID] == 0)) + continue; + int StartTime = state->ActiveTasks[TaskIndex].AcceptedTime; - SendActiveTaskDescription(c, TaskID, state->ActiveQuests[TaskIndex], StartTime, Tasks[TaskID]->Duration, false); - Log(Logs::General, Logs::Tasks, "[UPDATE] SendActiveTasksToClient: Task %i, Activities: %i", TaskID, GetActivityCount(TaskID)); + SendActiveTaskDescription(c, TaskID, state->ActiveTasks[TaskIndex], StartTime, Tasks[TaskID]->Duration, + false); + Log(Logs::General, Logs::Tasks, "[UPDATE] SendActiveTasksToClient: Task %i, Activities: %i", TaskID, + GetActivityCount(TaskID)); int Sequence = 0; - for(int Activity=0; ActivityGetTaskActivityState(Tasks[TaskID]->type, TaskIndex, Activity) != ActivityHidden) { - Log(Logs::General, Logs::Tasks, "[UPDATE] Long: %i, %i, %i Complete=%i", TaskID, Activity, TaskIndex, TaskComplete); - if(Activity==GetActivityCount(TaskID)-1) + for (int Activity = 0; Activity < GetActivityCount(TaskID); Activity++) { + if (c->GetTaskActivityState(Tasks[TaskID]->type, TaskIndex, Activity) != ActivityHidden) { + Log(Logs::General, Logs::Tasks, "[UPDATE] Long: %i, %i, %i Complete=%i", TaskID, + Activity, TaskIndex, TaskComplete); + if (Activity == GetActivityCount(TaskID) - 1) SendTaskActivityLong(c, TaskID, Activity, TaskIndex, - Tasks[TaskID]->Activity[Activity].Optional, - TaskComplete); + Tasks[TaskID]->Activity[Activity].Optional, TaskComplete); else SendTaskActivityLong(c, TaskID, Activity, TaskIndex, - Tasks[TaskID]->Activity[Activity].Optional, 0); - } - else { - Log(Logs::General, Logs::Tasks, "[UPDATE] Short: %i, %i, %i", TaskID, Activity, TaskIndex); + Tasks[TaskID]->Activity[Activity].Optional, 0); + } else { + Log(Logs::General, Logs::Tasks, "[UPDATE] Short: %i, %i, %i", TaskID, Activity, + TaskIndex); SendTaskActivityShort(c, TaskID, Activity, TaskIndex); } Sequence++; } - - } } @@ -3087,22 +3088,39 @@ void ClientTaskState::CancelTask(Client *c, int SequenceNumber, TaskType type, b void ClientTaskState::RemoveTask(Client *c, int sequenceNumber, TaskType type) { int characterID = c->CharacterID(); - Log(Logs::General, Logs::Tasks, "[UPDATE] ClientTaskState Cancel Task %i ", sequenceNumber); + Log(Logs::General, Logs::Tasks, "[UPDATE] ClientTaskState Cancel Task %i ", sequenceNumber); - std::string query = StringFormat("DELETE FROM character_activities WHERE charid=%i AND taskid = %i", - characterID, ActiveQuests[sequenceNumber].TaskID); - auto results = database.QueryDatabase(query); - if(!results.Success()) { - Log(Logs::General, Logs::Error, "[TASKS] Error in CientTaskState::CancelTask %s", results.ErrorMessage().c_str()); + int task_id = -1; + switch (type) { + case TaskType::Task: + if (sequenceNumber == 0) + task_id = ActiveTask.TaskID; + break; + case TaskType::Quest: + if (sequenceNumber < MAXACTIVEQUESTS) + task_id = ActiveQuests[sequenceNumber].TaskID; + break; + case TaskType::Shared: // TODO: + default: + break; + } + + std::string query = StringFormat("DELETE FROM character_activities WHERE charid=%i AND taskid = %i", + characterID, task_id); + auto results = database.QueryDatabase(query); + if (!results.Success()) { + Log(Logs::General, Logs::Error, "[TASKS] Error in CientTaskState::CancelTask %s", + results.ErrorMessage().c_str()); return; } - Log(Logs::General, Logs::Tasks, "[UPDATE] CancelTask: %s", query.c_str()); + Log(Logs::General, Logs::Tasks, "[UPDATE] CancelTask: %s", query.c_str()); - query = StringFormat("DELETE FROM character_tasks WHERE charid=%i AND taskid = %i AND type=%i", - characterID, ActiveQuests[sequenceNumber].TaskID, static_cast(type)); + query = StringFormat("DELETE FROM character_tasks WHERE charid=%i AND taskid = %i AND type=%i", characterID, + task_id, static_cast(type)); results = database.QueryDatabase(query); - if(!results.Success()) - Log(Logs::General, Logs::Error, "[TASKS] Error in CientTaskState::CancelTask %s", results.ErrorMessage().c_str()); + if (!results.Success()) + Log(Logs::General, Logs::Error, "[TASKS] Error in CientTaskState::CancelTask %s", + results.ErrorMessage().c_str()); Log(Logs::General, Logs::Tasks, "[UPDATE] CancelTask: %s", query.c_str()); @@ -3121,7 +3139,6 @@ void ClientTaskState::RemoveTask(Client *c, int sequenceNumber, TaskType type) } } - void ClientTaskState::AcceptNewTask(Client *c, int TaskID, int NPCID, bool enforce_level_requirement) { if (!taskmanager || TaskID < 0 || TaskID >= MAXTASKS) { From 7e0c4eb93f72a8bbd470a11c26671dcc1f69d701 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 8 Jul 2018 17:35:37 -0400 Subject: [PATCH 278/670] Reformat save/load since they were lacking tabs --- zone/tasks.cpp | 525 ++++++++++++++++++++++++++----------------------- 1 file changed, 279 insertions(+), 246 deletions(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 91d91cff1..936374b76 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -278,140 +278,147 @@ bool TaskManager::LoadTasks(int singleTask) return true; } -bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) { - - // I am saving the slot in the ActiveTasks table, because unless a Task is cancelled/completed, the client doesn't - // seem to like tasks moving slots between zoning and you can end up with 'bogus' activities if the task previously - // in that slot had more activities than the one now occupying it. Hopefully retaining the slot number for the - // duration of a session will overcome this. - // - if(!c || !state) - return false; +bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) +{ + // I am saving the slot in the ActiveTasks table, because unless a Task is cancelled/completed, the client + // doesn't seem to like tasks moving slots between zoning and you can end up with 'bogus' activities if the task + // previously in that slot had more activities than the one now occupying it. Hopefully retaining the slot + // number for the duration of a session will overcome this. + if (!c || !state) + return false; const char *ERR_MYSQLERROR = "[TASKS]Error in TaskManager::SaveClientState %s"; int characterID = c->CharacterID(); - Log(Logs::Detail, Logs::Tasks,"TaskManager::SaveClientState for character ID %d", characterID); + Log(Logs::Detail, Logs::Tasks, "TaskManager::SaveClientState for character ID %d", characterID); - if(state->ActiveTaskCount > 0) { // TODO: tasks - for(int task=0; taskActiveTaskCount > 0) { // TODO: tasks + for (int task = 0; task < MAXACTIVEQUESTS; task++) { int taskID = state->ActiveQuests[task].TaskID; - if(taskID==TASKSLOTEMPTY) - continue; + if (taskID == TASKSLOTEMPTY) + continue; - if(state->ActiveQuests[task].Updated) { + if (state->ActiveQuests[task].Updated) { - Log(Logs::General, Logs::Tasks, "[CLIENTSAVE] TaskManager::SaveClientState for character ID %d, Updating TaskIndex %i TaskID %i", characterID, task, taskID); + Log(Logs::General, Logs::Tasks, + "[CLIENTSAVE] TaskManager::SaveClientState for character ID %d, Updating TaskIndex " + "%i TaskID %i", + characterID, task, taskID); - std::string query = StringFormat("REPLACE INTO character_tasks (charid, taskid, slot, type, acceptedtime) " - "VALUES (%i, %i, %i, %i, %i)", - characterID, taskID, task, static_cast(Tasks[taskID]->type), state->ActiveQuests[task].AcceptedTime); - auto results = database.QueryDatabase(query); + std::string query = StringFormat( + "REPLACE INTO character_tasks (charid, taskid, slot, type, acceptedtime) " + "VALUES (%i, %i, %i, %i, %i)", + characterID, taskID, task, static_cast(Tasks[taskID]->type), + state->ActiveQuests[task].AcceptedTime); + auto results = database.QueryDatabase(query); if (!results.Success()) { Log(Logs::General, Logs::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str()); - } - else { + } else { state->ActiveQuests[task].Updated = false; } - } - std::string query = "REPLACE INTO character_activities (charid, taskid, activityid, donecount, completed) " - "VALUES "; + std::string query = + "REPLACE INTO character_activities (charid, taskid, activityid, donecount, completed) " + "VALUES "; - int updatedActivityCount = 0; - for(int activityIndex = 0; activityIndexActivityCount; ++activityIndex) { + int updatedActivityCount = 0; + for (int activityIndex = 0; activityIndex < Tasks[taskID]->ActivityCount; ++activityIndex) { - if(!state->ActiveQuests[task].Activity[activityIndex].Updated) - continue; + if (!state->ActiveQuests[task].Activity[activityIndex].Updated) + continue; - Log(Logs::General, Logs::Tasks, "[CLIENTSAVE] TaskManager::SaveClientSate for character ID %d, Updating Activity %i, %i", - characterID, task, activityIndex); + Log(Logs::General, Logs::Tasks, + "[CLIENTSAVE] TaskManager::SaveClientSate for character ID %d, Updating Activity " + "%i, %i", + characterID, task, activityIndex); - if(updatedActivityCount==0) - query += StringFormat("(%i, %i, %i, %i, %i)", - characterID, taskID, activityIndex, - state->ActiveQuests[task].Activity[activityIndex].DoneCount, - state->ActiveQuests[task].Activity[activityIndex].State == ActivityCompleted); - else - query += StringFormat(", (%i, %i, %i, %i, %i)", - characterID, taskID, activityIndex, - state->ActiveQuests[task].Activity[activityIndex].DoneCount, - state->ActiveQuests[task].Activity[activityIndex].State == ActivityCompleted); + if (updatedActivityCount == 0) + query += + StringFormat("(%i, %i, %i, %i, %i)", characterID, taskID, activityIndex, + state->ActiveQuests[task].Activity[activityIndex].DoneCount, + state->ActiveQuests[task].Activity[activityIndex].State == + ActivityCompleted); + else + query += + StringFormat(", (%i, %i, %i, %i, %i)", characterID, taskID, activityIndex, + state->ActiveQuests[task].Activity[activityIndex].DoneCount, + state->ActiveQuests[task].Activity[activityIndex].State == + ActivityCompleted); - updatedActivityCount++; + updatedActivityCount++; } - if(updatedActivityCount == 0) - continue; + if (updatedActivityCount == 0) + continue; - Log(Logs::General, Logs::Tasks, "[CLIENTSAVE] Executing query %s", query.c_str()); - auto results = database.QueryDatabase(query); + Log(Logs::General, Logs::Tasks, "[CLIENTSAVE] Executing query %s", query.c_str()); + auto results = database.QueryDatabase(query); - if(!results.Success()) { - Log(Logs::General, Logs::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str()); - continue; - } - - state->ActiveQuests[task].Updated=false; - for(int activityIndex=0; activityIndexActivityCount; ++activityIndex) - state->ActiveQuests[task].Activity[activityIndex].Updated=false; + if (!results.Success()) { + Log(Logs::General, Logs::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str()); + continue; + } + state->ActiveQuests[task].Updated = false; + for (int activityIndex = 0; activityIndex < Tasks[taskID]->ActivityCount; ++activityIndex) + state->ActiveQuests[task].Activity[activityIndex].Updated = false; } } - if(!RuleB(TaskSystem, RecordCompletedTasks) || (state->CompletedTasks.size() <= (unsigned int)state->LastCompletedTaskLoaded)) { - state->LastCompletedTaskLoaded = state->CompletedTasks.size(); - return true; - } + if (!RuleB(TaskSystem, RecordCompletedTasks) || + (state->CompletedTasks.size() <= (unsigned int)state->LastCompletedTaskLoaded)) { + state->LastCompletedTaskLoaded = state->CompletedTasks.size(); + return true; + } - const char* completedTaskQuery = "REPLACE INTO completed_tasks (charid, completedtime, taskid, activityid) " - "VALUES (%i, %i, %i, %i)"; + const char *completedTaskQuery = "REPLACE INTO completed_tasks (charid, completedtime, taskid, activityid) " + "VALUES (%i, %i, %i, %i)"; - for(unsigned int i=state->LastCompletedTaskLoaded; iCompletedTasks.size(); i++) { + for (unsigned int i = state->LastCompletedTaskLoaded; i < state->CompletedTasks.size(); i++) { - Log(Logs::General, Logs::Tasks, "[CLIENTSAVE] TaskManager::SaveClientState Saving Completed Task at slot %i", i); - int taskID = state->CompletedTasks[i].TaskID; + Log(Logs::General, Logs::Tasks, + "[CLIENTSAVE] TaskManager::SaveClientState Saving Completed Task at slot %i", i); + int taskID = state->CompletedTasks[i].TaskID; - if((taskID <= 0) || (taskID >= MAXTASKS) || (Tasks[taskID] == nullptr)) - continue; + if ((taskID <= 0) || (taskID >= MAXTASKS) || (Tasks[taskID] == nullptr)) + continue; - // First we save a record with an ActivityID of -1. - // This indicates this task was completed at the given time. We infer that all - // none optional activities were completed. - // - std::string query = StringFormat(completedTaskQuery, characterID, state->CompletedTasks[i].CompletedTime, taskID, -1); - auto results = database.QueryDatabase(query); - if(!results.Success()) { - Log(Logs::General, Logs::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str()); - continue; - } + // First we save a record with an ActivityID of -1. + // This indicates this task was completed at the given time. We infer that all + // none optional activities were completed. + // + std::string query = + StringFormat(completedTaskQuery, characterID, state->CompletedTasks[i].CompletedTime, taskID, -1); + auto results = database.QueryDatabase(query); + if (!results.Success()) { + Log(Logs::General, Logs::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str()); + continue; + } - // If the Rule to record non-optional task completion is not enabled, don't save it - if(!RuleB(TaskSystem, RecordCompletedOptionalActivities)) - continue; + // If the Rule to record non-optional task completion is not enabled, don't save it + if (!RuleB(TaskSystem, RecordCompletedOptionalActivities)) + continue; - // Insert one record for each completed optional task. + // Insert one record for each completed optional task. - for(int j=0; jActivityCount; j++) { - if(!Tasks[taskID]->Activity[j].Optional || !state->CompletedTasks[i].ActivityDone[j]) - continue; + for (int j = 0; j < Tasks[taskID]->ActivityCount; j++) { + if (!Tasks[taskID]->Activity[j].Optional || !state->CompletedTasks[i].ActivityDone[j]) + continue; - query = StringFormat(completedTaskQuery, characterID, state->CompletedTasks[i].CompletedTime, taskID, j); - results = database.QueryDatabase(query); - if(!results.Success()) - Log(Logs::General, Logs::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str()); + query = StringFormat(completedTaskQuery, characterID, state->CompletedTasks[i].CompletedTime, + taskID, j); + results = database.QueryDatabase(query); + if (!results.Success()) + Log(Logs::General, Logs::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str()); + } + } - } - - } - - state->LastCompletedTaskLoaded = state->CompletedTasks.size(); + state->LastCompletedTaskLoaded = state->CompletedTasks.size(); return true; } - void Client::LoadClientTaskState() { if(RuleB(TaskSystem, EnableTaskSystem) && taskmanager) { @@ -438,10 +445,10 @@ void Client::RemoveClientTaskState() { } } -bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) { - - if(!c || !state) - return false; +bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) +{ + if (!c || !state) + return false; int characterID = c->CharacterID(); @@ -449,182 +456,202 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) { Log(Logs::General, Logs::Tasks, "[CLIENTLOAD] TaskManager::LoadClientState for character ID %d", characterID); - std::string query = StringFormat("SELECT `taskid`, `slot`, `acceptedtime` " - "FROM `character_tasks` " - "WHERE `charid` = %i ORDER BY acceptedtime", characterID); - auto results = database.QueryDatabase(query); - if (!results.Success()) { - Log(Logs::General, Logs::Error, "[TASKS]Error in TaskManager::LoadClientState load Tasks: %s", results.ErrorMessage().c_str()); + std::string query = StringFormat("SELECT `taskid`, `slot`, `acceptedtime` " + "FROM `character_tasks` " + "WHERE `charid` = %i ORDER BY acceptedtime", + characterID); + auto results = database.QueryDatabase(query); + if (!results.Success()) { + Log(Logs::General, Logs::Error, "[TASKS]Error in TaskManager::LoadClientState load Tasks: %s", + results.ErrorMessage().c_str()); return false; - } + } - for(auto row = results.begin(); row != results.end(); ++row) { - int taskID = atoi(row[0]); - int slot = atoi(row[1]); + for (auto row = results.begin(); row != results.end(); ++row) { + int taskID = atoi(row[0]); + int slot = atoi(row[1]); - if((taskID<0) || (taskID>=MAXTASKS)) { - Log(Logs::General, Logs::Error, "[TASKS]Task ID %i out of range while loading character tasks from database", taskID); - continue; - } + if ((taskID < 0) || (taskID >= MAXTASKS)) { + Log(Logs::General, Logs::Error, + "[TASKS]Task ID %i out of range while loading character tasks from database", taskID); + continue; + } - if((slot<0) || (slot>=MAXACTIVEQUESTS)) { - Log(Logs::General, Logs::Error, "[TASKS] Slot %i out of range while loading character tasks from database", slot); - continue; - } + if ((slot < 0) || (slot >= MAXACTIVEQUESTS)) { + Log(Logs::General, Logs::Error, + "[TASKS] Slot %i out of range while loading character tasks from database", slot); + continue; + } - if(state->ActiveQuests[slot].TaskID != TASKSLOTEMPTY) { - Log(Logs::General, Logs::Error, "[TASKS] Slot %i for Task %is is already occupied.", slot, taskID); - continue; - } + if (state->ActiveQuests[slot].TaskID != TASKSLOTEMPTY) { + Log(Logs::General, Logs::Error, "[TASKS] Slot %i for Task %is is already occupied.", slot, + taskID); + continue; + } - int acceptedtime = atoi(row[2]); + int acceptedtime = atoi(row[2]); - state->ActiveQuests[slot].TaskID = taskID; - state->ActiveQuests[slot].CurrentStep = -1; - state->ActiveQuests[slot].AcceptedTime = acceptedtime; - state->ActiveQuests[slot].Updated = false; + state->ActiveQuests[slot].TaskID = taskID; + state->ActiveQuests[slot].CurrentStep = -1; + state->ActiveQuests[slot].AcceptedTime = acceptedtime; + state->ActiveQuests[slot].Updated = false; - for(int i=0; iActiveQuests[slot].Activity[i].ActivityID = -1; + for (int i = 0; i < MAXACTIVITIESPERTASK; i++) + state->ActiveQuests[slot].Activity[i].ActivityID = -1; - ++state->ActiveTaskCount; + ++state->ActiveTaskCount; - Log(Logs::General, Logs::Tasks, "[CLIENTLOAD] TaskManager::LoadClientState. Char: %i Task ID %i, Accepted Time: %8X", characterID, taskID, acceptedtime); + Log(Logs::General, Logs::Tasks, + "[CLIENTLOAD] TaskManager::LoadClientState. Char: %i Task ID %i, Accepted Time: %8X", characterID, + taskID, acceptedtime); } // Load Activities - Log(Logs::General, Logs::Tasks, "[CLIENTLOAD] LoadClientState. Loading activities for character ID %d", characterID); + Log(Logs::General, Logs::Tasks, "[CLIENTLOAD] LoadClientState. Loading activities for character ID %d", + characterID); - query = StringFormat("SELECT `taskid`, `activityid`, `donecount`, `completed` " - "FROM `character_activities` " - "WHERE `charid` = %i " - "ORDER BY `taskid` ASC, `activityid` ASC", characterID); - results = database.QueryDatabase(query); - if (!results.Success()){ - Log(Logs::General, Logs::Error, "[TASKS]Error in TaskManager::LoadClientState load Activities: %s", results.ErrorMessage().c_str()); + query = StringFormat("SELECT `taskid`, `activityid`, `donecount`, `completed` " + "FROM `character_activities` " + "WHERE `charid` = %i " + "ORDER BY `taskid` ASC, `activityid` ASC", + characterID); + results = database.QueryDatabase(query); + if (!results.Success()) { + Log(Logs::General, Logs::Error, "[TASKS]Error in TaskManager::LoadClientState load Activities: %s", + results.ErrorMessage().c_str()); return false; } - for (auto row = results.begin(); row != results.end(); ++row) { - int taskID = atoi(row[0]); - if((taskID<0) || (taskID>=MAXTASKS)) { - Log(Logs::General, Logs::Error, "[TASKS]Task ID %i out of range while loading character activities from database", taskID); - continue; - } + for (auto row = results.begin(); row != results.end(); ++row) { + int taskID = atoi(row[0]); + if ((taskID < 0) || (taskID >= MAXTASKS)) { + Log(Logs::General, Logs::Error, + "[TASKS]Task ID %i out of range while loading character activities from database", taskID); + continue; + } - int activityID = atoi(row[1]); - if((activityID<0) || (activityID>=MAXACTIVITIESPERTASK)) { - Log(Logs::General, Logs::Error, "[TASKS]Activity ID %i out of range while loading character activities from database", activityID); - continue; - } + int activityID = atoi(row[1]); + if ((activityID < 0) || (activityID >= MAXACTIVITIESPERTASK)) { + Log(Logs::General, Logs::Error, + "[TASKS]Activity ID %i out of range while loading character activities from database", + activityID); + continue; + } - // Find Active Task Slot - int activeTaskIndex = -1; + // Find Active Task Slot + int activeTaskIndex = -1; - for(int i=0; iActiveQuests[i].TaskID == taskID) { - activeTaskIndex = i; - break; - } + for (int i = 0; i < MAXACTIVEQUESTS; i++) + if (state->ActiveQuests[i].TaskID == taskID) { + activeTaskIndex = i; + break; + } - if(activeTaskIndex == -1) { - Log(Logs::General, Logs::Error, "[TASKS]Activity %i found for task %i which client does not have.", activityID, taskID); - continue; - } + if (activeTaskIndex == -1) { + Log(Logs::General, Logs::Error, + "[TASKS]Activity %i found for task %i which client does not have.", activityID, taskID); + continue; + } - int doneCount = atoi(row[2]); - bool completed = atoi(row[3]); - state->ActiveQuests[activeTaskIndex].Activity[activityID].ActivityID = activityID; - state->ActiveQuests[activeTaskIndex].Activity[activityID].DoneCount = doneCount; - if(completed) - state->ActiveQuests[activeTaskIndex].Activity[activityID].State = ActivityCompleted; - else - state->ActiveQuests[activeTaskIndex].Activity[activityID].State = ActivityHidden; + int doneCount = atoi(row[2]); + bool completed = atoi(row[3]); + state->ActiveQuests[activeTaskIndex].Activity[activityID].ActivityID = activityID; + state->ActiveQuests[activeTaskIndex].Activity[activityID].DoneCount = doneCount; + if (completed) + state->ActiveQuests[activeTaskIndex].Activity[activityID].State = ActivityCompleted; + else + state->ActiveQuests[activeTaskIndex].Activity[activityID].State = ActivityHidden; - state->ActiveQuests[activeTaskIndex].Activity[activityID].Updated = false; + state->ActiveQuests[activeTaskIndex].Activity[activityID].Updated = false; - Log(Logs::General, Logs::Tasks, "[CLIENTLOAD] TaskManager::LoadClientState. Char: %i Task ID %i, ActivityID: %i, DoneCount: %i, Completed: %i", characterID, taskID, activityID, doneCount, completed); + Log(Logs::General, Logs::Tasks, + "[CLIENTLOAD] TaskManager::LoadClientState. Char: %i Task ID %i, ActivityID: %i, DoneCount: %i, " + "Completed: %i", + characterID, taskID, activityID, doneCount, completed); + } - } - - if(RuleB(TaskSystem, RecordCompletedTasks)) { - query = StringFormat("SELECT `taskid`, `activityid`, `completedtime` " - "FROM `completed_tasks` " - "WHERE `charid` = %i ORDER BY completedtime, taskid, activityid", - characterID); - results = database.QueryDatabase(query); - if (!results.Success()) { - Log(Logs::General, Logs::Error, "[TASKS]Error in TaskManager::LoadClientState load completed tasks: %s", results.ErrorMessage().c_str()); + if (RuleB(TaskSystem, RecordCompletedTasks)) { + query = StringFormat("SELECT `taskid`, `activityid`, `completedtime` " + "FROM `completed_tasks` " + "WHERE `charid` = %i ORDER BY completedtime, taskid, activityid", + characterID); + results = database.QueryDatabase(query); + if (!results.Success()) { + Log(Logs::General, Logs::Error, + "[TASKS]Error in TaskManager::LoadClientState load completed tasks: %s", + results.ErrorMessage().c_str()); return false; - } + } CompletedTaskInformation cti; - for(int i=0; i=MAXTASKS)) { - Log(Logs::General, Logs::Error, "[TASKS]Task ID %i out of range while loading completed tasks from database", taskID); - continue; - } + int taskID = atoi(row[0]); + if ((taskID <= 0) || (taskID >= MAXTASKS)) { + Log(Logs::General, Logs::Error, + "[TASKS]Task ID %i out of range while loading completed tasks from database", + taskID); + continue; + } - // An ActivityID of -1 means mark all the none optional activities in the - // task as complete. If the Rule to record optional activities is enabled, - // subsequent records for this task will flag any optional tasks that were - // completed. - int activityID = atoi(row[1]); - if((activityID<-1) || (activityID>=MAXACTIVITIESPERTASK)) { - Log(Logs::General, Logs::Error, "[TASKS]Activity ID %i out of range while loading completed tasks from database", activityID); - continue; - } + // An ActivityID of -1 means mark all the none optional activities in the + // task as complete. If the Rule to record optional activities is enabled, + // subsequent records for this task will flag any optional tasks that were + // completed. + int activityID = atoi(row[1]); + if ((activityID < -1) || (activityID >= MAXACTIVITIESPERTASK)) { + Log(Logs::General, Logs::Error, + "[TASKS]Activity ID %i out of range while loading completed tasks from database", + activityID); + continue; + } - int completedTime = atoi(row[2]); - if((previousTaskID != -1) && ((taskID != previousTaskID) || (completedTime != previousCompletedTime))) { - state->CompletedTasks.push_back(cti); - for(int i=0; iCompletedTasks.push_back(cti); + for (int i = 0; i < MAXACTIVITIESPERTASK; i++) + cti.ActivityDone[i] = false; + } - cti.TaskID = previousTaskID = taskID; - cti.CompletedTime = previousCompletedTime = completedTime; + cti.TaskID = previousTaskID = taskID; + cti.CompletedTime = previousCompletedTime = completedTime; - // If ActivityID is -1, Mark all the non-optional tasks as completed. - if(activityID < 0) { - TaskInformation* task = Tasks[taskID]; - if(task == nullptr) - continue; + // If ActivityID is -1, Mark all the non-optional tasks as completed. + if (activityID < 0) { + TaskInformation *task = Tasks[taskID]; + if (task == nullptr) + continue; - for(int i=0; iActivityCount; i++) - if(!task->Activity[i].Optional) - cti.ActivityDone[i] = true; - } - else - cti.ActivityDone[activityID] = true; + for (int i = 0; i < task->ActivityCount; i++) + if (!task->Activity[i].Optional) + cti.ActivityDone[i] = true; + } else + cti.ActivityDone[activityID] = true; + } - } - - if(previousTaskID != -1) - state->CompletedTasks.push_back(cti); - - state->LastCompletedTaskLoaded = state->CompletedTasks.size(); + if (previousTaskID != -1) + state->CompletedTasks.push_back(cti); + state->LastCompletedTaskLoaded = state->CompletedTasks.size(); } - query = StringFormat("SELECT `taskid` FROM character_enabledtasks " - "WHERE `charid` = %i AND `taskid` >0 AND `taskid` < %i " - "ORDER BY `taskid` ASC", - characterID, MAXTASKS); - results = database.QueryDatabase(query); + query = StringFormat("SELECT `taskid` FROM character_enabledtasks " + "WHERE `charid` = %i AND `taskid` >0 AND `taskid` < %i " + "ORDER BY `taskid` ASC", + characterID, MAXTASKS); + results = database.QueryDatabase(query); if (!results.Success()) { - Log(Logs::General, Logs::Error, "[TASKS]Error in TaskManager::LoadClientState load enabled tasks: %s", results.ErrorMessage().c_str()); - } - else { + Log(Logs::General, Logs::Error, "[TASKS]Error in TaskManager::LoadClientState load enabled tasks: %s", + results.ErrorMessage().c_str()); + } else { for (auto row = results.begin(); row != results.end(); ++row) { int taskID = atoi(row[0]); state->EnabledTasks.push_back(taskID); @@ -635,28 +662,34 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) { // Check that there is an entry in the client task state for every activity in each task // This should only break if a ServerOP adds or deletes activites for a task that players already // have active, or due to a bug. - for(int i=0; iActiveQuests[i].TaskID; - if(taskID==TASKSLOTEMPTY) continue; - if(!Tasks[taskID]) { - c->Message(13, "Active Task Slot %i, references a task (%i), that does not exist. " - "Removing from memory. Contact a GM to resolve this.",i, taskID); - - Log(Logs::General, Logs::Error, "[TASKS]Character %i has task %i which does not exist.", characterID, taskID); - state->ActiveQuests[i].TaskID=TASKSLOTEMPTY; + if (taskID == TASKSLOTEMPTY) continue; + if (!Tasks[taskID]) { + c->Message(13, + "Active Task Slot %i, references a task (%i), that does not exist. " + "Removing from memory. Contact a GM to resolve this.", + i, taskID); + Log(Logs::General, Logs::Error, "[TASKS]Character %i has task %i which does not exist.", + characterID, taskID); + state->ActiveQuests[i].TaskID = TASKSLOTEMPTY; + continue; } - for(int j=0; jActivityCount; j++) { + for (int j = 0; j < Tasks[taskID]->ActivityCount; j++) { - if(state->ActiveQuests[i].Activity[j].ActivityID != j) { - c->Message(13, "Active Task %i, %s. Activity count does not match expected value." - "Removing from memory. Contact a GM to resolve this.", - taskID, Tasks[taskID]->Title.c_str()); + if (state->ActiveQuests[i].Activity[j].ActivityID != j) { + c->Message(13, + "Active Task %i, %s. Activity count does not match expected value." + "Removing from memory. Contact a GM to resolve this.", + taskID, Tasks[taskID]->Title.c_str()); - Log(Logs::General, Logs::Error, "[TASKS]Fatal error in character %i task state. Activity %i for " - "Task %i either missing from client state or from task.", characterID, j, taskID); - state->ActiveQuests[i].TaskID=TASKSLOTEMPTY; + Log(Logs::General, Logs::Error, + "[TASKS]Fatal error in character %i task state. Activity %i for " + "Task %i either missing from client state or from task.", + characterID, j, taskID); + state->ActiveQuests[i].TaskID = TASKSLOTEMPTY; break; } } From 62b78fb9a86b491a71d7041acf878b4abf900cff Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 8 Jul 2018 18:01:14 -0400 Subject: [PATCH 279/670] Update TaskManager::LoadClientState --- zone/tasks.cpp | 61 +++++++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 936374b76..5422f2dd8 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -456,7 +456,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) Log(Logs::General, Logs::Tasks, "[CLIENTLOAD] TaskManager::LoadClientState for character ID %d", characterID); - std::string query = StringFormat("SELECT `taskid`, `slot`, `acceptedtime` " + std::string query = StringFormat("SELECT `taskid`, `slot`,`type`, `acceptedtime` " "FROM `character_tasks` " "WHERE `charid` = %i ORDER BY acceptedtime", characterID); @@ -470,6 +470,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) for (auto row = results.begin(); row != results.end(); ++row) { int taskID = atoi(row[0]); int slot = atoi(row[1]); + TaskType type = static_cast(atoi(row[2])); if ((taskID < 0) || (taskID >= MAXTASKS)) { Log(Logs::General, Logs::Error, @@ -477,29 +478,32 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) continue; } - if ((slot < 0) || (slot >= MAXACTIVEQUESTS)) { + auto task_info = state->GetClientTaskInfo(type, slot); + + if (task_info == nullptr) { Log(Logs::General, Logs::Error, "[TASKS] Slot %i out of range while loading character tasks from database", slot); continue; } - if (state->ActiveQuests[slot].TaskID != TASKSLOTEMPTY) { + if (task_info->TaskID != TASKSLOTEMPTY) { Log(Logs::General, Logs::Error, "[TASKS] Slot %i for Task %is is already occupied.", slot, taskID); continue; } - int acceptedtime = atoi(row[2]); + int acceptedtime = atoi(row[3]); - state->ActiveQuests[slot].TaskID = taskID; - state->ActiveQuests[slot].CurrentStep = -1; - state->ActiveQuests[slot].AcceptedTime = acceptedtime; - state->ActiveQuests[slot].Updated = false; + task_info->TaskID = taskID; + task_info->CurrentStep = -1; + task_info->AcceptedTime = acceptedtime; + task_info->Updated = false; for (int i = 0; i < MAXACTIVITIESPERTASK; i++) - state->ActiveQuests[slot].Activity[i].ActivityID = -1; + task_info->Activity[i].ActivityID = -1; - ++state->ActiveTaskCount; + if (type == TaskType::Quest) + ++state->ActiveTaskCount; Log(Logs::General, Logs::Tasks, "[CLIENTLOAD] TaskManager::LoadClientState. Char: %i Task ID %i, Accepted Time: %8X", characterID, @@ -538,16 +542,17 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) continue; } - // Find Active Task Slot - int activeTaskIndex = -1; + ClientTaskInformation *task_info = nullptr; - for (int i = 0; i < MAXACTIVEQUESTS; i++) - if (state->ActiveQuests[i].TaskID == taskID) { - activeTaskIndex = i; - break; - } + if (state->ActiveTask.TaskID == taskID) + task_info = &state->ActiveTask; - if (activeTaskIndex == -1) { + if (task_info == nullptr) + for (int i = 0; i < MAXACTIVEQUESTS; i++) + if (state->ActiveQuests[i].TaskID == taskID) + task_info = &state->ActiveQuests[i]; + + if (task_info == nullptr) { Log(Logs::General, Logs::Error, "[TASKS]Activity %i found for task %i which client does not have.", activityID, taskID); continue; @@ -555,14 +560,14 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) int doneCount = atoi(row[2]); bool completed = atoi(row[3]); - state->ActiveQuests[activeTaskIndex].Activity[activityID].ActivityID = activityID; - state->ActiveQuests[activeTaskIndex].Activity[activityID].DoneCount = doneCount; + task_info->Activity[activityID].ActivityID = activityID; + task_info->Activity[activityID].DoneCount = doneCount; if (completed) - state->ActiveQuests[activeTaskIndex].Activity[activityID].State = ActivityCompleted; + task_info->Activity[activityID].State = ActivityCompleted; else - state->ActiveQuests[activeTaskIndex].Activity[activityID].State = ActivityHidden; + task_info->Activity[activityID].State = ActivityHidden; - state->ActiveQuests[activeTaskIndex].Activity[activityID].Updated = false; + task_info->Activity[activityID].Updated = false; Log(Logs::General, Logs::Tasks, "[CLIENTLOAD] TaskManager::LoadClientState. Char: %i Task ID %i, ActivityID: %i, DoneCount: %i, " @@ -662,8 +667,8 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) // Check that there is an entry in the client task state for every activity in each task // This should only break if a ServerOP adds or deletes activites for a task that players already // have active, or due to a bug. - for (int i = 0; i < MAXACTIVEQUESTS; i++) { - int taskID = state->ActiveQuests[i].TaskID; + for (int i = 0; i < MAXACTIVEQUESTS + 1; i++) { + int taskID = state->ActiveTasks[i].TaskID; if (taskID == TASKSLOTEMPTY) continue; if (!Tasks[taskID]) { @@ -674,12 +679,12 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) Log(Logs::General, Logs::Error, "[TASKS]Character %i has task %i which does not exist.", characterID, taskID); - state->ActiveQuests[i].TaskID = TASKSLOTEMPTY; + state->ActiveTasks[i].TaskID = TASKSLOTEMPTY; continue; } for (int j = 0; j < Tasks[taskID]->ActivityCount; j++) { - if (state->ActiveQuests[i].Activity[j].ActivityID != j) { + if (state->ActiveTasks[i].Activity[j].ActivityID != j) { c->Message(13, "Active Task %i, %s. Activity count does not match expected value." "Removing from memory. Contact a GM to resolve this.", @@ -689,7 +694,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) "[TASKS]Fatal error in character %i task state. Activity %i for " "Task %i either missing from client state or from task.", characterID, j, taskID); - state->ActiveQuests[i].TaskID = TASKSLOTEMPTY; + state->ActiveTasks[i].TaskID = TASKSLOTEMPTY; break; } } From 7218128d03e49dbd46cec2f90a322af7baf62ebf Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 8 Jul 2018 18:07:08 -0400 Subject: [PATCH 280/670] Update TaskManager::SaveClientState --- zone/tasks.cpp | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 5422f2dd8..abd184003 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -293,13 +293,13 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) Log(Logs::Detail, Logs::Tasks, "TaskManager::SaveClientState for character ID %d", characterID); - if (state->ActiveTaskCount > 0) { // TODO: tasks - for (int task = 0; task < MAXACTIVEQUESTS; task++) { - int taskID = state->ActiveQuests[task].TaskID; + if (state->ActiveTaskCount > 0 || state->ActiveTask.TaskID != TASKSLOTEMPTY) { // TODO: tasks + for (int task = 0; task < MAXACTIVEQUESTS + 1; task++) { + int taskID = state->ActiveTasks[task].TaskID; if (taskID == TASKSLOTEMPTY) continue; - if (state->ActiveQuests[task].Updated) { + if (state->ActiveTasks[task].Updated) { Log(Logs::General, Logs::Tasks, "[CLIENTSAVE] TaskManager::SaveClientState for character ID %d, Updating TaskIndex " @@ -310,12 +310,12 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) "REPLACE INTO character_tasks (charid, taskid, slot, type, acceptedtime) " "VALUES (%i, %i, %i, %i, %i)", characterID, taskID, task, static_cast(Tasks[taskID]->type), - state->ActiveQuests[task].AcceptedTime); + state->ActiveTasks[task].AcceptedTime); auto results = database.QueryDatabase(query); if (!results.Success()) { Log(Logs::General, Logs::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str()); } else { - state->ActiveQuests[task].Updated = false; + state->ActiveTasks[task].Updated = false; } } @@ -326,7 +326,7 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) int updatedActivityCount = 0; for (int activityIndex = 0; activityIndex < Tasks[taskID]->ActivityCount; ++activityIndex) { - if (!state->ActiveQuests[task].Activity[activityIndex].Updated) + if (!state->ActiveTasks[task].Activity[activityIndex].Updated) continue; Log(Logs::General, Logs::Tasks, @@ -337,14 +337,14 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) if (updatedActivityCount == 0) query += StringFormat("(%i, %i, %i, %i, %i)", characterID, taskID, activityIndex, - state->ActiveQuests[task].Activity[activityIndex].DoneCount, - state->ActiveQuests[task].Activity[activityIndex].State == + state->ActiveTasks[task].Activity[activityIndex].DoneCount, + state->ActiveTasks[task].Activity[activityIndex].State == ActivityCompleted); else query += StringFormat(", (%i, %i, %i, %i, %i)", characterID, taskID, activityIndex, - state->ActiveQuests[task].Activity[activityIndex].DoneCount, - state->ActiveQuests[task].Activity[activityIndex].State == + state->ActiveTasks[task].Activity[activityIndex].DoneCount, + state->ActiveTasks[task].Activity[activityIndex].State == ActivityCompleted); updatedActivityCount++; @@ -361,9 +361,9 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) continue; } - state->ActiveQuests[task].Updated = false; + state->ActiveTasks[task].Updated = false; for (int activityIndex = 0; activityIndex < Tasks[taskID]->ActivityCount; ++activityIndex) - state->ActiveQuests[task].Activity[activityIndex].Updated = false; + state->ActiveTasks[task].Activity[activityIndex].Updated = false; } } @@ -547,6 +547,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) if (state->ActiveTask.TaskID == taskID) task_info = &state->ActiveTask; + // wasn't task if (task_info == nullptr) for (int i = 0; i < MAXACTIVEQUESTS; i++) if (state->ActiveQuests[i].TaskID == taskID) From 2418c3dd74572ed64b5f868d6946f1914fe4cee0 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 8 Jul 2018 18:33:34 -0400 Subject: [PATCH 281/670] Remove old Text* stuff --- zone/tasks.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/zone/tasks.h b/zone/tasks.h index 024555ffa..b4159a143 100644 --- a/zone/tasks.h +++ b/zone/tasks.h @@ -102,9 +102,6 @@ typedef enum { METHODSINGLEID = 0, METHODLIST = 1, METHODQUEST = 2 } TaskMethodT struct ActivityInformation { int StepNumber; int Type; - std::string Text1; - std::string Text2; - std::string Text3; std::string target_name; // name mob, location -- default empty std::string item_list; // likely defaults to empty std::string skill_list; // IDs ; separated -- default -1 From 3969ac346d3f60716c3d4d90879f8aae6399dba1 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 8 Jul 2018 18:42:26 -0400 Subject: [PATCH 282/670] Remove startzone from tasks table since it's not needed --- zone/tasks.cpp | 15 +++++++-------- zone/tasks.h | 1 - 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index abd184003..faf07cb89 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -117,12 +117,12 @@ bool TaskManager::LoadTasks(int singleTask) Log(Logs::Detail, Logs::Tasks, "TaskManager::LoadTasks LoadTaskSets failed"); query = StringFormat("SELECT `id`, `type`, `duration`, `duration_code`, `title`, `description`, " - "`reward`, `rewardid`, `cashreward`, `xpreward`, `rewardmethod`, `startzone`, " + "`reward`, `rewardid`, `cashreward`, `xpreward`, `rewardmethod`, " "`minlevel`, `maxlevel`, `repeatable` FROM `tasks` WHERE `id` < %i", MAXTASKS); } else query = StringFormat("SELECT `id`, `type`, `duration`, `duration_code`, `title`, `description`, " - "`reward`, `rewardid`, `cashreward`, `xpreward`, `rewardmethod`, `startzone`, " + "`reward`, `rewardid`, `cashreward`, `xpreward`, `rewardmethod`, " "`minlevel`, `maxlevel`, `repeatable` FROM `tasks` WHERE `id` = %i", singleTask); @@ -155,18 +155,17 @@ bool TaskManager::LoadTasks(int singleTask) Tasks[taskID]->CashReward = atoi(row[8]); Tasks[taskID]->XPReward = atoi(row[9]); Tasks[taskID]->RewardMethod = (TaskMethodType)atoi(row[10]); - Tasks[taskID]->StartZone = atoi(row[11]); - Tasks[taskID]->MinLevel = atoi(row[12]); - Tasks[taskID]->MaxLevel = atoi(row[13]); - Tasks[taskID]->Repeatable = atoi(row[14]); + Tasks[taskID]->MinLevel = atoi(row[11]); + Tasks[taskID]->MaxLevel = atoi(row[12]); + Tasks[taskID]->Repeatable = atoi(row[13]); Tasks[taskID]->ActivityCount = 0; Tasks[taskID]->SequenceMode = ActivitiesSequential; Tasks[taskID]->LastStep = 0; Log(Logs::General, Logs::Tasks, - "[GLOBALLOAD] TaskID: %5i, Duration: %8i, StartZone: %3i Reward: %s MinLevel %i MaxLevel %i " + "[GLOBALLOAD] TaskID: %5i, Duration: %8i, Reward: %s MinLevel %i MaxLevel %i " "Repeatable: %s", - taskID, Tasks[taskID]->Duration, Tasks[taskID]->StartZone, Tasks[taskID]->Reward.c_str(), + taskID, Tasks[taskID]->Duration, Tasks[taskID]->Reward.c_str(), Tasks[taskID]->MinLevel, Tasks[taskID]->MaxLevel, Tasks[taskID]->Repeatable ? "Yes" : "No"); Log(Logs::General, Logs::Tasks, "[GLOBALLOAD] Title: %s", Tasks[taskID]->Title.c_str()); } diff --git a/zone/tasks.h b/zone/tasks.h index b4159a143..12e6e00c7 100644 --- a/zone/tasks.h +++ b/zone/tasks.h @@ -146,7 +146,6 @@ struct TaskInformation { int CashReward; // Expressed in copper int XPReward; TaskMethodType RewardMethod; - int StartZone; int ActivityCount; SequenceType SequenceMode; int LastStep; From 2d456ba8c976235e6fbe6b9a132ccd46d8176914 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 8 Jul 2018 21:40:04 -0400 Subject: [PATCH 283/670] Add task faction reward This just reuses NPC faction ID stuff since it does everything we want and isn't actually tied to NPCs :P --- common/eq_packet_structs.h | 2 +- utils/sql/git/required/tasks_revamp.sql | 2 ++ zone/tasks.cpp | 18 ++++++++++++------ zone/tasks.h | 1 + 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/common/eq_packet_structs.h b/common/eq_packet_structs.h index c59780b09..ced99f573 100644 --- a/common/eq_packet_structs.h +++ b/common/eq_packet_structs.h @@ -3851,7 +3851,7 @@ struct TaskDescriptionData2_Struct { uint8 has_rewards; uint32 coin_reward; uint32 xp_reward; - uint32 unknown3; // don't see it affecting display, faction maybe + uint32 faction_reward; }; struct TaskDescriptionTrailer_Struct { diff --git a/utils/sql/git/required/tasks_revamp.sql b/utils/sql/git/required/tasks_revamp.sql index bd751e12c..216a8c071 100644 --- a/utils/sql/git/required/tasks_revamp.sql +++ b/utils/sql/git/required/tasks_revamp.sql @@ -17,3 +17,5 @@ ALTER TABLE `activities` DROP COLUMN `text1`; ALTER TABLE `activities` DROP COLUMN `text2`; ALTER TABLE `activities` DROP COLUMN `text3`; ALTER TABLE `activities` DROP COLUMN `zoneid`; +ALTER TABLE `tasks` DROP COLUMN `startzone`; +ALTER TABLE `tasks` ADD `faction_reward` INT(10) NOT NULL DEFAULT '0'; diff --git a/zone/tasks.cpp b/zone/tasks.cpp index faf07cb89..f31beb472 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -117,12 +117,12 @@ bool TaskManager::LoadTasks(int singleTask) Log(Logs::Detail, Logs::Tasks, "TaskManager::LoadTasks LoadTaskSets failed"); query = StringFormat("SELECT `id`, `type`, `duration`, `duration_code`, `title`, `description`, " - "`reward`, `rewardid`, `cashreward`, `xpreward`, `rewardmethod`, " + "`reward`, `rewardid`, `cashreward`, `xpreward`, `rewardmethod`, `faction_reward`," "`minlevel`, `maxlevel`, `repeatable` FROM `tasks` WHERE `id` < %i", MAXTASKS); } else query = StringFormat("SELECT `id`, `type`, `duration`, `duration_code`, `title`, `description`, " - "`reward`, `rewardid`, `cashreward`, `xpreward`, `rewardmethod`, " + "`reward`, `rewardid`, `cashreward`, `xpreward`, `rewardmethod`, `faction_reward`," "`minlevel`, `maxlevel`, `repeatable` FROM `tasks` WHERE `id` = %i", singleTask); @@ -155,9 +155,10 @@ bool TaskManager::LoadTasks(int singleTask) Tasks[taskID]->CashReward = atoi(row[8]); Tasks[taskID]->XPReward = atoi(row[9]); Tasks[taskID]->RewardMethod = (TaskMethodType)atoi(row[10]); - Tasks[taskID]->MinLevel = atoi(row[11]); - Tasks[taskID]->MaxLevel = atoi(row[12]); - Tasks[taskID]->Repeatable = atoi(row[13]); + Tasks[taskID]->faction_reward = atoi(row[11]); + Tasks[taskID]->MinLevel = atoi(row[12]); + Tasks[taskID]->MaxLevel = atoi(row[13]); + Tasks[taskID]->Repeatable = atoi(row[14]); Tasks[taskID]->ActivityCount = 0; Tasks[taskID]->SequenceMode = ActivitiesSequential; Tasks[taskID]->LastStep = 0; @@ -2015,6 +2016,11 @@ void ClientTaskState::RewardTask(Client *c, TaskInformation *Task) { break; } } + + // just use normal NPC faction ID stuff + if (Task->faction_reward) + c->SetFactionLevel(c->CharacterID(), Task->faction_reward, c->GetBaseClass(), c->GetBaseRace(), c->GetDeity()); + if(Task->CashReward) { int Plat, Gold, Silver, Copper; @@ -2975,7 +2981,7 @@ void TaskManager::SendActiveTaskDescription(Client *c, int TaskID, ClientTaskInf tdd2->coin_reward = Tasks[TaskID]->CashReward; tdd2->xp_reward = Tasks[TaskID]->XPReward ? 1 : 0; // just booled - tdd2->unknown3 = 0; // STRONGLY suspect this is faction reward, also just booled to hide details? + tdd2->faction_reward = Tasks[TaskID]->faction_reward ? 1 : 0; // faction booled Ptr = (char *) tdd2 + sizeof(TaskDescriptionData2_Struct); diff --git a/zone/tasks.h b/zone/tasks.h index 12e6e00c7..70053a939 100644 --- a/zone/tasks.h +++ b/zone/tasks.h @@ -145,6 +145,7 @@ struct TaskInformation { int RewardID; int CashReward; // Expressed in copper int XPReward; + int faction_reward; // just a npc_faction_id TaskMethodType RewardMethod; int ActivityCount; SequenceType SequenceMode; From 4c6de9b99184ff96757ff87294513952b6fb1527 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 8 Jul 2018 23:03:53 -0400 Subject: [PATCH 284/670] Steal buffer from SerializeBuffer now --- common/base_packet.cpp | 12 ++++++++++++ common/base_packet.h | 2 ++ common/eq_packet.h | 4 +++- common/serialize_buffer.h | 2 ++ zone/tasks.cpp | 8 ++++---- 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/common/base_packet.cpp b/common/base_packet.cpp index ce6afe978..50f9b84f9 100644 --- a/common/base_packet.cpp +++ b/common/base_packet.cpp @@ -39,6 +39,18 @@ BasePacket::BasePacket(const unsigned char *buf, uint32 len) } } +BasePacket::BasePacket(SerializeBuffer &buf) +{ + pBuffer = buf.m_buffer; + buf.m_buffer = nullptr; + size = buf.m_pos; + buf.m_pos = 0; + buf.m_capacity = 0; + _wpos = 0; + _rpos = 0; + timestamp.tv_sec = 0; +} + BasePacket::~BasePacket() { if (pBuffer) diff --git a/common/base_packet.h b/common/base_packet.h index 8d64e6d62..4f47c919a 100644 --- a/common/base_packet.h +++ b/common/base_packet.h @@ -19,6 +19,7 @@ #define BASEPACKET_H_ #include "types.h" +#include "serialize_buffer.h" #include #include @@ -85,6 +86,7 @@ protected: virtual ~BasePacket(); BasePacket() { pBuffer=nullptr; size=0; _wpos = 0; _rpos = 0; } BasePacket(const unsigned char *buf, const uint32 len); + BasePacket(SerializeBuffer &buf); }; extern void DumpPacketHex(const BasePacket* app); diff --git a/common/eq_packet.h b/common/eq_packet.h index 29588cbc1..77b76b450 100644 --- a/common/eq_packet.h +++ b/common/eq_packet.h @@ -20,7 +20,6 @@ #include "base_packet.h" #include "platform.h" -#include "serialize_buffer.h" #include #ifdef STATIC_OPCODE @@ -52,6 +51,7 @@ protected: EmuOpcode emu_opcode; EQPacket(EmuOpcode opcode, const unsigned char *buf, const uint32 len); + EQPacket(EmuOpcode opcode, SerializeBuffer &buf) : BasePacket(buf), emu_opcode(opcode) { }; // EQPacket(const EQPacket &p) { } EQPacket() { emu_opcode=OP_Unknown; pBuffer=nullptr; size=0; } @@ -105,6 +105,8 @@ public: { app_opcode_size = GetExecutablePlatform() == ExePlatformUCS ? 1 : 2; } EQApplicationPacket(const EmuOpcode op, const unsigned char *buf, const uint32 len) : EQPacket(op, buf, len), opcode_bypass(0) { app_opcode_size = GetExecutablePlatform() == ExePlatformUCS ? 1 : 2; } + EQApplicationPacket(const EmuOpcode op, SerializeBuffer &buf) : EQPacket(op, buf), opcode_bypass(0) + { app_opcode_size = GetExecutablePlatform() == ExePlatformUCS ? 1 : 2; } bool combine(const EQApplicationPacket *rhs); uint32 serialize (uint16 opcode, unsigned char *dest) const; uint32 Size() const { return size+app_opcode_size; } diff --git a/common/serialize_buffer.h b/common/serialize_buffer.h index ef6b92593..9b350b4fa 100644 --- a/common/serialize_buffer.h +++ b/common/serialize_buffer.h @@ -186,6 +186,8 @@ public: size_t capacity() const { return m_capacity; } const unsigned char *buffer() const { return m_buffer; } + friend class BasePacket; + private: void Grow(size_t new_size); void Reset(); diff --git a/zone/tasks.cpp b/zone/tasks.cpp index f31beb472..419bbd751 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -1146,7 +1146,7 @@ void TaskManager::SendTaskSelector(Client *c, Mob *mob, int TaskCount, int *Task } } - auto outapp = new EQApplicationPacket(OP_OpenNewTasksWindow, buf.buffer(), buf.length()); + auto outapp = new EQApplicationPacket(OP_OpenNewTasksWindow, buf); c->QueuePacket(outapp); safe_delete(outapp); @@ -1233,7 +1233,7 @@ void TaskManager::SendTaskSelectorNew(Client *c, Mob *mob, int TaskCount, int *T } } - auto outapp = new EQApplicationPacket(OP_OpenNewTasksWindow, buf.buffer(), buf.length()); + auto outapp = new EQApplicationPacket(OP_OpenNewTasksWindow, buf); c->QueuePacket(outapp); safe_delete(outapp); @@ -2770,7 +2770,7 @@ void TaskManager::SendTaskActivityLong(Client *c, int TaskID, int ActivityID, in buf.WriteUInt32(1); // unknown - auto outapp = new EQApplicationPacket(OP_TaskActivity, buf.buffer(), buf.length()); + auto outapp = new EQApplicationPacket(OP_TaskActivity, buf); c->QueuePacket(outapp); safe_delete(outapp); @@ -2830,7 +2830,7 @@ void TaskManager::SendTaskActivityNew(Client *c, int TaskID, int ActivityID, int buf.WriteString(Tasks[TaskID]->Activity[ActivityID].zones); - auto outapp = new EQApplicationPacket(OP_TaskActivity, buf.buffer(), buf.length()); + auto outapp = new EQApplicationPacket(OP_TaskActivity, buf); c->QueuePacket(outapp); safe_delete(outapp); From c0c34cf07a41e42aa72d52ef0372acabef150c9a Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 8 Jul 2018 23:32:30 -0400 Subject: [PATCH 285/670] Update ClientTaskState::ShowClientTasks --- zone/tasks.cpp | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 419bbd751..30c724d5b 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -2295,24 +2295,32 @@ void ClientTaskState::ResetTaskActivity(Client *c, int TaskID, int ActivityID) Task->Activity[ActivityID].Optional); } -void ClientTaskState::ShowClientTasks(Client *c) { - +void ClientTaskState::ShowClientTasks(Client *c) +{ c->Message(0, "Task Information:"); - //for(int i=0; iMessage(0, "Task: %i %s", ActiveQuests[i].TaskID, taskmanager->Tasks[ActiveQuests[i].TaskID]->Title.c_str()); - c->Message(0, " Description: [%s]\n", taskmanager->Tasks[ActiveQuests[i].TaskID]->Description.c_str()); - for(int j=0; jGetActivityCount(ActiveQuests[i].TaskID); j++) { + if (ActiveTask.TaskID != TASKSLOTEMPTY) { + c->Message(0, "Task: %i %s", ActiveTask.TaskID, taskmanager->Tasks[ActiveTask.TaskID]->Title.c_str()); + c->Message(0, " Description: [%s]\n", taskmanager->Tasks[ActiveTask.TaskID]->Description.c_str()); + for (int j = 0; j < taskmanager->GetActivityCount(ActiveTask.TaskID); j++) { c->Message(0, " Activity: %2d, DoneCount: %2d, Status: %d (0=Hidden, 1=Active, 2=Complete)", - ActiveQuests[i].Activity[j].ActivityID, - ActiveQuests[i].Activity[j].DoneCount, - ActiveQuests[i].Activity[j].State); + ActiveTask.Activity[j].ActivityID, ActiveTask.Activity[j].DoneCount, + ActiveTask.Activity[j].State); } } + for (int i = 0; i < MAXACTIVEQUESTS; i++) { + if (ActiveQuests[i].TaskID == TASKSLOTEMPTY) + continue; + + c->Message(0, "Quest: %i %s", ActiveQuests[i].TaskID, + taskmanager->Tasks[ActiveQuests[i].TaskID]->Title.c_str()); + c->Message(0, " Description: [%s]\n", taskmanager->Tasks[ActiveQuests[i].TaskID]->Description.c_str()); + for (int j = 0; j < taskmanager->GetActivityCount(ActiveQuests[i].TaskID); j++) { + c->Message(0, " Activity: %2d, DoneCount: %2d, Status: %d (0=Hidden, 1=Active, 2=Complete)", + ActiveQuests[i].Activity[j].ActivityID, ActiveQuests[i].Activity[j].DoneCount, + ActiveQuests[i].Activity[j].State); + } + } } // TODO: Shared Task From 0d094754db25c5d4374061285e420773a61b5bc3 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 9 Jul 2018 01:15:57 -0500 Subject: [PATCH 286/670] Add #grid show comand to display a targeted NPCs grid points visually --- zone/command.cpp | 58 +++++++++++++++++++++++++++++++++++++++++++----- zone/npc.cpp | 46 ++++++++++++++++++++++++++++++++++++-- zone/npc.h | 4 ++++ 3 files changed, 101 insertions(+), 7 deletions(-) diff --git a/zone/command.cpp b/zone/command.cpp index 3705124fc..15e2ecdfb 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -2009,10 +2009,58 @@ void command_setlsinfo(Client *c, const Seperator *sep) void command_grid(Client *c, const Seperator *sep) { - if (strcasecmp("max", sep->arg[1]) == 0) - c->Message(0, "Highest grid ID in this zone: %d", database.GetHighestGrid(zone->GetZoneID())); - else if (strcasecmp("add", sep->arg[1]) == 0) - database.ModifyGrid(c, false,atoi(sep->arg[2]),atoi(sep->arg[3]), atoi(sep->arg[4]),zone->GetZoneID()); + if (strcasecmp("max", sep->arg[1]) == 0) { + c->Message(0, "Highest grid ID in this zone: %d", database.GetHighestGrid(zone->GetZoneID())); + } + else if (strcasecmp("add", sep->arg[1]) == 0) { + database.ModifyGrid(c, false, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), zone->GetZoneID()); + } + else if (strcasecmp("show", sep->arg[1]) == 0) { + + Mob *target = c->GetTarget(); + + if (!target || !target->IsNPC()) { + c->Message(0, "You need a NPC target!"); + return; + } + + std::string query = StringFormat( + "SELECT `x`, `y`, `z`, `heading`, `number`, `pause` " + "FROM `grid_entries` " + "WHERE `zoneid` = %u and `gridid` = %i " + "ORDER BY `number` ", + zone->GetZoneID(), + target->CastToNPC()->GetGrid() + ); + + auto results = database.QueryDatabase(query); + if (!results.Success()) { + c->Message(0, "Error querying database."); + c->Message(0, query.c_str()); + } + + if (results.RowCount() == 0) { + c->Message(0, "No grid found"); + return; + } + + /** + * Spawn grid nodes + */ + for (auto row = results.begin(); row != results.end(); ++row) { + auto node_position = glm::vec4(atof(row[0]), atof(row[1]), atof(row[2]), atof(row[3])); + + NPC *npc = NPC::SpawnGridNodeNPC( + target->GetCleanName(), + node_position, + static_cast(target->CastToNPC()->GetGrid()), + static_cast(atoi(row[4])), + static_cast(atoi(row[5])) + ); + npc->SetFlyMode(1); + npc->GMMove(node_position.x, node_position.y, node_position.z, node_position.w); + } + } else if (strcasecmp("delete", sep->arg[1]) == 0) database.ModifyGrid(c, true,atoi(sep->arg[2]),0,0,zone->GetZoneID()); else { @@ -4516,7 +4564,7 @@ void command_goto(Client *c, const Seperator *sep) else if (!(sep->IsNumber(1) && sep->IsNumber(2) && sep->IsNumber(3))) c->Message(0, "Usage: #goto [x y z]"); else - c->MovePC(zone->GetZoneID(), zone->GetInstanceID(), atof(sep->arg[1]), atof(sep->arg[2]), atof(sep->arg[3]), 0.0f); + c->MovePC(zone->GetZoneID(), zone->GetInstanceID(), atof(sep->arg[1]), atof(sep->arg[2]), atof(sep->arg[3]), c->GetHeading()); } void command_iteminfo(Client *c, const Seperator *sep) diff --git a/zone/npc.cpp b/zone/npc.cpp index 29e2f20ef..156cb67fd 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -985,6 +985,49 @@ bool NPC::SpawnZoneController(){ return true; } +NPC * NPC::SpawnGridNodeNPC(std::string name, const glm::vec4 &position, uint32 grid_id, uint32 grid_number, uint32 pause) { + auto npc_type = new NPCType; + memset(npc_type, 0, sizeof(NPCType)); + + sprintf(npc_type->name, "(%s)_%u", name.c_str(), grid_number); + sprintf(npc_type->lastname, "Number: %u Grid: %u Pause: %u", grid_number, grid_id, pause); + + npc_type->cur_hp = 4000000; + npc_type->max_hp = 4000000; + npc_type->race = 2254; + npc_type->gender = 2; + npc_type->class_ = 9; + npc_type->deity = 1; + npc_type->level = 200; + npc_type->npc_id = 0; + npc_type->loottable_id = 0; + npc_type->texture = 1; + npc_type->light = 1; + npc_type->size = 3; + npc_type->runspeed = 0; + npc_type->d_melee_texture1 = 1; + npc_type->d_melee_texture2 = 1; + npc_type->merchanttype = 1; + npc_type->bodytype = 1; + npc_type->show_name = true; + npc_type->STR = 150; + npc_type->STA = 150; + npc_type->DEX = 150; + npc_type->AGI = 150; + npc_type->INT = 150; + npc_type->WIS = 150; + npc_type->CHA = 150; + npc_type->findable = true; + + auto node_position = glm::vec4(position.x, position.y, position.z, position.w); + auto npc = new NPC(npc_type, nullptr, node_position, FlyMode1); + npc->GiveNPCTypeData(npc_type); + + entity_list.AddNPC(npc, true, true); + + return npc; +} + NPC* NPC::SpawnNPC(const char* spawncommand, const glm::vec4& position, Client* client) { if(spawncommand == 0 || spawncommand[0] == 0) { return 0; @@ -2715,5 +2758,4 @@ void NPC::ModifyStatsOnCharm(bool bRemoved) // the rest of the stats aren't cached, so lets just do these two instead of full CalcBonuses() SetAttackTimer(); CalcAC(); -} - +} \ No newline at end of file diff --git a/zone/npc.h b/zone/npc.h index a2cad8b95..0201d3b9f 100644 --- a/zone/npc.h +++ b/zone/npc.h @@ -110,6 +110,8 @@ public: virtual ~NPC(); + static NPC *SpawnGridNodeNPC(std::string name, const glm::vec4 &position, uint32 grid_id, uint32 grid_number, uint32 pause); + //abstract virtual function implementations requird by base abstract class virtual bool Death(Mob* killerMob, int32 damage, uint16 spell_id, EQEmu::skills::SkillType attack_skill); virtual void Damage(Mob* from, int32 damage, uint16 spell_id, EQEmu::skills::SkillType attack_skill, bool avoidable = true, int8 buffslot = -1, bool iBuffTic = false, eSpecialAttacks special = eSpecialAttacks::None); @@ -562,6 +564,8 @@ protected: bool raid_target; bool ignore_despawn; //NPCs with this set to 1 will ignore the despawn value in spawngroup + + private: uint32 loottable_id; bool skip_global_loot; From dc87b8e78b627b52032507091799c583581bfbd5 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 9 Jul 2018 01:39:14 -0500 Subject: [PATCH 287/670] Depop and cleanup existing node npc's when command executed again. Also remove string from "name" and leave metadata in "lastname" otherwise it is visually too busy --- zone/command.cpp | 10 ++++++++++ zone/npc.cpp | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/zone/command.cpp b/zone/command.cpp index 15e2ecdfb..8fe816fe0 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -2044,6 +2044,16 @@ void command_grid(Client *c, const Seperator *sep) return; } + /** + * Depop any node npc's already spawned + */ + auto &mob_list = entity_list.GetMobList(); + for (auto itr = mob_list.begin(); itr != mob_list.end(); ++itr) { + Mob *mob = itr->second; + if (mob->IsNPC() && mob->GetRace() == 2254) + mob->Depop(); + } + /** * Spawn grid nodes */ diff --git a/zone/npc.cpp b/zone/npc.cpp index 156cb67fd..917dafe9b 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -989,7 +989,7 @@ NPC * NPC::SpawnGridNodeNPC(std::string name, const glm::vec4 &position, uint32 auto npc_type = new NPCType; memset(npc_type, 0, sizeof(NPCType)); - sprintf(npc_type->name, "(%s)_%u", name.c_str(), grid_number); + sprintf(npc_type->name, "%u_%u", grid_id, grid_number); sprintf(npc_type->lastname, "Number: %u Grid: %u Pause: %u", grid_number, grid_id, pause); npc_type->cur_hp = 4000000; From 07f3ab955fcc64b335919848dff9bea32c5d1165 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Mon, 9 Jul 2018 14:01:52 -0400 Subject: [PATCH 288/670] Fix issue with Quest types --- zone/tasks.cpp | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 30c724d5b..3739a41f0 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -299,17 +299,19 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) if (taskID == TASKSLOTEMPTY) continue; + int slot = state->ActiveTasks[task].slot; + if (state->ActiveTasks[task].Updated) { Log(Logs::General, Logs::Tasks, "[CLIENTSAVE] TaskManager::SaveClientState for character ID %d, Updating TaskIndex " "%i TaskID %i", - characterID, task, taskID); + characterID, slot, taskID); std::string query = StringFormat( "REPLACE INTO character_tasks (charid, taskid, slot, type, acceptedtime) " "VALUES (%i, %i, %i, %i, %i)", - characterID, taskID, task, static_cast(Tasks[taskID]->type), + characterID, taskID, slot, static_cast(Tasks[taskID]->type), state->ActiveTasks[task].AcceptedTime); auto results = database.QueryDatabase(query); if (!results.Success()) { @@ -332,7 +334,7 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) Log(Logs::General, Logs::Tasks, "[CLIENTSAVE] TaskManager::SaveClientSate for character ID %d, Updating Activity " "%i, %i", - characterID, task, activityIndex); + characterID, slot, activityIndex); if (updatedActivityCount == 0) query += @@ -1557,7 +1559,7 @@ bool ClientTaskState::UpdateTasksByNPC(Client *c, int ActivityType, int NPCTypeI } // We found an active task to kill this type of NPC, so increment the done count Log(Logs::General, Logs::Tasks, "[UPDATE] Calling increment done count ByNPC"); - IncrementDoneCount(c, Task, i, j); + IncrementDoneCount(c, Task, cur_task->slot, j); Ret = true; } } @@ -1639,6 +1641,7 @@ int ClientTaskState::ActiveSpeakActivity(int NPCTypeID, int TaskID) { } return 0; } + void ClientTaskState::UpdateTasksForItem(Client *c, ActivityType Type, int ItemID, int Count) { // This method updates the client's task activities of the specified type which relate @@ -1697,7 +1700,7 @@ void ClientTaskState::UpdateTasksForItem(Client *c, ActivityType Type, int ItemI } // We found an active task related to this item, so increment the done count Log(Logs::General, Logs::Tasks, "[UPDATE] Calling increment done count ForItem"); - IncrementDoneCount(c, Task, i, j, Count); + IncrementDoneCount(c, Task, cur_task->slot, j, Count); } } @@ -1759,7 +1762,7 @@ void ClientTaskState::UpdateTasksOnExplore(Client *c, int ExploreID) // We found an active task to explore this area, so set done count to goal count // (Only a goal count of 1 makes sense for explore activities?) Log(Logs::General, Logs::Tasks, "[UPDATE] Increment on explore"); - IncrementDoneCount(c, Task, i, j, + IncrementDoneCount(c, Task, cur_task->slot, j, Task->Activity[j].GoalCount - cur_task->Activity[j].DoneCount); } } @@ -1834,7 +1837,7 @@ bool ClientTaskState::UpdateTasksOnDeliver(Client *c, std::listGetCharges() <= 0 ? 1 : k->GetCharges()); + IncrementDoneCount(c, Task, cur_task->slot, j, k->GetCharges() <= 0 ? 1 : k->GetCharges()); Ret = true; } } @@ -1882,7 +1885,7 @@ void ClientTaskState::UpdateTasksOnTouch(Client *c, int ZoneID) // We found an active task to zone into this zone, so set done count to goal count // (Only a goal count of 1 makes sense for touch activities?) Log(Logs::General, Logs::Tasks, "[UPDATE] Increment on Touch"); - IncrementDoneCount(c, Task, i, j, + IncrementDoneCount(c, Task, cur_task->slot, j, Task->Activity[j].GoalCount - cur_task->Activity[j].DoneCount); } } @@ -2863,20 +2866,21 @@ void TaskManager::SendActiveTasksToClient(Client *c, bool TaskComplete) GetActivityCount(TaskID)); int Sequence = 0; + int fixed_index = Tasks[TaskID]->type == TaskType::Task ? 0 : TaskIndex - 1; // hmmm fuck for (int Activity = 0; Activity < GetActivityCount(TaskID); Activity++) { - if (c->GetTaskActivityState(Tasks[TaskID]->type, TaskIndex, Activity) != ActivityHidden) { + if (c->GetTaskActivityState(Tasks[TaskID]->type, fixed_index, Activity) != ActivityHidden) { Log(Logs::General, Logs::Tasks, "[UPDATE] Long: %i, %i, %i Complete=%i", TaskID, - Activity, TaskIndex, TaskComplete); + Activity, fixed_index, TaskComplete); if (Activity == GetActivityCount(TaskID) - 1) - SendTaskActivityLong(c, TaskID, Activity, TaskIndex, + SendTaskActivityLong(c, TaskID, Activity, fixed_index, Tasks[TaskID]->Activity[Activity].Optional, TaskComplete); else - SendTaskActivityLong(c, TaskID, Activity, TaskIndex, + SendTaskActivityLong(c, TaskID, Activity, fixed_index, Tasks[TaskID]->Activity[Activity].Optional, 0); } else { Log(Logs::General, Logs::Tasks, "[UPDATE] Short: %i, %i, %i", TaskID, Activity, - TaskIndex); - SendTaskActivityShort(c, TaskID, Activity, TaskIndex); + fixed_index); + SendTaskActivityShort(c, TaskID, Activity, fixed_index); } Sequence++; } From c08993b60b7b5328398459a458648a114c3fb331 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Mon, 9 Jul 2018 16:36:18 -0400 Subject: [PATCH 289/670] Bit of Task Revamp (shared still unimplemented) Lots of change, packets should be better defined. Task type tasks are now supported --- changelog.txt | 12 ++++++++++++ common/version.h | 2 +- utils/sql/db_update_manifest.txt | 1 + .../{tasks_revamp.sql => 2018_07_09_tasks.sql} | 0 4 files changed, 14 insertions(+), 1 deletion(-) rename utils/sql/git/required/{tasks_revamp.sql => 2018_07_09_tasks.sql} (100%) diff --git a/changelog.txt b/changelog.txt index 1217ee9d5..507bbd7d1 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,17 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 07/09/2018 == +mackal: Rework of Task System, Shared Tasks still unsupported + - The tables now have better named columns, which hopefully won't need to be explained + - Text1 is now target_name, Text2 is now item_list, Text3 is now description_override + - Tasks can now reward faction hits, this is just normal NPC Faction ID entries because I was lazy + - The "Task" type tasks are now supported, a player can only be doing one of these at a time + - Activity IDs for use spell on and use skill on have been identified but not implemented + - Identified "duration code" for unlimited duration tasks (None = 0, Short = 1, Medium = 2, Long = 3) + - Activities can now have multiple zones separated by ';' + - tasks.startzone removed since it actually just uses first activity + - skill_list and spell_list are both IDs that can be separated by ';' (still unimplemented though) + == 07/07/2018 == Akkadius: Implemented a much better replacement for qglobals called 'DataBuckets' - A much more detailed example can be found at: https://github.com/EQEmu/Server/wiki/Data-Buckets diff --git a/common/version.h b/common/version.h index 31345e996..15fe7bb22 100644 --- a/common/version.h +++ b/common/version.h @@ -30,7 +30,7 @@ Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt */ -#define CURRENT_BINARY_DATABASE_VERSION 9123 +#define CURRENT_BINARY_DATABASE_VERSION 9124 #ifdef BOTS #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9019 #else diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index c6d5f0333..f55ff5235 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -377,6 +377,7 @@ 9121|2018_02_18_bug_reports.sql|SHOW TABLES LIKE 'bug_reports'|empty| 9122|2018_03_07_ucs_command.sql|SELECT * FROM `command_settings` WHERE `command` LIKE 'ucs'|empty| 9123|2018_07_07_data_buckets.sql|SHOW TABLES LIKE 'data_buckets'|empty| +9124|2018_07_09_tasks.sql|SHOW COLUMNS FROM `tasks` LIKE 'type'|empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/utils/sql/git/required/tasks_revamp.sql b/utils/sql/git/required/2018_07_09_tasks.sql similarity index 100% rename from utils/sql/git/required/tasks_revamp.sql rename to utils/sql/git/required/2018_07_09_tasks.sql From 623b7b3eee33a7664291eeed7c286ff60f4147e1 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Tue, 10 Jul 2018 00:26:53 -0500 Subject: [PATCH 290/670] Rename `activities` to `task_activities` for consistency since we're changing up task data --- utils/TaskMaster/activities.cpp | 10 +++--- utils/TaskMaster/base_utility.cpp | 35 ++++++++++----------- utils/sql/git/required/2018_07_09_tasks.sql | 1 + zone/tasks.cpp | 4 +-- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/utils/TaskMaster/activities.cpp b/utils/TaskMaster/activities.cpp index 4f2d211f4..4cbb2a1b5 100644 --- a/utils/TaskMaster/activities.cpp +++ b/utils/TaskMaster/activities.cpp @@ -127,7 +127,7 @@ void MainFrame::NewActivity(wxCommandEvent& event) if(mMysql){ char * mActQuery = 0; - MakeAnyLenString(&mActQuery, "INSERT INTO `activities` (`taskid`,`activityid`,`step`,`activitytype`,`text1`,`text2`,`text3`,`goalid`,`goalmethod`,`goalcount`,`delivertonpc`,`zoneid`,`optional`) VALUES (%u,%u,%u,%u,'%s','%s','%s',%u,%u,%u,%u,%u,%u)", + MakeAnyLenString(&mActQuery, "INSERT INTO `task_activities` (`taskid`,`activityid`,`step`,`activitytype`,`text1`,`text2`,`text3`,`goalid`,`goalmethod`,`goalcount`,`delivertonpc`,`zoneid`,`optional`) VALUES (%u,%u,%u,%u,'%s','%s','%s',%u,%u,%u,%u,%u,%u)", newAct.id, newAct.activityId, newAct.step, newAct.activityType, newAct.text1, newAct.text2, newAct.text3, newAct.goalid, newAct.goalmethod, newAct.goalcount, newAct.deliverToNpc, newAct.zoneid, newAct.optional ); mErrorLog->Log(eqEmuLogSQL, "%s", mActQuery); @@ -167,7 +167,7 @@ void MainFrame::DeleteActivity(wxCommandEvent& event) { if(mMysql){ char * mActQuery = 0; - MakeAnyLenString(&mActQuery, "DELETE FROM activities WHERE taskid=%u AND activityid=%u",selAct->id, selAct->activityid); + MakeAnyLenString(&mActQuery, "DELETE FROM `task_activities` WHERE taskid=%u AND activityid=%u",selAct->id, selAct->activityid); mErrorLog->Log(eqEmuLogSQL, "%s", mActQuery); if (mysql_query(mMysql, mActQuery)) { mErrorLog->Log(eqEmuLogBoth, "MySQL Error: %s", mysql_error(mMysql)); @@ -554,7 +554,7 @@ void MainFrame::SaveActivity(wxCommandEvent& event) if(canUpdate) { char * mQuery = 0; - MakeAnyLenString(&mQuery, "UPDATE activities SET step=%u, activitytype=%u, text1='%s', text2='%s', text3='%s', goalid=%u, goalmethod=%u,goalcount=%u, delivertonpc=%u, zoneid=%u, optional=%u WHERE taskid=%u AND activityid =%u", + MakeAnyLenString(&mQuery, "UPDATE `task_activities` SET step=%u, activitytype=%u, text1='%s', text2='%s', text3='%s', goalid=%u, goalmethod=%u,goalcount=%u, delivertonpc=%u, zoneid=%u, optional=%u WHERE taskid=%u AND activityid =%u", ourAct.step, ourAct.activityType, MakeStringSQLSafe(ourAct.text1).mb_str(), MakeStringSQLSafe(ourAct.text2).mb_str(), MakeStringSQLSafe(ourAct.text3).mb_str(), ourAct.goalid, ourAct.goalmethod, ourAct.goalcount, ourAct.deliverToNpc, ourAct.zoneid, ourAct.optional, ourAct.id, ourAct.activityId ); mErrorLog->Log(eqEmuLogSQL, "%s", mQuery); if (mysql_query(mMysql, mQuery)) { @@ -565,14 +565,14 @@ void MainFrame::SaveActivity(wxCommandEvent& event) else { char * mQuery = 0; - MakeAnyLenString(&mQuery, "DELETE FROM activities WHERE taskid=%u AND activityid=%u", ourAct.id, delid); + MakeAnyLenString(&mQuery, "DELETE FROM `task_activities` WHERE taskid=%u AND activityid=%u", ourAct.id, delid); mErrorLog->Log(eqEmuLogSQL, "%s", mQuery); if (mysql_query(mMysql, mQuery)) { mErrorLog->Log(eqEmuLogBoth, "MySQL Error: %s", mysql_error(mMysql)); return; } - MakeAnyLenString(&mQuery, "INSERT INTO `activities` (`taskid`,`activityid`,`step`,`activitytype`,`text1`,`text2`,`text3`,`goalid`,`goalmethod`,`goalcount`,`delivertonpc`,`zoneid`,`optional`) VALUES (%u,%u,%u,%u,'%s','%s','%s',%u,%u,%u,%u,%u,%u)", + MakeAnyLenString(&mQuery, "INSERT INTO `task_activities` (`taskid`,`activityid`,`step`,`activitytype`,`text1`,`text2`,`text3`,`goalid`,`goalmethod`,`goalcount`,`delivertonpc`,`zoneid`,`optional`) VALUES (%u,%u,%u,%u,'%s','%s','%s',%u,%u,%u,%u,%u,%u)", ourAct.id, ourAct.activityId, ourAct.step, ourAct.activityType, MakeStringSQLSafe(ourAct.text1).mb_str(), MakeStringSQLSafe(ourAct.text2).mb_str(), MakeStringSQLSafe(ourAct.text3).mb_str(), ourAct.goalid, ourAct.goalmethod, ourAct.goalcount, ourAct.deliverToNpc, ourAct.zoneid, ourAct.optional); mErrorLog->Log(eqEmuLogSQL, "%s", mQuery); if (mysql_query(mMysql, mQuery)) { diff --git a/utils/TaskMaster/base_utility.cpp b/utils/TaskMaster/base_utility.cpp index 96dcf9e3a..d507bdb89 100644 --- a/utils/TaskMaster/base_utility.cpp +++ b/utils/TaskMaster/base_utility.cpp @@ -241,44 +241,43 @@ bool MainFrame::LoadGoals() return true; } -bool MainFrame::LoadActivities() -{ - if(mMysql){ +bool MainFrame::LoadActivities() { + if (mMysql) { mErrorLog->Log(eqEmuLogBoth, "Loading Activities..."); unsigned int activitiesLoaded = 0; - MYSQL_RES *res; - MYSQL_ROW row; + MYSQL_RES *res; + MYSQL_ROW row; - if (mysql_query(mMysql, "SELECT taskid, activityid, step, activitytype, text1, text2, text3, goalid, goalmethod, goalcount, delivertonpc, zoneid, optional FROM activities")) { + if (mysql_query(mMysql, + "SELECT taskid, activityid, step, activitytype, text1, text2, text3, goalid, goalmethod, goalcount, delivertonpc, zoneid, optional FROM `task_activities`")) { mErrorLog->Log(eqEmuLogBoth, "MySQL Connection Error: %s", mysql_error(mMysql)); return false; } - res = mysql_use_result(mMysql); - while ((row = mysql_fetch_row(res)) != NULL){ + res = mysql_use_result(mMysql); + while ((row = mysql_fetch_row(res)) != NULL) { eqtask_activities newAL; - newAL.id = atoi(row[0]); - newAL.activityId = atoi(row[1]); - newAL.step = atoi(row[2]); + newAL.id = atoi(row[0]); + newAL.activityId = atoi(row[1]); + newAL.step = atoi(row[2]); newAL.activityType = atoi(row[3]); strcpy(newAL.text1, row[4]); strcpy(newAL.text2, row[5]); strcpy(newAL.text3, row[6]); - newAL.goalid = atoi(row[7]); - newAL.goalmethod = atoi(row[8]); - newAL.goalcount = atoi(row[9]); + newAL.goalid = atoi(row[7]); + newAL.goalmethod = atoi(row[8]); + newAL.goalcount = atoi(row[9]); newAL.deliverToNpc = atoi(row[10]); - newAL.zoneid = atoi(row[11]); - newAL.optional = atoi(row[12]) ? true : false; + newAL.zoneid = atoi(row[11]); + newAL.optional = atoi(row[12]) ? true : false; taskActivitiesList.push_back(newAL); activitiesLoaded++; } mErrorLog->Log(eqEmuLogBoth, "%u Successfully Loaded Activities", activitiesLoaded); mysql_free_result(res); - } - else{ + } else { mErrorLog->Log(eqEmuLogBoth, "Mysql connection did not exist for activity load."); return false; } diff --git a/utils/sql/git/required/2018_07_09_tasks.sql b/utils/sql/git/required/2018_07_09_tasks.sql index 216a8c071..fdc9daada 100644 --- a/utils/sql/git/required/2018_07_09_tasks.sql +++ b/utils/sql/git/required/2018_07_09_tasks.sql @@ -19,3 +19,4 @@ ALTER TABLE `activities` DROP COLUMN `text3`; ALTER TABLE `activities` DROP COLUMN `zoneid`; ALTER TABLE `tasks` DROP COLUMN `startzone`; ALTER TABLE `tasks` ADD `faction_reward` INT(10) NOT NULL DEFAULT '0'; +RENAME TABLE `activities` TO `task_activities`; \ No newline at end of file diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 3739a41f0..a00ecc73a 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -175,14 +175,14 @@ bool TaskManager::LoadTasks(int singleTask) query = StringFormat("SELECT `taskid`, `step`, `activityid`, `activitytype`, `target_name`, `item_list`, " "`skill_list`, `spell_list`, `description_override`, `goalid`, `goalmethod`, " - "`goalcount`, `delivertonpc`, `zones`, `optional` FROM `activities` WHERE `taskid` < " + "`goalcount`, `delivertonpc`, `zones`, `optional` FROM `task_activities` WHERE `taskid` < " "%i AND `activityid` < %i ORDER BY taskid, activityid ASC", MAXTASKS, MAXACTIVITIESPERTASK); else query = StringFormat("SELECT `taskid`, `step`, `activityid`, `activitytype`, `target_name`, `item_list`, " "`skill_list`, `spell_list`, `description_override`, `goalid`, `goalmethod`, " - "`goalcount`, `delivertonpc`, `zones`, `optional` FROM `activities` WHERE `taskid` = " + "`goalcount`, `delivertonpc`, `zones`, `optional` FROM `task_activities` WHERE `taskid` = " "%i AND `activityid` < %i ORDER BY taskid, activityid ASC", singleTask, MAXACTIVITIESPERTASK); results = database.QueryDatabase(query); From e4d8915c9dff238a20f71d76ba3ae624a48bf84b Mon Sep 17 00:00:00 2001 From: Akkadius Date: Tue, 10 Jul 2018 02:24:55 -0500 Subject: [PATCH 291/670] Make it so DataBuckets set_data can take time formats such as 1s, 1m, 1d, 1y --- changelog.txt | 11 ++++++++ zone/data_bucket.cpp | 62 ++++++++++++++++++++++++++++++++++++++---- zone/data_bucket.h | 3 +- zone/embparser_api.cpp | 8 +++--- zone/lua_general.cpp | 6 ++-- 5 files changed, 77 insertions(+), 13 deletions(-) diff --git a/changelog.txt b/changelog.txt index 507bbd7d1..7ba6c61c9 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,16 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 07/10/2018 == +Akkadius: Adjusted DataBuckets to use other acceptable time formats + Example: quest::set_data('key', 'value', '1d'); + - Acceptable inputs: + - 15s = 15 seconds + - s15 = 15 seconds + - 60m = 60 minutes + - 7d = 7 days + - 1y = 1 year + - 600 = 600 seconds + == 07/09/2018 == mackal: Rework of Task System, Shared Tasks still unsupported - The tables now have better named columns, which hopefully won't need to be explained diff --git a/zone/data_bucket.cpp b/zone/data_bucket.cpp index 29ec9e0e7..fde15d60f 100644 --- a/zone/data_bucket.cpp +++ b/zone/data_bucket.cpp @@ -3,21 +3,34 @@ #include "../common/string_util.h" #include "zonedb.h" #include +#include +#include /** * Persists data via bucket_name as key * @param bucket_key * @param bucket_value + * @param expires_time */ -void DataBucket::SetData(std::string bucket_key, std::string bucket_value, uint32 expires_at_unix) { +void DataBucket::SetData(std::string bucket_key, std::string bucket_value, std::string expires_time) { uint64 bucket_id = DataBucket::DoesBucketExist(bucket_key); std::string query; + long long expires_time_unix = 0; + + if (!expires_time.empty()) { + if (isalpha(expires_time[0]) || isalpha(expires_time[expires_time.length() - 1])) { + Log(Logs::General, Logs::Normal, "String check successful"); + expires_time_unix = (long long) std::time(nullptr) + DataBucket::ParseStringTimeToInt(expires_time); + } else { + expires_time_unix = (long long) std::time(nullptr) + atoi(expires_time.c_str()); + } + } if (bucket_id > 0) { std::string update_expired_time; - if (expires_at_unix > 0) { - update_expired_time = StringFormat(", `expires` = %u ", expires_at_unix); + if (expires_time_unix > 0) { + update_expired_time = StringFormat(", `expires` = %lld ", expires_time_unix); } query = StringFormat( @@ -29,10 +42,10 @@ void DataBucket::SetData(std::string bucket_key, std::string bucket_value, uint3 } else { query = StringFormat( - "INSERT INTO `data_buckets` (`key`, `value`, `expires`) VALUES ('%s', '%s', '%u')", + "INSERT INTO `data_buckets` (`key`, `value`, `expires`) VALUES ('%s', '%s', '%lld')", EscapeString(bucket_key).c_str(), EscapeString(bucket_value).c_str(), - expires_at_unix + expires_time_unix ); } @@ -102,4 +115,43 @@ bool DataBucket::DeleteData(std::string bucket_key) { auto results = database.QueryDatabase(query); return results.Success(); +} + +/** + * Converts string to integer for use when setting expiration times + * @param time_string + * @return + */ +uint32 DataBucket::ParseStringTimeToInt(std::string time_string) +{ + uint32 duration = 0; + + std::transform(time_string.begin(), time_string.end(), time_string.begin(), ::tolower); + + if (time_string.length() < 1) + return 0; + + std::string time_unit = time_string; + time_unit.erase(remove_if(time_unit.begin(), time_unit.end(), [](char c) { return !isdigit(c); }), time_unit.end()); + + Log(Logs::General, Logs::Normal, "ParseStringTimeToInt after erase %s", time_unit.c_str()); + + uint32 unit = static_cast(atoi(time_unit.c_str())); + + Log(Logs::General, Logs::Normal, "ParseStringTimeToInt seconds %u string %s", unit, time_string.c_str()); + + if (time_string.find('s') != std::string::npos) + duration = unit; + if (time_string.find('m') != std::string::npos) + duration = unit * 60; + if (time_string.find('h') != std::string::npos) + duration = unit * 3600; + if (time_string.find('d') != std::string::npos) + duration = unit * 86400; + if (time_string.find('y') != std::string::npos) + duration = unit * 31556926; + + Log(Logs::General, Logs::Normal, "ParseStringTimeToInt returning %u", duration); + + return duration; } \ No newline at end of file diff --git a/zone/data_bucket.h b/zone/data_bucket.h index 364ff1cc0..87d3ab0b3 100644 --- a/zone/data_bucket.h +++ b/zone/data_bucket.h @@ -11,11 +11,12 @@ class DataBucket { public: - static void SetData(std::string bucket_key, std::string bucket_value, uint32 expires_at_unix = 0); + static void SetData(std::string bucket_key, std::string bucket_value, std::string expires_time = ""); static bool DeleteData(std::string bucket_key); static std::string GetData(std::string bucket_key); private: static uint64 DoesBucketExist(std::string bucket_key); + static uint32 ParseStringTimeToInt(std::string time_string); }; diff --git a/zone/embparser_api.cpp b/zone/embparser_api.cpp index 7725ea37a..18c84ccdd 100644 --- a/zone/embparser_api.cpp +++ b/zone/embparser_api.cpp @@ -3521,16 +3521,16 @@ XS(XS__set_data); XS(XS__set_data) { dXSARGS; if (items != 2 && items != 3) { - Perl_croak(aTHX_ "Usage: quest::set_data(string key, string value, [uint32 expire_time_unix = 0])"); + Perl_croak(aTHX_ "Usage: quest::set_data(string key, string value, [string expires_at = 0])"); } else { std::string key = (std::string) SvPV_nolen(ST(0)); std::string value = (std::string) SvPV_nolen(ST(1)); - uint32 expires_at_unix = 0; + std::string expires_at; if (items == 3) - expires_at_unix = (uint32) SvIV(ST(2)); + expires_at = (std::string) SvPV_nolen(ST(2)); - DataBucket::SetData(key, value, expires_at_unix); + DataBucket::SetData(key, value, expires_at); } XSRETURN_EMPTY; } diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp index b7a075c17..280c6ad9b 100644 --- a/zone/lua_general.cpp +++ b/zone/lua_general.cpp @@ -826,8 +826,8 @@ void lua_set_data(std::string bucket_key, std::string bucket_value) { DataBucket::SetData(bucket_key, bucket_value); } -void lua_set_data(std::string bucket_key, std::string bucket_value, uint32 expires_at_unix) { - DataBucket::SetData(bucket_key, bucket_value, expires_at_unix); +void lua_set_data(std::string bucket_key, std::string bucket_value, std::string expires_at) { + DataBucket::SetData(bucket_key, bucket_value, expires_at); } bool lua_delete_data(std::string bucket_key) { @@ -1677,7 +1677,7 @@ luabind::scope lua_register_general() { luabind::def("say_link", (std::string(*)(const char*))&lua_say_link), luabind::def("get_data", (std::string(*)(std::string))&lua_get_data), luabind::def("set_data", (void(*)(std::string, std::string))&lua_set_data), - luabind::def("set_data", (void(*)(std::string, std::string, uint32))&lua_set_data), + luabind::def("set_data", (void(*)(std::string, std::string, std::string))&lua_set_data), luabind::def("delete_data", (bool(*)(std::string))&lua_delete_data), luabind::def("get_guild_name_by_id", &lua_get_guild_name_by_id), luabind::def("create_instance", &lua_create_instance), From cc4924ebfc5b10ea28548a131ea49d40cda26f52 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Tue, 10 Jul 2018 02:35:51 -0500 Subject: [PATCH 292/670] Remove log messages [skip ci] --- zone/data_bucket.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/zone/data_bucket.cpp b/zone/data_bucket.cpp index fde15d60f..d1bdcd83c 100644 --- a/zone/data_bucket.cpp +++ b/zone/data_bucket.cpp @@ -20,7 +20,6 @@ void DataBucket::SetData(std::string bucket_key, std::string bucket_value, std:: if (!expires_time.empty()) { if (isalpha(expires_time[0]) || isalpha(expires_time[expires_time.length() - 1])) { - Log(Logs::General, Logs::Normal, "String check successful"); expires_time_unix = (long long) std::time(nullptr) + DataBucket::ParseStringTimeToInt(expires_time); } else { expires_time_unix = (long long) std::time(nullptr) + atoi(expires_time.c_str()); @@ -134,12 +133,8 @@ uint32 DataBucket::ParseStringTimeToInt(std::string time_string) std::string time_unit = time_string; time_unit.erase(remove_if(time_unit.begin(), time_unit.end(), [](char c) { return !isdigit(c); }), time_unit.end()); - Log(Logs::General, Logs::Normal, "ParseStringTimeToInt after erase %s", time_unit.c_str()); - uint32 unit = static_cast(atoi(time_unit.c_str())); - Log(Logs::General, Logs::Normal, "ParseStringTimeToInt seconds %u string %s", unit, time_string.c_str()); - if (time_string.find('s') != std::string::npos) duration = unit; if (time_string.find('m') != std::string::npos) @@ -151,7 +146,5 @@ uint32 DataBucket::ParseStringTimeToInt(std::string time_string) if (time_string.find('y') != std::string::npos) duration = unit * 31556926; - Log(Logs::General, Logs::Normal, "ParseStringTimeToInt returning %u", duration); - return duration; } \ No newline at end of file From b8eff702df470b3d5eadeb0ebc0f66281c08a326 Mon Sep 17 00:00:00 2001 From: Athrogate Date: Tue, 10 Jul 2018 09:46:54 -0400 Subject: [PATCH 293/670] Exposing get_instance_timer to lua --- zone/lua_general.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp index 280c6ad9b..0474efd75 100644 --- a/zone/lua_general.cpp +++ b/zone/lua_general.cpp @@ -1684,6 +1684,7 @@ luabind::scope lua_register_general() { luabind::def("destroy_instance", &lua_destroy_instance), luabind::def("update_instance_timer", &lua_update_instance_timer), luabind::def("get_instance_id", &lua_get_instance_id), + luabind::def("get_instance_timer", &lua_get_instance_timer), luabind::def("get_characters_in_instance", &lua_get_characters_in_instance), luabind::def("assign_to_instance", &lua_assign_to_instance), luabind::def("assign_group_to_instance", &lua_assign_group_to_instance), From 1d0b11acdecdc99bea6a30062314eb3943c35f19 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Tue, 10 Jul 2018 13:02:53 -0400 Subject: [PATCH 294/670] Fix get_instance_timer_by_id too --- zone/lua_general.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp index 0474efd75..da62dc305 100644 --- a/zone/lua_general.cpp +++ b/zone/lua_general.cpp @@ -1684,7 +1684,8 @@ luabind::scope lua_register_general() { luabind::def("destroy_instance", &lua_destroy_instance), luabind::def("update_instance_timer", &lua_update_instance_timer), luabind::def("get_instance_id", &lua_get_instance_id), - luabind::def("get_instance_timer", &lua_get_instance_timer), + luabind::def("get_instance_timer", &lua_get_instance_timer), + luabind::def("get_instance_timer_by_id", &lua_get_instance_timer_by_id), luabind::def("get_characters_in_instance", &lua_get_characters_in_instance), luabind::def("assign_to_instance", &lua_assign_to_instance), luabind::def("assign_group_to_instance", &lua_assign_group_to_instance), From ac4117d815afdbf6da7cffba82e25a1508db7fda Mon Sep 17 00:00:00 2001 From: Chris Miles Date: Tue, 10 Jul 2018 23:57:11 -0500 Subject: [PATCH 295/670] Update character_table_list.txt --- utils/sql/character_table_list.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/utils/sql/character_table_list.txt b/utils/sql/character_table_list.txt index 2a902d009..4d70051ec 100644 --- a/utils/sql/character_table_list.txt +++ b/utils/sql/character_table_list.txt @@ -1,19 +1,26 @@ adventure_stats char_recipe_list +character_auras character_activities character_alt_currency character_alternate_abilities character_bandolier character_bind +character_buffs +character_corpse_items +character_corpses character_currency character_data character_disciplines character_enabledtasks character_inspect_messages +character_item_recast character_languages character_leadership_abilities character_material character_memmed_spells +character_pet_buffs +character_pet_inventory character_potionbelt character_skills character_spells From d0956194af50a352131183da27487df3b621c6b4 Mon Sep 17 00:00:00 2001 From: Chris Miles Date: Wed, 11 Jul 2018 00:02:48 -0500 Subject: [PATCH 296/670] Update system_tables.txt [skip ci] --- utils/sql/system_tables.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/sql/system_tables.txt b/utils/sql/system_tables.txt index ba1489b65..bf183f891 100644 --- a/utils/sql/system_tables.txt +++ b/utils/sql/system_tables.txt @@ -5,7 +5,7 @@ aa_required_level_cost aa_ranks aa_rank_effects aa_rank_prereqs -activities +task_activities adventure_template adventure_template_entry adventure_template_entry_flavor @@ -97,4 +97,4 @@ zone zone_points zone_server zone_state_dump -zoneserver_auth \ No newline at end of file +zoneserver_auth From 37ff8c830d55a79ac04e16126197e0aeb6f7aa85 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 14 Jul 2018 17:41:42 -0400 Subject: [PATCH 297/670] Fix /camp rest timer exploit --- common/timer.cpp | 2 +- common/timer.h | 2 +- zone/client.cpp | 47 ++++++++++++++--------------------------- zone/client.h | 10 +++------ zone/client_process.cpp | 9 ++++---- zone/hate_list.cpp | 4 +--- 6 files changed, 27 insertions(+), 47 deletions(-) diff --git a/common/timer.cpp b/common/timer.cpp index 3b5d8f15e..120e3dea7 100644 --- a/common/timer.cpp +++ b/common/timer.cpp @@ -129,7 +129,7 @@ void Timer::SetTimer(uint32 set_timer_time) { } } -uint32 Timer::GetRemainingTime() { +uint32 Timer::GetRemainingTime() const { if (enabled) { if (current_time - start_time > timer_time) return 0; diff --git a/common/timer.h b/common/timer.h index f06f5bbe4..6678be952 100644 --- a/common/timer.h +++ b/common/timer.h @@ -40,7 +40,7 @@ public: void Disable(); void Start(uint32 set_timer_time=0, bool ChangeResetTimer = true); void SetTimer(uint32 set_timer_time=0); - uint32 GetRemainingTime(); + uint32 GetRemainingTime() const; inline const uint32& GetTimerTime() { return timer_time; } inline const uint32& GetSetAtTrigger() { return set_at_trigger; } void Trigger(); diff --git a/zone/client.cpp b/zone/client.cpp index bbe2c2512..f50d60e8c 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -325,9 +325,6 @@ Client::Client(EQStreamInterface* ieqs) initial_respawn_selection = 0; alternate_currency_loaded = false; - EngagedRaidTarget = false; - SavedRaidRestTimer = 0; - interrogateinv_flag = false; trapid = 0; @@ -630,7 +627,7 @@ bool Client::Save(uint8 iCommitNow) { /* Total Time Played */ TotalSecondsPlayed += (time(nullptr) - m_pp.lastlogin); m_pp.timePlayedMin = (TotalSecondsPlayed / 60); - m_pp.RestTimer = rest_timer.GetRemainingTime() / 1000; + m_pp.RestTimer = GetRestTimer(); /* Save Mercs */ if (GetMercInfo().MercTimerRemaining > RuleI(Mercs, UpkeepIntervalMS)) { @@ -4594,29 +4591,31 @@ int Client::GetAggroCount() { return AggroCount; } -void Client::IncrementAggroCount() { - +// we pass in for book keeping if RestRegen is enabled +void Client::IncrementAggroCount(bool raid_target) +{ // This method is called when a client is added to a mob's hate list. It turns the clients aggro flag on so // rest state regen is stopped, and for SoF, it sends the opcode to show the crossed swords in-combat indicator. - // - // AggroCount++; if(!RuleB(Character, RestRegenEnabled)) return; + uint32 newtimer = raid_target ? RuleI(Character, RestRegenRaidTimeToActivate) : RuleI(Character, RestRegenTimeToActivate); + + m_pp.RestTimer = std::max(m_pp.RestTimer, newtimer); + // If we already had aggro before this method was called, the combat indicator should already be up for SoF clients, // so we don't need to send it again. // if(AggroCount > 1) return; - // Pause the rest timer + // Pause the rest timer, it's possible the new timer is a non-raid timer we're currently ticking down on a raid timer if (AggroCount == 1) - SavedRaidRestTimer = rest_timer.GetRemainingTime(); + m_pp.RestTimer = std::max(m_pp.RestTimer, rest_timer.GetRemainingTime() / 1000); if (ClientVersion() >= EQEmu::versions::ClientVersion::SoF) { - auto outapp = new EQApplicationPacket(OP_RestState, 1); char *Buffer = (char *)outapp->pBuffer; VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0x01); @@ -4626,12 +4625,11 @@ void Client::IncrementAggroCount() { } -void Client::DecrementAggroCount() { - +void Client::DecrementAggroCount() +{ // This should be called when a client is removed from a mob's hate list (it dies or is memblurred). // It checks whether any other mob is aggro on the player, and if not, starts the rest timer. // For SoF, the opcode to start the rest state countdown timer in the UI is sent. - // // If we didn't have aggro before, this method should not have been called. if(!AggroCount) @@ -4643,29 +4641,16 @@ void Client::DecrementAggroCount() { return; // Something else is still aggro on us, can't rest yet. - if(AggroCount) return; + if (AggroCount) + return; - uint32 time_until_rest; - if (GetEngagedRaidTarget()) { - time_until_rest = RuleI(Character, RestRegenRaidTimeToActivate) * 1000; - SetEngagedRaidTarget(false); - } else { - if (SavedRaidRestTimer > (RuleI(Character, RestRegenTimeToActivate) * 1000)) { - time_until_rest = SavedRaidRestTimer; - SavedRaidRestTimer = 0; - } else { - time_until_rest = RuleI(Character, RestRegenTimeToActivate) * 1000; - } - } - - rest_timer.Start(time_until_rest); + rest_timer.Start(m_pp.RestTimer * 1000); if (ClientVersion() >= EQEmu::versions::ClientVersion::SoF) { - auto outapp = new EQApplicationPacket(OP_RestState, 5); char *Buffer = (char *)outapp->pBuffer; VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0x00); - VARSTRUCT_ENCODE_TYPE(uint32, Buffer, (uint32)(time_until_rest / 1000)); + VARSTRUCT_ENCODE_TYPE(uint32, Buffer, m_pp.RestTimer); QueuePacket(outapp); safe_delete(outapp); } diff --git a/zone/client.h b/zone/client.h index f058ee180..7d0982fc2 100644 --- a/zone/client.h +++ b/zone/client.h @@ -1074,7 +1074,7 @@ public: void ClearPendingAdventureData(); int GetAggroCount(); - void IncrementAggroCount(); + void IncrementAggroCount(bool raid_target = false); void DecrementAggroCount(); void SendPVPStats(); void SendDisciplineTimers(); @@ -1278,9 +1278,6 @@ public: int mod_food_value(const EQEmu::ItemData *item, int change); int mod_drink_value(const EQEmu::ItemData *item, int change); - void SetEngagedRaidTarget(bool value) { EngagedRaidTarget = value; } - bool GetEngagedRaidTarget() const { return EngagedRaidTarget; } - void ShowNumHits(); // work around function for numhits not showing on buffs void TripInterrogateInvState() { interrogateinv_flag = true; } @@ -1398,6 +1395,8 @@ private: void DoManaRegen(); void DoStaminaHungerUpdate(); void CalcRestState(); + // if they have aggro (AggroCount != 0) their timer is saved in m_pp.RestTimer, else we need to get current timer + inline uint32 GetRestTimer() const { return AggroCount ? m_pp.RestTimer : rest_timer.GetRemainingTime() / 1000; } uint32 pLastUpdate; uint32 pLastUpdateWZ; @@ -1565,9 +1564,6 @@ private: float AreaManaRegen; float AreaEndRegen; - bool EngagedRaidTarget; - uint32 SavedRaidRestTimer; - std::set zone_flags; ClientTaskState *taskstate; diff --git a/zone/client_process.cpp b/zone/client_process.cpp index ce5e6d5c9..bd14dc70a 100644 --- a/zone/client_process.cpp +++ b/zone/client_process.cpp @@ -1933,12 +1933,11 @@ void Client::DoEnduranceUpkeep() { SetEndurUpkeep(false); } -void Client::CalcRestState() { - +void Client::CalcRestState() +{ // This method calculates rest state HP and mana regeneration. // The client must have been out of combat for RuleI(Character, RestRegenTimeToActivate) seconds, // must be sitting down, and must not have any detrimental spells affecting them. - // if(!RuleB(Character, RestRegenEnabled)) return; @@ -1950,6 +1949,9 @@ void Client::CalcRestState() { if(!rest_timer.Check(false)) return; + // so we don't have aggro, our timer has expired, we do not want this to cause issues + m_pp.RestTimer = 0; + uint32 buff_count = GetMaxTotalSlots(); for (unsigned int j = 0; j < buff_count; j++) { if(buffs[j].spellid != SPELL_UNKNOWN) { @@ -1960,7 +1962,6 @@ void Client::CalcRestState() { } ooc_regen = true; - } void Client::DoTracking() diff --git a/zone/hate_list.cpp b/zone/hate_list.cpp index 5af9da7d9..f02cbe6b6 100644 --- a/zone/hate_list.cpp +++ b/zone/hate_list.cpp @@ -207,9 +207,7 @@ void HateList::AddEntToHateList(Mob *in_entity, int32 in_hate, int32 in_damage, parse->EventNPC(EVENT_HATE_LIST, hate_owner->CastToNPC(), in_entity, "1", 0); if (in_entity->IsClient()) { - if (hate_owner->CastToNPC()->IsRaidTarget()) - in_entity->CastToClient()->SetEngagedRaidTarget(true); - in_entity->CastToClient()->IncrementAggroCount(); + in_entity->CastToClient()->IncrementAggroCount(hate_owner->CastToNPC()->IsRaidTarget()); } } } From 18005ac7a995739f5509b48746d08609c093779c Mon Sep 17 00:00:00 2001 From: Uleat Date: Sat, 14 Jul 2018 18:41:47 -0400 Subject: [PATCH 298/670] Fix for random SoF client crashes (possibly Titanium too) --- zone/client.cpp | 13 +++++++++---- zone/entity.cpp | 5 ++++- zone/entity.h | 2 +- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/zone/client.cpp b/zone/client.cpp index f50d60e8c..68645309e 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -1862,6 +1862,9 @@ void Client::CheckManaEndUpdate() { mana_change->stamina = current_endurance; mana_change->spell_id = casting_spell_id; mana_change->keepcasting = 1; + mana_change->padding[0] = 0; + mana_change->padding[1] = 0; + mana_change->padding[2] = 0; outapp->priority = 6; QueuePacket(outapp); safe_delete(outapp); @@ -1883,8 +1886,9 @@ void Client::CheckManaEndUpdate() { mana_update->cur_mana = GetMana(); mana_update->max_mana = GetMaxMana(); mana_update->spawn_id = GetID(); - QueuePacket(mana_packet); - entity_list.QueueClientsByXTarget(this, mana_packet, false); + if ((ClientVersionBit() & EQEmu::versions::ClientVersionBit::bit_SoDAndLater) != 0) + QueuePacket(mana_packet); // do we need this with the OP_ManaChange packet above? + entity_list.QueueClientsByXTarget(this, mana_packet, false, EQEmu::versions::ClientVersionBit::bit_SoDAndLater); safe_delete(mana_packet); last_reported_mana_percent = this->GetManaPercent(); @@ -1907,8 +1911,9 @@ void Client::CheckManaEndUpdate() { endurance_update->cur_end = GetEndurance(); endurance_update->max_end = GetMaxEndurance(); endurance_update->spawn_id = GetID(); - QueuePacket(endurance_packet); - entity_list.QueueClientsByXTarget(this, endurance_packet, false); + if ((ClientVersionBit() & EQEmu::versions::ClientVersionBit::bit_SoDAndLater) != 0) + QueuePacket(endurance_packet); // do we need this with the OP_ManaChange packet above? + entity_list.QueueClientsByXTarget(this, endurance_packet, false, EQEmu::versions::ClientVersionBit::bit_SoDAndLater); safe_delete(endurance_packet); last_reported_endurance_percent = this->GetEndurancePercent(); diff --git a/zone/entity.cpp b/zone/entity.cpp index d1106c449..264b8cfc9 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -1546,7 +1546,7 @@ void EntityList::QueueClientsByTarget(Mob *sender, const EQApplicationPacket *ap } } -void EntityList::QueueClientsByXTarget(Mob *sender, const EQApplicationPacket *app, bool iSendToSender) +void EntityList::QueueClientsByXTarget(Mob *sender, const EQApplicationPacket *app, bool iSendToSender, EQEmu::versions::ClientVersionBit client_version_bits) { auto it = client_list.begin(); while (it != client_list.end()) { @@ -1556,6 +1556,9 @@ void EntityList::QueueClientsByXTarget(Mob *sender, const EQApplicationPacket *a if (!c || ((c == sender) && !iSendToSender)) continue; + if ((c->ClientVersionBit() & client_version_bits) == 0) + continue; + if (!c->IsXTarget(sender)) continue; diff --git a/zone/entity.h b/zone/entity.h index ce3215ac5..f296a8cb4 100644 --- a/zone/entity.h +++ b/zone/entity.h @@ -353,7 +353,7 @@ public: void QueueClientsByTarget(Mob* sender, const EQApplicationPacket* app, bool iSendToSender = true, Mob* SkipThisMob = 0, bool ackreq = true, bool HoTT = true, uint32 ClientVersionBits = 0xFFFFFFFF, bool inspect_buffs = false); - void QueueClientsByXTarget(Mob* sender, const EQApplicationPacket* app, bool iSendToSender = true); + void QueueClientsByXTarget(Mob* sender, const EQApplicationPacket* app, bool iSendToSender = true, EQEmu::versions::ClientVersionBit client_version_bits = EQEmu::versions::ClientVersionBit::bit_AllClients); void QueueToGroupsForNPCHealthAA(Mob* sender, const EQApplicationPacket* app); void QueueManaged(Mob* sender, const EQApplicationPacket* app, bool ignore_sender=false, bool ackreq = true); From 6ab2871fd10a2b4c4f8f434b8b2949cce2e49e09 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 14 Jul 2018 18:50:02 -0400 Subject: [PATCH 299/670] Beneficial spells will now correctly inherit targets RestTimer Example PC A is fighting mob B. PC C casts a heal on PC A. PC C will inherit the timer from PC A. This is done because beneficial spells have a "witness" check from NPCs so there is a chance PC C would not gain aggro and could just keep on going with no RestTimer which allows them to fast regen while actively participating. --- zone/client.cpp | 31 +++++++++++++++++++++++++++++++ zone/client.h | 1 + zone/spells.cpp | 2 ++ 3 files changed, 34 insertions(+) diff --git a/zone/client.cpp b/zone/client.cpp index 68645309e..82bca086e 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -4608,6 +4608,7 @@ void Client::IncrementAggroCount(bool raid_target) uint32 newtimer = raid_target ? RuleI(Character, RestRegenRaidTimeToActivate) : RuleI(Character, RestRegenTimeToActivate); + // save the new timer if it's higher m_pp.RestTimer = std::max(m_pp.RestTimer, newtimer); // If we already had aggro before this method was called, the combat indicator should already be up for SoF clients, @@ -4661,6 +4662,36 @@ void Client::DecrementAggroCount() } } +// when we cast a beneficial spell we need to steal our targets current timer +// That's what we use this for +void Client::UpdateRestTimer(uint32 new_timer) +{ + // their timer was 0, so we don't do anything + if (new_timer == 0) + return; + + if (!RuleB(Character, RestRegenEnabled)) + return; + + // so if we're currently on aggro, we check our saved timer + if (AggroCount) { + if (m_pp.RestTimer < new_timer) // our timer needs to be updated, don't need to update client here + m_pp.RestTimer = new_timer; + } else { // if we're not aggro, we need to check if current timer needs updating + if (rest_timer.GetRemainingTime() < new_timer) { + rest_timer.Start(new_timer); + if (ClientVersion() >= EQEmu::versions::ClientVersion::SoF) { + auto outapp = new EQApplicationPacket(OP_RestState, 5); + char *Buffer = (char *)outapp->pBuffer; + VARSTRUCT_ENCODE_TYPE(uint8, Buffer, 0x00); + VARSTRUCT_ENCODE_TYPE(uint32, Buffer, new_timer); + QueuePacket(outapp); + safe_delete(outapp); + } + } + } +} + void Client::SendPVPStats() { // This sends the data to the client to populate the PVP Stats Window. diff --git a/zone/client.h b/zone/client.h index 7d0982fc2..77b509e4f 100644 --- a/zone/client.h +++ b/zone/client.h @@ -1397,6 +1397,7 @@ private: void CalcRestState(); // if they have aggro (AggroCount != 0) their timer is saved in m_pp.RestTimer, else we need to get current timer inline uint32 GetRestTimer() const { return AggroCount ? m_pp.RestTimer : rest_timer.GetRemainingTime() / 1000; } + void UpdateRestTimer(uint32 new_timer); uint32 pLastUpdate; uint32 pLastUpdateWZ; diff --git a/zone/spells.cpp b/zone/spells.cpp index 537e7358e..6edda023c 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -3895,6 +3895,8 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r spelltar->SetHateAmountOnEnt(this, std::max(newhate, 1)); } } else if (IsBeneficialSpell(spell_id) && !IsSummonPCSpell(spell_id)) { + if (spelltar->IsClient() && IsClient()) + CastToClient()->UpdateRestTimer(spelltar->CastToClient()->GetRestTimer()); entity_list.AddHealAggro( spelltar, this, CheckHealAggroAmount(spell_id, spelltar, (spelltar->GetMaxHP() - spelltar->GetHP()))); From 6ac4154acd4074faf83edba3486a52d054f9cd7a Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 14 Jul 2018 19:19:58 -0400 Subject: [PATCH 300/670] Don't call UpdateRestTimer when you're casting on yourself --- zone/spells.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/spells.cpp b/zone/spells.cpp index 6edda023c..8f8cfba33 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -3895,7 +3895,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r spelltar->SetHateAmountOnEnt(this, std::max(newhate, 1)); } } else if (IsBeneficialSpell(spell_id) && !IsSummonPCSpell(spell_id)) { - if (spelltar->IsClient() && IsClient()) + if (this != spelltar && spelltar->IsClient() && IsClient()) CastToClient()->UpdateRestTimer(spelltar->CastToClient()->GetRestTimer()); entity_list.AddHealAggro( spelltar, this, From 6aba38f6645cd507030775f65056cf3df6c32dfb Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 15 Jul 2018 00:27:51 -0400 Subject: [PATCH 301/670] Bug fix with rest timer changes --- zone/client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/client.cpp b/zone/client.cpp index 82bca086e..1c1d1575d 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -4678,7 +4678,7 @@ void Client::UpdateRestTimer(uint32 new_timer) if (m_pp.RestTimer < new_timer) // our timer needs to be updated, don't need to update client here m_pp.RestTimer = new_timer; } else { // if we're not aggro, we need to check if current timer needs updating - if (rest_timer.GetRemainingTime() < new_timer) { + if (rest_timer.GetRemainingTime() / 1000 < new_timer) { rest_timer.Start(new_timer); if (ClientVersion() >= EQEmu::versions::ClientVersion::SoF) { auto outapp = new EQApplicationPacket(OP_RestState, 5); From 71e309022afc8e546554b6d31f370d94be63c0ce Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 15 Jul 2018 00:34:44 -0400 Subject: [PATCH 302/670] Fun fact, seconds are not milliseconds! --- zone/client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/client.cpp b/zone/client.cpp index 1c1d1575d..3339deb9c 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -4679,7 +4679,7 @@ void Client::UpdateRestTimer(uint32 new_timer) m_pp.RestTimer = new_timer; } else { // if we're not aggro, we need to check if current timer needs updating if (rest_timer.GetRemainingTime() / 1000 < new_timer) { - rest_timer.Start(new_timer); + rest_timer.Start(new_timer * 1000); if (ClientVersion() >= EQEmu::versions::ClientVersion::SoF) { auto outapp = new EQApplicationPacket(OP_RestState, 5); char *Buffer = (char *)outapp->pBuffer; From 59ad6012b17f164fa078e6e61bce2fe5fe5eead5 Mon Sep 17 00:00:00 2001 From: Uleat Date: Sun, 15 Jul 2018 18:22:25 -0400 Subject: [PATCH 303/670] Fix for trading with bots using trade window --- zone/bot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/bot.cpp b/zone/bot.cpp index 30918138d..75417e677 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -3992,7 +3992,7 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli m_inv.PutItem(trade_iterator.toBotSlot, *trade_iterator.tradeItemInstance); this->BotAddEquipItem(trade_iterator.toBotSlot, (trade_iterator.tradeItemInstance ? trade_iterator.tradeItemInstance->GetID() : 0)); - client->DeleteItemInInventory(trade_iterator.fromClientSlot, 0, true); + client->DeleteItemInInventory(trade_iterator.fromClientSlot, 0, (trade_iterator.fromClientSlot == EQEmu::invslot::slotCursor)); trade_iterator.tradeItemInstance = nullptr; } From e12e1c0d9b502b3c7c08b0758177104adb352452 Mon Sep 17 00:00:00 2001 From: Uleat Date: Mon, 16 Jul 2018 02:46:00 -0400 Subject: [PATCH 304/670] Fix (temp) for bot-related appearance packets with id '0' --- zone/bot.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/zone/bot.cpp b/zone/bot.cpp index 75417e677..6d39a7df9 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -3490,17 +3490,21 @@ EQEmu::ItemInstance* Bot::GetBotItem(uint32 slotID) { // Adds the specified item it bot to the NPC equipment array and to the bot inventory collection. void Bot::BotAddEquipItem(int slot, uint32 id) { + // this is being called before bot is assigned an entity id.. + // ..causing packets to be sent out to zone with an id of '0' if(slot > 0 && id > 0) { uint8 materialFromSlot = EQEmu::InventoryProfile::CalcMaterialFromSlot(slot); if (materialFromSlot != EQEmu::textures::materialInvalid) { equipment[slot] = id; // npc has more than just material slots. Valid material should mean valid inventory index - SendWearChange(materialFromSlot); + if (GetID()) // temp hack fix + SendWearChange(materialFromSlot); } UpdateEquipmentLight(); if (UpdateActiveLight()) - SendAppearancePacket(AT_Light, GetActiveLightType()); + if (GetID()) // temp hack fix + SendAppearancePacket(AT_Light, GetActiveLightType()); } } From 0cd4c0ac652a694c3131b967d5f57d9b116e028b Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Tue, 17 Jul 2018 14:52:32 -0400 Subject: [PATCH 305/670] Update system_tables.txt --- utils/sql/system_tables.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/sql/system_tables.txt b/utils/sql/system_tables.txt index bf183f891..7816fea21 100644 --- a/utils/sql/system_tables.txt +++ b/utils/sql/system_tables.txt @@ -24,6 +24,7 @@ faction_list_mod fear_hints fishing forage +global_loot goallists graveyard grid From 22f586f110348d07d31dd901c892714133f0222b Mon Sep 17 00:00:00 2001 From: Uleat Date: Wed, 18 Jul 2018 21:06:21 -0400 Subject: [PATCH 306/670] Update to opcode_handlers.py [ci skip] --- utils/scripts/opcode_handlers.py | 866 +++++++++++++++++-------------- 1 file changed, 476 insertions(+), 390 deletions(-) diff --git a/utils/scripts/opcode_handlers.py b/utils/scripts/opcode_handlers.py index fb3923209..e5a25084a 100644 --- a/utils/scripts/opcode_handlers.py +++ b/utils/scripts/opcode_handlers.py @@ -14,6 +14,7 @@ values, server handler and whether opcodes are translated on tx/rx, etc... import sys import os +import fnmatch from time import time, ctime @@ -23,8 +24,10 @@ VERBOSE = False # messaging: {False - minimal, True - robust} base_path = os.getcwd()[:-14] # '/utils/scripts' base_path = base_path.replace('\\', '/') -client_list = ['6.2', 'Titanium', 'SoF', 'SoD', 'UF', 'RoF', 'RoF2'] -server_list = ['Login', 'World', 'Zone', 'UCS'] +client_list = ['Titanium', 'SoF', 'SoD', 'UF', 'RoF', 'RoF2'] +server_list = ['Login', 'World', 'Zone', 'UCS', 'Common'] # 'Common' is not a server..but, may contain shared functions +server_dir = {'Login': 'loginserver', 'World': 'world', 'Zone': 'zone', 'UCS': 'ucs', 'Common': 'common'} +file_exts = ['cpp', 'h'] client_opcodes = {} # x[key='Client'][key='OP_CodeName'](value='0x####') server_opcodes = {} # x[key='OP_CodeName'](value=) - opcodes apply to all servers @@ -87,12 +90,6 @@ def main(): if fault: faults.append('loadclienttranslators()') - if not fault: - fault = not loadserverhandlers() - - if fault: - faults.append('loadserverhandlers()') - if not fault: fault = not discoverserverhandlers() @@ -280,18 +277,29 @@ def loadclientopcodes(): value = int(data_line[(val_begin + 2):val_end].lower(), 16) if value == 0: + if VERBOSE: + uprint('\nUNDEFINED OPCODE FOUND: ../utils/patches{0}({1}:{2}) [{3}][{4}] = {5}\n'.format( + short_name, + line_no, + key_begin, + client, + data_line[key_begin:key_end], + '0x{0}'.format(hex(value)[2:].zfill(4)) + )) + continue client_opcodes[client][data_line[key_begin:key_end]] = '0x{0}'.format(hex(value)[2:].zfill(4)) - dprint('../utils/patches{0}({1}:{2}) [{3}][{4}] = {5}\n'.format( - short_name, - line_no, - key_begin, - client, - data_line[key_begin:key_end], - client_opcodes[client][data_line[key_begin:key_end]] - )) + if VERBOSE: + dprint('../utils/patches{0}({1}:{2}) [{3}][{4}] = {5}\n'.format( + short_name, + line_no, + key_begin, + client, + data_line[key_begin:key_end], + client_opcodes[client][data_line[key_begin:key_end]] + )) data_file.close() @@ -377,12 +385,13 @@ def loadserveropcodes(): server_opcodes[data_line[val_begin:val_end]] = value value += 1 - dprint('../common/emu_oplist.h({0}:{1}) \'Servers\' [{2}] = {3}\n'.format( - line_no, - val_begin, - data_line[val_begin:val_end], - server_opcodes[data_line[val_begin:val_end]] - )) + if VERBOSE: + dprint('../common/emu_oplist.h({0}:{1}) \'Servers\' [{2}] = {3}\n'.format( + line_no, + val_begin, + data_line[val_begin:val_end], + server_opcodes[data_line[val_begin:val_end]] + )) data_file.close() @@ -409,12 +418,13 @@ def loadserveropcodes(): server_opcodes[data_line[val_begin:val_end]] = value value += 1 - dprint('../common/mail_oplist.h({0}:{1}) \'Servers\' [{2}] = {3}\n'.format( - line_no, - val_begin, - data_line[val_begin:val_end], - server_opcodes[data_line[val_begin:val_end]] - )) + if VERBOSE: + dprint('../common/mail_oplist.h({0}:{1}) \'Servers\' [{2}] = {3}\n'.format( + line_no, + val_begin, + data_line[val_begin:val_end], + server_opcodes[data_line[val_begin:val_end]] + )) data_file.close() @@ -454,10 +464,7 @@ def loadclienttranslators(): for client in client_list: try: - if client == '6.2': - short_name = '/client62_ops.h' - else: - short_name = '/{0}_ops.h'.format(client).lower() + short_name = '/{0}_ops.h'.format(client).lower() file_name = '{0}/common/patches{1}'.format( base_path, @@ -484,23 +491,25 @@ def loadclienttranslators(): if data_line[:1] == 'E': client_encodes[client].append(data_line[val_begin:val_end]) - dprint('..{0}({1}:{2}) \'ENCODE\' [{3}] = {4}\n'.format( - short_name, - line_no, - val_begin, - client, - data_line[val_begin:val_end] - )) + if VERBOSE: + dprint('..{0}({1}:{2}) \'ENCODE\' [{3}] = {4}\n'.format( + short_name, + line_no, + val_begin, + client, + data_line[val_begin:val_end] + )) elif data_line[:1] == 'D': client_decodes[client].append(data_line[val_begin:val_end]) - dprint('..{0}({1}:{2}) \'DECODE\' [{3}] = {4}\n'.format( - short_name, - line_no, - val_begin, - client, - data_line[val_begin:val_end] - )) + if VERBOSE: + dprint('..{0}({1}:{2}) \'DECODE\' [{3}] = {4}\n'.format( + short_name, + line_no, + val_begin, + client, + data_line[val_begin:val_end] + )) data_file.close() @@ -542,180 +551,10 @@ def loadclienttranslators(): return True -def loadserverhandlers(): - """ Load pre-designated SERVER OPCODE HANDLERS """ - - # TODO: handle remarked out definitions in file (i.e., // and /**/) - - dprint('entering \'loadserverhandlers()\'\n') - - bad_servers = [] - - for server in server_list: - try: - if server == 'Login': - vprint('No pre-designated server opcode handlers for \'Login\'') - dprint('->pass: \'Login\' server\n') - - continue - elif server == 'World': - vprint('No pre-designated server opcode handlers for \'World\'') - dprint('->pass: \'World\' server\n') - - continue - elif server == 'Zone': - file_name = '{0}/zone/client_packet.cpp'.format(base_path) - - vprint(file_name) - - with open(file_name, 'r') as data_file: - dprint('->open: \'{0}\' in \'r\' mode\n'.format(file_name)) - - server_handlers[server] = {} - handler_assigns = {} - step_1 = False - step_2 = False - line_no = 0 - hint = 'Near beginning of file' - - for data_line in data_file: - line_no += 1 - read_begin = 0 - - if step_1 is False: - if data_line[:19] == 'void MapOpcodes() {': - step_1 = True - - continue - - if step_2 is False: - if data_line[0:1] == '}': - step_2 = True - - continue - - val_begin = data_line.find('OP_', read_begin) - val_end = data_line.find(']', val_begin) - - if val_begin < 0 or val_end < 0: - continue - - if not data_line[val_begin:val_end] in server_opcodes: - dprint('\nILLEGAL OPCODE FOUND: ../zone/client_packet.cpp({0}:{1}) \'{2}\'\n'.format( - line_no, - val_begin, - data_line[val_begin:val_end] - )) - - continue - - key_begin = data_line.find('Client::', val_end) - key_end = data_line.find(';', key_begin) - - if key_begin < 0 or key_end < 0: - continue - - if not data_line[key_begin:key_end] in handler_assigns: - handler_assigns[data_line[key_begin:key_end]] = data_line[val_begin:val_end] - - continue - - if data_line[:1].isalpha(): - hint_begin = 0 - hint_end = data_line.find('(') - - if not hint_end < 0: - hint_begin = hint_end - 1 - - while not hint_begin < 0: - if data_line[(hint_begin - 1):hint_begin].isspace(): - if not data_line[hint_begin:(hint_begin + 1)].isalpha(): - hint_begin += 1 - - hint = '[RX] Near {0}'.format(data_line[hint_begin:hint_end]) - - break - - hint_begin -= 1 - else: - continue - - if hint[10:] in handler_assigns: - if not handler_assigns[hint[10:]] in server_handlers[server]: - server_handlers[server][handler_assigns[hint[10:]]] = [] - - server_handlers[server][handler_assigns[hint[10:]]].append( - '../zone/client_packet.cpp({0}:{1}) \'{2}\''.format( - line_no, - hint_begin, - hint - ) - ) - - dprint('../zone/client_packet.cpp({0}:{1}) [{2}][{3}] = \'{4}\'\n'.format( - line_no, - hint_begin, - server, - handler_assigns[hint[10:]], - hint - )) - - del handler_assigns[hint[10:]] - - if len(handler_assigns) > 0: - for unhandled in handler_assigns: - dprint('\nUNMATCHED DESIGNATED HANDLER FOUND: ../zone/client_packet.cpp \'{0}\'\n'.format( - unhandled - )) - - data_file.close() - - dprint('->close: \'{0}\'\n'.format(file_name)) - elif server == 'UCS': - vprint('No pre-designated server opcode handlers for \'UCS\'') - dprint('->pass: \'UCS\' server\n') - - continue - else: - vprint('No pre-designated server opcode handlers for \'{0}\''.format(server)) - dprint('->pass: \'{0}\' server\n'.format(server)) - - continue - except: - print('(Exception Error: {0}) loadserverhandlers() [{1}]'.format( - sys.exc_info()[0], - server - )) - - dprint('<-except: \'{0} [{1}]\'\n'.format( - sys.exc_info()[0], - server - )) - - bad_servers.append(server) - - for bad_server in bad_servers: - if bad_server in server_handlers: - vprint('Deleting stale entries for \'{0}\' server...'.format(bad_server)) - - del server_handlers[bad_server] - - dprint('->delete: \'{0}\' server designated handler entries\n'.format(bad_server)) - - dprint('leaving \'loadserverhandlers()\'\n\n') - - return True - - def discoverserverhandlers(): """ Load undefined SERVER OPCODE HANDLERS using 'discovery' method - When adding new servers and/or search locations, use the following format: - - if 'Server' in locations: - locations['Server'].append('//.') - Lists are instantiated for all SERVERS in SERVER LIST. The lists are then appended with location data based on the presence of the SERVER in the parent dictionary. @@ -733,60 +572,20 @@ def discoverserverhandlers(): if not server in locations: locations[server] = [] - if 'Login' in locations: - locations['Login'].append('/loginserver/client.cpp') - locations['Login'].append('/loginserver/server_manager.cpp') - locations['Login'].append('/loginserver/world_server.cpp') + for server in locations: + file_path = '{0}/{1}/'.format(base_path, server_dir[server]) - if 'World' in locations: - locations['World'].append('/world/client.cpp') + file_list = os.listdir(file_path) - if 'Zone' in locations: - locations['Zone'].append('/zone/aa.cpp') - locations['Zone'].append('/zone/attack.cpp') - locations['Zone'].append('/zone/bot.cpp') - locations['Zone'].append('/zone/bot_command.cpp') - locations['Zone'].append('/zone/client.cpp') - locations['Zone'].append('/zone/client_packet.cpp') - locations['Zone'].append('/zone/client_process.cpp') - locations['Zone'].append('/zone/command.cpp') - locations['Zone'].append('/zone/corpse.cpp') - locations['Zone'].append('/zone/doors.cpp') - locations['Zone'].append('/zone/effects.cpp') - locations['Zone'].append('/zone/entity.cpp') - locations['Zone'].append('/zone/exp.cpp') - locations['Zone'].append('/zone/groups.cpp') - locations['Zone'].append('/zone/guild.cpp') - locations['Zone'].append('/zone/guild_mgr.cpp') - locations['Zone'].append('/zone/horse.cpp') - locations['Zone'].append('/zone/inventory.cpp') - locations['Zone'].append('/zone/loottables.cpp') - locations['Zone'].append('/zone/merc.cpp') - locations['Zone'].append('/zone/mob.cpp') - locations['Zone'].append('/zone/mob_ai.cpp') - locations['Zone'].append('/zone/object.cpp') - locations['Zone'].append('/zone/pathing.cpp') - locations['Zone'].append('/zone/petitions.cpp') - locations['Zone'].append('/zone/questmgr.cpp') - locations['Zone'].append('/zone/raids.cpp') - locations['Zone'].append('/zone/special_attacks.cpp') - locations['Zone'].append('/zone/spells.cpp') - locations['Zone'].append('/zone/spell_effects.cpp') - locations['Zone'].append('/zone/tasks.cpp') - locations['Zone'].append('/zone/titles.cpp') - locations['Zone'].append('/zone/tradeskills.cpp') - locations['Zone'].append('/zone/trading.cpp') - locations['Zone'].append('/zone/trap.cpp') - locations['Zone'].append('/zone/tribute.cpp') - locations['Zone'].append('/zone/worldserver.cpp') - locations['Zone'].append('/zone/zone.cpp') - locations['Zone'].append('/zone/zonedb.cpp') - locations['Zone'].append('/zone/zoning.cpp') + for extension in file_exts: + dprint('->file discovery: \'{0}*.{1}\'\n'.format(file_path, extension)) - if 'UCS' in locations: - locations['UCS'].append('/ucs/clientlist.cpp') - locations['UCS'].append('/ucs/database.cpp') + for file_name in fnmatch.filter(file_list, '*.{0}'.format(extension)): + if file_name in ['emu_oplist.h', 'mail_oplist.h', 'opcode_dispatch.h', 'opcode_map.cpp', 'op_codes.h']: + continue + locations[server].append('/{0}/{1}'.format(server_dir[server], file_name)) + for server in server_list: if not server in server_handlers: server_handlers[server] = {} @@ -831,7 +630,385 @@ def discoverserverhandlers(): if op_begin < 0: continue - if data_line[(op_begin - 20):op_begin] == 'EQApplicationPacket(': + # exclusions + if data_line[(op_begin - 6):op_begin] == 'Server': + if VERBOSE: + key_begin = op_begin + key_end = key_begin + 3 + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + + dprint( + '\nUNHANDLED SERVER TALK OPCODE REFERENCE FOUND: ..{0}({1}:{2}) \'{3}\'\n' + '->line: \'{4}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end], + data_line[:-1] + ) + ) + + continue + elif data_line[(op_begin - 1):op_begin].isalnum(): + continue + elif data_line[read_begin:op_begin].find('//', 0) >= 0: + if VERBOSE: + key_begin = op_begin + key_end = key_begin + 3 + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + + dprint( + '\nREMARKED OPCODE REFERENCE FOUND: ..{0}({1}:{2}) \'{3}\'\n' + '->line: \'{4}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end], + data_line[:-1] + ) + ) + + continue + elif data_line[read_begin:op_begin].find('Log(Logs::', 0) >= 0: + if VERBOSE: + key_begin = op_begin + key_end = key_begin + 3 + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + + dprint( + '\nLOGGING OPCODE REFERENCE FOUND: ..{0}({1}:{2}) \'{3}\'\n' + '->line: \'{4}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end], + data_line[:-1] + ) + ) + + continue + elif data_line[read_begin:op_begin].find('Message', 0) >= 0: + if VERBOSE: + key_begin = op_begin + key_end = key_begin + 3 + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + + dprint( + '\nCLIENT MESSAGE OPCODE REFERENCE FOUND: ..{0}({1}:{2}) \'{3}\'\n' + '->line: \'{4}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end], + data_line[:-1] + ) + ) + + continue + elif data_line[read_begin:op_begin].find('std::cout', 0) >= 0: + if VERBOSE: + key_begin = op_begin + key_end = key_begin + 3 + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + + dprint( + '\nCONSOLE MESSAGE OPCODE REFERENCE FOUND: ..{0}({1}:{2}) \'{3}\'\n' + '->line: \'{4}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end], + data_line[:-1] + ) + ) + + continue + elif data_line[read_begin:op_begin].find('MakeAnyLenString', 0) >= 0: + if VERBOSE: + key_begin = op_begin + key_end = key_begin + 3 + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + + dprint( + '\nSTRING FORMAT OPCODE REFERENCE FOUND: ..{0}({1}:{2}) \'{3}\'\n' + '->line: \'{4}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end], + data_line[:-1] + ) + ) + + continue + elif data_line[read_begin:op_begin].find('printf', 0) >= 0: + if VERBOSE: + key_begin = op_begin + key_end = key_begin + 3 + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + + dprint( + '\nSTRING FORMAT OPCODE REFERENCE FOUND: ..{0}({1}:{2}) \'{3}\'\n' + '->line: \'{4}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end], + data_line[:-1] + ) + ) + + continue + elif data_line[read_begin:op_begin].find('VERIFY_PACKET_LENGTH', 0) >= 0: + if VERBOSE: + key_begin = op_begin + key_end = key_begin + 3 + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + + dprint( + '\nPACKET LENGTH OPCODE REFERENCE FOUND: ..{0}({1}:{2}) \'{3}\'\n' + '->line: \'{4}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end], + data_line[:-1] + ) + ) + + continue + elif data_line[read_begin:op_begin].find('ConnectingOpcodes', 0) >= 0: + if VERBOSE: + key_begin = op_begin + key_end = key_begin + 3 + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + + dprint( + '\nOPCODE HANDLER ASSIGNMENT REFERENCE FOUND: ..{0}({1}:{2}) \'{3}\'\n' + '->line: \'{4}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end], + data_line[:-1] + ) + ) + + continue + elif data_line[read_begin:op_begin].find('ConnectedOpcodes', 0) >= 0: + if VERBOSE: + key_begin = op_begin + key_end = key_begin + 3 + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + + dprint( + '\nOPCODE HANDLER ASSIGNMENT REFERENCE FOUND: ..{0}({1}:{2}) \'{3}\'\n' + '->line: \'{4}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end], + data_line[:-1] + ) + ) + + continue + elif data_line[read_begin:op_begin].find('command_add', 0) >= 0: + if VERBOSE: + key_begin = op_begin + key_end = key_begin + 3 + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + + dprint( + '\nCOMMAND HANDLER ASSIGNMENT OPCODE REFERENCE FOUND: ..{0}({1}:{2}) \'{3}\'\n' + '->line: \'{4}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end], + data_line[:-1] + ) + ) + + continue + elif data_line[read_begin:op_begin].find('luabind::value', 0) >= 0: + if VERBOSE: + key_begin = op_begin + key_end = key_begin + 3 + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + + dprint( + '\nLUA API OPCODE ASSIGNMENT REFERENCE FOUND: ..{0}({1}:{2}) \'{3}\'\n' + '->line: \'{4}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end], + data_line[:-1] + ) + ) + + continue + elif data_line[(op_begin - 3):op_begin] == '!= ': + if VERBOSE: + key_begin = op_begin + key_end = key_begin + 3 + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + + dprint( + '\nILL-DEFINED OPCODE CONDITIONAL FOUND: ..{0}({1}:{2}) \'{3}\'\n' + '->line: \'{4}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end], + data_line[:-1] + ) + ) + + continue + elif data_line[(op_begin - 2):op_begin] == '!=': + if VERBOSE: + key_begin = op_begin + key_end = key_begin + 3 + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + + dprint( + '\nILL-DEFINED OPCODE CONDITIONAL FOUND: ..{0}({1}:{2}) \'{3}\'\n' + '->line: \'{4}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end], + data_line[:-1] + ) + ) + + continue + elif data_line[(op_begin - 3):op_begin] == '>= ': + if VERBOSE: + key_begin = op_begin + key_end = key_begin + 3 + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + + dprint( + '\nILL-DEFINED OPCODE CONDITIONAL FOUND: ..{0}({1}:{2}) \'{3}\'\n' + '->line: \'{4}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end], + data_line[:-1] + ) + ) + + continue + elif data_line[(op_begin - 2):op_begin] == '>=': + if VERBOSE: + key_begin = op_begin + key_end = key_begin + 3 + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + + dprint( + '\nILL-DEFINED OPCODE CONDITIONAL FOUND: ..{0}({1}:{2}) \'{3}\'\n' + '->line: \'{4}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end], + data_line[:-1] + ) + ) + + continue + elif data_line[(op_begin - 3):op_begin] == '<= ': + if VERBOSE: + key_begin = op_begin + key_end = key_begin + 3 + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + + dprint( + '\nILL-DEFINED OPCODE CONDITIONAL FOUND: ..{0}({1}:{2}) \'{3}\'\n' + '->line: \'{4}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end], + data_line[:-1] + ) + ) + + continue + elif data_line[(op_begin - 2):op_begin] == '<=': + if VERBOSE: + key_begin = op_begin + key_end = key_begin + 3 + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + + dprint( + '\nILL-DEFINED OPCODE CONDITIONAL FOUND: ..{0}({1}:{2}) \'{3}\'\n' + '->line: \'{4}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end], + data_line[:-1] + ) + ) + + continue + # inclusions + elif data_line[(op_begin - 20):op_begin] == 'EQApplicationPacket(': + key_begin = op_begin + key_end = key_begin + 3 + direction = '[TX]' + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + elif data_line[(op_begin - 1):op_begin] == '(' and data_line[read_begin:op_begin].find('EQApplicationPacket', 0) >= 0: + key_begin = op_begin + key_end = key_begin + 3 + direction = '[TX]' + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + elif data_line[(op_begin - 2):op_begin] == ' (' and data_line[read_begin:op_begin].find('EQApplicationPacket', 0) >= 0: key_begin = op_begin key_end = key_begin + 3 direction = '[TX]' @@ -843,6 +1020,13 @@ def discoverserverhandlers(): key_end = key_begin + 3 direction = '[TX]' + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + elif data_line[(op_begin - 11):op_begin] == '.SetOpcode(': + key_begin = op_begin + key_end = key_begin + 3 + direction = '[TX]' + while data_line[key_end:(key_end + 1)].isalnum(): key_end += 1 elif data_line[(op_begin - 5):op_begin] == 'case ': @@ -850,6 +1034,20 @@ def discoverserverhandlers(): key_end = key_begin + 3 direction = '[RX]' + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + elif data_line[(op_begin - 7):op_begin] == 'Handle_': + key_begin = op_begin + key_end = key_begin + 3 + direction = '[RX]' + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + elif data_line[(op_begin - 15):op_begin] == 'Handle_Connect_': + key_begin = op_begin + key_end = key_begin + 3 + direction = '[RX]' + while data_line[key_end:(key_end + 1)].isalnum(): key_end += 1 elif data_line[(op_begin - 3):op_begin] == '== ': @@ -866,120 +1064,6 @@ def discoverserverhandlers(): while data_line[key_end:(key_end + 1)].isalnum(): key_end += 1 - elif data_line[(op_begin - 3):op_begin] == '!= ': - key_begin = op_begin - key_end = key_begin + 3 - - while data_line[key_end:(key_end + 1)].isalnum(): - key_end += 1 - - dprint( - '\nILL-DEFINED OPCODE CONDITIONAL FOUND: ..{0}({1}:{2}) \'{3}\'\n' - '->line: \'{4}\'\n'.format( - location, - line_no, - key_begin, - data_line[key_begin:key_end], - data_line[:-1] - ) - ) - - continue - elif data_line[(op_begin - 2):op_begin] == '!=': - key_begin = op_begin - key_end = key_begin + 3 - - while data_line[key_end:(key_end + 1)].isalnum(): - key_end += 1 - - dprint( - '\nILL-DEFINED OPCODE CONDITIONAL FOUND: ..{0}({1}:{2}) \'{3}\'\n' - '->line: \'{4}\'\n'.format( - location, - line_no, - key_begin, - data_line[key_begin:key_end], - data_line[:-1] - ) - ) - - continue - elif data_line[(op_begin - 3):op_begin] == '>= ': - key_begin = op_begin - key_end = key_begin + 3 - - while data_line[key_end:(key_end + 1)].isalnum(): - key_end += 1 - - dprint( - '\nILL-DEFINED OPCODE CONDITIONAL FOUND: ..{0}({1}:{2}) \'{3}\'\n' - '->line: \'{4}\'\n'.format( - location, - line_no, - key_begin, - data_line[key_begin:key_end], - data_line[:-1] - ) - ) - - continue - elif data_line[(op_begin - 2):op_begin] == '>=': - key_begin = op_begin - key_end = key_begin + 3 - - while data_line[key_end:(key_end + 1)].isalnum(): - key_end += 1 - - dprint( - '\nILL-DEFINED OPCODE CONDITIONAL FOUND: ..{0}({1}:{2}) \'{3}\'\n' - '->line: \'{4}\'\n'.format( - location, - line_no, - key_begin, - data_line[key_begin:key_end], - data_line[:-1] - ) - ) - - continue - elif data_line[(op_begin - 3):op_begin] == '<= ': - key_begin = op_begin - key_end = key_begin + 3 - - while data_line[key_end:(key_end + 1)].isalnum(): - key_end += 1 - - dprint( - '\nILL-DEFINED OPCODE CONDITIONAL FOUND: ..{0}({1}:{2}) \'{3}\'\n' - '->line: \'{4}\'\n'.format( - location, - line_no, - key_begin, - data_line[key_begin:key_end], - data_line[:-1] - ) - ) - - continue - elif data_line[(op_begin - 2):op_begin] == '<=': - key_begin = op_begin - key_end = key_begin + 3 - - while data_line[key_end:(key_end + 1)].isalnum(): - key_end += 1 - - dprint( - '\nILL-DEFINED OPCODE CONDITIONAL FOUND: ..{0}({1}:{2}) \'{3}\'\n' - '->line: \'{4}\'\n'.format( - location, - line_no, - key_begin, - data_line[key_begin:key_end], - data_line[:-1] - ) - ) - - continue elif data_line[(op_begin - 2):op_begin] == '= ': key_begin = op_begin key_end = key_begin + 3 @@ -994,6 +1078,7 @@ def discoverserverhandlers(): while data_line[key_end:(key_end + 1)].isalnum(): key_end += 1 + # fall-through else: key_begin = op_begin key_end = key_begin + 3 @@ -1042,15 +1127,16 @@ def discoverserverhandlers(): ) ) - dprint('..{0}({1}:{2}) [{3}][{4}] = \'{5} {6}\'\n'.format( - location, - line_no, - key_begin, - server, - data_line[key_begin:key_end], - direction, - hint - )) + if VERBOSE: + dprint('..{0}({1}:{2}) [{3}][{4}] = \'{5} {6}\'\n'.format( + location, + line_no, + key_begin, + server, + data_line[key_begin:key_end], + direction, + hint + )) data_file.close() From dfa7e2bffb4440143f96d82e806ccd841ab97470 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Fri, 20 Jul 2018 14:06:07 -0400 Subject: [PATCH 307/670] Add completion emote for tasks --- common/version.h | 2 +- utils/sql/db_update_manifest.txt | 1 + utils/sql/git/required/2018_07_20_task_emote.sql | 1 + zone/tasks.cpp | 8 ++++++-- zone/tasks.h | 1 + 5 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 utils/sql/git/required/2018_07_20_task_emote.sql diff --git a/common/version.h b/common/version.h index 15fe7bb22..b95c8ec1d 100644 --- a/common/version.h +++ b/common/version.h @@ -30,7 +30,7 @@ Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt */ -#define CURRENT_BINARY_DATABASE_VERSION 9124 +#define CURRENT_BINARY_DATABASE_VERSION 9125 #ifdef BOTS #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9019 #else diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index f55ff5235..22a593176 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -378,6 +378,7 @@ 9122|2018_03_07_ucs_command.sql|SELECT * FROM `command_settings` WHERE `command` LIKE 'ucs'|empty| 9123|2018_07_07_data_buckets.sql|SHOW TABLES LIKE 'data_buckets'|empty| 9124|2018_07_09_tasks.sql|SHOW COLUMNS FROM `tasks` LIKE 'type'|empty| +9125|2018_07_20_task_emote.sql|SHOW COLUMNS FROM `tasks` LIKE 'completion_emote'|empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/utils/sql/git/required/2018_07_20_task_emote.sql b/utils/sql/git/required/2018_07_20_task_emote.sql new file mode 100644 index 000000000..1bccf105e --- /dev/null +++ b/utils/sql/git/required/2018_07_20_task_emote.sql @@ -0,0 +1 @@ +ALTER TABLE `tasks` ADD `completion_emote` VARCHAR(128) NOT NULL DEFAULT ''; diff --git a/zone/tasks.cpp b/zone/tasks.cpp index a00ecc73a..5a3ba7914 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -118,12 +118,12 @@ bool TaskManager::LoadTasks(int singleTask) query = StringFormat("SELECT `id`, `type`, `duration`, `duration_code`, `title`, `description`, " "`reward`, `rewardid`, `cashreward`, `xpreward`, `rewardmethod`, `faction_reward`," - "`minlevel`, `maxlevel`, `repeatable` FROM `tasks` WHERE `id` < %i", + "`minlevel`, `maxlevel`, `repeatable`, `completion_emote` FROM `tasks` WHERE `id` < %i", MAXTASKS); } else query = StringFormat("SELECT `id`, `type`, `duration`, `duration_code`, `title`, `description`, " "`reward`, `rewardid`, `cashreward`, `xpreward`, `rewardmethod`, `faction_reward`," - "`minlevel`, `maxlevel`, `repeatable` FROM `tasks` WHERE `id` = %i", + "`minlevel`, `maxlevel`, `repeatable`, `completion_emote` FROM `tasks` WHERE `id` = %i", singleTask); const char *ERR_MYSQLERROR = "[TASKS]Error in TaskManager::LoadTasks: %s"; @@ -159,6 +159,7 @@ bool TaskManager::LoadTasks(int singleTask) Tasks[taskID]->MinLevel = atoi(row[12]); Tasks[taskID]->MaxLevel = atoi(row[13]); Tasks[taskID]->Repeatable = atoi(row[14]); + Tasks[taskID]->completion_emote = row[15]; Tasks[taskID]->ActivityCount = 0; Tasks[taskID]->SequenceMode = ActivitiesSequential; Tasks[taskID]->LastStep = 0; @@ -2020,6 +2021,9 @@ void ClientTaskState::RewardTask(Client *c, TaskInformation *Task) { } } + if (!Task->completion_emote.empty()) + c->SendColoredText(CC_Yellow, Task->completion_emote); // unsure if they use this packet or color, should work + // just use normal NPC faction ID stuff if (Task->faction_reward) c->SetFactionLevel(c->CharacterID(), Task->faction_reward, c->GetBaseClass(), c->GetBaseRace(), c->GetDeity()); diff --git a/zone/tasks.h b/zone/tasks.h index 70053a939..1505a50a1 100644 --- a/zone/tasks.h +++ b/zone/tasks.h @@ -142,6 +142,7 @@ struct TaskInformation { std::string Description; // max length 4000, 2048 on Tit std::string Reward; std::string item_link; // max length 128 older clients, item link gets own string + std::string completion_emote; // emote after completing task, yellow. Maybe should make more generic ... but yellow for now! int RewardID; int CashReward; // Expressed in copper int XPReward; From 69b96b718eaea1cc8770fcf3b8c1e592bced1264 Mon Sep 17 00:00:00 2001 From: Uleat Date: Fri, 20 Jul 2018 21:13:29 -0400 Subject: [PATCH 308/670] Update to opcode_handlers.py [ci skip] --- utils/scripts/opcode_handlers.py | 901 +++++++++++++++++++++++++------ 1 file changed, 750 insertions(+), 151 deletions(-) diff --git a/utils/scripts/opcode_handlers.py b/utils/scripts/opcode_handlers.py index e5a25084a..da5e26448 100644 --- a/utils/scripts/opcode_handlers.py +++ b/utils/scripts/opcode_handlers.py @@ -25,19 +25,21 @@ base_path = os.getcwd()[:-14] # '/utils/scripts' base_path = base_path.replace('\\', '/') client_list = ['Titanium', 'SoF', 'SoD', 'UF', 'RoF', 'RoF2'] -server_list = ['Login', 'World', 'Zone', 'UCS', 'Common'] # 'Common' is not a server..but, may contain shared functions -server_dir = {'Login': 'loginserver', 'World': 'world', 'Zone': 'zone', 'UCS': 'ucs', 'Common': 'common'} +server_list = ['Login', 'World', 'Zone', 'UCS', 'Query', 'EQLaunch', 'HeadlessClient', 'Common'] # 'Common' is not a server..but, may contain shared functions +server_dirs = {'Login': 'loginserver', 'World': 'world', 'Zone': 'zone', 'UCS': 'ucs', 'Query': 'queryserv', 'EQLaunch': 'eqlaunch', 'HeadlessClient': 'hc', 'Common': 'common'} file_exts = ['cpp', 'h'] client_opcodes = {} # x[key='Client'][key='OP_CodeName'](value='0x####') server_opcodes = {} # x[key='OP_CodeName'](value=) - opcodes apply to all servers +servertalk_opcodes = {} # x[key='OP_CodeName'](value=) - opcodes apply to all servers client_encodes = {} # x[key='Client'](value='OP_CodeName') client_decodes = {} # x[key='Client'](value='OP_CodeName') server_handlers = {} # x[key='Server'][key='OP_CodeName'](value='[%X] Near Handler::ReferenceFunction') +servertalk_handlers = {} # x[key='Server'][key='OP_CodeName'](value='[%X] Near Handler::ReferenceFunction') -out_files = {} # x[key='Server'](value=) +out_files = {} # x[key='Object'](value=) #statistics = {} #report_entries = {} @@ -84,6 +86,12 @@ def main(): if fault: faults.append('loadserveropcodes()') + if not fault: + fault = not loadservertalkopcodes() + + if fault: + faults.append('loadservertalkopcodes()') + if not fault: fault = not loadclienttranslators() @@ -96,6 +104,12 @@ def main(): if fault: faults.append('discoverserverhandlers()') + if not fault: + fault = not discoverservertalkhandlers() + + if fault: + faults.append('discoverservertalkhandlers()') + if not fault: fault = not clearemptyserverentries() @@ -126,6 +140,12 @@ def main(): if fault: faults.append('parseserveropcodedata()') + if not fault: + fault = not parseservertalkopcodedata() + + if fault: + faults.append('parseservertalkopcodedata()') + if not fault: print('Destroying output streams...') @@ -178,14 +198,15 @@ def opendebugfile(): dprint( '>> \'Opcode-Handler\' DEBUG dump file\n' - '>> file generated @ {0}\n\n' - '->open: \'{1}\' in \'w\' mode\n' - 'leaving \'opendebugfile()\'\n\n'.format( - ctime(time()), - file_name - ) + '>> file generated @ {0}\n\n'.format(ctime(time())) ) + if VERBOSE: + dprint( + '->open: \'{0}\' in \'w\' mode\n' + 'leaving \'opendebugfile()\'\n\n'.format(file_name) + ) + return True except: print('(Exception Error: {0}) opendebugfile()'.format(sys.exc_info()[0])) @@ -203,7 +224,8 @@ def opendebugfile(): def openundefinedfile(): """ UNDEFINED FILE should always open """ - dprint('entering \'openundefinedfile()\'\n') + if VERBOSE: + dprint('entering \'openundefinedfile()\'\n') try: file_name = '{0}/utils/scripts/opcode_handlers_output/UNDEFINED.txt'.format(base_path) @@ -217,10 +239,11 @@ def openundefinedfile(): '>> file generated @ {0}\n\n'.format(ctime(time())) ) - dprint( - '->open: \'{0}\' in \'w\' mode\n' - 'leaving \'openundefinedfile()\'\n\n'.format(file_name) - ) + if VERBOSE: + dprint( + '->open: \'{0}\' in \'w\' mode\n' + 'leaving \'openundefinedfile()\'\n\n'.format(file_name) + ) return True except: @@ -239,7 +262,8 @@ def openundefinedfile(): def loadclientopcodes(): """ Load CLIENT OPCODES into memory """ - dprint('entering \'loadclientopcodes()\'\n') + if VERBOSE: + dprint('entering \'loadclientopcodes()\'\n') bad_clients = [] @@ -255,7 +279,8 @@ def loadclientopcodes(): vprint(file_name) with open(file_name, 'r') as data_file: - dprint('->open: \'{0}\' in \'r\' mode\n'.format(file_name)) + if VERBOSE: + dprint('->open: \'{0}\' in \'r\' mode\n'.format(file_name)) client_opcodes[client] = {} line_no = 0 @@ -303,7 +328,8 @@ def loadclientopcodes(): data_file.close() - dprint('->close: \'{0}\'\n'.format(file_name)) + if VERBOSE: + dprint('->close: \'{0}\'\n'.format(file_name)) if not len(client_opcodes[client]) > 0: bad_clients.append(client) @@ -348,7 +374,8 @@ def loadclientopcodes(): return False - dprint('leaving \'loadclientopcodes()\'\n\n') + if VERBOSE: + dprint('leaving \'loadclientopcodes()\'\n\n') return True @@ -356,20 +383,23 @@ def loadclientopcodes(): def loadserveropcodes(): """ Load SERVER OPCODES into memory """ - dprint('entering \'loadserveropcodes()\'\n') + if VERBOSE: + dprint('entering \'loadserveropcodes()\'\n') try: server_opcodes['OP_Unknown'] = 0 value = 1 - dprint('(manual) \'Servers\' [OP_Unknown] = {0}\n'.format(server_opcodes['OP_Unknown'])) + if VERBOSE: + dprint('(manual) \'Servers\' [OP_Unknown] = {0}\n'.format(server_opcodes['OP_Unknown'])) file_name = '{0}/common/emu_oplist.h'.format(base_path) vprint(file_name) with open(file_name, 'r') as data_file: - dprint('->open: \'{0}\' in \'r\' mode\n'.format(file_name)) + if VERBOSE: + dprint('->open: \'{0}\' in \'r\' mode\n'.format(file_name)) line_no = 0 @@ -395,14 +425,16 @@ def loadserveropcodes(): data_file.close() - dprint('->close: \'{0}\'\n'.format(file_name)) + if VERBOSE: + dprint('->close: \'{0}\'\n'.format(file_name)) file_name = '{0}/common/mail_oplist.h'.format(base_path) vprint(file_name) with open(file_name, 'r') as data_file: - dprint('->open: \'{0}\' in \'r\' mode\n'.format(file_name)) + if VERBOSE: + dprint('->open: \'{0}\' in \'r\' mode\n'.format(file_name)) line_no = 0 @@ -428,7 +460,8 @@ def loadserveropcodes(): data_file.close() - dprint('->close: \'{0}\'\n'.format(file_name)) + if VERBOSE: + dprint('->close: \'{0}\'\n'.format(file_name)) except: print('(Exception Error: {0}) loadserveropcodes()'.format(sys.exc_info()[0])) @@ -443,7 +476,79 @@ def loadserveropcodes(): return False - dprint('leaving \'loadserveropcodes()\'\n\n') + if VERBOSE: + dprint('leaving \'loadserveropcodes()\'\n\n') + + return True + + +def loadservertalkopcodes(): + """ Load SERVERTALK OPCODES into memory """ + + if VERBOSE: + dprint('entering \'loadservertalkopcodes()\'\n') + + try: + file_name = '{0}/common/servertalk.h'.format(base_path) + + vprint(file_name) + + with open(file_name, 'r') as data_file: + if VERBOSE: + dprint('->open: \'{0}\' in \'r\' mode\n'.format(file_name)) + + line_no = 0 + + for data_line in data_file: + line_no += 1 + + if not data_line[:7] == '#define': + continue + + key_begin = data_line.find('ServerOP_', 8) + key_end = data_line.find('0x', key_begin) + + if key_begin < 0 or key_end < 0: + continue + + key_value = data_line[key_begin:key_end] + key_value = key_value.rstrip() + + val_begin = key_end + val_end = val_begin + 6 + + servertalk_opcodes[key_value] = data_line[val_begin:val_end] + + if VERBOSE: + dprint('../common/servertalk.h({0}:{1}) \'Servers\' [{2}] = {3}\n'.format( + line_no, + key_begin, + key_value, + servertalk_opcodes[key_value] + )) + + data_file.close() + + if VERBOSE: + dprint('->close: \'{0}\'\n'.format(file_name)) + + + except: + print('(Exception Error: {0}) loadservertalkopcodes()'.format(sys.exc_info()[0])) + + dprint('leaving \'loadservertalkopcodes(): EXCEPTION ERROR\'\n\n') + + return False + + if not len(servertalk_opcodes) > 0: + print('Could not locate servertalk opcode list...') + + dprint('leaving \'loadservertalkopcodes(): SERVERTALK OPCODES NOT FOUND\'\n\n') + + return False + + if VERBOSE: + dprint('leaving \'loadservertalkopcodes()\'\n\n') return True @@ -458,7 +563,8 @@ def loadclienttranslators(): """ - dprint('entering \'loadclienttranslators()\'\n') + if VERBOSE: + dprint('entering \'loadclienttranslators()\'\n') bad_clients = [] @@ -474,7 +580,8 @@ def loadclienttranslators(): vprint(file_name) with open(file_name, 'r') as data_file: - dprint('->open: \'{0}\' in \'r\' mode\n'.format(file_name)) + if VERBOSE: + dprint('->open: \'{0}\' in \'r\' mode\n'.format(file_name)) client_encodes[client] = [] client_decodes[client] = [] @@ -513,7 +620,8 @@ def loadclienttranslators(): data_file.close() - dprint('->close: \'{0}\'\n'.format(file_name)) + if VERBOSE: + dprint('->close: \'{0}\'\n'.format(file_name)) except: print('(Exception Error: {0}) loadclienttranslators() [{1}]'.format( sys.exc_info()[0], @@ -546,24 +654,26 @@ def loadclienttranslators(): return False - dprint('leaving \'loadclienttranslators()\'\n\n') + if VERBOSE: + dprint('leaving \'loadclienttranslators()\'\n\n') return True def discoverserverhandlers(): """ - Load undefined SERVER OPCODE HANDLERS using 'discovery' method + Load SERVER OPCODE HANDLERS using 'discovery' method Lists are instantiated for all SERVERS in SERVER LIST. The lists are then appended with location data based on the presence of the SERVER in the parent dictionary. """ - # TODO: handle remarked out definitions in file (i.e., // and /**/) + # TODO: handle multi-line remark statements in file # TODO: if/how to include perl, lua and non-'..//' location handlers... - dprint('entering \'discoverserverhandlers()\'\n') + if VERBOSE: + dprint('entering \'discoverserverhandlers()\'\n') bad_servers = [] locations = {} @@ -573,18 +683,19 @@ def discoverserverhandlers(): locations[server] = [] for server in locations: - file_path = '{0}/{1}/'.format(base_path, server_dir[server]) + file_path = '{0}/{1}/'.format(base_path, server_dirs[server]) file_list = os.listdir(file_path) for extension in file_exts: - dprint('->file discovery: \'{0}*.{1}\'\n'.format(file_path, extension)) + if VERBOSE: + dprint('->file discovery: \'{0}*.{1}\'\n'.format(file_path, extension)) for file_name in fnmatch.filter(file_list, '*.{0}'.format(extension)): if file_name in ['emu_oplist.h', 'mail_oplist.h', 'opcode_dispatch.h', 'opcode_map.cpp', 'op_codes.h']: continue - locations[server].append('/{0}/{1}'.format(server_dir[server], file_name)) + locations[server].append('/{0}/{1}'.format(server_dirs[server], file_name)) for server in server_list: if not server in server_handlers: @@ -599,7 +710,8 @@ def discoverserverhandlers(): vprint(file_name) with open(file_name, 'r') as data_file: - dprint('->open: \'{0}\' in \'r\' mode\n'.format(file_name)) + if VERBOSE: + dprint('->open: \'{0}\' in \'r\' mode\n'.format(file_name)) line_no = 0 hint = 'Near beginning of file' @@ -631,29 +743,9 @@ def discoverserverhandlers(): continue # exclusions - if data_line[(op_begin - 6):op_begin] == 'Server': - if VERBOSE: - key_begin = op_begin - key_end = key_begin + 3 - - while data_line[key_end:(key_end + 1)].isalnum(): - key_end += 1 - - dprint( - '\nUNHANDLED SERVER TALK OPCODE REFERENCE FOUND: ..{0}({1}:{2}) \'{3}\'\n' - '->line: \'{4}\'\n'.format( - location, - line_no, - key_begin, - data_line[key_begin:key_end], - data_line[:-1] - ) - ) - + if data_line[(op_begin - 1):op_begin].isalnum(): continue - elif data_line[(op_begin - 1):op_begin].isalnum(): - continue - elif data_line[read_begin:op_begin].find('//', 0) >= 0: + elif data_line[:op_begin].find('//', 0) >= 0: if VERBOSE: key_begin = op_begin key_end = key_begin + 3 @@ -673,7 +765,7 @@ def discoverserverhandlers(): ) continue - elif data_line[read_begin:op_begin].find('Log(Logs::', 0) >= 0: + elif data_line[:op_begin].find('Log(Logs::', 0) >= 0: if VERBOSE: key_begin = op_begin key_end = key_begin + 3 @@ -693,27 +785,7 @@ def discoverserverhandlers(): ) continue - elif data_line[read_begin:op_begin].find('Message', 0) >= 0: - if VERBOSE: - key_begin = op_begin - key_end = key_begin + 3 - - while data_line[key_end:(key_end + 1)].isalnum(): - key_end += 1 - - dprint( - '\nCLIENT MESSAGE OPCODE REFERENCE FOUND: ..{0}({1}:{2}) \'{3}\'\n' - '->line: \'{4}\'\n'.format( - location, - line_no, - key_begin, - data_line[key_begin:key_end], - data_line[:-1] - ) - ) - - continue - elif data_line[read_begin:op_begin].find('std::cout', 0) >= 0: + elif data_line[:op_begin].find('std::cout', 0) >= 0: if VERBOSE: key_begin = op_begin key_end = key_begin + 3 @@ -733,7 +805,7 @@ def discoverserverhandlers(): ) continue - elif data_line[read_begin:op_begin].find('MakeAnyLenString', 0) >= 0: + elif data_line[:op_begin].find('MakeAnyLenString', 0) >= 0: if VERBOSE: key_begin = op_begin key_end = key_begin + 3 @@ -753,7 +825,7 @@ def discoverserverhandlers(): ) continue - elif data_line[read_begin:op_begin].find('printf', 0) >= 0: + elif data_line[:op_begin].find('printf', 0) >= 0: if VERBOSE: key_begin = op_begin key_end = key_begin + 3 @@ -773,7 +845,7 @@ def discoverserverhandlers(): ) continue - elif data_line[read_begin:op_begin].find('VERIFY_PACKET_LENGTH', 0) >= 0: + elif data_line[:op_begin].find('VERIFY_PACKET_LENGTH', 0) >= 0: if VERBOSE: key_begin = op_begin key_end = key_begin + 3 @@ -793,7 +865,7 @@ def discoverserverhandlers(): ) continue - elif data_line[read_begin:op_begin].find('ConnectingOpcodes', 0) >= 0: + elif data_line[:op_begin].find('ConnectingOpcodes', 0) >= 0: if VERBOSE: key_begin = op_begin key_end = key_begin + 3 @@ -813,7 +885,7 @@ def discoverserverhandlers(): ) continue - elif data_line[read_begin:op_begin].find('ConnectedOpcodes', 0) >= 0: + elif data_line[:op_begin].find('ConnectedOpcodes', 0) >= 0: if VERBOSE: key_begin = op_begin key_end = key_begin + 3 @@ -833,7 +905,7 @@ def discoverserverhandlers(): ) continue - elif data_line[read_begin:op_begin].find('command_add', 0) >= 0: + elif data_line[:op_begin].find('command_add', 0) >= 0: if VERBOSE: key_begin = op_begin key_end = key_begin + 3 @@ -853,7 +925,7 @@ def discoverserverhandlers(): ) continue - elif data_line[read_begin:op_begin].find('luabind::value', 0) >= 0: + elif data_line[:op_begin].find('luabind::value', 0) >= 0: if VERBOSE: key_begin = op_begin key_end = key_begin + 3 @@ -872,6 +944,46 @@ def discoverserverhandlers(): ) ) + continue + elif data_line[:op_begin].find('Message', 0) >= 0: + if VERBOSE: + key_begin = op_begin + key_end = key_begin + 3 + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + + dprint( + '\nCLIENT MESSAGE OPCODE REFERENCE FOUND: ..{0}({1}:{2}) \'{3}\'\n' + '->line: \'{4}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end], + data_line[:-1] + ) + ) + + continue + elif data_line[:op_begin].count('"') and 1: + if VERBOSE: + key_begin = op_begin + key_end = key_begin + 3 + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + + dprint( + '\nSTRING TEXT OPCODE REFERENCE FOUND: ..{0}({1}:{2}) \'{3}\'\n' + '->line: \'{4}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end], + data_line[:-1] + ) + ) + continue elif data_line[(op_begin - 3):op_begin] == '!= ': if VERBOSE: @@ -993,49 +1105,27 @@ def discoverserverhandlers(): ) continue - # inclusions - elif data_line[(op_begin - 20):op_begin] == 'EQApplicationPacket(': - key_begin = op_begin - key_end = key_begin + 3 - direction = '[TX]' + elif data_line[:op_begin].isspace(): + if VERBOSE: + key_begin = op_begin + key_end = key_begin + 3 - while data_line[key_end:(key_end + 1)].isalnum(): - key_end += 1 - elif data_line[(op_begin - 1):op_begin] == '(' and data_line[read_begin:op_begin].find('EQApplicationPacket', 0) >= 0: - key_begin = op_begin - key_end = key_begin + 3 - direction = '[TX]' + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 - while data_line[key_end:(key_end + 1)].isalnum(): - key_end += 1 - elif data_line[(op_begin - 2):op_begin] == ' (' and data_line[read_begin:op_begin].find('EQApplicationPacket', 0) >= 0: - key_begin = op_begin - key_end = key_begin + 3 - direction = '[TX]' + dprint( + '\nILL-DEFINED OPCODE CONDITIONAL FOUND: ..{0}({1}:{2}) \'{3}\'\n' + '->line: \'{4}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end], + data_line[:-1] + ) + ) - while data_line[key_end:(key_end + 1)].isalnum(): - key_end += 1 - elif data_line[(op_begin - 12):op_begin] == '->SetOpcode(': - key_begin = op_begin - key_end = key_begin + 3 - direction = '[TX]' - - while data_line[key_end:(key_end + 1)].isalnum(): - key_end += 1 - elif data_line[(op_begin - 11):op_begin] == '.SetOpcode(': - key_begin = op_begin - key_end = key_begin + 3 - direction = '[TX]' - - while data_line[key_end:(key_end + 1)].isalnum(): - key_end += 1 - elif data_line[(op_begin - 5):op_begin] == 'case ': - key_begin = op_begin - key_end = key_begin + 3 - direction = '[RX]' - - while data_line[key_end:(key_end + 1)].isalnum(): - key_end += 1 + continue + # inclusion [RX] elif data_line[(op_begin - 7):op_begin] == 'Handle_': key_begin = op_begin key_end = key_begin + 3 @@ -1048,6 +1138,13 @@ def discoverserverhandlers(): key_end = key_begin + 3 direction = '[RX]' + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + elif data_line[(op_begin - 5):op_begin] == 'case ': + key_begin = op_begin + key_end = key_begin + 3 + direction = '[RX]' + while data_line[key_end:(key_end + 1)].isalnum(): key_end += 1 elif data_line[(op_begin - 3):op_begin] == '== ': @@ -1062,6 +1159,49 @@ def discoverserverhandlers(): key_end = key_begin + 3 direction = '[RX]' + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + # inclusions [TX] + elif data_line[(op_begin - 1):op_begin] == '(' and data_line[:op_begin].find('EQProtocolPacket', 0) >= 0: + key_begin = op_begin + key_end = key_begin + 3 + direction = '[TX]' + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + elif data_line[(op_begin - 2):op_begin] == ' (' and data_line[:op_begin].find('EQProtocolPacket', 0) >= 0: + key_begin = op_begin + key_end = key_begin + 3 + direction = '[TX]' + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + elif data_line[(op_begin - 1):op_begin] == '(' and data_line[:op_begin].find('EQApplicationPacket', 0) >= 0: + key_begin = op_begin + key_end = key_begin + 3 + direction = '[TX]' + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + elif data_line[(op_begin - 2):op_begin] == ' (' and data_line[:op_begin].find('EQApplicationPacket', 0) >= 0: + key_begin = op_begin + key_end = key_begin + 3 + direction = '[TX]' + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + elif data_line[(op_begin - 12):op_begin] == '->SetOpcode(': + key_begin = op_begin + key_end = key_begin + 3 + direction = '[TX]' + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + elif data_line[(op_begin - 11):op_begin] == '.SetOpcode(': + key_begin = op_begin + key_end = key_begin + 3 + direction = '[TX]' + while data_line[key_end:(key_end + 1)].isalnum(): key_end += 1 elif data_line[(op_begin - 2):op_begin] == '= ': @@ -1140,7 +1280,8 @@ def discoverserverhandlers(): data_file.close() - dprint('->close: \'{0}\'\n'.format(file_name)) + if VERBOSE: + dprint('->close: \'{0}\'\n'.format(file_name)) except: print('(Exception Error: {0}) discoverserverhandlers() [{1}]'.format( sys.exc_info()[0], @@ -1163,7 +1304,357 @@ def discoverserverhandlers(): dprint('->delete: \'{0}\' server discovered handler entries\n'.format(bad_server)) - dprint('leaving \'discoverserverhandlers()\'\n\n') + if VERBOSE: + dprint('leaving \'discoverserverhandlers()\'\n\n') + + return True + + +def discoverservertalkhandlers(): + """ + Load SERVERTALK OPCODE HANDLERS using 'discovery' method + + Lists are instantiated for all SERVERS in SERVER LIST. The lists are then appended + with location data based on the presence of the SERVER in the parent dictionary. + + """ + + # TODO: handle multi-line remark statements in file + # TODO: if/how to include perl, lua and non-'..//' location handlers... + + if VERBOSE: + dprint('entering \'discoverservertalkhandlers()\'\n') + + bad_servers = [] + locations = {} + + for server in server_list: + if not server in locations: + locations[server] = [] + + for server in locations: + file_path = '{0}/{1}/'.format(base_path, server_dirs[server]) + + file_list = os.listdir(file_path) + + for extension in file_exts: + if VERBOSE: + dprint('->file discovery: \'{0}*.{1}\'\n'.format(file_path, extension)) + + for file_name in fnmatch.filter(file_list, '*.{0}'.format(extension)): + if file_name in ['emu_oplist.h', 'mail_oplist.h', 'opcode_dispatch.h', 'opcode_map.cpp', 'op_codes.h', 'servertalk.h']: + continue + + locations[server].append('/{0}/{1}'.format(server_dirs[server], file_name)) + + for server in server_list: + if not server in servertalk_handlers: + servertalk_handlers[server] = {} + + for location in locations[server]: + try: + file_name = '{0}{1}'.format( + base_path, + location) + + vprint(file_name) + + with open(file_name, 'r') as data_file: + if VERBOSE: + dprint('->open: \'{0}\' in \'r\' mode\n'.format(file_name)) + + line_no = 0 + hint = 'Near beginning of file' + + for data_line in data_file: + line_no += 1 + read_begin = 0 + + if data_line[:1].isalpha(): + hint_end = data_line.find('(') + + if not hint_end < 0: + hint_begin = hint_end - 1 + + while not hint_begin < 0: + if data_line[(hint_begin - 1):hint_begin].isspace(): + if not data_line[hint_begin:(hint_begin + 1)].isalpha(): + hint_begin += 1 + + hint = 'Near {0}'.format(data_line[hint_begin:hint_end]) + + break + + hint_begin -= 1 + + op_begin = data_line.find('ServerOP_', read_begin) + + if op_begin < 0: + continue + + # exclusions + if data_line[(op_begin - 1):op_begin].isalnum(): + continue + elif data_line[op_begin:].find('_Struct', 0) >= 0 and not data_line[op_begin:data_line[op_begin:].find('_Struct', 0)].isspace(): + if VERBOSE: + key_begin = op_begin + key_end = key_begin + 9 + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + + dprint( + '\nIll-DEFINED SERVERTALK OPCODE REFERENCE FOUND: ..{0}({1}:{2}) \'{3}\'\n' + '->line: \'{4}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end], + data_line[:-1] + ) + ) + + continue + elif data_line[read_begin:op_begin].find('//', 0) >= 0: + if VERBOSE: + key_begin = op_begin + key_end = key_begin + 9 + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + + dprint( + '\nREMARKED SERVERTALK OPCODE REFERENCE FOUND: ..{0}({1}:{2}) \'{3}\'\n' + '->line: \'{4}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end], + data_line[:-1] + ) + ) + + continue + elif data_line[read_begin:op_begin].find('Log(Logs::', 0) >= 0: + if VERBOSE: + key_begin = op_begin + key_end = key_begin + 9 + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + + dprint( + '\nLOGGING SERVERTALK OPCODE REFERENCE FOUND: ..{0}({1}:{2}) \'{3}\'\n' + '->line: \'{4}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end], + data_line[:-1] + ) + ) + + continue + elif data_line[read_begin:op_begin].find('std::cout', 0) >= 0: + if VERBOSE: + key_begin = op_begin + key_end = key_begin + 9 + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + + dprint( + '\nCONSOLE MESSAGE SERVERTALK OPCODE REFERENCE FOUND: ..{0}({1}:{2}) \'{3}\'\n' + '->line: \'{4}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end], + data_line[:-1] + ) + ) + + continue + elif data_line[:op_begin].isspace(): + if VERBOSE: + key_begin = op_begin + key_end = key_begin + 9 + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + + dprint( + '\nILL-DEFINED SERVERTALK OPCODE CONDITIONAL FOUND: ..{0}({1}:{2}) \'{3}\'\n' + '->line: \'{4}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end], + data_line[:-1] + ) + ) + + continue + # inclusions [RX] + elif data_line[(op_begin - 1):op_begin] == '(' and data_line[read_begin:op_begin].find('OnMessage', 0) >= 0: + key_begin = op_begin + key_end = key_begin + 9 + direction = '[RX]' + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + elif data_line[(op_begin - 2):op_begin] == ' (' and data_line[read_begin:op_begin].find('OnMessage', 0) >= 0: + key_begin = op_begin + key_end = key_begin + 9 + direction = '[RX]' + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + elif data_line[(op_begin - 5):op_begin] == 'case ': + key_begin = op_begin + key_end = key_begin + 9 + direction = '[RX]' + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + elif data_line[(op_begin - 3):op_begin] == '== ': + key_begin = op_begin + key_end = key_begin + 9 + direction = '[RX]' + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + elif data_line[(op_begin - 2):op_begin] == '==': + key_begin = op_begin + key_end = key_begin + 9 + direction = '[RX]' + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + # inclusions [TX] + elif data_line[(op_begin - 1):op_begin] == '(' and data_line[read_begin:op_begin].find('ServerPacket', 0) >= 0: + key_begin = op_begin + key_end = key_begin + 9 + direction = '[TX]' + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + elif data_line[(op_begin - 2):op_begin] == ' (' and data_line[read_begin:op_begin].find('ServerPacket', 0) >= 0: + key_begin = op_begin + key_end = key_begin + 9 + direction = '[TX]' + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + elif data_line[(op_begin - 7):op_begin] == '->Send(': + key_begin = op_begin + key_end = key_begin + 9 + direction = '[TX]' + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + elif data_line[(op_begin - 2):op_begin] == '= ': + key_begin = op_begin + key_end = key_begin + 9 + direction = '[TX]' + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + elif data_line[(op_begin - 1):op_begin] == '=': + key_begin = op_begin + key_end = key_begin + 9 + direction = '[TX]' + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + # fall-through + else: + key_begin = op_begin + key_end = key_begin + 9 + + while data_line[key_end:(key_end + 1)].isalnum(): + key_end += 1 + + uprint( + '\nUNDEFINED SERVERTALK OPCODE CONDITIONAL FOUND: ..{0}({1}:{2}) \'{3}\'\n' + '->line: \'{4}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end], + data_line[:-1] + ) + ) + + continue + + if key_end < 0: + continue + + if not data_line[key_begin:key_end] in servertalk_opcodes: + dprint('\nILLEGAL SERVERTALK OPCODE FOUND: ..{0}({1}:{2}) \'{3}\'\n'.format( + location, + line_no, + key_begin, + data_line[key_begin:key_end] + )) + + continue + + if not data_line[key_begin:key_end] in servertalk_handlers[server]: + servertalk_handlers[server][data_line[key_begin:key_end]] = [] + + servertalk_handlers[server][data_line[key_begin:key_end]].append( + '..{0}({1}:{2}) \'{3}\''.format( + location, + line_no, + key_begin, + '{0} {1}'.format( + direction, + hint + ) + ) + ) + + if VERBOSE: + dprint('..{0}({1}:{2}) [{3}][{4}] = \'{5} {6}\'\n'.format( + location, + line_no, + key_begin, + server, + data_line[key_begin:key_end], + direction, + hint + )) + + data_file.close() + + if VERBOSE: + dprint('->close: \'{0}\'\n'.format(file_name)) + except: + print('(Exception Error: {0}) discoverservertalkhandlers() [{1}]'.format( + sys.exc_info()[0], + server + )) + + dprint('<-except: \'{0} [{1}]\'\n'.format( + sys.exc_info()[0], + server + )) + + if not server in bad_servers: + bad_servers.append(server) + + for bad_server in bad_servers: + if bad_server in servertalk_handlers: + vprint('Deleting stale entries for \'{0}\' server...'.format(bad_server)) + + del servertalk_handlers[bad_server] + + dprint('->delete: \'{0}\' server discovered servertalk handler entries\n'.format(bad_server)) + + if VERBOSE: + dprint('leaving \'discoverservertalkhandlers()\'\n\n') return True @@ -1181,7 +1672,8 @@ def clearemptyserverentries(): """ - dprint('entering \'clearemptyserverentries()\'\n') + if VERBOSE: + dprint('entering \'clearemptyserverentries()\'\n') bad_servers = [] @@ -1229,7 +1721,8 @@ def clearemptyserverentries(): return False - dprint('leaving \'clearemptyserverentries()\'\n\n') + if VERBOSE: + dprint('leaving \'clearemptyserverentries()\'\n\n') return True @@ -1237,7 +1730,8 @@ def clearemptyserverentries(): def openoutputfiles(): """ Open OUTPUT FILES in 'w' mode - create/overwrite mode """ - dprint('entering \'openoutputfiles()\'\n') + if VERBOSE: + dprint('entering \'openoutputfiles()\'\n') try: file_name = '{0}/utils/scripts/opcode_handlers_output/REPORT.txt'.format(base_path) @@ -1246,7 +1740,8 @@ def openoutputfiles(): out_files['REPORT'] = open(file_name, 'w') - dprint('->open: \'{0}\' in \'w\' mode\n'.format(file_name)) + if VERBOSE: + dprint('->open: \'{0}\' in \'w\' mode\n'.format(file_name)) rprint( '>> \'Opcode-Handler\' REPORT file\n' @@ -1263,7 +1758,8 @@ def openoutputfiles(): out_files[client] = open(file_name, 'w') - dprint('->open: \'{0}\' in \'w\' mode\n'.format(file_name)) + if VERBOSE: + dprint('->open: \'{0}\' in \'w\' mode\n'.format(file_name)) cprint( client, @@ -1284,7 +1780,8 @@ def openoutputfiles(): out_files[server] = open(file_name, 'w') - dprint('->open: \'{0}\' in \'w\' mode\n'.format(file_name)) + if VERBOSE: + dprint('->open: \'{0}\' in \'w\' mode\n'.format(file_name)) sprint( server, @@ -1295,7 +1792,22 @@ def openoutputfiles(): ) ) - dprint('leaving \'openoutputfiles()\'\n\n') + file_name = '{0}/utils/scripts/opcode_handlers_output/ServerTalk_opcode_handlers.txt'.format(base_path) + + vprint(file_name) + + out_files['ServerTalk'] = open(file_name, 'w') + + if VERBOSE: + dprint('->open: \'{0}\' in \'w\' mode\n'.format(file_name)) + + stprint( + '>> \'Opcode-Handler\' analysis for ServerTalk\n' + '>> file generated @ {0}\n\n'.format(ctime(time())) + ) + + if VERBOSE: + dprint('leaving \'openoutputfiles()\'\n\n') return True except: @@ -1324,7 +1836,15 @@ def openoutputfiles(): del out_files[server] - dprint('leaving \'openoutputfiles(): EXCEPTION ERROR\'\n\n') + if 'ServerTalk' in out_files: + vprint('Closing ServerTalk output file...') + + out_files['ServerTalk'].close() + + del out_files['ServerTalk'] + + if VERBOSE: + dprint('leaving \'openoutputfiles(): EXCEPTION ERROR\'\n\n') return False @@ -1332,7 +1852,8 @@ def openoutputfiles(): def parseclientopcodedata(): """ Process CLIENT OPCODE cross-link references """ - dprint('entering \'parseclientopcodedata()\'\n') + if VERBOSE: + dprint('entering \'parseclientopcodedata()\'\n') for client in client_list: server_max_len = 0 @@ -1382,9 +1903,11 @@ def parseclientopcodedata(): cprint(client, message) - dprint('->parse: \'{0}\' client\n'.format(client)) - - dprint('leaving \'parseclientopcodedata()\'\n\n') + if VERBOSE: + dprint('->parse: \'{0}\' client\n'.format(client)) + + if VERBOSE: + dprint('leaving \'parseclientopcodedata()\'\n\n') return True @@ -1392,7 +1915,8 @@ def parseclientopcodedata(): def parseserveropcodedata(): """ Process SERVER OPCODE cross-link references """ - dprint('entering \'parseserveropcodedata()\'\n') + if VERBOSE: + dprint('entering \'parseserveropcodedata()\'\n') for server in server_list: client_max_len = 0 @@ -1440,9 +1964,59 @@ def parseserveropcodedata(): sprint(server, message) - dprint('->parse: \'{0}\' server\n'.format(server)) + if VERBOSE: + dprint('->parse: \'{0}\' server\n'.format(server)) - dprint('leaving \'parseserveropcodedata()\'\n\n') + if VERBOSE: + dprint('leaving \'parseserveropcodedata()\'\n\n') + + return True + + +def parseservertalkopcodedata(): + """ Process SERVERTALK OPCODE references """ + + if VERBOSE: + dprint('entering \'parseservertalkopcodedata()\'\n') + + local_handlers = {} # swap key order for local processing + + for keya in servertalk_handlers: + for keyb in servertalk_handlers[keya]: + if not keyb in local_handlers: + local_handlers[keyb] = {} + if not keya in local_handlers[keyb]: + local_handlers[keyb][keya] = [] + + local_handlers[keyb][keya] = servertalk_handlers[keya][keyb] + + opcode_keys = local_handlers.keys() + opcode_keys.sort() + + for opcode_key in opcode_keys: + server_keys = local_handlers[opcode_key].keys() + server_keys.sort() + + message = '' + + for server_key in local_handlers[opcode_key]: + handler_list = local_handlers[opcode_key][server_key] + handler_list.sort() + + for handler_entry in handler_list: + message += 'Opcode: {0} ({1}) | Handler: [{2}] {3}\n'.format( + opcode_key, + '{0}'.format(servertalk_opcodes[opcode_key]).zfill(4), + server_key, + handler_entry) + + message += '\n' + + stprint(message) + + if VERBOSE: + dprint('->parse: ServerTalk\n'.format(server)) + dprint('leaving \'parseservertalkopcodedata()\'\n\n') return True @@ -1450,7 +2024,8 @@ def parseserveropcodedata(): def closeoutputfiles(): """ Close OUTPUT FILES - excluding DEBUG FILE """ - dprint('entering \'closeoutputfiles()\'\n') + if VERBOSE: + dprint('entering \'closeoutputfiles()\'\n') if 'REPORT' in out_files: file_name = out_files['REPORT'].name @@ -1459,7 +2034,8 @@ def closeoutputfiles(): del out_files['REPORT'] - dprint('->close: \'{0}\'\n'.format(file_name)) + if VERBOSE: + dprint('->close: \'{0}\'\n'.format(file_name)) if 'UNDEFINED' in out_files: file_name = out_files['UNDEFINED'].name @@ -1468,7 +2044,8 @@ def closeoutputfiles(): del out_files['UNDEFINED'] - dprint('->close: \'{0}\'\n'.format(file_name)) + if VERBOSE: + dprint('->close: \'{0}\'\n'.format(file_name)) for client in client_list: if client in out_files: @@ -1478,7 +2055,8 @@ def closeoutputfiles(): del out_files[client] - dprint('->close: \'{0}\'\n'.format(file_name)) + if VERBOSE: + dprint('->close: \'{0}\'\n'.format(file_name)) for server in server_list: if server in out_files: @@ -1488,9 +2066,21 @@ def closeoutputfiles(): del out_files[server] + if VERBOSE: + dprint('->close: \'{0}\'\n'.format(file_name)) + + if 'ServerTalk' in out_files: + file_name = out_files['ServerTalk'].name + + out_files['ServerTalk'].close() + + del out_files['ServerTalk'] + + if VERBOSE: dprint('->close: \'{0}\'\n'.format(file_name)) - dprint('leaving \'closeoutputfiles()\'\n\n') + if VERBOSE: + dprint('leaving \'closeoutputfiles()\'\n\n') return True @@ -1498,12 +2088,14 @@ def closeoutputfiles(): def closedebugfile(): """ Close DEBUG FILE - last performed action to catch late messages """ - dprint('entering \'closedebugfile()\'\n') + if VERBOSE: + dprint('entering \'closedebugfile()\'\n') if 'DEBUG' in out_files: file_name = out_files['DEBUG'].name - dprint('closing \'{0}\'\n'.format(file_name)) + if VERBOSE: + dprint('closing \'{0}\'\n'.format(file_name)) out_files['DEBUG'].close() @@ -1540,6 +2132,13 @@ def sprint(server, message): out_files[server].write(message) +def stprint(message): + """ SERVERTALK PRINT helper function """ + + if 'ServerTalk' in out_files: + out_files['ServerTalk'].write(message) + + def uprint(message): """ UNDEFINED PRINT helper function """ From f7107fda833424ce64418115337e87509ff3389f Mon Sep 17 00:00:00 2001 From: Uleat Date: Fri, 20 Jul 2018 21:40:01 -0400 Subject: [PATCH 309/670] Fix for opcode_handlers.py crash [ci skip] --- utils/scripts/opcode_handlers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/scripts/opcode_handlers.py b/utils/scripts/opcode_handlers.py index da5e26448..5a3f0af34 100644 --- a/utils/scripts/opcode_handlers.py +++ b/utils/scripts/opcode_handlers.py @@ -2015,7 +2015,7 @@ def parseservertalkopcodedata(): stprint(message) if VERBOSE: - dprint('->parse: ServerTalk\n'.format(server)) + dprint('->parse: ServerTalk\n') dprint('leaving \'parseservertalkopcodedata()\'\n\n') return True From 8498d7b5d25f0a583d83bf11510c9c8cbab864b8 Mon Sep 17 00:00:00 2001 From: Trust Date: Fri, 20 Jul 2018 23:07:59 -0400 Subject: [PATCH 310/670] /who all fix for zones like scarlet, netherbian, etc --- world/clientlist.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/world/clientlist.cpp b/world/clientlist.cpp index 3f1c3f50c..eb821b22f 100644 --- a/world/clientlist.cpp +++ b/world/clientlist.cpp @@ -530,6 +530,28 @@ void ClientList::SendWhoAll(uint32 fromid,const char* to, int16 admin, Who_All_S //uint32 x = 0; int whomlen = 0; if (whom) { + // fixes for client converting some queries into a race query instead of zone + if (whom->wrace == 221) { + whom->wrace = 0xFFFF; + strcpy(whom->whom, "scarlet"); + } + if (whom->wrace == 327) { + whom->wrace = 0xFFFF; + strcpy(whom->whom, "crystal"); + } + if (whom->wrace == 103) { + whom->wrace = 0xFFFF; + strcpy(whom->whom, "kedge"); + } + if (whom->wrace == 230) { + whom->wrace = 0xFFFF; + strcpy(whom->whom, "akheva"); + } + if (whom->wrace == 229) { + whom->wrace = 0xFFFF; + strcpy(whom->whom, "netherbian"); + } + whomlen = strlen(whom->whom); if(whom->wrace == 0x001A) // 0x001A is the old Froglok race number and is sent by the client for /who all froglok whom->wrace = FROGLOK; // This is what EQEmu uses for the Froglok Race number. From f776b1c73b09d104324671a49207c704f30fbb42 Mon Sep 17 00:00:00 2001 From: Trust Date: Fri, 20 Jul 2018 23:22:18 -0400 Subject: [PATCH 311/670] Rule: DismountWater - Causes mounts to dismount when entering liquid per era. --- common/ruletypes.h | 1 + zone/client_packet.cpp | 100 ++++++++++++++++++++--------------------- 2 files changed, 51 insertions(+), 50 deletions(-) diff --git a/common/ruletypes.h b/common/ruletypes.h index 0233f0952..c89213368 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -158,6 +158,7 @@ RULE_BOOL(Character, UseOldConSystem, false) // Grant Health of Target's Target RULE_BOOL(Character, OPClientUpdateVisualDebug, false) // Shows a pulse and forward directional particle each time the client sends its position to server RULE_BOOL(Character, AllowCrossClassTrainers, false) RULE_BOOL(Character, PetsUseReagents, true) //Pets use reagent on spells +RULE_BOOL(Character, DismountWater, true) // Dismount horses when entering water RULE_CATEGORY_END() RULE_CATEGORY(Mercs) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 5fbfaaebc..43e10b424 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -4407,8 +4407,7 @@ void Client::Handle_OP_ClientTimeStamp(const EQApplicationPacket *app) return; } -void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) -{ +void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) { if (IsAIControlled()) return; @@ -4418,18 +4417,19 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) /* Invalid size check */ if (app->size != sizeof(PlayerPositionUpdateClient_Struct) && app->size != (sizeof(PlayerPositionUpdateClient_Struct) + 1) - ) { - Log(Logs::General, Logs::Error, "OP size error: OP_ClientUpdate expected:%i got:%i", sizeof(PlayerPositionUpdateClient_Struct), app->size); + ) { + Log(Logs::General, Logs::Error, "OP size error: OP_ClientUpdate expected:%i got:%i", + sizeof(PlayerPositionUpdateClient_Struct), app->size); return; } - PlayerPositionUpdateClient_Struct* ppu = (PlayerPositionUpdateClient_Struct*)app->pBuffer; + PlayerPositionUpdateClient_Struct *ppu = (PlayerPositionUpdateClient_Struct *) app->pBuffer; /* Boat handling */ if (ppu->spawn_id != GetID()) { /* If player is controlling boat */ if (ppu->spawn_id == controlling_boat_id) { - Mob* boat = entity_list.GetMob(controlling_boat_id); + Mob *boat = entity_list.GetMob(controlling_boat_id); if (boat == 0) { controlling_boat_id = 0; return; @@ -4437,9 +4437,9 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) auto boat_delta = glm::vec4(ppu->delta_x, ppu->delta_y, ppu->delta_z, EQ10toFloat(ppu->delta_heading)); boat->SetDelta(boat_delta); - + auto outapp = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); - PlayerPositionUpdateServer_Struct* ppus = (PlayerPositionUpdateServer_Struct*)outapp->pBuffer; + PlayerPositionUpdateServer_Struct *ppus = (PlayerPositionUpdateServer_Struct *) outapp->pBuffer; boat->MakeSpawnUpdate(ppus); entity_list.QueueCloseClients(boat, outapp, true, 300, this, false); safe_delete(outapp); @@ -4447,16 +4447,15 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) /* Update the boat's position on the server, without sending an update */ boat->GMMove(ppu->x_pos, ppu->y_pos, ppu->z_pos, EQ12toFloat(ppu->heading), false); return; - } - else return; + } else return; } float dist = 0; float tmp; tmp = m_Position.x - ppu->x_pos; - dist += tmp*tmp; + dist += tmp * tmp; tmp = m_Position.y - ppu->y_pos; - dist += tmp*tmp; + dist += tmp * tmp; dist = sqrt(dist); /* Hack checks */ @@ -4464,29 +4463,28 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) if (m_DistanceSinceLastPositionCheck > 0.0) { uint32 cur_time = Timer::GetCurrentTime(); if ((cur_time - m_TimeSinceLastPositionCheck) > 0) { - float speed = (m_DistanceSinceLastPositionCheck * 100) / (float)(cur_time - m_TimeSinceLastPositionCheck); + float speed = + (m_DistanceSinceLastPositionCheck * 100) / (float) (cur_time - m_TimeSinceLastPositionCheck); int runs = GetRunspeed(); if (speed > (runs * RuleR(Zone, MQWarpDetectionDistanceFactor))) { - if (!GetGMSpeed() && (runs >= GetBaseRunspeed() || (speed > (GetBaseRunspeed() * RuleR(Zone, MQWarpDetectionDistanceFactor))))) { + if (!GetGMSpeed() && (runs >= GetBaseRunspeed() || + (speed > (GetBaseRunspeed() * RuleR(Zone, MQWarpDetectionDistanceFactor))))) { if (IsShadowStepExempted()) { if (m_DistanceSinceLastPositionCheck > 800) { CheatDetected(MQWarpShadowStep, ppu->x_pos, ppu->y_pos, ppu->z_pos); } - } - else if (IsKnockBackExempted()) { + } else if (IsKnockBackExempted()) { if (speed > 30.0f) { CheatDetected(MQWarpKnockBack, ppu->x_pos, ppu->y_pos, ppu->z_pos); } - } - else if (!IsPortExempted()) { + } else if (!IsPortExempted()) { if (!IsMQExemptedArea(zone->GetZoneID(), ppu->x_pos, ppu->y_pos, ppu->z_pos)) { if (speed > (runs * 2 * RuleR(Zone, MQWarpDetectionDistanceFactor))) { m_TimeSinceLastPositionCheck = cur_time; m_DistanceSinceLastPositionCheck = 0.0f; CheatDetected(MQWarp, ppu->x_pos, ppu->y_pos, ppu->z_pos); //Death(this, 10000000, SPELL_UNKNOWN, _1H_BLUNT); - } - else { + } else { CheatDetected(MQWarpLight, ppu->x_pos, ppu->y_pos, ppu->z_pos); } } @@ -4500,43 +4498,39 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) m_DistanceSinceLastPositionCheck = 0.0f; m_CheatDetectMoved = false; } - } - else { + } else { m_TimeSinceLastPositionCheck = Timer::GetCurrentTime(); m_CheatDetectMoved = false; } - } - else { + } else { m_DistanceSinceLastPositionCheck += dist; m_CheatDetectMoved = true; if (m_TimeSinceLastPositionCheck == 0) { m_TimeSinceLastPositionCheck = Timer::GetCurrentTime(); - } - else { + } else { uint32 cur_time = Timer::GetCurrentTime(); if ((cur_time - m_TimeSinceLastPositionCheck) > 2500) { - float speed = (m_DistanceSinceLastPositionCheck * 100) / (float)(cur_time - m_TimeSinceLastPositionCheck); + float speed = + (m_DistanceSinceLastPositionCheck * 100) / (float) (cur_time - m_TimeSinceLastPositionCheck); int runs = GetRunspeed(); if (speed > (runs * RuleR(Zone, MQWarpDetectionDistanceFactor))) { - if (!GetGMSpeed() && (runs >= GetBaseRunspeed() || (speed > (GetBaseRunspeed() * RuleR(Zone, MQWarpDetectionDistanceFactor))))) { + if (!GetGMSpeed() && (runs >= GetBaseRunspeed() || + (speed > (GetBaseRunspeed() * RuleR(Zone, MQWarpDetectionDistanceFactor))))) { if (IsShadowStepExempted()) { if (m_DistanceSinceLastPositionCheck > 800) { CheatDetected(MQWarpShadowStep, ppu->x_pos, ppu->y_pos, ppu->z_pos); } - } - else if (IsKnockBackExempted()) { + } else if (IsKnockBackExempted()) { if (speed > 30.0f) { CheatDetected(MQWarpKnockBack, ppu->x_pos, ppu->y_pos, ppu->z_pos); } - } - else if (!IsPortExempted()) { + } else if (!IsPortExempted()) { if (!IsMQExemptedArea(zone->GetZoneID(), ppu->x_pos, ppu->y_pos, ppu->z_pos)) { if (speed > (runs * 2 * RuleR(Zone, MQWarpDetectionDistanceFactor))) { m_TimeSinceLastPositionCheck = cur_time; m_DistanceSinceLastPositionCheck = 0.0f; CheatDetected(MQWarp, ppu->x_pos, ppu->y_pos, ppu->z_pos); - } - else { + } else { CheatDetected(MQWarpLight, ppu->x_pos, ppu->y_pos, ppu->z_pos); } } @@ -4604,8 +4598,8 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) improved_hidden = false; if (!invisible) { auto outapp = - new EQApplicationPacket(OP_SpawnAppearance, sizeof(SpawnAppearance_Struct)); - SpawnAppearance_Struct* sa_out = (SpawnAppearance_Struct*)outapp->pBuffer; + new EQApplicationPacket(OP_SpawnAppearance, sizeof(SpawnAppearance_Struct)); + SpawnAppearance_Struct *sa_out = (SpawnAppearance_Struct *) outapp->pBuffer; sa_out->spawn_id = GetID(); sa_out->type = 0x03; sa_out->parameter = 0; @@ -4620,7 +4614,8 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) is_client_moving = (ppu->y_pos == m_Position.y && ppu->x_pos == m_Position.x) ? false : true; if (is_client_moving) { - Log(Logs::Detail, Logs::Normal, "ClientUpdate: Client is moving - scan timer is: %u", client_scan_npc_aggro_timer.GetDuration()); + Log(Logs::Detail, Logs::Normal, "ClientUpdate: Client is moving - scan timer is: %u", + client_scan_npc_aggro_timer.GetDuration()); if (client_scan_npc_aggro_timer.GetDuration() > 1000) { npc_close_scan_timer.Disable(); @@ -4630,9 +4625,9 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) client_scan_npc_aggro_timer.Start(500); } - } - else { - Log(Logs::Detail, Logs::Normal, "ClientUpdate: Client is NOT moving - scan timer is: %u", client_scan_npc_aggro_timer.GetDuration()); + } else { + Log(Logs::Detail, Logs::Normal, "ClientUpdate: Client is NOT moving - scan timer is: %u", + client_scan_npc_aggro_timer.GetDuration()); if (client_scan_npc_aggro_timer.GetDuration() < 1000) { npc_close_scan_timer.Disable(); @@ -4642,7 +4637,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) client_scan_npc_aggro_timer.Start(3000); } } - + float new_heading = EQ12toFloat(ppu->heading); int32 new_animation = ppu->animation; @@ -4650,10 +4645,11 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) m_Position.x = ppu->x_pos; m_Position.y = ppu->y_pos; m_Position.z = ppu->z_pos; - + /* Visual Debugging */ if (RuleB(Character, OPClientUpdateVisualDebug)) { - Log(Logs::General, Logs::Debug, "ClientUpdate: ppu x: %f y: %f z: %f h: %u", ppu->x_pos, ppu->y_pos, ppu->z_pos, ppu->heading); + Log(Logs::General, Logs::Debug, "ClientUpdate: ppu x: %f y: %f z: %f h: %u", ppu->x_pos, ppu->y_pos, ppu->z_pos, + ppu->heading); this->SendAppearanceEffect(78, 0, 0, 0, 0); this->SendAppearanceEffect(41, 0, 0, 0, 0); } @@ -4666,14 +4662,13 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) /* Broadcast update to other clients */ auto outapp = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); - PlayerPositionUpdateServer_Struct* position_update = (PlayerPositionUpdateServer_Struct*)outapp->pBuffer; + PlayerPositionUpdateServer_Struct *position_update = (PlayerPositionUpdateServer_Struct *) outapp->pBuffer; MakeSpawnUpdate(position_update); if (gm_hide_me) { entity_list.QueueClientsStatus(this, outapp, true, Admin(), 250); - } - else { + } else { entity_list.QueueCloseClients(this, outapp, true, RuleI(Range, ClientPositionUpdates), nullptr, true); } @@ -4684,8 +4679,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) if (raid) { raid->QueueClients(this, outapp, true, true, (RuleI(Range, ClientPositionUpdates) * -1)); - } - else if (group) { + } else if (group) { group->QueueClients(this, outapp, true, true, (RuleI(Range, ClientPositionUpdates) * -1)); } @@ -4693,11 +4687,17 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) } if (zone->watermap) { - if (zone->watermap->InLiquid(glm::vec3(m_Position))) + if (zone->watermap->InLiquid(glm::vec3(m_Position))) { CheckIncreaseSkill(EQEmu::skills::SkillSwimming, nullptr, -17); + + // Dismount horses when entering water + if (GetHorseId() && RuleB(Character, DismountWater)) { + SetHorseId(0); + BuffFadeByEffect(SE_SummonHorse); + } + } CheckRegionTypeChanges(); } - return; } From f51396aa70414798d3fa9d9c288feb18fb194b9f Mon Sep 17 00:00:00 2001 From: Trust Date: Sat, 21 Jul 2018 00:01:36 -0400 Subject: [PATCH 312/670] [Exploit Fix] AA Below Level Fix - When you are below level 52 with AA set above 0% it will revert the aa % to 0% --- zone/exp.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/zone/exp.cpp b/zone/exp.cpp index 2902610a8..6d8f5c9a3 100644 --- a/zone/exp.cpp +++ b/zone/exp.cpp @@ -512,6 +512,13 @@ void Client::AddEXP(uint32 in_add_exp, uint8 conlevel, bool resexp) { aaexp = had_aaexp; //watch for wrap } + // AA Sanity Checking for players who set aa exp and deleveled below allowed aa level. + if (GetLevel() <= 50 and m_epp.perAA > 0) { + Message(15, "You are below the level allowed to gain AA Experience. AA Experience set to 0%"); + aaexp = 0; + m_epp.perAA = 0; + } + // Now update our character's normal and AA xp SetEXP(exp, aaexp, resexp); } From 2f40e5da9856461df61e20762916b2cf9e61fa00 Mon Sep 17 00:00:00 2001 From: Trust Date: Sat, 21 Jul 2018 16:10:55 -0400 Subject: [PATCH 313/670] Fixing incorrect operator so Appveyor will pass. --- zone/exp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/exp.cpp b/zone/exp.cpp index 6d8f5c9a3..94f36197d 100644 --- a/zone/exp.cpp +++ b/zone/exp.cpp @@ -513,7 +513,7 @@ void Client::AddEXP(uint32 in_add_exp, uint8 conlevel, bool resexp) { } // AA Sanity Checking for players who set aa exp and deleveled below allowed aa level. - if (GetLevel() <= 50 and m_epp.perAA > 0) { + if (GetLevel() <= 50 && m_epp.perAA > 0) { Message(15, "You are below the level allowed to gain AA Experience. AA Experience set to 0%"); aaexp = 0; m_epp.perAA = 0; From c375716c22c454eb06e7d8b1ffa7a89d426992d7 Mon Sep 17 00:00:00 2001 From: Trust Date: Sat, 21 Jul 2018 16:17:42 -0400 Subject: [PATCH 314/670] [Exploit] Prevent players from summoning horses while feigned. --- zone/spell_effects.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index ee71a627b..bddaf6b5e 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -1730,7 +1730,12 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove #endif if(IsClient()) // NPCs can't ride { - CastToClient()->SummonHorse(spell_id); + Client *client = CastToClient(); + + // Prevent Feigned players from summoning horses and riding away to freedom. + client->SetFeigned(false); + client->Stand(); + client->SummonHorse(spell_id); } From b5b266d265b469229e18ab1b3b131d1a984340c8 Mon Sep 17 00:00:00 2001 From: Trust Date: Sat, 21 Jul 2018 16:24:14 -0400 Subject: [PATCH 315/670] Fixed Game breaking grammar issue with /split --- zone/client_packet.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 43e10b424..d5d266588 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -13311,13 +13311,13 @@ void Client::Handle_OP_Split(const EQApplicationPacket *app) //Per the note above, Im not exactly sure what to do on error //to notify the client of the error... if (!isgrouped) { - Message(13, "You can not split money if your not in a group."); + Message(13, "You can not split money if you're not in a group."); return; } Group *cgroup = GetGroup(); if (cgroup == nullptr) { //invalid group, not sure if we should say more... - Message(13, "You can not split money if your not in a group."); + Message(13, "You can not split money if you're not in a group."); return; } From 508a731181bec70aec677845a161d733d6b85f50 Mon Sep 17 00:00:00 2001 From: Trust Date: Sat, 21 Jul 2018 16:30:55 -0400 Subject: [PATCH 316/670] Added random graveyard corpse placement within +/- 20 units on X/Y axis to help spread corpses out. --- common/random.h | 27 +++++++++++++++++++++++++++ zone/zonedb.cpp | 6 +++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/common/random.h b/common/random.h index 0c877bfea..8bbc99397 100644 --- a/common/random.h +++ b/common/random.h @@ -97,6 +97,33 @@ namespace EQEmu { Reseed(); } + //generates a psuedo-random float between 0.0 and 0.999... + float randfloat() + { + return rand()/(float(RAND_MAX)+1); + } + + //generates a psuedo-random float between 0.0 and max + float randfloat(float max) + { + return randfloat()*max; + } + + //generates a psuedo-random float between min and max + float randfloat(float min, float max) + { + if (min>max) + return randfloat()*(min-max)+max; + else + return randfloat()*(max-min)+min; + } + + //generates a psuedo-random double between 0.0 and 0.999... + double randdouble() + { + return rand()/(double(RAND_MAX)+1); + } + private: typedef std::uniform_int_distribution::param_type int_param_t; typedef std::uniform_real_distribution::param_type real_param_t; diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index acb06bf19..97e08da78 100644 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -3842,12 +3842,16 @@ uint32 ZoneDatabase::CreateGraveyardRecord(uint32 graveyard_zone_id, const glm:: return 0; } uint32 ZoneDatabase::SendCharacterCorpseToGraveyard(uint32 dbid, uint32 zone_id, uint16 instance_id, const glm::vec4& position) { + + float xcorpse = (position.x + zone->random.randfloat(-20,20)); + float ycorpse = (position.y + zone->random.randfloat(-20,20)); + std::string query = StringFormat("UPDATE `character_corpses` " "SET `zone_id` = %u, `instance_id` = 0, " "`x` = %1.1f, `y` = %1.1f, `z` = %1.1f, `heading` = %1.1f, " "`was_at_graveyard` = 1 " "WHERE `id` = %d", - zone_id, position.x, position.y, position.z, position.w, dbid); + zone_id, xcorpse, ycorpse, position.z, position.w, dbid); QueryDatabase(query); return dbid; } From 9251e6efd253d2380658747ca566218b75af9a0b Mon Sep 17 00:00:00 2001 From: Trust Date: Sat, 21 Jul 2018 19:16:19 -0400 Subject: [PATCH 317/670] Disarm Support --- common/eq_packet_structs.h | 10 ++++ zone/client.cpp | 56 +++++++++++++++++++++++ zone/client.h | 1 + zone/client_packet.cpp | 93 ++++++++++++++++++++++++++++++++++++++ zone/client_packet.h | 1 + zone/npc.cpp | 60 ++++++++++++++++++++++++ zone/npc.h | 1 + 7 files changed, 222 insertions(+) diff --git a/common/eq_packet_structs.h b/common/eq_packet_structs.h index ced99f573..a7a2b8626 100644 --- a/common/eq_packet_structs.h +++ b/common/eq_packet_structs.h @@ -1783,6 +1783,16 @@ struct CombatAbility_Struct { uint32 m_skill; }; +// Disarm Struct incoming from Client [Size: 16] +// Haynar - 24 Jan 2011 +struct Disarm_Struct +{ + uint32 source; + uint32 target; + uint32 skill; + uint32 unknown; +}; + //Instill Doubt struct Instill_Doubt_Struct { uint8 i_id; diff --git a/zone/client.cpp b/zone/client.cpp index 3339deb9c..3627149f3 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -2682,6 +2682,62 @@ void Client::LogMerchant(Client* player, Mob* merchant, uint32 quantity, uint32 } } +void Client::Disarm(Client* disarmer, int chance) { + int16 slot = -1; + const EQEmu::ItemInstance *inst = this->GetInv().GetItem(EQEmu::invslot::slotPrimary); + if (inst && inst->IsWeapon()) { + slot = EQEmu::invslot::slotPrimary; + } + else { + inst = this->GetInv().GetItem(EQEmu::invslot::slotSecondary); + if (inst && inst->IsWeapon()) + slot = EQEmu::invslot::slotSecondary; + } + if (slot != -1 && inst->IsClassCommon()) { + // We have an item that can be disarmed. + if (zone->random.Int(0, 1000) <= chance) { + // Find a free inventory slot + int16 slot_id = -1; + slot_id = m_inv.FindFreeSlot(false, true, inst->GetItem()->Size, inst->GetItem()->ItemType); + if (slot_id != -1) + { + EQEmu::ItemInstance *InvItem = m_inv.PopItem(slot); + if (InvItem) { // there should be no way it is not there, but check anyway + EQApplicationPacket* outapp = new EQApplicationPacket(OP_MoveItem, sizeof(MoveItem_Struct)); + MoveItem_Struct* mi = (MoveItem_Struct*)outapp->pBuffer; + mi->from_slot = slot; + mi->to_slot = 0xFFFFFFFF; + if (inst->IsStackable()) // it should not be stackable + mi->number_in_stack = inst->GetCharges(); + else + mi->number_in_stack = 0; + FastQueuePacket(&outapp); // this deletes item from the weapon slot on the client + if (PutItemInInventory(slot_id, *InvItem, true)) + database.SaveInventory(this->CharacterID(), NULL, slot); + int matslot = slot == EQEmu::invslot::slotPrimary ? EQEmu::textures::weaponPrimary : EQEmu::textures::weaponSecondary; + if (matslot != -1) + SendWearChange(matslot); + } + Message(MT_Skills, "You have been disarmed!"); + if (disarmer != this) + disarmer->Message(MT_Skills, StringFormat("You have successfully disarmed %s", this->GetCleanName()).c_str()); + // Message_StringID(MT_Skills, DISARM_SUCCESS, this->GetCleanName()); + if (chance != 1000) + disarmer->CheckIncreaseSkill(EQEmu::skills::SkillDisarm, nullptr, 4); + CalcBonuses(); + // CalcEnduranceWeightFactor(); + return; + } + disarmer->Message(MT_Skills, StringFormat("You have failed to disarm your target").c_str()); + //disarmer->Message_StringID(MT_Skills, DISARM_FAILED); + if (chance != 1000) + disarmer->CheckIncreaseSkill(EQEmu::skills::SkillDisarm, nullptr, 2); + return; + } + } + disarmer->Message(MT_Skills, StringFormat("You have failed to disarm your target").c_str()); +} + bool Client::BindWound(Mob *bindmob, bool start, bool fail) { EQApplicationPacket *outapp = nullptr; diff --git a/zone/client.h b/zone/client.h index 77b509e4f..ead552f73 100644 --- a/zone/client.h +++ b/zone/client.h @@ -803,6 +803,7 @@ public: void NPCSpawn(NPC *target_npc, const char *identifier, uint32 extra = 0); + void Disarm(Client* disarmer, int chance); bool BindWound(Mob* bindmob, bool start, bool fail = false); void SetTradeskillObject(Object* object) { m_tradeskill_object = object; } Object* GetTradeskillObject() { return m_tradeskill_object; } diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 43e10b424..754d9d9cd 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -181,6 +181,7 @@ void MapOpcodes() ConnectedOpcodes[OP_DeleteItem] = &Client::Handle_OP_DeleteItem; ConnectedOpcodes[OP_DeleteSpawn] = &Client::Handle_OP_DeleteSpawn; ConnectedOpcodes[OP_DeleteSpell] = &Client::Handle_OP_DeleteSpell; + ConnectedOpcodes[OP_Disarm] = &Client::Handle_OP_Disarm; ConnectedOpcodes[OP_DisarmTraps] = &Client::Handle_OP_DisarmTraps; ConnectedOpcodes[OP_DoGroupLeadershipAbility] = &Client::Handle_OP_DoGroupLeadershipAbility; ConnectedOpcodes[OP_DuelResponse] = &Client::Handle_OP_DuelResponse; @@ -5324,6 +5325,98 @@ void Client::Handle_OP_DeleteSpawn(const EQApplicationPacket *app) return; } +void Client::Handle_OP_Disarm(const EQApplicationPacket *app) { + if (dead || bZoning) return; + if (!HasSkill(EQEmu::skills::SkillDisarm)) + return; + + if (app->size != sizeof(Disarm_Struct)) { + Log(Logs::General, Logs::Skills, "Size mismatch for Disarm_Struct packet"); + return; + } + + Disarm_Struct *disarm = (Disarm_Struct *)app->pBuffer; + + if (!p_timers.Expired(&database, pTimerCombatAbility2, false)) { + Message(13, "Ability recovery time not yet met."); + return; + } + + p_timers.Start(pTimerCombatAbility2, 8); + + BreakInvis(); + Mob* pmob = entity_list.GetMob(disarm->source); + Mob* tmob = entity_list.GetMob(disarm->target); + if (!pmob || !tmob) + return; + if (pmob->GetID() != GetID()) { + // Client sent a disarm request with an originator ID not matching their own ID. + char *hack_str = NULL; + MakeAnyLenString(&hack_str, "Player %s (%d) sent OP_Disarm with source ID of: %d", GetCleanName(), GetID(), pmob->GetID()); + database.SetMQDetectionFlag(this->account_name, this->name, hack_str, zone->GetShortName()); + safe_delete_array(hack_str); + return; + } + // No disarm on corpses + if (tmob->IsCorpse()) + return; + // No target + if (!GetTarget()) + return; + // Targets don't match (possible hack, but not flagging) + if (GetTarget() != tmob) { + return; + } + // Too far away + if (pmob->CalculateDistance(GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ()) > 400) + return; + + // Can't see mob + //if (tmob->BehindMob(pmob)) + // return; + // How can we disarm someone if we are feigned. + if (GetFeigned()) + return; + // We can't disarm someone who is feigned. + if (tmob->IsClient() && tmob->CastToClient()->GetFeigned()) + return; + if (GetTarget() == tmob && pmob == this->CastToMob() && + disarm->skill == GetSkill(EQEmu::skills::SkillDisarm) && IsAttackAllowed(tmob)) { + int p_level = pmob->GetLevel() ? pmob->GetLevel() : 1; + int t_level = tmob->GetLevel() ? tmob->GetLevel() : 1; + // We have a disarmable target - sucess or fail, we always aggro the mob + if (tmob->IsNPC()) { + if (!tmob->CheckAggro(pmob)) { + zone->AddAggroMob(); + tmob->AddToHateList(pmob, p_level); + } + else { + tmob->AddToHateList(pmob, p_level / 3); + } + } + int chance = GetSkill(EQEmu::skills::SkillDisarm); // (1% @ 0 skill) (11% @ 200 skill) - against even con + chance /= 2; + chance += 10; + // Modify chance based on level difference + float lvl_mod = p_level / t_level; + chance *= lvl_mod; + if (chance > 300) + chance = 300; // max chance of 30% + if (tmob->IsNPC()) { + tmob->CastToNPC()->Disarm(this, chance); + } + else if (tmob->IsClient()) { + tmob->CastToClient()->Disarm(this, chance); + } + return; + } + // Trying to disarm something we can't disarm + Message(13, "Your attempt to disarm your target has failed."); + // Message_StringID(MT_Skills, DISARM_FAILED); + + return; +} + void Client::Handle_OP_DeleteSpell(const EQApplicationPacket *app) { if (app->size != sizeof(DeleteSpell_Struct)) diff --git a/zone/client_packet.h b/zone/client_packet.h index 4f9902599..9605dc8cf 100644 --- a/zone/client_packet.h +++ b/zone/client_packet.h @@ -94,6 +94,7 @@ void Handle_OP_DeleteItem(const EQApplicationPacket *app); void Handle_OP_DeleteSpawn(const EQApplicationPacket *app); void Handle_OP_DeleteSpell(const EQApplicationPacket *app); + void Handle_OP_Disarm(const EQApplicationPacket *app); void Handle_OP_DisarmTraps(const EQApplicationPacket *app); void Handle_OP_DoGroupLeadershipAbility(const EQApplicationPacket *app); void Handle_OP_DuelResponse(const EQApplicationPacket *app); diff --git a/zone/npc.cpp b/zone/npc.cpp index 917dafe9b..af5f8da54 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -1691,6 +1691,66 @@ void NPC::PickPocket(Client* thief) thief->SendPickPocketResponse(this, 0, PickPocketFailed); } +void NPC::Disarm(Client* client, int chance) { + // disarm primary if available, otherwise disarm secondary + const EQEmu::ItemData* weapon = NULL; + uint8 eslot = 0xFF; + if (equipment[EQEmu::invslot::slotPrimary] != 0) + eslot = EQEmu::invslot::slotPrimary; + else if (equipment[EQEmu::invslot::slotSecondary] != 0) + eslot = EQEmu::invslot::slotSecondary; + if (eslot != 0xFF) { + if (zone->random.Int(0, 1000) <= chance) { + weapon = database.GetItem(equipment[eslot]); + if (weapon) { + if (!weapon->Magic && weapon->NoDrop == 255) { + int16 charges = -1; + ItemList::iterator cur, end; + cur = itemlist.begin(); + end = itemlist.end(); + // Get charges for the item in the loot table + for (; cur != end; cur++) { + ServerLootItem_Struct* citem = *cur; + if (citem->item_id == weapon->ID) { + charges = citem->charges; + break; + } + } + EQEmu::ItemInstance *inst = NULL; + inst = database.CreateItem(weapon->ID, charges); + // Remove item from loot table + RemoveItem(weapon->ID); + CalcBonuses(); + if (inst) { + // create a ground item + Object* object = new Object(inst, this->GetX(), this->GetY(), this->GetZ(), 0.0f, 300000); + entity_list.AddObject(object, true); + object->StartDecay(); + safe_delete(inst); + } + } + } + // Update Appearance + equipment[eslot] = 0; + int matslot = eslot == EQEmu::invslot::slotPrimary ? EQEmu::textures::weaponPrimary : EQEmu::textures::weaponSecondary; + if (matslot != -1) + SendWearChange(matslot); + if ((CastToMob()->GetBodyType() == BT_Humanoid || CastToMob()->GetBodyType() == BT_Summoned) && eslot == EQEmu::invslot::slotPrimary) + Say("Ahh! My weapon!"); + client->Message(MT_Skills, "You have successfully disarmed your target."); + //client->Message_StringID(MT_Skills, DISARM_SUCCESS, this->GetCleanName()); + if (chance != 1000) + client->CheckIncreaseSkill(EQEmu::skills::SkillDisarm, nullptr, 4); + return; + } + client->Message(MT_Skills, StringFormat("You have failed to disarm your target").c_str()); + if (chance != 1000) + client->CheckIncreaseSkill(EQEmu::skills::SkillDisarm, nullptr, 2); + return; + } + client->Message(MT_Skills, StringFormat("You have failed to disarm your target").c_str()); +} + void Mob::NPCSpecialAttacks(const char* parse, int permtag, bool reset, bool remove) { if(reset) { diff --git a/zone/npc.h b/zone/npc.h index 0201d3b9f..cba67c698 100644 --- a/zone/npc.h +++ b/zone/npc.h @@ -278,6 +278,7 @@ public: void SetTaunting(bool tog) {taunting = tog;} bool IsTaunting() const { return taunting; } void PickPocket(Client* thief); + void Disarm(Client* client, int chance); void StartSwarmTimer(uint32 duration) { swarm_timer.Start(duration); } void AddLootDrop(const EQEmu::ItemData*dbitem, ItemList* itemlistconst, int16 charges, uint8 minlevel, uint8 maxlevel, bool equipit, bool wearchange = false, uint32 aug1 = 0, uint32 aug2 = 0, uint32 aug3 = 0, uint32 aug4 = 0, uint32 aug5 = 0, uint32 aug6 = 0); virtual void DoClassAttacks(Mob *target); From 9fa377303e9c9a95e3197dbcb8672cefd97bc28d Mon Sep 17 00:00:00 2001 From: Trust Date: Sat, 21 Jul 2018 22:20:53 -0400 Subject: [PATCH 318/670] Corrected Disarm StringID's --- common/eq_packet_structs.h | 1 - zone/client.cpp | 8 +++----- zone/string_ids.h | 3 +++ 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/common/eq_packet_structs.h b/common/eq_packet_structs.h index a7a2b8626..a35c264e0 100644 --- a/common/eq_packet_structs.h +++ b/common/eq_packet_structs.h @@ -1784,7 +1784,6 @@ struct CombatAbility_Struct { }; // Disarm Struct incoming from Client [Size: 16] -// Haynar - 24 Jan 2011 struct Disarm_Struct { uint32 source; diff --git a/zone/client.cpp b/zone/client.cpp index 3627149f3..e2b3b2496 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -2718,18 +2718,16 @@ void Client::Disarm(Client* disarmer, int chance) { if (matslot != -1) SendWearChange(matslot); } - Message(MT_Skills, "You have been disarmed!"); + Message_StringID(MT_Skills, DISARMED); if (disarmer != this) - disarmer->Message(MT_Skills, StringFormat("You have successfully disarmed %s", this->GetCleanName()).c_str()); - // Message_StringID(MT_Skills, DISARM_SUCCESS, this->GetCleanName()); + disarmer->Message_StringID(MT_Skills, DISARM_SUCCESS, this->GetCleanName()); if (chance != 1000) disarmer->CheckIncreaseSkill(EQEmu::skills::SkillDisarm, nullptr, 4); CalcBonuses(); // CalcEnduranceWeightFactor(); return; } - disarmer->Message(MT_Skills, StringFormat("You have failed to disarm your target").c_str()); - //disarmer->Message_StringID(MT_Skills, DISARM_FAILED); + disarmer->Message_StringID(MT_Skills, DISARM_FAILED); if (chance != 1000) disarmer->CheckIncreaseSkill(EQEmu::skills::SkillDisarm, nullptr, 2); return; diff --git a/zone/string_ids.h b/zone/string_ids.h index a760f8bbe..7ebbbf874 100644 --- a/zone/string_ids.h +++ b/zone/string_ids.h @@ -446,6 +446,9 @@ #define TRY_ATTACKING_SOMEONE 12696 //Try attacking someone other than yourself, it's more productive #define RANGED_TOO_CLOSE 12698 //Your target is too close to use a ranged weapon! #define BACKSTAB_WEAPON 12874 //You need a piercing weapon as your primary weapon in order to backstab +#define DISARMED 12889 //You have been disarmed! +#define DISARM_SUCCESS 12890 //You disarmed %1! +#define DISARM_FAILED 12891 //Your attempt to disarm failed. #define MORE_SKILLED_THAN_I 12931 //%1 tells you, 'You are more skilled than I! What could I possibly teach you?' #define SURNAME_EXISTS 12939 //You already have a surname. Operation failed. #define SURNAME_LEVEL 12940 //You can only submit a surname upon reaching the 20th level. Operation failed. From 7a44521b03214886e6ffaa566eef76a7980f5c32 Mon Sep 17 00:00:00 2001 From: Trust Date: Sat, 21 Jul 2018 23:02:07 -0400 Subject: [PATCH 319/670] rand is bad random.Real is good! --- common/random.h | 27 --------------------------- zone/zonedb.cpp | 4 ++-- 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/common/random.h b/common/random.h index 8bbc99397..0c877bfea 100644 --- a/common/random.h +++ b/common/random.h @@ -97,33 +97,6 @@ namespace EQEmu { Reseed(); } - //generates a psuedo-random float between 0.0 and 0.999... - float randfloat() - { - return rand()/(float(RAND_MAX)+1); - } - - //generates a psuedo-random float between 0.0 and max - float randfloat(float max) - { - return randfloat()*max; - } - - //generates a psuedo-random float between min and max - float randfloat(float min, float max) - { - if (min>max) - return randfloat()*(min-max)+max; - else - return randfloat()*(max-min)+min; - } - - //generates a psuedo-random double between 0.0 and 0.999... - double randdouble() - { - return rand()/(double(RAND_MAX)+1); - } - private: typedef std::uniform_int_distribution::param_type int_param_t; typedef std::uniform_real_distribution::param_type real_param_t; diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index 97e08da78..f79288126 100644 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -3843,8 +3843,8 @@ uint32 ZoneDatabase::CreateGraveyardRecord(uint32 graveyard_zone_id, const glm:: } uint32 ZoneDatabase::SendCharacterCorpseToGraveyard(uint32 dbid, uint32 zone_id, uint16 instance_id, const glm::vec4& position) { - float xcorpse = (position.x + zone->random.randfloat(-20,20)); - float ycorpse = (position.y + zone->random.randfloat(-20,20)); + double xcorpse = (position.x + zone->random.Real(-20,20)); + double ycorpse = (position.y + zone->random.Real(-20,20)); std::string query = StringFormat("UPDATE `character_corpses` " "SET `zone_id` = %u, `instance_id` = 0, " From 2fe923457b080e171c11d59f85f611fe4f77c780 Mon Sep 17 00:00:00 2001 From: Trust Date: Sat, 21 Jul 2018 23:22:14 -0400 Subject: [PATCH 320/670] Fixed more Message_StringID --- zone/client.cpp | 2 +- zone/client_packet.cpp | 3 +-- zone/npc.cpp | 7 +++---- zone/string_ids.h | 1 + 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/zone/client.cpp b/zone/client.cpp index e2b3b2496..6acd203f4 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -2733,7 +2733,7 @@ void Client::Disarm(Client* disarmer, int chance) { return; } } - disarmer->Message(MT_Skills, StringFormat("You have failed to disarm your target").c_str()); + disarmer->Message_StringID(MT_Skills, DISARM_FAILED); } bool Client::BindWound(Mob *bindmob, bool start, bool fail) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 754d9d9cd..58ea34e32 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -5411,8 +5411,7 @@ void Client::Handle_OP_Disarm(const EQApplicationPacket *app) { return; } // Trying to disarm something we can't disarm - Message(13, "Your attempt to disarm your target has failed."); - // Message_StringID(MT_Skills, DISARM_FAILED); + Message_StringID(MT_Skills, DISARM_NO_TARGET); return; } diff --git a/zone/npc.cpp b/zone/npc.cpp index af5f8da54..e77ae0618 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -1737,18 +1737,17 @@ void NPC::Disarm(Client* client, int chance) { SendWearChange(matslot); if ((CastToMob()->GetBodyType() == BT_Humanoid || CastToMob()->GetBodyType() == BT_Summoned) && eslot == EQEmu::invslot::slotPrimary) Say("Ahh! My weapon!"); - client->Message(MT_Skills, "You have successfully disarmed your target."); - //client->Message_StringID(MT_Skills, DISARM_SUCCESS, this->GetCleanName()); + client->Message_StringID(MT_Skills, DISARM_SUCCESS, this->GetCleanName()); if (chance != 1000) client->CheckIncreaseSkill(EQEmu::skills::SkillDisarm, nullptr, 4); return; } - client->Message(MT_Skills, StringFormat("You have failed to disarm your target").c_str()); + client->Message_StringID(MT_Skills, DISARM_FAILED); if (chance != 1000) client->CheckIncreaseSkill(EQEmu::skills::SkillDisarm, nullptr, 2); return; } - client->Message(MT_Skills, StringFormat("You have failed to disarm your target").c_str()); + client->Message_StringID(MT_Skills, DISARM_FAILED); } void Mob::NPCSpecialAttacks(const char* parse, int permtag, bool reset, bool remove) { diff --git a/zone/string_ids.h b/zone/string_ids.h index 7ebbbf874..2c223ffbd 100644 --- a/zone/string_ids.h +++ b/zone/string_ids.h @@ -301,6 +301,7 @@ #define CORPSEDRAG_STOPALL 4065 //You stop dragging the corpses. #define CORPSEDRAG_STOP 4066 //You stop dragging the corpse. #define SOS_KEEPS_HIDDEN 4086 //Your Shroud of Stealth keeps you hidden from watchful eyes.â£â£ +#define DISARM_NO_TARGET 4583 //You can't use disarm on that. #define TARGET_TOO_CLOSE 4602 //You are too close to your target. Get farther away. #define WHOALL_NO_RESULTS 5029 //There are no players in EverQuest that match those who filters. #define TELL_QUEUED_MESSAGE 5045 //You told %1 '%T2. %3' From f9ea18b64221d9cc29d42ccf38c265db7405b408 Mon Sep 17 00:00:00 2001 From: regneq Date: Sun, 22 Jul 2018 09:31:58 -0700 Subject: [PATCH 321/670] Quest NPCs will no longer turn and face their target if they are sneaking, sitting, or laying/playdead. --- zone/npc.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zone/npc.cpp b/zone/npc.cpp index e77ae0618..3ada452d1 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -2713,9 +2713,11 @@ uint32 NPC::GetSpawnKillCount() void NPC::DoQuestPause(Mob *other) { if(IsMoving() && !IsOnHatelist(other)) { PauseWandering(RuleI(NPC, SayPauseTimeInSec)); - FaceTarget(other); + if (other && !other->sneaking) + FaceTarget(other); } else if(!IsMoving()) { - FaceTarget(other); + if (other && !other->sneaking && GetAppearance() != eaSitting && GetAppearance() != eaDead) + FaceTarget(other); } } From f8f1061cedde1677661f6b2740cfdd775c21458a Mon Sep 17 00:00:00 2001 From: Trust Date: Sun, 22 Jul 2018 12:39:34 -0400 Subject: [PATCH 322/670] [Queryserv] Dropped Item Logging --- common/ruletypes.h | 1 + common/servertalk.h | 22 +++++++++++++ queryserv/database.cpp | 33 +++++++++++++++++++ queryserv/database.h | 1 + queryserv/worldserver.cpp | 5 +++ world/zoneserver.cpp | 1 + zone/client.h | 1 + zone/inventory.cpp | 69 +++++++++++++++++++++++++++++++++++++++ zone/object.cpp | 2 ++ 9 files changed, 135 insertions(+) diff --git a/common/ruletypes.h b/common/ruletypes.h index c89213368..fd5ce8a7d 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -692,6 +692,7 @@ RULE_CATEGORY_END() RULE_CATEGORY(QueryServ) RULE_BOOL(QueryServ, PlayerLogChat, false) // Logs Player Chat RULE_BOOL(QueryServ, PlayerLogTrades, false) // Logs Player Trades +RULE_BOOL(QueryServ, PlayerDropItems, false) // Logs Player dropping items RULE_BOOL(QueryServ, PlayerLogHandins, false) // Logs Player Handins RULE_BOOL(QueryServ, PlayerLogNPCKills, false) // Logs Player NPC Kills RULE_BOOL(QueryServ, PlayerLogDeletes, false) // Logs Player Deletes diff --git a/common/servertalk.h b/common/servertalk.h index e1d019fc4..c5bee9ef8 100644 --- a/common/servertalk.h +++ b/common/servertalk.h @@ -203,6 +203,7 @@ #define ServerOP_CZSignalNPC 0x5017 #define ServerOP_CZSetEntityVariableByNPCTypeID 0x5018 #define ServerOP_WWMarquee 0x5019 +#define ServerOP_QSPlayerDropItem 0x5020 /* Query Serv Generic Packet Flag/Type Enumeration */ enum { QSG_LFGuild = 0 }; @@ -1140,6 +1141,27 @@ struct QSPlayerLogTrade_Struct { QSTradeItems_Struct items[0]; }; +struct QSDropItems_Struct { + uint32 item_id; + uint16 charges; + uint32 aug_1; + uint32 aug_2; + uint32 aug_3; + uint32 aug_4; + uint32 aug_5; +}; + +struct QSPlayerDropItem_Struct { + uint32 char_id; + bool pickup; // 0 drop, 1 pickup + uint32 zone_id; + int x; + int y; + int z; + uint16 _detail_count; + QSDropItems_Struct items[0]; +}; + struct QSHandinItems_Struct { char action_type[7]; // handin, return or reward uint16 char_slot; diff --git a/queryserv/database.cpp b/queryserv/database.cpp index c4e185360..fcda884e4 100644 --- a/queryserv/database.cpp +++ b/queryserv/database.cpp @@ -123,6 +123,39 @@ void Database::AddSpeech(const char* from, const char* to, const char* message, } +void Database::LogPlayerDropItem(QSPlayerDropItem_Struct* QS) { + + std::string query = StringFormat("INSERT INTO `qs_player_drop_record` SET `time` = NOW(), " + "`char_id` = '%i', `pickup` = '%i', " + "`zone_id` = '%i', `x` = '%i', `y` = '%i', `z` = '%i' ", + QS->char_id, QS->pickup, QS->zone_id, QS->x, QS->y, QS->z); + + auto results = QueryDatabase(query); + if (!results.Success()) { + Log(Logs::Detail, Logs::QS_Server, "Failed Drop Record Insert: %s", results.ErrorMessage().c_str()); + Log(Logs::Detail, Logs::QS_Server, "%s", query.c_str()); + } + + if (QS->_detail_count == 0) + return; + + int lastIndex = results.LastInsertedID(); + + for (int i = 0; i < QS->_detail_count; i++) { + query = StringFormat("INSERT INTO `qs_player_drop_record_entries` SET `event_id` = '%i', " + "`item_id` = '%i', `charges` = '%i', `aug_1` = '%i', `aug_2` = '%i', " + "`aug_3` = '%i', `aug_4` = '%i', `aug_5` = '%i'", + lastIndex, QS->items[i].item_id, + QS->items[i].charges, QS->items[i].aug_1, QS->items[i].aug_2, + QS->items[i].aug_3, QS->items[i].aug_4, QS->items[i].aug_5); + results = QueryDatabase(query); + if (!results.Success()) { + Log(Logs::Detail, Logs::QS_Server, "Failed Drop Record Entry Insert: %s", results.ErrorMessage().c_str()); + Log(Logs::Detail, Logs::QS_Server, "%s", query.c_str()); + } + } +} + void Database::LogPlayerTrade(QSPlayerLogTrade_Struct* QS, uint32 detailCount) { std::string query = StringFormat("INSERT INTO `qs_player_trade_record` SET `time` = NOW(), " diff --git a/queryserv/database.h b/queryserv/database.h index b2d32341b..13815c575 100644 --- a/queryserv/database.h +++ b/queryserv/database.h @@ -45,6 +45,7 @@ public: void AddSpeech(const char* from, const char* to, const char* message, uint16 minstatus, uint32 guilddbid, uint8 type); void LogPlayerTrade(QSPlayerLogTrade_Struct* QS, uint32 DetailCount); + void LogPlayerDropItem(QSPlayerDropItem_Struct* QS); void LogPlayerHandin(QSPlayerLogHandin_Struct* QS, uint32 DetailCount); void LogPlayerNPCKill(QSPlayerLogNPCKill_Struct* QS, uint32 Members); void LogPlayerDelete(QSPlayerLogDelete_Struct* QS, uint32 Items); diff --git a/queryserv/worldserver.cpp b/queryserv/worldserver.cpp index 686c92326..a03d23b1e 100644 --- a/queryserv/worldserver.cpp +++ b/queryserv/worldserver.cpp @@ -98,6 +98,11 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) database.LogPlayerTrade(QS, QS->_detail_count); break; } + case ServerOP_QSPlayerDropItem: { + QSPlayerDropItem_Struct *QS = (QSPlayerDropItem_Struct *) p.Data(); + database.LogPlayerDropItem(QS); + break; + } case ServerOP_QSPlayerLogHandins: { QSPlayerLogHandin_Struct *QS = (QSPlayerLogHandin_Struct*)p.Data(); database.LogPlayerHandin(QS, QS->_detail_count); diff --git a/world/zoneserver.cpp b/world/zoneserver.cpp index 263aeee2f..7d638d100 100644 --- a/world/zoneserver.cpp +++ b/world/zoneserver.cpp @@ -1295,6 +1295,7 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) { case ServerOP_QSPlayerLogDeletes: case ServerOP_QSPlayerLogMoves: case ServerOP_QSPlayerLogMerchantTransactions: + case ServerOP_QSPlayerDropItem: { QSLink.SendPacket(pack); break; diff --git a/zone/client.h b/zone/client.h index ead552f73..393ede129 100644 --- a/zone/client.h +++ b/zone/client.h @@ -876,6 +876,7 @@ public: void SetStats(uint8 type,int16 set_val); void IncStats(uint8 type,int16 increase_val); void DropItem(int16 slot_id, bool recurse = true); + void DropItemQS(EQEmu::ItemInstance* inst, bool pickup); int GetItemLinkHash(const EQEmu::ItemInstance* inst); // move to ItemData..or make use of the pre-calculated database field diff --git a/zone/inventory.cpp b/zone/inventory.cpp index d375d94b6..902268e2c 100644 --- a/zone/inventory.cpp +++ b/zone/inventory.cpp @@ -688,10 +688,79 @@ void Client::DropItem(int16 slot_id, bool recurse) object->StartDecay(); Log(Logs::General, Logs::Inventory, "Item drop handled ut assolet"); + DropItemQS(inst, false); safe_delete(inst); } +void Client::DropItemQS(EQEmu::ItemInstance* inst, bool pickup) { + if (RuleB(QueryServ, PlayerDropItems)) { + QSPlayerDropItem_Struct qs_audit; + std::list event_details; + memset(&qs_audit, 0, sizeof(QSPlayerDropItem_Struct)); + + qs_audit.char_id = this->character_id; + qs_audit.pickup = pickup; + qs_audit.zone_id = this->GetZoneID(); + qs_audit.x = (int) this->GetX(); + qs_audit.y = (int) this->GetY(); + qs_audit.z = (int) this->GetZ(); + + if (inst) { + auto detail = new QSDropItems_Struct; + detail->item_id = inst->GetID(); + detail->charges = inst->IsClassBag() ? 1 : inst->GetCharges(); + detail->aug_1 = inst->GetAugmentItemID(1); + detail->aug_2 = inst->GetAugmentItemID(2); + detail->aug_3 = inst->GetAugmentItemID(3); + detail->aug_4 = inst->GetAugmentItemID(4); + detail->aug_5 = inst->GetAugmentItemID(5); + event_details.push_back(detail); + + if (inst->IsClassBag()) { + for (uint8 sub_slot = EQEmu::invbag::SLOT_BEGIN; (sub_slot <= EQEmu::invbag::SLOT_END); ++sub_slot) { // this is to catch ALL items + const EQEmu::ItemInstance* bag_inst = inst->GetItem(sub_slot); + if (bag_inst) { + detail = new QSDropItems_Struct; + detail->item_id = bag_inst->GetID(); + detail->charges = (!bag_inst->IsStackable() ? 1 : bag_inst->GetCharges()); + detail->aug_1 = bag_inst->GetAugmentItemID(1); + detail->aug_2 = bag_inst->GetAugmentItemID(2); + detail->aug_3 = bag_inst->GetAugmentItemID(3); + detail->aug_4 = bag_inst->GetAugmentItemID(4); + detail->aug_5 = bag_inst->GetAugmentItemID(5); + event_details.push_back(detail); + } + } + } + } + qs_audit._detail_count = event_details.size(); + + auto qs_pack = new ServerPacket( + ServerOP_QSPlayerDropItem, + sizeof(QSPlayerDropItem_Struct) + + (sizeof(QSDropItems_Struct) * qs_audit._detail_count)); + QSPlayerDropItem_Struct* qs_buf = (QSPlayerDropItem_Struct*) qs_pack->pBuffer; + + memcpy(qs_buf, &qs_audit, sizeof(QSPlayerDropItem_Struct)); + + int offset = 0; + + for (auto iter = event_details.begin(); iter != event_details.end(); ++iter, ++offset) { + QSDropItems_Struct* detail = reinterpret_cast(*iter); + qs_buf->items[offset] = *detail; + safe_delete(detail); + } + + event_details.clear(); + + if (worldserver.Connected()) + worldserver.SendPacket(qs_pack); + + safe_delete(qs_pack); + } +} + // Drop inst void Client::DropInst(const EQEmu::ItemInstance* inst) { diff --git a/zone/object.cpp b/zone/object.cpp index 3ad4a6a9c..4306c6642 100644 --- a/zone/object.cpp +++ b/zone/object.cpp @@ -528,6 +528,8 @@ bool Object::HandleClick(Client* sender, const ClickObject_Struct* click_object) if(cursordelete) // delete the item if it's a duplicate lore. We have to do this because the client expects the item packet sender->DeleteItemInInventory(EQEmu::invslot::slotCursor); + sender->DropItemQS(m_inst, true); + if(!m_ground_spawn) safe_delete(m_inst); From c2c8de01b8cb65a5cc66a23468b847ddd3cf76d3 Mon Sep 17 00:00:00 2001 From: Trust Date: Sun, 22 Jul 2018 14:41:35 -0400 Subject: [PATCH 323/670] Purfy Body Resurrection Effects fix Purify Body was removing Resurrection Effects and it should not. Added a !IsResurrectionEffects check to the logic to make sure Purify Body does not remove Resurrection Effects. --- zone/spell_effects.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index bddaf6b5e..7f437854e 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -1130,7 +1130,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove int buff_count = GetMaxTotalSlots(); for(int slot = 0; slot < buff_count; slot++) { if (buffs[slot].spellid != SPELL_UNKNOWN && - IsDetrimentalSpell(buffs[slot].spellid)) + IsDetrimentalSpell(buffs[slot].spellid) && !IsResurrectionEffects(buffs[slot].spellid)) { if (caster && TryDispel(caster->GetLevel(),buffs[slot].casterlevel, effect_value)){ BuffFadeBySlot(slot); From 79c7d9d8f2cff96251660425370ce2ebe1e70873 Mon Sep 17 00:00:00 2001 From: Trust Date: Sun, 22 Jul 2018 15:02:18 -0400 Subject: [PATCH 324/670] SeeInvis % - Random Added Function for GetSeeInvisible to pull the % chance from the database to spawn the npc as a SI mob. If see_invis = 0/1 it will still function as normal, but if it is over 1, it will act as a % chance for the mob to SI. --- zone/mob.cpp | 24 ++++++++++++++++++++---- zone/mob.h | 1 + 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/zone/mob.cpp b/zone/mob.cpp index 5f998347d..9764ba099 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -404,10 +404,11 @@ Mob::Mob(const char* in_name, pStandingPetOrder = SPO_Follow; pseudo_rooted = false; - see_invis = in_see_invis; - see_invis_undead = in_see_invis_undead != 0; - see_hide = in_see_hide != 0; - see_improved_hide = in_see_improved_hide != 0; + see_invis = GetSeeInvisible(in_see_invis); + see_invis_undead = GetSeeInvisible(in_see_invis_undead); + see_hide = GetSeeInvisible(in_see_hide); + see_improved_hide = GetSeeInvisible(in_see_improved_hide); + qglobal = in_qglobal != 0; // Bind wound @@ -5679,6 +5680,21 @@ float Mob::HeadingAngleToMob(float other_x, float other_y) return (90.0f - angle + 270.0f) * 511.5f * 0.0027777778f; } +bool Mob::GetSeeInvisible(uint8 see_invis) +{ + if(see_invis > 0) + { + if(see_invis == 1) + return true; + else + { + if (zone->random.Int(0, 99) < see_invis) + return true; + } + } + return false; +} + int32 Mob::GetSpellStat(uint32 spell_id, const char *identifier, uint8 slot) { if (!IsValidSpell(spell_id)) diff --git a/zone/mob.h b/zone/mob.h index 5561ef0da..422c76cd3 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -256,6 +256,7 @@ public: inline bool SeeInvisibleUndead() const { return see_invis_undead; } inline bool SeeHide() const { return see_hide; } inline bool SeeImprovedHide() const { return see_improved_hide; } + inline bool GetSeeInvisible(uint8 see_invis); bool IsInvisible(Mob* other = 0) const; void SetInvisible(uint8 state); EQEmu::skills::SkillType AttackAnimation(int Hand, const EQEmu::ItemInstance* weapon, EQEmu::skills::SkillType skillinuse = EQEmu::skills::Skill1HBlunt); From d707fb13b825bf9f236059c8649efc21e368a54e Mon Sep 17 00:00:00 2001 From: Trust Date: Sun, 22 Jul 2018 16:31:24 -0400 Subject: [PATCH 325/670] Changed RezEffect check to dispell_flag --- zone/spell_effects.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 7f437854e..748deffe9 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -1130,7 +1130,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove int buff_count = GetMaxTotalSlots(); for(int slot = 0; slot < buff_count; slot++) { if (buffs[slot].spellid != SPELL_UNKNOWN && - IsDetrimentalSpell(buffs[slot].spellid) && !IsResurrectionEffects(buffs[slot].spellid)) + IsDetrimentalSpell(buffs[slot].spellid) && spells[buffs[slot].spellid].dispel_flag) { if (caster && TryDispel(caster->GetLevel(),buffs[slot].casterlevel, effect_value)){ BuffFadeBySlot(slot); From d4558b4664dae780f453ce1b8836e28d1c80cad7 Mon Sep 17 00:00:00 2001 From: Trust Date: Sun, 22 Jul 2018 16:32:53 -0400 Subject: [PATCH 326/670] Forgot to have the comparison flag --- zone/spell_effects.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 748deffe9..e7d182105 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -1130,7 +1130,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove int buff_count = GetMaxTotalSlots(); for(int slot = 0; slot < buff_count; slot++) { if (buffs[slot].spellid != SPELL_UNKNOWN && - IsDetrimentalSpell(buffs[slot].spellid) && spells[buffs[slot].spellid].dispel_flag) + IsDetrimentalSpell(buffs[slot].spellid) && spells[buffs[slot].spellid].dispel_flag == 0) { if (caster && TryDispel(caster->GetLevel(),buffs[slot].casterlevel, effect_value)){ BuffFadeBySlot(slot); From 483b4724e5f30e667bfeb4bec9007500a276add1 Mon Sep 17 00:00:00 2001 From: Trust Date: Sun, 22 Jul 2018 16:38:45 -0400 Subject: [PATCH 327/670] [Exploit] Prevent low level mez testing without aggro. Using low level mez to test if a mob is mezzable and NOT get aggro has been squashed. When you cast you will get 1 point of aggro on a Cannot mez with this spell. --- zone/spells.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/zone/spells.cpp b/zone/spells.cpp index 8f8cfba33..a0b149a8d 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -4247,6 +4247,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster) { Log(Logs::Detail, Logs::Spells, "Our level (%d) is higher than the limit of this Mez spell (%d)", GetLevel(), spells[spell_id].max[effect_index]); caster->Message_StringID(MT_Shout, CANNOT_MEZ_WITH_SPELL); + AddToHateList(caster, 1,0,true,false,false,spell_id); return true; } } From 6b02d50a8c4a1193410ee9d34911a7e7f1ca5cd5 Mon Sep 17 00:00:00 2001 From: Trust Date: Sun, 22 Jul 2018 18:22:07 -0400 Subject: [PATCH 328/670] Allow Separate GrayCon Flee rate. Added following Rules: Combat:FleeGray - If true FleeGrayHPRatio will be used. Combat:FleeGrayHPRatio - HP % when a Gray NPC begins to flee. --- common/ruletypes.h | 2 + zone/aggro.cpp | 23 +++++----- zone/entity.h | 2 +- zone/fearpath.cpp | 102 +++++++++++++++++++++++++++++---------------- zone/merc.cpp | 2 +- 5 files changed, 83 insertions(+), 48 deletions(-) diff --git a/common/ruletypes.h b/common/ruletypes.h index c89213368..b1bba0423 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -419,6 +419,8 @@ RULE_BOOL(Combat, UseIntervalAC, true) RULE_INT(Combat, PetAttackMagicLevel, 30) RULE_BOOL(Combat, EnableFearPathing, true) RULE_REAL(Combat, FleeMultiplier, 2.0) // Determines how quickly a NPC will slow down while fleeing. Decrease multiplier to slow NPC down quicker. +RULE_BOOL(Combat, FleeGray, true) // If true FleeGrayHPRatio will be used. +RULE_INT(Combat, FleeGrayHPRatio, 50) //HP % when a Gray NPC begins to flee. RULE_INT(Combat, FleeHPRatio, 25) //HP % when a NPC begins to flee. RULE_BOOL(Combat, FleeIfNotAlone, false) // If false, mobs won't flee if other mobs are in combat with it. RULE_BOOL(Combat, AdjustProcPerMinute, true) diff --git a/zone/aggro.cpp b/zone/aggro.cpp index 91d14498f..f8162322e 100644 --- a/zone/aggro.cpp +++ b/zone/aggro.cpp @@ -424,7 +424,7 @@ Mob* EntityList::AICheckNPCtoNPCAggro(Mob* sender, float iAggroRange, float iAss return nullptr; } -int EntityList::GetHatedCount(Mob *attacker, Mob *exclude) +int EntityList::GetHatedCount(Mob *attacker, Mob *exclude, bool inc_gray_con) { // Return a list of how many non-feared, non-mezzed, non-green mobs, within aggro range, hate *attacker if (!attacker) @@ -434,20 +434,25 @@ int EntityList::GetHatedCount(Mob *attacker, Mob *exclude) for (auto it = npc_list.begin(); it != npc_list.end(); ++it) { NPC *mob = it->second; - if (!mob || (mob == exclude)) + if (!mob || (mob == exclude)) { continue; + } - if (!mob->IsEngaged()) + if (!mob->IsEngaged()) { continue; + } - if (mob->IsFeared() || mob->IsMezzed()) + if (mob->IsFeared() || mob->IsMezzed()) { continue; + } - if (attacker->GetLevelCon(mob->GetLevel()) == CON_GRAY) + if (!inc_gray_con && attacker->GetLevelCon(mob->GetLevel()) == CON_GRAY) { continue; + } - if (!mob->CheckAggro(attacker)) + if (!mob->CheckAggro(attacker)) { continue; + } float AggroRange = mob->GetAggroRange(); @@ -455,14 +460,12 @@ int EntityList::GetHatedCount(Mob *attacker, Mob *exclude) AggroRange *= AggroRange; - if (DistanceSquared(mob->GetPosition(), attacker->GetPosition()) > AggroRange) + if (DistanceSquared(mob->GetPosition(), attacker->GetPosition()) > AggroRange) { continue; - + } Count++; } - return Count; - } void EntityList::AIYellForHelp(Mob* sender, Mob* attacker) { diff --git a/zone/entity.h b/zone/entity.h index f296a8cb4..f32532392 100644 --- a/zone/entity.h +++ b/zone/entity.h @@ -416,7 +416,7 @@ public: void CheckClientAggro(Client *around); Mob* AICheckNPCtoNPCAggro(Mob* sender, float iAggroRange, float iAssistRange); - int GetHatedCount(Mob *attacker, Mob *exclude); + int GetHatedCount(Mob *attacker, Mob *exclude, bool inc_gray_con); void AIYellForHelp(Mob* sender, Mob* attacker); bool AICheckCloseBeneficialSpells(NPC* caster, uint8 iChance, float iRange, uint32 iSpellTypes); bool Merc_AICheckCloseBeneficialSpells(Merc* caster, uint8 iChance, float iRange, uint32 iSpellTypes); diff --git a/zone/fearpath.cpp b/zone/fearpath.cpp index 0593cbee2..722e1e417 100644 --- a/zone/fearpath.cpp +++ b/zone/fearpath.cpp @@ -31,87 +31,117 @@ extern Zone* zone; //this is called whenever we are damaged to process possible fleeing void Mob::CheckFlee() { - //if were allready fleeing, dont need to check more... - if(flee_mode && currently_fleeing) + + // if mob is dead why would you run? + if(GetHP() == 0) { return; + } + + // if were already fleeing, don't need to check more... + if(flee_mode && currently_fleeing) { + return; + } //dont bother if we are immune to fleeing - if(GetSpecialAbility(IMMUNE_FLEEING) || spellbonuses.ImmuneToFlee) + if(GetSpecialAbility(IMMUNE_FLEEING) || spellbonuses.ImmuneToFlee) { return; + } - if(!flee_timer.Check()) - return; //only do all this stuff every little while, since - //its not essential that we start running RIGHT away - - //see if were possibly hurt enough - float ratio = GetHPRatio(); - float fleeratio = GetSpecialAbility(FLEE_PERCENT); - fleeratio = fleeratio > 0 ? fleeratio : RuleI(Combat, FleeHPRatio); - - if(ratio >= fleeratio) + // Check if Flee Timer is cleared + if(!flee_timer.Check()) { return; + } - //we might be hurt enough, check con now.. + int hpratio = GetIntHPRatio(); + int fleeratio = GetSpecialAbility(FLEE_PERCENT); // if a special flee_percent exists Mob *hate_top = GetHateTop(); + + // Sanity Check for race conditions + if(hate_top == nullptr) { + return; + } + + // If no special flee_percent check for Gray or Other con rates + if(GetLevelCon(hate_top->GetLevel(), GetLevel()) == CON_GRAY && fleeratio == 0 && RuleB(Combat, FleeGray)) { + fleeratio = RuleI(Combat, FleeGrayHPRatio); + } else if(fleeratio == 0) { + fleeratio = RuleI(Combat, FleeHPRatio ); + } + + // Mob does not have low enough health to flee + if(hpratio >= fleeratio) { + return; + } + + // Sanity Check this should never happen... if(!hate_top) { - //this should never happen... StartFleeing(); return; } - float other_ratio = hate_top->GetHPRatio(); + int other_ratio = hate_top->GetIntHPRatio(); + // If the Client is nearing death the NPC will not flee and instead try to kill the client. if(other_ratio < 20) { - //our hate top is almost dead too... stay and fight return; } - //base our flee ratio on our con. this is how the - //attacker sees the mob, since this is all we can observe + // Flee Chance checking based on con. uint32 con = GetLevelCon(hate_top->GetLevel(), GetLevel()); - float run_ratio; + int flee_chance; switch(con) { //these values are not 100% researched case CON_GRAY: - run_ratio = fleeratio; + flee_chance = 100; break; case CON_GREEN: - run_ratio = fleeratio * 9 / 10; + flee_chance = 90; break; case CON_LIGHTBLUE: - run_ratio = fleeratio * 9 / 10; + flee_chance = 90; break; case CON_BLUE: - run_ratio = fleeratio * 8 / 10; + flee_chance = 80; break; default: - run_ratio = fleeratio * 7 / 10; + flee_chance = 70; break; } - if(ratio < run_ratio) - { - if (RuleB(Combat, FleeIfNotAlone) || - GetSpecialAbility(ALWAYS_FLEE) || - (!RuleB(Combat, FleeIfNotAlone) && (entity_list.GetHatedCount(hate_top, this) == 0))) - StartFleeing(); + + // If we got here we are allowed to roll on flee chance if there is not other hated NPC's in the area. + + if(RuleB(Combat, FleeIfNotAlone) || GetSpecialAbility(ALWAYS_FLEE) || zone->random.Roll(flee_chance) && entity_list.GetHatedCount(hate_top, this, true) == 0) { + currently_fleeing = true; + StartFleeing(); } } + void Mob::ProcessFlee() { //Stop fleeing if effect is applied after they start to run. //When ImmuneToFlee effect fades it will turn fear back on and check if it can still flee. if (flee_mode && (GetSpecialAbility(IMMUNE_FLEEING) || spellbonuses.ImmuneToFlee) && - !spellbonuses.IsFeared && !spellbonuses.IsBlind) { + !spellbonuses.IsFeared && !spellbonuses.IsBlind) { currently_fleeing = false; return; } - //see if we are still dying, if so, do nothing - float fleeratio = GetSpecialAbility(FLEE_PERCENT); - fleeratio = fleeratio > 0 ? fleeratio : RuleI(Combat, FleeHPRatio); - if (GetHPRatio() < fleeratio) + int hpratio = GetIntHPRatio(); + int fleeratio = GetSpecialAbility(FLEE_PERCENT); // if a special flee_percent exists + Mob *hate_top = GetHateTop(); + + // If no special flee_percent check for Gray or Other con rates + if(GetLevelCon(hate_top->GetLevel(), GetLevel()) == CON_GRAY && fleeratio == 0 && RuleB(Combat, FleeGray)) { + fleeratio = RuleI(Combat, FleeGrayHPRatio); + } else if(fleeratio == 0) { + fleeratio = RuleI(Combat, FleeHPRatio ); + } + + // Mob is still too low. Keep Running + if(hpratio < fleeratio) { return; + } //we are not dying anymore... see what we do next diff --git a/zone/merc.cpp b/zone/merc.cpp index a32fab994..c635b43ea 100644 --- a/zone/merc.cpp +++ b/zone/merc.cpp @@ -1414,7 +1414,7 @@ void Merc::AI_Process() { if(DivineAura()) return; - int hateCount = entity_list.GetHatedCount(this, nullptr); + int hateCount = entity_list.GetHatedCount(this, nullptr, false); if(GetHatedCount() < hateCount) { SetHatedCount(hateCount); From 1bba629514d6398fcd025f78ac5edbd2764dbedc Mon Sep 17 00:00:00 2001 From: Trust Date: Sun, 22 Jul 2018 18:35:50 -0400 Subject: [PATCH 329/670] Prevent Low Level Charm testing without Aggro --- zone/spells.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/zone/spells.cpp b/zone/spells.cpp index a0b149a8d..60591b7b1 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -4339,6 +4339,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster) { Log(Logs::Detail, Logs::Spells, "Our level (%d) is higher than the limit of this Charm spell (%d)", GetLevel(), spells[spell_id].max[effect_index]); caster->Message_StringID(MT_Shout, CANNOT_CHARM_YET); + AddToHateList(caster, 1,0,true,false,false,spell_id); return true; } } From 8089d52df67f3341a3357134acd931ade18f341b Mon Sep 17 00:00:00 2001 From: Uleat Date: Wed, 25 Jul 2018 16:22:22 -0400 Subject: [PATCH 330/670] Fix for 'is_arrow' bool parameter --- zone/client.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/zone/client.cpp b/zone/client.cpp index 6acd203f4..129293970 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -2683,7 +2683,7 @@ void Client::LogMerchant(Client* player, Mob* merchant, uint32 quantity, uint32 } void Client::Disarm(Client* disarmer, int chance) { - int16 slot = -1; + int16 slot = EQEmu::invslot::SLOT_INVALID; const EQEmu::ItemInstance *inst = this->GetInv().GetItem(EQEmu::invslot::slotPrimary); if (inst && inst->IsWeapon()) { slot = EQEmu::invslot::slotPrimary; @@ -2693,13 +2693,13 @@ void Client::Disarm(Client* disarmer, int chance) { if (inst && inst->IsWeapon()) slot = EQEmu::invslot::slotSecondary; } - if (slot != -1 && inst->IsClassCommon()) { + if (slot != EQEmu::invslot::SLOT_INVALID && inst->IsClassCommon()) { // We have an item that can be disarmed. if (zone->random.Int(0, 1000) <= chance) { // Find a free inventory slot - int16 slot_id = -1; - slot_id = m_inv.FindFreeSlot(false, true, inst->GetItem()->Size, inst->GetItem()->ItemType); - if (slot_id != -1) + int16 slot_id = EQEmu::invslot::SLOT_INVALID; + slot_id = m_inv.FindFreeSlot(false, true, inst->GetItem()->Size, (inst->GetItem()->ItemType == EQEmu::item::ItemTypeArrow)); + if (slot_id != EQEmu::invslot::SLOT_INVALID) { EQEmu::ItemInstance *InvItem = m_inv.PopItem(slot); if (InvItem) { // there should be no way it is not there, but check anyway @@ -2714,8 +2714,8 @@ void Client::Disarm(Client* disarmer, int chance) { FastQueuePacket(&outapp); // this deletes item from the weapon slot on the client if (PutItemInInventory(slot_id, *InvItem, true)) database.SaveInventory(this->CharacterID(), NULL, slot); - int matslot = slot == EQEmu::invslot::slotPrimary ? EQEmu::textures::weaponPrimary : EQEmu::textures::weaponSecondary; - if (matslot != -1) + auto matslot = (slot == EQEmu::invslot::slotPrimary ? EQEmu::textures::weaponPrimary : EQEmu::textures::weaponSecondary); + if (matslot != EQEmu::textures::materialInvalid) SendWearChange(matslot); } Message_StringID(MT_Skills, DISARMED); From 060f8aadfec0b23b26dd784f6e6ac87c2ba5a2ec Mon Sep 17 00:00:00 2001 From: Uleat Date: Tue, 31 Jul 2018 07:14:01 -0400 Subject: [PATCH 331/670] Fix for NavMesh crash --- libs/recast/detour/src/DetourNavMeshQuery.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/recast/detour/src/DetourNavMeshQuery.cpp b/libs/recast/detour/src/DetourNavMeshQuery.cpp index d27a142d0..aa06b006a 100644 --- a/libs/recast/detour/src/DetourNavMeshQuery.cpp +++ b/libs/recast/detour/src/DetourNavMeshQuery.cpp @@ -1096,7 +1096,7 @@ dtStatus dtNavMeshQuery::findPath(dtPolyRef startRef, dtPolyRef endRef, // The API input has been cheked already, skip checking internal data. const dtMeshTile* neighbourTile = 0; const dtPoly* neighbourPoly = 0; - if (m_nav->getTileAndPolyByRef(neighbourRef, &neighbourTile, &neighbourPoly) == DT_FAILURE) { + if (dtStatusFailed(m_nav->getTileAndPolyByRef(neighbourRef, &neighbourTile, &neighbourPoly))) { continue; } From 93749bc509bb38539389aa09d2a85f1cba8ae5a9 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 1 Aug 2018 13:50:09 -0400 Subject: [PATCH 332/670] Add actual support for multi-zone task activities --- zone/tasks.cpp | 28 +++++++++++++++------------- zone/tasks.h | 9 ++++++++- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 5a3ba7914..56297bf3b 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -249,7 +249,9 @@ bool TaskManager::LoadTasks(int singleTask) Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].GoalCount = atoi(row[11]); Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].DeliverToNPC = atoi(row[12]); Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].zones = row[13]; - Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].ZoneID = atoi(row[13]); // for older clients + auto zones = SplitString(Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].zones, ';'); + for (auto && e : zones) + Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].ZoneIDs.push_back(std::stoi(e)); Tasks[taskID]->Activity[Tasks[taskID]->ActivityCount].Optional = atoi(row[14]); Log(Logs::General, Logs::Tasks, @@ -1144,7 +1146,7 @@ void TaskManager::SendTaskSelector(Client *c, Mob *mob, int TaskCount, int *Task buf.WriteInt32(activity.skill_id); buf.WriteInt32(activity.spell_id); - buf.WriteInt32(activity.ZoneID); + buf.WriteInt32(activity.ZoneIDs.empty() ? 0 : activity.ZoneIDs.front()); buf.WriteString(activity.desc_override); } } @@ -1534,7 +1536,7 @@ bool ClientTaskState::UpdateTasksByNPC(Client *c, int ActivityType, int NPCTypeI if (Task->Activity[j].Type != ActivityType) continue; // Is there a zone restriction on the activity ? - if ((Task->Activity[j].ZoneID > 0) && (Task->Activity[j].ZoneID != (int)zone->GetZoneID())) { + if (!Task->Activity[j].CheckZone(zone->GetZoneID())) { Log(Logs::General, Logs::Tasks, "[UPDATE] Char: %s Task: %i, Activity %i, Activity type %i for NPC %i failed zone " "check", @@ -1594,7 +1596,7 @@ int ClientTaskState::ActiveSpeakTask(int NPCTypeID) { if (Task->Activity[j].Type != ActivitySpeakWith) continue; // Is there a zone restriction on the activity ? - if (Task->Activity[j].ZoneID > 0 && Task->Activity[j].ZoneID != (int)zone->GetZoneID()) + if (!Task->Activity[j].CheckZone(zone->GetZoneID())) continue; // Is the activity to speak with this type of NPC ? if (Task->Activity[j].GoalMethod == METHODQUEST && Task->Activity[j].GoalID == NPCTypeID) @@ -1632,7 +1634,7 @@ int ClientTaskState::ActiveSpeakActivity(int NPCTypeID, int TaskID) { if (Task->Activity[j].Type != ActivitySpeakWith) continue; // Is there a zone restriction on the activity ? - if (Task->Activity[j].ZoneID > 0 && Task->Activity[j].ZoneID != (int)zone->GetZoneID()) + if (!Task->Activity[j].CheckZone(zone->GetZoneID())) continue; // Is the activity to speak with this type of NPC ? if (Task->Activity[j].GoalMethod == METHODQUEST && Task->Activity[j].GoalID == NPCTypeID) @@ -1678,7 +1680,7 @@ void ClientTaskState::UpdateTasksForItem(Client *c, ActivityType Type, int ItemI if (Task->Activity[j].Type != (int)Type) continue; // Is there a zone restriction on the activity ? - if (Task->Activity[j].ZoneID > 0 && Task->Activity[j].ZoneID != (int)zone->GetZoneID()) { + if (!Task->Activity[j].CheckZone(zone->GetZoneID())) { Log(Logs::General, Logs::Tasks, "[UPDATE] Char: %s Activity type %i for Item %i failed zone check", c->GetName(), Type, ItemID); continue; @@ -1737,7 +1739,7 @@ void ClientTaskState::UpdateTasksOnExplore(Client *c, int ExploreID) // We are only interested in explore activities if (Task->Activity[j].Type != ActivityExplore) continue; - if (Task->Activity[j].ZoneID > 0 && Task->Activity[j].ZoneID != (int)zone->GetZoneID()) { + if (!Task->Activity[j].CheckZone(zone->GetZoneID())) { Log(Logs::General, Logs::Tasks, "[UPDATE] Char: %s Explore exploreid %i failed zone check", c->GetName(), ExploreID); @@ -1801,11 +1803,11 @@ bool ClientTaskState::UpdateTasksOnDeliver(Client *c, std::listActivity[j].Type != ActivityDeliver && Task->Activity[j].Type != ActivityGiveCash) continue; // Is there a zone restriction on the activity ? - if (Task->Activity[j].ZoneID > 0 && Task->Activity[j].ZoneID != (int)zone->GetZoneID()) { + if (!Task->Activity[j].CheckZone(zone->GetZoneID())) { Log(Logs::General, Logs::Tasks, "[UPDATE] Char: %s Deliver activity failed zone check (current zone %i, need zone " - "%i", - c->GetName(), zone->GetZoneID(), Task->Activity[j].ZoneID); + "%s", + c->GetName(), zone->GetZoneID(), Task->Activity[j].zones.c_str()); continue; } // Is the activity to deliver to this NPCTypeID ? @@ -1878,7 +1880,7 @@ void ClientTaskState::UpdateTasksOnTouch(Client *c, int ZoneID) continue; if (Task->Activity[j].GoalMethod != METHODSINGLEID) continue; - if (Task->Activity[j].ZoneID != ZoneID) { + if (!Task->Activity[j].CheckZone(ZoneID)) { Log(Logs::General, Logs::Tasks, "[UPDATE] Char: %s Touch activity failed zone check", c->GetName()); continue; @@ -2568,7 +2570,7 @@ void ClientTaskState::SendTaskHistory(Client *c, int TaskIndex) { thd2->GoalCount = Task->Activity[i].GoalCount; thd2->unknown04 = 0xffffffff; thd2->unknown08 = 0xffffffff; - thd2->ZoneID = Task->Activity[i].ZoneID; + thd2->ZoneID = Task->Activity[i].ZoneIDs.empty() ? 0 : Task->Activity[i].ZoneIDs.front(); thd2->unknown16 = 0x00000000; Ptr = (char *)thd2 + sizeof(TaskHistoryReplyData2_Struct); VARSTRUCT_ENCODE_STRING(Ptr, Task->Activity[i].desc_override.c_str()); @@ -2772,7 +2774,7 @@ void TaskManager::SendTaskActivityLong(Client *c, int TaskID, int ActivityID, in buf.WriteUInt32(Tasks[TaskID]->Activity[ActivityID].skill_id); buf.WriteUInt32(Tasks[TaskID]->Activity[ActivityID].spell_id); - buf.WriteUInt32(Tasks[TaskID]->Activity[ActivityID].ZoneID); + buf.WriteUInt32(Tasks[TaskID]->Activity[ActivityID].ZoneIDs.empty() ? 0 : Tasks[TaskID]->Activity[ActivityID].ZoneIDs.front()); buf.WriteUInt32(0); buf.WriteString(Tasks[TaskID]->Activity[ActivityID].desc_override); diff --git a/zone/tasks.h b/zone/tasks.h index 1505a50a1..0bc45c146 100644 --- a/zone/tasks.h +++ b/zone/tasks.h @@ -25,6 +25,7 @@ Copyright (C) 2001-2004 EQEMu Development Team (http://eqemulator.net) #include #include #include +#include #define MAXTASKS 10000 #define MAXTASKSETS 1000 @@ -113,9 +114,15 @@ struct ActivityInformation { TaskMethodType GoalMethod; int GoalCount; int DeliverToNPC; - int ZoneID; + std::vector ZoneIDs; std::string zones; // IDs ; searated, ZoneID is the first in this list for older clients -- default empty string bool Optional; + + inline bool CheckZone(int zone_id) { + if (ZoneIDs.empty()) + return true; + return std::find(ZoneIDs.begin(), ZoneIDs.end(), zone_id) != ZoneIDs.end(); + } }; typedef enum { ActivitiesSequential = 0, ActivitiesStepped = 1 } SequenceType; From 8b2ec7560a0f72d9e79d22ebee8b855e41565773 Mon Sep 17 00:00:00 2001 From: Trust Date: Sat, 4 Aug 2018 15:26:21 -0400 Subject: [PATCH 333/670] editorconfig --- .editorconfig | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..03f782494 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,23 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true + +# Matches multiple files with brace expansion notation +# Set default charset +[*.{js,py}] +charset = utf-8 + +[*.cpp] +indent_style = tab +[*.h] +indent_style = tab + +# Tab indentation (no size specified) +[Makefile] +indent_style = tab \ No newline at end of file From bf5c5b803eb7593b9ba236d973791befa7df5d6a Mon Sep 17 00:00:00 2001 From: Xackery Date: Sun, 5 Aug 2018 17:12:46 -0700 Subject: [PATCH 334/670] Adjusted zlib cmake to honor policy CMP0074 warning --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 817af542c..360d16a0e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,7 +54,8 @@ ENDIF(MSVC OR MINGW) IF(MSVC) IF(CMAKE_CL_64) - SET(ZLIB_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/zlib_x64") + SET(ZLIB_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/zlib_x64/include") + SET(ZLIB_LIBRARY "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/zlib_x64/lib/zlib.lib") SET(MYSQL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/mysql_x64") SET(LUA_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/luaj_x64") SET(OPENSSL_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/openssl_x64") @@ -67,7 +68,8 @@ IF(MSVC) SET(SODIUM_LIBRARY_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/x64/Release/v110/dynamic") ENDIF() ELSE(CMAKE_CL_64) - SET(ZLIB_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/zlib_x86") + SET(ZLIB_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/zlib_x86/include") + SET(ZLIB_LIBRARY "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/zlib_x86/lib/zlib.lib") SET(MYSQL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/mysql_x86") SET(LUA_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/luaj_x86") SET(SODIUM_INCLUDE_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/include") From e3c01d414315f7b31699e3d0b6a52a30f69ee636 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 5 Aug 2018 22:55:30 -0400 Subject: [PATCH 335/670] Add lua entity_list function GetShuffledClientList() There is cases where we need to get a random client, but GetRandomClient() is not sufficient enough due to complex predicates required on what tells us is a valid client. This way we can just loop over a shuffled list and verify a client is valid instead of multiple GetRandomClient() calls. --- zone/lua_entity_list.cpp | 17 +++++++++++++++++ zone/lua_entity_list.h | 1 + 2 files changed, 18 insertions(+) diff --git a/zone/lua_entity_list.cpp b/zone/lua_entity_list.cpp index ef4057ed1..e6a572eca 100644 --- a/zone/lua_entity_list.cpp +++ b/zone/lua_entity_list.cpp @@ -340,6 +340,22 @@ Lua_Client_List Lua_EntityList::GetClientList() { return ret; } +Lua_Client_List Lua_EntityList::GetShuffledClientList() { + Lua_Safe_Call_Class(Lua_Client_List); + Lua_Client_List ret; + auto &t_list = self->GetClientList(); + + auto iter = t_list.begin(); + while(iter != t_list.end()) { + ret.entries.push_back(Lua_Client(iter->second)); + ++iter; + } + + zone->random.Shuffle(ret.entries.begin(), ret.entries.end()); + + return ret; +} + Lua_NPC_List Lua_EntityList::GetNPCList() { Lua_Safe_Call_Class(Lua_NPC_List); Lua_NPC_List ret; @@ -480,6 +496,7 @@ luabind::scope lua_register_entity_list() { .def("GetRandomClient", (Lua_Client(Lua_EntityList::*)(float, float, float, float, Lua_Client))&Lua_EntityList::GetRandomClient) .def("GetMobList", (Lua_Mob_List(Lua_EntityList::*)(void))&Lua_EntityList::GetMobList) .def("GetClientList", (Lua_Client_List(Lua_EntityList::*)(void))&Lua_EntityList::GetClientList) + .def("GetShuffledClientList", (Lua_Client_List(Lua_EntityList::*)(void))&Lua_EntityList::GetShuffledClientList) .def("GetNPCList", (Lua_NPC_List(Lua_EntityList::*)(void))&Lua_EntityList::GetNPCList) .def("GetCorpseList", (Lua_Corpse_List(Lua_EntityList::*)(void))&Lua_EntityList::GetCorpseList) .def("GetObjectList", (Lua_Object_List(Lua_EntityList::*)(void))&Lua_EntityList::GetObjectList) diff --git a/zone/lua_entity_list.h b/zone/lua_entity_list.h index 17b00579e..6db846220 100644 --- a/zone/lua_entity_list.h +++ b/zone/lua_entity_list.h @@ -101,6 +101,7 @@ public: Lua_Client GetRandomClient(float x, float y, float z, float dist, Lua_Client exclude); Lua_Mob_List GetMobList(); Lua_Client_List GetClientList(); + Lua_Client_List GetShuffledClientList(); Lua_NPC_List GetNPCList(); Lua_Corpse_List GetCorpseList(); Lua_Object_List GetObjectList(); From 053c35c59b1ee1f77a186aca62a25105d560eab7 Mon Sep 17 00:00:00 2001 From: Uleat Date: Fri, 10 Aug 2018 21:39:56 -0400 Subject: [PATCH 336/670] Added optional rules for bot class/race/gender values - run the optional script '2018_08_10_bots_allowed_criteria_rules.sql' if you want to change db values --- common/ruletypes.h | 3 + ...2018_08_10_bots_allowed_criteria_rules.sql | 4 + zone/bot_command.cpp | 90 +++++++++++++++++-- 3 files changed, 89 insertions(+), 8 deletions(-) create mode 100644 utils/sql/git/bots/optional/2018_08_10_bots_allowed_criteria_rules.sql diff --git a/common/ruletypes.h b/common/ruletypes.h index c89213368..71af49010 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -602,6 +602,9 @@ RULE_BOOL(Bots, BotLevelsWithOwner, false) // Auto-updates spawned bots as owner RULE_BOOL(Bots, BotCharacterLevelEnabled, false) // Enables required level to spawn bots RULE_INT(Bots, BotCharacterLevel, 0) // 0 as default (if level > this value you can spawn bots if BotCharacterLevelEnabled is true) RULE_INT(Bots, CasterStopMeleeLevel, 13) // Level at which caster bots stop melee attacks +RULE_INT(Bots, AllowedClasses, 0xFFFFFFFF) // Bitmask of allowed bot classes +RULE_INT(Bots, AllowedRaces, 0xFFFFFFFF) // Bitmask of allowed bot races +RULE_INT(Bots, AllowedGenders, 0x3) // Bitmask of allowed bot genders RULE_CATEGORY_END() #endif diff --git a/utils/sql/git/bots/optional/2018_08_10_bots_allowed_criteria_rules.sql b/utils/sql/git/bots/optional/2018_08_10_bots_allowed_criteria_rules.sql new file mode 100644 index 000000000..498f455df --- /dev/null +++ b/utils/sql/git/bots/optional/2018_08_10_bots_allowed_criteria_rules.sql @@ -0,0 +1,4 @@ +INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES +(1, 'Bots:AllowedClasses', '-1', 'Bitmask of allowed bot classes'), +(1, 'Bots:AllowedRaces', '-1', 'Bitmask of allowed bot races'), +(1, 'Bots:AllowedGenders', '3', 'Bitmask of allowed bot genders'); diff --git a/zone/bot_command.cpp b/zone/bot_command.cpp index 3344fd0fb..cc24609ec 100644 --- a/zone/bot_command.cpp +++ b/zone/bot_command.cpp @@ -4243,12 +4243,69 @@ void bot_subcommand_bot_clone(Client *c, const Seperator *sep) void bot_subcommand_bot_create(Client *c, const Seperator *sep) { - const std::string msg_class = StringFormat("class: %u(WAR), %u(CLR), %u(PAL), %u(RNG), %u(SHD), %u(DRU), %u(MNK), %u(BRD), %u(ROG), %u(SHM), %u(NEC), %u(WIZ), %u(MAG), %u(ENC), %u(BST), %u(BER)", - WARRIOR, CLERIC, PALADIN, RANGER, SHADOWKNIGHT, DRUID, MONK, BARD, ROGUE, SHAMAN, NECROMANCER, WIZARD, MAGICIAN, ENCHANTER, BEASTLORD, BERSERKER); - const std::string msg_race = StringFormat("race: %u(HUM), %u(BAR), %u(ERU), %u(ELF), %u(HIE), %u(DEF), %u(HEF), %u(DWF), %u(TRL), %u(OGR), %u(HFL), %u(GNM), %u(IKS), %u(VAH), %u(FRG), %u(DRK)", - HUMAN, BARBARIAN, ERUDITE, WOOD_ELF, HIGH_ELF, DARK_ELF, HALF_ELF, DWARF, TROLL, OGRE, HALFLING, GNOME, IKSAR, VAHSHIR, FROGLOK, DRAKKIN); - const std::string msg_gender = StringFormat("gender: %u(M), %u(F)", MALE, FEMALE); - + const std::string class_substrs[17] = { "", + "%u(WAR)", "%u(CLR)", "%u(PAL)", "%u(RNG)", + "%u(SHD)", "%u(DRU)", "%u(MNK)", "%u(BRD)", + "%u(ROG)", "%u(SHM)", "%u(NEC)", "%u(WIZ)", + "%u(MAG)", "%u(ENC)", "%u(BST)", "%u(BER)" + }; + + const std::string race_substrs[17] = { "", + "%u(HUM)", "%u(BAR)", "%u(ERU)", "%u(ELF)", + "%u(HIE)", "%u(DEF)", "%u(HEF)", "%u(DWF)", + "%u(TRL)", "%u(OGR)", "%u(HFL)", "%u(GNM)", + "%u(IKS)", "%u(VAH)", "%u(FRG)", "%u(DRK)" + }; + + const uint16 race_values[17] = { 0, + HUMAN, BARBARIAN, ERUDITE, WOOD_ELF, + HIGH_ELF, DARK_ELF, HALF_ELF, DWARF, + TROLL, OGRE, HALFLING, GNOME, + IKSAR, VAHSHIR, FROGLOK, DRAKKIN + }; + + const std::string gender_substrs[2] = { + "%u(M)", "%u(F)", + }; + + std::string msg_class = "class:"; + std::string msg_race = "race:"; + std::string msg_gender = "gender:"; + std::string msg_separator; + + msg_separator = " "; + for (int i = 0; i <= 15; ++i) { + if (((1 << i) & RuleI(Bots, AllowedClasses)) == 0) + continue; + + msg_class.append(const_cast(msg_separator)); + msg_class.append(StringFormat(class_substrs[i + 1].c_str(), (i + 1))); + + msg_separator = ", "; + } + + msg_separator = " "; + for (int i = 0; i <= 15; ++i) { + if (((1 << i) & RuleI(Bots, AllowedRaces)) == 0) + continue; + + msg_race.append(const_cast(msg_separator)); + msg_race.append(StringFormat(race_substrs[i + 1].c_str(), race_values[i + 1])); + + msg_separator = ", "; + } + + msg_separator = " "; + for (int i = 0; i <= 1; ++i) { + if (((1 << i) & RuleI(Bots, AllowedGenders)) == 0) + continue; + + msg_gender.append(const_cast(msg_separator)); + msg_gender.append(StringFormat(gender_substrs[i].c_str(), i)); + + msg_separator = ", "; + } + if (helper_command_alias_fail(c, "bot_subcommand_bot_create", sep->arg[0], "botcreate")) return; if (helper_is_help_or_usage(sep->arg[1])) { @@ -7588,14 +7645,31 @@ uint32 helper_bot_create(Client *bot_owner, std::string bot_name, uint8 bot_clas return bot_id; } + auto class_bit = GetPlayerClassBit(bot_class); + if ((class_bit & RuleI(Bots, AllowedClasses)) == PLAYER_CLASS_UNKNOWN_BIT) { + bot_owner->Message(m_fail, "Class '%s' bots are not allowed on this server", GetPlayerClassName(bot_class)); + return bot_id; + } + + auto race_bit = GetPlayerRaceBit(bot_race); + if ((race_bit & RuleI(Bots, AllowedRaces)) == PLAYER_RACE_UNKNOWN_BIT) { + bot_owner->Message(m_fail, "Race '%s' bots are not allowed on this server", GetPlayerRaceName(bot_class)); + return bot_id; + } + if (!Bot::IsValidRaceClassCombo(bot_race, bot_class)) { bot_owner->Message(m_fail, "'%s'(%u):'%s'(%u) is an invalid race-class combination", Bot::RaceIdToString(bot_race).c_str(), bot_race, Bot::ClassIdToString(bot_class).c_str(), bot_class); return bot_id; } - if (bot_gender > FEMALE) { - bot_owner->Message(m_fail, "gender: %u(M), %u(F)", MALE, FEMALE); + if (bot_gender > FEMALE || (((1 << bot_gender) & RuleI(Bots, AllowedGenders)) == 0)) { + if (RuleI(Bots, AllowedGenders) == 3) + bot_owner->Message(m_fail, "gender: %u(M), %u(F)", MALE, FEMALE); + else if (RuleI(Bots, AllowedGenders) == 2) + bot_owner->Message(m_fail, "gender: %u(F)", FEMALE); + else if (RuleI(Bots, AllowedGenders) == 1) + bot_owner->Message(m_fail, "gender: %u(M)", MALE); return bot_id; } From ddd3e43d4ead337f8eae5d93e4083c05222f4652 Mon Sep 17 00:00:00 2001 From: Uleat Date: Fri, 10 Aug 2018 22:02:19 -0400 Subject: [PATCH 337/670] Added 'no valid genders' conditional to bot create validation [ci skip] --- zone/bot_command.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zone/bot_command.cpp b/zone/bot_command.cpp index cc24609ec..5bdb0918a 100644 --- a/zone/bot_command.cpp +++ b/zone/bot_command.cpp @@ -7670,6 +7670,8 @@ uint32 helper_bot_create(Client *bot_owner, std::string bot_name, uint8 bot_clas bot_owner->Message(m_fail, "gender: %u(F)", FEMALE); else if (RuleI(Bots, AllowedGenders) == 1) bot_owner->Message(m_fail, "gender: %u(M)", MALE); + else + bot_owner->Message(m_fail, "gender: ERROR - No valid genders exist"); return bot_id; } From 1e0ec048af3171c63be54a107ae43114e1bfa9be Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sat, 11 Aug 2018 00:12:09 -0500 Subject: [PATCH 338/670] HP update adjustment that should cover a scenario when mob is feared --- zone/merc.cpp | 2 +- zone/npc.cpp | 12 ++++++------ zone/npc.h | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/zone/merc.cpp b/zone/merc.cpp index a32fab994..82d66878a 100644 --- a/zone/merc.cpp +++ b/zone/merc.cpp @@ -1303,7 +1303,7 @@ bool Merc::Process() _check_confidence = true; } - if (sendhpupdate_timer.Check()) { + if (send_hp_update_timer.Check()) { SendHPUpdate(); } diff --git a/zone/npc.cpp b/zone/npc.cpp index 3ada452d1..7cf31b617 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -116,7 +116,7 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, const glm::vec4& position, int if knightattack_timer(1000), assist_timer(AIassistcheck_delay), qglobal_purge_timer(30000), - sendhpupdate_timer(2000), + send_hp_update_timer(2000), enraged_timer(1000), taunt_timer(TauntReuseTime * 1000), m_SpawnPoint(position), @@ -745,11 +745,11 @@ bool NPC::Process() } } - // we might actually want to reset in this check ... won't until issues arise at least :P - if (sendhpupdate_timer.Check(false) && (IsTargeted() || (IsPet() && GetOwner() && GetOwner()->IsClient()))) { - if(!IsFullHP || cur_hpIsEngaged()) { + SendHPUpdate(); } if(HasVirus()) { diff --git a/zone/npc.h b/zone/npc.h index cba67c698..471b47557 100644 --- a/zone/npc.h +++ b/zone/npc.h @@ -423,7 +423,7 @@ public: void SetHeroForgeModel(uint32 model) { herosforgemodel = model; } bool IsRaidTarget() const { return raid_target; }; - void ResetHPUpdateTimer() { sendhpupdate_timer.Start(); } + void ResetHPUpdateTimer() { send_hp_update_timer.Start(); } bool IgnoreDespawn() { return ignore_despawn; } @@ -456,7 +456,7 @@ protected: Timer qglobal_purge_timer; bool combat_event; //true if we are in combat, false otherwise - Timer sendhpupdate_timer; + Timer send_hp_update_timer; Timer enraged_timer; Timer *reface_timer; From 4b7126a2cd7d5eb9e7dd79beaa611645cc4e635c Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sat, 11 Aug 2018 00:41:51 -0500 Subject: [PATCH 339/670] Bots fix --- zone/bot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/bot.cpp b/zone/bot.cpp index 6d39a7df9..4c982d7ac 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -1846,7 +1846,7 @@ bool Bot::Process() { SetEndurance(GetEndurance() + CalcEnduranceRegen() + RestRegenEndurance); } - if (sendhpupdate_timer.Check(false)) { + if (send_hp_update_timer.Check(false)) { SendHPUpdate(); if(HasPet()) GetPet()->SendHPUpdate(); From e582a8d17abcfb1d7f7024f6c4d0c7a49fc45559 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Sun, 12 Aug 2018 15:35:38 -0400 Subject: [PATCH 340/670] Change spell logic to use min_hp from spell list. --- zone/mob_ai.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 18fc5d441..1e8aeb2b4 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -197,7 +197,10 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes, bool bInnates } case SpellType_Escape: { - if (GetHPRatio() <= 5 ) + // If min_hp !=0 then the spell list has specified + // custom range and we're inside that range if we + // made it here. The hard coded <=5 is for unspecified. + if (AIspells[i].min_hp != 0 || GetHPRatio() <= 5) { AIDoSpellCast(i, tar, mana_cost); return true; From 509a2b30a5e5bfd8fd4bef14cf1ad45ee68e999c Mon Sep 17 00:00:00 2001 From: Uleat Date: Mon, 13 Aug 2018 22:32:36 -0400 Subject: [PATCH 341/670] Inventory possessions beta testing --- changelog.txt | 21 + common/emu_constants.h | 30 +- common/inventory_profile.cpp | 231 +++++- common/inventory_slot.cpp | 24 +- common/item_instance.cpp | 23 +- common/patches/rof.cpp | 698 ++++++++++------- common/patches/rof2.cpp | 720 +++++++++++------- common/patches/sod.cpp | 237 ++++-- common/patches/sof.cpp | 235 ++++-- common/patches/titanium.cpp | 256 +++++-- common/patches/uf.cpp | 239 ++++-- common/shareddb.cpp | 55 +- common/shareddb.h | 2 +- common/version.h | 4 +- utils/sql/data_tables.txt | 1 + utils/sql/db_update_manifest.txt | 2 + .../sql/git/bots/bots_db_update_manifest.txt | 1 + .../2018_08_13_bots_inventory_update.sql | 5 + .../required/2018_08_13_inventory_update.sql | 45 ++ .../2018_08_13_inventory_version_update.sql | 1 + world/client.cpp | 3 +- world/worlddb.cpp | 143 +++- world/worlddb.h | 2 + zone/bonuses.cpp | 28 +- zone/bot.cpp | 68 +- zone/bot.h | 50 +- zone/bot_command.cpp | 20 +- zone/bot_database.cpp | 16 +- zone/client.cpp | 69 +- zone/client_packet.cpp | 15 +- zone/client_process.cpp | 13 - zone/command.cpp | 48 +- zone/common.h | 11 + zone/corpse.cpp | 403 +++++----- zone/corpse.h | 3 +- zone/embparser.cpp | 4 +- zone/embparser_api.cpp | 80 ++ zone/inventory.cpp | 395 +++++++--- zone/loottables.cpp | 2 +- zone/lua_general.cpp | 50 +- zone/merc.cpp | 16 +- zone/perl_client.cpp | 4 +- zone/pets.cpp | 2 +- zone/spells.cpp | 2 +- zone/trading.cpp | 8 +- 45 files changed, 2842 insertions(+), 1443 deletions(-) create mode 100644 utils/sql/git/bots/required/2018_08_13_bots_inventory_update.sql create mode 100644 utils/sql/git/required/2018_08_13_inventory_update.sql create mode 100644 utils/sql/git/required/2018_08_13_inventory_version_update.sql diff --git a/changelog.txt b/changelog.txt index 7ba6c61c9..d98bb965f 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,26 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 08/13/2018 == +Uleat: Activation of RoF+ clients' two additional general slots and integration of SoF+ clients' PowerSource slot + - Inventory 'Possessions' main slots are now contiguous and implemented to RoF2 standards + -- 'slotGeneral9'(31) and 'slotGeneral10'(32) are now active + -- Possessions slot enumerations are now defined as between 'slotCharm'(0) and 'slotCursor'(33) + -- 'slotPowerSource'(21) is no longer a special case slot(9999) + - Special code has been added to exclude 'slotPowerSource,' 'slotGeneral9' and 'slotGeneral10' from server + actions in clients that do not support them. + - The lua api has been updated to use the new slot enumeration as well as having some slot range definitions added + - The perl api now has a look-up function to provide token-to-value translations .. definitions are similar to lua + - In both lua and perl, it is HIGHLY recommended that any custom scripts using hard-coded inventory slot values be + updated to use the constants/lookup methods as any old values are no longer guaranteed to be accurate + - Database will have existing inventory slot values modified to the new standard and table `items` entries will + also be updated to the 'correct' equipable slot bitmask + - Script (quest) updates are required with this change + +Note: The proper way to reference inventory slots is to use either instrinsic lookups (c/c++ & perl) or to use valid + const ref declarations (c/c++ & lua). Any other method is not guaranteed to be accurate and may result in item loss + and/or unexpected/undefined behavior. + + == 07/10/2018 == Akkadius: Adjusted DataBuckets to use other acceptable time formats Example: quest::set_data('key', 'value', '1d'); diff --git a/common/emu_constants.h b/common/emu_constants.h index fcddeac09..f2c0428e8 100644 --- a/common/emu_constants.h +++ b/common/emu_constants.h @@ -78,28 +78,26 @@ namespace EQEmu } // namespace invtype namespace invslot { - using namespace Titanium::invslot::enum_; - - const int16 SLOT_POWER_SOURCE = 9999; + using namespace RoF2::invslot::enum_; using RoF2::invslot::SLOT_INVALID; using RoF2::invslot::SLOT_BEGIN; - using Titanium::invslot::POSSESSIONS_BEGIN; - using Titanium::invslot::POSSESSIONS_END; - using SoF::invslot::POSSESSIONS_COUNT; + using RoF2::invslot::POSSESSIONS_BEGIN; + using RoF2::invslot::POSSESSIONS_END; + using RoF2::invslot::POSSESSIONS_COUNT; - using Titanium::invslot::EQUIPMENT_BEGIN; - using Titanium::invslot::EQUIPMENT_END; - using Titanium::invslot::EQUIPMENT_COUNT; + using RoF2::invslot::EQUIPMENT_BEGIN; + using RoF2::invslot::EQUIPMENT_END; + using RoF2::invslot::EQUIPMENT_COUNT; - using Titanium::invslot::GENERAL_BEGIN; - using Titanium::invslot::GENERAL_END; - using Titanium::invslot::GENERAL_COUNT; + using RoF2::invslot::GENERAL_BEGIN; + using RoF2::invslot::GENERAL_END; + using RoF2::invslot::GENERAL_COUNT; - using Titanium::invslot::BONUS_BEGIN; - using Titanium::invslot::BONUS_STAT_END; - using Titanium::invslot::BONUS_SKILL_END; + using RoF2::invslot::BONUS_BEGIN; + using RoF2::invslot::BONUS_STAT_END; + using RoF2::invslot::BONUS_SKILL_END; using Titanium::invslot::BANK_BEGIN; using SoF::invslot::BANK_END; @@ -145,7 +143,7 @@ namespace EQEmu const int16 GENERAL_BAGS_8_COUNT = 8 * SLOT_COUNT; const int16 GENERAL_BAGS_8_END = (GENERAL_BAGS_BEGIN + GENERAL_BAGS_8_COUNT) - 1; - const int16 CURSOR_BAG_BEGIN = 331; + const int16 CURSOR_BAG_BEGIN = 351; const int16 CURSOR_BAG_COUNT = SLOT_COUNT; const int16 CURSOR_BAG_END = (CURSOR_BAG_BEGIN + CURSOR_BAG_COUNT) - 1; diff --git a/common/inventory_profile.cpp b/common/inventory_profile.cpp index cb20cd8a8..8d9ee22f8 100644 --- a/common/inventory_profile.cpp +++ b/common/inventory_profile.cpp @@ -177,7 +177,7 @@ EQEmu::ItemInstance* EQEmu::InventoryProfile::GetItem(int16 slot_id) const result = _GetItem(m_inv, slot_id); } else if ((slot_id >= invslot::EQUIPMENT_BEGIN && slot_id <= invslot::EQUIPMENT_END) || - (slot_id >= invslot::TRIBUTE_BEGIN && slot_id <= invslot::TRIBUTE_END) || (slot_id == invslot::SLOT_POWER_SOURCE)) { + (slot_id >= invslot::TRIBUTE_BEGIN && slot_id <= invslot::TRIBUTE_END)) { // Equippable slots (on body) result = _GetItem(m_worn, slot_id); } @@ -231,6 +231,25 @@ EQEmu::ItemInstance* EQEmu::InventoryProfile::GetItem(int16 slot_id, uint8 bagid // Put an item snto specified slot int16 EQEmu::InventoryProfile::PutItem(int16 slot_id, const ItemInstance& inst) { + if (slot_id <= EQEmu::invslot::POSSESSIONS_END && slot_id >= EQEmu::invslot::POSSESSIONS_BEGIN) { + if ((((uint64)1 << slot_id) & m_lookup->PossessionsBitmask) == 0) + return EQEmu::invslot::SLOT_INVALID; + } + else if (slot_id <= EQEmu::invbag::GENERAL_BAGS_END && slot_id >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { + auto temp_slot = EQEmu::invslot::GENERAL_BEGIN + ((slot_id - EQEmu::invbag::GENERAL_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT); + if ((((uint64)1 << temp_slot) & m_lookup->PossessionsBitmask) == 0) + return EQEmu::invslot::SLOT_INVALID; + } + else if (slot_id <= EQEmu::invslot::BANK_END && slot_id >= EQEmu::invslot::BANK_BEGIN) { + if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) + return EQEmu::invslot::SLOT_INVALID; + } + else if (slot_id <= EQEmu::invbag::BANK_BAGS_END && slot_id >= EQEmu::invbag::BANK_BAGS_BEGIN) { + auto temp_slot = (slot_id - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT; + if (temp_slot >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) + return EQEmu::invslot::SLOT_INVALID; + } + // Clean up item already in slot (if exists) DeleteItem(slot_id); @@ -260,6 +279,60 @@ bool EQEmu::InventoryProfile::SwapItem(int16 slot_a, int16 slot_b, SwapItemFailS { fail_state = swapInvalid; + if (slot_a <= EQEmu::invslot::POSSESSIONS_END && slot_a >= EQEmu::invslot::POSSESSIONS_BEGIN) { + if ((((uint64)1 << slot_a) & m_lookup->PossessionsBitmask) == 0) { + fail_state = swapNotAllowed; + return false; + } + } + else if (slot_a <= EQEmu::invbag::GENERAL_BAGS_END && slot_a >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { + auto temp_slot = EQEmu::invslot::GENERAL_BEGIN + ((slot_a - EQEmu::invbag::GENERAL_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT); + if ((((uint64)1 << temp_slot) & m_lookup->PossessionsBitmask) == 0) { + fail_state = swapNotAllowed; + return false; + } + } + else if (slot_a <= EQEmu::invslot::BANK_END && slot_a >= EQEmu::invslot::BANK_BEGIN) { + if ((slot_a - EQEmu::invslot::BANK_BEGIN) >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) { + fail_state = swapNotAllowed; + return false; + } + } + else if (slot_a <= EQEmu::invbag::BANK_BAGS_END && slot_a >= EQEmu::invbag::BANK_BAGS_BEGIN) { + auto temp_slot = (slot_a - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT; + if (temp_slot >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) { + fail_state = swapNotAllowed; + return false; + } + } + + if (slot_b <= EQEmu::invslot::POSSESSIONS_END && slot_b >= EQEmu::invslot::POSSESSIONS_BEGIN) { + if ((((uint64)1 << slot_b) & m_lookup->PossessionsBitmask) == 0) { + fail_state = swapNotAllowed; + return false; + } + } + else if (slot_b <= EQEmu::invbag::GENERAL_BAGS_END && slot_b >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { + auto temp_slot = EQEmu::invslot::GENERAL_BEGIN + ((slot_b - EQEmu::invbag::GENERAL_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT); + if ((((uint64)1 << temp_slot) & m_lookup->PossessionsBitmask) == 0) { + fail_state = swapNotAllowed; + return false; + } + } + else if (slot_b <= EQEmu::invslot::BANK_END && slot_b >= EQEmu::invslot::BANK_BEGIN) { + if ((slot_b - EQEmu::invslot::BANK_BEGIN) >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) { + fail_state = swapNotAllowed; + return false; + } + } + else if (slot_b <= EQEmu::invbag::BANK_BAGS_END && slot_b >= EQEmu::invbag::BANK_BAGS_BEGIN) { + auto temp_slot = (slot_b - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT; + if (temp_slot >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) { + fail_state = swapNotAllowed; + return false; + } + } + // Temp holding areas for a and b ItemInstance* inst_a = GetItem(slot_a); ItemInstance* inst_b = GetItem(slot_b); @@ -269,7 +342,7 @@ bool EQEmu::InventoryProfile::SwapItem(int16 slot_a, int16 slot_b, SwapItemFailS fail_state = swapNotAllowed; return false; } - if ((slot_b >= invslot::EQUIPMENT_BEGIN && slot_b <= invslot::EQUIPMENT_END) || slot_b == invslot::SLOT_POWER_SOURCE) { + if ((slot_b >= invslot::EQUIPMENT_BEGIN && slot_b <= invslot::EQUIPMENT_END)) { auto item_a = inst_a->GetItem(); if (!item_a) { fail_state = swapNullData; @@ -295,7 +368,7 @@ bool EQEmu::InventoryProfile::SwapItem(int16 slot_a, int16 slot_b, SwapItemFailS fail_state = swapNotAllowed; return false; } - if ((slot_a >= invslot::EQUIPMENT_BEGIN && slot_a <= invslot::EQUIPMENT_END) || slot_a == invslot::SLOT_POWER_SOURCE) { + if ((slot_a >= invslot::EQUIPMENT_BEGIN && slot_a <= invslot::EQUIPMENT_END)) { auto item_b = inst_b->GetItem(); if (!item_b) { fail_state = swapNullData; @@ -379,11 +452,11 @@ EQEmu::ItemInstance* EQEmu::InventoryProfile::PopItem(int16 slot_id) if (slot_id == invslot::slotCursor) { p = m_cursor.pop(); } - else if ((slot_id >= invslot::EQUIPMENT_BEGIN && slot_id <= invslot::EQUIPMENT_END) || (slot_id == invslot::SLOT_POWER_SOURCE)) { + else if (slot_id >= invslot::EQUIPMENT_BEGIN && slot_id <= invslot::EQUIPMENT_END) { p = m_worn[slot_id]; m_worn.erase(slot_id); } - else if ((slot_id >= invslot::GENERAL_BEGIN && slot_id <= invslot::GENERAL_END)) { + else if (slot_id >= invslot::GENERAL_BEGIN && slot_id <= invslot::GENERAL_END) { p = m_inv[slot_id]; m_inv.erase(slot_id); } @@ -420,6 +493,8 @@ bool EQEmu::InventoryProfile::HasSpaceForItem(const ItemData *ItemToTry, int16 Q if (ItemToTry->Stackable) { for (int16 i = invslot::GENERAL_BEGIN; i <= invslot::GENERAL_END; i++) { + if ((((uint64)1 << i) & m_lookup->PossessionsBitmask) == 0) + continue; ItemInstance* InvItem = GetItem(i); @@ -457,6 +532,8 @@ bool EQEmu::InventoryProfile::HasSpaceForItem(const ItemData *ItemToTry, int16 Q } for (int16 i = invslot::GENERAL_BEGIN; i <= invslot::GENERAL_END; i++) { + if ((((uint64)1 << i) & m_lookup->PossessionsBitmask) == 0) + continue; ItemInstance* InvItem = GetItem(i); @@ -483,7 +560,7 @@ bool EQEmu::InventoryProfile::HasSpaceForItem(const ItemData *ItemToTry, int16 Q uint8 BagSize = InvItem->GetItem()->BagSlots; - for (uint8 BagSlot = invbag::SLOT_BEGIN; BagSlotPossessionsBitmask) == 0) + continue; + if (!GetItem(i)) // Found available slot in personal inventory return i; @@ -670,6 +750,9 @@ int16 EQEmu::InventoryProfile::FindFreeSlot(bool for_bag, bool try_cursor, uint8 if (!for_bag) { for (int16 i = invslot::GENERAL_BEGIN; i <= invslot::GENERAL_END; i++) { + if ((((uint64)1 << i) & m_lookup->PossessionsBitmask) == 0) + continue; + const ItemInstance* inst = GetItem(i); if (inst && inst->IsClassBag() && inst->GetItem()->BagSize >= min_size) { @@ -720,6 +803,9 @@ int16 EQEmu::InventoryProfile::FindFreeSlotForTradeItem(const ItemInstance* inst // step 1: find room for bags (caller should really ask for slots for bags first to avoid sending them to cursor..and bag item loss) if (inst->IsClassBag()) { for (int16 free_slot = general_start; free_slot <= invslot::GENERAL_END; ++free_slot) { + if ((((uint64)1 << free_slot) & m_lookup->PossessionsBitmask) == 0) + continue; + if (!m_inv[free_slot]) return free_slot; } @@ -730,6 +816,9 @@ int16 EQEmu::InventoryProfile::FindFreeSlotForTradeItem(const ItemInstance* inst // step 2: find partial room for stackables if (inst->IsStackable()) { for (int16 free_slot = general_start; free_slot <= invslot::GENERAL_END; ++free_slot) { + if ((((uint64)1 << free_slot) & m_lookup->PossessionsBitmask) == 0) + continue; + const ItemInstance* main_inst = m_inv[free_slot]; if (!main_inst) @@ -740,6 +829,9 @@ int16 EQEmu::InventoryProfile::FindFreeSlotForTradeItem(const ItemInstance* inst } for (int16 free_slot = general_start; free_slot <= invslot::GENERAL_END; ++free_slot) { + if ((((uint64)1 << free_slot) & m_lookup->PossessionsBitmask) == 0) + continue; + const ItemInstance* main_inst = m_inv[free_slot]; if (!main_inst) @@ -763,6 +855,9 @@ int16 EQEmu::InventoryProfile::FindFreeSlotForTradeItem(const ItemInstance* inst // step 3a: find room for container-specific items (ItemClassArrow) if (inst->GetItem()->ItemType == item::ItemTypeArrow) { for (int16 free_slot = general_start; free_slot <= invslot::GENERAL_END; ++free_slot) { + if ((((uint64)1 << free_slot) & m_lookup->PossessionsBitmask) == 0) + continue; + const ItemInstance* main_inst = m_inv[free_slot]; if (!main_inst || (main_inst->GetItem()->BagType != item::BagTypeQuiver) || !main_inst->IsClassBag()) @@ -779,6 +874,9 @@ int16 EQEmu::InventoryProfile::FindFreeSlotForTradeItem(const ItemInstance* inst // step 3b: find room for container-specific items (ItemClassSmallThrowing) if (inst->GetItem()->ItemType == item::ItemTypeSmallThrowing) { for (int16 free_slot = general_start; free_slot <= invslot::GENERAL_END; ++free_slot) { + if ((((uint64)1 << free_slot) & m_lookup->PossessionsBitmask) == 0) + continue; + const ItemInstance* main_inst = m_inv[free_slot]; if (!main_inst || (main_inst->GetItem()->BagType != item::BagTypeBandolier) || !main_inst->IsClassBag()) @@ -794,6 +892,9 @@ int16 EQEmu::InventoryProfile::FindFreeSlotForTradeItem(const ItemInstance* inst // step 4: just find an empty slot for (int16 free_slot = general_start; free_slot <= invslot::GENERAL_END; ++free_slot) { + if ((((uint64)1 << free_slot) & m_lookup->PossessionsBitmask) == 0) + continue; + const ItemInstance* main_inst = m_inv[free_slot]; if (!main_inst) @@ -801,6 +902,9 @@ int16 EQEmu::InventoryProfile::FindFreeSlotForTradeItem(const ItemInstance* inst } for (int16 free_slot = general_start; free_slot <= invslot::GENERAL_END; ++free_slot) { + if ((((uint64)1 << free_slot) & m_lookup->PossessionsBitmask) == 0) + continue; + const ItemInstance* main_inst = m_inv[free_slot]; if (main_inst && main_inst->IsClassBag()) { @@ -977,12 +1081,13 @@ bool EQEmu::InventoryProfile::CanItemFitInContainer(const ItemData *ItemToTry, c bool EQEmu::InventoryProfile::SupportsClickCasting(int16 slot_id) { // there are a few non-potion items that identify as ItemTypePotion..so, we still need to ubiquitously include the equipment range - if ((uint16)slot_id <= invslot::GENERAL_END || slot_id == invslot::SLOT_POWER_SOURCE) - { + if (slot_id >= invslot::EQUIPMENT_BEGIN && slot_id <= invslot::EQUIPMENT_END) { return true; } - else if (slot_id >= invbag::GENERAL_BAGS_BEGIN && slot_id <= invbag::GENERAL_BAGS_END) - { + else if (slot_id >= invslot::GENERAL_BEGIN && slot_id <= invslot::GENERAL_END) { + return true; + } + else if (slot_id >= invbag::GENERAL_BAGS_BEGIN && slot_id <= invbag::GENERAL_BAGS_END) { if (inventory::Lookup(m_mob_version)->AllowClickCastFromBag) return true; } @@ -992,8 +1097,16 @@ bool EQEmu::InventoryProfile::SupportsClickCasting(int16 slot_id) bool EQEmu::InventoryProfile::SupportsPotionBeltCasting(int16 slot_id) { - if ((uint16)slot_id <= invslot::GENERAL_END || slot_id == invslot::SLOT_POWER_SOURCE || (slot_id >= invbag::GENERAL_BAGS_BEGIN && slot_id <= invbag::GENERAL_BAGS_END)) + // does this have the same criteria as 'SupportsClickCasting' above? (bag clicking per client) + if (slot_id >= invslot::EQUIPMENT_BEGIN && slot_id <= invslot::EQUIPMENT_END) { return true; + } + else if (slot_id >= invslot::GENERAL_BEGIN && slot_id <= invslot::GENERAL_END) { + return true; + } + else if (slot_id >= invbag::GENERAL_BAGS_BEGIN && slot_id <= invbag::GENERAL_BAGS_END) { + return true; + } return false; } @@ -1006,7 +1119,7 @@ bool EQEmu::InventoryProfile::SupportsContainers(int16 slot_id) (slot_id >= invslot::BANK_BEGIN && slot_id <= invslot::BANK_END) || (slot_id >= invslot::SHARED_BANK_BEGIN && slot_id <= invslot::SHARED_BANK_END) || (slot_id >= invslot::TRADE_BEGIN && slot_id <= invslot::TRADE_END) - ) { + ) { return true; } @@ -1054,13 +1167,19 @@ uint8 EQEmu::InventoryProfile::FindBrightestLightType() uint8 brightest_light_type = 0; for (auto iter = m_worn.begin(); iter != m_worn.end(); ++iter) { - if ((iter->first < invslot::EQUIPMENT_BEGIN || iter->first > invslot::EQUIPMENT_END) && iter->first != invslot::SLOT_POWER_SOURCE) { continue; } - if (iter->first == invslot::slotAmmo) { continue; } + if ((iter->first < invslot::EQUIPMENT_BEGIN || iter->first > invslot::EQUIPMENT_END)) + continue; + + if (iter->first == invslot::slotAmmo) + continue; auto inst = iter->second; - if (inst == nullptr) { continue; } + if (inst == nullptr) + continue; + auto item = inst->GetItem(); - if (item == nullptr) { continue; } + if (item == nullptr) + continue; if (lightsource::IsLevelGreater(item->Light, brightest_light_type)) brightest_light_type = item->Light; @@ -1068,15 +1187,21 @@ uint8 EQEmu::InventoryProfile::FindBrightestLightType() uint8 general_light_type = 0; for (auto iter = m_inv.begin(); iter != m_inv.end(); ++iter) { - if (iter->first < invslot::GENERAL_BEGIN || iter->first > invslot::GENERAL_END) { continue; } + if (iter->first < invslot::GENERAL_BEGIN || iter->first > invslot::GENERAL_END) + continue; auto inst = iter->second; - if (inst == nullptr) { continue; } - auto item = inst->GetItem(); - if (item == nullptr) { continue; } + if (inst == nullptr) + continue; - if (!item->IsClassCommon()) { continue; } - if (item->Light < 9 || item->Light > 13) { continue; } + auto item = inst->GetItem(); + if (item == nullptr) + continue; + + if (!item->IsClassCommon()) + continue; + if (item->Light < 9 || item->Light > 13) + continue; if (lightsource::TypeToLevel(item->Light)) general_light_type = item->Light; @@ -1136,7 +1261,7 @@ int EQEmu::InventoryProfile::GetSlotByItemInstCollection(const std::map &collection) @@ -1174,6 +1299,15 @@ void EQEmu::InventoryProfile::dumpBagContents(ItemInstance *inst, std::map& bucket, int16 slot_id) const { + if (slot_id <= EQEmu::invslot::POSSESSIONS_END && slot_id >= EQEmu::invslot::POSSESSIONS_BEGIN) { + if ((((uint64)1 << slot_id) & m_lookup->PossessionsBitmask) == 0) + return nullptr; + } + else if (slot_id <= EQEmu::invslot::BANK_END && slot_id >= EQEmu::invslot::BANK_BEGIN) { + if (slot_id - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) + return nullptr; + } + auto it = bucket.find(slot_id); if (it != bucket.end()) { return it->second; @@ -1205,21 +1339,27 @@ int16 EQEmu::InventoryProfile::_PutItem(int16 slot_id, ItemInstance* inst) m_cursor.push_front(inst); result = slot_id; } - else if ((slot_id >= invslot::EQUIPMENT_BEGIN && slot_id <= invslot::EQUIPMENT_END) || (slot_id == invslot::SLOT_POWER_SOURCE)) { - m_worn[slot_id] = inst; - result = slot_id; + else if (slot_id >= invslot::EQUIPMENT_BEGIN && slot_id <= invslot::EQUIPMENT_END) { + if ((((uint64)1 << slot_id) & m_lookup->PossessionsBitmask) != 0) { + m_worn[slot_id] = inst; + result = slot_id; + } } else if ((slot_id >= invslot::GENERAL_BEGIN && slot_id <= invslot::GENERAL_END)) { - m_inv[slot_id] = inst; - result = slot_id; + if ((((uint64)1 << slot_id) & m_lookup->PossessionsBitmask) != 0) { + m_inv[slot_id] = inst; + result = slot_id; + } } else if (slot_id >= invslot::TRIBUTE_BEGIN && slot_id <= invslot::TRIBUTE_END) { m_worn[slot_id] = inst; result = slot_id; } else if (slot_id >= invslot::BANK_BEGIN && slot_id <= invslot::BANK_END) { - m_bank[slot_id] = inst; - result = slot_id; + if (slot_id - EQEmu::invslot::BANK_BEGIN < m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) { + m_bank[slot_id] = inst; + result = slot_id; + } } else if (slot_id >= invslot::SHARED_BANK_BEGIN && slot_id <= invslot::SHARED_BANK_END) { m_shbank[slot_id] = inst; @@ -1254,6 +1394,15 @@ int16 EQEmu::InventoryProfile::_HasItem(std::map& bucket, uint32 quantity_found = 0; for (auto iter = bucket.begin(); iter != bucket.end(); ++iter) { + if (iter->first <= EQEmu::invslot::POSSESSIONS_END && iter->first >= EQEmu::invslot::POSSESSIONS_BEGIN) { + if ((((uint64)1 << iter->first) & m_lookup->PossessionsBitmask) == 0) + continue; + } + else if (iter->first <= EQEmu::invslot::BANK_END && iter->first >= EQEmu::invslot::BANK_BEGIN) { + if (iter->first - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) + continue; + } + auto inst = iter->second; if (inst == nullptr) { continue; } @@ -1347,6 +1496,15 @@ int16 EQEmu::InventoryProfile::_HasItemByUse(std::map& buc uint32 quantity_found = 0; for (auto iter = bucket.begin(); iter != bucket.end(); ++iter) { + if (iter->first <= EQEmu::invslot::POSSESSIONS_END && iter->first >= EQEmu::invslot::POSSESSIONS_BEGIN) { + if ((((uint64)1 << iter->first) & m_lookup->PossessionsBitmask) == 0) + continue; + } + else if (iter->first <= EQEmu::invslot::BANK_END && iter->first >= EQEmu::invslot::BANK_BEGIN) { + if (iter->first - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) + continue; + } + auto inst = iter->second; if (inst == nullptr) { continue; } @@ -1411,6 +1569,15 @@ int16 EQEmu::InventoryProfile::_HasItemByUse(ItemInstQueue& iqueue, uint8 use, u int16 EQEmu::InventoryProfile::_HasItemByLoreGroup(std::map& bucket, uint32 loregroup) { for (auto iter = bucket.begin(); iter != bucket.end(); ++iter) { + if (iter->first <= EQEmu::invslot::POSSESSIONS_END && iter->first >= EQEmu::invslot::POSSESSIONS_BEGIN) { + if ((((uint64)1 << iter->first) & m_lookup->PossessionsBitmask) == 0) + continue; + } + else if (iter->first <= EQEmu::invslot::BANK_END && iter->first >= EQEmu::invslot::BANK_BEGIN) { + if (iter->first - EQEmu::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) + continue; + } + auto inst = iter->second; if (inst == nullptr) { continue; } @@ -1444,7 +1611,7 @@ int16 EQEmu::InventoryProfile::_HasItemByLoreGroup(std::map inventory::EquipmentEnd) - return false;*/ - if ((slot_index < invslot::EQUIPMENT_BEGIN || slot_index > invslot::EQUIPMENT_END) && slot_index != invslot::SLOT_POWER_SOURCE) + if (slot_index < invslot::EQUIPMENT_BEGIN || slot_index > invslot::EQUIPMENT_END) return false; return true; @@ -120,8 +118,6 @@ bool EQEmu::InventorySlot::IsEquipmentIndex(int16 slot_index) bool EQEmu::InventorySlot::IsGeneralIndex(int16 slot_index) { - /*if (slot_index < inventory::GeneralBegin || slot_index > inventory::GeneralEnd) - return false;*/ if (slot_index < invslot::GENERAL_BEGIN || slot_index > invslot::GENERAL_END) return false; @@ -130,22 +126,18 @@ bool EQEmu::InventorySlot::IsGeneralIndex(int16 slot_index) bool EQEmu::InventorySlot::IsCursorIndex(int16 slot_index) { - /*if (slot_index != inventory::slotCursor) - return false;*/ - if (slot_index != invslot::slotCursor) - return false; + if (slot_index == invslot::slotCursor) + return true; - return true; + return false; } bool EQEmu::InventorySlot::IsWeaponIndex(int16 slot_index) { - /*if ((slot_index != inventory::slotRange) && (slot_index != inventory::slotPrimary) && (slot_index != inventory::slotSecondary)) - return false;*/ - if ((slot_index != invslot::slotRange) && (slot_index != invslot::slotPrimary) && (slot_index != invslot::slotSecondary)) - return false; - - return true; + if (slot_index == invslot::slotPrimary || slot_index == invslot::slotSecondary || slot_index == invslot::slotRange) + return true; + + return false; } bool EQEmu::InventorySlot::IsTextureIndex(int16 slot_index) diff --git a/common/item_instance.cpp b/common/item_instance.cpp index 922d0e032..ea7e94428 100644 --- a/common/item_instance.cpp +++ b/common/item_instance.cpp @@ -271,17 +271,10 @@ bool EQEmu::ItemInstance::IsEquipable(int16 slot_id) const if (!m_item) return false; - // another "shouldn't do" fix..will be fixed in future updates (requires code and database work) - int16 use_slot = INVALID_INDEX; - if (slot_id == invslot::SLOT_POWER_SOURCE) { use_slot = invslot::slotGeneral1; } - if ((uint16)slot_id <= invslot::EQUIPMENT_END) { use_slot = slot_id; } + if (slot_id < EQEmu::invslot::EQUIPMENT_BEGIN || slot_id > EQEmu::invslot::EQUIPMENT_END) + return false; - if (use_slot != INVALID_INDEX) { - if (m_item->Slots & (1 << use_slot)) - return true; - } - - return false; + return ((m_item->Slots & (1 << slot_id)) != 0); } bool EQEmu::ItemInstance::IsAugmentable() const @@ -298,20 +291,18 @@ bool EQEmu::ItemInstance::IsAugmentable() const } bool EQEmu::ItemInstance::AvailableWearSlot(uint32 aug_wear_slots) const { - // TODO: check to see if incoming 'aug_wear_slots' "switches" bit assignments like above... - // (if wrong, would only affect MainAmmo and MainPowerSource augments) if (!m_item || !m_item->IsClassCommon()) return false; int index = invslot::EQUIPMENT_BEGIN; - for (; index <= invslot::slotGeneral1; ++index) { // MainGeneral1 should be legacy::EQUIPMENT_END + for (; index <= invslot::EQUIPMENT_END; ++index) { if (m_item->Slots & (1 << index)) { if (aug_wear_slots & (1 << index)) break; } } - return (index < 23) ? true : false; + return (index <= EQEmu::invslot::EQUIPMENT_END); } int8 EQEmu::ItemInstance::AvailableAugmentSlot(int32 augtype) const @@ -810,12 +801,10 @@ EQEmu::ItemInstance* EQEmu::ItemInstance::Clone() const } bool EQEmu::ItemInstance::IsSlotAllowed(int16 slot_id) const { - // 'SupportsContainers' and 'slot_id > 21' previously saw the reassigned PowerSource slot (9999 to 22) as valid if (!m_item) { return false; } else if (InventoryProfile::SupportsContainers(slot_id)) { return true; } else if (m_item->Slots & (1 << slot_id)) { return true; } - else if (slot_id == invslot::SLOT_POWER_SOURCE && (m_item->Slots & (1 << 22))) { return true; } // got lazy... - else if (slot_id != invslot::SLOT_POWER_SOURCE && slot_id > invslot::EQUIPMENT_END) { return true; } + else if (slot_id > invslot::EQUIPMENT_END) { return true; } // why do we call 'InventoryProfile::SupportsContainers' with this here? else { return false; } } diff --git a/common/patches/rof.cpp b/common/patches/rof.cpp index 6faabf88c..68a365b28 100644 --- a/common/patches/rof.cpp +++ b/common/patches/rof.cpp @@ -45,18 +45,20 @@ namespace RoF static OpcodeManager *opcodes = nullptr; static Strategy struct_strategy; - void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id, uint8 depth); + void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id, uint8 depth, ItemPacketType packet_type); // server to client inventory location converters static inline structs::InventorySlot_Struct ServerToRoFSlot(uint32 serverSlot); - static inline structs::TypelessInventorySlot_Struct ServerToRoFTypelessSlot(uint32 serverSlot); - static inline uint32 ServerToRoFCorpseSlot(uint32 serverCorpseSlot); - + static inline structs::InventorySlot_Struct ServerToRoFCorpseSlot(uint32 serverCorpseSlot); + static inline uint32 ServerToRoFCorpseMainSlot(uint32 serverCorpseSlot); + static inline structs::TypelessInventorySlot_Struct ServerToRoFTypelessSlot(uint32 serverSlot, int16 serverType); + // client to server inventory location converters static inline uint32 RoFToServerSlot(structs::InventorySlot_Struct rofSlot); - static inline uint32 RoFToServerTypelessSlot(structs::TypelessInventorySlot_Struct rofSlot); - static inline uint32 RoFToServerCorpseSlot(uint32 rofCorpseSlot); - + static inline uint32 RoFToServerCorpseSlot(structs::InventorySlot_Struct rofCorpseSlot); + static inline uint32 RoFToServerCorpseMainSlot(uint32 rofCorpseSlot); + static inline uint32 RoFToServerTypelessSlot(structs::TypelessInventorySlot_Struct rofSlot, int16 rofType); + // server to client say link converter static inline void ServerToRoFSayLink(std::string& rofSayLink, const std::string& serverSayLink); @@ -191,7 +193,7 @@ namespace RoF eq->unknown000 = 1; OUT(npcid); - eq->inventory_slot = ServerToRoFTypelessSlot(emu->slot); + eq->inventory_slot = ServerToRoFTypelessSlot(emu->slot, EQEmu::invtype::typePossessions); OUT(charges); OUT(sell_price); @@ -244,7 +246,7 @@ namespace RoF SETUP_DIRECT_ENCODE(AltCurrencySellItem_Struct, structs::AltCurrencySellItem_Struct); OUT(merchant_entity_id); - eq->inventory_slot = ServerToRoFTypelessSlot(emu->slot_id); + eq->inventory_slot = ServerToRoFTypelessSlot(emu->slot_id, EQEmu::invtype::typePossessions); OUT(charges); OUT(cost); @@ -268,7 +270,7 @@ namespace RoF ENCODE_LENGTH_EXACT(ApplyPoison_Struct); SETUP_DIRECT_ENCODE(ApplyPoison_Struct, structs::ApplyPoison_Struct); - eq->inventory_slot = ServerToRoFTypelessSlot(emu->inventorySlot); + eq->inventory_slot = ServerToRoFTypelessSlot(emu->inventorySlot, EQEmu::invtype::typePossessions); OUT(success); FINISH_ENCODE(); @@ -585,9 +587,9 @@ namespace RoF ob.write((const char*)&item_count, sizeof(uint32)); for (int index = 0; index < item_count; ++index, ++eq) { - SerializeItem(ob, (const EQEmu::ItemInstance*)eq->inst, eq->slot_id, 0); + SerializeItem(ob, (const EQEmu::ItemInstance*)eq->inst, eq->slot_id, 0, ItemPacketCharInventory); if (ob.tellp() == last_pos) - Log(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id); + Log(Logs::General, Logs::Netcode, "RoF::ENCODE(OP_CharInventory) Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id); last_pos = ob.tellp(); } @@ -667,7 +669,12 @@ namespace RoF FINISH_ENCODE(); } - ENCODE(OP_DeleteCharge) { ENCODE_FORWARD(OP_MoveItem); } + ENCODE(OP_DeleteCharge) + { + Log(Logs::Moderate, Logs::Netcode, "RoF::ENCODE(OP_DeleteCharge)"); + + ENCODE_FORWARD(OP_MoveItem); + } ENCODE(OP_DeleteItem) { @@ -1504,6 +1511,7 @@ namespace RoF //store away the emu struct uchar* __emu_buffer = in->pBuffer; + ItemPacket_Struct* old_item_pkt = (ItemPacket_Struct*)__emu_buffer; EQEmu::InternalSerializedItem_Struct* int_struct = (EQEmu::InternalSerializedItem_Struct*)(&__emu_buffer[4]); EQEmu::OutBuffer ob; @@ -1511,9 +1519,9 @@ namespace RoF ob.write((const char*)__emu_buffer, 4); - SerializeItem(ob, (const EQEmu::ItemInstance*)int_struct->inst, int_struct->slot_id, 0); + SerializeItem(ob, (const EQEmu::ItemInstance*)int_struct->inst, int_struct->slot_id, 0, old_item_pkt->PacketType); if (ob.tellp() == last_pos) { - Log(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d.", int_struct->slot_id); + Log(Logs::General, Logs::Netcode, "RoF::ENCODE(OP_ItemPacket) Serialization failed on item slot %d.", int_struct->slot_id); delete in; return; } @@ -1586,9 +1594,11 @@ namespace RoF ENCODE_LENGTH_EXACT(LootingItem_Struct); SETUP_DIRECT_ENCODE(LootingItem_Struct, structs::LootingItem_Struct); + Log(Logs::Moderate, Logs::Netcode, "RoF::ENCODE(OP_LootItem)"); + OUT(lootee); OUT(looter); - eq->slot_id = ServerToRoFCorpseSlot(emu->slot_id); + eq->slot_id = ServerToRoFCorpseMainSlot(emu->slot_id); OUT(auto_loot); FINISH_ENCODE(); @@ -1756,6 +1766,8 @@ namespace RoF ENCODE_LENGTH_EXACT(MoveItem_Struct); SETUP_DIRECT_ENCODE(MoveItem_Struct, structs::MoveItem_Struct); + Log(Logs::Moderate, Logs::Netcode, "RoF::ENCODE(OP_MoveItem)"); + eq->from_slot = ServerToRoFSlot(emu->from_slot); eq->to_slot = ServerToRoFSlot(emu->to_slot); OUT(number_in_stack); @@ -2226,7 +2238,7 @@ namespace RoF outapp->WriteUInt32(profile::BANDOLIERS_SIZE); - // Copy bandoliers where server and client indexes converge + // Copy bandoliers where server and client indices converge for (uint32 r = 0; r < EQEmu::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) { outapp->WriteString(emu->bandoliers[r].Name); for (uint32 j = 0; j < profile::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true @@ -2241,7 +2253,7 @@ namespace RoF } } } - // Nullify bandoliers where server and client indexes diverge, with a client bias + // Nullify bandoliers where server and client indices diverge, with a client bias for (uint32 r = EQEmu::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) { outapp->WriteString(""); for (uint32 j = 0; j < profile::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true @@ -2253,7 +2265,7 @@ namespace RoF outapp->WriteUInt32(profile::POTION_BELT_SIZE); - // Copy potion belt where server and client indexes converge + // Copy potion belt where server and client indices converge for (uint32 r = 0; r < EQEmu::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++r) { outapp->WriteString(emu->potionbelt.Items[r].Name); outapp->WriteUInt32(emu->potionbelt.Items[r].ID); @@ -2265,7 +2277,7 @@ namespace RoF outapp->WriteSInt32(-1); } } - // Nullify potion belt where server and client indexes diverge, with a client bias + // Nullify potion belt where server and client indices diverge, with a client bias for (uint32 r = EQEmu::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) { outapp->WriteString(""); outapp->WriteUInt32(0); @@ -3041,7 +3053,7 @@ namespace RoF SETUP_DIRECT_ENCODE(Merchant_Purchase_Struct, structs::Merchant_Purchase_Struct); OUT(npcid); - eq->inventory_slot = ServerToRoFTypelessSlot(emu->itemslot); + eq->inventory_slot = ServerToRoFTypelessSlot(emu->itemslot, EQEmu::invtype::typePossessions); //OUT(itemslot); OUT(quantity); OUT(price); @@ -4057,7 +4069,7 @@ namespace RoF SETUP_DIRECT_DECODE(Adventure_Sell_Struct, structs::Adventure_Sell_Struct); IN(npcid); - emu->slot = RoFToServerTypelessSlot(eq->inventory_slot); + emu->slot = RoFToServerTypelessSlot(eq->inventory_slot, invtype::typePossessions); IN(charges); IN(sell_price); @@ -4070,7 +4082,7 @@ namespace RoF SETUP_DIRECT_DECODE(AltCurrencySellItem_Struct, structs::AltCurrencySellItem_Struct); IN(merchant_entity_id); - emu->slot_id = RoFToServerTypelessSlot(eq->inventory_slot); + emu->slot_id = RoFToServerTypelessSlot(eq->inventory_slot, invtype::typePossessions); IN(charges); IN(cost); @@ -4083,7 +4095,7 @@ namespace RoF SETUP_DIRECT_DECODE(AltCurrencySelectItem_Struct, structs::AltCurrencySelectItem_Struct); IN(merchant_entity_id); - emu->slot_id = RoFToServerTypelessSlot(eq->inventory_slot); + emu->slot_id = RoFToServerTypelessSlot(eq->inventory_slot, invtype::typePossessions); FINISH_DIRECT_DECODE(); } @@ -4105,7 +4117,7 @@ namespace RoF DECODE_LENGTH_EXACT(structs::ApplyPoison_Struct); SETUP_DIRECT_DECODE(ApplyPoison_Struct, structs::ApplyPoison_Struct); - emu->inventorySlot = RoFToServerTypelessSlot(eq->inventory_slot); + emu->inventorySlot = RoFToServerTypelessSlot(eq->inventory_slot, invtype::typePossessions); IN(success); FINISH_DIRECT_DECODE(); @@ -4741,9 +4753,11 @@ namespace RoF DECODE_LENGTH_EXACT(structs::LootingItem_Struct); SETUP_DIRECT_DECODE(LootingItem_Struct, structs::LootingItem_Struct); + Log(Logs::Moderate, Logs::Netcode, "RoF::DECODE(OP_LootItem)"); + IN(lootee); IN(looter); - emu->slot_id = RoFToServerCorpseSlot(eq->slot_id); + emu->slot_id = RoFToServerCorpseMainSlot(eq->slot_id); IN(auto_loot); FINISH_DIRECT_DECODE(); @@ -4754,8 +4768,8 @@ namespace RoF DECODE_LENGTH_EXACT(structs::MoveItem_Struct); SETUP_DIRECT_DECODE(MoveItem_Struct, structs::MoveItem_Struct); - //Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Moved item from %u to %u", eq->from_slot.MainSlot, eq->to_slot.MainSlot); - Log(Logs::General, Logs::Netcode, "[RoF] MoveItem SlotType from %i to %i, MainSlot from %i to %i, SubSlot from %i to %i, AugSlot from %i to %i, Unknown01 from %i to %i, Number %u", eq->from_slot.Type, eq->to_slot.Type, eq->from_slot.Slot, eq->to_slot.Slot, eq->from_slot.SubIndex, eq->to_slot.SubIndex, eq->from_slot.AugIndex, eq->to_slot.AugIndex, eq->from_slot.Unknown01, eq->to_slot.Unknown01, eq->number_in_stack); + Log(Logs::Moderate, Logs::Netcode, "RoF::DECODE(OP_MoveItem)"); + emu->from_slot = RoFToServerSlot(eq->from_slot); emu->to_slot = RoFToServerSlot(eq->to_slot); IN(number_in_stack); @@ -4904,7 +4918,7 @@ namespace RoF SETUP_DIRECT_DECODE(Merchant_Purchase_Struct, structs::Merchant_Purchase_Struct); IN(npcid); - emu->itemslot = RoFToServerTypelessSlot(eq->inventory_slot); + emu->itemslot = RoFToServerTypelessSlot(eq->inventory_slot, invtype::typePossessions); //IN(itemslot); IN(quantity); IN(price); @@ -5079,7 +5093,7 @@ namespace RoF return NextItemInstSerialNumber; } - void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id_in, uint8 depth) + void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id_in, uint8 depth, ItemPacketType packet_type) { const EQEmu::ItemData *item = inst->GetUnscaledItem(); @@ -5092,8 +5106,16 @@ namespace RoF hdr.stacksize = (inst->IsStackable() ? ((inst->GetCharges() > 1000) ? 0xFFFFFFFF : inst->GetCharges()) : 1); hdr.unknown004 = 0; - structs::InventorySlot_Struct slot_id = ServerToRoFSlot(slot_id_in); - + structs::InventorySlot_Struct slot_id; + switch (packet_type) { + case ItemPacketLoot: + slot_id = ServerToRoFCorpseSlot(slot_id_in); + break; + default: + slot_id = ServerToRoFSlot(slot_id_in); + break; + } + hdr.slot_type = (inst->GetMerchantSlot() ? invtype::typeMerchant : slot_id.Type); hdr.main_slot = (inst->GetMerchantSlot() ? inst->GetMerchantSlot() : slot_id.Slot); hdr.sub_slot = (inst->GetMerchantSlot() ? 0xffff : slot_id.SubIndex); @@ -5188,7 +5210,7 @@ namespace RoF ibs.nodrop = item->NoDrop; ibs.attune = item->Attuneable; ibs.size = item->Size; - ibs.slots = SwapBits21And22(item->Slots); + ibs.slots = item->Slots; ibs.price = item->Price; ibs.icon = item->Icon; ibs.unknown1 = 1; @@ -5492,318 +5514,450 @@ namespace RoF ob.write((const char*)&subitem_count, sizeof(uint32)); - for (uint32 index = EQEmu::invbag::SLOT_BEGIN; index <= EQEmu::invbag::SLOT_END; ++index) { - EQEmu::ItemInstance* sub = inst->GetItem(index); - if (!sub) - continue; + // moved outside of loop since it is not modified within that scope + int16 SubSlotNumber = EQEmu::invbag::SLOT_INVALID; - int SubSlotNumber = INVALID_INDEX; - if (slot_id_in >= EQEmu::invslot::GENERAL_BEGIN && slot_id_in <= EQEmu::invslot::GENERAL_END) - SubSlotNumber = (((slot_id_in + 3) * EQEmu::invbag::SLOT_COUNT) + index + 1); - else if (slot_id_in >= EQEmu::invslot::BANK_BEGIN && slot_id_in <= EQEmu::invslot::BANK_END) - SubSlotNumber = (((slot_id_in - EQEmu::invslot::BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::BANK_BAGS_BEGIN + index); - else if (slot_id_in >= EQEmu::invslot::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::invslot::SHARED_BANK_END) - SubSlotNumber = (((slot_id_in - EQEmu::invslot::SHARED_BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + index); - else - SubSlotNumber = slot_id_in; + if (slot_id_in <= EQEmu::invslot::GENERAL_END && slot_id_in >= EQEmu::invslot::GENERAL_BEGIN) + SubSlotNumber = EQEmu::invbag::GENERAL_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::GENERAL_BEGIN) * EQEmu::invbag::SLOT_COUNT); + else if (slot_id_in == EQEmu::invslot::slotCursor) + SubSlotNumber = EQEmu::invbag::CURSOR_BAG_BEGIN; + else if (slot_id_in <= EQEmu::invslot::BANK_END && slot_id_in >= EQEmu::invslot::BANK_BEGIN) + SubSlotNumber = EQEmu::invbag::BANK_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT); + else if (slot_id_in <= EQEmu::invslot::SHARED_BANK_END && slot_id_in >= EQEmu::invslot::SHARED_BANK_BEGIN) + SubSlotNumber = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::SHARED_BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT); + else + SubSlotNumber = slot_id_in; // not sure if this is the best way to handle this..leaving for now - ob.write((const char*)&index, sizeof(uint32)); + if (SubSlotNumber != EQEmu::invbag::SLOT_INVALID) { + for (uint32 index = EQEmu::invbag::SLOT_BEGIN; index <= EQEmu::invbag::SLOT_END; ++index) { + EQEmu::ItemInstance* sub = inst->GetItem(index); + if (!sub) + continue; - SerializeItem(ob, sub, SubSlotNumber, (depth + 1)); - ++subitem_count; + ob.write((const char*)&index, sizeof(uint32)); + + SerializeItem(ob, sub, SubSlotNumber, (depth + 1), packet_type); + ++subitem_count; + } + + if (subitem_count) + ob.overwrite(count_pos, (const char*)&subitem_count, sizeof(uint32)); } - - if (subitem_count) - ob.overwrite(count_pos, (const char*)&subitem_count, sizeof(uint32)); } static inline structs::InventorySlot_Struct ServerToRoFSlot(uint32 serverSlot) { structs::InventorySlot_Struct RoFSlot; - RoFSlot.Type = INVALID_INDEX; - RoFSlot.Unknown02 = 0; - RoFSlot.Slot = INVALID_INDEX; - RoFSlot.SubIndex = INVALID_INDEX; - RoFSlot.AugIndex = INVALID_INDEX; - RoFSlot.Unknown01 = 0; + RoFSlot.Type = invtype::TYPE_INVALID; + RoFSlot.Unknown02 = INULL; + RoFSlot.Slot = invslot::SLOT_INVALID; + RoFSlot.SubIndex = invbag::SLOT_INVALID; + RoFSlot.AugIndex = invaug::SOCKET_INVALID; + RoFSlot.Unknown01 = INULL; - uint32 TempSlot = 0; + uint32 TempSlot = EQEmu::invslot::SLOT_INVALID; - if (serverSlot < 56 || serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE) { // Main Inventory and Cursor + if (serverSlot < EQEmu::invtype::POSSESSIONS_SIZE) { RoFSlot.Type = invtype::typePossessions; RoFSlot.Slot = serverSlot; - - if (serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE) - RoFSlot.Slot = invslot::slotPowerSource; - - else if (serverSlot >= EQEmu::invslot::slotCursor) // Cursor and Extended Corpse Inventory - RoFSlot.Slot += 3; - - else if (serverSlot >= EQEmu::invslot::slotAmmo) // (> 20) - RoFSlot.Slot += 1; } - /*else if (ServerSlot < 51) { // Cursor Buffer - RoFSlot.SlotType = maps::MapLimbo; - RoFSlot.MainSlot = ServerSlot - 31; - }*/ - - else if (serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::invbag::CURSOR_BAG_END) { // (> 250 && < 341) + else if (serverSlot <= EQEmu::invbag::CURSOR_BAG_END && serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { + TempSlot = serverSlot - EQEmu::invbag::GENERAL_BAGS_BEGIN; + RoFSlot.Type = invtype::typePossessions; - TempSlot = serverSlot - 1; - RoFSlot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 2; - RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::invbag::SLOT_COUNT); - - if (RoFSlot.Slot >= invslot::slotGeneral9) // (> 30) - RoFSlot.Slot = invslot::slotCursor; + RoFSlot.Slot = invslot::GENERAL_BEGIN + (TempSlot / EQEmu::invbag::SLOT_COUNT); + RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot - invslot::GENERAL_BEGIN) * EQEmu::invbag::SLOT_COUNT); } - else if (serverSlot >= EQEmu::invslot::TRIBUTE_BEGIN && serverSlot <= EQEmu::invslot::TRIBUTE_END) { // Tribute + else if (serverSlot <= EQEmu::invslot::TRIBUTE_END && serverSlot >= EQEmu::invslot::TRIBUTE_BEGIN) { RoFSlot.Type = invtype::typeTribute; RoFSlot.Slot = serverSlot - EQEmu::invslot::TRIBUTE_BEGIN; } - else if (serverSlot >= EQEmu::invslot::BANK_BEGIN && serverSlot <= EQEmu::invbag::BANK_BAGS_END) { + else if (serverSlot <= EQEmu::invslot::GUILD_TRIBUTE_END && serverSlot >= EQEmu::invslot::GUILD_TRIBUTE_BEGIN) { + RoFSlot.Type = invtype::typeGuildTribute; + RoFSlot.Slot = serverSlot - EQEmu::invslot::GUILD_TRIBUTE_BEGIN; + } + + else if (serverSlot <= EQEmu::invslot::BANK_END && serverSlot >= EQEmu::invslot::BANK_BEGIN) { RoFSlot.Type = invtype::typeBank; - TempSlot = serverSlot - EQEmu::invslot::BANK_BEGIN; - RoFSlot.Slot = TempSlot; - - if (TempSlot > 30) { // (> 30) - RoFSlot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 3; - RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::invbag::SLOT_COUNT); - } + RoFSlot.Slot = serverSlot - EQEmu::invslot::BANK_BEGIN; } - else if (serverSlot >= EQEmu::invslot::SHARED_BANK_BEGIN && serverSlot <= EQEmu::invbag::SHARED_BANK_BAGS_END) { + else if (serverSlot <= EQEmu::invbag::BANK_BAGS_END && serverSlot >= EQEmu::invbag::BANK_BAGS_BEGIN) { + TempSlot = serverSlot - EQEmu::invbag::BANK_BAGS_BEGIN; + + RoFSlot.Type = invtype::typeBank; + RoFSlot.Slot = TempSlot / EQEmu::invbag::SLOT_COUNT; + RoFSlot.SubIndex = TempSlot - (RoFSlot.Slot * EQEmu::invbag::SLOT_COUNT); + } + + else if (serverSlot <= EQEmu::invslot::SHARED_BANK_END && serverSlot >= EQEmu::invslot::SHARED_BANK_BEGIN) { RoFSlot.Type = invtype::typeSharedBank; - TempSlot = serverSlot - EQEmu::invslot::SHARED_BANK_BEGIN; - RoFSlot.Slot = TempSlot; - - if (TempSlot > 30) { // (> 30) - RoFSlot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 3; - RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::invbag::SLOT_COUNT); - } + RoFSlot.Slot = serverSlot - EQEmu::invslot::SHARED_BANK_BEGIN; } - else if (serverSlot >= EQEmu::invslot::TRADE_BEGIN && serverSlot <= EQEmu::invbag::TRADE_BAGS_END) { + else if (serverSlot <= EQEmu::invbag::SHARED_BANK_BAGS_END && serverSlot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN) { + TempSlot = serverSlot - EQEmu::invbag::SHARED_BANK_BAGS_BEGIN; + + RoFSlot.Type = invtype::typeSharedBank; + RoFSlot.Slot = TempSlot / EQEmu::invbag::SLOT_COUNT; + RoFSlot.SubIndex = TempSlot - (RoFSlot.Slot * EQEmu::invbag::SLOT_COUNT); + } + + else if (serverSlot <= EQEmu::invslot::TRADE_END && serverSlot >= EQEmu::invslot::TRADE_BEGIN) { RoFSlot.Type = invtype::typeTrade; - TempSlot = serverSlot - EQEmu::invslot::TRADE_BEGIN; - RoFSlot.Slot = TempSlot; - - if (TempSlot > 30) { - RoFSlot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 3; - RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 3) * EQEmu::invbag::SLOT_COUNT); - } - - /* - // OLD CODE: - if (TempSlot > 99) { - if (TempSlot > 100) - RoFSlot.MainSlot = int((TempSlot - 100) / 10); - - else - RoFSlot.MainSlot = 0; - - RoFSlot.SubSlot = TempSlot - (100 + RoFSlot.MainSlot); - } - */ + RoFSlot.Slot = serverSlot - EQEmu::invslot::TRADE_BEGIN; } - else if (serverSlot >= EQEmu::invslot::WORLD_BEGIN && serverSlot <= EQEmu::invslot::WORLD_END) { + else if (serverSlot <= EQEmu::invbag::TRADE_BAGS_END && serverSlot >= EQEmu::invbag::TRADE_BAGS_BEGIN) { + TempSlot = serverSlot - EQEmu::invbag::TRADE_BAGS_BEGIN; + + RoFSlot.Type = invtype::typeTrade; + RoFSlot.Slot = TempSlot / EQEmu::invbag::SLOT_COUNT; + RoFSlot.SubIndex = TempSlot - (RoFSlot.Slot * EQEmu::invbag::SLOT_COUNT); + } + + else if (serverSlot <= EQEmu::invslot::WORLD_END && serverSlot >= EQEmu::invslot::WORLD_BEGIN) { RoFSlot.Type = invtype::typeWorld; - TempSlot = serverSlot - EQEmu::invslot::WORLD_BEGIN; - RoFSlot.Slot = TempSlot; + RoFSlot.Slot = serverSlot - EQEmu::invslot::WORLD_BEGIN; } - Log(Logs::General, Logs::Netcode, "[ERROR] Convert Server Slot %i to RoF Slots: Type %i, Unk2 %i, Main %i, Sub %i, Aug %i, Unk1 %i", serverSlot, RoFSlot.Type, RoFSlot.Unknown02, RoFSlot.Slot, RoFSlot.SubIndex, RoFSlot.AugIndex, RoFSlot.Unknown01); + Log(Logs::Detail, Logs::Netcode, "Convert Server Slot %i to RoF Slot [%i, %i, %i, %i] (unk2: %i, unk1: %i)", + serverSlot, RoFSlot.Type, RoFSlot.Slot, RoFSlot.SubIndex, RoFSlot.AugIndex, RoFSlot.Unknown02, RoFSlot.Unknown01); return RoFSlot; } - static inline structs::TypelessInventorySlot_Struct ServerToRoFTypelessSlot(uint32 serverSlot) + static inline structs::InventorySlot_Struct ServerToRoFCorpseSlot(uint32 serverCorpseSlot) + { + structs::InventorySlot_Struct RoFSlot; + RoFSlot.Type = invtype::TYPE_INVALID; + RoFSlot.Unknown02 = INULL; + RoFSlot.Slot = ServerToRoFCorpseMainSlot(serverCorpseSlot); + RoFSlot.SubIndex = invbag::SLOT_INVALID; + RoFSlot.AugIndex = invaug::SOCKET_INVALID; + RoFSlot.Unknown01 = INULL; + + if (RoFSlot.Slot != invslot::SLOT_INVALID) + RoFSlot.Type = invtype::typeCorpse; + + Log(Logs::Detail, Logs::Netcode, "Convert Server Corpse Slot %i to RoF Corpse Slot [%i, %i, %i, %i] (unk2: %i, unk1: %i)", + serverCorpseSlot, RoFSlot.Type, RoFSlot.Slot, RoFSlot.SubIndex, RoFSlot.AugIndex, RoFSlot.Unknown02, RoFSlot.Unknown01); + + return RoFSlot; + } + + static inline uint32 ServerToRoFCorpseMainSlot(uint32 serverCorpseSlot) + { + uint32 RoFSlot = invslot::SLOT_INVALID; + + if (serverCorpseSlot <= EQEmu::invslot::CORPSE_END && serverCorpseSlot >= EQEmu::invslot::CORPSE_BEGIN) { + RoFSlot = serverCorpseSlot; + } + + Log(Logs::Detail, Logs::Netcode, "Convert Server Corpse Slot %i to RoF Corpse Main Slot %i", serverCorpseSlot, RoFSlot); + + return RoFSlot; + } + + static inline structs::TypelessInventorySlot_Struct ServerToRoFTypelessSlot(uint32 serverSlot, int16 serverType) { structs::TypelessInventorySlot_Struct RoFSlot; - RoFSlot.Slot = INVALID_INDEX; - RoFSlot.SubIndex = INVALID_INDEX; - RoFSlot.AugIndex = INVALID_INDEX; - RoFSlot.Unknown01 = 0; + RoFSlot.Slot = invslot::SLOT_INVALID; + RoFSlot.SubIndex = invbag::SLOT_INVALID; + RoFSlot.AugIndex = invaug::SOCKET_INVALID; + RoFSlot.Unknown01 = INULL; - uint32 TempSlot = 0; + uint32 TempSlot = EQEmu::invslot::SLOT_INVALID; - if (serverSlot < 56 || serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE) { // (< 52) - RoFSlot.Slot = serverSlot; + if (serverType == EQEmu::invtype::typePossessions) { + if (serverSlot < EQEmu::invtype::POSSESSIONS_SIZE) { + RoFSlot.Slot = serverSlot; + } - if (serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE) - RoFSlot.Slot = invslot::slotPowerSource; + else if (serverSlot <= EQEmu::invbag::CURSOR_BAG_END && serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { + TempSlot = serverSlot - EQEmu::invbag::GENERAL_BAGS_BEGIN; - else if (serverSlot >= EQEmu::invslot::slotCursor) // Cursor and Extended Corpse Inventory - RoFSlot.Slot += 3; - - else if (serverSlot >= EQEmu::invslot::slotAmmo) // Ammo and Personl Inventory - RoFSlot.Slot += 1; - - /*else if (ServerSlot >= MainCursor) { // Cursor - RoFSlot.MainSlot = slots::MainCursor; - - if (ServerSlot > 30) - RoFSlot.SubSlot = (ServerSlot + 3) - 33; - }*/ + RoFSlot.Slot = invslot::GENERAL_BEGIN + (TempSlot / EQEmu::invbag::SLOT_COUNT); + RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot - invslot::GENERAL_BEGIN) * EQEmu::invbag::SLOT_COUNT); + } } - else if (serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::invbag::CURSOR_BAG_END) { - TempSlot = serverSlot - 1; - RoFSlot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 2; - RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot + 2) * EQEmu::invbag::SLOT_COUNT); - } - - Log(Logs::General, Logs::Netcode, "[ERROR] Convert Server Slot %i to RoF Slots: Main %i, Sub %i, Aug %i, Unk1 %i", serverSlot, RoFSlot.Slot, RoFSlot.SubIndex, RoFSlot.AugIndex, RoFSlot.Unknown01); + Log(Logs::Detail, Logs::Netcode, "Convert Server Slot %i to RoF Typeless Slot [%i, %i, %i] (implied type: %i, unk1: %i)", + serverSlot, RoFSlot.Slot, RoFSlot.SubIndex, RoFSlot.AugIndex, serverType, RoFSlot.Unknown01); return RoFSlot; } - static inline uint32 ServerToRoFCorpseSlot(uint32 serverCorpseSlot) - { - return (serverCorpseSlot + 1); - } - static inline uint32 RoFToServerSlot(structs::InventorySlot_Struct rofSlot) { - uint32 ServerSlot = INVALID_INDEX; - uint32 TempSlot = 0; + if (rofSlot.AugIndex < invaug::SOCKET_INVALID || rofSlot.AugIndex >= invaug::SOCKET_COUNT) { + Log(Logs::Detail, Logs::Netcode, "Convert RoF Slot [%i, %i, %i, %i] (unk2: %i, unk1: %i) to Server Slot %i", + rofSlot.Type, rofSlot.Slot, rofSlot.SubIndex, rofSlot.AugIndex, rofSlot.Unknown02, rofSlot.Unknown01, EQEmu::invslot::SLOT_INVALID); - if (rofSlot.Type == invtype::typePossessions && rofSlot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 51) - if (rofSlot.Slot == invslot::slotPowerSource) - TempSlot = EQEmu::invslot::SLOT_POWER_SOURCE; - - else if (rofSlot.Slot >= invslot::slotCursor) // Cursor and Extended Corpse Inventory - TempSlot = rofSlot.Slot - 3; - - /*else if (RoFSlot.MainSlot == slots::MainGeneral9 || RoFSlot.MainSlot == slots::MainGeneral10) { // 9th and 10th RoF inventory/corpse slots - // Need to figure out what to do when we get these - - // The slot range of 0 - client_max is cross-utilized between player inventory and corpse inventory. - // In the case of RoF, player inventory is addressed as 0 - 33 and corpse inventory is addressed as 23 - 56. - // We 'could' assign the two new inventory slots as 9997 and 9998, and then work around their bag - // slot assignments, but doing so may disrupt our ability to utilize the corpse looting range properly. - - // For now, it's probably best to leave as-is and let this work itself out in the inventory rework. - }*/ - - else if (rofSlot.Slot >= invslot::slotAmmo) // Ammo and Main Inventory - TempSlot = rofSlot.Slot - 1; - - else // Worn Slots - TempSlot = rofSlot.Slot; - - if (rofSlot.SubIndex >= EQEmu::invbag::SLOT_BEGIN) // Bag Slots - TempSlot = ((TempSlot + 3) * EQEmu::invbag::SLOT_COUNT) + rofSlot.SubIndex + 1; - - ServerSlot = TempSlot; + return EQEmu::invslot::SLOT_INVALID; } - else if (rofSlot.Type == invtype::typeBank) { - TempSlot = EQEmu::invslot::BANK_BEGIN; + uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; + uint32 TempSlot = invslot::SLOT_INVALID; - if (rofSlot.SubIndex >= EQEmu::invbag::SLOT_BEGIN) - TempSlot += ((rofSlot.Slot + 3) * EQEmu::invbag::SLOT_COUNT) + rofSlot.SubIndex + 1; + switch (rofSlot.Type) { + case invtype::typePossessions: { + if (rofSlot.Slot >= invslot::POSSESSIONS_BEGIN && rofSlot.Slot <= invslot::POSSESSIONS_END) { + if (rofSlot.SubIndex == invbag::SLOT_INVALID) { + ServerSlot = rofSlot.Slot; + } - else - TempSlot += rofSlot.Slot; + else if (rofSlot.SubIndex >= invbag::SLOT_BEGIN && rofSlot.SubIndex <= invbag::SLOT_END) { + if (rofSlot.Slot < invslot::GENERAL_BEGIN) + return EQEmu::invslot::SLOT_INVALID; - ServerSlot = TempSlot; + TempSlot = (rofSlot.Slot - invslot::GENERAL_BEGIN) * invbag::SLOT_COUNT; + ServerSlot = EQEmu::invbag::GENERAL_BAGS_BEGIN + TempSlot + rofSlot.SubIndex; + } + } + + break; + } + case invtype::typeBank: { + if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::BANK_SIZE) { + if (rofSlot.SubIndex == invbag::SLOT_INVALID) { + ServerSlot = EQEmu::invslot::BANK_BEGIN + rofSlot.Slot; + } + + else if (rofSlot.SubIndex >= invbag::SLOT_BEGIN && rofSlot.SubIndex <= invbag::SLOT_END) { + TempSlot = rofSlot.Slot * invbag::SLOT_COUNT; + ServerSlot = EQEmu::invbag::BANK_BAGS_BEGIN + TempSlot + rofSlot.SubIndex; + } + } + + break; + } + case invtype::typeSharedBank: { + if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::SHARED_BANK_SIZE) { + if (rofSlot.SubIndex == invbag::SLOT_INVALID) { + ServerSlot = EQEmu::invslot::SHARED_BANK_BEGIN + rofSlot.Slot; + } + + else if (rofSlot.SubIndex >= invbag::SLOT_BEGIN && rofSlot.SubIndex <= invbag::SLOT_END) { + TempSlot = rofSlot.Slot * invbag::SLOT_COUNT; + ServerSlot = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + TempSlot + rofSlot.SubIndex; + } + } + + break; + } + case invtype::typeTrade: { + if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::TRADE_SIZE) { + if (rofSlot.SubIndex == invbag::SLOT_INVALID) { + ServerSlot = EQEmu::invslot::TRADE_BEGIN + rofSlot.Slot; + } + + else if (rofSlot.SubIndex >= invbag::SLOT_BEGIN && rofSlot.SubIndex <= invbag::SLOT_END) { + TempSlot = rofSlot.Slot * invbag::SLOT_COUNT; + ServerSlot = EQEmu::invbag::TRADE_BAGS_BEGIN + TempSlot + rofSlot.SubIndex; + } + } + + break; + } + case invtype::typeWorld: { + if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::WORLD_SIZE) { + ServerSlot = EQEmu::invslot::SHARED_BANK_BEGIN + rofSlot.Slot; + } + + break; + } + case invtype::typeLimbo: { + if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::LIMBO_SIZE) { + ServerSlot = EQEmu::invslot::slotCursor; + } + + break; + } + case invtype::typeTribute: { + if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::TRIBUTE_SIZE) { + ServerSlot = EQEmu::invslot::TRIBUTE_BEGIN + rofSlot.Slot; + } + + break; + } + case invtype::typeGuildTribute: { + if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::GUILD_TRIBUTE_SIZE) { + ServerSlot = EQEmu::invslot::GUILD_TRIBUTE_BEGIN + rofSlot.Slot; + } + + break; + } + case invtype::typeCorpse: { + if (rofSlot.Slot >= invslot::CORPSE_BEGIN && rofSlot.Slot <= invslot::CORPSE_END) { + ServerSlot = rofSlot.Slot; + } + + break; + } + default: { + + break; + } } - else if (rofSlot.Type == invtype::typeSharedBank) { - TempSlot = EQEmu::invslot::SHARED_BANK_BEGIN; - - if (rofSlot.SubIndex >= EQEmu::invbag::SLOT_BEGIN) - TempSlot += ((rofSlot.Slot + 3) * EQEmu::invbag::SLOT_COUNT) + rofSlot.SubIndex + 1; - - else - TempSlot += rofSlot.Slot; - - ServerSlot = TempSlot; - } - - else if (rofSlot.Type == invtype::typeTrade) { - TempSlot = EQEmu::invslot::TRADE_BEGIN; - - if (rofSlot.SubIndex >= EQEmu::invbag::SLOT_BEGIN) - TempSlot += ((rofSlot.Slot + 3) * EQEmu::invbag::SLOT_COUNT) + rofSlot.SubIndex + 1; - // OLD CODE: - //TempSlot += 100 + (RoFSlot.MainSlot * EQEmu::inventory::ContainerCount) + RoFSlot.SubSlot; - - else - TempSlot += rofSlot.Slot; - - ServerSlot = TempSlot; - } - - else if (rofSlot.Type == invtype::typeWorld) { - TempSlot = EQEmu::invslot::WORLD_BEGIN; - - if (rofSlot.Slot >= EQEmu::invbag::SLOT_BEGIN) - TempSlot += rofSlot.Slot; - - ServerSlot = TempSlot; - } - - /*else if (RoFSlot.SlotType == maps::MapLimbo) { // Cursor Buffer - TempSlot = 31; - - if (RoFSlot.MainSlot >= 0) - TempSlot += RoFSlot.MainSlot; - - ServerSlot = TempSlot; - }*/ - - else if (rofSlot.Type == invtype::typeGuildTribute) { - ServerSlot = INVALID_INDEX; - } - - Log(Logs::General, Logs::Netcode, "[ERROR] Convert RoF Slots: Type %i, Unk2 %i, Main %i, Sub %i, Aug %i, Unk1 %i to Server Slot %i", rofSlot.Type, rofSlot.Unknown02, rofSlot.Slot, rofSlot.SubIndex, rofSlot.AugIndex, rofSlot.Unknown01, ServerSlot); + Log(Logs::Detail, Logs::Netcode, "Convert RoF Slot [%i, %i, %i, %i] (unk2: %i, unk1: %i) to Server Slot %i", + rofSlot.Type, rofSlot.Slot, rofSlot.SubIndex, rofSlot.AugIndex, rofSlot.Unknown02, rofSlot.Unknown01, ServerSlot); return ServerSlot; } - static inline uint32 RoFToServerTypelessSlot(structs::TypelessInventorySlot_Struct rofSlot) + static inline uint32 RoFToServerCorpseSlot(structs::InventorySlot_Struct rofCorpseSlot) { - uint32 ServerSlot = INVALID_INDEX; - uint32 TempSlot = 0; + uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; - if (rofSlot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 33) - if (rofSlot.Slot == invslot::slotPowerSource) - TempSlot = EQEmu::invslot::SLOT_POWER_SOURCE; - - else if (rofSlot.Slot >= invslot::slotCursor) // Cursor and Extended Corpse Inventory - TempSlot = rofSlot.Slot - 3; - - /*else if (RoFSlot.MainSlot == slots::MainGeneral9 || RoFSlot.MainSlot == slots::MainGeneral10) { // 9th and 10th RoF inventory slots - // Need to figure out what to do when we get these - - // Same as above - }*/ - - else if (rofSlot.Slot >= invslot::slotAmmo) // Main Inventory and Ammo Slots - TempSlot = rofSlot.Slot - 1; - - else - TempSlot = rofSlot.Slot; - - if (rofSlot.SubIndex >= EQEmu::invbag::SLOT_BEGIN) // Bag Slots - TempSlot = ((TempSlot + 3) * EQEmu::invbag::SLOT_COUNT) + rofSlot.SubIndex + 1; - - ServerSlot = TempSlot; + if (rofCorpseSlot.Type != invtype::typeCorpse || rofCorpseSlot.SubIndex != invbag::SLOT_INVALID || rofCorpseSlot.AugIndex != invaug::SOCKET_INVALID) { + ServerSlot = EQEmu::invslot::SLOT_INVALID; } - Log(Logs::General, Logs::Netcode, "[ERROR] Convert RoF Slots: Main %i, Sub %i, Aug %i, Unk1 %i to Server Slot %i", rofSlot.Slot, rofSlot.SubIndex, rofSlot.AugIndex, rofSlot.Unknown01, ServerSlot); + else { + ServerSlot = RoFToServerCorpseMainSlot(rofCorpseSlot.Slot); + } + + Log(Logs::Detail, Logs::Netcode, "Convert RoF Slot [%i, %i, %i, %i] (unk2: %i, unk1: %i) to Server Slot %i", + rofCorpseSlot.Type, rofCorpseSlot.Slot, rofCorpseSlot.SubIndex, rofCorpseSlot.AugIndex, rofCorpseSlot.Unknown02, rofCorpseSlot.Unknown01, ServerSlot); return ServerSlot; } - static inline uint32 RoFToServerCorpseSlot(uint32 rofCorpseSlot) + static inline uint32 RoFToServerCorpseMainSlot(uint32 rofCorpseSlot) { - return (rofCorpseSlot - 1); + uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; + + if (rofCorpseSlot <= invslot::CORPSE_END && rofCorpseSlot >= invslot::CORPSE_BEGIN) { + ServerSlot = rofCorpseSlot; + } + + Log(Logs::Detail, Logs::Netcode, "Convert RoF Corpse Main Slot %i to Server Corpse Slot %i", rofCorpseSlot, ServerSlot); + + return ServerSlot; + } + + static inline uint32 RoFToServerTypelessSlot(structs::TypelessInventorySlot_Struct rofSlot, int16 rofType) + { + if (rofSlot.AugIndex < invaug::SOCKET_INVALID || rofSlot.AugIndex >= invaug::SOCKET_COUNT) { + Log(Logs::Detail, Logs::Netcode, "Convert RoF Typeless Slot [%i, %i, %i] (implied type: %i, unk1: %i) to Server Slot %i", + rofSlot.Slot, rofSlot.SubIndex, rofSlot.AugIndex, rofType, rofSlot.Unknown01, EQEmu::invslot::SLOT_INVALID); + + return EQEmu::invslot::SLOT_INVALID; + } + + uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; + uint32 TempSlot = invslot::SLOT_INVALID; + + switch (rofType) { + case invtype::typePossessions: { + if (rofSlot.Slot >= invslot::POSSESSIONS_BEGIN && rofSlot.Slot <= invslot::POSSESSIONS_END) { + if (rofSlot.SubIndex == invbag::SLOT_INVALID) { + ServerSlot = rofSlot.Slot; + } + + else if (rofSlot.SubIndex >= invbag::SLOT_BEGIN && rofSlot.SubIndex <= invbag::SLOT_END) { + if (rofSlot.Slot < invslot::GENERAL_BEGIN) + return EQEmu::invslot::SLOT_INVALID; + + TempSlot = (rofSlot.Slot - invslot::GENERAL_BEGIN) * invbag::SLOT_COUNT; + ServerSlot = EQEmu::invbag::GENERAL_BAGS_BEGIN + TempSlot + rofSlot.SubIndex; + } + } + + break; + } + case invtype::typeBank: { + if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::BANK_SIZE) { + if (rofSlot.SubIndex == invbag::SLOT_INVALID) { + ServerSlot = EQEmu::invslot::BANK_BEGIN + rofSlot.Slot; + } + + else if (rofSlot.SubIndex >= invbag::SLOT_BEGIN && rofSlot.SubIndex <= invbag::SLOT_END) { + TempSlot = rofSlot.Slot * invbag::SLOT_COUNT; + ServerSlot = EQEmu::invbag::BANK_BAGS_BEGIN + TempSlot + rofSlot.SubIndex; + } + } + + break; + } + case invtype::typeSharedBank: { + if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::SHARED_BANK_SIZE) { + if (rofSlot.SubIndex == invbag::SLOT_INVALID) { + ServerSlot = EQEmu::invslot::SHARED_BANK_BEGIN + rofSlot.Slot; + } + + else if (rofSlot.SubIndex >= invbag::SLOT_BEGIN && rofSlot.SubIndex <= invbag::SLOT_END) { + TempSlot = rofSlot.Slot * invbag::SLOT_COUNT; + ServerSlot = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + TempSlot + rofSlot.SubIndex; + } + } + + break; + } + case invtype::typeTrade: { + if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::TRADE_SIZE) { + if (rofSlot.SubIndex == invbag::SLOT_INVALID) { + ServerSlot = EQEmu::invslot::TRADE_BEGIN + rofSlot.Slot; + } + + else if (rofSlot.SubIndex >= invbag::SLOT_BEGIN && rofSlot.SubIndex <= invbag::SLOT_END) { + TempSlot = rofSlot.Slot * invbag::SLOT_COUNT; + ServerSlot = EQEmu::invbag::TRADE_BAGS_BEGIN + TempSlot + rofSlot.SubIndex; + } + } + + break; + } + case invtype::typeWorld: { + if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::WORLD_SIZE) { + ServerSlot = EQEmu::invslot::SHARED_BANK_BEGIN + rofSlot.Slot; + } + + break; + } + case invtype::typeLimbo: { + if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::LIMBO_SIZE) { + ServerSlot = EQEmu::invslot::slotCursor; + } + + break; + } + case invtype::typeTribute: { + if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::TRIBUTE_SIZE) { + ServerSlot = EQEmu::invslot::TRIBUTE_BEGIN + rofSlot.Slot; + } + + break; + } + case invtype::typeGuildTribute: { + if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::GUILD_TRIBUTE_SIZE) { + ServerSlot = EQEmu::invslot::GUILD_TRIBUTE_BEGIN + rofSlot.Slot; + } + + break; + } + case invtype::typeCorpse: { + if (rofSlot.Slot >= invslot::CORPSE_BEGIN && rofSlot.Slot <= invslot::CORPSE_END) { + ServerSlot = rofSlot.Slot; + } + + break; + } + default: { + + break; + } + } + + Log(Logs::Detail, Logs::Netcode, "Convert RoF Typeless Slot [%i, %i, %i] (implied type: %i, unk1: %i) to Server Slot %i", + rofSlot.Slot, rofSlot.SubIndex, rofSlot.AugIndex, rofType, rofSlot.Unknown01, ServerSlot); + + return ServerSlot; } static inline void ServerToRoFSayLink(std::string& rofSayLink, const std::string& serverSayLink) diff --git a/common/patches/rof2.cpp b/common/patches/rof2.cpp index 9cba1d0b4..6dad7383a 100644 --- a/common/patches/rof2.cpp +++ b/common/patches/rof2.cpp @@ -48,15 +48,17 @@ namespace RoF2 void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id, uint8 depth, ItemPacketType packet_type); // server to client inventory location converters - static inline structs::InventorySlot_Struct ServerToRoF2Slot(uint32 serverSlot, ItemPacketType PacketType = ItemPacketInvalid); - static inline structs::TypelessInventorySlot_Struct ServerToRoF2TypelessSlot(uint32 serverSlot); - static inline uint32 ServerToRoF2CorpseSlot(uint32 serverCorpseSlot); - + static inline structs::InventorySlot_Struct ServerToRoF2Slot(uint32 serverSlot); + static inline structs::InventorySlot_Struct ServerToRoF2CorpseSlot(uint32 serverCorpseSlot); + static inline uint32 ServerToRoF2CorpseMainSlot(uint32 serverCorpseSlot); + static inline structs::TypelessInventorySlot_Struct ServerToRoF2TypelessSlot(uint32 serverSlot, int16 serverType); + // client to server inventory location converters - static inline uint32 RoF2ToServerSlot(structs::InventorySlot_Struct rof2Slot, ItemPacketType PacketType = ItemPacketInvalid); - static inline uint32 RoF2ToServerTypelessSlot(structs::TypelessInventorySlot_Struct rof2Slot); - static inline uint32 RoF2ToServerCorpseSlot(uint32 rof2CorpseSlot); - + static inline uint32 RoF2ToServerSlot(structs::InventorySlot_Struct rof2Slot); + static inline uint32 RoF2ToServerCorpseSlot(structs::InventorySlot_Struct rof2CorpseSlot); + static inline uint32 RoF2ToServerCorpseMainSlot(uint32 rof2CorpseSlot); + static inline uint32 RoF2ToServerTypelessSlot(structs::TypelessInventorySlot_Struct rof2Slot, int16 rof2Type); + // server to client say link converter static inline void ServerToRoF2SayLink(std::string& rof2SayLink, const std::string& serverSayLink); @@ -260,7 +262,7 @@ namespace RoF2 eq->unknown000 = 1; OUT(npcid); - eq->inventory_slot = ServerToRoF2TypelessSlot(emu->slot); + eq->inventory_slot = ServerToRoF2TypelessSlot(emu->slot, EQEmu::invtype::typePossessions); OUT(charges); OUT(sell_price); @@ -313,7 +315,7 @@ namespace RoF2 SETUP_DIRECT_ENCODE(AltCurrencySellItem_Struct, structs::AltCurrencySellItem_Struct); OUT(merchant_entity_id); - eq->inventory_slot = ServerToRoF2TypelessSlot(emu->slot_id); + eq->inventory_slot = ServerToRoF2TypelessSlot(emu->slot_id, EQEmu::invtype::typePossessions); OUT(charges); OUT(cost); @@ -337,7 +339,7 @@ namespace RoF2 ENCODE_LENGTH_EXACT(ApplyPoison_Struct); SETUP_DIRECT_ENCODE(ApplyPoison_Struct, structs::ApplyPoison_Struct); - eq->inventorySlot = ServerToRoF2TypelessSlot(emu->inventorySlot); + eq->inventorySlot = ServerToRoF2TypelessSlot(emu->inventorySlot, EQEmu::invtype::typePossessions); OUT(success); FINISH_ENCODE(); @@ -655,7 +657,7 @@ namespace RoF2 for (int index = 0; index < item_count; ++index, ++eq) { SerializeItem(ob, (const EQEmu::ItemInstance*)eq->inst, eq->slot_id, 0, ItemPacketCharInventory); if (ob.tellp() == last_pos) - Log(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id); + Log(Logs::General, Logs::Netcode, "RoF2::ENCODE(OP_CharInventory) Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id); last_pos = ob.tellp(); } @@ -735,7 +737,12 @@ namespace RoF2 FINISH_ENCODE(); } - ENCODE(OP_DeleteCharge) { ENCODE_FORWARD(OP_MoveItem); } + ENCODE(OP_DeleteCharge) + { + Log(Logs::Moderate, Logs::Netcode, "RoF2::ENCODE(OP_DeleteCharge)"); + + ENCODE_FORWARD(OP_MoveItem); + } ENCODE(OP_DeleteItem) { @@ -1582,7 +1589,7 @@ namespace RoF2 SerializeItem(ob, (const EQEmu::ItemInstance*)int_struct->inst, int_struct->slot_id, 0, old_item_pkt->PacketType); if (ob.tellp() == last_pos) { - Log(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d.", int_struct->slot_id); + Log(Logs::General, Logs::Netcode, "RoF2::ENCODE(OP_ItemPacket) Serialization failed on item slot %d.", int_struct->slot_id); delete in; return; } @@ -1655,9 +1662,11 @@ namespace RoF2 ENCODE_LENGTH_EXACT(LootingItem_Struct); SETUP_DIRECT_ENCODE(LootingItem_Struct, structs::LootingItem_Struct); + Log(Logs::Moderate, Logs::Netcode, "RoF2::ENCODE(OP_LootItem)"); + OUT(lootee); OUT(looter); - eq->slot_id = ServerToRoF2CorpseSlot(emu->slot_id); + eq->slot_id = ServerToRoF2CorpseMainSlot(emu->slot_id); OUT(auto_loot); FINISH_ENCODE(); @@ -1825,6 +1834,8 @@ namespace RoF2 ENCODE_LENGTH_EXACT(MoveItem_Struct); SETUP_DIRECT_ENCODE(MoveItem_Struct, structs::MoveItem_Struct); + Log(Logs::Moderate, Logs::Netcode, "RoF2::ENCODE(OP_MoveItem)"); + eq->from_slot = ServerToRoF2Slot(emu->from_slot); eq->to_slot = ServerToRoF2Slot(emu->to_slot); OUT(number_in_stack); @@ -2303,7 +2314,7 @@ namespace RoF2 outapp->WriteUInt32(profile::BANDOLIERS_SIZE); - // Copy bandoliers where server and client indexes converge + // Copy bandoliers where server and client indices converge for (uint32 r = 0; r < EQEmu::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) { outapp->WriteString(emu->bandoliers[r].Name); for (uint32 j = 0; j < profile::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true @@ -2318,7 +2329,7 @@ namespace RoF2 } } } - // Nullify bandoliers where server and client indexes diverge, with a client bias + // Nullify bandoliers where server and client indices diverge, with a client bias for (uint32 r = EQEmu::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) { outapp->WriteString(""); for (uint32 j = 0; j < profile::BANDOLIER_ITEM_COUNT; ++j) { // Will need adjusting if 'server != client' is ever true @@ -2330,7 +2341,7 @@ namespace RoF2 outapp->WriteUInt32(profile::POTION_BELT_SIZE); - // Copy potion belt where server and client indexes converge + // Copy potion belt where server and client indices converge for (uint32 r = 0; r < EQEmu::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++r) { outapp->WriteString(emu->potionbelt.Items[r].Name); outapp->WriteUInt32(emu->potionbelt.Items[r].ID); @@ -2342,7 +2353,7 @@ namespace RoF2 outapp->WriteSInt32(-1); } } - // Nullify potion belt where server and client indexes diverge, with a client bias + // Nullify potion belt where server and client indices diverge, with a client bias for (uint32 r = EQEmu::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) { outapp->WriteString(""); outapp->WriteUInt32(0); @@ -3110,7 +3121,7 @@ namespace RoF2 SETUP_DIRECT_ENCODE(Merchant_Purchase_Struct, structs::Merchant_Purchase_Struct); OUT(npcid); - eq->inventory_slot = ServerToRoF2TypelessSlot(emu->itemslot); + eq->inventory_slot = ServerToRoF2TypelessSlot(emu->itemslot, EQEmu::invtype::typePossessions); //OUT(itemslot); OUT(quantity); OUT(price); @@ -4299,7 +4310,7 @@ namespace RoF2 SETUP_DIRECT_DECODE(Adventure_Sell_Struct, structs::Adventure_Sell_Struct); IN(npcid); - emu->slot = RoF2ToServerTypelessSlot(eq->inventory_slot); + emu->slot = RoF2ToServerTypelessSlot(eq->inventory_slot, invtype::typePossessions); IN(charges); IN(sell_price); @@ -4312,7 +4323,7 @@ namespace RoF2 SETUP_DIRECT_DECODE(AltCurrencySellItem_Struct, structs::AltCurrencySellItem_Struct); IN(merchant_entity_id); - emu->slot_id = RoF2ToServerTypelessSlot(eq->inventory_slot); + emu->slot_id = RoF2ToServerTypelessSlot(eq->inventory_slot, invtype::typePossessions); IN(charges); IN(cost); @@ -4325,7 +4336,7 @@ namespace RoF2 SETUP_DIRECT_DECODE(AltCurrencySelectItem_Struct, structs::AltCurrencySelectItem_Struct); IN(merchant_entity_id); - emu->slot_id = RoF2ToServerTypelessSlot(eq->inventory_slot); + emu->slot_id = RoF2ToServerTypelessSlot(eq->inventory_slot, invtype::typePossessions); FINISH_DIRECT_DECODE(); } @@ -4347,7 +4358,7 @@ namespace RoF2 DECODE_LENGTH_EXACT(structs::ApplyPoison_Struct); SETUP_DIRECT_DECODE(ApplyPoison_Struct, structs::ApplyPoison_Struct); - emu->inventorySlot = RoF2ToServerTypelessSlot(eq->inventorySlot); + emu->inventorySlot = RoF2ToServerTypelessSlot(eq->inventorySlot, invtype::typePossessions); IN(success); FINISH_DIRECT_DECODE(); @@ -4981,9 +4992,11 @@ namespace RoF2 DECODE_LENGTH_EXACT(structs::LootingItem_Struct); SETUP_DIRECT_DECODE(LootingItem_Struct, structs::LootingItem_Struct); + Log(Logs::Moderate, Logs::Netcode, "RoF2::DECODE(OP_LootItem)"); + IN(lootee); IN(looter); - emu->slot_id = RoF2ToServerCorpseSlot(eq->slot_id); + emu->slot_id = RoF2ToServerCorpseMainSlot(eq->slot_id); IN(auto_loot); FINISH_DIRECT_DECODE(); @@ -4994,10 +5007,13 @@ namespace RoF2 DECODE_LENGTH_EXACT(structs::MoveItem_Struct); SETUP_DIRECT_DECODE(MoveItem_Struct, structs::MoveItem_Struct); - Log(Logs::General, Logs::Netcode, "[RoF2] MoveItem SlotType from %i to %i, MainSlot from %i to %i, SubSlot from %i to %i, AugSlot from %i to %i, Unknown01 from %i to %i, Number %u", eq->from_slot.Type, eq->to_slot.Type, eq->from_slot.Slot, eq->to_slot.Slot, eq->from_slot.SubIndex, eq->to_slot.SubIndex, eq->from_slot.AugIndex, eq->to_slot.AugIndex, eq->from_slot.Unknown01, eq->to_slot.Unknown01, eq->number_in_stack); + Log(Logs::Moderate, Logs::Netcode, "RoF2::DECODE(OP_MoveItem)"); + emu->from_slot = RoF2ToServerSlot(eq->from_slot); emu->to_slot = RoF2ToServerSlot(eq->to_slot); IN(number_in_stack); + + //Log(Logs::General, Logs::Netcode, "[RoF2] MoveItem Slot from %u to %u, Number %u", emu->from_slot, emu->to_slot, emu->number_in_stack); FINISH_DIRECT_DECODE(); } @@ -5144,7 +5160,7 @@ namespace RoF2 SETUP_DIRECT_DECODE(Merchant_Purchase_Struct, structs::Merchant_Purchase_Struct); IN(npcid); - emu->itemslot = RoF2ToServerTypelessSlot(eq->inventory_slot); + emu->itemslot = RoF2ToServerTypelessSlot(eq->inventory_slot, invtype::typePossessions); //IN(itemslot); IN(quantity); IN(price); @@ -5387,8 +5403,16 @@ namespace RoF2 hdr.stacksize = (inst->IsStackable() ? ((inst->GetCharges() > 1000) ? 0xFFFFFFFF : inst->GetCharges()) : 1); hdr.unknown004 = 0; - structs::InventorySlot_Struct slot_id = ServerToRoF2Slot(slot_id_in, packet_type); - + structs::InventorySlot_Struct slot_id; + switch (packet_type) { + case ItemPacketLoot: + slot_id = ServerToRoF2CorpseSlot(slot_id_in); + break; + default: + slot_id = ServerToRoF2Slot(slot_id_in); + break; + } + hdr.slot_type = (inst->GetMerchantSlot() ? invtype::typeMerchant : slot_id.Type); hdr.main_slot = (inst->GetMerchantSlot() ? inst->GetMerchantSlot() : slot_id.Slot); hdr.sub_slot = (inst->GetMerchantSlot() ? 0xffff : slot_id.SubIndex); @@ -5483,7 +5507,7 @@ namespace RoF2 ibs.nodrop = item->NoDrop; ibs.attune = item->Attuneable; ibs.size = item->Size; - ibs.slots = SwapBits21And22(item->Slots); + ibs.slots = item->Slots; ibs.price = item->Price; ibs.icon = item->Icon; ibs.unknown1 = 1; @@ -5797,330 +5821,450 @@ namespace RoF2 ob.write((const char*)&subitem_count, sizeof(uint32)); - for (uint32 index = EQEmu::invbag::SLOT_BEGIN; index <= EQEmu::invbag::SLOT_END; ++index) { - EQEmu::ItemInstance* sub = inst->GetItem(index); - if (!sub) - continue; + // moved outside of loop since it is not modified within that scope + int16 SubSlotNumber = EQEmu::invbag::SLOT_INVALID; - int SubSlotNumber = INVALID_INDEX; - if (slot_id_in >= EQEmu::invslot::GENERAL_BEGIN && slot_id_in <= EQEmu::invslot::GENERAL_END) - SubSlotNumber = (((slot_id_in + 3) * EQEmu::invbag::SLOT_COUNT) + index + 1); - else if (slot_id_in >= EQEmu::invslot::BANK_BEGIN && slot_id_in <= EQEmu::invslot::BANK_END) - SubSlotNumber = (((slot_id_in - EQEmu::invslot::BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::BANK_BAGS_BEGIN + index); - else if (slot_id_in >= EQEmu::invslot::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::invslot::SHARED_BANK_END) - SubSlotNumber = (((slot_id_in - EQEmu::invslot::SHARED_BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + index); - else - SubSlotNumber = slot_id_in; + if (slot_id_in <= EQEmu::invslot::GENERAL_END && slot_id_in >= EQEmu::invslot::GENERAL_BEGIN) + SubSlotNumber = EQEmu::invbag::GENERAL_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::GENERAL_BEGIN) * EQEmu::invbag::SLOT_COUNT); + else if (slot_id_in == EQEmu::invslot::slotCursor) + SubSlotNumber = EQEmu::invbag::CURSOR_BAG_BEGIN; + else if (slot_id_in <= EQEmu::invslot::BANK_END && slot_id_in >= EQEmu::invslot::BANK_BEGIN) + SubSlotNumber = EQEmu::invbag::BANK_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT); + else if (slot_id_in <= EQEmu::invslot::SHARED_BANK_END && slot_id_in >= EQEmu::invslot::SHARED_BANK_BEGIN) + SubSlotNumber = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::SHARED_BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT); + else + SubSlotNumber = slot_id_in; // not sure if this is the best way to handle this..leaving for now - ob.write((const char*)&index, sizeof(uint32)); + if (SubSlotNumber != EQEmu::invbag::SLOT_INVALID) { + for (uint32 index = EQEmu::invbag::SLOT_BEGIN; index <= EQEmu::invbag::SLOT_END; ++index) { + EQEmu::ItemInstance* sub = inst->GetItem(index); + if (!sub) + continue; - SerializeItem(ob, sub, SubSlotNumber, (depth + 1), packet_type); - ++subitem_count; + ob.write((const char*)&index, sizeof(uint32)); + + SerializeItem(ob, sub, SubSlotNumber, (depth + 1), packet_type); + ++subitem_count; + } + + if (subitem_count) + ob.overwrite(count_pos, (const char*)&subitem_count, sizeof(uint32)); } - - if (subitem_count) - ob.overwrite(count_pos, (const char*)&subitem_count, sizeof(uint32)); } - static inline structs::InventorySlot_Struct ServerToRoF2Slot(uint32 serverSlot, ItemPacketType PacketType) + static inline structs::InventorySlot_Struct ServerToRoF2Slot(uint32 serverSlot) { structs::InventorySlot_Struct RoF2Slot; - RoF2Slot.Type = INVALID_INDEX; - RoF2Slot.Unknown02 = 0; - RoF2Slot.Slot = INVALID_INDEX; - RoF2Slot.SubIndex = INVALID_INDEX; - RoF2Slot.AugIndex = INVALID_INDEX; - RoF2Slot.Unknown01 = 0; + RoF2Slot.Type = invtype::TYPE_INVALID; + RoF2Slot.Unknown02 = INULL; + RoF2Slot.Slot = invslot::SLOT_INVALID; + RoF2Slot.SubIndex = invbag::SLOT_INVALID; + RoF2Slot.AugIndex = invaug::SOCKET_INVALID; + RoF2Slot.Unknown01 = INULL; - uint32 TempSlot = 0; + uint32 TempSlot = EQEmu::invslot::SLOT_INVALID; - if (serverSlot < 56 || serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE) { // Main Inventory and Cursor - if (PacketType == ItemPacketLoot) - { - RoF2Slot.Type = invtype::typeCorpse; - RoF2Slot.Slot = serverSlot - EQEmu::invslot::CORPSE_BEGIN; - } - else - { - RoF2Slot.Type = invtype::typePossessions; - RoF2Slot.Slot = serverSlot; - } - - if (serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE) - RoF2Slot.Slot = invslot::slotPowerSource; - - else if (serverSlot >= EQEmu::invslot::slotCursor && PacketType != ItemPacketLoot) // Cursor and Extended Corpse Inventory - RoF2Slot.Slot += 3; - - else if (serverSlot >= EQEmu::invslot::slotAmmo) // (> 20) - RoF2Slot.Slot += 1; - } - - /*else if (ServerSlot < 51) { // Cursor Buffer - RoF2Slot.SlotType = maps::MapLimbo; - RoF2Slot.MainSlot = ServerSlot - 31; - }*/ - - else if (serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::invbag::CURSOR_BAG_END) { // (> 250 && < 341) + if (serverSlot < EQEmu::invtype::POSSESSIONS_SIZE) { RoF2Slot.Type = invtype::typePossessions; - TempSlot = serverSlot - 1; - RoF2Slot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 2; - RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::invbag::SLOT_COUNT); - - if (RoF2Slot.Slot >= invslot::slotGeneral9) // (> 30) - RoF2Slot.Slot = invslot::slotCursor; + RoF2Slot.Slot = serverSlot; } - else if (serverSlot >= EQEmu::invslot::TRIBUTE_BEGIN && serverSlot <= EQEmu::invslot::TRIBUTE_END) { // Tribute + else if (serverSlot <= EQEmu::invbag::CURSOR_BAG_END && serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { + TempSlot = serverSlot - EQEmu::invbag::GENERAL_BAGS_BEGIN; + + RoF2Slot.Type = invtype::typePossessions; + RoF2Slot.Slot = invslot::GENERAL_BEGIN + (TempSlot / EQEmu::invbag::SLOT_COUNT); + RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot - invslot::GENERAL_BEGIN) * EQEmu::invbag::SLOT_COUNT); + } + + else if (serverSlot <= EQEmu::invslot::TRIBUTE_END && serverSlot >= EQEmu::invslot::TRIBUTE_BEGIN) { RoF2Slot.Type = invtype::typeTribute; RoF2Slot.Slot = serverSlot - EQEmu::invslot::TRIBUTE_BEGIN; } - else if (serverSlot >= EQEmu::invslot::BANK_BEGIN && serverSlot <= EQEmu::invbag::BANK_BAGS_END) { + else if (serverSlot <= EQEmu::invslot::GUILD_TRIBUTE_END && serverSlot >= EQEmu::invslot::GUILD_TRIBUTE_BEGIN) { + RoF2Slot.Type = invtype::typeGuildTribute; + RoF2Slot.Slot = serverSlot - EQEmu::invslot::GUILD_TRIBUTE_BEGIN; + } + + else if (serverSlot <= EQEmu::invslot::BANK_END && serverSlot >= EQEmu::invslot::BANK_BEGIN) { RoF2Slot.Type = invtype::typeBank; - TempSlot = serverSlot - EQEmu::invslot::BANK_BEGIN; - RoF2Slot.Slot = TempSlot; - - if (TempSlot > 30) { // (> 30) - RoF2Slot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 3; - RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::invbag::SLOT_COUNT); - } + RoF2Slot.Slot = serverSlot - EQEmu::invslot::BANK_BEGIN; } - else if (serverSlot >= EQEmu::invslot::SHARED_BANK_BEGIN && serverSlot <= EQEmu::invbag::SHARED_BANK_BAGS_END) { + else if (serverSlot <= EQEmu::invbag::BANK_BAGS_END && serverSlot >= EQEmu::invbag::BANK_BAGS_BEGIN) { + TempSlot = serverSlot - EQEmu::invbag::BANK_BAGS_BEGIN; + + RoF2Slot.Type = invtype::typeBank; + RoF2Slot.Slot = TempSlot / EQEmu::invbag::SLOT_COUNT; + RoF2Slot.SubIndex = TempSlot - (RoF2Slot.Slot * EQEmu::invbag::SLOT_COUNT); + } + + else if (serverSlot <= EQEmu::invslot::SHARED_BANK_END && serverSlot >= EQEmu::invslot::SHARED_BANK_BEGIN) { RoF2Slot.Type = invtype::typeSharedBank; - TempSlot = serverSlot - EQEmu::invslot::SHARED_BANK_BEGIN; - RoF2Slot.Slot = TempSlot; - - if (TempSlot > 30) { // (> 30) - RoF2Slot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 3; - RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::invbag::SLOT_COUNT); - } + RoF2Slot.Slot = serverSlot - EQEmu::invslot::SHARED_BANK_BEGIN; } - else if (serverSlot >= EQEmu::invslot::TRADE_BEGIN && serverSlot <= EQEmu::invbag::TRADE_BAGS_END) { + else if (serverSlot <= EQEmu::invbag::SHARED_BANK_BAGS_END && serverSlot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN) { + TempSlot = serverSlot - EQEmu::invbag::SHARED_BANK_BAGS_BEGIN; + + RoF2Slot.Type = invtype::typeSharedBank; + RoF2Slot.Slot = TempSlot / EQEmu::invbag::SLOT_COUNT; + RoF2Slot.SubIndex = TempSlot - (RoF2Slot.Slot * EQEmu::invbag::SLOT_COUNT); + } + + else if (serverSlot <= EQEmu::invslot::TRADE_END && serverSlot >= EQEmu::invslot::TRADE_BEGIN) { RoF2Slot.Type = invtype::typeTrade; - TempSlot = serverSlot - EQEmu::invslot::TRADE_BEGIN; - RoF2Slot.Slot = TempSlot; - - if (TempSlot > 30) { - RoF2Slot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 3; - RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 3) * EQEmu::invbag::SLOT_COUNT); - } - - /* - // OLD CODE: - if (TempSlot > 99) { - if (TempSlot > 100) - RoF2Slot.MainSlot = int((TempSlot - 100) / 10); - - else - RoF2Slot.MainSlot = 0; - - RoF2Slot.SubSlot = TempSlot - (100 + RoF2Slot.MainSlot); - } - */ + RoF2Slot.Slot = serverSlot - EQEmu::invslot::TRADE_BEGIN; } - else if (serverSlot >= EQEmu::invslot::WORLD_BEGIN && serverSlot <= EQEmu::invslot::WORLD_END) { + else if (serverSlot <= EQEmu::invbag::TRADE_BAGS_END && serverSlot >= EQEmu::invbag::TRADE_BAGS_BEGIN) { + TempSlot = serverSlot - EQEmu::invbag::TRADE_BAGS_BEGIN; + + RoF2Slot.Type = invtype::typeTrade; + RoF2Slot.Slot = TempSlot / EQEmu::invbag::SLOT_COUNT; + RoF2Slot.SubIndex = TempSlot - (RoF2Slot.Slot * EQEmu::invbag::SLOT_COUNT); + } + + else if (serverSlot <= EQEmu::invslot::WORLD_END && serverSlot >= EQEmu::invslot::WORLD_BEGIN) { RoF2Slot.Type = invtype::typeWorld; - TempSlot = serverSlot - EQEmu::invslot::WORLD_BEGIN; - RoF2Slot.Slot = TempSlot; + RoF2Slot.Slot = serverSlot - EQEmu::invslot::WORLD_BEGIN; } - Log(Logs::General, Logs::Netcode, "[ERROR] Convert Server Slot %i to RoF2 Slots: Type %i, Unk2 %i, Main %i, Sub %i, Aug %i, Unk1 %i", serverSlot, RoF2Slot.Type, RoF2Slot.Unknown02, RoF2Slot.Slot, RoF2Slot.SubIndex, RoF2Slot.AugIndex, RoF2Slot.Unknown01); + Log(Logs::Detail, Logs::Netcode, "Convert Server Slot %i to RoF2 Slot [%i, %i, %i, %i] (unk2: %i, unk1: %i)", + serverSlot, RoF2Slot.Type, RoF2Slot.Slot, RoF2Slot.SubIndex, RoF2Slot.AugIndex, RoF2Slot.Unknown02, RoF2Slot.Unknown01); return RoF2Slot; } - static inline structs::TypelessInventorySlot_Struct ServerToRoF2TypelessSlot(uint32 serverSlot) + static inline structs::InventorySlot_Struct ServerToRoF2CorpseSlot(uint32 serverCorpseSlot) + { + structs::InventorySlot_Struct RoF2Slot; + RoF2Slot.Type = invtype::TYPE_INVALID; + RoF2Slot.Unknown02 = INULL; + RoF2Slot.Slot = ServerToRoF2CorpseMainSlot(serverCorpseSlot); + RoF2Slot.SubIndex = invbag::SLOT_INVALID; + RoF2Slot.AugIndex = invaug::SOCKET_INVALID; + RoF2Slot.Unknown01 = INULL; + + if (RoF2Slot.Slot != invslot::SLOT_INVALID) + RoF2Slot.Type = invtype::typeCorpse; + + Log(Logs::Detail, Logs::Netcode, "Convert Server Corpse Slot %i to RoF2 Corpse Slot [%i, %i, %i, %i] (unk2: %i, unk1: %i)", + serverCorpseSlot, RoF2Slot.Type, RoF2Slot.Slot, RoF2Slot.SubIndex, RoF2Slot.AugIndex, RoF2Slot.Unknown02, RoF2Slot.Unknown01); + + return RoF2Slot; + } + + static inline uint32 ServerToRoF2CorpseMainSlot(uint32 serverCorpseSlot) + { + uint32 RoF2Slot = invslot::SLOT_INVALID; + + if (serverCorpseSlot <= EQEmu::invslot::CORPSE_END && serverCorpseSlot >= EQEmu::invslot::CORPSE_BEGIN) { + RoF2Slot = serverCorpseSlot; + } + + Log(Logs::Detail, Logs::Netcode, "Convert Server Corpse Slot %i to RoF2 Corpse Main Slot %i", serverCorpseSlot, RoF2Slot); + + return RoF2Slot; + } + + static inline structs::TypelessInventorySlot_Struct ServerToRoF2TypelessSlot(uint32 serverSlot, int16 serverType) { structs::TypelessInventorySlot_Struct RoF2Slot; - RoF2Slot.Slot = INVALID_INDEX; - RoF2Slot.SubIndex = INVALID_INDEX; - RoF2Slot.AugIndex = INVALID_INDEX; - RoF2Slot.Unknown01 = 0; + RoF2Slot.Slot = invslot::SLOT_INVALID; + RoF2Slot.SubIndex = invbag::SLOT_INVALID; + RoF2Slot.AugIndex = invaug::SOCKET_INVALID; + RoF2Slot.Unknown01 = INULL; - uint32 TempSlot = 0; + uint32 TempSlot = EQEmu::invslot::SLOT_INVALID; - if (serverSlot < 56 || serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE) { // (< 52) - RoF2Slot.Slot = serverSlot; + if (serverType == EQEmu::invtype::typePossessions) { + if (serverSlot < EQEmu::invtype::POSSESSIONS_SIZE) { + RoF2Slot.Slot = serverSlot; + } - if (serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE) - RoF2Slot.Slot = invslot::slotPowerSource; + else if (serverSlot <= EQEmu::invbag::CURSOR_BAG_END && serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { + TempSlot = serverSlot - EQEmu::invbag::GENERAL_BAGS_BEGIN; - else if (serverSlot >= EQEmu::invslot::slotCursor) // Cursor and Extended Corpse Inventory - RoF2Slot.Slot += 3; - - else if (serverSlot >= EQEmu::invslot::slotAmmo) // Ammo and Personl Inventory - RoF2Slot.Slot += 1; - - /*else if (ServerSlot >= MainCursor) { // Cursor - RoF2Slot.MainSlot = slots::MainCursor; - - if (ServerSlot > 30) - RoF2Slot.SubSlot = (ServerSlot + 3) - 33; - }*/ + RoF2Slot.Slot = invslot::GENERAL_BEGIN + (TempSlot / EQEmu::invbag::SLOT_COUNT); + RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot - invslot::GENERAL_BEGIN) * EQEmu::invbag::SLOT_COUNT); + } } - else if (serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::invbag::CURSOR_BAG_END) { - TempSlot = serverSlot - 1; - RoF2Slot.Slot = int(TempSlot / EQEmu::invbag::SLOT_COUNT) - 2; - RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot + 2) * EQEmu::invbag::SLOT_COUNT); - } - - Log(Logs::General, Logs::Netcode, "[ERROR] Convert Server Slot %i to RoF2 Slots: Main %i, Sub %i, Aug %i, Unk1 %i", serverSlot, RoF2Slot.Slot, RoF2Slot.SubIndex, RoF2Slot.AugIndex, RoF2Slot.Unknown01); + Log(Logs::Detail, Logs::Netcode, "Convert Server Slot %i to RoF2 Typeless Slot [%i, %i, %i] (implied type: %i, unk1: %i)", + serverSlot, RoF2Slot.Slot, RoF2Slot.SubIndex, RoF2Slot.AugIndex, serverType, RoF2Slot.Unknown01); return RoF2Slot; } - static inline uint32 ServerToRoF2CorpseSlot(uint32 serverCorpseSlot) + static inline uint32 RoF2ToServerSlot(structs::InventorySlot_Struct rof2Slot) { - return (serverCorpseSlot - EQEmu::invslot::CORPSE_BEGIN + 1); - } + if (rof2Slot.AugIndex < invaug::SOCKET_INVALID || rof2Slot.AugIndex >= invaug::SOCKET_COUNT) { + Log(Logs::Detail, Logs::Netcode, "Convert RoF2 Slot [%i, %i, %i, %i] (unk2: %i, unk1: %i) to Server Slot %i", + rof2Slot.Type, rof2Slot.Slot, rof2Slot.SubIndex, rof2Slot.AugIndex, rof2Slot.Unknown02, rof2Slot.Unknown01, EQEmu::invslot::SLOT_INVALID); - static inline uint32 RoF2ToServerSlot(structs::InventorySlot_Struct rof2Slot, ItemPacketType PacketType) - { - uint32 ServerSlot = INVALID_INDEX; - uint32 TempSlot = 0; - - if (rof2Slot.Type == invtype::typePossessions && rof2Slot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 51) - if (rof2Slot.Slot == invslot::slotPowerSource) - TempSlot = EQEmu::invslot::SLOT_POWER_SOURCE; - - else if (rof2Slot.Slot >= invslot::slotCursor) // Cursor and Extended Corpse Inventory - TempSlot = rof2Slot.Slot - 3; - - /*else if (RoF2Slot.MainSlot == slots::MainGeneral9 || RoF2Slot.MainSlot == slots::MainGeneral10) { // 9th and 10th RoF2 inventory/corpse slots - // Need to figure out what to do when we get these - - // The slot range of 0 - client_max is cross-utilized between player inventory and corpse inventory. - // In the case of RoF2, player inventory is addressed as 0 - 33 and corpse inventory is addressed as 23 - 56. - // We 'could' assign the two new inventory slots as 9997 and 9998, and then work around their bag - // slot assignments, but doing so may disrupt our ability to utilize the corpse looting range properly. - - // For now, it's probably best to leave as-is and let this work itself out in the inventory rework. - }*/ - - else if (rof2Slot.Slot >= invslot::slotAmmo) // Ammo and Main Inventory - TempSlot = rof2Slot.Slot - 1; - - else // Worn Slots - TempSlot = rof2Slot.Slot; - - if (rof2Slot.SubIndex >= EQEmu::invbag::SLOT_BEGIN) // Bag Slots - TempSlot = ((TempSlot + 3) * EQEmu::invbag::SLOT_COUNT) + rof2Slot.SubIndex + 1; - - ServerSlot = TempSlot; + return EQEmu::invslot::SLOT_INVALID; } - else if (rof2Slot.Type == invtype::typeBank) { - TempSlot = EQEmu::invslot::BANK_BEGIN; + uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; + uint32 TempSlot = invslot::SLOT_INVALID; + + switch (rof2Slot.Type) { + case invtype::typePossessions: { + if (rof2Slot.Slot >= invslot::POSSESSIONS_BEGIN && rof2Slot.Slot <= invslot::POSSESSIONS_END) { + if (rof2Slot.SubIndex == invbag::SLOT_INVALID) { + ServerSlot = rof2Slot.Slot; + } - if (rof2Slot.SubIndex >= EQEmu::invbag::SLOT_BEGIN) - TempSlot += ((rof2Slot.Slot + 3) * EQEmu::invbag::SLOT_COUNT) + rof2Slot.SubIndex + 1; + else if (rof2Slot.SubIndex >= invbag::SLOT_BEGIN && rof2Slot.SubIndex <= invbag::SLOT_END) { + if (rof2Slot.Slot < invslot::GENERAL_BEGIN) + return EQEmu::invslot::SLOT_INVALID; - else - TempSlot += rof2Slot.Slot; + TempSlot = (rof2Slot.Slot - invslot::GENERAL_BEGIN) * invbag::SLOT_COUNT; + ServerSlot = EQEmu::invbag::GENERAL_BAGS_BEGIN + TempSlot + rof2Slot.SubIndex; + } + } - ServerSlot = TempSlot; + break; + } + case invtype::typeBank: { + if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::BANK_SIZE) { + if (rof2Slot.SubIndex == invbag::SLOT_INVALID) { + ServerSlot = EQEmu::invslot::BANK_BEGIN + rof2Slot.Slot; + } + + else if (rof2Slot.SubIndex >= invbag::SLOT_BEGIN && rof2Slot.SubIndex <= invbag::SLOT_END) { + TempSlot = rof2Slot.Slot * invbag::SLOT_COUNT; + ServerSlot = EQEmu::invbag::BANK_BAGS_BEGIN + TempSlot + rof2Slot.SubIndex; + } + } + + break; + } + case invtype::typeSharedBank: { + if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::SHARED_BANK_SIZE) { + if (rof2Slot.SubIndex == invbag::SLOT_INVALID) { + ServerSlot = EQEmu::invslot::SHARED_BANK_BEGIN + rof2Slot.Slot; + } + + else if (rof2Slot.SubIndex >= invbag::SLOT_BEGIN && rof2Slot.SubIndex <= invbag::SLOT_END) { + TempSlot = rof2Slot.Slot * invbag::SLOT_COUNT; + ServerSlot = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + TempSlot + rof2Slot.SubIndex; + } + } + + break; + } + case invtype::typeTrade: { + if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::TRADE_SIZE) { + if (rof2Slot.SubIndex == invbag::SLOT_INVALID) { + ServerSlot = EQEmu::invslot::TRADE_BEGIN + rof2Slot.Slot; + } + + else if (rof2Slot.SubIndex >= invbag::SLOT_BEGIN && rof2Slot.SubIndex <= invbag::SLOT_END) { + TempSlot = rof2Slot.Slot * invbag::SLOT_COUNT; + ServerSlot = EQEmu::invbag::TRADE_BAGS_BEGIN + TempSlot + rof2Slot.SubIndex; + } + } + + break; + } + case invtype::typeWorld: { + if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::WORLD_SIZE) { + ServerSlot = EQEmu::invslot::SHARED_BANK_BEGIN + rof2Slot.Slot; + } + + break; + } + case invtype::typeLimbo: { + if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::LIMBO_SIZE) { + ServerSlot = EQEmu::invslot::slotCursor; + } + + break; + } + case invtype::typeTribute: { + if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::TRIBUTE_SIZE) { + ServerSlot = EQEmu::invslot::TRIBUTE_BEGIN + rof2Slot.Slot; + } + + break; + } + case invtype::typeGuildTribute: { + if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::GUILD_TRIBUTE_SIZE) { + ServerSlot = EQEmu::invslot::GUILD_TRIBUTE_BEGIN + rof2Slot.Slot; + } + + break; + } + case invtype::typeCorpse: { + if (rof2Slot.Slot >= invslot::CORPSE_BEGIN && rof2Slot.Slot <= invslot::CORPSE_END) { + ServerSlot = rof2Slot.Slot; + } + + break; + } + default: { + + break; + } } - else if (rof2Slot.Type == invtype::typeSharedBank) { - TempSlot = EQEmu::invslot::SHARED_BANK_BEGIN; - - if (rof2Slot.SubIndex >= EQEmu::invbag::SLOT_BEGIN) - TempSlot += ((rof2Slot.Slot + 3) * EQEmu::invbag::SLOT_COUNT) + rof2Slot.SubIndex + 1; - - else - TempSlot += rof2Slot.Slot; - - ServerSlot = TempSlot; - } - - else if (rof2Slot.Type == invtype::typeTrade) { - TempSlot = EQEmu::invslot::TRADE_BEGIN; - - if (rof2Slot.SubIndex >= EQEmu::invbag::SLOT_BEGIN) - TempSlot += ((rof2Slot.Slot + 3) * EQEmu::invbag::SLOT_COUNT) + rof2Slot.SubIndex + 1; - // OLD CODE: - //TempSlot += 100 + (RoF2Slot.MainSlot * EmuConstants::ITEM_CONTAINER_SIZE) + RoF2Slot.SubSlot; - - else - TempSlot += rof2Slot.Slot; - - ServerSlot = TempSlot; - } - - else if (rof2Slot.Type == invtype::typeWorld) { - TempSlot = EQEmu::invslot::WORLD_BEGIN; - - if (rof2Slot.Slot >= EQEmu::invbag::SLOT_BEGIN) - TempSlot += rof2Slot.Slot; - - ServerSlot = TempSlot; - } - - /*else if (RoF2Slot.SlotType == maps::MapLimbo) { // Cursor Buffer - TempSlot = 31; - - if (RoF2Slot.MainSlot >= 0) - TempSlot += RoF2Slot.MainSlot; - - ServerSlot = TempSlot; - }*/ - - else if (rof2Slot.Type == invtype::typeGuildTribute) { - ServerSlot = INVALID_INDEX; - } - - else if (rof2Slot.Type == invtype::typeCorpse) { - ServerSlot = rof2Slot.Slot + EQEmu::invslot::CORPSE_BEGIN; - } - - Log(Logs::General, Logs::Netcode, "[ERROR] Convert RoF2 Slots: Type %i, Unk2 %i, Main %i, Sub %i, Aug %i, Unk1 %i to Server Slot %i", rof2Slot.Type, rof2Slot.Unknown02, rof2Slot.Slot, rof2Slot.SubIndex, rof2Slot.AugIndex, rof2Slot.Unknown01, ServerSlot); + Log(Logs::Detail, Logs::Netcode, "Convert RoF2 Slot [%i, %i, %i, %i] (unk2: %i, unk1: %i) to Server Slot %i", + rof2Slot.Type, rof2Slot.Slot, rof2Slot.SubIndex, rof2Slot.AugIndex, rof2Slot.Unknown02, rof2Slot.Unknown01, ServerSlot); return ServerSlot; } - static inline uint32 RoF2ToServerTypelessSlot(structs::TypelessInventorySlot_Struct rof2Slot) + static inline uint32 RoF2ToServerCorpseSlot(structs::InventorySlot_Struct rof2CorpseSlot) { - uint32 ServerSlot = INVALID_INDEX; - uint32 TempSlot = 0; - - if (rof2Slot.Slot < 57) { // Worn/Personal Inventory and Cursor (< 33) - if (rof2Slot.Slot == invslot::slotPowerSource) - TempSlot = EQEmu::invslot::SLOT_POWER_SOURCE; - - else if (rof2Slot.Slot >= invslot::slotCursor) // Cursor and Extended Corpse Inventory - TempSlot = rof2Slot.Slot - 3; - - /*else if (RoF2Slot.MainSlot == slots::MainGeneral9 || RoF2Slot.MainSlot == slots::MainGeneral10) { // 9th and 10th RoF2 inventory slots - // Need to figure out what to do when we get these - - // Same as above - }*/ - - else if (rof2Slot.Slot >= invslot::slotAmmo) // Main Inventory and Ammo Slots - TempSlot = rof2Slot.Slot - 1; - - else - TempSlot = rof2Slot.Slot; - - if (rof2Slot.SubIndex >= EQEmu::invbag::SLOT_BEGIN) // Bag Slots - TempSlot = ((TempSlot + 3) * EQEmu::invbag::SLOT_COUNT) + rof2Slot.SubIndex + 1; - - ServerSlot = TempSlot; + uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; + + if (rof2CorpseSlot.Type != invtype::typeCorpse || rof2CorpseSlot.SubIndex != invbag::SLOT_INVALID || rof2CorpseSlot.AugIndex != invaug::SOCKET_INVALID) { + ServerSlot = EQEmu::invslot::SLOT_INVALID; + } + + else { + ServerSlot = RoF2ToServerCorpseMainSlot(rof2CorpseSlot.Slot); } - Log(Logs::General, Logs::Netcode, "[ERROR] Convert RoF2 Slots: Main %i, Sub %i, Aug %i, Unk1 %i to Server Slot %i", rof2Slot.Slot, rof2Slot.SubIndex, rof2Slot.AugIndex, rof2Slot.Unknown01, ServerSlot); + Log(Logs::Detail, Logs::Netcode, "Convert RoF2 Slot [%i, %i, %i, %i] (unk2: %i, unk1: %i) to Server Slot %i", + rof2CorpseSlot.Type, rof2CorpseSlot.Slot, rof2CorpseSlot.SubIndex, rof2CorpseSlot.AugIndex, rof2CorpseSlot.Unknown02, rof2CorpseSlot.Unknown01, ServerSlot); return ServerSlot; } - static inline uint32 RoF2ToServerCorpseSlot(uint32 rof2CorpseSlot) + static inline uint32 RoF2ToServerCorpseMainSlot(uint32 rof2CorpseSlot) { - return (rof2CorpseSlot + EQEmu::invslot::CORPSE_BEGIN - 1); + uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; + + if (rof2CorpseSlot <= invslot::CORPSE_END && rof2CorpseSlot >= invslot::CORPSE_BEGIN) { + ServerSlot = rof2CorpseSlot; + } + + Log(Logs::Detail, Logs::Netcode, "Convert RoF2 Corpse Main Slot %i to Server Corpse Slot %i", rof2CorpseSlot, ServerSlot); + + return ServerSlot; + } + + static inline uint32 RoF2ToServerTypelessSlot(structs::TypelessInventorySlot_Struct rof2Slot, int16 rof2Type) + { + if (rof2Slot.AugIndex < invaug::SOCKET_INVALID || rof2Slot.AugIndex >= invaug::SOCKET_COUNT) { + Log(Logs::Detail, Logs::Netcode, "Convert RoF2 Typeless Slot [%i, %i, %i] (implied type: %i, unk1: %i) to Server Slot %i", + rof2Slot.Slot, rof2Slot.SubIndex, rof2Slot.AugIndex, rof2Type, rof2Slot.Unknown01, EQEmu::invslot::SLOT_INVALID); + + return EQEmu::invslot::SLOT_INVALID; + } + + uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; + uint32 TempSlot = invslot::SLOT_INVALID; + + switch (rof2Type) { + case invtype::typePossessions: { + if (rof2Slot.Slot >= invslot::POSSESSIONS_BEGIN && rof2Slot.Slot <= invslot::POSSESSIONS_END) { + if (rof2Slot.SubIndex == invbag::SLOT_INVALID) { + ServerSlot = rof2Slot.Slot; + } + + else if (rof2Slot.SubIndex >= invbag::SLOT_BEGIN && rof2Slot.SubIndex <= invbag::SLOT_END) { + if (rof2Slot.Slot < invslot::GENERAL_BEGIN) + return EQEmu::invslot::SLOT_INVALID; + + TempSlot = (rof2Slot.Slot - invslot::GENERAL_BEGIN) * invbag::SLOT_COUNT; + ServerSlot = EQEmu::invbag::GENERAL_BAGS_BEGIN + TempSlot + rof2Slot.SubIndex; + } + } + + break; + } + case invtype::typeBank: { + if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::BANK_SIZE) { + if (rof2Slot.SubIndex == invbag::SLOT_INVALID) { + ServerSlot = EQEmu::invslot::BANK_BEGIN + rof2Slot.Slot; + } + + else if (rof2Slot.SubIndex >= invbag::SLOT_BEGIN && rof2Slot.SubIndex <= invbag::SLOT_END) { + TempSlot = rof2Slot.Slot * invbag::SLOT_COUNT; + ServerSlot = EQEmu::invbag::BANK_BAGS_BEGIN + TempSlot + rof2Slot.SubIndex; + } + } + + break; + } + case invtype::typeSharedBank: { + if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::SHARED_BANK_SIZE) { + if (rof2Slot.SubIndex == invbag::SLOT_INVALID) { + ServerSlot = EQEmu::invslot::SHARED_BANK_BEGIN + rof2Slot.Slot; + } + + else if (rof2Slot.SubIndex >= invbag::SLOT_BEGIN && rof2Slot.SubIndex <= invbag::SLOT_END) { + TempSlot = rof2Slot.Slot * invbag::SLOT_COUNT; + ServerSlot = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + TempSlot + rof2Slot.SubIndex; + } + } + + break; + } + case invtype::typeTrade: { + if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::TRADE_SIZE) { + if (rof2Slot.SubIndex == invbag::SLOT_INVALID) { + ServerSlot = EQEmu::invslot::TRADE_BEGIN + rof2Slot.Slot; + } + + else if (rof2Slot.SubIndex >= invbag::SLOT_BEGIN && rof2Slot.SubIndex <= invbag::SLOT_END) { + TempSlot = rof2Slot.Slot * invbag::SLOT_COUNT; + ServerSlot = EQEmu::invbag::TRADE_BAGS_BEGIN + TempSlot + rof2Slot.SubIndex; + } + } + + break; + } + case invtype::typeWorld: { + if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::WORLD_SIZE) { + ServerSlot = EQEmu::invslot::SHARED_BANK_BEGIN + rof2Slot.Slot; + } + + break; + } + case invtype::typeLimbo: { + if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::LIMBO_SIZE) { + ServerSlot = EQEmu::invslot::slotCursor; + } + + break; + } + case invtype::typeTribute: { + if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::TRIBUTE_SIZE) { + ServerSlot = EQEmu::invslot::TRIBUTE_BEGIN + rof2Slot.Slot; + } + + break; + } + case invtype::typeGuildTribute: { + if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::GUILD_TRIBUTE_SIZE) { + ServerSlot = EQEmu::invslot::GUILD_TRIBUTE_BEGIN + rof2Slot.Slot; + } + + break; + } + case invtype::typeCorpse: { + if (rof2Slot.Slot >= invslot::CORPSE_BEGIN && rof2Slot.Slot <= invslot::CORPSE_END) { + ServerSlot = rof2Slot.Slot; + } + + break; + } + default: { + + break; + } + } + + Log(Logs::Detail, Logs::Netcode, "Convert RoF2 Typeless Slot [%i, %i, %i] (implied type: %i, unk1: %i) to Server Slot %i", + rof2Slot.Slot, rof2Slot.SubIndex, rof2Slot.AugIndex, rof2Type, rof2Slot.Unknown01, ServerSlot); + + return ServerSlot; } static inline void ServerToRoF2SayLink(std::string& rof2SayLink, const std::string& serverSayLink) diff --git a/common/patches/sod.cpp b/common/patches/sod.cpp index 425341af7..d2405ea46 100644 --- a/common/patches/sod.cpp +++ b/common/patches/sod.cpp @@ -400,7 +400,7 @@ namespace SoD for (int index = 0; index < item_count; ++index, ++eq) { SerializeItem(ob, (const EQEmu::ItemInstance*)eq->inst, eq->slot_id, 0); if (ob.tellp() == last_pos) - Log(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id); + Log(Logs::General, Logs::Netcode, "SoD::ENCODE(OP_CharInventory) Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id); last_pos = ob.tellp(); } @@ -464,7 +464,12 @@ namespace SoD FINISH_ENCODE(); } - ENCODE(OP_DeleteCharge) { ENCODE_FORWARD(OP_MoveItem); } + ENCODE(OP_DeleteCharge) + { + Log(Logs::Moderate, Logs::Netcode, "SoD::ENCODE(OP_DeleteCharge)"); + + ENCODE_FORWARD(OP_MoveItem); + } ENCODE(OP_DeleteItem) { @@ -1064,7 +1069,7 @@ namespace SoD SerializeItem(ob, (const EQEmu::ItemInstance*)int_struct->inst, int_struct->slot_id, 0); if (ob.tellp() == last_pos) { - Log(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d.", int_struct->slot_id); + Log(Logs::General, Logs::Netcode, "SoD::ENCODE(OP_ItemPacket) Serialization failed on item slot %d.", int_struct->slot_id); delete in; return; } @@ -1125,6 +1130,8 @@ namespace SoD ENCODE_LENGTH_EXACT(LootingItem_Struct); SETUP_DIRECT_ENCODE(LootingItem_Struct, structs::LootingItem_Struct); + Log(Logs::Moderate, Logs::Netcode, "SoD::ENCODE(OP_LootItem)"); + OUT(lootee); OUT(looter); eq->slot_id = ServerToSoDCorpseSlot(emu->slot_id); @@ -1286,6 +1293,8 @@ namespace SoD ENCODE_LENGTH_EXACT(MoveItem_Struct); SETUP_DIRECT_ENCODE(MoveItem_Struct, structs::MoveItem_Struct); + Log(Logs::Moderate, Logs::Netcode, "SoD::ENCODE(OP_MoveItem)"); + eq->from_slot = ServerToSoDSlot(emu->from_slot); eq->to_slot = ServerToSoDSlot(emu->to_slot); OUT(number_in_stack); @@ -1523,7 +1532,7 @@ namespace SoD // OUT(unknown06160[4]); - // Copy bandoliers where server and client indexes converge + // Copy bandoliers where server and client indices converge for (r = 0; r < EQEmu::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) { OUT_str(bandoliers[r].Name); for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true @@ -1532,7 +1541,7 @@ namespace SoD OUT_str(bandoliers[r].Items[k].Name); } } - // Nullify bandoliers where server and client indexes diverge, with a client bias + // Nullify bandoliers where server and client indices diverge, with a client bias for (r = EQEmu::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) { eq->bandoliers[r].Name[0] = '\0'; for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true @@ -1544,13 +1553,13 @@ namespace SoD // OUT(unknown07444[5120]); - // Copy potion belt where server and client indexes converge + // Copy potion belt where server and client indices converge for (r = 0; r < EQEmu::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++r) { OUT(potionbelt.Items[r].ID); OUT(potionbelt.Items[r].Icon); OUT_str(potionbelt.Items[r].Name); } - // Nullify potion belt where server and client indexes diverge, with a client bias + // Nullify potion belt where server and client indices diverge, with a client bias for (r = EQEmu::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) { eq->potionbelt.Items[r].ID = 0; eq->potionbelt.Items[r].Icon = 0; @@ -3139,6 +3148,8 @@ namespace SoD DECODE_LENGTH_EXACT(structs::LootingItem_Struct); SETUP_DIRECT_DECODE(LootingItem_Struct, structs::LootingItem_Struct); + Log(Logs::Moderate, Logs::Netcode, "SoD::DECODE(OP_LootItem)"); + IN(lootee); IN(looter); emu->slot_id = SoDToServerCorpseSlot(eq->slot_id); @@ -3152,7 +3163,7 @@ namespace SoD DECODE_LENGTH_EXACT(structs::MoveItem_Struct); SETUP_DIRECT_DECODE(MoveItem_Struct, structs::MoveItem_Struct); - Log(Logs::General, Logs::Netcode, "[SoD] Moved item from %u to %u", eq->from_slot, eq->to_slot); + Log(Logs::Moderate, Logs::Netcode, "SoD::DECODE(OP_MoveItem)"); emu->from_slot = SoDToServerSlot(eq->from_slot); emu->to_slot = SoDToServerSlot(eq->to_slot); @@ -3473,7 +3484,7 @@ namespace SoD ibs.nodrop = item->NoDrop; ibs.attune = item->Attuneable; ibs.size = item->Size; - ibs.slots = SwapBits21And22(item->Slots); + ibs.slots = item->Slots; ibs.price = item->Price; ibs.icon = item->Icon; ibs.unknown1 = 1; @@ -3736,79 +3747,193 @@ namespace SoD ob.write((const char*)&subitem_count, sizeof(uint32)); - for (uint32 index = EQEmu::invbag::SLOT_BEGIN; index <= EQEmu::invbag::SLOT_END; ++index) { - EQEmu::ItemInstance* sub = inst->GetItem(index); - if (!sub) - continue; + // moved outside of loop since it is not modified within that scope + int16 SubSlotNumber = EQEmu::invbag::SLOT_INVALID; - int SubSlotNumber = INVALID_INDEX; - if (slot_id_in >= EQEmu::invslot::GENERAL_BEGIN && slot_id_in <= EQEmu::invslot::GENERAL_END) - SubSlotNumber = (((slot_id_in + 3) * EQEmu::invbag::SLOT_COUNT) + index + 1); - else if (slot_id_in >= EQEmu::invslot::BANK_BEGIN && slot_id_in <= EQEmu::invslot::BANK_END) - SubSlotNumber = (((slot_id_in - EQEmu::invslot::BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::BANK_BAGS_BEGIN + index); - else if (slot_id_in >= EQEmu::invslot::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::invslot::SHARED_BANK_END) - SubSlotNumber = (((slot_id_in - EQEmu::invslot::SHARED_BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + index); - else - SubSlotNumber = slot_id_in; + if (slot_id_in <= EQEmu::invslot::slotGeneral8 && slot_id_in >= EQEmu::invslot::GENERAL_BEGIN) + SubSlotNumber = EQEmu::invbag::GENERAL_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::GENERAL_BEGIN) * EQEmu::invbag::SLOT_COUNT); + else if (slot_id_in <= EQEmu::invslot::GENERAL_END && slot_id_in >= EQEmu::invslot::slotGeneral9) + SubSlotNumber = EQEmu::invbag::SLOT_INVALID; + else if (slot_id_in == EQEmu::invslot::slotCursor) + SubSlotNumber = EQEmu::invbag::CURSOR_BAG_BEGIN; + else if (slot_id_in <= EQEmu::invslot::BANK_END && slot_id_in >= EQEmu::invslot::BANK_BEGIN) + SubSlotNumber = EQEmu::invbag::BANK_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT); + else if (slot_id_in <= EQEmu::invslot::SHARED_BANK_END && slot_id_in >= EQEmu::invslot::SHARED_BANK_BEGIN) + SubSlotNumber = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::SHARED_BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT); + else + SubSlotNumber = slot_id_in; // not sure if this is the best way to handle this..leaving for now - ob.write((const char*)&index, sizeof(uint32)); + if (SubSlotNumber != EQEmu::invbag::SLOT_INVALID) { + for (uint32 index = EQEmu::invbag::SLOT_BEGIN; index <= EQEmu::invbag::SLOT_END; ++index) { + EQEmu::ItemInstance* sub = inst->GetItem(index); + if (!sub) + continue; - SerializeItem(ob, sub, SubSlotNumber, (depth + 1)); - ++subitem_count; + ob.write((const char*)&index, sizeof(uint32)); + + SerializeItem(ob, sub, SubSlotNumber, (depth + 1)); + ++subitem_count; + } + + if (subitem_count) + ob.overwrite(count_pos, (const char*)&subitem_count, sizeof(uint32)); } - - if (subitem_count) - ob.overwrite(count_pos, (const char*)&subitem_count, sizeof(uint32)); } static inline uint32 ServerToSoDSlot(uint32 serverSlot) { - uint32 SoDSlot = 0; + uint32 SoDSlot = invslot::SLOT_INVALID; - if (serverSlot >= EQEmu::invslot::slotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots - SoDSlot = serverSlot + 1; - else if (serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::invbag::CURSOR_BAG_END) - SoDSlot = serverSlot + 11; - else if (serverSlot >= EQEmu::invbag::BANK_BAGS_BEGIN && serverSlot <= EQEmu::invbag::BANK_BAGS_END) - SoDSlot = serverSlot + 1; - else if (serverSlot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::invbag::SHARED_BANK_BAGS_END) - SoDSlot = serverSlot + 1; - else if (serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE) - SoDSlot = invslot::slotPowerSource; - else + if (serverSlot <= EQEmu::invslot::slotGeneral8) { SoDSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invslot::CORPSE_END && serverSlot >= EQEmu::invslot::slotCursor) { + SoDSlot = serverSlot - 2; + } + + else if (serverSlot <= EQEmu::invbag::GENERAL_BAGS_8_END && serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { + SoDSlot = serverSlot + 11; + } + + else if (serverSlot <= EQEmu::invbag::CURSOR_BAG_END && serverSlot >= EQEmu::invbag::CURSOR_BAG_BEGIN) { + SoDSlot = serverSlot - 9; + } + + else if (serverSlot <= EQEmu::invslot::TRIBUTE_END && serverSlot >= EQEmu::invslot::TRIBUTE_BEGIN) { + SoDSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invslot::GUILD_TRIBUTE_END && serverSlot >= EQEmu::invslot::GUILD_TRIBUTE_BEGIN) { + SoDSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invslot::BANK_END && serverSlot >= EQEmu::invslot::BANK_BEGIN) { + SoDSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invbag::BANK_BAGS_END && serverSlot >= EQEmu::invbag::BANK_BAGS_BEGIN) { + SoDSlot = serverSlot + 1; + } + + else if (serverSlot <= EQEmu::invslot::SHARED_BANK_END && serverSlot >= EQEmu::invslot::SHARED_BANK_BEGIN) { + SoDSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invbag::SHARED_BANK_BAGS_END && serverSlot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN) { + SoDSlot = serverSlot + 1; + } + + else if (serverSlot <= EQEmu::invslot::TRADE_END && serverSlot >= EQEmu::invslot::TRADE_BEGIN) { + SoDSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invbag::TRADE_BAGS_END && serverSlot >= EQEmu::invbag::TRADE_BAGS_BEGIN) { + SoDSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invslot::WORLD_END && serverSlot >= EQEmu::invslot::WORLD_BEGIN) { + SoDSlot = serverSlot; + } + + Log(Logs::Detail, Logs::Netcode, "Convert Server Slot %i to SoD Slot %i", serverSlot, SoDSlot); + return SoDSlot; } static inline uint32 ServerToSoDCorpseSlot(uint32 serverCorpseSlot) { - //uint32 SoDCorpse; - return (serverCorpseSlot + 1); + uint32 SoDSlot = invslot::SLOT_INVALID; + + if (serverCorpseSlot <= EQEmu::invslot::slotGeneral8 && serverCorpseSlot >= EQEmu::invslot::slotGeneral1) { + SoDSlot = serverCorpseSlot; + } + + else if (serverCorpseSlot <= EQEmu::invslot::CORPSE_END && serverCorpseSlot >= EQEmu::invslot::slotCursor) { + SoDSlot = serverCorpseSlot - 2; + } + + Log(Logs::Detail, Logs::Netcode, "Convert Server Corpse Slot %i to SoD Corpse Slot %i", serverCorpseSlot, SoDSlot); + + return SoDSlot; } static inline uint32 SoDToServerSlot(uint32 sodSlot) { - uint32 ServerSlot = 0; + uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; - if (sodSlot >= invslot::slotAmmo && sodSlot <= invslot::CORPSE_END) // Cursor/Ammo/Power Source and Normal Inventory Slots - ServerSlot = sodSlot - 1; - else if (sodSlot >= invbag::GENERAL_BAGS_BEGIN && sodSlot <= invbag::CURSOR_BAG_END) - ServerSlot = sodSlot - 11; - else if (sodSlot >= invbag::BANK_BAGS_BEGIN && sodSlot <= invbag::BANK_BAGS_END) - ServerSlot = sodSlot - 1; - else if (sodSlot >= invbag::SHARED_BANK_BAGS_BEGIN && sodSlot <= invbag::SHARED_BANK_BAGS_END) - ServerSlot = sodSlot - 1; - else if (sodSlot == invslot::slotPowerSource) - ServerSlot = EQEmu::invslot::SLOT_POWER_SOURCE; - else + if (sodSlot <= invslot::slotGeneral8) { ServerSlot = sodSlot; + } + + else if (sodSlot <= invslot::CORPSE_END && sodSlot >= invslot::slotCursor) { + ServerSlot = sodSlot + 2; + } + + else if (sodSlot <= invbag::GENERAL_BAGS_END && sodSlot >= invbag::GENERAL_BAGS_BEGIN) { + ServerSlot = sodSlot - 11; + } + + else if (sodSlot <= invbag::CURSOR_BAG_END && sodSlot >= invbag::CURSOR_BAG_BEGIN) { + ServerSlot = sodSlot + 9; + } + + else if (sodSlot <= invslot::TRIBUTE_END && sodSlot >= invslot::TRIBUTE_BEGIN) { + ServerSlot = sodSlot; + } + + else if (sodSlot <= invslot::GUILD_TRIBUTE_END && sodSlot >= invslot::GUILD_TRIBUTE_BEGIN) { + ServerSlot = sodSlot; + } + + else if (sodSlot <= invslot::BANK_END && sodSlot >= invslot::BANK_BEGIN) { + ServerSlot = sodSlot; + } + + else if (sodSlot <= invbag::BANK_BAGS_END && sodSlot >= invbag::BANK_BAGS_BEGIN) { + ServerSlot = sodSlot - 1; + } + + else if (sodSlot <= invslot::SHARED_BANK_END && sodSlot >= invslot::SHARED_BANK_BEGIN) { + ServerSlot = sodSlot; + } + + else if (sodSlot <= invbag::SHARED_BANK_BAGS_END && sodSlot >= invbag::SHARED_BANK_BAGS_BEGIN) { + ServerSlot = sodSlot - 1; + } + + else if (sodSlot <= invslot::TRADE_END && sodSlot >= invslot::TRADE_BEGIN) { + ServerSlot = sodSlot; + } + + else if (sodSlot <= invbag::TRADE_BAGS_END && sodSlot >= invbag::TRADE_BAGS_BEGIN) { + ServerSlot = sodSlot; + } + + else if (sodSlot <= invslot::WORLD_END && sodSlot >= invslot::WORLD_BEGIN) { + ServerSlot = sodSlot; + } + + Log(Logs::Detail, Logs::Netcode, "Convert SoD Slot %i to Server Slot %i", sodSlot, ServerSlot); + return ServerSlot; } static inline uint32 SoDToServerCorpseSlot(uint32 sodCorpseSlot) { - //uint32 ServerCorpse; - return (sodCorpseSlot - 1); + uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; + + if (sodCorpseSlot <= invslot::slotGeneral8 && sodCorpseSlot >= invslot::slotGeneral1) { + ServerSlot = sodCorpseSlot; + } + + else if (sodCorpseSlot <= invslot::CORPSE_END && sodCorpseSlot >= invslot::slotCursor) { + ServerSlot = sodCorpseSlot + 2; + } + + Log(Logs::Detail, Logs::Netcode, "Convert SoD Corpse Slot %i to Server Corpse Slot %i", sodCorpseSlot, ServerSlot); + + return ServerSlot; } static inline void ServerToSoDSayLink(std::string& sodSayLink, const std::string& serverSayLink) diff --git a/common/patches/sof.cpp b/common/patches/sof.cpp index 7051a5eeb..7c2fabc72 100644 --- a/common/patches/sof.cpp +++ b/common/patches/sof.cpp @@ -382,7 +382,7 @@ namespace SoF for (int index = 0; index < item_count; ++index, ++eq) { SerializeItem(ob, (const EQEmu::ItemInstance*)eq->inst, eq->slot_id, 0); if (ob.tellp() == last_pos) - Log(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id); + Log(Logs::General, Logs::Netcode, "SoF::ENCODE(OP_CharInventory) Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id); last_pos = ob.tellp(); } @@ -445,7 +445,12 @@ namespace SoF FINISH_ENCODE(); } - ENCODE(OP_DeleteCharge) { ENCODE_FORWARD(OP_MoveItem); } + ENCODE(OP_DeleteCharge) + { + Log(Logs::Moderate, Logs::Netcode, "SoF::ENCODE(OP_DeleteCharge)"); + + ENCODE_FORWARD(OP_MoveItem); + } ENCODE(OP_DeleteItem) { @@ -861,7 +866,7 @@ namespace SoF SerializeItem(ob, (const EQEmu::ItemInstance*)int_struct->inst, int_struct->slot_id, 0); if (ob.tellp() == last_pos) { - Log(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d.", int_struct->slot_id); + Log(Logs::General, Logs::Netcode, "SoF::ENCODE(OP_ItemPacket) Serialization failed on item slot %d.", int_struct->slot_id); delete in; return; } @@ -922,6 +927,8 @@ namespace SoF ENCODE_LENGTH_EXACT(LootingItem_Struct); SETUP_DIRECT_ENCODE(LootingItem_Struct, structs::LootingItem_Struct); + Log(Logs::Moderate, Logs::Netcode, "SoF::ENCODE(OP_LootItem)"); + OUT(lootee); OUT(looter); eq->slot_id = ServerToSoFCorpseSlot(emu->slot_id); @@ -965,6 +972,8 @@ namespace SoF ENCODE_LENGTH_EXACT(MoveItem_Struct); SETUP_DIRECT_ENCODE(MoveItem_Struct, structs::MoveItem_Struct); + Log(Logs::Moderate, Logs::Netcode, "SoF::ENCODE(OP_MoveItem)"); + eq->from_slot = ServerToSoFSlot(emu->from_slot); eq->to_slot = ServerToSoFSlot(emu->to_slot); OUT(number_in_stack); @@ -1190,7 +1199,7 @@ namespace SoF // OUT(unknown06160[4]); - // Copy bandoliers where server and client indexes converge + // Copy bandoliers where server and client indices converge for (r = 0; r < EQEmu::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) { OUT_str(bandoliers[r].Name); for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true @@ -1199,7 +1208,7 @@ namespace SoF OUT_str(bandoliers[r].Items[k].Name); } } - // Nullify bandoliers where server and client indexes diverge, with a client bias + // Nullify bandoliers where server and client indices diverge, with a client bias for (r = EQEmu::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) { eq->bandoliers[r].Name[0] = '\0'; for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true @@ -1211,13 +1220,13 @@ namespace SoF // OUT(unknown07444[5120]); - // Copy potion belt where server and client indexes converge + // Copy potion belt where server and client indices converge for (r = 0; r < EQEmu::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++r) { OUT(potionbelt.Items[r].ID); OUT(potionbelt.Items[r].Icon); OUT_str(potionbelt.Items[r].Name); } - // Nullify potion belt where server and client indexes diverge, with a client bias + // Nullify potion belt where server and client indices diverge, with a client bias for (r = EQEmu::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) { eq->potionbelt.Items[r].ID = 0; eq->potionbelt.Items[r].Icon = 0; @@ -2548,6 +2557,8 @@ namespace SoF DECODE_LENGTH_EXACT(structs::LootingItem_Struct); SETUP_DIRECT_DECODE(LootingItem_Struct, structs::LootingItem_Struct); + Log(Logs::Moderate, Logs::Netcode, "SoF::DECODE(OP_LootItem)"); + IN(lootee); IN(looter); emu->slot_id = SoFToServerCorpseSlot(eq->slot_id); @@ -2561,7 +2572,7 @@ namespace SoF DECODE_LENGTH_EXACT(structs::MoveItem_Struct); SETUP_DIRECT_DECODE(MoveItem_Struct, structs::MoveItem_Struct); - Log(Logs::General, Logs::Netcode, "[SoF] Moved item from %u to %u", eq->from_slot, eq->to_slot); + Log(Logs::Moderate, Logs::Netcode, "SoF::DECODE(OP_MoveItem)"); emu->from_slot = SoFToServerSlot(eq->from_slot); emu->to_slot = SoFToServerSlot(eq->to_slot); @@ -2867,7 +2878,7 @@ namespace SoF ibs.nodrop = item->NoDrop; ibs.attune = item->Attuneable; ibs.size = item->Size; - ibs.slots = SwapBits21And22(item->Slots); + ibs.slots = item->Slots; ibs.price = item->Price; ibs.icon = item->Icon; ibs.unknown1 = 1; @@ -3129,81 +3140,193 @@ namespace SoF ob.write((const char*)&subitem_count, sizeof(uint32)); - for (uint32 index = EQEmu::invbag::SLOT_BEGIN; index <= EQEmu::invbag::SLOT_END; ++index) { - EQEmu::ItemInstance* sub = inst->GetItem(index); - if (!sub) - continue; + // moved outside of loop since it is not modified within that scope + int16 SubSlotNumber = EQEmu::invbag::SLOT_INVALID; - int SubSlotNumber = INVALID_INDEX; - if (slot_id_in >= EQEmu::invslot::GENERAL_BEGIN && slot_id_in <= EQEmu::invslot::GENERAL_END) - SubSlotNumber = (((slot_id_in + 3) * EQEmu::invbag::SLOT_COUNT) + index + 1); - else if (slot_id_in >= EQEmu::invslot::BANK_BEGIN && slot_id_in <= EQEmu::invslot::BANK_END) - SubSlotNumber = (((slot_id_in - EQEmu::invslot::BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::BANK_BAGS_BEGIN + index); - else if (slot_id_in >= EQEmu::invslot::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::invslot::SHARED_BANK_END) - SubSlotNumber = (((slot_id_in - EQEmu::invslot::SHARED_BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + index); - else - SubSlotNumber = slot_id_in; + if (slot_id_in <= EQEmu::invslot::slotGeneral8 && slot_id_in >= EQEmu::invslot::GENERAL_BEGIN) + SubSlotNumber = EQEmu::invbag::GENERAL_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::GENERAL_BEGIN) * EQEmu::invbag::SLOT_COUNT); + else if (slot_id_in <= EQEmu::invslot::GENERAL_END && slot_id_in >= EQEmu::invslot::slotGeneral9) + SubSlotNumber = EQEmu::invbag::SLOT_INVALID; + else if (slot_id_in == EQEmu::invslot::slotCursor) + SubSlotNumber = EQEmu::invbag::CURSOR_BAG_BEGIN; + else if (slot_id_in <= EQEmu::invslot::BANK_END && slot_id_in >= EQEmu::invslot::BANK_BEGIN) + SubSlotNumber = EQEmu::invbag::BANK_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT); + else if (slot_id_in <= EQEmu::invslot::SHARED_BANK_END && slot_id_in >= EQEmu::invslot::SHARED_BANK_BEGIN) + SubSlotNumber = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::SHARED_BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT); + else + SubSlotNumber = slot_id_in; // not sure if this is the best way to handle this..leaving for now - ob.write((const char*)&index, sizeof(uint32)); + if (SubSlotNumber != EQEmu::invbag::SLOT_INVALID) { + for (uint32 index = EQEmu::invbag::SLOT_BEGIN; index <= EQEmu::invbag::SLOT_END; ++index) { + EQEmu::ItemInstance* sub = inst->GetItem(index); + if (!sub) + continue; - SerializeItem(ob, sub, SubSlotNumber, (depth + 1)); - ++subitem_count; + ob.write((const char*)&index, sizeof(uint32)); + + SerializeItem(ob, sub, SubSlotNumber, (depth + 1)); + ++subitem_count; + } + + if (subitem_count) + ob.overwrite(count_pos, (const char*)&subitem_count, sizeof(uint32)); } - - if (subitem_count) - ob.overwrite(count_pos, (const char*)&subitem_count, sizeof(uint32)); } static inline uint32 ServerToSoFSlot(uint32 serverSlot) { - uint32 SoFSlot = 0; + uint32 SoFSlot = invslot::SLOT_INVALID; - if (serverSlot >= EQEmu::invslot::slotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots - SoFSlot = serverSlot + 1; - else if (serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::invbag::CURSOR_BAG_END) - SoFSlot = serverSlot + 11; - else if (serverSlot >= EQEmu::invbag::BANK_BAGS_BEGIN && serverSlot <= EQEmu::invbag::BANK_BAGS_END) - SoFSlot = serverSlot + 1; - else if (serverSlot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::invbag::SHARED_BANK_BAGS_END) - SoFSlot = serverSlot + 1; - else if (serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE) - SoFSlot = invslot::slotPowerSource; - else + if (serverSlot <= EQEmu::invslot::slotGeneral8) { SoFSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invslot::CORPSE_END && serverSlot >= EQEmu::invslot::slotCursor) { + SoFSlot = serverSlot - 2; + } + + else if (serverSlot <= EQEmu::invbag::GENERAL_BAGS_8_END && serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { + SoFSlot = serverSlot + 11; + } + + else if (serverSlot <= EQEmu::invbag::CURSOR_BAG_END && serverSlot >= EQEmu::invbag::CURSOR_BAG_BEGIN) { + SoFSlot = serverSlot - 9; + } + + else if (serverSlot <= EQEmu::invslot::TRIBUTE_END && serverSlot >= EQEmu::invslot::TRIBUTE_BEGIN) { + SoFSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invslot::GUILD_TRIBUTE_END && serverSlot >= EQEmu::invslot::GUILD_TRIBUTE_BEGIN) { + SoFSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invslot::BANK_END && serverSlot >= EQEmu::invslot::BANK_BEGIN) { + SoFSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invbag::BANK_BAGS_END && serverSlot >= EQEmu::invbag::BANK_BAGS_BEGIN) { + SoFSlot = serverSlot + 1; + } + + else if (serverSlot <= EQEmu::invslot::SHARED_BANK_END && serverSlot >= EQEmu::invslot::SHARED_BANK_BEGIN) { + SoFSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invbag::SHARED_BANK_BAGS_END && serverSlot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN) { + SoFSlot = serverSlot + 1; + } + + else if (serverSlot <= EQEmu::invslot::TRADE_END && serverSlot >= EQEmu::invslot::TRADE_BEGIN) { + SoFSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invbag::TRADE_BAGS_END && serverSlot >= EQEmu::invbag::TRADE_BAGS_BEGIN) { + SoFSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invslot::WORLD_END && serverSlot >= EQEmu::invslot::WORLD_BEGIN) { + SoFSlot = serverSlot; + } + + Log(Logs::Detail, Logs::Netcode, "Convert Server Slot %i to SoF Slot %i", serverSlot, SoFSlot); return SoFSlot; } static inline uint32 ServerToSoFCorpseSlot(uint32 serverCorpseSlot) { - //uint32 SoFCorpse; - return (serverCorpseSlot + 1); + uint32 SoFSlot = invslot::SLOT_INVALID; + + if (serverCorpseSlot <= EQEmu::invslot::slotGeneral8 && serverCorpseSlot >= EQEmu::invslot::slotGeneral1) { + SoFSlot = serverCorpseSlot; + } + + else if (serverCorpseSlot <= EQEmu::invslot::CORPSE_END && serverCorpseSlot >= EQEmu::invslot::slotCursor) { + SoFSlot = serverCorpseSlot - 2; + } + + Log(Logs::Detail, Logs::Netcode, "Convert Server Corpse Slot %i to SoF Corpse Slot %i", serverCorpseSlot, SoFSlot); + + return SoFSlot; } static inline uint32 SoFToServerSlot(uint32 sofSlot) { - uint32 ServerSlot = 0; + uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; - if (sofSlot >= invslot::slotAmmo && sofSlot <= invslot::CORPSE_END) // Cursor/Ammo/Power Source and Normal Inventory Slots - ServerSlot = sofSlot - 1; - else if (sofSlot >= invbag::GENERAL_BAGS_BEGIN && sofSlot <= invbag::CURSOR_BAG_END) - ServerSlot = sofSlot - 11; - else if (sofSlot >= invbag::BANK_BAGS_BEGIN && sofSlot <= invbag::BANK_BAGS_END) - ServerSlot = sofSlot - 1; - else if (sofSlot >= invbag::SHARED_BANK_BAGS_BEGIN && sofSlot <= invbag::SHARED_BANK_BAGS_END) - ServerSlot = sofSlot - 1; - else if (sofSlot == invslot::slotPowerSource) - ServerSlot = EQEmu::invslot::SLOT_POWER_SOURCE; - else + if (sofSlot <= invslot::slotGeneral8) { ServerSlot = sofSlot; + } + + else if (sofSlot <= invslot::CORPSE_END && sofSlot >= invslot::slotCursor) { + ServerSlot = sofSlot + 2; + } + + else if (sofSlot <= invbag::GENERAL_BAGS_END && sofSlot >= invbag::GENERAL_BAGS_BEGIN) { + ServerSlot = sofSlot - 11; + } + + else if (sofSlot <= invbag::CURSOR_BAG_END && sofSlot >= invbag::CURSOR_BAG_BEGIN) { + ServerSlot = sofSlot + 9; + } + + else if (sofSlot <= invslot::TRIBUTE_END && sofSlot >= invslot::TRIBUTE_BEGIN) { + ServerSlot = sofSlot; + } + + else if (sofSlot <= invslot::GUILD_TRIBUTE_END && sofSlot >= invslot::GUILD_TRIBUTE_BEGIN) { + ServerSlot = sofSlot; + } + + else if (sofSlot <= invslot::BANK_END && sofSlot >= invslot::BANK_BEGIN) { + ServerSlot = sofSlot; + } + + else if (sofSlot <= invbag::BANK_BAGS_END && sofSlot >= invbag::BANK_BAGS_BEGIN) { + ServerSlot = sofSlot - 1; + } + + else if (sofSlot <= invslot::SHARED_BANK_END && sofSlot >= invslot::SHARED_BANK_BEGIN) { + ServerSlot = sofSlot; + } + + else if (sofSlot <= invbag::SHARED_BANK_BAGS_END && sofSlot >= invbag::SHARED_BANK_BAGS_BEGIN) { + ServerSlot = sofSlot - 1; + } + + else if (sofSlot <= invslot::TRADE_END && sofSlot >= invslot::TRADE_BEGIN) { + ServerSlot = sofSlot; + } + + else if (sofSlot <= invbag::TRADE_BAGS_END && sofSlot >= invbag::TRADE_BAGS_BEGIN) { + ServerSlot = sofSlot; + } + + else if (sofSlot <= invslot::WORLD_END && sofSlot >= invslot::WORLD_BEGIN) { + ServerSlot = sofSlot; + } + + Log(Logs::Detail, Logs::Netcode, "Convert SoF Slot %i to Server Slot %i", sofSlot, ServerSlot); return ServerSlot; } static inline uint32 SoFToServerCorpseSlot(uint32 sofCorpseSlot) { - //uint32 ServerCorpse; - return (sofCorpseSlot - 1); + uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; + + if (sofCorpseSlot <= invslot::slotGeneral8 && sofCorpseSlot >= invslot::slotGeneral1) { + ServerSlot = sofCorpseSlot; + } + + else if (sofCorpseSlot <= invslot::CORPSE_END && sofCorpseSlot >= invslot::slotCursor) { + ServerSlot = sofCorpseSlot + 2; + } + + Log(Logs::Detail, Logs::Netcode, "Convert SoF Corpse Slot %i to Server Corpse Slot %i", sofCorpseSlot, ServerSlot); + + return ServerSlot; } static inline void ServerToSoFSayLink(std::string& sofSayLink, const std::string& serverSayLink) diff --git a/common/patches/titanium.cpp b/common/patches/titanium.cpp index 339cbb85d..d6f2516b2 100644 --- a/common/patches/titanium.cpp +++ b/common/patches/titanium.cpp @@ -335,9 +335,9 @@ namespace Titanium EQEmu::OutBuffer::pos_type last_pos = ob.tellp(); for (int r = 0; r < itemcount; r++, eq++) { - SerializeItem(ob, (const EQEmu::ItemInstance*)eq->inst, eq->slot_id, 0); + SerializeItem(ob, (const EQEmu::ItemInstance*)eq->inst, ServerToTitaniumSlot(eq->slot_id), 0); if (ob.tellp() == last_pos) - Log(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id); + Log(Logs::General, Logs::Netcode, "Titanium::ENCODE(OP_CharInventory) Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id); last_pos = ob.tellp(); } @@ -367,7 +367,12 @@ namespace Titanium FINISH_ENCODE(); } - ENCODE(OP_DeleteCharge) { ENCODE_FORWARD(OP_MoveItem); } + ENCODE(OP_DeleteCharge) + { + Log(Logs::Moderate, Logs::Netcode, "Titanium::ENCODE(OP_DeleteCharge)"); + + ENCODE_FORWARD(OP_MoveItem); + } ENCODE(OP_DeleteItem) { @@ -772,21 +777,15 @@ namespace Titanium OUT(TargetID); OUT(playerid); - int r; - for (r = 0; r <= 20; r++) { - strn0cpy(eq->itemnames[r], emu->itemnames[r], sizeof(eq->itemnames[r])); + for (int i = EQEmu::invslot::slotCharm; i <= EQEmu::invslot::slotWaist; ++i) { + strn0cpy(eq->itemnames[i], emu->itemnames[i], sizeof(eq->itemnames[i])); + OUT(itemicons[i]); } - // move arrow item down to last element in titanium array - strn0cpy(eq->itemnames[21], emu->itemnames[22], sizeof(eq->itemnames[21])); + // move ammo down to last element in titanium array + strn0cpy(eq->itemnames[invslot::slotAmmo], emu->itemnames[EQEmu::invslot::slotAmmo], sizeof(eq->itemnames[invslot::slotAmmo])); + eq->itemicons[invslot::slotAmmo] = emu->itemicons[EQEmu::invslot::slotAmmo]; - int k; - for (k = 0; k <= 20; k++) { - OUT(itemicons[k]); - } - - // move arrow icon down to last element in titanium array - eq->itemicons[21] = emu->itemicons[22]; strn0cpy(eq->text, emu->text, sizeof(eq->text)); FINISH_ENCODE(); @@ -821,9 +820,9 @@ namespace Titanium ob.write((const char*)__emu_buffer, 4); - SerializeItem(ob, (const EQEmu::ItemInstance*)int_struct->inst, int_struct->slot_id, 0); + SerializeItem(ob, (const EQEmu::ItemInstance*)int_struct->inst, ServerToTitaniumSlot(int_struct->slot_id), 0); if (ob.tellp() == last_pos) { - Log(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d.", int_struct->slot_id); + Log(Logs::General, Logs::Netcode, "Titanium::ENCODE(OP_ItemPacket) Serialization failed on item slot %d.", int_struct->slot_id); delete in; return; } @@ -874,6 +873,8 @@ namespace Titanium ENCODE_LENGTH_EXACT(LootingItem_Struct); SETUP_DIRECT_ENCODE(LootingItem_Struct, structs::LootingItem_Struct); + Log(Logs::Moderate, Logs::Netcode, "Titanium::ENCODE(OP_LootItem)"); + OUT(lootee); OUT(looter); eq->slot_id = ServerToTitaniumCorpseSlot(emu->slot_id); @@ -903,6 +904,8 @@ namespace Titanium ENCODE_LENGTH_EXACT(MoveItem_Struct); SETUP_DIRECT_ENCODE(MoveItem_Struct, structs::MoveItem_Struct); + Log(Logs::Moderate, Logs::Netcode, "Titanium::ENCODE(OP_MoveItem)"); + eq->from_slot = ServerToTitaniumSlot(emu->from_slot); eq->to_slot = ServerToTitaniumSlot(emu->to_slot); OUT(number_in_stack); @@ -1050,7 +1053,7 @@ namespace Titanium // OUT(unknown06160[4]); - // Copy bandoliers where server and client indexes converge + // Copy bandoliers where server and client indices converge for (r = 0; r < EQEmu::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) { OUT_str(bandoliers[r].Name); for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true @@ -1059,7 +1062,7 @@ namespace Titanium OUT_str(bandoliers[r].Items[k].Name); } } - // Nullify bandoliers where server and client indexes diverge, with a client bias + // Nullify bandoliers where server and client indices diverge, with a client bias for (r = EQEmu::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) { eq->bandoliers[r].Name[0] = '\0'; for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true @@ -1071,13 +1074,13 @@ namespace Titanium // OUT(unknown07444[5120]); - // Copy potion belt where server and client indexes converge + // Copy potion belt where server and client indices converge for (r = 0; r < EQEmu::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++r) { OUT(potionbelt.Items[r].ID); OUT(potionbelt.Items[r].Icon); OUT_str(potionbelt.Items[r].Name); } - // Nullify potion belt where server and client indexes diverge, with a client bias + // Nullify potion belt where server and client indices diverge, with a client bias for (r = EQEmu::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) { eq->potionbelt.Items[r].ID = 0; eq->potionbelt.Items[r].Icon = 0; @@ -1936,23 +1939,18 @@ namespace Titanium IN(TargetID); IN(playerid); - int r; - for (r = 0; r <= 20; r++) { - strn0cpy(emu->itemnames[r], eq->itemnames[r], sizeof(emu->itemnames[r])); + for (int i = invslot::slotCharm; i <= invslot::slotWaist; ++i) { + strn0cpy(emu->itemnames[i], eq->itemnames[i], sizeof(emu->itemnames[i])); + IN(itemicons[i]); } - // move arrow item up to last element in server array - strn0cpy(emu->itemnames[21], "", sizeof(emu->itemnames[21])); - strn0cpy(emu->itemnames[22], eq->itemnames[21], sizeof(emu->itemnames[22])); + // move ammo up to last element in server array + strn0cpy(emu->itemnames[EQEmu::invslot::slotAmmo], eq->itemnames[invslot::slotAmmo], sizeof(emu->itemnames[EQEmu::invslot::slotAmmo])); + emu->itemicons[EQEmu::invslot::slotAmmo] = eq->itemicons[invslot::slotAmmo]; - int k; - for (k = 0; k <= 20; k++) { - IN(itemicons[k]); - } - - // move arrow icon up to last element in server array - emu->itemicons[21] = 0xFFFFFFFF; - emu->itemicons[22] = eq->itemicons[21]; + // nullify power source element in server array + strn0cpy(emu->itemnames[EQEmu::invslot::slotPowerSource], "", sizeof(emu->itemnames[EQEmu::invslot::slotPowerSource])); + emu->itemicons[EQEmu::invslot::slotPowerSource] = 0xFFFFFFFF; strn0cpy(emu->text, eq->text, sizeof(emu->text)); @@ -2020,6 +2018,8 @@ namespace Titanium DECODE_LENGTH_EXACT(structs::LootingItem_Struct); SETUP_DIRECT_DECODE(LootingItem_Struct, structs::LootingItem_Struct); + Log(Logs::Moderate, Logs::Netcode, "Titanium::DECODE(OP_LootItem)"); + IN(lootee); IN(looter); emu->slot_id = TitaniumToServerCorpseSlot(eq->slot_id); @@ -2033,7 +2033,7 @@ namespace Titanium DECODE_LENGTH_EXACT(structs::MoveItem_Struct); SETUP_DIRECT_DECODE(MoveItem_Struct, structs::MoveItem_Struct); - Log(Logs::General, Logs::Netcode, "[Titanium] Moved item from %u to %u", eq->from_slot, eq->to_slot); + Log(Logs::Moderate, Logs::Netcode, "Titanium::DECODE(OP_MoveItem)"); emu->from_slot = TitaniumToServerSlot(eq->from_slot); emu->to_slot = TitaniumToServerSlot(eq->to_slot); @@ -2259,7 +2259,7 @@ namespace Titanium ob << '|' << itoa(item->NoRent); ob << '|' << itoa(item->NoDrop); ob << '|' << itoa(item->Size); - ob << '|' << itoa(item->Slots); + ob << '|' << itoa(Catch22(SwapBits21And22(item->Slots))); ob << '|' << itoa(item->Price); ob << '|' << itoa(item->Icon); ob << '|' << "0"; @@ -2464,32 +2464,190 @@ namespace Titanium static inline int16 ServerToTitaniumSlot(uint32 serverSlot) { - //int16 TitaniumSlot; - if (serverSlot == INVALID_INDEX) - return INVALID_INDEX; + int16 TitaniumSlot = invslot::SLOT_INVALID; - return serverSlot; // deprecated + if (serverSlot <= EQEmu::invslot::slotWaist) { + TitaniumSlot = serverSlot; + } + + else if (serverSlot == EQEmu::invslot::slotAmmo) { + TitaniumSlot = serverSlot - 1; + } + + else if (serverSlot <= EQEmu::invslot::slotGeneral8 && serverSlot >= EQEmu::invslot::slotGeneral1) { + TitaniumSlot = serverSlot - 1; + } + + else if (serverSlot <= (EQEmu::invslot::POSSESSIONS_COUNT + EQEmu::invslot::slotWaist) && serverSlot >= EQEmu::invslot::slotCursor) { + TitaniumSlot = serverSlot - 3; + } + + else if (serverSlot == (EQEmu::invslot::POSSESSIONS_COUNT + EQEmu::invslot::slotAmmo)) { + TitaniumSlot = serverSlot - 4; + } + + else if (serverSlot <= EQEmu::invbag::GENERAL_BAGS_8_END && serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { + TitaniumSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invbag::CURSOR_BAG_END && serverSlot >= EQEmu::invbag::CURSOR_BAG_BEGIN) { + TitaniumSlot = serverSlot - 20; + } + + else if (serverSlot <= EQEmu::invslot::TRIBUTE_END && serverSlot >= EQEmu::invslot::TRIBUTE_BEGIN) { + TitaniumSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invslot::GUILD_TRIBUTE_END && serverSlot >= EQEmu::invslot::GUILD_TRIBUTE_BEGIN) { + TitaniumSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invslot::BANK_END && serverSlot >= EQEmu::invslot::BANK_BEGIN) { + TitaniumSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invbag::BANK_BAGS_16_END && serverSlot >= EQEmu::invbag::BANK_BAGS_BEGIN) { + TitaniumSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invslot::SHARED_BANK_END && serverSlot >= EQEmu::invslot::SHARED_BANK_BEGIN) { + TitaniumSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invbag::SHARED_BANK_BAGS_END && serverSlot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN) { + TitaniumSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invslot::TRADE_END && serverSlot >= EQEmu::invslot::TRADE_BEGIN) { + TitaniumSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invbag::TRADE_BAGS_END && serverSlot >= EQEmu::invbag::TRADE_BAGS_BEGIN) { + TitaniumSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invslot::WORLD_END && serverSlot >= EQEmu::invslot::WORLD_BEGIN) { + TitaniumSlot = serverSlot; + } + + Log(Logs::Detail, Logs::Netcode, "Convert Server Slot %i to Titanium Slot %i", serverSlot, TitaniumSlot); + + return TitaniumSlot; } static inline int16 ServerToTitaniumCorpseSlot(uint32 serverCorpseSlot) { - //int16 TitaniumCorpse; - return serverCorpseSlot; + int16 TitaniumSlot = invslot::SLOT_INVALID; + + if (serverCorpseSlot <= EQEmu::invslot::slotGeneral8 && serverCorpseSlot >= EQEmu::invslot::slotGeneral1) { + TitaniumSlot = serverCorpseSlot - 1; + } + + else if (serverCorpseSlot <= (EQEmu::invslot::POSSESSIONS_COUNT + EQEmu::invslot::slotWaist) && serverCorpseSlot >= EQEmu::invslot::slotCursor) { + TitaniumSlot = serverCorpseSlot - 3; + } + + else if (serverCorpseSlot == (EQEmu::invslot::POSSESSIONS_COUNT + EQEmu::invslot::slotAmmo)) { + TitaniumSlot = serverCorpseSlot - 4; + } + + Log(Logs::Detail, Logs::Netcode, "Convert Server Corpse Slot %i to Titanium Corpse Slot %i", serverCorpseSlot, TitaniumSlot); + + return TitaniumSlot; } static inline uint32 TitaniumToServerSlot(int16 titaniumSlot) { - //uint32 ServerSlot; - if (titaniumSlot == INVALID_INDEX) - return INVALID_INDEX; + uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; - return titaniumSlot; // deprecated + if (titaniumSlot <= invslot::slotWaist) { + ServerSlot = titaniumSlot; + } + + else if (titaniumSlot == invslot::slotAmmo) { + ServerSlot = titaniumSlot + 1; + } + + else if (titaniumSlot <= invslot::slotGeneral8 && titaniumSlot >= invslot::slotGeneral1) { + ServerSlot = titaniumSlot + 1; + } + + else if (titaniumSlot <= (invslot::POSSESSIONS_COUNT + invslot::slotWaist) && titaniumSlot >= invslot::slotCursor) { + ServerSlot = titaniumSlot + 3; + } + + else if (titaniumSlot == (invslot::POSSESSIONS_COUNT + invslot::slotAmmo)) { + ServerSlot = titaniumSlot + 4; + } + + else if (titaniumSlot <= invbag::GENERAL_BAGS_END && titaniumSlot >= invbag::GENERAL_BAGS_BEGIN) { + ServerSlot = titaniumSlot; + } + + else if (titaniumSlot <= invbag::CURSOR_BAG_END && titaniumSlot >= invbag::CURSOR_BAG_BEGIN) { + ServerSlot = titaniumSlot + 20; + } + + else if (titaniumSlot <= invslot::TRIBUTE_END && titaniumSlot >= invslot::TRIBUTE_BEGIN) { + ServerSlot = titaniumSlot; + } + + else if (titaniumSlot <= invslot::GUILD_TRIBUTE_END && titaniumSlot >= invslot::GUILD_TRIBUTE_BEGIN) { + ServerSlot = titaniumSlot; + } + + else if (titaniumSlot <= invslot::BANK_END && titaniumSlot >= invslot::BANK_BEGIN) { + ServerSlot = titaniumSlot; + } + + else if (titaniumSlot <= invbag::BANK_BAGS_END && titaniumSlot >= invbag::BANK_BAGS_BEGIN) { + ServerSlot = titaniumSlot; + } + + else if (titaniumSlot <= invslot::SHARED_BANK_END && titaniumSlot >= invslot::SHARED_BANK_BEGIN) { + ServerSlot = titaniumSlot; + } + + else if (titaniumSlot <= invbag::SHARED_BANK_BAGS_END && titaniumSlot >= invbag::SHARED_BANK_BAGS_BEGIN) { + ServerSlot = titaniumSlot; + } + + else if (titaniumSlot <= invslot::TRADE_END && titaniumSlot >= invslot::TRADE_BEGIN) { + ServerSlot = titaniumSlot; + } + + else if (titaniumSlot <= invbag::TRADE_BAGS_END && titaniumSlot >= invbag::TRADE_BAGS_BEGIN) { + ServerSlot = titaniumSlot; + } + + else if (titaniumSlot <= invslot::WORLD_END && titaniumSlot >= invslot::WORLD_BEGIN) { + ServerSlot = titaniumSlot; + } + + Log(Logs::Detail, Logs::Netcode, "Convert Titanium Slot %i to Server Slot %i", titaniumSlot, ServerSlot); + + return ServerSlot; } static inline uint32 TitaniumToServerCorpseSlot(int16 titaniumCorpseSlot) { - //uint32 ServerCorpse; - return titaniumCorpseSlot; + uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; + + if (titaniumCorpseSlot <= invslot::slotGeneral8 && titaniumCorpseSlot >= invslot::slotGeneral1) { + ServerSlot = titaniumCorpseSlot + 1; + } + + else if (titaniumCorpseSlot <= (invslot::POSSESSIONS_COUNT + invslot::slotWaist) && titaniumCorpseSlot >= invslot::slotCursor) { + ServerSlot = titaniumCorpseSlot + 3; + } + + else if (titaniumCorpseSlot == (invslot::POSSESSIONS_COUNT + invslot::slotAmmo)) { + ServerSlot = titaniumCorpseSlot + 4; + } + + Log(Logs::Detail, Logs::Netcode, "Convert Titanium Corpse Slot %i to Server Corpse Slot %i", titaniumCorpseSlot, ServerSlot); + + return ServerSlot; } static inline void ServerToTitaniumSayLink(std::string& titaniumSayLink, const std::string& serverSayLink) diff --git a/common/patches/uf.cpp b/common/patches/uf.cpp index 869685e47..437cf8cce 100644 --- a/common/patches/uf.cpp +++ b/common/patches/uf.cpp @@ -520,7 +520,7 @@ namespace UF for (int index = 0; index < item_count; ++index, ++eq) { SerializeItem(ob, (const EQEmu::ItemInstance*)eq->inst, eq->slot_id, 0); if (ob.tellp() == last_pos) - Log(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id); + Log(Logs::General, Logs::Netcode, "UF::ENCODE(OP_CharInventory) Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id); last_pos = ob.tellp(); } @@ -584,7 +584,12 @@ namespace UF FINISH_ENCODE(); } - ENCODE(OP_DeleteCharge) { ENCODE_FORWARD(OP_MoveItem); } + ENCODE(OP_DeleteCharge) + { + Log(Logs::Moderate, Logs::Netcode, "UF::ENCODE(OP_DeleteCharge)"); + + ENCODE_FORWARD(OP_MoveItem); + } ENCODE(OP_DeleteItem) { @@ -1272,7 +1277,7 @@ namespace UF SerializeItem(ob, (const EQEmu::ItemInstance*)int_struct->inst, int_struct->slot_id, 0); if (ob.tellp() == last_pos) { - Log(Logs::General, Logs::Netcode, "[STRUCTS] Serialization failed on item slot %d.", int_struct->slot_id); + Log(Logs::General, Logs::Netcode, "UF::ENCODE(OP_ItemPacket) Serialization failed on item slot %d.", int_struct->slot_id); delete in; return; } @@ -1345,6 +1350,8 @@ namespace UF ENCODE_LENGTH_EXACT(LootingItem_Struct); SETUP_DIRECT_ENCODE(LootingItem_Struct, structs::LootingItem_Struct); + Log(Logs::Moderate, Logs::Netcode, "UF::ENCODE(OP_LootItem)"); + OUT(lootee); OUT(looter); eq->slot_id = ServerToUFCorpseSlot(emu->slot_id); @@ -1510,6 +1517,8 @@ namespace UF ENCODE_LENGTH_EXACT(MoveItem_Struct); SETUP_DIRECT_ENCODE(MoveItem_Struct, structs::MoveItem_Struct); + Log(Logs::Moderate, Logs::Netcode, "UF::ENCODE(OP_MoveItem)"); + eq->from_slot = ServerToUFSlot(emu->from_slot); eq->to_slot = ServerToUFSlot(emu->to_slot); OUT(number_in_stack); @@ -1769,7 +1778,7 @@ namespace UF // OUT(unknown06160[4]); - // Copy bandoliers where server and client indexes converge + // Copy bandoliers where server and client indices converge for (r = 0; r < EQEmu::profile::BANDOLIERS_SIZE && r < profile::BANDOLIERS_SIZE; ++r) { OUT_str(bandoliers[r].Name); for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true @@ -1778,7 +1787,7 @@ namespace UF OUT_str(bandoliers[r].Items[k].Name); } } - // Nullify bandoliers where server and client indexes diverge, with a client bias + // Nullify bandoliers where server and client indices diverge, with a client bias for (r = EQEmu::profile::BANDOLIERS_SIZE; r < profile::BANDOLIERS_SIZE; ++r) { eq->bandoliers[r].Name[0] = '\0'; for (uint32 k = 0; k < profile::BANDOLIER_ITEM_COUNT; ++k) { // Will need adjusting if 'server != client' is ever true @@ -1790,13 +1799,13 @@ namespace UF // OUT(unknown07444[5120]); - // Copy potion belt where server and client indexes converge + // Copy potion belt where server and client indices converge for (r = 0; r < EQEmu::profile::POTION_BELT_SIZE && r < profile::POTION_BELT_SIZE; ++r) { OUT(potionbelt.Items[r].ID); OUT(potionbelt.Items[r].Icon); OUT_str(potionbelt.Items[r].Name); } - // Nullify potion belt where server and client indexes diverge, with a client bias + // Nullify potion belt where server and client indices diverge, with a client bias for (r = EQEmu::profile::POTION_BELT_SIZE; r < profile::POTION_BELT_SIZE; ++r) { eq->potionbelt.Items[r].ID = 0; eq->potionbelt.Items[r].Icon = 0; @@ -3496,6 +3505,8 @@ namespace UF DECODE_LENGTH_EXACT(structs::LootingItem_Struct); SETUP_DIRECT_DECODE(LootingItem_Struct, structs::LootingItem_Struct); + Log(Logs::Moderate, Logs::Netcode, "UF::DECODE(OP_LootItem)"); + IN(lootee); IN(looter); emu->slot_id = UFToServerCorpseSlot(eq->slot_id); @@ -3509,7 +3520,7 @@ namespace UF DECODE_LENGTH_EXACT(structs::MoveItem_Struct); SETUP_DIRECT_DECODE(MoveItem_Struct, structs::MoveItem_Struct); - Log(Logs::General, Logs::Netcode, "[UF] Moved item from %u to %u", eq->from_slot, eq->to_slot); + Log(Logs::Moderate, Logs::Netcode, "UF::DECODE(OP_MoveItem)"); emu->from_slot = UFToServerSlot(eq->from_slot); emu->to_slot = UFToServerSlot(eq->to_slot); @@ -3810,7 +3821,7 @@ namespace UF ibs.nodrop = item->NoDrop; ibs.attune = item->Attuneable; ibs.size = item->Size; - ibs.slots = SwapBits21And22(item->Slots); + ibs.slots = item->Slots; ibs.price = item->Price; ibs.icon = item->Icon; ibs.unknown1 = 1; @@ -4096,81 +4107,193 @@ namespace UF ob.write((const char*)&subitem_count, sizeof(uint32)); - for (uint32 index = EQEmu::invbag::SLOT_BEGIN; index <= EQEmu::invbag::SLOT_END; ++index) { - EQEmu::ItemInstance* sub = inst->GetItem(index); - if (!sub) - continue; + // moved outside of loop since it is not modified within that scope + int16 SubSlotNumber = EQEmu::invbag::SLOT_INVALID; - int SubSlotNumber = INVALID_INDEX; - if (slot_id_in >= EQEmu::invslot::GENERAL_BEGIN && slot_id_in <= EQEmu::invslot::GENERAL_END) - SubSlotNumber = (((slot_id_in + 3) * EQEmu::invbag::SLOT_COUNT) + index + 1); - else if (slot_id_in >= EQEmu::invslot::BANK_BEGIN && slot_id_in <= EQEmu::invslot::BANK_END) - SubSlotNumber = (((slot_id_in - EQEmu::invslot::BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::BANK_BAGS_BEGIN + index); - else if (slot_id_in >= EQEmu::invslot::SHARED_BANK_BEGIN && slot_id_in <= EQEmu::invslot::SHARED_BANK_END) - SubSlotNumber = (((slot_id_in - EQEmu::invslot::SHARED_BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT) + EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + index); - else - SubSlotNumber = slot_id_in; + if (slot_id_in <= EQEmu::invslot::slotGeneral8 && slot_id_in >= EQEmu::invslot::GENERAL_BEGIN) + SubSlotNumber = EQEmu::invbag::GENERAL_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::GENERAL_BEGIN) * EQEmu::invbag::SLOT_COUNT); + else if (slot_id_in <= EQEmu::invslot::GENERAL_END && slot_id_in >= EQEmu::invslot::slotGeneral9) + SubSlotNumber = EQEmu::invbag::SLOT_INVALID; + else if (slot_id_in == EQEmu::invslot::slotCursor) + SubSlotNumber = EQEmu::invbag::CURSOR_BAG_BEGIN; + else if (slot_id_in <= EQEmu::invslot::BANK_END && slot_id_in >= EQEmu::invslot::BANK_BEGIN) + SubSlotNumber = EQEmu::invbag::BANK_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT); + else if (slot_id_in <= EQEmu::invslot::SHARED_BANK_END && slot_id_in >= EQEmu::invslot::SHARED_BANK_BEGIN) + SubSlotNumber = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + ((slot_id_in - EQEmu::invslot::SHARED_BANK_BEGIN) * EQEmu::invbag::SLOT_COUNT); + else + SubSlotNumber = slot_id_in; // not sure if this is the best way to handle this..leaving for now - ob.write((const char*)&index, sizeof(uint32)); + if (SubSlotNumber != EQEmu::invbag::SLOT_INVALID) { + for (uint32 index = EQEmu::invbag::SLOT_BEGIN; index <= EQEmu::invbag::SLOT_END; ++index) { + EQEmu::ItemInstance* sub = inst->GetItem(index); + if (!sub) + continue; - SerializeItem(ob, sub, SubSlotNumber, (depth + 1)); - ++subitem_count; + ob.write((const char*)&index, sizeof(uint32)); + + SerializeItem(ob, sub, SubSlotNumber, (depth + 1)); + ++subitem_count; + } + + if (subitem_count) + ob.overwrite(count_pos, (const char*)&subitem_count, sizeof(uint32)); } - - if (subitem_count) - ob.overwrite(count_pos, (const char*)&subitem_count, sizeof(uint32)); } static inline uint32 ServerToUFSlot(uint32 serverSlot) { - uint32 UnderfootSlot = 0; + uint32 UFSlot = invslot::SLOT_INVALID; - if (serverSlot >= EQEmu::invslot::slotAmmo && serverSlot <= 53) // Cursor/Ammo/Power Source and Normal Inventory Slots - UnderfootSlot = serverSlot + 1; - else if (serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN && serverSlot <= EQEmu::invbag::CURSOR_BAG_END) - UnderfootSlot = serverSlot + 11; - else if (serverSlot >= EQEmu::invbag::BANK_BAGS_BEGIN && serverSlot <= EQEmu::invbag::BANK_BAGS_END) - UnderfootSlot = serverSlot + 1; - else if (serverSlot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN && serverSlot <= EQEmu::invbag::SHARED_BANK_BAGS_END) - UnderfootSlot = serverSlot + 1; - else if (serverSlot == EQEmu::invslot::SLOT_POWER_SOURCE) - UnderfootSlot = invslot::slotPowerSource; - else - UnderfootSlot = serverSlot; + if (serverSlot <= EQEmu::invslot::slotGeneral8) { + UFSlot = serverSlot; + } - return UnderfootSlot; + else if (serverSlot <= EQEmu::invslot::CORPSE_END && serverSlot >= EQEmu::invslot::slotCursor) { + UFSlot = serverSlot - 2; + } + + else if (serverSlot <= EQEmu::invbag::GENERAL_BAGS_8_END && serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { + UFSlot = serverSlot + 11; + } + + else if (serverSlot <= EQEmu::invbag::CURSOR_BAG_END && serverSlot >= EQEmu::invbag::CURSOR_BAG_BEGIN) { + UFSlot = serverSlot - 9; + } + + else if (serverSlot <= EQEmu::invslot::TRIBUTE_END && serverSlot >= EQEmu::invslot::TRIBUTE_BEGIN) { + UFSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invslot::GUILD_TRIBUTE_END && serverSlot >= EQEmu::invslot::GUILD_TRIBUTE_BEGIN) { + UFSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invslot::BANK_END && serverSlot >= EQEmu::invslot::BANK_BEGIN) { + UFSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invbag::BANK_BAGS_END && serverSlot >= EQEmu::invbag::BANK_BAGS_BEGIN) { + UFSlot = serverSlot + 1; + } + + else if (serverSlot <= EQEmu::invslot::SHARED_BANK_END && serverSlot >= EQEmu::invslot::SHARED_BANK_BEGIN) { + UFSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invbag::SHARED_BANK_BAGS_END && serverSlot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN) { + UFSlot = serverSlot + 1; + } + + else if (serverSlot <= EQEmu::invslot::TRADE_END && serverSlot >= EQEmu::invslot::TRADE_BEGIN) { + UFSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invbag::TRADE_BAGS_END && serverSlot >= EQEmu::invbag::TRADE_BAGS_BEGIN) { + UFSlot = serverSlot; + } + + else if (serverSlot <= EQEmu::invslot::WORLD_END && serverSlot >= EQEmu::invslot::WORLD_BEGIN) { + UFSlot = serverSlot; + } + + Log(Logs::Detail, Logs::Netcode, "Convert Server Slot %i to UF Slot %i", serverSlot, UFSlot); + + return UFSlot; } static inline uint32 ServerToUFCorpseSlot(uint32 serverCorpseSlot) { - //uint32 UnderfootCorpse; - return (serverCorpseSlot + 1); + uint32 UFSlot = invslot::SLOT_INVALID; + + if (serverCorpseSlot <= EQEmu::invslot::slotGeneral8 && serverCorpseSlot >= EQEmu::invslot::slotGeneral1) { + UFSlot = serverCorpseSlot; + } + + else if (serverCorpseSlot <= EQEmu::invslot::CORPSE_END && serverCorpseSlot >= EQEmu::invslot::slotCursor) { + UFSlot = serverCorpseSlot - 2; + } + + Log(Logs::Detail, Logs::Netcode, "Convert Server Corpse Slot %i to UF Corpse Slot %i", serverCorpseSlot, UFSlot); + + return UFSlot; } static inline uint32 UFToServerSlot(uint32 ufSlot) { - uint32 ServerSlot = 0; + uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; - if (ufSlot >= invslot::slotAmmo && ufSlot <= invslot::CORPSE_END) // Cursor/Ammo/Power Source and Normal Inventory Slots - ServerSlot = ufSlot - 1; - else if (ufSlot >= invbag::GENERAL_BAGS_BEGIN && ufSlot <= invbag::CURSOR_BAG_END) - ServerSlot = ufSlot - 11; - else if (ufSlot >= invbag::BANK_BAGS_BEGIN && ufSlot <= invbag::BANK_BAGS_END) - ServerSlot = ufSlot - 1; - else if (ufSlot >= invbag::SHARED_BANK_BAGS_BEGIN && ufSlot <= invbag::SHARED_BANK_BAGS_END) - ServerSlot = ufSlot - 1; - else if (ufSlot == invslot::slotPowerSource) - ServerSlot = EQEmu::invslot::SLOT_POWER_SOURCE; - else + if (ufSlot <= invslot::slotGeneral8) { ServerSlot = ufSlot; + } + + else if (ufSlot <= invslot::CORPSE_END && ufSlot >= invslot::slotCursor) { + ServerSlot = ufSlot + 2; + } + + else if (ufSlot <= invbag::GENERAL_BAGS_END && ufSlot >= invbag::GENERAL_BAGS_BEGIN) { + ServerSlot = ufSlot - 11; + } + + else if (ufSlot <= invbag::CURSOR_BAG_END && ufSlot >= invbag::CURSOR_BAG_BEGIN) { + ServerSlot = ufSlot + 9; + } + + else if (ufSlot <= invslot::TRIBUTE_END && ufSlot >= invslot::TRIBUTE_BEGIN) { + ServerSlot = ufSlot; + } + + else if (ufSlot <= invslot::GUILD_TRIBUTE_END && ufSlot >= invslot::GUILD_TRIBUTE_BEGIN) { + ServerSlot = ufSlot; + } + + else if (ufSlot <= invslot::BANK_END && ufSlot >= invslot::BANK_BEGIN) { + ServerSlot = ufSlot; + } + + else if (ufSlot <= invbag::BANK_BAGS_END && ufSlot >= invbag::BANK_BAGS_BEGIN) { + ServerSlot = ufSlot - 1; + } + + else if (ufSlot <= invslot::SHARED_BANK_END && ufSlot >= invslot::SHARED_BANK_BEGIN) { + ServerSlot = ufSlot; + } + + else if (ufSlot <= invbag::SHARED_BANK_BAGS_END && ufSlot >= invbag::SHARED_BANK_BAGS_BEGIN) { + ServerSlot = ufSlot - 1; + } + + else if (ufSlot <= invslot::TRADE_END && ufSlot >= invslot::TRADE_BEGIN) { + ServerSlot = ufSlot; + } + + else if (ufSlot <= invbag::TRADE_BAGS_END && ufSlot >= invbag::TRADE_BAGS_BEGIN) { + ServerSlot = ufSlot; + } + + else if (ufSlot <= invslot::WORLD_END && ufSlot >= invslot::WORLD_BEGIN) { + ServerSlot = ufSlot; + } + + Log(Logs::Detail, Logs::Netcode, "Convert UF Slot %i to Server Slot %i", ufSlot, ServerSlot); return ServerSlot; } static inline uint32 UFToServerCorpseSlot(uint32 ufCorpseSlot) { - //uint32 ServerCorpse; - return (ufCorpseSlot - 1); + uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; + + if (ufCorpseSlot <= invslot::slotGeneral8 && ufCorpseSlot >= invslot::slotGeneral1) { + ServerSlot = ufCorpseSlot; + } + + else if (ufCorpseSlot <= invslot::CORPSE_END && ufCorpseSlot >= invslot::slotCursor) { + ServerSlot = ufCorpseSlot + 2; + } + + Log(Logs::Detail, Logs::Netcode, "Convert UF Corpse Slot %i to Server Corpse Slot %i", ufCorpseSlot, ServerSlot); + + return ServerSlot; } static inline void ServerToUFSayLink(std::string& ufSayLink, const std::string& serverSayLink) diff --git a/common/shareddb.cpp b/common/shareddb.cpp index 00fdaea96..2d0e50125 100644 --- a/common/shareddb.cpp +++ b/common/shareddb.cpp @@ -547,9 +547,12 @@ bool SharedDatabase::GetSharedBank(uint32 id, EQEmu::InventoryProfile *inv, bool return true; } -// Overloaded: Retrieve character inventory based on character id +// Overloaded: Retrieve character inventory based on character id (zone entry) bool SharedDatabase::GetInventory(uint32 char_id, EQEmu::InventoryProfile *inv) { + if (!char_id || !inv) + return false; + // Retrieve character inventory std::string query = StringFormat("SELECT slotid, itemid, charges, color, augslot1, augslot2, augslot3, augslot4, augslot5, " @@ -566,8 +569,40 @@ bool SharedDatabase::GetInventory(uint32 char_id, EQEmu::InventoryProfile *inv) auto timestamps = GetItemRecastTimestamps(char_id); + auto cv_conflict = false; + auto pmask = inv->GetLookup()->PossessionsBitmask; + auto bank_size = inv->GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]; + for (auto row = results.begin(); row != results.end(); ++row) { int16 slot_id = atoi(row[0]); + + if (slot_id <= EQEmu::invslot::POSSESSIONS_END && slot_id >= EQEmu::invslot::POSSESSIONS_BEGIN) { // Titanium thru UF check + if ((((uint64)1 << slot_id) & pmask) == 0) { + cv_conflict = true; + continue; + } + } + else if (slot_id <= EQEmu::invbag::GENERAL_BAGS_END && slot_id >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { // Titanium thru UF check + auto parent_slot = EQEmu::invslot::GENERAL_BEGIN + ((slot_id - EQEmu::invbag::GENERAL_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT); + if ((((uint64)1 << parent_slot) & pmask) == 0) { + cv_conflict = true; + continue; + } + } + else if (slot_id <= EQEmu::invslot::BANK_END && slot_id >= EQEmu::invslot::BANK_BEGIN) { // Titanium check + if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= bank_size) { + cv_conflict = true; + continue; + } + } + else if (slot_id <= EQEmu::invbag::BANK_BAGS_END && slot_id >= EQEmu::invbag::BANK_BAGS_BEGIN) { // Titanium check + auto parent_index = ((slot_id - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT); + if (parent_index < EQEmu::invslot::SLOT_BEGIN || parent_index >= bank_size) { + cv_conflict = true; + continue; + } + } + uint32 item_id = atoi(row[1]); uint16 charges = atoi(row[2]); uint32 color = atoul(row[3]); @@ -633,10 +668,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, EQEmu::InventoryProfile *inv) inst->SetOrnamentationIDFile(ornament_idfile); inst->SetOrnamentHeroModel(item->HerosForgeModel); - if (instnodrop || - (((slot_id >= EQEmu::invslot::EQUIPMENT_BEGIN && slot_id <= EQEmu::invslot::EQUIPMENT_END) || - slot_id == EQEmu::invslot::SLOT_POWER_SOURCE) && - inst->GetItem()->Attuneable)) + if (instnodrop || (inst->GetItem()->Attuneable && slot_id >= EQEmu::invslot::EQUIPMENT_BEGIN && slot_id <= EQEmu::invslot::EQUIPMENT_END)) inst->SetAttuned(true); if (color > 0) @@ -684,13 +716,22 @@ bool SharedDatabase::GetInventory(uint32 char_id, EQEmu::InventoryProfile *inv) char_id, item_id, slot_id); } } + + if (cv_conflict) { + char char_name[64] = ""; + GetCharName(char_id, char_name); + Log(Logs::General, Logs::Client_Login, + "ClientVersion conflict during inventory load at zone entry for '%s' (charid: %u, inver: %s)", + char_name, char_id, EQEmu::versions::MobVersionName(inv->InventoryVersion()) + ); // this can be changed to moderate after live testing + } // Retrieve shared inventory return GetSharedBank(char_id, inv, true); } -// Overloaded: Retrieve character inventory based on account_id and character name -bool SharedDatabase::GetInventory(uint32 account_id, char *name, EQEmu::InventoryProfile *inv) +// Overloaded: Retrieve character inventory based on account_id and character name (char select) +bool SharedDatabase::GetInventory(uint32 account_id, char *name, EQEmu::InventoryProfile *inv) // deprecated { // Retrieve character inventory std::string query = diff --git a/common/shareddb.h b/common/shareddb.h index bbd8dc9a0..f6b1879df 100644 --- a/common/shareddb.h +++ b/common/shareddb.h @@ -89,7 +89,7 @@ class SharedDatabase : public Database int32 GetSharedPlatinum(uint32 account_id); bool SetSharedPlatinum(uint32 account_id, int32 amount_to_add); bool GetInventory(uint32 char_id, EQEmu::InventoryProfile* inv); - bool GetInventory(uint32 account_id, char* name, EQEmu::InventoryProfile* inv); + bool GetInventory(uint32 account_id, char* name, EQEmu::InventoryProfile* inv); // deprecated std::map GetItemRecastTimestamps(uint32 char_id); uint32 GetItemRecastTimestamp(uint32 char_id, uint32 recast_type); void ClearOldRecastTimestamps(uint32 char_id); diff --git a/common/version.h b/common/version.h index b95c8ec1d..8653e2e9d 100644 --- a/common/version.h +++ b/common/version.h @@ -30,9 +30,9 @@ Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt */ -#define CURRENT_BINARY_DATABASE_VERSION 9125 +#define CURRENT_BINARY_DATABASE_VERSION 9127 #ifdef BOTS - #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9019 + #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9020 #else #define CURRENT_BINARY_BOTS_DATABASE_VERSION 0 // must be 0 #endif diff --git a/utils/sql/data_tables.txt b/utils/sql/data_tables.txt index 76938a8d2..0638c3bd5 100644 --- a/utils/sql/data_tables.txt +++ b/utils/sql/data_tables.txt @@ -1,4 +1,5 @@ command_settings +inventory_version launcher rule_sets rule_values diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index 22a593176..b844ddfa8 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -379,6 +379,8 @@ 9123|2018_07_07_data_buckets.sql|SHOW TABLES LIKE 'data_buckets'|empty| 9124|2018_07_09_tasks.sql|SHOW COLUMNS FROM `tasks` LIKE 'type'|empty| 9125|2018_07_20_task_emote.sql|SHOW COLUMNS FROM `tasks` LIKE 'completion_emote'|empty| +9126|2018_08_13_inventory_version_update.sql|SHOW COLUMNS FROM `inventory_version` LIKE 'bot_step'|empty| +9127|2018_08_13_inventory_update.sql|SELECT * FROM `inventory_version` WHERE `version` = 2 and `step` = 0|not_empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/utils/sql/git/bots/bots_db_update_manifest.txt b/utils/sql/git/bots/bots_db_update_manifest.txt index 2bf71af18..3e7b3032b 100644 --- a/utils/sql/git/bots/bots_db_update_manifest.txt +++ b/utils/sql/git/bots/bots_db_update_manifest.txt @@ -18,6 +18,7 @@ 9017|2017_03_26_bots_spells_id_fix_for_saved_shadowknight_bots.sql|SELECT * FROM `bot_data` WHERE `class` = '5' AND `spells_id` = '3004'|not_empty| 9018|2018_02_02_Bot_Spells_Min_Max_HP.sql|SHOW COLUMNS FROM `bot_spells_entries` LIKE 'min_hp'|empty| 9019|2018_04_12_bots_stop_melee_level.sql|SHOW COLUMNS FROM `bot_data` LIKE 'stop_melee_level'|empty| +9020|2018_08_13_bots_inventory_update.sql|SELECT * FROM `inventory_version` WHERE `version` = 2 and `bot_step` = 0|not_empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/utils/sql/git/bots/required/2018_08_13_bots_inventory_update.sql b/utils/sql/git/bots/required/2018_08_13_bots_inventory_update.sql new file mode 100644 index 000000000..07f5446aa --- /dev/null +++ b/utils/sql/git/bots/required/2018_08_13_bots_inventory_update.sql @@ -0,0 +1,5 @@ +-- update `bot_inventories` slots +UPDATE `bot_inventories` SET `slot_id` = 22 WHERE `slot_id` = 21; -- adjust ammo slot +UPDATE `bot_inventories` SET `slot_id` = 21 WHERE `slot_id` = 9999; -- adjust powersource slot + +UPDATE `inventory_version` SET `bot_step` = 1 WHERE `version` = 2; \ No newline at end of file diff --git a/utils/sql/git/required/2018_08_13_inventory_update.sql b/utils/sql/git/required/2018_08_13_inventory_update.sql new file mode 100644 index 000000000..646b1f80e --- /dev/null +++ b/utils/sql/git/required/2018_08_13_inventory_update.sql @@ -0,0 +1,45 @@ +-- update equipable slots in `items` table +SELECT 'pre-transform count..', +(SELECT COUNT(id) FROM `items` WHERE `slots` & (3 << 21)) total, +(SELECT COUNT(id) FROM `items` WHERE `slots` & (1 << 21)) bit21, +(SELECT COUNT(id) FROM `items` WHERE `slots` & (1 << 22)) bit22; + +UPDATE `items` SET `slots` = (`slots` ^ (3 << 21)) WHERE (`slots` & (3 << 21)) IN ((1 << 21), (1 << 22)); -- transform + +SELECT 'post-transform count..', +(SELECT COUNT(id) FROM `items` WHERE `slots` & (3 << 21)) total, +(SELECT COUNT(id) FROM `items` WHERE `slots` & (1 << 21)) bit21, +(SELECT COUNT(id) FROM `items` WHERE `slots` & (1 << 22)) bit22; + + +-- update `inventory` slots +UPDATE `inventory` SET `slotid` = 33 WHERE `slotid` = 30; -- adjust cursor +UPDATE `inventory` SET `slotid` = (`slotid` + 20) WHERE `slotid` >= 331 AND `slotid` <= 340; -- adjust cursor bags +UPDATE `inventory` SET `slotid` = (`slotid` + 1) WHERE `slotid` >= 22 AND `slotid` <= 29; -- adjust general slots +-- current general bags remain the same +UPDATE `inventory` SET `slotid` = 22 WHERE `slotid` = 21; -- adjust ammo slot +UPDATE `inventory` SET `slotid` = 21 WHERE `slotid` = 9999; -- adjust powersource slot + + +-- update `inventory_snapshots` slots +UPDATE `inventory_snapshots` SET `slotid` = 33 WHERE `slotid` = 30; -- adjust cursor +UPDATE `inventory_snapshots` SET `slotid` = (`slotid` + 20) WHERE `slotid` >= 331 AND `slotid` <= 340; -- adjust cursor bags +UPDATE `inventory_snapshots` SET `slotid` = (`slotid` + 1) WHERE `slotid` >= 22 AND `slotid` <= 29; -- adjust general slots +-- current general bags remain the same +UPDATE `inventory_snapshots` SET `slotid` = 22 WHERE `slotid` = 21; -- adjust ammo slot +UPDATE `inventory_snapshots` SET `slotid` = 21 WHERE `slotid` = 9999; -- adjust powersource slot + + +-- update `character_corpse_items` slots +UPDATE `character_corpse_items` SET `equip_slot` = 33 WHERE `equip_slot` = 30; -- adjust cursor +UPDATE `character_corpse_items` SET `equip_slot` = (`equip_slot` + 20) WHERE `equip_slot` >= 331 AND `equip_slot` <= 340; -- adjust cursor bags +UPDATE `character_corpse_items` SET `equip_slot` = (`equip_slot` + 1) WHERE `equip_slot` >= 22 AND `equip_slot` <= 29; -- adjust general slots +-- current general bags remain the same +UPDATE `character_corpse_items` SET `equip_slot` = 22 WHERE `equip_slot` = 21; -- adjust ammo slot +UPDATE `character_corpse_items` SET `equip_slot` = 21 WHERE `equip_slot` = 9999; -- adjust powersource slot + + +-- update `character_pet_inventory` slots +UPDATE `character_pet_inventory` SET `slot` = 22 WHERE `slot` = 21; -- adjust ammo slot + +UPDATE `inventory_version` SET `step` = 1 WHERE `version` = 2; diff --git a/utils/sql/git/required/2018_08_13_inventory_version_update.sql b/utils/sql/git/required/2018_08_13_inventory_version_update.sql new file mode 100644 index 000000000..ac7a7263c --- /dev/null +++ b/utils/sql/git/required/2018_08_13_inventory_version_update.sql @@ -0,0 +1 @@ +ALTER TABLE `inventory_version` ADD COLUMN `bot_step` INT(11) UNSIGNED NOT NULL DEFAULT '0' AFTER `step`; diff --git a/world/client.cpp b/world/client.cpp index f8b4fe3f4..d3b477286 100644 --- a/world/client.cpp +++ b/world/client.cpp @@ -252,7 +252,7 @@ void Client::SendMembership() { mc->entries[1] = 0xffffffff; // Max Level Restriction mc->entries[2] = 0xffffffff; // Max Char Slots per Account (not used by client?) mc->entries[3] = 0xffffffff; // 1 for Silver - mc->entries[4] = 8; // Main Inventory Size (0xffffffff on Live for Gold, but limiting to 8 until 10 is supported) + mc->entries[4] = 0xffffffff; // Main Inventory Size (0xffffffff on Live for Gold, but limiting to 8 until 10 is supported) mc->entries[5] = 0xffffffff; // Max Platinum per level mc->entries[6] = 1; // 0 for Silver mc->entries[7] = 1; // 0 for Silver @@ -1442,6 +1442,7 @@ bool Client::OPCharCreate(char *name, CharCreate_Struct *cc) PlayerProfile_Struct pp; ExtendedProfile_Struct ext; EQEmu::InventoryProfile inv; + inv.SetInventoryVersion(EQEmu::versions::ConvertClientVersionBitToClientVersion(m_ClientVersionBit)); time_t bday = time(nullptr); char startzone[50]={0}; uint32 i; diff --git a/world/worlddb.cpp b/world/worlddb.cpp index 67b0eab38..830f0bfc3 100644 --- a/world/worlddb.cpp +++ b/world/worlddb.cpp @@ -97,6 +97,7 @@ void WorldDatabase::GetCharSelectInfo(uint32 accountID, EQApplicationPacket **ou CharacterSelectEntry_Struct *cse = (CharacterSelectEntry_Struct *)buff_ptr; PlayerProfile_Struct pp; EQEmu::InventoryProfile inv; + inv.SetInventoryVersion(client_version); uint32 character_id = (uint32)atoi(row[0]); uint8 has_home = 0; uint8 has_bind = 0; @@ -243,7 +244,7 @@ void WorldDatabase::GetCharSelectInfo(uint32 accountID, EQApplicationPacket **ou /* Load Inventory */ // If we ensure that the material data is updated appropriately, we can do away with inventory loads - if (GetInventory(accountID, cse->Name, &inv)) { + if (GetCharSelInventory(accountID, cse->Name, &inv)) { const EQEmu::ItemData* item = nullptr; const EQEmu::ItemInstance* inst = nullptr; int16 invslot = 0; @@ -590,3 +591,143 @@ bool WorldDatabase::LoadCharacterCreateCombos() return true; } + +// this is a slightly modified version of SharedDatabase::GetInventory(...) for character select use-only +bool WorldDatabase::GetCharSelInventory(uint32 account_id, char *name, EQEmu::InventoryProfile *inv) +{ + if (!account_id || !name || !inv) + return false; + + std::string query = StringFormat( + "SELECT" + " slotid," + " itemid," + " charges," + " color," + " augslot1," + " augslot2," + " augslot3," + " augslot4," + " augslot5," + " augslot6," + " instnodrop," + " custom_data," + " ornamenticon," + " ornamentidfile," + " ornament_hero_model " + "FROM" + " inventory " + "INNER JOIN" + " character_data ch " + "ON" + " ch.id = charid " + "WHERE" + " ch.name = '%s' " + "AND" + " ch.account_id = %i " + "AND" + " slotid >= %i " + "AND" + " slotid <= %i", + name, + account_id, + EQEmu::invslot::slotHead, + EQEmu::invslot::slotFeet + ); + auto results = QueryDatabase(query); + if (!results.Success()) + return false; + + for (auto row = results.begin(); row != results.end(); ++row) { + int16 slot_id = atoi(row[0]); + + switch (slot_id) { + case EQEmu::invslot::slotFace: + case EQEmu::invslot::slotEar2: + case EQEmu::invslot::slotNeck: + case EQEmu::invslot::slotShoulders: + case EQEmu::invslot::slotBack: + case EQEmu::invslot::slotFinger1: + case EQEmu::invslot::slotFinger2: + continue; + default: + break; + } + + uint32 item_id = atoi(row[1]); + int8 charges = atoi(row[2]); + uint32 color = atoul(row[3]); + + uint32 aug[EQEmu::invaug::SOCKET_COUNT]; + aug[0] = (uint32)atoi(row[4]); + aug[1] = (uint32)atoi(row[5]); + aug[2] = (uint32)atoi(row[6]); + aug[3] = (uint32)atoi(row[7]); + aug[4] = (uint32)atoi(row[8]); + aug[5] = (uint32)atoi(row[9]); + + bool instnodrop = ((row[10] && (uint16)atoi(row[10])) ? true : false); + uint32 ornament_icon = (uint32)atoul(row[12]); + uint32 ornament_idfile = (uint32)atoul(row[13]); + uint32 ornament_hero_model = (uint32)atoul(row[14]); + + const EQEmu::ItemData *item = GetItem(item_id); + if (!item) + continue; + + EQEmu::ItemInstance *inst = CreateBaseItem(item, charges); + + if (inst == nullptr) + continue; + + inst->SetAttuned(instnodrop); + + if (row[11]) { + std::string data_str(row[11]); + std::string idAsString; + std::string value; + bool use_id = true; + + for (int i = 0; i < data_str.length(); ++i) { + if (data_str[i] == '^') { + if (!use_id) { + inst->SetCustomData(idAsString, value); + idAsString.clear(); + value.clear(); + } + + use_id = !use_id; + continue; + } + + char v = data_str[i]; + if (use_id) + idAsString.push_back(v); + else + value.push_back(v); + } + } + + inst->SetOrnamentIcon(ornament_icon); + inst->SetOrnamentationIDFile(ornament_idfile); + inst->SetOrnamentHeroModel(item->HerosForgeModel); + + if (color > 0) + inst->SetColor(color); + + inst->SetCharges(charges); + + if (item->IsClassCommon()) { + for (int i = EQEmu::invaug::SOCKET_BEGIN; i <= EQEmu::invaug::SOCKET_END; i++) { + if (aug[i]) + inst->PutAugment(this, i, aug[i]); + } + } + + inv->PutItem(slot_id, *inst); + + safe_delete(inst); + } + + return true; +} diff --git a/world/worlddb.h b/world/worlddb.h index 2afd69920..036c0dc40 100644 --- a/world/worlddb.h +++ b/world/worlddb.h @@ -41,6 +41,8 @@ public: private: void SetTitaniumDefaultStartZone(PlayerProfile_Struct* in_pp, CharCreate_Struct* in_cc); void SetSoFDefaultStartZone(PlayerProfile_Struct* in_pp, CharCreate_Struct* in_cc); + + bool GetCharSelInventory(uint32 account_id, char* name, EQEmu::InventoryProfile* inv); }; extern WorldDatabase database; diff --git a/zone/bonuses.cpp b/zone/bonuses.cpp index b6de679d1..e71c6e0d5 100644 --- a/zone/bonuses.cpp +++ b/zone/bonuses.cpp @@ -179,14 +179,6 @@ void Client::CalcItemBonuses(StatBonuses* newbon) { SetTwoHanderEquipped(true); } - //Power Source Slot - if (ClientVersion() >= EQEmu::versions::ClientVersion::SoF) - { - const EQEmu::ItemInstance* inst = m_inv[EQEmu::invslot::SLOT_POWER_SOURCE]; - if(inst) - AddItemBonuses(inst, newbon); - } - //tribute items for (i = EQEmu::invslot::TRIBUTE_BEGIN; i <= EQEmu::invslot::TRIBUTE_END; i++) { const EQEmu::ItemInstance* inst = m_inv[i]; @@ -3261,7 +3253,7 @@ void NPC::CalcItemBonuses(StatBonuses *newbon) { if(newbon){ - for (int i = EQEmu::invslot::EQUIPMENT_BEGIN; i <= EQEmu::invslot::EQUIPMENT_END; i++){ + for (int i = EQEmu::invslot::BONUS_BEGIN; i <= EQEmu::invslot::BONUS_STAT_END; i++){ const EQEmu::ItemData *cur = database.GetItem(equipment[i]); if(cur){ //basic stats @@ -3353,13 +3345,6 @@ void Client::CalcItemScale() { if (CalcItemScale(EQEmu::invslot::TRIBUTE_BEGIN, EQEmu::invslot::TRIBUTE_END)) // (< 405) changed = true; - //Power Source Slot - if (ClientVersion() >= EQEmu::versions::ClientVersion::SoF) - { - if (CalcItemScale(EQEmu::invslot::SLOT_POWER_SOURCE, EQEmu::invslot::SLOT_POWER_SOURCE)) - changed = true; - } - if(changed) { CalcBonuses(); @@ -3447,13 +3432,6 @@ void Client::DoItemEnterZone() { if (DoItemEnterZone(EQEmu::invslot::TRIBUTE_BEGIN, EQEmu::invslot::TRIBUTE_END)) // (< 405) changed = true; - //Power Source Slot - if (ClientVersion() >= EQEmu::versions::ClientVersion::SoF) - { - if (DoItemEnterZone(EQEmu::invslot::SLOT_POWER_SOURCE, EQEmu::invslot::SLOT_POWER_SOURCE)) - changed = true; - } - if(changed) { CalcBonuses(); @@ -3486,7 +3464,7 @@ bool Client::DoItemEnterZone(uint32 slot_x, uint32 slot_y) { uint16 oldexp = inst->GetExp(); parse->EventItem(EVENT_ITEM_ENTER_ZONE, this, inst, nullptr, "", 0); - if (i <= EQEmu::invslot::slotAmmo || i == EQEmu::invslot::SLOT_POWER_SOURCE) { + if (i <= EQEmu::invslot::EQUIPMENT_END) { parse->EventItem(EVENT_EQUIP_ITEM, this, inst, nullptr, "", i); } @@ -3496,7 +3474,7 @@ bool Client::DoItemEnterZone(uint32 slot_x, uint32 slot_y) { update_slot = true; } } else { - if (i <= EQEmu::invslot::slotAmmo || i == EQEmu::invslot::SLOT_POWER_SOURCE) { + if (i <= EQEmu::invslot::EQUIPMENT_END) { parse->EventItem(EVENT_EQUIP_ITEM, this, inst, nullptr, "", i); } diff --git a/zone/bot.cpp b/zone/bot.cpp index 4c982d7ac..f0b28f12e 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -38,6 +38,8 @@ Bot::Bot(NPCType npcTypeData, Client* botOwner) : NPC(&npcTypeData, nullptr, glm this->_botOwnerCharacterID = 0; } + m_inv.SetInventoryVersion(EQEmu::versions::MobVersion::Bot); + _guildRank = 0; _guildId = 0; _lastTotalPlayTime = 0; @@ -109,6 +111,8 @@ Bot::Bot(uint32 botID, uint32 botOwnerCharacterID, uint32 botSpellsID, double to auto bot_owner = GetBotOwner(); + m_inv.SetInventoryVersion(EQEmu::versions::MobVersion::Bot); + _guildRank = 0; _guildId = 0; _lastTotalPlayTime = totalPlayTime; @@ -3658,15 +3662,13 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli ClientReturn(const ItemInstance* item, int16 from, const char* name = "") : returnItemInstance(item), fromBotSlot(from), toClientSlot(invslot::SLOT_INVALID), adjustStackSize(0), failedItemName(name) { } }; - static const int16 proxyPowerSource = 22; - - static const int16 bot_equip_order[(invslot::CORPSE_BEGIN + 1)] = { + static const int16 bot_equip_order[invslot::EQUIPMENT_COUNT] = { invslot::slotCharm, invslot::slotEar1, invslot::slotHead, invslot::slotFace, invslot::slotEar2, invslot::slotNeck, invslot::slotShoulders, invslot::slotArms, invslot::slotBack, invslot::slotWrist1, invslot::slotWrist2, invslot::slotRange, invslot::slotHands, invslot::slotPrimary, invslot::slotSecondary, invslot::slotFinger1, invslot::slotFinger2, invslot::slotChest, invslot::slotLegs, invslot::slotFeet, - invslot::slotWaist, invslot::slotAmmo, proxyPowerSource // invslot::SLOT_POWER_SOURCE + invslot::slotWaist, invslot::slotPowerSource, invslot::slotAmmo }; enum { stageStackable = 0, stageEmpty, stageReplaceable }; @@ -3802,9 +3804,7 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli //} if (stage_loop != stageReplaceable) { - if ((index == proxyPowerSource) && m_inv[invslot::SLOT_POWER_SOURCE]) - continue; - else if (m_inv[index]) + if (m_inv[index]) continue; } @@ -3853,18 +3853,10 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli } } - if (index == proxyPowerSource) { - trade_iterator.toBotSlot = invslot::SLOT_POWER_SOURCE; + trade_iterator.toBotSlot = index; - if (m_inv[invslot::SLOT_POWER_SOURCE]) - client_return.push_back(ClientReturn(m_inv[invslot::SLOT_POWER_SOURCE], invslot::SLOT_POWER_SOURCE)); - } - else { - trade_iterator.toBotSlot = index; - - if (m_inv[index]) - client_return.push_back(ClientReturn(m_inv[index], index)); - } + if (m_inv[index]) + client_return.push_back(ClientReturn(m_inv[index], index)); break; } @@ -4649,6 +4641,7 @@ int32 Bot::GetBotFocusEffect(BotfocusType bottype, uint16 spell_id) { int32 focus_max = 0; int32 focus_max_real = 0; //item focus + // are focus effects the same as bonus? (slotAmmo-excluded) for (int x = EQEmu::invslot::EQUIPMENT_BEGIN; x <= EQEmu::invslot::EQUIPMENT_END; x++) { TempItem = nullptr; EQEmu::ItemInstance* ins = GetBotItem(x); @@ -7604,10 +7597,7 @@ void Bot::ProcessBotInspectionRequest(Bot* inspectedBot, Client* client) { const EQEmu::ItemData* item = nullptr; const EQEmu::ItemInstance* inst = nullptr; - // Modded to display power source items (will only show up on SoF+ client inspect windows though.) - // I don't think bots are currently coded to use them..but, you'll have to use '#bot inventory list' - // to see them on a Titanium client when/if they are activated. - for (int16 L = EQEmu::invslot::EQUIPMENT_BEGIN; L <= EQEmu::invslot::slotWaist; L++) { + for (int16 L = EQEmu::invslot::EQUIPMENT_BEGIN; L <= EQEmu::invslot::EQUIPMENT_END; L++) { inst = inspectedBot->GetBotItem(L); if(inst) { @@ -7616,33 +7606,15 @@ void Bot::ProcessBotInspectionRequest(Bot* inspectedBot, Client* client) { strcpy(insr->itemnames[L], item->Name); insr->itemicons[L] = item->Icon; } - else + else { + insr->itemnames[L][0] = '\0'; insr->itemicons[L] = 0xFFFFFFFF; + } } - } - - inst = inspectedBot->GetBotItem(EQEmu::invslot::SLOT_POWER_SOURCE); - - if(inst) { - item = inst->GetItem(); - if(item) { - strcpy(insr->itemnames[SoF::invslot::slotPowerSource], item->Name); - insr->itemicons[SoF::invslot::slotPowerSource] = item->Icon; + else { + insr->itemnames[L][0] = '\0'; + insr->itemicons[L] = 0xFFFFFFFF; } - else - insr->itemicons[SoF::invslot::slotPowerSource] = 0xFFFFFFFF; - } - - inst = inspectedBot->GetBotItem(EQEmu::invslot::slotAmmo); - - if(inst) { - item = inst->GetItem(); - if(item) { - strcpy(insr->itemnames[SoF::invslot::slotAmmo], item->Name); - insr->itemicons[SoF::invslot::slotAmmo] = item->Icon; - } - else - insr->itemicons[SoF::invslot::slotAmmo] = 0xFFFFFFFF; } strcpy(insr->text, inspectedBot->GetInspectMessage().text); @@ -7655,8 +7627,8 @@ void Bot::CalcItemBonuses(StatBonuses* newbon) { const EQEmu::ItemData* itemtmp = nullptr; - for (int i = EQEmu::invslot::EQUIPMENT_BEGIN; i <= (EQEmu::invslot::EQUIPMENT_END + 1); ++i) { - const EQEmu::ItemInstance* item = GetBotItem((i == 22 ? 9999 : i)); + for (int i = EQEmu::invslot::BONUS_BEGIN; i <= EQEmu::invslot::BONUS_STAT_END; ++i) { + const EQEmu::ItemInstance* item = GetBotItem(i); if(item) { AddItemBonuses(item, newbon); } diff --git a/zone/bot.h b/zone/bot.h index 0c48b6483..4089b83ae 100644 --- a/zone/bot.h +++ b/zone/bot.h @@ -80,33 +80,33 @@ static const std::string bot_stance_name[BOT_STANCE_COUNT] = { static const char* GetBotStanceName(int stance_id) { return bot_stance_name[VALIDBOTSTANCE(stance_id)].c_str(); } -#define VALIDBOTEQUIPSLOT(x) ((x >= EQEmu::invslot::EQUIPMENT_BEGIN && x <= EQEmu::invslot::EQUIPMENT_END) ? (x) : ((x == EQEmu::invslot::SLOT_POWER_SOURCE) ? (22) : (23))) +#define VALIDBOTEQUIPSLOT(x) ((x >= EQEmu::invslot::EQUIPMENT_BEGIN && x <= EQEmu::invslot::EQUIPMENT_END) ? (x) : (EQEmu::invslot::EQUIPMENT_COUNT)) -static std::string bot_equip_slot_name[EQEmu::invslot::EQUIPMENT_COUNT + 2] = +static const std::string bot_equip_slot_name[EQEmu::invslot::EQUIPMENT_COUNT + 1] = { - "Charm", // MainCharm - "Left Ear", // MainEar1 - "Head", // MainHead - "Face", // MainFace - "Right Ear", // MainEar2 - "Neck", // MainNeck - "Shoulders", // MainShoulders - "Arms", // MainArms - "Back", // MainBack - "Left Wrist", // MainWrist1 - "Right Wrist", // MainWrist2 - "Range", // MainRange - "Hands", // MainHands - "Primary Hand", // MainPrimary - "Secondary Hand", // MainSecondary - "Left Finger", // MainFinger1 - "Right Finger", // MainFinger2 - "Chest", // MainChest - "Legs", // MainLegs - "Feet", // MainFeet - "Waist", // MainWaist - "Ammo", // MainAmmo - "Power Source", // 22 (MainPowerSource = 9999) + "Charm", // slotCharm + "Ear 1", // slotEar1 + "Head", // slotHead + "Face", // slotFace + "Ear 2", // slotEar2 + "Neck", // slotNeck + "Shoulders", // slotShoulders + "Arms", // slotArms + "Back", // slotBack + "Wrist 1", // slotWrist1 + "Wrist 2", // slotWrist2 + "Range", // slotRange + "Hands", // slotHands + "Primary", // slotPrimary + "Secondary", // slotSecondary + "Finger 1", // slotFinger1 + "Finger 2", // slotFinger2 + "Chest", // slotChest + "Legs", // slotLegs + "Feet", // slotFeet + "Waist", // slotWaist + "Power Source", // slotPowerSource + "Ammo", // slotAmmo "Unknown" }; diff --git a/zone/bot_command.cpp b/zone/bot_command.cpp index 5bdb0918a..17e7cf6ab 100644 --- a/zone/bot_command.cpp +++ b/zone/bot_command.cpp @@ -7194,13 +7194,13 @@ void bot_subcommand_inventory_list(Client *c, const Seperator *sep) linker.SetLinkType(EQEmu::saylink::SayLinkItemInst); uint32 inventory_count = 0; - for (int i = EQEmu::invslot::EQUIPMENT_BEGIN; i <= (EQEmu::invslot::EQUIPMENT_END + 1); ++i) { + for (int i = EQEmu::invslot::EQUIPMENT_BEGIN; i <= EQEmu::invslot::EQUIPMENT_END; ++i) { if ((i == EQEmu::invslot::slotSecondary) && is2Hweapon) continue; - inst = my_bot->CastToBot()->GetBotItem(i == 22 ? EQEmu::invslot::SLOT_POWER_SOURCE : i); + inst = my_bot->CastToBot()->GetBotItem(i); if (!inst || !inst->GetItem()) { - c->Message(m_message, "I need something for my %s (slot %i)", GetBotEquipSlotName(i), (i == 22 ? EQEmu::invslot::SLOT_POWER_SOURCE : i)); + c->Message(m_message, "I need something for my %s (slot %i)", GetBotEquipSlotName(i), i); continue; } @@ -7210,7 +7210,7 @@ void bot_subcommand_inventory_list(Client *c, const Seperator *sep) } linker.SetItemInst(inst); - c->Message(m_message, "Using %s in my %s (slot %i)", linker.GenerateLink().c_str(), GetBotEquipSlotName(i), (i == 22 ? EQEmu::invslot::SLOT_POWER_SOURCE : i)); + c->Message(m_message, "Using %s in my %s (slot %i)", linker.GenerateLink().c_str(), GetBotEquipSlotName(i), i); ++inventory_count; } @@ -7249,8 +7249,8 @@ void bot_subcommand_inventory_remove(Client *c, const Seperator *sep) } int slotId = atoi(sep->arg[1]); - if (!sep->IsNumber(1) || ((slotId > EQEmu::invslot::EQUIPMENT_END || slotId < EQEmu::invslot::EQUIPMENT_BEGIN) && slotId != EQEmu::invslot::SLOT_POWER_SOURCE)) { - c->Message(m_fail, "Valid slots are 0-21 or 9999"); + if (!sep->IsNumber(1) || (slotId > EQEmu::invslot::EQUIPMENT_END || slotId < EQEmu::invslot::EQUIPMENT_BEGIN)) { + c->Message(m_fail, "Valid slots are 0-22"); return; } @@ -7311,7 +7311,7 @@ void bot_subcommand_inventory_remove(Client *c, const Seperator *sep) case EQEmu::invslot::slotFinger2: case EQEmu::invslot::slotChest: case EQEmu::invslot::slotWaist: - case EQEmu::invslot::SLOT_POWER_SOURCE: + case EQEmu::invslot::slotPowerSource: case EQEmu::invslot::slotAmmo: c->Message(m_message, "My %s is %s unequipped", GetBotEquipSlotName(slotId), ((itm) ? ("now") : ("already"))); break; @@ -7356,14 +7356,14 @@ void bot_subcommand_inventory_window(Client *c, const Seperator *sep) //EQEmu::SayLinkEngine linker; //linker.SetLinkType(EQEmu::saylink::SayLinkItemInst); - for (int i = EQEmu::invslot::EQUIPMENT_BEGIN; i <= (EQEmu::invslot::EQUIPMENT_END + 1); ++i) { + for (int i = EQEmu::invslot::EQUIPMENT_BEGIN; i <= EQEmu::invslot::EQUIPMENT_END; ++i) { const EQEmu::ItemData* item = nullptr; - const EQEmu::ItemInstance* inst = my_bot->CastToBot()->GetBotItem(i == 22 ? EQEmu::invslot::SLOT_POWER_SOURCE : i); + const EQEmu::ItemInstance* inst = my_bot->CastToBot()->GetBotItem(i); if (inst) item = inst->GetItem(); window_text.append(""); - window_text.append(GetBotEquipSlotName(i == 22 ? EQEmu::invslot::SLOT_POWER_SOURCE : i)); + window_text.append(GetBotEquipSlotName(i)); window_text.append(": "); if (item) { //window_text.append(""); diff --git a/zone/bot_database.cpp b/zone/bot_database.cpp index a5e50fdec..92d6fba98 100644 --- a/zone/bot_database.cpp +++ b/zone/bot_database.cpp @@ -1138,7 +1138,7 @@ bool BotDatabase::LoadItems(const uint32 bot_id, EQEmu::InventoryProfile& invent for (auto row = results.begin(); row != results.end(); ++row) { int16 slot_id = atoi(row[0]); - if ((slot_id < EQEmu::invslot::EQUIPMENT_BEGIN || slot_id > EQEmu::invslot::EQUIPMENT_END) && slot_id != EQEmu::invslot::SLOT_POWER_SOURCE) + if (slot_id < EQEmu::invslot::EQUIPMENT_BEGIN || slot_id > EQEmu::invslot::EQUIPMENT_END) continue; uint32 item_id = atoi(row[1]); @@ -1173,7 +1173,7 @@ bool BotDatabase::LoadItems(const uint32 bot_id, EQEmu::InventoryProfile& invent if (item_inst->GetItem()->Attuneable) { if (atoi(row[4])) item_inst->SetAttuned(true); - else if (((slot_id >= EQEmu::invslot::EQUIPMENT_BEGIN) && (slot_id <= EQEmu::invslot::EQUIPMENT_END) || slot_id == EQEmu::invslot::SLOT_POWER_SOURCE)) + else if (slot_id >= EQEmu::invslot::EQUIPMENT_BEGIN && slot_id <= EQEmu::invslot::EQUIPMENT_END) item_inst->SetAttuned(true); } @@ -1241,7 +1241,7 @@ bool BotDatabase::LoadItemBySlot(Bot* bot_inst) bool BotDatabase::LoadItemBySlot(const uint32 bot_id, const uint32 slot_id, uint32& item_id) { - if (!bot_id || (slot_id > EQEmu::invslot::EQUIPMENT_END && slot_id != EQEmu::invslot::SLOT_POWER_SOURCE)) + if (!bot_id || slot_id > EQEmu::invslot::EQUIPMENT_END) return false; query = StringFormat("SELECT `item_id` FROM `bot_inventories` WHERE `bot_id` = '%i' AND `slot_id` = '%i' LIMIT 1", bot_id, slot_id); @@ -1259,7 +1259,7 @@ bool BotDatabase::LoadItemBySlot(const uint32 bot_id, const uint32 slot_id, uint bool BotDatabase::SaveItemBySlot(Bot* bot_inst, const uint32 slot_id, const EQEmu::ItemInstance* item_inst) { - if (!bot_inst || !bot_inst->GetBotID() || (slot_id > EQEmu::invslot::EQUIPMENT_END && slot_id != EQEmu::invslot::SLOT_POWER_SOURCE)) + if (!bot_inst || !bot_inst->GetBotID() || slot_id > EQEmu::invslot::EQUIPMENT_END) return false; if (!DeleteItemBySlot(bot_inst->GetBotID(), slot_id)) @@ -1343,7 +1343,7 @@ bool BotDatabase::SaveItemBySlot(Bot* bot_inst, const uint32 slot_id, const EQEm bool BotDatabase::DeleteItemBySlot(const uint32 bot_id, const uint32 slot_id) { - if (!bot_id || (slot_id > EQEmu::invslot::EQUIPMENT_END && slot_id != EQEmu::invslot::SLOT_POWER_SOURCE)) + if (!bot_id || slot_id > EQEmu::invslot::EQUIPMENT_END) return false; query = StringFormat("DELETE FROM `bot_inventories` WHERE `bot_id` = '%u' AND `slot_id` = '%u'", bot_id, slot_id); @@ -1382,7 +1382,7 @@ bool BotDatabase::SaveEquipmentColor(const uint32 bot_id, const int16 slot_id, c return false; bool all_flag = (slot_id == -2); - if ((slot_id < EQEmu::invslot::EQUIPMENT_BEGIN || slot_id > EQEmu::invslot::EQUIPMENT_END) && slot_id != EQEmu::invslot::SLOT_POWER_SOURCE && !all_flag) + if ((slot_id < EQEmu::invslot::EQUIPMENT_BEGIN || slot_id > EQEmu::invslot::EQUIPMENT_END) && !all_flag) return false; std::string where_clause; @@ -1659,7 +1659,7 @@ bool BotDatabase::LoadPetItems(const uint32 bot_id, uint32* pet_items) return true; int item_index = EQEmu::invslot::EQUIPMENT_BEGIN; - for (auto row = results.begin(); row != results.end() && item_index <= EQEmu::invslot::EQUIPMENT_END; ++row) { + for (auto row = results.begin(); row != results.end() && (item_index >= EQEmu::invslot::EQUIPMENT_BEGIN && item_index <= EQEmu::invslot::EQUIPMENT_END); ++row) { pet_items[item_index] = atoi(row[0]); ++item_index; } @@ -1683,7 +1683,7 @@ bool BotDatabase::SavePetItems(const uint32 bot_id, const uint32* pet_items, boo if (!saved_pet_index) return true; - for (int item_index = EQEmu::invslot::SLOT_BEGIN; item_index <= EQEmu::invslot::EQUIPMENT_END; ++item_index) { + for (int item_index = EQEmu::invslot::EQUIPMENT_BEGIN; item_index <= EQEmu::invslot::EQUIPMENT_END; ++item_index) { if (!pet_items[item_index]) continue; diff --git a/zone/client.cpp b/zone/client.cpp index 129293970..969d215ba 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -1905,7 +1905,7 @@ void Client::CheckManaEndUpdate() { else if (group) { group->SendEndurancePacketFrom(this); } - + auto endurance_packet = new EQApplicationPacket(OP_EnduranceUpdate, sizeof(EnduranceUpdate_Struct)); EnduranceUpdate_Struct* endurance_update = (EnduranceUpdate_Struct*)endurance_packet->pBuffer; endurance_update->cur_end = GetEndurance(); @@ -6004,56 +6004,34 @@ void Client::ProcessInspectRequest(Client* requestee, Client* requester) { const EQEmu::ItemData* item = nullptr; const EQEmu::ItemInstance* inst = nullptr; int ornamentationAugtype = RuleI(Character, OrnamentationAugmentType); - for(int16 L = 0; L <= 20; L++) { + for(int16 L = EQEmu::invslot::EQUIPMENT_BEGIN; L <= EQEmu::invslot::EQUIPMENT_END; L++) { inst = requestee->GetInv().GetItem(L); if(inst) { item = inst->GetItem(); if(item) { strcpy(insr->itemnames[L], item->Name); - if (inst && inst->GetOrnamentationAug(ornamentationAugtype)) - { - const EQEmu::ItemData *aug_item = inst->GetOrnamentationAug(ornamentationAugtype)->GetItem(); + + const EQEmu::ItemData *aug_item = nullptr; + if (inst->GetOrnamentationAug(ornamentationAugtype)) + inst->GetOrnamentationAug(ornamentationAugtype)->GetItem(); + + if (aug_item) insr->itemicons[L] = aug_item->Icon; - } - else if (inst && inst->GetOrnamentationIcon()) - { + else if (inst->GetOrnamentationIcon()) insr->itemicons[L] = inst->GetOrnamentationIcon(); - } else - { insr->itemicons[L] = item->Icon; - } } - else + else { + insr->itemnames[L][0] = '\0'; insr->itemicons[L] = 0xFFFFFFFF; + } } - } - - inst = requestee->GetInv().GetItem(EQEmu::invslot::SLOT_POWER_SOURCE); - - if(inst) { - item = inst->GetItem(); - if(item) { - // we shouldn't do this..but, that's the way it's coded atm... - // (this type of action should be handled exclusively in the client translator) - strcpy(insr->itemnames[SoF::invslot::slotPowerSource], item->Name); - insr->itemicons[SoF::invslot::slotPowerSource] = item->Icon; + else { + insr->itemnames[L][0] = '\0'; + insr->itemicons[L] = 0xFFFFFFFF; } - else - insr->itemicons[SoF::invslot::slotPowerSource] = 0xFFFFFFFF; - } - - inst = requestee->GetInv().GetItem(EQEmu::invslot::slotAmmo); - - if(inst) { - item = inst->GetItem(); - if(item) { - strcpy(insr->itemnames[SoF::invslot::slotAmmo], item->Name); - insr->itemicons[SoF::invslot::slotAmmo] = item->Icon; - } - else - insr->itemicons[SoF::invslot::slotAmmo] = 0xFFFFFFFF; } strcpy(insr->text, requestee->GetInspectMessage().text); @@ -8406,13 +8384,8 @@ void Client::TickItemCheck() if(zone->tick_items.empty()) { return; } - //Scan equip slots for items - for (i = EQEmu::invslot::EQUIPMENT_BEGIN; i <= EQEmu::invslot::EQUIPMENT_END; i++) - { - TryItemTick(i); - } - //Scan main inventory + cursor - for (i = EQEmu::invslot::GENERAL_BEGIN; i <= EQEmu::invslot::slotCursor; i++) + //Scan equip, general, cursor slots for items + for (i = EQEmu::invslot::POSSESSIONS_BEGIN; i <= EQEmu::invslot::POSSESSIONS_END; i++) { TryItemTick(i); } @@ -8464,16 +8437,10 @@ void Client::TryItemTick(int slot) void Client::ItemTimerCheck() { int i; - for (i = EQEmu::invslot::EQUIPMENT_BEGIN; i <= EQEmu::invslot::EQUIPMENT_END; i++) + for (i = EQEmu::invslot::POSSESSIONS_BEGIN; i <= EQEmu::invslot::POSSESSIONS_END; i++) { TryItemTimer(i); } - - for (i = EQEmu::invslot::GENERAL_BEGIN; i <= EQEmu::invslot::slotCursor; i++) - { - TryItemTimer(i); - } - for (i = EQEmu::invbag::GENERAL_BAGS_BEGIN; i <= EQEmu::invbag::CURSOR_BAG_END; i++) { TryItemTimer(i); diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 5cafbaee2..f9e4afefd 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -3002,8 +3002,7 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app) bool deleteItems = false; if (ClientVersion() >= EQEmu::versions::ClientVersion::RoF) { - if ((in_augment->container_slot < 0 || in_augment->container_slot >= EQEmu::invslot::slotCursor) && - in_augment->container_slot != EQEmu::invslot::SLOT_POWER_SOURCE && + if ((in_augment->container_slot < EQEmu::invslot::EQUIPMENT_BEGIN || in_augment->container_slot > EQEmu::invslot::GENERAL_END) && (in_augment->container_slot < EQEmu::invbag::GENERAL_BAGS_BEGIN || in_augment->container_slot > EQEmu::invbag::GENERAL_BAGS_END)) { Message(13, "The server does not allow augmentation actions from this slot."); @@ -8239,7 +8238,7 @@ void Client::Handle_OP_InspectAnswer(const EQApplicationPacket *app) const EQEmu::ItemData* item = nullptr; int ornamentationAugtype = RuleI(Character, OrnamentationAugmentType); - for (int16 L = EQEmu::invslot::EQUIPMENT_BEGIN; L <= EQEmu::invslot::slotWaist; L++) { + for (int16 L = EQEmu::invslot::EQUIPMENT_BEGIN; L <= EQEmu::invslot::EQUIPMENT_END; L++) { const EQEmu::ItemInstance* inst = GetInv().GetItem(L); item = inst ? inst->GetItem() : nullptr; @@ -8259,16 +8258,6 @@ void Client::Handle_OP_InspectAnswer(const EQApplicationPacket *app) else { insr->itemicons[L] = 0xFFFFFFFF; } } - const EQEmu::ItemInstance* inst = GetInv().GetItem(EQEmu::invslot::slotAmmo); - item = inst ? inst->GetItem() : nullptr; - - if (item) { - // another one..I did these, didn't I!!? - strcpy(insr->itemnames[SoF::invslot::slotAmmo], item->Name); - insr->itemicons[SoF::invslot::slotAmmo] = item->Icon; - } - else { insr->itemicons[SoF::invslot::slotAmmo] = 0xFFFFFFFF; } - InspectMessage_Struct* newmessage = (InspectMessage_Struct*)insr->text; InspectMessage_Struct& playermessage = this->GetInspectMessage(); memcpy(&playermessage, newmessage, sizeof(InspectMessage_Struct)); diff --git a/zone/client_process.cpp b/zone/client_process.cpp index bd14dc70a..d16864ffc 100644 --- a/zone/client_process.cpp +++ b/zone/client_process.cpp @@ -815,19 +815,6 @@ void Client::BulkSendInventoryItems() last_pos = ob.tellp(); } - // PowerSource item - if (ClientVersion() >= EQEmu::versions::ClientVersion::SoF) { - const EQEmu::ItemInstance* inst = m_inv[EQEmu::invslot::SLOT_POWER_SOURCE]; - if (inst) { - inst->Serialize(ob, EQEmu::invslot::SLOT_POWER_SOURCE); - - if (ob.tellp() == last_pos) - Log(Logs::General, Logs::Inventory, "Serialization failed on item slot %d during BulkSendInventoryItems. Item skipped.", EQEmu::invslot::SLOT_POWER_SOURCE); - - last_pos = ob.tellp(); - } - } - // Bank items for (int16 slot_id = EQEmu::invslot::BANK_BEGIN; slot_id <= EQEmu::invslot::BANK_END; slot_id++) { const EQEmu::ItemInstance* inst = m_inv[slot_id]; diff --git a/zone/command.cpp b/zone/command.cpp index 8fe816fe0..a6761cbcf 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -2768,52 +2768,6 @@ void command_peekinv(Client *c, const Seperator *sep) } } - if ((scopeBit & peekEquip) && (targetClient->ClientVersion() >= EQEmu::versions::ClientVersion::SoF)) { - inst_main = targetClient->GetInv().GetItem(EQEmu::invslot::SLOT_POWER_SOURCE); - if (inst_main) { - itemsFound = true; - item_data = inst_main->GetItem(); - } - else { - item_data = nullptr; - } - - linker.SetItemInst(inst_main); - - c->Message( - (item_data == nullptr), - "%sSlot: %i, Item: %i (%s), Charges: %i", - scope_prefix[scopeIndex], - EQEmu::invslot::SLOT_POWER_SOURCE, - ((item_data == nullptr) ? 0 : item_data->ID), - linker.GenerateLink().c_str(), - ((inst_main == nullptr) ? 0 : inst_main->GetCharges()) - ); - - if (inst_main && inst_main->IsClassCommon()) { - for (uint8 indexAug = EQEmu::invaug::SOCKET_BEGIN; indexAug <= EQEmu::invaug::SOCKET_END; ++indexAug) { - inst_aug = inst_main->GetItem(indexAug); - if (!inst_aug) // extant only - continue; - - item_data = inst_aug->GetItem(); - linker.SetItemInst(inst_aug); - - c->Message( - (item_data == nullptr), - ".%sAugSlot: %i (Slot #%i, Aug idx #%i), Item: %i (%s), Charges: %i", - scope_prefix[scopeIndex], - INVALID_INDEX, - EQEmu::invslot::SLOT_POWER_SOURCE, - indexAug, - ((item_data == nullptr) ? 0 : item_data->ID), - linker.GenerateLink().c_str(), - ((inst_sub == nullptr) ? 0 : inst_sub->GetCharges()) - ); - } - } - } - if (scopeBit & peekLimbo) { int limboIndex = 0; for (auto it = targetClient->GetInv().cursor_cbegin(); (it != targetClient->GetInv().cursor_cend()); ++it, ++limboIndex) { @@ -3324,7 +3278,7 @@ void command_listpetition(Client *c, const Seperator *sep) void command_equipitem(Client *c, const Seperator *sep) { uint32 slot_id = atoi(sep->arg[1]); - if (sep->IsNumber(1) && ((slot_id >= EQEmu::invslot::EQUIPMENT_BEGIN) && (slot_id <= EQEmu::invslot::EQUIPMENT_END) || (slot_id == EQEmu::invslot::SLOT_POWER_SOURCE))) { + if (sep->IsNumber(1) && (slot_id >= EQEmu::invslot::EQUIPMENT_BEGIN && slot_id <= EQEmu::invslot::EQUIPMENT_END)) { const EQEmu::ItemInstance* from_inst = c->GetInv().GetItem(EQEmu::invslot::slotCursor); const EQEmu::ItemInstance* to_inst = c->GetInv().GetItem(slot_id); // added (desync issue when forcing stack to stack) bool partialmove = false; diff --git a/zone/common.h b/zone/common.h index df6b22637..bc16fdf5b 100644 --- a/zone/common.h +++ b/zone/common.h @@ -263,6 +263,17 @@ enum class LootResponse : uint8 { LootAll = 6 // SoD+ }; +enum class LootRequestType : uint8 { + Forbidden = 0, + GMPeek, + GMAllowed, + Self, + AllowedPVE, + AllowedPVPAll, + AllowedPVPSingle, // can make this 'AllowedPVPVariable' and allow values between 1 and EQEmu::invtype::POSSESSIONS_SIZE + AllowedPVPDefined, +}; + //this is our internal representation of the BUFF struct, can put whatever we want in it struct Buffs_Struct { uint16 spellid; diff --git a/zone/corpse.cpp b/zone/corpse.cpp index 586789f0f..f52f25dd7 100644 --- a/zone/corpse.cpp +++ b/zone/corpse.cpp @@ -202,6 +202,8 @@ Corpse::Corpse(NPC* in_npc, ItemList* in_itemlist, uint32 in_npctypeid, const NP UpdateEquipmentLight(); UpdateActiveLight(); + + loot_request_type = LootRequestType::Forbidden; } Corpse::Corpse(Client* client, int32 in_rezexp) : Mob ( @@ -322,15 +324,11 @@ Corpse::Corpse(Client* client, int32 in_rezexp) : Mob ( // to go into the regular slots on the player, out of bags std::list removed_list; + // ideally, we would start at invslot::slotGeneral1 and progress to invslot::slotCursor.. + // ..then regress and process invslot::EQUIPMENT_BEGIN through invslot::EQUIPMENT_END... + // without additional work to database loading of player corpses, this order is not + // currently preserved and a re-work of this processing loop is not warranted. for (i = EQEmu::invslot::POSSESSIONS_BEGIN; i <= EQEmu::invslot::POSSESSIONS_END; ++i) { - if (i == EQEmu::invslot::slotAmmo && client->ClientVersion() >= EQEmu::versions::ClientVersion::SoF) { - item = client->GetInv().GetItem(EQEmu::invslot::SLOT_POWER_SOURCE); - if (item != nullptr) { - if (!client->IsBecomeNPC() || (client->IsBecomeNPC() && !item->GetItem()->NoRent)) - MoveItemToCorpse(client, item, EQEmu::invslot::SLOT_POWER_SOURCE, removed_list); - } - } - item = client->GetInv().GetItem(i); if (item == nullptr) { continue; } @@ -340,25 +338,25 @@ Corpse::Corpse(Client* client, int32 in_rezexp) : Mob ( database.TransactionBegin(); - // I have an untested process that avoids this snarl up when all possessions inventory is removed..but this isn't broke + // this should not be modified to include the entire range of invtype::TYPE_POSSESSIONS slots by default.. + // ..due to the possibility of 'hidden' items from client version bias..or, possibly, soul-bound items (WoW?) if (!removed_list.empty()) { - std::stringstream ss(""); - ss << "DELETE FROM inventory WHERE charid=" << client->CharacterID(); - ss << " AND ("; std::list::const_iterator iter = removed_list.begin(); - bool first = true; - while (iter != removed_list.end()) { - if (first) { - first = false; - } - else { - ss << " OR "; - } - ss << "slotid=" << (*iter); + + if (iter != removed_list.end()) { + std::stringstream ss(""); + ss << "DELETE FROM `inventory` WHERE `charid` = " << client->CharacterID(); + ss << " AND `slotid` IN (" << (*iter); ++iter; + + while (iter != removed_list.end()) { + ss << ", " << (*iter); + ++iter; + } + ss << ")"; + + database.QueryDatabase(ss.str().c_str()); } - ss << ")"; - database.QueryDatabase(ss.str().c_str()); } auto start = client->GetInv().cursor_cbegin(); @@ -382,6 +380,8 @@ Corpse::Corpse(Client* client, int32 in_rezexp) : Mob ( UpdateEquipmentLight(); UpdateActiveLight(); + loot_request_type = LootRequestType::Forbidden; + IsRezzed(false); Save(); } @@ -524,6 +524,8 @@ EQEmu::TintProfile(), UpdateEquipmentLight(); UpdateActiveLight(); + + loot_request_type = LootRequestType::Forbidden; } Corpse::~Corpse() { @@ -873,13 +875,16 @@ void Corpse::AllowPlayerLoot(Mob *them, uint8 slot) { } void Corpse::MakeLootRequestPackets(Client* client, const EQApplicationPacket* app) { + if (!client) + return; + // Added 12/08. Started compressing loot struct on live. if(player_corpse_depop) { SendLootReqErrorPacket(client, LootResponse::SomeoneElse); return; } - if(IsPlayerCorpse() && corpse_db_id == 0) { + if(IsPlayerCorpse() && !corpse_db_id) { // really should try to resave in this case // SendLootReqErrorPacket(client, 0); client->Message(13, "Warning: Corpse's dbid = 0! Corpse will not survive zone shutdown!"); std::cout << "Error: PlayerCorpse::MakeLootRequestPackets: dbid = 0!" << std::endl; @@ -892,165 +897,195 @@ void Corpse::MakeLootRequestPackets(Client* client, const EQApplicationPacket* a return; } - if(being_looted_by == 0) + if(!being_looted_by || (being_looted_by != 0xFFFFFFFF && !entity_list.GetID(being_looted_by))) being_looted_by = 0xFFFFFFFF; - if(this->being_looted_by != 0xFFFFFFFF) { - // lets double check.... - Entity* looter = entity_list.GetID(this->being_looted_by); - if(looter == nullptr) - this->being_looted_by = 0xFFFFFFFF; - } - - uint8 Loot_Request_Type = 1; - bool loot_coin = false; - std::string tmp; - if(database.GetVariable("LootCoin", tmp)) - loot_coin = tmp[0] == 1 && tmp[1] == '\0'; - if (DistanceSquaredNoZ(client->GetPosition(), m_Position) > 625) { SendLootReqErrorPacket(client, LootResponse::TooFar); - // not sure if we need to send the packet back in this case? Didn't before! - // Will just return for now return; } - else if (this->being_looted_by != 0xFFFFFFFF && this->being_looted_by != client->GetID()) { + + if (being_looted_by != 0xFFFFFFFF && being_looted_by != client->GetID()) { SendLootReqErrorPacket(client, LootResponse::SomeoneElse); - Loot_Request_Type = 0; - } - else if (IsPlayerCorpse() && char_id == client->CharacterID()) { - Loot_Request_Type = 2; - } - else if ((IsNPCCorpse() || become_npc) && CanPlayerLoot(client->CharacterID())) { - Loot_Request_Type = 2; - } - else if (GetPlayerKillItem() == -1 && CanPlayerLoot(client->CharacterID())) { /* PVP loot all items, variable cash */ - Loot_Request_Type = 3; - } - else if (GetPlayerKillItem() == 1 && CanPlayerLoot(client->CharacterID())) { /* PVP loot 1 item, variable cash */ - Loot_Request_Type = 4; - } - else if (GetPlayerKillItem() > 1 && CanPlayerLoot(client->CharacterID())) { /* PVP loot 1 set item, variable cash */ - Loot_Request_Type = 5; + return; } - if (Loot_Request_Type == 1) { - if (client->Admin() < 100 || !client->GetGM()) { - SendLootReqErrorPacket(client, LootResponse::NotAtThisTime); + // all loot session disqualifiers should occur before this point as not to interfere with any current looter + loot_request_type = LootRequestType::Forbidden; + + // loot_request_type is scoped to class Corpse and reset on a per-loot session basis + if (client->GetGM()) { + if (client->Admin() >= 100) + loot_request_type = LootRequestType::GMAllowed; + else + loot_request_type = LootRequestType::GMPeek; + } + else { + if (IsPlayerCorpse()) { + if (char_id == client->CharacterID()) { + loot_request_type = LootRequestType::Self; + } + else if (CanPlayerLoot(client->CharacterID())) { + if (GetPlayerKillItem() == -1) + loot_request_type = LootRequestType::AllowedPVPAll; + else if (GetPlayerKillItem() == 1) + loot_request_type = LootRequestType::AllowedPVPSingle; + else if (GetPlayerKillItem() > 1) + loot_request_type = LootRequestType::AllowedPVPDefined; + } } + else if ((IsNPCCorpse() || become_npc) && CanPlayerLoot(client->CharacterID())) { + loot_request_type = LootRequestType::AllowedPVE; + } + } - if(Loot_Request_Type >= 2 || (Loot_Request_Type == 1 && client->Admin() >= 100 && client->GetGM())) { - client->CommonBreakInvisible(); // we should be "all good" so lets break invis now instead of earlier before all error checking is done - this->being_looted_by = client->GetID(); + Log(Logs::Moderate, Logs::Inventory, "MakeLootRequestPackets() LootRequestType %u for %s", loot_request_type, client->GetName()); + + if (loot_request_type == LootRequestType::Forbidden) { + SendLootReqErrorPacket(client, LootResponse::NotAtThisTime); + return; + } + + being_looted_by = client->GetID(); + client->CommonBreakInvisible(); // we should be "all good" so lets break invis now instead of earlier before all error checking is done + + // process coin + bool loot_coin = false; + std::string tmp; + if (database.GetVariable("LootCoin", tmp)) + loot_coin = (tmp[0] == 1 && tmp[1] == '\0'); + + if (loot_request_type == LootRequestType::GMPeek || loot_request_type == LootRequestType::GMAllowed) { + client->Message(15, "This corpse contains %u platinum, %u gold, %u silver and %u copper.", + GetPlatinum(), GetGold(), GetSilver(), GetCopper()); + auto outapp = new EQApplicationPacket(OP_MoneyOnCorpse, sizeof(moneyOnCorpseStruct)); - moneyOnCorpseStruct* d = (moneyOnCorpseStruct*) outapp->pBuffer; + moneyOnCorpseStruct* d = (moneyOnCorpseStruct*)outapp->pBuffer; - d->response = static_cast(LootResponse::Normal); - d->unknown1 = 0x42; - d->unknown2 = 0xef; + d->response = static_cast(LootResponse::Normal); + d->unknown1 = 0x42; + d->unknown2 = 0xef; - /* Dont take the coin off if it's a gm peeking at the corpse */ - if(Loot_Request_Type == 2 || (Loot_Request_Type >= 3 && loot_coin)) { - if(!IsPlayerCorpse() && client->IsGrouped() && client->AutoSplitEnabled() && client->GetGroup()) { - d->copper = 0; - d->silver = 0; - d->gold = 0; - d->platinum = 0; - Group *cgroup = client->GetGroup(); - cgroup->SplitMoney(GetCopper(), GetSilver(), GetGold(), GetPlatinum(), client); - } - else { - d->copper = this->GetCopper(); - d->silver = this->GetSilver(); - d->gold = this->GetGold(); - d->platinum = this->GetPlatinum(); - client->AddMoneyToPP(GetCopper(), GetSilver(), GetGold(), GetPlatinum(), false); - } + d->copper = 0; + d->silver = 0; + d->gold = 0; + d->platinum = 0; - RemoveCash(); - Save(); - } - - auto timestamps = database.GetItemRecastTimestamps(client->CharacterID()); outapp->priority = 6; client->QueuePacket(outapp); + safe_delete(outapp); - if(Loot_Request_Type == 5) { - int pkitem = GetPlayerKillItem(); - const EQEmu::ItemData* item = database.GetItem(pkitem); - EQEmu::ItemInstance* inst = database.CreateItem(item, item->MaxCharges); - if(inst) { - if (item->RecastDelay) - inst->SetRecastTimestamp(timestamps.count(item->RecastType) ? timestamps.at(item->RecastType) : 0); - client->SendItemPacket(EQEmu::invslot::CORPSE_BEGIN, inst, ItemPacketLoot); - safe_delete(inst); - } - else { client->Message(13, "Could not find item number %i to send!!", GetPlayerKillItem()); } + } + else { + auto outapp = new EQApplicationPacket(OP_MoneyOnCorpse, sizeof(moneyOnCorpseStruct)); + moneyOnCorpseStruct* d = (moneyOnCorpseStruct*)outapp->pBuffer; - client->QueuePacket(app); - return; + d->response = static_cast(LootResponse::Normal); + d->unknown1 = 0x42; + d->unknown2 = 0xef; + + Group* cgroup = client->GetGroup(); + + // this can be reworked into a switch and/or massaged to include specialized pve loot rules based on 'LootRequestType' + if (!IsPlayerCorpse() && client->IsGrouped() && client->AutoSplitEnabled() && cgroup) { + d->copper = 0; + d->silver = 0; + d->gold = 0; + d->platinum = 0; + cgroup->SplitMoney(GetCopper(), GetSilver(), GetGold(), GetPlatinum(), client); + } + else { + d->copper = GetCopper(); + d->silver = GetSilver(); + d->gold = GetGold(); + d->platinum = GetPlatinum(); + client->AddMoneyToPP(GetCopper(), GetSilver(), GetGold(), GetPlatinum(), false); } - int i = 0; - const EQEmu::ItemData* item = nullptr; - ItemList::iterator cur,end; - cur = itemlist.begin(); - end = itemlist.end(); + RemoveCash(); + Save(); - int corpselootlimit = EQEmu::inventory::Lookup(EQEmu::versions::ConvertClientVersionToMobVersion(client->ClientVersion()))->InventoryTypeSize[EQEmu::invtype::typeCorpse]; + outapp->priority = 6; + client->QueuePacket(outapp); - for(; cur != end; ++cur) { - ServerLootItem_Struct* item_data = *cur; - item_data->lootslot = 0xFFFF; + safe_delete(outapp); + } - // Dont display the item if it's in a bag + // process items + auto timestamps = database.GetItemRecastTimestamps(client->CharacterID()); - // Added cursor queue slots to corpse item visibility list. Nothing else should be making it to corpse. - if (!IsPlayerCorpse() || item_data->equip_slot <= EQEmu::invslot::slotCursor || item_data->equip_slot == EQEmu::invslot::SLOT_POWER_SOURCE || Loot_Request_Type >= 3 || - (item_data->equip_slot >= 8000 && item_data->equip_slot <= 8999)) { - if(i < corpselootlimit) { - item = database.GetItem(item_data->item_id); - if(client && item) { - EQEmu::ItemInstance* inst = database.CreateItem(item, item_data->charges, item_data->aug_1, item_data->aug_2, item_data->aug_3, item_data->aug_4, item_data->aug_5, item_data->aug_6, item_data->attuned); - if(inst) { - if (item->RecastDelay) - inst->SetRecastTimestamp(timestamps.count(item->RecastType) ? timestamps.at(item->RecastType) : 0); - // SlotGeneral1 is the corpse inventory start offset for Ti(EMu) - CORPSE_END = SlotGeneral1 + SlotCursor - client->SendItemPacket(i + EQEmu::invslot::CORPSE_BEGIN, inst, ItemPacketLoot); - safe_delete(inst); - } + if (loot_request_type == LootRequestType::AllowedPVPDefined) { + auto pkitemid = GetPlayerKillItem(); + auto pkitem = database.GetItem(pkitemid); + auto pkinst = database.CreateItem(pkitem, pkitem->MaxCharges); - item_data->lootslot = i; - } - } + if (pkinst) { + if (pkitem->RecastDelay) + pkinst->SetRecastTimestamp(timestamps.count(pkitem->RecastType) ? timestamps.at(pkitem->RecastType) : 0); - i++; - } + Log(Logs::Detail, Logs::Inventory, "MakeLootRequestPackets() Slot %u, Item '%s'", EQEmu::invslot::CORPSE_BEGIN, pkitem->Name); + + client->SendItemPacket(EQEmu::invslot::CORPSE_BEGIN, pkinst, ItemPacketLoot); + safe_delete(pkinst); + } + else { + Log(Logs::General, Logs::Inventory, "MakeLootRequestPackets() PlayerKillItem %i not found", pkitemid); + + client->Message(CC_Red, "PlayerKillItem (id: %i) could not be found!", pkitemid); } - if(IsPlayerCorpse() && (char_id == client->CharacterID() || client->GetGM())) { - if(i > corpselootlimit) { - client->Message(15, "*** This corpse contains more items than can be displayed! ***"); - client->Message(0, "Remove items and re-loot corpse to access remaining inventory."); - client->Message(0, "(%s contains %i additional %s.)", GetName(), (i - corpselootlimit), (i - corpselootlimit) == 1 ? "item" : "items"); - } + client->QueuePacket(app); + return; + } - if(IsPlayerCorpse() && i == 0 && itemlist.size() > 0) { // somehow, player corpse contains items, but client doesn't see them... - client->Message(13, "This corpse contains items that are inaccessable!"); - client->Message(15, "Contact a GM for item replacement, if necessary."); - client->Message(15, "BUGGED CORPSE [DBID: %i, Name: %s, Item Count: %i]", GetCorpseDBID(), GetName(), itemlist.size()); + auto loot_slot = EQEmu::invslot::CORPSE_BEGIN; + auto corpse_mask = client->GetInv().GetLookup()->CorpseBitmask; + + for (auto item_data : itemlist) { + // every loot session must either set all items' lootslots to 'invslot::SLOT_INVALID' + // or to a valid enumerated client-versioned corpse slot (lootslot is not equip_slot) + item_data->lootslot = 0xFFFF; + + // align server and client corpse slot mappings so translators can function properly + while (loot_slot <= EQEmu::invslot::CORPSE_END && (((uint64)1 << loot_slot) & corpse_mask) == 0) + ++loot_slot; + + if (loot_slot > EQEmu::invslot::CORPSE_END) + continue; - cur = itemlist.begin(); - end = itemlist.end(); - for(; cur != end; ++cur) { - ServerLootItem_Struct* item_data = *cur; - item = database.GetItem(item_data->item_id); - Log(Logs::General, Logs::None, "Corpse Looting: %s was not sent to client loot window (corpse_dbid: %i, charname: %s(%s))", item->Name, GetCorpseDBID(), client->GetName(), client->GetGM() ? "GM" : "Owner"); - client->Message(0, "Inaccessable Corpse Item: %s", item->Name); - } - } + if (IsPlayerCorpse()) { + if (loot_request_type == LootRequestType::AllowedPVPSingle && loot_slot != EQEmu::invslot::CORPSE_BEGIN) + continue; + + if (item_data->equip_slot < EQEmu::invslot::POSSESSIONS_BEGIN || item_data->equip_slot > EQEmu::invslot::POSSESSIONS_END) + continue; } + + const auto *item = database.GetItem(item_data->item_id); + auto inst = database.CreateItem( + item, + item_data->charges, + item_data->aug_1, + item_data->aug_2, + item_data->aug_3, + item_data->aug_4, + item_data->aug_5, + item_data->aug_6, + item_data->attuned + ); + if (!inst) + continue; + + if (item->RecastDelay) + inst->SetRecastTimestamp(timestamps.count(item->RecastType) ? timestamps.at(item->RecastType) : 0); + + Log(Logs::Moderate, Logs::Inventory, "MakeLootRequestPackets() Slot %i, Item '%s'", loot_slot, item->Name); + + client->SendItemPacket(loot_slot, inst, ItemPacketLoot); + safe_delete(inst); + + item_data->lootslot = loot_slot++; } // Disgrace: Client seems to require that we send the packet back... @@ -1064,8 +1099,22 @@ void Corpse::MakeLootRequestPackets(Client* client, const EQApplicationPacket* a void Corpse::LootItem(Client *client, const EQApplicationPacket *app) { + if (!client) + return; + auto lootitem = (LootingItem_Struct *)app->pBuffer; + Log(Logs::Moderate, Logs::Inventory, "LootItem() LootRequestType %u, Slot %u for %s", loot_request_type, lootitem->slot_id, client->GetName()); + + if (loot_request_type == LootRequestType::Forbidden) { + client->QueuePacket(app); + SendEndLootErrorPacket(client); + // unlock corpse for others + if (IsBeingLootedBy(client)) + ResetLooter(); + return; + } + if (!loot_cooldown_timer.Check()) { client->QueuePacket(app); SendEndLootErrorPacket(client); @@ -1093,7 +1142,7 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app) } if (IsPlayerCorpse() && !CanPlayerLoot(client->CharacterID()) && !become_npc && - (char_id != client->CharacterID() && client->Admin() < 150)) { + (char_id != client->CharacterID() && client->Admin() < 150)) { client->Message(13, "Error: This is a player corpse and you dont own it."); client->QueuePacket(app); SendEndLootErrorPacket(client); @@ -1108,7 +1157,7 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app) } if (IsPlayerCorpse() && (char_id != client->CharacterID()) && CanPlayerLoot(client->CharacterID()) && - GetPlayerKillItem() == 0) { + GetPlayerKillItem() == 0) { client->Message(13, "Error: You cannot loot any more items from this corpse."); client->QueuePacket(app); SendEndLootErrorPacket(client); @@ -1123,12 +1172,13 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app) memset(bag_item_data, 0, sizeof(bag_item_data)); if (GetPlayerKillItem() > 1) { item = database.GetItem(GetPlayerKillItem()); - } else if (GetPlayerKillItem() == -1 || GetPlayerKillItem() == 1) { + } + else if (GetPlayerKillItem() == -1 || GetPlayerKillItem() == 1) { item_data = - GetItem(lootitem->slot_id - - EQEmu::invslot::CORPSE_BEGIN); // dont allow them to loot entire bags of items as pvp reward - } else { - item_data = GetItem(lootitem->slot_id - EQEmu::invslot::CORPSE_BEGIN, bag_item_data); + GetItem(lootitem->slot_id); // dont allow them to loot entire bags of items as pvp reward + } + else { + item_data = GetItem(lootitem->slot_id, bag_item_data); } if (GetPlayerKillItem() <= 1 && item_data != 0) { @@ -1138,9 +1188,10 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app) if (item != 0) { if (item_data) { inst = database.CreateItem(item, item_data ? item_data->charges : 0, item_data->aug_1, - item_data->aug_2, item_data->aug_3, item_data->aug_4, - item_data->aug_5, item_data->aug_6, item_data->attuned); - } else { + item_data->aug_2, item_data->aug_3, item_data->aug_4, + item_data->aug_5, item_data->aug_6, item_data->attuned); + } + else { inst = database.CreateItem(item); } } @@ -1175,7 +1226,7 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app) char q_corpse_name[64]; strcpy(q_corpse_name, corpse_name); snprintf(buf, 87, "%d %d %s", inst->GetItem()->ID, inst->GetCharges(), - EntityList::RemoveNumbers(q_corpse_name)); + EntityList::RemoveNumbers(q_corpse_name)); buf[87] = '\0'; std::vector args; args.push_back(inst); @@ -1187,6 +1238,8 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app) delete inst; return; } + + // do we want this to have a fail option too? parse->EventItem(EVENT_LOOT, client, inst, this, buf, 0); @@ -1211,7 +1264,8 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app) if (lootitem->auto_loot > 0) { if (!client->AutoPutLootInInventory(*inst, true, true, bag_item_data)) client->PutLootInInventory(EQEmu::invslot::slotCursor, *inst, bag_item_data); - } else { + } + else { client->PutLootInInventory(EQEmu::invslot::slotCursor, *inst, bag_item_data); } @@ -1222,9 +1276,9 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app) /* Remove it from Corpse */ if (item_data) { /* Delete needs to be before RemoveItem because its deletes the pointer for - * item_data/bag_item_data */ + * item_data/bag_item_data */ database.DeleteItemOffCharacterCorpse(this->corpse_db_id, item_data->equip_slot, - item_data->item_id); + item_data->item_id); /* Delete Item Instance */ RemoveItem(item_data->lootslot); } @@ -1234,10 +1288,10 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app) for (int i = EQEmu::invbag::SLOT_BEGIN; i <= EQEmu::invbag::SLOT_END; i++) { if (bag_item_data[i]) { /* Delete needs to be before RemoveItem because its deletes the pointer for - * item_data/bag_item_data */ + * item_data/bag_item_data */ database.DeleteItemOffCharacterCorpse(this->corpse_db_id, - bag_item_data[i]->equip_slot, - bag_item_data[i]->item_id); + bag_item_data[i]->equip_slot, + bag_item_data[i]->item_id); /* Delete Item Instance */ RemoveItem(bag_item_data[i]); } @@ -1261,16 +1315,18 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app) Group *g = client->GetGroup(); if (g != nullptr) { g->GroupMessage_StringID(client, MT_LootMessages, OTHER_LOOTED_MESSAGE, - client->GetName(), linker.Link().c_str()); - } else { + client->GetName(), linker.Link().c_str()); + } + else { Raid *r = client->GetRaid(); if (r != nullptr) { r->RaidMessage_StringID(client, MT_LootMessages, OTHER_LOOTED_MESSAGE, - client->GetName(), linker.Link().c_str()); + client->GetName(), linker.Link().c_str()); } } } - } else { + } + else { SendEndLootErrorPacket(client); safe_delete(inst); return; @@ -1278,7 +1334,8 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app) if (IsPlayerCorpse()) { client->SendItemLink(inst); - } else { + } + else { client->SendItemLink(inst, true); } @@ -1457,7 +1514,7 @@ void Corpse::UpdateEquipmentLight() m_Light.Level[EQEmu::lightsource::LightEquipment] = 0; for (auto iter = itemlist.begin(); iter != itemlist.end(); ++iter) { - if (((*iter)->equip_slot < EQEmu::invslot::EQUIPMENT_BEGIN || (*iter)->equip_slot > EQEmu::invslot::EQUIPMENT_END) && (*iter)->equip_slot != EQEmu::invslot::SLOT_POWER_SOURCE) { continue; } + if ((*iter)->equip_slot < EQEmu::invslot::EQUIPMENT_BEGIN || (*iter)->equip_slot > EQEmu::invslot::EQUIPMENT_END) { continue; } if ((*iter)->equip_slot == EQEmu::invslot::slotAmmo) { continue; } auto item = database.GetItem((*iter)->item_id); diff --git a/zone/corpse.h b/zone/corpse.h index 84bce15fa..ff323e791 100644 --- a/zone/corpse.h +++ b/zone/corpse.h @@ -116,7 +116,7 @@ class Corpse : public Mob { inline void Lock() { is_locked = true; } inline void UnLock() { is_locked = false; } inline bool IsLocked() { return is_locked; } - inline void ResetLooter() { being_looted_by = 0xFFFFFFFF; } + inline void ResetLooter() { being_looted_by = 0xFFFFFFFF; loot_request_type = LootRequestType::Forbidden; } inline bool IsBeingLooted() { return (being_looted_by != 0xFFFFFFFF); } inline bool IsBeingLootedBy(Client *c) { return being_looted_by == c->GetID(); } @@ -161,6 +161,7 @@ private: Timer loot_cooldown_timer; /* Delay between loot actions on the corpse entity */ EQEmu::TintProfile item_tint; + LootRequestType loot_request_type; }; #endif diff --git a/zone/embparser.cpp b/zone/embparser.cpp index 80f6ace11..c267bd857 100644 --- a/zone/embparser.cpp +++ b/zone/embparser.cpp @@ -1128,9 +1128,9 @@ void PerlembParser::ExportItemVariables(std::string &package_name, Mob *mob) { std::string hashname = package_name + std::string("::oncursor"); perl->eval(std::string("%").append(hashname).append(" = ();").c_str()); char *hi_decl = nullptr; - int itemid = mob->CastToClient()->GetItemIDAt(30); + int itemid = mob->CastToClient()->GetItemIDAt(EQEmu::invslot::slotCursor); if(!HASITEM_ISNULLITEM(itemid)) { - MakeAnyLenString(&hi_decl, "push (@{$%s{%d}},%d);",hashname.c_str(), itemid, 30); + MakeAnyLenString(&hi_decl, "push (@{$%s{%d}},%d);",hashname.c_str(), itemid, EQEmu::invslot::slotCursor); perl->eval(hi_decl); safe_delete_array(hi_decl); } diff --git a/zone/embparser_api.cpp b/zone/embparser_api.cpp index 18c84ccdd..0f9d45b1e 100644 --- a/zone/embparser_api.cpp +++ b/zone/embparser_api.cpp @@ -33,6 +33,8 @@ #include "zone.h" #include "data_bucket.h" +#include + extern Zone *zone; extern QueryServ *QServ; @@ -348,6 +350,83 @@ XS(XS__incstat) { XSRETURN_EMPTY; } +XS(XS__inventory); +XS(XS__inventory) { + dXSARGS; + if (items != 1) + Perl_croak(aTHX_ "Usage: quest::inventory(string identifier)"); + + int16 RETVAL; + dXSTARG; + + std::string identifier = (Const_char *)SvPV_nolen(ST(0)); + for (std::string::size_type i = 0; i < identifier.length(); ++i) + identifier[i] = std::tolower(identifier[i]); + + if (identifier == "invalid") RETVAL = EQEmu::invslot::SLOT_INVALID; + else if (identifier == "cursor") RETVAL = EQEmu::invslot::slotCursor; + else if (identifier == "possessions_begin") RETVAL = EQEmu::invslot::POSSESSIONS_BEGIN; + else if (identifier == "possessions_end") RETVAL = EQEmu::invslot::POSSESSIONS_END; + else if (identifier == "bank_begin") RETVAL = EQEmu::invslot::BANK_BEGIN; + else if (identifier == "bank_end") RETVAL = EQEmu::invslot::BANK_END; + else if (identifier == "sharedbank_begin") RETVAL = EQEmu::invslot::SHARED_BANK_BEGIN; + else if (identifier == "sharedbank_end") RETVAL = EQEmu::invslot::SHARED_BANK_END; + else if (identifier == "generalbags_begin") RETVAL = EQEmu::invbag::GENERAL_BAGS_BEGIN; + else if (identifier == "generalbags_end") RETVAL = EQEmu::invbag::GENERAL_BAGS_END; + else if (identifier == "cursorbag_begin") RETVAL = EQEmu::invbag::CURSOR_BAG_BEGIN; + else if (identifier == "cursorbag_end") RETVAL = EQEmu::invbag::CURSOR_BAG_END; + else if (identifier == "bankbags_begin") RETVAL = EQEmu::invbag::BANK_BAGS_BEGIN; + else if (identifier == "bankbags_end") RETVAL = EQEmu::invbag::BANK_BAGS_END; + else if (identifier == "sharedbankbags_begin") RETVAL = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN; + else if (identifier == "sharedbankbags_end") RETVAL = EQEmu::invbag::SHARED_BANK_BAGS_END; + else if (identifier == "bagslot_begin") RETVAL = EQEmu::invbag::SLOT_BEGIN; + else if (identifier == "bagslot_end") RETVAL = EQEmu::invbag::SLOT_END; + else if (identifier == "augsocket_begin") RETVAL = EQEmu::invaug::SOCKET_BEGIN; + else if (identifier == "augsocket_end") RETVAL = EQEmu::invaug::SOCKET_END; + else if (identifier == "equipment_begin") RETVAL = EQEmu::invslot::EQUIPMENT_BEGIN; + else if (identifier == "equipment_end") RETVAL = EQEmu::invslot::EQUIPMENT_END; + else if (identifier == "general_begin") RETVAL = EQEmu::invslot::GENERAL_BEGIN; + else if (identifier == "general_end") RETVAL = EQEmu::invslot::GENERAL_END; + else if (identifier == "charm") RETVAL = EQEmu::invslot::slotCharm; + else if (identifier == "ear1") RETVAL = EQEmu::invslot::slotEar1; + else if (identifier == "head") RETVAL = EQEmu::invslot::slotHead; + else if (identifier == "face") RETVAL = EQEmu::invslot::slotFace; + else if (identifier == "ear2") RETVAL = EQEmu::invslot::slotEar2; + else if (identifier == "neck") RETVAL = EQEmu::invslot::slotNeck; + else if (identifier == "shoulders") RETVAL = EQEmu::invslot::slotShoulders; + else if (identifier == "arms") RETVAL = EQEmu::invslot::slotArms; + else if (identifier == "back") RETVAL = EQEmu::invslot::slotBack; + else if (identifier == "wrist1") RETVAL = EQEmu::invslot::slotWrist1; + else if (identifier == "wrist2") RETVAL = EQEmu::invslot::slotWrist2; + else if (identifier == "range") RETVAL = EQEmu::invslot::slotRange; + else if (identifier == "hands") RETVAL = EQEmu::invslot::slotHands; + else if (identifier == "primary") RETVAL = EQEmu::invslot::slotPrimary; + else if (identifier == "secondary") RETVAL = EQEmu::invslot::slotSecondary; + else if (identifier == "finger1") RETVAL = EQEmu::invslot::slotFinger1; + else if (identifier == "finger2") RETVAL = EQEmu::invslot::slotFinger2; + else if (identifier == "chest") RETVAL = EQEmu::invslot::slotChest; + else if (identifier == "legs") RETVAL = EQEmu::invslot::slotLegs; + else if (identifier == "feet") RETVAL = EQEmu::invslot::slotFeet; + else if (identifier == "waist") RETVAL = EQEmu::invslot::slotWaist; + else if (identifier == "powersource") RETVAL = EQEmu::invslot::slotPowerSource; + else if (identifier == "ammo") RETVAL = EQEmu::invslot::slotAmmo; + else if (identifier == "general1") RETVAL = EQEmu::invslot::slotGeneral1; + else if (identifier == "general2") RETVAL = EQEmu::invslot::slotGeneral2; + else if (identifier == "general3") RETVAL = EQEmu::invslot::slotGeneral3; + else if (identifier == "general4") RETVAL = EQEmu::invslot::slotGeneral4; + else if (identifier == "general5") RETVAL = EQEmu::invslot::slotGeneral5; + else if (identifier == "general6") RETVAL = EQEmu::invslot::slotGeneral6; + else if (identifier == "general7") RETVAL = EQEmu::invslot::slotGeneral7; + else if (identifier == "general8") RETVAL = EQEmu::invslot::slotGeneral8; + else if (identifier == "general9") RETVAL = EQEmu::invslot::slotGeneral9; + else if (identifier == "general10") RETVAL = EQEmu::invslot::slotGeneral10; + else RETVAL = EQEmu::invslot::SLOT_INVALID; + + XSprePUSH; PUSHu((IV)RETVAL); + + XSRETURN(1); +} + XS(XS__castspell); XS(XS__castspell) { dXSARGS; @@ -3683,6 +3762,7 @@ EXTERN_C XS(boot_quest) { newXS(strcpy(buf, "gmsay"), XS__gmsay, file); newXS(strcpy(buf, "has_zone_flag"), XS__has_zone_flag, file); newXS(strcpy(buf, "incstat"), XS__incstat, file); + newXS(strcpy(buf, "inventory"), XS__inventory, file); newXS(strcpy(buf, "isdisctome"), XS__isdisctome, file); newXS(strcpy(buf, "isdooropen"), XS__isdooropen, file); newXS(strcpy(buf, "istaskactive"), XS__istaskactive, file); diff --git a/zone/inventory.cpp b/zone/inventory.cpp index d375d94b6..fb88fe03e 100644 --- a/zone/inventory.cpp +++ b/zone/inventory.cpp @@ -44,23 +44,9 @@ uint32 Client::NukeItem(uint32 itemnum, uint8 where_to_check) { x++; } - DeleteItemInInventory(i, 0, true); + DeleteItemInInventory(i, 0, ((((uint64)1 << i) & GetInv().GetLookup()->PossessionsBitmask) != 0)); } } - - if (GetItemIDAt(EQEmu::invslot::SLOT_POWER_SOURCE) == itemnum || (itemnum == 0xFFFE && GetItemIDAt(EQEmu::invslot::SLOT_POWER_SOURCE) != INVALID_ID)) { - cur = m_inv.GetItem(EQEmu::invslot::SLOT_POWER_SOURCE); - if(cur && cur->GetItem()->Stackable) { - x += cur->GetCharges(); - } else { - x++; - } - - if (ClientVersion() >= EQEmu::versions::ClientVersion::SoF) - DeleteItemInInventory(EQEmu::invslot::SLOT_POWER_SOURCE, 0, true); - else - DeleteItemInInventory(EQEmu::invslot::SLOT_POWER_SOURCE, 0, false); // Prevents Titanium crash - } } if(where_to_check & invWhereCursor) { @@ -99,7 +85,7 @@ uint32 Client::NukeItem(uint32 itemnum, uint8 where_to_check) { x++; } - DeleteItemInInventory(i, 0, true); + DeleteItemInInventory(i, 0, ((((uint64)1 << i) & GetInv().GetLookup()->PossessionsBitmask) != 0)); } } @@ -112,7 +98,7 @@ uint32 Client::NukeItem(uint32 itemnum, uint8 where_to_check) { x++; } - DeleteItemInInventory(i, 0, true); + DeleteItemInInventory(i, 0, ((((uint64)1 << (EQEmu::invslot::GENERAL_BEGIN + ((i - EQEmu::invbag::GENERAL_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT))) & GetInv().GetLookup()->PossessionsBitmask) == 0)); } } } @@ -127,7 +113,7 @@ uint32 Client::NukeItem(uint32 itemnum, uint8 where_to_check) { x++; } - DeleteItemInInventory(i, 0, true); + DeleteItemInInventory(i, 0, ((i - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank])); } } @@ -140,7 +126,7 @@ uint32 Client::NukeItem(uint32 itemnum, uint8 where_to_check) { x++; } - DeleteItemInInventory(i, 0, true); + DeleteItemInInventory(i, 0, (((i - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT) >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank])); } } } @@ -554,8 +540,8 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2, inst->SetOrnamentHeroModel(ornament_hero_model); // check to see if item is usable in requested slot - if (enforceusable && (((to_slot >= EQEmu::invslot::slotCharm) && (to_slot <= EQEmu::invslot::slotAmmo)) || (to_slot == EQEmu::invslot::SLOT_POWER_SOURCE))) { - uint32 slottest = (to_slot == EQEmu::invslot::SLOT_POWER_SOURCE) ? 22 : to_slot; // can't change '22' just yet... + if (enforceusable && (to_slot >= EQEmu::invslot::EQUIPMENT_BEGIN && to_slot <= EQEmu::invslot::EQUIPMENT_END)) { + uint32 slottest = to_slot; if(!(slots & ((uint32)1 << slottest))) { Message(0, "This item is not equipable at slot %u - moving to cursor.", to_slot); @@ -716,6 +702,25 @@ void Client::DropInst(const EQEmu::ItemInstance* inst) // Returns a slot's item ID (returns INVALID_ID if not found) int32 Client::GetItemIDAt(int16 slot_id) { + if (slot_id <= EQEmu::invslot::POSSESSIONS_END && slot_id >= EQEmu::invslot::POSSESSIONS_BEGIN) { + if ((((uint64)1 << slot_id) & GetInv().GetLookup()->PossessionsBitmask) == 0) + return INVALID_ID; + } + else if (slot_id <= EQEmu::invbag::GENERAL_BAGS_END && slot_id >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { + auto temp_slot = EQEmu::invslot::GENERAL_BEGIN + ((slot_id - EQEmu::invbag::GENERAL_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT); + if ((((uint64)1 << temp_slot) & GetInv().GetLookup()->PossessionsBitmask) == 0) + return INVALID_ID; + } + else if (slot_id <= EQEmu::invslot::BANK_END && slot_id >= EQEmu::invslot::BANK_BEGIN) { + if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]) + return INVALID_ID; + } + else if (slot_id <= EQEmu::invbag::BANK_BAGS_END && slot_id >= EQEmu::invbag::BANK_BAGS_BEGIN) { + auto temp_slot = (slot_id - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT; + if (temp_slot >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]) + return INVALID_ID; + } + const EQEmu::ItemInstance* inst = m_inv[slot_id]; if (inst) return inst->GetItem()->ID; @@ -727,6 +732,25 @@ int32 Client::GetItemIDAt(int16 slot_id) { // Returns an augment's ID that's in an item (returns INVALID_ID if not found) // Pass in the slot ID of the item and which augslot you want to check (0-5) int32 Client::GetAugmentIDAt(int16 slot_id, uint8 augslot) { + if (slot_id <= EQEmu::invslot::POSSESSIONS_END && slot_id >= EQEmu::invslot::POSSESSIONS_BEGIN) { + if ((((uint64)1 << slot_id) & GetInv().GetLookup()->PossessionsBitmask) == 0) + return INVALID_ID; + } + else if (slot_id <= EQEmu::invbag::GENERAL_BAGS_END && slot_id >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { + auto temp_slot = EQEmu::invslot::GENERAL_BEGIN + ((slot_id - EQEmu::invbag::GENERAL_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT); + if ((((uint64)1 << temp_slot) & GetInv().GetLookup()->PossessionsBitmask) == 0) + return INVALID_ID; + } + else if (slot_id <= EQEmu::invslot::BANK_END && slot_id >= EQEmu::invslot::BANK_BEGIN) { + if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]) + return INVALID_ID; + } + else if (slot_id <= EQEmu::invbag::BANK_BAGS_END && slot_id >= EQEmu::invbag::BANK_BAGS_BEGIN) { + auto temp_slot = (slot_id - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT; + if (temp_slot >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]) + return INVALID_ID; + } + const EQEmu::ItemInstance* inst = m_inv[slot_id]; if (inst && inst->GetAugmentItemID(augslot)) { return inst->GetAugmentItemID(augslot); @@ -963,7 +987,7 @@ void Client::PutLootInInventory(int16 slot_id, const EQEmu::ItemInstance &inst, } if (bag_item_data) { - for (int index = 0; index < EQEmu::invbag::SLOT_COUNT; ++index) { + for (int index = EQEmu::invbag::SLOT_BEGIN; index <= EQEmu::invbag::SLOT_END; ++index) { if (bag_item_data[index] == nullptr) continue; @@ -1003,12 +1027,15 @@ void Client::PutLootInInventory(int16 slot_id, const EQEmu::ItemInstance &inst, CalcBonuses(); } -bool Client::TryStacking(EQEmu::ItemInstance* item, uint8 type, bool try_worn, bool try_cursor){ +bool Client::TryStacking(EQEmu::ItemInstance* item, uint8 type, bool try_worn, bool try_cursor) { if(!item || !item->IsStackable() || item->GetCharges()>=item->GetItem()->StackSize) return false; int16 i; uint32 item_id = item->GetItem()->ID; for (i = EQEmu::invslot::GENERAL_BEGIN; i <= EQEmu::invslot::GENERAL_END; i++) { + if (((uint64)1 << i) & GetInv().GetLookup()->PossessionsBitmask == 0) + continue; + EQEmu::ItemInstance* tmp_inst = m_inv.GetItem(i); if(tmp_inst && tmp_inst->GetItem()->ID == item_id && tmp_inst->GetCharges() < tmp_inst->GetItem()->StackSize){ MoveItemCharges(*item, i, type); @@ -1020,6 +1047,9 @@ bool Client::TryStacking(EQEmu::ItemInstance* item, uint8 type, bool try_worn, b } } for (i = EQEmu::invslot::GENERAL_BEGIN; i <= EQEmu::invslot::GENERAL_END; i++) { + if (((uint64)1 << i) & GetInv().GetLookup()->PossessionsBitmask == 0) + continue; + for (uint8 j = EQEmu::invbag::SLOT_BEGIN; j <= EQEmu::invbag::SLOT_END; j++) { uint16 slotid = EQEmu::InventoryProfile::CalcSlotId(i, j); EQEmu::ItemInstance* tmp_inst = m_inv.GetItem(slotid); @@ -1044,15 +1074,9 @@ bool Client::AutoPutLootInInventory(EQEmu::ItemInstance& inst, bool try_worn, bo { // #1: Try to auto equip if (try_worn && inst.IsEquipable(GetBaseRace(), GetClass()) && inst.GetItem()->ReqLevel <= level && (!inst.GetItem()->Attuneable || inst.IsAttuned()) && inst.GetItem()->ItemType != EQEmu::item::ItemTypeAugmentation) { - // too messy as-is... - for (int16 i = EQEmu::invslot::EQUIPMENT_BEGIN; i < EQEmu::invslot::SLOT_POWER_SOURCE; i++) { // originally (i < 22) - if (i == EQEmu::invslot::GENERAL_BEGIN) { - // added power source check for SoF+ clients - if (this->ClientVersion() >= EQEmu::versions::ClientVersion::SoF) - i = EQEmu::invslot::SLOT_POWER_SOURCE; - else - break; - } + for (int16 i = EQEmu::invslot::EQUIPMENT_BEGIN; i <= EQEmu::invslot::EQUIPMENT_END; i++) { + if (((uint64)1 << i) & GetInv().GetLookup()->PossessionsBitmask == 0) + continue; if (!m_inv[i]) { if (i == EQEmu::invslot::slotPrimary && inst.IsWeapon()) { // If item is primary slot weapon @@ -1373,23 +1397,34 @@ void Client::SendLootItemInPacket(const EQEmu::ItemInstance* inst, int16 slot_id } bool Client::IsValidSlot(uint32 slot) { - if ((slot == (uint32)INVALID_INDEX) || - (slot >= EQEmu::invslot::POSSESSIONS_BEGIN && slot <= EQEmu::invslot::POSSESSIONS_END) || - (slot >= EQEmu::invbag::GENERAL_BAGS_BEGIN && slot <= EQEmu::invbag::CURSOR_BAG_END) || - (slot >= EQEmu::invslot::TRIBUTE_BEGIN && slot <= EQEmu::invslot::TRIBUTE_END) || - (slot >= EQEmu::invslot::BANK_BEGIN && slot <= EQEmu::invslot::BANK_END) || - (slot >= EQEmu::invbag::BANK_BAGS_BEGIN && slot <= EQEmu::invbag::BANK_BAGS_END) || - (slot >= EQEmu::invslot::SHARED_BANK_BEGIN && slot <= EQEmu::invslot::SHARED_BANK_END) || - (slot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN && slot <= EQEmu::invbag::SHARED_BANK_BAGS_END) || - (slot >= EQEmu::invslot::TRADE_BEGIN && slot <= EQEmu::invslot::TRADE_END) || - (slot >= EQEmu::invslot::WORLD_BEGIN && slot <= EQEmu::invslot::WORLD_END) || - (slot == EQEmu::invslot::SLOT_POWER_SOURCE) - ) { + if (slot <= EQEmu::invslot::POSSESSIONS_END && slot >= EQEmu::invslot::POSSESSIONS_BEGIN) { + return ((((uint64)1 << slot) & GetInv().GetLookup()->PossessionsBitmask) != 0); + } + else if (slot <= EQEmu::invbag::GENERAL_BAGS_END && slot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { + auto temp_slot = EQEmu::invslot::GENERAL_BEGIN + ((slot - EQEmu::invbag::GENERAL_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT); + return ((((uint64)1 << temp_slot) & GetInv().GetLookup()->PossessionsBitmask) != 0); + } + else if (slot <= EQEmu::invslot::BANK_END && slot >= EQEmu::invslot::BANK_BEGIN) { + return ((slot - EQEmu::invslot::BANK_BEGIN) < GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]); + } + else if (slot <= EQEmu::invbag::BANK_BAGS_END && slot >= EQEmu::invbag::BANK_BAGS_BEGIN) { + auto temp_slot = (slot - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT; + return (temp_slot < GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]); + } + else if ( + (slot == (uint32)INVALID_INDEX) || + (slot == (uint32)EQEmu::invslot::slotCursor) || + (slot <= EQEmu::invbag::CURSOR_BAG_END && slot >= EQEmu::invbag::CURSOR_BAG_BEGIN) || + (slot <= EQEmu::invslot::TRIBUTE_END && slot >= EQEmu::invslot::TRIBUTE_BEGIN) || + (slot <= EQEmu::invslot::SHARED_BANK_END && slot >= EQEmu::invslot::SHARED_BANK_BEGIN) || + (slot <= EQEmu::invbag::SHARED_BANK_BAGS_END && slot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN) || + (slot <= EQEmu::invslot::TRADE_END && slot >= EQEmu::invslot::TRADE_BEGIN) || + (slot <= EQEmu::invslot::WORLD_END && slot >= EQEmu::invslot::WORLD_BEGIN) + ) { return true; } - else { - return false; - } + + return false; } bool Client::IsBankSlot(uint32 slot) @@ -1481,10 +1516,14 @@ bool Client::SwapItem(MoveItem_Struct* move_in) { return true; // Item deletion } } - if (auto_attack && (move_in->from_slot == EQEmu::invslot::slotPrimary || move_in->from_slot == EQEmu::invslot::slotSecondary || move_in->from_slot == EQEmu::invslot::slotRange)) - SetAttackTimer(); - else if (auto_attack && (move_in->to_slot == EQEmu::invslot::slotPrimary || move_in->to_slot == EQEmu::invslot::slotSecondary || move_in->to_slot == EQEmu::invslot::slotRange)) - SetAttackTimer(); + + if (auto_attack) { + if (move_in->from_slot == EQEmu::invslot::slotPrimary || move_in->from_slot == EQEmu::invslot::slotSecondary || move_in->from_slot == EQEmu::invslot::slotRange) + SetAttackTimer(); + else if (move_in->to_slot == EQEmu::invslot::slotPrimary || move_in->to_slot == EQEmu::invslot::slotSecondary || move_in->to_slot == EQEmu::invslot::slotRange) + SetAttackTimer(); + } + // Step 1: Variables int16 src_slot_id = (int16)move_in->from_slot; int16 dst_slot_id = (int16)move_in->to_slot; @@ -1530,13 +1569,11 @@ bool Client::SwapItem(MoveItem_Struct* move_in) { uint32 srcbagid =0; uint32 dstbagid = 0; - //if (src_slot_id >= 250 && src_slot_id < 330) { if (src_slot_id >= EQEmu::invbag::GENERAL_BAGS_BEGIN && src_slot_id <= EQEmu::invbag::GENERAL_BAGS_END) { srcbag = m_inv.GetItem(((int)(src_slot_id / 10)) - 3); if (srcbag) srcbagid = srcbag->GetItem()->ID; } - //if (dst_slot_id >= 250 && dst_slot_id < 330) { if (dst_slot_id >= EQEmu::invbag::GENERAL_BAGS_BEGIN && dst_slot_id <= EQEmu::invbag::GENERAL_BAGS_END) { dstbag = m_inv.GetItem(((int)(dst_slot_id / 10)) - 3); if (dstbag) @@ -1808,7 +1845,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) { } else { // Not dealing with charges - just do direct swap - if (src_inst && (dst_slot_id <= EQEmu::invslot::EQUIPMENT_END || dst_slot_id == EQEmu::invslot::SLOT_POWER_SOURCE) && dst_slot_id >= EQEmu::invslot::EQUIPMENT_BEGIN) { + if (src_inst && (dst_slot_id <= EQEmu::invslot::EQUIPMENT_END) && dst_slot_id >= EQEmu::invslot::EQUIPMENT_BEGIN) { if (src_inst->GetItem()->Attuneable) { src_inst->SetAttuned(true); } @@ -1840,7 +1877,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) { Log(Logs::Detail, Logs::Inventory, "Moving entire item from slot %d to slot %d", src_slot_id, dst_slot_id); - if (src_slot_id <= EQEmu::invslot::EQUIPMENT_END || src_slot_id == EQEmu::invslot::SLOT_POWER_SOURCE) { + if (src_slot_id <= EQEmu::invslot::EQUIPMENT_END) { if(src_inst) { parse->EventItem(EVENT_UNEQUIP_ITEM, this, src_inst, nullptr, "", src_slot_id); } @@ -1850,7 +1887,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) { } } - if (dst_slot_id <= EQEmu::invslot::EQUIPMENT_END || dst_slot_id == EQEmu::invslot::SLOT_POWER_SOURCE) { + if (dst_slot_id <= EQEmu::invslot::EQUIPMENT_END) { if(dst_inst) { parse->EventItem(EVENT_UNEQUIP_ITEM, this, dst_inst, nullptr, "", dst_slot_id); } @@ -1904,7 +1941,7 @@ void Client::SwapItemResync(MoveItem_Struct* move_slots) { Log(Logs::Detail, Logs::Inventory, "Inventory desyncronization. (charname: %s, source: %i, destination: %i)", GetName(), move_slots->from_slot, move_slots->to_slot); Message(15, "Inventory Desyncronization detected: Resending slot data..."); - if ((move_slots->from_slot >= EQEmu::invslot::EQUIPMENT_BEGIN && move_slots->from_slot <= EQEmu::invbag::CURSOR_BAG_END) || move_slots->from_slot == EQEmu::invslot::SLOT_POWER_SOURCE) { + if (move_slots->from_slot >= EQEmu::invslot::EQUIPMENT_BEGIN && move_slots->from_slot <= EQEmu::invbag::CURSOR_BAG_END) { int16 resync_slot = (EQEmu::InventoryProfile::CalcSlotId(move_slots->from_slot) == INVALID_INDEX) ? move_slots->from_slot : EQEmu::InventoryProfile::CalcSlotId(move_slots->from_slot); if (IsValidSlot(resync_slot) && resync_slot != INVALID_INDEX) { // This prevents the client from crashing when closing any 'phantom' bags @@ -1947,7 +1984,7 @@ void Client::SwapItemResync(MoveItem_Struct* move_slots) { else { Message(13, "Could not resyncronize source slot %i.", move_slots->from_slot); } } - if ((move_slots->to_slot >= EQEmu::invslot::EQUIPMENT_BEGIN && move_slots->to_slot <= EQEmu::invbag::CURSOR_BAG_END) || move_slots->to_slot == EQEmu::invslot::SLOT_POWER_SOURCE) { + if (move_slots->to_slot >= EQEmu::invslot::EQUIPMENT_BEGIN && move_slots->to_slot <= EQEmu::invbag::CURSOR_BAG_END) { int16 resync_slot = (EQEmu::InventoryProfile::CalcSlotId(move_slots->to_slot) == INVALID_INDEX) ? move_slots->to_slot : EQEmu::InventoryProfile::CalcSlotId(move_slots->to_slot); if (IsValidSlot(resync_slot) && resync_slot != INVALID_INDEX) { const EQEmu::ItemData* token_struct = database.GetItem(22292); // 'Copper Coin' @@ -2182,47 +2219,118 @@ bool Client::DecreaseByID(uint32 type, uint8 amt) { EQEmu::ItemInstance* ins = nullptr; int x; int num = 0; - for(x = EQEmu::invslot::EQUIPMENT_BEGIN; x <= EQEmu::invbag::GENERAL_BAGS_END; x++) - { - if (x == EQEmu::invslot::slotCursor + 1) - x = EQEmu::invbag::GENERAL_BAGS_BEGIN; + + for (x = EQEmu::invslot::POSSESSIONS_BEGIN; x <= EQEmu::invslot::POSSESSIONS_END; ++x) { + if (num >= amt) + break; + if (((uint64)1 << x) & GetInv().GetLookup()->PossessionsBitmask == 0) + continue; + TempItem = nullptr; ins = GetInv().GetItem(x); if (ins) TempItem = ins->GetItem(); if (TempItem && TempItem->ID == type) - { num += ins->GetCharges(); - if (num >= amt) - break; - } } + + for (x = EQEmu::invbag::GENERAL_BAGS_BEGIN; x <= EQEmu::invbag::GENERAL_BAGS_END; ++x) { + if (num >= amt) + break; + if ((((uint64)1 << (EQEmu::invslot::GENERAL_BEGIN + ((x - EQEmu::invbag::GENERAL_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT))) & GetInv().GetLookup()->PossessionsBitmask) == 0) + continue; + + TempItem = nullptr; + ins = GetInv().GetItem(x); + if (ins) + TempItem = ins->GetItem(); + if (TempItem && TempItem->ID == type) + num += ins->GetCharges(); + } + + for (x = EQEmu::invbag::CURSOR_BAG_BEGIN; x <= EQEmu::invbag::CURSOR_BAG_END; ++x) { + if (num >= amt) + break; + + TempItem = nullptr; + ins = GetInv().GetItem(x); + if (ins) + TempItem = ins->GetItem(); + if (TempItem && TempItem->ID == type) + num += ins->GetCharges(); + } + if (num < amt) return false; - for(x = EQEmu::invslot::EQUIPMENT_BEGIN; x <= EQEmu::invbag::GENERAL_BAGS_END; x++) // should this be CURSOR_BAG_END? - { - if (x == EQEmu::invslot::slotCursor + 1) - x = EQEmu::invbag::GENERAL_BAGS_BEGIN; + + + for (x = EQEmu::invslot::POSSESSIONS_BEGIN; x <= EQEmu::invslot::POSSESSIONS_END; ++x) { + if (amt < 1) + break; + if (((uint64)1 << x) & GetInv().GetLookup()->PossessionsBitmask == 0) + continue; + TempItem = nullptr; ins = GetInv().GetItem(x); if (ins) TempItem = ins->GetItem(); - if (TempItem && TempItem->ID == type) - { - if (ins->GetCharges() < amt) - { - amt -= ins->GetCharges(); - DeleteItemInInventory(x,amt,true); - } - else - { - DeleteItemInInventory(x,amt,true); - amt = 0; - } - if (amt < 1) - break; + if (TempItem && TempItem->ID != type) + continue; + + if (ins->GetCharges() < amt) { + amt -= ins->GetCharges(); + DeleteItemInInventory(x, amt, true); + } + else { + DeleteItemInInventory(x, amt, true); + amt = 0; } } + + for (x = EQEmu::invbag::GENERAL_BAGS_BEGIN; x <= EQEmu::invbag::GENERAL_BAGS_END; ++x) { + if (amt < 1) + break; + if ((((uint64)1 << (EQEmu::invslot::GENERAL_BEGIN + ((x - EQEmu::invbag::GENERAL_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT))) & GetInv().GetLookup()->PossessionsBitmask) == 0) + continue; + + TempItem = nullptr; + ins = GetInv().GetItem(x); + if (ins) + TempItem = ins->GetItem(); + if (TempItem && TempItem->ID != type) + continue; + + if (ins->GetCharges() < amt) { + amt -= ins->GetCharges(); + DeleteItemInInventory(x, amt, true); + } + else { + DeleteItemInInventory(x, amt, true); + amt = 0; + } + } + + for (x = EQEmu::invbag::CURSOR_BAG_BEGIN; x <= EQEmu::invbag::CURSOR_BAG_END; ++x) { + if (amt < 1) + break; + + TempItem = nullptr; + ins = GetInv().GetItem(x); + if (ins) + TempItem = ins->GetItem(); + if (TempItem && TempItem->ID != type) + continue; + + if (ins->GetCharges() < amt) { + amt -= ins->GetCharges(); + DeleteItemInInventory(x, amt, true); + } + else { + DeleteItemInInventory(x, amt, true); + amt = 0; + } + } + return true; } @@ -2299,6 +2407,9 @@ static bool CopyBagContents(EQEmu::ItemInstance* new_bag, const EQEmu::ItemInsta void Client::DisenchantSummonedBags(bool client_update) { for (auto slot_id = EQEmu::invslot::GENERAL_BEGIN; slot_id <= EQEmu::invslot::GENERAL_END; ++slot_id) { + if (((uint64)1 << slot_id) & GetInv().GetLookup()->PossessionsBitmask == 0) + continue; // not useable this session - will be disenchanted once player logs in on client that doesn't exclude affected slots + auto inst = m_inv[slot_id]; if (!inst) { continue; } if (!IsSummonedBagID(inst->GetItem()->ID)) { continue; } @@ -2320,6 +2431,9 @@ void Client::DisenchantSummonedBags(bool client_update) } for (auto slot_id = EQEmu::invslot::BANK_BEGIN; slot_id <= EQEmu::invslot::BANK_END; ++slot_id) { + if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]) + continue; + auto inst = m_inv[slot_id]; if (!inst) { continue; } if (!IsSummonedBagID(inst->GetItem()->ID)) { continue; } @@ -2410,6 +2524,9 @@ void Client::DisenchantSummonedBags(bool client_update) void Client::RemoveNoRent(bool client_update) { for (auto slot_id = EQEmu::invslot::EQUIPMENT_BEGIN; slot_id <= EQEmu::invslot::EQUIPMENT_END; ++slot_id) { + if (((uint64)1 << slot_id) & GetInv().GetLookup()->PossessionsBitmask == 0) + continue; + auto inst = m_inv[slot_id]; if(inst && !inst->GetItem()->NoRent) { Log(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id); @@ -2418,6 +2535,9 @@ void Client::RemoveNoRent(bool client_update) } for (auto slot_id = EQEmu::invslot::GENERAL_BEGIN; slot_id <= EQEmu::invslot::GENERAL_END; ++slot_id) { + if (((uint64)1 << slot_id) & GetInv().GetLookup()->PossessionsBitmask == 0) + continue; + auto inst = m_inv[slot_id]; if (inst && !inst->GetItem()->NoRent) { Log(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id); @@ -2425,15 +2545,11 @@ void Client::RemoveNoRent(bool client_update) } } - if (m_inv[EQEmu::invslot::SLOT_POWER_SOURCE]) { - auto inst = m_inv[EQEmu::invslot::SLOT_POWER_SOURCE]; - if (inst && !inst->GetItem()->NoRent) { - Log(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, EQEmu::invslot::SLOT_POWER_SOURCE); - DeleteItemInInventory(EQEmu::invslot::SLOT_POWER_SOURCE, 0, (ClientVersion() >= EQEmu::versions::ClientVersion::SoF) ? client_update : false); // Ti slot non-existent - } - } - for (auto slot_id = EQEmu::invbag::GENERAL_BAGS_BEGIN; slot_id <= EQEmu::invbag::CURSOR_BAG_END; ++slot_id) { + auto temp_slot = EQEmu::invslot::GENERAL_BEGIN + ((slot_id - EQEmu::invbag::GENERAL_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT); + if ((((uint64)1 << temp_slot) & GetInv().GetLookup()->PossessionsBitmask) == 0) + continue; + auto inst = m_inv[slot_id]; if(inst && !inst->GetItem()->NoRent) { Log(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id); @@ -2442,6 +2558,9 @@ void Client::RemoveNoRent(bool client_update) } for (auto slot_id = EQEmu::invslot::BANK_BEGIN; slot_id <= EQEmu::invslot::BANK_END; ++slot_id) { + if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]) + continue; + auto inst = m_inv[slot_id]; if(inst && !inst->GetItem()->NoRent) { Log(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id); @@ -2450,6 +2569,10 @@ void Client::RemoveNoRent(bool client_update) } for (auto slot_id = EQEmu::invbag::BANK_BAGS_BEGIN; slot_id <= EQEmu::invbag::BANK_BAGS_END; ++slot_id) { + auto temp_slot = (slot_id - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT; + if (temp_slot >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]) + continue; + auto inst = m_inv[slot_id]; if(inst && !inst->GetItem()->NoRent) { Log(Logs::Detail, Logs::Inventory, "NoRent Timer Lapse: Deleting %s from slot %i", inst->GetItem()->Name, slot_id); @@ -2504,6 +2627,9 @@ void Client::RemoveNoRent(bool client_update) void Client::RemoveDuplicateLore(bool client_update) { for (auto slot_id = EQEmu::invslot::EQUIPMENT_BEGIN; slot_id <= EQEmu::invslot::EQUIPMENT_END; ++slot_id) { + if (((uint64)1 << slot_id) & GetInv().GetLookup()->PossessionsBitmask == 0) + continue; + auto inst = m_inv.PopItem(slot_id); if (inst == nullptr) { continue; } if(CheckLoreConflict(inst->GetItem())) { @@ -2517,6 +2643,9 @@ void Client::RemoveDuplicateLore(bool client_update) } for (auto slot_id = EQEmu::invslot::GENERAL_BEGIN; slot_id <= EQEmu::invslot::GENERAL_END; ++slot_id) { + if (((uint64)1 << slot_id) & GetInv().GetLookup()->PossessionsBitmask == 0) + continue; + auto inst = m_inv.PopItem(slot_id); if (inst == nullptr) { continue; } if (CheckLoreConflict(inst->GetItem())) { @@ -2529,21 +2658,11 @@ void Client::RemoveDuplicateLore(bool client_update) safe_delete(inst); } - if (m_inv[EQEmu::invslot::SLOT_POWER_SOURCE]) { - auto inst = m_inv.PopItem(EQEmu::invslot::SLOT_POWER_SOURCE); - if (inst) { - if (CheckLoreConflict(inst->GetItem())) { - Log(Logs::Detail, Logs::Inventory, "Lore Duplication Error: Deleting %s from slot %i", inst->GetItem()->Name, EQEmu::invslot::SLOT_POWER_SOURCE); - database.SaveInventory(character_id, nullptr, EQEmu::invslot::SLOT_POWER_SOURCE); - } - else { - m_inv.PutItem(EQEmu::invslot::SLOT_POWER_SOURCE, *inst); - } - safe_delete(inst); - } - } - for (auto slot_id = EQEmu::invbag::GENERAL_BAGS_BEGIN; slot_id <= EQEmu::invbag::CURSOR_BAG_END; ++slot_id) { + auto temp_slot = EQEmu::invslot::GENERAL_BEGIN + ((slot_id - EQEmu::invbag::GENERAL_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT); + if ((((uint64)1 << temp_slot) & GetInv().GetLookup()->PossessionsBitmask) == 0) + continue; + auto inst = m_inv.PopItem(slot_id); if (inst == nullptr) { continue; } if(CheckLoreConflict(inst->GetItem())) { @@ -2557,6 +2676,9 @@ void Client::RemoveDuplicateLore(bool client_update) } for (auto slot_id = EQEmu::invslot::BANK_BEGIN; slot_id <= EQEmu::invslot::BANK_END; ++slot_id) { + if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]) + continue; + auto inst = m_inv.PopItem(slot_id); if (inst == nullptr) { continue; } if(CheckLoreConflict(inst->GetItem())) { @@ -2570,6 +2692,10 @@ void Client::RemoveDuplicateLore(bool client_update) } for (auto slot_id = EQEmu::invbag::BANK_BAGS_BEGIN; slot_id <= EQEmu::invbag::BANK_BAGS_END; ++slot_id) { + auto temp_slot = (slot_id - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT; + if (temp_slot >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]) + continue; + auto inst = m_inv.PopItem(slot_id); if (inst == nullptr) { continue; } if(CheckLoreConflict(inst->GetItem())) { @@ -2642,15 +2768,21 @@ void Client::MoveSlotNotAllowed(bool client_update) } } - if (m_inv[EQEmu::invslot::SLOT_POWER_SOURCE] && !m_inv[EQEmu::invslot::SLOT_POWER_SOURCE]->IsSlotAllowed(EQEmu::invslot::SLOT_POWER_SOURCE)) { - auto inst = m_inv.PopItem(EQEmu::invslot::SLOT_POWER_SOURCE); - bool is_arrow = (inst->GetItem()->ItemType == EQEmu::item::ItemTypeArrow) ? true : false; - int16 free_slot_id = m_inv.FindFreeSlot(inst->IsClassBag(), true, inst->GetItem()->Size, is_arrow); - Log(Logs::Detail, Logs::Inventory, "Slot Assignment Error: Moving %s from slot %i to %i", inst->GetItem()->Name, EQEmu::invslot::SLOT_POWER_SOURCE, free_slot_id); - PutItemInInventory(free_slot_id, *inst, (ClientVersion() >= EQEmu::versions::ClientVersion::SoF) ? client_update : false); - database.SaveInventory(character_id, nullptr, EQEmu::invslot::SLOT_POWER_SOURCE); - safe_delete(inst); - } + // added this check to move any client-based excluded slots + //for (auto slot_id = EQEmu::invslot::POSSESSIONS_BEGIN; slot_id <= EQEmu::invslot::POSSESSIONS_END; ++slot_id) { + // if (((uint64)1 << slot_id) & GetInv().GetLookup()->PossessionsBitmask != 0) + // continue; + + // if (m_inv[slot_id]) { // this is currently dangerous for bag-based movements since limbo does not save bag slots + // auto inst = m_inv.PopItem(slot_id); + // bool is_arrow = (inst->GetItem()->ItemType == EQEmu::item::ItemTypeArrow) ? true : false; + // int16 free_slot_id = m_inv.FindFreeSlot(inst->IsClassBag(), true, inst->GetItem()->Size, is_arrow); + // Log(Logs::Detail, Logs::Inventory, "Slot Assignment Error: Moving %s from slot %i to %i", inst->GetItem()->Name, slot_id, free_slot_id); + // PutItemInInventory(free_slot_id, *inst, client_update); + // database.SaveInventory(character_id, nullptr, slot_id); + // safe_delete(inst); + // } + //} // No need to check inventory, cursor, bank or shared bank since they allow max item size and containers // Code can be added to check item size vs. container size, but it is left to attrition for now. @@ -2716,7 +2848,26 @@ void Client::SendItemPacket(int16 slot_id, const EQEmu::ItemInstance* inst, Item if (!inst) return; - // Serialize item into |-delimited string + if (slot_id <= EQEmu::invslot::POSSESSIONS_END && slot_id >= EQEmu::invslot::POSSESSIONS_BEGIN) { + if ((((uint64)1 << slot_id) & GetInv().GetLookup()->PossessionsBitmask) == 0) + return; + } + else if (slot_id <= EQEmu::invbag::GENERAL_BAGS_END && slot_id >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { + auto temp_slot = EQEmu::invslot::GENERAL_BEGIN + ((slot_id - EQEmu::invbag::GENERAL_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT); + if ((((uint64)1 << temp_slot) & GetInv().GetLookup()->PossessionsBitmask) == 0) + return; + } + else if (slot_id <= EQEmu::invslot::BANK_END && slot_id >= EQEmu::invslot::BANK_BEGIN) { + if ((slot_id - EQEmu::invslot::BANK_BEGIN) >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]) + return; + } + else if (slot_id <= EQEmu::invbag::BANK_BAGS_END && slot_id >= EQEmu::invbag::BANK_BAGS_BEGIN) { + auto temp_slot = (slot_id - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT; + if (temp_slot >= GetInv().GetLookup()->InventoryTypeSize[EQEmu::invtype::typeBank]) + return; + } + + // Serialize item into |-delimited string (Titanium- uses '|' delimiter .. newer clients use pure data serialization) std::string packet = inst->Serialize(slot_id); EmuOpcode opcode = OP_Unknown; @@ -3000,6 +3151,8 @@ bool Client::MoveItemToInventory(EQEmu::ItemInstance *ItemToReturn, bool UpdateC if(ItemToReturn->IsStackable()) { for (int16 i = EQEmu::invslot::GENERAL_BEGIN; i <= EQEmu::invslot::slotCursor; i++) { // changed slot max to 30 from 29. client will stack into slot 30 (bags too) before moving. + if (((uint64)1 << i) & GetInv().GetLookup()->PossessionsBitmask == 0) + continue; EQEmu::ItemInstance* InvItem = m_inv.GetItem(i); @@ -3059,6 +3212,8 @@ bool Client::MoveItemToInventory(EQEmu::ItemInstance *ItemToReturn, bool UpdateC // We have tried stacking items, now just try and find an empty slot. for (int16 i = EQEmu::invslot::GENERAL_BEGIN; i <= EQEmu::invslot::slotCursor; i++) { // changed slot max to 30 from 29. client will move into slot 30 (bags too) before pushing onto cursor. + if (((uint64)1 << i) & GetInv().GetLookup()->PossessionsBitmask == 0) + continue; EQEmu::ItemInstance* InvItem = m_inv.GetItem(i); @@ -3119,7 +3274,7 @@ bool Client::InterrogateInventory(Client* requester, bool log, bool silent, bool std::map instmap; // build reference map - for (int16 index = EQEmu::invslot::EQUIPMENT_BEGIN; index <= EQEmu::invslot::POSSESSIONS_END; ++index) { + for (int16 index = EQEmu::invslot::POSSESSIONS_BEGIN; index <= EQEmu::invslot::POSSESSIONS_END; ++index) { auto inst = m_inv[index]; if (inst == nullptr) { continue; } instmap[index] = inst; @@ -3163,9 +3318,6 @@ bool Client::InterrogateInventory(Client* requester, bool log, bool silent, bool instmap[8000 + limbo] = *cursor_itr; } - if (m_inv[EQEmu::invslot::SLOT_POWER_SOURCE]) - instmap[EQEmu::invslot::SLOT_POWER_SOURCE] = m_inv[EQEmu::invslot::SLOT_POWER_SOURCE]; - // call InterrogateInventory_ for error check for (auto instmap_itr = instmap.begin(); (instmap_itr != instmap.end()) && (!error); ++instmap_itr) { InterrogateInventory_(true, requester, instmap_itr->first, INVALID_INDEX, instmap_itr->second, nullptr, log, silent, error, 0); @@ -3270,8 +3422,7 @@ bool Client::InterrogateInventory_error(int16 head, int16 index, const EQEmu::It (head >= EQEmu::invslot::EQUIPMENT_BEGIN && head <= EQEmu::invslot::EQUIPMENT_END) || (head >= EQEmu::invslot::TRIBUTE_BEGIN && head <= EQEmu::invslot::TRIBUTE_END) || (head >= EQEmu::invslot::WORLD_BEGIN && head <= EQEmu::invslot::WORLD_END) || - (head >= 8000 && head <= 8101) || - (head == EQEmu::invslot::SLOT_POWER_SOURCE)) { + (head >= 8000 && head <= 8101)) { switch (depth) { case 0: // requirement: inst is extant diff --git a/zone/loottables.cpp b/zone/loottables.cpp index 70a7e2bc4..e7c9624f1 100644 --- a/zone/loottables.cpp +++ b/zone/loottables.cpp @@ -323,7 +323,7 @@ void NPC::AddLootDrop(const EQEmu::ItemData *item2, ItemList* itemlist, int16 ch // @merth: IDFile size has been increased, this needs to change uint16 emat; if(item2->Material <= 0 - || item2->Slots & (1 << EQEmu::invslot::slotPrimary | 1 << EQEmu::invslot::slotSecondary)) { + || (item2->Slots & ((1 << EQEmu::invslot::slotPrimary) | (1 << EQEmu::invslot::slotSecondary)))) { memset(newid, 0, sizeof(newid)); for(int i=0;i<7;i++){ if (!isalpha(item2->IDFile[i])){ diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp index da62dc305..3467673d8 100644 --- a/zone/lua_general.cpp +++ b/zone/lua_general.cpp @@ -1870,27 +1870,22 @@ luabind::scope lua_register_slot() { luabind::value("Face", static_cast(EQEmu::invslot::slotFace)), luabind::value("Ear2", static_cast(EQEmu::invslot::slotEar2)), luabind::value("Neck", static_cast(EQEmu::invslot::slotNeck)), - luabind::value("Shoulder", static_cast(EQEmu::invslot::slotShoulders)), // deprecated luabind::value("Shoulders", static_cast(EQEmu::invslot::slotShoulders)), luabind::value("Arms", static_cast(EQEmu::invslot::slotArms)), luabind::value("Back", static_cast(EQEmu::invslot::slotBack)), - luabind::value("Bracer1", static_cast(EQEmu::invslot::slotWrist1)), // deprecated luabind::value("Wrist1", static_cast(EQEmu::invslot::slotWrist1)), - luabind::value("Bracer2", static_cast(EQEmu::invslot::slotWrist2)), // deprecated luabind::value("Wrist2", static_cast(EQEmu::invslot::slotWrist2)), luabind::value("Range", static_cast(EQEmu::invslot::slotRange)), luabind::value("Hands", static_cast(EQEmu::invslot::slotHands)), luabind::value("Primary", static_cast(EQEmu::invslot::slotPrimary)), luabind::value("Secondary", static_cast(EQEmu::invslot::slotSecondary)), - luabind::value("Ring1", static_cast(EQEmu::invslot::slotFinger1)), // deprecated luabind::value("Finger1", static_cast(EQEmu::invslot::slotFinger1)), - luabind::value("Ring2", static_cast(EQEmu::invslot::slotFinger2)), // deprecated luabind::value("Finger2", static_cast(EQEmu::invslot::slotFinger2)), luabind::value("Chest", static_cast(EQEmu::invslot::slotChest)), luabind::value("Legs", static_cast(EQEmu::invslot::slotLegs)), luabind::value("Feet", static_cast(EQEmu::invslot::slotFeet)), luabind::value("Waist", static_cast(EQEmu::invslot::slotWaist)), - luabind::value("PowerSource", static_cast(EQEmu::invslot::SLOT_POWER_SOURCE)), + luabind::value("PowerSource", static_cast(EQEmu::invslot::slotPowerSource)), luabind::value("Ammo", static_cast(EQEmu::invslot::slotAmmo)), luabind::value("General1", static_cast(EQEmu::invslot::slotGeneral1)), luabind::value("General2", static_cast(EQEmu::invslot::slotGeneral2)), @@ -1900,15 +1895,43 @@ luabind::scope lua_register_slot() { luabind::value("General6", static_cast(EQEmu::invslot::slotGeneral6)), luabind::value("General7", static_cast(EQEmu::invslot::slotGeneral7)), luabind::value("General8", static_cast(EQEmu::invslot::slotGeneral8)), + luabind::value("General9", static_cast(EQEmu::invslot::slotGeneral9)), + luabind::value("General10", static_cast(EQEmu::invslot::slotGeneral10)), luabind::value("Cursor", static_cast(EQEmu::invslot::slotCursor)), - luabind::value("PersonalBegin", static_cast(EQEmu::invslot::GENERAL_BEGIN)), // deprecated + luabind::value("PossessionsBegin", static_cast(EQEmu::invslot::POSSESSIONS_BEGIN)), + luabind::value("PossessionsEnd", static_cast(EQEmu::invslot::POSSESSIONS_END)), + luabind::value("EquipmentBegin", static_cast(EQEmu::invslot::EQUIPMENT_BEGIN)), + luabind::value("EquipmentEnd", static_cast(EQEmu::invslot::EQUIPMENT_END)), luabind::value("GeneralBegin", static_cast(EQEmu::invslot::GENERAL_BEGIN)), - luabind::value("PersonalEnd", static_cast(EQEmu::invslot::GENERAL_END)), // deprecated luabind::value("GeneralEnd", static_cast(EQEmu::invslot::GENERAL_END)), + luabind::value("GeneralBagsBegin", static_cast(EQEmu::invbag::GENERAL_BAGS_BEGIN)), + luabind::value("GeneralBagsEnd", static_cast(EQEmu::invbag::GENERAL_BAGS_END)), + luabind::value("CursorBagBegin", static_cast(EQEmu::invbag::CURSOR_BAG_BEGIN)), + luabind::value("CursorBagEnd", static_cast(EQEmu::invbag::CURSOR_BAG_END)), + luabind::value("BankBegin", static_cast(EQEmu::invslot::BANK_BEGIN)), + luabind::value("BankEnd", static_cast(EQEmu::invslot::BANK_END)), + luabind::value("BankBagsBegin", static_cast(EQEmu::invbag::BANK_BAGS_BEGIN)), + luabind::value("BankBagsEnd", static_cast(EQEmu::invbag::BANK_BAGS_END)), + luabind::value("SharedBankBegin", static_cast(EQEmu::invslot::SHARED_BANK_BEGIN)), + luabind::value("SharedBankEnd", static_cast(EQEmu::invslot::SHARED_BANK_END)), + luabind::value("SharedBankBagsBegin", static_cast(EQEmu::invbag::SHARED_BANK_BAGS_BEGIN)), + luabind::value("SharedBankBagsEnd", static_cast(EQEmu::invbag::SHARED_BANK_BAGS_END)), + luabind::value("BagSlotBegin", static_cast(EQEmu::invbag::SLOT_BEGIN)), + luabind::value("BagSlotEnd", static_cast(EQEmu::invbag::SLOT_END)), + luabind::value("AugSocketBegin", static_cast(EQEmu::invaug::SOCKET_BEGIN)), + luabind::value("AugSocketEnd", static_cast(EQEmu::invaug::SOCKET_END)), + luabind::value("Invalid", static_cast(EQEmu::invslot::SLOT_INVALID)), + + luabind::value("Shoulder", static_cast(EQEmu::invslot::slotShoulders)), // deprecated + luabind::value("Bracer1", static_cast(EQEmu::invslot::slotWrist1)), // deprecated + luabind::value("Bracer2", static_cast(EQEmu::invslot::slotWrist2)), // deprecated + luabind::value("Ring1", static_cast(EQEmu::invslot::slotFinger1)), // deprecated + luabind::value("Ring2", static_cast(EQEmu::invslot::slotFinger2)), // deprecated + luabind::value("PersonalBegin", static_cast(EQEmu::invslot::GENERAL_BEGIN)), // deprecated + luabind::value("PersonalEnd", static_cast(EQEmu::invslot::GENERAL_END)), // deprecated luabind::value("CursorEnd", 0xFFFE), // deprecated luabind::value("Tradeskill", static_cast(EQEmu::legacy::SLOT_TRADESKILL)), // deprecated - luabind::value("Augment", static_cast(EQEmu::legacy::SLOT_AUGMENT)), // deprecated - luabind::value("Invalid", INVALID_INDEX) + luabind::value("Augment", static_cast(EQEmu::legacy::SLOT_AUGMENT)) // deprecated ]; } @@ -1919,16 +1942,17 @@ luabind::scope lua_register_material() { luabind::value("Head", static_cast(EQEmu::textures::armorHead)), luabind::value("Chest", static_cast(EQEmu::textures::armorChest)), luabind::value("Arms", static_cast(EQEmu::textures::armorArms)), - luabind::value("Bracer", static_cast(EQEmu::textures::armorWrist)), // deprecated luabind::value("Wrist", static_cast(EQEmu::textures::armorWrist)), luabind::value("Hands", static_cast(EQEmu::textures::armorHands)), luabind::value("Legs", static_cast(EQEmu::textures::armorLegs)), luabind::value("Feet", static_cast(EQEmu::textures::armorFeet)), luabind::value("Primary", static_cast(EQEmu::textures::weaponPrimary)), luabind::value("Secondary", static_cast(EQEmu::textures::weaponSecondary)), - luabind::value("Max", static_cast(EQEmu::textures::materialCount)), // deprecated luabind::value("Count", static_cast(EQEmu::textures::materialCount)), - luabind::value("Invalid", static_cast(EQEmu::textures::materialInvalid)) + luabind::value("Invalid", static_cast(EQEmu::textures::materialInvalid)), + + luabind::value("Bracer", static_cast(EQEmu::textures::armorWrist)), // deprecated + luabind::value("Max", static_cast(EQEmu::textures::materialCount)) // deprecated ]; } diff --git a/zone/merc.cpp b/zone/merc.cpp index 82d66878a..7e660f82b 100644 --- a/zone/merc.cpp +++ b/zone/merc.cpp @@ -217,22 +217,16 @@ void Merc::CalcItemBonuses(StatBonuses* newbon) { unsigned int i; //should not include 21 (SLOT_AMMO) - for (i = 0; i < EQEmu::invslot::slotAmmo; i++) { - if(equipment[i] == 0) + for (i = EQEmu::invslot::BONUS_BEGIN; i <= EQEmu::invslot::BONUS_STAT_END; i++) { + if (i == EQEmu::invslot::slotAmmo) + continue; + if (equipment[i] == 0) continue; const EQEmu::ItemData * itm = database.GetItem(equipment[i]); - if(itm) + if (itm) AddItemBonuses(itm, newbon); } - //Power Source Slot - /*if (GetClientVersion() >= EQClientSoF) - { - const EQEmu::ItemInstance* inst = m_inv[MainPowerSource]; - if(inst) - AddItemBonuses(inst, newbon); - }*/ - // Caps if(newbon->HPRegen > CalcHPRegenCap()) newbon->HPRegen = CalcHPRegenCap(); diff --git a/zone/perl_client.cpp b/zone/perl_client.cpp index 47d5dd89a..74c95f5d2 100644 --- a/zone/perl_client.cpp +++ b/zone/perl_client.cpp @@ -3026,7 +3026,7 @@ XS(XS_Client_SummonItem) { dXSARGS; if (items < 2 || items > 10) Perl_croak(aTHX_ - "Usage: Client::SummonItem(THIS, uint32 item_id, [int16 charges = -1], [bool attune = false], [uint32 aug1 = 0], [uint32 aug2 = 0], [uint32 aug3 = 0], [uint32 aug4 = 0], [uint32 aug5 = 0], [uint16 slot_id = 30])"); + "Usage: Client::SummonItem(THIS, uint32 item_id, [int16 charges = -1], [bool attune = false], [uint32 aug1 = 0], [uint32 aug2 = 0], [uint32 aug3 = 0], [uint32 aug4 = 0], [uint32 aug5 = 0], [uint16 slot_id = cursor])"); { Client *THIS; uint32 item_id = (uint32) SvUV(ST(1)); @@ -3037,7 +3037,7 @@ XS(XS_Client_SummonItem) { uint32 aug3 = 0; uint32 aug4 = 0; uint32 aug5 = 0; - uint16 slot_id = 30; + uint16 slot_id = EQEmu::invslot::slotCursor; if (sv_derived_from(ST(0), "Client")) { IV tmp = SvIV((SV *) SvRV(ST(0))); diff --git a/zone/pets.cpp b/zone/pets.cpp index e4f7c417b..975e57ebf 100644 --- a/zone/pets.cpp +++ b/zone/pets.cpp @@ -527,7 +527,7 @@ void NPC::GetPetState(SpellBuff_Struct *pet_buffs, uint32 *items, char *name) { memcpy(items, equipment, sizeof(uint32) * EQEmu::invslot::EQUIPMENT_COUNT); //save their buffs. - for (int i=0; i < GetPetMaxTotalSlots(); i++) { + for (int i=EQEmu::invslot::EQUIPMENT_BEGIN; i < GetPetMaxTotalSlots(); i++) { if (buffs[i].spellid != SPELL_UNKNOWN) { pet_buffs[i].spellid = buffs[i].spellid; pet_buffs[i].effect_type = i+1; diff --git a/zone/spells.cpp b/zone/spells.cpp index 8f8cfba33..574056679 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -281,7 +281,7 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot, return(false); } } - if (itm && (itm->GetItem()->Click.Type == EQEmu::item::ItemEffectEquipClick) && !(item_slot <= EQEmu::invslot::slotAmmo || item_slot == EQEmu::invslot::SLOT_POWER_SOURCE)){ + if (itm && (itm->GetItem()->Click.Type == EQEmu::item::ItemEffectEquipClick) && item_slot > EQEmu::invslot::EQUIPMENT_END){ if (CastToClient()->ClientVersion() < EQEmu::versions::ClientVersion::SoF) { // They are attempting to cast a must equip clicky without having it equipped Log(Logs::General, Logs::Error, "HACKER: %s (account: %s) attempted to click an equip-only effect on item %s (id: %d) without equiping it!", CastToClient()->GetCleanName(), CastToClient()->AccountName(), itm->GetItem()->Name, itm->GetItem()->ID); diff --git a/zone/trading.cpp b/zone/trading.cpp index d3456fbf2..8c07db9fc 100644 --- a/zone/trading.cpp +++ b/zone/trading.cpp @@ -1202,7 +1202,7 @@ void Client::SendSingleTraderItem(uint32 CharID, int SerialNumber) { EQEmu::ItemInstance* inst= database.LoadSingleTraderItem(CharID, SerialNumber); if(inst) { - SendItemPacket(30, inst, ItemPacketMerchant); // MainCursor? + SendItemPacket(EQEmu::invslot::slotCursor, inst, ItemPacketMerchant); // MainCursor? safe_delete(inst); } @@ -1233,7 +1233,7 @@ void Client::BulkSendTraderInventory(uint32 char_id) { } inst->SetPrice(TraderItems->ItemCost[i]); - SendItemPacket(30, inst, ItemPacketMerchant); // MainCursor? + SendItemPacket(EQEmu::invslot::slotCursor, inst, ItemPacketMerchant); // MainCursor? safe_delete(inst); } else @@ -2072,7 +2072,7 @@ static void UpdateTraderCustomerItemsAdded(uint32 CustomerID, TraderCharges_Stru Log(Logs::Detail, Logs::Trading, "Sending price update for %s, Serial No. %i with %i charges", item->Name, gis->SerialNumber[i], gis->Charges[i]); - Customer->SendItemPacket(30, inst, ItemPacketMerchant); // MainCursor? + Customer->SendItemPacket(EQEmu::invslot::slotCursor, inst, ItemPacketMerchant); // MainCursor? } } @@ -2156,7 +2156,7 @@ static void UpdateTraderCustomerPriceChanged(uint32 CustomerID, TraderCharges_St Log(Logs::Detail, Logs::Trading, "Sending price update for %s, Serial No. %i with %i charges", item->Name, gis->SerialNumber[i], gis->Charges[i]); - Customer->SendItemPacket(30, inst, ItemPacketMerchant); // MainCursor?? + Customer->SendItemPacket(EQEmu::invslot::slotCursor, inst, ItemPacketMerchant); // MainCursor?? } safe_delete(inst); } From 585ef81fdeef3bc85c101d6f98995c6970206455 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 15 Aug 2018 21:35:19 -0400 Subject: [PATCH 342/670] Fix lua raid GetGroup(client) and add lua raid GetGroupNumber(index) This number will return group number and not let us iterate a bunch of times to verify group numbers --- zone/lua_raid.cpp | 14 +++++++++++++- zone/lua_raid.h | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/zone/lua_raid.cpp b/zone/lua_raid.cpp index 295fe0220..38ffb28d5 100644 --- a/zone/lua_raid.cpp +++ b/zone/lua_raid.cpp @@ -122,6 +122,16 @@ Lua_Client Lua_Raid::GetMember(int index) { return self->members[index].member; } +int Lua_Raid::GetGroupNumber(int index) { + Lua_Safe_Call_Int(); + + if(index >= 72 || index < 0 || self->members[index].GroupNumber == RAID_GROUPLESS) { + return -1; + } + + return self->members[index].GroupNumber; +} + luabind::scope lua_register_raid() { return luabind::class_("Raid") @@ -133,6 +143,7 @@ luabind::scope lua_register_raid() { .def("GroupCount", (int(Lua_Raid::*)(uint32))&Lua_Raid::GroupCount) .def("RaidCount", (int(Lua_Raid::*)(void))&Lua_Raid::RaidCount) .def("GetGroup", (uint32(Lua_Raid::*)(const char*))&Lua_Raid::GetGroup) + .def("GetGroup", (uint32(Lua_Raid::*)(Lua_Client))&Lua_Raid::GetGroup) .def("SplitExp", (void(Lua_Raid::*)(uint32,Lua_Mob))&Lua_Raid::SplitExp) .def("GetTotalRaidDamage", (uint32(Lua_Raid::*)(Lua_Mob))&Lua_Raid::GetTotalRaidDamage) .def("SplitMoney", (void(Lua_Raid::*)(uint32,uint32,uint32,uint32))&Lua_Raid::SplitMoney) @@ -146,7 +157,8 @@ luabind::scope lua_register_raid() { .def("TeleportGroup", (int(Lua_Raid::*)(Lua_Mob,uint32,uint32,float,float,float,float,uint32))&Lua_Raid::TeleportGroup) .def("TeleportRaid", (int(Lua_Raid::*)(Lua_Mob,uint32,uint32,float,float,float,float))&Lua_Raid::TeleportRaid) .def("GetID", (int(Lua_Raid::*)(void))&Lua_Raid::GetID) - .def("GetMember", (Lua_Client(Lua_Raid::*)(int))&Lua_Raid::GetMember); + .def("GetMember", (Lua_Client(Lua_Raid::*)(int))&Lua_Raid::GetMember) + .def("GetGroupNumber", (int(Lua_Raid::*)(int))&Lua_Raid::GetGroupNumber); } #endif diff --git a/zone/lua_raid.h b/zone/lua_raid.h index cc88a1c3d..eb7a67e24 100644 --- a/zone/lua_raid.h +++ b/zone/lua_raid.h @@ -47,6 +47,7 @@ public: void TeleportRaid(Lua_Mob sender, uint32 zone_id, uint32 instance_id, float x, float y, float z, float h); int GetID(); Lua_Client GetMember(int index); + int GetGroupNumber(int index); }; #endif From 30148c3c567a4d79e7c0eee37ed408686702f3e7 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 16 Aug 2018 13:01:19 -0400 Subject: [PATCH 343/670] AE rampage shouldn't hit target --- zone/hate_list.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/hate_list.cpp b/zone/hate_list.cpp index f02cbe6b6..8ddd89079 100644 --- a/zone/hate_list.cpp +++ b/zone/hate_list.cpp @@ -580,7 +580,7 @@ int HateList::AreaRampage(Mob *caster, Mob *target, int count, ExtraAttackOption // This is a temp solution until the hate lists can be rewritten to not have that issue std::vector id_list; for (auto &h : list) { - if (h->entity_on_hatelist && h->entity_on_hatelist != caster && + if (h->entity_on_hatelist && h->entity_on_hatelist != caster && h->entity_on_hatelist != target && caster->CombatRange(h->entity_on_hatelist)) id_list.push_back(h->entity_on_hatelist->GetID()); if (count != -1 && id_list.size() > count) From ffb9323a98044124f79858c9ca579e94912fd9bf Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 16 Aug 2018 13:18:00 -0400 Subject: [PATCH 344/670] Revert "AE rampage shouldn't hit target" This reverts commit 30148c3c567a4d79e7c0eee37ed408686702f3e7. Was thinking of wrong thing ... logs say otherwise :P --- zone/hate_list.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/hate_list.cpp b/zone/hate_list.cpp index 8ddd89079..f02cbe6b6 100644 --- a/zone/hate_list.cpp +++ b/zone/hate_list.cpp @@ -580,7 +580,7 @@ int HateList::AreaRampage(Mob *caster, Mob *target, int count, ExtraAttackOption // This is a temp solution until the hate lists can be rewritten to not have that issue std::vector id_list; for (auto &h : list) { - if (h->entity_on_hatelist && h->entity_on_hatelist != caster && h->entity_on_hatelist != target && + if (h->entity_on_hatelist && h->entity_on_hatelist != caster && caster->CombatRange(h->entity_on_hatelist)) id_list.push_back(h->entity_on_hatelist->GetID()); if (count != -1 && id_list.size() > count) From ace81215a1964f9fe7e89abf9e24b6bb0a345f84 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 16 Aug 2018 17:13:34 -0400 Subject: [PATCH 345/670] Correct when tanks can be hit by AE Rampage Tanks will only be hit by AE Rampage if they're the only one on the NPC's hate list. Others on hate list out ranging AE Rampage will also prevent the tank from being hit by AE Rampage. --- zone/hate_list.cpp | 9 ++++++++- zone/mob_ai.cpp | 2 -- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/zone/hate_list.cpp b/zone/hate_list.cpp index f02cbe6b6..5649c0da4 100644 --- a/zone/hate_list.cpp +++ b/zone/hate_list.cpp @@ -575,12 +575,19 @@ int HateList::AreaRampage(Mob *caster, Mob *target, int count, ExtraAttackOption if (!target || !caster) return 0; + // tank will be hit ONLY if they are the only target on the hate list + // if there is anyone else on the hate list, the tank will not be hit, even if those others aren't hit either + if (list.size() == 1) { + caster->ProcessAttackRounds(target, opts); + return 1; + } + int hit_count = 0; // This should prevent crashes if something dies (or mainly more than 1 thing goes away) // This is a temp solution until the hate lists can be rewritten to not have that issue std::vector id_list; for (auto &h : list) { - if (h->entity_on_hatelist && h->entity_on_hatelist != caster && + if (h->entity_on_hatelist && h->entity_on_hatelist != caster && h->entity_on_hatelist != target && caster->CombatRange(h->entity_on_hatelist)) id_list.push_back(h->entity_on_hatelist->GetID()); if (count != -1 && id_list.size() > count) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 154575c40..e769bda95 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -2255,8 +2255,6 @@ void Mob::AreaRampage(ExtraAttackOptions *opts) m_specialattacks = eSpecialAttacks::AERampage; index_hit = hate_list.AreaRampage(this, GetTarget(), rampage_targets, opts); - if(index_hit == 0) - ProcessAttackRounds(GetTarget(), opts); m_specialattacks = eSpecialAttacks::None; } From 7cc5b143fca9077c144f158952c0dbb11fb10d80 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 16 Aug 2018 22:33:07 -0400 Subject: [PATCH 346/670] Make lua raid GetGroup functions signed The server code is unsigned for bad reasons :P --- zone/lua_raid.cpp | 8 ++++---- zone/lua_raid.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/zone/lua_raid.cpp b/zone/lua_raid.cpp index 38ffb28d5..93c1f4c28 100644 --- a/zone/lua_raid.cpp +++ b/zone/lua_raid.cpp @@ -32,12 +32,12 @@ int Lua_Raid::RaidCount() { return self->RaidCount(); } -uint32 Lua_Raid::GetGroup(const char *c) { +int Lua_Raid::GetGroup(const char *c) { Lua_Safe_Call_Int(); return self->GetGroup(c); } -uint32 Lua_Raid::GetGroup(Lua_Client c) { +int Lua_Raid::GetGroup(Lua_Client c) { Lua_Safe_Call_Int(); return self->GetGroup(c); } @@ -142,8 +142,8 @@ luabind::scope lua_register_raid() { .def("CastGroupSpell", (void(Lua_Raid::*)(Lua_Mob,int,uint32))&Lua_Raid::CastGroupSpell) .def("GroupCount", (int(Lua_Raid::*)(uint32))&Lua_Raid::GroupCount) .def("RaidCount", (int(Lua_Raid::*)(void))&Lua_Raid::RaidCount) - .def("GetGroup", (uint32(Lua_Raid::*)(const char*))&Lua_Raid::GetGroup) - .def("GetGroup", (uint32(Lua_Raid::*)(Lua_Client))&Lua_Raid::GetGroup) + .def("GetGroup", (int(Lua_Raid::*)(const char*))&Lua_Raid::GetGroup) + .def("GetGroup", (int(Lua_Raid::*)(Lua_Client))&Lua_Raid::GetGroup) .def("SplitExp", (void(Lua_Raid::*)(uint32,Lua_Mob))&Lua_Raid::SplitExp) .def("GetTotalRaidDamage", (uint32(Lua_Raid::*)(Lua_Mob))&Lua_Raid::GetTotalRaidDamage) .def("SplitMoney", (void(Lua_Raid::*)(uint32,uint32,uint32,uint32))&Lua_Raid::SplitMoney) diff --git a/zone/lua_raid.h b/zone/lua_raid.h index eb7a67e24..626b98bb2 100644 --- a/zone/lua_raid.h +++ b/zone/lua_raid.h @@ -30,8 +30,8 @@ public: void CastGroupSpell(Lua_Mob caster, int spell_id, uint32 group_id); int GroupCount(uint32 group_id); int RaidCount(); - uint32 GetGroup(const char *c); - uint32 GetGroup(Lua_Client c); + int GetGroup(const char *c); + int GetGroup(Lua_Client c); void SplitExp(uint32 exp, Lua_Mob other); uint32 GetTotalRaidDamage(Lua_Mob other); void SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinum); From 40cb53f5a4fb35805d8386e47ccabb4066d84e41 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Fri, 17 Aug 2018 23:54:24 -0500 Subject: [PATCH 347/670] Syntax, naming and formatting tweaks --- common/inventory_profile.cpp | 100 ++++--- common/inventory_profile.h | 2 +- common/patches/rof.cpp | 560 +++++++++++++++++++---------------- common/patches/rof2.cpp | 312 +++++++++---------- common/patches/sod.cpp | 152 +++++----- common/patches/sof.cpp | 355 +++++++++++----------- common/patches/titanium.cpp | 513 ++++++++++++++++---------------- zone/lua_inventory.cpp | 4 +- zone/lua_inventory.h | 2 +- 9 files changed, 1017 insertions(+), 983 deletions(-) diff --git a/common/inventory_profile.cpp b/common/inventory_profile.cpp index 8d9ee22f8..c0f3c25e8 100644 --- a/common/inventory_profile.cpp +++ b/common/inventory_profile.cpp @@ -263,134 +263,139 @@ int16 EQEmu::InventoryProfile::PutItem(int16 slot_id, const ItemInstance& inst) return _PutItem(slot_id, inst.Clone()); } -int16 EQEmu::InventoryProfile::PushCursor(const ItemInstance& inst) -{ +int16 EQEmu::InventoryProfile::PushCursor(const ItemInstance &inst) { m_cursor.push(inst.Clone()); return invslot::slotCursor; } -EQEmu::ItemInstance* EQEmu::InventoryProfile::GetCursorItem() -{ +EQEmu::ItemInstance* EQEmu::InventoryProfile::GetCursorItem() { return m_cursor.peek_front(); } // Swap items in inventory -bool EQEmu::InventoryProfile::SwapItem(int16 slot_a, int16 slot_b, SwapItemFailState& fail_state, uint16 race_id, uint8 class_id, uint16 deity_id, uint8 level) -{ +bool EQEmu::InventoryProfile::SwapItem( + int16 source_slot, + int16 destination_slot, + SwapItemFailState &fail_state, + uint16 race_id, + uint8 class_id, + uint16 deity_id, + uint8 level +) { fail_state = swapInvalid; - - if (slot_a <= EQEmu::invslot::POSSESSIONS_END && slot_a >= EQEmu::invslot::POSSESSIONS_BEGIN) { - if ((((uint64)1 << slot_a) & m_lookup->PossessionsBitmask) == 0) { + + if (source_slot <= EQEmu::invslot::POSSESSIONS_END && source_slot >= EQEmu::invslot::POSSESSIONS_BEGIN) { + if ((((uint64) 1 << source_slot) & m_lookup->PossessionsBitmask) == 0) { fail_state = swapNotAllowed; return false; } } - else if (slot_a <= EQEmu::invbag::GENERAL_BAGS_END && slot_a >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { - auto temp_slot = EQEmu::invslot::GENERAL_BEGIN + ((slot_a - EQEmu::invbag::GENERAL_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT); + else if (source_slot <= EQEmu::invbag::GENERAL_BAGS_END && source_slot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { + auto temp_slot = EQEmu::invslot::GENERAL_BEGIN + ((source_slot - EQEmu::invbag::GENERAL_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT); if ((((uint64)1 << temp_slot) & m_lookup->PossessionsBitmask) == 0) { fail_state = swapNotAllowed; return false; } } - else if (slot_a <= EQEmu::invslot::BANK_END && slot_a >= EQEmu::invslot::BANK_BEGIN) { - if ((slot_a - EQEmu::invslot::BANK_BEGIN) >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) { + else if (source_slot <= EQEmu::invslot::BANK_END && source_slot >= EQEmu::invslot::BANK_BEGIN) { + if ((source_slot - EQEmu::invslot::BANK_BEGIN) >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) { fail_state = swapNotAllowed; return false; } } - else if (slot_a <= EQEmu::invbag::BANK_BAGS_END && slot_a >= EQEmu::invbag::BANK_BAGS_BEGIN) { - auto temp_slot = (slot_a - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT; + else if (source_slot <= EQEmu::invbag::BANK_BAGS_END && source_slot >= EQEmu::invbag::BANK_BAGS_BEGIN) { + auto temp_slot = (source_slot - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT; if (temp_slot >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) { fail_state = swapNotAllowed; return false; } } - if (slot_b <= EQEmu::invslot::POSSESSIONS_END && slot_b >= EQEmu::invslot::POSSESSIONS_BEGIN) { - if ((((uint64)1 << slot_b) & m_lookup->PossessionsBitmask) == 0) { + if (destination_slot <= EQEmu::invslot::POSSESSIONS_END && destination_slot >= EQEmu::invslot::POSSESSIONS_BEGIN) { + if ((((uint64)1 << destination_slot) & m_lookup->PossessionsBitmask) == 0) { fail_state = swapNotAllowed; return false; } } - else if (slot_b <= EQEmu::invbag::GENERAL_BAGS_END && slot_b >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { - auto temp_slot = EQEmu::invslot::GENERAL_BEGIN + ((slot_b - EQEmu::invbag::GENERAL_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT); + else if (destination_slot <= EQEmu::invbag::GENERAL_BAGS_END && destination_slot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { + auto temp_slot = EQEmu::invslot::GENERAL_BEGIN + ((destination_slot - EQEmu::invbag::GENERAL_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT); if ((((uint64)1 << temp_slot) & m_lookup->PossessionsBitmask) == 0) { fail_state = swapNotAllowed; return false; } } - else if (slot_b <= EQEmu::invslot::BANK_END && slot_b >= EQEmu::invslot::BANK_BEGIN) { - if ((slot_b - EQEmu::invslot::BANK_BEGIN) >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) { + else if (destination_slot <= EQEmu::invslot::BANK_END && destination_slot >= EQEmu::invslot::BANK_BEGIN) { + if ((destination_slot - EQEmu::invslot::BANK_BEGIN) >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) { fail_state = swapNotAllowed; return false; } } - else if (slot_b <= EQEmu::invbag::BANK_BAGS_END && slot_b >= EQEmu::invbag::BANK_BAGS_BEGIN) { - auto temp_slot = (slot_b - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT; + else if (destination_slot <= EQEmu::invbag::BANK_BAGS_END && destination_slot >= EQEmu::invbag::BANK_BAGS_BEGIN) { + auto temp_slot = (destination_slot - EQEmu::invbag::BANK_BAGS_BEGIN) / EQEmu::invbag::SLOT_COUNT; if (temp_slot >= m_lookup->InventoryTypeSize[EQEmu::invtype::typeBank]) { fail_state = swapNotAllowed; return false; } } - // Temp holding areas for a and b - ItemInstance* inst_a = GetItem(slot_a); - ItemInstance* inst_b = GetItem(slot_b); + // Temp holding areas for source and destination + ItemInstance *source_item_instance = GetItem(source_slot); + ItemInstance *destination_item_instance = GetItem(destination_slot); - if (inst_a) { - if (!inst_a->IsSlotAllowed(slot_b)) { + if (source_item_instance) { + if (!source_item_instance->IsSlotAllowed(destination_slot)) { fail_state = swapNotAllowed; return false; } - if ((slot_b >= invslot::EQUIPMENT_BEGIN && slot_b <= invslot::EQUIPMENT_END)) { - auto item_a = inst_a->GetItem(); - if (!item_a) { + if ((destination_slot >= invslot::EQUIPMENT_BEGIN && destination_slot <= invslot::EQUIPMENT_END)) { + auto source_item = source_item_instance->GetItem(); + if (!source_item) { fail_state = swapNullData; return false; } - if (race_id && class_id && !item_a->IsEquipable(race_id, class_id)) { + if (race_id && class_id && !source_item->IsEquipable(race_id, class_id)) { fail_state = swapRaceClass; return false; } - if (deity_id && item_a->Deity && !(deity::ConvertDeityTypeToDeityTypeBit((deity::DeityType)deity_id) & item_a->Deity)) { + if (deity_id && source_item->Deity && !(deity::ConvertDeityTypeToDeityTypeBit((deity::DeityType)deity_id) & source_item->Deity)) { fail_state = swapDeity; return false; } - if (level && item_a->ReqLevel && level < item_a->ReqLevel) { + if (level && source_item->ReqLevel && level < source_item->ReqLevel) { fail_state = swapLevel; return false; } } } - if (inst_b) { - if (!inst_b->IsSlotAllowed(slot_a)) { + if (destination_item_instance) { + if (!destination_item_instance->IsSlotAllowed(source_slot)) { fail_state = swapNotAllowed; return false; } - if ((slot_a >= invslot::EQUIPMENT_BEGIN && slot_a <= invslot::EQUIPMENT_END)) { - auto item_b = inst_b->GetItem(); - if (!item_b) { + if ((source_slot >= invslot::EQUIPMENT_BEGIN && source_slot <= invslot::EQUIPMENT_END)) { + auto destination_item = destination_item_instance->GetItem(); + if (!destination_item) { fail_state = swapNullData; return false; } - if (race_id && class_id && !item_b->IsEquipable(race_id, class_id)) { + if (race_id && class_id && !destination_item->IsEquipable(race_id, class_id)) { fail_state = swapRaceClass; return false; } - if (deity_id && item_b->Deity && !(deity::ConvertDeityTypeToDeityTypeBit((deity::DeityType)deity_id) & item_b->Deity)) { + if (deity_id && destination_item->Deity && !(deity::ConvertDeityTypeToDeityTypeBit((deity::DeityType)deity_id) & destination_item->Deity)) { fail_state = swapDeity; return false; } - if (level && item_b->ReqLevel && level < item_b->ReqLevel) { + if (level && destination_item->ReqLevel && level < destination_item->ReqLevel) { fail_state = swapLevel; return false; } } } - _PutItem(slot_a, inst_b); // Assign b->a - _PutItem(slot_b, inst_a); // Assign a->b + _PutItem(source_slot, destination_item_instance); // Assign destination -> source + _PutItem(destination_slot, source_item_instance); // Assign source -> destination fail_state = swapPass; @@ -398,10 +403,9 @@ bool EQEmu::InventoryProfile::SwapItem(int16 slot_a, int16 slot_b, SwapItemFailS } // Remove item from inventory (with memory delete) -bool EQEmu::InventoryProfile::DeleteItem(int16 slot_id, uint8 quantity) -{ +bool EQEmu::InventoryProfile::DeleteItem(int16 slot_id, uint8 quantity) { // Pop item out of inventory map (or queue) - ItemInstance* item_to_delete = PopItem(slot_id); + ItemInstance *item_to_delete = PopItem(slot_id); // Determine if object should be fully deleted, or // just a quantity of charges of the item can be deleted @@ -415,7 +419,7 @@ bool EQEmu::InventoryProfile::DeleteItem(int16 slot_id, uint8 quantity) // the item is not stackable, and is not a charged item, or is expendable, delete it if (item_to_delete->IsStackable() || (!item_to_delete->IsStackable() && - ((item_to_delete->GetItem()->MaxCharges == 0) || item_to_delete->IsExpendable())) + ((item_to_delete->GetItem()->MaxCharges == 0) || item_to_delete->IsExpendable())) ) { // Item can now be destroyed InventoryProfile::MarkDirty(item_to_delete); diff --git a/common/inventory_profile.h b/common/inventory_profile.h index 1f28b00f9..3a90e847d 100644 --- a/common/inventory_profile.h +++ b/common/inventory_profile.h @@ -126,7 +126,7 @@ namespace EQEmu // Swap items in inventory enum SwapItemFailState : int8 { swapInvalid = -1, swapPass = 0, swapNotAllowed, swapNullData, swapRaceClass, swapDeity, swapLevel }; - bool SwapItem(int16 slot_a, int16 slot_b, SwapItemFailState& fail_state, uint16 race_id = 0, uint8 class_id = 0, uint16 deity_id = 0, uint8 level = 0); + bool SwapItem(int16 source_slot, int16 destination_slot, SwapItemFailState& fail_state, uint16 race_id = 0, uint8 class_id = 0, uint16 deity_id = 0, uint8 level = 0); // Remove item from inventory bool DeleteItem(int16 slot_id, uint8 quantity = 0); diff --git a/common/patches/rof.cpp b/common/patches/rof.cpp index 68a365b28..388bfddef 100644 --- a/common/patches/rof.cpp +++ b/common/patches/rof.cpp @@ -48,16 +48,16 @@ namespace RoF void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id, uint8 depth, ItemPacketType packet_type); // server to client inventory location converters - static inline structs::InventorySlot_Struct ServerToRoFSlot(uint32 serverSlot); - static inline structs::InventorySlot_Struct ServerToRoFCorpseSlot(uint32 serverCorpseSlot); - static inline uint32 ServerToRoFCorpseMainSlot(uint32 serverCorpseSlot); - static inline structs::TypelessInventorySlot_Struct ServerToRoFTypelessSlot(uint32 serverSlot, int16 serverType); + static inline structs::InventorySlot_Struct ServerToRoFSlot(uint32 server_slot); + static inline structs::InventorySlot_Struct ServerToRoFCorpseSlot(uint32 server_corpse_slot); + static inline uint32 ServerToRoFCorpseMainSlot(uint32 server_corpse_slot); + static inline structs::TypelessInventorySlot_Struct ServerToRoFTypelessSlot(uint32 server_slot, int16 server_type); // client to server inventory location converters - static inline uint32 RoFToServerSlot(structs::InventorySlot_Struct rofSlot); - static inline uint32 RoFToServerCorpseSlot(structs::InventorySlot_Struct rofCorpseSlot); - static inline uint32 RoFToServerCorpseMainSlot(uint32 rofCorpseSlot); - static inline uint32 RoFToServerTypelessSlot(structs::TypelessInventorySlot_Struct rofSlot, int16 rofType); + static inline uint32 RoFToServerSlot(structs::InventorySlot_Struct rof_slot); + static inline uint32 RoFToServerCorpseSlot(structs::InventorySlot_Struct rof_corpse_slot); + static inline uint32 RoFToServerCorpseMainSlot(uint32 rof_corpse_slot); + static inline uint32 RoFToServerTypelessSlot(structs::TypelessInventorySlot_Struct rof_slot, int16 rof_type); // server to client say link converter static inline void ServerToRoFSayLink(std::string& rofSayLink, const std::string& serverSayLink); @@ -5545,124 +5545,142 @@ namespace RoF } } - static inline structs::InventorySlot_Struct ServerToRoFSlot(uint32 serverSlot) + static inline structs::InventorySlot_Struct ServerToRoFSlot(uint32 server_slot) { - structs::InventorySlot_Struct RoFSlot; - RoFSlot.Type = invtype::TYPE_INVALID; + structs::InventorySlot_Struct RoFSlot{}; + + RoFSlot.Type = invtype::TYPE_INVALID; RoFSlot.Unknown02 = INULL; - RoFSlot.Slot = invslot::SLOT_INVALID; - RoFSlot.SubIndex = invbag::SLOT_INVALID; - RoFSlot.AugIndex = invaug::SOCKET_INVALID; + RoFSlot.Slot = invslot::SLOT_INVALID; + RoFSlot.SubIndex = invbag::SLOT_INVALID; + RoFSlot.AugIndex = invaug::SOCKET_INVALID; RoFSlot.Unknown01 = INULL; - uint32 TempSlot = EQEmu::invslot::SLOT_INVALID; + uint32 temp_slot = (uint32) EQEmu::invslot::SLOT_INVALID; - if (serverSlot < EQEmu::invtype::POSSESSIONS_SIZE) { + if (server_slot < EQEmu::invtype::POSSESSIONS_SIZE) { RoFSlot.Type = invtype::typePossessions; - RoFSlot.Slot = serverSlot; + RoFSlot.Slot = server_slot; } - else if (serverSlot <= EQEmu::invbag::CURSOR_BAG_END && serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { - TempSlot = serverSlot - EQEmu::invbag::GENERAL_BAGS_BEGIN; - - RoFSlot.Type = invtype::typePossessions; - RoFSlot.Slot = invslot::GENERAL_BEGIN + (TempSlot / EQEmu::invbag::SLOT_COUNT); - RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot - invslot::GENERAL_BEGIN) * EQEmu::invbag::SLOT_COUNT); + else if (server_slot <= EQEmu::invbag::CURSOR_BAG_END && server_slot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { + temp_slot = server_slot - EQEmu::invbag::GENERAL_BAGS_BEGIN; + + RoFSlot.Type = invtype::typePossessions; + RoFSlot.Slot = invslot::GENERAL_BEGIN + (temp_slot / EQEmu::invbag::SLOT_COUNT); + RoFSlot.SubIndex = temp_slot - ((RoFSlot.Slot - invslot::GENERAL_BEGIN) * EQEmu::invbag::SLOT_COUNT); } - else if (serverSlot <= EQEmu::invslot::TRIBUTE_END && serverSlot >= EQEmu::invslot::TRIBUTE_BEGIN) { + else if (server_slot <= EQEmu::invslot::TRIBUTE_END && server_slot >= EQEmu::invslot::TRIBUTE_BEGIN) { RoFSlot.Type = invtype::typeTribute; - RoFSlot.Slot = serverSlot - EQEmu::invslot::TRIBUTE_BEGIN; + RoFSlot.Slot = server_slot - EQEmu::invslot::TRIBUTE_BEGIN; } - else if (serverSlot <= EQEmu::invslot::GUILD_TRIBUTE_END && serverSlot >= EQEmu::invslot::GUILD_TRIBUTE_BEGIN) { + else if (server_slot <= EQEmu::invslot::GUILD_TRIBUTE_END && server_slot >= EQEmu::invslot::GUILD_TRIBUTE_BEGIN) { RoFSlot.Type = invtype::typeGuildTribute; - RoFSlot.Slot = serverSlot - EQEmu::invslot::GUILD_TRIBUTE_BEGIN; + RoFSlot.Slot = server_slot - EQEmu::invslot::GUILD_TRIBUTE_BEGIN; } - else if (serverSlot <= EQEmu::invslot::BANK_END && serverSlot >= EQEmu::invslot::BANK_BEGIN) { + else if (server_slot <= EQEmu::invslot::BANK_END && server_slot >= EQEmu::invslot::BANK_BEGIN) { RoFSlot.Type = invtype::typeBank; - RoFSlot.Slot = serverSlot - EQEmu::invslot::BANK_BEGIN; + RoFSlot.Slot = server_slot - EQEmu::invslot::BANK_BEGIN; } - else if (serverSlot <= EQEmu::invbag::BANK_BAGS_END && serverSlot >= EQEmu::invbag::BANK_BAGS_BEGIN) { - TempSlot = serverSlot - EQEmu::invbag::BANK_BAGS_BEGIN; + else if (server_slot <= EQEmu::invbag::BANK_BAGS_END && server_slot >= EQEmu::invbag::BANK_BAGS_BEGIN) { + temp_slot = server_slot - EQEmu::invbag::BANK_BAGS_BEGIN; - RoFSlot.Type = invtype::typeBank; - RoFSlot.Slot = TempSlot / EQEmu::invbag::SLOT_COUNT; - RoFSlot.SubIndex = TempSlot - (RoFSlot.Slot * EQEmu::invbag::SLOT_COUNT); + RoFSlot.Type = invtype::typeBank; + RoFSlot.Slot = temp_slot / EQEmu::invbag::SLOT_COUNT; + RoFSlot.SubIndex = temp_slot - (RoFSlot.Slot * EQEmu::invbag::SLOT_COUNT); } - else if (serverSlot <= EQEmu::invslot::SHARED_BANK_END && serverSlot >= EQEmu::invslot::SHARED_BANK_BEGIN) { + else if (server_slot <= EQEmu::invslot::SHARED_BANK_END && server_slot >= EQEmu::invslot::SHARED_BANK_BEGIN) { RoFSlot.Type = invtype::typeSharedBank; - RoFSlot.Slot = serverSlot - EQEmu::invslot::SHARED_BANK_BEGIN; + RoFSlot.Slot = server_slot - EQEmu::invslot::SHARED_BANK_BEGIN; } - else if (serverSlot <= EQEmu::invbag::SHARED_BANK_BAGS_END && serverSlot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN) { - TempSlot = serverSlot - EQEmu::invbag::SHARED_BANK_BAGS_BEGIN; + else if (server_slot <= EQEmu::invbag::SHARED_BANK_BAGS_END && server_slot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN) { + temp_slot = server_slot - EQEmu::invbag::SHARED_BANK_BAGS_BEGIN; - RoFSlot.Type = invtype::typeSharedBank; - RoFSlot.Slot = TempSlot / EQEmu::invbag::SLOT_COUNT; - RoFSlot.SubIndex = TempSlot - (RoFSlot.Slot * EQEmu::invbag::SLOT_COUNT); + RoFSlot.Type = invtype::typeSharedBank; + RoFSlot.Slot = temp_slot / EQEmu::invbag::SLOT_COUNT; + RoFSlot.SubIndex = temp_slot - (RoFSlot.Slot * EQEmu::invbag::SLOT_COUNT); } - else if (serverSlot <= EQEmu::invslot::TRADE_END && serverSlot >= EQEmu::invslot::TRADE_BEGIN) { + else if (server_slot <= EQEmu::invslot::TRADE_END && server_slot >= EQEmu::invslot::TRADE_BEGIN) { RoFSlot.Type = invtype::typeTrade; - RoFSlot.Slot = serverSlot - EQEmu::invslot::TRADE_BEGIN; + RoFSlot.Slot = server_slot - EQEmu::invslot::TRADE_BEGIN; } - else if (serverSlot <= EQEmu::invbag::TRADE_BAGS_END && serverSlot >= EQEmu::invbag::TRADE_BAGS_BEGIN) { - TempSlot = serverSlot - EQEmu::invbag::TRADE_BAGS_BEGIN; + else if (server_slot <= EQEmu::invbag::TRADE_BAGS_END && server_slot >= EQEmu::invbag::TRADE_BAGS_BEGIN) { + temp_slot = server_slot - EQEmu::invbag::TRADE_BAGS_BEGIN; - RoFSlot.Type = invtype::typeTrade; - RoFSlot.Slot = TempSlot / EQEmu::invbag::SLOT_COUNT; - RoFSlot.SubIndex = TempSlot - (RoFSlot.Slot * EQEmu::invbag::SLOT_COUNT); + RoFSlot.Type = invtype::typeTrade; + RoFSlot.Slot = temp_slot / EQEmu::invbag::SLOT_COUNT; + RoFSlot.SubIndex = temp_slot - (RoFSlot.Slot * EQEmu::invbag::SLOT_COUNT); } - else if (serverSlot <= EQEmu::invslot::WORLD_END && serverSlot >= EQEmu::invslot::WORLD_BEGIN) { + else if (server_slot <= EQEmu::invslot::WORLD_END && server_slot >= EQEmu::invslot::WORLD_BEGIN) { RoFSlot.Type = invtype::typeWorld; - RoFSlot.Slot = serverSlot - EQEmu::invslot::WORLD_BEGIN; + RoFSlot.Slot = server_slot - EQEmu::invslot::WORLD_BEGIN; } - Log(Logs::Detail, Logs::Netcode, "Convert Server Slot %i to RoF Slot [%i, %i, %i, %i] (unk2: %i, unk1: %i)", - serverSlot, RoFSlot.Type, RoFSlot.Slot, RoFSlot.SubIndex, RoFSlot.AugIndex, RoFSlot.Unknown02, RoFSlot.Unknown01); + Log(Logs::Detail, + Logs::Netcode, + "Convert Server Slot %i to RoF Slot [%i, %i, %i, %i] (unk2: %i, unk1: %i)", + server_slot, + RoFSlot.Type, + RoFSlot.Slot, + RoFSlot.SubIndex, + RoFSlot.AugIndex, + RoFSlot.Unknown02, + RoFSlot.Unknown01); return RoFSlot; } - static inline structs::InventorySlot_Struct ServerToRoFCorpseSlot(uint32 serverCorpseSlot) + static inline structs::InventorySlot_Struct ServerToRoFCorpseSlot(uint32 server_corpse_slot) { - structs::InventorySlot_Struct RoFSlot; - RoFSlot.Type = invtype::TYPE_INVALID; + structs::InventorySlot_Struct RoFSlot{}; + + RoFSlot.Type = invtype::TYPE_INVALID; RoFSlot.Unknown02 = INULL; - RoFSlot.Slot = ServerToRoFCorpseMainSlot(serverCorpseSlot); - RoFSlot.SubIndex = invbag::SLOT_INVALID; - RoFSlot.AugIndex = invaug::SOCKET_INVALID; + RoFSlot.Slot = static_cast(ServerToRoFCorpseMainSlot(server_corpse_slot)); + RoFSlot.SubIndex = invbag::SLOT_INVALID; + RoFSlot.AugIndex = invaug::SOCKET_INVALID; RoFSlot.Unknown01 = INULL; if (RoFSlot.Slot != invslot::SLOT_INVALID) RoFSlot.Type = invtype::typeCorpse; - Log(Logs::Detail, Logs::Netcode, "Convert Server Corpse Slot %i to RoF Corpse Slot [%i, %i, %i, %i] (unk2: %i, unk1: %i)", - serverCorpseSlot, RoFSlot.Type, RoFSlot.Slot, RoFSlot.SubIndex, RoFSlot.AugIndex, RoFSlot.Unknown02, RoFSlot.Unknown01); + Log(Logs::Detail, + Logs::Netcode, + "Convert Server Corpse Slot %i to RoF Corpse Slot [%i, %i, %i, %i] (unk2: %i, unk1: %i)", + server_corpse_slot, + RoFSlot.Type, + RoFSlot.Slot, + RoFSlot.SubIndex, + RoFSlot.AugIndex, + RoFSlot.Unknown02, + RoFSlot.Unknown01); return RoFSlot; } - static inline uint32 ServerToRoFCorpseMainSlot(uint32 serverCorpseSlot) + static inline uint32 ServerToRoFCorpseMainSlot(uint32 server_corpse_slot) { uint32 RoFSlot = invslot::SLOT_INVALID; - if (serverCorpseSlot <= EQEmu::invslot::CORPSE_END && serverCorpseSlot >= EQEmu::invslot::CORPSE_BEGIN) { - RoFSlot = serverCorpseSlot; + if (server_corpse_slot <= EQEmu::invslot::CORPSE_END && server_corpse_slot >= EQEmu::invslot::CORPSE_BEGIN) { + RoFSlot = server_corpse_slot; } - Log(Logs::Detail, Logs::Netcode, "Convert Server Corpse Slot %i to RoF Corpse Main Slot %i", serverCorpseSlot, RoFSlot); + Log(Logs::Detail, Logs::Netcode, "Convert Server Corpse Slot %i to RoF Corpse Main Slot %i", server_corpse_slot, RoFSlot); return RoFSlot; } - static inline structs::TypelessInventorySlot_Struct ServerToRoFTypelessSlot(uint32 serverSlot, int16 serverType) + static inline structs::TypelessInventorySlot_Struct ServerToRoFTypelessSlot(uint32 server_slot, int16 server_type) { structs::TypelessInventorySlot_Struct RoFSlot; RoFSlot.Slot = invslot::SLOT_INVALID; @@ -5672,13 +5690,13 @@ namespace RoF uint32 TempSlot = EQEmu::invslot::SLOT_INVALID; - if (serverType == EQEmu::invtype::typePossessions) { - if (serverSlot < EQEmu::invtype::POSSESSIONS_SIZE) { - RoFSlot.Slot = serverSlot; + if (server_type == EQEmu::invtype::typePossessions) { + if (server_slot < EQEmu::invtype::POSSESSIONS_SIZE) { + RoFSlot.Slot = server_slot; } - else if (serverSlot <= EQEmu::invbag::CURSOR_BAG_END && serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { - TempSlot = serverSlot - EQEmu::invbag::GENERAL_BAGS_BEGIN; + else if (server_slot <= EQEmu::invbag::CURSOR_BAG_END && server_slot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { + TempSlot = server_slot - EQEmu::invbag::GENERAL_BAGS_BEGIN; RoFSlot.Slot = invslot::GENERAL_BEGIN + (TempSlot / EQEmu::invbag::SLOT_COUNT); RoFSlot.SubIndex = TempSlot - ((RoFSlot.Slot - invslot::GENERAL_BEGIN) * EQEmu::invbag::SLOT_COUNT); @@ -5686,278 +5704,302 @@ namespace RoF } Log(Logs::Detail, Logs::Netcode, "Convert Server Slot %i to RoF Typeless Slot [%i, %i, %i] (implied type: %i, unk1: %i)", - serverSlot, RoFSlot.Slot, RoFSlot.SubIndex, RoFSlot.AugIndex, serverType, RoFSlot.Unknown01); + server_slot, RoFSlot.Slot, RoFSlot.SubIndex, RoFSlot.AugIndex, server_type, RoFSlot.Unknown01); return RoFSlot; } - static inline uint32 RoFToServerSlot(structs::InventorySlot_Struct rofSlot) - { - if (rofSlot.AugIndex < invaug::SOCKET_INVALID || rofSlot.AugIndex >= invaug::SOCKET_COUNT) { - Log(Logs::Detail, Logs::Netcode, "Convert RoF Slot [%i, %i, %i, %i] (unk2: %i, unk1: %i) to Server Slot %i", - rofSlot.Type, rofSlot.Slot, rofSlot.SubIndex, rofSlot.AugIndex, rofSlot.Unknown02, rofSlot.Unknown01, EQEmu::invslot::SLOT_INVALID); + static inline uint32 RoFToServerSlot(structs::InventorySlot_Struct rof_slot) { + if (rof_slot.AugIndex < invaug::SOCKET_INVALID || rof_slot.AugIndex >= invaug::SOCKET_COUNT) { + Log(Logs::Detail, + Logs::Netcode, + "Convert RoF Slot [%i, %i, %i, %i] (unk2: %i, unk1: %i) to Server Slot %i", + rof_slot.Type, + rof_slot.Slot, + rof_slot.SubIndex, + rof_slot.AugIndex, + rof_slot.Unknown02, + rof_slot.Unknown01, + EQEmu::invslot::SLOT_INVALID); return EQEmu::invslot::SLOT_INVALID; } - uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; - uint32 TempSlot = invslot::SLOT_INVALID; + uint32 server_slot = EQEmu::invslot::SLOT_INVALID; + uint32 temp_slot = invslot::SLOT_INVALID; - switch (rofSlot.Type) { - case invtype::typePossessions: { - if (rofSlot.Slot >= invslot::POSSESSIONS_BEGIN && rofSlot.Slot <= invslot::POSSESSIONS_END) { - if (rofSlot.SubIndex == invbag::SLOT_INVALID) { - ServerSlot = rofSlot.Slot; + switch (rof_slot.Type) { + case invtype::typePossessions: { + if (rof_slot.Slot >= invslot::POSSESSIONS_BEGIN && rof_slot.Slot <= invslot::POSSESSIONS_END) { + if (rof_slot.SubIndex == invbag::SLOT_INVALID) { + server_slot = rof_slot.Slot; + } else if (rof_slot.SubIndex >= invbag::SLOT_BEGIN && rof_slot.SubIndex <= invbag::SLOT_END) { + if (rof_slot.Slot < invslot::GENERAL_BEGIN) + return EQEmu::invslot::SLOT_INVALID; + + temp_slot = (rof_slot.Slot - invslot::GENERAL_BEGIN) * invbag::SLOT_COUNT; + server_slot = EQEmu::invbag::GENERAL_BAGS_BEGIN + temp_slot + rof_slot.SubIndex; + } } - else if (rofSlot.SubIndex >= invbag::SLOT_BEGIN && rofSlot.SubIndex <= invbag::SLOT_END) { - if (rofSlot.Slot < invslot::GENERAL_BEGIN) - return EQEmu::invslot::SLOT_INVALID; - - TempSlot = (rofSlot.Slot - invslot::GENERAL_BEGIN) * invbag::SLOT_COUNT; - ServerSlot = EQEmu::invbag::GENERAL_BAGS_BEGIN + TempSlot + rofSlot.SubIndex; - } + break; } - - break; - } - case invtype::typeBank: { - if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::BANK_SIZE) { - if (rofSlot.SubIndex == invbag::SLOT_INVALID) { - ServerSlot = EQEmu::invslot::BANK_BEGIN + rofSlot.Slot; + case invtype::typeBank: { + if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::BANK_SIZE) { + if (rof_slot.SubIndex == invbag::SLOT_INVALID) { + server_slot = EQEmu::invslot::BANK_BEGIN + rof_slot.Slot; + } else if (rof_slot.SubIndex >= invbag::SLOT_BEGIN && rof_slot.SubIndex <= invbag::SLOT_END) { + temp_slot = rof_slot.Slot * invbag::SLOT_COUNT; + server_slot = EQEmu::invbag::BANK_BAGS_BEGIN + temp_slot + rof_slot.SubIndex; + } } - else if (rofSlot.SubIndex >= invbag::SLOT_BEGIN && rofSlot.SubIndex <= invbag::SLOT_END) { - TempSlot = rofSlot.Slot * invbag::SLOT_COUNT; - ServerSlot = EQEmu::invbag::BANK_BAGS_BEGIN + TempSlot + rofSlot.SubIndex; - } + break; } - - break; - } - case invtype::typeSharedBank: { - if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::SHARED_BANK_SIZE) { - if (rofSlot.SubIndex == invbag::SLOT_INVALID) { - ServerSlot = EQEmu::invslot::SHARED_BANK_BEGIN + rofSlot.Slot; + case invtype::typeSharedBank: { + if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::SHARED_BANK_SIZE) { + if (rof_slot.SubIndex == invbag::SLOT_INVALID) { + server_slot = EQEmu::invslot::SHARED_BANK_BEGIN + rof_slot.Slot; + } else if (rof_slot.SubIndex >= invbag::SLOT_BEGIN && rof_slot.SubIndex <= invbag::SLOT_END) { + temp_slot = rof_slot.Slot * invbag::SLOT_COUNT; + server_slot = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + temp_slot + rof_slot.SubIndex; + } } - else if (rofSlot.SubIndex >= invbag::SLOT_BEGIN && rofSlot.SubIndex <= invbag::SLOT_END) { - TempSlot = rofSlot.Slot * invbag::SLOT_COUNT; - ServerSlot = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + TempSlot + rofSlot.SubIndex; - } + break; } - - break; - } - case invtype::typeTrade: { - if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::TRADE_SIZE) { - if (rofSlot.SubIndex == invbag::SLOT_INVALID) { - ServerSlot = EQEmu::invslot::TRADE_BEGIN + rofSlot.Slot; + case invtype::typeTrade: { + if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::TRADE_SIZE) { + if (rof_slot.SubIndex == invbag::SLOT_INVALID) { + server_slot = EQEmu::invslot::TRADE_BEGIN + rof_slot.Slot; + } else if (rof_slot.SubIndex >= invbag::SLOT_BEGIN && rof_slot.SubIndex <= invbag::SLOT_END) { + temp_slot = rof_slot.Slot * invbag::SLOT_COUNT; + server_slot = EQEmu::invbag::TRADE_BAGS_BEGIN + temp_slot + rof_slot.SubIndex; + } } - else if (rofSlot.SubIndex >= invbag::SLOT_BEGIN && rofSlot.SubIndex <= invbag::SLOT_END) { - TempSlot = rofSlot.Slot * invbag::SLOT_COUNT; - ServerSlot = EQEmu::invbag::TRADE_BAGS_BEGIN + TempSlot + rofSlot.SubIndex; + break; + } + case invtype::typeWorld: { + if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::WORLD_SIZE) { + server_slot = EQEmu::invslot::SHARED_BANK_BEGIN + rof_slot.Slot; } + + break; } + case invtype::typeLimbo: { + if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::LIMBO_SIZE) { + server_slot = EQEmu::invslot::slotCursor; + } - break; - } - case invtype::typeWorld: { - if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::WORLD_SIZE) { - ServerSlot = EQEmu::invslot::SHARED_BANK_BEGIN + rofSlot.Slot; + break; } + case invtype::typeTribute: { + if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::TRIBUTE_SIZE) { + server_slot = EQEmu::invslot::TRIBUTE_BEGIN + rof_slot.Slot; + } - break; - } - case invtype::typeLimbo: { - if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::LIMBO_SIZE) { - ServerSlot = EQEmu::invslot::slotCursor; + break; } + case invtype::typeGuildTribute: { + if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::GUILD_TRIBUTE_SIZE) { + server_slot = EQEmu::invslot::GUILD_TRIBUTE_BEGIN + rof_slot.Slot; + } - break; - } - case invtype::typeTribute: { - if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::TRIBUTE_SIZE) { - ServerSlot = EQEmu::invslot::TRIBUTE_BEGIN + rofSlot.Slot; + break; } + case invtype::typeCorpse: { + if (rof_slot.Slot >= invslot::CORPSE_BEGIN && rof_slot.Slot <= invslot::CORPSE_END) { + server_slot = rof_slot.Slot; + } - break; - } - case invtype::typeGuildTribute: { - if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::GUILD_TRIBUTE_SIZE) { - ServerSlot = EQEmu::invslot::GUILD_TRIBUTE_BEGIN + rofSlot.Slot; + break; } + default: { - break; - } - case invtype::typeCorpse: { - if (rofSlot.Slot >= invslot::CORPSE_BEGIN && rofSlot.Slot <= invslot::CORPSE_END) { - ServerSlot = rofSlot.Slot; + break; } - - break; - } - default: { - - break; - } } - Log(Logs::Detail, Logs::Netcode, "Convert RoF Slot [%i, %i, %i, %i] (unk2: %i, unk1: %i) to Server Slot %i", - rofSlot.Type, rofSlot.Slot, rofSlot.SubIndex, rofSlot.AugIndex, rofSlot.Unknown02, rofSlot.Unknown01, ServerSlot); + Log(Logs::Detail, + Logs::Netcode, + "Convert RoF Slot [%i, %i, %i, %i] (unk2: %i, unk1: %i) to Server Slot %i", + rof_slot.Type, + rof_slot.Slot, + rof_slot.SubIndex, + rof_slot.AugIndex, + rof_slot.Unknown02, + rof_slot.Unknown01, + server_slot); - return ServerSlot; + return server_slot; } - static inline uint32 RoFToServerCorpseSlot(structs::InventorySlot_Struct rofCorpseSlot) + static inline uint32 RoFToServerCorpseSlot(structs::InventorySlot_Struct rof_corpse_slot) { - uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; + uint32 server_slot = EQEmu::invslot::SLOT_INVALID; - if (rofCorpseSlot.Type != invtype::typeCorpse || rofCorpseSlot.SubIndex != invbag::SLOT_INVALID || rofCorpseSlot.AugIndex != invaug::SOCKET_INVALID) { - ServerSlot = EQEmu::invslot::SLOT_INVALID; + if (rof_corpse_slot.Type != invtype::typeCorpse || rof_corpse_slot.SubIndex != invbag::SLOT_INVALID || rof_corpse_slot.AugIndex != invaug::SOCKET_INVALID) { + server_slot = EQEmu::invslot::SLOT_INVALID; } else { - ServerSlot = RoFToServerCorpseMainSlot(rofCorpseSlot.Slot); + server_slot = RoFToServerCorpseMainSlot(rof_corpse_slot.Slot); } - Log(Logs::Detail, Logs::Netcode, "Convert RoF Slot [%i, %i, %i, %i] (unk2: %i, unk1: %i) to Server Slot %i", - rofCorpseSlot.Type, rofCorpseSlot.Slot, rofCorpseSlot.SubIndex, rofCorpseSlot.AugIndex, rofCorpseSlot.Unknown02, rofCorpseSlot.Unknown01, ServerSlot); + Log(Logs::Detail, + Logs::Netcode, + "Convert RoF Slot [%i, %i, %i, %i] (unk2: %i, unk1: %i) to Server Slot %i", + rof_corpse_slot.Type, + rof_corpse_slot.Slot, + rof_corpse_slot.SubIndex, + rof_corpse_slot.AugIndex, + rof_corpse_slot.Unknown02, + rof_corpse_slot.Unknown01, + server_slot); - return ServerSlot; + return server_slot; } - static inline uint32 RoFToServerCorpseMainSlot(uint32 rofCorpseSlot) - { - uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; + static inline uint32 RoFToServerCorpseMainSlot(uint32 rof_corpse_slot) { + uint32 server_slot = EQEmu::invslot::SLOT_INVALID; - if (rofCorpseSlot <= invslot::CORPSE_END && rofCorpseSlot >= invslot::CORPSE_BEGIN) { - ServerSlot = rofCorpseSlot; + if (rof_corpse_slot <= invslot::CORPSE_END && rof_corpse_slot >= invslot::CORPSE_BEGIN) { + server_slot = rof_corpse_slot; } - Log(Logs::Detail, Logs::Netcode, "Convert RoF Corpse Main Slot %i to Server Corpse Slot %i", rofCorpseSlot, ServerSlot); + Log(Logs::Detail, + Logs::Netcode, + "Convert RoF Corpse Main Slot %i to Server Corpse Slot %i", + rof_corpse_slot, + server_slot); - return ServerSlot; + return server_slot; } - static inline uint32 RoFToServerTypelessSlot(structs::TypelessInventorySlot_Struct rofSlot, int16 rofType) - { - if (rofSlot.AugIndex < invaug::SOCKET_INVALID || rofSlot.AugIndex >= invaug::SOCKET_COUNT) { - Log(Logs::Detail, Logs::Netcode, "Convert RoF Typeless Slot [%i, %i, %i] (implied type: %i, unk1: %i) to Server Slot %i", - rofSlot.Slot, rofSlot.SubIndex, rofSlot.AugIndex, rofType, rofSlot.Unknown01, EQEmu::invslot::SLOT_INVALID); + static inline uint32 RoFToServerTypelessSlot(structs::TypelessInventorySlot_Struct rof_slot, int16 rof_type) { - return EQEmu::invslot::SLOT_INVALID; + if (rof_slot.AugIndex < invaug::SOCKET_INVALID || rof_slot.AugIndex >= invaug::SOCKET_COUNT) { + Log(Logs::Detail, + Logs::Netcode, + "Convert RoF Typeless Slot [%i, %i, %i] (implied type: %i, unk1: %i) to Server Slot %i", + rof_slot.Slot, + rof_slot.SubIndex, + rof_slot.AugIndex, + rof_type, + rof_slot.Unknown01, + EQEmu::invslot::SLOT_INVALID); + + return (uint32) EQEmu::invslot::SLOT_INVALID; } - uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; - uint32 TempSlot = invslot::SLOT_INVALID; + uint32 server_slot = EQEmu::invslot::SLOT_INVALID; + uint32 temp_slot = invslot::SLOT_INVALID; - switch (rofType) { - case invtype::typePossessions: { - if (rofSlot.Slot >= invslot::POSSESSIONS_BEGIN && rofSlot.Slot <= invslot::POSSESSIONS_END) { - if (rofSlot.SubIndex == invbag::SLOT_INVALID) { - ServerSlot = rofSlot.Slot; + switch (rof_type) { + case invtype::typePossessions: { + if (rof_slot.Slot >= invslot::POSSESSIONS_BEGIN && rof_slot.Slot <= invslot::POSSESSIONS_END) { + if (rof_slot.SubIndex == invbag::SLOT_INVALID) { + server_slot = rof_slot.Slot; + } else if (rof_slot.SubIndex >= invbag::SLOT_BEGIN && rof_slot.SubIndex <= invbag::SLOT_END) { + if (rof_slot.Slot < invslot::GENERAL_BEGIN) + return EQEmu::invslot::SLOT_INVALID; + + temp_slot = (rof_slot.Slot - invslot::GENERAL_BEGIN) * invbag::SLOT_COUNT; + server_slot = EQEmu::invbag::GENERAL_BAGS_BEGIN + temp_slot + rof_slot.SubIndex; + } } - else if (rofSlot.SubIndex >= invbag::SLOT_BEGIN && rofSlot.SubIndex <= invbag::SLOT_END) { - if (rofSlot.Slot < invslot::GENERAL_BEGIN) - return EQEmu::invslot::SLOT_INVALID; - - TempSlot = (rofSlot.Slot - invslot::GENERAL_BEGIN) * invbag::SLOT_COUNT; - ServerSlot = EQEmu::invbag::GENERAL_BAGS_BEGIN + TempSlot + rofSlot.SubIndex; - } + break; } - - break; - } - case invtype::typeBank: { - if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::BANK_SIZE) { - if (rofSlot.SubIndex == invbag::SLOT_INVALID) { - ServerSlot = EQEmu::invslot::BANK_BEGIN + rofSlot.Slot; + case invtype::typeBank: { + if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::BANK_SIZE) { + if (rof_slot.SubIndex == invbag::SLOT_INVALID) { + server_slot = EQEmu::invslot::BANK_BEGIN + rof_slot.Slot; + } else if (rof_slot.SubIndex >= invbag::SLOT_BEGIN && rof_slot.SubIndex <= invbag::SLOT_END) { + temp_slot = rof_slot.Slot * invbag::SLOT_COUNT; + server_slot = EQEmu::invbag::BANK_BAGS_BEGIN + temp_slot + rof_slot.SubIndex; + } } - else if (rofSlot.SubIndex >= invbag::SLOT_BEGIN && rofSlot.SubIndex <= invbag::SLOT_END) { - TempSlot = rofSlot.Slot * invbag::SLOT_COUNT; - ServerSlot = EQEmu::invbag::BANK_BAGS_BEGIN + TempSlot + rofSlot.SubIndex; - } + break; } - - break; - } - case invtype::typeSharedBank: { - if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::SHARED_BANK_SIZE) { - if (rofSlot.SubIndex == invbag::SLOT_INVALID) { - ServerSlot = EQEmu::invslot::SHARED_BANK_BEGIN + rofSlot.Slot; + case invtype::typeSharedBank: { + if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::SHARED_BANK_SIZE) { + if (rof_slot.SubIndex == invbag::SLOT_INVALID) { + server_slot = EQEmu::invslot::SHARED_BANK_BEGIN + rof_slot.Slot; + } else if (rof_slot.SubIndex >= invbag::SLOT_BEGIN && rof_slot.SubIndex <= invbag::SLOT_END) { + temp_slot = rof_slot.Slot * invbag::SLOT_COUNT; + server_slot = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + temp_slot + rof_slot.SubIndex; + } } - else if (rofSlot.SubIndex >= invbag::SLOT_BEGIN && rofSlot.SubIndex <= invbag::SLOT_END) { - TempSlot = rofSlot.Slot * invbag::SLOT_COUNT; - ServerSlot = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + TempSlot + rofSlot.SubIndex; - } + break; } - - break; - } - case invtype::typeTrade: { - if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::TRADE_SIZE) { - if (rofSlot.SubIndex == invbag::SLOT_INVALID) { - ServerSlot = EQEmu::invslot::TRADE_BEGIN + rofSlot.Slot; + case invtype::typeTrade: { + if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::TRADE_SIZE) { + if (rof_slot.SubIndex == invbag::SLOT_INVALID) { + server_slot = EQEmu::invslot::TRADE_BEGIN + rof_slot.Slot; + } else if (rof_slot.SubIndex >= invbag::SLOT_BEGIN && rof_slot.SubIndex <= invbag::SLOT_END) { + temp_slot = rof_slot.Slot * invbag::SLOT_COUNT; + server_slot = EQEmu::invbag::TRADE_BAGS_BEGIN + temp_slot + rof_slot.SubIndex; + } } - else if (rofSlot.SubIndex >= invbag::SLOT_BEGIN && rofSlot.SubIndex <= invbag::SLOT_END) { - TempSlot = rofSlot.Slot * invbag::SLOT_COUNT; - ServerSlot = EQEmu::invbag::TRADE_BAGS_BEGIN + TempSlot + rofSlot.SubIndex; + break; + } + case invtype::typeWorld: { + if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::WORLD_SIZE) { + server_slot = EQEmu::invslot::SHARED_BANK_BEGIN + rof_slot.Slot; } + + break; } + case invtype::typeLimbo: { + if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::LIMBO_SIZE) { + server_slot = EQEmu::invslot::slotCursor; + } - break; - } - case invtype::typeWorld: { - if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::WORLD_SIZE) { - ServerSlot = EQEmu::invslot::SHARED_BANK_BEGIN + rofSlot.Slot; + break; } + case invtype::typeTribute: { + if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::TRIBUTE_SIZE) { + server_slot = EQEmu::invslot::TRIBUTE_BEGIN + rof_slot.Slot; + } - break; - } - case invtype::typeLimbo: { - if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::LIMBO_SIZE) { - ServerSlot = EQEmu::invslot::slotCursor; + break; } + case invtype::typeGuildTribute: { + if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::GUILD_TRIBUTE_SIZE) { + server_slot = EQEmu::invslot::GUILD_TRIBUTE_BEGIN + rof_slot.Slot; + } - break; - } - case invtype::typeTribute: { - if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::TRIBUTE_SIZE) { - ServerSlot = EQEmu::invslot::TRIBUTE_BEGIN + rofSlot.Slot; + break; } + case invtype::typeCorpse: { + if (rof_slot.Slot >= invslot::CORPSE_BEGIN && rof_slot.Slot <= invslot::CORPSE_END) { + server_slot = rof_slot.Slot; + } - break; - } - case invtype::typeGuildTribute: { - if (rofSlot.Slot >= invslot::SLOT_BEGIN && rofSlot.Slot < invtype::GUILD_TRIBUTE_SIZE) { - ServerSlot = EQEmu::invslot::GUILD_TRIBUTE_BEGIN + rofSlot.Slot; + break; } + default: { - break; - } - case invtype::typeCorpse: { - if (rofSlot.Slot >= invslot::CORPSE_BEGIN && rofSlot.Slot <= invslot::CORPSE_END) { - ServerSlot = rofSlot.Slot; + break; } - - break; - } - default: { - - break; - } } - Log(Logs::Detail, Logs::Netcode, "Convert RoF Typeless Slot [%i, %i, %i] (implied type: %i, unk1: %i) to Server Slot %i", - rofSlot.Slot, rofSlot.SubIndex, rofSlot.AugIndex, rofType, rofSlot.Unknown01, ServerSlot); + Log(Logs::Detail, + Logs::Netcode, + "Convert RoF Typeless Slot [%i, %i, %i] (implied type: %i, unk1: %i) to Server Slot %i", + rof_slot.Slot, + rof_slot.SubIndex, + rof_slot.AugIndex, + rof_type, + rof_slot.Unknown01, + server_slot); - return ServerSlot; + return server_slot; } static inline void ServerToRoFSayLink(std::string& rofSayLink, const std::string& serverSayLink) diff --git a/common/patches/rof2.cpp b/common/patches/rof2.cpp index 6dad7383a..aa942f98c 100644 --- a/common/patches/rof2.cpp +++ b/common/patches/rof2.cpp @@ -48,22 +48,22 @@ namespace RoF2 void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id, uint8 depth, ItemPacketType packet_type); // server to client inventory location converters - static inline structs::InventorySlot_Struct ServerToRoF2Slot(uint32 serverSlot); - static inline structs::InventorySlot_Struct ServerToRoF2CorpseSlot(uint32 serverCorpseSlot); - static inline uint32 ServerToRoF2CorpseMainSlot(uint32 serverCorpseSlot); - static inline structs::TypelessInventorySlot_Struct ServerToRoF2TypelessSlot(uint32 serverSlot, int16 serverType); + static inline structs::InventorySlot_Struct ServerToRoF2Slot(uint32 server_slot); + static inline structs::InventorySlot_Struct ServerToRoF2CorpseSlot(uint32 server_corpse_slot); + static inline uint32 ServerToRoF2CorpseMainSlot(uint32 server_corpse_slot); + static inline structs::TypelessInventorySlot_Struct ServerToRoF2TypelessSlot(uint32 server_slot, int16 server_type); // client to server inventory location converters - static inline uint32 RoF2ToServerSlot(structs::InventorySlot_Struct rof2Slot); - static inline uint32 RoF2ToServerCorpseSlot(structs::InventorySlot_Struct rof2CorpseSlot); - static inline uint32 RoF2ToServerCorpseMainSlot(uint32 rof2CorpseSlot); - static inline uint32 RoF2ToServerTypelessSlot(structs::TypelessInventorySlot_Struct rof2Slot, int16 rof2Type); + static inline uint32 RoF2ToServerSlot(structs::InventorySlot_Struct rof2_slot); + static inline uint32 RoF2ToServerCorpseSlot(structs::InventorySlot_Struct rof2_corpse_slot); + static inline uint32 RoF2ToServerCorpseMainSlot(uint32 rof2_corpse_slot); + static inline uint32 RoF2ToServerTypelessSlot(structs::TypelessInventorySlot_Struct rof2_slot, int16 rof2_type); // server to client say link converter - static inline void ServerToRoF2SayLink(std::string& rof2SayLink, const std::string& serverSayLink); + static inline void ServerToRoF2SayLink(std::string &rof2_saylink, const std::string &server_saylink); // client to server say link converter - static inline void RoF2ToServerSayLink(std::string& serverSayLink, const std::string& rof2SayLink); + static inline void RoF2ToServerSayLink(std::string &server_saylink, const std::string &rof2_saylink); static inline CastingSlot ServerToRoF2CastingSlot(EQEmu::CastingSlot slot); static inline EQEmu::CastingSlot RoF2ToServerCastingSlot(CastingSlot slot); @@ -5852,7 +5852,7 @@ namespace RoF2 } } - static inline structs::InventorySlot_Struct ServerToRoF2Slot(uint32 serverSlot) + static inline structs::InventorySlot_Struct ServerToRoF2Slot(uint32 server_slot) { structs::InventorySlot_Struct RoF2Slot; RoF2Slot.Type = invtype::TYPE_INVALID; @@ -5864,85 +5864,85 @@ namespace RoF2 uint32 TempSlot = EQEmu::invslot::SLOT_INVALID; - if (serverSlot < EQEmu::invtype::POSSESSIONS_SIZE) { + if (server_slot < EQEmu::invtype::POSSESSIONS_SIZE) { RoF2Slot.Type = invtype::typePossessions; - RoF2Slot.Slot = serverSlot; + RoF2Slot.Slot = server_slot; } - else if (serverSlot <= EQEmu::invbag::CURSOR_BAG_END && serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { - TempSlot = serverSlot - EQEmu::invbag::GENERAL_BAGS_BEGIN; + else if (server_slot <= EQEmu::invbag::CURSOR_BAG_END && server_slot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { + TempSlot = server_slot - EQEmu::invbag::GENERAL_BAGS_BEGIN; RoF2Slot.Type = invtype::typePossessions; RoF2Slot.Slot = invslot::GENERAL_BEGIN + (TempSlot / EQEmu::invbag::SLOT_COUNT); RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot - invslot::GENERAL_BEGIN) * EQEmu::invbag::SLOT_COUNT); } - else if (serverSlot <= EQEmu::invslot::TRIBUTE_END && serverSlot >= EQEmu::invslot::TRIBUTE_BEGIN) { + else if (server_slot <= EQEmu::invslot::TRIBUTE_END && server_slot >= EQEmu::invslot::TRIBUTE_BEGIN) { RoF2Slot.Type = invtype::typeTribute; - RoF2Slot.Slot = serverSlot - EQEmu::invslot::TRIBUTE_BEGIN; + RoF2Slot.Slot = server_slot - EQEmu::invslot::TRIBUTE_BEGIN; } - else if (serverSlot <= EQEmu::invslot::GUILD_TRIBUTE_END && serverSlot >= EQEmu::invslot::GUILD_TRIBUTE_BEGIN) { + else if (server_slot <= EQEmu::invslot::GUILD_TRIBUTE_END && server_slot >= EQEmu::invslot::GUILD_TRIBUTE_BEGIN) { RoF2Slot.Type = invtype::typeGuildTribute; - RoF2Slot.Slot = serverSlot - EQEmu::invslot::GUILD_TRIBUTE_BEGIN; + RoF2Slot.Slot = server_slot - EQEmu::invslot::GUILD_TRIBUTE_BEGIN; } - else if (serverSlot <= EQEmu::invslot::BANK_END && serverSlot >= EQEmu::invslot::BANK_BEGIN) { + else if (server_slot <= EQEmu::invslot::BANK_END && server_slot >= EQEmu::invslot::BANK_BEGIN) { RoF2Slot.Type = invtype::typeBank; - RoF2Slot.Slot = serverSlot - EQEmu::invslot::BANK_BEGIN; + RoF2Slot.Slot = server_slot - EQEmu::invslot::BANK_BEGIN; } - else if (serverSlot <= EQEmu::invbag::BANK_BAGS_END && serverSlot >= EQEmu::invbag::BANK_BAGS_BEGIN) { - TempSlot = serverSlot - EQEmu::invbag::BANK_BAGS_BEGIN; + else if (server_slot <= EQEmu::invbag::BANK_BAGS_END && server_slot >= EQEmu::invbag::BANK_BAGS_BEGIN) { + TempSlot = server_slot - EQEmu::invbag::BANK_BAGS_BEGIN; RoF2Slot.Type = invtype::typeBank; RoF2Slot.Slot = TempSlot / EQEmu::invbag::SLOT_COUNT; RoF2Slot.SubIndex = TempSlot - (RoF2Slot.Slot * EQEmu::invbag::SLOT_COUNT); } - else if (serverSlot <= EQEmu::invslot::SHARED_BANK_END && serverSlot >= EQEmu::invslot::SHARED_BANK_BEGIN) { + else if (server_slot <= EQEmu::invslot::SHARED_BANK_END && server_slot >= EQEmu::invslot::SHARED_BANK_BEGIN) { RoF2Slot.Type = invtype::typeSharedBank; - RoF2Slot.Slot = serverSlot - EQEmu::invslot::SHARED_BANK_BEGIN; + RoF2Slot.Slot = server_slot - EQEmu::invslot::SHARED_BANK_BEGIN; } - else if (serverSlot <= EQEmu::invbag::SHARED_BANK_BAGS_END && serverSlot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN) { - TempSlot = serverSlot - EQEmu::invbag::SHARED_BANK_BAGS_BEGIN; + else if (server_slot <= EQEmu::invbag::SHARED_BANK_BAGS_END && server_slot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN) { + TempSlot = server_slot - EQEmu::invbag::SHARED_BANK_BAGS_BEGIN; RoF2Slot.Type = invtype::typeSharedBank; RoF2Slot.Slot = TempSlot / EQEmu::invbag::SLOT_COUNT; RoF2Slot.SubIndex = TempSlot - (RoF2Slot.Slot * EQEmu::invbag::SLOT_COUNT); } - else if (serverSlot <= EQEmu::invslot::TRADE_END && serverSlot >= EQEmu::invslot::TRADE_BEGIN) { + else if (server_slot <= EQEmu::invslot::TRADE_END && server_slot >= EQEmu::invslot::TRADE_BEGIN) { RoF2Slot.Type = invtype::typeTrade; - RoF2Slot.Slot = serverSlot - EQEmu::invslot::TRADE_BEGIN; + RoF2Slot.Slot = server_slot - EQEmu::invslot::TRADE_BEGIN; } - else if (serverSlot <= EQEmu::invbag::TRADE_BAGS_END && serverSlot >= EQEmu::invbag::TRADE_BAGS_BEGIN) { - TempSlot = serverSlot - EQEmu::invbag::TRADE_BAGS_BEGIN; + else if (server_slot <= EQEmu::invbag::TRADE_BAGS_END && server_slot >= EQEmu::invbag::TRADE_BAGS_BEGIN) { + TempSlot = server_slot - EQEmu::invbag::TRADE_BAGS_BEGIN; RoF2Slot.Type = invtype::typeTrade; RoF2Slot.Slot = TempSlot / EQEmu::invbag::SLOT_COUNT; RoF2Slot.SubIndex = TempSlot - (RoF2Slot.Slot * EQEmu::invbag::SLOT_COUNT); } - else if (serverSlot <= EQEmu::invslot::WORLD_END && serverSlot >= EQEmu::invslot::WORLD_BEGIN) { + else if (server_slot <= EQEmu::invslot::WORLD_END && server_slot >= EQEmu::invslot::WORLD_BEGIN) { RoF2Slot.Type = invtype::typeWorld; - RoF2Slot.Slot = serverSlot - EQEmu::invslot::WORLD_BEGIN; + RoF2Slot.Slot = server_slot - EQEmu::invslot::WORLD_BEGIN; } Log(Logs::Detail, Logs::Netcode, "Convert Server Slot %i to RoF2 Slot [%i, %i, %i, %i] (unk2: %i, unk1: %i)", - serverSlot, RoF2Slot.Type, RoF2Slot.Slot, RoF2Slot.SubIndex, RoF2Slot.AugIndex, RoF2Slot.Unknown02, RoF2Slot.Unknown01); + server_slot, RoF2Slot.Type, RoF2Slot.Slot, RoF2Slot.SubIndex, RoF2Slot.AugIndex, RoF2Slot.Unknown02, RoF2Slot.Unknown01); return RoF2Slot; } - static inline structs::InventorySlot_Struct ServerToRoF2CorpseSlot(uint32 serverCorpseSlot) + static inline structs::InventorySlot_Struct ServerToRoF2CorpseSlot(uint32 server_corpse_slot) { structs::InventorySlot_Struct RoF2Slot; RoF2Slot.Type = invtype::TYPE_INVALID; RoF2Slot.Unknown02 = INULL; - RoF2Slot.Slot = ServerToRoF2CorpseMainSlot(serverCorpseSlot); + RoF2Slot.Slot = ServerToRoF2CorpseMainSlot(server_corpse_slot); RoF2Slot.SubIndex = invbag::SLOT_INVALID; RoF2Slot.AugIndex = invaug::SOCKET_INVALID; RoF2Slot.Unknown01 = INULL; @@ -5951,25 +5951,25 @@ namespace RoF2 RoF2Slot.Type = invtype::typeCorpse; Log(Logs::Detail, Logs::Netcode, "Convert Server Corpse Slot %i to RoF2 Corpse Slot [%i, %i, %i, %i] (unk2: %i, unk1: %i)", - serverCorpseSlot, RoF2Slot.Type, RoF2Slot.Slot, RoF2Slot.SubIndex, RoF2Slot.AugIndex, RoF2Slot.Unknown02, RoF2Slot.Unknown01); + server_corpse_slot, RoF2Slot.Type, RoF2Slot.Slot, RoF2Slot.SubIndex, RoF2Slot.AugIndex, RoF2Slot.Unknown02, RoF2Slot.Unknown01); return RoF2Slot; } - static inline uint32 ServerToRoF2CorpseMainSlot(uint32 serverCorpseSlot) + static inline uint32 ServerToRoF2CorpseMainSlot(uint32 server_corpse_slot) { uint32 RoF2Slot = invslot::SLOT_INVALID; - if (serverCorpseSlot <= EQEmu::invslot::CORPSE_END && serverCorpseSlot >= EQEmu::invslot::CORPSE_BEGIN) { - RoF2Slot = serverCorpseSlot; + if (server_corpse_slot <= EQEmu::invslot::CORPSE_END && server_corpse_slot >= EQEmu::invslot::CORPSE_BEGIN) { + RoF2Slot = server_corpse_slot; } - Log(Logs::Detail, Logs::Netcode, "Convert Server Corpse Slot %i to RoF2 Corpse Main Slot %i", serverCorpseSlot, RoF2Slot); + Log(Logs::Detail, Logs::Netcode, "Convert Server Corpse Slot %i to RoF2 Corpse Main Slot %i", server_corpse_slot, RoF2Slot); return RoF2Slot; } - static inline structs::TypelessInventorySlot_Struct ServerToRoF2TypelessSlot(uint32 serverSlot, int16 serverType) + static inline structs::TypelessInventorySlot_Struct ServerToRoF2TypelessSlot(uint32 server_slot, int16 server_type) { structs::TypelessInventorySlot_Struct RoF2Slot; RoF2Slot.Slot = invslot::SLOT_INVALID; @@ -5979,13 +5979,13 @@ namespace RoF2 uint32 TempSlot = EQEmu::invslot::SLOT_INVALID; - if (serverType == EQEmu::invtype::typePossessions) { - if (serverSlot < EQEmu::invtype::POSSESSIONS_SIZE) { - RoF2Slot.Slot = serverSlot; + if (server_type == EQEmu::invtype::typePossessions) { + if (server_slot < EQEmu::invtype::POSSESSIONS_SIZE) { + RoF2Slot.Slot = server_slot; } - else if (serverSlot <= EQEmu::invbag::CURSOR_BAG_END && serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { - TempSlot = serverSlot - EQEmu::invbag::GENERAL_BAGS_BEGIN; + else if (server_slot <= EQEmu::invbag::CURSOR_BAG_END && server_slot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { + TempSlot = server_slot - EQEmu::invbag::GENERAL_BAGS_BEGIN; RoF2Slot.Slot = invslot::GENERAL_BEGIN + (TempSlot / EQEmu::invbag::SLOT_COUNT); RoF2Slot.SubIndex = TempSlot - ((RoF2Slot.Slot - invslot::GENERAL_BEGIN) * EQEmu::invbag::SLOT_COUNT); @@ -5993,114 +5993,114 @@ namespace RoF2 } Log(Logs::Detail, Logs::Netcode, "Convert Server Slot %i to RoF2 Typeless Slot [%i, %i, %i] (implied type: %i, unk1: %i)", - serverSlot, RoF2Slot.Slot, RoF2Slot.SubIndex, RoF2Slot.AugIndex, serverType, RoF2Slot.Unknown01); + server_slot, RoF2Slot.Slot, RoF2Slot.SubIndex, RoF2Slot.AugIndex, server_type, RoF2Slot.Unknown01); return RoF2Slot; } - static inline uint32 RoF2ToServerSlot(structs::InventorySlot_Struct rof2Slot) + static inline uint32 RoF2ToServerSlot(structs::InventorySlot_Struct rof2_slot) { - if (rof2Slot.AugIndex < invaug::SOCKET_INVALID || rof2Slot.AugIndex >= invaug::SOCKET_COUNT) { + if (rof2_slot.AugIndex < invaug::SOCKET_INVALID || rof2_slot.AugIndex >= invaug::SOCKET_COUNT) { Log(Logs::Detail, Logs::Netcode, "Convert RoF2 Slot [%i, %i, %i, %i] (unk2: %i, unk1: %i) to Server Slot %i", - rof2Slot.Type, rof2Slot.Slot, rof2Slot.SubIndex, rof2Slot.AugIndex, rof2Slot.Unknown02, rof2Slot.Unknown01, EQEmu::invslot::SLOT_INVALID); + rof2_slot.Type, rof2_slot.Slot, rof2_slot.SubIndex, rof2_slot.AugIndex, rof2_slot.Unknown02, rof2_slot.Unknown01, EQEmu::invslot::SLOT_INVALID); return EQEmu::invslot::SLOT_INVALID; } - uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; - uint32 TempSlot = invslot::SLOT_INVALID; + uint32 server_slot = EQEmu::invslot::SLOT_INVALID; + uint32 temp_slot = invslot::SLOT_INVALID; - switch (rof2Slot.Type) { + switch (rof2_slot.Type) { case invtype::typePossessions: { - if (rof2Slot.Slot >= invslot::POSSESSIONS_BEGIN && rof2Slot.Slot <= invslot::POSSESSIONS_END) { - if (rof2Slot.SubIndex == invbag::SLOT_INVALID) { - ServerSlot = rof2Slot.Slot; + if (rof2_slot.Slot >= invslot::POSSESSIONS_BEGIN && rof2_slot.Slot <= invslot::POSSESSIONS_END) { + if (rof2_slot.SubIndex == invbag::SLOT_INVALID) { + server_slot = rof2_slot.Slot; } - else if (rof2Slot.SubIndex >= invbag::SLOT_BEGIN && rof2Slot.SubIndex <= invbag::SLOT_END) { - if (rof2Slot.Slot < invslot::GENERAL_BEGIN) + else if (rof2_slot.SubIndex >= invbag::SLOT_BEGIN && rof2_slot.SubIndex <= invbag::SLOT_END) { + if (rof2_slot.Slot < invslot::GENERAL_BEGIN) return EQEmu::invslot::SLOT_INVALID; - TempSlot = (rof2Slot.Slot - invslot::GENERAL_BEGIN) * invbag::SLOT_COUNT; - ServerSlot = EQEmu::invbag::GENERAL_BAGS_BEGIN + TempSlot + rof2Slot.SubIndex; + temp_slot = (rof2_slot.Slot - invslot::GENERAL_BEGIN) * invbag::SLOT_COUNT; + server_slot = EQEmu::invbag::GENERAL_BAGS_BEGIN + temp_slot + rof2_slot.SubIndex; } } break; } case invtype::typeBank: { - if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::BANK_SIZE) { - if (rof2Slot.SubIndex == invbag::SLOT_INVALID) { - ServerSlot = EQEmu::invslot::BANK_BEGIN + rof2Slot.Slot; + if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::BANK_SIZE) { + if (rof2_slot.SubIndex == invbag::SLOT_INVALID) { + server_slot = EQEmu::invslot::BANK_BEGIN + rof2_slot.Slot; } - else if (rof2Slot.SubIndex >= invbag::SLOT_BEGIN && rof2Slot.SubIndex <= invbag::SLOT_END) { - TempSlot = rof2Slot.Slot * invbag::SLOT_COUNT; - ServerSlot = EQEmu::invbag::BANK_BAGS_BEGIN + TempSlot + rof2Slot.SubIndex; + else if (rof2_slot.SubIndex >= invbag::SLOT_BEGIN && rof2_slot.SubIndex <= invbag::SLOT_END) { + temp_slot = rof2_slot.Slot * invbag::SLOT_COUNT; + server_slot = EQEmu::invbag::BANK_BAGS_BEGIN + temp_slot + rof2_slot.SubIndex; } } break; } case invtype::typeSharedBank: { - if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::SHARED_BANK_SIZE) { - if (rof2Slot.SubIndex == invbag::SLOT_INVALID) { - ServerSlot = EQEmu::invslot::SHARED_BANK_BEGIN + rof2Slot.Slot; + if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::SHARED_BANK_SIZE) { + if (rof2_slot.SubIndex == invbag::SLOT_INVALID) { + server_slot = EQEmu::invslot::SHARED_BANK_BEGIN + rof2_slot.Slot; } - else if (rof2Slot.SubIndex >= invbag::SLOT_BEGIN && rof2Slot.SubIndex <= invbag::SLOT_END) { - TempSlot = rof2Slot.Slot * invbag::SLOT_COUNT; - ServerSlot = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + TempSlot + rof2Slot.SubIndex; + else if (rof2_slot.SubIndex >= invbag::SLOT_BEGIN && rof2_slot.SubIndex <= invbag::SLOT_END) { + temp_slot = rof2_slot.Slot * invbag::SLOT_COUNT; + server_slot = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + temp_slot + rof2_slot.SubIndex; } } break; } case invtype::typeTrade: { - if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::TRADE_SIZE) { - if (rof2Slot.SubIndex == invbag::SLOT_INVALID) { - ServerSlot = EQEmu::invslot::TRADE_BEGIN + rof2Slot.Slot; + if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::TRADE_SIZE) { + if (rof2_slot.SubIndex == invbag::SLOT_INVALID) { + server_slot = EQEmu::invslot::TRADE_BEGIN + rof2_slot.Slot; } - else if (rof2Slot.SubIndex >= invbag::SLOT_BEGIN && rof2Slot.SubIndex <= invbag::SLOT_END) { - TempSlot = rof2Slot.Slot * invbag::SLOT_COUNT; - ServerSlot = EQEmu::invbag::TRADE_BAGS_BEGIN + TempSlot + rof2Slot.SubIndex; + else if (rof2_slot.SubIndex >= invbag::SLOT_BEGIN && rof2_slot.SubIndex <= invbag::SLOT_END) { + temp_slot = rof2_slot.Slot * invbag::SLOT_COUNT; + server_slot = EQEmu::invbag::TRADE_BAGS_BEGIN + temp_slot + rof2_slot.SubIndex; } } break; } case invtype::typeWorld: { - if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::WORLD_SIZE) { - ServerSlot = EQEmu::invslot::SHARED_BANK_BEGIN + rof2Slot.Slot; + if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::WORLD_SIZE) { + server_slot = EQEmu::invslot::SHARED_BANK_BEGIN + rof2_slot.Slot; } break; } case invtype::typeLimbo: { - if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::LIMBO_SIZE) { - ServerSlot = EQEmu::invslot::slotCursor; + if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::LIMBO_SIZE) { + server_slot = EQEmu::invslot::slotCursor; } break; } case invtype::typeTribute: { - if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::TRIBUTE_SIZE) { - ServerSlot = EQEmu::invslot::TRIBUTE_BEGIN + rof2Slot.Slot; + if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::TRIBUTE_SIZE) { + server_slot = EQEmu::invslot::TRIBUTE_BEGIN + rof2_slot.Slot; } break; } case invtype::typeGuildTribute: { - if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::GUILD_TRIBUTE_SIZE) { - ServerSlot = EQEmu::invslot::GUILD_TRIBUTE_BEGIN + rof2Slot.Slot; + if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::GUILD_TRIBUTE_SIZE) { + server_slot = EQEmu::invslot::GUILD_TRIBUTE_BEGIN + rof2_slot.Slot; } break; } case invtype::typeCorpse: { - if (rof2Slot.Slot >= invslot::CORPSE_BEGIN && rof2Slot.Slot <= invslot::CORPSE_END) { - ServerSlot = rof2Slot.Slot; + if (rof2_slot.Slot >= invslot::CORPSE_BEGIN && rof2_slot.Slot <= invslot::CORPSE_END) { + server_slot = rof2_slot.Slot; } break; @@ -6112,47 +6112,47 @@ namespace RoF2 } Log(Logs::Detail, Logs::Netcode, "Convert RoF2 Slot [%i, %i, %i, %i] (unk2: %i, unk1: %i) to Server Slot %i", - rof2Slot.Type, rof2Slot.Slot, rof2Slot.SubIndex, rof2Slot.AugIndex, rof2Slot.Unknown02, rof2Slot.Unknown01, ServerSlot); + rof2_slot.Type, rof2_slot.Slot, rof2_slot.SubIndex, rof2_slot.AugIndex, rof2_slot.Unknown02, rof2_slot.Unknown01, server_slot); - return ServerSlot; + return server_slot; } - static inline uint32 RoF2ToServerCorpseSlot(structs::InventorySlot_Struct rof2CorpseSlot) + static inline uint32 RoF2ToServerCorpseSlot(structs::InventorySlot_Struct rof2_corpse_slot) { uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; - if (rof2CorpseSlot.Type != invtype::typeCorpse || rof2CorpseSlot.SubIndex != invbag::SLOT_INVALID || rof2CorpseSlot.AugIndex != invaug::SOCKET_INVALID) { + if (rof2_corpse_slot.Type != invtype::typeCorpse || rof2_corpse_slot.SubIndex != invbag::SLOT_INVALID || rof2_corpse_slot.AugIndex != invaug::SOCKET_INVALID) { ServerSlot = EQEmu::invslot::SLOT_INVALID; } else { - ServerSlot = RoF2ToServerCorpseMainSlot(rof2CorpseSlot.Slot); + ServerSlot = RoF2ToServerCorpseMainSlot(rof2_corpse_slot.Slot); } Log(Logs::Detail, Logs::Netcode, "Convert RoF2 Slot [%i, %i, %i, %i] (unk2: %i, unk1: %i) to Server Slot %i", - rof2CorpseSlot.Type, rof2CorpseSlot.Slot, rof2CorpseSlot.SubIndex, rof2CorpseSlot.AugIndex, rof2CorpseSlot.Unknown02, rof2CorpseSlot.Unknown01, ServerSlot); + rof2_corpse_slot.Type, rof2_corpse_slot.Slot, rof2_corpse_slot.SubIndex, rof2_corpse_slot.AugIndex, rof2_corpse_slot.Unknown02, rof2_corpse_slot.Unknown01, ServerSlot); return ServerSlot; } - static inline uint32 RoF2ToServerCorpseMainSlot(uint32 rof2CorpseSlot) + static inline uint32 RoF2ToServerCorpseMainSlot(uint32 rof2_corpse_slot) { uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; - if (rof2CorpseSlot <= invslot::CORPSE_END && rof2CorpseSlot >= invslot::CORPSE_BEGIN) { - ServerSlot = rof2CorpseSlot; + if (rof2_corpse_slot <= invslot::CORPSE_END && rof2_corpse_slot >= invslot::CORPSE_BEGIN) { + ServerSlot = rof2_corpse_slot; } - Log(Logs::Detail, Logs::Netcode, "Convert RoF2 Corpse Main Slot %i to Server Corpse Slot %i", rof2CorpseSlot, ServerSlot); + Log(Logs::Detail, Logs::Netcode, "Convert RoF2 Corpse Main Slot %i to Server Corpse Slot %i", rof2_corpse_slot, ServerSlot); return ServerSlot; } - static inline uint32 RoF2ToServerTypelessSlot(structs::TypelessInventorySlot_Struct rof2Slot, int16 rof2Type) + static inline uint32 RoF2ToServerTypelessSlot(structs::TypelessInventorySlot_Struct rof2_slot, int16 rof2_type) { - if (rof2Slot.AugIndex < invaug::SOCKET_INVALID || rof2Slot.AugIndex >= invaug::SOCKET_COUNT) { + if (rof2_slot.AugIndex < invaug::SOCKET_INVALID || rof2_slot.AugIndex >= invaug::SOCKET_COUNT) { Log(Logs::Detail, Logs::Netcode, "Convert RoF2 Typeless Slot [%i, %i, %i] (implied type: %i, unk1: %i) to Server Slot %i", - rof2Slot.Slot, rof2Slot.SubIndex, rof2Slot.AugIndex, rof2Type, rof2Slot.Unknown01, EQEmu::invslot::SLOT_INVALID); + rof2_slot.Slot, rof2_slot.SubIndex, rof2_slot.AugIndex, rof2_type, rof2_slot.Unknown01, EQEmu::invslot::SLOT_INVALID); return EQEmu::invslot::SLOT_INVALID; } @@ -6160,97 +6160,97 @@ namespace RoF2 uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; uint32 TempSlot = invslot::SLOT_INVALID; - switch (rof2Type) { + switch (rof2_type) { case invtype::typePossessions: { - if (rof2Slot.Slot >= invslot::POSSESSIONS_BEGIN && rof2Slot.Slot <= invslot::POSSESSIONS_END) { - if (rof2Slot.SubIndex == invbag::SLOT_INVALID) { - ServerSlot = rof2Slot.Slot; + if (rof2_slot.Slot >= invslot::POSSESSIONS_BEGIN && rof2_slot.Slot <= invslot::POSSESSIONS_END) { + if (rof2_slot.SubIndex == invbag::SLOT_INVALID) { + ServerSlot = rof2_slot.Slot; } - else if (rof2Slot.SubIndex >= invbag::SLOT_BEGIN && rof2Slot.SubIndex <= invbag::SLOT_END) { - if (rof2Slot.Slot < invslot::GENERAL_BEGIN) + else if (rof2_slot.SubIndex >= invbag::SLOT_BEGIN && rof2_slot.SubIndex <= invbag::SLOT_END) { + if (rof2_slot.Slot < invslot::GENERAL_BEGIN) return EQEmu::invslot::SLOT_INVALID; - TempSlot = (rof2Slot.Slot - invslot::GENERAL_BEGIN) * invbag::SLOT_COUNT; - ServerSlot = EQEmu::invbag::GENERAL_BAGS_BEGIN + TempSlot + rof2Slot.SubIndex; + TempSlot = (rof2_slot.Slot - invslot::GENERAL_BEGIN) * invbag::SLOT_COUNT; + ServerSlot = EQEmu::invbag::GENERAL_BAGS_BEGIN + TempSlot + rof2_slot.SubIndex; } } break; } case invtype::typeBank: { - if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::BANK_SIZE) { - if (rof2Slot.SubIndex == invbag::SLOT_INVALID) { - ServerSlot = EQEmu::invslot::BANK_BEGIN + rof2Slot.Slot; + if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::BANK_SIZE) { + if (rof2_slot.SubIndex == invbag::SLOT_INVALID) { + ServerSlot = EQEmu::invslot::BANK_BEGIN + rof2_slot.Slot; } - else if (rof2Slot.SubIndex >= invbag::SLOT_BEGIN && rof2Slot.SubIndex <= invbag::SLOT_END) { - TempSlot = rof2Slot.Slot * invbag::SLOT_COUNT; - ServerSlot = EQEmu::invbag::BANK_BAGS_BEGIN + TempSlot + rof2Slot.SubIndex; + else if (rof2_slot.SubIndex >= invbag::SLOT_BEGIN && rof2_slot.SubIndex <= invbag::SLOT_END) { + TempSlot = rof2_slot.Slot * invbag::SLOT_COUNT; + ServerSlot = EQEmu::invbag::BANK_BAGS_BEGIN + TempSlot + rof2_slot.SubIndex; } } break; } case invtype::typeSharedBank: { - if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::SHARED_BANK_SIZE) { - if (rof2Slot.SubIndex == invbag::SLOT_INVALID) { - ServerSlot = EQEmu::invslot::SHARED_BANK_BEGIN + rof2Slot.Slot; + if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::SHARED_BANK_SIZE) { + if (rof2_slot.SubIndex == invbag::SLOT_INVALID) { + ServerSlot = EQEmu::invslot::SHARED_BANK_BEGIN + rof2_slot.Slot; } - else if (rof2Slot.SubIndex >= invbag::SLOT_BEGIN && rof2Slot.SubIndex <= invbag::SLOT_END) { - TempSlot = rof2Slot.Slot * invbag::SLOT_COUNT; - ServerSlot = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + TempSlot + rof2Slot.SubIndex; + else if (rof2_slot.SubIndex >= invbag::SLOT_BEGIN && rof2_slot.SubIndex <= invbag::SLOT_END) { + TempSlot = rof2_slot.Slot * invbag::SLOT_COUNT; + ServerSlot = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN + TempSlot + rof2_slot.SubIndex; } } break; } case invtype::typeTrade: { - if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::TRADE_SIZE) { - if (rof2Slot.SubIndex == invbag::SLOT_INVALID) { - ServerSlot = EQEmu::invslot::TRADE_BEGIN + rof2Slot.Slot; + if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::TRADE_SIZE) { + if (rof2_slot.SubIndex == invbag::SLOT_INVALID) { + ServerSlot = EQEmu::invslot::TRADE_BEGIN + rof2_slot.Slot; } - else if (rof2Slot.SubIndex >= invbag::SLOT_BEGIN && rof2Slot.SubIndex <= invbag::SLOT_END) { - TempSlot = rof2Slot.Slot * invbag::SLOT_COUNT; - ServerSlot = EQEmu::invbag::TRADE_BAGS_BEGIN + TempSlot + rof2Slot.SubIndex; + else if (rof2_slot.SubIndex >= invbag::SLOT_BEGIN && rof2_slot.SubIndex <= invbag::SLOT_END) { + TempSlot = rof2_slot.Slot * invbag::SLOT_COUNT; + ServerSlot = EQEmu::invbag::TRADE_BAGS_BEGIN + TempSlot + rof2_slot.SubIndex; } } break; } case invtype::typeWorld: { - if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::WORLD_SIZE) { - ServerSlot = EQEmu::invslot::SHARED_BANK_BEGIN + rof2Slot.Slot; + if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::WORLD_SIZE) { + ServerSlot = EQEmu::invslot::SHARED_BANK_BEGIN + rof2_slot.Slot; } break; } case invtype::typeLimbo: { - if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::LIMBO_SIZE) { + if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::LIMBO_SIZE) { ServerSlot = EQEmu::invslot::slotCursor; } break; } case invtype::typeTribute: { - if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::TRIBUTE_SIZE) { - ServerSlot = EQEmu::invslot::TRIBUTE_BEGIN + rof2Slot.Slot; + if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::TRIBUTE_SIZE) { + ServerSlot = EQEmu::invslot::TRIBUTE_BEGIN + rof2_slot.Slot; } break; } case invtype::typeGuildTribute: { - if (rof2Slot.Slot >= invslot::SLOT_BEGIN && rof2Slot.Slot < invtype::GUILD_TRIBUTE_SIZE) { - ServerSlot = EQEmu::invslot::GUILD_TRIBUTE_BEGIN + rof2Slot.Slot; + if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::GUILD_TRIBUTE_SIZE) { + ServerSlot = EQEmu::invslot::GUILD_TRIBUTE_BEGIN + rof2_slot.Slot; } break; } case invtype::typeCorpse: { - if (rof2Slot.Slot >= invslot::CORPSE_BEGIN && rof2Slot.Slot <= invslot::CORPSE_END) { - ServerSlot = rof2Slot.Slot; + if (rof2_slot.Slot >= invslot::CORPSE_BEGIN && rof2_slot.Slot <= invslot::CORPSE_END) { + ServerSlot = rof2_slot.Slot; } break; @@ -6262,24 +6262,24 @@ namespace RoF2 } Log(Logs::Detail, Logs::Netcode, "Convert RoF2 Typeless Slot [%i, %i, %i] (implied type: %i, unk1: %i) to Server Slot %i", - rof2Slot.Slot, rof2Slot.SubIndex, rof2Slot.AugIndex, rof2Type, rof2Slot.Unknown01, ServerSlot); + rof2_slot.Slot, rof2_slot.SubIndex, rof2_slot.AugIndex, rof2_type, rof2_slot.Unknown01, ServerSlot); return ServerSlot; } - static inline void ServerToRoF2SayLink(std::string& rof2SayLink, const std::string& serverSayLink) + static inline void ServerToRoF2SayLink(std::string &rof2_saylink, const std::string &server_saylink) { - if ((constants::SAY_LINK_BODY_SIZE == EQEmu::constants::SAY_LINK_BODY_SIZE) || (serverSayLink.find('\x12') == std::string::npos)) { - rof2SayLink = serverSayLink; + if ((constants::SAY_LINK_BODY_SIZE == EQEmu::constants::SAY_LINK_BODY_SIZE) || (server_saylink.find('\x12') == std::string::npos)) { + rof2_saylink = server_saylink; return; } - auto segments = SplitString(serverSayLink, '\x12'); + auto segments = SplitString(server_saylink, '\x12'); for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { if (segments[segment_iter].length() <= EQEmu::constants::SAY_LINK_BODY_SIZE) { - rof2SayLink.append(segments[segment_iter]); + rof2_saylink.append(segments[segment_iter]); // TODO: log size mismatch error continue; } @@ -6289,29 +6289,29 @@ namespace RoF2 // RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56) // Diff: - rof2SayLink.push_back('\x12'); - rof2SayLink.append(segments[segment_iter]); - rof2SayLink.push_back('\x12'); + rof2_saylink.push_back('\x12'); + rof2_saylink.append(segments[segment_iter]); + rof2_saylink.push_back('\x12'); } else { - rof2SayLink.append(segments[segment_iter]); + rof2_saylink.append(segments[segment_iter]); } } } - static inline void RoF2ToServerSayLink(std::string& serverSayLink, const std::string& rof2SayLink) + static inline void RoF2ToServerSayLink(std::string &server_saylink, const std::string &rof2_saylink) { - if ((EQEmu::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (rof2SayLink.find('\x12') == std::string::npos)) { - serverSayLink = rof2SayLink; + if ((EQEmu::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (rof2_saylink.find('\x12') == std::string::npos)) { + server_saylink = rof2_saylink; return; } - auto segments = SplitString(rof2SayLink, '\x12'); + auto segments = SplitString(rof2_saylink, '\x12'); for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { if (segments[segment_iter].length() <= constants::SAY_LINK_BODY_SIZE) { - serverSayLink.append(segments[segment_iter]); + server_saylink.append(segments[segment_iter]); // TODO: log size mismatch error continue; } @@ -6321,12 +6321,12 @@ namespace RoF2 // RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56) // Diff: - serverSayLink.push_back('\x12'); - serverSayLink.append(segments[segment_iter]); - serverSayLink.push_back('\x12'); + server_saylink.push_back('\x12'); + server_saylink.append(segments[segment_iter]); + server_saylink.push_back('\x12'); } else { - serverSayLink.append(segments[segment_iter]); + server_saylink.append(segments[segment_iter]); } } } diff --git a/common/patches/sod.cpp b/common/patches/sod.cpp index d2405ea46..067b2e571 100644 --- a/common/patches/sod.cpp +++ b/common/patches/sod.cpp @@ -46,18 +46,18 @@ namespace SoD void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id, uint8 depth); // server to client inventory location converters - static inline uint32 ServerToSoDSlot(uint32 ServerSlot); - static inline uint32 ServerToSoDCorpseSlot(uint32 serverCorpseSlot); + static inline uint32 ServerToSoDSlot(uint32 server_slot); + static inline uint32 ServerToSoDCorpseSlot(uint32 server_corpse_slot); // client to server inventory location converters - static inline uint32 SoDToServerSlot(uint32 sodSlot); - static inline uint32 SoDToServerCorpseSlot(uint32 sodCorpseSlot); + static inline uint32 SoDToServerSlot(uint32 sod_slot); + static inline uint32 SoDToServerCorpseSlot(uint32 sod_corpse_slot); // server to client say link converter - static inline void ServerToSoDSayLink(std::string& sodSayLink, const std::string& serverSayLink); + static inline void ServerToSoDSayLink(std::string &sod_saylink, const std::string &server_saylink); // client to server say link converter - static inline void SoDToServerSayLink(std::string& serverSayLink, const std::string& sodSayLink); + static inline void SoDToServerSayLink(std::string &server_saylink, const std::string &sod_saylink); static inline CastingSlot ServerToSoDCastingSlot(EQEmu::CastingSlot slot); static inline EQEmu::CastingSlot SoDToServerCastingSlot(CastingSlot slot); @@ -3841,114 +3841,114 @@ namespace SoD return SoDSlot; } - static inline uint32 ServerToSoDCorpseSlot(uint32 serverCorpseSlot) + static inline uint32 ServerToSoDCorpseSlot(uint32 server_corpse_slot) { uint32 SoDSlot = invslot::SLOT_INVALID; - if (serverCorpseSlot <= EQEmu::invslot::slotGeneral8 && serverCorpseSlot >= EQEmu::invslot::slotGeneral1) { - SoDSlot = serverCorpseSlot; + if (server_corpse_slot <= EQEmu::invslot::slotGeneral8 && server_corpse_slot >= EQEmu::invslot::slotGeneral1) { + SoDSlot = server_corpse_slot; } - else if (serverCorpseSlot <= EQEmu::invslot::CORPSE_END && serverCorpseSlot >= EQEmu::invslot::slotCursor) { - SoDSlot = serverCorpseSlot - 2; + else if (server_corpse_slot <= EQEmu::invslot::CORPSE_END && server_corpse_slot >= EQEmu::invslot::slotCursor) { + SoDSlot = server_corpse_slot - 2; } - Log(Logs::Detail, Logs::Netcode, "Convert Server Corpse Slot %i to SoD Corpse Slot %i", serverCorpseSlot, SoDSlot); + Log(Logs::Detail, Logs::Netcode, "Convert Server Corpse Slot %i to SoD Corpse Slot %i", server_corpse_slot, SoDSlot); return SoDSlot; } - static inline uint32 SoDToServerSlot(uint32 sodSlot) + static inline uint32 SoDToServerSlot(uint32 sod_slot) { - uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; + uint32 server_slot = EQEmu::invslot::SLOT_INVALID; - if (sodSlot <= invslot::slotGeneral8) { - ServerSlot = sodSlot; + if (sod_slot <= invslot::slotGeneral8) { + server_slot = sod_slot; } - else if (sodSlot <= invslot::CORPSE_END && sodSlot >= invslot::slotCursor) { - ServerSlot = sodSlot + 2; + else if (sod_slot <= invslot::CORPSE_END && sod_slot >= invslot::slotCursor) { + server_slot = sod_slot + 2; } - else if (sodSlot <= invbag::GENERAL_BAGS_END && sodSlot >= invbag::GENERAL_BAGS_BEGIN) { - ServerSlot = sodSlot - 11; + else if (sod_slot <= invbag::GENERAL_BAGS_END && sod_slot >= invbag::GENERAL_BAGS_BEGIN) { + server_slot = sod_slot - 11; } - else if (sodSlot <= invbag::CURSOR_BAG_END && sodSlot >= invbag::CURSOR_BAG_BEGIN) { - ServerSlot = sodSlot + 9; + else if (sod_slot <= invbag::CURSOR_BAG_END && sod_slot >= invbag::CURSOR_BAG_BEGIN) { + server_slot = sod_slot + 9; } - else if (sodSlot <= invslot::TRIBUTE_END && sodSlot >= invslot::TRIBUTE_BEGIN) { - ServerSlot = sodSlot; + else if (sod_slot <= invslot::TRIBUTE_END && sod_slot >= invslot::TRIBUTE_BEGIN) { + server_slot = sod_slot; } - else if (sodSlot <= invslot::GUILD_TRIBUTE_END && sodSlot >= invslot::GUILD_TRIBUTE_BEGIN) { - ServerSlot = sodSlot; + else if (sod_slot <= invslot::GUILD_TRIBUTE_END && sod_slot >= invslot::GUILD_TRIBUTE_BEGIN) { + server_slot = sod_slot; } - else if (sodSlot <= invslot::BANK_END && sodSlot >= invslot::BANK_BEGIN) { - ServerSlot = sodSlot; + else if (sod_slot <= invslot::BANK_END && sod_slot >= invslot::BANK_BEGIN) { + server_slot = sod_slot; } - else if (sodSlot <= invbag::BANK_BAGS_END && sodSlot >= invbag::BANK_BAGS_BEGIN) { - ServerSlot = sodSlot - 1; + else if (sod_slot <= invbag::BANK_BAGS_END && sod_slot >= invbag::BANK_BAGS_BEGIN) { + server_slot = sod_slot - 1; } - else if (sodSlot <= invslot::SHARED_BANK_END && sodSlot >= invslot::SHARED_BANK_BEGIN) { - ServerSlot = sodSlot; + else if (sod_slot <= invslot::SHARED_BANK_END && sod_slot >= invslot::SHARED_BANK_BEGIN) { + server_slot = sod_slot; } - else if (sodSlot <= invbag::SHARED_BANK_BAGS_END && sodSlot >= invbag::SHARED_BANK_BAGS_BEGIN) { - ServerSlot = sodSlot - 1; + else if (sod_slot <= invbag::SHARED_BANK_BAGS_END && sod_slot >= invbag::SHARED_BANK_BAGS_BEGIN) { + server_slot = sod_slot - 1; } - else if (sodSlot <= invslot::TRADE_END && sodSlot >= invslot::TRADE_BEGIN) { - ServerSlot = sodSlot; + else if (sod_slot <= invslot::TRADE_END && sod_slot >= invslot::TRADE_BEGIN) { + server_slot = sod_slot; } - else if (sodSlot <= invbag::TRADE_BAGS_END && sodSlot >= invbag::TRADE_BAGS_BEGIN) { - ServerSlot = sodSlot; + else if (sod_slot <= invbag::TRADE_BAGS_END && sod_slot >= invbag::TRADE_BAGS_BEGIN) { + server_slot = sod_slot; } - else if (sodSlot <= invslot::WORLD_END && sodSlot >= invslot::WORLD_BEGIN) { - ServerSlot = sodSlot; + else if (sod_slot <= invslot::WORLD_END && sod_slot >= invslot::WORLD_BEGIN) { + server_slot = sod_slot; } - Log(Logs::Detail, Logs::Netcode, "Convert SoD Slot %i to Server Slot %i", sodSlot, ServerSlot); + Log(Logs::Detail, Logs::Netcode, "Convert SoD Slot %i to Server Slot %i", sod_slot, server_slot); - return ServerSlot; + return server_slot; } - static inline uint32 SoDToServerCorpseSlot(uint32 sodCorpseSlot) + static inline uint32 SoDToServerCorpseSlot(uint32 sod_corpse_slot) { - uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; + uint32 server_slot = EQEmu::invslot::SLOT_INVALID; - if (sodCorpseSlot <= invslot::slotGeneral8 && sodCorpseSlot >= invslot::slotGeneral1) { - ServerSlot = sodCorpseSlot; + if (sod_corpse_slot <= invslot::slotGeneral8 && sod_corpse_slot >= invslot::slotGeneral1) { + server_slot = sod_corpse_slot; } - else if (sodCorpseSlot <= invslot::CORPSE_END && sodCorpseSlot >= invslot::slotCursor) { - ServerSlot = sodCorpseSlot + 2; + else if (sod_corpse_slot <= invslot::CORPSE_END && sod_corpse_slot >= invslot::slotCursor) { + server_slot = sod_corpse_slot + 2; } - Log(Logs::Detail, Logs::Netcode, "Convert SoD Corpse Slot %i to Server Corpse Slot %i", sodCorpseSlot, ServerSlot); + Log(Logs::Detail, Logs::Netcode, "Convert SoD Corpse Slot %i to Server Corpse Slot %i", sod_corpse_slot, server_slot); - return ServerSlot; + return server_slot; } - static inline void ServerToSoDSayLink(std::string& sodSayLink, const std::string& serverSayLink) + static inline void ServerToSoDSayLink(std::string &sod_saylink, const std::string &server_saylink) { - if ((constants::SAY_LINK_BODY_SIZE == EQEmu::constants::SAY_LINK_BODY_SIZE) || (serverSayLink.find('\x12') == std::string::npos)) { - sodSayLink = serverSayLink; + if ((constants::SAY_LINK_BODY_SIZE == EQEmu::constants::SAY_LINK_BODY_SIZE) || (server_saylink.find('\x12') == std::string::npos)) { + sod_saylink = server_saylink; return; } - auto segments = SplitString(serverSayLink, '\x12'); + auto segments = SplitString(server_saylink, '\x12'); for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { if (segments[segment_iter].length() <= EQEmu::constants::SAY_LINK_BODY_SIZE) { - sodSayLink.append(segments[segment_iter]); + sod_saylink.append(segments[segment_iter]); // TODO: log size mismatch error continue; } @@ -3958,37 +3958,37 @@ namespace SoD // SoF: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX X XXXXX XXXXXXXX (50) // Diff: ^^^^^ ^ - sodSayLink.push_back('\x12'); - sodSayLink.append(segments[segment_iter].substr(0, 31)); - sodSayLink.append(segments[segment_iter].substr(36, 5)); + sod_saylink.push_back('\x12'); + sod_saylink.append(segments[segment_iter].substr(0, 31)); + sod_saylink.append(segments[segment_iter].substr(36, 5)); if (segments[segment_iter][41] == '0') - sodSayLink.push_back(segments[segment_iter][42]); + sod_saylink.push_back(segments[segment_iter][42]); else - sodSayLink.push_back('F'); + sod_saylink.push_back('F'); - sodSayLink.append(segments[segment_iter].substr(43)); - sodSayLink.push_back('\x12'); + sod_saylink.append(segments[segment_iter].substr(43)); + sod_saylink.push_back('\x12'); } else { - sodSayLink.append(segments[segment_iter]); + sod_saylink.append(segments[segment_iter]); } } } - static inline void SoDToServerSayLink(std::string& serverSayLink, const std::string& sodSayLink) + static inline void SoDToServerSayLink(std::string &server_saylink, const std::string &sod_saylink) { - if ((EQEmu::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (sodSayLink.find('\x12') == std::string::npos)) { - serverSayLink = sodSayLink; + if ((EQEmu::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (sod_saylink.find('\x12') == std::string::npos)) { + server_saylink = sod_saylink; return; } - auto segments = SplitString(sodSayLink, '\x12'); + auto segments = SplitString(sod_saylink, '\x12'); for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { if (segments[segment_iter].length() <= constants::SAY_LINK_BODY_SIZE) { - serverSayLink.append(segments[segment_iter]); + server_saylink.append(segments[segment_iter]); // TODO: log size mismatch error continue; } @@ -3998,16 +3998,16 @@ namespace SoD // RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56) // Diff: ^^^^^ ^ - serverSayLink.push_back('\x12'); - serverSayLink.append(segments[segment_iter].substr(0, 31)); - serverSayLink.append("00000"); - serverSayLink.append(segments[segment_iter].substr(31, 5)); - serverSayLink.push_back('0'); - serverSayLink.append(segments[segment_iter].substr(36)); - serverSayLink.push_back('\x12'); + server_saylink.push_back('\x12'); + server_saylink.append(segments[segment_iter].substr(0, 31)); + server_saylink.append("00000"); + server_saylink.append(segments[segment_iter].substr(31, 5)); + server_saylink.push_back('0'); + server_saylink.append(segments[segment_iter].substr(36)); + server_saylink.push_back('\x12'); } else { - serverSayLink.append(segments[segment_iter]); + server_saylink.append(segments[segment_iter]); } } } diff --git a/common/patches/sof.cpp b/common/patches/sof.cpp index 7c2fabc72..02ae774bc 100644 --- a/common/patches/sof.cpp +++ b/common/patches/sof.cpp @@ -46,21 +46,21 @@ namespace SoF void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id, uint8 depth); // server to client inventory location converters - static inline uint32 ServerToSoFSlot(uint32 serverSlot); - static inline uint32 ServerToSoFCorpseSlot(uint32 serverCorpseSlot); + static inline uint32 ServerToSoFSlot(uint32 server_slot); + static inline uint32 ServerToSoFCorpseSlot(uint32 server_corpse_slot); // client to server inventory location converters - static inline uint32 SoFToServerSlot(uint32 sofSlot); - static inline uint32 SoFToServerCorpseSlot(uint32 sofCorpseSlot); + static inline uint32 SoFToServerSlot(uint32 sof_slot); + static inline uint32 SoFToServerCorpseSlot(uint32 sof_corpse_slot); // server to client say link converter - static inline void ServerToSoFSayLink(std::string& sofSayLink, const std::string& serverSayLink); + static inline void ServerToSoFSayLink(std::string &sof_saylink, const std::string &server_saylink); // client to server say link converter - static inline void SoFToServerSayLink(std::string& serverSayLink, const std::string& sofSayLink); + static inline void SoFToServerSayLink(std::string &server_saylink, const std::string &sof_saylink); static inline CastingSlot ServerToSoFCastingSlot(EQEmu::CastingSlot slot); - static inline EQEmu::CastingSlot SoFToServerCastingSlot(CastingSlot slot, uint32 itemlocation); + static inline EQEmu::CastingSlot SoFToServerCastingSlot(CastingSlot slot, uint32 item_location); static inline int ServerToSoFBuffSlot(int index); static inline int SoFToServerBuffSlot(int index); @@ -103,8 +103,6 @@ namespace SoF signature.first_eq_opcode = opcodes->EmuToEQ(OP_ZoneEntry); into.RegisterPatch(signature, pname.c_str(), &opcodes, &struct_strategy); - - Log(Logs::General, Logs::Netcode, "[IDENTIFY] Registered patch %s", name); } @@ -3173,175 +3171,183 @@ namespace SoF } } - static inline uint32 ServerToSoFSlot(uint32 serverSlot) + static inline uint32 ServerToSoFSlot(uint32 server_slot) { - uint32 SoFSlot = invslot::SLOT_INVALID; + uint32 sof_slot = invslot::SLOT_INVALID; - if (serverSlot <= EQEmu::invslot::slotGeneral8) { - SoFSlot = serverSlot; + if (server_slot <= EQEmu::invslot::slotGeneral8) { + sof_slot = server_slot; } - else if (serverSlot <= EQEmu::invslot::CORPSE_END && serverSlot >= EQEmu::invslot::slotCursor) { - SoFSlot = serverSlot - 2; + else if (server_slot <= EQEmu::invslot::CORPSE_END && server_slot >= EQEmu::invslot::slotCursor) { + sof_slot = server_slot - 2; } - else if (serverSlot <= EQEmu::invbag::GENERAL_BAGS_8_END && serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { - SoFSlot = serverSlot + 11; + else if (server_slot <= EQEmu::invbag::GENERAL_BAGS_8_END && server_slot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { + sof_slot = server_slot + 11; } - else if (serverSlot <= EQEmu::invbag::CURSOR_BAG_END && serverSlot >= EQEmu::invbag::CURSOR_BAG_BEGIN) { - SoFSlot = serverSlot - 9; + else if (server_slot <= EQEmu::invbag::CURSOR_BAG_END && server_slot >= EQEmu::invbag::CURSOR_BAG_BEGIN) { + sof_slot = server_slot - 9; } - else if (serverSlot <= EQEmu::invslot::TRIBUTE_END && serverSlot >= EQEmu::invslot::TRIBUTE_BEGIN) { - SoFSlot = serverSlot; + else if (server_slot <= EQEmu::invslot::TRIBUTE_END && server_slot >= EQEmu::invslot::TRIBUTE_BEGIN) { + sof_slot = server_slot; } - else if (serverSlot <= EQEmu::invslot::GUILD_TRIBUTE_END && serverSlot >= EQEmu::invslot::GUILD_TRIBUTE_BEGIN) { - SoFSlot = serverSlot; + else if (server_slot <= EQEmu::invslot::GUILD_TRIBUTE_END && server_slot >= EQEmu::invslot::GUILD_TRIBUTE_BEGIN) { + sof_slot = server_slot; } - else if (serverSlot <= EQEmu::invslot::BANK_END && serverSlot >= EQEmu::invslot::BANK_BEGIN) { - SoFSlot = serverSlot; + else if (server_slot <= EQEmu::invslot::BANK_END && server_slot >= EQEmu::invslot::BANK_BEGIN) { + sof_slot = server_slot; } - else if (serverSlot <= EQEmu::invbag::BANK_BAGS_END && serverSlot >= EQEmu::invbag::BANK_BAGS_BEGIN) { - SoFSlot = serverSlot + 1; + else if (server_slot <= EQEmu::invbag::BANK_BAGS_END && server_slot >= EQEmu::invbag::BANK_BAGS_BEGIN) { + sof_slot = server_slot + 1; } - else if (serverSlot <= EQEmu::invslot::SHARED_BANK_END && serverSlot >= EQEmu::invslot::SHARED_BANK_BEGIN) { - SoFSlot = serverSlot; + else if (server_slot <= EQEmu::invslot::SHARED_BANK_END && server_slot >= EQEmu::invslot::SHARED_BANK_BEGIN) { + sof_slot = server_slot; } - else if (serverSlot <= EQEmu::invbag::SHARED_BANK_BAGS_END && serverSlot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN) { - SoFSlot = serverSlot + 1; + else if (server_slot <= EQEmu::invbag::SHARED_BANK_BAGS_END && server_slot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN) { + sof_slot = server_slot + 1; } - else if (serverSlot <= EQEmu::invslot::TRADE_END && serverSlot >= EQEmu::invslot::TRADE_BEGIN) { - SoFSlot = serverSlot; + else if (server_slot <= EQEmu::invslot::TRADE_END && server_slot >= EQEmu::invslot::TRADE_BEGIN) { + sof_slot = server_slot; } - else if (serverSlot <= EQEmu::invbag::TRADE_BAGS_END && serverSlot >= EQEmu::invbag::TRADE_BAGS_BEGIN) { - SoFSlot = serverSlot; + else if (server_slot <= EQEmu::invbag::TRADE_BAGS_END && server_slot >= EQEmu::invbag::TRADE_BAGS_BEGIN) { + sof_slot = server_slot; } - else if (serverSlot <= EQEmu::invslot::WORLD_END && serverSlot >= EQEmu::invslot::WORLD_BEGIN) { - SoFSlot = serverSlot; + else if (server_slot <= EQEmu::invslot::WORLD_END && server_slot >= EQEmu::invslot::WORLD_BEGIN) { + sof_slot = server_slot; } - Log(Logs::Detail, Logs::Netcode, "Convert Server Slot %i to SoF Slot %i", serverSlot, SoFSlot); + Log(Logs::Detail, Logs::Netcode, "Convert Server Slot %i to SoF Slot %i", server_slot, sof_slot); - return SoFSlot; + return sof_slot; } - static inline uint32 ServerToSoFCorpseSlot(uint32 serverCorpseSlot) + static inline uint32 ServerToSoFCorpseSlot(uint32 server_corpse_slot) { uint32 SoFSlot = invslot::SLOT_INVALID; - if (serverCorpseSlot <= EQEmu::invslot::slotGeneral8 && serverCorpseSlot >= EQEmu::invslot::slotGeneral1) { - SoFSlot = serverCorpseSlot; + if (server_corpse_slot <= EQEmu::invslot::slotGeneral8 && server_corpse_slot >= EQEmu::invslot::slotGeneral1) { + SoFSlot = server_corpse_slot; } - else if (serverCorpseSlot <= EQEmu::invslot::CORPSE_END && serverCorpseSlot >= EQEmu::invslot::slotCursor) { - SoFSlot = serverCorpseSlot - 2; + else if (server_corpse_slot <= EQEmu::invslot::CORPSE_END && server_corpse_slot >= EQEmu::invslot::slotCursor) { + SoFSlot = server_corpse_slot - 2; } - Log(Logs::Detail, Logs::Netcode, "Convert Server Corpse Slot %i to SoF Corpse Slot %i", serverCorpseSlot, SoFSlot); + Log(Logs::Detail, + Logs::Netcode, + "Convert Server Corpse Slot %i to SoF Corpse Slot %i", + server_corpse_slot, + SoFSlot); return SoFSlot; } - static inline uint32 SoFToServerSlot(uint32 sofSlot) + static inline uint32 SoFToServerSlot(uint32 sof_slot) { - uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; + uint32 server_slot = EQEmu::invslot::SLOT_INVALID; - if (sofSlot <= invslot::slotGeneral8) { - ServerSlot = sofSlot; + if (sof_slot <= invslot::slotGeneral8) { + server_slot = sof_slot; } - else if (sofSlot <= invslot::CORPSE_END && sofSlot >= invslot::slotCursor) { - ServerSlot = sofSlot + 2; + else if (sof_slot <= invslot::CORPSE_END && sof_slot >= invslot::slotCursor) { + server_slot = sof_slot + 2; } - else if (sofSlot <= invbag::GENERAL_BAGS_END && sofSlot >= invbag::GENERAL_BAGS_BEGIN) { - ServerSlot = sofSlot - 11; + else if (sof_slot <= invbag::GENERAL_BAGS_END && sof_slot >= invbag::GENERAL_BAGS_BEGIN) { + server_slot = sof_slot - 11; } - else if (sofSlot <= invbag::CURSOR_BAG_END && sofSlot >= invbag::CURSOR_BAG_BEGIN) { - ServerSlot = sofSlot + 9; + else if (sof_slot <= invbag::CURSOR_BAG_END && sof_slot >= invbag::CURSOR_BAG_BEGIN) { + server_slot = sof_slot + 9; } - else if (sofSlot <= invslot::TRIBUTE_END && sofSlot >= invslot::TRIBUTE_BEGIN) { - ServerSlot = sofSlot; + else if (sof_slot <= invslot::TRIBUTE_END && sof_slot >= invslot::TRIBUTE_BEGIN) { + server_slot = sof_slot; } - else if (sofSlot <= invslot::GUILD_TRIBUTE_END && sofSlot >= invslot::GUILD_TRIBUTE_BEGIN) { - ServerSlot = sofSlot; + else if (sof_slot <= invslot::GUILD_TRIBUTE_END && sof_slot >= invslot::GUILD_TRIBUTE_BEGIN) { + server_slot = sof_slot; } - else if (sofSlot <= invslot::BANK_END && sofSlot >= invslot::BANK_BEGIN) { - ServerSlot = sofSlot; + else if (sof_slot <= invslot::BANK_END && sof_slot >= invslot::BANK_BEGIN) { + server_slot = sof_slot; } - else if (sofSlot <= invbag::BANK_BAGS_END && sofSlot >= invbag::BANK_BAGS_BEGIN) { - ServerSlot = sofSlot - 1; + else if (sof_slot <= invbag::BANK_BAGS_END && sof_slot >= invbag::BANK_BAGS_BEGIN) { + server_slot = sof_slot - 1; } - else if (sofSlot <= invslot::SHARED_BANK_END && sofSlot >= invslot::SHARED_BANK_BEGIN) { - ServerSlot = sofSlot; + else if (sof_slot <= invslot::SHARED_BANK_END && sof_slot >= invslot::SHARED_BANK_BEGIN) { + server_slot = sof_slot; } - else if (sofSlot <= invbag::SHARED_BANK_BAGS_END && sofSlot >= invbag::SHARED_BANK_BAGS_BEGIN) { - ServerSlot = sofSlot - 1; + else if (sof_slot <= invbag::SHARED_BANK_BAGS_END && sof_slot >= invbag::SHARED_BANK_BAGS_BEGIN) { + server_slot = sof_slot - 1; } - else if (sofSlot <= invslot::TRADE_END && sofSlot >= invslot::TRADE_BEGIN) { - ServerSlot = sofSlot; + else if (sof_slot <= invslot::TRADE_END && sof_slot >= invslot::TRADE_BEGIN) { + server_slot = sof_slot; } - else if (sofSlot <= invbag::TRADE_BAGS_END && sofSlot >= invbag::TRADE_BAGS_BEGIN) { - ServerSlot = sofSlot; + else if (sof_slot <= invbag::TRADE_BAGS_END && sof_slot >= invbag::TRADE_BAGS_BEGIN) { + server_slot = sof_slot; } - else if (sofSlot <= invslot::WORLD_END && sofSlot >= invslot::WORLD_BEGIN) { - ServerSlot = sofSlot; + else if (sof_slot <= invslot::WORLD_END && sof_slot >= invslot::WORLD_BEGIN) { + server_slot = sof_slot; } - Log(Logs::Detail, Logs::Netcode, "Convert SoF Slot %i to Server Slot %i", sofSlot, ServerSlot); + Log(Logs::Detail, Logs::Netcode, "Convert SoF Slot %i to Server Slot %i", sof_slot, server_slot); - return ServerSlot; + return server_slot; } - static inline uint32 SoFToServerCorpseSlot(uint32 sofCorpseSlot) + static inline uint32 SoFToServerCorpseSlot(uint32 sof_corpse_slot) { - uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; + uint32 server_slot = EQEmu::invslot::SLOT_INVALID; - if (sofCorpseSlot <= invslot::slotGeneral8 && sofCorpseSlot >= invslot::slotGeneral1) { - ServerSlot = sofCorpseSlot; + if (sof_corpse_slot <= invslot::slotGeneral8 && sof_corpse_slot >= invslot::slotGeneral1) { + server_slot = sof_corpse_slot; } - else if (sofCorpseSlot <= invslot::CORPSE_END && sofCorpseSlot >= invslot::slotCursor) { - ServerSlot = sofCorpseSlot + 2; + else if (sof_corpse_slot <= invslot::CORPSE_END && sof_corpse_slot >= invslot::slotCursor) { + server_slot = sof_corpse_slot + 2; } - Log(Logs::Detail, Logs::Netcode, "Convert SoF Corpse Slot %i to Server Corpse Slot %i", sofCorpseSlot, ServerSlot); + Log(Logs::Detail, + Logs::Netcode, + "Convert SoF Corpse Slot %i to Server Corpse Slot %i", + sof_corpse_slot, + server_slot); - return ServerSlot; + return server_slot; } - static inline void ServerToSoFSayLink(std::string& sofSayLink, const std::string& serverSayLink) + static inline void ServerToSoFSayLink(std::string &sof_saylink, const std::string &server_saylink) { - if ((constants::SAY_LINK_BODY_SIZE == EQEmu::constants::SAY_LINK_BODY_SIZE) || (serverSayLink.find('\x12') == std::string::npos)) { - sofSayLink = serverSayLink; + if ((constants::SAY_LINK_BODY_SIZE == EQEmu::constants::SAY_LINK_BODY_SIZE) || (server_saylink.find('\x12') == std::string::npos)) { + sof_saylink = server_saylink; return; } - auto segments = SplitString(serverSayLink, '\x12'); + auto segments = SplitString(server_saylink, '\x12'); for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { if (segments[segment_iter].length() <= EQEmu::constants::SAY_LINK_BODY_SIZE) { - sofSayLink.append(segments[segment_iter]); + sof_saylink.append(segments[segment_iter]); // TODO: log size mismatch error continue; } @@ -3351,37 +3357,37 @@ namespace SoF // SoF: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX X XXXXX XXXXXXXX (50) // Diff: ^^^^^ ^ - sofSayLink.push_back('\x12'); - sofSayLink.append(segments[segment_iter].substr(0, 31)); - sofSayLink.append(segments[segment_iter].substr(36, 5)); + sof_saylink.push_back('\x12'); + sof_saylink.append(segments[segment_iter].substr(0, 31)); + sof_saylink.append(segments[segment_iter].substr(36, 5)); if (segments[segment_iter][41] == '0') - sofSayLink.push_back(segments[segment_iter][42]); + sof_saylink.push_back(segments[segment_iter][42]); else - sofSayLink.push_back('F'); + sof_saylink.push_back('F'); - sofSayLink.append(segments[segment_iter].substr(43)); - sofSayLink.push_back('\x12'); + sof_saylink.append(segments[segment_iter].substr(43)); + sof_saylink.push_back('\x12'); } else { - sofSayLink.append(segments[segment_iter]); + sof_saylink.append(segments[segment_iter]); } } } - static inline void SoFToServerSayLink(std::string& serverSayLink, const std::string& sofSayLink) + static inline void SoFToServerSayLink(std::string &server_saylink, const std::string &sof_saylink) { - if ((EQEmu::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (sofSayLink.find('\x12') == std::string::npos)) { - serverSayLink = sofSayLink; + if ((EQEmu::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (sof_saylink.find('\x12') == std::string::npos)) { + server_saylink = sof_saylink; return; } - auto segments = SplitString(sofSayLink, '\x12'); + auto segments = SplitString(sof_saylink, '\x12'); for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { if (segments[segment_iter].length() <= constants::SAY_LINK_BODY_SIZE) { - serverSayLink.append(segments[segment_iter]); + server_saylink.append(segments[segment_iter]); // TODO: log size mismatch error continue; } @@ -3391,98 +3397,95 @@ namespace SoF // RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56) // Diff: ^^^^^ ^ - serverSayLink.push_back('\x12'); - serverSayLink.append(segments[segment_iter].substr(0, 31)); - serverSayLink.append("00000"); - serverSayLink.append(segments[segment_iter].substr(31, 5)); - serverSayLink.push_back('0'); - serverSayLink.append(segments[segment_iter].substr(36)); - serverSayLink.push_back('\x12'); + server_saylink.push_back('\x12'); + server_saylink.append(segments[segment_iter].substr(0, 31)); + server_saylink.append("00000"); + server_saylink.append(segments[segment_iter].substr(31, 5)); + server_saylink.push_back('0'); + server_saylink.append(segments[segment_iter].substr(36)); + server_saylink.push_back('\x12'); } else { - serverSayLink.append(segments[segment_iter]); + server_saylink.append(segments[segment_iter]); } } } - static inline CastingSlot ServerToSoFCastingSlot(EQEmu::CastingSlot slot) - { + static inline CastingSlot ServerToSoFCastingSlot(EQEmu::CastingSlot slot) { switch (slot) { - case EQEmu::CastingSlot::Gem1: - return CastingSlot::Gem1; - case EQEmu::CastingSlot::Gem2: - return CastingSlot::Gem2; - case EQEmu::CastingSlot::Gem3: - return CastingSlot::Gem3; - case EQEmu::CastingSlot::Gem4: - return CastingSlot::Gem4; - case EQEmu::CastingSlot::Gem5: - return CastingSlot::Gem5; - case EQEmu::CastingSlot::Gem6: - return CastingSlot::Gem6; - case EQEmu::CastingSlot::Gem7: - return CastingSlot::Gem7; - case EQEmu::CastingSlot::Gem8: - return CastingSlot::Gem8; - case EQEmu::CastingSlot::Gem9: - return CastingSlot::Gem9; - case EQEmu::CastingSlot::Item: - return CastingSlot::Item; - case EQEmu::CastingSlot::PotionBelt: - return CastingSlot::PotionBelt; - case EQEmu::CastingSlot::Discipline: - return CastingSlot::Discipline; - case EQEmu::CastingSlot::AltAbility: - return CastingSlot::AltAbility; - default: // we shouldn't have any issues with other slots ... just return something - return CastingSlot::Discipline; + case EQEmu::CastingSlot::Gem1: + return CastingSlot::Gem1; + case EQEmu::CastingSlot::Gem2: + return CastingSlot::Gem2; + case EQEmu::CastingSlot::Gem3: + return CastingSlot::Gem3; + case EQEmu::CastingSlot::Gem4: + return CastingSlot::Gem4; + case EQEmu::CastingSlot::Gem5: + return CastingSlot::Gem5; + case EQEmu::CastingSlot::Gem6: + return CastingSlot::Gem6; + case EQEmu::CastingSlot::Gem7: + return CastingSlot::Gem7; + case EQEmu::CastingSlot::Gem8: + return CastingSlot::Gem8; + case EQEmu::CastingSlot::Gem9: + return CastingSlot::Gem9; + case EQEmu::CastingSlot::Item: + return CastingSlot::Item; + case EQEmu::CastingSlot::PotionBelt: + return CastingSlot::PotionBelt; + case EQEmu::CastingSlot::Discipline: + return CastingSlot::Discipline; + case EQEmu::CastingSlot::AltAbility: + return CastingSlot::AltAbility; + default: // we shouldn't have any issues with other slots ... just return something + return CastingSlot::Discipline; } } - static inline EQEmu::CastingSlot SoFToServerCastingSlot(CastingSlot slot, uint32 itemlocation) - { + static inline EQEmu::CastingSlot SoFToServerCastingSlot(CastingSlot slot, uint32 item_location) { switch (slot) { - case CastingSlot::Gem1: - return EQEmu::CastingSlot::Gem1; - case CastingSlot::Gem2: - return EQEmu::CastingSlot::Gem2; - case CastingSlot::Gem3: - return EQEmu::CastingSlot::Gem3; - case CastingSlot::Gem4: - return EQEmu::CastingSlot::Gem4; - case CastingSlot::Gem5: - return EQEmu::CastingSlot::Gem5; - case CastingSlot::Gem6: - return EQEmu::CastingSlot::Gem6; - case CastingSlot::Gem7: - return EQEmu::CastingSlot::Gem7; - case CastingSlot::Gem8: - return EQEmu::CastingSlot::Gem8; - case CastingSlot::Gem9: - return EQEmu::CastingSlot::Gem9; - case CastingSlot::Ability: - return EQEmu::CastingSlot::Ability; - // Tit uses 10 for item and discipline casting, but items have a valid location - case CastingSlot::Item: - if (itemlocation == INVALID_INDEX) + case CastingSlot::Gem1: + return EQEmu::CastingSlot::Gem1; + case CastingSlot::Gem2: + return EQEmu::CastingSlot::Gem2; + case CastingSlot::Gem3: + return EQEmu::CastingSlot::Gem3; + case CastingSlot::Gem4: + return EQEmu::CastingSlot::Gem4; + case CastingSlot::Gem5: + return EQEmu::CastingSlot::Gem5; + case CastingSlot::Gem6: + return EQEmu::CastingSlot::Gem6; + case CastingSlot::Gem7: + return EQEmu::CastingSlot::Gem7; + case CastingSlot::Gem8: + return EQEmu::CastingSlot::Gem8; + case CastingSlot::Gem9: + return EQEmu::CastingSlot::Gem9; + case CastingSlot::Ability: + return EQEmu::CastingSlot::Ability; + // Tit uses 10 for item and discipline casting, but items have a valid location + case CastingSlot::Item: + if (item_location == INVALID_INDEX) + return EQEmu::CastingSlot::Discipline; + else + return EQEmu::CastingSlot::Item; + case CastingSlot::PotionBelt: + return EQEmu::CastingSlot::PotionBelt; + case CastingSlot::AltAbility: + return EQEmu::CastingSlot::AltAbility; + default: // we shouldn't have any issues with other slots ... just return something return EQEmu::CastingSlot::Discipline; - else - return EQEmu::CastingSlot::Item; - case CastingSlot::PotionBelt: - return EQEmu::CastingSlot::PotionBelt; - case CastingSlot::AltAbility: - return EQEmu::CastingSlot::AltAbility; - default: // we shouldn't have any issues with other slots ... just return something - return EQEmu::CastingSlot::Discipline; } } - static inline int ServerToSoFBuffSlot(int index) - { + static inline int ServerToSoFBuffSlot(int index) { // we're a disc if (index >= EQEmu::constants::LongBuffs + EQEmu::constants::ShortBuffs) return index - EQEmu::constants::LongBuffs - EQEmu::constants::ShortBuffs + - constants::LongBuffs + constants::ShortBuffs; + constants::LongBuffs + constants::ShortBuffs; // we're a song if (index >= EQEmu::constants::LongBuffs) return index - EQEmu::constants::LongBuffs + constants::LongBuffs; @@ -3502,4 +3505,4 @@ namespace SoF // we're a normal buff return index; // as long as we guard against bad slots server side, we should be fine } -} /*SoF*/ +} \ No newline at end of file diff --git a/common/patches/titanium.cpp b/common/patches/titanium.cpp index d6f2516b2..85aea5a82 100644 --- a/common/patches/titanium.cpp +++ b/common/patches/titanium.cpp @@ -45,21 +45,21 @@ namespace Titanium void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id_in, uint8 depth); // server to client inventory location converters - static inline int16 ServerToTitaniumSlot(uint32 serverSlot); - static inline int16 ServerToTitaniumCorpseSlot(uint32 serverCorpseSlot); + static inline int16 ServerToTitaniumSlot(uint32 server_slot); + static inline int16 ServerToTitaniumCorpseSlot(uint32 server_corpse_slot); // client to server inventory location converters - static inline uint32 TitaniumToServerSlot(int16 titaniumSlot); - static inline uint32 TitaniumToServerCorpseSlot(int16 titaniumCorpseSlot); + static inline uint32 TitaniumToServerSlot(int16 titanium_slot); + static inline uint32 TitaniumToServerCorpseSlot(int16 titanium_corpse_slot); // server to client say link converter - static inline void ServerToTitaniumSayLink(std::string& titaniumSayLink, const std::string& serverSayLink); + static inline void ServerToTitaniumSayLink(std::string &titanium_saylink, const std::string &server_saylink); // client to server say link converter - static inline void TitaniumToServerSayLink(std::string& serverSayLink, const std::string& titaniumSayLink); + static inline void TitaniumToServerSayLink(std::string &server_saylink, const std::string &titanium_saylink); static inline CastingSlot ServerToTitaniumCastingSlot(EQEmu::CastingSlot slot); - static inline EQEmu::CastingSlot TitaniumToServerCastingSlot(CastingSlot slot, uint32 itemlocation); + static inline EQEmu::CastingSlot TitaniumToServerCastingSlot(CastingSlot slot, uint32 item_location); static inline int ServerToTitaniumBuffSlot(int index); static inline int TitaniumToServerBuffSlot(int index); @@ -2225,13 +2225,16 @@ namespace Titanium } // file scope helper methods - void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id_in, uint8 depth) - { - const char* protection = "\\\\\\\\\\"; - const EQEmu::ItemData* item = inst->GetUnscaledItem(); + void SerializeItem(EQEmu::OutBuffer& ob, const EQEmu::ItemInstance *inst, int16 slot_id_in, uint8 depth) { + const char *protection = "\\\\\\\\\\"; + const EQEmu::ItemData *item = inst->GetUnscaledItem(); + + ob << StringFormat( + "%.*s%s", + (depth ? (depth - 1) : 0), + protection, + (depth ? "\"" : "")); // For leading quotes (and protection) if a subitem; - ob << StringFormat("%.*s%s", (depth ? (depth - 1) : 0), protection, (depth ? "\"" : "")); // For leading quotes (and protection) if a subitem; - // Instance data ob << itoa((inst->IsStackable() ? inst->GetCharges() : 0)); // stack count ob << '|' << itoa(0); // unknown @@ -2239,9 +2242,11 @@ namespace Titanium ob << '|' << itoa(inst->GetPrice()); // merchant price ob << '|' << itoa((!inst->GetMerchantSlot() ? 1 : inst->GetMerchantCount())); // inst count/merchant count ob << '|' << itoa((inst->IsScaling() ? (inst->GetExp() / 100) : 0)); // inst experience - ob << '|' << itoa((!inst->GetMerchantSlot() ? inst->GetSerialNumber() : inst->GetMerchantSlot())); // merchant serial number + ob << '|' << itoa((!inst->GetMerchantSlot() ? inst->GetSerialNumber() + : inst->GetMerchantSlot())); // merchant serial number ob << '|' << itoa(inst->GetRecastTimestamp()); // recast timestamp - ob << '|' << itoa(((inst->IsStackable() ? ((inst->GetItem()->ItemType == EQEmu::item::ItemTypePotion) ? 1 : 0) : inst->GetCharges()))); // charge count + ob << '|' << itoa(((inst->IsStackable() ? ((inst->GetItem()->ItemType == EQEmu::item::ItemTypePotion) ? 1 : 0) + : inst->GetCharges()))); // charge count ob << '|' << itoa((inst->IsAttuned() ? 1 : 0)); // inst attuned ob << '|' << itoa(0); // unknown ob << '|'; @@ -2449,220 +2454,202 @@ namespace Titanium for (int index = EQEmu::invbag::SLOT_BEGIN; index <= invbag::SLOT_END; ++index) { ob << '|'; - EQEmu::ItemInstance* sub = inst->GetItem(index); + EQEmu::ItemInstance *sub = inst->GetItem(index); if (!sub) continue; - + SerializeItem(ob, sub, 0, (depth + 1)); } - ob << StringFormat("%.*s%s", (depth ? (depth - 1) : 0), protection, (depth ? "\"" : "")); // For trailing quotes (and protection) if a subitem; + ob << StringFormat( + "%.*s%s", + (depth ? (depth - 1) : 0), + protection, + (depth ? "\"" : "")); // For trailing quotes (and protection) if a subitem; if (!depth) ob.write("\0", 1); } - static inline int16 ServerToTitaniumSlot(uint32 serverSlot) - { - int16 TitaniumSlot = invslot::SLOT_INVALID; + static inline int16 ServerToTitaniumSlot(uint32 server_slot) { + int16 titanium_slot = invslot::SLOT_INVALID; - if (serverSlot <= EQEmu::invslot::slotWaist) { - TitaniumSlot = serverSlot; + if (server_slot <= EQEmu::invslot::slotWaist) { + titanium_slot = server_slot; + } + else if (server_slot == EQEmu::invslot::slotAmmo) { + titanium_slot = server_slot - 1; + } + else if (server_slot <= EQEmu::invslot::slotGeneral8 && server_slot >= EQEmu::invslot::slotGeneral1) { + titanium_slot = server_slot - 1; + } + else if (server_slot <= (EQEmu::invslot::POSSESSIONS_COUNT + EQEmu::invslot::slotWaist) && + server_slot >= EQEmu::invslot::slotCursor) { + titanium_slot = server_slot - 3; + } + else if (server_slot == (EQEmu::invslot::POSSESSIONS_COUNT + EQEmu::invslot::slotAmmo)) { + titanium_slot = server_slot - 4; + } + else if (server_slot <= EQEmu::invbag::GENERAL_BAGS_8_END && + server_slot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { + titanium_slot = server_slot; + } + else if (server_slot <= EQEmu::invbag::CURSOR_BAG_END && server_slot >= EQEmu::invbag::CURSOR_BAG_BEGIN) { + titanium_slot = server_slot - 20; + } + else if (server_slot <= EQEmu::invslot::TRIBUTE_END && server_slot >= EQEmu::invslot::TRIBUTE_BEGIN) { + titanium_slot = server_slot; + } + else if (server_slot <= EQEmu::invslot::GUILD_TRIBUTE_END && + server_slot >= EQEmu::invslot::GUILD_TRIBUTE_BEGIN) { + titanium_slot = server_slot; + } + else if (server_slot <= EQEmu::invslot::BANK_END && server_slot >= EQEmu::invslot::BANK_BEGIN) { + titanium_slot = server_slot; + } + else if (server_slot <= EQEmu::invbag::BANK_BAGS_16_END && server_slot >= EQEmu::invbag::BANK_BAGS_BEGIN) { + titanium_slot = server_slot; + } + else if (server_slot <= EQEmu::invslot::SHARED_BANK_END && server_slot >= EQEmu::invslot::SHARED_BANK_BEGIN) { + titanium_slot = server_slot; + } + else if (server_slot <= EQEmu::invbag::SHARED_BANK_BAGS_END && + server_slot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN) { + titanium_slot = server_slot; + } + else if (server_slot <= EQEmu::invslot::TRADE_END && server_slot >= EQEmu::invslot::TRADE_BEGIN) { + titanium_slot = server_slot; + } + else if (server_slot <= EQEmu::invbag::TRADE_BAGS_END && server_slot >= EQEmu::invbag::TRADE_BAGS_BEGIN) { + titanium_slot = server_slot; + } + else if (server_slot <= EQEmu::invslot::WORLD_END && server_slot >= EQEmu::invslot::WORLD_BEGIN) { + titanium_slot = server_slot; } - else if (serverSlot == EQEmu::invslot::slotAmmo) { - TitaniumSlot = serverSlot - 1; - } + Log(Logs::Detail, Logs::Netcode, "Convert Server Slot %i to Titanium Slot %i", server_slot, titanium_slot); - else if (serverSlot <= EQEmu::invslot::slotGeneral8 && serverSlot >= EQEmu::invslot::slotGeneral1) { - TitaniumSlot = serverSlot - 1; - } - - else if (serverSlot <= (EQEmu::invslot::POSSESSIONS_COUNT + EQEmu::invslot::slotWaist) && serverSlot >= EQEmu::invslot::slotCursor) { - TitaniumSlot = serverSlot - 3; - } - - else if (serverSlot == (EQEmu::invslot::POSSESSIONS_COUNT + EQEmu::invslot::slotAmmo)) { - TitaniumSlot = serverSlot - 4; - } - - else if (serverSlot <= EQEmu::invbag::GENERAL_BAGS_8_END && serverSlot >= EQEmu::invbag::GENERAL_BAGS_BEGIN) { - TitaniumSlot = serverSlot; - } - - else if (serverSlot <= EQEmu::invbag::CURSOR_BAG_END && serverSlot >= EQEmu::invbag::CURSOR_BAG_BEGIN) { - TitaniumSlot = serverSlot - 20; - } - - else if (serverSlot <= EQEmu::invslot::TRIBUTE_END && serverSlot >= EQEmu::invslot::TRIBUTE_BEGIN) { - TitaniumSlot = serverSlot; - } - - else if (serverSlot <= EQEmu::invslot::GUILD_TRIBUTE_END && serverSlot >= EQEmu::invslot::GUILD_TRIBUTE_BEGIN) { - TitaniumSlot = serverSlot; - } - - else if (serverSlot <= EQEmu::invslot::BANK_END && serverSlot >= EQEmu::invslot::BANK_BEGIN) { - TitaniumSlot = serverSlot; - } - - else if (serverSlot <= EQEmu::invbag::BANK_BAGS_16_END && serverSlot >= EQEmu::invbag::BANK_BAGS_BEGIN) { - TitaniumSlot = serverSlot; - } - - else if (serverSlot <= EQEmu::invslot::SHARED_BANK_END && serverSlot >= EQEmu::invslot::SHARED_BANK_BEGIN) { - TitaniumSlot = serverSlot; - } - - else if (serverSlot <= EQEmu::invbag::SHARED_BANK_BAGS_END && serverSlot >= EQEmu::invbag::SHARED_BANK_BAGS_BEGIN) { - TitaniumSlot = serverSlot; - } - - else if (serverSlot <= EQEmu::invslot::TRADE_END && serverSlot >= EQEmu::invslot::TRADE_BEGIN) { - TitaniumSlot = serverSlot; - } - - else if (serverSlot <= EQEmu::invbag::TRADE_BAGS_END && serverSlot >= EQEmu::invbag::TRADE_BAGS_BEGIN) { - TitaniumSlot = serverSlot; - } - - else if (serverSlot <= EQEmu::invslot::WORLD_END && serverSlot >= EQEmu::invslot::WORLD_BEGIN) { - TitaniumSlot = serverSlot; - } - - Log(Logs::Detail, Logs::Netcode, "Convert Server Slot %i to Titanium Slot %i", serverSlot, TitaniumSlot); - - return TitaniumSlot; + return titanium_slot; } - static inline int16 ServerToTitaniumCorpseSlot(uint32 serverCorpseSlot) - { - int16 TitaniumSlot = invslot::SLOT_INVALID; - if (serverCorpseSlot <= EQEmu::invslot::slotGeneral8 && serverCorpseSlot >= EQEmu::invslot::slotGeneral1) { - TitaniumSlot = serverCorpseSlot - 1; + static inline int16 ServerToTitaniumCorpseSlot(uint32 server_corpse_slot) { + int16 titanium_slot = invslot::SLOT_INVALID; + + if (server_corpse_slot <= EQEmu::invslot::slotGeneral8 && server_corpse_slot >= EQEmu::invslot::slotGeneral1) { + titanium_slot = server_corpse_slot - 1; } - else if (serverCorpseSlot <= (EQEmu::invslot::POSSESSIONS_COUNT + EQEmu::invslot::slotWaist) && serverCorpseSlot >= EQEmu::invslot::slotCursor) { - TitaniumSlot = serverCorpseSlot - 3; + else if (server_corpse_slot <= (EQEmu::invslot::POSSESSIONS_COUNT + EQEmu::invslot::slotWaist) && + server_corpse_slot >= EQEmu::invslot::slotCursor) { + titanium_slot = server_corpse_slot - 3; } - else if (serverCorpseSlot == (EQEmu::invslot::POSSESSIONS_COUNT + EQEmu::invslot::slotAmmo)) { - TitaniumSlot = serverCorpseSlot - 4; + else if (server_corpse_slot == (EQEmu::invslot::POSSESSIONS_COUNT + EQEmu::invslot::slotAmmo)) { + titanium_slot = server_corpse_slot - 4; } - Log(Logs::Detail, Logs::Netcode, "Convert Server Corpse Slot %i to Titanium Corpse Slot %i", serverCorpseSlot, TitaniumSlot); + Log(Logs::Detail, + Logs::Netcode, + "Convert Server Corpse Slot %i to Titanium Corpse Slot %i", + server_corpse_slot, + titanium_slot); - return TitaniumSlot; + return titanium_slot; } - static inline uint32 TitaniumToServerSlot(int16 titaniumSlot) - { - uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; + static inline uint32 TitaniumToServerSlot(int16 titanium_slot) { + uint32 server_slot = EQEmu::invslot::SLOT_INVALID; - if (titaniumSlot <= invslot::slotWaist) { - ServerSlot = titaniumSlot; + if (titanium_slot <= invslot::slotWaist) { + server_slot = titanium_slot; + } + else if (titanium_slot == invslot::slotAmmo) { + server_slot = titanium_slot + 1; + } + else if (titanium_slot <= invslot::slotGeneral8 && titanium_slot >= invslot::slotGeneral1) { + server_slot = titanium_slot + 1; + } + else if (titanium_slot <= (invslot::POSSESSIONS_COUNT + invslot::slotWaist) && + titanium_slot >= invslot::slotCursor) { + server_slot = titanium_slot + 3; + } + else if (titanium_slot == (invslot::POSSESSIONS_COUNT + invslot::slotAmmo)) { + server_slot = titanium_slot + 4; + } + else if (titanium_slot <= invbag::GENERAL_BAGS_END && titanium_slot >= invbag::GENERAL_BAGS_BEGIN) { + server_slot = titanium_slot; + } + else if (titanium_slot <= invbag::CURSOR_BAG_END && titanium_slot >= invbag::CURSOR_BAG_BEGIN) { + server_slot = titanium_slot + 20; + } + else if (titanium_slot <= invslot::TRIBUTE_END && titanium_slot >= invslot::TRIBUTE_BEGIN) { + server_slot = titanium_slot; + } + else if (titanium_slot <= invslot::GUILD_TRIBUTE_END && titanium_slot >= invslot::GUILD_TRIBUTE_BEGIN) { + server_slot = titanium_slot; + } + else if (titanium_slot <= invslot::BANK_END && titanium_slot >= invslot::BANK_BEGIN) { + server_slot = titanium_slot; + } + else if (titanium_slot <= invbag::BANK_BAGS_END && titanium_slot >= invbag::BANK_BAGS_BEGIN) { + server_slot = titanium_slot; + } + else if (titanium_slot <= invslot::SHARED_BANK_END && titanium_slot >= invslot::SHARED_BANK_BEGIN) { + server_slot = titanium_slot; + } + else if (titanium_slot <= invbag::SHARED_BANK_BAGS_END && titanium_slot >= invbag::SHARED_BANK_BAGS_BEGIN) { + server_slot = titanium_slot; + } + else if (titanium_slot <= invslot::TRADE_END && titanium_slot >= invslot::TRADE_BEGIN) { + server_slot = titanium_slot; + } + else if (titanium_slot <= invbag::TRADE_BAGS_END && titanium_slot >= invbag::TRADE_BAGS_BEGIN) { + server_slot = titanium_slot; + } + else if (titanium_slot <= invslot::WORLD_END && titanium_slot >= invslot::WORLD_BEGIN) { + server_slot = titanium_slot; } - else if (titaniumSlot == invslot::slotAmmo) { - ServerSlot = titaniumSlot + 1; - } + Log(Logs::Detail, Logs::Netcode, "Convert Titanium Slot %i to Server Slot %i", titanium_slot, server_slot); - else if (titaniumSlot <= invslot::slotGeneral8 && titaniumSlot >= invslot::slotGeneral1) { - ServerSlot = titaniumSlot + 1; - } - - else if (titaniumSlot <= (invslot::POSSESSIONS_COUNT + invslot::slotWaist) && titaniumSlot >= invslot::slotCursor) { - ServerSlot = titaniumSlot + 3; - } - - else if (titaniumSlot == (invslot::POSSESSIONS_COUNT + invslot::slotAmmo)) { - ServerSlot = titaniumSlot + 4; - } - - else if (titaniumSlot <= invbag::GENERAL_BAGS_END && titaniumSlot >= invbag::GENERAL_BAGS_BEGIN) { - ServerSlot = titaniumSlot; - } - - else if (titaniumSlot <= invbag::CURSOR_BAG_END && titaniumSlot >= invbag::CURSOR_BAG_BEGIN) { - ServerSlot = titaniumSlot + 20; - } - - else if (titaniumSlot <= invslot::TRIBUTE_END && titaniumSlot >= invslot::TRIBUTE_BEGIN) { - ServerSlot = titaniumSlot; - } - - else if (titaniumSlot <= invslot::GUILD_TRIBUTE_END && titaniumSlot >= invslot::GUILD_TRIBUTE_BEGIN) { - ServerSlot = titaniumSlot; - } - - else if (titaniumSlot <= invslot::BANK_END && titaniumSlot >= invslot::BANK_BEGIN) { - ServerSlot = titaniumSlot; - } - - else if (titaniumSlot <= invbag::BANK_BAGS_END && titaniumSlot >= invbag::BANK_BAGS_BEGIN) { - ServerSlot = titaniumSlot; - } - - else if (titaniumSlot <= invslot::SHARED_BANK_END && titaniumSlot >= invslot::SHARED_BANK_BEGIN) { - ServerSlot = titaniumSlot; - } - - else if (titaniumSlot <= invbag::SHARED_BANK_BAGS_END && titaniumSlot >= invbag::SHARED_BANK_BAGS_BEGIN) { - ServerSlot = titaniumSlot; - } - - else if (titaniumSlot <= invslot::TRADE_END && titaniumSlot >= invslot::TRADE_BEGIN) { - ServerSlot = titaniumSlot; - } - - else if (titaniumSlot <= invbag::TRADE_BAGS_END && titaniumSlot >= invbag::TRADE_BAGS_BEGIN) { - ServerSlot = titaniumSlot; - } - - else if (titaniumSlot <= invslot::WORLD_END && titaniumSlot >= invslot::WORLD_BEGIN) { - ServerSlot = titaniumSlot; - } - - Log(Logs::Detail, Logs::Netcode, "Convert Titanium Slot %i to Server Slot %i", titaniumSlot, ServerSlot); - - return ServerSlot; + return server_slot; } - static inline uint32 TitaniumToServerCorpseSlot(int16 titaniumCorpseSlot) + static inline uint32 TitaniumToServerCorpseSlot(int16 titanium_corpse_slot) { - uint32 ServerSlot = EQEmu::invslot::SLOT_INVALID; + uint32 server_slot = EQEmu::invslot::SLOT_INVALID; - if (titaniumCorpseSlot <= invslot::slotGeneral8 && titaniumCorpseSlot >= invslot::slotGeneral1) { - ServerSlot = titaniumCorpseSlot + 1; + if (titanium_corpse_slot <= invslot::slotGeneral8 && titanium_corpse_slot >= invslot::slotGeneral1) { + server_slot = titanium_corpse_slot + 1; } - else if (titaniumCorpseSlot <= (invslot::POSSESSIONS_COUNT + invslot::slotWaist) && titaniumCorpseSlot >= invslot::slotCursor) { - ServerSlot = titaniumCorpseSlot + 3; + else if (titanium_corpse_slot <= (invslot::POSSESSIONS_COUNT + invslot::slotWaist) && titanium_corpse_slot >= invslot::slotCursor) { + server_slot = titanium_corpse_slot + 3; } - else if (titaniumCorpseSlot == (invslot::POSSESSIONS_COUNT + invslot::slotAmmo)) { - ServerSlot = titaniumCorpseSlot + 4; + else if (titanium_corpse_slot == (invslot::POSSESSIONS_COUNT + invslot::slotAmmo)) { + server_slot = titanium_corpse_slot + 4; } - Log(Logs::Detail, Logs::Netcode, "Convert Titanium Corpse Slot %i to Server Corpse Slot %i", titaniumCorpseSlot, ServerSlot); + Log(Logs::Detail, Logs::Netcode, "Convert Titanium Corpse Slot %i to Server Corpse Slot %i", titanium_corpse_slot, server_slot); - return ServerSlot; + return server_slot; } - static inline void ServerToTitaniumSayLink(std::string& titaniumSayLink, const std::string& serverSayLink) + static inline void ServerToTitaniumSayLink(std::string &titanium_saylink, const std::string &server_saylink) { - if ((constants::SAY_LINK_BODY_SIZE == EQEmu::constants::SAY_LINK_BODY_SIZE) || (serverSayLink.find('\x12') == std::string::npos)) { - titaniumSayLink = serverSayLink; + if ((constants::SAY_LINK_BODY_SIZE == EQEmu::constants::SAY_LINK_BODY_SIZE) || (server_saylink.find('\x12') == std::string::npos)) { + titanium_saylink = server_saylink; return; } - auto segments = SplitString(serverSayLink, '\x12'); + auto segments = SplitString(server_saylink, '\x12'); for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { if (segments[segment_iter].length() <= EQEmu::constants::SAY_LINK_BODY_SIZE) { - titaniumSayLink.append(segments[segment_iter]); + titanium_saylink.append(segments[segment_iter]); // TODO: log size mismatch error continue; } @@ -2672,37 +2659,37 @@ namespace Titanium // 6.2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX X XXXXXXXX (45) // Diff: ^^^^^ ^ ^^^^^ - titaniumSayLink.push_back('\x12'); - titaniumSayLink.append(segments[segment_iter].substr(0, 31)); - titaniumSayLink.append(segments[segment_iter].substr(36, 5)); + titanium_saylink.push_back('\x12'); + titanium_saylink.append(segments[segment_iter].substr(0, 31)); + titanium_saylink.append(segments[segment_iter].substr(36, 5)); if (segments[segment_iter][41] == '0') - titaniumSayLink.push_back(segments[segment_iter][42]); + titanium_saylink.push_back(segments[segment_iter][42]); else - titaniumSayLink.push_back('F'); + titanium_saylink.push_back('F'); - titaniumSayLink.append(segments[segment_iter].substr(48)); - titaniumSayLink.push_back('\x12'); + titanium_saylink.append(segments[segment_iter].substr(48)); + titanium_saylink.push_back('\x12'); } else { - titaniumSayLink.append(segments[segment_iter]); + titanium_saylink.append(segments[segment_iter]); } } } - static inline void TitaniumToServerSayLink(std::string& serverSayLink, const std::string& titaniumSayLink) + static inline void TitaniumToServerSayLink(std::string &server_saylink, const std::string &titanium_saylink) { - if ((EQEmu::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (titaniumSayLink.find('\x12') == std::string::npos)) { - serverSayLink = titaniumSayLink; + if ((EQEmu::constants::SAY_LINK_BODY_SIZE == constants::SAY_LINK_BODY_SIZE) || (titanium_saylink.find('\x12') == std::string::npos)) { + server_saylink = titanium_saylink; return; } - auto segments = SplitString(titaniumSayLink, '\x12'); + auto segments = SplitString(titanium_saylink, '\x12'); for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) { if (segment_iter & 1) { if (segments[segment_iter].length() <= constants::SAY_LINK_BODY_SIZE) { - serverSayLink.append(segments[segment_iter]); + server_saylink.append(segments[segment_iter]); // TODO: log size mismatch error continue; } @@ -2712,91 +2699,89 @@ namespace Titanium // RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56) // Diff: ^^^^^ ^ ^^^^^ - serverSayLink.push_back('\x12'); - serverSayLink.append(segments[segment_iter].substr(0, 31)); - serverSayLink.append("00000"); - serverSayLink.append(segments[segment_iter].substr(31, 5)); - serverSayLink.push_back('0'); - serverSayLink.push_back(segments[segment_iter][36]); - serverSayLink.append("00000"); - serverSayLink.append(segments[segment_iter].substr(37)); - serverSayLink.push_back('\x12'); + server_saylink.push_back('\x12'); + server_saylink.append(segments[segment_iter].substr(0, 31)); + server_saylink.append("00000"); + server_saylink.append(segments[segment_iter].substr(31, 5)); + server_saylink.push_back('0'); + server_saylink.push_back(segments[segment_iter][36]); + server_saylink.append("00000"); + server_saylink.append(segments[segment_iter].substr(37)); + server_saylink.push_back('\x12'); } else { - serverSayLink.append(segments[segment_iter]); + server_saylink.append(segments[segment_iter]); } } } - static inline CastingSlot ServerToTitaniumCastingSlot(EQEmu::CastingSlot slot) - { + static inline CastingSlot ServerToTitaniumCastingSlot(EQEmu::CastingSlot slot) { switch (slot) { - case EQEmu::CastingSlot::Gem1: - return CastingSlot::Gem1; - case EQEmu::CastingSlot::Gem2: - return CastingSlot::Gem2; - case EQEmu::CastingSlot::Gem3: - return CastingSlot::Gem3; - case EQEmu::CastingSlot::Gem4: - return CastingSlot::Gem4; - case EQEmu::CastingSlot::Gem5: - return CastingSlot::Gem5; - case EQEmu::CastingSlot::Gem6: - return CastingSlot::Gem6; - case EQEmu::CastingSlot::Gem7: - return CastingSlot::Gem7; - case EQEmu::CastingSlot::Gem8: - return CastingSlot::Gem8; - case EQEmu::CastingSlot::Gem9: - return CastingSlot::Gem9; - case EQEmu::CastingSlot::Item: - return CastingSlot::Item; - case EQEmu::CastingSlot::PotionBelt: - return CastingSlot::PotionBelt; - case EQEmu::CastingSlot::Discipline: - return CastingSlot::Discipline; - case EQEmu::CastingSlot::AltAbility: - return CastingSlot::AltAbility; - default: // we shouldn't have any issues with other slots ... just return something - return CastingSlot::Discipline; + case EQEmu::CastingSlot::Gem1: + return CastingSlot::Gem1; + case EQEmu::CastingSlot::Gem2: + return CastingSlot::Gem2; + case EQEmu::CastingSlot::Gem3: + return CastingSlot::Gem3; + case EQEmu::CastingSlot::Gem4: + return CastingSlot::Gem4; + case EQEmu::CastingSlot::Gem5: + return CastingSlot::Gem5; + case EQEmu::CastingSlot::Gem6: + return CastingSlot::Gem6; + case EQEmu::CastingSlot::Gem7: + return CastingSlot::Gem7; + case EQEmu::CastingSlot::Gem8: + return CastingSlot::Gem8; + case EQEmu::CastingSlot::Gem9: + return CastingSlot::Gem9; + case EQEmu::CastingSlot::Item: + return CastingSlot::Item; + case EQEmu::CastingSlot::PotionBelt: + return CastingSlot::PotionBelt; + case EQEmu::CastingSlot::Discipline: + return CastingSlot::Discipline; + case EQEmu::CastingSlot::AltAbility: + return CastingSlot::AltAbility; + default: // we shouldn't have any issues with other slots ... just return something + return CastingSlot::Discipline; } } - static inline EQEmu::CastingSlot TitaniumToServerCastingSlot(CastingSlot slot, uint32 itemlocation) - { + static inline EQEmu::CastingSlot TitaniumToServerCastingSlot(CastingSlot slot, uint32 item_location) { switch (slot) { - case CastingSlot::Gem1: - return EQEmu::CastingSlot::Gem1; - case CastingSlot::Gem2: - return EQEmu::CastingSlot::Gem2; - case CastingSlot::Gem3: - return EQEmu::CastingSlot::Gem3; - case CastingSlot::Gem4: - return EQEmu::CastingSlot::Gem4; - case CastingSlot::Gem5: - return EQEmu::CastingSlot::Gem5; - case CastingSlot::Gem6: - return EQEmu::CastingSlot::Gem6; - case CastingSlot::Gem7: - return EQEmu::CastingSlot::Gem7; - case CastingSlot::Gem8: - return EQEmu::CastingSlot::Gem8; - case CastingSlot::Gem9: - return EQEmu::CastingSlot::Gem9; - case CastingSlot::Ability: - return EQEmu::CastingSlot::Ability; - // Tit uses 10 for item and discipline casting, but items have a valid location - case CastingSlot::Item: - if (itemlocation == INVALID_INDEX) + case CastingSlot::Gem1: + return EQEmu::CastingSlot::Gem1; + case CastingSlot::Gem2: + return EQEmu::CastingSlot::Gem2; + case CastingSlot::Gem3: + return EQEmu::CastingSlot::Gem3; + case CastingSlot::Gem4: + return EQEmu::CastingSlot::Gem4; + case CastingSlot::Gem5: + return EQEmu::CastingSlot::Gem5; + case CastingSlot::Gem6: + return EQEmu::CastingSlot::Gem6; + case CastingSlot::Gem7: + return EQEmu::CastingSlot::Gem7; + case CastingSlot::Gem8: + return EQEmu::CastingSlot::Gem8; + case CastingSlot::Gem9: + return EQEmu::CastingSlot::Gem9; + case CastingSlot::Ability: + return EQEmu::CastingSlot::Ability; + // Tit uses 10 for item and discipline casting, but items have a valid location + case CastingSlot::Item: + if (item_location == INVALID_INDEX) + return EQEmu::CastingSlot::Discipline; + else + return EQEmu::CastingSlot::Item; + case CastingSlot::PotionBelt: + return EQEmu::CastingSlot::PotionBelt; + case CastingSlot::AltAbility: + return EQEmu::CastingSlot::AltAbility; + default: // we shouldn't have any issues with other slots ... just return something return EQEmu::CastingSlot::Discipline; - else - return EQEmu::CastingSlot::Item; - case CastingSlot::PotionBelt: - return EQEmu::CastingSlot::PotionBelt; - case CastingSlot::AltAbility: - return EQEmu::CastingSlot::AltAbility; - default: // we shouldn't have any issues with other slots ... just return something - return EQEmu::CastingSlot::Discipline; } } diff --git a/zone/lua_inventory.cpp b/zone/lua_inventory.cpp index d29bb435b..dd4e1cc6b 100644 --- a/zone/lua_inventory.cpp +++ b/zone/lua_inventory.cpp @@ -38,10 +38,10 @@ int Lua_Inventory::PushCursor(Lua_ItemInst item) { return self->PushCursor(*inst); } -bool Lua_Inventory::SwapItem(int slot_a, int slot_b) { +bool Lua_Inventory::SwapItem(int source_slot, int destination_slot) { Lua_Safe_Call_Bool(); EQEmu::InventoryProfile::SwapItemFailState fail_state = EQEmu::InventoryProfile::swapInvalid; - return self->SwapItem(slot_a, slot_b, fail_state); + return self->SwapItem(source_slot, destination_slot, fail_state); } bool Lua_Inventory::DeleteItem(int slot_id) { diff --git a/zone/lua_inventory.h b/zone/lua_inventory.h index 1e391b4da..272e142de 100644 --- a/zone/lua_inventory.h +++ b/zone/lua_inventory.h @@ -39,7 +39,7 @@ public: Lua_ItemInst GetItem(int slot_id, int bag_slot); int PutItem(int slot_id, Lua_ItemInst item); int PushCursor(Lua_ItemInst item); - bool SwapItem(int slot_a, int slot_b); + bool SwapItem(int source_slot, int destination_slot); bool DeleteItem(int slot_id); bool DeleteItem(int slot_id, int quantity); bool CheckNoDrop(int slot_id); From 79229235bde9f777d9fc06d7a6b71bc3945bfa51 Mon Sep 17 00:00:00 2001 From: Uleat Date: Sat, 18 Aug 2018 08:10:44 -0400 Subject: [PATCH 348/670] Added 'LootRequestType::GMPeek' to Corpse::LootItem() fail criteria --- zone/corpse.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/corpse.cpp b/zone/corpse.cpp index f52f25dd7..c31a9a5d2 100644 --- a/zone/corpse.cpp +++ b/zone/corpse.cpp @@ -1106,7 +1106,7 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app) Log(Logs::Moderate, Logs::Inventory, "LootItem() LootRequestType %u, Slot %u for %s", loot_request_type, lootitem->slot_id, client->GetName()); - if (loot_request_type == LootRequestType::Forbidden) { + if (loot_request_type < LootRequestType::GMAllowed) { // LootRequestType::Forbidden and LootRequestType::GMPeek client->QueuePacket(app); SendEndLootErrorPacket(client); // unlock corpse for others From 4b6ab34fd9a04cba18dac9d2da6e6d99721c602c Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sat, 18 Aug 2018 18:12:18 -0500 Subject: [PATCH 349/670] Fix, cleanup and simplify the roambox logic and cleanup a bunch of other related code --- common/eqemu_logsys.h | 4 +- zone/entity.cpp | 36 ++-- zone/merc.cpp | 12 +- zone/mob.h | 8 +- zone/mob_ai.cpp | 491 +++++++++++++++++++++--------------------- zone/npc.cpp | 4 +- zone/npc.h | 18 +- zone/spawn2.cpp | 172 ++++++++++----- zone/waypoints.cpp | 130 ++++++----- 9 files changed, 479 insertions(+), 396 deletions(-) diff --git a/common/eqemu_logsys.h b/common/eqemu_logsys.h index a54edc234..b0afa72f2 100644 --- a/common/eqemu_logsys.h +++ b/common/eqemu_logsys.h @@ -90,6 +90,7 @@ enum LogCategory { FixZ, Food, Traps, + NPCRoamBox, MaxCategoryID /* Don't Remove this*/ }; @@ -144,7 +145,8 @@ static const char* LogCategoryName[LogCategory::MaxCategoryID] = { "HP Update", "FixZ", "Food", - "Traps" + "Traps", + "NPC Roam Box" }; } diff --git a/zone/entity.cpp b/zone/entity.cpp index 264b8cfc9..f61acda94 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -3425,52 +3425,54 @@ void EntityList::ProcessMove(Client *c, const glm::vec3& location) } } -void EntityList::ProcessMove(NPC *n, float x, float y, float z) -{ +void EntityList::ProcessMove(NPC *n, float x, float y, float z) { float last_x = n->GetX(); float last_y = n->GetY(); float last_z = n->GetZ(); std::list events; + for (auto iter = area_list.begin(); iter != area_list.end(); ++iter) { - Area& a = (*iter); + + Area &a = (*iter); bool old_in = true; bool new_in = true; if (last_x < a.min_x || last_x > a.max_x || - last_y < a.min_y || last_y > a.max_y || - last_z < a.min_z || last_z > a.max_z) { + last_y < a.min_y || last_y > a.max_y || + last_z < a.min_z || last_z > a.max_z) { old_in = false; } if (x < a.min_x || x > a.max_x || - y < a.min_y || y > a.max_y || - z < a.min_z || z > a.max_z) { + y < a.min_y || y > a.max_y || + z < a.min_z || z > a.max_z) { new_in = false; } if (old_in && !new_in) { //were in but are no longer. quest_proximity_event evt; - evt.event_id = EVENT_LEAVE_AREA; - evt.client = nullptr; - evt.npc = n; - evt.area_id = a.id; + evt.event_id = EVENT_LEAVE_AREA; + evt.client = nullptr; + evt.npc = n; + evt.area_id = a.id; evt.area_type = a.type; events.push_back(evt); - } else if (!old_in && new_in) { + } + else if (!old_in && new_in) { //were not in but now are quest_proximity_event evt; - evt.event_id = EVENT_ENTER_AREA; - evt.client = nullptr; - evt.npc = n; - evt.area_id = a.id; + evt.event_id = EVENT_ENTER_AREA; + evt.client = nullptr; + evt.npc = n; + evt.area_id = a.id; evt.area_type = a.type; events.push_back(evt); } } for (auto iter = events.begin(); iter != events.end(); ++iter) { - quest_proximity_event& evt = (*iter); + quest_proximity_event &evt = (*iter); std::vector args; args.push_back(&evt.area_id); args.push_back(&evt.area_type); diff --git a/zone/merc.cpp b/zone/merc.cpp index 82d66878a..834b96e44 100644 --- a/zone/merc.cpp +++ b/zone/merc.cpp @@ -1481,8 +1481,14 @@ void Merc::AI_Process() { if (RuleB(Mercs, MercsUsePathing) && zone->pathing) { bool WaypointChanged, NodeReached; - glm::vec3 Goal = UpdatePath(GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ(), - GetRunspeed(), WaypointChanged, NodeReached); + glm::vec3 Goal = UpdatePath( + GetTarget()->GetX(), + GetTarget()->GetY(), + GetTarget()->GetZ(), + GetRunspeed(), + WaypointChanged, + NodeReached + ); if (WaypointChanged) tar_ndx = 20; @@ -1588,7 +1594,7 @@ void Merc::AI_Process() { } } - if(IsMoving()) + if (IsMoving()) SendPositionUpdate(); else SendPosition(); diff --git a/zone/mob.h b/zone/mob.h index 422c76cd3..bdfbd31bc 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -981,7 +981,7 @@ public: inline bool CheckAggro(Mob* other) {return hate_list.IsEntOnHateList(other);} float CalculateHeadingToTarget(float in_x, float in_y) { return HeadingAngleToMob(in_x, in_y); } - virtual bool CalculateNewPosition(float x, float y, float z, int speed, bool checkZ = true, bool calcheading = true); + virtual bool CalculateNewPosition(float x, float y, float z, float speed, bool check_z = true, bool calculate_heading = true); float CalculateDistance(float x, float y, float z); float GetGroundZ(float new_x, float new_y, float z_offset=0.0); void SendTo(float new_x, float new_y, float new_z); @@ -989,7 +989,7 @@ public: float GetZOffset() const; float GetDefaultRaceSize() const; void FixZ(int32 z_find_offset = 5); - float GetFixedZ(glm::vec3 position, int32 z_find_offset = 5); + float GetFixedZ(glm::vec3 destination, int32 z_find_offset = 5); void NPCSpecialAttacks(const char* parse, int permtag, bool reset = true, bool remove = false); inline uint32 DontHealMeBefore() const { return pDontHealMeBefore; } @@ -1165,7 +1165,7 @@ protected: int _GetWalkSpeed() const; int _GetRunSpeed() const; int _GetFearSpeed() const; - virtual bool MakeNewPositionAndSendUpdate(float x, float y, float z, int speed, bool checkZ = true, bool calcHeading = true); + virtual bool MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, bool check_z = true, bool calculate_heading = true); virtual bool AI_EngagedCastCheck() { return(false); } virtual bool AI_PursueCastCheck() { return(false); } @@ -1443,7 +1443,7 @@ protected: std::unique_ptr AI_feign_remember_timer; std::unique_ptr AI_check_signal_timer; std::unique_ptr AI_scan_door_open_timer; - uint32 pLastFightingDelayMoving; + uint32 time_until_can_move; HateList hate_list; std::set feign_memory_list; // This is to keep track of mobs we cast faction mod spells on diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index e769bda95..0579fd60d 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -30,6 +30,7 @@ #include "string_ids.h" #include "water_map.h" #include "fastmath.h" +#include "../common/data_verification.h" #include #include @@ -459,8 +460,8 @@ void NPC::AI_Init() roambox_min_x = 0; roambox_min_y = 0; roambox_distance = 0; - roambox_movingto_x = 0; - roambox_movingto_y = 0; + roambox_destination_x = 0; + roambox_destination_y = 0; roambox_min_delay = 2500; roambox_delay = 2500; } @@ -476,9 +477,9 @@ void Mob::AI_Start(uint32 iMoveDelay) { return; if (iMoveDelay) - pLastFightingDelayMoving = Timer::GetCurrentTime() + iMoveDelay; + time_until_can_move = Timer::GetCurrentTime() + iMoveDelay; else - pLastFightingDelayMoving = 0; + time_until_can_move = 0; pAIControlled = true; AI_think_timer = std::unique_ptr(new Timer(AIthink_duration)); @@ -1053,7 +1054,7 @@ void Mob::AI_Process() { if (IsCasting()) return; - bool engaged = IsEngaged(); + bool engaged = IsEngaged(); bool doranged = false; if (!zone->CanDoCombat() || IsPetStop() || IsPetRegroup()) { @@ -1063,7 +1064,7 @@ void Mob::AI_Process() { if (moving) { if (AI_scan_door_open_timer->Check()) { - auto &door_list = entity_list.GetDoorsList(); + auto &door_list = entity_list.GetDoorsList(); for (auto itr : door_list) { Doors *door = itr.second; @@ -1096,39 +1097,46 @@ void Mob::AI_Process() { // Begin: Additions for Wiz Fear Code // - if(RuleB(Combat, EnableFearPathing)){ - if(currently_fleeing) { - if((IsRooted() || (IsBlind() && CombatRange(hate_list.GetClosestEntOnHateList(this)))) && !IsPetStop() && !IsPetRegroup()) { + if (RuleB(Combat, EnableFearPathing)) { + if (currently_fleeing) { + if ((IsRooted() || (IsBlind() && CombatRange(hate_list.GetClosestEntOnHateList(this)))) && !IsPetStop() && + !IsPetRegroup()) { //make sure everybody knows were not moving, for appearance sake - if(IsMoving()) - { - if(target) + if (IsMoving()) { + if (target) SetHeading(CalculateHeadingToTarget(target->GetX(), target->GetY())); SetCurrentSpeed(0); - moved=false; + moved = false; } //continue on to attack code, ensuring that we execute the engaged code engaged = true; - } else { - if(AI_movement_timer->Check()) { + } + else { + if (AI_movement_timer->Check()) { // Check if we have reached the last fear point if ((std::abs(GetX() - m_FearWalkTarget.x) < 0.1) && - (std::abs(GetY() - m_FearWalkTarget.y) < 0.1)) { + (std::abs(GetY() - m_FearWalkTarget.y) < 0.1)) { // Calculate a new point to run to CalculateNewFearpoint(); } - if(!RuleB(Pathing, Fear) || !zone->pathing) - { - CalculateNewPosition(m_FearWalkTarget.x, m_FearWalkTarget.y, m_FearWalkTarget.z, GetFearSpeed(), true); + if (!RuleB(Pathing, Fear) || !zone->pathing) { + CalculateNewPosition( + m_FearWalkTarget.x, + m_FearWalkTarget.y, + m_FearWalkTarget.z, + GetFearSpeed(), + true + ); } - else - { + else { bool WaypointChanged, NodeReached; - glm::vec3 Goal = UpdatePath(m_FearWalkTarget.x, m_FearWalkTarget.y, m_FearWalkTarget.z, - GetFearSpeed(), WaypointChanged, NodeReached); + glm::vec3 Goal = UpdatePath( + m_FearWalkTarget.x, m_FearWalkTarget.y, m_FearWalkTarget.z, + GetFearSpeed(), WaypointChanged, NodeReached + ); - if(WaypointChanged) + if (WaypointChanged) tar_ndx = 20; CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetFearSpeed()); @@ -1154,7 +1162,7 @@ void Mob::AI_Process() { this->FixZ(); if (target_distance <= 15 && !this->CheckLosFN(this->GetTarget())) { - Mob* target = this->GetTarget(); + Mob *target = this->GetTarget(); m_Position.x = target->GetX(); m_Position.y = target->GetY(); @@ -1183,10 +1191,8 @@ void Mob::AI_Process() { // from above, so no extra blind checks needed if ((IsRooted() && !GetSpecialAbility(IGNORE_ROOT_AGGRO_RULES)) || IsBlind()) SetTarget(hate_list.GetClosestEntOnHateList(this)); - else - { - if (AI_target_check_timer->Check()) - { + else { + if (AI_target_check_timer->Check()) { if (IsFocused()) { if (!target) { SetTarget(hate_list.GetEntWithMostHateOnList(this)); @@ -1248,21 +1254,16 @@ void Mob::AI_Process() { bool is_combat_range = CombatRange(target); - if (is_combat_range) - { - if (AI_movement_timer->Check()) - { - if (CalculateHeadingToTarget(GetTarget()->GetX(), GetTarget()->GetY()) != m_Position.w) - { + if (is_combat_range) { + if (AI_movement_timer->Check()) { + if (CalculateHeadingToTarget(GetTarget()->GetX(), GetTarget()->GetY()) != m_Position.w) { SetHeading(CalculateHeadingToTarget(GetTarget()->GetX(), GetTarget()->GetY())); SendPosition(); } SetCurrentSpeed(0); } - if (IsMoving()) - { - if (CalculateHeadingToTarget(GetTarget()->GetX(), GetTarget()->GetY()) != m_Position.w) - { + if (IsMoving()) { + if (CalculateHeadingToTarget(GetTarget()->GetX(), GetTarget()->GetY()) != m_Position.w) { SetHeading(CalculateHeadingToTarget(GetTarget()->GetX(), GetTarget()->GetY())); SendPosition(); } @@ -1287,7 +1288,7 @@ void Mob::AI_Process() { if (zone->random.Roll(flurry_chance)) { ExtraAttackOptions opts; - int cur = GetSpecialAbilityParam(SPECATK_FLURRY, 2); + int cur = GetSpecialAbilityParam(SPECATK_FLURRY, 2); if (cur > 0) opts.damage_percent = cur / 100.0f; @@ -1322,7 +1323,7 @@ void Mob::AI_Process() { if (owner) { int16 flurry_chance = owner->aabonuses.PetFlurry + - owner->spellbonuses.PetFlurry + owner->itembonuses.PetFlurry; + owner->spellbonuses.PetFlurry + owner->itembonuses.PetFlurry; if (flurry_chance && zone->random.Roll(flurry_chance)) Flurry(nullptr); @@ -1330,21 +1331,22 @@ void Mob::AI_Process() { } if ((IsPet() || IsTempPet()) && IsPetOwnerClient()) { - if (spellbonuses.PC_Pet_Rampage[0] || itembonuses.PC_Pet_Rampage[0] || aabonuses.PC_Pet_Rampage[0]) { - int chance = spellbonuses.PC_Pet_Rampage[0] + itembonuses.PC_Pet_Rampage[0] + aabonuses.PC_Pet_Rampage[0]; + if (spellbonuses.PC_Pet_Rampage[0] || itembonuses.PC_Pet_Rampage[0] || + aabonuses.PC_Pet_Rampage[0]) { + int chance = spellbonuses.PC_Pet_Rampage[0] + itembonuses.PC_Pet_Rampage[0] + + aabonuses.PC_Pet_Rampage[0]; if (zone->random.Roll(chance)) { Rampage(nullptr); } } } - if (GetSpecialAbility(SPECATK_RAMPAGE) && !specialed) - { + if (GetSpecialAbility(SPECATK_RAMPAGE) && !specialed) { int rampage_chance = GetSpecialAbilityParam(SPECATK_RAMPAGE, 0); rampage_chance = rampage_chance > 0 ? rampage_chance : 20; if (zone->random.Roll(rampage_chance)) { ExtraAttackOptions opts; - int cur = GetSpecialAbilityParam(SPECATK_RAMPAGE, 3); + int cur = GetSpecialAbilityParam(SPECATK_RAMPAGE, 3); if (cur > 0) { opts.damage_flat = cur; } @@ -1373,13 +1375,12 @@ void Mob::AI_Process() { } } - if (GetSpecialAbility(SPECATK_AREA_RAMPAGE) && !specialed) - { + if (GetSpecialAbility(SPECATK_AREA_RAMPAGE) && !specialed) { int rampage_chance = GetSpecialAbilityParam(SPECATK_AREA_RAMPAGE, 0); rampage_chance = rampage_chance > 0 ? rampage_chance : 20; if (zone->random.Roll(rampage_chance)) { ExtraAttackOptions opts; - int cur = GetSpecialAbilityParam(SPECATK_AREA_RAMPAGE, 3); + int cur = GetSpecialAbilityParam(SPECATK_AREA_RAMPAGE, 3); if (cur > 0) { opts.damage_flat = cur; } @@ -1421,7 +1422,7 @@ void Mob::AI_Process() { } AI_EngagedCastCheck(); - } //end is within combat rangepet + } //end is within combat rangepet else { //we cannot reach our target... //underwater stuff only works with water maps in the zone! @@ -1434,7 +1435,7 @@ void Mob::AI_Process() { Heal(); BuffFadeAll(); AI_walking_timer->Start(100); - pLastFightingDelayMoving = Timer::GetCurrentTime(); + time_until_can_move = Timer::GetCurrentTime(); return; } else if (tar != nullptr) { @@ -1445,8 +1446,7 @@ void Mob::AI_Process() { } // See if we can summon the mob to us - if (!HateSummon()) - { + if (!HateSummon()) { //could not summon them, check ranged... if (GetSpecialAbility(SPECATK_RANGED_ATK)) doranged = true; @@ -1456,18 +1456,18 @@ void Mob::AI_Process() { if (AI_PursueCastCheck()) { //we did something, so do not process movement. } - else if (AI_movement_timer->Check() && target) - { + else if (AI_movement_timer->Check() && target) { if (!IsRooted()) { Log(Logs::Detail, Logs::AI, "Pursuing %s while engaged.", target->GetName()); if (!RuleB(Pathing, Aggro) || !zone->pathing) CalculateNewPosition(target->GetX(), target->GetY(), target->GetZ(), GetRunspeed()); - else - { + else { bool WaypointChanged, NodeReached; - glm::vec3 Goal = UpdatePath(target->GetX(), target->GetY(), target->GetZ(), - GetRunspeed(), WaypointChanged, NodeReached); + glm::vec3 Goal = UpdatePath( + target->GetX(), target->GetY(), target->GetZ(), + GetRunspeed(), WaypointChanged, NodeReached + ); if (WaypointChanged) tar_ndx = 20; @@ -1492,69 +1492,64 @@ void Mob::AI_Process() { if (IsPetStop()) // pet stop won't be engaged, so we will always get here and we want the above branch to execute return; - if(zone->CanDoCombat() && AI_feign_remember_timer->Check()) { + if (zone->CanDoCombat() && AI_feign_remember_timer->Check()) { // 6/14/06 // Improved Feign Death Memory // check to see if any of our previous feigned targets have gotten up. std::set::iterator RememberedCharID; RememberedCharID = feign_memory_list.begin(); while (RememberedCharID != feign_memory_list.end()) { - Client* remember_client = entity_list.GetClientByCharID(*RememberedCharID); + Client *remember_client = entity_list.GetClientByCharID(*RememberedCharID); if (remember_client == nullptr) { //they are gone now... RememberedCharID = feign_memory_list.erase(RememberedCharID); - } else if (!remember_client->GetFeigned()) { - AddToHateList(remember_client->CastToMob(),1); + } + else if (!remember_client->GetFeigned()) { + AddToHateList(remember_client->CastToMob(), 1); RememberedCharID = feign_memory_list.erase(RememberedCharID); break; - } else { + } + else { //they are still feigned, carry on... ++RememberedCharID; } } } - if (AI_IdleCastCheck()) - { + if (AI_IdleCastCheck()) { //we processed a spell action, so do nothing else. } - else if (zone->CanDoCombat() && CastToNPC()->WillAggroNPCs() && AI_scan_area_timer->Check()) - { + else if (zone->CanDoCombat() && CastToNPC()->WillAggroNPCs() && AI_scan_area_timer->Check()) { + /* * NPC to NPC aggro checking, npc needs npc_aggro flag */ - - Mob* temp_target = entity_list.AICheckNPCtoNPCAggro(this, GetAggroRange(), GetAssistRange()); - if (temp_target){ + Mob *temp_target = entity_list.AICheckNPCtoNPCAggro(this, GetAggroRange(), GetAssistRange()); + if (temp_target) { AddToHateList(temp_target); } AI_scan_area_timer->Disable(); - AI_scan_area_timer->Start(RandomTimer(RuleI(NPC, NPCToNPCAggroTimerMin), RuleI(NPC, NPCToNPCAggroTimerMax)), false); + AI_scan_area_timer->Start( + RandomTimer(RuleI(NPC, NPCToNPCAggroTimerMin), RuleI(NPC, NPCToNPCAggroTimerMax)), + false + ); } - else if (AI_movement_timer->Check() && !IsRooted()) - { - if (IsPet()) - { + else if (AI_movement_timer->Check() && !IsRooted()) { + if (IsPet()) { // we're a pet, do as we're told - switch (pStandingPetOrder) - { - case SPO_Follow: - { + switch (pStandingPetOrder) { + case SPO_Follow: { - Mob* owner = GetOwner(); - if(owner == nullptr) + Mob *owner = GetOwner(); + if (owner == nullptr) break; - //if(owner->IsClient()) - // printf("Pet start pos: (%f, %f, %f)\n", GetX(), GetY(), GetZ()); - glm::vec4 ownerPos = owner->GetPosition(); - float dist = DistanceSquared(m_Position, ownerPos); - float distz = ownerPos.z - m_Position.z; + float dist = DistanceSquared(m_Position, ownerPos); + float distz = ownerPos.z - m_Position.z; - if (dist >= 400 || distz > 100) - { + if (dist >= 400 || distz > 100) { int speed = GetWalkspeed(); if (dist >= 1225) // 35 speed = GetRunspeed(); @@ -1565,46 +1560,27 @@ void Mob::AI_Process() { SendPositionUpdate(); moved = true; } - else - { - CalculateNewPosition(owner->GetX(), owner->GetY(), owner->GetZ(), speed); + else { + CalculateNewPosition(owner->GetX(), owner->GetY(), owner->GetZ(), speed); } } - else - { - if(moved) - { + else { + if (moved) { this->FixZ(); SetCurrentSpeed(0); moved = false; } } - /* - //fix up Z - float zdiff = GetZ() - owner->GetZ(); - if(zdiff < 0) - zdiff = 0 - zdiff; - if(zdiff > 2.0f) { - SendTo(GetX(), GetY(), owner->GetZ()); - SendPosition(); - } - - if(owner->IsClient()) - printf("Pet pos: (%f, %f, %f)\n", GetX(), GetY(), GetZ()); - */ - break; } - case SPO_Sit: - { + case SPO_Sit: { SetAppearance(eaSitting, false); break; } - case SPO_Guard: - { + case SPO_Guard: { //only NPCs can guard stuff. (forced by where the guard movement code is in the AI) - if(IsNPC()) { + if (IsNPC()) { CastToNPC()->NextGuardPosition(); } break; @@ -1613,25 +1589,23 @@ void Mob::AI_Process() { if (IsPetRegroup()) return; } - /* Entity has been assigned another entity to follow */ - else if (GetFollowID()) - { - Mob* follow = entity_list.GetMob(GetFollowID()); - if (!follow) SetFollowID(0); - else - { - float dist2 = DistanceSquared(m_Position, follow->GetPosition()); - int followdist = GetFollowDistance(); + /* Entity has been assigned another entity to follow */ + else if (GetFollowID()) { + Mob *follow = entity_list.GetMob(GetFollowID()); + if (!follow) { SetFollowID(0); } + else { + float dist2 = DistanceSquared(m_Position, follow->GetPosition()); + int followdist = GetFollowDistance(); - if (dist2 >= followdist) // Default follow distance is 100 + if (dist2 >= followdist) // Default follow distance is 100 { int speed = GetWalkspeed(); - if (dist2 >= followdist + 150) + if (dist2 >= followdist + 150) { speed = GetRunspeed(); + } CalculateNewPosition(follow->GetX(), follow->GetY(), follow->GetZ(), speed); } - else - { + else { moved = false; SetCurrentSpeed(0); } @@ -1640,20 +1614,21 @@ void Mob::AI_Process() { else //not a pet, and not following somebody... { // dont move till a bit after you last fought - if (pLastFightingDelayMoving < Timer::GetCurrentTime()) - { - if (this->IsClient()) - { - // LD timer expired, drop out of world - if (this->CastToClient()->IsLD()) + if (time_until_can_move < Timer::GetCurrentTime()) { + if (this->IsClient()) { + + /** + * LD timer expired, drop out of world + */ + if (this->CastToClient()->IsLD()) { this->CastToClient()->Disconnect(); + } + return; } - if(IsNPC()) - { - if(RuleB(NPC, SmartLastFightingDelayMoving) && !feign_memory_list.empty()) - { + if (IsNPC()) { + if (RuleB(NPC, SmartLastFightingDelayMoving) && !feign_memory_list.empty()) { minLastFightingDelayMoving = 0; maxLastFightingDelayMoving = 0; } @@ -1661,93 +1636,84 @@ void Mob::AI_Process() { CastToNPC()->AI_DoMovement(); } } - } - } // else if (AImovement_timer->Check()) + } } //Do Ranged attack here - if(doranged) - { + if (doranged) { RangedAttack(target); } } void NPC::AI_DoMovement() { - float walksp = GetMovespeed(); - if(walksp <= 0.0f) - return; //this is idle movement at walk speed, and we are unable to walk right now. - if (roambox_distance > 0) { - if ( - roambox_movingto_x > roambox_max_x - || roambox_movingto_x < roambox_min_x - || roambox_movingto_y > roambox_max_y - || roambox_movingto_y < roambox_min_y - ) - { - float movedist = roambox_distance*roambox_distance; - float movex = zone->random.Real(0, movedist); - float movey = movedist - movex; - movex = sqrtf(movex); - movey = sqrtf(movey); - movex *= zone->random.Int(0, 1) ? 1 : -1; - movey *= zone->random.Int(0, 1) ? 1 : -1; - roambox_movingto_x = GetX() + movex; - roambox_movingto_y = GetY() + movey; - //Try to calculate new coord using distance. - if (roambox_movingto_x > roambox_max_x || roambox_movingto_x < roambox_min_x) - roambox_movingto_x -= movex * 2; - if (roambox_movingto_y > roambox_max_y || roambox_movingto_y < roambox_min_y) - roambox_movingto_y -= movey * 2; - //New coord is still invalid, ignore distance and just pick a new random coord. - //If we're here we may have a roambox where one side is shorter than the specified distance. Commons, Wkarana, etc. - if (roambox_movingto_x > roambox_max_x || roambox_movingto_x < roambox_min_x) - roambox_movingto_x = zone->random.Real(roambox_min_x+1,roambox_max_x-1); - if (roambox_movingto_y > roambox_max_y || roambox_movingto_y < roambox_min_y) - roambox_movingto_y = zone->random.Real(roambox_min_y+1,roambox_max_y-1); - Log(Logs::Detail, Logs::AI, - "Roam Box: d=%.3f (%.3f->%.3f,%.3f->%.3f): Go To (%.3f,%.3f)", - roambox_distance, roambox_min_x, roambox_max_x, roambox_min_y, - roambox_max_y, roambox_movingto_x, roambox_movingto_y); - } - - Log(Logs::Detail, Logs::AI, "Roam Box: d=%.3f (%.3f->%.3f,%.3f->%.3f): Go To (%.3f,%.3f)", - roambox_distance, roambox_min_x, roambox_max_x, roambox_min_y, roambox_max_y, roambox_movingto_x, roambox_movingto_y); + float move_speed = GetMovespeed(); - float new_z = this->FindGroundZ(m_Position.x, m_Position.y, 5) + GetZOffset(); - - if (!CalculateNewPosition(roambox_movingto_x, roambox_movingto_y, new_z, walksp, true)) - { - this->FixZ(); // FixZ on final arrival point. - roambox_movingto_x = roambox_max_x + 1; // force update - pLastFightingDelayMoving = Timer::GetCurrentTime() + RandomTimer(roambox_min_delay, roambox_delay); - SetMoving(false); - SendPosition(); // makes mobs stop clientside - } + if (move_speed <= 0.0f) { + return; } - else if (roamer) - { - if (AI_walking_timer->Check()) - { - movetimercompleted=true; + + /** + * Roambox logic sets precedence + */ + if (roambox_distance > 0) { + + if (!IsMoving()) { + auto move_x = static_cast(zone->random.Real(-roambox_distance, roambox_distance)); + auto move_y = static_cast(zone->random.Real(-roambox_distance, roambox_distance)); + + roambox_destination_x = EQEmu::Clamp((GetX() + move_x), roambox_min_x, roambox_min_y); + roambox_destination_y = EQEmu::Clamp((GetY() + move_y), roambox_min_y, roambox_max_y); + + this->FixZ(); + + Log(Logs::Detail, + Logs::NPCRoamBox, + "Calculate | NPC: %s distance %.3f | min_x %.3f | max_x %.3f | final_x %.3f | min_y %.3f | max_y %.3f | final_y %.3f", + this->GetCleanName(), + roambox_distance, + roambox_min_x, + roambox_max_x, + roambox_destination_x, + roambox_min_y, + roambox_max_y, + roambox_destination_y); + } + + if (!CalculateNewPosition(roambox_destination_x, roambox_destination_y, GetFixedZ(m_Position), move_speed, true)) { + time_until_can_move = Timer::GetCurrentTime() + RandomTimer(roambox_min_delay, roambox_delay); + SetMoving(false); + this->FixZ(); + SendPosition(); + } + + return; + } + else if (roamer) { + if (AI_walking_timer->Check()) { + movetimercompleted = true; AI_walking_timer->Disable(); } - int32 gridno = CastToNPC()->GetGrid(); - if (gridno > 0 || cur_wp==-2) { - if (movetimercompleted==true) { // time to pause at wp is over + if (gridno > 0 || cur_wp == -2) { + if (movetimercompleted == true) { // time to pause at wp is over AI_SetupNextWaypoint(); - } // endif (movetimercompleted==true) - else if (!(AI_walking_timer->Enabled())) - { // currently moving + } // endif (movetimercompleted==true) + else if (!(AI_walking_timer->Enabled())) { // currently moving bool doMove = true; - if (m_CurrentWayPoint.x == GetX() && m_CurrentWayPoint.y == GetY()) - { // are we there yet? then stop - Log(Logs::Detail, Logs::AI, "We have reached waypoint %d (%.3f,%.3f,%.3f) on grid %d", cur_wp, GetX(), GetY(), GetZ(), GetGrid()); - + if (m_CurrentWayPoint.x == GetX() && m_CurrentWayPoint.y == GetY()) { // are we there yet? then stop + Log(Logs::Detail, + Logs::AI, + "We have reached waypoint %d (%.3f,%.3f,%.3f) on grid %d", + cur_wp, + GetX(), + GetY(), + GetZ(), + GetGrid()); + SetWaypointPause(); SetAppearance(eaStanding, false); SetMoving(false); @@ -1773,36 +1739,45 @@ void NPC::AI_DoMovement() { } // wipe feign memory since we reached our first waypoint - if(cur_wp == 1) + if (cur_wp == 1) ClearFeignMemory(); } - if (doMove) - { // not at waypoint yet or at 0 pause WP, so keep moving - if(!RuleB(Pathing, AggroReturnToGrid) || !zone->pathing || (DistractedFromGrid == 0)) - CalculateNewPosition(m_CurrentWayPoint.x, m_CurrentWayPoint.y, m_CurrentWayPoint.z, walksp, true); - else - { - bool WaypointChanged; - bool NodeReached; - glm::vec3 Goal = UpdatePath(m_CurrentWayPoint.x, m_CurrentWayPoint.y, m_CurrentWayPoint.z, walksp, WaypointChanged, NodeReached); - if(WaypointChanged) + if (doMove) { // not at waypoint yet or at 0 pause WP, so keep moving + if (!RuleB(Pathing, AggroReturnToGrid) || !zone->pathing || (DistractedFromGrid == 0)) + CalculateNewPosition( + m_CurrentWayPoint.x, + m_CurrentWayPoint.y, + m_CurrentWayPoint.z, + move_speed, + true + ); + else { + bool WaypointChanged; + bool NodeReached; + glm::vec3 Goal = UpdatePath( + m_CurrentWayPoint.x, + m_CurrentWayPoint.y, + m_CurrentWayPoint.z, + move_speed, + WaypointChanged, + NodeReached + ); + if (WaypointChanged) tar_ndx = 20; - if(NodeReached) + if (NodeReached) entity_list.OpenDoorsNear(CastToNPC()); - CalculateNewPosition(Goal.x, Goal.y, Goal.z, walksp, true); + CalculateNewPosition(Goal.x, Goal.y, Goal.z, move_speed, true); } } } - } // endif (gridno > 0) - // handle new quest grid command processing - else if (gridno < 0) - { // this mob is under quest control - if (movetimercompleted==true) - { // time to pause has ended - SetGrid( 0 - GetGrid()); // revert to AI control + } // endif (gridno > 0) + // handle new quest grid command processing + else if (gridno < 0) { // this mob is under quest control + if (movetimercompleted == true) { // time to pause has ended + SetGrid(0 - GetGrid()); // revert to AI control Log(Logs::Detail, Logs::Pathing, "Quest pathing is finished. Resuming on grid %d", GetGrid()); SetAppearance(eaStanding, false); @@ -1812,39 +1787,55 @@ void NPC::AI_DoMovement() { } } - else if (IsGuarding()) - { + else if (IsGuarding()) { bool CP2Moved; - if(!RuleB(Pathing, Guard) || !zone->pathing) - CP2Moved = CalculateNewPosition(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z, walksp); - else - { - if(!((m_Position.x == m_GuardPoint.x) && (m_Position.y == m_GuardPoint.y) && (m_Position.z == m_GuardPoint.z))) - { + if (!RuleB(Pathing, Guard) || !zone->pathing) { + CP2Moved = CalculateNewPosition(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z, move_speed); + } + else { + if (!((m_Position.x == m_GuardPoint.x) && (m_Position.y == m_GuardPoint.y) && + (m_Position.z == m_GuardPoint.z))) { + bool WaypointChanged, NodeReached; - glm::vec3 Goal = UpdatePath(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z, walksp, WaypointChanged, NodeReached); - if(WaypointChanged) + + glm::vec3 Goal = UpdatePath( + m_GuardPoint.x, + m_GuardPoint.y, + m_GuardPoint.z, + move_speed, + WaypointChanged, + NodeReached + ); + if (WaypointChanged) { tar_ndx = 20; + } - if(NodeReached) + if (NodeReached) { entity_list.OpenDoorsNear(CastToNPC()); + } - CP2Moved = CalculateNewPosition(Goal.x, Goal.y, Goal.z, walksp); + CP2Moved = CalculateNewPosition(Goal.x, Goal.y, Goal.z, move_speed); } - else + else { CP2Moved = false; + } } - if (!CP2Moved) - { - if(moved) { - Log(Logs::Detail, Logs::AI, "Reached guard point (%.3f,%.3f,%.3f)", m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z); + if (!CP2Moved) { + if (moved) { + Log(Logs::Detail, + Logs::AI, + "Reached guard point (%.3f,%.3f,%.3f)", + m_GuardPoint.x, + m_GuardPoint.y, + m_GuardPoint.z); + ClearFeignMemory(); - moved=false; - if (GetTarget() == nullptr || DistanceSquared(m_Position, GetTarget()->GetPosition()) >= 5*5 ) - { + moved = false; + if (GetTarget() == nullptr || DistanceSquared(m_Position, GetTarget()->GetPosition()) >= 5 * 5) { SetHeading(m_GuardPoint.w); - } else { + } + else { FaceTarget(GetTarget()); } SetCurrentSpeed(0); @@ -1968,11 +1959,11 @@ void Mob::AI_Event_NoLongerEngaged() { if (!IsAIControlled()) return; this->AI_walking_timer->Start(RandomTimer(3000,20000)); - pLastFightingDelayMoving = Timer::GetCurrentTime(); + time_until_can_move = Timer::GetCurrentTime(); if (minLastFightingDelayMoving == maxLastFightingDelayMoving) - pLastFightingDelayMoving += minLastFightingDelayMoving; + time_until_can_move += minLastFightingDelayMoving; else - pLastFightingDelayMoving += zone->random.Int(minLastFightingDelayMoving, maxLastFightingDelayMoving); + time_until_can_move += zone->random.Int(minLastFightingDelayMoving, maxLastFightingDelayMoving); // So mobs don't keep running as a ghost until AIwalking_timer fires // if they were moving prior to losing all hate // except if we're a pet, then we might run into some issues with pets backing off when they should immediately be moving diff --git a/zone/npc.cpp b/zone/npc.cpp index 7cf31b617..bf1508858 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -242,8 +242,8 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, const glm::vec4& position, int if roambox_max_y = -2; roambox_min_x = -2; roambox_min_y = -2; - roambox_movingto_x = -2; - roambox_movingto_y = -2; + roambox_destination_x = -2; + roambox_destination_y = -2; roambox_min_delay = 1000; roambox_delay = 1000; p_depop = false; diff --git a/zone/npc.h b/zone/npc.h index 471b47557..52c8b2171 100644 --- a/zone/npc.h +++ b/zone/npc.h @@ -311,9 +311,17 @@ public: void SaveGuardSpot(bool iClearGuardSpot = false); inline bool IsGuarding() const { return(m_GuardPoint.w != 0); } void SaveGuardSpotCharm(); - void RestoreGuardSpotCharm(); - void AI_SetRoambox(float iDist, float iRoamDist, uint32 iDelay = 2500, uint32 iMinDelay = 2500); - void AI_SetRoambox(float iDist, float iMaxX, float iMinX, float iMaxY, float iMinY, uint32 iDelay = 2500, uint32 iMinDelay = 2500); + + void RestoreGuardSpotCharm(); + + void AI_SetRoambox( + float max_distance, + float roam_distance_variance, + uint32 delay = 2500, + uint32 min_delay = 2500 + ); + + void AI_SetRoambox(float distance, float max_x, float min_x, float max_y, float min_y, uint32 delay = 2500, uint32 min_delay = 2500); //mercenary stuff void LoadMercTypes(); @@ -530,8 +538,8 @@ protected: float roambox_min_x; float roambox_min_y; float roambox_distance; - float roambox_movingto_x; - float roambox_movingto_y; + float roambox_destination_x; + float roambox_destination_y; uint32 roambox_delay; uint32 roambox_min_delay; diff --git a/zone/spawn2.cpp b/zone/spawn2.cpp index bfc474721..71101dff8 100644 --- a/zone/spawn2.cpp +++ b/zone/spawn2.cpp @@ -141,118 +141,181 @@ uint32 Spawn2::despawnTimer(uint32 despawn_timer) bool Spawn2::Process() { IsDespawned = false; - if(!Enabled()) + if (!Enabled()) return true; //grab our spawn group - SpawnGroup* sg = zone->spawn_group_list.GetSpawnGroup(spawngroup_id_); + SpawnGroup *spawn_group = zone->spawn_group_list.GetSpawnGroup(spawngroup_id_); - if(NPCPointerValid() && (sg->despawn == 0 || condition_id != 0)) + if (NPCPointerValid() && (spawn_group->despawn == 0 || condition_id != 0)) { return true; + } - if (timer.Check()) { + if (timer.Check()) { timer.Disable(); Log(Logs::Detail, Logs::Spawns, "Spawn2 %d: Timer has triggered", spawn2_id); //first check our spawn condition, if this isnt active //then we reset the timer and try again next time. - if(condition_id != SC_AlwaysEnabled + if (condition_id != SC_AlwaysEnabled && !zone->spawn_conditions.Check(condition_id, condition_min_value)) { - Log(Logs::Detail, Logs::Spawns, "Spawn2 %d: spawning prevented by spawn condition %d", spawn2_id, condition_id); + Log(Logs::Detail, + Logs::Spawns, + "Spawn2 %d: spawning prevented by spawn condition %d", + spawn2_id, + condition_id); Reset(); - return(true); + return (true); } - if (sg == nullptr) { - database.LoadSpawnGroupsByID(spawngroup_id_,&zone->spawn_group_list); - sg = zone->spawn_group_list.GetSpawnGroup(spawngroup_id_); + if (spawn_group == nullptr) { + database.LoadSpawnGroupsByID(spawngroup_id_, &zone->spawn_group_list); + spawn_group = zone->spawn_group_list.GetSpawnGroup(spawngroup_id_); } - if (sg == nullptr) { - Log(Logs::Detail, Logs::Spawns, "Spawn2 %d: Unable to locate spawn group %d. Disabling.", spawn2_id, spawngroup_id_); + if (spawn_group == nullptr) { + Log(Logs::Detail, + Logs::Spawns, + "Spawn2 %d: Unable to locate spawn group %d. Disabling.", + spawn2_id, + spawngroup_id_); + return false; } //have the spawn group pick an NPC for us - uint32 npcid = sg->GetNPCType(); + uint32 npcid = spawn_group->GetNPCType(); if (npcid == 0) { - Log(Logs::Detail, Logs::Spawns, "Spawn2 %d: Spawn group %d did not yeild an NPC! not spawning.", spawn2_id, spawngroup_id_); - Reset(); //try again later (why?) - return(true); + Log(Logs::Detail, + Logs::Spawns, + "Spawn2 %d: Spawn group %d did not yeild an NPC! not spawning.", + spawn2_id, + spawngroup_id_); + + Reset(); //try again later (why?) + return (true); } //try to find our NPC type. - const NPCType* tmp = database.LoadNPCTypesData(npcid); + const NPCType *tmp = database.LoadNPCTypesData(npcid); if (tmp == nullptr) { - Log(Logs::Detail, Logs::Spawns, "Spawn2 %d: Spawn group %d yeilded an invalid NPC type %d", spawn2_id, spawngroup_id_, npcid); - Reset(); //try again later - return(true); + Log(Logs::Detail, + Logs::Spawns, + "Spawn2 %d: Spawn group %d yeilded an invalid NPC type %d", + spawn2_id, + spawngroup_id_, + npcid); + Reset(); //try again later + return (true); } - if(tmp->unique_spawn_by_name) - { - if(!entity_list.LimitCheckName(tmp->name)) - { - Log(Logs::Detail, Logs::Spawns, "Spawn2 %d: Spawn group %d yeilded NPC type %d, which is unique and one already exists.", spawn2_id, spawngroup_id_, npcid); - timer.Start(5000); //try again in five seconds. - return(true); + if (tmp->unique_spawn_by_name) { + if (!entity_list.LimitCheckName(tmp->name)) { + Log(Logs::Detail, + Logs::Spawns, + "Spawn2 %d: Spawn group %d yeilded NPC type %d, which is unique and one already exists.", + spawn2_id, + spawngroup_id_, + npcid); + timer.Start(5000); //try again in five seconds. + return (true); } } - if(tmp->spawn_limit > 0) { - if(!entity_list.LimitCheckType(npcid, tmp->spawn_limit)) { - Log(Logs::Detail, Logs::Spawns, "Spawn2 %d: Spawn group %d yeilded NPC type %d, which is over its spawn limit (%d)", spawn2_id, spawngroup_id_, npcid, tmp->spawn_limit); - timer.Start(5000); //try again in five seconds. - return(true); + if (tmp->spawn_limit > 0) { + if (!entity_list.LimitCheckType(npcid, tmp->spawn_limit)) { + Log(Logs::Detail, + Logs::Spawns, + "Spawn2 %d: Spawn group %d yeilded NPC type %d, which is over its spawn limit (%d)", + spawn2_id, + spawngroup_id_, + npcid, + tmp->spawn_limit); + timer.Start(5000); //try again in five seconds. + return (true); } } bool ignore_despawn = false; - if (npcthis) - { + if (npcthis) { ignore_despawn = npcthis->IgnoreDespawn(); } - - if (ignore_despawn) - { + + if (ignore_despawn) { return true; } - - if (sg->despawn != 0 && condition_id == 0 && !ignore_despawn) - { + + if (spawn_group->despawn != 0 && condition_id == 0 && !ignore_despawn) { zone->Despawn(spawn2_id); } - if (IsDespawned) - { + if (IsDespawned) { return true; } currentnpcid = npcid; - NPC* npc = new NPC(tmp, this, glm::vec4(x, y, z, heading), FlyMode3); + NPC *npc = new NPC(tmp, this, glm::vec4(x, y, z, heading), FlyMode3); npc->mod_prespawn(this); npcthis = npc; npc->AddLootTable(); - if (npc->DropsGlobalLoot()) + if (npc->DropsGlobalLoot()) { npc->CheckGlobalLootTables(); + } npc->SetSp2(spawngroup_id_); npc->SaveGuardPointAnim(anim); - npc->SetAppearance((EmuAppearance)anim); + npc->SetAppearance((EmuAppearance) anim); entity_list.AddNPC(npc); //this limit add must be done after the AddNPC since we need the entity ID. entity_list.LimitAddNPC(npc); - if(sg->roamdist && sg->roambox[0] && sg->roambox[1] && sg->roambox[2] && sg->roambox[3] && sg->delay && sg->min_delay) - npc->AI_SetRoambox(sg->roamdist,sg->roambox[0],sg->roambox[1],sg->roambox[2],sg->roambox[3],sg->delay,sg->min_delay); - if(zone->InstantGrids()) { - Log(Logs::Detail, Logs::Spawns, "Spawn2 %d: Group %d spawned %s (%d) at (%.3f, %.3f, %.3f).", spawn2_id, spawngroup_id_, npc->GetName(), npcid, x, y, z); + + /** + * Roambox init + */ + if (spawn_group->roamdist && spawn_group->roambox[0] && spawn_group->roambox[1] && spawn_group->roambox[2] && + spawn_group->roambox[3] && spawn_group->delay && spawn_group->min_delay) { + + npc->AI_SetRoambox( + spawn_group->roamdist, + spawn_group->roambox[0], + spawn_group->roambox[1], + spawn_group->roambox[2], + spawn_group->roambox[3], + spawn_group->delay, + spawn_group->min_delay + ); + } + + if (zone->InstantGrids()) { + Log(Logs::Detail, + Logs::Spawns, + "Spawn2 %d: Group %d spawned %s (%d) at (%.3f, %.3f, %.3f).", + spawn2_id, + spawngroup_id_, + npc->GetName(), + npcid, + x, + y, + z); + LoadGrid(); - } else { - Log(Logs::Detail, Logs::Spawns, "Spawn2 %d: Group %d spawned %s (%d) at (%.3f, %.3f, %.3f). Grid loading delayed.", spawn2_id, spawngroup_id_, tmp->name, npcid, x, y, z); + } + else { + Log(Logs::Detail, + Logs::Spawns, + "Spawn2 %d: Group %d spawned %s (%d) at (%.3f, %.3f, %.3f). Grid loading delayed.", + spawn2_id, + spawngroup_id_, + tmp->name, + npcid, + x, + y, + z); } } + return true; } @@ -266,11 +329,11 @@ void Spawn2::Disable() } void Spawn2::LoadGrid() { - if(!npcthis) + if (!npcthis) return; - if(grid_ < 1) + if (grid_ < 1) return; - if(!entity_list.IsMobInZone(npcthis)) + if (!entity_list.IsMobInZone(npcthis)) return; //dont set an NPC's grid until its loaded for them. npcthis->SetGrid(grid_); @@ -278,7 +341,6 @@ void Spawn2::LoadGrid() { Log(Logs::Detail, Logs::Spawns, "Spawn2 %d: Loading grid %d for %s", spawn2_id, grid_, npcthis->GetName()); } - /* All three of these actions basically say that the mob which was associated with this spawn point is no longer relavent. diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index 2351e2686..083cc38ba 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -42,19 +42,27 @@ struct wp_distance int index; }; -void NPC::AI_SetRoambox(float iDist, float iRoamDist, uint32 iDelay, uint32 iMinDelay) { - AI_SetRoambox(iDist, GetX() + iRoamDist, GetX() - iRoamDist, GetY() + iRoamDist, GetY() - iRoamDist, iDelay, iMinDelay); +void NPC::AI_SetRoambox(float max_distance, float roam_distance_variance, uint32 delay, uint32 min_delay) { + AI_SetRoambox( + max_distance, + GetX() + roam_distance_variance, + GetX() - roam_distance_variance, + GetY() + roam_distance_variance, + GetY() - roam_distance_variance, + delay, + min_delay + ); } -void NPC::AI_SetRoambox(float iDist, float iMaxX, float iMinX, float iMaxY, float iMinY, uint32 iDelay, uint32 iMinDelay) { - roambox_distance = iDist; - roambox_max_x = iMaxX; - roambox_min_x = iMinX; - roambox_max_y = iMaxY; - roambox_min_y = iMinY; - roambox_movingto_x = roambox_max_x + 1; // this will trigger a recalc - roambox_delay = iDelay; - roambox_min_delay = iMinDelay; +void NPC::AI_SetRoambox(float distance, float max_x, float min_x, float max_y, float min_y, uint32 delay, uint32 min_delay) { + roambox_distance = distance; + roambox_max_x = max_x; + roambox_min_x = min_x; + roambox_max_y = max_y; + roambox_min_y = min_y; + roambox_destination_x = roambox_max_x + 1; // this will trigger a recalc + roambox_delay = delay; + roambox_min_delay = min_delay; } void NPC::DisplayWaypointInfo(Client *c) { @@ -199,7 +207,7 @@ void NPC::MoveTo(const glm::vec4& position, bool saveguardspot) } cur_wp_pause = 0; - pLastFightingDelayMoving = 0; + time_until_can_move = 0; if (AI_walking_timer->Enabled()) AI_walking_timer->Start(100); } @@ -438,22 +446,16 @@ float Mob::CalculateDistance(float x, float y, float z) { return (float)sqrtf(((m_Position.x - x)*(m_Position.x - x)) + ((m_Position.y - y)*(m_Position.y - y)) + ((m_Position.z - z)*(m_Position.z - z))); } -bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, int speed, bool checkZ, bool calcHeading) { +bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, bool check_z, bool calculate_heading) { if (GetID() == 0) return true; - if (speed <= 0) - { + if (speed <= 0) { SetCurrentSpeed(0); return true; } if ((m_Position.x - x == 0) && (m_Position.y - y == 0)) {//spawn is at target coords - if (m_Position.z - z != 0) { - m_Position.z = z; - Log(Logs::Detail, Logs::AI, "Calc Position2 (%.3f, %.3f, %.3f): Jumping pure Z.", x, y, z); - return true; - } return false; } else if ((std::abs(m_Position.x - x) < 0.1) && (std::abs(m_Position.y - y) < 0.1)) { @@ -464,16 +466,17 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, int speed, boo m_Position.x = x; m_Position.y = y; m_Position.z = z; + return true; } - bool send_update = false; int compare_steps = 20; if (tar_ndx < compare_steps && m_TargetLocation.x == x && m_TargetLocation.y == y) { - float new_x = m_Position.x + m_TargetV.x*tar_vector; - float new_y = m_Position.y + m_TargetV.y*tar_vector; - float new_z = m_Position.z + m_TargetV.z*tar_vector; + float new_x = m_Position.x + m_TargetV.x * tar_vector; + float new_y = m_Position.y + m_TargetV.y * tar_vector; + float new_z = m_Position.z + m_TargetV.z * tar_vector; + if (IsNPC()) { entity_list.ProcessMove(CastToNPC(), new_x, new_y, new_z); } @@ -482,21 +485,22 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, int speed, boo m_Position.y = new_y; m_Position.z = new_z; - if(checkZ && fix_z_timer.Check() && - (!this->IsEngaged() || flee_mode || currently_fleeing)) + if (check_z && fix_z_timer.Check() && (!this->IsEngaged() || flee_mode || currently_fleeing)) { this->FixZ(); + } tar_ndx++; + return true; } - - if (tar_ndx>50) { + if (tar_ndx > 50) { tar_ndx--; } else { tar_ndx = 0; } + m_TargetLocation = glm::vec3(x, y, z); float nx = this->m_Position.x; @@ -530,14 +534,12 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, int speed, boo // mob move fix - if (numsteps<20) - { - if (numsteps>1) - { + if (numsteps < 20) { + if (numsteps > 1) { tar_vector = 1.0f; - m_TargetV.x = m_TargetV.x / (float)numsteps; - m_TargetV.y = m_TargetV.y / (float)numsteps; - m_TargetV.z = m_TargetV.z / (float)numsteps; + m_TargetV.x = m_TargetV.x / (float) numsteps; + m_TargetV.y = m_TargetV.y / (float) numsteps; + m_TargetV.z = m_TargetV.z / (float) numsteps; float new_x = m_Position.x + m_TargetV.x; float new_y = m_Position.y + m_TargetV.y; @@ -549,12 +551,12 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, int speed, boo m_Position.x = new_x; m_Position.y = new_y; m_Position.z = new_z; - if (calcHeading) + if (calculate_heading) { m_Position.w = CalculateHeadingToTarget(x, y); + } tar_ndx = 20 - numsteps; } - else - { + else { if (IsNPC()) { entity_list.ProcessMove(CastToNPC(), x, y, z); } @@ -578,9 +580,10 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, int speed, boo tar_vector *= (dur / 100.0f); - float new_x = m_Position.x + m_TargetV.x*tar_vector; - float new_y = m_Position.y + m_TargetV.y*tar_vector; - float new_z = m_Position.z + m_TargetV.z*tar_vector; + float new_x = m_Position.x + m_TargetV.x * tar_vector; + float new_y = m_Position.y + m_TargetV.y * tar_vector; + float new_z = m_Position.z + m_TargetV.z * tar_vector; + if (IsNPC()) { entity_list.ProcessMove(CastToNPC(), new_x, new_y, new_z); } @@ -588,11 +591,12 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, int speed, boo m_Position.x = new_x; m_Position.y = new_y; m_Position.z = new_z; - if (calcHeading) + if (calculate_heading) { m_Position.w = CalculateHeadingToTarget(x, y); + } } - if (checkZ && fix_z_timer.Check() && !this->IsEngaged()) + if (check_z && fix_z_timer.Check() && !this->IsEngaged()) this->FixZ(); SetMoving(true); @@ -600,13 +604,11 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, int speed, boo m_Delta = glm::vec4(m_Position.x - nx, m_Position.y - ny, m_Position.z - nz, 0.0f); - if (IsClient()) - { + if (IsClient()) { SendPositionUpdate(1); CastToClient()->ResetPositionTimer(); } - else - { + else { SendPositionUpdate(); SetAppearance(eaStanding, false); } @@ -615,8 +617,8 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, int speed, boo return true; } -bool Mob::CalculateNewPosition(float x, float y, float z, int speed, bool checkZ, bool calcHeading) { - return MakeNewPositionAndSendUpdate(x, y, z, speed); +bool Mob::CalculateNewPosition(float x, float y, float z, float speed, bool check_z, bool calculate_heading) { + return MakeNewPositionAndSendUpdate(x, y, z, speed, check_z); } void NPC::AssignWaypoints(int32 grid) @@ -746,10 +748,11 @@ void Mob::SendToFixZ(float new_x, float new_y, float new_z) { } } -float Mob::GetFixedZ(glm::vec3 dest, int32 z_find_offset) { +float Mob::GetFixedZ(glm::vec3 destination, int32 z_find_offset) { BenchTimer timer; timer.reset(); - float new_z = dest.z; + + float new_z = destination.z; if (zone->HasMap() && RuleB(Map, FixZWhenMoving)) { @@ -765,7 +768,7 @@ float Mob::GetFixedZ(glm::vec3 dest, int32 z_find_offset) { /* * Any more than 5 in the offset makes NPC's hop/snap to ceiling in small corridors */ - new_z = this->FindDestGroundZ(dest, z_find_offset); + new_z = this->FindDestGroundZ(destination, z_find_offset); if (new_z != BEST_Z_INVALID) { new_z += this->GetZOffset(); @@ -776,9 +779,15 @@ float Mob::GetFixedZ(glm::vec3 dest, int32 z_find_offset) { auto duration = timer.elapsed(); - Log(Logs::Moderate, Logs::FixZ, - "Mob::GetFixedZ() (%s) returned %4.3f at %4.3f, %4.3f, %4.3f - Took %lf", - this->GetCleanName(), new_z, dest.x, dest.y, dest.z, duration); + Log(Logs::Moderate, + Logs::FixZ, + "Mob::GetFixedZ() (%s) returned %4.3f at %4.3f, %4.3f, %4.3f - Took %lf", + this->GetCleanName(), + new_z, + destination.x, + destination.y, + destination.z, + duration); } return new_z; @@ -790,16 +799,19 @@ void Mob::FixZ(int32 z_find_offset /*= 5*/) { if (!IsClient() && new_z != m_Position.z) { if ((new_z > -2000) && new_z != BEST_Z_INVALID) { - if (RuleB(Map, MobZVisualDebug)) + if (RuleB(Map, MobZVisualDebug)) { this->SendAppearanceEffect(78, 0, 0, 0, 0); + } m_Position.z = new_z; - } else { - if (RuleB(Map, MobZVisualDebug)) + } + else { + if (RuleB(Map, MobZVisualDebug)) { this->SendAppearanceEffect(103, 0, 0, 0, 0); + } Log(Logs::General, Logs::FixZ, "%s is failing to find Z %f", - this->GetCleanName(), std::abs(m_Position.z - new_z)); + this->GetCleanName(), std::abs(m_Position.z - new_z)); } } } From 834062fbf957c17a5492a1c3628d8af610ef5618 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sat, 18 Aug 2018 22:01:46 -0500 Subject: [PATCH 350/670] Add another layer of randomization to roam box logic, npc's who weren't originally spawned in water won't roambox into water --- zone/attack.cpp | 8 ++++++++ zone/entity.cpp | 10 ++++++++++ zone/mob.h | 7 +++++++ zone/mob_ai.cpp | 32 ++++++++++++++++++++++++++++++-- zone/water_map_v2.cpp | 2 +- zone/waypoints.cpp | 2 +- zone/zone.h | 8 ++++---- 7 files changed, 61 insertions(+), 8 deletions(-) diff --git a/zone/attack.cpp b/zone/attack.cpp index a48d68934..d6cf4227f 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -5455,3 +5455,11 @@ void Mob::DoOffHandAttackRounds(Mob *target, ExtraAttackOptions *opts) } } } + +bool Mob::GetWasSpawnedInWater() const { + return spawned_in_water; +} + +void Mob::SetSpawnedInWater(bool spawned_in_water) { + Mob::spawned_in_water = spawned_in_water; +} diff --git a/zone/entity.cpp b/zone/entity.cpp index f61acda94..2523c7d96 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -39,6 +39,7 @@ #include "raids.h" #include "string_ids.h" #include "worldserver.h" +#include "water_map.h" #ifdef _WINDOWS #define snprintf _snprintf @@ -686,6 +687,15 @@ void EntityList::AddNPC(NPC *npc, bool SendSpawnPacket, bool dontqueue) } } + /** + * Set whether NPC was spawned in or out of water + */ + if (zone->HasMap() && zone->HasWaterMap()) { + npc->SetSpawnedInWater(false); + if (zone->watermap->InLiquid(npc->GetPosition())) { + npc->SetSpawnedInWater(true); + } + } } void EntityList::AddMerc(Merc *merc, bool SendSpawnPacket, bool dontqueue) diff --git a/zone/mob.h b/zone/mob.h index bdfbd31bc..763fa61b7 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -1414,6 +1414,13 @@ protected: bool pseudo_rooted; bool endur_upkeep; bool degenerating_effects; // true if we have a buff that needs to be recalced every tick + bool spawned_in_water; +public: + bool GetWasSpawnedInWater() const; + + void SetSpawnedInWater(bool spawned_in_water); + +protected: // Bind wound Timer bindwound_timer; diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 0579fd60d..9c16dc9b6 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1663,9 +1663,35 @@ void NPC::AI_DoMovement() { auto move_x = static_cast(zone->random.Real(-roambox_distance, roambox_distance)); auto move_y = static_cast(zone->random.Real(-roambox_distance, roambox_distance)); - roambox_destination_x = EQEmu::Clamp((GetX() + move_x), roambox_min_x, roambox_min_y); + roambox_destination_x = EQEmu::Clamp((GetX() + move_x), roambox_min_x, roambox_max_x); roambox_destination_y = EQEmu::Clamp((GetY() + move_y), roambox_min_y, roambox_max_y); + if (roambox_destination_x == roambox_min_x || roambox_destination_x == roambox_max_x) { + roambox_destination_x = static_cast(zone->random.Real(roambox_min_x, roambox_max_y)); + } + + if (roambox_destination_y == roambox_min_y || roambox_destination_y == roambox_max_y) { + roambox_destination_y = static_cast(zone->random.Real(roambox_min_y, roambox_max_y)); + } + + /** + * If mob was not spawned in water, let's not randomly roam them into water + * if the roam box was sloppily configured + */ + if (!this->GetWasSpawnedInWater()) { + if (zone->zonemap != nullptr && zone->watermap != nullptr) { + auto position = glm::vec3( + roambox_destination_x, + roambox_destination_y, + this->FindGroundZ(roambox_destination_x, roambox_destination_y, 5) + ); + + if (zone->watermap->InLiquid(position)) { + return; + } + } + } + this->FixZ(); Log(Logs::Detail, @@ -1681,7 +1707,9 @@ void NPC::AI_DoMovement() { roambox_destination_y); } - if (!CalculateNewPosition(roambox_destination_x, roambox_destination_y, GetFixedZ(m_Position), move_speed, true)) { + float new_z = this->FindGroundZ(m_Position.x, m_Position.y, 5) + GetZOffset(); + + if (!CalculateNewPosition(roambox_destination_x, roambox_destination_y, new_z, move_speed, true)) { time_until_can_move = Timer::GetCurrentTime() + RandomTimer(roambox_min_delay, roambox_delay); SetMoving(false); this->FixZ(); diff --git a/zone/water_map_v2.cpp b/zone/water_map_v2.cpp index 939b9be97..03ae76fa4 100644 --- a/zone/water_map_v2.cpp +++ b/zone/water_map_v2.cpp @@ -30,7 +30,7 @@ bool WaterMapV2::InLava(const glm::vec3& location) const { } bool WaterMapV2::InLiquid(const glm::vec3& location) const { - return InWater(location) || InLava(location); + return InWater(location) || InLava(location) || InVWater(location); } bool WaterMapV2::InPvP(const glm::vec3& location) const { diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index 083cc38ba..5e1f0dd82 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -455,7 +455,7 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b return true; } - if ((m_Position.x - x == 0) && (m_Position.y - y == 0)) {//spawn is at target coords + if ((m_Position.x - x == 0) && (m_Position.y - y == 0)) { //spawn is at target coords return false; } else if ((std::abs(m_Position.x - x) < 0.1) && (std::abs(m_Position.y - y) < 0.1)) { diff --git a/zone/zone.h b/zone/zone.h index c3d5fe8a6..5f8651d8b 100644 --- a/zone/zone.h +++ b/zone/zone.h @@ -212,10 +212,10 @@ public: void ReloadWorld(uint32 Option); void ReloadMerchants(); - Map* zonemap; - WaterMap* watermap; - IPathfinder *pathing; - NewZone_Struct newzone_data; + Map *zonemap; + WaterMap *watermap; + IPathfinder *pathing; + NewZone_Struct newzone_data; SpawnConditionManager spawn_conditions; From 3a7d18f32a0f0fd926bfd4e335a11697e546f585 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sat, 18 Aug 2018 22:48:12 -0500 Subject: [PATCH 351/670] Throttle Z calculations in roambox code, fix typo on fallback logic range --- zone/mob_ai.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 9c16dc9b6..1ed005033 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1666,8 +1666,14 @@ void NPC::AI_DoMovement() { roambox_destination_x = EQEmu::Clamp((GetX() + move_x), roambox_min_x, roambox_max_x); roambox_destination_y = EQEmu::Clamp((GetY() + move_y), roambox_min_y, roambox_max_y); + /** + * If our roambox was configured with large distances, chances of hitting the min or max end of + * the clamp is high, this causes NPC's to gather on the border of a box, to reduce clustering + * either lower the roambox distance or the code will do a simple random between min - max when it + * hits the min or max of the clamp + */ if (roambox_destination_x == roambox_min_x || roambox_destination_x == roambox_max_x) { - roambox_destination_x = static_cast(zone->random.Real(roambox_min_x, roambox_max_y)); + roambox_destination_x = static_cast(zone->random.Real(roambox_min_x, roambox_max_x)); } if (roambox_destination_y == roambox_min_y || roambox_destination_y == roambox_max_y) { @@ -1692,8 +1698,6 @@ void NPC::AI_DoMovement() { } } - this->FixZ(); - Log(Logs::Detail, Logs::NPCRoamBox, "Calculate | NPC: %s distance %.3f | min_x %.3f | max_x %.3f | final_x %.3f | min_y %.3f | max_y %.3f | final_y %.3f", @@ -1707,9 +1711,11 @@ void NPC::AI_DoMovement() { roambox_destination_y); } - float new_z = this->FindGroundZ(m_Position.x, m_Position.y, 5) + GetZOffset(); + if (fix_z_timer.Check()) { + this->FixZ(); + } - if (!CalculateNewPosition(roambox_destination_x, roambox_destination_y, new_z, move_speed, true)) { + if (!CalculateNewPosition(roambox_destination_x, roambox_destination_y, m_Position.z, move_speed, true)) { time_until_can_move = Timer::GetCurrentTime() + RandomTimer(roambox_min_delay, roambox_delay); SetMoving(false); this->FixZ(); From 86f1cedf9126a93357f4b3705bb255f240d90217 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sat, 18 Aug 2018 23:18:55 -0500 Subject: [PATCH 352/670] Add LOS checks into roambox logic to prevent scaling mountains and going over buildings, cpu cycle saves and logging added. Things are looking really good now --- zone/mob_ai.cpp | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 1ed005033..9a62ef15c 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1685,19 +1685,46 @@ void NPC::AI_DoMovement() { * if the roam box was sloppily configured */ if (!this->GetWasSpawnedInWater()) { - if (zone->zonemap != nullptr && zone->watermap != nullptr) { + if (zone->HasMap() && zone->HasWaterMap()) { auto position = glm::vec3( roambox_destination_x, roambox_destination_y, - this->FindGroundZ(roambox_destination_x, roambox_destination_y, 5) + (m_Position.z - 15) ); if (zone->watermap->InLiquid(position)) { + Log(Logs::Detail, + Logs::NPCRoamBox, "%s | My destination is in water and I don't belong there!", + this->GetCleanName()); + return; } } } + /** + * We check for line of sight because we dont' want NPC's scaling on top of buildings and over ridiculous + * mountains, this also peels back the frequency of pathing as well because we don't want to spam LOS checks + * so if we fail a LOS check to our randomly chosen destination, we roll another timer cycle and wait again + * + * This is also far nicer on CPU since roamboxes are heavy by nature + */ + if (!CheckLosFN( + roambox_destination_x, + roambox_destination_y, + m_Position.z + GetZOffset(), + this->GetSize())) { + + time_until_can_move = Timer::GetCurrentTime() + RandomTimer(roambox_min_delay, roambox_delay); + + Log(Logs::Detail, + Logs::NPCRoamBox, + "%s | Can't see where I want to go... I'll try something else...", + this->GetCleanName()); + + return; + } + Log(Logs::Detail, Logs::NPCRoamBox, "Calculate | NPC: %s distance %.3f | min_x %.3f | max_x %.3f | final_x %.3f | min_y %.3f | max_y %.3f | final_y %.3f", From 4c8018e4cabec486a683b1b8999ccf3bea5521c8 Mon Sep 17 00:00:00 2001 From: Trust Date: Fri, 24 Aug 2018 23:04:29 -0400 Subject: [PATCH 353/670] Prevent Gate if near bind location (Rule) and Heal on Gate (Rule) RULE_INT(NPC, NPCGatePercent, 5) // % at which the NPC Will attempt to gate at. RULE_BOOL(NPC, NPCGateNearBind, false) // Will NPC attempt to gate when near bind location? RULE_INT(NPC, NPCGateDistanceBind, 75) // Distance from bind before NPC will attempt to gate RULE_BOOL(NPC, NPCHealOnGate, true) // Will the NPC Heal on Gate. RULE_REAL(NPC, NPCHealOnGateAmount, 25) // How much the npc will heal on gate if enabled. --- common/ruletypes.h | 5 +++++ zone/mob_ai.cpp | 12 ++++++++---- zone/zoning.cpp | 4 ++++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/common/ruletypes.h b/common/ruletypes.h index 71af49010..da08cb858 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -532,6 +532,11 @@ RULE_INT(NPC, NPCToNPCAggroTimerMin, 500) RULE_INT(NPC, NPCToNPCAggroTimerMax, 6000) RULE_BOOL(NPC, UseClassAsLastName, true) // Uses class archetype as LastName for npcs with none RULE_BOOL(NPC, NewLevelScaling, true) // Better level scaling, use old if new formulas would break your server +RULE_INT(NPC, NPCGatePercent, 5) // % at which the NPC Will attempt to gate at. +RULE_BOOL(NPC, NPCGateNearBind, false) // Will NPC attempt to gate when near bind location? +RULE_INT(NPC, NPCGateDistanceBind, 75) // Distance from bind before NPC will attempt to gate +RULE_BOOL(NPC, NPCHealOnGate, true) // Will the NPC Heal on Gate. +RULE_REAL(NPC, NPCHealOnGateAmount, 25) // How much the npc will heal on gate if enabled. RULE_CATEGORY_END() RULE_CATEGORY(Aggro) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 9a62ef15c..dc8e3447f 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -201,10 +201,14 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes, bool bInnates // If min_hp !=0 then the spell list has specified // custom range and we're inside that range if we // made it here. The hard coded <=5 is for unspecified. - if (AIspells[i].min_hp != 0 || GetHPRatio() <= 5) - { - AIDoSpellCast(i, tar, mana_cost); - return true; + if (GetHPRatio() <= (RuleI(NPC, NPCGatePercent))) { + auto npcSpawnPoint = CastToNPC()->GetSpawnPoint(); + if (!RuleB(NPC, NPCGateNearBind) && DistanceNoZ(m_Position, npcSpawnPoint) < RuleI(NPC, NPCGateDistanceBind)) { + break; + } else { + AIDoSpellCast(i, tar, mana_cost); + return true; + } } break; } diff --git a/zone/zoning.cpp b/zone/zoning.cpp index cbd928f21..9dcf0a774 100644 --- a/zone/zoning.cpp +++ b/zone/zoning.cpp @@ -717,6 +717,10 @@ void Client::GoToSafeCoords(uint16 zone_id, uint16 instance_id) { void Mob::Gate(uint8 bindnum) { GoToBind(bindnum); + if (RuleB(NPC, NPCHealOnGate) && this->IsNPC() && this->GetHPRatio() <= RuleR(NPC, NPCHealOnGateAmount)) { + auto HealAmount = (RuleR(NPC, NPCHealOnGateAmount) / 100); + SetHP(int(this->GetMaxHP() * HealAmount)); + } } void Client::Gate(uint8 bindnum) { From 62f9816aa89fbaa37a3078428d3f0aedba1fd1ba Mon Sep 17 00:00:00 2001 From: Trust Date: Sat, 25 Aug 2018 19:46:37 -0400 Subject: [PATCH 354/670] Returned Logic from PR #766 --- zone/mob_ai.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index dc8e3447f..58088a35b 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -200,8 +200,8 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes, bool bInnates case SpellType_Escape: { // If min_hp !=0 then the spell list has specified // custom range and we're inside that range if we - // made it here. The hard coded <=5 is for unspecified. - if (GetHPRatio() <= (RuleI(NPC, NPCGatePercent))) { + // made it here. + if (AIspells[i].min_hp != 0 || GetHPRatio() <= (RuleI(NPC, NPCGatePercent))) { auto npcSpawnPoint = CastToNPC()->GetSpawnPoint(); if (!RuleB(NPC, NPCGateNearBind) && DistanceNoZ(m_Position, npcSpawnPoint) < RuleI(NPC, NPCGateDistanceBind)) { break; From eb3327970158bba58c6ea2cc7417ad3f05a11a28 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 26 Aug 2018 22:19:56 -0400 Subject: [PATCH 355/670] Reset various pet command states This will prevent charm exploits --- zone/spell_effects.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index e7d182105..7e8db6930 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -3928,6 +3928,12 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses) Mob* tempmob = GetOwner(); SetOwnerID(0); SetPetType(petNone); + SetHeld(false); + SetGHeld(false); + SetNoCast(false); + SetFocused(false); + SetPetStop(false); + SetPetRegroup(false); if(tempmob) { tempmob->SetPet(0); From 766dcc464e7312f11e7d0136b247c14eaa87c13d Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Mon, 27 Aug 2018 12:56:46 -0400 Subject: [PATCH 356/670] Fix crash --- zone/fearpath.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/fearpath.cpp b/zone/fearpath.cpp index 722e1e417..168dd2ce6 100644 --- a/zone/fearpath.cpp +++ b/zone/fearpath.cpp @@ -132,7 +132,7 @@ void Mob::ProcessFlee() Mob *hate_top = GetHateTop(); // If no special flee_percent check for Gray or Other con rates - if(GetLevelCon(hate_top->GetLevel(), GetLevel()) == CON_GRAY && fleeratio == 0 && RuleB(Combat, FleeGray)) { + if(hate_top != nullptr && GetLevelCon(hate_top->GetLevel(), GetLevel()) == CON_GRAY && fleeratio == 0 && RuleB(Combat, FleeGray)) { fleeratio = RuleI(Combat, FleeGrayHPRatio); } else if(fleeratio == 0) { fleeratio = RuleI(Combat, FleeHPRatio ); From 555c9004b9bbd45d009bf258f57b9195f0195153 Mon Sep 17 00:00:00 2001 From: Chris Miles Date: Mon, 27 Aug 2018 23:46:10 -0500 Subject: [PATCH 357/670] Update eqemu_server.pl [skip ci] --- utils/scripts/eqemu_server.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/utils/scripts/eqemu_server.pl b/utils/scripts/eqemu_server.pl index 9201a9e27..eed4a767e 100644 --- a/utils/scripts/eqemu_server.pl +++ b/utils/scripts/eqemu_server.pl @@ -40,7 +40,12 @@ if($Config{osname}=~/freebsd|linux/i){ if($Config{osname}=~/Win|MS/i){ $OS = "Windows"; } + $has_internet_connection = check_internet_connection(); +if(-e "skip_internet_connection_check.txt"){ + $has_internet_connection = 1; +} + ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(); if(-e "eqemu_server_skip_update.txt"){ From 12f19fd824512da20bcddc2f0d5f1f745b2d3411 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Tue, 28 Aug 2018 00:27:50 -0500 Subject: [PATCH 358/670] Update system_tables.txt [skip ci] --- utils/sql/system_tables.txt | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/utils/sql/system_tables.txt b/utils/sql/system_tables.txt index 7816fea21..a5692dabd 100644 --- a/utils/sql/system_tables.txt +++ b/utils/sql/system_tables.txt @@ -1,11 +1,10 @@ aa_ability aa_actions aa_effects -aa_required_level_cost -aa_ranks aa_rank_effects aa_rank_prereqs -task_activities +aa_ranks +aa_required_level_cost adventure_template adventure_template_entry adventure_template_entry_flavor @@ -18,6 +17,7 @@ char_create_combinations char_create_point_allocations class_skill damageshieldtypes +data_buckets doors faction_list faction_list_mod @@ -33,38 +33,39 @@ ground_spawns horses instance_list items -ldon_trap_templates ldon_trap_entries +ldon_trap_templates level_exp_mods +logsys_categories lootdrop lootdrop_entries loottable loottable_entries merc_armorinfo -merc_weaponinfo -merc_stats +merc_buffs +merc_inventory merc_merchant_entries merc_merchant_template_entries merc_merchant_templates -merc_stance_entries -merc_templates -merc_npc_types merc_name_types -merc_subtypes -merc_types +merc_npc_types merc_spell_list_entries merc_spell_lists -merc_buffs -mercs -merc_inventory +merc_stance_entries +merc_stats +merc_subtypes +merc_templates +merc_types +merc_weaponinfo merchantlist +mercs npc_emotes npc_faction npc_faction_entries npc_spells -npc_spells_entries npc_spells_effects npc_spells_effects_entries +npc_spells_entries npc_types npc_types_metadata npc_types_tint @@ -77,14 +78,15 @@ races saylink skill_caps spawn2 -spawn_conditions spawn_condition_values +spawn_conditions spawn_events spawnentry spawngroup spells_new start_zones starting_items +task_activities tasks tasksets titles From d4e0e8aea254b57c7fcbeb8dc9f451278b6b9097 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Tue, 28 Aug 2018 00:55:06 -0500 Subject: [PATCH 359/670] Revert LOS check code until further refinement --- zone/mob_ai.cpp | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 58088a35b..405ff3643 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1706,29 +1706,6 @@ void NPC::AI_DoMovement() { } } - /** - * We check for line of sight because we dont' want NPC's scaling on top of buildings and over ridiculous - * mountains, this also peels back the frequency of pathing as well because we don't want to spam LOS checks - * so if we fail a LOS check to our randomly chosen destination, we roll another timer cycle and wait again - * - * This is also far nicer on CPU since roamboxes are heavy by nature - */ - if (!CheckLosFN( - roambox_destination_x, - roambox_destination_y, - m_Position.z + GetZOffset(), - this->GetSize())) { - - time_until_can_move = Timer::GetCurrentTime() + RandomTimer(roambox_min_delay, roambox_delay); - - Log(Logs::Detail, - Logs::NPCRoamBox, - "%s | Can't see where I want to go... I'll try something else...", - this->GetCleanName()); - - return; - } - Log(Logs::Detail, Logs::NPCRoamBox, "Calculate | NPC: %s distance %.3f | min_x %.3f | max_x %.3f | final_x %.3f | min_y %.3f | max_y %.3f | final_y %.3f", From b92e83a465639126383c4217eac3c050cfedbf0e Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 3 Sep 2018 01:51:40 -0500 Subject: [PATCH 360/670] Fix client pathing Z while feared --- zone/mob.h | 2 +- zone/mob_ai.cpp | 42 ++++++++++++++++++++++++------------------ zone/waypoints.cpp | 36 ++++++++++++++++++++++-------------- 3 files changed, 47 insertions(+), 33 deletions(-) diff --git a/zone/mob.h b/zone/mob.h index 763fa61b7..4dafe2bf9 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -988,7 +988,7 @@ public: void SendToFixZ(float new_x, float new_y, float new_z); float GetZOffset() const; float GetDefaultRaceSize() const; - void FixZ(int32 z_find_offset = 5); + void FixZ(int32 z_find_offset = 5, bool fix_client_z = false); float GetFixedZ(glm::vec3 destination, int32 z_find_offset = 5); void NPCSpecialAttacks(const char* parse, int permtag, bool reset = true, bool remove = false); diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 405ff3643..fcc54f244 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -779,44 +779,50 @@ void Client::AI_Process() } } - if(RuleB(Combat, EnableFearPathing)){ - if(currently_fleeing) { + if (RuleB(Combat, EnableFearPathing)) { + if (currently_fleeing) { - if (fix_z_timer_engaged.Check()) - this->FixZ(); + if (fix_z_timer.Check()) + this->FixZ(5, true); - if(IsRooted()) { + if (IsRooted()) { //make sure everybody knows were not moving, for appearance sake - if(IsMoving()) - { - if(GetTarget()) + if (IsMoving()) { + if (GetTarget()) SetHeading(CalculateHeadingToTarget(GetTarget()->GetX(), GetTarget()->GetY())); SetCurrentSpeed(0); } //continue on to attack code, ensuring that we execute the engaged code engaged = true; - } else { - if(AI_movement_timer->Check()) { + } + else { + if (AI_movement_timer->Check()) { int speed = GetFearSpeed(); animation = speed; speed *= 2; SetCurrentSpeed(speed); // Check if we have reached the last fear point if ((std::abs(GetX() - m_FearWalkTarget.x) < 0.1) && - (std::abs(GetY() - m_FearWalkTarget.y) < 0.1)) { + (std::abs(GetY() - m_FearWalkTarget.y) < 0.1)) { // Calculate a new point to run to CalculateNewFearpoint(); } - if(!RuleB(Pathing, Fear) || !zone->pathing) + + if (!RuleB(Pathing, Fear) || !zone->pathing) CalculateNewPosition(m_FearWalkTarget.x, m_FearWalkTarget.y, m_FearWalkTarget.z, speed, true); - else - { - bool WaypointChanged, NodeReached; + else { + bool waypoint_changed, node_reached; - glm::vec3 Goal = UpdatePath(m_FearWalkTarget.x, m_FearWalkTarget.y, m_FearWalkTarget.z, - speed, WaypointChanged, NodeReached); + glm::vec3 Goal = UpdatePath( + m_FearWalkTarget.x, + m_FearWalkTarget.y, + m_FearWalkTarget.z, + speed, + waypoint_changed, + node_reached + ); - if(WaypointChanged) + if (waypoint_changed) tar_ndx = 20; CalculateNewPosition(Goal.x, Goal.y, Goal.z, speed); diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index 5e1f0dd82..36c996ce8 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -793,26 +793,34 @@ float Mob::GetFixedZ(glm::vec3 destination, int32 z_find_offset) { return new_z; } -void Mob::FixZ(int32 z_find_offset /*= 5*/) { +void Mob::FixZ(int32 z_find_offset /*= 5*/, bool fix_client_z /*= false*/) { glm::vec3 current_loc(m_Position); - float new_z = GetFixedZ(current_loc, z_find_offset); - if (!IsClient() && new_z != m_Position.z) { - if ((new_z > -2000) && new_z != BEST_Z_INVALID) { - if (RuleB(Map, MobZVisualDebug)) { - this->SendAppearanceEffect(78, 0, 0, 0, 0); - } + if (IsClient() && !fix_client_z) + return; - m_Position.z = new_z; + float new_z = GetFixedZ(current_loc, z_find_offset); + + if (new_z == m_Position.z) + return; + + if ((new_z > -2000) && new_z != BEST_Z_INVALID) { + if (RuleB(Map, MobZVisualDebug)) { + this->SendAppearanceEffect(78, 0, 0, 0, 0); } - else { - if (RuleB(Map, MobZVisualDebug)) { - this->SendAppearanceEffect(103, 0, 0, 0, 0); - } - Log(Logs::General, Logs::FixZ, "%s is failing to find Z %f", - this->GetCleanName(), std::abs(m_Position.z - new_z)); + m_Position.z = new_z; + } + else { + if (RuleB(Map, MobZVisualDebug)) { + this->SendAppearanceEffect(103, 0, 0, 0, 0); } + + Log(Logs::General, + Logs::FixZ, + "%s is failing to find Z %f", + this->GetCleanName(), + std::abs(m_Position.z - new_z)); } } From 6fc20939e816463d85e532cd9bca68d832e9a9df Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 3 Sep 2018 02:11:39 -0500 Subject: [PATCH 361/670] Fix for edge case with roambox water logic --- zone/mob_ai.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index fcc54f244..9fe43e1ea 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1702,6 +1702,14 @@ void NPC::AI_DoMovement() { (m_Position.z - 15) ); + /** + * If someone brought us into water when we naturally wouldn't path there, return to spawn + */ + if (zone->watermap->InLiquid(position) && zone->watermap->InLiquid(m_Position)) { + roambox_destination_x = m_SpawnPoint.x; + roambox_destination_y = m_SpawnPoint.y; + } + if (zone->watermap->InLiquid(position)) { Log(Logs::Detail, Logs::NPCRoamBox, "%s | My destination is in water and I don't belong there!", From fc071d1d2f3ed6aae43aeaff730b7efd0f4ca28c Mon Sep 17 00:00:00 2001 From: KimLS Date: Mon, 3 Sep 2018 00:20:43 -0700 Subject: [PATCH 362/670] Set CMP0074 --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 817af542c..aa2716c91 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,7 @@ #EQEMU_MAP_DIR CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +cmake_policy(SET CMP0074 NEW) #FindMySQL is located here so lets make it so CMake can find it SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/" ${CMAKE_MODULE_PATH}) From 9b09891aa58037b34a1bbb393bcbf94ed00278ef Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 3 Sep 2018 00:30:50 -0700 Subject: [PATCH 363/670] Revert "Adjusted zlib cmake to honor policy CMP0074 warning" --- CMakeLists.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a3e8e3949..aa2716c91 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,8 +55,7 @@ ENDIF(MSVC OR MINGW) IF(MSVC) IF(CMAKE_CL_64) - SET(ZLIB_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/zlib_x64/include") - SET(ZLIB_LIBRARY "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/zlib_x64/lib/zlib.lib") + SET(ZLIB_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/zlib_x64") SET(MYSQL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/mysql_x64") SET(LUA_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/luaj_x64") SET(OPENSSL_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/openssl_x64") @@ -69,8 +68,7 @@ IF(MSVC) SET(SODIUM_LIBRARY_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/x64/Release/v110/dynamic") ENDIF() ELSE(CMAKE_CL_64) - SET(ZLIB_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/zlib_x86/include") - SET(ZLIB_LIBRARY "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/zlib_x86/lib/zlib.lib") + SET(ZLIB_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/zlib_x86") SET(MYSQL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/mysql_x86") SET(LUA_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/luaj_x86") SET(SODIUM_INCLUDE_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/include") From d2340d3f2e0dbf3ba2106c28eae5f558be9a8298 Mon Sep 17 00:00:00 2001 From: KimLS Date: Mon, 3 Sep 2018 00:41:59 -0700 Subject: [PATCH 364/670] Fix for missing policy --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aa2716c91..9f3694698 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,9 @@ #EQEMU_MAP_DIR CMAKE_MINIMUM_REQUIRED(VERSION 2.8) -cmake_policy(SET CMP0074 NEW) +IF(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) +ENDIF() #FindMySQL is located here so lets make it so CMake can find it SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/" ${CMAKE_MODULE_PATH}) From 8a28e8500d9b8202545fc6fda5e65b98d0872436 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 3 Sep 2018 03:06:23 -0500 Subject: [PATCH 365/670] Make fear and fleeing respect navmesh for both clients and NPCs --- zone/fearpath.cpp | 29 +++++++++++++++-------------- zone/mob_ai.cpp | 8 ++++++-- zone/zone.cpp | 6 +++--- 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/zone/fearpath.cpp b/zone/fearpath.cpp index 168dd2ce6..c73ec448e 100644 --- a/zone/fearpath.cpp +++ b/zone/fearpath.cpp @@ -155,42 +155,43 @@ void Mob::ProcessFlee() } } -void Mob::CalculateNewFearpoint() -{ - if(RuleB(Pathing, Fear) && zone->pathing) - { +void Mob::CalculateNewFearpoint() { + if (RuleB(Pathing, Fear) && zone->pathing) { auto Node = zone->pathing->GetRandomLocation(); if (Node.x != 0.0f || Node.y != 0.0f || Node.z != 0.0f) { ++Node.z; - m_FearWalkTarget = Node; + m_FearWalkTarget = Node; + currently_fleeing = true; + return; } - Log(Logs::Detail, Logs::None, "No path found to selected node. Falling through to old fear point selection."); + Log(Logs::Detail, + Logs::Pathing, + "No path found to selected node. Falling through to old fear point selection."); } - int loop = 0; + int loop = 0; float ranx, rany, ranz; currently_fleeing = true; while (loop < 100) //Max 100 tries { - int ran = 250 - (loop*2); + int ran = 250 - (loop * 2); loop++; - ranx = GetX()+zone->random.Int(0, ran-1)-zone->random.Int(0, ran-1); - rany = GetY()+zone->random.Int(0, ran-1)-zone->random.Int(0, ran-1); - ranz = FindGroundZ(ranx,rany); + ranx = GetX() + zone->random.Int(0, ran - 1) - zone->random.Int(0, ran - 1); + rany = GetY() + zone->random.Int(0, ran - 1) - zone->random.Int(0, ran - 1); + ranz = FindGroundZ(ranx, rany); if (ranz == BEST_Z_INVALID) continue; float fdist = ranz - GetZ(); - if (fdist >= -12 && fdist <= 12 && CheckCoordLosNoZLeaps(GetX(),GetY(),GetZ(),ranx,rany,ranz)) - { + if (fdist >= -12 && fdist <= 12 && CheckCoordLosNoZLeaps(GetX(), GetY(), GetZ(), ranx, rany, ranz)) { break; } } if (currently_fleeing) - m_FearWalkTarget = glm::vec3(ranx, rany, ranz); + m_FearWalkTarget = glm::vec3(ranx, rany, ranz); } diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 9fe43e1ea..2ba5cea7f 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1142,8 +1142,12 @@ void Mob::AI_Process() { bool WaypointChanged, NodeReached; glm::vec3 Goal = UpdatePath( - m_FearWalkTarget.x, m_FearWalkTarget.y, m_FearWalkTarget.z, - GetFearSpeed(), WaypointChanged, NodeReached + m_FearWalkTarget.x, + m_FearWalkTarget.y, + m_FearWalkTarget.z, + GetFearSpeed(), + WaypointChanged, + NodeReached ); if (WaypointChanged) diff --git a/zone/zone.cpp b/zone/zone.cpp index d43527c4f..3b9e5e513 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -904,10 +904,10 @@ bool Zone::Init(bool iStaticZone) { RuleManager::Instance()->LoadRules(&database, r_name.c_str()); } } - - zone->zonemap = Map::LoadMapFile(zone->map_name); + + zone->zonemap = Map::LoadMapFile(zone->map_name); zone->watermap = WaterMap::LoadWaterMapfile(zone->map_name); - zone->pathing = IPathfinder::Load(zone->map_name); + zone->pathing = IPathfinder::Load(zone->map_name); Log(Logs::General, Logs::Status, "Loading spawn conditions..."); if(!spawn_conditions.LoadSpawnConditions(short_name, instanceid)) { From 395cf2e8ce5c04682a1386cbc74fa89ed82e0579 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 3 Sep 2018 03:46:48 -0500 Subject: [PATCH 366/670] Roambox logic now uses navmesh --- zone/mob_ai.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 2ba5cea7f..854a9a339 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1741,7 +1741,20 @@ void NPC::AI_DoMovement() { this->FixZ(); } - if (!CalculateNewPosition(roambox_destination_x, roambox_destination_y, m_Position.z, move_speed, true)) { + bool waypoint_changed, node_reached; + + glm::vec3 Goal = UpdatePath( + roambox_destination_x, + roambox_destination_y, + GetGroundZ(roambox_destination_x, roambox_destination_y), + move_speed, + waypoint_changed, + node_reached + ); + + CalculateNewPosition(Goal.x, Goal.y, Goal.z, move_speed, true); + + if (m_Position.x == roambox_destination_x && m_Position.y == roambox_destination_y) { time_until_can_move = Timer::GetCurrentTime() + RandomTimer(roambox_min_delay, roambox_delay); SetMoving(false); this->FixZ(); From 4a4668b36a6de1905f8833f6752df37075443652 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 3 Sep 2018 03:54:15 -0500 Subject: [PATCH 367/670] Remove an unecessary costly z calc --- zone/mob_ai.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 854a9a339..ac40d30e4 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1746,7 +1746,7 @@ void NPC::AI_DoMovement() { glm::vec3 Goal = UpdatePath( roambox_destination_x, roambox_destination_y, - GetGroundZ(roambox_destination_x, roambox_destination_y), + m_Position.z, move_speed, waypoint_changed, node_reached From 3eee699a890e1f31cdb57ac00cba961485b484c3 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 3 Sep 2018 04:07:13 -0500 Subject: [PATCH 368/670] Calculate roambox destination z once and let navmesh pathfinding calculate it the rest of the time --- zone/mob_ai.cpp | 13 ++++++++----- zone/npc.h | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index ac40d30e4..bf09feb73 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -466,6 +466,7 @@ void NPC::AI_Init() roambox_distance = 0; roambox_destination_x = 0; roambox_destination_y = 0; + roambox_destination_z = 0; roambox_min_delay = 2500; roambox_delay = 2500; } @@ -1724,6 +1725,12 @@ void NPC::AI_DoMovement() { } } + glm::vec3 destination; + destination.x = roambox_destination_x; + destination.y = roambox_destination_y; + destination.z = m_Position.z; + roambox_destination_z = GetFixedZ(destination) + this->GetZOffset(); + Log(Logs::Detail, Logs::NPCRoamBox, "Calculate | NPC: %s distance %.3f | min_x %.3f | max_x %.3f | final_x %.3f | min_y %.3f | max_y %.3f | final_y %.3f", @@ -1737,16 +1744,12 @@ void NPC::AI_DoMovement() { roambox_destination_y); } - if (fix_z_timer.Check()) { - this->FixZ(); - } - bool waypoint_changed, node_reached; glm::vec3 Goal = UpdatePath( roambox_destination_x, roambox_destination_y, - m_Position.z, + roambox_destination_z, move_speed, waypoint_changed, node_reached diff --git a/zone/npc.h b/zone/npc.h index 52c8b2171..ec2676f60 100644 --- a/zone/npc.h +++ b/zone/npc.h @@ -540,6 +540,7 @@ protected: float roambox_distance; float roambox_destination_x; float roambox_destination_y; + float roambox_destination_z; uint32 roambox_delay; uint32 roambox_min_delay; From 935dde797c4a242a17346c6e8fcf78ba33039e6d Mon Sep 17 00:00:00 2001 From: Trust Date: Mon, 3 Sep 2018 09:34:14 -0400 Subject: [PATCH 369/670] Prevents players from /assist to see if a mob is up due to error or no error messages. --- zone/client_packet.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 5cafbaee2..8fee2460a 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -2950,7 +2950,11 @@ void Client::Handle_OP_Assist(const EQApplicationPacket *app) Distance(m_Position, assistee->GetPosition()) <= TARGETING_RANGE)) { SetAssistExemption(true); eid->entity_id = new_target->GetID(); + } else { + eid->entity_id = 0; } + } else { + eid->entity_id = 0; } } From feb4cc37c6c38a51a38c4e96c9bf9e609d086c6a Mon Sep 17 00:00:00 2001 From: Uleat Date: Mon, 3 Sep 2018 20:57:20 -0400 Subject: [PATCH 370/670] Rework of 'invsnapshot' command and implementation of automatic inventory snapshots --- changelog.txt | 12 + common/database.cpp | 23 +- common/database.h | 3 +- common/features.h | 3 +- common/shareddb.cpp | 4 +- utils/sql/character_table_list.txt | 1 + utils/sql/data_tables.txt | 2 +- utils/sql/db_update_manifest.txt | 4 +- .../sql/git/bots/bots_db_update_manifest.txt | 2 +- .../2018_08_13_bots_inventory_update.sql | 2 +- .../required/2018_08_13_inventory_update.sql | 33 +- .../2018_08_13_inventory_version_update.sql | 62 ++- utils/sql/user_tables.txt | 1 + zone/client.cpp | 2 +- zone/client_process.cpp | 13 + zone/command.cpp | 356 +++++++++++++++- zone/zonedb.cpp | 390 +++++++++++++++--- zone/zonedb.h | 12 +- 18 files changed, 826 insertions(+), 99 deletions(-) diff --git a/changelog.txt b/changelog.txt index d98bb965f..e9623f293 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,17 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 09/03/2018 == +Uleat: Rework of 'invsnapshot' command and implementation of automatic inventory snapshots. + - Inventory snapshots are now taken automatically using the interval rule values - if snapshots are enabled + - Command 'invsnapshot' now has more options available to include a restore feature + -- A pop-up help menu is available + -- argument 'capture' is available to anyone with status high enough to register the command + -- Advanced options are only available to players with 150 status or greater + -- argument 'list' provides a list of "timestamp : item count" entries + -- argument 'parse' displays a "slot : item id : item name" listing of valid snapshots by timestamp + -- argument 'compare' shows a 'difference' comparison of "snapshot-to-inventory" changes + -- argument 'restore' applies a saved snapshot to the player's inventory (with a pre-clearing call) + == 08/13/2018 == Uleat: Activation of RoF+ clients' two additional general slots and integration of SoF+ clients' PowerSource slot - Inventory 'Possessions' main slots are now contiguous and implemented to RoF2 standards diff --git a/common/database.cpp b/common/database.cpp index 447037ae7..b6c752dd1 100644 --- a/common/database.cpp +++ b/common/database.cpp @@ -2111,10 +2111,27 @@ void Database::LoadLogSettings(EQEmuLogSys::LogSettings* log_settings) } } -void Database::ClearInvSnapshots(bool use_rule) -{ +int Database::CountInvSnapshots() { + std::string query = StringFormat("SELECT COUNT(*) FROM (SELECT * FROM `inventory_snapshots` a GROUP BY `charid`, `time_index`) b"); + auto results = QueryDatabase(query); + + if (!results.Success()) + return -1; + + auto row = results.begin(); + + int64 count = atoll(row[0]); + if (count > INT_MAX) + return -2; + if (count < 0) + return -3; + + return count; +} + +void Database::ClearInvSnapshots(bool from_now) { uint32 del_time = time(nullptr); - if (use_rule) { del_time -= RuleI(Character, InvSnapshotHistoryD) * 86400; } + if (!from_now) { del_time -= RuleI(Character, InvSnapshotHistoryD) * 86400; } std::string query = StringFormat("DELETE FROM inventory_snapshots WHERE time_index <= %lu", (unsigned long)del_time); QueryDatabase(query); diff --git a/common/database.h b/common/database.h index c6d90e422..307390edf 100644 --- a/common/database.h +++ b/common/database.h @@ -264,7 +264,8 @@ public: void SetLFP(uint32 CharID, bool LFP); void SetLoginFlags(uint32 CharID, bool LFP, bool LFG, uint8 firstlogon); - void ClearInvSnapshots(bool use_rule = true); + int CountInvSnapshots(); + void ClearInvSnapshots(bool from_now = false); /* EQEmuLogSys */ void LoadLogSettings(EQEmuLogSys::LogSettings* log_settings); diff --git a/common/features.h b/common/features.h index a80fb9f3c..38f238617 100644 --- a/common/features.h +++ b/common/features.h @@ -268,7 +268,8 @@ enum { commandBanPlayers = 100, //can set bans on players commandChangeDatarate = 201, //edit client's data rate commandZoneToCoords = 0, //can #zone with coords - commandInterrogateInv = 100 //below this == only log on error state and self-only target dump + commandInterrogateInv = 100, //below this == only log on error state and self-only target dump + commandInvSnapshot = 150 //ability to clear/restore snapshots }; //default states for logging flag on NPCs and clients (having NPCs on by default is prolly a bad idea) diff --git a/common/shareddb.cpp b/common/shareddb.cpp index 2d0e50125..9e0cd5f7e 100644 --- a/common/shareddb.cpp +++ b/common/shareddb.cpp @@ -720,10 +720,10 @@ bool SharedDatabase::GetInventory(uint32 char_id, EQEmu::InventoryProfile *inv) if (cv_conflict) { char char_name[64] = ""; GetCharName(char_id, char_name); - Log(Logs::General, Logs::Client_Login, + Log(Logs::Moderate, Logs::Client_Login, "ClientVersion conflict during inventory load at zone entry for '%s' (charid: %u, inver: %s)", char_name, char_id, EQEmu::versions::MobVersionName(inv->InventoryVersion()) - ); // this can be changed to moderate after live testing + ); } // Retrieve shared inventory diff --git a/utils/sql/character_table_list.txt b/utils/sql/character_table_list.txt index 4d70051ec..8a47abf67 100644 --- a/utils/sql/character_table_list.txt +++ b/utils/sql/character_table_list.txt @@ -31,6 +31,7 @@ friends guild_members instance_list_player inventory +inventory_snapshots keyring mail player_titlesets diff --git a/utils/sql/data_tables.txt b/utils/sql/data_tables.txt index 0638c3bd5..8738c716b 100644 --- a/utils/sql/data_tables.txt +++ b/utils/sql/data_tables.txt @@ -1,5 +1,5 @@ command_settings -inventory_version +inventory_versions launcher rule_sets rule_values diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index b844ddfa8..916833777 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -379,8 +379,8 @@ 9123|2018_07_07_data_buckets.sql|SHOW TABLES LIKE 'data_buckets'|empty| 9124|2018_07_09_tasks.sql|SHOW COLUMNS FROM `tasks` LIKE 'type'|empty| 9125|2018_07_20_task_emote.sql|SHOW COLUMNS FROM `tasks` LIKE 'completion_emote'|empty| -9126|2018_08_13_inventory_version_update.sql|SHOW COLUMNS FROM `inventory_version` LIKE 'bot_step'|empty| -9127|2018_08_13_inventory_update.sql|SELECT * FROM `inventory_version` WHERE `version` = 2 and `step` = 0|not_empty| +9126|2018_08_13_inventory_version_update.sql|SHOW TABLES LIKE 'inventory_versions'|empty| +9127|2018_08_13_inventory_update.sql|SELECT * FROM `inventory_versions` WHERE `version` = 2 and `step` = 0|not_empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/utils/sql/git/bots/bots_db_update_manifest.txt b/utils/sql/git/bots/bots_db_update_manifest.txt index 3e7b3032b..3496ce8d2 100644 --- a/utils/sql/git/bots/bots_db_update_manifest.txt +++ b/utils/sql/git/bots/bots_db_update_manifest.txt @@ -18,7 +18,7 @@ 9017|2017_03_26_bots_spells_id_fix_for_saved_shadowknight_bots.sql|SELECT * FROM `bot_data` WHERE `class` = '5' AND `spells_id` = '3004'|not_empty| 9018|2018_02_02_Bot_Spells_Min_Max_HP.sql|SHOW COLUMNS FROM `bot_spells_entries` LIKE 'min_hp'|empty| 9019|2018_04_12_bots_stop_melee_level.sql|SHOW COLUMNS FROM `bot_data` LIKE 'stop_melee_level'|empty| -9020|2018_08_13_bots_inventory_update.sql|SELECT * FROM `inventory_version` WHERE `version` = 2 and `bot_step` = 0|not_empty| +9020|2018_08_13_bots_inventory_update.sql|SELECT * FROM `inventory_versions` WHERE `version` = 2 and `bot_step` = 0|not_empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/utils/sql/git/bots/required/2018_08_13_bots_inventory_update.sql b/utils/sql/git/bots/required/2018_08_13_bots_inventory_update.sql index 07f5446aa..94ca630c2 100644 --- a/utils/sql/git/bots/required/2018_08_13_bots_inventory_update.sql +++ b/utils/sql/git/bots/required/2018_08_13_bots_inventory_update.sql @@ -2,4 +2,4 @@ UPDATE `bot_inventories` SET `slot_id` = 22 WHERE `slot_id` = 21; -- adjust ammo slot UPDATE `bot_inventories` SET `slot_id` = 21 WHERE `slot_id` = 9999; -- adjust powersource slot -UPDATE `inventory_version` SET `bot_step` = 1 WHERE `version` = 2; \ No newline at end of file +UPDATE `inventory_versions` SET `bot_step` = 1 WHERE `version` = 2; \ No newline at end of file diff --git a/utils/sql/git/required/2018_08_13_inventory_update.sql b/utils/sql/git/required/2018_08_13_inventory_update.sql index 646b1f80e..7021b234c 100644 --- a/utils/sql/git/required/2018_08_13_inventory_update.sql +++ b/utils/sql/git/required/2018_08_13_inventory_update.sql @@ -1,3 +1,14 @@ +-- create inventory v1 backup +SELECT @pre_timestamp := UNIX_TIMESTAMP(NOW()); +INSERT INTO `inventory_snapshots_v1_bak` + (`time_index`,`charid`,`slotid`,`itemid`,`charges`,`color`,`augslot1`,`augslot2`,`augslot3`,`augslot4`, + `augslot5`,`augslot6`,`instnodrop`,`custom_data`,`ornamenticon`,`ornamentidfile`,`ornament_hero_model`) +SELECT + @pre_timestamp, `charid`, `slotid`, `itemid`, `charges`, `color`, `augslot1`, `augslot2`, `augslot3`, `augslot4`, + `augslot5`,`augslot6`,`instnodrop`,`custom_data`,`ornamenticon`,`ornamentidfile`,`ornament_hero_model` +FROM `inventory`; + + -- update equipable slots in `items` table SELECT 'pre-transform count..', (SELECT COUNT(id) FROM `items` WHERE `slots` & (3 << 21)) total, @@ -21,15 +32,6 @@ UPDATE `inventory` SET `slotid` = 22 WHERE `slotid` = 21; -- adjust ammo slot UPDATE `inventory` SET `slotid` = 21 WHERE `slotid` = 9999; -- adjust powersource slot --- update `inventory_snapshots` slots -UPDATE `inventory_snapshots` SET `slotid` = 33 WHERE `slotid` = 30; -- adjust cursor -UPDATE `inventory_snapshots` SET `slotid` = (`slotid` + 20) WHERE `slotid` >= 331 AND `slotid` <= 340; -- adjust cursor bags -UPDATE `inventory_snapshots` SET `slotid` = (`slotid` + 1) WHERE `slotid` >= 22 AND `slotid` <= 29; -- adjust general slots --- current general bags remain the same -UPDATE `inventory_snapshots` SET `slotid` = 22 WHERE `slotid` = 21; -- adjust ammo slot -UPDATE `inventory_snapshots` SET `slotid` = 21 WHERE `slotid` = 9999; -- adjust powersource slot - - -- update `character_corpse_items` slots UPDATE `character_corpse_items` SET `equip_slot` = 33 WHERE `equip_slot` = 30; -- adjust cursor UPDATE `character_corpse_items` SET `equip_slot` = (`equip_slot` + 20) WHERE `equip_slot` >= 331 AND `equip_slot` <= 340; -- adjust cursor bags @@ -42,4 +44,15 @@ UPDATE `character_corpse_items` SET `equip_slot` = 21 WHERE `equip_slot` = 9999; -- update `character_pet_inventory` slots UPDATE `character_pet_inventory` SET `slot` = 22 WHERE `slot` = 21; -- adjust ammo slot -UPDATE `inventory_version` SET `step` = 1 WHERE `version` = 2; +UPDATE `inventory_versions` SET `step` = 1 WHERE `version` = 2; + + +-- create initial inventory v2 snapshots +SELECT @post_timestamp := UNIX_TIMESTAMP(NOW()); +INSERT INTO `inventory_snapshots` + (`time_index`,`charid`,`slotid`,`itemid`,`charges`,`color`,`augslot1`,`augslot2`,`augslot3`,`augslot4`, + `augslot5`,`augslot6`,`instnodrop`,`custom_data`,`ornamenticon`,`ornamentidfile`,`ornament_hero_model`) +SELECT + @post_timestamp, `charid`, `slotid`, `itemid`, `charges`, `color`, `augslot1`, `augslot2`, `augslot3`, `augslot4`, + `augslot5`,`augslot6`,`instnodrop`,`custom_data`,`ornamenticon`,`ornamentidfile`,`ornament_hero_model` +FROM `inventory`; diff --git a/utils/sql/git/required/2018_08_13_inventory_version_update.sql b/utils/sql/git/required/2018_08_13_inventory_version_update.sql index ac7a7263c..f8fc33162 100644 --- a/utils/sql/git/required/2018_08_13_inventory_version_update.sql +++ b/utils/sql/git/required/2018_08_13_inventory_version_update.sql @@ -1 +1,61 @@ -ALTER TABLE `inventory_version` ADD COLUMN `bot_step` INT(11) UNSIGNED NOT NULL DEFAULT '0' AFTER `step`; +DROP TABLE IF EXISTS `inventory_version`; +DROP TABLE IF EXISTS `inventory_snapshots`; + + +CREATE TABLE `inventory_versions` ( + `version` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `step` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `bot_step` INT(11) UNSIGNED NOT NULL DEFAULT '0' +) +COLLATE='latin1_swedish_ci' +ENGINE=MyISAM; + +INSERT INTO `inventory_versions` VALUES (2, 0, 0); + + +CREATE TABLE `inventory_snapshots` ( + `time_index` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `charid` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `slotid` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', + `itemid` INT(11) UNSIGNED NULL DEFAULT '0', + `charges` SMALLINT(3) UNSIGNED NULL DEFAULT '0', + `color` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `augslot1` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', + `augslot2` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', + `augslot3` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', + `augslot4` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', + `augslot5` MEDIUMINT(7) UNSIGNED NULL DEFAULT '0', + `augslot6` MEDIUMINT(7) NOT NULL DEFAULT '0', + `instnodrop` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + `custom_data` TEXT NULL, + `ornamenticon` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `ornamentidfile` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `ornament_hero_model` INT(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`time_index`, `charid`, `slotid`) +) +COLLATE='latin1_swedish_ci' +ENGINE=InnoDB; + + +CREATE TABLE `inventory_snapshots_v1_bak` ( + `time_index` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `charid` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `slotid` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', + `itemid` INT(11) UNSIGNED NULL DEFAULT '0', + `charges` SMALLINT(3) UNSIGNED NULL DEFAULT '0', + `color` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `augslot1` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', + `augslot2` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', + `augslot3` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', + `augslot4` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', + `augslot5` MEDIUMINT(7) UNSIGNED NULL DEFAULT '0', + `augslot6` MEDIUMINT(7) NOT NULL DEFAULT '0', + `instnodrop` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + `custom_data` TEXT NULL, + `ornamenticon` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `ornamentidfile` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `ornament_hero_model` INT(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`time_index`, `charid`, `slotid`) +) +COLLATE='latin1_swedish_ci' +ENGINE=InnoDB; diff --git a/utils/sql/user_tables.txt b/utils/sql/user_tables.txt index a210aa381..941e30c47 100644 --- a/utils/sql/user_tables.txt +++ b/utils/sql/user_tables.txt @@ -52,6 +52,7 @@ guild_members hackers instance_list_player inventory +inventory_snapshots item_tick keyring launcher_zones diff --git a/zone/client.cpp b/zone/client.cpp index 969d215ba..cd5dbbea1 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -679,7 +679,7 @@ bool Client::Save(uint8 iCommitNow) { // perform snapshot before SaveCharacterData() so that m_epp will contain the updated time if (RuleB(Character, ActiveInvSnapshots) && time(nullptr) >= GetNextInvSnapshotTime()) { - if (database.SaveCharacterInventorySnapshot(CharacterID())) { + if (database.SaveCharacterInvSnapshot(CharacterID())) { SetNextInvSnapshot(RuleI(Character, InvSnapshotMinIntervalM)); } else { diff --git a/zone/client_process.cpp b/zone/client_process.cpp index d16864ffc..d53abe769 100644 --- a/zone/client_process.cpp +++ b/zone/client_process.cpp @@ -242,6 +242,19 @@ bool Client::Process() { } } + if (RuleB(Character, ActiveInvSnapshots) && time(nullptr) >= GetNextInvSnapshotTime()) { + if (database.SaveCharacterInvSnapshot(CharacterID())) { + SetNextInvSnapshot(RuleI(Character, InvSnapshotMinIntervalM)); + Log(Logs::Moderate, Logs::Inventory, "Successful inventory snapshot taken of %s - setting next interval for %i minute%s.", + GetName(), RuleI(Character, InvSnapshotMinIntervalM), (RuleI(Character, InvSnapshotMinIntervalM) == 1 ? "" : "s")); + } + else { + SetNextInvSnapshot(RuleI(Character, InvSnapshotMinRetryM)); + Log(Logs::Moderate, Logs::Inventory, "Failed to take inventory snapshot of %s - retrying in %i minute%s.", + GetName(), RuleI(Character, InvSnapshotMinRetryM), (RuleI(Character, InvSnapshotMinRetryM) == 1 ? "" : "s")); + } + } + /* Build a close range list of NPC's */ if (npc_close_scan_timer.Check()) { close_mobs.clear(); diff --git a/zone/command.cpp b/zone/command.cpp index a6761cbcf..98faec71a 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -172,7 +172,6 @@ int command_init(void) command_add("castspell", "[spellid] - Cast a spell", 50, command_castspell) || command_add("chat", "[channel num] [message] - Send a channel message to all zones", 200, command_chat) || command_add("checklos", "- Check for line of sight to your target", 50, command_checklos) || - command_add("clearinvsnapshots", "[use rule] - Clear inventory snapshot history (true - elapsed entries, false - all entries)", 200, command_clearinvsnapshots) || command_add("corpse", "- Manipulate corpses, use with no arguments for help", 50, command_corpse) || command_add("corpsefix", "Attempts to bring corpses from underneath the ground within close proximity of the player", 0, command_corpsefix) || command_add("crashtest", "- Crash the zoneserver", 255, command_crashtest) || @@ -239,7 +238,7 @@ int command_init(void) command_add("instance", "- Modify Instances", 200, command_instance) || command_add("interrogateinv", "- use [help] argument for available options", 0, command_interrogateinv) || command_add("interrupt", "[message id] [color] - Interrupt your casting. Arguments are optional.", 50, command_interrupt) || - command_add("invsnapshot", "- Takes an inventory snapshot of your current target", 80, command_invsnapshot) || + command_add("invsnapshot", "- Manipulates inventory snapshots for your current target", 80, command_invsnapshot) || command_add("invul", "[on/off] - Turn player target's or your invulnerable flag on or off", 80, command_invul) || command_add("ipban", "[IP address] - Ban IP by character name", 200, command_ipban) || command_add("iplookup", "[charname] - Look up IP address of charname", 200, command_iplookup) || @@ -2944,31 +2943,344 @@ void command_interrogateinv(Client *c, const Seperator *sep) void command_invsnapshot(Client *c, const Seperator *sep) { - auto t = c->GetTarget(); - if (!t || !t->IsClient()) { - c->Message(0, "Target must be a client"); + if (!c) + return; + + if (sep->argnum == 0 || strcmp(sep->arg[1], "help") == 0) { + std::string window_title = "Inventory Snapshot Argument Help Menu"; + + std::string window_text = + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + ""; + + if (c->Admin() >= commandInvSnapshot) + window_text.append( + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + ); + + window_text.append( + "
Usage:#invsnapshot arguments
(required optional)
helpthis menu
capturetakes snapshot of character inventory
gcountreturns global snapshot count
gclear
now
delete all snapshots - rule
delete all snapshots - now
countreturns character snapshot count
clear
now
delete character snapshots - rule
delete character snapshots - now
list
count
lists entry ids for current character
limits to count
parsetstmpdisplays slots and items in snapshot
comparetstmpcompares inventory against snapshot
restoretstmprestores slots and items in snapshot
" + ); + + c->SendPopupToClient(window_title.c_str(), window_text.c_str()); + return; } - if (database.SaveCharacterInventorySnapshot(((Client*)t)->CharacterID())) { - c->SetNextInvSnapshot(RuleI(Character, InvSnapshotMinIntervalM)); - c->Message(0, "Successful inventory snapshot taken of %s", t->GetName()); - } - else { - c->SetNextInvSnapshot(RuleI(Character, InvSnapshotMinRetryM)); - c->Message(0, "Failed to take inventory snapshot of %s", t->GetName()); - } -} + if (c->Admin() >= commandInvSnapshot) { // global arguments -void command_clearinvsnapshots(Client *c, const Seperator *sep) -{ - if (strcmp(sep->arg[1], "false") == 0) { - database.ClearInvSnapshots(false); - c->Message(0, "Inventory snapshots cleared using current time"); + if (strcmp(sep->arg[1], "gcount") == 0) { + auto is_count = database.CountInvSnapshots(); + c->Message(0, "There %s %i inventory snapshot%s.", (is_count == 1 ? "is" : "are"), is_count, (is_count == 1 ? "" : "s")); + + return; + } + + if (strcmp(sep->arg[1], "gclear") == 0) { + if (strcmp(sep->arg[2], "now") == 0) { + database.ClearInvSnapshots(true); + c->Message(0, "Inventory snapshots cleared using current time."); + } + else { + database.ClearInvSnapshots(); + c->Message(0, "Inventory snapshots cleared using RuleI(Character, InvSnapshotHistoryD) (%i day%s).", + RuleI(Character, InvSnapshotHistoryD), (RuleI(Character, InvSnapshotHistoryD) == 1 ? "" : "s")); + } + + return; + } } - else { - database.ClearInvSnapshots(); - c->Message(0, "Inventory snapshots cleared using RuleI(Character, InvSnapshotHistoryD) (%i days)", RuleI(Character, InvSnapshotHistoryD)); + + if (!c->GetTarget() || !c->GetTarget()->IsClient()) { + c->Message(0, "Target must be a client."); + return; + } + + auto tc = (Client*)c->GetTarget(); + + if (strcmp(sep->arg[1], "capture") == 0) { + if (database.SaveCharacterInvSnapshot(tc->CharacterID())) { + tc->SetNextInvSnapshot(RuleI(Character, InvSnapshotMinIntervalM)); + c->Message(0, "Successful inventory snapshot taken of %s - setting next interval for %i minute%s.", + tc->GetName(), RuleI(Character, InvSnapshotMinIntervalM), (RuleI(Character, InvSnapshotMinIntervalM) == 1 ? "" : "s")); + } + else { + tc->SetNextInvSnapshot(RuleI(Character, InvSnapshotMinRetryM)); + c->Message(0, "Failed to take inventory snapshot of %s - retrying in %i minute%s.", + tc->GetName(), RuleI(Character, InvSnapshotMinRetryM), (RuleI(Character, InvSnapshotMinRetryM) == 1 ? "" : "s")); + } + + return; + } + + if (c->Admin() >= commandInvSnapshot) { + if (strcmp(sep->arg[1], "count") == 0) { + auto is_count = database.CountCharacterInvSnapshots(tc->CharacterID()); + c->Message(0, "%s (id: %u) has %i inventory snapshot%s.", tc->GetName(), tc->CharacterID(), is_count, (is_count == 1 ? "" : "s")); + + return; + } + + if (strcmp(sep->arg[1], "clear") == 0) { + if (strcmp(sep->arg[2], "now") == 0) { + database.ClearCharacterInvSnapshots(tc->CharacterID(), true); + c->Message(0, "%s\'s (id: %u) inventory snapshots cleared using current time.", tc->GetName(), tc->CharacterID()); + } + else { + database.ClearCharacterInvSnapshots(tc->CharacterID()); + c->Message(0, "%s\'s (id: %u) inventory snapshots cleared using RuleI(Character, InvSnapshotHistoryD) (%i day%s).", + tc->GetName(), tc->CharacterID(), RuleI(Character, InvSnapshotHistoryD), (RuleI(Character, InvSnapshotHistoryD) == 1 ? "" : "s")); + } + + return; + } + + if (strcmp(sep->arg[1], "list") == 0) { + std::list> is_list; + database.ListCharacterInvSnapshots(tc->CharacterID(), is_list); + + if (is_list.empty()) { + c->Message(0, "No inventory snapshots for %s (id: %u)", tc->GetName(), tc->CharacterID()); + return; + } + + auto list_count = 0; + if (sep->IsNumber(2)) + list_count = atoi(sep->arg[2]); + if (list_count < 1 || list_count > is_list.size()) + list_count = is_list.size(); + + std::string window_title = StringFormat("Snapshots for %s", tc->GetName()); + + std::string window_text = + "" + "" + "" + "" + ""; + + for (auto iter : is_list) { + if (!list_count) + break; + + window_text.append(StringFormat( + "" + "" + "" + "", + iter.first, + iter.second + )); + + --list_count; + } + + window_text.append( + "
TimestampEntry Count
%u%i
" + ); + + c->SendPopupToClient(window_title.c_str(), window_text.c_str()); + + return; + } + + if (strcmp(sep->arg[1], "parse") == 0) { + if (!sep->IsNumber(2)) { + c->Message(0, "A timestamp is required to use this option."); + return; + } + + uint32 timestamp = atoul(sep->arg[2]); + + if (!database.ValidateCharacterInvSnapshotTimestamp(tc->CharacterID(), timestamp)) { + c->Message(0, "No inventory snapshots for %s (id: %u) exist at %u.", tc->GetName(), tc->CharacterID(), timestamp); + return; + } + + std::list> parse_list; + database.ParseCharacterInvSnapshot(tc->CharacterID(), timestamp, parse_list); + + std::string window_title = StringFormat("Snapshot Parse for %s @ %u", tc->GetName(), timestamp); + + std::string window_text = "Slot: ItemID - Description
"; + + for (auto iter : parse_list) { + auto item_data = database.GetItem(iter.second); + std::string window_line = StringFormat("%i: %u - %s
", iter.first, iter.second, (item_data ? item_data->Name : "[error]")); + + if (window_text.length() + window_line.length() < 4095) { + window_text.append(window_line); + } + else { + c->Message(0, "Too many snapshot entries to list..."); + break; + } + } + + c->SendPopupToClient(window_title.c_str(), window_text.c_str()); + + return; + } + + if (strcmp(sep->arg[1], "compare") == 0) { + if (!sep->IsNumber(2)) { + c->Message(0, "A timestamp is required to use this option."); + return; + } + + uint32 timestamp = atoul(sep->arg[2]); + + if (!database.ValidateCharacterInvSnapshotTimestamp(tc->CharacterID(), timestamp)) { + c->Message(0, "No inventory snapshots for %s (id: %u) exist at %u.", tc->GetName(), tc->CharacterID(), timestamp); + return; + } + + std::list> inv_compare_list; + database.DivergeCharacterInventoryFromInvSnapshot(tc->CharacterID(), timestamp, inv_compare_list); + + std::list> iss_compare_list; + database.DivergeCharacterInvSnapshotFromInventory(tc->CharacterID(), timestamp, iss_compare_list); + + std::string window_title = StringFormat("Snapshot Comparison for %s @ %u", tc->GetName(), timestamp); + + std::string window_text = "Slot: (action) Snapshot -> Inventory
"; + + auto inv_iter = inv_compare_list.begin(); + auto iss_iter = iss_compare_list.begin(); + + while (true) { + std::string window_line; + + if (inv_iter == inv_compare_list.end() && iss_iter == iss_compare_list.end()) { + break; + } + else if (inv_iter != inv_compare_list.end() && iss_iter == iss_compare_list.end()) { + window_line = StringFormat("%i: (delete) [empty] -> %u
", inv_iter->first, inv_iter->second); + ++inv_iter; + } + else if (inv_iter == inv_compare_list.end() && iss_iter != iss_compare_list.end()) { + window_line = StringFormat("%i: (insert) %u -> [empty]
", iss_iter->first, iss_iter->second); + ++iss_iter; + } + else { + if (inv_iter->first < iss_iter->first) { + window_line = StringFormat("%i: (delete) [empty] -> %u
", inv_iter->first, inv_iter->second); + ++inv_iter; + } + else if (inv_iter->first > iss_iter->first) { + window_line = StringFormat("%i: (insert) %u -> [empty]
", iss_iter->first, iss_iter->second); + ++iss_iter; + } + else { + window_line = StringFormat("%i: (replace) %u -> %u
", iss_iter->first, iss_iter->second, inv_iter->second); + ++inv_iter; + ++iss_iter; + } + } + + if (window_text.length() + window_line.length() < 4095) { + window_text.append(window_line); + } + else { + c->Message(0, "Too many comparison entries to list..."); + break; + } + } + + c->SendPopupToClient(window_title.c_str(), window_text.c_str()); + + return; + } + + if (strcmp(sep->arg[1], "restore") == 0) { + if (!sep->IsNumber(2)) { + c->Message(0, "A timestamp is required to use this option."); + return; + } + + uint32 timestamp = atoul(sep->arg[2]); + + if (!database.ValidateCharacterInvSnapshotTimestamp(tc->CharacterID(), timestamp)) { + c->Message(0, "No inventory snapshots for %s (id: %u) exist at %u.", tc->GetName(), tc->CharacterID(), timestamp); + return; + } + + if (database.SaveCharacterInvSnapshot(tc->CharacterID())) { + tc->SetNextInvSnapshot(RuleI(Character, InvSnapshotMinIntervalM)); + } + else { + c->Message(13, "Failed to take pre-restore inventory snapshot of %s (id: %u).", + tc->GetName(), tc->CharacterID()); + return; + } + + if (database.RestoreCharacterInvSnapshot(tc->CharacterID(), timestamp)) { + // cannot delete all valid item slots from client..so, we worldkick + tc->WorldKick(); // self restores update before the 'kick' is processed + + c->Message(0, "Successfully applied snapshot %u to %s's (id: %u) inventory.", + timestamp, tc->GetName(), tc->CharacterID()); + } + else { + c->Message(13, "Failed to apply snapshot %u to %s's (id: %u) inventory.", + timestamp, tc->GetName(), tc->CharacterID()); + } + + return; + } } } diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index f79288126..cb0c81d3a 100644 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -1171,7 +1171,7 @@ bool ZoneDatabase::LoadCharacterData(uint32 character_id, PlayerProfile_Struct* m_epp->aa_effects = atoi(row[r]); r++; // "`e_aa_effects`, " m_epp->perAA = atoi(row[r]); r++; // "`e_percent_to_aa`, " m_epp->expended_aa = atoi(row[r]); r++; // "`e_expended_aa_spent`, " - m_epp->last_invsnapshot_time = atoi(row[r]); r++; // "`e_last_invsnapshot` " + m_epp->last_invsnapshot_time = atoul(row[r]); r++; // "`e_last_invsnapshot` " m_epp->next_invsnapshot_time = m_epp->last_invsnapshot_time + (RuleI(Character, InvSnapshotMinIntervalM) * 60); } return true; @@ -1567,56 +1567,6 @@ bool ZoneDatabase::SaveCharacterLeadershipAA(uint32 character_id, PlayerProfile_ return true; } -bool ZoneDatabase::SaveCharacterInventorySnapshot(uint32 character_id){ - uint32 time_index = time(nullptr); - std::string query = StringFormat( - "INSERT INTO inventory_snapshots (" - " time_index," - " charid," - " slotid," - " itemid," - " charges," - " color," - " augslot1," - " augslot2," - " augslot3," - " augslot4," - " augslot5," - " augslot6," - " instnodrop," - " custom_data," - " ornamenticon," - " ornamentidfile," - " ornament_hero_model" - ")" - " SELECT" - " %u," - " charid," - " slotid," - " itemid," - " charges," - " color," - " augslot1," - " augslot2," - " augslot3," - " augslot4," - " augslot5," - " augslot6," - " instnodrop," - " custom_data," - " ornamenticon," - " ornamentidfile," - " ornament_hero_model" - " FROM inventory" - " WHERE charid = %u", - time_index, - character_id - ); - auto results = database.QueryDatabase(query); - Log(Logs::General, Logs::None, "ZoneDatabase::SaveCharacterInventorySnapshot %i (%s)", character_id, (results.Success() ? "pass" : "fail")); - return results.Success(); -} - bool ZoneDatabase::SaveCharacterData(uint32 character_id, uint32 account_id, PlayerProfile_Struct* pp, ExtendedProfile_Struct* m_epp){ /* If this is ever zero - the client hasn't fully loaded and potentially crashed during zone */ @@ -2043,6 +1993,344 @@ bool ZoneDatabase::NoRentExpired(const char* name){ return (seconds>1800); } +bool ZoneDatabase::SaveCharacterInvSnapshot(uint32 character_id) { + uint32 time_index = time(nullptr); + std::string query = StringFormat( + "INSERT " + "INTO" + " `inventory_snapshots` " + "(`time_index`," + " `charid`," + " `slotid`," + " `itemid`," + " `charges`," + " `color`," + " `augslot1`," + " `augslot2`," + " `augslot3`," + " `augslot4`," + " `augslot5`," + " `augslot6`," + " `instnodrop`," + " `custom_data`," + " `ornamenticon`," + " `ornamentidfile`," + " `ornament_hero_model`" + ") " + "SELECT" + " %u," + " `charid`," + " `slotid`," + " `itemid`," + " `charges`," + " `color`," + " `augslot1`," + " `augslot2`," + " `augslot3`," + " `augslot4`," + " `augslot5`," + " `augslot6`," + " `instnodrop`," + " `custom_data`," + " `ornamenticon`," + " `ornamentidfile`," + " `ornament_hero_model` " + "FROM" + " `inventory` " + "WHERE" + " `charid` = %u", + time_index, + character_id + ); + auto results = database.QueryDatabase(query); + Log(Logs::Moderate, Logs::Inventory, "ZoneDatabase::SaveCharacterInventorySnapshot %i (%s)", character_id, (results.Success() ? "pass" : "fail")); + return results.Success(); +} + +int ZoneDatabase::CountCharacterInvSnapshots(uint32 character_id) { + std::string query = StringFormat( + "SELECT" + " COUNT(*) " + "FROM " + "(" + "SELECT * FROM" + " `inventory_snapshots` a " + "WHERE" + " `charid` = %u " + "GROUP BY" + " `time_index`" + ") b", + character_id + ); + auto results = QueryDatabase(query); + + if (!results.Success()) + return -1; + + auto row = results.begin(); + + int64 count = atoll(row[0]); + if (count > INT_MAX) + return -2; + if (count < 0) + return -3; + + return count; +} + +void ZoneDatabase::ClearCharacterInvSnapshots(uint32 character_id, bool from_now) { + uint32 del_time = time(nullptr); + if (!from_now) { del_time -= RuleI(Character, InvSnapshotHistoryD) * 86400; } + + std::string query = StringFormat( + "DELETE " + "FROM" + " `inventory_snapshots` " + "WHERE" + " `charid` = %u " + "AND" + " `time_index` <= %lu", + character_id, + (unsigned long)del_time + ); + QueryDatabase(query); +} + +void ZoneDatabase::ListCharacterInvSnapshots(uint32 character_id, std::list> &is_list) { + std::string query = StringFormat( + "SELECT" + " `time_index`," + " COUNT(*) " + "FROM" + " `inventory_snapshots` " + "WHERE" + " `charid` = %u " + "GROUP BY" + " `time_index` " + "ORDER BY" + " `time_index` " + "DESC", + character_id + ); + auto results = QueryDatabase(query); + + if (!results.Success()) + return; + + for (auto row : results) + is_list.push_back(std::pair(atoul(row[0]), atoi(row[1]))); +} + +bool ZoneDatabase::ValidateCharacterInvSnapshotTimestamp(uint32 character_id, uint32 timestamp) { + if (!character_id || !timestamp) + return false; + + std::string query = StringFormat( + "SELECT" + " * " + "FROM" + " `inventory_snapshots` " + "WHERE" + " `charid` = %u " + "AND" + " `time_index` = %u " + "LIMIT 1", + character_id, + timestamp + ); + auto results = QueryDatabase(query); + + if (!results.Success() || results.RowCount() == 0) + return false; + + return true; +} + +void ZoneDatabase::ParseCharacterInvSnapshot(uint32 character_id, uint32 timestamp, std::list> &parse_list) { + std::string query = StringFormat( + "SELECT" + " `slotid`," + " `itemid` " + "FROM" + " `inventory_snapshots` " + "WHERE" + " `charid` = %u " + "AND" + " `time_index` = %u " + "ORDER BY" + " `slotid`", + character_id, + timestamp + ); + auto results = QueryDatabase(query); + + if (!results.Success()) + return; + + for (auto row : results) + parse_list.push_back(std::pair(atoi(row[0]), atoul(row[1]))); +} + +void ZoneDatabase::DivergeCharacterInvSnapshotFromInventory(uint32 character_id, uint32 timestamp, std::list> &compare_list) { + std::string query = StringFormat( + "SELECT" + " slotid," + " itemid " + "FROM" + " `inventory_snapshots` " + "WHERE" + " `time_index` = %u " + "AND" + " `charid` = %u " + "AND" + " `slotid` NOT IN " + "(" + "SELECT" + " a.`slotid` " + "FROM" + " `inventory_snapshots` a " + "JOIN" + " `inventory` b " + "USING" + " (`slotid`, `itemid`) " + "WHERE" + " a.`time_index` = %u " + "AND" + " a.`charid` = %u " + "AND" + " b.`charid` = %u" + ")", + timestamp, + character_id, + timestamp, + character_id, + character_id + ); + auto results = QueryDatabase(query); + + if (!results.Success()) + return; + + for (auto row : results) + compare_list.push_back(std::pair(atoi(row[0]), atoul(row[1]))); +} + +void ZoneDatabase::DivergeCharacterInventoryFromInvSnapshot(uint32 character_id, uint32 timestamp, std::list> &compare_list) { + std::string query = StringFormat( + "SELECT" + " `slotid`," + " `itemid` " + "FROM" + " `inventory` " + "WHERE" + " `charid` = %u " + "AND" + " `slotid` NOT IN " + "(" + "SELECT" + " a.`slotid` " + "FROM" + " `inventory` a " + "JOIN" + " `inventory_snapshots` b " + "USING" + " (`slotid`, `itemid`) " + "WHERE" + " b.`time_index` = %u " + "AND" + " b.`charid` = %u " + "AND" + " a.`charid` = %u" + ")", + character_id, + timestamp, + character_id, + character_id + ); + auto results = QueryDatabase(query); + + if (!results.Success()) + return; + + for (auto row : results) + compare_list.push_back(std::pair(atoi(row[0]), atoul(row[1]))); +} + +bool ZoneDatabase::RestoreCharacterInvSnapshot(uint32 character_id, uint32 timestamp) { + // we should know what we're doing by the time we call this function..but, + // this is to prevent inventory deletions where no timestamp entries exists + if (!ValidateCharacterInvSnapshotTimestamp(character_id, timestamp)) { + Log(Logs::General, Logs::Error, "ZoneDatabase::RestoreCharacterInvSnapshot() called for id: %u without valid snapshot entries @ %u", character_id, timestamp); + return false; + } + + std::string query = StringFormat( + "DELETE " + "FROM" + " `inventory` " + "WHERE" + " `charid` = %u", + character_id + ); + auto results = database.QueryDatabase(query); + if (!results.Success()) + return false; + + query = StringFormat( + "INSERT " + "INTO" + " `inventory` " + "(`charid`," + " `slotid`," + " `itemid`," + " `charges`," + " `color`," + " `augslot1`," + " `augslot2`," + " `augslot3`," + " `augslot4`," + " `augslot5`," + " `augslot6`," + " `instnodrop`," + " `custom_data`," + " `ornamenticon`," + " `ornamentidfile`," + " `ornament_hero_model`" + ") " + "SELECT" + " `charid`," + " `slotid`," + " `itemid`," + " `charges`," + " `color`," + " `augslot1`," + " `augslot2`," + " `augslot3`," + " `augslot4`," + " `augslot5`," + " `augslot6`," + " `instnodrop`," + " `custom_data`," + " `ornamenticon`," + " `ornamentidfile`," + " `ornament_hero_model` " + "FROM" + " `inventory_snapshots` " + "WHERE" + " `charid` = %u " + "AND" + " `time_index` = %u", + character_id, + timestamp + ); + results = database.QueryDatabase(query); + + Log(Logs::General, Logs::Inventory, "ZoneDatabase::RestoreCharacterInvSnapshot() %s snapshot for %u @ %u", + (results.Success() ? "restored" : "failed to restore"), character_id, timestamp); + + return results.Success(); +} + const NPCType* ZoneDatabase::LoadNPCTypesData(uint32 npc_type_id, bool bulk_load /*= false*/) { const NPCType *npc = nullptr; diff --git a/zone/zonedb.h b/zone/zonedb.h index 8943f6f01..78f78ab83 100644 --- a/zone/zonedb.h +++ b/zone/zonedb.h @@ -315,7 +315,6 @@ public: bool SaveCharacterBandolier(uint32 character_id, uint8 bandolier_id, uint8 bandolier_slot, uint32 item_id, uint32 icon, const char* bandolier_name); bool SaveCharacterPotionBelt(uint32 character_id, uint8 potion_id, uint32 item_id, uint32 icon); bool SaveCharacterLeadershipAA(uint32 character_id, PlayerProfile_Struct* pp); - bool SaveCharacterInventorySnapshot(uint32 character_id); /* Character Data Deletes */ bool DeleteCharacterSpell(uint32 character_id, uint32 spell_id, uint32 slot_id); @@ -328,7 +327,16 @@ public: /* Character Inventory */ bool NoRentExpired(const char* name); - + bool SaveCharacterInvSnapshot(uint32 character_id); + int CountCharacterInvSnapshots(uint32 character_id); + void ClearCharacterInvSnapshots(uint32 character_id, bool from_now = false); + void ListCharacterInvSnapshots(uint32 character_id, std::list> &is_list); + bool ValidateCharacterInvSnapshotTimestamp(uint32 character_id, uint32 timestamp); + void ParseCharacterInvSnapshot(uint32 character_id, uint32 timestamp, std::list> &parse_list); + void DivergeCharacterInvSnapshotFromInventory(uint32 character_id, uint32 timestamp, std::list> &compare_list); + void DivergeCharacterInventoryFromInvSnapshot(uint32 character_id, uint32 timestamp, std::list> &compare_list); + bool RestoreCharacterInvSnapshot(uint32 character_id, uint32 timestamp); + /* Corpses */ bool DeleteItemOffCharacterCorpse(uint32 db_id, uint32 equip_slot, uint32 item_id); uint32 GetCharacterCorpseItemCount(uint32 corpse_id); From 7c298a249f40b93736b7a8b8eb6a4e6ed47e6d85 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Tue, 4 Sep 2018 20:27:43 -0500 Subject: [PATCH 371/670] Pets now use navmesh --- zone/mob_ai.cpp | 81 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 60 insertions(+), 21 deletions(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index bf09feb73..5fd422035 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1557,26 +1557,46 @@ void Mob::AI_Process() { case SPO_Follow: { Mob *owner = GetOwner(); - if (owner == nullptr) + if (owner == nullptr) { break; + } - glm::vec4 ownerPos = owner->GetPosition(); - float dist = DistanceSquared(m_Position, ownerPos); - float distz = ownerPos.z - m_Position.z; + glm::vec4 pet_owner_position = owner->GetPosition(); + float distance_to_owner = DistanceSquared(m_Position, pet_owner_position); + float z_distance = pet_owner_position.z - m_Position.z; - if (dist >= 400 || distz > 100) { - int speed = GetWalkspeed(); - if (dist >= 1225) // 35 - speed = GetRunspeed(); + if (distance_to_owner >= 400 || z_distance > 100) { - if (dist >= 202500 || distz > 100) // dist >= 450 - { - m_Position = ownerPos; + int pet_speed = GetWalkspeed(); + + /** + * Distance: >= 35 (Run if far away) + */ + if (distance_to_owner >= 1225) { + pet_speed = GetRunspeed(); + } + + /** + * Distance: >= 450 (Snap to owner) + */ + if (distance_to_owner >= 202500 || z_distance > 100) { + m_Position = pet_owner_position; SendPositionUpdate(); moved = true; } else { - CalculateNewPosition(owner->GetX(), owner->GetY(), owner->GetZ(), speed); + + bool waypoint_changed, node_reached; + glm::vec3 Goal = UpdatePath( + owner->GetX(), + owner->GetY(), + owner->GetZ(), + pet_speed, + waypoint_changed, + node_reached + ); + + CalculateNewPosition(Goal.x, Goal.y, Goal.z, pet_speed, true); } } else { @@ -1601,24 +1621,43 @@ void Mob::AI_Process() { break; } } - if (IsPetRegroup()) + if (IsPetRegroup()) { return; + } } /* Entity has been assigned another entity to follow */ else if (GetFollowID()) { - Mob *follow = entity_list.GetMob(GetFollowID()); - if (!follow) { SetFollowID(0); } + Mob *follow = entity_list.GetMob(static_cast(GetFollowID())); + if (!follow) { + SetFollowID(0); + } else { - float dist2 = DistanceSquared(m_Position, follow->GetPosition()); - int followdist = GetFollowDistance(); - if (dist2 >= followdist) // Default follow distance is 100 - { + float distance = DistanceSquared(m_Position, follow->GetPosition()); + int follow_distance = GetFollowDistance(); + + /** + * Default follow distance is 100 + */ + if (distance >= follow_distance) { int speed = GetWalkspeed(); - if (dist2 >= followdist + 150) { + + if (distance >= follow_distance + 150) { speed = GetRunspeed(); } - CalculateNewPosition(follow->GetX(), follow->GetY(), follow->GetZ(), speed); + + bool waypoint_changed, node_reached; + + glm::vec3 Goal = UpdatePath( + follow->GetX(), + follow->GetY(), + follow->GetZ(), + speed, + waypoint_changed, + node_reached + ); + + CalculateNewPosition(Goal.x, Goal.y, Goal.z, speed, true); } else { moved = false; From 2d84029b37e5ea20684ea93a8ae50d7bec24ecdb Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Fri, 7 Sep 2018 23:54:40 -0400 Subject: [PATCH 372/670] Add FastRegen* to zone table --- common/eq_packet_structs.h | 5 ++++- common/patches/rof.cpp | 6 +++--- common/patches/rof2.cpp | 6 +++--- common/patches/rof_structs.h | 6 +++--- common/patches/sod.cpp | 7 ++++--- common/patches/sod_structs.h | 6 +++--- common/patches/sof.cpp | 6 +++--- common/patches/sof_structs.h | 6 +++--- common/patches/uf.cpp | 6 +++--- common/patches/uf_structs.h | 6 +++--- common/ruletypes.h | 3 --- common/version.h | 2 +- utils/sql/db_update_manifest.txt | 1 + utils/sql/git/required/2018_09_07_FastRegen.sql | 3 +++ zone/bot.cpp | 6 +++--- zone/client_mods.cpp | 9 +++------ zone/merc.cpp | 6 +++--- zone/zonedb.cpp | 9 ++++++++- 18 files changed, 54 insertions(+), 45 deletions(-) create mode 100644 utils/sql/git/required/2018_09_07_FastRegen.sql diff --git a/common/eq_packet_structs.h b/common/eq_packet_structs.h index a35c264e0..c4cbea4fb 100644 --- a/common/eq_packet_structs.h +++ b/common/eq_packet_structs.h @@ -376,7 +376,10 @@ struct NewZone_Struct { /*0692*/ uint8 unknown692[8]; /*0700*/ float fog_density; /*0704*/ uint32 SuspendBuffs; -/*0704*/ +/*0708*/ uint32 FastRegenHP; +/*0712*/ uint32 FastRegenMana; +/*0716*/ uint32 FastRegenEndurance; +/*0720*/ }; /* diff --git a/common/patches/rof.cpp b/common/patches/rof.cpp index 6faabf88c..4364c9cb1 100644 --- a/common/patches/rof.cpp +++ b/common/patches/rof.cpp @@ -1811,6 +1811,9 @@ namespace RoF OUT(zone_id); OUT(zone_instance); OUT(SuspendBuffs); + OUT(FastRegenHP); + OUT(FastRegenMana); + OUT(FastRegenEndurance); eq->FogDensity = emu->fog_density; @@ -1827,9 +1830,6 @@ namespace RoF eq->unknown893 = 0; eq->fall_damage = 0; // 0 = Fall Damage on, 1 = Fall Damage off eq->unknown895 = 0; - eq->unknown896 = 180; - eq->unknown900 = 180; - eq->unknown904 = 180; eq->unknown908 = 2; eq->unknown912 = 2; eq->unknown932 = -1; // Set from PoK Example diff --git a/common/patches/rof2.cpp b/common/patches/rof2.cpp index 9cba1d0b4..99909cb16 100644 --- a/common/patches/rof2.cpp +++ b/common/patches/rof2.cpp @@ -1880,6 +1880,9 @@ namespace RoF2 OUT(zone_id); OUT(zone_instance); OUT(SuspendBuffs); + OUT(FastRegenHP); + OUT(FastRegenMana); + OUT(FastRegenEndurance); eq->FogDensity = emu->fog_density; @@ -1903,9 +1906,6 @@ namespace RoF2 eq->bNoFear = 0; eq->fall_damage = 0; // 0 = Fall Damage on, 1 = Fall Damage off eq->unknown895 = 0; - eq->FastRegenHP = 180; - eq->FastRegenMana = 180; - eq->FastRegenEndurance = 180; eq->CanPlaceCampsite = 2; eq->CanPlaceGuildBanner = 2; eq->FishingRelated = -1; // Set from PoK Example diff --git a/common/patches/rof_structs.h b/common/patches/rof_structs.h index dcc5e4ccc..885a9aa80 100644 --- a/common/patches/rof_structs.h +++ b/common/patches/rof_structs.h @@ -588,9 +588,9 @@ struct NewZone_Struct { /*0893*/ uint8 unknown893; // Seen 0 - 00 /*0894*/ uint8 fall_damage; // 0 = Fall Damage on, 1 = Fall Damage off /*0895*/ uint8 unknown895; // Seen 0 - 00 -/*0896*/ uint32 unknown896; // Seen 180 -/*0900*/ uint32 unknown900; // Seen 180 -/*0904*/ uint32 unknown904; // Seen 180 +/*0896*/ uint32 FastRegenHP; // Seen 180 +/*0900*/ uint32 FastRegenMana; // Seen 180 +/*0904*/ uint32 FastRegenEndurance; // Seen 180 /*0908*/ uint32 unknown908; // Seen 2 /*0912*/ uint32 unknown912; // Seen 2 /*0916*/ float FogDensity; // Most zones have this set to 0.33 Blightfire had 0.16 diff --git a/common/patches/sod.cpp b/common/patches/sod.cpp index 425341af7..772dcc178 100644 --- a/common/patches/sod.cpp +++ b/common/patches/sod.cpp @@ -1341,6 +1341,10 @@ namespace SoD OUT(zone_id); OUT(zone_instance); OUT(SuspendBuffs); + OUT(FastRegenHP); + OUT(FastRegenMana); + OUT(FastRegenEndurance); + /*fill in some unknowns with observed values, hopefully it will help */ eq->unknown800 = -1; eq->unknown844 = 600; @@ -1354,9 +1358,6 @@ namespace SoD eq->unknown893 = 0; eq->fall_damage = 0; // 0 = Fall Damage on, 1 = Fall Damage off eq->unknown895 = 0; - eq->unknown896 = 180; - eq->unknown900 = 180; - eq->unknown904 = 180; eq->unknown908 = 2; eq->unknown912 = 2; eq->FogDensity = emu->fog_density; diff --git a/common/patches/sod_structs.h b/common/patches/sod_structs.h index 80d0faae9..57e37c957 100644 --- a/common/patches/sod_structs.h +++ b/common/patches/sod_structs.h @@ -456,9 +456,9 @@ struct NewZone_Struct { /*0893*/ uint8 unknown893; //seen 0 - 00 /*0894*/ uint8 fall_damage; // 0 = Fall Damage on, 1 = Fall Damage off /*0895*/ uint8 unknown895; //seen 0 - 00 -/*0896*/ uint32 unknown896; //seen 180 -/*0900*/ uint32 unknown900; //seen 180 -/*0904*/ uint32 unknown904; //seen 180 +/*0896*/ uint32 FastRegenHP; //seen 180 +/*0900*/ uint32 FastRegenMana; //seen 180 +/*0904*/ uint32 FastRegenEndurance; //seen 180 /*0908*/ uint32 unknown908; //seen 2 /*0912*/ uint32 unknown912; //seen 2 /*0916*/ float FogDensity; //Of about 10 or so zones tested, all but one have this set to 0.33 Blightfire had 0.16 diff --git a/common/patches/sof.cpp b/common/patches/sof.cpp index 7051a5eeb..85f326edb 100644 --- a/common/patches/sof.cpp +++ b/common/patches/sof.cpp @@ -1020,6 +1020,9 @@ namespace SoF OUT(zone_id); OUT(zone_instance); OUT(SuspendBuffs); + OUT(FastRegenHP); + OUT(FastRegenMana); + OUT(FastRegenEndurance); /*fill in some unknowns with observed values, hopefully it will help */ eq->unknown796 = -1; @@ -1034,9 +1037,6 @@ namespace SoF eq->unknown889 = 0; eq->fall_damage = 0; // 0 = Fall Damage on, 1 = Fall Damage off eq->unknown891 = 0; - eq->unknown892 = 180; - eq->unknown896 = 180; - eq->unknown900 = 180; eq->unknown904 = 2; eq->unknown908 = 2; diff --git a/common/patches/sof_structs.h b/common/patches/sof_structs.h index a312b48a8..527341c93 100644 --- a/common/patches/sof_structs.h +++ b/common/patches/sof_structs.h @@ -460,9 +460,9 @@ struct NewZone_Struct { /*0893*/ uint8 unknown889; //seen 0 - 00 /*0894*/ uint8 fall_damage; // 0 = Fall Damage on, 1 = Fall Damage off /*0895*/ uint8 unknown891; //seen 0 - 00 -/*0892*/ uint32 unknown892; //seen 180 -/*0896*/ uint32 unknown896; //seen 180 -/*0900*/ uint32 unknown900; //seen 180 +/*0892*/ uint32 FastRegenHP; //seen 180 +/*0896*/ uint32 FastRegenMana; //seen 180 +/*0900*/ uint32 FastRegenEndurance; //seen 180 /*0904*/ uint32 unknown904; //seen 2 /*0908*/ uint32 unknown908; //seen 2 /*0912*/ diff --git a/common/patches/uf.cpp b/common/patches/uf.cpp index 869685e47..840c6fcd7 100644 --- a/common/patches/uf.cpp +++ b/common/patches/uf.cpp @@ -1565,6 +1565,9 @@ namespace UF OUT(zone_id); OUT(zone_instance); OUT(SuspendBuffs); + OUT(FastRegenHP); + OUT(FastRegenMana); + OUT(FastRegenEndurance); eq->FogDensity = emu->fog_density; @@ -1581,9 +1584,6 @@ namespace UF eq->unknown893 = 0; eq->fall_damage = 0; // 0 = Fall Damage on, 1 = Fall Damage off eq->unknown895 = 0; - eq->unknown896 = 180; - eq->unknown900 = 180; - eq->unknown904 = 180; eq->unknown908 = 2; eq->unknown912 = 2; diff --git a/common/patches/uf_structs.h b/common/patches/uf_structs.h index 02361cf1f..fe58b73b2 100644 --- a/common/patches/uf_structs.h +++ b/common/patches/uf_structs.h @@ -456,9 +456,9 @@ struct NewZone_Struct { /*0893*/ uint8 unknown893; //seen 0 - 00 /*0894*/ uint8 fall_damage; // 0 = Fall Damage on, 1 = Fall Damage off /*0895*/ uint8 unknown895; //seen 0 - 00 -/*0896*/ uint32 unknown896; //seen 180 -/*0900*/ uint32 unknown900; //seen 180 -/*0904*/ uint32 unknown904; //seen 180 +/*0896*/ uint32 FastRegenHP; //seen 180 +/*0900*/ uint32 FastRegenMana; //seen 180 +/*0904*/ uint32 FastRegenEndurance; //seen 180 /*0908*/ uint32 unknown908; //seen 2 /*0912*/ uint32 unknown912; //seen 2 /*0916*/ float FogDensity; //Of about 10 or so zones tested, all but one have this set to 0.33 Blightfire had 0.16 diff --git a/common/ruletypes.h b/common/ruletypes.h index 3e6965150..c2f11c1c3 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -94,9 +94,6 @@ RULE_INT(Character, SkillUpModifier, 100) //skill ups are at 100% RULE_BOOL(Character, SharedBankPlat, false) //off by default to prevent duping for now RULE_BOOL(Character, BindAnywhere, false) RULE_BOOL(Character, RestRegenEnabled, true) // Enable OOC Regen -RULE_INT(Character, RestRegenHP, 180) // seconds until full from 0. this is actually zone setable, but most or all zones are 180 -RULE_INT(Character, RestRegenMana, 180) // seconds until full from 0. this is actually zone setable, but most or all zones are 180 -RULE_INT(Character, RestRegenEnd, 180) // seconds until full from 0. this is actually zone setable, but most or all zones are 180 RULE_INT(Character, RestRegenTimeToActivate, 30) // Time in seconds for rest state regen to kick in. RULE_INT(Character, RestRegenRaidTimeToActivate, 300) // Time in seconds for rest state regen to kick in with a raid target. RULE_INT(Character, KillsPerGroupLeadershipAA, 250) // Number of dark blues or above per Group Leadership AA diff --git a/common/version.h b/common/version.h index b95c8ec1d..a6ea279c5 100644 --- a/common/version.h +++ b/common/version.h @@ -30,7 +30,7 @@ Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt */ -#define CURRENT_BINARY_DATABASE_VERSION 9125 +#define CURRENT_BINARY_DATABASE_VERSION 9126 #ifdef BOTS #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9019 #else diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index 22a593176..fc2fb2391 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -379,6 +379,7 @@ 9123|2018_07_07_data_buckets.sql|SHOW TABLES LIKE 'data_buckets'|empty| 9124|2018_07_09_tasks.sql|SHOW COLUMNS FROM `tasks` LIKE 'type'|empty| 9125|2018_07_20_task_emote.sql|SHOW COLUMNS FROM `tasks` LIKE 'completion_emote'|empty| +9126|2018_09_07_FastRegen.sql|SHOW COLUMNS FROM `zone` LIKE 'FastRegenHP'|empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/utils/sql/git/required/2018_09_07_FastRegen.sql b/utils/sql/git/required/2018_09_07_FastRegen.sql new file mode 100644 index 000000000..de44b147d --- /dev/null +++ b/utils/sql/git/required/2018_09_07_FastRegen.sql @@ -0,0 +1,3 @@ +ALTER TABLE `zone` ADD `FastRegenHP` INT NOT NULL DEFAULT '180'; +ALTER TABLE `zone` ADD `FastRegenMana` INT NOT NULL DEFAULT '180'; +ALTER TABLE `zone` ADD `FastRegenEndurance` INT NOT NULL DEFAULT '180'; diff --git a/zone/bot.cpp b/zone/bot.cpp index 4c982d7ac..8ba9ea36c 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -7021,9 +7021,9 @@ void Bot::CalcRestState() { } } - RestRegenHP = 6 * (GetMaxHP() / RuleI(Character, RestRegenHP)); - RestRegenMana = 6 * (GetMaxMana() / RuleI(Character, RestRegenMana)); - RestRegenEndurance = 6 * (GetMaxEndurance() / RuleI(Character, RestRegenEnd)); + RestRegenHP = 6 * (GetMaxHP() / zone->newzone_data.FastRegenHP); + RestRegenMana = 6 * (GetMaxMana() / zone->newzone_data.FastRegenMana)); + RestRegenEndurance = 6 * (GetMaxEndurance() / zone->newzone_data.FastRegenEndurance); } int32 Bot::LevelRegen() { diff --git a/zone/client_mods.cpp b/zone/client_mods.cpp index f342fff9f..39c37c874 100644 --- a/zone/client_mods.cpp +++ b/zone/client_mods.cpp @@ -290,9 +290,8 @@ int32 Client::CalcHPRegen(bool bCombat) // another check for IsClient && !(base + item_regen) && Cur_HP <= 0 do --base; do later if (!bCombat && CanFastRegen() && (IsSitting() || CanMedOnHorse())) { - auto fast_mod = RuleI(Character, RestRegenHP); // TODO: this is actually zone based auto max_hp = GetMaxHP(); - int fast_regen = 6 * (max_hp / fast_mod); + int fast_regen = 6 * (max_hp / zone->newzone_data.FastRegenHP); if (base < fast_regen) // weird, but what the client is doing base = fast_regen; } @@ -1296,9 +1295,8 @@ int32 Client::CalcManaRegen(bool bCombat) regen = regen * 100.0f * AreaManaRegen * 0.01f + 0.5f; if (!bCombat && CanFastRegen() && (IsSitting() || CanMedOnHorse())) { - auto fast_mod = RuleI(Character, RestRegenMana); // TODO: this is actually zone based auto max_mana = GetMaxMana(); - int fast_regen = 6 * (max_mana / fast_mod); + int fast_regen = 6 * (max_mana / zone->newzone_data.FastRegenMana); if (regen < fast_regen) // weird, but what the client is doing regen = fast_regen; } @@ -2264,9 +2262,8 @@ int32 Client::CalcEnduranceRegen(bool bCombat) int regen = base; if (!bCombat && CanFastRegen() && (IsSitting() || CanMedOnHorse())) { - auto fast_mod = RuleI(Character, RestRegenEnd); // TODO: this is actually zone based auto max_end = GetMaxEndurance(); - int fast_regen = 6 * (max_end / fast_mod); + int fast_regen = 6 * (max_end / zone->newzone_data.FastRegenEndurance); if (aa_regen < fast_regen) // weird, but what the client is doing aa_regen = fast_regen; } diff --git a/zone/merc.cpp b/zone/merc.cpp index a4b331fff..42a7f0290 100644 --- a/zone/merc.cpp +++ b/zone/merc.cpp @@ -1174,11 +1174,11 @@ void Merc::CalcRestState() { } } - RestRegenHP = 6 * (GetMaxHP() / RuleI(Character, RestRegenHP)); + RestRegenHP = 6 * (GetMaxHP() / zone->newzone_data.FastRegenHP); - RestRegenMana = 6 * (GetMaxMana() / RuleI(Character, RestRegenMana)); + RestRegenMana = 6 * (GetMaxMana() / zone->newzone_data.FastRegenMana); - RestRegenEndurance = 6 * (GetMaxEndurance() / RuleI(Character, RestRegenEnd)); + RestRegenEndurance = 6 * (GetMaxEndurance() / zone->newzone_data.FastRegenEndurance); } bool Merc::HasSkill(EQEmu::skills::SkillType skill_id) const { diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index f79288126..59a85b79b 100644 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -143,7 +143,10 @@ bool ZoneDatabase::GetZoneCFG(uint32 zoneid, uint16 instance_id, NewZone_Struct "snow_duration2, " // 53 "snow_duration3, " // 54 "snow_duration4, " // 55 - "gravity " // 56 + "gravity, " // 56 + "FastRegenHP, " // 57 + "FastRegenMana, " // 58 + "FastRegenEndurance, " // 59 "FROM zone WHERE zoneidnumber = %i AND version = %i", zoneid, instance_id); auto results = QueryDatabase(query); @@ -188,6 +191,10 @@ bool ZoneDatabase::GetZoneCFG(uint32 zoneid, uint16 instance_id, NewZone_Struct Log(Logs::General, Logs::Debug, "Zone Gravity is %f", zone_data->gravity); allow_mercs = true; + zone_data->FastRegenHP = atoi(row[57]); + zone_data->FastRegenMana = atoi(row[58]); + zone_data->FastRegenEndurance = atoi(row[59]); + int bindable = 0; bindable = atoi(row[31]); From 4276bf320899b6dbf1818edc4460c485b1274751 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Fri, 7 Sep 2018 23:55:51 -0400 Subject: [PATCH 373/670] Too many commas --- zone/zonedb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index 59a85b79b..0db41f51c 100644 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -146,7 +146,7 @@ bool ZoneDatabase::GetZoneCFG(uint32 zoneid, uint16 instance_id, NewZone_Struct "gravity, " // 56 "FastRegenHP, " // 57 "FastRegenMana, " // 58 - "FastRegenEndurance, " // 59 + "FastRegenEndurance " // 59 "FROM zone WHERE zoneidnumber = %i AND version = %i", zoneid, instance_id); auto results = QueryDatabase(query); From 00e44285a77ee7ab0c42786f2ad763d13c453c2b Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 8 Sep 2018 00:09:14 -0400 Subject: [PATCH 374/670] Fix column cases to make people happy If you already sourced, too fucking bad. --- utils/sql/db_update_manifest.txt | 2 +- utils/sql/git/required/2018_09_07_FastRegen.sql | 6 +++--- zone/zonedb.cpp | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index fc2fb2391..d0efc8d74 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -379,7 +379,7 @@ 9123|2018_07_07_data_buckets.sql|SHOW TABLES LIKE 'data_buckets'|empty| 9124|2018_07_09_tasks.sql|SHOW COLUMNS FROM `tasks` LIKE 'type'|empty| 9125|2018_07_20_task_emote.sql|SHOW COLUMNS FROM `tasks` LIKE 'completion_emote'|empty| -9126|2018_09_07_FastRegen.sql|SHOW COLUMNS FROM `zone` LIKE 'FastRegenHP'|empty| +9126|2018_09_07_FastRegen.sql|SHOW COLUMNS FROM `zone` LIKE 'fast_regen_hp'|empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/utils/sql/git/required/2018_09_07_FastRegen.sql b/utils/sql/git/required/2018_09_07_FastRegen.sql index de44b147d..d9c52acf7 100644 --- a/utils/sql/git/required/2018_09_07_FastRegen.sql +++ b/utils/sql/git/required/2018_09_07_FastRegen.sql @@ -1,3 +1,3 @@ -ALTER TABLE `zone` ADD `FastRegenHP` INT NOT NULL DEFAULT '180'; -ALTER TABLE `zone` ADD `FastRegenMana` INT NOT NULL DEFAULT '180'; -ALTER TABLE `zone` ADD `FastRegenEndurance` INT NOT NULL DEFAULT '180'; +ALTER TABLE `zone` ADD `fast_regen_hp` INT NOT NULL DEFAULT '180'; +ALTER TABLE `zone` ADD `fast_regen_mana` INT NOT NULL DEFAULT '180'; +ALTER TABLE `zone` ADD `fast_regen_endurance` INT NOT NULL DEFAULT '180'; diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index 0db41f51c..b08b0d32d 100644 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -143,10 +143,10 @@ bool ZoneDatabase::GetZoneCFG(uint32 zoneid, uint16 instance_id, NewZone_Struct "snow_duration2, " // 53 "snow_duration3, " // 54 "snow_duration4, " // 55 - "gravity, " // 56 - "FastRegenHP, " // 57 - "FastRegenMana, " // 58 - "FastRegenEndurance " // 59 + "gravity, " // 56 + "fast_regen_hp, " // 57 + "fast_regen_mana, " // 58 + "fast_regen_endurance " // 59 "FROM zone WHERE zoneidnumber = %i AND version = %i", zoneid, instance_id); auto results = QueryDatabase(query); From ec40b3dc698766307d283c1a1b39a180ea276297 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 8 Sep 2018 00:11:31 -0400 Subject: [PATCH 375/670] Fix bots --- zone/bot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/bot.cpp b/zone/bot.cpp index 8ba9ea36c..a5dd4aa41 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -7022,7 +7022,7 @@ void Bot::CalcRestState() { } RestRegenHP = 6 * (GetMaxHP() / zone->newzone_data.FastRegenHP); - RestRegenMana = 6 * (GetMaxMana() / zone->newzone_data.FastRegenMana)); + RestRegenMana = 6 * (GetMaxMana() / zone->newzone_data.FastRegenMana); RestRegenEndurance = 6 * (GetMaxEndurance() / zone->newzone_data.FastRegenEndurance); } From 7836d020ce6b88397580aa8186d1669910e295f9 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 8 Sep 2018 00:22:16 -0400 Subject: [PATCH 376/670] Add NPC Max Aggro Distance to zone table --- common/eq_packet_structs.h | 3 ++- common/version.h | 2 +- utils/sql/db_update_manifest.txt | 1 + utils/sql/git/required/2018_09_07_NPCMaxAggroDist.sql | 1 + zone/mob_ai.cpp | 2 +- zone/zonedb.cpp | 4 +++- 6 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 utils/sql/git/required/2018_09_07_NPCMaxAggroDist.sql diff --git a/common/eq_packet_structs.h b/common/eq_packet_structs.h index c4cbea4fb..bde77822b 100644 --- a/common/eq_packet_structs.h +++ b/common/eq_packet_structs.h @@ -379,7 +379,8 @@ struct NewZone_Struct { /*0708*/ uint32 FastRegenHP; /*0712*/ uint32 FastRegenMana; /*0716*/ uint32 FastRegenEndurance; -/*0720*/ +/*0720*/ uint32 NPCAggroMaxDist; +/*0724*/ }; /* diff --git a/common/version.h b/common/version.h index a6ea279c5..a7e066ab1 100644 --- a/common/version.h +++ b/common/version.h @@ -30,7 +30,7 @@ Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt */ -#define CURRENT_BINARY_DATABASE_VERSION 9126 +#define CURRENT_BINARY_DATABASE_VERSION 9127 #ifdef BOTS #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9019 #else diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index d0efc8d74..e84395a54 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -380,6 +380,7 @@ 9124|2018_07_09_tasks.sql|SHOW COLUMNS FROM `tasks` LIKE 'type'|empty| 9125|2018_07_20_task_emote.sql|SHOW COLUMNS FROM `tasks` LIKE 'completion_emote'|empty| 9126|2018_09_07_FastRegen.sql|SHOW COLUMNS FROM `zone` LIKE 'fast_regen_hp'|empty| +9127|2018_09_07_NPCMaxAggroDist.sql|SHOW COLUMNS FROM `zone` LIKE 'npc_max_aggro_dist'|empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/utils/sql/git/required/2018_09_07_NPCMaxAggroDist.sql b/utils/sql/git/required/2018_09_07_NPCMaxAggroDist.sql new file mode 100644 index 000000000..239a483a5 --- /dev/null +++ b/utils/sql/git/required/2018_09_07_NPCMaxAggroDist.sql @@ -0,0 +1 @@ +ALTER TABLE `zone` ADD `npc_max_aggro_dist` INT NOT NULL DEFAULT '600'; diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 5fd422035..766929c97 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1194,7 +1194,7 @@ void Mob::AI_Process() { // NPCs will forget people after 10 mins of not interacting with them or out of range // both of these maybe zone specific, hardcoded for now if (hate_list_cleanup_timer.Check()) { - hate_list.RemoveStaleEntries(600000, 600.0f); + hate_list.RemoveStaleEntries(600000, static_cast(zone->newzone_data.NPCAggroMaxDist)); if (hate_list.IsHateListEmpty()) { AI_Event_NoLongerEngaged(); zone->DelAggroMob(); diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index b08b0d32d..cced38aac 100644 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -146,7 +146,8 @@ bool ZoneDatabase::GetZoneCFG(uint32 zoneid, uint16 instance_id, NewZone_Struct "gravity, " // 56 "fast_regen_hp, " // 57 "fast_regen_mana, " // 58 - "fast_regen_endurance " // 59 + "fast_regen_endurance, " // 59 + "npc_max_aggro_dist " // 60 "FROM zone WHERE zoneidnumber = %i AND version = %i", zoneid, instance_id); auto results = QueryDatabase(query); @@ -194,6 +195,7 @@ bool ZoneDatabase::GetZoneCFG(uint32 zoneid, uint16 instance_id, NewZone_Struct zone_data->FastRegenHP = atoi(row[57]); zone_data->FastRegenMana = atoi(row[58]); zone_data->FastRegenEndurance = atoi(row[59]); + zone_data->NPCAggroMaxDist = atoi(row[60]); int bindable = 0; bindable = atoi(row[31]); From 08bd335cdb96524da69bde8f30b9c397f7d4fa2b Mon Sep 17 00:00:00 2001 From: Chris Miles Date: Sun, 9 Sep 2018 00:03:07 -0500 Subject: [PATCH 377/670] Update install.sh [skip ci] --- utils/scripts/linux_installer/install.sh | 50 ++++++++++++------------ 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/utils/scripts/linux_installer/install.sh b/utils/scripts/linux_installer/install.sh index 8f6f2f4d4..64c376bb3 100644 --- a/utils/scripts/linux_installer/install.sh +++ b/utils/scripts/linux_installer/install.sh @@ -54,36 +54,38 @@ export apt_options="-y -qq" # Set autoconfirm and silent install ################################################################ +if [ ! -f ./install_variables.txt ]; then + read -n1 -r -p "Press any key to continue..." key + #::: Setting up user environment (eqemu) + echo "First, we need to set your passwords..." + echo "Make sure that you remember these and keep them somewhere" + echo "" + echo "" + groupadd eqemu + useradd -g eqemu -d $eqemu_server_directory eqemu + passwd eqemu -#::: Setting up user environment (eqemu) -echo "First, we need to set your passwords..." -echo "Make sure that you remember these and keep them somewhere" -echo "" -echo "" -groupadd eqemu -useradd -g eqemu -d $eqemu_server_directory eqemu -passwd eqemu + #::: Make server directory and go to it + mkdir $eqemu_server_directory + cd $eqemu_server_directory -#::: Make server directory and go to it -mkdir $eqemu_server_directory -cd $eqemu_server_directory + #::: Setup MySQL root user PW + read -p "Enter MySQL root (Database) password: " eqemu_db_root_password -#::: Setup MySQL root user PW -read -p "Enter MySQL root (Database) password: " eqemu_db_root_password + #::: Write install variables (later use) + echo "mysql_root:$eqemu_db_root_password" > install_variables.txt -#::: Write install variables (later use) -echo "mysql_root:$eqemu_db_root_password" > install_variables.txt + #::: Setup MySQL server + read -p "Enter Database Name (single word, no special characters, lower case):" eqemu_db_name + read -p "Enter (Database) MySQL EQEmu Server username: " eqemu_db_username + read -p "Enter (Database) MySQL EQEmu Server password: " eqemu_db_password -#::: Setup MySQL server -read -p "Enter Database Name (single word, no special characters, lower case):" eqemu_db_name -read -p "Enter (Database) MySQL EQEmu Server username: " eqemu_db_username -read -p "Enter (Database) MySQL EQEmu Server password: " eqemu_db_password - -#::: Write install variables (later use) -echo "mysql_eqemu_db_name:$eqemu_db_name" >> install_variables.txt -echo "mysql_eqemu_user:$eqemu_db_username" >> install_variables.txt -echo "mysql_eqemu_password:$eqemu_db_password" >> install_variables.txt + #::: Write install variables (later use) + echo "mysql_eqemu_db_name:$eqemu_db_name" >> install_variables.txt + echo "mysql_eqemu_user:$eqemu_db_username" >> install_variables.txt + echo "mysql_eqemu_password:$eqemu_db_password" >> install_variables.txt +fi if [[ "$OS" == "Debian" ]]; then # Install pre-req packages From 92eb64b51ceb650e033bbaf32c9ea0596a850065 Mon Sep 17 00:00:00 2001 From: Chris Miles Date: Sun, 9 Sep 2018 00:04:16 -0500 Subject: [PATCH 378/670] Update install.sh [skip ci] --- utils/scripts/linux_installer/install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/scripts/linux_installer/install.sh b/utils/scripts/linux_installer/install.sh index 64c376bb3..386503119 100644 --- a/utils/scripts/linux_installer/install.sh +++ b/utils/scripts/linux_installer/install.sh @@ -56,7 +56,8 @@ export apt_options="-y -qq" # Set autoconfirm and silent install if [ ! -f ./install_variables.txt ]; then -read -n1 -r -p "Press any key to continue..." key + read -n1 -r -p "Press any key to continue..." key + #::: Setting up user environment (eqemu) echo "First, we need to set your passwords..." echo "Make sure that you remember these and keep them somewhere" From 55c0cc02a1c6567329f8397b14f5656dbcbe5edb Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 9 Sep 2018 02:27:04 -0500 Subject: [PATCH 379/670] Update eqemu_server.pl [skip ci] --- utils/scripts/eqemu_server.pl | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/utils/scripts/eqemu_server.pl b/utils/scripts/eqemu_server.pl index eed4a767e..29a8142a6 100644 --- a/utils/scripts/eqemu_server.pl +++ b/utils/scripts/eqemu_server.pl @@ -172,19 +172,19 @@ sub show_install_summary_info { if (-e "install_variables.txt") { $file_to_open = "install_variables.txt"; } - elsif(-e "../install_variables.txt"){ + elsif (-e "../install_variables.txt") { $file_to_open = "../install_variables.txt"; } - open (INSTALL_VARS, $file_to_open); - while (){ + open(INSTALL_VARS, $file_to_open); + while () { chomp; $o = $_; @data = split(":", $o); print " - " . $data[0] . "\t" . $data[1] . "\n"; } - close (INSTALL_VARS); - - if($OS eq "Windows"){ + close(INSTALL_VARS); + + if ($OS eq "Windows") { print "[Install] Windows Utility Scripts:\n"; print " - t_start_server.bat Starts EQEmu server with 30 dynamic zones, UCS & Queryserv, dynamic zones\n"; print " - t_start_server_with_loginserver.bat Starts EQEmu server with 30 zones with loginserver\n"; @@ -192,16 +192,16 @@ sub show_install_summary_info { print " - t_database_backup.bat Backs up the Database to backups/ folder - do not run during server is online\n"; print " - t_server_crash_report.pl Will parse any zone crashes for reporting to developers\n"; } - if($OS eq "Linux"){ + if ($OS eq "Linux") { print "[Install] Linux Utility Scripts:\n"; print " - server_start.sh Starts EQEmu server (Quiet) with 30 dynamic zones, UCS & Queryserv, dynamic zones\n"; print " - server_start_dev.sh Starts EQEmu server with 10 dynamic zones, UCS & Queryserv, dynamic zones all verbose\n"; print " - server_stop.sh Stops EQEmu Server (No warning)\n"; print " - server_status.sh Prints the status of the EQEmu Server processes\n"; } - + print "[Configure] eqemu_config.xml Edit to change server settings and name\n"; - + analytics_insertion("install_complete", "null"); } @@ -831,6 +831,7 @@ sub show_menu_prompt { elsif($input eq "setup_bots"){ setup_bots(); $dc = 1; } elsif($input eq "linux_login_server_setup"){ do_linux_login_server_setup(); $dc = 1; } elsif($input eq "quest_heading_convert"){ quest_heading_convert(); $dc = 1; } + elsif($input eq "source_peq_db"){ fetch_peq_db_full(); $dc = 1; } elsif($input eq "exit"){ exit; } From 7ca6f008d6ddfeb38ddb60fbb18592606a47ef93 Mon Sep 17 00:00:00 2001 From: Uleat Date: Sun, 9 Sep 2018 18:29:14 -0400 Subject: [PATCH 380/670] Fix for linux compile failure --- zone/zonedb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index cb0c81d3a..dc940b552 100644 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -2070,7 +2070,7 @@ int ZoneDatabase::CountCharacterInvSnapshots(uint32 character_id) { auto row = results.begin(); int64 count = atoll(row[0]); - if (count > INT_MAX) + if (count > 2147483647) return -2; if (count < 0) return -3; From 8d69ff5826d9c12f0f181445ad6f34a7c28c9a80 Mon Sep 17 00:00:00 2001 From: Uleat Date: Sun, 9 Sep 2018 18:52:30 -0400 Subject: [PATCH 381/670] Fix 2 for linux compile failure --- common/database.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/database.cpp b/common/database.cpp index b6c752dd1..2ec4675b3 100644 --- a/common/database.cpp +++ b/common/database.cpp @@ -2121,7 +2121,7 @@ int Database::CountInvSnapshots() { auto row = results.begin(); int64 count = atoll(row[0]); - if (count > INT_MAX) + if (count > 2147483647) return -2; if (count < 0) return -3; From 0e3df84ad98a5b4fee3190fd54f7a1f8edae5705 Mon Sep 17 00:00:00 2001 From: Uleat Date: Sun, 9 Sep 2018 20:39:21 -0400 Subject: [PATCH 382/670] Fix for inventory update dupe entry failure --- .../required/2018_08_13_inventory_update.sql | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/utils/sql/git/required/2018_08_13_inventory_update.sql b/utils/sql/git/required/2018_08_13_inventory_update.sql index 7021b234c..e02bc3ae0 100644 --- a/utils/sql/git/required/2018_08_13_inventory_update.sql +++ b/utils/sql/git/required/2018_08_13_inventory_update.sql @@ -26,7 +26,14 @@ SELECT 'post-transform count..', -- update `inventory` slots UPDATE `inventory` SET `slotid` = 33 WHERE `slotid` = 30; -- adjust cursor UPDATE `inventory` SET `slotid` = (`slotid` + 20) WHERE `slotid` >= 331 AND `slotid` <= 340; -- adjust cursor bags -UPDATE `inventory` SET `slotid` = (`slotid` + 1) WHERE `slotid` >= 22 AND `slotid` <= 29; -- adjust general slots +UPDATE `inventory` SET `slotid` = 30 WHERE `slotid` = 29; -- adjust general8 slot +UPDATE `inventory` SET `slotid` = 29 WHERE `slotid` = 28; -- adjust general7 slot +UPDATE `inventory` SET `slotid` = 28 WHERE `slotid` = 27; -- adjust general6 slot +UPDATE `inventory` SET `slotid` = 27 WHERE `slotid` = 26; -- adjust general5 slot +UPDATE `inventory` SET `slotid` = 26 WHERE `slotid` = 25; -- adjust general4 slot +UPDATE `inventory` SET `slotid` = 25 WHERE `slotid` = 24; -- adjust general3 slot +UPDATE `inventory` SET `slotid` = 24 WHERE `slotid` = 23; -- adjust general2 slot +UPDATE `inventory` SET `slotid` = 23 WHERE `slotid` = 22; -- adjust general1 slot -- current general bags remain the same UPDATE `inventory` SET `slotid` = 22 WHERE `slotid` = 21; -- adjust ammo slot UPDATE `inventory` SET `slotid` = 21 WHERE `slotid` = 9999; -- adjust powersource slot @@ -35,7 +42,14 @@ UPDATE `inventory` SET `slotid` = 21 WHERE `slotid` = 9999; -- adjust powersourc -- update `character_corpse_items` slots UPDATE `character_corpse_items` SET `equip_slot` = 33 WHERE `equip_slot` = 30; -- adjust cursor UPDATE `character_corpse_items` SET `equip_slot` = (`equip_slot` + 20) WHERE `equip_slot` >= 331 AND `equip_slot` <= 340; -- adjust cursor bags -UPDATE `character_corpse_items` SET `equip_slot` = (`equip_slot` + 1) WHERE `equip_slot` >= 22 AND `equip_slot` <= 29; -- adjust general slots +UPDATE `character_corpse_items` SET `equip_slot` = 30 WHERE `equip_slot` = 29; -- adjust general8 slot +UPDATE `character_corpse_items` SET `equip_slot` = 29 WHERE `equip_slot` = 28; -- adjust general7 slot +UPDATE `character_corpse_items` SET `equip_slot` = 28 WHERE `equip_slot` = 27; -- adjust general6 slot +UPDATE `character_corpse_items` SET `equip_slot` = 27 WHERE `equip_slot` = 26; -- adjust general5 slot +UPDATE `character_corpse_items` SET `equip_slot` = 26 WHERE `equip_slot` = 25; -- adjust general4 slot +UPDATE `character_corpse_items` SET `equip_slot` = 25 WHERE `equip_slot` = 24; -- adjust general3 slot +UPDATE `character_corpse_items` SET `equip_slot` = 24 WHERE `equip_slot` = 23; -- adjust general2 slot +UPDATE `character_corpse_items` SET `equip_slot` = 23 WHERE `equip_slot` = 22; -- adjust general1 slot -- current general bags remain the same UPDATE `character_corpse_items` SET `equip_slot` = 22 WHERE `equip_slot` = 21; -- adjust ammo slot UPDATE `character_corpse_items` SET `equip_slot` = 21 WHERE `equip_slot` = 9999; -- adjust powersource slot From add25eb6179e3f2f831b6d52526fc7450b02379b Mon Sep 17 00:00:00 2001 From: chase Date: Mon, 10 Sep 2018 00:23:09 -0700 Subject: [PATCH 383/670] converting some remaining abs & fabs to use std::abs, fixing some warnings --- common/memory_buffer.h | 2 +- common/misc_functions.h | 2 +- common/patches/rof.cpp | 18 +++++++++--------- zone/aggro.cpp | 30 +++++++++--------------------- zone/client.cpp | 4 ++-- 5 files changed, 22 insertions(+), 34 deletions(-) diff --git a/common/memory_buffer.h b/common/memory_buffer.h index 880b860ae..474953f91 100644 --- a/common/memory_buffer.h +++ b/common/memory_buffer.h @@ -124,7 +124,7 @@ namespace EQEmu class OutBuffer : public std::stringstream { public: - inline size_t size() { return tellp(); } + inline size_t size() { return static_cast(tellp()); } void overwrite(OutBuffer::pos_type position, const char *_Str, std::streamsize _Count); uchar* detach(); }; diff --git a/common/misc_functions.h b/common/misc_functions.h index 2ead697e7..8a7ffd59a 100644 --- a/common/misc_functions.h +++ b/common/misc_functions.h @@ -73,7 +73,7 @@ uint32 SwapBits21And22(uint32 mask); uint32 Catch22(uint32 mask); // macro to catch fp errors (provided by noudness) -#define FCMP(a,b) (fabs(a-b) < FLT_EPSILON) +#define FCMP(a,b) (std::abs(a-b) < FLT_EPSILON) #define _ITOA_BUFLEN 25 const char *itoa(int num); //not thread safe diff --git a/common/patches/rof.cpp b/common/patches/rof.cpp index 4364c9cb1..143400bf6 100644 --- a/common/patches/rof.cpp +++ b/common/patches/rof.cpp @@ -2795,7 +2795,7 @@ namespace RoF std::vector skill; std::vector points; - for(auto i = 0; i < emu->total_prereqs; ++i) { + for(auto i = 0u; i < emu->total_prereqs; ++i) { skill.push_back(inapp->ReadUInt32()); points.push_back(inapp->ReadUInt32()); } @@ -2849,7 +2849,7 @@ namespace RoF outapp->WriteUInt32(emu->total_effects); inapp->SetReadPosition(sizeof(AARankInfo_Struct)); - for(auto i = 0; i < emu->total_effects; ++i) { + for(auto i = 0u; i < emu->total_effects; ++i) { outapp->WriteUInt32(inapp->ReadUInt32()); // skill_id outapp->WriteUInt32(inapp->ReadUInt32()); // base1 outapp->WriteUInt32(inapp->ReadUInt32()); // base2 @@ -2905,7 +2905,7 @@ namespace RoF unsigned char *eq_ptr = __packet->pBuffer; eq_ptr += sizeof(structs::CharacterSelect_Struct); - for (int counter = 0; counter < character_count; ++counter) { + for (auto counter = 0u; counter < character_count; ++counter) { emu_cse = (CharacterSelectEntry_Struct *)emu_ptr; eq_cse = (structs::CharacterSelectEntry_Struct *)eq_ptr; // base address @@ -3247,7 +3247,7 @@ namespace RoF InBuffer += title_size; TaskDescriptionData1_Struct *emu_tdd1 = (TaskDescriptionData1_Struct *)InBuffer; - emu_tdd1->StartTime = (time(nullptr) - emu_tdd1->StartTime); // RoF has elapsed time here rather than start time + emu_tdd1->StartTime = (static_cast(time(nullptr)) - emu_tdd1->StartTime); // RoF has elapsed time here rather than start time InBuffer += sizeof(TaskDescriptionData1_Struct); uint32 description_size = strlen(InBuffer) + 1; @@ -3598,10 +3598,10 @@ namespace RoF // calculate size of names, note the packet DOES NOT have null termed c-strings std::vector name_lengths; - for (int i = 0; i < count; ++i) { + for (auto i = 0u; i < count; ++i) { InternalVeteranReward *ivr = (InternalVeteranReward *)__emu_buffer; - for (int i = 0; i < ivr->claim_count; i++) { + for (auto i = 0u; i < ivr->claim_count; i++) { uint32 length = strnlen(ivr->items[i].item_name, 63); if (length) name_lengths.push_back(length); @@ -3621,7 +3621,7 @@ namespace RoF outapp->WriteUInt32(count); auto name_itr = name_lengths.begin(); - for (int i = 0; i < count; i++) { + for (auto i = 0u; i < count; i++) { InternalVeteranReward *ivr = (InternalVeteranReward *)__emu_buffer; outapp->WriteUInt32(ivr->claim_id); @@ -3629,7 +3629,7 @@ namespace RoF outapp->WriteUInt32(ivr->claim_count); outapp->WriteUInt8(1); // enabled - for (int j = 0; j < ivr->claim_count; j++) { + for (auto j = 0u; j < ivr->claim_count; j++) { assert(name_itr != name_lengths.end()); // the way it's written, it should never happen, so just assert outapp->WriteUInt32(*name_itr); outapp->WriteData(ivr->items[j].item_name, *name_itr); @@ -3857,7 +3857,7 @@ namespace RoF VARSTRUCT_ENCODE_STRING(Buffer, emu->name); VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->spawnId); VARSTRUCT_ENCODE_TYPE(uint8, Buffer, emu->level); - VARSTRUCT_ENCODE_TYPE(float, Buffer, SpawnSize - 0.7); // Eye Height? + VARSTRUCT_ENCODE_TYPE(float, Buffer, SpawnSize - 0.7f); // Eye Height? VARSTRUCT_ENCODE_TYPE(uint8, Buffer, emu->NPC); structs::Spawn_Struct_Bitfields *Bitfields = (structs::Spawn_Struct_Bitfields*)Buffer; diff --git a/zone/aggro.cpp b/zone/aggro.cpp index f8162322e..ec7f61f1a 100644 --- a/zone/aggro.cpp +++ b/zone/aggro.cpp @@ -107,16 +107,10 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) { float iAggroRange = GetAggroRange(); float t1, t2, t3; - t1 = mob->GetX() - GetX(); - t2 = mob->GetY() - GetY(); - t3 = mob->GetZ() - GetZ(); - //Cheap ABS() - if(t1 < 0) - t1 = 0 - t1; - if(t2 < 0) - t2 = 0 - t2; - if(t3 < 0) - t3 = 0 - t3; + t1 = std::abs(mob->GetX() - GetX()); + t2 = std::abs(mob->GetY() - GetY()); + t3 = std::abs(mob->GetZ() - GetZ()); + if(( t1 > iAggroRange) || ( t2 > iAggroRange) || ( t3 > iAggroRange) ) { @@ -271,16 +265,10 @@ bool Mob::CheckWillAggro(Mob *mob) { // Image: I moved this up by itself above faction and distance checks because if one of these return true, theres no reason to go through the other information float t1, t2, t3; - t1 = mob->GetX() - GetX(); - t2 = mob->GetY() - GetY(); - t3 = mob->GetZ() - GetZ(); - //Cheap ABS() - if(t1 < 0) - t1 = 0 - t1; - if(t2 < 0) - t2 = 0 - t2; - if(t3 < 0) - t3 = 0 - t3; + t1 = std::abs(mob->GetX() - GetX()); + t2 = std::abs(mob->GetY() - GetY()); + t3 = std::abs(mob->GetZ() - GetZ()); + if(( t1 > iAggroRange) || ( t2 > iAggroRange) || ( t3 > iAggroRange) @@ -526,7 +514,7 @@ void EntityList::AIYellForHelp(Mob* sender, Mob* attacker) { Log(Logs::General, Logs::None, "AIYellForHelp(\"%s\",\"%s\") %s attacking %s Dist %f Z %f", sender->GetName(), attacker->GetName(), mob->GetName(), attacker->GetName(), DistanceSquared(mob->GetPosition(), - sender->GetPosition()), fabs(sender->GetZ()+mob->GetZ())); + sender->GetPosition()), std::abs(sender->GetZ()+mob->GetZ())); #endif mob->AddToHateList(attacker, 25, 0, false); sender->AddAssistCap(); diff --git a/zone/client.cpp b/zone/client.cpp index 129293970..67cca5866 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -8103,9 +8103,9 @@ void Client::SetFactionLevel(uint32 char_id, uint32 npc_id, uint8 char_class, ui { //The ole switcheroo if (npc_value[i] > 0) - npc_value[i] = -abs(npc_value[i]); + npc_value[i] = -std::abs(npc_value[i]); else if (npc_value[i] < 0) - npc_value[i] = abs(npc_value[i]); + npc_value[i] = std::abs(npc_value[i]); } // Adjust the amount you can go up or down so the resulting range From 953bee6c215417178532fba77c7e168008499be3 Mon Sep 17 00:00:00 2001 From: Uleat Date: Tue, 11 Sep 2018 20:05:43 -0400 Subject: [PATCH 384/670] Fix for crash when dropping items (c != python) --- zone/inventory.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/zone/inventory.cpp b/zone/inventory.cpp index 902268e2c..d4604852d 100644 --- a/zone/inventory.cpp +++ b/zone/inventory.cpp @@ -610,15 +610,15 @@ void Client::DropItem(int16 slot_id, bool recurse) if (LogSys.log_settings[Logs::Inventory].is_category_enabled) { Log(Logs::General, Logs::Inventory, "DropItem() Hack detected - full item parse:"); Log(Logs::General, Logs::Inventory, "depth: 0, Item: '%s' (id: %u), IsDroppable: %s", - (invalid_drop->GetItem() ? invalid_drop->GetItem()->Name : "null data"), invalid_drop->GetID(), invalid_drop->IsDroppable(false)); + (invalid_drop->GetItem() ? invalid_drop->GetItem()->Name : "null data"), invalid_drop->GetID(), (invalid_drop->IsDroppable(false) ? "true" : "false")); for (auto iter1 : *invalid_drop->GetContents()) { // depth 1 Log(Logs::General, Logs::Inventory, "-depth: 1, Item: '%s' (id: %u), IsDroppable: %s", - (iter1.second->GetItem() ? iter1.second->GetItem()->Name : "null data"), iter1.second->GetID(), iter1.second->IsDroppable(false)); + (iter1.second->GetItem() ? iter1.second->GetItem()->Name : "null data"), iter1.second->GetID(), (iter1.second->IsDroppable(false) ? "true" : "false")); for (auto iter2 : *iter1.second->GetContents()) { // depth 2 Log(Logs::General, Logs::Inventory, "--depth: 2, Item: '%s' (id: %u), IsDroppable: %s", - (iter2.second->GetItem() ? iter2.second->GetItem()->Name : "null data"), iter2.second->GetID(), iter2.second->IsDroppable(false)); + (iter2.second->GetItem() ? iter2.second->GetItem()->Name : "null data"), iter2.second->GetID(), (iter2.second->IsDroppable(false) ? "true" : "false")); } } } @@ -636,21 +636,21 @@ void Client::DropItem(int16 slot_id, bool recurse) if (LogSys.log_settings[Logs::Inventory].is_category_enabled) { Log(Logs::General, Logs::Inventory, "DropItem() Processing - full item parse:"); Log(Logs::General, Logs::Inventory, "depth: 0, Item: '%s' (id: %u), IsDroppable: %s", - (inst->GetItem() ? inst->GetItem()->Name : "null data"), inst->GetID(), inst->IsDroppable(false)); + (inst->GetItem() ? inst->GetItem()->Name : "null data"), inst->GetID(), (inst->IsDroppable(false) ? "true" : "false")); if (!inst->IsDroppable(false)) Log(Logs::General, Logs::Error, "Non-droppable item being processed for drop by '%s'", GetCleanName()); for (auto iter1 : *inst->GetContents()) { // depth 1 Log(Logs::General, Logs::Inventory, "-depth: 1, Item: '%s' (id: %u), IsDroppable: %s", - (iter1.second->GetItem() ? iter1.second->GetItem()->Name : "null data"), iter1.second->GetID(), iter1.second->IsDroppable(false)); + (iter1.second->GetItem() ? iter1.second->GetItem()->Name : "null data"), iter1.second->GetID(), (iter1.second->IsDroppable(false) ? "true" : "false")); if (!iter1.second->IsDroppable(false)) Log(Logs::General, Logs::Error, "Non-droppable item being processed for drop by '%s'", GetCleanName()); for (auto iter2 : *iter1.second->GetContents()) { // depth 2 Log(Logs::General, Logs::Inventory, "--depth: 2, Item: '%s' (id: %u), IsDroppable: %s", - (iter2.second->GetItem() ? iter2.second->GetItem()->Name : "null data"), iter2.second->GetID(), iter2.second->IsDroppable(false)); + (iter2.second->GetItem() ? iter2.second->GetItem()->Name : "null data"), iter2.second->GetID(), (iter2.second->IsDroppable(false) ? "true" : "false")); if (!iter2.second->IsDroppable(false)) Log(Logs::General, Logs::Error, "Non-droppable item being processed for drop by '%s'", GetCleanName()); From c677169edd4b7fb6c917e90c3cff2ce2d133706a Mon Sep 17 00:00:00 2001 From: KimLS Date: Sat, 15 Sep 2018 19:20:47 -0700 Subject: [PATCH 385/670] Removed existing movement code, started replacing --- zone/bot.cpp | 7 -- zone/client_process.cpp | 80 +++++++++---------- zone/command.cpp | 3 - zone/entity.cpp | 86 ++++++++++---------- zone/merc.cpp | 8 -- zone/mob.cpp | 97 +++++++++++------------ zone/mob.h | 24 +----- zone/mob_ai.cpp | 20 ----- zone/pathing.cpp | 38 ++++----- zone/perl_mob.cpp | 23 ------ zone/waypoints.cpp | 169 +++++++++------------------------------- 11 files changed, 186 insertions(+), 369 deletions(-) diff --git a/zone/bot.cpp b/zone/bot.cpp index a5dd4aa41..8223638eb 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -281,7 +281,6 @@ void Bot::Sit() { if(IsMoving()) { moved = false; SetCurrentSpeed(0); - tar_ndx = 0; } SetAppearance(eaSitting); @@ -2694,9 +2693,6 @@ void Bot::AI_Process() { Goal = UpdatePath(Goal.x, Goal.y, Goal.z, GetBotRunspeed(), WaypointChanged, NodeReached); - - if (WaypointChanged) - tar_ndx = 20; } CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetBotRunspeed()); @@ -2822,9 +2818,6 @@ void Bot::AI_Process() { Goal = UpdatePath(Goal.x, Goal.y, Goal.z, speed, WaypointChanged, NodeReached); - - if (WaypointChanged) - tar_ndx = 20; } CalculateNewPosition(Goal.x, Goal.y, Goal.z, speed); diff --git a/zone/client_process.cpp b/zone/client_process.cpp index bd14dc70a..3894826d6 100644 --- a/zone/client_process.cpp +++ b/zone/client_process.cpp @@ -242,46 +242,46 @@ bool Client::Process() { } } - /* Build a close range list of NPC's */ - if (npc_close_scan_timer.Check()) { - close_mobs.clear(); - - /* Force spawn updates when traveled far */ - bool force_spawn_updates = false; - float client_update_range = (RuleI(Range, ClientForceSpawnUpdateRange) * RuleI(Range, ClientForceSpawnUpdateRange)); - if (DistanceSquared(last_major_update_position, m_Position) >= client_update_range) { - last_major_update_position = m_Position; - force_spawn_updates = true; - } - - float scan_range = (RuleI(Range, ClientNPCScan) * RuleI(Range, ClientNPCScan)); - auto &mob_list = entity_list.GetMobList(); - for (auto itr = mob_list.begin(); itr != mob_list.end(); ++itr) { - Mob* mob = itr->second; - - float distance = DistanceSquared(m_Position, mob->GetPosition()); - if (mob->IsNPC()) { - if (distance <= scan_range) { - close_mobs.insert(std::pair(mob, distance)); - } - else if ((mob->GetAggroRange() * mob->GetAggroRange()) > scan_range) { - close_mobs.insert(std::pair(mob, distance)); - } - } - - if (force_spawn_updates && mob != this) { - - if (mob->is_distance_roamer) { - mob->SendPositionUpdateToClient(this); - continue; - } - - if (distance <= client_update_range) - mob->SendPositionUpdateToClient(this); - } - - } - } + ///* Build a close range list of NPC's */ + //if (npc_close_scan_timer.Check()) { + // close_mobs.clear(); + // + // /* Force spawn updates when traveled far */ + // bool force_spawn_updates = false; + // float client_update_range = (RuleI(Range, ClientForceSpawnUpdateRange) * RuleI(Range, ClientForceSpawnUpdateRange)); + // if (DistanceSquared(last_major_update_position, m_Position) >= client_update_range) { + // last_major_update_position = m_Position; + // force_spawn_updates = true; + // } + // + // float scan_range = (RuleI(Range, ClientNPCScan) * RuleI(Range, ClientNPCScan)); + // auto &mob_list = entity_list.GetMobList(); + // for (auto itr = mob_list.begin(); itr != mob_list.end(); ++itr) { + // Mob* mob = itr->second; + // + // float distance = DistanceSquared(m_Position, mob->GetPosition()); + // if (mob->IsNPC()) { + // if (distance <= scan_range) { + // close_mobs.insert(std::pair(mob, distance)); + // } + // else if ((mob->GetAggroRange() * mob->GetAggroRange()) > scan_range) { + // close_mobs.insert(std::pair(mob, distance)); + // } + // } + // + // if (force_spawn_updates && mob != this) { + // + // if (mob->is_distance_roamer) { + // mob->SendPositionUpdateToClient(this); + // continue; + // } + // + // if (distance <= client_update_range) + // mob->SendPositionUpdateToClient(this); + // } + // + // } + //} bool may_use_attacks = false; /* diff --git a/zone/command.cpp b/zone/command.cpp index 8fe816fe0..4cc17c6ca 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -7242,9 +7242,6 @@ void command_pf(Client *c, const Seperator *sep) Mob *who = c->GetTarget(); c->Message(0, "POS: (%.2f, %.2f, %.2f)", who->GetX(), who->GetY(), who->GetZ()); c->Message(0, "WP: %s (%d/%d)", to_string(who->GetCurrentWayPoint()).c_str(), who->IsNPC()?who->CastToNPC()->GetMaxWp():-1); - c->Message(0, "TAR: (%.2f, %.2f, %.2f)", who->GetTarX(), who->GetTarY(), who->GetTarZ()); - c->Message(0, "TARV: (%.2f, %.2f, %.2f)", who->GetTarVX(), who->GetTarVY(), who->GetTarVZ()); - c->Message(0, "|TV|=%.2f index=%d", who->GetTarVector(), who->GetTarNDX()); c->Message(0, "pause=%d RAspeed=%d", who->GetCWPP(), who->GetRunAnimSpeed()); } else { c->Message(0, "ERROR: target required"); diff --git a/zone/entity.cpp b/zone/entity.cpp index 2523c7d96..1ab6f214a 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -2655,49 +2655,49 @@ void EntityList::RemoveDebuffs(Mob *caster) // all updates into one packet. void EntityList::SendPositionUpdates(Client *client, uint32 cLastUpdate, float update_range, Entity *always_send, bool iSendEvenIfNotChanged) { - update_range = (update_range * update_range); - - EQApplicationPacket *outapp = 0; - PlayerPositionUpdateServer_Struct *ppu = 0; - Mob *mob = 0; - - auto it = mob_list.begin(); - while (it != mob_list.end()) { - - mob = it->second; - - if ( - mob && !mob->IsCorpse() - && (it->second != client) - && (mob->IsClient() || iSendEvenIfNotChanged || (mob->LastChange() >= cLastUpdate)) - && (it->second->ShouldISpawnFor(client)) - ) { - if ( - update_range == 0 - || (it->second == always_send) - || mob->IsClient() - || (DistanceSquared(mob->GetPosition(), client->GetPosition()) <= update_range) - ) { - if (mob && mob->IsClient() && mob->GetID() > 0) { - client->QueuePacket(outapp, false, Client::CLIENT_CONNECTED); - - if (outapp == 0) { - outapp = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); - ppu = (PlayerPositionUpdateServer_Struct*)outapp->pBuffer; - } - - mob->MakeSpawnUpdate(ppu); - - safe_delete(outapp); - outapp = 0; - } - } - } - - ++it; - } - - safe_delete(outapp); +// update_range = (update_range * update_range); +// +// EQApplicationPacket *outapp = 0; +// PlayerPositionUpdateServer_Struct *ppu = 0; +// Mob *mob = 0; +// +// auto it = mob_list.begin(); +// while (it != mob_list.end()) { +// +// mob = it->second; +// +// if ( +// mob && !mob->IsCorpse() +// && (it->second != client) +// && (mob->IsClient() || iSendEvenIfNotChanged || (mob->LastChange() >= cLastUpdate)) +// && (it->second->ShouldISpawnFor(client)) +// ) { +// if ( +// update_range == 0 +// || (it->second == always_send) +// || mob->IsClient() +// || (DistanceSquared(mob->GetPosition(), client->GetPosition()) <= update_range) +// ) { +// if (mob && mob->IsClient() && mob->GetID() > 0) { +// client->QueuePacket(outapp, false, Client::CLIENT_CONNECTED); +// +// if (outapp == 0) { +// outapp = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); +// ppu = (PlayerPositionUpdateServer_Struct*)outapp->pBuffer; +// } +// +// mob->MakeSpawnUpdate(ppu); +// +// safe_delete(outapp); +// outapp = 0; +// } +// } +// } +// +// ++it; +// } +// +// safe_delete(outapp); } char *EntityList::MakeNameUnique(char *name) diff --git a/zone/merc.cpp b/zone/merc.cpp index 42a7f0290..2f0cae947 100644 --- a/zone/merc.cpp +++ b/zone/merc.cpp @@ -1490,9 +1490,6 @@ void Merc::AI_Process() { NodeReached ); - if (WaypointChanged) - tar_ndx = 20; - CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetRunspeed()); } else { @@ -1784,9 +1781,6 @@ void Merc::AI_Process() { glm::vec3 Goal = UpdatePath(follow->GetX(), follow->GetY(), follow->GetZ(), speed, WaypointChanged, NodeReached); - if (WaypointChanged) - tar_ndx = 20; - CalculateNewPosition(Goal.x, Goal.y, Goal.z, speed); } else { @@ -1825,7 +1819,6 @@ void Merc::AI_Start(int32 iMoveDelay) { } SendTo(GetX(), GetY(), GetZ()); - SetChanged(); SaveGuardSpot(); } @@ -4397,7 +4390,6 @@ void Merc::Sit() { // SetHeading(CalculateHeadingToTarget(GetTarget()->GetX(), GetTarget()->GetY())); SendPosition(); SetMoving(false); - tar_ndx = 0; } SetAppearance(eaSitting); diff --git a/zone/mob.cpp b/zone/mob.cpp index 9764ba099..a4e7dbff8 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -105,8 +105,6 @@ Mob::Mob(const char* in_name, gravity_timer(1000), viral_timer(0), m_FearWalkTarget(-999999.0f, -999999.0f, -999999.0f), - m_TargetLocation(glm::vec3()), - m_TargetV(glm::vec3()), flee_timer(FLEE_CHECK_TIMER), m_Position(position), tmHidden(-1), @@ -119,8 +117,6 @@ Mob::Mob(const char* in_name, hate_list_cleanup_timer(6000) { targeted = 0; - tar_ndx = 0; - tar_vector = 0; currently_fleeing = false; last_major_update_position = m_Position; @@ -131,7 +127,6 @@ Mob::Mob(const char* in_name, moved = false; m_RewindLocation = glm::vec3(); - _egnode = nullptr; name[0] = 0; orig_name[0] = 0; clean_name[0] = 0; @@ -348,7 +343,6 @@ Mob::Mob(const char* in_name, memset(&aabonuses, 0, sizeof(StatBonuses)); spellbonuses.AggroRange = -1; spellbonuses.AssistRange = -1; - pLastChange = 0; SetPetID(0); SetOwnerID(0); typeofpet = petNone; // default to not a pet @@ -1456,57 +1450,59 @@ void Mob::StopMoving(float new_heading) { /* Used for mobs standing still - this does not send a delta */ void Mob::SendPosition() { - auto app = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); - PlayerPositionUpdateServer_Struct* spu = (PlayerPositionUpdateServer_Struct*)app->pBuffer; - MakeSpawnUpdateNoDelta(spu); - - /* When an NPC has made a large distance change - we should update all clients to prevent "ghosts" */ - if (DistanceSquared(last_major_update_position, m_Position) >= (100 * 100)) { - entity_list.QueueClients(this, app, true, true); - last_major_update_position = m_Position; - is_distance_roamer = true; - } - else { - entity_list.QueueCloseClients(this, app, true, RuleI(Range, MobPositionUpdates), nullptr, false); - } - - safe_delete(app); + //auto app = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); + //PlayerPositionUpdateServer_Struct* spu = (PlayerPositionUpdateServer_Struct*)app->pBuffer; + //MakeSpawnUpdateNoDelta(spu); + // + //entity_list.QueueCloseClients(this, app, true, 200.0f, nullptr, false); + // + ///* When an NPC has made a large distance change - we should update all clients to prevent "ghosts" */ + //if (DistanceSquared(last_major_update_position, m_Position) >= (100 * 100)) { + // entity_list.QueueClients(this, app, true, true); + // last_major_update_position = m_Position; + // is_distance_roamer = true; + //} + //else { + // entity_list.QueueCloseClients(this, app, true, RuleI(Range, MobPositionUpdates), nullptr, false); + //} + // + //safe_delete(app); } void Mob::SendPositionUpdateToClient(Client *client) { - auto app = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); - PlayerPositionUpdateServer_Struct* spawn_update = (PlayerPositionUpdateServer_Struct*)app->pBuffer; - - if(this->IsMoving()) - MakeSpawnUpdate(spawn_update); - else - MakeSpawnUpdateNoDelta(spawn_update); - - client->QueuePacket(app, false); - - safe_delete(app); + //auto app = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); + //PlayerPositionUpdateServer_Struct* spawn_update = (PlayerPositionUpdateServer_Struct*)app->pBuffer; + // + //if(this->IsMoving()) + // MakeSpawnUpdate(spawn_update); + //else + // MakeSpawnUpdateNoDelta(spawn_update); + // + //client->QueuePacket(app, false); + // + //safe_delete(app); } /* Position updates for mobs on the move */ void Mob::SendPositionUpdate(uint8 iSendToSelf) { - auto app = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); - PlayerPositionUpdateServer_Struct* spu = (PlayerPositionUpdateServer_Struct*)app->pBuffer; - MakeSpawnUpdate(spu); - - if (iSendToSelf == 2) { - if (IsClient()) { - CastToClient()->FastQueuePacket(&app, false); - } - } - else if (DistanceSquared(last_major_update_position, m_Position) >= (100 * 100)) { - entity_list.QueueClients(this, app, true, true); - last_major_update_position = m_Position; - is_distance_roamer = true; - } - else { - entity_list.QueueCloseClients(this, app, (iSendToSelf == 0), RuleI(Range, MobPositionUpdates), nullptr, false); - } - safe_delete(app); + //auto app = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); + //PlayerPositionUpdateServer_Struct* spu = (PlayerPositionUpdateServer_Struct*)app->pBuffer; + //MakeSpawnUpdate(spu); + // + //if (iSendToSelf == 2) { + // if (IsClient()) { + // CastToClient()->FastQueuePacket(&app, false); + // } + //} + //else if (DistanceSquared(last_major_update_position, m_Position) >= (100 * 100)) { + // entity_list.QueueClients(this, app, true, true); + // last_major_update_position = m_Position; + // is_distance_roamer = true; + //} + //else { + // entity_list.QueueCloseClients(this, app, (iSendToSelf == 0), RuleI(Range, MobPositionUpdates), nullptr, false); + //} + //safe_delete(app); } // this is for SendPosition() @@ -5864,7 +5860,6 @@ void Mob::SetCurrentSpeed(int in){ if (current_speed != in) { current_speed = in; - tar_ndx = 20; if (in == 0) { SetRunAnimSpeed(0); SetMoving(false); diff --git a/zone/mob.h b/zone/mob.h index 4dafe2bf9..e01c5c66f 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -530,14 +530,6 @@ public: inline const float GetHeading() const { return m_Position.w; } inline const float GetSize() const { return size; } inline const float GetBaseSize() const { return base_size; } - inline const float GetTarX() const { return m_TargetLocation.x; } - inline const float GetTarY() const { return m_TargetLocation.y; } - inline const float GetTarZ() const { return m_TargetLocation.z; } - inline const float GetTarVX() const { return m_TargetV.x; } - inline const float GetTarVY() const { return m_TargetV.y; } - inline const float GetTarVZ() const { return m_TargetV.z; } - inline const float GetTarVector() const { return tar_vector; } - inline const uint8 GetTarNDX() const { return tar_ndx; } inline const int8 GetFlyMode() const { return static_cast(flymode); } bool IsBoat() const; @@ -567,7 +559,6 @@ public: void SetRunning(bool val) { m_is_running = val; } virtual void GMMove(float x, float y, float z, float heading = 0.01, bool SendUpdate = true); void SetDelta(const glm::vec4& delta); - void SetTargetDestSteps(uint8 target_steps) { tar_ndx = target_steps; } void SendPositionUpdateToClient(Client *client); void SendPositionUpdate(uint8 iSendToSelf = 0); void MakeSpawnUpdateNoDelta(PlayerPositionUpdateServer_Struct* spu); @@ -613,8 +604,7 @@ public: void SetAssistAggro(bool value) { AssistAggro = value; if (PrimaryAggro) AssistAggro = false; } bool HateSummon(); void FaceTarget(Mob* mob_to_face = 0); - void SetHeading(float iHeading) { if(m_Position.w != iHeading) { pLastChange = Timer::GetCurrentTime(); - m_Position.w = iHeading; } } + void SetHeading(float iHeading) { if(m_Position.w != iHeading) { m_Position.w = iHeading; } } void WipeHateList(); void AddFeignMemory(Client* attacker); void RemoveFromFeignMemory(Client* attacker); @@ -625,8 +615,6 @@ public: bool CheckLosFN(Mob* other); bool CheckLosFN(float posX, float posY, float posZ, float mobSize); static bool CheckLosFN(glm::vec3 posWatcher, float sizeWatcher, glm::vec3 posTarget, float sizeTarget); - inline void SetChanged() { pLastChange = Timer::GetCurrentTime(); } - inline const uint32 LastChange() const { return pLastChange; } inline void SetLastLosState(bool value) { last_los_check = value; } inline bool CheckLastLosState() const { return last_los_check; } @@ -815,7 +803,7 @@ public: void SetAppearance(EmuAppearance app, bool iIgnoreSelf = true); inline EmuAppearance GetAppearance() const { return _appearance; } inline const uint8 GetRunAnimSpeed() const { return pRunAnimSpeed; } - inline void SetRunAnimSpeed(int8 in) { if (pRunAnimSpeed != in) { pRunAnimSpeed = in; pLastChange = Timer::GetCurrentTime(); } } + inline void SetRunAnimSpeed(int8 in) { if (pRunAnimSpeed != in) { pRunAnimSpeed = in; } } bool IsDestructibleObject() { return destructibleobject; } void SetDestructibleObject(bool in) { destructibleobject = in; } @@ -1274,7 +1262,6 @@ protected: int current_speed; eSpecialAttacks m_specialattacks; - uint32 pLastChange; bool held; bool gheld; bool nocast; @@ -1521,13 +1508,6 @@ protected: bool pet_owner_client; //Flags regular and pets as belonging to a client uint32 pet_targetlock_id; - EGNode *_egnode; //the EG node we are in - glm::vec3 m_TargetLocation; - uint8 tar_ndx; - float tar_vector; - glm::vec3 m_TargetV; - float test_vector; - glm::vec3 m_TargetRing; // we might want to do this differently, we gotta do max NPC buffs ... which is 97 diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 766929c97..dd61a3112 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -515,7 +515,6 @@ void Mob::AI_Start(uint32 iMoveDelay) { m_Delta = glm::vec4(); pRunAnimSpeed = 0; - pLastChange = Timer::GetCurrentTime(); } void Client::AI_Start(uint32 iMoveDelay) { @@ -551,7 +550,6 @@ void NPC::AI_Start(uint32 iMoveDelay) { } SendTo(GetX(), GetY(), GetZ()); - SetChanged(); SaveGuardSpot(); } @@ -823,9 +821,6 @@ void Client::AI_Process() node_reached ); - if (waypoint_changed) - tar_ndx = 20; - CalculateNewPosition(Goal.x, Goal.y, Goal.z, speed); } } @@ -905,9 +900,6 @@ void Client::AI_Process() glm::vec3 Goal = UpdatePath(GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ(), GetRunspeed(), WaypointChanged, NodeReached); - if(WaypointChanged) - tar_ndx = 20; - CalculateNewPosition(Goal.x, Goal.y, Goal.z, newspeed); } } @@ -1039,7 +1031,6 @@ void Mob::ProcessForcedMovement() Teleport(m_Position + m_Delta); m_Delta = glm::vec4(); SendPositionUpdate(); - pLastChange = Timer::GetCurrentTime(); FixZ(); // so we teleport to the ground locally, we want the client to interpolate falling etc } else if (--ForcedMovement) { if (normal.z < -0.15f) // prevent too much wall climbing. ex. OMM's room in anguish @@ -1151,9 +1142,6 @@ void Mob::AI_Process() { NodeReached ); - if (WaypointChanged) - tar_ndx = 20; - CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetFearSpeed()); } } @@ -1484,9 +1472,6 @@ void Mob::AI_Process() { GetRunspeed(), WaypointChanged, NodeReached ); - if (WaypointChanged) - tar_ndx = 20; - CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetRunspeed()); } @@ -1877,8 +1862,6 @@ void NPC::AI_DoMovement() { WaypointChanged, NodeReached ); - if (WaypointChanged) - tar_ndx = 20; if (NodeReached) entity_list.OpenDoorsNear(CastToNPC()); @@ -1921,9 +1904,6 @@ void NPC::AI_DoMovement() { WaypointChanged, NodeReached ); - if (WaypointChanged) { - tar_ndx = 20; - } if (NodeReached) { entity_list.OpenDoorsNear(CastToNPC()); diff --git a/zone/pathing.cpp b/zone/pathing.cpp index 4829bcc83..ff1963720 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -86,27 +86,27 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa } if (!IsRooted()) { - bool AtPrevNode = DistanceSquared(From, PathingLastPosition) < 1.0f; - if (AtPrevNode) { - PathingLoopCount++; - auto front = (*Route.begin()).pos; - - if (PathingLoopCount > 5) { - Teleport(front); - SendPosition(); - Route.pop_front(); - - WaypointChanged = true; - NodeReached = true; - PathingLoopCount = 0; - } - - return front; - } - else { + //bool AtPrevNode = DistanceSquared(From, PathingLastPosition) < 1.0f; + //if (AtPrevNode) { + // PathingLoopCount++; + // auto front = (*Route.begin()).pos; + // + // if (PathingLoopCount > 5) { + // Teleport(front); + // SendPosition(); + // Route.pop_front(); + // + // WaypointChanged = true; + // NodeReached = true; + // PathingLoopCount = 0; + // } + // + // return front; + //} + //else { PathingLastPosition = From; PathingLoopCount = 0; - } + //} } else { PathingLastPosition = From; diff --git a/zone/perl_mob.cpp b/zone/perl_mob.cpp index 0a6275169..ea3ba40b4 100644 --- a/zone/perl_mob.cpp +++ b/zone/perl_mob.cpp @@ -7275,28 +7275,6 @@ XS(XS_Mob_SetLD) { XSRETURN_EMPTY; } -XS(XS_Mob_SetTargetDestSteps); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SetTargetDestSteps) { - dXSARGS; - if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::SetTargetDestSteps(THIS, uint8 target_steps)"); - { - Mob *THIS; - uint8 target_steps = (uint8) SvIV(ST(1)); - - if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV *) SvRV(ST(0))); - THIS = INT2PTR(Mob *, tmp); - } else - Perl_croak(aTHX_ "THIS is not of type Mob"); - if (THIS == nullptr) - Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - - THIS->SetTargetDestSteps(target_steps); - } - XSRETURN_EMPTY; -} - XS(XS_Mob_SetTargetable); /* prototype to pass -Wmissing-prototypes */ XS(XS_Mob_SetTargetable) { dXSARGS; @@ -8781,7 +8759,6 @@ XS(boot_Mob) { newXSproto(strcpy(buf, "SetBodyType"), XS_Mob_SetBodyType, file, "$$;$"); newXSproto(strcpy(buf, "SetDeltas"), XS_Mob_SetDeltas, file, "$$$$$"); newXSproto(strcpy(buf, "SetLD"), XS_Mob_SetLD, file, "$$"); - newXSproto(strcpy(buf, "SetTargetDestSteps"), XS_Mob_SetTargetDestSteps, file, "$$"); newXSproto(strcpy(buf, "SetTargetable"), XS_Mob_SetTargetable, file, "$$"); newXSproto(strcpy(buf, "MakeTempPet"), XS_Mob_MakeTempPet, file, "$$;$$$$"); newXSproto(strcpy(buf, "ModSkillDmgTaken"), XS_Mob_ModSkillDmgTaken, file, "$$$"); diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index 36c996ce8..0c1e4d11d 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -35,6 +35,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include extern FastMath g_Math; +extern uint64_t frame_time; struct wp_distance { @@ -332,8 +333,6 @@ void NPC::CalculateNewWaypoint() } } - tar_ndx = 52; - // Preserve waypoint setting for quest controlled NPCs if (cur_wp < 0) cur_wp = old_wp; @@ -455,64 +454,9 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b return true; } - if ((m_Position.x - x == 0) && (m_Position.y - y == 0)) { //spawn is at target coords - return false; - } - else if ((std::abs(m_Position.x - x) < 0.1) && (std::abs(m_Position.y - y) < 0.1)) { - if (IsNPC()) { - entity_list.ProcessMove(CastToNPC(), x, y, z); - } - - m_Position.x = x; - m_Position.y = y; - m_Position.z = z; - - return true; - } - - int compare_steps = 20; - if (tar_ndx < compare_steps && m_TargetLocation.x == x && m_TargetLocation.y == y) { - - float new_x = m_Position.x + m_TargetV.x * tar_vector; - float new_y = m_Position.y + m_TargetV.y * tar_vector; - float new_z = m_Position.z + m_TargetV.z * tar_vector; - - if (IsNPC()) { - entity_list.ProcessMove(CastToNPC(), new_x, new_y, new_z); - } - - m_Position.x = new_x; - m_Position.y = new_y; - m_Position.z = new_z; - - if (check_z && fix_z_timer.Check() && (!this->IsEngaged() || flee_mode || currently_fleeing)) { - this->FixZ(); - } - - tar_ndx++; - - return true; - } - - if (tar_ndx > 50) { - tar_ndx--; - } - else { - tar_ndx = 0; - } - - m_TargetLocation = glm::vec3(x, y, z); - - float nx = this->m_Position.x; - float ny = this->m_Position.y; - float nz = this->m_Position.z; - // float nh = this->heading; - - m_TargetV.x = x - nx; - m_TargetV.y = y - ny; - m_TargetV.z = z - nz; - SetCurrentSpeed((int8)speed); + SetCurrentSpeed(static_cast(speed)); pRunAnimSpeed = speed; + #ifdef BOTS if (IsClient() || IsBot()) #else @@ -522,88 +466,48 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b animation = speed / 2; } - // -------------------------------------------------------------------------- - // 2: get unit vector - // -------------------------------------------------------------------------- - float mag = sqrtf(m_TargetV.x*m_TargetV.x + m_TargetV.y*m_TargetV.y + m_TargetV.z*m_TargetV.z); - tar_vector = (float)speed / mag; - - // mob move fix - int numsteps = (int)(mag * 13.5f / (float)speed + 0.5f); - - - // mob move fix - - if (numsteps < 20) { - if (numsteps > 1) { - tar_vector = 1.0f; - m_TargetV.x = m_TargetV.x / (float) numsteps; - m_TargetV.y = m_TargetV.y / (float) numsteps; - m_TargetV.z = m_TargetV.z / (float) numsteps; - - float new_x = m_Position.x + m_TargetV.x; - float new_y = m_Position.y + m_TargetV.y; - float new_z = m_Position.z + m_TargetV.z; - if (IsNPC()) { - entity_list.ProcessMove(CastToNPC(), new_x, new_y, new_z); - } - - m_Position.x = new_x; - m_Position.y = new_y; - m_Position.z = new_z; - if (calculate_heading) { - m_Position.w = CalculateHeadingToTarget(x, y); - } - tar_ndx = 20 - numsteps; - } - else { - if (IsNPC()) { - entity_list.ProcessMove(CastToNPC(), x, y, z); - } - - m_Position.x = x; - m_Position.y = y; - m_Position.z = z; - } + //Setup Vectors + glm::vec3 tar(x, y, z); + glm::vec3 pos(m_Position.x, m_Position.y, m_Position.z); + double len = glm::distance(pos, tar); + if (len == 0) { + return true; } + glm::vec3 dir = tar - pos; + glm::vec3 ndir = glm::normalize(dir); + if (calculate_heading) { + m_Position.w = CalculateHeadingToTarget(x, y); + } + + double time_since_last = static_cast(frame_time) / 1000.0; + double distance_moved = time_since_last * (speed + 100.0f); + + if (distance_moved > len) { + m_Position.x = x; + m_Position.y = y; + m_Position.z = z; + + if (IsNPC()) { + entity_list.ProcessMove(CastToNPC(), x, y, z); + } + + return true; + } else { - tar_vector /= 13.5f; - float dur = Timer::GetCurrentTime() - pLastChange; - if (dur < 0.0f) { - dur = 0.0f; - } - - if (dur > 100.f) { - dur = 100.f; - } - - tar_vector *= (dur / 100.0f); - - float new_x = m_Position.x + m_TargetV.x * tar_vector; - float new_y = m_Position.y + m_TargetV.y * tar_vector; - float new_z = m_Position.z + m_TargetV.z * tar_vector; + glm::vec3 npos = pos + (ndir * static_cast(distance_moved)); + m_Position.x = npos.x; + m_Position.y = npos.y; + m_Position.z = npos.z; if (IsNPC()) { - entity_list.ProcessMove(CastToNPC(), new_x, new_y, new_z); - } - - m_Position.x = new_x; - m_Position.y = new_y; - m_Position.z = new_z; - if (calculate_heading) { - m_Position.w = CalculateHeadingToTarget(x, y); + entity_list.ProcessMove(CastToNPC(), x, y, z); } } - if (check_z && fix_z_timer.Check() && !this->IsEngaged()) - this->FixZ(); - SetMoving(true); - moved = true; - - m_Delta = glm::vec4(m_Position.x - nx, m_Position.y - ny, m_Position.z - nz, 0.0f); - + m_Delta = glm::vec4(m_Position.x - pos.x, m_Position.y - pos.y, m_Position.z - pos.z, 0.0f); + if (IsClient()) { SendPositionUpdate(1); CastToClient()->ResetPositionTimer(); @@ -613,7 +517,6 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b SetAppearance(eaStanding, false); } - pLastChange = Timer::GetCurrentTime(); return true; } From 2224b83ae08d31bdb2be3aea083c05b4362d81ca Mon Sep 17 00:00:00 2001 From: KimLS Date: Mon, 17 Sep 2018 14:32:36 -0700 Subject: [PATCH 386/670] Movement manager add --- world/client.cpp | 2 + zone/CMakeLists.txt | 2 + zone/client.cpp | 7 +- zone/client.h | 2 - zone/client_packet.cpp | 8 -- zone/client_process.cpp | 43 +----- zone/mob.cpp | 71 ++-------- zone/mob.h | 11 +- zone/mob_movement_manager.cpp | 259 ++++++++++++++++++++++++++++++++++ zone/mob_movement_manager.h | 38 +++++ zone/perl_mob.cpp | 2 +- zone/spell_effects.cpp | 2 +- zone/waypoints.cpp | 14 +- zone/zone.cpp | 5 + zone/zone.h | 3 + 15 files changed, 342 insertions(+), 127 deletions(-) create mode 100644 zone/mob_movement_manager.cpp create mode 100644 zone/mob_movement_manager.h diff --git a/world/client.cpp b/world/client.cpp index f8b4fe3f4..0b04373a1 100644 --- a/world/client.cpp +++ b/world/client.cpp @@ -92,6 +92,8 @@ Client::Client(EQStreamInterface* ieqs) connect(1000), eqs(ieqs) { + //mMovementManager->AddClient(this); + // Live does not send datarate as of 3/11/2005 //eqs->SetDataRate(7); ip = eqs->GetRemoteIP(); diff --git a/zone/CMakeLists.txt b/zone/CMakeLists.txt index 0414a8d2b..616f76c5f 100644 --- a/zone/CMakeLists.txt +++ b/zone/CMakeLists.txt @@ -82,6 +82,7 @@ SET(zone_sources merc.cpp mob.cpp mob_ai.cpp + mob_movement_manager.cpp mod_functions.cpp net.cpp npc.cpp @@ -204,6 +205,7 @@ SET(zone_headers message.h merc.h mob.h + mob_movement_manager.h net.h npc.h npc_ai.h diff --git a/zone/client.cpp b/zone/client.cpp index 129293970..8477c6fc6 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -53,6 +53,7 @@ extern volatile bool RunLoops; #include "guild_mgr.h" #include "quest_parser_collection.h" #include "queryserv.h" +#include "mob_movement_manager.h" extern QueryServ* QServ; extern EntityList entity_list; @@ -156,7 +157,6 @@ Client::Client(EQStreamInterface* ieqs) m_AutoAttackTargetLocation(0.0f, 0.0f, 0.0f), last_region_type(RegionTypeUnsupported), m_dirtyautohaters(false), - npc_close_scan_timer(6000), hp_self_update_throttle_timer(300), hp_other_update_throttle_timer(500), position_update_timer(10000), @@ -166,6 +166,7 @@ Client::Client(EQStreamInterface* ieqs) for (int client_filter = 0; client_filter < _FilterCount; client_filter++) ClientFilters[client_filter] = FilterShow; + mMovementManager->AddClient(this); character_id = 0; conn_state = NoPacketsReceived; client_data_loaded = false; @@ -339,6 +340,8 @@ Client::Client(EQStreamInterface* ieqs) } Client::~Client() { + mMovementManager->RemoveClient(this); + #ifdef BOTS Bot::ProcessBotOwnerRefDelete(this); #endif @@ -6464,7 +6467,7 @@ void Client::LocateCorpse() SetHeading(CalculateHeadingToTarget(ClosestCorpse->GetX(), ClosestCorpse->GetY())); SetTarget(ClosestCorpse); SendTargetCommand(ClosestCorpse->GetID()); - SendPositionUpdate(2); + SendPositionUpdate(true); } else if(!GetTarget()) Message_StringID(clientMessageError, SENSE_CORPSE_NONE); diff --git a/zone/client.h b/zone/client.h index 393ede129..b0c65e6e2 100644 --- a/zone/client.h +++ b/zone/client.h @@ -1534,13 +1534,11 @@ private: Timer afk_toggle_timer; Timer helm_toggle_timer; Timer aggro_meter_timer; - Timer npc_close_scan_timer; Timer hp_self_update_throttle_timer; /* This is to prevent excessive packet sending under trains/fast combat */ Timer hp_other_update_throttle_timer; /* This is to keep clients from DOSing the server with macros that change client targets constantly */ Timer position_update_timer; /* Timer used when client hasn't updated within a 10 second window */ glm::vec3 m_Proximity; - glm::vec4 last_major_update_position; void BulkSendInventoryItems(); diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 8fee2460a..3b954419a 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -4622,10 +4622,6 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) { Log(Logs::Detail, Logs::Normal, "ClientUpdate: Client is moving - scan timer is: %u", client_scan_npc_aggro_timer.GetDuration()); if (client_scan_npc_aggro_timer.GetDuration() > 1000) { - - npc_close_scan_timer.Disable(); - npc_close_scan_timer.Start(500); - client_scan_npc_aggro_timer.Disable(); client_scan_npc_aggro_timer.Start(500); @@ -4634,10 +4630,6 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) { Log(Logs::Detail, Logs::Normal, "ClientUpdate: Client is NOT moving - scan timer is: %u", client_scan_npc_aggro_timer.GetDuration()); if (client_scan_npc_aggro_timer.GetDuration() < 1000) { - - npc_close_scan_timer.Disable(); - npc_close_scan_timer.Start(6000); - client_scan_npc_aggro_timer.Disable(); client_scan_npc_aggro_timer.Start(3000); } diff --git a/zone/client_process.cpp b/zone/client_process.cpp index 3894826d6..988b558ec 100644 --- a/zone/client_process.cpp +++ b/zone/client_process.cpp @@ -242,47 +242,6 @@ bool Client::Process() { } } - ///* Build a close range list of NPC's */ - //if (npc_close_scan_timer.Check()) { - // close_mobs.clear(); - // - // /* Force spawn updates when traveled far */ - // bool force_spawn_updates = false; - // float client_update_range = (RuleI(Range, ClientForceSpawnUpdateRange) * RuleI(Range, ClientForceSpawnUpdateRange)); - // if (DistanceSquared(last_major_update_position, m_Position) >= client_update_range) { - // last_major_update_position = m_Position; - // force_spawn_updates = true; - // } - // - // float scan_range = (RuleI(Range, ClientNPCScan) * RuleI(Range, ClientNPCScan)); - // auto &mob_list = entity_list.GetMobList(); - // for (auto itr = mob_list.begin(); itr != mob_list.end(); ++itr) { - // Mob* mob = itr->second; - // - // float distance = DistanceSquared(m_Position, mob->GetPosition()); - // if (mob->IsNPC()) { - // if (distance <= scan_range) { - // close_mobs.insert(std::pair(mob, distance)); - // } - // else if ((mob->GetAggroRange() * mob->GetAggroRange()) > scan_range) { - // close_mobs.insert(std::pair(mob, distance)); - // } - // } - // - // if (force_spawn_updates && mob != this) { - // - // if (mob->is_distance_roamer) { - // mob->SendPositionUpdateToClient(this); - // continue; - // } - // - // if (distance <= client_update_range) - // mob->SendPositionUpdateToClient(this); - // } - // - // } - //} - bool may_use_attacks = false; /* Things which prevent us from attacking: @@ -460,7 +419,7 @@ bool Client::Process() { { animation = 0; m_Delta = glm::vec4(0.0f, 0.0f, 0.0f, m_Delta.w); - SendPositionUpdate(2); + SendPositionUpdate(true); } } diff --git a/zone/mob.cpp b/zone/mob.cpp index a4e7dbff8..63a1c47ca 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -23,6 +23,7 @@ #include "quest_parser_collection.h" #include "string_ids.h" #include "worldserver.h" +#include "mob_movement_manager.h" #include #include @@ -116,12 +117,12 @@ Mob::Mob(const char* in_name, position_update_melee_push_timer(500), hate_list_cleanup_timer(6000) { + mMovementManager = &MobMovementManager::Get(); + mMovementManager->AddMob(this); + targeted = 0; currently_fleeing = false; - last_major_update_position = m_Position; - is_distance_roamer = false; - AI_Init(); SetMoving(false); moved = false; @@ -448,6 +449,8 @@ Mob::Mob(const char* in_name, Mob::~Mob() { + mMovementManager->RemoveMob(this); + AI_Stop(); if (GetPet()) { if (GetPet()->Charmed()) @@ -1450,59 +1453,12 @@ void Mob::StopMoving(float new_heading) { /* Used for mobs standing still - this does not send a delta */ void Mob::SendPosition() { - //auto app = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); - //PlayerPositionUpdateServer_Struct* spu = (PlayerPositionUpdateServer_Struct*)app->pBuffer; - //MakeSpawnUpdateNoDelta(spu); - // - //entity_list.QueueCloseClients(this, app, true, 200.0f, nullptr, false); - // - ///* When an NPC has made a large distance change - we should update all clients to prevent "ghosts" */ - //if (DistanceSquared(last_major_update_position, m_Position) >= (100 * 100)) { - // entity_list.QueueClients(this, app, true, true); - // last_major_update_position = m_Position; - // is_distance_roamer = true; - //} - //else { - // entity_list.QueueCloseClients(this, app, true, RuleI(Range, MobPositionUpdates), nullptr, false); - //} - // - //safe_delete(app); -} - -void Mob::SendPositionUpdateToClient(Client *client) { - //auto app = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); - //PlayerPositionUpdateServer_Struct* spawn_update = (PlayerPositionUpdateServer_Struct*)app->pBuffer; - // - //if(this->IsMoving()) - // MakeSpawnUpdate(spawn_update); - //else - // MakeSpawnUpdateNoDelta(spawn_update); - // - //client->QueuePacket(app, false); - // - //safe_delete(app); + mMovementManager->SendPosition(this); } /* Position updates for mobs on the move */ -void Mob::SendPositionUpdate(uint8 iSendToSelf) { - //auto app = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); - //PlayerPositionUpdateServer_Struct* spu = (PlayerPositionUpdateServer_Struct*)app->pBuffer; - //MakeSpawnUpdate(spu); - // - //if (iSendToSelf == 2) { - // if (IsClient()) { - // CastToClient()->FastQueuePacket(&app, false); - // } - //} - //else if (DistanceSquared(last_major_update_position, m_Position) >= (100 * 100)) { - // entity_list.QueueClients(this, app, true, true); - // last_major_update_position = m_Position; - // is_distance_roamer = true; - //} - //else { - // entity_list.QueueCloseClients(this, app, (iSendToSelf == 0), RuleI(Range, MobPositionUpdates), nullptr, false); - //} - //safe_delete(app); +void Mob::SendPositionUpdate(bool iSendToSelf) { + mMovementManager->SendPositionUpdate(this, iSendToSelf); } // this is for SendPosition() @@ -1518,11 +1474,6 @@ void Mob::MakeSpawnUpdateNoDelta(PlayerPositionUpdateServer_Struct *spu) { spu->heading = FloatToEQ12(m_Position.w); spu->animation = 0; spu->delta_heading = FloatToEQ10(0); - spu->padding0002 = 0; - spu->padding0006 = 7; - spu->padding0014 = 0x7f; - spu->padding0018 = 0x5df27; - } // this is for SendPosUpdate() @@ -1535,10 +1486,6 @@ void Mob::MakeSpawnUpdate(PlayerPositionUpdateServer_Struct* spu) { spu->delta_y = FloatToEQ13(m_Delta.y); spu->delta_z = FloatToEQ13(m_Delta.z); spu->heading = FloatToEQ12(m_Position.w); - spu->padding0002 = 0; - spu->padding0006 = 7; - spu->padding0014 = 0x7f; - spu->padding0018 = 0x5df27; #ifdef BOTS if (this->IsClient() || this->IsBot()) #else diff --git a/zone/mob.h b/zone/mob.h index e01c5c66f..52d404049 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -49,6 +49,7 @@ class Aura; struct AuraRecord; struct NewSpawn_Struct; struct PlayerPositionUpdateServer_Struct; +class MobMovementManager; const int COLLISION_BOX_SIZE = 8; @@ -164,8 +165,6 @@ public: inline virtual bool IsMob() const { return true; } inline virtual bool InZone() const { return true; } - bool is_distance_roamer; - //Somewhat sorted: needs documenting! //Attack @@ -559,8 +558,7 @@ public: void SetRunning(bool val) { m_is_running = val; } virtual void GMMove(float x, float y, float z, float heading = 0.01, bool SendUpdate = true); void SetDelta(const glm::vec4& delta); - void SendPositionUpdateToClient(Client *client); - void SendPositionUpdate(uint8 iSendToSelf = 0); + void SendPositionUpdate(bool iSendToSelf = false); void MakeSpawnUpdateNoDelta(PlayerPositionUpdateServer_Struct* spu); void MakeSpawnUpdate(PlayerPositionUpdateServer_Struct* spu); void SendPosition(); @@ -802,6 +800,7 @@ public: void SendAppearancePacket(uint32 type, uint32 value, bool WholeZone = true, bool iIgnoreSelf = false, Client *specific_target=nullptr); void SetAppearance(EmuAppearance app, bool iIgnoreSelf = true); inline EmuAppearance GetAppearance() const { return _appearance; } + inline const int GetAnimation() const { return animation; } inline const uint8 GetRunAnimSpeed() const { return pRunAnimSpeed; } inline void SetRunAnimSpeed(int8 in) { if (pRunAnimSpeed != in) { pRunAnimSpeed = in; } } bool IsDestructibleObject() { return destructibleobject; } @@ -1247,8 +1246,6 @@ protected: uint8 orig_level; uint32 npctype_id; glm::vec4 m_Position; - /* Used to determine when an NPC has traversed so many units - to send a zone wide pos update */ - glm::vec4 last_major_update_position; int animation; // this is really what MQ2 calls SpeedRun just packed like (int)(SpeedRun * 40.0f) float base_size; @@ -1530,6 +1527,8 @@ protected: AuraMgr aura_mgr; AuraMgr trap_mgr; + MobMovementManager *mMovementManager; + private: void _StopSong(); //this is not what you think it is Mob* target; diff --git a/zone/mob_movement_manager.cpp b/zone/mob_movement_manager.cpp new file mode 100644 index 000000000..138a85255 --- /dev/null +++ b/zone/mob_movement_manager.cpp @@ -0,0 +1,259 @@ +#include "mob_movement_manager.h" +#include "client.h" +#include "mob.h" +#include "../common/timer.h" + +#include +#include + +struct MobMovementEntry +{ + Mob *m; + int animation; + float heading; + bool dirty; + double last_sent_time; + double last_sent_time_long_distance; + + MobMovementEntry(Mob *m) { + this->m = m; + animation = 0; + heading = m->GetHeading(); + dirty = false; + last_sent_time = 0.0; + last_sent_time_long_distance = 0.0; + } +}; + +struct MobMovementManager::Implementation +{ + std::vector Entries; + std::vector Clients; +}; + +MobMovementManager::MobMovementManager() +{ + _impl.reset(new Implementation()); +} + +MobMovementManager::~MobMovementManager() +{ +} + +void MobMovementManager::Process() +{ + double current_time = static_cast(Timer::GetCurrentTime()) / 1000.0; + + for (auto &ent : _impl->Entries) { + if (ent.dirty) { + SendUpdate(ent.m, ent.animation, ent.heading); + + ent.dirty = false; + ent.last_sent_time = current_time; + ent.last_sent_time_long_distance = current_time; + } else if (ent.animation != 0) { + double diff_short_range = current_time - ent.last_sent_time; + double diff_long_range = current_time - ent.last_sent_time_long_distance; + + if (diff_short_range >= 2.0) { + SendUpdateShortDistance(ent.m, ent.animation, ent.heading); + ent.last_sent_time = current_time; + } + + if (diff_long_range >= 6.0) { + SendUpdateLongDistance(ent.m, ent.animation, ent.heading); + ent.last_sent_time_long_distance = current_time; + } + } + } +} + +void MobMovementManager::AddMob(Mob *m) +{ + _impl->Entries.push_back(MobMovementEntry(m)); +} + +void MobMovementManager::RemoveMob(Mob *m) +{ + auto iter = _impl->Entries.begin(); + while (iter != _impl->Entries.end()) { + auto &ent = *iter; + if (ent.m == m) { + _impl->Entries.erase(iter); + return; + } + ++iter; + } +} + +void MobMovementManager::AddClient(Client *c) +{ + _impl->Clients.push_back(c); +} + +void MobMovementManager::RemoveClient(Client *c) +{ + auto iter = _impl->Clients.begin(); + while (iter != _impl->Clients.end()) { + if (c == *iter) { + _impl->Clients.erase(iter); + return; + } + + ++iter; + } + +} + +void MobMovementManager::SendPosition(Mob *who) +{ + auto iter = _impl->Entries.begin(); + while (iter != _impl->Entries.end()) { + auto &ent = *iter; + + if (ent.m == who) { + auto anim = 0; + auto heading = who->GetHeading(); + + if (ent.animation != anim || !HeadingEqual(ent.heading, heading)) { + ent.animation = anim; + ent.heading = heading; + ent.dirty = true; + } + + return; + } + + ++iter; + } +} + +void MobMovementManager::SendPositionUpdate(Mob *who, bool send_to_self) +{ + auto iter = _impl->Entries.begin(); + while (iter != _impl->Entries.end()) { + auto &ent = *iter; + + if (ent.m == who) { + auto anim = 0; + auto heading = who->GetHeading(); + if (who->IsMoving()) { + if (who->IsClient()) { + anim = who->GetAnimation(); + } + else { + anim = who->GetRunAnimSpeed(); + } + } + + if (send_to_self && who->IsClient()) { + SendUpdateTo(who, who->CastToClient(), anim, heading); + } + + if (ent.animation != anim || !HeadingEqual(ent.heading, heading)) { + ent.animation = anim; + ent.heading = heading; + ent.dirty = true; + } + + return; + } + + ++iter; + } +} + +bool MobMovementManager::HeadingEqual(float a, float b) +{ + const float eps = 0.001f; + return abs(a - b) < eps; +} + +void MobMovementManager::SendUpdateTo(Mob *who, Client *c, int anim, float heading) +{ + EQApplicationPacket outapp(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); + PlayerPositionUpdateServer_Struct* spu = (PlayerPositionUpdateServer_Struct*)outapp.pBuffer; + if (anim == 0) { + who->MakeSpawnUpdateNoDelta(spu); + } + else { + who->MakeSpawnUpdate(spu); + } + + c->QueuePacket(&outapp); +} + +void MobMovementManager::SendUpdate(Mob *who, int anim, float heading) +{ + EQApplicationPacket outapp(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); + PlayerPositionUpdateServer_Struct* spu = (PlayerPositionUpdateServer_Struct*)outapp.pBuffer; + if (anim == 0) { + who->MakeSpawnUpdateNoDelta(spu); + } + else { + who->MakeSpawnUpdate(spu); + } + + for (auto &c : _impl->Clients) { + if (c != who) { + c->QueuePacket(&outapp); + } + else if (c->IsAIControlled()) { + c->QueuePacket(&outapp); + } + } +} + +void MobMovementManager::SendUpdateShortDistance(Mob *who, int anim, float heading) +{ + EQApplicationPacket outapp(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); + PlayerPositionUpdateServer_Struct* spu = (PlayerPositionUpdateServer_Struct*)outapp.pBuffer; + if (anim == 0) { + who->MakeSpawnUpdateNoDelta(spu); + } + else { + who->MakeSpawnUpdate(spu); + } + + for (auto &c : _impl->Clients) { + if (c != who) { + auto dist = who->CalculateDistance(c->GetX(), c->GetY(), c->GetZ()); + if (dist <= 1000.0f) { + c->QueuePacket(&outapp); + } + } + else if (c->IsAIControlled()) { + auto dist = who->CalculateDistance(c->GetX(), c->GetY(), c->GetZ()); + if (dist <= 1000.0f) { + c->QueuePacket(&outapp); + } + } + } +} + +void MobMovementManager::SendUpdateLongDistance(Mob *who, int anim, float heading) +{ + EQApplicationPacket outapp(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); + PlayerPositionUpdateServer_Struct* spu = (PlayerPositionUpdateServer_Struct*)outapp.pBuffer; + if (anim == 0) { + who->MakeSpawnUpdateNoDelta(spu); + } + else { + who->MakeSpawnUpdate(spu); + } + + for (auto &c : _impl->Clients) { + if (c != who) { + auto dist = who->CalculateDistance(c->GetX(), c->GetY(), c->GetZ()); + if (dist > 1000.0f) { + c->QueuePacket(&outapp); + } + } + else if (c->IsAIControlled()) { + auto dist = who->CalculateDistance(c->GetX(), c->GetY(), c->GetZ()); + if (dist > 1000.0f) { + c->QueuePacket(&outapp); + } + } + } +} diff --git a/zone/mob_movement_manager.h b/zone/mob_movement_manager.h new file mode 100644 index 000000000..69ea2ee80 --- /dev/null +++ b/zone/mob_movement_manager.h @@ -0,0 +1,38 @@ +#pragma once +#include + +class Mob; +class Client; + +class MobMovementManager +{ +public: + ~MobMovementManager(); + void Process(); + void AddMob(Mob *m); + void RemoveMob(Mob *m); + void AddClient(Client *c); + void RemoveClient(Client *c); + + void SendPosition(Mob *who); + void SendPositionUpdate(Mob *who, bool send_to_self); + + static MobMovementManager &Get() { + static MobMovementManager inst; + return inst; + } + +private: + MobMovementManager(); + MobMovementManager(const MobMovementManager&); + MobMovementManager& operator=(const MobMovementManager&); + + bool HeadingEqual(float a, float b); + void SendUpdateTo(Mob *who, Client *c, int anim, float heading); + void SendUpdate(Mob *who, int anim, float heading); + void SendUpdateShortDistance(Mob *who, int anim, float heading); + void SendUpdateLongDistance(Mob *who, int anim, float heading); + + struct Implementation; + std::unique_ptr _impl; +}; diff --git a/zone/perl_mob.cpp b/zone/perl_mob.cpp index ea3ba40b4..e61f6ec81 100644 --- a/zone/perl_mob.cpp +++ b/zone/perl_mob.cpp @@ -1189,7 +1189,7 @@ XS(XS_Mob_SendPosUpdate) { iSendToSelf = (uint8) SvUV(ST(1)); } - THIS->SendPositionUpdate(iSendToSelf); + THIS->SendPositionUpdate(iSendToSelf != 0 ? true : false); } XSRETURN_EMPTY; } diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 7e8db6930..da345fcdd 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -853,7 +853,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove SetHeading(CalculateHeadingToTarget(ClosestMob->GetX(), ClosestMob->GetY())); SetTarget(ClosestMob); CastToClient()->SendTargetCommand(ClosestMob->GetID()); - SendPositionUpdate(2); + SendPositionUpdate(true); } else Message_StringID(clientMessageError, SENSE_NOTHING); diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index 0c1e4d11d..f285b8887 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -463,7 +463,7 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b if (IsClient()) #endif { - animation = speed / 2; + animation = speed * 0.55f; } //Setup Vectors @@ -481,7 +481,7 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b } double time_since_last = static_cast(frame_time) / 1000.0; - double distance_moved = time_since_last * (speed + 100.0f); + double distance_moved = time_since_last * speed * 2.275f; if (distance_moved > len) { m_Position.x = x; @@ -492,6 +492,10 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b entity_list.ProcessMove(CastToNPC(), x, y, z); } + if (check_z && fix_z_timer.Check() && (!IsEngaged() || flee_mode || currently_fleeing)) { + FixZ(); + } + return true; } else { @@ -505,11 +509,15 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b } } + if (check_z && fix_z_timer.Check() && !IsEngaged()) { + FixZ(); + } + SetMoving(true); m_Delta = glm::vec4(m_Position.x - pos.x, m_Position.y - pos.y, m_Position.z - pos.z, 0.0f); if (IsClient()) { - SendPositionUpdate(1); + SendPositionUpdate(); CastToClient()->ResetPositionTimer(); } else { diff --git a/zone/zone.cpp b/zone/zone.cpp index 3b9e5e513..2acb0fa6b 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -53,6 +53,7 @@ #include "worldserver.h" #include "zone.h" #include "zone_config.h" +#include "mob_movement_manager.h" #include #include @@ -861,6 +862,8 @@ Zone::Zone(uint32 in_zoneid, uint32 in_instanceid, const char* in_short_name) m_ucss_available = false; m_last_ucss_update = 0; + + mMovementManager = &MobMovementManager::Get(); } Zone::~Zone() { @@ -1303,6 +1306,8 @@ bool Zone::Process() { if(hotzone_timer.Check()) { UpdateHotzone(); } + mMovementManager->Process(); + return true; } diff --git a/zone/zone.h b/zone/zone.h index 5f8651d8b..1e3d345fb 100644 --- a/zone/zone.h +++ b/zone/zone.h @@ -79,6 +79,7 @@ class WaterMap; extern EntityList entity_list; struct NPCType; struct ServerZoneIncomingClient_Struct; +class MobMovementManager; class Zone { @@ -362,6 +363,8 @@ private: bool m_ucss_available; uint32 m_last_ucss_update; + + MobMovementManager *mMovementManager; }; #endif From f754cb1307d24f08bb08dcfaab969277652f2c58 Mon Sep 17 00:00:00 2001 From: KimLS Date: Tue, 18 Sep 2018 23:06:56 -0700 Subject: [PATCH 387/670] Move update path to movement manager so all movement will use paths --- common/data_verification.h | 6 +- common/misc_functions.h | 23 ----- zone/bot.cpp | 16 +--- zone/doors.cpp | 2 +- zone/doors.h | 2 +- zone/entity.cpp | 4 +- zone/entity.h | 2 +- zone/lua_entity_list.cpp | 4 +- zone/lua_entity_list.h | 2 +- zone/merc.cpp | 33 +------ zone/mob_ai.cpp | 167 ++++++---------------------------- zone/mob_movement_manager.cpp | 2 +- zone/perl_entity.cpp | 8 +- zone/waypoints.cpp | 31 +++++-- 14 files changed, 66 insertions(+), 236 deletions(-) diff --git a/common/data_verification.h b/common/data_verification.h index fe1152cb4..27ad017a9 100644 --- a/common/data_verification.h +++ b/common/data_verification.h @@ -17,11 +17,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef COMMON_DATA_VERIFICATION_H -#define COMMON_DATA_VERIFICATION_H +#pragma once #include - +#include namespace EQEmu { @@ -52,4 +51,3 @@ namespace EQEmu } /*EQEmu*/ -#endif /*COMMON_DATA_VERIFICATION_H*/ diff --git a/common/misc_functions.h b/common/misc_functions.h index 2ead697e7..16191916f 100644 --- a/common/misc_functions.h +++ b/common/misc_functions.h @@ -87,28 +87,5 @@ public: ~InitWinsock(); }; -template class AutoDelete { -public: - AutoDelete(T** iVar, T* iSetTo = 0) { - init(iVar, iSetTo); - } - AutoDelete() { pVar = nullptr; } - void init(T** iVar, T* iSetTo = 0) - { - pVar = iVar; - if (iSetTo) - *pVar = iSetTo; - } - ~AutoDelete() { - if(pVar != nullptr) - safe_delete(*pVar); - } - void ReallyClearIt() { - pVar = nullptr; - } -private: - T** pVar; -}; - #endif diff --git a/zone/bot.cpp b/zone/bot.cpp index 8223638eb..3cb75187d 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -2687,14 +2687,7 @@ void Bot::AI_Process() { Log(Logs::Detail, Logs::AI, "Pursuing %s while engaged.", GetTarget()->GetCleanName()); Goal = GetTarget()->GetPosition(); - - if (RuleB(Bots, UsePathing) && zone->pathing) { - bool WaypointChanged, NodeReached; - - Goal = UpdatePath(Goal.x, Goal.y, Goal.z, - GetBotRunspeed(), WaypointChanged, NodeReached); - } - + CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetBotRunspeed()); return; } @@ -2813,13 +2806,6 @@ void Bot::AI_Process() { Goal = follow_mob->GetPosition(); - if (RuleB(Bots, UsePathing) && zone->pathing) { - bool WaypointChanged, NodeReached; - - Goal = UpdatePath(Goal.x, Goal.y, Goal.z, - speed, WaypointChanged, NodeReached); - } - CalculateNewPosition(Goal.x, Goal.y, Goal.z, speed); return; } diff --git a/zone/doors.cpp b/zone/doors.cpp index 9561757df..dc963ab2a 100644 --- a/zone/doors.cpp +++ b/zone/doors.cpp @@ -496,7 +496,7 @@ void Doors::HandleClick(Client* sender, uint8 trigger) { } } -void Doors::NPCOpen(NPC* sender, bool alt_mode) +void Doors::Open(Mob* sender, bool alt_mode) { if (sender) { if (GetTriggerType() == 255 || GetTriggerDoorID() > 0 || GetLockpick() != 0 || GetKeyItem() != 0 || open_type == 59 || open_type == 58 || !sender->IsNPC()) { // this object isnt triggered or door is locked - NPCs should not open locked doors! diff --git a/zone/doors.h b/zone/doors.h index f112f84f1..ef83361c4 100644 --- a/zone/doors.h +++ b/zone/doors.h @@ -49,7 +49,7 @@ public: void ForceClose(Mob *sender, bool alt_mode = false); void ForceOpen(Mob *sender, bool alt_mode = false); void HandleClick(Client *sender, uint8 trigger); - void NPCOpen(NPC *sender, bool alt_mode = false); + void Open(Mob *sender, bool alt_mode = false); void SetDisableTimer(bool flag); void SetDoorName(const char *name); void SetEntityID(uint32 entity) { entity_id = entity; } diff --git a/zone/entity.cpp b/zone/entity.cpp index 1ab6f214a..163d991c5 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -3263,7 +3263,7 @@ void EntityList::AddHealAggro(Mob *target, Mob *caster, uint16 hate) } } -void EntityList::OpenDoorsNear(NPC *who) +void EntityList::OpenDoorsNear(Mob *who) { for (auto it = door_list.begin();it != door_list.end(); ++it) { @@ -3276,7 +3276,7 @@ void EntityList::OpenDoorsNear(NPC *who) float curdist = diff.x * diff.x + diff.y * diff.y; if (diff.z * diff.z < 10 && curdist <= 100) - cdoor->NPCOpen(who); + cdoor->Open(who); } } diff --git a/zone/entity.h b/zone/entity.h index f32532392..816098294 100644 --- a/zone/entity.h +++ b/zone/entity.h @@ -370,7 +370,7 @@ public: void AddHealAggro(Mob* target, Mob* caster, uint16 hate); Mob* FindDefenseNPC(uint32 npcid); - void OpenDoorsNear(NPC* opener); + void OpenDoorsNear(Mob* opener); void UpdateWho(bool iSendFullUpdate = false); void SendPositionUpdates(Client* client, uint32 cLastUpdate = 0, float update_range = 0, Entity* always_send = 0, bool iSendEvenIfNotChanged = false); char* MakeNameUnique(char* name); diff --git a/zone/lua_entity_list.cpp b/zone/lua_entity_list.cpp index e6a572eca..abfc020d6 100644 --- a/zone/lua_entity_list.cpp +++ b/zone/lua_entity_list.cpp @@ -231,7 +231,7 @@ void Lua_EntityList::ReplaceWithTarget(Lua_Mob target, Lua_Mob new_target) { self->ReplaceWithTarget(target, new_target); } -void Lua_EntityList::OpenDoorsNear(Lua_NPC opener) { +void Lua_EntityList::OpenDoorsNear(Lua_Mob opener) { Lua_Safe_Call_Void(); self->OpenDoorsNear(opener); } @@ -479,7 +479,7 @@ luabind::scope lua_register_entity_list() { .def("RemoveFromTargets", (void(Lua_EntityList::*)(Lua_Mob))&Lua_EntityList::RemoveFromTargets) .def("RemoveFromTargets", (void(Lua_EntityList::*)(Lua_Mob, bool))&Lua_EntityList::RemoveFromTargets) .def("ReplaceWithTarget", (void(Lua_EntityList::*)(Lua_Mob, Lua_Mob))&Lua_EntityList::ReplaceWithTarget) - .def("OpenDoorsNear", (void(Lua_EntityList::*)(Lua_NPC))&Lua_EntityList::OpenDoorsNear) + .def("OpenDoorsNear", (void(Lua_EntityList::*)(Lua_Mob))&Lua_EntityList::OpenDoorsNear) .def("MakeNameUnique", (std::string(Lua_EntityList::*)(const char*))&Lua_EntityList::MakeNameUnique) .def("RemoveNumbers", (std::string(Lua_EntityList::*)(const char*))&Lua_EntityList::RemoveNumbers) .def("SignalMobsByNPCID", (void(Lua_EntityList::*)(uint32, int))&Lua_EntityList::SignalMobsByNPCID) diff --git a/zone/lua_entity_list.h b/zone/lua_entity_list.h index 6db846220..6b0074674 100644 --- a/zone/lua_entity_list.h +++ b/zone/lua_entity_list.h @@ -84,7 +84,7 @@ public: void RemoveFromTargets(Lua_Mob mob); void RemoveFromTargets(Lua_Mob mob, bool RemoveFromXTargets); void ReplaceWithTarget(Lua_Mob target, Lua_Mob new_target); - void OpenDoorsNear(Lua_NPC opener); + void OpenDoorsNear(Lua_Mob opener); std::string MakeNameUnique(const char *name); std::string RemoveNumbers(const char *name); void SignalMobsByNPCID(uint32 npc_id, int signal); diff --git a/zone/merc.cpp b/zone/merc.cpp index 2f0cae947..7cb480a2f 100644 --- a/zone/merc.cpp +++ b/zone/merc.cpp @@ -1478,25 +1478,8 @@ void Merc::AI_Process() { return; } else if (!CheckLosFN(GetTarget())) { - if (RuleB(Mercs, MercsUsePathing) && zone->pathing) { - bool WaypointChanged, NodeReached; - - glm::vec3 Goal = UpdatePath( - GetTarget()->GetX(), - GetTarget()->GetY(), - GetTarget()->GetZ(), - GetRunspeed(), - WaypointChanged, - NodeReached - ); - - CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetRunspeed()); - } - else { - Mob* follow = entity_list.GetMob(GetFollowID()); - if (follow) - CalculateNewPosition(follow->GetX(), follow->GetY(), follow->GetZ(), GetRunspeed()); - } + auto Goal = GetTarget()->GetPosition(); + CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetRunspeed()); return; } @@ -1775,17 +1758,7 @@ void Merc::AI_Process() { SetRunAnimSpeed(0); if (dist > GetFollowDistance()) { - if (RuleB(Mercs, MercsUsePathing) && zone->pathing) { - bool WaypointChanged, NodeReached; - - glm::vec3 Goal = UpdatePath(follow->GetX(), follow->GetY(), follow->GetZ(), - speed, WaypointChanged, NodeReached); - - CalculateNewPosition(Goal.x, Goal.y, Goal.z, speed); - } - else { - CalculateNewPosition(follow->GetX(), follow->GetY(), follow->GetZ(), speed); - } + CalculateNewPosition(follow->GetX(), follow->GetY(), follow->GetZ(), speed); if (rest_timer.Enabled()) rest_timer.Disable(); diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index dd61a3112..9ecb96719 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -807,22 +807,7 @@ void Client::AI_Process() CalculateNewFearpoint(); } - if (!RuleB(Pathing, Fear) || !zone->pathing) - CalculateNewPosition(m_FearWalkTarget.x, m_FearWalkTarget.y, m_FearWalkTarget.z, speed, true); - else { - bool waypoint_changed, node_reached; - - glm::vec3 Goal = UpdatePath( - m_FearWalkTarget.x, - m_FearWalkTarget.y, - m_FearWalkTarget.z, - speed, - waypoint_changed, - node_reached - ); - - CalculateNewPosition(Goal.x, Goal.y, Goal.z, speed); - } + CalculateNewPosition(m_FearWalkTarget.x, m_FearWalkTarget.y, m_FearWalkTarget.z, speed, true); } return; } @@ -892,16 +877,7 @@ void Client::AI_Process() animation = newspeed; newspeed *= 2; SetCurrentSpeed(newspeed); - if(!RuleB(Pathing, Aggro) || !zone->pathing) - CalculateNewPosition(GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ(), newspeed); - else - { - bool WaypointChanged, NodeReached; - glm::vec3 Goal = UpdatePath(GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ(), - GetRunspeed(), WaypointChanged, NodeReached); - - CalculateNewPosition(Goal.x, Goal.y, Goal.z, newspeed); - } + CalculateNewPosition(GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ(), newspeed); } } else if(IsMoving()) @@ -1121,29 +1097,13 @@ void Mob::AI_Process() { // Calculate a new point to run to CalculateNewFearpoint(); } - if (!RuleB(Pathing, Fear) || !zone->pathing) { - CalculateNewPosition( - m_FearWalkTarget.x, - m_FearWalkTarget.y, - m_FearWalkTarget.z, - GetFearSpeed(), - true - ); - } - else { - bool WaypointChanged, NodeReached; - - glm::vec3 Goal = UpdatePath( - m_FearWalkTarget.x, - m_FearWalkTarget.y, - m_FearWalkTarget.z, - GetFearSpeed(), - WaypointChanged, - NodeReached - ); - - CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetFearSpeed()); - } + CalculateNewPosition( + m_FearWalkTarget.x, + m_FearWalkTarget.y, + m_FearWalkTarget.z, + GetFearSpeed(), + true + ); } return; } @@ -1462,18 +1422,7 @@ void Mob::AI_Process() { else if (AI_movement_timer->Check() && target) { if (!IsRooted()) { Log(Logs::Detail, Logs::AI, "Pursuing %s while engaged.", target->GetName()); - if (!RuleB(Pathing, Aggro) || !zone->pathing) - CalculateNewPosition(target->GetX(), target->GetY(), target->GetZ(), GetRunspeed()); - else { - bool WaypointChanged, NodeReached; - - glm::vec3 Goal = UpdatePath( - target->GetX(), target->GetY(), target->GetZ(), - GetRunspeed(), WaypointChanged, NodeReached - ); - - CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetRunspeed()); - } + CalculateNewPosition(target->GetX(), target->GetY(), target->GetZ(), GetRunspeed()); } else if (IsMoving()) { @@ -1572,14 +1521,7 @@ void Mob::AI_Process() { else { bool waypoint_changed, node_reached; - glm::vec3 Goal = UpdatePath( - owner->GetX(), - owner->GetY(), - owner->GetZ(), - pet_speed, - waypoint_changed, - node_reached - ); + auto &Goal = owner->GetPosition(); CalculateNewPosition(Goal.x, Goal.y, Goal.z, pet_speed, true); } @@ -1633,14 +1575,7 @@ void Mob::AI_Process() { bool waypoint_changed, node_reached; - glm::vec3 Goal = UpdatePath( - follow->GetX(), - follow->GetY(), - follow->GetZ(), - speed, - waypoint_changed, - node_reached - ); + auto &Goal = follow->GetPosition(); CalculateNewPosition(Goal.x, Goal.y, Goal.z, speed, true); } @@ -1768,18 +1703,7 @@ void NPC::AI_DoMovement() { roambox_destination_y); } - bool waypoint_changed, node_reached; - - glm::vec3 Goal = UpdatePath( - roambox_destination_x, - roambox_destination_y, - roambox_destination_z, - move_speed, - waypoint_changed, - node_reached - ); - - CalculateNewPosition(Goal.x, Goal.y, Goal.z, move_speed, true); + CalculateNewPosition(roambox_destination_x, roambox_destination_y, roambox_destination_z, move_speed, true); if (m_Position.x == roambox_destination_x && m_Position.y == roambox_destination_y) { time_until_can_move = Timer::GetCurrentTime() + RandomTimer(roambox_min_delay, roambox_delay); @@ -1843,31 +1767,13 @@ void NPC::AI_DoMovement() { ClearFeignMemory(); } if (doMove) { // not at waypoint yet or at 0 pause WP, so keep moving - if (!RuleB(Pathing, AggroReturnToGrid) || !zone->pathing || (DistractedFromGrid == 0)) - CalculateNewPosition( - m_CurrentWayPoint.x, - m_CurrentWayPoint.y, - m_CurrentWayPoint.z, - move_speed, - true - ); - else { - bool WaypointChanged; - bool NodeReached; - glm::vec3 Goal = UpdatePath( - m_CurrentWayPoint.x, - m_CurrentWayPoint.y, - m_CurrentWayPoint.z, - move_speed, - WaypointChanged, - NodeReached - ); - - if (NodeReached) - entity_list.OpenDoorsNear(CastToNPC()); - - CalculateNewPosition(Goal.x, Goal.y, Goal.z, move_speed, true); - } + CalculateNewPosition( + m_CurrentWayPoint.x, + m_CurrentWayPoint.y, + m_CurrentWayPoint.z, + move_speed, + true + ); } } @@ -1887,35 +1793,14 @@ void NPC::AI_DoMovement() { } else if (IsGuarding()) { bool CP2Moved; - if (!RuleB(Pathing, Guard) || !zone->pathing) { - CP2Moved = CalculateNewPosition(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z, move_speed); + + if (!((m_Position.x == m_GuardPoint.x) && (m_Position.y == m_GuardPoint.y) && (m_Position.z == m_GuardPoint.z))) { + CP2Moved = CalculateNewPosition(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z, move_speed); } else { - if (!((m_Position.x == m_GuardPoint.x) && (m_Position.y == m_GuardPoint.y) && - (m_Position.z == m_GuardPoint.z))) { - - bool WaypointChanged, NodeReached; - - glm::vec3 Goal = UpdatePath( - m_GuardPoint.x, - m_GuardPoint.y, - m_GuardPoint.z, - move_speed, - WaypointChanged, - NodeReached - ); - - if (NodeReached) { - entity_list.OpenDoorsNear(CastToNPC()); - } - - CP2Moved = CalculateNewPosition(Goal.x, Goal.y, Goal.z, move_speed); - } - else { - CP2Moved = false; - } - + CP2Moved = false; } + if (!CP2Moved) { if (moved) { Log(Logs::Detail, @@ -1981,7 +1866,7 @@ void NPC::AI_SetupNextWaypoint() { SetAppearance(eaStanding, false); - entity_list.OpenDoorsNear(CastToNPC()); + entity_list.OpenDoorsNear(this); if (!DistractedFromGrid) { //kick off event_waypoint depart diff --git a/zone/mob_movement_manager.cpp b/zone/mob_movement_manager.cpp index 138a85255..00a2536bb 100644 --- a/zone/mob_movement_manager.cpp +++ b/zone/mob_movement_manager.cpp @@ -165,7 +165,7 @@ void MobMovementManager::SendPositionUpdate(Mob *who, bool send_to_self) bool MobMovementManager::HeadingEqual(float a, float b) { - const float eps = 0.001f; + const float eps = 0.0001f; return abs(a - b) < eps; } diff --git a/zone/perl_entity.cpp b/zone/perl_entity.cpp index a38852b9c..58e25b263 100644 --- a/zone/perl_entity.cpp +++ b/zone/perl_entity.cpp @@ -1355,7 +1355,7 @@ XS(XS_EntityList_OpenDoorsNear) { Perl_croak(aTHX_ "Usage: EntityList::OpenDoorsNear(THIS, NPC* opener)"); { EntityList *THIS; - NPC *opener; + Mob *opener; if (sv_derived_from(ST(0), "EntityList")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -1365,11 +1365,11 @@ XS(XS_EntityList_OpenDoorsNear) { if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - if (sv_derived_from(ST(1), "NPC")) { + if (sv_derived_from(ST(1), "Mob")) { IV tmp = SvIV((SV *) SvRV(ST(1))); - opener = INT2PTR(NPC *, tmp); + opener = INT2PTR(Mob *, tmp); } else - Perl_croak(aTHX_ "opener is not of type NPC"); + Perl_croak(aTHX_ "opener is not of type Mob"); if (opener == nullptr) Perl_croak(aTHX_ "opener is nullptr, avoiding crash."); diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index f285b8887..74bb57c36 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -454,6 +454,17 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b return true; } + bool WaypointChanged = false; + bool NodeReached = false; + glm::vec3 Goal = UpdatePath( + x, y, z, speed, WaypointChanged, NodeReached + ); + + if (WaypointChanged || NodeReached) { + calculate_heading = true; + entity_list.OpenDoorsNear(this); + } + SetCurrentSpeed(static_cast(speed)); pRunAnimSpeed = speed; @@ -467,7 +478,7 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b } //Setup Vectors - glm::vec3 tar(x, y, z); + glm::vec3 tar(Goal.x, Goal.y, Goal.z); glm::vec3 pos(m_Position.x, m_Position.y, m_Position.z); double len = glm::distance(pos, tar); if (len == 0) { @@ -476,20 +487,16 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b glm::vec3 dir = tar - pos; glm::vec3 ndir = glm::normalize(dir); - if (calculate_heading) { - m_Position.w = CalculateHeadingToTarget(x, y); - } - double time_since_last = static_cast(frame_time) / 1000.0; double distance_moved = time_since_last * speed * 2.275f; if (distance_moved > len) { - m_Position.x = x; - m_Position.y = y; - m_Position.z = z; + m_Position.x = Goal.x; + m_Position.y = Goal.y; + m_Position.z = Goal.z; if (IsNPC()) { - entity_list.ProcessMove(CastToNPC(), x, y, z); + entity_list.ProcessMove(CastToNPC(), Goal.x, Goal.y, Goal.z); } if (check_z && fix_z_timer.Check() && (!IsEngaged() || flee_mode || currently_fleeing)) { @@ -505,10 +512,14 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b m_Position.z = npos.z; if (IsNPC()) { - entity_list.ProcessMove(CastToNPC(), x, y, z); + entity_list.ProcessMove(CastToNPC(), npos.x, npos.y, npos.z); } } + if (calculate_heading) { + m_Position.w = CalculateHeadingToTarget(Goal.x, Goal.y); + } + if (check_z && fix_z_timer.Check() && !IsEngaged()) { FixZ(); } From 526d3bfba13459b2468de17075149b2a727b1627 Mon Sep 17 00:00:00 2001 From: Uleat Date: Wed, 19 Sep 2018 19:58:16 -0400 Subject: [PATCH 388/670] Update to perl api inventory slot tokens --- zone/embparser_api.cpp | 52 +++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/zone/embparser_api.cpp b/zone/embparser_api.cpp index 0f9d45b1e..1a251b8ec 100644 --- a/zone/embparser_api.cpp +++ b/zone/embparser_api.cpp @@ -350,11 +350,11 @@ XS(XS__incstat) { XSRETURN_EMPTY; } -XS(XS__inventory); -XS(XS__inventory) { +XS(XS__getinventoryslotid); +XS(XS__getinventoryslotid) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: quest::inventory(string identifier)"); + Perl_croak(aTHX_ "Usage: quest::getinventoryslotid(string identifier)"); int16 RETVAL; dXSTARG; @@ -365,28 +365,28 @@ XS(XS__inventory) { if (identifier == "invalid") RETVAL = EQEmu::invslot::SLOT_INVALID; else if (identifier == "cursor") RETVAL = EQEmu::invslot::slotCursor; - else if (identifier == "possessions_begin") RETVAL = EQEmu::invslot::POSSESSIONS_BEGIN; - else if (identifier == "possessions_end") RETVAL = EQEmu::invslot::POSSESSIONS_END; - else if (identifier == "bank_begin") RETVAL = EQEmu::invslot::BANK_BEGIN; - else if (identifier == "bank_end") RETVAL = EQEmu::invslot::BANK_END; - else if (identifier == "sharedbank_begin") RETVAL = EQEmu::invslot::SHARED_BANK_BEGIN; - else if (identifier == "sharedbank_end") RETVAL = EQEmu::invslot::SHARED_BANK_END; - else if (identifier == "generalbags_begin") RETVAL = EQEmu::invbag::GENERAL_BAGS_BEGIN; - else if (identifier == "generalbags_end") RETVAL = EQEmu::invbag::GENERAL_BAGS_END; - else if (identifier == "cursorbag_begin") RETVAL = EQEmu::invbag::CURSOR_BAG_BEGIN; - else if (identifier == "cursorbag_end") RETVAL = EQEmu::invbag::CURSOR_BAG_END; - else if (identifier == "bankbags_begin") RETVAL = EQEmu::invbag::BANK_BAGS_BEGIN; - else if (identifier == "bankbags_end") RETVAL = EQEmu::invbag::BANK_BAGS_END; - else if (identifier == "sharedbankbags_begin") RETVAL = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN; - else if (identifier == "sharedbankbags_end") RETVAL = EQEmu::invbag::SHARED_BANK_BAGS_END; - else if (identifier == "bagslot_begin") RETVAL = EQEmu::invbag::SLOT_BEGIN; - else if (identifier == "bagslot_end") RETVAL = EQEmu::invbag::SLOT_END; - else if (identifier == "augsocket_begin") RETVAL = EQEmu::invaug::SOCKET_BEGIN; - else if (identifier == "augsocket_end") RETVAL = EQEmu::invaug::SOCKET_END; - else if (identifier == "equipment_begin") RETVAL = EQEmu::invslot::EQUIPMENT_BEGIN; - else if (identifier == "equipment_end") RETVAL = EQEmu::invslot::EQUIPMENT_END; - else if (identifier == "general_begin") RETVAL = EQEmu::invslot::GENERAL_BEGIN; - else if (identifier == "general_end") RETVAL = EQEmu::invslot::GENERAL_END; + else if (identifier == "possessions.begin") RETVAL = EQEmu::invslot::POSSESSIONS_BEGIN; + else if (identifier == "possessions.end") RETVAL = EQEmu::invslot::POSSESSIONS_END; + else if (identifier == "bank.begin") RETVAL = EQEmu::invslot::BANK_BEGIN; + else if (identifier == "bank.end") RETVAL = EQEmu::invslot::BANK_END; + else if (identifier == "sharedbank.begin") RETVAL = EQEmu::invslot::SHARED_BANK_BEGIN; + else if (identifier == "sharedbank.end") RETVAL = EQEmu::invslot::SHARED_BANK_END; + else if (identifier == "generalbags.begin") RETVAL = EQEmu::invbag::GENERAL_BAGS_BEGIN; + else if (identifier == "generalbags.end") RETVAL = EQEmu::invbag::GENERAL_BAGS_END; + else if (identifier == "cursorbag.begin") RETVAL = EQEmu::invbag::CURSOR_BAG_BEGIN; + else if (identifier == "cursorbag.end") RETVAL = EQEmu::invbag::CURSOR_BAG_END; + else if (identifier == "bankbags.begin") RETVAL = EQEmu::invbag::BANK_BAGS_BEGIN; + else if (identifier == "bankbags.end") RETVAL = EQEmu::invbag::BANK_BAGS_END; + else if (identifier == "sharedbankbags.begin") RETVAL = EQEmu::invbag::SHARED_BANK_BAGS_BEGIN; + else if (identifier == "sharedbankbags.end") RETVAL = EQEmu::invbag::SHARED_BANK_BAGS_END; + else if (identifier == "bagslot.begin") RETVAL = EQEmu::invbag::SLOT_BEGIN; + else if (identifier == "bagslot.end") RETVAL = EQEmu::invbag::SLOT_END; + else if (identifier == "augsocket.begin") RETVAL = EQEmu::invaug::SOCKET_BEGIN; + else if (identifier == "augsocket.end") RETVAL = EQEmu::invaug::SOCKET_END; + else if (identifier == "equipment.begin") RETVAL = EQEmu::invslot::EQUIPMENT_BEGIN; + else if (identifier == "equipment.end") RETVAL = EQEmu::invslot::EQUIPMENT_END; + else if (identifier == "general.begin") RETVAL = EQEmu::invslot::GENERAL_BEGIN; + else if (identifier == "general.end") RETVAL = EQEmu::invslot::GENERAL_END; else if (identifier == "charm") RETVAL = EQEmu::invslot::slotCharm; else if (identifier == "ear1") RETVAL = EQEmu::invslot::slotEar1; else if (identifier == "head") RETVAL = EQEmu::invslot::slotHead; @@ -3751,6 +3751,7 @@ EXTERN_C XS(boot_quest) { newXS(strcpy(buf, "follow"), XS__follow, file); newXS(strcpy(buf, "forcedoorclose"), XS__forcedoorclose, file); newXS(strcpy(buf, "forcedooropen"), XS__forcedooropen, file); + newXS(strcpy(buf, "getinventoryslotid"), XS__getinventoryslotid, file); newXS(strcpy(buf, "getItemName"), XS_qc_getItemName, file); newXS(strcpy(buf, "get_spawn_condition"), XS__get_spawn_condition, file); newXS(strcpy(buf, "getguildnamebyid"), XS__getguildnamebyid, file); @@ -3762,7 +3763,6 @@ EXTERN_C XS(boot_quest) { newXS(strcpy(buf, "gmsay"), XS__gmsay, file); newXS(strcpy(buf, "has_zone_flag"), XS__has_zone_flag, file); newXS(strcpy(buf, "incstat"), XS__incstat, file); - newXS(strcpy(buf, "inventory"), XS__inventory, file); newXS(strcpy(buf, "isdisctome"), XS__isdisctome, file); newXS(strcpy(buf, "isdooropen"), XS__isdooropen, file); newXS(strcpy(buf, "istaskactive"), XS__istaskactive, file); From 7278c6294d310b4234e0c3147c42c0a1b2a4d82a Mon Sep 17 00:00:00 2001 From: KimLS Date: Thu, 20 Sep 2018 16:14:47 -0700 Subject: [PATCH 389/670] Movement will now be handled by the movement manager instead of mob --- zone/aa.cpp | 6 +- zone/aggro.cpp | 2 +- zone/aura.cpp | 2 +- zone/client.cpp | 2 +- zone/command.cpp | 47 ++++--- zone/common.h | 2 - zone/embparser_api.cpp | 4 +- zone/forage.cpp | 2 +- zone/horse.cpp | 2 +- zone/lua_general.cpp | 4 +- zone/lua_mob.cpp | 17 +-- zone/lua_mob.h | 3 +- zone/merc.cpp | 2 +- zone/mob.cpp | 23 ++-- zone/mob.h | 19 +-- zone/mob_ai.cpp | 14 +- zone/mob_movement_manager.cpp | 245 +++++++++++++++++++++++++--------- zone/mob_movement_manager.h | 3 + zone/npc.cpp | 10 +- zone/npc.h | 5 +- zone/pathfinder_waypoint.cpp | 2 +- zone/pathing.cpp | 4 +- zone/perl_mob.cpp | 21 +-- zone/pets.cpp | 2 +- zone/position.cpp | 6 + zone/position.h | 2 + zone/questmgr.cpp | 50 ++++--- zone/questmgr.h | 2 +- zone/spawn2.cpp | 2 +- zone/trap.cpp | 6 +- zone/waypoints.cpp | 116 ++-------------- zone/zone.cpp | 2 +- 32 files changed, 323 insertions(+), 306 deletions(-) diff --git a/zone/aa.cpp b/zone/aa.cpp index 9fa76a9d4..5a2b87bb5 100644 --- a/zone/aa.cpp +++ b/zone/aa.cpp @@ -126,7 +126,7 @@ void Mob::TemporaryPets(uint16 spell_id, Mob *targ, const char *name_override, u (npc_dup != nullptr) ? npc_dup : npc_type, //make sure we give the NPC the correct data pointer 0, GetPosition() + glm::vec4(swarmPetLocations[summon_count], 0.0f, 0.0f), - FlyMode3); + GravityBehavior::Ground); if (followme) swarm_pet_npc->SetFollowID(GetID()); @@ -225,7 +225,7 @@ void Mob::TypesTemporaryPets(uint32 typesid, Mob *targ, const char *name_overrid (npc_dup!=nullptr)?npc_dup:npc_type, //make sure we give the NPC the correct data pointer 0, GetPosition() + glm::vec4(swarmPetLocations[summon_count], 0.0f, 0.0f), - FlyMode3); + GravityBehavior::Ground); if (followme) swarm_pet_npc->SetFollowID(GetID()); @@ -413,7 +413,7 @@ void Mob::WakeTheDead(uint16 spell_id, Mob *target, uint32 duration) make_npc->d_melee_texture1 = 0; make_npc->d_melee_texture2 = 0; - auto npca = new NPC(make_npc, 0, GetPosition(), FlyMode3); + auto npca = new NPC(make_npc, 0, GetPosition(), GravityBehavior::Ground); if(!npca->GetSwarmInfo()){ auto nSI = new SwarmPet; diff --git a/zone/aggro.cpp b/zone/aggro.cpp index f8162322e..30e3b9e0f 100644 --- a/zone/aggro.cpp +++ b/zone/aggro.cpp @@ -966,7 +966,7 @@ bool Mob::CombatRange(Mob* other) if (_DistNoRoot <= size_mod) { //A hack to kill an exploit till we get something better. - if (flymode == 0 && _zDist > 500 && !CheckLastLosState()) { + if (flymode == GravityBehavior::Ground && _zDist > 500 && !CheckLastLosState()) { return false; } diff --git a/zone/aura.cpp b/zone/aura.cpp index 8a885c67b..ccb37a3a3 100644 --- a/zone/aura.cpp +++ b/zone/aura.cpp @@ -6,7 +6,7 @@ #include "raids.h" Aura::Aura(NPCType *type_data, Mob *owner, AuraRecord &record) - : NPC(type_data, 0, owner->GetPosition(), FlyMode3), spell_id(record.spell_id), distance(record.distance), + : NPC(type_data, 0, owner->GetPosition(), GravityBehavior::Flying), spell_id(record.spell_id), distance(record.distance), remove_timer(record.duration), movement_timer(100), process_timer(100), aura_id(-1) { GiveNPCTypeData(type_data); // we will delete this later on diff --git a/zone/client.cpp b/zone/client.cpp index 8477c6fc6..0bc42f8b0 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -6632,7 +6632,7 @@ void Client::Doppelganger(uint16 spell_id, Mob *target, const char *name_overrid (npc_dup!=nullptr)?npc_dup:npc_type, //make sure we give the NPC the correct data pointer 0, GetPosition() + glm::vec4(swarmPetLocations[summon_count], 0.0f, 0.0f), - FlyMode3); + GravityBehavior::Ground); if(!swarm_pet_npc->GetSwarmInfo()){ auto nSI = new SwarmPet; diff --git a/zone/command.cpp b/zone/command.cpp index 4cc17c6ca..9d4604dc2 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -204,7 +204,7 @@ int command_init(void) command_add("flag", "[status] [acctname] - Refresh your admin status, or set an account's admin status if arguments provided", 0, command_flag) || command_add("flagedit", "- Edit zone flags on your target", 100, command_flagedit) || command_add("flags", "- displays the flags of you or your target", 0, command_flags) || - command_add("flymode", "[0/1/2] - Set your or your player target's flymode to off/on/levitate", 50, command_flymode) || + command_add("flymode", "[0/1/2/3/4/5] - Set your or your player target's flymode to ground/flying/levitate/water/floating/levitate_running", 50, command_flymode) || command_add("fov", "- Check wether you're behind or in your target's field of view", 80, command_fov) || command_add("freeze", "- Freeze your target", 80, command_freeze) || command_add("gassign", "[id] - Assign targetted NPC to predefined wandering grid id", 100, command_gassign) || @@ -2067,7 +2067,7 @@ void command_grid(Client *c, const Seperator *sep) static_cast(atoi(row[4])), static_cast(atoi(row[5])) ); - npc->SetFlyMode(1); + npc->SetFlyMode(GravityBehavior::Flying); npc->GMMove(node_position.x, node_position.y, node_position.z, node_position.w); } } @@ -2166,20 +2166,37 @@ void command_mana(Client *c, const Seperator *sep) void command_flymode(Client *c, const Seperator *sep) { - Client *t=c; + Mob *t = c; - if (strlen(sep->arg[1]) == 1 && !(sep->arg[1][0] == '0' || sep->arg[1][0] == '1' || sep->arg[1][0] == '2')) - c->Message(0, "#flymode [0/1/2]"); + if (strlen(sep->arg[1]) == 1 && !(sep->arg[1][0] == '0' || sep->arg[1][0] == '1' || sep->arg[1][0] == '2' || sep->arg[1][0] == '3' || sep->arg[1][0] == '4' || sep->arg[1][0] == '5')) + c->Message(0, "#flymode [0/1/2/3/4/5]"); else { - if(c->GetTarget() && c->GetTarget()->IsClient()) - t=c->GetTarget()->CastToClient(); - t->SendAppearancePacket(AT_Levitate, atoi(sep->arg[1])); - if (sep->arg[1][0] == '1') - c->Message(0, "Turning %s's Flymode ON", t->GetName()); - else if (sep->arg[1][0] == '2') - c->Message(0, "Turning %s's Flymode LEV", t->GetName()); - else - c->Message(0, "Turning %s's Flymode OFF", t->GetName()); + if (c->GetTarget()) { + t = c->GetTarget(); + } + + int fm = atoi(sep->arg[1]); + + t->SetFlyMode(static_cast(fm)); + t->SendAppearancePacket(AT_Levitate, fm); + if (sep->arg[1][0] == '0') { + c->Message(0, "Setting %s to Grounded", t->GetName()); + } + else if (sep->arg[1][0] == '1') { + c->Message(0, "Setting %s to Flying", t->GetName()); + } + else if (sep->arg[1][0] == '2') { + c->Message(0, "Setting %s to Levitating", t->GetName()); + } + else if (sep->arg[1][0] == '3') { + c->Message(0, "Setting %s to In Water", t->GetName()); + } + else if (sep->arg[1][0] == '4') { + c->Message(0, "Setting %s to Floating(Boat)", t->GetName()); + } + else if (sep->arg[1][0] == '5') { + c->Message(0, "Setting %s to Levitating While Running", t->GetName()); + } } } @@ -2521,7 +2538,7 @@ void command_npctypespawn(Client *c, const Seperator *sep) const NPCType* tmp = 0; if ((tmp = database.LoadNPCTypesData(atoi(sep->arg[1])))) { //tmp->fixedZ = 1; - auto npc = new NPC(tmp, 0, c->GetPosition(), FlyMode3); + auto npc = new NPC(tmp, 0, c->GetPosition(), GravityBehavior::Ground); if (npc && sep->IsNumber(2)) npc->SetNPCFactionID(atoi(sep->arg[2])); diff --git a/zone/common.h b/zone/common.h index df6b22637..030ad716a 100644 --- a/zone/common.h +++ b/zone/common.h @@ -206,8 +206,6 @@ typedef enum { //fear states fearStateStuck //I cannot move somehow... } FearState; -enum { FlyMode0 = 0, FlyMode1 = 1, Flymode2 = 2, FlyMode3 = 3 }; - // This is actually FlyMode, from MQ2 enum GravityBehavior { Ground, diff --git a/zone/embparser_api.cpp b/zone/embparser_api.cpp index 18c84ccdd..e1f2c1c12 100644 --- a/zone/embparser_api.cpp +++ b/zone/embparser_api.cpp @@ -3083,9 +3083,9 @@ XS(XS__FlyMode); XS(XS__FlyMode) { dXSARGS; if (items != 1) - Perl_croak(aTHX_ "Usage: quest::FlyMode(uint8 mode [0-3])"); + Perl_croak(aTHX_ "Usage: quest::FlyMode(uint8 mode [0-5])"); - uint8 flymode = (int) SvUV(ST(0)); + GravityBehavior flymode = (GravityBehavior) SvUV(ST(0)); quest_manager.FlyMode(flymode); XSRETURN_EMPTY; diff --git a/zone/forage.cpp b/zone/forage.cpp index e5248cf01..ede05c59f 100644 --- a/zone/forage.cpp +++ b/zone/forage.cpp @@ -284,7 +284,7 @@ void Client::GoFish() if (tmp != nullptr) { auto positionNPC = GetPosition(); positionNPC.x = positionNPC.x + 3; - auto npc = new NPC(tmp, nullptr, positionNPC, FlyMode3); + auto npc = new NPC(tmp, nullptr, positionNPC, GravityBehavior::Ground); npc->AddLootTable(); if (npc->DropsGlobalLoot()) npc->CheckGlobalLootTables(); diff --git a/zone/horse.cpp b/zone/horse.cpp index fe5762d5a..d7d242e83 100644 --- a/zone/horse.cpp +++ b/zone/horse.cpp @@ -30,7 +30,7 @@ std::map Horse::horse_types; LinkedList horses_auto_delete; Horse::Horse(Client *_owner, uint16 spell_id, const glm::vec4& position) - : NPC(GetHorseType(spell_id), nullptr, position, FlyMode3) + : NPC(GetHorseType(spell_id), nullptr, position, GravityBehavior::Ground) { //give the horse its proper name. strn0cpy(name, _owner->GetCleanName(), 55); diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp index da62dc305..f65e6f2ad 100644 --- a/zone/lua_general.cpp +++ b/zone/lua_general.cpp @@ -891,7 +891,7 @@ void lua_flag_instance_by_raid_leader(uint32 zone, uint32 version) { } void lua_fly_mode(int flymode) { - quest_manager.FlyMode(flymode); + quest_manager.FlyMode(static_cast(flymode)); } int lua_faction_value() { @@ -1499,7 +1499,7 @@ void lua_create_npc(luabind::adl::object table, float x, float y, float z, float LuaCreateNPCParse(no_target_hotkey, bool, false); LuaCreateNPCParse(raid_target, bool, false); - NPC* npc = new NPC(npc_type, nullptr, glm::vec4(x, y, z, heading), FlyMode3); + NPC* npc = new NPC(npc_type, nullptr, glm::vec4(x, y, z, heading), GravityBehavior::Ground); npc->GiveNPCTypeData(npc_type); entity_list.AddNPC(npc); } diff --git a/zone/lua_mob.cpp b/zone/lua_mob.cpp index 50d973b61..4a5932db2 100644 --- a/zone/lua_mob.cpp +++ b/zone/lua_mob.cpp @@ -1124,15 +1124,9 @@ double Lua_Mob::CalculateHeadingToTarget(double in_x, double in_y) { return self->CalculateHeadingToTarget(static_cast(in_x), static_cast(in_y)); } -bool Lua_Mob::CalculateNewPosition(double x, double y, double z, double speed) { - Lua_Safe_Call_Bool(); - return self->CalculateNewPosition(static_cast(x), static_cast(y), static_cast(z), static_cast(speed)); -} - -bool Lua_Mob::CalculateNewPosition(double x, double y, double z, double speed, bool check_z) { - Lua_Safe_Call_Bool(); - return self->CalculateNewPosition(static_cast(x), static_cast(y), static_cast(z), static_cast(speed), - check_z); +void Lua_Mob::CalculateNewPosition(double x, double y, double z, double speed) { + Lua_Safe_Call_Void(); + self->CalculateNewPosition(static_cast(x), static_cast(y), static_cast(z), static_cast(speed)); } float Lua_Mob::CalculateDistance(double x, double y, double z) { @@ -1430,7 +1424,7 @@ void Lua_Mob::SendAppearanceEffect(uint32 parm1, uint32 parm2, uint32 parm3, uin void Lua_Mob::SetFlyMode(int in) { Lua_Safe_Call_Void(); - self->SetFlyMode(in); + self->SetFlyMode(static_cast(in)); } void Lua_Mob::SetTexture(int in) { @@ -2361,8 +2355,7 @@ luabind::scope lua_register_mob() { .def("FaceTarget", (void(Lua_Mob::*)(Lua_Mob))&Lua_Mob::FaceTarget) .def("SetHeading", (void(Lua_Mob::*)(double))&Lua_Mob::SetHeading) .def("CalculateHeadingToTarget", (double(Lua_Mob::*)(double,double))&Lua_Mob::CalculateHeadingToTarget) - .def("CalculateNewPosition", (bool(Lua_Mob::*)(double,double,double,double))&Lua_Mob::CalculateNewPosition) - .def("CalculateNewPosition", (bool(Lua_Mob::*)(double,double,double,double,bool))&Lua_Mob::CalculateNewPosition) + .def("CalculateNewPosition", (void(Lua_Mob::*)(double,double,double,double))&Lua_Mob::CalculateNewPosition) .def("CalculateDistance", (float(Lua_Mob::*)(double,double,double))&Lua_Mob::CalculateDistance) .def("SendTo", (void(Lua_Mob::*)(double,double,double))&Lua_Mob::SendTo) .def("SendToFixZ", (void(Lua_Mob::*)(double,double,double))&Lua_Mob::SendToFixZ) diff --git a/zone/lua_mob.h b/zone/lua_mob.h index 564277ac7..ed3f869ed 100644 --- a/zone/lua_mob.h +++ b/zone/lua_mob.h @@ -240,8 +240,7 @@ public: void FaceTarget(Lua_Mob target); void SetHeading(double in); double CalculateHeadingToTarget(double in_x, double in_y); - bool CalculateNewPosition(double x, double y, double z, double speed); - bool CalculateNewPosition(double x, double y, double z, double speed, bool check_z); + void CalculateNewPosition(double x, double y, double z, double speed); float CalculateDistance(double x, double y, double z); void SendTo(double x, double y, double z); void SendToFixZ(double x, double y, double z); diff --git a/zone/merc.cpp b/zone/merc.cpp index 7cb480a2f..09bd78622 100644 --- a/zone/merc.cpp +++ b/zone/merc.cpp @@ -29,7 +29,7 @@ extern volatile bool is_zone_loaded; #endif Merc::Merc(const NPCType* d, float x, float y, float z, float heading) -: NPC(d, nullptr, glm::vec4(x, y, z, heading), 0, false), endupkeep_timer(1000), rest_timer(1), confidence_timer(6000), check_target_timer(2000) +: NPC(d, nullptr, glm::vec4(x, y, z, heading), GravityBehavior::Ground, false), endupkeep_timer(1000), rest_timer(1), confidence_timer(6000), check_target_timer(2000) { base_hp = d->max_hp; base_mana = d->Mana; diff --git a/zone/mob.cpp b/zone/mob.cpp index 63a1c47ca..3921d91f5 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -427,7 +427,7 @@ Mob::Mob(const char* in_name, m_TargetRing = glm::vec3(); - flymode = FlyMode3; + flymode = GravityBehavior::Ground; DistractedFromGrid = false; hate_list.SetHateOwner(this); @@ -1167,7 +1167,7 @@ void Mob::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) ns->spawn.flymode = flymode; if(IsBoat()) { - ns->spawn.flymode = 1; + ns->spawn.flymode = GravityBehavior::Floating; } ns->spawn.lastName[0] = '\0'; @@ -3566,17 +3566,9 @@ bool Mob::EntityVariableExists(const char *id) return false; } -void Mob::SetFlyMode(uint8 flymode) +void Mob::SetFlyMode(GravityBehavior flymode) { - if(IsClient() && flymode >= 0 && flymode < 3) - { - this->SendAppearancePacket(AT_Levitate, flymode); - } - else if(IsNPC() && flymode >= 0 && flymode <= 3) - { - this->SendAppearancePacket(AT_Levitate, flymode); - this->CastToNPC()->SetFlyMode(flymode); - } + this->flymode = flymode; } bool Mob::IsNimbusEffectActive(uint32 nimbus_effect) @@ -6014,6 +6006,13 @@ float Mob::GetDefaultRaceSize() const { return GetRaceGenderDefaultHeight(race, gender); } +void Mob::TryFixZ(int32 z_find_offset, bool fix_client_z) +{ + if (fix_z_timer.Check() && flymode == GravityBehavior::Ground) { + FixZ(); + } +} + #ifdef BOTS bool Mob::JoinHealRotationTargetPool(std::shared_ptr* heal_rotation) diff --git a/zone/mob.h b/zone/mob.h index 52d404049..82aaa81e4 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -529,7 +529,7 @@ public: inline const float GetHeading() const { return m_Position.w; } inline const float GetSize() const { return size; } inline const float GetBaseSize() const { return base_size; } - inline const int8 GetFlyMode() const { return static_cast(flymode); } + inline const GravityBehavior GetFlyMode() const { return flymode; } bool IsBoat() const; //Group @@ -567,8 +567,8 @@ public: void SetSpawned() { spawned = true; }; bool Spawned() { return spawned; }; virtual bool ShouldISpawnFor(Client *c) { return true; } - void SetFlyMode(uint8 flymode); - inline void Teleport(glm::vec3 NewPosition) { m_Position.x = NewPosition.x; m_Position.y = NewPosition.y; + void SetFlyMode(GravityBehavior flymode); + inline void Teleport(const glm::vec3 &NewPosition) { m_Position.x = NewPosition.x; m_Position.y = NewPosition.y; m_Position.z = NewPosition.z; }; void TryMoveAlong(float distance, float angle, bool send = true); void ProcessForcedMovement(); @@ -801,8 +801,9 @@ public: void SetAppearance(EmuAppearance app, bool iIgnoreSelf = true); inline EmuAppearance GetAppearance() const { return _appearance; } inline const int GetAnimation() const { return animation; } + inline void SetAnimation(int a) { animation = a; } inline const uint8 GetRunAnimSpeed() const { return pRunAnimSpeed; } - inline void SetRunAnimSpeed(int8 in) { if (pRunAnimSpeed != in) { pRunAnimSpeed = in; } } + inline void SetRunAnimSpeed(int8 in) { pRunAnimSpeed = in; } bool IsDestructibleObject() { return destructibleobject; } void SetDestructibleObject(bool in) { destructibleobject = in; } @@ -968,13 +969,14 @@ public: inline bool CheckAggro(Mob* other) {return hate_list.IsEntOnHateList(other);} float CalculateHeadingToTarget(float in_x, float in_y) { return HeadingAngleToMob(in_x, in_y); } - virtual bool CalculateNewPosition(float x, float y, float z, float speed, bool check_z = true, bool calculate_heading = true); + virtual void CalculateNewPosition(float x, float y, float z, float speed, bool check_z = true, bool calculate_heading = true); float CalculateDistance(float x, float y, float z); float GetGroundZ(float new_x, float new_y, float z_offset=0.0); void SendTo(float new_x, float new_y, float new_z); void SendToFixZ(float new_x, float new_y, float new_z); float GetZOffset() const; float GetDefaultRaceSize() const; + void TryFixZ(int32 z_find_offset = 5, bool fix_client_z = false); void FixZ(int32 z_find_offset = 5, bool fix_client_z = false); float GetFixedZ(glm::vec3 destination, int32 z_find_offset = 5); @@ -1131,6 +1133,9 @@ public: int GetWeaponDamage(Mob *against, const EQEmu::ItemData *weapon_item); int GetWeaponDamage(Mob *against, const EQEmu::ItemInstance *weapon_item, uint32 *hate = nullptr); + //Pathing + glm::vec3 UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &WaypointChange, bool &NodeReached); + // Bots HealRotation methods #ifdef BOTS bool IsHealRotationTarget() { return (m_target_of_heal_rotation.use_count() && m_target_of_heal_rotation.get()); } @@ -1152,7 +1157,6 @@ protected: int _GetWalkSpeed() const; int _GetRunSpeed() const; int _GetFearSpeed() const; - virtual bool MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, bool check_z = true, bool calculate_heading = true); virtual bool AI_EngagedCastCheck() { return(false); } virtual bool AI_PursueCastCheck() { return(false); } @@ -1288,7 +1292,6 @@ protected: void CalculateNewFearpoint(); float FindGroundZ(float new_x, float new_y, float z_offset=0.0); float FindDestGroundZ(glm::vec3 dest, float z_offset=0.0); - glm::vec3 UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &WaypointChange, bool &NodeReached); glm::vec3 HandleStuckPath(const glm::vec3 &To, const glm::vec3 &From); virtual float GetSympatheticProcChances(uint16 spell_id, int16 ProcRateMod, int32 ItemProcRate = 0); @@ -1509,7 +1512,7 @@ protected: // we might want to do this differently, we gotta do max NPC buffs ... which is 97 uint32 m_spellHitsLeft[EQEmu::constants::TotalBuffs]; // Used to track which spells will have their numhits incremented when spell finishes casting - int flymode; + GravityBehavior flymode; bool m_targetable; int QGVarDuration(const char *fmt); void InsertQuestGlobal(int charid, int npcid, int zoneid, const char *name, const char *value, int expdate); diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 9ecb96719..b9582d712 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1520,7 +1520,6 @@ void Mob::AI_Process() { } else { - bool waypoint_changed, node_reached; auto &Goal = owner->GetPosition(); CalculateNewPosition(Goal.x, Goal.y, Goal.z, pet_speed, true); @@ -1792,16 +1791,13 @@ void NPC::AI_DoMovement() { } else if (IsGuarding()) { - bool CP2Moved; + CalculateNewPosition(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z, move_speed); + + //if(Distance(m_GuardPoint, m_Position)) - if (!((m_Position.x == m_GuardPoint.x) && (m_Position.y == m_GuardPoint.y) && (m_Position.z == m_GuardPoint.z))) { - CP2Moved = CalculateNewPosition(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z, move_speed); - } - else { - CP2Moved = false; - } + bool at_gp = CalculateDistance(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z) < 0.1f; - if (!CP2Moved) { + if (at_gp) { if (moved) { Log(Logs::Detail, Logs::AI, diff --git a/zone/mob_movement_manager.cpp b/zone/mob_movement_manager.cpp index 00a2536bb..2b5821ab0 100644 --- a/zone/mob_movement_manager.cpp +++ b/zone/mob_movement_manager.cpp @@ -4,19 +4,20 @@ #include "../common/timer.h" #include +#include #include -struct MobMovementEntry +extern uint64_t frame_time; + +struct MovementEntry { - Mob *m; int animation; float heading; bool dirty; double last_sent_time; double last_sent_time_long_distance; - MobMovementEntry(Mob *m) { - this->m = m; + MovementEntry(Mob *m) { animation = 0; heading = m->GetHeading(); dirty = false; @@ -25,9 +26,27 @@ struct MobMovementEntry } }; +struct MoveToEntry +{ + float x; + float y; + float z; + float speed; + bool active; + + MoveToEntry() { + x = 0.0f; + y = 0.0f; + z = 0.0f; + speed = 0.0f; + active = false; + } +}; + struct MobMovementManager::Implementation { - std::vector Entries; + std::map Entries; + std::map MoveEntries; std::vector Clients; }; @@ -44,9 +63,18 @@ void MobMovementManager::Process() { double current_time = static_cast(Timer::GetCurrentTime()) / 1000.0; - for (auto &ent : _impl->Entries) { + for (auto &mov : _impl->MoveEntries) { + auto &ent = mov.second; + + if (ent.active) { + ProcessMovement(mov.first, ent.x, ent.y, ent.z, ent.speed); + } + } + + for (auto &iter : _impl->Entries) { + auto &ent = iter.second; if (ent.dirty) { - SendUpdate(ent.m, ent.animation, ent.heading); + SendUpdate(iter.first, ent.animation, ent.heading); ent.dirty = false; ent.last_sent_time = current_time; @@ -56,12 +84,12 @@ void MobMovementManager::Process() double diff_long_range = current_time - ent.last_sent_time_long_distance; if (diff_short_range >= 2.0) { - SendUpdateShortDistance(ent.m, ent.animation, ent.heading); + SendUpdateShortDistance(iter.first, ent.animation, ent.heading); ent.last_sent_time = current_time; } if (diff_long_range >= 6.0) { - SendUpdateLongDistance(ent.m, ent.animation, ent.heading); + SendUpdateLongDistance(iter.first, ent.animation, ent.heading); ent.last_sent_time_long_distance = current_time; } } @@ -70,20 +98,14 @@ void MobMovementManager::Process() void MobMovementManager::AddMob(Mob *m) { - _impl->Entries.push_back(MobMovementEntry(m)); + _impl->Entries.insert(std::make_pair(m, MovementEntry(m))); + _impl->MoveEntries.insert(std::make_pair(m, MoveToEntry())); } void MobMovementManager::RemoveMob(Mob *m) { - auto iter = _impl->Entries.begin(); - while (iter != _impl->Entries.end()) { - auto &ent = *iter; - if (ent.m == m) { - _impl->Entries.erase(iter); - return; - } - ++iter; - } + _impl->Entries.erase(m); + _impl->MoveEntries.erase(m); } void MobMovementManager::AddClient(Client *c) @@ -107,60 +129,62 @@ void MobMovementManager::RemoveClient(Client *c) void MobMovementManager::SendPosition(Mob *who) { - auto iter = _impl->Entries.begin(); - while (iter != _impl->Entries.end()) { - auto &ent = *iter; - - if (ent.m == who) { - auto anim = 0; - auto heading = who->GetHeading(); - - if (ent.animation != anim || !HeadingEqual(ent.heading, heading)) { - ent.animation = anim; - ent.heading = heading; - ent.dirty = true; - } + auto iter = _impl->Entries.find(who); + auto &ent = iter->second; - return; - } - - ++iter; + auto anim = 0; + auto heading = who->GetHeading(); + + if (ent.animation != anim || !HeadingEqual(ent.heading, heading)) { + ent.animation = anim; + ent.heading = heading; + ent.dirty = true; } } void MobMovementManager::SendPositionUpdate(Mob *who, bool send_to_self) { - auto iter = _impl->Entries.begin(); - while (iter != _impl->Entries.end()) { - auto &ent = *iter; + auto iter = _impl->Entries.find(who); + auto &ent = iter->second; - if (ent.m == who) { - auto anim = 0; - auto heading = who->GetHeading(); - if (who->IsMoving()) { - if (who->IsClient()) { - anim = who->GetAnimation(); - } - else { - anim = who->GetRunAnimSpeed(); - } - } - - if (send_to_self && who->IsClient()) { - SendUpdateTo(who, who->CastToClient(), anim, heading); - } - - if (ent.animation != anim || !HeadingEqual(ent.heading, heading)) { - ent.animation = anim; - ent.heading = heading; - ent.dirty = true; - } - - return; + auto anim = 0; + auto heading = who->GetHeading(); + if (who->IsMoving()) { + if (who->IsClient()) { + anim = who->GetAnimation(); + } + else { + anim = who->GetRunAnimSpeed(); } - - ++iter; } + + if (send_to_self && who->IsClient()) { + SendUpdateTo(who, who->CastToClient(), anim, heading); + } + + if (ent.animation != anim || !HeadingEqual(ent.heading, heading)) { + ent.animation = anim; + ent.heading = heading; + ent.dirty = true; + } +} + +void MobMovementManager::NavigateTo(Mob *who, float x, float y, float z, float speed) +{ + auto iter = _impl->MoveEntries.find(who); + auto &ent = iter->second; + + ent.x = x; + ent.y = y; + ent.z = z; + ent.speed = speed; + ent.active = true; +} + +void MobMovementManager::StopNavigation(Mob *who) { + auto iter = _impl->MoveEntries.find(who); + auto &ent = iter->second; + ent.active = false; } bool MobMovementManager::HeadingEqual(float a, float b) @@ -257,3 +281,96 @@ void MobMovementManager::SendUpdateLongDistance(Mob *who, int anim, float headin } } } + +void MobMovementManager::ProcessMovement(Mob *who, float x, float y, float z, float speed) +{ + if (who->GetID() == 0) { + return; + } + + if (speed <= 0) { + who->SetCurrentSpeed(0); + return; + } + + if (IsPositionEqual(x, y, z, who->GetX(), who->GetY(), who->GetZ())) { + StopNavigation(who); + return; + } + + bool calculate_heading = false; + bool WaypointChanged = false; + bool NodeReached = false; + glm::vec3 Goal = who->UpdatePath( + x, y, z, speed, WaypointChanged, NodeReached + ); + + if (WaypointChanged || NodeReached) { + calculate_heading = true; + entity_list.OpenDoorsNear(who); + } + + who->SetCurrentSpeed(static_cast(speed)); + who->SetRunAnimSpeed(speed); + +#ifdef BOTS + if (who->IsClient() || who->IsBot()) +#else + if (who->IsClient()) +#endif + { + who->SetAnimation(speed * 0.55f); + } + + auto &p = who->GetPosition(); + + //Setup Vectors + glm::vec3 tar(Goal.x, Goal.y, Goal.z); + glm::vec3 pos(p.x, p.y, p.z); + double len = glm::distance(pos, tar); + if (len == 0) { + return; + } + + glm::vec3 dir = tar - pos; + glm::vec3 ndir = glm::normalize(dir); + double time_since_last = static_cast(frame_time) / 1000.0; + double distance_moved = time_since_last * speed * 0.4f * 1.4f; + + if (distance_moved > len) { + who->Teleport(Goal); + + if (who->IsNPC()) { + entity_list.ProcessMove(who->CastToNPC(), Goal.x, Goal.y, Goal.z); + } + + who->TryFixZ(); + + return; + } + else { + glm::vec3 npos = pos + (ndir * static_cast(distance_moved)); + who->Teleport(npos); + + if (who->IsNPC()) { + entity_list.ProcessMove(who->CastToNPC(), npos.x, npos.y, npos.z); + } + } + + if (calculate_heading) { + who->SetHeading(who->CalculateHeadingToTarget(Goal.x, Goal.y)); + } + + who->TryFixZ(); + + who->SetMoving(true); + + if (who->IsClient()) { + who->SendPositionUpdate(); + who->CastToClient()->ResetPositionTimer(); + } + else { + who->SendPositionUpdate(); + who->SetAppearance(eaStanding, false); + } +} diff --git a/zone/mob_movement_manager.h b/zone/mob_movement_manager.h index 69ea2ee80..e45bcec55 100644 --- a/zone/mob_movement_manager.h +++ b/zone/mob_movement_manager.h @@ -16,6 +16,8 @@ public: void SendPosition(Mob *who); void SendPositionUpdate(Mob *who, bool send_to_self); + void NavigateTo(Mob *who, float x, float y, float z, float speed); + void StopNavigation(Mob *who); static MobMovementManager &Get() { static MobMovementManager inst; @@ -32,6 +34,7 @@ private: void SendUpdate(Mob *who, int anim, float heading); void SendUpdateShortDistance(Mob *who, int anim, float heading); void SendUpdateLongDistance(Mob *who, int anim, float heading); + void ProcessMovement(Mob *who, float x, float y, float z, float speed); struct Implementation; std::unique_ptr _impl; diff --git a/zone/npc.cpp b/zone/npc.cpp index bf1508858..0bb1bc10d 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -57,7 +57,7 @@ extern Zone* zone; extern volatile bool is_zone_loaded; extern EntityList entity_list; -NPC::NPC(const NPCType* d, Spawn2* in_respawn, const glm::vec4& position, int iflymode, bool IsCorpse) +NPC::NPC(const NPCType* d, Spawn2* in_respawn, const glm::vec4& position, GravityBehavior iflymode, bool IsCorpse) : Mob(d->name, d->lastname, d->max_hp, @@ -977,7 +977,7 @@ bool NPC::SpawnZoneController(){ point.y = 1000; point.z = 500; - auto npc = new NPC(npc_type, nullptr, point, FlyMode3); + auto npc = new NPC(npc_type, nullptr, point, GravityBehavior::Flying); npc->GiveNPCTypeData(npc_type); entity_list.AddNPC(npc); @@ -1020,7 +1020,7 @@ NPC * NPC::SpawnGridNodeNPC(std::string name, const glm::vec4 &position, uint32 npc_type->findable = true; auto node_position = glm::vec4(position.x, position.y, position.z, position.w); - auto npc = new NPC(npc_type, nullptr, node_position, FlyMode1); + auto npc = new NPC(npc_type, nullptr, node_position, GravityBehavior::Flying); npc->GiveNPCTypeData(npc_type); entity_list.AddNPC(npc, true, true); @@ -1187,7 +1187,7 @@ NPC* NPC::SpawnNPC(const char* spawncommand, const glm::vec4& position, Client* npc_type->prim_melee_type = 28; npc_type->sec_melee_type = 28; - auto npc = new NPC(npc_type, nullptr, position, FlyMode3); + auto npc = new NPC(npc_type, nullptr, position, GravityBehavior::Ground); npc->GiveNPCTypeData(npc_type); entity_list.AddNPC(npc); @@ -2819,4 +2819,4 @@ void NPC::ModifyStatsOnCharm(bool bRemoved) // the rest of the stats aren't cached, so lets just do these two instead of full CalcBonuses() SetAttackTimer(); CalcAC(); -} \ No newline at end of file +} diff --git a/zone/npc.h b/zone/npc.h index ec2676f60..7d2c5a9c8 100644 --- a/zone/npc.h +++ b/zone/npc.h @@ -106,7 +106,7 @@ public: static bool SpawnZoneController(); static int8 GetAILevel(bool iForceReRead = false); - NPC(const NPCType* data, Spawn2* respawn, const glm::vec4& position, int iflymode, bool IsCorpse = false); + NPC(const NPCType* data, Spawn2* respawn, const glm::vec4& position, GravityBehavior iflymode, bool IsCorpse = false); virtual ~NPC(); @@ -229,9 +229,6 @@ public: EmuAppearance GetGuardPointAnim() const { return guard_anim; } void SaveGuardPointAnim(EmuAppearance anim) { guard_anim = anim; } - void SetFlyMode(uint8 FlyMode){ flymode=FlyMode; } - uint32 GetFlyMode() const { return flymode; } - uint8 GetPrimSkill() const { return prim_melee_type; } uint8 GetSecSkill() const { return sec_melee_type; } uint8 GetRangedSkill() const { return ranged_type; } diff --git a/zone/pathfinder_waypoint.cpp b/zone/pathfinder_waypoint.cpp index 86dd4a4a4..c3a85418e 100644 --- a/zone/pathfinder_waypoint.cpp +++ b/zone/pathfinder_waypoint.cpp @@ -557,7 +557,7 @@ void PathfinderWaypoint::ShowNode(const Node &n) { npc_type->findable = 1; auto position = glm::vec4(n.v.x, n.v.y, n.v.z, 0.0f); - auto npc = new NPC(npc_type, nullptr, position, FlyMode1); + auto npc = new NPC(npc_type, nullptr, position, GravityBehavior::Flying); npc->GiveNPCTypeData(npc_type); entity_list.AddNPC(npc, true, true); diff --git a/zone/pathing.cpp b/zone/pathing.cpp index ff1963720..a2885c1f1 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -13,7 +13,7 @@ void AdjustRoute(std::list &nodes, int flymode, float of } for (auto &node : nodes) { - if (flymode == 0 || !zone->watermap->InLiquid(node.pos)) { + if (flymode == GravityBehavior::Ground || !zone->watermap->InLiquid(node.pos)) { auto best_z = zone->zonemap->FindBestZ(node.pos, nullptr); if (best_z != BEST_Z_INVALID) { node.pos.z = best_z + offset; @@ -114,7 +114,7 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa } bool AtNextNode = false; - if (flymode == 1) { + if (flymode == GravityBehavior::Flying) { AtNextNode = DistanceSquared(From, (*Route.begin()).pos) < 4.0f; } else { diff --git a/zone/perl_mob.cpp b/zone/perl_mob.cpp index e61f6ec81..2e2c9a6cb 100644 --- a/zone/perl_mob.cpp +++ b/zone/perl_mob.cpp @@ -5531,15 +5531,13 @@ XS(XS_Mob_CalculateNewPosition) { dXSARGS; if (items < 5 || items > 6) Perl_croak(aTHX_ - "Usage: Mob::CalculateNewPosition(THIS, float x, float y, float z, float speed, [bool check_z = false])"); + "Usage: Mob::CalculateNewPosition(THIS, float x, float y, float z, float speed)"); { Mob *THIS; - bool RETVAL; float x = (float) SvNV(ST(1)); float y = (float) SvNV(ST(2)); float z = (float) SvNV(ST(3)); float speed = (float) SvNV(ST(4)); - bool checkZ; if (sv_derived_from(ST(0), "Mob")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -5549,17 +5547,10 @@ XS(XS_Mob_CalculateNewPosition) { if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - if (items < 6) - checkZ = false; - else { - checkZ = (bool) SvTRUE(ST(5)); - } - RETVAL = THIS->CalculateNewPosition(x, y, z, speed, checkZ); - ST(0) = boolSV(RETVAL); - sv_2mortal(ST(0)); + THIS->CalculateNewPosition(x, y, z, speed); } - XSRETURN(1); + XSRETURN_EMPTY; } XS(XS_Mob_CalculateDistance); /* prototype to pass -Wmissing-prototypes */ @@ -6652,10 +6643,10 @@ XS(XS_Mob_SetFlyMode); /* prototype to pass -Wmissing-prototypes */ XS(XS_Mob_SetFlyMode) { dXSARGS; if (items != 2) - Perl_croak(aTHX_ "Usage: Mob::SetFlyMode(THIS, uint8 flymode[0|1|2|3])"); + Perl_croak(aTHX_ "Usage: Mob::SetFlyMode(THIS, uint8 flymode[0|1|2|3|4|5])"); { Mob *THIS; - uint8 flymode = (uint8) SvIV(ST(1)); + GravityBehavior flymode = (GravityBehavior) SvIV(ST(1)); if (sv_derived_from(ST(0), "Mob")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -8696,7 +8687,7 @@ XS(boot_Mob) { newXSproto(strcpy(buf, "WipeHateList"), XS_Mob_WipeHateList, file, "$"); newXSproto(strcpy(buf, "CheckAggro"), XS_Mob_CheckAggro, file, "$$"); newXSproto(strcpy(buf, "CalculateHeadingToTarget"), XS_Mob_CalculateHeadingToTarget, file, "$$$"); - newXSproto(strcpy(buf, "CalculateNewPosition"), XS_Mob_CalculateNewPosition, file, "$$$$$;$"); + newXSproto(strcpy(buf, "CalculateNewPosition"), XS_Mob_CalculateNewPosition, file, "$$$$$"); newXSproto(strcpy(buf, "CalculateDistance"), XS_Mob_CalculateDistance, file, "$$$$"); newXSproto(strcpy(buf, "SendTo"), XS_Mob_SendTo, file, "$$$$"); newXSproto(strcpy(buf, "SendToFixZ"), XS_Mob_SendToFixZ, file, "$$$$"); diff --git a/zone/pets.cpp b/zone/pets.cpp index e4f7c417b..a436b0097 100644 --- a/zone/pets.cpp +++ b/zone/pets.cpp @@ -425,7 +425,7 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower, into walls or objects (+10), this sometimes creates the "ghost" effect. I changed to +2 (as close as I could get while it still looked good). I also noticed this can happen if an NPC is spawned on the same spot of another or in a related bad spot.*/ Pet::Pet(NPCType *type_data, Mob *owner, PetType type, uint16 spell_id, int16 power) -: NPC(type_data, 0, owner->GetPosition() + glm::vec4(2.0f, 2.0f, 0.0f, 0.0f), FlyMode3) +: NPC(type_data, 0, owner->GetPosition() + glm::vec4(2.0f, 2.0f, 0.0f, 0.0f), GravityBehavior::Ground) { GiveNPCTypeData(type_data); typeofpet = type; diff --git a/zone/position.cpp b/zone/position.cpp index 22885b4b1..83d1491b2 100644 --- a/zone/position.cpp +++ b/zone/position.cpp @@ -160,3 +160,9 @@ float GetReciprocalHeading(const float heading) return result; } + +bool IsPositionEqual(float x1, float y1, float z1, float x2, float y2, float z2) +{ + static const float eps = 0.0001f; + return std::abs(x1 - x2) < eps && std::abs(y1 - y2) < eps && std::abs(z1 - z2) < eps; +} diff --git a/zone/position.h b/zone/position.h index 4081f50e0..479f43bb4 100644 --- a/zone/position.h +++ b/zone/position.h @@ -50,4 +50,6 @@ float DistanceSquaredNoZ(const glm::vec4& point1, const glm::vec4& point2); float GetReciprocalHeading(const glm::vec4& point1); float GetReciprocalHeading(const float heading); +bool IsPositionEqual(float x1, float y1, float z1, float x2, float y2, float z2); + #endif diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index 1393b0221..39d5b9f5d 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -208,7 +208,7 @@ Mob* QuestManager::spawn2(int npc_type, int grid, int unused, const glm::vec4& p const NPCType* tmp = 0; if (tmp = database.LoadNPCTypesData(npc_type)) { - auto npc = new NPC(tmp, nullptr, position, FlyMode3); + auto npc = new NPC(tmp, nullptr, position, GravityBehavior::Ground); npc->AddLootTable(); if (npc->DropsGlobalLoot()) npc->CheckGlobalLootTables(); @@ -232,7 +232,7 @@ Mob* QuestManager::unique_spawn(int npc_type, int grid, int unused, const glm::v const NPCType* tmp = 0; if (tmp = database.LoadNPCTypesData(npc_type)) { - auto npc = new NPC(tmp, nullptr, position, FlyMode3); + auto npc = new NPC(tmp, nullptr, position, GravityBehavior::Ground); npc->AddLootTable(); if (npc->DropsGlobalLoot()) npc->CheckGlobalLootTables(); @@ -308,22 +308,22 @@ Mob* QuestManager::spawn_from_spawn2(uint32 spawn2_id) found_spawn->SetCurrentNPCID(npcid); auto position = glm::vec4(found_spawn->GetX(), found_spawn->GetY(), found_spawn->GetZ(), found_spawn->GetHeading()); - auto npc = new NPC(tmp, found_spawn, position, FlyMode3); + auto npc = new NPC(tmp, found_spawn, position, GravityBehavior::Ground); - found_spawn->SetNPCPointer(npc); - npc->AddLootTable(); - if (npc->DropsGlobalLoot()) - npc->CheckGlobalLootTables(); - npc->SetSp2(found_spawn->SpawnGroupID()); - entity_list.AddNPC(npc); - entity_list.LimitAddNPC(npc); + found_spawn->SetNPCPointer(npc); + npc->AddLootTable(); + if (npc->DropsGlobalLoot()) + npc->CheckGlobalLootTables(); + npc->SetSp2(found_spawn->SpawnGroupID()); + entity_list.AddNPC(npc); + entity_list.LimitAddNPC(npc); - if (sg->roamdist && sg->roambox[0] && sg->roambox[1] && sg->roambox[2] && sg->roambox[3] && sg->delay && - sg->min_delay) - npc->AI_SetRoambox(sg->roamdist, sg->roambox[0], sg->roambox[1], sg->roambox[2], sg->roambox[3], - sg->delay, sg->min_delay); - if (zone->InstantGrids()) { - found_spawn->LoadGrid(); + if (sg->roamdist && sg->roambox[0] && sg->roambox[1] && sg->roambox[2] && sg->roambox[3] && sg->delay && + sg->min_delay) + npc->AI_SetRoambox(sg->roamdist, sg->roambox[0], sg->roambox[1], sg->roambox[2], sg->roambox[3], + sg->delay, sg->min_delay); + if (zone->InstantGrids()) { + found_spawn->LoadGrid(); } return npc; @@ -1686,7 +1686,7 @@ void QuestManager::respawn(int npcTypeID, int grid) { const NPCType* npcType = nullptr; if ((npcType = database.LoadNPCTypesData(npcTypeID))) { - owner = new NPC(npcType, nullptr, owner->GetPosition(), FlyMode3); + owner = new NPC(npcType, nullptr, owner->GetPosition(), GravityBehavior::Ground); owner->CastToNPC()->AddLootTable(); if (owner->CastToNPC()->DropsGlobalLoot()) owner->CastToNPC()->CheckGlobalLootTables(); @@ -2827,22 +2827,18 @@ bool QuestManager::IsRunning() return owner->IsRunning(); } -void QuestManager::FlyMode(uint8 flymode) +void QuestManager::FlyMode(GravityBehavior flymode) { QuestManagerCurrentQuestVars(); if(initiator) { - if (flymode >= 0 && flymode < 3) { - initiator->SendAppearancePacket(AT_Levitate, flymode); - return; - } + initiator->SendAppearancePacket(AT_Levitate, static_cast(flymode)); + initiator->SetFlyMode(flymode); } - if(owner) + else if(owner) { - if (flymode >= 0 && flymode < 3) { - owner->SendAppearancePacket(AT_Levitate, flymode); - return; - } + owner->SendAppearancePacket(AT_Levitate, static_cast(flymode)); + owner->SetFlyMode(flymode); } } diff --git a/zone/questmgr.h b/zone/questmgr.h index a3b9fac43..d227b27d1 100644 --- a/zone/questmgr.h +++ b/zone/questmgr.h @@ -249,7 +249,7 @@ public: const char* getguildnamebyid(int guild_id); void SetRunning(bool val); bool IsRunning(); - void FlyMode(uint8 flymode); + void FlyMode(GravityBehavior flymode); uint8 FactionValue(); void wearchange(uint8 slot, uint16 texture, uint32 hero_forge_model = 0, uint32 elite_material = 0); void voicetell(const char *str, int macronum, int racenum, int gendernum); diff --git a/zone/spawn2.cpp b/zone/spawn2.cpp index 71101dff8..05e7e7926 100644 --- a/zone/spawn2.cpp +++ b/zone/spawn2.cpp @@ -255,7 +255,7 @@ bool Spawn2::Process() { } currentnpcid = npcid; - NPC *npc = new NPC(tmp, this, glm::vec4(x, y, z, heading), FlyMode3); + NPC *npc = new NPC(tmp, this, glm::vec4(x, y, z, heading), GravityBehavior::Ground); npc->mod_prespawn(this); diff --git a/zone/trap.cpp b/zone/trap.cpp index 687d3ded3..191d80fce 100644 --- a/zone/trap.cpp +++ b/zone/trap.cpp @@ -166,7 +166,7 @@ void Trap::Trigger(Mob* trigger) { auto randomOffset = glm::vec4(zone->random.Int(-5, 5),zone->random.Int(-5, 5),zone->random.Int(-5, 5), zone->random.Int(0, 249)); auto spawnPosition = randomOffset + glm::vec4(m_Position, 0.0f); - auto new_npc = new NPC(tmp, nullptr, spawnPosition, FlyMode3); + auto new_npc = new NPC(tmp, nullptr, spawnPosition, GravityBehavior::Flying); new_npc->AddLootTable(); if (new_npc->DropsGlobalLoot()) new_npc->CheckGlobalLootTables(); @@ -191,7 +191,7 @@ void Trap::Trigger(Mob* trigger) { auto randomOffset = glm::vec4(zone->random.Int(-2, 2), zone->random.Int(-2, 2), zone->random.Int(-2, 2), zone->random.Int(0, 249)); auto spawnPosition = randomOffset + glm::vec4(m_Position, 0.0f); - auto new_npc = new NPC(tmp, nullptr, spawnPosition, FlyMode3); + auto new_npc = new NPC(tmp, nullptr, spawnPosition, GravityBehavior::Flying); new_npc->AddLootTable(); if (new_npc->DropsGlobalLoot()) new_npc->CheckGlobalLootTables(); @@ -469,7 +469,7 @@ void Trap::CreateHiddenTrigger() make_npc->trackable = 0; make_npc->level = level; strcpy(make_npc->special_abilities, "19,1^20,1^24,1^25,1"); - NPC* npca = new NPC(make_npc, nullptr, glm::vec4(m_Position, 0.0f), FlyMode3); + NPC* npca = new NPC(make_npc, nullptr, glm::vec4(m_Position, 0.0f), GravityBehavior::Flying); npca->GiveNPCTypeData(make_npc); entity_list.AddNPC(npca); diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index 74bb57c36..e6fbbef5a 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -30,12 +30,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "quest_parser_collection.h" #include "water_map.h" #include "fastmath.h" +#include "mob_movement_manager.h" #include #include extern FastMath g_Math; -extern uint64_t frame_time; struct wp_distance { @@ -427,11 +427,8 @@ void NPC::SaveGuardSpot(bool iClearGuardSpot) { } void NPC::NextGuardPosition() { - if (!CalculateNewPosition(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z, GetMovespeed())) { - SetHeading(m_GuardPoint.w); - Log(Logs::Detail, Logs::AI, "Unable to move to next guard position. Probably rooted."); - } - else if ((m_Position.x == m_GuardPoint.x) && (m_Position.y == m_GuardPoint.y) && (m_Position.z == m_GuardPoint.z)) + CalculateNewPosition(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z, GetMovespeed()); + if ((m_Position.x == m_GuardPoint.x) && (m_Position.y == m_GuardPoint.y) && (m_Position.z == m_GuardPoint.z)) { if (moved) { @@ -445,102 +442,8 @@ float Mob::CalculateDistance(float x, float y, float z) { return (float)sqrtf(((m_Position.x - x)*(m_Position.x - x)) + ((m_Position.y - y)*(m_Position.y - y)) + ((m_Position.z - z)*(m_Position.z - z))); } -bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, bool check_z, bool calculate_heading) { - if (GetID() == 0) - return true; - - if (speed <= 0) { - SetCurrentSpeed(0); - return true; - } - - bool WaypointChanged = false; - bool NodeReached = false; - glm::vec3 Goal = UpdatePath( - x, y, z, speed, WaypointChanged, NodeReached - ); - - if (WaypointChanged || NodeReached) { - calculate_heading = true; - entity_list.OpenDoorsNear(this); - } - - SetCurrentSpeed(static_cast(speed)); - pRunAnimSpeed = speed; - -#ifdef BOTS - if (IsClient() || IsBot()) -#else - if (IsClient()) -#endif - { - animation = speed * 0.55f; - } - - //Setup Vectors - glm::vec3 tar(Goal.x, Goal.y, Goal.z); - glm::vec3 pos(m_Position.x, m_Position.y, m_Position.z); - double len = glm::distance(pos, tar); - if (len == 0) { - return true; - } - - glm::vec3 dir = tar - pos; - glm::vec3 ndir = glm::normalize(dir); - double time_since_last = static_cast(frame_time) / 1000.0; - double distance_moved = time_since_last * speed * 2.275f; - - if (distance_moved > len) { - m_Position.x = Goal.x; - m_Position.y = Goal.y; - m_Position.z = Goal.z; - - if (IsNPC()) { - entity_list.ProcessMove(CastToNPC(), Goal.x, Goal.y, Goal.z); - } - - if (check_z && fix_z_timer.Check() && (!IsEngaged() || flee_mode || currently_fleeing)) { - FixZ(); - } - - return true; - } - else { - glm::vec3 npos = pos + (ndir * static_cast(distance_moved)); - m_Position.x = npos.x; - m_Position.y = npos.y; - m_Position.z = npos.z; - - if (IsNPC()) { - entity_list.ProcessMove(CastToNPC(), npos.x, npos.y, npos.z); - } - } - - if (calculate_heading) { - m_Position.w = CalculateHeadingToTarget(Goal.x, Goal.y); - } - - if (check_z && fix_z_timer.Check() && !IsEngaged()) { - FixZ(); - } - - SetMoving(true); - m_Delta = glm::vec4(m_Position.x - pos.x, m_Position.y - pos.y, m_Position.z - pos.z, 0.0f); - - if (IsClient()) { - SendPositionUpdate(); - CastToClient()->ResetPositionTimer(); - } - else { - SendPositionUpdate(); - SetAppearance(eaStanding, false); - } - - return true; -} - -bool Mob::CalculateNewPosition(float x, float y, float z, float speed, bool check_z, bool calculate_heading) { - return MakeNewPositionAndSendUpdate(x, y, z, speed, check_z); +void Mob::CalculateNewPosition(float x, float y, float z, float speed, bool check_z, bool calculate_heading) { + mMovementManager->NavigateTo(this, x, y, z, speed); } void NPC::AssignWaypoints(int32 grid) @@ -620,7 +523,7 @@ void Mob::SendTo(float new_x, float new_y, float new_z) { m_Position.z = new_z; Log(Logs::Detail, Logs::AI, "Sent To (%.3f, %.3f, %.3f)", new_x, new_y, new_z); - if (flymode == FlyMode1) + if (flymode == GravityBehavior::Flying) return; //fix up pathing Z, this shouldent be needed IF our waypoints @@ -678,13 +581,10 @@ float Mob::GetFixedZ(glm::vec3 destination, int32 z_find_offset) { if (zone->HasMap() && RuleB(Map, FixZWhenMoving)) { - if (flymode == 1 || flymode == 2) + if (flymode != GravityBehavior::Ground) return new_z; - if (this->IsBoat()) - return new_z; - - if (zone->HasWaterMap() && zone->watermap->InWater(glm::vec3(m_Position))) + if (zone->HasWaterMap() && zone->watermap->InLiquid(glm::vec3(m_Position))) return new_z; /* diff --git a/zone/zone.cpp b/zone/zone.cpp index 2acb0fa6b..1781dd819 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -2258,7 +2258,7 @@ void Zone::DoAdventureActions() const NPCType* tmp = database.LoadNPCTypesData(ds->data_id); if(tmp) { - NPC* npc = new NPC(tmp, nullptr, glm::vec4(ds->assa_x, ds->assa_y, ds->assa_z, ds->assa_h), FlyMode3); + NPC* npc = new NPC(tmp, nullptr, glm::vec4(ds->assa_x, ds->assa_y, ds->assa_z, ds->assa_h), GravityBehavior::Ground); npc->AddLootTable(); if (npc->DropsGlobalLoot()) npc->CheckGlobalLootTables(); From 4815cabb6330e86434c038f4f0860b2d079539d0 Mon Sep 17 00:00:00 2001 From: KimLS Date: Thu, 20 Sep 2018 22:08:35 -0700 Subject: [PATCH 390/670] Some bug fixes --- zone/command.cpp | 1 + zone/mob.h | 5 ++-- zone/mob_movement_manager.cpp | 29 ++++++++++++++++++ zone/mob_movement_manager.h | 1 + zone/pathing.cpp | 56 ++++++++++++----------------------- zone/waypoints.cpp | 7 ++++- 6 files changed, 59 insertions(+), 40 deletions(-) diff --git a/zone/command.cpp b/zone/command.cpp index 9d4604dc2..f57b99613 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -7260,6 +7260,7 @@ void command_pf(Client *c, const Seperator *sep) c->Message(0, "POS: (%.2f, %.2f, %.2f)", who->GetX(), who->GetY(), who->GetZ()); c->Message(0, "WP: %s (%d/%d)", to_string(who->GetCurrentWayPoint()).c_str(), who->IsNPC()?who->CastToNPC()->GetMaxWp():-1); c->Message(0, "pause=%d RAspeed=%d", who->GetCWPP(), who->GetRunAnimSpeed()); + who->DumpMovement(c); } else { c->Message(0, "ERROR: target required"); } diff --git a/zone/mob.h b/zone/mob.h index 82aaa81e4..14cb3c3a6 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -969,7 +969,7 @@ public: inline bool CheckAggro(Mob* other) {return hate_list.IsEntOnHateList(other);} float CalculateHeadingToTarget(float in_x, float in_y) { return HeadingAngleToMob(in_x, in_y); } - virtual void CalculateNewPosition(float x, float y, float z, float speed, bool check_z = true, bool calculate_heading = true); + void CalculateNewPosition(float x, float y, float z, float speed, bool check_z = true, bool calculate_heading = true); float CalculateDistance(float x, float y, float z); float GetGroundZ(float new_x, float new_y, float z_offset=0.0); void SendTo(float new_x, float new_y, float new_z); @@ -978,7 +978,8 @@ public: float GetDefaultRaceSize() const; void TryFixZ(int32 z_find_offset = 5, bool fix_client_z = false); void FixZ(int32 z_find_offset = 5, bool fix_client_z = false); - float GetFixedZ(glm::vec3 destination, int32 z_find_offset = 5); + float GetFixedZ(const glm::vec3 &destination, int32 z_find_offset = 5); + void DumpMovement(Client *to); void NPCSpecialAttacks(const char* parse, int permtag, bool reset = true, bool remove = false); inline uint32 DontHealMeBefore() const { return pDontHealMeBefore; } diff --git a/zone/mob_movement_manager.cpp b/zone/mob_movement_manager.cpp index 2b5821ab0..76f71663b 100644 --- a/zone/mob_movement_manager.cpp +++ b/zone/mob_movement_manager.cpp @@ -185,6 +185,35 @@ void MobMovementManager::StopNavigation(Mob *who) { auto iter = _impl->MoveEntries.find(who); auto &ent = iter->second; ent.active = false; + + SendPosition(who); +} + +void MobMovementManager::Dump(Mob *m, Client *to) +{ + { + auto iter = _impl->Entries.find(m); + auto &ent = iter->second; + + to->Message(0, "Packet: anim=%d, heading=%.2f, dirty=%s, last_sent_time=%.2f, last_sent_time_long_dist=%.2f", + ent.animation, + ent.heading, + ent.dirty ? "true" : "false", + ent.last_sent_time, + ent.last_sent_time_long_distance); + } + + { + auto iter = _impl->MoveEntries.find(m); + auto &ent = iter->second; + + to->Message(0, "Movement: speed=%.2f, x=%.2f, y=%.2f, z=%.2f, active=%s", + ent.speed, + ent.x, + ent.y, + ent.z, + ent.active ? "true" : "false"); + } } bool MobMovementManager::HeadingEqual(float a, float b) diff --git a/zone/mob_movement_manager.h b/zone/mob_movement_manager.h index e45bcec55..2660e4b22 100644 --- a/zone/mob_movement_manager.h +++ b/zone/mob_movement_manager.h @@ -18,6 +18,7 @@ public: void SendPositionUpdate(Mob *who, bool send_to_self); void NavigateTo(Mob *who, float x, float y, float z, float speed); void StopNavigation(Mob *who); + void Dump(Mob *m, Client *to); static MobMovementManager &Get() { static MobMovementManager inst; diff --git a/zone/pathing.cpp b/zone/pathing.cpp index a2885c1f1..f835bfe67 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -7,21 +7,6 @@ extern Zone *zone; -void AdjustRoute(std::list &nodes, int flymode, float offset) { - if (!zone->HasMap() || !zone->HasWaterMap()) { - return; - } - - for (auto &node : nodes) { - if (flymode == GravityBehavior::Ground || !zone->watermap->InLiquid(node.pos)) { - auto best_z = zone->zonemap->FindBestZ(node.pos, nullptr); - if (best_z != BEST_Z_INVALID) { - node.pos.z = best_z + offset; - } - } - } -} - glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &WaypointChanged, bool &NodeReached) { glm::vec3 To(ToX, ToY, ToZ); @@ -42,7 +27,6 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa bool partial = false; bool stuck = false; Route = zone->pathing->FindRoute(From, To, partial, stuck); - AdjustRoute(Route, flymode, GetZOffset()); PathingDestination = To; WaypointChanged = true; @@ -66,7 +50,6 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa bool partial = false; bool stuck = false; Route = zone->pathing->FindRoute(From, To, partial, stuck); - AdjustRoute(Route, flymode, GetZOffset()); PathingDestination = To; WaypointChanged = true; @@ -86,27 +69,27 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa } if (!IsRooted()) { - //bool AtPrevNode = DistanceSquared(From, PathingLastPosition) < 1.0f; - //if (AtPrevNode) { - // PathingLoopCount++; - // auto front = (*Route.begin()).pos; - // - // if (PathingLoopCount > 5) { - // Teleport(front); - // SendPosition(); - // Route.pop_front(); - // - // WaypointChanged = true; - // NodeReached = true; - // PathingLoopCount = 0; - // } - // - // return front; - //} - //else { + bool AtPrevNode = DistanceSquared(From, PathingLastPosition) < 1.0f; + if (AtPrevNode) { + PathingLoopCount++; + auto front = (*Route.begin()).pos; + + if (PathingLoopCount > 5) { + Teleport(front); + SendPosition(); + Route.pop_front(); + + WaypointChanged = true; + NodeReached = true; + PathingLoopCount = 0; + } + + return front; + } + else { PathingLastPosition = From; PathingLoopCount = 0; - //} + } } else { PathingLastPosition = From; @@ -133,7 +116,6 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa bool partial = false; bool stuck = false; Route = zone->pathing->FindRoute(From, To, partial, stuck); - AdjustRoute(Route, flymode, GetZOffset()); PathingDestination = To; WaypointChanged = true; diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index e6fbbef5a..76680e0fb 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -573,7 +573,7 @@ void Mob::SendToFixZ(float new_x, float new_y, float new_z) { } } -float Mob::GetFixedZ(glm::vec3 destination, int32 z_find_offset) { +float Mob::GetFixedZ(const glm::vec3 &destination, int32 z_find_offset) { BenchTimer timer; timer.reset(); @@ -615,6 +615,11 @@ float Mob::GetFixedZ(glm::vec3 destination, int32 z_find_offset) { return new_z; } +void Mob::DumpMovement(Client *to) +{ + mMovementManager->Dump(this, to); +} + void Mob::FixZ(int32 z_find_offset /*= 5*/, bool fix_client_z /*= false*/) { glm::vec3 current_loc(m_Position); From 384c376d317c6dfc223f97448f66a81ffb29e88b Mon Sep 17 00:00:00 2001 From: Uleat Date: Fri, 21 Sep 2018 01:27:30 -0400 Subject: [PATCH 391/670] Added scripting api 'use' notes --- changelog.txt | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/changelog.txt b/changelog.txt index e9623f293..744dcf05e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,54 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 09/18/2018 == +Uleat: Notes for manual conversion of quest script inventory slot values + - You should use reference/lookup values provided by the lua and perl apis to avoid skirting safety checks + and to ensure that the values used are the correct ones for your needs + + [perl api examples] + old: + 1) my $charmitem = $client->GetItemIDAt(0); + 2) for($for_x = 22; $for_x < 30; $for_x++) {...} + 3) for($slot1 = 0; $slot1 <= 30; $slot1++) {...} + + new: + 1) my $charmitem = $client->GetItemIDAt(quest::getinventoryslotid("charm")); + 2) for($for_x = quest::getinventoryslotid("general.begin"); $for_x <= quest::getinventoryslotid("general.end"); $for_x++) {...} ** notice change of conditional + 3) for($slot1 = quest::getinventoryslotid("possessions.begin"); $slot1 <= quest::getinventoryslotid("possessions.end"); $slot1++) {...} + + [lua api examples] + old: + 1) if(e.self:GetItemIDAt(30) == 31599) then ... + 2) for i = 0, 30, 1 do ... + + new: + 1) if(e.self:GetItemIDAt(Slot.Cursor) == 31599) then ... + 2) for i = Slot.PossessionsBegin, Slot.PossessionsEnd, 1 do ... + + - If you need to manually assign bag slot ranges to individual 'general' slots, use this assignment for now: + -- General1 (23) = 251 .. 260 + -- General2 (24) = 261 .. 270 + -- General3 (25) = 271 .. 280 + -- General4 (26) = 281 .. 290 + -- General5 (27) = 291 .. 300 + -- General6 (28) = 301 .. 310 + -- General7 (29) = 311 .. 320 + -- General8 (30) = 321 .. 330 + -- General9 (31) = 331 .. 340 + -- General10 (32) = 341 .. 350 + -- Cursor (33) = 351 .. 360 + + - If you need to manually assign ammo or powersource slots, use these values: + -- PowerSource = 21 + -- Ammo = 22 + + - All slot values not addressed above remain the same + + - Additional information can be found at: + -- https://github.com/EQEmu/Server/wiki/Inventory-Slots + -- https://github.com/EQEmu/Server/wiki/Perl-API + -- https://github.com/EQEmu/Server/wiki/Lua-API + == 09/03/2018 == Uleat: Rework of 'invsnapshot' command and implementation of automatic inventory snapshots. - Inventory snapshots are now taken automatically using the interval rule values - if snapshots are enabled From 1aa97957d891894f8ba49865c12d7ae4dbc6025b Mon Sep 17 00:00:00 2001 From: KimLS Date: Fri, 21 Sep 2018 23:54:07 -0700 Subject: [PATCH 392/670] Renamed function, need to fix bots, some combat bug fixes. --- zone/lua_mob.cpp | 12 +++++-- zone/lua_mob.h | 3 +- zone/merc.cpp | 12 +++---- zone/mob.h | 5 +-- zone/mob_ai.cpp | 60 +++++++++++++++-------------------- zone/mob_movement_manager.cpp | 9 ++---- zone/pathing.cpp | 19 +++++++++++ zone/perl_mob.cpp | 35 +++++++++++++++++--- zone/waypoints.cpp | 8 +++-- 9 files changed, 103 insertions(+), 60 deletions(-) diff --git a/zone/lua_mob.cpp b/zone/lua_mob.cpp index 4a5932db2..67784eb57 100644 --- a/zone/lua_mob.cpp +++ b/zone/lua_mob.cpp @@ -1124,9 +1124,14 @@ double Lua_Mob::CalculateHeadingToTarget(double in_x, double in_y) { return self->CalculateHeadingToTarget(static_cast(in_x), static_cast(in_y)); } -void Lua_Mob::CalculateNewPosition(double x, double y, double z, double speed) { +void Lua_Mob::NavigateTo(double x, double y, double z, double speed) { Lua_Safe_Call_Void(); - self->CalculateNewPosition(static_cast(x), static_cast(y), static_cast(z), static_cast(speed)); + self->NavigateTo(static_cast(x), static_cast(y), static_cast(z), static_cast(speed)); +} + +void Lua_Mob::StopNavigation() { + Lua_Safe_Call_Void(); + self->StopNavigation(); } float Lua_Mob::CalculateDistance(double x, double y, double z) { @@ -2355,7 +2360,8 @@ luabind::scope lua_register_mob() { .def("FaceTarget", (void(Lua_Mob::*)(Lua_Mob))&Lua_Mob::FaceTarget) .def("SetHeading", (void(Lua_Mob::*)(double))&Lua_Mob::SetHeading) .def("CalculateHeadingToTarget", (double(Lua_Mob::*)(double,double))&Lua_Mob::CalculateHeadingToTarget) - .def("CalculateNewPosition", (void(Lua_Mob::*)(double,double,double,double))&Lua_Mob::CalculateNewPosition) + .def("NavigateTo", (void(Lua_Mob::*)(double,double,double,double))&Lua_Mob::NavigateTo) + .def("StopNavigation", (void(Lua_Mob::*)(void))&Lua_Mob::StopNavigation) .def("CalculateDistance", (float(Lua_Mob::*)(double,double,double))&Lua_Mob::CalculateDistance) .def("SendTo", (void(Lua_Mob::*)(double,double,double))&Lua_Mob::SendTo) .def("SendToFixZ", (void(Lua_Mob::*)(double,double,double))&Lua_Mob::SendToFixZ) diff --git a/zone/lua_mob.h b/zone/lua_mob.h index ed3f869ed..7300e3085 100644 --- a/zone/lua_mob.h +++ b/zone/lua_mob.h @@ -240,7 +240,8 @@ public: void FaceTarget(Lua_Mob target); void SetHeading(double in); double CalculateHeadingToTarget(double in_x, double in_y); - void CalculateNewPosition(double x, double y, double z, double speed); + void NavigateTo(double x, double y, double z, double speed); + void StopNavigation(); float CalculateDistance(double x, double y, double z); void SendTo(double x, double y, double z); void SendToFixZ(double x, double y, double z); diff --git a/zone/merc.cpp b/zone/merc.cpp index 09bd78622..2a1e581d9 100644 --- a/zone/merc.cpp +++ b/zone/merc.cpp @@ -1479,7 +1479,7 @@ void Merc::AI_Process() { } else if (!CheckLosFN(GetTarget())) { auto Goal = GetTarget()->GetPosition(); - CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetRunspeed()); + NavigateTo(Goal.x, Goal.y, Goal.z, GetRunspeed()); return; } @@ -1545,7 +1545,7 @@ void Merc::AI_Process() { float newZ = 0; FaceTarget(GetTarget()); if (PlotPositionAroundTarget(this, newX, newY, newZ)) { - CalculateNewPosition(newX, newY, newZ, GetRunspeed()); + NavigateTo(newX, newY, newZ, GetRunspeed()); return; } } @@ -1557,7 +1557,7 @@ void Merc::AI_Process() { float newY = 0; float newZ = 0; if (PlotPositionAroundTarget(GetTarget(), newX, newY, newZ)) { - CalculateNewPosition(newX, newY, newZ, GetRunspeed()); + NavigateTo(newX, newY, newZ, GetRunspeed()); return; } } @@ -1568,7 +1568,7 @@ void Merc::AI_Process() { float newY = 0; float newZ = 0; if (PlotPositionAroundTarget(GetTarget(), newX, newY, newZ, false) && GetArchetype() != ARCHETYPE_CASTER) { - CalculateNewPosition(newX, newY, newZ, GetRunspeed()); + NavigateTo(newX, newY, newZ, GetRunspeed()); return; } } @@ -1695,7 +1695,7 @@ void Merc::AI_Process() { { if(!IsRooted()) { Log(Logs::Detail, Logs::AI, "Pursuing %s while engaged.", GetTarget()->GetCleanName()); - CalculateNewPosition(GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ(), GetRunspeed()); + NavigateTo(GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ(), GetRunspeed()); return; } @@ -1758,7 +1758,7 @@ void Merc::AI_Process() { SetRunAnimSpeed(0); if (dist > GetFollowDistance()) { - CalculateNewPosition(follow->GetX(), follow->GetY(), follow->GetZ(), speed); + NavigateTo(follow->GetX(), follow->GetY(), follow->GetZ(), speed); if (rest_timer.Enabled()) rest_timer.Disable(); diff --git a/zone/mob.h b/zone/mob.h index 14cb3c3a6..d9f180626 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -602,7 +602,7 @@ public: void SetAssistAggro(bool value) { AssistAggro = value; if (PrimaryAggro) AssistAggro = false; } bool HateSummon(); void FaceTarget(Mob* mob_to_face = 0); - void SetHeading(float iHeading) { if(m_Position.w != iHeading) { m_Position.w = iHeading; } } + void SetHeading(float iHeading) { m_Position.w = iHeading; } void WipeHateList(); void AddFeignMemory(Client* attacker); void RemoveFromFeignMemory(Client* attacker); @@ -969,7 +969,8 @@ public: inline bool CheckAggro(Mob* other) {return hate_list.IsEntOnHateList(other);} float CalculateHeadingToTarget(float in_x, float in_y) { return HeadingAngleToMob(in_x, in_y); } - void CalculateNewPosition(float x, float y, float z, float speed, bool check_z = true, bool calculate_heading = true); + void NavigateTo(float x, float y, float z, float speed); + void StopNavigation(); float CalculateDistance(float x, float y, float z); float GetGroundZ(float new_x, float new_y, float z_offset=0.0); void SendTo(float new_x, float new_y, float new_z); diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index b9582d712..9a0ffb8b7 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -801,13 +801,11 @@ void Client::AI_Process() speed *= 2; SetCurrentSpeed(speed); // Check if we have reached the last fear point - if ((std::abs(GetX() - m_FearWalkTarget.x) < 0.1) && - (std::abs(GetY() - m_FearWalkTarget.y) < 0.1)) { - // Calculate a new point to run to + if(IsPositionEqual(GetX(), GetY(), GetZ(), m_FearWalkTarget.x, m_FearWalkTarget.y, m_FearWalkTarget.z)) { CalculateNewFearpoint(); } - CalculateNewPosition(m_FearWalkTarget.x, m_FearWalkTarget.y, m_FearWalkTarget.z, speed, true); + NavigateTo(m_FearWalkTarget.x, m_FearWalkTarget.y, m_FearWalkTarget.z, speed); } return; } @@ -841,6 +839,8 @@ void Client::AI_Process() bool is_combat_range = CombatRange(GetTarget()); if (is_combat_range) { + StopNavigation(); + if (charm_class_attacks_timer.Check()) { DoClassAttacks(GetTarget()); } @@ -877,7 +877,7 @@ void Client::AI_Process() animation = newspeed; newspeed *= 2; SetCurrentSpeed(newspeed); - CalculateNewPosition(GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ(), newspeed); + NavigateTo(GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ(), newspeed); } } else if(IsMoving()) @@ -925,13 +925,10 @@ void Client::AI_Process() nspeed *= 2; SetCurrentSpeed(nspeed); - CalculateNewPosition(owner->GetX(), owner->GetY(), owner->GetZ(), nspeed); + NavigateTo(owner->GetX(), owner->GetY(), owner->GetZ(), nspeed); } } else { - if (moved) { - SetCurrentSpeed(0); - moved = false; - } + StopNavigation(); } } } @@ -1092,17 +1089,15 @@ void Mob::AI_Process() { else { if (AI_movement_timer->Check()) { // Check if we have reached the last fear point - if ((std::abs(GetX() - m_FearWalkTarget.x) < 0.1) && - (std::abs(GetY() - m_FearWalkTarget.y) < 0.1)) { + if (IsPositionEqual(GetX(), GetY(), GetZ(), m_FearWalkTarget.x, m_FearWalkTarget.y, m_FearWalkTarget.z)) { // Calculate a new point to run to CalculateNewFearpoint(); } - CalculateNewPosition( + NavigateTo( m_FearWalkTarget.x, m_FearWalkTarget.y, m_FearWalkTarget.z, - GetFearSpeed(), - true + GetFearSpeed() ); } return; @@ -1218,6 +1213,8 @@ void Mob::AI_Process() { bool is_combat_range = CombatRange(target); if (is_combat_range) { + StopNavigation(); + if (AI_movement_timer->Check()) { if (CalculateHeadingToTarget(GetTarget()->GetX(), GetTarget()->GetY()) != m_Position.w) { SetHeading(CalculateHeadingToTarget(GetTarget()->GetX(), GetTarget()->GetY())); @@ -1422,13 +1419,12 @@ void Mob::AI_Process() { else if (AI_movement_timer->Check() && target) { if (!IsRooted()) { Log(Logs::Detail, Logs::AI, "Pursuing %s while engaged.", target->GetName()); - CalculateNewPosition(target->GetX(), target->GetY(), target->GetZ(), GetRunspeed()); + NavigateTo(target->GetX(), target->GetY(), target->GetZ(), GetRunspeed()); } else if (IsMoving()) { SetHeading(CalculateHeadingToTarget(target->GetX(), target->GetY())); SetCurrentSpeed(0); - } } } @@ -1522,15 +1518,11 @@ void Mob::AI_Process() { auto &Goal = owner->GetPosition(); - CalculateNewPosition(Goal.x, Goal.y, Goal.z, pet_speed, true); + NavigateTo(Goal.x, Goal.y, Goal.z, pet_speed); } } else { - if (moved) { - this->FixZ(); - SetCurrentSpeed(0); - moved = false; - } + StopNavigation(); } break; @@ -1576,7 +1568,7 @@ void Mob::AI_Process() { auto &Goal = follow->GetPosition(); - CalculateNewPosition(Goal.x, Goal.y, Goal.z, speed, true); + NavigateTo(Goal.x, Goal.y, Goal.z, speed); } else { moved = false; @@ -1702,7 +1694,7 @@ void NPC::AI_DoMovement() { roambox_destination_y); } - CalculateNewPosition(roambox_destination_x, roambox_destination_y, roambox_destination_z, move_speed, true); + NavigateTo(roambox_destination_x, roambox_destination_y, roambox_destination_z, move_speed); if (m_Position.x == roambox_destination_x && m_Position.y == roambox_destination_y) { time_until_can_move = Timer::GetCurrentTime() + RandomTimer(roambox_min_delay, roambox_delay); @@ -1766,12 +1758,11 @@ void NPC::AI_DoMovement() { ClearFeignMemory(); } if (doMove) { // not at waypoint yet or at 0 pause WP, so keep moving - CalculateNewPosition( + NavigateTo( m_CurrentWayPoint.x, m_CurrentWayPoint.y, m_CurrentWayPoint.z, - move_speed, - true + move_speed ); } @@ -1790,14 +1781,12 @@ void NPC::AI_DoMovement() { } } - else if (IsGuarding()) { - CalculateNewPosition(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z, move_speed); - - //if(Distance(m_GuardPoint, m_Position)) - - bool at_gp = CalculateDistance(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z) < 0.1f; + else if (IsGuarding()) { + bool at_gp = IsPositionEqual(GetX(), GetY(), GetZ(), m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z); if (at_gp) { + StopNavigation(); + if (moved) { Log(Logs::Detail, Logs::AI, @@ -1818,6 +1807,9 @@ void NPC::AI_DoMovement() { SetAppearance(GetGuardPointAnim()); } } + else { + NavigateTo(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z, move_speed); + } } } diff --git a/zone/mob_movement_manager.cpp b/zone/mob_movement_manager.cpp index 76f71663b..b87e4f740 100644 --- a/zone/mob_movement_manager.cpp +++ b/zone/mob_movement_manager.cpp @@ -124,7 +124,6 @@ void MobMovementManager::RemoveClient(Client *c) ++iter; } - } void MobMovementManager::SendPosition(Mob *who) @@ -327,7 +326,6 @@ void MobMovementManager::ProcessMovement(Mob *who, float x, float y, float z, fl return; } - bool calculate_heading = false; bool WaypointChanged = false; bool NodeReached = false; glm::vec3 Goal = who->UpdatePath( @@ -335,7 +333,6 @@ void MobMovementManager::ProcessMovement(Mob *who, float x, float y, float z, fl ); if (WaypointChanged || NodeReached) { - calculate_heading = true; entity_list.OpenDoorsNear(who); } @@ -374,7 +371,6 @@ void MobMovementManager::ProcessMovement(Mob *who, float x, float y, float z, fl } who->TryFixZ(); - return; } else { @@ -386,9 +382,8 @@ void MobMovementManager::ProcessMovement(Mob *who, float x, float y, float z, fl } } - if (calculate_heading) { - who->SetHeading(who->CalculateHeadingToTarget(Goal.x, Goal.y)); - } + who->SetHeading(who->CalculateHeadingToTarget(Goal.x, Goal.y)); + SendPositionUpdate(who, false); who->TryFixZ(); diff --git a/zone/pathing.cpp b/zone/pathing.cpp index f835bfe67..49e84f72a 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -7,6 +7,21 @@ extern Zone *zone; +void AdjustRoute(std::list &nodes, int flymode, float offset) { + if (!zone->HasMap() || !zone->HasWaterMap()) { + return; + } + + for (auto &node : nodes) { + if (flymode == GravityBehavior::Ground || !zone->watermap->InLiquid(node.pos)) { + auto best_z = zone->zonemap->FindBestZ(node.pos, nullptr); + if (best_z != BEST_Z_INVALID) { + node.pos.z = best_z + offset; + } + } + } +} + glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &WaypointChanged, bool &NodeReached) { glm::vec3 To(ToX, ToY, ToZ); @@ -27,6 +42,7 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa bool partial = false; bool stuck = false; Route = zone->pathing->FindRoute(From, To, partial, stuck); + AdjustRoute(Route, flymode, GetZOffset()); PathingDestination = To; WaypointChanged = true; @@ -50,6 +66,7 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa bool partial = false; bool stuck = false; Route = zone->pathing->FindRoute(From, To, partial, stuck); + AdjustRoute(Route, flymode, GetZOffset()); PathingDestination = To; WaypointChanged = true; @@ -116,6 +133,8 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa bool partial = false; bool stuck = false; Route = zone->pathing->FindRoute(From, To, partial, stuck); + AdjustRoute(Route, flymode, GetZOffset()); + PathingDestination = To; WaypointChanged = true; diff --git a/zone/perl_mob.cpp b/zone/perl_mob.cpp index 2e2c9a6cb..ba0fe9b57 100644 --- a/zone/perl_mob.cpp +++ b/zone/perl_mob.cpp @@ -5526,12 +5526,12 @@ XS(XS_Mob_CalculateHeadingToTarget) { XSRETURN(1); } -XS(XS_Mob_CalculateNewPosition); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_CalculateNewPosition) { +XS(XS_Mob_NavigateTo); /* prototype to pass -Wmissing-prototypes */ +XS(XS_Mob_NavigateTo) { dXSARGS; if (items < 5 || items > 6) Perl_croak(aTHX_ - "Usage: Mob::CalculateNewPosition(THIS, float x, float y, float z, float speed)"); + "Usage: Mob::NavigateTo(THIS, float x, float y, float z, float speed)"); { Mob *THIS; float x = (float) SvNV(ST(1)); @@ -5548,7 +5548,31 @@ XS(XS_Mob_CalculateNewPosition) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - THIS->CalculateNewPosition(x, y, z, speed); + THIS->NavigateTo(x, y, z, speed); + } + XSRETURN_EMPTY; +} + +XS(XS_Mob_StopNavigation); /* prototype to pass -Wmissing-prototypes */ +XS(XS_Mob_StopNavigation) { + dXSARGS; + if (items < 5 || items > 6) + Perl_croak(aTHX_ + "Usage: Mob::StopNavigation(THIS)"); + { + Mob *THIS; + + if (sv_derived_from(ST(0), "Mob")) { + IV tmp = SvIV((SV *)SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } + else + Perl_croak(aTHX_ "THIS is not of type Mob"); + if (THIS == nullptr) + Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); + + + THIS->StopNavigation(); } XSRETURN_EMPTY; } @@ -8687,7 +8711,8 @@ XS(boot_Mob) { newXSproto(strcpy(buf, "WipeHateList"), XS_Mob_WipeHateList, file, "$"); newXSproto(strcpy(buf, "CheckAggro"), XS_Mob_CheckAggro, file, "$$"); newXSproto(strcpy(buf, "CalculateHeadingToTarget"), XS_Mob_CalculateHeadingToTarget, file, "$$$"); - newXSproto(strcpy(buf, "CalculateNewPosition"), XS_Mob_CalculateNewPosition, file, "$$$$$"); + newXSproto(strcpy(buf, "NavigateTo"), XS_Mob_NavigateTo, file, "$$$$$"); + newXSproto(strcpy(buf, "StopNavigation"), XS_Mob_StopNavigation, file, "$"); newXSproto(strcpy(buf, "CalculateDistance"), XS_Mob_CalculateDistance, file, "$$$$"); newXSproto(strcpy(buf, "SendTo"), XS_Mob_SendTo, file, "$$$$"); newXSproto(strcpy(buf, "SendToFixZ"), XS_Mob_SendToFixZ, file, "$$$$"); diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index 76680e0fb..2295cfd08 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -427,7 +427,7 @@ void NPC::SaveGuardSpot(bool iClearGuardSpot) { } void NPC::NextGuardPosition() { - CalculateNewPosition(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z, GetMovespeed()); + NavigateTo(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z, GetMovespeed()); if ((m_Position.x == m_GuardPoint.x) && (m_Position.y == m_GuardPoint.y) && (m_Position.z == m_GuardPoint.z)) { if (moved) @@ -442,10 +442,14 @@ float Mob::CalculateDistance(float x, float y, float z) { return (float)sqrtf(((m_Position.x - x)*(m_Position.x - x)) + ((m_Position.y - y)*(m_Position.y - y)) + ((m_Position.z - z)*(m_Position.z - z))); } -void Mob::CalculateNewPosition(float x, float y, float z, float speed, bool check_z, bool calculate_heading) { +void Mob::NavigateTo(float x, float y, float z, float speed) { mMovementManager->NavigateTo(this, x, y, z, speed); } +void Mob::StopNavigation() { + mMovementManager->StopNavigation(this); +} + void NPC::AssignWaypoints(int32 grid) { if (grid == 0) From 29ea65a71e0956d1102b7cfb0d44799a508aa284 Mon Sep 17 00:00:00 2001 From: KimLS Date: Mon, 24 Sep 2018 22:41:53 -0700 Subject: [PATCH 393/670] Redoing movement to introduce proper rotation --- common/features.h | 2 +- zone/client.cpp | 333 ---------------------- zone/client.h | 25 -- zone/client_packet.cpp | 290 +++---------------- zone/client_process.cpp | 29 -- zone/command.cpp | 61 +++- zone/command.h | 1 + zone/entity.cpp | 50 ---- zone/entity.h | 1 - zone/mob.cpp | 36 +-- zone/mob.h | 10 +- zone/mob_ai.cpp | 162 +++++------ zone/mob_movement_manager.cpp | 510 +++++++++++++--------------------- zone/mob_movement_manager.h | 21 +- zone/net.cpp | 6 +- zone/pathfinder_nav_mesh.cpp | 4 +- zone/pathing.cpp | 2 +- zone/perl_mob.cpp | 51 ---- zone/questmgr.cpp | 6 +- zone/special_attacks.cpp | 4 +- zone/spell_effects.cpp | 59 ---- zone/spells.cpp | 48 +--- zone/waypoints.cpp | 9 +- zone/zone.cpp | 3 +- zone/zoning.cpp | 11 +- 25 files changed, 423 insertions(+), 1311 deletions(-) diff --git a/common/features.h b/common/features.h index a80fb9f3c..0fce08c96 100644 --- a/common/features.h +++ b/common/features.h @@ -150,7 +150,7 @@ enum { //reuse times enum { //timer settings, all in milliseconds AImovement_duration = 100, - AIthink_duration = 150, + AIthink_duration = 50, AIscanarea_delay = 6000, AIfeignremember_delay = 500, AItarget_check_duration = 500, diff --git a/zone/client.cpp b/zone/client.cpp index 0bc42f8b0..2448897f9 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -119,7 +119,6 @@ Client::Client(EQStreamInterface* ieqs) 0, 0 ), - position_timer(250), hpupdate_timer(2000), camp_timer(29000), process_timer(100), @@ -221,7 +220,6 @@ Client::Client(EQStreamInterface* ieqs) npcflag = false; npclevel = 0; pQueuedSaveWorkID = 0; - position_timer_counter = 0; position_update_same_count = 0; fishing_timer.Disable(); shield_timer.Disable(); @@ -278,14 +276,6 @@ Client::Client(EQStreamInterface* ieqs) XPRate = 100; current_endurance = 0; - m_TimeSinceLastPositionCheck = 0; - m_DistanceSinceLastPositionCheck = 0.0f; - m_ShadowStepExemption = 0; - m_KnockBackExemption = 0; - m_PortExemption = 0; - m_SenseExemption = 0; - m_AssistExemption = 0; - m_CheatDetectMoved = false; CanUseReport = true; aa_los_them_mob = nullptr; los_status = false; @@ -5282,177 +5272,6 @@ void Client::ShowSkillsWindow() this->SendPopupToClient(WindowTitle, WindowText.c_str()); } -void Client::SetShadowStepExemption(bool v) -{ - if(v == true) - { - uint32 cur_time = Timer::GetCurrentTime(); - if((cur_time - m_TimeSinceLastPositionCheck) > 1000) - { - float speed = (m_DistanceSinceLastPositionCheck * 100) / (float)(cur_time - m_TimeSinceLastPositionCheck); - int runs = GetRunspeed(); - if(speed > (runs * RuleR(Zone, MQWarpDetectionDistanceFactor))) - { - printf("%s %i moving too fast! moved: %.2f in %ims, speed %.2f\n", __FILE__, __LINE__, - m_DistanceSinceLastPositionCheck, (cur_time - m_TimeSinceLastPositionCheck), speed); - if(!GetGMSpeed() && (runs >= GetBaseRunspeed() || (speed > (GetBaseRunspeed() * RuleR(Zone, MQWarpDetectionDistanceFactor))))) - { - if(IsShadowStepExempted()) - { - if(m_DistanceSinceLastPositionCheck > 800) - { - CheatDetected(MQWarpShadowStep, GetX(), GetY(), GetZ()); - } - } - else if(IsKnockBackExempted()) - { - //still potential to trigger this if you're knocked back off a - //HUGE fall that takes > 2.5 seconds - if(speed > 30.0f) - { - CheatDetected(MQWarpKnockBack, GetX(), GetY(), GetZ()); - } - } - else if(!IsPortExempted()) - { - if(!IsMQExemptedArea(zone->GetZoneID(), GetX(), GetY(), GetZ())) - { - if(speed > (runs * 2 * RuleR(Zone, MQWarpDetectionDistanceFactor))) - { - CheatDetected(MQWarp, GetX(), GetY(), GetZ()); - m_TimeSinceLastPositionCheck = cur_time; - m_DistanceSinceLastPositionCheck = 0.0f; - //Death(this, 10000000, SPELL_UNKNOWN, _1H_BLUNT); - } - else - { - CheatDetected(MQWarpLight, GetX(), GetY(), GetZ()); - } - } - } - } - } - } - m_TimeSinceLastPositionCheck = cur_time; - m_DistanceSinceLastPositionCheck = 0.0f; - } - m_ShadowStepExemption = v; -} - -void Client::SetKnockBackExemption(bool v) -{ - if(v == true) - { - uint32 cur_time = Timer::GetCurrentTime(); - if((cur_time - m_TimeSinceLastPositionCheck) > 1000) - { - float speed = (m_DistanceSinceLastPositionCheck * 100) / (float)(cur_time - m_TimeSinceLastPositionCheck); - int runs = GetRunspeed(); - if(speed > (runs * RuleR(Zone, MQWarpDetectionDistanceFactor))) - { - if(!GetGMSpeed() && (runs >= GetBaseRunspeed() || (speed > (GetBaseRunspeed() * RuleR(Zone, MQWarpDetectionDistanceFactor))))) - { - printf("%s %i moving too fast! moved: %.2f in %ims, speed %.2f\n", __FILE__, __LINE__, - m_DistanceSinceLastPositionCheck, (cur_time - m_TimeSinceLastPositionCheck), speed); - if(IsShadowStepExempted()) - { - if(m_DistanceSinceLastPositionCheck > 800) - { - CheatDetected(MQWarpShadowStep, GetX(), GetY(), GetZ()); - } - } - else if(IsKnockBackExempted()) - { - //still potential to trigger this if you're knocked back off a - //HUGE fall that takes > 2.5 seconds - if(speed > 30.0f) - { - CheatDetected(MQWarpKnockBack, GetX(), GetY(), GetZ()); - } - } - else if(!IsPortExempted()) - { - if(!IsMQExemptedArea(zone->GetZoneID(), GetX(), GetY(), GetZ())) - { - if(speed > (runs * 2 * RuleR(Zone, MQWarpDetectionDistanceFactor))) - { - m_TimeSinceLastPositionCheck = cur_time; - m_DistanceSinceLastPositionCheck = 0.0f; - CheatDetected(MQWarp, GetX(), GetY(), GetZ()); - //Death(this, 10000000, SPELL_UNKNOWN, _1H_BLUNT); - } - else - { - CheatDetected(MQWarpLight, GetX(), GetY(), GetZ()); - } - } - } - } - } - } - m_TimeSinceLastPositionCheck = cur_time; - m_DistanceSinceLastPositionCheck = 0.0f; - } - m_KnockBackExemption = v; -} - -void Client::SetPortExemption(bool v) -{ - if(v == true) - { - uint32 cur_time = Timer::GetCurrentTime(); - if((cur_time - m_TimeSinceLastPositionCheck) > 1000) - { - float speed = (m_DistanceSinceLastPositionCheck * 100) / (float)(cur_time - m_TimeSinceLastPositionCheck); - int runs = GetRunspeed(); - if(speed > (runs * RuleR(Zone, MQWarpDetectionDistanceFactor))) - { - if(!GetGMSpeed() && (runs >= GetBaseRunspeed() || (speed > (GetBaseRunspeed() * RuleR(Zone, MQWarpDetectionDistanceFactor))))) - { - printf("%s %i moving too fast! moved: %.2f in %ims, speed %.2f\n", __FILE__, __LINE__, - m_DistanceSinceLastPositionCheck, (cur_time - m_TimeSinceLastPositionCheck), speed); - if(IsShadowStepExempted()) - { - if(m_DistanceSinceLastPositionCheck > 800) - { - CheatDetected(MQWarpShadowStep, GetX(), GetY(), GetZ()); - } - } - else if(IsKnockBackExempted()) - { - //still potential to trigger this if you're knocked back off a - //HUGE fall that takes > 2.5 seconds - if(speed > 30.0f) - { - CheatDetected(MQWarpKnockBack, GetX(), GetY(), GetZ()); - } - } - else if(!IsPortExempted()) - { - if(!IsMQExemptedArea(zone->GetZoneID(), GetX(), GetY(), GetZ())) - { - if(speed > (runs * 2 * RuleR(Zone, MQWarpDetectionDistanceFactor))) - { - m_TimeSinceLastPositionCheck = cur_time; - m_DistanceSinceLastPositionCheck = 0.0f; - CheatDetected(MQWarp, GetX(), GetY(), GetZ()); - //Death(this, 10000000, SPELL_UNKNOWN, _1H_BLUNT); - } - else - { - CheatDetected(MQWarpLight, GetX(), GetY(), GetZ()); - } - } - } - } - } - } - m_TimeSinceLastPositionCheck = cur_time; - m_DistanceSinceLastPositionCheck = 0.0f; - } - m_PortExemption = v; -} - void Client::Signal(uint32 data) { char buf[32]; @@ -5461,158 +5280,6 @@ void Client::Signal(uint32 data) parse->EventPlayer(EVENT_SIGNAL, this, buf, 0); } -const bool Client::IsMQExemptedArea(uint32 zoneID, float x, float y, float z) const -{ - float max_dist = 90000; - switch(zoneID) - { - case 2: - { - float delta = (x-(-713.6)); - delta *= delta; - float distance = delta; - delta = (y-(-160.2)); - delta *= delta; - distance += delta; - delta = (z-(-12.8)); - delta *= delta; - distance += delta; - - if(distance < max_dist) - return true; - - delta = (x-(-153.8)); - delta *= delta; - distance = delta; - delta = (y-(-30.3)); - delta *= delta; - distance += delta; - delta = (z-(8.2)); - delta *= delta; - distance += delta; - - if(distance < max_dist) - return true; - - break; - } - case 9: - { - float delta = (x-(-682.5)); - delta *= delta; - float distance = delta; - delta = (y-(147.0)); - delta *= delta; - distance += delta; - delta = (z-(-9.9)); - delta *= delta; - distance += delta; - - if(distance < max_dist) - return true; - - delta = (x-(-655.4)); - delta *= delta; - distance = delta; - delta = (y-(10.5)); - delta *= delta; - distance += delta; - delta = (z-(-51.8)); - delta *= delta; - distance += delta; - - if(distance < max_dist) - return true; - - break; - } - case 62: - case 75: - case 114: - case 209: - { - //The portals are so common in paineel/felwitheb that checking - //distances wouldn't be worth it cause unless you're porting to the - //start field you're going to be triggering this and that's a level of - //accuracy I'm willing to sacrifice - return true; - break; - } - - case 24: - { - float delta = (x-(-183.0)); - delta *= delta; - float distance = delta; - delta = (y-(-773.3)); - delta *= delta; - distance += delta; - delta = (z-(54.1)); - delta *= delta; - distance += delta; - - if(distance < max_dist) - return true; - - delta = (x-(-8.8)); - delta *= delta; - distance = delta; - delta = (y-(-394.1)); - delta *= delta; - distance += delta; - delta = (z-(41.1)); - delta *= delta; - distance += delta; - - if(distance < max_dist) - return true; - - delta = (x-(-310.3)); - delta *= delta; - distance = delta; - delta = (y-(-1411.6)); - delta *= delta; - distance += delta; - delta = (z-(-42.8)); - delta *= delta; - distance += delta; - - if(distance < max_dist) - return true; - - delta = (x-(-183.1)); - delta *= delta; - distance = delta; - delta = (y-(-1409.8)); - delta *= delta; - distance += delta; - delta = (z-(37.1)); - delta *= delta; - distance += delta; - - if(distance < max_dist) - return true; - - break; - } - - case 110: - case 34: - case 96: - case 93: - case 68: - case 84: - { - if(GetBoatID() != 0) - return true; - break; - } - default: - break; - } - return false; -} - void Client::SendRewards() { std::vector rewards; diff --git a/zone/client.h b/zone/client.h index b0c65e6e2..6279fba56 100644 --- a/zone/client.h +++ b/zone/client.h @@ -959,23 +959,7 @@ public: void SendRules(Client* client); std::list consent_list; - //Anti-Cheat Stuff - uint32 m_TimeSinceLastPositionCheck; - float m_DistanceSinceLastPositionCheck; - bool m_CheatDetectMoved; - void SetShadowStepExemption(bool v); - void SetKnockBackExemption(bool v); - void SetPortExemption(bool v); - void SetSenseExemption(bool v) { m_SenseExemption = v; } - void SetAssistExemption(bool v) { m_AssistExemption = v; } - const bool IsShadowStepExempted() const { return m_ShadowStepExemption; } - const bool IsKnockBackExempted() const { return m_KnockBackExemption; } - const bool IsPortExempted() const { return m_PortExemption; } - const bool IsSenseExempted() const { return m_SenseExemption; } - const bool IsAssistExempted() const { return m_AssistExemption; } const bool GetGMSpeed() const { return (gmspeed > 0); } - void CheatDetected(CheatTypes CheatType, float x, float y, float z); - const bool IsMQExemptedArea(uint32 zoneID, float x, float y, float z) const; bool CanUseReport; //This is used to later set the buff duration of the spell, in slot to duration. @@ -1153,7 +1137,6 @@ public: inline bool IsDraggingCorpse() { return (DraggedCorpses.size() > 0); } void DragCorpses(); inline void ClearDraggedCorpses() { DraggedCorpses.clear(); } - inline void ResetPositionTimer() { position_timer_counter = 0; } void SendAltCurrencies(); void SetAlternateCurrencyValue(uint32 currency_id, uint32 new_amount); void AddAlternateCurrencyValue(uint32 currency_id, int32 amount, int8 method = 0); @@ -1497,9 +1480,6 @@ private: WaterRegionType last_region_type; - Timer position_timer; - uint8 position_timer_counter; - // this is used to try to cut back on position update reflections int position_update_same_count; @@ -1582,11 +1562,6 @@ private: int XPRate; - bool m_ShadowStepExemption; - bool m_KnockBackExemption; - bool m_PortExemption; - bool m_SenseExemption; - bool m_AssistExemption; bool alternate_currency_loaded; std::map alternate_currency; std::queue> alternate_currency_queued_operations; diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 3b954419a..0cd405765 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -505,7 +505,6 @@ void Client::CompleteConnect() client_state = CLIENT_CONNECTED; SendAllPackets(); hpupdate_timer.Start(); - position_timer.Start(); autosave_timer.Start(); SetDuelTarget(0); SetDueling(false); @@ -895,108 +894,6 @@ void Client::CompleteConnect() worldserver.RequestTellQueue(GetName()); } -void Client::CheatDetected(CheatTypes CheatType, float x, float y, float z) -{ - //ToDo: Break warp down for special zones. Some zones have special teleportation pads or bad .map files which can trigger the detector without a legit zone request. - - switch (CheatType) - { - case MQWarp: //Some zones may still have issues. Database updates will eliminate most if not all problems. - if (RuleB(Zone, EnableMQWarpDetector) - && ((this->Admin() < RuleI(Zone, MQWarpExemptStatus) - || (RuleI(Zone, MQWarpExemptStatus)) == -1))) - { - Message(13, "Large warp detected."); - char hString[250]; - sprintf(hString, "/MQWarp with location %.2f, %.2f, %.2f", GetX(), GetY(), GetZ()); - database.SetMQDetectionFlag(this->account_name, this->name, hString, zone->GetShortName()); - } - break; - case MQWarpShadowStep: - if (RuleB(Zone, EnableMQWarpDetector) - && ((this->Admin() < RuleI(Zone, MQWarpExemptStatus) - || (RuleI(Zone, MQWarpExemptStatus)) == -1))) - { - char *hString = nullptr; - MakeAnyLenString(&hString, "/MQWarp(SS) with location %.2f, %.2f, %.2f, the target was shadow step exempt but we still found this suspicious.", GetX(), GetY(), GetZ()); - database.SetMQDetectionFlag(this->account_name, this->name, hString, zone->GetShortName()); - safe_delete_array(hString); - } - break; - case MQWarpKnockBack: - if (RuleB(Zone, EnableMQWarpDetector) - && ((this->Admin() < RuleI(Zone, MQWarpExemptStatus) - || (RuleI(Zone, MQWarpExemptStatus)) == -1))) - { - char *hString = nullptr; - MakeAnyLenString(&hString, "/MQWarp(KB) with location %.2f, %.2f, %.2f, the target was Knock Back exempt but we still found this suspicious.", GetX(), GetY(), GetZ()); - database.SetMQDetectionFlag(this->account_name, this->name, hString, zone->GetShortName()); - safe_delete_array(hString); - } - break; - - case MQWarpLight: - if (RuleB(Zone, EnableMQWarpDetector) - && ((this->Admin() < RuleI(Zone, MQWarpExemptStatus) - || (RuleI(Zone, MQWarpExemptStatus)) == -1))) - { - if (RuleB(Zone, MarkMQWarpLT)) - { - char *hString = nullptr; - MakeAnyLenString(&hString, "/MQWarp(LT) with location %.2f, %.2f, %.2f, running fast but not fast enough to get killed, possibly: small warp, speed hack, excessive lag, marked as suspicious.", GetX(), GetY(), GetZ()); - database.SetMQDetectionFlag(this->account_name, this->name, hString, zone->GetShortName()); - safe_delete_array(hString); - } - } - break; - - case MQZone: - if (RuleB(Zone, EnableMQZoneDetector) && ((this->Admin() < RuleI(Zone, MQZoneExemptStatus) || (RuleI(Zone, MQZoneExemptStatus)) == -1))) - { - char hString[250]; - sprintf(hString, "/MQZone used at %.2f, %.2f, %.2f to %.2f %.2f %.2f", GetX(), GetY(), GetZ(), x, y, z); - database.SetMQDetectionFlag(this->account_name, this->name, hString, zone->GetShortName()); - } - break; - case MQZoneUnknownDest: - if (RuleB(Zone, EnableMQZoneDetector) && ((this->Admin() < RuleI(Zone, MQZoneExemptStatus) || (RuleI(Zone, MQZoneExemptStatus)) == -1))) - { - char hString[250]; - sprintf(hString, "/MQZone used at %.2f, %.2f, %.2f", GetX(), GetY(), GetZ()); - database.SetMQDetectionFlag(this->account_name, this->name, hString, zone->GetShortName()); - } - break; - case MQGate: - if (RuleB(Zone, EnableMQGateDetector) && ((this->Admin() < RuleI(Zone, MQGateExemptStatus) || (RuleI(Zone, MQGateExemptStatus)) == -1))) { - Message(13, "Illegal gate request."); - char hString[250]; - sprintf(hString, "/MQGate used at %.2f, %.2f, %.2f", GetX(), GetY(), GetZ()); - database.SetMQDetectionFlag(this->account_name, this->name, hString, zone->GetShortName()); - if (zone) - { - this->SetZone(this->GetZoneID(), zone->GetInstanceID()); //Prevent the player from zoning, place him back in the zone where he tried to originally /gate. - } - else - { - this->SetZone(this->GetZoneID(), 0); //Prevent the player from zoning, place him back in the zone where he tried to originally /gate. - - } - } - break; - case MQGhost: //Not currently implemented, but the framework is in place - just needs detection scenarios identified - if (RuleB(Zone, EnableMQGhostDetector) && ((this->Admin() < RuleI(Zone, MQGhostExemptStatus) || (RuleI(Zone, MQGhostExemptStatus)) == -1))) { - database.SetMQDetectionFlag(this->account_name, this->name, "/MQGhost", zone->GetShortName()); - } - break; - default: - char *hString = nullptr; - MakeAnyLenString(&hString, "Unhandled HackerDetection flag with location %.2f, %.2f, %.2f.", GetX(), GetY(), GetZ()); - database.SetMQDetectionFlag(this->account_name, this->name, hString, zone->GetShortName()); - safe_delete_array(hString); - break; - } -} - // connecting opcode handlers /* void Client::Handle_Connect_0x3e33(const EQApplicationPacket *app) @@ -2948,7 +2845,6 @@ void Client::Handle_OP_Assist(const EQApplicationPacket *app) Mob *new_target = assistee->GetTarget(); if (new_target && (GetGM() || Distance(m_Position, assistee->GetPosition()) <= TARGETING_RANGE)) { - SetAssistExemption(true); eid->entity_id = new_target->GetID(); } else { eid->entity_id = 0; @@ -3920,6 +3816,8 @@ void Client::Handle_OP_BoardBoat(const EQApplicationPacket *app) return; controlling_boat_id = boat->GetID(); // set the client's BoatID to show that it's on this boat + Message(0, "Board boat: %s", boatname); + return; } @@ -4427,9 +4325,9 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) { sizeof(PlayerPositionUpdateClient_Struct), app->size); return; } - + PlayerPositionUpdateClient_Struct *ppu = (PlayerPositionUpdateClient_Struct *) app->pBuffer; - + /* Boat handling */ if (ppu->spawn_id != GetID()) { /* If player is controlling boat */ @@ -4439,163 +4337,67 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) { controlling_boat_id = 0; return; } - + auto boat_delta = glm::vec4(ppu->delta_x, ppu->delta_y, ppu->delta_z, EQ10toFloat(ppu->delta_heading)); boat->SetDelta(boat_delta); - + auto outapp = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); PlayerPositionUpdateServer_Struct *ppus = (PlayerPositionUpdateServer_Struct *) outapp->pBuffer; boat->MakeSpawnUpdate(ppus); entity_list.QueueCloseClients(boat, outapp, true, 300, this, false); safe_delete(outapp); - + /* Update the boat's position on the server, without sending an update */ boat->GMMove(ppu->x_pos, ppu->y_pos, ppu->z_pos, EQ12toFloat(ppu->heading), false); return; } else return; } - - float dist = 0; - float tmp; - tmp = m_Position.x - ppu->x_pos; - dist += tmp * tmp; - tmp = m_Position.y - ppu->y_pos; - dist += tmp * tmp; - dist = sqrt(dist); - - /* Hack checks */ - if (dist == 0) { - if (m_DistanceSinceLastPositionCheck > 0.0) { - uint32 cur_time = Timer::GetCurrentTime(); - if ((cur_time - m_TimeSinceLastPositionCheck) > 0) { - float speed = - (m_DistanceSinceLastPositionCheck * 100) / (float) (cur_time - m_TimeSinceLastPositionCheck); - int runs = GetRunspeed(); - if (speed > (runs * RuleR(Zone, MQWarpDetectionDistanceFactor))) { - if (!GetGMSpeed() && (runs >= GetBaseRunspeed() || - (speed > (GetBaseRunspeed() * RuleR(Zone, MQWarpDetectionDistanceFactor))))) { - if (IsShadowStepExempted()) { - if (m_DistanceSinceLastPositionCheck > 800) { - CheatDetected(MQWarpShadowStep, ppu->x_pos, ppu->y_pos, ppu->z_pos); - } - } else if (IsKnockBackExempted()) { - if (speed > 30.0f) { - CheatDetected(MQWarpKnockBack, ppu->x_pos, ppu->y_pos, ppu->z_pos); - } - } else if (!IsPortExempted()) { - if (!IsMQExemptedArea(zone->GetZoneID(), ppu->x_pos, ppu->y_pos, ppu->z_pos)) { - if (speed > (runs * 2 * RuleR(Zone, MQWarpDetectionDistanceFactor))) { - m_TimeSinceLastPositionCheck = cur_time; - m_DistanceSinceLastPositionCheck = 0.0f; - CheatDetected(MQWarp, ppu->x_pos, ppu->y_pos, ppu->z_pos); - //Death(this, 10000000, SPELL_UNKNOWN, _1H_BLUNT); - } else { - CheatDetected(MQWarpLight, ppu->x_pos, ppu->y_pos, ppu->z_pos); - } - } - } - } - } - SetShadowStepExemption(false); - SetKnockBackExemption(false); - SetPortExemption(false); - m_TimeSinceLastPositionCheck = cur_time; - m_DistanceSinceLastPositionCheck = 0.0f; - m_CheatDetectMoved = false; - } - } else { - m_TimeSinceLastPositionCheck = Timer::GetCurrentTime(); - m_CheatDetectMoved = false; - } - } else { - m_DistanceSinceLastPositionCheck += dist; - m_CheatDetectMoved = true; - if (m_TimeSinceLastPositionCheck == 0) { - m_TimeSinceLastPositionCheck = Timer::GetCurrentTime(); - } else { - uint32 cur_time = Timer::GetCurrentTime(); - if ((cur_time - m_TimeSinceLastPositionCheck) > 2500) { - float speed = - (m_DistanceSinceLastPositionCheck * 100) / (float) (cur_time - m_TimeSinceLastPositionCheck); - int runs = GetRunspeed(); - if (speed > (runs * RuleR(Zone, MQWarpDetectionDistanceFactor))) { - if (!GetGMSpeed() && (runs >= GetBaseRunspeed() || - (speed > (GetBaseRunspeed() * RuleR(Zone, MQWarpDetectionDistanceFactor))))) { - if (IsShadowStepExempted()) { - if (m_DistanceSinceLastPositionCheck > 800) { - CheatDetected(MQWarpShadowStep, ppu->x_pos, ppu->y_pos, ppu->z_pos); - } - } else if (IsKnockBackExempted()) { - if (speed > 30.0f) { - CheatDetected(MQWarpKnockBack, ppu->x_pos, ppu->y_pos, ppu->z_pos); - } - } else if (!IsPortExempted()) { - if (!IsMQExemptedArea(zone->GetZoneID(), ppu->x_pos, ppu->y_pos, ppu->z_pos)) { - if (speed > (runs * 2 * RuleR(Zone, MQWarpDetectionDistanceFactor))) { - m_TimeSinceLastPositionCheck = cur_time; - m_DistanceSinceLastPositionCheck = 0.0f; - CheatDetected(MQWarp, ppu->x_pos, ppu->y_pos, ppu->z_pos); - } else { - CheatDetected(MQWarpLight, ppu->x_pos, ppu->y_pos, ppu->z_pos); - } - } - } - } - } - SetShadowStepExemption(false); - SetKnockBackExemption(false); - SetPortExemption(false); - m_TimeSinceLastPositionCheck = cur_time; - m_DistanceSinceLastPositionCheck = 0.0f; - } - } - - if (IsDraggingCorpse()) - DragCorpses(); - } + + if (IsDraggingCorpse()) + DragCorpses(); /* Check to see if PPU should trigger an update to the rewind position. */ float rewind_x_diff = 0; float rewind_y_diff = 0; - + rewind_x_diff = ppu->x_pos - m_RewindLocation.x; rewind_x_diff *= rewind_x_diff; rewind_y_diff = ppu->y_pos - m_RewindLocation.y; rewind_y_diff *= rewind_y_diff; - + /* We only need to store updated values if the player has moved. If the player has moved more than units for x or y, then we'll store his pre-PPU x and y for /rewind, in case he gets stuck. */ - + if ((rewind_x_diff > 750) || (rewind_y_diff > 750)) m_RewindLocation = glm::vec3(m_Position); - + /* If the PPU was a large jump, such as a cross zone gate or Call of Hero, just update rewind coordinates to the new ppu coordinates. This will prevent exploitation. */ - + if ((rewind_x_diff > 5000) || (rewind_y_diff > 5000)) m_RewindLocation = glm::vec3(ppu->x_pos, ppu->y_pos, ppu->z_pos); - + if (proximity_timer.Check()) { entity_list.ProcessMove(this, glm::vec3(ppu->x_pos, ppu->y_pos, ppu->z_pos)); if (RuleB(TaskSystem, EnableTaskSystem) && RuleB(TaskSystem, EnableTaskProximity)) ProcessTaskProximities(ppu->x_pos, ppu->y_pos, ppu->z_pos); - + m_Proximity = glm::vec3(ppu->x_pos, ppu->y_pos, ppu->z_pos); } - + /* Update internal state */ m_Delta = glm::vec4(ppu->delta_x, ppu->delta_y, ppu->delta_z, EQ10toFloat(ppu->delta_heading)); - + if (IsTracking() && ((m_Position.x != ppu->x_pos) || (m_Position.y != ppu->y_pos))) { if (zone->random.Real(0, 100) < 70)//should be good CheckIncreaseSkill(EQEmu::skills::SkillTracking, nullptr, -20); } - + /* Break Hide if moving without sneaking and set rewind timer if moved */ if (ppu->y_pos != m_Position.y || ppu->x_pos != m_Position.x) { if ((hidden || improved_hidden) && !sneaking) { @@ -4614,17 +4416,17 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) { } rewind_timer.Start(30000, true); } - + /* Handle client aggro scanning timers NPCs */ is_client_moving = (ppu->y_pos == m_Position.y && ppu->x_pos == m_Position.x) ? false : true; - + if (is_client_moving) { Log(Logs::Detail, Logs::Normal, "ClientUpdate: Client is moving - scan timer is: %u", client_scan_npc_aggro_timer.GetDuration()); if (client_scan_npc_aggro_timer.GetDuration() > 1000) { client_scan_npc_aggro_timer.Disable(); client_scan_npc_aggro_timer.Start(500); - + } } else { Log(Logs::Detail, Logs::Normal, "ClientUpdate: Client is NOT moving - scan timer is: %u", @@ -4634,15 +4436,15 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) { client_scan_npc_aggro_timer.Start(3000); } } - + float new_heading = EQ12toFloat(ppu->heading); int32 new_animation = ppu->animation; - + /* Update internal server position from what the client has sent */ m_Position.x = ppu->x_pos; m_Position.y = ppu->y_pos; m_Position.z = ppu->z_pos; - + /* Visual Debugging */ if (RuleB(Character, OPClientUpdateVisualDebug)) { Log(Logs::General, Logs::Debug, "ClientUpdate: ppu x: %f y: %f z: %f h: %u", ppu->x_pos, ppu->y_pos, ppu->z_pos, @@ -4650,43 +4452,43 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) { this->SendAppearanceEffect(78, 0, 0, 0, 0); this->SendAppearanceEffect(41, 0, 0, 0, 0); } - + /* Only feed real time updates when client is moving */ if (is_client_moving || new_heading != m_Position.w || new_animation != animation) { - + animation = ppu->animation; m_Position.w = EQ12toFloat(ppu->heading); - + /* Broadcast update to other clients */ auto outapp = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); PlayerPositionUpdateServer_Struct *position_update = (PlayerPositionUpdateServer_Struct *) outapp->pBuffer; - + MakeSpawnUpdate(position_update); - + if (gm_hide_me) { entity_list.QueueClientsStatus(this, outapp, true, Admin(), 250); } else { entity_list.QueueCloseClients(this, outapp, true, RuleI(Range, ClientPositionUpdates), nullptr, true); } - - + + /* Always send position updates to group - send when beyond normal ClientPositionUpdate range */ Group *group = this->GetGroup(); Raid *raid = this->GetRaid(); - + if (raid) { raid->QueueClients(this, outapp, true, true, (RuleI(Range, ClientPositionUpdates) * -1)); } else if (group) { group->QueueClients(this, outapp, true, true, (RuleI(Range, ClientPositionUpdates) * -1)); } - + safe_delete(outapp); } - + if (zone->watermap) { if (zone->watermap->InLiquid(glm::vec3(m_Position))) { CheckIncreaseSkill(EQEmu::skills::SkillSwimming, nullptr, -17); - + // Dismount horses when entering water if (GetHorseId() && RuleB(Character, DismountWater)) { SetHorseId(0); @@ -4695,7 +4497,6 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) { } CheckRegionTypeChanges(); } - return; } void Client::Handle_OP_CombatAbility(const EQApplicationPacket *app) @@ -13666,12 +13467,6 @@ void Client::Handle_OP_TargetCommand(const EQApplicationPacket *app) GetTarget()->IsTargeted(1); return; } - else if (IsAssistExempted()) - { - GetTarget()->IsTargeted(1); - SetAssistExemption(false); - return; - } else if (GetTarget()->IsClient()) { //make sure this client is in our raid/group @@ -13689,17 +13484,6 @@ void Client::Handle_OP_TargetCommand(const EQApplicationPacket *app) SetTarget((Mob*)nullptr); return; } - else if (IsPortExempted()) - { - GetTarget()->IsTargeted(1); - return; - } - else if (IsSenseExempted()) - { - GetTarget()->IsTargeted(1); - SetSenseExemption(false); - return; - } else if (IsXTarget(GetTarget())) { GetTarget()->IsTargeted(1); diff --git a/zone/client_process.cpp b/zone/client_process.cpp index 988b558ec..cea1dd49f 100644 --- a/zone/client_process.cpp +++ b/zone/client_process.cpp @@ -188,10 +188,6 @@ bool Client::Process() { if (IsStunned() && stunned_timer.Check()) Mob::UnStun(); - if (!m_CheatDetectMoved) { - m_TimeSinceLastPositionCheck = Timer::GetCurrentTime(); - } - if (bardsong_timer.Check() && bardsong != 0) { //NOTE: this is kinda a heavy-handed check to make sure the mob still exists before //doing the next pulse on them... @@ -412,31 +408,6 @@ bool Client::Process() { } } - if (position_timer.Check()) { - if (IsAIControlled()) - { - if (!IsMoving()) - { - animation = 0; - m_Delta = glm::vec4(0.0f, 0.0f, 0.0f, m_Delta.w); - SendPositionUpdate(true); - } - } - - // Send a position packet every 8 seconds - if not done, other clients - // see this char disappear after 10-12 seconds of inactivity - if (position_timer_counter >= 36) { // Approx. 4 ticks per second - entity_list.SendPositionUpdates(this, pLastUpdateWZ, RuleI(Range, MobPositionUpdates), GetTarget(), true); - pLastUpdate = Timer::GetCurrentTime(); - pLastUpdateWZ = pLastUpdate; - position_timer_counter = 0; - } - else { - pLastUpdate = Timer::GetCurrentTime(); - position_timer_counter++; - } - } - if (HasVirus()) { if (viral_timer.Check()) { viral_timer_counter++; diff --git a/zone/command.cpp b/zone/command.cpp index f57b99613..84cd3566a 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -67,6 +67,7 @@ #include "water_map.h" #include "worldserver.h" #include "fastmath.h" +#include "mob_movement_manager.h" extern QueryServ* QServ; extern WorldServer worldserver; @@ -265,6 +266,7 @@ int command_init(void) command_add("modifynpcstat", "- Modifys a NPC's stats", 150, command_modifynpcstat) || command_add("motd", "[new motd] - Set message of the day", 150, command_motd) || command_add("movechar", "[charname] [zonename] - Move charname to zonename", 50, command_movechar) || + command_add("movement", "Various movement commands", 200, command_movement) || command_add("myskills", "- Show details about your current skill levels", 0, command_myskills) || command_add("mysqltest", "Akkadius MySQL Bench Test", 250, command_mysqltest) || command_add("mysql", "Mysql CLI, see 'help' for options.", 250, command_mysql) || @@ -1258,6 +1260,63 @@ void command_movechar(Client *c, const Seperator *sep) } } +void command_movement(Client *c, const Seperator *sep) +{ + auto &mgr = MobMovementManager::Get(); + + if (sep->arg[1][0] == 0) { + c->Message(0, "Usage: #movement stats/clearstats"); + return; + } + + if (strcasecmp(sep->arg[1], "stats") == 0) + { + //mgr.DumpStats(c); + } + else if (strcasecmp(sep->arg[1], "clearstats") == 0) + { + //mgr.ClearStats(); + } + if (strcasecmp(sep->arg[1], "test") == 0) + { + auto target = c->GetTarget(); + if (!target) { + c->Message(0, "Requires target"); + } + + + auto heading = target->CalculateHeadingToTarget(c->GetX(), c->GetY()); + mgr.RotateTo(target, heading, 16.0f); + + //double a1 = atof(sep->arg[2]); + //double a2 = atof(sep->arg[3]); + //double a3 = atof(sep->arg[4]); + //double a4 = atof(sep->arg[5]); + //int a5 = atoi(sep->arg[6]); + // + ////PlayerPositionUpdateServer_Struct + //EQApplicationPacket outapp(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); + //PlayerPositionUpdateServer_Struct *spu = (PlayerPositionUpdateServer_Struct*)outapp.pBuffer; + // + //memset(spu, 0x00, sizeof(PlayerPositionUpdateServer_Struct)); + //spu->spawn_id = target->GetID(); + //spu->x_pos = FloatToEQ19(target->GetX()); + //spu->y_pos = FloatToEQ19(target->GetY()); + //spu->z_pos = FloatToEQ19(target->GetZ()); + //spu->heading = FloatToEQ12(target->GetHeading()); + //spu->delta_x = FloatToEQ13(a1); + //spu->delta_y = FloatToEQ13(a2); + //spu->delta_z = FloatToEQ13(a3); + //spu->delta_heading = FloatToEQ10(a4); + //spu->animation = a5; + // + //c->QueuePacket(&outapp); + } + else { + c->Message(0, "Usage: #movement stats/clearstats"); + } +} + void command_viewpetition(Client *c, const Seperator *sep) { if (sep->arg[1][0] == 0) { @@ -7260,7 +7319,7 @@ void command_pf(Client *c, const Seperator *sep) c->Message(0, "POS: (%.2f, %.2f, %.2f)", who->GetX(), who->GetY(), who->GetZ()); c->Message(0, "WP: %s (%d/%d)", to_string(who->GetCurrentWayPoint()).c_str(), who->IsNPC()?who->CastToNPC()->GetMaxWp():-1); c->Message(0, "pause=%d RAspeed=%d", who->GetCWPP(), who->GetRunAnimSpeed()); - who->DumpMovement(c); + //who->DumpMovement(c); } else { c->Message(0, "ERROR: target required"); } diff --git a/zone/command.h b/zone/command.h index d3bae6c0c..95b9e77dd 100644 --- a/zone/command.h +++ b/zone/command.h @@ -168,6 +168,7 @@ void command_merchantopenshop(Client *c, const Seperator *sep); void command_modifynpcstat(Client *c, const Seperator *sep); void command_motd(Client *c, const Seperator *sep); void command_movechar(Client *c, const Seperator *sep); +void command_movement(Client *c, const Seperator *sep); void command_myskills(Client *c, const Seperator *sep); void command_mysql(Client *c, const Seperator *sep); void command_mysqltest(Client *c, const Seperator *sep); diff --git a/zone/entity.cpp b/zone/entity.cpp index 163d991c5..f7f5b4594 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -2650,56 +2650,6 @@ void EntityList::RemoveDebuffs(Mob *caster) } } -// Currently, a new packet is sent per entity. -// @todo: Come back and use FLAG_COMBINED to pack -// all updates into one packet. -void EntityList::SendPositionUpdates(Client *client, uint32 cLastUpdate, float update_range, Entity *always_send, bool iSendEvenIfNotChanged) -{ -// update_range = (update_range * update_range); -// -// EQApplicationPacket *outapp = 0; -// PlayerPositionUpdateServer_Struct *ppu = 0; -// Mob *mob = 0; -// -// auto it = mob_list.begin(); -// while (it != mob_list.end()) { -// -// mob = it->second; -// -// if ( -// mob && !mob->IsCorpse() -// && (it->second != client) -// && (mob->IsClient() || iSendEvenIfNotChanged || (mob->LastChange() >= cLastUpdate)) -// && (it->second->ShouldISpawnFor(client)) -// ) { -// if ( -// update_range == 0 -// || (it->second == always_send) -// || mob->IsClient() -// || (DistanceSquared(mob->GetPosition(), client->GetPosition()) <= update_range) -// ) { -// if (mob && mob->IsClient() && mob->GetID() > 0) { -// client->QueuePacket(outapp, false, Client::CLIENT_CONNECTED); -// -// if (outapp == 0) { -// outapp = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); -// ppu = (PlayerPositionUpdateServer_Struct*)outapp->pBuffer; -// } -// -// mob->MakeSpawnUpdate(ppu); -// -// safe_delete(outapp); -// outapp = 0; -// } -// } -// } -// -// ++it; -// } -// -// safe_delete(outapp); -} - char *EntityList::MakeNameUnique(char *name) { bool used[300]; diff --git a/zone/entity.h b/zone/entity.h index 816098294..7c9c06c31 100644 --- a/zone/entity.h +++ b/zone/entity.h @@ -372,7 +372,6 @@ public: Mob* FindDefenseNPC(uint32 npcid); void OpenDoorsNear(Mob* opener); void UpdateWho(bool iSendFullUpdate = false); - void SendPositionUpdates(Client* client, uint32 cLastUpdate = 0, float update_range = 0, Entity* always_send = 0, bool iSendEvenIfNotChanged = false); char* MakeNameUnique(char* name); static char* RemoveNumbers(char* name); void SignalMobsByNPCID(uint32 npc_type, int signal_id); diff --git a/zone/mob.cpp b/zone/mob.cpp index 3921d91f5..59691c78f 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -1453,12 +1453,12 @@ void Mob::StopMoving(float new_heading) { /* Used for mobs standing still - this does not send a delta */ void Mob::SendPosition() { - mMovementManager->SendPosition(this); + //mMovementManager->SendPosition(this); } /* Position updates for mobs on the move */ void Mob::SendPositionUpdate(bool iSendToSelf) { - mMovementManager->SendPositionUpdate(this, iSendToSelf); + //mMovementManager->SendPositionUpdate(this, iSendToSelf); } // this is for SendPosition() @@ -2710,13 +2710,7 @@ void Mob::FaceTarget(Mob* mob_to_face /*= 0*/) { float current_heading = GetHeading(); float new_heading = CalculateHeadingToTarget(faced_mob->GetX(), faced_mob->GetY()); if(current_heading != new_heading) { - SetHeading(new_heading); - if (moving) { - SendPositionUpdate(); - } - else { - SendPosition(); - } + mMovementManager->RotateTo(this, new_heading, 16.0f); } if(IsNPC() && !IsEngaged()) { @@ -3170,20 +3164,6 @@ void Mob::SetNextIncHPEvent( int inchpevent ) { nextinchpevent = inchpevent; } -//warp for quest function,from sandy -void Mob::Warp(const glm::vec3& location) -{ - if(IsNPC()) - entity_list.ProcessMove(CastToNPC(), location.x, location.y, location.z); - - m_Position = glm::vec4(location, m_Position.w); - - Mob* target = GetTarget(); - if (target) - FaceTarget( target ); - - SendPosition(); -} int16 Mob::GetResist(uint8 type) const { @@ -3571,6 +3551,14 @@ void Mob::SetFlyMode(GravityBehavior flymode) this->flymode = flymode; } +void Mob::Teleport(const glm::vec3 &pos) +{ +} + +void Mob::Teleport(const glm::vec4 &pos) +{ +} + bool Mob::IsNimbusEffectActive(uint32 nimbus_effect) { if(nimbus_effect1 == nimbus_effect || nimbus_effect2 == nimbus_effect || nimbus_effect3 == nimbus_effect) @@ -4592,8 +4580,6 @@ void Mob::DoKnockback(Mob *caster, uint32 pushback, uint32 pushup) { if(IsClient()) { - CastToClient()->SetKnockBackExemption(true); - auto outapp_push = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); PlayerPositionUpdateServer_Struct* spu = (PlayerPositionUpdateServer_Struct*)outapp_push->pBuffer; diff --git a/zone/mob.h b/zone/mob.h index d9f180626..3f35a25b8 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -542,7 +542,6 @@ public: virtual inline int32 GetPrimaryFaction() const { return 0; } //Movement - void Warp(const glm::vec3& location); inline bool IsMoving() const { return moving; } virtual void SetMoving(bool move) { moving = move; m_Delta = glm::vec4(); } virtual void GoToBind(uint8 bindnum = 0) { } @@ -568,14 +567,15 @@ public: bool Spawned() { return spawned; }; virtual bool ShouldISpawnFor(Client *c) { return true; } void SetFlyMode(GravityBehavior flymode); - inline void Teleport(const glm::vec3 &NewPosition) { m_Position.x = NewPosition.x; m_Position.y = NewPosition.y; - m_Position.z = NewPosition.z; }; + void Teleport(const glm::vec3 &pos); + void Teleport(const glm::vec4 &pos); void TryMoveAlong(float distance, float angle, bool send = true); void ProcessForcedMovement(); inline void IncDeltaX(float in) { m_Delta.x += in; } inline void IncDeltaY(float in) { m_Delta.y += in; } inline void IncDeltaZ(float in) { m_Delta.z += in; } inline void SetForcedMovement(int in) { ForcedMovement = in; } + void SetHeading(float iHeading) { m_Position.w = iHeading; } //AI static uint32 GetLevelCon(uint8 mylevel, uint8 iOtherLevel); @@ -602,7 +602,6 @@ public: void SetAssistAggro(bool value) { AssistAggro = value; if (PrimaryAggro) AssistAggro = false; } bool HateSummon(); void FaceTarget(Mob* mob_to_face = 0); - void SetHeading(float iHeading) { m_Position.w = iHeading; } void WipeHateList(); void AddFeignMemory(Client* attacker); void RemoveFromFeignMemory(Client* attacker); @@ -980,7 +979,6 @@ public: void TryFixZ(int32 z_find_offset = 5, bool fix_client_z = false); void FixZ(int32 z_find_offset = 5, bool fix_client_z = false); float GetFixedZ(const glm::vec3 &destination, int32 z_find_offset = 5); - void DumpMovement(Client *to); void NPCSpecialAttacks(const char* parse, int permtag, bool reset = true, bool remove = false); inline uint32 DontHealMeBefore() const { return pDontHealMeBefore; } @@ -1251,8 +1249,8 @@ protected: uint8 level; uint8 orig_level; uint32 npctype_id; - glm::vec4 m_Position; + glm::vec4 m_Position; int animation; // this is really what MQ2 calls SpeedRun just packed like (int)(SpeedRun * 40.0f) float base_size; float size; diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 9a0ffb8b7..3862f7857 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -916,7 +916,7 @@ void Client::AI_Process() float dist = DistanceSquared(m_Position, owner->GetPosition()); if (dist >= 202500) { // >= 450 distance - Teleport(static_cast(owner->GetPosition())); + Teleport(owner->GetPosition()); SendPositionUpdate(); // this shouldn't happen a lot (and hard to make it) so lets not rate limit } else if (dist >= 400) { // >=20 if (AI_movement_timer->Check()) { @@ -936,86 +936,86 @@ void Client::AI_Process() void Mob::ProcessForcedMovement() { - // we are being pushed, we will hijack this movement timer - // this also needs to be done before casting to have a chance to interrupt - // this flag won't be set if the mob can't be pushed (rooted etc) - if (AI_movement_timer->Check()) { - bool bPassed = true; - glm::vec3 normal; - - // no zone map = fucked - if (zone->HasMap()) { - // in front - m_CollisionBox[0].x = m_Position.x + 3.0f * g_Math.FastSin(0.0f); - m_CollisionBox[0].y = m_Position.y + 3.0f * g_Math.FastCos(0.0f); - m_CollisionBox[0].z = m_Position.z; - - // 45 right front - m_CollisionBox[1].x = m_Position.x + 3.0f * g_Math.FastSin(64.0f); - m_CollisionBox[1].y = m_Position.y + 3.0f * g_Math.FastCos(64.0f); - m_CollisionBox[1].z = m_Position.z; - - // to right - m_CollisionBox[2].x = m_Position.x + 3.0f * g_Math.FastSin(128.0f); - m_CollisionBox[2].y = m_Position.y + 3.0f * g_Math.FastCos(128.0f); - m_CollisionBox[2].z = m_Position.z; - - // 45 right back - m_CollisionBox[3].x = m_Position.x + 3.0f * g_Math.FastSin(192.0f); - m_CollisionBox[3].y = m_Position.y + 3.0f * g_Math.FastCos(192.0f); - m_CollisionBox[3].z = m_Position.z; - - // behind - m_CollisionBox[4].x = m_Position.x + 3.0f * g_Math.FastSin(256.0f); - m_CollisionBox[4].y = m_Position.y + 3.0f * g_Math.FastCos(256.0f); - m_CollisionBox[4].z = m_Position.z; - - // 45 left back - m_CollisionBox[5].x = m_Position.x + 3.0f * g_Math.FastSin(320.0f); - m_CollisionBox[5].y = m_Position.y + 3.0f * g_Math.FastCos(320.0f); - m_CollisionBox[5].z = m_Position.z; - - // to left - m_CollisionBox[6].x = m_Position.x + 3.0f * g_Math.FastSin(384.0f); - m_CollisionBox[6].y = m_Position.y + 3.0f * g_Math.FastCos(384.0f); - m_CollisionBox[6].z = m_Position.z; - - // 45 left front - m_CollisionBox[7].x = m_Position.x + 3.0f * g_Math.FastSin(448.0f); - m_CollisionBox[7].y = m_Position.y + 3.0f * g_Math.FastCos(448.0f); - m_CollisionBox[7].z = m_Position.z; - - // collision happened, need to move along the wall - float distance = 0.0f, shortest = std::numeric_limits::infinity(); - glm::vec3 tmp_nrm; - for (auto &vec : m_CollisionBox) { - if (zone->zonemap->DoCollisionCheck(vec, vec + m_Delta, tmp_nrm, distance)) { - bPassed = false; // lets try with new projection next pass - if (distance < shortest) { - normal = tmp_nrm; - shortest = distance; - } - } - } - } - - if (bPassed) { - ForcedMovement = 0; - Teleport(m_Position + m_Delta); - m_Delta = glm::vec4(); - SendPositionUpdate(); - FixZ(); // so we teleport to the ground locally, we want the client to interpolate falling etc - } else if (--ForcedMovement) { - if (normal.z < -0.15f) // prevent too much wall climbing. ex. OMM's room in anguish - normal.z = 0.0f; - auto proj = glm::proj(static_cast(m_Delta), normal); - m_Delta.x -= proj.x; - m_Delta.y -= proj.y; - m_Delta.z -= proj.z; - } else { - m_Delta = glm::vec4(); // well, we failed to find a spot to be forced to, lets give up - } - } + //// we are being pushed, we will hijack this movement timer + //// this also needs to be done before casting to have a chance to interrupt + //// this flag won't be set if the mob can't be pushed (rooted etc) + //if (AI_movement_timer->Check()) { + // bool bPassed = true; + // glm::vec3 normal; + // + // // no zone map = fucked + // if (zone->HasMap()) { + // // in front + // m_CollisionBox[0].x = m_Position.x + 3.0f * g_Math.FastSin(0.0f); + // m_CollisionBox[0].y = m_Position.y + 3.0f * g_Math.FastCos(0.0f); + // m_CollisionBox[0].z = m_Position.z; + // + // // 45 right front + // m_CollisionBox[1].x = m_Position.x + 3.0f * g_Math.FastSin(64.0f); + // m_CollisionBox[1].y = m_Position.y + 3.0f * g_Math.FastCos(64.0f); + // m_CollisionBox[1].z = m_Position.z; + // + // // to right + // m_CollisionBox[2].x = m_Position.x + 3.0f * g_Math.FastSin(128.0f); + // m_CollisionBox[2].y = m_Position.y + 3.0f * g_Math.FastCos(128.0f); + // m_CollisionBox[2].z = m_Position.z; + // + // // 45 right back + // m_CollisionBox[3].x = m_Position.x + 3.0f * g_Math.FastSin(192.0f); + // m_CollisionBox[3].y = m_Position.y + 3.0f * g_Math.FastCos(192.0f); + // m_CollisionBox[3].z = m_Position.z; + // + // // behind + // m_CollisionBox[4].x = m_Position.x + 3.0f * g_Math.FastSin(256.0f); + // m_CollisionBox[4].y = m_Position.y + 3.0f * g_Math.FastCos(256.0f); + // m_CollisionBox[4].z = m_Position.z; + // + // // 45 left back + // m_CollisionBox[5].x = m_Position.x + 3.0f * g_Math.FastSin(320.0f); + // m_CollisionBox[5].y = m_Position.y + 3.0f * g_Math.FastCos(320.0f); + // m_CollisionBox[5].z = m_Position.z; + // + // // to left + // m_CollisionBox[6].x = m_Position.x + 3.0f * g_Math.FastSin(384.0f); + // m_CollisionBox[6].y = m_Position.y + 3.0f * g_Math.FastCos(384.0f); + // m_CollisionBox[6].z = m_Position.z; + // + // // 45 left front + // m_CollisionBox[7].x = m_Position.x + 3.0f * g_Math.FastSin(448.0f); + // m_CollisionBox[7].y = m_Position.y + 3.0f * g_Math.FastCos(448.0f); + // m_CollisionBox[7].z = m_Position.z; + // + // // collision happened, need to move along the wall + // float distance = 0.0f, shortest = std::numeric_limits::infinity(); + // glm::vec3 tmp_nrm; + // for (auto &vec : m_CollisionBox) { + // if (zone->zonemap->DoCollisionCheck(vec, vec + m_Delta, tmp_nrm, distance)) { + // bPassed = false; // lets try with new projection next pass + // if (distance < shortest) { + // normal = tmp_nrm; + // shortest = distance; + // } + // } + // } + // } + // + // if (bPassed) { + // ForcedMovement = 0; + // Teleport(m_Position + m_Delta); + // m_Delta = glm::vec4(); + // SendPositionUpdate(); + // FixZ(); // so we teleport to the ground locally, we want the client to interpolate falling etc + // } else if (--ForcedMovement) { + // if (normal.z < -0.15f) // prevent too much wall climbing. ex. OMM's room in anguish + // normal.z = 0.0f; + // auto proj = glm::proj(static_cast(m_Delta), normal); + // m_Delta.x -= proj.x; + // m_Delta.y -= proj.y; + // m_Delta.z -= proj.z; + // } else { + // m_Delta = glm::vec4(); // well, we failed to find a spot to be forced to, lets give up + // } + //} } void Mob::AI_Process() { diff --git a/zone/mob_movement_manager.cpp b/zone/mob_movement_manager.cpp index b87e4f740..a6151a887 100644 --- a/zone/mob_movement_manager.cpp +++ b/zone/mob_movement_manager.cpp @@ -1,53 +1,81 @@ #include "mob_movement_manager.h" #include "client.h" #include "mob.h" -#include "../common/timer.h" +#include "../common/eq_packet_structs.h" +#include "../common/misc_functions.h" #include #include #include -extern uint64_t frame_time; +extern double frame_time; -struct MovementEntry +struct RotateCommand { - int animation; - float heading; - bool dirty; - double last_sent_time; - double last_sent_time_long_distance; - - MovementEntry(Mob *m) { - animation = 0; - heading = m->GetHeading(); - dirty = false; - last_sent_time = 0.0; - last_sent_time_long_distance = 0.0; + RotateCommand() { + rotate_to = 0.0; + rotate_to_speed = 0.0; + rotate_dir = 1.0; + active = false; + started = false; } + + double rotate_to; + double rotate_to_speed; + double rotate_dir; + bool active; + bool started; }; -struct MoveToEntry +struct MovementCommand { - float x; - float y; - float z; - float speed; - bool active; - - MoveToEntry() { - x = 0.0f; - y = 0.0f; - z = 0.0f; - speed = 0.0f; + MovementCommand() { + move_to_x = 0.0; + move_to_y = 0.0; + move_to_z = 0.0; + move_to_speed = 0.0; + last_sent_short_distance = 0.0; + last_sent_medium_distance = 0.0; + last_sent_long_distance = 0.0; active = false; } + + double move_to_x; + double move_to_y; + double move_to_z; + double move_to_speed; + double last_sent_short_distance; + double last_sent_medium_distance; + double last_sent_long_distance; + bool active; +}; + +struct MovementStats +{ + MovementStats() { + TotalSent = 0ULL; + TotalSentMovement = 0ULL; + TotalSentPosition = 0ULL; + TotalSentHeading = 0ULL; + } + + uint64_t TotalSent; + uint64_t TotalSentMovement; + uint64_t TotalSentPosition; + uint64_t TotalSentHeading; +}; + +struct MobMovementEntry +{ + RotateCommand RotateCommand; + MovementCommand MoveCommand; }; struct MobMovementManager::Implementation { - std::map Entries; - std::map MoveEntries; + std::map Entries; std::vector Clients; + MovementStats Stats; }; MobMovementManager::MobMovementManager() @@ -55,57 +83,132 @@ MobMovementManager::MobMovementManager() _impl.reset(new Implementation()); } +void MobMovementManager::ProcessRotateCommand(Mob *m, RotateCommand &cmd) +{ + if (m->IsEngaged()) { + auto to = FixHeading(cmd.rotate_to); + m->SetHeading(to); + SendCommandToAllClients(m, 0.0, 0.0, 0.0, 0.0, 0); + cmd.active = false; + return; + } + + if (!cmd.started) { + cmd.started = true; + + SendCommandToAllClients(m, 0.0, 0.0, 0.0, cmd.rotate_dir * cmd.rotate_to_speed, 0); + } + + auto from = FixHeading(m->GetHeading()); + auto to = FixHeading(cmd.rotate_to); + float dist = 0.0; + if (cmd.rotate_dir > 0.0) { + if (to > from) { + dist = to - from; + } + else { + dist = 512.0 - from + to; + } + } + else { + if (from > to) { + dist = from - to; + } + else { + dist = (512.0 - to) + from; + } + } + + auto td = cmd.rotate_to_speed * 19.0 * frame_time; + + if (td >= dist) { + m->SetHeading(to); + SendCommandToAllClients(m, 0.0, 0.0, 0.0, 0.0, 0); + cmd.active = false; + } + + from += td * cmd.rotate_dir; + m->SetHeading(FixHeading(from)); +} + +void MobMovementManager::SendCommandToAllClients(Mob *m, float dx, float dy, float dz, float dh, int anim) +{ + EQApplicationPacket outapp(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); + PlayerPositionUpdateServer_Struct *spu = (PlayerPositionUpdateServer_Struct*)outapp.pBuffer; + FillCommandStruct(spu, m, dx, dy, dz, dh, anim); + + for (auto &c : _impl->Clients) { + _impl->Stats.TotalSent++; + + if (anim != 0) { + _impl->Stats.TotalSentMovement++; + } + else if (dh != 0) { + _impl->Stats.TotalSentHeading++; + } + else { + _impl->Stats.TotalSentPosition++; + } + + c->QueuePacket(&outapp); + } +} + +void MobMovementManager::FillCommandStruct(PlayerPositionUpdateServer_Struct *spu, Mob *m, float dx, float dy, float dz, float dh, int anim) +{ + memset(spu, 0x00, sizeof(PlayerPositionUpdateServer_Struct)); + spu->spawn_id = m->GetID(); + spu->x_pos = FloatToEQ19(m->GetX()); + spu->y_pos = FloatToEQ19(m->GetY()); + spu->z_pos = FloatToEQ19(m->GetZ()); + spu->heading = FloatToEQ12(m->GetHeading()); + spu->delta_x = FloatToEQ13(dx); + spu->delta_y = FloatToEQ13(dy); + spu->delta_z = FloatToEQ13(dz); + spu->delta_heading = FloatToEQ10(dh); + spu->animation = anim; +} + +float MobMovementManager::FixHeading(float in) +{ + auto h = in; + while (h > 512.0) { + h -= 512.0; + } + + while (h < 0.0) { + h += 512.0; + } + + return h; +} + MobMovementManager::~MobMovementManager() { } void MobMovementManager::Process() { - double current_time = static_cast(Timer::GetCurrentTime()) / 1000.0; - - for (auto &mov : _impl->MoveEntries) { - auto &ent = mov.second; - - if (ent.active) { - ProcessMovement(mov.first, ent.x, ent.y, ent.z, ent.speed); - } - } - for (auto &iter : _impl->Entries) { auto &ent = iter.second; - if (ent.dirty) { - SendUpdate(iter.first, ent.animation, ent.heading); - ent.dirty = false; - ent.last_sent_time = current_time; - ent.last_sent_time_long_distance = current_time; - } else if (ent.animation != 0) { - double diff_short_range = current_time - ent.last_sent_time; - double diff_long_range = current_time - ent.last_sent_time_long_distance; + if (ent.RotateCommand.active) { + ProcessRotateCommand(iter.first, ent.RotateCommand); + } + else if (ent.MoveCommand.active) { - if (diff_short_range >= 2.0) { - SendUpdateShortDistance(iter.first, ent.animation, ent.heading); - ent.last_sent_time = current_time; - } - - if (diff_long_range >= 6.0) { - SendUpdateLongDistance(iter.first, ent.animation, ent.heading); - ent.last_sent_time_long_distance = current_time; - } } } } void MobMovementManager::AddMob(Mob *m) { - _impl->Entries.insert(std::make_pair(m, MovementEntry(m))); - _impl->MoveEntries.insert(std::make_pair(m, MoveToEntry())); + _impl->Entries.insert(std::make_pair(m, MobMovementEntry())); } void MobMovementManager::RemoveMob(Mob *m) { _impl->Entries.erase(m); - _impl->MoveEntries.erase(m); } void MobMovementManager::AddClient(Client *c) @@ -126,275 +229,52 @@ void MobMovementManager::RemoveClient(Client *c) } } -void MobMovementManager::SendPosition(Mob *who) +void MobMovementManager::RotateTo(Mob *who, float to, float speed) { auto iter = _impl->Entries.find(who); - auto &ent = iter->second; + auto &ent = (*iter); - auto anim = 0; - auto heading = who->GetHeading(); - - if (ent.animation != anim || !HeadingEqual(ent.heading, heading)) { - ent.animation = anim; - ent.heading = heading; - ent.dirty = true; + auto from = FixHeading(who->GetHeading()); + to = FixHeading(to); + + ent.second.RotateCommand.active = true; + ent.second.RotateCommand.started = false; + ent.second.RotateCommand.rotate_to = to; + ent.second.RotateCommand.rotate_to_speed = speed; + + double pdist = 0.0; + double ndist = 0.0; + if (to > from) { + pdist = to - from; + } + else { + pdist = 512.0 - from + to; + } + + if (from > to) { + ndist = from - to; + } + else { + ndist = (512.0 - to) + from; + } + + if (pdist <= ndist) { + ent.second.RotateCommand.rotate_dir = 1.0; + } + else { + ent.second.RotateCommand.rotate_dir = -1.0; } } -void MobMovementManager::SendPositionUpdate(Mob *who, bool send_to_self) +void MobMovementManager::Teleport(Mob *who, float x, float y, float z, float heading) { - auto iter = _impl->Entries.find(who); - auto &ent = iter->second; - - auto anim = 0; - auto heading = who->GetHeading(); - if (who->IsMoving()) { - if (who->IsClient()) { - anim = who->GetAnimation(); - } - else { - anim = who->GetRunAnimSpeed(); - } - } - - if (send_to_self && who->IsClient()) { - SendUpdateTo(who, who->CastToClient(), anim, heading); - } - - if (ent.animation != anim || !HeadingEqual(ent.heading, heading)) { - ent.animation = anim; - ent.heading = heading; - ent.dirty = true; - } } void MobMovementManager::NavigateTo(Mob *who, float x, float y, float z, float speed) { - auto iter = _impl->MoveEntries.find(who); - auto &ent = iter->second; - - ent.x = x; - ent.y = y; - ent.z = z; - ent.speed = speed; - ent.active = true; + } void MobMovementManager::StopNavigation(Mob *who) { - auto iter = _impl->MoveEntries.find(who); - auto &ent = iter->second; - ent.active = false; - - SendPosition(who); -} - -void MobMovementManager::Dump(Mob *m, Client *to) -{ - { - auto iter = _impl->Entries.find(m); - auto &ent = iter->second; - - to->Message(0, "Packet: anim=%d, heading=%.2f, dirty=%s, last_sent_time=%.2f, last_sent_time_long_dist=%.2f", - ent.animation, - ent.heading, - ent.dirty ? "true" : "false", - ent.last_sent_time, - ent.last_sent_time_long_distance); - } - - { - auto iter = _impl->MoveEntries.find(m); - auto &ent = iter->second; - - to->Message(0, "Movement: speed=%.2f, x=%.2f, y=%.2f, z=%.2f, active=%s", - ent.speed, - ent.x, - ent.y, - ent.z, - ent.active ? "true" : "false"); - } -} - -bool MobMovementManager::HeadingEqual(float a, float b) -{ - const float eps = 0.0001f; - return abs(a - b) < eps; -} - -void MobMovementManager::SendUpdateTo(Mob *who, Client *c, int anim, float heading) -{ - EQApplicationPacket outapp(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); - PlayerPositionUpdateServer_Struct* spu = (PlayerPositionUpdateServer_Struct*)outapp.pBuffer; - if (anim == 0) { - who->MakeSpawnUpdateNoDelta(spu); - } - else { - who->MakeSpawnUpdate(spu); - } - - c->QueuePacket(&outapp); -} - -void MobMovementManager::SendUpdate(Mob *who, int anim, float heading) -{ - EQApplicationPacket outapp(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); - PlayerPositionUpdateServer_Struct* spu = (PlayerPositionUpdateServer_Struct*)outapp.pBuffer; - if (anim == 0) { - who->MakeSpawnUpdateNoDelta(spu); - } - else { - who->MakeSpawnUpdate(spu); - } - for (auto &c : _impl->Clients) { - if (c != who) { - c->QueuePacket(&outapp); - } - else if (c->IsAIControlled()) { - c->QueuePacket(&outapp); - } - } -} - -void MobMovementManager::SendUpdateShortDistance(Mob *who, int anim, float heading) -{ - EQApplicationPacket outapp(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); - PlayerPositionUpdateServer_Struct* spu = (PlayerPositionUpdateServer_Struct*)outapp.pBuffer; - if (anim == 0) { - who->MakeSpawnUpdateNoDelta(spu); - } - else { - who->MakeSpawnUpdate(spu); - } - - for (auto &c : _impl->Clients) { - if (c != who) { - auto dist = who->CalculateDistance(c->GetX(), c->GetY(), c->GetZ()); - if (dist <= 1000.0f) { - c->QueuePacket(&outapp); - } - } - else if (c->IsAIControlled()) { - auto dist = who->CalculateDistance(c->GetX(), c->GetY(), c->GetZ()); - if (dist <= 1000.0f) { - c->QueuePacket(&outapp); - } - } - } -} - -void MobMovementManager::SendUpdateLongDistance(Mob *who, int anim, float heading) -{ - EQApplicationPacket outapp(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); - PlayerPositionUpdateServer_Struct* spu = (PlayerPositionUpdateServer_Struct*)outapp.pBuffer; - if (anim == 0) { - who->MakeSpawnUpdateNoDelta(spu); - } - else { - who->MakeSpawnUpdate(spu); - } - - for (auto &c : _impl->Clients) { - if (c != who) { - auto dist = who->CalculateDistance(c->GetX(), c->GetY(), c->GetZ()); - if (dist > 1000.0f) { - c->QueuePacket(&outapp); - } - } - else if (c->IsAIControlled()) { - auto dist = who->CalculateDistance(c->GetX(), c->GetY(), c->GetZ()); - if (dist > 1000.0f) { - c->QueuePacket(&outapp); - } - } - } -} - -void MobMovementManager::ProcessMovement(Mob *who, float x, float y, float z, float speed) -{ - if (who->GetID() == 0) { - return; - } - - if (speed <= 0) { - who->SetCurrentSpeed(0); - return; - } - - if (IsPositionEqual(x, y, z, who->GetX(), who->GetY(), who->GetZ())) { - StopNavigation(who); - return; - } - - bool WaypointChanged = false; - bool NodeReached = false; - glm::vec3 Goal = who->UpdatePath( - x, y, z, speed, WaypointChanged, NodeReached - ); - - if (WaypointChanged || NodeReached) { - entity_list.OpenDoorsNear(who); - } - - who->SetCurrentSpeed(static_cast(speed)); - who->SetRunAnimSpeed(speed); - -#ifdef BOTS - if (who->IsClient() || who->IsBot()) -#else - if (who->IsClient()) -#endif - { - who->SetAnimation(speed * 0.55f); - } - - auto &p = who->GetPosition(); - - //Setup Vectors - glm::vec3 tar(Goal.x, Goal.y, Goal.z); - glm::vec3 pos(p.x, p.y, p.z); - double len = glm::distance(pos, tar); - if (len == 0) { - return; - } - - glm::vec3 dir = tar - pos; - glm::vec3 ndir = glm::normalize(dir); - double time_since_last = static_cast(frame_time) / 1000.0; - double distance_moved = time_since_last * speed * 0.4f * 1.4f; - - if (distance_moved > len) { - who->Teleport(Goal); - - if (who->IsNPC()) { - entity_list.ProcessMove(who->CastToNPC(), Goal.x, Goal.y, Goal.z); - } - - who->TryFixZ(); - return; - } - else { - glm::vec3 npos = pos + (ndir * static_cast(distance_moved)); - who->Teleport(npos); - - if (who->IsNPC()) { - entity_list.ProcessMove(who->CastToNPC(), npos.x, npos.y, npos.z); - } - } - - who->SetHeading(who->CalculateHeadingToTarget(Goal.x, Goal.y)); - SendPositionUpdate(who, false); - - who->TryFixZ(); - - who->SetMoving(true); - - if (who->IsClient()) { - who->SendPositionUpdate(); - who->CastToClient()->ResetPositionTimer(); - } - else { - who->SendPositionUpdate(); - who->SetAppearance(eaStanding, false); - } } diff --git a/zone/mob_movement_manager.h b/zone/mob_movement_manager.h index 2660e4b22..793c3406e 100644 --- a/zone/mob_movement_manager.h +++ b/zone/mob_movement_manager.h @@ -4,6 +4,9 @@ class Mob; class Client; +struct RotateCommand; +struct PlayerPositionUpdateServer_Struct; + class MobMovementManager { public: @@ -14,11 +17,13 @@ public: void AddClient(Client *c); void RemoveClient(Client *c); - void SendPosition(Mob *who); - void SendPositionUpdate(Mob *who, bool send_to_self); + void RotateTo(Mob *who, float to, float speed); + void Teleport(Mob *who, float x, float y, float z, float heading); void NavigateTo(Mob *who, float x, float y, float z, float speed); void StopNavigation(Mob *who); - void Dump(Mob *m, Client *to); + //void Dump(Mob *m, Client *to); + //void DumpStats(Client *to); + //void ClearStats(); static MobMovementManager &Get() { static MobMovementManager inst; @@ -30,12 +35,10 @@ private: MobMovementManager(const MobMovementManager&); MobMovementManager& operator=(const MobMovementManager&); - bool HeadingEqual(float a, float b); - void SendUpdateTo(Mob *who, Client *c, int anim, float heading); - void SendUpdate(Mob *who, int anim, float heading); - void SendUpdateShortDistance(Mob *who, int anim, float heading); - void SendUpdateLongDistance(Mob *who, int anim, float heading); - void ProcessMovement(Mob *who, float x, float y, float z, float speed); + void ProcessRotateCommand(Mob *m, RotateCommand &cmd); + void SendCommandToAllClients(Mob *m, float dx, float dy, float dz, float dh, int anim); + void FillCommandStruct(PlayerPositionUpdateServer_Struct *spu, Mob *m, float dx, float dy, float dz, float dh, int anim); + float FixHeading(float in); struct Implementation; std::unique_ptr _impl; diff --git a/zone/net.cpp b/zone/net.cpp index f51d50bb4..1dd1c9eb3 100644 --- a/zone/net.cpp +++ b/zone/net.cpp @@ -109,7 +109,7 @@ EQEmuLogSys LogSys; const SPDat_Spell_Struct* spells; int32 SPDAT_RECORDS = -1; const ZoneConfig *Config; -uint64_t frame_time = 0; +double frame_time = 0.0; void Shutdown(); extern void MapOpcodes(); @@ -447,7 +447,7 @@ int main(int argc, char** argv) { //Calculate frame time std::chrono::time_point frame_now = std::chrono::system_clock::now(); - frame_time = std::chrono::duration_cast(frame_now - frame_prev).count(); + frame_time = std::chrono::duration_cast>(frame_now - frame_prev).count(); frame_prev = frame_now; if (!eqsf_open && Config->ZonePort != 0) { @@ -674,4 +674,4 @@ void UpdateWindowTitle(char* iNewTitle) { } SetConsoleTitle(tmp); #endif -} \ No newline at end of file +} diff --git a/zone/pathfinder_nav_mesh.cpp b/zone/pathfinder_nav_mesh.cpp index 46e4ead56..7842d84a4 100644 --- a/zone/pathfinder_nav_mesh.cpp +++ b/zone/pathfinder_nav_mesh.cpp @@ -12,7 +12,7 @@ extern Zone *zone; -const int MaxNavmeshNodes = 4092; +const int MaxNavmeshNodes = 4096; struct PathfinderNavmesh::Implementation { @@ -43,9 +43,9 @@ IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const gl if (!m_impl->query) { m_impl->query = dtAllocNavMeshQuery(); - m_impl->query->init(m_impl->nav_mesh, MaxNavmeshNodes); } + m_impl->query->init(m_impl->nav_mesh, MaxNavmeshNodes); glm::vec3 current_location(start.x, start.z, start.y); glm::vec3 dest_location(end.x, end.z, end.y); diff --git a/zone/pathing.cpp b/zone/pathing.cpp index 49e84f72a..96916754c 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -92,7 +92,7 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa auto front = (*Route.begin()).pos; if (PathingLoopCount > 5) { - Teleport(front); + Teleport(front); //todo new teleport SendPosition(); Route.pop_front(); diff --git a/zone/perl_mob.cpp b/zone/perl_mob.cpp index ba0fe9b57..e7504c744 100644 --- a/zone/perl_mob.cpp +++ b/zone/perl_mob.cpp @@ -1166,55 +1166,6 @@ XS(XS_Mob_GMMove) { XSRETURN_EMPTY; } -XS(XS_Mob_SendPosUpdate); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SendPosUpdate) { - dXSARGS; - if (items < 1 || items > 2) - Perl_croak(aTHX_ "Usage: Mob::SendPosUpdate(THIS, [uint8 send_to_self = 0])"); - { - Mob *THIS; - uint8 iSendToSelf; - - if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV *) SvRV(ST(0))); - THIS = INT2PTR(Mob *, tmp); - } else - Perl_croak(aTHX_ "THIS is not of type Mob"); - if (THIS == nullptr) - Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - - if (items < 2) - iSendToSelf = 0; - else { - iSendToSelf = (uint8) SvUV(ST(1)); - } - - THIS->SendPositionUpdate(iSendToSelf != 0 ? true : false); - } - XSRETURN_EMPTY; -} - -XS(XS_Mob_SendPosition); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Mob_SendPosition) { - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: Mob::SendPosition(THIS)"); - { - Mob *THIS; - - if (sv_derived_from(ST(0), "Mob")) { - IV tmp = SvIV((SV *) SvRV(ST(0))); - THIS = INT2PTR(Mob *, tmp); - } else - Perl_croak(aTHX_ "THIS is not of type Mob"); - if (THIS == nullptr) - Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - - THIS->SendPosition(); - } - XSRETURN_EMPTY; -} - XS(XS_Mob_HasProcs); /* prototype to pass -Wmissing-prototypes */ XS(XS_Mob_HasProcs) { dXSARGS; @@ -8549,8 +8500,6 @@ XS(boot_Mob) { newXSproto(strcpy(buf, "DoAnim"), XS_Mob_DoAnim, file, "$$;$"); newXSproto(strcpy(buf, "ChangeSize"), XS_Mob_ChangeSize, file, "$$;$"); newXSproto(strcpy(buf, "GMMove"), XS_Mob_GMMove, file, "$$$$;$"); - newXSproto(strcpy(buf, "SendPosUpdate"), XS_Mob_SendPosUpdate, file, "$;$"); - newXSproto(strcpy(buf, "SendPosition"), XS_Mob_SendPosition, file, "$"); newXSproto(strcpy(buf, "HasProcs"), XS_Mob_HasProcs, file, "$"); newXSproto(strcpy(buf, "IsInvisible"), XS_Mob_IsInvisible, file, "$;$"); newXSproto(strcpy(buf, "SetInvisible"), XS_Mob_SetInvisible, file, "$$"); diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index 39d5b9f5d..0a86d9870 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -217,7 +217,7 @@ Mob* QuestManager::spawn2(int npc_type, int grid, int unused, const glm::vec4& p { npc->AssignWaypoints(grid); } - npc->SendPositionUpdate(); + return npc; } return nullptr; @@ -241,7 +241,7 @@ Mob* QuestManager::unique_spawn(int npc_type, int grid, int unused, const glm::v { npc->AssignWaypoints(grid); } - npc->SendPositionUpdate(); + return npc; } return nullptr; @@ -1693,8 +1693,6 @@ void QuestManager::respawn(int npcTypeID, int grid) { entity_list.AddNPC(owner->CastToNPC(),true,true); if(grid > 0) owner->CastToNPC()->AssignWaypoints(grid); - - owner->SendPositionUpdate(); } } diff --git a/zone/special_attacks.cpp b/zone/special_attacks.cpp index 538934694..ff3559db9 100644 --- a/zone/special_attacks.cpp +++ b/zone/special_attacks.cpp @@ -27,7 +27,7 @@ #include -extern uint64_t frame_time; +extern double frame_time; int Mob::GetBaseSkillDamage(EQEmu::skills::SkillType skill, Mob *target) { @@ -1033,7 +1033,7 @@ void Mob::ProjectileAttack() ProjectileAtk[i].skill = 0; ProjectileAtk[i].speed_mod = 0.0f; } else { - ProjectileAtk[i].increment += frame_time; + ProjectileAtk[i].increment += 1000 * frame_time; } } diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index da345fcdd..adcef8c76 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -826,8 +826,6 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove #endif if(IsClient()) { - CastToClient()->SetSenseExemption(true); - if (CastToClient()->ClientVersionBit() & EQEmu::versions::bit_SoDAndLater) { bodyType bt = BT_Undead; @@ -4038,63 +4036,6 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses) SetLevel(GetOrigLevel()); break; } - - case SE_MovementSpeed: - { - if(IsClient()) - { - Client *my_c = CastToClient(); - uint32 cur_time = Timer::GetCurrentTime(); - if((cur_time - my_c->m_TimeSinceLastPositionCheck) > 1000) - { - float speed = (my_c->m_DistanceSinceLastPositionCheck * 100) / (float)(cur_time - my_c->m_TimeSinceLastPositionCheck); - float runs = my_c->GetRunspeed(); - if(speed > (runs * RuleR(Zone, MQWarpDetectionDistanceFactor))) - { - if(!my_c->GetGMSpeed() && (runs >= my_c->GetBaseRunspeed() || (speed > (my_c->GetBaseRunspeed() * RuleR(Zone, MQWarpDetectionDistanceFactor))))) - { - printf("%s %i moving too fast! moved: %.2f in %ims, speed %.2f\n", __FILE__, __LINE__, - my_c->m_DistanceSinceLastPositionCheck, (cur_time - my_c->m_TimeSinceLastPositionCheck), speed); - if(my_c->IsShadowStepExempted()) - { - if(my_c->m_DistanceSinceLastPositionCheck > 800) - { - my_c->CheatDetected(MQWarpShadowStep, my_c->GetX(), my_c->GetY(), my_c->GetZ()); - } - } - else if(my_c->IsKnockBackExempted()) - { - //still potential to trigger this if you're knocked back off a - //HUGE fall that takes > 2.5 seconds - if(speed > 30.0f) - { - my_c->CheatDetected(MQWarpKnockBack, my_c->GetX(), my_c->GetY(), my_c->GetZ()); - } - } - else if(!my_c->IsPortExempted()) - { - if(!my_c->IsMQExemptedArea(zone->GetZoneID(), my_c->GetX(), my_c->GetY(), my_c->GetZ())) - { - if(speed > (runs * 2 * RuleR(Zone, MQWarpDetectionDistanceFactor))) - { - my_c->m_TimeSinceLastPositionCheck = cur_time; - my_c->m_DistanceSinceLastPositionCheck = 0.0f; - my_c->CheatDetected(MQWarp, my_c->GetX(), my_c->GetY(), my_c->GetZ()); - //my_c->Death(my_c, 10000000, SPELL_UNKNOWN, _1H_BLUNT); - } - else - { - my_c->CheatDetected(MQWarpLight, my_c->GetX(), my_c->GetY(), my_c->GetZ()); - } - } - } - } - } - } - my_c->m_TimeSinceLastPositionCheck = cur_time; - my_c->m_DistanceSinceLastPositionCheck = 0.0f; - } - } } } diff --git a/zone/spells.cpp b/zone/spells.cpp index 60591b7b1..56f992dbe 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -305,8 +305,9 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot, } //To prevent NPC ghosting when spells are cast from scripts - if (IsNPC() && IsMoving() && cast_time > 0) - SendPosition(); + if (IsNPC() && IsMoving() && cast_time > 0) { + StopNavigation(); + } if(resist_adjust) { @@ -2665,23 +2666,6 @@ void Mob::BardPulse(uint16 spell_id, Mob *caster) { action->effect_flag = 4; - if(spells[spell_id].pushback != 0.0f || spells[spell_id].pushup != 0.0f) - { - if(IsClient()) - { - if(!IsBuffSpell(spell_id)) - { - CastToClient()->SetKnockBackExemption(true); - - } - } - } - - if(IsClient() && IsEffectInSpell(spell_id, SE_ShadowStep)) - { - CastToClient()->SetShadowStepExemption(true); - } - if(!IsEffectInSpell(spell_id, SE_BindAffinity)) { CastToClient()->QueuePacket(packet); @@ -3943,13 +3927,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r if(spells[spell_id].pushback != 0.0f || spells[spell_id].pushup != 0.0f) { - if(spelltar->IsClient()) - { - if(!IsBuffSpell(spell_id)) - { - spelltar->CastToClient()->SetKnockBackExemption(true); - } - } else if (RuleB(Spells, NPCSpellPush) && !spelltar->IsRooted() && spelltar->ForcedMovement == 0) { + if (RuleB(Spells, NPCSpellPush) && !spelltar->IsRooted() && spelltar->ForcedMovement == 0) { spelltar->m_Delta.x += action->force * g_Math.FastSin(action->hit_heading); spelltar->m_Delta.y += action->force * g_Math.FastCos(action->hit_heading); spelltar->m_Delta.z += action->hit_pitch; @@ -3957,11 +3935,6 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r } } - if(spelltar->IsClient() && IsEffectInSpell(spell_id, SE_ShadowStep)) - { - spelltar->CastToClient()->SetShadowStepExemption(true); - } - if(!IsEffectInSpell(spell_id, SE_BindAffinity)) { if(spelltar != this && spelltar->IsClient()) // send to target @@ -4940,18 +4913,7 @@ void Mob::Mesmerize() if (casting_spell_id) InterruptSpell(); - SendPosition(); -/* this stuns the client for max time, with no way to break it - if (this->IsClient()){ - EQApplicationPacket* outapp = new EQApplicationPacket(OP_Stun, sizeof(Stun_Struct)); - Stun_Struct* stunon = (Stun_Struct*) outapp->pBuffer; - stunon->duration = 0xFFFF; - this->CastToClient()->QueuePacket(outapp); - safe_delete(outapp); - } else { - SetRunAnimSpeed(0); - } -*/ + StopNavigation(); } void Client::MakeBuffFadePacket(uint16 spell_id, int slot_id, bool send_message) diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index 2295cfd08..c49328848 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -93,7 +93,7 @@ void NPC::StopWandering() { // stops a mob from wandering, takes him off grid and sends him back to spawn point roamer = false; CastToNPC()->SetGrid(0); - SendPosition(); + StopNavigation(); Log(Logs::Detail, Logs::Pathing, "Stop Wandering requested."); return; } @@ -150,7 +150,7 @@ void NPC::PauseWandering(int pausetime) moving = false; DistractedFromGrid = true; Log(Logs::Detail, Logs::Pathing, "Paused Wandering requested. Grid %d. Resuming in %d ms (0=not until told)", GetGrid(), pausetime); - SendPosition(); + StopNavigation(); if (pausetime < 1) { // negative grid number stops him dead in his tracks until ResumeWandering() SetGrid(0 - GetGrid()); } @@ -619,11 +619,6 @@ float Mob::GetFixedZ(const glm::vec3 &destination, int32 z_find_offset) { return new_z; } -void Mob::DumpMovement(Client *to) -{ - mMovementManager->Dump(this, to); -} - void Mob::FixZ(int32 z_find_offset /*= 5*/, bool fix_client_z /*= false*/) { glm::vec3 current_loc(m_Position); diff --git a/zone/zone.cpp b/zone/zone.cpp index 1781dd819..7e2c597e0 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -1644,8 +1644,7 @@ ZonePoint* Zone::GetClosestZonePoint(const glm::vec3& location, uint32 to, Clien // this shouldn't open up any exploits since those situations are detected later on if ((zone->HasWaterMap() && !zone->watermap->InZoneLine(glm::vec3(client->GetPosition()))) || (!zone->HasWaterMap() && closest_dist > 400.0f && closest_dist < max_distance2)) { - if(client) - client->CheatDetected(MQZoneUnknownDest, location.x, location.y, location.z); // Someone is trying to use /zone + //TODO cheat detection Log(Logs::General, Logs::Status, "WARNING: Closest zone point for zone id %d is %f, you might need to update your zone_points table if you dont arrive at the right spot.", to, closest_dist); Log(Logs::General, Logs::Status, ". %s", to_string(location).c_str()); } diff --git a/zone/zoning.cpp b/zone/zoning.cpp index 9dcf0a774..1ca418eb8 100644 --- a/zone/zoning.cpp +++ b/zone/zoning.cpp @@ -95,7 +95,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) { //unable to find a zone point... is there anything else //that can be a valid un-zolicited zone request? - CheatDetected(MQZone, zc->x, zc->y, zc->z); + //Todo cheat detection Message(13, "Invalid unsolicited zone request."); Log(Logs::General, Logs::Error, "Zoning %s: Invalid unsolicited zone request to zone id '%d'.", GetName(), target_zone_id); SendZoneCancel(zc); @@ -130,7 +130,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) { //then we assume this is invalid. if(!zone_point || zone_point->target_zone_id != target_zone_id) { Log(Logs::General, Logs::Error, "Zoning %s: Invalid unsolicited zone request to zone id '%d'.", GetName(), target_zone_id); - CheatDetected(MQGate, zc->x, zc->y, zc->z); + //todo cheat detection SendZoneCancel(zc); return; } @@ -252,7 +252,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) { //for now, there are no other cases... //could not find a valid reason for them to be zoning, stop it. - CheatDetected(MQZoneUnknownDest, 0.0, 0.0, 0.0); + //todo cheat detection Log(Logs::General, Logs::Error, "Zoning %s: Invalid unsolicited zone request to zone id '%s'. Not near a zone point.", GetName(), target_zone_name); SendZoneCancel(zc); return; @@ -296,7 +296,6 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) { void Client::SendZoneCancel(ZoneChange_Struct *zc) { //effectively zone them right back to where they were //unless we find a better way to stop the zoning process. - SetPortExemption(true); EQApplicationPacket *outapp = nullptr; outapp = new EQApplicationPacket(OP_ZoneChange, sizeof(ZoneChange_Struct)); ZoneChange_Struct *zc2 = (ZoneChange_Struct*)outapp->pBuffer; @@ -316,8 +315,6 @@ void Client::SendZoneError(ZoneChange_Struct *zc, int8 err) { Log(Logs::General, Logs::Error, "Zone %i is not available because target wasn't found or character insufficent level", zc->zoneID); - SetPortExemption(true); - EQApplicationPacket *outapp = nullptr; outapp = new EQApplicationPacket(OP_ZoneChange, sizeof(ZoneChange_Struct)); ZoneChange_Struct *zc2 = (ZoneChange_Struct*)outapp->pBuffer; @@ -488,8 +485,6 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z pShortZoneName = database.GetZoneName(zoneID); database.GetZoneLongName(pShortZoneName, &pZoneName); - SetPortExemption(true); - if(!pZoneName) { Message(13, "Invalid zone number specified"); safe_delete_array(pZoneName); From 9fcafbef62396fe2eaa52232850a7cbd5523e0aa Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 1 Oct 2018 21:15:30 -0500 Subject: [PATCH 394/670] Remove navmesh from roambox logic until stuck issues are sorted with movement overhaul --- zone/mob_ai.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 766929c97..5dca4e01e 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1783,6 +1783,7 @@ void NPC::AI_DoMovement() { roambox_destination_y); } + /** bool waypoint_changed, node_reached; glm::vec3 Goal = UpdatePath( @@ -1793,8 +1794,9 @@ void NPC::AI_DoMovement() { waypoint_changed, node_reached ); + **/ - CalculateNewPosition(Goal.x, Goal.y, Goal.z, move_speed, true); + CalculateNewPosition(roambox_destination_x, roambox_destination_y, roambox_destination_z, move_speed, true); if (m_Position.x == roambox_destination_x && m_Position.y == roambox_destination_y) { time_until_can_move = Timer::GetCurrentTime() + RandomTimer(roambox_min_delay, roambox_delay); From 31b70ea74bdf79a61b4e75669ba7c4feb0bf709d Mon Sep 17 00:00:00 2001 From: Uleat Date: Wed, 3 Oct 2018 18:08:27 -0400 Subject: [PATCH 395/670] Fix for world containers failing in experiment mode --- common/patches/rof.cpp | 6 ++++-- common/patches/rof2.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/common/patches/rof.cpp b/common/patches/rof.cpp index da453bffe..f528435f9 100644 --- a/common/patches/rof.cpp +++ b/common/patches/rof.cpp @@ -5781,8 +5781,9 @@ namespace RoF break; } case invtype::typeWorld: { + server_slot = EQEmu::invslot::WORLD_BEGIN; // evidently, [4,-1,-1,-1] is sent when world object is in experimental mode and combine is clicked if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::WORLD_SIZE) { - server_slot = EQEmu::invslot::SHARED_BANK_BEGIN + rof_slot.Slot; + server_slot += rof_slot.Slot; } break; @@ -5949,8 +5950,9 @@ namespace RoF break; } case invtype::typeWorld: { + server_slot = EQEmu::invslot::WORLD_BEGIN; // evidently, [4,-1,-1,-1] is sent when world object is in experimental mode and combine is clicked if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::WORLD_SIZE) { - server_slot = EQEmu::invslot::SHARED_BANK_BEGIN + rof_slot.Slot; + server_slot += rof_slot.Slot; } break; diff --git a/common/patches/rof2.cpp b/common/patches/rof2.cpp index 1632daf3b..de1f139c3 100644 --- a/common/patches/rof2.cpp +++ b/common/patches/rof2.cpp @@ -6071,8 +6071,9 @@ namespace RoF2 break; } case invtype::typeWorld: { + server_slot = EQEmu::invslot::WORLD_BEGIN; // evidently, [4,-1,-1,-1] is sent when world object is in experimental mode and combine is clicked if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::WORLD_SIZE) { - server_slot = EQEmu::invslot::SHARED_BANK_BEGIN + rof2_slot.Slot; + server_slot += rof2_slot.Slot; } break; @@ -6221,8 +6222,9 @@ namespace RoF2 break; } case invtype::typeWorld: { + ServerSlot = EQEmu::invslot::WORLD_BEGIN; // evidently, [4,-1,-1,-1] is sent when world object is in experimental mode and combine is clicked if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::WORLD_SIZE) { - ServerSlot = EQEmu::invslot::SHARED_BANK_BEGIN + rof2_slot.Slot; + ServerSlot += rof2_slot.Slot; } break; From 1ba6801bb240d1802d70a0069cb147f5761753c1 Mon Sep 17 00:00:00 2001 From: Uleat Date: Fri, 5 Oct 2018 07:54:42 -0400 Subject: [PATCH 396/670] Fix for UF and older clients' experiment combine failure --- common/emu_constants.h | 4 ++++ common/eq_constants.h | 14 -------------- common/inventory_profile.cpp | 16 ++++++++-------- common/patches/rof.cpp | 24 +++++++++++++++--------- common/patches/rof2.cpp | 24 +++++++++++++++--------- common/patches/sod.cpp | 8 ++++++++ common/patches/sod_limits.h | 2 ++ common/patches/sof.cpp | 10 +++++++++- common/patches/sof_limits.h | 2 ++ common/patches/titanium.cpp | 6 ++++++ common/patches/titanium_limits.h | 2 ++ common/patches/uf.cpp | 8 ++++++++ common/patches/uf_limits.h | 2 ++ zone/lua_general.cpp | 6 +++--- zone/tradeskills.cpp | 2 +- 15 files changed, 85 insertions(+), 45 deletions(-) diff --git a/common/emu_constants.h b/common/emu_constants.h index f2c0428e8..db49252a3 100644 --- a/common/emu_constants.h +++ b/common/emu_constants.h @@ -83,6 +83,10 @@ namespace EQEmu using RoF2::invslot::SLOT_INVALID; using RoF2::invslot::SLOT_BEGIN; + using Titanium::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE; + + const int16 SLOT_AUGMENT_GENERIC_RETURN = 1001; // clients don't appear to use this method... (internal inventory return value) + using RoF2::invslot::POSSESSIONS_BEGIN; using RoF2::invslot::POSSESSIONS_END; using RoF2::invslot::POSSESSIONS_COUNT; diff --git a/common/eq_constants.h b/common/eq_constants.h index 9ccca95a0..d20bfdf4a 100644 --- a/common/eq_constants.h +++ b/common/eq_constants.h @@ -523,18 +523,4 @@ static const uint8 SkillDamageTypes[EQEmu::skills::HIGHEST_SKILL + 1] = // chang static const uint32 MAX_SPELL_DB_ID_VAL = 65535; -namespace EQEmu -{ - namespace legacy { - enum InventorySlot { - SLOT_CURSOR_END = (int16)0xFFFE, // I hope no one is using this... - SLOT_TRADESKILL = 1000, - SLOT_AUGMENT = 1001, - //SLOT_INVALID = (int16)0xFFFF, - }; - - } // namespace legacy - -} - #endif /*COMMON_EQ_CONSTANTS_H*/ diff --git a/common/inventory_profile.cpp b/common/inventory_profile.cpp index c0f3c25e8..47068a492 100644 --- a/common/inventory_profile.cpp +++ b/common/inventory_profile.cpp @@ -1418,7 +1418,7 @@ int16 EQEmu::InventoryProfile::_HasItem(std::map& bucket, for (int index = invaug::SOCKET_BEGIN; index <= invaug::SOCKET_END; ++index) { if (inst->GetAugmentItemID(index) == item_id && quantity <= 1) - return legacy::SLOT_AUGMENT; + return invslot::SLOT_AUGMENT_GENERIC_RETURN; } if (!inst->IsClassBag()) { continue; } @@ -1435,7 +1435,7 @@ int16 EQEmu::InventoryProfile::_HasItem(std::map& bucket, for (int index = invaug::SOCKET_BEGIN; index <= invaug::SOCKET_END; ++index) { if (bag_inst->GetAugmentItemID(index) == item_id && quantity <= 1) - return legacy::SLOT_AUGMENT; + return invslot::SLOT_AUGMENT_GENERIC_RETURN; } } } @@ -1466,7 +1466,7 @@ int16 EQEmu::InventoryProfile::_HasItem(ItemInstQueue& iqueue, uint32 item_id, u for (int index = invaug::SOCKET_BEGIN; index <= invaug::SOCKET_END; ++index) { if (inst->GetAugmentItemID(index) == item_id && quantity <= 1) - return legacy::SLOT_AUGMENT; + return invslot::SLOT_AUGMENT_GENERIC_RETURN; } if (!inst->IsClassBag()) { continue; } @@ -1483,7 +1483,7 @@ int16 EQEmu::InventoryProfile::_HasItem(ItemInstQueue& iqueue, uint32 item_id, u for (int index = invaug::SOCKET_BEGIN; index <= invaug::SOCKET_END; ++index) { if (bag_inst->GetAugmentItemID(index) == item_id && quantity <= 1) - return legacy::SLOT_AUGMENT; + return invslot::SLOT_AUGMENT_GENERIC_RETURN; } } @@ -1593,7 +1593,7 @@ int16 EQEmu::InventoryProfile::_HasItemByLoreGroup(std::mapGetItem()->LoreGroup == loregroup) - return legacy::SLOT_AUGMENT; + return invslot::SLOT_AUGMENT_GENERIC_RETURN; } if (!inst->IsClassBag()) { continue; } @@ -1610,7 +1610,7 @@ int16 EQEmu::InventoryProfile::_HasItemByLoreGroup(std::mapGetItem()->LoreGroup == loregroup) - return legacy::SLOT_AUGMENT; + return invslot::SLOT_AUGMENT_GENERIC_RETURN; } } } @@ -1633,7 +1633,7 @@ int16 EQEmu::InventoryProfile::_HasItemByLoreGroup(ItemInstQueue& iqueue, uint32 if (aug_inst == nullptr) { continue; } if (aug_inst->GetItem()->LoreGroup == loregroup) - return legacy::SLOT_AUGMENT; + return invslot::SLOT_AUGMENT_GENERIC_RETURN; } if (!inst->IsClassBag()) { continue; } @@ -1650,7 +1650,7 @@ int16 EQEmu::InventoryProfile::_HasItemByLoreGroup(ItemInstQueue& iqueue, uint32 if (aug_inst == nullptr) { continue; } if (aug_inst->GetItem()->LoreGroup == loregroup) - return legacy::SLOT_AUGMENT; + return invslot::SLOT_AUGMENT_GENERIC_RETURN; } } diff --git a/common/patches/rof.cpp b/common/patches/rof.cpp index f528435f9..cb8eddced 100644 --- a/common/patches/rof.cpp +++ b/common/patches/rof.cpp @@ -5002,11 +5002,7 @@ namespace RoF DECODE_LENGTH_EXACT(structs::NewCombine_Struct); SETUP_DIRECT_DECODE(NewCombine_Struct, structs::NewCombine_Struct); - int16 slot_id = RoFToServerSlot(eq->container_slot); - if (slot_id == 4000) { - slot_id = EQEmu::legacy::SLOT_TRADESKILL; // 1000 - } - emu->container_slot = slot_id; + emu->container_slot = RoFToServerSlot(eq->container_slot); emu->guildtribute_slot = RoFToServerSlot(eq->guildtribute_slot); // this should only return INVALID_INDEX until implemented FINISH_DIRECT_DECODE(); @@ -5581,6 +5577,10 @@ namespace RoF RoFSlot.Slot = server_slot - EQEmu::invslot::GUILD_TRIBUTE_BEGIN; } + else if (server_slot == EQEmu::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE) { + RoFSlot.Type = invtype::typeWorld; + } + else if (server_slot <= EQEmu::invslot::BANK_END && server_slot >= EQEmu::invslot::BANK_BEGIN) { RoFSlot.Type = invtype::typeBank; RoFSlot.Slot = server_slot - EQEmu::invslot::BANK_BEGIN; @@ -5781,9 +5781,12 @@ namespace RoF break; } case invtype::typeWorld: { - server_slot = EQEmu::invslot::WORLD_BEGIN; // evidently, [4,-1,-1,-1] is sent when world object is in experimental mode and combine is clicked if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::WORLD_SIZE) { - server_slot += rof_slot.Slot; + server_slot = EQEmu::invslot::WORLD_BEGIN + rof_slot.Slot; + } + + else if (rof_slot.Slot == invslot::SLOT_INVALID) { + server_slot = EQEmu::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE; } break; @@ -5950,9 +5953,12 @@ namespace RoF break; } case invtype::typeWorld: { - server_slot = EQEmu::invslot::WORLD_BEGIN; // evidently, [4,-1,-1,-1] is sent when world object is in experimental mode and combine is clicked if (rof_slot.Slot >= invslot::SLOT_BEGIN && rof_slot.Slot < invtype::WORLD_SIZE) { - server_slot += rof_slot.Slot; + server_slot = EQEmu::invslot::WORLD_BEGIN + rof_slot.Slot; + } + + else if (rof_slot.Slot == invslot::SLOT_INVALID) { + server_slot = EQEmu::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE; } break; diff --git a/common/patches/rof2.cpp b/common/patches/rof2.cpp index de1f139c3..d65ea4cba 100644 --- a/common/patches/rof2.cpp +++ b/common/patches/rof2.cpp @@ -5299,11 +5299,7 @@ namespace RoF2 DECODE_LENGTH_EXACT(structs::NewCombine_Struct); SETUP_DIRECT_DECODE(NewCombine_Struct, structs::NewCombine_Struct); - int16 slot_id = RoF2ToServerSlot(eq->container_slot); - if (slot_id == 4000) { - slot_id = EQEmu::legacy::SLOT_TRADESKILL; // 1000 - } - emu->container_slot = slot_id; + emu->container_slot = RoF2ToServerSlot(eq->container_slot); emu->guildtribute_slot = RoF2ToServerSlot(eq->guildtribute_slot); // this should only return INVALID_INDEX until implemented FINISH_DIRECT_DECODE(); @@ -5887,6 +5883,10 @@ namespace RoF2 RoF2Slot.Slot = server_slot - EQEmu::invslot::GUILD_TRIBUTE_BEGIN; } + else if (server_slot == EQEmu::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE) { + RoF2Slot.Type = invtype::typeWorld; + } + else if (server_slot <= EQEmu::invslot::BANK_END && server_slot >= EQEmu::invslot::BANK_BEGIN) { RoF2Slot.Type = invtype::typeBank; RoF2Slot.Slot = server_slot - EQEmu::invslot::BANK_BEGIN; @@ -6071,9 +6071,12 @@ namespace RoF2 break; } case invtype::typeWorld: { - server_slot = EQEmu::invslot::WORLD_BEGIN; // evidently, [4,-1,-1,-1] is sent when world object is in experimental mode and combine is clicked if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::WORLD_SIZE) { - server_slot += rof2_slot.Slot; + server_slot = EQEmu::invslot::WORLD_BEGIN + rof2_slot.Slot; + } + + else if (rof2_slot.Slot == invslot::SLOT_INVALID) { + server_slot = EQEmu::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE; } break; @@ -6222,9 +6225,12 @@ namespace RoF2 break; } case invtype::typeWorld: { - ServerSlot = EQEmu::invslot::WORLD_BEGIN; // evidently, [4,-1,-1,-1] is sent when world object is in experimental mode and combine is clicked if (rof2_slot.Slot >= invslot::SLOT_BEGIN && rof2_slot.Slot < invtype::WORLD_SIZE) { - ServerSlot += rof2_slot.Slot; + ServerSlot = EQEmu::invslot::WORLD_BEGIN + rof2_slot.Slot; + } + + else if (rof2_slot.Slot == invslot::SLOT_INVALID) { + ServerSlot = EQEmu::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE; } break; diff --git a/common/patches/sod.cpp b/common/patches/sod.cpp index 4abf01ea3..112312afd 100644 --- a/common/patches/sod.cpp +++ b/common/patches/sod.cpp @@ -3809,6 +3809,10 @@ namespace SoD SoDSlot = serverSlot; } + else if (serverSlot == EQEmu::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE) { + SoDSlot = serverSlot; + } + else if (serverSlot <= EQEmu::invslot::BANK_END && serverSlot >= EQEmu::invslot::BANK_BEGIN) { SoDSlot = serverSlot; } @@ -3887,6 +3891,10 @@ namespace SoD server_slot = sod_slot; } + else if (sod_slot == invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE) { + server_slot = sod_slot; + } + else if (sod_slot <= invslot::BANK_END && sod_slot >= invslot::BANK_BEGIN) { server_slot = sod_slot; } diff --git a/common/patches/sod_limits.h b/common/patches/sod_limits.h index 555425cc1..82381355e 100644 --- a/common/patches/sod_limits.h +++ b/common/patches/sod_limits.h @@ -150,6 +150,8 @@ namespace SoD const int16 SLOT_INVALID = IINVALID; const int16 SLOT_BEGIN = INULL; + const int16 SLOT_TRADESKILL_EXPERIMENT_COMBINE = 1000; + const int16 POSSESSIONS_BEGIN = slotCharm; const int16 POSSESSIONS_END = slotCursor; const int16 POSSESSIONS_COUNT = (POSSESSIONS_END - POSSESSIONS_BEGIN) + 1; diff --git a/common/patches/sof.cpp b/common/patches/sof.cpp index 7497df94c..52af1244f 100644 --- a/common/patches/sof.cpp +++ b/common/patches/sof.cpp @@ -3199,6 +3199,10 @@ namespace SoF sof_slot = server_slot; } + else if (server_slot == EQEmu::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE) { + sof_slot = server_slot; + } + else if (server_slot <= EQEmu::invslot::BANK_END && server_slot >= EQEmu::invslot::BANK_BEGIN) { sof_slot = server_slot; } @@ -3281,6 +3285,10 @@ namespace SoF server_slot = sof_slot; } + else if (sof_slot == invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE) { + server_slot = sof_slot; + } + else if (sof_slot <= invslot::BANK_END && sof_slot >= invslot::BANK_BEGIN) { server_slot = sof_slot; } @@ -3505,4 +3513,4 @@ namespace SoF // we're a normal buff return index; // as long as we guard against bad slots server side, we should be fine } -} \ No newline at end of file +} diff --git a/common/patches/sof_limits.h b/common/patches/sof_limits.h index fdc688370..ab5a32807 100644 --- a/common/patches/sof_limits.h +++ b/common/patches/sof_limits.h @@ -150,6 +150,8 @@ namespace SoF const int16 SLOT_INVALID = IINVALID; const int16 SLOT_BEGIN = INULL; + const int16 SLOT_TRADESKILL_EXPERIMENT_COMBINE = 1000; + const int16 POSSESSIONS_BEGIN = slotCharm; const int16 POSSESSIONS_END = slotCursor; const int16 POSSESSIONS_COUNT = (POSSESSIONS_END - POSSESSIONS_BEGIN) + 1; diff --git a/common/patches/titanium.cpp b/common/patches/titanium.cpp index 85aea5a82..2a1345ad0 100644 --- a/common/patches/titanium.cpp +++ b/common/patches/titanium.cpp @@ -2504,6 +2504,9 @@ namespace Titanium server_slot >= EQEmu::invslot::GUILD_TRIBUTE_BEGIN) { titanium_slot = server_slot; } + else if (server_slot == EQEmu::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE) { + titanium_slot = server_slot; + } else if (server_slot <= EQEmu::invslot::BANK_END && server_slot >= EQEmu::invslot::BANK_BEGIN) { titanium_slot = server_slot; } @@ -2586,6 +2589,9 @@ namespace Titanium else if (titanium_slot <= invslot::TRIBUTE_END && titanium_slot >= invslot::TRIBUTE_BEGIN) { server_slot = titanium_slot; } + else if (titanium_slot == invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE) { + server_slot = titanium_slot; + } else if (titanium_slot <= invslot::GUILD_TRIBUTE_END && titanium_slot >= invslot::GUILD_TRIBUTE_BEGIN) { server_slot = titanium_slot; } diff --git a/common/patches/titanium_limits.h b/common/patches/titanium_limits.h index cd69c21e1..33fb3bdc5 100644 --- a/common/patches/titanium_limits.h +++ b/common/patches/titanium_limits.h @@ -149,6 +149,8 @@ namespace Titanium const int16 SLOT_INVALID = IINVALID; const int16 SLOT_BEGIN = INULL; + const int16 SLOT_TRADESKILL_EXPERIMENT_COMBINE = 1000; + const int16 POSSESSIONS_BEGIN = slotCharm; const int16 POSSESSIONS_END = slotCursor; const int16 POSSESSIONS_COUNT = (POSSESSIONS_END - POSSESSIONS_BEGIN) + 1; diff --git a/common/patches/uf.cpp b/common/patches/uf.cpp index d2a50541f..b199197a2 100644 --- a/common/patches/uf.cpp +++ b/common/patches/uf.cpp @@ -4168,6 +4168,10 @@ namespace UF UFSlot = serverSlot; } + else if (serverSlot == EQEmu::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE) { + UFSlot = serverSlot; + } + else if (serverSlot <= EQEmu::invslot::BANK_END && serverSlot >= EQEmu::invslot::BANK_BEGIN) { UFSlot = serverSlot; } @@ -4246,6 +4250,10 @@ namespace UF ServerSlot = ufSlot; } + else if (ufSlot == invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE) { + ServerSlot = ufSlot; + } + else if (ufSlot <= invslot::BANK_END && ufSlot >= invslot::BANK_BEGIN) { ServerSlot = ufSlot; } diff --git a/common/patches/uf_limits.h b/common/patches/uf_limits.h index 52924f94d..ef00b912e 100644 --- a/common/patches/uf_limits.h +++ b/common/patches/uf_limits.h @@ -150,6 +150,8 @@ namespace UF const int16 SLOT_INVALID = IINVALID; const int16 SLOT_BEGIN = INULL; + const int16 SLOT_TRADESKILL_EXPERIMENT_COMBINE = 1000; + const int16 POSSESSIONS_BEGIN = slotCharm; const int16 POSSESSIONS_END = slotCursor; const int16 POSSESSIONS_COUNT = (POSSESSIONS_END - POSSESSIONS_BEGIN) + 1; diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp index 3467673d8..65fe2c575 100644 --- a/zone/lua_general.cpp +++ b/zone/lua_general.cpp @@ -1908,6 +1908,8 @@ luabind::scope lua_register_slot() { luabind::value("GeneralBagsEnd", static_cast(EQEmu::invbag::GENERAL_BAGS_END)), luabind::value("CursorBagBegin", static_cast(EQEmu::invbag::CURSOR_BAG_BEGIN)), luabind::value("CursorBagEnd", static_cast(EQEmu::invbag::CURSOR_BAG_END)), + luabind::value("Tradeskill", static_cast(EQEmu::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE)), + luabind::value("Augment", static_cast(EQEmu::invslot::SLOT_AUGMENT_GENERIC_RETURN)), // will be revised out luabind::value("BankBegin", static_cast(EQEmu::invslot::BANK_BEGIN)), luabind::value("BankEnd", static_cast(EQEmu::invslot::BANK_END)), luabind::value("BankBagsBegin", static_cast(EQEmu::invbag::BANK_BAGS_BEGIN)), @@ -1929,9 +1931,7 @@ luabind::scope lua_register_slot() { luabind::value("Ring2", static_cast(EQEmu::invslot::slotFinger2)), // deprecated luabind::value("PersonalBegin", static_cast(EQEmu::invslot::GENERAL_BEGIN)), // deprecated luabind::value("PersonalEnd", static_cast(EQEmu::invslot::GENERAL_END)), // deprecated - luabind::value("CursorEnd", 0xFFFE), // deprecated - luabind::value("Tradeskill", static_cast(EQEmu::legacy::SLOT_TRADESKILL)), // deprecated - luabind::value("Augment", static_cast(EQEmu::legacy::SLOT_AUGMENT)) // deprecated + luabind::value("CursorEnd", 0xFFFE) // deprecated (not in use..and never valid vis-a-vis client behavior) ]; } diff --git a/zone/tradeskills.cpp b/zone/tradeskills.cpp index a6e0dbd34..72cb51795 100644 --- a/zone/tradeskills.cpp +++ b/zone/tradeskills.cpp @@ -264,7 +264,7 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob uint32 some_id = 0; bool worldcontainer=false; - if (in_combine->container_slot == EQEmu::legacy::SLOT_TRADESKILL) { + if (in_combine->container_slot == EQEmu::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE) { if(!worldo) { user->Message(13, "Error: Server is not aware of the tradeskill container you are attempting to use"); return; From e6d3210b1f85469f908efeb850c106f443849280 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Fri, 5 Oct 2018 16:50:23 -0400 Subject: [PATCH 397/670] Allow UseLevelAggro rule to be configurable. --- common/ruletypes.h | 3 ++- zone/aggro.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common/ruletypes.h b/common/ruletypes.h index 1796c9e4d..0840e89ab 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -554,7 +554,8 @@ RULE_REAL(Aggro, TunnelVisionAggroMod, 0.75) //people not currently the top hate RULE_INT(Aggro, MaxScalingProcAggro, 400) // Set to -1 for no limit. Maxmimum amount of aggro that HP scaling SPA effect in a proc will add. RULE_INT(Aggro, IntAggroThreshold, 75) // Int <= this will aggro regardless of level difference. RULE_BOOL(Aggro, AllowTickPulling, false) // tick pulling is an exploit in an NPC's call for help fixed sometime in 2006 on live -RULE_BOOL(Aggro, UseLevelAggro, true) // Level 18+ and Undead will aggro regardless of level difference. (this will disabled Rule:IntAggroThreshold if set to true) +RULE_INT(Aggro, MinAggroLevel, 18) // For use with UseLevelAggro +RULE_BOOL(Aggro, UseLevelAggro, true) // MinAggroLevel rule value+ and Undead will aggro regardless of level difference. (this will disabled Rule:IntAggroThreshold if set to true) RULE_INT(Aggro, ClientAggroCheckInterval, 6) // Interval in which clients actually check for aggro - in seconds RULE_REAL(Aggro, PetAttackRange, 40000.0) // max squared range /pet attack works at default is 200 RULE_BOOL(Aggro, NPCAggroMaxDistanceEnabled, true) /* If enabled, NPC's will drop aggro beyond 600 units or what is defined at the zone level */ diff --git a/zone/aggro.cpp b/zone/aggro.cpp index f8162322e..17b11afbd 100644 --- a/zone/aggro.cpp +++ b/zone/aggro.cpp @@ -158,7 +158,7 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) { if (RuleB(Aggro, UseLevelAggro)) { - if (GetLevel() < 18 && mob->GetLevelCon(GetLevel()) == CON_GRAY && GetBodyType() != 3) + if (GetLevel() < RuleI(Aggro, MinAggroLevel) && mob->GetLevelCon(GetLevel()) == CON_GRAY && GetBodyType() != 3) { towho->Message(0, "...%s is red to me (basically)", mob->GetName(), dist2, iAggroRange2); return; @@ -336,7 +336,7 @@ bool Mob::CheckWillAggro(Mob *mob) { ( //old InZone check taken care of above by !mob->CastToClient()->Connected() ( - ( GetLevel() >= 18 ) + ( GetLevel() >= RuleI(Aggro, MinAggroLevel)) ||(GetBodyType() == 3) ||( mob->IsClient() && mob->CastToClient()->IsSitting() ) ||( mob->GetLevelCon(GetLevel()) != CON_GRAY) From 94c17f941c78d445a3f48aa86d9cf974b76f2c71 Mon Sep 17 00:00:00 2001 From: Uleat Date: Sat, 6 Oct 2018 23:23:29 -0400 Subject: [PATCH 398/670] Fixed a few bot issues... --- changelog.txt | 6 +++++ zone/bot.cpp | 19 +++++++++++--- zone/bot.h | 3 +++ zone/hate_list.cpp | 63 ++++++++++++++++++++++++++++++++++++++++++++++ zone/hate_list.h | 2 ++ 5 files changed, 89 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index 7ba6c61c9..da28bf394 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,11 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 10/06/2018 == +Uleat: Fixed a few bot issues.. + - Fix for bot 'stop melee level' not honoring setting level over rule level + - Fix for missing bot combat spell casting when within melee range + - Fix (in-work) for bots 'forgetting' current target when it flees + == 07/10/2018 == Akkadius: Adjusted DataBuckets to use other acceptable time formats Example: quest::set_data('key', 'value', '1d'); diff --git a/zone/bot.cpp b/zone/bot.cpp index a5dd4aa41..b2fac55e4 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -2261,10 +2261,15 @@ void Bot::AI_Process() { } if (find_target) { - if (IsRooted()) + if (IsRooted()) { SetTarget(hate_list.GetClosestEntOnHateList(this)); - else - SetTarget(hate_list.GetEntWithMostHateOnList(this)); + } + else { + // This will keep bots on target for now..but, future updates will allow for rooting/stunning + SetTarget(hate_list.GetEscapingEntOnHateList(leash_owner, BOT_LEASH_DISTANCE)); + if (!GetTarget()) + SetTarget(hate_list.GetEntWithMostHateOnList(this)); + } } TEST_TARGET(); @@ -2471,6 +2476,8 @@ void Bot::AI_Process() { ChangeBotArcherWeapons(IsBotArcher()); } + // all of this needs review... + if (IsBotArcher() && atArcheryRange) atCombatRange = true; else if (caster_distance_max && tar_distance <= caster_distance_max) @@ -2567,6 +2574,10 @@ void Bot::AI_Process() { } } + if (!IsBotNonSpellFighter() && AI_EngagedCastCheck()) { + return; + } + // Up to this point, GetTarget() has been safe to dereference since the initial // TEST_TARGET() call. Due to the chance of the target dying and our pointer // being nullified, we need to test it before dereferencing to avoid crashes @@ -2576,7 +2587,7 @@ void Bot::AI_Process() { if (GetTarget()->GetHPRatio() <= 99.0f) BotRangedAttack(tar); } - else if (!IsBotArcher() && (!(IsBotCaster() && GetLevel() >= RuleI(Bots, CasterStopMeleeLevel)))) { + else if (!IsBotArcher() && (IsBotNonSpellFighter() || GetLevel() < GetStopMeleeLevel())) { // we can't fight if we don't have a target, are stun/mezzed or dead.. // Stop attacking if the target is enraged TEST_TARGET(); diff --git a/zone/bot.h b/zone/bot.h index 0c48b6483..5c3ccdb6a 100644 --- a/zone/bot.h +++ b/zone/bot.h @@ -534,6 +534,9 @@ public: bool IsBotCaster() { return IsCasterClass(GetClass()); } bool IsBotINTCaster() { return IsINTCasterClass(GetClass()); } bool IsBotWISCaster() { return IsWISCasterClass(GetClass()); } + bool IsBotSpellFighter() { return IsSpellFighterClass(GetClass()); } + bool IsBotFighter() { return IsFighterClass(GetClass()); } + bool IsBotNonSpellFighter() { return IsNonSpellFighterClass(GetClass()); } bool CanHeal(); int GetRawACNoShield(int &shield_ac); diff --git a/zone/hate_list.cpp b/zone/hate_list.cpp index 5649c0da4..3f1fbf892 100644 --- a/zone/hate_list.cpp +++ b/zone/hate_list.cpp @@ -538,6 +538,69 @@ Mob *HateList::GetRandomEntOnHateList() return (*iterator)->entity_on_hatelist; } +Mob *HateList::GetEscapingEntOnHateList() { + // function is still in design stage + + for (auto iter : list) { + if (!iter->entity_on_hatelist) + continue; + + if (!iter->entity_on_hatelist->IsFeared()) + continue; + + if (iter->entity_on_hatelist->IsRooted()) + continue; + if (iter->entity_on_hatelist->IsMezzed()) + continue; + if (iter->entity_on_hatelist->IsStunned()) + continue; + + return iter->entity_on_hatelist; + } + + return nullptr; +} + +Mob *HateList::GetEscapingEntOnHateList(Mob *center, float range, bool first) { + // function is still in design stage + + if (!center) + return nullptr; + + Mob *escaping_mob = nullptr; + float mob_distance = 0.0f; + + for (auto iter : list) { + if (!iter->entity_on_hatelist) + continue; + + if (!iter->entity_on_hatelist->IsFeared()) + continue; + + if (iter->entity_on_hatelist->IsRooted()) + continue; + if (iter->entity_on_hatelist->IsMezzed()) + continue; + if (iter->entity_on_hatelist->IsStunned()) + continue; + + float distance_test = DistanceSquared(center->GetPosition(), iter->entity_on_hatelist->GetPosition()); + + if (range > 0.0f && distance_test > range) + continue; + + if (first) + return iter->entity_on_hatelist; + + if (distance_test > mob_distance) { + escaping_mob = iter->entity_on_hatelist; + mob_distance = distance_test; + } + } + + return escaping_mob; +} + int32 HateList::GetEntHateAmount(Mob *in_entity, bool damage) { struct_HateList *entity; diff --git a/zone/hate_list.h b/zone/hate_list.h index 0ac1840ac..96d8ed067 100644 --- a/zone/hate_list.h +++ b/zone/hate_list.h @@ -46,6 +46,8 @@ public: Mob *GetEntWithMostHateOnList(Mob *center, Mob *skip = nullptr); Mob *GetRandomEntOnHateList(); Mob *GetEntWithMostHateOnList(); + Mob *GetEscapingEntOnHateList(); // returns first eligble entity + Mob *GetEscapingEntOnHateList(Mob *center, float range = 0.0f, bool first = false); bool IsEntOnHateList(Mob *mob); bool IsHateListEmpty(); From df885b917982af4b9379f6c92f72b2e943b9e971 Mon Sep 17 00:00:00 2001 From: Uleat Date: Sun, 7 Oct 2018 20:41:26 -0400 Subject: [PATCH 399/670] Fixed a few bot issues... --- changelog.txt | 5 +++++ zone/bot.cpp | 20 +++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index da28bf394..7db2d3c11 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,10 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 10/07/2018 == +Uleat: Fixed a few bot issues.. + - Fix for bot item trades not attuning + - Fix for bot mana, endurance not updating properly + == 10/06/2018 == Uleat: Fixed a few bot issues.. - Fix for bot 'stop melee level' not honoring setting level over rule level diff --git a/zone/bot.cpp b/zone/bot.cpp index b2fac55e4..a3cb05485 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -1850,6 +1850,13 @@ bool Bot::Process() { SendHPUpdate(); if(HasPet()) GetPet()->SendHPUpdate(); + + // hack fix until percentage changes can be implemented + auto g = GetGroup(); + if (g) { + g->SendManaPacketFrom(this); + g->SendEndurancePacketFrom(this); + } } if(GetAppearance() == eaDead && GetHP() > 0) @@ -3904,6 +3911,8 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli client->ResetTrade(); return; } + // non-failing checks above are causing this to trigger (i.e., !ItemClassCommon and !IsEquipable{race, class, min_level}) + // this process is hindered by not having bots use the inventory trade method (TODO: implement bot inventory use) if (client->CheckLoreConflict(return_instance->GetItem())) { client->Message(CC_Yellow, "You already have lore equipment matching the item '%s' - Trade Canceled!", return_instance->GetItem()->Name); client->ResetTrade(); @@ -4007,8 +4016,17 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli m_inv.PutItem(trade_iterator.toBotSlot, *trade_iterator.tradeItemInstance); this->BotAddEquipItem(trade_iterator.toBotSlot, (trade_iterator.tradeItemInstance ? trade_iterator.tradeItemInstance->GetID() : 0)); + trade_iterator.tradeItemInstance = nullptr; // actual deletion occurs in client delete below + client->DeleteItemInInventory(trade_iterator.fromClientSlot, 0, (trade_iterator.fromClientSlot == EQEmu::invslot::slotCursor)); - trade_iterator.tradeItemInstance = nullptr; + + // database currently has unattuned item saved in inventory..it will be attuned on next bot load + // this prevents unattuned item returns in the mean time (TODO: re-work process) + if (trade_iterator.toBotSlot >= invslot::EQUIPMENT_BEGIN && trade_iterator.toBotSlot <= invslot::EQUIPMENT_END) { + auto attune_item = m_inv.GetItem(trade_iterator.toBotSlot); + if (attune_item && attune_item->GetItem()->Attuneable) + attune_item->SetAttuned(true); + } } // trade messages From 72bf4b7e3cb17f6fbf17f17f166708e3ba57a504 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Tue, 9 Oct 2018 08:38:35 -0500 Subject: [PATCH 400/670] Send HP updates when mobs update regen hp internally --- zone/mob.cpp | 89 ++++++++++++++++++++++++++++++++----------------- zone/mob.h | 4 +-- zone/npc.cpp | 93 ++++++++++++++++++++++++++-------------------------- 3 files changed, 108 insertions(+), 78 deletions(-) diff --git a/zone/mob.cpp b/zone/mob.cpp index 9764ba099..45a41df6e 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -253,7 +253,7 @@ Mob::Mob(const char* in_name, max_mana = 0; hp_regen = in_hp_regen; mana_regen = in_mana_regen; - oocregen = RuleI(NPC, OOCRegen); //default Out of Combat Regen + ooc_regen = RuleI(NPC, OOCRegen); //default Out of Combat Regen maxlevel = in_maxlevel; scalerate = in_scalerate; invisible = false; @@ -1303,14 +1303,17 @@ void Mob::CreateHPPacket(EQApplicationPacket* app) } } -// sends hp update of this mob to people who might care -void Mob::SendHPUpdate(bool skip_self /*= false*/, bool force_update_all /*= false*/) -{ - - /* If our HP is different from last HP update call - let's update ourself */ +void Mob::SendHPUpdate(bool skip_self /*= false*/, bool force_update_all /*= false*/) { + + /** + * If our HP is different from last HP update call - let's update selves + */ if (IsClient()) { if (cur_hp != last_hp || force_update_all) { - /* This is to prevent excessive packet sending under trains/fast combat */ + + /** + * This is to prevent excessive packet sending under trains/fast combat + */ if (this->CastToClient()->hp_self_update_throttle_timer.Check() || force_update_all) { Log(Logs::General, Logs::HP_Update, "Mob::SendHPUpdate :: Update HP of self (%s) HP: %i last: %i skip_self: %s", @@ -1322,11 +1325,12 @@ void Mob::SendHPUpdate(bool skip_self /*= false*/, bool force_update_all /*= fal if (!skip_self || this->CastToClient()->ClientVersion() >= EQEmu::versions::ClientVersion::SoD) { auto client_packet = new EQApplicationPacket(OP_HPUpdate, sizeof(SpawnHPUpdate_Struct)); - SpawnHPUpdate_Struct* hp_packet_client = (SpawnHPUpdate_Struct*)client_packet->pBuffer; - hp_packet_client->cur_hp = CastToClient()->GetHP() - itembonuses.HP; + SpawnHPUpdate_Struct *hp_packet_client = (SpawnHPUpdate_Struct *) client_packet->pBuffer; + + hp_packet_client->cur_hp = CastToClient()->GetHP() - itembonuses.HP; hp_packet_client->spawn_id = GetID(); - hp_packet_client->max_hp = CastToClient()->GetMaxHP() - itembonuses.HP; + hp_packet_client->max_hp = CastToClient()->GetMaxHP() - itembonuses.HP; CastToClient()->QueuePacket(client_packet); @@ -1335,7 +1339,9 @@ void Mob::SendHPUpdate(bool skip_self /*= false*/, bool force_update_all /*= fal ResetHPUpdateTimer(); } - /* Used to check if HP has changed to update self next round */ + /** + * Used to check if HP has changed to update self next round + */ last_hp = cur_hp; } } @@ -1343,7 +1349,12 @@ void Mob::SendHPUpdate(bool skip_self /*= false*/, bool force_update_all /*= fal int8 current_hp_percent = (max_hp == 0 ? 0 : static_cast(cur_hp * 100 / max_hp)); - Log(Logs::General, Logs::HP_Update, "Mob::SendHPUpdate :: SendHPUpdate %s HP is %i last %i", this->GetCleanName(), current_hp_percent, last_hp_percent); + Log(Logs::General, + Logs::HP_Update, + "Mob::SendHPUpdate :: SendHPUpdate %s HP is %i last %i", + this->GetCleanName(), + current_hp_percent, + last_hp_percent); if (current_hp_percent == last_hp_percent && !force_update_all) { Log(Logs::General, Logs::HP_Update, "Mob::SendHPUpdate :: Same HP - skipping update"); @@ -1352,8 +1363,9 @@ void Mob::SendHPUpdate(bool skip_self /*= false*/, bool force_update_all /*= fal } else { - if (IsClient() && RuleB(Character, MarqueeHPUpdates)) + if (IsClient() && RuleB(Character, MarqueeHPUpdates)) { this->CastToClient()->SendHPUpdateMarquee(); + } Log(Logs::General, Logs::HP_Update, "Mob::SendHPUpdate :: HP Changed - Send update"); @@ -1361,52 +1373,69 @@ void Mob::SendHPUpdate(bool skip_self /*= false*/, bool force_update_all /*= fal } EQApplicationPacket hp_packet; - Group *group = nullptr; + Group *group = nullptr; CreateHPPacket(&hp_packet); - /* Update those who have us targeted */ + /** + * Update those who have us targeted + */ entity_list.QueueClientsByTarget(this, &hp_packet, false, 0, false, true, EQEmu::versions::bit_AllClients); - /* Update those who have us on x-target */ + /** + * Update those who have us on x-target + */ entity_list.QueueClientsByXTarget(this, &hp_packet, false); - /* Update groups using Group LAA health name tag counter */ + /** + * Update groups using Group LAA health name tag counter + */ entity_list.QueueToGroupsForNPCHealthAA(this, &hp_packet); - /* Update group */ - if(IsGrouped()) { + /** + * Group + */ + if (IsGrouped()) { group = entity_list.GetGroupByMob(this); - if(group) + if (group) { group->SendHPPacketsFrom(this); + } } - /* Update Raid */ - if(IsClient()){ + /** + * Raid + */ + if (IsClient()) { Raid *raid = entity_list.GetRaidByClient(CastToClient()); - if (raid) + if (raid) { raid->SendHPManaEndPacketsFrom(this); + } } - /* Pet - Update master - group and raid if exists */ - if(GetOwner() && GetOwner()->IsClient()) { + /** + * Pet + */ + if (GetOwner() && GetOwner()->IsClient()) { GetOwner()->CastToClient()->QueuePacket(&hp_packet, false); group = entity_list.GetGroupByClient(GetOwner()->CastToClient()); - if(group) + if (group) { group->SendHPPacketsFrom(this); + } Raid *raid = entity_list.GetRaidByClient(GetOwner()->CastToClient()); - if(raid) + if (raid) { raid->SendHPManaEndPacketsFrom(this); + } } - /* Send to pet */ - if(GetPet() && GetPet()->IsClient()) { + if (GetPet() && GetPet()->IsClient()) { GetPet()->CastToClient()->QueuePacket(&hp_packet, false); } - /* Destructible objects */ + /** + * Destructible objects + */ if (IsNPC() && IsDestructibleObject()) { if (GetHPRatio() > 74) { if (GetAppearance() != eaStanding) { diff --git a/zone/mob.h b/zone/mob.h index 4dafe2bf9..30464822c 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -421,7 +421,7 @@ public: bool avoidable = true, int8 buffslot = -1, bool iBuffTic = false, eSpecialAttacks special = eSpecialAttacks::None) = 0; inline virtual void SetHP(int32 hp) { if (hp >= max_hp) cur_hp = max_hp; else cur_hp = hp;} bool ChangeHP(Mob* other, int32 amount, uint16 spell_id = 0, int8 buffslot = -1, bool iBuffTic = false); - inline void SetOOCRegen(int32 newoocregen) {oocregen = newoocregen;} + inline void SetOOCRegen(int32 newoocregen) {ooc_regen = newoocregen;} virtual void Heal(); virtual void HealDamage(uint32 ammount, Mob* caster = nullptr, uint16 spell_id = SPELL_UNKNOWN); virtual void SetMaxHP() { cur_hp = max_hp; } @@ -1223,7 +1223,7 @@ protected: int32 max_mana; int32 hp_regen; int32 mana_regen; - int32 oocregen; + int32 ooc_regen; uint8 maxlevel; uint32 scalerate; Buffs_Struct *buffs; diff --git a/zone/npc.cpp b/zone/npc.cpp index bf1508858..2b1af6de9 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -667,77 +667,78 @@ bool NPC::Process() parse->EventNPC(EVENT_TICK, this, nullptr, "", 0); BuffProcess(); - if (currently_fleeing) + if (currently_fleeing) { ProcessFlee(); - - uint32 sitting_bonus = 0; - uint32 petbonus = 0; - uint32 bestregen = 0; - int32 dbregen = GetNPCHPRegen(); - - if (GetAppearance() == eaSitting) - sitting_bonus += 3; - - int32 OOCRegen = 0; - if (oocregen > 0) { //should pull from Mob class - OOCRegen += GetMaxHP() * oocregen / 100; } - // Fixing NPC regen.NPCs should regen to full during - // a set duration, not based on their HPs.Increase NPC's HPs by - // % of total HPs / tick. - // - // If oocregen set in db, apply to pets as well. - // This allows the obscene #s for pets in the db to be tweaked - // while maintaining a decent ooc regen. + uint32 npc_sitting_regen_bonus = 0; + uint32 pet_regen_bonus = 0; + uint32 npc_regen = 0; + int32 npc_hp_regen = GetNPCHPRegen(); - bestregen = std::max(dbregen,OOCRegen); + if (GetAppearance() == eaSitting) { + npc_sitting_regen_bonus += 3; + } + + int32 ooc_regen_calc = 0; + if (ooc_regen > 0) { //should pull from Mob class + ooc_regen_calc += GetMaxHP() * ooc_regen / 100; + } + + /** + * Use max value between two values + */ + npc_regen = std::max(npc_hp_regen, ooc_regen_calc); if ((GetHP() < GetMaxHP()) && !IsPet()) { - if (!IsEngaged()) - SetHP(GetHP() + bestregen + sitting_bonus); - else - SetHP(GetHP() + dbregen); + if (!IsEngaged()) { + SetHP(GetHP() + npc_regen + npc_sitting_regen_bonus); + } + else { + SetHP(GetHP() + npc_hp_regen); + } } else if (GetHP() < GetMaxHP() && GetOwnerID() != 0) { if (!IsEngaged()) { - if (oocregen > 0) { - petbonus = std::max(OOCRegen,dbregen); + if (ooc_regen > 0) { + pet_regen_bonus = std::max(ooc_regen_calc, npc_hp_regen); } else { - petbonus = dbregen + (GetLevel() / 5); + pet_regen_bonus = npc_hp_regen + (GetLevel() / 5); } - SetHP(GetHP() + sitting_bonus + petbonus); + SetHP(GetHP() + npc_sitting_regen_bonus + pet_regen_bonus); } - else - SetHP(GetHP() + dbregen); + else { + SetHP(GetHP() + npc_hp_regen); + } + + } + else { + SetHP(GetHP() + npc_hp_regen + npc_sitting_regen_bonus); } - else - SetHP(GetHP() + dbregen + sitting_bonus); if (GetMana() < GetMaxMana()) { - SetMana(GetMana() + mana_regen + sitting_bonus); + SetMana(GetMana() + mana_regen + npc_sitting_regen_bonus); } + SendHPUpdate(); - if (zone->adv_data && !p_depop) - { - ServerZoneAdventureDataReply_Struct* ds = (ServerZoneAdventureDataReply_Struct*)zone->adv_data; - if (ds->type == Adventure_Rescue && ds->data_id == GetNPCTypeID()) - { + if (zone->adv_data && !p_depop) { + ServerZoneAdventureDataReply_Struct *ds = (ServerZoneAdventureDataReply_Struct *) zone->adv_data; + if (ds->type == Adventure_Rescue && ds->data_id == GetNPCTypeID()) { Mob *o = GetOwner(); - if (o && o->IsClient()) - { + if (o && o->IsClient()) { float x_diff = ds->dest_x - GetX(); float y_diff = ds->dest_y - GetY(); float z_diff = ds->dest_z - GetZ(); - float dist = ((x_diff * x_diff) + (y_diff * y_diff) + (z_diff * z_diff)); - if (dist < RuleR(Adventure, DistanceForRescueComplete)) - { + float dist = ((x_diff * x_diff) + (y_diff * y_diff) + (z_diff * z_diff)); + if (dist < RuleR(Adventure, DistanceForRescueComplete)) { zone->DoAdventureCountIncrease(); - Say("You don't know what this means to me. Thank you so much for finding and saving me from" - " this wretched place. I'll find my way from here."); + Say( + "You don't know what this means to me. Thank you so much for finding and saving me from" + " this wretched place. I'll find my way from here." + ); Depop(); } } From df899bb2df5446df19730cbad9527be0f6ff8dc8 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Tue, 9 Oct 2018 14:18:24 -0400 Subject: [PATCH 401/670] Tweak NPC AI Heal logic a bit New rule: Spells:AI_HealHPPct defaults to 50 This is the default maximum HP and NPC will start a heal The spell AI fields min_hp and max_hp are now used to override the HP percentages they will heal at --- common/ruletypes.h | 1 + zone/mob_ai.cpp | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/common/ruletypes.h b/common/ruletypes.h index 4e9d61c7f..16e85805d 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -389,6 +389,7 @@ RULE_INT(Spells, AI_PursueDetrimentalChance, 90) // Chance while chasing target RULE_INT(Spells, AI_IdleNoSpellMinRecast, 6000) // AI spell recast time(MS) check when no spell is cast while idle. (min time in random) RULE_INT(Spells, AI_IdleNoSpellMaxRecast, 60000) // AI spell recast time(MS) check when no spell is cast while chasing target. (max time in random) RULE_INT(Spells, AI_IdleBeneficialChance, 100) // Chance while idle to do a beneficial spell on self or others. +RULE_INT(Spells, AI_HealHPPct, 50) // HP Pct NPCs will start heals at (in and out of combat) if spell's max_hp is not set RULE_BOOL(Spells, SHDProcIDOffByOne, true) // pre June 2009 SHD spell procs were off by 1, they stopped doing this in June 2009 (so UF+ spell files need this false) RULE_BOOL(Spells, Jun182014HundredHandsRevamp, false) // this should be true for if you import a spell file newer than June 18, 2014 RULE_BOOL(Spells, SwarmPetTargetLock, false) // Use old method of swarm pets target locking till target dies then despawning. diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 5dca4e01e..e4066e2cc 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -97,10 +97,11 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes, bool bInnates continue; } - if (AIspells[i].min_hp != 0 && GetIntHPRatio() < AIspells[i].min_hp) + // we reuse these fields for heal overrides + if (AIspells[i].type != SpellType_Heal && AIspells[i].min_hp != 0 && GetIntHPRatio() < AIspells[i].min_hp) continue; - if (AIspells[i].max_hp != 0 && GetIntHPRatio() > AIspells[i].max_hp) + if (AIspells[i].type != SpellType_Heal && AIspells[i].max_hp != 0 && GetIntHPRatio() > AIspells[i].max_hp) continue; if (iSpellTypes & AIspells[i].type) { @@ -137,9 +138,13 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes, bool bInnates && tar->DontHealMeBefore() < Timer::GetCurrentTime() && !(tar->IsPet() && tar->GetOwner()->IsClient()) //no buffing PC's pets ) { - uint8 hpr = (uint8)tar->GetHPRatio(); - if(hpr <= 35 || (!IsEngaged() && hpr <= 50) || (tar->IsClient() && hpr <= 99)) { + auto hp_ratio = tar->GetIntHPRatio(); + + int min_hp = AIspells[i].min_hp; // well 0 is default, so no special case here + int max_hp = AIspells[i].max_hp ? AIspells[i].max_hp : RuleI(Spells, AI_HealHPPct); + + if (EQEmu::ValueWithin(hp_ratio, min_hp, max_hp) || (tar->IsClient() && hp_ratio <= 99)) { // not sure about client bit, leaving it uint32 tempTime = 0; AIDoSpellCast(i, tar, mana_cost, &tempTime); tar->SetDontHealMeBefore(tempTime); From 43aaaf7f26fc4bdbf3db7027bd6249e8f2042372 Mon Sep 17 00:00:00 2001 From: Uleat Date: Tue, 9 Oct 2018 22:04:47 -0400 Subject: [PATCH 402/670] Implemented bot owner options --- changelog.txt | 7 +++ common/version.h | 2 +- .../sql/git/bots/bots_db_update_manifest.txt | 1 + .../2018_10_09_bots_owner_options.sql | 11 +++++ zone/bot.cpp | 9 ++++ zone/bot_command.cpp | 20 ++++++++ zone/bot_command.h | 1 + zone/bot_database.cpp | 46 +++++++++++++++++++ zone/bot_database.h | 3 ++ zone/client.cpp | 4 ++ zone/client.h | 19 ++++++++ zone/client_packet.cpp | 2 + 12 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 utils/sql/git/bots/required/2018_10_09_bots_owner_options.sql diff --git a/changelog.txt b/changelog.txt index 138482aa8..4b717ed5b 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,12 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 10/09/2018 == +Uleat: Added bot owner options + - usage: ^owneroption [option] (or aliased as: ^oo [option]) + - options are saved in the database and therefore, persistent + - Implemented option 'deathmarquee' + -- toggles client owner flag to show marquee message when a bot dies (default: disabled) + == 10/07/2018 == Uleat: Fixed a few bot issues.. - Fix for bot item trades not attuning diff --git a/common/version.h b/common/version.h index 849b3d9ac..4caca5b38 100644 --- a/common/version.h +++ b/common/version.h @@ -32,7 +32,7 @@ #define CURRENT_BINARY_DATABASE_VERSION 9129 #ifdef BOTS - #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9020 + #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9021 #else #define CURRENT_BINARY_BOTS_DATABASE_VERSION 0 // must be 0 #endif diff --git a/utils/sql/git/bots/bots_db_update_manifest.txt b/utils/sql/git/bots/bots_db_update_manifest.txt index 3496ce8d2..acdb20532 100644 --- a/utils/sql/git/bots/bots_db_update_manifest.txt +++ b/utils/sql/git/bots/bots_db_update_manifest.txt @@ -19,6 +19,7 @@ 9018|2018_02_02_Bot_Spells_Min_Max_HP.sql|SHOW COLUMNS FROM `bot_spells_entries` LIKE 'min_hp'|empty| 9019|2018_04_12_bots_stop_melee_level.sql|SHOW COLUMNS FROM `bot_data` LIKE 'stop_melee_level'|empty| 9020|2018_08_13_bots_inventory_update.sql|SELECT * FROM `inventory_versions` WHERE `version` = 2 and `bot_step` = 0|not_empty| +9021|2018_10_09_bots_owner_options.sql|SHOW TABLES LIKE 'bot_owner_options'|empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/utils/sql/git/bots/required/2018_10_09_bots_owner_options.sql b/utils/sql/git/bots/required/2018_10_09_bots_owner_options.sql new file mode 100644 index 000000000..ec1a7bebe --- /dev/null +++ b/utils/sql/git/bots/required/2018_10_09_bots_owner_options.sql @@ -0,0 +1,11 @@ +DROP TABLE IF EXISTS `bot_owner_options`; + +CREATE TABLE `bot_owner_options` ( + `owner_id` INT(11) UNSIGNED NOT NULL, + `death_marquee` SMALLINT(3) UNSIGNED NULL DEFAULT '0', + PRIMARY KEY (`owner_id`) +) +COLLATE='latin1_swedish_ci' +ENGINE=MyISAM; + +INSERT INTO `bot_command_settings`(`bot_command`, `access`, `aliases`) VALUES ('owneroption', '0', 'oo'); diff --git a/zone/bot.cpp b/zone/bot.cpp index 2c8b143c6..f5b26c3e0 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -4042,6 +4042,15 @@ bool Bot::Death(Mob *killerMob, int32 damage, uint16 spell_id, EQEmu::skills::Sk return false; Save(); + + Mob *my_owner = GetBotOwner(); + if (my_owner && my_owner->IsClient() && my_owner->CastToClient()->GetBotOptionDeathMarquee()) { + if (killerMob) + my_owner->CastToClient()->SendMarqueeMessage(CC_Yellow, 510, 0, 1000, 3000, StringFormat("%s has been slain by %s", GetCleanName(), killerMob->GetCleanName())); + else + my_owner->CastToClient()->SendMarqueeMessage(CC_Yellow, 510, 0, 1000, 3000, StringFormat("%s has been slain", GetCleanName())); + } + Mob *give_exp = hate_list.GetDamageTopOnHateList(this); Client *give_exp_client = nullptr; if(give_exp && give_exp->IsClient()) diff --git a/zone/bot_command.cpp b/zone/bot_command.cpp index 17e7cf6ab..35aa156ed 100644 --- a/zone/bot_command.cpp +++ b/zone/bot_command.cpp @@ -1399,6 +1399,7 @@ int bot_command_init(void) bot_command_add("lull", "Orders a bot to cast a pacification spell", 0, bot_command_lull) || bot_command_add("mesmerize", "Orders a bot to cast a mesmerization spell", 0, bot_command_mesmerize) || bot_command_add("movementspeed", "Orders a bot to cast a movement speed enhancement spell", 0, bot_command_movement_speed) || + bot_command_add("owneroption", "Sets options available to bot owners", 0, bot_command_owner_option) || bot_command_add("pet", "Lists the available bot pet [subcommands]", 0, bot_command_pet) || bot_command_add("petremove", "Orders a bot to remove its pet", 0, bot_subcommand_pet_remove) || bot_command_add("petsettype", "Orders a Magician bot to use a specified pet type", 0, bot_subcommand_pet_set_type) || @@ -3437,6 +3438,25 @@ void bot_command_movement_speed(Client *c, const Seperator *sep) helper_no_available_bots(c, my_bot); } +void bot_command_owner_option(Client *c, const Seperator *sep) +{ + if (helper_is_help_or_usage(sep->arg[1])) { + c->Message(m_usage, "usage: %s [deathmarquee]", sep->arg[0]); + return; + } + + std::string owner_option = sep->arg[1]; + + if (!owner_option.compare("deathmarquee")) { + c->SetBotOptionDeathMarquee(!c->GetBotOptionDeathMarquee()); + c->Message(m_action, "Bot death marquee is now %s.", (c->GetBotOptionDeathMarquee() == true ? "enabled" : "disabled")); + botdb.SaveOwnerOptionDeathMarquee(c->CharacterID(), c->GetBotOptionDeathMarquee()); + } + else { + c->Message(m_fail, "Owner option '%s' is not recognized.", owner_option.c_str()); + } +} + void bot_command_pet(Client *c, const Seperator *sep) { /* VS2012 code - begin */ diff --git a/zone/bot_command.h b/zone/bot_command.h index f2c706cac..603852b38 100644 --- a/zone/bot_command.h +++ b/zone/bot_command.h @@ -575,6 +575,7 @@ void bot_command_levitation(Client *c, const Seperator *sep); void bot_command_lull(Client *c, const Seperator *sep); void bot_command_mesmerize(Client *c, const Seperator *sep); void bot_command_movement_speed(Client *c, const Seperator *sep); +void bot_command_owner_option(Client *c, const Seperator *sep); void bot_command_pet(Client *c, const Seperator *sep); void bot_command_pick_lock(Client *c, const Seperator *sep); void bot_command_pull(Client *c, const Seperator *sep); diff --git a/zone/bot_database.cpp b/zone/bot_database.cpp index 92d6fba98..17bc51487 100644 --- a/zone/bot_database.cpp +++ b/zone/bot_database.cpp @@ -25,6 +25,7 @@ #include "bot_database.h" #include "bot.h" +#include "client.h" BotDatabase botdb; @@ -2185,6 +2186,51 @@ bool BotDatabase::SaveStopMeleeLevel(const uint32 owner_id, const uint32 bot_id, return true; } +bool BotDatabase::LoadOwnerOptions(Client *owner) +{ + if (!owner || !owner->CharacterID()) + return false; + + query = StringFormat( + "SELECT `death_marquee` FROM `bot_owner_options`" + " WHERE `owner_id` = '%u'", + owner->CharacterID() + ); + auto results = QueryDatabase(query); + if (!results.Success()) + return false; + if (!results.RowCount()) { + query = StringFormat("REPLACE INTO `bot_owner_options` (`owner_id`) VALUES ('%u')", owner->CharacterID()); + results = QueryDatabase(query); + + return false; + } + + auto row = results.begin(); + owner->SetBotOptionDeathMarquee((atoi(row[0]) != 0)); + + return true; +} + +bool BotDatabase::SaveOwnerOptionDeathMarquee(const uint32 owner_id, const bool flag) +{ + if (!owner_id) + return false; + + query = StringFormat( + "UPDATE `bot_owner_options`" + " SET `death_marquee` = '%u'" + " WHERE `owner_id` = '%u'", + (flag == true ? 1 : 0), + owner_id + ); + auto results = QueryDatabase(query); + if (!results.Success()) + return false; + + return true; +} + /* Bot bot-group functions */ bool BotDatabase::QueryBotGroupExistence(const std::string& group_name, bool& extant_flag) diff --git a/zone/bot_database.h b/zone/bot_database.h index 2361c0cf1..2840c415c 100644 --- a/zone/bot_database.h +++ b/zone/bot_database.h @@ -32,6 +32,7 @@ class Bot; struct BotsAvailableList; +class Client; namespace EQEmu { @@ -145,6 +146,8 @@ public: bool SaveStopMeleeLevel(const uint32 owner_id, const uint32 bot_id, const uint8 sml_value); + bool LoadOwnerOptions(Client *owner); + bool SaveOwnerOptionDeathMarquee(const uint32 owner_id, const bool flag); /* Bot bot-group functions */ bool QueryBotGroupExistence(const std::string& botgroup_name, bool& extant_flag); diff --git a/zone/client.cpp b/zone/client.cpp index b251a72d4..18940d58a 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -335,6 +335,10 @@ Client::Client(EQStreamInterface* ieqs) temp_pvp = false; is_client_moving = false; +#ifdef BOTS + bot_owner_options = DefaultBotOwnerOptions; +#endif + AI_Init(); } diff --git a/zone/client.h b/zone/client.h index 393ede129..023367e50 100644 --- a/zone/client.h +++ b/zone/client.h @@ -1641,6 +1641,25 @@ private: void InterrogateInventory_(bool errorcheck, Client* requester, int16 head, int16 index, const EQEmu::ItemInstance* inst, const EQEmu::ItemInstance* parent, bool log, bool silent, bool &error, int depth); bool InterrogateInventory_error(int16 head, int16 index, const EQEmu::ItemInstance* inst, const EQEmu::ItemInstance* parent, int depth); + +#ifdef BOTS + struct BotOwnerOptions { + bool death_marquee; + }; + + BotOwnerOptions bot_owner_options; + + const BotOwnerOptions DefaultBotOwnerOptions = { + false // death_marquee + }; + +public: + void SetBotOptionDeathMarquee(bool flag) { bot_owner_options.death_marquee = flag; } + + bool GetBotOptionDeathMarquee() const { return bot_owner_options.death_marquee; } + +private: +#endif }; #endif diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 97db51286..c6fd66894 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -1599,6 +1599,8 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app) } #ifdef BOTS + botdb.LoadOwnerOptions(this); + // TODO: mod below function for loading spawned botgroups Bot::LoadAndSpawnAllZonedBots(this); #endif From 1785120796677c35d516f7cbde839bdeb7efd5ec Mon Sep 17 00:00:00 2001 From: KimLS Date: Fri, 12 Oct 2018 00:03:58 -0700 Subject: [PATCH 403/670] Bunch of refactoring and walking, AI needs a ton of tweaking to use the new logic --- common/ruletypes.h | 2 +- zone/client.cpp | 2 +- zone/command.cpp | 6 +- zone/lua_mob.cpp | 18 +- zone/lua_mob.h | 4 +- zone/merc.cpp | 21 +- zone/mob.cpp | 34 +- zone/mob.h | 17 +- zone/mob_ai.cpp | 78 ++-- zone/mob_movement_manager.cpp | 668 +++++++++++++++++++++++++--------- zone/mob_movement_manager.h | 34 +- zone/pathfinder_nav_mesh.cpp | 4 +- zone/pathing.cpp | 187 ---------- zone/perl_mob.cpp | 65 +++- zone/position.cpp | 88 ++++- zone/position.h | 11 +- zone/waypoints.cpp | 22 +- 17 files changed, 787 insertions(+), 474 deletions(-) diff --git a/common/ruletypes.h b/common/ruletypes.h index c2f11c1c3..0f8420aa1 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -567,7 +567,7 @@ RULE_BOOL(TaskSystem, EnableTaskProximity, true) RULE_CATEGORY_END() RULE_CATEGORY(Range) -RULE_INT(Range, Say, 135) +RULE_INT(Range, Say, 15) RULE_INT(Range, Emote, 135) RULE_INT(Range, BeginCast, 200) RULE_INT(Range, Anims, 135) diff --git a/zone/client.cpp b/zone/client.cpp index 2448897f9..a22052415 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -1108,7 +1108,7 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s CheckLDoNHail(GetTarget()); CheckEmoteHail(GetTarget(), message); - if(DistanceSquaredNoZ(m_Position, GetTarget()->GetPosition()) <= RuleI(Range, Say)) { + if(DistanceNoZ(m_Position, GetTarget()->GetPosition()) <= RuleI(Range, Say)) { NPC *tar = GetTarget()->CastToNPC(); parse->EventNPC(EVENT_SAY, tar->CastToNPC(), this, message, language); diff --git a/zone/command.cpp b/zone/command.cpp index 84cd3566a..6d9d875b1 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -1284,9 +1284,11 @@ void command_movement(Client *c, const Seperator *sep) c->Message(0, "Requires target"); } + mgr.NavigateTo(target, c->GetX(), c->GetY(), c->GetZ(), false, MovementRunning); - auto heading = target->CalculateHeadingToTarget(c->GetX(), c->GetY()); - mgr.RotateTo(target, heading, 16.0f); + //auto heading = target->CalculateHeadingToTarget(c->GetX(), c->GetY()); + //mgr.SendCommandToClients(target, 0.0f, 0.0f, 0.0f, atof(sep->arg[2]), 0, ClientRangeAny); + //mgr.RotateTo(target, heading); //double a1 = atof(sep->arg[2]); //double a2 = atof(sep->arg[3]); diff --git a/zone/lua_mob.cpp b/zone/lua_mob.cpp index 67784eb57..33d786b11 100644 --- a/zone/lua_mob.cpp +++ b/zone/lua_mob.cpp @@ -1124,9 +1124,19 @@ double Lua_Mob::CalculateHeadingToTarget(double in_x, double in_y) { return self->CalculateHeadingToTarget(static_cast(in_x), static_cast(in_y)); } -void Lua_Mob::NavigateTo(double x, double y, double z, double speed) { +void Lua_Mob::RunTo(double x, double y, double z) { Lua_Safe_Call_Void(); - self->NavigateTo(static_cast(x), static_cast(y), static_cast(z), static_cast(speed)); + self->RunTo(static_cast(x), static_cast(y), static_cast(z)); +} + +void Lua_Mob::WalkTo(double x, double y, double z) { + Lua_Safe_Call_Void(); + self->WalkTo(static_cast(x), static_cast(y), static_cast(z)); +} + +void Lua_Mob::NavigateTo(double x, double y, double z) { + Lua_Safe_Call_Void(); + self->NavigateTo(static_cast(x), static_cast(y), static_cast(z)); } void Lua_Mob::StopNavigation() { @@ -2360,7 +2370,9 @@ luabind::scope lua_register_mob() { .def("FaceTarget", (void(Lua_Mob::*)(Lua_Mob))&Lua_Mob::FaceTarget) .def("SetHeading", (void(Lua_Mob::*)(double))&Lua_Mob::SetHeading) .def("CalculateHeadingToTarget", (double(Lua_Mob::*)(double,double))&Lua_Mob::CalculateHeadingToTarget) - .def("NavigateTo", (void(Lua_Mob::*)(double,double,double,double))&Lua_Mob::NavigateTo) + .def("RunTo", (void(Lua_Mob::*)(double, double, double))&Lua_Mob::RunTo) + .def("WalkTo", (void(Lua_Mob::*)(double, double, double))&Lua_Mob::WalkTo) + .def("NavigateTo", (void(Lua_Mob::*)(double,double,double))&Lua_Mob::NavigateTo) .def("StopNavigation", (void(Lua_Mob::*)(void))&Lua_Mob::StopNavigation) .def("CalculateDistance", (float(Lua_Mob::*)(double,double,double))&Lua_Mob::CalculateDistance) .def("SendTo", (void(Lua_Mob::*)(double,double,double))&Lua_Mob::SendTo) diff --git a/zone/lua_mob.h b/zone/lua_mob.h index 7300e3085..fc58af6d5 100644 --- a/zone/lua_mob.h +++ b/zone/lua_mob.h @@ -240,7 +240,9 @@ public: void FaceTarget(Lua_Mob target); void SetHeading(double in); double CalculateHeadingToTarget(double in_x, double in_y); - void NavigateTo(double x, double y, double z, double speed); + void RunTo(double x, double y, double z); + void WalkTo(double x, double y, double z); + void NavigateTo(double x, double y, double z); void StopNavigation(); float CalculateDistance(double x, double y, double z); void SendTo(double x, double y, double z); diff --git a/zone/merc.cpp b/zone/merc.cpp index 2a1e581d9..bfa4a7233 100644 --- a/zone/merc.cpp +++ b/zone/merc.cpp @@ -1479,7 +1479,7 @@ void Merc::AI_Process() { } else if (!CheckLosFN(GetTarget())) { auto Goal = GetTarget()->GetPosition(); - NavigateTo(Goal.x, Goal.y, Goal.z, GetRunspeed()); + RunTo(Goal.x, Goal.y, Goal.z); return; } @@ -1545,7 +1545,7 @@ void Merc::AI_Process() { float newZ = 0; FaceTarget(GetTarget()); if (PlotPositionAroundTarget(this, newX, newY, newZ)) { - NavigateTo(newX, newY, newZ, GetRunspeed()); + RunTo(newX, newY, newZ); return; } } @@ -1557,7 +1557,7 @@ void Merc::AI_Process() { float newY = 0; float newZ = 0; if (PlotPositionAroundTarget(GetTarget(), newX, newY, newZ)) { - NavigateTo(newX, newY, newZ, GetRunspeed()); + RunTo(newX, newY, newZ); return; } } @@ -1568,7 +1568,7 @@ void Merc::AI_Process() { float newY = 0; float newZ = 0; if (PlotPositionAroundTarget(GetTarget(), newX, newY, newZ, false) && GetArchetype() != ARCHETYPE_CASTER) { - NavigateTo(newX, newY, newZ, GetRunspeed()); + RunTo(newX, newY, newZ); return; } } @@ -1695,7 +1695,7 @@ void Merc::AI_Process() { { if(!IsRooted()) { Log(Logs::Detail, Logs::AI, "Pursuing %s while engaged.", GetTarget()->GetCleanName()); - NavigateTo(GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ(), GetRunspeed()); + RunTo(GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ()); return; } @@ -1750,15 +1750,20 @@ void Merc::AI_Process() { if (follow) { float dist = DistanceSquared(m_Position, follow->GetPosition()); - int speed = GetRunspeed(); + bool running = true; if (dist < GetFollowDistance() + 1000) - speed = GetWalkspeed(); + running = false; SetRunAnimSpeed(0); if (dist > GetFollowDistance()) { - NavigateTo(follow->GetX(), follow->GetY(), follow->GetZ(), speed); + if (running) { + RunTo(follow->GetX(), follow->GetY(), follow->GetZ()); + } + else { + WalkTo(follow->GetX(), follow->GetY(), follow->GetZ()); + } if (rest_timer.Enabled()) rest_timer.Disable(); diff --git a/zone/mob.cpp b/zone/mob.cpp index 59691c78f..6df25048b 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -442,9 +442,6 @@ Mob::Mob(const char* in_name, PrimaryAggro = false; AssistAggro = false; npc_assist_cap = 0; - - PathRecalcTimer.reset(new Timer(500)); - PathingLoopCount = 0; } Mob::~Mob() @@ -1622,8 +1619,6 @@ void Mob::ShowBuffList(Client* client) { } void Mob::GMMove(float x, float y, float z, float heading, bool SendUpdate) { - Route.clear(); - if(IsNPC()) { entity_list.ProcessMove(CastToNPC(), x, y, z); } @@ -2710,7 +2705,12 @@ void Mob::FaceTarget(Mob* mob_to_face /*= 0*/) { float current_heading = GetHeading(); float new_heading = CalculateHeadingToTarget(faced_mob->GetX(), faced_mob->GetY()); if(current_heading != new_heading) { - mMovementManager->RotateTo(this, new_heading, 16.0f); + if (IsEngaged() || IsRunning()) { + mMovementManager->RotateTo(this, new_heading); + } + else { + mMovementManager->RotateTo(this, new_heading, MovementWalking); + } } if(IsNPC() && !IsEngaged()) { @@ -3553,10 +3553,12 @@ void Mob::SetFlyMode(GravityBehavior flymode) void Mob::Teleport(const glm::vec3 &pos) { + mMovementManager->Teleport(this, pos.x, pos.y, pos.z, m_Position.w); } void Mob::Teleport(const glm::vec4 &pos) { + mMovementManager->Teleport(this, pos.x, pos.y, pos.z, pos.w); } bool Mob::IsNimbusEffectActive(uint32 nimbus_effect) @@ -5580,25 +5582,7 @@ float Mob::HeadingAngleToMob(float other_x, float other_y) float this_x = GetX(); float this_y = GetY(); - float y_diff = std::abs(this_y - other_y); - float x_diff = std::abs(this_x - other_x); - if (y_diff < 0.0000009999999974752427) - y_diff = 0.0000009999999974752427; - - float angle = atan2(x_diff, y_diff) * 180.0f * 0.3183099014828645f; // angle, nice "pi" - - // return the right thing based on relative quadrant - // I'm sure this could be improved for readability, but whatever - if (this_y >= other_y) { - if (other_x >= this_x) - return (90.0f - angle + 90.0f) * 511.5f * 0.0027777778f; - if (other_x <= this_x) - return (angle + 180.0f) * 511.5f * 0.0027777778f; - } - if (this_y > other_y || other_x > this_x) - return angle * 511.5f * 0.0027777778f; - else - return (90.0f - angle + 270.0f) * 511.5f * 0.0027777778f; + return CalculateHeadingAngleBetweenPositions(this_x, this_y, other_x, other_y); } bool Mob::GetSeeInvisible(uint8 see_invis) diff --git a/zone/mob.h b/zone/mob.h index 3f35a25b8..35ebaf87c 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -523,6 +523,7 @@ public: uint32 GetNPCTypeID() const { return npctype_id; } void SetNPCTypeID(uint32 npctypeid) { npctype_id = npctypeid; } inline const glm::vec4& GetPosition() const { return m_Position; } + inline void SetPosition(const float x, const float y, const float z) { m_Position.x = x; m_Position.y = y; m_Position.z = z; } inline const float GetX() const { return m_Position.x; } inline const float GetY() const { return m_Position.y; } inline const float GetZ() const { return m_Position.z; } @@ -968,7 +969,9 @@ public: inline bool CheckAggro(Mob* other) {return hate_list.IsEntOnHateList(other);} float CalculateHeadingToTarget(float in_x, float in_y) { return HeadingAngleToMob(in_x, in_y); } - void NavigateTo(float x, float y, float z, float speed); + void WalkTo(float x, float y, float z); + void RunTo(float x, float y, float z); + void NavigateTo(float x, float y, float z); void StopNavigation(); float CalculateDistance(float x, float y, float z); float GetGroundZ(float new_x, float new_y, float z_offset=0.0); @@ -1133,9 +1136,6 @@ public: int GetWeaponDamage(Mob *against, const EQEmu::ItemData *weapon_item); int GetWeaponDamage(Mob *against, const EQEmu::ItemInstance *weapon_item, uint32 *hate = nullptr); - //Pathing - glm::vec3 UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &WaypointChange, bool &NodeReached); - // Bots HealRotation methods #ifdef BOTS bool IsHealRotationTarget() { return (m_target_of_heal_rotation.use_count() && m_target_of_heal_rotation.get()); } @@ -1292,7 +1292,6 @@ protected: void CalculateNewFearpoint(); float FindGroundZ(float new_x, float new_y, float z_offset=0.0); float FindDestGroundZ(glm::vec3 dest, float z_offset=0.0); - glm::vec3 HandleStuckPath(const glm::vec3 &To, const glm::vec3 &From); virtual float GetSympatheticProcChances(uint16 spell_id, int16 ProcRateMod, int32 ItemProcRate = 0); int16 GetSympatheticSpellProcRate(uint16 spell_id); @@ -1481,15 +1480,7 @@ protected: glm::vec3 m_FearWalkTarget; bool currently_fleeing; - // Pathing - // - glm::vec3 PathingDestination; - IPathfinder::IPath Route; - std::unique_ptr PathRecalcTimer; bool DistractedFromGrid; - glm::vec3 PathingLastPosition; - int PathingLoopCount; - uint32 pDontHealMeBefore; uint32 pDontBuffMeBefore; uint32 pDontDotMeBefore; diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 3862f7857..750f5c792 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -796,16 +796,12 @@ void Client::AI_Process() } else { if (AI_movement_timer->Check()) { - int speed = GetFearSpeed(); - animation = speed; - speed *= 2; - SetCurrentSpeed(speed); // Check if we have reached the last fear point - if(IsPositionEqual(GetX(), GetY(), GetZ(), m_FearWalkTarget.x, m_FearWalkTarget.y, m_FearWalkTarget.z)) { + if(IsPositionEqual(glm::vec3(GetX(), GetY(), GetZ()), m_FearWalkTarget)) { CalculateNewFearpoint(); } - NavigateTo(m_FearWalkTarget.x, m_FearWalkTarget.y, m_FearWalkTarget.z, speed); + RunTo(m_FearWalkTarget.x, m_FearWalkTarget.y, m_FearWalkTarget.z); } return; } @@ -873,11 +869,7 @@ void Client::AI_Process() { if(AI_movement_timer->Check()) { - int newspeed = GetRunspeed(); - animation = newspeed; - newspeed *= 2; - SetCurrentSpeed(newspeed); - NavigateTo(GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ(), newspeed); + RunTo(GetTarget()->GetX(), GetTarget()->GetY(), GetTarget()->GetZ()); } } else if(IsMoving()) @@ -920,12 +912,12 @@ void Client::AI_Process() SendPositionUpdate(); // this shouldn't happen a lot (and hard to make it) so lets not rate limit } else if (dist >= 400) { // >=20 if (AI_movement_timer->Check()) { - int nspeed = (dist >= 1225 ? GetRunspeed() : GetWalkspeed()); // >= 35 - animation = nspeed; - nspeed *= 2; - SetCurrentSpeed(nspeed); - - NavigateTo(owner->GetX(), owner->GetY(), owner->GetZ(), nspeed); + if (dist >= 1225) { + RunTo(owner->GetX(), owner->GetY(), owner->GetZ()); + } + else { + WalkTo(owner->GetX(), owner->GetY(), owner->GetZ()); + } } } else { StopNavigation(); @@ -1089,15 +1081,14 @@ void Mob::AI_Process() { else { if (AI_movement_timer->Check()) { // Check if we have reached the last fear point - if (IsPositionEqual(GetX(), GetY(), GetZ(), m_FearWalkTarget.x, m_FearWalkTarget.y, m_FearWalkTarget.z)) { + if (IsPositionEqual(glm::vec3(GetX(), GetY(), GetZ()), m_FearWalkTarget)) { // Calculate a new point to run to CalculateNewFearpoint(); } NavigateTo( m_FearWalkTarget.x, m_FearWalkTarget.y, - m_FearWalkTarget.z, - GetFearSpeed() + m_FearWalkTarget.z ); } return; @@ -1216,18 +1207,7 @@ void Mob::AI_Process() { StopNavigation(); if (AI_movement_timer->Check()) { - if (CalculateHeadingToTarget(GetTarget()->GetX(), GetTarget()->GetY()) != m_Position.w) { - SetHeading(CalculateHeadingToTarget(GetTarget()->GetX(), GetTarget()->GetY())); - SendPosition(); - } - SetCurrentSpeed(0); - } - if (IsMoving()) { - if (CalculateHeadingToTarget(GetTarget()->GetX(), GetTarget()->GetY()) != m_Position.w) { - SetHeading(CalculateHeadingToTarget(GetTarget()->GetX(), GetTarget()->GetY())); - SendPosition(); - } - SetCurrentSpeed(0); + FaceTarget(); } //casting checked above... @@ -1419,7 +1399,7 @@ void Mob::AI_Process() { else if (AI_movement_timer->Check() && target) { if (!IsRooted()) { Log(Logs::Detail, Logs::AI, "Pursuing %s while engaged.", target->GetName()); - NavigateTo(target->GetX(), target->GetY(), target->GetZ(), GetRunspeed()); + RunTo(target->GetX(), target->GetY(), target->GetZ()); } else if (IsMoving()) { @@ -1497,13 +1477,13 @@ void Mob::AI_Process() { if (distance_to_owner >= 400 || z_distance > 100) { - int pet_speed = GetWalkspeed(); + bool running = false; /** * Distance: >= 35 (Run if far away) */ if (distance_to_owner >= 1225) { - pet_speed = GetRunspeed(); + running = true; } /** @@ -1518,7 +1498,12 @@ void Mob::AI_Process() { auto &Goal = owner->GetPosition(); - NavigateTo(Goal.x, Goal.y, Goal.z, pet_speed); + if (running) { + RunTo(Goal.x, Goal.y, Goal.z); + } + else { + WalkTo(Goal.x, Goal.y, Goal.z); + } } } else { @@ -1558,17 +1543,22 @@ void Mob::AI_Process() { * Default follow distance is 100 */ if (distance >= follow_distance) { - int speed = GetWalkspeed(); + bool running = false; if (distance >= follow_distance + 150) { - speed = GetRunspeed(); + running = true; } bool waypoint_changed, node_reached; auto &Goal = follow->GetPosition(); - NavigateTo(Goal.x, Goal.y, Goal.z, speed); + if (running) { + RunTo(Goal.x, Goal.y, Goal.z); + } + else { + WalkTo(Goal.x, Goal.y, Goal.z); + } } else { moved = false; @@ -1694,7 +1684,7 @@ void NPC::AI_DoMovement() { roambox_destination_y); } - NavigateTo(roambox_destination_x, roambox_destination_y, roambox_destination_z, move_speed); + NavigateTo(roambox_destination_x, roambox_destination_y, roambox_destination_z); if (m_Position.x == roambox_destination_x && m_Position.y == roambox_destination_y) { time_until_can_move = Timer::GetCurrentTime() + RandomTimer(roambox_min_delay, roambox_delay); @@ -1761,8 +1751,7 @@ void NPC::AI_DoMovement() { NavigateTo( m_CurrentWayPoint.x, m_CurrentWayPoint.y, - m_CurrentWayPoint.z, - move_speed + m_CurrentWayPoint.z ); } @@ -1782,10 +1771,9 @@ void NPC::AI_DoMovement() { } else if (IsGuarding()) { - bool at_gp = IsPositionEqual(GetX(), GetY(), GetZ(), m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z); + bool at_gp = IsPositionEqual(m_Position, m_GuardPoint); if (at_gp) { - StopNavigation(); if (moved) { Log(Logs::Detail, @@ -1808,7 +1796,7 @@ void NPC::AI_DoMovement() { } } else { - NavigateTo(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z, move_speed); + NavigateTo(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z); } } } diff --git a/zone/mob_movement_manager.cpp b/zone/mob_movement_manager.cpp index a6151a887..0da3436c4 100644 --- a/zone/mob_movement_manager.cpp +++ b/zone/mob_movement_manager.cpp @@ -1,53 +1,265 @@ #include "mob_movement_manager.h" #include "client.h" #include "mob.h" +#include "zone.h" +#include "position.h" #include "../common/eq_packet_structs.h" #include "../common/misc_functions.h" +#include "../common/data_verification.h" #include +#include #include #include extern double frame_time; +extern Zone *zone; -struct RotateCommand +class IMovementCommand { - RotateCommand() { - rotate_to = 0.0; - rotate_to_speed = 0.0; - rotate_dir = 1.0; - active = false; - started = false; - } - - double rotate_to; - double rotate_to_speed; - double rotate_dir; - bool active; - bool started; +public: + IMovementCommand() = default; + virtual ~IMovementCommand() = default; + virtual bool Process(MobMovementManager *mgr, Mob *m) = 0; + virtual bool Started() const = 0; }; -struct MovementCommand +class RotateToCommand : public IMovementCommand { - MovementCommand() { - move_to_x = 0.0; - move_to_y = 0.0; - move_to_z = 0.0; - move_to_speed = 0.0; - last_sent_short_distance = 0.0; - last_sent_medium_distance = 0.0; - last_sent_long_distance = 0.0; - active = false; +public: + RotateToCommand(double rotate_to, double dir, MobMovementMode mode) { + m_rotate_to = rotate_to; + m_rotate_to_dir = dir; + m_rotate_to_mode = mode; + m_started = false; } - double move_to_x; - double move_to_y; - double move_to_z; - double move_to_speed; - double last_sent_short_distance; - double last_sent_medium_distance; - double last_sent_long_distance; - bool active; + virtual ~RotateToCommand() { + + } + + virtual bool Process(MobMovementManager *mgr, Mob *m) { + if (!m->IsAIControlled()) { + return true; + } + + auto rotate_to_speed = m_rotate_to_mode == MovementRunning ? 50.0 : 16.0; //todo: get this from mob + + if (!m_started) { + m_started = true; + + if (rotate_to_speed > 0.0 && rotate_to_speed <= 25.0) { //send basic rotation + mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, m_rotate_to_dir * rotate_to_speed, 0, ClientRangeClose); + } + } + + auto from = FixHeading(m->GetHeading()); + auto to = FixHeading(m_rotate_to); + auto diff = to - from; + + while (diff < -256.0) { + diff += 512.0; + } + + while (diff > 256) { + diff -= 512.0; + } + + auto dist = std::abs(diff); + auto td = rotate_to_speed * 19.0 * frame_time; + + if (td >= dist) { + m->SetHeading(to); + mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, 0, ClientRangeAny); + return true; + } + + from += td * m_rotate_to_dir; + m->SetHeading(FixHeading(from)); + return false; + } + + virtual bool Started() const { + return m_started; + } + +private: + double m_rotate_to; + double m_rotate_to_dir; + MobMovementMode m_rotate_to_mode; + bool m_started; +}; + +class MoveToCommand : public IMovementCommand +{ +public: + MoveToCommand(float x, float y, float z, MobMovementMode mode) { + m_move_to_x = x; + m_move_to_y = y; + m_move_to_z = z; + m_move_to_mode = mode; + m_last_sent_time = 0.0; + m_last_sent_speed = 0; + m_started = false; + } + + virtual ~MoveToCommand() { + + } + + virtual bool Process(MobMovementManager *mgr, Mob *m) { + if (!m->IsAIControlled()) { + return true; + } + + //Send a movement packet when you start moving + double current_time = static_cast(Timer::GetCurrentTime()) / 1000.0; + int current_speed = 0; + + if (m_move_to_mode == MovementRunning) { + current_speed = m->GetRunspeed(); + } + else { + current_speed = m->GetWalkspeed(); + } + + if (!m_started) { + m_started = true; + //rotate to the point + m->SetHeading(m->CalculateHeadingToTarget(m_move_to_x, m_move_to_y)); + + m_last_sent_speed = current_speed; + m_last_sent_time = current_time; + mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, current_speed, ClientRangeCloseMedium); + return false; + } + + //When speed changes + if (current_speed != m_last_sent_speed) { + m_last_sent_speed = current_speed; + m_last_sent_time = current_time; + mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, current_speed, ClientRangeCloseMedium); + return false; + } + + //If x seconds have passed without sending an update. + if (current_time - m_last_sent_time >= 5.0) { + m_last_sent_speed = current_speed; + m_last_sent_time = current_time; + mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, current_speed, ClientRangeCloseMedium); + return false; + } + + auto &p = m->GetPosition(); + glm::vec3 tar(m_move_to_x, m_move_to_y, m_move_to_z); + glm::vec3 pos(p.x, p.y, p.z); + + double len = glm::distance(pos, tar); + if (len == 0) { + return true; + } + + glm::vec3 dir = tar - pos; + glm::vec3 ndir = glm::normalize(dir); + double distance_moved = frame_time * current_speed * 0.4f * 1.4f; + + if (distance_moved > len) { + m->SetPosition(tar.x, tar.y, tar.z); + + if (m->IsNPC()) { + entity_list.ProcessMove(m->CastToNPC(), tar.x, tar.y, tar.z); + } + + m->TryFixZ(); + return true; + } + else { + glm::vec3 npos = pos + (ndir * static_cast(distance_moved)); + m->SetPosition(npos.x, npos.y, npos.z); + + if (m->IsNPC()) { + entity_list.ProcessMove(m->CastToNPC(), npos.x, npos.y, npos.z); + } + } + + return false; + } + + virtual bool Started() const { + return m_started; + } + +private: + + double m_move_to_x; + double m_move_to_y; + double m_move_to_z; + MobMovementMode m_move_to_mode; + bool m_started; + + double m_last_sent_time; + int m_last_sent_speed; +}; + +class TeleportToCommand : public IMovementCommand +{ +public: + TeleportToCommand(float x, float y, float z, float heading) { + m_teleport_to_x = x; + m_teleport_to_y = y; + m_teleport_to_z = z; + m_teleport_to_heading = heading; + } + + virtual ~TeleportToCommand() { + + } + + virtual bool Process(MobMovementManager *mgr, Mob *m) { + if (!m->IsAIControlled()) { + return true; + } + + m->SetPosition(m_teleport_to_x, m_teleport_to_y, m_teleport_to_z); + m->SetHeading(mgr->FixHeading(m_teleport_to_heading)); + mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, 0, ClientRangeAny); + return true; + } + + virtual bool Started() const { + return false; + } + +private: + + double m_teleport_to_x; + double m_teleport_to_y; + double m_teleport_to_z; + double m_teleport_to_heading; +}; + +class StopMovingCommand : public IMovementCommand +{ +public: + StopMovingCommand() { + } + + virtual ~StopMovingCommand() { + + } + + virtual bool Process(MobMovementManager *mgr, Mob *m) { + if (!m->IsAIControlled()) { + return true; + } + + mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, 0, ClientRangeAny); + return true; + } + + virtual bool Started() const { + return false; + } }; struct MovementStats @@ -65,10 +277,25 @@ struct MovementStats uint64_t TotalSentHeading; }; +struct NavigateTo +{ + NavigateTo() { + navigate_to_x = 0.0; + navigate_to_y = 0.0; + navigate_to_z = 0.0; + last_set_time = 0.0; + } + + double navigate_to_x; + double navigate_to_y; + double navigate_to_z; + double last_set_time; +}; + struct MobMovementEntry { - RotateCommand RotateCommand; - MovementCommand MoveCommand; + std::deque> Commands; + NavigateTo NavigateTo; }; struct MobMovementManager::Implementation @@ -83,106 +310,6 @@ MobMovementManager::MobMovementManager() _impl.reset(new Implementation()); } -void MobMovementManager::ProcessRotateCommand(Mob *m, RotateCommand &cmd) -{ - if (m->IsEngaged()) { - auto to = FixHeading(cmd.rotate_to); - m->SetHeading(to); - SendCommandToAllClients(m, 0.0, 0.0, 0.0, 0.0, 0); - cmd.active = false; - return; - } - - if (!cmd.started) { - cmd.started = true; - - SendCommandToAllClients(m, 0.0, 0.0, 0.0, cmd.rotate_dir * cmd.rotate_to_speed, 0); - } - - auto from = FixHeading(m->GetHeading()); - auto to = FixHeading(cmd.rotate_to); - float dist = 0.0; - if (cmd.rotate_dir > 0.0) { - if (to > from) { - dist = to - from; - } - else { - dist = 512.0 - from + to; - } - } - else { - if (from > to) { - dist = from - to; - } - else { - dist = (512.0 - to) + from; - } - } - - auto td = cmd.rotate_to_speed * 19.0 * frame_time; - - if (td >= dist) { - m->SetHeading(to); - SendCommandToAllClients(m, 0.0, 0.0, 0.0, 0.0, 0); - cmd.active = false; - } - - from += td * cmd.rotate_dir; - m->SetHeading(FixHeading(from)); -} - -void MobMovementManager::SendCommandToAllClients(Mob *m, float dx, float dy, float dz, float dh, int anim) -{ - EQApplicationPacket outapp(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); - PlayerPositionUpdateServer_Struct *spu = (PlayerPositionUpdateServer_Struct*)outapp.pBuffer; - FillCommandStruct(spu, m, dx, dy, dz, dh, anim); - - for (auto &c : _impl->Clients) { - _impl->Stats.TotalSent++; - - if (anim != 0) { - _impl->Stats.TotalSentMovement++; - } - else if (dh != 0) { - _impl->Stats.TotalSentHeading++; - } - else { - _impl->Stats.TotalSentPosition++; - } - - c->QueuePacket(&outapp); - } -} - -void MobMovementManager::FillCommandStruct(PlayerPositionUpdateServer_Struct *spu, Mob *m, float dx, float dy, float dz, float dh, int anim) -{ - memset(spu, 0x00, sizeof(PlayerPositionUpdateServer_Struct)); - spu->spawn_id = m->GetID(); - spu->x_pos = FloatToEQ19(m->GetX()); - spu->y_pos = FloatToEQ19(m->GetY()); - spu->z_pos = FloatToEQ19(m->GetZ()); - spu->heading = FloatToEQ12(m->GetHeading()); - spu->delta_x = FloatToEQ13(dx); - spu->delta_y = FloatToEQ13(dy); - spu->delta_z = FloatToEQ13(dz); - spu->delta_heading = FloatToEQ10(dh); - spu->animation = anim; -} - -float MobMovementManager::FixHeading(float in) -{ - auto h = in; - while (h > 512.0) { - h -= 512.0; - } - - while (h < 0.0) { - h += 512.0; - } - - return h; -} - MobMovementManager::~MobMovementManager() { } @@ -191,12 +318,17 @@ void MobMovementManager::Process() { for (auto &iter : _impl->Entries) { auto &ent = iter.second; + auto &commands = ent.Commands; - if (ent.RotateCommand.active) { - ProcessRotateCommand(iter.first, ent.RotateCommand); - } - else if (ent.MoveCommand.active) { + while (true != commands.empty()) { + auto &cmd = commands.front(); + auto r = cmd->Process(this, iter.first); + if (true != r) { + break; + } + + commands.pop_front(); } } } @@ -229,52 +361,250 @@ void MobMovementManager::RemoveClient(Client *c) } } -void MobMovementManager::RotateTo(Mob *who, float to, float speed) +void MobMovementManager::RotateTo(Mob *who, float to, MobMovementMode mode) { auto iter = _impl->Entries.find(who); auto &ent = (*iter); - auto from = FixHeading(who->GetHeading()); - to = FixHeading(to); - - ent.second.RotateCommand.active = true; - ent.second.RotateCommand.started = false; - ent.second.RotateCommand.rotate_to = to; - ent.second.RotateCommand.rotate_to_speed = speed; - - double pdist = 0.0; - double ndist = 0.0; - if (to > from) { - pdist = to - from; - } - else { - pdist = 512.0 - from + to; - } - - if (from > to) { - ndist = from - to; - } - else { - ndist = (512.0 - to) + from; - } - - if (pdist <= ndist) { - ent.second.RotateCommand.rotate_dir = 1.0; - } - else { - ent.second.RotateCommand.rotate_dir = -1.0; + if (true != ent.second.Commands.empty()) { + return; } + + PushRotateTo(ent.second, who, to, mode); } void MobMovementManager::Teleport(Mob *who, float x, float y, float z, float heading) { + auto iter = _impl->Entries.find(who); + auto &ent = (*iter); + + ent.second.Commands.clear(); + + PushTeleportTo(ent.second, x, y, z, heading); } -void MobMovementManager::NavigateTo(Mob *who, float x, float y, float z, float speed) +void MobMovementManager::NavigateTo(Mob *who, float x, float y, float z, bool force, MobMovementMode mode) { + auto iter = _impl->Entries.find(who); + auto &ent = (*iter); + auto &nav = ent.second.NavigateTo; + + double current_time = static_cast(Timer::GetCurrentTime()) / 1000.0; + if (force || (current_time - nav.last_set_time) > 0.5) { + //Can potentially recalc + auto within = IsPositionWithinSimpleCylinder(glm::vec3(x, y, z), glm::vec3(nav.navigate_to_x, nav.navigate_to_y, nav.navigate_to_z), 1.5f, 6.0f); + + if (false == within) { + //Path is no longer valid, calculate a new path + UpdatePath(who, x, y, z, mode); + } + } } void MobMovementManager::StopNavigation(Mob *who) { + auto iter = _impl->Entries.find(who); + auto &ent = (*iter); + if (true == ent.second.Commands.empty()) { + return; + } + + auto &running_cmd = ent.second.Commands.front(); + if (false == running_cmd->Started()) { + ent.second.Commands.clear(); + return; + } + + SendCommandToClients(who, 0.0, 0.0, 0.0, 0.0, 0, ClientRangeAny); + ent.second.Commands.clear(); +} + +void MobMovementManager::SendCommandToClients(Mob *m, float dx, float dy, float dz, float dh, int anim, ClientRange range) +{ + if (range == ClientRangeNone) { + return; + } + + EQApplicationPacket outapp(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); + PlayerPositionUpdateServer_Struct *spu = (PlayerPositionUpdateServer_Struct*)outapp.pBuffer; + FillCommandStruct(spu, m, dx, dy, dz, dh, anim); + + if (range == ClientRangeAny) { + for (auto &c : _impl->Clients) { + _impl->Stats.TotalSent++; + + if (anim != 0) { + _impl->Stats.TotalSentMovement++; + } + else if (dh != 0) { + _impl->Stats.TotalSentHeading++; + } + else { + _impl->Stats.TotalSentPosition++; + } + + c->QueuePacket(&outapp); + } + } + else { + for (auto &c : _impl->Clients) { + float dist = c->CalculateDistance(m->GetX(), m->GetY(), m->GetZ()); + + bool match = false; + if (range & ClientRangeClose) { + if (dist < 200.0f) { + match = true; + } + } + + if (!match && range & ClientRangeMedium) { + if (dist >= 200.0f && dist < 1000.0f) { + match = true; + } + } + + if (!match && range & ClientRangeLong) { + if (dist >= 1000.0f) { + match = true; + } + } + + if (match) { + _impl->Stats.TotalSent++; + + if (anim != 0) { + _impl->Stats.TotalSentMovement++; + } + else if (dh != 0) { + _impl->Stats.TotalSentHeading++; + } + else { + _impl->Stats.TotalSentPosition++; + } + + c->QueuePacket(&outapp); + } + } + } +} + +float MobMovementManager::FixHeading(float in) +{ + auto h = in; + while (h > 512.0) { + h -= 512.0; + } + + while (h < 0.0) { + h += 512.0; + } + + return h; +} + +void MobMovementManager::FillCommandStruct(PlayerPositionUpdateServer_Struct *spu, Mob *m, float dx, float dy, float dz, float dh, int anim) +{ + memset(spu, 0x00, sizeof(PlayerPositionUpdateServer_Struct)); + spu->spawn_id = m->GetID(); + spu->x_pos = FloatToEQ19(m->GetX()); + spu->y_pos = FloatToEQ19(m->GetY()); + spu->z_pos = FloatToEQ19(m->GetZ()); + spu->heading = FloatToEQ12(m->GetHeading()); + spu->delta_x = FloatToEQ13(dx); + spu->delta_y = FloatToEQ13(dy); + spu->delta_z = FloatToEQ13(dz); + spu->delta_heading = FloatToEQ10(dh); + spu->animation = anim; +} + +void MobMovementManager::UpdatePath(Mob *who, float x, float y, float z, MobMovementMode mode) +{ + bool partial = false; + bool stuck = false; + auto route = zone->pathing->FindRoute(glm::vec3(who->GetX(), who->GetY(), who->GetZ()), glm::vec3(x, y, z), partial, stuck); + + if (route.empty()) { + return; + } + + auto &first = route.front(); + + //if who is already at the first node, then cull it + if (IsPositionEqualWithinCertainZ(glm::vec3(who->GetX(), who->GetY(), who->GetZ()), first.pos, 5.0f)) { + route.pop_front(); + } + + if (route.empty()) { + return; + } + + auto iter = _impl->Entries.find(who); + auto &ent = (*iter); + + first = route.front(); + //If mode = walking then rotateto first node (if possible, live does this) + if (mode == MovementWalking) { + auto h = who->CalculateHeadingToTarget(first.pos.x, first.pos.y); + PushRotateTo(ent.second, who, h, mode); + } + + //for each node create a moveto/teleport command + glm::vec3 previous_pos(who->GetX(), who->GetY(), who->GetZ()); + for (auto &node : route) { + if (node.teleport) { + PushTeleportTo(ent.second, node.pos.x, node.pos.y, node.pos.z, + CalculateHeadingAngleBetweenPositions(previous_pos.x, previous_pos.y, node.pos.x, node.pos.y)); + } + else { + PushMoveTo(ent.second, node.pos.x, node.pos.y, node.pos.z, mode); + } + + previous_pos = node.pos; + } + + if (stuck) { + PushTeleportTo(ent.second, x, y, z, + CalculateHeadingAngleBetweenPositions(previous_pos.x, previous_pos.y, x, y)); + } + else { + PushStopMoving(ent.second); + } +} + +void MobMovementManager::PushTeleportTo(MobMovementEntry &ent, float x, float y, float z, float heading) +{ + ent.Commands.push_back(std::unique_ptr(new TeleportToCommand(x, y, z, heading))); +} + +void MobMovementManager::PushMoveTo(MobMovementEntry &ent, float x, float y, float z, MobMovementMode mode) +{ + ent.Commands.push_back(std::unique_ptr(new MoveToCommand(x, y, z, mode))); +} + +void MobMovementManager::PushRotateTo(MobMovementEntry &ent, Mob *who, float to, MobMovementMode mode) +{ + auto from = FixHeading(who->GetHeading()); + to = FixHeading(to); + + float diff = to - from; + + if (std::abs(diff) < 0.001f) { + return; + } + + while (diff < -256.0) { + diff += 512.0; + } + + while (diff > 256) { + diff -= 512.0; + } + + ent.Commands.push_back(std::unique_ptr(new RotateToCommand(to, diff > 0 ? 1.0 : -1.0, mode))); +} + +void MobMovementManager::PushStopMoving(MobMovementEntry &ent) +{ + ent.Commands.push_back(std::unique_ptr(new StopMovingCommand())); } diff --git a/zone/mob_movement_manager.h b/zone/mob_movement_manager.h index 793c3406e..6d04ea323 100644 --- a/zone/mob_movement_manager.h +++ b/zone/mob_movement_manager.h @@ -5,8 +5,28 @@ class Mob; class Client; struct RotateCommand; +struct MovementCommand; +struct MobMovementEntry; struct PlayerPositionUpdateServer_Struct; +enum ClientRange : int +{ + ClientRangeNone = 0, + ClientRangeClose = 1, + ClientRangeMedium = 2, + ClientRangeCloseMedium = 3, + ClientRangeLong = 4, + ClientRangeCloseLong = 5, + ClientRangeMediumLong = 6, + ClientRangeAny = 7 +}; + +enum MobMovementMode : int +{ + MovementWalking = 0, + MovementRunning = 1 +}; + class MobMovementManager { public: @@ -17,10 +37,12 @@ public: void AddClient(Client *c); void RemoveClient(Client *c); - void RotateTo(Mob *who, float to, float speed); + void RotateTo(Mob *who, float to, MobMovementMode mode = MovementRunning); void Teleport(Mob *who, float x, float y, float z, float heading); - void NavigateTo(Mob *who, float x, float y, float z, float speed); + void NavigateTo(Mob *who, float x, float y, float z, bool force = false, MobMovementMode mode = MovementRunning); void StopNavigation(Mob *who); + void SendCommandToClients(Mob *m, float dx, float dy, float dz, float dh, int anim, ClientRange range); + float FixHeading(float in); //void Dump(Mob *m, Client *to); //void DumpStats(Client *to); //void ClearStats(); @@ -35,10 +57,12 @@ private: MobMovementManager(const MobMovementManager&); MobMovementManager& operator=(const MobMovementManager&); - void ProcessRotateCommand(Mob *m, RotateCommand &cmd); - void SendCommandToAllClients(Mob *m, float dx, float dy, float dz, float dh, int anim); void FillCommandStruct(PlayerPositionUpdateServer_Struct *spu, Mob *m, float dx, float dy, float dz, float dh, int anim); - float FixHeading(float in); + void UpdatePath(Mob *who, float x, float y, float z, MobMovementMode mode); + void PushTeleportTo(MobMovementEntry &ent, float x, float y, float z, float heading); + void PushMoveTo(MobMovementEntry &ent, float x, float y, float z, MobMovementMode mode); + void PushRotateTo(MobMovementEntry &ent, Mob *who, float to, MobMovementMode mode); + void PushStopMoving(MobMovementEntry &ent); struct Implementation; std::unique_ptr _impl; diff --git a/zone/pathfinder_nav_mesh.cpp b/zone/pathfinder_nav_mesh.cpp index 7842d84a4..615ba1c4e 100644 --- a/zone/pathfinder_nav_mesh.cpp +++ b/zone/pathfinder_nav_mesh.cpp @@ -134,7 +134,7 @@ IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const gl glm::vec3 PathfinderNavmesh::GetRandomLocation() { if (!m_impl->nav_mesh) { - return glm::vec3(); + return glm::vec3(0.f); } if (!m_impl->query) { @@ -155,7 +155,7 @@ glm::vec3 PathfinderNavmesh::GetRandomLocation() return glm::vec3(point[0], point[2], point[1]); } - return glm::vec3(); + return glm::vec3(0.f); } void PathfinderNavmesh::DebugCommand(Client *c, const Seperator *sep) diff --git a/zone/pathing.cpp b/zone/pathing.cpp index 96916754c..db133a944 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -22,193 +22,6 @@ void AdjustRoute(std::list &nodes, int flymode, float of } } -glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &WaypointChanged, bool &NodeReached) -{ - glm::vec3 To(ToX, ToY, ToZ); - if (Speed <= 0) { - return To; - } - - glm::vec3 From(GetX(), GetY(), GetZ()); - - if (DistanceSquared(To, From) < 1.0f) { - WaypointChanged = false; - NodeReached = true; - Route.clear(); - return To; - } - - if (Route.empty()) { - bool partial = false; - bool stuck = false; - Route = zone->pathing->FindRoute(From, To, partial, stuck); - AdjustRoute(Route, flymode, GetZOffset()); - - PathingDestination = To; - WaypointChanged = true; - NodeReached = false; - if (stuck) { - return HandleStuckPath(To, From); - } - - if (Route.empty()) { - return To; - } - else { - return (*Route.begin()).pos; - } - } - else { - if (PathRecalcTimer->Check()) { - bool SameDestination = DistanceSquared(To, PathingDestination) < 100.0f; - if (!SameDestination) { - //We had a route but our target position moved too much - bool partial = false; - bool stuck = false; - Route = zone->pathing->FindRoute(From, To, partial, stuck); - AdjustRoute(Route, flymode, GetZOffset()); - - PathingDestination = To; - WaypointChanged = true; - NodeReached = false; - - if (stuck) { - return HandleStuckPath(To, From); - } - - if (Route.empty()) { - return To; - } - else { - return (*Route.begin()).pos; - } - } - } - - if (!IsRooted()) { - bool AtPrevNode = DistanceSquared(From, PathingLastPosition) < 1.0f; - if (AtPrevNode) { - PathingLoopCount++; - auto front = (*Route.begin()).pos; - - if (PathingLoopCount > 5) { - Teleport(front); //todo new teleport - SendPosition(); - Route.pop_front(); - - WaypointChanged = true; - NodeReached = true; - PathingLoopCount = 0; - } - - return front; - } - else { - PathingLastPosition = From; - PathingLoopCount = 0; - } - } - else { - PathingLastPosition = From; - PathingLoopCount = 0; - } - - bool AtNextNode = false; - if (flymode == GravityBehavior::Flying) { - AtNextNode = DistanceSquared(From, (*Route.begin()).pos) < 4.0f; - } - else { - float z_dist = From.z - (*Route.begin()).pos.z; - z_dist *= z_dist; - AtNextNode = DistanceSquaredNoZ(From, (*Route.begin()).pos) < 4.0f && z_dist < 25.0f; - } - - if (AtNextNode) { - WaypointChanged = false; - NodeReached = true; - - Route.pop_front(); - - if (Route.empty()) { - bool partial = false; - bool stuck = false; - Route = zone->pathing->FindRoute(From, To, partial, stuck); - AdjustRoute(Route, flymode, GetZOffset()); - - PathingDestination = To; - WaypointChanged = true; - - if (stuck) { - return HandleStuckPath(To, From); - } - - if(Route.empty()) { - return To; - } - else { - return (*Route.begin()).pos; - } - } - else { - auto node = *Route.begin(); - if (node.teleport) { - Route.pop_front(); - - if (Route.empty()) { - return To; - } - - auto nextNode = *Route.begin(); - - Teleport(nextNode.pos); - - Route.pop_front(); - - if (Route.empty()) { - return To; - } - - return (*Route.begin()).pos; - } - - return node.pos; - } - } - else { - WaypointChanged = false; - NodeReached = false; - return (*Route.begin()).pos; - } - } - - return To; -} - -glm::vec3 Mob::HandleStuckPath(const glm::vec3 &To, const glm::vec3 &From) -{ - bool partial = false; - bool stuck = false; - auto r = zone->pathing->FindRoute(To, From, partial, stuck); - Route.clear(); - - if (r.size() < 1) { - Teleport(To); - return To; - } - - auto iter = r.rbegin(); - auto final_node = (*iter); - Teleport(final_node.pos); - - if (r.size() < 2) { - return final_node.pos; - } - else { - iter++; - return (*iter).pos; - } -} - void CullPoints(std::vector &points) { if (!zone->HasMap()) { return; diff --git a/zone/perl_mob.cpp b/zone/perl_mob.cpp index e7504c744..6177961f4 100644 --- a/zone/perl_mob.cpp +++ b/zone/perl_mob.cpp @@ -5477,18 +5477,71 @@ XS(XS_Mob_CalculateHeadingToTarget) { XSRETURN(1); } +XS(XS_Mob_RunTo); /* prototype to pass -Wmissing-prototypes */ +XS(XS_Mob_RunTo) { + dXSARGS; + if (items < 4 || items > 5) + Perl_croak(aTHX_ + "Usage: Mob::RunTo(THIS, float x, float y, float z)"); + { + Mob *THIS; + float x = (float)SvNV(ST(1)); + float y = (float)SvNV(ST(2)); + float z = (float)SvNV(ST(3)); + + if (sv_derived_from(ST(0), "Mob")) { + IV tmp = SvIV((SV *)SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } + else + Perl_croak(aTHX_ "THIS is not of type Mob"); + if (THIS == nullptr) + Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); + + + THIS->RunTo(x, y, z); + } + XSRETURN_EMPTY; +} + +XS(XS_Mob_WalkTo); /* prototype to pass -Wmissing-prototypes */ +XS(XS_Mob_WalkTo) { + dXSARGS; + if (items < 4 || items > 5) + Perl_croak(aTHX_ + "Usage: Mob::WalkTo(THIS, float x, float y, float z)"); + { + Mob *THIS; + float x = (float)SvNV(ST(1)); + float y = (float)SvNV(ST(2)); + float z = (float)SvNV(ST(3)); + + if (sv_derived_from(ST(0), "Mob")) { + IV tmp = SvIV((SV *)SvRV(ST(0))); + THIS = INT2PTR(Mob *, tmp); + } + else + Perl_croak(aTHX_ "THIS is not of type Mob"); + if (THIS == nullptr) + Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); + + + THIS->WalkTo(x, y, z); + } + XSRETURN_EMPTY; +} + XS(XS_Mob_NavigateTo); /* prototype to pass -Wmissing-prototypes */ XS(XS_Mob_NavigateTo) { dXSARGS; - if (items < 5 || items > 6) + if (items < 4 || items > 5) Perl_croak(aTHX_ - "Usage: Mob::NavigateTo(THIS, float x, float y, float z, float speed)"); + "Usage: Mob::NavigateTo(THIS, float x, float y, float z)"); { Mob *THIS; float x = (float) SvNV(ST(1)); float y = (float) SvNV(ST(2)); float z = (float) SvNV(ST(3)); - float speed = (float) SvNV(ST(4)); if (sv_derived_from(ST(0), "Mob")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -5499,7 +5552,7 @@ XS(XS_Mob_NavigateTo) { Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - THIS->NavigateTo(x, y, z, speed); + THIS->NavigateTo(x, y, z); } XSRETURN_EMPTY; } @@ -8660,7 +8713,9 @@ XS(boot_Mob) { newXSproto(strcpy(buf, "WipeHateList"), XS_Mob_WipeHateList, file, "$"); newXSproto(strcpy(buf, "CheckAggro"), XS_Mob_CheckAggro, file, "$$"); newXSproto(strcpy(buf, "CalculateHeadingToTarget"), XS_Mob_CalculateHeadingToTarget, file, "$$$"); - newXSproto(strcpy(buf, "NavigateTo"), XS_Mob_NavigateTo, file, "$$$$$"); + newXSproto(strcpy(buf, "RunTo"), XS_Mob_RunTo, file, "$$$$"); + newXSproto(strcpy(buf, "WalkTo"), XS_Mob_WalkTo, file, "$$$$"); + newXSproto(strcpy(buf, "NavigateTo"), XS_Mob_NavigateTo, file, "$$$$"); newXSproto(strcpy(buf, "StopNavigation"), XS_Mob_StopNavigation, file, "$"); newXSproto(strcpy(buf, "CalculateDistance"), XS_Mob_CalculateDistance, file, "$$$$"); newXSproto(strcpy(buf, "SendTo"), XS_Mob_SendTo, file, "$$$$"); diff --git a/zone/position.cpp b/zone/position.cpp index 83d1491b2..9f9e36fc2 100644 --- a/zone/position.cpp +++ b/zone/position.cpp @@ -5,6 +5,8 @@ #include #include "../common/string_util.h" +static const float position_eps = 0.0001f; + std::string to_string(const glm::vec4 &position) { return StringFormat("(%.3f, %.3f, %.3f, %.3f)", position.x,position.y,position.z,position.w); } @@ -161,8 +163,88 @@ float GetReciprocalHeading(const float heading) return result; } -bool IsPositionEqual(float x1, float y1, float z1, float x2, float y2, float z2) +bool IsPositionEqual(const glm::vec2 &p1, const glm::vec2 &p2) { - static const float eps = 0.0001f; - return std::abs(x1 - x2) < eps && std::abs(y1 - y2) < eps && std::abs(z1 - z2) < eps; + return std::abs(p1.x - p2.x) < position_eps && std::abs(p1.y - p2.y) < position_eps; +} + +bool IsPositionEqual(const glm::vec3 &p1, const glm::vec3 &p2) +{ + return std::abs(p1.x - p2.x) < position_eps && std::abs(p1.y - p2.y) < position_eps && std::abs(p1.z - p2.z) < position_eps; +} + +bool IsPositionEqual(const glm::vec4 &p1, const glm::vec4 &p2) +{ + return std::abs(p1.x - p2.x) < position_eps && std::abs(p1.y - p2.y) < position_eps && std::abs(p1.z - p2.z) < position_eps; +} + +bool IsPositionEqualWithinCertainZ(const glm::vec3 &p1, const glm::vec3 &p2, float z_eps) { + return std::abs(p1.x - p2.x) < position_eps && std::abs(p1.y - p2.y) < position_eps && std::abs(p1.z - p2.z) < z_eps; +} + +bool IsPositionEqualWithinCertainZ(const glm::vec4 &p1, const glm::vec4 &p2, float z_eps) { + return std::abs(p1.x - p2.x) < position_eps && std::abs(p1.y - p2.y) < position_eps && std::abs(p1.z - p2.z) < z_eps; +} + +bool IsPositionWithinSimpleCylinder(const glm::vec3 &p1, const glm::vec3 &cylinder_center, float cylinder_radius, float cylinder_height) +{ + //If we're outside the height of cylinder then we're not in it (duh) + auto d = std::abs(p1.z - cylinder_center.z); + if (d > cylinder_height / 2.0) { + return false; + } + + glm::vec2 p1d(p1.x, p1.y); + glm::vec2 ccd(cylinder_center.x, cylinder_center.y); + + //If we're outside the radius of the cylinder then we're not in it (also duh) + d = Distance(p1d, ccd); + if (d > cylinder_radius) { + return false; + } + + return true; +} + +bool IsPositionWithinSimpleCylinder(const glm::vec4 &p1, const glm::vec4 &cylinder_center, float cylinder_radius, float cylinder_height) +{ + //If we're outside the height of cylinder then we're not in it (duh) + auto d = std::abs(p1.z - cylinder_center.z); + if (d > cylinder_height / 2.0) { + return false; + } + + glm::vec2 p1d(p1.x, p1.y); + glm::vec2 ccd(cylinder_center.x, cylinder_center.y); + + //If we're outside the radius of the cylinder then we're not in it (also duh) + d = Distance(p1d, ccd); + if (d > cylinder_radius) { + return false; + } + + return true; +} + +float CalculateHeadingAngleBetweenPositions(float x1, float y1, float x2, float y2) +{ + float y_diff = std::abs(y1 - y2); + float x_diff = std::abs(x1 - x2); + if (y_diff < 0.0000009999999974752427) + y_diff = 0.0000009999999974752427; + + float angle = atan2(x_diff, y_diff) * 180.0f * 0.3183099014828645f; // angle, nice "pi" + + // return the right thing based on relative quadrant + // I'm sure this could be improved for readability, but whatever + if (y1 >= y2) { + if (x2 >= x1) + return (90.0f - angle + 90.0f) * 511.5f * 0.0027777778f; + if (x2 <= x1) + return (angle + 180.0f) * 511.5f * 0.0027777778f; + } + if (y1 > y2 || x2 > x1) + return angle * 511.5f * 0.0027777778f; + else + return (90.0f - angle + 270.0f) * 511.5f * 0.0027777778f; } diff --git a/zone/position.h b/zone/position.h index 479f43bb4..ccccfb857 100644 --- a/zone/position.h +++ b/zone/position.h @@ -50,6 +50,15 @@ float DistanceSquaredNoZ(const glm::vec4& point1, const glm::vec4& point2); float GetReciprocalHeading(const glm::vec4& point1); float GetReciprocalHeading(const float heading); -bool IsPositionEqual(float x1, float y1, float z1, float x2, float y2, float z2); +bool IsPositionEqual(const glm::vec2 &p1, const glm::vec2 &p2); +bool IsPositionEqual(const glm::vec3 &p1, const glm::vec3 &p2); +bool IsPositionEqual(const glm::vec4 &p1, const glm::vec4 &p2); +bool IsPositionEqualWithinCertainZ(const glm::vec3 &p1, const glm::vec3 &p2, float z_eps); +bool IsPositionEqualWithinCertainZ(const glm::vec4 &p1, const glm::vec4 &p2, float z_eps); + +bool IsPositionWithinSimpleCylinder(const glm::vec3 &p1, const glm::vec3 &cylinder_center, float cylinder_radius, float cylinder_height); +bool IsPositionWithinSimpleCylinder(const glm::vec4 &p1, const glm::vec4 &cylinder_center, float cylinder_radius, float cylinder_height); + +float CalculateHeadingAngleBetweenPositions(float x1, float y1, float x2, float y2); #endif diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index c49328848..79806ac3a 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -427,7 +427,7 @@ void NPC::SaveGuardSpot(bool iClearGuardSpot) { } void NPC::NextGuardPosition() { - NavigateTo(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z, GetMovespeed()); + NavigateTo(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z); if ((m_Position.x == m_GuardPoint.x) && (m_Position.y == m_GuardPoint.y) && (m_Position.z == m_GuardPoint.z)) { if (moved) @@ -442,8 +442,24 @@ float Mob::CalculateDistance(float x, float y, float z) { return (float)sqrtf(((m_Position.x - x)*(m_Position.x - x)) + ((m_Position.y - y)*(m_Position.y - y)) + ((m_Position.z - z)*(m_Position.z - z))); } -void Mob::NavigateTo(float x, float y, float z, float speed) { - mMovementManager->NavigateTo(this, x, y, z, speed); +void Mob::WalkTo(float x, float y, float z) +{ + mMovementManager->NavigateTo(this, x, y, z, false, MovementWalking); +} + +void Mob::RunTo(float x, float y, float z) +{ + mMovementManager->NavigateTo(this, x, y, z, false, MovementRunning); +} + +void Mob::NavigateTo(float x, float y, float z) +{ + if (IsRunning()) { + mMovementManager->NavigateTo(this, x, y, z, false, MovementRunning); + } + else { + mMovementManager->NavigateTo(this, x, y, z, false, MovementWalking); + } } void Mob::StopNavigation() { From 18ec09a79e3707f75366c1cf7380c902dc3dff77 Mon Sep 17 00:00:00 2001 From: KimLS Date: Fri, 12 Oct 2018 22:17:50 -0700 Subject: [PATCH 404/670] Velocity will now work in horizontal only instead of being both h + v (this was causing occasional skips in hilly areas) --- zone/mob_movement_manager.cpp | 63 +++++++++++++++++++++++++++++------ zone/pathing.cpp | 15 --------- 2 files changed, 52 insertions(+), 26 deletions(-) diff --git a/zone/mob_movement_manager.cpp b/zone/mob_movement_manager.cpp index 0da3436c4..616ef42cc 100644 --- a/zone/mob_movement_manager.cpp +++ b/zone/mob_movement_manager.cpp @@ -3,6 +3,7 @@ #include "mob.h" #include "zone.h" #include "position.h" +#include "water_map.h" #include "../common/eq_packet_structs.h" #include "../common/misc_functions.h" #include "../common/data_verification.h" @@ -101,6 +102,8 @@ public: m_last_sent_time = 0.0; m_last_sent_speed = 0; m_started = false; + m_total_h_dist = 0.0; + m_total_v_dist = 0.0; } virtual ~MoveToCommand() { @@ -127,15 +130,20 @@ public: m_started = true; //rotate to the point m->SetHeading(m->CalculateHeadingToTarget(m_move_to_x, m_move_to_y)); + m->TryFixZ(); m_last_sent_speed = current_speed; m_last_sent_time = current_time; + m_total_h_dist = DistanceNoZ(m->GetPosition(), glm::vec4(m_move_to_x, m_move_to_z, 0.0f, 0.0f)); + m_total_v_dist = m_move_to_z - m->GetZ(); mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, current_speed, ClientRangeCloseMedium); return false; } //When speed changes if (current_speed != m_last_sent_speed) { + m->TryFixZ(); + m_last_sent_speed = current_speed; m_last_sent_time = current_time; mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, current_speed, ClientRangeCloseMedium); @@ -144,6 +152,8 @@ public: //If x seconds have passed without sending an update. if (current_time - m_last_sent_time >= 5.0) { + m->TryFixZ(); + m_last_sent_speed = current_speed; m_last_sent_time = current_time; mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, current_speed, ClientRangeCloseMedium); @@ -151,37 +161,44 @@ public: } auto &p = m->GetPosition(); - glm::vec3 tar(m_move_to_x, m_move_to_y, m_move_to_z); - glm::vec3 pos(p.x, p.y, p.z); - + glm::vec2 tar(m_move_to_x, m_move_to_y); + glm::vec2 pos(p.x, p.y); double len = glm::distance(pos, tar); if (len == 0) { return true; } - glm::vec3 dir = tar - pos; - glm::vec3 ndir = glm::normalize(dir); + m->SetMoved(true); + + glm::vec2 dir = tar - pos; + glm::vec2 ndir = glm::normalize(dir); double distance_moved = frame_time * current_speed * 0.4f * 1.4f; if (distance_moved > len) { - m->SetPosition(tar.x, tar.y, tar.z); + m->SetPosition(m_move_to_x, m_move_to_y, m_move_to_z); if (m->IsNPC()) { - entity_list.ProcessMove(m->CastToNPC(), tar.x, tar.y, tar.z); + entity_list.ProcessMove(m->CastToNPC(), m_move_to_x, m_move_to_y, m_move_to_z); } m->TryFixZ(); return true; } else { - glm::vec3 npos = pos + (ndir * static_cast(distance_moved)); - m->SetPosition(npos.x, npos.y, npos.z); + glm::vec2 npos = pos + (ndir * static_cast(distance_moved)); + + len -= distance_moved; + double total_distance_traveled = m_total_h_dist - len; + double start_z = m_move_to_z - m_total_v_dist; + double z_at_pos = start_z + (m_total_v_dist * (total_distance_traveled / m_total_h_dist)); + + m->SetPosition(npos.x, npos.y, z_at_pos); if (m->IsNPC()) { - entity_list.ProcessMove(m->CastToNPC(), npos.x, npos.y, npos.z); + entity_list.ProcessMove(m->CastToNPC(), npos.x, npos.y, z_at_pos); } } - + return false; } @@ -199,6 +216,8 @@ private: double m_last_sent_time; int m_last_sent_speed; + double m_total_h_dist; + double m_total_v_dist; }; class TeleportToCommand : public IMovementCommand @@ -298,6 +317,21 @@ struct MobMovementEntry NavigateTo NavigateTo; }; +void AdjustRoute(std::list &nodes, int flymode, float offset) { + if (!zone->HasMap() || !zone->HasWaterMap()) { + return; + } + + for (auto &node : nodes) { + if (flymode == GravityBehavior::Ground || !zone->watermap->InLiquid(node.pos)) { + auto best_z = zone->zonemap->FindBestZ(node.pos, nullptr); + if (best_z != BEST_Z_INVALID) { + node.pos.z = best_z + offset; + } + } + } +} + struct MobMovementManager::Implementation { std::map Entries; @@ -398,6 +432,10 @@ void MobMovementManager::NavigateTo(Mob *who, float x, float y, float z, bool fo if (false == within) { //Path is no longer valid, calculate a new path UpdatePath(who, x, y, z, mode); + nav.navigate_to_x = x; + nav.navigate_to_y = y; + nav.navigate_to_z = z; + nav.last_set_time = current_time; } } } @@ -416,6 +454,7 @@ void MobMovementManager::StopNavigation(Mob *who) { return; } + who->TryFixZ(); SendCommandToClients(who, 0.0, 0.0, 0.0, 0.0, 0, ClientRangeAny); ent.second.Commands.clear(); } @@ -539,6 +578,8 @@ void MobMovementManager::UpdatePath(Mob *who, float x, float y, float z, MobMove return; } + AdjustRoute(route, who->GetFlyMode(), who->GetZOffset()); + auto iter = _impl->Entries.find(who); auto &ent = (*iter); diff --git a/zone/pathing.cpp b/zone/pathing.cpp index db133a944..74ae4c435 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -7,21 +7,6 @@ extern Zone *zone; -void AdjustRoute(std::list &nodes, int flymode, float offset) { - if (!zone->HasMap() || !zone->HasWaterMap()) { - return; - } - - for (auto &node : nodes) { - if (flymode == GravityBehavior::Ground || !zone->watermap->InLiquid(node.pos)) { - auto best_z = zone->zonemap->FindBestZ(node.pos, nullptr); - if (best_z != BEST_Z_INVALID) { - node.pos.z = best_z + offset; - } - } - } -} - void CullPoints(std::vector &points) { if (!zone->HasMap()) { return; From d0685556e8e092d04806f6e4f15ef0b40d60b297 Mon Sep 17 00:00:00 2001 From: KimLS Date: Sat, 13 Oct 2018 23:53:16 -0700 Subject: [PATCH 405/670] Bunch of bug fixes, guard behavior works again --- zone/bot.cpp | 6 ++-- zone/client_packet.cpp | 6 ++-- zone/command.cpp | 41 ++----------------------- zone/merc.cpp | 6 ++-- zone/mob.cpp | 24 ++++----------- zone/mob.h | 4 ++- zone/mob_ai.cpp | 53 +++++++++++---------------------- zone/mob_movement_manager.cpp | 56 ++++++++++++++++++++++++++++------- zone/mob_movement_manager.h | 7 ++--- zone/npc.cpp | 5 ++-- zone/position.cpp | 5 ++++ zone/position.h | 2 ++ zone/spells.cpp | 3 +- zone/waypoints.cpp | 31 +++++++++++++++---- 14 files changed, 120 insertions(+), 129 deletions(-) diff --git a/zone/bot.cpp b/zone/bot.cpp index 3cb75187d..712d572b5 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -280,7 +280,7 @@ void Bot::ChangeBotArcherWeapons(bool isArcher) { void Bot::Sit() { if(IsMoving()) { moved = false; - SetCurrentSpeed(0); + StopNavigation(); } SetAppearance(eaSitting); @@ -2999,7 +2999,7 @@ void Bot::PetAIProcess() { botPet->SetHeading(botPet->GetTarget()->GetHeading()); if(moved) { moved = false; - SetCurrentSpeed(0); + StopNavigation(); botPet->SendPosition(); botPet->SetMoving(false); } @@ -3027,7 +3027,7 @@ void Bot::PetAIProcess() { botPet->SetHeading(botPet->GetTarget()->GetHeading()); if(moved) { moved = false; - SetCurrentSpeed(0); + StopNavigation(); botPet->SendPosition(); botPet->SetMoving(false); } diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 0cd405765..cb5d7ede6 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -10041,7 +10041,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app) mypet->SetPetOrder(SPO_Guard); mypet->CastToNPC()->SaveGuardSpot(); if (!mypet->GetTarget()) // want them to not twitch if they're chasing something down - mypet->SetCurrentSpeed(0); + mypet->StopNavigation(); if (mypet->IsPetStop()) { mypet->SetPetStop(false); SetPetCommandState(PET_BUTTON_STOP, 0); @@ -10343,7 +10343,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app) mypet->SetPetStop(false); } else { mypet->SetPetStop(true); - mypet->SetCurrentSpeed(0); + mypet->StopNavigation(); mypet->SetTarget(nullptr); if (mypet->IsPetRegroup()) { mypet->SetPetRegroup(false); @@ -10359,7 +10359,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app) if ((mypet->GetPetType() == petAnimation && aabonuses.PetCommands[PetCommand]) || mypet->GetPetType() != petAnimation) { mypet->SetPetStop(true); - mypet->SetCurrentSpeed(0); + mypet->StopNavigation(); mypet->SetTarget(nullptr); mypet->SayTo_StringID(this, MT_PetResponse, PET_GETLOST_STRING); if (mypet->IsPetRegroup()) { diff --git a/zone/command.cpp b/zone/command.cpp index 6d9d875b1..5ea4f5c85 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -1271,48 +1271,11 @@ void command_movement(Client *c, const Seperator *sep) if (strcasecmp(sep->arg[1], "stats") == 0) { - //mgr.DumpStats(c); + mgr.DumpStats(c); } else if (strcasecmp(sep->arg[1], "clearstats") == 0) { - //mgr.ClearStats(); - } - if (strcasecmp(sep->arg[1], "test") == 0) - { - auto target = c->GetTarget(); - if (!target) { - c->Message(0, "Requires target"); - } - - mgr.NavigateTo(target, c->GetX(), c->GetY(), c->GetZ(), false, MovementRunning); - - //auto heading = target->CalculateHeadingToTarget(c->GetX(), c->GetY()); - //mgr.SendCommandToClients(target, 0.0f, 0.0f, 0.0f, atof(sep->arg[2]), 0, ClientRangeAny); - //mgr.RotateTo(target, heading); - - //double a1 = atof(sep->arg[2]); - //double a2 = atof(sep->arg[3]); - //double a3 = atof(sep->arg[4]); - //double a4 = atof(sep->arg[5]); - //int a5 = atoi(sep->arg[6]); - // - ////PlayerPositionUpdateServer_Struct - //EQApplicationPacket outapp(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); - //PlayerPositionUpdateServer_Struct *spu = (PlayerPositionUpdateServer_Struct*)outapp.pBuffer; - // - //memset(spu, 0x00, sizeof(PlayerPositionUpdateServer_Struct)); - //spu->spawn_id = target->GetID(); - //spu->x_pos = FloatToEQ19(target->GetX()); - //spu->y_pos = FloatToEQ19(target->GetY()); - //spu->z_pos = FloatToEQ19(target->GetZ()); - //spu->heading = FloatToEQ12(target->GetHeading()); - //spu->delta_x = FloatToEQ13(a1); - //spu->delta_y = FloatToEQ13(a2); - //spu->delta_z = FloatToEQ13(a3); - //spu->delta_heading = FloatToEQ10(a4); - //spu->animation = a5; - // - //c->QueuePacket(&outapp); + mgr.ClearStats(); } else { c->Message(0, "Usage: #movement stats/clearstats"); diff --git a/zone/merc.cpp b/zone/merc.cpp index bfa4a7233..b03042f5a 100644 --- a/zone/merc.cpp +++ b/zone/merc.cpp @@ -1471,7 +1471,7 @@ void Merc::AI_Process() { if(moved) { moved = false; - SetCurrentSpeed(0); + StopNavigation(); } } @@ -1513,7 +1513,7 @@ void Merc::AI_Process() { SetRunAnimSpeed(0); if(moved) { - SetCurrentSpeed(0); + StopNavigation(); } } @@ -1771,7 +1771,7 @@ void Merc::AI_Process() { else { if (moved) { moved = false; - SetCurrentSpeed(0); + StopNavigation(); } } } diff --git a/zone/mob.cpp b/zone/mob.cpp index 6df25048b..99ef689fe 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -1434,16 +1434,14 @@ void Mob::SendHPUpdate(bool skip_self /*= false*/, bool force_update_all /*= fal } void Mob::StopMoving() { - FixZ(); - SetCurrentSpeed(0); + StopNavigation(); if (moved) moved = false; } void Mob::StopMoving(float new_heading) { - SetHeading(new_heading); - FixZ(); - SetCurrentSpeed(0); + StopNavigation(); + RotateTo(new_heading); if (moved) moved = false; } @@ -2706,10 +2704,10 @@ void Mob::FaceTarget(Mob* mob_to_face /*= 0*/) { float new_heading = CalculateHeadingToTarget(faced_mob->GetX(), faced_mob->GetY()); if(current_heading != new_heading) { if (IsEngaged() || IsRunning()) { - mMovementManager->RotateTo(this, new_heading); + RotateToRunning(new_heading); } else { - mMovementManager->RotateTo(this, new_heading, MovementWalking); + RotateToWalking(new_heading); } } @@ -5765,18 +5763,6 @@ void Mob::SendRemovePlayerState(PlayerState old_state) safe_delete(app); } -void Mob::SetCurrentSpeed(int in){ - if (current_speed != in) - { - current_speed = in; - if (in == 0) { - SetRunAnimSpeed(0); - SetMoving(false); - SendPosition(); - } - } -} - int32 Mob::GetMeleeMitigation() { int32 mitigation = 0; mitigation += spellbonuses.MeleeMitigationEffect; diff --git a/zone/mob.h b/zone/mob.h index 35ebaf87c..f6e110353 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -549,7 +549,6 @@ public: virtual void Gate(uint8 bindnum = 0); int GetWalkspeed() const { return(_GetWalkSpeed()); } int GetRunspeed() const { return(_GetRunSpeed()); } - void SetCurrentSpeed(int in); int GetBaseRunspeed() const { return base_runspeed; } int GetBaseWalkspeed() const { return base_walkspeed; } int GetBaseFearSpeed() const { return base_fearspeed; } @@ -972,6 +971,9 @@ public: void WalkTo(float x, float y, float z); void RunTo(float x, float y, float z); void NavigateTo(float x, float y, float z); + void RotateTo(float new_heading); + void RotateToWalking(float new_heading); + void RotateToRunning(float new_heading); void StopNavigation(); float CalculateDistance(float x, float y, float z); float GetGroundZ(float new_x, float new_y, float z_offset=0.0); diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 750f5c792..12360f4e7 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -372,7 +372,7 @@ bool NPC::AIDoSpellCast(uint8 i, Mob* tar, int32 mana_cost, uint32* oDontDoAgain //stop moving if were casting a spell and were not a bard... if(!IsBardSong(AIspells[i].spellid)) { - SetCurrentSpeed(0); + StopNavigation(); } return CastSpell(AIspells[i].spellid, tar->GetID(), EQEmu::CastingSlot::Gem2, AIspells[i].manacost == -2 ? 0 : -1, mana_cost, oDontDoAgainBefore, -1, -1, 0, &(AIspells[i].resist_adjust)); @@ -715,7 +715,7 @@ void Client::AI_SpellCast() { if(!IsBardSong(spell_to_cast)) { - SetCurrentSpeed(0); + StopNavigation(); } CastSpell(spell_to_cast, tar->GetID(), slot_to_use); return; @@ -729,7 +729,7 @@ void Client::AI_SpellCast() { if(!IsBardSong(spell_to_cast)) { - SetCurrentSpeed(0); + StopNavigation(); } CastSpell(spell_to_cast, tar->GetID(), slot_to_use); return; @@ -787,9 +787,8 @@ void Client::AI_Process() if (IsRooted()) { //make sure everybody knows were not moving, for appearance sake if (IsMoving()) { - if (GetTarget()) - SetHeading(CalculateHeadingToTarget(GetTarget()->GetX(), GetTarget()->GetY())); - SetCurrentSpeed(0); + FaceTarget(); + StopNavigation(); } //continue on to attack code, ensuring that we execute the engaged code engaged = true; @@ -797,7 +796,7 @@ void Client::AI_Process() else { if (AI_movement_timer->Check()) { // Check if we have reached the last fear point - if(IsPositionEqual(glm::vec3(GetX(), GetY(), GetZ()), m_FearWalkTarget)) { + if(IsPositionEqualWithinCertainZ(glm::vec3(GetX(), GetY(), GetZ()), m_FearWalkTarget, 5.0f)) { CalculateNewFearpoint(); } @@ -844,10 +843,8 @@ void Client::AI_Process() if (AI_movement_timer->Check()) { if (CalculateHeadingToTarget(GetTarget()->GetX(), GetTarget()->GetY()) != m_Position.w) { - SetHeading(CalculateHeadingToTarget(GetTarget()->GetX(), GetTarget()->GetY())); - SendPosition(); + FaceTarget(); } - SetCurrentSpeed(0); } if (GetTarget() && !IsStunned() && !IsMezzed() && !GetFeigned()) { if (attack_timer.Check()) { @@ -874,8 +871,7 @@ void Client::AI_Process() } else if(IsMoving()) { - SetHeading(CalculateHeadingToTarget(GetTarget()->GetX(), GetTarget()->GetY())); - SetCurrentSpeed(0); + FaceTarget(); } } AI_SpellCast(); @@ -1070,9 +1066,8 @@ void Mob::AI_Process() { !IsPetRegroup()) { //make sure everybody knows were not moving, for appearance sake if (IsMoving()) { - if (target) - SetHeading(CalculateHeadingToTarget(target->GetX(), target->GetY())); - SetCurrentSpeed(0); + FaceTarget(); + StopNavigation(); moved = false; } //continue on to attack code, ensuring that we execute the engaged code @@ -1081,7 +1076,7 @@ void Mob::AI_Process() { else { if (AI_movement_timer->Check()) { // Check if we have reached the last fear point - if (IsPositionEqual(glm::vec3(GetX(), GetY(), GetZ()), m_FearWalkTarget)) { + if (IsPositionEqualWithinCertainZ(glm::vec3(GetX(), GetY(), GetZ()), m_FearWalkTarget, 5.0f)) { // Calculate a new point to run to CalculateNewFearpoint(); } @@ -1403,8 +1398,7 @@ void Mob::AI_Process() { } else if (IsMoving()) { - SetHeading(CalculateHeadingToTarget(target->GetX(), target->GetY())); - SetCurrentSpeed(0); + FaceTarget(); } } } @@ -1490,9 +1484,7 @@ void Mob::AI_Process() { * Distance: >= 450 (Snap to owner) */ if (distance_to_owner >= 202500 || z_distance > 100) { - m_Position = pet_owner_position; - SendPositionUpdate(); - moved = true; + Teleport(pet_owner_position); } else { @@ -1562,7 +1554,7 @@ void Mob::AI_Process() { } else { moved = false; - SetCurrentSpeed(0); + StopNavigation(); } } } @@ -1688,9 +1680,6 @@ void NPC::AI_DoMovement() { if (m_Position.x == roambox_destination_x && m_Position.y == roambox_destination_y) { time_until_can_move = Timer::GetCurrentTime() + RandomTimer(roambox_min_delay, roambox_delay); - SetMoving(false); - this->FixZ(); - SendPosition(); } return; @@ -1721,14 +1710,10 @@ void NPC::AI_DoMovement() { SetWaypointPause(); SetAppearance(eaStanding, false); - SetMoving(false); if (m_CurrentWayPoint.w >= 0.0) { - SetHeading(m_CurrentWayPoint.w); + RotateTo(m_CurrentWayPoint.w); } - this->FixZ(); - SendPosition(); - //kick off event_waypoint arrive char temp[16]; sprintf(temp, "%d", cur_wp); @@ -1771,7 +1756,7 @@ void NPC::AI_DoMovement() { } else if (IsGuarding()) { - bool at_gp = IsPositionEqual(m_Position, m_GuardPoint); + bool at_gp = IsPositionEqualWithinCertainZ(m_Position, m_GuardPoint, 5.0f); if (at_gp) { @@ -1786,12 +1771,11 @@ void NPC::AI_DoMovement() { ClearFeignMemory(); moved = false; if (GetTarget() == nullptr || DistanceSquared(m_Position, GetTarget()->GetPosition()) >= 5 * 5) { - SetHeading(m_GuardPoint.w); + RotateTo(m_GuardPoint.w); } else { FaceTarget(GetTarget()); } - SetCurrentSpeed(0); SetAppearance(GetGuardPointAnim()); } } @@ -1925,8 +1909,7 @@ void Mob::AI_Event_NoLongerEngaged() { // except if we're a pet, then we might run into some issues with pets backing off when they should immediately be moving if(!IsPet()) { - SetRunAnimSpeed(0); - SendPosition(); + StopNavigation(); } ClearRampage(); diff --git a/zone/mob_movement_manager.cpp b/zone/mob_movement_manager.cpp index 616ef42cc..d826ed0f0 100644 --- a/zone/mob_movement_manager.cpp +++ b/zone/mob_movement_manager.cpp @@ -48,6 +48,7 @@ public: if (!m_started) { m_started = true; + m->SetMoving(true); if (rotate_to_speed > 0.0 && rotate_to_speed <= 25.0) { //send basic rotation mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, m_rotate_to_dir * rotate_to_speed, 0, ClientRangeClose); @@ -71,7 +72,8 @@ public: if (td >= dist) { m->SetHeading(to); - mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, 0, ClientRangeAny); + m->SetMoving(false); + mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, 0, ClientRangeCloseMedium); return true; } @@ -129,6 +131,7 @@ public: if (!m_started) { m_started = true; //rotate to the point + m->SetMoving(true); m->SetHeading(m->CalculateHeadingToTarget(m_move_to_x, m_move_to_y)); m->TryFixZ(); @@ -165,6 +168,7 @@ public: glm::vec2 pos(p.x, p.y); double len = glm::distance(pos, tar); if (len == 0) { + m->SetMoving(false); return true; } @@ -172,7 +176,7 @@ public: glm::vec2 dir = tar - pos; glm::vec2 ndir = glm::normalize(dir); - double distance_moved = frame_time * current_speed * 0.4f * 1.4f; + double distance_moved = frame_time * current_speed * 0.4f * 1.45f; if (distance_moved > len) { m->SetPosition(m_move_to_x, m_move_to_y, m_move_to_z); @@ -182,6 +186,7 @@ public: } m->TryFixZ(); + m->SetMoving(false); return true; } else { @@ -272,7 +277,7 @@ public: return true; } - mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, 0, ClientRangeAny); + mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, 0, ClientRangeCloseMedium); return true; } @@ -284,12 +289,14 @@ public: struct MovementStats { MovementStats() { + LastResetTime = static_cast(Timer::GetCurrentTime()) / 1000.0; TotalSent = 0ULL; TotalSentMovement = 0ULL; TotalSentPosition = 0ULL; TotalSentHeading = 0ULL; } + double LastResetTime; uint64_t TotalSent; uint64_t TotalSentMovement; uint64_t TotalSentPosition; @@ -302,12 +309,14 @@ struct NavigateTo navigate_to_x = 0.0; navigate_to_y = 0.0; navigate_to_z = 0.0; + navigate_to_heading = 0.0; last_set_time = 0.0; } double navigate_to_x; double navigate_to_y; double navigate_to_z; + double navigate_to_heading; double last_set_time; }; @@ -417,24 +426,28 @@ void MobMovementManager::Teleport(Mob *who, float x, float y, float z, float hea PushTeleportTo(ent.second, x, y, z, heading); } -void MobMovementManager::NavigateTo(Mob *who, float x, float y, float z, bool force, MobMovementMode mode) +void MobMovementManager::NavigateTo(Mob *who, float x, float y, float z, MobMovementMode mode) { auto iter = _impl->Entries.find(who); auto &ent = (*iter); auto &nav = ent.second.NavigateTo; double current_time = static_cast(Timer::GetCurrentTime()) / 1000.0; - if (force || (current_time - nav.last_set_time) > 0.5) { + if ((current_time - nav.last_set_time) > 0.5) { //Can potentially recalc auto within = IsPositionWithinSimpleCylinder(glm::vec3(x, y, z), glm::vec3(nav.navigate_to_x, nav.navigate_to_y, nav.navigate_to_z), 1.5f, 6.0f); - - if (false == within) { + auto heading_match = IsHeadingEqual(0.0, nav.navigate_to_heading); + + if (false == within || false == heading_match) { + ent.second.Commands.clear(); + //Path is no longer valid, calculate a new path UpdatePath(who, x, y, z, mode); nav.navigate_to_x = x; nav.navigate_to_y = y; nav.navigate_to_z = z; + nav.navigate_to_heading = 0.0; nav.last_set_time = current_time; } } @@ -455,7 +468,7 @@ void MobMovementManager::StopNavigation(Mob *who) { } who->TryFixZ(); - SendCommandToClients(who, 0.0, 0.0, 0.0, 0.0, 0, ClientRangeAny); + SendCommandToClients(who, 0.0, 0.0, 0.0, 0.0, 0, ClientRangeCloseMedium); ent.second.Commands.clear(); } @@ -492,19 +505,19 @@ void MobMovementManager::SendCommandToClients(Mob *m, float dx, float dy, float bool match = false; if (range & ClientRangeClose) { - if (dist < 200.0f) { + if (dist < 250.0f) { match = true; } } if (!match && range & ClientRangeMedium) { - if (dist >= 200.0f && dist < 1000.0f) { + if (dist >= 250.0f && dist < 1500.0f) { match = true; } } if (!match && range & ClientRangeLong) { - if (dist >= 1000.0f) { + if (dist >= 1500.0f) { match = true; } } @@ -542,6 +555,27 @@ float MobMovementManager::FixHeading(float in) return h; } +void MobMovementManager::DumpStats(Client *to) +{ + auto current_time = static_cast(Timer::GetCurrentTime()) / 1000.0; + auto total_time = current_time - _impl->Stats.LastResetTime; + + to->Message(MT_System, "Dumping Movement Stats:"); + to->Message(MT_System, "Total Sent: %u (%.2f / sec)", _impl->Stats.TotalSent, static_cast(_impl->Stats.TotalSent) / total_time); + to->Message(MT_System, "Total Heading: %u (%.2f / sec)", _impl->Stats.TotalSentHeading, static_cast(_impl->Stats.TotalSentHeading) / total_time); + to->Message(MT_System, "Total Movement: %u (%.2f / sec)", _impl->Stats.TotalSentMovement, static_cast(_impl->Stats.TotalSentMovement) / total_time); + to->Message(MT_System, "Total Position: %u (%.2f / sec)", _impl->Stats.TotalSentPosition, static_cast(_impl->Stats.TotalSentPosition) / total_time); +} + +void MobMovementManager::ClearStats() +{ + _impl->Stats.LastResetTime = static_cast(Timer::GetCurrentTime()) / 1000.0; + _impl->Stats.TotalSent = 0; + _impl->Stats.TotalSentHeading = 0; + _impl->Stats.TotalSentMovement = 0; + _impl->Stats.TotalSentPosition = 0; +} + void MobMovementManager::FillCommandStruct(PlayerPositionUpdateServer_Struct *spu, Mob *m, float dx, float dy, float dz, float dh, int anim) { memset(spu, 0x00, sizeof(PlayerPositionUpdateServer_Struct)); diff --git a/zone/mob_movement_manager.h b/zone/mob_movement_manager.h index 6d04ea323..4e8d73451 100644 --- a/zone/mob_movement_manager.h +++ b/zone/mob_movement_manager.h @@ -39,13 +39,12 @@ public: void RotateTo(Mob *who, float to, MobMovementMode mode = MovementRunning); void Teleport(Mob *who, float x, float y, float z, float heading); - void NavigateTo(Mob *who, float x, float y, float z, bool force = false, MobMovementMode mode = MovementRunning); + void NavigateTo(Mob *who, float x, float y, float z, MobMovementMode mode = MovementRunning); void StopNavigation(Mob *who); void SendCommandToClients(Mob *m, float dx, float dy, float dz, float dh, int anim, ClientRange range); float FixHeading(float in); - //void Dump(Mob *m, Client *to); - //void DumpStats(Client *to); - //void ClearStats(); + void DumpStats(Client *to); + void ClearStats(); static MobMovementManager &Get() { static MobMovementManager inst; diff --git a/zone/npc.cpp b/zone/npc.cpp index 0bb1bc10d..a0e510a43 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -772,9 +772,8 @@ bool NPC::Process() DoGravityEffect(); } - if(reface_timer->Check() && !IsEngaged() && (m_GuardPoint.x == GetX() && m_GuardPoint.y == GetY() && m_GuardPoint.z == GetZ())) { - SetHeading(m_GuardPoint.w); - SendPosition(); + if(reface_timer->Check() && !IsEngaged() && IsPositionEqualWithinCertainZ(m_Position, m_GuardPoint, 5.0f)) { + RotateTo(m_GuardPoint.w); reface_timer->Disable(); } diff --git a/zone/position.cpp b/zone/position.cpp index 9f9e36fc2..cc4317e0e 100644 --- a/zone/position.cpp +++ b/zone/position.cpp @@ -163,6 +163,11 @@ float GetReciprocalHeading(const float heading) return result; } +bool IsHeadingEqual(const float h1, const float h2) +{ + return std::abs(h2 - h1) < 0.01f; +} + bool IsPositionEqual(const glm::vec2 &p1, const glm::vec2 &p2) { return std::abs(p1.x - p2.x) < position_eps && std::abs(p1.y - p2.y) < position_eps; diff --git a/zone/position.h b/zone/position.h index ccccfb857..8dcf42c3c 100644 --- a/zone/position.h +++ b/zone/position.h @@ -50,6 +50,8 @@ float DistanceSquaredNoZ(const glm::vec4& point1, const glm::vec4& point2); float GetReciprocalHeading(const glm::vec4& point1); float GetReciprocalHeading(const float heading); +bool IsHeadingEqual(const float h1, const float h2); + bool IsPositionEqual(const glm::vec2 &p1, const glm::vec2 &p2); bool IsPositionEqual(const glm::vec3 &p1, const glm::vec3 &p2); bool IsPositionEqual(const glm::vec4 &p1, const glm::vec4 &p2); diff --git a/zone/spells.cpp b/zone/spells.cpp index 56f992dbe..0b705717d 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -4898,12 +4898,11 @@ void Client::UnStun() { void NPC::Stun(int duration) { Mob::Stun(duration); - SetCurrentSpeed(0); + StopNavigation(); } void NPC::UnStun() { Mob::UnStun(); - SetCurrentSpeed(GetRunspeed()); } void Mob::Mesmerize() diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index 79806ac3a..8e5402895 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -428,12 +428,11 @@ void NPC::SaveGuardSpot(bool iClearGuardSpot) { void NPC::NextGuardPosition() { NavigateTo(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z); - if ((m_Position.x == m_GuardPoint.x) && (m_Position.y == m_GuardPoint.y) && (m_Position.z == m_GuardPoint.z)) + if (IsPositionEqualWithinCertainZ(m_Position, m_GuardPoint, 5.0f)) { if (moved) { moved = false; - SetCurrentSpeed(0); } } } @@ -444,24 +443,44 @@ float Mob::CalculateDistance(float x, float y, float z) { void Mob::WalkTo(float x, float y, float z) { - mMovementManager->NavigateTo(this, x, y, z, false, MovementWalking); + mMovementManager->NavigateTo(this, x, y, z, MovementWalking); } void Mob::RunTo(float x, float y, float z) { - mMovementManager->NavigateTo(this, x, y, z, false, MovementRunning); + mMovementManager->NavigateTo(this, x, y, z, MovementRunning); } void Mob::NavigateTo(float x, float y, float z) { if (IsRunning()) { - mMovementManager->NavigateTo(this, x, y, z, false, MovementRunning); + RunTo(x, y, z); } else { - mMovementManager->NavigateTo(this, x, y, z, false, MovementWalking); + WalkTo(x, y, z); } } +void Mob::RotateTo(float new_heading) +{ + if (IsRunning()) { + RotateToRunning(new_heading); + } + else { + RotateToWalking(new_heading); + } +} + +void Mob::RotateToWalking(float new_heading) +{ + mMovementManager->RotateTo(this, new_heading, MovementWalking); +} + +void Mob::RotateToRunning(float new_heading) +{ + mMovementManager->RotateTo(this, new_heading, MovementRunning); +} + void Mob::StopNavigation() { mMovementManager->StopNavigation(this); } From 94bce44295696f33c2a2a430be829780fb4021fe Mon Sep 17 00:00:00 2001 From: KimLS Date: Sun, 14 Oct 2018 00:02:16 -0700 Subject: [PATCH 406/670] Some checks to cut down on position sends by about 30%, still need to optimize movement sends --- zone/mob_movement_manager.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/zone/mob_movement_manager.cpp b/zone/mob_movement_manager.cpp index d826ed0f0..2b53c3f06 100644 --- a/zone/mob_movement_manager.cpp +++ b/zone/mob_movement_manager.cpp @@ -277,7 +277,10 @@ public: return true; } - mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, 0, ClientRangeCloseMedium); + if (m->IsMoving()) { + m->SetMoving(false); + mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, 0, ClientRangeCloseMedium); + } return true; } @@ -467,8 +470,11 @@ void MobMovementManager::StopNavigation(Mob *who) { return; } - who->TryFixZ(); - SendCommandToClients(who, 0.0, 0.0, 0.0, 0.0, 0, ClientRangeCloseMedium); + if (who->IsMoving()) { + who->TryFixZ(); + who->SetMoving(false); + SendCommandToClients(who, 0.0, 0.0, 0.0, 0.0, 0, ClientRangeCloseMedium); + } ent.second.Commands.clear(); } From 1600f682397c115ce5eb5704d19fd47a52b4b57a Mon Sep 17 00:00:00 2001 From: KimLS Date: Sun, 14 Oct 2018 17:17:32 -0700 Subject: [PATCH 407/670] Bots compile again --- zone/bot.cpp | 46 +++++++++++++++++++++++++------------------- zone/bot_command.cpp | 4 ++-- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/zone/bot.cpp b/zone/bot.cpp index 712d572b5..c30f08e08 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -29,7 +29,7 @@ extern volatile bool is_zone_loaded; // This constructor is used during the bot create command -Bot::Bot(NPCType npcTypeData, Client* botOwner) : NPC(&npcTypeData, nullptr, glm::vec4(), 0, false), rest_timer(1) { +Bot::Bot(NPCType npcTypeData, Client* botOwner) : NPC(&npcTypeData, nullptr, glm::vec4(), Ground, false), rest_timer(1) { if(botOwner) { this->SetBotOwner(botOwner); this->_botOwnerCharacterID = botOwner->CharacterID(); @@ -101,7 +101,8 @@ Bot::Bot(NPCType npcTypeData, Client* botOwner) : NPC(&npcTypeData, nullptr, glm } // This constructor is used when the bot is loaded out of the database -Bot::Bot(uint32 botID, uint32 botOwnerCharacterID, uint32 botSpellsID, double totalPlayTime, uint32 lastZoneId, NPCType npcTypeData) : NPC(&npcTypeData, nullptr, glm::vec4(), 0, false), rest_timer(1) +Bot::Bot(uint32 botID, uint32 botOwnerCharacterID, uint32 botSpellsID, double totalPlayTime, uint32 lastZoneId, NPCType npcTypeData) + : NPC(&npcTypeData, nullptr, glm::vec4(), Ground, false), rest_timer(1) { this->_botOwnerCharacterID = botOwnerCharacterID; if(this->_botOwnerCharacterID > 0) @@ -2507,7 +2508,7 @@ void Bot::AI_Process() { if (GetArchetype() == ARCHETYPE_CASTER || GetClass() == ROGUE) { if (tar_distance <= melee_distance_max) { if (PlotPositionAroundTarget(this, Goal.x, Goal.y, Goal.z)) { - CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetBotWalkspeed(), true, false); + WalkTo(Goal.x, Goal.y, Goal.z); return; } } @@ -2519,7 +2520,7 @@ void Bot::AI_Process() { if (caster_distance_min && tar_distance < caster_distance_min && !tar->IsFeared()) { // Caster back-off adjustment if (PlotPositionAroundTarget(this, Goal.x, Goal.y, Goal.z)) { if (DistanceSquared(Goal, tar->GetPosition()) <= caster_distance_max) { - CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetBotWalkspeed(), true, false); + WalkTo(Goal.x, Goal.y, Goal.z); return; } } @@ -2527,7 +2528,7 @@ void Bot::AI_Process() { else if (tar_distance < melee_distance_min) { // Melee back-off adjustment if (PlotPositionAroundTarget(this, Goal.x, Goal.y, Goal.z)) { if (DistanceSquared(Goal, tar->GetPosition()) <= melee_distance_max) { - CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetBotWalkspeed(), true, false); + WalkTo(Goal.x, Goal.y, Goal.z); return; } } @@ -2535,7 +2536,7 @@ void Bot::AI_Process() { else if (backstab_weapon && !behind_mob) { // Move the rogue to behind the mob if (PlotPositionAroundTarget(tar, Goal.x, Goal.y, Goal.z)) { if (DistanceSquared(Goal, tar->GetPosition()) <= melee_distance_max) { - CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetBotRunspeed(), true, false); // rogues are agile enough to run in melee range + RunTo(Goal.x, Goal.y, Goal.z); return; } } @@ -2546,7 +2547,7 @@ void Bot::AI_Process() { PlotPositionAroundTarget(tar, Goal.x, Goal.y, Goal.z)) // If we're behind the mob, we can attack when it's enraged { if (DistanceSquared(Goal, tar->GetPosition()) <= melee_distance_max) { - CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetBotWalkspeed(), true, false); + WalkTo(Goal.x, Goal.y, Goal.z); return; } } @@ -2688,7 +2689,7 @@ void Bot::AI_Process() { Goal = GetTarget()->GetPosition(); - CalculateNewPosition(Goal.x, Goal.y, Goal.z, GetBotRunspeed()); + RunTo(Goal.x, Goal.y, Goal.z); return; } else { @@ -2756,10 +2757,10 @@ void Bot::AI_Process() { if (IsMoving()) StopMoving(); - Warp(glm::vec3(my_guard)); + Teleport(my_guard); if (HasPet()) - GetPet()->Warp(glm::vec3(my_guard)); + GetPet()->Teleport(my_guard); return; } @@ -2769,10 +2770,10 @@ void Bot::AI_Process() { if (IsMoving()) StopMoving(); - Warp(glm::vec3(leash_owner->GetPosition())); + Teleport(leash_owner->GetPosition()); if (HasPet()) - GetPet()->Warp(glm::vec3(leash_owner->GetPosition())); + GetPet()->Teleport(leash_owner->GetPosition()); return; } @@ -2800,13 +2801,18 @@ void Bot::AI_Process() { if (rest_timer.Enabled()) rest_timer.Disable(); - int speed = GetBotRunspeed(); + bool running = true; if (fm_dist < GetFollowDistance() + BOT_FOLLOW_DISTANCE_WALK) - speed = GetBotWalkspeed(); + running = false; Goal = follow_mob->GetPosition(); - CalculateNewPosition(Goal.x, Goal.y, Goal.z, speed); + if (running) { + RunTo(Goal.x, Goal.y, Goal.z); + } + else { + WalkTo(Goal.x, Goal.y, Goal.z); + } return; } } @@ -2888,14 +2894,14 @@ void Bot::PetAIProcess() { if(botPet->GetClass() == ROGUE && !petHasAggro && !botPet->BehindMob(botPet->GetTarget(), botPet->GetX(), botPet->GetY())) { // Move the rogue to behind the mob if(botPet->PlotPositionAroundTarget(botPet->GetTarget(), newX, newY, newZ)) { - botPet->CalculateNewPosition(newX, newY, newZ, botPet->GetRunspeed()); + botPet->RunTo(newX, newY, newZ); return; } } else if(GetTarget() == botPet->GetTarget() && !petHasAggro && !botPet->BehindMob(botPet->GetTarget(), botPet->GetX(), botPet->GetY())) { // If the bot owner and the bot are fighting the same mob, then move the pet to the rear arc of the mob if(botPet->PlotPositionAroundTarget(botPet->GetTarget(), newX, newY, newZ)) { - botPet->CalculateNewPosition(newX, newY, newZ, botPet->GetRunspeed()); + botPet->RunTo(newX, newY, newZ); return; } } @@ -2910,7 +2916,7 @@ void Bot::PetAIProcess() { moveBehindMob = true; if(botPet->PlotPositionAroundTarget(botPet->GetTarget(), newX, newY, newZ, moveBehindMob)) { - botPet->CalculateNewPosition(newX, newY, newZ, botPet->GetRunspeed()); + botPet->RunTo(newX, newY, newZ); return; } } @@ -2993,7 +2999,7 @@ void Bot::PetAIProcess() { botPet->SetRunAnimSpeed(0); if(!botPet->IsRooted()) { Log(Logs::Detail, Logs::AI, "Pursuing %s while engaged.", botPet->GetTarget()->GetCleanName()); - botPet->CalculateNewPosition(botPet->GetTarget()->GetX(), botPet->GetTarget()->GetY(), botPet->GetTarget()->GetZ(), botPet->GetOwner()->GetRunspeed()); + botPet->RunTo(botPet->GetTarget()->GetX(), botPet->GetTarget()->GetY(), botPet->GetTarget()->GetZ()); return; } else { botPet->SetHeading(botPet->GetTarget()->GetHeading()); @@ -3021,7 +3027,7 @@ void Bot::PetAIProcess() { float dist = DistanceSquared(botPet->GetPosition(), botPet->GetTarget()->GetPosition()); botPet->SetRunAnimSpeed(0); if(dist > 184) { - botPet->CalculateNewPosition(botPet->GetTarget()->GetX(), botPet->GetTarget()->GetY(), botPet->GetTarget()->GetZ(), botPet->GetTarget()->GetRunspeed()); + botPet->RunTo(botPet->GetTarget()->GetX(), botPet->GetTarget()->GetY(), botPet->GetTarget()->GetZ()); return; } else { botPet->SetHeading(botPet->GetTarget()->GetHeading()); diff --git a/zone/bot_command.cpp b/zone/bot_command.cpp index 5bdb0918a..08b157ff0 100644 --- a/zone/bot_command.cpp +++ b/zone/bot_command.cpp @@ -5253,7 +5253,7 @@ void bot_subcommand_bot_summon(Client *c, const Seperator *sep) bot_iter->WipeHateList(); bot_iter->SetTarget(nullptr); - bot_iter->Warp(glm::vec3(c->GetPosition())); + bot_iter->Teleport(c->GetPosition()); bot_iter->DoAnim(0); if (!bot_iter->HasPet()) @@ -5261,7 +5261,7 @@ void bot_subcommand_bot_summon(Client *c, const Seperator *sep) bot_iter->GetPet()->WipeHateList(); bot_iter->GetPet()->SetTarget(nullptr); - bot_iter->GetPet()->Warp(glm::vec3(c->GetPosition())); + bot_iter->GetPet()->Teleport(c->GetPosition()); } if (sbl.size() == 1) From f76fffe62230a23a7f716a79e15b8690b977408a Mon Sep 17 00:00:00 2001 From: KimLS Date: Mon, 15 Oct 2018 22:02:16 -0700 Subject: [PATCH 408/670] A bunch of send position changes, rename navigateto --- zone/bot.cpp | 13 +-- zone/client.cpp | 2 +- zone/client_packet.cpp | 2 +- zone/client_process.cpp | 2 +- zone/command.cpp | 8 +- zone/lua_npc.cpp | 12 +-- zone/lua_npc.h | 3 +- zone/merc.cpp | 26 +++--- zone/mob.cpp | 42 +++++---- zone/mob.h | 3 +- zone/mob_ai.cpp | 171 +++++++++++++++++----------------- zone/mob_movement_manager.cpp | 13 ++- zone/npc.h | 2 +- zone/perl_npc.cpp | 19 ++-- zone/spell_effects.cpp | 2 +- zone/waypoints.cpp | 19 ++-- zone/zoning.cpp | 2 +- 17 files changed, 158 insertions(+), 183 deletions(-) diff --git a/zone/bot.cpp b/zone/bot.cpp index 23163d1de..2336b8c8d 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -1827,7 +1827,6 @@ bool Bot::Process() { if(tic_timer.Check()) { //6 seconds, or whatever the rule is set to has passed, send this position to everyone to avoid ghosting if(!IsMoving() && !IsEngaged()) { - SendPosition(); if(IsSitting()) { if(!rest_timer.Enabled()) rest_timer.Start(RuleI(Character, RestRegenTimeToActivate) * 1000); @@ -2717,8 +2716,6 @@ void Bot::AI_Process() { else { if (IsMoving()) StopMoving(); - else - SendPosition(); return; } @@ -2743,8 +2740,6 @@ void Bot::AI_Process() { } // end not in combat range if (!IsMoving() && !spellend_timer.Enabled()) { // This may actually need work... - SendPosition(); - if (GetBotStance() == BotStancePassive) return; @@ -3028,8 +3023,7 @@ void Bot::PetAIProcess() { if(moved) { moved = false; StopNavigation(); - botPet->SendPosition(); - botPet->SetMoving(false); + botPet->StopNavigation(); } } } @@ -3056,8 +3050,7 @@ void Bot::PetAIProcess() { if(moved) { moved = false; StopNavigation(); - botPet->SendPosition(); - botPet->SetMoving(false); + botPet->StopNavigation(); } } break; @@ -3119,7 +3112,7 @@ bool Bot::Spawn(Client* botCharacterOwner) { entity_list.AddBot(this, true, true); // Load pet LoadPet(); - this->SendPosition(); + SentPositionPacket(0.0f, 0.0f, 0.0f, 0.0f, 0); // there is something askew with spawn struct appearance fields... // I re-enabled this until I can sort it out uint32 itemID = 0; diff --git a/zone/client.cpp b/zone/client.cpp index 462c9c679..45ce6791c 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -6116,7 +6116,7 @@ void Client::LocateCorpse() SetHeading(CalculateHeadingToTarget(ClosestCorpse->GetX(), ClosestCorpse->GetY())); SetTarget(ClosestCorpse); SendTargetCommand(ClosestCorpse->GetID()); - SendPositionUpdate(true); + SentPositionPacket(0.0f, 0.0f, 0.0f, 0.0f, 0, true); } else if(!GetTarget()) Message_StringID(clientMessageError, SENSE_CORPSE_NONE); diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 8d6ec0328..16691e370 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -10030,7 +10030,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app) if (mypet->IsNPC()) { mypet->SayTo_StringID(this, MT_PetResponse, PET_GUARDINGLIFE); mypet->SetPetOrder(SPO_Guard); - mypet->CastToNPC()->SaveGuardSpot(); + mypet->CastToNPC()->SaveGuardSpot(mypet->GetPosition()); if (!mypet->GetTarget()) // want them to not twitch if they're chasing something down mypet->StopNavigation(); if (mypet->IsPetStop()) { diff --git a/zone/client_process.cpp b/zone/client_process.cpp index 87c6d8a49..12c9a91be 100644 --- a/zone/client_process.cpp +++ b/zone/client_process.cpp @@ -122,7 +122,7 @@ bool Client::Process() { /* I haven't naturally updated my position in 10 seconds, updating manually */ if (!is_client_moving && position_update_timer.Check()) { - SendPositionUpdate(); + SentPositionPacket(0.0f, 0.0f, 0.0f, 0.0f, 0); } if (mana_timer.Check()) diff --git a/zone/command.cpp b/zone/command.cpp index b0bdc35be..9c2008afb 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -1022,7 +1022,7 @@ void command_summon(Client *c, const Seperator *sep) { // npc target c->Message(0, "Summoning NPC %s to %1.1f, %1.1f, %1.1f", t->GetName(), c->GetX(), c->GetY(), c->GetZ()); t->CastToNPC()->GMMove(c->GetX(), c->GetY(), c->GetZ(), c->GetHeading()); - t->CastToNPC()->SaveGuardSpot(true); + t->CastToNPC()->SaveGuardSpot(glm::vec4(0.0f)); } else if (t->IsCorpse()) { // corpse target @@ -1842,7 +1842,7 @@ void command_ai(Client *c, const Seperator *sep) } else if (strcasecmp(sep->arg[1], "guard") == 0) { if (target && target->IsNPC()) - target->CastToNPC()->SaveGuardSpot(); + target->CastToNPC()->SaveGuardSpot(target->GetPosition()); else c->Message(0, "Usage: (targeted) #ai guard - sets npc to guard the current location (use #summon to move)"); } @@ -8473,9 +8473,7 @@ void command_advnpcspawn(Client *c, const Seperator *sep) } c->Message(0, "Updating coordinates successful."); - target->CastToNPC()->GMMove(c->GetX(), c->GetY(), c->GetZ(), c->GetHeading()); - target->CastToNPC()->SaveGuardSpot(true); - target->SendPosition(); + target->GMMove(c->GetX(), c->GetY(), c->GetZ(), c->GetHeading()); return; } diff --git a/zone/lua_npc.cpp b/zone/lua_npc.cpp index a16d78361..88def208a 100644 --- a/zone/lua_npc.cpp +++ b/zone/lua_npc.cpp @@ -308,14 +308,9 @@ void Lua_NPC::NextGuardPosition() { self->NextGuardPosition(); } -void Lua_NPC::SaveGuardSpot() { +void Lua_NPC::SaveGuardSpot(float x, float y, float z, float heading) { Lua_Safe_Call_Void(); - self->SaveGuardSpot(); -} - -void Lua_NPC::SaveGuardSpot(bool clear) { - Lua_Safe_Call_Void(); - self->SaveGuardSpot(clear); + self->SaveGuardSpot(glm::vec4(x, y, z, heading)); } bool Lua_NPC::IsGuarding() { @@ -567,8 +562,7 @@ luabind::scope lua_register_npc() { .def("PauseWandering", (void(Lua_NPC::*)(int))&Lua_NPC::PauseWandering) .def("MoveTo", (void(Lua_NPC::*)(float,float,float,float,bool))&Lua_NPC::MoveTo) .def("NextGuardPosition", (void(Lua_NPC::*)(void))&Lua_NPC::NextGuardPosition) - .def("SaveGuardSpot", (void(Lua_NPC::*)(void))&Lua_NPC::SaveGuardSpot) - .def("SaveGuardSpot", (void(Lua_NPC::*)(bool))&Lua_NPC::SaveGuardSpot) + .def("SaveGuardSpot", (void(Lua_NPC::*)(float,float,float,float))&Lua_NPC::SaveGuardSpot) .def("IsGuarding", (bool(Lua_NPC::*)(void))&Lua_NPC::IsGuarding) .def("AI_SetRoambox", (void(Lua_NPC::*)(float,float,float,float,float))&Lua_NPC::AI_SetRoambox) .def("AI_SetRoambox", (void(Lua_NPC::*)(float,float,float,float,float,uint32,uint32))&Lua_NPC::AI_SetRoambox) diff --git a/zone/lua_npc.h b/zone/lua_npc.h index 972adee90..5edb7b68a 100644 --- a/zone/lua_npc.h +++ b/zone/lua_npc.h @@ -87,8 +87,7 @@ public: void PauseWandering(int pause_time); void MoveTo(float x, float y, float z, float h, bool save); void NextGuardPosition(); - void SaveGuardSpot(); - void SaveGuardSpot(bool clear); + void SaveGuardSpot(float x, float y, float z, float heading); bool IsGuarding(); void AI_SetRoambox(float dist, float max_x, float min_x, float max_y, float min_y); void AI_SetRoambox(float dist, float max_x, float min_x, float max_y, float min_y, uint32 delay, uint32 mindelay); diff --git a/zone/merc.cpp b/zone/merc.cpp index c7bd12765..f8d4469de 100644 --- a/zone/merc.cpp +++ b/zone/merc.cpp @@ -1271,7 +1271,7 @@ bool Merc::Process() //6 seconds, or whatever the rule is set to has passed, send this position to everyone to avoid ghosting if(!IsMoving() && !IsEngaged()) { - SendPosition(); + SentPositionPacket(0.0f, 0.0f, 0.0f, 0.0f, 0); if(IsSitting()) { if(!rest_timer.Enabled()) { rest_timer.Start(RuleI(Character, RestRegenTimeToActivate) * 1000); @@ -1568,10 +1568,10 @@ void Merc::AI_Process() { } } - if (IsMoving()) - SendPositionUpdate(); - else - SendPosition(); + //if (IsMoving()) + // SendPositionUpdate(); + //else + // SendPosition(); } if(!IsMercCaster() && GetTarget() && !IsStunned() && !IsMezzed() && (GetAppearance() != eaDead)) @@ -1693,10 +1693,10 @@ void Merc::AI_Process() { return; } - if(IsMoving()) - SendPositionUpdate(); - else - SendPosition(); + //if(IsMoving()) + // SendPositionUpdate(); + //else + // SentPositionPacket(0.0f, 0.0f, 0.0f, 0.0f, 0); } } // end not in combat range @@ -1791,7 +1791,7 @@ void Merc::AI_Start(int32 iMoveDelay) { } SendTo(GetX(), GetY(), GetZ()); - SaveGuardSpot(); + SaveGuardSpot(GetPosition()); } void Merc::AI_Stop() { @@ -1990,7 +1990,7 @@ bool Merc::AIDoSpellCast(uint16 spellid, Mob* tar, int32 mana_cost, uint32* oDon || dist2 <= GetActSpellRange(spellid, spells[spellid].range)*GetActSpellRange(spellid, spells[spellid].range)) && (mana_cost <= GetMana() || GetMana() == GetMaxMana())) { SetRunAnimSpeed(0); - SendPosition(); + SentPositionPacket(0.0f, 0.0f, 0.0f, 0.0f, 0); SetMoving(false); result = CastSpell(spellid, tar->GetID(), EQEmu::CastingSlot::Gem2, -1, mana_cost, oDontDoAgainBefore, -1, -1, 0, 0); @@ -4360,7 +4360,7 @@ void Merc::Sit() { if(IsMoving()) { moved = false; // SetHeading(CalculateHeadingToTarget(GetTarget()->GetX(), GetTarget()->GetY())); - SendPosition(); + SentPositionPacket(0.0f, 0.0f, 0.0f, 0.0f, 0); SetMoving(false); } @@ -5128,7 +5128,7 @@ bool Merc::Spawn(Client *owner) { entity_list.AddMerc(this, true, true); - SendPosition(); + SentPositionPacket(0.0f, 0.0f, 0.0f, 0.0f, 0); Log(Logs::General, Logs::Mercenaries, "Spawn Mercenary %s.", GetName()); diff --git a/zone/mob.cpp b/zone/mob.cpp index 71f805d86..b9c6f1af3 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -159,7 +159,7 @@ Mob::Mob(const char* in_name, if (runspeed < 0 || runspeed > 20) runspeed = 1.25f; base_runspeed = (int)((float)runspeed * 40.0f); - // clients + // clients -- todo movement this doesn't take into account gm speed we need to fix that. if (runspeed == 0.7f) { base_runspeed = 28; walkspeed = 0.3f; @@ -1475,14 +1475,24 @@ void Mob::StopMoving(float new_heading) { moved = false; } -/* Used for mobs standing still - this does not send a delta */ -void Mob::SendPosition() { - //mMovementManager->SendPosition(this); -} +void Mob::SentPositionPacket(float dx, float dy, float dz, float dh, int anim, bool send_to_self) +{ + EQApplicationPacket outapp(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct)); + PlayerPositionUpdateServer_Struct *spu = (PlayerPositionUpdateServer_Struct*)outapp.pBuffer; -/* Position updates for mobs on the move */ -void Mob::SendPositionUpdate(bool iSendToSelf) { - //mMovementManager->SendPositionUpdate(this, iSendToSelf); + memset(spu, 0x00, sizeof(PlayerPositionUpdateServer_Struct)); + spu->spawn_id = GetID(); + spu->x_pos = FloatToEQ19(GetX()); + spu->y_pos = FloatToEQ19(GetY()); + spu->z_pos = FloatToEQ19(GetZ()); + spu->heading = FloatToEQ12(GetHeading()); + spu->delta_x = FloatToEQ13(dx); + spu->delta_y = FloatToEQ13(dy); + spu->delta_z = FloatToEQ13(dz); + spu->delta_heading = FloatToEQ10(dh); + spu->animation = anim; + + entity_list.QueueClients(this, &outapp, send_to_self == false, false); } // this is for SendPosition() @@ -1646,19 +1656,11 @@ void Mob::ShowBuffList(Client* client) { } void Mob::GMMove(float x, float y, float z, float heading, bool SendUpdate) { - if(IsNPC()) { - entity_list.ProcessMove(CastToNPC(), x, y, z); - } + Teleport(glm::vec4(x, y, z, heading)); - m_Position.x = x; - m_Position.y = y; - m_Position.z = z; - if (m_Position.w != 0.01) - this->m_Position.w = heading; - if(IsNPC()) - CastToNPC()->SaveGuardSpot(true); - if(SendUpdate) - SendPosition(); + if (IsNPC()) { + CastToNPC()->SaveGuardSpot(glm::vec4(x, y, z, heading)); + } } void Mob::SendIllusionPacket(uint16 in_race, uint8 in_gender, uint8 in_texture, uint8 in_helmtexture, uint8 in_haircolor, uint8 in_beardcolor, uint8 in_eyecolor1, uint8 in_eyecolor2, uint8 in_hairstyle, uint8 in_luclinface, uint8 in_beard, uint8 in_aa_title, uint32 in_drakkin_heritage, uint32 in_drakkin_tattoo, uint32 in_drakkin_details, float in_size) { diff --git a/zone/mob.h b/zone/mob.h index cd8cc4185..0a56bbd84 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -557,10 +557,9 @@ public: void SetRunning(bool val) { m_is_running = val; } virtual void GMMove(float x, float y, float z, float heading = 0.01, bool SendUpdate = true); void SetDelta(const glm::vec4& delta); - void SendPositionUpdate(bool iSendToSelf = false); void MakeSpawnUpdateNoDelta(PlayerPositionUpdateServer_Struct* spu); void MakeSpawnUpdate(PlayerPositionUpdateServer_Struct* spu); - void SendPosition(); + void SentPositionPacket(float dx, float dy, float dz, float dh, int anim, bool send_to_self = false); void StopMoving(); void StopMoving(float new_heading); void SetSpawned() { spawned = true; }; diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 19c418f10..e7cccf320 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -555,7 +555,7 @@ void NPC::AI_Start(uint32 iMoveDelay) { } SendTo(GetX(), GetY(), GetZ()); - SaveGuardSpot(); + SaveGuardSpot(GetPosition()); } void Mob::AI_Stop() { @@ -910,7 +910,6 @@ void Client::AI_Process() float dist = DistanceSquared(m_Position, owner->GetPosition()); if (dist >= 202500) { // >= 450 distance Teleport(owner->GetPosition()); - SendPositionUpdate(); // this shouldn't happen a lot (and hard to make it) so lets not rate limit } else if (dist >= 400) { // >=20 if (AI_movement_timer->Check()) { if (dist >= 1225) { @@ -929,86 +928,86 @@ void Client::AI_Process() void Mob::ProcessForcedMovement() { - //// we are being pushed, we will hijack this movement timer - //// this also needs to be done before casting to have a chance to interrupt - //// this flag won't be set if the mob can't be pushed (rooted etc) - //if (AI_movement_timer->Check()) { - // bool bPassed = true; - // glm::vec3 normal; - // - // // no zone map = fucked - // if (zone->HasMap()) { - // // in front - // m_CollisionBox[0].x = m_Position.x + 3.0f * g_Math.FastSin(0.0f); - // m_CollisionBox[0].y = m_Position.y + 3.0f * g_Math.FastCos(0.0f); - // m_CollisionBox[0].z = m_Position.z; - // - // // 45 right front - // m_CollisionBox[1].x = m_Position.x + 3.0f * g_Math.FastSin(64.0f); - // m_CollisionBox[1].y = m_Position.y + 3.0f * g_Math.FastCos(64.0f); - // m_CollisionBox[1].z = m_Position.z; - // - // // to right - // m_CollisionBox[2].x = m_Position.x + 3.0f * g_Math.FastSin(128.0f); - // m_CollisionBox[2].y = m_Position.y + 3.0f * g_Math.FastCos(128.0f); - // m_CollisionBox[2].z = m_Position.z; - // - // // 45 right back - // m_CollisionBox[3].x = m_Position.x + 3.0f * g_Math.FastSin(192.0f); - // m_CollisionBox[3].y = m_Position.y + 3.0f * g_Math.FastCos(192.0f); - // m_CollisionBox[3].z = m_Position.z; - // - // // behind - // m_CollisionBox[4].x = m_Position.x + 3.0f * g_Math.FastSin(256.0f); - // m_CollisionBox[4].y = m_Position.y + 3.0f * g_Math.FastCos(256.0f); - // m_CollisionBox[4].z = m_Position.z; - // - // // 45 left back - // m_CollisionBox[5].x = m_Position.x + 3.0f * g_Math.FastSin(320.0f); - // m_CollisionBox[5].y = m_Position.y + 3.0f * g_Math.FastCos(320.0f); - // m_CollisionBox[5].z = m_Position.z; - // - // // to left - // m_CollisionBox[6].x = m_Position.x + 3.0f * g_Math.FastSin(384.0f); - // m_CollisionBox[6].y = m_Position.y + 3.0f * g_Math.FastCos(384.0f); - // m_CollisionBox[6].z = m_Position.z; - // - // // 45 left front - // m_CollisionBox[7].x = m_Position.x + 3.0f * g_Math.FastSin(448.0f); - // m_CollisionBox[7].y = m_Position.y + 3.0f * g_Math.FastCos(448.0f); - // m_CollisionBox[7].z = m_Position.z; - // - // // collision happened, need to move along the wall - // float distance = 0.0f, shortest = std::numeric_limits::infinity(); - // glm::vec3 tmp_nrm; - // for (auto &vec : m_CollisionBox) { - // if (zone->zonemap->DoCollisionCheck(vec, vec + m_Delta, tmp_nrm, distance)) { - // bPassed = false; // lets try with new projection next pass - // if (distance < shortest) { - // normal = tmp_nrm; - // shortest = distance; - // } - // } - // } - // } - // - // if (bPassed) { - // ForcedMovement = 0; - // Teleport(m_Position + m_Delta); - // m_Delta = glm::vec4(); - // SendPositionUpdate(); - // FixZ(); // so we teleport to the ground locally, we want the client to interpolate falling etc - // } else if (--ForcedMovement) { - // if (normal.z < -0.15f) // prevent too much wall climbing. ex. OMM's room in anguish - // normal.z = 0.0f; - // auto proj = glm::proj(static_cast(m_Delta), normal); - // m_Delta.x -= proj.x; - // m_Delta.y -= proj.y; - // m_Delta.z -= proj.z; - // } else { - // m_Delta = glm::vec4(); // well, we failed to find a spot to be forced to, lets give up - // } - //} + // we are being pushed, we will hijack this movement timer + // this also needs to be done before casting to have a chance to interrupt + // this flag won't be set if the mob can't be pushed (rooted etc) + if (AI_movement_timer->Check()) { + bool bPassed = true; + glm::vec3 normal; + + // no zone map = fucked + if (zone->HasMap()) { + // in front + m_CollisionBox[0].x = m_Position.x + 3.0f * g_Math.FastSin(0.0f); + m_CollisionBox[0].y = m_Position.y + 3.0f * g_Math.FastCos(0.0f); + m_CollisionBox[0].z = m_Position.z; + + // 45 right front + m_CollisionBox[1].x = m_Position.x + 3.0f * g_Math.FastSin(64.0f); + m_CollisionBox[1].y = m_Position.y + 3.0f * g_Math.FastCos(64.0f); + m_CollisionBox[1].z = m_Position.z; + + // to right + m_CollisionBox[2].x = m_Position.x + 3.0f * g_Math.FastSin(128.0f); + m_CollisionBox[2].y = m_Position.y + 3.0f * g_Math.FastCos(128.0f); + m_CollisionBox[2].z = m_Position.z; + + // 45 right back + m_CollisionBox[3].x = m_Position.x + 3.0f * g_Math.FastSin(192.0f); + m_CollisionBox[3].y = m_Position.y + 3.0f * g_Math.FastCos(192.0f); + m_CollisionBox[3].z = m_Position.z; + + // behind + m_CollisionBox[4].x = m_Position.x + 3.0f * g_Math.FastSin(256.0f); + m_CollisionBox[4].y = m_Position.y + 3.0f * g_Math.FastCos(256.0f); + m_CollisionBox[4].z = m_Position.z; + + // 45 left back + m_CollisionBox[5].x = m_Position.x + 3.0f * g_Math.FastSin(320.0f); + m_CollisionBox[5].y = m_Position.y + 3.0f * g_Math.FastCos(320.0f); + m_CollisionBox[5].z = m_Position.z; + + // to left + m_CollisionBox[6].x = m_Position.x + 3.0f * g_Math.FastSin(384.0f); + m_CollisionBox[6].y = m_Position.y + 3.0f * g_Math.FastCos(384.0f); + m_CollisionBox[6].z = m_Position.z; + + // 45 left front + m_CollisionBox[7].x = m_Position.x + 3.0f * g_Math.FastSin(448.0f); + m_CollisionBox[7].y = m_Position.y + 3.0f * g_Math.FastCos(448.0f); + m_CollisionBox[7].z = m_Position.z; + + // collision happened, need to move along the wall + float distance = 0.0f, shortest = std::numeric_limits::infinity(); + glm::vec3 tmp_nrm; + for (auto &vec : m_CollisionBox) { + if (zone->zonemap->DoCollisionCheck(vec, vec + m_Delta, tmp_nrm, distance)) { + bPassed = false; // lets try with new projection next pass + if (distance < shortest) { + normal = tmp_nrm; + shortest = distance; + } + } + } + } + + if (bPassed) { + ForcedMovement = 0; + Teleport(m_Position + m_Delta); + m_Delta = glm::vec4(); + SentPositionPacket(0.0f, 0.0f, 0.0f, 0.0f, 0, true); + FixZ(); // so we teleport to the ground locally, we want the client to interpolate falling etc + } else if (--ForcedMovement) { + if (normal.z < -0.15f) // prevent too much wall climbing. ex. OMM's room in anguish + normal.z = 0.0f; + auto proj = glm::proj(static_cast(m_Delta), normal); + m_Delta.x -= proj.x; + m_Delta.y -= proj.y; + m_Delta.z -= proj.z; + } else { + m_Delta = glm::vec4(); // well, we failed to find a spot to be forced to, lets give up + } + } } void Mob::AI_Process() { @@ -1108,16 +1107,12 @@ void Mob::AI_Process() { if (this->GetTarget()) { /* If we are engaged, moving and following client, let's look for best Z more often */ float target_distance = DistanceNoZ(this->GetPosition(), this->GetTarget()->GetPosition()); - this->FixZ(); + FixZ(); if (target_distance <= 15 && !this->CheckLosFN(this->GetTarget())) { Mob *target = this->GetTarget(); - m_Position.x = target->GetX(); - m_Position.y = target->GetY(); - m_Position.z = target->GetZ(); - m_Position.w = target->GetHeading(); - SendPosition(); + Teleport(target->GetPosition()); } } } diff --git a/zone/mob_movement_manager.cpp b/zone/mob_movement_manager.cpp index 2b53c3f06..50aad279f 100644 --- a/zone/mob_movement_manager.cpp +++ b/zone/mob_movement_manager.cpp @@ -247,6 +247,11 @@ public: m->SetPosition(m_teleport_to_x, m_teleport_to_y, m_teleport_to_z); m->SetHeading(mgr->FixHeading(m_teleport_to_heading)); mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, 0, ClientRangeAny); + + if (m->IsNPC()) { + entity_list.ProcessMove(m->CastToNPC(), m_teleport_to_x, m_teleport_to_y, m_teleport_to_z); + } + return true; } @@ -326,7 +331,7 @@ struct NavigateTo struct MobMovementEntry { std::deque> Commands; - NavigateTo NavigateTo; + NavigateTo NavTo; }; void AdjustRoute(std::list &nodes, int flymode, float offset) { @@ -433,7 +438,7 @@ void MobMovementManager::NavigateTo(Mob *who, float x, float y, float z, MobMove { auto iter = _impl->Entries.find(who); auto &ent = (*iter); - auto &nav = ent.second.NavigateTo; + auto &nav = ent.second.NavTo; double current_time = static_cast(Timer::GetCurrentTime()) / 1000.0; if ((current_time - nav.last_set_time) > 0.5) { @@ -502,7 +507,7 @@ void MobMovementManager::SendCommandToClients(Mob *m, float dx, float dy, float _impl->Stats.TotalSentPosition++; } - c->QueuePacket(&outapp); + c->QueuePacket(&outapp, false); } } else { @@ -541,7 +546,7 @@ void MobMovementManager::SendCommandToClients(Mob *m, float dx, float dy, float _impl->Stats.TotalSentPosition++; } - c->QueuePacket(&outapp); + c->QueuePacket(&outapp, false); } } } diff --git a/zone/npc.h b/zone/npc.h index 7d2c5a9c8..2300217a5 100644 --- a/zone/npc.h +++ b/zone/npc.h @@ -305,7 +305,7 @@ public: int32 GetEquipmentMaterial(uint8 material_slot) const; void NextGuardPosition(); - void SaveGuardSpot(bool iClearGuardSpot = false); + void SaveGuardSpot(const glm::vec4 &pos); inline bool IsGuarding() const { return(m_GuardPoint.w != 0); } void SaveGuardSpotCharm(); diff --git a/zone/perl_npc.cpp b/zone/perl_npc.cpp index 1eaddf3a2..8c68af734 100644 --- a/zone/perl_npc.cpp +++ b/zone/perl_npc.cpp @@ -1341,11 +1341,14 @@ XS(XS_NPC_NextGuardPosition) { XS(XS_NPC_SaveGuardSpot); /* prototype to pass -Wmissing-prototypes */ XS(XS_NPC_SaveGuardSpot) { dXSARGS; - if (items < 1 || items > 2) - Perl_croak(aTHX_ "Usage: NPC::SaveGuardSpot(THIS, [bool clear_guard_spot = false])"); + if (items != 5) + Perl_croak(aTHX_ "Usage: NPC::SaveGuardSpot(THIS, x, y, z, heading)"); { NPC *THIS; - bool iClearGuardSpot; + float x = (float)SvNV(ST(1)); + float y = (float)SvNV(ST(2)); + float z = (float)SvNV(ST(3)); + float heading = (float)SvNV(ST(4)); if (sv_derived_from(ST(0), "NPC")) { IV tmp = SvIV((SV *) SvRV(ST(0))); @@ -1355,13 +1358,7 @@ XS(XS_NPC_SaveGuardSpot) { if (THIS == nullptr) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); - if (items < 2) - iClearGuardSpot = false; - else { - iClearGuardSpot = (bool) SvTRUE(ST(1)); - } - - THIS->SaveGuardSpot(iClearGuardSpot); + THIS->SaveGuardSpot(glm::vec4(x, y, z, heading)); } XSRETURN_EMPTY; } @@ -2449,7 +2446,7 @@ XS(boot_NPC) { newXSproto(strcpy(buf, "PauseWandering"), XS_NPC_PauseWandering, file, "$$"); newXSproto(strcpy(buf, "MoveTo"), XS_NPC_MoveTo, file, "$$$$"); newXSproto(strcpy(buf, "NextGuardPosition"), XS_NPC_NextGuardPosition, file, "$"); - newXSproto(strcpy(buf, "SaveGuardSpot"), XS_NPC_SaveGuardSpot, file, "$;$"); + newXSproto(strcpy(buf, "SaveGuardSpot"), XS_NPC_SaveGuardSpot, file, "$$$$$"); newXSproto(strcpy(buf, "IsGuarding"), XS_NPC_IsGuarding, file, "$"); newXSproto(strcpy(buf, "AI_SetRoambox"), XS_NPC_AI_SetRoambox, file, "$$$$$$;$$"); newXSproto(strcpy(buf, "GetNPCSpellsID"), XS_NPC_GetNPCSpellsID, file, "$"); diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index adcef8c76..0f239fe6f 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -851,7 +851,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove SetHeading(CalculateHeadingToTarget(ClosestMob->GetX(), ClosestMob->GetY())); SetTarget(ClosestMob); CastToClient()->SendTargetCommand(ClosestMob->GetID()); - SendPositionUpdate(true); + SentPositionPacket(0.0f, 0.0f, 0.0f, 0.0f, 0, true); } else Message_StringID(clientMessageError, SENSE_NOTHING); diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index 8e5402895..e137b605a 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -412,18 +412,13 @@ void NPC::SetWaypointPause() } } -void NPC::SaveGuardSpot(bool iClearGuardSpot) { - if (iClearGuardSpot) { - Log(Logs::Detail, Logs::AI, "Clearing guard order."); - m_GuardPoint = glm::vec4(); - } - else { - m_GuardPoint = m_Position; +void NPC::SaveGuardSpot(const glm::vec4 &pos) +{ + m_GuardPoint = pos; - if (m_GuardPoint.w == 0) - m_GuardPoint.w = 0.0001; //hack to make IsGuarding simpler - Log(Logs::Detail, Logs::AI, "Setting guard position to %s", to_string(static_cast(m_GuardPoint)).c_str()); - } + if (m_GuardPoint.w == 0) + m_GuardPoint.w = 0.0001; //hack to make IsGuarding simpler + LogF(Logs::Detail, Logs::AI, "Setting guard position to {0}", to_string(static_cast(m_GuardPoint))); } void NPC::NextGuardPosition() { @@ -819,8 +814,6 @@ void Mob::TryMoveAlong(float distance, float angle, bool send) new_pos.z = GetFixedZ(new_pos); Teleport(new_pos); - if (send) - SendPositionUpdate(); } int ZoneDatabase::GetHighestGrid(uint32 zoneid) { diff --git a/zone/zoning.cpp b/zone/zoning.cpp index 1ca418eb8..3d98f9ad6 100644 --- a/zone/zoning.cpp +++ b/zone/zoning.cpp @@ -664,7 +664,7 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z m_Proximity = glm::vec3(m_Position); //send out updates to people in zone. - SendPosition(); + SentPositionPacket(0.0f, 0.0f, 0.0f, 0.0f, 0); } auto outapp = From 973abef1b058d5e34400a4c1118259e60fb12dd2 Mon Sep 17 00:00:00 2001 From: KimLS Date: Thu, 18 Oct 2018 20:44:46 -0700 Subject: [PATCH 409/670] Water work and work with grids (still not perfect but i think its the ai code) --- zone/attack.cpp | 6 -- zone/mob.h | 1 + zone/mob_ai.cpp | 4 +- zone/mob_movement_manager.cpp | 136 ++++++++++++++++++++++++---------- zone/npc.h | 2 +- zone/waypoints.cpp | 1 - 6 files changed, 100 insertions(+), 50 deletions(-) diff --git a/zone/attack.cpp b/zone/attack.cpp index d6cf4227f..f5a126b32 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -2667,12 +2667,6 @@ void Mob::AddToHateList(Mob* other, uint32 hate /*= 0*/, int32 damage /*= 0*/, b } } } - - if (IsNPC() && CastToNPC()->IsUnderwaterOnly() && zone->HasWaterMap()) { - if (!zone->watermap->InLiquid(glm::vec3(other->GetPosition()))) { - return; - } - } // first add self // The damage on the hate list is used to award XP to the killer. This check is to prevent Killstealing. diff --git a/zone/mob.h b/zone/mob.h index 0a56bbd84..d1bd23145 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -1061,6 +1061,7 @@ public: void SetCurrentWP(uint16 waypoint) { cur_wp = waypoint; } virtual FACTION_VALUE GetReverseFactionCon(Mob* iOther) { return FACTION_INDIFFERENT; } + virtual const bool IsUnderwaterOnly() const { return false; } inline bool IsTrackable() const { return(trackable); } Timer* GetAIThinkTimer() { return AI_think_timer.get(); } Timer* GetAIMovementTimer() { return AI_movement_timer.get(); } diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index e7cccf320..8e2e3e029 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1710,7 +1710,7 @@ void NPC::AI_DoMovement() { SetWaypointPause(); SetAppearance(eaStanding, false); - if (m_CurrentWayPoint.w >= 0.0) { + if (cur_wp_pause > 0 && m_CurrentWayPoint.w >= 0.0) { RotateTo(m_CurrentWayPoint.w); } @@ -1756,7 +1756,7 @@ void NPC::AI_DoMovement() { } else if (IsGuarding()) { - bool at_gp = IsPositionEqualWithinCertainZ(m_Position, m_GuardPoint, 5.0f); + bool at_gp = IsPositionEqualWithinCertainZ(m_Position, m_GuardPoint, 15.0f); if (at_gp) { diff --git a/zone/mob_movement_manager.cpp b/zone/mob_movement_manager.cpp index 50aad279f..f6b1b6b07 100644 --- a/zone/mob_movement_manager.cpp +++ b/zone/mob_movement_manager.cpp @@ -46,28 +46,29 @@ public: auto rotate_to_speed = m_rotate_to_mode == MovementRunning ? 50.0 : 16.0; //todo: get this from mob + auto from = FixHeading(m->GetHeading()); + auto to = FixHeading(m_rotate_to); + auto diff = to - from; + + while (diff < -256.0) { + diff += 512.0; + } + + while (diff > 256) { + diff -= 512.0; + } + + auto dist = std::abs(diff); + if (!m_started) { m_started = true; m->SetMoving(true); - if (rotate_to_speed > 0.0 && rotate_to_speed <= 25.0) { //send basic rotation + if (dist > 15.0f && rotate_to_speed > 0.0 && rotate_to_speed <= 25.0) { //send basic rotation mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, m_rotate_to_dir * rotate_to_speed, 0, ClientRangeClose); } } - auto from = FixHeading(m->GetHeading()); - auto to = FixHeading(m_rotate_to); - auto diff = to - from; - - while (diff < -256.0) { - diff += 512.0; - } - - while (diff > 256) { - diff -= 512.0; - } - - auto dist = std::abs(diff); auto td = rotate_to_speed * 19.0 * frame_time; if (td >= dist) { @@ -604,51 +605,106 @@ void MobMovementManager::FillCommandStruct(PlayerPositionUpdateServer_Struct *sp void MobMovementManager::UpdatePath(Mob *who, float x, float y, float z, MobMovementMode mode) { + //If who is underwater & xyz is underwater & who can see xyz + //Create a route directly from who to xyz + //else + //Create Route + if (zone->HasMap() && zone->HasWaterMap()) { + if (zone->watermap->InLiquid(who->GetPosition()) && zone->watermap->InLiquid(glm::vec3(x, y, z)) && zone->zonemap->CheckLoS(who->GetPosition(), glm::vec3(x, y, z))) { + auto iter = _impl->Entries.find(who); + auto &ent = (*iter); + + PushMoveTo(ent.second, x, y, z, mode); + return; + } + } + bool partial = false; bool stuck = false; auto route = zone->pathing->FindRoute(glm::vec3(who->GetX(), who->GetY(), who->GetZ()), glm::vec3(x, y, z), partial, stuck); - + + //if route empty then return if (route.empty()) { return; } auto &first = route.front(); + auto &last = route.back(); - //if who is already at the first node, then cull it - if (IsPositionEqualWithinCertainZ(glm::vec3(who->GetX(), who->GetY(), who->GetZ()), first.pos, 5.0f)) { - route.pop_front(); - } - - if (route.empty()) { - return; + if (zone->HasWaterMap()) { + //If who is underwater & who is not at the first node + //Add node at who + if (!IsPositionEqualWithinCertainZ(glm::vec3(who->GetX(), who->GetY(), who->GetZ()), first.pos, 5.0f) + && zone->watermap->InLiquid(who->GetPosition())) + { + IPathfinder::IPathNode node(who->GetPosition()); + route.push_front(node); + } + + //If xyz is underwater & xyz is not at the last node + //Add node at xyz + if (!IsPositionEqualWithinCertainZ(glm::vec3(x, y, z), last.pos, 5.0f) + && zone->watermap->InLiquid(glm::vec3(x, y, z))) + { + IPathfinder::IPathNode node(glm::vec3(x, y, z)); + route.push_back(node); + } } + //adjust route AdjustRoute(route, who->GetFlyMode(), who->GetZOffset()); - auto iter = _impl->Entries.find(who); - auto &ent = (*iter); - - first = route.front(); - //If mode = walking then rotateto first node (if possible, live does this) - if (mode == MovementWalking) { - auto h = who->CalculateHeadingToTarget(first.pos.x, first.pos.y); - PushRotateTo(ent.second, who, h, mode); - } - - //for each node create a moveto/teleport command + auto eiter = _impl->Entries.find(who); + auto &ent = (*eiter); + auto iter = route.begin(); glm::vec3 previous_pos(who->GetX(), who->GetY(), who->GetZ()); - for (auto &node : route) { - if (node.teleport) { - PushTeleportTo(ent.second, node.pos.x, node.pos.y, node.pos.z, - CalculateHeadingAngleBetweenPositions(previous_pos.x, previous_pos.y, node.pos.x, node.pos.y)); + bool first_node = true; + + //for each node + while (iter != route.end()) { + auto ¤t_node = (*iter); + + iter++; + + if (iter == route.end()) { + continue; + } + + previous_pos = current_node.pos; + auto &next_node = (*iter); + + if (first_node) { + + if (mode == MovementWalking) { + auto h = who->CalculateHeadingToTarget(next_node.pos.x, next_node.pos.y); + PushRotateTo(ent.second, who, h, mode); + } + + first_node = false; + } + //yet rotate to node + 1 + //auto h = CalculateHeadingAngleBetweenPositions(current_node.pos.x, current_node.pos.y, next_node.pos.x, next_node.pos.z); + //PushRotateTo(ent.second, who, h, mode); + + //if underwater only mob and node -> node + 1 is moving to land (terminate route, npc will go to the point where it would normally exit the water but no further) + if (who->IsUnderwaterOnly()) { + if (zone->HasWaterMap() && !zone->watermap->InLiquid(next_node.pos)) { + PushStopMoving(ent.second); + return; + } + } + + //move to / teleport to node + 1 + if (next_node.teleport) { + PushTeleportTo(ent.second, next_node.pos.x, next_node.pos.y, next_node.pos.z, + CalculateHeadingAngleBetweenPositions(current_node.pos.x, current_node.pos.y, next_node.pos.x, next_node.pos.y)); } else { - PushMoveTo(ent.second, node.pos.x, node.pos.y, node.pos.z, mode); + PushMoveTo(ent.second, next_node.pos.x, next_node.pos.y, next_node.pos.z, mode); } - - previous_pos = node.pos; } + //if stuck then handle stuck if (stuck) { PushTeleportTo(ent.second, x, y, z, CalculateHeadingAngleBetweenPositions(previous_pos.x, previous_pos.y, x, y)); diff --git a/zone/npc.h b/zone/npc.h index 2300217a5..5844c1a83 100644 --- a/zone/npc.h +++ b/zone/npc.h @@ -381,7 +381,7 @@ public: /* Only allows players that killed corpse to loot */ const bool HasPrivateCorpse() const { return NPCTypedata->private_corpse; } - const bool IsUnderwaterOnly() const { return NPCTypedata->underwater; } + virtual const bool IsUnderwaterOnly() const { return NPCTypedata->underwater; } const char* GetRawNPCTypeName() const { return NPCTypedata->name; } void ChangeLastName(const char* in_lastname); diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index e137b605a..c156914c8 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -392,7 +392,6 @@ void NPC::SetWaypointPause() if (cur_wp_pause == 0) { AI_walking_timer->Start(100); - AI_walking_timer->Trigger(); } else { From 904bc3e004be7a19eb6f49257d7e257c68d86084 Mon Sep 17 00:00:00 2001 From: E Spause Date: Fri, 19 Oct 2018 15:26:26 -0400 Subject: [PATCH 410/670] Add MoveTo functionality to allow NPC to clip through walls and prevent getting stuck in the event that there are 2 or less nodes. Teleport logic fixes Add MoveTo functionality to allow NPC to clip through walls and prevent getting stuck in the event that there are 2 or less nodes. Changed Teleport logic; NPCs should no longer warp and instead clip thru walls / z axis on geometry when stuck or teleporting. Added a sanity check for teleport nodes at 0,0,0 which have been observed on a few nav meshes. This is in case someone accidentally adds one. --- zone/mob_movement_manager.cpp | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/zone/mob_movement_manager.cpp b/zone/mob_movement_manager.cpp index f6b1b6b07..129488bac 100644 --- a/zone/mob_movement_manager.cpp +++ b/zone/mob_movement_manager.cpp @@ -623,11 +623,28 @@ void MobMovementManager::UpdatePath(Mob *who, float x, float y, float z, MobMove bool stuck = false; auto route = zone->pathing->FindRoute(glm::vec3(who->GetX(), who->GetY(), who->GetZ()), glm::vec3(x, y, z), partial, stuck); - //if route empty then return - if (route.empty()) { - return; + //if route empty or only has two points, and we have los, then just force npc to move to location + if (route.size() < 3) { + auto iter = _impl->Entries.find(who); + auto &ent = (*iter); + if (zone->zonemap->CheckLoS(who->GetPosition(), glm::vec3(x, y, z)) && route.size() > 0) + { + + auto &first = route.front(); + auto &last = route.back(); + + PushMoveTo(ent.second, x, y, z, mode); + return; + } + else if(route.size() < 2) + { + PushMoveTo(ent.second, x, y, z, mode); + return; + } } + + auto &first = route.front(); auto &last = route.back(); @@ -695,19 +712,21 @@ void MobMovementManager::UpdatePath(Mob *who, float x, float y, float z, MobMove } //move to / teleport to node + 1 - if (next_node.teleport) { + if (next_node.teleport && next_node.pos.x != 0.0f && next_node.pos.y != 0.0f) { PushTeleportTo(ent.second, next_node.pos.x, next_node.pos.y, next_node.pos.z, CalculateHeadingAngleBetweenPositions(current_node.pos.x, current_node.pos.y, next_node.pos.x, next_node.pos.y)); } else { - PushMoveTo(ent.second, next_node.pos.x, next_node.pos.y, next_node.pos.z, mode); + if (next_node.pos.x != 0.0f && next_node.pos.y != 0.0f) + { + PushMoveTo(ent.second, next_node.pos.x, next_node.pos.y, next_node.pos.z, mode); + } } } //if stuck then handle stuck if (stuck) { - PushTeleportTo(ent.second, x, y, z, - CalculateHeadingAngleBetweenPositions(previous_pos.x, previous_pos.y, x, y)); + PushMoveTo(ent.second, x, y, z, mode); } else { PushStopMoving(ent.second); From dc4f52deebe16a0fbc3b6aadd42e2032fca17597 Mon Sep 17 00:00:00 2001 From: KimLS Date: Fri, 19 Oct 2018 13:05:40 -0700 Subject: [PATCH 411/670] Remove comment --- zone/mob_movement_manager.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/zone/mob_movement_manager.cpp b/zone/mob_movement_manager.cpp index f6b1b6b07..a5ee31b80 100644 --- a/zone/mob_movement_manager.cpp +++ b/zone/mob_movement_manager.cpp @@ -682,9 +682,6 @@ void MobMovementManager::UpdatePath(Mob *who, float x, float y, float z, MobMove first_node = false; } - //yet rotate to node + 1 - //auto h = CalculateHeadingAngleBetweenPositions(current_node.pos.x, current_node.pos.y, next_node.pos.x, next_node.pos.z); - //PushRotateTo(ent.second, who, h, mode); //if underwater only mob and node -> node + 1 is moving to land (terminate route, npc will go to the point where it would normally exit the water but no further) if (who->IsUnderwaterOnly()) { From 88debae6600d9ccd480fa31008551385f473b748 Mon Sep 17 00:00:00 2001 From: Matt Hogan Date: Fri, 19 Oct 2018 19:37:25 -0400 Subject: [PATCH 412/670] Added get_data_expires function to both Perl and Lua to retrieve DataBucket expire time --- zone/data_bucket.cpp | 25 +++++++++++++++++++++++++ zone/data_bucket.h | 1 + zone/embparser_api.cpp | 15 +++++++++++++++ zone/lua_general.cpp | 4 ++++ 4 files changed, 45 insertions(+) diff --git a/zone/data_bucket.cpp b/zone/data_bucket.cpp index d1bdcd83c..15a6e7720 100644 --- a/zone/data_bucket.cpp +++ b/zone/data_bucket.cpp @@ -76,6 +76,31 @@ std::string DataBucket::GetData(std::string bucket_key) { return std::string(row[0]); } +/** + * Retrieves data expires time via bucket_name as key + * @param bucket_key + * @return + */ +std::string DataBucket::GetDataExpires(std::string bucket_key) { + std::string query = StringFormat( + "SELECT `expires` from `data_buckets` WHERE `key` = '%s' AND (`expires` > %lld OR `expires` = 0) LIMIT 1", + bucket_key.c_str(), + (long long) std::time(nullptr) + ); + + auto results = database.QueryDatabase(query); + if (!results.Success()) { + return std::string(); + } + + if (results.RowCount() != 1) + return std::string(); + + auto row = results.begin(); + + return std::string(row[0]); +} + /** * Checks for bucket existence by bucket_name key * @param bucket_key diff --git a/zone/data_bucket.h b/zone/data_bucket.h index 87d3ab0b3..88a344637 100644 --- a/zone/data_bucket.h +++ b/zone/data_bucket.h @@ -14,6 +14,7 @@ public: static void SetData(std::string bucket_key, std::string bucket_value, std::string expires_time = ""); static bool DeleteData(std::string bucket_key); static std::string GetData(std::string bucket_key); + static std::string GetDataExpires(std::string bucket_key); private: static uint64 DoesBucketExist(std::string bucket_key); static uint32 ParseStringTimeToInt(std::string time_string); diff --git a/zone/embparser_api.cpp b/zone/embparser_api.cpp index 1a251b8ec..633bcda53 100644 --- a/zone/embparser_api.cpp +++ b/zone/embparser_api.cpp @@ -3596,6 +3596,21 @@ XS(XS__get_data) { XSRETURN(1); } +XS(XS__get_data_expires); +XS(XS__get_data_expires) { + dXSARGS; + if (items != 1) + Perl_croak(aTHX_ "Usage: quest::get_data_expires(string bucket_key)"); + + dXSTARG; + std::string key = (std::string) SvPV_nolen(ST(0)); + + sv_setpv(TARG, DataBucket::GetDataExpires(key).c_str()); + XSprePUSH; + PUSHTARG; + XSRETURN(1); +} + XS(XS__set_data); XS(XS__set_data) { dXSARGS; diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp index 65fe2c575..955b69d5e 100644 --- a/zone/lua_general.cpp +++ b/zone/lua_general.cpp @@ -822,6 +822,10 @@ std::string lua_get_data(std::string bucket_key) { return DataBucket::GetData(bucket_key); } +std::string lua_get_data_expires(std::string bucket_key) { + return DataBucket::GetDataExpires(bucket_key); +} + void lua_set_data(std::string bucket_key, std::string bucket_value) { DataBucket::SetData(bucket_key, bucket_value); } From e466f9b3f9c2f75b5f4ba5c36d51d42110ab5ce5 Mon Sep 17 00:00:00 2001 From: E Spause Date: Fri, 19 Oct 2018 22:35:38 -0400 Subject: [PATCH 413/670] Fear pathing fixups, random path rewrite, and nektulos / general roambox fixups where best Z axis is below the ground --- zone/fearpath.cpp | 28 +++------------------------- zone/mob_ai.cpp | 8 +++++--- zone/pathfinder_interface.h | 2 +- zone/pathfinder_nav_mesh.cpp | 32 +++++++++++++++++++++++++++----- zone/pathfinder_nav_mesh.h | 4 ++-- zone/pathfinder_null.cpp | 2 +- zone/pathfinder_null.h | 4 ++-- zone/pathfinder_waypoint.cpp | 2 +- zone/pathfinder_waypoint.h | 4 ++-- 9 files changed, 44 insertions(+), 42 deletions(-) diff --git a/zone/fearpath.cpp b/zone/fearpath.cpp index c73ec448e..d86d0948e 100644 --- a/zone/fearpath.cpp +++ b/zone/fearpath.cpp @@ -157,41 +157,19 @@ void Mob::ProcessFlee() void Mob::CalculateNewFearpoint() { if (RuleB(Pathing, Fear) && zone->pathing) { - auto Node = zone->pathing->GetRandomLocation(); + auto Node = zone->pathing->GetRandomLocation(glm::vec3(GetX(), GetY(), GetZ())); if (Node.x != 0.0f || Node.y != 0.0f || Node.z != 0.0f) { - - ++Node.z; m_FearWalkTarget = Node; currently_fleeing = true; return; } + Stun(6000); + Log(Logs::Detail, Logs::Pathing, "No path found to selected node. Falling through to old fear point selection."); } - - int loop = 0; - float ranx, rany, ranz; - - currently_fleeing = true; - while (loop < 100) //Max 100 tries - { - int ran = 250 - (loop * 2); - loop++; - ranx = GetX() + zone->random.Int(0, ran - 1) - zone->random.Int(0, ran - 1); - rany = GetY() + zone->random.Int(0, ran - 1) - zone->random.Int(0, ran - 1); - ranz = FindGroundZ(ranx, rany); - if (ranz == BEST_Z_INVALID) - continue; - float fdist = ranz - GetZ(); - if (fdist >= -12 && fdist <= 12 && CheckCoordLosNoZLeaps(GetX(), GetY(), GetZ(), ranx, rany, ranz)) { - break; - } - } - - if (currently_fleeing) - m_FearWalkTarget = glm::vec3(ranx, rany, ranz); } diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 8e2e3e029..bde1b5f11 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -802,6 +802,7 @@ void Client::AI_Process() if (AI_movement_timer->Check()) { // Check if we have reached the last fear point if(IsPositionEqualWithinCertainZ(glm::vec3(GetX(), GetY(), GetZ()), m_FearWalkTarget, 5.0f)) { + StopNavigation(); CalculateNewFearpoint(); } @@ -1080,11 +1081,12 @@ void Mob::AI_Process() { else { if (AI_movement_timer->Check()) { // Check if we have reached the last fear point - if (IsPositionEqualWithinCertainZ(glm::vec3(GetX(), GetY(), GetZ()), m_FearWalkTarget, 5.0f)) { + if (DistanceNoZ(glm::vec3(GetX(), GetY(), GetZ()), m_FearWalkTarget) <= 5.0f) { // Calculate a new point to run to + StopNavigation(); CalculateNewFearpoint(); } - NavigateTo( + RunTo( m_FearWalkTarget.x, m_FearWalkTarget.y, m_FearWalkTarget.z @@ -1661,7 +1663,7 @@ void NPC::AI_DoMovement() { destination.x = roambox_destination_x; destination.y = roambox_destination_y; destination.z = m_Position.z; - roambox_destination_z = GetFixedZ(destination) + this->GetZOffset(); + roambox_destination_z = zone->zonemap->FindClosestZ(glm::vec3(roambox_destination_x, roambox_destination_y, roambox_destination_z), nullptr) + this->GetZOffset(); Log(Logs::Detail, Logs::NPCRoamBox, diff --git a/zone/pathfinder_interface.h b/zone/pathfinder_interface.h index 2a874a50d..85a153813 100644 --- a/zone/pathfinder_interface.h +++ b/zone/pathfinder_interface.h @@ -30,7 +30,7 @@ public: virtual ~IPathfinder() { } virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &stuck) = 0; - virtual glm::vec3 GetRandomLocation() = 0; + virtual glm::vec3 GetRandomLocation(const glm::vec3 &start) = 0; virtual void DebugCommand(Client *c, const Seperator *sep) = 0; static IPathfinder *Load(const std::string &zone); diff --git a/zone/pathfinder_nav_mesh.cpp b/zone/pathfinder_nav_mesh.cpp index 615ba1c4e..cddf8d151 100644 --- a/zone/pathfinder_nav_mesh.cpp +++ b/zone/pathfinder_nav_mesh.cpp @@ -131,8 +131,11 @@ IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const gl return Route; } -glm::vec3 PathfinderNavmesh::GetRandomLocation() +glm::vec3 PathfinderNavmesh::GetRandomLocation(const glm::vec3 &start) { + if (start.x == 0.0f && start.y == 0.0) + return glm::vec3(0.f); + if (!m_impl->nav_mesh) { return glm::vec3(0.f); } @@ -143,14 +146,33 @@ glm::vec3 PathfinderNavmesh::GetRandomLocation() } dtQueryFilter filter; - filter.setIncludeFlags(65535U); + filter.setIncludeFlags(65535U ^ 2048); + filter.setAreaCost(0, 1.0f); //Normal + filter.setAreaCost(1, 3.0f); //Water + filter.setAreaCost(2, 5.0f); //Lava + filter.setAreaCost(4, 1.0f); //PvP + filter.setAreaCost(5, 2.0f); //Slime + filter.setAreaCost(6, 2.0f); //Ice + filter.setAreaCost(7, 4.0f); //V Water (Frigid Water) + filter.setAreaCost(8, 1.0f); //General Area + filter.setAreaCost(9, 0.1f); //Portal + filter.setAreaCost(10, 0.1f); //Prefer dtPolyRef randomRef; float point[3]; - if (dtStatusSucceed(m_impl->query->findRandomPoint(&filter, []() { - return (float)zone->random.Real(0.0, 1.0); - }, &randomRef, point))) + dtPolyRef start_ref; + glm::vec3 current_location(start.x, start.z, start.y); + glm::vec3 ext(5.0f, 100.0f, 5.0f); + + m_impl->query->findNearestPoly(¤t_location[0], &ext[0], &filter, &start_ref, 0); + + if (!start_ref) + { + return glm::vec3(0.f); + } + + if (dtStatusSucceed(m_impl->query->findRandomPointAroundCircle(start_ref, ¤t_location[0], 100.f, &filter, []() { return (float)zone->random.Real(0.0, 1.0); }, &randomRef, point))) { return glm::vec3(point[0], point[2], point[1]); } diff --git a/zone/pathfinder_nav_mesh.h b/zone/pathfinder_nav_mesh.h index e740e5ca7..40fca0b3b 100644 --- a/zone/pathfinder_nav_mesh.h +++ b/zone/pathfinder_nav_mesh.h @@ -10,7 +10,7 @@ public: virtual ~PathfinderNavmesh(); virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &stuck); - virtual glm::vec3 GetRandomLocation(); + virtual glm::vec3 GetRandomLocation(const glm::vec3 &start); virtual void DebugCommand(Client *c, const Seperator *sep); private: @@ -20,4 +20,4 @@ private: struct Implementation; std::unique_ptr m_impl; -}; \ No newline at end of file +}; diff --git a/zone/pathfinder_null.cpp b/zone/pathfinder_null.cpp index dce3d19f5..4a5cbbe63 100644 --- a/zone/pathfinder_null.cpp +++ b/zone/pathfinder_null.cpp @@ -10,7 +10,7 @@ IPathfinder::IPath PathfinderNull::FindRoute(const glm::vec3 &start, const glm:: return ret; } -glm::vec3 PathfinderNull::GetRandomLocation() +glm::vec3 PathfinderNull::GetRandomLocation(const glm::vec3 &start) { return glm::vec3(); } diff --git a/zone/pathfinder_null.h b/zone/pathfinder_null.h index 2c43e3085..242dcf755 100644 --- a/zone/pathfinder_null.h +++ b/zone/pathfinder_null.h @@ -9,6 +9,6 @@ public: virtual ~PathfinderNull() { } virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &stuck); - virtual glm::vec3 GetRandomLocation(); + virtual glm::vec3 GetRandomLocation(const glm::vec3 &start); virtual void DebugCommand(Client *c, const Seperator *sep) { } -}; \ No newline at end of file +}; diff --git a/zone/pathfinder_waypoint.cpp b/zone/pathfinder_waypoint.cpp index c3a85418e..9e9831e9c 100644 --- a/zone/pathfinder_waypoint.cpp +++ b/zone/pathfinder_waypoint.cpp @@ -184,7 +184,7 @@ IPathfinder::IPath PathfinderWaypoint::FindRoute(const glm::vec3 &start, const g return IPath(); } -glm::vec3 PathfinderWaypoint::GetRandomLocation() +glm::vec3 PathfinderWaypoint::GetRandomLocation(const glm::vec3 &start) { if (m_impl->Nodes.size() > 0) { auto idx = zone->random.Int(0, (int)m_impl->Nodes.size() - 1); diff --git a/zone/pathfinder_waypoint.h b/zone/pathfinder_waypoint.h index 3f6b99c9f..1570eca24 100644 --- a/zone/pathfinder_waypoint.h +++ b/zone/pathfinder_waypoint.h @@ -12,7 +12,7 @@ public: virtual ~PathfinderWaypoint(); virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &stuck); - virtual glm::vec3 GetRandomLocation(); + virtual glm::vec3 GetRandomLocation(const glm::vec3 &start); virtual void DebugCommand(Client *c, const Seperator *sep); private: @@ -28,4 +28,4 @@ private: struct Implementation; std::unique_ptr m_impl; -}; \ No newline at end of file +}; From fb645e276c1809c2d8676c8b276af409774cbfe2 Mon Sep 17 00:00:00 2001 From: E Spause Date: Sat, 20 Oct 2018 18:43:53 -0400 Subject: [PATCH 414/670] Update zone/mob_ai.cpp --- zone/mob_ai.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index bde1b5f11..717274042 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1663,7 +1663,7 @@ void NPC::AI_DoMovement() { destination.x = roambox_destination_x; destination.y = roambox_destination_y; destination.z = m_Position.z; - roambox_destination_z = zone->zonemap->FindClosestZ(glm::vec3(roambox_destination_x, roambox_destination_y, roambox_destination_z), nullptr) + this->GetZOffset(); + roambox_destination_z = zone->zonemap->FindClosestZ(destination, nullptr) + this->GetZOffset(); Log(Logs::Detail, Logs::NPCRoamBox, From 55197cf830f8ca926ab284656f2c2487505f313e Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sat, 20 Oct 2018 21:07:45 -0500 Subject: [PATCH 415/670] Add fix for data buckets deletion --- zone/data_bucket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/data_bucket.cpp b/zone/data_bucket.cpp index d1bdcd83c..67c1e04c4 100644 --- a/zone/data_bucket.cpp +++ b/zone/data_bucket.cpp @@ -107,7 +107,7 @@ uint64 DataBucket::DoesBucketExist(std::string bucket_key) { */ bool DataBucket::DeleteData(std::string bucket_key) { std::string query = StringFormat( - "DELETE FROM `data_buckets` WHERE `key` = '%s' AND (`expires` > %lld OR `expires` = 0)", + "DELETE FROM `data_buckets` WHERE `key` = '%s'", EscapeString(bucket_key).c_str() ); From 0830ea865069039a7ff802ae8e160b84d1be0841 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Sat, 20 Oct 2018 22:54:38 -0400 Subject: [PATCH 416/670] Zone header was getting ignored by RoF2 client. --- zone/client_packet.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index c6fd66894..ceb242890 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -1115,7 +1115,12 @@ void Client::Handle_Connect_OP_ReqNewZone(const EQApplicationPacket *app) memcpy(outapp->pBuffer, &zone->newzone_data, sizeof(NewZone_Struct)); strcpy(nz->char_name, m_pp.name); - FastQueuePacket(&outapp); + // This was using FastQueuePacket and the packet was never getting sent... + // Not sure if this was timing.... but the NewZone was never logged until + // I changed it. + outapp->priority = 6; + QueuePacket(outapp); + safe_delete(outapp); return; } @@ -1741,11 +1746,6 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app) /* Task Packets */ LoadClientTaskState(); - if (ClientVersion() >= EQEmu::versions::ClientVersion::RoF) { - outapp = new EQApplicationPacket(OP_ReqNewZone, 0); - Handle_Connect_OP_ReqNewZone(outapp); - safe_delete(outapp); - } if (m_ClientVersionBit & EQEmu::versions::bit_UFAndLater) { outapp = new EQApplicationPacket(OP_XTargetResponse, 8); @@ -1771,6 +1771,10 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app) QueuePacket(outapp); safe_delete(outapp); + if (ClientVersion() >= EQEmu::versions::ClientVersion::RoF) { + Handle_Connect_OP_ReqNewZone(nullptr); + } + SetAttackTimer(); conn_state = ZoneInfoSent; zoneinpacket_timer.Start(); From ab8075d629e5b51a42b8b39411ca7819f93fc2e7 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sat, 20 Oct 2018 22:29:59 -0500 Subject: [PATCH 417/670] Cleanup eqemu_logsys code and automatically inject new logging categories into the database if they do not exist --- .gitignore | 3 +- common/database.cpp | 102 +++++++--- common/eqemu_logsys.cpp | 421 +++++++++++++++++++++++++++------------- common/eqemu_logsys.h | 382 ++++++++++++++++++++---------------- 4 files changed, 569 insertions(+), 339 deletions(-) diff --git a/.gitignore b/.gitignore index 5698779e8..a5e41a779 100644 --- a/.gitignore +++ b/.gitignore @@ -39,4 +39,5 @@ log/ logs/ vcpkg/ -.idea/* \ No newline at end of file +.idea/* +*cbp \ No newline at end of file diff --git a/common/database.cpp b/common/database.cpp index 2ec4675b3..a9496b6e3 100644 --- a/common/database.cpp +++ b/common/database.cpp @@ -2063,51 +2063,91 @@ uint32 Database::GetGuildIDByCharID(uint32 character_id) return atoi(row[0]); } -void Database::LoadLogSettings(EQEmuLogSys::LogSettings* log_settings) -{ +void Database::LoadLogSettings(EQEmuLogSys::LogSettings* log_settings) { // log_settings previously initialized to '0' by EQEmuLogSys::LoadLogSettingsDefaults() - - std::string query = - "SELECT " - "log_category_id, " - "log_category_description, " - "log_to_console, " - "log_to_file, " - "log_to_gmsay " - "FROM " - "logsys_categories " - "ORDER BY log_category_id"; + + std::string query = + "SELECT " + "log_category_id, " + "log_category_description, " + "log_to_console, " + "log_to_file, " + "log_to_gmsay " + "FROM " + "logsys_categories " + "ORDER BY log_category_id"; + auto results = QueryDatabase(query); - int log_category = 0; + int log_category_id = 0; LogSys.file_logs_enabled = false; + int categories_in_database[1000] = {}; + for (auto row = results.begin(); row != results.end(); ++row) { - log_category = atoi(row[0]); - if (log_category <= Logs::None || log_category >= Logs::MaxCategoryID) + log_category_id = atoi(row[0]); + if (log_category_id <= Logs::None || log_category_id >= Logs::MaxCategoryID) { continue; + } - log_settings[log_category].log_to_console = atoi(row[2]); - log_settings[log_category].log_to_file = atoi(row[3]); - log_settings[log_category].log_to_gmsay = atoi(row[4]); + log_settings[log_category_id].log_to_console = atoi(row[2]); + log_settings[log_category_id].log_to_file = atoi(row[3]); + log_settings[log_category_id].log_to_gmsay = atoi(row[4]); - /* Determine if any output method is enabled for the category - and set it to 1 so it can used to check if category is enabled */ - const bool log_to_console = log_settings[log_category].log_to_console > 0; - const bool log_to_file = log_settings[log_category].log_to_file > 0; - const bool log_to_gmsay = log_settings[log_category].log_to_gmsay > 0; + /** + * Determine if any output method is enabled for the category + * and set it to 1 so it can used to check if category is enabled + */ + const bool log_to_console = log_settings[log_category_id].log_to_console > 0; + const bool log_to_file = log_settings[log_category_id].log_to_file > 0; + const bool log_to_gmsay = log_settings[log_category_id].log_to_gmsay > 0; const bool is_category_enabled = log_to_console || log_to_file || log_to_gmsay; - if (is_category_enabled) - log_settings[log_category].is_category_enabled = 1; + if (is_category_enabled) { + log_settings[log_category_id].is_category_enabled = 1; + } - /* - This determines whether or not the process needs to actually file log anything. - If we go through this whole loop and nothing is set to any debug level, there is no point to create a file or keep anything open - */ - if (log_settings[log_category].log_to_file > 0){ + /** + * This determines whether or not the process needs to actually file log anything. + * If we go through this whole loop and nothing is set to any debug level, there is no point to create a file or keep anything open + */ + if (log_settings[log_category_id].log_to_file > 0) { LogSys.file_logs_enabled = true; } + + categories_in_database[log_category_id] = 1; + } + + /** + * Auto inject categories that don't exist in the database... + */ + for (int log_index = Logs::AA; log_index != Logs::MaxCategoryID; log_index++) { + if (!categories_in_database[log_index]) { + + Log(Logs::General, + Logs::Status, + "New Log Category '%s' doesn't exist... Automatically adding to `logsys_categories` table...", + Logs::LogCategoryName[log_index] + ); + + std::string inject_query = StringFormat( + "INSERT INTO logsys_categories " + "(log_category_id, " + "log_category_description, " + "log_to_console, " + "log_to_file, " + "log_to_gmsay) " + "VALUES " + "(%i, '%s', %i, %i, %i)", + log_index, + EscapeString(Logs::LogCategoryName[log_index]).c_str(), + log_settings[log_category_id].log_to_console, + log_settings[log_category_id].log_to_file, + log_settings[log_category_id].log_to_gmsay + ); + + QueryDatabase(inject_query); + } } } diff --git a/common/eqemu_logsys.cpp b/common/eqemu_logsys.cpp index a14a27a1b..f4d36e5d5 100644 --- a/common/eqemu_logsys.cpp +++ b/common/eqemu_logsys.cpp @@ -1,22 +1,23 @@ -/* EQEMu: Everquest Server Emulator - Copyright (C) 2001-2015 EQEMu Development Team (http://eqemulator.net) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY except by those people which sell it, which - are required to give you total support for your newly bought product; - without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +/** + * EQEmulator: Everquest Server Emulator + * Copyright (C) 2001-2018 EQEmulator Development Team (https://github.com/EQEmu/Server) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY except by those people which sell it, which + * are required to give you total support for your newly bought product; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR + * A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * */ - #include "eqemu_logsys.h" #include "platform.h" #include "string_util.h" @@ -33,106 +34,144 @@ std::ofstream process_log; #ifdef _WINDOWS - #include - #include - #include - #include - #include - #include +#include +#include +#include +#include +#include +#include #else - #include - #include + +#include +#include + #endif -/* Linux ANSI console color defines */ +/** + * Linux ANSI console color defines + */ #define LC_RESET "\033[0m" -#define LC_BLACK "\033[30m" /* Black */ -#define LC_RED "\033[31m" /* Red */ -#define LC_GREEN "\033[32m" /* Green */ -#define LC_YELLOW "\033[33m" /* Yellow */ -#define LC_BLUE "\033[34m" /* Blue */ -#define LC_MAGENTA "\033[35m" /* Magenta */ -#define LC_CYAN "\033[36m" /* Cyan */ -#define LC_WHITE "\033[37m" /* White */ +#define LC_BLACK "\033[30m" /* Black */ +#define LC_RED "\033[31m" /* Red */ +#define LC_GREEN "\033[32m" /* Green */ +#define LC_YELLOW "\033[33m" /* Yellow */ +#define LC_BLUE "\033[34m" /* Blue */ +#define LC_MAGENTA "\033[35m" /* Magenta */ +#define LC_CYAN "\033[36m" /* Cyan */ +#define LC_WHITE "\033[37m" /* White */ namespace Console { enum Color { - Black = 0, - Blue = 1, - Green = 2, - Cyan = 3, - Red = 4, - Magenta = 5, - Brown = 6, - LightGray = 7, - DarkGray = 8, - LightBlue = 9, - LightGreen = 10, - LightCyan = 11, - LightRed = 12, + Black = 0, + Blue = 1, + Green = 2, + Cyan = 3, + Red = 4, + Magenta = 5, + Brown = 6, + LightGray = 7, + DarkGray = 8, + LightBlue = 9, + LightGreen = 10, + LightCyan = 11, + LightRed = 12, LightMagenta = 13, - Yellow = 14, - White = 15 + Yellow = 14, + White = 15 }; } +enum GameChatColor { + yellow = 15, + red = 13, + light_green = 14, + light_cyan = 258, + light_purple = 5 +}; + +/** + * EQEmuLogSys Constructor + */ EQEmuLogSys::EQEmuLogSys() { - on_log_gmsay_hook = [](uint16 log_type, const std::string&) {}; + on_log_gmsay_hook = [](uint16 log_type, const std::string &) {}; bool file_logs_enabled = false; - int log_platform = 0; + int log_platform = 0; } +/** + * EQEmuLogSys Deconstructor + */ EQEmuLogSys::~EQEmuLogSys() { } void EQEmuLogSys::LoadLogSettingsDefaults() { - /* Get Executable platform currently running this code (Zone/World/etc) */ + /** + * Get Executable platform currently running this code (Zone/World/etc) + */ log_platform = GetExecutablePlatformInt(); - /* Zero out Array */ + /** + * Zero out Array + */ memset(log_settings, 0, sizeof(LogSettings) * Logs::LogCategory::MaxCategoryID); - /* Set Defaults */ - log_settings[Logs::World_Server].log_to_console = Logs::General; - log_settings[Logs::Zone_Server].log_to_console = Logs::General; - log_settings[Logs::QS_Server].log_to_console = Logs::General; - log_settings[Logs::UCS_Server].log_to_console = Logs::General; - log_settings[Logs::Crash].log_to_console = Logs::General; - log_settings[Logs::MySQLError].log_to_console = Logs::General; - log_settings[Logs::Login_Server].log_to_console = Logs::General; + /** + * Set Defaults + */ + log_settings[Logs::World_Server].log_to_console = Logs::General; + log_settings[Logs::Zone_Server].log_to_console = Logs::General; + log_settings[Logs::QS_Server].log_to_console = Logs::General; + log_settings[Logs::UCS_Server].log_to_console = Logs::General; + log_settings[Logs::Crash].log_to_console = Logs::General; + log_settings[Logs::MySQLError].log_to_console = Logs::General; + log_settings[Logs::Login_Server].log_to_console = Logs::General; log_settings[Logs::Headless_Client].log_to_console = Logs::General; - /* Set Category enabled status on defaults */ + /** + * Set Category enabled status on defaults + */ log_settings[Logs::World_Server].is_category_enabled = 1; - log_settings[Logs::Zone_Server].is_category_enabled = 1; - log_settings[Logs::QS_Server].is_category_enabled = 1; - log_settings[Logs::UCS_Server].is_category_enabled = 1; - log_settings[Logs::Crash].is_category_enabled = 1; - log_settings[Logs::MySQLError].is_category_enabled = 1; + log_settings[Logs::Zone_Server].is_category_enabled = 1; + log_settings[Logs::QS_Server].is_category_enabled = 1; + log_settings[Logs::UCS_Server].is_category_enabled = 1; + log_settings[Logs::Crash].is_category_enabled = 1; + log_settings[Logs::MySQLError].is_category_enabled = 1; log_settings[Logs::Login_Server].is_category_enabled = 1; - /* Declare process file names for log writing - If there is no process_file_name declared, no log file will be written, simply - */ - if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformWorld) + /** + * Declare process file names for log writing= + */ + if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformWorld) { platform_file_name = "world"; - else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformQueryServ) + } + else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformQueryServ) { platform_file_name = "query_server"; - else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformZone) + } + else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformZone) { platform_file_name = "zone"; - else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformUCS) + } + else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformUCS) { platform_file_name = "ucs"; - else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformLogin) + } + else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformLogin) { platform_file_name = "login"; - else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformLaunch) + } + else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformLaunch) { platform_file_name = "launcher"; - else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformHC) + } + else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformHC) { platform_file_name = "hc"; + } } +/** + * @param log_category + * @param in_message + * @return + */ std::string EQEmuLogSys::FormatOutMessageString(uint16 log_category, const std::string &in_message) { std::string ret; @@ -144,17 +183,33 @@ std::string EQEmuLogSys::FormatOutMessageString(uint16 log_category, const std:: return ret; } +/** + * @param debug_level + * @param log_category + * @param message + */ void EQEmuLogSys::ProcessGMSay(uint16 debug_level, uint16 log_category, const std::string &message) { - /* Enabling Netcode based GMSay output creates a feedback loop that ultimately ends in a crash */ - if (log_category == Logs::LogCategory::Netcode) + /** + * Enabling Netcode based GMSay output creates a feedback loop that ultimately ends in a crash + */ + if (log_category == Logs::LogCategory::Netcode) { return; + } - /* Check to see if the process that actually ran this is zone */ - if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformZone) + /** + * Check to see if the process that actually ran this is zone + */ + if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformZone) { on_log_gmsay_hook(log_category, message); + } } +/** + * @param debug_level + * @param log_category + * @param message + */ void EQEmuLogSys::ProcessLogWrite(uint16 debug_level, uint16 log_category, const std::string &message) { if (log_category == Logs::Crash) { @@ -162,7 +217,10 @@ void EQEmuLogSys::ProcessLogWrite(uint16 debug_level, uint16 log_category, const EQEmuLogSys::SetCurrentTimeStamp(time_stamp); std::ofstream crash_log; EQEmuLogSys::MakeDirectory("logs/crashes"); - crash_log.open(StringFormat("logs/crashes/crash_%s_%i.log", platform_file_name.c_str(), getpid()), std::ios_base::app | std::ios_base::out); + crash_log.open( + StringFormat("logs/crashes/crash_%s_%i.log", platform_file_name.c_str(), getpid()), + std::ios_base::app | std::ios_base::out + ); crash_log << time_stamp << " " << message << "\n"; crash_log.close(); } @@ -170,11 +228,17 @@ void EQEmuLogSys::ProcessLogWrite(uint16 debug_level, uint16 log_category, const char time_stamp[80]; EQEmuLogSys::SetCurrentTimeStamp(time_stamp); - if (process_log) + if (process_log) { process_log << time_stamp << " " << message << std::endl; + } } -uint16 EQEmuLogSys::GetWindowsConsoleColorFromCategory(uint16 log_category) { +/** + * @param log_category + * @return + */ +uint16 EQEmuLogSys::GetWindowsConsoleColorFromCategory(uint16 log_category) +{ switch (log_category) { case Logs::Status: case Logs::Normal: @@ -197,7 +261,12 @@ uint16 EQEmuLogSys::GetWindowsConsoleColorFromCategory(uint16 log_category) { } } -std::string EQEmuLogSys::GetLinuxConsoleColorFromCategory(uint16 log_category) { +/** + * @param log_category + * @return + */ +std::string EQEmuLogSys::GetLinuxConsoleColorFromCategory(uint16 log_category) +{ switch (log_category) { case Logs::Status: case Logs::Normal: @@ -220,52 +289,68 @@ std::string EQEmuLogSys::GetLinuxConsoleColorFromCategory(uint16 log_category) { } } -uint16 EQEmuLogSys::GetGMSayColorFromCategory(uint16 log_category) { +/** + * @param log_category + * @return + */ +uint16 EQEmuLogSys::GetGMSayColorFromCategory(uint16 log_category) +{ switch (log_category) { case Logs::Status: case Logs::Normal: - return 15; /* Yellow */ + return GameChatColor::yellow; case Logs::MySQLError: case Logs::Error: - return 13; /* Red */ + return GameChatColor::red; case Logs::MySQLQuery: case Logs::Debug: - return 14; /* Light Green */ + return GameChatColor::light_green; case Logs::Quests: - return 258; /* Light Cyan */ + return GameChatColor::light_cyan; case Logs::Commands: case Logs::Mercenaries: - return 5; /* Light Purple */ + return GameChatColor::light_purple; case Logs::Crash: - return 13; /* Red */ + return GameChatColor::red; default: - return 15; /* Yellow */ + return GameChatColor::yellow; } } +/** + * @param debug_level + * @param log_category + * @param message + */ void EQEmuLogSys::ProcessConsoleMessage(uint16 debug_level, uint16 log_category, const std::string &message) { - - #ifdef _WINDOWS - HANDLE console_handle; - console_handle = GetStdHandle(STD_OUTPUT_HANDLE); - CONSOLE_FONT_INFOEX info = { 0 }; - info.cbSize = sizeof(info); - info.dwFontSize.Y = 12; // leave X as zero - info.FontWeight = FW_NORMAL; - wcscpy(info.FaceName, L"Lucida Console"); - SetCurrentConsoleFontEx(console_handle, NULL, &info); - SetConsoleTextAttribute(console_handle, EQEmuLogSys::GetWindowsConsoleColorFromCategory(log_category)); - std::cout << message << "\n"; - SetConsoleTextAttribute(console_handle, Console::Color::White); - #else - std::cout << EQEmuLogSys::GetLinuxConsoleColorFromCategory(log_category) << message << LC_RESET << std::endl; - #endif +#ifdef _WINDOWS + HANDLE console_handle; + console_handle = GetStdHandle(STD_OUTPUT_HANDLE); + CONSOLE_FONT_INFOEX info = { 0 }; + info.cbSize = sizeof(info); + info.dwFontSize.Y = 12; // leave X as zero + info.FontWeight = FW_NORMAL; + wcscpy(info.FaceName, L"Lucida Console"); + SetCurrentConsoleFontEx(console_handle, NULL, &info); + SetConsoleTextAttribute(console_handle, EQEmuLogSys::GetWindowsConsoleColorFromCategory(log_category)); + std::cout << message << "\n"; + SetConsoleTextAttribute(console_handle, Console::Color::White); +#else + std::cout << EQEmuLogSys::GetLinuxConsoleColorFromCategory(log_category) << message << LC_RESET << std::endl; +#endif } +/** + * Core logging function + * + * @param debug_level + * @param log_category + * @param message + * @param ... + */ void EQEmuLogSys::Out(Logs::DebugLevel debug_level, uint16 log_category, std::string message, ...) { - bool log_to_console = true; if (log_settings[log_category].log_to_console < debug_level) { log_to_console = false; @@ -282,8 +367,9 @@ void EQEmuLogSys::Out(Logs::DebugLevel debug_level, uint16 log_category, std::st } const bool nothing_to_log = !log_to_console && !log_to_file && !log_to_gmsay; - if (nothing_to_log) + if (nothing_to_log) { return; + } va_list args; va_start(args, message); @@ -292,20 +378,32 @@ void EQEmuLogSys::Out(Logs::DebugLevel debug_level, uint16 log_category, std::st std::string output_debug_message = EQEmuLogSys::FormatOutMessageString(log_category, output_message); - if (log_to_console) EQEmuLogSys::ProcessConsoleMessage(debug_level, log_category, output_debug_message); - if (log_to_gmsay) EQEmuLogSys::ProcessGMSay(debug_level, log_category, output_debug_message); - if (log_to_file) EQEmuLogSys::ProcessLogWrite(debug_level, log_category, output_debug_message); + if (log_to_console) { + EQEmuLogSys::ProcessConsoleMessage(debug_level, log_category, output_debug_message); + } + if (log_to_gmsay) { + EQEmuLogSys::ProcessGMSay(debug_level, log_category, output_debug_message); + } + if (log_to_file) { + EQEmuLogSys::ProcessLogWrite(debug_level, log_category, output_debug_message); + } } -void EQEmuLogSys::SetCurrentTimeStamp(char* time_stamp) +/** + * @param time_stamp + */ +void EQEmuLogSys::SetCurrentTimeStamp(char *time_stamp) { - time_t raw_time; - struct tm * time_info; + time_t raw_time; + struct tm *time_info; time(&raw_time); time_info = localtime(&raw_time); strftime(time_stamp, 80, "[%m-%d-%Y :: %H:%M:%S]", time_info); } +/** + * @param directory_name + */ void EQEmuLogSys::MakeDirectory(const std::string &directory_name) { #ifdef _WINDOWS @@ -315,8 +413,9 @@ void EQEmuLogSys::MakeDirectory(const std::string &directory_name) _mkdir(directory_name.c_str()); #else struct stat st; - if (stat(directory_name.c_str(), &st) == 0) // exists + if (stat(directory_name.c_str(), &st) == 0) { // exists return; + } mkdir(directory_name.c_str(), 0755); #endif } @@ -328,29 +427,75 @@ void EQEmuLogSys::CloseFileLogs() } } +/** + * @param log_name + */ void EQEmuLogSys::StartFileLogs(const std::string &log_name) { EQEmuLogSys::CloseFileLogs(); - /* When loading settings, we must have been given a reason in category based logging to output to a file in order to even create or open one... */ - if (file_logs_enabled == false) + /** + * When loading settings, we must have been given a reason in category based logging to output to a file in order to even create or open one... + */ + if (!file_logs_enabled) { return; - - if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformZone) { - if (!log_name.empty()) - platform_file_name = log_name; - - if (platform_file_name.empty()) - return; - - EQEmuLogSys::Out(Logs::General, Logs::Status, "Starting File Log 'logs/%s_%i.log'", platform_file_name.c_str(), getpid()); - EQEmuLogSys::MakeDirectory("logs/zone"); - process_log.open(StringFormat("logs/zone/%s_%i.log", platform_file_name.c_str(), getpid()), std::ios_base::app | std::ios_base::out); - } else { - if (platform_file_name.empty()) - return; - - EQEmuLogSys::Out(Logs::General, Logs::Status, "Starting File Log 'logs/%s_%i.log'", platform_file_name.c_str(), getpid()); - process_log.open(StringFormat("logs/%s_%i.log", platform_file_name.c_str(), getpid()), std::ios_base::app | std::ios_base::out); } -} + + /** + * Zone + */ + if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformZone) { + if (!log_name.empty()) { + platform_file_name = log_name; + } + + if (platform_file_name.empty()) { + return; + } + + EQEmuLogSys::Out( + Logs::General, + Logs::Status, + "Starting File Log 'logs/%s_%i.log'", + platform_file_name.c_str(), + getpid()); + + /** + * Make directory if not exists + */ + EQEmuLogSys::MakeDirectory("logs/zone"); + + /** + * Open file pointer + */ + process_log.open( + StringFormat("logs/zone/%s_%i.log", platform_file_name.c_str(), getpid()), + std::ios_base::app | std::ios_base::out + ); + } + else { + + /** + * All other processes + */ + + if (platform_file_name.empty()) { + return; + } + + EQEmuLogSys::Out( + Logs::General, + Logs::Status, + "Starting File Log 'logs/%s_%i.log'", + platform_file_name.c_str(), + getpid()); + + /** + * Open file pointer + */ + process_log.open( + StringFormat("logs/%s_%i.log", platform_file_name.c_str(), getpid()), + std::ios_base::app | std::ios_base::out + ); + } +} \ No newline at end of file diff --git a/common/eqemu_logsys.h b/common/eqemu_logsys.h index b0afa72f2..be646432a 100644 --- a/common/eqemu_logsys.h +++ b/common/eqemu_logsys.h @@ -1,20 +1,21 @@ - -/* EQEMu: Everquest Server Emulator - Copyright (C) 2001-2015 EQEMu Development Team (http://eqemulator.net) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY except by those people which sell it, which - are required to give you total support for your newly bought product; - without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +/** + * EQEmulator: Everquest Server Emulator + * Copyright (C) 2001-2018 EQEmulator Development Team (https://github.com/EQEmu/Server) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY except by those people which sell it, which + * are required to give you total support for your newly bought product; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR + * A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * */ #ifndef EQEMU_LOGSYS_H @@ -34,130 +35,134 @@ namespace Logs { Detail /* 3 - Use this for extreme detail in logging, usually in extreme debugging in the stack or interprocess communication */ }; - /* - If you add to this, make sure you update LogCategoryName - NOTE: Only add to the bottom of the enum because that is the type ID assignment - */ + /** + * If you add to this, make sure you update LogCategoryName + * + * NOTE: Only add to the bottom of the enum because that is the type ID assignment + */ + enum LogCategory { + None = 0, + AA, + AI, + Aggro, + Attack, + Client_Server_Packet, + Combat, + Commands, + Crash, + Debug, + Doors, + Error, + Guilds, + Inventory, + Launcher, + Netcode, + Normal, + Object, + Pathing, + QS_Server, + Quests, + Rules, + Skills, + Spawns, + Spells, + Status, + TCP_Connection, + Tasks, + Tradeskills, + Trading, + Tribute, + UCS_Server, + WebInterface_Server, + World_Server, + Zone_Server, + MySQLError, + MySQLQuery, + Mercenaries, + QuestDebug, + Server_Client_Packet, + Client_Server_Packet_Unhandled, + Server_Client_Packet_With_Dump, + Client_Server_Packet_With_Dump, + Login_Server, + Client_Login, + Headless_Client, + HP_Update, + FixZ, + Food, + Traps, + NPCRoamBox, + NPCScaling, + MaxCategoryID /* Don't Remove this */ + }; -enum LogCategory { - None = 0, - AA, - AI, - Aggro, - Attack, - Client_Server_Packet, - Combat, - Commands, - Crash, - Debug, - Doors, - Error, - Guilds, - Inventory, - Launcher, - Netcode, - Normal, - Object, - Pathing, - QS_Server, - Quests, - Rules, - Skills, - Spawns, - Spells, - Status, - TCP_Connection, - Tasks, - Tradeskills, - Trading, - Tribute, - UCS_Server, - WebInterface_Server, - World_Server, - Zone_Server, - MySQLError, - MySQLQuery, - Mercenaries, - QuestDebug, - Server_Client_Packet, - Client_Server_Packet_Unhandled, - Server_Client_Packet_With_Dump, - Client_Server_Packet_With_Dump, - Login_Server, - Client_Login, - Headless_Client, - HP_Update, - FixZ, - Food, - Traps, - NPCRoamBox, - MaxCategoryID /* Don't Remove this*/ -}; - -/* If you add to this, make sure you update LogCategory */ -static const char* LogCategoryName[LogCategory::MaxCategoryID] = { - "", - "AA", - "AI", - "Aggro", - "Attack", - "Packet :: Client -> Server", - "Combat", - "Commands", - "Crash", - "Debug", - "Doors", - "Error", - "Guilds", - "Inventory", - "Launcher", - "Netcode", - "Normal", - "Object", - "Pathing", - "QS Server", - "Quests", - "Rules", - "Skills", - "Spawns", - "Spells", - "Status", - "TCP Connection", - "Tasks", - "Tradeskills", - "Trading", - "Tribute", - "UCS Server", - "WebInterface Server", - "World Server", - "Zone Server", - "MySQL Error", - "MySQL Query", - "Mercenaries", - "Quest Debug", - "Packet :: Server -> Client", - "Packet :: Client -> Server Unhandled", - "Packet :: Server -> Client (Dump)", - "Packet :: Client -> Server (Dump)", - "Login Server", - "Client Login", - "Headless Client", - "HP Update", - "FixZ", - "Food", - "Traps", - "NPC Roam Box" -}; + /** + * If you add to this, make sure you update LogCategory + */ + static const char* LogCategoryName[LogCategory::MaxCategoryID] = { + "", + "AA", + "AI", + "Aggro", + "Attack", + "Packet :: Client -> Server", + "Combat", + "Commands", + "Crash", + "Debug", + "Doors", + "Error", + "Guilds", + "Inventory", + "Launcher", + "Netcode", + "Normal", + "Object", + "Pathing", + "QS Server", + "Quests", + "Rules", + "Skills", + "Spawns", + "Spells", + "Status", + "TCP Connection", + "Tasks", + "Tradeskills", + "Trading", + "Tribute", + "UCS Server", + "WebInterface Server", + "World Server", + "Zone Server", + "MySQL Error", + "MySQL Query", + "Mercenaries", + "Quest Debug", + "Packet :: Server -> Client", + "Packet :: Client -> Server Unhandled", + "Packet :: Server -> Client (Dump)", + "Packet :: Client -> Server (Dump)", + "Login Server", + "Client Login", + "Headless Client", + "HP Update", + "FixZ", + "Food", + "Traps", + "NPC Roam Box", + "NPC Scaling" + }; } #define Log(debug_level, log_category, message, ...) do {\ - if (LogSys.log_settings[log_category].is_category_enabled == 1)\ - LogSys.Out(debug_level, log_category, message, ##__VA_ARGS__);\ + if (LogSys.log_settings[log_category].is_category_enabled == 1)\ + LogSys.Out(debug_level, log_category, message, ##__VA_ARGS__);\ } while (0) #define LogF(debug_level, log_category, message, ...) do {\ - if (LogSys.log_settings[log_category].is_category_enabled == 1)\ - LogSys.OutF(debug_level, log_category, message, ##__VA_ARGS__);\ + if (LogSys.log_settings[log_category].is_category_enabled == 1)\ + LogSys.OutF(debug_level, log_category, message, ##__VA_ARGS__);\ } while (0) class EQEmuLogSys { @@ -165,21 +170,30 @@ public: EQEmuLogSys(); ~EQEmuLogSys(); - void CloseFileLogs(); /* Close File Logs wherever necessary, either at zone shutdown or entire process shutdown for everything else. This should be handled on deconstructor but to be safe we use it anyways. */ - void LoadLogSettingsDefaults(); /* Initializes log_settings and sets some defaults if DB is not present */ - void MakeDirectory(const std::string &directory_name); /* Platform independent way of performing a MakeDirectory based on name */ - /* - The one and only Logging function that uses a debug level as a parameter, as well as a log_category - log_category - defined in Logs::LogCategory::[] - log_category name resolution works by passing the enum int ID to Logs::LogCategoryName[category_id] + /** + * Close File Logs wherever necessary, either at zone shutdown or entire process shutdown for everything else. + * This should be handled on deconstructor but to be safe we use it anyways. + */ + void CloseFileLogs(); + void LoadLogSettingsDefaults(); + void MakeDirectory(const std::string &directory_name); - Example: EQEmuLogSys::Out(Logs::General, Logs::Guilds, "This guild has no leader present"); - - This would pipe the same category and debug level to all output formats, but the internal memory reference of log_settings would - be checked against to see if that piped output is set to actually process it for the category and debug level + /** + * The one and only Logging function that uses a debug level as a parameter, as well as a log_category + * log_category - defined in Logs::LogCategory::[] + * log_category name resolution works by passing the enum int ID to Logs::LogCategoryName[category_id] + * + * Example: EQEmuLogSys::Out(Logs::General, Logs::Guilds, "This guild has no leader present"); + * - This would pipe the same category and debug level to all output formats, but the internal memory reference of log_settings would + * be checked against to see if that piped output is set to actually process it for the category and debug level */ void Out(Logs::DebugLevel debug_level, uint16 log_category, std::string message, ...); - void SetCurrentTimeStamp(char* time_stamp); /* Used in file logs to prepend a timestamp entry for logs */ - void StartFileLogs(const std::string &log_name = ""); /* Used to declare the processes file log and to keep it open for later use */ + + /** + * Used in file logs to prepend a timestamp entry for logs + */ + void SetCurrentTimeStamp(char* time_stamp); + void StartFileLogs(const std::string &log_name = ""); template void OutF(Logs::DebugLevel debug_level, uint16 log_category, const char *fmt, const Args&... args) @@ -188,16 +202,16 @@ public: Out(debug_level, log_category, log_str); } - /* - LogSettings Struct - - This struct is the master reference for all settings for each category, and for each output - - log_to_file[category_id] = [1-3] - Sets debug level for category to output to file - log_to_console[category_id] = [1-3] - Sets debug level for category to output to console - log_to_gmsay[category_id] = [1-3] - Sets debug level for category to output to gmsay + /** + * LogSettings Struct + * + * This struct is the master reference for all settings for each category, and for each output + * + * log_to_file[category_id] = [1-3] - Sets debug level for category to output to file + * log_to_console[category_id] = [1-3] - Sets debug level for category to output to console + * log_to_gmsay[category_id] = [1-3] - Sets debug level for category to output to gmsay + * */ - struct LogSettings { uint8 log_to_file; uint8 log_to_console; @@ -205,32 +219,62 @@ public: uint8 is_category_enabled; /* When any log output in a category > 0, set this to 1 as (Enabled) */ }; - /* Internally used memory reference for all log settings per category. - These are loaded via DB and have defaults loaded in LoadLogSettingsDefaults. - Database loaded via Database::LoadLogSettings(log_settings) + /** + * Internally used memory reference for all log settings per category + * These are loaded via DB and have defaults loaded in LoadLogSettingsDefaults + * Database loaded via Database::LoadLogSettings(log_settings) */ LogSettings log_settings[Logs::LogCategory::MaxCategoryID]; - bool file_logs_enabled; /* Set when log settings are loaded to determine if keeping a file open is necessary */ + bool file_logs_enabled; - int log_platform; /* Sets Executable platform (Zone/World/UCS) etc. */ + /** + * Sets Executable platform (Zone/World/UCS) etc. + */ + int log_platform; - std::string platform_file_name; /* File name used in writing logs */ + /** + * File name used in writing logs + */ + std::string platform_file_name; - uint16 GetGMSayColorFromCategory(uint16 log_category); /* GMSay Client Message colors mapped by category */ + /** + * GMSay Client Message colors mapped by category + * + * @param log_category + * @return + */ + uint16 GetGMSayColorFromCategory(uint16 log_category); void OnLogHookCallBackZone(std::function f) { on_log_gmsay_hook = f; } private: - std::function on_log_gmsay_hook; /* Callback pointer to zone process for hooking logs to zone using GMSay */ - std::string FormatOutMessageString(uint16 log_category, const std::string &in_message); /* Formats log messages like '[Category] This is a log message' */ - std::string GetLinuxConsoleColorFromCategory(uint16 log_category); /* Linux console color messages mapped by category */ - uint16 GetWindowsConsoleColorFromCategory(uint16 log_category); /* Windows console color messages mapped by category */ + /** + * Callback pointer to zone process for hooking logs to zone using GMSay + */ + std::function on_log_gmsay_hook; - void ProcessConsoleMessage(uint16 debug_level, uint16 log_category, const std::string &message); /* ProcessConsoleMessage called via Log */ - void ProcessGMSay(uint16 debug_level, uint16 log_category, const std::string &message); /* ProcessGMSay called via Log */ - void ProcessLogWrite(uint16 debug_level, uint16 log_category, const std::string &message); /* ProcessLogWrite called via Log */ + /** + * Formats log messages like '[Category] This is a log message' + */ + std::string FormatOutMessageString(uint16 log_category, const std::string &in_message); + + /** + * Linux console color messages mapped by category + * @param log_category + * @return + */ + std::string GetLinuxConsoleColorFromCategory(uint16 log_category); + + /** + * Windows console color messages mapped by category + */ + uint16 GetWindowsConsoleColorFromCategory(uint16 log_category); + + void ProcessConsoleMessage(uint16 debug_level, uint16 log_category, const std::string &message); + void ProcessGMSay(uint16 debug_level, uint16 log_category, const std::string &message); + void ProcessLogWrite(uint16 debug_level, uint16 log_category, const std::string &message); }; extern EQEmuLogSys LogSys; From 84643ce9a15d4bafde69dd29e48d5a497cad3838 Mon Sep 17 00:00:00 2001 From: Uleat Date: Mon, 22 Oct 2018 22:27:05 -0400 Subject: [PATCH 418/670] Inventory update work-around [ci skip] --- utils/sql/db_update_manifest.txt | 4 +- .../required/2018_08_13_inventory_update.sql | 63 +++++++++++++++++++ .../2018_08_13_inventory_version_update.sql | 60 ------------------ 3 files changed, 65 insertions(+), 62 deletions(-) diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index dae319641..587839291 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -381,8 +381,8 @@ 9125|2018_07_20_task_emote.sql|SHOW COLUMNS FROM `tasks` LIKE 'completion_emote'|empty| 9126|2018_09_07_FastRegen.sql|SHOW COLUMNS FROM `zone` LIKE 'fast_regen_hp'|empty| 9127|2018_09_07_NPCMaxAggroDist.sql|SHOW COLUMNS FROM `zone` LIKE 'npc_max_aggro_dist'|empty| -9128|2018_08_13_inventory_version_update.sql|SHOW TABLES LIKE 'inventory_versions'|empty| -9129|2018_08_13_inventory_update.sql|SELECT * FROM `inventory_versions` WHERE `version` = 2 and `step` = 0|not_empty| +9128|2018_08_13_inventory_version_update.sql|SHOW TABLES LIKE 'inventory_version'|not_empty| +9129|2018_08_13_inventory_update.sql|SHOW TABLES LIKE 'inventory_versions'|empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/utils/sql/git/required/2018_08_13_inventory_update.sql b/utils/sql/git/required/2018_08_13_inventory_update.sql index e02bc3ae0..4aeee6806 100644 --- a/utils/sql/git/required/2018_08_13_inventory_update.sql +++ b/utils/sql/git/required/2018_08_13_inventory_update.sql @@ -1,3 +1,66 @@ +DROP TABLE IF EXISTS `inventory_versions`; +DROP TABLE IF EXISTS `inventory_snapshots`; + + +CREATE TABLE `inventory_versions` ( + `version` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `step` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `bot_step` INT(11) UNSIGNED NOT NULL DEFAULT '0' +) +COLLATE='latin1_swedish_ci' +ENGINE=MyISAM; + +INSERT INTO `inventory_versions` VALUES (2, 0, 0); + + +CREATE TABLE `inventory_snapshots` ( + `time_index` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `charid` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `slotid` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', + `itemid` INT(11) UNSIGNED NULL DEFAULT '0', + `charges` SMALLINT(3) UNSIGNED NULL DEFAULT '0', + `color` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `augslot1` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', + `augslot2` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', + `augslot3` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', + `augslot4` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', + `augslot5` MEDIUMINT(7) UNSIGNED NULL DEFAULT '0', + `augslot6` MEDIUMINT(7) NOT NULL DEFAULT '0', + `instnodrop` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + `custom_data` TEXT NULL, + `ornamenticon` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `ornamentidfile` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `ornament_hero_model` INT(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`time_index`, `charid`, `slotid`) +) +COLLATE='latin1_swedish_ci' +ENGINE=InnoDB; + + +CREATE TABLE `inventory_snapshots_v1_bak` ( + `time_index` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `charid` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `slotid` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', + `itemid` INT(11) UNSIGNED NULL DEFAULT '0', + `charges` SMALLINT(3) UNSIGNED NULL DEFAULT '0', + `color` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `augslot1` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', + `augslot2` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', + `augslot3` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', + `augslot4` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', + `augslot5` MEDIUMINT(7) UNSIGNED NULL DEFAULT '0', + `augslot6` MEDIUMINT(7) NOT NULL DEFAULT '0', + `instnodrop` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', + `custom_data` TEXT NULL, + `ornamenticon` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `ornamentidfile` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `ornament_hero_model` INT(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`time_index`, `charid`, `slotid`) +) +COLLATE='latin1_swedish_ci' +ENGINE=InnoDB; + + -- create inventory v1 backup SELECT @pre_timestamp := UNIX_TIMESTAMP(NOW()); INSERT INTO `inventory_snapshots_v1_bak` diff --git a/utils/sql/git/required/2018_08_13_inventory_version_update.sql b/utils/sql/git/required/2018_08_13_inventory_version_update.sql index f8fc33162..942544544 100644 --- a/utils/sql/git/required/2018_08_13_inventory_version_update.sql +++ b/utils/sql/git/required/2018_08_13_inventory_version_update.sql @@ -1,61 +1 @@ DROP TABLE IF EXISTS `inventory_version`; -DROP TABLE IF EXISTS `inventory_snapshots`; - - -CREATE TABLE `inventory_versions` ( - `version` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `step` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `bot_step` INT(11) UNSIGNED NOT NULL DEFAULT '0' -) -COLLATE='latin1_swedish_ci' -ENGINE=MyISAM; - -INSERT INTO `inventory_versions` VALUES (2, 0, 0); - - -CREATE TABLE `inventory_snapshots` ( - `time_index` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `charid` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `slotid` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', - `itemid` INT(11) UNSIGNED NULL DEFAULT '0', - `charges` SMALLINT(3) UNSIGNED NULL DEFAULT '0', - `color` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `augslot1` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', - `augslot2` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', - `augslot3` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', - `augslot4` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', - `augslot5` MEDIUMINT(7) UNSIGNED NULL DEFAULT '0', - `augslot6` MEDIUMINT(7) NOT NULL DEFAULT '0', - `instnodrop` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `custom_data` TEXT NULL, - `ornamenticon` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `ornamentidfile` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `ornament_hero_model` INT(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`time_index`, `charid`, `slotid`) -) -COLLATE='latin1_swedish_ci' -ENGINE=InnoDB; - - -CREATE TABLE `inventory_snapshots_v1_bak` ( - `time_index` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `charid` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `slotid` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', - `itemid` INT(11) UNSIGNED NULL DEFAULT '0', - `charges` SMALLINT(3) UNSIGNED NULL DEFAULT '0', - `color` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `augslot1` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', - `augslot2` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', - `augslot3` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', - `augslot4` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT '0', - `augslot5` MEDIUMINT(7) UNSIGNED NULL DEFAULT '0', - `augslot6` MEDIUMINT(7) NOT NULL DEFAULT '0', - `instnodrop` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `custom_data` TEXT NULL, - `ornamenticon` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `ornamentidfile` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `ornament_hero_model` INT(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`time_index`, `charid`, `slotid`) -) -COLLATE='latin1_swedish_ci' -ENGINE=InnoDB; From 2a9f38de2a618a9d1c1dbe3f97d624bd07c26d84 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Sun, 28 Oct 2018 12:44:13 -0400 Subject: [PATCH 419/670] Fix Get Corpse to fetch the corpse indicated. --- zone/zonedb.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index 027225243..5fe6560f1 100644 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -4356,15 +4356,15 @@ uint32 ZoneDatabase::GetCharacterCorpseCount(uint32 char_id) { } uint32 ZoneDatabase::GetCharacterCorpseID(uint32 char_id, uint8 corpse) { - std::string query = StringFormat("SELECT `id` FROM `character_corpses` WHERE `charid` = '%u'", char_id); - auto results = QueryDatabase(query); + std::string query = StringFormat("SELECT `id` FROM `character_corpses` WHERE `charid` = '%u' limit %d, 1", char_id, corpse); - for (auto row = results.begin(); row != results.end(); ++row) { - for (int i = 0; i < corpse; i++) { - return atoul(row[0]); - } - } - return 0; + auto results = QueryDatabase(query); + auto row = results.begin(); + + if (row != results.end()) + return atoul(row[0]); + else + return 0; } uint32 ZoneDatabase::GetCharacterCorpseItemCount(uint32 corpse_id){ From 8ebcd6b6c5af53f7a567eba5ce4d87abb8fd1173 Mon Sep 17 00:00:00 2001 From: KimLS Date: Sun, 28 Oct 2018 13:39:24 -0700 Subject: [PATCH 420/670] Some fixes to grid pathing at 0 wp pause plus command changes --- zone/command.cpp | 44 ++++++++++++++++++++++++++++++-- zone/mob.cpp | 2 +- zone/mob.h | 2 +- zone/mob_ai.cpp | 48 ++++++++++++++++++++--------------- zone/mob_movement_manager.cpp | 17 ++++++------- zone/waypoints.cpp | 6 +---- 6 files changed, 80 insertions(+), 39 deletions(-) diff --git a/zone/command.cpp b/zone/command.cpp index 9c2008afb..dd0bd95bb 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -1264,7 +1264,7 @@ void command_movement(Client *c, const Seperator *sep) auto &mgr = MobMovementManager::Get(); if (sep->arg[1][0] == 0) { - c->Message(0, "Usage: #movement stats/clearstats"); + c->Message(0, "Usage: #movement stats/clearstats/walkto/runto/rotateto/stop"); return; } @@ -1276,8 +1276,48 @@ void command_movement(Client *c, const Seperator *sep) { mgr.ClearStats(); } + else if (strcasecmp(sep->arg[1], "walkto") == 0) + { + auto target = c->GetTarget(); + if (target == nullptr) { + c->Message(0, "No target found."); + return; + } + + target->WalkTo(c->GetX(), c->GetY(), c->GetZ()); + } + else if (strcasecmp(sep->arg[1], "runto") == 0) + { + auto target = c->GetTarget(); + if (target == nullptr) { + c->Message(0, "No target found."); + return; + } + + target->RunTo(c->GetX(), c->GetY(), c->GetZ()); + } + else if (strcasecmp(sep->arg[1], "rotateto") == 0) + { + auto target = c->GetTarget(); + if (target == nullptr) { + c->Message(0, "No target found."); + return; + } + + target->RotateToWalking(target->CalculateHeadingToTarget(c->GetX(), c->GetY())); + } + else if (strcasecmp(sep->arg[1], "stop") == 0) + { + auto target = c->GetTarget(); + if (target == nullptr) { + c->Message(0, "No target found."); + return; + } + + target->StopNavigation(); + } else { - c->Message(0, "Usage: #movement stats/clearstats"); + c->Message(0, "Usage: #movement stats/clearstats/walkto/runto/rotateto/stop"); } } diff --git a/zone/mob.cpp b/zone/mob.cpp index b9c6f1af3..b34b667d7 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -387,7 +387,7 @@ Mob::Mob(const char* in_name, permarooted = (runspeed > 0) ? false : true; - movetimercompleted = false; + pause_timer_complete = false; ForcedMovement = 0; roamer = false; rooted = false; diff --git a/zone/mob.h b/zone/mob.h index d1bd23145..967ab51f5 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -1430,7 +1430,6 @@ protected: std::unique_ptr AI_think_timer; std::unique_ptr AI_movement_timer; std::unique_ptr AI_target_check_timer; - bool movetimercompleted; int8 ForcedMovement; // push bool permarooted; std::unique_ptr AI_scan_area_timer; @@ -1482,6 +1481,7 @@ protected: glm::vec3 m_FearWalkTarget; bool currently_fleeing; + bool pause_timer_complete; bool DistractedFromGrid; uint32 pDontHealMeBefore; uint32 pDontBuffMeBefore; diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 8e2e3e029..d315e0579 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1686,19 +1686,19 @@ void NPC::AI_DoMovement() { } else if (roamer) { if (AI_walking_timer->Check()) { - movetimercompleted = true; + pause_timer_complete = true; AI_walking_timer->Disable(); } - + int32 gridno = CastToNPC()->GetGrid(); - + if (gridno > 0 || cur_wp == -2) { - if (movetimercompleted == true) { // time to pause at wp is over + if (pause_timer_complete == true) { // time to pause at wp is over AI_SetupNextWaypoint(); - } // endif (movetimercompleted==true) + } // endif (pause_timer_complete==true) else if (!(AI_walking_timer->Enabled())) { // currently moving bool doMove = true; - if (m_CurrentWayPoint.x == GetX() && m_CurrentWayPoint.y == GetY()) { // are we there yet? then stop + if(IsPositionEqual(glm::vec2(m_CurrentWayPoint.x, m_CurrentWayPoint.y), glm::vec2(GetX(), GetY()))) { Log(Logs::Detail, Logs::AI, "We have reached waypoint %d (%.3f,%.3f,%.3f) on grid %d", @@ -1707,13 +1707,13 @@ void NPC::AI_DoMovement() { GetY(), GetZ(), GetGrid()); - + SetWaypointPause(); SetAppearance(eaStanding, false); - if (cur_wp_pause > 0 && m_CurrentWayPoint.w >= 0.0) { + if (cur_wp_pause > 0) { RotateTo(m_CurrentWayPoint.w); } - + //kick off event_waypoint arrive char temp[16]; sprintf(temp, "%d", cur_wp); @@ -1727,29 +1727,36 @@ void NPC::AI_DoMovement() { if (cur_wp == -2) { AI_SetupNextWaypoint(); } - + // wipe feign memory since we reached our first waypoint if (cur_wp == 1) ClearFeignMemory(); + + if (cur_wp_pause == 0) { + pause_timer_complete = true; + AI_SetupNextWaypoint(); + doMove = true; + } } + if (doMove) { // not at waypoint yet or at 0 pause WP, so keep moving NavigateTo( m_CurrentWayPoint.x, m_CurrentWayPoint.y, m_CurrentWayPoint.z ); - + } } } // endif (gridno > 0) // handle new quest grid command processing else if (gridno < 0) { // this mob is under quest control - if (movetimercompleted == true) { // time to pause has ended + if (pause_timer_complete == true) { // time to pause has ended SetGrid(0 - GetGrid()); // revert to AI control Log(Logs::Detail, Logs::Pathing, "Quest pathing is finished. Resuming on grid %d", GetGrid()); - + SetAppearance(eaStanding, false); - + CalculateNewWaypoint(); } } @@ -1813,27 +1820,26 @@ void NPC::AI_SetupNextWaypoint() { found_spawn->SetNPCPointerNull(); } else { - movetimercompleted = false; - + pause_timer_complete = false; Log(Logs::Detail, Logs::Pathing, "We are departing waypoint %d.", cur_wp); - + //if we were under quest control (with no grid), we are done now.. if (cur_wp == -2) { Log(Logs::Detail, Logs::Pathing, "Non-grid quest mob has reached its quest ordered waypoint. Leaving pathing mode."); roamer = false; cur_wp = 0; } - + SetAppearance(eaStanding, false); - + entity_list.OpenDoorsNear(this); - + if (!DistractedFromGrid) { //kick off event_waypoint depart char temp[16]; sprintf(temp, "%d", cur_wp); parse->EventNPC(EVENT_WAYPOINT_DEPART, CastToNPC(), nullptr, temp, 0); - + //setup our next waypoint, if we are still on our normal grid //remember that the quest event above could have done anything it wanted with our grid if (GetGrid() > 0) { diff --git a/zone/mob_movement_manager.cpp b/zone/mob_movement_manager.cpp index 1d97227cc..d73f0fef1 100644 --- a/zone/mob_movement_manager.cpp +++ b/zone/mob_movement_manager.cpp @@ -169,7 +169,6 @@ public: glm::vec2 pos(p.x, p.y); double len = glm::distance(pos, tar); if (len == 0) { - m->SetMoving(false); return true; } @@ -187,7 +186,6 @@ public: } m->TryFixZ(); - m->SetMoving(false); return true; } else { @@ -437,6 +435,10 @@ void MobMovementManager::Teleport(Mob *who, float x, float y, float z, float hea void MobMovementManager::NavigateTo(Mob *who, float x, float y, float z, MobMovementMode mode) { + if (IsPositionEqualWithinCertainZ(glm::vec3(x, y, z), glm::vec3(who->GetX(), who->GetY(), who->GetZ()), 6.0f)) { + return; + } + auto iter = _impl->Entries.find(who); auto &ent = (*iter); auto &nav = ent.second.NavTo; @@ -476,12 +478,8 @@ void MobMovementManager::StopNavigation(Mob *who) { return; } - if (who->IsMoving()) { - who->TryFixZ(); - who->SetMoving(false); - SendCommandToClients(who, 0.0, 0.0, 0.0, 0.0, 0, ClientRangeCloseMedium); - } ent.second.Commands.clear(); + PushStopMoving(ent.second); } void MobMovementManager::SendCommandToClients(Mob *m, float dx, float dy, float dz, float dh, int anim, ClientRange range) @@ -615,6 +613,7 @@ void MobMovementManager::UpdatePath(Mob *who, float x, float y, float z, MobMove auto &ent = (*iter); PushMoveTo(ent.second, x, y, z, mode); + PushStopMoving(ent.second); return; } } @@ -634,17 +633,17 @@ void MobMovementManager::UpdatePath(Mob *who, float x, float y, float z, MobMove auto &last = route.back(); PushMoveTo(ent.second, x, y, z, mode); + PushStopMoving(ent.second); return; } else if(route.size() < 2) { PushMoveTo(ent.second, x, y, z, mode); + PushStopMoving(ent.second); return; } } - - auto &first = route.front(); auto &last = route.back(); diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index c156914c8..e39a40221 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -390,12 +390,8 @@ void NPC::SetWaypointPause() { //Declare time to wait on current WP - if (cur_wp_pause == 0) { - AI_walking_timer->Start(100); - } - else + if(cur_wp_pause > 0) { - switch (pausetype) { case 0: //Random Half From 706ae291d80d08785ef42d17c5b401286d91598f Mon Sep 17 00:00:00 2001 From: E Spause Date: Wed, 31 Oct 2018 11:08:50 -0400 Subject: [PATCH 421/670] Remove errant Stun call, fix up logging notification for fear --- zone/fearpath.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/zone/fearpath.cpp b/zone/fearpath.cpp index d86d0948e..eacd92484 100644 --- a/zone/fearpath.cpp +++ b/zone/fearpath.cpp @@ -165,11 +165,9 @@ void Mob::CalculateNewFearpoint() { return; } - Stun(6000); - Log(Logs::Detail, Logs::Pathing, - "No path found to selected node. Falling through to old fear point selection."); + "No path found to selected node during CalculateNewFearpoint."); } } From dbb368865c840542ba4d6099ea3d412e58fbcb14 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 3 Nov 2018 17:44:19 -0400 Subject: [PATCH 422/670] Add some Follow stuff to lua You can also disallow following code from allowing the NPC to run if they're far enough away --- zone/lua_npc.cpp | 18 ++++++++++++++++++ zone/lua_npc.h | 3 +++ zone/mob.cpp | 3 ++- zone/mob.h | 9 ++++++--- zone/mob_ai.cpp | 3 ++- 5 files changed, 31 insertions(+), 5 deletions(-) diff --git a/zone/lua_npc.cpp b/zone/lua_npc.cpp index a16d78361..9079049b7 100644 --- a/zone/lua_npc.cpp +++ b/zone/lua_npc.cpp @@ -333,6 +333,21 @@ void Lua_NPC::AI_SetRoambox(float dist, float max_x, float min_x, float max_y, f self->AI_SetRoambox(dist, max_x, min_x, max_y, min_y, delay, mindelay); } +void Lua_NPC::SetFollowID(int id) { + Lua_Safe_Call_Void(); + self->SetFollowID(id); +} + +void Lua_NPC::SetFollowDistance(int dist) { + Lua_Safe_Call_Void(); + self->SetFollowDistance(dist); +} + +void Lua_NPC::SetFollowCanRun(bool v) { + Lua_Safe_Call_Void(); + self->SetFollowCanRun(v); +} + int Lua_NPC::GetNPCSpellsID() { Lua_Safe_Call_Int(); return self->GetNPCSpellsID(); @@ -572,6 +587,9 @@ luabind::scope lua_register_npc() { .def("IsGuarding", (bool(Lua_NPC::*)(void))&Lua_NPC::IsGuarding) .def("AI_SetRoambox", (void(Lua_NPC::*)(float,float,float,float,float))&Lua_NPC::AI_SetRoambox) .def("AI_SetRoambox", (void(Lua_NPC::*)(float,float,float,float,float,uint32,uint32))&Lua_NPC::AI_SetRoambox) + .def("SetFollowID", (void(Lua_NPC::*)(int))&Lua_NPC::SetFollowID) + .def("SetFollowDistance", (void(Lua_NPC::*)(int))&Lua_NPC::SetFollowDistance) + .def("SetFollowCanRun", (void(Lua_NPC::*)(bool))&Lua_NPC::SetFollowCanRun) .def("GetNPCSpellsID", (int(Lua_NPC::*)(void))&Lua_NPC::GetNPCSpellsID) .def("GetSpawnPointID", (int(Lua_NPC::*)(void))&Lua_NPC::GetSpawnPointID) .def("GetSpawnPointX", (float(Lua_NPC::*)(void))&Lua_NPC::GetSpawnPointX) diff --git a/zone/lua_npc.h b/zone/lua_npc.h index 972adee90..a0097eb90 100644 --- a/zone/lua_npc.h +++ b/zone/lua_npc.h @@ -92,6 +92,9 @@ public: bool IsGuarding(); void AI_SetRoambox(float dist, float max_x, float min_x, float max_y, float min_y); void AI_SetRoambox(float dist, float max_x, float min_x, float max_y, float min_y, uint32 delay, uint32 mindelay); + void SetFollowID(int id); + void SetFollowDistance(int dist); + void SetFollowCanRun(bool v); int GetNPCSpellsID(); int GetSpawnPointID(); float GetSpawnPointX(); diff --git a/zone/mob.cpp b/zone/mob.cpp index 45a41df6e..e4c7b5f26 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -383,8 +383,9 @@ Mob::Mob(const char* in_name, m_CurrentWayPoint = glm::vec4(); cur_wp_pause = 0; patrol = 0; - follow = 0; + follow_id = 0; follow_dist = 100; // Default Distance for Follow + follow_run = true; // We can run if distance great enough no_target_hotkey = false; flee_mode = false; currently_fleeing = false; diff --git a/zone/mob.h b/zone/mob.h index 30464822c..59b4a5079 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -695,10 +695,12 @@ public: virtual bool IsAttackAllowed(Mob *target, bool isSpellAttack = false); bool IsTargeted() const { return (targeted > 0); } inline void IsTargeted(int in_tar) { targeted += in_tar; if(targeted < 0) targeted = 0;} - void SetFollowID(uint32 id) { follow = id; } + void SetFollowID(uint32 id) { follow_id = id; } void SetFollowDistance(uint32 dist) { follow_dist = dist; } - uint32 GetFollowID() const { return follow; } + void SetFollowCanRun(bool v) { follow_run = v; } + uint32 GetFollowID() const { return follow_id; } uint32 GetFollowDistance() const { return follow_dist; } + bool GetFollowCanRun() const { return follow_run; } inline bool IsRareSpawn() const { return rare_spawn; } inline void SetRareSpawn(bool in) { rare_spawn = in; } @@ -1235,8 +1237,9 @@ protected: uint16 ownerid; PetType typeofpet; int16 petpower; - uint32 follow; + uint32 follow_id; uint32 follow_dist; + bool follow_run; bool no_target_hotkey; bool rare_spawn; diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index e4066e2cc..bab3b78d2 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1647,7 +1647,8 @@ void Mob::AI_Process() { if (distance >= follow_distance) { int speed = GetWalkspeed(); - if (distance >= follow_distance + 150) { + // maybe we want the NPC to only walk doing follow logic + if (GetFollowCanRun() && distance >= follow_distance + 150) { speed = GetRunspeed(); } From 467e2d3114fe010712efa2bfbdd6fd7fe1f84961 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 3 Nov 2018 18:10:36 -0400 Subject: [PATCH 423/670] Add follow getters to lua just in case --- zone/lua_npc.cpp | 19 +++++++++++++++++++ zone/lua_npc.h | 3 +++ 2 files changed, 22 insertions(+) diff --git a/zone/lua_npc.cpp b/zone/lua_npc.cpp index 9079049b7..02e9b9795 100644 --- a/zone/lua_npc.cpp +++ b/zone/lua_npc.cpp @@ -348,6 +348,21 @@ void Lua_NPC::SetFollowCanRun(bool v) { self->SetFollowCanRun(v); } +int Lua_NPC::GetFollowID() { + Lua_Safe_Call_Int(); + return self->GetFollowID(); +} + +int Lua_NPC::GetFollowDistance() { + Lua_Safe_Call_Int(); + return self->GetFollowDistance(); +} + +bool Lua_NPC::GetFollowCanRun() { + Lua_Safe_Call_Bool(); + return self->GetFollowCanRun(); +} + int Lua_NPC::GetNPCSpellsID() { Lua_Safe_Call_Int(); return self->GetNPCSpellsID(); @@ -590,6 +605,10 @@ luabind::scope lua_register_npc() { .def("SetFollowID", (void(Lua_NPC::*)(int))&Lua_NPC::SetFollowID) .def("SetFollowDistance", (void(Lua_NPC::*)(int))&Lua_NPC::SetFollowDistance) .def("SetFollowCanRun", (void(Lua_NPC::*)(bool))&Lua_NPC::SetFollowCanRun) + .def("GetFollowID", (int(Lua_NPC::*)(void))&Lua_NPC::GetFollowID) + .def("GetFollowDistance", (int(Lua_NPC::*)(void))&Lua_NPC::GetFollowDistance) + .def("GetFollowCanRun", (bool(Lua_NPC::*)(void))&Lua_NPC::GetFollowCanRun) + .def("GetNPCSpellsID", (int(Lua_NPC::*)(void))&Lua_NPC::GetNPCSpellsID) .def("GetNPCSpellsID", (int(Lua_NPC::*)(void))&Lua_NPC::GetNPCSpellsID) .def("GetSpawnPointID", (int(Lua_NPC::*)(void))&Lua_NPC::GetSpawnPointID) .def("GetSpawnPointX", (float(Lua_NPC::*)(void))&Lua_NPC::GetSpawnPointX) diff --git a/zone/lua_npc.h b/zone/lua_npc.h index a0097eb90..4b567eb1b 100644 --- a/zone/lua_npc.h +++ b/zone/lua_npc.h @@ -95,6 +95,9 @@ public: void SetFollowID(int id); void SetFollowDistance(int dist); void SetFollowCanRun(bool v); + int GetFollowID(); + int GetFollowDistance(); + bool GetFollowCanRun(); int GetNPCSpellsID(); int GetSpawnPointID(); float GetSpawnPointX(); From cc920e60d9b0a39c6bc5be559a81aab3666ee30f Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 3 Nov 2018 18:14:54 -0400 Subject: [PATCH 424/670] Reset all follow variables when follow target is gone --- zone/mob_ai.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index bab3b78d2..05e53c7e8 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1635,6 +1635,8 @@ void Mob::AI_Process() { Mob *follow = entity_list.GetMob(static_cast(GetFollowID())); if (!follow) { SetFollowID(0); + SetFollowDistance(100); + SetFollowCanRun(true); } else { From 775b5fcaf17a6af425b56c76908c9151b02a0953 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 4 Nov 2018 23:26:34 -0600 Subject: [PATCH 425/670] Mostly done with global base scaling work, dev tooling and various other works --- common/features.h | 4 - common/rulesys.cpp | 13 +- common/ruletypes.h | 1 + common/say_link.cpp | 258 +++++++---- common/say_link.h | 2 + common/shareddb.cpp | 12 +- common/string_util.cpp | 27 ++ common/string_util.h | 3 + zone/CMakeLists.txt | 9 +- zone/attack.cpp | 6 + zone/bonuses.cpp | 6 +- zone/client.cpp | 30 +- zone/client.h | 1 - zone/client_mods.cpp | 744 +++++------------------------- zone/command.cpp | 335 ++++++++++++-- zone/command.h | 1 + zone/doors.cpp | 40 +- zone/doors.h | 4 + zone/embparser_api.cpp | 11 +- zone/entity.cpp | 54 +-- zone/entity.h | 1 - zone/lua_general.cpp | 12 +- zone/mob.cpp | 609 +++++++++++++------------ zone/mob.h | 8 +- zone/mob_info.cpp | 367 +++++++++++++++ zone/net.cpp | 10 +- zone/npc.cpp | 911 +++++++++++++++++++------------------ zone/npc.h | 28 +- zone/npc_scale_manager.cpp | 439 ++++++++++++++++++ zone/npc_scale_manager.h | 73 +++ zone/object.h | 28 +- zone/questmgr.cpp | 42 +- zone/questmgr.h | 2 +- zone/spells.cpp | 5 +- zone/zonedb.cpp | 2 +- 35 files changed, 2385 insertions(+), 1713 deletions(-) create mode 100644 zone/mob_info.cpp create mode 100644 zone/npc_scale_manager.cpp create mode 100644 zone/npc_scale_manager.h diff --git a/common/features.h b/common/features.h index 38f238617..df9d1353a 100644 --- a/common/features.h +++ b/common/features.h @@ -272,10 +272,6 @@ enum { commandInvSnapshot = 150 //ability to clear/restore snapshots }; -//default states for logging flag on NPCs and clients (having NPCs on by default is prolly a bad idea) -#define CLIENT_DEFAULT_LOGGING_ENABLED true -#define NPC_DEFAULT_LOGGING_ENABLED false - // This is the item ID we use for say links, we use the max that fits in 5 ASCII chars #define SAYLINK_ITEM_ID 0xFFFFF diff --git a/common/rulesys.cpp b/common/rulesys.cpp index 3ce748fb9..61bb72357 100644 --- a/common/rulesys.cpp +++ b/common/rulesys.cpp @@ -382,15 +382,18 @@ bool RuleManager::ListRulesets(Database *database, std::map &i return true; } -int32 RuleManager::GetIntRule(RuleManager::IntType t) const{ - return(m_RuleIntValues[t]); +int32 RuleManager::GetIntRule(RuleManager::IntType t) const +{ + return (m_RuleIntValues[t]); } -float RuleManager::GetRealRule(RuleManager::RealType t) const{ - return(m_RuleRealValues[t]); +float RuleManager::GetRealRule(RuleManager::RealType t) const +{ + return (m_RuleRealValues[t]); } -bool RuleManager::GetBoolRule(RuleManager::BoolType t) const{ +bool RuleManager::GetBoolRule(RuleManager::BoolType t) const +{ return (m_RuleBoolValues[t] == 1); } diff --git a/common/ruletypes.h b/common/ruletypes.h index 16e85805d..a40c2c5bc 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -508,6 +508,7 @@ RULE_BOOL(Combat, UseRevampHandToHand, false) // use h2h revamped dmg/delays I b RULE_BOOL(Combat, ClassicMasterWu, false) // classic master wu uses a random special, modern doesn't RULE_INT(Combat, LevelToStopDamageCaps, 0) // 1 will effectively disable them, 20 should give basically same results as old incorrect system RULE_BOOL(Combat, ClassicNPCBackstab, false) // true disables npc facestab - npcs get normal attack if not behind +RULE_BOOL(Combat, UseNPCDamageClassLevelMods, true) // Uses GetClassLevelDamageMod calc in npc_scale_manager RULE_CATEGORY_END() RULE_CATEGORY(NPC) diff --git a/common/say_link.cpp b/common/say_link.cpp index a215bdc46..4b8ddc009 100644 --- a/common/say_link.cpp +++ b/common/say_link.cpp @@ -26,30 +26,31 @@ #include "../zone/zonedb.h" -bool EQEmu::saylink::DegenerateLinkBody(SayLinkBody_Struct& say_link_body_struct, const std::string& say_link_body) +bool EQEmu::saylink::DegenerateLinkBody(SayLinkBody_Struct &say_link_body_struct, const std::string &say_link_body) { memset(&say_link_body_struct, 0, sizeof(say_link_body_struct)); - if (say_link_body.length() != EQEmu::constants::SAY_LINK_BODY_SIZE) + if (say_link_body.length() != EQEmu::constants::SAY_LINK_BODY_SIZE) { return false; + } - say_link_body_struct.action_id = (uint8)strtol(say_link_body.substr(0, 1).c_str(), nullptr, 16); - say_link_body_struct.item_id = (uint32)strtol(say_link_body.substr(1, 5).c_str(), nullptr, 16); - say_link_body_struct.augment_1 = (uint32)strtol(say_link_body.substr(6, 5).c_str(), nullptr, 16); - say_link_body_struct.augment_2 = (uint32)strtol(say_link_body.substr(11, 5).c_str(), nullptr, 16); - say_link_body_struct.augment_3 = (uint32)strtol(say_link_body.substr(16, 5).c_str(), nullptr, 16); - say_link_body_struct.augment_4 = (uint32)strtol(say_link_body.substr(21, 5).c_str(), nullptr, 16); - say_link_body_struct.augment_5 = (uint32)strtol(say_link_body.substr(26, 5).c_str(), nullptr, 16); - say_link_body_struct.augment_6 = (uint32)strtol(say_link_body.substr(31, 5).c_str(), nullptr, 16); - say_link_body_struct.is_evolving = (uint8)strtol(say_link_body.substr(36, 1).c_str(), nullptr, 16); - say_link_body_struct.evolve_group = (uint32)strtol(say_link_body.substr(37, 4).c_str(), nullptr, 16); - say_link_body_struct.evolve_level = (uint8)strtol(say_link_body.substr(41, 2).c_str(), nullptr, 16); - say_link_body_struct.ornament_icon = (uint32)strtol(say_link_body.substr(43, 5).c_str(), nullptr, 16); - say_link_body_struct.hash = (uint32)strtol(say_link_body.substr(48, 8).c_str(), nullptr, 16); + say_link_body_struct.action_id = (uint8) strtol(say_link_body.substr(0, 1).c_str(), nullptr, 16); + say_link_body_struct.item_id = (uint32) strtol(say_link_body.substr(1, 5).c_str(), nullptr, 16); + say_link_body_struct.augment_1 = (uint32) strtol(say_link_body.substr(6, 5).c_str(), nullptr, 16); + say_link_body_struct.augment_2 = (uint32) strtol(say_link_body.substr(11, 5).c_str(), nullptr, 16); + say_link_body_struct.augment_3 = (uint32) strtol(say_link_body.substr(16, 5).c_str(), nullptr, 16); + say_link_body_struct.augment_4 = (uint32) strtol(say_link_body.substr(21, 5).c_str(), nullptr, 16); + say_link_body_struct.augment_5 = (uint32) strtol(say_link_body.substr(26, 5).c_str(), nullptr, 16); + say_link_body_struct.augment_6 = (uint32) strtol(say_link_body.substr(31, 5).c_str(), nullptr, 16); + say_link_body_struct.is_evolving = (uint8) strtol(say_link_body.substr(36, 1).c_str(), nullptr, 16); + say_link_body_struct.evolve_group = (uint32) strtol(say_link_body.substr(37, 4).c_str(), nullptr, 16); + say_link_body_struct.evolve_level = (uint8) strtol(say_link_body.substr(41, 2).c_str(), nullptr, 16); + say_link_body_struct.ornament_icon = (uint32) strtol(say_link_body.substr(43, 5).c_str(), nullptr, 16); + say_link_body_struct.hash = (uint32) strtol(say_link_body.substr(48, 8).c_str(), nullptr, 16); return true; } -bool EQEmu::saylink::GenerateLinkBody(std::string& say_link_body, const SayLinkBody_Struct& say_link_body_struct) +bool EQEmu::saylink::GenerateLinkBody(std::string &say_link_body, const SayLinkBody_Struct &say_link_body_struct) { say_link_body = StringFormat( "%1X" "%05X" "%05X" "%05X" "%05X" "%05X" "%05X" "%05X" "%1X" "%04X" "%02X" "%05X" "%08X", @@ -68,8 +69,9 @@ bool EQEmu::saylink::GenerateLinkBody(std::string& say_link_body, const SayLinkB (0xFFFFFFFF & say_link_body_struct.hash) ); - if (say_link_body.length() != EQEmu::constants::SAY_LINK_BODY_SIZE) + if (say_link_body.length() != EQEmu::constants::SAY_LINK_BODY_SIZE) { return false; + } return true; } @@ -79,7 +81,7 @@ EQEmu::SayLinkEngine::SayLinkEngine() Reset(); } -const std::string& EQEmu::SayLinkEngine::GenerateLink() +const std::string &EQEmu::SayLinkEngine::GenerateLink() { m_Link.clear(); m_LinkBody.clear(); @@ -97,7 +99,7 @@ const std::string& EQEmu::SayLinkEngine::GenerateLink() if ((m_Link.length() == 0) || (m_Link.length() > (EQEmu::constants::SAY_LINK_MAXIMUM_SIZE))) { m_Error = true; - m_Link = ""; + m_Link = ""; Log(Logs::General, Logs::Error, "SayLinkEngine::GenerateLink() failed to generate a useable say link"); Log(Logs::General, Logs::Error, ">> LinkType: %i, Lengths: {link: %u(%u), body: %u(%u), text: %u(%u)}", m_LinkType, @@ -145,83 +147,97 @@ void EQEmu::SayLinkEngine::generate_body() memset(&m_LinkBodyStruct, 0, sizeof(SayLinkBody_Struct)); - const EQEmu::ItemData* item_data = nullptr; + const EQEmu::ItemData *item_data = nullptr; switch (m_LinkType) { - case saylink::SayLinkBlank: - break; - case saylink::SayLinkItemData: - if (m_ItemData == nullptr) { break; } - m_LinkBodyStruct.item_id = m_ItemData->ID; - m_LinkBodyStruct.evolve_group = m_ItemData->LoreGroup; // this probably won't work for all items - //m_LinkBodyStruct.evolve_level = m_ItemData->EvolvingLevel; - // TODO: add hash call - break; - case saylink::SayLinkLootItem: - if (m_LootData == nullptr) { break; } - item_data = database.GetItem(m_LootData->item_id); - if (item_data == nullptr) { break; } - m_LinkBodyStruct.item_id = item_data->ID; - m_LinkBodyStruct.augment_1 = m_LootData->aug_1; - m_LinkBodyStruct.augment_2 = m_LootData->aug_2; - m_LinkBodyStruct.augment_3 = m_LootData->aug_3; - m_LinkBodyStruct.augment_4 = m_LootData->aug_4; - m_LinkBodyStruct.augment_5 = m_LootData->aug_5; - m_LinkBodyStruct.augment_6 = m_LootData->aug_6; - m_LinkBodyStruct.evolve_group = item_data->LoreGroup; // see note above - //m_LinkBodyStruct.evolve_level = item_data->EvolvingLevel; - // TODO: add hash call - break; - case saylink::SayLinkItemInst: - if (m_ItemInst == nullptr) { break; } - if (m_ItemInst->GetItem() == nullptr) { break; } - m_LinkBodyStruct.item_id = m_ItemInst->GetItem()->ID; - m_LinkBodyStruct.augment_1 = m_ItemInst->GetAugmentItemID(0); - m_LinkBodyStruct.augment_2 = m_ItemInst->GetAugmentItemID(1); - m_LinkBodyStruct.augment_3 = m_ItemInst->GetAugmentItemID(2); - m_LinkBodyStruct.augment_4 = m_ItemInst->GetAugmentItemID(3); - m_LinkBodyStruct.augment_5 = m_ItemInst->GetAugmentItemID(4); - m_LinkBodyStruct.augment_6 = m_ItemInst->GetAugmentItemID(5); - m_LinkBodyStruct.is_evolving = (m_ItemInst->IsEvolving() ? 1 : 0); - m_LinkBodyStruct.evolve_group = m_ItemInst->GetItem()->LoreGroup; // see note above - m_LinkBodyStruct.evolve_level = m_ItemInst->GetEvolveLvl(); - m_LinkBodyStruct.ornament_icon = m_ItemInst->GetOrnamentationIcon(); - // TODO: add hash call - break; - default: - break; + case saylink::SayLinkBlank: + break; + case saylink::SayLinkItemData: + if (m_ItemData == nullptr) { break; } + m_LinkBodyStruct.item_id = m_ItemData->ID; + m_LinkBodyStruct.evolve_group = m_ItemData->LoreGroup; // this probably won't work for all items + //m_LinkBodyStruct.evolve_level = m_ItemData->EvolvingLevel; + // TODO: add hash call + break; + case saylink::SayLinkLootItem: + if (m_LootData == nullptr) { break; } + item_data = database.GetItem(m_LootData->item_id); + if (item_data == nullptr) { break; } + m_LinkBodyStruct.item_id = item_data->ID; + m_LinkBodyStruct.augment_1 = m_LootData->aug_1; + m_LinkBodyStruct.augment_2 = m_LootData->aug_2; + m_LinkBodyStruct.augment_3 = m_LootData->aug_3; + m_LinkBodyStruct.augment_4 = m_LootData->aug_4; + m_LinkBodyStruct.augment_5 = m_LootData->aug_5; + m_LinkBodyStruct.augment_6 = m_LootData->aug_6; + m_LinkBodyStruct.evolve_group = item_data->LoreGroup; // see note above + //m_LinkBodyStruct.evolve_level = item_data->EvolvingLevel; + // TODO: add hash call + break; + case saylink::SayLinkItemInst: + if (m_ItemInst == nullptr) { break; } + if (m_ItemInst->GetItem() == nullptr) { break; } + m_LinkBodyStruct.item_id = m_ItemInst->GetItem()->ID; + m_LinkBodyStruct.augment_1 = m_ItemInst->GetAugmentItemID(0); + m_LinkBodyStruct.augment_2 = m_ItemInst->GetAugmentItemID(1); + m_LinkBodyStruct.augment_3 = m_ItemInst->GetAugmentItemID(2); + m_LinkBodyStruct.augment_4 = m_ItemInst->GetAugmentItemID(3); + m_LinkBodyStruct.augment_5 = m_ItemInst->GetAugmentItemID(4); + m_LinkBodyStruct.augment_6 = m_ItemInst->GetAugmentItemID(5); + m_LinkBodyStruct.is_evolving = (m_ItemInst->IsEvolving() ? 1 : 0); + m_LinkBodyStruct.evolve_group = m_ItemInst->GetItem()->LoreGroup; // see note above + m_LinkBodyStruct.evolve_level = m_ItemInst->GetEvolveLvl(); + m_LinkBodyStruct.ornament_icon = m_ItemInst->GetOrnamentationIcon(); + // TODO: add hash call + break; + default: + break; } - if (m_LinkProxyStruct.action_id) + if (m_LinkProxyStruct.action_id) { m_LinkBodyStruct.action_id = m_LinkProxyStruct.action_id; - if (m_LinkProxyStruct.item_id) + } + if (m_LinkProxyStruct.item_id) { m_LinkBodyStruct.item_id = m_LinkProxyStruct.item_id; - if (m_LinkProxyStruct.augment_1) + } + if (m_LinkProxyStruct.augment_1) { m_LinkBodyStruct.augment_1 = m_LinkProxyStruct.augment_1; - if (m_LinkProxyStruct.augment_2) + } + if (m_LinkProxyStruct.augment_2) { m_LinkBodyStruct.augment_2 = m_LinkProxyStruct.augment_2; - if (m_LinkProxyStruct.augment_3) + } + if (m_LinkProxyStruct.augment_3) { m_LinkBodyStruct.augment_3 = m_LinkProxyStruct.augment_3; - if (m_LinkProxyStruct.augment_4) + } + if (m_LinkProxyStruct.augment_4) { m_LinkBodyStruct.augment_4 = m_LinkProxyStruct.augment_4; - if (m_LinkProxyStruct.augment_5) + } + if (m_LinkProxyStruct.augment_5) { m_LinkBodyStruct.augment_5 = m_LinkProxyStruct.augment_5; - if (m_LinkProxyStruct.augment_6) + } + if (m_LinkProxyStruct.augment_6) { m_LinkBodyStruct.augment_6 = m_LinkProxyStruct.augment_6; - if (m_LinkProxyStruct.is_evolving) + } + if (m_LinkProxyStruct.is_evolving) { m_LinkBodyStruct.is_evolving = m_LinkProxyStruct.is_evolving; - if (m_LinkProxyStruct.evolve_group) + } + if (m_LinkProxyStruct.evolve_group) { m_LinkBodyStruct.evolve_group = m_LinkProxyStruct.evolve_group; - if (m_LinkProxyStruct.evolve_level) + } + if (m_LinkProxyStruct.evolve_level) { m_LinkBodyStruct.evolve_level = m_LinkProxyStruct.evolve_level; - if (m_LinkProxyStruct.ornament_icon) + } + if (m_LinkProxyStruct.ornament_icon) { m_LinkBodyStruct.ornament_icon = m_LinkProxyStruct.ornament_icon; - if (m_LinkProxyStruct.hash) + } + if (m_LinkProxyStruct.hash) { m_LinkBodyStruct.hash = m_LinkProxyStruct.hash; + } - if (m_TaskUse) + if (m_TaskUse) { m_LinkBodyStruct.hash = 0x14505DC2; + } m_LinkBody = StringFormat( "%1X" "%05X" "%05X" "%05X" "%05X" "%05X" "%05X" "%05X" "%1X" "%04X" "%02X" "%05X" "%08X", @@ -248,29 +264,79 @@ void EQEmu::SayLinkEngine::generate_text() return; } - const EQEmu::ItemData* item_data = nullptr; + const EQEmu::ItemData *item_data = nullptr; switch (m_LinkType) { - case saylink::SayLinkBlank: - break; - case saylink::SayLinkItemData: - if (m_ItemData == nullptr) { break; } - m_LinkText = m_ItemData->Name; - return; - case saylink::SayLinkLootItem: - if (m_LootData == nullptr) { break; } - item_data = database.GetItem(m_LootData->item_id); - if (item_data == nullptr) { break; } - m_LinkText = item_data->Name; - return; - case saylink::SayLinkItemInst: - if (m_ItemInst == nullptr) { break; } - if (m_ItemInst->GetItem() == nullptr) { break; } - m_LinkText = m_ItemInst->GetItem()->Name; - return; - default: - break; + case saylink::SayLinkBlank: + break; + case saylink::SayLinkItemData: + if (m_ItemData == nullptr) { break; } + m_LinkText = m_ItemData->Name; + return; + case saylink::SayLinkLootItem: + if (m_LootData == nullptr) { break; } + item_data = database.GetItem(m_LootData->item_id); + if (item_data == nullptr) { break; } + m_LinkText = item_data->Name; + return; + case saylink::SayLinkItemInst: + if (m_ItemInst == nullptr) { break; } + if (m_ItemInst->GetItem() == nullptr) { break; } + m_LinkText = m_ItemInst->GetItem()->Name; + return; + default: + break; } m_LinkText = "null"; } + +std::string EQEmu::SayLinkEngine::GenerateQuestSaylink(std::string saylink_text, bool silent, std::string link_name) +{ + uint32 saylink_id = 0; + + /** + * Query for an existing phrase and id in the saylink table + */ + std::string query = StringFormat( + "SELECT `id` FROM `saylink` WHERE `phrase` = '%s' LIMIT 1", + EscapeString(saylink_text).c_str()); + + auto results = database.QueryDatabase(query); + + if (results.Success()) { + if (results.RowCount() >= 1) { + for (auto row = results.begin(); row != results.end(); ++row) + saylink_id = static_cast(atoi(row[0])); + } + else { + std::string insert_query = StringFormat( + "INSERT INTO `saylink` (`phrase`) VALUES ('%s')", + EscapeString(saylink_text).c_str()); + + results = database.QueryDatabase(insert_query); + if (!results.Success()) { + Log(Logs::General, Logs::Error, "Error in saylink phrase queries %s", results.ErrorMessage().c_str()); + } + else { + saylink_id = results.LastInsertedID(); + } + } + } + + /** + * Generate the actual link + */ + EQEmu::SayLinkEngine linker; + linker.SetProxyItemID(SAYLINK_ITEM_ID); + if (silent) { + linker.SetProxyAugment2ID(saylink_id); + } + else { + linker.SetProxyAugment1ID(saylink_id); + } + + linker.SetProxyText(link_name.c_str()); + + return linker.GenerateLink(); +} \ No newline at end of file diff --git a/common/say_link.h b/common/say_link.h index 55e3a8237..c282bde05 100644 --- a/common/say_link.h +++ b/common/say_link.h @@ -101,6 +101,8 @@ namespace EQEmu const std::string& LinkBody() { return m_LinkBody; } // contains string format: '' const std::string& LinkText() { return m_LinkText; } // contains string format: '' + static std::string GenerateQuestSaylink(std::string saylink_text, bool silent, std::string link_name); + void Reset(); private: diff --git a/common/shareddb.cpp b/common/shareddb.cpp index 9e0cd5f7e..c4dd86f32 100644 --- a/common/shareddb.cpp +++ b/common/shareddb.cpp @@ -1175,19 +1175,17 @@ void SharedDatabase::LoadItems(void *data, uint32 size, int32 items, uint32 max_ } } -const EQEmu::ItemData* SharedDatabase::GetItem(uint32 id) { - if (id == 0) - { +const EQEmu::ItemData *SharedDatabase::GetItem(uint32 id) +{ + if (id == 0) { return nullptr; } - if(!items_hash || id > items_hash->max_key()) - { + if (!items_hash || id > items_hash->max_key()) { return nullptr; } - if(items_hash->exists(id)) - { + if (items_hash->exists(id)) { return &(items_hash->at(id)); } diff --git a/common/string_util.cpp b/common/string_util.cpp index 3e9986b48..609841807 100644 --- a/common/string_util.cpp +++ b/common/string_util.cpp @@ -63,6 +63,33 @@ const std::string vStringFormat(const char* format, va_list args) return output; } +const std::string str_tolower(std::string s) +{ + std::transform( + s.begin(), s.end(), s.begin(), + [](unsigned char c) { return std::tolower(c); } + ); + return s; +} + +const std::string str_toupper(std::string s) +{ + std::transform( + s.begin(), s.end(), s.begin(), + [](unsigned char c) { return std::toupper(c); } + ); + return s; +} + +const std::string ucfirst(std::string s) +{ + std::string output = s; + if (!s.empty()) + output[0] = static_cast(toupper(s[0])); + + return output; +} + const std::string StringFormat(const char* format, ...) { va_list args; diff --git a/common/string_util.h b/common/string_util.h index 0db8ff2c9..68c711789 100644 --- a/common/string_util.h +++ b/common/string_util.h @@ -24,6 +24,9 @@ #include "types.h" //std::string based +const std::string str_tolower(std::string s); +const std::string str_toupper(std::string s); +const std::string ucfirst(std::string s); const std::string StringFormat(const char* format, ...); const std::string vStringFormat(const char* format, va_list args); std::vector SplitString(const std::string &s, char delim); diff --git a/zone/CMakeLists.txt b/zone/CMakeLists.txt index 0414a8d2b..8b0c17562 100644 --- a/zone/CMakeLists.txt +++ b/zone/CMakeLists.txt @@ -82,10 +82,12 @@ SET(zone_sources merc.cpp mob.cpp mob_ai.cpp + mob_info.cpp mod_functions.cpp net.cpp npc.cpp npc_ai.cpp + npc_scale_manager.cpp object.cpp oriented_bounding_box.cpp pathfinder_interface.cpp @@ -137,8 +139,7 @@ SET(zone_sources zone.cpp zone_config.cpp zonedb.cpp - zoning.cpp -) + zoning.cpp) SET(zone_headers aa.h @@ -207,6 +208,7 @@ SET(zone_headers net.h npc.h npc_ai.h + npc_scale_manager.h object.h oriented_bounding_box.h pathfinder_interface.h @@ -242,8 +244,7 @@ SET(zone_headers zone.h zone_config.h zonedb.h - zonedump.h -) + zonedump.h) IF(EQEMU_DEPOP_INVALIDATES_CACHE) ADD_DEFINITIONS(-DDEPOP_INVALIDATES_NPC_TYPES_CACHE) diff --git a/zone/attack.cpp b/zone/attack.cpp index d6cf4227f..22e10f842 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -37,6 +37,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include #include #include +#include #ifdef BOTS #include "bot.h" @@ -5463,3 +5464,8 @@ bool Mob::GetWasSpawnedInWater() const { void Mob::SetSpawnedInWater(bool spawned_in_water) { Mob::spawned_in_water = spawned_in_water; } + +int32 Mob::GetHPRegen() const +{ + return hp_regen; +} \ No newline at end of file diff --git a/zone/bonuses.cpp b/zone/bonuses.cpp index e71c6e0d5..123e820b4 100644 --- a/zone/bonuses.cpp +++ b/zone/bonuses.cpp @@ -62,12 +62,12 @@ void Mob::CalcBonuses() void NPC::CalcBonuses() { memset(&itembonuses, 0, sizeof(StatBonuses)); - if(RuleB(NPC, UseItemBonusesForNonPets)){ + if (RuleB(NPC, UseItemBonusesForNonPets)) { memset(&itembonuses, 0, sizeof(StatBonuses)); CalcItemBonuses(&itembonuses); } - else{ - if(GetOwner()){ + else { + if (GetOwner()) { memset(&itembonuses, 0, sizeof(StatBonuses)); CalcItemBonuses(&itembonuses); } diff --git a/zone/client.cpp b/zone/client.cpp index 18940d58a..564db321c 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -254,7 +254,6 @@ Client::Client(EQStreamInterface* ieqs) InitializeMercInfo(); SetMerc(0); if (RuleI(World, PVPMinLevel) > 0 && level >= RuleI(World, PVPMinLevel) && m_pp.pvp == 0) SetPVP(true, false); - logging_enabled = CLIENT_DEFAULT_LOGGING_ENABLED; //for good measure: memset(&m_pp, 0, sizeof(m_pp)); @@ -6670,30 +6669,13 @@ void Client::SendStatsWindow(Client* client, bool use_window) std::string class_Name = itoa(GetClass()); std::string class_List[] = { "WAR", "CLR", "PAL", "RNG", "SHD", "DRU", "MNK", "BRD", "ROG", "SHM", "NEC", "WIZ", "MAG", "ENC", "BST", "BER" }; - if(GetClass() < 17 && GetClass() > 0) { class_Name = class_List[GetClass()-1]; } + if (GetClass() < 17 && GetClass() > 0) { + class_Name = class_List[GetClass() - 1]; + } // Race - std::string race_Name = itoa(GetRace()); - switch(GetRace()) - { - case 1: race_Name = "Human"; break; - case 2: race_Name = "Barbarian"; break; - case 3: race_Name = "Erudite"; break; - case 4: race_Name = "Wood Elf"; break; - case 5: race_Name = "High Elf"; break; - case 6: race_Name = "Dark Elf"; break; - case 7: race_Name = "Half Elf"; break; - case 8: race_Name = "Dwarf"; break; - case 9: race_Name = "Troll"; break; - case 10: race_Name = "Ogre"; break; - case 11: race_Name = "Halfing"; break; - case 12: race_Name = "Gnome"; break; - case 128: race_Name = "Iksar"; break; - case 130: race_Name = "Vah Shir"; break; - case 330: race_Name = "Froglok"; break; - case 522: race_Name = "Drakkin"; break; - default: break; - } + std::string race_name = GetRaceIDName(GetRace()); + /*########################################################## ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ H/M/E String @@ -7122,7 +7104,7 @@ void Client::SendStatsWindow(Client* client, bool use_window) std::ostringstream final_string; final_string << - /* C/L/R */ indP << "Class: " << class_Name << indS << "Level: " << static_cast(GetLevel()) << indS << "Race: " << race_Name << "
" << + /* C/L/R */ indP << "Class: " << class_Name << indS << "Level: " << static_cast(GetLevel()) << indS << "Race: " << race_name << "
" << /* Runes */ indP << "Rune: " << rune_number << indL << indS << "Spell Rune: " << magic_rune_number << "
" << /* HP/M/E */ HME_row << /* DS */ indP << "DS: " << (itembonuses.DamageShield + spellbonuses.DamageShield*-1) << " (Spell: " << (spellbonuses.DamageShield*-1) << " + Item: " << itembonuses.DamageShield << " / " << RuleI(Character, ItemDamageShieldCap) << ")
" << diff --git a/zone/client.h b/zone/client.h index 023367e50..f14dc9336 100644 --- a/zone/client.h +++ b/zone/client.h @@ -851,7 +851,6 @@ public: void SetAATitle(const char *Title); void SetTitleSuffix(const char *txt); void MemorizeSpell(uint32 slot, uint32 spellid, uint32 scribing); - int32 acmod(); // Item methods void EVENT_ITEM_ScriptStopReturn(); diff --git a/zone/client_mods.cpp b/zone/client_mods.cpp index 39c37c874..8651a622f 100644 --- a/zone/client_mods.cpp +++ b/zone/client_mods.cpp @@ -275,8 +275,9 @@ int32 Client::CalcHPRegen(bool bCombat) if (!skip_innate && m_pp.InnateSkills[InnateRegen] != InnateDisabled) { if (level >= 50) { ++base; - if (level >= 55) + if (level >= 55) { ++base; + } } base *= 2; } @@ -331,6 +332,7 @@ int32 Client::CalcMaxHP() if (hp_perc_cap) { int curHP_cap = (max_hp * hp_perc_cap) / 100; if (cur_hp > curHP_cap || (spellbonuses.HPPercCap[1] && cur_hp > spellbonuses.HPPercCap[1])) { + cur_hp = curHP_cap; } } @@ -340,136 +342,137 @@ int32 Client::CalcMaxHP() uint32 Mob::GetClassLevelFactor() { uint32 multiplier = 0; - uint8 mlevel = GetLevel(); + uint8 mlevel = GetLevel(); switch (GetClass()) { case WARRIOR: { - if (mlevel < 20) { - multiplier = 220; - } - else if (mlevel < 30) { - multiplier = 230; - } - else if (mlevel < 40) { - multiplier = 250; - } - else if (mlevel < 53) { - multiplier = 270; - } - else if (mlevel < 57) { - multiplier = 280; - } - else if (mlevel < 60) { - multiplier = 290; - } - else if (mlevel < 70) { - multiplier = 300; - } - else { - multiplier = 311; - } - break; + if (mlevel < 20) { + multiplier = 220; } + else if (mlevel < 30) { + multiplier = 230; + } + else if (mlevel < 40) { + multiplier = 250; + } + else if (mlevel < 53) { + multiplier = 270; + } + else if (mlevel < 57) { + multiplier = 280; + } + else if (mlevel < 60) { + multiplier = 290; + } + else if (mlevel < 70) { + multiplier = 300; + } + else { + multiplier = 311; + } + break; + } case DRUID: case CLERIC: case SHAMAN: { - if (mlevel < 70) { - multiplier = 150; - } - else { - multiplier = 157; - } - break; + if (mlevel < 70) { + multiplier = 150; } + else { + multiplier = 157; + } + break; + } case BERSERKER: case PALADIN: case SHADOWKNIGHT: { - if (mlevel < 35) { - multiplier = 210; - } - else if (mlevel < 45) { - multiplier = 220; - } - else if (mlevel < 51) { - multiplier = 230; - } - else if (mlevel < 56) { - multiplier = 240; - } - else if (mlevel < 60) { - multiplier = 250; - } - else if (mlevel < 68) { - multiplier = 260; - } - else { - multiplier = 270; - } - break; + if (mlevel < 35) { + multiplier = 210; } + else if (mlevel < 45) { + multiplier = 220; + } + else if (mlevel < 51) { + multiplier = 230; + } + else if (mlevel < 56) { + multiplier = 240; + } + else if (mlevel < 60) { + multiplier = 250; + } + else if (mlevel < 68) { + multiplier = 260; + } + else { + multiplier = 270; + } + break; + } case MONK: case BARD: case ROGUE: case BEASTLORD: { - if (mlevel < 51) { - multiplier = 180; - } - else if (mlevel < 58) { - multiplier = 190; - } - else if (mlevel < 70) { - multiplier = 200; - } - else { - multiplier = 210; - } - break; + if (mlevel < 51) { + multiplier = 180; } + else if (mlevel < 58) { + multiplier = 190; + } + else if (mlevel < 70) { + multiplier = 200; + } + else { + multiplier = 210; + } + break; + } case RANGER: { - if (mlevel < 58) { - multiplier = 200; - } - else if (mlevel < 70) { - multiplier = 210; - } - else { - multiplier = 220; - } - break; + if (mlevel < 58) { + multiplier = 200; } + else if (mlevel < 70) { + multiplier = 210; + } + else { + multiplier = 220; + } + break; + } case MAGICIAN: case WIZARD: case NECROMANCER: case ENCHANTER: { - if (mlevel < 70) { - multiplier = 120; - } - else { - multiplier = 127; - } - break; + if (mlevel < 70) { + multiplier = 120; } + else { + multiplier = 127; + } + break; + } default: { - if (mlevel < 35) { - multiplier = 210; - } - else if (mlevel < 45) { - multiplier = 220; - } - else if (mlevel < 51) { - multiplier = 230; - } - else if (mlevel < 56) { - multiplier = 240; - } - else if (mlevel < 60) { - multiplier = 250; - } - else { - multiplier = 260; - } - break; + if (mlevel < 35) { + multiplier = 210; } + else if (mlevel < 45) { + multiplier = 220; + } + else if (mlevel < 51) { + multiplier = 230; + } + else if (mlevel < 56) { + multiplier = 240; + } + else if (mlevel < 60) { + multiplier = 250; + } + else { + multiplier = 260; + } + break; + } } + return multiplier; } @@ -560,537 +563,6 @@ int32 Client::GetRawItemAC() return Total; } -int32 Client::acmod() -{ - int agility = GetAGI(); - int level = GetLevel(); - if (agility < 1 || level < 1) { - return (0); - } - if (agility <= 74) { - if (agility == 1) { - return -24; - } - else if (agility <= 3) { - return -23; - } - else if (agility == 4) { - return -22; - } - else if (agility <= 6) { - return -21; - } - else if (agility <= 8) { - return -20; - } - else if (agility == 9) { - return -19; - } - else if (agility <= 11) { - return -18; - } - else if (agility == 12) { - return -17; - } - else if (agility <= 14) { - return -16; - } - else if (agility <= 16) { - return -15; - } - else if (agility == 17) { - return -14; - } - else if (agility <= 19) { - return -13; - } - else if (agility == 20) { - return -12; - } - else if (agility <= 22) { - return -11; - } - else if (agility <= 24) { - return -10; - } - else if (agility == 25) { - return -9; - } - else if (agility <= 27) { - return -8; - } - else if (agility == 28) { - return -7; - } - else if (agility <= 30) { - return -6; - } - else if (agility <= 32) { - return -5; - } - else if (agility == 33) { - return -4; - } - else if (agility <= 35) { - return -3; - } - else if (agility == 36) { - return -2; - } - else if (agility <= 38) { - return -1; - } - else if (agility <= 65) { - return 0; - } - else if (agility <= 70) { - return 1; - } - else if (agility <= 74) { - return 5; - } - } - else if (agility <= 137) { - if (agility == 75) { - if (level <= 6) { - return 9; - } - else if (level <= 19) { - return 23; - } - else if (level <= 39) { - return 33; - } - else { - return 39; - } - } - else if (agility >= 76 && agility <= 79) { - if (level <= 6) { - return 10; - } - else if (level <= 19) { - return 23; - } - else if (level <= 39) { - return 33; - } - else { - return 40; - } - } - else if (agility == 80) { - if (level <= 6) { - return 11; - } - else if (level <= 19) { - return 24; - } - else if (level <= 39) { - return 34; - } - else { - return 41; - } - } - else if (agility >= 81 && agility <= 85) { - if (level <= 6) { - return 12; - } - else if (level <= 19) { - return 25; - } - else if (level <= 39) { - return 35; - } - else { - return 42; - } - } - else if (agility >= 86 && agility <= 90) { - if (level <= 6) { - return 12; - } - else if (level <= 19) { - return 26; - } - else if (level <= 39) { - return 36; - } - else { - return 42; - } - } - else if (agility >= 91 && agility <= 95) { - if (level <= 6) { - return 13; - } - else if (level <= 19) { - return 26; - } - else if (level <= 39) { - return 36; - } - else { - return 43; - } - } - else if (agility >= 96 && agility <= 99) { - if (level <= 6) { - return 14; - } - else if (level <= 19) { - return 27; - } - else if (level <= 39) { - return 37; - } - else { - return 44; - } - } - else if (agility == 100 && level >= 7) { - if (level <= 19) { - return 28; - } - else if (level <= 39) { - return 38; - } - else { - return 45; - } - } - else if (level <= 6) { - return 15; - } - //level is >6 - else if (agility >= 101 && agility <= 105) { - if (level <= 19) { - return 29; - } - else if (level <= 39) { - return 39; // not verified - } - else { - return 45; - } - } - else if (agility >= 106 && agility <= 110) { - if (level <= 19) { - return 29; - } - else if (level <= 39) { - return 39; // not verified - } - else { - return 46; - } - } - else if (agility >= 111 && agility <= 115) { - if (level <= 19) { - return 30; - } - else if (level <= 39) { - return 40; // not verified - } - else { - return 47; - } - } - else if (agility >= 116 && agility <= 119) { - if (level <= 19) { - return 31; - } - else if (level <= 39) { - return 41; - } - else { - return 47; - } - } - else if (level <= 19) { - return 32; - } - //level is > 19 - else if (agility == 120) { - if (level <= 39) { - return 42; - } - else { - return 48; - } - } - else if (agility <= 125) { - if (level <= 39) { - return 42; - } - else { - return 49; - } - } - else if (agility <= 135) { - if (level <= 39) { - return 42; - } - else { - return 50; - } - } - else { - if (level <= 39) { - return 42; - } - else { - return 51; - } - } - } - else if (agility <= 300) { - if (level <= 6) { - if (agility <= 139) { - return (21); - } - else if (agility == 140) { - return (22); - } - else if (agility <= 145) { - return (23); - } - else if (agility <= 150) { - return (23); - } - else if (agility <= 155) { - return (24); - } - else if (agility <= 159) { - return (25); - } - else if (agility == 160) { - return (26); - } - else if (agility <= 165) { - return (26); - } - else if (agility <= 170) { - return (27); - } - else if (agility <= 175) { - return (28); - } - else if (agility <= 179) { - return (28); - } - else if (agility == 180) { - return (29); - } - else if (agility <= 185) { - return (30); - } - else if (agility <= 190) { - return (31); - } - else if (agility <= 195) { - return (31); - } - else if (agility <= 199) { - return (32); - } - else if (agility <= 219) { - return (33); - } - else if (agility <= 239) { - return (34); - } - else { - return (35); - } - } - else if (level <= 19) { - if (agility <= 139) { - return (34); - } - else if (agility == 140) { - return (35); - } - else if (agility <= 145) { - return (36); - } - else if (agility <= 150) { - return (37); - } - else if (agility <= 155) { - return (37); - } - else if (agility <= 159) { - return (38); - } - else if (agility == 160) { - return (39); - } - else if (agility <= 165) { - return (40); - } - else if (agility <= 170) { - return (40); - } - else if (agility <= 175) { - return (41); - } - else if (agility <= 179) { - return (42); - } - else if (agility == 180) { - return (43); - } - else if (agility <= 185) { - return (43); - } - else if (agility <= 190) { - return (44); - } - else if (agility <= 195) { - return (45); - } - else if (agility <= 199) { - return (45); - } - else if (agility <= 219) { - return (46); - } - else if (agility <= 239) { - return (47); - } - else { - return (48); - } - } - else if (level <= 39) { - if (agility <= 139) { - return (44); - } - else if (agility == 140) { - return (45); - } - else if (agility <= 145) { - return (46); - } - else if (agility <= 150) { - return (47); - } - else if (agility <= 155) { - return (47); - } - else if (agility <= 159) { - return (48); - } - else if (agility == 160) { - return (49); - } - else if (agility <= 165) { - return (50); - } - else if (agility <= 170) { - return (50); - } - else if (agility <= 175) { - return (51); - } - else if (agility <= 179) { - return (52); - } - else if (agility == 180) { - return (53); - } - else if (agility <= 185) { - return (53); - } - else if (agility <= 190) { - return (54); - } - else if (agility <= 195) { - return (55); - } - else if (agility <= 199) { - return (55); - } - else if (agility <= 219) { - return (56); - } - else if (agility <= 239) { - return (57); - } - else { - return (58); - } - } - else { //lvl >= 40 - if (agility <= 139) { - return (51); - } - else if (agility == 140) { - return (52); - } - else if (agility <= 145) { - return (53); - } - else if (agility <= 150) { - return (53); - } - else if (agility <= 155) { - return (54); - } - else if (agility <= 159) { - return (55); - } - else if (agility == 160) { - return (56); - } - else if (agility <= 165) { - return (56); - } - else if (agility <= 170) { - return (57); - } - else if (agility <= 175) { - return (58); - } - else if (agility <= 179) { - return (58); - } - else if (agility == 180) { - return (59); - } - else if (agility <= 185) { - return (60); - } - else if (agility <= 190) { - return (61); - } - else if (agility <= 195) { - return (61); - } - else if (agility <= 199) { - return (62); - } - else if (agility <= 219) { - return (63); - } - else if (agility <= 239) { - return (64); - } - else { - return (65); - } - } - } - else { - //seems about 21 agil per extra AC pt over 300... - return (65 + ((agility - 300) / 21)); - } - Log(Logs::Detail, Logs::Error, "Error in Client::acmod(): Agility: %i, Level: %i", agility, level); - return 0; -}; - int32 Client::CalcMaxMana() { switch (GetCasterClass()) { diff --git a/zone/command.cpp b/zone/command.cpp index 98faec71a..4cc8b8a54 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -249,6 +249,7 @@ int command_init(void) command_add("lastname", "[new lastname] - Set your or your player target's lastname", 50, command_lastname) || command_add("level", "[level] - Set your or your target's level", 10, command_level) || command_add("listnpcs", "[name/range] - Search NPCs", 20, command_listnpcs) || + command_add("list", "[npc] [name|all] - Search entities", 20, command_list) || command_add("listpetition", "- List petitions", 50, command_listpetition) || command_add("load_shared_memory", "[shared_memory_name] - Reloads shared memory and uses the input as output", 250, command_load_shared_memory) || command_add("loc", "- Print out your or your target's current location and heading", 0, command_loc) || @@ -1328,16 +1329,266 @@ void command_delpetition(Client *c, const Seperator *sep) void command_listnpcs(Client *c, const Seperator *sep) { - if (strcasecmp(sep->arg[1], "all") == 0) - entity_list.ListNPCs(c,sep->arg[1],sep->arg[2],0); - else if(sep->IsNumber(1) && sep->IsNumber(2)) - entity_list.ListNPCs(c,sep->arg[1],sep->arg[2],2); - else if(sep->arg[1][0] != 0) - entity_list.ListNPCs(c,sep->arg[1],sep->arg[2],1); + c->Message(0, "Deprecated, use the #list command (#list npcs )"); +} + +void command_list(Client *c, const Seperator *sep) +{ + std::string search_type; + if (strcasecmp(sep->arg[1], "npcs") == 0) { + search_type = "npcs"; + } + + if (strcasecmp(sep->arg[1], "players") == 0) { + search_type = "players"; + } + + if (strcasecmp(sep->arg[1], "corpses") == 0) { + search_type = "corpses"; + } + + if (strcasecmp(sep->arg[1], "doors") == 0) { + search_type = "doors"; + } + + if (strcasecmp(sep->arg[1], "objects") == 0) { + search_type = "objects"; + } + + if (search_type.length() > 0) { + + int entity_count = 0; + int found_count = 0; + + std::string search_string; + + if (sep->arg[2]) { + search_string = sep->arg[2]; + } + + /** + * NPC + */ + if (search_type.find("npcs") != std::string::npos) { + auto &entity_list_search = entity_list.GetMobList(); + + for (auto &itr : entity_list_search) { + Mob *entity = itr.second; + if (!entity->IsNPC()) { + continue; + } + + entity_count++; + + std::string entity_name = entity->GetCleanName(); + + /** + * Filter by name + */ + if (search_string.length() > 0 && entity_name.find(search_string) == std::string::npos) { + continue; + } + + std::string saylink = StringFormat( + "#goto %.0f %0.f %.0f", + entity->GetX(), + entity->GetY(), + entity->GetZ()); + + c->Message( + 0, + "| %s | ID %5d | %s | x %.0f | y %0.f | z %.0f", + EQEmu::SayLinkEngine::GenerateQuestSaylink(saylink, false, "Goto").c_str(), + entity->GetID(), + entity->GetName(), + entity->GetX(), + entity->GetY(), + entity->GetZ() + ); + + found_count++; + } + } + + /** + * Client + */ + if (search_type.find("players") != std::string::npos) { + auto &entity_list_search = entity_list.GetClientList(); + + for (auto &itr : entity_list_search) { + Client *entity = itr.second; + + entity_count++; + + std::string entity_name = entity->GetCleanName(); + + /** + * Filter by name + */ + if (search_string.length() > 0 && entity_name.find(search_string) == std::string::npos) { + continue; + } + + std::string saylink = StringFormat( + "#goto %.0f %0.f %.0f", + entity->GetX(), + entity->GetY(), + entity->GetZ()); + + c->Message( + 0, + "| %s | ID %5d | %s | x %.0f | y %0.f | z %.0f", + EQEmu::SayLinkEngine::GenerateQuestSaylink(saylink, false, "Goto").c_str(), + entity->GetID(), + entity->GetName(), + entity->GetX(), + entity->GetY(), + entity->GetZ() + ); + + found_count++; + } + } + + /** + * Corpse + */ + if (search_type.find("corpses") != std::string::npos) { + auto &entity_list_search = entity_list.GetCorpseList(); + + for (auto &itr : entity_list_search) { + Corpse *entity = itr.second; + + entity_count++; + + std::string entity_name = entity->GetCleanName(); + + /** + * Filter by name + */ + if (search_string.length() > 0 && entity_name.find(search_string) == std::string::npos) { + continue; + } + + std::string saylink = StringFormat( + "#goto %.0f %0.f %.0f", + entity->GetX(), + entity->GetY(), + entity->GetZ()); + + c->Message( + 0, + "| %s | ID %5d | %s | x %.0f | y %0.f | z %.0f", + EQEmu::SayLinkEngine::GenerateQuestSaylink(saylink, false, "Goto").c_str(), + entity->GetID(), + entity->GetName(), + entity->GetX(), + entity->GetY(), + entity->GetZ() + ); + + found_count++; + } + } + + /** + * Doors + */ + if (search_type.find("doors") != std::string::npos) { + auto &entity_list_search = entity_list.GetDoorsList(); + + for (auto &itr : entity_list_search) { + Doors * entity = itr.second; + + entity_count++; + + std::string entity_name = entity->GetDoorName(); + + /** + * Filter by name + */ + if (search_string.length() > 0 && entity_name.find(search_string) == std::string::npos) { + continue; + } + + std::string saylink = StringFormat( + "#goto %.0f %0.f %.0f", + entity->GetX(), + entity->GetY(), + entity->GetZ()); + + c->Message( + 0, + "| %s | Entity ID %5d | Door ID %i | %s | x %.0f | y %0.f | z %.0f", + EQEmu::SayLinkEngine::GenerateQuestSaylink(saylink, false, "Goto").c_str(), + entity->GetID(), + entity->GetDoorID(), + entity->GetDoorName(), + entity->GetX(), + entity->GetY(), + entity->GetZ() + ); + + found_count++; + } + } + + /** + * Objects + */ + if (search_type.find("objects") != std::string::npos) { + auto &entity_list_search = entity_list.GetObjectList(); + + for (auto &itr : entity_list_search) { + Object * entity = itr.second; + + entity_count++; + + std::string entity_name = entity->GetModelName(); + + /** + * Filter by name + */ + if (search_string.length() > 0 && entity_name.find(search_string) == std::string::npos) { + continue; + } + + std::string saylink = StringFormat( + "#goto %.0f %0.f %.0f", + entity->GetX(), + entity->GetY(), + entity->GetZ()); + + c->Message( + 0, + "| %s | Entity ID %5d | Object DBID %i | %s | x %.0f | y %0.f | z %.0f", + EQEmu::SayLinkEngine::GenerateQuestSaylink(saylink, false, "Goto").c_str(), + entity->GetID(), + entity->GetDBID(), + entity->GetModelName(), + entity->GetX(), + entity->GetY(), + entity->GetZ() + ); + + found_count++; + } + } + + if (found_count) { + c->Message( + 0, "Found (%i) of type (%s) in zone (%i) total", + found_count, + search_type.c_str(), + entity_count + ); + } + } else { - c->Message(0, "Usage of #listnpcs:"); - c->Message(0, "#listnpcs [#] [#] (Each number would search by ID, ex. #listnpcs 1 30, searches 1-30)"); - c->Message(0, "#listnpcs [name] (Would search for a npc with [name])"); + c->Message(0, "Usage of #list"); + c->Message(0, "- #list [npcs|players|corpses|doors|objects] [search]"); + c->Message(0, "- Example: #list npc (Blank for all)"); } } @@ -1460,24 +1711,24 @@ void command_npcstats(Client *c, const Seperator *sep) c->Message(0, "ERROR: Target is not a NPC!"); else { auto target_npc = c->GetTarget()->CastToNPC(); - c->Message(0, "NPC Stats:"); - c->Message(0, "Name: %s NpcID: %u", target_npc->GetName(), target_npc->GetNPCTypeID()); - c->Message(0, "Race: %i Level: %i Class: %i Material: %i", target_npc->GetRace(), target_npc->GetLevel(), target_npc->GetClass(), target_npc->GetTexture()); - c->Message(0, "Current HP: %i Max HP: %i", target_npc->GetHP(), target_npc->GetMaxHP()); + c->Message(0, "# NPC Stats"); + c->Message(0, "- Name: %s NpcID: %u", target_npc->GetName(), target_npc->GetNPCTypeID()); + c->Message(0, "- Race: %i Level: %i Class: %i Material: %i", target_npc->GetRace(), target_npc->GetLevel(), target_npc->GetClass(), target_npc->GetTexture()); + c->Message(0, "- Current HP: %i Max HP: %i", target_npc->GetHP(), target_npc->GetMaxHP()); //c->Message(0, "Weapon Item Number: %s", target_npc->GetWeapNo()); - c->Message(0, "Gender: %i Size: %f Bodytype: %d", target_npc->GetGender(), target_npc->GetSize(), target_npc->GetBodyType()); - c->Message(0, "Runspeed: %.3f Walkspeed: %.3f", static_cast(0.025f * target_npc->GetRunspeed()), static_cast(0.025f * target_npc->GetWalkspeed())); - c->Message(0, "Spawn Group: %i Grid: %i", target_npc->GetSp2(), target_npc->GetGrid()); + c->Message(0, "- Gender: %i Size: %f Bodytype: %d", target_npc->GetGender(), target_npc->GetSize(), target_npc->GetBodyType()); + c->Message(0, "- Runspeed: %.3f Walkspeed: %.3f", static_cast(0.025f * target_npc->GetRunspeed()), static_cast(0.025f * target_npc->GetWalkspeed())); + c->Message(0, "- Spawn Group: %i Grid: %i", target_npc->GetSp2(), target_npc->GetGrid()); if (target_npc->proximity) { - c->Message(0, "Proximity: Enabled"); - c->Message(0, "Cur_X: %1.3f, Cur_Y: %1.3f, Cur_Z: %1.3f", target_npc->GetX(), target_npc->GetY(), target_npc->GetZ()); - c->Message(0, "Min_X: %1.3f(%1.3f), Max_X: %1.3f(%1.3f), X_Range: %1.3f", target_npc->proximity->min_x, (target_npc->proximity->min_x - target_npc->GetX()), target_npc->proximity->max_x, (target_npc->proximity->max_x - target_npc->GetX()), (target_npc->proximity->max_x - target_npc->proximity->min_x)); - c->Message(0, "Min_Y: %1.3f(%1.3f), Max_Y: %1.3f(%1.3f), Y_Range: %1.3f", target_npc->proximity->min_y, (target_npc->proximity->min_y - target_npc->GetY()), target_npc->proximity->max_y, (target_npc->proximity->max_y - target_npc->GetY()), (target_npc->proximity->max_y - target_npc->proximity->min_y)); - c->Message(0, "Min_Z: %1.3f(%1.3f), Max_Z: %1.3f(%1.3f), Z_Range: %1.3f", target_npc->proximity->min_z, (target_npc->proximity->min_z - target_npc->GetZ()), target_npc->proximity->max_z, (target_npc->proximity->max_z - target_npc->GetZ()), (target_npc->proximity->max_z - target_npc->proximity->min_z)); - c->Message(0, "Say: %s", (target_npc->proximity->say ? "Enabled" : "Disabled")); + c->Message(0, "- Proximity: Enabled"); + c->Message(0, "-- Cur_X: %1.3f, Cur_Y: %1.3f, Cur_Z: %1.3f", target_npc->GetX(), target_npc->GetY(), target_npc->GetZ()); + c->Message(0, "-- Min_X: %1.3f(%1.3f), Max_X: %1.3f(%1.3f), X_Range: %1.3f", target_npc->proximity->min_x, (target_npc->proximity->min_x - target_npc->GetX()), target_npc->proximity->max_x, (target_npc->proximity->max_x - target_npc->GetX()), (target_npc->proximity->max_x - target_npc->proximity->min_x)); + c->Message(0, "-- Min_Y: %1.3f(%1.3f), Max_Y: %1.3f(%1.3f), Y_Range: %1.3f", target_npc->proximity->min_y, (target_npc->proximity->min_y - target_npc->GetY()), target_npc->proximity->max_y, (target_npc->proximity->max_y - target_npc->GetY()), (target_npc->proximity->max_y - target_npc->proximity->min_y)); + c->Message(0, "-- Min_Z: %1.3f(%1.3f), Max_Z: %1.3f(%1.3f), Z_Range: %1.3f", target_npc->proximity->min_z, (target_npc->proximity->min_z - target_npc->GetZ()), target_npc->proximity->max_z, (target_npc->proximity->max_z - target_npc->GetZ()), (target_npc->proximity->max_z - target_npc->proximity->min_z)); + c->Message(0, "-- Say: %s", (target_npc->proximity->say ? "Enabled" : "Disabled")); } else { - c->Message(0, "Proximity: Disabled"); + c->Message(0, "-Proximity: Disabled"); } c->Message(0, ""); c->Message(0, "EmoteID: %i", target_npc->GetEmoteID()); @@ -2024,12 +2275,12 @@ void command_grid(Client *c, const Seperator *sep) } std::string query = StringFormat( - "SELECT `x`, `y`, `z`, `heading`, `number`, `pause` " - "FROM `grid_entries` " - "WHERE `zoneid` = %u and `gridid` = %i " - "ORDER BY `number` ", - zone->GetZoneID(), - target->CastToNPC()->GetGrid() + "SELECT `x`, `y`, `z`, `heading`, `number`, `pause` " + "FROM `grid_entries` " + "WHERE `zoneid` = %u and `gridid` = %i " + "ORDER BY `number` ", + zone->GetZoneID(), + target->CastToNPC()->GetGrid() ); auto results = database.QueryDatabase(query); @@ -2046,11 +2297,12 @@ void command_grid(Client *c, const Seperator *sep) /** * Depop any node npc's already spawned */ - auto &mob_list = entity_list.GetMobList(); - for (auto itr = mob_list.begin(); itr != mob_list.end(); ++itr) { + auto &mob_list = entity_list.GetMobList(); + for (auto itr = mob_list.begin(); itr != mob_list.end(); ++itr) { Mob *mob = itr->second; - if (mob->IsNPC() && mob->GetRace() == 2254) + if (mob->IsNPC() && mob->GetRace() == 2254) { mob->Depop(); + } } /** @@ -2060,21 +2312,22 @@ void command_grid(Client *c, const Seperator *sep) auto node_position = glm::vec4(atof(row[0]), atof(row[1]), atof(row[2]), atof(row[3])); NPC *npc = NPC::SpawnGridNodeNPC( - target->GetCleanName(), - node_position, - static_cast(target->CastToNPC()->GetGrid()), - static_cast(atoi(row[4])), - static_cast(atoi(row[5])) + target->GetCleanName(), + node_position, + static_cast(target->CastToNPC()->GetGrid()), + static_cast(atoi(row[4])), + static_cast(atoi(row[5])) ); npc->SetFlyMode(1); npc->GMMove(node_position.x, node_position.y, node_position.z, node_position.w); } } - else if (strcasecmp("delete", sep->arg[1]) == 0) - database.ModifyGrid(c, true,atoi(sep->arg[2]),0,0,zone->GetZoneID()); + else if (strcasecmp("delete", sep->arg[1]) == 0) { + database.ModifyGrid(c, true, atoi(sep->arg[2]), 0, 0, zone->GetZoneID()); + } else { - c->Message(0,"Usage: #grid add/delete grid_num wandertype pausetype"); - c->Message(0,"Usage: #grid max - displays the highest grid ID used in this zone (for add)"); + c->Message(0, "Usage: #grid add/delete grid_num wandertype pausetype"); + c->Message(0, "Usage: #grid max - displays the highest grid ID used in this zone (for add)"); } } diff --git a/zone/command.h b/zone/command.h index d3bae6c0c..16a7177c2 100644 --- a/zone/command.h +++ b/zone/command.h @@ -152,6 +152,7 @@ void command_kill(Client *c, const Seperator *sep); void command_lastname(Client *c, const Seperator *sep); void command_level(Client *c, const Seperator *sep); void command_listnpcs(Client *c, const Seperator *sep); +void command_list(Client *c, const Seperator *sep); void command_listpetition(Client *c, const Seperator *sep); void command_load_shared_memory(Client *c, const Seperator *sep); void command_loc(Client *c, const Seperator *sep); diff --git a/zone/doors.cpp b/zone/doors.cpp index 9561757df..1c5301622 100644 --- a/zone/doors.cpp +++ b/zone/doors.cpp @@ -820,7 +820,7 @@ void Doors::SetDisableTimer(bool flag) { void Doors::CreateDatabaseEntry() { - if(database.GetDoorsDBCountPlusOne(zone->GetShortName(), zone->GetInstanceVersion()) - 1 >= 255) { + if (database.GetDoorsDBCountPlusOne(zone->GetShortName(), zone->GetInstanceVersion()) - 1 >= 255) { return; } @@ -828,18 +828,32 @@ void Doors::CreateDatabaseEntry() * Persist */ database.InsertDoor( - GetDoorDBID(), - GetDoorID(), - GetDoorName(), - m_Position, - GetOpenType(), - static_cast(GetGuildID()), - GetLockpick(), - GetKeyItem(), - static_cast(GetDoorParam()), - static_cast(GetInvertState()), - GetIncline(), - GetSize() + GetDoorDBID(), + GetDoorID(), + GetDoorName(), + m_Position, + GetOpenType(), + static_cast(GetGuildID()), + GetLockpick(), + GetKeyItem(), + static_cast(GetDoorParam()), + static_cast(GetInvertState()), + GetIncline(), + GetSize() ); } +float Doors::GetX() +{ + return m_Position.x; +} + +float Doors::GetY() +{ + return m_Position.y; +} + +float Doors::GetZ() +{ + return m_Position.z; +} diff --git a/zone/doors.h b/zone/doors.h index f112f84f1..78debbaba 100644 --- a/zone/doors.h +++ b/zone/doors.h @@ -64,6 +64,10 @@ public: void SetSize(uint16 size); void ToggleState(Mob *sender); + float GetX(); + float GetY(); + float GetZ(); + private: uint32 database_id; diff --git a/zone/embparser_api.cpp b/zone/embparser_api.cpp index 633bcda53..4bdd4fcb8 100644 --- a/zone/embparser_api.cpp +++ b/zone/embparser_api.cpp @@ -3025,10 +3025,10 @@ XS(XS__saylink) { Perl_croak(aTHX_ "Usage: quest::saylink(string message, [bool silent = false], [link_name = message])"); dXSTARG; - Const_char *RETVAL; - char message[250]; - char link_name[250]; - bool silent = false; + std::string RETVAL; + char message[250]; + char link_name[250]; + bool silent = false; strcpy(message, (char *) SvPV_nolen(ST(0))); if (items >= 2) { silent = ((int) SvIV(ST(1))) == 0 ? false : true; @@ -3039,7 +3039,8 @@ XS(XS__saylink) { strcpy(link_name, message); RETVAL = quest_manager.saylink(message, silent, link_name); - sv_setpv(TARG, RETVAL); + + sv_setpv(TARG, RETVAL.c_str()); XSprePUSH; PUSHTARG; XSRETURN(1); diff --git a/zone/entity.cpp b/zone/entity.cpp index 2523c7d96..3cc2928cf 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -40,6 +40,8 @@ #include "string_ids.h" #include "worldserver.h" #include "water_map.h" +#include "npc_scale_manager.h" +#include "../common/say_link.h" #ifdef _WINDOWS #define snprintf _snprintf @@ -2753,58 +2755,6 @@ char *EntityList::RemoveNumbers(char *name) return name; } -void EntityList::ListNPCs(Client* client, const char *arg1, const char *arg2, uint8 searchtype) -{ - if (arg1 == 0) - searchtype = 0; - else if (arg2 == 0 && searchtype >= 2) - searchtype = 0; - uint32 x = 0; - uint32 z = 0; - char sName[36]; - - auto it = npc_list.begin(); - client->Message(0, "NPCs in the zone:"); - if (searchtype == 0) { - while (it != npc_list.end()) { - NPC *n = it->second; - - client->Message(0, " %5d: %s (%.0f, %0.f, %.0f)", n->GetID(), n->GetName(), n->GetX(), n->GetY(), n->GetZ()); - x++; - z++; - ++it; - } - } else if (searchtype == 1) { - client->Message(0, "Searching by name method. (%s)",arg1); - auto tmp = new char[strlen(arg1) + 1]; - strcpy(tmp, arg1); - strupr(tmp); - while (it != npc_list.end()) { - z++; - strcpy(sName, it->second->GetName()); - strupr(sName); - if (strstr(sName, tmp)) { - NPC *n = it->second; - client->Message(0, " %5d: %s (%.0f, %.0f, %.0f)", n->GetID(), n->GetName(), n->GetX(), n->GetY(), n->GetZ()); - x++; - } - ++it; - } - safe_delete_array(tmp); - } else if (searchtype == 2) { - client->Message(0, "Searching by number method. (%s %s)",arg1,arg2); - while (it != npc_list.end()) { - z++; - if ((it->second->GetID() >= atoi(arg1)) && (it->second->GetID() <= atoi(arg2)) && (atoi(arg1) <= atoi(arg2))) { - client->Message(0, " %5d: %s", it->second->GetID(), it->second->GetName()); - x++; - } - ++it; - } - } - client->Message(0, "%d npcs listed. There is a total of %d npcs in this zone.", x, z); -} - void EntityList::ListNPCCorpses(Client *client) { uint32 x = 0; diff --git a/zone/entity.h b/zone/entity.h index f32532392..c5d4ad2a5 100644 --- a/zone/entity.h +++ b/zone/entity.h @@ -382,7 +382,6 @@ public: void SendPetitionToAdmins(); void AddLootToNPCS(uint32 item_id, uint32 count); - void ListNPCs(Client* client, const char* arg1 = 0, const char* arg2 = 0, uint8 searchtype = 0); void ListNPCCorpses(Client* client); void ListPlayerCorpses(Client* client); int32 DeleteNPCCorpses(); diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp index 955b69d5e..5d9e2d95c 100644 --- a/zone/lua_general.cpp +++ b/zone/lua_general.cpp @@ -789,33 +789,29 @@ int lua_merchant_count_item(uint32 npc_id, uint32 item_id) { std::string lua_item_link(int item_id) { char text[250] = { 0 }; - quest_manager.varlink(text, item_id); - return std::string(text); + return quest_manager.varlink(text, item_id); } std::string lua_say_link(const char *phrase, bool silent, const char *link_name) { char text[256] = { 0 }; strncpy(text, phrase, 255); - quest_manager.saylink(text, silent, link_name); - return std::string(text); + return quest_manager.saylink(text, silent, link_name); } std::string lua_say_link(const char *phrase, bool silent) { char text[256] = { 0 }; strncpy(text, phrase, 255); - quest_manager.saylink(text, silent, text); - return std::string(text); + return quest_manager.saylink(text, silent, text); } std::string lua_say_link(const char *phrase) { char text[256] = { 0 }; strncpy(text, phrase, 255); - quest_manager.saylink(text, false, text); - return std::string(text); + return quest_manager.saylink(text, false, text); } std::string lua_get_data(std::string bucket_key) { diff --git a/zone/mob.cpp b/zone/mob.cpp index e4c7b5f26..90a999a0f 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -38,149 +38,153 @@ extern EntityList entity_list; extern Zone* zone; extern WorldServer worldserver; -Mob::Mob(const char* in_name, - const char* in_lastname, - int32 in_cur_hp, - int32 in_max_hp, - uint8 in_gender, - uint16 in_race, - uint8 in_class, - bodyType in_bodytype, - uint8 in_deity, - uint8 in_level, - uint32 in_npctype_id, - float in_size, - float in_runspeed, - const glm::vec4& position, - uint8 in_light, - uint8 in_texture, - uint8 in_helmtexture, - uint16 in_ac, - uint16 in_atk, - uint16 in_str, - uint16 in_sta, - uint16 in_dex, - uint16 in_agi, - uint16 in_int, - uint16 in_wis, - uint16 in_cha, - uint8 in_haircolor, - uint8 in_beardcolor, - uint8 in_eyecolor1, // the eyecolors always seem to be the same, maybe left and right eye? - uint8 in_eyecolor2, - uint8 in_hairstyle, - uint8 in_luclinface, - uint8 in_beard, - uint32 in_drakkin_heritage, - uint32 in_drakkin_tattoo, - uint32 in_drakkin_details, - EQEmu::TintProfile in_armor_tint, - uint8 in_aa_title, - uint8 in_see_invis, // see through invis/ivu - uint8 in_see_invis_undead, - uint8 in_see_hide, - uint8 in_see_improved_hide, - int32 in_hp_regen, - int32 in_mana_regen, - uint8 in_qglobal, - uint8 in_maxlevel, - uint32 in_scalerate, - uint8 in_armtexture, - uint8 in_bracertexture, - uint8 in_handtexture, - uint8 in_legtexture, - uint8 in_feettexture - ) : - attack_timer(2000), - attack_dw_timer(2000), - ranged_timer(2000), - tic_timer(6000), - mana_timer(2000), - spellend_timer(0), - rewind_timer(30000), - bindwound_timer(10000), - stunned_timer(0), - spun_timer(0), - bardsong_timer(6000), - gravity_timer(1000), - viral_timer(0), - m_FearWalkTarget(-999999.0f, -999999.0f, -999999.0f), - m_TargetLocation(glm::vec3()), - m_TargetV(glm::vec3()), - flee_timer(FLEE_CHECK_TIMER), - m_Position(position), - tmHidden(-1), - mitigation_ac(0), - m_specialattacks(eSpecialAttacks::None), - fix_z_timer(300), - fix_z_timer_engaged(100), - attack_anim_timer(1000), - position_update_melee_push_timer(500), - hate_list_cleanup_timer(6000) +Mob::Mob( + const char *in_name, + const char *in_lastname, + int32 in_cur_hp, + int32 in_max_hp, + uint8 in_gender, + uint16 in_race, + uint8 in_class, + bodyType in_bodytype, + uint8 in_deity, + uint8 in_level, + uint32 in_npctype_id, + float in_size, + float in_runspeed, + const glm::vec4 &position, + uint8 in_light, + uint8 in_texture, + uint8 in_helmtexture, + uint16 in_ac, + uint16 in_atk, + uint16 in_str, + uint16 in_sta, + uint16 in_dex, + uint16 in_agi, + uint16 in_int, + uint16 in_wis, + uint16 in_cha, + uint8 in_haircolor, + uint8 in_beardcolor, + uint8 in_eyecolor1, // the eyecolors always seem to be the same, maybe left and right eye? + uint8 in_eyecolor2, + uint8 in_hairstyle, + uint8 in_luclinface, + uint8 in_beard, + uint32 in_drakkin_heritage, + uint32 in_drakkin_tattoo, + uint32 in_drakkin_details, + EQEmu::TintProfile in_armor_tint, + uint8 in_aa_title, + uint8 in_see_invis, // see through invis/ivu + uint8 in_see_invis_undead, + uint8 in_see_hide, + uint8 in_see_improved_hide, + int32 in_hp_regen, + int32 in_mana_regen, + uint8 in_qglobal, + uint8 in_maxlevel, + uint32 in_scalerate, + uint8 in_armtexture, + uint8 in_bracertexture, + uint8 in_handtexture, + uint8 in_legtexture, + uint8 in_feettexture +) : + attack_timer(2000), + attack_dw_timer(2000), + ranged_timer(2000), + tic_timer(6000), + mana_timer(2000), + spellend_timer(0), + rewind_timer(30000), + bindwound_timer(10000), + stunned_timer(0), + spun_timer(0), + bardsong_timer(6000), + gravity_timer(1000), + viral_timer(0), + m_FearWalkTarget(-999999.0f, -999999.0f, -999999.0f), + m_TargetLocation(glm::vec3()), + m_TargetV(glm::vec3()), + flee_timer(FLEE_CHECK_TIMER), + m_Position(position), + tmHidden(-1), + mitigation_ac(0), + m_specialattacks(eSpecialAttacks::None), + fix_z_timer(300), + fix_z_timer_engaged(100), + attack_anim_timer(1000), + position_update_melee_push_timer(500), + hate_list_cleanup_timer(6000) { - targeted = 0; - tar_ndx = 0; - tar_vector = 0; + + targeted = 0; + tar_ndx = 0; + tar_vector = 0; currently_fleeing = false; last_major_update_position = m_Position; - is_distance_roamer = false; + is_distance_roamer = false; AI_Init(); SetMoving(false); - moved = false; + moved = false; m_RewindLocation = glm::vec3(); _egnode = nullptr; - name[0] = 0; - orig_name[0] = 0; + name[0] = 0; + orig_name[0] = 0; clean_name[0] = 0; - lastname[0] = 0; + lastname[0] = 0; if (in_name) { strn0cpy(name, in_name, 64); strn0cpy(orig_name, in_name, 64); } - if (in_lastname) + if (in_lastname) { strn0cpy(lastname, in_lastname, 64); - cur_hp = in_cur_hp; - max_hp = in_max_hp; - base_hp = in_max_hp; - gender = in_gender; - race = in_race; - base_gender = in_gender; - base_race = in_race; - class_ = in_class; - bodytype = in_bodytype; + } + cur_hp = in_cur_hp; + max_hp = in_max_hp; + base_hp = in_max_hp; + gender = in_gender; + race = in_race; + base_gender = in_gender; + base_race = in_race; + class_ = in_class; + bodytype = in_bodytype; orig_bodytype = in_bodytype; - deity = in_deity; - level = in_level; - orig_level = in_level; - npctype_id = in_npctype_id; - size = in_size; - base_size = size; - runspeed = in_runspeed; + deity = in_deity; + level = in_level; + orig_level = in_level; + npctype_id = in_npctype_id; + size = in_size; + base_size = size; + runspeed = in_runspeed; // neotokyo: sanity check - if (runspeed < 0 || runspeed > 20) + if (runspeed < 0 || runspeed > 20) { runspeed = 1.25f; - base_runspeed = (int)((float)runspeed * 40.0f); + } + base_runspeed = (int) ((float) runspeed * 40.0f); // clients if (runspeed == 0.7f) { - base_runspeed = 28; - walkspeed = 0.3f; + base_runspeed = 28; + walkspeed = 0.3f; base_walkspeed = 12; - fearspeed = 0.625f; + fearspeed = 0.625f; base_fearspeed = 25; // npcs } else { base_walkspeed = base_runspeed * 100 / 265; - walkspeed = ((float)base_walkspeed) * 0.025f; + walkspeed = ((float) base_walkspeed) * 0.025f; base_fearspeed = base_runspeed * 100 / 127; - fearspeed = ((float)base_fearspeed) * 0.025f; + fearspeed = ((float) base_fearspeed) * 0.025f; } last_hp_percent = 0; - last_hp = 0; + last_hp = 0; current_speed = base_runspeed; @@ -188,226 +192,223 @@ Mob::Mob(const char* in_name, // sanity check - if (runspeed < 0 || runspeed > 20) + if (runspeed < 0 || runspeed > 20) { runspeed = 1.25f; + } - m_Light.Type[EQEmu::lightsource::LightInnate] = in_light; + m_Light.Type[EQEmu::lightsource::LightInnate] = in_light; m_Light.Level[EQEmu::lightsource::LightInnate] = EQEmu::lightsource::TypeToLevel(m_Light.Type[EQEmu::lightsource::LightInnate]); - m_Light.Type[EQEmu::lightsource::LightActive] = m_Light.Type[EQEmu::lightsource::LightInnate]; + m_Light.Type[EQEmu::lightsource::LightActive] = m_Light.Type[EQEmu::lightsource::LightInnate]; m_Light.Level[EQEmu::lightsource::LightActive] = m_Light.Level[EQEmu::lightsource::LightInnate]; - texture = in_texture; - helmtexture = in_helmtexture; - armtexture = in_armtexture; + texture = in_texture; + helmtexture = in_helmtexture; + armtexture = in_armtexture; bracertexture = in_bracertexture; - handtexture = in_handtexture; - legtexture = in_legtexture; - feettexture = in_feettexture; - multitexture = (armtexture || bracertexture || handtexture || legtexture || feettexture); + handtexture = in_handtexture; + legtexture = in_legtexture; + feettexture = in_feettexture; + multitexture = (armtexture || bracertexture || handtexture || legtexture || feettexture); - haircolor = in_haircolor; - beardcolor = in_beardcolor; - eyecolor1 = in_eyecolor1; - eyecolor2 = in_eyecolor2; - hairstyle = in_hairstyle; - luclinface = in_luclinface; - beard = in_beard; - drakkin_heritage = in_drakkin_heritage; - drakkin_tattoo = in_drakkin_tattoo; - drakkin_details = in_drakkin_details; - attack_speed = 0; - attack_delay = 0; - slow_mitigation = 0; - findable = false; - trackable = true; - has_shieldequiped = false; + haircolor = in_haircolor; + beardcolor = in_beardcolor; + eyecolor1 = in_eyecolor1; + eyecolor2 = in_eyecolor2; + hairstyle = in_hairstyle; + luclinface = in_luclinface; + beard = in_beard; + drakkin_heritage = in_drakkin_heritage; + drakkin_tattoo = in_drakkin_tattoo; + drakkin_details = in_drakkin_details; + attack_speed = 0; + attack_delay = 0; + slow_mitigation = 0; + findable = false; + trackable = true; + has_shieldequiped = false; has_twohandbluntequiped = false; - has_twohanderequipped = false; - can_facestab = false; - has_numhits = false; - has_MGB = false; - has_ProjectIllusion = false; - SpellPowerDistanceMod = 0; - last_los_check = false; + has_twohanderequipped = false; + can_facestab = false; + has_numhits = false; + has_MGB = false; + has_ProjectIllusion = false; + SpellPowerDistanceMod = 0; + last_los_check = false; - if (in_aa_title > 0) + if (in_aa_title > 0) { aa_title = in_aa_title; - else + } + else { aa_title = 0xFF; - AC = in_ac; - ATK = in_atk; - STR = in_str; - STA = in_sta; - DEX = in_dex; - AGI = in_agi; - INT = in_int; - WIS = in_wis; - CHA = in_cha; - MR = CR = FR = DR = PR = Corrup = 0; + } - ExtraHaste = 0; - bEnraged = false; - - shield_target = nullptr; - current_mana = 0; - max_mana = 0; - hp_regen = in_hp_regen; - mana_regen = in_mana_regen; - ooc_regen = RuleI(NPC, OOCRegen); //default Out of Combat Regen - maxlevel = in_maxlevel; - scalerate = in_scalerate; - invisible = false; - invisible_undead = false; + AC = in_ac; + ATK = in_atk; + STR = in_str; + STA = in_sta; + DEX = in_dex; + AGI = in_agi; + INT = in_int; + WIS = in_wis; + CHA = in_cha; + MR = CR = FR = DR = PR = Corrup = 0; + ExtraHaste = 0; + bEnraged = false; + shield_target = nullptr; + current_mana = 0; + max_mana = 0; + hp_regen = in_hp_regen; + mana_regen = in_mana_regen; + ooc_regen = RuleI(NPC, OOCRegen); //default Out of Combat Regen + maxlevel = in_maxlevel; + scalerate = in_scalerate; + invisible = 0; + invisible_undead = false; invisible_animals = false; - sneaking = false; - hidden = false; - improved_hidden = false; - invulnerable = false; - IsFullHP = (cur_hp == max_hp); - qglobal = 0; - spawned = false; - rare_spawn = false; + sneaking = false; + hidden = false; + improved_hidden = false; + invulnerable = false; + IsFullHP = (cur_hp == max_hp); + qglobal = 0; + spawned = false; + rare_spawn = false; InitializeBuffSlots(); // clear the proc arrays - int i; - int j; - for (j = 0; j < MAX_PROCS; j++) - { - PermaProcs[j].spellID = SPELL_UNKNOWN; - PermaProcs[j].chance = 0; - PermaProcs[j].base_spellID = SPELL_UNKNOWN; - PermaProcs[j].level_override = -1; - SpellProcs[j].spellID = SPELL_UNKNOWN; - SpellProcs[j].chance = 0; - SpellProcs[j].base_spellID = SPELL_UNKNOWN; - SpellProcs[j].level_override = -1; - DefensiveProcs[j].spellID = SPELL_UNKNOWN; - DefensiveProcs[j].chance = 0; - DefensiveProcs[j].base_spellID = SPELL_UNKNOWN; + for (int j = 0; j < MAX_PROCS; j++) { + PermaProcs[j].spellID = SPELL_UNKNOWN; + PermaProcs[j].chance = 0; + PermaProcs[j].base_spellID = SPELL_UNKNOWN; + PermaProcs[j].level_override = -1; + SpellProcs[j].spellID = SPELL_UNKNOWN; + SpellProcs[j].chance = 0; + SpellProcs[j].base_spellID = SPELL_UNKNOWN; + SpellProcs[j].level_override = -1; + DefensiveProcs[j].spellID = SPELL_UNKNOWN; + DefensiveProcs[j].chance = 0; + DefensiveProcs[j].base_spellID = SPELL_UNKNOWN; DefensiveProcs[j].level_override = -1; - RangedProcs[j].spellID = SPELL_UNKNOWN; - RangedProcs[j].chance = 0; - RangedProcs[j].base_spellID = SPELL_UNKNOWN; - RangedProcs[j].level_override = -1; + RangedProcs[j].spellID = SPELL_UNKNOWN; + RangedProcs[j].chance = 0; + RangedProcs[j].base_spellID = SPELL_UNKNOWN; + RangedProcs[j].level_override = -1; } - for (i = EQEmu::textures::textureBegin; i < EQEmu::textures::materialCount; i++) - { + for (int i = EQEmu::textures::textureBegin; i < EQEmu::textures::materialCount; i++) { armor_tint.Slot[i].Color = in_armor_tint.Slot[i].Color; } std::fill(std::begin(m_spellHitsLeft), std::end(m_spellHitsLeft), 0); - m_Delta = glm::vec4(); + m_Delta = glm::vec4(); animation = 0; - logging_enabled = false; - isgrouped = false; + isgrouped = false; israidgrouped = false; IsHorse = false; entity_id_being_looted = 0; - _appearance = eaStanding; - pRunAnimSpeed = 0; + _appearance = eaStanding; + pRunAnimSpeed = 0; spellend_timer.Disable(); bardsong_timer.Disable(); - bardsong = 0; - bardsong_target_id = 0; - casting_spell_id = 0; - casting_spell_timer = 0; + bardsong = 0; + bardsong_target_id = 0; + casting_spell_id = 0; + casting_spell_timer = 0; casting_spell_timer_duration = 0; casting_spell_inventory_slot = 0; - casting_spell_aa_id = 0; - target = 0; + casting_spell_aa_id = 0; + target = 0; ActiveProjectileATK = false; - for (int i = 0; i < MAX_SPELL_PROJECTILE; i++) - { - ProjectileAtk[i].increment = 0; + for (int i = 0; i < MAX_SPELL_PROJECTILE; i++) { + ProjectileAtk[i].increment = 0; ProjectileAtk[i].hit_increment = 0; - ProjectileAtk[i].target_id = 0; - ProjectileAtk[i].wpn_dmg = 0; - ProjectileAtk[i].origin_x = 0.0f; - ProjectileAtk[i].origin_y = 0.0f; - ProjectileAtk[i].origin_z = 0.0f; - ProjectileAtk[i].tlast_x = 0.0f; - ProjectileAtk[i].tlast_y = 0.0f; - ProjectileAtk[i].ranged_id = 0; - ProjectileAtk[i].ammo_id = 0; - ProjectileAtk[i].ammo_slot = 0; - ProjectileAtk[i].skill = 0; - ProjectileAtk[i].speed_mod = 0.0f; + ProjectileAtk[i].target_id = 0; + ProjectileAtk[i].wpn_dmg = 0; + ProjectileAtk[i].origin_x = 0.0f; + ProjectileAtk[i].origin_y = 0.0f; + ProjectileAtk[i].origin_z = 0.0f; + ProjectileAtk[i].tlast_x = 0.0f; + ProjectileAtk[i].tlast_y = 0.0f; + ProjectileAtk[i].ranged_id = 0; + ProjectileAtk[i].ammo_id = 0; + ProjectileAtk[i].ammo_slot = 0; + ProjectileAtk[i].skill = 0; + ProjectileAtk[i].speed_mod = 0.0f; } memset(&itembonuses, 0, sizeof(StatBonuses)); memset(&spellbonuses, 0, sizeof(StatBonuses)); memset(&aabonuses, 0, sizeof(StatBonuses)); - spellbonuses.AggroRange = -1; + spellbonuses.AggroRange = -1; spellbonuses.AssistRange = -1; pLastChange = 0; SetPetID(0); SetOwnerID(0); - typeofpet = petNone; // default to not a pet - petpower = 0; - held = false; - gheld = false; - nocast = false; - focused = false; - pet_stop = false; - pet_regroup = false; - _IsTempPet = false; - pet_owner_client = false; + typeofpet = petNone; // default to not a pet + petpower = 0; + held = false; + gheld = false; + nocast = false; + focused = false; + pet_stop = false; + pet_regroup = false; + _IsTempPet = false; + pet_owner_client = false; pet_targetlock_id = 0; attacked_count = 0; - mezzed = false; - stunned = false; - silenced = false; - amnesiad = false; - inWater = false; + mezzed = false; + stunned = false; + silenced = false; + amnesiad = false; + inWater = false; int m; - for (m = 0; m < MAX_SHIELDERS; m++) - { - shielder[m].shielder_id = 0; + for (m = 0; m < MAX_SHIELDERS; m++) { + shielder[m].shielder_id = 0; shielder[m].shielder_bonus = 0; } destructibleobject = false; - wandertype = 0; - pausetype = 0; - cur_wp = 0; - m_CurrentWayPoint = glm::vec4(); - cur_wp_pause = 0; - patrol = 0; - follow_id = 0; - follow_dist = 100; // Default Distance for Follow - follow_run = true; // We can run if distance great enough - no_target_hotkey = false; - flee_mode = false; - currently_fleeing = false; + wandertype = 0; + pausetype = 0; + cur_wp = 0; + m_CurrentWayPoint = glm::vec4(); + cur_wp_pause = 0; + patrol = 0; + follow_id = 0; + follow_dist = 100; // Default Distance for Follow + follow_run = true; // We can run if distance great enough + no_target_hotkey = false; + flee_mode = false; + currently_fleeing = false; flee_timer.Start(); permarooted = (runspeed > 0) ? false : true; movetimercompleted = false; - ForcedMovement = 0; - roamer = false; - rooted = false; - charmed = false; - has_virus = false; - for (i = 0; i < MAX_SPELL_TRIGGER * 2; i++) { + ForcedMovement = 0; + roamer = false; + rooted = false; + charmed = false; + has_virus = false; + + for (int i = 0; i < MAX_SPELL_TRIGGER * 2; i++) { viral_spells[i] = 0; } - pStandingPetOrder = SPO_Follow; - pseudo_rooted = false; - see_invis = GetSeeInvisible(in_see_invis); - see_invis_undead = GetSeeInvisible(in_see_invis_undead); - see_hide = GetSeeInvisible(in_see_hide); + pStandingPetOrder = SPO_Follow; + pseudo_rooted = false; + + see_invis = GetSeeInvisible(in_see_invis); + see_invis_undead = GetSeeInvisible(in_see_invis_undead); + see_hide = GetSeeInvisible(in_see_hide); see_improved_hide = GetSeeInvisible(in_see_improved_hide); qglobal = in_qglobal != 0; @@ -416,12 +417,12 @@ Mob::Mob(const char* in_name, bindwound_timer.Disable(); bindwound_target = 0; - trade = new Trade(this); + trade = new Trade(this); // hp event - nexthpevent = -1; + nexthpevent = -1; nextinchpevent = -1; - hasTempPet = false; + hasTempPet = false; count_TempPet = 0; m_is_running = false; @@ -429,25 +430,31 @@ Mob::Mob(const char* in_name, nimbus_effect1 = 0; nimbus_effect2 = 0; nimbus_effect3 = 0; - m_targetable = true; + m_targetable = true; m_TargetRing = glm::vec3(); - flymode = FlyMode3; + flymode = FlyMode3; DistractedFromGrid = false; hate_list.SetHateOwner(this); m_AllowBeneficial = false; - m_DisableMelee = false; - for (int i = 0; i < EQEmu::skills::HIGHEST_SKILL + 2; i++) { SkillDmgTaken_Mod[i] = 0; } - for (int i = 0; i < HIGHEST_RESIST + 2; i++) { Vulnerability_Mod[i] = 0; } + m_DisableMelee = false; - emoteid = 0; - endur_upkeep = false; + for (int i = 0; i < EQEmu::skills::HIGHEST_SKILL + 2; i++) { + SkillDmgTaken_Mod[i] = 0; + } + + for (int i = 0; i < HIGHEST_RESIST + 2; i++) { + Vulnerability_Mod[i] = 0; + } + + emoteid = 0; + endur_upkeep = false; degenerating_effects = false; - PrimaryAggro = false; - AssistAggro = false; - npc_assist_cap = 0; + PrimaryAggro = false; + AssistAggro = false; + npc_assist_cap = 0; PathRecalcTimer.reset(new Timer(500)); PathingLoopCount = 0; @@ -830,6 +837,7 @@ int32 Mob::CalcMaxMana() { int32 Mob::CalcMaxHP() { max_hp = (base_hp + itembonuses.HP + spellbonuses.HP); max_hp += max_hp * ((aabonuses.MaxHPChange + spellbonuses.MaxHPChange + itembonuses.MaxHPChange) / 10000.0f); + return max_hp; } @@ -3466,24 +3474,31 @@ int Mob::GetHaste() return 100 + h; } -void Mob::SetTarget(Mob* mob) { - - if (target == mob) +void Mob::SetTarget(Mob *mob) +{ + if (target == mob) { return; + } target = mob; entity_list.UpdateHoTT(this); - - if(IsNPC()) + + if (IsNPC()) { parse->EventNPC(EVENT_TARGET_CHANGE, CastToNPC(), mob, "", 0); - else if (IsClient()) + } + else if (IsClient()) { parse->EventPlayer(EVENT_TARGET_CHANGE, CastToClient(), "", 0); - if(IsPet() && GetOwner() && GetOwner()->IsClient()) - GetOwner()->CastToClient()->UpdateXTargetType(MyPetTarget, mob); + this->DisplayInfo(mob); + } - if (this->IsClient() && this->GetTarget() && this->CastToClient()->hp_other_update_throttle_timer.Check()) + if (IsPet() && GetOwner() && GetOwner()->IsClient()) { + GetOwner()->CastToClient()->UpdateXTargetType(MyPetTarget, mob); + } + + if (this->IsClient() && this->GetTarget() && this->CastToClient()->hp_other_update_throttle_timer.Check()) { this->GetTarget()->SendHPUpdate(false, true); + } } // For when we want a Ground Z at a location we are not at yet @@ -5553,14 +5568,26 @@ bool Mob::HasSpellEffect(int effectid) return(0); } -int Mob::GetSpecialAbility(int ability) { - if(ability >= MAX_SPECIAL_ATTACK || ability < 0) { +int Mob::GetSpecialAbility(int ability) +{ + if (ability >= MAX_SPECIAL_ATTACK || ability < 0) { return 0; } return SpecialAbilities[ability].level; } +bool Mob::HasSpecialAbilities() +{ + for (int i = 0; i < MAX_SPECIAL_ATTACK; ++i) { + if (GetSpecialAbility(i)) { + return true; + } + } + + return false; +} + int Mob::GetSpecialAbilityParam(int ability, int param) { if(param >= MAX_SPECIAL_ATTACK_PARAMS || param < 0 || ability >= MAX_SPECIAL_ATTACK || ability < 0) { return 0; diff --git a/zone/mob.h b/zone/mob.h index 59b4a5079..120b89539 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -166,6 +166,10 @@ public: bool is_distance_roamer; + void DisplayInfo(Mob *mob); + +public: + //Somewhat sorted: needs documenting! //Attack @@ -1049,6 +1053,7 @@ public: inline bool Sanctuary() const { return spellbonuses.Sanctuary; } bool HasNPCSpecialAtk(const char* parse); + bool HasSpecialAbilities(); int GetSpecialAbility(int ability); int GetSpecialAbilityParam(int ability, int param); void SetSpecialAbility(int ability, int level); @@ -1146,6 +1151,8 @@ public: int GetWeaponDamage(Mob *against, const EQEmu::ItemData *weapon_item); int GetWeaponDamage(Mob *against, const EQEmu::ItemInstance *weapon_item, uint32 *hate = nullptr); + int32 GetHPRegen() const; + // Bots HealRotation methods #ifdef BOTS bool IsHealRotationTarget() { return (m_target_of_heal_rotation.use_count() && m_target_of_heal_rotation.get()); } @@ -1476,7 +1483,6 @@ protected: bool pAIControlled; bool roamer; - bool logging_enabled; int wandertype; int pausetype; diff --git a/zone/mob_info.cpp b/zone/mob_info.cpp new file mode 100644 index 000000000..7ae249393 --- /dev/null +++ b/zone/mob_info.cpp @@ -0,0 +1,367 @@ +/** + * EQEmulator: Everquest Server Emulator + * Copyright (C) 2001-2018 EQEmulator Development Team (https://github.com/EQEmu/Server) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY except by those people which sell it, which + * are required to give you total support for your newly bought product; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR + * A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include "client.h" +#include "mob.h" +#include "../common/races.h" +#include "../common/say_link.h" + +inline std::string GetMobAttributeByString(Mob *mob, const std::string &attribute) +{ + if (attribute == "ac") { + return std::to_string(mob->GetAC()); + } + + if (attribute == "atk") { + return std::to_string(mob->GetATK()); + } + + if (attribute == "end") { + int endurance = 0; + if (mob->IsClient()) { + endurance = mob->CastToClient()->GetEndurance(); + } + + return std::to_string(endurance); + } + + if (attribute == "hp") { + return std::to_string(mob->GetHP()); + } + + if (attribute == "mana") { + return std::to_string(mob->GetMana()); + } + + if (attribute == "str") { + return std::to_string(mob->GetSTR()); + } + + if (attribute == "sta") { + return std::to_string(mob->GetSTA()); + } + + if (attribute == "dex") { + return std::to_string(mob->GetDEX()); + } + + if (attribute == "agi") { + return std::to_string(mob->GetAGI()); + } + + if (attribute == "int") { + return std::to_string(mob->GetINT()); + } + + if (attribute == "wis") { + return std::to_string(mob->GetWIS()); + } + + if (attribute == "cha") { + return std::to_string(mob->GetCHA()); + } + + if (attribute == "mr") { + return std::to_string(mob->GetMR()); + } + + if (attribute == "cr") { + return std::to_string(mob->GetCR()); + } + + if (attribute == "fr") { + return std::to_string(mob->GetFR()); + } + + if (attribute == "pr") { + return std::to_string(mob->GetPR()); + } + + if (attribute == "dr") { + return std::to_string(mob->GetDR()); + } + + if (attribute == "cr") { + return std::to_string(mob->GetCR()); + } + + if (attribute == "pr") { + return std::to_string(mob->GetPR()); + } + + if (attribute == "cor") { + return std::to_string(mob->GetCorrup()); + } + + if (attribute == "phy") { + return std::to_string(mob->GetPhR()); + } + + if (attribute == "name") { + return mob->GetCleanName(); + } + + if (attribute == "lastname") { + return mob->GetLastName(); + } + + if (attribute == "race") { + return GetRaceIDName(mob->GetRace()); + } + + if (attribute == "class") { + return GetClassIDName(mob->GetClass(), 0); + } + + if (attribute == "level") { + return std::to_string(mob->GetLevel()); + } + + if (mob->IsNPC()) { + NPC *npc = mob->CastToNPC(); + + if (attribute == "npcid") { + return std::to_string(npc->GetNPCTypeID()); + } + if (attribute == "texture") { + return std::to_string(npc->GetTexture()); + } + if (attribute == "bodytype") { + return std::to_string(npc->GetBodyType()); + } + if (attribute == "gender") { + return std::to_string(npc->GetGender()); + } + if (attribute == "size") { + return std::to_string(npc->GetSize()); + } + if (attribute == "runspeed") { + return std::to_string(npc->GetRunspeed()); + } + if (attribute == "walkspeed") { + return std::to_string(npc->GetWalkspeed()); + } + if (attribute == "spawngroup") { + return std::to_string(npc->GetSp2()); + } + if (attribute == "grid") { + return std::to_string(npc->GetGrid()); + } + if (attribute == "emote") { + return std::to_string(npc->GetEmoteID()); + } + npc->GetNPCEmote(npc->GetEmoteID(), 0); + } + + if (attribute == "type") { + std::string entity_type = "Mob"; + + if (mob->IsCorpse()) { + entity_type = "Corpse"; + } + + if (mob->IsNPC()) { + entity_type = "NPC"; + } + + if (mob->IsClient()) { + entity_type = "Client"; + } + + return entity_type; + } + + return "null"; +} + +inline std::string WriteDisplayInfoSection( + Mob *mob, + const std::string §ion_name, + std::vector attributes_list, + int column_count = 3, + bool display_section_name = false +) +{ + std::string text; + + if (display_section_name) { + text += "" + section_name + "
"; + } + + text += ""; + + int index = 0; + bool first_row = true; + + for (const auto &attribute : attributes_list) { + if (index == 0) { + if (first_row) { + text += "\n"; + first_row = false; + } + else { + text += "\n"; + } + + } + + std::string attribute_name = attribute; + if (attribute_name.length() <= 3) { + attribute_name = str_toupper(attribute_name); + } + if (attribute_name.length() > 3) { + attribute_name = ucfirst(attribute_name); + } + + std::string attribute_value = GetMobAttributeByString(mob, attribute); + + if (attribute_value.length() <= 0) { + continue; + } + + text += ""; + + if (index == column_count) { + index = 0; + continue; + } + + index++; + } + + text += "
" + attribute_name + "" + GetMobAttributeByString(mob, attribute) + "
"; + + return text; +} + +inline void NPCCommandsMenu(Client* client, NPC* npc) +{ + std::string menu_commands; + + if (npc->GetGrid() > 0) { + menu_commands += EQEmu::SayLinkEngine::GenerateQuestSaylink("#grid show", false, "Grid Points") + " "; + } + + if (npc->GetEmoteID() > 0) { + std::string saylink = StringFormat("#emotesearch %u", npc->GetEmoteID()); + menu_commands += EQEmu::SayLinkEngine::GenerateQuestSaylink(saylink, false, "Emotes") + " "; + } + + if (menu_commands.length() > 0) { + client->Message(0, "# Show Commmands"); + client->Message(0, " - %s", menu_commands.c_str()); + } +} + +void Mob::DisplayInfo(Mob *mob) +{ + if (!this || !mob) { + return; + } + + // std::vector general_stats = { +// + // // "accuracy", + // // "slow_mitigation", + // // "atk", + // // "min_hit", + // // "max_hit", + // // "hp_regen", + // // "attack_delay", + // // "special_abilities" + // }; + + if (this->IsClient()) { + std::string window_text = "*Drag / Maximize Window to see all info

"; + + Client *client = this->CastToClient(); + + std::vector who_attributes = { + "name", + "lastname", + }; + window_text += WriteDisplayInfoSection(mob, "Who", who_attributes, 1, false); + + std::vector type_attributes = { + "race", + "class", + "type" + }; + window_text += WriteDisplayInfoSection(mob, "Type", type_attributes, 3, true); + + std::vector basic_attributes = { + "level", + "hp", + "mana", + "end", + "ac", + "atk" + }; + window_text += WriteDisplayInfoSection(mob, "Main", basic_attributes, 7, true); + + std::vector stat_attributes = { + "str", + "sta", + "agi", + "dex", + "wis", + "int", + "cha", + }; + window_text += WriteDisplayInfoSection(mob, "Statistics", stat_attributes, 7, true); + + std::vector resist_attributes = { + "pr", + "mr", + "dr", + "fr", + "cr", + "cor", + "phy", + }; + window_text += WriteDisplayInfoSection(mob, "Resists", resist_attributes, 7, true); + + if (mob->IsNPC()) { + std::vector npc_attributes = { + "npcid", + "texture", + "bodytype", + "gender", + "size", + "runspeed", + "walkspeed", + "spawngroup", + "grid", + "emote", + }; + window_text += WriteDisplayInfoSection(mob, "NPC Attributes", npc_attributes, 2, true); + + client->Message(0, " "); + mob->CastToNPC()->QueryLoot(client); + + NPCCommandsMenu(client, mob->CastToNPC()); + } + + std::cout << "Window Length: " << window_text.length() << std::endl; + // std::cout << "Window " << window_text << std::endl; + + client->SendPopupToClient("Entity Info", window_text.c_str()); + } +} diff --git a/zone/net.cpp b/zone/net.cpp index f51d50bb4..6f0bfbf9a 100644 --- a/zone/net.cpp +++ b/zone/net.cpp @@ -42,7 +42,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "../common/spdat.h" #include "../common/eqemu_logsys.h" - #include "zone_config.h" #include "masterentity.h" #include "worldserver.h" @@ -62,6 +61,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "embparser.h" #include "lua_parser.h" #include "questmgr.h" +#include "npc_scale_manager.h" #include "../common/event/event_loop.h" #include "../common/event/timer.h" @@ -104,6 +104,7 @@ npcDecayTimes_Struct npcCorpseDecayTimes[100]; TitleManager title_manager; QueryServ *QServ = 0; TaskManager *taskmanager = 0; +NpcScaleManager *npc_scale_manager; QuestParserCollection *parse = 0; EQEmuLogSys LogSys; const SPDat_Spell_Struct* spells; @@ -222,7 +223,6 @@ int main(int argc, char** argv) { worldserver.SetLauncherName("NONE"); } - Log(Logs::General, Logs::Zone_Server, "Connecting to MySQL..."); if (!database.Connect( Config->DatabaseHost.c_str(), @@ -255,6 +255,12 @@ int main(int argc, char** argv) { guild_mgr.SetDatabase(&database); GuildBanks = nullptr; + /** + * NPC Scale Manager + */ + npc_scale_manager = new NpcScaleManager; + npc_scale_manager->LoadScaleData(); + #ifdef _EQDEBUG _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); #endif diff --git a/zone/npc.cpp b/zone/npc.cpp index 2b1af6de9..bd5de40b1 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -39,6 +39,7 @@ #include "spawn2.h" #include "zone.h" #include "quest_parser_collection.h" +#include "npc_scale_manager.h" #include #include @@ -57,250 +58,237 @@ extern Zone* zone; extern volatile bool is_zone_loaded; extern EntityList entity_list; -NPC::NPC(const NPCType* d, Spawn2* in_respawn, const glm::vec4& position, int iflymode, bool IsCorpse) -: Mob(d->name, - d->lastname, - d->max_hp, - d->max_hp, - d->gender, - d->race, - d->class_, - (bodyType)d->bodytype, - d->deity, - d->level, - d->npc_id, - d->size, - d->runspeed, - position, - d->light, // innate_light - d->texture, - d->helmtexture, - d->AC, - d->ATK, - d->STR, - d->STA, - d->DEX, - d->AGI, - d->INT, - d->WIS, - d->CHA, - d->haircolor, - d->beardcolor, - d->eyecolor1, - d->eyecolor2, - d->hairstyle, - d->luclinface, - d->beard, - d->drakkin_heritage, - d->drakkin_tattoo, - d->drakkin_details, - d->armor_tint, - 0, - d->see_invis, // pass see_invis/see_ivu flags to mob constructor - d->see_invis_undead, - d->see_hide, - d->see_improved_hide, - d->hp_regen, - d->mana_regen, - d->qglobal, - d->maxlevel, - d->scalerate, - d->armtexture, - d->bracertexture, - d->handtexture, - d->legtexture, - d->feettexture), - attacked_timer(CombatEventTimer_expire), - swarm_timer(100), - classattack_timer(1000), - knightattack_timer(1000), - assist_timer(AIassistcheck_delay), - qglobal_purge_timer(30000), - send_hp_update_timer(2000), - enraged_timer(1000), - taunt_timer(TauntReuseTime * 1000), - m_SpawnPoint(position), - m_GuardPoint(-1,-1,-1,0), - m_GuardPointSaved(0,0,0,0) +NPC::NPC(const NPCType *npc_type_data, Spawn2 *in_respawn, const glm::vec4 &position, int iflymode, bool IsCorpse) + : Mob( + npc_type_data->name, + npc_type_data->lastname, + npc_type_data->max_hp, + npc_type_data->max_hp, + npc_type_data->gender, + npc_type_data->race, + npc_type_data->class_, + (bodyType) npc_type_data->bodytype, + npc_type_data->deity, + npc_type_data->level, + npc_type_data->npc_id, + npc_type_data->size, + npc_type_data->runspeed, + position, + npc_type_data->light, // innate_light + npc_type_data->texture, + npc_type_data->helmtexture, + npc_type_data->AC, + npc_type_data->ATK, + npc_type_data->STR, + npc_type_data->STA, + npc_type_data->DEX, + npc_type_data->AGI, + npc_type_data->INT, + npc_type_data->WIS, + npc_type_data->CHA, + npc_type_data->haircolor, + npc_type_data->beardcolor, + npc_type_data->eyecolor1, + npc_type_data->eyecolor2, + npc_type_data->hairstyle, + npc_type_data->luclinface, + npc_type_data->beard, + npc_type_data->drakkin_heritage, + npc_type_data->drakkin_tattoo, + npc_type_data->drakkin_details, + npc_type_data->armor_tint, + 0, + npc_type_data->see_invis, // pass see_invis/see_ivu flags to mob constructor + npc_type_data->see_invis_undead, + npc_type_data->see_hide, + npc_type_data->see_improved_hide, + npc_type_data->hp_regen, + npc_type_data->mana_regen, + npc_type_data->qglobal, + npc_type_data->maxlevel, + npc_type_data->scalerate, + npc_type_data->armtexture, + npc_type_data->bracertexture, + npc_type_data->handtexture, + npc_type_data->legtexture, + npc_type_data->feettexture +), + attacked_timer(CombatEventTimer_expire), + swarm_timer(100), + classattack_timer(1000), + knightattack_timer(1000), + assist_timer(AIassistcheck_delay), + qglobal_purge_timer(30000), + send_hp_update_timer(2000), + enraged_timer(1000), + taunt_timer(TauntReuseTime * 1000), + m_SpawnPoint(position), + m_GuardPoint(-1, -1, -1, 0), + m_GuardPointSaved(0, 0, 0, 0) { //What is the point of this, since the names get mangled.. - Mob* mob = entity_list.GetMob(name); - if(mob != 0) + Mob *mob = entity_list.GetMob(name); + if (mob != nullptr) { entity_list.RemoveEntity(mob->GetID()); + } - int moblevel=GetLevel(); + int moblevel = GetLevel(); - NPCTypedata = d; + NPCTypedata = npc_type_data; NPCTypedata_ours = nullptr; - respawn2 = in_respawn; + respawn2 = in_respawn; + swarm_timer.Disable(); - if (size <= 0.0f) + if (size <= 0.0f) { size = GetRaceGenderDefaultHeight(race, gender); + } - taunting = false; - proximity = nullptr; - copper = 0; - silver = 0; - gold = 0; - platinum = 0; - max_dmg = d->max_dmg; - min_dmg = d->min_dmg; - attack_count = d->attack_count; - grid = 0; - wp_m = 0; - max_wp=0; - save_wp = 0; - spawn_group = 0; + taunting = false; + proximity = nullptr; + copper = 0; + silver = 0; + gold = 0; + platinum = 0; + max_dmg = npc_type_data->max_dmg; + min_dmg = npc_type_data->min_dmg; + attack_count = npc_type_data->attack_count; + grid = 0; + wp_m = 0; + max_wp = 0; + save_wp = 0; + spawn_group = 0; swarmInfoPtr = nullptr; - spellscale = d->spellscale; - healscale = d->healscale; - - logging_enabled = NPC_DEFAULT_LOGGING_ENABLED; - - pAggroRange = d->aggroradius; - pAssistRange = d->assistradius; - findable = d->findable; - trackable = d->trackable; - - MR = d->MR; - CR = d->CR; - DR = d->DR; - FR = d->FR; - PR = d->PR; - Corrup = d->Corrup; - PhR = d->PhR; - - STR = d->STR; - STA = d->STA; - AGI = d->AGI; - DEX = d->DEX; - INT = d->INT; - WIS = d->WIS; - CHA = d->CHA; - npc_mana = d->Mana; + spellscale = npc_type_data->spellscale; + healscale = npc_type_data->healscale; + pAggroRange = npc_type_data->aggroradius; + pAssistRange = npc_type_data->assistradius; + findable = npc_type_data->findable; + trackable = npc_type_data->trackable; + MR = npc_type_data->MR; + CR = npc_type_data->CR; + DR = npc_type_data->DR; + FR = npc_type_data->FR; + PR = npc_type_data->PR; + Corrup = npc_type_data->Corrup; + PhR = npc_type_data->PhR; + STR = npc_type_data->STR; + STA = npc_type_data->STA; + AGI = npc_type_data->AGI; + DEX = npc_type_data->DEX; + INT = npc_type_data->INT; + WIS = npc_type_data->WIS; + CHA = npc_type_data->CHA; + npc_mana = npc_type_data->Mana; //quick fix of ordering if they screwed it up in the DB - if(max_dmg < min_dmg) { + if (max_dmg < min_dmg) { int tmp = min_dmg; min_dmg = max_dmg; max_dmg = tmp; } // Max Level and Stat Scaling if maxlevel is set - if(maxlevel > level) - { + if (maxlevel > level) { LevelScale(); } - // Set Resists if they are 0 in the DB - CalcNPCResists(); - - // Set Mana and HP Regen Rates if they are 0 in the DB - CalcNPCRegen(); - - // Set Min and Max Damage if they are 0 in the DB - if(max_dmg == 0){ - CalcNPCDamage(); - } - - base_damage = round((max_dmg - min_dmg) / 1.9); - min_damage = min_dmg - round(base_damage / 10.0); - - accuracy_rating = d->accuracy_rating; - avoidance_rating = d->avoidance_rating; - ATK = d->ATK; + base_damage = round((max_dmg - min_dmg) / 1.9); + min_damage = min_dmg - round(base_damage / 10.0); + accuracy_rating = npc_type_data->accuracy_rating; + avoidance_rating = npc_type_data->avoidance_rating; + ATK = npc_type_data->ATK; // used for when switch back to charm - default_ac = d->AC; - default_min_dmg = min_dmg; - default_max_dmg = max_dmg; - default_attack_delay = d->attack_delay; - default_accuracy_rating = d->accuracy_rating; - default_avoidance_rating = d->avoidance_rating; - default_atk = d->ATK; + default_ac = npc_type_data->AC; + default_min_dmg = min_dmg; + default_max_dmg = max_dmg; + default_attack_delay = npc_type_data->attack_delay; + default_accuracy_rating = npc_type_data->accuracy_rating; + default_avoidance_rating = npc_type_data->avoidance_rating; + default_atk = npc_type_data->ATK; // used for when getting charmed, if 0, doesn't swap - charm_ac = d->charm_ac; - charm_min_dmg = d->charm_min_dmg; - charm_max_dmg = d->charm_max_dmg; - charm_attack_delay = d->charm_attack_delay; - charm_accuracy_rating = d->charm_accuracy_rating; - charm_avoidance_rating = d->charm_avoidance_rating; - charm_atk = d->charm_atk; + charm_ac = npc_type_data->charm_ac; + charm_min_dmg = npc_type_data->charm_min_dmg; + charm_max_dmg = npc_type_data->charm_max_dmg; + charm_attack_delay = npc_type_data->charm_attack_delay; + charm_accuracy_rating = npc_type_data->charm_accuracy_rating; + charm_avoidance_rating = npc_type_data->charm_avoidance_rating; + charm_atk = npc_type_data->charm_atk; CalcMaxMana(); SetMana(GetMaxMana()); - MerchantType = d->merchanttype; - merchant_open = GetClass() == MERCHANT; - adventure_template_id = d->adventure_template; - flymode = iflymode; - guard_anim = eaStanding; - roambox_distance = 0; - roambox_max_x = -2; - roambox_max_y = -2; - roambox_min_x = -2; - roambox_min_y = -2; + MerchantType = npc_type_data->merchanttype; + merchant_open = GetClass() == MERCHANT; + adventure_template_id = npc_type_data->adventure_template; + flymode = iflymode; + guard_anim = eaStanding; + roambox_distance = 0; + roambox_max_x = -2; + roambox_max_y = -2; + roambox_min_x = -2; + roambox_min_y = -2; roambox_destination_x = -2; roambox_destination_y = -2; - roambox_min_delay = 1000; - roambox_delay = 1000; - p_depop = false; - loottable_id = d->loottable_id; - skip_global_loot = d->skip_global_loot; - rare_spawn = d->rare_spawn; + roambox_min_delay = 1000; + roambox_delay = 1000; + p_depop = false; + loottable_id = npc_type_data->loottable_id; + skip_global_loot = npc_type_data->skip_global_loot; + rare_spawn = npc_type_data->rare_spawn; + no_target_hotkey = npc_type_data->no_target_hotkey; + primary_faction = 0; - no_target_hotkey = d->no_target_hotkey; + SetNPCFactionID(npc_type_data->npc_faction_id); - primary_faction = 0; - SetNPCFactionID(d->npc_faction_id); - - npc_spells_id = 0; - HasAISpell = false; - HasAISpellEffects = false; + npc_spells_id = 0; + HasAISpell = false; + HasAISpellEffects = false; innate_proc_spell_id = 0; - if(GetClass() == MERCERNARY_MASTER && RuleB(Mercs, AllowMercs)) - { + if (GetClass() == MERCERNARY_MASTER && RuleB(Mercs, AllowMercs)) { LoadMercTypes(); LoadMercs(); } - SpellFocusDMG = 0; + SpellFocusDMG = 0; SpellFocusHeal = 0; pet_spell_id = 0; - delaytimer = false; - combat_event = false; - attack_speed = d->attack_speed; - attack_delay = d->attack_delay; - slow_mitigation = d->slow_mitigation; + delaytimer = false; + combat_event = false; + attack_speed = npc_type_data->attack_speed; + attack_delay = npc_type_data->attack_delay; + slow_mitigation = npc_type_data->slow_mitigation; EntityList::RemoveNumbers(name); entity_list.MakeNameUnique(name); - npc_aggro = d->npc_aggro; + npc_aggro = npc_type_data->npc_aggro; AI_Init(); AI_Start(); - d_melee_texture1 = d->d_melee_texture1; - d_melee_texture2 = d->d_melee_texture2; - herosforgemodel = d->herosforgemodel; + d_melee_texture1 = npc_type_data->d_melee_texture1; + d_melee_texture2 = npc_type_data->d_melee_texture2; + herosforgemodel = npc_type_data->herosforgemodel; - ammo_idfile = d->ammo_idfile; + ammo_idfile = npc_type_data->ammo_idfile; memset(equipment, 0, sizeof(equipment)); - prim_melee_type = d->prim_melee_type; - sec_melee_type = d->sec_melee_type; - ranged_type = d->ranged_type; + prim_melee_type = npc_type_data->prim_melee_type; + sec_melee_type = npc_type_data->sec_melee_type; + ranged_type = npc_type_data->ranged_type; // If Melee Textures are not set, set attack type to Hand to Hand as default - if(!d_melee_texture1) + if (!d_melee_texture1) { prim_melee_type = 28; - if(!d_melee_texture2) + } + if (!d_melee_texture2) { sec_melee_type = 28; + } //give NPCs skill values... int r; @@ -312,106 +300,87 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, const glm::vec4& position, int if // the theory of needing to be able to set skills for each mob separately if (moblevel > 50) { skills[EQEmu::skills::SkillDoubleAttack] = 250; - skills[EQEmu::skills::SkillDualWield] = 250; - } else if (moblevel > 3) { + skills[EQEmu::skills::SkillDualWield] = 250; + } + else if (moblevel > 3) { skills[EQEmu::skills::SkillDoubleAttack] = moblevel * 5; - skills[EQEmu::skills::SkillDualWield] = skills[EQEmu::skills::SkillDoubleAttack]; - } else { + skills[EQEmu::skills::SkillDualWield] = skills[EQEmu::skills::SkillDoubleAttack]; + } + else { skills[EQEmu::skills::SkillDoubleAttack] = moblevel * 5; } - if(d->trap_template > 0) - { - std::map >::iterator trap_ent_iter; - std::list trap_list; + ldon_trapped = false; + ldon_trap_type = 0; + ldon_spell_id = 0; + ldon_locked = false; + ldon_locked_skill = 0; + ldon_trap_detected = false; - trap_ent_iter = zone->ldon_trap_entry_list.find(d->trap_template); - if(trap_ent_iter != zone->ldon_trap_entry_list.end()) - { + if (npc_type_data->trap_template > 0) { + std::map >::iterator trap_ent_iter; + std::list trap_list; + + trap_ent_iter = zone->ldon_trap_entry_list.find(npc_type_data->trap_template); + if (trap_ent_iter != zone->ldon_trap_entry_list.end()) { trap_list = trap_ent_iter->second; - if(trap_list.size() > 0) - { + if (trap_list.size() > 0) { auto trap_list_iter = trap_list.begin(); std::advance(trap_list_iter, zone->random.Int(0, trap_list.size() - 1)); - LDoNTrapTemplate* tt = (*trap_list_iter); - if(tt) - { - if((uint8)tt->spell_id > 0) - { - ldon_trapped = true; - ldon_spell_id = tt->spell_id; + LDoNTrapTemplate *trap_template = (*trap_list_iter); + if (trap_template) { + if ((uint8) trap_template->spell_id > 0) { + ldon_trapped = true; + ldon_spell_id = trap_template->spell_id; } - else - { - ldon_trapped = false; + else { + ldon_trapped = false; ldon_spell_id = 0; } - ldon_trap_type = (uint8)tt->type; - if(tt->locked > 0) - { - ldon_locked = true; - ldon_locked_skill = tt->skill; + ldon_trap_type = (uint8) trap_template->type; + if (trap_template->locked > 0) { + ldon_locked = true; + ldon_locked_skill = trap_template->skill; } - else - { - ldon_locked = false; + else { + ldon_locked = false; ldon_locked_skill = 0; } + ldon_trap_detected = 0; } } - else - { - ldon_trapped = false; - ldon_trap_type = 0; - ldon_spell_id = 0; - ldon_locked = false; - ldon_locked_skill = 0; - ldon_trap_detected = 0; - } - } - else - { - ldon_trapped = false; - ldon_trap_type = 0; - ldon_spell_id = 0; - ldon_locked = false; - ldon_locked_skill = 0; - ldon_trap_detected = 0; } } - else - { - ldon_trapped = false; - ldon_trap_type = 0; - ldon_spell_id = 0; - ldon_locked = false; - ldon_locked_skill = 0; - ldon_trap_detected = 0; - } + reface_timer = new Timer(15000); reface_timer->Disable(); + qGlobals = nullptr; - SetEmoteID(d->emoteid); + + SetEmoteID(static_cast(npc_type_data->emoteid)); InitializeBuffSlots(); CalcBonuses(); - raid_target = d->raid_target; - ignore_despawn = d->ignore_despawn; - m_targetable = !d->untargetable; - AISpellVar.fail_recast = RuleI(Spells, AI_SpellCastFinishedFailRecast); - AISpellVar.engaged_no_sp_recast_min = RuleI(Spells, AI_EngagedNoSpellMinRecast); - AISpellVar.engaged_no_sp_recast_max = RuleI(Spells, AI_EngagedNoSpellMaxRecast); - AISpellVar.engaged_beneficial_self_chance = RuleI(Spells, AI_EngagedBeneficialSelfChance); - AISpellVar.engaged_beneficial_other_chance = RuleI(Spells, AI_EngagedBeneficialOtherChance); - AISpellVar.engaged_detrimental_chance = RuleI(Spells, AI_EngagedDetrimentalChance); - AISpellVar.pursue_no_sp_recast_min = RuleI(Spells, AI_PursueNoSpellMinRecast); - AISpellVar.pursue_no_sp_recast_max = RuleI(Spells, AI_PursueNoSpellMaxRecast); - AISpellVar.pursue_detrimental_chance = RuleI(Spells, AI_PursueDetrimentalChance); - AISpellVar.idle_no_sp_recast_min = RuleI(Spells, AI_IdleNoSpellMinRecast); - AISpellVar.idle_no_sp_recast_max = RuleI(Spells, AI_IdleNoSpellMaxRecast); - AISpellVar.idle_beneficial_chance = RuleI(Spells, AI_IdleBeneficialChance); + raid_target = npc_type_data->raid_target; + ignore_despawn = npc_type_data->ignore_despawn; + m_targetable = !npc_type_data->untargetable; + + npc_scale_manager->ScaleMob(this); + + AISpellVar.fail_recast = static_cast(RuleI(Spells, AI_SpellCastFinishedFailRecast)); + AISpellVar.engaged_no_sp_recast_min = static_cast(RuleI(Spells, AI_EngagedNoSpellMinRecast)); + AISpellVar.engaged_no_sp_recast_max = static_cast(RuleI(Spells, AI_EngagedNoSpellMaxRecast)); + AISpellVar.engaged_beneficial_self_chance = static_cast (RuleI(Spells, AI_EngagedBeneficialSelfChance)); + AISpellVar.engaged_beneficial_other_chance = static_cast (RuleI(Spells, AI_EngagedBeneficialOtherChance)); + AISpellVar.engaged_detrimental_chance = static_cast (RuleI(Spells, AI_EngagedDetrimentalChance)); + AISpellVar.pursue_no_sp_recast_min = static_cast(RuleI(Spells, AI_PursueNoSpellMinRecast)); + AISpellVar.pursue_no_sp_recast_max = static_cast(RuleI(Spells, AI_PursueNoSpellMaxRecast)); + AISpellVar.pursue_detrimental_chance = static_cast (RuleI(Spells, AI_PursueDetrimentalChance)); + AISpellVar.idle_no_sp_recast_min = static_cast(RuleI(Spells, AI_IdleNoSpellMinRecast)); + AISpellVar.idle_no_sp_recast_max = static_cast(RuleI(Spells, AI_IdleNoSpellMaxRecast)); + AISpellVar.idle_beneficial_chance = static_cast (RuleI(Spells, AI_IdleBeneficialChance)); } NPC::~NPC() @@ -582,10 +551,10 @@ void NPC::ClearItemList() { void NPC::QueryLoot(Client* to) { - to->Message(0, "Coin: %ip %ig %is %ic", platinum, gold, silver, copper); + to->Message(0, "# Loot %s", GetName()); - int x = 0; - for (auto cur = itemlist.begin(); cur != itemlist.end(); ++cur, ++x) { + int item_count = 0; + for (auto cur = itemlist.begin(); cur != itemlist.end(); ++cur, ++item_count) { if (!(*cur)) { Log(Logs::General, Logs::Error, "NPC::QueryLoot() - ItemList error, null item"); continue; @@ -599,10 +568,18 @@ void NPC::QueryLoot(Client* to) linker.SetLinkType(EQEmu::saylink::SayLinkLootItem); linker.SetLootData(*cur); - to->Message(0, "%s, ID: %u, Level: (min: %u, max: %u)", linker.GenerateLink().c_str(), (*cur)->item_id, (*cur)->min_level, (*cur)->max_level); + to->Message( + 0, + "-- Item %i: %s ID: %u min_level: %u max_level: %u", + item_count, + linker.GenerateLink().c_str(), + (*cur)->item_id, + (*cur)->min_level, + (*cur)->max_level + ); } - to->Message(0, "%i items on %s.", x, GetName()); + to->Message(0, "- %i Platinum %i Gold %i Silver %i Copper", platinum, gold, silver, copper); } void NPC::AddCash(uint16 in_copper, uint16 in_silver, uint16 in_gold, uint16 in_platinum) { @@ -627,10 +604,11 @@ void NPC::AddCash(uint16 in_copper, uint16 in_silver, uint16 in_gold, uint16 in_ platinum = 0; } -void NPC::AddCash() { - copper = zone->random.Int(1, 100); - silver = zone->random.Int(1, 50); - gold = zone->random.Int(1, 10); +void NPC::AddCash() +{ + copper = zone->random.Int(1, 100); + silver = zone->random.Int(1, 50); + gold = zone->random.Int(1, 10); platinum = zone->random.Int(1, 5); } @@ -1004,7 +982,7 @@ NPC * NPC::SpawnGridNodeNPC(std::string name, const glm::vec4 &position, uint32 npc_type->loottable_id = 0; npc_type->texture = 1; npc_type->light = 1; - npc_type->size = 3; + npc_type->size = 1; npc_type->runspeed = 0; npc_type->d_melee_texture1 = 1; npc_type->d_melee_texture2 = 1; @@ -2138,77 +2116,218 @@ void NPC::SetLevel(uint8 in_level, bool command) SendAppearancePacket(AT_WhoLevel, in_level); } -void NPC::ModifyNPCStat(const char *identifier, const char *newValue) +void NPC::ModifyNPCStat(const char *identifier, const char *new_value) { - std::string id = identifier; - std::string val = newValue; - for(int i = 0; i < id.length(); ++i) { - id[i] = std::tolower(id[i]); - } + std::string id = str_tolower(identifier); + std::string val = new_value; - if(id == "ac") { AC = atoi(val.c_str()); CalcAC(); return; } - else if(id == "str") { STR = atoi(val.c_str()); return; } - else if(id == "sta") { STA = atoi(val.c_str()); return; } - else if(id == "agi") { AGI = atoi(val.c_str()); CalcAC(); return; } - else if(id == "dex") { DEX = atoi(val.c_str()); return; } - else if(id == "wis") { WIS = atoi(val.c_str()); CalcMaxMana(); return; } - else if(id == "int" || id == "_int") { INT = atoi(val.c_str()); CalcMaxMana(); return; } - else if(id == "cha") { CHA = atoi(val.c_str()); return; } - else if(id == "max_hp") { base_hp = atoi(val.c_str()); CalcMaxHP(); if (cur_hp > max_hp) { cur_hp = max_hp; } return; } - else if(id == "max_mana") { npc_mana = atoi(val.c_str()); CalcMaxMana(); if (current_mana > max_mana){ current_mana = max_mana; } return; } - else if(id == "mr") { MR = atoi(val.c_str()); return; } - else if(id == "fr") { FR = atoi(val.c_str()); return; } - else if(id == "cr") { CR = atoi(val.c_str()); return; } - else if(id == "pr") { PR = atoi(val.c_str()); return; } - else if(id == "dr") { DR = atoi(val.c_str()); return; } - else if(id == "phr") { PhR = atoi(val.c_str()); return; } - else if(id == "runspeed") { - runspeed = (float)atof(val.c_str()); - base_runspeed = (int)((float)runspeed * 40.0f); + std::string variable_key = StringFormat("modify_stat_%s", id.c_str()); + SetEntityVariable(variable_key.c_str(), new_value); + + Log(Logs::Detail, Logs::NPCScaling, "NPC::ModifyNPCStat key: %s val: %s ", variable_key.c_str(), new_value); + + if (id == "ac") { + AC = atoi(val.c_str()); + CalcAC(); + return; + } + else if (id == "str") { + STR = atoi(val.c_str()); + return; + } + else if (id == "sta") { + STA = atoi(val.c_str()); + return; + } + else if (id == "agi") { + AGI = atoi(val.c_str()); + CalcAC(); + return; + } + else if (id == "dex") { + DEX = atoi(val.c_str()); + return; + } + else if (id == "wis") { + WIS = atoi(val.c_str()); + CalcMaxMana(); + return; + } + else if (id == "int" || id == "_int") { + INT = atoi(val.c_str()); + CalcMaxMana(); + return; + } + else if (id == "cha") { + CHA = atoi(val.c_str()); + return; + } + else if (id == "max_hp") { + base_hp = atoi(val.c_str()); + + CalcMaxHP(); + if (cur_hp > max_hp) { + cur_hp = max_hp; + } + + return; + } + else if (id == "max_mana") { + npc_mana = atoi(val.c_str()); + CalcMaxMana(); + if (current_mana > max_mana) { + current_mana = max_mana; + } + return; + } + else if (id == "mr") { + MR = atoi(val.c_str()); + return; + } + else if (id == "fr") { + FR = atoi(val.c_str()); + return; + } + else if (id == "cr") { + CR = atoi(val.c_str()); + return; + } + else if (id == "pr") { + PR = atoi(val.c_str()); + return; + } + else if (id == "dr") { + DR = atoi(val.c_str()); + return; + } + else if (id == "phr") { + PhR = atoi(val.c_str()); + return; + } + else if (id == "runspeed") { + runspeed = (float) atof(val.c_str()); + base_runspeed = (int) ((float) runspeed * 40.0f); base_walkspeed = base_runspeed * 100 / 265; - walkspeed = ((float)base_walkspeed) * 0.025f; + walkspeed = ((float) base_walkspeed) * 0.025f; base_fearspeed = base_runspeed * 100 / 127; - fearspeed = ((float)base_fearspeed) * 0.025f; - CalcBonuses(); return; - } - else if(id == "special_attacks") { NPCSpecialAttacks(val.c_str(), 0, 1); return; } - else if(id == "special_abilities") { ProcessSpecialAbilities(val.c_str()); return; } - else if(id == "attack_speed") { attack_speed = (float)atof(val.c_str()); CalcBonuses(); return; } - else if(id == "attack_delay") { /* TODO: fix DB */attack_delay = atoi(val.c_str()) * 100; CalcBonuses(); return; } - else if(id == "atk") { ATK = atoi(val.c_str()); return; } - else if(id == "accuracy") { accuracy_rating = atoi(val.c_str()); return; } - else if(id == "avoidance") { avoidance_rating = atoi(val.c_str()); return; } - else if(id == "trackable") { trackable = atoi(val.c_str()); return; } - else if(id == "min_hit") { - min_dmg = atoi(val.c_str()); - // TODO: fix DB - base_damage = round((max_dmg - min_dmg) / 1.9); - min_damage = min_dmg - round(base_damage / 10.0); + fearspeed = ((float) base_fearspeed) * 0.025f; + CalcBonuses(); return; } - else if(id == "max_hit") { - max_dmg = atoi(val.c_str()); - // TODO: fix DB - base_damage = round((max_dmg - min_dmg) / 1.9); - min_damage = min_dmg - round(base_damage / 10.0); + else if (id == "special_attacks") { + NPCSpecialAttacks(val.c_str(), 0, 1); + return; + } + else if (id == "special_abilities") { + ProcessSpecialAbilities(val.c_str()); + return; + } + else if (id == "attack_speed") { + attack_speed = (float) atof(val.c_str()); + CalcBonuses(); + return; + } + else if (id == "attack_delay") { + /* TODO: fix DB */ + attack_delay = atoi(val.c_str()) * 100; + CalcBonuses(); + return; + } + else if (id == "atk") { + ATK = atoi(val.c_str()); + return; + } + else if (id == "accuracy") { + accuracy_rating = atoi(val.c_str()); + return; + } + else if (id == "avoidance") { + avoidance_rating = atoi(val.c_str()); + return; + } + else if (id == "trackable") { + trackable = atoi(val.c_str()); + return; + } + else if (id == "min_hit") { + min_dmg = atoi(val.c_str()); + // TODO: fix DB + base_damage = round((max_dmg - min_dmg) / 1.9); + min_damage = min_dmg - round(base_damage / 10.0); + return; + } + else if (id == "max_hit") { + max_dmg = atoi(val.c_str()); + // TODO: fix DB + base_damage = round((max_dmg - min_dmg) / 1.9); + min_damage = min_dmg - round(base_damage / 10.0); + return; + } + else if (id == "attack_count") { + attack_count = atoi(val.c_str()); + return; + } + else if (id == "see_invis") { + see_invis = atoi(val.c_str()); + return; + } + else if (id == "see_invis_undead") { + see_invis_undead = atoi(val.c_str()); + return; + } + else if (id == "see_hide") { + see_hide = atoi(val.c_str()); + return; + } + else if (id == "see_improved_hide") { + see_improved_hide = atoi(val.c_str()); + return; + } + else if (id == "hp_regen") { + hp_regen = atoi(val.c_str()); + return; + } + else if (id == "mana_regen") { + mana_regen = atoi(val.c_str()); + return; + } + else if (id == "level") { + SetLevel(atoi(val.c_str())); + return; + } + else if (id == "aggro") { + pAggroRange = atof(val.c_str()); + return; + } + else if (id == "assist") { + pAssistRange = atof(val.c_str()); + return; + } + else if (id == "slow_mitigation") { + slow_mitigation = atoi(val.c_str()); + return; + } + else if (id == "loottable_id") { + loottable_id = atof(val.c_str()); + return; + } + else if (id == "healscale") { + healscale = atof(val.c_str()); + return; + } + else if (id == "spellscale") { + spellscale = atof(val.c_str()); + return; + } + else if (id == "npc_spells_id") { + AI_AddNPCSpells(atoi(val.c_str())); + return; + } + else if (id == "npc_spells_effects_id") { + AI_AddNPCSpellsEffects(atoi(val.c_str())); + CalcBonuses(); return; } - else if(id == "attack_count") { attack_count = atoi(val.c_str()); return; } - else if(id == "see_invis") { see_invis = atoi(val.c_str()); return; } - else if(id == "see_invis_undead") { see_invis_undead = atoi(val.c_str()); return; } - else if(id == "see_hide") { see_hide = atoi(val.c_str()); return; } - else if(id == "see_improved_hide") { see_improved_hide = atoi(val.c_str()); return; } - else if(id == "hp_regen") { hp_regen = atoi(val.c_str()); return; } - else if(id == "mana_regen") { mana_regen = atoi(val.c_str()); return; } - else if(id == "level") { SetLevel(atoi(val.c_str())); return; } - else if(id == "aggro") { pAggroRange = atof(val.c_str()); return; } - else if(id == "assist") { pAssistRange = atof(val.c_str()); return; } - else if(id == "slow_mitigation") { slow_mitigation = atoi(val.c_str()); return; } - else if(id == "loottable_id") { loottable_id = atof(val.c_str()); return; } - else if(id == "healscale") { healscale = atof(val.c_str()); return; } - else if(id == "spellscale") { spellscale = atof(val.c_str()); return; } - else if(id == "npc_spells_id") { AI_AddNPCSpells(atoi(val.c_str())); return; } - else if(id == "npc_spells_effects_id") { AI_AddNPCSpellsEffects(atoi(val.c_str())); CalcBonuses(); return; } } void NPC::LevelScale() { @@ -2308,120 +2427,9 @@ void NPC::LevelScale() { return; } -void NPC::CalcNPCResists() { - - if (!MR) - MR = (GetLevel() * 11)/10; - if (!CR) - CR = (GetLevel() * 11)/10; - if (!DR) - DR = (GetLevel() * 11)/10; - if (!FR) - FR = (GetLevel() * 11)/10; - if (!PR) - PR = (GetLevel() * 11)/10; - if (!Corrup) - Corrup = 15; - if (!PhR) - PhR = 10; - return; -} - -void NPC::CalcNPCRegen() { - - // Fix for lazy db-updaters (regen values left at 0) - if (GetCasterClass() != 'N' && mana_regen == 0) - mana_regen = (GetLevel() / 10) + 4; - else if(mana_regen < 0) - mana_regen = 0; - else - mana_regen = mana_regen; - - // Gives low end monsters no regen if set to 0 in database. Should make low end monsters killable - // Might want to lower this to /5 rather than 10. - if(hp_regen == 0) - { - if(GetLevel() <= 6) - hp_regen = 1; - else if(GetLevel() > 6 && GetLevel() <= 10) - hp_regen = 2; - else if(GetLevel() > 10 && GetLevel() <= 15) - hp_regen = 3; - else if(GetLevel() > 15 && GetLevel() <= 20) - hp_regen = 5; - else if(GetLevel() > 20 && GetLevel() <= 30) - hp_regen = 7; - else if(GetLevel() > 30 && GetLevel() <= 35) - hp_regen = 9; - else if(GetLevel() > 35 && GetLevel() <= 40) - hp_regen = 12; - else if(GetLevel() > 40 && GetLevel() <= 45) - hp_regen = 18; - else if(GetLevel() > 45 && GetLevel() <= 50) - hp_regen = 21; - else - hp_regen = 30; - } else if(hp_regen < 0) { - hp_regen = 0; - } else - hp_regen = hp_regen; - - return; -} - -void NPC::CalcNPCDamage() { - - int AC_adjust=12; - - if (GetLevel() >= 66) { - if (min_dmg==0) - min_dmg = 220; - if (max_dmg==0) - max_dmg = ((((99000)*(GetLevel()-64))/400)*AC_adjust/10); - } - else if (GetLevel() >= 60 && GetLevel() <= 65){ - if(min_dmg==0) - min_dmg = (GetLevel()+(GetLevel()/3)); - if(max_dmg==0) - max_dmg = (GetLevel()*3)*AC_adjust/10; - } - else if (GetLevel() >= 51 && GetLevel() <= 59){ - if(min_dmg==0) - min_dmg = (GetLevel()+(GetLevel()/3)); - if(max_dmg==0) - max_dmg = (GetLevel()*3)*AC_adjust/10; - } - else if (GetLevel() >= 40 && GetLevel() <= 50) { - if (min_dmg==0) - min_dmg = GetLevel(); - if(max_dmg==0) - max_dmg = (GetLevel()*3)*AC_adjust/10; - } - else if (GetLevel() >= 28 && GetLevel() <= 39) { - if (min_dmg==0) - min_dmg = GetLevel() / 2; - if (max_dmg==0) - max_dmg = ((GetLevel()*2)+2)*AC_adjust/10; - } - else if (GetLevel() <= 27) { - if (min_dmg==0) - min_dmg=1; - if (max_dmg==0) - max_dmg = (GetLevel()*2)*AC_adjust/10; - } - - int32 clfact = GetClassLevelFactor(); - min_dmg = (min_dmg * clfact) / 220; - max_dmg = (max_dmg * clfact) / 220; - - return; -} - - uint32 NPC::GetSpawnPointID() const { - if(respawn2) - { + if (respawn2) { return respawn2->GetID(); } return 0; @@ -2438,7 +2446,6 @@ void NPC::NPCSlotTexture(uint8 slot, uint16 texture) else if (slot < 6) { // Reserved for texturing individual armor slots } - return; } uint32 NPC::GetSwarmOwner() @@ -2468,14 +2475,15 @@ void NPC::SetSwarmTarget(int target_id) return; } -int32 NPC::CalcMaxMana() { - if(npc_mana == 0) { +int32 NPC::CalcMaxMana() +{ + if (npc_mana == 0) { switch (GetCasterClass()) { case 'I': - max_mana = (((GetINT()/2)+1) * GetLevel()) + spellbonuses.Mana + itembonuses.Mana; + max_mana = (((GetINT() / 2) + 1) * GetLevel()) + spellbonuses.Mana + itembonuses.Mana; break; case 'W': - max_mana = (((GetWIS()/2)+1) * GetLevel()) + spellbonuses.Mana + itembonuses.Mana; + max_mana = (((GetWIS() / 2) + 1) * GetLevel()) + spellbonuses.Mana + itembonuses.Mana; break; case 'N': default: @@ -2487,7 +2495,8 @@ int32 NPC::CalcMaxMana() { } return max_mana; - } else { + } + else { switch (GetCasterClass()) { case 'I': max_mana = npc_mana + spellbonuses.Mana + itembonuses.Mana; diff --git a/zone/npc.h b/zone/npc.h index ec2676f60..fb5f00b9f 100644 --- a/zone/npc.h +++ b/zone/npc.h @@ -106,7 +106,7 @@ public: static bool SpawnZoneController(); static int8 GetAILevel(bool iForceReRead = false); - NPC(const NPCType* data, Spawn2* respawn, const glm::vec4& position, int iflymode, bool IsCorpse = false); + NPC(const NPCType* npc_type_data, Spawn2* respawn, const glm::vec4& position, int iflymode, bool IsCorpse = false); virtual ~NPC(); @@ -142,9 +142,6 @@ public: virtual void AI_Event_SpellCastFinished(bool iCastSucceeded, uint16 slot); void LevelScale(); - void CalcNPCResists(); - void CalcNPCRegen(); - void CalcNPCDamage(); virtual void SetTarget(Mob* mob); virtual uint16 GetSkill(EQEmu::skills::SkillType skill_num) const { if (skill_num <= EQEmu::skills::HIGHEST_SKILL) { return skills[skill_num]; } return 0; } @@ -255,12 +252,23 @@ public: void SignalNPC(int _signal_id); - inline int32 GetNPCFactionID() const { return npc_faction_id; } - inline int32 GetPrimaryFaction() const { return primary_faction; } - int32 GetNPCHate(Mob* in_ent) {return hate_list.GetEntHateAmount(in_ent);} - bool IsOnHatelist(Mob*p) { return hate_list.IsEntOnHateList(p);} + inline int32 GetNPCFactionID() const + { return npc_faction_id; } - void SetNPCFactionID(int32 in) { npc_faction_id = in; database.GetFactionIdsForNPC(npc_faction_id, &faction_list, &primary_faction); } + inline int32 GetPrimaryFaction() const + { return primary_faction; } + + int32 GetNPCHate(Mob *in_ent) + { return hate_list.GetEntHateAmount(in_ent); } + + bool IsOnHatelist(Mob *p) + { return hate_list.IsEntOnHateList(p); } + + void SetNPCFactionID(int32 in) + { + npc_faction_id = in; + database.GetFactionIdsForNPC(npc_faction_id, &faction_list, &primary_faction); + } glm::vec4 m_SpawnPoint; @@ -357,7 +365,7 @@ public: void SetAvoidanceRating(int32 d) { avoidance_rating = d;} int32 GetRawAC() const { return AC; } - void ModifyNPCStat(const char *identifier, const char *newValue); + void ModifyNPCStat(const char *identifier, const char *new_value); virtual void SetLevel(uint8 in_level, bool command = false); bool IsLDoNTrapped() const { return (ldon_trapped); } diff --git a/zone/npc_scale_manager.cpp b/zone/npc_scale_manager.cpp new file mode 100644 index 000000000..ca818a1f1 --- /dev/null +++ b/zone/npc_scale_manager.cpp @@ -0,0 +1,439 @@ +/** + * EQEmulator: Everquest Server Emulator + * Copyright (C) 2001-2018 EQEmulator Development Team (https://github.com/EQEmu/Server) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY except by those people which sell it, which + * are required to give you total support for your newly bought product; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR + * A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include "npc_scale_manager.h" +#include "../common/string_util.h" + +/** + * @param mob + */ +void NpcScaleManager::ScaleMob(Mob *mob) +{ + Log(Logs::General, Logs::NPCScaling, "Attempting scale on %s", mob->GetCleanName()); + + if (mob->IsClient()) { + return; + } + + NPC *npc = mob->CastToNPC(); + + int8 mob_type = 0; + int mob_level = npc->GetLevel(); + + if (npc->IsRareSpawn()) { + mob_type = 1; + } + + if (npc->IsRaidTarget()) { + mob_type = 2; + } + + global_npc_scale scale_data = GetGlobalScaleDataForTypeLevel(mob_type, mob_level); + + if (!scale_data.level) { + Log(Logs::General, Logs::NPCScaling, "NPC: %s - scaling data not found for type: %i level: %i", + mob->GetCleanName(), + mob_type, + mob_level + ); + + return; + } + + if (npc->GetAC() == 0) { + npc->ModifyNPCStat("ac", std::to_string(scale_data.ac).c_str()); + } + if (npc->GetMaxHP() == 0) { + npc->ModifyNPCStat("max_hp", std::to_string(scale_data.hp).c_str()); + npc->Heal(); + } + if (npc->GetAccuracyRating() == 0) { + npc->ModifyNPCStat("accuracy", std::to_string(scale_data.accuracy).c_str()); + } + if (npc->GetSlowMitigation() == 0) { + npc->ModifyNPCStat("slow_mitigation", std::to_string(scale_data.slow_mitigation).c_str()); + } + if (npc->GetATK() == 0) { + npc->ModifyNPCStat("atk", std::to_string(scale_data.attack).c_str()); + } + if (npc->GetSTR() == 0) { + npc->ModifyNPCStat("str", std::to_string(scale_data.strength).c_str()); + } + if (npc->GetSTA() == 0) { + npc->ModifyNPCStat("sta", std::to_string(scale_data.stamina).c_str()); + } + if (npc->GetDEX() == 0) { + npc->ModifyNPCStat("dex", std::to_string(scale_data.dexterity).c_str()); + } + if (npc->GetAGI() == 0) { + npc->ModifyNPCStat("agi", std::to_string(scale_data.agility).c_str()); + } + if (npc->GetINT() == 0) { + npc->ModifyNPCStat("int", std::to_string(scale_data.intelligence).c_str()); + } + if (npc->GetWIS() == 0) { + npc->ModifyNPCStat("wis", std::to_string(scale_data.wisdom).c_str()); + } + if (npc->GetCHA() == 0) { + npc->ModifyNPCStat("cha", std::to_string(scale_data.charisma).c_str()); + } + if (npc->GetMR() == 0) { + npc->ModifyNPCStat("mr", std::to_string(scale_data.magic_resist).c_str()); + } + if (npc->GetCR() == 0) { + npc->ModifyNPCStat("cr", std::to_string(scale_data.cold_resist).c_str()); + } + if (npc->GetFR() == 0) { + npc->ModifyNPCStat("fr", std::to_string(scale_data.fire_resist).c_str()); + } + if (npc->GetPR() == 0) { + npc->ModifyNPCStat("pr", std::to_string(scale_data.poison_resist).c_str()); + } + if (npc->GetDR() == 0) { + npc->ModifyNPCStat("dr", std::to_string(scale_data.disease_resist).c_str()); + } + if (npc->GetCR() == 0) { + npc->ModifyNPCStat("cr", std::to_string(scale_data.corruption_resist).c_str()); + } + if (npc->GetPR() == 0) { + npc->ModifyNPCStat("pr", std::to_string(scale_data.physical_resist).c_str()); + } + if (npc->GetMinDMG() == 0) { + int min_dmg = scale_data.min_dmg; + if (RuleB(Combat, UseNPCDamageClassLevelMods)) { + int32 class_level_damage_mod = GetClassLevelDamageMod(npc->GetLevel(), npc->GetClass()); + min_dmg = (min_dmg * class_level_damage_mod) / 220; + + Log(Logs::Moderate, + Logs::NPCScaling, + "ClassLevelDamageMod::min_dmg base: %i calc: %i", + scale_data.min_dmg, + min_dmg); + } + + npc->ModifyNPCStat("min_hit", std::to_string(min_dmg).c_str()); + } + if (npc->GetMaxDMG() == 0) { + int max_dmg = scale_data.max_dmg; + if (RuleB(Combat, UseNPCDamageClassLevelMods)) { + int32 class_level_damage_mod = GetClassLevelDamageMod(npc->GetLevel(), npc->GetClass()); + max_dmg = (scale_data.max_dmg * class_level_damage_mod) / 220; + + Log(Logs::Moderate, + Logs::NPCScaling, + "ClassLevelDamageMod::max_dmg base: %i calc: %i", + scale_data.max_dmg, + max_dmg + ); + } + + npc->ModifyNPCStat("max_hit", std::to_string(max_dmg).c_str()); + } + if (npc->GetHPRegen() == 0) { + npc->ModifyNPCStat("hp_regen", std::to_string(scale_data.hp_regen_rate).c_str()); + } + if (npc->GetAttackDelay() == 0) { + npc->ModifyNPCStat("attack_delay", std::to_string(scale_data.attack_delay).c_str()); + } + if (!npc->HasSpecialAbilities()) { + npc->ModifyNPCStat("special_abilities", scale_data.special_abilities.c_str()); + } + + ListStats(npc); +} + +void NpcScaleManager::ListStats(Mob *mob) +{ + std::string stats[] = { + "ac", + "max_hp", + "accuracy", + "slow_mitigation", + "atk", + "str", + "sta", + "dex", + "agi", + "int", + "wis", + "cha", + "mr", + "cr", + "fr", + "pr", + "dr", + "cr", + "pr", + "min_hit", + "max_hit", + "hp_regen", + "attack_delay", + "special_abilities" + }; + + int stat_elements = sizeof(stats) / sizeof(stats[0]); + + for (int i = 0; i < stat_elements; i++) { + std::string variable = StringFormat("modify_stat_%s", stats[i].c_str()); + if (mob->EntityVariableExists(variable.c_str())) { + Log(Logs::Detail, + Logs::NPCScaling, + "NpcScaleManager::ListStats: %s - %s ", + stats[i].c_str(), + mob->GetEntityVariable(variable.c_str())); + } + } +} + +bool NpcScaleManager::LoadScaleData() +{ + auto results = database.QueryDatabase( + "SELECT " + "type," + "level," + "ac," + "hp," + "accuracy," + "slow_mitigation," + "attack," + "strength," + "stamina," + "dexterity," + "agility," + "intelligence," + "wisdom," + "charisma," + "magic_resist," + "cold_resist," + "fire_resist," + "poison_resist," + "disease_resist," + "corruption_resist," + "physical_resist," + "min_dmg," + "max_dmg," + "hp_regen_rate," + "attack_delay," + "special_abilities" + " FROM `npc_scale_global_base`" + ); + + for (auto row = results.begin(); row != results.end(); ++row) { + global_npc_scale scale_data; + + scale_data.type = atoi(row[0]); + scale_data.level = atoi(row[1]); + scale_data.ac = atoi(row[2]); + scale_data.hp = atoi(row[3]); + scale_data.accuracy = atoi(row[4]); + scale_data.slow_mitigation = atoi(row[5]); + scale_data.attack = atoi(row[6]); + scale_data.strength = atoi(row[7]); + scale_data.stamina = atoi(row[8]); + scale_data.dexterity = atoi(row[9]); + scale_data.agility = atoi(row[10]); + scale_data.intelligence = atoi(row[11]); + scale_data.wisdom = atoi(row[12]); + scale_data.charisma = atoi(row[13]); + scale_data.magic_resist = atoi(row[14]); + scale_data.cold_resist = atoi(row[15]); + scale_data.fire_resist = atoi(row[16]); + scale_data.poison_resist = atoi(row[17]); + scale_data.disease_resist = atoi(row[18]); + scale_data.corruption_resist = atoi(row[19]); + scale_data.physical_resist = atoi(row[20]); + scale_data.min_dmg = atoi(row[21]); + scale_data.max_dmg = atoi(row[22]); + scale_data.hp_regen_rate = atoi(row[23]); + scale_data.attack_delay = atoi(row[24]); + + if (row[25]) { + scale_data.special_abilities = row[25]; + } + + npc_global_base_scaling_data.insert( + std::make_pair( + std::make_pair(scale_data.type, scale_data.level), + scale_data + ) + ); + } + + Log(Logs::General, Logs::NPCScaling, "Global Base Scaling Data Loaded..."); + + return true; +} + +/** + * @param mob_type + * @param mob_level + * @return NpcScaleManager::global_npc_scale + */ +NpcScaleManager::global_npc_scale NpcScaleManager::GetGlobalScaleDataForTypeLevel(int8 mob_type, int mob_level) +{ + auto iter = npc_global_base_scaling_data.find(std::make_pair(mob_type, mob_level)); + if (iter != npc_global_base_scaling_data.end()) { + return iter->second; + } + + return {}; +} + +/** + * @param level + * @param npc_class + * @return + */ +uint32 NpcScaleManager::GetClassLevelDamageMod(uint32 level, uint32 npc_class) +{ + uint32 multiplier = 0; + + switch (npc_class) { + case WARRIOR: { + if (level < 20) { + multiplier = 220; + } + else if (level < 30) { + multiplier = 230; + } + else if (level < 40) { + multiplier = 250; + } + else if (level < 53) { + multiplier = 270; + } + else if (level < 57) { + multiplier = 280; + } + else if (level < 60) { + multiplier = 290; + } + else if (level < 70) { + multiplier = 300; + } + else { + multiplier = 311; + } + break; + } + case DRUID: + case CLERIC: + case SHAMAN: { + if (level < 70) { + multiplier = 150; + } + else { + multiplier = 157; + } + break; + } + case BERSERKER: + case PALADIN: + case SHADOWKNIGHT: { + if (level < 35) { + multiplier = 210; + } + else if (level < 45) { + multiplier = 220; + } + else if (level < 51) { + multiplier = 230; + } + else if (level < 56) { + multiplier = 240; + } + else if (level < 60) { + multiplier = 250; + } + else if (level < 68) { + multiplier = 260; + } + else { + multiplier = 270; + } + break; + } + case MONK: + case BARD: + case ROGUE: + case BEASTLORD: { + if (level < 51) { + multiplier = 180; + } + else if (level < 58) { + multiplier = 190; + } + else if (level < 70) { + multiplier = 200; + } + else { + multiplier = 210; + } + break; + } + case RANGER: { + if (level < 58) { + multiplier = 200; + } + else if (level < 70) { + multiplier = 210; + } + else { + multiplier = 220; + } + break; + } + case MAGICIAN: + case WIZARD: + case NECROMANCER: + case ENCHANTER: { + if (level < 70) { + multiplier = 120; + } + else { + multiplier = 127; + } + break; + } + default: { + if (level < 35) { + multiplier = 210; + } + else if (level < 45) { + multiplier = 220; + } + else if (level < 51) { + multiplier = 230; + } + else if (level < 56) { + multiplier = 240; + } + else if (level < 60) { + multiplier = 250; + } + else { + multiplier = 260; + } + break; + } + } + + return multiplier; +} \ No newline at end of file diff --git a/zone/npc_scale_manager.h b/zone/npc_scale_manager.h new file mode 100644 index 000000000..5211c8de5 --- /dev/null +++ b/zone/npc_scale_manager.h @@ -0,0 +1,73 @@ +/** + * EQEmulator: Everquest Server Emulator + * Copyright (C) 2001-2018 EQEmulator Development Team (https://github.com/EQEmu/Server) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY except by those people which sell it, which + * are required to give you total support for your newly bought product; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR + * A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef EQEMU_NPC_SCALE_MANAGER_H +#define EQEMU_NPC_SCALE_MANAGER_H + + +#include "npc.h" + +class NpcScaleManager { +public: + struct global_npc_scale { + int type; + int level; + int ac; + int hp; + int accuracy; + int slow_mitigation; + int attack; + int strength; + int stamina; + int dexterity; + int agility; + int intelligence; + int wisdom; + int charisma; + int magic_resist; + int cold_resist; + int fire_resist; + int poison_resist; + int disease_resist; + int corruption_resist; + int physical_resist; + int min_dmg; + int max_dmg; + int hp_regen_rate; + int attack_delay; + + std::string special_abilities; + }; + + void ScaleMob(Mob *mob); + bool LoadScaleData(); + + global_npc_scale GetGlobalScaleDataForTypeLevel(int8 mob_type, int mob_level); + + std::map, global_npc_scale> npc_global_base_scaling_data; + + void ListStats(Mob * mob); + + uint32 GetClassLevelDamageMod(uint32 level, uint32 npc_class); +}; + +extern NpcScaleManager *npc_scale_manager; + +#endif //EQEMU_NPC_SCALE_MANAGER_H diff --git a/zone/object.h b/zone/object.h index 1afe574ea..ce64ee47e 100644 --- a/zone/object.h +++ b/zone/object.h @@ -179,20 +179,20 @@ protected: void ResetState(); // Set state back to original void RandomSpawn(bool send_packet = false); //spawn this ground spawn at a random place - Object_Struct m_data; // Packet data - EQEmu::ItemInstance* m_inst; // Item representing object - bool m_inuse; // Currently in use by a client? - uint32 m_id; // Database key, different than drop_id - uint32 m_type; // Object Type, ie, forge, oven, dropped item, etc (ref: ContainerUseTypes) - uint32 m_icon; // Icon to use for forge, oven, etc - float m_max_x; - float m_max_y; - float m_min_x; - float m_min_y; - float m_z; - float m_heading; - bool m_ground_spawn; - char m_display_name[64]; + Object_Struct m_data; // Packet data + EQEmu::ItemInstance *m_inst; // Item representing object + bool m_inuse; // Currently in use by a client? + uint32 m_id; // Database key, different than drop_id + uint32 m_type; // Object Type, ie, forge, oven, dropped item, etc (ref: ContainerUseTypes) + uint32 m_icon; // Icon to use for forge, oven, etc + float m_max_x; + float m_max_y; + float m_min_x; + float m_min_y; + float m_z; + float m_heading; + bool m_ground_spawn; + char m_display_name[64]; std::map o_EntityVariables; diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index 1393b0221..3bbd9f6ac 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -2761,47 +2761,11 @@ void QuestManager::FlagInstanceByRaidLeader(uint32 zone, int16 version) } } -const char* QuestManager::saylink(char* Phrase, bool silent, const char* LinkName) { +std::string QuestManager::saylink(char *saylink_text, bool silent, const char *link_name) +{ QuestManagerCurrentQuestVars(); - int sayid = 0; - - int sz = strlen(Phrase); - auto escaped_string = new char[sz * 2]; - database.DoEscapeString(escaped_string, Phrase, sz); - - // Query for an existing phrase and id in the saylink table - std::string query = StringFormat("SELECT `id` FROM `saylink` WHERE `phrase` = '%s'", escaped_string); - auto results = database.QueryDatabase(query); - if (results.Success()) { - if (results.RowCount() >= 1) { - for (auto row = results.begin();row != results.end(); ++row) - sayid = atoi(row[0]); - } else { - std::string insert_query = StringFormat("INSERT INTO `saylink` (`phrase`) VALUES ('%s')", escaped_string); - results = database.QueryDatabase(insert_query); - if (!results.Success()) { - Log(Logs::General, Logs::Error, "Error in saylink phrase queries", results.ErrorMessage().c_str()); - } - else { - sayid = results.LastInsertedID(); - } - } - } - safe_delete_array(escaped_string); - - //Create the say link as an item link hash - EQEmu::SayLinkEngine linker; - linker.SetProxyItemID(SAYLINK_ITEM_ID); - if (silent) - linker.SetProxyAugment2ID(sayid); - else - linker.SetProxyAugment1ID(sayid); - linker.SetProxyText(LinkName); - - strcpy(Phrase, linker.GenerateLink().c_str()); - - return Phrase; + return EQEmu::SayLinkEngine::GenerateQuestSaylink(saylink_text, silent, link_name); } const char* QuestManager::getguildnamebyid(int guild_id) { diff --git a/zone/questmgr.h b/zone/questmgr.h index a3b9fac43..68a51ae08 100644 --- a/zone/questmgr.h +++ b/zone/questmgr.h @@ -245,7 +245,7 @@ public: void FlagInstanceByGroupLeader(uint32 zone, int16 version); void FlagInstanceByRaidLeader(uint32 zone, int16 version); const char* varlink(char* perltext, int item_id); - const char* saylink(char* Phrase, bool silent, const char* LinkName); + std::string saylink(char *saylink_text, bool silent, const char *link_name); const char* getguildnamebyid(int guild_id); void SetRunning(bool val); bool IsRunning(); diff --git a/zone/spells.cpp b/zone/spells.cpp index 0fcb7fe2b..f1b8824f1 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -5644,9 +5644,8 @@ void NPC::InitializeBuffSlots() { int max_slots = GetMaxTotalSlots(); buffs = new Buffs_Struct[max_slots]; - for(int x = 0; x < max_slots; ++x) - { - buffs[x].spellid = SPELL_UNKNOWN; + for (int x = 0; x < max_slots; ++x) { + buffs[x].spellid = SPELL_UNKNOWN; buffs[x].UpdateClient = false; } current_buff_count = 0; diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index 027225243..ba3d7ff45 100644 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -2637,7 +2637,7 @@ const NPCType* ZoneDatabase::LoadNPCTypesData(uint32 npc_type_id, bool bulk_load temp_npctype_data->spellscale = atoi(row[86]); temp_npctype_data->healscale = atoi(row[87]); temp_npctype_data->no_target_hotkey = atoi(row[88]) == 1 ? true: false; - temp_npctype_data->raid_target = atoi(row[89]) == 0 ? false: true; + temp_npctype_data->raid_target = atoi(row[89]) == 0 ? false : true; temp_npctype_data->attack_delay = atoi(row[90]) * 100; // TODO: fix DB temp_npctype_data->light = (atoi(row[91]) & 0x0F); From d75afd468834b7fca885113e914cc036fac50619 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 5 Nov 2018 00:26:52 -0600 Subject: [PATCH 426/670] Allow display window to be snoozed --- common/emu_constants.h | 5 +++ zone/attack.cpp | 12 +++++- zone/client.cpp | 96 ++++++++++++++++++++++++++++-------------- zone/client.h | 5 +++ zone/client_packet.cpp | 45 +++++++++++++------- zone/command.cpp | 2 +- zone/mob.cpp | 4 +- zone/mob_info.cpp | 13 +++++- 8 files changed, 131 insertions(+), 51 deletions(-) diff --git a/common/emu_constants.h b/common/emu_constants.h index db49252a3..4fbdd107d 100644 --- a/common/emu_constants.h +++ b/common/emu_constants.h @@ -77,6 +77,11 @@ namespace EQEmu } // namespace invtype + namespace popupresponse { + const int32 SERVER_INTERNAL_USE_BASE = 2000000000; + const int32 MOB_INFO_DISMISS = 2000000001; + } + namespace invslot { using namespace RoF2::invslot::enum_; diff --git a/zone/attack.cpp b/zone/attack.cpp index 22e10f842..8ddd5e139 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -5468,4 +5468,14 @@ void Mob::SetSpawnedInWater(bool spawned_in_water) { int32 Mob::GetHPRegen() const { return hp_regen; -} \ No newline at end of file +} + +bool Client::GetDisplayMobInfoWindow() const +{ + return display_mob_info_window; +} + +void Client::SetDisplayMobInfoWindow(bool display_mob_info_window) +{ + Client::display_mob_info_window = display_mob_info_window; +} diff --git a/zone/client.cpp b/zone/client.cpp index 564db321c..3877410d3 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -166,6 +166,7 @@ Client::Client(EQStreamInterface* ieqs) for (int client_filter = 0; client_filter < _FilterCount; client_filter++) ClientFilters[client_filter] = FilterShow; + display_mob_info_window = true; character_id = 0; conn_state = NoPacketsReceived; client_data_loaded = false; @@ -4031,9 +4032,9 @@ void Client::SetHoTT(uint32 mobid) { void Client::SendPopupToClient(const char *Title, const char *Text, uint32 PopupID, uint32 Buttons, uint32 Duration) { - auto outapp = new EQApplicationPacket(OP_OnLevelMessage, sizeof(OnLevelMessage_Struct)); - OnLevelMessage_Struct *olms = (OnLevelMessage_Struct *)outapp->pBuffer; + + OnLevelMessage_Struct *olms = (OnLevelMessage_Struct *) outapp->pBuffer; if ((strlen(Title) > (sizeof(olms->Title) - 1)) || (strlen(Text) > (sizeof(olms->Text) - 1))) { safe_delete(outapp); @@ -4045,12 +4046,14 @@ void Client::SendPopupToClient(const char *Title, const char *Text, uint32 Popup olms->Buttons = Buttons; - if (Duration > 0) + if (Duration > 0) { olms->Duration = Duration * 1000; - else + } + else { olms->Duration = 0xffffffff; + } - olms->PopupID = PopupID; + olms->PopupID = PopupID; olms->NegativeID = 0; sprintf(olms->ButtonName0, "%s", "Yes"); @@ -4059,16 +4062,29 @@ void Client::SendPopupToClient(const char *Title, const char *Text, uint32 Popup safe_delete(outapp); } -void Client::SendFullPopup(const char *Title, const char *Text, uint32 PopupID, uint32 NegativeID, uint32 Buttons, uint32 Duration, const char *ButtonName0, const char *ButtonName1, uint32 SoundControls) { +void Client::SendFullPopup( + const char *Title, + const char *Text, + uint32 PopupID, + uint32 NegativeID, + uint32 Buttons, + uint32 Duration, + const char *ButtonName0, + const char *ButtonName1, + uint32 SoundControls +) +{ auto outapp = new EQApplicationPacket(OP_OnLevelMessage, sizeof(OnLevelMessage_Struct)); - OnLevelMessage_Struct *olms = (OnLevelMessage_Struct *)outapp->pBuffer; - if((strlen(Text) > (sizeof(olms->Text)-1)) || (strlen(Title) > (sizeof(olms->Title) - 1)) ) { + OnLevelMessage_Struct *olms = (OnLevelMessage_Struct *) outapp->pBuffer; + + if ((strlen(Text) > (sizeof(olms->Text) - 1)) || (strlen(Title) > (sizeof(olms->Title) - 1))) { safe_delete(outapp); return; } - if (ButtonName0 && ButtonName1 && ( (strlen(ButtonName0) > (sizeof(olms->ButtonName0) - 1)) || (strlen(ButtonName1) > (sizeof(olms->ButtonName1) - 1)) ) ) { + if (ButtonName0 && ButtonName1 && ((strlen(ButtonName0) > (sizeof(olms->ButtonName0) - 1)) || + (strlen(ButtonName1) > (sizeof(olms->ButtonName1) - 1)))) { safe_delete(outapp); return; } @@ -4077,31 +4093,47 @@ void Client::SendFullPopup(const char *Title, const char *Text, uint32 PopupID, strcpy(olms->Text, Text); olms->Buttons = Buttons; - - if (ButtonName0 == NULL || ButtonName1 == NULL) { + + if (ButtonName0 == nullptr || ButtonName1 == nullptr) { sprintf(olms->ButtonName0, "%s", "Yes"); sprintf(olms->ButtonName1, "%s", "No"); - } else { + } + else { strcpy(olms->ButtonName0, ButtonName0); strcpy(olms->ButtonName1, ButtonName1); } - if(Duration > 0) + if (Duration > 0) { olms->Duration = Duration * 1000; - else + } + else { olms->Duration = 0xffffffff; + } - olms->PopupID = PopupID; - olms->NegativeID = NegativeID; + olms->PopupID = PopupID; + olms->NegativeID = NegativeID; olms->SoundControls = SoundControls; QueuePacket(outapp); safe_delete(outapp); } -void Client::SendWindow(uint32 PopupID, uint32 NegativeID, uint32 Buttons, const char *ButtonName0, const char *ButtonName1, uint32 Duration, int title_type, Client* target, const char *Title, const char *Text, ...) { +void Client::SendWindow( + uint32 PopupID, + uint32 NegativeID, + uint32 Buttons, + const char *ButtonName0, + const char *ButtonName1, + uint32 Duration, + int title_type, + Client *target, + const char *Title, + const char *Text, + ... +) +{ va_list argptr; - char buffer[4096]; + char buffer[4096]; va_start(argptr, Text); vsnprintf(buffer, sizeof(buffer), Text, argptr); @@ -4109,23 +4141,23 @@ void Client::SendWindow(uint32 PopupID, uint32 NegativeID, uint32 Buttons, const size_t len = strlen(buffer); - auto app = new EQApplicationPacket(OP_OnLevelMessage, sizeof(OnLevelMessage_Struct)); - OnLevelMessage_Struct* olms=(OnLevelMessage_Struct*)app->pBuffer; + auto app = new EQApplicationPacket(OP_OnLevelMessage, sizeof(OnLevelMessage_Struct)); + OnLevelMessage_Struct *olms = (OnLevelMessage_Struct *) app->pBuffer; - if(strlen(Text) > (sizeof(olms->Text)-1)) { + if (strlen(Text) > (sizeof(olms->Text) - 1)) { safe_delete(app); return; } - if(!target) + if (!target) { title_type = 0; + } - switch (title_type) - { + switch (title_type) { case 1: { char name[64] = ""; strcpy(name, target->GetName()); - if(target->GetLastName()) { + if (target->GetLastName()) { char last_name[64] = ""; strcpy(last_name, target->GetLastName()); strcat(name, " "); @@ -4135,8 +4167,8 @@ void Client::SendWindow(uint32 PopupID, uint32 NegativeID, uint32 Buttons, const break; } case 2: { - if(target->GuildID()) { - char *guild_name = (char*)guild_mgr.GetGuildName(target->GuildID()); + if (target->GuildID()) { + char *guild_name = (char *) guild_mgr.GetGuildName(target->GuildID()); strcpy(olms->Title, guild_name); } else { @@ -4150,19 +4182,21 @@ void Client::SendWindow(uint32 PopupID, uint32 NegativeID, uint32 Buttons, const } } - memcpy(olms->Text, buffer, len+1); + memcpy(olms->Text, buffer, len + 1); olms->Buttons = Buttons; sprintf(olms->ButtonName0, "%s", ButtonName0); sprintf(olms->ButtonName1, "%s", ButtonName1); - if(Duration > 0) + if (Duration > 0) { olms->Duration = Duration * 1000; - else + } + else { olms->Duration = 0xffffffff; + } - olms->PopupID = PopupID; + olms->PopupID = PopupID; olms->NegativeID = NegativeID; FastQueuePacket(&app); diff --git a/zone/client.h b/zone/client.h index f14dc9336..9e2a459f9 100644 --- a/zone/client.h +++ b/zone/client.h @@ -246,6 +246,9 @@ public: std::unordered_map close_mobs; bool is_client_moving; + void SetDisplayMobInfoWindow(bool display_mob_info_window); + bool GetDisplayMobInfoWindow() const; + //abstract virtual function implementations required by base abstract class virtual bool Death(Mob* killerMob, int32 damage, uint16 spell_id, EQEmu::skills::SkillType attack_skill); virtual void Damage(Mob* from, int32 damage, uint16 spell_id, EQEmu::skills::SkillType attack_skill, bool avoidable = true, int8 buffslot = -1, bool iBuffTic = false, eSpecialAttacks special = eSpecialAttacks::None); @@ -1458,6 +1461,8 @@ private: int Haste; //precalced value uint32 tmSitting; // time stamp started sitting, used for HP regen bonus added on MAY 5, 2004 + bool display_mob_info_window; + int32 max_end; int32 current_endurance; diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index ceb242890..84f486055 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -10885,33 +10885,46 @@ void Client::Handle_OP_PopupResponse(const EQApplicationPacket *app) { if (app->size != sizeof(PopupResponse_Struct)) { - Log(Logs::General, Logs::None, "Size mismatch in OP_PopupResponse expected %i got %i", - sizeof(PopupResponse_Struct), app->size); + Log(Logs::General, + Logs::None, + "Size mismatch in OP_PopupResponse expected %i got %i", + sizeof(PopupResponse_Struct), + app->size); + DumpPacket(app); return; } - PopupResponse_Struct *prs = (PopupResponse_Struct*)app->pBuffer; - // Handle any EQEmu defined popup Ids first - switch (prs->popupid) - { - case POPUPID_UPDATE_SHOWSTATSWINDOW: - if (GetTarget() && GetTarget()->IsClient()) - GetTarget()->CastToClient()->SendStatsWindow(this, true); - else - SendStatsWindow(this, true); - return; + PopupResponse_Struct *popup_response = (PopupResponse_Struct *) app->pBuffer; - default: - break; + /** + * Handle any EQEmu defined popup Ids first + */ + switch (popup_response->popupid) { + case POPUPID_UPDATE_SHOWSTATSWINDOW: + if (GetTarget() && GetTarget()->IsClient()) { + GetTarget()->CastToClient()->SendStatsWindow(this, true); + } + else { + SendStatsWindow(this, true); + } + return; + break; + + case EQEmu::popupresponse::MOB_INFO_DISMISS: + this->SetDisplayMobInfoWindow(false); + this->Message(15, "GM Mob display window snoozed in this zone..."); + break; + default: + break; } char buf[16]; - sprintf(buf, "%d\0", prs->popupid); + sprintf(buf, "%d\0", popup_response->popupid); parse->EventPlayer(EVENT_POPUP_RESPONSE, this, buf, 0); - Mob* Target = GetTarget(); + Mob *Target = GetTarget(); if (Target && Target->IsNPC()) { parse->EventNPC(EVENT_POPUP_RESPONSE, Target->CastToNPC(), this, buf, 0); } diff --git a/zone/command.cpp b/zone/command.cpp index 4cc8b8a54..40f9d7a91 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -249,7 +249,7 @@ int command_init(void) command_add("lastname", "[new lastname] - Set your or your player target's lastname", 50, command_lastname) || command_add("level", "[level] - Set your or your target's level", 10, command_level) || command_add("listnpcs", "[name/range] - Search NPCs", 20, command_listnpcs) || - command_add("list", "[npc] [name|all] - Search entities", 20, command_list) || + command_add("list", "[npcs|players|corpses|doors|objects] [search] - Search entities", 20, command_list) || command_add("listpetition", "- List petitions", 50, command_listpetition) || command_add("load_shared_memory", "[shared_memory_name] - Reloads shared memory and uses the input as output", 250, command_load_shared_memory) || command_add("loc", "- Print out your or your target's current location and heading", 0, command_loc) || diff --git a/zone/mob.cpp b/zone/mob.cpp index 90a999a0f..0976b3783 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -3489,7 +3489,9 @@ void Mob::SetTarget(Mob *mob) else if (IsClient()) { parse->EventPlayer(EVENT_TARGET_CHANGE, CastToClient(), "", 0); - this->DisplayInfo(mob); + if (this->CastToClient()->admin > 200) { + this->DisplayInfo(mob); + } } if (IsPet() && GetOwner() && GetOwner()->IsClient()) { diff --git a/zone/mob_info.cpp b/zone/mob_info.cpp index 7ae249393..bb6598641 100644 --- a/zone/mob_info.cpp +++ b/zone/mob_info.cpp @@ -362,6 +362,17 @@ void Mob::DisplayInfo(Mob *mob) std::cout << "Window Length: " << window_text.length() << std::endl; // std::cout << "Window " << window_text << std::endl; - client->SendPopupToClient("Entity Info", window_text.c_str()); + if (client->GetDisplayMobInfoWindow()) { + client->SendFullPopup( + "GM: Entity Info", + window_text.c_str(), + EQEmu::popupresponse::MOB_INFO_DISMISS, + 0, + 100, + 10, + "Snooze", + "OK" + ); + } } } From 4e0d85534e5bee80caa5ea778b657fa99a6b353b Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 5 Nov 2018 00:43:52 -0600 Subject: [PATCH 427/670] Fix issue where new log category settings were getting injected into the database with all settings turned on --- common/database.cpp | 7 +++---- common/eqemu_logsys.cpp | 9 +++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/common/database.cpp b/common/database.cpp index a9496b6e3..8ff79a44c 100644 --- a/common/database.cpp +++ b/common/database.cpp @@ -2080,7 +2080,6 @@ void Database::LoadLogSettings(EQEmuLogSys::LogSettings* log_settings) { auto results = QueryDatabase(query); int log_category_id = 0; - LogSys.file_logs_enabled = false; int categories_in_database[1000] = {}; @@ -2090,9 +2089,9 @@ void Database::LoadLogSettings(EQEmuLogSys::LogSettings* log_settings) { continue; } - log_settings[log_category_id].log_to_console = atoi(row[2]); - log_settings[log_category_id].log_to_file = atoi(row[3]); - log_settings[log_category_id].log_to_gmsay = atoi(row[4]); + log_settings[log_category_id].log_to_console = static_cast(atoi(row[2])); + log_settings[log_category_id].log_to_file = static_cast(atoi(row[3])); + log_settings[log_category_id].log_to_gmsay = static_cast(atoi(row[4])); /** * Determine if any output method is enabled for the category diff --git a/common/eqemu_logsys.cpp b/common/eqemu_logsys.cpp index f4d36e5d5..9e99e6cbe 100644 --- a/common/eqemu_logsys.cpp +++ b/common/eqemu_logsys.cpp @@ -113,6 +113,15 @@ void EQEmuLogSys::LoadLogSettingsDefaults() */ log_platform = GetExecutablePlatformInt(); + for (int log_category_id = Logs::AA; log_category_id != Logs::MaxCategoryID; log_category_id++) { + log_settings[log_category_id].log_to_console = 0; + log_settings[log_category_id].log_to_file = 0; + log_settings[log_category_id].log_to_gmsay = 0; + log_settings[log_category_id].is_category_enabled = 0; + } + + file_logs_enabled = false; + /** * Zero out Array */ From e6dbc8291ab2e5167e206fe73fead8c5edb1858d Mon Sep 17 00:00:00 2001 From: Akkadius Date: Wed, 7 Nov 2018 00:11:06 -0600 Subject: [PATCH 428/670] Tweak log code to handle `is_category_enabled` array initialization dynamically --- common/eqemu_logsys.cpp | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/common/eqemu_logsys.cpp b/common/eqemu_logsys.cpp index 9e99e6cbe..9f05654e0 100644 --- a/common/eqemu_logsys.cpp +++ b/common/eqemu_logsys.cpp @@ -113,6 +113,11 @@ void EQEmuLogSys::LoadLogSettingsDefaults() */ log_platform = GetExecutablePlatformInt(); + /** + * Zero out Array + */ + memset(log_settings, 0, sizeof(LogSettings) * Logs::LogCategory::MaxCategoryID); + for (int log_category_id = Logs::AA; log_category_id != Logs::MaxCategoryID; log_category_id++) { log_settings[log_category_id].log_to_console = 0; log_settings[log_category_id].log_to_file = 0; @@ -122,11 +127,6 @@ void EQEmuLogSys::LoadLogSettingsDefaults() file_logs_enabled = false; - /** - * Zero out Array - */ - memset(log_settings, 0, sizeof(LogSettings) * Logs::LogCategory::MaxCategoryID); - /** * Set Defaults */ @@ -138,17 +138,20 @@ void EQEmuLogSys::LoadLogSettingsDefaults() log_settings[Logs::MySQLError].log_to_console = Logs::General; log_settings[Logs::Login_Server].log_to_console = Logs::General; log_settings[Logs::Headless_Client].log_to_console = Logs::General; + log_settings[Logs::NPCScaling].log_to_gmsay = Logs::General; /** * Set Category enabled status on defaults */ - log_settings[Logs::World_Server].is_category_enabled = 1; - log_settings[Logs::Zone_Server].is_category_enabled = 1; - log_settings[Logs::QS_Server].is_category_enabled = 1; - log_settings[Logs::UCS_Server].is_category_enabled = 1; - log_settings[Logs::Crash].is_category_enabled = 1; - log_settings[Logs::MySQLError].is_category_enabled = 1; - log_settings[Logs::Login_Server].is_category_enabled = 1; + for (int log_category_id = Logs::AA; log_category_id != Logs::MaxCategoryID; log_category_id++) { + const bool log_to_console = log_settings[log_category_id].log_to_console > 0; + const bool log_to_file = log_settings[log_category_id].log_to_file > 0; + const bool log_to_gmsay = log_settings[log_category_id].log_to_gmsay > 0; + const bool is_category_enabled = log_to_console || log_to_file || log_to_gmsay; + if (is_category_enabled) { + log_settings[log_category_id].is_category_enabled = 1; + } + } /** * Declare process file names for log writing= From 06e668108a6f34b5f90e4ebf569bcd63c4ed2290 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Wed, 7 Nov 2018 00:11:27 -0600 Subject: [PATCH 429/670] Zero out stats on lua_create_npc to inherit default global base scaling --- zone/lua_general.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp index 5d9e2d95c..055716efd 100644 --- a/zone/lua_general.cpp +++ b/zone/lua_general.cpp @@ -1426,19 +1426,19 @@ void lua_create_npc(luabind::adl::object table, float x, float y, float z, float LuaCreateNPCParse(AC, uint32, 0); LuaCreateNPCParse(Mana, uint32, 0); LuaCreateNPCParse(ATK, uint32, 0); - LuaCreateNPCParse(STR, uint32, 75); - LuaCreateNPCParse(STA, uint32, 75); - LuaCreateNPCParse(DEX, uint32, 75); - LuaCreateNPCParse(AGI, uint32, 75); - LuaCreateNPCParse(INT, uint32, 75); - LuaCreateNPCParse(WIS, uint32, 75); - LuaCreateNPCParse(CHA, uint32, 75); - LuaCreateNPCParse(MR, int32, 25); - LuaCreateNPCParse(FR, int32, 25); - LuaCreateNPCParse(CR, int32, 25); - LuaCreateNPCParse(PR, int32, 25); - LuaCreateNPCParse(DR, int32, 25); - LuaCreateNPCParse(Corrup, int32, 25); + LuaCreateNPCParse(STR, uint32, 0); + LuaCreateNPCParse(STA, uint32, 0); + LuaCreateNPCParse(DEX, uint32, 0); + LuaCreateNPCParse(AGI, uint32, 0); + LuaCreateNPCParse(INT, uint32, 0); + LuaCreateNPCParse(WIS, uint32, 0); + LuaCreateNPCParse(CHA, uint32, 0); + LuaCreateNPCParse(MR, int32, 0); + LuaCreateNPCParse(FR, int32, 0); + LuaCreateNPCParse(CR, int32, 0); + LuaCreateNPCParse(PR, int32, 0); + LuaCreateNPCParse(DR, int32, 0); + LuaCreateNPCParse(Corrup, int32, 0); LuaCreateNPCParse(PhR, int32, 0); LuaCreateNPCParse(haircolor, uint8, 0); LuaCreateNPCParse(beardcolor, uint8, 0); From 0752edcab0bf494a07c0623261f0bb27ce4c3e39 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Wed, 7 Nov 2018 00:11:58 -0600 Subject: [PATCH 430/670] Zero out default SpawnNPC stats --- zone/npc.cpp | 164 +++++++++++++-------------------------------------- 1 file changed, 41 insertions(+), 123 deletions(-) diff --git a/zone/npc.cpp b/zone/npc.cpp index bd5de40b1..617bbc671 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -911,7 +911,8 @@ bool NPC::DatabaseCastAccepted(int spell_id) { return false; } -bool NPC::SpawnZoneController(){ +bool NPC::SpawnZoneController() +{ if (!RuleB(Zone, UseZoneController)) return false; @@ -920,23 +921,23 @@ bool NPC::SpawnZoneController(){ memset(npc_type, 0, sizeof(NPCType)); strncpy(npc_type->name, "zone_controller", 60); - npc_type->cur_hp = 2000000000; - npc_type->max_hp = 2000000000; - npc_type->hp_regen = 100000000; - npc_type->race = 240; - npc_type->size = .1; - npc_type->gender = 2; - npc_type->class_ = 1; - npc_type->deity = 1; - npc_type->level = 200; - npc_type->npc_id = ZONE_CONTROLLER_NPC_ID; - npc_type->loottable_id = 0; - npc_type->texture = 3; - npc_type->runspeed = 0; + npc_type->cur_hp = 2000000000; + npc_type->max_hp = 2000000000; + npc_type->hp_regen = 100000000; + npc_type->race = 240; + npc_type->size = .1; + npc_type->gender = 2; + npc_type->class_ = 1; + npc_type->deity = 1; + npc_type->level = 200; + npc_type->npc_id = ZONE_CONTROLLER_NPC_ID; + npc_type->loottable_id = 0; + npc_type->texture = 3; + npc_type->runspeed = 0; npc_type->d_melee_texture1 = 0; npc_type->d_melee_texture2 = 0; - npc_type->merchanttype = 0; - npc_type->bodytype = 11; + npc_type->merchanttype = 0; + npc_type->bodytype = 11; npc_type->skip_global_loot = true; if (RuleB(Zone, EnableZoneControllerGlobals)) { @@ -944,9 +945,9 @@ bool NPC::SpawnZoneController(){ } npc_type->prim_melee_type = 28; - npc_type->sec_melee_type = 28; + npc_type->sec_melee_type = 28; - npc_type->findable = 0; + npc_type->findable = 0; npc_type->trackable = 0; strcpy(npc_type->special_abilities, "12,1^13,1^14,1^15,1^16,1^17,1^19,1^22,1^24,1^25,1^28,1^31,1^35,1^39,1^42,1"); @@ -1040,90 +1041,7 @@ NPC* NPC::SpawnNPC(const char* spawncommand, const glm::vec4& position, Client* sprintf(sep.arg[10], "0"); //Calc MaxHP if client neglected to enter it... if (!sep.IsNumber(4)) { - //Stolen from Client::GetMaxHP... - uint8 multiplier = 0; - int tmplevel = atoi(sep.arg[2]); - switch(atoi(sep.arg[5])) - { - case WARRIOR: - if (tmplevel < 20) - multiplier = 22; - else if (tmplevel < 30) - multiplier = 23; - else if (tmplevel < 40) - multiplier = 25; - else if (tmplevel < 53) - multiplier = 27; - else if (tmplevel < 57) - multiplier = 28; - else - multiplier = 30; - break; - - case DRUID: - case CLERIC: - case SHAMAN: - multiplier = 15; - break; - - case PALADIN: - case SHADOWKNIGHT: - if (tmplevel < 35) - multiplier = 21; - else if (tmplevel < 45) - multiplier = 22; - else if (tmplevel < 51) - multiplier = 23; - else if (tmplevel < 56) - multiplier = 24; - else if (tmplevel < 60) - multiplier = 25; - else - multiplier = 26; - break; - - case MONK: - case BARD: - case ROGUE: - //case BEASTLORD: - if (tmplevel < 51) - multiplier = 18; - else if (tmplevel < 58) - multiplier = 19; - else - multiplier = 20; - break; - - case RANGER: - if (tmplevel < 58) - multiplier = 20; - else - multiplier = 21; - break; - - case MAGICIAN: - case WIZARD: - case NECROMANCER: - case ENCHANTER: - multiplier = 12; - break; - - default: - if (tmplevel < 35) - multiplier = 21; - else if (tmplevel < 45) - multiplier = 22; - else if (tmplevel < 51) - multiplier = 23; - else if (tmplevel < 56) - multiplier = 24; - else if (tmplevel < 60) - multiplier = 25; - else - multiplier = 26; - break; - } - sprintf(sep.arg[4],"%i",5+multiplier*atoi(sep.arg[2])+multiplier*atoi(sep.arg[2])*75/300); + sep.arg[4] = 0; } // Autoselect NPC Gender @@ -1136,30 +1054,30 @@ NPC* NPC::SpawnNPC(const char* spawncommand, const glm::vec4& position, Client* memset(npc_type, 0, sizeof(NPCType)); strncpy(npc_type->name, sep.arg[0], 60); - npc_type->cur_hp = atoi(sep.arg[4]); - npc_type->max_hp = atoi(sep.arg[4]); - npc_type->race = atoi(sep.arg[1]); - npc_type->gender = atoi(sep.arg[5]); - npc_type->class_ = atoi(sep.arg[6]); - npc_type->deity = 1; - npc_type->level = atoi(sep.arg[2]); - npc_type->npc_id = 0; - npc_type->loottable_id = 0; - npc_type->texture = atoi(sep.arg[3]); - npc_type->light = 0; // spawncommand needs update - npc_type->runspeed = 1.25; + npc_type->cur_hp = atoi(sep.arg[4]); + npc_type->max_hp = atoi(sep.arg[4]); + npc_type->race = atoi(sep.arg[1]); + npc_type->gender = atoi(sep.arg[5]); + npc_type->class_ = atoi(sep.arg[6]); + npc_type->deity = 1; + npc_type->level = atoi(sep.arg[2]); + npc_type->npc_id = 0; + npc_type->loottable_id = 0; + npc_type->texture = atoi(sep.arg[3]); + npc_type->light = 0; // spawncommand needs update + npc_type->runspeed = 1.25; npc_type->d_melee_texture1 = atoi(sep.arg[7]); npc_type->d_melee_texture2 = atoi(sep.arg[8]); - npc_type->merchanttype = atoi(sep.arg[9]); - npc_type->bodytype = atoi(sep.arg[10]); + npc_type->merchanttype = atoi(sep.arg[9]); + npc_type->bodytype = atoi(sep.arg[10]); - npc_type->STR = 150; - npc_type->STA = 150; - npc_type->DEX = 150; - npc_type->AGI = 150; - npc_type->INT = 150; - npc_type->WIS = 150; - npc_type->CHA = 150; + npc_type->STR = 0; + npc_type->STA = 0; + npc_type->DEX = 0; + npc_type->AGI = 0; + npc_type->INT = 0; + npc_type->WIS = 0; + npc_type->CHA = 0; npc_type->attack_delay = 3000; From 10fd51a1f924fa5090f54f8bd2c2a37d9c5f8959 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Wed, 7 Nov 2018 00:36:18 -0600 Subject: [PATCH 431/670] Add spellscale and healscale to scaling data --- zone/npc_scale_manager.cpp | 47 ++++++++++++-------------------------- zone/npc_scale_manager.h | 31 +++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 33 deletions(-) diff --git a/zone/npc_scale_manager.cpp b/zone/npc_scale_manager.cpp index ca818a1f1..d9f1c2d7a 100644 --- a/zone/npc_scale_manager.cpp +++ b/zone/npc_scale_manager.cpp @@ -152,6 +152,12 @@ void NpcScaleManager::ScaleMob(Mob *mob) if (npc->GetAttackDelay() == 0) { npc->ModifyNPCStat("attack_delay", std::to_string(scale_data.attack_delay).c_str()); } + if (npc->GetSpellScale() == 0) { + npc->ModifyNPCStat("spell_scale", std::to_string(scale_data.spell_scale).c_str()); + } + if (npc->GetHealScale() == 0) { + npc->ModifyNPCStat("heal_scale", std::to_string(scale_data.heal_scale).c_str()); + } if (!npc->HasSpecialAbilities()) { npc->ModifyNPCStat("special_abilities", scale_data.special_abilities.c_str()); } @@ -161,42 +167,13 @@ void NpcScaleManager::ScaleMob(Mob *mob) void NpcScaleManager::ListStats(Mob *mob) { - std::string stats[] = { - "ac", - "max_hp", - "accuracy", - "slow_mitigation", - "atk", - "str", - "sta", - "dex", - "agi", - "int", - "wis", - "cha", - "mr", - "cr", - "fr", - "pr", - "dr", - "cr", - "pr", - "min_hit", - "max_hit", - "hp_regen", - "attack_delay", - "special_abilities" - }; - - int stat_elements = sizeof(stats) / sizeof(stats[0]); - - for (int i = 0; i < stat_elements; i++) { - std::string variable = StringFormat("modify_stat_%s", stats[i].c_str()); + for (const auto &stat : scaling_stats) { + std::string variable = StringFormat("modify_stat_%s", stat.c_str()); if (mob->EntityVariableExists(variable.c_str())) { Log(Logs::Detail, Logs::NPCScaling, "NpcScaleManager::ListStats: %s - %s ", - stats[i].c_str(), + stat.c_str(), mob->GetEntityVariable(variable.c_str())); } } @@ -231,6 +208,8 @@ bool NpcScaleManager::LoadScaleData() "max_dmg," "hp_regen_rate," "attack_delay," + "spell_scale," + "heal_scale," "special_abilities" " FROM `npc_scale_global_base`" ); @@ -263,9 +242,11 @@ bool NpcScaleManager::LoadScaleData() scale_data.max_dmg = atoi(row[22]); scale_data.hp_regen_rate = atoi(row[23]); scale_data.attack_delay = atoi(row[24]); + scale_data.spell_scale = atoi(row[25]); + scale_data.heal_scale = atoi(row[26]); if (row[25]) { - scale_data.special_abilities = row[25]; + scale_data.special_abilities = row[27]; } npc_global_base_scaling_data.insert( diff --git a/zone/npc_scale_manager.h b/zone/npc_scale_manager.h index 5211c8de5..2178d1c2a 100644 --- a/zone/npc_scale_manager.h +++ b/zone/npc_scale_manager.h @@ -52,10 +52,41 @@ public: int max_dmg; int hp_regen_rate; int attack_delay; + int spell_scale; + int heal_scale; std::string special_abilities; }; + std::vector scaling_stats = { + "ac", + "max_hp", + "accuracy", + "slow_mitigation", + "atk", + "str", + "sta", + "dex", + "agi", + "int", + "wis", + "cha", + "mr", + "cr", + "fr", + "pr", + "dr", + "cr", + "pr", + "min_hit", + "max_hit", + "hp_regen", + "attack_delay", + "spell_scale", + "heal_scale", + "special_abilities" + }; + void ScaleMob(Mob *mob); bool LoadScaleData(); From 17ca995aa9b9e260e2cfb28d2438ee804bdba7bf Mon Sep 17 00:00:00 2001 From: Akkadius Date: Wed, 7 Nov 2018 02:34:55 -0600 Subject: [PATCH 432/670] Add single target and zonewide dynamic and static scaling methods / commands --- zone/command.cpp | 135 ++++++++++++++++++++++- zone/command.h | 1 + zone/mob.cpp | 8 +- zone/npc.cpp | 2 +- zone/npc_scale_manager.cpp | 216 ++++++++++++++++++++++++++++++++----- zone/npc_scale_manager.h | 10 +- 6 files changed, 331 insertions(+), 41 deletions(-) diff --git a/zone/command.cpp b/zone/command.cpp index 40f9d7a91..a0f8061ce 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -67,6 +67,7 @@ #include "water_map.h" #include "worldserver.h" #include "fastmath.h" +#include "npc_scale_manager.h" extern QueryServ* QServ; extern WorldServer worldserver; @@ -335,6 +336,7 @@ int command_init(void) command_add("revoke", "[charname] [1/0] - Makes charname unable to talk on OOC", 200, command_revoke) || command_add("rules", "(subcommand) - Manage server rules", 250, command_rules) || command_add("save", "- Force your player or player corpse target to be saved to the database", 50, command_save) || + command_add("scale", "- Handles npc scaling", 150, command_scale) || command_add("scribespell", "[spellid] - Scribe specified spell in your target's spell book.", 180, command_scribespell) || command_add("scribespells", "[max level] [min level] - Scribe all spells for you or your player target that are usable by them, up to level specified. (may freeze client for a few seconds)", 150, command_scribespells) || command_add("sendzonespawns", "- Refresh spawn list for all clients in zone", 150, command_sendzonespawns) || @@ -1380,7 +1382,7 @@ void command_list(Client *c, const Seperator *sep) entity_count++; - std::string entity_name = entity->GetCleanName(); + std::string entity_name = entity->GetName(); /** * Filter by name @@ -1421,7 +1423,7 @@ void command_list(Client *c, const Seperator *sep) entity_count++; - std::string entity_name = entity->GetCleanName(); + std::string entity_name = entity->GetName(); /** * Filter by name @@ -1462,7 +1464,7 @@ void command_list(Client *c, const Seperator *sep) entity_count++; - std::string entity_name = entity->GetCleanName(); + std::string entity_name = entity->GetName(); /** * Filter by name @@ -11400,6 +11402,133 @@ void command_reloadtraps(Client *c, const Seperator *sep) c->Message(CC_Default, "Traps reloaded for %s.", zone->GetShortName()); } +void command_scale(Client *c, const Seperator *sep) +{ + if (sep->argnum == 0) { + c->Message(15, "# Usage # "); + c->Message(15, "#scale [static/dynamic] (With targeted NPC)"); + c->Message(15, "#scale [npc_name_search] [static/dynamic] (To make zone-wide changes)"); + c->Message(15, "#scale all [static/dynamic]"); + return; + } + + /** + * Targeted changes + */ + if (c->GetTarget() && c->GetTarget()->IsNPC() && sep->argnum < 2) { + NPC * npc = c->GetTarget()->CastToNPC(); + + bool apply_status = false; + if (strcasecmp(sep->arg[1], "dynamic") == 0) { + c->Message(15, "Applying global base scaling to npc dynamically (All stats set to zeroes)..."); + apply_status = npc_scale_manager->ApplyGlobalBaseScalingToNPCDynamically(npc); + } + else if (strcasecmp(sep->arg[1], "static") == 0) { + c->Message(15, "Applying global base scaling to npc statically (Copying base stats onto NPC)..."); + apply_status = npc_scale_manager->ApplyGlobalBaseScalingToNPCStatically(npc); + } + else { + return; + } + + if (apply_status) { + c->Message(15, "Applied to NPC '%s' successfully!", npc->GetName()); + } + else { + c->Message(15, "Failed to load scaling data from the database " + "for this npc / type, see 'NPCScaling' log for more info"); + } + } + else if (c->GetTarget() && sep->argnum < 2) { + c->Message(15, "Target must be an npc!"); + } + + /** + * Zonewide + */ + if (sep->argnum > 1) { + + std::string scale_type; + if (strcasecmp(sep->arg[2], "dynamic") == 0) { + scale_type = "dynamic"; + } + else if (strcasecmp(sep->arg[2], "static") == 0) { + scale_type = "static"; + } + + if (scale_type.length() <= 0) { + c->Message(15, "You must first set if you intend on using static versus dynamic for these changes"); + c->Message(15, "#scale [npc_name_search] [static/dynamic]"); + c->Message(15, "#scale all [static/dynamic]"); + return; + } + + std::string search_string = sep->arg[1]; + + auto &entity_list_search = entity_list.GetNPCList(); + + int found_count = 0; + for (auto &itr : entity_list_search) { + NPC *entity = itr.second; + + std::string entity_name = entity->GetName(); + + /** + * Filter by name + */ + if (search_string.length() > 0 && entity_name.find(search_string) == std::string::npos && strcasecmp(sep->arg[1], "all") != 0) { + continue; + } + + std::string status = "(Searching)"; + + if (strcasecmp(sep->arg[3], "apply") == 0) { + status = "(Applying)"; + + if (strcasecmp(sep->arg[2], "dynamic") == 0) { + npc_scale_manager->ApplyGlobalBaseScalingToNPCDynamically(entity); + } + if (strcasecmp(sep->arg[2], "static") == 0) { + npc_scale_manager->ApplyGlobalBaseScalingToNPCStatically(entity); + } + } + + c->Message( + 15, + "| ID %5d | %s | x %.0f | y %0.f | z %.0f | DBID %u %s", + entity->GetID(), + entity->GetName(), + entity->GetX(), + entity->GetY(), + entity->GetZ(), + entity->GetNPCTypeID(), + status.c_str() + ); + + found_count++; + } + + if (strcasecmp(sep->arg[3], "apply") == 0) { + c->Message(15, "%s scaling applied against (%i) NPC's", sep->arg[2], found_count); + } + else { + + std::string saylink = StringFormat( + "#scale %s %s apply", + sep->arg[1], + sep->arg[2] + ); + + c->Message(15, "Found (%i) NPC's that match this search...", found_count); + c->Message( + 15, "To apply these changes, click <%s> or type %s", + EQEmu::SayLinkEngine::GenerateQuestSaylink(saylink, false, "Apply").c_str(), + saylink.c_str() + ); + } + } +} + // All new code added to command.cpp should be BEFORE this comment line. Do no append code to this file below the BOTS code block. #ifdef BOTS #include "bot_command.h" diff --git a/zone/command.h b/zone/command.h index 16a7177c2..735cf1f70 100644 --- a/zone/command.h +++ b/zone/command.h @@ -242,6 +242,7 @@ void command_resetaa_timer(Client *c, const Seperator *sep); void command_revoke(Client *c, const Seperator *sep); void command_rules(Client *c, const Seperator *sep); void command_save(Client *c, const Seperator *sep); +void command_scale(Client *c, const Seperator *sep); void command_scribespell(Client *c, const Seperator *sep); void command_scribespells(Client *c, const Seperator *sep); void command_sendop(Client *c, const Seperator *sep); diff --git a/zone/mob.cpp b/zone/mob.cpp index 0976b3783..7c486f451 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -3247,8 +3247,7 @@ void Mob::QuestJournalledSay(Client *QuestInitiator, const char *str) const char *Mob::GetCleanName() { - if(!strlen(clean_name)) - { + if (!strlen(clean_name)) { CleanMobName(GetName(), clean_name); } @@ -3650,11 +3649,10 @@ void Mob::SetEntityVariable(const char *id, const char *m_var) m_EntityVariables[id] = n_m_var; } -const char* Mob::GetEntityVariable(const char *id) +const char *Mob::GetEntityVariable(const char *id) { auto iter = m_EntityVariables.find(id); - if(iter != m_EntityVariables.end()) - { + if (iter != m_EntityVariables.end()) { return iter->second.c_str(); } return nullptr; diff --git a/zone/npc.cpp b/zone/npc.cpp index 617bbc671..462feff4f 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -367,7 +367,7 @@ NPC::NPC(const NPCType *npc_type_data, Spawn2 *in_respawn, const glm::vec4 &posi ignore_despawn = npc_type_data->ignore_despawn; m_targetable = !npc_type_data->untargetable; - npc_scale_manager->ScaleMob(this); + npc_scale_manager->ScaleNPC(this); AISpellVar.fail_recast = static_cast(RuleI(Spells, AI_SpellCastFinishedFailRecast)); AISpellVar.engaged_no_sp_recast_min = static_cast(RuleI(Spells, AI_EngagedNoSpellMinRecast)); diff --git a/zone/npc_scale_manager.cpp b/zone/npc_scale_manager.cpp index d9f1c2d7a..6b04ac4d1 100644 --- a/zone/npc_scale_manager.cpp +++ b/zone/npc_scale_manager.cpp @@ -24,34 +24,20 @@ /** * @param mob */ -void NpcScaleManager::ScaleMob(Mob *mob) +void NpcScaleManager::ScaleNPC(NPC * npc) { - Log(Logs::General, Logs::NPCScaling, "Attempting scale on %s", mob->GetCleanName()); + Log(Logs::General, Logs::NPCScaling, "Attempting scale on %s", npc->GetCleanName()); - if (mob->IsClient()) { - return; - } + int8 npc_type = GetNPCScalingType(npc); + int npc_level = npc->GetLevel(); - NPC *npc = mob->CastToNPC(); - - int8 mob_type = 0; - int mob_level = npc->GetLevel(); - - if (npc->IsRareSpawn()) { - mob_type = 1; - } - - if (npc->IsRaidTarget()) { - mob_type = 2; - } - - global_npc_scale scale_data = GetGlobalScaleDataForTypeLevel(mob_type, mob_level); + global_npc_scale scale_data = GetGlobalScaleDataForTypeLevel(npc_type, npc_level); if (!scale_data.level) { Log(Logs::General, Logs::NPCScaling, "NPC: %s - scaling data not found for type: %i level: %i", - mob->GetCleanName(), - mob_type, - mob_level + npc->GetCleanName(), + npc_type, + npc_level ); return; @@ -165,16 +151,19 @@ void NpcScaleManager::ScaleMob(Mob *mob) ListStats(npc); } -void NpcScaleManager::ListStats(Mob *mob) +/** + * @param mob + */ +void NpcScaleManager::ListStats(NPC *&npc) { for (const auto &stat : scaling_stats) { std::string variable = StringFormat("modify_stat_%s", stat.c_str()); - if (mob->EntityVariableExists(variable.c_str())) { + if (npc->EntityVariableExists(variable.c_str())) { Log(Logs::Detail, Logs::NPCScaling, "NpcScaleManager::ListStats: %s - %s ", stat.c_str(), - mob->GetEntityVariable(variable.c_str())); + npc->GetEntityVariable(variable.c_str())); } } } @@ -263,13 +252,13 @@ bool NpcScaleManager::LoadScaleData() } /** - * @param mob_type - * @param mob_level + * @param npc_type + * @param npc_level * @return NpcScaleManager::global_npc_scale */ -NpcScaleManager::global_npc_scale NpcScaleManager::GetGlobalScaleDataForTypeLevel(int8 mob_type, int mob_level) +NpcScaleManager::global_npc_scale NpcScaleManager::GetGlobalScaleDataForTypeLevel(int8 npc_type, int npc_level) { - auto iter = npc_global_base_scaling_data.find(std::make_pair(mob_type, mob_level)); + auto iter = npc_global_base_scaling_data.find(std::make_pair(npc_type, npc_level)); if (iter != npc_global_base_scaling_data.end()) { return iter->second; } @@ -417,4 +406,173 @@ uint32 NpcScaleManager::GetClassLevelDamageMod(uint32 level, uint32 npc_class) } return multiplier; +} + +/** + * @param npc + * @return + */ +int8 NpcScaleManager::GetNPCScalingType(NPC *&npc) +{ + std::string npc_name = npc->GetName(); + + if (npc->IsRareSpawn() || npc_name.find('#') != std::string::npos) { + return 1; + } + + if (npc->IsRaidTarget()) { + return 2; + } + + return 0; +} + +/** + * Returns false if scaling data not found + * @param npc + * @return + */ +bool NpcScaleManager::ApplyGlobalBaseScalingToNPCStatically(NPC *&npc) +{ + int8 npc_type = GetNPCScalingType(npc); + int npc_level = npc->GetLevel(); + + global_npc_scale scale_data = GetGlobalScaleDataForTypeLevel(npc_type, npc_level); + + if (!scale_data.level) { + Log( + Logs::General, + Logs::NPCScaling, + "NpcScaleManager::ApplyGlobalBaseScalingToNPCStatically NPC: %s - scaling data not found for type: %i level: %i", + npc->GetCleanName(), + npc_type, + npc_level + ); + + return false; + } + + std::string query = StringFormat( + "UPDATE `npc_types` SET " + "AC = %i, " + "hp = %i, " + "Accuracy = %i, " + "slow_mitigation = %i, " + "ATK = %i, " + "STR = %i, " + "STA = %i, " + "DEX = %i, " + "AGI = %i, " + "_INT = %i, " + "WIS = %i, " + "CHA = %i, " + "MR = %i, " + "CR = %i, " + "FR = %i, " + "PR = %i, " + "DR = %i, " + "Corrup = %i, " + "PhR = %i, " + "mindmg = %i, " + "maxdmg = %i, " + "hp_regen_rate = %i, " + "attack_delay = %i, " + "spellscale = %i, " + "healscale = %i, " + "special_abilities = '%s' " + "WHERE `id` = %i", + scale_data.ac, + scale_data.hp, + scale_data.accuracy, + scale_data.slow_mitigation, + scale_data.attack, + scale_data.strength, + scale_data.stamina, + scale_data.dexterity, + scale_data.agility, + scale_data.intelligence, + scale_data.wisdom, + scale_data.charisma, + scale_data.magic_resist, + scale_data.cold_resist, + scale_data.fire_resist, + scale_data.poison_resist, + scale_data.disease_resist, + scale_data.corruption_resist, + scale_data.physical_resist, + scale_data.min_dmg, + scale_data.max_dmg, + scale_data.hp_regen_rate, + scale_data.attack_delay, + scale_data.spell_scale, + scale_data.heal_scale, + EscapeString(scale_data.special_abilities).c_str(), + npc->GetNPCTypeID() + ); + + auto results = database.QueryDatabase(query); + + return results.Success(); +} + +/** + * Returns false if scaling data not found + * @param npc + * @return + */ +bool NpcScaleManager::ApplyGlobalBaseScalingToNPCDynamically(NPC *&npc) +{ + int8 npc_type = GetNPCScalingType(npc); + int npc_level = npc->GetLevel(); + + global_npc_scale scale_data = GetGlobalScaleDataForTypeLevel(npc_type, npc_level); + + if (!scale_data.level) { + Log( + Logs::General, + Logs::NPCScaling, + "NpcScaleManager::ApplyGlobalBaseScalingToNPCDynamically NPC: %s - scaling data not found for type: %i level: %i", + npc->GetCleanName(), + npc_type, + npc_level + ); + + return false; + } + + std::string query = StringFormat( + "UPDATE `npc_types` SET " + "AC = 0, " + "hp = 0, " + "Accuracy = 0, " + "slow_mitigation = 0, " + "ATK = 0, " + "STR = 0, " + "STA = 0, " + "DEX = 0, " + "AGI = 0, " + "_INT = 0, " + "WIS = 0, " + "CHA = 0, " + "MR = 0, " + "CR = 0, " + "FR = 0, " + "PR = 0, " + "DR = 0, " + "Corrup = 0, " + "PhR = 0, " + "mindmg = 0, " + "maxdmg = 0, " + "hp_regen_rate = 0, " + "attack_delay = 0, " + "spellscale = 0, " + "healscale = 0, " + "special_abilities = '' " + "WHERE `id` = %i", + npc->GetNPCTypeID() + ); + + auto results = database.QueryDatabase(query); + + return results.Success(); } \ No newline at end of file diff --git a/zone/npc_scale_manager.h b/zone/npc_scale_manager.h index 2178d1c2a..836261bb0 100644 --- a/zone/npc_scale_manager.h +++ b/zone/npc_scale_manager.h @@ -87,14 +87,18 @@ public: "special_abilities" }; - void ScaleMob(Mob *mob); + void ScaleNPC(NPC * npc); bool LoadScaleData(); - global_npc_scale GetGlobalScaleDataForTypeLevel(int8 mob_type, int mob_level); + global_npc_scale GetGlobalScaleDataForTypeLevel(int8 npc_type, int npc_level); std::map, global_npc_scale> npc_global_base_scaling_data; - void ListStats(Mob * mob); + void ListStats(NPC * &npc); + + int8 GetNPCScalingType(NPC * &npc); + bool ApplyGlobalBaseScalingToNPCStatically(NPC * &npc); + bool ApplyGlobalBaseScalingToNPCDynamically(NPC * &npc); uint32 GetClassLevelDamageMod(uint32 level, uint32 npc_class); }; From c0ebe05d5d30d2d56e774b9594e58df624660ea8 Mon Sep 17 00:00:00 2001 From: KimLS Date: Wed, 7 Nov 2018 21:55:12 -0800 Subject: [PATCH 433/670] Prelim swimming support --- zone/command.cpp | 14 ++- zone/entity.cpp | 16 +++ zone/mob_ai.cpp | 10 +- zone/mob_movement_manager.cpp | 220 ++++++++++++++++++++++++++-------- zone/mob_movement_manager.h | 1 + zone/npc.cpp | 15 +++ zone/pathfinder_interface.h | 20 +++- zone/pathfinder_nav_mesh.cpp | 4 +- zone/pathfinder_nav_mesh.h | 2 +- zone/pathfinder_null.cpp | 2 +- zone/pathfinder_null.h | 2 +- zone/pathfinder_waypoint.cpp | 2 +- zone/pathfinder_waypoint.h | 2 +- 13 files changed, 239 insertions(+), 71 deletions(-) diff --git a/zone/command.cpp b/zone/command.cpp index dd0bd95bb..3e9abd29f 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -1264,7 +1264,7 @@ void command_movement(Client *c, const Seperator *sep) auto &mgr = MobMovementManager::Get(); if (sep->arg[1][0] == 0) { - c->Message(0, "Usage: #movement stats/clearstats/walkto/runto/rotateto/stop"); + c->Message(0, "Usage: #movement stats/clearstats/walkto/runto/rotateto/stop/packet"); return; } @@ -1316,8 +1316,18 @@ void command_movement(Client *c, const Seperator *sep) target->StopNavigation(); } + else if (strcasecmp(sep->arg[1], "packet") == 0) + { + auto target = c->GetTarget(); + if (target == nullptr) { + c->Message(0, "No target found."); + return; + } + + mgr.SendCommandToClients(target, atof(sep->arg[2]), atof(sep->arg[3]), atof(sep->arg[4]), atof(sep->arg[5]), atoi(sep->arg[6]), ClientRangeAny); + } else { - c->Message(0, "Usage: #movement stats/clearstats/walkto/runto/rotateto/stop"); + c->Message(0, "Usage: #movement stats/clearstats/walkto/runto/rotateto/stop/packet"); } } diff --git a/zone/entity.cpp b/zone/entity.cpp index f7f5b4594..0ae9600d9 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -3438,6 +3438,22 @@ void EntityList::ProcessMove(NPC *n, float x, float y, float z) { args.push_back(&evt.area_type); parse->EventNPC(evt.event_id, evt.npc, evt.client, "", 0, &args); } + + if (zone->watermap) { + auto mode = n->GetFlyMode(); + if (mode == GravityBehavior::Ground) { + if (zone->watermap->InLiquid(glm::vec3(x, y, z))) + { + n->SetFlyMode(GravityBehavior::Water); + } + } + else if (mode == GravityBehavior::Water) { + if (!zone->watermap->InLiquid(glm::vec3(x, y, z))) + { + n->SetFlyMode(GravityBehavior::Ground); + } + } + } } void EntityList::AddArea(int id, int type, float min_x, float max_x, float min_y, diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index ed9c4d5c9..6c740a397 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1367,15 +1367,7 @@ void Mob::AI_Process() { auto targetPosition = glm::vec3(target->GetX(), target->GetY(), target->GetZ()); if (!zone->watermap->InLiquid(targetPosition)) { Mob *tar = hate_list.GetEntWithMostHateOnList(this); - if (tar == target) { - WipeHateList(); - Heal(); - BuffFadeAll(); - AI_walking_timer->Start(100); - time_until_can_move = Timer::GetCurrentTime(); - return; - } - else if (tar != nullptr) { + if (tar != nullptr && tar != target) { SetTarget(tar); return; } diff --git a/zone/mob_movement_manager.cpp b/zone/mob_movement_manager.cpp index d73f0fef1..c4fc822a8 100644 --- a/zone/mob_movement_manager.cpp +++ b/zone/mob_movement_manager.cpp @@ -178,12 +178,12 @@ public: glm::vec2 ndir = glm::normalize(dir); double distance_moved = frame_time * current_speed * 0.4f * 1.45f; - if (distance_moved > len) { - m->SetPosition(m_move_to_x, m_move_to_y, m_move_to_z); - + if (distance_moved > len) { if (m->IsNPC()) { entity_list.ProcessMove(m->CastToNPC(), m_move_to_x, m_move_to_y, m_move_to_z); } + + m->SetPosition(m_move_to_x, m_move_to_y, m_move_to_z); m->TryFixZ(); return true; @@ -196,11 +196,11 @@ public: double start_z = m_move_to_z - m_total_v_dist; double z_at_pos = start_z + (m_total_v_dist * (total_distance_traveled / m_total_h_dist)); - m->SetPosition(npos.x, npos.y, z_at_pos); - if (m->IsNPC()) { entity_list.ProcessMove(m->CastToNPC(), npos.x, npos.y, z_at_pos); } + + m->SetPosition(npos.x, npos.y, z_at_pos); } return false; @@ -210,7 +210,7 @@ public: return m_started; } -private: +protected: double m_move_to_x; double m_move_to_y; @@ -224,6 +224,101 @@ private: double m_total_v_dist; }; +class SwimToCommand : public MoveToCommand +{ +public: + SwimToCommand(float x, float y, float z, MobMovementMode mode) : MoveToCommand(x, y, z, mode) { + + } + + virtual bool Process(MobMovementManager *mgr, Mob *m) + { + if (!m->IsAIControlled()) { + return true; + } + + //Send a movement packet when you start moving + double current_time = static_cast(Timer::GetCurrentTime()) / 1000.0; + int current_speed = 0; + + if (m_move_to_mode == MovementRunning) { + current_speed = m->GetRunspeed(); + } + else { + current_speed = m->GetWalkspeed(); + } + + if (!m_started) { + m_started = true; + //rotate to the point + m->SetMoving(true); + m->SetHeading(m->CalculateHeadingToTarget(m_move_to_x, m_move_to_y)); + + m_last_sent_speed = current_speed; + m_last_sent_time = current_time; + m_total_h_dist = DistanceNoZ(m->GetPosition(), glm::vec4(m_move_to_x, m_move_to_z, 0.0f, 0.0f)); + m_total_v_dist = m_move_to_z - m->GetZ(); + mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, current_speed, ClientRangeCloseMedium); + return false; + } + + //When speed changes + if (current_speed != m_last_sent_speed) { + m_last_sent_speed = current_speed; + m_last_sent_time = current_time; + mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, current_speed, ClientRangeCloseMedium); + return false; + } + + //If x seconds have passed without sending an update. + if (current_time - m_last_sent_time >= 1.5) { + m_last_sent_speed = current_speed; + m_last_sent_time = current_time; + mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, current_speed, ClientRangeCloseMedium); + return false; + } + + auto &p = m->GetPosition(); + glm::vec2 tar(m_move_to_x, m_move_to_y); + glm::vec2 pos(p.x, p.y); + double len = glm::distance(pos, tar); + if (len == 0) { + return true; + } + + m->SetMoved(true); + + glm::vec2 dir = tar - pos; + glm::vec2 ndir = glm::normalize(dir); + double distance_moved = frame_time * current_speed * 0.4f * 1.45f; + + if (distance_moved > len) { + if (m->IsNPC()) { + entity_list.ProcessMove(m->CastToNPC(), m_move_to_x, m_move_to_y, m_move_to_z); + } + + m->SetPosition(m_move_to_x, m_move_to_y, m_move_to_z); + return true; + } + else { + glm::vec2 npos = pos + (ndir * static_cast(distance_moved)); + + len -= distance_moved; + double total_distance_traveled = m_total_h_dist - len; + double start_z = m_move_to_z - m_total_v_dist; + double z_at_pos = start_z + (m_total_v_dist * (total_distance_traveled / m_total_h_dist)); + + if (m->IsNPC()) { + entity_list.ProcessMove(m->CastToNPC(), npos.x, npos.y, z_at_pos); + } + + m->SetPosition(npos.x, npos.y, z_at_pos); + } + + return false; + } +}; + class TeleportToCommand : public IMovementCommand { public: @@ -243,14 +338,14 @@ public: return true; } - m->SetPosition(m_teleport_to_x, m_teleport_to_y, m_teleport_to_z); - m->SetHeading(mgr->FixHeading(m_teleport_to_heading)); - mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, 0, ClientRangeAny); - if (m->IsNPC()) { entity_list.ProcessMove(m->CastToNPC(), m_teleport_to_x, m_teleport_to_y, m_teleport_to_z); } + m->SetPosition(m_teleport_to_x, m_teleport_to_y, m_teleport_to_z); + m->SetHeading(mgr->FixHeading(m_teleport_to_heading)); + mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, 0, ClientRangeAny); + return true; } @@ -603,50 +698,72 @@ void MobMovementManager::FillCommandStruct(PlayerPositionUpdateServer_Struct *sp void MobMovementManager::UpdatePath(Mob *who, float x, float y, float z, MobMovementMode mode) { - //If who is underwater & xyz is underwater & who can see xyz - //Create a route directly from who to xyz - //else - //Create Route - if (zone->HasMap() && zone->HasWaterMap()) { - if (zone->watermap->InLiquid(who->GetPosition()) && zone->watermap->InLiquid(glm::vec3(x, y, z)) && zone->zonemap->CheckLoS(who->GetPosition(), glm::vec3(x, y, z))) { - auto iter = _impl->Entries.find(who); - auto &ent = (*iter); - - PushMoveTo(ent.second, x, y, z, mode); - PushStopMoving(ent.second); - return; - } + if (!zone->HasMap() || !zone->HasWaterMap()) { + auto iter = _impl->Entries.find(who); + auto &ent = (*iter); + + PushMoveTo(ent.second, x, y, z, mode); + PushStopMoving(ent.second); + } + + if (zone->watermap->InLiquid(who->GetPosition()) + && zone->watermap->InLiquid(glm::vec3(x, y, z)) + && zone->zonemap->CheckLoS(who->GetPosition(), glm::vec3(x, y, z))) { + auto iter = _impl->Entries.find(who); + auto &ent = (*iter); + + PushSwimTo(ent.second, x, y, z, mode); + PushStopMoving(ent.second); + return; } bool partial = false; bool stuck = false; - auto route = zone->pathing->FindRoute(glm::vec3(who->GetX(), who->GetY(), who->GetZ()), glm::vec3(x, y, z), partial, stuck); - + IPathfinder::IPath route; + if (who->IsUnderwaterOnly()) { + route = zone->pathing->FindRoute(glm::vec3(who->GetX(), who->GetY(), who->GetZ()), glm::vec3(x, y, z), partial, stuck, PathingWater | PathingLava | PathingVWater | PathingPortal | PathingPrefer); + } + else { + route = zone->pathing->FindRoute(glm::vec3(who->GetX(), who->GetY(), who->GetZ()), glm::vec3(x, y, z), partial, stuck, PathingNotDisabled ^ PathingZoneLine); + } + //if route empty or only has two points, and we have los, then just force npc to move to location if (route.size() < 3) { auto iter = _impl->Entries.find(who); auto &ent = (*iter); if (zone->zonemap->CheckLoS(who->GetPosition(), glm::vec3(x, y, z)) && route.size() > 0) { - auto &first = route.front(); auto &last = route.back(); - - PushMoveTo(ent.second, x, y, z, mode); + + if (zone->watermap->InLiquid(who->GetPosition())) { + PushSwimTo(ent.second, x, y, z, mode); + } + else { + PushMoveTo(ent.second, x, y, z, mode); + } + PushStopMoving(ent.second); return; } else if(route.size() < 2) { + if (zone->watermap->InLiquid(who->GetPosition())) { + PushSwimTo(ent.second, x, y, z, mode); + } + else { + PushMoveTo(ent.second, x, y, z, mode); + } + PushMoveTo(ent.second, x, y, z, mode); PushStopMoving(ent.second); return; } } - + auto &first = route.front(); auto &last = route.back(); - + if (zone->HasWaterMap()) { //If who is underwater & who is not at the first node //Add node at who @@ -656,7 +773,7 @@ void MobMovementManager::UpdatePath(Mob *who, float x, float y, float z, MobMove IPathfinder::IPathNode node(who->GetPosition()); route.push_front(node); } - + //If xyz is underwater & xyz is not at the last node //Add node at xyz if (!IsPositionEqualWithinCertainZ(glm::vec3(x, y, z), last.pos, 5.0f) @@ -666,60 +783,54 @@ void MobMovementManager::UpdatePath(Mob *who, float x, float y, float z, MobMove route.push_back(node); } } - + //adjust route AdjustRoute(route, who->GetFlyMode(), who->GetZOffset()); - + auto eiter = _impl->Entries.find(who); auto &ent = (*eiter); auto iter = route.begin(); glm::vec3 previous_pos(who->GetX(), who->GetY(), who->GetZ()); bool first_node = true; - + //for each node while (iter != route.end()) { auto ¤t_node = (*iter); - + iter++; - + if (iter == route.end()) { continue; } - + previous_pos = current_node.pos; auto &next_node = (*iter); - + if (first_node) { - + if (mode == MovementWalking) { auto h = who->CalculateHeadingToTarget(next_node.pos.x, next_node.pos.y); PushRotateTo(ent.second, who, h, mode); } - + first_node = false; } - - //if underwater only mob and node -> node + 1 is moving to land (terminate route, npc will go to the point where it would normally exit the water but no further) - if (who->IsUnderwaterOnly()) { - if (zone->HasWaterMap() && !zone->watermap->InLiquid(next_node.pos)) { - PushStopMoving(ent.second); - return; - } - } - + //move to / teleport to node + 1 if (next_node.teleport && next_node.pos.x != 0.0f && next_node.pos.y != 0.0f) { PushTeleportTo(ent.second, next_node.pos.x, next_node.pos.y, next_node.pos.z, CalculateHeadingAngleBetweenPositions(current_node.pos.x, current_node.pos.y, next_node.pos.x, next_node.pos.y)); } else { - if (next_node.pos.x != 0.0f && next_node.pos.y != 0.0f) - { + if (zone->watermap->InLiquid(previous_pos)) { + PushSwimTo(ent.second, next_node.pos.x, next_node.pos.y, next_node.pos.z, mode); + } + else { PushMoveTo(ent.second, next_node.pos.x, next_node.pos.y, next_node.pos.z, mode); } } } - + //if stuck then handle stuck if (stuck) { PushMoveTo(ent.second, x, y, z, mode); @@ -739,6 +850,11 @@ void MobMovementManager::PushMoveTo(MobMovementEntry &ent, float x, float y, flo ent.Commands.push_back(std::unique_ptr(new MoveToCommand(x, y, z, mode))); } +void MobMovementManager::PushSwimTo(MobMovementEntry &ent, float x, float y, float z, MobMovementMode mode) +{ + ent.Commands.push_back(std::unique_ptr(new SwimToCommand(x, y, z, mode))); +} + void MobMovementManager::PushRotateTo(MobMovementEntry &ent, Mob *who, float to, MobMovementMode mode) { auto from = FixHeading(who->GetHeading()); diff --git a/zone/mob_movement_manager.h b/zone/mob_movement_manager.h index 4e8d73451..13b7b3b5b 100644 --- a/zone/mob_movement_manager.h +++ b/zone/mob_movement_manager.h @@ -60,6 +60,7 @@ private: void UpdatePath(Mob *who, float x, float y, float z, MobMovementMode mode); void PushTeleportTo(MobMovementEntry &ent, float x, float y, float z, float heading); void PushMoveTo(MobMovementEntry &ent, float x, float y, float z, MobMovementMode mode); + void PushSwimTo(MobMovementEntry &ent, float x, float y, float z, MobMovementMode mode); void PushRotateTo(MobMovementEntry &ent, Mob *who, float to, MobMovementMode mode); void PushStopMoving(MobMovementEntry &ent); diff --git a/zone/npc.cpp b/zone/npc.cpp index 05db28e1d..98d20bd72 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -39,6 +39,7 @@ #include "spawn2.h" #include "zone.h" #include "quest_parser_collection.h" +#include "water_map.h" #include #include @@ -412,6 +413,20 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, const glm::vec4& position, Gravit AISpellVar.idle_no_sp_recast_min = RuleI(Spells, AI_IdleNoSpellMinRecast); AISpellVar.idle_no_sp_recast_max = RuleI(Spells, AI_IdleNoSpellMaxRecast); AISpellVar.idle_beneficial_chance = RuleI(Spells, AI_IdleBeneficialChance); + + if (zone->watermap) { + auto mode = GetFlyMode(); + if (mode == GravityBehavior::Ground) { + if (zone->watermap->InLiquid(m_Position)) { + SetFlyMode(GravityBehavior::Water); + } + } + else if (mode == GravityBehavior::Water) { + if (!zone->watermap->InLiquid(m_Position)) { + SetFlyMode(GravityBehavior::Ground); + } + } + } } NPC::~NPC() diff --git a/zone/pathfinder_interface.h b/zone/pathfinder_interface.h index 85a153813..92405691a 100644 --- a/zone/pathfinder_interface.h +++ b/zone/pathfinder_interface.h @@ -6,6 +6,24 @@ class Client; class Seperator; +enum PathingPolyFlags +{ + PathingNormal = 1, + PathingWater = 2, + PathingLava = 4, + PathingZoneLine = 8, + PathingPvP = 16, + PathingSlime = 32, + PathingIce = 64, + PathingVWater = 128, + PathingGeneralArea = 256, + PathingPortal = 512, + PathingPrefer = 1024, + PathingDisabled = 2048, + PathingAll = 65535, + PathingNotDisabled = PathingAll ^ PathingDisabled +}; + class IPathfinder { public: @@ -29,7 +47,7 @@ public: IPathfinder() { } virtual ~IPathfinder() { } - virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &stuck) = 0; + virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &stuck, int flags = PathingNotDisabled) = 0; virtual glm::vec3 GetRandomLocation(const glm::vec3 &start) = 0; virtual void DebugCommand(Client *c, const Seperator *sep) = 0; diff --git a/zone/pathfinder_nav_mesh.cpp b/zone/pathfinder_nav_mesh.cpp index cddf8d151..5e3217191 100644 --- a/zone/pathfinder_nav_mesh.cpp +++ b/zone/pathfinder_nav_mesh.cpp @@ -33,7 +33,7 @@ PathfinderNavmesh::~PathfinderNavmesh() Clear(); } -IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &stuck) +IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &stuck, int flags) { partial = false; @@ -50,7 +50,7 @@ IPathfinder::IPath PathfinderNavmesh::FindRoute(const glm::vec3 &start, const gl glm::vec3 dest_location(end.x, end.z, end.y); dtQueryFilter filter; - filter.setIncludeFlags(65535U ^ 2048); + filter.setIncludeFlags(flags); filter.setAreaCost(0, 1.0f); //Normal filter.setAreaCost(1, 3.0f); //Water filter.setAreaCost(2, 5.0f); //Lava diff --git a/zone/pathfinder_nav_mesh.h b/zone/pathfinder_nav_mesh.h index 40fca0b3b..42dd28988 100644 --- a/zone/pathfinder_nav_mesh.h +++ b/zone/pathfinder_nav_mesh.h @@ -9,7 +9,7 @@ public: PathfinderNavmesh(const std::string &path); virtual ~PathfinderNavmesh(); - virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &stuck); + virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &stuck, int flags = PathingNotDisabled); virtual glm::vec3 GetRandomLocation(const glm::vec3 &start); virtual void DebugCommand(Client *c, const Seperator *sep); diff --git a/zone/pathfinder_null.cpp b/zone/pathfinder_null.cpp index 4a5cbbe63..400b98be4 100644 --- a/zone/pathfinder_null.cpp +++ b/zone/pathfinder_null.cpp @@ -1,6 +1,6 @@ #include "pathfinder_null.h" -IPathfinder::IPath PathfinderNull::FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &stuck) +IPathfinder::IPath PathfinderNull::FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &stuck, int flags) { partial = false; stuck = false; diff --git a/zone/pathfinder_null.h b/zone/pathfinder_null.h index 242dcf755..e5da24146 100644 --- a/zone/pathfinder_null.h +++ b/zone/pathfinder_null.h @@ -8,7 +8,7 @@ public: PathfinderNull() { } virtual ~PathfinderNull() { } - virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &stuck); + virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &stuck, int flags = PathingNotDisabled); virtual glm::vec3 GetRandomLocation(const glm::vec3 &start); virtual void DebugCommand(Client *c, const Seperator *sep) { } }; diff --git a/zone/pathfinder_waypoint.cpp b/zone/pathfinder_waypoint.cpp index 9e9831e9c..3d3f0162d 100644 --- a/zone/pathfinder_waypoint.cpp +++ b/zone/pathfinder_waypoint.cpp @@ -114,7 +114,7 @@ PathfinderWaypoint::~PathfinderWaypoint() { } -IPathfinder::IPath PathfinderWaypoint::FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &stuck) +IPathfinder::IPath PathfinderWaypoint::FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &stuck, int flags) { stuck = false; partial = false; diff --git a/zone/pathfinder_waypoint.h b/zone/pathfinder_waypoint.h index 1570eca24..8fc29d0c4 100644 --- a/zone/pathfinder_waypoint.h +++ b/zone/pathfinder_waypoint.h @@ -11,7 +11,7 @@ public: PathfinderWaypoint(const std::string &path); virtual ~PathfinderWaypoint(); - virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &stuck); + virtual IPath FindRoute(const glm::vec3 &start, const glm::vec3 &end, bool &partial, bool &stuck, int flags = PathingNotDisabled); virtual glm::vec3 GetRandomLocation(const glm::vec3 &start); virtual void DebugCommand(Client *c, const Seperator *sep); From 8f0051db8dacc060c3ad48a395e15af155223d36 Mon Sep 17 00:00:00 2001 From: KimLS Date: Fri, 9 Nov 2018 00:54:51 -0800 Subject: [PATCH 434/670] Changes to various path finding behavior --- zone/aa.cpp | 6 +- zone/aggro.cpp | 2 +- zone/client.cpp | 2 +- zone/command.cpp | 2 +- zone/entity.cpp | 16 --- zone/forage.cpp | 2 +- zone/hate_list.cpp | 17 --- zone/horse.cpp | 2 +- zone/lua_general.cpp | 2 +- zone/merc.cpp | 2 +- zone/mob.cpp | 15 ++- zone/mob_ai.cpp | 24 +++-- zone/mob_movement_manager.cpp | 195 +++++++++++++++++++--------------- zone/mob_movement_manager.h | 3 + zone/npc.cpp | 16 +-- zone/pets.cpp | 2 +- zone/questmgr.cpp | 8 +- zone/spawn2.cpp | 2 +- zone/waypoints.cpp | 2 +- zone/zone.cpp | 2 +- 20 files changed, 157 insertions(+), 165 deletions(-) diff --git a/zone/aa.cpp b/zone/aa.cpp index 5a2b87bb5..4ea307a0d 100644 --- a/zone/aa.cpp +++ b/zone/aa.cpp @@ -126,7 +126,7 @@ void Mob::TemporaryPets(uint16 spell_id, Mob *targ, const char *name_override, u (npc_dup != nullptr) ? npc_dup : npc_type, //make sure we give the NPC the correct data pointer 0, GetPosition() + glm::vec4(swarmPetLocations[summon_count], 0.0f, 0.0f), - GravityBehavior::Ground); + GravityBehavior::Water); if (followme) swarm_pet_npc->SetFollowID(GetID()); @@ -225,7 +225,7 @@ void Mob::TypesTemporaryPets(uint32 typesid, Mob *targ, const char *name_overrid (npc_dup!=nullptr)?npc_dup:npc_type, //make sure we give the NPC the correct data pointer 0, GetPosition() + glm::vec4(swarmPetLocations[summon_count], 0.0f, 0.0f), - GravityBehavior::Ground); + GravityBehavior::Water); if (followme) swarm_pet_npc->SetFollowID(GetID()); @@ -413,7 +413,7 @@ void Mob::WakeTheDead(uint16 spell_id, Mob *target, uint32 duration) make_npc->d_melee_texture1 = 0; make_npc->d_melee_texture2 = 0; - auto npca = new NPC(make_npc, 0, GetPosition(), GravityBehavior::Ground); + auto npca = new NPC(make_npc, 0, GetPosition(), GravityBehavior::Water); if(!npca->GetSwarmInfo()){ auto nSI = new SwarmPet; diff --git a/zone/aggro.cpp b/zone/aggro.cpp index 0b61662fc..de83d12e8 100644 --- a/zone/aggro.cpp +++ b/zone/aggro.cpp @@ -954,7 +954,7 @@ bool Mob::CombatRange(Mob* other) if (_DistNoRoot <= size_mod) { //A hack to kill an exploit till we get something better. - if (flymode == GravityBehavior::Ground && _zDist > 500 && !CheckLastLosState()) { + if (flymode != GravityBehavior::Flying && _zDist > 500 && !CheckLastLosState()) { return false; } diff --git a/zone/client.cpp b/zone/client.cpp index 45ce6791c..9fa8fbec7 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -6281,7 +6281,7 @@ void Client::Doppelganger(uint16 spell_id, Mob *target, const char *name_overrid (npc_dup!=nullptr)?npc_dup:npc_type, //make sure we give the NPC the correct data pointer 0, GetPosition() + glm::vec4(swarmPetLocations[summon_count], 0.0f, 0.0f), - GravityBehavior::Ground); + GravityBehavior::Water); if(!swarm_pet_npc->GetSwarmInfo()){ auto nSI = new SwarmPet; diff --git a/zone/command.cpp b/zone/command.cpp index 3e9abd29f..5c07c4096 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -2611,7 +2611,7 @@ void command_npctypespawn(Client *c, const Seperator *sep) const NPCType* tmp = 0; if ((tmp = database.LoadNPCTypesData(atoi(sep->arg[1])))) { //tmp->fixedZ = 1; - auto npc = new NPC(tmp, 0, c->GetPosition(), GravityBehavior::Ground); + auto npc = new NPC(tmp, 0, c->GetPosition(), GravityBehavior::Water); if (npc && sep->IsNumber(2)) npc->SetNPCFactionID(atoi(sep->arg[2])); diff --git a/zone/entity.cpp b/zone/entity.cpp index 0ae9600d9..f7f5b4594 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -3438,22 +3438,6 @@ void EntityList::ProcessMove(NPC *n, float x, float y, float z) { args.push_back(&evt.area_type); parse->EventNPC(evt.event_id, evt.npc, evt.client, "", 0, &args); } - - if (zone->watermap) { - auto mode = n->GetFlyMode(); - if (mode == GravityBehavior::Ground) { - if (zone->watermap->InLiquid(glm::vec3(x, y, z))) - { - n->SetFlyMode(GravityBehavior::Water); - } - } - else if (mode == GravityBehavior::Water) { - if (!zone->watermap->InLiquid(glm::vec3(x, y, z))) - { - n->SetFlyMode(GravityBehavior::Ground); - } - } - } } void EntityList::AddArea(int id, int type, float min_x, float max_x, float min_y, diff --git a/zone/forage.cpp b/zone/forage.cpp index ede05c59f..77361ce33 100644 --- a/zone/forage.cpp +++ b/zone/forage.cpp @@ -284,7 +284,7 @@ void Client::GoFish() if (tmp != nullptr) { auto positionNPC = GetPosition(); positionNPC.x = positionNPC.x + 3; - auto npc = new NPC(tmp, nullptr, positionNPC, GravityBehavior::Ground); + auto npc = new NPC(tmp, nullptr, positionNPC, GravityBehavior::Water); npc->AddLootTable(); if (npc->DropsGlobalLoot()) npc->CheckGlobalLootTables(); diff --git a/zone/hate_list.cpp b/zone/hate_list.cpp index 3f1fbf892..242a4c8e3 100644 --- a/zone/hate_list.cpp +++ b/zone/hate_list.cpp @@ -335,15 +335,6 @@ Mob *HateList::GetEntWithMostHateOnList(Mob *center, Mob *skip) continue; } - auto hateEntryPosition = glm::vec3(cur->entity_on_hatelist->GetX(), cur->entity_on_hatelist->GetY(), cur->entity_on_hatelist->GetZ()); - if (center->IsNPC() && center->CastToNPC()->IsUnderwaterOnly() && zone->HasWaterMap()) { - if (!zone->watermap->InLiquid(hateEntryPosition)) { - skipped_count++; - ++iterator; - continue; - } - } - if (cur->entity_on_hatelist->Sanctuary()) { if (hate == -1) { @@ -474,14 +465,6 @@ Mob *HateList::GetEntWithMostHateOnList(Mob *center, Mob *skip) continue; } - if (center->IsNPC() && center->CastToNPC()->IsUnderwaterOnly() && zone->HasWaterMap()) { - if(!zone->watermap->InLiquid(glm::vec3(cur->entity_on_hatelist->GetPosition()))) { - skipped_count++; - ++iterator; - continue; - } - } - if (cur->entity_on_hatelist != nullptr && ((cur->stored_hate_amount > hate) || cur->is_entity_frenzy)) { top_hate = cur->entity_on_hatelist; diff --git a/zone/horse.cpp b/zone/horse.cpp index d7d242e83..9f5c9b4d3 100644 --- a/zone/horse.cpp +++ b/zone/horse.cpp @@ -30,7 +30,7 @@ std::map Horse::horse_types; LinkedList horses_auto_delete; Horse::Horse(Client *_owner, uint16 spell_id, const glm::vec4& position) - : NPC(GetHorseType(spell_id), nullptr, position, GravityBehavior::Ground) + : NPC(GetHorseType(spell_id), nullptr, position, GravityBehavior::Water) { //give the horse its proper name. strn0cpy(name, _owner->GetCleanName(), 55); diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp index 5979a3959..bcf597d3e 100644 --- a/zone/lua_general.cpp +++ b/zone/lua_general.cpp @@ -1499,7 +1499,7 @@ void lua_create_npc(luabind::adl::object table, float x, float y, float z, float LuaCreateNPCParse(no_target_hotkey, bool, false); LuaCreateNPCParse(raid_target, bool, false); - NPC* npc = new NPC(npc_type, nullptr, glm::vec4(x, y, z, heading), GravityBehavior::Ground); + NPC* npc = new NPC(npc_type, nullptr, glm::vec4(x, y, z, heading), GravityBehavior::Water); npc->GiveNPCTypeData(npc_type); entity_list.AddNPC(npc); } diff --git a/zone/merc.cpp b/zone/merc.cpp index f8d4469de..f26531ccf 100644 --- a/zone/merc.cpp +++ b/zone/merc.cpp @@ -29,7 +29,7 @@ extern volatile bool is_zone_loaded; #endif Merc::Merc(const NPCType* d, float x, float y, float z, float heading) -: NPC(d, nullptr, glm::vec4(x, y, z, heading), GravityBehavior::Ground, false), endupkeep_timer(1000), rest_timer(1), confidence_timer(6000), check_target_timer(2000) +: NPC(d, nullptr, glm::vec4(x, y, z, heading), GravityBehavior::Water, false), endupkeep_timer(1000), rest_timer(1), confidence_timer(6000), check_target_timer(2000) { base_hp = d->max_hp; base_mana = d->Mana; diff --git a/zone/mob.cpp b/zone/mob.cpp index b34b667d7..a07eed7e3 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -24,6 +24,7 @@ #include "string_ids.h" #include "worldserver.h" #include "mob_movement_manager.h" +#include "water_map.h" #include #include @@ -427,7 +428,7 @@ Mob::Mob(const char* in_name, m_TargetRing = glm::vec3(); - flymode = GravityBehavior::Ground; + flymode = GravityBehavior::Water; DistractedFromGrid = false; hate_list.SetHateOwner(this); @@ -5995,8 +5996,16 @@ float Mob::GetDefaultRaceSize() const { void Mob::TryFixZ(int32 z_find_offset, bool fix_client_z) { - if (fix_z_timer.Check() && flymode == GravityBehavior::Ground) { - FixZ(); + if (fix_z_timer.Check() && flymode != GravityBehavior::Flying) { + auto watermap = zone->watermap; + if (watermap) { + if (!watermap->InLiquid(m_Position)) { + FixZ(); + } + } + else { + FixZ(); + } } } diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 6c740a397..e1a499e64 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1363,16 +1363,20 @@ void Mob::AI_Process() { else { //we cannot reach our target... //underwater stuff only works with water maps in the zone! - if (IsNPC() && CastToNPC()->IsUnderwaterOnly() && zone->HasWaterMap()) { - auto targetPosition = glm::vec3(target->GetX(), target->GetY(), target->GetZ()); - if (!zone->watermap->InLiquid(targetPosition)) { - Mob *tar = hate_list.GetEntWithMostHateOnList(this); - if (tar != nullptr && tar != target) { - SetTarget(tar); - return; - } - } - } + //if (IsNPC() && CastToNPC()->IsUnderwaterOnly() && zone->HasWaterMap()) { + // auto targetPosition = glm::vec3(target->GetX(), target->GetY(), target->GetZ()); + // if (!zone->watermap->InLiquid(targetPosition)) { + // Mob *tar = hate_list.GetEntWithMostHateOnList(this); + // if (tar != nullptr && tar != target) { + // SetTarget(tar); + // RunTo(tar->GetX(), tar->GetY(), tar->GetZ()); + // return; + // } + // else { + // RunTo(target->GetX(), target->GetY(), target->GetZ()); + // } + // } + //} // See if we can summon the mob to us if (!HateSummon()) { diff --git a/zone/mob_movement_manager.cpp b/zone/mob_movement_manager.cpp index c4fc822a8..603dc2234 100644 --- a/zone/mob_movement_manager.cpp +++ b/zone/mob_movement_manager.cpp @@ -428,18 +428,20 @@ struct MobMovementEntry NavigateTo NavTo; }; -void AdjustRoute(std::list &nodes, int flymode, float offset) { +void AdjustRoute(std::list &nodes, Mob *who) { if (!zone->HasMap() || !zone->HasWaterMap()) { return; } + auto offset = who->GetZOffset(); + for (auto &node : nodes) { - if (flymode == GravityBehavior::Ground || !zone->watermap->InLiquid(node.pos)) { + if(!zone->watermap->InLiquid(node.pos)) { auto best_z = zone->zonemap->FindBestZ(node.pos, nullptr); if (best_z != BEST_Z_INVALID) { node.pos.z = best_z + offset; } - } + } // todo: floating logic? } } @@ -701,99 +703,48 @@ void MobMovementManager::UpdatePath(Mob *who, float x, float y, float z, MobMove if (!zone->HasMap() || !zone->HasWaterMap()) { auto iter = _impl->Entries.find(who); auto &ent = (*iter); - + PushMoveTo(ent.second, x, y, z, mode); PushStopMoving(ent.second); - } - - if (zone->watermap->InLiquid(who->GetPosition()) - && zone->watermap->InLiquid(glm::vec3(x, y, z)) - && zone->zonemap->CheckLoS(who->GetPosition(), glm::vec3(x, y, z))) { - auto iter = _impl->Entries.find(who); - auto &ent = (*iter); - - PushSwimTo(ent.second, x, y, z, mode); - PushStopMoving(ent.second); return; } - bool partial = false; - bool stuck = false; - IPathfinder::IPath route; - if (who->IsUnderwaterOnly()) { - route = zone->pathing->FindRoute(glm::vec3(who->GetX(), who->GetY(), who->GetZ()), glm::vec3(x, y, z), partial, stuck, PathingWater | PathingLava | PathingVWater | PathingPortal | PathingPrefer); + if (who->IsBoat()) { + UpdatePathBoat(who, x, y, z, mode); + } else if (who->IsUnderwaterOnly()) { + UpdatePathUnderwater(who, x, y, z, mode); } else { - route = zone->pathing->FindRoute(glm::vec3(who->GetX(), who->GetY(), who->GetZ()), glm::vec3(x, y, z), partial, stuck, PathingNotDisabled ^ PathingZoneLine); + UpdatePathGround(who, x, y, z, mode); } +} - //if route empty or only has two points, and we have los, then just force npc to move to location - if (route.size() < 3) { - auto iter = _impl->Entries.find(who); - auto &ent = (*iter); - if (zone->zonemap->CheckLoS(who->GetPosition(), glm::vec3(x, y, z)) && route.size() > 0) - { - auto &first = route.front(); - auto &last = route.back(); - - if (zone->watermap->InLiquid(who->GetPosition())) { - PushSwimTo(ent.second, x, y, z, mode); - } - else { - PushMoveTo(ent.second, x, y, z, mode); - } - - PushStopMoving(ent.second); - return; - } - else if(route.size() < 2) - { - if (zone->watermap->InLiquid(who->GetPosition())) { - PushSwimTo(ent.second, x, y, z, mode); - } - else { - PushMoveTo(ent.second, x, y, z, mode); - } +void MobMovementManager::UpdatePathGround(Mob * who, float x, float y, float z, MobMovementMode mode) +{ + //This is probably pointless since the nav mesh tool currently sets zonelines to disabled anyway + auto partial = false; + auto stuck = false; + auto route = zone->pathing->FindRoute( + glm::vec3(who->GetX(), who->GetY(), who->GetZ()), + glm::vec3(x, y, z), + partial, + stuck, + PathingNotDisabled ^ PathingZoneLine); - PushMoveTo(ent.second, x, y, z, mode); - PushStopMoving(ent.second); - return; - } - } - - auto &first = route.front(); - auto &last = route.back(); - - if (zone->HasWaterMap()) { - //If who is underwater & who is not at the first node - //Add node at who - if (!IsPositionEqualWithinCertainZ(glm::vec3(who->GetX(), who->GetY(), who->GetZ()), first.pos, 5.0f) - && zone->watermap->InLiquid(who->GetPosition())) - { - IPathfinder::IPathNode node(who->GetPosition()); - route.push_front(node); - } - - //If xyz is underwater & xyz is not at the last node - //Add node at xyz - if (!IsPositionEqualWithinCertainZ(glm::vec3(x, y, z), last.pos, 5.0f) - && zone->watermap->InLiquid(glm::vec3(x, y, z))) - { - IPathfinder::IPathNode node(glm::vec3(x, y, z)); - route.push_back(node); - } - } - - //adjust route - AdjustRoute(route, who->GetFlyMode(), who->GetZOffset()); - auto eiter = _impl->Entries.find(who); auto &ent = (*eiter); + + if (route.size() == 0) { + //handle stuck behavior + return; + } + + AdjustRoute(route, who); + auto iter = route.begin(); glm::vec3 previous_pos(who->GetX(), who->GetY(), who->GetZ()); bool first_node = true; - - //for each node + while (iter != route.end()) { auto ¤t_node = (*iter); @@ -830,14 +781,86 @@ void MobMovementManager::UpdatePath(Mob *who, float x, float y, float z, MobMove } } } - - //if stuck then handle stuck + if (stuck) { - PushMoveTo(ent.second, x, y, z, mode); + //handle stuck } - else { - PushStopMoving(ent.second); +} + +void MobMovementManager::UpdatePathUnderwater(Mob * who, float x, float y, float z, MobMovementMode mode) +{ + auto partial = false; + auto stuck = false; + auto route = zone->pathing->FindRoute( + glm::vec3(who->GetX(), who->GetY(), who->GetZ()), + glm::vec3(x, y, z), + partial, + stuck, + PathingWater | PathingLava | PathingVWater | PathingPortal | PathingPrefer); + + auto eiter = _impl->Entries.find(who); + auto &ent = (*eiter); + + if (route.size() == 0) { + //handle stuck behavior + return; } + + AdjustRoute(route, who); + + auto iter = route.begin(); + glm::vec3 previous_pos(who->GetX(), who->GetY(), who->GetZ()); + bool first_node = true; + + while (iter != route.end()) { + auto ¤t_node = (*iter); + + iter++; + + if (iter == route.end()) { + continue; + } + + previous_pos = current_node.pos; + auto &next_node = (*iter); + + if (first_node) { + + if (mode == MovementWalking) { + auto h = who->CalculateHeadingToTarget(next_node.pos.x, next_node.pos.y); + PushRotateTo(ent.second, who, h, mode); + } + + first_node = false; + } + + //move to / teleport to node + 1 + if (next_node.teleport && next_node.pos.x != 0.0f && next_node.pos.y != 0.0f) { + PushTeleportTo(ent.second, next_node.pos.x, next_node.pos.y, next_node.pos.z, + CalculateHeadingAngleBetweenPositions(current_node.pos.x, current_node.pos.y, next_node.pos.x, next_node.pos.y)); + } + else { + if (zone->watermap->InLiquid(previous_pos)) { + PushSwimTo(ent.second, next_node.pos.x, next_node.pos.y, next_node.pos.z, mode); + } + else { + PushMoveTo(ent.second, next_node.pos.x, next_node.pos.y, next_node.pos.z, mode); + } + } + } + + if (stuck) { + //handle stuck + } +} + +void MobMovementManager::UpdatePathBoat(Mob *who, float x, float y, float z, MobMovementMode mode) +{ + auto eiter = _impl->Entries.find(who); + auto &ent = (*eiter); + + PushSwimTo(ent.second, x, y, z, mode); + PushStopMoving(ent.second); } void MobMovementManager::PushTeleportTo(MobMovementEntry &ent, float x, float y, float z, float heading) diff --git a/zone/mob_movement_manager.h b/zone/mob_movement_manager.h index 13b7b3b5b..57cbfe4e1 100644 --- a/zone/mob_movement_manager.h +++ b/zone/mob_movement_manager.h @@ -58,6 +58,9 @@ private: void FillCommandStruct(PlayerPositionUpdateServer_Struct *spu, Mob *m, float dx, float dy, float dz, float dh, int anim); void UpdatePath(Mob *who, float x, float y, float z, MobMovementMode mode); + void UpdatePathGround(Mob *who, float x, float y, float z, MobMovementMode mode); + void UpdatePathUnderwater(Mob *who, float x, float y, float z, MobMovementMode mode); + void UpdatePathBoat(Mob *who, float x, float y, float z, MobMovementMode mode); void PushTeleportTo(MobMovementEntry &ent, float x, float y, float z, float heading); void PushMoveTo(MobMovementEntry &ent, float x, float y, float z, MobMovementMode mode); void PushSwimTo(MobMovementEntry &ent, float x, float y, float z, MobMovementMode mode); diff --git a/zone/npc.cpp b/zone/npc.cpp index 98d20bd72..dc96ff2ba 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -413,20 +413,6 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, const glm::vec4& position, Gravit AISpellVar.idle_no_sp_recast_min = RuleI(Spells, AI_IdleNoSpellMinRecast); AISpellVar.idle_no_sp_recast_max = RuleI(Spells, AI_IdleNoSpellMaxRecast); AISpellVar.idle_beneficial_chance = RuleI(Spells, AI_IdleBeneficialChance); - - if (zone->watermap) { - auto mode = GetFlyMode(); - if (mode == GravityBehavior::Ground) { - if (zone->watermap->InLiquid(m_Position)) { - SetFlyMode(GravityBehavior::Water); - } - } - else if (mode == GravityBehavior::Water) { - if (!zone->watermap->InLiquid(m_Position)) { - SetFlyMode(GravityBehavior::Ground); - } - } - } } NPC::~NPC() @@ -1202,7 +1188,7 @@ NPC* NPC::SpawnNPC(const char* spawncommand, const glm::vec4& position, Client* npc_type->prim_melee_type = 28; npc_type->sec_melee_type = 28; - auto npc = new NPC(npc_type, nullptr, position, GravityBehavior::Ground); + auto npc = new NPC(npc_type, nullptr, position, GravityBehavior::Water); npc->GiveNPCTypeData(npc_type); entity_list.AddNPC(npc); diff --git a/zone/pets.cpp b/zone/pets.cpp index bf2f0ad3a..ad88f7a60 100644 --- a/zone/pets.cpp +++ b/zone/pets.cpp @@ -425,7 +425,7 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower, into walls or objects (+10), this sometimes creates the "ghost" effect. I changed to +2 (as close as I could get while it still looked good). I also noticed this can happen if an NPC is spawned on the same spot of another or in a related bad spot.*/ Pet::Pet(NPCType *type_data, Mob *owner, PetType type, uint16 spell_id, int16 power) -: NPC(type_data, 0, owner->GetPosition() + glm::vec4(2.0f, 2.0f, 0.0f, 0.0f), GravityBehavior::Ground) +: NPC(type_data, 0, owner->GetPosition() + glm::vec4(2.0f, 2.0f, 0.0f, 0.0f), GravityBehavior::Water) { GiveNPCTypeData(type_data); typeofpet = type; diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index 0a86d9870..2b6c5d4a0 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -208,7 +208,7 @@ Mob* QuestManager::spawn2(int npc_type, int grid, int unused, const glm::vec4& p const NPCType* tmp = 0; if (tmp = database.LoadNPCTypesData(npc_type)) { - auto npc = new NPC(tmp, nullptr, position, GravityBehavior::Ground); + auto npc = new NPC(tmp, nullptr, position, GravityBehavior::Water); npc->AddLootTable(); if (npc->DropsGlobalLoot()) npc->CheckGlobalLootTables(); @@ -232,7 +232,7 @@ Mob* QuestManager::unique_spawn(int npc_type, int grid, int unused, const glm::v const NPCType* tmp = 0; if (tmp = database.LoadNPCTypesData(npc_type)) { - auto npc = new NPC(tmp, nullptr, position, GravityBehavior::Ground); + auto npc = new NPC(tmp, nullptr, position, GravityBehavior::Water); npc->AddLootTable(); if (npc->DropsGlobalLoot()) npc->CheckGlobalLootTables(); @@ -308,7 +308,7 @@ Mob* QuestManager::spawn_from_spawn2(uint32 spawn2_id) found_spawn->SetCurrentNPCID(npcid); auto position = glm::vec4(found_spawn->GetX(), found_spawn->GetY(), found_spawn->GetZ(), found_spawn->GetHeading()); - auto npc = new NPC(tmp, found_spawn, position, GravityBehavior::Ground); + auto npc = new NPC(tmp, found_spawn, position, GravityBehavior::Water); found_spawn->SetNPCPointer(npc); npc->AddLootTable(); @@ -1686,7 +1686,7 @@ void QuestManager::respawn(int npcTypeID, int grid) { const NPCType* npcType = nullptr; if ((npcType = database.LoadNPCTypesData(npcTypeID))) { - owner = new NPC(npcType, nullptr, owner->GetPosition(), GravityBehavior::Ground); + owner = new NPC(npcType, nullptr, owner->GetPosition(), GravityBehavior::Water); owner->CastToNPC()->AddLootTable(); if (owner->CastToNPC()->DropsGlobalLoot()) owner->CastToNPC()->CheckGlobalLootTables(); diff --git a/zone/spawn2.cpp b/zone/spawn2.cpp index 05e7e7926..3a6142c42 100644 --- a/zone/spawn2.cpp +++ b/zone/spawn2.cpp @@ -255,7 +255,7 @@ bool Spawn2::Process() { } currentnpcid = npcid; - NPC *npc = new NPC(tmp, this, glm::vec4(x, y, z, heading), GravityBehavior::Ground); + NPC *npc = new NPC(tmp, this, glm::vec4(x, y, z, heading), GravityBehavior::Water); npc->mod_prespawn(this); diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index e39a40221..833a8132b 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -610,7 +610,7 @@ float Mob::GetFixedZ(const glm::vec3 &destination, int32 z_find_offset) { if (zone->HasMap() && RuleB(Map, FixZWhenMoving)) { - if (flymode != GravityBehavior::Ground) + if (flymode == GravityBehavior::Flying) return new_z; if (zone->HasWaterMap() && zone->watermap->InLiquid(glm::vec3(m_Position))) diff --git a/zone/zone.cpp b/zone/zone.cpp index 7e2c597e0..ebc08ef09 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -2257,7 +2257,7 @@ void Zone::DoAdventureActions() const NPCType* tmp = database.LoadNPCTypesData(ds->data_id); if(tmp) { - NPC* npc = new NPC(tmp, nullptr, glm::vec4(ds->assa_x, ds->assa_y, ds->assa_z, ds->assa_h), GravityBehavior::Ground); + NPC* npc = new NPC(tmp, nullptr, glm::vec4(ds->assa_x, ds->assa_y, ds->assa_z, ds->assa_h), GravityBehavior::Water); npc->AddLootTable(); if (npc->DropsGlobalLoot()) npc->CheckGlobalLootTables(); From 81b409a2e467cc86a1f3963df3155e482ca4c36a Mon Sep 17 00:00:00 2001 From: KimLS Date: Fri, 9 Nov 2018 18:30:05 -0800 Subject: [PATCH 435/670] Working on stuck behavior handler, fix for world crash when you can't connect to a login server. --- world/login_server.cpp | 30 +++++++++++++++++ world/login_server.h | 4 +-- zone/mob_movement_manager.cpp | 62 ++++++++++++++++++++++++++--------- zone/mob_movement_manager.h | 1 + 4 files changed, 80 insertions(+), 17 deletions(-) diff --git a/world/login_server.cpp b/world/login_server.cpp index 97c9f5214..00a321953 100644 --- a/world/login_server.cpp +++ b/world/login_server.cpp @@ -306,6 +306,20 @@ void LoginServer::SendStatus() { delete pack; } +void LoginServer::SendPacket(ServerPacket *pack) +{ + if (IsLegacy) { + if (legacy_client) { + legacy_client->SendPacket(pack); + } + } + else { + if (client) { + client->SendPacket(pack); + } + } +} + void LoginServer::SendAccountUpdate(ServerPacket* pack) { ServerLSAccountUpdate_Struct* s = (ServerLSAccountUpdate_Struct *)pack->pBuffer; if (CanUpdate()) { @@ -315,3 +329,19 @@ void LoginServer::SendAccountUpdate(ServerPacket* pack) { SendPacket(pack); } } + +bool LoginServer::Connected() +{ + if (IsLegacy) { + if (legacy_client) { + return legacy_client->Connected(); + } + } + else { + if (client) { + return client->Connected(); + } + } + + return false; +} diff --git a/world/login_server.h b/world/login_server.h index 33fdac18c..03f80afe0 100644 --- a/world/login_server.h +++ b/world/login_server.h @@ -40,9 +40,9 @@ public: void SendNewInfo(); void SendStatus(); - void SendPacket(ServerPacket* pack) { if (IsLegacy) legacy_client->SendPacket(pack); else client->SendPacket(pack); } + void SendPacket(ServerPacket* pack); void SendAccountUpdate(ServerPacket* pack); - bool Connected() { return IsLegacy ? legacy_client->Connected() : client->Connected(); } + bool Connected(); bool MiniLogin() { return minilogin; } bool CanUpdate() { return CanAccountUpdate; } diff --git a/zone/mob_movement_manager.cpp b/zone/mob_movement_manager.cpp index 603dc2234..bdf75704f 100644 --- a/zone/mob_movement_manager.cpp +++ b/zone/mob_movement_manager.cpp @@ -735,7 +735,7 @@ void MobMovementManager::UpdatePathGround(Mob * who, float x, float y, float z, auto &ent = (*eiter); if (route.size() == 0) { - //handle stuck behavior + HandleStuckBehavior(who, x, y, z, mode); return; } @@ -782,13 +782,23 @@ void MobMovementManager::UpdatePathGround(Mob * who, float x, float y, float z, } } + PushStopMoving(ent.second); + if (stuck) { - //handle stuck + HandleStuckBehavior(who, x, y, z, mode); } } -void MobMovementManager::UpdatePathUnderwater(Mob * who, float x, float y, float z, MobMovementMode mode) +void MobMovementManager::UpdatePathUnderwater(Mob *who, float x, float y, float z, MobMovementMode mode) { + auto eiter = _impl->Entries.find(who); + auto &ent = (*eiter); + if (zone->watermap->InLiquid(who->GetPosition()) && zone->watermap->InLiquid(glm::vec3(x, y, z)) && zone->zonemap->CheckLoS(who->GetPosition(), glm::vec3(x, y, z))) { + PushSwimTo(ent.second, x, y, z, mode); + PushStopMoving(ent.second); + return; + } + auto partial = false; auto stuck = false; auto route = zone->pathing->FindRoute( @@ -796,13 +806,10 @@ void MobMovementManager::UpdatePathUnderwater(Mob * who, float x, float y, float glm::vec3(x, y, z), partial, stuck, - PathingWater | PathingLava | PathingVWater | PathingPortal | PathingPrefer); - - auto eiter = _impl->Entries.find(who); - auto &ent = (*eiter); + PathingNotDisabled ^ PathingZoneLine); if (route.size() == 0) { - //handle stuck behavior + HandleStuckBehavior(who, x, y, z, mode); return; } @@ -812,6 +819,30 @@ void MobMovementManager::UpdatePathUnderwater(Mob * who, float x, float y, float glm::vec3 previous_pos(who->GetX(), who->GetY(), who->GetZ()); bool first_node = true; + while (iter != route.end()) { + auto ¤t_node = (*iter); + + if (!zone->watermap->InLiquid(current_node.pos)) { + stuck = true; + + while (iter != route.end()) { + iter = route.erase(iter); + } + + break; + } + else { + iter++; + } + } + + if (route.size() == 0) { + HandleStuckBehavior(who, x, y, z, mode); + return; + } + + iter = route.begin(); + while (iter != route.end()) { auto ¤t_node = (*iter); @@ -840,17 +871,14 @@ void MobMovementManager::UpdatePathUnderwater(Mob * who, float x, float y, float CalculateHeadingAngleBetweenPositions(current_node.pos.x, current_node.pos.y, next_node.pos.x, next_node.pos.y)); } else { - if (zone->watermap->InLiquid(previous_pos)) { - PushSwimTo(ent.second, next_node.pos.x, next_node.pos.y, next_node.pos.z, mode); - } - else { - PushMoveTo(ent.second, next_node.pos.x, next_node.pos.y, next_node.pos.z, mode); - } + PushSwimTo(ent.second, next_node.pos.x, next_node.pos.y, next_node.pos.z, mode); } } + PushStopMoving(ent.second); + if (stuck) { - //handle stuck + HandleStuckBehavior(who, x, y, z, mode); } } @@ -904,3 +932,7 @@ void MobMovementManager::PushStopMoving(MobMovementEntry &ent) { ent.Commands.push_back(std::unique_ptr(new StopMovingCommand())); } + +void MobMovementManager::HandleStuckBehavior(Mob * who, float x, float y, float z, MobMovementMode mode) +{ +} diff --git a/zone/mob_movement_manager.h b/zone/mob_movement_manager.h index 57cbfe4e1..8966aa24b 100644 --- a/zone/mob_movement_manager.h +++ b/zone/mob_movement_manager.h @@ -66,6 +66,7 @@ private: void PushSwimTo(MobMovementEntry &ent, float x, float y, float z, MobMovementMode mode); void PushRotateTo(MobMovementEntry &ent, Mob *who, float to, MobMovementMode mode); void PushStopMoving(MobMovementEntry &ent); + void HandleStuckBehavior(Mob *who, float x, float y, float z, MobMovementMode mode); struct Implementation; std::unique_ptr _impl; From ab6cdd65a361f7bc0cf340e708cc8b97ff4cfa95 Mon Sep 17 00:00:00 2001 From: KimLS Date: Sun, 11 Nov 2018 01:04:25 -0800 Subject: [PATCH 436/670] Various stuck behavior --- zone/mob.h | 3 +- zone/mob_movement_manager.cpp | 76 ++++++++++++++++++++++++++++++++--- zone/mob_movement_manager.h | 10 +++++ zone/npc.h | 2 + zone/zonedb.cpp | 4 +- zone/zonedump.h | 1 + 6 files changed, 89 insertions(+), 7 deletions(-) diff --git a/zone/mob.h b/zone/mob.h index 967ab51f5..9e306c184 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -983,7 +983,8 @@ public: void TryFixZ(int32 z_find_offset = 5, bool fix_client_z = false); void FixZ(int32 z_find_offset = 5, bool fix_client_z = false); float GetFixedZ(const glm::vec3 &destination, int32 z_find_offset = 5); - + virtual int GetStuckBehavior() const { return 0; } + void NPCSpecialAttacks(const char* parse, int permtag, bool reset = true, bool remove = false); inline uint32 DontHealMeBefore() const { return pDontHealMeBefore; } inline uint32 DontBuffMeBefore() const { return pDontBuffMeBefore; } diff --git a/zone/mob_movement_manager.cpp b/zone/mob_movement_manager.cpp index bdf75704f..36f5aae5b 100644 --- a/zone/mob_movement_manager.cpp +++ b/zone/mob_movement_manager.cpp @@ -388,6 +388,38 @@ public: } }; +class EvadeCombatCommand : public IMovementCommand +{ +public: + EvadeCombatCommand() { + } + + virtual ~EvadeCombatCommand() { + + } + + virtual bool Process(MobMovementManager *mgr, Mob *m) { + if (!m->IsAIControlled()) { + return true; + } + + if (m->IsMoving()) { + m->SetMoving(false); + mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, 0, ClientRangeCloseMedium); + } + + m->BuffFadeAll(); + m->WipeHateList(); + m->Heal(); + + return true; + } + + virtual bool Started() const { + return false; + } +}; + struct MovementStats { MovementStats() { @@ -782,11 +814,12 @@ void MobMovementManager::UpdatePathGround(Mob * who, float x, float y, float z, } } - PushStopMoving(ent.second); - if (stuck) { HandleStuckBehavior(who, x, y, z, mode); } + else { + PushStopMoving(ent.second); + } } void MobMovementManager::UpdatePathUnderwater(Mob *who, float x, float y, float z, MobMovementMode mode) @@ -875,11 +908,12 @@ void MobMovementManager::UpdatePathUnderwater(Mob *who, float x, float y, float } } - PushStopMoving(ent.second); - if (stuck) { HandleStuckBehavior(who, x, y, z, mode); } + else { + PushStopMoving(ent.second); + } } void MobMovementManager::UpdatePathBoat(Mob *who, float x, float y, float z, MobMovementMode mode) @@ -933,6 +967,38 @@ void MobMovementManager::PushStopMoving(MobMovementEntry &ent) ent.Commands.push_back(std::unique_ptr(new StopMovingCommand())); } -void MobMovementManager::HandleStuckBehavior(Mob * who, float x, float y, float z, MobMovementMode mode) +void MobMovementManager::PushEvadeCombat(MobMovementEntry &ent) { + ent.Commands.push_back(std::unique_ptr(new EvadeCombatCommand())); +} + +void MobMovementManager::HandleStuckBehavior(Mob *who, float x, float y, float z, MobMovementMode mode) +{ + auto sb = who->GetStuckBehavior(); + MobStuckBehavior behavior = RunToTarget; + + if (sb >= 0 && sb < MaxStuckBehavior) { + behavior = (MobStuckBehavior)sb; + } + + auto eiter = _impl->Entries.find(who); + auto &ent = (*eiter); + + switch (sb) { + case RunToTarget: + PushMoveTo(ent.second, x, y, z, mode); + PushStopMoving(ent.second); + break; + case WarpToTarget: + PushTeleportTo(ent.second, x, y, z, 0.0f); + PushStopMoving(ent.second); + break; + case TakeNoAction: + PushStopMoving(ent.second); + break; + case EvadeCombat: + //PushEvadeCombat(ent.second); + PushStopMoving(ent.second); + break; + } } diff --git a/zone/mob_movement_manager.h b/zone/mob_movement_manager.h index 8966aa24b..d9b2e7845 100644 --- a/zone/mob_movement_manager.h +++ b/zone/mob_movement_manager.h @@ -27,6 +27,15 @@ enum MobMovementMode : int MovementRunning = 1 }; +enum MobStuckBehavior : int +{ + RunToTarget, + WarpToTarget, + TakeNoAction, + EvadeCombat, + MaxStuckBehavior +}; + class MobMovementManager { public: @@ -66,6 +75,7 @@ private: void PushSwimTo(MobMovementEntry &ent, float x, float y, float z, MobMovementMode mode); void PushRotateTo(MobMovementEntry &ent, Mob *who, float to, MobMovementMode mode); void PushStopMoving(MobMovementEntry &ent); + void PushEvadeCombat(MobMovementEntry &ent); void HandleStuckBehavior(Mob *who, float x, float y, float z, MobMovementMode mode); struct Implementation; diff --git a/zone/npc.h b/zone/npc.h index 5844c1a83..6917b0ec4 100644 --- a/zone/npc.h +++ b/zone/npc.h @@ -434,6 +434,8 @@ public: std::unique_ptr AIautocastspell_timer; + virtual int GetStuckBehavior() const { return NPCTypedata_ours ? NPCTypedata_ours->stuck_behavior : NPCTypedata->stuck_behavior; } + protected: const NPCType* NPCTypedata; diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index 027225243..db1da7868 100644 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -2471,7 +2471,8 @@ const NPCType* ZoneDatabase::LoadNPCTypesData(uint32 npc_type_id, bool bulk_load "npc_types.charm_avoidance_rating, " "npc_types.charm_atk, " "npc_types.skip_global_loot, " - "npc_types.rare_spawn " + "npc_types.rare_spawn, " + "npc_types.stuck_behavior " "FROM npc_types %s", where_condition.c_str() ); @@ -2660,6 +2661,7 @@ const NPCType* ZoneDatabase::LoadNPCTypesData(uint32 npc_type_id, bool bulk_load temp_npctype_data->skip_global_loot = atoi(row[107]) != 0; temp_npctype_data->rare_spawn = atoi(row[108]) != 0; + temp_npctype_data->stuck_behavior = atoi(row[109]); // If NPC with duplicate NPC id already in table, // free item we attempted to add. diff --git a/zone/zonedump.h b/zone/zonedump.h index 66c7ec01d..6636bfa1e 100644 --- a/zone/zonedump.h +++ b/zone/zonedump.h @@ -143,6 +143,7 @@ struct NPCType bool untargetable; bool skip_global_loot; bool rare_spawn; + int8 stuck_behavior; }; namespace player_lootitem { From e8dffa108766155a98c0ae534a97e7020a4f3378 Mon Sep 17 00:00:00 2001 From: KimLS Date: Sun, 11 Nov 2018 01:11:07 -0800 Subject: [PATCH 437/670] Stuck behavior sql --- utils/sql/db_update_manifest.txt | 1 + utils/sql/git/required/2018_11_11_StuckBehavior.sql | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 utils/sql/git/required/2018_11_11_StuckBehavior.sql diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index 587839291..1d0a22cf2 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -383,6 +383,7 @@ 9127|2018_09_07_NPCMaxAggroDist.sql|SHOW COLUMNS FROM `zone` LIKE 'npc_max_aggro_dist'|empty| 9128|2018_08_13_inventory_version_update.sql|SHOW TABLES LIKE 'inventory_version'|not_empty| 9129|2018_08_13_inventory_update.sql|SHOW TABLES LIKE 'inventory_versions'|empty| +9130|2018_11_11_StuckBehavior.sql|SHOW COLUMNS FROM `npc_types` LIKE 'stuck_behavior'|empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/utils/sql/git/required/2018_11_11_StuckBehavior.sql b/utils/sql/git/required/2018_11_11_StuckBehavior.sql new file mode 100644 index 000000000..9d2e30e29 --- /dev/null +++ b/utils/sql/git/required/2018_11_11_StuckBehavior.sql @@ -0,0 +1,2 @@ +ALTER TABLE `npc_types` ADD COLUMN `stuck_behavior` TINYINT(4) NOT NULL DEFAULT '0' AFTER `rare_spawn`; +UPDATE `npc_types` SET `stuck_behavior`=2 WHERE `underwater`=1; From 4758c04e99df22f885d21bd89a564eedbec03bf9 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Tue, 13 Nov 2018 03:07:18 -0600 Subject: [PATCH 438/670] More mob_info work --- common/string_util.cpp | 18 ++- common/string_util.h | 1 + zone/mob.h | 13 ++ zone/mob_info.cpp | 279 ++++++++++++++++++++++++++++++++++------- zone/npc.cpp | 91 ++++++++++++++ zone/npc.h | 24 +++- 6 files changed, 379 insertions(+), 47 deletions(-) diff --git a/common/string_util.cpp b/common/string_util.cpp index 609841807..59eb0ab83 100644 --- a/common/string_util.cpp +++ b/common/string_util.cpp @@ -72,6 +72,18 @@ const std::string str_tolower(std::string s) return s; } +std::vector split(std::string str_to_split, char delimiter) +{ + std::stringstream ss(str_to_split); + std::string item; + std::vector exploded_values; + while (std::getline(ss, item, delimiter)) { + exploded_values.push_back(item); + } + + return exploded_values; +} + const std::string str_toupper(std::string s) { std::transform( @@ -85,16 +97,16 @@ const std::string ucfirst(std::string s) { std::string output = s; if (!s.empty()) - output[0] = static_cast(toupper(s[0])); + output[0] = static_cast(std::toupper(s[0])); return output; } -const std::string StringFormat(const char* format, ...) +const std::string StringFormat(const char *format, ...) { va_list args; va_start(args, format); - std::string output = vStringFormat(format,args); + std::string output = vStringFormat(format, args); va_end(args); return output; } diff --git a/common/string_util.h b/common/string_util.h index 68c711789..03848813c 100644 --- a/common/string_util.h +++ b/common/string_util.h @@ -27,6 +27,7 @@ const std::string str_tolower(std::string s); const std::string str_toupper(std::string s); const std::string ucfirst(std::string s); +std::vector split(std::string str_to_split, char delimiter); const std::string StringFormat(const char* format, ...); const std::string vStringFormat(const char* format, va_list args); std::vector SplitString(const std::string &s, char delim); diff --git a/zone/mob.h b/zone/mob.h index 120b89539..eac81b177 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -486,6 +486,11 @@ public: inline virtual int32 GetINT() const { return INT + itembonuses.INT + spellbonuses.INT; } inline virtual int32 GetWIS() const { return WIS + itembonuses.WIS + spellbonuses.WIS; } inline virtual int32 GetCHA() const { return CHA + itembonuses.CHA + spellbonuses.CHA; } + inline virtual int32 GetHeroicMR() const { return 0; } + inline virtual int32 GetHeroicFR() const { return 0; } + inline virtual int32 GetHeroicDR() const { return 0; } + inline virtual int32 GetHeroicPR() const { return 0; } + inline virtual int32 GetHeroicCR() const { return 0; } inline virtual int32 GetMR() const { return MR + itembonuses.MR + spellbonuses.MR; } inline virtual int32 GetFR() const { return FR + itembonuses.FR + spellbonuses.FR; } inline virtual int32 GetDR() const { return DR + itembonuses.DR + spellbonuses.DR; } @@ -499,6 +504,13 @@ public: inline StatBonuses* GetItemBonusesPtr() { return &itembonuses; } inline StatBonuses* GetSpellBonusesPtr() { return &spellbonuses; } inline StatBonuses* GetAABonusesPtr() { return &aabonuses; } + inline virtual int32 GetHeroicSTR() const { return 0; } + inline virtual int32 GetHeroicSTA() const { return 0; } + inline virtual int32 GetHeroicDEX() const { return 0; } + inline virtual int32 GetHeroicAGI() const { return 0; } + inline virtual int32 GetHeroicINT() const { return 0; } + inline virtual int32 GetHeroicWIS() const { return 0; } + inline virtual int32 GetHeroicCHA() const { return 0; } inline virtual int32 GetMaxSTR() const { return GetSTR(); } inline virtual int32 GetMaxSTA() const { return GetSTA(); } inline virtual int32 GetMaxDEX() const { return GetDEX(); } @@ -518,6 +530,7 @@ public: inline int32 GetMaxMana() const { return max_mana; } inline int32 GetMana() const { return current_mana; } virtual int32 GetEndurance() const { return 0; } + virtual int32 GetMaxEndurance() const { return 0; } virtual void SetEndurance(int32 newEnd) { return; } int32 GetItemHPBonuses(); int32 GetSpellHPBonuses(); diff --git a/zone/mob_info.cpp b/zone/mob_info.cpp index bb6598641..7dc64b162 100644 --- a/zone/mob_info.cpp +++ b/zone/mob_info.cpp @@ -23,10 +23,32 @@ #include "../common/races.h" #include "../common/say_link.h" +std::string commify(const std::string &number) +{ + std::string temp_string; + + auto string_length = static_cast(number.length()); + int i = 0; + for (i = string_length - 3; i >= 0; i -= 3) { + if (i > 0) { + temp_string = "," + number.substr(static_cast(i), 3) + temp_string; + } + else { + temp_string = number.substr(static_cast(i), 3) + temp_string; + } + } + + if (i < 0) { + temp_string = number.substr(0, static_cast(3 + i)) + temp_string; + } + + return temp_string; +} + inline std::string GetMobAttributeByString(Mob *mob, const std::string &attribute) { if (attribute == "ac") { - return std::to_string(mob->GetAC()); + return commify(std::to_string(mob->GetAC())); } if (attribute == "atk") { @@ -39,71 +61,100 @@ inline std::string GetMobAttributeByString(Mob *mob, const std::string &attribut endurance = mob->CastToClient()->GetEndurance(); } - return std::to_string(endurance); + return commify(std::to_string(endurance)); } if (attribute == "hp") { - return std::to_string(mob->GetHP()); + return commify(std::to_string(mob->GetHP())); + } + + if (attribute == "hp_min_max") { + return commify(std::to_string(mob->GetHP())) + " / " + commify(std::to_string(mob->GetMaxHP())) + " (" + + std::to_string((int)mob->GetHPRatio()) + "%)"; } if (attribute == "mana") { - return std::to_string(mob->GetMana()); + return commify(std::to_string(mob->GetMana())); + } + + if (attribute == "mp_min_max") { + return commify(std::to_string(mob->GetMana())) + " / " + commify(std::to_string(mob->GetMaxMana())) + " (" + + std::to_string((int)mob->GetManaPercent()) + "%)"; + } + + if (attribute == "end_min_max") { + return commify(std::to_string(mob->GetEndurance())) + " / " + commify(std::to_string(mob->GetMaxEndurance())) + " (" + + std::to_string((int)mob->GetEndurancePercent()) + "%)"; } if (attribute == "str") { - return std::to_string(mob->GetSTR()); + return commify(std::to_string(mob->GetSTR())) + " / " + commify(std::to_string(mob->GetMaxSTR())) + " +" + + commify(std::to_string(mob->GetHeroicSTR())); } if (attribute == "sta") { - return std::to_string(mob->GetSTA()); + return commify(std::to_string(mob->GetSTA())) + " / " + commify(std::to_string(mob->GetMaxSTA())) + " +" + + commify(std::to_string(mob->GetHeroicSTA())); } if (attribute == "dex") { - return std::to_string(mob->GetDEX()); + return commify(std::to_string(mob->GetDEX())) + " / " + commify(std::to_string(mob->GetMaxDEX())) + " +" + + commify(std::to_string(mob->GetHeroicDEX())); } if (attribute == "agi") { - return std::to_string(mob->GetAGI()); + return commify(std::to_string(mob->GetAGI())) + " / " + commify(std::to_string(mob->GetMaxAGI())) + " +" + + commify(std::to_string(mob->GetHeroicAGI())); } if (attribute == "int") { - return std::to_string(mob->GetINT()); + return commify(std::to_string(mob->GetINT())) + " / " + commify(std::to_string(mob->GetMaxINT())) + " +" + + commify(std::to_string(mob->GetHeroicINT())); } if (attribute == "wis") { - return std::to_string(mob->GetWIS()); + return commify(std::to_string(mob->GetWIS())) + " / " + commify(std::to_string(mob->GetMaxWIS())) + " +" + + commify(std::to_string(mob->GetHeroicWIS())); } if (attribute == "cha") { - return std::to_string(mob->GetCHA()); + return commify(std::to_string(mob->GetCHA())) + " / " + commify(std::to_string(mob->GetMaxCHA())) + " +" + + commify(std::to_string(mob->GetHeroicCHA())); } if (attribute == "mr") { - return std::to_string(mob->GetMR()); + return commify(std::to_string(mob->GetMR())) + " / " + commify(std::to_string(mob->GetMaxMR())) + " +" + + commify(std::to_string(mob->GetHeroicMR())); } if (attribute == "cr") { - return std::to_string(mob->GetCR()); + return commify(std::to_string(mob->GetCR())) + " / " + commify(std::to_string(mob->GetMaxCR())) + " +" + + commify(std::to_string(mob->GetHeroicCR())); } if (attribute == "fr") { - return std::to_string(mob->GetFR()); + return commify(std::to_string(mob->GetFR())) + " / " + commify(std::to_string(mob->GetMaxFR())) + " +" + + commify(std::to_string(mob->GetHeroicFR())); } if (attribute == "pr") { - return std::to_string(mob->GetPR()); + return commify(std::to_string(mob->GetPR())) + " / " + commify(std::to_string(mob->GetMaxPR())) + " +" + + commify(std::to_string(mob->GetHeroicPR())); } if (attribute == "dr") { - return std::to_string(mob->GetDR()); + return commify(std::to_string(mob->GetDR())) + " / " + commify(std::to_string(mob->GetMaxDR())) + " +" + + commify(std::to_string(mob->GetHeroicDR())); } if (attribute == "cr") { - return std::to_string(mob->GetCR()); + return commify(std::to_string(mob->GetCR())) + " / " + commify(std::to_string(mob->GetMaxCR())) + " +" + + commify(std::to_string(mob->GetHeroicCR())); } if (attribute == "pr") { - return std::to_string(mob->GetPR()); + return commify(std::to_string(mob->GetPR())) + " / " + commify(std::to_string(mob->GetMaxPR())) + " +" + + commify(std::to_string(mob->GetHeroicPR())); } if (attribute == "cor") { @@ -118,8 +169,9 @@ inline std::string GetMobAttributeByString(Mob *mob, const std::string &attribut return mob->GetCleanName(); } - if (attribute == "lastname") { - return mob->GetLastName(); + if (attribute == "surname") { + std::string last_name = mob->GetLastName(); + return (last_name.length() > 0 ? mob->GetLastName() : " "); } if (attribute == "race") { @@ -134,6 +186,18 @@ inline std::string GetMobAttributeByString(Mob *mob, const std::string &attribut return std::to_string(mob->GetLevel()); } + if (attribute == "flymode") { + return std::to_string(mob->GetFlyMode()); + } + + if (attribute == "maxbuffslots") { + return std::to_string(mob->GetMaxBuffSlots()); + } + + if (attribute == "curbuffslots") { + return std::to_string(mob->GetCurrentBuffSlots()); + } + if (mob->IsNPC()) { NPC *npc = mob->CastToNPC(); @@ -150,13 +214,13 @@ inline std::string GetMobAttributeByString(Mob *mob, const std::string &attribut return std::to_string(npc->GetGender()); } if (attribute == "size") { - return std::to_string(npc->GetSize()); + return std::to_string((int)npc->GetSize()); } if (attribute == "runspeed") { - return std::to_string(npc->GetRunspeed()); + return std::to_string((int)npc->GetRunspeed()); } if (attribute == "walkspeed") { - return std::to_string(npc->GetWalkspeed()); + return std::to_string((int)npc->GetWalkspeed()); } if (attribute == "spawngroup") { return std::to_string(npc->GetSp2()); @@ -167,6 +231,85 @@ inline std::string GetMobAttributeByString(Mob *mob, const std::string &attribut if (attribute == "emote") { return std::to_string(npc->GetEmoteID()); } + if (attribute == "seeInvis") { + return std::to_string(npc->SeeInvisible()); + } + if (attribute == "seeInvisUndead") { + return std::to_string(npc->SeeInvisibleUndead()); + } + if (attribute == "faction") { + return std::to_string(npc->GetNPCFactionID()); + } + if (attribute == "loottable") { + return std::to_string(npc->GetLoottableID()); + } + if (attribute == "primSkill") { + return std::to_string(npc->GetPrimSkill()); + } + if (attribute == "secSkill") { + return std::to_string(npc->GetSecSkill()); + } + if (attribute == "meleeTexture1") { + return std::to_string(npc->GetMeleeTexture1()); + } + if (attribute == "meleeTexture2") { + return std::to_string(npc->GetMeleeTexture2()); + } + if (attribute == "aggrorange") { + return std::to_string((int)npc->GetAggroRange()); + } + if (attribute == "assistrange") { + return std::to_string((int)npc->GetAssistRange()); + } + if (attribute == "findable") { + return std::to_string(npc->IsFindable()); + } + if (attribute == "trackable") { + return std::to_string(npc->IsTrackable()); + } + if (attribute == "spellsid") { + return std::to_string(npc->GetNPCSpellsID()); + } + if (attribute == "roamboxMinX") { + return std::to_string((int)npc->GetRoamboxMinX()); + } + if (attribute == "roamboxMaxX") { + return std::to_string((int)npc->GetRoamboxMaxX()); + } + if (attribute == "roamboxMinY") { + return std::to_string((int)npc->GetRoamboxMinY()); + } + if (attribute == "roamboxMaxY") { + return std::to_string((int)npc->GetRoamboxMaxY()); + } + if (attribute == "roamboxMinDelay") { + return std::to_string((int)npc->GetRoamboxMinDelay()); + } + if (attribute == "roamboxDelay") { + return std::to_string((int)npc->GetRoamboxDelay()); + } + if (attribute == "roamboxDistance") { + return std::to_string((int)npc->GetRoamboxDistance()); + } + if (attribute == "proximityMinX") { + return std::to_string((int)npc->GetProximityMinX()); + } + if (attribute == "proximityMaxX") { + return std::to_string((int)npc->GetProximityMaxX()); + } + if (attribute == "proximityMinY") { + return std::to_string((int)npc->GetProximityMinY()); + } + if (attribute == "proximityMaxY") { + return std::to_string((int)npc->GetProximityMaxY()); + } + if (attribute == "proximityMinZ") { + return std::to_string((int)npc->GetProximityMinZ()); + } + if (attribute == "proximityMaxZ") { + return std::to_string((int)npc->GetProximityMaxZ()); + } + npc->GetNPCEmote(npc->GetEmoteID(), 0); } @@ -223,6 +366,11 @@ inline std::string WriteDisplayInfoSection( } std::string attribute_name = attribute; + + if (attribute_name.find('_') != std::string::npos) { + std::vector split_string = split(attribute_name, '_'); + attribute_name = split_string[0]; + } if (attribute_name.length() <= 3) { attribute_name = str_toupper(attribute_name); } @@ -289,32 +437,28 @@ void Mob::DisplayInfo(Mob *mob) // }; if (this->IsClient()) { - std::string window_text = "*Drag / Maximize Window to see all info

"; + std::string window_text = "*Drag window open vertically to see all
"; Client *client = this->CastToClient(); - std::vector who_attributes = { + std::vector info_attributes = { "name", - "lastname", - }; - window_text += WriteDisplayInfoSection(mob, "Who", who_attributes, 1, false); - - std::vector type_attributes = { "race", + "surname", "class", - "type" }; - window_text += WriteDisplayInfoSection(mob, "Type", type_attributes, 3, true); + window_text += WriteDisplayInfoSection(mob, "Info", info_attributes, 1, false); std::vector basic_attributes = { + "type", "level", - "hp", - "mana", - "end", + "hp_min_max", "ac", - "atk" + "mp_min_max", + "atk", + "end_min_max", }; - window_text += WriteDisplayInfoSection(mob, "Main", basic_attributes, 7, true); + window_text += WriteDisplayInfoSection(mob, "Main", basic_attributes, 1, false); std::vector stat_attributes = { "str", @@ -325,7 +469,7 @@ void Mob::DisplayInfo(Mob *mob) "int", "cha", }; - window_text += WriteDisplayInfoSection(mob, "Statistics", stat_attributes, 7, true); + window_text += WriteDisplayInfoSection(mob, "Statistics", stat_attributes, 1, false); std::vector resist_attributes = { "pr", @@ -336,9 +480,11 @@ void Mob::DisplayInfo(Mob *mob) "cor", "phy", }; - window_text += WriteDisplayInfoSection(mob, "Resists", resist_attributes, 7, true); + window_text += WriteDisplayInfoSection(mob, "Resists", resist_attributes, 1, false); if (mob->IsNPC()) { + NPC *npc = mob->CastToNPC(); + std::vector npc_attributes = { "npcid", "texture", @@ -350,13 +496,60 @@ void Mob::DisplayInfo(Mob *mob) "spawngroup", "grid", "emote", + "seeInvis", + "seeInvisUndead", + "faction", + "loottable", + "primSkill", + "secSkill", + "meleeTexture1", + "meleeTexture2", + "aggrorange", + "assistrange", + "findable", + "trackable", + "flymode", + "spellsid", + "curbuffslots", + "maxbuffslots", }; - window_text += WriteDisplayInfoSection(mob, "NPC Attributes", npc_attributes, 2, true); + + window_text += WriteDisplayInfoSection(mob, "NPC Attributes", npc_attributes, 1, true); + + /** + * Print Roambox + */ + if (npc->GetRoamboxMaxX() != 0 && npc->GetRoamboxMinX() != 0) { + std::vector npc_roambox = { + "roamboxMinX", + "roamboxMaxX", + "roamboxMinY", + "roamboxMaxY", + "roamboxMinDelay", + "roamboxDelay", + "roamboxDistance", + }; + + window_text += WriteDisplayInfoSection(mob, "Roambox", npc_roambox, 1, true); + } + + if (npc->proximity != nullptr) { + std::vector npc_proximity = { + "proximityMinX", + "proximityMaxX", + "proximityMinY", + "proximityMaxY", + "proximityMinZ", + "proximityMaxZ", + }; + + window_text += WriteDisplayInfoSection(mob, "Proximity", npc_proximity, 1, true); + } client->Message(0, " "); - mob->CastToNPC()->QueryLoot(client); + npc->QueryLoot(client); - NPCCommandsMenu(client, mob->CastToNPC()); + NPCCommandsMenu(client, npc); } std::cout << "Window Length: " << window_text.length() << std::endl; @@ -369,7 +562,7 @@ void Mob::DisplayInfo(Mob *mob) EQEmu::popupresponse::MOB_INFO_DISMISS, 0, 100, - 10, + 0, "Snooze", "OK" ); diff --git a/zone/npc.cpp b/zone/npc.cpp index 462feff4f..af992ff80 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -383,6 +383,56 @@ NPC::NPC(const NPCType *npc_type_data, Spawn2 *in_respawn, const glm::vec4 &posi AISpellVar.idle_beneficial_chance = static_cast (RuleI(Spells, AI_IdleBeneficialChance)); } +float NPC::GetRoamboxMaxX() const +{ + return roambox_max_x; +} + +float NPC::GetRoamboxMaxY() const +{ + return roambox_max_y; +} + +float NPC::GetRoamboxMinX() const +{ + return roambox_min_x; +} + +float NPC::GetRoamboxMinY() const +{ + return roambox_min_y; +} + +float NPC::GetRoamboxDistance() const +{ + return roambox_distance; +} + +float NPC::GetRoamboxDestinationX() const +{ + return roambox_destination_x; +} + +float NPC::GetRoamboxDestinationY() const +{ + return roambox_destination_y; +} + +float NPC::GetRoamboxDestinationZ() const +{ + return roambox_destination_z; +} + +uint32 NPC::GetRoamboxDelay() const +{ + return roambox_delay; +} + +uint32 NPC::GetRoamboxMinDelay() const +{ + return roambox_min_delay; +} + NPC::~NPC() { AI_Stop(); @@ -2747,4 +2797,45 @@ void NPC::ModifyStatsOnCharm(bool bRemoved) // the rest of the stats aren't cached, so lets just do these two instead of full CalcBonuses() SetAttackTimer(); CalcAC(); +} + + +uint16 NPC::GetMeleeTexture1() const +{ + return d_melee_texture1; +} + +uint16 NPC::GetMeleeTexture2() const +{ + return d_melee_texture2; +} + +float NPC::GetProximityMinX() +{ + return proximity->min_x; +} + +float NPC::GetProximityMaxX() +{ + return proximity->max_x; +} + +float NPC::GetProximityMinY() +{ + return proximity->min_y; +} + +float NPC::GetProximityMaxY() +{ + return proximity->max_y; +} + +float NPC::GetProximityMinZ() +{ + return proximity->min_z; +} + +float NPC::GetProximityMaxZ() +{ + return proximity->max_z; } \ No newline at end of file diff --git a/zone/npc.h b/zone/npc.h index fb5f00b9f..abd34df57 100644 --- a/zone/npc.h +++ b/zone/npc.h @@ -320,6 +320,9 @@ public: inline bool IsGuarding() const { return(m_GuardPoint.w != 0); } void SaveGuardSpotCharm(); + uint16 GetMeleeTexture1() const; + uint16 GetMeleeTexture2() const; + void RestoreGuardSpotCharm(); void AI_SetRoambox( @@ -349,6 +352,13 @@ public: inline const uint32 GetNPCSpellsID() const { return npc_spells_id; } inline const uint32 GetNPCSpellsEffectsID() const { return npc_spells_effects_id; } + float GetProximityMinX(); + float GetProximityMaxX(); + float GetProximityMinY(); + float GetProximityMaxY(); + float GetProximityMinZ(); + float GetProximityMaxZ(); + ItemList itemlist; //kathgar - why is this public? Doing other things or I would check the code NPCProximity* proximity; @@ -443,6 +453,17 @@ public: bool IgnoreDespawn() { return ignore_despawn; } + float GetRoamboxMaxX() const; + float GetRoamboxMaxY() const; + float GetRoamboxMinX() const; + float GetRoamboxMinY() const; + float GetRoamboxDistance() const; + float GetRoamboxDestinationX() const; + float GetRoamboxDestinationY() const; + float GetRoamboxDestinationZ() const; + uint32 GetRoamboxDelay() const; + uint32 GetRoamboxMinDelay() const; + std::unique_ptr AIautocastspell_timer; protected: @@ -557,7 +578,8 @@ protected: uint32 equipment[EQEmu::invslot::EQUIPMENT_COUNT]; //this is an array of item IDs uint32 herosforgemodel; //this is the Hero Forge Armor Model (i.e 63 or 84 or 203) - uint16 d_melee_texture1; //this is an item Material value + uint16 d_melee_texture1; + //this is an item Material value uint16 d_melee_texture2; //this is an item Material value (offhand) const char* ammo_idfile; //this determines projectile graphic "IT###" (see item field 'idfile') uint8 prim_melee_type; //Sets the Primary Weapon attack message and animation From 10617886106b988cd3107b9ed0563a8379d4bddd Mon Sep 17 00:00:00 2001 From: Akkadius Date: Wed, 14 Nov 2018 02:23:38 -0600 Subject: [PATCH 439/670] Even more mob_info work --- common/string_util.cpp | 16 +- zone/attack.cpp | 5 + zone/mob.h | 2 + zone/mob_info.cpp | 289 ++++++++++++++++++++++++++++++++----- zone/npc.cpp | 8 +- zone/npc_scale_manager.cpp | 36 +++-- zone/npc_scale_manager.h | 2 - 7 files changed, 293 insertions(+), 65 deletions(-) diff --git a/common/string_util.cpp b/common/string_util.cpp index 59eb0ab83..16123811d 100644 --- a/common/string_util.cpp +++ b/common/string_util.cpp @@ -227,12 +227,18 @@ std::string JoinString(const std::vector& ar, const std::string &de return ret; } -void find_replace(std::string& string_subject, const std::string& search_string, const std::string& replace_string) { - auto index = string_subject.find_first_of(search_string); - while (index != std::string::npos) { - string_subject.replace(index, index + 1, replace_string); - index = string_subject.find_first_of(search_string); +void find_replace(std::string &string_subject, const std::string &search_string, const std::string &replace_string) +{ + if (string_subject.find(search_string) == std::string::npos) { + return; } + + size_t start_pos = 0; + while((start_pos = string_subject.find(search_string, start_pos)) != std::string::npos) { + string_subject.replace(start_pos, search_string.length(), replace_string); + start_pos += replace_string.length(); + } + } //Const char based diff --git a/zone/attack.cpp b/zone/attack.cpp index 8ddd5e139..a61e99bf8 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -5470,6 +5470,11 @@ int32 Mob::GetHPRegen() const return hp_regen; } +int32 Mob::GetManaRegen() const +{ + return mana_regen; +} + bool Client::GetDisplayMobInfoWindow() const { return display_mob_info_window; diff --git a/zone/mob.h b/zone/mob.h index eac81b177..adf71f390 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -1165,6 +1165,8 @@ public: int GetWeaponDamage(Mob *against, const EQEmu::ItemInstance *weapon_item, uint32 *hate = nullptr); int32 GetHPRegen() const; + int32 GetManaRegen() const; + // Bots HealRotation methods #ifdef BOTS diff --git a/zone/mob_info.cpp b/zone/mob_info.cpp index 7dc64b162..0e66cb2cc 100644 --- a/zone/mob_info.cpp +++ b/zone/mob_info.cpp @@ -47,12 +47,18 @@ std::string commify(const std::string &number) inline std::string GetMobAttributeByString(Mob *mob, const std::string &attribute) { + std::string entity_variable = "modify_stat_" + attribute; + std::string scaling_modified; + if (mob->GetEntityVariable(entity_variable.c_str())) { + scaling_modified = " *"; + } + if (attribute == "ac") { return commify(std::to_string(mob->GetAC())); } if (attribute == "atk") { - return std::to_string(mob->GetATK()); + return std::to_string(mob->GetATK()) + scaling_modified; } if (attribute == "end") { @@ -69,8 +75,13 @@ inline std::string GetMobAttributeByString(Mob *mob, const std::string &attribut } if (attribute == "hp_min_max") { - return commify(std::to_string(mob->GetHP())) + " / " + commify(std::to_string(mob->GetMaxHP())) + " (" + - std::to_string((int)mob->GetHPRatio()) + "%)"; + if (mob->GetEntityVariable(std::string("modify_stat_hp").c_str())) { + scaling_modified = " *"; + } + + return commify(std::to_string(mob->GetHP())) + scaling_modified + " / " + + commify(std::to_string(mob->GetMaxHP())) + " (" + + std::to_string((int) mob->GetHPRatio()) + "%)"; } if (attribute == "mana") { @@ -79,7 +90,7 @@ inline std::string GetMobAttributeByString(Mob *mob, const std::string &attribut if (attribute == "mp_min_max") { return commify(std::to_string(mob->GetMana())) + " / " + commify(std::to_string(mob->GetMaxMana())) + " (" + - std::to_string((int)mob->GetManaPercent()) + "%)"; + std::to_string((int) mob->GetManaPercent()) + "%)"; } if (attribute == "end_min_max") { @@ -88,72 +99,86 @@ inline std::string GetMobAttributeByString(Mob *mob, const std::string &attribut } if (attribute == "str") { - return commify(std::to_string(mob->GetSTR())) + " / " + commify(std::to_string(mob->GetMaxSTR())) + " +" + + return commify(std::to_string(mob->GetSTR())) + scaling_modified + " / " + + commify(std::to_string(mob->GetMaxSTR())) + " +" + commify(std::to_string(mob->GetHeroicSTR())); } if (attribute == "sta") { - return commify(std::to_string(mob->GetSTA())) + " / " + commify(std::to_string(mob->GetMaxSTA())) + " +" + + return commify(std::to_string(mob->GetSTA())) + scaling_modified + " / " + + commify(std::to_string(mob->GetMaxSTA())) + " +" + commify(std::to_string(mob->GetHeroicSTA())); } if (attribute == "dex") { - return commify(std::to_string(mob->GetDEX())) + " / " + commify(std::to_string(mob->GetMaxDEX())) + " +" + + return commify(std::to_string(mob->GetDEX())) + scaling_modified + " / " + + commify(std::to_string(mob->GetMaxDEX())) + " +" + commify(std::to_string(mob->GetHeroicDEX())); } if (attribute == "agi") { - return commify(std::to_string(mob->GetAGI())) + " / " + commify(std::to_string(mob->GetMaxAGI())) + " +" + + return commify(std::to_string(mob->GetAGI())) + scaling_modified + " / " + + commify(std::to_string(mob->GetMaxAGI())) + " +" + commify(std::to_string(mob->GetHeroicAGI())); } if (attribute == "int") { - return commify(std::to_string(mob->GetINT())) + " / " + commify(std::to_string(mob->GetMaxINT())) + " +" + + return commify(std::to_string(mob->GetINT())) + scaling_modified + " / " + + commify(std::to_string(mob->GetMaxINT())) + " +" + commify(std::to_string(mob->GetHeroicINT())); } if (attribute == "wis") { - return commify(std::to_string(mob->GetWIS())) + " / " + commify(std::to_string(mob->GetMaxWIS())) + " +" + + return commify(std::to_string(mob->GetWIS())) + scaling_modified + " / " + + commify(std::to_string(mob->GetMaxWIS())) + " +" + commify(std::to_string(mob->GetHeroicWIS())); } if (attribute == "cha") { - return commify(std::to_string(mob->GetCHA())) + " / " + commify(std::to_string(mob->GetMaxCHA())) + " +" + + return commify(std::to_string(mob->GetCHA())) + scaling_modified + " / " + + commify(std::to_string(mob->GetMaxCHA())) + " +" + commify(std::to_string(mob->GetHeroicCHA())); } if (attribute == "mr") { - return commify(std::to_string(mob->GetMR())) + " / " + commify(std::to_string(mob->GetMaxMR())) + " +" + + return commify(std::to_string(mob->GetMR())) + scaling_modified + " / " + + commify(std::to_string(mob->GetMaxMR())) + " +" + commify(std::to_string(mob->GetHeroicMR())); } if (attribute == "cr") { - return commify(std::to_string(mob->GetCR())) + " / " + commify(std::to_string(mob->GetMaxCR())) + " +" + + return commify(std::to_string(mob->GetCR())) + scaling_modified + " / " + + commify(std::to_string(mob->GetMaxCR())) + " +" + commify(std::to_string(mob->GetHeroicCR())); } if (attribute == "fr") { - return commify(std::to_string(mob->GetFR())) + " / " + commify(std::to_string(mob->GetMaxFR())) + " +" + + return commify(std::to_string(mob->GetFR())) + scaling_modified + " / " + + commify(std::to_string(mob->GetMaxFR())) + " +" + commify(std::to_string(mob->GetHeroicFR())); } if (attribute == "pr") { - return commify(std::to_string(mob->GetPR())) + " / " + commify(std::to_string(mob->GetMaxPR())) + " +" + + return commify(std::to_string(mob->GetPR())) + scaling_modified + " / " + + commify(std::to_string(mob->GetMaxPR())) + " +" + commify(std::to_string(mob->GetHeroicPR())); } if (attribute == "dr") { - return commify(std::to_string(mob->GetDR())) + " / " + commify(std::to_string(mob->GetMaxDR())) + " +" + + return commify(std::to_string(mob->GetDR())) + scaling_modified + " / " + + commify(std::to_string(mob->GetMaxDR())) + " +" + commify(std::to_string(mob->GetHeroicDR())); } if (attribute == "cr") { - return commify(std::to_string(mob->GetCR())) + " / " + commify(std::to_string(mob->GetMaxCR())) + " +" + + return commify(std::to_string(mob->GetCR())) + scaling_modified + " / " + + commify(std::to_string(mob->GetMaxCR())) + " +" + commify(std::to_string(mob->GetHeroicCR())); } if (attribute == "pr") { - return commify(std::to_string(mob->GetPR())) + " / " + commify(std::to_string(mob->GetMaxPR())) + " +" + + return commify(std::to_string(mob->GetPR())) + scaling_modified + " / " + + commify(std::to_string(mob->GetMaxPR())) + " +" + commify(std::to_string(mob->GetHeroicPR())); } @@ -198,6 +223,30 @@ inline std::string GetMobAttributeByString(Mob *mob, const std::string &attribut return std::to_string(mob->GetCurrentBuffSlots()); } + if (attribute == "tohit") { + return std::to_string(mob->compute_tohit(EQEmu::skills::SkillHandtoHand)); + } + + if (attribute == "totalToHit") { + return std::to_string(mob->GetTotalToHit(EQEmu::skills::SkillHandtoHand, 0)); + } + + if (attribute == "defense") { + return std::to_string(mob->compute_defense()); + } + + if (attribute == "totalDefense") { + return std::to_string(mob->GetTotalDefense()); + } + + if (attribute == "offense") { + return std::to_string(mob->offense(EQEmu::skills::SkillHandtoHand)); + } + + if (attribute == "mitigationAC") { + return std::to_string(mob->GetMitigationAC()); + } + if (mob->IsNPC()) { NPC *npc = mob->CastToNPC(); @@ -309,10 +358,134 @@ inline std::string GetMobAttributeByString(Mob *mob, const std::string &attribut if (attribute == "proximityMaxZ") { return std::to_string((int)npc->GetProximityMaxZ()); } + if (attribute == "accuracy") { + return std::to_string((int)npc->GetAccuracyRating()) + scaling_modified; + } + if (attribute == "slowMitigation") { + if (mob->GetEntityVariable(std::string("modify_stat_slow_mitigation").c_str())) { + scaling_modified = " *"; + } + + return std::to_string((int)npc->GetSlowMitigation()) + scaling_modified; + } + if (attribute == "minHit") { + if (mob->GetEntityVariable(std::string("modify_stat_min_hit").c_str())) { + scaling_modified = " *"; + } + + return commify(std::to_string((int)npc->GetMinDMG())) + scaling_modified; + } + if (attribute == "maxHit") { + if (mob->GetEntityVariable(std::string("modify_stat_max_hit").c_str())) { + scaling_modified = " *"; + } + + return commify(std::to_string((int)npc->GetMaxDMG())) + scaling_modified; + } + if (attribute == "hpRegen") { + if (mob->GetEntityVariable(std::string("modify_stat_hp_regen").c_str())) { + scaling_modified = " *"; + } + + return commify(std::to_string((int)npc->GetHPRegen())) + scaling_modified; + } + if (attribute == "attackDelay") { + if (mob->GetEntityVariable(std::string("modify_stat_attack_delay").c_str())) { + scaling_modified = " *"; + } + + return commify(std::to_string(npc->GetAttackDelay())) + scaling_modified; + } + if (attribute == "spellScale") { + if (mob->GetEntityVariable(std::string("modify_stat_spell_scale").c_str())) { + scaling_modified = " *"; + } + + return commify(std::to_string((int)npc->GetSpellScale())) + scaling_modified; + } + if (attribute == "healScale") { + if (mob->GetEntityVariable(std::string("modify_stat_heal_scale").c_str())) { + scaling_modified = " *"; + } + + return commify(std::to_string((int)npc->GetHealScale())) + scaling_modified; + } + if (attribute == "avoidance") { + return commify(std::to_string((int)npc->GetAvoidanceRating())) + scaling_modified; + } npc->GetNPCEmote(npc->GetEmoteID(), 0); } + if (mob->IsClient()) { + Client *client = mob->CastToClient(); + + if (attribute == "shielding") { + return commify(std::to_string((int)client->GetShielding())) + " / " + + commify(std::to_string((int) RuleI(Character, ItemShieldingCap))); + } + if (attribute == "spellShielding") { + return commify(std::to_string((int)client->GetSpellShield())) + " / " + + commify(std::to_string((int) RuleI(Character, ItemSpellShieldingCap))); + } + if (attribute == "dotShielding") { + return commify(std::to_string((int)client->GetDoTShield())) + " / " + + commify(std::to_string((int) RuleI(Character, ItemDoTShieldingCap))); + } + if (attribute == "stunResist") { + return commify(std::to_string((int)client->GetStunResist())) + " / " + + commify(std::to_string((int) RuleI(Character, ItemStunResistCap))); + } + if (attribute == "damageShield") { + return commify(std::to_string((int)client->GetDS())) + " / " + + commify(std::to_string((int) RuleI(Character, ItemDamageShieldCap))); + } + if (attribute == "avoidance") { + return commify(std::to_string((int) client->GetAvoidance())) + " / " + + commify(std::to_string((int) RuleI(Character, ItemAvoidanceCap))); + } + if (attribute == "strikethrough") { + return commify(std::to_string((int) client->GetStrikeThrough())) + " / " + + commify(std::to_string((int) RuleI(Character, ItemStrikethroughCap))); + } + if (attribute == "accuracy") { + return commify(std::to_string((int) client->GetAccuracy())) + " / " + + commify(std::to_string((int) RuleI(Character, ItemAccuracyCap))); + } + if (attribute == "combatEffects") { + return commify(std::to_string((int) client->GetCombatEffects())) + " / " + + commify(std::to_string((int) RuleI(Character, ItemCombatEffectsCap))); + } + if (attribute == "healAmount") { + return commify(std::to_string((int) client->GetHealAmt())) + " / " + + commify(std::to_string((int) RuleI(Character, ItemHealAmtCap))); + } + if (attribute == "spellDmg") { + return commify(std::to_string((int) client->GetSpellDmg())) + " / " + + commify(std::to_string((int) RuleI(Character, ItemSpellDmgCap))); + } + if (attribute == "clairvoyance") { + return commify(std::to_string((int) client->GetClair())) + " / " + + commify(std::to_string((int) RuleI(Character, ItemClairvoyanceCap))); + } + if (attribute == "DSMit") { + return commify(std::to_string((int) client->GetDSMit())) + " / " + + commify(std::to_string((int) RuleI(Character, ItemDSMitigationCap))); + } + if (attribute == "hpRegen") { + return commify(std::to_string((int) client->GetHPRegen())) + " / " + + commify(std::to_string((int) RuleI(Character, ItemHealthRegenCap))); + } + if (attribute == "manaRegen") { + return commify(std::to_string((int) client->GetManaRegen())) + " / " + + commify(std::to_string((int) RuleI(Character, ItemManaRegenCap))); + } + if (attribute == "endRegen") { + return commify(std::to_string((int) client->CalcEnduranceRegen())) + " / " + + commify(std::to_string((int) client->CalcEnduranceRegenCap())); + } + } + if (attribute == "type") { std::string entity_type = "Mob"; @@ -378,6 +551,9 @@ inline std::string WriteDisplayInfoSection( attribute_name = ucfirst(attribute_name); } + find_replace(attribute_name, "Proximity", std::string("")); + find_replace(attribute_name, "Roambox", std::string("")); + std::string attribute_value = GetMobAttributeByString(mob, attribute); if (attribute_value.length() <= 0) { @@ -404,38 +580,26 @@ inline void NPCCommandsMenu(Client* client, NPC* npc) std::string menu_commands; if (npc->GetGrid() > 0) { - menu_commands += EQEmu::SayLinkEngine::GenerateQuestSaylink("#grid show", false, "Grid Points") + " "; + menu_commands += "[" + EQEmu::SayLinkEngine::GenerateQuestSaylink("#grid show", false, "Grid Points") + "] "; } if (npc->GetEmoteID() > 0) { std::string saylink = StringFormat("#emotesearch %u", npc->GetEmoteID()); - menu_commands += EQEmu::SayLinkEngine::GenerateQuestSaylink(saylink, false, "Emotes") + " "; + menu_commands += "[" + EQEmu::SayLinkEngine::GenerateQuestSaylink(saylink, false, "Emotes") + "] "; } if (menu_commands.length() > 0) { - client->Message(0, "# Show Commmands"); - client->Message(0, " - %s", menu_commands.c_str()); + client->Message(0, "| # Show Commmands"); + client->Message(0, "| %s", menu_commands.c_str()); } } void Mob::DisplayInfo(Mob *mob) { - if (!this || !mob) { + if (!mob) { return; } - // std::vector general_stats = { -// - // // "accuracy", - // // "slow_mitigation", - // // "atk", - // // "min_hit", - // // "max_hit", - // // "hp_regen", - // // "attack_delay", - // // "special_abilities" - // }; - if (this->IsClient()) { std::string window_text = "*Drag window open vertically to see all
"; @@ -482,9 +646,63 @@ void Mob::DisplayInfo(Mob *mob) }; window_text += WriteDisplayInfoSection(mob, "Resists", resist_attributes, 1, false); + std::vector calculations = { + "tohit", + "totalToHit", + "defense", + "totalDefense", + "offense", + "mitigationAC", + }; + window_text += WriteDisplayInfoSection(mob, "Calculations", calculations, 1, true); + + if (mob->IsClient()) { + std::vector mods = { + "hpRegen", + "manaRegen", + "endRegen", + "healAmount", + "spellDmg", + "clairvoyance", + }; + window_text += WriteDisplayInfoSection(mob, "Mods", mods, 1, true); + + std::vector mod_defensive = { + "shielding", + "spellShielding", + "dotShielding", + "stunResist", + "damageShield", + "DSMit", + "avoidance", + }; + window_text += WriteDisplayInfoSection(mob, "Mod Defensive", mod_defensive, 1, true); + + std::vector mod_offensive = { + "strikethrough", + "accuracy", + "combatEffects", + }; + window_text += WriteDisplayInfoSection(mob, "Mod Offensive", mod_offensive, 1, true); + } + if (mob->IsNPC()) { NPC *npc = mob->CastToNPC(); + std::vector npc_stats = { + "accuracy", + "slowMitigation", + "minHit", + "maxHit", + "hpRegen", + "attackDelay", + "spellScale", + "healScale", + "avoidance", + }; + + window_text += WriteDisplayInfoSection(mob, "NPC Stats", npc_stats, 1, true); + std::vector npc_attributes = { "npcid", "texture", @@ -546,7 +764,6 @@ void Mob::DisplayInfo(Mob *mob) window_text += WriteDisplayInfoSection(mob, "Proximity", npc_proximity, 1, true); } - client->Message(0, " "); npc->QueryLoot(client); NPCCommandsMenu(client, npc); diff --git a/zone/npc.cpp b/zone/npc.cpp index af992ff80..be25a0367 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -369,6 +369,8 @@ NPC::NPC(const NPCType *npc_type_data, Spawn2 *in_respawn, const glm::vec4 &posi npc_scale_manager->ScaleNPC(this); + SetMana(GetMaxMana()); + AISpellVar.fail_recast = static_cast(RuleI(Spells, AI_SpellCastFinishedFailRecast)); AISpellVar.engaged_no_sp_recast_min = static_cast(RuleI(Spells, AI_EngagedNoSpellMinRecast)); AISpellVar.engaged_no_sp_recast_max = static_cast(RuleI(Spells, AI_EngagedNoSpellMaxRecast)); @@ -601,7 +603,7 @@ void NPC::ClearItemList() { void NPC::QueryLoot(Client* to) { - to->Message(0, "# Loot %s", GetName()); + to->Message(0, "| # Loot [%s]", GetName()); int item_count = 0; for (auto cur = itemlist.begin(); cur != itemlist.end(); ++cur, ++item_count) { @@ -620,7 +622,7 @@ void NPC::QueryLoot(Client* to) to->Message( 0, - "-- Item %i: %s ID: %u min_level: %u max_level: %u", + "| -- Item %i: %s ID: %u min_level: %u max_level: %u", item_count, linker.GenerateLink().c_str(), (*cur)->item_id, @@ -629,7 +631,7 @@ void NPC::QueryLoot(Client* to) ); } - to->Message(0, "- %i Platinum %i Gold %i Silver %i Copper", platinum, gold, silver, copper); + to->Message(0, "| %i Platinum %i Gold %i Silver %i Copper", platinum, gold, silver, copper); } void NPC::AddCash(uint16 in_copper, uint16 in_silver, uint16 in_gold, uint16 in_platinum) { diff --git a/zone/npc_scale_manager.cpp b/zone/npc_scale_manager.cpp index 6b04ac4d1..a35fbe88e 100644 --- a/zone/npc_scale_manager.cpp +++ b/zone/npc_scale_manager.cpp @@ -22,12 +22,10 @@ #include "../common/string_util.h" /** - * @param mob + * @param npc */ void NpcScaleManager::ScaleNPC(NPC * npc) { - Log(Logs::General, Logs::NPCScaling, "Attempting scale on %s", npc->GetCleanName()); - int8 npc_type = GetNPCScalingType(npc); int npc_level = npc->GetLevel(); @@ -144,27 +142,27 @@ void NpcScaleManager::ScaleNPC(NPC * npc) if (npc->GetHealScale() == 0) { npc->ModifyNPCStat("heal_scale", std::to_string(scale_data.heal_scale).c_str()); } - if (!npc->HasSpecialAbilities()) { + if (!npc->HasSpecialAbilities() && npc->EntityVariableExists("max_hp")) { npc->ModifyNPCStat("special_abilities", scale_data.special_abilities.c_str()); } - ListStats(npc); -} + if (LogSys.log_settings[Logs::NPCScaling].is_category_enabled == 1) { + std::string scale_log; -/** - * @param mob - */ -void NpcScaleManager::ListStats(NPC *&npc) -{ - for (const auto &stat : scaling_stats) { - std::string variable = StringFormat("modify_stat_%s", stat.c_str()); - if (npc->EntityVariableExists(variable.c_str())) { - Log(Logs::Detail, - Logs::NPCScaling, - "NpcScaleManager::ListStats: %s - %s ", - stat.c_str(), - npc->GetEntityVariable(variable.c_str())); + for (const auto &stat : scaling_stats) { + std::string variable = StringFormat("modify_stat_%s", stat.c_str()); + if (npc->EntityVariableExists(variable.c_str())) { + scale_log += stat + ": " + npc->GetEntityVariable(variable.c_str()) + " "; + } } + + Log(Logs::General, + Logs::NPCScaling, + "(%s) level: %i type: %i Setting: %s", + npc->GetCleanName(), + npc_level, + npc_type, + scale_log.c_str()); } } diff --git a/zone/npc_scale_manager.h b/zone/npc_scale_manager.h index 836261bb0..23bf90c48 100644 --- a/zone/npc_scale_manager.h +++ b/zone/npc_scale_manager.h @@ -94,8 +94,6 @@ public: std::map, global_npc_scale> npc_global_base_scaling_data; - void ListStats(NPC * &npc); - int8 GetNPCScalingType(NPC * &npc); bool ApplyGlobalBaseScalingToNPCStatically(NPC * &npc); bool ApplyGlobalBaseScalingToNPCDynamically(NPC * &npc); From d4395a6f0aff866bed6f648aaa8dec97c44cc679 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 14 Nov 2018 20:37:57 -0500 Subject: [PATCH 440/670] Client doesn't check AA casting standstate Fixes an exploit and makes you stand if you're just sitting --- zone/aa.cpp | 11 +++++++++++ zone/string_ids.h | 1 + 2 files changed, 12 insertions(+) diff --git a/zone/aa.cpp b/zone/aa.cpp index 9fa76a9d4..1ec78e769 100644 --- a/zone/aa.cpp +++ b/zone/aa.cpp @@ -1208,6 +1208,17 @@ void Client::ActivateAlternateAdvancementAbility(int rank_id, int target_id) { if (spells[rank->spell].targettype == ST_Pet || spells[rank->spell].targettype == ST_SummonedPet) target_id = GetPetID(); + // extra handling for cast_not_standing spells + if (!spells[rank->spell].cast_not_standing) { + if (GetAppearance() == eaSitting) // we need to stand! + SetAppearance(eaStanding, false); + + if (GetAppearance() != eaStanding) { + Message_StringID(MT_SpellFailure, STAND_TO_CAST); + return; + } + } + // Bards can cast instant cast AAs while they are casting another song if(spells[rank->spell].cast_time == 0 && GetClass() == BARD && IsBardSong(casting_spell_id)) { if(!SpellFinished(rank->spell, entity_list.GetMob(target_id), EQEmu::CastingSlot::AltAbility, spells[rank->spell].mana, -1, spells[rank->spell].ResistDiff, false)) { diff --git a/zone/string_ids.h b/zone/string_ids.h index 2c223ffbd..acab3df22 100644 --- a/zone/string_ids.h +++ b/zone/string_ids.h @@ -418,6 +418,7 @@ #define NO_LONGER_HIDDEN 12337 //You are no longer hidden. #define STOP_SNEAKING 12338 //You stop sneaking #define NOT_IN_CONTROL 12368 //You do not have control of yourself right now. +#define STAND_TO_CAST 12441 //You must be standing to cast a spell. #define ALREADY_CASTING 12442 //You are already casting a spell! #define SHIMMERS_BRIEFLY 12444 //Your %1 shimmers briefly. #define SENSE_CORPSE_NOT_NAME 12446 //You don't sense any corpses of that name. From a1b384c2543be632a2a8783af3ecd8dbfebc7fbd Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 14 Nov 2018 20:39:18 -0500 Subject: [PATCH 441/670] Don't reset AA timers --- zone/aa.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/aa.cpp b/zone/aa.cpp index 1ec78e769..648545dd3 100644 --- a/zone/aa.cpp +++ b/zone/aa.cpp @@ -1172,7 +1172,7 @@ void Client::ActivateAlternateAdvancementAbility(int rank_id, int target_id) { return; //check cooldown - if(!p_timers.Expired(&database, rank->spell_type + pTimerAAStart)) { + if(!p_timers.Expired(&database, rank->spell_type + pTimerAAStart, false)) { uint32 aaremain = p_timers.GetRemainingTime(rank->spell_type + pTimerAAStart); uint32 aaremain_hr = aaremain / (60 * 60); uint32 aaremain_min = (aaremain / 60) % 60; From 8302f7cc268556fd83e912f9f4a40573f57771ac Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 14 Nov 2018 22:59:07 -0500 Subject: [PATCH 442/670] Add a level cap to gray con flee --- common/ruletypes.h | 1 + zone/fearpath.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/common/ruletypes.h b/common/ruletypes.h index 16e85805d..ab9acecf1 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -419,6 +419,7 @@ RULE_BOOL(Combat, EnableFearPathing, true) RULE_REAL(Combat, FleeMultiplier, 2.0) // Determines how quickly a NPC will slow down while fleeing. Decrease multiplier to slow NPC down quicker. RULE_BOOL(Combat, FleeGray, true) // If true FleeGrayHPRatio will be used. RULE_INT(Combat, FleeGrayHPRatio, 50) //HP % when a Gray NPC begins to flee. +RULE_INT(Combat, FleeGrayMaxLevel, 18) // NPC's above this level won't do gray/green con flee RULE_INT(Combat, FleeHPRatio, 25) //HP % when a NPC begins to flee. RULE_BOOL(Combat, FleeIfNotAlone, false) // If false, mobs won't flee if other mobs are in combat with it. RULE_BOOL(Combat, AdjustProcPerMinute, true) diff --git a/zone/fearpath.cpp b/zone/fearpath.cpp index c73ec448e..de65f4e8a 100644 --- a/zone/fearpath.cpp +++ b/zone/fearpath.cpp @@ -62,7 +62,7 @@ void Mob::CheckFlee() { } // If no special flee_percent check for Gray or Other con rates - if(GetLevelCon(hate_top->GetLevel(), GetLevel()) == CON_GRAY && fleeratio == 0 && RuleB(Combat, FleeGray)) { + if(GetLevelCon(hate_top->GetLevel(), GetLevel()) == CON_GRAY && fleeratio == 0 && RuleB(Combat, FleeGray) && GetLevel() <= RuleI(Combat, FleeGrayMaxLevel)) { fleeratio = RuleI(Combat, FleeGrayHPRatio); } else if(fleeratio == 0) { fleeratio = RuleI(Combat, FleeHPRatio ); From 2c0714b5d8a2c7a1f631611cf02276f8910a5ecd Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 18 Nov 2018 16:02:59 -0500 Subject: [PATCH 443/670] Fix cap bug in ZoneDatabase::GetDecayTimes() --- zone/zone.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/zone/zone.cpp b/zone/zone.cpp index 3b9e5e513..9a3446061 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -1875,10 +1875,7 @@ bool ZoneDatabase::GetDecayTimes(npcDecayTimes_Struct* npcCorpseDecayTimes) { npcCorpseDecayTimes[index].minlvl = atoi(sep.arg[1]); npcCorpseDecayTimes[index].maxlvl = atoi(sep.arg[2]); - if (atoi(row[1]) > 7200) - npcCorpseDecayTimes[index].seconds = 720; - else - npcCorpseDecayTimes[index].seconds = atoi(row[1]); + npcCorpseDecayTimes[index].seconds = std::min(7200, atoi(row[1])); } return true; From aae316c171c9504eaa7c5866caef1609f3cddf3d Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 18 Nov 2018 16:03:38 -0500 Subject: [PATCH 444/670] Fix formating in ZoneDatabase::GetDecayTimes() --- zone/zone.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/zone/zone.cpp b/zone/zone.cpp index 9a3446061..370e18723 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -1860,23 +1860,22 @@ bool Zone::RemoveSpawnGroup(uint32 in_id) { return false; } - -// Added By Hogie -bool ZoneDatabase::GetDecayTimes(npcDecayTimes_Struct* npcCorpseDecayTimes) { - - const std::string query = "SELECT varname, value FROM variables WHERE varname LIKE 'decaytime%%' ORDER BY varname"; +bool ZoneDatabase::GetDecayTimes(npcDecayTimes_Struct *npcCorpseDecayTimes) +{ + const std::string query = + "SELECT varname, value FROM variables WHERE varname LIKE 'decaytime%%' ORDER BY varname"; auto results = QueryDatabase(query); if (!results.Success()) - return false; + return false; int index = 0; - for (auto row = results.begin(); row != results.end(); ++row, ++index) { - Seperator sep(row[0]); - npcCorpseDecayTimes[index].minlvl = atoi(sep.arg[1]); - npcCorpseDecayTimes[index].maxlvl = atoi(sep.arg[2]); + for (auto row = results.begin(); row != results.end(); ++row, ++index) { + Seperator sep(row[0]); + npcCorpseDecayTimes[index].minlvl = atoi(sep.arg[1]); + npcCorpseDecayTimes[index].maxlvl = atoi(sep.arg[2]); npcCorpseDecayTimes[index].seconds = std::min(7200, atoi(row[1])); - } + } return true; } From 0d0c22b5e5ba0de7af879137e8989cabef368209 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 18 Nov 2018 16:06:31 -0500 Subject: [PATCH 445/670] Update corpse decay cap to 24 hours I guess Some people were wanting higher, w/e --- zone/zone.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/zone.cpp b/zone/zone.cpp index 370e18723..8fdd26fbf 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -1874,7 +1874,7 @@ bool ZoneDatabase::GetDecayTimes(npcDecayTimes_Struct *npcCorpseDecayTimes) npcCorpseDecayTimes[index].minlvl = atoi(sep.arg[1]); npcCorpseDecayTimes[index].maxlvl = atoi(sep.arg[2]); - npcCorpseDecayTimes[index].seconds = std::min(7200, atoi(row[1])); + npcCorpseDecayTimes[index].seconds = std::min(24 * 60 * 60, atoi(row[1])); } return true; From e43b8d84639e9944bed70e9cd4b3fe3af1cb0523 Mon Sep 17 00:00:00 2001 From: Uleat Date: Sun, 18 Nov 2018 21:11:22 -0500 Subject: [PATCH 446/670] Limited Client::GetTraderItems() to 80-item return --- zone/trading.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/zone/trading.cpp b/zone/trading.cpp index 8c07db9fc..154fdf148 100644 --- a/zone/trading.cpp +++ b/zone/trading.cpp @@ -1295,7 +1295,7 @@ EQEmu::ItemInstance* Client::FindTraderItemBySerialNumber(int32 SerialNumber){ GetItems_Struct* Client::GetTraderItems(){ const EQEmu::ItemInstance* item = nullptr; - uint16 SlotID = 0; + uint16 SlotID = INVALID_INDEX; auto gis = new GetItems_Struct; @@ -1304,9 +1304,14 @@ GetItems_Struct* Client::GetTraderItems(){ uint8 ndx = 0; for (int i = EQEmu::invslot::GENERAL_BEGIN; i <= EQEmu::invslot::GENERAL_END; i++) { + if (ndx >= 80) + break; item = this->GetInv().GetItem(i); if(item && item->GetItem()->ID == 17899){ //Traders Satchel for (int x = EQEmu::invbag::SLOT_BEGIN; x <= EQEmu::invbag::SLOT_END; x++) { + if (ndx >= 80) + break; + SlotID = EQEmu::InventoryProfile::CalcSlotId(i, x); item = this->GetInv().GetItem(SlotID); From b772518901a1531ae965920b86066b3a43656b9f Mon Sep 17 00:00:00 2001 From: KimLS Date: Sun, 18 Nov 2018 20:29:21 -0800 Subject: [PATCH 447/670] Selective commit of secrets somewhat broken pr --- world/client.cpp | 2 -- zone/client.cpp | 1 + zone/client.h | 1 + zone/client_process.cpp | 22 ++++++++++++++++++++++ zone/mob.cpp | 10 +++++++++- zone/mob_ai.cpp | 32 +++++++++++++++----------------- zone/mob_movement_manager.cpp | 14 ++++++++++++-- 7 files changed, 60 insertions(+), 22 deletions(-) diff --git a/world/client.cpp b/world/client.cpp index 9b04f5cc5..d3b477286 100644 --- a/world/client.cpp +++ b/world/client.cpp @@ -92,8 +92,6 @@ Client::Client(EQStreamInterface* ieqs) connect(1000), eqs(ieqs) { - //mMovementManager->AddClient(this); - // Live does not send datarate as of 3/11/2005 //eqs->SetDataRate(7); ip = eqs->GetRemoteIP(); diff --git a/zone/client.cpp b/zone/client.cpp index 9fa8fbec7..0f32da9ea 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -156,6 +156,7 @@ Client::Client(EQStreamInterface* ieqs) m_AutoAttackTargetLocation(0.0f, 0.0f, 0.0f), last_region_type(RegionTypeUnsupported), m_dirtyautohaters(false), + npc_close_scan_timer(6000), hp_self_update_throttle_timer(300), hp_other_update_throttle_timer(500), position_update_timer(10000), diff --git a/zone/client.h b/zone/client.h index f9359aa02..1768c9493 100644 --- a/zone/client.h +++ b/zone/client.h @@ -1514,6 +1514,7 @@ private: Timer afk_toggle_timer; Timer helm_toggle_timer; Timer aggro_meter_timer; + Timer npc_close_scan_timer; Timer hp_self_update_throttle_timer; /* This is to prevent excessive packet sending under trains/fast combat */ Timer hp_other_update_throttle_timer; /* This is to keep clients from DOSing the server with macros that change client targets constantly */ Timer position_update_timer; /* Timer used when client hasn't updated within a 10 second window */ diff --git a/zone/client_process.cpp b/zone/client_process.cpp index 12c9a91be..fcfc1df53 100644 --- a/zone/client_process.cpp +++ b/zone/client_process.cpp @@ -250,6 +250,28 @@ bool Client::Process() { GetName(), RuleI(Character, InvSnapshotMinRetryM), (RuleI(Character, InvSnapshotMinRetryM) == 1 ? "" : "s")); } } + + /* Build a close range list of NPC's */ + if (npc_close_scan_timer.Check()) { + close_mobs.clear(); + //Force spawn updates when traveled far + bool force_spawn_updates = false; + float client_update_range = (RuleI(Range, ClientForceSpawnUpdateRange) * RuleI(Range, ClientForceSpawnUpdateRange)); + float scan_range = (RuleI(Range, ClientNPCScan) * RuleI(Range, ClientNPCScan)); + auto &mob_list = entity_list.GetMobList(); + for (auto itr = mob_list.begin(); itr != mob_list.end(); ++itr) { + Mob* mob = itr->second; + float distance = DistanceSquared(m_Position, mob->GetPosition()); + if (mob->IsNPC()) { + if (distance <= scan_range) { + close_mobs.insert(std::pair(mob, distance)); + } + else if ((mob->GetAggroRange() * mob->GetAggroRange()) > scan_range) { + close_mobs.insert(std::pair(mob, distance)); + } + } + } + } bool may_use_attacks = false; /* diff --git a/zone/mob.cpp b/zone/mob.cpp index 91fb779a6..b2912f46a 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -1658,7 +1658,15 @@ void Mob::ShowBuffList(Client* client) { } void Mob::GMMove(float x, float y, float z, float heading, bool SendUpdate) { - Teleport(glm::vec4(x, y, z, heading)); + if (IsCorpse()) { + m_Position.x = x; + m_Position.y = y; + m_Position.z = z; + mMovementManager->SendCommandToClients(this, 0.0, 0.0, 0.0, 0.0, 0, ClientRangeAny); + } + else { + Teleport(glm::vec4(x, y, z, heading)); + } if (IsNPC()) { CastToNPC()->SaveGuardSpot(glm::vec4(x, y, z, heading)); diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index a0370d1de..3f99d86c7 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -375,11 +375,6 @@ bool NPC::AIDoSpellCast(uint8 i, Mob* tar, int32 mana_cost, uint32* oDontDoAgain #endif casting_spell_AIindex = i; - //stop moving if were casting a spell and were not a bard... - if(!IsBardSong(AIspells[i].spellid)) { - StopNavigation(); - } - return CastSpell(AIspells[i].spellid, tar->GetID(), EQEmu::CastingSlot::Gem2, AIspells[i].manacost == -2 ? 0 : -1, mana_cost, oDontDoAgainBefore, -1, -1, 0, &(AIspells[i].resist_adjust)); } @@ -802,11 +797,11 @@ void Client::AI_Process() if (AI_movement_timer->Check()) { // Check if we have reached the last fear point if(IsPositionEqualWithinCertainZ(glm::vec3(GetX(), GetY(), GetZ()), m_FearWalkTarget, 5.0f)) { - StopNavigation(); CalculateNewFearpoint(); } - - RunTo(m_FearWalkTarget.x, m_FearWalkTarget.y, m_FearWalkTarget.z); + else { + RunTo(m_FearWalkTarget.x, m_FearWalkTarget.y, m_FearWalkTarget.z); + } } return; } @@ -1387,7 +1382,7 @@ void Mob::AI_Process() { // Now pursue // TODO: Check here for another person on hate list with close hate value if (AI_PursueCastCheck()) { - //we did something, so do not process movement. + FaceTarget(); } else if (AI_movement_timer->Check() && target) { if (!IsRooted()) { @@ -1395,7 +1390,7 @@ void Mob::AI_Process() { RunTo(target->GetX(), target->GetY(), target->GetZ()); } - else if (IsMoving()) { + else { FaceTarget(); } } @@ -1433,7 +1428,7 @@ void Mob::AI_Process() { } } if (AI_IdleCastCheck()) { - //we processed a spell action, so do nothing else. + StopNavigation(); } else if (zone->CanDoCombat() && CastToNPC()->WillAggroNPCs() && AI_scan_area_timer->Check()) { @@ -1482,17 +1477,20 @@ void Mob::AI_Process() { * Distance: >= 450 (Snap to owner) */ if (distance_to_owner >= 202500 || z_distance > 100) { - Teleport(pet_owner_position); + if (running) { + RunTo(pet_owner_position.x, pet_owner_position.y, pet_owner_position.z); + } + else { + WalkTo(pet_owner_position.x, pet_owner_position.y, pet_owner_position.z); + } } else { - auto &Goal = owner->GetPosition(); - if (running) { - RunTo(Goal.x, Goal.y, Goal.z); + RunTo(pet_owner_position.x, pet_owner_position.y, pet_owner_position.z); } else { - WalkTo(Goal.x, Goal.y, Goal.z); + WalkTo(pet_owner_position.x, pet_owner_position.y, pet_owner_position.z); } } } @@ -1661,7 +1659,7 @@ void NPC::AI_DoMovement() { destination.x = roambox_destination_x; destination.y = roambox_destination_y; destination.z = m_Position.z; - roambox_destination_z = zone->zonemap->FindClosestZ(destination, nullptr) + this->GetZOffset(); + roambox_destination_z = zone->zonemap ? zone->zonemap->FindClosestZ(destination, nullptr) + this->GetZOffset() : 0; Log(Logs::Detail, Logs::NPCRoamBox, diff --git a/zone/mob_movement_manager.cpp b/zone/mob_movement_manager.cpp index 36f5aae5b..1c1db19fd 100644 --- a/zone/mob_movement_manager.cpp +++ b/zone/mob_movement_manager.cpp @@ -123,7 +123,12 @@ public: int current_speed = 0; if (m_move_to_mode == MovementRunning) { - current_speed = m->GetRunspeed(); + if (m->IsFeared()) { + current_speed = m->GetFearSpeed(); + } + else { + current_speed = m->GetRunspeed(); + } } else { current_speed = m->GetWalkspeed(); @@ -242,7 +247,12 @@ public: int current_speed = 0; if (m_move_to_mode == MovementRunning) { - current_speed = m->GetRunspeed(); + if (m->IsFeared()) { + current_speed = m->GetFearSpeed(); + } + else { + current_speed = m->GetRunspeed(); + } } else { current_speed = m->GetWalkspeed(); From d215ccfa8c30086d5ba460e3d1776689bb7988e3 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 19 Nov 2018 02:40:10 -0600 Subject: [PATCH 448/670] Few adjustments --- zone/mob_info.cpp | 21 +++++++++++++++++---- zone/npc.cpp | 2 +- zone/npc_scale_manager.cpp | 23 +++++++++++++++++++++-- zone/npc_scale_manager.h | 1 + 4 files changed, 40 insertions(+), 7 deletions(-) diff --git a/zone/mob_info.cpp b/zone/mob_info.cpp index 0e66cb2cc..0bdef2904 100644 --- a/zone/mob_info.cpp +++ b/zone/mob_info.cpp @@ -22,6 +22,7 @@ #include "mob.h" #include "../common/races.h" #include "../common/say_link.h" +#include "npc_scale_manager.h" std::string commify(const std::string &number) { @@ -588,9 +589,13 @@ inline void NPCCommandsMenu(Client* client, NPC* npc) menu_commands += "[" + EQEmu::SayLinkEngine::GenerateQuestSaylink(saylink, false, "Emotes") + "] "; } + if (npc->GetLoottableID() > 0) { + menu_commands += "[" + EQEmu::SayLinkEngine::GenerateQuestSaylink("#npcloot show", false, "Loot") + "] "; + } + if (menu_commands.length() > 0) { - client->Message(0, "| # Show Commmands"); - client->Message(0, "| %s", menu_commands.c_str()); + // client->Message(0, "| # Show Commmands"); + client->Message(0, "| [Show Commands] %s", menu_commands.c_str()); } } @@ -676,6 +681,7 @@ void Mob::DisplayInfo(Mob *mob) "DSMit", "avoidance", }; + window_text += WriteDisplayInfoSection(mob, "Mod Defensive", mod_defensive, 1, true); std::vector mod_offensive = { @@ -764,13 +770,20 @@ void Mob::DisplayInfo(Mob *mob) window_text += WriteDisplayInfoSection(mob, "Proximity", npc_proximity, 1, true); } - npc->QueryLoot(client); + int8 npc_type = npc_scale_manager->GetNPCScalingType(npc); + std::string npc_type_string = npc_scale_manager->GetNPCScalingTypeName(npc); + + client->Message( + 0, + "| # Target: %s Type: %i (%s)", + npc->GetCleanName(), + npc_type, + npc_type_string.c_str()); NPCCommandsMenu(client, npc); } std::cout << "Window Length: " << window_text.length() << std::endl; - // std::cout << "Window " << window_text << std::endl; if (client->GetDisplayMobInfoWindow()) { client->SendFullPopup( diff --git a/zone/npc.cpp b/zone/npc.cpp index be25a0367..4841f9276 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -603,7 +603,7 @@ void NPC::ClearItemList() { void NPC::QueryLoot(Client* to) { - to->Message(0, "| # Loot [%s]", GetName()); + to->Message(0, "| # Current Loot (%s) LootTableID: %i", GetName(), GetLoottableID()); int item_count = 0; for (auto cur = itemlist.begin(); cur != itemlist.end(); ++cur, ++item_count) { diff --git a/zone/npc_scale_manager.cpp b/zone/npc_scale_manager.cpp index a35fbe88e..bc8d6ebbe 100644 --- a/zone/npc_scale_manager.cpp +++ b/zone/npc_scale_manager.cpp @@ -408,13 +408,13 @@ uint32 NpcScaleManager::GetClassLevelDamageMod(uint32 level, uint32 npc_class) /** * @param npc - * @return + * @return int8 */ int8 NpcScaleManager::GetNPCScalingType(NPC *&npc) { std::string npc_name = npc->GetName(); - if (npc->IsRareSpawn() || npc_name.find('#') != std::string::npos) { + if (npc->IsRareSpawn() || npc_name.find('#') != std::string::npos || isupper(npc_name[0])) { return 1; } @@ -425,6 +425,25 @@ int8 NpcScaleManager::GetNPCScalingType(NPC *&npc) return 0; } +/** + * @param npc + * @return std::string + */ +std::string NpcScaleManager::GetNPCScalingTypeName(NPC *&npc) +{ + int8 scaling_type = GetNPCScalingType(npc); + + if (scaling_type == 1) { + return "Named"; + } + + if (npc->IsRaidTarget()) { + return "Raid"; + } + + return "Trash"; +} + /** * Returns false if scaling data not found * @param npc diff --git a/zone/npc_scale_manager.h b/zone/npc_scale_manager.h index 23bf90c48..afee566bd 100644 --- a/zone/npc_scale_manager.h +++ b/zone/npc_scale_manager.h @@ -95,6 +95,7 @@ public: std::map, global_npc_scale> npc_global_base_scaling_data; int8 GetNPCScalingType(NPC * &npc); + std::string GetNPCScalingTypeName(NPC * &npc); bool ApplyGlobalBaseScalingToNPCStatically(NPC * &npc); bool ApplyGlobalBaseScalingToNPCDynamically(NPC * &npc); From 020b14444939409582f51d2cf4a6379e8dc0ada7 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 19 Nov 2018 02:52:53 -0600 Subject: [PATCH 449/670] Try to make appveyor happy --- common/string_util.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/string_util.cpp b/common/string_util.cpp index 16123811d..a41f5c184 100644 --- a/common/string_util.cpp +++ b/common/string_util.cpp @@ -88,7 +88,7 @@ const std::string str_toupper(std::string s) { std::transform( s.begin(), s.end(), s.begin(), - [](unsigned char c) { return std::toupper(c); } + [](unsigned char c) { return ::toupper(c); } ); return s; } @@ -97,7 +97,7 @@ const std::string ucfirst(std::string s) { std::string output = s; if (!s.empty()) - output[0] = static_cast(std::toupper(s[0])); + output[0] = static_cast(::toupper(s[0])); return output; } From f3067872c421a0c9c6682f65eea55cbb8727e4ba Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 19 Nov 2018 02:57:38 -0600 Subject: [PATCH 450/670] Appveyor take 2 --- common/string_util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/string_util.cpp b/common/string_util.cpp index a41f5c184..508304ce1 100644 --- a/common/string_util.cpp +++ b/common/string_util.cpp @@ -67,7 +67,7 @@ const std::string str_tolower(std::string s) { std::transform( s.begin(), s.end(), s.begin(), - [](unsigned char c) { return std::tolower(c); } + [](unsigned char c) { return ::tolower(c); } ); return s; } From c6bb4cd44ad8e302e2c514d29b1bfcd46bff2088 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Mon, 19 Nov 2018 20:40:52 -0500 Subject: [PATCH 451/670] Update system_tables.txt [skip ci] --- utils/sql/system_tables.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/sql/system_tables.txt b/utils/sql/system_tables.txt index a5692dabd..4822f8f97 100644 --- a/utils/sql/system_tables.txt +++ b/utils/sql/system_tables.txt @@ -10,6 +10,7 @@ adventure_template_entry adventure_template_entry_flavor altadv_vars alternate_currency +auras base_data blocked_spells books From ecf3c47968ddfb11d367445023fcff5408f7a74d Mon Sep 17 00:00:00 2001 From: Matt Hogan Date: Wed, 21 Nov 2018 09:38:34 -0500 Subject: [PATCH 452/670] Fix omission for Perl/Lua binds for get_data_expires() --- zone/embparser_api.cpp | 1 + zone/lua_general.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/zone/embparser_api.cpp b/zone/embparser_api.cpp index 633bcda53..8d4857d5e 100644 --- a/zone/embparser_api.cpp +++ b/zone/embparser_api.cpp @@ -3692,6 +3692,7 @@ EXTERN_C XS(boot_quest) { newXS(strcpy(buf, "GetZoneID"), XS__GetZoneID, file); newXS(strcpy(buf, "GetZoneLongName"), XS__GetZoneLongName, file); newXS(strcpy(buf, "get_data"), XS__get_data, file); + newXS(strcpy(buf, "get_data_expires"), XS__get_data_expires, file); newXS(strcpy(buf, "set_data"), XS__set_data, file); newXS(strcpy(buf, "delete_data"), XS__delete_data, file); newXS(strcpy(buf, "IsBeneficialSpell"), XS__IsBeneficialSpell, file); diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp index 955b69d5e..6eb8ddf52 100644 --- a/zone/lua_general.cpp +++ b/zone/lua_general.cpp @@ -1680,6 +1680,7 @@ luabind::scope lua_register_general() { luabind::def("say_link", (std::string(*)(const char*,bool))&lua_say_link), luabind::def("say_link", (std::string(*)(const char*))&lua_say_link), luabind::def("get_data", (std::string(*)(std::string))&lua_get_data), + luabind::def("get_data_expires", (std::string(*)(std::string))&lua_get_data_expires), luabind::def("set_data", (void(*)(std::string, std::string))&lua_set_data), luabind::def("set_data", (void(*)(std::string, std::string, std::string))&lua_set_data), luabind::def("delete_data", (bool(*)(std::string))&lua_delete_data), From b55771ca7d83b770c3c95adfc97f67353c328324 Mon Sep 17 00:00:00 2001 From: KimLS Date: Wed, 21 Nov 2018 16:34:52 -0800 Subject: [PATCH 453/670] Some fixes as well as floating behavior for boats --- zone/mob_movement_manager.cpp | 113 +++++++++++++++++++++++++++++++--- zone/mob_movement_manager.h | 1 + 2 files changed, 105 insertions(+), 9 deletions(-) diff --git a/zone/mob_movement_manager.cpp b/zone/mob_movement_manager.cpp index 1c1db19fd..38cb253d4 100644 --- a/zone/mob_movement_manager.cpp +++ b/zone/mob_movement_manager.cpp @@ -143,10 +143,9 @@ public: m_last_sent_speed = current_speed; m_last_sent_time = current_time; - m_total_h_dist = DistanceNoZ(m->GetPosition(), glm::vec4(m_move_to_x, m_move_to_z, 0.0f, 0.0f)); + m_total_h_dist = DistanceNoZ(m->GetPosition(), glm::vec4(m_move_to_x, m_move_to_y, 0.0f, 0.0f)); m_total_v_dist = m_move_to_z - m->GetZ(); mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, current_speed, ClientRangeCloseMedium); - return false; } //When speed changes @@ -156,7 +155,6 @@ public: m_last_sent_speed = current_speed; m_last_sent_time = current_time; mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, current_speed, ClientRangeCloseMedium); - return false; } //If x seconds have passed without sending an update. @@ -166,7 +164,6 @@ public: m_last_sent_speed = current_speed; m_last_sent_time = current_time; mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, current_speed, ClientRangeCloseMedium); - return false; } auto &p = m->GetPosition(); @@ -266,10 +263,9 @@ public: m_last_sent_speed = current_speed; m_last_sent_time = current_time; - m_total_h_dist = DistanceNoZ(m->GetPosition(), glm::vec4(m_move_to_x, m_move_to_z, 0.0f, 0.0f)); + m_total_h_dist = DistanceNoZ(m->GetPosition(), glm::vec4(m_move_to_x, m_move_to_y, 0.0f, 0.0f)); m_total_v_dist = m_move_to_z - m->GetZ(); mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, current_speed, ClientRangeCloseMedium); - return false; } //When speed changes @@ -277,7 +273,6 @@ public: m_last_sent_speed = current_speed; m_last_sent_time = current_time; mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, current_speed, ClientRangeCloseMedium); - return false; } //If x seconds have passed without sending an update. @@ -285,7 +280,6 @@ public: m_last_sent_speed = current_speed; m_last_sent_time = current_time; mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, current_speed, ClientRangeCloseMedium); - return false; } auto &p = m->GetPosition(); @@ -329,6 +323,101 @@ public: } }; +//Just a swim to that can't travel in Z +class FloatToCommand : public MoveToCommand +{ +public: + FloatToCommand(float x, float y, MobMovementMode mode) : MoveToCommand(x, y, 0.0f, mode) { + + } + + virtual bool Process(MobMovementManager *mgr, Mob *m) + { + if (!m->IsAIControlled()) { + return true; + } + + //Send a movement packet when you start moving + double current_time = static_cast(Timer::GetCurrentTime()) / 1000.0; + int current_speed = 0; + + if (m_move_to_mode == MovementRunning) { + if (m->IsFeared()) { + current_speed = m->GetFearSpeed(); + } + else { + current_speed = m->GetRunspeed(); + } + } + else { + current_speed = m->GetWalkspeed(); + } + + if (!m_started) { + m_started = true; + //rotate to the point + m->SetMoving(true); + m->SetHeading(m->CalculateHeadingToTarget(m_move_to_x, m_move_to_y)); + + m_last_sent_speed = current_speed; + m_last_sent_time = current_time; + m_total_h_dist = DistanceNoZ(m->GetPosition(), glm::vec4(m_move_to_x, m_move_to_y, 0.0f, 0.0f)); + mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, current_speed, ClientRangeCloseMedium); + } + + //When speed changes + if (current_speed != m_last_sent_speed) { + m_last_sent_speed = current_speed; + m_last_sent_time = current_time; + mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, current_speed, ClientRangeCloseMedium); + } + + //If x seconds have passed without sending an update. + if (current_time - m_last_sent_time >= 0.8) { + m_last_sent_speed = current_speed; + m_last_sent_time = current_time; + mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, current_speed, ClientRangeCloseMedium); + } + + auto &p = m->GetPosition(); + glm::vec2 tar(m_move_to_x, m_move_to_y); + glm::vec2 pos(p.x, p.y); + double len = glm::distance(pos, tar); + if (len == 0) { + return true; + } + + m->SetMoved(true); + + glm::vec2 dir = tar - pos; + glm::vec2 ndir = glm::normalize(dir); + double distance_moved = frame_time * current_speed * 0.4f * 1.45f; + + if (distance_moved > len) { + if (m->IsNPC()) { + entity_list.ProcessMove(m->CastToNPC(), m_move_to_x, m_move_to_y, m_move_to_z); + } + + m->SetPosition(m_move_to_x, m_move_to_y, m->GetZ()); + return true; + } + else { + glm::vec2 npos = pos + (ndir * static_cast(distance_moved)); + + len -= distance_moved; + double total_distance_traveled = m_total_h_dist - len; + + if (m->IsNPC()) { + entity_list.ProcessMove(m->CastToNPC(), npos.x, npos.y, m->GetZ()); + } + + m->SetPosition(npos.x, npos.y, m->GetZ()); + } + + return false; + } +}; + class TeleportToCommand : public IMovementCommand { public: @@ -608,6 +697,7 @@ void MobMovementManager::StopNavigation(Mob *who) { auto &ent = (*iter); if (true == ent.second.Commands.empty()) { + PushStopMoving(ent.second); return; } @@ -931,7 +1021,7 @@ void MobMovementManager::UpdatePathBoat(Mob *who, float x, float y, float z, Mob auto eiter = _impl->Entries.find(who); auto &ent = (*eiter); - PushSwimTo(ent.second, x, y, z, mode); + PushFloatTo(ent.second, x, y, mode); PushStopMoving(ent.second); } @@ -950,6 +1040,11 @@ void MobMovementManager::PushSwimTo(MobMovementEntry &ent, float x, float y, flo ent.Commands.push_back(std::unique_ptr(new SwimToCommand(x, y, z, mode))); } +void MobMovementManager::PushFloatTo(MobMovementEntry &ent, float x, float y, MobMovementMode mode) +{ + ent.Commands.push_back(std::unique_ptr(new FloatToCommand(x, y, mode))); +} + void MobMovementManager::PushRotateTo(MobMovementEntry &ent, Mob *who, float to, MobMovementMode mode) { auto from = FixHeading(who->GetHeading()); diff --git a/zone/mob_movement_manager.h b/zone/mob_movement_manager.h index d9b2e7845..69a951f44 100644 --- a/zone/mob_movement_manager.h +++ b/zone/mob_movement_manager.h @@ -73,6 +73,7 @@ private: void PushTeleportTo(MobMovementEntry &ent, float x, float y, float z, float heading); void PushMoveTo(MobMovementEntry &ent, float x, float y, float z, MobMovementMode mode); void PushSwimTo(MobMovementEntry &ent, float x, float y, float z, MobMovementMode mode); + void PushFloatTo(MobMovementEntry &ent, float x, float y, MobMovementMode mode); void PushRotateTo(MobMovementEntry &ent, Mob *who, float to, MobMovementMode mode); void PushStopMoving(MobMovementEntry &ent); void PushEvadeCombat(MobMovementEntry &ent); From cfba613efd92c02283316596a1a3776dc312e953 Mon Sep 17 00:00:00 2001 From: KimLS Date: Wed, 21 Nov 2018 22:10:51 -0800 Subject: [PATCH 454/670] Remove floating logic, fix for some bestz logic --- zone/bot.cpp | 2 +- zone/entity.cpp | 2 +- zone/mob_ai.cpp | 6 +- zone/mob_movement_manager.cpp | 104 +--------------------------------- zone/mob_movement_manager.h | 1 - 5 files changed, 7 insertions(+), 108 deletions(-) diff --git a/zone/bot.cpp b/zone/bot.cpp index 2336b8c8d..b793e8520 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -2723,7 +2723,7 @@ void Bot::AI_Process() { // Fix Z when following during pull, not when engaged and stationary if (IsMoving() && fix_z_timer_engaged.Check()) { - FixZ(); + TryFixZ(); return; } diff --git a/zone/entity.cpp b/zone/entity.cpp index f7f5b4594..9f08b7ea3 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -648,7 +648,7 @@ void EntityList::AddNPC(NPC *npc, bool SendSpawnPacket, bool dontqueue) parse->EventNPC(EVENT_SPAWN, npc, nullptr, "", 0); - npc->FixZ(); + npc->TryFixZ(); uint16 emoteid = npc->GetEmoteID(); if (emoteid != 0) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 3f99d86c7..00a7e98c3 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -782,7 +782,7 @@ void Client::AI_Process() if (currently_fleeing) { if (fix_z_timer.Check()) - this->FixZ(5, true); + TryFixZ(5, true); if (IsRooted()) { //make sure everybody knows were not moving, for appearance sake @@ -992,7 +992,7 @@ void Mob::ProcessForcedMovement() Teleport(m_Position + m_Delta); m_Delta = glm::vec4(); SentPositionPacket(0.0f, 0.0f, 0.0f, 0.0f, 0, true); - FixZ(); // so we teleport to the ground locally, we want the client to interpolate falling etc + TryFixZ(); // so we teleport to the ground locally, we want the client to interpolate falling etc } else if (--ForcedMovement) { if (normal.z < -0.15f) // prevent too much wall climbing. ex. OMM's room in anguish normal.z = 0.0f; @@ -1104,7 +1104,7 @@ void Mob::AI_Process() { if (this->GetTarget()) { /* If we are engaged, moving and following client, let's look for best Z more often */ float target_distance = DistanceNoZ(this->GetPosition(), this->GetTarget()->GetPosition()); - FixZ(); + TryFixZ(); if (target_distance <= 15 && !this->CheckLosFN(this->GetTarget())) { Mob *target = this->GetTarget(); diff --git a/zone/mob_movement_manager.cpp b/zone/mob_movement_manager.cpp index 38cb253d4..d962860d3 100644 --- a/zone/mob_movement_manager.cpp +++ b/zone/mob_movement_manager.cpp @@ -323,101 +323,6 @@ public: } }; -//Just a swim to that can't travel in Z -class FloatToCommand : public MoveToCommand -{ -public: - FloatToCommand(float x, float y, MobMovementMode mode) : MoveToCommand(x, y, 0.0f, mode) { - - } - - virtual bool Process(MobMovementManager *mgr, Mob *m) - { - if (!m->IsAIControlled()) { - return true; - } - - //Send a movement packet when you start moving - double current_time = static_cast(Timer::GetCurrentTime()) / 1000.0; - int current_speed = 0; - - if (m_move_to_mode == MovementRunning) { - if (m->IsFeared()) { - current_speed = m->GetFearSpeed(); - } - else { - current_speed = m->GetRunspeed(); - } - } - else { - current_speed = m->GetWalkspeed(); - } - - if (!m_started) { - m_started = true; - //rotate to the point - m->SetMoving(true); - m->SetHeading(m->CalculateHeadingToTarget(m_move_to_x, m_move_to_y)); - - m_last_sent_speed = current_speed; - m_last_sent_time = current_time; - m_total_h_dist = DistanceNoZ(m->GetPosition(), glm::vec4(m_move_to_x, m_move_to_y, 0.0f, 0.0f)); - mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, current_speed, ClientRangeCloseMedium); - } - - //When speed changes - if (current_speed != m_last_sent_speed) { - m_last_sent_speed = current_speed; - m_last_sent_time = current_time; - mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, current_speed, ClientRangeCloseMedium); - } - - //If x seconds have passed without sending an update. - if (current_time - m_last_sent_time >= 0.8) { - m_last_sent_speed = current_speed; - m_last_sent_time = current_time; - mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, current_speed, ClientRangeCloseMedium); - } - - auto &p = m->GetPosition(); - glm::vec2 tar(m_move_to_x, m_move_to_y); - glm::vec2 pos(p.x, p.y); - double len = glm::distance(pos, tar); - if (len == 0) { - return true; - } - - m->SetMoved(true); - - glm::vec2 dir = tar - pos; - glm::vec2 ndir = glm::normalize(dir); - double distance_moved = frame_time * current_speed * 0.4f * 1.45f; - - if (distance_moved > len) { - if (m->IsNPC()) { - entity_list.ProcessMove(m->CastToNPC(), m_move_to_x, m_move_to_y, m_move_to_z); - } - - m->SetPosition(m_move_to_x, m_move_to_y, m->GetZ()); - return true; - } - else { - glm::vec2 npos = pos + (ndir * static_cast(distance_moved)); - - len -= distance_moved; - double total_distance_traveled = m_total_h_dist - len; - - if (m->IsNPC()) { - entity_list.ProcessMove(m->CastToNPC(), npos.x, npos.y, m->GetZ()); - } - - m->SetPosition(npos.x, npos.y, m->GetZ()); - } - - return false; - } -}; - class TeleportToCommand : public IMovementCommand { public: @@ -840,7 +745,7 @@ void MobMovementManager::UpdatePath(Mob *who, float x, float y, float z, MobMove PushStopMoving(ent.second); return; } - + if (who->IsBoat()) { UpdatePathBoat(who, x, y, z, mode); } else if (who->IsUnderwaterOnly()) { @@ -1021,7 +926,7 @@ void MobMovementManager::UpdatePathBoat(Mob *who, float x, float y, float z, Mob auto eiter = _impl->Entries.find(who); auto &ent = (*eiter); - PushFloatTo(ent.second, x, y, mode); + PushSwimTo(ent.second, x, y, z, mode); PushStopMoving(ent.second); } @@ -1040,11 +945,6 @@ void MobMovementManager::PushSwimTo(MobMovementEntry &ent, float x, float y, flo ent.Commands.push_back(std::unique_ptr(new SwimToCommand(x, y, z, mode))); } -void MobMovementManager::PushFloatTo(MobMovementEntry &ent, float x, float y, MobMovementMode mode) -{ - ent.Commands.push_back(std::unique_ptr(new FloatToCommand(x, y, mode))); -} - void MobMovementManager::PushRotateTo(MobMovementEntry &ent, Mob *who, float to, MobMovementMode mode) { auto from = FixHeading(who->GetHeading()); diff --git a/zone/mob_movement_manager.h b/zone/mob_movement_manager.h index 69a951f44..d9b2e7845 100644 --- a/zone/mob_movement_manager.h +++ b/zone/mob_movement_manager.h @@ -73,7 +73,6 @@ private: void PushTeleportTo(MobMovementEntry &ent, float x, float y, float z, float heading); void PushMoveTo(MobMovementEntry &ent, float x, float y, float z, MobMovementMode mode); void PushSwimTo(MobMovementEntry &ent, float x, float y, float z, MobMovementMode mode); - void PushFloatTo(MobMovementEntry &ent, float x, float y, MobMovementMode mode); void PushRotateTo(MobMovementEntry &ent, Mob *who, float to, MobMovementMode mode); void PushStopMoving(MobMovementEntry &ent); void PushEvadeCombat(MobMovementEntry &ent); From a26cf5f1de6141e193febb63e5eeb28bf9856eea Mon Sep 17 00:00:00 2001 From: KimLS Date: Sat, 24 Nov 2018 15:46:50 -0800 Subject: [PATCH 455/670] Some changes to fix various issues --- zone/mob_ai.cpp | 50 ++++++++++++----------------------- zone/mob_movement_manager.cpp | 6 ++--- 2 files changed, 20 insertions(+), 36 deletions(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 00a7e98c3..f37c550a5 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -835,7 +835,9 @@ void Client::AI_Process() bool is_combat_range = CombatRange(GetTarget()); if (is_combat_range) { - StopNavigation(); + if (IsMoving()) { + StopNavigation(); + } if (charm_class_attacks_timer.Check()) { DoClassAttacks(GetTarget()); @@ -1196,12 +1198,12 @@ void Mob::AI_Process() { bool is_combat_range = CombatRange(target); if (is_combat_range) { - StopNavigation(); - - if (AI_movement_timer->Check()) { - FaceTarget(); + if (IsMoving()) { + StopNavigation(); } + FaceTarget(); + //casting checked above... if (target && !IsStunned() && !IsMezzed() && GetAppearance() != eaDead && !IsMeleeDisabled()) { @@ -1356,22 +1358,6 @@ void Mob::AI_Process() { } //end is within combat rangepet else { - //we cannot reach our target... - //underwater stuff only works with water maps in the zone! - //if (IsNPC() && CastToNPC()->IsUnderwaterOnly() && zone->HasWaterMap()) { - // auto targetPosition = glm::vec3(target->GetX(), target->GetY(), target->GetZ()); - // if (!zone->watermap->InLiquid(targetPosition)) { - // Mob *tar = hate_list.GetEntWithMostHateOnList(this); - // if (tar != nullptr && tar != target) { - // SetTarget(tar); - // RunTo(tar->GetX(), tar->GetY(), tar->GetZ()); - // return; - // } - // else { - // RunTo(target->GetX(), target->GetY(), target->GetZ()); - // } - // } - //} // See if we can summon the mob to us if (!HateSummon()) { @@ -1382,7 +1368,10 @@ void Mob::AI_Process() { // Now pursue // TODO: Check here for another person on hate list with close hate value if (AI_PursueCastCheck()) { - FaceTarget(); + if (IsCasting() && GetClass() != BARD) { + StopNavigation(); + FaceTarget(); + } } else if (AI_movement_timer->Check() && target) { if (!IsRooted()) { @@ -1428,7 +1417,9 @@ void Mob::AI_Process() { } } if (AI_IdleCastCheck()) { - StopNavigation(); + if (IsCasting() && GetClass() != BARD) { + StopNavigation(); + } } else if (zone->CanDoCombat() && CastToNPC()->WillAggroNPCs() && AI_scan_area_timer->Check()) { @@ -1539,8 +1530,6 @@ void Mob::AI_Process() { running = true; } - bool waypoint_changed, node_reached; - auto &Goal = follow->GetPosition(); if (running) { @@ -1902,19 +1891,14 @@ void Mob::AI_Event_Engaged(Mob* attacker, bool iYellForHelp) { void Mob::AI_Event_NoLongerEngaged() { if (!IsAIControlled()) return; - this->AI_walking_timer->Start(RandomTimer(3000,20000)); + AI_walking_timer->Start(RandomTimer(3000,20000)); time_until_can_move = Timer::GetCurrentTime(); if (minLastFightingDelayMoving == maxLastFightingDelayMoving) time_until_can_move += minLastFightingDelayMoving; else time_until_can_move += zone->random.Int(minLastFightingDelayMoving, maxLastFightingDelayMoving); - // So mobs don't keep running as a ghost until AIwalking_timer fires - // if they were moving prior to losing all hate - // except if we're a pet, then we might run into some issues with pets backing off when they should immediately be moving - if(!IsPet()) - { - StopNavigation(); - } + + StopNavigation(); ClearRampage(); if(IsNPC()) diff --git a/zone/mob_movement_manager.cpp b/zone/mob_movement_manager.cpp index d962860d3..7c8998dd8 100644 --- a/zone/mob_movement_manager.cpp +++ b/zone/mob_movement_manager.cpp @@ -44,7 +44,7 @@ public: return true; } - auto rotate_to_speed = m_rotate_to_mode == MovementRunning ? 50.0 : 16.0; //todo: get this from mob + auto rotate_to_speed = m_rotate_to_mode == MovementRunning ? 200.0 : 16.0; //todo: get this from mob auto from = FixHeading(m->GetHeading()); auto to = FixHeading(m_rotate_to); @@ -382,6 +382,7 @@ public: if (m->IsMoving()) { m->SetMoving(false); + m->TryFixZ(); mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, 0, ClientRangeCloseMedium); } return true; @@ -606,8 +607,7 @@ void MobMovementManager::StopNavigation(Mob *who) { return; } - auto &running_cmd = ent.second.Commands.front(); - if (false == running_cmd->Started()) { + if (!who->IsMoving()) { ent.second.Commands.clear(); return; } From 78adc7590eec78b032bb47bbc220b58257a7b395 Mon Sep 17 00:00:00 2001 From: KimLS Date: Sun, 25 Nov 2018 00:03:47 -0800 Subject: [PATCH 456/670] Missing line from secret's patch, should address sometimes npcs stop moving. --- zone/mob_movement_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/mob_movement_manager.cpp b/zone/mob_movement_manager.cpp index 7c8998dd8..11d2416de 100644 --- a/zone/mob_movement_manager.cpp +++ b/zone/mob_movement_manager.cpp @@ -584,7 +584,7 @@ void MobMovementManager::NavigateTo(Mob *who, float x, float y, float z, MobMove auto within = IsPositionWithinSimpleCylinder(glm::vec3(x, y, z), glm::vec3(nav.navigate_to_x, nav.navigate_to_y, nav.navigate_to_z), 1.5f, 6.0f); auto heading_match = IsHeadingEqual(0.0, nav.navigate_to_heading); - if (false == within || false == heading_match) { + if (false == within || false == heading_match || ent.second.Commands.size() == 0) { ent.second.Commands.clear(); //Path is no longer valid, calculate a new path From be17d21149e840a3df7447d7d76a91e6247b9376 Mon Sep 17 00:00:00 2001 From: JJ Date: Sun, 25 Nov 2018 16:46:42 -0500 Subject: [PATCH 457/670] Add primary key to name_filter table. [skip ci] --- utils/sql/db_update_manifest.txt | 1 + utils/sql/git/required/2018_11_25_name_filter_update.sql | 1 + 2 files changed, 2 insertions(+) create mode 100644 utils/sql/git/required/2018_11_25_name_filter_update.sql diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index 587839291..0c90308f9 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -383,6 +383,7 @@ 9127|2018_09_07_NPCMaxAggroDist.sql|SHOW COLUMNS FROM `zone` LIKE 'npc_max_aggro_dist'|empty| 9128|2018_08_13_inventory_version_update.sql|SHOW TABLES LIKE 'inventory_version'|not_empty| 9129|2018_08_13_inventory_update.sql|SHOW TABLES LIKE 'inventory_versions'|empty| +9130|2018_11_25_name_filter_update.sql|SHOW COLUMS FROM `name_filter` LIKE 'id'|empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/utils/sql/git/required/2018_11_25_name_filter_update.sql b/utils/sql/git/required/2018_11_25_name_filter_update.sql new file mode 100644 index 000000000..239a483a5 --- /dev/null +++ b/utils/sql/git/required/2018_11_25_name_filter_update.sql @@ -0,0 +1 @@ +ALTER TABLE `zone` ADD `npc_max_aggro_dist` INT NOT NULL DEFAULT '600'; From fc69824a3f2b6c185813acdaf0dd559069afecea Mon Sep 17 00:00:00 2001 From: JJ Date: Sun, 25 Nov 2018 16:53:00 -0500 Subject: [PATCH 458/670] Oops. https://github.com/EQEmu/Server/commit/be17d21149e840a3df7447d7d76a91e6247b9376 --- utils/sql/git/required/2018_11_25_name_filter_update.sql | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/sql/git/required/2018_11_25_name_filter_update.sql b/utils/sql/git/required/2018_11_25_name_filter_update.sql index 239a483a5..51a6ca86d 100644 --- a/utils/sql/git/required/2018_11_25_name_filter_update.sql +++ b/utils/sql/git/required/2018_11_25_name_filter_update.sql @@ -1 +1,5 @@ -ALTER TABLE `zone` ADD `npc_max_aggro_dist` INT NOT NULL DEFAULT '600'; +ALTER TABLE `name_filter` +ADD COLUMN `id` INT(11) NULL AUTO_INCREMENT FIRST, +DROP PRIMARY KEY, +ADD PRIMARY KEY (`id`) USING BTREE, +ADD INDEX `name_search_index`(`name`); From e46b9043eed0687e1cacbdc2b2aa6ecdb43d6733 Mon Sep 17 00:00:00 2001 From: JJ Date: Sun, 25 Nov 2018 16:55:56 -0500 Subject: [PATCH 459/670] And the version. [skip ci] --- common/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/version.h b/common/version.h index 4caca5b38..e5603c247 100644 --- a/common/version.h +++ b/common/version.h @@ -30,7 +30,7 @@ Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt */ -#define CURRENT_BINARY_DATABASE_VERSION 9129 +#define CURRENT_BINARY_DATABASE_VERSION 9130 #ifdef BOTS #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9021 #else From db5c42735c638f5389ba1470b151b7879bca9041 Mon Sep 17 00:00:00 2001 From: KimLS Date: Sun, 25 Nov 2018 15:33:04 -0800 Subject: [PATCH 460/670] Fix a situation where nav could end up not being reset --- zone/mob_movement_manager.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/zone/mob_movement_manager.cpp b/zone/mob_movement_manager.cpp index 11d2416de..917ec502c 100644 --- a/zone/mob_movement_manager.cpp +++ b/zone/mob_movement_manager.cpp @@ -601,7 +601,13 @@ void MobMovementManager::NavigateTo(Mob *who, float x, float y, float z, MobMove void MobMovementManager::StopNavigation(Mob *who) { auto iter = _impl->Entries.find(who); auto &ent = (*iter); - + auto &nav = ent.second.NavTo; + + nav.navigate_to_x = 0.0; + nav.navigate_to_y = 0.0; + nav.navigate_to_z = 0.0; + nav.navigate_to_heading = 0.0; + if (true == ent.second.Commands.empty()) { PushStopMoving(ent.second); return; From 1654dd6bafc115a3cc4eeb5eac8ebc92739e8d74 Mon Sep 17 00:00:00 2001 From: KimLS Date: Sun, 25 Nov 2018 21:11:42 -0800 Subject: [PATCH 461/670] Some debug logging for water maps --- zone/water_map.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/zone/water_map.cpp b/zone/water_map.cpp index d6b84a802..9c51e3056 100644 --- a/zone/water_map.cpp +++ b/zone/water_map.cpp @@ -14,25 +14,30 @@ WaterMap* WaterMap::LoadWaterMapfile(std::string zone_name) { std::transform(zone_name.begin(), zone_name.end(), zone_name.begin(), ::tolower); std::string file_path = Config->MapDir + "water/" + zone_name + std::string(".wtr"); + Log(Logs::General, Logs::Debug, "Attempting to load water map with path %s", file_path.c_str()); FILE *f = fopen(file_path.c_str(), "rb"); if(f) { char magic[10]; uint32 version; if(fread(magic, 10, 1, f) != 1) { + Log(Logs::General, Logs::Debug, "Failed to load water map, error reading magic string in header."); fclose(f); return nullptr; } if(strncmp(magic, "EQEMUWATER", 10)) { + Log(Logs::General, Logs::Debug, "Failed to load water map, bad magic string in header."); fclose(f); return nullptr; } if(fread(&version, sizeof(version), 1, f) != 1) { + Log(Logs::General, Logs::Debug, "Failed to load water map, error reading version."); fclose(f); return nullptr; } + Log(Logs::General, Logs::Debug, "Attempting to V%u load water map %s.", version, file_path.c_str()); if(version == 1) { auto wm = new WaterMapV1(); if(!wm->Load(f)) { @@ -56,10 +61,12 @@ WaterMap* WaterMap::LoadWaterMapfile(std::string zone_name) { fclose(f); return wm; } else { + Log(Logs::General, Logs::Debug, "Failed to load water map, unsupported version V%u.", version); fclose(f); return nullptr; } } + Log(Logs::General, Logs::Debug, "Failed to load water map, could not open file for reading %s.", file_path.c_str()); return nullptr; } From 86ade2261bffa7bda505f38eb6928d1128855969 Mon Sep 17 00:00:00 2001 From: JJ Date: Mon, 26 Nov 2018 18:08:34 -0500 Subject: [PATCH 462/670] Move name_filter table from user_tables.txt to system_tables.txt [skip ci] --- utils/sql/system_tables.txt | 1 + utils/sql/user_tables.txt | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/sql/system_tables.txt b/utils/sql/system_tables.txt index 4822f8f97..fccb0e0c8 100644 --- a/utils/sql/system_tables.txt +++ b/utils/sql/system_tables.txt @@ -60,6 +60,7 @@ merc_types merc_weaponinfo merchantlist mercs +name_filter npc_emotes npc_faction npc_faction_entries diff --git a/utils/sql/user_tables.txt b/utils/sql/user_tables.txt index 941e30c47..4d77be3a1 100644 --- a/utils/sql/user_tables.txt +++ b/utils/sql/user_tables.txt @@ -59,7 +59,6 @@ launcher_zones lfguild mail merchantlist_temp -name_filter object_contents petitions player_titlesets From df2e68ad3106ed3727617cff1a860843e1f382b4 Mon Sep 17 00:00:00 2001 From: Uleat Date: Thu, 29 Nov 2018 22:55:04 -0500 Subject: [PATCH 463/670] Added missing return value --- common/net/packet.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/net/packet.cpp b/common/net/packet.cpp index 4c7dc74b6..deaa07843 100644 --- a/common/net/packet.cpp +++ b/common/net/packet.cpp @@ -350,4 +350,5 @@ bool EQ::Net::StaticPacket::Resize(size_t new_size) } m_data_length = new_size; -} \ No newline at end of file + return true; +} From dacbce1c5f6090f2433913647ef4ba233911ae30 Mon Sep 17 00:00:00 2001 From: KimLS Date: Thu, 29 Nov 2018 23:11:39 -0800 Subject: [PATCH 464/670] Some changes to fixz while pathing --- common/ruletypes.h | 3 ++- zone/bonuses.cpp | 4 ---- zone/bot.cpp | 4 ---- zone/entity.cpp | 2 +- zone/mob.cpp | 20 +------------------- zone/mob.h | 3 --- zone/mob_ai.cpp | 21 +-------------------- zone/mob_movement_manager.cpp | 33 +++++++++++++++++++++++++++------ zone/waypoints.cpp | 16 ++++++++++++---- 9 files changed, 44 insertions(+), 62 deletions(-) diff --git a/common/ruletypes.h b/common/ruletypes.h index 37f47b21d..b76f3ab15 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -277,7 +277,8 @@ RULE_CATEGORY_END() RULE_CATEGORY(Map) RULE_BOOL(Map, FixPathingZOnSendTo, false) //try to repair Z coords in the SendTo routine as well. -RULE_BOOL(Map, FixZWhenMoving, true) // Automatically fix NPC Z coordinates when moving/pathing/engaged (Far less CPU intensive than its predecessor) +RULE_BOOL(Map, FixZWhenPathing, true) // Automatically fix NPC Z coordinates when moving/pathing/engaged (Far less CPU intensive than its predecessor) +RULE_REAL(Map, DistanceCanTravelBeforeAdjustment, 10.0) // distance a mob can path before FixZ is called, depends on FixZWhenPathing RULE_BOOL(Map, MobZVisualDebug, false) // Displays spell effects determining whether or not NPC is hitting Best Z calcs (blue for hit, red for miss) RULE_REAL(Map, FixPathingZMaxDeltaSendTo, 20) //at runtime in SendTo: max change in Z to allow the BestZ code to apply. RULE_INT(Map, FindBestZHeightAdjust, 1) // Adds this to the current Z before seeking the best Z position diff --git a/zone/bonuses.cpp b/zone/bonuses.cpp index e71c6e0d5..d2b0d11f8 100644 --- a/zone/bonuses.cpp +++ b/zone/bonuses.cpp @@ -52,10 +52,6 @@ void Mob::CalcBonuses() We set this here because NPC's can cast spells to change walkspeed/runspeed */ float get_walk_speed = static_cast(0.025f * this->GetWalkspeed()); - if (get_walk_speed >= 0.9 && this->fix_z_timer.GetDuration() != 100) { - this->fix_z_timer.SetTimer(100); - } - rooted = FindType(SE_Root); } diff --git a/zone/bot.cpp b/zone/bot.cpp index b793e8520..f78363649 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -2722,10 +2722,6 @@ void Bot::AI_Process() { } // Fix Z when following during pull, not when engaged and stationary - if (IsMoving() && fix_z_timer_engaged.Check()) { - TryFixZ(); - return; - } if (GetTarget() && GetTarget()->IsFeared() && !spellend_timer.Enabled() && AI_think_timer->Check()) { if (!IsFacingMob(GetTarget())) diff --git a/zone/entity.cpp b/zone/entity.cpp index 9f08b7ea3..f7f5b4594 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -648,7 +648,7 @@ void EntityList::AddNPC(NPC *npc, bool SendSpawnPacket, bool dontqueue) parse->EventNPC(EVENT_SPAWN, npc, nullptr, "", 0); - npc->TryFixZ(); + npc->FixZ(); uint16 emoteid = npc->GetEmoteID(); if (emoteid != 0) diff --git a/zone/mob.cpp b/zone/mob.cpp index b2912f46a..a2e55dd19 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -112,8 +112,6 @@ Mob::Mob(const char* in_name, tmHidden(-1), mitigation_ac(0), m_specialattacks(eSpecialAttacks::None), - fix_z_timer(300), - fix_z_timer_engaged(100), attack_anim_timer(1000), position_update_melee_push_timer(500), hate_list_cleanup_timer(6000) @@ -3426,7 +3424,7 @@ float Mob::FindDestGroundZ(glm::vec3 dest, float z_offset) if (zone->zonemap != nullptr) { dest.z += z_offset; - best_z = zone->zonemap->FindBestZ(dest, nullptr); + best_z = zone->zonemap->FindClosestZ(dest, nullptr); } return best_z; } @@ -6003,22 +6001,6 @@ float Mob::GetDefaultRaceSize() const { return GetRaceGenderDefaultHeight(race, gender); } -void Mob::TryFixZ(int32 z_find_offset, bool fix_client_z) -{ - if (fix_z_timer.Check() && flymode != GravityBehavior::Flying) { - auto watermap = zone->watermap; - if (watermap) { - if (!watermap->InLiquid(m_Position)) { - FixZ(); - } - } - else { - FixZ(); - } - } -} - - #ifdef BOTS bool Mob::JoinHealRotationTargetPool(std::shared_ptr* heal_rotation) { diff --git a/zone/mob.h b/zone/mob.h index 66d43ef7c..ffa471597 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -982,7 +982,6 @@ public: void SendToFixZ(float new_x, float new_y, float new_z); float GetZOffset() const; float GetDefaultRaceSize() const; - void TryFixZ(int32 z_find_offset = 5, bool fix_client_z = false); void FixZ(int32 z_find_offset = 5, bool fix_client_z = false); float GetFixedZ(const glm::vec3 &destination, int32 z_find_offset = 5); virtual int GetStuckBehavior() const { return 0; } @@ -1457,8 +1456,6 @@ protected: bool flee_mode; Timer flee_timer; - Timer fix_z_timer; - Timer fix_z_timer_engaged; Timer attack_anim_timer; Timer position_update_melee_push_timer; diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index f37c550a5..e44a1246c 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -781,9 +781,6 @@ void Client::AI_Process() if (RuleB(Combat, EnableFearPathing)) { if (currently_fleeing) { - if (fix_z_timer.Check()) - TryFixZ(5, true); - if (IsRooted()) { //make sure everybody knows were not moving, for appearance sake if (IsMoving()) { @@ -994,7 +991,7 @@ void Mob::ProcessForcedMovement() Teleport(m_Position + m_Delta); m_Delta = glm::vec4(); SentPositionPacket(0.0f, 0.0f, 0.0f, 0.0f, 0, true); - TryFixZ(); // so we teleport to the ground locally, we want the client to interpolate falling etc + FixZ(); // so we teleport to the ground locally, we want the client to interpolate falling etc } else if (--ForcedMovement) { if (normal.z < -0.15f) // prevent too much wall climbing. ex. OMM's room in anguish normal.z = 0.0f; @@ -1100,22 +1097,6 @@ void Mob::AI_Process() { } if (engaged) { - - /* Fix Z when following during pull, not when engaged and stationary */ - if (moving && fix_z_timer_engaged.Check()) { - if (this->GetTarget()) { - /* If we are engaged, moving and following client, let's look for best Z more often */ - float target_distance = DistanceNoZ(this->GetPosition(), this->GetTarget()->GetPosition()); - TryFixZ(); - - if (target_distance <= 15 && !this->CheckLosFN(this->GetTarget())) { - Mob *target = this->GetTarget(); - - Teleport(target->GetPosition()); - } - } - } - if (!(m_PlayerState & static_cast(PlayerState::Aggressive))) SendAddPlayerState(PlayerState::Aggressive); diff --git a/zone/mob_movement_manager.cpp b/zone/mob_movement_manager.cpp index 917ec502c..ca1b9b14e 100644 --- a/zone/mob_movement_manager.cpp +++ b/zone/mob_movement_manager.cpp @@ -98,6 +98,7 @@ class MoveToCommand : public IMovementCommand { public: MoveToCommand(float x, float y, float z, MobMovementMode mode) { + m_distance_moved_since_correction = 0.0; m_move_to_x = x; m_move_to_y = y; m_move_to_z = z; @@ -139,7 +140,6 @@ public: //rotate to the point m->SetMoving(true); m->SetHeading(m->CalculateHeadingToTarget(m_move_to_x, m_move_to_y)); - m->TryFixZ(); m_last_sent_speed = current_speed; m_last_sent_time = current_time; @@ -150,7 +150,11 @@ public: //When speed changes if (current_speed != m_last_sent_speed) { - m->TryFixZ(); + if (RuleB(Map, FixZWhenPathing)) { + m->FixZ(); + } + + m_distance_moved_since_correction = 0.0; m_last_sent_speed = current_speed; m_last_sent_time = current_time; @@ -159,7 +163,11 @@ public: //If x seconds have passed without sending an update. if (current_time - m_last_sent_time >= 5.0) { - m->TryFixZ(); + if (RuleB(Map, FixZWhenPathing)) { + m->FixZ(); + } + + m_distance_moved_since_correction = 0.0; m_last_sent_speed = current_speed; m_last_sent_time = current_time; @@ -187,7 +195,9 @@ public: m->SetPosition(m_move_to_x, m_move_to_y, m_move_to_z); - m->TryFixZ(); + if (RuleB(Map, FixZWhenPathing)) { + m->FixZ(); + } return true; } else { @@ -203,6 +213,15 @@ public: } m->SetPosition(npos.x, npos.y, z_at_pos); + + + if (RuleB(Map, FixZWhenPathing)) { + m_distance_moved_since_correction += distance_moved; + if (m_distance_moved_since_correction > RuleR(Map, DistanceCanTravelBeforeAdjustment)) { + m_distance_moved_since_correction = 0.0; + m->FixZ(); + } + } } return false; @@ -213,7 +232,7 @@ public: } protected: - + double m_distance_moved_since_correction; double m_move_to_x; double m_move_to_y; double m_move_to_z; @@ -382,7 +401,9 @@ public: if (m->IsMoving()) { m->SetMoving(false); - m->TryFixZ(); + if (RuleB(Map, FixZWhenPathing)) { + m->FixZ(); + } mgr->SendCommandToClients(m, 0.0, 0.0, 0.0, 0.0, 0, ClientRangeCloseMedium); } return true; diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index 833a8132b..e7b4298d5 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -608,7 +608,7 @@ float Mob::GetFixedZ(const glm::vec3 &destination, int32 z_find_offset) { float new_z = destination.z; - if (zone->HasMap() && RuleB(Map, FixZWhenMoving)) { + if (zone->HasMap()) { if (flymode == GravityBehavior::Flying) return new_z; @@ -645,11 +645,19 @@ float Mob::GetFixedZ(const glm::vec3 &destination, int32 z_find_offset) { } void Mob::FixZ(int32 z_find_offset /*= 5*/, bool fix_client_z /*= false*/) { - glm::vec3 current_loc(m_Position); - - if (IsClient() && !fix_client_z) + if (IsClient() && !fix_client_z) { return; + } + + if (flymode == GravityBehavior::Flying) { + return; + } + if (zone->watermap && zone->watermap->InLiquid(m_Position)) { + return; + } + + glm::vec3 current_loc(m_Position); float new_z = GetFixedZ(current_loc, z_find_offset); if (new_z == m_Position.z) From 9bf23a131b9cd6774d2ab75c20ef5e886f40629e Mon Sep 17 00:00:00 2001 From: Noudess Date: Thu, 6 Dec 2018 14:25:58 -0500 Subject: [PATCH 465/670] Small fix for an NPC on a faction but with no entries in npc_faction_entries. --- zone/npc.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/zone/npc.cpp b/zone/npc.cpp index 2b1af6de9..dbbd3772d 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -2632,7 +2632,16 @@ FACTION_VALUE NPC::CheckNPCFactionAlly(int32 other_faction) { return FACTION_INDIFFERENT; } } - return FACTION_INDIFFERENT; + + // I believe that the assumption is, barring no entry in npc_faction_entries + // that two npcs on like faction con ally to each other. This catches cases + // where an npc is on a faction but has no hits (hence no entry in + // npc_faction_entries). + + if (GetPrimaryFaction() == other_faction) + return FACTION_ALLY; + else + return FACTION_INDIFFERENT; } bool NPC::IsFactionListAlly(uint32 other_faction) { @@ -2820,4 +2829,4 @@ void NPC::ModifyStatsOnCharm(bool bRemoved) // the rest of the stats aren't cached, so lets just do these two instead of full CalcBonuses() SetAttackTimer(); CalcAC(); -} \ No newline at end of file +} From 58d0aef90de67d2fd08a3e13bd6749fcae0235a2 Mon Sep 17 00:00:00 2001 From: Noudess Date: Fri, 7 Dec 2018 12:17:27 -0500 Subject: [PATCH 466/670] Fix the LoadGFG function to no longer have the unused parameter. Fixed the command that was passing the wrong second parameter. --- zone/command.cpp | 2 +- zone/zone.cpp | 39 ++++++++++++++++----------------------- zone/zone.h | 2 +- 3 files changed, 18 insertions(+), 25 deletions(-) mode change 100644 => 100755 zone/command.cpp mode change 100644 => 100755 zone/zone.cpp mode change 100644 => 100755 zone/zone.h diff --git a/zone/command.cpp b/zone/command.cpp old mode 100644 new mode 100755 index 98faec71a..2a52b02d2 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -1688,7 +1688,7 @@ void command_zheader(Client *c, const Seperator *sep) c->Message(0, "Invalid Zone Name: %s", sep->argplus[1]); else { - if (zone->LoadZoneCFG(sep->argplus[1], true)) + if (zone->LoadZoneCFG(sep->argplus[1], 0)) c->Message(0, "Successfully loaded zone header for %s from database.", sep->argplus[1]); else c->Message(0, "Failed to load zone header %s from database", sep->argplus[1]); diff --git a/zone/zone.cpp b/zone/zone.cpp old mode 100644 new mode 100755 index 3b9e5e513..b0e18b26c --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -893,7 +893,7 @@ bool Zone::Init(bool iStaticZone) { SetStaticZone(iStaticZone); //load the zone config file. - if (!LoadZoneCFG(zone->GetShortName(), zone->GetInstanceVersion(), true)) // try loading the zone name... + if (!LoadZoneCFG(zone->GetShortName(), zone->GetInstanceVersion())) // try loading the zone name... LoadZoneCFG(zone->GetFileName(), zone->GetInstanceVersion()); // if that fails, try the file name, then load defaults if(RuleManager::Instance()->GetActiveRulesetID() != default_ruleset) @@ -1054,39 +1054,31 @@ void Zone::ReloadStaticData() { zone->LoadNPCEmotes(&NPCEmoteList); //load the zone config file. - if (!LoadZoneCFG(zone->GetShortName(), zone->GetInstanceVersion(), true)) // try loading the zone name... + if (!LoadZoneCFG(zone->GetShortName(), zone->GetInstanceVersion())) // try loading the zone name... LoadZoneCFG(zone->GetFileName(), zone->GetInstanceVersion()); // if that fails, try the file name, then load defaults Log(Logs::General, Logs::Status, "Zone Static Data Reloaded."); } -bool Zone::LoadZoneCFG(const char* filename, uint16 instance_id, bool DontLoadDefault) +bool Zone::LoadZoneCFG(const char* filename, uint16 instance_id) { + memset(&newzone_data, 0, sizeof(NewZone_Struct)); - if(instance_id == 0) + map_name = nullptr; + + if(!database.GetZoneCFG(database.GetZoneID(filename), instance_id, &newzone_data, can_bind, + can_combat, can_levitate, can_castoutdoor, is_city, is_hotzone, allow_mercs, zone_type, default_ruleset, &map_name)) { - map_name = nullptr; - if(!database.GetZoneCFG(database.GetZoneID(filename), 0, &newzone_data, can_bind, - can_combat, can_levitate, can_castoutdoor, is_city, is_hotzone, allow_mercs, zone_type, default_ruleset, &map_name)) - { - Log(Logs::General, Logs::Error, "Error loading the Zone Config."); - return false; - } - } - else - { - //Fall back to base zone if we don't find the instance version. - map_name = nullptr; - if(!database.GetZoneCFG(database.GetZoneID(filename), instance_id, &newzone_data, can_bind, - can_combat, can_levitate, can_castoutdoor, is_city, is_hotzone, allow_mercs, zone_type, default_ruleset, &map_name)) + // If loading a non-zero instance failed, try loading the default + if (instance_id != 0) { safe_delete_array(map_name); - if(!database.GetZoneCFG(database.GetZoneID(filename), 0, &newzone_data, can_bind, - can_combat, can_levitate, can_castoutdoor, is_city, is_hotzone, allow_mercs, zone_type, default_ruleset, &map_name)) - { + if(!database.GetZoneCFG(database.GetZoneID(filename), 0, &newzone_data, can_bind, can_combat, can_levitate, + can_castoutdoor, is_city, is_hotzone, allow_mercs, zone_type, default_ruleset, &map_name)) + { Log(Logs::General, Logs::Error, "Error loading the Zone Config."); return false; - } + } } } @@ -1274,7 +1266,8 @@ bool Zone::Process() { } } - if(Weather_Timer->Check()){ + if(Weather_Timer->Check()) + { Weather_Timer->Disable(); this->ChangeWeather(); } diff --git a/zone/zone.h b/zone/zone.h old mode 100644 new mode 100755 index 5f8651d8b..ae0d93332 --- a/zone/zone.h +++ b/zone/zone.h @@ -93,7 +93,7 @@ public: bool is_zone_time_localized; bool Init(bool iStaticZone); - bool LoadZoneCFG(const char* filename, uint16 instance_id, bool DontLoadDefault = false); + bool LoadZoneCFG(const char* filename, uint16 instance_id); bool SaveZoneCFG(); bool IsLoaded(); bool IsPVPZone() { return pvpzone; } From cfbd8e727a486859db00b1e590455bfe9dad4949 Mon Sep 17 00:00:00 2001 From: Noudess Date: Wed, 12 Dec 2018 09:15:54 -0500 Subject: [PATCH 467/670] Fix typo in manifest. --- utils/sql/db_update_manifest.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index 0c90308f9..81a8fa2d8 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -383,7 +383,7 @@ 9127|2018_09_07_NPCMaxAggroDist.sql|SHOW COLUMNS FROM `zone` LIKE 'npc_max_aggro_dist'|empty| 9128|2018_08_13_inventory_version_update.sql|SHOW TABLES LIKE 'inventory_version'|not_empty| 9129|2018_08_13_inventory_update.sql|SHOW TABLES LIKE 'inventory_versions'|empty| -9130|2018_11_25_name_filter_update.sql|SHOW COLUMS FROM `name_filter` LIKE 'id'|empty| +9130|2018_11_25_name_filter_update.sql|SHOW COLUMNS FROM `name_filter` LIKE 'id'|empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not From 8ae9c99f3d29e4f67fae96e15703229bbc92611b Mon Sep 17 00:00:00 2001 From: Kinglykrab Date: Thu, 13 Dec 2018 19:41:19 -0500 Subject: [PATCH 468/670] Added new data bucket and quest functionality. Added multiple new instance related quest functions. 1. quest::GetInstanceIDByCharID(const char *zone, int16 version, uint32 char_id) - Allows you to pull the instance ID of a client by character ID. 2. quest::AssignToInstanceByCharID(uint16 instance_id, uint32 char_id) - Allows you to assign an instance to a client by character ID. 3. quest::RemoveFromInstanceByCharID(uint16 instance_id, uint32 char_id) - Allows you to remove a client from an instance by character ID. Added spell buckets, similar to spell globals. - Uses a new spell_buckets table and the Spells:EnableSpellBuckets rule. Added max level by data bucket. - Uses data bucket char_id-CharMaxLevel and Character:PerCharacterBucketMaxLevel rule. --- common/ruletypes.h | 4 +- common/version.h | 2 +- utils/sql/db_update_manifest.txt | 1 + .../git/required/2018_12_13_spell_buckets.sql | 10 +++ utils/sql/user_tables.txt | 1 + zone/client.h | 4 +- zone/exp.cpp | 28 ++++++ zone/questmgr.cpp | 90 +++++++++++++------ zone/questmgr.h | 3 + zone/spells.cpp | 79 +++++++++++----- 10 files changed, 170 insertions(+), 52 deletions(-) create mode 100644 utils/sql/git/required/2018_12_13_spell_buckets.sql diff --git a/common/ruletypes.h b/common/ruletypes.h index ab9acecf1..21c006099 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -38,6 +38,7 @@ RULE_CATEGORY(Character) RULE_INT(Character, MaxLevel, 65) RULE_BOOL(Character, PerCharacterQglobalMaxLevel, false) // This will check for qglobal 'CharMaxLevel' character qglobal (Type 5), if player tries to level beyond that point, it will not go beyond that level +RULE_BOOL(Character, PerCharacterBucketMaxLevel, false) // This will check for data bucket 'CharMaxLevel', if player tries to level beyond that point, it will not go beyond that level RULE_INT(Character, MaxExpLevel, 0) //Sets the Max Level attainable via Experience RULE_INT(Character, DeathExpLossLevel, 10) // Any level greater than this will lose exp on death RULE_INT(Character, DeathExpLossMaxLevel, 255) // Any level greater than this will no longer lose exp on death @@ -342,7 +343,8 @@ RULE_INT(Spells, TranslocateTimeLimit, 0) // If not zero, time in seconds to acc RULE_INT(Spells, SacrificeMinLevel, 46) //first level Sacrifice will work on RULE_INT(Spells, SacrificeMaxLevel, 69) //last level Sacrifice will work on RULE_INT(Spells, SacrificeItemID, 9963) //Item ID of the item Sacrifice will return (defaults to an EE) -RULE_BOOL(Spells, EnableSpellGlobals, false) // If Enabled, spells check the spell_globals table and compare character data from the quest globals before allowing that spell to scribe with scribespells +RULE_BOOL(Spells, EnableSpellGlobals, false) // If Enabled, spells check the spell_globals table and compare character data from their quest globals before allowing the spell to scribe with scribespells/traindiscs +RULE_BOOL(Spells, EnableSpellBuckets, false) // If Enabled, spells check the spell_buckets table and compare character data from their data buckets before allowing the spell to scribe with scribespells/traindiscs RULE_INT(Spells, MaxBuffSlotsNPC, 60) // default to Tit's limit RULE_INT(Spells, MaxSongSlotsNPC, 0) // NPCs don't have songs ... RULE_INT(Spells, MaxDiscSlotsNPC, 0) // NPCs don't have discs ... diff --git a/common/version.h b/common/version.h index e5603c247..baead2fe2 100644 --- a/common/version.h +++ b/common/version.h @@ -30,7 +30,7 @@ Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt */ -#define CURRENT_BINARY_DATABASE_VERSION 9130 +#define CURRENT_BINARY_DATABASE_VERSION 9131 #ifdef BOTS #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9021 #else diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index 81a8fa2d8..a203b825b 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -384,6 +384,7 @@ 9128|2018_08_13_inventory_version_update.sql|SHOW TABLES LIKE 'inventory_version'|not_empty| 9129|2018_08_13_inventory_update.sql|SHOW TABLES LIKE 'inventory_versions'|empty| 9130|2018_11_25_name_filter_update.sql|SHOW COLUMNS FROM `name_filter` LIKE 'id'|empty| +9131|2018_12_13_spell_buckets.sql|SHOW TABLES LIKE 'spell_buckets'|empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/utils/sql/git/required/2018_12_13_spell_buckets.sql b/utils/sql/git/required/2018_12_13_spell_buckets.sql new file mode 100644 index 000000000..1c56799f0 --- /dev/null +++ b/utils/sql/git/required/2018_12_13_spell_buckets.sql @@ -0,0 +1,10 @@ +CREATE TABLE `spell_buckets` ( + `spellid` bigint(11) unsigned NOT NULL, + `key` varchar(100) DEFAULT NULL, + `value` text, + PRIMARY KEY (`spellid`), + KEY `key_index` (`key`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Spells:EnableSpellBuckets', 'false', 'Enables spell buckets'); +INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Character:PerCharacterBucketMaxLevel', 'false', 'Enables data bucket-based max level.'); \ No newline at end of file diff --git a/utils/sql/user_tables.txt b/utils/sql/user_tables.txt index 4d77be3a1..a76e110f3 100644 --- a/utils/sql/user_tables.txt +++ b/utils/sql/user_tables.txt @@ -85,6 +85,7 @@ reports respawn_times sharedbank spell_globals +spell_buckets timers trader trader_audit diff --git a/zone/client.h b/zone/client.h index 023367e50..f7848202d 100644 --- a/zone/client.h +++ b/zone/client.h @@ -773,8 +773,10 @@ public: void UnscribeSpellAll(bool update_client = true); void UntrainDisc(int slot, bool update_client = true); void UntrainDiscAll(bool update_client = true); - bool SpellGlobalCheck(uint16 Spell_ID, uint32 Char_ID); + bool SpellGlobalCheck(uint16 spell_id, uint32 char_id); + bool SpellBucketCheck(uint16 spell_id, uint32 char_id); uint32 GetCharMaxLevelFromQGlobal(); + uint32 GetCharMaxLevelFromBucket(); inline bool IsSitting() const {return (playeraction == 1);} inline bool IsBecomeNPC() const { return npcflag; } diff --git a/zone/exp.cpp b/zone/exp.cpp index 94f36197d..302e29279 100644 --- a/zone/exp.cpp +++ b/zone/exp.cpp @@ -695,6 +695,18 @@ void Client::SetEXP(uint32 set_exp, uint32 set_aaxp, bool isrezzexp) { } } } + + if(RuleB(Character, PerCharacterBucketMaxLevel)){ + uint32 MaxLevel = GetCharMaxLevelFromBucket(); + if(MaxLevel){ + if(GetLevel() >= MaxLevel){ + uint32 expneeded = GetEXPForLevel(MaxLevel); + if(set_exp > expneeded) { + set_exp = expneeded; + } + } + } + } if ((GetLevel() != check_level) && !(check_level >= maxlevel)) { char val1[20]={0}; @@ -1133,6 +1145,22 @@ uint32 Client::GetCharMaxLevelFromQGlobal() { return false; } +uint32 Client::GetCharMaxLevelFromBucket() { + uint32 char_id = this->CharacterID(); + std::string query = StringFormat("SELECT value FROM data_buckets WHERE key = '%i-CharMaxLevel'", char_id); + auto results = database.QueryDatabase(query); + if (!results.Success()) { + Log(Logs::General, Logs::Error, "Data bucket for CharMaxLevel for char ID %i failed.", char_id); + return false; + } + + if (results.RowCount() > 0) { + auto row = results.begin(); + return atoi(row[0]); + } + return false; +} + uint32 Client::GetRequiredAAExperience() { #ifdef LUA_EQEMU uint32 lua_ret = 0; diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index 1393b0221..e775fa368 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -976,37 +976,44 @@ void QuestManager::permagender(int gender_id) { uint16 QuestManager::scribespells(uint8 max_level, uint8 min_level) { QuestManagerCurrentQuestVars(); uint16 book_slot, count; - uint16 curspell; + uint16 spell_id; - uint32 Char_ID = initiator->CharacterID(); + uint32 char_id = initiator->CharacterID(); bool SpellGlobalRule = RuleB(Spells, EnableSpellGlobals); + bool SpellBucketRule = RuleB(Spells, EnableSpellBuckets); bool SpellGlobalCheckResult = 0; + bool SpellBucketCheckResult = 0; - for(curspell = 0, book_slot = initiator->GetNextAvailableSpellBookSlot(), count = 0; curspell < SPDAT_RECORDS && book_slot < MAX_PP_SPELLBOOK; curspell++, book_slot = initiator->GetNextAvailableSpellBookSlot(book_slot)) + for(spell_id = 0, book_slot = initiator->GetNextAvailableSpellBookSlot(), count = 0; spell_id < SPDAT_RECORDS && book_slot < MAX_PP_SPELLBOOK; spell_id++, book_slot = initiator->GetNextAvailableSpellBookSlot(book_slot)) { if ( - spells[curspell].classes[WARRIOR] != 0 && //check if spell exists - spells[curspell].classes[initiator->GetPP().class_-1] <= max_level && //maximum level - spells[curspell].classes[initiator->GetPP().class_-1] >= min_level && //minimum level - spells[curspell].skill != 52 && - spells[curspell].effectid[EFFECT_COUNT - 1] != 10 + spells[spell_id].classes[WARRIOR] != 0 && //check if spell exists + spells[spell_id].classes[initiator->GetPP().class_-1] <= max_level && //maximum level + spells[spell_id].classes[initiator->GetPP().class_-1] >= min_level && //minimum level + spells[spell_id].skill != 52 && + spells[spell_id].effectid[EFFECT_COUNT - 1] != 10 ) { if (book_slot == -1) //no more book slots break; - if(!IsDiscipline(curspell) && !initiator->HasSpellScribed(curspell)) { //isn't a discipline & we don't already have it scribed + if(!IsDiscipline(spell_id) && !initiator->HasSpellScribed(spell_id)) { //isn't a discipline & we don't already have it scribed if (SpellGlobalRule) { // Bool to see if the character has the required QGlobal to scribe it if one exists in the Spell_Globals table - SpellGlobalCheckResult = initiator->SpellGlobalCheck(curspell, Char_ID); + SpellGlobalCheckResult = initiator->SpellGlobalCheck(spell_id, char_id); if (SpellGlobalCheckResult) { - initiator->ScribeSpell(curspell, book_slot); + initiator->ScribeSpell(spell_id, book_slot); count++; } - } - else { - initiator->ScribeSpell(curspell, book_slot); + } else if (SpellBucketRule) { + SpellBucketCheckResult = initiator->SpellBucketCheck(spell_id, char_id); + if (SpellBucketCheckResult) { + initiator->ScribeSpell(spell_id, book_slot); + count++; + } + } else { + initiator->ScribeSpell(spell_id, book_slot); count++; } } @@ -1018,46 +1025,59 @@ uint16 QuestManager::scribespells(uint8 max_level, uint8 min_level) { uint16 QuestManager::traindiscs(uint8 max_level, uint8 min_level) { QuestManagerCurrentQuestVars(); uint16 count; - uint16 curspell; + uint16 spell_id; - uint32 Char_ID = initiator->CharacterID(); + uint32 char_id = initiator->CharacterID(); bool SpellGlobalRule = RuleB(Spells, EnableSpellGlobals); + bool SpellBucketRule = RuleB(Spells, EnableSpellBuckets); bool SpellGlobalCheckResult = 0; + bool SpellBucketCheckResult = 0; - for(curspell = 0, count = 0; curspell < SPDAT_RECORDS; curspell++) + for(spell_id = 0, count = 0; spell_id < SPDAT_RECORDS; spell_id++) { if ( - spells[curspell].classes[WARRIOR] != 0 && //check if spell exists - spells[curspell].classes[initiator->GetPP().class_-1] <= max_level && //maximum level - spells[curspell].classes[initiator->GetPP().class_-1] >= min_level && //minimum level - spells[curspell].skill != 52 && - ( !RuleB(Spells, UseCHAScribeHack) || spells[curspell].effectid[EFFECT_COUNT - 1] != 10 ) + spells[spell_id].classes[WARRIOR] != 0 && //check if spell exists + spells[spell_id].classes[initiator->GetPP().class_-1] <= max_level && //maximum level + spells[spell_id].classes[initiator->GetPP().class_-1] >= min_level && //minimum level + spells[spell_id].skill != 52 && + ( !RuleB(Spells, UseCHAScribeHack) || spells[spell_id].effectid[EFFECT_COUNT - 1] != 10 ) ) { - if(IsDiscipline(curspell)){ + if(IsDiscipline(spell_id)){ //we may want to come up with a function like Client::GetNextAvailableSpellBookSlot() to help speed this up a little for(uint32 r = 0; r < MAX_PP_DISCIPLINES; r++) { - if(initiator->GetPP().disciplines.values[r] == curspell) { + if(initiator->GetPP().disciplines.values[r] == spell_id) { initiator->Message(13, "You already know this discipline."); break; //continue the 1st loop } else if(initiator->GetPP().disciplines.values[r] == 0) { if (SpellGlobalRule) { // Bool to see if the character has the required QGlobal to train it if one exists in the Spell_Globals table - SpellGlobalCheckResult = initiator->SpellGlobalCheck(curspell, Char_ID); + SpellGlobalCheckResult = initiator->SpellGlobalCheck(spell_id, char_id); if (SpellGlobalCheckResult) { - initiator->GetPP().disciplines.values[r] = curspell; - database.SaveCharacterDisc(Char_ID, r, curspell); + initiator->GetPP().disciplines.values[r] = spell_id; + database.SaveCharacterDisc(char_id, r, spell_id); initiator->SendDisciplineUpdate(); initiator->Message(0, "You have learned a new discipline!"); count++; //success counter } break; //continue the 1st loop + } else if (SpellBucketRule) { + // Bool to see if the character has the required bucket to train it if one exists in the spell_buckets table + SpellBucketCheckResult = initiator->SpellBucketCheck(spell_id, char_id); + if (SpellBucketCheckResult) { + initiator->GetPP().disciplines.values[r] = spell_id; + database.SaveCharacterDisc(char_id, r, spell_id); + initiator->SendDisciplineUpdate(); + initiator->Message(0, "You have learned a new discipline!"); + count++; + } + break; } else { - initiator->GetPP().disciplines.values[r] = curspell; - database.SaveCharacterDisc(Char_ID, r, curspell); + initiator->GetPP().disciplines.values[r] = spell_id; + database.SaveCharacterDisc(char_id, r, spell_id); initiator->SendDisciplineUpdate(); initiator->Message(0, "You have learned a new discipline!"); count++; //success counter @@ -2661,6 +2681,10 @@ uint16 QuestManager::GetInstanceID(const char *zone, int16 version) return 0; } +uint16 QuestManager::GetInstanceIDByCharID(const char *zone, int16 version, uint32 char_id) { + return database.GetInstanceID(zone, char_id, version); +} + void QuestManager::AssignToInstance(uint16 instance_id) { QuestManagerCurrentQuestVars(); @@ -2670,6 +2694,10 @@ void QuestManager::AssignToInstance(uint16 instance_id) } } +void QuestManager::AssignToInstanceByCharID(uint16 instance_id, uint32 char_id) { + database.AddClientToInstance(instance_id, char_id); +} + void QuestManager::AssignGroupToInstance(uint16 instance_id) { QuestManagerCurrentQuestVars(); @@ -2710,6 +2738,10 @@ void QuestManager::RemoveFromInstance(uint16 instance_id) } } +void QuestManager::RemoveFromInstanceByCharID(uint16 instance_id, uint32 char_id) { + database.RemoveClientFromInstance(instance_id, char_id); +} + void QuestManager::RemoveAllFromInstance(uint16 instance_id) { QuestManagerCurrentQuestVars(); diff --git a/zone/questmgr.h b/zone/questmgr.h index a3b9fac43..6818ae09b 100644 --- a/zone/questmgr.h +++ b/zone/questmgr.h @@ -234,10 +234,13 @@ public: uint32 GetInstanceTimerByID(uint16 instance_id = 0); void DestroyInstance(uint16 instance_id); uint16 GetInstanceID(const char *zone, int16 version); + uint16 GetInstanceIDByCharID(const char *zone, int16 version, uint32 char_id); void AssignToInstance(uint16 instance_id); + void AssignToInstanceByCharID(uint16 instance_id, uint32 char_id); void AssignGroupToInstance(uint16 instance_id); void AssignRaidToInstance(uint16 instance_id); void RemoveFromInstance(uint16 instance_id); + void RemoveFromInstanceByCharID(uint16 instance_id, uint32 char_id); //void RemoveGroupFromInstance(uint16 instance_id); //potentially useful but not implmented at this time. //void RemoveRaidFromInstance(uint16 instance_id); //potentially useful but not implmented at this time. void RemoveAllFromInstance(uint16 instance_id); diff --git a/zone/spells.cpp b/zone/spells.cpp index 0fcb7fe2b..1cb920786 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -5154,14 +5154,11 @@ int Client::FindSpellBookSlotBySpellID(uint16 spellid) { return -1; //default } -bool Client::SpellGlobalCheck(uint16 spell_ID, uint32 char_ID) { - - std::string spell_Global_Name; - int spell_Global_Value; - int global_Value; - - std::string query = StringFormat("SELECT qglobal, value FROM spell_globals " - "WHERE spellid = %i", spell_ID); +bool Client::SpellGlobalCheck(uint16 spell_id, uint32 char_id) { + std::string spell_global_name; + int spell_global_value; + int global_value; + std::string query = StringFormat("SELECT qglobal, value FROM spell_globals WHERE spellid = %i", spell_id); auto results = database.QueryDatabase(query); if (!results.Success()) { return false; // Query failed, so prevent spell from scribing just in case @@ -5171,37 +5168,79 @@ bool Client::SpellGlobalCheck(uint16 spell_ID, uint32 char_ID) { return true; // Spell ID isn't listed in the spells_global table, so it is not restricted from scribing auto row = results.begin(); - spell_Global_Name = row[0]; - spell_Global_Value = atoi(row[1]); + spell_global_name = row[0]; + spell_global_value = atoi(row[1]); - if (spell_Global_Name.empty()) + if (spell_global_name.empty()) return true; // If the entry in the spell_globals table has nothing set for the qglobal name query = StringFormat("SELECT value FROM quest_globals " "WHERE charid = %i AND name = '%s'", - char_ID, spell_Global_Name.c_str()); + char_id, spell_global_name.c_str()); results = database.QueryDatabase(query); if (!results.Success()) { - Log(Logs::General, Logs::Error, "Spell ID %i query of spell_globals with Name: '%s' Value: '%i' failed", spell_ID, spell_Global_Name.c_str(), spell_Global_Value); + Log(Logs::General, Logs::Error, "Spell ID %i query of spell_globals with Name: '%s' Value: '%i' failed", spell_id, spell_global_name.c_str(), spell_global_value); return false; } if (results.RowCount() != 1) { - Log(Logs::General, Logs::Error, "Char ID: %i does not have the Qglobal Name: '%s' for Spell ID %i", char_ID, spell_Global_Name.c_str(), spell_ID); + Log(Logs::General, Logs::Error, "Char ID: %i does not have the Qglobal Name: '%s' for Spell ID %i", char_id, spell_global_name.c_str(), spell_id); + return false; + } + + row = results.begin(); + global_value = atoi(row[0]); + if (global_value == spell_global_value) + return true; // If the values match from both tables, allow the spell to be scribed + else if (global_value > spell_global_value) + return true; // Check if the qglobal value is greater than the require spellglobal value + + // If no matching result found in qglobals, don't scribe this spell + Log(Logs::General, Logs::Error, "Char ID: %i Spell_globals Name: '%s' Value: '%i' did not match QGlobal Value: '%i' for Spell ID %i", char_id, spell_global_name.c_str(), spell_global_value, global_value, spell_id); + return false; +} + +bool Client::SpellBucketCheck(uint16 spell_id, uint32 char_id) { + std::string spell_bucket_name; + int spell_bucket_value; + int bucket_value; + std::string query = StringFormat("SELECT key, value FROM spell_buckets WHERE spellid = %i", spell_id); + auto results = database.QueryDatabase(query); + if (!results.Success()) + return false; + + if (results.RowCount() != 1) + return true; + + auto row = results.begin(); + spell_bucket_name = row[0]; + spell_bucket_value = atoi(row[1]); + if (spell_bucket_name.empty()) + return true; + + query = StringFormat("SELECT value FROM data_buckets WHERE key = '%i-%s'", char_id, spell_bucket_name.c_str()); + results = database.QueryDatabase(query); + if (!results.Success()) { + Log(Logs::General, Logs::Error, "Spell bucket %s for spell ID %i for char ID %i failed.", spell_bucket_name.c_str(), spell_id, char_id); + return false; + } + + if (results.RowCount() != 1) { + Log(Logs::General, Logs::Error, "Spell bucket %s does not exist for spell ID %i for char ID %i.", spell_bucket_name.c_str(), spell_id, char_id); return false; } row = results.begin(); - global_Value = atoi(row[0]); + bucket_value = atoi(row[0]); - if (global_Value == spell_Global_Value) + if (bucket_value == spell_bucket_value) return true; // If the values match from both tables, allow the spell to be scribed - else if (global_Value > spell_Global_Value) - return true; // Check if the qglobal value is greater than the require spellglobal value + else if (bucket_value > spell_bucket_value) + return true; // Check if the data bucket value is greater than the required spell bucket value - // If no matching result found in qglobals, don't scribe this spell - Log(Logs::General, Logs::Error, "Char ID: %i Spell_globals Name: '%s' Value: '%i' did not match QGlobal Value: '%i' for Spell ID %i", char_ID, spell_Global_Name.c_str(), spell_Global_Value, global_Value, spell_ID); + // If no matching result found in spell buckets, don't scribe this spell + Log(Logs::General, Logs::Error, "Spell bucket %s for spell ID %i for char ID %i did not match value %i.", spell_bucket_name.c_str(), spell_id, char_id, spell_bucket_value); return false; } From 838ab5b77e3bf5204b891dc672ef73e17fbfd06d Mon Sep 17 00:00:00 2001 From: Kinglykrab Date: Thu, 13 Dec 2018 20:22:14 -0500 Subject: [PATCH 469/670] Missed embparser_api.cpp and lua_general.cpp. Sorry. --- zone/embparser_api.cpp | 43 ++++++++++++++++++++++++++++++++++++++++++ zone/lua_general.cpp | 15 +++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/zone/embparser_api.cpp b/zone/embparser_api.cpp index 8d4857d5e..a1174ae50 100644 --- a/zone/embparser_api.cpp +++ b/zone/embparser_api.cpp @@ -2870,6 +2870,20 @@ XS(XS__GetInstanceID) { XSRETURN_UV(id); } +XS(XS__GetInstanceIDByCharID); +XS(XS__GetInstanceIDByCharID) { + dXSARGS; + if (items != 3) + Perl_croak(aTHX_ "Usage: quest::GetInstanceIDByCharID(string zone_name, uint16 version, uint32 char_id)"); + + char *zone = (char *) SvPV_nolen(ST(0)); + uint16 version = (int) SvUV(ST(1)); + uint32 char_id = (int) SvUV(ST(2)); + uint16 id = quest_manager.GetInstanceIDByCharID(zone, version, char_id); + + XSRETURN_UV(id); +} + XS(XS__GetCharactersInInstance); XS(XS__GetCharactersInInstance) { dXSARGS; @@ -2921,6 +2935,19 @@ XS(XS__AssignToInstance) { XSRETURN_EMPTY; } +XS(XS__AssignToInstanceByCharID); +XS(XS__AssignToInstanceByCharID) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::AssignToInstanceByCharID(uint16 instance_id, uint32 char_id)"); + + uint16 instance_id = (int) SvUV(ST(0)); + uint32 char_id = (int) SvUV(ST(1)); + quest_manager.AssignToInstanceByCharID(instance_id, char_id); + + XSRETURN_EMPTY; +} + XS(XS__AssignGroupToInstance); XS(XS__AssignGroupToInstance) { dXSARGS; @@ -2957,6 +2984,19 @@ XS(XS__RemoveFromInstance) { XSRETURN_EMPTY; } +XS(XS__RemoveFromInstanceByCharID); +XS(XS__RemoveFromInstanceByCharID) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: quest::RemoveFromInstanceByCharID(uint16 instance_id, uint32 char_id)"); + + uint16 instance_id = (int) SvUV(ST(0)); + uint32 char_id = (int) SvUV(ST(1)); + quest_manager.RemoveFromInstanceByCharID(instance_id, char_id); + + XSRETURN_EMPTY; +} + XS(XS__RemoveAllFromInstance); XS(XS__RemoveAllFromInstance) { dXSARGS; @@ -3675,6 +3715,7 @@ EXTERN_C XS(boot_quest) { newXS(strcpy(buf, "AssignGroupToInstance"), XS__AssignGroupToInstance, file); newXS(strcpy(buf, "AssignRaidToInstance"), XS__AssignRaidToInstance, file); newXS(strcpy(buf, "AssignToInstance"), XS__AssignToInstance, file); + newXS(strcpy(buf, "AssignToInstanceByCharID"), XS__AssignToInstanceByCharID, file); newXS(strcpy(buf, "ChooseRandom"), XS__ChooseRandom, file); newXS(strcpy(buf, "CreateInstance"), XS__CreateInstance, file); newXS(strcpy(buf, "DestroyInstance"), XS__DestroyInstance, file); @@ -3686,6 +3727,7 @@ EXTERN_C XS(boot_quest) { newXS(strcpy(buf, "FlyMode"), XS__FlyMode, file); newXS(strcpy(buf, "GetCharactersInInstance"), XS__GetCharactersInInstance, file); newXS(strcpy(buf, "GetInstanceID"), XS__GetInstanceID, file); + newXS(strcpy(buf, "GetInstanceIDByCharID"), XS__GetInstanceIDByCharID, file); newXS(strcpy(buf, "GetSpellResistType"), XS__GetSpellResistType, file); newXS(strcpy(buf, "GetSpellTargetType"), XS__GetSpellTargetType, file); newXS(strcpy(buf, "GetTimeSeconds"), XS__GetTimeSeconds, file); @@ -3704,6 +3746,7 @@ EXTERN_C XS(boot_quest) { newXS(strcpy(buf, "MovePCInstance"), XS__MovePCInstance, file); newXS(strcpy(buf, "RemoveAllFromInstance"), XS__RemoveAllFromInstance, file); newXS(strcpy(buf, "RemoveFromInstance"), XS__RemoveFromInstance, file); + newXS(strcpy(buf, "RemoveFromInstanceByCharID"), XS__RemoveFromInstanceByCharID, file); newXS(strcpy(buf, "SendMail"), XS__SendMail, file); newXS(strcpy(buf, "SetRunning"), XS__SetRunning, file); newXS(strcpy(buf, "activespeakactivity"), XS__activespeakactivity, file); diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp index 6eb8ddf52..2bc769669 100644 --- a/zone/lua_general.cpp +++ b/zone/lua_general.cpp @@ -866,10 +866,18 @@ int lua_get_instance_id(const char *zone, uint32 version) { return quest_manager.GetInstanceID(zone, version); } +int lua_get_instance_id_by_char_id(const char *zone, uint32 version, uint32 char_id) { + return quest_manager.GetInstanceIDByCharID(zone, version, char_id); +} + void lua_assign_to_instance(uint32 instance_id) { quest_manager.AssignToInstance(instance_id); } +void lua_assign_to_instance_by_char_id(uint32 instance_id, uint32 char_id) { + quest_manager.AssignToInstanceByCharID(instance_id, char_id); +} + void lua_assign_group_to_instance(uint32 instance_id) { quest_manager.AssignGroupToInstance(instance_id); } @@ -882,6 +890,10 @@ void lua_remove_from_instance(uint32 instance_id) { quest_manager.RemoveFromInstance(instance_id); } +void lua_remove_from_instance_by_char_id(uint32 instance_id, uint32 char_id) { + quest_manager.RemoveFromInstanceByCharID(instance_id, char_id); +} + void lua_remove_all_from_instance(uint32 instance_id) { quest_manager.RemoveAllFromInstance(instance_id); } @@ -1689,13 +1701,16 @@ luabind::scope lua_register_general() { luabind::def("destroy_instance", &lua_destroy_instance), luabind::def("update_instance_timer", &lua_update_instance_timer), luabind::def("get_instance_id", &lua_get_instance_id), + luabind::def("get_instance_id_by_char_id", &lua_get_instance_id_by_char_id), luabind::def("get_instance_timer", &lua_get_instance_timer), luabind::def("get_instance_timer_by_id", &lua_get_instance_timer_by_id), luabind::def("get_characters_in_instance", &lua_get_characters_in_instance), luabind::def("assign_to_instance", &lua_assign_to_instance), + luabind::def("assign_to_instance_by_char_id", &lua_assign_to_instance_by_char_id), luabind::def("assign_group_to_instance", &lua_assign_group_to_instance), luabind::def("assign_raid_to_instance", &lua_assign_raid_to_instance), luabind::def("remove_from_instance", &lua_remove_from_instance), + luabind::def("remove_from_instance_by_char_id", &lua_remove_from_instance_by_char_id), luabind::def("remove_all_from_instance", &lua_remove_all_from_instance), luabind::def("flag_instance_by_group_leader", &lua_flag_instance_by_group_leader), luabind::def("flag_instance_by_raid_leader", &lua_flag_instance_by_raid_leader), From e367fee4bc23ec4001399820ecfc3a2ad53da48a Mon Sep 17 00:00:00 2001 From: kentai Date: Fri, 14 Dec 2018 16:24:15 +1100 Subject: [PATCH 470/670] Tidied Comments --- loginserver/options.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/loginserver/options.h b/loginserver/options.h index f215e443b..5aecbad0a 100644 --- a/loginserver/options.h +++ b/loginserver/options.h @@ -116,17 +116,17 @@ public: inline void AccountTable(std::string t) { account_table = t; } /** - * Return the value of local_network. + * Return the value of world account table. */ inline std::string GetAccountTable() const { return account_table; } /** - * Sets world account table. + * Sets world registration table. */ inline void WorldRegistrationTable(std::string t) { world_registration_table = t; } /** - * Return the value of world account table. + * Return the value of world registration table. */ inline std::string GetWorldRegistrationTable() const { return world_registration_table; } @@ -146,7 +146,7 @@ public: inline void WorldServerTypeTable(std::string t) { world_server_type_table = t; } /** - * Return the value of world admin account table. + * Return the value of world server type table. */ inline std::string GetWorldServerTypeTable() const { return world_server_type_table; } From 3a757a7a85b6ab051517b1cdcda510a465a0c317 Mon Sep 17 00:00:00 2001 From: Kinglykrab Date: Thu, 13 Dec 2018 21:44:52 -0500 Subject: [PATCH 471/670] Resolved a possible scaling issue with the way CharMaxLevel works with quest globals and data buckets. --- changelog.txt | 15 +++++++++++++++ common/eq_packet_structs.h | 1 - zone/client.cpp | 11 ++++++++++- zone/client.h | 6 +++++- zone/client_packet.cpp | 9 +++++++++ zone/exp.cpp | 32 +++++++++----------------------- 6 files changed, 48 insertions(+), 26 deletions(-) diff --git a/changelog.txt b/changelog.txt index 4b717ed5b..af3d6e7a8 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,20 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 12/15/2018 == +Kinglykrab: Added multiple new instance related quest functions. + 1. quest::GetInstanceIDByCharID(const char *zone, int16 version, uint32 char_id) + - Allows you to pull the instance ID of a client by character ID. + 2. quest::AssignToInstanceByCharID(uint16 instance_id, uint32 char_id) + - Allows you to assign an instance to a client by character ID. + 3. quest::RemoveFromInstanceByCharID(uint16 instance_id, uint32 char_id) + - Allows you to remove a client from an instance by character ID. + + Added spell buckets, similar to spell globals. + - Uses a new spell_buckets table and the Spells:EnableSpellBuckets rule. + + Added max level by data bucket. + - Uses data bucket char_id-CharMaxLevel and Character:PerCharacterBucketMaxLevel rule. + == 10/09/2018 == Uleat: Added bot owner options - usage: ^owneroption [option] (or aliased as: ^oo [option]) diff --git a/common/eq_packet_structs.h b/common/eq_packet_structs.h index bde77822b..db97818a5 100644 --- a/common/eq_packet_structs.h +++ b/common/eq_packet_structs.h @@ -306,7 +306,6 @@ union uint32 DestructibleUnk9; bool targetable_with_hotkey; bool show_name; - }; struct PlayerState_Struct { diff --git a/zone/client.cpp b/zone/client.cpp index 18940d58a..0d5ee036d 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -263,6 +263,16 @@ Client::Client(EQStreamInterface* ieqs) PendingSacrifice = false; controlling_boat_id = 0; + if (!RuleB(Character, PerCharacterQglobalMaxLevel) && !RuleB(Character, PerCharacterBucketMaxLevel)) { + SetClientMaxLevel(0); + } else if (RuleB(Character, PerCharacterQglobalMaxLevel)) { + int client_max_level = GetCharMaxLevelFromQGlobal(); + SetClientMaxLevel(client_max_level); + } else if (RuleB(Character, PerCharacterBucketMaxLevel)) { + int client_max_level = GetCharMaxLevelFromBucket(); + SetClientMaxLevel(client_max_level); + } + KarmaUpdateTimer = new Timer(RuleI(Chat, KarmaUpdateIntervalMS)); GlobalChatLimiterTimer = new Timer(RuleI(Chat, IntervalDurationMS)); AttemptedMessages = 0; @@ -1966,7 +1976,6 @@ void Client::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) // ns->spawn.pvp = GetPVP(false) ? 1 : 0; ns->spawn.show_name = true; - strcpy(ns->spawn.title, m_pp.title); strcpy(ns->spawn.suffix, m_pp.suffix); diff --git a/zone/client.h b/zone/client.h index f7848202d..8bdb33477 100644 --- a/zone/client.h +++ b/zone/client.h @@ -697,7 +697,9 @@ public: void SendGuildJoin(GuildJoin_Struct* gj); void RefreshGuildInfo(); - + int GetClientMaxLevel() const { return client_max_level; } + void SetClientMaxLevel(int max_level) { client_max_level = max_level; } + void CheckManaEndUpdate(); void SendManaUpdate(); void SendEnduranceUpdate(); @@ -1644,6 +1646,8 @@ private: void InterrogateInventory_(bool errorcheck, Client* requester, int16 head, int16 index, const EQEmu::ItemInstance* inst, const EQEmu::ItemInstance* parent, bool log, bool silent, bool &error, int depth); bool InterrogateInventory_error(int16 head, int16 index, const EQEmu::ItemInstance* inst, const EQEmu::ItemInstance* parent, int depth); + int client_max_level; + #ifdef BOTS struct BotOwnerOptions { bool death_marquee; diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index ceb242890..18862ee1f 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -1419,6 +1419,15 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app) drakkin_tattoo = m_pp.drakkin_tattoo; drakkin_details = m_pp.drakkin_details; + // Max Level for Character:PerCharacterQglobalMaxLevel and Character:PerCharacterBucketMaxLevel + int client_max_level = 0; + if (RuleB(Character, PerCharacterQglobalMaxLevel)) { + client_max_level = GetCharMaxLevelFromQGlobal(); + } else if (RuleB(Character, PerCharacterBucketMaxLevel)) { + client_max_level = GetCharMaxLevelFromBucket(); + } + SetClientMaxLevel(client_max_level); + // we know our class now, so we might have to fix our consume timer! if (class_ == MONK) consume_food_timer.SetTimer(CONSUMPTION_MNK_TIMER); diff --git a/zone/exp.cpp b/zone/exp.cpp index 302e29279..5ffdd5690 100644 --- a/zone/exp.cpp +++ b/zone/exp.cpp @@ -684,26 +684,12 @@ void Client::SetEXP(uint32 set_exp, uint32 set_aaxp, bool isrezzexp) { } } - if(RuleB(Character, PerCharacterQglobalMaxLevel)){ - uint32 MaxLevel = GetCharMaxLevelFromQGlobal(); - if(MaxLevel){ - if(GetLevel() >= MaxLevel){ - uint32 expneeded = GetEXPForLevel(MaxLevel); - if(set_exp > expneeded) { - set_exp = expneeded; - } - } - } - } - - if(RuleB(Character, PerCharacterBucketMaxLevel)){ - uint32 MaxLevel = GetCharMaxLevelFromBucket(); - if(MaxLevel){ - if(GetLevel() >= MaxLevel){ - uint32 expneeded = GetEXPForLevel(MaxLevel); - if(set_exp > expneeded) { - set_exp = expneeded; - } + if (GetClientMaxLevel() > 0) { + int client_max_level = GetClientMaxLevel(); + if (GetLevel() >= client_max_level) { + uint32 expneeded = GetEXPForLevel(client_max_level); + if(set_exp > expneeded) { + set_exp = expneeded; } } } @@ -1142,7 +1128,7 @@ uint32 Client::GetCharMaxLevelFromQGlobal() { ++gcount; } - return false; + return 0; } uint32 Client::GetCharMaxLevelFromBucket() { @@ -1151,14 +1137,14 @@ uint32 Client::GetCharMaxLevelFromBucket() { auto results = database.QueryDatabase(query); if (!results.Success()) { Log(Logs::General, Logs::Error, "Data bucket for CharMaxLevel for char ID %i failed.", char_id); - return false; + return 0; } if (results.RowCount() > 0) { auto row = results.begin(); return atoi(row[0]); } - return false; + return 0; } uint32 Client::GetRequiredAAExperience() { From a7f2eebfdf5555fd3629af9710ca0cdd75160f35 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 16 Dec 2018 01:46:55 -0600 Subject: [PATCH 472/670] Entity window adjustments --- zone/mob_info.cpp | 195 ++++++++++++++++++++++++++-------------------- 1 file changed, 110 insertions(+), 85 deletions(-) diff --git a/zone/mob_info.cpp b/zone/mob_info.cpp index 0bdef2904..c0cf01c58 100644 --- a/zone/mob_info.cpp +++ b/zone/mob_info.cpp @@ -29,6 +29,7 @@ std::string commify(const std::string &number) std::string temp_string; auto string_length = static_cast(number.length()); + int i = 0; for (i = string_length - 3; i >= 0; i -= 3) { if (i > 0) { @@ -55,7 +56,11 @@ inline std::string GetMobAttributeByString(Mob *mob, const std::string &attribut } if (attribute == "ac") { - return commify(std::to_string(mob->GetAC())); + if (mob->GetEntityVariable(std::string("modify_stat_max_hp").c_str())) { + scaling_modified = " *"; + } + + return commify(std::to_string(mob->GetAC())) + scaling_modified; } if (attribute == "atk") { @@ -76,7 +81,7 @@ inline std::string GetMobAttributeByString(Mob *mob, const std::string &attribut } if (attribute == "hp_min_max") { - if (mob->GetEntityVariable(std::string("modify_stat_hp").c_str())) { + if (mob->GetEntityVariable(std::string("modify_stat_max_hp").c_str())) { scaling_modified = " *"; } @@ -228,7 +233,7 @@ inline std::string GetMobAttributeByString(Mob *mob, const std::string &attribut return std::to_string(mob->compute_tohit(EQEmu::skills::SkillHandtoHand)); } - if (attribute == "totalToHit") { + if (attribute == "total_to_hit") { return std::to_string(mob->GetTotalToHit(EQEmu::skills::SkillHandtoHand, 0)); } @@ -236,7 +241,7 @@ inline std::string GetMobAttributeByString(Mob *mob, const std::string &attribut return std::to_string(mob->compute_defense()); } - if (attribute == "totalDefense") { + if (attribute == "total_defense") { return std::to_string(mob->GetTotalDefense()); } @@ -244,7 +249,7 @@ inline std::string GetMobAttributeByString(Mob *mob, const std::string &attribut return std::to_string(mob->offense(EQEmu::skills::SkillHandtoHand)); } - if (attribute == "mitigationAC") { + if (attribute == "mitigation_ac") { return std::to_string(mob->GetMitigationAC()); } @@ -281,10 +286,10 @@ inline std::string GetMobAttributeByString(Mob *mob, const std::string &attribut if (attribute == "emote") { return std::to_string(npc->GetEmoteID()); } - if (attribute == "seeInvis") { + if (attribute == "see_invis") { return std::to_string(npc->SeeInvisible()); } - if (attribute == "seeInvisUndead") { + if (attribute == "see_invis_undead") { return std::to_string(npc->SeeInvisibleUndead()); } if (attribute == "faction") { @@ -293,16 +298,16 @@ inline std::string GetMobAttributeByString(Mob *mob, const std::string &attribut if (attribute == "loottable") { return std::to_string(npc->GetLoottableID()); } - if (attribute == "primSkill") { + if (attribute == "prim_skill") { return std::to_string(npc->GetPrimSkill()); } - if (attribute == "secSkill") { + if (attribute == "sec_skill") { return std::to_string(npc->GetSecSkill()); } - if (attribute == "meleeTexture1") { + if (attribute == "melee_texture_1") { return std::to_string(npc->GetMeleeTexture1()); } - if (attribute == "meleeTexture2") { + if (attribute == "melee_texture_2") { return std::to_string(npc->GetMeleeTexture2()); } if (attribute == "aggrorange") { @@ -317,94 +322,94 @@ inline std::string GetMobAttributeByString(Mob *mob, const std::string &attribut if (attribute == "trackable") { return std::to_string(npc->IsTrackable()); } - if (attribute == "spellsid") { + if (attribute == "spells_id") { return std::to_string(npc->GetNPCSpellsID()); } - if (attribute == "roamboxMinX") { + if (attribute == "roambox_min_x") { return std::to_string((int)npc->GetRoamboxMinX()); } - if (attribute == "roamboxMaxX") { + if (attribute == "roambox_max_x") { return std::to_string((int)npc->GetRoamboxMaxX()); } - if (attribute == "roamboxMinY") { + if (attribute == "roambox_min_y") { return std::to_string((int)npc->GetRoamboxMinY()); } - if (attribute == "roamboxMaxY") { + if (attribute == "roambox_max_y") { return std::to_string((int)npc->GetRoamboxMaxY()); } - if (attribute == "roamboxMinDelay") { + if (attribute == "roambox_min_delay") { return std::to_string((int)npc->GetRoamboxMinDelay()); } - if (attribute == "roamboxDelay") { + if (attribute == "roambox_delay") { return std::to_string((int)npc->GetRoamboxDelay()); } - if (attribute == "roamboxDistance") { + if (attribute == "roambox_distance") { return std::to_string((int)npc->GetRoamboxDistance()); } - if (attribute == "proximityMinX") { + if (attribute == "proximity_min_x") { return std::to_string((int)npc->GetProximityMinX()); } - if (attribute == "proximityMaxX") { + if (attribute == "proximity_max_x") { return std::to_string((int)npc->GetProximityMaxX()); } - if (attribute == "proximityMinY") { + if (attribute == "proximity_min_y") { return std::to_string((int)npc->GetProximityMinY()); } - if (attribute == "proximityMaxY") { + if (attribute == "proximity_max_y") { return std::to_string((int)npc->GetProximityMaxY()); } - if (attribute == "proximityMinZ") { + if (attribute == "proximity_min_z") { return std::to_string((int)npc->GetProximityMinZ()); } - if (attribute == "proximityMaxZ") { + if (attribute == "proximity_max_z") { return std::to_string((int)npc->GetProximityMaxZ()); } if (attribute == "accuracy") { return std::to_string((int)npc->GetAccuracyRating()) + scaling_modified; } - if (attribute == "slowMitigation") { + if (attribute == "slow_mitigation") { if (mob->GetEntityVariable(std::string("modify_stat_slow_mitigation").c_str())) { scaling_modified = " *"; } return std::to_string((int)npc->GetSlowMitigation()) + scaling_modified; } - if (attribute == "minHit") { + if (attribute == "min_hit") { if (mob->GetEntityVariable(std::string("modify_stat_min_hit").c_str())) { scaling_modified = " *"; } return commify(std::to_string((int)npc->GetMinDMG())) + scaling_modified; } - if (attribute == "maxHit") { + if (attribute == "max_hit") { if (mob->GetEntityVariable(std::string("modify_stat_max_hit").c_str())) { scaling_modified = " *"; } return commify(std::to_string((int)npc->GetMaxDMG())) + scaling_modified; } - if (attribute == "hpRegen") { + if (attribute == "hp_regen") { if (mob->GetEntityVariable(std::string("modify_stat_hp_regen").c_str())) { scaling_modified = " *"; } return commify(std::to_string((int)npc->GetHPRegen())) + scaling_modified; } - if (attribute == "attackDelay") { + if (attribute == "attack_delay") { if (mob->GetEntityVariable(std::string("modify_stat_attack_delay").c_str())) { scaling_modified = " *"; } return commify(std::to_string(npc->GetAttackDelay())) + scaling_modified; } - if (attribute == "spellScale") { + if (attribute == "spell_scale") { if (mob->GetEntityVariable(std::string("modify_stat_spell_scale").c_str())) { scaling_modified = " *"; } return commify(std::to_string((int)npc->GetSpellScale())) + scaling_modified; } - if (attribute == "healScale") { + if (attribute == "heal_scale") { if (mob->GetEntityVariable(std::string("modify_stat_heal_scale").c_str())) { scaling_modified = " *"; } @@ -425,19 +430,19 @@ inline std::string GetMobAttributeByString(Mob *mob, const std::string &attribut return commify(std::to_string((int)client->GetShielding())) + " / " + commify(std::to_string((int) RuleI(Character, ItemShieldingCap))); } - if (attribute == "spellShielding") { + if (attribute == "spell_shielding") { return commify(std::to_string((int)client->GetSpellShield())) + " / " + commify(std::to_string((int) RuleI(Character, ItemSpellShieldingCap))); } - if (attribute == "dotShielding") { + if (attribute == "dot_shielding") { return commify(std::to_string((int)client->GetDoTShield())) + " / " + commify(std::to_string((int) RuleI(Character, ItemDoTShieldingCap))); } - if (attribute == "stunResist") { + if (attribute == "stun_resist") { return commify(std::to_string((int)client->GetStunResist())) + " / " + commify(std::to_string((int) RuleI(Character, ItemStunResistCap))); } - if (attribute == "damageShield") { + if (attribute == "damage_shield") { return commify(std::to_string((int)client->GetDS())) + " / " + commify(std::to_string((int) RuleI(Character, ItemDamageShieldCap))); } @@ -453,15 +458,15 @@ inline std::string GetMobAttributeByString(Mob *mob, const std::string &attribut return commify(std::to_string((int) client->GetAccuracy())) + " / " + commify(std::to_string((int) RuleI(Character, ItemAccuracyCap))); } - if (attribute == "combatEffects") { + if (attribute == "combat_effects") { return commify(std::to_string((int) client->GetCombatEffects())) + " / " + commify(std::to_string((int) RuleI(Character, ItemCombatEffectsCap))); } - if (attribute == "healAmount") { + if (attribute == "heal_amount") { return commify(std::to_string((int) client->GetHealAmt())) + " / " + commify(std::to_string((int) RuleI(Character, ItemHealAmtCap))); } - if (attribute == "spellDmg") { + if (attribute == "spell_dmg") { return commify(std::to_string((int) client->GetSpellDmg())) + " / " + commify(std::to_string((int) RuleI(Character, ItemSpellDmgCap))); } @@ -469,19 +474,19 @@ inline std::string GetMobAttributeByString(Mob *mob, const std::string &attribut return commify(std::to_string((int) client->GetClair())) + " / " + commify(std::to_string((int) RuleI(Character, ItemClairvoyanceCap))); } - if (attribute == "DSMit") { + if (attribute == "ds_mitigation") { return commify(std::to_string((int) client->GetDSMit())) + " / " + commify(std::to_string((int) RuleI(Character, ItemDSMitigationCap))); } - if (attribute == "hpRegen") { + if (attribute == "hp_regen") { return commify(std::to_string((int) client->GetHPRegen())) + " / " + commify(std::to_string((int) RuleI(Character, ItemHealthRegenCap))); } - if (attribute == "manaRegen") { + if (attribute == "mana_regen") { return commify(std::to_string((int) client->GetManaRegen())) + " / " + commify(std::to_string((int) RuleI(Character, ItemManaRegenCap))); } - if (attribute == "endRegen") { + if (attribute == "end_regen") { return commify(std::to_string((int) client->CalcEnduranceRegen())) + " / " + commify(std::to_string((int) client->CalcEnduranceRegenCap())); } @@ -541,13 +546,33 @@ inline std::string WriteDisplayInfoSection( std::string attribute_name = attribute; + find_replace(attribute_name, "_min_max", std::string("")); + + /** + * Translate attribute names with underscores + * "total_to_hit" = "Total To Hit" + */ if (attribute_name.find('_') != std::string::npos) { std::vector split_string = split(attribute_name, '_'); - attribute_name = split_string[0]; + std::string new_attribute_name; + for (std::string &string_value : split_string) { + new_attribute_name += ucfirst(string_value) + " "; + } + attribute_name = new_attribute_name; } + + /** + * Attribute names less than 4 characters get capitalized + * "hp" = "HP" + */ if (attribute_name.length() <= 3) { attribute_name = str_toupper(attribute_name); } + + /** + * Attribute names larger than 3 characters get capitalized first letter + * "avoidance" = "Avoidance" + */ if (attribute_name.length() > 3) { attribute_name = ucfirst(attribute_name); } @@ -653,32 +678,32 @@ void Mob::DisplayInfo(Mob *mob) std::vector calculations = { "tohit", - "totalToHit", + "total_to_hit", "defense", - "totalDefense", + "total_defense", "offense", - "mitigationAC", + "mitigation_ac", }; window_text += WriteDisplayInfoSection(mob, "Calculations", calculations, 1, true); if (mob->IsClient()) { std::vector mods = { - "hpRegen", - "manaRegen", - "endRegen", - "healAmount", - "spellDmg", + "hp_regen", + "mana_regen", + "end_regen", + "heal_amount", + "spell_dmg", "clairvoyance", }; window_text += WriteDisplayInfoSection(mob, "Mods", mods, 1, true); std::vector mod_defensive = { "shielding", - "spellShielding", - "dotShielding", - "stunResist", - "damageShield", - "DSMit", + "spell_shielding", + "dot_shielding", + "stun_resist", + "damage_shield", + "ds_mitigation", "avoidance", }; @@ -687,7 +712,7 @@ void Mob::DisplayInfo(Mob *mob) std::vector mod_offensive = { "strikethrough", "accuracy", - "combatEffects", + "combat_effects", }; window_text += WriteDisplayInfoSection(mob, "Mod Offensive", mod_offensive, 1, true); } @@ -697,13 +722,13 @@ void Mob::DisplayInfo(Mob *mob) std::vector npc_stats = { "accuracy", - "slowMitigation", - "minHit", - "maxHit", - "hpRegen", - "attackDelay", - "spellScale", - "healScale", + "slow_mitigation", + "min_hit", + "max_hit", + "hp_regen", + "attack_delay", + "spell_scale", + "heal_scale", "avoidance", }; @@ -720,20 +745,20 @@ void Mob::DisplayInfo(Mob *mob) "spawngroup", "grid", "emote", - "seeInvis", - "seeInvisUndead", + "see_invis", + "see_invis_undead", "faction", "loottable", - "primSkill", - "secSkill", - "meleeTexture1", - "meleeTexture2", + "prim_skill", + "sec_skill", + "melee_texture_1", + "melee_texture_2", "aggrorange", "assistrange", "findable", "trackable", "flymode", - "spellsid", + "spells_id", "curbuffslots", "maxbuffslots", }; @@ -745,13 +770,13 @@ void Mob::DisplayInfo(Mob *mob) */ if (npc->GetRoamboxMaxX() != 0 && npc->GetRoamboxMinX() != 0) { std::vector npc_roambox = { - "roamboxMinX", - "roamboxMaxX", - "roamboxMinY", - "roamboxMaxY", - "roamboxMinDelay", - "roamboxDelay", - "roamboxDistance", + "roambox_min_x", + "roambox_max_x", + "roambox_min_y", + "roambox_max_y", + "roambox_min_delay", + "roambox_delay", + "roambox_distance", }; window_text += WriteDisplayInfoSection(mob, "Roambox", npc_roambox, 1, true); @@ -759,12 +784,12 @@ void Mob::DisplayInfo(Mob *mob) if (npc->proximity != nullptr) { std::vector npc_proximity = { - "proximityMinX", - "proximityMaxX", - "proximityMinY", - "proximityMaxY", - "proximityMinZ", - "proximityMaxZ", + "proximity_min_x", + "proximity_max_x", + "proximity_min_y", + "proximity_max_y", + "proximity_min_z", + "proximity_max_z", }; window_text += WriteDisplayInfoSection(mob, "Proximity", npc_proximity, 1, true); From bc6109ec8fd1a236ccadfea7ff91e4c4b6fedba5 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 16 Dec 2018 02:30:53 -0600 Subject: [PATCH 473/670] Some adjustments to scale manager --- zone/mob_info.cpp | 1 - zone/npc_scale_manager.cpp | 41 ++++++++++++++++++++++++++++++++------ zone/npc_scale_manager.h | 2 +- 3 files changed, 36 insertions(+), 8 deletions(-) diff --git a/zone/mob_info.cpp b/zone/mob_info.cpp index c0cf01c58..5c63dc0ad 100644 --- a/zone/mob_info.cpp +++ b/zone/mob_info.cpp @@ -619,7 +619,6 @@ inline void NPCCommandsMenu(Client* client, NPC* npc) } if (menu_commands.length() > 0) { - // client->Message(0, "| # Show Commmands"); client->Message(0, "| [Show Commands] %s", menu_commands.c_str()); } } diff --git a/zone/npc_scale_manager.cpp b/zone/npc_scale_manager.cpp index bc8d6ebbe..66153bd55 100644 --- a/zone/npc_scale_manager.cpp +++ b/zone/npc_scale_manager.cpp @@ -26,8 +26,9 @@ */ void NpcScaleManager::ScaleNPC(NPC * npc) { - int8 npc_type = GetNPCScalingType(npc); - int npc_level = npc->GetLevel(); + int8 npc_type = GetNPCScalingType(npc); + int npc_level = npc->GetLevel(); + bool is_auto_scaled = IsAutoScaled(npc); global_npc_scale scale_data = GetGlobalScaleDataForTypeLevel(npc_type, npc_level); @@ -93,10 +94,10 @@ void NpcScaleManager::ScaleNPC(NPC * npc) if (npc->GetDR() == 0) { npc->ModifyNPCStat("dr", std::to_string(scale_data.disease_resist).c_str()); } - if (npc->GetCR() == 0) { + if (npc->GetCorrup() == 0) { npc->ModifyNPCStat("cr", std::to_string(scale_data.corruption_resist).c_str()); } - if (npc->GetPR() == 0) { + if (npc->GetPhR() == 0) { npc->ModifyNPCStat("pr", std::to_string(scale_data.physical_resist).c_str()); } if (npc->GetMinDMG() == 0) { @@ -142,7 +143,7 @@ void NpcScaleManager::ScaleNPC(NPC * npc) if (npc->GetHealScale() == 0) { npc->ModifyNPCStat("heal_scale", std::to_string(scale_data.heal_scale).c_str()); } - if (!npc->HasSpecialAbilities() && npc->EntityVariableExists("max_hp")) { + if (!npc->HasSpecialAbilities() && is_auto_scaled) { npc->ModifyNPCStat("special_abilities", scale_data.special_abilities.c_str()); } @@ -158,10 +159,11 @@ void NpcScaleManager::ScaleNPC(NPC * npc) Log(Logs::General, Logs::NPCScaling, - "(%s) level: %i type: %i Setting: %s", + "(%s) level: %i type: %i Auto: %s Setting: %s", npc->GetCleanName(), npc_level, npc_type, + (is_auto_scaled ? "true" : "false"), scale_log.c_str()); } } @@ -444,6 +446,33 @@ std::string NpcScaleManager::GetNPCScalingTypeName(NPC *&npc) return "Trash"; } +/** + * Determines based on minimum criteria if NPC is auto scaled for certain things to be scaled like + * special abilities. We use this so we don't blindly assume we want things to be applied + * + * @param npc + * @return + */ +bool NpcScaleManager::IsAutoScaled(NPC *npc) +{ + return + (npc->GetHP() == 0 && + npc->GetMaxDMG() == 0 && + npc->GetMinDMG() == 0 && + npc->GetSTR() == 0 && + npc->GetSTA() == 0 && + npc->GetDEX() == 0 && + npc->GetAGI() == 0 && + npc->GetINT() == 0 && + npc->GetWIS() == 0 && + npc->GetCHA() == 0 && + npc->GetMR() == 0 && + npc->GetFR() == 0 && + npc->GetCR() == 0 && + npc->GetPR() == 0 && + npc->GetDR() == 0); +} + /** * Returns false if scaling data not found * @param npc diff --git a/zone/npc_scale_manager.h b/zone/npc_scale_manager.h index afee566bd..1135ee8a2 100644 --- a/zone/npc_scale_manager.h +++ b/zone/npc_scale_manager.h @@ -21,7 +21,6 @@ #ifndef EQEMU_NPC_SCALE_MANAGER_H #define EQEMU_NPC_SCALE_MANAGER_H - #include "npc.h" class NpcScaleManager { @@ -88,6 +87,7 @@ public: }; void ScaleNPC(NPC * npc); + bool IsAutoScaled(NPC * npc); bool LoadScaleData(); global_npc_scale GetGlobalScaleDataForTypeLevel(int8 npc_type, int npc_level); From c32b31ffff20ad4fe8084f8447990e098fe81027 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 16 Dec 2018 03:59:08 -0600 Subject: [PATCH 474/670] Add npc_scale_global_base table and add devtools command and toggling functionality --- .../2018_12_16_global_base_scaling.sql | 314 ++++++++++++++++++ zone/attack.cpp | 12 +- zone/client.cpp | 28 +- zone/client.h | 4 + zone/client_packet.cpp | 10 + zone/command.cpp | 46 ++- zone/command.h | 1 + zone/mob_info.cpp | 5 + zone/npc_scale_manager.cpp | 2 +- 9 files changed, 407 insertions(+), 15 deletions(-) create mode 100644 utils/sql/git/required/2018_12_16_global_base_scaling.sql diff --git a/utils/sql/git/required/2018_12_16_global_base_scaling.sql b/utils/sql/git/required/2018_12_16_global_base_scaling.sql new file mode 100644 index 000000000..2c07d1fb6 --- /dev/null +++ b/utils/sql/git/required/2018_12_16_global_base_scaling.sql @@ -0,0 +1,314 @@ +-- INSERT #devtools / #dev command + +INSERT INTO `command_settings` (`command`, `access`, `aliases`) +VALUES + ('devtools', 200, 'dev'); + +-- CREATE 'npc_scale_global_base' + +CREATE TABLE `npc_scale_global_base` ( + `type` int(11) NOT NULL DEFAULT '0', + `level` int(11) NOT NULL, + `ac` int(11) DEFAULT NULL, + `hp` int(11) DEFAULT NULL, + `accuracy` int(11) DEFAULT NULL, + `slow_mitigation` int(11) DEFAULT NULL, + `attack` int(11) DEFAULT NULL, + `strength` int(11) DEFAULT NULL, + `stamina` int(11) DEFAULT NULL, + `dexterity` int(11) DEFAULT NULL, + `agility` int(11) DEFAULT NULL, + `intelligence` int(11) DEFAULT NULL, + `wisdom` int(11) DEFAULT NULL, + `charisma` int(11) DEFAULT NULL, + `magic_resist` int(11) DEFAULT NULL, + `cold_resist` int(11) DEFAULT NULL, + `fire_resist` int(11) DEFAULT NULL, + `poison_resist` int(11) DEFAULT NULL, + `disease_resist` int(11) DEFAULT NULL, + `corruption_resist` int(11) DEFAULT NULL, + `physical_resist` int(11) DEFAULT NULL, + `min_dmg` int(11) DEFAULT NULL, + `max_dmg` int(11) DEFAULT NULL, + `hp_regen_rate` int(11) DEFAULT NULL, + `attack_delay` int(11) DEFAULT NULL, + `spell_scale` int(11) DEFAULT '100', + `heal_scale` int(11) DEFAULT '100', + `special_abilities` text, + PRIMARY KEY (`type`,`level`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- INSERT 'npc_scale_global_base' + +INSERT INTO `npc_scale_global_base` (`type`, `level`, `ac`, `hp`, `accuracy`, `slow_mitigation`, `attack`, `strength`, `stamina`, `dexterity`, `agility`, `intelligence`, `wisdom`, `charisma`, `magic_resist`, `cold_resist`, `fire_resist`, `poison_resist`, `disease_resist`, `corruption_resist`, `physical_resist`, `min_dmg`, `max_dmg`, `hp_regen_rate`, `attack_delay`, `spell_scale`, `heal_scale`, `special_abilities`) +VALUES + (0,1,8,11,0,0,0,8,8,8,8,8,8,8,1,1,1,1,1,1,10,1,6,1,30,100,100,''), + (0,2,11,27,0,0,0,11,11,11,11,11,11,11,1,1,1,1,1,2,10,1,8,2,30,100,100,''), + (0,3,14,43,0,0,0,14,14,14,14,14,14,14,2,2,2,2,2,2,10,1,10,3,30,100,100,''), + (0,4,16,59,0,0,0,17,17,17,17,17,17,17,2,2,2,2,2,3,10,1,12,4,30,100,100,''), + (0,5,19,75,0,0,0,20,20,20,20,20,20,20,2,2,2,2,2,3,10,1,14,5,30,100,100,''), + (0,6,22,100,0,0,0,23,23,23,23,23,23,23,2,2,2,2,2,4,10,1,16,6,30,100,100,''), + (0,7,25,125,0,0,0,26,26,26,26,26,26,26,3,3,3,3,3,4,10,1,18,7,30,100,100,''), + (0,8,28,150,0,0,0,29,29,29,29,29,29,29,3,3,3,3,3,5,10,1,20,8,30,100,100,''), + (0,9,31,175,0,0,0,32,32,32,32,32,32,32,4,4,4,4,4,5,10,1,22,9,30,100,100,''), + (0,10,34,200,0,0,0,35,35,35,35,35,35,35,4,4,4,4,4,6,10,1,24,10,30,100,100,''), + (0,11,37,234,0,0,0,38,38,38,38,38,38,38,5,5,5,5,5,7,10,3,27,11,30,100,100,''), + (0,12,40,268,0,0,0,42,42,42,42,42,42,42,5,5,5,5,5,8,10,4,30,12,30,100,100,''), + (0,13,43,302,0,0,0,45,45,45,45,45,45,45,6,6,6,6,6,8,10,6,32,13,30,100,100,''), + (0,14,46,336,0,0,0,48,48,48,48,48,48,48,6,6,6,6,6,9,10,7,35,14,30,100,100,''), + (0,15,52,381,0,0,0,51,51,51,51,51,51,51,6,6,6,6,6,10,10,7,37,15,30,100,100,''), + (0,16,59,426,0,0,0,54,54,54,54,54,54,54,7,7,7,7,7,10,10,8,39,16,30,100,100,''), + (0,17,65,471,0,0,0,57,57,57,57,57,57,57,7,7,7,7,7,11,10,8,41,17,30,100,100,''), + (0,18,72,516,0,0,0,60,60,60,60,60,60,60,7,7,7,7,7,11,10,9,42,18,30,100,100,''), + (0,19,78,561,0,0,0,63,63,63,63,63,63,63,7,7,7,7,7,12,10,9,44,19,30,100,100,''), + (0,20,85,606,0,0,0,66,66,66,66,66,66,66,8,8,8,8,8,12,10,10,46,20,30,100,100,''), + (0,21,91,651,0,0,0,69,69,69,69,69,69,69,8,8,8,8,8,13,10,10,48,21,30,100,100,''), + (0,22,95,712,0,0,0,72,72,72,72,72,72,72,8,8,8,8,8,14,10,10,50,22,30,100,100,''), + (0,23,99,773,0,0,0,75,75,75,75,75,75,75,9,9,9,9,9,14,10,10,52,23,30,100,100,''), + (0,24,103,834,0,0,0,78,78,78,78,78,78,78,9,9,9,9,9,15,10,11,55,24,30,100,100,''), + (0,25,107,895,0,0,0,81,81,81,81,81,81,81,10,10,10,10,10,16,10,11,57,25,30,100,100,''), + (0,26,111,956,0,0,0,85,85,85,85,85,85,85,10,10,10,10,10,16,10,11,59,26,30,100,100,''), + (0,27,115,1017,0,0,0,88,88,88,88,88,88,88,11,11,11,11,11,17,10,11,61,27,30,100,100,''), + (0,28,119,1078,0,0,0,91,91,91,91,91,91,91,11,11,11,11,11,18,10,12,64,28,30,100,100,''), + (0,29,123,1139,0,0,0,94,94,94,94,94,94,94,12,12,12,12,12,18,10,12,66,29,30,100,100,''), + (0,30,127,1200,0,0,0,97,97,97,97,97,97,97,12,12,12,12,12,19,10,12,68,30,30,100,100,''), + (0,31,135,1580,4,0,4,104,104,104,104,104,104,104,13,13,13,13,13,20,10,14,74,31,30,100,100,''), + (0,32,142,1960,8,0,8,110,110,110,110,110,110,110,14,14,14,14,14,22,10,16,79,32,30,100,100,''), + (0,33,150,2340,12,0,12,117,117,117,117,117,117,117,15,15,15,15,15,23,10,18,85,33,29,100,100,''), + (0,34,158,2720,16,0,16,123,123,123,123,123,123,123,16,16,16,16,16,25,10,20,90,34,28,100,100,''), + (0,35,166,3100,20,0,20,130,130,130,130,130,130,130,17,17,17,17,17,26,10,22,96,35,27,100,100,''), + (0,36,173,3480,24,0,24,137,137,137,137,137,137,137,17,17,17,17,17,27,10,24,102,36,25,100,100,''), + (0,37,181,3860,28,0,28,143,143,143,143,143,143,143,18,18,18,18,18,29,10,26,107,37,24,100,100,''), + (0,38,189,4240,32,0,32,150,150,150,150,150,150,150,19,19,19,19,19,30,10,28,113,38,23,100,100,''), + (0,39,196,4620,36,0,36,156,156,156,156,156,156,156,20,20,20,20,20,32,10,30,118,39,22,100,100,''), + (0,40,204,5000,40,0,40,163,163,163,163,163,163,163,21,21,21,21,21,33,10,32,124,40,21,100,100,''), + (0,41,208,5300,42,0,42,166,166,166,166,166,166,166,22,22,22,22,22,34,10,33,127,41,21,100,100,''), + (0,42,212,5600,44,0,44,169,169,169,169,169,169,169,22,22,22,22,22,35,10,34,130,42,21,100,100,''), + (0,43,217,5900,46,0,46,173,173,173,173,173,173,173,23,23,23,23,23,35,10,34,133,43,21,100,100,''), + (0,44,221,6200,48,0,48,176,176,176,176,176,176,176,23,23,23,23,23,36,10,35,136,44,21,100,100,''), + (0,45,225,6500,50,0,50,179,179,179,179,179,179,179,24,24,24,24,24,37,10,36,139,45,21,100,100,''), + (0,46,229,7200,50,0,50,182,182,182,182,182,182,182,24,24,24,24,24,38,10,44,152,46,21,100,100,''), + (0,47,233,7900,50,0,50,185,185,185,185,185,185,185,25,25,25,25,25,39,10,51,165,47,21,100,100,''), + (0,48,237,8600,50,0,50,188,188,188,188,188,188,188,25,25,25,25,25,39,10,59,178,48,21,100,100,''), + (0,49,241,9300,50,0,50,191,191,191,191,191,191,191,26,26,26,26,26,40,10,66,191,49,21,100,100,''), + (0,50,245,10000,50,0,50,194,194,194,194,194,194,194,26,26,26,26,26,41,10,74,204,50,21,100,100,''), + (0,51,249,11700,53,0,53,197,197,197,197,197,197,197,27,27,27,27,27,42,11,78,231,51,20,100,100,''), + (0,52,253,13400,56,0,56,200,200,200,200,200,200,200,27,27,27,27,27,43,12,81,258,52,20,100,100,''), + (0,53,257,15100,59,0,59,203,203,203,203,203,203,203,28,28,28,28,28,43,13,85,284,53,20,100,100,''), + (0,54,261,16800,62,10,62,206,206,206,206,206,206,206,28,28,28,28,28,44,14,89,311,54,20,100,100,''), + (0,55,266,18500,65,10,65,210,210,210,210,210,210,210,29,29,29,29,29,45,15,93,338,55,20,100,100,''), + (0,56,270,20200,68,10,68,213,213,213,213,213,213,213,29,29,29,29,29,46,16,96,365,56,20,100,100,''), + (0,57,274,21900,71,10,71,216,216,216,216,216,216,216,30,30,30,30,30,47,17,100,392,57,19,100,100,''), + (0,58,278,23600,74,10,74,219,219,219,219,219,219,219,30,30,30,30,30,47,18,104,418,58,19,100,100,'8,1'), + (0,59,282,25300,77,10,77,222,222,222,222,222,222,222,31,31,31,31,31,48,19,107,445,59,19,100,100,'8,1'), + (0,60,286,27000,80,20,80,225,225,225,225,225,225,225,31,31,31,31,31,49,20,111,472,60,19,100,100,'8,1^21,1'), + (0,61,290,28909,85,20,84,228,228,228,228,228,228,228,32,32,32,32,32,50,24,128,536,61,19,100,100,'8,1^21,1'), + (0,62,294,30818,91,20,87,231,231,231,231,231,231,231,32,32,32,32,32,51,28,145,599,62,18,100,100,'8,1^21,1'), + (0,63,299,32727,96,20,91,234,234,234,234,234,234,234,33,33,33,33,33,51,32,162,663,63,18,100,100,'8,1^21,1'), + (0,64,303,34636,102,20,95,237,237,237,237,237,237,237,33,33,33,33,33,52,36,179,727,64,18,100,100,'8,1^21,1'), + (0,65,307,36545,107,25,98,240,240,240,240,240,240,240,34,34,34,34,34,53,40,196,790,65,18,100,100,'8,1^21,1'), + (0,66,311,38455,113,25,102,244,244,244,244,244,244,244,34,34,34,34,34,54,44,213,854,66,18,100,100,'8,1^21,1'), + (0,67,315,40364,118,25,105,247,247,247,247,247,247,247,35,35,35,35,35,55,48,230,917,67,17,100,100,'8,1^21,1'), + (0,68,319,42273,124,25,109,250,250,250,250,250,250,250,35,35,35,35,35,56,52,247,981,68,17,100,100,'8,1^21,1'), + (0,69,324,44182,129,25,113,253,253,253,253,253,253,253,36,36,36,36,36,56,56,264,1045,69,17,100,100,'8,1^21,1'), + (0,70,328,46091,135,30,116,256,256,256,256,256,256,256,36,36,36,36,36,57,60,281,1108,70,17,100,100,'8,1^21,1'), + (0,71,332,48000,140,30,120,259,259,259,259,259,259,259,37,37,37,37,37,58,64,298,1172,71,17,100,100,'8,1^21,1'), + (0,72,336,49909,143,30,128,262,262,262,262,262,262,262,38,38,38,38,38,59,68,305,1193,72,17,100,100,'8,1^21,1'), + (0,73,340,51818,145,30,135,265,265,265,265,265,265,265,39,39,39,39,39,60,72,312,1214,73,17,100,100,'8,1^21,1'), + (0,74,344,53727,148,30,143,268,268,268,268,268,268,268,39,39,39,39,39,61,76,318,1235,74,17,100,100,'8,1^21,1'), + (0,75,348,55636,150,30,150,271,271,271,271,271,271,271,40,40,40,40,40,62,80,325,1256,75,17,100,100,'8,1^21,1'), + (0,76,352,75000,160,30,160,274,274,274,274,274,274,274,41,41,41,41,41,63,84,400,1600,76,17,100,100,'8,1^21,1'), + (0,77,356,90000,170,30,170,277,277,277,277,277,277,277,42,42,42,42,42,64,88,500,2050,77,17,100,100,'8,1^21,1'), + (0,78,360,113000,180,30,180,280,280,280,280,280,280,280,43,43,43,43,43,65,92,594,2323,120,17,100,100,'8,1^21,1'), + (0,79,364,130000,190,30,190,283,283,283,283,283,283,283,44,44,44,44,44,66,96,650,2500,130,17,100,100,'8,1^21,1'), + (0,80,368,140000,200,30,200,286,286,286,286,286,286,286,45,45,45,45,45,67,100,720,2799,140,16,100,100,'8,1^21,1'), + (0,81,372,240000,300,30,300,289,289,289,289,289,289,289,46,46,46,46,46,68,104,800,3599,240,16,100,100,'8,1^21,1'), + (0,82,376,340000,400,30,400,292,292,292,292,292,292,292,47,47,47,47,47,69,108,900,4599,340,16,100,100,'8,1^21,1'), + (0,83,380,440000,410,30,410,295,295,295,295,295,295,295,48,48,48,48,48,70,112,1275,4904,440,16,100,100,'8,1^21,1'), + (0,84,384,445000,420,30,420,298,298,298,298,298,298,298,49,49,49,49,49,71,116,1300,5100,445,16,100,100,'8,1^21,1'), + (0,85,388,450000,430,30,430,301,301,301,301,301,301,301,50,50,50,50,50,72,120,1359,5292,450,16,100,100,'8,1^21,1'), + (0,86,392,455000,440,30,440,304,304,304,304,304,304,304,51,51,51,51,51,73,124,1475,5578,455,16,100,100,'8,1^21,1'), + (0,87,396,460000,450,30,450,307,307,307,307,307,307,307,52,52,52,52,52,74,128,1510,5918,460,16,100,100,'8,1^21,1'), + (0,88,400,465000,460,30,460,310,310,310,310,310,310,310,53,53,53,53,53,75,132,1610,6200,465,16,100,100,'8,1^21,1'), + (0,89,404,470000,470,30,470,313,313,313,313,313,313,313,54,54,54,54,54,76,136,1650,6275,470,16,100,100,'8,1^21,1'), + (0,90,408,475000,480,30,480,316,316,316,316,316,316,316,55,55,55,55,55,77,140,1700,6350,475,16,100,100,'8,1^21,1'), + (1,1,10,13,0,0,0,10,10,10,10,10,10,10,1,1,1,1,1,1,12,1,7,1,30,100,100,'13,1^14,1^21,1'), + (1,2,13,32,0,0,0,13,13,13,13,13,13,13,1,1,1,1,1,2,12,1,10,2,30,100,100,'13,1^14,1^21,1'), + (1,3,17,52,0,0,0,17,17,17,17,17,17,17,2,2,2,2,2,2,12,1,12,4,30,100,100,'13,1^14,1^21,1'), + (1,4,19,71,0,0,0,20,20,20,20,20,20,20,2,2,2,2,2,4,12,1,14,5,30,100,100,'13,1^14,1^21,1'), + (1,5,23,90,0,0,0,24,24,24,24,24,24,24,2,2,2,2,2,4,12,1,17,6,30,100,100,'13,1^14,1^21,1'), + (1,6,26,120,0,0,0,28,28,28,28,28,28,28,2,2,2,2,2,5,12,1,19,7,30,100,100,'13,1^14,1^21,1'), + (1,7,30,150,0,0,0,31,31,31,31,31,31,31,4,4,4,4,4,5,12,1,22,8,30,100,100,'13,1^14,1^21,1'), + (1,8,34,180,0,0,0,35,35,35,35,35,35,35,4,4,4,4,4,6,12,1,24,10,30,100,100,'13,1^14,1^21,1'), + (1,9,37,210,0,0,0,38,38,38,38,38,38,38,5,5,5,5,5,6,12,1,26,11,30,100,100,'13,1^14,1^21,1'), + (1,10,41,240,0,0,0,42,42,42,42,42,42,42,5,5,5,5,5,7,12,1,29,12,30,100,100,'13,1^14,1^21,1'), + (1,11,44,281,0,0,0,46,46,46,46,46,46,46,6,6,6,6,6,8,12,4,32,13,30,100,100,'13,1^14,1^21,1'), + (1,12,48,322,0,0,0,50,50,50,50,50,50,50,6,6,6,6,6,10,12,5,36,14,30,100,100,'13,1^14,1^21,1'), + (1,13,52,362,0,0,0,54,54,54,54,54,54,54,7,7,7,7,7,10,12,7,38,16,30,100,100,'13,1^14,1^21,1'), + (1,14,55,403,0,0,0,58,58,58,58,58,58,58,7,7,7,7,7,11,12,8,42,17,30,100,100,'13,1^14,1^21,1'), + (1,15,62,457,0,0,0,61,61,61,61,61,61,61,7,7,7,7,7,12,12,8,44,18,30,100,100,'13,1^14,1^21,1'), + (1,16,71,511,0,0,0,65,65,65,65,65,65,65,8,8,8,8,8,12,12,10,47,19,30,100,100,'13,1^14,1^21,1'), + (1,17,78,565,0,0,0,68,68,68,68,68,68,68,8,8,8,8,8,13,12,10,49,20,30,100,100,'13,1^14,1^21,1'), + (1,18,86,619,0,0,0,72,72,72,72,72,72,72,8,8,8,8,8,13,12,11,50,22,30,100,100,'13,1^14,1^21,1'), + (1,19,94,673,0,0,0,76,76,76,76,76,76,76,8,8,8,8,8,14,12,11,53,23,30,100,100,'13,1^14,1^21,1'), + (1,20,102,727,0,0,0,79,79,79,79,79,79,79,10,10,10,10,10,14,12,12,55,24,30,100,100,'13,1^14,1^21,1'), + (1,21,109,781,0,0,0,83,83,83,83,83,83,83,10,10,10,10,10,16,12,12,58,25,30,100,100,'13,1^14,1^21,1'), + (1,22,114,854,0,0,0,86,86,86,86,86,86,86,10,10,10,10,10,17,12,12,60,26,30,100,100,'13,1^14,1^21,1'), + (1,23,119,928,0,0,0,90,90,90,90,90,90,90,11,11,11,11,11,17,12,12,62,28,30,100,100,'13,1^14,1^21,1'), + (1,24,124,1001,0,0,0,94,94,94,94,94,94,94,11,11,11,11,11,18,12,13,66,29,30,100,100,'13,1^14,1^21,1'), + (1,25,128,1074,0,0,0,97,97,97,97,97,97,97,12,12,12,12,12,19,12,13,68,30,30,100,100,'13,1^14,1^21,1'), + (1,26,133,1147,0,0,0,102,102,102,102,102,102,102,12,12,12,12,12,19,12,13,71,31,30,100,100,'13,1^14,1^21,1'), + (1,27,138,1220,0,0,0,106,106,106,106,106,106,106,13,13,13,13,13,20,12,13,73,32,30,100,100,'13,1^14,1^21,1'), + (1,28,143,1294,0,0,0,109,109,109,109,109,109,109,13,13,13,13,13,22,12,14,77,34,30,100,100,'13,1^14,1^21,1'), + (1,29,148,1367,0,0,0,113,113,113,113,113,113,113,14,14,14,14,14,22,12,14,79,35,30,100,100,'13,1^14,1^21,1'), + (1,30,152,1440,0,0,0,116,116,116,116,116,116,116,14,14,14,14,14,23,12,14,82,36,30,100,100,'13,1^14,1^21,1'), + (1,31,162,1896,5,0,5,125,125,125,125,125,125,125,16,16,16,16,16,24,12,17,89,37,30,100,100,'13,1^14,1^21,1'), + (1,32,170,2352,10,0,10,132,132,132,132,132,132,132,17,17,17,17,17,26,12,19,95,38,30,100,100,'13,1^14,1^21,1'), + (1,33,180,2808,14,0,14,140,140,140,140,140,140,140,18,18,18,18,18,28,12,22,102,40,29,100,100,'13,1^14,1^21,1'), + (1,34,190,3264,19,0,19,148,148,148,148,148,148,148,19,19,19,19,19,30,12,24,108,41,28,100,100,'13,1^14,1^21,1'), + (1,35,199,3720,24,0,24,156,156,156,156,156,156,156,20,20,20,20,20,31,12,26,115,42,27,100,100,'13,1^14,1^21,1'), + (1,36,208,4176,29,0,29,164,164,164,164,164,164,164,20,20,20,20,20,32,12,29,122,43,25,100,100,'13,1^14,1^21,1'), + (1,37,217,4632,34,0,34,172,172,172,172,172,172,172,22,22,22,22,22,35,12,31,128,44,24,100,100,'13,1^14,1^21,1'), + (1,38,227,5088,38,0,38,180,180,180,180,180,180,180,23,23,23,23,23,36,12,34,136,46,23,100,100,'13,1^14,1^21,1'), + (1,39,235,5544,43,0,43,187,187,187,187,187,187,187,24,24,24,24,24,38,12,36,142,47,22,100,100,'13,1^14,1^21,1'), + (1,40,245,6000,48,0,48,196,196,196,196,196,196,196,25,25,25,25,25,40,12,38,149,48,21,100,100,'13,1^14,1^21,1'), + (1,41,250,6360,50,0,50,199,199,199,199,199,199,199,26,26,26,26,26,41,12,40,152,49,21,100,100,'13,1^14,1^21,1'), + (1,42,254,6720,53,0,53,203,203,203,203,203,203,203,26,26,26,26,26,42,12,41,156,50,21,100,100,'13,1^14,1^21,1'), + (1,43,260,7080,55,0,55,208,208,208,208,208,208,208,28,28,28,28,28,42,12,41,160,52,21,100,100,'13,1^14,1^21,1'), + (1,44,265,7440,58,0,58,211,211,211,211,211,211,211,28,28,28,28,28,43,12,42,163,53,21,100,100,'13,1^14,1^21,1'), + (1,45,270,7800,60,0,60,215,215,215,215,215,215,215,29,29,29,29,29,44,12,43,167,54,21,100,100,'13,1^14,1^21,1'), + (1,46,275,8640,60,0,60,218,218,218,218,218,218,218,29,29,29,29,29,46,12,53,182,55,21,100,100,'13,1^14,1^21,1'), + (1,47,280,9480,60,0,60,222,222,222,222,222,222,222,30,30,30,30,30,47,12,61,198,56,21,100,100,'13,1^14,1^21,1'), + (1,48,284,10320,60,0,60,226,226,226,226,226,226,226,30,30,30,30,30,47,12,71,214,58,21,100,100,'13,1^14,1^21,1'), + (1,49,289,11160,60,0,60,229,229,229,229,229,229,229,31,31,31,31,31,48,12,79,229,59,21,100,100,'13,1^14,1^21,1'), + (1,50,294,12000,60,0,60,233,233,233,233,233,233,233,31,31,31,31,31,49,12,89,245,60,21,100,100,'13,1^14,1^21,1'), + (1,51,299,14040,64,0,64,236,236,236,236,236,236,236,32,32,32,32,32,50,13,94,277,61,20,100,100,'13,1^14,1^21,1'), + (1,52,304,16080,67,0,67,240,240,240,240,240,240,240,32,32,32,32,32,52,14,97,310,62,20,100,100,'13,1^14,1^21,1'), + (1,53,308,18120,71,0,71,244,244,244,244,244,244,244,34,34,34,34,34,52,16,102,341,64,20,100,100,'13,1^14,1^21,1'), + (1,54,313,20160,74,0,74,247,247,247,247,247,247,247,34,34,34,34,34,53,17,107,373,65,20,100,100,'13,1^14,1^21,1'), + (1,55,319,22200,78,0,78,252,252,252,252,252,252,252,35,35,35,35,35,54,18,112,406,66,20,100,100,'13,1^14,1^21,1'), + (1,56,324,24240,82,0,82,256,256,256,256,256,256,256,35,35,35,35,35,55,19,115,438,67,20,100,100,'13,1^14,1^21,1'), + (1,57,329,26280,85,0,85,259,259,259,259,259,259,259,36,36,36,36,36,56,20,120,470,68,19,100,100,'13,1^14,1^21,1'), + (1,58,334,28320,89,0,89,263,263,263,263,263,263,263,36,36,36,36,36,56,22,125,502,70,19,100,100,'13,1^14,1^21,1'), + (1,59,338,30360,92,0,92,266,266,266,266,266,266,266,37,37,37,37,37,58,23,128,534,71,19,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,60,343,32400,96,30,96,270,270,270,270,270,270,270,37,37,37,37,37,59,24,133,566,72,19,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,61,348,34691,102,30,101,274,274,274,274,274,274,274,38,38,38,38,38,60,29,154,643,73,19,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,62,353,36982,109,30,104,277,277,277,277,277,277,277,38,38,38,38,38,61,34,174,719,74,18,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,63,359,39272,115,30,109,281,281,281,281,281,281,281,40,40,40,40,40,61,38,194,796,76,18,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,64,364,41563,122,30,114,284,284,284,284,284,284,284,40,40,40,40,40,62,43,215,872,77,18,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,65,368,43854,128,35,118,288,288,288,288,288,288,288,41,41,41,41,41,64,48,235,948,78,18,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,66,373,46146,136,35,122,293,293,293,293,293,293,293,41,41,41,41,41,65,53,256,1025,79,18,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,67,378,48437,142,35,126,296,296,296,296,296,296,296,42,42,42,42,42,66,58,276,1100,80,17,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,68,383,50728,149,35,131,300,300,300,300,300,300,300,42,42,42,42,42,67,62,296,1177,82,17,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,69,389,53018,155,35,136,304,304,304,304,304,304,304,43,43,43,43,43,67,67,317,1254,83,17,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,70,394,55309,162,40,139,307,307,307,307,307,307,307,43,43,43,43,43,68,72,337,1330,84,17,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,71,398,57600,168,40,144,311,311,311,311,311,311,311,44,44,44,44,44,70,77,358,1406,85,17,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,72,403,57600,172,40,154,314,314,314,314,314,314,314,46,46,46,46,46,71,82,366,1432,86,17,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,73,408,57600,174,40,162,318,318,318,318,318,318,318,47,47,47,47,47,72,86,374,1457,88,17,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,74,413,57600,178,40,172,322,322,322,322,322,322,322,47,47,47,47,47,73,91,382,1482,89,17,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,75,418,57600,180,40,180,325,325,325,325,325,325,325,48,48,48,48,48,74,96,390,1507,90,17,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,76,423,90000,192,45,192,329,329,329,329,329,329,329,49,49,49,49,49,76,101,480,1920,91,17,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,77,428,108000,204,45,204,332,332,332,332,332,332,332,50,50,50,50,50,77,106,600,2460,92,17,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,78,433,135600,216,45,216,336,336,336,336,336,336,336,52,52,52,52,52,78,110,713,2788,144,17,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,79,438,156000,228,45,228,340,340,340,340,340,340,340,53,53,53,53,53,79,115,780,3000,156,17,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,80,443,168000,240,45,240,343,343,343,343,343,343,343,54,54,54,54,54,80,120,864,3359,168,16,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,81,448,288000,360,45,360,347,347,347,347,347,347,347,55,55,55,55,55,82,125,960,4319,288,16,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,82,453,408000,480,45,480,350,350,350,350,350,350,350,56,56,56,56,56,83,130,1080,5519,408,16,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,83,458,528000,492,45,492,354,354,354,354,354,354,354,58,58,58,58,58,84,134,1530,5885,528,16,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,84,463,534000,504,45,504,358,358,358,358,358,358,358,59,59,59,59,59,85,139,1560,6120,534,16,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,85,468,540000,516,45,516,361,361,361,361,361,361,361,60,60,60,60,60,86,144,1631,6350,540,16,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,86,473,546000,528,45,528,365,365,365,365,365,365,365,61,61,61,61,61,88,149,1770,6694,546,16,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,87,478,552000,540,45,540,368,368,368,368,368,368,368,62,62,62,62,62,89,154,1812,7102,552,16,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,88,483,558000,552,45,552,372,372,372,372,372,372,372,64,64,64,64,64,90,158,1932,7440,558,16,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,89,488,564000,564,45,564,376,376,376,376,376,376,376,65,65,65,65,65,91,163,1980,7530,564,16,100,100,'1,1^8,1^13,1^14,1^21,1'), + (1,90,490,570000,576,45,576,379,379,379,379,379,379,379,66,66,66,66,66,92,168,2040,7620,570,16,100,100,'1,1^8,1^13,1^14,1^21,1'), + (2,1,12,17,0,0,0,12,12,12,12,12,12,12,2,2,2,2,2,2,15,2,9,2,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,2,17,41,0,0,0,17,17,17,17,17,17,17,4,4,4,4,4,4,15,2,12,3,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,3,21,65,0,0,0,21,21,21,21,21,21,21,6,6,6,6,6,6,15,2,15,5,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,4,24,89,0,0,0,26,26,26,26,26,26,26,8,8,8,8,8,8,15,2,18,6,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,5,29,113,0,0,0,30,30,30,30,30,30,30,10,10,10,10,10,10,15,2,21,8,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,6,33,150,0,0,0,35,35,35,35,35,35,35,12,12,12,12,12,12,15,2,24,9,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,7,38,188,0,0,0,39,39,39,39,39,39,39,14,14,14,14,14,14,15,2,27,11,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,8,42,225,0,0,0,44,44,44,44,44,44,44,16,16,16,16,16,16,15,2,30,12,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,9,47,263,0,0,0,48,48,48,48,48,48,48,18,18,18,18,18,18,15,2,33,14,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,10,51,300,0,0,0,53,53,53,53,53,53,53,20,20,20,20,20,20,15,2,36,15,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,11,56,351,0,0,0,57,57,57,57,57,57,57,22,22,22,22,22,22,15,5,41,17,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,12,60,402,0,0,0,63,63,63,63,63,63,63,24,24,24,24,24,24,15,6,45,18,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,13,65,453,0,0,0,68,68,68,68,68,68,68,26,26,26,26,26,26,15,9,48,20,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,14,69,504,0,0,0,72,72,72,72,72,72,72,28,28,28,28,28,28,15,11,53,21,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,15,78,572,0,0,0,77,77,77,77,77,77,77,30,30,30,30,30,30,15,11,56,23,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,16,89,639,0,0,0,81,81,81,81,81,81,81,32,32,32,32,32,32,15,12,59,24,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,17,98,707,0,0,0,86,86,86,86,86,86,86,34,34,34,34,34,34,15,12,62,26,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,18,108,774,0,0,0,90,90,90,90,90,90,90,36,36,36,36,36,36,15,14,63,27,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,19,117,842,0,0,0,95,95,95,95,95,95,95,38,38,38,38,38,38,15,14,66,29,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,20,128,909,0,0,0,99,99,99,99,99,99,99,40,40,40,40,40,40,15,15,69,30,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,21,137,977,0,0,0,104,104,104,104,104,104,104,42,42,42,42,42,42,15,15,72,32,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,22,143,1068,0,0,0,108,108,108,108,108,108,108,44,44,44,44,44,44,15,15,75,33,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,23,149,1160,0,0,0,113,113,113,113,113,113,113,46,46,46,46,46,46,15,15,78,35,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,24,155,1251,0,0,0,117,117,117,117,117,117,117,48,48,48,48,48,48,15,17,83,36,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,25,161,1343,0,0,0,122,122,122,122,122,122,122,50,50,50,50,50,50,15,17,86,38,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,26,167,1434,0,0,0,128,128,128,128,128,128,128,52,52,52,52,52,52,15,17,89,39,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,27,173,1526,0,0,0,132,132,132,132,132,132,132,54,54,54,54,54,54,15,17,92,41,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,28,179,1617,0,0,0,137,137,137,137,137,137,137,56,56,56,56,56,56,15,18,96,42,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,29,185,1709,0,0,0,141,141,141,141,141,141,141,58,58,58,58,58,58,15,18,99,44,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,30,191,1800,0,0,0,146,146,146,146,146,146,146,60,60,60,60,60,60,15,18,102,45,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,31,203,2370,6,0,6,156,156,156,156,156,156,156,62,62,62,62,62,62,15,21,111,47,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,32,213,2940,12,0,12,165,165,165,165,165,165,165,64,64,64,64,64,64,15,24,119,48,30,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,33,225,3510,18,0,18,176,176,176,176,176,176,176,66,66,66,66,66,66,15,27,128,50,29,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,34,237,4080,24,0,24,185,185,185,185,185,185,185,68,68,68,68,68,68,15,30,135,51,28,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,35,249,4650,30,0,30,195,195,195,195,195,195,195,70,70,70,70,70,70,15,33,144,53,27,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,36,260,5220,36,0,36,206,206,206,206,206,206,206,72,72,72,72,72,72,15,36,153,54,25,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,37,272,5790,42,0,42,215,215,215,215,215,215,215,74,74,74,74,74,74,15,39,161,56,24,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,38,284,6360,48,0,48,225,225,225,225,225,225,225,76,76,76,76,76,76,15,42,170,57,23,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,39,294,6930,54,0,54,234,234,234,234,234,234,234,78,78,78,78,78,78,15,45,177,59,22,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,40,306,7500,60,0,60,245,245,245,245,245,245,245,80,80,80,80,80,80,15,48,186,60,21,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,41,312,7950,63,0,63,249,249,249,249,249,249,249,82,82,82,82,82,82,15,50,191,62,21,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,42,318,8400,66,0,66,254,254,254,254,254,254,254,84,84,84,84,84,84,15,51,195,63,21,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,43,326,11000,69,0,69,260,260,260,260,260,260,260,86,86,86,86,86,86,15,51,200,65,21,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,44,332,25000,72,0,72,264,264,264,264,264,264,264,88,88,88,88,88,88,15,53,204,66,21,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,45,338,35000,75,0,75,269,269,269,269,269,269,269,90,90,90,90,90,90,15,54,209,68,21,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,46,344,45000,75,0,75,273,273,273,273,273,273,273,92,92,92,92,92,92,15,66,228,69,21,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,47,350,55000,75,0,75,278,278,278,278,278,278,278,94,94,94,94,94,94,15,77,248,71,21,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,48,356,70000,75,0,75,282,282,282,282,282,282,282,96,96,96,96,96,96,15,89,267,72,21,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,49,362,85000,75,0,75,287,287,287,287,287,287,287,98,98,98,98,98,98,15,99,287,74,21,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,50,368,100000,75,0,75,291,291,291,291,291,291,291,100,100,100,100,100,100,15,111,306,75,21,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,51,374,130000,80,0,80,296,296,296,296,296,296,296,102,102,102,102,102,102,17,117,347,77,20,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,52,380,140000,84,0,84,300,300,300,300,300,300,300,104,104,104,104,104,104,18,122,387,78,20,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,53,386,150000,89,0,89,305,305,305,305,305,305,305,106,106,106,106,106,106,20,128,426,80,19,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,54,392,160000,93,0,93,309,309,309,309,309,309,309,108,108,108,108,108,108,21,134,467,81,19,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,55,399,170000,98,0,98,315,315,315,315,315,315,315,110,110,110,110,110,110,23,140,507,83,18,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,56,405,180000,102,0,102,320,320,320,320,320,320,320,112,112,112,112,112,112,24,144,548,84,17,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,57,411,190000,107,0,107,324,324,324,324,324,324,324,114,114,114,114,114,114,26,150,588,86,17,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,58,417,200000,111,0,111,329,329,329,329,329,329,329,116,116,116,116,116,116,27,156,627,87,16,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,59,434,400750,130,0,125,253,253,253,253,253,253,253,118,118,118,118,118,118,19,170,700,141,16,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,60,476,450813,140,0,129,258,258,258,258,258,258,258,120,120,120,120,120,120,22,185,740,194,15,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,61,517,500875,145,0,130,263,263,263,263,263,263,263,122,122,122,122,122,122,26,195,780,246,15,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,62,559,550938,150,0,140,268,268,268,268,268,268,268,124,124,124,124,124,124,29,210,800,299,15,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,63,600,601000,155,0,160,273,273,273,273,273,273,273,126,126,126,126,126,126,32,220,825,351,15,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,64,563,734167,160,0,170,277,277,277,277,277,277,277,128,128,128,128,128,128,50,241,850,401,15,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,65,525,867333,165,0,180,281,281,281,281,281,281,281,130,130,130,130,130,130,67,262,875,450,14,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,66,488,1000500,170,0,190,285,285,285,285,285,285,285,132,132,132,132,132,132,85,283,904,500,14,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,67,498,1013841,175,10,200,292,292,292,292,292,292,292,134,134,134,134,134,134,81,312,1071,600,14,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,68,508,1027182,180,20,225,300,300,300,300,300,300,300,136,136,136,136,136,136,77,341,1238,700,14,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,69,519,1040522,185,30,239,307,307,307,307,307,307,307,138,138,138,138,138,138,72,369,1404,800,14,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,70,529,1053863,190,40,245,315,315,315,315,315,315,315,140,140,140,140,140,140,68,398,1571,900,14,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,71,539,1067204,200,50,255,322,322,322,322,322,322,322,142,142,142,142,142,142,64,427,1738,1000,14,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,72,547,1262903,220,56,265,327,327,327,327,327,327,327,144,144,144,144,144,144,68,520,1979,1125,14,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,73,556,1458602,253,63,285,332,332,332,332,332,332,332,146,146,146,146,146,146,72,614,2219,1250,13,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,74,564,1654301,306,69,300,337,337,337,337,337,337,337,148,148,148,148,148,148,76,707,2460,1375,13,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,75,572,1850000,330,75,310,342,342,342,342,342,342,342,150,150,150,150,150,150,80,725,2700,1500,13,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,76,579,1900000,348,77,320,346,346,346,346,346,346,346,152,152,152,152,152,152,84,750,2960,1600,13,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,77,586,1950000,355,79,330,350,350,350,350,350,350,350,154,154,154,154,154,154,88,775,3000,1700,13,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,78,594,2000000,365,81,340,354,354,354,354,354,354,354,156,156,156,156,156,156,92,800,3100,1800,13,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,79,601,2050000,375,83,350,358,358,358,358,358,358,358,158,158,158,158,158,158,96,825,3200,1900,13,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,80,608,2100000,380,85,360,362,362,362,362,362,362,362,160,160,160,160,160,160,100,850,3300,2000,13,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,81,615,2480000,385,83,370,366,366,366,366,366,366,366,162,162,162,162,162,162,104,875,3350,3000,13,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,82,622,2860000,390,81,380,370,370,370,370,370,370,370,164,164,164,164,164,164,108,900,3400,4000,13,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,83,629,3240000,395,79,390,375,375,375,375,375,375,375,166,166,166,166,166,166,112,925,3450,5000,13,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,84,636,3620000,400,77,400,379,379,379,379,379,379,379,168,168,168,168,168,168,116,940,3500,6000,13,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,85,643,4000000,405,75,410,383,383,383,383,383,383,383,170,170,170,170,170,170,120,960,3550,7000,12,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,86,650,4800000,410,77,420,387,387,387,387,387,387,387,172,172,172,172,172,172,124,980,3600,8000,12,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,87,657,5600000,415,79,430,391,391,391,391,391,391,391,174,174,174,174,174,174,128,1000,3650,9000,12,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,88,665,6400000,420,81,440,395,395,395,395,395,395,395,176,176,176,176,176,176,132,1010,3700,10000,12,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,89,672,7200000,420,83,445,399,399,399,399,399,399,399,178,178,178,178,178,178,136,1018,3800,11000,12,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'), + (2,90,679,8000000,420,85,450,403,403,403,403,403,403,403,180,180,180,180,180,180,140,1050,3900,12000,12,100,100,'1,1^2,1^8,1^13,1^14,1^15,1^16,1^17,1^21,1^31,1'); diff --git a/zone/attack.cpp b/zone/attack.cpp index a61e99bf8..bb3d8cb2d 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -5473,14 +5473,4 @@ int32 Mob::GetHPRegen() const int32 Mob::GetManaRegen() const { return mana_regen; -} - -bool Client::GetDisplayMobInfoWindow() const -{ - return display_mob_info_window; -} - -void Client::SetDisplayMobInfoWindow(bool display_mob_info_window) -{ - Client::display_mob_info_window = display_mob_info_window; -} +} \ No newline at end of file diff --git a/zone/client.cpp b/zone/client.cpp index 3877410d3..b33bde333 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -38,6 +38,7 @@ extern volatile bool RunLoops; #include "../common/rulesys.h" #include "../common/string_util.h" #include "../common/data_verification.h" +#include "data_bucket.h" #include "position.h" #include "net.h" #include "worldserver.h" @@ -166,7 +167,6 @@ Client::Client(EQStreamInterface* ieqs) for (int client_filter = 0; client_filter < _FilterCount; client_filter++) ClientFilters[client_filter] = FilterShow; - display_mob_info_window = true; character_id = 0; conn_state = NoPacketsReceived; client_data_loaded = false; @@ -335,6 +335,12 @@ Client::Client(EQStreamInterface* ieqs) temp_pvp = false; is_client_moving = false; + /** + * GM + */ + display_mob_info_window = true; + dev_tools_window_enabled = true; + #ifdef BOTS bot_owner_options = DefaultBotOwnerOptions; #endif @@ -1648,7 +1654,6 @@ void Client::FriendsWho(char *FriendsString) { } } - void Client::UpdateAdmin(bool iFromDB) { int16 tmp = admin; if (iFromDB) @@ -9322,3 +9327,22 @@ void Client::InitInnates() } } +bool Client::GetDisplayMobInfoWindow() const +{ + return display_mob_info_window; +} + +void Client::SetDisplayMobInfoWindow(bool display_mob_info_window) +{ + Client::display_mob_info_window = display_mob_info_window; +} + +bool Client::IsDevToolsWindowEnabled() const +{ + return dev_tools_window_enabled; +} + +void Client::SetDevToolsWindowEnabled(bool in_dev_tools_window_enabled) +{ + Client::dev_tools_window_enabled = in_dev_tools_window_enabled; +} \ No newline at end of file diff --git a/zone/client.h b/zone/client.h index 9aecf43b0..ba1b8e77f 100644 --- a/zone/client.h +++ b/zone/client.h @@ -249,6 +249,9 @@ public: void SetDisplayMobInfoWindow(bool display_mob_info_window); bool GetDisplayMobInfoWindow() const; + bool IsDevToolsWindowEnabled() const; + void SetDevToolsWindowEnabled(bool dev_tools_window_enabled); + //abstract virtual function implementations required by base abstract class virtual bool Death(Mob* killerMob, int32 damage, uint16 spell_id, EQEmu::skills::SkillType attack_skill); virtual void Damage(Mob* from, int32 damage, uint16 spell_id, EQEmu::skills::SkillType attack_skill, bool avoidable = true, int8 buffslot = -1, bool iBuffTic = false, eSpecialAttacks special = eSpecialAttacks::None); @@ -1464,6 +1467,7 @@ private: uint32 tmSitting; // time stamp started sitting, used for HP regen bonus added on MAY 5, 2004 bool display_mob_info_window; + bool dev_tools_window_enabled; int32 max_end; int32 current_endurance; diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 84f486055..62cfebb42 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -47,6 +47,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "../common/spdat.h" #include "../common/string_util.h" #include "../common/zone_numbers.h" +#include "data_bucket.h" #include "event_codes.h" #include "guild_mgr.h" #include "merc.h" @@ -1746,6 +1747,15 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app) /* Task Packets */ LoadClientTaskState(); + /** + * DevTools Load Settings + */ + if (Admin() > 200) { + std::string dev_tools_window_key = StringFormat("%i-dev-tools-window-disabled", AccountID()); + if (DataBucket::GetData(dev_tools_window_key) == "true") { + dev_tools_window_enabled = false; + } + } if (m_ClientVersionBit & EQEmu::versions::bit_UFAndLater) { outapp = new EQApplicationPacket(OP_XTargetResponse, 8); diff --git a/zone/command.cpp b/zone/command.cpp index 737e2eaf0..b4ee8a575 100755 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -55,7 +55,7 @@ #include "../say_link.h" #include "../common/eqemu_logsys.h" - +#include "data_bucket.h" #include "command.h" #include "guild_mgr.h" #include "map.h" @@ -185,6 +185,7 @@ int command_init(void) command_add("delpetition", "[petition number] - Delete a petition", 20, command_delpetition) || command_add("depop", "- Depop your NPC target", 50, command_depop) || command_add("depopzone", "- Depop the zone", 100, command_depopzone) || + command_add("devtools", "- Manages devtools", 200, command_devtools) || command_add("details", "- Change the details of your target (Drakkin Only)", 80, command_details) || command_add("disablerecipe", "[recipe_id] - Disables a recipe using the recipe id.", 80, command_disablerecipe) || command_add("disarmtrap", "Analog for ldon disarm trap for the newer clients since we still don't have it working.", 80, command_disarmtrap) || @@ -4600,6 +4601,49 @@ void command_depopzone(Client *c, const Seperator *sep) c->Message(0, "Zone depoped."); } +void command_devtools(Client *c, const Seperator *sep) +{ + std::string menu_commands_search; + std::string window_toggle_command; + + /** + * Search entity commands + */ + menu_commands_search += "[" + EQEmu::SayLinkEngine::GenerateQuestSaylink("#list npcs", false, "NPC") + "] "; + menu_commands_search += "[" + EQEmu::SayLinkEngine::GenerateQuestSaylink("#list players", false, "Players") + "] "; + menu_commands_search += "[" + EQEmu::SayLinkEngine::GenerateQuestSaylink("#list corpses", false, "Corpses") + "] "; + menu_commands_search += "[" + EQEmu::SayLinkEngine::GenerateQuestSaylink("#list doors", false, "Doors") + "] "; + menu_commands_search += "[" + EQEmu::SayLinkEngine::GenerateQuestSaylink("#list objects", false, "Objects") + "] "; + + std::string dev_tools_window_key = StringFormat("%i-dev-tools-window-disabled", c->AccountID()); + + /** + * Handle window toggle + */ + if (strcasecmp(sep->arg[1], "disable_window") == 0) { + DataBucket::SetData(dev_tools_window_key, "true"); + c->SetDevToolsWindowEnabled(false); + } + if (strcasecmp(sep->arg[1], "enable_window") == 0) { + DataBucket::DeleteData(dev_tools_window_key); + c->SetDevToolsWindowEnabled(true); + } + + /** + * Show window status + */ + window_toggle_command = "Disabled [" + EQEmu::SayLinkEngine::GenerateQuestSaylink("#devtools enable_window", false, "Enable") + "] "; + if (c->IsDevToolsWindowEnabled()) { + window_toggle_command = "Enabled [" + EQEmu::SayLinkEngine::GenerateQuestSaylink("#devtools disable_window", false, "Disable") + "] "; + } + + /** + * Print menu + */ + c->Message(0, "| [Devtools] Window %s", window_toggle_command.c_str()); + c->Message(0, "| [Devtools] Search %s", menu_commands_search.c_str()); +} + void command_repop(Client *c, const Seperator *sep) { int timearg = 1; diff --git a/zone/command.h b/zone/command.h index 735cf1f70..f9a2e7c31 100644 --- a/zone/command.h +++ b/zone/command.h @@ -84,6 +84,7 @@ void command_deletegraveyard(Client *c, const Seperator *sep); void command_delpetition(Client *c, const Seperator *sep); void command_depop(Client *c, const Seperator *sep); void command_depopzone(Client *c, const Seperator *sep); +void command_devtools(Client *c, const Seperator *sep); void command_details(Client *c, const Seperator *sep); void command_disablerecipe(Client *c, const Seperator *sep); void command_disarmtrap(Client *c, const Seperator *sep); diff --git a/zone/mob_info.cpp b/zone/mob_info.cpp index 5c63dc0ad..84b38ec49 100644 --- a/zone/mob_info.cpp +++ b/zone/mob_info.cpp @@ -630,10 +630,15 @@ void Mob::DisplayInfo(Mob *mob) } if (this->IsClient()) { + std::string window_text = "*Drag window open vertically to see all
"; Client *client = this->CastToClient(); + if (!client->IsDevToolsWindowEnabled()) { + return; + } + std::vector info_attributes = { "name", "race", diff --git a/zone/npc_scale_manager.cpp b/zone/npc_scale_manager.cpp index 66153bd55..130f8c601 100644 --- a/zone/npc_scale_manager.cpp +++ b/zone/npc_scale_manager.cpp @@ -449,7 +449,7 @@ std::string NpcScaleManager::GetNPCScalingTypeName(NPC *&npc) /** * Determines based on minimum criteria if NPC is auto scaled for certain things to be scaled like * special abilities. We use this so we don't blindly assume we want things to be applied - * + * * @param npc * @return */ From a9fc1d89c8f72cee5f24b3dccc1586b83eb06fe7 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 16 Dec 2018 04:21:37 -0600 Subject: [PATCH 475/670] Update eqemu_logsys.cpp --- common/eqemu_logsys.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/common/eqemu_logsys.cpp b/common/eqemu_logsys.cpp index 9f05654e0..89728c809 100644 --- a/common/eqemu_logsys.cpp +++ b/common/eqemu_logsys.cpp @@ -112,12 +112,7 @@ void EQEmuLogSys::LoadLogSettingsDefaults() * Get Executable platform currently running this code (Zone/World/etc) */ log_platform = GetExecutablePlatformInt(); - - /** - * Zero out Array - */ - memset(log_settings, 0, sizeof(LogSettings) * Logs::LogCategory::MaxCategoryID); - + for (int log_category_id = Logs::AA; log_category_id != Logs::MaxCategoryID; log_category_id++) { log_settings[log_category_id].log_to_console = 0; log_settings[log_category_id].log_to_file = 0; From bbbee6e6b24e5657c00162d6de43d9e9cbd0dc3d Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Mon, 17 Dec 2018 00:51:18 -0500 Subject: [PATCH 476/670] Fix some bard stacking issues (mainly AE DOT) Please report if it breaks anything (shouldn't) --- common/spdat.cpp | 14 ++++++++++++++ common/spdat.h | 1 + zone/spells.cpp | 4 ++++ 3 files changed, 19 insertions(+) diff --git a/common/spdat.cpp b/common/spdat.cpp index a5764a625..cb41c5158 100644 --- a/common/spdat.cpp +++ b/common/spdat.cpp @@ -1122,6 +1122,20 @@ bool IsStackableDot(uint16 spell_id) return IsEffectInSpell(spell_id, SE_CurrentHP) || IsEffectInSpell(spell_id, SE_GravityEffect); } +bool IsBardOnlyStackEffect(int effect) +{ + switch(effect) { + case SE_CurrentMana: + case SE_ManaRegen_v2: + case SE_CurrentHP: + case SE_HealOverTime: + case SE_BardAEDot: + return true; + default: + return false; + } +} + bool IsCastWhileInvis(uint16 spell_id) { if (!IsValidSpell(spell_id)) diff --git a/common/spdat.h b/common/spdat.h index c6aab7e7e..cb9a301d8 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -968,6 +968,7 @@ uint32 GetPartialMeleeRuneAmount(uint32 spell_id); uint32 GetPartialMagicRuneAmount(uint32 spell_id); bool NoDetrimentalSpellAggro(uint16 spell_id); bool IsStackableDot(uint16 spell_id); +bool IsBardOnlyStackEffect(int effect); bool IsCastWhileInvis(uint16 spell_id); bool IsEffectIgnoredInStacking(int spa); diff --git a/zone/spells.cpp b/zone/spells.cpp index 1cb920786..d3ac9b503 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -3021,6 +3021,10 @@ int Mob::CheckStackConflict(uint16 spellid1, int caster_level1, uint16 spellid2, if(effect1 != effect2) continue; + if (IsBardOnlyStackEffect(effect1) && GetSpellLevel(spellid1, BARD) != 255 && + GetSpellLevel(spellid2, BARD) != 255) + continue; + // big ol' list according to the client, wasn't that nice! if (IsEffectIgnoredInStacking(effect1)) continue; From 6b18c71c11531c1ff2db01851c54b693b9b8f36f Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 17 Dec 2018 00:35:08 -0600 Subject: [PATCH 477/670] Changelog --- changelog.txt | 23 +++++++++++++++++++++++ common/version.h | 2 +- utils/sql/db_update_manifest.txt | 1 + zone/client_packet.cpp | 4 ++-- zone/mob_info.cpp | 3 ++- 5 files changed, 29 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index af3d6e7a8..cf052e03d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,28 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 12/16/2018 == +Akkadius: + - Implemented: Global Base Scaling: https://github.com/EQEmu/Server/wiki/NPC-Scaling + - Implemented: Beginning of DevTools - more to be added over time (Status >= 200) + - Display NPC info on target + - Display Client info on target + - Display NPC show commands on target + - Loot + - Grids + - Emotes + - Implemented: Support for saylinks to be used in GM commands + - Deprecated: Commands + - #listnpcs + - Implemented: Commands + - #list [npcs|players|corpses|doors|objects] [search] + - Provides clickable saylinks to go to entities + - #scale [static/dynamic] (With targeted NPC) + - #scale [npc_name_search] [static/dynamic] (To make zone-wide changes) + - #scale all [static/dynamic] + - #devtools (alias #dev) + - Implemented: New Logging categories automatically injected into `logsys_categories` table + - Fixed an issue where newly injected categories were turned on by default + == 12/15/2018 == Kinglykrab: Added multiple new instance related quest functions. 1. quest::GetInstanceIDByCharID(const char *zone, int16 version, uint32 char_id) diff --git a/common/version.h b/common/version.h index baead2fe2..8c5b98562 100644 --- a/common/version.h +++ b/common/version.h @@ -30,7 +30,7 @@ Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt */ -#define CURRENT_BINARY_DATABASE_VERSION 9131 +#define CURRENT_BINARY_DATABASE_VERSION 9132 #ifdef BOTS #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9021 #else diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index a203b825b..c9c74966c 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -385,6 +385,7 @@ 9129|2018_08_13_inventory_update.sql|SHOW TABLES LIKE 'inventory_versions'|empty| 9130|2018_11_25_name_filter_update.sql|SHOW COLUMNS FROM `name_filter` LIKE 'id'|empty| 9131|2018_12_13_spell_buckets.sql|SHOW TABLES LIKE 'spell_buckets'|empty| +9132|2018_12_16_global_base_scaling.sql|SHOW TABLES LIKE 'npc_scale_global_base'|empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index c6eb23f20..0eaac4095 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -1759,7 +1759,7 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app) /** * DevTools Load Settings */ - if (Admin() > 200) { + if (Admin() >= 200) { std::string dev_tools_window_key = StringFormat("%i-dev-tools-window-disabled", AccountID()); if (DataBucket::GetData(dev_tools_window_key) == "true") { dev_tools_window_enabled = false; @@ -10932,7 +10932,7 @@ void Client::Handle_OP_PopupResponse(const EQApplicationPacket *app) case EQEmu::popupresponse::MOB_INFO_DISMISS: this->SetDisplayMobInfoWindow(false); - this->Message(15, "GM Mob display window snoozed in this zone..."); + this->Message(15, "[DevTools] Window snoozed in this zone..."); break; default: break; diff --git a/zone/mob_info.cpp b/zone/mob_info.cpp index 84b38ec49..21e7ed5bb 100644 --- a/zone/mob_info.cpp +++ b/zone/mob_info.cpp @@ -619,7 +619,8 @@ inline void NPCCommandsMenu(Client* client, NPC* npc) } if (menu_commands.length() > 0) { - client->Message(0, "| [Show Commands] %s", menu_commands.c_str()); + std::string dev_menu = "[" + EQEmu::SayLinkEngine::GenerateQuestSaylink("#devtools", false, "DevTools") + "] ";; + client->Message(0, "| %s [Show Commands] %s", dev_menu.c_str(), menu_commands.c_str()); } } From bbec352a80dc8217d8cd5e3a4e8808de7a70d668 Mon Sep 17 00:00:00 2001 From: Chris Miles Date: Mon, 17 Dec 2018 01:19:02 -0600 Subject: [PATCH 478/670] Update system_tables.txt [skip ci] --- utils/sql/system_tables.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/sql/system_tables.txt b/utils/sql/system_tables.txt index fccb0e0c8..e3eb0cdcc 100644 --- a/utils/sql/system_tables.txt +++ b/utils/sql/system_tables.txt @@ -64,6 +64,7 @@ name_filter npc_emotes npc_faction npc_faction_entries +npc_scale_global_base npc_spells npc_spells_effects npc_spells_effects_entries From 07ab96b883b4465028399d40205f233f012a54e9 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 17 Dec 2018 01:51:43 -0600 Subject: [PATCH 479/670] Post merge adjustments --- zone/mob.cpp | 156 +++++++++++++++++++++++++-------------------------- 1 file changed, 78 insertions(+), 78 deletions(-) diff --git a/zone/mob.cpp b/zone/mob.cpp index 9688cca16..9a307ed53 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -40,81 +40,82 @@ extern EntityList entity_list; extern Zone* zone; extern WorldServer worldserver; -Mob::Mob(const char* in_name, - const char* in_lastname, - int32 in_cur_hp, - int32 in_max_hp, - uint8 in_gender, - uint16 in_race, - uint8 in_class, - bodyType in_bodytype, - uint8 in_deity, - uint8 in_level, - uint32 in_npctype_id, - float in_size, - float in_runspeed, - const glm::vec4& position, - uint8 in_light, - uint8 in_texture, - uint8 in_helmtexture, - uint16 in_ac, - uint16 in_atk, - uint16 in_str, - uint16 in_sta, - uint16 in_dex, - uint16 in_agi, - uint16 in_int, - uint16 in_wis, - uint16 in_cha, - uint8 in_haircolor, - uint8 in_beardcolor, - uint8 in_eyecolor1, // the eyecolors always seem to be the same, maybe left and right eye? - uint8 in_eyecolor2, - uint8 in_hairstyle, - uint8 in_luclinface, - uint8 in_beard, - uint32 in_drakkin_heritage, - uint32 in_drakkin_tattoo, - uint32 in_drakkin_details, - EQEmu::TintProfile in_armor_tint, - uint8 in_aa_title, - uint8 in_see_invis, // see through invis/ivu - uint8 in_see_invis_undead, - uint8 in_see_hide, - uint8 in_see_improved_hide, - int32 in_hp_regen, - int32 in_mana_regen, - uint8 in_qglobal, - uint8 in_maxlevel, - uint32 in_scalerate, - uint8 in_armtexture, - uint8 in_bracertexture, - uint8 in_handtexture, - uint8 in_legtexture, - uint8 in_feettexture - ) : - attack_timer(2000), - attack_dw_timer(2000), - ranged_timer(2000), - tic_timer(6000), - mana_timer(2000), - spellend_timer(0), - rewind_timer(30000), - bindwound_timer(10000), - stunned_timer(0), - spun_timer(0), - bardsong_timer(6000), - gravity_timer(1000), - viral_timer(0), - m_FearWalkTarget(-999999.0f, -999999.0f, -999999.0f), - flee_timer(FLEE_CHECK_TIMER), - m_Position(position), - tmHidden(-1), - mitigation_ac(0), - m_specialattacks(eSpecialAttacks::None), - attack_anim_timer(1000), - position_update_melee_push_timer(500), - hate_list_cleanup_timer(6000) +Mob::Mob( + const char *in_name, + const char *in_lastname, + int32 in_cur_hp, + int32 in_max_hp, + uint8 in_gender, + uint16 in_race, + uint8 in_class, + bodyType in_bodytype, + uint8 in_deity, + uint8 in_level, + uint32 in_npctype_id, + float in_size, + float in_runspeed, + const glm::vec4 &position, + uint8 in_light, + uint8 in_texture, + uint8 in_helmtexture, + uint16 in_ac, + uint16 in_atk, + uint16 in_str, + uint16 in_sta, + uint16 in_dex, + uint16 in_agi, + uint16 in_int, + uint16 in_wis, + uint16 in_cha, + uint8 in_haircolor, + uint8 in_beardcolor, + uint8 in_eyecolor1, // the eyecolors always seem to be the same, maybe left and right eye? + uint8 in_eyecolor2, + uint8 in_hairstyle, + uint8 in_luclinface, + uint8 in_beard, + uint32 in_drakkin_heritage, + uint32 in_drakkin_tattoo, + uint32 in_drakkin_details, + EQEmu::TintProfile in_armor_tint, + uint8 in_aa_title, + uint8 in_see_invis, // see through invis/ivu + uint8 in_see_invis_undead, + uint8 in_see_hide, + uint8 in_see_improved_hide, + int32 in_hp_regen, + int32 in_mana_regen, + uint8 in_qglobal, + uint8 in_maxlevel, + uint32 in_scalerate, + uint8 in_armtexture, + uint8 in_bracertexture, + uint8 in_handtexture, + uint8 in_legtexture, + uint8 in_feettexture +) : + attack_timer(2000), + attack_dw_timer(2000), + ranged_timer(2000), + tic_timer(6000), + mana_timer(2000), + spellend_timer(0), + rewind_timer(30000), + bindwound_timer(10000), + stunned_timer(0), + spun_timer(0), + bardsong_timer(6000), + gravity_timer(1000), + viral_timer(0), + m_FearWalkTarget(-999999.0f, -999999.0f, -999999.0f), + flee_timer(FLEE_CHECK_TIMER), + m_Position(position), + tmHidden(-1), + mitigation_ac(0), + m_specialattacks(eSpecialAttacks::None), + attack_anim_timer(1000), + position_update_melee_push_timer(500), + hate_list_cleanup_timer(6000) { mMovementManager = &MobMovementManager::Get(); mMovementManager->AddMob(this); @@ -122,8 +123,6 @@ Mob::Mob(const char* in_name, targeted = 0; currently_fleeing = false; - currently_fleeing = false; - AI_Init(); SetMoving(false); moved = false; @@ -161,6 +160,7 @@ Mob::Mob(const char* in_name, // neotokyo: sanity check if (runspeed < 0 || runspeed > 20) { runspeed = 1.25f; + } // clients -- todo movement this doesn't take into account gm speed we need to fix that. @@ -393,7 +393,7 @@ Mob::Mob(const char* in_name, rooted = false; charmed = false; has_virus = false; - for (i = 0; i < MAX_SPELL_TRIGGER * 2; i++) { + for (int i = 0; i < MAX_SPELL_TRIGGER * 2; i++) { viral_spells[i] = 0; } From 688e37f10857341cd3f7864f1372e60e60e9e05a Mon Sep 17 00:00:00 2001 From: Noudess Date: Tue, 18 Dec 2018 10:58:01 -0500 Subject: [PATCH 480/670] Changes to accomodate the new raw faction data. --- common/faction.cpp | 16 ++++++++-------- common/faction.h | 4 ++++ utils/sql/db_update_manifest.txt | 2 ++ zone/zonedb.cpp | 32 ++++++++++++++++++++++++++------ 4 files changed, 40 insertions(+), 14 deletions(-) mode change 100644 => 100755 common/faction.h mode change 100644 => 100755 zone/zonedb.cpp diff --git a/common/faction.cpp b/common/faction.cpp index 65524f623..c1d4fe398 100644 --- a/common/faction.cpp +++ b/common/faction.cpp @@ -59,31 +59,31 @@ FACTION_VALUE CalculateFaction(FactionMods* fm, int32 tmpCharacter_value) if (fm) { character_value += fm->base + fm->class_mod + fm->race_mod + fm->deity_mod; } - if (character_value >= 1101) { + if (character_value >= 1100) { return FACTION_ALLY; } - if (character_value >= 701 && character_value <= 1100) { + if (character_value >= 750 && character_value <= 1099) { return FACTION_WARMLY; } - if (character_value >= 401 && character_value <= 700) { + if (character_value >= 500 && character_value <= 749) { return FACTION_KINDLY; } - if (character_value >= 101 && character_value <= 400) { + if (character_value >= 100 && character_value <= 499) { return FACTION_AMIABLE; } - if (character_value >= 0 && character_value <= 100) { + if (character_value >= 0 && character_value <= 99) { return FACTION_INDIFFERENT; } if (character_value >= -100 && character_value <= -1) { return FACTION_APPREHENSIVE; } - if (character_value >= -700 && character_value <= -101) { + if (character_value >= -500 && character_value <= -101) { return FACTION_DUBIOUS; } - if (character_value >= -999 && character_value <= -701) { + if (character_value >= -750 && character_value <= -501) { return FACTION_THREATENLY; } - if (character_value <= -1000) { + if (character_value <= -751) { return FACTION_SCOWLS; } return FACTION_INDIFFERENT; diff --git a/common/faction.h b/common/faction.h old mode 100644 new mode 100755 index c98fc0916..bc086669d --- a/common/faction.h +++ b/common/faction.h @@ -50,6 +50,8 @@ struct NPCFactionList { struct FactionMods { int32 base; + int16 min; // The lowest your personal earned faction can go - before race/class/diety adjustments. + int16 max; // The highest your personal earned faction can go - before race/class/diety adjustments. int32 class_mod; int32 race_mod; int32 deity_mod; @@ -59,6 +61,8 @@ struct Faction { int32 id; std::map mods; int16 base; + int16 min; // The lowest your personal earned faction can go - before race/class/diety adjustments. + int16 max; // The highest your personal earned faction can go - before race/class/diety adjustments. char name[50]; }; diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index 81a8fa2d8..1254b2936 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -384,6 +384,8 @@ 9128|2018_08_13_inventory_version_update.sql|SHOW TABLES LIKE 'inventory_version'|not_empty| 9129|2018_08_13_inventory_update.sql|SHOW TABLES LIKE 'inventory_versions'|empty| 9130|2018_11_25_name_filter_update.sql|SHOW COLUMNS FROM `name_filter` LIKE 'id'|empty| +9131|2018_12_12_client_faction_tables.sql|SHOW TABLES LIKE 'faction_base_data'|empty| +9132|2018_12_12_convert_to_client_functions.sql|SELECT `id` FROM `faction_list` WHERE `id` > 4999 |empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp old mode 100644 new mode 100755 index 5fe6560f1..0cfcf64c3 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -3901,6 +3901,8 @@ bool ZoneDatabase::GetFactionData(FactionMods* fm, uint32 class_mod, uint32 race } fm->base = faction_array[faction_id]->base; + fm->min = faction_array[faction_id]->min; // The lowest your personal earned faction can go - before race/class/diety adjustments. + fm->max = faction_array[faction_id]->max; // The highest your personal earned faction can go - before race/class/diety adjustments. if(class_mod > 0) { char str[32]; @@ -4047,14 +4049,32 @@ bool ZoneDatabase::LoadFactionData() faction_array[index] = new Faction; strn0cpy(faction_array[index]->name, row[1], 50); faction_array[index]->base = atoi(row[2]); + faction_array[index]->min = MIN_PERSONAL_FACTION; + faction_array[index]->max = MAX_PERSONAL_FACTION; - query = StringFormat("SELECT `mod`, `mod_name` FROM `faction_list_mod` WHERE faction_id = %u", index); - auto modResults = QueryDatabase(query); - if (!modResults.Success()) - continue; + // Load in the mimimum and maximum faction that can be earned for this faction + query = StringFormat("SELECT `min` , `max` FROM `faction_base_data` WHERE client_faction_id = %u", index); + auto baseResults = QueryDatabase(query); + if (!baseResults.Success() || baseResults.RowCount() == 0) { + Log(Logs::General, Logs::General, "Faction %d has no base data", (int)index); + } + else { + for (auto modRow = baseResults.begin(); modRow != baseResults.end(); ++modRow) { + faction_array[index]->min = atoi(modRow[0]); + faction_array[index]->max = atoi(modRow[1]); + Log(Logs::General, Logs::None, "Min(%d), Max(%d) for faction (%u)",faction_array[index]->min, faction_array[index]->max, index); + } + } - for (auto modRow = modResults.begin(); modRow != modResults.end(); ++modRow) - faction_array[index]->mods[modRow[1]] = atoi(modRow[0]); + // Load in modifiers to the faction based on characters race, class and diety. + query = StringFormat("SELECT `mod`, `mod_name` FROM `faction_list_mod` WHERE faction_id = %u", index); + auto modResults = QueryDatabase(query); + if (!modResults.Success()) + continue; + + for (auto modRow = modResults.begin(); modRow != modResults.end(); ++modRow) { + faction_array[index]->mods[modRow[1]] = atoi(modRow[0]); + } } return true; From 50997ad0ec86c26b5c71982a11adcde95abb3318 Mon Sep 17 00:00:00 2001 From: Noudess Date: Tue, 18 Dec 2018 11:00:38 -0500 Subject: [PATCH 481/670] New sql with new client data tables and a hand create mapping --- .../2018_12_12_client_faction_tables.sql | 209 ++++++++++++++++++ ...2018_12_12_convert_to_client_functions.sql | 131 +++++++++++ 2 files changed, 340 insertions(+) create mode 100644 utils/sql/git/required/2018_12_12_client_faction_tables.sql create mode 100755 utils/sql/git/required/2018_12_12_convert_to_client_functions.sql diff --git a/utils/sql/git/required/2018_12_12_client_faction_tables.sql b/utils/sql/git/required/2018_12_12_client_faction_tables.sql new file mode 100644 index 000000000..4c2b6a0d0 --- /dev/null +++ b/utils/sql/git/required/2018_12_12_client_faction_tables.sql @@ -0,0 +1,209 @@ +-- MySQL dump 10.13 Distrib 5.7.24, for Linux (x86_64) +-- +-- Host: 192.168.0.3 Database: peqdb +-- ------------------------------------------------------ +-- Server version 5.7.24-0ubuntu0.16.04.1 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `client_faction_associations` +-- + +DROP TABLE IF EXISTS `client_faction_associations`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `client_faction_associations` ( + `faction_id` int(11) NOT NULL, + `other_faction_id` int(11) NOT NULL, + `mod` int(11) DEFAULT NULL, + PRIMARY KEY (`faction_id`,`other_faction_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `client_faction_associations` +-- + +LOCK TABLES `client_faction_associations` WRITE; +/*!40000 ALTER TABLE `client_faction_associations` DISABLE KEYS */; +INSERT INTO `client_faction_associations` VALUES (65,51,-600),(65,52,-600),(65,53,-600),(65,54,-600),(65,55,-600),(65,56,-700),(65,57,-600),(65,58,-600),(65,59,-750),(65,60,-750),(65,61,-600),(65,62,-600),(65,178,-1000),(65,180,-600),(65,661,-600),(65,1106,-600),(106,51,-50),(106,52,-50),(106,56,-500),(106,57,-50),(106,59,-750),(106,60,-750),(106,62,-50),(106,178,-750),(106,180,-50),(106,661,-50),(106,1106,-50),(121,9,-200),(121,56,-200),(121,59,-625),(121,60,-625),(121,178,-725),(217,51,-500),(217,52,-500),(217,53,-500),(217,54,-500),(217,55,-500),(217,56,-500),(217,57,-500),(217,58,-500),(217,59,-500),(217,60,-500),(217,61,-500),(217,62,-500),(217,180,-500),(217,203,-500),(217,661,-500),(217,1106,-500),(218,51,-1000),(218,52,-1000),(218,53,-1000),(218,54,-1000),(218,55,-1000),(218,56,-1000),(218,57,-1000),(218,58,-1000),(218,59,-1000),(218,60,-1000),(218,61,-1000),(218,62,-1000),(218,178,-1000),(218,180,-1000),(218,201,-1000),(218,202,-1000),(218,204,-1000),(218,205,-1000),(218,206,-1000),(218,207,-1000),(218,208,-1000),(218,209,-1000),(218,210,-1000),(218,211,-1000),(218,212,-1000),(218,213,-1000),(218,214,-1000),(218,215,-1000),(218,216,-1000),(218,661,-1000),(218,1106,-1000),(219,56,-200),(219,59,-375),(219,60,-375),(219,178,-375),(220,5,-200),(220,11,-200),(220,12,50),(220,13,50),(220,14,50),(220,51,50),(220,52,-50),(220,54,-50),(220,56,-300),(220,57,50),(220,58,-150),(220,59,-750),(220,60,-750),(220,61,-50),(220,178,-1000),(220,180,-50),(220,201,-200),(220,202,-50),(220,203,-300),(220,205,-50),(220,206,-200),(220,211,-300),(220,213,25),(220,216,-300),(220,661,50),(220,1106,50),(221,3,-750),(221,4,-300),(221,5,50),(221,6,-200),(221,9,-25),(221,11,50),(221,51,50),(221,52,-300),(221,53,-25),(221,54,-300),(221,55,-300),(221,56,-50),(221,57,50),(221,58,-300),(221,59,-300),(221,60,-250),(221,61,-300),(221,62,-25),(221,178,-300),(221,180,-300),(221,201,100),(221,202,-750),(221,203,-15),(221,204,-750),(221,205,-750),(221,206,-15),(221,207,-750),(221,208,-750),(221,209,-750),(221,210,-750),(221,211,-750),(221,212,-750),(221,213,-750),(221,214,-750),(221,215,-750),(221,216,-750),(221,661,50),(221,1106,50),(222,51,-750),(222,52,-750),(222,53,-750),(222,54,-750),(222,55,-750),(222,56,-400),(222,57,-750),(222,58,-750),(222,59,50),(222,60,-200),(222,61,-750),(222,62,-750),(222,178,-750),(222,180,-750),(222,201,50),(222,203,50),(222,206,50),(222,661,-750),(222,1106,-750),(223,3,-100),(223,4,-100),(223,5,-50),(223,6,-100),(223,7,-100),(223,8,-25),(223,9,50),(223,10,-100),(223,11,-50),(223,12,-100),(223,13,-100),(223,14,-100),(223,15,-100),(223,51,50),(223,52,-25),(223,53,-75),(223,54,-50),(223,55,-300),(223,56,-50),(223,57,50),(223,58,-150),(223,59,-750),(223,60,-500),(223,61,-50),(223,62,-75),(223,178,-750),(223,180,-25),(223,202,-100),(223,203,-300),(223,204,-100),(223,205,50),(223,206,-200),(223,208,-100),(223,209,-100),(223,210,-100),(223,211,-100),(223,213,-100),(223,214,-200),(223,215,-100),(223,216,-200),(223,661,50),(223,1106,50),(225,51,-875),(225,52,-875),(225,53,-875),(225,54,-875),(225,55,-875),(225,56,-875),(225,57,-875),(225,58,-875),(225,59,-625),(225,60,-625),(225,61,-875),(225,62,-875),(225,178,-875),(225,180,-875),(225,661,-875),(225,1106,-875),(226,5,-200),(226,11,-200),(226,56,-50),(226,59,-100),(226,60,-100),(226,62,-10),(226,178,-200),(226,201,-200),(226,203,-200),(226,206,-200),(226,207,10),(226,215,100),(226,216,-100),(227,5,-200),(227,11,-200),(227,51,-10),(227,52,-10),(227,54,-10),(227,55,-10),(227,56,-100),(227,57,-10),(227,59,-100),(227,60,-100),(227,178,-200),(227,180,-10),(227,201,-200),(227,202,100),(227,203,-200),(227,205,10),(227,206,-200),(227,216,-200),(227,661,-10),(227,1106,-10),(228,51,-750),(228,52,-750),(228,54,-750),(228,55,-750),(228,56,-25),(228,57,-750),(228,59,-1000),(228,61,-750),(228,62,-750),(228,178,-1000),(228,180,-750),(228,661,-750),(228,1106,-750),(229,9,-200),(229,56,-200),(229,59,-375),(229,60,-375),(229,178,-375),(230,3,-100),(230,4,-100),(230,6,-100),(230,7,-100),(230,9,-10),(230,10,-100),(230,11,-50),(230,15,-100),(230,51,50),(230,52,-50),(230,53,-150),(230,54,-200),(230,55,-200),(230,56,-150),(230,58,-200),(230,59,-850),(230,60,-750),(230,61,-150),(230,62,-50),(230,178,-1000),(230,180,-50),(230,201,50),(230,202,-25),(230,203,-25),(230,204,-25),(230,205,-25),(230,207,-25),(230,208,-25),(230,209,-25),(230,210,-25),(230,211,-25),(230,212,-25),(230,213,-25),(230,214,-100),(230,215,-25),(230,661,50),(230,1106,50),(231,1,-50),(231,4,-50),(231,5,-200),(231,6,-50),(231,7,-50),(231,8,-50),(231,9,-50),(231,10,-50),(231,11,-200),(231,14,50),(231,15,-50),(231,16,-50),(231,51,-100),(231,52,-100),(231,53,50),(231,54,-100),(231,55,-50),(231,56,-300),(231,57,-100),(231,58,-150),(231,59,-750),(231,60,-750),(231,61,-100),(231,62,-100),(231,178,-750),(231,180,-100),(231,201,-200),(231,202,-100),(231,203,-300),(231,204,-50),(231,205,-100),(231,206,-200),(231,207,-50),(231,208,-50),(231,211,-300),(231,212,-50),(231,213,-50),(231,214,-50),(231,215,-50),(231,216,-300),(231,661,-100),(231,1106,-100),(232,1,50),(232,5,-50),(232,51,-501),(232,52,-750),(232,53,-501),(232,54,-750),(232,55,-750),(232,56,-10),(232,57,-750),(232,58,-1000),(232,59,-499),(232,60,50),(232,61,-750),(232,62,-501),(232,178,-750),(232,180,-750),(232,201,-50),(232,202,-500),(232,203,50),(232,204,-500),(232,205,-500),(232,207,-500),(232,208,-500),(232,209,-500),(232,210,-500),(232,211,50),(232,212,-500),(232,213,-500),(232,214,-100),(232,215,-500),(232,661,-501),(232,1106,-501),(233,1,-50),(233,4,-50),(233,5,-200),(233,6,-50),(233,7,-50),(233,8,-50),(233,9,-50),(233,10,-50),(233,11,-200),(233,12,50),(233,15,-50),(233,16,-50),(233,51,-100),(233,52,-100),(233,53,50),(233,54,-100),(233,55,-25),(233,56,-300),(233,57,-100),(233,58,-150),(233,59,-750),(233,60,-750),(233,61,-100),(233,62,-15),(233,178,-750),(233,180,-100),(233,201,-200),(233,202,-50),(233,203,-300),(233,204,-50),(233,205,-50),(233,206,-200),(233,207,-50),(233,208,-50),(233,211,-50),(233,212,-50),(233,214,-50),(233,215,-50),(233,216,-300),(233,661,-100),(233,1106,-100),(234,51,-750),(234,52,-750),(234,53,-750),(234,54,-1000),(234,55,-1000),(234,56,-490),(234,57,-750),(234,58,-750),(234,59,-750),(234,60,-750),(234,61,-750),(234,62,-750),(234,178,-750),(234,180,-750),(234,661,-750),(234,1106,-750),(235,1,50),(235,5,-200),(235,51,-1000),(235,52,-1000),(235,53,-1000),(235,54,-1000),(235,55,-1000),(235,56,-250),(235,57,-1000),(235,58,-1000),(235,59,50),(235,60,-200),(235,61,-1000),(235,62,-1000),(235,178,-1000),(235,180,-1000),(235,201,-100),(235,202,-200),(235,203,50),(235,204,-100),(235,205,-100),(235,206,50),(235,207,-100),(235,208,-100),(235,209,-100),(235,210,-100),(235,211,100),(235,212,-100),(235,213,-100),(235,214,-50),(235,215,-200),(235,661,-1000),(235,1106,-1000),(236,3,-600),(236,4,-600),(236,5,50),(236,6,-600),(236,7,-10),(236,8,-10),(236,9,-25),(236,10,-10),(236,11,50),(236,15,-10),(236,16,-10),(236,51,-50),(236,52,-50),(236,53,-10),(236,54,-90),(236,55,-99),(236,56,50),(236,57,-75),(236,58,-50),(236,59,-50),(236,60,-50),(236,61,-50),(236,62,-50),(236,178,-50),(236,180,-50),(236,202,-200),(236,204,-200),(236,205,-10),(236,206,50),(236,207,-200),(236,208,-200),(236,209,-50),(236,210,-300),(236,212,-50),(236,214,-200),(236,215,-300),(236,661,-50),(236,1106,-50),(237,3,-1000),(237,4,-1000),(237,5,50),(237,6,-1000),(237,11,25),(237,51,-500),(237,52,-750),(237,53,-500),(237,54,-750),(237,55,-750),(237,56,-50),(237,57,-750),(237,58,-750),(237,59,50),(237,60,-500),(237,61,-750),(237,62,-500),(237,178,-750),(237,180,-750),(237,201,-50),(237,202,-600),(237,203,50),(237,204,-600),(237,205,-600),(237,206,50),(237,207,-600),(237,208,-600),(237,209,-600),(237,210,-600),(237,211,-50),(237,212,-600),(237,213,-600),(237,214,-600),(237,215,-600),(237,216,-300),(237,661,-500),(237,1106,-500),(238,3,-200),(238,4,-200),(238,5,50),(238,9,50),(238,11,50),(238,12,50),(238,13,50),(238,14,50),(238,51,-25),(238,52,-50),(238,53,-10),(238,54,-50),(238,55,-100),(238,57,-75),(238,58,-100),(238,59,-75),(238,60,-50),(238,61,-100),(238,62,50),(238,178,-150),(238,180,-50),(238,201,100),(238,202,-100),(238,203,25),(238,204,-100),(238,205,-100),(238,206,25),(238,207,-100),(238,208,-100),(238,209,-100),(238,210,-200),(238,212,-450),(238,213,-50),(238,214,-200),(238,215,-300),(238,216,25),(238,661,-25),(238,1106,-25),(239,3,-750),(239,4,-500),(239,5,50),(239,6,-500),(239,11,50),(239,12,-200),(239,13,-200),(239,14,-200),(239,51,-50),(239,52,-100),(239,53,-25),(239,54,-500),(239,55,-500),(239,56,50),(239,57,-500),(239,58,-500),(239,59,-400),(239,60,-450),(239,61,-100),(239,62,-100),(239,178,-500),(239,180,-100),(239,201,-25),(239,202,-200),(239,203,-25),(239,204,-200),(239,205,-200),(239,206,50),(239,207,-200),(239,208,-200),(239,209,-200),(239,210,-200),(239,211,-100),(239,212,-200),(239,213,-200),(239,214,-200),(239,215,-750),(239,216,-200),(239,661,-50),(239,1106,-50),(240,1,50),(240,2,50),(240,3,50),(240,5,-200),(240,9,50),(240,11,-200),(240,16,50),(240,51,-50),(240,52,-50),(240,53,-50),(240,55,-50),(240,56,-250),(240,59,-500),(240,60,-450),(240,62,50),(240,178,-500),(240,180,-50),(240,201,-200),(240,202,100),(240,205,100),(240,206,-200),(240,209,50),(240,216,50),(240,661,-50),(240,1106,-50),(241,3,-50),(241,5,-50),(241,9,50),(241,11,-25),(241,51,-50),(241,52,-50),(241,53,-75),(241,54,-25),(241,55,-75),(241,56,-200),(241,57,-50),(241,58,-50),(241,59,-800),(241,60,-600),(241,61,50),(241,62,-25),(241,178,-800),(241,180,-50),(241,201,-50),(241,205,25),(241,206,-100),(241,208,-25),(241,210,10),(241,214,-100),(241,216,-75),(241,661,-50),(241,1106,-50),(242,3,50),(242,5,-200),(242,9,-50),(242,11,-200),(242,51,-150),(242,52,-200),(242,53,50),(242,54,-50),(242,55,-30),(242,56,-500),(242,57,-140),(242,58,-300),(242,59,-750),(242,60,-750),(242,61,-150),(242,62,-40),(242,178,-1000),(242,180,-200),(242,201,-200),(242,203,-200),(242,206,-200),(242,209,100),(242,661,-150),(242,1106,-150),(243,5,-200),(243,11,-200),(243,56,-100),(243,59,-100),(243,60,-100),(243,178,-100),(244,3,-500),(244,4,-200),(244,6,-200),(244,7,-200),(244,9,50),(244,11,50),(244,51,-200),(244,52,-300),(244,53,-300),(244,54,-600),(244,55,-600),(244,56,50),(244,57,-600),(244,58,-600),(244,59,-100),(244,60,-150),(244,61,-600),(244,62,-150),(244,178,-600),(244,180,-300),(244,201,25),(244,202,-150),(244,203,25),(244,204,-600),(244,205,25),(244,206,50),(244,207,-600),(244,208,-600),(244,209,-600),(244,210,-600),(244,212,-300),(244,213,-25),(244,214,-600),(244,215,-600),(244,216,-25),(244,661,-200),(244,1106,-200),(245,1,-25),(245,2,-25),(245,3,-25),(245,4,-25),(245,5,-200),(245,6,-25),(245,7,-25),(245,8,-25),(245,9,-100),(245,10,-25),(245,11,-50),(245,12,50),(245,13,50),(245,14,50),(245,15,-25),(245,16,-25),(245,51,-25),(245,52,-50),(245,53,-25),(245,54,-25),(245,55,-25),(245,56,-500),(245,57,-25),(245,58,-25),(245,59,-800),(245,60,-750),(245,61,-10),(245,62,50),(245,178,-800),(245,180,-50),(245,201,-200),(245,202,50),(245,203,-300),(245,206,-300),(245,213,50),(245,661,-25),(245,1106,-25),(246,4,50),(246,5,-200),(246,11,-200),(246,51,-10),(246,52,-10),(246,54,50),(246,55,50),(246,56,-750),(246,57,50),(246,58,-25),(246,59,-750),(246,60,-750),(246,61,-10),(246,62,-10),(246,178,-750),(246,180,-10),(246,201,-300),(246,203,-400),(246,206,-600),(246,215,50),(246,661,-10),(246,1106,-10),(247,3,-1000),(247,4,-1000),(247,6,-1000),(247,51,-1000),(247,52,-1000),(247,53,-1000),(247,54,-1000),(247,55,-1000),(247,56,-1000),(247,57,-1000),(247,58,-1000),(247,59,-1000),(247,60,-1000),(247,61,-1000),(247,62,-1000),(247,178,-1000),(247,180,-1000),(247,661,-1000),(247,1106,-1000),(248,5,-1000),(248,11,-1000),(248,51,-25),(248,52,-50),(248,53,-50),(248,56,-1000),(248,58,-25),(248,59,-1000),(248,60,-1000),(248,61,-10),(248,62,-10),(248,178,-1000),(248,180,-50),(248,201,-1000),(248,203,-1000),(248,206,-1000),(248,209,50),(248,211,-25),(248,215,50),(248,216,-25),(248,661,-25),(248,1106,-25),(249,51,-2000),(249,52,-2000),(249,53,-2000),(249,54,-2000),(249,55,-2000),(249,56,-2000),(249,57,-2000),(249,58,-2000),(249,59,-2000),(249,60,-2000),(249,61,-2000),(249,62,-2000),(249,178,-1000),(249,180,-2000),(249,661,-2000),(249,1106,-2000),(250,51,-1000),(250,52,-1000),(250,53,-1000),(250,54,-1000),(250,55,-1000),(250,56,-1000),(250,57,-1000),(250,58,-1000),(250,59,-1000),(250,60,-1000),(250,61,-1000),(250,62,-1000),(250,178,-1000),(250,180,-1000),(250,661,-1000),(250,1106,-1000),(251,51,-499),(251,52,-499),(251,53,-499),(251,54,-499),(251,55,-499),(251,56,-650),(251,57,-499),(251,58,-499),(251,59,-1000),(251,60,-750),(251,61,-499),(251,62,-499),(251,178,-1000),(251,180,-499),(251,201,-1000),(251,203,-1000),(251,206,-1000),(251,211,-250),(251,661,-499),(251,1106,-499),(252,51,-1000),(252,52,-1000),(252,53,-1000),(252,54,-1000),(252,55,-1000),(252,56,-1000),(252,57,-1000),(252,58,-1000),(252,59,-1000),(252,60,-1000),(252,61,-1000),(252,62,-1000),(252,178,-1000),(252,180,-1000),(252,661,-1000),(252,1106,-1000),(253,51,-1000),(253,52,-1000),(253,53,-1000),(253,54,-1000),(253,55,-1000),(253,56,-1000),(253,57,-1000),(253,58,-1000),(253,59,-1000),(253,60,-1000),(253,61,-1000),(253,62,-1000),(253,178,-1000),(253,180,-1000),(253,661,-1000),(253,1106,-1000),(254,1,-50),(254,2,-50),(254,3,-50),(254,4,-50),(254,5,-200),(254,6,-50),(254,7,-50),(254,8,-50),(254,9,-50),(254,10,-50),(254,11,-200),(254,13,50),(254,15,-50),(254,16,-50),(254,51,-50),(254,52,-100),(254,53,50),(254,54,-50),(254,55,-10),(254,56,-500),(254,57,-25),(254,58,-150),(254,59,-750),(254,60,-750),(254,61,-100),(254,62,-25),(254,178,-750),(254,180,-100),(254,201,-200),(254,202,-50),(254,203,-300),(254,204,-50),(254,205,-50),(254,206,-200),(254,207,-50),(254,208,-50),(254,211,-50),(254,212,-50),(254,213,-50),(254,214,-50),(254,215,-50),(254,216,-150),(254,661,-50),(254,1106,-50),(255,1,50),(255,3,50),(255,4,50),(255,5,-200),(255,6,50),(255,11,-200),(255,16,50),(255,51,-50),(255,52,-100),(255,53,-50),(255,54,-25),(255,55,-50),(255,56,-500),(255,57,-50),(255,58,-25),(255,59,-850),(255,60,-750),(255,61,-10),(255,62,50),(255,178,-1000),(255,180,-100),(255,201,-200),(255,202,50),(255,203,-400),(255,204,-10),(255,205,50),(255,206,-400),(255,207,-10),(255,208,-10),(255,209,-10),(255,210,-10),(255,211,50),(255,212,-10),(255,213,-10),(255,214,-10),(255,215,-10),(255,216,-10),(255,661,-50),(255,1106,-50),(256,51,-1000),(256,52,-1000),(256,53,-1000),(256,54,-1000),(256,55,-1000),(256,56,-1000),(256,57,-1000),(256,58,-1000),(256,59,-1000),(256,60,-1000),(256,61,-1000),(256,62,-1000),(256,178,-1000),(256,180,-1000),(256,661,-1000),(256,1106,-1000),(257,51,-1000),(257,52,-1000),(257,53,-1000),(257,54,-1000),(257,55,-1000),(257,56,-1000),(257,57,-1000),(257,58,-1000),(257,59,-1000),(257,60,-1000),(257,61,-1000),(257,62,-1000),(257,178,-1000),(257,180,-1000),(257,661,-1000),(257,1106,-1000),(258,51,-1000),(258,52,-1000),(258,53,-1000),(258,54,-1000),(258,55,-1000),(258,56,-1000),(258,57,-1000),(258,58,-1000),(258,59,-1000),(258,60,-1000),(258,61,-1000),(258,62,-1000),(258,178,-1000),(258,180,-1000),(258,661,-1000),(258,1106,-1000),(259,51,-1000),(259,52,-1000),(259,53,-1000),(259,54,-1000),(259,55,-1000),(259,56,-1000),(259,57,-1000),(259,58,-1000),(259,59,-1000),(259,60,-1000),(259,61,-1000),(259,62,-1000),(259,178,-1000),(259,180,-1000),(259,661,-1000),(259,1106,-1000),(261,1,-25),(261,5,50),(261,51,-750),(261,52,-750),(261,53,-900),(261,54,-750),(261,55,-750),(261,56,-250),(261,57,-750),(261,58,-1000),(261,59,-350),(261,60,50),(261,61,-750),(261,62,-750),(261,178,-750),(261,180,-750),(261,203,50),(261,211,75),(261,661,-750),(261,1106,-750),(262,3,25),(262,4,10),(262,5,-200),(262,6,10),(262,7,10),(262,9,-50),(262,11,-200),(262,52,-75),(262,53,-100),(262,54,-50),(262,55,-50),(262,56,-300),(262,57,-25),(262,58,-75),(262,59,-1000),(262,60,-750),(262,61,-25),(262,62,-50),(262,178,-1000),(262,180,-75),(262,201,-200),(262,203,-300),(262,205,-100),(262,206,-200),(262,207,50),(262,212,50),(262,214,50),(262,216,-150),(263,1,50),(263,3,25),(263,4,25),(263,5,-300),(263,6,50),(263,11,-300),(263,16,50),(263,51,-15),(263,52,-25),(263,53,-25),(263,55,-25),(263,56,-300),(263,57,-10),(263,58,-5),(263,59,-750),(263,60,-700),(263,61,50),(263,178,-1000),(263,180,-25),(263,201,-400),(263,202,25),(263,203,-300),(263,205,25),(263,206,-300),(263,207,25),(263,210,25),(263,211,50),(263,212,15),(263,215,15),(263,661,-15),(263,1106,-15),(264,5,-1000),(264,7,50),(264,11,-1000),(264,51,-50),(264,52,-50),(264,53,-50),(264,54,-50),(264,55,-50),(264,56,-1000),(264,57,-50),(264,58,-50),(264,59,-1000),(264,60,-1000),(264,61,-50),(264,62,-50),(264,178,-1000),(264,180,-50),(264,201,-1000),(264,203,-1000),(264,206,-1000),(264,211,-25),(264,216,-10),(264,661,-50),(264,1106,-50),(265,3,-200),(265,4,-200),(265,6,-200),(265,7,-100),(265,8,-100),(265,12,-200),(265,13,-200),(265,14,-200),(265,51,-500),(265,52,-500),(265,54,-500),(265,55,-500),(265,56,-50),(265,57,-500),(265,58,-500),(265,59,-800),(265,60,-800),(265,61,-500),(265,62,-500),(265,178,-800),(265,180,-500),(265,201,-50),(265,202,-475),(265,203,100),(265,204,-475),(265,205,-475),(265,206,-475),(265,207,-475),(265,208,-475),(265,209,-475),(265,210,-475),(265,211,-25),(265,212,-475),(265,213,-475),(265,214,-475),(265,215,-475),(265,216,-475),(265,661,-500),(265,1106,-500),(266,5,-200),(266,9,-50),(266,11,-200),(266,51,-1),(266,52,-1),(266,54,-1),(266,55,-1),(266,56,-500),(266,57,-1),(266,59,-500),(266,60,-500),(266,61,-1),(266,62,-1),(266,178,-600),(266,180,-1),(266,201,-100),(266,203,-100),(266,206,-200),(266,661,-1),(266,1106,-1),(267,5,-200),(267,9,-50),(267,11,-200),(267,51,-25),(267,52,-50),(267,53,50),(267,54,-25),(267,55,-25),(267,56,-500),(267,57,-25),(267,58,-200),(267,59,-625),(267,60,-625),(267,61,-50),(267,62,-25),(267,178,-725),(267,180,-50),(267,201,-100),(267,203,-100),(267,206,-200),(267,661,-25),(267,1106,-25),(269,4,50),(269,5,-550),(269,11,-550),(269,56,-450),(269,59,-1000),(269,60,-750),(269,178,-1000),(269,201,-450),(269,203,-450),(269,206,-450),(269,207,50),(269,211,-150),(269,215,50),(270,1,50),(270,3,-600),(270,4,-600),(270,5,-50),(270,6,-600),(270,16,50),(270,51,-500),(270,52,-500),(270,53,-125),(270,54,-750),(270,55,-750),(270,56,50),(270,57,-50),(270,58,-500),(270,59,-250),(270,60,-350),(270,61,-500),(270,62,-150),(270,178,-1000),(270,180,-500),(270,201,25),(270,202,-300),(270,203,25),(270,204,-600),(270,205,-150),(270,206,50),(270,207,-400),(270,208,-400),(270,209,-100),(270,210,-300),(270,211,50),(270,212,-200),(270,213,-50),(270,214,-500),(270,215,-600),(270,216,25),(270,661,-500),(270,1106,-500),(271,3,-200),(271,4,-200),(271,5,50),(271,6,-200),(271,11,50),(271,51,50),(271,52,-30),(271,53,25),(271,54,-175),(271,55,-200),(271,56,25),(271,57,50),(271,58,-150),(271,59,-75),(271,60,-25),(271,61,-175),(271,62,-25),(271,178,-375),(271,180,-30),(271,201,50),(271,202,-100),(271,203,25),(271,204,-100),(271,205,-100),(271,206,100),(271,207,-100),(271,208,-100),(271,209,-200),(271,210,-200),(271,211,-25),(271,212,-100),(271,213,-50),(271,214,-300),(271,215,-200),(271,216,25),(271,661,50),(271,1106,50),(272,5,-200),(272,6,50),(272,9,-100),(272,11,-200),(272,51,50),(272,52,-200),(272,53,-200),(272,54,25),(272,55,-50),(272,56,-400),(272,57,50),(272,58,-200),(272,59,-850),(272,60,-750),(272,62,-100),(272,178,-1000),(272,180,-200),(272,201,-550),(272,202,-50),(272,203,-400),(272,204,-50),(272,205,-50),(272,206,-400),(272,207,100),(272,208,-50),(272,209,-50),(272,210,-50),(272,211,-150),(272,212,-50),(272,213,-50),(272,214,-50),(272,215,100),(272,216,-200),(272,661,50),(272,1106,50),(273,56,-200),(273,59,-375),(273,60,-375),(273,178,-275),(274,5,-200),(274,11,-200),(274,51,-10),(274,52,-5),(274,54,-10),(274,55,-10),(274,56,-500),(274,57,-10),(274,59,-750),(274,60,-750),(274,61,-10),(274,62,-10),(274,178,-1000),(274,180,-5),(274,661,-10),(274,1106,-10),(275,5,-200),(275,11,-200),(275,12,50),(275,13,50),(275,14,50),(275,51,-10),(275,52,-75),(275,55,50),(275,56,-1000),(275,57,-10),(275,58,-75),(275,59,-750),(275,60,-750),(275,61,-10),(275,62,-25),(275,178,-1000),(275,180,-75),(275,201,-200),(275,203,-200),(275,204,25),(275,206,-400),(275,207,25),(275,208,25),(275,213,50),(275,214,75),(275,661,-10),(275,1106,-10),(276,3,20),(276,4,30),(276,5,-200),(276,6,30),(276,9,-10),(276,11,-200),(276,51,-50),(276,52,-75),(276,53,-20),(276,54,100),(276,55,80),(276,56,-750),(276,58,-75),(276,59,-750),(276,60,-750),(276,61,-25),(276,62,-50),(276,178,-750),(276,180,-75),(276,201,-100),(276,203,-100),(276,204,10),(276,206,-100),(276,208,10),(276,210,20),(276,212,25),(276,215,50),(276,216,-50),(276,661,-50),(276,1106,-50),(277,4,50),(277,5,-200),(277,6,50),(277,11,-200),(277,51,-450),(277,52,-450),(277,53,-600),(277,54,-300),(277,55,-300),(277,56,-500),(277,57,-300),(277,58,-450),(277,59,-850),(277,60,-500),(277,61,-300),(277,62,-500),(277,178,-1000),(277,180,-450),(277,201,-200),(277,203,-200),(277,205,50),(277,206,-200),(277,209,-200),(277,213,-200),(277,215,50),(277,661,-450),(277,1106,-450),(278,3,-200),(278,4,-200),(278,51,-500),(278,52,-500),(278,54,-750),(278,55,-750),(278,57,-500),(278,59,-1),(278,60,-1),(278,61,-500),(278,62,-500),(278,178,-750),(278,180,-500),(278,661,-500),(278,1106,-500),(279,5,-200),(279,11,-200),(279,51,-1),(279,52,-1),(279,56,-1000),(279,57,-1),(279,59,-750),(279,60,-750),(279,61,-1),(279,62,-1),(279,178,-1000),(279,180,-1),(279,661,-1),(279,1106,-1),(280,3,50),(280,5,-200),(280,9,-50),(280,11,-200),(280,51,50),(280,56,-300),(280,57,50),(280,59,-1000),(280,60,-700),(280,178,-1000),(280,201,-200),(280,203,-200),(280,206,-200),(280,207,100),(280,212,25),(280,215,10),(280,216,-25),(280,661,50),(280,1106,50),(281,3,50),(281,4,25),(281,5,-200),(281,6,25),(281,7,10),(281,9,-100),(281,11,-200),(281,52,-10),(281,56,-350),(281,58,-10),(281,59,-750),(281,60,-750),(281,178,-1000),(281,180,-10),(281,201,-200),(281,203,-200),(281,204,50),(281,206,-200),(281,207,10),(281,208,100),(281,212,25),(281,214,50),(281,216,-100),(282,51,-1000),(282,52,-1000),(282,53,-1000),(282,54,-1000),(282,55,-1000),(282,56,-1000),(282,57,-1000),(282,58,-1000),(282,59,-1000),(282,60,-1000),(282,61,-1000),(282,62,-1000),(282,178,-1000),(282,180,-1000),(282,661,-1000),(282,1106,-1000),(283,51,-1000),(283,52,-1000),(283,53,-1000),(283,54,-1000),(283,55,-1000),(283,56,-1000),(283,57,-1000),(283,58,-1000),(283,59,-1000),(283,60,-1000),(283,61,-1000),(283,62,-1000),(283,178,-1000),(283,180,-1000),(283,661,-1000),(283,1106,-1000),(284,5,-25),(284,8,100),(284,9,25),(284,11,-25),(284,51,50),(284,52,-25),(284,54,25),(284,56,-50),(284,57,50),(284,58,-25),(284,59,-600),(284,60,-550),(284,178,-600),(284,180,-25),(284,201,-200),(284,203,-200),(284,204,50),(284,205,50),(284,206,-200),(284,207,50),(284,209,50),(284,211,-25),(284,215,50),(284,216,-50),(284,661,50),(284,1106,50),(285,51,-2000),(285,52,-2000),(285,53,-2000),(285,54,-2000),(285,55,-2000),(285,56,-2000),(285,57,-2000),(285,58,-2000),(285,59,-2000),(285,60,-2000),(285,61,-2000),(285,62,-2000),(285,178,-1000),(285,180,-2000),(285,661,-2000),(285,1106,-2000),(286,61,375),(286,201,-100),(286,203,-100),(286,206,-200),(287,51,-1000),(287,52,-1000),(287,54,-1000),(287,55,-1000),(287,56,-1000),(287,57,-1000),(287,59,-1000),(287,60,-1000),(287,61,-1000),(287,62,-1000),(287,178,-1000),(287,180,-1000),(287,661,-1000),(287,1106,-1000),(288,5,-50),(288,9,-50),(288,11,-50),(288,51,-50),(288,52,-50),(288,53,-25),(288,54,-50),(288,55,-50),(288,56,-99),(288,57,-50),(288,58,-75),(288,59,-750),(288,60,-750),(288,61,-10),(288,62,50),(288,178,-750),(288,180,-50),(288,201,-25),(288,203,-25),(288,206,-25),(288,211,-25),(288,661,-50),(288,1106,-50),(289,3,10),(289,5,-200),(289,9,-50),(289,11,-200),(289,51,-50),(289,52,-75),(289,54,-60),(289,55,-25),(289,56,-99),(289,57,-60),(289,59,-750),(289,60,-500),(289,61,-60),(289,62,-60),(289,178,-750),(289,180,-75),(289,661,-50),(289,1106,-50),(290,3,10),(290,5,-200),(290,9,-50),(290,11,-200),(290,12,-10),(290,13,-10),(290,14,-10),(290,51,-50),(290,52,50),(290,53,-80),(290,54,-75),(290,55,-80),(290,56,-750),(290,57,-75),(290,58,100),(290,59,-800),(290,60,-900),(290,61,-20),(290,62,-15),(290,178,-800),(290,180,50),(290,201,-300),(290,202,75),(290,203,-300),(290,206,-300),(290,209,-25),(290,211,-100),(290,213,-50),(290,214,50),(290,216,-50),(290,661,-50),(290,1106,-50),(291,3,50),(291,5,-25),(291,9,-25),(291,11,-25),(291,51,50),(291,52,-25),(291,53,-25),(291,54,-50),(291,55,-50),(291,56,-250),(291,57,50),(291,58,-50),(291,59,-750),(291,60,-500),(291,61,-10),(291,62,-10),(291,178,-750),(291,180,-25),(291,201,-50),(291,203,-50),(291,206,-50),(291,207,50),(291,212,50),(291,216,-50),(291,661,50),(291,1106,50),(292,5,-200),(292,9,-10),(292,11,-200),(292,51,-25),(292,52,-30),(292,53,-40),(292,54,-10),(292,55,-20),(292,56,-450),(292,58,-30),(292,59,-900),(292,60,-900),(292,61,100),(292,62,-5),(292,178,-900),(292,180,-30),(292,661,-25),(292,1106,-25),(293,5,-200),(293,9,-10),(293,11,-200),(293,51,-1),(293,54,-50),(293,55,-50),(293,56,-500),(293,57,-50),(293,59,-750),(293,60,-750),(293,61,-5),(293,62,-1),(293,178,-750),(293,661,-1),(293,1106,-1),(295,51,-1000),(295,52,-1000),(295,53,-1000),(295,54,-1000),(295,55,-1000),(295,56,-1000),(295,57,-1000),(295,58,-1000),(295,59,-1000),(295,60,-1000),(295,61,-1000),(295,62,-1000),(295,178,-1000),(295,180,-1000),(295,661,-1000),(295,1106,-1000),(296,3,-200),(296,5,50),(296,11,50),(296,12,50),(296,13,50),(296,14,50),(296,54,-500),(296,55,-500),(296,56,50),(296,58,-500),(296,61,-500),(296,178,-500),(296,201,25),(296,202,-150),(296,203,25),(296,204,-150),(296,205,-150),(296,206,100),(296,207,-150),(296,208,-150),(296,209,-150),(296,210,-150),(296,211,-150),(296,212,-150),(296,213,-150),(296,214,-150),(296,215,-450),(297,5,-200),(297,11,-200),(297,51,-1),(297,54,-1),(297,55,-1),(297,56,-750),(297,57,-1),(297,59,-750),(297,60,-750),(297,178,-1000),(297,201,-200),(297,202,1000),(297,203,-200),(297,206,-200),(297,661,-1),(297,1106,-1),(298,3,50),(298,5,-200),(298,9,-50),(298,11,-200),(298,53,50),(298,56,-750),(298,59,-750),(298,60,-750),(298,178,-750),(298,210,100),(298,211,-500),(299,51,-1000),(299,52,-1000),(299,53,-1000),(299,54,-1000),(299,55,-1000),(299,56,-1000),(299,57,-1000),(299,58,-1000),(299,59,-1000),(299,60,-1000),(299,61,-1000),(299,62,-1000),(299,178,-1000),(299,180,-1000),(299,201,-1000),(299,202,-1000),(299,203,-1000),(299,204,-1000),(299,205,-1000),(299,206,-1000),(299,207,-1000),(299,208,-1000),(299,209,-1000),(299,210,-1000),(299,211,-1000),(299,212,-1000),(299,213,-1000),(299,214,-1000),(299,215,-1000),(299,216,-1000),(299,661,-1000),(299,1106,-1000),(300,5,-200),(300,11,-200),(300,53,-25),(300,54,25),(300,56,-675),(300,58,-25),(300,59,-800),(300,60,-800),(300,61,50),(300,62,10),(300,178,-800),(300,201,-600),(300,203,-600),(300,205,100),(300,206,-600),(300,207,50),(300,208,-100),(300,209,25),(300,210,25),(300,214,-100),(300,215,25),(302,4,50),(302,5,-200),(302,6,25),(302,9,-50),(302,11,-200),(302,51,50),(302,52,-50),(302,53,-150),(302,55,-100),(302,56,-400),(302,57,50),(302,58,-125),(302,59,-850),(302,60,-750),(302,61,-50),(302,62,-100),(302,178,-850),(302,180,-50),(302,201,-450),(302,202,-25),(302,203,-300),(302,205,-25),(302,206,-300),(302,207,100),(302,209,25),(302,211,-25),(302,213,-50),(302,215,100),(302,216,-200),(302,661,50),(302,1106,50),(304,51,-75),(304,52,-75),(304,53,-50),(304,54,-75),(304,55,-25),(304,56,-25),(304,57,-75),(304,58,-75),(304,59,-75),(304,60,-75),(304,61,-75),(304,62,-75),(304,178,-75),(304,180,-75),(304,202,-25),(304,205,-10),(304,214,-10),(304,216,25),(304,661,-75),(304,1106,-75),(305,2,-1),(305,3,-1),(305,4,-1),(305,5,-200),(305,6,-1),(305,7,-1),(305,8,-1),(305,9,50),(305,10,-1),(305,11,-200),(305,12,-1),(305,13,-1),(305,14,-1),(305,15,-1),(305,16,-1),(305,51,-99),(305,52,50),(305,54,-99),(305,55,-99),(305,56,-750),(305,57,-99),(305,59,-750),(305,60,-750),(305,61,-99),(305,62,-99),(305,178,-750),(305,180,50),(305,201,-350),(305,203,-750),(305,205,50),(305,206,-350),(305,207,25),(305,209,25),(305,211,25),(305,214,50),(305,661,-99),(305,1106,-99),(306,51,-1000),(306,52,-1000),(306,53,-1000),(306,54,-1000),(306,55,-1000),(306,56,-1000),(306,57,-1000),(306,58,-1000),(306,59,-1000),(306,60,-1000),(306,61,-1000),(306,62,-1000),(306,178,-1000),(306,180,-1000),(306,661,-1000),(306,1106,-1000),(307,51,-1000),(307,52,-1000),(307,53,-1000),(307,54,-1000),(307,55,-1000),(307,56,-1000),(307,57,-1000),(307,58,-1000),(307,59,-1000),(307,60,-1000),(307,61,-1000),(307,62,-1000),(307,178,-1000),(307,180,-1000),(307,661,-1000),(307,1106,-1000),(308,1,-200),(308,2,-200),(308,3,-1000),(308,4,-200),(308,5,50),(308,6,-200),(308,7,-200),(308,8,-200),(308,9,-100),(308,11,-50),(308,12,-200),(308,13,-200),(308,14,-200),(308,16,-200),(308,51,-750),(308,52,-750),(308,53,-750),(308,54,-750),(308,55,-750),(308,56,-200),(308,57,-750),(308,58,-750),(308,59,50),(308,60,-250),(308,61,-750),(308,62,-750),(308,178,-750),(308,180,-750),(308,202,-200),(308,203,50),(308,204,-200),(308,205,-200),(308,206,50),(308,207,-200),(308,208,-200),(308,209,-200),(308,210,-200),(308,211,-50),(308,212,-200),(308,213,-200),(308,214,-200),(308,215,-200),(308,216,-200),(308,661,-750),(308,1106,-750),(309,1,-25),(309,2,-25),(309,3,-25),(309,4,-25),(309,5,-200),(309,6,-25),(309,7,50),(309,8,-25),(309,9,-50),(309,10,-25),(309,11,-200),(309,12,-25),(309,13,-25),(309,14,-25),(309,15,-25),(309,16,-25),(309,51,50),(309,56,-50),(309,57,50),(309,59,-700),(309,60,-650),(309,178,-1000),(309,201,-200),(309,203,-200),(309,206,-200),(309,210,50),(309,211,-25),(309,214,25),(309,216,-25),(309,661,50),(309,1106,50),(310,5,-200),(310,6,50),(310,11,-200),(310,51,-25),(310,52,-25),(310,53,-25),(310,54,50),(310,55,25),(310,56,-1000),(310,57,50),(310,58,-25),(310,59,-800),(310,60,-600),(310,178,-1000),(310,180,-25),(310,201,-200),(310,203,-200),(310,206,-400),(310,207,10),(310,209,10),(310,215,100),(310,661,-25),(310,1106,-25),(311,1,50),(311,5,-200),(311,11,-200),(311,51,50),(311,53,-50),(311,54,-50),(311,55,-50),(311,56,-200),(311,57,50),(311,58,-25),(311,59,-300),(311,60,-200),(311,61,-50),(311,62,-50),(311,178,-400),(311,201,-50),(311,203,-200),(311,206,-50),(311,211,50),(311,661,50),(311,1106,50),(312,1,50),(312,5,-200),(312,9,-25),(312,11,-200),(312,12,-25),(312,13,-25),(312,14,-25),(312,16,50),(312,51,-75),(312,52,50),(312,53,-150),(312,54,-100),(312,55,-150),(312,56,-750),(312,57,-80),(312,58,50),(312,59,-900),(312,60,-1000),(312,61,-25),(312,62,-15),(312,178,-750),(312,180,50),(312,201,-500),(312,202,50),(312,203,-500),(312,206,-500),(312,210,-10),(312,211,-500),(312,215,-50),(312,216,-100),(312,661,-75),(312,1106,-75),(313,3,-1000),(313,4,-1000),(313,5,-1000),(313,10,-1000),(313,11,-1000),(313,12,-1000),(313,13,-1000),(313,14,-1000),(313,15,-1000),(313,51,-1000),(313,52,-1000),(313,53,-1000),(313,54,-1000),(313,55,-1000),(313,56,-1000),(313,57,-1000),(313,58,-1000),(313,59,-1000),(313,60,-1000),(313,61,-1000),(313,62,-1000),(313,178,-1000),(313,180,-1000),(313,209,50),(313,661,-1000),(313,1106,-1000),(315,51,-1000),(315,52,-1000),(315,53,-1000),(315,54,-1000),(315,55,-1000),(315,56,-1000),(315,57,-1000),(315,58,-1000),(315,59,-1000),(315,60,-1000),(315,61,-1000),(315,62,-1000),(315,178,-1000),(315,180,-1000),(315,216,-20),(315,661,-1000),(315,1106,-1000),(316,5,-200),(316,9,50),(316,11,-200),(316,51,-1),(316,52,-1),(316,54,100),(316,55,50),(316,56,-750),(316,57,50),(316,59,-750),(316,60,-750),(316,62,-1),(316,178,-750),(316,180,-1),(316,201,-200),(316,203,-200),(316,205,50),(316,206,-800),(316,207,50),(316,209,100),(316,215,100),(316,661,-1),(316,1106,-1),(317,3,-200),(317,51,-1000),(317,52,-1000),(317,53,-1000),(317,54,-1000),(317,55,-1000),(317,56,-1000),(317,57,-1000),(317,58,-1000),(317,59,-1000),(317,60,-1000),(317,61,-1000),(317,62,-1000),(317,178,-1000),(317,180,-1000),(317,661,-1000),(317,1106,-1000),(318,51,-75),(318,52,-1000),(318,53,-75),(318,54,-1000),(318,55,-1000),(318,56,-75),(318,57,-1000),(318,58,-1000),(318,59,-75),(318,60,-75),(318,61,-1000),(318,62,-75),(318,178,-1000),(318,180,-1000),(318,202,-1000),(318,204,-1000),(318,205,-5),(318,207,-1000),(318,208,-1000),(318,209,-1000),(318,210,-1000),(318,212,-1000),(318,213,-5),(318,214,-1000),(318,215,-1000),(318,216,-1000),(318,661,-75),(318,1106,-75),(319,51,-1000),(319,52,-1000),(319,53,-1000),(319,54,-1000),(319,55,-1000),(319,56,-1000),(319,57,-1000),(319,58,-1000),(319,59,-1000),(319,60,-1000),(319,61,-1000),(319,62,-1000),(319,178,-1000),(319,180,-1000),(319,661,-1000),(319,1106,-1000),(320,1,50),(320,5,-200),(320,8,25),(320,9,-10),(320,11,-400),(320,12,-50),(320,13,-50),(320,14,-50),(320,16,50),(320,51,-50),(320,52,50),(320,53,-100),(320,54,-100),(320,55,-150),(320,56,-750),(320,57,-75),(320,58,25),(320,59,-900),(320,60,-600),(320,61,-25),(320,62,-25),(320,178,-1000),(320,180,50),(320,201,-500),(320,203,-500),(320,204,25),(320,206,-500),(320,208,25),(320,211,50),(320,213,-25),(320,214,75),(320,661,-50),(320,1106,-50),(321,4,-200),(321,6,-200),(321,51,-875),(321,52,-875),(321,53,-875),(321,54,-875),(321,55,-875),(321,56,-875),(321,57,-875),(321,58,-875),(321,59,-625),(321,60,-625),(321,61,-875),(321,62,-875),(321,178,-875),(321,180,-875),(321,661,-875),(321,1106,-875),(322,2,-10),(322,3,-10),(322,4,-10),(322,5,-200),(322,6,-10),(322,7,-10),(322,8,-10),(322,9,50),(322,10,-10),(322,11,-200),(322,12,-10),(322,13,-10),(322,14,-10),(322,15,-10),(322,16,-10),(322,54,-50),(322,55,-50),(322,56,-550),(322,57,-50),(322,58,50),(322,59,-750),(322,60,-750),(322,178,-750),(322,201,-300),(322,202,50),(322,203,-300),(322,205,50),(322,206,-300),(322,211,-200),(322,214,-50),(323,1,50),(323,5,-600),(323,9,-25),(323,11,-200),(323,16,50),(323,51,-75),(323,52,-75),(323,53,-80),(323,54,-50),(323,55,-80),(323,56,-750),(323,57,-25),(323,58,-25),(323,59,-750),(323,60,-750),(323,61,-25),(323,62,50),(323,178,-1000),(323,180,-75),(323,201,-200),(323,202,50),(323,203,-200),(323,206,-200),(323,215,25),(323,216,-200),(323,661,-75),(323,1106,-75),(324,6,375),(324,11,-200),(324,52,-200),(324,53,-200),(324,55,-200),(324,56,-200),(324,58,-200),(324,59,-200),(324,60,-200),(324,62,-200),(324,178,-250),(324,180,-200),(324,201,-200),(324,203,-200),(324,206,-200),(324,207,100),(324,209,100),(324,211,-100),(324,213,-100),(324,215,500),(325,5,-200),(325,9,-50),(325,11,-200),(325,51,-30),(325,52,-30),(325,54,-5),(325,56,-750),(325,57,-20),(325,59,-750),(325,60,-750),(325,61,-10),(325,62,-10),(325,178,-750),(325,180,-30),(325,661,-30),(325,1106,-30),(326,1,50),(326,5,-200),(326,11,-200),(326,51,-50),(326,52,-50),(326,53,-50),(326,54,50),(326,55,50),(326,56,-750),(326,57,50),(326,58,-50),(326,59,-750),(326,60,-750),(326,61,-10),(326,62,-25),(326,178,-1000),(326,180,-50),(326,201,-200),(326,202,-50),(326,203,-200),(326,205,-25),(326,206,-200),(326,213,-50),(326,215,50),(326,216,-50),(326,661,-50),(326,1106,-50),(327,5,-200),(327,9,-200),(327,10,50),(327,11,-200),(327,15,50),(327,51,-25),(327,52,50),(327,53,-100),(327,54,-100),(327,55,-100),(327,56,-750),(327,57,-25),(327,59,-900),(327,60,-750),(327,61,-25),(327,62,-25),(327,178,-1000),(327,180,50),(327,201,-200),(327,203,-200),(327,205,-100),(327,206,-200),(327,214,100),(327,661,-25),(327,1106,-25),(328,5,-200),(328,9,-10),(328,11,-200),(328,51,-50),(328,54,-99),(328,55,-99),(328,56,-750),(328,57,-99),(328,59,-750),(328,60,-750),(328,61,-20),(328,62,-30),(328,178,-750),(328,661,-50),(328,1106,-50),(329,56,-200),(329,59,-375),(329,60,-375),(329,178,-475),(329,201,-100),(329,203,-100),(329,206,-100),(329,216,-200),(330,3,-50),(330,4,-25),(330,9,25),(330,52,-25),(330,53,-25),(330,54,-25),(330,55,-50),(330,56,-150),(330,58,-25),(330,59,-600),(330,60,-550),(330,61,-25),(330,62,-25),(330,178,-600),(330,180,-25),(330,201,-25),(330,203,-50),(330,204,-100),(330,205,25),(330,206,-25),(330,208,-100),(330,211,25),(330,212,-25),(330,214,-100),(330,215,-25),(331,9,-180),(332,3,-50),(332,4,-25),(332,5,-200),(332,9,50),(332,11,-300),(332,12,-50),(332,13,-50),(332,14,-50),(332,52,-50),(332,53,-50),(332,54,-200),(332,55,-200),(332,56,-300),(332,57,-75),(332,58,-150),(332,59,-750),(332,60,-500),(332,61,-25),(332,62,-100),(332,178,-750),(332,180,-50),(332,201,-200),(332,202,-50),(332,203,-300),(332,206,-300),(332,208,-50),(332,209,-50),(332,210,-50),(332,211,-75),(332,212,-30),(332,213,-50),(332,214,-200),(332,215,-10),(332,216,-300),(333,5,-200),(333,11,-200),(333,51,-10),(333,52,-10),(333,53,-10),(333,54,-10),(333,55,-10),(333,56,-750),(333,57,-10),(333,58,-10),(333,59,-750),(333,60,-750),(333,61,-10),(333,62,50),(333,178,-750),(333,180,-10),(333,201,-200),(333,204,-100),(333,206,-200),(333,661,-10),(333,1106,-10),(334,3,-750),(334,4,-750),(334,5,50),(334,6,-750),(334,7,-100),(334,8,-50),(334,10,-50),(334,11,50),(334,15,-50),(334,51,-500),(334,52,-750),(334,53,-400),(334,54,-750),(334,55,-750),(334,56,50),(334,57,-750),(334,58,-750),(334,59,-200),(334,60,-200),(334,61,-750),(334,62,-500),(334,178,-750),(334,180,-750),(334,201,-25),(334,202,-500),(334,203,-25),(334,204,-500),(334,205,-500),(334,206,50),(334,207,-500),(334,208,-500),(334,209,-500),(334,210,-500),(334,211,-50),(334,212,-500),(334,213,-25),(334,214,-500),(334,215,-500),(334,216,-25),(334,661,-500),(334,1106,-500),(336,3,-50),(336,4,-25),(336,9,50),(336,51,50),(336,53,-50),(336,55,-50),(336,56,-75),(336,57,50),(336,58,-50),(336,59,-300),(336,60,-200),(336,61,-50),(336,62,-50),(336,178,-400),(336,201,-25),(336,203,-50),(336,204,-5),(336,205,50),(336,206,25),(336,208,-10),(336,214,-25),(336,661,50),(336,1106,50),(337,3,-200),(337,4,-200),(337,9,-50),(337,12,-200),(337,13,-200),(337,14,-200),(337,51,-875),(337,52,-875),(337,53,-875),(337,54,-875),(337,55,-875),(337,57,-875),(337,58,-875),(337,60,875),(337,61,-875),(337,62,-875),(337,178,-875),(337,180,-875),(337,661,-875),(337,1106,-875),(338,3,-200),(338,4,-200),(338,9,-50),(338,12,-200),(338,13,-200),(338,14,-200),(338,51,-750),(338,52,-750),(338,54,-750),(338,55,-750),(338,56,-50),(338,57,-750),(338,59,-50),(338,60,1000),(338,61,-750),(338,62,-750),(338,178,-1000),(338,180,-750),(338,661,-750),(338,1106,-750),(340,3,-200),(340,4,-200),(340,5,50),(340,6,-200),(340,11,25),(340,51,-250),(340,52,-500),(340,53,-200),(340,54,-600),(340,55,-800),(340,56,50),(340,57,-50),(340,58,-500),(340,59,-200),(340,60,-250),(340,61,-600),(340,62,-250),(340,178,-600),(340,180,-500),(340,201,-200),(340,202,-200),(340,203,-100),(340,204,-600),(340,205,-200),(340,206,100),(340,207,-200),(340,208,-200),(340,209,-200),(340,210,-200),(340,211,-200),(340,212,-200),(340,213,-200),(340,214,-200),(340,215,-600),(340,216,-200),(340,661,-250),(340,1106,-250),(341,5,-200),(341,11,-200),(341,52,-25),(341,53,-25),(341,54,-25),(341,55,-25),(341,56,-200),(341,58,-25),(341,59,-850),(341,60,-750),(341,61,-25),(341,62,-25),(341,178,-850),(341,180,-25),(341,201,-200),(341,202,-50),(341,203,-200),(341,204,-25),(341,205,-50),(341,206,-200),(341,208,-25),(341,209,-25),(341,211,-200),(341,212,100),(341,213,-100),(341,214,-25),(341,216,-100),(342,5,-200),(342,11,-200),(342,12,50),(342,13,50),(342,14,50),(342,51,50),(342,52,-200),(342,53,-25),(342,54,-200),(342,56,-400),(342,57,50),(342,58,-200),(342,59,-850),(342,60,-750),(342,61,-50),(342,62,-50),(342,178,-850),(342,180,-200),(342,201,-200),(342,202,-100),(342,203,-300),(342,205,-100),(342,206,-200),(342,207,50),(342,209,-100),(342,210,-100),(342,211,-200),(342,212,50),(342,213,50),(342,214,-25),(342,216,-300),(342,661,50),(342,1106,50),(343,4,750),(343,6,750),(343,51,-600),(343,52,-600),(343,53,-600),(343,54,-600),(343,55,-600),(343,56,-600),(343,57,-600),(343,58,-600),(343,59,-600),(343,60,-600),(343,61,-600),(343,62,-600),(343,178,-600),(343,180,-600),(343,215,750),(343,661,-600),(343,1106,-600),(345,5,-400),(345,9,-25),(345,11,-400),(345,12,-50),(345,13,-50),(345,14,-50),(345,52,-25),(345,53,-70),(345,54,-50),(345,55,-50),(345,56,-500),(345,57,-10),(345,58,-60),(345,59,-750),(345,60,-750),(345,61,-10),(345,62,-50),(345,178,-750),(345,180,-25),(345,201,-750),(345,202,-5),(345,203,-500),(345,205,-20),(345,206,-500),(345,209,-3),(345,211,-50),(345,213,-20),(345,215,-5),(345,216,-80),(346,5,-300),(346,9,-50),(346,11,-300),(346,51,50),(346,56,-300),(346,59,-750),(346,60,-750),(346,178,-750),(346,201,-300),(346,203,-300),(346,204,50),(346,206,-200),(346,207,100),(346,208,75),(346,212,75),(346,214,50),(346,661,50),(346,1106,50),(355,3,50),(355,4,50),(355,5,-200),(355,6,50),(355,9,-25),(355,11,-200),(355,53,-10),(355,54,25),(355,56,-200),(355,57,25),(355,59,-800),(355,60,-700),(355,61,50),(355,178,-750),(355,201,-200),(355,203,-200),(355,206,-200),(355,207,50),(355,209,25),(355,210,25),(355,212,25),(355,215,25),(355,216,-25),(361,5,-200),(361,7,100),(361,9,-100),(361,11,-200),(361,56,-1000),(361,59,-1000),(361,60,-1000),(361,178,-1000),(362,3,50),(362,5,-200),(362,11,-200),(362,51,50),(362,56,-200),(362,57,50),(362,59,-800),(362,60,-600),(362,178,-800),(362,201,-200),(362,203,-100),(362,204,100),(362,206,-200),(362,208,75),(362,211,-100),(362,661,50),(362,1106,50),(363,3,-350),(363,4,-350),(363,6,-350),(363,11,-50),(363,12,50),(363,13,50),(363,14,50),(363,51,-250),(363,52,-500),(363,53,-150),(363,54,-600),(363,55,-700),(363,56,50),(363,57,-25),(363,58,-500),(363,59,-250),(363,60,-300),(363,61,-550),(363,62,-150),(363,178,-350),(363,180,-500),(363,201,25),(363,202,-200),(363,203,25),(363,204,-200),(363,205,-200),(363,206,50),(363,207,-200),(363,208,-200),(363,209,-200),(363,210,-200),(363,211,-200),(363,212,-200),(363,213,50),(363,214,-150),(363,215,-600),(363,216,-150),(363,661,-250),(363,1106,-250),(364,3,-100),(364,51,-1000),(364,52,-1000),(364,53,-1000),(364,54,-1000),(364,55,-1000),(364,56,-1000),(364,57,-1000),(364,58,-1000),(364,59,-1000),(364,60,-1000),(364,61,-1000),(364,62,-1000),(364,178,-1000),(364,180,-1000),(364,201,-1000),(364,202,-1000),(364,203,-1000),(364,204,-1000),(364,205,-1000),(364,206,-1000),(364,207,-1000),(364,208,-1000),(364,209,-1000),(364,210,-1000),(364,211,50),(364,212,-1000),(364,213,-1000),(364,214,-1000),(364,215,-1000),(364,216,-1000),(364,661,-1000),(364,1106,-1000),(366,1,-550),(366,2,-550),(366,3,-600),(366,4,-550),(366,5,-600),(366,6,-600),(366,7,-550),(366,8,-550),(366,9,-400),(366,10,-550),(366,11,-550),(366,12,-550),(366,13,-550),(366,14,-550),(366,15,-550),(366,16,-550),(366,52,-200),(366,53,-200),(366,54,-300),(366,55,-300),(366,56,-200),(366,58,-200),(366,59,-750),(366,60,-550),(366,62,-300),(366,178,-750),(366,180,-200),(366,201,-750),(366,202,-200),(366,203,-750),(366,204,-750),(366,206,-750),(366,208,-750),(366,209,-750),(366,210,-750),(366,211,-750),(366,212,-200),(366,213,-750),(366,214,-1000),(366,215,-200),(366,216,-750),(370,3,-750),(370,4,-750),(370,5,50),(370,6,-750),(370,7,-300),(370,9,25),(370,11,50),(370,51,-200),(370,52,-875),(370,53,-200),(370,54,-875),(370,55,-875),(370,56,50),(370,57,-875),(370,58,-875),(370,59,-400),(370,60,-450),(370,61,-875),(370,62,-200),(370,178,-875),(370,180,-875),(370,201,-25),(370,202,-750),(370,203,-25),(370,204,-750),(370,205,-75),(370,206,50),(370,207,-750),(370,208,-750),(370,209,-750),(370,210,-750),(370,211,-50),(370,212,-750),(370,213,-75),(370,214,-750),(370,215,-750),(370,216,-150),(370,661,-200),(370,1106,-200),(371,51,-875),(371,52,-875),(371,53,-875),(371,54,-875),(371,55,-875),(371,56,1000),(371,57,-875),(371,58,-875),(371,59,1000),(371,60,1000),(371,61,-875),(371,62,-875),(371,178,-875),(371,180,-875),(371,661,-875),(371,1106,-875),(372,51,-875),(372,52,-875),(372,53,-875),(372,54,-875),(372,55,-875),(372,56,-875),(372,57,-875),(372,58,-875),(372,59,-875),(372,60,-875),(372,61,-875),(372,62,-875),(372,178,-875),(372,180,-875),(372,661,-875),(372,1106,-875),(373,51,-750),(373,52,-750),(373,53,-750),(373,54,-750),(373,55,-750),(373,56,-750),(373,57,-750),(373,58,-750),(373,59,-750),(373,60,-750),(373,61,-750),(373,62,-750),(373,178,-750),(373,180,-750),(373,661,-750),(373,1106,-750),(375,51,-1000),(375,52,-1000),(375,53,-1000),(375,54,-1000),(375,55,-1000),(375,56,-1000),(375,57,-1000),(375,58,-1000),(375,59,-1000),(375,60,-1000),(375,61,-1000),(375,62,-1000),(375,178,-1000),(375,180,-1000),(375,661,-1000),(375,1106,-1000),(376,59,1000),(377,5,-200),(377,51,-875),(377,52,-875),(377,53,-875),(377,54,-875),(377,55,-875),(377,56,-250),(377,57,-875),(377,58,-875),(377,59,50),(377,60,-200),(377,61,-875),(377,62,-875),(377,178,-875),(377,180,-875),(377,661,-875),(377,1106,-875),(378,5,-500),(378,11,-500),(378,51,-1600),(378,52,-1700),(378,53,-1700),(378,54,-700),(378,55,-1200),(378,56,-1500),(378,57,-1000),(378,58,-1300),(378,59,-2000),(378,60,-2000),(378,61,-525),(378,62,-1000),(378,178,-2000),(378,180,-1700),(378,661,-1600),(378,1106,-1600),(379,9,50),(379,51,-550),(379,52,-550),(379,53,-550),(379,54,-700),(379,55,-700),(379,56,-550),(379,57,-550),(379,58,-500),(379,59,-700),(379,60,-800),(379,61,-550),(379,62,-550),(379,178,-800),(379,180,-550),(379,201,-100),(379,202,25),(379,203,-50),(379,205,25),(379,206,-200),(379,214,-50),(379,661,-550),(379,1106,-550),(382,5,-1000),(382,11,-1000),(382,51,-50),(382,52,-50),(382,53,-1000),(382,55,-25),(382,56,-1000),(382,57,-50),(382,58,-50),(382,59,-1000),(382,60,-1000),(382,61,-50),(382,62,-50),(382,178,-1000),(382,180,-50),(382,201,-1000),(382,203,-1000),(382,206,-1000),(382,215,25),(382,661,-50),(382,1106,-50),(387,51,-1000),(387,52,-1000),(387,53,-1000),(387,54,-1000),(387,55,-1000),(387,56,-1000),(387,57,-1000),(387,58,-1000),(387,59,-1000),(387,60,-1000),(387,61,-1000),(387,62,-1000),(387,178,-1000),(387,180,-1000),(387,661,-1000),(387,1106,-1000),(388,56,-750),(388,59,-1000),(388,60,-850),(388,178,-1000),(390,51,-100),(390,52,-100),(390,53,-100),(390,54,-100),(390,55,-100),(390,56,-100),(390,57,-100),(390,58,-100),(390,59,-100),(390,60,-100),(390,61,-100),(390,62,-100),(390,178,-100),(390,180,-100),(390,661,-100),(390,1106,-100),(391,51,-100),(391,52,-100),(391,53,-100),(391,54,-100),(391,55,-100),(391,56,-100),(391,57,-100),(391,58,-100),(391,59,-100),(391,60,-100),(391,61,-100),(391,62,-100),(391,178,-100),(391,180,-100),(391,661,-100),(391,1106,-100),(394,1,25),(394,3,-750),(394,4,-750),(394,5,25),(394,6,-750),(394,10,50),(394,11,25),(394,15,50),(394,16,25),(394,51,-500),(394,52,-400),(394,53,-600),(394,54,-600),(394,55,-600),(394,56,-50),(394,57,-600),(394,58,-600),(394,59,-500),(394,60,50),(394,61,-600),(394,62,-400),(394,178,-600),(394,180,-400),(394,201,-50),(394,202,-600),(394,203,50),(394,204,-600),(394,205,-600),(394,206,-50),(394,207,-600),(394,208,-600),(394,209,-600),(394,210,-600),(394,211,100),(394,212,-600),(394,213,-600),(394,214,-600),(394,215,-600),(394,661,-500),(394,1106,-500),(398,51,-1000),(398,52,-1000),(398,53,-1000),(398,54,-1000),(398,55,-1000),(398,56,-1000),(398,57,-1000),(398,58,-1000),(398,59,-1000),(398,60,-1000),(398,61,-1000),(398,62,-1000),(398,178,-1000),(398,180,-1000),(398,661,-1000),(398,1106,-1000),(401,5,-300),(401,8,50),(401,11,-200),(401,51,-25),(401,52,-25),(401,54,50),(401,55,50),(401,56,-1000),(401,57,50),(401,58,-25),(401,59,-800),(401,60,-600),(401,178,-1000),(401,180,-25),(401,661,-25),(401,1106,-25),(404,1,-100),(404,2,-100),(404,3,-100),(404,4,-100),(404,5,-100),(404,6,-100),(404,7,-100),(404,8,-100),(404,9,-100),(404,11,-100),(404,12,-100),(404,13,-100),(404,14,-100),(404,16,-100),(405,51,-200),(405,52,-200),(405,53,-200),(405,54,-200),(405,55,-200),(405,56,-200),(405,57,-200),(405,58,-200),(405,59,-200),(405,60,-200),(405,61,-200),(405,62,-200),(405,178,-200),(405,180,-200),(405,661,-200),(405,1106,-200),(406,51,-100),(406,52,-100),(406,53,-100),(406,54,-100),(406,55,-100),(406,56,-100),(406,57,-100),(406,58,-50),(406,59,-100),(406,60,-100),(406,61,-100),(406,62,-100),(406,178,-100),(406,180,-100),(406,202,100),(406,661,-100),(406,1106,-100),(407,51,-800),(407,52,-800),(407,53,-800),(407,54,-800),(407,55,-800),(407,56,-800),(407,57,-800),(407,58,-800),(407,59,-800),(407,60,-800),(407,61,-800),(407,62,-800),(407,178,-800),(407,180,-800),(407,661,-800),(407,1106,-800),(409,51,-625),(409,52,-625),(409,53,-625),(409,54,-625),(409,55,-625),(409,56,-625),(409,57,-625),(409,58,-625),(409,59,-625),(409,60,-625),(409,61,-625),(409,62,-625),(409,178,-625),(409,180,-625),(409,661,-625),(409,1106,-625),(412,5,-200),(412,11,-200),(412,51,-475),(412,52,-475),(412,53,-475),(412,54,-475),(412,55,-475),(412,56,-475),(412,57,-475),(412,58,-475),(412,59,-1000),(412,60,-1000),(412,61,-475),(412,62,-475),(412,178,-1000),(412,180,-475),(412,201,-500),(412,203,-500),(412,206,-500),(412,211,-75),(412,215,25),(412,216,-100),(412,661,-475),(412,1106,-475),(415,12,50),(415,51,50),(415,213,50),(415,661,50),(415,1106,50),(416,12,-25),(416,51,-400),(416,52,-400),(416,53,-400),(416,54,-400),(416,55,-400),(416,56,-400),(416,57,-400),(416,58,-400),(416,59,-400),(416,60,-400),(416,61,-400),(416,62,-400),(416,178,-400),(416,180,-400),(416,213,-25),(416,661,-400),(416,1106,-400),(417,56,-750),(417,59,-750),(417,60,-750),(417,201,-750),(417,203,-750),(417,206,-750),(417,211,-750),(418,51,-750),(418,52,-750),(418,53,-750),(418,54,-750),(418,55,-750),(418,57,-750),(418,58,-750),(418,61,-750),(418,62,-750),(418,180,-750),(418,202,-750),(418,204,-750),(418,205,-750),(418,207,-750),(418,208,-750),(418,209,-750),(418,210,-750),(418,212,-750),(418,213,-750),(418,214,-750),(418,215,-750),(418,216,-750),(418,661,-750),(418,1106,-750),(419,51,-550),(419,52,-550),(419,53,-550),(419,54,-550),(419,55,-550),(419,56,-550),(419,57,-550),(419,58,-550),(419,59,-550),(419,60,-450),(419,61,-550),(419,62,-550),(419,178,-550),(419,180,-550),(419,211,100),(419,661,-550),(419,1106,-550),(420,51,-1000),(420,52,-1000),(420,53,-1000),(420,54,-1000),(420,55,-1000),(420,56,-1000),(420,57,-1000),(420,58,-1000),(420,59,-1000),(420,60,-1000),(420,61,-1000),(420,62,-1000),(420,178,-1000),(420,180,-1000),(420,201,-1000),(420,202,-1000),(420,203,-1000),(420,204,-1000),(420,205,-1000),(420,207,-1000),(420,208,-1000),(420,209,-1000),(420,210,-1000),(420,211,-1000),(420,212,-1000),(420,213,-1000),(420,214,-1000),(420,215,-1000),(420,216,-1000),(420,661,-1000),(420,1106,-1000),(421,3,-500),(421,4,-500),(421,5,50),(421,6,-500),(421,11,50),(421,51,-600),(421,52,-1000),(421,53,-600),(421,54,-1000),(421,55,-1000),(421,56,150),(421,57,-1000),(421,58,-1000),(421,59,-200),(421,60,-200),(421,61,-1000),(421,62,-600),(421,178,-1000),(421,180,-1000),(421,202,-1000),(421,204,-1000),(421,205,-1000),(421,206,150),(421,207,-1000),(421,208,-1000),(421,209,-1000),(421,210,-1000),(421,212,-1000),(421,213,-1000),(421,214,-1000),(421,215,-1000),(421,216,-1000),(421,661,-600),(421,1106,-600),(422,3,100),(422,4,100),(422,5,-1000),(422,6,100),(422,11,-1000),(422,56,-1000),(422,59,-1000),(422,60,-1000),(422,178,-1000),(422,201,-1000),(422,202,100),(422,203,-1000),(422,204,100),(422,206,-1000),(422,207,100),(422,211,-250),(422,212,100),(422,215,100),(423,51,-1000),(423,52,-1000),(423,53,-1000),(423,54,-1000),(423,55,-1000),(423,56,-1000),(423,57,-1000),(423,58,-1000),(423,59,-1000),(423,60,-1000),(423,61,-1000),(423,62,-1000),(423,178,-1000),(423,180,-1000),(423,661,-1000),(423,1106,-1000),(425,51,-1000),(425,52,-1000),(425,53,-1000),(425,54,-1000),(425,55,-1000),(425,56,-1100),(425,57,-1000),(425,58,-1000),(425,59,-1000),(425,60,-1000),(425,61,-1000),(425,62,-1000),(425,178,-1000),(425,180,-1000),(425,201,-1000),(425,202,-1000),(425,203,-1000),(425,204,-1000),(425,205,-1000),(425,206,-1100),(425,207,-1000),(425,208,-1000),(425,209,-1000),(425,210,-1000),(425,211,-1000),(425,212,-1000),(425,213,-1000),(425,214,-1000),(425,215,-1000),(425,216,-1000),(425,661,-1000),(425,1106,-1000),(426,51,-1000),(426,52,-1000),(426,53,-1000),(426,54,-1000),(426,55,-1000),(426,56,-1000),(426,57,-1000),(426,58,-1000),(426,59,-1000),(426,60,-1000),(426,61,-1000),(426,62,-1000),(426,178,-1000),(426,180,-1000),(426,661,-1000),(426,1106,-1000),(427,51,-400),(427,52,-400),(427,53,-400),(427,54,-400),(427,55,-400),(427,56,-400),(427,57,-400),(427,58,-400),(427,59,-400),(427,60,-400),(427,61,-400),(427,62,-400),(427,178,-400),(427,180,-400),(427,215,200),(427,661,-400),(427,1106,-400),(428,51,-600),(428,52,-600),(428,53,-1000),(428,54,-600),(428,55,-600),(428,56,-600),(428,57,-600),(428,58,-600),(428,59,-600),(428,60,-600),(428,61,-600),(428,62,-600),(428,178,-600),(428,180,-600),(428,202,200),(428,216,-1000),(428,661,-600),(428,1106,-600),(429,51,-800),(429,52,-800),(429,53,-800),(429,54,-800),(429,55,-800),(429,56,-800),(429,57,-800),(429,58,-800),(429,59,-800),(429,60,-800),(429,61,-800),(429,62,-800),(429,178,-800),(429,180,-800),(429,661,-800),(429,1106,-800),(430,51,-800),(430,52,-800),(430,53,-800),(430,54,-800),(430,55,-800),(430,56,-800),(430,57,-800),(430,58,-800),(430,59,-800),(430,60,-800),(430,61,-800),(430,62,-800),(430,178,-800),(430,180,-800),(430,216,200),(430,661,-800),(430,1106,-800),(431,51,-800),(431,52,-800),(431,53,-800),(431,54,-800),(431,55,-800),(431,56,-800),(431,57,-800),(431,58,-800),(431,59,-800),(431,60,-800),(431,61,-800),(431,62,-800),(431,178,-800),(431,180,-800),(431,661,-800),(431,1106,-800),(434,51,-1000),(434,52,-1000),(434,53,-1000),(434,54,-1000),(434,55,-1000),(434,56,-1000),(434,57,-1000),(434,58,-1000),(434,59,-1000),(434,60,-1000),(434,61,-1000),(434,62,-1000),(434,178,-1000),(434,180,-1000),(434,661,-1000),(434,1106,-1000),(435,51,-1000),(435,52,-1000),(435,53,-1000),(435,54,-1000),(435,55,-1000),(435,56,-1000),(435,57,-1000),(435,58,-1000),(435,59,-1000),(435,60,-1000),(435,61,-1000),(435,62,-1000),(435,178,-1000),(435,180,-1000),(435,661,-1000),(435,1106,-1000),(436,51,-800),(436,52,-800),(436,53,-800),(436,54,-800),(436,55,-800),(436,56,-800),(436,57,-800),(436,58,-800),(436,59,-800),(436,60,-800),(436,61,-800),(436,62,-800),(436,178,-800),(436,180,-800),(436,216,200),(436,661,-800),(436,1106,-800),(437,205,100),(438,5,-1000),(438,11,-1000),(438,56,-1000),(438,59,-1000),(438,60,-1000),(438,178,-400),(438,201,-1000),(438,202,-100),(438,203,-1000),(438,204,-100),(438,205,-100),(438,206,-1000),(438,208,-100),(438,209,-100),(438,210,-100),(438,211,-1000),(438,212,-100),(438,213,-1000),(438,214,-100),(438,215,100),(438,216,-1000),(440,51,-1000),(440,52,-1000),(440,53,-1000),(440,54,-1000),(440,55,-1000),(440,56,-1000),(440,57,-1000),(440,58,-1000),(440,59,-1000),(440,60,-1000),(440,61,-1000),(440,62,-1000),(440,178,50),(440,180,-1000),(440,201,-1000),(440,202,-1000),(440,204,-1000),(440,205,-1000),(440,206,-1000),(440,207,-1000),(440,208,-1000),(440,209,-1000),(440,210,-1000),(440,211,-1000),(440,212,-1000),(440,213,-1000),(440,214,-1000),(440,215,-1000),(440,216,-1200),(440,661,-1000),(440,1106,-1000),(441,1,50),(441,51,-1000),(441,52,-1000),(441,53,-1000),(441,54,-1000),(441,55,-1000),(441,56,-1000),(441,57,-1000),(441,58,-1000),(441,59,-1000),(441,60,-1000),(441,61,-1000),(441,62,-1000),(441,178,50),(441,180,-1000),(441,201,-50),(441,202,-1000),(441,204,-1000),(441,205,-1000),(441,206,-50),(441,207,-1000),(441,208,-1000),(441,209,-1000),(441,210,-1000),(441,211,-1000),(441,212,-1000),(441,213,-1000),(441,214,-1000),(441,215,-1000),(441,216,-1500),(441,661,-1000),(441,1106,-1000),(442,5,25),(442,51,-1000),(442,52,-1000),(442,53,-1000),(442,54,-1000),(442,55,-1000),(442,56,-1000),(442,57,-1000),(442,58,-1000),(442,59,-1000),(442,60,-1000),(442,61,-1000),(442,62,-1000),(442,178,50),(442,180,-1000),(442,201,-250),(442,202,-1000),(442,203,25),(442,204,-1000),(442,205,-1000),(442,206,-250),(442,207,-1000),(442,208,-1000),(442,209,-1000),(442,210,-1000),(442,211,-1000),(442,212,-1000),(442,213,-1000),(442,214,-1000),(442,215,-1000),(442,216,-1200),(442,661,-1000),(442,1106,-1000),(443,3,-1000),(443,4,-1000),(443,6,-1000),(443,11,50),(443,51,-1000),(443,52,-1000),(443,53,-1000),(443,54,-1000),(443,55,-1000),(443,56,-1000),(443,57,-1000),(443,58,-1000),(443,59,-1000),(443,60,-1000),(443,61,-1000),(443,62,-1000),(443,178,50),(443,180,-1000),(443,202,-1000),(443,203,50),(443,204,-1000),(443,205,-1000),(443,207,-1000),(443,208,-1000),(443,209,-1000),(443,210,-1000),(443,211,-1000),(443,212,-1000),(443,213,-1000),(443,214,-1000),(443,215,-1000),(443,216,-1200),(443,661,-1000),(443,1106,-1000),(444,7,50),(444,51,-1000),(444,52,-1000),(444,53,-1000),(444,54,-1000),(444,55,-1000),(444,56,-1000),(444,57,-1000),(444,58,-1000),(444,59,-1000),(444,60,-1000),(444,61,-1000),(444,62,-1000),(444,178,50),(444,180,-1000),(444,202,-1000),(444,204,-1000),(444,205,-1000),(444,207,-1000),(444,208,-1000),(444,209,-1000),(444,210,-1000),(444,211,-1000),(444,212,-1000),(444,213,-1000),(444,214,-1000),(444,215,-1000),(444,216,-1200),(444,661,-1000),(444,1106,-1000),(445,3,-1000),(445,4,-1000),(445,6,-1000),(445,8,-1000),(445,10,50),(445,12,-1000),(445,13,-1000),(445,14,-1000),(445,15,50),(445,51,-1000),(445,52,-1000),(445,53,-1000),(445,54,-1000),(445,55,-1000),(445,56,-1000),(445,57,-1000),(445,58,-1000),(445,59,-1000),(445,60,-1000),(445,61,-1000),(445,62,-1000),(445,178,50),(445,180,-1000),(445,202,-1000),(445,203,50),(445,204,-1000),(445,205,-1000),(445,207,-1000),(445,208,-1000),(445,209,-1000),(445,210,-1000),(445,211,-1000),(445,212,-1000),(445,213,-1000),(445,214,-1000),(445,215,-1000),(445,216,-1500),(445,661,-1000),(445,1106,-1000),(446,51,-1000),(446,52,-1000),(446,53,-1000),(446,54,-1000),(446,55,-1000),(446,56,-1000),(446,57,-1000),(446,58,-1000),(446,59,-1000),(446,60,-1000),(446,61,-1000),(446,62,-1000),(446,178,-1000),(446,180,-1000),(446,201,-1000),(446,202,-1000),(446,203,-1000),(446,204,-1000),(446,205,-1000),(446,206,-1000),(446,207,-1000),(446,208,-1000),(446,209,-1000),(446,210,-1000),(446,211,-1000),(446,212,-1000),(446,213,-1000),(446,214,-1000),(446,215,-1000),(446,216,-1000),(446,661,-1000),(446,1106,-1000),(447,51,200),(447,52,200),(447,53,200),(447,54,200),(447,55,200),(447,56,200),(447,57,200),(447,58,200),(447,59,200),(447,60,200),(447,61,200),(447,62,500),(447,178,200),(447,180,200),(447,661,200),(447,1106,200),(448,51,-550),(448,52,-550),(448,53,-550),(448,54,-550),(448,55,-550),(448,56,-550),(448,57,-550),(448,58,-550),(448,59,-550),(448,60,-550),(448,61,-550),(448,62,-550),(448,178,-550),(448,180,-550),(448,211,100),(448,661,-550),(448,1106,-550),(449,5,-400),(449,11,-400),(449,56,-400),(449,59,-400),(449,60,-400),(449,178,-400),(449,201,-400),(449,203,-400),(449,206,-400),(450,51,-1000),(450,52,-1000),(450,53,-1000),(450,54,-1000),(450,55,-1000),(450,56,-1000),(450,57,-1000),(450,58,-1000),(450,59,-1000),(450,60,-1000),(450,61,-1000),(450,62,-1000),(450,178,-1000),(450,180,-1000),(450,661,-1000),(450,1106,-1000),(451,51,-800),(451,52,-800),(451,53,-800),(451,54,-800),(451,55,-800),(451,56,-800),(451,57,-800),(451,58,-800),(451,59,-800),(451,60,-800),(451,61,-800),(451,62,-800),(451,178,-800),(451,180,-800),(451,661,-800),(451,1106,-800),(452,6,150),(452,51,-600),(452,52,-1000),(452,53,-1000),(452,54,-600),(452,55,-600),(452,56,-1000),(452,57,-600),(452,58,-1000),(452,59,-1000),(452,60,-1000),(452,61,-600),(452,62,-1000),(452,178,-1000),(452,180,-1000),(452,215,150),(452,661,-600),(452,1106,-600),(454,51,-1000),(454,52,-1000),(454,53,-1000),(454,54,-1000),(454,55,-1000),(454,56,-1000),(454,57,-1000),(454,58,-1000),(454,59,-1000),(454,60,-1000),(454,61,-1000),(454,62,-1000),(454,178,-1000),(454,180,-1000),(454,201,-1000),(454,202,-1000),(454,203,-1000),(454,204,-1000),(454,205,-1000),(454,206,-1000),(454,207,-1000),(454,208,-1000),(454,209,-1000),(454,210,-1000),(454,211,-1000),(454,212,-1000),(454,213,-1000),(454,214,-1000),(454,215,-1000),(454,216,-1000),(454,661,-1000),(454,1106,-1000),(455,2,-1000),(455,3,-1000),(455,4,-1000),(455,5,-1000),(455,6,-1000),(455,8,-1000),(455,10,-1000),(455,11,-1000),(455,12,-1000),(455,13,-1000),(455,14,-1000),(455,15,-1000),(455,16,-1000),(455,51,-1000),(455,52,-1000),(455,53,-1000),(455,54,-1000),(455,55,-1000),(455,56,-1000),(455,57,-1000),(455,58,-1000),(455,59,-1000),(455,60,-1000),(455,61,-1000),(455,62,-1000),(455,178,-1000),(455,180,-1000),(455,201,-1000),(455,202,-1000),(455,203,-1000),(455,204,-1000),(455,205,-1000),(455,206,-1000),(455,207,-1000),(455,208,-1000),(455,209,-1000),(455,210,-1000),(455,211,-1000),(455,212,-1000),(455,213,-1000),(455,214,-1000),(455,215,-1000),(455,216,100),(455,661,-1000),(455,1106,-1000),(457,51,-800),(457,52,-800),(457,53,-800),(457,54,-800),(457,55,-800),(457,56,-800),(457,57,-800),(457,58,-800),(457,59,-800),(457,60,-800),(457,61,-800),(457,62,-800),(457,178,-800),(457,180,-800),(457,661,-800),(457,1106,-800),(459,205,200),(460,51,-200),(460,52,-200),(460,53,-200),(460,54,-200),(460,55,-200),(460,56,-200),(460,57,-200),(460,58,-150),(460,59,-200),(460,60,-200),(460,61,-200),(460,62,-200),(460,178,-200),(460,180,-200),(460,202,100),(460,661,-200),(460,1106,-200),(461,51,-1000),(461,52,-1000),(461,53,-1000),(461,54,-1000),(461,55,-1000),(461,56,-1000),(461,57,-1000),(461,58,-1000),(461,59,-1000),(461,60,-1000),(461,61,-1000),(461,62,-1000),(461,178,-1000),(461,180,-1000),(461,661,-1000),(461,1106,-1000),(462,51,-800),(462,52,-800),(462,53,-800),(462,54,-800),(462,55,-800),(462,56,-800),(462,57,-800),(462,58,-800),(462,59,-800),(462,60,-800),(462,61,-800),(462,62,-800),(462,178,-800),(462,180,-800),(462,661,-800),(462,1106,-800),(463,51,-200),(463,52,-200),(463,53,-200),(463,54,-200),(463,55,-200),(463,56,-200),(463,57,-200),(463,58,-200),(463,59,-200),(463,60,-200),(463,61,-200),(463,62,-200),(463,178,-200),(463,180,-200),(463,661,-200),(463,1106,-200),(467,51,-1000),(467,52,-1000),(467,53,-1000),(467,54,-1000),(467,55,-1000),(467,56,-1000),(467,57,-1000),(467,58,-1000),(467,59,-1000),(467,60,-1000),(467,61,-1000),(467,62,-1000),(467,178,-1000),(467,180,-1000),(467,661,-1000),(467,1106,-1000),(468,51,-1000),(468,52,-1000),(468,53,-1000),(468,54,-1000),(468,55,-1000),(468,56,-1000),(468,57,-1000),(468,58,-1000),(468,59,-1000),(468,60,-1000),(468,61,-1000),(468,62,-1000),(468,178,-1000),(468,180,-1000),(468,661,-1000),(468,1106,-1000),(469,5,-1000),(469,11,-1000),(469,56,-1000),(469,59,-1000),(469,60,-1000),(469,178,-400),(469,201,-1000),(469,202,-100),(469,203,-1000),(469,204,-100),(469,205,-100),(469,206,-1000),(469,208,-100),(469,209,-100),(469,210,-100),(469,211,-1000),(469,212,-100),(469,213,-1000),(469,214,-100),(469,215,100),(469,216,-1000),(471,51,-800),(471,52,-800),(471,53,-800),(471,54,-800),(471,55,-800),(471,56,-800),(471,57,-800),(471,58,-800),(471,59,-800),(471,60,-800),(471,61,-800),(471,62,-800),(471,178,-800),(471,180,-800),(471,211,200),(471,661,-800),(471,1106,-800),(472,51,-1000),(472,52,-1000),(472,53,-1000),(472,54,-1000),(472,55,-1000),(472,56,-1000),(472,57,-1000),(472,58,-1000),(472,59,-1000),(472,60,-1000),(472,61,-1000),(472,62,-1000),(472,178,-1000),(472,180,-1000),(472,661,-1000),(472,1106,-1000),(473,5,-300),(473,11,-300),(473,56,-500),(473,59,-500),(473,60,-500),(473,178,-500),(474,51,-99),(474,52,-99),(474,53,-99),(474,54,-99),(474,55,-99),(474,56,-99),(474,57,-99),(474,58,-99),(474,59,-99),(474,60,-99),(474,61,-99),(474,62,-99),(474,178,-99),(474,180,-99),(474,661,-99),(474,1106,-99),(475,51,-875),(475,52,-875),(475,53,-875),(475,54,-875),(475,55,-875),(475,56,-875),(475,57,-875),(475,58,-875),(475,59,-875),(475,60,-875),(475,61,-875),(475,62,-875),(475,178,-875),(475,180,-875),(475,661,-875),(475,1106,-875),(548,51,-1000),(548,52,-1000),(548,53,-1000),(548,54,-1000),(548,55,-1000),(548,56,-1000),(548,57,-1000),(548,58,-1000),(548,59,-1000),(548,60,-1000),(548,61,-1000),(548,62,-1000),(548,178,-1000),(548,180,-1000),(548,661,-1000),(548,1106,-1000),(680,51,-100),(680,52,-100),(680,53,-100),(680,54,-100),(680,55,-100),(680,56,-100),(680,57,-100),(680,58,-100),(680,59,-100),(680,60,-100),(680,61,-100),(680,62,-100),(680,178,-100),(680,180,-100),(680,661,-100),(680,1106,-100),(711,51,-750),(711,52,-750),(711,53,-750),(711,54,-750),(711,55,-750),(711,56,-750),(711,57,-750),(711,58,-750),(711,59,-750),(711,60,-750),(711,61,-750),(711,62,-750),(711,178,-750),(711,180,-750),(711,661,-750),(711,1106,-750),(712,51,-750),(712,52,-750),(712,53,-750),(712,54,-750),(712,55,-750),(712,56,-750),(712,57,-750),(712,58,-750),(712,59,-750),(712,60,-750),(712,61,-750),(712,62,-750),(712,178,-750),(712,180,-750),(712,661,-750),(712,1106,-750),(713,51,-1000),(713,52,-1000),(713,53,-1000),(713,54,-1000),(713,55,-1000),(713,56,-1000),(713,57,-1000),(713,58,-1000),(713,59,-1000),(713,60,-1000),(713,61,-1000),(713,62,-1000),(713,178,-1000),(713,180,-1000),(713,661,-1000),(713,1106,-1000),(714,51,-1000),(714,52,-1000),(714,53,-1000),(714,54,-1000),(714,55,-1000),(714,56,-1000),(714,57,-1000),(714,58,-1000),(714,59,-1000),(714,60,-1000),(714,61,-1000),(714,62,-1000),(714,178,-1000),(714,180,-1000),(714,661,-1000),(714,1106,-1000),(715,51,-1000),(715,52,-1000),(715,53,-1000),(715,54,-1000),(715,55,-1000),(715,56,-1000),(715,57,-1000),(715,58,-1000),(715,59,-1000),(715,60,-1000),(715,61,-1000),(715,62,-1000),(715,178,-1000),(715,180,-1000),(715,661,-1000),(715,1106,-1000),(716,51,-1000),(716,52,-1000),(716,53,-1000),(716,54,-1000),(716,55,-1000),(716,56,-1000),(716,57,-1000),(716,58,-1000),(716,59,-1000),(716,60,-1000),(716,61,-1000),(716,62,-1000),(716,178,-1000),(716,180,-1000),(716,661,-1000),(716,1106,-1000),(720,51,375),(720,52,375),(720,54,375),(720,55,375),(720,56,0),(720,58,375),(720,59,0),(720,60,0),(720,61,375),(720,180,375),(720,661,375),(720,1106,375),(721,51,375),(721,52,375),(721,54,375),(721,55,375),(721,56,0),(721,58,375),(721,59,0),(721,60,0),(721,61,375),(721,180,375),(721,661,375),(721,1106,375),(1007,51,-2000),(1007,52,-2000),(1007,53,-2000),(1007,54,-2000),(1007,55,-2000),(1007,56,-2000),(1007,57,-2000),(1007,58,-2000),(1007,59,-2000),(1007,60,-2000),(1007,61,-2000),(1007,62,-2000),(1007,178,-2000),(1007,180,-2000),(1007,661,-2000),(1007,1106,-2000),(1010,51,-2000),(1010,52,-2000),(1010,53,-2000),(1010,54,-2000),(1010,55,-2000),(1010,56,-2000),(1010,57,-2000),(1010,58,-2000),(1010,59,-2000),(1010,60,-2000),(1010,61,-2000),(1010,62,-2000),(1010,178,-2000),(1010,180,-2000),(1010,661,-2000),(1010,1106,-2000),(1013,51,-2000),(1013,52,-2000),(1013,53,-2000),(1013,54,-2000),(1013,55,-2000),(1013,56,-2000),(1013,57,-2000),(1013,58,-2000),(1013,59,-2000),(1013,60,-2000),(1013,61,-2000),(1013,62,-2000),(1013,178,-2000),(1013,180,-2000),(1013,661,-2000),(1013,1106,-2000),(1016,51,-800),(1016,52,-800),(1016,53,-800),(1016,54,-800),(1016,55,-800),(1016,56,-800),(1016,57,-800),(1016,58,-800),(1016,59,-800),(1016,60,-800),(1016,61,-800),(1016,62,-800),(1016,178,-800),(1016,180,-800),(1016,661,-800),(1016,1106,-800),(1021,201,-100),(1021,202,-100),(1021,203,-100),(1021,204,-600),(1021,205,-100),(1021,206,-100),(1021,207,-100),(1021,208,-600),(1021,209,-100),(1021,210,-600),(1021,211,-100),(1021,212,-600),(1021,213,-100),(1021,214,-100),(1021,215,-600),(1021,216,-100),(1021,396,-100),(1022,201,-1000),(1022,203,-1000),(1022,206,-1000),(1022,211,-1000),(1022,213,-500),(1023,201,-600),(1023,202,-100),(1023,203,-600),(1023,204,-100),(1023,205,-100),(1023,206,-600),(1023,207,-100),(1023,208,-100),(1023,209,-100),(1023,210,-100),(1023,211,-600),(1023,212,-100),(1023,213,-100),(1023,214,-100),(1023,215,-100),(1023,216,-100),(1023,396,-100),(1024,51,-2000),(1024,52,-2000),(1024,53,-2000),(1024,54,-2000),(1024,55,-2000),(1024,56,-2000),(1024,57,-2000),(1024,58,-2000),(1024,59,-2000),(1024,60,-2000),(1024,61,-2000),(1024,62,-2000),(1024,178,-2000),(1024,180,-2000),(1024,661,-2000),(1024,1106,-2000),(1025,51,-2000),(1025,52,-2000),(1025,53,-2000),(1025,54,-2000),(1025,55,-2000),(1025,56,-2000),(1025,57,-2000),(1025,58,-2000),(1025,59,-2000),(1025,60,-2000),(1025,61,-2000),(1025,62,-2000),(1025,178,-2000),(1025,180,-2000),(1025,661,-2000),(1025,1106,-2000),(1026,51,-2000),(1026,52,-2000),(1026,53,-2000),(1026,54,-2000),(1026,55,-2000),(1026,56,-2000),(1026,57,-2000),(1026,58,-2000),(1026,59,-2000),(1026,60,-2000),(1026,61,-2000),(1026,62,-2000),(1026,178,-2000),(1026,180,-2000),(1026,661,-2000),(1026,1106,-2000),(1027,51,-2000),(1027,52,-2000),(1027,53,-2000),(1027,54,-2000),(1027,55,-2000),(1027,56,-2000),(1027,57,-2000),(1027,58,-2000),(1027,59,-2000),(1027,60,-2000),(1027,61,-2000),(1027,62,-2000),(1027,178,-2000),(1027,180,-2000),(1027,661,-2000),(1027,1106,-2000),(1028,51,-2000),(1028,52,-2000),(1028,53,-2000),(1028,54,-2000),(1028,55,-2000),(1028,56,-2000),(1028,57,-2000),(1028,58,-2000),(1028,59,-2000),(1028,60,-2000),(1028,61,-2000),(1028,62,-2000),(1028,178,-2000),(1028,180,-2000),(1028,661,-2000),(1028,1106,-2000),(1029,51,-2000),(1029,52,-2000),(1029,53,-2000),(1029,54,-2000),(1029,55,-2000),(1029,56,-2000),(1029,57,-2000),(1029,58,-2000),(1029,59,-2000),(1029,60,-2000),(1029,61,-2000),(1029,62,-2000),(1029,178,-2000),(1029,180,-2000),(1029,661,-2000),(1029,1106,-2000),(1030,51,-2000),(1030,52,-2000),(1030,53,-2000),(1030,54,-2000),(1030,55,-2000),(1030,56,-2000),(1030,57,-2000),(1030,58,-2000),(1030,59,-2000),(1030,60,-2000),(1030,61,-2000),(1030,62,-2000),(1030,178,-2000),(1030,180,-2000),(1030,661,-2000),(1030,1106,-2000),(1031,51,-2000),(1031,52,-2000),(1031,53,-2000),(1031,54,-2000),(1031,55,-2000),(1031,56,-2000),(1031,57,-2000),(1031,58,-2000),(1031,59,-2000),(1031,60,-2000),(1031,61,-2000),(1031,62,-2000),(1031,178,-2000),(1031,180,-2000),(1031,661,-2000),(1031,1106,-2000),(1032,51,-2000),(1032,52,-2000),(1032,53,-2000),(1032,54,-2000),(1032,55,-2000),(1032,56,-2000),(1032,57,-2000),(1032,58,-2000),(1032,59,-2000),(1032,60,-2000),(1032,61,-2000),(1032,62,-2000),(1032,178,-2000),(1032,180,-2000),(1032,661,-2000),(1032,1106,-2000),(1033,51,-2000),(1033,52,-2000),(1033,53,-2000),(1033,54,-2000),(1033,55,-2000),(1033,56,-2000),(1033,57,-2000),(1033,58,-2000),(1033,59,-2000),(1033,60,-2000),(1033,61,-2000),(1033,62,-2000),(1033,178,-2000),(1033,180,-2000),(1033,661,-2000),(1033,1106,-2000),(1034,51,-2000),(1034,52,-2000),(1034,53,-2000),(1034,54,-2000),(1034,55,-2000),(1034,56,-2000),(1034,57,-2000),(1034,58,-2000),(1034,59,-2000),(1034,60,-2000),(1034,61,-2000),(1034,62,-2000),(1034,178,-2000),(1034,180,-2000),(1034,661,-2000),(1034,1106,-2000),(1035,51,-2000),(1035,52,-2000),(1035,53,-2000),(1035,54,-2000),(1035,55,-2000),(1035,56,-2000),(1035,57,-2000),(1035,58,-2000),(1035,59,-2000),(1035,60,-2000),(1035,61,-2000),(1035,62,-2000),(1035,178,-2000),(1035,180,-2000),(1035,661,-2000),(1035,1106,-2000),(1049,51,-2000),(1049,52,-2000),(1049,53,-2000),(1049,54,-2000),(1049,55,-2000),(1049,56,-2000),(1049,57,-2000),(1049,58,-2000),(1049,59,-2000),(1049,60,-2000),(1049,61,-2000),(1049,62,-2000),(1049,178,-2000),(1049,180,-2000),(1049,661,-2000),(1049,1106,-2000),(1051,51,-2000),(1051,52,-2000),(1051,53,-2000),(1051,54,-2000),(1051,55,-2000),(1051,56,-2000),(1051,57,-2000),(1051,58,-2000),(1051,59,-2000),(1051,60,-2000),(1051,61,-2000),(1051,62,-2000),(1051,178,-2000),(1051,180,-2000),(1051,661,-2000),(1051,1106,-2000),(1052,51,-2000),(1052,52,-2000),(1052,53,-2000),(1052,54,-2000),(1052,55,-2000),(1052,56,-2000),(1052,57,-2000),(1052,58,-2000),(1052,59,-2000),(1052,60,-2000),(1052,61,-2000),(1052,62,-2000),(1052,178,-2000),(1052,180,-2000),(1052,661,-2000),(1052,1106,-2000),(1053,51,-2000),(1053,52,-2000),(1053,53,-2000),(1053,54,-2000),(1053,55,-2000),(1053,56,-2000),(1053,57,-2000),(1053,58,-2000),(1053,59,-2000),(1053,60,-2000),(1053,61,-2000),(1053,62,-2000),(1053,178,-2000),(1053,180,-2000),(1053,661,-2000),(1053,1106,-2000),(1054,51,-2000),(1054,52,-2000),(1054,53,-2000),(1054,54,-2000),(1054,55,-2000),(1054,56,-2000),(1054,57,-2000),(1054,58,-2000),(1054,59,-2000),(1054,60,-2000),(1054,61,-2000),(1054,62,-2000),(1054,178,-2000),(1054,180,-2000),(1054,661,-2000),(1054,1106,-2000),(1055,51,-500),(1055,52,-500),(1055,53,-500),(1055,54,-500),(1055,55,-500),(1055,56,-500),(1055,57,-500),(1055,58,-500),(1055,59,-500),(1055,60,-500),(1055,61,-500),(1055,62,-500),(1055,178,-500),(1055,180,-500),(1055,661,-500),(1055,1106,-500),(1056,51,-2000),(1056,52,-2000),(1056,53,-2000),(1056,54,-2000),(1056,55,-2000),(1056,56,-2000),(1056,57,-2000),(1056,58,-2000),(1056,59,-2000),(1056,60,-2000),(1056,61,-2000),(1056,62,-2000),(1056,178,-2000),(1056,180,-2000),(1056,661,-2000),(1056,1106,-2000),(1058,51,-2000),(1058,52,-2000),(1058,53,-2000),(1058,54,-2000),(1058,55,-2000),(1058,56,-2000),(1058,57,-2000),(1058,58,-2000),(1058,59,-2000),(1058,60,-2000),(1058,61,-2000),(1058,62,-2000),(1058,178,-2000),(1058,180,-2000),(1058,661,-2000),(1058,1106,-2000),(1059,51,-1000),(1059,52,-1000),(1059,53,-1000),(1059,54,-1000),(1059,55,-1000),(1059,56,-1000),(1059,57,-1000),(1059,58,-1000),(1059,59,-1000),(1059,60,-1000),(1059,61,-1000),(1059,62,-1000),(1059,178,-1000),(1059,180,-1000),(1059,661,-1000),(1059,1106,-1000),(1062,51,-500),(1062,52,-500),(1062,53,-500),(1062,54,-500),(1062,55,-500),(1062,56,-500),(1062,57,-500),(1062,58,-500),(1062,59,-500),(1062,60,-500),(1062,61,-500),(1062,62,-500),(1062,178,-500),(1062,180,-500),(1062,661,-500),(1062,1106,-500),(1066,51,-1000),(1066,52,-1000),(1066,53,-1000),(1066,54,-1000),(1066,55,-1000),(1066,56,-1000),(1066,57,-1000),(1066,58,-1000),(1066,59,-1000),(1066,60,-1000),(1066,61,-1000),(1066,62,-1000),(1066,178,-1000),(1066,180,-1000),(1066,661,-1000),(1066,1106,-1000),(1068,51,-1000),(1068,52,-1000),(1068,53,-1000),(1068,54,-1000),(1068,55,-1000),(1068,56,-1000),(1068,57,-1000),(1068,58,-1000),(1068,59,-1000),(1068,60,-1000),(1068,61,-1000),(1068,62,-1000),(1068,178,-1000),(1068,180,-1000),(1068,661,-1000),(1068,1106,-1000),(1069,51,-1000),(1069,52,-1000),(1069,53,-1000),(1069,54,-1000),(1069,55,-1000),(1069,56,-1000),(1069,57,-1000),(1069,58,-1000),(1069,59,-1000),(1069,60,-1000),(1069,61,-1000),(1069,62,-1000),(1069,178,-1000),(1069,180,-1000),(1069,661,-1000),(1069,1106,-1000),(1070,51,-1000),(1070,52,-1000),(1070,53,-1000),(1070,54,-1000),(1070,55,-1000),(1070,56,-1000),(1070,57,-1000),(1070,58,-1000),(1070,59,-1000),(1070,60,-1000),(1070,61,-1000),(1070,62,-1000),(1070,178,-1000),(1070,180,-1000),(1070,661,-1000),(1070,1106,-1000),(1071,51,-1000),(1071,52,-1000),(1071,53,-1000),(1071,54,-1000),(1071,55,-1000),(1071,56,-1000),(1071,57,-1000),(1071,58,-1000),(1071,59,-1000),(1071,60,-1000),(1071,61,-1000),(1071,62,-1000),(1071,178,-1000),(1071,180,-1000),(1071,661,-1000),(1071,1106,-1000),(1072,51,-1000),(1072,52,-1000),(1072,53,-1000),(1072,54,-1000),(1072,55,-1000),(1072,56,-1000),(1072,57,-1000),(1072,58,-1000),(1072,59,-1000),(1072,60,-1000),(1072,61,-1000),(1072,62,-1000),(1072,178,-1000),(1072,180,-1000),(1072,661,-1000),(1072,1106,-1000),(1073,51,-1000),(1073,52,-1000),(1073,53,-1000),(1073,54,-1000),(1073,55,-1000),(1073,56,-1000),(1073,57,-1000),(1073,58,-1000),(1073,59,-1000),(1073,60,-1000),(1073,61,-1000),(1073,62,-1000),(1073,178,-1000),(1073,180,-1000),(1073,661,-1000),(1073,1106,-1000),(1074,51,-1000),(1074,52,-1000),(1074,53,-1000),(1074,54,-1000),(1074,55,-1000),(1074,56,-1000),(1074,57,-1000),(1074,58,-1000),(1074,59,-1000),(1074,60,-1000),(1074,61,-1000),(1074,62,-1000),(1074,178,-1000),(1074,180,-1000),(1074,661,-1000),(1074,1106,-1000),(1075,51,-1000),(1075,52,-1000),(1075,53,-1000),(1075,54,-1000),(1075,55,-1000),(1075,56,-1000),(1075,57,-1000),(1075,58,-1000),(1075,59,-1000),(1075,60,-1000),(1075,61,-1000),(1075,62,-1000),(1075,178,-1000),(1075,180,-1000),(1075,661,-1000),(1075,1106,-1000),(1076,51,-1000),(1076,52,-1000),(1076,53,-1000),(1076,54,-1000),(1076,55,-1000),(1076,56,-1000),(1076,57,-1000),(1076,58,-1000),(1076,59,-1000),(1076,60,-1000),(1076,61,-1000),(1076,62,-1000),(1076,178,-1000),(1076,180,-1000),(1076,661,-1000),(1076,1106,-1000),(1077,51,-1000),(1077,52,-1000),(1077,53,-1000),(1077,54,-1000),(1077,55,-1000),(1077,56,-1000),(1077,57,-1000),(1077,58,-1000),(1077,59,-1000),(1077,60,-1000),(1077,61,-1000),(1077,62,-1000),(1077,178,-1000),(1077,180,-1000),(1077,661,-1000),(1077,1106,-1000),(1078,51,-1000),(1078,52,-1000),(1078,53,-1000),(1078,54,-1000),(1078,55,-1000),(1078,56,-1000),(1078,57,-1000),(1078,58,-1000),(1078,59,-1000),(1078,60,-1000),(1078,61,-1000),(1078,62,-1000),(1078,178,-1000),(1078,180,-1000),(1078,661,-1000),(1078,1106,-1000),(1079,51,-1000),(1079,52,-1000),(1079,53,-1000),(1079,54,-1000),(1079,55,-1000),(1079,56,-1000),(1079,57,-1000),(1079,58,-1000),(1079,59,-1000),(1079,60,-1000),(1079,61,-1000),(1079,62,-1000),(1079,178,-1000),(1079,180,-1000),(1079,661,-1000),(1079,1106,-1000),(1080,51,-1000),(1080,52,-1000),(1080,53,-1000),(1080,54,-1000),(1080,55,-1000),(1080,56,-1000),(1080,57,-1000),(1080,58,-1000),(1080,59,-1000),(1080,60,-1000),(1080,61,-1000),(1080,62,-1000),(1080,178,-1000),(1080,180,-1000),(1080,661,-1000),(1080,1106,-1000),(1086,51,-2000),(1086,52,-2000),(1086,53,-2000),(1086,54,-2000),(1086,55,-2000),(1086,56,-2000),(1086,57,-2000),(1086,58,-2000),(1086,59,-2000),(1086,60,-2000),(1086,61,-2000),(1086,62,-2000),(1086,178,-2000),(1086,180,-2000),(1086,661,-2000),(1086,1106,-2000),(1088,51,-1000),(1088,52,-1000),(1088,53,-1000),(1088,54,-1000),(1088,55,-1000),(1088,56,-1000),(1088,57,-1000),(1088,58,-1000),(1088,59,-1000),(1088,60,-1000),(1088,61,-1000),(1088,62,-1000),(1088,178,-1000),(1088,180,-1000),(1088,661,-1000),(1088,1106,-1000),(1089,51,-1000),(1089,52,-1000),(1089,53,-1000),(1089,54,-1000),(1089,55,-1000),(1089,56,-1000),(1089,57,-1000),(1089,58,-1000),(1089,59,-1000),(1089,60,-1000),(1089,61,-1000),(1089,62,-1000),(1089,178,-1000),(1089,180,-1000),(1089,661,-1000),(1089,1106,-1000),(1090,51,-1000),(1090,52,-1000),(1090,53,-1000),(1090,54,-1000),(1090,55,-1000),(1090,56,-1000),(1090,57,-1000),(1090,58,-1000),(1090,59,-1000),(1090,60,-1000),(1090,61,-1000),(1090,62,-1000),(1090,178,-1000),(1090,180,-1000),(1090,661,-1000),(1090,1106,-1000),(1091,51,-1000),(1091,52,-1000),(1091,53,-1000),(1091,54,-1000),(1091,55,-1000),(1091,56,-1000),(1091,57,-1000),(1091,58,-1000),(1091,59,-1000),(1091,60,-1000),(1091,61,-1000),(1091,62,-1000),(1091,178,-1000),(1091,180,-1000),(1091,661,-1000),(1091,1106,-1000),(1092,51,-1000),(1092,52,-1000),(1092,53,-1000),(1092,54,-1000),(1092,55,-1000),(1092,56,-1000),(1092,57,-1000),(1092,58,-1000),(1092,59,-1000),(1092,60,-1000),(1092,61,-1000),(1092,62,-1000),(1092,178,-1000),(1092,180,-1000),(1092,661,-1000),(1092,1106,-1000),(1093,51,-1000),(1093,52,-1000),(1093,53,-1000),(1093,54,-1000),(1093,55,-1000),(1093,56,-1000),(1093,57,-1000),(1093,58,-1000),(1093,59,-1000),(1093,60,-1000),(1093,61,-1000),(1093,62,-1000),(1093,178,-1000),(1093,180,-1000),(1093,661,-1000),(1093,1106,-1000),(1094,51,-1000),(1094,52,-1000),(1094,53,-1000),(1094,54,-1000),(1094,55,-1000),(1094,56,-1000),(1094,57,-1000),(1094,58,-1000),(1094,59,-1000),(1094,60,-1000),(1094,61,-1000),(1094,62,-1000),(1094,178,-1000),(1094,180,-1000),(1094,661,-1000),(1094,1106,-1000),(1100,51,-1000),(1100,52,-1000),(1100,53,-1000),(1100,54,-1000),(1100,55,-1000),(1100,56,-1000),(1100,57,-1000),(1100,58,-1000),(1100,59,-1000),(1100,60,-1000),(1100,61,-1000),(1100,62,-1000),(1100,178,-1000),(1100,180,-1000),(1100,661,-1000),(1100,1106,-1000),(1101,51,-1000),(1101,52,-1000),(1101,53,-1000),(1101,54,-1000),(1101,55,-1000),(1101,56,-1000),(1101,57,-1000),(1101,58,-1000),(1101,59,-1000),(1101,60,-1000),(1101,61,-1000),(1101,62,-1000),(1101,178,-1000),(1101,180,-1000),(1101,661,-1000),(1101,1106,-1000),(1103,51,-1000),(1103,52,-1000),(1103,53,-1000),(1103,54,-1000),(1103,55,-1000),(1103,56,-1000),(1103,57,-1000),(1103,58,-1000),(1103,59,-1000),(1103,60,-1000),(1103,61,-1000),(1103,62,-1000),(1103,178,-1000),(1103,180,-1000),(1103,661,-1000),(1103,1106,-1000),(1104,51,-500),(1104,52,-500),(1104,53,-500),(1104,54,-500),(1104,55,-500),(1104,56,-500),(1104,57,-500),(1104,58,-500),(1104,59,-500),(1104,60,-500),(1104,61,-500),(1104,62,-500),(1104,178,-500),(1104,180,-500),(1104,661,-500),(1104,1106,-500),(1105,51,-200),(1105,52,-200),(1105,53,-200),(1105,54,-200),(1105,55,-200),(1105,56,-200),(1105,57,-200),(1105,58,-200),(1105,59,-200),(1105,60,-200),(1105,61,-200),(1105,62,-200),(1105,178,-200),(1105,180,-200),(1105,661,-200),(1105,1106,-200),(1107,51,-700),(1107,52,-700),(1107,53,-700),(1107,54,-700),(1107,55,-700),(1107,56,-700),(1107,57,-700),(1107,58,-700),(1107,59,-700),(1107,60,-700),(1107,61,-700),(1107,62,-700),(1107,178,-700),(1107,180,-700),(1107,661,-700),(1107,1106,-700),(1111,51,-1000),(1111,52,-1000),(1111,53,-1000),(1111,54,-1000),(1111,55,-1000),(1111,56,-1000),(1111,57,-1000),(1111,58,-1000),(1111,59,-1000),(1111,60,-1000),(1111,61,-1000),(1111,62,-1000),(1111,178,-1000),(1111,180,-1000),(1111,661,-1000),(1111,1106,-1000),(1112,51,-1000),(1112,52,-1000),(1112,53,-1000),(1112,54,-1000),(1112,55,-1000),(1112,56,-1000),(1112,57,-1000),(1112,58,-1000),(1112,59,-1000),(1112,60,-1000),(1112,61,-1000),(1112,62,-1000),(1112,178,-1000),(1112,180,-1000),(1112,661,-1000),(1112,1106,-1000),(1113,51,-1000),(1113,52,-1000),(1113,53,-1000),(1113,54,-1000),(1113,55,-1000),(1113,56,-1000),(1113,57,-1000),(1113,58,-1000),(1113,59,-1000),(1113,60,-1000),(1113,61,-1000),(1113,62,-1000),(1113,178,-1000),(1113,180,-1000),(1113,661,-1000),(1113,1106,-1000),(1114,51,-1000),(1114,52,-1000),(1114,53,-1000),(1114,54,-1000),(1114,55,-1000),(1114,56,-1000),(1114,57,-1000),(1114,58,-1000),(1114,59,-1000),(1114,60,-1000),(1114,61,-1000),(1114,62,-1000),(1114,178,-1000),(1114,180,-1000),(1114,661,-1000),(1114,1106,-1000),(1115,51,-1000),(1115,52,-1000),(1115,53,-1000),(1115,54,-1000),(1115,55,-1000),(1115,56,-1000),(1115,57,-1000),(1115,58,-1000),(1115,59,-1000),(1115,60,-1000),(1115,61,-1000),(1115,62,-1000),(1115,178,-1000),(1115,180,-1000),(1115,661,-1000),(1115,1106,-1000),(1120,51,-1000),(1120,52,-1000),(1120,53,-1000),(1120,54,-1000),(1120,55,-1000),(1120,56,-1000),(1120,57,-1000),(1120,58,-1000),(1120,59,-1000),(1120,60,-1000),(1120,61,-1000),(1120,62,-1000),(1120,178,-1000),(1120,180,-1000),(1120,661,-1000),(1120,1106,-1000),(1121,51,-1000),(1121,52,-1000),(1121,53,-1000),(1121,54,-1000),(1121,55,-1000),(1121,56,-1000),(1121,57,-1000),(1121,58,-1000),(1121,59,-1000),(1121,60,-1000),(1121,61,-1000),(1121,62,-1000),(1121,178,-1000),(1121,180,-1000),(1121,661,-1000),(1121,1106,-1000),(1123,51,-100),(1123,52,-100),(1123,53,-100),(1123,54,-100),(1123,55,-100),(1123,56,-100),(1123,57,-100),(1123,58,-100),(1123,59,-100),(1123,60,-100),(1123,61,-100),(1123,62,-100),(1123,178,-100),(1123,180,-100),(1123,661,-100),(1123,1106,-100),(1124,51,-1000),(1124,52,-1000),(1124,53,-1000),(1124,54,-1000),(1124,55,-1000),(1124,56,-1000),(1124,57,-1000),(1124,58,-1000),(1124,59,-1000),(1124,60,-1000),(1124,61,-1000),(1124,62,-1000),(1124,178,-1000),(1124,180,-1000),(1124,661,-1000),(1124,1106,-1000),(1125,51,-1000),(1125,52,-1000),(1125,53,-1000),(1125,54,-1000),(1125,55,-1000),(1125,56,-1000),(1125,57,-1000),(1125,58,-1000),(1125,59,-1000),(1125,60,-1000),(1125,61,-1000),(1125,62,-1000),(1125,178,-1000),(1125,180,-1000),(1125,661,-1000),(1125,1106,-1000),(1134,51,-50),(1134,52,-50),(1134,53,-50),(1134,54,-50),(1134,55,-50),(1134,56,-50),(1134,57,-50),(1134,58,-50),(1134,59,-50),(1134,60,-50),(1134,61,-50),(1134,62,-50),(1134,178,-50),(1134,180,-50),(1134,661,-50),(1134,1106,-50),(1135,51,-150),(1135,52,-150),(1135,53,-150),(1135,54,-150),(1135,55,-150),(1135,56,-150),(1135,57,-150),(1135,58,-150),(1135,59,-150),(1135,60,-150),(1135,61,-150),(1135,62,-150),(1135,178,-150),(1135,180,-150),(1135,661,-150),(1135,1106,-150),(1137,1106,100),(1140,51,-1000),(1140,52,-1000),(1140,53,-1000),(1140,54,-1000),(1140,55,-1000),(1140,56,-1000),(1140,57,-1000),(1140,58,-1000),(1140,59,-1000),(1140,60,-1000),(1140,61,-1000),(1140,62,-1000),(1140,178,-1000),(1140,180,-1000),(1140,661,-1000),(1140,1106,-1000),(1141,51,-1000),(1141,52,-1000),(1141,53,-1000),(1141,54,-1000),(1141,55,-1000),(1141,56,-1000),(1141,57,-1000),(1141,58,-1000),(1141,59,-1000),(1141,60,-1000),(1141,61,-1000),(1141,62,-1000),(1141,178,-1000),(1141,180,-1000),(1141,661,-1000),(1141,1106,-1000),(1142,51,-1000),(1142,52,-1000),(1142,53,-1000),(1142,54,-1000),(1142,55,-1000),(1142,56,-1000),(1142,57,-1000),(1142,58,-1000),(1142,59,-1000),(1142,60,-1000),(1142,61,-1000),(1142,62,-1000),(1142,178,-1000),(1142,180,-1000),(1142,661,-1000),(1142,1106,-1000),(1143,51,-500),(1143,52,-500),(1143,53,-500),(1143,54,-500),(1143,55,-500),(1143,56,-500),(1143,57,-500),(1143,58,-500),(1143,59,-500),(1143,60,-500),(1143,61,-500),(1143,62,-500),(1143,178,-500),(1143,180,-500),(1143,661,-500),(1143,1106,-500),(1144,51,-250),(1144,52,-250),(1144,53,-250),(1144,54,-250),(1144,55,-250),(1144,56,-250),(1144,57,-250),(1144,58,-250),(1144,59,-250),(1144,60,-250),(1144,61,-250),(1144,62,-250),(1144,178,-250),(1144,180,-250),(1144,661,-250),(1144,1106,-250),(1145,51,-500),(1145,52,-500),(1145,53,-500),(1145,54,-500),(1145,55,-500),(1145,56,-500),(1145,57,-500),(1145,58,-500),(1145,59,-500),(1145,60,-500),(1145,61,-500),(1145,62,-500),(1145,178,-500),(1145,180,-500),(1145,661,-500),(1145,1106,-500),(1146,51,-800),(1146,52,-800),(1146,53,-800),(1146,54,-800),(1146,55,-800),(1146,56,-800),(1146,57,-800),(1146,58,-800),(1146,59,-800),(1146,60,-800),(1146,61,-800),(1146,62,-800),(1146,178,-800),(1146,180,-800),(1146,661,-800),(1146,1106,-800),(1147,51,-800),(1147,52,-800),(1147,53,-800),(1147,54,-800),(1147,55,-800),(1147,56,-800),(1147,57,-800),(1147,58,-800),(1147,59,-800),(1147,60,-800),(1147,61,-800),(1147,62,-800),(1147,178,-800),(1147,180,-800),(1147,661,-800),(1147,1106,-800),(1148,51,-800),(1148,52,-800),(1148,53,-800),(1148,54,-800),(1148,55,-800),(1148,56,-800),(1148,57,-800),(1148,58,-800),(1148,59,-800),(1148,60,-800),(1148,61,-800),(1148,62,-800),(1148,178,-800),(1148,180,-800),(1148,661,-800),(1148,1106,-800),(1149,51,-800),(1149,52,-800),(1149,53,-800),(1149,54,-800),(1149,55,-800),(1149,56,-800),(1149,57,-800),(1149,58,-800),(1149,59,-800),(1149,60,-800),(1149,61,-800),(1149,62,-800),(1149,178,-800),(1149,180,-800),(1149,661,-800),(1149,1106,-800),(1166,51,-1000),(1166,52,-1000),(1166,53,-1000),(1166,54,-1000),(1166,55,-1000),(1166,56,-1000),(1166,57,-1000),(1166,58,-1000),(1166,59,-1000),(1166,60,-1000),(1166,61,-1000),(1166,62,-1000),(1166,178,-1000),(1166,180,-1000),(1166,661,-1000),(1166,1106,-1000),(1169,51,-100),(1169,52,-100),(1169,53,-100),(1169,54,-100),(1169,55,-100),(1169,56,-100),(1169,57,-100),(1169,58,-100),(1169,59,-100),(1169,60,-100),(1169,61,-100),(1169,62,-100),(1169,178,-100),(1169,180,-100),(1169,661,-100),(1169,1106,-100),(1170,51,-100),(1170,52,-100),(1170,53,-100),(1170,54,-100),(1170,55,-100),(1170,56,-100),(1170,57,-100),(1170,58,-100),(1170,59,-100),(1170,60,-100),(1170,61,-100),(1170,62,-100),(1170,178,-100),(1170,180,-100),(1170,661,-100),(1170,1106,-100),(1175,51,-1000),(1175,52,-1000),(1175,53,-1000),(1175,54,-1000),(1175,55,-1000),(1175,56,-1000),(1175,57,-1000),(1175,58,-1000),(1175,59,-1000),(1175,60,-1000),(1175,61,-1000),(1175,62,-1000),(1175,178,-1000),(1175,180,-1000),(1175,661,-1000),(1175,1106,-1000),(1176,51,-1000),(1176,52,-1000),(1176,53,-1000),(1176,54,-1000),(1176,55,-1000),(1176,56,-1000),(1176,57,-1000),(1176,58,-1000),(1176,59,-1000),(1176,60,-1000),(1176,61,-1000),(1176,62,-1000),(1176,178,-1000),(1176,180,-1000),(1176,661,-1000),(1176,1106,-1000),(1181,51,-1000),(1181,52,-1000),(1181,53,-1000),(1181,54,-1000),(1181,55,-1000),(1181,56,-1000),(1181,57,-1000),(1181,58,-1000),(1181,59,-1000),(1181,60,-1000),(1181,61,-1000),(1181,62,-1000),(1181,178,-1000),(1181,180,-1000),(1181,661,-1000),(1181,1106,-1000),(1182,51,-1000),(1182,52,-1000),(1182,53,-1000),(1182,54,-1000),(1182,55,-1000),(1182,56,-1000),(1182,57,-1000),(1182,58,-1000),(1182,59,-1000),(1182,60,-1000),(1182,61,-1000),(1182,62,-1000),(1182,178,-1000),(1182,180,-1000),(1182,661,-1000),(1182,1106,-1000),(1183,51,-500),(1183,52,-500),(1183,53,-500),(1183,54,-500),(1183,55,-500),(1183,56,-500),(1183,57,-500),(1183,58,-500),(1183,59,-500),(1183,60,-500),(1183,61,-500),(1183,62,-500),(1183,178,-500),(1183,180,-500),(1183,661,-500),(1183,1106,-500),(1184,51,-500),(1184,52,-500),(1184,53,-500),(1184,54,-500),(1184,55,-500),(1184,56,-500),(1184,57,-500),(1184,58,-500),(1184,59,-500),(1184,60,-500),(1184,61,-500),(1184,62,-500),(1184,178,-500),(1184,180,-500),(1184,661,-500),(1184,1106,-500),(1185,51,-500),(1185,52,-500),(1185,53,-500),(1185,54,-500),(1185,55,-500),(1185,56,-500),(1185,57,-500),(1185,58,-500),(1185,59,-500),(1185,60,-500),(1185,61,-500),(1185,62,-500),(1185,178,-500),(1185,180,-500),(1185,661,-500),(1185,1106,-500),(1186,51,-1000),(1186,52,-1000),(1186,53,-1000),(1186,54,-1000),(1186,55,-1000),(1186,56,-1000),(1186,57,-1000),(1186,58,-1000),(1186,59,-1000),(1186,60,-1000),(1186,61,-1000),(1186,62,-1000),(1186,178,-1000),(1186,180,-1000),(1186,661,-1000),(1186,1106,-1000),(1188,51,-500),(1188,52,-500),(1188,53,-500),(1188,54,-500),(1188,55,-500),(1188,56,-500),(1188,57,-500),(1188,58,-500),(1188,59,-500),(1188,60,-500),(1188,61,-500),(1188,62,-500),(1188,178,-500),(1188,180,-500),(1188,661,-500),(1188,1106,-500),(1189,51,-500),(1189,52,-500),(1189,53,-500),(1189,54,-500),(1189,55,-500),(1189,56,-500),(1189,57,-500),(1189,58,-500),(1189,59,-500),(1189,60,-500),(1189,61,-500),(1189,62,-500),(1189,178,-500),(1189,180,-500),(1189,661,-500),(1189,1106,-500),(1190,51,-500),(1190,52,-500),(1190,53,-500),(1190,54,-500),(1190,55,-500),(1190,56,-500),(1190,57,-500),(1190,58,-500),(1190,59,-500),(1190,60,-500),(1190,61,-500),(1190,62,-500),(1190,178,-500),(1190,180,-500),(1190,661,-500),(1190,1106,-500),(1191,51,-500),(1191,52,-500),(1191,53,-500),(1191,54,-500),(1191,55,-500),(1191,56,-500),(1191,57,-500),(1191,58,-500),(1191,59,-500),(1191,60,-500),(1191,61,-500),(1191,62,-500),(1191,178,-500),(1191,180,-500),(1191,661,-500),(1191,1106,-500),(1192,51,-1000),(1192,52,-1000),(1192,53,-1000),(1192,54,-1000),(1192,55,-1000),(1192,56,-1000),(1192,57,-1000),(1192,58,-1000),(1192,59,-1000),(1192,60,-1000),(1192,61,-1000),(1192,62,-1000),(1192,178,-1000),(1192,180,-1000),(1192,661,-1000),(1192,1106,-1000),(1193,51,-1000),(1193,52,-1000),(1193,53,-1000),(1193,54,-1000),(1193,55,-1000),(1193,56,-1000),(1193,57,-1000),(1193,58,-1000),(1193,59,-1000),(1193,60,-1000),(1193,61,-1000),(1193,62,-1000),(1193,178,-1000),(1193,180,-1000),(1193,661,-1000),(1193,1106,-1000),(1194,51,-1000),(1194,52,-1000),(1194,53,-1000),(1194,54,-1000),(1194,55,-1000),(1194,56,-1000),(1194,57,-1000),(1194,58,-1000),(1194,59,-1000),(1194,60,-1000),(1194,61,-1000),(1194,62,-1000),(1194,178,-1000),(1194,180,-1000),(1194,661,-1000),(1194,1106,-1000),(1195,51,-1000),(1195,52,-1000),(1195,53,-1000),(1195,54,-1000),(1195,55,-1000),(1195,56,-1000),(1195,57,-1000),(1195,58,-1000),(1195,59,-1000),(1195,60,-1000),(1195,61,-1000),(1195,62,-1000),(1195,178,-1000),(1195,180,-1000),(1195,661,-1000),(1195,1106,-1000),(1196,51,-1000),(1196,52,-1000),(1196,53,-1000),(1196,54,-1000),(1196,55,-1000),(1196,56,-1000),(1196,57,-1000),(1196,58,-1000),(1196,59,-1000),(1196,60,-1000),(1196,61,-1000),(1196,62,-1000),(1196,178,-1000),(1196,180,-1000),(1196,661,-1000),(1196,1106,-1000),(1197,51,-1000),(1197,52,-1000),(1197,53,-1000),(1197,54,-1000),(1197,55,-1000),(1197,56,-1000),(1197,57,-1000),(1197,58,-1000),(1197,59,-1000),(1197,60,-1000),(1197,61,-1000),(1197,62,-1000),(1197,178,-1000),(1197,180,-1000),(1197,661,-1000),(1197,1106,-1000),(1198,51,-1000),(1198,52,-1000),(1198,53,-1000),(1198,54,-1000),(1198,55,-1000),(1198,56,-1000),(1198,57,-1000),(1198,58,-1000),(1198,59,-1000),(1198,60,-1000),(1198,61,-1000),(1198,62,-1000),(1198,178,-1000),(1198,180,-1000),(1198,661,-1000),(1198,1106,-1000),(1199,51,-100),(1199,52,-100),(1199,53,-100),(1199,54,-100),(1199,55,-100),(1199,56,-100),(1199,57,-100),(1199,58,-100),(1199,59,-100),(1199,60,-100),(1199,61,-100),(1199,62,-100),(1199,178,-100),(1199,180,-100),(1199,661,-100),(1199,1106,-100),(1200,51,-100),(1200,52,-100),(1200,53,-100),(1200,54,-100),(1200,55,-100),(1200,56,-100),(1200,57,-100),(1200,58,-100),(1200,59,-100),(1200,60,-100),(1200,61,-100),(1200,62,-100),(1200,178,-100),(1200,180,-100),(1200,661,-100),(1200,1106,-100),(1201,51,-1000),(1201,52,-1000),(1201,53,-1000),(1201,54,-1000),(1201,55,-1000),(1201,56,-1000),(1201,57,-1000),(1201,58,-1000),(1201,59,-1000),(1201,60,-1000),(1201,61,-1000),(1201,62,-1000),(1201,178,-1000),(1201,180,-1000),(1201,661,-1000),(1201,1106,-1000),(1202,51,-1000),(1202,52,-1000),(1202,53,-1000),(1202,54,-1000),(1202,55,-1000),(1202,56,-1000),(1202,57,-1000),(1202,58,-1000),(1202,59,-1000),(1202,60,-1000),(1202,61,-1000),(1202,62,-1000),(1202,178,-1000),(1202,180,-1000),(1202,661,-1000),(1202,1106,-1000),(1203,51,-300),(1203,52,-300),(1203,53,-300),(1203,54,-300),(1203,55,-300),(1203,56,-300),(1203,57,-300),(1203,58,-300),(1203,59,-300),(1203,60,-300),(1203,61,-300),(1203,62,-300),(1203,178,-300),(1203,180,-300),(1203,661,-300),(1203,1106,-300),(1204,51,-300),(1204,52,-300),(1204,53,-300),(1204,54,-300),(1204,55,-300),(1204,56,-300),(1204,57,-300),(1204,58,-300),(1204,59,-300),(1204,60,-300),(1204,61,-300),(1204,62,-300),(1204,178,-300),(1204,180,-300),(1204,661,-300),(1204,1106,-300),(1205,51,-300),(1205,52,-300),(1205,53,-300),(1205,54,-300),(1205,55,-300),(1205,56,-300),(1205,57,-300),(1205,58,-300),(1205,59,-300),(1205,60,-300),(1205,61,-300),(1205,62,-300),(1205,178,-300),(1205,180,-300),(1205,661,-300),(1205,1106,-300),(1209,51,-500),(1209,52,-500),(1209,53,-500),(1209,54,-500),(1209,55,-500),(1209,56,-500),(1209,57,-500),(1209,58,-500),(1209,59,-500),(1209,60,-500),(1209,61,-500),(1209,62,-500),(1209,178,-500),(1209,180,-500),(1209,661,-500),(1209,1106,-500),(1210,51,-1000),(1210,52,-1000),(1210,53,-1000),(1210,54,-1000),(1210,55,-1000),(1210,56,-1000),(1210,57,-1000),(1210,58,-1000),(1210,59,-1000),(1210,60,-1000),(1210,61,-1000),(1210,62,-1000),(1210,178,-1000),(1210,180,-1000),(1210,661,-1000),(1210,1106,-1000),(1211,51,100),(1211,52,100),(1211,53,100),(1211,54,100),(1211,55,100),(1211,56,100),(1211,57,100),(1211,58,100),(1211,59,100),(1211,60,100),(1211,61,100),(1211,62,100),(1211,178,100),(1211,180,100),(1211,661,100),(1211,1106,100),(1212,51,-100),(1212,52,-100),(1212,53,-100),(1212,54,-100),(1212,55,-100),(1212,56,-100),(1212,57,-100),(1212,58,-100),(1212,59,-100),(1212,60,-100),(1212,61,-100),(1212,62,-100),(1212,178,-100),(1212,180,-100),(1212,661,-100),(1212,1106,-100),(1213,51,-1000),(1213,52,-1000),(1213,53,-1000),(1213,54,-1000),(1213,55,-1000),(1213,56,-1000),(1213,57,-1000),(1213,58,-1000),(1213,59,-1000),(1213,60,-1000),(1213,61,-1000),(1213,62,-1000),(1213,178,-1000),(1213,180,-1000),(1213,661,-1000),(1213,1106,-1000),(1216,51,-1000),(1216,52,-1000),(1216,53,-1000),(1216,54,-1000),(1216,55,-1000),(1216,56,-1000),(1216,57,-1000),(1216,58,-1000),(1216,59,-1000),(1216,60,-1000),(1216,61,-1000),(1216,62,-1000),(1216,178,-1000),(1216,180,-1000),(1216,661,-1000),(1216,1106,-1000),(1220,51,-1000),(1220,52,-1000),(1220,53,-1000),(1220,54,-1000),(1220,55,-1000),(1220,56,-1000),(1220,57,-1000),(1220,58,-1000),(1220,59,-1000),(1220,60,-1000),(1220,61,-1000),(1220,62,-1000),(1220,178,-1000),(1220,180,-1000),(1220,661,-1000),(1220,1106,-1000),(1222,51,-500),(1222,52,-500),(1222,53,-500),(1222,54,-500),(1222,55,-500),(1222,56,-500),(1222,57,-500),(1222,58,-500),(1222,59,-500),(1222,60,-500),(1222,61,-500),(1222,62,-500),(1222,178,-500),(1222,180,-500),(1222,661,-500),(1222,1106,-500),(1223,51,-500),(1223,52,-500),(1223,53,-500),(1223,54,-500),(1223,55,-500),(1223,56,-500),(1223,57,-500),(1223,58,-500),(1223,59,-500),(1223,60,-500),(1223,61,-500),(1223,62,-500),(1223,178,-500),(1223,180,-500),(1223,661,-500),(1223,1106,-500),(1224,51,-500),(1224,52,-500),(1224,53,-500),(1224,54,-500),(1224,55,-500),(1224,56,-500),(1224,57,-500),(1224,58,-500),(1224,59,-500),(1224,60,-500),(1224,61,-500),(1224,62,-500),(1224,178,-500),(1224,180,-500),(1224,661,-500),(1224,1106,-500),(1225,51,-500),(1225,52,-500),(1225,53,-500),(1225,54,-500),(1225,55,-500),(1225,56,-500),(1225,57,-500),(1225,58,-500),(1225,59,-500),(1225,60,-500),(1225,61,-500),(1225,62,-500),(1225,178,-500),(1225,180,-500),(1225,661,-500),(1225,1106,-500),(1226,51,-500),(1226,52,-500),(1226,53,-500),(1226,54,-500),(1226,55,-500),(1226,56,-500),(1226,57,-500),(1226,58,-500),(1226,59,-500),(1226,60,-500),(1226,61,-500),(1226,62,-500),(1226,178,-500),(1226,180,-500),(1226,661,-500),(1226,1106,-500),(1227,51,-500),(1227,52,-500),(1227,53,-500),(1227,54,-500),(1227,55,-500),(1227,56,-500),(1227,57,-500),(1227,58,-500),(1227,59,-500),(1227,60,-500),(1227,61,-500),(1227,62,-500),(1227,178,-500),(1227,180,-500),(1227,661,-500),(1227,1106,-500),(1229,51,-1000),(1229,52,-1000),(1229,53,-1000),(1229,54,-1000),(1229,55,-1000),(1229,56,-1000),(1229,57,-1000),(1229,58,-1000),(1229,59,-1000),(1229,60,-1000),(1229,61,-1000),(1229,62,-1000),(1229,178,-1000),(1229,180,-1000),(1229,661,-1000),(1229,1106,-1000),(1230,51,-1000),(1230,52,-1000),(1230,53,-1000),(1230,54,-1000),(1230,55,-1000),(1230,56,-1000),(1230,57,-1000),(1230,58,-1000),(1230,59,-1000),(1230,60,-1000),(1230,61,-1000),(1230,62,-1000),(1230,178,-1000),(1230,180,-1000),(1230,661,-1000),(1230,1106,-1000),(1232,51,1),(1232,52,1),(1232,53,1),(1232,54,1),(1232,55,1),(1232,56,1),(1232,57,1),(1232,58,1),(1232,59,1),(1232,60,1),(1232,61,1),(1232,62,1),(1232,178,1),(1232,180,1),(1232,661,1),(1232,1106,1),(1233,51,-1000),(1233,52,-1000),(1233,53,-1000),(1233,54,-1000),(1233,55,-1000),(1233,56,-1000),(1233,57,-1000),(1233,58,-1000),(1233,59,-1000),(1233,60,-1000),(1233,61,-1000),(1233,62,-1000),(1233,178,-1000),(1233,180,-1000),(1233,661,-1000),(1233,1106,-1000),(1234,51,1),(1234,52,1),(1234,53,1),(1234,54,1),(1234,55,1),(1234,56,1),(1234,57,1),(1234,58,1),(1234,59,1),(1234,60,1),(1234,61,1),(1234,62,1),(1234,178,1),(1234,180,1),(1234,661,1),(1234,1106,1),(1235,51,-2000),(1235,52,-2000),(1235,53,-2000),(1235,54,-2000),(1235,55,-2000),(1235,56,-2000),(1235,57,-2000),(1235,58,-2000),(1235,59,-2000),(1235,60,-2000),(1235,61,-2000),(1235,62,-2000),(1235,178,-2000),(1235,180,-2000),(1235,661,-2000),(1235,1106,-2000),(1237,51,-2000),(1237,52,-2000),(1237,53,-2000),(1237,54,-2000),(1237,55,-2000),(1237,56,-2000),(1237,57,-2000),(1237,58,-2000),(1237,59,-2000),(1237,60,-2000),(1237,61,-2000),(1237,62,-2000),(1237,178,-2000),(1237,180,-2000),(1237,661,-2000),(1237,1106,-2000),(1238,51,-100),(1238,52,-100),(1238,53,-100),(1238,54,-100),(1238,55,-100),(1238,56,-100),(1238,57,-100),(1238,58,-100),(1238,59,-100),(1238,60,-100),(1238,61,-100),(1238,62,-100),(1238,178,-100),(1238,180,-100),(1238,661,-100),(1238,1106,-100),(1241,51,-750),(1241,52,-750),(1241,53,-750),(1241,54,-750),(1241,55,-750),(1241,56,-750),(1241,57,-750),(1241,58,-750),(1241,59,-750),(1241,60,-750),(1241,61,-750),(1241,62,-750),(1241,178,-750),(1241,180,-750),(1241,661,-750),(1241,1106,-750),(1242,51,-500),(1242,52,-500),(1242,53,-500),(1242,54,-500),(1242,55,-500),(1242,56,-500),(1242,57,-500),(1242,58,-500),(1242,59,-500),(1242,60,-500),(1242,61,-500),(1242,62,-500),(1242,178,-500),(1242,180,-500),(1242,661,-500),(1242,1106,-500),(1243,51,-2000),(1243,52,-2000),(1243,53,-2000),(1243,54,-2000),(1243,55,-2000),(1243,56,-2000),(1243,57,-2000),(1243,58,-2000),(1243,59,-2000),(1243,60,-2000),(1243,61,-2000),(1243,62,-2000),(1243,178,-2000),(1243,180,-2000),(1243,661,-2000),(1243,1106,-2000),(1244,51,-50),(1244,52,-50),(1244,53,-50),(1244,54,-50),(1244,55,-50),(1244,56,-50),(1244,57,-50),(1244,58,-50),(1244,59,-50),(1244,60,-50),(1244,61,-50),(1244,62,-50),(1244,178,-50),(1244,180,-50),(1244,661,-50),(1244,1106,-50),(1483,5,-800),(1483,11,-800),(1483,51,-1000),(1483,52,-1000),(1483,53,-1000),(1483,54,-1000),(1483,55,-1000),(1483,56,-1000),(1483,57,-1000),(1483,58,-1000),(1483,59,-1000),(1483,60,-1000),(1483,61,-1000),(1483,62,-1000),(1483,178,-1000),(1483,180,-1000),(1483,201,-800),(1483,203,-800),(1483,206,-800),(1483,661,-1000),(1483,1106,-1000),(1484,5,-800),(1484,11,-800),(1484,56,-800),(1484,59,-800),(1484,60,-800),(1484,178,-800),(1484,201,-800),(1484,203,-800),(1484,206,-800),(1485,5,-800),(1485,11,-800),(1485,51,-400),(1485,52,-400),(1485,53,-400),(1485,54,-400),(1485,55,-400),(1485,56,-800),(1485,57,-400),(1485,58,-400),(1485,59,-800),(1485,60,-800),(1485,61,-400),(1485,62,-400),(1485,178,-800),(1485,661,-400),(1485,1106,-400),(1486,5,-800),(1486,11,-800),(1486,51,-250),(1486,52,-250),(1486,53,-250),(1486,54,-250),(1486,55,-250),(1486,56,-800),(1486,57,-250),(1486,58,-250),(1486,59,-800),(1486,60,-800),(1486,61,-250),(1486,62,-250),(1486,178,-800),(1486,661,-250),(1486,1106,-250),(1487,5,-800),(1487,11,-800),(1487,56,-800),(1487,59,-800),(1487,60,-800),(1487,178,-800),(1490,51,-1000),(1490,52,-1000),(1490,53,-1000),(1490,54,-1000),(1490,55,-1000),(1490,56,-1000),(1490,57,-1000),(1490,58,-1000),(1490,59,-1000),(1490,60,-1000),(1490,61,-1000),(1490,62,-1000),(1490,178,-1000),(1490,180,-1000),(1490,661,-1000),(1490,1106,-1000),(1491,51,-1000),(1491,52,-1000),(1491,53,-1000),(1491,54,-1000),(1491,55,-1000),(1491,56,-1000),(1491,57,-1000),(1491,58,-1000),(1491,59,-1000),(1491,60,-1000),(1491,61,-1000),(1491,62,-1000),(1491,178,-1000),(1491,180,-1000),(1491,661,-1000),(1491,1106,-1000),(1500,51,-250),(1500,52,-250),(1500,53,-250),(1500,54,-250),(1500,55,-250),(1500,56,-250),(1500,57,-250),(1500,58,-250),(1500,59,-250),(1500,60,-250),(1500,61,-250),(1500,62,-250),(1500,178,-250),(1500,180,-250),(1500,661,-250),(1500,1106,-250),(1501,3,-800),(1501,51,-550),(1501,52,-550),(1501,53,-550),(1501,54,-550),(1501,55,-550),(1501,56,-550),(1501,57,-550),(1501,58,-550),(1501,59,-550),(1501,60,-550),(1501,61,-550),(1501,62,-550),(1501,178,-550),(1501,180,-550),(1501,661,-550),(1501,1106,-550),(1502,5,-550),(1502,11,-550),(1502,56,-400),(1502,59,-400),(1502,60,-400),(1502,178,-400),(1502,201,-550),(1502,203,-550),(1502,206,-550),(1503,5,-550),(1503,11,-550),(1503,56,-400),(1503,59,-400),(1503,60,-400),(1503,178,-400),(1503,201,-550),(1503,203,-550),(1503,206,-550),(1504,5,-550),(1504,11,-550),(1504,56,-400),(1504,59,-400),(1504,60,-400),(1504,178,-400),(1504,201,-550),(1504,203,-550),(1504,206,-550),(1505,1,-200),(1505,2,-400),(1505,3,-400),(1505,4,-200),(1505,5,-200),(1505,6,-200),(1505,7,-200),(1505,8,-200),(1505,9,-200),(1505,10,-200),(1505,11,-200),(1505,12,-200),(1505,13,-200),(1505,14,-200),(1505,15,-200),(1505,16,-200),(1506,1,-800),(1506,2,-800),(1506,3,-800),(1506,4,-800),(1506,5,-500),(1506,6,-800),(1506,7,-800),(1506,8,-800),(1506,9,-800),(1506,10,-800),(1506,11,-500),(1506,12,-800),(1506,13,-800),(1506,14,-800),(1506,15,-800),(1506,16,-800),(1507,1,-800),(1507,2,-800),(1507,3,-800),(1507,4,-800),(1507,5,-500),(1507,6,-800),(1507,7,-800),(1507,8,-800),(1507,9,-800),(1507,10,-800),(1507,11,-500),(1507,12,-800),(1507,13,-800),(1507,14,-800),(1507,15,-800),(1507,16,-800),(1508,51,-50),(1508,52,-50),(1508,53,-50),(1508,54,-50),(1508,55,-50),(1508,56,-100),(1508,57,-50),(1508,58,-50),(1508,59,-100),(1508,60,-100),(1508,61,-50),(1508,62,-50),(1508,178,-100),(1508,180,-50),(1508,661,-50),(1508,1106,-50),(1509,51,-50),(1509,52,-50),(1509,53,-50),(1509,54,-50),(1509,55,-50),(1509,56,-50),(1509,57,-50),(1509,58,-50),(1509,59,-50),(1509,60,-50),(1509,61,-50),(1509,62,-50),(1509,178,-50),(1509,180,-50),(1509,661,-50),(1509,1106,-50),(1510,51,-99),(1510,52,-200),(1510,53,-200),(1510,54,-200),(1510,55,-200),(1510,56,-250),(1510,57,-200),(1510,58,-200),(1510,59,-250),(1510,60,-250),(1510,61,-200),(1510,62,-200),(1510,178,-250),(1510,180,-200),(1510,661,-99),(1510,1106,-99),(1511,7,101),(1511,12,101),(1511,13,101),(1511,14,101),(1511,51,-200),(1511,52,-200),(1511,53,-200),(1511,54,-200),(1511,55,-200),(1511,56,-250),(1511,57,-200),(1511,58,-200),(1511,59,-250),(1511,60,-250),(1511,61,-200),(1511,62,-200),(1511,178,-250),(1511,180,-200),(1511,661,-200),(1511,1106,-200),(1512,51,-200),(1512,52,-200),(1512,53,-200),(1512,54,-200),(1512,55,-200),(1512,56,-250),(1512,57,-200),(1512,58,-99),(1512,59,-250),(1512,60,-250),(1512,61,-99),(1512,62,-99),(1512,178,-250),(1512,180,-200),(1512,661,-200),(1512,1106,-200),(1513,180,1000),(1516,51,-1000),(1516,52,-1000),(1516,53,-1000),(1516,54,-1000),(1516,55,-1000),(1516,56,-1000),(1516,57,-1000),(1516,58,-1000),(1516,59,-1000),(1516,60,-1000),(1516,61,-1000),(1516,62,-1000),(1516,178,-1000),(1516,180,-1000),(1516,661,-1000),(1516,1106,-1000),(1519,51,-1000),(1519,52,-1000),(1519,53,-1000),(1519,54,-1000),(1519,55,-1000),(1519,56,-1000),(1519,57,-1000),(1519,58,-1000),(1519,59,-1000),(1519,60,-1000),(1519,61,-1000),(1519,62,-1000),(1519,178,-1000),(1519,180,-1000),(1519,661,-1000),(1519,1106,-1000),(1520,51,-100),(1520,52,-100),(1520,53,-100),(1520,54,-100),(1520,55,-100),(1520,56,-100),(1520,57,-100),(1520,58,-100),(1520,59,-100),(1520,60,-100),(1520,61,-100),(1520,62,-100),(1520,178,-100),(1520,180,-100),(1520,661,-100),(1520,1106,-100),(1521,51,-2000),(1521,52,-2000),(1521,53,-2000),(1521,54,-2000),(1521,55,-2000),(1521,56,-2000),(1521,57,-2000),(1521,58,-2000),(1521,59,-2000),(1521,60,-2000),(1521,61,-2000),(1521,62,-2000),(1521,178,-2000),(1521,180,-2000),(1521,201,-2000),(1521,202,-2000),(1521,203,-2000),(1521,204,-2000),(1521,205,-2000),(1521,206,-2000),(1521,207,-2000),(1521,208,-2000),(1521,209,-2000),(1521,210,-2000),(1521,211,-2000),(1521,212,-2000),(1521,213,-2000),(1521,214,-2000),(1521,215,-2000),(1521,216,-2000),(1521,661,-2000),(1521,1106,-2000),(1522,1,-50),(1522,2,-50),(1522,3,-800),(1522,4,-800),(1522,5,-50),(1522,6,-800),(1522,7,-800),(1522,8,-50),(1522,9,-50),(1522,10,-50),(1522,11,-50),(1522,12,-50),(1522,13,-50),(1522,14,-50),(1522,15,-50),(1522,16,-50),(1522,51,-50),(1522,52,-50),(1522,53,-50),(1522,54,-800),(1522,55,-800),(1522,56,-50),(1522,57,-50),(1522,58,-800),(1522,59,-50),(1522,60,-50),(1522,61,-800),(1522,62,-50),(1522,178,-50),(1522,180,-50),(1522,201,-50),(1522,202,-800),(1522,203,-50),(1522,204,-800),(1522,205,-50),(1522,206,-50),(1522,207,-800),(1522,208,-800),(1522,209,-800),(1522,210,-800),(1522,211,-50),(1522,212,-800),(1522,213,-50),(1522,214,-800),(1522,215,-800),(1522,216,-50),(1522,661,-50),(1522,1106,-50),(1524,5,-550),(1524,11,-550),(1524,56,-400),(1524,59,-400),(1524,60,-400),(1524,178,-400),(1524,201,-550),(1524,203,-550),(1524,206,-550),(1525,1,-800),(1525,2,-800),(1525,3,-800),(1525,4,-800),(1525,5,-500),(1525,6,-800),(1525,7,-800),(1525,8,-800),(1525,9,-800),(1525,10,-800),(1525,11,-500),(1525,12,-800),(1525,13,-800),(1525,14,-800),(1525,15,-800),(1525,16,-800),(1527,51,-1000),(1527,52,-1000),(1527,53,-1000),(1527,54,-1000),(1527,55,-1000),(1527,56,-1000),(1527,57,-1000),(1527,58,-1000),(1527,59,-1000),(1527,60,-1000),(1527,61,-1000),(1527,62,-1000),(1527,178,-1000),(1527,180,-1000),(1527,661,-1000),(1527,1106,-1000),(1528,51,-1000),(1528,52,-1000),(1528,53,-1000),(1528,54,-1000),(1528,55,-1000),(1528,56,-1000),(1528,57,-1000),(1528,58,-1000),(1528,59,-1000),(1528,60,-1000),(1528,61,-1000),(1528,62,-1000),(1528,178,-1000),(1528,180,-1000),(1528,661,-1000),(1528,1106,-1000),(1529,1,750),(1530,9,750),(1531,8,750),(1532,15,750),(1533,10,750),(1535,51,-1000),(1535,52,-1000),(1535,53,-1000),(1535,54,-1000),(1535,55,-1000),(1535,56,-1000),(1535,57,-1000),(1535,58,-1000),(1535,59,-1000),(1535,60,-1000),(1535,61,-1000),(1535,62,-1000),(1535,178,-1000),(1535,180,-1000),(1535,661,-1000),(1535,1106,-1000),(1537,51,-1),(1537,52,-1),(1537,53,-1),(1537,54,-1),(1537,55,-1),(1537,56,-1),(1537,57,-1),(1537,58,-1),(1537,59,-1),(1537,60,-1),(1537,61,-1),(1537,62,-1),(1537,178,1101),(1537,180,-1),(1537,661,-1),(1537,1106,-1),(1538,5,-450),(1538,11,-450),(1541,54,-450),(1541,56,-450),(1541,59,-450),(1541,60,-450),(1541,178,-450),(1542,1,350),(1542,5,350),(1542,8,450),(1542,9,550),(1542,11,350),(1542,16,350),(1542,51,-350),(1542,52,-350),(1542,53,-350),(1542,54,-350),(1542,55,-350),(1542,56,-99),(1542,57,-350),(1542,58,-350),(1542,59,-99),(1542,60,-99),(1542,61,-350),(1542,62,-350),(1542,178,-99),(1542,180,-350),(1542,201,300),(1542,203,300),(1542,206,300),(1542,661,-350),(1542,1106,-350),(1543,216,450),(1544,202,450),(1545,213,450),(1546,209,450),(1547,51,-250),(1547,52,-250),(1547,53,-250),(1547,54,-250),(1547,55,-250),(1547,56,-250),(1547,57,-250),(1547,58,-250),(1547,59,-250),(1547,60,-250),(1547,61,-250),(1547,62,-250),(1547,178,-250),(1547,180,-250),(1547,661,-250),(1547,1106,-250),(1552,180,250),(1555,51,-550),(1555,52,-550),(1555,53,-550),(1555,54,-550),(1555,55,-550),(1555,56,-550),(1555,57,-550),(1555,58,-550),(1555,59,-550),(1555,60,-550),(1555,61,-550),(1555,62,-550),(1555,178,-550),(1555,180,-550),(1555,661,-550),(1555,1106,-550),(1556,51,-400),(1556,52,-400),(1556,53,-400),(1556,54,-400),(1556,55,-400),(1556,56,-400),(1556,57,-400),(1556,58,-400),(1556,59,-400),(1556,60,-400),(1556,61,-400),(1556,62,-400),(1556,178,-400),(1556,180,-400),(1556,661,-400),(1556,1106,-400),(1559,1,-800),(1559,2,-800),(1559,3,-800),(1559,4,-800),(1559,5,-800),(1559,6,-800),(1559,7,-800),(1559,8,-450),(1559,9,-50),(1559,10,-800),(1559,11,-800),(1559,12,-800),(1559,13,-800),(1559,14,-800),(1559,15,-800),(1559,16,-800),(1561,5,-550),(1561,11,-550),(1561,56,-400),(1561,59,-400),(1561,60,-400),(1561,178,-400),(1561,201,-550),(1561,203,-550),(1561,206,-550),(1562,51,-1000),(1562,52,-1000),(1562,53,-1000),(1562,54,-1000),(1562,55,-1000),(1562,56,-1000),(1562,57,-1000),(1562,58,-1000),(1562,59,-1000),(1562,60,-1000),(1562,61,-1000),(1562,62,-1000),(1562,178,-1000),(1562,180,-1000),(1562,661,-1000),(1562,1106,-1000),(1563,51,-99),(1563,52,-99),(1563,53,-99),(1563,54,-99),(1563,55,-99),(1563,56,-99),(1563,57,-99),(1563,58,-99),(1563,59,-99),(1563,60,-99),(1563,61,-99),(1563,62,-99),(1563,178,-99),(1563,180,-99),(1563,661,-99),(1563,1106,-99),(1564,51,-1000),(1564,52,-1000),(1564,53,-1000),(1564,54,-1000),(1564,55,-1000),(1564,56,-1000),(1564,57,-1000),(1564,58,-1000),(1564,59,-1000),(1564,60,-1000),(1564,61,-1000),(1564,62,-1000),(1564,178,-1000),(1564,180,-1000),(1564,661,-1000),(1564,1106,-1000),(1565,51,-99),(1565,52,-99),(1565,53,-99),(1565,54,-99),(1565,55,-99),(1565,56,-99),(1565,57,-99),(1565,58,-99),(1565,59,-99),(1565,60,-99),(1565,61,-99),(1565,62,-99),(1565,178,-99),(1565,180,-99),(1565,661,-99),(1565,1106,-99),(1568,51,-1000),(1568,52,-1000),(1568,53,-1000),(1568,54,-1000),(1568,55,-1000),(1568,56,-1000),(1568,57,-1000),(1568,58,-1000),(1568,59,-1000),(1568,60,-1000),(1568,61,-1000),(1568,62,-1000),(1568,178,-1000),(1568,180,-1000),(1568,661,-1000),(1568,1106,-1000),(1570,5,350),(1570,11,350),(1570,51,-800),(1570,52,-800),(1570,53,-800),(1570,54,-800),(1570,55,-800),(1570,56,-800),(1570,57,-800),(1570,58,-800),(1570,59,-800),(1570,60,-800),(1570,61,-800),(1570,62,-800),(1570,178,-800),(1570,180,-800),(1570,661,-800),(1570,1106,-800),(1571,51,-1000),(1571,52,-1000),(1571,53,-1000),(1571,54,-1000),(1571,55,-1000),(1571,56,-1000),(1571,57,-1000),(1571,58,-1000),(1571,59,-1000),(1571,60,-1000),(1571,61,-1000),(1571,62,-1000),(1571,178,-1000),(1571,180,-1000),(1571,661,-1000),(1571,1106,-1000),(1573,51,-250),(1573,52,-250),(1573,53,-250),(1573,54,-250),(1573,55,-250),(1573,56,-250),(1573,57,-250),(1573,58,-250),(1573,59,-250),(1573,60,-250),(1573,61,-250),(1573,62,-250),(1573,178,-250),(1573,180,-250),(1573,661,-250),(1573,1106,-250),(1574,51,-800),(1574,52,-800),(1574,53,-800),(1574,54,-800),(1574,55,-800),(1574,56,-800),(1574,57,-800),(1574,58,-800),(1574,59,-800),(1574,60,-800),(1574,61,-800),(1574,62,-800),(1574,178,-800),(1574,180,-800),(1574,201,550),(1574,203,550),(1574,206,550),(1574,211,550),(1574,661,-800),(1574,1106,-800),(1582,1,-550),(1582,2,500),(1582,5,-550),(1582,6,200),(1582,7,-550),(1582,9,-550),(1582,10,200),(1582,11,-550),(1582,12,-550),(1582,13,-550),(1582,14,-550),(1582,16,-550),(1583,51,-800),(1583,52,-800),(1583,53,-800),(1583,54,-800),(1583,55,-800),(1583,56,-800),(1583,57,-800),(1583,58,-800),(1583,59,-800),(1583,60,-800),(1583,61,-800),(1583,62,-800),(1583,178,-800),(1583,180,-800),(1583,661,-800),(1583,1106,-800),(1584,180,751),(1587,51,-1000),(1587,52,-1000),(1587,53,-1000),(1587,54,-1000),(1587,55,-1000),(1587,56,-1000),(1587,57,-1000),(1587,58,-1000),(1587,59,-1000),(1587,60,-1000),(1587,61,-1000),(1587,62,-1000),(1587,178,-1000),(1587,180,-1000),(1587,661,-1000),(1587,1106,-1000),(1593,56,-450),(1593,59,-450),(1593,60,-450),(1593,178,-800),(1593,201,-1000),(1593,203,-1000),(1593,206,-1000),(1593,211,-450),(1597,52,-20),(1597,56,-350),(1597,59,-750),(1597,60,-750),(1597,178,-750),(1597,180,-50),(1597,201,-350),(1597,203,-350),(1597,206,-350),(1597,207,100),(1597,209,50),(1597,211,-80),(1597,215,50),(1598,51,-50),(1598,52,-50),(1598,53,-50),(1598,54,-50),(1598,55,-50),(1598,56,-50),(1598,57,-50),(1598,58,-50),(1598,59,-50),(1598,60,-50),(1598,61,-50),(1598,62,-50),(1598,178,-50),(1598,180,-50),(1598,202,100),(1598,661,-50),(1598,1106,-50),(1599,51,-1000),(1599,52,-1000),(1599,53,-1000),(1599,54,-1000),(1599,55,-1000),(1599,56,-1000),(1599,57,-1000),(1599,58,-1000),(1599,59,-1000),(1599,60,-1000),(1599,61,-1000),(1599,62,-1000),(1599,178,-1000),(1599,180,-1000),(1599,661,-1000),(1599,1106,-1000),(1600,51,-1000),(1600,52,-1000),(1600,53,-1000),(1600,54,-1000),(1600,55,-1000),(1600,56,-1000),(1600,57,-1000),(1600,58,-1000),(1600,59,-1000),(1600,60,-1000),(1600,61,-1000),(1600,62,-1000),(1600,178,-1000),(1600,180,-1000),(1600,661,-1000),(1600,1106,-1000),(1601,9,100),(1601,51,-475),(1601,52,-475),(1601,53,-475),(1601,54,-475),(1601,55,-475),(1601,56,-475),(1601,57,-475),(1601,58,-475),(1601,59,-475),(1601,60,-475),(1601,61,-475),(1601,62,-475),(1601,178,-475),(1601,180,-475),(1601,661,-475),(1601,1106,-475),(1603,51,-75),(1603,52,-75),(1603,53,-75),(1603,54,-75),(1603,55,-75),(1603,56,-75),(1603,57,-75),(1603,58,-75),(1603,59,-75),(1603,60,-75),(1603,61,-75),(1603,62,-75),(1603,178,-75),(1603,180,-75),(1603,201,-400),(1603,203,-400),(1603,206,-400),(1603,207,75),(1603,209,75),(1603,215,75),(1603,661,-75),(1603,1106,-75),(1605,51,50),(1605,52,50),(1605,53,50),(1605,54,50),(1605,55,50),(1605,56,50),(1605,57,50),(1605,58,50),(1605,59,50),(1605,60,50),(1605,61,50),(1605,62,50),(1605,178,50),(1605,180,50),(1605,661,50),(1605,1106,50),(1607,51,-1000),(1607,52,-1000),(1607,53,-1000),(1607,54,-1000),(1607,55,-1000),(1607,56,-1000),(1607,57,-1000),(1607,58,-1000),(1607,59,-1000),(1607,60,-1000),(1607,61,-1000),(1607,62,-1000),(1607,178,-1000),(1607,180,-1000),(1607,661,-1000),(1607,1106,-1000),(1609,207,200),(1610,51,-1000),(1610,52,-1000),(1610,53,-1000),(1610,54,-1000),(1610,55,-1000),(1610,56,-1000),(1610,57,-1000),(1610,58,-1000),(1610,59,-1000),(1610,60,-1000),(1610,61,-1000),(1610,62,-1000),(1610,178,-1000),(1610,180,-1000),(1610,661,-1000),(1610,1106,-1000),(1611,51,-1000),(1611,52,-1000),(1611,53,-1000),(1611,54,-1000),(1611,55,-1000),(1611,56,-1000),(1611,57,-1000),(1611,58,-1000),(1611,59,-1000),(1611,60,-1000),(1611,61,-1000),(1611,62,-1000),(1611,178,-1000),(1611,180,-1000),(1611,661,-1000),(1611,1106,-1000),(1612,51,-1000),(1612,52,-1000),(1612,53,-1000),(1612,54,-1000),(1612,55,-1000),(1612,56,-1000),(1612,57,-1000),(1612,58,-1000),(1612,59,-1000),(1612,60,-1000),(1612,61,-1000),(1612,62,-1000),(1612,178,-1000),(1612,180,-1000),(1612,661,-1000),(1612,1106,-1000),(1613,51,-1000),(1613,52,-1000),(1613,53,-1000),(1613,54,-1000),(1613,55,-1000),(1613,56,-1000),(1613,57,-1000),(1613,58,-1000),(1613,59,-1000),(1613,60,-1000),(1613,61,-1000),(1613,62,-1000),(1613,178,-1000),(1613,180,-1000),(1613,661,-1000),(1613,1106,-1000),(1618,51,-1000),(1618,52,-1000),(1618,53,-1000),(1618,54,-1000),(1618,55,-1000),(1618,56,-1000),(1618,57,-1000),(1618,58,-1000),(1618,59,-1000),(1618,60,-1000),(1618,61,-1000),(1618,62,-1000),(1618,178,-1000),(1618,180,-1000),(1618,661,-1000),(1618,1106,-1000),(1620,51,-250),(1620,52,-450),(1620,53,-250),(1620,55,-50),(1620,56,-500),(1620,57,-250),(1620,58,-250),(1620,59,-500),(1620,60,-500),(1620,61,-50),(1620,62,-250),(1620,178,-500),(1620,180,-250),(1620,661,-250),(1620,1106,-250),(1621,51,-1000),(1621,52,-1000),(1621,53,-1000),(1621,54,-1000),(1621,55,-1000),(1621,56,-1000),(1621,57,-1000),(1621,58,-1000),(1621,59,-1000),(1621,60,-1000),(1621,61,-1000),(1621,62,-1000),(1621,178,-1000),(1621,180,-1000),(1621,661,-1000),(1621,1106,-1000),(1622,51,-480),(1622,52,-480),(1622,53,-480),(1622,54,-480),(1622,55,-480),(1622,56,-480),(1622,57,-480),(1622,58,-480),(1622,59,-480),(1622,60,-480),(1622,61,-480),(1622,62,-480),(1622,178,-480),(1622,180,-480),(1622,661,-480),(1622,1106,-480),(1623,51,-1000),(1623,52,-1000),(1623,53,-1000),(1623,54,-1000),(1623,55,-1000),(1623,56,-1000),(1623,57,-1000),(1623,58,-1000),(1623,59,-1000),(1623,60,-1000),(1623,61,-1000),(1623,62,-1000),(1623,178,-1000),(1623,180,-1000),(1623,661,-1000),(1623,1106,-1000),(1624,51,-1000),(1624,52,-1000),(1624,53,-1000),(1624,54,-1000),(1624,55,-1000),(1624,56,-1000),(1624,57,-1000),(1624,58,-1000),(1624,59,-1000),(1624,60,-1000),(1624,61,-1000),(1624,62,-1000),(1624,178,-1000),(1624,180,-1000),(1624,661,-1000),(1624,1106,-1000),(1627,51,-95),(1627,52,-95),(1627,53,-95),(1627,54,-95),(1627,55,-95),(1627,56,-95),(1627,57,-95),(1627,58,-95),(1627,59,-95),(1627,60,-95),(1627,61,-95),(1627,62,-95),(1627,178,-95),(1627,180,-95),(1627,661,-95),(1627,1106,-95),(1628,51,-700),(1628,52,-700),(1628,53,-700),(1628,54,-700),(1628,55,-700),(1628,56,-700),(1628,57,-700),(1628,58,-700),(1628,59,-700),(1628,60,-700),(1628,61,-700),(1628,62,-700),(1628,178,-700),(1628,180,-700),(1628,661,-700),(1628,1106,-700),(1629,51,-1000),(1629,52,-1000),(1629,53,-1000),(1629,54,-1000),(1629,55,-1000),(1629,56,-1000),(1629,57,-1000),(1629,58,-1000),(1629,59,-1000),(1629,60,-1000),(1629,61,-1000),(1629,62,-1000),(1629,178,-1000),(1629,180,-1000),(1629,661,-1000),(1629,1106,-1000),(1630,1,-600),(1630,2,-600),(1630,3,-600),(1630,4,-600),(1630,5,-500),(1630,6,-600),(1630,7,-600),(1630,8,-600),(1630,9,-600),(1630,10,-600),(1630,11,-500),(1630,12,-600),(1630,13,-600),(1630,14,-600),(1630,15,-600),(1630,16,-600),(1630,213,100),(1633,51,-1000),(1633,52,-1000),(1633,53,-1000),(1633,54,-1000),(1633,55,-1000),(1633,56,-1000),(1633,57,-1000),(1633,58,-1000),(1633,59,-1000),(1633,60,-1000),(1633,61,-1000),(1633,62,-1000),(1633,178,-1000),(1633,180,-1000),(1633,661,-1000),(1633,1106,-1000),(1643,51,-1000),(1643,52,-1000),(1643,53,-1000),(1643,54,-1000),(1643,55,-1000),(1643,56,-1000),(1643,57,-1000),(1643,58,-1000),(1643,59,-1000),(1643,60,-1000),(1643,61,-1000),(1643,62,-1000),(1643,178,-1000),(1643,180,-1000),(1643,211,450),(1643,661,-1000),(1643,1106,-1000),(1659,51,-1000),(1659,52,-1000),(1659,53,-1000),(1659,54,-1000),(1659,55,-1000),(1659,56,-1000),(1659,57,-1000),(1659,58,-1000),(1659,59,-1000),(1659,60,-1000),(1659,61,-1000),(1659,62,-1000),(1659,178,-1000),(1659,180,-1000),(1659,661,-1000),(1659,1106,-1000),(1660,51,-1000),(1660,52,-1000),(1660,53,-1000),(1660,54,-1000),(1660,55,-1000),(1660,56,-1000),(1660,57,-1000),(1660,58,-1000),(1660,59,-1000),(1660,60,-1000),(1660,61,-1000),(1660,62,-1000),(1660,178,-1000),(1660,180,-1000),(1660,661,-1000),(1660,1106,-1000),(1665,51,-1000),(1665,52,-1000),(1665,53,-1000),(1665,54,-1000),(1665,55,-1000),(1665,56,-1000),(1665,57,-1000),(1665,58,-1000),(1665,59,-1000),(1665,60,-1000),(1665,61,-1000),(1665,62,-1000),(1665,178,-1000),(1665,180,-1000),(1665,201,-500),(1665,202,-500),(1665,203,-500),(1665,204,-500),(1665,205,-500),(1665,206,-500),(1665,207,-500),(1665,208,-500),(1665,209,-500),(1665,210,-500),(1665,211,-500),(1665,212,-500),(1665,213,-500),(1665,214,-500),(1665,215,-500),(1665,216,-500),(1665,661,-1000),(1665,1106,-1000),(1671,51,-400),(1671,52,-400),(1671,53,-400),(1671,54,-400),(1671,55,-400),(1671,56,-400),(1671,57,-400),(1671,58,-400),(1671,59,-400),(1671,60,-400),(1671,61,-400),(1671,62,-400),(1671,178,-400),(1671,180,-400),(1671,661,-400),(1671,1106,-400),(1674,51,-1000),(1674,52,-1000),(1674,53,-1000),(1674,54,-1000),(1674,55,-1000),(1674,56,-1000),(1674,57,-1000),(1674,58,-1000),(1674,59,-1000),(1674,60,-1000),(1674,61,-1000),(1674,62,-1000),(1674,178,-1000),(1674,180,-1000),(1674,661,-1000),(1674,1106,-1000),(1675,51,-1000),(1675,52,-1000),(1675,53,-1000),(1675,54,-1000),(1675,55,-1000),(1675,56,-1000),(1675,57,-1000),(1675,58,-1000),(1675,59,-1000),(1675,60,-1000),(1675,61,-1000),(1675,62,-1000),(1675,178,-1000),(1675,180,-1000),(1675,661,-1000),(1675,1106,-1000),(1676,51,-1000),(1676,52,-1000),(1676,53,-1000),(1676,54,-1000),(1676,55,-1000),(1676,56,-1000),(1676,57,-1000),(1676,58,-1000),(1676,59,-1000),(1676,60,-1000),(1676,61,-1000),(1676,62,-1000),(1676,178,-1000),(1676,180,-1000),(1676,661,-1000),(1676,1106,-1000),(1677,51,-100),(1677,52,-100),(1677,53,-100),(1677,54,-100),(1677,55,-100),(1677,56,-100),(1677,57,-100),(1677,58,-100),(1677,59,-100),(1677,60,-100),(1677,61,-100),(1677,62,-100),(1677,178,-100),(1677,180,-100),(1677,661,-100),(1677,1106,-100),(1679,51,-100),(1679,52,-100),(1679,53,-100),(1679,54,-100),(1679,55,-100),(1679,56,-100),(1679,57,-100),(1679,58,-100),(1679,59,-100),(1679,60,-100),(1679,61,-100),(1679,62,-100),(1679,178,-100),(1679,180,-100),(1679,661,-100),(1679,1106,-100),(1680,51,-300),(1680,52,-300),(1680,53,-300),(1680,54,-300),(1680,55,-300),(1680,56,-300),(1680,57,-300),(1680,58,-300),(1680,59,-300),(1680,60,-300),(1680,61,-300),(1680,62,-300),(1680,178,-300),(1680,180,-300),(1680,661,-300),(1680,1106,-300),(1681,51,-300),(1681,52,-300),(1681,53,-300),(1681,54,-300),(1681,55,-300),(1681,56,-300),(1681,57,-300),(1681,58,-300),(1681,59,-300),(1681,60,-300),(1681,61,-300),(1681,62,-300),(1681,178,-300),(1681,180,-300),(1681,661,-300),(1681,1106,-300),(1701,51,-1000),(1701,52,-1000),(1701,53,-1000),(1701,54,-1000),(1701,55,-1000),(1701,56,-1000),(1701,57,-1000),(1701,58,-1000),(1701,59,-1000),(1701,60,-1000),(1701,61,-1000),(1701,62,-1000),(1701,178,-1000),(1701,180,-1000),(1701,661,-1000),(1701,1106,-1000),(1703,51,-1000),(1703,52,-1000),(1703,53,-1000),(1703,54,-1000),(1703,55,-1000),(1703,56,-1000),(1703,57,-1000),(1703,58,-1000),(1703,59,-1000),(1703,60,-1000),(1703,61,-1000),(1703,62,-1000),(1703,178,-1000),(1703,180,-1000),(1703,661,-1000),(1703,1106,-1000),(1704,56,-1000),(1704,59,-1000),(1704,60,-1000),(1704,178,-1000),(1704,208,100),(1709,56,-1000),(1709,59,-1000),(1709,60,-1000),(1709,178,-1000),(1711,56,-1000),(1711,59,-1000),(1711,60,-1000),(1711,178,-1000),(1712,56,-1000),(1712,59,-1000),(1712,60,-1000),(1712,178,-1000),(1713,56,-1000),(1713,59,-1000),(1713,60,-1000),(1713,178,-1000),(1714,56,-1000),(1714,59,-1000),(1714,60,-1000),(1714,178,-1000),(1715,56,-1000),(1715,59,-1000),(1715,60,-1000),(1715,178,-1000),(1716,56,-1000),(1716,59,-1000),(1716,60,-1000),(1716,178,-1000),(1716,661,100),(1717,56,-1000),(1717,59,-1000),(1717,60,-1000),(1717,178,-1000),(1717,661,100),(1718,56,-1000),(1718,59,-1000),(1718,60,-1000),(1718,178,-1000),(1718,661,100),(1719,56,-1000),(1719,59,-1000),(1719,60,-1000),(1719,178,-1000),(1720,56,-1000),(1720,59,-1000),(1720,60,-1000),(1720,178,-1000),(1720,208,50),(1720,661,100),(1722,51,-1000),(1722,52,-1000),(1722,53,-1000),(1722,54,-1000),(1722,55,-1000),(1722,56,-1000),(1722,57,-1000),(1722,58,-1000),(1722,59,-1000),(1722,60,-1000),(1722,61,-1000),(1722,62,-1000),(1722,178,-1000),(1722,180,-1000),(1722,661,-1000),(1722,1106,-1000),(1728,51,-1000),(1728,52,-1000),(1728,53,-1000),(1728,54,-1000),(1728,55,-1000),(1728,56,-1000),(1728,57,-1000),(1728,58,-1000),(1728,59,-1000),(1728,60,-1000),(1728,61,-1000),(1728,62,-1000),(1728,178,-1000),(1728,180,-1000),(1728,661,-1000),(1728,1106,-1000),(1729,51,-1000),(1729,52,-1000),(1729,53,-1000),(1729,54,-1000),(1729,55,-1000),(1729,56,-1000),(1729,57,-1000),(1729,58,-1000),(1729,59,-1000),(1729,60,-1000),(1729,61,-1000),(1729,62,-1000),(1729,178,-1000),(1729,180,-1000),(1729,661,-1000),(1729,1106,-1000),(1732,51,-1000),(1732,52,-1000),(1732,53,-1000),(1732,54,-1000),(1732,55,-1000),(1732,56,-1000),(1732,57,-1000),(1732,58,-1000),(1732,59,-1000),(1732,60,-1000),(1732,61,-1000),(1732,62,-1000),(1732,178,-1000),(1732,180,-1000),(1732,661,-1000),(1732,1106,-1000),(1733,51,-1000),(1733,52,-1000),(1733,53,-1000),(1733,54,-1000),(1733,55,-1000),(1733,56,-1000),(1733,57,-1000),(1733,58,-1000),(1733,59,-1000),(1733,60,-1000),(1733,61,-1000),(1733,62,-1000),(1733,178,-1000),(1733,180,-1000),(1733,661,-1000),(1733,1106,-1000),(1734,51,-1000),(1734,52,-1000),(1734,53,-1000),(1734,54,-1000),(1734,55,-1000),(1734,56,-1000),(1734,57,-1000),(1734,58,-1000),(1734,59,-1000),(1734,60,-1000),(1734,61,-1000),(1734,62,-1000),(1734,178,-1000),(1734,180,-1000),(1734,661,-1000),(1734,1106,-1000),(1735,51,-1000),(1735,52,-1000),(1735,53,-1000),(1735,54,-1000),(1735,55,-1000),(1735,56,-1000),(1735,57,-1000),(1735,58,-1000),(1735,59,-1000),(1735,60,-1000),(1735,61,-1000),(1735,62,-1000),(1735,178,-1000),(1735,180,-1000),(1735,661,-1000),(1735,1106,-1000),(1736,51,-1000),(1736,52,-1000),(1736,53,-1000),(1736,54,-1000),(1736,55,-1000),(1736,56,-1000),(1736,57,-1000),(1736,58,-1000),(1736,59,-1000),(1736,60,-1000),(1736,61,-1000),(1736,62,-1000),(1736,178,-1000),(1736,180,-1000),(1736,661,-1000),(1736,1106,-1000),(1737,51,-1000),(1737,52,-1000),(1737,53,-1000),(1737,54,-1000),(1737,55,-1000),(1737,56,-1000),(1737,57,-1000),(1737,58,-1000),(1737,59,-1000),(1737,60,-1000),(1737,61,-1000),(1737,62,-1000),(1737,178,-1000),(1737,180,-1000),(1737,661,-1000),(1737,1106,-1000),(1738,51,-1000),(1738,52,-1000),(1738,53,-1000),(1738,54,-1000),(1738,55,-1000),(1738,56,-1000),(1738,57,-1000),(1738,58,-1000),(1738,59,-1000),(1738,60,-1000),(1738,61,-1000),(1738,62,-1000),(1738,178,-1000),(1738,180,-1000),(1738,661,-1000),(1738,1106,-1000),(1741,51,-1000),(1741,52,-1000),(1741,53,-1000),(1741,54,-1000),(1741,55,-1000),(1741,56,-1000),(1741,57,-1000),(1741,58,-1000),(1741,59,-1000),(1741,60,-1000),(1741,61,-1000),(1741,62,-1000),(1741,178,-1000),(1741,180,-1000),(1741,661,-1000),(1741,1106,-1000),(1742,51,-1000),(1742,52,-1000),(1742,53,-1000),(1742,54,-1000),(1742,55,-1000),(1742,56,-1000),(1742,57,-1000),(1742,58,-1000),(1742,59,-1000),(1742,60,-1000),(1742,61,-1000),(1742,62,-1000),(1742,178,-1000),(1742,180,-1000),(1742,661,-1000),(1742,1106,-1000),(1743,51,-1000),(1743,52,-1000),(1743,53,-1000),(1743,54,-1000),(1743,55,-1000),(1743,56,-1000),(1743,57,-1000),(1743,58,-1000),(1743,59,-1000),(1743,60,-1000),(1743,61,-1000),(1743,62,-1000),(1743,178,-1000),(1743,180,-1000),(1743,661,-1000),(1743,1106,-1000),(1744,51,-1000),(1744,52,-1000),(1744,53,-1000),(1744,54,-1000),(1744,55,-1000),(1744,56,-1000),(1744,57,-1000),(1744,58,-1000),(1744,59,-1000),(1744,60,-1000),(1744,61,-1000),(1744,62,-1000),(1744,178,-1000),(1744,180,-1000),(1744,661,-1000),(1744,1106,-1000),(1745,51,-1000),(1745,52,-1000),(1745,53,-1000),(1745,54,-1000),(1745,55,-1000),(1745,56,-1000),(1745,57,-1000),(1745,58,-1000),(1745,59,-1000),(1745,60,-1000),(1745,61,-1000),(1745,62,-1000),(1745,178,-1000),(1745,180,-1000),(1745,661,-1000),(1745,1106,-1000),(1746,51,-1000),(1746,52,-1000),(1746,53,-1000),(1746,54,-1000),(1746,55,-1000),(1746,56,-1000),(1746,57,-1000),(1746,58,-1000),(1746,59,-1000),(1746,60,-1000),(1746,61,-1000),(1746,62,-1000),(1746,178,-1000),(1746,180,-1000),(1746,661,-1000),(1746,1106,-1000),(1747,51,-1000),(1747,52,-1000),(1747,53,-1000),(1747,54,-1000),(1747,55,-1000),(1747,56,-1000),(1747,57,-1000),(1747,58,-1000),(1747,59,-1000),(1747,60,-1000),(1747,61,-1000),(1747,62,-1000),(1747,178,-1000),(1747,180,-1000),(1747,661,-1000),(1747,1106,-1000),(1748,51,-1000),(1748,52,-1000),(1748,53,-1000),(1748,54,-1000),(1748,55,-1000),(1748,56,-1000),(1748,57,-1000),(1748,58,-1000),(1748,59,-1000),(1748,60,-1000),(1748,61,-1000),(1748,62,-1000),(1748,178,-1000),(1748,180,-1000),(1748,661,-1000),(1748,1106,-1000),(1749,51,-1000),(1749,52,-1000),(1749,53,-1000),(1749,54,-1000),(1749,55,-1000),(1749,56,-1000),(1749,57,-1000),(1749,58,-1000),(1749,59,-1000),(1749,60,-1000),(1749,61,-1000),(1749,62,-1000),(1749,178,-1000),(1749,180,-1000),(1749,661,-1000),(1749,1106,-1000),(1750,51,-1000),(1750,52,-1000),(1750,53,-1000),(1750,54,-1000),(1750,55,-1000),(1750,56,-1000),(1750,57,-1000),(1750,58,-1000),(1750,59,-1000),(1750,60,-1000),(1750,61,-1000),(1750,62,-1000),(1750,178,-1000),(1750,180,-1000),(1750,661,-1000),(1750,1106,-1000),(1755,51,-1000),(1755,52,-1000),(1755,53,-1000),(1755,54,-1000),(1755,55,-1000),(1755,56,-1000),(1755,57,-1000),(1755,58,-1000),(1755,59,-1000),(1755,60,-1000),(1755,61,-1000),(1755,62,-1000),(1755,178,-1000),(1755,180,-1000),(1755,661,-1000),(1755,1106,-1000),(1758,51,100),(1758,52,100),(1758,53,100),(1758,54,100),(1758,55,100),(1758,56,100),(1758,57,100),(1758,58,100),(1758,59,100),(1758,60,100),(1758,61,100),(1758,62,100),(1758,178,100),(1758,180,100),(1758,661,100),(1758,1106,100),(1759,51,-100),(1759,52,-100),(1759,53,-100),(1759,54,-100),(1759,55,-100),(1759,56,-100),(1759,57,-100),(1759,58,-100),(1759,59,-100),(1759,60,-100),(1759,61,-100),(1759,62,-100),(1759,178,-100),(1759,180,-100),(1759,661,-100),(1759,1106,-100),(1761,51,-100),(1761,52,-100),(1761,53,-100),(1761,54,-100),(1761,55,-100),(1761,56,-100),(1761,57,-100),(1761,58,-100),(1761,59,-100),(1761,60,-100),(1761,61,-100),(1761,62,-100),(1761,178,-100),(1761,180,-100),(1761,661,-100),(1761,1106,-100),(1762,51,-1000),(1762,52,-1000),(1762,53,-1000),(1762,54,-1000),(1762,55,-1000),(1762,56,-1000),(1762,57,-1000),(1762,58,-1000),(1762,59,-1000),(1762,60,-1000),(1762,61,-1000),(1762,62,-1000),(1762,178,-1000),(1762,180,-1000),(1762,661,-1000),(1762,1106,-1000),(1763,51,-1001),(1763,52,-1001),(1763,53,-1001),(1763,54,-1001),(1763,55,-1001),(1763,56,-1001),(1763,57,-1001),(1763,58,-1001),(1763,59,-1001),(1763,60,-1001),(1763,61,-1001),(1763,62,-1001),(1763,178,-1001),(1763,180,-1001),(1763,661,-1001),(1763,1106,-1001),(1764,51,-1000),(1764,52,-1000),(1764,53,-1000),(1764,54,-1000),(1764,55,-1000),(1764,56,-1000),(1764,57,-1000),(1764,58,-1000),(1764,59,-1000),(1764,60,-1000),(1764,61,-1000),(1764,62,-1000),(1764,178,-1000),(1764,180,-1000),(1764,661,-1000),(1764,1106,-1000),(1765,51,-1000),(1765,52,-1000),(1765,53,-1000),(1765,54,-1000),(1765,55,-1000),(1765,56,-1000),(1765,57,-1000),(1765,58,-1000),(1765,59,-1000),(1765,60,-1000),(1765,61,-1000),(1765,62,-1000),(1765,178,-1000),(1765,180,-1000),(1765,661,-1000),(1765,1106,-1000),(1766,51,-1000),(1766,52,-1000),(1766,53,-1000),(1766,54,-1000),(1766,55,-1000),(1766,56,-1000),(1766,57,-1000),(1766,58,-1000),(1766,59,-1000),(1766,60,-1000),(1766,61,-1000),(1766,62,-1000),(1766,178,-1000),(1766,180,-1000),(1766,661,-1000),(1766,1106,-1000),(1767,51,-1000),(1767,52,-1000),(1767,53,-1000),(1767,54,-1000),(1767,55,-1000),(1767,56,-1000),(1767,57,-1000),(1767,58,-1000),(1767,59,-1000),(1767,60,-1000),(1767,61,-1000),(1767,62,-1000),(1767,178,-1000),(1767,180,-1000),(1767,661,-1000),(1767,1106,-1000),(1768,51,-1000),(1768,52,-1000),(1768,53,-1000),(1768,54,-1000),(1768,55,-1000),(1768,56,-1000),(1768,57,-1000),(1768,58,-1000),(1768,59,-1000),(1768,60,-1000),(1768,61,-1000),(1768,62,-1000),(1768,178,-1000),(1768,180,-1000),(1768,661,-1000),(1768,1106,-1000),(1770,51,-400),(1770,52,-400),(1770,53,-400),(1770,54,-400),(1770,55,-400),(1770,56,-400),(1770,57,-400),(1770,58,-400),(1770,59,-400),(1770,60,-400),(1770,61,-400),(1770,62,-400),(1770,178,-400),(1770,180,-400),(1770,661,-400),(1770,1106,-400),(1771,51,-750),(1771,52,-750),(1771,53,-750),(1771,54,-750),(1771,55,-750),(1771,56,-750),(1771,57,-750),(1771,58,-750),(1771,59,-750),(1771,60,-750),(1771,61,-750),(1771,62,-750),(1771,178,-750),(1771,180,-750),(1771,661,-750),(1771,1106,-750),(1775,51,50),(1775,52,50),(1775,53,50),(1775,54,50),(1775,55,50),(1775,56,50),(1775,57,50),(1775,58,50),(1775,59,50),(1775,60,50),(1775,61,50),(1775,62,50),(1775,178,50),(1775,180,50),(1775,661,50),(1775,1106,50),(1777,51,-2000),(1777,52,-2000),(1777,53,-2000),(1777,54,-2000),(1777,55,-2000),(1777,56,-2000),(1777,57,-2000),(1777,58,-2000),(1777,59,-2000),(1777,60,-2000),(1777,61,-2000),(1777,62,-2000),(1777,178,-2000),(1777,180,-2000),(1777,661,-2000),(1777,1106,-2000),(1778,51,10),(1778,52,10),(1778,53,10),(1778,54,10),(1778,55,10),(1778,56,10),(1778,57,10),(1778,58,10),(1778,59,10),(1778,60,10),(1778,61,10),(1778,62,10),(1778,178,10),(1778,180,10),(1778,661,10),(1778,1106,10),(1779,51,30),(1779,52,30),(1779,53,30),(1779,54,30),(1779,55,30),(1779,56,30),(1779,57,30),(1779,58,30),(1779,59,30),(1779,60,30),(1779,61,30),(1779,62,30),(1779,178,30),(1779,180,30),(1779,661,30),(1779,1106,30),(1780,51,90),(1780,52,90),(1780,53,90),(1780,54,90),(1780,55,90),(1780,56,90),(1780,57,90),(1780,58,90),(1780,59,90),(1780,60,90),(1780,61,90),(1780,62,90),(1780,178,90),(1780,180,90),(1780,661,90),(1780,1106,90),(1781,51,90),(1781,52,90),(1781,53,90),(1781,54,90),(1781,55,90),(1781,56,90),(1781,57,90),(1781,58,90),(1781,59,90),(1781,60,90),(1781,61,90),(1781,62,90),(1781,178,90),(1781,180,90),(1781,661,90),(1781,1106,90),(1783,51,10),(1783,52,10),(1783,53,10),(1783,54,10),(1783,55,10),(1783,56,10),(1783,57,10),(1783,58,10),(1783,59,10),(1783,60,10),(1783,61,10),(1783,62,10),(1783,178,10),(1783,180,10),(1783,661,10),(1783,1106,10),(1784,51,-1000),(1784,52,-1000),(1784,53,-1000),(1784,54,-1000),(1784,55,-1000),(1784,56,-1000),(1784,57,-1000),(1784,58,-1000),(1784,59,-1000),(1784,60,-1000),(1784,61,-1000),(1784,62,-1000),(1784,178,-1000),(1784,180,-1000),(1784,661,-1000),(1784,1106,-1000),(1785,51,90),(1785,52,90),(1785,53,90),(1785,54,90),(1785,55,90),(1785,56,90),(1785,57,90),(1785,58,90),(1785,59,90),(1785,60,90),(1785,61,90),(1785,62,90),(1785,178,90),(1785,180,90),(1785,661,90),(1785,1106,90),(1786,51,10),(1786,52,10),(1786,53,10),(1786,54,10),(1786,55,10),(1786,56,10),(1786,57,10),(1786,58,10),(1786,59,10),(1786,60,10),(1786,61,10),(1786,62,10),(1786,178,10),(1786,180,10),(1786,661,10),(1786,1106,10),(1787,51,-2000),(1787,52,-2000),(1787,53,-2000),(1787,54,-2000),(1787,55,-2000),(1787,56,-2000),(1787,57,-2000),(1787,58,-2000),(1787,59,-2000),(1787,60,-2000),(1787,61,-2000),(1787,62,-2000),(1787,178,-2000),(1787,180,-2000),(1787,661,-2000),(1787,1106,-2000),(1788,51,-2000),(1788,52,-2000),(1788,53,-2000),(1788,54,-2000),(1788,55,-2000),(1788,56,-2000),(1788,57,-2000),(1788,58,-2000),(1788,59,-2000),(1788,60,-2000),(1788,61,-2000),(1788,62,-2000),(1788,178,-2000),(1788,180,-2000),(1788,661,-2000),(1788,1106,-2000),(1789,51,-110),(1789,52,-110),(1789,53,-110),(1789,54,-110),(1789,55,-110),(1789,56,-110),(1789,57,-110),(1789,58,-110),(1789,59,-110),(1789,60,-110),(1789,61,-110),(1789,62,-110),(1789,178,-110),(1789,180,-110),(1789,661,-110),(1789,1106,-110),(1790,51,-1000),(1790,52,-1000),(1790,53,-1000),(1790,54,-1000),(1790,55,-1000),(1790,56,-1000),(1790,57,-1000),(1790,58,-1000),(1790,59,-1000),(1790,60,-1000),(1790,61,-1000),(1790,62,-1000),(1790,178,-1000),(1790,180,-1000),(1790,661,-1000),(1790,1106,-1000),(1791,51,-110),(1791,52,-110),(1791,53,-110),(1791,54,-110),(1791,55,-110),(1791,56,-110),(1791,57,-110),(1791,58,-110),(1791,59,-110),(1791,60,-110),(1791,61,-110),(1791,62,-110),(1791,178,-110),(1791,180,-110),(1791,661,-110),(1791,1106,-110),(1792,51,-1000),(1792,52,-1000),(1792,53,-1000),(1792,54,-1000),(1792,55,-1000),(1792,56,-1000),(1792,57,-1000),(1792,58,-1000),(1792,59,-1000),(1792,60,-1000),(1792,61,-1000),(1792,62,-1000),(1792,178,-1000),(1792,180,-1000),(1792,661,-1000),(1792,1106,-1000),(1793,51,-110),(1793,52,-110),(1793,53,-110),(1793,54,-110),(1793,55,-110),(1793,56,-110),(1793,57,-110),(1793,58,-110),(1793,59,-110),(1793,60,-110),(1793,61,-110),(1793,62,-110),(1793,178,-110),(1793,180,-110),(1793,661,-110),(1793,1106,-110),(1794,51,-1000),(1794,52,-1000),(1794,53,-1000),(1794,54,-1000),(1794,55,-1000),(1794,56,-1000),(1794,57,-1000),(1794,58,-1000),(1794,59,-1000),(1794,60,-1000),(1794,61,-1000),(1794,62,-1000),(1794,178,-1000),(1794,180,-1000),(1794,661,-1000),(1794,1106,-1000),(1795,51,-110),(1795,52,-110),(1795,53,-110),(1795,54,-110),(1795,55,-110),(1795,56,-110),(1795,57,-110),(1795,58,-110),(1795,59,-110),(1795,60,-110),(1795,61,-110),(1795,62,-110),(1795,178,-110),(1795,180,-110),(1795,661,-110),(1795,1106,-110),(1796,51,-1000),(1796,52,-1000),(1796,53,-1000),(1796,54,-1000),(1796,55,-1000),(1796,56,-1000),(1796,57,-1000),(1796,58,-1000),(1796,59,-1000),(1796,60,-1000),(1796,61,-1000),(1796,62,-1000),(1796,178,-1000),(1796,180,-1000),(1796,661,-1000),(1796,1106,-1000),(1798,51,-110),(1798,52,-110),(1798,53,-110),(1798,54,-110),(1798,55,-110),(1798,56,-110),(1798,57,-110),(1798,58,-110),(1798,59,-110),(1798,60,-110),(1798,61,-110),(1798,62,-110),(1798,178,-110),(1798,180,-110),(1798,661,-110),(1798,1106,-110),(1799,51,-1000),(1799,52,-1000),(1799,53,-1000),(1799,54,-1000),(1799,55,-1000),(1799,56,-1000),(1799,57,-1000),(1799,58,-1000),(1799,59,-1000),(1799,60,-1000),(1799,61,-1000),(1799,62,-1000),(1799,178,-1000),(1799,180,-1000),(1799,661,-1000),(1799,1106,-1000),(1801,51,0),(1801,52,0),(1801,53,0),(1801,54,0),(1801,55,0),(1801,56,0),(1801,57,0),(1801,58,0),(1801,59,0),(1801,60,100),(1801,61,0),(1801,62,0),(1801,178,0),(1801,180,0),(1801,211,100),(1801,661,0),(1801,1106,0),(1802,51,-1000),(1802,52,-1000),(1802,53,-1000),(1802,54,-1000),(1802,55,-1000),(1802,56,-1000),(1802,57,-1000),(1802,58,-1000),(1802,59,-1000),(1802,60,-1000),(1802,61,-1000),(1802,62,-1000),(1802,178,-1000),(1802,180,-1000),(1802,211,100),(1802,661,-1000),(1802,1106,-1000),(1817,51,-500),(1817,52,-500),(1817,53,-500),(1817,54,-500),(1817,55,-500),(1817,56,-500),(1817,57,-500),(1817,58,-500),(1817,59,-500),(1817,60,-500),(1817,61,-500),(1817,62,-500),(1817,178,-500),(1817,180,-500),(1817,661,-500),(1817,1106,-500),(1818,51,-1000),(1818,52,-1000),(1818,53,-1000),(1818,54,-1000),(1818,55,-1000),(1818,56,-1000),(1818,57,-1000),(1818,58,-1000),(1818,59,-1000),(1818,60,-1000),(1818,61,-1000),(1818,62,-1000),(1818,178,-1000),(1818,180,-1000),(1818,661,-1000),(1818,1106,-1000),(1819,51,-100),(1819,52,-100),(1819,53,-100),(1819,54,-100),(1819,55,-100),(1819,56,-100),(1819,57,-100),(1819,58,-100),(1819,59,-100),(1819,60,-100),(1819,61,-100),(1819,62,-100),(1819,178,-100),(1819,180,-100),(1819,661,-100),(1819,1106,-100),(1820,51,100),(1820,52,100),(1820,53,100),(1820,54,100),(1820,55,100),(1820,56,100),(1820,57,100),(1820,58,100),(1820,59,100),(1820,60,100),(1820,61,100),(1820,62,100),(1820,178,100),(1820,180,100),(1820,661,100),(1820,1106,100),(1821,51,-101),(1821,52,-101),(1821,53,-101),(1821,54,-101),(1821,55,-101),(1821,56,-101),(1821,57,-101),(1821,58,-101),(1821,59,-101),(1821,60,-101),(1821,61,-101),(1821,62,-101),(1821,178,-101),(1821,180,-101),(1821,661,-101),(1821,1106,-101),(1822,203,200),(1823,51,-1000),(1823,52,-1000),(1823,53,-1000),(1823,54,-1000),(1823,55,-1000),(1823,56,-1000),(1823,57,-1000),(1823,58,-1000),(1823,59,-1000),(1823,60,-1000),(1823,61,-1000),(1823,62,-1000),(1823,178,-1000),(1823,180,-1000),(1823,661,-1000),(1823,1106,-1000),(1824,51,-1000),(1824,52,-1000),(1824,53,-1000),(1824,54,-1000),(1824,55,-1000),(1824,56,-1000),(1824,57,-1000),(1824,58,-1000),(1824,59,-1000),(1824,60,-1000),(1824,61,-1000),(1824,62,-1000),(1824,178,-1000),(1824,180,-1000),(1824,661,-1000),(1824,1106,-1000),(1828,51,-1000),(1828,52,-1000),(1828,53,-1000),(1828,54,-1000),(1828,55,-1000),(1828,56,-1000),(1828,57,-1000),(1828,58,-1000),(1828,59,-1000),(1828,60,-1000),(1828,61,-1000),(1828,62,-1000),(1828,178,-1000),(1828,180,-1000),(1828,661,-1000),(1828,1106,-1000),(1829,51,-1000),(1829,52,-1000),(1829,53,-1000),(1829,54,-1000),(1829,55,-1000),(1829,56,-1000),(1829,57,-1000),(1829,58,-1000),(1829,59,-1000),(1829,60,-1000),(1829,61,-1000),(1829,62,-1000),(1829,178,-1000),(1829,180,-1000),(1829,661,-1000),(1829,1106,-1000),(1830,51,-800),(1830,52,-800),(1830,53,-800),(1830,54,-800),(1830,55,-800),(1830,56,-800),(1830,57,-800),(1830,58,-800),(1830,59,-800),(1830,60,-800),(1830,61,-800),(1830,62,-800),(1830,178,-800),(1830,180,-800),(1830,661,-800),(1830,1106,-800),(1831,51,-800),(1831,52,-800),(1831,53,-800),(1831,54,-800),(1831,55,-800),(1831,56,-800),(1831,57,-800),(1831,58,-800),(1831,59,-800),(1831,60,-800),(1831,61,-800),(1831,62,-800),(1831,178,-800),(1831,180,-800),(1831,661,-800),(1831,1106,-800),(1846,1,100),(1846,5,-100),(1846,11,-100),(1846,12,100),(1846,13,100),(1846,14,100),(1846,16,100),(1846,51,-2000),(1846,52,-2000),(1846,53,-2000),(1846,54,-2000),(1846,55,-2000),(1846,57,-2000),(1846,58,-2000),(1846,59,-2000),(1846,60,-2000),(1846,61,-2000),(1846,62,-2000),(1846,178,-2000),(1846,180,-2000),(1846,206,50),(1846,661,-2000),(1846,1106,-2000),(1847,1,-100),(1847,5,100),(1847,11,100),(1847,12,-100),(1847,13,-100),(1847,14,-100),(1847,16,-100),(1847,51,-2000),(1847,52,-2000),(1847,53,-2000),(1847,54,-2000),(1847,55,-2000),(1847,57,-2000),(1847,58,-2000),(1847,59,-2000),(1847,60,-2000),(1847,61,-2000),(1847,62,-2000),(1847,178,-2000),(1847,180,-2000),(1847,206,50),(1847,661,-2000),(1847,1106,-2000),(1852,51,-2000),(1852,52,-2000),(1852,53,-2000),(1852,54,-2000),(1852,55,-2000),(1852,56,-2000),(1852,57,-2000),(1852,58,-2000),(1852,59,-2000),(1852,60,-2000),(1852,61,-2000),(1852,62,-2000),(1852,178,-2000),(1852,180,-2000),(1852,661,-2000),(1852,1106,-2000),(1853,51,-1000),(1853,52,-1000),(1853,53,-1000),(1853,54,-1000),(1853,55,-1000),(1853,56,-1000),(1853,57,-1000),(1853,58,-1000),(1853,59,-1000),(1853,60,-1000),(1853,61,-1000),(1853,62,-1000),(1853,178,-1000),(1853,180,-1000),(1853,661,-1000),(1853,1106,-1000),(1854,51,-1000),(1854,52,-1000),(1854,53,-1000),(1854,54,-1000),(1854,55,-1000),(1854,56,-1000),(1854,57,-1000),(1854,58,-1000),(1854,59,-1000),(1854,60,-1000),(1854,61,-1000),(1854,62,-1000),(1854,178,-1000),(1854,180,-1000),(1854,661,-1000),(1854,1106,-1000),(1855,51,-1000),(1855,52,-1000),(1855,53,-1000),(1855,54,-1000),(1855,55,-1000),(1855,56,-1000),(1855,57,-1000),(1855,58,-1000),(1855,59,-1000),(1855,60,-1000),(1855,61,-1000),(1855,62,-1000),(1855,178,-800),(1855,180,-800),(1855,661,-800),(1855,1106,-800),(1856,51,-75),(1856,52,-75),(1856,53,-50),(1856,54,-75),(1856,55,-25),(1856,56,-25),(1856,57,-75),(1856,58,-75),(1856,59,-75),(1856,60,-75),(1856,61,-75),(1856,62,-75),(1856,178,-75),(1856,180,-75),(1856,202,-25),(1856,205,-10),(1856,214,-10),(1856,216,25),(1856,661,-75),(1856,1106,-75),(1857,51,-1000),(1857,52,-1000),(1857,53,-1000),(1857,54,-1000),(1857,55,-1000),(1857,56,-1000),(1857,57,-1000),(1857,58,-1000),(1857,59,-1000),(1857,60,-1000),(1857,61,-1000),(1857,62,-1000),(1857,178,-1000),(1857,180,-1000),(1857,661,-1000),(1857,1106,-1000),(1858,51,-1000),(1858,52,-1000),(1858,53,-1000),(1858,54,-1000),(1858,55,-1000),(1858,56,-1000),(1858,57,-1000),(1858,58,-1000),(1858,59,-1000),(1858,60,-1000),(1858,61,-1000),(1858,62,-1000),(1858,178,-1000),(1858,180,-1000),(1858,661,-1000),(1858,1106,-1000),(1859,1,1),(1859,2,1),(1859,3,100),(1859,4,250),(1859,5,1),(1859,6,250),(1859,7,1),(1859,8,100),(1859,9,1),(1859,10,100),(1859,11,1),(1859,12,1),(1859,13,1),(1859,14,100),(1859,15,100),(1859,16,1),(1859,51,-100),(1859,52,100),(1859,53,-100),(1859,54,250),(1859,55,250),(1859,56,-250),(1859,57,250),(1859,58,-250),(1859,59,-100),(1859,60,-100),(1859,61,250),(1859,62,-250),(1859,178,-100),(1859,180,150),(1859,201,-300),(1859,202,-500),(1859,203,-300),(1859,204,500),(1859,205,-500),(1859,206,-300),(1859,207,500),(1859,208,200),(1859,209,200),(1859,210,200),(1859,211,-200),(1859,212,200),(1859,213,-500),(1859,214,200),(1859,215,500),(1859,216,100),(1859,661,250),(1859,1106,-250),(1860,1,250),(1860,2,250),(1860,3,1),(1860,4,1),(1860,5,100),(1860,6,1),(1860,7,100),(1860,8,1),(1860,9,100),(1860,10,1),(1860,11,100),(1860,12,100),(1860,13,100),(1860,14,1),(1860,15,1),(1860,16,100),(1860,51,100),(1860,52,-100),(1860,53,100),(1860,54,-250),(1860,55,-250),(1860,56,250),(1860,57,-250),(1860,58,250),(1860,59,100),(1860,60,100),(1860,61,-250),(1860,62,250),(1860,178,100),(1860,180,-150),(1860,201,300),(1860,202,500),(1860,203,300),(1860,204,-500),(1860,205,500),(1860,206,300),(1860,207,-500),(1860,208,-200),(1860,209,-200),(1860,210,-200),(1860,211,200),(1860,212,-200),(1860,213,500),(1860,214,-200),(1860,215,-500),(1860,216,-100),(1860,661,-250),(1860,1106,250),(1862,51,-75),(1862,52,-75),(1862,53,-50),(1862,54,-75),(1862,55,-25),(1862,56,-25),(1862,57,-75),(1862,58,-75),(1862,59,-75),(1862,60,-75),(1862,61,-75),(1862,62,-75),(1862,178,-75),(1862,180,-75),(1862,202,-25),(1862,205,-10),(1862,214,-10),(1862,216,25),(1862,661,-75),(1862,1106,-75),(1863,51,-600),(1863,52,-600),(1863,53,-600),(1863,54,-600),(1863,55,-600),(1863,56,-600),(1863,57,-600),(1863,58,-600),(1863,59,-600),(1863,60,-600),(1863,61,-600),(1863,62,-600),(1863,178,-600),(1863,180,-600),(1863,661,-600),(1863,1106,-600),(1864,51,-600),(1864,52,-600),(1864,53,-600),(1864,54,-600),(1864,55,-600),(1864,56,-600),(1864,57,-600),(1864,58,-600),(1864,59,-600),(1864,60,-600),(1864,61,-600),(1864,62,-600),(1864,178,-600),(1864,180,-600),(1864,661,-600),(1864,1106,-600),(1865,51,-600),(1865,52,-600),(1865,53,-600),(1865,54,-600),(1865,55,-600),(1865,56,-600),(1865,57,-600),(1865,58,-600),(1865,59,-600),(1865,60,-600),(1865,61,-600),(1865,62,-600),(1865,178,-600),(1865,180,-600),(1865,661,-600),(1865,1106,-600),(1866,51,-600),(1866,52,-600),(1866,53,-600),(1866,54,-600),(1866,55,-600),(1866,56,-600),(1866,57,-600),(1866,58,-600),(1866,59,-600),(1866,60,-600),(1866,61,-600),(1866,62,-600),(1866,178,-600),(1866,180,-600),(1866,661,-600),(1866,1106,-600),(1867,51,1),(1867,52,1),(1867,53,1),(1867,54,1),(1867,55,1),(1867,56,1),(1867,57,1),(1867,58,1),(1867,59,1),(1867,60,1),(1867,61,1),(1867,62,1),(1867,178,1),(1867,180,1),(1867,661,1),(1867,1106,1),(1868,51,1),(1868,52,1),(1868,53,1),(1868,54,1),(1868,55,1),(1868,56,1),(1868,57,1),(1868,58,1),(1868,59,1),(1868,60,1),(1868,61,1),(1868,62,1),(1868,178,1),(1868,180,1),(1868,661,1),(1868,1106,1),(1869,51,1),(1869,52,1),(1869,53,1),(1869,54,1),(1869,55,1),(1869,56,1),(1869,57,1),(1869,58,1),(1869,59,1),(1869,60,1),(1869,61,1),(1869,62,1),(1869,178,1),(1869,180,1),(1869,661,1),(1869,1106,1),(1870,51,1),(1870,52,1),(1870,53,1),(1870,54,1),(1870,55,1),(1870,56,1),(1870,57,1),(1870,58,1),(1870,59,1),(1870,60,1),(1870,61,1),(1870,62,1),(1870,178,1),(1870,180,1),(1870,661,1),(1870,1106,1),(1872,51,1),(1872,52,1),(1872,53,1),(1872,54,1),(1872,55,1),(1872,56,1),(1872,57,1),(1872,58,1),(1872,59,1),(1872,60,1),(1872,61,1),(1872,62,1),(1872,178,1),(1872,180,1),(1872,661,1),(1872,1106,1); +/*!40000 ALTER TABLE `client_faction_associations` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2018-12-11 14:51:29 +-- MySQL dump 10.13 Distrib 5.7.24, for Linux (x86_64) +-- +-- Host: 192.168.0.3 Database: peqdb +-- ------------------------------------------------------ +-- Server version 5.7.24-0ubuntu0.16.04.1 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `client_faction_names` +-- + +DROP TABLE IF EXISTS `client_faction_names`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `client_faction_names` ( + `id` int(11) NOT NULL, + `name` varchar(45) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `client_faction_names` +-- + +LOCK TABLES `client_faction_names` WRITE; +/*!40000 ALTER TABLE `client_faction_names` DISABLE KEYS */; +INSERT INTO `client_faction_names` VALUES (0,'NoFaction'),(1,'Warrior'),(2,'Cleric'),(3,'Paladin'),(4,'Ranger'),(5,'ShadowKnight'),(6,'Druid'),(7,'Monk'),(8,'Bard'),(9,'Rogue'),(10,'Shaman'),(11,'Necromancer'),(12,'Wizard'),(13,'Magician'),(14,'Enchanter'),(15,'Beastlord'),(16,'Berserker'),(17,'GUILDMASTERWARRIOR'),(18,'GUILDMASTERCLERIC'),(19,'GUILDMASTERPALADIN'),(20,'GUILDMASTERRANGER'),(21,'GUILDMASTERSK'),(22,'GUILDMASTERDRUID'),(23,'GUILDMASTERMONK'),(24,'GUILDMASTERBARD'),(25,'GUILDMASTERROGUE'),(26,'GUILDMASTERSHAMAN'),(27,'GUILDMASTERNECRO'),(28,'GUILDMASTERWIZARD'),(29,'GUILDMASTERMAGICIAN'),(30,'GUILDMASTERENCHANTER'),(31,'Class31'),(32,'Merchant'),(33,'Class33'),(34,'Class34'),(35,'Class35'),(36,'Class36'),(37,'Class37'),(38,'Class38'),(39,'Class39'),(40,'Class40'),(41,'Class41'),(42,'Class42'),(43,'Class43'),(44,'Class44'),(45,'Class45'),(46,'Class46'),(47,'Class47'),(48,'Class48'),(49,'Class49'),(50,'Class50'),(51,'Human'),(52,'Barbarian'),(53,'Erudite'),(54,'Wood Elf'),(55,'High Elf'),(56,'Dark Elf'),(57,'Half Elf'),(58,'Dwarf'),(59,'Troll'),(60,'Ogre'),(61,'Halfling'),(62,'Gnome'),(63,'Aviak'),(64,'Werewolf'),(65,'Brownies of Faydwer'),(66,'Centaur'),(67,'Clay Golem'),(68,'Cyclops'),(69,'Trakanon (Race)'),(70,'Venril Sathir (Race)'),(71,'Evil Eye'),(72,'Fire Beetle'),(73,'Kerran (Race)'),(74,'Fish'),(75,'Fairy (Race)'),(76,'Froglok'),(77,'Froglok Ghoul'),(78,'Fungus Man'),(79,'Gargoyle'),(80,'Race Faction (80)'),(81,'Gelatinous Cube'),(82,'Ghost'),(83,'Ghoul'),(84,'Giant Bat'),(85,'Beta KOS Copy 9'),(86,'Giant Rat'),(87,'Giant Snake'),(88,'Giant Spider'),(89,'Gnoll'),(90,'Goblin'),(91,'Gorilla'),(92,'Wolf'),(93,'Bear'),(94,'Human Guard (Race)'),(95,'Demi Lich (Race)'),(96,'Imp'),(97,'Griffon'),(98,'Kobold'),(99,'Lava Dragon'),(100,'Lion'),(101,'Lizard Man'),(102,'Mimic'),(103,'Minotaur'),(104,'Orc'),(105,'Human Beggar'),(106,'Pixies of Faydwer'),(107,'Drachnid (Race)'),(108,'Solusek Ro (Race)'),(109,'Kunark Goblin (Race)'),(110,'Skeleton'),(111,'Shark (Race)'),(112,'Tunare (Race)'),(113,'Tiger'),(114,'Treant'),(115,'Vampire'),(116,'Rallos Zek (Race)'),(117,'High Hold Citizen'),(118,'Tentacle'),(119,'Will-O-Wisp'),(120,'Zombie'),(121,'Qeynos Citizens'),(122,'Ship'),(123,'Launch'),(124,'Piranha'),(125,'Elemental'),(126,'Puma'),(127,'Neriak Citizen'),(128,'Erudin Citizens'),(129,'Bixie'),(130,'Reanimated Hand'),(131,'Rivervale Guard'),(132,'Scarecrow'),(133,'Skunk'),(134,'Snake Elemental'),(135,'Spectre'),(136,'Sphinx'),(137,'Armadillo'),(138,'Clockworks of Ak`Anon'),(139,'Drake'),(140,'Halas Citizen'),(141,'Alligator'),(142,'Grobb Citizen'),(143,'Oggok Citizen'),(144,'Kaladim Citizens'),(145,'Cazic-Thule (Race)'),(146,'Cockatrice'),(147,'Diasy Men'),(148,'Elf Vampire'),(149,'Amygdalan'),(150,'Dervish'),(151,'Efreeti'),(152,'Froglok Tadpole'),(153,'Kedge'),(154,'Leech'),(155,'Sword Fish'),(156,'Fel Guard'),(157,'Mammoth'),(158,'Eye of Zomm'),(159,'Wasp'),(160,'Mermaid'),(161,'Harpie'),(162,'Fayguard'),(163,'Drixie'),(164,'Ghost Ship'),(165,'Clam'),(166,'Sea Horse'),(167,'Ghost Dwarf'),(168,'Erudite Ghost'),(169,'Saber-toothed Cat'),(170,'SpiritWolf'),(171,'Gorgon'),(172,'Dragon Skeleton'),(173,'Innoruuk (Race)'),(174,'Unicorn Nightmare'),(175,'Pegasus'),(176,'Djinn (Race)'),(177,'Invisible Man'),(178,'Iksar'),(179,'Scorpion'),(180,'Vah Shir'),(181,'Sarnak'),(182,'Draglok Invalid Race'),(183,'Lycanthrope'),(184,'Mosquito'),(185,'Rhino'),(186,'Xalgoz Race'),(187,'Kunark Goblin'),(188,'Yeti'),(189,'Iksar Citizen'),(190,'Forest Giant'),(191,'Boat'),(192,'Race Faction (192)'),(193,'Race Faction (193)'),(194,'Burynai'),(195,'Goo'),(196,'Spectral Sarnak'),(197,'Spectral Iksar'),(198,'Kunark Fish'),(199,'Iksar Scorpion'),(200,'Erollisi Marr (Race)'),(201,'Bertoxxulous'),(202,'Brell Serilis'),(203,'Cazic-Thule'),(204,'Erollisi Marr'),(205,'Fizzlethorp'),(206,'Innoruuk'),(207,'Karana'),(208,'Mithaniel Marr'),(209,'Prexus'),(210,'Quellious'),(211,'Rallos Zek'),(212,'Rodcet Nife'),(213,'Solusek Ro'),(214,'Tribunal'),(215,'Tunare'),(216,'Veeshan'),(217,'Allize Volew'),(218,'Allize Taeew'),(219,'Antonius Bayle'),(220,'Arcane Scientists'),(221,'Bloodsabers'),(222,'Broken Skull Clan'),(223,'Circle of Unseen Hands'),(224,'Clan Drippycan'),(225,'Clan Runnyeye'),(226,'Clerics of Tunare'),(227,'Clerics of Underfoot'),(228,'Clurg'),(229,'Coalition of Tradefolk'),(230,'Corrupt Qeynos Guards'),(231,'Craftkeepers'),(232,'Craknek Warriors'),(233,'Crimson Hands'),(234,'Crushbone Orcs'),(235,'DaBashers'),(236,'Dark Bargainers'),(237,'Dark Ones'),(238,'Dark Reflection'),(239,'The Dead'),(240,'Deepmuses'),(241,'Deeppockets'),(242,'Deepwater Knights'),(243,'Drafling'),(244,'Ebon Mask'),(245,'Eldritch Collective'),(246,'Faydarks Champions'),(247,'Horde of Xalgoz'),(248,'Inhabitants of Firiona Vie'),(249,'Nagafen'),(250,'The Kromdul'),(251,'Frogloks of Guk'),(252,'Frogloks of Kunark'),(253,'Burynai Legion'),(254,'Gate Callers'),(255,'Gem Choppers'),(256,'Bloodgills'),(257,'Goblins of Cleaving Tooth'),(258,'Goblins of Fire Peak'),(259,'Goblins of Mountain Death'),(260,'Gnarled Fist'),(261,'Green Blood Knights'),(262,'Guards of Qeynos'),(263,'Guardians of the Vale'),(264,'Whistling Fist Brotherhood'),(265,'Heretics'),(266,'High Council of Erudin'),(267,'High Guard of Erudin'),(268,'Combine Empire'),(269,'Kithicor Residents'),(270,'Indigo Brotherhood'),(271,'Dismal Rage'),(272,'Jaggedpine Treefolk'),(273,'Kane Bayle'),(274,'Kazon Stormhammer'),(275,'Keepers of the Art'),(276,'Kelethin Merchants'),(277,'Kerra of Barren Coast'),(278,'King Naythox Thex'),(279,'King Tearis Thex'),(280,'Knights of Thunder'),(281,'Knights of Truth'),(282,'Kobolds of Fire Pit'),(283,'Pack of Tomar'),(284,'League of Antonican Bards'),(285,'Mayong Mistmoore'),(286,'Mayor Gubbin'),(287,'Meldrath'),(288,'Merchants of Ak`Anon'),(289,'Merchants of Erudin'),(290,'Merchants of Kaladim'),(291,'Merchants of Qeynos'),(292,'Merchants of Rivervale'),(293,'Miners Guild 249'),(294,'Miragul'),(295,'The Kromdek'),(296,'Opal Darkbriar'),(297,'Paladins of Underfoot'),(298,'Peace Keepers'),(299,'Phinigel Autropos'),(300,'Priests of Mischief'),(301,'Priests of Nagafen'),(302,'Protectors of Pine'),(303,'Queen Cristanos Thex'),(304,'Ring of Scale'),(305,'Rogues of the White Rose'),(306,'Sabertooths of Blackburrow'),(307,'Sarnak Collective'),(308,'Shadowknights of Night Keep'),(309,'Silent Fist Clan'),(310,'Soldiers of Tunare'),(311,'Steel Warriors'),(312,'Storm Guard'),(313,'Pirates of Gunthak'),(314,'Syth of Permafrost'),(315,'Trakanon'),(316,'Tunare\'s Scouts'),(317,'Undead Frogloks of Guk'),(318,'Venril Sathir'),(319,'Vox'),(320,'Wolves of the North'),(321,'Split Paw Clan'),(322,'Miners Guild 628'),(323,'Solusek Mining Co.'),(324,'Unkempt Druids'),(325,'Merchants of Felwithe'),(326,'Emerald Warriors'),(327,'Shamen of Justice'),(328,'Merchants of Halas'),(329,'Carson McCabe'),(330,'The Freeport Militia'),(331,'Merchants of Highpass'),(332,'Highpass Guards'),(333,'King Ak`Anon'),(334,'Dreadguard Outer'),(335,'Thoughtbleeders of Fear'),(336,'Coalition of Tradefolk Underground'),(337,'Oggok Guards'),(338,'Merchants of Oggok'),(339,'Bonethrowers'),(340,'Priests of Innoruuk'),(341,'Priests of Life'),(342,'Order of Three'),(343,'Surefall Protected Animals'),(344,'Beta Neutral'),(345,'Karana Residents'),(346,'Commons Residents'),(347,'Shark'),(348,'Runnyeye A'),(349,'Runnyeye B'),(350,'Runnyeye C'),(351,'Neriak Outer'),(352,'Neriak Inner'),(353,'Neriak Ogre'),(354,'Neriak Troll'),(355,'Storm Reapers'),(356,'Diseased Animal'),(357,'Akhevan (Plane of Shadow)'),(358,'Corrupt Akhevan'),(359,'Defenders of Luclin'),(360,'Iskar'),(361,'Ashen Order'),(362,'Priests of Marr'),(363,'The Spurned'),(364,'Shralok Orcs'),(365,'Pickclaw Goblins'),(366,'Karana Bandits'),(367,'Donovon'),(368,'Dervish Cutthroats'),(369,'Timmerain Darkbrow'),(370,'Dreadguard Inner'),(371,'Neriak Ghoul'),(372,'Najena'),(373,'Mucktail Gnolls'),(374,'Oggok Resident'),(375,'Death Fist Orcs (good)'),(376,'Grobb Merchants'),(377,'Grobb Guard'),(378,'Stone Hive Bixies'),(379,'Butcherblock Bandits'),(380,'Wood Elf Bards'),(381,'Tunare\'s Martyrs 2'),(382,'Kerra Isle'),(383,'Thunder Hooves'),(384,'Fay Scout'),(385,'Defective Clockwork'),(386,'Unrest Inhabitants'),(387,'Befallen Inhabitants'),(388,'Fairie'),(389,'Golem'),(390,'New Combine Guards'),(391,'New Combine'),(392,'Faction392'),(393,'Djinn'),(394,'Shamen of War'),(395,'Morawk'),(396,'Agnostic'),(397,'Sky Talons (good)'),(398,'Riptide Goblins'),(399,'Sea Furies'),(400,'Cult of Fear'),(401,'Song Weavers'),(402,'Oracle of K`Arnon'),(403,'Oracle of Marud'),(404,'Truespirit'),(405,'Dain Frostreaver IV'),(406,'Coldain'),(407,'Ry`Gorr Clan Snow Orcs'),(408,'Faction408'),(409,'Tserrina Syl`Tor'),(410,'Guide1'),(411,'Guide2'),(412,'Krag'),(413,'Guide3'),(414,'Residents of Fear'),(415,'Temple of Solusek Ro'),(416,'Shadowed Men'),(417,'Ankhefenmut'),(418,'Zazamoukh'),(419,'Kromrif'),(420,'Fallen of Bloody Kithicor'),(421,'Aggressors of Kithicor'),(422,'Defenders of Kithicor'),(423,'Verish Mal'),(424,'Inhabitants of Sky'),(425,'Inhabitants of Hate'),(426,'Agents of Mistmoore'),(427,'Spirocs of Timorous'),(428,'Minions of Underfoot'),(429,'King Tormax'),(430,'Claws of Veeshan'),(431,'Ulthork'),(432,'Othmir'),(433,'Jaled Dar'),(434,'Sirens of the Grotto'),(435,'Velketor'),(436,'Yelinak'),(437,'Denizens of Mischief'),(438,'Servants of Tunare'),(439,'Snowfang Gnolls'),(440,'Cabilis Residents'),(441,'Legion of Cabilis'),(442,'Crusaders of Greenmist'),(443,'Brood of Kotiz'),(444,'Swift Tails'),(445,'Scaled Mystics'),(446,'The Forsaken'),(447,'Pirates of Iceclad'),(448,'Kromzek'),(449,'Tunarean Court'),(450,'Thrall of Kly'),(451,'Brood of Di`Zok'),(452,'The Hotwingz'),(453,'Citizens of Torsis'),(454,'Drusella Sathir'),(455,'Minions of Scale'),(456,'Gelistial'),(457,'Holgresh'),(458,'Geonid Collective'),(459,'Lithiniath'),(460,'Citizens of Froststone'),(461,'Crystal Denizens'),(462,'Chetari'),(463,'Paebala'),(464,'Zlandicar'),(465,'Tizmak Clan'),(466,'Guardians of the Shrine'),(467,'Guardians of Veeshan'),(468,'The Sleeper'),(469,'Protectors of Growth'),(470,'Peoples Republic of Thurgadin'),(471,'Clan Kolbok'),(472,'Warders of The Claw'),(473,'Kejek Village'),(474,'Sporali'),(475,'King Xorbb'),(476,'Beta Good'),(477,'Beta Evil'),(478,'Beta Warmly'),(479,'Beta KOS'),(480,'Faction480'),(481,'Faction481'),(482,'Tribunal (Race)'),(483,'Bertoxxulous (Race)'),(484,'Bristlebane (Race)'),(485,'Faydrake'),(486,'Sarnak Skeleton'),(487,'Ratman'),(488,'Wyvern'),(489,'Wurm'),(490,'Devourer'),(491,'Iksar Golem'),(492,'Iksar Skeleton'),(493,'Man-Eating Plant'),(494,'Raptor'),(495,'Sarnak Golem'),(496,'Water Dragon'),(497,'Iksar Hand'),(498,'Cactus Man'),(499,'Flying Monkey'),(500,'Brontotherium'),(501,'Snow Dervish'),(502,'Dire Wolf'),(503,'Manticore'),(504,'Totem Man'),(505,'Cold Spectre'),(506,'Enchanted Armor'),(507,'Snow Bunny'),(508,'Walrus'),(509,'Rock Gem Man'),(510,'Race Faction (510)'),(511,'Race Faction (511)'),(512,'Yakman'),(513,'Faun'),(514,'Coldain (Race)'),(515,'Velious Dragon'),(516,'Hag'),(517,'Hippogriff'),(518,'Siren'),(519,'Frost Giant'),(520,'Storm Giant'),(521,'Otter Man'),(522,'Walrus Man'),(523,'Clockwork Dragon'),(524,'Abhorrent'),(525,'Sea Turtle'),(526,'BandWdragons'),(527,'Ghost Dragon'),(528,'Race Faction (528)'),(529,'Prismatic Dragon'),(530,'Shik Nar of Fungus Grove'),(531,'Rockhopper'),(532,'Underbulk'),(533,'Grimling'),(534,'Vacuum Worm'),(535,'Race Faction (535)'),(536,'Kahli Shah'),(537,'Owlbear'),(538,'Rhino Beetle'),(539,'Vampyre'),(540,'Earth Elemental (Race)'),(541,'Air Elemental (Race)'),(542,'Water Elemental (Race)'),(543,'Fire Elemental (Race)'),(544,'Wetfang Minnow'),(545,'Thought Horror'),(546,'Tegi'),(547,'Horse'),(548,'Shissar of Chelsith'),(549,'Fungal Fiend'),(550,'Vampire Volatalis'),(551,'Stonegrabber'),(552,'Scarlet Cheetah'),(553,'Zelniak'),(554,'Lightcrawler'),(555,'Shade'),(556,'Sunflower'),(557,'Sun Revenant'),(558,'Shrieker'),(559,'Galorian'),(560,'Netherbian'),(561,'Akheva (Race Type)'),(562,'Spire Spirit'),(563,'Sonic Wolf'),(564,'Ground Shaker'),(565,'Vah Shir Skeleton'),(566,'Mutant Humanoid'),(567,'Seru Race'),(568,'Recuso'),(569,'Vah Shir King (Race)'),(570,'Vah Shir Guard (Race)'),(571,'Portal Man (Race)'),(572,'Lujein'),(573,'Potamide'),(574,'Dryad'),(575,'Evil Treant'),(576,'Mutant Fly'),(577,'Tarew Marr'),(578,'Solusek Ro New'),(579,'Clockwork Golem'),(580,'Clockwork Brain'),(581,'Spectral Banshee'),(582,'Guard of Justice Race'),(583,'Mischief Castle'),(584,'Disease Boss'),(585,'Sol Ro Guard'),(586,'Bertoxxulous Race'),(587,'Tribunal Race'),(588,'Terris-Thule'),(589,'Vegerog'),(590,'Crocodile'),(591,'POP Bat'),(592,'Slarghilug'),(593,'Tranquilion'),(594,'Tin Soldier'),(595,'Nightmare Wraith'),(596,'Malarian'),(597,'Knight of Pestilence'),(598,'Lepertoloth'),(599,'Bubonian Boss'),(600,'Bubonian Underling'),(601,'Pusling'),(602,'Mephit'),(603,'Stormrider'),(604,'Junk Beast'),(605,'Broken Clockwork'),(606,'Giant Clockwork'),(607,'Clockwork Beetle'),(608,'Nightmare Goblin'),(609,'Karana Race'),(610,'Blood Raven'),(611,'Nightmare Gargoyle'),(612,'Mouths of Insanity'),(613,'Skeletal Horse'),(614,'Saryrn Race'),(615,'Fennin Ro'),(616,'Tormentor'),(617,'Necromancer Priest'),(618,'Nightmare, Planar'),(619,'Rallos Zek Race Faction'),(620,'Vallon Zek Race Faction'),(621,'Tallon Zek Race Faction'),(622,'Air Mephit'),(623,'Earth Mephit'),(624,'Fire Mephit'),(625,'Nightmare Mephit'),(626,'Zebuxoruk'),(627,'Mithaniel Marr (Race)'),(628,'Undead Knight'),(629,'The Rathe'),(630,'Xegony'),(631,'Greater Fiend'),(632,'Race Faction (632)'),(633,'Crab'),(634,'Phoenix'),(635,'Quarm (Race)'),(636,'Bear PoP'),(637,'Storm Taarid'),(638,'Storm Satuur'),(639,'Storm Kuraaln'),(640,'Storm Volaas'),(641,'Storm Mana'),(642,'Storm Fire'),(643,'Storm Celestial'),(644,'War Wraith'),(645,'Wrulon'),(646,'Kraken'),(647,'Poison Frog'),(648,'Queztocoatal'),(649,'Valorian (War Soldier)'),(650,'War Boar'),(651,'Efreeti PoP'),(652,'War Boar Unarmored'),(653,'Black Knight'),(654,'Animated Armor'),(655,'Undead Footman'),(656,'Rallos Zek Minion'),(657,'Arachnid - PoP'),(658,'Crystal Spider (Race)'),(659,'Zebuxoruk\'s Cage (Race)'),(660,'Bastion of Thunder Portal (Race)'),(661,'Guktan'),(662,'Troll Buccaneer'),(663,'Troll Freebooter'),(664,'Troll Sea Rover'),(665,'Spectre Pirate Boss'),(666,'Pirate Boss'),(667,'Pirate Dark Shaman'),(668,'Pirate Officer'),(669,'Gnome Pirate'),(670,'Dark Elf Pirate'),(671,'Ogre Pirate'),(672,'Human Pirate'),(673,'Erudite Pirate'),(674,'Poison Arrow Frog'),(675,'Troll Zombie'),(676,'Luggald'),(677,'Luggald Armored'),(678,'Luggald Robed'),(679,'Drogmor (Race)'),(680,'Dream Delvers'),(681,'Beta Ally'),(682,'Beta Warmly'),(683,'Beta Kindly'),(684,'Beta Amiable'),(685,'Beta Apprehensive'),(686,'Beta Dubious'),(687,'Beta Threatening'),(688,'Shissar (Race)'),(689,'Shik Nar (Race)'),(690,'Shik Nar of Mons Letalis'),(691,'Brownie (Race)'),(692,'Pixie (Race)'),(693,'Qeynos Citizen (Race)'),(694,'Erudite Citizen (Race)'),(695,'Clockwork Gnome (Race)'),(696,'Kaladim Citizen (Race)'),(697,'Faction697'),(698,'Faction698'),(699,'Faction699'),(700,'Mercenary Coalition'),(701,'Beta KOS Copy 1'),(702,'Beta KOS Copy 2'),(703,'Beta KOS Copy 3'),(704,'Beta KOS Copy 4'),(705,'Beta KOS Copy 5'),(706,'Beta KOS Copy 6'),(707,'Beta KOS Copy 7'),(708,'Beta KOS Copy 8'),(709,'The Yendan'),(710,'Guardians of War'),(711,'Castle Rulnavis'),(712,'Castle Tamrel'),(713,'Soldiers of Tallon'),(714,'Soldiers of Vallon'),(715,'Inhabitants of Rulnavis'),(716,'Inhabitants of Tamrel'),(717,'Keepers of Narikor'),(718,'The Disgraced'),(719,'Minions of Rot'),(720,'Memorial Gnomelike'),(721,'Iron Legion'),(722,'Faction722'),(723,'Faction723'),(724,'Faction724'),(725,'Faction725'),(726,'Faction726'),(727,'Faction727'),(728,'Faction728'),(729,'Faction729'),(730,'Faction730'),(731,'Faction731'),(732,'Faction732'),(733,'Faction733'),(734,'Faction734'),(735,'Faction735'),(736,'Faction736'),(737,'Faction737'),(738,'Faction738'),(739,'Faction739'),(740,'Faction740'),(741,'Faction741'),(742,'Faction742'),(743,'Faction743'),(744,'Faction744'),(745,'Faction745'),(746,'Faction746'),(747,'Faction747'),(748,'Faction748'),(749,'Faction749'),(750,'Faction750'),(751,'Faction751'),(752,'Faction752'),(753,'Faction753'),(754,'Faction754'),(755,'Faction755'),(756,'Faction756'),(757,'Faction757'),(758,'Faction758'),(759,'Faction759'),(760,'Faction760'),(761,'Faction761'),(762,'Faction762'),(763,'Faction763'),(764,'Faction764'),(765,'Faction765'),(766,'Faction766'),(767,'Faction767'),(768,'Faction768'),(769,'Faction769'),(770,'Faction770'),(771,'Faction771'),(772,'Faction772'),(773,'Faction773'),(774,'Faction774'),(775,'Faction775'),(776,'Faction776'),(777,'Faction777'),(778,'Faction778'),(779,'Faction779'),(780,'Faction780'),(781,'Faction781'),(782,'Faction782'),(783,'Faction783'),(784,'Faction784'),(785,'Faction785'),(786,'Faction786'),(787,'Faction787'),(788,'Faction788'),(789,'Faction789'),(790,'Faction790'),(791,'Faction791'),(792,'Faction792'),(793,'Faction793'),(794,'Faction794'),(795,'Faction795'),(796,'Faction796'),(797,'Faction797'),(798,'Faction798'),(799,'Faction799'),(800,'Faction800'),(801,'Faction801'),(802,'Faction802'),(803,'Faction803'),(804,'Faction804'),(805,'Faction805'),(806,'Faction806'),(807,'Faction807'),(808,'Faction808'),(809,'Faction809'),(810,'Faction810'),(811,'Faction811'),(812,'Faction812'),(813,'Faction813'),(814,'Faction814'),(815,'Faction815'),(816,'Faction816'),(817,'Faction817'),(818,'Faction818'),(819,'Faction819'),(820,'Faction820'),(821,'Faction821'),(822,'Faction822'),(823,'Faction823'),(824,'Faction824'),(825,'Faction825'),(826,'Faction826'),(827,'Faction827'),(828,'Faction828'),(829,'Faction829'),(830,'Faction830'),(831,'Faction831'),(832,'Faction832'),(833,'Faction833'),(834,'Faction834'),(835,'Faction835'),(836,'Faction836'),(837,'Faction837'),(838,'Faction838'),(839,'Faction839'),(840,'Faction840'),(841,'Faction841'),(842,'Faction842'),(843,'Faction843'),(844,'Faction844'),(845,'Faction845'),(846,'Faction846'),(847,'Faction847'),(848,'Faction848'),(849,'Faction849'),(850,'Faction850'),(851,'Faction851'),(852,'Faction852'),(853,'Faction853'),(854,'Faction854'),(855,'Faction855'),(856,'Faction856'),(857,'Faction857'),(858,'Faction858'),(859,'Faction859'),(860,'Faction860'),(861,'Faction861'),(862,'Faction862'),(863,'Faction863'),(864,'Faction864'),(865,'Faction865'),(866,'Faction866'),(867,'Faction867'),(868,'Faction868'),(869,'Faction869'),(870,'Faction870'),(871,'Faction871'),(872,'Faction872'),(873,'Faction873'),(874,'Faction874'),(875,'Faction875'),(876,'Faction876'),(877,'Faction877'),(878,'Faction878'),(879,'Faction879'),(880,'Faction880'),(881,'Faction881'),(882,'Faction882'),(883,'Faction883'),(884,'Faction884'),(885,'Faction885'),(886,'Faction886'),(887,'Faction887'),(888,'Faction888'),(889,'Faction889'),(890,'Faction890'),(891,'Faction891'),(892,'Faction892'),(893,'Faction893'),(894,'Faction894'),(895,'Faction895'),(896,'Faction896'),(897,'Faction897'),(898,'Faction898'),(899,'Faction899'),(900,'Faction900'),(901,'Faction901'),(902,'Faction902'),(903,'Faction903'),(904,'Faction904'),(905,'Faction905'),(906,'Faction906'),(907,'Faction907'),(908,'Faction908'),(909,'Faction909'),(910,'Faction910'),(911,'Faction911'),(912,'Faction912'),(913,'Faction913'),(914,'Faction914'),(915,'Faction915'),(916,'Faction916'),(917,'Faction917'),(918,'Faction918'),(919,'Faction919'),(920,'Faction920'),(921,'Faction921'),(922,'Faction922'),(923,'Faction923'),(924,'Faction924'),(925,'Faction925'),(926,'Faction926'),(927,'Faction927'),(928,'Faction928'),(929,'Faction929'),(930,'Faction930'),(931,'Faction931'),(932,'Faction932'),(933,'Faction933'),(934,'Faction934'),(935,'Faction935'),(936,'Faction936'),(937,'Faction937'),(938,'Faction938'),(939,'Faction939'),(940,'Faction940'),(941,'Faction941'),(942,'Faction942'),(943,'Faction943'),(944,'Faction944'),(945,'Faction945'),(946,'Faction946'),(947,'Faction947'),(948,'Faction948'),(949,'Faction949'),(950,'Faction950'),(951,'Faction951'),(952,'Faction952'),(953,'Faction953'),(954,'Faction954'),(955,'Faction955'),(956,'Faction956'),(957,'Faction957'),(958,'Faction958'),(959,'Faction959'),(960,'Faction960'),(961,'Faction961'),(962,'Faction962'),(963,'Faction963'),(964,'Faction964'),(965,'Faction965'),(966,'Faction966'),(967,'Faction967'),(968,'Faction968'),(969,'Faction969'),(970,'Faction970'),(971,'Faction971'),(972,'Faction972'),(973,'Faction973'),(974,'Faction974'),(975,'Faction975'),(976,'Faction976'),(977,'Faction977'),(978,'Faction978'),(979,'Faction979'),(980,'Faction980'),(981,'Faction981'),(982,'Faction982'),(983,'Faction983'),(984,'Faction984'),(985,'Faction985'),(986,'Faction986'),(987,'Faction987'),(988,'Faction988'),(989,'Faction989'),(990,'Faction990'),(991,'Faction991'),(992,'Faction992'),(993,'Faction993'),(994,'Faction994'),(995,'Faction995'),(996,'Faction996'),(997,'Faction997'),(998,'Faction998'),(999,'Faction999'),(1000,'Slaves of Gloomingdeep'),(1001,'Kobolds of Gloomingdeep'),(1002,'Creatures of Gloomingdeep'),(1003,'Guards of Gloomingdeep'),(1004,'Animals of Taelosia'),(1005,'Qeynos Elite Watch'),(1006,'Troupe of Free Speakers'),(1007,'Riftseekers'),(1008,'Discordant Creatures of Kuua'),(1009,'Denizens of Discord'),(1010,'Children of Dranik'),(1011,'Followers of Mekvidarsh'),(1012,'Followers of Loschryre'),(1013,'Overlord Mata Muram'),(1014,'BetaOmensNPCKOS'),(1015,'Creatures of Kuua'),(1016,'Dranik Loyalists'),(1017,'Senior Guides of Norrath'),(1018,'Children of Mistmoore'),(1019,'Elemental Invaders'),(1020,'Lanys T`Vyl'),(1021,'Dark Reign'),(1022,'Firiona Vie'),(1023,'Norrath\'s Keepers'),(1024,'Tirranun'),(1025,'Minions of Tirranun'),(1026,'Volkara'),(1027,'Volkara\'s Brood'),(1028,'Yar`lir'),(1029,'Thunder Guardians'),(1030,'Kessdona'),(1031,'Rikkukin'),(1032,'Stillmoon Acolytes'),(1033,'Vishimtar'),(1034,'Nest Guardians'),(1035,'Cursed Drakes'),(1036,'Scorchclaw Goblins'),(1037,'Frostflake Goblins'),(1038,'Whitecap Goblins'),(1039,'Dirtdigger Goblins'),(1040,'Greenfoot Goblins'),(1041,'Grel'),(1042,'Defenders of the Broodlands'),(1043,'BetaNPCKOS-PC'),(1044,'The Guardians'),(1045,'The Guardian\'s Alliance'),(1046,'The Dark Alliance'),(1047,'The Dark Suppliers'),(1048,'Sporali Collective'),(1049,'Deep Sporali'),(1050,'Expedition 328'),(1051,'Creep Reapers'),(1052,'Shadowmane'),(1053,'Ragepaw'),(1054,'Shiliskin Empire'),(1055,'Free Traders of Malgrinnor'),(1056,'Fallen Guard of Illsalin'),(1057,'Disciples of Jarzarrad'),(1058,'Scions of Dreadspire'),(1059,'Agents of Dreadspire'),(1060,'Creatures of Darkhollow'),(1061,'BetaNPCKOS-NPC'),(1062,'Assistants of the Scribe'),(1063,'Citizens of Freeport'),(1064,'Spirits of Arcstone'),(1065,'Fledgling Scrykin'),(1066,'Elder Scrykin'),(1067,'Constructs of Relic'),(1068,'Legions of Sverag'),(1069,'Ravenous Undead'),(1070,'Wildfang'),(1071,'Redfist Legionnaires'),(1072,'The Irebound'),(1073,'Ragefang'),(1074,'The Venom Swarm'),(1075,'Deathshed Legion'),(1076,'Blood Furies'),(1077,'Furies of the North'),(1078,'Stormbreaker Furies'),(1079,'Bonecracker Furies'),(1080,'Furies of Shir'),(1081,'The Wall-Borne'),(1082,'Legion of Rage'),(1083,'The Wretched'),(1084,'Trueblood Coven'),(1085,'Citizens of Takish-Hiz'),(1086,'Insurgents of Ro'),(1087,'Creatures of Elddar'),(1088,'Clan Vorzek'),(1089,'Tribe of the Nogdha'),(1090,'Servants of the Compact'),(1091,'Creatures of Sandflow'),(1092,'Blood of Ro'),(1093,'Direwind Gnolls'),(1094,'Forces of Dyn\'leth'),(1095,'Crusade of the Scale'),(1096,'Blackfeather Harpies'),(1097,'Blackfeather Royalty'),(1098,'Blackfeather Animals'),(1099,'Blackfeather Spiders'),(1100,'Shades of Zek'),(1101,'Ancestors of Valdeholm'),(1102,'Converts of Valdeholm'),(1103,'Valdeholm Citizens'),(1104,'Wraithguard'),(1105,'Wraithguard Leadership'),(1106,'Drakkin'),(1107,'Tuffein'),(1108,'Tuffein Leadership'),(1109,'Minohten'),(1110,'Nymphs of the Windwillow'),(1111,'Nymphs of the Darkwater'),(1112,'Blackfeather Raiders'),(1113,'Dromrek'),(1114,'Lost of the Windwillow'),(1115,'Foulblood Fieldstrider Centaur'),(1116,'Fieldstrider Centaur'),(1117,'Stonemight Goblins'),(1118,'Darkfell Clan'),(1119,'Guardians of the Grove'),(1120,'Coldeye Clan'),(1121,'Nightmoon Kobolds'),(1122,'Frostbite Clan'),(1123,'Drones of Stonehive'),(1124,'Legion of Stonehive'),(1125,'Spirits of Nokk'),(1126,'Guardians of the Dark Tower'),(1127,'The Blightfire Tainted'),(1128,'Madcaps - Mushroom Men'),(1129,'Circle of the Crystalwing'),(1130,'Selay'),(1131,'Dyn`leth'),(1132,'Lethar'),(1133,'Vergalid'),(1134,'Scholars of Solusek'),(1135,'Infiltrators and Traitors of Ashengate'),(1136,'Nature Animal'),(1137,'Crescent Reach Guards'),(1138,'Greater Shades of Zek'),(1139,'Newbie Guard'),(1140,'Drowned Dead'),(1141,'Sharpeye\'s Reef Runners'),(1142,'Blacksail Pirates'),(1143,'Stormscape Aviaks'),(1144,'Galigaba'),(1145,'King Peleke'),(1146,'Sunstone Goblins'),(1147,'King Vigdos'),(1148,'Tidewater Goblins'),(1149,'King Tondra'),(1150,'Platinum Efreeti'),(1151,'Sphinx of Atiiki'),(1152,'Nature Animal - Snake'),(1153,'Nature Animal - Crocodile'),(1154,'Nature Animal - Basilisk'),(1155,'Nature Animal - Shark'),(1156,'Nature Animal - Spider'),(1157,'Nature Animal - Wolf'),(1158,'Nature Animal - Bear'),(1159,'Nature Animal - Beetle'),(1160,'Nature Animal - Fish'),(1161,'Combine Citizens'),(1162,'Disciples of Zhisza'),(1163,'Brood of Vaakiszh'),(1164,'Fangs of Saarisz'),(1165,'Katta Elementals'),(1166,'Sirens of Maiden\'s Grave'),(1167,'The Cursed of Monkey Rock'),(1168,'Minions of Solusek Ro'),(1169,'Blacksail Smugglers'),(1170,'Combine Empire Merchants'),(1171,'Beta Enemy'),(1172,'Beta Friend'),(1173,'Beta Neutral 2'),(1174,'The Cursed of Monkey Rock (Instance)'),(1175,'Captains of Dyn`leth'),(1176,'Blood of Solusek'),(1177,'Guardian '),(1178,'Workshop Workers Union'),(1179,'Blackwater'),(1180,'Kirathas'),(1181,'The Borrowers'),(1182,'Erollisi\'s Scorned'),(1183,'Bertoxxulous\' Chosen'),(1184,'Camp Valor'),(1185,'Ladies of the Light'),(1186,'Loyalists of Kerafyrm'),(1187,'Emissaries of Claws of Veeshan'),(1188,'Crusaders of Veeshan'),(1189,'Brownie Rebels'),(1190,'Ak`Anon Strike Force V'),(1191,'Fang Breakers'),(1192,'The Fallen'),(1193,'Ancestors of the Crypt'),(1194,'Minions of Meldrath'),(1195,'Bloodmoon Were-Orcs'),(1196,'Darkvine Villagers'),(1197,'Wind Nymphs'),(1198,'Guardian Defense Forces'),(1199,'Residents of the Glade'),(1200,'Bayle\'s Irregulars'),(1201,'Plaguebringer Parishioners'),(1202,'Blackburrow Gnolls'),(1203,'Darkpaw Gnolls'),(1204,'Army of Light '),(1205,'Thaulen Teir\'Duuren'),(1206,'Kithicor Irregulars'),(1207,'Prisoners of the Dark Elves'),(1208,'Discordant Agents'),(1209,'Dragorn Forces'),(1210,'Discordant Army'),(1211,'Toskirakk Slaves'),(1212,'Toskirakk Slavers'),(1213,'Rallosian Guards'),(1214,'Toskirakk Merchants'),(1215,'Rathe Council'),(1216,'Rallosian Invaders'),(1217,'Rathe Living Heaps'),(1218,'Rathe Council Defenders'),(1219,'Darkhammer Dwarves'),(1220,'Primal Crystallines'),(1221,'Oceangreen Residents'),(1222,'Cirtan, Bayle\'s Herald'),(1223,'Silla Herald'),(1224,'Tynoc, Herald of Scale'),(1225,'Mitius, Herald of Change'),(1226,'Herald Argoth'),(1227,'Herald of Druzzil Ro'),(1228,'Ancient Blackburrow Gnolls'),(1229,'Sebilisian Empire'),(1230,'Discordant Armies'),(1231,'Tanglefuse\'s Clockworks'),(1232,'Underfoot Citizens'),(1233,'Underfoot Autarchs'),(1234,'Underfoot Denizens'),(1235,'Underfoot Protectors'),(1236,'Underfoot Devout'),(1237,'Cliknar'),(1238,'Underfoot Subversionists'),(1239,'Clockwork Magma Meter'),(1240,'Morell-Thule'),(1241,'Degmar\'s Loyalists'),(1242,'Degmar\'s Commoners'),(1243,'Degmar\'s Haunts'),(1244,'Brother Island Residents'),(1245,'Brother Island Animal'),(1246,'Sirens of the Endless Cavern'),(1247,'Faction1247'),(1248,'Faction1248'),(1249,'Faction1249'),(1250,'Faction1250'),(1251,'Faction1251'),(1252,'Faction1252'),(1253,'Faction1253'),(1254,'Faction1254'),(1255,'Faction1255'),(1256,'Faction1256'),(1257,'Faction1257'),(1258,'Faction1258'),(1259,'Faction1259'),(1260,'Faction1260'),(1261,'Faction1261'),(1262,'Faction1262'),(1263,'Faction1263'),(1264,'Faction1264'),(1265,'Faction1265'),(1266,'Faction1266'),(1267,'Faction1267'),(1268,'Faction1268'),(1269,'Faction1269'),(1270,'Faction1270'),(1271,'Faction1271'),(1272,'Faction1272'),(1273,'Faction1273'),(1274,'Faction1274'),(1275,'Faction1275'),(1276,'Faction1276'),(1277,'Faction1277'),(1278,'Faction1278'),(1279,'Faction1279'),(1280,'Faction1280'),(1281,'Faction1281'),(1282,'Faction1282'),(1283,'Faction1283'),(1284,'Faction1284'),(1285,'Faction1285'),(1286,'Faction1286'),(1287,'Faction1287'),(1288,'Faction1288'),(1289,'Faction1289'),(1290,'Faction1290'),(1291,'Faction1291'),(1292,'Faction1292'),(1293,'Faction1293'),(1294,'Faction1294'),(1295,'Faction1295'),(1296,'Faction1296'),(1297,'Faction1297'),(1298,'Faction1298'),(1299,'Faction1299'),(1300,'Faction1300'),(1301,'Faction1301'),(1302,'Faction1302'),(1303,'Faction1303'),(1304,'Faction1304'),(1305,'Faction1305'),(1306,'Faction1306'),(1307,'Faction1307'),(1308,'Faction1308'),(1309,'Faction1309'),(1310,'Faction1310'),(1311,'Faction1311'),(1312,'Faction1312'),(1313,'Faction1313'),(1314,'Faction1314'),(1315,'Faction1315'),(1316,'Faction1316'),(1317,'Faction1317'),(1318,'Faction1318'),(1319,'Faction1319'),(1320,'Faction1320'),(1321,'Faction1321'),(1322,'Faction1322'),(1323,'Faction1323'),(1324,'Faction1324'),(1325,'Faction1325'),(1326,'Faction1326'),(1327,'Faction1327'),(1328,'Faction1328'),(1329,'Faction1329'),(1330,'Faction1330'),(1331,'Faction1331'),(1332,'Faction1332'),(1333,'Faction1333'),(1334,'Faction1334'),(1335,'Faction1335'),(1336,'Faction1336'),(1337,'Faction1337'),(1338,'Faction1338'),(1339,'Faction1339'),(1340,'Faction1340'),(1341,'Faction1341'),(1342,'Faction1342'),(1343,'Faction1343'),(1344,'Faction1344'),(1345,'Faction1345'),(1346,'Faction1346'),(1347,'Faction1347'),(1348,'Faction1348'),(1349,'Faction1349'),(1350,'Faction1350'),(1351,'Faction1351'),(1352,'Faction1352'),(1353,'Faction1353'),(1354,'Faction1354'),(1355,'Faction1355'),(1356,'Faction1356'),(1357,'Faction1357'),(1358,'Faction1358'),(1359,'Faction1359'),(1360,'Faction1360'),(1361,'Faction1361'),(1362,'Faction1362'),(1363,'Faction1363'),(1364,'Faction1364'),(1365,'Faction1365'),(1366,'Faction1366'),(1367,'Faction1367'),(1368,'Faction1368'),(1369,'Faction1369'),(1370,'Faction1370'),(1371,'Faction1371'),(1372,'Faction1372'),(1373,'Faction1373'),(1374,'Faction1374'),(1375,'Faction1375'),(1376,'Faction1376'),(1377,'Faction1377'),(1378,'Faction1378'),(1379,'Faction1379'),(1380,'Faction1380'),(1381,'Faction1381'),(1382,'Faction1382'),(1383,'Faction1383'),(1384,'Faction1384'),(1385,'Faction1385'),(1386,'Faction1386'),(1387,'Faction1387'),(1388,'Faction1388'),(1389,'Faction1389'),(1390,'Faction1390'),(1391,'Faction1391'),(1392,'Faction1392'),(1393,'Faction1393'),(1394,'Faction1394'),(1395,'Faction1395'),(1396,'Faction1396'),(1397,'Faction1397'),(1398,'Faction1398'),(1399,'Faction1399'),(1400,'Faction1400'),(1401,'Faction1401'),(1402,'Faction1402'),(1403,'Faction1403'),(1404,'Faction1404'),(1405,'Faction1405'),(1406,'Faction1406'),(1407,'Faction1407'),(1408,'Faction1408'),(1409,'Faction1409'),(1410,'Faction1410'),(1411,'Faction1411'),(1412,'Faction1412'),(1413,'Faction1413'),(1414,'Faction1414'),(1415,'Faction1415'),(1416,'Faction1416'),(1417,'Faction1417'),(1418,'Faction1418'),(1419,'Faction1419'),(1420,'Faction1420'),(1421,'Faction1421'),(1422,'Faction1422'),(1423,'Faction1423'),(1424,'Faction1424'),(1425,'Faction1425'),(1426,'Faction1426'),(1427,'Faction1427'),(1428,'Faction1428'),(1429,'Faction1429'),(1430,'Faction1430'),(1431,'Faction1431'),(1432,'Faction1432'),(1433,'Faction1433'),(1434,'Faction1434'),(1435,'Faction1435'),(1436,'Faction1436'),(1437,'Faction1437'),(1438,'Faction1438'),(1439,'Faction1439'),(1440,'Faction1440'),(1441,'Faction1441'),(1442,'Faction1442'),(1443,'Faction1443'),(1444,'Faction1444'),(1445,'Faction1445'),(1446,'Faction1446'),(1447,'Faction1447'),(1448,'Faction1448'),(1449,'Faction1449'),(1450,'Faction1450'),(1451,'Faction1451'),(1452,'Faction1452'),(1453,'Faction1453'),(1454,'Faction1454'),(1455,'Faction1455'),(1456,'Faction1456'),(1457,'Faction1457'),(1458,'Faction1458'),(1459,'Faction1459'),(1460,'Faction1460'),(1461,'Faction1461'),(1462,'Faction1462'),(1463,'Faction1463'),(1464,'Faction1464'),(1465,'Faction1465'),(1466,'Faction1466'),(1467,'Faction1467'),(1468,'Faction1468'),(1469,'Faction1469'),(1470,'Faction1470'),(1471,'Faction1471'),(1472,'Faction1472'),(1473,'Faction1473'),(1474,'Faction1474'),(1475,'Faction1475'),(1476,'Faction1476'),(1477,'Faction1477'),(1478,'Faction1478'),(1479,'Faction1479'),(1480,'Faction1480'),(1481,'Faction1481'),(1482,'Faction1482'),(1483,'Seru'),(1484,'Hand of Seru'),(1485,'Eye of Seru'),(1486,'Heart of Seru'),(1487,'Shoulders of Seru'),(1488,'The Recuso'),(1489,'Gladiators and Slaves of Sanctus Seru'),(1490,'Grimlings of the Moor'),(1491,'Sonic Wolves of the Moor'),(1492,'Owlbears of the Moor'),(1493,'Grimling Invaders'),(1494,'Owlbear Invaders'),(1495,'Sonic Wolf Invaders'),(1496,'Grimling Defenders'),(1497,'Owlbear Defenders'),(1498,'Sonic Wolf Defenders'),(1499,'Citizens of Seru'),(1500,'Gor Taku'),(1501,'Shak Dratha'),(1502,'Katta Castellum Citizens'),(1503,'Validus Custodus'),(1504,'Magus Conlegium'),(1505,'Nathyn Illuminious'),(1506,'Coterie of the Eternal Night'),(1507,'Valdanov Zevfeer'),(1508,'Traders of the Haven'),(1509,'Haven Defenders'),(1510,'House of Fordel'),(1511,'House of Midst'),(1512,'House of Stout'),(1513,'Guardians of Shar Vahl'),(1514,'Testfaction'),(1515,'Dark Forest Denizens'),(1516,'Grimlings of the Forest'),(1517,'Deepwood Owlbears'),(1518,'Pack of the Great Moon'),(1519,'Lodikai'),(1520,'Whisperling'),(1521,'Akheva'),(1522,'Primordial Malice'),(1523,'Feast of the Burrowers'),(1524,'Johanius Barleou'),(1525,'Coterie Elite'),(1526,'Old Disciples of Kerafyrm'),(1527,'Spire Spirits'),(1528,'Thought Leeches'),(1529,'Khala Dun'),(1530,'Taruun'),(1531,'Jharin'),(1532,'Khati Sha'),(1533,'Dar Khura'),(1534,'Luclin Monsters'),(1535,'Brood of Ssraeshza'),(1536,'Emperor Ssraeshza'),(1537,'Iksar Temple Slaves'),(1538,'Spirits of Katta Castellum'),(1539,'Netherbians'),(1540,'Troglodytes'),(1541,'Hand Legionnaries'),(1542,'Haven Smugglers'),(1543,'Servants of Aero'),(1544,'Servants of Terra'),(1545,'Servants of Inferno'),(1546,'Servants of Hydro'),(1547,'Vornol Transon'),(1548,'The Vas Ren Clan'),(1549,'The Grol Baku Clan'),(1550,'The Cral Ligi Clan'),(1551,'The Tro Jeg Clan'),(1552,'Vah Shir Crusaders'),(1553,'Netherbian Ambush'),(1554,'Netherbian Caravan'),(1555,'Grieg'),(1556,'Luclin'),(1557,'Dark Sendings'),(1558,'Grimling Captives'),(1559,'Lake Recondite Bandits'),(1560,'Kanaad'),(1561,'Concilium Universus'),(1562,'Disciples of Rhag`Zadune'),(1563,'The Sambata Tribe'),(1564,'Dawnhoppers'),(1565,'Tarmok Tribe'),(1566,'Netok Tribe'),(1567,'Katta Traitors'),(1568,'Deepshade Collective'),(1569,'Deklean Korgad'),(1570,'Order of Autarkic Umbrage'),(1571,'Shei Vinitras'),(1572,'Anti Vinitras'),(1573,'The Bloodtribe'),(1574,'Minions of the Sunlord'),(1575,'Imps'),(1576,'Kingdom of Above and Below'),(1577,'The Truth'),(1578,'Deklean Korgad'),(1579,'Droga Goblins'),(1580,'Nurga Goblins'),(1581,'Luclin Friendly Monsters'),(1582,'Outcasts and Mutants'),(1583,'Cult of the Great Saprophyte'),(1584,'Citizens of Shar Vahl'),(1585,'Fiends of the Grove'),(1586,'Savage Spirit'),(1587,'Zordak Ragefire'),(1588,'Captain Cruikshanks'),(1589,'Scourge'),(1590,'Captain Stottal'),(1591,'Captain Smythe'),(1592,'Captain Dorian Dulein'),(1593,'Frogloks of Krup'),(1594,'Cult of the Arisen'),(1595,'New Alliance of Stone'),(1596,'Idelia the Serene'),(1597,'Residents of Jaggedpine'),(1598,'Anchorites of Brell Serilis'),(1599,'Darkpaws of Jaggedpine'),(1600,'Guardians of the Hatchling'),(1601,'Pirates of the Pine'),(1602,'Critters of Jaggedpine'),(1603,'Dryads of the Grove'),(1604,'Clan Grikbar'),(1605,'Haven Smuggler Associates'),(1606,'KOS to Beta Neutral'),(1607,'Plague Bringer'),(1608,'Spirits of Lxanvom'),(1609,'Askr the Lost'),(1610,'Greater Jord Giants'),(1611,'Greater Brann Giants'),(1612,'Greater Vind Giants'),(1613,'Greater Vann Giants'),(1614,'Lesser Jord Giants'),(1615,'Lesser Brann Giants'),(1616,'Lesser Vind Giants'),(1617,'Lesser Vann Giants'),(1618,'Storm Guardians'),(1619,'The Rainkeeper'),(1620,'Treants of Jaggedpine'),(1621,'Agnarr'),(1622,'Arboreans of the Faydark'),(1623,'Disciples of Kerafyrm'),(1624,'Servants of Saryrn'),(1625,'Guardians of Justice'),(1626,'Jacosh Steldenn'),(1627,'Prisoners of Justice'),(1628,'Creatures of Justice'),(1629,'Gralloks'),(1630,'Burning Dead'),(1631,'KOS All PC And Beta Neutral'),(1632,'Denizens of Water'),(1633,'Minions of Coirnav'),(1634,'Fish Lords'),(1635,'Dwellers of the Deep'),(1636,'Inhabitants of Tanaan'),(1637,'Truespirit Companion'),(1638,'Rallos Zek, The Warlord'),(1639,'Tallon Zek'),(1640,'Vallon Zek'),(1641,'Eriak'),(1642,'The Damned of Narikor'),(1643,'The Diaku'),(1644,'The Gindan'),(1645,'The Hendin'),(1646,'The Decorus'),(1647,'Gladiators of Drunder'),(1648,'Denizens of Fire'),(1649,'Minions of Fennin Ro'),(1650,'Inhabitants of Tranquility'),(1651,'Victim of Torment'),(1652,'Stampeding War Boar'),(1653,'War Boar Piglet'),(1654,'Inhabitants of Disease'),(1655,'Inhabitants of Valor'),(1656,'Battalion of Marr'),(1657,'Rats of Justice'),(1658,'Denizens of Storm'),(1659,'Lost Kingdom of Lok'),(1660,'Koka\'Vor Tribe'),(1661,'Inhabitants of Air'),(1662,'Guardians of the Living Earth'),(1663,'The Protectorate of the Twelve'),(1664,'Eino'),(1665,'Frogloks of Sebilis'),(1666,'Frogloks of Ykesha'),(1667,'Fallen Follies of Mischief'),(1668,'Lhranc the Disgraced'),(1669,'Minions of Enmity'),(1670,'Minions of Hope'),(1671,'Agents of the Pillars'),(1672,'Friends of Zordak Ragefire'),(1673,'Enemies of Zordak Ragefire'),(1674,'Kyle Bayle'),(1675,'Kyle Bayle\'s Royal Guard'),(1676,'Hills Revenant'),(1677,'Dead Hills Archaeologists'),(1678,'Xulous of the Dead Hills'),(1679,'The Kromtus'),(1680,'Bloodfeather Aviaks'),(1681,'The Thaell Ew'),(1682,'Faction1682'),(1683,'Faction1683'),(1684,'Faction1684'),(1685,'Faction1685'),(1686,'Faction1686'),(1687,'Faction1687'),(1688,'Faction1688'),(1689,'Faction1689'),(1690,'Faction1690'),(1691,'Faction1691'),(1692,'Faction1692'),(1693,'Faction1693'),(1694,'Faction1694'),(1695,'Faction1695'),(1696,'Faction1696'),(1697,'Faction1697'),(1698,'Faction1698'),(1699,'Faction1699'),(1700,'Torgiran'),(1701,'Warlord Ngrub'),(1702,'Resistance Miners'),(1703,'Nadox Initiate'),(1704,'Cursed Frogloks of Gukta'),(1705,'Creatures of Gunthak'),(1706,'Undead of Gunthak'),(1707,'Residents of Gunthak'),(1708,'Crew of the Scorned Maiden'),(1709,'Protectors of Gukta'),(1710,'Innothule Monster'),(1711,'Clerics of Gutka'),(1712,'Warriors of Gukta'),(1713,'Paladins of Gukta'),(1714,'Wizards of Gukta'),(1715,'Shaman of Gukta'),(1716,'High Council of Gukta'),(1717,'Lorekeepers of Gukta'),(1718,'Guktan Elders'),(1719,'Citizens of Gukta'),(1720,'Guktan Suppliers'),(1721,'Troll Raiders'),(1722,'Exiled Frogloks'),(1723,'Grimling Bandits'),(1724,'Newbie Monster'),(1725,'Syrik Iceblood'),(1726,'Inhabitants of Time'),(1727,'City Vermin'),(1728,'Betrayers of Di`Zok'),(1729,'Followers of Korucust'),(1730,'LDoNGood'),(1731,'LDoNEvil'),(1732,'Tribe Vrodak'),(1733,'Witnesses of Hate'),(1734,'Forgotten Guktan Spirits'),(1735,'Innoruuk\'s Curse of the Cauldron'),(1736,'Frostfoot Goblins'),(1737,'Lost Minions of Miragul'),(1738,'Planar Collective'),(1739,'Synarcana'),(1740,'Agents of the Synarcana'),(1741,'Orphans'),(1742,'Sustainers'),(1743,'Loyals'),(1744,'Progeny'),(1745,'Rujarkian Slavers'),(1746,'The Broken'),(1747,'Steelcrown'),(1748,'Spiritbound'),(1749,'Steelslaves'),(1750,'Citizens of Takish-Hiz'),(1751,'Geomantic Compact'),(1752,'Royal Attendants'),(1753,'Flowkeepers'),(1754,'Architects of Sand'),(1755,'Sandworkers'),(1756,'LDoN Hostages'),(1757,'Servants of the First Witness'),(1758,'Guktan Scouts'),(1759,'Wayfarers Brotherhood'),(1760,'Minions of Mischief'),(1761,'Nihil'),(1762,'Trusik Tribe'),(1763,'Legion of Mata Muram'),(1764,'Tunat`Muram'),(1765,'Zun`Muram'),(1766,'Pixtt'),(1767,'Hexxt'),(1768,'Rav'),(1769,'Creatures of Taelosia'),(1770,'Yunjo Slave Resistance'),(1771,'Gladiators of Mata Muram'),(1772,'The Sun'),(1773,'The Moon'),(1774,'Orcakar Players'),(1775,'Citizens of Argath'),(1776,'Living Steel'),(1777,'Argathian Looters'),(1778,'Citizens of Arelis'),(1779,'Farmers of the Lunanyn'),(1780,'Minions of War'),(1781,'Minions of the Sun'),(1782,'Dominion of Beasts'),(1783,'Citizens of Sarith'),(1784,'Devout of Oseka'),(1785,'Minions of Prexus'),(1786,'Seekers of Splendor'),(1787,'Order of Radiance'),(1788,'Devotees of Decay'),(1789,'Purity of Alra'),(1790,'Paragons of Purity'),(1791,'Shades of Alra'),(1792,'Paragons of Shadows'),(1793,'Arcanists of Alra'),(1794,'Paragons of the Arcane'),(1795,'Living Will of Alra'),(1796,'Paragons of Will'),(1797,'Servants of the Song'),(1798,'Citizens of Erillion'),(1799,'Disciples of Order'),(1800,'The Godblooded'),(1801,'Iceshard Manor'),(1802,'Dragon Death Keep'),(1803,'Apparitions of Fear'),(1804,'Beetles of Shard\'s Landing'),(1805,'Oashim of Shard\'s Landing'),(1806,'Pests of Shard\'s Landing'),(1807,'Scavengers of Shard\'s Landing'),(1808,'Kangon of Shard\'s Landing'),(1809,'Braxi of Shard\'s Landing'),(1810,'Wyverns of Shard\'s Landing'),(1811,'Selyrah of Shard\'s Landing'),(1812,'Goral of Shard\'s Landing'),(1813,'Snakes of Shard\'s Landing'),(1814,'Pumas of Shard\'s Landing'),(1815,'Grendlaen of Shard\'s Landing'),(1816,'Wolves of Shard\'s Landing'),(1817,'Hunters of Shard\'s Landing'),(1818,'Forsaken Believers'),(1819,'The Believers'),(1820,'The Conscripted'),(1821,'Heralds of the Unspoken'),(1822,'Harbingers of Thule'),(1823,'Va`Ker'),(1824,'Terrorwing'),(1825,'Crystal Circle Builders'),(1826,'The Unearthers'),(1827,'The Displaced'),(1828,'The Sol\'Dal'),(1829,'The Ember'),(1830,'Defenders of Decay'),(1831,'Warriors of Rodcet'),(1832,'Faction1832'),(1833,'Faction1833'),(1834,'Faction1834'),(1835,'Harrowing Horde'),(1836,'Western Plains Bandits'),(1837,'Ursarachnids'),(1838,'Doomscale Cultists'),(1839,'Nature Soul - Fire'),(1840,'Nature Soul - Water'),(1841,'Nature Soul - Earth'),(1842,'Nature Soul - Wood'),(1843,'Flaming Jacks'),(1844,'Ethernere Revenants'),(1845,'Ethernere Spirits'),(1846,'King Naythox Thex Loyalists'),(1847,'Queen Cristanos Thex Loyalists'),(1848,'Neriak Fourth Gate Residents'),(1849,'Qeynos Guards of West Karana'),(1850,'Fellowship of the Peacock'),(1851,'Damsel of Decay\'s Denizens'),(1852,'Enemies of Tranquility'),(1853,'Legion of the Overking'),(1854,'Empire of the Di`Zok'),(1855,'Kar`Zok'),(1856,'Flamescale Legion'),(1857,'Guardians of Konikor'),(1858,'Clan Droga'),(1859,'Majestic Centurion Alliance'),(1860,'The Clawdigger Clan'),(1861,'Scorpiki'),(1862,'Denizens of Veeshan\'s Peak'),(1863,'Servants of Esianti'),(1864,'Servants of Aalishai'),(1865,'Servants of Mearatas'),(1866,'Servants of Loruella'),(1867,'Contingent of the Alabaster Owl'),(1868,'Brass Phoenix Brigade'),(1869,'Company of the Alabaster Owl'),(1870,'Brass Phoenix Legion'),(1871,'Lords of Esianti'),(1872,'Lords of Aalishai'),(1873,'Bloodmoon Night-Orcs'),(1874,'Faction1874'),(1875,'Faction1875'),(1876,'Faction1876'),(1877,'Faction1877'),(1878,'Faction1878'),(1879,'Faction1879'),(1880,'Faction1880'),(1881,'Faction1881'),(1882,'Faction1882'),(1883,'Faction1883'),(1884,'Faction1884'),(1885,'Faction1885'),(1886,'Faction1886'),(1887,'Faction1887'),(1888,'Faction1888'),(1889,'Faction1889'),(1890,'Faction1890'),(1891,'Faction1891'),(1892,'Faction1892'),(1893,'Faction1893'),(1894,'Faction1894'),(1895,'Faction1895'),(1896,'Faction1896'),(1897,'Faction1897'),(1898,'Faction1898'),(1899,'Faction1899'),(1900,'Faction1900'),(1901,'Faction1901'),(1902,'Faction1902'),(1903,'Faction1903'),(1904,'Faction1904'),(1905,'Faction1905'),(1906,'Faction1906'),(1907,'Faction1907'),(1908,'Faction1908'),(1909,'Faction1909'),(1910,'Faction1910'),(1911,'Faction1911'),(1912,'Faction1912'),(1913,'Faction1913'),(1914,'Faction1914'),(1915,'Faction1915'),(1916,'Faction1916'),(1917,'Faction1917'),(1918,'Faction1918'),(1919,'Faction1919'),(1920,'Faction1920'),(1921,'Faction1921'),(1922,'Faction1922'),(1923,'Faction1923'),(1924,'Faction1924'),(1925,'Faction1925'),(1926,'Faction1926'),(1927,'Faction1927'),(1928,'Faction1928'),(1929,'Faction1929'),(1930,'Faction1930'),(1931,'Faction1931'),(1932,'Faction1932'),(1933,'Faction1933'),(1934,'Faction1934'),(1935,'Faction1935'),(1936,'Faction1936'),(1937,'Faction1937'),(1938,'Faction1938'),(1939,'Faction1939'),(1940,'Faction1940'),(1941,'Faction1941'),(1942,'Faction1942'),(1943,'Faction1943'),(1944,'Faction1944'),(1945,'Faction1945'),(1946,'Faction1946'),(1947,'Faction1947'),(1948,'Faction1948'),(1949,'Faction1949'),(1950,'Faction1950'),(1951,'Faction1951'),(1952,'Faction1952'),(1953,'Faction1953'),(1954,'Faction1954'),(1955,'Faction1955'),(1956,'Faction1956'),(1957,'Faction1957'),(1958,'Faction1958'),(1959,'Faction1959'),(1960,'Faction1960'),(1961,'Faction1961'),(1962,'Faction1962'),(1963,'Faction1963'),(1964,'Faction1964'),(1965,'Faction1965'),(1966,'Faction1966'),(1967,'Faction1967'),(1968,'Faction1968'),(1969,'Faction1969'),(1970,'Faction1970'),(1971,'Faction1971'),(1972,'Faction1972'),(1973,'Faction1973'),(1974,'Faction1974'),(1975,'Faction1975'),(1976,'Faction1976'),(1977,'Faction1977'),(1978,'Faction1978'),(1979,'Faction1979'),(1980,'Faction1980'),(1981,'Faction1981'),(1982,'Faction1982'),(1983,'Faction1983'),(1984,'Faction1984'),(1985,'Faction1985'),(1986,'Faction1986'),(1987,'Faction1987'),(1988,'Faction1988'),(1989,'Faction1989'),(1990,'Faction1990'),(1991,'Faction1991'),(1992,'Faction1992'),(1993,'Faction1993'),(1994,'Faction1994'),(1995,'Faction1995'),(1996,'Faction1996'),(1997,'Faction1997'),(1998,'Faction1998'),(1999,'Faction1999'),(2000,'Faction2000'),(2001,'Faction2001'),(2002,'Faction2002'),(2003,'Faction2003'),(2004,'Faction2004'),(2005,'Faction2005'),(2006,'Faction2006'),(2007,'Faction2007'),(2008,'Faction2008'),(2009,'Faction2009'),(2010,'Faction2010'),(2011,'Faction2011'),(2012,'Faction2012'),(2013,'Faction2013'),(2014,'Faction2014'),(2015,'Faction2015'),(2016,'Faction2016'),(2017,'Faction2017'),(2018,'Faction2018'),(2019,'Faction2019'),(2020,'Faction2020'),(2021,'Faction2021'),(2022,'Faction2022'),(2023,'Faction2023'),(2024,'Faction2024'),(2025,'Faction2025'),(2026,'Faction2026'),(2027,'Faction2027'),(2028,'Faction2028'),(2029,'Faction2029'),(2030,'Faction2030'),(2031,'Faction2031'),(2032,'Faction2032'),(2033,'Faction2033'),(2034,'Faction2034'),(2035,'Faction2035'),(2036,'Faction2036'),(2037,'Faction2037'),(2038,'Faction2038'),(2039,'Faction2039'),(2040,'Faction2040'),(2041,'Faction2041'),(2042,'Faction2042'),(2043,'Faction2043'),(2044,'Faction2044'),(2045,'Faction2045'),(2046,'Faction2046'),(2047,'Faction2047'); +/*!40000 ALTER TABLE `client_faction_names` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2018-12-11 14:54:22 +-- MySQL dump 10.13 Distrib 5.7.24, for Linux (x86_64) +-- +-- Host: 192.168.0.3 Database: peqdb +-- ------------------------------------------------------ +-- Server version 5.7.24-0ubuntu0.16.04.1 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `client_server_faction_map` +-- + +DROP TABLE IF EXISTS `client_server_faction_map`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `client_server_faction_map` ( + `clientid` int(11) NOT NULL, + `serverid` int(11) NOT NULL, + PRIMARY KEY (`clientid`,`serverid`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `client_server_faction_map` +-- + +LOCK TABLES `client_server_faction_map` WRITE; +/*!40000 ALTER TABLE `client_server_faction_map` DISABLE KEYS */; +INSERT INTO `client_server_faction_map` VALUES (41,377),(51,506),(60,431),(63,14),(64,357),(65,26),(68,481),(71,94),(73,421),(78,111),(88,386),(90,118),(98,185),(101,200),(104,238),(112,113),(117,148),(119,462),(121,434),(125,374),(143,368),(144,162),(153,420),(156,100),(160,426),(178,371),(201,382),(205,414),(207,165),(209,255),(211,269),(216,351),(217,5),(218,4),(219,9),(220,11),(221,21),(222,22),(223,33),(225,41),(226,43),(227,44),(228,46),(229,47),(230,53),(231,56),(232,57),(233,60),(234,63),(235,66),(236,69),(237,70),(238,71),(239,322),(240,76),(241,77),(242,79),(244,90),(245,91),(246,99),(247,151),(248,418),(249,226),(250,327),(251,106),(252,108),(253,28),(254,112),(255,115),(256,20),(257,119),(258,120),(259,121),(261,128),(262,135),(263,133),(264,359),(265,143),(266,145),(267,147),(268,50),(269,182),(270,155),(271,86),(272,159),(273,164),(274,169),(275,170),(276,174),(278,177),(279,178),(280,183),(281,184),(282,186),(283,243),(284,192),(285,207),(286,208),(287,209),(288,210),(289,211),(290,215),(291,217),(292,218),(293,219),(295,326),(296,235),(297,246),(298,247),(299,248),(300,259),(302,265),(303,268),(304,273),(305,275),(306,279),(307,281),(308,292),(309,300),(310,304),(311,311),(312,314),(313,250),(315,339),(316,283),(317,346),(318,353),(319,355),(320,361),(321,309),(322,220),(323,305),(324,347),(325,212),(326,92),(327,294),(328,213),(329,31),(330,105),(331,214),(332,149),(333,176),(334,88),(336,48),(337,232),(338,216),(340,256),(341,257),(342,240),(343,267),(344,18),(345,167),(346,51),(353,378),(354,229),(355,316),(361,12),(362,258),(363,331),(364,299),(365,249),(366,166),(367,507),(368,83),(370,87),(371,117),(372,227),(373,224),(374,233),(375,75),(376,131),(378,313),(379,29),(382,175),(385,80),(386,376),(387,17),(388,97),(394,295),(397,302),(398,274),(401,306),(402,236),(403,237),(404,342),(405,67),(406,49),(407,278),(409,343),(412,187),(415,320),(416,291),(417,397),(418,364),(419,188),(420,98),(423,456),(424,465),(425,156),(426,1),(427,308),(428,223),(429,179),(430,42),(431,345),(432,241),(433,160),(434,301),(435,352),(436,362),(437,391),(438,290),(439,303),(440,30),(441,193),(442,62),(443,24),(444,317),(445,282),(446,323),(447,251),(448,189),(449,344),(450,336),(451,23),(452,325),(454,89),(455,221),(456,114),(457,150),(458,116),(459,199),(460,399),(461,395),(462,32),(463,244),(464,365),(465,337),(467,134),(469,263),(471,40),(473,172),(474,310),(475,180),(532,461),(689,297),(692,253),(693,36),(694,380),(695,45),(1001,424),(1002,401),(1003,475),(1007,435),(1009,409),(1010,398),(1013,432),(1014,487),(1016,410),(1020,425),(1021,404),(1022,101),(1023,429),(1024,446),(1025,427),(1026,449),(1027,450),(1028,451),(1029,445),(1030,422),(1031,436),(1032,441),(1033,448),(1034,428),(1035,403),(1036,438),(1039,515),(1040,417),(1042,407),(1044,444),(1046,443),(1048,440),(1049,406),(1050,411),(1051,402),(1055,415),(1056,412),(1058,437),(1059,396),(1060,400),(1101,498),(1156,500),(1159,457),(1190,497),(1193,499),(1204,494),(1223,496),(1483,284),(1484,139),(1485,96),(1486,142),(1487,298),(1488,329),(1490,130),(1491,504),(1492,505),(1499,37),(1500,122),(1501,293),(1502,168),(1503,350),(1504,206),(1505,228),(1506,55),(1507,349),(1508,338),(1509,140),(1510,152),(1511,153),(1512,154),(1513,132),(1516,392),(1519,201),(1520,358),(1521,3),(1522,260),(1524,161),(1525,54),(1527,388),(1528,335),(1530,319),(1532,423),(1533,68),(1535,25),(1536,93),(1538,307),(1541,138),(1542,141),(1543,285),(1544,289),(1545,287),(1546,286),(1547,354),(1548,334),(1549,324),(1550,321),(1551,332),(1552,348),(1555,129),(1556,205),(1557,72),(1559,191),(1561,52),(1562,85),(1563,330),(1564,74),(1565,390),(1568,78),(1569,408),(1570,239),(1571,296),(1573,389),(1574,222),(1576,181),(1577,333),(1582,242),(1583,65),(1584,483),(1587,385),(1593,107),(1594,64),(1595,230),(1597,271),(1598,6),(1599,73),(1601,252),(1602,61),(1604,39),(1607,516),(1608,517),(1609,13),(1610,125),(1611,124),(1612,127),(1613,126),(1614,196),(1615,195),(1616,198),(1617,197),(1618,315),(1619,328),(1620,340),(1621,2),(1622,10),(1623,84),(1624,288),(1627,261),(1628,58),(1629,123),(1630,27),(1634,512),(1636,157),(1654,466),(1656,16),(1659,203),(1660,501),(1661,464),(1665,109),(1701,473),(1703,225),(1707,458),(1709,264),(1713,245),(1714,360),(1716,146),(1717,202),(1718,136),(1719,35),(1720,484),(1722,95),(1725,318),(1726,469),(1728,19),(1729,103),(1732,341),(1733,393),(1734,104),(1735,158),(1736,110),(1737,204),(1738,455),(1741,452),(1742,453),(1743,454),(1744,262),(1745,277),(1749,312),(1750,38),(1755,280),(1757,508),(1759,356),(1761,231),(1762,447),(1763,194),(1765,502),(1766,254),(1767,144),(1768,270),(1769,59),(1770,363),(1771,416),(1822,373); +/*!40000 ALTER TABLE `client_server_faction_map` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2018-12-11 14:49:42 +-- MySQL dump 10.13 Distrib 5.7.24, for Linux (x86_64) +-- +-- Host: 192.168.0.3 Database: peqdb +-- ------------------------------------------------------ +-- Server version 5.7.24-0ubuntu0.16.04.1 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `faction_base_data` +-- + +DROP TABLE IF EXISTS `faction_base_data`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `faction_base_data` ( + `client_faction_id` smallint(6) NOT NULL, + `min` smallint(6) DEFAULT '-2000', + `max` smallint(6) DEFAULT '2000', + `unk_hero1` smallint(6) DEFAULT NULL, + `unk_hero2` smallint(6) DEFAULT NULL, + `unk_hero3` smallint(6) DEFAULT NULL, + PRIMARY KEY (`client_faction_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `faction_base_data` +-- + +LOCK TABLES `faction_base_data` WRITE; +/*!40000 ALTER TABLE `faction_base_data` DISABLE KEYS */; +INSERT INTO `faction_base_data` VALUES (65,-2000,2000,0,0,0),(106,-2000,2000,0,0,0),(121,-2000,2000,0,0,0),(128,-2000,2000,0,0,0),(138,-2000,2000,0,0,0),(144,-2000,2000,0,0,0),(217,-2000,2000,0,0,0),(218,-2000,2000,0,0,0),(219,-2000,2000,0,0,0),(220,-2000,2000,0,0,0),(221,-2000,2000,0,0,0),(222,-2000,2000,0,0,0),(223,-2000,2000,0,0,0),(225,-2000,2000,0,0,0),(226,-2000,2000,0,0,0),(227,-2000,2000,0,0,0),(228,-2000,2000,0,0,0),(229,-2000,2000,0,0,0),(230,-2000,2000,0,0,0),(231,-2000,2000,0,0,0),(232,-2000,2000,0,0,0),(233,-2000,2000,0,0,0),(234,-2000,2000,0,0,0),(235,-2000,2000,0,0,0),(236,-2000,2000,0,0,0),(237,-2000,2000,0,0,0),(238,-2000,2000,0,0,0),(239,-2000,2000,0,0,0),(240,-2000,2000,0,0,0),(241,-2000,2000,0,0,0),(242,-2000,2000,0,0,0),(243,-2000,2000,0,0,0),(244,-2000,2000,0,0,0),(245,-2000,2000,0,0,0),(246,-2000,2000,0,0,0),(247,-2000,2000,0,0,0),(248,-2000,2000,0,0,0),(249,-2000,2000,0,0,0),(250,-2000,2000,0,0,0),(251,-2000,2000,0,0,0),(252,-2000,2000,0,0,0),(253,-2000,2000,0,0,0),(254,-2000,2000,0,0,0),(255,-2000,2000,0,0,0),(256,-2000,2000,0,0,0),(257,-2000,2000,0,0,0),(258,-2000,2000,0,0,0),(259,-2000,2000,0,0,0),(261,-2000,2000,0,0,0),(262,-2000,2000,0,0,0),(263,-2000,2000,0,0,0),(264,-2000,2000,0,0,0),(265,-2000,2000,0,0,0),(266,-2000,2000,0,0,0),(267,-2000,2000,0,0,0),(269,-2000,2000,0,0,0),(270,-2000,2000,0,0,0),(271,-2000,2000,0,0,0),(272,-2000,2000,0,0,0),(273,-2000,2000,0,0,0),(274,-2000,2000,0,0,0),(275,-2000,2000,0,0,0),(276,-2000,2000,0,0,0),(277,-2000,2000,0,0,0),(278,-2000,2000,0,0,0),(279,-2000,2000,0,0,0),(280,-2000,2000,0,0,0),(281,-2000,2000,0,0,0),(282,-2000,2000,0,0,0),(283,-2000,2000,0,0,0),(284,-2000,2000,0,0,0),(285,-2000,2000,0,0,0),(286,-2000,2000,0,0,0),(287,-2000,2000,0,0,0),(288,-2000,2000,0,0,0),(289,-2000,2000,0,0,0),(290,-2000,2000,0,0,0),(291,-2000,2000,0,0,0),(292,-2000,2000,0,0,0),(293,-2000,2000,0,0,0),(295,-2000,2000,0,0,0),(296,-2000,2000,0,0,0),(297,-2000,2000,0,0,0),(298,-2000,2000,0,0,0),(299,-2000,2000,0,0,0),(300,-2000,2000,0,0,0),(302,-2000,2000,0,0,0),(304,-2000,2000,0,0,0),(305,-2000,2000,0,0,0),(306,-2000,2000,0,0,0),(307,-2000,2000,0,0,0),(308,-2000,2000,0,0,0),(309,-2000,2000,0,0,0),(310,-2000,2000,0,0,0),(311,-2000,2000,0,0,0),(312,-2000,2000,0,0,0),(313,-2000,2000,0,0,0),(315,-2000,2000,0,0,0),(316,-2000,2000,0,0,0),(317,-2000,2000,0,0,0),(318,-2000,2000,0,0,0),(319,-2000,2000,0,0,0),(320,-2000,2000,0,0,0),(321,-2000,2000,0,0,0),(322,-2000,2000,0,0,0),(323,-2000,2000,0,0,0),(324,-2000,2000,0,0,0),(325,-2000,2000,0,0,0),(326,-2000,2000,0,0,0),(327,-2000,2000,0,0,0),(328,-2000,2000,0,0,0),(329,-2000,2000,0,0,0),(330,-2000,2000,0,0,0),(331,-2000,2000,0,0,0),(332,-2000,2000,0,0,0),(333,-2000,2000,0,0,0),(334,-2000,2000,0,0,0),(336,-2000,2000,0,0,0),(337,-2000,2000,0,0,0),(338,-2000,2000,0,0,0),(340,-2000,2000,0,0,0),(341,-2000,2000,0,0,0),(342,-2000,2000,0,0,0),(343,-2000,2000,0,0,0),(345,-2000,2000,0,0,0),(346,-2000,2000,0,0,0),(353,-2000,2000,0,0,0),(354,-2000,2000,0,0,0),(355,-2000,2000,0,0,0),(361,-2000,2000,0,0,0),(362,-2000,2000,0,0,0),(363,-2000,2000,0,0,0),(364,-2000,2000,0,0,0),(365,-2000,2000,0,0,0),(366,-2000,2000,0,0,0),(367,-2000,2000,0,0,0),(368,-2000,2000,0,0,0),(370,-2000,2000,0,0,0),(371,-2000,2000,0,0,0),(372,-2000,2000,0,0,0),(373,-2000,2000,0,0,0),(374,-2000,2000,0,0,0),(375,-2000,2000,0,0,0),(376,-2000,2000,0,0,0),(377,-2000,2000,0,0,0),(378,-2000,2000,0,0,0),(379,-2000,2000,0,0,0),(382,-2000,2000,0,0,0),(385,-2000,2000,0,0,0),(387,-2000,2000,0,0,0),(388,-2000,2000,0,0,0),(390,-2000,2000,0,0,0),(391,-2000,2000,0,0,0),(394,-2000,2000,0,0,0),(397,-2000,2000,0,0,0),(398,-2000,2000,0,0,0),(401,-2000,2000,0,0,0),(402,-2000,2000,0,0,0),(404,0,2000,0,0,0),(405,-2000,2000,0,0,0),(406,-2000,2000,0,0,0),(407,-2000,2000,0,0,0),(409,-2000,2000,0,0,0),(412,-2000,2000,0,0,0),(415,-2000,2000,0,0,0),(416,-2000,2000,0,0,0),(417,-2000,2000,0,0,0),(418,-2000,2000,0,0,0),(419,-2000,2000,0,0,0),(420,-2000,2000,0,0,0),(421,-2000,2000,0,0,0),(422,-2000,2000,0,0,0),(423,-2000,2000,0,0,0),(425,-2000,2000,0,0,0),(426,-2000,2000,0,0,0),(427,-2000,2000,0,0,0),(428,-2000,2000,0,0,0),(429,-2000,2000,0,0,0),(430,-2000,2000,0,0,0),(431,-2000,2000,0,0,0),(432,-2000,2000,0,0,0),(433,-2000,2000,0,0,0),(434,-2000,2000,0,0,0),(435,-2000,2000,0,0,0),(436,-2000,2000,0,0,0),(437,-2000,2000,0,0,0),(438,-2000,2000,0,0,0),(439,-2000,2000,0,0,0),(440,-2000,2000,0,0,0),(441,-2000,2000,0,0,0),(442,-2000,2000,0,0,0),(443,-2000,2000,0,0,0),(444,-2000,2000,0,0,0),(445,-2000,2000,0,0,0),(446,-2000,2000,0,0,0),(447,-2000,2000,0,0,0),(448,-2000,2000,0,0,0),(449,-2000,2000,0,0,0),(450,-2000,2000,0,0,0),(451,-2000,2000,0,0,0),(452,-2000,2000,0,0,0),(453,-2000,2000,0,0,0),(454,-2000,2000,0,0,0),(455,-2000,2000,0,0,0),(456,-2000,2000,0,0,0),(457,-2000,2000,0,0,0),(458,-2000,2000,0,0,0),(459,-2000,2000,0,0,0),(460,-2000,2000,0,0,0),(461,-2000,2000,0,0,0),(462,-2000,2000,0,0,0),(463,-2000,2000,0,0,0),(464,-2000,2000,0,0,0),(465,-2000,2000,0,0,0),(467,-2000,2000,0,0,0),(468,-2000,2000,0,0,0),(469,-2000,2000,0,0,0),(471,-2000,2000,0,0,0),(472,-2000,2000,0,0,0),(473,-2000,2000,0,0,0),(474,-2000,2000,0,0,0),(475,-2000,2000,0,0,0),(530,-2000,2000,0,0,0),(548,-2000,2000,0,0,0),(680,-2000,2000,0,0,0),(690,-2000,2000,0,0,0),(711,0,5000,0,0,0),(712,0,5000,0,0,0),(713,-5000,0,0,0,0),(714,-5000,0,0,0,0),(715,-5000,0,0,0,0),(716,-5000,0,0,0,0),(720,-2000,2000,0,0,0),(721,-2000,2000,0,0,0),(1005,-2000,2000,0,0,0),(1007,-2000,0,0,0,0),(1010,-2000,0,0,0,0),(1013,-2000,0,0,0,0),(1016,-2000,2000,0,0,0),(1021,-2000,2000,0,0,0),(1022,-2000,2000,0,0,0),(1023,-2000,2000,0,0,0),(1024,-2000,0,0,0,0),(1025,-2000,0,0,0,0),(1026,-2000,0,0,0,0),(1027,-2000,0,0,0,0),(1028,-2000,0,0,0,0),(1029,-2000,0,0,0,0),(1030,-2000,0,0,0,0),(1031,-2000,0,0,0,0),(1032,-2000,0,0,0,0),(1033,-2000,0,0,0,0),(1034,-2000,0,0,0,0),(1035,-2000,0,0,0,0),(1048,-2000,2000,0,0,0),(1049,-2000,0,0,0,0),(1050,-2000,2000,0,0,0),(1051,-2000,0,0,0,0),(1052,-2000,0,0,0,0),(1053,-2000,0,0,0,0),(1054,-2000,0,0,0,0),(1055,-2000,2000,0,0,0),(1056,-2000,0,0,0,0),(1057,-2000,2000,0,0,0),(1058,-2000,0,0,0,0),(1059,-2000,2000,0,0,0),(1062,-2000,2000,0,0,0),(1063,-2000,2000,0,0,0),(1065,-2000,2000,0,0,0),(1066,-2000,2000,0,0,0),(1068,-2000,900,0,0,0),(1069,-2000,900,0,0,0),(1070,-2000,900,0,0,0),(1071,-2000,900,0,0,0),(1072,-2000,900,0,0,0),(1073,-2000,900,0,0,0),(1074,-2000,900,0,0,0),(1075,-2000,900,0,0,0),(1076,-2000,900,0,0,0),(1077,-2000,900,0,0,0),(1078,-2000,900,0,0,0),(1079,-2000,900,0,0,0),(1080,-2000,900,0,0,0),(1085,-2000,2000,0,0,0),(1086,-2000,0,0,0,0),(1088,-2000,2000,0,0,0),(1089,-2000,2000,0,0,0),(1090,-2000,2000,0,0,0),(1091,-2000,2000,0,0,0),(1092,-2000,2000,0,0,0),(1093,-2000,0,0,0,0),(1094,-2000,0,0,0,0),(1095,-2000,2000,0,0,0),(1100,-2000,0,0,0,0),(1101,-2000,0,0,0,0),(1103,-2000,0,0,0,0),(1104,-2000,2000,0,0,0),(1105,-2000,2000,0,0,0),(1107,-2000,2000,0,0,0),(1108,-2000,2000,0,0,0),(1109,-2000,2000,0,0,0),(1110,-2000,2000,0,0,0),(1111,-2000,0,0,0,0),(1112,-2000,0,0,0,0),(1113,-2000,0,0,0,0),(1114,-2000,0,0,0,0),(1115,-2000,0,0,0,0),(1116,-2000,2000,0,0,0),(1119,-2000,2000,0,0,0),(1120,-2000,1000,0,0,0),(1121,-2000,1000,0,0,0),(1123,-2000,0,0,0,0),(1124,-2000,0,0,0,0),(1125,-2000,0,0,0,0),(1129,-2000,2000,0,0,0),(1134,-2000,2000,0,0,0),(1135,-2000,2000,0,0,0),(1137,-2000,2000,0,0,0),(1140,-2000,2000,0,0,0),(1141,-2000,2000,0,0,0),(1142,-2000,2000,0,0,0),(1143,-2000,2000,0,0,0),(1144,-2000,2000,0,0,0),(1145,-2000,2000,0,0,0),(1146,-2000,2000,0,0,0),(1147,-2000,2000,0,0,0),(1148,-2000,2000,0,0,0),(1149,-2000,2000,0,0,0),(1166,-2000,2000,0,0,0),(1169,-2000,2000,0,0,0),(1170,-2000,2000,0,0,0),(1175,-2000,2000,0,0,0),(1176,-2000,2000,0,0,0),(1181,-2000,2000,100,20,100),(1182,-2000,2000,0,0,0),(1183,-2000,2000,0,0,0),(1184,-2000,2000,0,0,0),(1185,-2000,2000,0,0,0),(1186,-2000,2000,100,20,100),(1188,-2000,2000,0,0,0),(1189,-2000,2000,0,0,0),(1190,-2000,2000,0,0,0),(1191,-2000,2000,0,0,0),(1192,-2000,2000,100,20,100),(1193,-2000,2000,100,20,100),(1194,-2000,2000,100,20,100),(1195,-2000,2000,100,20,100),(1196,-2000,2000,100,20,100),(1197,-2000,2000,100,20,100),(1198,-2000,2000,100,20,100),(1199,-2000,2000,100,20,100),(1200,-2000,2000,100,20,100),(1201,-2000,2000,100,20,100),(1202,-2000,2000,100,20,100),(1203,-2000,2000,100,20,100),(1204,-200,2000,100,20,100),(1205,-200,2000,100,20,100),(1209,-2000,2000,100,20,100),(1210,-2000,2000,100,20,100),(1211,-2000,2000,100,20,100),(1212,-2000,2000,100,20,100),(1213,-2000,2000,100,20,100),(1214,-2000,2000,100,20,100),(1215,-2000,2000,100,20,100),(1216,-2000,2000,100,20,100),(1219,-2000,2000,100,20,100),(1220,-2000,2000,100,20,100),(1221,-2000,2000,100,20,100),(1222,-2000,2000,0,0,0),(1223,-2000,2000,0,0,0),(1224,-2000,2000,0,0,0),(1225,-2000,2000,0,0,0),(1226,-2000,2000,0,0,0),(1227,-2000,2000,0,0,0),(1229,0,2000,100,20,100),(1230,-2000,2000,100,20,100),(1232,-500,2000,0,0,0),(1233,-3000,0,0,0,0),(1234,-500,2000,0,0,0),(1235,-2000,0,0,0,0),(1237,-2000,0,0,0,0),(1238,-400,0,0,0,0),(1241,-2000,249,0,0,0),(1242,-2000,2000,0,0,0),(1243,-2000,0,0,0,0),(1244,-499,2000,0,0,0),(1483,-4000,2000,0,0,0),(1484,-2000,2000,0,0,0),(1485,-2000,500,0,0,0),(1486,-2000,2000,0,0,0),(1487,-2000,2000,0,0,0),(1488,-2000,2000,0,0,0),(1489,-2000,2000,0,0,0),(1490,-2000,2000,0,0,0),(1491,-2000,2000,0,0,0),(1499,-2000,2000,0,0,0),(1500,-2000,2000,0,0,0),(1501,-2000,2000,0,0,0),(1502,-2000,2000,0,0,0),(1503,-2000,2000,0,0,0),(1504,-2000,2000,0,0,0),(1505,-2000,2000,0,0,0),(1506,-2000,2000,0,0,0),(1507,-2000,2000,0,0,0),(1508,-500,2000,0,0,0),(1509,-749,2000,0,0,0),(1510,-500,2000,0,0,0),(1511,-500,2000,0,0,0),(1512,-500,2000,0,0,0),(1513,-2000,2000,0,0,0),(1516,-2000,2000,0,0,0),(1519,-2000,2000,0,0,0),(1520,-2000,2000,0,0,0),(1521,-2000,0,0,0,0),(1522,-2000,2000,0,0,0),(1524,-2000,2000,0,0,0),(1525,-2000,2000,0,0,0),(1526,-2000,2000,0,0,0),(1527,-2000,2000,0,0,0),(1528,-2000,2000,0,0,0),(1529,-2000,2000,0,0,0),(1530,-2000,2000,0,0,0),(1531,-2000,2000,0,0,0),(1532,-2000,2000,0,0,0),(1533,-2000,2000,0,0,0),(1535,-2000,2000,0,0,0),(1537,-2000,2000,0,0,0),(1538,-2000,2000,0,0,0),(1541,-2000,2000,0,0,0),(1542,-2000,2000,0,0,0),(1543,-2000,2000,0,0,0),(1544,-2000,2000,0,0,0),(1545,-2000,2000,0,0,0),(1546,-2000,2000,0,0,0),(1547,-2000,2000,0,0,0),(1548,-2000,2000,0,0,0),(1549,-2000,2000,0,0,0),(1550,-2000,2000,0,0,0),(1551,-2000,2000,0,0,0),(1552,-2000,2000,0,0,0),(1555,-2000,2000,0,0,0),(1556,-2000,2000,0,0,0),(1559,-2000,2000,0,0,0),(1560,-2000,2000,0,0,0),(1561,-2000,2000,0,0,0),(1562,-2000,2000,0,0,0),(1563,-2000,2000,0,0,0),(1564,-2000,2000,0,0,0),(1565,-2000,2000,0,0,0),(1566,-2000,2000,0,0,0),(1568,-2000,2000,0,0,0),(1569,-2000,2000,0,0,0),(1570,-2000,2000,0,0,0),(1571,-2000,2000,0,0,0),(1573,-2000,2000,0,0,0),(1574,-2000,2000,0,0,0),(1576,-2000,2000,0,0,0),(1577,-2000,2000,0,0,0),(1578,-2000,2000,0,0,0),(1582,-2000,2000,0,0,0),(1583,-2000,2000,0,0,0),(1584,-2000,2000,0,0,0),(1587,-2000,2000,0,0,0),(1593,-2000,2000,0,0,0),(1597,-1550,2000,0,0,0),(1598,-850,2000,0,0,0),(1599,-2050,2000,0,0,0),(1600,-2050,2000,0,0,0),(1601,-1550,2000,0,0,0),(1603,-2050,2000,0,0,0),(1605,-2000,2000,0,0,0),(1607,-2000,2000,0,0,0),(1609,-2000,2000,0,0,0),(1610,-2000,2000,0,0,0),(1611,-2000,2000,0,0,0),(1612,-2000,2000,0,0,0),(1613,-2000,2000,0,0,0),(1618,-2000,2000,0,0,0),(1620,-2000,2000,0,0,0),(1621,-2000,2000,0,0,0),(1622,-2000,2000,0,0,0),(1623,-2000,2000,0,0,0),(1624,-2000,2000,0,0,0),(1625,-2000,2000,0,0,0),(1626,-2000,2000,0,0,0),(1627,-2000,2000,0,0,0),(1628,-2000,2000,0,0,0),(1629,-2000,2000,0,0,0),(1630,-2000,2000,0,0,0),(1633,-2000,2000,0,0,0),(1636,-2000,2000,0,0,0),(1643,-2000,2000,0,0,0),(1656,-2000,2000,0,0,0),(1659,-2000,2000,0,0,0),(1660,-2000,2000,0,0,0),(1665,-2000,2000,0,0,0),(1671,-2000,0,0,0,0),(1674,-2000,0,0,0,0),(1675,-2000,0,0,0,0),(1676,-2000,0,0,0,0),(1677,-2000,2000,0,0,0),(1679,-350,400,0,0,0),(1680,-100,800,0,0,0),(1681,-150,800,0,0,0),(1701,-2000,2000,0,0,0),(1703,-2000,2000,0,0,0),(1704,-2000,2000,0,0,0),(1709,-2000,2000,0,0,0),(1711,-2000,2000,0,0,0),(1712,-2000,2000,0,0,0),(1713,-2000,2000,0,0,0),(1714,-2000,2000,0,0,0),(1715,-2000,2000,0,0,0),(1716,-2000,2000,0,0,0),(1717,-2000,2000,0,0,0),(1718,-2000,2000,0,0,0),(1719,-2000,2000,0,0,0),(1720,-2000,2000,0,0,0),(1722,-2000,2000,0,0,0),(1725,-2000,2000,0,0,0),(1728,-2000,2000,0,0,0),(1729,-2000,2000,0,0,0),(1732,-2000,2000,0,0,0),(1733,-2000,2000,0,0,0),(1734,-2000,2000,0,0,0),(1735,-2000,2000,0,0,0),(1736,-2000,2000,0,0,0),(1737,-2000,2000,0,0,0),(1738,-2000,2000,0,0,0),(1741,-2000,2000,0,0,0),(1742,-2000,2000,0,0,0),(1743,-2000,2000,0,0,0),(1744,-2000,2000,0,0,0),(1745,-2000,2000,0,0,0),(1746,-2000,2000,0,0,0),(1747,-2000,2000,0,0,0),(1748,-2000,2000,0,0,0),(1749,-2000,2000,0,0,0),(1750,-2000,2000,0,0,0),(1755,-2000,2000,0,0,0),(1758,-2000,2000,0,0,0),(1759,-2000,2000,0,0,0),(1761,-2000,2000,0,0,0),(1762,-2000,2000,0,0,0),(1763,-2000,2000,0,0,0),(1764,-2000,2000,0,0,0),(1765,-2000,2000,0,0,0),(1766,-2000,2000,0,0,0),(1767,-2000,2000,0,0,0),(1768,-2000,2000,0,0,0),(1770,-2000,2000,0,0,0),(1771,-2000,2000,0,0,0),(1775,-800,1500,0,0,0),(1777,-1000,0,0,0,0),(1778,-800,1500,0,0,0),(1779,-800,1500,0,0,0),(1780,-800,1500,0,0,0),(1781,-800,1500,0,0,0),(1783,-1000,1000,0,0,0),(1784,-1000,0,0,0,0),(1785,-800,1500,0,0,0),(1786,-1000,1000,0,0,0),(1787,-1000,0,0,0,0),(1788,-1000,0,0,0,0),(1789,-1000,99,0,0,0),(1790,-1000,0,0,0,0),(1791,-1000,99,0,0,0),(1792,-1000,0,0,0,0),(1793,-1000,99,0,0,0),(1794,-1000,0,0,0,0),(1795,-1000,99,0,0,0),(1796,-1000,0,0,0,0),(1798,-1000,1000,0,0,0),(1799,-1000,99,0,0,0),(1801,-2000,2000,0,0,0),(1802,-2000,2000,0,0,0),(1817,-500,7000,0,0,0),(1818,-1000,899,0,0,0),(1819,-2000,99,0,0,0),(1820,-2000,2000,0,0,0),(1821,-2000,0,0,0,0),(1822,0,4000,0,0,0),(1823,-1000,950,0,0,0),(1824,-2000,0,0,0,0),(1825,-2000,2000,0,0,0),(1828,-2000,2000,0,0,0),(1829,-2000,2000,0,0,0),(1830,-900,900,0,0,0),(1831,-900,900,0,0,0),(1846,-501,499,100,20,100),(1847,-501,499,100,20,100),(1852,-2000,-1000,0,0,0),(1853,-2000,2000,0,0,0),(1854,-2000,2000,0,0,0),(1855,-2000,2000,0,0,0),(1856,-2000,2000,0,0,0),(1857,-2000,2000,0,0,0),(1858,-2000,2000,0,0,0),(1859,-751,2000,100,20,100),(1860,-751,2000,100,20,100),(1862,-2000,2000,0,0,0),(1863,-600,800,0,0,0),(1864,-600,800,0,0,0),(1865,-600,800,0,0,0),(1866,-600,800,0,0,0),(1867,-2000,2000,0,0,0),(1868,-2000,2000,0,0,0),(1869,-2000,2000,0,0,0),(1870,-2000,2000,0,0,0),(1872,-2000,2000,0,0,0); +/*!40000 ALTER TABLE `faction_base_data` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2018-12-11 14:53:10 diff --git a/utils/sql/git/required/2018_12_12_convert_to_client_functions.sql b/utils/sql/git/required/2018_12_12_convert_to_client_functions.sql new file mode 100755 index 000000000..ff6f8a45e --- /dev/null +++ b/utils/sql/git/required/2018_12_12_convert_to_client_functions.sql @@ -0,0 +1,131 @@ +/* +This SQL update utilizes the new raw faction data from the client + +First we create a temporary table - which we will use to map any +custom factions in the eqemu db, that are either: + - eqemu utility factions + - obsoleted factions with no new mapping to the client + +This is done so that we can keep these factions while server owners either +stay with them, or migrate. They are moved to the 5000+ range, to not conflict +with client faction_ids. +*/ + +/* Create the temp table and start mappings at 5000 */ +CREATE TABLE custom_faction_mappings (old_faction int, new_faction int, primary key (old_faction)) engine=INNODB; + +select @startcustom:=5000; + +/* Insert the custom/obsolete factions into the temp mapping table */ +insert into custom_faction_mappings (select id, @startcustom := @startcustom +1 from faction_list where id not in (select serverid from client_server_faction_map) and id < 5000); + +CREATE TABLE IF NOT EXISTS faction_list_mod_oldfac AS SELECT * from faction_list_mod; + +/* Now we update all the tables for these custom factions */ + +update faction_list_mod set faction_id = (select new_faction from custom_faction_mappings where old_faction = faction_id) where faction_id < 5000 and faction_id in (select old_faction from custom_faction_mappings); + +CREATE TABLE IF NOT EXISTS faction_list_oldfac AS SELECT * from faction_list; + +/* The faction_list table was forcing faction name to be a key. Client does + not. Also, auto increment doesnt make sense anymore */ +ALTER TABLE faction_list CHANGE COLUMN `id` `id` INT(11) NOT NULL; +ALTER TABLE faction_list DROP INDEX `name`; + +update faction_list set id = +(select new_faction from custom_faction_mappings where old_faction = id) where id < 5000 and id in (select old_faction from custom_faction_mappings); + +/* At this point all faction_mods for unmapped factions will be ids 5000+ */ +/* So we can delete all the old ones still under 5000 - making room for the */ +/* new faction ids */ + +delete from faction_list_mod where faction_id < 5000; + +delete from faction_list where id < 5000; + +/* Make an entry for each faction */ +/* No base on client factions */ + +insert into faction_list (select id, name, 0 from client_faction_names); + +/* Create mods based on the client_faction_associations */ +/* No code changes required */ + +insert into faction_list_mod +(select null, faction_id, `mod`, concat("r", other_faction_id-50) +from client_faction_associations a +join client_faction_names n on n.id = a.other_faction_id +where other_faction_id between 51 and 180); + +insert into faction_list_mod +(select null, faction_id, `mod`, concat("c", other_faction_id) +from client_faction_associations a +join client_faction_names n on n.id = a.other_faction_id +where other_faction_id between 1 and 50); + +insert into faction_list_mod +(select null, faction_id, `mod`, concat("d", other_faction_id) +from client_faction_associations a +join client_faction_names n on n.id = a.other_faction_id +where other_faction_id between 201 and 216); + +/* And now we need to fix all the other faction tables to point to the new factions. */ + +CREATE TABLE IF NOT EXISTS npc_faction_oldfac AS SELECT * from npc_faction; + +update npc_faction set primaryfaction = (select new_faction from custom_faction_mappings where old_faction = primaryfaction) +where primaryfaction in (select old_faction from custom_faction_mappings); + +update npc_faction set primaryfaction = (select clientid from client_server_faction_map where serverid = primaryfaction) +where primaryfaction in (select serverid from client_server_faction_map); + +update npc_faction_entries set faction_id = (select new_faction from custom_faction_mappings where old_faction = faction_id) +where faction_id in (select old_faction from custom_faction_mappings); + +CREATE TABLE IF NOT EXISTS npc_faction_entries_oldfac AS SELECT * from npc_faction_entries; + +/* Move existing factions out of wat - the following replace would create key */ +/* duplicates along the way, but none when complete. */ + +update npc_faction_entries set faction_id = faction_id + 20000 +where faction_id in (select serverid from client_server_faction_map); + +update npc_faction_entries set faction_id = (select clientid from client_server_faction_map where faction_id > 20000 && serverid = (faction_id-20000)) +where faction_id > 20000 && (faction_id-20000) in (select serverid from client_server_faction_map); + +/* Removes any duplicates from the use of factions that are obsoleted */ +/* These are entries that have no new mapping whatsoever */ +delete from npc_faction_entries where faction_id > 20000; + + +/* +Update the faction_values now. + +We're deleting any faction_values for obsolete factions. These are factions +that were used, then switched away from in the past by servers, but the entries +were still there. +*/ +delete from faction_values + where faction_id not in (select old_faction from custom_faction_mappings) and faction_id not in (select serverid from client_server_faction_map); + +/* Custom faction mappings dont have to worry about range collision */ + +update faction_values set faction_id = (select new_faction from custom_faction_mappings where old_faction = faction_id) +where faction_id in (select old_faction from custom_faction_mappings); + +/* +Common factions have range collision issues, move them out of the way while +we process them. +*/ + +update faction_values set faction_id = faction_id + 20000 +where faction_id in (select serverid from client_server_faction_map); + +/* Put them in their correct places now based on client mapping */ + +update faction_values set faction_id = (select clientid from client_server_faction_map +where faction_id > 20000 && serverid = (faction_id-20000)) +where faction_id > 20000 && (faction_id-20000) in (select serverid from client_server_faction_map); + +/* Delete any stragglers */ +delete from faction_values where faction_id > 20000; From 3487086d46ab6cccac38fc29556da190214f8c18 Mon Sep 17 00:00:00 2001 From: Noudess Date: Tue, 18 Dec 2018 11:08:09 -0500 Subject: [PATCH 482/670] Update version of db needed for faction changes --- common/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/version.h b/common/version.h index e5603c247..8c5b98562 100644 --- a/common/version.h +++ b/common/version.h @@ -30,7 +30,7 @@ Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt */ -#define CURRENT_BINARY_DATABASE_VERSION 9130 +#define CURRENT_BINARY_DATABASE_VERSION 9132 #ifdef BOTS #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9021 #else From 3b21d2eb26d6efd4207d7f596d69b6941ae2b56d Mon Sep 17 00:00:00 2001 From: Noudess Date: Tue, 18 Dec 2018 11:11:22 -0500 Subject: [PATCH 483/670] Spacing where some spaces crept in. --- zone/zonedb.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index 0cfcf64c3..7d15a3008 100755 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -4049,8 +4049,8 @@ bool ZoneDatabase::LoadFactionData() faction_array[index] = new Faction; strn0cpy(faction_array[index]->name, row[1], 50); faction_array[index]->base = atoi(row[2]); - faction_array[index]->min = MIN_PERSONAL_FACTION; - faction_array[index]->max = MAX_PERSONAL_FACTION; + faction_array[index]->min = MIN_PERSONAL_FACTION; + faction_array[index]->max = MAX_PERSONAL_FACTION; // Load in the mimimum and maximum faction that can be earned for this faction query = StringFormat("SELECT `min` , `max` FROM `faction_base_data` WHERE client_faction_id = %u", index); @@ -4073,7 +4073,7 @@ bool ZoneDatabase::LoadFactionData() continue; for (auto modRow = modResults.begin(); modRow != modResults.end(); ++modRow) { - faction_array[index]->mods[modRow[1]] = atoi(modRow[0]); + faction_array[index]->mods[modRow[1]] = atoi(modRow[0]); } } From 469224cfe78b507897518498f8e77af39879c547 Mon Sep 17 00:00:00 2001 From: Noudess Date: Tue, 18 Dec 2018 11:24:10 -0500 Subject: [PATCH 484/670] Update manifest versions --- utils/sql/db_update_manifest.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index 1254b2936..19c8bd324 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -384,8 +384,8 @@ 9128|2018_08_13_inventory_version_update.sql|SHOW TABLES LIKE 'inventory_version'|not_empty| 9129|2018_08_13_inventory_update.sql|SHOW TABLES LIKE 'inventory_versions'|empty| 9130|2018_11_25_name_filter_update.sql|SHOW COLUMNS FROM `name_filter` LIKE 'id'|empty| -9131|2018_12_12_client_faction_tables.sql|SHOW TABLES LIKE 'faction_base_data'|empty| -9132|2018_12_12_convert_to_client_functions.sql|SELECT `id` FROM `faction_list` WHERE `id` > 4999 |empty| +9133|2018_12_12_client_faction_tables.sql|SHOW TABLES LIKE 'faction_base_data'|empty| +9134|2018_12_12_convert_to_client_functions.sql|SELECT `id` FROM `faction_list` WHERE `id` > 4999 |empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not From b5cc006e46da11865f9e14429eca77a41d97ffd5 Mon Sep 17 00:00:00 2001 From: Noudess Date: Tue, 18 Dec 2018 11:35:15 -0500 Subject: [PATCH 485/670] Update version of db needed for code. --- common/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/version.h b/common/version.h index 8c5b98562..ba57cf898 100644 --- a/common/version.h +++ b/common/version.h @@ -30,7 +30,7 @@ Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt */ -#define CURRENT_BINARY_DATABASE_VERSION 9132 +#define CURRENT_BINARY_DATABASE_VERSION 9134 #ifdef BOTS #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9021 #else From 487e994f895a2a441ba835ba64c60bce628f01b3 Mon Sep 17 00:00:00 2001 From: Uleat Date: Wed, 19 Dec 2018 05:36:48 -0500 Subject: [PATCH 486/670] Disabled zone map mmf option in cmake --- CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f3694698..11cc98802 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -266,10 +266,11 @@ IF(EQEMU_BUILD_LUA) ADD_DEFINITIONS(-DLUA_EQEMU) ENDIF(EQEMU_BUILD_LUA) -OPTION(EQEMU_USE_MAP_MMFS "Create and use Zone Map MMF files." OFF) -IF(EQEMU_USE_MAP_MMFS) - ADD_DEFINITIONS(-DUSE_MAP_MMFS) -ENDIF(EQEMU_USE_MAP_MMFS) +#Disabled until reevaluation performed +#OPTION(EQEMU_USE_MAP_MMFS "Create and use Zone Map MMF files." OFF) +#IF(EQEMU_USE_MAP_MMFS) +# ADD_DEFINITIONS(-DUSE_MAP_MMFS) +#ENDIF(EQEMU_USE_MAP_MMFS) SET(EQEMU_MAP_DIR "./Maps" CACHE STRING "The dir that maps, water maps, and paths are located in.") From 8499c3e65d95492ae02cd4a06ddb1ab1e654377e Mon Sep 17 00:00:00 2001 From: Uleat Date: Wed, 19 Dec 2018 07:11:59 -0500 Subject: [PATCH 487/670] Fix for conditional zone crashes caused by post-bot owner death hate aggregation (irongut_av) --- zone/attack.cpp | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/zone/attack.cpp b/zone/attack.cpp index bb3d8cb2d..5c3d22c32 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -2695,16 +2695,24 @@ void Mob::AddToHateList(Mob* other, uint32 hate /*= 0*/, int32 damage /*= 0*/, b #ifdef BOTS // if other is a bot, add the bots client to the hate list - if (other->IsBot()) { - if (other->CastToBot()->GetBotOwner() && other->CastToBot()->GetBotOwner()->CastToClient()->GetFeigned()) { - AddFeignMemory(other->CastToBot()->GetBotOwner()->CastToClient()); + while (other->IsBot()) { + auto other_ = other->CastToBot(); + if (!other_ || !other_->GetBotOwner()) + break; + + auto owner_ = other_->GetBotOwner()->CastToClient(); + if (!owner_ || owner_->IsDead() || !owner_->InZone()) // added isdead and inzone checks to avoid issues in AddAutoXTarget(...) below + break; + + if (owner_->GetFeigned()) { + AddFeignMemory(owner_); } - else { - if (!hate_list.IsEntOnHateList(other->CastToBot()->GetBotOwner())) { - hate_list.AddEntToHateList(other->CastToBot()->GetBotOwner(), 0, 0, false, true); - other->CastToBot()->GetBotOwner()->CastToClient()->AddAutoXTarget(this); - } + else if (!hate_list.IsEntOnHateList(owner_)) { + hate_list.AddEntToHateList(owner_, 0, 0, false, true); + owner_->AddAutoXTarget(this); // this was being called on dead/out-of-zone clients } + + break; } #endif //BOTS @@ -2716,6 +2724,7 @@ void Mob::AddToHateList(Mob* other, uint32 hate /*= 0*/, int32 damage /*= 0*/, b else { if (!hate_list.IsEntOnHateList(other->CastToMerc()->GetMercOwner())) hate_list.AddEntToHateList(other->CastToMerc()->GetMercOwner(), 0, 0, false, true); + // if mercs are reworked to include adding 'this' to owner's xtarget list, this should reflect bots code above } } //MERC @@ -5473,4 +5482,4 @@ int32 Mob::GetHPRegen() const int32 Mob::GetManaRegen() const { return mana_regen; -} \ No newline at end of file +} From 18fa53e09b83eff1bdeaececf35188cf8b76be16 Mon Sep 17 00:00:00 2001 From: KimLS Date: Fri, 21 Dec 2018 00:23:04 -0800 Subject: [PATCH 488/670] Fix for broken movespeed in merge --- zone/mob.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/mob.cpp b/zone/mob.cpp index 9a307ed53..7bbf76d64 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -163,7 +163,7 @@ Mob::Mob( } // clients -- todo movement this doesn't take into account gm speed we need to fix that. - + base_runspeed = (int)((float)runspeed * 40.0f); if (runspeed == 0.7f) { base_runspeed = 28; walkspeed = 0.3f; From d3aa74ff5458df5b377e57e0191d8114556cca36 Mon Sep 17 00:00:00 2001 From: KimLS Date: Fri, 21 Dec 2018 00:39:28 -0800 Subject: [PATCH 489/670] Update glm --- CMakeLists.txt | 2 + common/glm/.appveyor.yml | 61 + common/glm/.gitignore | 57 + common/glm/.travis.yml | 575 + common/glm/CMakeLists.txt | 277 + common/glm/cmake/glm.pc.in | 7 + common/glm/cmake/glmBuildConfig.cmake.in | 6 + common/glm/cmake/glmConfig.cmake.in | 9 + common/glm/cmake_uninstall.cmake.in | 26 + common/glm/copying.txt | 54 - common/glm/doc/api/a00002.html | 207 + common/glm/doc/api/a00002_source.html | 108 + common/glm/doc/api/a00005_source.html | 81 + common/glm/doc/api/a00008_source.html | 81 + common/glm/doc/api/a00011_source.html | 83 + common/glm/doc/api/a00014_source.html | 83 + common/glm/doc/api/a00017_source.html | 81 + common/glm/doc/api/a00020_source.html | 82 + common/glm/doc/api/a00023_source.html | 82 + common/glm/doc/api/a00026_source.html | 82 + common/glm/doc/api/a00029_source.html | 85 + common/glm/doc/api/a00032_source.html | 86 + common/glm/doc/api/a00035_source.html | 82 + common/glm/doc/api/a00038.html | 87 + common/glm/doc/api/a00038_source.html | 84 + common/glm/doc/api/a00041.html | 87 + common/glm/doc/api/a00041_source.html | 85 + common/glm/doc/api/a00044.html | 87 + common/glm/doc/api/a00044_source.html | 85 + common/glm/doc/api/a00047.html | 87 + common/glm/doc/api/a00047_source.html | 85 + common/glm/doc/api/a00050.html | 87 + common/glm/doc/api/a00050_source.html | 84 + common/glm/doc/api/a00053.html | 87 + common/glm/doc/api/a00053_source.html | 85 + common/glm/doc/api/a00056.html | 87 + common/glm/doc/api/a00056_source.html | 85 + common/glm/doc/api/a00059.html | 87 + common/glm/doc/api/a00059_source.html | 85 + common/glm/doc/api/a00062.html | 87 + common/glm/doc/api/a00062_source.html | 84 + common/glm/doc/api/a00065_source.html | 84 + common/glm/doc/api/a00068.html | 87 + common/glm/doc/api/a00068_source.html | 83 + common/glm/doc/api/a00071.html | 87 + common/glm/doc/api/a00071_source.html | 83 + common/glm/doc/api/a00074.html | 87 + common/glm/doc/api/a00074_source.html | 83 + common/glm/doc/api/a00077.html | 87 + common/glm/doc/api/a00077_source.html | 83 + common/glm/doc/api/a00080.html | 115 + common/glm/doc/api/a00080_source.html | 93 + common/glm/doc/api/a00083.html | 219 + common/glm/doc/api/a00083_source.html | 122 + common/glm/doc/api/a00086.html | 97 + common/glm/doc/api/a00086_source.html | 84 + common/glm/doc/api/a00089.html | 105 + common/glm/doc/api/a00089_source.html | 88 + common/glm/doc/api/a00092.html | 95 + common/glm/doc/api/a00092_source.html | 83 + common/glm/doc/api/a00095.html | 99 + common/glm/doc/api/a00095_source.html | 85 + common/glm/doc/api/a00098.html | 95 + common/glm/doc/api/a00098_source.html | 83 + common/glm/doc/api/a00101.html | 99 + common/glm/doc/api/a00101_source.html | 85 + common/glm/doc/api/a00104.html | 95 + common/glm/doc/api/a00104_source.html | 83 + common/glm/doc/api/a00107.html | 99 + common/glm/doc/api/a00107_source.html | 85 + common/glm/doc/api/a00110.html | 97 + common/glm/doc/api/a00110_source.html | 84 + common/glm/doc/api/a00113.html | 105 + common/glm/doc/api/a00113_source.html | 88 + common/glm/doc/api/a00116.html | 95 + common/glm/doc/api/a00116_source.html | 83 + common/glm/doc/api/a00119.html | 99 + common/glm/doc/api/a00119_source.html | 85 + common/glm/doc/api/a00122.html | 95 + common/glm/doc/api/a00122_source.html | 83 + common/glm/doc/api/a00125.html | 99 + common/glm/doc/api/a00125_source.html | 85 + common/glm/doc/api/a00128.html | 95 + common/glm/doc/api/a00128_source.html | 83 + common/glm/doc/api/a00131.html | 99 + common/glm/doc/api/a00131_source.html | 85 + common/glm/doc/api/a00134.html | 97 + common/glm/doc/api/a00134_source.html | 84 + common/glm/doc/api/a00137.html | 105 + common/glm/doc/api/a00137_source.html | 88 + common/glm/doc/api/a00140.html | 97 + common/glm/doc/api/a00140_source.html | 84 + common/glm/doc/api/a00143.html | 105 + common/glm/doc/api/a00143_source.html | 88 + common/glm/doc/api/a00146.html | 95 + common/glm/doc/api/a00146_source.html | 83 + common/glm/doc/api/a00149.html | 99 + common/glm/doc/api/a00149_source.html | 85 + common/glm/doc/api/a00152.html | 95 + common/glm/doc/api/a00152_source.html | 83 + common/glm/doc/api/a00155.html | 99 + common/glm/doc/api/a00155_source.html | 85 + common/glm/doc/api/a00158.html | 95 + common/glm/doc/api/a00158_source.html | 83 + common/glm/doc/api/a00161.html | 99 + common/glm/doc/api/a00161_source.html | 85 + common/glm/doc/api/a00164.html | 97 + common/glm/doc/api/a00164_source.html | 84 + common/glm/doc/api/a00167.html | 105 + common/glm/doc/api/a00167_source.html | 88 + common/glm/doc/api/a00170.html | 95 + common/glm/doc/api/a00170_source.html | 83 + common/glm/doc/api/a00173.html | 99 + common/glm/doc/api/a00173_source.html | 85 + common/glm/doc/api/a00176.html | 95 + common/glm/doc/api/a00176_source.html | 83 + common/glm/doc/api/a00179_source.html | 85 + common/glm/doc/api/a00182.html | 95 + common/glm/doc/api/a00182_source.html | 83 + common/glm/doc/api/a00185.html | 99 + common/glm/doc/api/a00185_source.html | 85 + common/glm/doc/api/a00188.html | 93 + common/glm/doc/api/a00188_source.html | 84 + common/glm/doc/api/a00191.html | 105 + common/glm/doc/api/a00191_source.html | 88 + common/glm/doc/api/a00194.html | 114 + common/glm/doc/api/a00194_source.html | 90 + common/glm/doc/api/a00197.html | 111 + common/glm/doc/api/a00197_source.html | 85 + common/glm/doc/api/a00203.html | 114 + common/glm/doc/api/a00203_source.html | 89 + common/glm/doc/api/a00206.html | 96 + common/glm/doc/api/a00206_source.html | 83 + common/glm/doc/api/a00209.html | 99 + common/glm/doc/api/a00209_source.html | 85 + common/glm/doc/api/a00212.html | 105 + common/glm/doc/api/a00212_source.html | 86 + common/glm/doc/api/a00215.html | 96 + common/glm/doc/api/a00215_source.html | 83 + common/glm/doc/api/a00218.html | 102 + common/glm/doc/api/a00218_source.html | 85 + common/glm/doc/api/a00221.html | 105 + common/glm/doc/api/a00221_source.html | 86 + common/glm/doc/api/a00224.html | 105 + common/glm/doc/api/a00224_source.html | 85 + common/glm/doc/api/a00227.html | 96 + common/glm/doc/api/a00227_source.html | 85 + common/glm/doc/api/a00230.html | 102 + common/glm/doc/api/a00230_source.html | 87 + common/glm/doc/api/a00233.html | 123 + common/glm/doc/api/a00233_source.html | 86 + common/glm/doc/api/a00236.html | 101 + common/glm/doc/api/a00236_source.html | 84 + common/glm/doc/api/a00239.html | 99 + common/glm/doc/api/a00239_source.html | 84 + common/glm/doc/api/a00242.html | 105 + common/glm/doc/api/a00242_source.html | 89 + common/glm/doc/api/a00245.html | 112 + common/glm/doc/api/a00245_source.html | 89 + common/glm/doc/api/a00248.html | 105 + common/glm/doc/api/a00248_source.html | 89 + common/glm/doc/api/a00251.html | 96 + common/glm/doc/api/a00251_source.html | 83 + common/glm/doc/api/a00254.html | 102 + common/glm/doc/api/a00254_source.html | 85 + common/glm/doc/api/a00257.html | 95 + common/glm/doc/api/a00257_source.html | 83 + common/glm/doc/api/a00260.html | 99 + common/glm/doc/api/a00260_source.html | 85 + common/glm/doc/api/a00263.html | 95 + common/glm/doc/api/a00263_source.html | 83 + common/glm/doc/api/a00266.html | 99 + common/glm/doc/api/a00266_source.html | 85 + common/glm/doc/api/a00269.html | 95 + common/glm/doc/api/a00269_source.html | 83 + common/glm/doc/api/a00272.html | 99 + common/glm/doc/api/a00272_source.html | 85 + common/glm/doc/api/a00275.html | 129 + common/glm/doc/api/a00275_source.html | 86 + common/glm/doc/api/a00278.html | 96 + common/glm/doc/api/a00278_source.html | 83 + common/glm/doc/api/a00281.html | 102 + common/glm/doc/api/a00281_source.html | 85 + common/glm/doc/api/a00284.html | 95 + common/glm/doc/api/a00284_source.html | 83 + common/glm/doc/api/a00287.html | 99 + common/glm/doc/api/a00287_source.html | 85 + common/glm/doc/api/a00290.html | 95 + common/glm/doc/api/a00290_source.html | 83 + common/glm/doc/api/a00293.html | 99 + common/glm/doc/api/a00293_source.html | 85 + common/glm/doc/api/a00296.html | 95 + common/glm/doc/api/a00296_source.html | 83 + common/glm/doc/api/a00299.html | 99 + common/glm/doc/api/a00299_source.html | 85 + common/glm/doc/api/a00302.html | 96 + common/glm/doc/api/a00302_source.html | 83 + common/glm/doc/api/a00305.html | 102 + common/glm/doc/api/a00305_source.html | 85 + common/glm/doc/api/a00308.html | 95 + common/glm/doc/api/a00308_source.html | 83 + common/glm/doc/api/a00311.html | 99 + common/glm/doc/api/a00311_source.html | 85 + common/glm/doc/api/a00314.html | 95 + common/glm/doc/api/a00314_source.html | 83 + common/glm/doc/api/a00317.html | 99 + common/glm/doc/api/a00317_source.html | 85 + common/glm/doc/api/a00320.html | 95 + common/glm/doc/api/a00320_source.html | 83 + common/glm/doc/api/a00323.html | 99 + common/glm/doc/api/a00323_source.html | 85 + common/glm/doc/api/a00326.html | 96 + common/glm/doc/api/a00326_source.html | 83 + common/glm/doc/api/a00329.html | 102 + common/glm/doc/api/a00329_source.html | 85 + common/glm/doc/api/a00332.html | 95 + common/glm/doc/api/a00332_source.html | 83 + common/glm/doc/api/a00335.html | 99 + common/glm/doc/api/a00335_source.html | 85 + common/glm/doc/api/a00338.html | 95 + common/glm/doc/api/a00338_source.html | 83 + common/glm/doc/api/a00341.html | 99 + common/glm/doc/api/a00341_source.html | 85 + common/glm/doc/api/a00344.html | 95 + common/glm/doc/api/a00344_source.html | 83 + common/glm/doc/api/a00347.html | 99 + common/glm/doc/api/a00347_source.html | 85 + common/glm/doc/api/a00350.html | 121 + common/glm/doc/api/a00350_source.html | 91 + common/glm/doc/api/a00353.html | 96 + common/glm/doc/api/a00353_source.html | 83 + common/glm/doc/api/a00356.html | 99 + common/glm/doc/api/a00356_source.html | 85 + common/glm/doc/api/a00359.html | 95 + common/glm/doc/api/a00359_source.html | 83 + common/glm/doc/api/a00362.html | 99 + common/glm/doc/api/a00362_source.html | 85 + common/glm/doc/api/a00365.html | 95 + common/glm/doc/api/a00365_source.html | 83 + common/glm/doc/api/a00368.html | 99 + common/glm/doc/api/a00368_source.html | 85 + common/glm/doc/api/a00371.html | 95 + common/glm/doc/api/a00371_source.html | 83 + common/glm/doc/api/a00374.html | 99 + common/glm/doc/api/a00374_source.html | 85 + common/glm/doc/api/a00377.html | 87 + common/glm/doc/api/a00377_source.html | 239 + common/glm/doc/api/a00380.html | 90 + common/glm/doc/api/a00380_source.html | 714 ++ common/glm/doc/api/a00383.html | 118 + common/glm/doc/api/a00383_source.html | 91 + common/glm/doc/api/a00386.html | 87 + common/glm/doc/api/a00386_source.html | 101 + common/glm/doc/api/a00389.html | 170 + common/glm/doc/api/a00389_source.html | 97 + common/glm/doc/api/a00392.html | 205 + common/glm/doc/api/a00392_source.html | 97 + common/glm/doc/api/a00395.html | 175 + common/glm/doc/api/a00395_source.html | 109 + common/glm/doc/api/a00398.html | 108 + common/glm/doc/api/a00398_source.html | 85 + common/glm/doc/api/a00401.html | 133 + common/glm/doc/api/a00401_source.html | 94 + common/glm/doc/api/a00404.html | 106 + common/glm/doc/api/a00404_source.html | 84 + common/glm/doc/api/a00407.html | 286 + common/glm/doc/api/a00407_source.html | 178 + common/glm/doc/api/a00410.html | 100 + common/glm/doc/api/a00410_source.html | 84 + common/glm/doc/api/a00413.html | 103 + common/glm/doc/api/a00413_source.html | 84 + common/glm/doc/api/a00416.html | 120 + common/glm/doc/api/a00416_source.html | 100 + common/glm/doc/api/a00419.html | 135 + common/glm/doc/api/a00419_source.html | 100 + common/glm/doc/api/a00422.html | 117 + common/glm/doc/api/a00422_source.html | 88 + common/glm/doc/api/a00425.html | 130 + common/glm/doc/api/a00425_source.html | 95 + common/glm/doc/api/a00428.html | 147 + common/glm/doc/api/a00428_source.html | 90 + common/glm/doc/api/a00431.html | 167 + common/glm/doc/api/a00431_source.html | 90 + common/glm/doc/api/a00434.html | 90 + common/glm/doc/api/a00434_source.html | 524 + common/glm/doc/api/a00437.html | 195 + common/glm/doc/api/a00437_source.html | 100 + common/glm/doc/api/a00440.html | 112 + common/glm/doc/api/a00440_source.html | 85 + common/glm/doc/api/a00443.html | 88 + common/glm/doc/api/a00443_source.html | 81 + common/glm/doc/api/a00446.html | 162 + common/glm/doc/api/a00446_source.html | 84 + common/glm/doc/api/a00449.html | 121 + common/glm/doc/api/a00449_source.html | 87 + common/glm/doc/api/a00452.html | 101 + common/glm/doc/api/a00452_source.html | 83 + common/glm/doc/api/a00455.html | 112 + common/glm/doc/api/a00455_source.html | 86 + common/glm/doc/api/a00458.html | 106 + common/glm/doc/api/a00458_source.html | 87 + common/glm/doc/api/a00461.html | 346 + common/glm/doc/api/a00461_source.html | 145 + common/glm/doc/api/a00464.html | 114 + common/glm/doc/api/a00464_source.html | 88 + common/glm/doc/api/a00467.html | 151 + common/glm/doc/api/a00467_source.html | 103 + common/glm/doc/api/a00470.html | 198 + common/glm/doc/api/a00470_source.html | 113 + common/glm/doc/api/a00473.html | 217 + common/glm/doc/api/a00473_source.html | 126 + common/glm/doc/api/a00476.html | 97 + common/glm/doc/api/a00476_source.html | 83 + common/glm/doc/api/a00479.html | 145 + common/glm/doc/api/a00479_source.html | 87 + common/glm/doc/api/a00482.html | 99 + common/glm/doc/api/a00482_source.html | 83 + common/glm/doc/api/a00485.html | 132 + common/glm/doc/api/a00485_source.html | 87 + common/glm/doc/api/a00488.html | 121 + common/glm/doc/api/a00488_source.html | 87 + common/glm/doc/api/a00491.html | 118 + common/glm/doc/api/a00491_source.html | 90 + common/glm/doc/api/a00494.html | 102 + common/glm/doc/api/a00494_source.html | 83 + common/glm/doc/api/a00497.html | 102 + common/glm/doc/api/a00497_source.html | 84 + common/glm/doc/api/a00500.html | 100 + common/glm/doc/api/a00500_source.html | 84 + common/glm/doc/api/a00503.html | 88 + common/glm/doc/api/a00503_source.html | 83 + common/glm/doc/api/a00506.html | 114 + common/glm/doc/api/a00506_source.html | 88 + common/glm/doc/api/a00509.html | 93 + common/glm/doc/api/a00509_source.html | 82 + common/glm/doc/api/a00512.html | 100 + common/glm/doc/api/a00512_source.html | 84 + common/glm/doc/api/a00515.html | 102 + common/glm/doc/api/a00515_source.html | 84 + common/glm/doc/api/a00518.html | 97 + common/glm/doc/api/a00518_source.html | 86 + common/glm/doc/api/a00521.html | 106 + common/glm/doc/api/a00521_source.html | 86 + common/glm/doc/api/a00524.html | 107 + common/glm/doc/api/a00524_source.html | 86 + common/glm/doc/api/a00527.html | 132 + common/glm/doc/api/a00527_source.html | 88 + common/glm/doc/api/a00530.html | 121 + common/glm/doc/api/a00530_source.html | 91 + common/glm/doc/api/a00533.html | 120 + common/glm/doc/api/a00533_source.html | 87 + common/glm/doc/api/a00536.html | 110 + common/glm/doc/api/a00536_source.html | 88 + common/glm/doc/api/a00539.html | 98 + common/glm/doc/api/a00539_source.html | 83 + common/glm/doc/api/a00542.html | 120 + common/glm/doc/api/a00542_source.html | 87 + common/glm/doc/api/a00545.html | 99 + common/glm/doc/api/a00545_source.html | 83 + common/glm/doc/api/a00548.html | 102 + common/glm/doc/api/a00548_source.html | 84 + common/glm/doc/api/a00551.html | 128 + common/glm/doc/api/a00551_source.html | 98 + common/glm/doc/api/a00554.html | 103 + common/glm/doc/api/a00554_source.html | 85 + common/glm/doc/api/a00557.html | 102 + common/glm/doc/api/a00557_source.html | 83 + common/glm/doc/api/a00560.html | 99 + common/glm/doc/api/a00560_source.html | 83 + common/glm/doc/api/a00563.html | 100 + common/glm/doc/api/a00563_source.html | 84 + common/glm/doc/api/a00566.html | 97 + common/glm/doc/api/a00566_source.html | 83 + common/glm/doc/api/a00569.html | 88 + common/glm/doc/api/a00569_source.html | 83 + common/glm/doc/api/a00572.html | 102 + common/glm/doc/api/a00572_source.html | 86 + common/glm/doc/api/a00575.html | 104 + common/glm/doc/api/a00575_source.html | 85 + common/glm/doc/api/a00578.html | 129 + common/glm/doc/api/a00578_source.html | 89 + common/glm/doc/api/a00581.html | 91 + common/glm/doc/api/a00581_source.html | 94 + common/glm/doc/api/a00584.html | 103 + common/glm/doc/api/a00584_source.html | 85 + common/glm/doc/api/a00587.html | 112 + common/glm/doc/api/a00587_source.html | 90 + common/glm/doc/api/a00590.html | 101 + common/glm/doc/api/a00590_source.html | 83 + common/glm/doc/api/a00593.html | 97 + common/glm/doc/api/a00593_source.html | 83 + common/glm/doc/api/a00596.html | 109 + common/glm/doc/api/a00596_source.html | 86 + common/glm/doc/api/a00599.html | 123 + common/glm/doc/api/a00599_source.html | 91 + common/glm/doc/api/a00602.html | 88 + common/glm/doc/api/a00602_source.html | 82 + common/glm/doc/api/a00605.html | 88 + common/glm/doc/api/a00605_source.html | 82 + common/glm/doc/api/a00608.html | 107 + common/glm/doc/api/a00608_source.html | 84 + common/glm/doc/api/a00611.html | 112 + common/glm/doc/api/a00611_source.html | 89 + common/glm/doc/api/a00614.html | 106 + common/glm/doc/api/a00614_source.html | 86 + common/glm/doc/api/a00617.html | 87 + common/glm/doc/api/a00617_source.html | 85 + common/glm/doc/api/a00620.html | 87 + common/glm/doc/api/a00620_source.html | 85 + common/glm/doc/api/a00623.html | 87 + common/glm/doc/api/a00623_source.html | 85 + common/glm/doc/api/a00626.html | 87 + common/glm/doc/api/a00626_source.html | 85 + common/glm/doc/api/a00629.html | 87 + common/glm/doc/api/a00629_source.html | 85 + common/glm/doc/api/a00632.html | 87 + common/glm/doc/api/a00632_source.html | 85 + common/glm/doc/api/a00635.html | 87 + common/glm/doc/api/a00635_source.html | 84 + common/glm/doc/api/a00638.html | 87 + common/glm/doc/api/a00638_source.html | 85 + common/glm/doc/api/a00641.html | 87 + common/glm/doc/api/a00641_source.html | 85 + common/glm/doc/api/a00644.html | 109 + common/glm/doc/api/a00644_source.html | 99 + common/glm/doc/api/a00647.html | 139 + common/glm/doc/api/a00647_source.html | 97 + common/glm/doc/api/a00650.html | 87 + common/glm/doc/api/a00650_source.html | 91 + common/glm/doc/api/a00653.html | 87 + common/glm/doc/api/a00653_source.html | 91 + common/glm/doc/api/a00656.html | 87 + common/glm/doc/api/a00656_source.html | 91 + common/glm/doc/api/a00659.html | 90 + common/glm/doc/api/a00659_source.html | 82 + common/glm/doc/api/a00662.html | 1605 +++ common/glm/doc/api/a00662_source.html | 82 + common/glm/doc/api/a00663.html | 618 ++ common/glm/doc/api/a00664.html | 366 + common/glm/doc/api/a00665.html | 2743 +++++ common/glm/doc/api/a00666.html | 530 + common/glm/doc/api/a00667.html | 374 + common/glm/doc/api/a00668.html | 425 + common/glm/doc/api/a00669.html | 393 + common/glm/doc/api/a00670.html | 104 + common/glm/doc/api/a00671.html | 150 + common/glm/doc/api/a00672.html | 84 + common/glm/doc/api/a00673.html | 104 + common/glm/doc/api/a00674.html | 95 + common/glm/doc/api/a00675.html | 236 + common/glm/doc/api/a00676.html | 268 + common/glm/doc/api/a00677.html | 282 + common/glm/doc/api/a00678.html | 205 + common/glm/doc/api/a00679.html | 564 + common/glm/doc/api/a00680.html | 94 + common/glm/doc/api/a00681.html | 95 + common/glm/doc/api/a00682.html | 99 + common/glm/doc/api/a00683.html | 84 + common/glm/doc/api/a00684.html | 99 + common/glm/doc/api/a00685.html | 90 + common/glm/doc/api/a00686.html | 95 + common/glm/doc/api/a00687.html | 670 ++ common/glm/doc/api/a00688.html | 92 + common/glm/doc/api/a00689.html | 96 + common/glm/doc/api/a00690.html | 92 + common/glm/doc/api/a00691.html | 96 + common/glm/doc/api/a00692.html | 92 + common/glm/doc/api/a00693.html | 95 + common/glm/doc/api/a00694.html | 284 + common/glm/doc/api/a00695.html | 92 + common/glm/doc/api/a00696.html | 150 + common/glm/doc/api/a00697.html | 423 + common/glm/doc/api/a00698.html | 138 + common/glm/doc/api/a00699.html | 401 + common/glm/doc/api/a00700.html | 1130 ++ common/glm/doc/api/a00701.html | 570 + common/glm/doc/api/a00702.html | 1745 +++ common/glm/doc/api/a00703.html | 151 + common/glm/doc/api/a00704.html | 127 + common/glm/doc/api/a00705.html | 211 + common/glm/doc/api/a00706.html | 1244 +++ common/glm/doc/api/a00707.html | 173 + common/glm/doc/api/a00708.html | 708 ++ common/glm/doc/api/a00709.html | 251 + common/glm/doc/api/a00710.html | 189 + common/glm/doc/api/a00711.html | 235 + common/glm/doc/api/a00712.html | 2103 ++++ common/glm/doc/api/a00713.html | 159 + common/glm/doc/api/a00714.html | 80 + common/glm/doc/api/a00715.html | 169 + common/glm/doc/api/a00716.html | 2088 ++++ common/glm/doc/api/a00717.html | 311 + common/glm/doc/api/a00718.html | 456 + common/glm/doc/api/a00719.html | 717 ++ common/glm/doc/api/a00720.html | 1142 ++ common/glm/doc/api/a00721.html | 9337 +++++++++++++++++ common/glm/doc/api/a00722.html | 882 ++ common/glm/doc/api/a00723.html | 271 + common/glm/doc/api/a00724.html | 79 + common/glm/doc/api/a00725.html | 1363 +++ common/glm/doc/api/a00726.html | 317 + common/glm/doc/api/a00727.html | 131 + common/glm/doc/api/a00728.html | 102 + common/glm/doc/api/a00729.html | 251 + common/glm/doc/api/a00730.html | 187 + common/glm/doc/api/a00731.html | 245 + common/glm/doc/api/a00732.html | 338 + common/glm/doc/api/a00733.html | 231 + common/glm/doc/api/a00734.html | 551 + common/glm/doc/api/a00735.html | 917 ++ common/glm/doc/api/a00736.html | 1634 +++ common/glm/doc/api/a00737.html | 127 + common/glm/doc/api/a00738.html | 832 ++ common/glm/doc/api/a00739.html | 128 + common/glm/doc/api/a00740.html | 405 + common/glm/doc/api/a00741.html | 325 + common/glm/doc/api/a00742.html | 288 + common/glm/doc/api/a00743.html | 167 + common/glm/doc/api/a00744.html | 173 + common/glm/doc/api/a00745.html | 167 + common/glm/doc/api/a00746.html | 79 + common/glm/doc/api/a00747.html | 360 + common/glm/doc/api/a00748.html | 441 + common/glm/doc/api/a00749.html | 81 + common/glm/doc/api/a00750.html | 155 + common/glm/doc/api/a00751.html | 135 + common/glm/doc/api/a00752.html | 145 + common/glm/doc/api/a00753.html | 185 + common/glm/doc/api/a00754.html | 225 + common/glm/doc/api/a00755.html | 471 + common/glm/doc/api/a00756.html | 303 + common/glm/doc/api/a00757.html | 359 + common/glm/doc/api/a00758.html | 287 + common/glm/doc/api/a00759.html | 90 + common/glm/doc/api/a00760.html | 335 + common/glm/doc/api/a00761.html | 127 + common/glm/doc/api/a00762.html | 157 + common/glm/doc/api/a00763.html | 116 + common/glm/doc/api/a00764.html | 159 + common/glm/doc/api/a00765.html | 145 + common/glm/doc/api/a00766.html | 121 + common/glm/doc/api/a00767.html | 135 + common/glm/doc/api/a00768.html | 121 + common/glm/doc/api/a00769.html | 616 ++ common/glm/doc/api/a00770.html | 80 + common/glm/doc/api/a00771.html | 171 + common/glm/doc/api/a00772.html | 195 + common/glm/doc/api/a00773.html | 487 + common/glm/doc/api/a00774.html | 79 + common/glm/doc/api/a00775.html | 243 + common/glm/doc/api/a00776.html | 255 + common/glm/doc/api/a00777.html | 112 + common/glm/doc/api/a00778.html | 124 + common/glm/doc/api/a00779.html | 175 + common/glm/doc/api/a00780.html | 416 + common/glm/doc/api/a00781.html | 8135 ++++++++++++++ common/glm/doc/api/a00782.html | 80 + common/glm/doc/api/a00783.html | 79 + common/glm/doc/api/a00784.html | 195 + common/glm/doc/api/a00785.html | 309 + common/glm/doc/api/a00786.html | 183 + common/glm/doc/api/a00787.html | 636 ++ common/glm/doc/api/a00788.html | 282 + common/glm/doc/api/a00789.html | 416 + common/glm/doc/api/a00790.html | 620 ++ common/glm/doc/api/a00791.html | 445 + common/glm/doc/api/a00792.html | 1741 +++ common/glm/doc/api/a00793.html | 455 + common/glm/doc/api/a00794.html | 636 ++ common/glm/doc/api/a00795.html | 455 + common/glm/doc/api/a00796.html | 107 + common/glm/doc/api/a00797.html | 107 + common/glm/doc/api/a01343.html | 104 + common/glm/doc/api/a01343_source.html | 84 + common/glm/doc/api/a01346.html | 109 + common/glm/doc/api/a01346_source.html | 84 + common/glm/doc/api/a01347.html | 104 + common/glm/doc/api/a01347_source.html | 84 + common/glm/doc/api/a01348.html | 116 + common/glm/doc/api/a01348_source.html | 84 + common/glm/doc/api/a01349.html | 112 + common/glm/doc/api/a01349_source.html | 86 + common/glm/doc/api/a01350.html | 111 + common/glm/doc/api/a01350_source.html | 86 + common/glm/doc/api/a01351.html | 121 + common/glm/doc/api/a01351_source.html | 86 + common/glm/doc/api/a01352.html | 106 + common/glm/doc/api/a01352_source.html | 86 + common/glm/doc/api/a01353.html | 105 + common/glm/doc/api/a01353_source.html | 86 + common/glm/doc/api/a01354.html | 113 + common/glm/doc/api/a01354_source.html | 86 + common/glm/doc/api/a01355.html | 105 + common/glm/doc/api/a01355_source.html | 85 + common/glm/doc/api/a01356.html | 104 + common/glm/doc/api/a01356_source.html | 85 + common/glm/doc/api/a01357.html | 111 + common/glm/doc/api/a01357_source.html | 85 + common/glm/doc/api/a01358.html | 119 + common/glm/doc/api/a01358_source.html | 89 + common/glm/doc/api/a01359.html | 118 + common/glm/doc/api/a01359_source.html | 89 + common/glm/doc/api/a01360.html | 132 + common/glm/doc/api/a01360_source.html | 89 + common/glm/doc/api/a01361.html | 115 + common/glm/doc/api/a01361_source.html | 91 + common/glm/doc/api/a01362.html | 107 + common/glm/doc/api/a01362_source.html | 91 + common/glm/doc/api/a01363.html | 126 + common/glm/doc/api/a01363_source.html | 91 + common/glm/doc/api/a01364.html | 92 + common/glm/doc/api/a01364_source.html | 81 + common/glm/doc/api/a01365.html | 91 + common/glm/doc/api/a01365_source.html | 81 + common/glm/doc/api/a01366.html | 95 + common/glm/doc/api/a01366_source.html | 81 + common/glm/doc/api/a01367.html | 242 + common/glm/doc/api/a01367_source.html | 170 + common/glm/doc/api/a01368.html | 241 + common/glm/doc/api/a01368_source.html | 170 + common/glm/doc/api/a01369.html | 315 + common/glm/doc/api/a01369_source.html | 170 + common/glm/doc/api/a01370.html | 141 + common/glm/doc/api/a01370_source.html | 96 + common/glm/doc/api/a01371.html | 140 + common/glm/doc/api/a01371_source.html | 96 + common/glm/doc/api/a01372.html | 159 + common/glm/doc/api/a01372_source.html | 96 + common/glm/doc/api/a01373.html | 144 + common/glm/doc/api/a01373_source.html | 98 + common/glm/doc/api/a01374.html | 143 + common/glm/doc/api/a01374_source.html | 98 + common/glm/doc/api/a01375.html | 163 + common/glm/doc/api/a01375_source.html | 98 + common/glm/doc/api/a01376.html | 186 + common/glm/doc/api/a01376_source.html | 85 + common/glm/doc/api/a01377.html | 182 + common/glm/doc/api/a01377_source.html | 85 + common/glm/doc/api/a01378.html | 194 + common/glm/doc/api/a01378_source.html | 85 + common/glm/doc/api/a01379.html | 88 + common/glm/doc/api/a01379_source.html | 82 + common/glm/doc/api/a01380.html | 87 + common/glm/doc/api/a01380_source.html | 82 + common/glm/doc/api/a01381.html | 91 + common/glm/doc/api/a01381_source.html | 82 + common/glm/doc/api/a01382.html | 1150 ++ common/glm/doc/api/a01382_source.html | 434 + common/glm/doc/api/a01383.html | 87 + common/glm/doc/api/a01383_source.html | 434 + common/glm/doc/api/a01384.html | 1505 +++ common/glm/doc/api/a01384_source.html | 434 + common/glm/doc/api/a01385.html | 508 + common/glm/doc/api/a01385_source.html | 296 + common/glm/doc/api/a01386.html | 507 + common/glm/doc/api/a01386_source.html | 296 + common/glm/doc/api/a01387.html | 717 ++ common/glm/doc/api/a01387_source.html | 294 + common/glm/doc/api/a01388.html | 105 + common/glm/doc/api/a01388_source.html | 85 + common/glm/doc/api/a01389.html | 101 + common/glm/doc/api/a01389_source.html | 85 + common/glm/doc/api/a01390.html | 113 + common/glm/doc/api/a01390_source.html | 85 + common/glm/doc/api/a01391.html | 113 + common/glm/doc/api/a01391_source.html | 85 + common/glm/doc/api/a01392.html | 113 + common/glm/doc/api/a01392_source.html | 85 + common/glm/doc/api/a01393.html | 113 + common/glm/doc/api/a01393_source.html | 85 + common/glm/doc/api/a01394.html | 113 + common/glm/doc/api/a01394_source.html | 85 + common/glm/doc/api/bc_s.png | Bin 0 -> 600 bytes common/glm/doc/api/bdwn.png | Bin 0 -> 200 bytes common/glm/doc/api/closed.png | Bin 0 -> 194 bytes .../dir_02cc19cee4c4780485bfe81520450212.html | 81 + .../dir_1551bf7b389c96495cd64da3774a1843.html | 81 + .../dir_2c9f37f6a8d2004101d7524672238505.html | 111 + .../dir_3da5c411f748022d233cc92a3c5e2a02.html | 211 + .../dir_4ca6aa55b50e6be994025af27820140e.html | 132 + .../dir_54de7df3bc9880881b14ec07f256fd2e.html | 81 + .../dir_627f4a52155b61a75c7c4851d7df9027.html | 81 + .../dir_6399a054f5929b58eaa476233e406ce8.html | 81 + .../dir_b115b02f1dab989141fcd87ab0462f01.html | 279 + .../dir_d522931ffa1371640980b621734a4381.html | 81 + .../dir_e6ae9283c4fa4619048a0a88dfd00585.html | 125 + .../dir_ffdfd01cf51cdb2fe8bd5e55c6e0c4e8.html | 85 + common/glm/doc/api/doc.png | Bin 0 -> 624 bytes common/glm/doc/api/doxygen.css | 1496 +++ common/glm/doc/api/doxygen.png | Bin 0 -> 2419 bytes common/glm/doc/api/dynsections.js | 127 + common/glm/doc/api/files.html | 311 + common/glm/doc/api/folderclosed.png | Bin 0 -> 573 bytes common/glm/doc/api/folderopen.png | Bin 0 -> 596 bytes common/glm/doc/api/index.html | 82 + common/glm/doc/api/jquery.js | 115 + common/glm/doc/api/logo-mini.png | Bin 0 -> 11967 bytes common/glm/doc/api/menu.js | 50 + common/glm/doc/api/menudata.js | 28 + common/glm/doc/api/modules.html | 211 + common/glm/doc/api/nav_f.png | Bin 0 -> 233 bytes common/glm/doc/api/nav_g.png | Bin 0 -> 95 bytes common/glm/doc/api/nav_h.png | Bin 0 -> 188 bytes common/glm/doc/api/open.png | Bin 0 -> 177 bytes common/glm/doc/api/search/all_0.html | 30 + common/glm/doc/api/search/all_0.js | 208 + common/glm/doc/api/search/all_1.html | 30 + common/glm/doc/api/search/all_1.js | 41 + common/glm/doc/api/search/all_10.html | 30 + common/glm/doc/api/search/all_10.js | 49 + common/glm/doc/api/search/all_11.html | 30 + common/glm/doc/api/search/all_11.js | 40 + common/glm/doc/api/search/all_12.html | 30 + common/glm/doc/api/search/all_12.js | 97 + common/glm/doc/api/search/all_13.html | 30 + common/glm/doc/api/search/all_13.js | 60 + common/glm/doc/api/search/all_14.html | 30 + common/glm/doc/api/search/all_14.js | 6 + common/glm/doc/api/search/all_15.html | 30 + common/glm/doc/api/search/all_15.js | 7 + common/glm/doc/api/search/all_16.html | 30 + common/glm/doc/api/search/all_16.js | 4 + common/glm/doc/api/search/all_2.html | 30 + common/glm/doc/api/search/all_2.js | 51 + common/glm/doc/api/search/all_3.html | 30 + common/glm/doc/api/search/all_3.js | 59 + common/glm/doc/api/search/all_4.html | 30 + common/glm/doc/api/search/all_4.js | 68 + common/glm/doc/api/search/all_5.html | 30 + common/glm/doc/api/search/all_5.js | 131 + common/glm/doc/api/search/all_6.html | 30 + common/glm/doc/api/search/all_6.js | 135 + common/glm/doc/api/search/all_7.html | 30 + common/glm/doc/api/search/all_7.js | 194 + common/glm/doc/api/search/all_8.html | 30 + common/glm/doc/api/search/all_8.js | 93 + common/glm/doc/api/search/all_9.html | 30 + common/glm/doc/api/search/all_9.js | 213 + common/glm/doc/api/search/all_a.html | 30 + common/glm/doc/api/search/all_a.js | 296 + common/glm/doc/api/search/all_b.html | 30 + common/glm/doc/api/search/all_b.js | 14 + common/glm/doc/api/search/all_c.html | 30 + common/glm/doc/api/search/all_c.js | 27 + common/glm/doc/api/search/all_d.html | 30 + common/glm/doc/api/search/all_d.js | 262 + common/glm/doc/api/search/all_e.html | 30 + common/glm/doc/api/search/all_e.js | 31 + common/glm/doc/api/search/all_f.html | 30 + common/glm/doc/api/search/all_f.js | 43 + common/glm/doc/api/search/close.png | Bin 0 -> 273 bytes common/glm/doc/api/search/files_0.html | 30 + common/glm/doc/api/search/files_0.js | 4 + common/glm/doc/api/search/files_1.html | 30 + common/glm/doc/api/search/files_1.js | 5 + common/glm/doc/api/search/files_10.html | 30 + common/glm/doc/api/search/files_10.js | 12 + common/glm/doc/api/search/files_11.html | 30 + common/glm/doc/api/search/files_11.js | 23 + common/glm/doc/api/search/files_12.html | 30 + common/glm/doc/api/search/files_12.js | 4 + common/glm/doc/api/search/files_13.html | 30 + common/glm/doc/api/search/files_13.js | 52 + common/glm/doc/api/search/files_14.html | 30 + common/glm/doc/api/search/files_14.js | 4 + common/glm/doc/api/search/files_2.html | 30 + common/glm/doc/api/search/files_2.js | 10 + common/glm/doc/api/search/files_3.html | 30 + common/glm/doc/api/search/files_3.js | 4 + common/glm/doc/api/search/files_4.html | 30 + common/glm/doc/api/search/files_4.js | 14 + common/glm/doc/api/search/files_5.html | 30 + common/glm/doc/api/search/files_5.js | 7 + common/glm/doc/api/search/files_6.html | 30 + common/glm/doc/api/search/files_6.js | 14 + common/glm/doc/api/search/files_7.html | 30 + common/glm/doc/api/search/files_7.js | 5 + common/glm/doc/api/search/files_8.html | 30 + common/glm/doc/api/search/files_8.js | 6 + common/glm/doc/api/search/files_9.html | 30 + common/glm/doc/api/search/files_9.js | 4 + common/glm/doc/api/search/files_a.html | 30 + common/glm/doc/api/search/files_a.js | 63 + common/glm/doc/api/search/files_b.html | 30 + common/glm/doc/api/search/files_b.js | 8 + common/glm/doc/api/search/files_c.html | 30 + common/glm/doc/api/search/files_c.js | 5 + common/glm/doc/api/search/files_d.html | 30 + common/glm/doc/api/search/files_d.js | 7 + common/glm/doc/api/search/files_e.html | 30 + common/glm/doc/api/search/files_e.js | 13 + common/glm/doc/api/search/files_f.html | 30 + common/glm/doc/api/search/files_f.js | 10 + common/glm/doc/api/search/functions_0.html | 30 + common/glm/doc/api/search/functions_0.js | 30 + common/glm/doc/api/search/functions_1.html | 30 + common/glm/doc/api/search/functions_1.js | 20 + common/glm/doc/api/search/functions_10.html | 30 + common/glm/doc/api/search/functions_10.js | 30 + common/glm/doc/api/search/functions_11.html | 30 + common/glm/doc/api/search/functions_11.js | 20 + common/glm/doc/api/search/functions_12.html | 30 + common/glm/doc/api/search/functions_12.js | 52 + common/glm/doc/api/search/functions_13.html | 30 + common/glm/doc/api/search/functions_13.js | 4 + common/glm/doc/api/search/functions_14.html | 30 + common/glm/doc/api/search/functions_14.js | 4 + common/glm/doc/api/search/functions_15.html | 30 + common/glm/doc/api/search/functions_15.js | 7 + common/glm/doc/api/search/functions_16.html | 30 + common/glm/doc/api/search/functions_16.js | 4 + common/glm/doc/api/search/functions_2.html | 30 + common/glm/doc/api/search/functions_2.js | 42 + common/glm/doc/api/search/functions_3.html | 30 + common/glm/doc/api/search/functions_3.js | 24 + common/glm/doc/api/search/functions_4.html | 30 + common/glm/doc/api/search/functions_4.js | 55 + common/glm/doc/api/search/functions_5.html | 30 + common/glm/doc/api/search/functions_5.js | 51 + common/glm/doc/api/search/functions_6.html | 30 + common/glm/doc/api/search/functions_6.js | 9 + common/glm/doc/api/search/functions_7.html | 30 + common/glm/doc/api/search/functions_7.js | 7 + common/glm/doc/api/search/functions_8.html | 30 + common/glm/doc/api/search/functions_8.js | 31 + common/glm/doc/api/search/functions_9.html | 30 + common/glm/doc/api/search/functions_9.js | 27 + common/glm/doc/api/search/functions_a.html | 30 + common/glm/doc/api/search/functions_a.js | 36 + common/glm/doc/api/search/functions_b.html | 30 + common/glm/doc/api/search/functions_b.js | 9 + common/glm/doc/api/search/functions_c.html | 30 + common/glm/doc/api/search/functions_c.js | 24 + common/glm/doc/api/search/functions_d.html | 30 + common/glm/doc/api/search/functions_d.js | 82 + common/glm/doc/api/search/functions_e.html | 30 + common/glm/doc/api/search/functions_e.js | 19 + common/glm/doc/api/search/functions_f.html | 30 + common/glm/doc/api/search/functions_f.js | 35 + common/glm/doc/api/search/groups_0.html | 30 + common/glm/doc/api/search/groups_0.js | 4 + common/glm/doc/api/search/groups_1.html | 30 + common/glm/doc/api/search/groups_1.js | 5 + common/glm/doc/api/search/groups_2.html | 30 + common/glm/doc/api/search/groups_2.js | 5 + common/glm/doc/api/search/groups_3.html | 30 + common/glm/doc/api/search/groups_3.js | 4 + common/glm/doc/api/search/groups_4.html | 30 + common/glm/doc/api/search/groups_4.js | 118 + common/glm/doc/api/search/groups_5.html | 30 + common/glm/doc/api/search/groups_5.js | 4 + common/glm/doc/api/search/groups_6.html | 30 + common/glm/doc/api/search/groups_6.js | 6 + common/glm/doc/api/search/groups_7.html | 30 + common/glm/doc/api/search/groups_7.js | 4 + common/glm/doc/api/search/groups_8.html | 30 + common/glm/doc/api/search/groups_8.js | 4 + common/glm/doc/api/search/groups_9.html | 30 + common/glm/doc/api/search/groups_9.js | 6 + common/glm/doc/api/search/groups_a.html | 30 + common/glm/doc/api/search/groups_a.js | 4 + common/glm/doc/api/search/groups_b.html | 30 + common/glm/doc/api/search/groups_b.js | 4 + common/glm/doc/api/search/mag_sel.png | Bin 0 -> 563 bytes common/glm/doc/api/search/nomatches.html | 12 + common/glm/doc/api/search/pages_0.html | 30 + common/glm/doc/api/search/pages_0.js | 4 + common/glm/doc/api/search/search.css | 271 + common/glm/doc/api/search/search.js | 814 ++ common/glm/doc/api/search/search_l.png | Bin 0 -> 604 bytes common/glm/doc/api/search/search_m.png | Bin 0 -> 158 bytes common/glm/doc/api/search/search_r.png | Bin 0 -> 612 bytes common/glm/doc/api/search/searchdata.js | 30 + common/glm/doc/api/search/typedefs_0.html | 30 + common/glm/doc/api/search/typedefs_0.js | 179 + common/glm/doc/api/search/typedefs_1.html | 30 + common/glm/doc/api/search/typedefs_1.js | 22 + common/glm/doc/api/search/typedefs_2.html | 30 + common/glm/doc/api/search/typedefs_2.js | 37 + common/glm/doc/api/search/typedefs_3.html | 30 + common/glm/doc/api/search/typedefs_3.js | 78 + common/glm/doc/api/search/typedefs_4.html | 30 + common/glm/doc/api/search/typedefs_4.js | 188 + common/glm/doc/api/search/typedefs_5.html | 30 + common/glm/doc/api/search/typedefs_5.js | 61 + common/glm/doc/api/search/typedefs_6.html | 30 + common/glm/doc/api/search/typedefs_6.js | 188 + common/glm/doc/api/search/typedefs_7.html | 30 + common/glm/doc/api/search/typedefs_7.js | 200 + common/glm/doc/api/search/typedefs_8.html | 30 + common/glm/doc/api/search/typedefs_8.js | 179 + common/glm/doc/api/search/typedefs_9.html | 30 + common/glm/doc/api/search/typedefs_9.js | 5 + common/glm/doc/api/search/typedefs_a.html | 30 + common/glm/doc/api/search/typedefs_a.js | 12 + common/glm/doc/api/search/typedefs_b.html | 30 + common/glm/doc/api/search/typedefs_b.js | 47 + common/glm/doc/api/search/typedefs_c.html | 30 + common/glm/doc/api/search/typedefs_c.js | 7 + common/glm/doc/api/search/typedefs_d.html | 30 + common/glm/doc/api/search/typedefs_d.js | 4 + common/glm/doc/api/splitbar.png | Bin 0 -> 262 bytes common/glm/doc/api/sync_off.png | Bin 0 -> 717 bytes common/glm/doc/api/sync_on.png | Bin 0 -> 712 bytes common/glm/doc/api/tab_a.png | Bin 0 -> 217 bytes common/glm/doc/api/tab_b.png | Bin 0 -> 253 bytes common/glm/doc/api/tab_h.png | Bin 0 -> 255 bytes common/glm/doc/api/tab_s.png | Bin 0 -> 260 bytes common/glm/doc/api/tabs.css | 1 + common/glm/doc/man.doxy | 2415 +++++ common/glm/doc/manual.pdf | Bin 0 -> 1466032 bytes common/glm/doc/manual/frontpage1.png | Bin 0 -> 731902 bytes common/glm/doc/manual/frontpage2.png | Bin 0 -> 233177 bytes common/glm/doc/manual/g-truc.png | Bin 0 -> 13441 bytes common/glm/doc/manual/logo-mini.png | Bin 0 -> 11967 bytes common/glm/doc/manual/noise-perlin1.jpg | Bin 0 -> 8464 bytes common/glm/doc/manual/noise-perlin2.jpg | Bin 0 -> 7755 bytes common/glm/doc/manual/noise-perlin3.jpg | Bin 0 -> 7143 bytes common/glm/doc/manual/noise-perlin4.png | Bin 0 -> 1253 bytes common/glm/doc/manual/noise-perlin5.png | Bin 0 -> 1025 bytes common/glm/doc/manual/noise-perlin6.png | Bin 0 -> 1092 bytes common/glm/doc/manual/noise-simplex1.jpg | Bin 0 -> 10985 bytes common/glm/doc/manual/noise-simplex2.jpg | Bin 0 -> 9494 bytes common/glm/doc/manual/noise-simplex3.jpg | Bin 0 -> 9873 bytes common/glm/doc/manual/random-ballrand.png | Bin 0 -> 3431 bytes common/glm/doc/manual/random-circularrand.png | Bin 0 -> 503 bytes common/glm/doc/manual/random-diskrand.png | Bin 0 -> 3113 bytes common/glm/doc/manual/random-gaussrand.png | Bin 0 -> 3137 bytes common/glm/doc/manual/random-linearrand.png | Bin 0 -> 3108 bytes .../glm/doc/manual/random-sphericalrand.png | Bin 0 -> 3703 bytes common/glm/doc/manual/references-cinder.png | Bin 0 -> 77425 bytes .../glm/doc/manual/references-glsl4book.jpg | Bin 0 -> 9668 bytes .../doc/manual/references-leosfortune.jpeg | Bin 0 -> 13608 bytes .../doc/manual/references-leosfortune2.jpg | Bin 0 -> 13183 bytes .../glm/doc/manual/references-opencloth1.png | Bin 0 -> 12531 bytes .../glm/doc/manual/references-opencloth3.png | Bin 0 -> 21325 bytes common/glm/doc/manual/references-outerra1.jpg | Bin 0 -> 5355 bytes common/glm/doc/manual/references-outerra2.jpg | Bin 0 -> 4827 bytes common/glm/doc/manual/references-outerra3.jpg | Bin 0 -> 3906 bytes common/glm/doc/manual/references-outerra4.jpg | Bin 0 -> 5427 bytes common/glm/doc/theme/bc_s.png | Bin 0 -> 600 bytes common/glm/doc/theme/bdwn.png | Bin 0 -> 200 bytes common/glm/doc/theme/closed.png | Bin 0 -> 194 bytes common/glm/doc/theme/doc.png | Bin 0 -> 624 bytes common/glm/doc/theme/doxygen.css | 1496 +++ common/glm/doc/theme/doxygen.png | Bin 0 -> 2419 bytes common/glm/doc/theme/folderclosed.png | Bin 0 -> 573 bytes common/glm/doc/theme/folderopen.png | Bin 0 -> 596 bytes common/glm/doc/theme/logo-mini.png | Bin 0 -> 11967 bytes common/glm/doc/theme/nav_f.png | Bin 0 -> 233 bytes common/glm/doc/theme/nav_g.png | Bin 0 -> 95 bytes common/glm/doc/theme/nav_h.png | Bin 0 -> 188 bytes common/glm/doc/theme/open.png | Bin 0 -> 177 bytes common/glm/doc/theme/splitbar.png | Bin 0 -> 262 bytes common/glm/doc/theme/sync_off.png | Bin 0 -> 717 bytes common/glm/doc/theme/sync_on.png | Bin 0 -> 712 bytes common/glm/doc/theme/tab_a.png | Bin 0 -> 217 bytes common/glm/doc/theme/tab_b.png | Bin 0 -> 253 bytes common/glm/doc/theme/tab_h.png | Bin 0 -> 255 bytes common/glm/doc/theme/tab_s.png | Bin 0 -> 260 bytes common/glm/glm/CMakeLists.txt | 47 +- common/glm/glm/common.hpp | 529 +- common/glm/glm/detail/_features.hpp | 77 +- common/glm/glm/detail/_fixes.hpp | 3 - common/glm/glm/detail/_noise.hpp | 108 +- common/glm/glm/detail/_swizzle.hpp | 1227 +-- common/glm/glm/detail/_swizzle_func.hpp | 1294 ++- common/glm/glm/detail/_vectorize.hpp | 110 +- common/glm/glm/detail/compute_common.hpp | 50 + .../glm/detail/compute_vector_relational.hpp | 30 + common/glm/glm/detail/dummy.cpp | 207 - common/glm/glm/detail/func_common.hpp | 427 - common/glm/glm/detail/func_common.inl | 613 +- common/glm/glm/detail/func_common_simd.inl | 158 +- common/glm/glm/detail/func_exponential.hpp | 103 - common/glm/glm/detail/func_exponential.inl | 98 +- .../glm/glm/detail/func_exponential_simd.inl | 26 +- common/glm/glm/detail/func_geometric.hpp | 113 - common/glm/glm/detail/func_geometric.inl | 154 +- common/glm/glm/detail/func_geometric_simd.inl | 78 +- common/glm/glm/detail/func_integer.hpp | 203 - common/glm/glm/detail/func_integer.inl | 260 +- common/glm/glm/detail/func_integer_simd.inl | 33 +- common/glm/glm/detail/func_matrix.hpp | 149 - common/glm/glm/detail/func_matrix.inl | 395 +- common/glm/glm/detail/func_matrix_simd.inl | 100 +- common/glm/glm/detail/func_packing.hpp | 168 - common/glm/glm/detail/func_packing.inl | 51 +- common/glm/glm/detail/func_packing_simd.inl | 3 - common/glm/glm/detail/func_trigonometric.hpp | 176 - common/glm/glm/detail/func_trigonometric.inl | 111 +- .../glm/glm/detail/func_vector_relational.hpp | 111 - .../glm/glm/detail/func_vector_relational.inl | 88 +- .../detail/func_vector_relational_simd.inl | 3 - common/glm/glm/detail/glm.cpp | 368 +- common/glm/glm/detail/precision.hpp | 63 - common/glm/glm/detail/qualifier.hpp | 210 + common/glm/glm/detail/setup.hpp | 1175 ++- common/glm/glm/detail/type_float.hpp | 117 +- common/glm/glm/detail/type_gentype.hpp | 195 - common/glm/glm/detail/type_gentype.inl | 341 - common/glm/glm/detail/type_half.hpp | 5 +- common/glm/glm/detail/type_half.inl | 29 +- common/glm/glm/detail/type_int.hpp | 306 - common/glm/glm/detail/type_mat.hpp | 767 -- common/glm/glm/detail/type_mat.inl | 3 - common/glm/glm/detail/type_mat2x2.hpp | 234 +- common/glm/glm/detail/type_mat2x2.inl | 468 +- common/glm/glm/detail/type_mat2x3.hpp | 206 +- common/glm/glm/detail/type_mat2x3.inl | 414 +- common/glm/glm/detail/type_mat2x4.hpp | 210 +- common/glm/glm/detail/type_mat2x4.inl | 413 +- common/glm/glm/detail/type_mat3x2.hpp | 188 +- common/glm/glm/detail/type_mat3x2.inl | 458 +- common/glm/glm/detail/type_mat3x3.hpp | 216 +- common/glm/glm/detail/type_mat3x3.inl | 494 +- common/glm/glm/detail/type_mat3x4.hpp | 188 +- common/glm/glm/detail/type_mat3x4.inl | 474 +- common/glm/glm/detail/type_mat4x2.hpp | 202 +- common/glm/glm/detail/type_mat4x2.inl | 499 +- common/glm/glm/detail/type_mat4x3.hpp | 210 +- common/glm/glm/detail/type_mat4x3.inl | 512 +- common/glm/glm/detail/type_mat4x4.hpp | 238 +- common/glm/glm/detail/type_mat4x4.inl | 635 +- common/glm/glm/detail/type_mat4x4_simd.inl | 1 - common/glm/glm/detail/type_quat.hpp | 190 + common/glm/glm/detail/type_quat.inl | 379 + common/glm/glm/detail/type_quat_simd.inl | 188 + common/glm/glm/detail/type_vec.hpp | 576 - common/glm/glm/detail/type_vec.inl | 2 - common/glm/glm/detail/type_vec1.hpp | 372 +- common/glm/glm/detail/type_vec1.inl | 449 +- common/glm/glm/detail/type_vec2.hpp | 503 +- common/glm/glm/detail/type_vec2.inl | 695 +- common/glm/glm/detail/type_vec3.hpp | 535 +- common/glm/glm/detail/type_vec3.inl | 808 +- common/glm/glm/detail/type_vec4.hpp | 616 +- common/glm/glm/detail/type_vec4.inl | 1177 ++- common/glm/glm/detail/type_vec4_simd.inl | 432 +- common/glm/glm/exponential.hpp | 106 +- common/glm/glm/ext.hpp | 136 +- common/glm/glm/ext/matrix_clip_space.hpp | 522 + common/glm/glm/ext/matrix_clip_space.inl | 534 + common/glm/glm/ext/matrix_double2x2.hpp | 23 + .../glm/ext/matrix_double2x2_precision.hpp | 49 + common/glm/glm/ext/matrix_double2x3.hpp | 18 + .../glm/ext/matrix_double2x3_precision.hpp | 31 + common/glm/glm/ext/matrix_double2x4.hpp | 18 + .../glm/ext/matrix_double2x4_precision.hpp | 31 + common/glm/glm/ext/matrix_double3x2.hpp | 18 + .../glm/ext/matrix_double3x2_precision.hpp | 31 + common/glm/glm/ext/matrix_double3x3.hpp | 23 + .../glm/ext/matrix_double3x3_precision.hpp | 49 + common/glm/glm/ext/matrix_double3x4.hpp | 18 + .../glm/ext/matrix_double3x4_precision.hpp | 31 + common/glm/glm/ext/matrix_double4x2.hpp | 18 + .../glm/ext/matrix_double4x2_precision.hpp | 31 + common/glm/glm/ext/matrix_double4x3.hpp | 18 + .../glm/ext/matrix_double4x3_precision.hpp | 31 + common/glm/glm/ext/matrix_double4x4.hpp | 23 + .../glm/ext/matrix_double4x4_precision.hpp | 49 + common/glm/glm/ext/matrix_float2x2.hpp | 23 + .../glm/glm/ext/matrix_float2x2_precision.hpp | 49 + common/glm/glm/ext/matrix_float2x3.hpp | 18 + .../glm/glm/ext/matrix_float2x3_precision.hpp | 31 + common/glm/glm/ext/matrix_float2x4.hpp | 18 + .../glm/glm/ext/matrix_float2x4_precision.hpp | 31 + common/glm/glm/ext/matrix_float3x2.hpp | 18 + .../glm/glm/ext/matrix_float3x2_precision.hpp | 31 + common/glm/glm/ext/matrix_float3x3.hpp | 23 + .../glm/glm/ext/matrix_float3x3_precision.hpp | 49 + common/glm/glm/ext/matrix_float3x4.hpp | 18 + .../glm/glm/ext/matrix_float3x4_precision.hpp | 31 + common/glm/glm/ext/matrix_float4x2.hpp | 18 + .../glm/glm/ext/matrix_float4x2_precision.hpp | 31 + common/glm/glm/ext/matrix_float4x3.hpp | 18 + .../glm/glm/ext/matrix_float4x3_precision.hpp | 31 + common/glm/glm/ext/matrix_float4x4.hpp | 23 + .../glm/glm/ext/matrix_float4x4_precision.hpp | 49 + common/glm/glm/ext/matrix_projection.hpp | 149 + common/glm/glm/ext/matrix_projection.inl | 104 + common/glm/glm/ext/matrix_relational.hpp | 132 + common/glm/glm/ext/matrix_relational.inl | 82 + common/glm/glm/ext/matrix_transform.hpp | 144 + common/glm/glm/ext/matrix_transform.inl | 152 + common/glm/glm/ext/quaternion_common.hpp | 120 + common/glm/glm/ext/quaternion_common.inl | 107 + common/glm/glm/ext/quaternion_common_simd.inl | 18 + common/glm/glm/ext/quaternion_double.hpp | 39 + .../glm/ext/quaternion_double_precision.hpp | 42 + common/glm/glm/ext/quaternion_exponential.hpp | 63 + common/glm/glm/ext/quaternion_exponential.inl | 69 + common/glm/glm/ext/quaternion_float.hpp | 39 + .../glm/ext/quaternion_float_precision.hpp | 36 + common/glm/glm/ext/quaternion_geometric.hpp | 70 + common/glm/glm/ext/quaternion_geometric.inl | 36 + common/glm/glm/ext/quaternion_relational.hpp | 62 + common/glm/glm/ext/quaternion_relational.inl | 35 + common/glm/glm/ext/quaternion_transform.hpp | 47 + common/glm/glm/ext/quaternion_transform.inl | 24 + .../glm/glm/ext/quaternion_trigonometric.hpp | 63 + .../glm/glm/ext/quaternion_trigonometric.inl | 27 + common/glm/glm/ext/scalar_common.hpp | 103 + common/glm/glm/ext/scalar_common.inl | 115 + common/glm/glm/ext/scalar_constants.hpp | 36 + common/glm/glm/ext/scalar_constants.inl | 18 + common/glm/glm/ext/scalar_int_sized.hpp | 70 + common/glm/glm/ext/scalar_relational.hpp | 65 + common/glm/glm/ext/scalar_relational.inl | 43 + common/glm/glm/ext/scalar_uint_sized.hpp | 70 + common/glm/glm/ext/scalar_ulp.hpp | 74 + common/glm/glm/ext/scalar_ulp.inl | 284 + common/glm/glm/ext/vector_bool1.hpp | 30 + common/glm/glm/ext/vector_bool1_precision.hpp | 34 + common/glm/glm/ext/vector_bool2.hpp | 18 + common/glm/glm/ext/vector_bool2_precision.hpp | 31 + common/glm/glm/ext/vector_bool3.hpp | 18 + common/glm/glm/ext/vector_bool3_precision.hpp | 31 + common/glm/glm/ext/vector_bool4.hpp | 18 + common/glm/glm/ext/vector_bool4_precision.hpp | 31 + common/glm/glm/ext/vector_common.hpp | 144 + common/glm/glm/ext/vector_common.inl | 88 + common/glm/glm/ext/vector_double1.hpp | 31 + .../glm/glm/ext/vector_double1_precision.hpp | 36 + common/glm/glm/ext/vector_double2.hpp | 18 + .../glm/glm/ext/vector_double2_precision.hpp | 31 + common/glm/glm/ext/vector_double3.hpp | 18 + .../glm/glm/ext/vector_double3_precision.hpp | 34 + common/glm/glm/ext/vector_double4.hpp | 18 + .../glm/glm/ext/vector_double4_precision.hpp | 35 + common/glm/glm/ext/vector_float1.hpp | 31 + .../glm/glm/ext/vector_float1_precision.hpp | 36 + common/glm/glm/ext/vector_float2.hpp | 18 + .../glm/glm/ext/vector_float2_precision.hpp | 31 + common/glm/glm/ext/vector_float3.hpp | 18 + .../glm/glm/ext/vector_float3_precision.hpp | 31 + common/glm/glm/ext/vector_float4.hpp | 18 + .../glm/glm/ext/vector_float4_precision.hpp | 31 + common/glm/glm/ext/vector_int1.hpp | 32 + common/glm/glm/ext/vector_int1_precision.hpp | 34 + common/glm/glm/ext/vector_int2.hpp | 18 + common/glm/glm/ext/vector_int2_precision.hpp | 31 + common/glm/glm/ext/vector_int3.hpp | 18 + common/glm/glm/ext/vector_int3_precision.hpp | 31 + common/glm/glm/ext/vector_int4.hpp | 18 + common/glm/glm/ext/vector_int4_precision.hpp | 31 + common/glm/glm/ext/vector_relational.hpp | 104 + common/glm/glm/ext/vector_relational.inl | 75 + common/glm/glm/ext/vector_uint1.hpp | 32 + common/glm/glm/ext/vector_uint1_precision.hpp | 40 + common/glm/glm/ext/vector_uint2.hpp | 18 + common/glm/glm/ext/vector_uint2_precision.hpp | 31 + common/glm/glm/ext/vector_uint3.hpp | 18 + common/glm/glm/ext/vector_uint3_precision.hpp | 31 + common/glm/glm/ext/vector_uint4.hpp | 18 + common/glm/glm/ext/vector_uint4_precision.hpp | 31 + common/glm/glm/ext/vector_ulp.hpp | 109 + common/glm/glm/ext/vector_ulp.inl | 74 + common/glm/glm/fwd.hpp | 3350 ++---- common/glm/glm/geometric.hpp | 112 +- common/glm/glm/glm.hpp | 104 +- common/glm/glm/gtc/bitfield.hpp | 153 +- common/glm/glm/gtc/bitfield.inl | 359 +- common/glm/glm/gtc/color_encoding.inl | 65 - common/glm/glm/gtc/color_space.hpp | 32 +- common/glm/glm/gtc/color_space.inl | 71 +- common/glm/glm/gtc/constants.hpp | 77 +- common/glm/glm/gtc/constants.inl | 71 +- common/glm/glm/gtc/epsilon.hpp | 43 +- common/glm/glm/gtc/epsilon.inl | 121 +- common/glm/glm/gtc/functions.hpp | 53 - common/glm/glm/gtc/integer.hpp | 77 +- common/glm/glm/gtc/integer.inl | 47 +- common/glm/glm/gtc/matrix_access.hpp | 27 +- common/glm/glm/gtc/matrix_access.inl | 23 +- common/glm/glm/gtc/matrix_integer.hpp | 299 +- common/glm/glm/gtc/matrix_inverse.hpp | 21 +- common/glm/glm/gtc/matrix_inverse.inl | 49 +- common/glm/glm/gtc/matrix_transform.hpp | 447 +- common/glm/glm/gtc/matrix_transform.inl | 572 - common/glm/glm/gtc/noise.hpp | 31 +- common/glm/glm/gtc/noise.inl | 873 +- common/glm/glm/gtc/packing.hpp | 553 +- common/glm/glm/gtc/packing.inl | 343 +- common/glm/glm/gtc/quaternion.hpp | 424 +- common/glm/glm/gtc/quaternion.inl | 745 +- common/glm/glm/gtc/quaternion_simd.inl | 198 - common/glm/glm/gtc/random.hpp | 98 +- common/glm/glm/gtc/random.inl | 321 +- common/glm/glm/gtc/reciprocal.hpp | 86 +- common/glm/glm/gtc/reciprocal.inl | 101 +- common/glm/glm/gtc/round.hpp | 150 +- common/glm/glm/gtc/round.inl | 159 +- common/glm/glm/gtc/type_aligned.hpp | 1309 ++- common/glm/glm/gtc/type_precision.hpp | 2005 +++- common/glm/glm/gtc/type_precision.inl | 3 +- common/glm/glm/gtc/type_ptr.hpp | 139 +- common/glm/glm/gtc/type_ptr.inl | 574 +- common/glm/glm/gtc/ulp.hpp | 53 +- common/glm/glm/gtc/ulp.inl | 318 - common/glm/glm/gtc/vec1.hpp | 164 +- common/glm/glm/gtc/vec1.inl | 2 - common/glm/glm/gtx/associated_min_max.hpp | 173 +- common/glm/glm/gtx/associated_min_max.inl | 195 +- common/glm/glm/gtx/bit.hpp | 41 +- common/glm/glm/gtx/bit.inl | 41 +- common/glm/glm/gtx/closest_point.hpp | 36 +- common/glm/glm/gtx/closest_point.inl | 33 +- common/glm/glm/gtx/color_encoding.hpp | 50 + common/glm/glm/gtx/color_encoding.inl | 45 + common/glm/glm/gtx/color_space.hpp | 48 +- common/glm/glm/gtx/color_space.inl | 62 +- common/glm/glm/gtx/color_space_YCoCg.hpp | 34 +- common/glm/glm/gtx/color_space_YCoCg.inl | 71 +- common/glm/glm/gtx/common.hpp | 43 +- common/glm/glm/gtx/common.inl | 81 +- common/glm/glm/gtx/compatibility.hpp | 155 +- common/glm/glm/gtx/compatibility.inl | 41 +- common/glm/glm/gtx/component_wise.hpp | 46 +- common/glm/glm/gtx/component_wise.inl | 79 +- common/glm/glm/gtx/dual_quaternion.hpp | 166 +- common/glm/glm/gtx/dual_quaternion.inl | 249 +- common/glm/glm/gtx/easing.hpp | 219 + common/glm/glm/gtx/easing.inl | 436 + common/glm/glm/gtx/euler_angles.hpp | 324 +- common/glm/glm/gtx/euler_angles.inl | 751 +- common/glm/glm/gtx/extend.hpp | 16 +- common/glm/glm/gtx/extend.inl | 39 +- common/glm/glm/gtx/extended_min_max.hpp | 209 +- common/glm/glm/gtx/extended_min_max.inl | 188 +- common/glm/glm/gtx/exterior_product.hpp | 41 + common/glm/glm/gtx/exterior_product.inl | 26 + common/glm/glm/gtx/fast_exponential.hpp | 46 +- common/glm/glm/gtx/fast_exponential.inl | 47 +- common/glm/glm/gtx/fast_square_root.hpp | 42 +- common/glm/glm/gtx/fast_square_root.inl | 39 +- common/glm/glm/gtx/fast_trigonometry.hpp | 52 +- common/glm/glm/gtx/fast_trigonometry.inl | 85 +- common/glm/glm/gtx/float_notmalize.inl | 7 +- common/glm/glm/gtx/functions.hpp | 52 + common/glm/glm/{gtc => gtx}/functions.inl | 17 +- common/glm/glm/gtx/gradient_paint.hpp | 29 +- common/glm/glm/gtx/gradient_paint.inl | 25 +- .../glm/glm/gtx/handed_coordinate_space.hpp | 26 +- .../glm/glm/gtx/handed_coordinate_space.inl | 17 +- common/glm/glm/gtx/hash.hpp | 108 +- common/glm/glm/gtx/hash.inl | 83 +- common/glm/glm/gtx/integer.hpp | 22 +- common/glm/glm/gtx/integer.inl | 45 +- common/glm/glm/gtx/intersect.hpp | 53 +- common/glm/glm/gtx/intersect.inl | 129 +- common/glm/glm/gtx/io.hpp | 98 +- common/glm/glm/gtx/io.inl | 125 +- common/glm/glm/gtx/log_base.hpp | 24 +- common/glm/glm/gtx/log_base.inl | 10 +- common/glm/glm/gtx/matrix_cross_product.hpp | 24 +- common/glm/glm/gtx/matrix_cross_product.inl | 17 +- common/glm/glm/gtx/matrix_decompose.hpp | 18 +- common/glm/glm/gtx/matrix_decompose.inl | 114 +- common/glm/glm/gtx/matrix_factorisation.hpp | 69 + common/glm/glm/gtx/matrix_factorisation.inl | 84 + common/glm/glm/gtx/matrix_interpolation.hpp | 37 +- common/glm/glm/gtx/matrix_interpolation.inl | 151 +- common/glm/glm/gtx/matrix_major_storage.hpp | 116 +- common/glm/glm/gtx/matrix_major_storage.inl | 121 +- common/glm/glm/gtx/matrix_operation.hpp | 79 +- common/glm/glm/gtx/matrix_operation.inl | 138 +- common/glm/glm/gtx/matrix_query.hpp | 48 +- common/glm/glm/gtx/matrix_query.inl | 43 +- common/glm/glm/gtx/matrix_transform_2d.hpp | 57 +- common/glm/glm/gtx/matrix_transform_2d.inl | 47 +- common/glm/glm/gtx/mixed_product.hpp | 18 +- common/glm/glm/gtx/mixed_product.inl | 9 +- common/glm/glm/gtx/norm.hpp | 68 +- common/glm/glm/gtx/norm.inl | 67 +- common/glm/glm/gtx/normal.hpp | 22 +- common/glm/glm/gtx/normal.inl | 11 +- common/glm/glm/gtx/normalize_dot.hpp | 18 +- common/glm/glm/gtx/normalize_dot.inl | 9 +- common/glm/glm/gtx/number_precision.hpp | 28 +- common/glm/glm/gtx/number_precision.inl | 1 - common/glm/glm/gtx/optimum_pow.hpp | 22 +- common/glm/glm/gtx/optimum_pow.inl | 13 +- common/glm/glm/gtx/orthonormalize.hpp | 20 +- common/glm/glm/gtx/orthonormalize.inl | 11 +- common/glm/glm/gtx/perpendicular.hpp | 16 +- common/glm/glm/gtx/perpendicular.inl | 9 +- common/glm/glm/gtx/polar_coordinates.hpp | 22 +- common/glm/glm/gtx/polar_coordinates.inl | 19 +- common/glm/glm/gtx/projection.hpp | 14 +- common/glm/glm/gtx/projection.inl | 5 +- common/glm/glm/gtx/quaternion.hpp | 165 +- common/glm/glm/gtx/quaternion.inl | 151 +- common/glm/glm/gtx/range.hpp | 61 +- common/glm/glm/gtx/raw_data.hpp | 20 +- common/glm/glm/gtx/raw_data.inl | 2 +- common/glm/glm/gtx/rotate_normalized_axis.hpp | 52 +- common/glm/glm/gtx/rotate_normalized_axis.inl | 35 +- common/glm/glm/gtx/rotate_vector.hpp | 134 +- common/glm/glm/gtx/rotate_vector.inl | 125 +- common/glm/glm/gtx/scalar_multiplication.hpp | 22 +- common/glm/glm/gtx/scalar_relational.hpp | 10 +- common/glm/glm/gtx/scalar_relational.inl | 47 +- common/glm/glm/gtx/simd_mat4.hpp | 182 - common/glm/glm/gtx/simd_mat4.inl | 577 - common/glm/glm/gtx/simd_quat.hpp | 307 - common/glm/glm/gtx/simd_quat.inl | 620 -- common/glm/glm/gtx/simd_vec4.hpp | 546 - common/glm/glm/gtx/simd_vec4.inl | 721 -- common/glm/glm/gtx/spline.hpp | 52 +- common/glm/glm/gtx/spline.inl | 39 +- common/glm/glm/gtx/std_based_type.hpp | 27 +- common/glm/glm/gtx/std_based_type.inl | 1 - common/glm/glm/gtx/string_cast.hpp | 17 +- common/glm/glm/gtx/string_cast.inl | 292 +- common/glm/glm/gtx/texture.hpp | 46 + common/glm/glm/gtx/texture.inl | 17 + common/glm/glm/gtx/transform.hpp | 32 +- common/glm/glm/gtx/transform.inl | 19 +- common/glm/glm/gtx/transform2.hpp | 84 +- common/glm/glm/gtx/transform2.inl | 75 +- common/glm/glm/gtx/type_aligned.hpp | 500 +- common/glm/glm/gtx/type_aligned.inl | 1 - common/glm/glm/gtx/type_trait.hpp | 213 +- common/glm/glm/gtx/type_trait.inl | 61 + common/glm/glm/gtx/vec_swizzle.hpp | 2778 +++++ common/glm/glm/gtx/vector_angle.hpp | 29 +- common/glm/glm/gtx/vector_angle.inl | 32 +- common/glm/glm/gtx/vector_query.hpp | 38 +- common/glm/glm/gtx/vector_query.inl | 135 +- common/glm/glm/gtx/wrap.hpp | 18 +- common/glm/glm/gtx/wrap.inl | 53 +- common/glm/glm/integer.hpp | 208 +- common/glm/glm/mat2x2.hpp | 51 +- common/glm/glm/mat2x3.hpp | 31 +- common/glm/glm/mat2x4.hpp | 30 +- common/glm/glm/mat3x2.hpp | 30 +- common/glm/glm/mat3x3.hpp | 52 +- common/glm/glm/mat3x4.hpp | 31 +- common/glm/glm/mat4x2.hpp | 30 +- common/glm/glm/mat4x3.hpp | 31 +- common/glm/glm/mat4x4.hpp | 51 +- common/glm/glm/matrix.hpp | 157 +- common/glm/glm/packing.hpp | 169 +- common/glm/glm/simd/common.h | 38 +- common/glm/glm/simd/exponential.h | 4 +- common/glm/glm/simd/geometric.h | 2 +- common/glm/glm/simd/integer.h | 4 +- common/glm/glm/simd/matrix.h | 24 +- common/glm/glm/simd/platform.h | 314 +- common/glm/glm/trigonometric.hpp | 206 +- common/glm/glm/vec2.hpp | 12 +- common/glm/glm/vec3.hpp | 12 +- common/glm/glm/vec4.hpp | 11 +- common/glm/glm/vector_relational.hpp | 117 +- common/glm/manual.md | 2400 +++++ common/glm/readme.md | 658 +- common/glm/test/CMakeLists.txt | 19 + common/glm/test/bug/CMakeLists.txt | 1 + common/glm/test/bug/bug_ms_vec_static.cpp | 31 + common/glm/test/core/CMakeLists.txt | 45 + common/glm/test/core/core_cpp_constexpr.cpp | 750 ++ .../glm/test/core/core_cpp_defaulted_ctor.cpp | 145 + .../test/core/core_force_aligned_gentypes.cpp | 10 + common/glm/test/core/core_force_ctor_init.cpp | 139 + .../test/core/core_force_explicit_ctor.cpp | 17 + common/glm/test/core/core_force_inline.cpp | 12 + common/glm/test/core/core_force_pure.cpp | 434 + .../core/core_force_unrestricted_gentype.cpp | 12 + common/glm/test/core/core_force_xyzw_only.cpp | 58 + common/glm/test/core/core_func_common.cpp | 1344 +++ .../glm/test/core/core_func_exponential.cpp | 185 + common/glm/test/core/core_func_geometric.cpp | 200 + common/glm/test/core/core_func_integer.cpp | 1556 +++ .../test/core/core_func_integer_bit_count.cpp | 291 + .../test/core/core_func_integer_find_lsb.cpp | 406 + .../test/core/core_func_integer_find_msb.cpp | 440 + common/glm/test/core/core_func_matrix.cpp | 329 + common/glm/test/core/core_func_noise.cpp | 7 + common/glm/test/core/core_func_packing.cpp | 156 + common/glm/test/core/core_func_swizzle.cpp | 164 + .../glm/test/core/core_func_trigonometric.cpp | 10 + .../test/core/core_func_vector_relational.cpp | 180 + .../glm/test/core/core_setup_force_cxx98.cpp | 12 + .../core/core_setup_force_size_t_length.cpp | 22 + common/glm/test/core/core_setup_message.cpp | 221 + .../test/core/core_setup_platform_unknown.cpp | 21 + common/glm/test/core/core_setup_precision.cpp | 58 + common/glm/test/core/core_type_aligned.cpp | 92 + common/glm/test/core/core_type_cast.cpp | 146 + common/glm/test/core/core_type_ctor.cpp | 351 + common/glm/test/core/core_type_int.cpp | 26 + common/glm/test/core/core_type_length.cpp | 79 + common/glm/test/core/core_type_mat2x2.cpp | 177 + common/glm/test/core/core_type_mat2x3.cpp | 142 + common/glm/test/core/core_type_mat2x4.cpp | 147 + common/glm/test/core/core_type_mat3x2.cpp | 148 + common/glm/test/core/core_type_mat3x3.cpp | 197 + common/glm/test/core/core_type_mat3x4.cpp | 149 + common/glm/test/core/core_type_mat4x2.cpp | 151 + common/glm/test/core/core_type_mat4x3.cpp | 152 + common/glm/test/core/core_type_mat4x4.cpp | 218 + common/glm/test/core/core_type_vec1.cpp | 169 + common/glm/test/core/core_type_vec2.cpp | 392 + common/glm/test/core/core_type_vec3.cpp | 628 ++ common/glm/test/core/core_type_vec4.cpp | 850 ++ common/glm/test/ext/CMakeLists.txt | 23 + common/glm/test/ext/ext_matrix_clip_space.cpp | 13 + common/glm/test/ext/ext_matrix_projection.cpp | 13 + common/glm/test/ext/ext_matrix_relational.cpp | 163 + common/glm/test/ext/ext_matrix_transform.cpp | 61 + common/glm/test/ext/ext_quaternion_common.cpp | 61 + .../test/ext/ext_quaternion_exponential.cpp | 87 + .../glm/test/ext/ext_quaternion_geometric.cpp | 88 + .../test/ext/ext_quaternion_relational.cpp | 51 + .../glm/test/ext/ext_quaternion_transform.cpp | 45 + .../test/ext/ext_quaternion_trigonometric.cpp | 34 + common/glm/test/ext/ext_quaternion_type.cpp | 113 + common/glm/test/ext/ext_scalar_common.cpp | 207 + common/glm/test/ext/ext_scalar_constants.cpp | 36 + common/glm/test/ext/ext_scalar_int_sized.cpp | 43 + common/glm/test/ext/ext_scalar_relational.cpp | 84 + common/glm/test/ext/ext_scalar_uint_sized.cpp | 43 + common/glm/test/ext/ext_scalar_ulp.cpp | 96 + common/glm/test/ext/ext_vec1.cpp | 157 + common/glm/test/ext/ext_vector_bool1.cpp | 104 + common/glm/test/ext/ext_vector_common.cpp | 250 + common/glm/test/ext/ext_vector_iec559.cpp | 166 + common/glm/test/ext/ext_vector_integer.cpp | 212 + common/glm/test/ext/ext_vector_relational.cpp | 205 + common/glm/test/ext/ext_vector_ulp.cpp | 99 + common/glm/test/glm.cppcheck | 6 + common/glm/test/gtc/CMakeLists.txt | 20 + common/glm/test/gtc/gtc_bitfield.cpp | 917 ++ common/glm/test/gtc/gtc_color_space.cpp | 68 + common/glm/test/gtc/gtc_constants.cpp | 30 + common/glm/test/gtc/gtc_epsilon.cpp | 78 + common/glm/test/gtc/gtc_integer.cpp | 233 + common/glm/test/gtc/gtc_matrix_access.cpp | 383 + common/glm/test/gtc/gtc_matrix_integer.cpp | 8 + common/glm/test/gtc/gtc_matrix_inverse.cpp | 51 + common/glm/test/gtc/gtc_matrix_transform.cpp | 54 + common/glm/test/gtc/gtc_noise.cpp | 86 + common/glm/test/gtc/gtc_packing.cpp | 878 ++ common/glm/test/gtc/gtc_quaternion.cpp | 266 + common/glm/test/gtc/gtc_random.cpp | 381 + common/glm/test/gtc/gtc_reciprocal.cpp | 8 + common/glm/test/gtc/gtc_round.cpp | 458 + common/glm/test/gtc/gtc_type_aligned.cpp | 181 + common/glm/test/gtc/gtc_type_precision.cpp | 903 ++ common/glm/test/gtc/gtc_type_ptr.cpp | 335 + common/glm/test/gtc/gtc_ulp.cpp | 99 + .../glm/test/gtc/gtc_user_defined_types.cpp | 30 + common/glm/test/gtc/gtc_vec1.cpp | 8 + common/glm/test/gtx/CMakeLists.txt | 58 + common/glm/test/gtx/gtx.cpp | 8 + .../glm/test/gtx/gtx_associated_min_max.cpp | 10 + common/glm/test/gtx/gtx_closest_point.cpp | 9 + common/glm/test/gtx/gtx_color_encoding.cpp | 51 + common/glm/test/gtx/gtx_color_space.cpp | 20 + common/glm/test/gtx/gtx_color_space_YCoCg.cpp | 9 + common/glm/test/gtx/gtx_common.cpp | 161 + common/glm/test/gtx/gtx_compatibility.cpp | 19 + common/glm/test/gtx/gtx_component_wise.cpp | 116 + common/glm/test/gtx/gtx_dual_quaternion.cpp | 205 + common/glm/test/gtx/gtx_easing.cpp | 65 + common/glm/test/gtx/gtx_euler_angle.cpp | 539 + common/glm/test/gtx/gtx_extend.cpp | 9 + common/glm/test/gtx/gtx_extended_min_max.cpp | 101 + common/glm/test/gtx/gtx_extented_min_max.cpp | 39 + common/glm/test/gtx/gtx_exterior_product.cpp | 14 + common/glm/test/gtx/gtx_fast_exponential.cpp | 9 + common/glm/test/gtx/gtx_fast_square_root.cpp | 45 + common/glm/test/gtx/gtx_fast_trigonometry.cpp | 563 + common/glm/test/gtx/gtx_functions.cpp | 36 + common/glm/test/gtx/gtx_gradient_paint.cpp | 34 + .../test/gtx/gtx_handed_coordinate_space.cpp | 9 + common/glm/test/gtx/gtx_int_10_10_10_2.cpp | 18 + common/glm/test/gtx/gtx_integer.cpp | 108 + common/glm/test/gtx/gtx_intersect.cpp | 54 + common/glm/test/gtx/gtx_io.cpp | 186 + common/glm/test/gtx/gtx_load.cpp | 124 + common/glm/test/gtx/gtx_log_base.cpp | 54 + .../glm/test/gtx/gtx_matrix_cross_product.cpp | 9 + common/glm/test/gtx/gtx_matrix_decompose.cpp | 19 + .../glm/test/gtx/gtx_matrix_factorisation.cpp | 105 + .../glm/test/gtx/gtx_matrix_interpolation.cpp | 59 + .../glm/test/gtx/gtx_matrix_major_storage.cpp | 9 + common/glm/test/gtx/gtx_matrix_operation.cpp | 9 + common/glm/test/gtx/gtx_matrix_query.cpp | 66 + .../glm/test/gtx/gtx_matrix_transform_2d.cpp | 9 + common/glm/test/gtx/gtx_mixed_product.cpp | 18 + common/glm/test/gtx/gtx_norm.cpp | 9 + common/glm/test/gtx/gtx_normal.cpp | 9 + common/glm/test/gtx/gtx_normalize_dot.cpp | 9 + common/glm/test/gtx/gtx_number_precision.cpp | 9 + common/glm/test/gtx/gtx_optimum_pow.cpp | 9 + common/glm/test/gtx/gtx_orthonormalize.cpp | 9 + common/glm/test/gtx/gtx_perpendicular.cpp | 9 + common/glm/test/gtx/gtx_polar_coordinates.cpp | 9 + common/glm/test/gtx/gtx_projection.cpp | 9 + common/glm/test/gtx/gtx_quaternion.cpp | 107 + common/glm/test/gtx/gtx_random.cpp | 99 + common/glm/test/gtx/gtx_range.cpp | 83 + .../test/gtx/gtx_rotate_normalized_axis.cpp | 9 + common/glm/test/gtx/gtx_rotate_vector.cpp | 77 + .../test/gtx/gtx_scalar_multiplication.cpp | 37 + common/glm/test/gtx/gtx_scalar_relational.cpp | 174 + common/glm/test/gtx/gtx_simd_mat4.cpp | 324 + common/glm/test/gtx/gtx_simd_vec4.cpp | 71 + common/glm/test/gtx/gtx_spline.cpp | 100 + common/glm/test/gtx/gtx_string_cast.cpp | 154 + common/glm/test/gtx/gtx_texture.cpp | 22 + common/glm/test/gtx/gtx_type_aligned.cpp | 114 + common/glm/test/gtx/gtx_type_trait.cpp | 13 + common/glm/test/gtx/gtx_vec_swizzle.cpp | 11 + common/glm/test/gtx/gtx_vector_angle.cpp | 59 + common/glm/test/gtx/gtx_vector_query.cpp | 82 + common/glm/test/gtx/gtx_wrap.cpp | 190 + common/glm/test/perf/CMakeLists.txt | 6 + common/glm/test/perf/perf_matrix_div.cpp | 153 + common/glm/test/perf/perf_matrix_inverse.cpp | 150 + common/glm/test/perf/perf_matrix_mul.cpp | 154 + .../glm/test/perf/perf_matrix_mul_vector.cpp | 154 + .../glm/test/perf/perf_matrix_transpose.cpp | 150 + .../glm/test/perf/perf_vector_mul_matrix.cpp | 154 + common/glm/util/autoexp.txt | 28 + common/glm/util/autoexp.vc2010.dat | 3896 +++++++ common/glm/util/glm.natvis | 69 + common/glm/util/usertype.dat | 407 + 1530 files changed, 210837 insertions(+), 28547 deletions(-) create mode 100644 common/glm/.appveyor.yml create mode 100644 common/glm/.gitignore create mode 100644 common/glm/.travis.yml create mode 100644 common/glm/CMakeLists.txt create mode 100644 common/glm/cmake/glm.pc.in create mode 100644 common/glm/cmake/glmBuildConfig.cmake.in create mode 100644 common/glm/cmake/glmConfig.cmake.in create mode 100644 common/glm/cmake_uninstall.cmake.in delete mode 100644 common/glm/copying.txt create mode 100644 common/glm/doc/api/a00002.html create mode 100644 common/glm/doc/api/a00002_source.html create mode 100644 common/glm/doc/api/a00005_source.html create mode 100644 common/glm/doc/api/a00008_source.html create mode 100644 common/glm/doc/api/a00011_source.html create mode 100644 common/glm/doc/api/a00014_source.html create mode 100644 common/glm/doc/api/a00017_source.html create mode 100644 common/glm/doc/api/a00020_source.html create mode 100644 common/glm/doc/api/a00023_source.html create mode 100644 common/glm/doc/api/a00026_source.html create mode 100644 common/glm/doc/api/a00029_source.html create mode 100644 common/glm/doc/api/a00032_source.html create mode 100644 common/glm/doc/api/a00035_source.html create mode 100644 common/glm/doc/api/a00038.html create mode 100644 common/glm/doc/api/a00038_source.html create mode 100644 common/glm/doc/api/a00041.html create mode 100644 common/glm/doc/api/a00041_source.html create mode 100644 common/glm/doc/api/a00044.html create mode 100644 common/glm/doc/api/a00044_source.html create mode 100644 common/glm/doc/api/a00047.html create mode 100644 common/glm/doc/api/a00047_source.html create mode 100644 common/glm/doc/api/a00050.html create mode 100644 common/glm/doc/api/a00050_source.html create mode 100644 common/glm/doc/api/a00053.html create mode 100644 common/glm/doc/api/a00053_source.html create mode 100644 common/glm/doc/api/a00056.html create mode 100644 common/glm/doc/api/a00056_source.html create mode 100644 common/glm/doc/api/a00059.html create mode 100644 common/glm/doc/api/a00059_source.html create mode 100644 common/glm/doc/api/a00062.html create mode 100644 common/glm/doc/api/a00062_source.html create mode 100644 common/glm/doc/api/a00065_source.html create mode 100644 common/glm/doc/api/a00068.html create mode 100644 common/glm/doc/api/a00068_source.html create mode 100644 common/glm/doc/api/a00071.html create mode 100644 common/glm/doc/api/a00071_source.html create mode 100644 common/glm/doc/api/a00074.html create mode 100644 common/glm/doc/api/a00074_source.html create mode 100644 common/glm/doc/api/a00077.html create mode 100644 common/glm/doc/api/a00077_source.html create mode 100644 common/glm/doc/api/a00080.html create mode 100644 common/glm/doc/api/a00080_source.html create mode 100644 common/glm/doc/api/a00083.html create mode 100644 common/glm/doc/api/a00083_source.html create mode 100644 common/glm/doc/api/a00086.html create mode 100644 common/glm/doc/api/a00086_source.html create mode 100644 common/glm/doc/api/a00089.html create mode 100644 common/glm/doc/api/a00089_source.html create mode 100644 common/glm/doc/api/a00092.html create mode 100644 common/glm/doc/api/a00092_source.html create mode 100644 common/glm/doc/api/a00095.html create mode 100644 common/glm/doc/api/a00095_source.html create mode 100644 common/glm/doc/api/a00098.html create mode 100644 common/glm/doc/api/a00098_source.html create mode 100644 common/glm/doc/api/a00101.html create mode 100644 common/glm/doc/api/a00101_source.html create mode 100644 common/glm/doc/api/a00104.html create mode 100644 common/glm/doc/api/a00104_source.html create mode 100644 common/glm/doc/api/a00107.html create mode 100644 common/glm/doc/api/a00107_source.html create mode 100644 common/glm/doc/api/a00110.html create mode 100644 common/glm/doc/api/a00110_source.html create mode 100644 common/glm/doc/api/a00113.html create mode 100644 common/glm/doc/api/a00113_source.html create mode 100644 common/glm/doc/api/a00116.html create mode 100644 common/glm/doc/api/a00116_source.html create mode 100644 common/glm/doc/api/a00119.html create mode 100644 common/glm/doc/api/a00119_source.html create mode 100644 common/glm/doc/api/a00122.html create mode 100644 common/glm/doc/api/a00122_source.html create mode 100644 common/glm/doc/api/a00125.html create mode 100644 common/glm/doc/api/a00125_source.html create mode 100644 common/glm/doc/api/a00128.html create mode 100644 common/glm/doc/api/a00128_source.html create mode 100644 common/glm/doc/api/a00131.html create mode 100644 common/glm/doc/api/a00131_source.html create mode 100644 common/glm/doc/api/a00134.html create mode 100644 common/glm/doc/api/a00134_source.html create mode 100644 common/glm/doc/api/a00137.html create mode 100644 common/glm/doc/api/a00137_source.html create mode 100644 common/glm/doc/api/a00140.html create mode 100644 common/glm/doc/api/a00140_source.html create mode 100644 common/glm/doc/api/a00143.html create mode 100644 common/glm/doc/api/a00143_source.html create mode 100644 common/glm/doc/api/a00146.html create mode 100644 common/glm/doc/api/a00146_source.html create mode 100644 common/glm/doc/api/a00149.html create mode 100644 common/glm/doc/api/a00149_source.html create mode 100644 common/glm/doc/api/a00152.html create mode 100644 common/glm/doc/api/a00152_source.html create mode 100644 common/glm/doc/api/a00155.html create mode 100644 common/glm/doc/api/a00155_source.html create mode 100644 common/glm/doc/api/a00158.html create mode 100644 common/glm/doc/api/a00158_source.html create mode 100644 common/glm/doc/api/a00161.html create mode 100644 common/glm/doc/api/a00161_source.html create mode 100644 common/glm/doc/api/a00164.html create mode 100644 common/glm/doc/api/a00164_source.html create mode 100644 common/glm/doc/api/a00167.html create mode 100644 common/glm/doc/api/a00167_source.html create mode 100644 common/glm/doc/api/a00170.html create mode 100644 common/glm/doc/api/a00170_source.html create mode 100644 common/glm/doc/api/a00173.html create mode 100644 common/glm/doc/api/a00173_source.html create mode 100644 common/glm/doc/api/a00176.html create mode 100644 common/glm/doc/api/a00176_source.html create mode 100644 common/glm/doc/api/a00179_source.html create mode 100644 common/glm/doc/api/a00182.html create mode 100644 common/glm/doc/api/a00182_source.html create mode 100644 common/glm/doc/api/a00185.html create mode 100644 common/glm/doc/api/a00185_source.html create mode 100644 common/glm/doc/api/a00188.html create mode 100644 common/glm/doc/api/a00188_source.html create mode 100644 common/glm/doc/api/a00191.html create mode 100644 common/glm/doc/api/a00191_source.html create mode 100644 common/glm/doc/api/a00194.html create mode 100644 common/glm/doc/api/a00194_source.html create mode 100644 common/glm/doc/api/a00197.html create mode 100644 common/glm/doc/api/a00197_source.html create mode 100644 common/glm/doc/api/a00203.html create mode 100644 common/glm/doc/api/a00203_source.html create mode 100644 common/glm/doc/api/a00206.html create mode 100644 common/glm/doc/api/a00206_source.html create mode 100644 common/glm/doc/api/a00209.html create mode 100644 common/glm/doc/api/a00209_source.html create mode 100644 common/glm/doc/api/a00212.html create mode 100644 common/glm/doc/api/a00212_source.html create mode 100644 common/glm/doc/api/a00215.html create mode 100644 common/glm/doc/api/a00215_source.html create mode 100644 common/glm/doc/api/a00218.html create mode 100644 common/glm/doc/api/a00218_source.html create mode 100644 common/glm/doc/api/a00221.html create mode 100644 common/glm/doc/api/a00221_source.html create mode 100644 common/glm/doc/api/a00224.html create mode 100644 common/glm/doc/api/a00224_source.html create mode 100644 common/glm/doc/api/a00227.html create mode 100644 common/glm/doc/api/a00227_source.html create mode 100644 common/glm/doc/api/a00230.html create mode 100644 common/glm/doc/api/a00230_source.html create mode 100644 common/glm/doc/api/a00233.html create mode 100644 common/glm/doc/api/a00233_source.html create mode 100644 common/glm/doc/api/a00236.html create mode 100644 common/glm/doc/api/a00236_source.html create mode 100644 common/glm/doc/api/a00239.html create mode 100644 common/glm/doc/api/a00239_source.html create mode 100644 common/glm/doc/api/a00242.html create mode 100644 common/glm/doc/api/a00242_source.html create mode 100644 common/glm/doc/api/a00245.html create mode 100644 common/glm/doc/api/a00245_source.html create mode 100644 common/glm/doc/api/a00248.html create mode 100644 common/glm/doc/api/a00248_source.html create mode 100644 common/glm/doc/api/a00251.html create mode 100644 common/glm/doc/api/a00251_source.html create mode 100644 common/glm/doc/api/a00254.html create mode 100644 common/glm/doc/api/a00254_source.html create mode 100644 common/glm/doc/api/a00257.html create mode 100644 common/glm/doc/api/a00257_source.html create mode 100644 common/glm/doc/api/a00260.html create mode 100644 common/glm/doc/api/a00260_source.html create mode 100644 common/glm/doc/api/a00263.html create mode 100644 common/glm/doc/api/a00263_source.html create mode 100644 common/glm/doc/api/a00266.html create mode 100644 common/glm/doc/api/a00266_source.html create mode 100644 common/glm/doc/api/a00269.html create mode 100644 common/glm/doc/api/a00269_source.html create mode 100644 common/glm/doc/api/a00272.html create mode 100644 common/glm/doc/api/a00272_source.html create mode 100644 common/glm/doc/api/a00275.html create mode 100644 common/glm/doc/api/a00275_source.html create mode 100644 common/glm/doc/api/a00278.html create mode 100644 common/glm/doc/api/a00278_source.html create mode 100644 common/glm/doc/api/a00281.html create mode 100644 common/glm/doc/api/a00281_source.html create mode 100644 common/glm/doc/api/a00284.html create mode 100644 common/glm/doc/api/a00284_source.html create mode 100644 common/glm/doc/api/a00287.html create mode 100644 common/glm/doc/api/a00287_source.html create mode 100644 common/glm/doc/api/a00290.html create mode 100644 common/glm/doc/api/a00290_source.html create mode 100644 common/glm/doc/api/a00293.html create mode 100644 common/glm/doc/api/a00293_source.html create mode 100644 common/glm/doc/api/a00296.html create mode 100644 common/glm/doc/api/a00296_source.html create mode 100644 common/glm/doc/api/a00299.html create mode 100644 common/glm/doc/api/a00299_source.html create mode 100644 common/glm/doc/api/a00302.html create mode 100644 common/glm/doc/api/a00302_source.html create mode 100644 common/glm/doc/api/a00305.html create mode 100644 common/glm/doc/api/a00305_source.html create mode 100644 common/glm/doc/api/a00308.html create mode 100644 common/glm/doc/api/a00308_source.html create mode 100644 common/glm/doc/api/a00311.html create mode 100644 common/glm/doc/api/a00311_source.html create mode 100644 common/glm/doc/api/a00314.html create mode 100644 common/glm/doc/api/a00314_source.html create mode 100644 common/glm/doc/api/a00317.html create mode 100644 common/glm/doc/api/a00317_source.html create mode 100644 common/glm/doc/api/a00320.html create mode 100644 common/glm/doc/api/a00320_source.html create mode 100644 common/glm/doc/api/a00323.html create mode 100644 common/glm/doc/api/a00323_source.html create mode 100644 common/glm/doc/api/a00326.html create mode 100644 common/glm/doc/api/a00326_source.html create mode 100644 common/glm/doc/api/a00329.html create mode 100644 common/glm/doc/api/a00329_source.html create mode 100644 common/glm/doc/api/a00332.html create mode 100644 common/glm/doc/api/a00332_source.html create mode 100644 common/glm/doc/api/a00335.html create mode 100644 common/glm/doc/api/a00335_source.html create mode 100644 common/glm/doc/api/a00338.html create mode 100644 common/glm/doc/api/a00338_source.html create mode 100644 common/glm/doc/api/a00341.html create mode 100644 common/glm/doc/api/a00341_source.html create mode 100644 common/glm/doc/api/a00344.html create mode 100644 common/glm/doc/api/a00344_source.html create mode 100644 common/glm/doc/api/a00347.html create mode 100644 common/glm/doc/api/a00347_source.html create mode 100644 common/glm/doc/api/a00350.html create mode 100644 common/glm/doc/api/a00350_source.html create mode 100644 common/glm/doc/api/a00353.html create mode 100644 common/glm/doc/api/a00353_source.html create mode 100644 common/glm/doc/api/a00356.html create mode 100644 common/glm/doc/api/a00356_source.html create mode 100644 common/glm/doc/api/a00359.html create mode 100644 common/glm/doc/api/a00359_source.html create mode 100644 common/glm/doc/api/a00362.html create mode 100644 common/glm/doc/api/a00362_source.html create mode 100644 common/glm/doc/api/a00365.html create mode 100644 common/glm/doc/api/a00365_source.html create mode 100644 common/glm/doc/api/a00368.html create mode 100644 common/glm/doc/api/a00368_source.html create mode 100644 common/glm/doc/api/a00371.html create mode 100644 common/glm/doc/api/a00371_source.html create mode 100644 common/glm/doc/api/a00374.html create mode 100644 common/glm/doc/api/a00374_source.html create mode 100644 common/glm/doc/api/a00377.html create mode 100644 common/glm/doc/api/a00377_source.html create mode 100644 common/glm/doc/api/a00380.html create mode 100644 common/glm/doc/api/a00380_source.html create mode 100644 common/glm/doc/api/a00383.html create mode 100644 common/glm/doc/api/a00383_source.html create mode 100644 common/glm/doc/api/a00386.html create mode 100644 common/glm/doc/api/a00386_source.html create mode 100644 common/glm/doc/api/a00389.html create mode 100644 common/glm/doc/api/a00389_source.html create mode 100644 common/glm/doc/api/a00392.html create mode 100644 common/glm/doc/api/a00392_source.html create mode 100644 common/glm/doc/api/a00395.html create mode 100644 common/glm/doc/api/a00395_source.html create mode 100644 common/glm/doc/api/a00398.html create mode 100644 common/glm/doc/api/a00398_source.html create mode 100644 common/glm/doc/api/a00401.html create mode 100644 common/glm/doc/api/a00401_source.html create mode 100644 common/glm/doc/api/a00404.html create mode 100644 common/glm/doc/api/a00404_source.html create mode 100644 common/glm/doc/api/a00407.html create mode 100644 common/glm/doc/api/a00407_source.html create mode 100644 common/glm/doc/api/a00410.html create mode 100644 common/glm/doc/api/a00410_source.html create mode 100644 common/glm/doc/api/a00413.html create mode 100644 common/glm/doc/api/a00413_source.html create mode 100644 common/glm/doc/api/a00416.html create mode 100644 common/glm/doc/api/a00416_source.html create mode 100644 common/glm/doc/api/a00419.html create mode 100644 common/glm/doc/api/a00419_source.html create mode 100644 common/glm/doc/api/a00422.html create mode 100644 common/glm/doc/api/a00422_source.html create mode 100644 common/glm/doc/api/a00425.html create mode 100644 common/glm/doc/api/a00425_source.html create mode 100644 common/glm/doc/api/a00428.html create mode 100644 common/glm/doc/api/a00428_source.html create mode 100644 common/glm/doc/api/a00431.html create mode 100644 common/glm/doc/api/a00431_source.html create mode 100644 common/glm/doc/api/a00434.html create mode 100644 common/glm/doc/api/a00434_source.html create mode 100644 common/glm/doc/api/a00437.html create mode 100644 common/glm/doc/api/a00437_source.html create mode 100644 common/glm/doc/api/a00440.html create mode 100644 common/glm/doc/api/a00440_source.html create mode 100644 common/glm/doc/api/a00443.html create mode 100644 common/glm/doc/api/a00443_source.html create mode 100644 common/glm/doc/api/a00446.html create mode 100644 common/glm/doc/api/a00446_source.html create mode 100644 common/glm/doc/api/a00449.html create mode 100644 common/glm/doc/api/a00449_source.html create mode 100644 common/glm/doc/api/a00452.html create mode 100644 common/glm/doc/api/a00452_source.html create mode 100644 common/glm/doc/api/a00455.html create mode 100644 common/glm/doc/api/a00455_source.html create mode 100644 common/glm/doc/api/a00458.html create mode 100644 common/glm/doc/api/a00458_source.html create mode 100644 common/glm/doc/api/a00461.html create mode 100644 common/glm/doc/api/a00461_source.html create mode 100644 common/glm/doc/api/a00464.html create mode 100644 common/glm/doc/api/a00464_source.html create mode 100644 common/glm/doc/api/a00467.html create mode 100644 common/glm/doc/api/a00467_source.html create mode 100644 common/glm/doc/api/a00470.html create mode 100644 common/glm/doc/api/a00470_source.html create mode 100644 common/glm/doc/api/a00473.html create mode 100644 common/glm/doc/api/a00473_source.html create mode 100644 common/glm/doc/api/a00476.html create mode 100644 common/glm/doc/api/a00476_source.html create mode 100644 common/glm/doc/api/a00479.html create mode 100644 common/glm/doc/api/a00479_source.html create mode 100644 common/glm/doc/api/a00482.html create mode 100644 common/glm/doc/api/a00482_source.html create mode 100644 common/glm/doc/api/a00485.html create mode 100644 common/glm/doc/api/a00485_source.html create mode 100644 common/glm/doc/api/a00488.html create mode 100644 common/glm/doc/api/a00488_source.html create mode 100644 common/glm/doc/api/a00491.html create mode 100644 common/glm/doc/api/a00491_source.html create mode 100644 common/glm/doc/api/a00494.html create mode 100644 common/glm/doc/api/a00494_source.html create mode 100644 common/glm/doc/api/a00497.html create mode 100644 common/glm/doc/api/a00497_source.html create mode 100644 common/glm/doc/api/a00500.html create mode 100644 common/glm/doc/api/a00500_source.html create mode 100644 common/glm/doc/api/a00503.html create mode 100644 common/glm/doc/api/a00503_source.html create mode 100644 common/glm/doc/api/a00506.html create mode 100644 common/glm/doc/api/a00506_source.html create mode 100644 common/glm/doc/api/a00509.html create mode 100644 common/glm/doc/api/a00509_source.html create mode 100644 common/glm/doc/api/a00512.html create mode 100644 common/glm/doc/api/a00512_source.html create mode 100644 common/glm/doc/api/a00515.html create mode 100644 common/glm/doc/api/a00515_source.html create mode 100644 common/glm/doc/api/a00518.html create mode 100644 common/glm/doc/api/a00518_source.html create mode 100644 common/glm/doc/api/a00521.html create mode 100644 common/glm/doc/api/a00521_source.html create mode 100644 common/glm/doc/api/a00524.html create mode 100644 common/glm/doc/api/a00524_source.html create mode 100644 common/glm/doc/api/a00527.html create mode 100644 common/glm/doc/api/a00527_source.html create mode 100644 common/glm/doc/api/a00530.html create mode 100644 common/glm/doc/api/a00530_source.html create mode 100644 common/glm/doc/api/a00533.html create mode 100644 common/glm/doc/api/a00533_source.html create mode 100644 common/glm/doc/api/a00536.html create mode 100644 common/glm/doc/api/a00536_source.html create mode 100644 common/glm/doc/api/a00539.html create mode 100644 common/glm/doc/api/a00539_source.html create mode 100644 common/glm/doc/api/a00542.html create mode 100644 common/glm/doc/api/a00542_source.html create mode 100644 common/glm/doc/api/a00545.html create mode 100644 common/glm/doc/api/a00545_source.html create mode 100644 common/glm/doc/api/a00548.html create mode 100644 common/glm/doc/api/a00548_source.html create mode 100644 common/glm/doc/api/a00551.html create mode 100644 common/glm/doc/api/a00551_source.html create mode 100644 common/glm/doc/api/a00554.html create mode 100644 common/glm/doc/api/a00554_source.html create mode 100644 common/glm/doc/api/a00557.html create mode 100644 common/glm/doc/api/a00557_source.html create mode 100644 common/glm/doc/api/a00560.html create mode 100644 common/glm/doc/api/a00560_source.html create mode 100644 common/glm/doc/api/a00563.html create mode 100644 common/glm/doc/api/a00563_source.html create mode 100644 common/glm/doc/api/a00566.html create mode 100644 common/glm/doc/api/a00566_source.html create mode 100644 common/glm/doc/api/a00569.html create mode 100644 common/glm/doc/api/a00569_source.html create mode 100644 common/glm/doc/api/a00572.html create mode 100644 common/glm/doc/api/a00572_source.html create mode 100644 common/glm/doc/api/a00575.html create mode 100644 common/glm/doc/api/a00575_source.html create mode 100644 common/glm/doc/api/a00578.html create mode 100644 common/glm/doc/api/a00578_source.html create mode 100644 common/glm/doc/api/a00581.html create mode 100644 common/glm/doc/api/a00581_source.html create mode 100644 common/glm/doc/api/a00584.html create mode 100644 common/glm/doc/api/a00584_source.html create mode 100644 common/glm/doc/api/a00587.html create mode 100644 common/glm/doc/api/a00587_source.html create mode 100644 common/glm/doc/api/a00590.html create mode 100644 common/glm/doc/api/a00590_source.html create mode 100644 common/glm/doc/api/a00593.html create mode 100644 common/glm/doc/api/a00593_source.html create mode 100644 common/glm/doc/api/a00596.html create mode 100644 common/glm/doc/api/a00596_source.html create mode 100644 common/glm/doc/api/a00599.html create mode 100644 common/glm/doc/api/a00599_source.html create mode 100644 common/glm/doc/api/a00602.html create mode 100644 common/glm/doc/api/a00602_source.html create mode 100644 common/glm/doc/api/a00605.html create mode 100644 common/glm/doc/api/a00605_source.html create mode 100644 common/glm/doc/api/a00608.html create mode 100644 common/glm/doc/api/a00608_source.html create mode 100644 common/glm/doc/api/a00611.html create mode 100644 common/glm/doc/api/a00611_source.html create mode 100644 common/glm/doc/api/a00614.html create mode 100644 common/glm/doc/api/a00614_source.html create mode 100644 common/glm/doc/api/a00617.html create mode 100644 common/glm/doc/api/a00617_source.html create mode 100644 common/glm/doc/api/a00620.html create mode 100644 common/glm/doc/api/a00620_source.html create mode 100644 common/glm/doc/api/a00623.html create mode 100644 common/glm/doc/api/a00623_source.html create mode 100644 common/glm/doc/api/a00626.html create mode 100644 common/glm/doc/api/a00626_source.html create mode 100644 common/glm/doc/api/a00629.html create mode 100644 common/glm/doc/api/a00629_source.html create mode 100644 common/glm/doc/api/a00632.html create mode 100644 common/glm/doc/api/a00632_source.html create mode 100644 common/glm/doc/api/a00635.html create mode 100644 common/glm/doc/api/a00635_source.html create mode 100644 common/glm/doc/api/a00638.html create mode 100644 common/glm/doc/api/a00638_source.html create mode 100644 common/glm/doc/api/a00641.html create mode 100644 common/glm/doc/api/a00641_source.html create mode 100644 common/glm/doc/api/a00644.html create mode 100644 common/glm/doc/api/a00644_source.html create mode 100644 common/glm/doc/api/a00647.html create mode 100644 common/glm/doc/api/a00647_source.html create mode 100644 common/glm/doc/api/a00650.html create mode 100644 common/glm/doc/api/a00650_source.html create mode 100644 common/glm/doc/api/a00653.html create mode 100644 common/glm/doc/api/a00653_source.html create mode 100644 common/glm/doc/api/a00656.html create mode 100644 common/glm/doc/api/a00656_source.html create mode 100644 common/glm/doc/api/a00659.html create mode 100644 common/glm/doc/api/a00659_source.html create mode 100644 common/glm/doc/api/a00662.html create mode 100644 common/glm/doc/api/a00662_source.html create mode 100644 common/glm/doc/api/a00663.html create mode 100644 common/glm/doc/api/a00664.html create mode 100644 common/glm/doc/api/a00665.html create mode 100644 common/glm/doc/api/a00666.html create mode 100644 common/glm/doc/api/a00667.html create mode 100644 common/glm/doc/api/a00668.html create mode 100644 common/glm/doc/api/a00669.html create mode 100644 common/glm/doc/api/a00670.html create mode 100644 common/glm/doc/api/a00671.html create mode 100644 common/glm/doc/api/a00672.html create mode 100644 common/glm/doc/api/a00673.html create mode 100644 common/glm/doc/api/a00674.html create mode 100644 common/glm/doc/api/a00675.html create mode 100644 common/glm/doc/api/a00676.html create mode 100644 common/glm/doc/api/a00677.html create mode 100644 common/glm/doc/api/a00678.html create mode 100644 common/glm/doc/api/a00679.html create mode 100644 common/glm/doc/api/a00680.html create mode 100644 common/glm/doc/api/a00681.html create mode 100644 common/glm/doc/api/a00682.html create mode 100644 common/glm/doc/api/a00683.html create mode 100644 common/glm/doc/api/a00684.html create mode 100644 common/glm/doc/api/a00685.html create mode 100644 common/glm/doc/api/a00686.html create mode 100644 common/glm/doc/api/a00687.html create mode 100644 common/glm/doc/api/a00688.html create mode 100644 common/glm/doc/api/a00689.html create mode 100644 common/glm/doc/api/a00690.html create mode 100644 common/glm/doc/api/a00691.html create mode 100644 common/glm/doc/api/a00692.html create mode 100644 common/glm/doc/api/a00693.html create mode 100644 common/glm/doc/api/a00694.html create mode 100644 common/glm/doc/api/a00695.html create mode 100644 common/glm/doc/api/a00696.html create mode 100644 common/glm/doc/api/a00697.html create mode 100644 common/glm/doc/api/a00698.html create mode 100644 common/glm/doc/api/a00699.html create mode 100644 common/glm/doc/api/a00700.html create mode 100644 common/glm/doc/api/a00701.html create mode 100644 common/glm/doc/api/a00702.html create mode 100644 common/glm/doc/api/a00703.html create mode 100644 common/glm/doc/api/a00704.html create mode 100644 common/glm/doc/api/a00705.html create mode 100644 common/glm/doc/api/a00706.html create mode 100644 common/glm/doc/api/a00707.html create mode 100644 common/glm/doc/api/a00708.html create mode 100644 common/glm/doc/api/a00709.html create mode 100644 common/glm/doc/api/a00710.html create mode 100644 common/glm/doc/api/a00711.html create mode 100644 common/glm/doc/api/a00712.html create mode 100644 common/glm/doc/api/a00713.html create mode 100644 common/glm/doc/api/a00714.html create mode 100644 common/glm/doc/api/a00715.html create mode 100644 common/glm/doc/api/a00716.html create mode 100644 common/glm/doc/api/a00717.html create mode 100644 common/glm/doc/api/a00718.html create mode 100644 common/glm/doc/api/a00719.html create mode 100644 common/glm/doc/api/a00720.html create mode 100644 common/glm/doc/api/a00721.html create mode 100644 common/glm/doc/api/a00722.html create mode 100644 common/glm/doc/api/a00723.html create mode 100644 common/glm/doc/api/a00724.html create mode 100644 common/glm/doc/api/a00725.html create mode 100644 common/glm/doc/api/a00726.html create mode 100644 common/glm/doc/api/a00727.html create mode 100644 common/glm/doc/api/a00728.html create mode 100644 common/glm/doc/api/a00729.html create mode 100644 common/glm/doc/api/a00730.html create mode 100644 common/glm/doc/api/a00731.html create mode 100644 common/glm/doc/api/a00732.html create mode 100644 common/glm/doc/api/a00733.html create mode 100644 common/glm/doc/api/a00734.html create mode 100644 common/glm/doc/api/a00735.html create mode 100644 common/glm/doc/api/a00736.html create mode 100644 common/glm/doc/api/a00737.html create mode 100644 common/glm/doc/api/a00738.html create mode 100644 common/glm/doc/api/a00739.html create mode 100644 common/glm/doc/api/a00740.html create mode 100644 common/glm/doc/api/a00741.html create mode 100644 common/glm/doc/api/a00742.html create mode 100644 common/glm/doc/api/a00743.html create mode 100644 common/glm/doc/api/a00744.html create mode 100644 common/glm/doc/api/a00745.html create mode 100644 common/glm/doc/api/a00746.html create mode 100644 common/glm/doc/api/a00747.html create mode 100644 common/glm/doc/api/a00748.html create mode 100644 common/glm/doc/api/a00749.html create mode 100644 common/glm/doc/api/a00750.html create mode 100644 common/glm/doc/api/a00751.html create mode 100644 common/glm/doc/api/a00752.html create mode 100644 common/glm/doc/api/a00753.html create mode 100644 common/glm/doc/api/a00754.html create mode 100644 common/glm/doc/api/a00755.html create mode 100644 common/glm/doc/api/a00756.html create mode 100644 common/glm/doc/api/a00757.html create mode 100644 common/glm/doc/api/a00758.html create mode 100644 common/glm/doc/api/a00759.html create mode 100644 common/glm/doc/api/a00760.html create mode 100644 common/glm/doc/api/a00761.html create mode 100644 common/glm/doc/api/a00762.html create mode 100644 common/glm/doc/api/a00763.html create mode 100644 common/glm/doc/api/a00764.html create mode 100644 common/glm/doc/api/a00765.html create mode 100644 common/glm/doc/api/a00766.html create mode 100644 common/glm/doc/api/a00767.html create mode 100644 common/glm/doc/api/a00768.html create mode 100644 common/glm/doc/api/a00769.html create mode 100644 common/glm/doc/api/a00770.html create mode 100644 common/glm/doc/api/a00771.html create mode 100644 common/glm/doc/api/a00772.html create mode 100644 common/glm/doc/api/a00773.html create mode 100644 common/glm/doc/api/a00774.html create mode 100644 common/glm/doc/api/a00775.html create mode 100644 common/glm/doc/api/a00776.html create mode 100644 common/glm/doc/api/a00777.html create mode 100644 common/glm/doc/api/a00778.html create mode 100644 common/glm/doc/api/a00779.html create mode 100644 common/glm/doc/api/a00780.html create mode 100644 common/glm/doc/api/a00781.html create mode 100644 common/glm/doc/api/a00782.html create mode 100644 common/glm/doc/api/a00783.html create mode 100644 common/glm/doc/api/a00784.html create mode 100644 common/glm/doc/api/a00785.html create mode 100644 common/glm/doc/api/a00786.html create mode 100644 common/glm/doc/api/a00787.html create mode 100644 common/glm/doc/api/a00788.html create mode 100644 common/glm/doc/api/a00789.html create mode 100644 common/glm/doc/api/a00790.html create mode 100644 common/glm/doc/api/a00791.html create mode 100644 common/glm/doc/api/a00792.html create mode 100644 common/glm/doc/api/a00793.html create mode 100644 common/glm/doc/api/a00794.html create mode 100644 common/glm/doc/api/a00795.html create mode 100644 common/glm/doc/api/a00796.html create mode 100644 common/glm/doc/api/a00797.html create mode 100644 common/glm/doc/api/a01343.html create mode 100644 common/glm/doc/api/a01343_source.html create mode 100644 common/glm/doc/api/a01346.html create mode 100644 common/glm/doc/api/a01346_source.html create mode 100644 common/glm/doc/api/a01347.html create mode 100644 common/glm/doc/api/a01347_source.html create mode 100644 common/glm/doc/api/a01348.html create mode 100644 common/glm/doc/api/a01348_source.html create mode 100644 common/glm/doc/api/a01349.html create mode 100644 common/glm/doc/api/a01349_source.html create mode 100644 common/glm/doc/api/a01350.html create mode 100644 common/glm/doc/api/a01350_source.html create mode 100644 common/glm/doc/api/a01351.html create mode 100644 common/glm/doc/api/a01351_source.html create mode 100644 common/glm/doc/api/a01352.html create mode 100644 common/glm/doc/api/a01352_source.html create mode 100644 common/glm/doc/api/a01353.html create mode 100644 common/glm/doc/api/a01353_source.html create mode 100644 common/glm/doc/api/a01354.html create mode 100644 common/glm/doc/api/a01354_source.html create mode 100644 common/glm/doc/api/a01355.html create mode 100644 common/glm/doc/api/a01355_source.html create mode 100644 common/glm/doc/api/a01356.html create mode 100644 common/glm/doc/api/a01356_source.html create mode 100644 common/glm/doc/api/a01357.html create mode 100644 common/glm/doc/api/a01357_source.html create mode 100644 common/glm/doc/api/a01358.html create mode 100644 common/glm/doc/api/a01358_source.html create mode 100644 common/glm/doc/api/a01359.html create mode 100644 common/glm/doc/api/a01359_source.html create mode 100644 common/glm/doc/api/a01360.html create mode 100644 common/glm/doc/api/a01360_source.html create mode 100644 common/glm/doc/api/a01361.html create mode 100644 common/glm/doc/api/a01361_source.html create mode 100644 common/glm/doc/api/a01362.html create mode 100644 common/glm/doc/api/a01362_source.html create mode 100644 common/glm/doc/api/a01363.html create mode 100644 common/glm/doc/api/a01363_source.html create mode 100644 common/glm/doc/api/a01364.html create mode 100644 common/glm/doc/api/a01364_source.html create mode 100644 common/glm/doc/api/a01365.html create mode 100644 common/glm/doc/api/a01365_source.html create mode 100644 common/glm/doc/api/a01366.html create mode 100644 common/glm/doc/api/a01366_source.html create mode 100644 common/glm/doc/api/a01367.html create mode 100644 common/glm/doc/api/a01367_source.html create mode 100644 common/glm/doc/api/a01368.html create mode 100644 common/glm/doc/api/a01368_source.html create mode 100644 common/glm/doc/api/a01369.html create mode 100644 common/glm/doc/api/a01369_source.html create mode 100644 common/glm/doc/api/a01370.html create mode 100644 common/glm/doc/api/a01370_source.html create mode 100644 common/glm/doc/api/a01371.html create mode 100644 common/glm/doc/api/a01371_source.html create mode 100644 common/glm/doc/api/a01372.html create mode 100644 common/glm/doc/api/a01372_source.html create mode 100644 common/glm/doc/api/a01373.html create mode 100644 common/glm/doc/api/a01373_source.html create mode 100644 common/glm/doc/api/a01374.html create mode 100644 common/glm/doc/api/a01374_source.html create mode 100644 common/glm/doc/api/a01375.html create mode 100644 common/glm/doc/api/a01375_source.html create mode 100644 common/glm/doc/api/a01376.html create mode 100644 common/glm/doc/api/a01376_source.html create mode 100644 common/glm/doc/api/a01377.html create mode 100644 common/glm/doc/api/a01377_source.html create mode 100644 common/glm/doc/api/a01378.html create mode 100644 common/glm/doc/api/a01378_source.html create mode 100644 common/glm/doc/api/a01379.html create mode 100644 common/glm/doc/api/a01379_source.html create mode 100644 common/glm/doc/api/a01380.html create mode 100644 common/glm/doc/api/a01380_source.html create mode 100644 common/glm/doc/api/a01381.html create mode 100644 common/glm/doc/api/a01381_source.html create mode 100644 common/glm/doc/api/a01382.html create mode 100644 common/glm/doc/api/a01382_source.html create mode 100644 common/glm/doc/api/a01383.html create mode 100644 common/glm/doc/api/a01383_source.html create mode 100644 common/glm/doc/api/a01384.html create mode 100644 common/glm/doc/api/a01384_source.html create mode 100644 common/glm/doc/api/a01385.html create mode 100644 common/glm/doc/api/a01385_source.html create mode 100644 common/glm/doc/api/a01386.html create mode 100644 common/glm/doc/api/a01386_source.html create mode 100644 common/glm/doc/api/a01387.html create mode 100644 common/glm/doc/api/a01387_source.html create mode 100644 common/glm/doc/api/a01388.html create mode 100644 common/glm/doc/api/a01388_source.html create mode 100644 common/glm/doc/api/a01389.html create mode 100644 common/glm/doc/api/a01389_source.html create mode 100644 common/glm/doc/api/a01390.html create mode 100644 common/glm/doc/api/a01390_source.html create mode 100644 common/glm/doc/api/a01391.html create mode 100644 common/glm/doc/api/a01391_source.html create mode 100644 common/glm/doc/api/a01392.html create mode 100644 common/glm/doc/api/a01392_source.html create mode 100644 common/glm/doc/api/a01393.html create mode 100644 common/glm/doc/api/a01393_source.html create mode 100644 common/glm/doc/api/a01394.html create mode 100644 common/glm/doc/api/a01394_source.html create mode 100644 common/glm/doc/api/bc_s.png create mode 100644 common/glm/doc/api/bdwn.png create mode 100644 common/glm/doc/api/closed.png create mode 100644 common/glm/doc/api/dir_02cc19cee4c4780485bfe81520450212.html create mode 100644 common/glm/doc/api/dir_1551bf7b389c96495cd64da3774a1843.html create mode 100644 common/glm/doc/api/dir_2c9f37f6a8d2004101d7524672238505.html create mode 100644 common/glm/doc/api/dir_3da5c411f748022d233cc92a3c5e2a02.html create mode 100644 common/glm/doc/api/dir_4ca6aa55b50e6be994025af27820140e.html create mode 100644 common/glm/doc/api/dir_54de7df3bc9880881b14ec07f256fd2e.html create mode 100644 common/glm/doc/api/dir_627f4a52155b61a75c7c4851d7df9027.html create mode 100644 common/glm/doc/api/dir_6399a054f5929b58eaa476233e406ce8.html create mode 100644 common/glm/doc/api/dir_b115b02f1dab989141fcd87ab0462f01.html create mode 100644 common/glm/doc/api/dir_d522931ffa1371640980b621734a4381.html create mode 100644 common/glm/doc/api/dir_e6ae9283c4fa4619048a0a88dfd00585.html create mode 100644 common/glm/doc/api/dir_ffdfd01cf51cdb2fe8bd5e55c6e0c4e8.html create mode 100644 common/glm/doc/api/doc.png create mode 100644 common/glm/doc/api/doxygen.css create mode 100644 common/glm/doc/api/doxygen.png create mode 100644 common/glm/doc/api/dynsections.js create mode 100644 common/glm/doc/api/files.html create mode 100644 common/glm/doc/api/folderclosed.png create mode 100644 common/glm/doc/api/folderopen.png create mode 100644 common/glm/doc/api/index.html create mode 100644 common/glm/doc/api/jquery.js create mode 100644 common/glm/doc/api/logo-mini.png create mode 100644 common/glm/doc/api/menu.js create mode 100644 common/glm/doc/api/menudata.js create mode 100644 common/glm/doc/api/modules.html create mode 100644 common/glm/doc/api/nav_f.png create mode 100644 common/glm/doc/api/nav_g.png create mode 100644 common/glm/doc/api/nav_h.png create mode 100644 common/glm/doc/api/open.png create mode 100644 common/glm/doc/api/search/all_0.html create mode 100644 common/glm/doc/api/search/all_0.js create mode 100644 common/glm/doc/api/search/all_1.html create mode 100644 common/glm/doc/api/search/all_1.js create mode 100644 common/glm/doc/api/search/all_10.html create mode 100644 common/glm/doc/api/search/all_10.js create mode 100644 common/glm/doc/api/search/all_11.html create mode 100644 common/glm/doc/api/search/all_11.js create mode 100644 common/glm/doc/api/search/all_12.html create mode 100644 common/glm/doc/api/search/all_12.js create mode 100644 common/glm/doc/api/search/all_13.html create mode 100644 common/glm/doc/api/search/all_13.js create mode 100644 common/glm/doc/api/search/all_14.html create mode 100644 common/glm/doc/api/search/all_14.js create mode 100644 common/glm/doc/api/search/all_15.html create mode 100644 common/glm/doc/api/search/all_15.js create mode 100644 common/glm/doc/api/search/all_16.html create mode 100644 common/glm/doc/api/search/all_16.js create mode 100644 common/glm/doc/api/search/all_2.html create mode 100644 common/glm/doc/api/search/all_2.js create mode 100644 common/glm/doc/api/search/all_3.html create mode 100644 common/glm/doc/api/search/all_3.js create mode 100644 common/glm/doc/api/search/all_4.html create mode 100644 common/glm/doc/api/search/all_4.js create mode 100644 common/glm/doc/api/search/all_5.html create mode 100644 common/glm/doc/api/search/all_5.js create mode 100644 common/glm/doc/api/search/all_6.html create mode 100644 common/glm/doc/api/search/all_6.js create mode 100644 common/glm/doc/api/search/all_7.html create mode 100644 common/glm/doc/api/search/all_7.js create mode 100644 common/glm/doc/api/search/all_8.html create mode 100644 common/glm/doc/api/search/all_8.js create mode 100644 common/glm/doc/api/search/all_9.html create mode 100644 common/glm/doc/api/search/all_9.js create mode 100644 common/glm/doc/api/search/all_a.html create mode 100644 common/glm/doc/api/search/all_a.js create mode 100644 common/glm/doc/api/search/all_b.html create mode 100644 common/glm/doc/api/search/all_b.js create mode 100644 common/glm/doc/api/search/all_c.html create mode 100644 common/glm/doc/api/search/all_c.js create mode 100644 common/glm/doc/api/search/all_d.html create mode 100644 common/glm/doc/api/search/all_d.js create mode 100644 common/glm/doc/api/search/all_e.html create mode 100644 common/glm/doc/api/search/all_e.js create mode 100644 common/glm/doc/api/search/all_f.html create mode 100644 common/glm/doc/api/search/all_f.js create mode 100644 common/glm/doc/api/search/close.png create mode 100644 common/glm/doc/api/search/files_0.html create mode 100644 common/glm/doc/api/search/files_0.js create mode 100644 common/glm/doc/api/search/files_1.html create mode 100644 common/glm/doc/api/search/files_1.js create mode 100644 common/glm/doc/api/search/files_10.html create mode 100644 common/glm/doc/api/search/files_10.js create mode 100644 common/glm/doc/api/search/files_11.html create mode 100644 common/glm/doc/api/search/files_11.js create mode 100644 common/glm/doc/api/search/files_12.html create mode 100644 common/glm/doc/api/search/files_12.js create mode 100644 common/glm/doc/api/search/files_13.html create mode 100644 common/glm/doc/api/search/files_13.js create mode 100644 common/glm/doc/api/search/files_14.html create mode 100644 common/glm/doc/api/search/files_14.js create mode 100644 common/glm/doc/api/search/files_2.html create mode 100644 common/glm/doc/api/search/files_2.js create mode 100644 common/glm/doc/api/search/files_3.html create mode 100644 common/glm/doc/api/search/files_3.js create mode 100644 common/glm/doc/api/search/files_4.html create mode 100644 common/glm/doc/api/search/files_4.js create mode 100644 common/glm/doc/api/search/files_5.html create mode 100644 common/glm/doc/api/search/files_5.js create mode 100644 common/glm/doc/api/search/files_6.html create mode 100644 common/glm/doc/api/search/files_6.js create mode 100644 common/glm/doc/api/search/files_7.html create mode 100644 common/glm/doc/api/search/files_7.js create mode 100644 common/glm/doc/api/search/files_8.html create mode 100644 common/glm/doc/api/search/files_8.js create mode 100644 common/glm/doc/api/search/files_9.html create mode 100644 common/glm/doc/api/search/files_9.js create mode 100644 common/glm/doc/api/search/files_a.html create mode 100644 common/glm/doc/api/search/files_a.js create mode 100644 common/glm/doc/api/search/files_b.html create mode 100644 common/glm/doc/api/search/files_b.js create mode 100644 common/glm/doc/api/search/files_c.html create mode 100644 common/glm/doc/api/search/files_c.js create mode 100644 common/glm/doc/api/search/files_d.html create mode 100644 common/glm/doc/api/search/files_d.js create mode 100644 common/glm/doc/api/search/files_e.html create mode 100644 common/glm/doc/api/search/files_e.js create mode 100644 common/glm/doc/api/search/files_f.html create mode 100644 common/glm/doc/api/search/files_f.js create mode 100644 common/glm/doc/api/search/functions_0.html create mode 100644 common/glm/doc/api/search/functions_0.js create mode 100644 common/glm/doc/api/search/functions_1.html create mode 100644 common/glm/doc/api/search/functions_1.js create mode 100644 common/glm/doc/api/search/functions_10.html create mode 100644 common/glm/doc/api/search/functions_10.js create mode 100644 common/glm/doc/api/search/functions_11.html create mode 100644 common/glm/doc/api/search/functions_11.js create mode 100644 common/glm/doc/api/search/functions_12.html create mode 100644 common/glm/doc/api/search/functions_12.js create mode 100644 common/glm/doc/api/search/functions_13.html create mode 100644 common/glm/doc/api/search/functions_13.js create mode 100644 common/glm/doc/api/search/functions_14.html create mode 100644 common/glm/doc/api/search/functions_14.js create mode 100644 common/glm/doc/api/search/functions_15.html create mode 100644 common/glm/doc/api/search/functions_15.js create mode 100644 common/glm/doc/api/search/functions_16.html create mode 100644 common/glm/doc/api/search/functions_16.js create mode 100644 common/glm/doc/api/search/functions_2.html create mode 100644 common/glm/doc/api/search/functions_2.js create mode 100644 common/glm/doc/api/search/functions_3.html create mode 100644 common/glm/doc/api/search/functions_3.js create mode 100644 common/glm/doc/api/search/functions_4.html create mode 100644 common/glm/doc/api/search/functions_4.js create mode 100644 common/glm/doc/api/search/functions_5.html create mode 100644 common/glm/doc/api/search/functions_5.js create mode 100644 common/glm/doc/api/search/functions_6.html create mode 100644 common/glm/doc/api/search/functions_6.js create mode 100644 common/glm/doc/api/search/functions_7.html create mode 100644 common/glm/doc/api/search/functions_7.js create mode 100644 common/glm/doc/api/search/functions_8.html create mode 100644 common/glm/doc/api/search/functions_8.js create mode 100644 common/glm/doc/api/search/functions_9.html create mode 100644 common/glm/doc/api/search/functions_9.js create mode 100644 common/glm/doc/api/search/functions_a.html create mode 100644 common/glm/doc/api/search/functions_a.js create mode 100644 common/glm/doc/api/search/functions_b.html create mode 100644 common/glm/doc/api/search/functions_b.js create mode 100644 common/glm/doc/api/search/functions_c.html create mode 100644 common/glm/doc/api/search/functions_c.js create mode 100644 common/glm/doc/api/search/functions_d.html create mode 100644 common/glm/doc/api/search/functions_d.js create mode 100644 common/glm/doc/api/search/functions_e.html create mode 100644 common/glm/doc/api/search/functions_e.js create mode 100644 common/glm/doc/api/search/functions_f.html create mode 100644 common/glm/doc/api/search/functions_f.js create mode 100644 common/glm/doc/api/search/groups_0.html create mode 100644 common/glm/doc/api/search/groups_0.js create mode 100644 common/glm/doc/api/search/groups_1.html create mode 100644 common/glm/doc/api/search/groups_1.js create mode 100644 common/glm/doc/api/search/groups_2.html create mode 100644 common/glm/doc/api/search/groups_2.js create mode 100644 common/glm/doc/api/search/groups_3.html create mode 100644 common/glm/doc/api/search/groups_3.js create mode 100644 common/glm/doc/api/search/groups_4.html create mode 100644 common/glm/doc/api/search/groups_4.js create mode 100644 common/glm/doc/api/search/groups_5.html create mode 100644 common/glm/doc/api/search/groups_5.js create mode 100644 common/glm/doc/api/search/groups_6.html create mode 100644 common/glm/doc/api/search/groups_6.js create mode 100644 common/glm/doc/api/search/groups_7.html create mode 100644 common/glm/doc/api/search/groups_7.js create mode 100644 common/glm/doc/api/search/groups_8.html create mode 100644 common/glm/doc/api/search/groups_8.js create mode 100644 common/glm/doc/api/search/groups_9.html create mode 100644 common/glm/doc/api/search/groups_9.js create mode 100644 common/glm/doc/api/search/groups_a.html create mode 100644 common/glm/doc/api/search/groups_a.js create mode 100644 common/glm/doc/api/search/groups_b.html create mode 100644 common/glm/doc/api/search/groups_b.js create mode 100644 common/glm/doc/api/search/mag_sel.png create mode 100644 common/glm/doc/api/search/nomatches.html create mode 100644 common/glm/doc/api/search/pages_0.html create mode 100644 common/glm/doc/api/search/pages_0.js create mode 100644 common/glm/doc/api/search/search.css create mode 100644 common/glm/doc/api/search/search.js create mode 100644 common/glm/doc/api/search/search_l.png create mode 100644 common/glm/doc/api/search/search_m.png create mode 100644 common/glm/doc/api/search/search_r.png create mode 100644 common/glm/doc/api/search/searchdata.js create mode 100644 common/glm/doc/api/search/typedefs_0.html create mode 100644 common/glm/doc/api/search/typedefs_0.js create mode 100644 common/glm/doc/api/search/typedefs_1.html create mode 100644 common/glm/doc/api/search/typedefs_1.js create mode 100644 common/glm/doc/api/search/typedefs_2.html create mode 100644 common/glm/doc/api/search/typedefs_2.js create mode 100644 common/glm/doc/api/search/typedefs_3.html create mode 100644 common/glm/doc/api/search/typedefs_3.js create mode 100644 common/glm/doc/api/search/typedefs_4.html create mode 100644 common/glm/doc/api/search/typedefs_4.js create mode 100644 common/glm/doc/api/search/typedefs_5.html create mode 100644 common/glm/doc/api/search/typedefs_5.js create mode 100644 common/glm/doc/api/search/typedefs_6.html create mode 100644 common/glm/doc/api/search/typedefs_6.js create mode 100644 common/glm/doc/api/search/typedefs_7.html create mode 100644 common/glm/doc/api/search/typedefs_7.js create mode 100644 common/glm/doc/api/search/typedefs_8.html create mode 100644 common/glm/doc/api/search/typedefs_8.js create mode 100644 common/glm/doc/api/search/typedefs_9.html create mode 100644 common/glm/doc/api/search/typedefs_9.js create mode 100644 common/glm/doc/api/search/typedefs_a.html create mode 100644 common/glm/doc/api/search/typedefs_a.js create mode 100644 common/glm/doc/api/search/typedefs_b.html create mode 100644 common/glm/doc/api/search/typedefs_b.js create mode 100644 common/glm/doc/api/search/typedefs_c.html create mode 100644 common/glm/doc/api/search/typedefs_c.js create mode 100644 common/glm/doc/api/search/typedefs_d.html create mode 100644 common/glm/doc/api/search/typedefs_d.js create mode 100644 common/glm/doc/api/splitbar.png create mode 100644 common/glm/doc/api/sync_off.png create mode 100644 common/glm/doc/api/sync_on.png create mode 100644 common/glm/doc/api/tab_a.png create mode 100644 common/glm/doc/api/tab_b.png create mode 100644 common/glm/doc/api/tab_h.png create mode 100644 common/glm/doc/api/tab_s.png create mode 100644 common/glm/doc/api/tabs.css create mode 100644 common/glm/doc/man.doxy create mode 100644 common/glm/doc/manual.pdf create mode 100644 common/glm/doc/manual/frontpage1.png create mode 100644 common/glm/doc/manual/frontpage2.png create mode 100644 common/glm/doc/manual/g-truc.png create mode 100644 common/glm/doc/manual/logo-mini.png create mode 100644 common/glm/doc/manual/noise-perlin1.jpg create mode 100644 common/glm/doc/manual/noise-perlin2.jpg create mode 100644 common/glm/doc/manual/noise-perlin3.jpg create mode 100644 common/glm/doc/manual/noise-perlin4.png create mode 100644 common/glm/doc/manual/noise-perlin5.png create mode 100644 common/glm/doc/manual/noise-perlin6.png create mode 100644 common/glm/doc/manual/noise-simplex1.jpg create mode 100644 common/glm/doc/manual/noise-simplex2.jpg create mode 100644 common/glm/doc/manual/noise-simplex3.jpg create mode 100644 common/glm/doc/manual/random-ballrand.png create mode 100644 common/glm/doc/manual/random-circularrand.png create mode 100644 common/glm/doc/manual/random-diskrand.png create mode 100644 common/glm/doc/manual/random-gaussrand.png create mode 100644 common/glm/doc/manual/random-linearrand.png create mode 100644 common/glm/doc/manual/random-sphericalrand.png create mode 100644 common/glm/doc/manual/references-cinder.png create mode 100644 common/glm/doc/manual/references-glsl4book.jpg create mode 100644 common/glm/doc/manual/references-leosfortune.jpeg create mode 100644 common/glm/doc/manual/references-leosfortune2.jpg create mode 100644 common/glm/doc/manual/references-opencloth1.png create mode 100644 common/glm/doc/manual/references-opencloth3.png create mode 100644 common/glm/doc/manual/references-outerra1.jpg create mode 100644 common/glm/doc/manual/references-outerra2.jpg create mode 100644 common/glm/doc/manual/references-outerra3.jpg create mode 100644 common/glm/doc/manual/references-outerra4.jpg create mode 100644 common/glm/doc/theme/bc_s.png create mode 100644 common/glm/doc/theme/bdwn.png create mode 100644 common/glm/doc/theme/closed.png create mode 100644 common/glm/doc/theme/doc.png create mode 100644 common/glm/doc/theme/doxygen.css create mode 100644 common/glm/doc/theme/doxygen.png create mode 100644 common/glm/doc/theme/folderclosed.png create mode 100644 common/glm/doc/theme/folderopen.png create mode 100644 common/glm/doc/theme/logo-mini.png create mode 100644 common/glm/doc/theme/nav_f.png create mode 100644 common/glm/doc/theme/nav_g.png create mode 100644 common/glm/doc/theme/nav_h.png create mode 100644 common/glm/doc/theme/open.png create mode 100644 common/glm/doc/theme/splitbar.png create mode 100644 common/glm/doc/theme/sync_off.png create mode 100644 common/glm/doc/theme/sync_on.png create mode 100644 common/glm/doc/theme/tab_a.png create mode 100644 common/glm/doc/theme/tab_b.png create mode 100644 common/glm/doc/theme/tab_h.png create mode 100644 common/glm/doc/theme/tab_s.png create mode 100644 common/glm/glm/detail/compute_common.hpp create mode 100644 common/glm/glm/detail/compute_vector_relational.hpp delete mode 100644 common/glm/glm/detail/dummy.cpp delete mode 100644 common/glm/glm/detail/func_common.hpp delete mode 100644 common/glm/glm/detail/func_exponential.hpp delete mode 100644 common/glm/glm/detail/func_geometric.hpp delete mode 100644 common/glm/glm/detail/func_integer.hpp delete mode 100644 common/glm/glm/detail/func_matrix.hpp delete mode 100644 common/glm/glm/detail/func_packing.hpp delete mode 100644 common/glm/glm/detail/func_trigonometric.hpp delete mode 100644 common/glm/glm/detail/func_vector_relational.hpp delete mode 100644 common/glm/glm/detail/precision.hpp create mode 100644 common/glm/glm/detail/qualifier.hpp delete mode 100644 common/glm/glm/detail/type_gentype.hpp delete mode 100644 common/glm/glm/detail/type_gentype.inl delete mode 100644 common/glm/glm/detail/type_int.hpp delete mode 100644 common/glm/glm/detail/type_mat.hpp delete mode 100644 common/glm/glm/detail/type_mat.inl create mode 100644 common/glm/glm/detail/type_quat.hpp create mode 100644 common/glm/glm/detail/type_quat.inl create mode 100644 common/glm/glm/detail/type_quat_simd.inl delete mode 100644 common/glm/glm/detail/type_vec.hpp delete mode 100644 common/glm/glm/detail/type_vec.inl create mode 100644 common/glm/glm/ext/matrix_clip_space.hpp create mode 100644 common/glm/glm/ext/matrix_clip_space.inl create mode 100644 common/glm/glm/ext/matrix_double2x2.hpp create mode 100644 common/glm/glm/ext/matrix_double2x2_precision.hpp create mode 100644 common/glm/glm/ext/matrix_double2x3.hpp create mode 100644 common/glm/glm/ext/matrix_double2x3_precision.hpp create mode 100644 common/glm/glm/ext/matrix_double2x4.hpp create mode 100644 common/glm/glm/ext/matrix_double2x4_precision.hpp create mode 100644 common/glm/glm/ext/matrix_double3x2.hpp create mode 100644 common/glm/glm/ext/matrix_double3x2_precision.hpp create mode 100644 common/glm/glm/ext/matrix_double3x3.hpp create mode 100644 common/glm/glm/ext/matrix_double3x3_precision.hpp create mode 100644 common/glm/glm/ext/matrix_double3x4.hpp create mode 100644 common/glm/glm/ext/matrix_double3x4_precision.hpp create mode 100644 common/glm/glm/ext/matrix_double4x2.hpp create mode 100644 common/glm/glm/ext/matrix_double4x2_precision.hpp create mode 100644 common/glm/glm/ext/matrix_double4x3.hpp create mode 100644 common/glm/glm/ext/matrix_double4x3_precision.hpp create mode 100644 common/glm/glm/ext/matrix_double4x4.hpp create mode 100644 common/glm/glm/ext/matrix_double4x4_precision.hpp create mode 100644 common/glm/glm/ext/matrix_float2x2.hpp create mode 100644 common/glm/glm/ext/matrix_float2x2_precision.hpp create mode 100644 common/glm/glm/ext/matrix_float2x3.hpp create mode 100644 common/glm/glm/ext/matrix_float2x3_precision.hpp create mode 100644 common/glm/glm/ext/matrix_float2x4.hpp create mode 100644 common/glm/glm/ext/matrix_float2x4_precision.hpp create mode 100644 common/glm/glm/ext/matrix_float3x2.hpp create mode 100644 common/glm/glm/ext/matrix_float3x2_precision.hpp create mode 100644 common/glm/glm/ext/matrix_float3x3.hpp create mode 100644 common/glm/glm/ext/matrix_float3x3_precision.hpp create mode 100644 common/glm/glm/ext/matrix_float3x4.hpp create mode 100644 common/glm/glm/ext/matrix_float3x4_precision.hpp create mode 100644 common/glm/glm/ext/matrix_float4x2.hpp create mode 100644 common/glm/glm/ext/matrix_float4x2_precision.hpp create mode 100644 common/glm/glm/ext/matrix_float4x3.hpp create mode 100644 common/glm/glm/ext/matrix_float4x3_precision.hpp create mode 100644 common/glm/glm/ext/matrix_float4x4.hpp create mode 100644 common/glm/glm/ext/matrix_float4x4_precision.hpp create mode 100644 common/glm/glm/ext/matrix_projection.hpp create mode 100644 common/glm/glm/ext/matrix_projection.inl create mode 100644 common/glm/glm/ext/matrix_relational.hpp create mode 100644 common/glm/glm/ext/matrix_relational.inl create mode 100644 common/glm/glm/ext/matrix_transform.hpp create mode 100644 common/glm/glm/ext/matrix_transform.inl create mode 100644 common/glm/glm/ext/quaternion_common.hpp create mode 100644 common/glm/glm/ext/quaternion_common.inl create mode 100644 common/glm/glm/ext/quaternion_common_simd.inl create mode 100644 common/glm/glm/ext/quaternion_double.hpp create mode 100644 common/glm/glm/ext/quaternion_double_precision.hpp create mode 100644 common/glm/glm/ext/quaternion_exponential.hpp create mode 100644 common/glm/glm/ext/quaternion_exponential.inl create mode 100644 common/glm/glm/ext/quaternion_float.hpp create mode 100644 common/glm/glm/ext/quaternion_float_precision.hpp create mode 100644 common/glm/glm/ext/quaternion_geometric.hpp create mode 100644 common/glm/glm/ext/quaternion_geometric.inl create mode 100644 common/glm/glm/ext/quaternion_relational.hpp create mode 100644 common/glm/glm/ext/quaternion_relational.inl create mode 100644 common/glm/glm/ext/quaternion_transform.hpp create mode 100644 common/glm/glm/ext/quaternion_transform.inl create mode 100644 common/glm/glm/ext/quaternion_trigonometric.hpp create mode 100644 common/glm/glm/ext/quaternion_trigonometric.inl create mode 100644 common/glm/glm/ext/scalar_common.hpp create mode 100644 common/glm/glm/ext/scalar_common.inl create mode 100644 common/glm/glm/ext/scalar_constants.hpp create mode 100644 common/glm/glm/ext/scalar_constants.inl create mode 100644 common/glm/glm/ext/scalar_int_sized.hpp create mode 100644 common/glm/glm/ext/scalar_relational.hpp create mode 100644 common/glm/glm/ext/scalar_relational.inl create mode 100644 common/glm/glm/ext/scalar_uint_sized.hpp create mode 100644 common/glm/glm/ext/scalar_ulp.hpp create mode 100644 common/glm/glm/ext/scalar_ulp.inl create mode 100644 common/glm/glm/ext/vector_bool1.hpp create mode 100644 common/glm/glm/ext/vector_bool1_precision.hpp create mode 100644 common/glm/glm/ext/vector_bool2.hpp create mode 100644 common/glm/glm/ext/vector_bool2_precision.hpp create mode 100644 common/glm/glm/ext/vector_bool3.hpp create mode 100644 common/glm/glm/ext/vector_bool3_precision.hpp create mode 100644 common/glm/glm/ext/vector_bool4.hpp create mode 100644 common/glm/glm/ext/vector_bool4_precision.hpp create mode 100644 common/glm/glm/ext/vector_common.hpp create mode 100644 common/glm/glm/ext/vector_common.inl create mode 100644 common/glm/glm/ext/vector_double1.hpp create mode 100644 common/glm/glm/ext/vector_double1_precision.hpp create mode 100644 common/glm/glm/ext/vector_double2.hpp create mode 100644 common/glm/glm/ext/vector_double2_precision.hpp create mode 100644 common/glm/glm/ext/vector_double3.hpp create mode 100644 common/glm/glm/ext/vector_double3_precision.hpp create mode 100644 common/glm/glm/ext/vector_double4.hpp create mode 100644 common/glm/glm/ext/vector_double4_precision.hpp create mode 100644 common/glm/glm/ext/vector_float1.hpp create mode 100644 common/glm/glm/ext/vector_float1_precision.hpp create mode 100644 common/glm/glm/ext/vector_float2.hpp create mode 100644 common/glm/glm/ext/vector_float2_precision.hpp create mode 100644 common/glm/glm/ext/vector_float3.hpp create mode 100644 common/glm/glm/ext/vector_float3_precision.hpp create mode 100644 common/glm/glm/ext/vector_float4.hpp create mode 100644 common/glm/glm/ext/vector_float4_precision.hpp create mode 100644 common/glm/glm/ext/vector_int1.hpp create mode 100644 common/glm/glm/ext/vector_int1_precision.hpp create mode 100644 common/glm/glm/ext/vector_int2.hpp create mode 100644 common/glm/glm/ext/vector_int2_precision.hpp create mode 100644 common/glm/glm/ext/vector_int3.hpp create mode 100644 common/glm/glm/ext/vector_int3_precision.hpp create mode 100644 common/glm/glm/ext/vector_int4.hpp create mode 100644 common/glm/glm/ext/vector_int4_precision.hpp create mode 100644 common/glm/glm/ext/vector_relational.hpp create mode 100644 common/glm/glm/ext/vector_relational.inl create mode 100644 common/glm/glm/ext/vector_uint1.hpp create mode 100644 common/glm/glm/ext/vector_uint1_precision.hpp create mode 100644 common/glm/glm/ext/vector_uint2.hpp create mode 100644 common/glm/glm/ext/vector_uint2_precision.hpp create mode 100644 common/glm/glm/ext/vector_uint3.hpp create mode 100644 common/glm/glm/ext/vector_uint3_precision.hpp create mode 100644 common/glm/glm/ext/vector_uint4.hpp create mode 100644 common/glm/glm/ext/vector_uint4_precision.hpp create mode 100644 common/glm/glm/ext/vector_ulp.hpp create mode 100644 common/glm/glm/ext/vector_ulp.inl delete mode 100644 common/glm/glm/gtc/color_encoding.inl delete mode 100644 common/glm/glm/gtc/functions.hpp delete mode 100644 common/glm/glm/gtc/vec1.inl create mode 100644 common/glm/glm/gtx/color_encoding.hpp create mode 100644 common/glm/glm/gtx/color_encoding.inl create mode 100644 common/glm/glm/gtx/easing.hpp create mode 100644 common/glm/glm/gtx/easing.inl create mode 100644 common/glm/glm/gtx/exterior_product.hpp create mode 100644 common/glm/glm/gtx/exterior_product.inl create mode 100644 common/glm/glm/gtx/functions.hpp rename common/glm/glm/{gtc => gtx}/functions.inl (50%) create mode 100644 common/glm/glm/gtx/matrix_factorisation.hpp create mode 100644 common/glm/glm/gtx/matrix_factorisation.inl delete mode 100644 common/glm/glm/gtx/simd_mat4.hpp delete mode 100644 common/glm/glm/gtx/simd_mat4.inl delete mode 100644 common/glm/glm/gtx/simd_quat.hpp delete mode 100644 common/glm/glm/gtx/simd_quat.inl delete mode 100644 common/glm/glm/gtx/simd_vec4.hpp delete mode 100644 common/glm/glm/gtx/simd_vec4.inl create mode 100644 common/glm/glm/gtx/texture.hpp create mode 100644 common/glm/glm/gtx/texture.inl create mode 100644 common/glm/glm/gtx/vec_swizzle.hpp create mode 100644 common/glm/manual.md create mode 100644 common/glm/test/CMakeLists.txt create mode 100644 common/glm/test/bug/CMakeLists.txt create mode 100644 common/glm/test/bug/bug_ms_vec_static.cpp create mode 100644 common/glm/test/core/CMakeLists.txt create mode 100644 common/glm/test/core/core_cpp_constexpr.cpp create mode 100644 common/glm/test/core/core_cpp_defaulted_ctor.cpp create mode 100644 common/glm/test/core/core_force_aligned_gentypes.cpp create mode 100644 common/glm/test/core/core_force_ctor_init.cpp create mode 100644 common/glm/test/core/core_force_explicit_ctor.cpp create mode 100644 common/glm/test/core/core_force_inline.cpp create mode 100644 common/glm/test/core/core_force_pure.cpp create mode 100644 common/glm/test/core/core_force_unrestricted_gentype.cpp create mode 100644 common/glm/test/core/core_force_xyzw_only.cpp create mode 100644 common/glm/test/core/core_func_common.cpp create mode 100644 common/glm/test/core/core_func_exponential.cpp create mode 100644 common/glm/test/core/core_func_geometric.cpp create mode 100644 common/glm/test/core/core_func_integer.cpp create mode 100644 common/glm/test/core/core_func_integer_bit_count.cpp create mode 100644 common/glm/test/core/core_func_integer_find_lsb.cpp create mode 100644 common/glm/test/core/core_func_integer_find_msb.cpp create mode 100644 common/glm/test/core/core_func_matrix.cpp create mode 100644 common/glm/test/core/core_func_noise.cpp create mode 100644 common/glm/test/core/core_func_packing.cpp create mode 100644 common/glm/test/core/core_func_swizzle.cpp create mode 100644 common/glm/test/core/core_func_trigonometric.cpp create mode 100644 common/glm/test/core/core_func_vector_relational.cpp create mode 100644 common/glm/test/core/core_setup_force_cxx98.cpp create mode 100644 common/glm/test/core/core_setup_force_size_t_length.cpp create mode 100644 common/glm/test/core/core_setup_message.cpp create mode 100644 common/glm/test/core/core_setup_platform_unknown.cpp create mode 100644 common/glm/test/core/core_setup_precision.cpp create mode 100644 common/glm/test/core/core_type_aligned.cpp create mode 100644 common/glm/test/core/core_type_cast.cpp create mode 100644 common/glm/test/core/core_type_ctor.cpp create mode 100644 common/glm/test/core/core_type_int.cpp create mode 100644 common/glm/test/core/core_type_length.cpp create mode 100644 common/glm/test/core/core_type_mat2x2.cpp create mode 100644 common/glm/test/core/core_type_mat2x3.cpp create mode 100644 common/glm/test/core/core_type_mat2x4.cpp create mode 100644 common/glm/test/core/core_type_mat3x2.cpp create mode 100644 common/glm/test/core/core_type_mat3x3.cpp create mode 100644 common/glm/test/core/core_type_mat3x4.cpp create mode 100644 common/glm/test/core/core_type_mat4x2.cpp create mode 100644 common/glm/test/core/core_type_mat4x3.cpp create mode 100644 common/glm/test/core/core_type_mat4x4.cpp create mode 100644 common/glm/test/core/core_type_vec1.cpp create mode 100644 common/glm/test/core/core_type_vec2.cpp create mode 100644 common/glm/test/core/core_type_vec3.cpp create mode 100644 common/glm/test/core/core_type_vec4.cpp create mode 100644 common/glm/test/ext/CMakeLists.txt create mode 100644 common/glm/test/ext/ext_matrix_clip_space.cpp create mode 100644 common/glm/test/ext/ext_matrix_projection.cpp create mode 100644 common/glm/test/ext/ext_matrix_relational.cpp create mode 100644 common/glm/test/ext/ext_matrix_transform.cpp create mode 100644 common/glm/test/ext/ext_quaternion_common.cpp create mode 100644 common/glm/test/ext/ext_quaternion_exponential.cpp create mode 100644 common/glm/test/ext/ext_quaternion_geometric.cpp create mode 100644 common/glm/test/ext/ext_quaternion_relational.cpp create mode 100644 common/glm/test/ext/ext_quaternion_transform.cpp create mode 100644 common/glm/test/ext/ext_quaternion_trigonometric.cpp create mode 100644 common/glm/test/ext/ext_quaternion_type.cpp create mode 100644 common/glm/test/ext/ext_scalar_common.cpp create mode 100644 common/glm/test/ext/ext_scalar_constants.cpp create mode 100644 common/glm/test/ext/ext_scalar_int_sized.cpp create mode 100644 common/glm/test/ext/ext_scalar_relational.cpp create mode 100644 common/glm/test/ext/ext_scalar_uint_sized.cpp create mode 100644 common/glm/test/ext/ext_scalar_ulp.cpp create mode 100644 common/glm/test/ext/ext_vec1.cpp create mode 100644 common/glm/test/ext/ext_vector_bool1.cpp create mode 100644 common/glm/test/ext/ext_vector_common.cpp create mode 100644 common/glm/test/ext/ext_vector_iec559.cpp create mode 100644 common/glm/test/ext/ext_vector_integer.cpp create mode 100644 common/glm/test/ext/ext_vector_relational.cpp create mode 100644 common/glm/test/ext/ext_vector_ulp.cpp create mode 100644 common/glm/test/glm.cppcheck create mode 100644 common/glm/test/gtc/CMakeLists.txt create mode 100644 common/glm/test/gtc/gtc_bitfield.cpp create mode 100644 common/glm/test/gtc/gtc_color_space.cpp create mode 100644 common/glm/test/gtc/gtc_constants.cpp create mode 100644 common/glm/test/gtc/gtc_epsilon.cpp create mode 100644 common/glm/test/gtc/gtc_integer.cpp create mode 100644 common/glm/test/gtc/gtc_matrix_access.cpp create mode 100644 common/glm/test/gtc/gtc_matrix_integer.cpp create mode 100644 common/glm/test/gtc/gtc_matrix_inverse.cpp create mode 100644 common/glm/test/gtc/gtc_matrix_transform.cpp create mode 100644 common/glm/test/gtc/gtc_noise.cpp create mode 100644 common/glm/test/gtc/gtc_packing.cpp create mode 100644 common/glm/test/gtc/gtc_quaternion.cpp create mode 100644 common/glm/test/gtc/gtc_random.cpp create mode 100644 common/glm/test/gtc/gtc_reciprocal.cpp create mode 100644 common/glm/test/gtc/gtc_round.cpp create mode 100644 common/glm/test/gtc/gtc_type_aligned.cpp create mode 100644 common/glm/test/gtc/gtc_type_precision.cpp create mode 100644 common/glm/test/gtc/gtc_type_ptr.cpp create mode 100644 common/glm/test/gtc/gtc_ulp.cpp create mode 100644 common/glm/test/gtc/gtc_user_defined_types.cpp create mode 100644 common/glm/test/gtc/gtc_vec1.cpp create mode 100644 common/glm/test/gtx/CMakeLists.txt create mode 100644 common/glm/test/gtx/gtx.cpp create mode 100644 common/glm/test/gtx/gtx_associated_min_max.cpp create mode 100644 common/glm/test/gtx/gtx_closest_point.cpp create mode 100644 common/glm/test/gtx/gtx_color_encoding.cpp create mode 100644 common/glm/test/gtx/gtx_color_space.cpp create mode 100644 common/glm/test/gtx/gtx_color_space_YCoCg.cpp create mode 100644 common/glm/test/gtx/gtx_common.cpp create mode 100644 common/glm/test/gtx/gtx_compatibility.cpp create mode 100644 common/glm/test/gtx/gtx_component_wise.cpp create mode 100644 common/glm/test/gtx/gtx_dual_quaternion.cpp create mode 100644 common/glm/test/gtx/gtx_easing.cpp create mode 100644 common/glm/test/gtx/gtx_euler_angle.cpp create mode 100644 common/glm/test/gtx/gtx_extend.cpp create mode 100644 common/glm/test/gtx/gtx_extended_min_max.cpp create mode 100644 common/glm/test/gtx/gtx_extented_min_max.cpp create mode 100644 common/glm/test/gtx/gtx_exterior_product.cpp create mode 100644 common/glm/test/gtx/gtx_fast_exponential.cpp create mode 100644 common/glm/test/gtx/gtx_fast_square_root.cpp create mode 100644 common/glm/test/gtx/gtx_fast_trigonometry.cpp create mode 100644 common/glm/test/gtx/gtx_functions.cpp create mode 100644 common/glm/test/gtx/gtx_gradient_paint.cpp create mode 100644 common/glm/test/gtx/gtx_handed_coordinate_space.cpp create mode 100644 common/glm/test/gtx/gtx_int_10_10_10_2.cpp create mode 100644 common/glm/test/gtx/gtx_integer.cpp create mode 100644 common/glm/test/gtx/gtx_intersect.cpp create mode 100644 common/glm/test/gtx/gtx_io.cpp create mode 100644 common/glm/test/gtx/gtx_load.cpp create mode 100644 common/glm/test/gtx/gtx_log_base.cpp create mode 100644 common/glm/test/gtx/gtx_matrix_cross_product.cpp create mode 100644 common/glm/test/gtx/gtx_matrix_decompose.cpp create mode 100644 common/glm/test/gtx/gtx_matrix_factorisation.cpp create mode 100644 common/glm/test/gtx/gtx_matrix_interpolation.cpp create mode 100644 common/glm/test/gtx/gtx_matrix_major_storage.cpp create mode 100644 common/glm/test/gtx/gtx_matrix_operation.cpp create mode 100644 common/glm/test/gtx/gtx_matrix_query.cpp create mode 100644 common/glm/test/gtx/gtx_matrix_transform_2d.cpp create mode 100644 common/glm/test/gtx/gtx_mixed_product.cpp create mode 100644 common/glm/test/gtx/gtx_norm.cpp create mode 100644 common/glm/test/gtx/gtx_normal.cpp create mode 100644 common/glm/test/gtx/gtx_normalize_dot.cpp create mode 100644 common/glm/test/gtx/gtx_number_precision.cpp create mode 100644 common/glm/test/gtx/gtx_optimum_pow.cpp create mode 100644 common/glm/test/gtx/gtx_orthonormalize.cpp create mode 100644 common/glm/test/gtx/gtx_perpendicular.cpp create mode 100644 common/glm/test/gtx/gtx_polar_coordinates.cpp create mode 100644 common/glm/test/gtx/gtx_projection.cpp create mode 100644 common/glm/test/gtx/gtx_quaternion.cpp create mode 100644 common/glm/test/gtx/gtx_random.cpp create mode 100644 common/glm/test/gtx/gtx_range.cpp create mode 100644 common/glm/test/gtx/gtx_rotate_normalized_axis.cpp create mode 100644 common/glm/test/gtx/gtx_rotate_vector.cpp create mode 100644 common/glm/test/gtx/gtx_scalar_multiplication.cpp create mode 100644 common/glm/test/gtx/gtx_scalar_relational.cpp create mode 100644 common/glm/test/gtx/gtx_simd_mat4.cpp create mode 100644 common/glm/test/gtx/gtx_simd_vec4.cpp create mode 100644 common/glm/test/gtx/gtx_spline.cpp create mode 100644 common/glm/test/gtx/gtx_string_cast.cpp create mode 100644 common/glm/test/gtx/gtx_texture.cpp create mode 100644 common/glm/test/gtx/gtx_type_aligned.cpp create mode 100644 common/glm/test/gtx/gtx_type_trait.cpp create mode 100644 common/glm/test/gtx/gtx_vec_swizzle.cpp create mode 100644 common/glm/test/gtx/gtx_vector_angle.cpp create mode 100644 common/glm/test/gtx/gtx_vector_query.cpp create mode 100644 common/glm/test/gtx/gtx_wrap.cpp create mode 100644 common/glm/test/perf/CMakeLists.txt create mode 100644 common/glm/test/perf/perf_matrix_div.cpp create mode 100644 common/glm/test/perf/perf_matrix_inverse.cpp create mode 100644 common/glm/test/perf/perf_matrix_mul.cpp create mode 100644 common/glm/test/perf/perf_matrix_mul_vector.cpp create mode 100644 common/glm/test/perf/perf_matrix_transpose.cpp create mode 100644 common/glm/test/perf/perf_vector_mul_matrix.cpp create mode 100644 common/glm/util/autoexp.txt create mode 100644 common/glm/util/autoexp.vc2010.dat create mode 100644 common/glm/util/glm.natvis create mode 100644 common/glm/util/usertype.dat diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f3694698..10f2362c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -285,6 +285,8 @@ ADD_DEFINITIONS(-DLOG_LEVEL_QUEST=${EQEMU_LOG_LEVEL_QUEST}) ADD_DEFINITIONS(-DLOG_LEVEL_COMMANDS=${EQEMU_LOG_LEVEL_COMMANDS}) ADD_DEFINITIONS(-DLOG_LEVEL_CRASH=${EQEMU_LOG_LEVEL_CRASH}) ADD_DEFINITIONS(-DGLM_FORCE_RADIANS) +ADD_DEFINITIONS(-DGLM_FORCE_CTOR_INIT) +ADD_DEFINITIONS(-DGLM_ENABLE_EXPERIMENTAL) #Find everything we need FIND_PACKAGE(ZLIB REQUIRED) diff --git a/common/glm/.appveyor.yml b/common/glm/.appveyor.yml new file mode 100644 index 000000000..61e105017 --- /dev/null +++ b/common/glm/.appveyor.yml @@ -0,0 +1,61 @@ +shallow_clone: true + +platform: + - x86 + - x64 + +configuration: + - Debug + - Release + +image: + - Visual Studio 2013 + - Visual Studio 2015 + - Visual Studio 2017 + +environment: + matrix: + - GLM_ARGUMENTS: -DGLM_TEST_FORCE_PURE=ON + - GLM_ARGUMENTS: -DGLM_TEST_ENABLE_SIMD_SSE2=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON + - GLM_ARGUMENTS: -DGLM_TEST_ENABLE_SIMD_AVX=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON + +matrix: + exclude: + - image: Visual Studio 2013 + GLM_ARGUMENTS: -DGLM_TEST_ENABLE_SIMD_AVX=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON + - image: Visual Studio 2013 + configuration: Debug + - image: Visual Studio 2015 + platform: x86 + - image: Visual Studio 2015 + configuration: Debug + - image: Visual Studio 2017 + platform: x86 + +before_build: + - ps: | + mkdir build + cd build + + if ("$env:APPVEYOR_JOB_NAME" -match "Image: Visual Studio 2013") { + $env:generator="Visual Studio 12 2013" + } + if ("$env:APPVEYOR_JOB_NAME" -match "Image: Visual Studio 2015") { + $env:generator="Visual Studio 14 2015" + } + if ("$env:APPVEYOR_JOB_NAME" -match "Image: Visual Studio 2017") { + $env:generator="Visual Studio 15 2017" + } + if ($env:PLATFORM -eq "x64") { + $env:generator="$env:generator Win64" + } + echo generator="$env:generator" + cmake .. -G "$env:generator" -DGLM_QUIET=ON -DGLM_TEST_ENABLE=ON "$env:GLM_ARGUMENTS" + +build_script: + - cmake --build . --config %CONFIGURATION% -- /m /v:minimal + +test_script: + - ctest -j4 -C %CONFIGURATION% + +deploy: off diff --git a/common/glm/.gitignore b/common/glm/.gitignore new file mode 100644 index 000000000..6f38000d9 --- /dev/null +++ b/common/glm/.gitignore @@ -0,0 +1,57 @@ +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app + +# CMake +CMakeCache.txt +CMakeFiles +cmake_install.cmake +install_manifest.txt +*.cmake +# ^ May need to add future .cmake files as exceptions + +# Test logs +Testing/* + +# Test input +test/gtc/*.dds + +# Project Files +Makefile +*.cbp +*.user + +# Misc. +*.log + +# local build(s) +build* + +/.vs +/CMakeSettings.json +.DS_Store diff --git a/common/glm/.travis.yml b/common/glm/.travis.yml new file mode 100644 index 000000000..bb54a0a46 --- /dev/null +++ b/common/glm/.travis.yml @@ -0,0 +1,575 @@ +language: cpp + +matrix: + include: + - os: osx + osx_image: xcode6.4 + script: + - cmake --version + - mkdir ./build_unknown_release + - cd ./build_unknown_release + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_DISABLE_AUTO_DETECTION=ON .. + - cmake -E time cmake --build . + - ctest + env: + - MATRIX_EVAL="INFO=C++unknown-release" + + - os: osx + osx_image: xcode6.4 + script: + - cmake --version + - mkdir ./build_pure_98_release + - cd ./build_pure_98_release + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_FORCE_PURE=ON .. + - cmake -E time cmake --build . + - ctest + env: + - MATRIX_EVAL="INFO=C++98-pure-release" + + - os: osx + osx_image: xcode6.4 + script: + - cmake --version + - mkdir ./build_pure_ms_release + - cd ./build_pure_ms_release + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON .. + - cmake -E time cmake --build . + - ctest + env: + - MATRIX_EVAL="INFO=C++98-pure-ms-release" + + - os: osx + osx_image: xcode6.4 + script: + - cmake --version + - mkdir ./build_pure_11_release + - cd ./build_pure_11_release + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_FORCE_PURE=ON .. + - cmake -E time cmake --build . + - ctest + env: + - MATRIX_EVAL="INFO=C++11-pure-release" + + - os: osx + osx_image: xcode6.4 + script: + - cmake --version + - mkdir ./build_sse2_11_release + - cd ./build_sse2_11_release + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE2=ON .. + - cmake -E time cmake --build . + - ctest + env: + - MATRIX_EVAL="INFO=C++11-sse2-release" + + - os: osx + osx_image: xcode8 + script: + - cmake --version + - mkdir ./build_pure_14_release + - cd ./build_pure_14_release + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_FORCE_PURE=ON .. + - cmake -E time cmake --build . + - ctest + env: + - MATRIX_EVAL="INFO=C++14-pure-release" + + - os: osx + osx_image: xcode8 + script: + - cmake --version + - mkdir ./build_sse3_14_release + - cd ./build_sse3_14_release + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON .. + - cmake -E time cmake --build . + - ctest + env: + - MATRIX_EVAL="INFO=C++14-sse3-release" + + - os: osx + osx_image: xcode8 + script: + - cmake --version + - mkdir ./build_avx_14_release + - cd ./build_avx_14_release + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON .. + - cmake -E time cmake --build . + - ctest + env: + - MATRIX_EVAL="INFO=C++14-avx-release" + + - os: osx + osx_image: xcode8 + script: + - cmake --version + - mkdir ./build_avx_14_debug + - cd ./build_avx_14_debug + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON .. + - cmake -E time cmake --build . + - ctest + env: + - MATRIX_EVAL="INFO=C++14-avx-debug" + + - os: osx + osx_image: xcode10 + script: + - cmake --version + - mkdir ./build_pure_17_release + - cd ./build_pure_17_release + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON .. + - cmake -E time cmake --build . + - ctest + env: + - MATRIX_EVAL="INFO=C++17-pure-release" + + - os: osx + osx_image: xcode10 + script: + - cmake --version + - mkdir ./build_pure_17_debug + - cd ./build_pure_17_debug + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON .. + - cmake -E time cmake --build . + - ctest + env: + - MATRIX_EVAL="INFO=C++17-pure-debug" + + - os: osx + osx_image: xcode10 + script: + - cmake --version + - mkdir ./build_avx_17_release + - cd ./build_avx_17_release + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON .. + - cmake -E time cmake --build . + - ctest + env: + - MATRIX_EVAL="INFO=C++17-avx-release" + + - os: osx + osx_image: xcode10 + script: + - cmake --version + - mkdir ./build_avx_17_debug + - cd ./build_avx_17_debug + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON .. + - cmake -E time cmake --build . + - ctest + env: + - MATRIX_EVAL="INFO=C++17-avx-debug" + + - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-4.9 + env: + - MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9 && INFO=C++98-pure-release" + script: + - cmake --version + - mkdir ./build_pure_98_release + - cd ./build_pure_98_release + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_FORCE_PURE=ON .. + - cmake --build . + - ctest + + - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-4.9 + env: + - MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9 && INFO=C++98-pure-debug" + script: + - cmake --version + - mkdir ./build_pure_98_debug + - cd ./build_pure_98_debug + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_FORCE_PURE=ON .. + - cmake --build . + - ctest + + - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-4.9 + env: + - MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9 && INFO=C++98-pure-ms" + script: + - cmake --version + - mkdir ./build_pure_ms_release + - cd ./build_pure_ms_release + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_FORCE_PURE=ON .. + - cmake --build . + - ctest + + - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-5 + env: + - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5 && INFO=C++11-pure-release" + script: + - cmake --version + - mkdir ./build_pure_11_release + - cd ./build_pure_11_release + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_FORCE_PURE=ON .. + - cmake --build . + - ctest + + - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-5 + env: + - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5 && INFO=C++11-pure-debug" + script: + - cmake --version + - mkdir ./build_pure_11_debug + - cd ./build_pure_11_debug + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_FORCE_PURE=ON .. + - cmake --build . + - ctest + + - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-5 + env: + - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5 && INFO=C++11-pure-ms" + script: + - cmake --version + - mkdir ./build_pure_ms_release + - cd ./build_pure_ms_release + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_FORCE_PURE=ON .. + - cmake --build . + - ctest + + - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-5 + env: + - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5 && INFO=C++11-sse3-release" + script: + - cmake --version + - mkdir ./build_sse3_ms_release + - cd ./build_sse3_ms_release + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON .. + - cmake --build . + - ctest + + - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-6 + env: + - MATRIX_EVAL="CC=gcc-6 && CXX=g++-6 && INFO=C++14-pure-release" + script: + - cmake --version + - mkdir ./build_pure_14_release + - cd ./build_pure_14_release + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_FORCE_PURE=ON .. + - cmake --build . + - ctest + + - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-6 + env: + - MATRIX_EVAL="CC=gcc-6 && CXX=g++-6 && INFO=C++14-pure-debug" + script: + - cmake --version + - mkdir ./build_pure_14_debug + - cd ./build_pure_14_debug + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_FORCE_PURE=ON .. + - cmake --build . + - ctest + + - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-6 + env: + - MATRIX_EVAL="CC=gcc-6 && CXX=g++-6 && INFO=C++14-pure-ms" + script: + - cmake --version + - mkdir ./build_pure_ms_release + - cd ./build_pure_ms_release + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_FORCE_PURE=ON .. + - cmake --build . + - ctest + + - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-6 + env: + - MATRIX_EVAL="CC=gcc-6 && CXX=g++-6 && INFO=C++14-sse3-release" + script: + - cmake --version + - mkdir ./build_sse3_ms_release + - cd ./build_sse3_ms_release + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON .. + - cmake --build . + - ctest + + - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-7 + env: + - MATRIX_EVAL="CC=gcc-7 && CXX=g++-7 && INFO=C++17-pure-release" + script: + - cmake --version + - mkdir ./build_pure_17_release + - cd ./build_pure_17_release + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON .. + - cmake -E time cmake --build . + - ctest + + - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-7 + env: + - MATRIX_EVAL="CC=gcc-7 && CXX=g++-7 && INFO=C++17-sse2-release" + script: + - cmake --version + - mkdir ./build_sse2_17_release + - cd ./build_sse2_17_release + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE2=ON .. + - cmake -E time cmake --build . + - ctest + + - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-7 + env: + - MATRIX_EVAL="CC=gcc-7 && CXX=g++-7 && INFO=C++17-sse3-release" + script: + - cmake --version + - mkdir ./build_sse3_17_release + - cd ./build_sse3_17_release + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON .. + - cmake -E time cmake --build . + - ctest + + - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-7 + env: + - MATRIX_EVAL="CC=gcc-7 && CXX=g++-7 && INFO=C++17-avx-release" + script: + - cmake --version + - mkdir ./build_avx_17_release + - cd ./build_avx_17_release + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON .. + - cmake -E time cmake --build . + - ctest + + - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-7 + env: + - MATRIX_EVAL="CC=gcc-7 && CXX=g++-7 && INFO=C++17-avx2-release" + script: + - cmake --version + - mkdir ./build_avx2_17_release + - cd ./build_avx2_17_release + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX2=ON .. + - cmake -E time cmake --build . + - ctest + + - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-precise-3.6 + packages: + - clang-3.6 + env: + - MATRIX_EVAL="CC=clang-3.6 && CXX=clang++-3.6 && INFO=C++14-pure-release" + script: + - cmake --version + - mkdir ./build_pure_14_release + - cd ./build_pure_14_release + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_FORCE_PURE=ON .. + - cmake -E time cmake --build . + - ctest + + - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-precise-3.6 + packages: + - clang-3.6 + env: + - MATRIX_EVAL="CC=clang-3.6 && CXX=clang++-3.6 && INFO=C++14-pure-debug" + script: + - cmake --version + - mkdir ./build_pure_14_debug + - cd ./build_pure_14_debug + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_FORCE_PURE=ON .. + - cmake -E time cmake --build . + - ctest + + - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-precise-3.6 + packages: + - clang-3.6 + env: + - MATRIX_EVAL="CC=clang-3.6 && CXX=clang++-3.6 && INFO=C++14-avx-debug" + script: + - cmake --version + - mkdir ./build_avx_14_debug + - cd ./build_avx_14_debug + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON .. + - cmake -E time cmake --build . + - ctest + + - os: linux + addons: + apt: + sources: + - llvm-toolchain-trusty-5.0 + packages: + - clang-5.0 + env: + - MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0 && INFO=C++17-pure-release" + script: + - cmake --version + - mkdir ./build_pure_17_release + - cd ./build_pure_17_release + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON .. + - cmake -E time cmake --build . + - ctest + + - os: linux + addons: + apt: + sources: + - llvm-toolchain-trusty-5.0 + packages: + - clang-5.0 + env: + - MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0 && INFO=C++17-pure-debug" + script: + - cmake --version + - mkdir ./build_pure_17_debug + - cd ./build_pure_17_debug + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON .. + - cmake -E time cmake --build . + - ctest + + - os: linux + addons: + apt: + sources: + - llvm-toolchain-trusty-5.0 + packages: + - clang-5.0 + env: + - MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0 && INFO=C++17-sse3-release" + script: + - cmake --version + - mkdir ./build_sse3_17_release + - cd ./build_sse3_17_release + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON .. + - cmake -E time cmake --build . + - ctest + + - os: linux + addons: + apt: + sources: + - llvm-toolchain-trusty-5.0 + packages: + - clang-5.0 + env: + - MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0 && INFO=C++17-sse3-debug" + script: + - cmake --version + - mkdir ./build_sse3_17_debug + - cd ./build_sse3_17_debug + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON .. + - cmake -E time cmake --build . + - ctest + + - os: linux + addons: + apt: + sources: + - llvm-toolchain-trusty-5.0 + packages: + - clang-5.0 + env: + - MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0 && INFO=C++17-ssse3-release" + script: + - cmake --version + - mkdir ./build_ssse3_17_release + - cd ./build_ssse3_17_release + - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSSE3=ON .. + - cmake -E time cmake --build . + - ctest + +before_install: + - eval "${MATRIX_EVAL}" + + diff --git a/common/glm/CMakeLists.txt b/common/glm/CMakeLists.txt new file mode 100644 index 000000000..756673a39 --- /dev/null +++ b/common/glm/CMakeLists.txt @@ -0,0 +1,277 @@ +cmake_minimum_required(VERSION 3.2 FATAL_ERROR) +cmake_policy(VERSION 3.2) + +set(GLM_VERSION "0.9.9") +project(glm VERSION ${GLM_VERSION} LANGUAGES CXX) + +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + +include(GNUInstallDirs) +include(CMakePackageConfigHelpers) + +enable_testing() + +option(GLM_QUIET "No CMake Message" OFF) +option(GLM_TEST_ENABLE_CXX_98 "Enable C++ 98" OFF) +option(GLM_TEST_ENABLE_CXX_11 "Enable C++ 11" OFF) +option(GLM_TEST_ENABLE_CXX_14 "Enable C++ 14" OFF) +option(GLM_TEST_ENABLE_CXX_17 "Enable C++ 17" OFF) +option(GLM_TEST_ENABLE_CXX_20 "Enable C++ 20" OFF) + +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +if(GLM_TEST_ENABLE_CXX_20) + set(CMAKE_CXX_STANDARD 20) + add_definitions(-DGLM_FORCE_CXX2A) + if(NOT GLM_QUIET) + message(STATUS "GLM: Build with C++20 features") + endif() + +elseif(GLM_TEST_ENABLE_CXX_17) + set(CMAKE_CXX_STANDARD 17) + add_definitions(-DGLM_FORCE_CXX17) + if(NOT GLM_QUIET) + message(STATUS "GLM: Build with C++17 features") + endif() + +elseif(GLM_TEST_ENABLE_CXX_14) + set(CMAKE_CXX_STANDARD 14) + add_definitions(-DGLM_FORCE_CXX14) + if(NOT GLM_QUIET) + message(STATUS "GLM: Build with C++14 features") + endif() + +elseif(GLM_TEST_ENABLE_CXX_11) + set(CMAKE_CXX_STANDARD 11) + add_definitions(-DGLM_FORCE_CXX11) + if(NOT GLM_QUIET) + message(STATUS "GLM: Build with C++11 features") + endif() + +elseif(GLM_TEST_ENABLE_CXX_98) + set(CMAKE_CXX_STANDARD 98) + add_definitions(-DGLM_FORCE_CXX98) + if(NOT GLM_QUIET) + message(STATUS "GLM: Build with C++98 features") + endif() +endif() + +option(GLM_TEST_ENABLE_LANG_EXTENSIONS "Enable language extensions" OFF) + +option(GLM_DISABLE_AUTO_DETECTION "Enable language extensions" OFF) + +if(GLM_DISABLE_AUTO_DETECTION) + add_definitions(-DGLM_FORCE_PLATFORM_UNKNOWN -DGLM_FORCE_COMPILER_UNKNOWN -DGLM_FORCE_ARCH_UNKNOWN -DGLM_FORCE_CXX_UNKNOWN) +endif() + +if(GLM_TEST_ENABLE_LANG_EXTENSIONS) + set(CMAKE_CXX_EXTENSIONS ON) + if((CMAKE_CXX_COMPILER_ID MATCHES "Clang") OR (CMAKE_CXX_COMPILER_ID MATCHES "GNU")) + add_compile_options(-fms-extensions) + endif() + message(STATUS "GLM: Build with C++ language extensions") +else() + set(CMAKE_CXX_EXTENSIONS OFF) + if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + add_compile_options(/Za) + if(MSVC15) + add_compile_options(/permissive-) + endif() + endif() +endif() + +option(GLM_TEST_ENABLE_FAST_MATH "Enable fast math optimizations" OFF) +if(GLM_TEST_ENABLE_FAST_MATH) + if(NOT GLM_QUIET) + message(STATUS "GLM: Build with fast math optimizations") + endif() + + if((CMAKE_CXX_COMPILER_ID MATCHES "Clang") OR (CMAKE_CXX_COMPILER_ID MATCHES "GNU")) + add_compile_options(-ffast-math) + + elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + add_compile_options(/fp:fast) + endif() +else() + if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + add_compile_options(/fp:precise) + endif() +endif() + +option(GLM_TEST_ENABLE "Build unit tests" ON) +option(GLM_TEST_ENABLE_SIMD_SSE2 "Enable SSE2 optimizations" OFF) +option(GLM_TEST_ENABLE_SIMD_SSE3 "Enable SSE3 optimizations" OFF) +option(GLM_TEST_ENABLE_SIMD_SSSE3 "Enable SSSE3 optimizations" OFF) +option(GLM_TEST_ENABLE_SIMD_SSE4_1 "Enable SSE 4.1 optimizations" OFF) +option(GLM_TEST_ENABLE_SIMD_SSE4_2 "Enable SSE 4.2 optimizations" OFF) +option(GLM_TEST_ENABLE_SIMD_AVX "Enable AVX optimizations" OFF) +option(GLM_TEST_ENABLE_SIMD_AVX2 "Enable AVX2 optimizations" OFF) +option(GLM_TEST_FORCE_PURE "Force 'pure' instructions" OFF) + +if(GLM_TEST_FORCE_PURE) + add_definitions(-DGLM_FORCE_PURE) + + if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") + add_compile_options(-mfpmath=387) + endif() + message(STATUS "GLM: No SIMD instruction set") + +elseif(GLM_TEST_ENABLE_SIMD_AVX2) + if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) + add_compile_options(-mavx2) + elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel") + add_compile_options(/QxAVX2) + elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + add_compile_options(/arch:AVX2) + endif() + message(STATUS "GLM: AVX2 instruction set") + +elseif(GLM_TEST_ENABLE_SIMD_AVX) + if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) + add_compile_options(-mavx) + elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel") + add_compile_options(/QxAVX) + elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + add_compile_options(/arch:AVX) + endif() + message(STATUS "GLM: AVX instruction set") + +elseif(GLM_TEST_ENABLE_SIMD_SSE4_2) + if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) + add_compile_options(-msse4.2) + elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel") + add_compile_options(/QxSSE4.2) + elseif((CMAKE_CXX_COMPILER_ID MATCHES "MSVC") AND NOT CMAKE_CL_64) + add_compile_options(/arch:SSE2) # VC doesn't support SSE4.2 + endif() + message(STATUS "GLM: SSE4.2 instruction set") + +elseif(GLM_TEST_ENABLE_SIMD_SSE4_1) + if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) + add_compile_options(-msse4.1) + elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel") + add_compile_options(/QxSSE4.1) + elseif((CMAKE_CXX_COMPILER_ID MATCHES "MSVC") AND NOT CMAKE_CL_64) + add_compile_options(/arch:SSE2) # VC doesn't support SSE4.1 + endif() + message(STATUS "GLM: SSE4.1 instruction set") + +elseif(GLM_TEST_ENABLE_SIMD_SSSE3) + if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) + add_compile_options(-mssse3) + elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel") + add_compile_options(/QxSSSE3) + elseif((CMAKE_CXX_COMPILER_ID MATCHES "MSVC") AND NOT CMAKE_CL_64) + add_compile_options(/arch:SSE2) # VC doesn't support SSSE3 + endif() + message(STATUS "GLM: SSSE3 instruction set") + +elseif(GLM_TEST_ENABLE_SIMD_SSE3) + if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) + add_compile_options(-msse3) + elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel") + add_compile_options(/QxSSE3) + elseif((CMAKE_CXX_COMPILER_ID MATCHES "MSVC") AND NOT CMAKE_CL_64) + add_compile_options(/arch:SSE2) # VC doesn't support SSE3 + endif() + message(STATUS "GLM: SSE3 instruction set") + +elseif(GLM_TEST_ENABLE_SIMD_SSE2) + if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) + add_compile_options(-msse2) + elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel") + add_compile_options(/QxSSE2) + elseif((CMAKE_CXX_COMPILER_ID MATCHES "MSVC") AND NOT CMAKE_CL_64) + add_compile_options(/arch:SSE2) + endif() + message(STATUS "GLM: SSE2 instruction set") +endif() + +# Compiler and default options + +if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + if(NOT GLM_QUIET) + message("GLM: Clang - ${CMAKE_CXX_COMPILER_ID} compiler") + endif() + + add_compile_options(-Werror -Weverything) + add_compile_options(-Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-c++11-long-long -Wno-padded -Wno-gnu-anonymous-struct -Wno-nested-anon-types) + add_compile_options(-Wno-undefined-reinterpret-cast -Wno-sign-conversion -Wno-unused-variable -Wno-missing-prototypes -Wno-unreachable-code -Wno-missing-variable-declarations -Wno-sign-compare -Wno-global-constructors -Wno-unused-macros -Wno-format-nonliteral) + +elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") + if(NOT GLM_QUIET) + message("GLM: GCC - ${CMAKE_CXX_COMPILER_ID} compiler") + endif() + + add_compile_options(-O2) + add_compile_options(-Wno-long-long) + +elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel") + if(NOT GLM_QUIET) + message("GLM: Intel - ${CMAKE_CXX_COMPILER_ID} compiler") + endif() + +elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + if(NOT GLM_QUIET) + message("GLM: Visual C++ - ${CMAKE_CXX_COMPILER_ID} compiler") + endif() + + add_compile_options(/W4 /WX) + add_compile_options(/wd4309 /wd4324 /wd4389 /wd4127 /wd4267 /wd4146 /wd4201 /wd4464 /wd4514 /wd4701 /wd4820 /wd4365) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) +endif() + +include_directories("${PROJECT_SOURCE_DIR}") + +add_subdirectory(glm) +add_subdirectory(test) + +set(GLM_INSTALL_CONFIGDIR "${CMAKE_INSTALL_LIBDIR}/cmake/glm") +install(DIRECTORY glm DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + +write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake" VERSION ${GLM_VERSION} COMPATIBILITY AnyNewerVersion) + +# build tree package config +configure_file(cmake/glmBuildConfig.cmake.in glmConfig.cmake @ONLY) + +# install tree package config +configure_package_config_file( + cmake/glmConfig.cmake.in + ${GLM_INSTALL_CONFIGDIR}/glmConfig.cmake + INSTALL_DESTINATION ${GLM_INSTALL_CONFIGDIR} + PATH_VARS CMAKE_INSTALL_INCLUDEDIR + NO_CHECK_REQUIRED_COMPONENTS_MACRO) + +install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/${GLM_INSTALL_CONFIGDIR}/glmConfig.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake" + DESTINATION ${GLM_INSTALL_CONFIGDIR}) + +add_library(glm INTERFACE) +target_include_directories(glm INTERFACE + $ + $) +install(TARGETS glm EXPORT glmTargets) + +export(EXPORT glmTargets FILE "${CMAKE_CURRENT_BINARY_DIR}/glmTargets.cmake") + +install(EXPORT glmTargets FILE glmTargets.cmake DESTINATION ${GLM_INSTALL_CONFIGDIR}) + +# build pkg-config file +configure_file("./cmake/glm.pc.in" "glm.pc" @ONLY) + +# install pkg-config file +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glm.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") + +export(PACKAGE glm) + +if(NOT TARGET uninstall) + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake + IMMEDIATE @ONLY) + + add_custom_target(uninstall + COMMAND ${CMAKE_COMMAND} -P + ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) +endif() diff --git a/common/glm/cmake/glm.pc.in b/common/glm/cmake/glm.pc.in new file mode 100644 index 000000000..fc5c7bb7f --- /dev/null +++ b/common/glm/cmake/glm.pc.in @@ -0,0 +1,7 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +includedir=${prefix}/include + +Name: GLM +Description: OpenGL Mathematics +Version: @GLM_VERSION@ +Cflags: -I${includedir} diff --git a/common/glm/cmake/glmBuildConfig.cmake.in b/common/glm/cmake/glmBuildConfig.cmake.in new file mode 100644 index 000000000..1258dea14 --- /dev/null +++ b/common/glm/cmake/glmBuildConfig.cmake.in @@ -0,0 +1,6 @@ +set(GLM_VERSION "@GLM_VERSION@") +set(GLM_INCLUDE_DIRS "@CMAKE_CURRENT_SOURCE_DIR@") + +if (NOT CMAKE_VERSION VERSION_LESS "3.0") + include("${CMAKE_CURRENT_LIST_DIR}/glmTargets.cmake") +endif() diff --git a/common/glm/cmake/glmConfig.cmake.in b/common/glm/cmake/glmConfig.cmake.in new file mode 100644 index 000000000..37d5ad811 --- /dev/null +++ b/common/glm/cmake/glmConfig.cmake.in @@ -0,0 +1,9 @@ +set(GLM_VERSION "@GLM_VERSION@") + +@PACKAGE_INIT@ + +set_and_check(GLM_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@") + +if (NOT CMAKE_VERSION VERSION_LESS "3.0") + include("${CMAKE_CURRENT_LIST_DIR}/glmTargets.cmake") +endif() diff --git a/common/glm/cmake_uninstall.cmake.in b/common/glm/cmake_uninstall.cmake.in new file mode 100644 index 000000000..d00a51665 --- /dev/null +++ b/common/glm/cmake_uninstall.cmake.in @@ -0,0 +1,26 @@ +if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") + message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") +endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") + +if (NOT DEFINED CMAKE_INSTALL_PREFIX) + set (CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@") +endif () + message(${CMAKE_INSTALL_PREFIX}) + +file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) +string(REGEX REPLACE "\n" ";" files "${files}") +foreach(file ${files}) + message(STATUS "Uninstalling $ENV{DESTDIR}${file}") + if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") + exec_program( + "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" + OUTPUT_VARIABLE rm_out + RETURN_VALUE rm_retval + ) + if(NOT "${rm_retval}" STREQUAL 0) + message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") + endif(NOT "${rm_retval}" STREQUAL 0) + else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") + message(STATUS "File $ENV{DESTDIR}${file} does not exist.") + endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") +endforeach(file) diff --git a/common/glm/copying.txt b/common/glm/copying.txt deleted file mode 100644 index 7c20b4a67..000000000 --- a/common/glm/copying.txt +++ /dev/null @@ -1,54 +0,0 @@ -================================================================================ -OpenGL Mathematics (GLM) --------------------------------------------------------------------------------- -GLM can be distributed and/or modified under the terms of either -a) The Happy Bunny License, or b) the MIT License. - -================================================================================ -The Happy Bunny License (Modified MIT License) --------------------------------------------------------------------------------- -Copyright (c) 2005 - 2016 G-Truc Creation - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -Restrictions: By making use of the Software for military purposes, you choose -to make a Bunny unhappy. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -================================================================================ -The MIT License --------------------------------------------------------------------------------- -Copyright (c) 2005 - 2016 G-Truc Creation - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/common/glm/doc/api/a00002.html b/common/glm/doc/api/a00002.html new file mode 100644 index 000000000..e719c4b5d --- /dev/null +++ b/common/glm/doc/api/a00002.html @@ -0,0 +1,207 @@ + + + + + + + +0.9.9 API documenation: common.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
common.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType abs (genType x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > abs (vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > ceil (vec< L, T, Q > const &x)
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType clamp (genType x, genType minVal, genType maxVal)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > clamp (vec< L, T, Q > const &x, T minVal, T maxVal)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > clamp (vec< L, T, Q > const &x, vec< L, T, Q > const &minVal, vec< L, T, Q > const &maxVal)
 
GLM_FUNC_DECL int floatBitsToInt (float const &v)
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL vec< L, int, Q > floatBitsToInt (vec< L, float, Q > const &v)
 
GLM_FUNC_DECL uint floatBitsToUint (float const &v)
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL vec< L, uint, Q > floatBitsToUint (vec< L, float, Q > const &v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > floor (vec< L, T, Q > const &x)
 
template<typename genType >
GLM_FUNC_DECL genType fma (genType const &a, genType const &b, genType const &c)
 
template<typename genType >
GLM_FUNC_DECL genType fract (genType x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fract (vec< L, T, Q > const &x)
 
template<typename genType , typename genIType >
GLM_FUNC_DECL genType frexp (genType const &x, genIType &exp)
 
GLM_FUNC_DECL float intBitsToFloat (int const &v)
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL vec< L, float, Q > intBitsToFloat (vec< L, int, Q > const &v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, bool, Q > isinf (vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, bool, Q > isnan (vec< L, T, Q > const &x)
 
template<typename genType , typename genIType >
GLM_FUNC_DECL genType ldexp (genType const &x, genIType const &exp)
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType max (genType x, genType y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > max (vec< L, T, Q > const &x, T y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > max (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType min (genType x, genType y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > min (vec< L, T, Q > const &x, T y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > min (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<typename genTypeT , typename genTypeU >
GLM_FUNC_DECL genTypeT mix (genTypeT x, genTypeT y, genTypeU a)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > mod (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<typename genType >
GLM_FUNC_DECL genType modf (genType x, genType &i)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > round (vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > roundEven (vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > sign (vec< L, T, Q > const &x)
 
template<typename genType >
GLM_FUNC_DECL genType smoothstep (genType edge0, genType edge1, genType x)
 
template<typename genType >
GLM_FUNC_DECL genType step (genType edge, genType x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > step (T edge, vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > step (vec< L, T, Q > const &edge, vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > trunc (vec< L, T, Q > const &x)
 
GLM_FUNC_DECL float uintBitsToFloat (uint const &v)
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL vec< L, float, Q > uintBitsToFloat (vec< L, uint, Q > const &v)
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00002_source.html b/common/glm/doc/api/a00002_source.html new file mode 100644 index 000000000..b6d7bc0b4 --- /dev/null +++ b/common/glm/doc/api/a00002_source.html @@ -0,0 +1,108 @@ + + + + + + + +0.9.9 API documenation: common.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
common.hpp
+
+
+Go to the documentation of this file.
1 
15 #pragma once
16 
17 #include "detail/qualifier.hpp"
18 #include "detail/_fixes.hpp"
19 
20 namespace glm
21 {
24 
31  template<typename genType>
32  GLM_FUNC_DECL GLM_CONSTEXPR genType abs(genType x);
33 
42  template<length_t L, typename T, qualifier Q>
43  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> abs(vec<L, T, Q> const& x);
44 
53  template<length_t L, typename T, qualifier Q>
54  GLM_FUNC_DECL vec<L, T, Q> sign(vec<L, T, Q> const& x);
55 
64  template<length_t L, typename T, qualifier Q>
65  GLM_FUNC_DECL vec<L, T, Q> floor(vec<L, T, Q> const& x);
66 
76  template<length_t L, typename T, qualifier Q>
77  GLM_FUNC_DECL vec<L, T, Q> trunc(vec<L, T, Q> const& x);
78 
91  template<length_t L, typename T, qualifier Q>
92  GLM_FUNC_DECL vec<L, T, Q> round(vec<L, T, Q> const& x);
93 
105  template<length_t L, typename T, qualifier Q>
106  GLM_FUNC_DECL vec<L, T, Q> roundEven(vec<L, T, Q> const& x);
107 
117  template<length_t L, typename T, qualifier Q>
118  GLM_FUNC_DECL vec<L, T, Q> ceil(vec<L, T, Q> const& x);
119 
126  template<typename genType>
127  GLM_FUNC_DECL genType fract(genType x);
128 
137  template<length_t L, typename T, qualifier Q>
138  GLM_FUNC_DECL vec<L, T, Q> fract(vec<L, T, Q> const& x);
139 
140  template<typename genType>
141  GLM_FUNC_DECL genType mod(genType x, genType y);
142 
143  template<length_t L, typename T, qualifier Q>
144  GLM_FUNC_DECL vec<L, T, Q> mod(vec<L, T, Q> const& x, T y);
145 
155  template<length_t L, typename T, qualifier Q>
156  GLM_FUNC_DECL vec<L, T, Q> mod(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
157 
167  template<typename genType>
168  GLM_FUNC_DECL genType modf(genType x, genType& i);
169 
176  template<typename genType>
177  GLM_FUNC_DECL GLM_CONSTEXPR genType min(genType x, genType y);
178 
187  template<length_t L, typename T, qualifier Q>
188  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> min(vec<L, T, Q> const& x, T y);
189 
198  template<length_t L, typename T, qualifier Q>
199  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> min(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
200 
207  template<typename genType>
208  GLM_FUNC_DECL GLM_CONSTEXPR genType max(genType x, genType y);
209 
218  template<length_t L, typename T, qualifier Q>
219  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> max(vec<L, T, Q> const& x, T y);
220 
229  template<length_t L, typename T, qualifier Q>
230  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> max(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
231 
239  template<typename genType>
240  GLM_FUNC_DECL GLM_CONSTEXPR genType clamp(genType x, genType minVal, genType maxVal);
241 
251  template<length_t L, typename T, qualifier Q>
252  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> clamp(vec<L, T, Q> const& x, T minVal, T maxVal);
253 
263  template<length_t L, typename T, qualifier Q>
264  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> clamp(vec<L, T, Q> const& x, vec<L, T, Q> const& minVal, vec<L, T, Q> const& maxVal);
265 
308  template<typename genTypeT, typename genTypeU>
309  GLM_FUNC_DECL genTypeT mix(genTypeT x, genTypeT y, genTypeU a);
310 
311  template<length_t L, typename T, typename U, qualifier Q>
312  GLM_FUNC_DECL vec<L, T, Q> mix(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, U, Q> const& a);
313 
314  template<length_t L, typename T, typename U, qualifier Q>
315  GLM_FUNC_DECL vec<L, T, Q> mix(vec<L, T, Q> const& x, vec<L, T, Q> const& y, U a);
316 
321  template<typename genType>
322  GLM_FUNC_DECL genType step(genType edge, genType x);
323 
332  template<length_t L, typename T, qualifier Q>
333  GLM_FUNC_DECL vec<L, T, Q> step(T edge, vec<L, T, Q> const& x);
334 
343  template<length_t L, typename T, qualifier Q>
344  GLM_FUNC_DECL vec<L, T, Q> step(vec<L, T, Q> const& edge, vec<L, T, Q> const& x);
345 
360  template<typename genType>
361  GLM_FUNC_DECL genType smoothstep(genType edge0, genType edge1, genType x);
362 
363  template<length_t L, typename T, qualifier Q>
364  GLM_FUNC_DECL vec<L, T, Q> smoothstep(T edge0, T edge1, vec<L, T, Q> const& x);
365 
366  template<length_t L, typename T, qualifier Q>
367  GLM_FUNC_DECL vec<L, T, Q> smoothstep(vec<L, T, Q> const& edge0, vec<L, T, Q> const& edge1, vec<L, T, Q> const& x);
368 
383  template<length_t L, typename T, qualifier Q>
384  GLM_FUNC_DECL vec<L, bool, Q> isnan(vec<L, T, Q> const& x);
385 
398  template<length_t L, typename T, qualifier Q>
399  GLM_FUNC_DECL vec<L, bool, Q> isinf(vec<L, T, Q> const& x);
400 
407  GLM_FUNC_DECL int floatBitsToInt(float const& v);
408 
418  template<length_t L, qualifier Q>
419  GLM_FUNC_DECL vec<L, int, Q> floatBitsToInt(vec<L, float, Q> const& v);
420 
427  GLM_FUNC_DECL uint floatBitsToUint(float const& v);
428 
438  template<length_t L, qualifier Q>
439  GLM_FUNC_DECL vec<L, uint, Q> floatBitsToUint(vec<L, float, Q> const& v);
440 
449  GLM_FUNC_DECL float intBitsToFloat(int const& v);
450 
462  template<length_t L, qualifier Q>
463  GLM_FUNC_DECL vec<L, float, Q> intBitsToFloat(vec<L, int, Q> const& v);
464 
473  GLM_FUNC_DECL float uintBitsToFloat(uint const& v);
474 
486  template<length_t L, qualifier Q>
487  GLM_FUNC_DECL vec<L, float, Q> uintBitsToFloat(vec<L, uint, Q> const& v);
488 
495  template<typename genType>
496  GLM_FUNC_DECL genType fma(genType const& a, genType const& b, genType const& c);
497 
512  template<typename genType, typename genIType>
513  GLM_FUNC_DECL genType frexp(genType const& x, genIType& exp);
514 
526  template<typename genType, typename genIType>
527  GLM_FUNC_DECL genType ldexp(genType const& x, genIType const& exp);
528 
530 }//namespace glm
531 
532 #include "detail/func_common.inl"
533 
GLM_FUNC_DECL vec< L, T, Q > roundEven(vec< L, T, Q > const &x)
Returns a value equal to the nearest integer to x.
+
GLM_FUNC_DECL vec< L, T, Q > floor(vec< L, T, Q > const &x)
Returns a value equal to the nearest integer that is less then or equal to x.
+
GLM_FUNC_DECL genType fma(genType const &a, genType const &b, genType const &c)
Computes and returns a * b + c.
+
GLM_FUNC_DECL genType smoothstep(genType edge0, genType edge1, genType x)
Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and performs smooth Hermite interpolation between 0 a...
+
GLM_FUNC_DECL vec< L, T, Q > round(vec< L, T, Q > const &x)
Returns a value equal to the nearest integer to x.
+
GLM_FUNC_DECL vec< L, T, Q > trunc(vec< L, T, Q > const &x)
Returns a value equal to the nearest integer to x whose absolute value is not larger than the absolut...
+
GLM_FUNC_DECL genType frexp(genType const &x, genIType &exp)
Splits x into a floating-point significand in the range [0.5, 1.0) and an integral exponent of two...
+
GLM_FUNC_DECL vec< L, T, Q > step(vec< L, T, Q > const &edge, vec< L, T, Q > const &x)
Returns 0.0 if x < edge, otherwise it returns 1.0.
+
GLM_FUNC_DECL vec< L, T, Q > mod(vec< L, T, Q > const &x, vec< L, T, Q > const &y)
Modulus.
+
GLM_FUNC_DECL vec< L, float, Q > uintBitsToFloat(vec< L, uint, Q > const &v)
Returns a floating-point value corresponding to a unsigned integer encoding of a floating-point value...
+
GLM_FUNC_DECL vec< L, T, Q > fract(vec< L, T, Q > const &x)
Return x - floor(x).
+
GLM_FUNC_DECL genType modf(genType x, genType &i)
Returns the fractional part of x and sets i to the integer part (as a whole number floating point val...
+
GLM_FUNC_DECL vec< L, T, Q > exp(vec< L, T, Q > const &v)
Returns the natural exponentiation of x, i.e., e^x.
+
GLM_FUNC_DECL vec< L, float, Q > intBitsToFloat(vec< L, int, Q > const &v)
Returns a floating-point value corresponding to a signed integer encoding of a floating-point value...
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > clamp(vec< L, T, Q > const &x, vec< L, T, Q > const &minVal, vec< L, T, Q > const &maxVal)
Returns min(max(x, minVal), maxVal) for each component in x using the floating-point values minVal an...
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > abs(vec< L, T, Q > const &x)
Returns x if x >= 0; otherwise, it returns -x.
+
GLM_FUNC_DECL vec< L, T, Q > sign(vec< L, T, Q > const &x)
Returns 1.0 if x > 0, 0.0 if x == 0, or -1.0 if x < 0.
+
GLM_FUNC_DECL genType ldexp(genType const &x, genIType const &exp)
Builds a floating-point number from x and the corresponding integral exponent of two in exp...
+
GLM_FUNC_DECL vec< L, uint, Q > floatBitsToUint(vec< L, float, Q > const &v)
Returns a unsigned integer value representing the encoding of a floating-point value.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > min(vec< L, T, Q > const &x, vec< L, T, Q > const &y)
Returns y if y < x; otherwise, it returns x.
+
GLM_FUNC_DECL genTypeT mix(genTypeT x, genTypeT y, genTypeU a)
If genTypeU is a floating scalar or vector: Returns x * (1.0 - a) + y * a, i.e., the linear blend of ...
+
GLM_FUNC_DECL vec< L, bool, Q > isnan(vec< L, T, Q > const &x)
Returns true if x holds a NaN (not a number) representation in the underlying implementation&#39;s set of...
+
GLM_FUNC_DECL vec< L, bool, Q > isinf(vec< L, T, Q > const &x)
Returns true if x holds a positive infinity or negative infinity representation in the underlying imp...
+
Definition: common.hpp:20
+
GLM_FUNC_DECL vec< L, int, Q > floatBitsToInt(vec< L, float, Q > const &v)
Returns a signed integer value representing the encoding of a floating-point value.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > max(vec< L, T, Q > const &x, vec< L, T, Q > const &y)
Returns y if x < y; otherwise, it returns x.
+
GLM_FUNC_DECL vec< L, T, Q > ceil(vec< L, T, Q > const &x)
Returns a value equal to the nearest integer that is greater than or equal to x.
+
+ + + + diff --git a/common/glm/doc/api/a00005_source.html b/common/glm/doc/api/a00005_source.html new file mode 100644 index 000000000..b86dbee98 --- /dev/null +++ b/common/glm/doc/api/a00005_source.html @@ -0,0 +1,81 @@ + + + + + + + +0.9.9 API documenation: _features.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
_features.hpp
+
+
+
1 #pragma once
2 
3 // #define GLM_CXX98_EXCEPTIONS
4 // #define GLM_CXX98_RTTI
5 
6 // #define GLM_CXX11_RVALUE_REFERENCES
7 // Rvalue references - GCC 4.3
8 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2118.html
9 
10 // GLM_CXX11_TRAILING_RETURN
11 // Rvalue references for *this - GCC not supported
12 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2439.htm
13 
14 // GLM_CXX11_NONSTATIC_MEMBER_INIT
15 // Initialization of class objects by rvalues - GCC any
16 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1610.html
17 
18 // GLM_CXX11_NONSTATIC_MEMBER_INIT
19 // Non-static data member initializers - GCC 4.7
20 // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2008/n2756.htm
21 
22 // #define GLM_CXX11_VARIADIC_TEMPLATE
23 // Variadic templates - GCC 4.3
24 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2242.pdf
25 
26 //
27 // Extending variadic template template parameters - GCC 4.4
28 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2555.pdf
29 
30 // #define GLM_CXX11_GENERALIZED_INITIALIZERS
31 // Initializer lists - GCC 4.4
32 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm
33 
34 // #define GLM_CXX11_STATIC_ASSERT
35 // Static assertions - GCC 4.3
36 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html
37 
38 // #define GLM_CXX11_AUTO_TYPE
39 // auto-typed variables - GCC 4.4
40 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1984.pdf
41 
42 // #define GLM_CXX11_AUTO_TYPE
43 // Multi-declarator auto - GCC 4.4
44 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1737.pdf
45 
46 // #define GLM_CXX11_AUTO_TYPE
47 // Removal of auto as a storage-class specifier - GCC 4.4
48 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2546.htm
49 
50 // #define GLM_CXX11_AUTO_TYPE
51 // New function declarator syntax - GCC 4.4
52 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm
53 
54 // #define GLM_CXX11_LAMBDAS
55 // New wording for C++0x lambdas - GCC 4.5
56 // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2927.pdf
57 
58 // #define GLM_CXX11_DECLTYPE
59 // Declared type of an expression - GCC 4.3
60 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf
61 
62 //
63 // Right angle brackets - GCC 4.3
64 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1757.html
65 
66 //
67 // Default template arguments for function templates DR226 GCC 4.3
68 // http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#226
69 
70 //
71 // Solving the SFINAE problem for expressions DR339 GCC 4.4
72 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2634.html
73 
74 // #define GLM_CXX11_ALIAS_TEMPLATE
75 // Template aliases N2258 GCC 4.7
76 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2258.pdf
77 
78 //
79 // Extern templates N1987 Yes
80 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1987.htm
81 
82 // #define GLM_CXX11_NULLPTR
83 // Null pointer constant N2431 GCC 4.6
84 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf
85 
86 // #define GLM_CXX11_STRONG_ENUMS
87 // Strongly-typed enums N2347 GCC 4.4
88 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf
89 
90 //
91 // Forward declarations for enums N2764 GCC 4.6
92 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2764.pdf
93 
94 //
95 // Generalized attributes N2761 GCC 4.8
96 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf
97 
98 //
99 // Generalized constant expressions N2235 GCC 4.6
100 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf
101 
102 //
103 // Alignment support N2341 GCC 4.8
104 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2341.pdf
105 
106 // #define GLM_CXX11_DELEGATING_CONSTRUCTORS
107 // Delegating constructors N1986 GCC 4.7
108 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1986.pdf
109 
110 //
111 // Inheriting constructors N2540 GCC 4.8
112 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2540.htm
113 
114 // #define GLM_CXX11_EXPLICIT_CONVERSIONS
115 // Explicit conversion operators N2437 GCC 4.5
116 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf
117 
118 //
119 // New character types N2249 GCC 4.4
120 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2249.html
121 
122 //
123 // Unicode string literals N2442 GCC 4.5
124 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm
125 
126 //
127 // Raw string literals N2442 GCC 4.5
128 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm
129 
130 //
131 // Universal character name literals N2170 GCC 4.5
132 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2170.html
133 
134 // #define GLM_CXX11_USER_LITERALS
135 // User-defined literals N2765 GCC 4.7
136 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2765.pdf
137 
138 //
139 // Standard Layout Types N2342 GCC 4.5
140 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2342.htm
141 
142 // #define GLM_CXX11_DEFAULTED_FUNCTIONS
143 // #define GLM_CXX11_DELETED_FUNCTIONS
144 // Defaulted and deleted functions N2346 GCC 4.4
145 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm
146 
147 //
148 // Extended friend declarations N1791 GCC 4.7
149 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1791.pdf
150 
151 //
152 // Extending sizeof N2253 GCC 4.4
153 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2253.html
154 
155 // #define GLM_CXX11_INLINE_NAMESPACES
156 // Inline namespaces N2535 GCC 4.4
157 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2535.htm
158 
159 // #define GLM_CXX11_UNRESTRICTED_UNIONS
160 // Unrestricted unions N2544 GCC 4.6
161 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2544.pdf
162 
163 // #define GLM_CXX11_LOCAL_TYPE_TEMPLATE_ARGS
164 // Local and unnamed types as template arguments N2657 GCC 4.5
165 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm
166 
167 // #define GLM_CXX11_RANGE_FOR
168 // Range-based for N2930 GCC 4.6
169 // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2930.html
170 
171 // #define GLM_CXX11_OVERRIDE_CONTROL
172 // Explicit virtual overrides N2928 N3206 N3272 GCC 4.7
173 // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2928.htm
174 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm
175 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3272.htm
176 
177 //
178 // Minimal support for garbage collection and reachability-based leak detection N2670 No
179 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2670.htm
180 
181 // #define GLM_CXX11_NOEXCEPT
182 // Allowing move constructors to throw [noexcept] N3050 GCC 4.6 (core language only)
183 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3050.html
184 
185 //
186 // Defining move special member functions N3053 GCC 4.6
187 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3053.html
188 
189 //
190 // Sequence points N2239 Yes
191 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2239.html
192 
193 //
194 // Atomic operations N2427 GCC 4.4
195 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2239.html
196 
197 //
198 // Strong Compare and Exchange N2748 GCC 4.5
199 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2427.html
200 
201 //
202 // Bidirectional Fences N2752 GCC 4.8
203 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2752.htm
204 
205 //
206 // Memory model N2429 GCC 4.8
207 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2429.htm
208 
209 //
210 // Data-dependency ordering: atomics and memory model N2664 GCC 4.4
211 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2664.htm
212 
213 //
214 // Propagating exceptions N2179 GCC 4.4
215 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html
216 
217 //
218 // Abandoning a process and at_quick_exit N2440 GCC 4.8
219 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2440.htm
220 
221 //
222 // Allow atomics use in signal handlers N2547 Yes
223 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2547.htm
224 
225 //
226 // Thread-local storage N2659 GCC 4.8
227 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2659.htm
228 
229 //
230 // Dynamic initialization and destruction with concurrency N2660 GCC 4.3
231 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2660.htm
232 
233 //
234 // __func__ predefined identifier N2340 GCC 4.3
235 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2340.htm
236 
237 //
238 // C99 preprocessor N1653 GCC 4.3
239 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1653.htm
240 
241 //
242 // long long N1811 GCC 4.3
243 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1811.pdf
244 
245 //
246 // Extended integral types N1988 Yes
247 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1988.pdf
248 
249 #if(GLM_COMPILER & GLM_COMPILER_GCC)
250 
251 # define GLM_CXX11_STATIC_ASSERT
252 
253 #elif(GLM_COMPILER & GLM_COMPILER_CLANG)
254 # if(__has_feature(cxx_exceptions))
255 # define GLM_CXX98_EXCEPTIONS
256 # endif
257 
258 # if(__has_feature(cxx_rtti))
259 # define GLM_CXX98_RTTI
260 # endif
261 
262 # if(__has_feature(cxx_access_control_sfinae))
263 # define GLM_CXX11_ACCESS_CONTROL_SFINAE
264 # endif
265 
266 # if(__has_feature(cxx_alias_templates))
267 # define GLM_CXX11_ALIAS_TEMPLATE
268 # endif
269 
270 # if(__has_feature(cxx_alignas))
271 # define GLM_CXX11_ALIGNAS
272 # endif
273 
274 # if(__has_feature(cxx_attributes))
275 # define GLM_CXX11_ATTRIBUTES
276 # endif
277 
278 # if(__has_feature(cxx_constexpr))
279 # define GLM_CXX11_CONSTEXPR
280 # endif
281 
282 # if(__has_feature(cxx_decltype))
283 # define GLM_CXX11_DECLTYPE
284 # endif
285 
286 # if(__has_feature(cxx_default_function_template_args))
287 # define GLM_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS
288 # endif
289 
290 # if(__has_feature(cxx_defaulted_functions))
291 # define GLM_CXX11_DEFAULTED_FUNCTIONS
292 # endif
293 
294 # if(__has_feature(cxx_delegating_constructors))
295 # define GLM_CXX11_DELEGATING_CONSTRUCTORS
296 # endif
297 
298 # if(__has_feature(cxx_deleted_functions))
299 # define GLM_CXX11_DELETED_FUNCTIONS
300 # endif
301 
302 # if(__has_feature(cxx_explicit_conversions))
303 # define GLM_CXX11_EXPLICIT_CONVERSIONS
304 # endif
305 
306 # if(__has_feature(cxx_generalized_initializers))
307 # define GLM_CXX11_GENERALIZED_INITIALIZERS
308 # endif
309 
310 # if(__has_feature(cxx_implicit_moves))
311 # define GLM_CXX11_IMPLICIT_MOVES
312 # endif
313 
314 # if(__has_feature(cxx_inheriting_constructors))
315 # define GLM_CXX11_INHERITING_CONSTRUCTORS
316 # endif
317 
318 # if(__has_feature(cxx_inline_namespaces))
319 # define GLM_CXX11_INLINE_NAMESPACES
320 # endif
321 
322 # if(__has_feature(cxx_lambdas))
323 # define GLM_CXX11_LAMBDAS
324 # endif
325 
326 # if(__has_feature(cxx_local_type_template_args))
327 # define GLM_CXX11_LOCAL_TYPE_TEMPLATE_ARGS
328 # endif
329 
330 # if(__has_feature(cxx_noexcept))
331 # define GLM_CXX11_NOEXCEPT
332 # endif
333 
334 # if(__has_feature(cxx_nonstatic_member_init))
335 # define GLM_CXX11_NONSTATIC_MEMBER_INIT
336 # endif
337 
338 # if(__has_feature(cxx_nullptr))
339 # define GLM_CXX11_NULLPTR
340 # endif
341 
342 # if(__has_feature(cxx_override_control))
343 # define GLM_CXX11_OVERRIDE_CONTROL
344 # endif
345 
346 # if(__has_feature(cxx_reference_qualified_functions))
347 # define GLM_CXX11_REFERENCE_QUALIFIED_FUNCTIONS
348 # endif
349 
350 # if(__has_feature(cxx_range_for))
351 # define GLM_CXX11_RANGE_FOR
352 # endif
353 
354 # if(__has_feature(cxx_raw_string_literals))
355 # define GLM_CXX11_RAW_STRING_LITERALS
356 # endif
357 
358 # if(__has_feature(cxx_rvalue_references))
359 # define GLM_CXX11_RVALUE_REFERENCES
360 # endif
361 
362 # if(__has_feature(cxx_static_assert))
363 # define GLM_CXX11_STATIC_ASSERT
364 # endif
365 
366 # if(__has_feature(cxx_auto_type))
367 # define GLM_CXX11_AUTO_TYPE
368 # endif
369 
370 # if(__has_feature(cxx_strong_enums))
371 # define GLM_CXX11_STRONG_ENUMS
372 # endif
373 
374 # if(__has_feature(cxx_trailing_return))
375 # define GLM_CXX11_TRAILING_RETURN
376 # endif
377 
378 # if(__has_feature(cxx_unicode_literals))
379 # define GLM_CXX11_UNICODE_LITERALS
380 # endif
381 
382 # if(__has_feature(cxx_unrestricted_unions))
383 # define GLM_CXX11_UNRESTRICTED_UNIONS
384 # endif
385 
386 # if(__has_feature(cxx_user_literals))
387 # define GLM_CXX11_USER_LITERALS
388 # endif
389 
390 # if(__has_feature(cxx_variadic_templates))
391 # define GLM_CXX11_VARIADIC_TEMPLATES
392 # endif
393 
394 #endif//(GLM_COMPILER & GLM_COMPILER_CLANG)
+ + + + diff --git a/common/glm/doc/api/a00008_source.html b/common/glm/doc/api/a00008_source.html new file mode 100644 index 000000000..41e3fe807 --- /dev/null +++ b/common/glm/doc/api/a00008_source.html @@ -0,0 +1,81 @@ + + + + + + + +0.9.9 API documenation: _fixes.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
_fixes.hpp
+
+
+
1 #include <cmath>
2 
4 #ifdef max
5 #undef max
6 #endif
7 
9 #ifdef min
10 #undef min
11 #endif
12 
14 #ifdef isnan
15 #undef isnan
16 #endif
17 
19 #ifdef isinf
20 #undef isinf
21 #endif
22 
24 #ifdef log2
25 #undef log2
26 #endif
27 
+ + + + diff --git a/common/glm/doc/api/a00011_source.html b/common/glm/doc/api/a00011_source.html new file mode 100644 index 000000000..cf58e67ac --- /dev/null +++ b/common/glm/doc/api/a00011_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: _noise.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
_noise.hpp
+
+
+
1 #pragma once
2 
3 #include "../common.hpp"
4 
5 namespace glm{
6 namespace detail
7 {
8  template<typename T>
9  GLM_FUNC_QUALIFIER T mod289(T const& x)
10  {
11  return x - floor(x * (static_cast<T>(1.0) / static_cast<T>(289.0))) * static_cast<T>(289.0);
12  }
13 
14  template<typename T>
15  GLM_FUNC_QUALIFIER T permute(T const& x)
16  {
17  return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
18  }
19 
20  template<typename T, qualifier Q>
21  GLM_FUNC_QUALIFIER vec<2, T, Q> permute(vec<2, T, Q> const& x)
22  {
23  return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
24  }
25 
26  template<typename T, qualifier Q>
27  GLM_FUNC_QUALIFIER vec<3, T, Q> permute(vec<3, T, Q> const& x)
28  {
29  return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
30  }
31 
32  template<typename T, qualifier Q>
33  GLM_FUNC_QUALIFIER vec<4, T, Q> permute(vec<4, T, Q> const& x)
34  {
35  return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
36  }
37 
38  template<typename T>
39  GLM_FUNC_QUALIFIER T taylorInvSqrt(T const& r)
40  {
41  return static_cast<T>(1.79284291400159) - static_cast<T>(0.85373472095314) * r;
42  }
43 
44  template<typename T, qualifier Q>
45  GLM_FUNC_QUALIFIER vec<2, T, Q> taylorInvSqrt(vec<2, T, Q> const& r)
46  {
47  return static_cast<T>(1.79284291400159) - static_cast<T>(0.85373472095314) * r;
48  }
49 
50  template<typename T, qualifier Q>
51  GLM_FUNC_QUALIFIER vec<3, T, Q> taylorInvSqrt(vec<3, T, Q> const& r)
52  {
53  return static_cast<T>(1.79284291400159) - static_cast<T>(0.85373472095314) * r;
54  }
55 
56  template<typename T, qualifier Q>
57  GLM_FUNC_QUALIFIER vec<4, T, Q> taylorInvSqrt(vec<4, T, Q> const& r)
58  {
59  return static_cast<T>(1.79284291400159) - static_cast<T>(0.85373472095314) * r;
60  }
61 
62  template<typename T, qualifier Q>
63  GLM_FUNC_QUALIFIER vec<2, T, Q> fade(vec<2, T, Q> const& t)
64  {
65  return (t * t * t) * (t * (t * static_cast<T>(6) - static_cast<T>(15)) + static_cast<T>(10));
66  }
67 
68  template<typename T, qualifier Q>
69  GLM_FUNC_QUALIFIER vec<3, T, Q> fade(vec<3, T, Q> const& t)
70  {
71  return (t * t * t) * (t * (t * static_cast<T>(6) - static_cast<T>(15)) + static_cast<T>(10));
72  }
73 
74  template<typename T, qualifier Q>
75  GLM_FUNC_QUALIFIER vec<4, T, Q> fade(vec<4, T, Q> const& t)
76  {
77  return (t * t * t) * (t * (t * static_cast<T>(6) - static_cast<T>(15)) + static_cast<T>(10));
78  }
79 }//namespace detail
80 }//namespace glm
81 
GLM_FUNC_DECL vec< L, T, Q > floor(vec< L, T, Q > const &x)
Returns a value equal to the nearest integer that is less then or equal to x.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00014_source.html b/common/glm/doc/api/a00014_source.html new file mode 100644 index 000000000..8242ca5cf --- /dev/null +++ b/common/glm/doc/api/a00014_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: _swizzle.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
_swizzle.hpp
+
+
+
1 #pragma once
2 
3 namespace glm{
4 namespace detail
5 {
6  // Internal class for implementing swizzle operators
7  template<typename T, int N>
8  struct _swizzle_base0
9  {
10  protected:
11  GLM_FUNC_QUALIFIER T& elem(size_t i){ return (reinterpret_cast<T*>(_buffer))[i]; }
12  GLM_FUNC_QUALIFIER T const& elem(size_t i) const{ return (reinterpret_cast<const T*>(_buffer))[i]; }
13 
14  // Use an opaque buffer to *ensure* the compiler doesn't call a constructor.
15  // The size 1 buffer is assumed to aligned to the actual members so that the
16  // elem()
17  char _buffer[1];
18  };
19 
20  template<int N, typename T, qualifier Q, int E0, int E1, int E2, int E3, bool Aligned>
21  struct _swizzle_base1 : public _swizzle_base0<T, N>
22  {
23  };
24 
25  template<typename T, qualifier Q, int E0, int E1, bool Aligned>
26  struct _swizzle_base1<2, T, Q, E0,E1,-1,-2, Aligned> : public _swizzle_base0<T, 2>
27  {
28  GLM_FUNC_QUALIFIER vec<2, T, Q> operator ()() const { return vec<2, T, Q>(this->elem(E0), this->elem(E1)); }
29  };
30 
31  template<typename T, qualifier Q, int E0, int E1, int E2, bool Aligned>
32  struct _swizzle_base1<3, T, Q, E0,E1,E2,-1, Aligned> : public _swizzle_base0<T, 3>
33  {
34  GLM_FUNC_QUALIFIER vec<3, T, Q> operator ()() const { return vec<3, T, Q>(this->elem(E0), this->elem(E1), this->elem(E2)); }
35  };
36 
37  template<typename T, qualifier Q, int E0, int E1, int E2, int E3, bool Aligned>
38  struct _swizzle_base1<4, T, Q, E0,E1,E2,E3, Aligned> : public _swizzle_base0<T, 4>
39  {
40  GLM_FUNC_QUALIFIER vec<4, T, Q> operator ()() const { return vec<4, T, Q>(this->elem(E0), this->elem(E1), this->elem(E2), this->elem(E3)); }
41  };
42 
43  // Internal class for implementing swizzle operators
44  /*
45  Template parameters:
46 
47  T = type of scalar values (e.g. float, double)
48  N = number of components in the vector (e.g. 3)
49  E0...3 = what index the n-th element of this swizzle refers to in the unswizzled vec
50 
51  DUPLICATE_ELEMENTS = 1 if there is a repeated element, 0 otherwise (used to specialize swizzles
52  containing duplicate elements so that they cannot be used as r-values).
53  */
54  template<int N, typename T, qualifier Q, int E0, int E1, int E2, int E3, int DUPLICATE_ELEMENTS>
55  struct _swizzle_base2 : public _swizzle_base1<N, T, Q, E0,E1,E2,E3, detail::is_aligned<Q>::value>
56  {
57  struct op_equal
58  {
59  GLM_FUNC_QUALIFIER void operator() (T& e, T& t) const{ e = t; }
60  };
61 
62  struct op_minus
63  {
64  GLM_FUNC_QUALIFIER void operator() (T& e, T& t) const{ e -= t; }
65  };
66 
67  struct op_plus
68  {
69  GLM_FUNC_QUALIFIER void operator() (T& e, T& t) const{ e += t; }
70  };
71 
72  struct op_mul
73  {
74  GLM_FUNC_QUALIFIER void operator() (T& e, T& t) const{ e *= t; }
75  };
76 
77  struct op_div
78  {
79  GLM_FUNC_QUALIFIER void operator() (T& e, T& t) const{ e /= t; }
80  };
81 
82  public:
83  GLM_FUNC_QUALIFIER _swizzle_base2& operator= (const T& t)
84  {
85  for (int i = 0; i < N; ++i)
86  (*this)[i] = t;
87  return *this;
88  }
89 
90  GLM_FUNC_QUALIFIER _swizzle_base2& operator= (vec<N, T, Q> const& that)
91  {
92  _apply_op(that, op_equal());
93  return *this;
94  }
95 
96  GLM_FUNC_QUALIFIER void operator -= (vec<N, T, Q> const& that)
97  {
98  _apply_op(that, op_minus());
99  }
100 
101  GLM_FUNC_QUALIFIER void operator += (vec<N, T, Q> const& that)
102  {
103  _apply_op(that, op_plus());
104  }
105 
106  GLM_FUNC_QUALIFIER void operator *= (vec<N, T, Q> const& that)
107  {
108  _apply_op(that, op_mul());
109  }
110 
111  GLM_FUNC_QUALIFIER void operator /= (vec<N, T, Q> const& that)
112  {
113  _apply_op(that, op_div());
114  }
115 
116  GLM_FUNC_QUALIFIER T& operator[](size_t i)
117  {
118  const int offset_dst[4] = { E0, E1, E2, E3 };
119  return this->elem(offset_dst[i]);
120  }
121  GLM_FUNC_QUALIFIER T operator[](size_t i) const
122  {
123  const int offset_dst[4] = { E0, E1, E2, E3 };
124  return this->elem(offset_dst[i]);
125  }
126 
127  protected:
128  template<typename U>
129  GLM_FUNC_QUALIFIER void _apply_op(vec<N, T, Q> const& that, const U& op)
130  {
131  // Make a copy of the data in this == &that.
132  // The copier should optimize out the copy in cases where the function is
133  // properly inlined and the copy is not necessary.
134  T t[N];
135  for (int i = 0; i < N; ++i)
136  t[i] = that[i];
137  for (int i = 0; i < N; ++i)
138  op( (*this)[i], t[i] );
139  }
140  };
141 
142  // Specialization for swizzles containing duplicate elements. These cannot be modified.
143  template<int N, typename T, qualifier Q, int E0, int E1, int E2, int E3>
144  struct _swizzle_base2<N, T, Q, E0,E1,E2,E3, 1> : public _swizzle_base1<N, T, Q, E0,E1,E2,E3, detail::is_aligned<Q>::value>
145  {
146  struct Stub {};
147 
148  GLM_FUNC_QUALIFIER _swizzle_base2& operator= (Stub const&) { return *this; }
149 
150  GLM_FUNC_QUALIFIER T operator[] (size_t i) const
151  {
152  const int offset_dst[4] = { E0, E1, E2, E3 };
153  return this->elem(offset_dst[i]);
154  }
155  };
156 
157  template<int N, typename T, qualifier Q, int E0, int E1, int E2, int E3>
158  struct _swizzle : public _swizzle_base2<N, T, Q, E0, E1, E2, E3, (E0 == E1 || E0 == E2 || E0 == E3 || E1 == E2 || E1 == E3 || E2 == E3)>
159  {
160  typedef _swizzle_base2<N, T, Q, E0, E1, E2, E3, (E0 == E1 || E0 == E2 || E0 == E3 || E1 == E2 || E1 == E3 || E2 == E3)> base_type;
161 
162  using base_type::operator=;
163 
164  GLM_FUNC_QUALIFIER operator vec<N, T, Q> () const { return (*this)(); }
165  };
166 
167 //
168 // To prevent the C++ syntax from getting entirely overwhelming, define some alias macros
169 //
170 #define GLM_SWIZZLE_TEMPLATE1 template<int N, typename T, qualifier Q, int E0, int E1, int E2, int E3>
171 #define GLM_SWIZZLE_TEMPLATE2 template<int N, typename T, qualifier Q, int E0, int E1, int E2, int E3, int F0, int F1, int F2, int F3>
172 #define GLM_SWIZZLE_TYPE1 _swizzle<N, T, Q, E0, E1, E2, E3>
173 #define GLM_SWIZZLE_TYPE2 _swizzle<N, T, Q, F0, F1, F2, F3>
174 
175 //
176 // Wrapper for a binary operator (e.g. u.yy + v.zy)
177 //
178 #define GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND) \
179  GLM_SWIZZLE_TEMPLATE2 \
180  GLM_FUNC_QUALIFIER vec<N, T, Q> operator OPERAND ( const GLM_SWIZZLE_TYPE1& a, const GLM_SWIZZLE_TYPE2& b) \
181  { \
182  return a() OPERAND b(); \
183  } \
184  GLM_SWIZZLE_TEMPLATE1 \
185  GLM_FUNC_QUALIFIER vec<N, T, Q> operator OPERAND ( const GLM_SWIZZLE_TYPE1& a, const vec<N, T, Q>& b) \
186  { \
187  return a() OPERAND b; \
188  } \
189  GLM_SWIZZLE_TEMPLATE1 \
190  GLM_FUNC_QUALIFIER vec<N, T, Q> operator OPERAND ( const vec<N, T, Q>& a, const GLM_SWIZZLE_TYPE1& b) \
191  { \
192  return a OPERAND b(); \
193  }
194 
195 //
196 // Wrapper for a operand between a swizzle and a binary (e.g. 1.0f - u.xyz)
197 //
198 #define GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND) \
199  GLM_SWIZZLE_TEMPLATE1 \
200  GLM_FUNC_QUALIFIER vec<N, T, Q> operator OPERAND ( const GLM_SWIZZLE_TYPE1& a, const T& b) \
201  { \
202  return a() OPERAND b; \
203  } \
204  GLM_SWIZZLE_TEMPLATE1 \
205  GLM_FUNC_QUALIFIER vec<N, T, Q> operator OPERAND ( const T& a, const GLM_SWIZZLE_TYPE1& b) \
206  { \
207  return a OPERAND b(); \
208  }
209 
210 //
211 // Macro for wrapping a function taking one argument (e.g. abs())
212 //
213 #define GLM_SWIZZLE_FUNCTION_1_ARGS(RETURN_TYPE,FUNCTION) \
214  GLM_SWIZZLE_TEMPLATE1 \
215  GLM_FUNC_QUALIFIER typename GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const GLM_SWIZZLE_TYPE1& a) \
216  { \
217  return FUNCTION(a()); \
218  }
219 
220 //
221 // Macro for wrapping a function taking two vector arguments (e.g. dot()).
222 //
223 #define GLM_SWIZZLE_FUNCTION_2_ARGS(RETURN_TYPE,FUNCTION) \
224  GLM_SWIZZLE_TEMPLATE2 \
225  GLM_FUNC_QUALIFIER typename GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const GLM_SWIZZLE_TYPE1& a, const GLM_SWIZZLE_TYPE2& b) \
226  { \
227  return FUNCTION(a(), b()); \
228  } \
229  GLM_SWIZZLE_TEMPLATE1 \
230  GLM_FUNC_QUALIFIER typename GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const GLM_SWIZZLE_TYPE1& a, const GLM_SWIZZLE_TYPE1& b) \
231  { \
232  return FUNCTION(a(), b()); \
233  } \
234  GLM_SWIZZLE_TEMPLATE1 \
235  GLM_FUNC_QUALIFIER typename GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const GLM_SWIZZLE_TYPE1& a, const typename V& b) \
236  { \
237  return FUNCTION(a(), b); \
238  } \
239  GLM_SWIZZLE_TEMPLATE1 \
240  GLM_FUNC_QUALIFIER typename GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const V& a, const GLM_SWIZZLE_TYPE1& b) \
241  { \
242  return FUNCTION(a, b()); \
243  }
244 
245 //
246 // Macro for wrapping a function take 2 vec arguments followed by a scalar (e.g. mix()).
247 //
248 #define GLM_SWIZZLE_FUNCTION_2_ARGS_SCALAR(RETURN_TYPE,FUNCTION) \
249  GLM_SWIZZLE_TEMPLATE2 \
250  GLM_FUNC_QUALIFIER typename GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const GLM_SWIZZLE_TYPE1& a, const GLM_SWIZZLE_TYPE2& b, const T& c) \
251  { \
252  return FUNCTION(a(), b(), c); \
253  } \
254  GLM_SWIZZLE_TEMPLATE1 \
255  GLM_FUNC_QUALIFIER typename GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const GLM_SWIZZLE_TYPE1& a, const GLM_SWIZZLE_TYPE1& b, const T& c) \
256  { \
257  return FUNCTION(a(), b(), c); \
258  } \
259  GLM_SWIZZLE_TEMPLATE1 \
260  GLM_FUNC_QUALIFIER typename GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const GLM_SWIZZLE_TYPE1& a, const typename S0::vec_type& b, const T& c)\
261  { \
262  return FUNCTION(a(), b, c); \
263  } \
264  GLM_SWIZZLE_TEMPLATE1 \
265  GLM_FUNC_QUALIFIER typename GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const typename V& a, const GLM_SWIZZLE_TYPE1& b, const T& c) \
266  { \
267  return FUNCTION(a, b(), c); \
268  }
269 
270 }//namespace detail
271 }//namespace glm
272 
273 namespace glm
274 {
275  namespace detail
276  {
277  GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(-)
278  GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(*)
279  GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(+)
280  GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(-)
281  GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(*)
282  GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(/)
283  }
284 
285  //
286  // Swizzles are distinct types from the unswizzled type. The below macros will
287  // provide template specializations for the swizzle types for the given functions
288  // so that the compiler does not have any ambiguity to choosing how to handle
289  // the function.
290  //
291  // The alternative is to use the operator()() when calling the function in order
292  // to explicitly convert the swizzled type to the unswizzled type.
293  //
294 
295  //GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, abs);
296  //GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, acos);
297  //GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, acosh);
298  //GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, all);
299  //GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, any);
300 
301  //GLM_SWIZZLE_FUNCTION_2_ARGS(value_type, dot);
302  //GLM_SWIZZLE_FUNCTION_2_ARGS(vec_type, cross);
303  //GLM_SWIZZLE_FUNCTION_2_ARGS(vec_type, step);
304  //GLM_SWIZZLE_FUNCTION_2_ARGS_SCALAR(vec_type, mix);
305 }
306 
307 #define GLM_SWIZZLE2_2_MEMBERS(T, Q, E0,E1) \
308  struct { detail::_swizzle<2, T, Q, 0,0,-1,-2> E0 ## E0; }; \
309  struct { detail::_swizzle<2, T, Q, 0,1,-1,-2> E0 ## E1; }; \
310  struct { detail::_swizzle<2, T, Q, 1,0,-1,-2> E1 ## E0; }; \
311  struct { detail::_swizzle<2, T, Q, 1,1,-1,-2> E1 ## E1; };
312 
313 #define GLM_SWIZZLE2_3_MEMBERS(T, Q, E0,E1) \
314  struct { detail::_swizzle<3,T, Q, 0,0,0,-1> E0 ## E0 ## E0; }; \
315  struct { detail::_swizzle<3,T, Q, 0,0,1,-1> E0 ## E0 ## E1; }; \
316  struct { detail::_swizzle<3,T, Q, 0,1,0,-1> E0 ## E1 ## E0; }; \
317  struct { detail::_swizzle<3,T, Q, 0,1,1,-1> E0 ## E1 ## E1; }; \
318  struct { detail::_swizzle<3,T, Q, 1,0,0,-1> E1 ## E0 ## E0; }; \
319  struct { detail::_swizzle<3,T, Q, 1,0,1,-1> E1 ## E0 ## E1; }; \
320  struct { detail::_swizzle<3,T, Q, 1,1,0,-1> E1 ## E1 ## E0; }; \
321  struct { detail::_swizzle<3,T, Q, 1,1,1,-1> E1 ## E1 ## E1; };
322 
323 #define GLM_SWIZZLE2_4_MEMBERS(T, Q, E0,E1) \
324  struct { detail::_swizzle<4,T, Q, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \
325  struct { detail::_swizzle<4,T, Q, 0,0,0,1> E0 ## E0 ## E0 ## E1; }; \
326  struct { detail::_swizzle<4,T, Q, 0,0,1,0> E0 ## E0 ## E1 ## E0; }; \
327  struct { detail::_swizzle<4,T, Q, 0,0,1,1> E0 ## E0 ## E1 ## E1; }; \
328  struct { detail::_swizzle<4,T, Q, 0,1,0,0> E0 ## E1 ## E0 ## E0; }; \
329  struct { detail::_swizzle<4,T, Q, 0,1,0,1> E0 ## E1 ## E0 ## E1; }; \
330  struct { detail::_swizzle<4,T, Q, 0,1,1,0> E0 ## E1 ## E1 ## E0; }; \
331  struct { detail::_swizzle<4,T, Q, 0,1,1,1> E0 ## E1 ## E1 ## E1; }; \
332  struct { detail::_swizzle<4,T, Q, 1,0,0,0> E1 ## E0 ## E0 ## E0; }; \
333  struct { detail::_swizzle<4,T, Q, 1,0,0,1> E1 ## E0 ## E0 ## E1; }; \
334  struct { detail::_swizzle<4,T, Q, 1,0,1,0> E1 ## E0 ## E1 ## E0; }; \
335  struct { detail::_swizzle<4,T, Q, 1,0,1,1> E1 ## E0 ## E1 ## E1; }; \
336  struct { detail::_swizzle<4,T, Q, 1,1,0,0> E1 ## E1 ## E0 ## E0; }; \
337  struct { detail::_swizzle<4,T, Q, 1,1,0,1> E1 ## E1 ## E0 ## E1; }; \
338  struct { detail::_swizzle<4,T, Q, 1,1,1,0> E1 ## E1 ## E1 ## E0; }; \
339  struct { detail::_swizzle<4,T, Q, 1,1,1,1> E1 ## E1 ## E1 ## E1; };
340 
341 #define GLM_SWIZZLE3_2_MEMBERS(T, Q, E0,E1,E2) \
342  struct { detail::_swizzle<2,T, Q, 0,0,-1,-2> E0 ## E0; }; \
343  struct { detail::_swizzle<2,T, Q, 0,1,-1,-2> E0 ## E1; }; \
344  struct { detail::_swizzle<2,T, Q, 0,2,-1,-2> E0 ## E2; }; \
345  struct { detail::_swizzle<2,T, Q, 1,0,-1,-2> E1 ## E0; }; \
346  struct { detail::_swizzle<2,T, Q, 1,1,-1,-2> E1 ## E1; }; \
347  struct { detail::_swizzle<2,T, Q, 1,2,-1,-2> E1 ## E2; }; \
348  struct { detail::_swizzle<2,T, Q, 2,0,-1,-2> E2 ## E0; }; \
349  struct { detail::_swizzle<2,T, Q, 2,1,-1,-2> E2 ## E1; }; \
350  struct { detail::_swizzle<2,T, Q, 2,2,-1,-2> E2 ## E2; };
351 
352 #define GLM_SWIZZLE3_3_MEMBERS(T, Q ,E0,E1,E2) \
353  struct { detail::_swizzle<3, T, Q, 0,0,0,-1> E0 ## E0 ## E0; }; \
354  struct { detail::_swizzle<3, T, Q, 0,0,1,-1> E0 ## E0 ## E1; }; \
355  struct { detail::_swizzle<3, T, Q, 0,0,2,-1> E0 ## E0 ## E2; }; \
356  struct { detail::_swizzle<3, T, Q, 0,1,0,-1> E0 ## E1 ## E0; }; \
357  struct { detail::_swizzle<3, T, Q, 0,1,1,-1> E0 ## E1 ## E1; }; \
358  struct { detail::_swizzle<3, T, Q, 0,1,2,-1> E0 ## E1 ## E2; }; \
359  struct { detail::_swizzle<3, T, Q, 0,2,0,-1> E0 ## E2 ## E0; }; \
360  struct { detail::_swizzle<3, T, Q, 0,2,1,-1> E0 ## E2 ## E1; }; \
361  struct { detail::_swizzle<3, T, Q, 0,2,2,-1> E0 ## E2 ## E2; }; \
362  struct { detail::_swizzle<3, T, Q, 1,0,0,-1> E1 ## E0 ## E0; }; \
363  struct { detail::_swizzle<3, T, Q, 1,0,1,-1> E1 ## E0 ## E1; }; \
364  struct { detail::_swizzle<3, T, Q, 1,0,2,-1> E1 ## E0 ## E2; }; \
365  struct { detail::_swizzle<3, T, Q, 1,1,0,-1> E1 ## E1 ## E0; }; \
366  struct { detail::_swizzle<3, T, Q, 1,1,1,-1> E1 ## E1 ## E1; }; \
367  struct { detail::_swizzle<3, T, Q, 1,1,2,-1> E1 ## E1 ## E2; }; \
368  struct { detail::_swizzle<3, T, Q, 1,2,0,-1> E1 ## E2 ## E0; }; \
369  struct { detail::_swizzle<3, T, Q, 1,2,1,-1> E1 ## E2 ## E1; }; \
370  struct { detail::_swizzle<3, T, Q, 1,2,2,-1> E1 ## E2 ## E2; }; \
371  struct { detail::_swizzle<3, T, Q, 2,0,0,-1> E2 ## E0 ## E0; }; \
372  struct { detail::_swizzle<3, T, Q, 2,0,1,-1> E2 ## E0 ## E1; }; \
373  struct { detail::_swizzle<3, T, Q, 2,0,2,-1> E2 ## E0 ## E2; }; \
374  struct { detail::_swizzle<3, T, Q, 2,1,0,-1> E2 ## E1 ## E0; }; \
375  struct { detail::_swizzle<3, T, Q, 2,1,1,-1> E2 ## E1 ## E1; }; \
376  struct { detail::_swizzle<3, T, Q, 2,1,2,-1> E2 ## E1 ## E2; }; \
377  struct { detail::_swizzle<3, T, Q, 2,2,0,-1> E2 ## E2 ## E0; }; \
378  struct { detail::_swizzle<3, T, Q, 2,2,1,-1> E2 ## E2 ## E1; }; \
379  struct { detail::_swizzle<3, T, Q, 2,2,2,-1> E2 ## E2 ## E2; };
380 
381 #define GLM_SWIZZLE3_4_MEMBERS(T, Q, E0,E1,E2) \
382  struct { detail::_swizzle<4,T, Q, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \
383  struct { detail::_swizzle<4,T, Q, 0,0,0,1> E0 ## E0 ## E0 ## E1; }; \
384  struct { detail::_swizzle<4,T, Q, 0,0,0,2> E0 ## E0 ## E0 ## E2; }; \
385  struct { detail::_swizzle<4,T, Q, 0,0,1,0> E0 ## E0 ## E1 ## E0; }; \
386  struct { detail::_swizzle<4,T, Q, 0,0,1,1> E0 ## E0 ## E1 ## E1; }; \
387  struct { detail::_swizzle<4,T, Q, 0,0,1,2> E0 ## E0 ## E1 ## E2; }; \
388  struct { detail::_swizzle<4,T, Q, 0,0,2,0> E0 ## E0 ## E2 ## E0; }; \
389  struct { detail::_swizzle<4,T, Q, 0,0,2,1> E0 ## E0 ## E2 ## E1; }; \
390  struct { detail::_swizzle<4,T, Q, 0,0,2,2> E0 ## E0 ## E2 ## E2; }; \
391  struct { detail::_swizzle<4,T, Q, 0,1,0,0> E0 ## E1 ## E0 ## E0; }; \
392  struct { detail::_swizzle<4,T, Q, 0,1,0,1> E0 ## E1 ## E0 ## E1; }; \
393  struct { detail::_swizzle<4,T, Q, 0,1,0,2> E0 ## E1 ## E0 ## E2; }; \
394  struct { detail::_swizzle<4,T, Q, 0,1,1,0> E0 ## E1 ## E1 ## E0; }; \
395  struct { detail::_swizzle<4,T, Q, 0,1,1,1> E0 ## E1 ## E1 ## E1; }; \
396  struct { detail::_swizzle<4,T, Q, 0,1,1,2> E0 ## E1 ## E1 ## E2; }; \
397  struct { detail::_swizzle<4,T, Q, 0,1,2,0> E0 ## E1 ## E2 ## E0; }; \
398  struct { detail::_swizzle<4,T, Q, 0,1,2,1> E0 ## E1 ## E2 ## E1; }; \
399  struct { detail::_swizzle<4,T, Q, 0,1,2,2> E0 ## E1 ## E2 ## E2; }; \
400  struct { detail::_swizzle<4,T, Q, 0,2,0,0> E0 ## E2 ## E0 ## E0; }; \
401  struct { detail::_swizzle<4,T, Q, 0,2,0,1> E0 ## E2 ## E0 ## E1; }; \
402  struct { detail::_swizzle<4,T, Q, 0,2,0,2> E0 ## E2 ## E0 ## E2; }; \
403  struct { detail::_swizzle<4,T, Q, 0,2,1,0> E0 ## E2 ## E1 ## E0; }; \
404  struct { detail::_swizzle<4,T, Q, 0,2,1,1> E0 ## E2 ## E1 ## E1; }; \
405  struct { detail::_swizzle<4,T, Q, 0,2,1,2> E0 ## E2 ## E1 ## E2; }; \
406  struct { detail::_swizzle<4,T, Q, 0,2,2,0> E0 ## E2 ## E2 ## E0; }; \
407  struct { detail::_swizzle<4,T, Q, 0,2,2,1> E0 ## E2 ## E2 ## E1; }; \
408  struct { detail::_swizzle<4,T, Q, 0,2,2,2> E0 ## E2 ## E2 ## E2; }; \
409  struct { detail::_swizzle<4,T, Q, 1,0,0,0> E1 ## E0 ## E0 ## E0; }; \
410  struct { detail::_swizzle<4,T, Q, 1,0,0,1> E1 ## E0 ## E0 ## E1; }; \
411  struct { detail::_swizzle<4,T, Q, 1,0,0,2> E1 ## E0 ## E0 ## E2; }; \
412  struct { detail::_swizzle<4,T, Q, 1,0,1,0> E1 ## E0 ## E1 ## E0; }; \
413  struct { detail::_swizzle<4,T, Q, 1,0,1,1> E1 ## E0 ## E1 ## E1; }; \
414  struct { detail::_swizzle<4,T, Q, 1,0,1,2> E1 ## E0 ## E1 ## E2; }; \
415  struct { detail::_swizzle<4,T, Q, 1,0,2,0> E1 ## E0 ## E2 ## E0; }; \
416  struct { detail::_swizzle<4,T, Q, 1,0,2,1> E1 ## E0 ## E2 ## E1; }; \
417  struct { detail::_swizzle<4,T, Q, 1,0,2,2> E1 ## E0 ## E2 ## E2; }; \
418  struct { detail::_swizzle<4,T, Q, 1,1,0,0> E1 ## E1 ## E0 ## E0; }; \
419  struct { detail::_swizzle<4,T, Q, 1,1,0,1> E1 ## E1 ## E0 ## E1; }; \
420  struct { detail::_swizzle<4,T, Q, 1,1,0,2> E1 ## E1 ## E0 ## E2; }; \
421  struct { detail::_swizzle<4,T, Q, 1,1,1,0> E1 ## E1 ## E1 ## E0; }; \
422  struct { detail::_swizzle<4,T, Q, 1,1,1,1> E1 ## E1 ## E1 ## E1; }; \
423  struct { detail::_swizzle<4,T, Q, 1,1,1,2> E1 ## E1 ## E1 ## E2; }; \
424  struct { detail::_swizzle<4,T, Q, 1,1,2,0> E1 ## E1 ## E2 ## E0; }; \
425  struct { detail::_swizzle<4,T, Q, 1,1,2,1> E1 ## E1 ## E2 ## E1; }; \
426  struct { detail::_swizzle<4,T, Q, 1,1,2,2> E1 ## E1 ## E2 ## E2; }; \
427  struct { detail::_swizzle<4,T, Q, 1,2,0,0> E1 ## E2 ## E0 ## E0; }; \
428  struct { detail::_swizzle<4,T, Q, 1,2,0,1> E1 ## E2 ## E0 ## E1; }; \
429  struct { detail::_swizzle<4,T, Q, 1,2,0,2> E1 ## E2 ## E0 ## E2; }; \
430  struct { detail::_swizzle<4,T, Q, 1,2,1,0> E1 ## E2 ## E1 ## E0; }; \
431  struct { detail::_swizzle<4,T, Q, 1,2,1,1> E1 ## E2 ## E1 ## E1; }; \
432  struct { detail::_swizzle<4,T, Q, 1,2,1,2> E1 ## E2 ## E1 ## E2; }; \
433  struct { detail::_swizzle<4,T, Q, 1,2,2,0> E1 ## E2 ## E2 ## E0; }; \
434  struct { detail::_swizzle<4,T, Q, 1,2,2,1> E1 ## E2 ## E2 ## E1; }; \
435  struct { detail::_swizzle<4,T, Q, 1,2,2,2> E1 ## E2 ## E2 ## E2; }; \
436  struct { detail::_swizzle<4,T, Q, 2,0,0,0> E2 ## E0 ## E0 ## E0; }; \
437  struct { detail::_swizzle<4,T, Q, 2,0,0,1> E2 ## E0 ## E0 ## E1; }; \
438  struct { detail::_swizzle<4,T, Q, 2,0,0,2> E2 ## E0 ## E0 ## E2; }; \
439  struct { detail::_swizzle<4,T, Q, 2,0,1,0> E2 ## E0 ## E1 ## E0; }; \
440  struct { detail::_swizzle<4,T, Q, 2,0,1,1> E2 ## E0 ## E1 ## E1; }; \
441  struct { detail::_swizzle<4,T, Q, 2,0,1,2> E2 ## E0 ## E1 ## E2; }; \
442  struct { detail::_swizzle<4,T, Q, 2,0,2,0> E2 ## E0 ## E2 ## E0; }; \
443  struct { detail::_swizzle<4,T, Q, 2,0,2,1> E2 ## E0 ## E2 ## E1; }; \
444  struct { detail::_swizzle<4,T, Q, 2,0,2,2> E2 ## E0 ## E2 ## E2; }; \
445  struct { detail::_swizzle<4,T, Q, 2,1,0,0> E2 ## E1 ## E0 ## E0; }; \
446  struct { detail::_swizzle<4,T, Q, 2,1,0,1> E2 ## E1 ## E0 ## E1; }; \
447  struct { detail::_swizzle<4,T, Q, 2,1,0,2> E2 ## E1 ## E0 ## E2; }; \
448  struct { detail::_swizzle<4,T, Q, 2,1,1,0> E2 ## E1 ## E1 ## E0; }; \
449  struct { detail::_swizzle<4,T, Q, 2,1,1,1> E2 ## E1 ## E1 ## E1; }; \
450  struct { detail::_swizzle<4,T, Q, 2,1,1,2> E2 ## E1 ## E1 ## E2; }; \
451  struct { detail::_swizzle<4,T, Q, 2,1,2,0> E2 ## E1 ## E2 ## E0; }; \
452  struct { detail::_swizzle<4,T, Q, 2,1,2,1> E2 ## E1 ## E2 ## E1; }; \
453  struct { detail::_swizzle<4,T, Q, 2,1,2,2> E2 ## E1 ## E2 ## E2; }; \
454  struct { detail::_swizzle<4,T, Q, 2,2,0,0> E2 ## E2 ## E0 ## E0; }; \
455  struct { detail::_swizzle<4,T, Q, 2,2,0,1> E2 ## E2 ## E0 ## E1; }; \
456  struct { detail::_swizzle<4,T, Q, 2,2,0,2> E2 ## E2 ## E0 ## E2; }; \
457  struct { detail::_swizzle<4,T, Q, 2,2,1,0> E2 ## E2 ## E1 ## E0; }; \
458  struct { detail::_swizzle<4,T, Q, 2,2,1,1> E2 ## E2 ## E1 ## E1; }; \
459  struct { detail::_swizzle<4,T, Q, 2,2,1,2> E2 ## E2 ## E1 ## E2; }; \
460  struct { detail::_swizzle<4,T, Q, 2,2,2,0> E2 ## E2 ## E2 ## E0; }; \
461  struct { detail::_swizzle<4,T, Q, 2,2,2,1> E2 ## E2 ## E2 ## E1; }; \
462  struct { detail::_swizzle<4,T, Q, 2,2,2,2> E2 ## E2 ## E2 ## E2; };
463 
464 #define GLM_SWIZZLE4_2_MEMBERS(T, Q, E0,E1,E2,E3) \
465  struct { detail::_swizzle<2,T, Q, 0,0,-1,-2> E0 ## E0; }; \
466  struct { detail::_swizzle<2,T, Q, 0,1,-1,-2> E0 ## E1; }; \
467  struct { detail::_swizzle<2,T, Q, 0,2,-1,-2> E0 ## E2; }; \
468  struct { detail::_swizzle<2,T, Q, 0,3,-1,-2> E0 ## E3; }; \
469  struct { detail::_swizzle<2,T, Q, 1,0,-1,-2> E1 ## E0; }; \
470  struct { detail::_swizzle<2,T, Q, 1,1,-1,-2> E1 ## E1; }; \
471  struct { detail::_swizzle<2,T, Q, 1,2,-1,-2> E1 ## E2; }; \
472  struct { detail::_swizzle<2,T, Q, 1,3,-1,-2> E1 ## E3; }; \
473  struct { detail::_swizzle<2,T, Q, 2,0,-1,-2> E2 ## E0; }; \
474  struct { detail::_swizzle<2,T, Q, 2,1,-1,-2> E2 ## E1; }; \
475  struct { detail::_swizzle<2,T, Q, 2,2,-1,-2> E2 ## E2; }; \
476  struct { detail::_swizzle<2,T, Q, 2,3,-1,-2> E2 ## E3; }; \
477  struct { detail::_swizzle<2,T, Q, 3,0,-1,-2> E3 ## E0; }; \
478  struct { detail::_swizzle<2,T, Q, 3,1,-1,-2> E3 ## E1; }; \
479  struct { detail::_swizzle<2,T, Q, 3,2,-1,-2> E3 ## E2; }; \
480  struct { detail::_swizzle<2,T, Q, 3,3,-1,-2> E3 ## E3; };
481 
482 #define GLM_SWIZZLE4_3_MEMBERS(T, Q, E0,E1,E2,E3) \
483  struct { detail::_swizzle<3, T, Q, 0,0,0,-1> E0 ## E0 ## E0; }; \
484  struct { detail::_swizzle<3, T, Q, 0,0,1,-1> E0 ## E0 ## E1; }; \
485  struct { detail::_swizzle<3, T, Q, 0,0,2,-1> E0 ## E0 ## E2; }; \
486  struct { detail::_swizzle<3, T, Q, 0,0,3,-1> E0 ## E0 ## E3; }; \
487  struct { detail::_swizzle<3, T, Q, 0,1,0,-1> E0 ## E1 ## E0; }; \
488  struct { detail::_swizzle<3, T, Q, 0,1,1,-1> E0 ## E1 ## E1; }; \
489  struct { detail::_swizzle<3, T, Q, 0,1,2,-1> E0 ## E1 ## E2; }; \
490  struct { detail::_swizzle<3, T, Q, 0,1,3,-1> E0 ## E1 ## E3; }; \
491  struct { detail::_swizzle<3, T, Q, 0,2,0,-1> E0 ## E2 ## E0; }; \
492  struct { detail::_swizzle<3, T, Q, 0,2,1,-1> E0 ## E2 ## E1; }; \
493  struct { detail::_swizzle<3, T, Q, 0,2,2,-1> E0 ## E2 ## E2; }; \
494  struct { detail::_swizzle<3, T, Q, 0,2,3,-1> E0 ## E2 ## E3; }; \
495  struct { detail::_swizzle<3, T, Q, 0,3,0,-1> E0 ## E3 ## E0; }; \
496  struct { detail::_swizzle<3, T, Q, 0,3,1,-1> E0 ## E3 ## E1; }; \
497  struct { detail::_swizzle<3, T, Q, 0,3,2,-1> E0 ## E3 ## E2; }; \
498  struct { detail::_swizzle<3, T, Q, 0,3,3,-1> E0 ## E3 ## E3; }; \
499  struct { detail::_swizzle<3, T, Q, 1,0,0,-1> E1 ## E0 ## E0; }; \
500  struct { detail::_swizzle<3, T, Q, 1,0,1,-1> E1 ## E0 ## E1; }; \
501  struct { detail::_swizzle<3, T, Q, 1,0,2,-1> E1 ## E0 ## E2; }; \
502  struct { detail::_swizzle<3, T, Q, 1,0,3,-1> E1 ## E0 ## E3; }; \
503  struct { detail::_swizzle<3, T, Q, 1,1,0,-1> E1 ## E1 ## E0; }; \
504  struct { detail::_swizzle<3, T, Q, 1,1,1,-1> E1 ## E1 ## E1; }; \
505  struct { detail::_swizzle<3, T, Q, 1,1,2,-1> E1 ## E1 ## E2; }; \
506  struct { detail::_swizzle<3, T, Q, 1,1,3,-1> E1 ## E1 ## E3; }; \
507  struct { detail::_swizzle<3, T, Q, 1,2,0,-1> E1 ## E2 ## E0; }; \
508  struct { detail::_swizzle<3, T, Q, 1,2,1,-1> E1 ## E2 ## E1; }; \
509  struct { detail::_swizzle<3, T, Q, 1,2,2,-1> E1 ## E2 ## E2; }; \
510  struct { detail::_swizzle<3, T, Q, 1,2,3,-1> E1 ## E2 ## E3; }; \
511  struct { detail::_swizzle<3, T, Q, 1,3,0,-1> E1 ## E3 ## E0; }; \
512  struct { detail::_swizzle<3, T, Q, 1,3,1,-1> E1 ## E3 ## E1; }; \
513  struct { detail::_swizzle<3, T, Q, 1,3,2,-1> E1 ## E3 ## E2; }; \
514  struct { detail::_swizzle<3, T, Q, 1,3,3,-1> E1 ## E3 ## E3; }; \
515  struct { detail::_swizzle<3, T, Q, 2,0,0,-1> E2 ## E0 ## E0; }; \
516  struct { detail::_swizzle<3, T, Q, 2,0,1,-1> E2 ## E0 ## E1; }; \
517  struct { detail::_swizzle<3, T, Q, 2,0,2,-1> E2 ## E0 ## E2; }; \
518  struct { detail::_swizzle<3, T, Q, 2,0,3,-1> E2 ## E0 ## E3; }; \
519  struct { detail::_swizzle<3, T, Q, 2,1,0,-1> E2 ## E1 ## E0; }; \
520  struct { detail::_swizzle<3, T, Q, 2,1,1,-1> E2 ## E1 ## E1; }; \
521  struct { detail::_swizzle<3, T, Q, 2,1,2,-1> E2 ## E1 ## E2; }; \
522  struct { detail::_swizzle<3, T, Q, 2,1,3,-1> E2 ## E1 ## E3; }; \
523  struct { detail::_swizzle<3, T, Q, 2,2,0,-1> E2 ## E2 ## E0; }; \
524  struct { detail::_swizzle<3, T, Q, 2,2,1,-1> E2 ## E2 ## E1; }; \
525  struct { detail::_swizzle<3, T, Q, 2,2,2,-1> E2 ## E2 ## E2; }; \
526  struct { detail::_swizzle<3, T, Q, 2,2,3,-1> E2 ## E2 ## E3; }; \
527  struct { detail::_swizzle<3, T, Q, 2,3,0,-1> E2 ## E3 ## E0; }; \
528  struct { detail::_swizzle<3, T, Q, 2,3,1,-1> E2 ## E3 ## E1; }; \
529  struct { detail::_swizzle<3, T, Q, 2,3,2,-1> E2 ## E3 ## E2; }; \
530  struct { detail::_swizzle<3, T, Q, 2,3,3,-1> E2 ## E3 ## E3; }; \
531  struct { detail::_swizzle<3, T, Q, 3,0,0,-1> E3 ## E0 ## E0; }; \
532  struct { detail::_swizzle<3, T, Q, 3,0,1,-1> E3 ## E0 ## E1; }; \
533  struct { detail::_swizzle<3, T, Q, 3,0,2,-1> E3 ## E0 ## E2; }; \
534  struct { detail::_swizzle<3, T, Q, 3,0,3,-1> E3 ## E0 ## E3; }; \
535  struct { detail::_swizzle<3, T, Q, 3,1,0,-1> E3 ## E1 ## E0; }; \
536  struct { detail::_swizzle<3, T, Q, 3,1,1,-1> E3 ## E1 ## E1; }; \
537  struct { detail::_swizzle<3, T, Q, 3,1,2,-1> E3 ## E1 ## E2; }; \
538  struct { detail::_swizzle<3, T, Q, 3,1,3,-1> E3 ## E1 ## E3; }; \
539  struct { detail::_swizzle<3, T, Q, 3,2,0,-1> E3 ## E2 ## E0; }; \
540  struct { detail::_swizzle<3, T, Q, 3,2,1,-1> E3 ## E2 ## E1; }; \
541  struct { detail::_swizzle<3, T, Q, 3,2,2,-1> E3 ## E2 ## E2; }; \
542  struct { detail::_swizzle<3, T, Q, 3,2,3,-1> E3 ## E2 ## E3; }; \
543  struct { detail::_swizzle<3, T, Q, 3,3,0,-1> E3 ## E3 ## E0; }; \
544  struct { detail::_swizzle<3, T, Q, 3,3,1,-1> E3 ## E3 ## E1; }; \
545  struct { detail::_swizzle<3, T, Q, 3,3,2,-1> E3 ## E3 ## E2; }; \
546  struct { detail::_swizzle<3, T, Q, 3,3,3,-1> E3 ## E3 ## E3; };
547 
548 #define GLM_SWIZZLE4_4_MEMBERS(T, Q, E0,E1,E2,E3) \
549  struct { detail::_swizzle<4, T, Q, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \
550  struct { detail::_swizzle<4, T, Q, 0,0,0,1> E0 ## E0 ## E0 ## E1; }; \
551  struct { detail::_swizzle<4, T, Q, 0,0,0,2> E0 ## E0 ## E0 ## E2; }; \
552  struct { detail::_swizzle<4, T, Q, 0,0,0,3> E0 ## E0 ## E0 ## E3; }; \
553  struct { detail::_swizzle<4, T, Q, 0,0,1,0> E0 ## E0 ## E1 ## E0; }; \
554  struct { detail::_swizzle<4, T, Q, 0,0,1,1> E0 ## E0 ## E1 ## E1; }; \
555  struct { detail::_swizzle<4, T, Q, 0,0,1,2> E0 ## E0 ## E1 ## E2; }; \
556  struct { detail::_swizzle<4, T, Q, 0,0,1,3> E0 ## E0 ## E1 ## E3; }; \
557  struct { detail::_swizzle<4, T, Q, 0,0,2,0> E0 ## E0 ## E2 ## E0; }; \
558  struct { detail::_swizzle<4, T, Q, 0,0,2,1> E0 ## E0 ## E2 ## E1; }; \
559  struct { detail::_swizzle<4, T, Q, 0,0,2,2> E0 ## E0 ## E2 ## E2; }; \
560  struct { detail::_swizzle<4, T, Q, 0,0,2,3> E0 ## E0 ## E2 ## E3; }; \
561  struct { detail::_swizzle<4, T, Q, 0,0,3,0> E0 ## E0 ## E3 ## E0; }; \
562  struct { detail::_swizzle<4, T, Q, 0,0,3,1> E0 ## E0 ## E3 ## E1; }; \
563  struct { detail::_swizzle<4, T, Q, 0,0,3,2> E0 ## E0 ## E3 ## E2; }; \
564  struct { detail::_swizzle<4, T, Q, 0,0,3,3> E0 ## E0 ## E3 ## E3; }; \
565  struct { detail::_swizzle<4, T, Q, 0,1,0,0> E0 ## E1 ## E0 ## E0; }; \
566  struct { detail::_swizzle<4, T, Q, 0,1,0,1> E0 ## E1 ## E0 ## E1; }; \
567  struct { detail::_swizzle<4, T, Q, 0,1,0,2> E0 ## E1 ## E0 ## E2; }; \
568  struct { detail::_swizzle<4, T, Q, 0,1,0,3> E0 ## E1 ## E0 ## E3; }; \
569  struct { detail::_swizzle<4, T, Q, 0,1,1,0> E0 ## E1 ## E1 ## E0; }; \
570  struct { detail::_swizzle<4, T, Q, 0,1,1,1> E0 ## E1 ## E1 ## E1; }; \
571  struct { detail::_swizzle<4, T, Q, 0,1,1,2> E0 ## E1 ## E1 ## E2; }; \
572  struct { detail::_swizzle<4, T, Q, 0,1,1,3> E0 ## E1 ## E1 ## E3; }; \
573  struct { detail::_swizzle<4, T, Q, 0,1,2,0> E0 ## E1 ## E2 ## E0; }; \
574  struct { detail::_swizzle<4, T, Q, 0,1,2,1> E0 ## E1 ## E2 ## E1; }; \
575  struct { detail::_swizzle<4, T, Q, 0,1,2,2> E0 ## E1 ## E2 ## E2; }; \
576  struct { detail::_swizzle<4, T, Q, 0,1,2,3> E0 ## E1 ## E2 ## E3; }; \
577  struct { detail::_swizzle<4, T, Q, 0,1,3,0> E0 ## E1 ## E3 ## E0; }; \
578  struct { detail::_swizzle<4, T, Q, 0,1,3,1> E0 ## E1 ## E3 ## E1; }; \
579  struct { detail::_swizzle<4, T, Q, 0,1,3,2> E0 ## E1 ## E3 ## E2; }; \
580  struct { detail::_swizzle<4, T, Q, 0,1,3,3> E0 ## E1 ## E3 ## E3; }; \
581  struct { detail::_swizzle<4, T, Q, 0,2,0,0> E0 ## E2 ## E0 ## E0; }; \
582  struct { detail::_swizzle<4, T, Q, 0,2,0,1> E0 ## E2 ## E0 ## E1; }; \
583  struct { detail::_swizzle<4, T, Q, 0,2,0,2> E0 ## E2 ## E0 ## E2; }; \
584  struct { detail::_swizzle<4, T, Q, 0,2,0,3> E0 ## E2 ## E0 ## E3; }; \
585  struct { detail::_swizzle<4, T, Q, 0,2,1,0> E0 ## E2 ## E1 ## E0; }; \
586  struct { detail::_swizzle<4, T, Q, 0,2,1,1> E0 ## E2 ## E1 ## E1; }; \
587  struct { detail::_swizzle<4, T, Q, 0,2,1,2> E0 ## E2 ## E1 ## E2; }; \
588  struct { detail::_swizzle<4, T, Q, 0,2,1,3> E0 ## E2 ## E1 ## E3; }; \
589  struct { detail::_swizzle<4, T, Q, 0,2,2,0> E0 ## E2 ## E2 ## E0; }; \
590  struct { detail::_swizzle<4, T, Q, 0,2,2,1> E0 ## E2 ## E2 ## E1; }; \
591  struct { detail::_swizzle<4, T, Q, 0,2,2,2> E0 ## E2 ## E2 ## E2; }; \
592  struct { detail::_swizzle<4, T, Q, 0,2,2,3> E0 ## E2 ## E2 ## E3; }; \
593  struct { detail::_swizzle<4, T, Q, 0,2,3,0> E0 ## E2 ## E3 ## E0; }; \
594  struct { detail::_swizzle<4, T, Q, 0,2,3,1> E0 ## E2 ## E3 ## E1; }; \
595  struct { detail::_swizzle<4, T, Q, 0,2,3,2> E0 ## E2 ## E3 ## E2; }; \
596  struct { detail::_swizzle<4, T, Q, 0,2,3,3> E0 ## E2 ## E3 ## E3; }; \
597  struct { detail::_swizzle<4, T, Q, 0,3,0,0> E0 ## E3 ## E0 ## E0; }; \
598  struct { detail::_swizzle<4, T, Q, 0,3,0,1> E0 ## E3 ## E0 ## E1; }; \
599  struct { detail::_swizzle<4, T, Q, 0,3,0,2> E0 ## E3 ## E0 ## E2; }; \
600  struct { detail::_swizzle<4, T, Q, 0,3,0,3> E0 ## E3 ## E0 ## E3; }; \
601  struct { detail::_swizzle<4, T, Q, 0,3,1,0> E0 ## E3 ## E1 ## E0; }; \
602  struct { detail::_swizzle<4, T, Q, 0,3,1,1> E0 ## E3 ## E1 ## E1; }; \
603  struct { detail::_swizzle<4, T, Q, 0,3,1,2> E0 ## E3 ## E1 ## E2; }; \
604  struct { detail::_swizzle<4, T, Q, 0,3,1,3> E0 ## E3 ## E1 ## E3; }; \
605  struct { detail::_swizzle<4, T, Q, 0,3,2,0> E0 ## E3 ## E2 ## E0; }; \
606  struct { detail::_swizzle<4, T, Q, 0,3,2,1> E0 ## E3 ## E2 ## E1; }; \
607  struct { detail::_swizzle<4, T, Q, 0,3,2,2> E0 ## E3 ## E2 ## E2; }; \
608  struct { detail::_swizzle<4, T, Q, 0,3,2,3> E0 ## E3 ## E2 ## E3; }; \
609  struct { detail::_swizzle<4, T, Q, 0,3,3,0> E0 ## E3 ## E3 ## E0; }; \
610  struct { detail::_swizzle<4, T, Q, 0,3,3,1> E0 ## E3 ## E3 ## E1; }; \
611  struct { detail::_swizzle<4, T, Q, 0,3,3,2> E0 ## E3 ## E3 ## E2; }; \
612  struct { detail::_swizzle<4, T, Q, 0,3,3,3> E0 ## E3 ## E3 ## E3; }; \
613  struct { detail::_swizzle<4, T, Q, 1,0,0,0> E1 ## E0 ## E0 ## E0; }; \
614  struct { detail::_swizzle<4, T, Q, 1,0,0,1> E1 ## E0 ## E0 ## E1; }; \
615  struct { detail::_swizzle<4, T, Q, 1,0,0,2> E1 ## E0 ## E0 ## E2; }; \
616  struct { detail::_swizzle<4, T, Q, 1,0,0,3> E1 ## E0 ## E0 ## E3; }; \
617  struct { detail::_swizzle<4, T, Q, 1,0,1,0> E1 ## E0 ## E1 ## E0; }; \
618  struct { detail::_swizzle<4, T, Q, 1,0,1,1> E1 ## E0 ## E1 ## E1; }; \
619  struct { detail::_swizzle<4, T, Q, 1,0,1,2> E1 ## E0 ## E1 ## E2; }; \
620  struct { detail::_swizzle<4, T, Q, 1,0,1,3> E1 ## E0 ## E1 ## E3; }; \
621  struct { detail::_swizzle<4, T, Q, 1,0,2,0> E1 ## E0 ## E2 ## E0; }; \
622  struct { detail::_swizzle<4, T, Q, 1,0,2,1> E1 ## E0 ## E2 ## E1; }; \
623  struct { detail::_swizzle<4, T, Q, 1,0,2,2> E1 ## E0 ## E2 ## E2; }; \
624  struct { detail::_swizzle<4, T, Q, 1,0,2,3> E1 ## E0 ## E2 ## E3; }; \
625  struct { detail::_swizzle<4, T, Q, 1,0,3,0> E1 ## E0 ## E3 ## E0; }; \
626  struct { detail::_swizzle<4, T, Q, 1,0,3,1> E1 ## E0 ## E3 ## E1; }; \
627  struct { detail::_swizzle<4, T, Q, 1,0,3,2> E1 ## E0 ## E3 ## E2; }; \
628  struct { detail::_swizzle<4, T, Q, 1,0,3,3> E1 ## E0 ## E3 ## E3; }; \
629  struct { detail::_swizzle<4, T, Q, 1,1,0,0> E1 ## E1 ## E0 ## E0; }; \
630  struct { detail::_swizzle<4, T, Q, 1,1,0,1> E1 ## E1 ## E0 ## E1; }; \
631  struct { detail::_swizzle<4, T, Q, 1,1,0,2> E1 ## E1 ## E0 ## E2; }; \
632  struct { detail::_swizzle<4, T, Q, 1,1,0,3> E1 ## E1 ## E0 ## E3; }; \
633  struct { detail::_swizzle<4, T, Q, 1,1,1,0> E1 ## E1 ## E1 ## E0; }; \
634  struct { detail::_swizzle<4, T, Q, 1,1,1,1> E1 ## E1 ## E1 ## E1; }; \
635  struct { detail::_swizzle<4, T, Q, 1,1,1,2> E1 ## E1 ## E1 ## E2; }; \
636  struct { detail::_swizzle<4, T, Q, 1,1,1,3> E1 ## E1 ## E1 ## E3; }; \
637  struct { detail::_swizzle<4, T, Q, 1,1,2,0> E1 ## E1 ## E2 ## E0; }; \
638  struct { detail::_swizzle<4, T, Q, 1,1,2,1> E1 ## E1 ## E2 ## E1; }; \
639  struct { detail::_swizzle<4, T, Q, 1,1,2,2> E1 ## E1 ## E2 ## E2; }; \
640  struct { detail::_swizzle<4, T, Q, 1,1,2,3> E1 ## E1 ## E2 ## E3; }; \
641  struct { detail::_swizzle<4, T, Q, 1,1,3,0> E1 ## E1 ## E3 ## E0; }; \
642  struct { detail::_swizzle<4, T, Q, 1,1,3,1> E1 ## E1 ## E3 ## E1; }; \
643  struct { detail::_swizzle<4, T, Q, 1,1,3,2> E1 ## E1 ## E3 ## E2; }; \
644  struct { detail::_swizzle<4, T, Q, 1,1,3,3> E1 ## E1 ## E3 ## E3; }; \
645  struct { detail::_swizzle<4, T, Q, 1,2,0,0> E1 ## E2 ## E0 ## E0; }; \
646  struct { detail::_swizzle<4, T, Q, 1,2,0,1> E1 ## E2 ## E0 ## E1; }; \
647  struct { detail::_swizzle<4, T, Q, 1,2,0,2> E1 ## E2 ## E0 ## E2; }; \
648  struct { detail::_swizzle<4, T, Q, 1,2,0,3> E1 ## E2 ## E0 ## E3; }; \
649  struct { detail::_swizzle<4, T, Q, 1,2,1,0> E1 ## E2 ## E1 ## E0; }; \
650  struct { detail::_swizzle<4, T, Q, 1,2,1,1> E1 ## E2 ## E1 ## E1; }; \
651  struct { detail::_swizzle<4, T, Q, 1,2,1,2> E1 ## E2 ## E1 ## E2; }; \
652  struct { detail::_swizzle<4, T, Q, 1,2,1,3> E1 ## E2 ## E1 ## E3; }; \
653  struct { detail::_swizzle<4, T, Q, 1,2,2,0> E1 ## E2 ## E2 ## E0; }; \
654  struct { detail::_swizzle<4, T, Q, 1,2,2,1> E1 ## E2 ## E2 ## E1; }; \
655  struct { detail::_swizzle<4, T, Q, 1,2,2,2> E1 ## E2 ## E2 ## E2; }; \
656  struct { detail::_swizzle<4, T, Q, 1,2,2,3> E1 ## E2 ## E2 ## E3; }; \
657  struct { detail::_swizzle<4, T, Q, 1,2,3,0> E1 ## E2 ## E3 ## E0; }; \
658  struct { detail::_swizzle<4, T, Q, 1,2,3,1> E1 ## E2 ## E3 ## E1; }; \
659  struct { detail::_swizzle<4, T, Q, 1,2,3,2> E1 ## E2 ## E3 ## E2; }; \
660  struct { detail::_swizzle<4, T, Q, 1,2,3,3> E1 ## E2 ## E3 ## E3; }; \
661  struct { detail::_swizzle<4, T, Q, 1,3,0,0> E1 ## E3 ## E0 ## E0; }; \
662  struct { detail::_swizzle<4, T, Q, 1,3,0,1> E1 ## E3 ## E0 ## E1; }; \
663  struct { detail::_swizzle<4, T, Q, 1,3,0,2> E1 ## E3 ## E0 ## E2; }; \
664  struct { detail::_swizzle<4, T, Q, 1,3,0,3> E1 ## E3 ## E0 ## E3; }; \
665  struct { detail::_swizzle<4, T, Q, 1,3,1,0> E1 ## E3 ## E1 ## E0; }; \
666  struct { detail::_swizzle<4, T, Q, 1,3,1,1> E1 ## E3 ## E1 ## E1; }; \
667  struct { detail::_swizzle<4, T, Q, 1,3,1,2> E1 ## E3 ## E1 ## E2; }; \
668  struct { detail::_swizzle<4, T, Q, 1,3,1,3> E1 ## E3 ## E1 ## E3; }; \
669  struct { detail::_swizzle<4, T, Q, 1,3,2,0> E1 ## E3 ## E2 ## E0; }; \
670  struct { detail::_swizzle<4, T, Q, 1,3,2,1> E1 ## E3 ## E2 ## E1; }; \
671  struct { detail::_swizzle<4, T, Q, 1,3,2,2> E1 ## E3 ## E2 ## E2; }; \
672  struct { detail::_swizzle<4, T, Q, 1,3,2,3> E1 ## E3 ## E2 ## E3; }; \
673  struct { detail::_swizzle<4, T, Q, 1,3,3,0> E1 ## E3 ## E3 ## E0; }; \
674  struct { detail::_swizzle<4, T, Q, 1,3,3,1> E1 ## E3 ## E3 ## E1; }; \
675  struct { detail::_swizzle<4, T, Q, 1,3,3,2> E1 ## E3 ## E3 ## E2; }; \
676  struct { detail::_swizzle<4, T, Q, 1,3,3,3> E1 ## E3 ## E3 ## E3; }; \
677  struct { detail::_swizzle<4, T, Q, 2,0,0,0> E2 ## E0 ## E0 ## E0; }; \
678  struct { detail::_swizzle<4, T, Q, 2,0,0,1> E2 ## E0 ## E0 ## E1; }; \
679  struct { detail::_swizzle<4, T, Q, 2,0,0,2> E2 ## E0 ## E0 ## E2; }; \
680  struct { detail::_swizzle<4, T, Q, 2,0,0,3> E2 ## E0 ## E0 ## E3; }; \
681  struct { detail::_swizzle<4, T, Q, 2,0,1,0> E2 ## E0 ## E1 ## E0; }; \
682  struct { detail::_swizzle<4, T, Q, 2,0,1,1> E2 ## E0 ## E1 ## E1; }; \
683  struct { detail::_swizzle<4, T, Q, 2,0,1,2> E2 ## E0 ## E1 ## E2; }; \
684  struct { detail::_swizzle<4, T, Q, 2,0,1,3> E2 ## E0 ## E1 ## E3; }; \
685  struct { detail::_swizzle<4, T, Q, 2,0,2,0> E2 ## E0 ## E2 ## E0; }; \
686  struct { detail::_swizzle<4, T, Q, 2,0,2,1> E2 ## E0 ## E2 ## E1; }; \
687  struct { detail::_swizzle<4, T, Q, 2,0,2,2> E2 ## E0 ## E2 ## E2; }; \
688  struct { detail::_swizzle<4, T, Q, 2,0,2,3> E2 ## E0 ## E2 ## E3; }; \
689  struct { detail::_swizzle<4, T, Q, 2,0,3,0> E2 ## E0 ## E3 ## E0; }; \
690  struct { detail::_swizzle<4, T, Q, 2,0,3,1> E2 ## E0 ## E3 ## E1; }; \
691  struct { detail::_swizzle<4, T, Q, 2,0,3,2> E2 ## E0 ## E3 ## E2; }; \
692  struct { detail::_swizzle<4, T, Q, 2,0,3,3> E2 ## E0 ## E3 ## E3; }; \
693  struct { detail::_swizzle<4, T, Q, 2,1,0,0> E2 ## E1 ## E0 ## E0; }; \
694  struct { detail::_swizzle<4, T, Q, 2,1,0,1> E2 ## E1 ## E0 ## E1; }; \
695  struct { detail::_swizzle<4, T, Q, 2,1,0,2> E2 ## E1 ## E0 ## E2; }; \
696  struct { detail::_swizzle<4, T, Q, 2,1,0,3> E2 ## E1 ## E0 ## E3; }; \
697  struct { detail::_swizzle<4, T, Q, 2,1,1,0> E2 ## E1 ## E1 ## E0; }; \
698  struct { detail::_swizzle<4, T, Q, 2,1,1,1> E2 ## E1 ## E1 ## E1; }; \
699  struct { detail::_swizzle<4, T, Q, 2,1,1,2> E2 ## E1 ## E1 ## E2; }; \
700  struct { detail::_swizzle<4, T, Q, 2,1,1,3> E2 ## E1 ## E1 ## E3; }; \
701  struct { detail::_swizzle<4, T, Q, 2,1,2,0> E2 ## E1 ## E2 ## E0; }; \
702  struct { detail::_swizzle<4, T, Q, 2,1,2,1> E2 ## E1 ## E2 ## E1; }; \
703  struct { detail::_swizzle<4, T, Q, 2,1,2,2> E2 ## E1 ## E2 ## E2; }; \
704  struct { detail::_swizzle<4, T, Q, 2,1,2,3> E2 ## E1 ## E2 ## E3; }; \
705  struct { detail::_swizzle<4, T, Q, 2,1,3,0> E2 ## E1 ## E3 ## E0; }; \
706  struct { detail::_swizzle<4, T, Q, 2,1,3,1> E2 ## E1 ## E3 ## E1; }; \
707  struct { detail::_swizzle<4, T, Q, 2,1,3,2> E2 ## E1 ## E3 ## E2; }; \
708  struct { detail::_swizzle<4, T, Q, 2,1,3,3> E2 ## E1 ## E3 ## E3; }; \
709  struct { detail::_swizzle<4, T, Q, 2,2,0,0> E2 ## E2 ## E0 ## E0; }; \
710  struct { detail::_swizzle<4, T, Q, 2,2,0,1> E2 ## E2 ## E0 ## E1; }; \
711  struct { detail::_swizzle<4, T, Q, 2,2,0,2> E2 ## E2 ## E0 ## E2; }; \
712  struct { detail::_swizzle<4, T, Q, 2,2,0,3> E2 ## E2 ## E0 ## E3; }; \
713  struct { detail::_swizzle<4, T, Q, 2,2,1,0> E2 ## E2 ## E1 ## E0; }; \
714  struct { detail::_swizzle<4, T, Q, 2,2,1,1> E2 ## E2 ## E1 ## E1; }; \
715  struct { detail::_swizzle<4, T, Q, 2,2,1,2> E2 ## E2 ## E1 ## E2; }; \
716  struct { detail::_swizzle<4, T, Q, 2,2,1,3> E2 ## E2 ## E1 ## E3; }; \
717  struct { detail::_swizzle<4, T, Q, 2,2,2,0> E2 ## E2 ## E2 ## E0; }; \
718  struct { detail::_swizzle<4, T, Q, 2,2,2,1> E2 ## E2 ## E2 ## E1; }; \
719  struct { detail::_swizzle<4, T, Q, 2,2,2,2> E2 ## E2 ## E2 ## E2; }; \
720  struct { detail::_swizzle<4, T, Q, 2,2,2,3> E2 ## E2 ## E2 ## E3; }; \
721  struct { detail::_swizzle<4, T, Q, 2,2,3,0> E2 ## E2 ## E3 ## E0; }; \
722  struct { detail::_swizzle<4, T, Q, 2,2,3,1> E2 ## E2 ## E3 ## E1; }; \
723  struct { detail::_swizzle<4, T, Q, 2,2,3,2> E2 ## E2 ## E3 ## E2; }; \
724  struct { detail::_swizzle<4, T, Q, 2,2,3,3> E2 ## E2 ## E3 ## E3; }; \
725  struct { detail::_swizzle<4, T, Q, 2,3,0,0> E2 ## E3 ## E0 ## E0; }; \
726  struct { detail::_swizzle<4, T, Q, 2,3,0,1> E2 ## E3 ## E0 ## E1; }; \
727  struct { detail::_swizzle<4, T, Q, 2,3,0,2> E2 ## E3 ## E0 ## E2; }; \
728  struct { detail::_swizzle<4, T, Q, 2,3,0,3> E2 ## E3 ## E0 ## E3; }; \
729  struct { detail::_swizzle<4, T, Q, 2,3,1,0> E2 ## E3 ## E1 ## E0; }; \
730  struct { detail::_swizzle<4, T, Q, 2,3,1,1> E2 ## E3 ## E1 ## E1; }; \
731  struct { detail::_swizzle<4, T, Q, 2,3,1,2> E2 ## E3 ## E1 ## E2; }; \
732  struct { detail::_swizzle<4, T, Q, 2,3,1,3> E2 ## E3 ## E1 ## E3; }; \
733  struct { detail::_swizzle<4, T, Q, 2,3,2,0> E2 ## E3 ## E2 ## E0; }; \
734  struct { detail::_swizzle<4, T, Q, 2,3,2,1> E2 ## E3 ## E2 ## E1; }; \
735  struct { detail::_swizzle<4, T, Q, 2,3,2,2> E2 ## E3 ## E2 ## E2; }; \
736  struct { detail::_swizzle<4, T, Q, 2,3,2,3> E2 ## E3 ## E2 ## E3; }; \
737  struct { detail::_swizzle<4, T, Q, 2,3,3,0> E2 ## E3 ## E3 ## E0; }; \
738  struct { detail::_swizzle<4, T, Q, 2,3,3,1> E2 ## E3 ## E3 ## E1; }; \
739  struct { detail::_swizzle<4, T, Q, 2,3,3,2> E2 ## E3 ## E3 ## E2; }; \
740  struct { detail::_swizzle<4, T, Q, 2,3,3,3> E2 ## E3 ## E3 ## E3; }; \
741  struct { detail::_swizzle<4, T, Q, 3,0,0,0> E3 ## E0 ## E0 ## E0; }; \
742  struct { detail::_swizzle<4, T, Q, 3,0,0,1> E3 ## E0 ## E0 ## E1; }; \
743  struct { detail::_swizzle<4, T, Q, 3,0,0,2> E3 ## E0 ## E0 ## E2; }; \
744  struct { detail::_swizzle<4, T, Q, 3,0,0,3> E3 ## E0 ## E0 ## E3; }; \
745  struct { detail::_swizzle<4, T, Q, 3,0,1,0> E3 ## E0 ## E1 ## E0; }; \
746  struct { detail::_swizzle<4, T, Q, 3,0,1,1> E3 ## E0 ## E1 ## E1; }; \
747  struct { detail::_swizzle<4, T, Q, 3,0,1,2> E3 ## E0 ## E1 ## E2; }; \
748  struct { detail::_swizzle<4, T, Q, 3,0,1,3> E3 ## E0 ## E1 ## E3; }; \
749  struct { detail::_swizzle<4, T, Q, 3,0,2,0> E3 ## E0 ## E2 ## E0; }; \
750  struct { detail::_swizzle<4, T, Q, 3,0,2,1> E3 ## E0 ## E2 ## E1; }; \
751  struct { detail::_swizzle<4, T, Q, 3,0,2,2> E3 ## E0 ## E2 ## E2; }; \
752  struct { detail::_swizzle<4, T, Q, 3,0,2,3> E3 ## E0 ## E2 ## E3; }; \
753  struct { detail::_swizzle<4, T, Q, 3,0,3,0> E3 ## E0 ## E3 ## E0; }; \
754  struct { detail::_swizzle<4, T, Q, 3,0,3,1> E3 ## E0 ## E3 ## E1; }; \
755  struct { detail::_swizzle<4, T, Q, 3,0,3,2> E3 ## E0 ## E3 ## E2; }; \
756  struct { detail::_swizzle<4, T, Q, 3,0,3,3> E3 ## E0 ## E3 ## E3; }; \
757  struct { detail::_swizzle<4, T, Q, 3,1,0,0> E3 ## E1 ## E0 ## E0; }; \
758  struct { detail::_swizzle<4, T, Q, 3,1,0,1> E3 ## E1 ## E0 ## E1; }; \
759  struct { detail::_swizzle<4, T, Q, 3,1,0,2> E3 ## E1 ## E0 ## E2; }; \
760  struct { detail::_swizzle<4, T, Q, 3,1,0,3> E3 ## E1 ## E0 ## E3; }; \
761  struct { detail::_swizzle<4, T, Q, 3,1,1,0> E3 ## E1 ## E1 ## E0; }; \
762  struct { detail::_swizzle<4, T, Q, 3,1,1,1> E3 ## E1 ## E1 ## E1; }; \
763  struct { detail::_swizzle<4, T, Q, 3,1,1,2> E3 ## E1 ## E1 ## E2; }; \
764  struct { detail::_swizzle<4, T, Q, 3,1,1,3> E3 ## E1 ## E1 ## E3; }; \
765  struct { detail::_swizzle<4, T, Q, 3,1,2,0> E3 ## E1 ## E2 ## E0; }; \
766  struct { detail::_swizzle<4, T, Q, 3,1,2,1> E3 ## E1 ## E2 ## E1; }; \
767  struct { detail::_swizzle<4, T, Q, 3,1,2,2> E3 ## E1 ## E2 ## E2; }; \
768  struct { detail::_swizzle<4, T, Q, 3,1,2,3> E3 ## E1 ## E2 ## E3; }; \
769  struct { detail::_swizzle<4, T, Q, 3,1,3,0> E3 ## E1 ## E3 ## E0; }; \
770  struct { detail::_swizzle<4, T, Q, 3,1,3,1> E3 ## E1 ## E3 ## E1; }; \
771  struct { detail::_swizzle<4, T, Q, 3,1,3,2> E3 ## E1 ## E3 ## E2; }; \
772  struct { detail::_swizzle<4, T, Q, 3,1,3,3> E3 ## E1 ## E3 ## E3; }; \
773  struct { detail::_swizzle<4, T, Q, 3,2,0,0> E3 ## E2 ## E0 ## E0; }; \
774  struct { detail::_swizzle<4, T, Q, 3,2,0,1> E3 ## E2 ## E0 ## E1; }; \
775  struct { detail::_swizzle<4, T, Q, 3,2,0,2> E3 ## E2 ## E0 ## E2; }; \
776  struct { detail::_swizzle<4, T, Q, 3,2,0,3> E3 ## E2 ## E0 ## E3; }; \
777  struct { detail::_swizzle<4, T, Q, 3,2,1,0> E3 ## E2 ## E1 ## E0; }; \
778  struct { detail::_swizzle<4, T, Q, 3,2,1,1> E3 ## E2 ## E1 ## E1; }; \
779  struct { detail::_swizzle<4, T, Q, 3,2,1,2> E3 ## E2 ## E1 ## E2; }; \
780  struct { detail::_swizzle<4, T, Q, 3,2,1,3> E3 ## E2 ## E1 ## E3; }; \
781  struct { detail::_swizzle<4, T, Q, 3,2,2,0> E3 ## E2 ## E2 ## E0; }; \
782  struct { detail::_swizzle<4, T, Q, 3,2,2,1> E3 ## E2 ## E2 ## E1; }; \
783  struct { detail::_swizzle<4, T, Q, 3,2,2,2> E3 ## E2 ## E2 ## E2; }; \
784  struct { detail::_swizzle<4, T, Q, 3,2,2,3> E3 ## E2 ## E2 ## E3; }; \
785  struct { detail::_swizzle<4, T, Q, 3,2,3,0> E3 ## E2 ## E3 ## E0; }; \
786  struct { detail::_swizzle<4, T, Q, 3,2,3,1> E3 ## E2 ## E3 ## E1; }; \
787  struct { detail::_swizzle<4, T, Q, 3,2,3,2> E3 ## E2 ## E3 ## E2; }; \
788  struct { detail::_swizzle<4, T, Q, 3,2,3,3> E3 ## E2 ## E3 ## E3; }; \
789  struct { detail::_swizzle<4, T, Q, 3,3,0,0> E3 ## E3 ## E0 ## E0; }; \
790  struct { detail::_swizzle<4, T, Q, 3,3,0,1> E3 ## E3 ## E0 ## E1; }; \
791  struct { detail::_swizzle<4, T, Q, 3,3,0,2> E3 ## E3 ## E0 ## E2; }; \
792  struct { detail::_swizzle<4, T, Q, 3,3,0,3> E3 ## E3 ## E0 ## E3; }; \
793  struct { detail::_swizzle<4, T, Q, 3,3,1,0> E3 ## E3 ## E1 ## E0; }; \
794  struct { detail::_swizzle<4, T, Q, 3,3,1,1> E3 ## E3 ## E1 ## E1; }; \
795  struct { detail::_swizzle<4, T, Q, 3,3,1,2> E3 ## E3 ## E1 ## E2; }; \
796  struct { detail::_swizzle<4, T, Q, 3,3,1,3> E3 ## E3 ## E1 ## E3; }; \
797  struct { detail::_swizzle<4, T, Q, 3,3,2,0> E3 ## E3 ## E2 ## E0; }; \
798  struct { detail::_swizzle<4, T, Q, 3,3,2,1> E3 ## E3 ## E2 ## E1; }; \
799  struct { detail::_swizzle<4, T, Q, 3,3,2,2> E3 ## E3 ## E2 ## E2; }; \
800  struct { detail::_swizzle<4, T, Q, 3,3,2,3> E3 ## E3 ## E2 ## E3; }; \
801  struct { detail::_swizzle<4, T, Q, 3,3,3,0> E3 ## E3 ## E3 ## E0; }; \
802  struct { detail::_swizzle<4, T, Q, 3,3,3,1> E3 ## E3 ## E3 ## E1; }; \
803  struct { detail::_swizzle<4, T, Q, 3,3,3,2> E3 ## E3 ## E3 ## E2; }; \
804  struct { detail::_swizzle<4, T, Q, 3,3,3,3> E3 ## E3 ## E3 ## E3; };
GLM_FUNC_DECL GLM_CONSTEXPR genType e()
Return e constant.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00017_source.html b/common/glm/doc/api/a00017_source.html new file mode 100644 index 000000000..ecc1f01d8 --- /dev/null +++ b/common/glm/doc/api/a00017_source.html @@ -0,0 +1,81 @@ + + + + + + + +0.9.9 API documenation: _swizzle_func.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
_swizzle_func.hpp
+
+
+
1 #pragma once
2 
3 #define GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, CONST, A, B) \
4  vec<2, T, Q> A ## B() CONST \
5  { \
6  return vec<2, T, Q>(this->A, this->B); \
7  }
8 
9 #define GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, CONST, A, B, C) \
10  vec<3, T, Q> A ## B ## C() CONST \
11  { \
12  return vec<3, T, Q>(this->A, this->B, this->C); \
13  }
14 
15 #define GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, CONST, A, B, C, D) \
16  vec<4, T, Q> A ## B ## C ## D() CONST \
17  { \
18  return vec<4, T, Q>(this->A, this->B, this->C, this->D); \
19  }
20 
21 #define GLM_SWIZZLE_GEN_VEC2_ENTRY_DEF(T, P, L, CONST, A, B) \
22  template<typename T> \
23  vec<L, T, Q> vec<L, T, Q>::A ## B() CONST \
24  { \
25  return vec<2, T, Q>(this->A, this->B); \
26  }
27 
28 #define GLM_SWIZZLE_GEN_VEC3_ENTRY_DEF(T, P, L, CONST, A, B, C) \
29  template<typename T> \
30  vec<3, T, Q> vec<L, T, Q>::A ## B ## C() CONST \
31  { \
32  return vec<3, T, Q>(this->A, this->B, this->C); \
33  }
34 
35 #define GLM_SWIZZLE_GEN_VEC4_ENTRY_DEF(T, P, L, CONST, A, B, C, D) \
36  template<typename T> \
37  vec<4, T, Q> vec<L, T, Q>::A ## B ## C ## D() CONST \
38  { \
39  return vec<4, T, Q>(this->A, this->B, this->C, this->D); \
40  }
41 
42 #define GLM_MUTABLE
43 
44 #define GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(T, P, A, B) \
45  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, 2, GLM_MUTABLE, A, B) \
46  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, 2, GLM_MUTABLE, B, A)
47 
48 #define GLM_SWIZZLE_GEN_REF_FROM_VEC2(T, P) \
49  GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(T, P, x, y) \
50  GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(T, P, r, g) \
51  GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(T, P, s, t)
52 
53 #define GLM_SWIZZLE_GEN_REF2_FROM_VEC3_SWIZZLE(T, P, A, B, C) \
54  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, A, B) \
55  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, A, C) \
56  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, B, A) \
57  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, B, C) \
58  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, C, A) \
59  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, C, B)
60 
61 #define GLM_SWIZZLE_GEN_REF3_FROM_VEC3_SWIZZLE(T, P, A, B, C) \
62  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, GLM_MUTABLE, A, B, C) \
63  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, GLM_MUTABLE, A, C, B) \
64  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, GLM_MUTABLE, B, A, C) \
65  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, GLM_MUTABLE, B, C, A) \
66  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, GLM_MUTABLE, C, A, B) \
67  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, GLM_MUTABLE, C, B, A)
68 
69 #define GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(T, P, A, B, C) \
70  GLM_SWIZZLE_GEN_REF3_FROM_VEC3_SWIZZLE(T, P, A, B, C) \
71  GLM_SWIZZLE_GEN_REF2_FROM_VEC3_SWIZZLE(T, P, A, B, C)
72 
73 #define GLM_SWIZZLE_GEN_REF_FROM_VEC3(T, P) \
74  GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(T, P, x, y, z) \
75  GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(T, P, r, g, b) \
76  GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(T, P, s, t, p)
77 
78 #define GLM_SWIZZLE_GEN_REF2_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \
79  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, A, B) \
80  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, A, C) \
81  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, A, D) \
82  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, B, A) \
83  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, B, C) \
84  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, B, D) \
85  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, C, A) \
86  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, C, B) \
87  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, C, D) \
88  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, D, A) \
89  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, D, B) \
90  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, D, C)
91 
92 #define GLM_SWIZZLE_GEN_REF3_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \
93  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , A, B, C) \
94  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , A, B, D) \
95  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , A, C, B) \
96  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , A, C, D) \
97  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , A, D, B) \
98  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , A, D, C) \
99  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , B, A, C) \
100  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , B, A, D) \
101  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , B, C, A) \
102  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , B, C, D) \
103  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , B, D, A) \
104  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , B, D, C) \
105  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , C, A, B) \
106  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , C, A, D) \
107  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , C, B, A) \
108  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , C, B, D) \
109  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , C, D, A) \
110  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , C, D, B) \
111  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , D, A, B) \
112  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , D, A, C) \
113  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , D, B, A) \
114  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , D, B, C) \
115  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , D, C, A) \
116  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , D, C, B)
117 
118 #define GLM_SWIZZLE_GEN_REF4_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \
119  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , A, C, B, D) \
120  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , A, C, D, B) \
121  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , A, D, B, C) \
122  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , A, D, C, B) \
123  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , A, B, D, C) \
124  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , A, B, C, D) \
125  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , B, C, A, D) \
126  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , B, C, D, A) \
127  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , B, D, A, C) \
128  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , B, D, C, A) \
129  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , B, A, D, C) \
130  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , B, A, C, D) \
131  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , C, B, A, D) \
132  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , C, B, D, A) \
133  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , C, D, A, B) \
134  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , C, D, B, A) \
135  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , C, A, D, B) \
136  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , C, A, B, D) \
137  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , D, C, B, A) \
138  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , D, C, A, B) \
139  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , D, A, B, C) \
140  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , D, A, C, B) \
141  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , D, B, A, C) \
142  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , D, B, C, A)
143 
144 #define GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(T, P, A, B, C, D) \
145  GLM_SWIZZLE_GEN_REF2_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \
146  GLM_SWIZZLE_GEN_REF3_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \
147  GLM_SWIZZLE_GEN_REF4_FROM_VEC4_SWIZZLE(T, P, A, B, C, D)
148 
149 #define GLM_SWIZZLE_GEN_REF_FROM_VEC4(T, P) \
150  GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(T, P, x, y, z, w) \
151  GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(T, P, r, g, b, a) \
152  GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(T, P, s, t, p, q)
153 
154 #define GLM_SWIZZLE_GEN_VEC2_FROM_VEC2_SWIZZLE(T, P, A, B) \
155  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, A, A) \
156  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, A, B) \
157  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, B, A) \
158  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, B, B)
159 
160 #define GLM_SWIZZLE_GEN_VEC3_FROM_VEC2_SWIZZLE(T, P, A, B) \
161  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, A, A) \
162  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, A, B) \
163  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, B, A) \
164  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, B, B) \
165  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, A, A) \
166  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, A, B) \
167  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, B, A) \
168  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, B, B)
169 
170 #define GLM_SWIZZLE_GEN_VEC4_FROM_VEC2_SWIZZLE(T, P, A, B) \
171  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, A, A) \
172  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, A, B) \
173  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, B, A) \
174  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, B, B) \
175  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, A, A) \
176  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, A, B) \
177  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, B, A) \
178  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, B, B) \
179  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, A, A) \
180  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, A, B) \
181  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, B, A) \
182  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, B, B) \
183  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, A, A) \
184  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, A, B) \
185  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, B, A) \
186  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, B, B)
187 
188 #define GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(T, P, A, B) \
189  GLM_SWIZZLE_GEN_VEC2_FROM_VEC2_SWIZZLE(T, P, A, B) \
190  GLM_SWIZZLE_GEN_VEC3_FROM_VEC2_SWIZZLE(T, P, A, B) \
191  GLM_SWIZZLE_GEN_VEC4_FROM_VEC2_SWIZZLE(T, P, A, B)
192 
193 #define GLM_SWIZZLE_GEN_VEC_FROM_VEC2(T, P) \
194  GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(T, P, x, y) \
195  GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(T, P, r, g) \
196  GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(T, P, s, t)
197 
198 #define GLM_SWIZZLE_GEN_VEC2_FROM_VEC3_SWIZZLE(T, P, A, B, C) \
199  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, A, A) \
200  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, A, B) \
201  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, A, C) \
202  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, B, A) \
203  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, B, B) \
204  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, B, C) \
205  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, C, A) \
206  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, C, B) \
207  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, C, C)
208 
209 #define GLM_SWIZZLE_GEN_VEC3_FROM_VEC3_SWIZZLE(T, P, A, B, C) \
210  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, A, A) \
211  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, A, B) \
212  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, A, C) \
213  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, B, A) \
214  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, B, B) \
215  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, B, C) \
216  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, C, A) \
217  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, C, B) \
218  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, C, C) \
219  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, A, A) \
220  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, A, B) \
221  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, A, C) \
222  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, B, A) \
223  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, B, B) \
224  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, B, C) \
225  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, C, A) \
226  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, C, B) \
227  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, C, C) \
228  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, A, A) \
229  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, A, B) \
230  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, A, C) \
231  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, B, A) \
232  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, B, B) \
233  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, B, C) \
234  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, C, A) \
235  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, C, B) \
236  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, C, C)
237 
238 #define GLM_SWIZZLE_GEN_VEC4_FROM_VEC3_SWIZZLE(T, P, A, B, C) \
239  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, A, A) \
240  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, A, B) \
241  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, A, C) \
242  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, B, A) \
243  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, B, B) \
244  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, B, C) \
245  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, C, A) \
246  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, C, B) \
247  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, C, C) \
248  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, A, A) \
249  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, A, B) \
250  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, A, C) \
251  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, B, A) \
252  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, B, B) \
253  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, B, C) \
254  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, C, A) \
255  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, C, B) \
256  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, C, C) \
257  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, A, A) \
258  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, A, B) \
259  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, A, C) \
260  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, B, A) \
261  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, B, B) \
262  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, B, C) \
263  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, C, A) \
264  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, C, B) \
265  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, C, C) \
266  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, A, A) \
267  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, A, B) \
268  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, A, C) \
269  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, B, A) \
270  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, B, B) \
271  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, B, C) \
272  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, C, A) \
273  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, C, B) \
274  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, C, C) \
275  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, A, A) \
276  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, A, B) \
277  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, A, C) \
278  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, B, A) \
279  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, B, B) \
280  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, B, C) \
281  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, C, A) \
282  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, C, B) \
283  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, C, C) \
284  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, A, A) \
285  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, A, B) \
286  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, A, C) \
287  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, B, A) \
288  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, B, B) \
289  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, B, C) \
290  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, C, A) \
291  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, C, B) \
292  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, C, C) \
293  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, A, A) \
294  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, A, B) \
295  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, A, C) \
296  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, B, A) \
297  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, B, B) \
298  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, B, C) \
299  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, C, A) \
300  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, C, B) \
301  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, C, C) \
302  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, A, A) \
303  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, A, B) \
304  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, A, C) \
305  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, B, A) \
306  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, B, B) \
307  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, B, C) \
308  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, C, A) \
309  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, C, B) \
310  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, C, C) \
311  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, A, A) \
312  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, A, B) \
313  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, A, C) \
314  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, B, A) \
315  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, B, B) \
316  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, B, C) \
317  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, C, A) \
318  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, C, B) \
319  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, C, C)
320 
321 #define GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(T, P, A, B, C) \
322  GLM_SWIZZLE_GEN_VEC2_FROM_VEC3_SWIZZLE(T, P, A, B, C) \
323  GLM_SWIZZLE_GEN_VEC3_FROM_VEC3_SWIZZLE(T, P, A, B, C) \
324  GLM_SWIZZLE_GEN_VEC4_FROM_VEC3_SWIZZLE(T, P, A, B, C)
325 
326 #define GLM_SWIZZLE_GEN_VEC_FROM_VEC3(T, P) \
327  GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(T, P, x, y, z) \
328  GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(T, P, r, g, b) \
329  GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(T, P, s, t, p)
330 
331 #define GLM_SWIZZLE_GEN_VEC2_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \
332  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, A, A) \
333  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, A, B) \
334  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, A, C) \
335  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, A, D) \
336  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, B, A) \
337  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, B, B) \
338  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, B, C) \
339  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, B, D) \
340  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, C, A) \
341  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, C, B) \
342  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, C, C) \
343  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, C, D) \
344  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, D, A) \
345  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, D, B) \
346  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, D, C) \
347  GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, D, D)
348 
349 #define GLM_SWIZZLE_GEN_VEC3_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \
350  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, A, A) \
351  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, A, B) \
352  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, A, C) \
353  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, A, D) \
354  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, B, A) \
355  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, B, B) \
356  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, B, C) \
357  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, B, D) \
358  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, C, A) \
359  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, C, B) \
360  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, C, C) \
361  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, C, D) \
362  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, D, A) \
363  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, D, B) \
364  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, D, C) \
365  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, D, D) \
366  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, A, A) \
367  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, A, B) \
368  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, A, C) \
369  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, A, D) \
370  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, B, A) \
371  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, B, B) \
372  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, B, C) \
373  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, B, D) \
374  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, C, A) \
375  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, C, B) \
376  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, C, C) \
377  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, C, D) \
378  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, D, A) \
379  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, D, B) \
380  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, D, C) \
381  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, D, D) \
382  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, A, A) \
383  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, A, B) \
384  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, A, C) \
385  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, A, D) \
386  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, B, A) \
387  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, B, B) \
388  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, B, C) \
389  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, B, D) \
390  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, C, A) \
391  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, C, B) \
392  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, C, C) \
393  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, C, D) \
394  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, D, A) \
395  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, D, B) \
396  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, D, C) \
397  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, D, D) \
398  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, A, A) \
399  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, A, B) \
400  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, A, C) \
401  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, A, D) \
402  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, B, A) \
403  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, B, B) \
404  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, B, C) \
405  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, B, D) \
406  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, C, A) \
407  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, C, B) \
408  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, C, C) \
409  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, C, D) \
410  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, D, A) \
411  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, D, B) \
412  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, D, C) \
413  GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, D, D)
414 
415 #define GLM_SWIZZLE_GEN_VEC4_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \
416  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, A, A) \
417  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, A, B) \
418  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, A, C) \
419  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, A, D) \
420  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, B, A) \
421  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, B, B) \
422  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, B, C) \
423  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, B, D) \
424  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, C, A) \
425  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, C, B) \
426  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, C, C) \
427  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, C, D) \
428  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, D, A) \
429  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, D, B) \
430  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, D, C) \
431  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, D, D) \
432  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, A, A) \
433  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, A, B) \
434  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, A, C) \
435  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, A, D) \
436  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, B, A) \
437  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, B, B) \
438  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, B, C) \
439  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, B, D) \
440  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, C, A) \
441  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, C, B) \
442  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, C, C) \
443  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, C, D) \
444  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, D, A) \
445  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, D, B) \
446  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, D, C) \
447  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, D, D) \
448  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, A, A) \
449  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, A, B) \
450  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, A, C) \
451  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, A, D) \
452  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, B, A) \
453  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, B, B) \
454  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, B, C) \
455  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, B, D) \
456  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, C, A) \
457  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, C, B) \
458  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, C, C) \
459  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, C, D) \
460  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, D, A) \
461  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, D, B) \
462  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, D, C) \
463  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, D, D) \
464  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, A, A) \
465  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, A, B) \
466  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, A, C) \
467  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, A, D) \
468  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, B, A) \
469  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, B, B) \
470  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, B, C) \
471  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, B, D) \
472  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, C, A) \
473  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, C, B) \
474  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, C, C) \
475  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, C, D) \
476  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, D, A) \
477  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, D, B) \
478  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, D, C) \
479  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, D, D) \
480  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, A, A) \
481  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, A, B) \
482  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, A, C) \
483  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, A, D) \
484  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, B, A) \
485  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, B, B) \
486  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, B, C) \
487  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, B, D) \
488  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, C, A) \
489  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, C, B) \
490  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, C, C) \
491  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, C, D) \
492  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, D, A) \
493  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, D, B) \
494  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, D, C) \
495  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, D, D) \
496  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, A, A) \
497  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, A, B) \
498  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, A, C) \
499  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, A, D) \
500  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, B, A) \
501  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, B, B) \
502  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, B, C) \
503  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, B, D) \
504  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, C, A) \
505  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, C, B) \
506  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, C, C) \
507  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, C, D) \
508  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, D, A) \
509  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, D, B) \
510  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, D, C) \
511  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, D, D) \
512  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, A, A) \
513  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, A, B) \
514  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, A, C) \
515  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, A, D) \
516  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, B, A) \
517  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, B, B) \
518  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, B, C) \
519  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, B, D) \
520  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, C, A) \
521  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, C, B) \
522  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, C, C) \
523  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, C, D) \
524  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, D, A) \
525  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, D, B) \
526  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, D, C) \
527  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, D, D) \
528  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, A, A) \
529  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, A, B) \
530  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, A, C) \
531  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, A, D) \
532  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, B, A) \
533  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, B, B) \
534  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, B, C) \
535  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, B, D) \
536  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, C, A) \
537  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, C, B) \
538  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, C, C) \
539  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, C, D) \
540  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, D, A) \
541  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, D, B) \
542  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, D, C) \
543  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, D, D) \
544  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, A, A) \
545  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, A, B) \
546  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, A, C) \
547  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, A, D) \
548  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, B, A) \
549  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, B, B) \
550  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, B, C) \
551  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, B, D) \
552  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, C, A) \
553  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, C, B) \
554  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, C, C) \
555  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, C, D) \
556  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, D, A) \
557  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, D, B) \
558  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, D, C) \
559  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, D, D) \
560  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, A, A) \
561  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, A, B) \
562  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, A, C) \
563  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, A, D) \
564  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, B, A) \
565  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, B, B) \
566  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, B, C) \
567  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, B, D) \
568  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, C, A) \
569  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, C, B) \
570  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, C, C) \
571  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, C, D) \
572  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, D, A) \
573  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, D, B) \
574  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, D, C) \
575  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, D, D) \
576  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, A, A) \
577  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, A, B) \
578  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, A, C) \
579  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, A, D) \
580  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, B, A) \
581  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, B, B) \
582  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, B, C) \
583  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, B, D) \
584  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, C, A) \
585  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, C, B) \
586  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, C, C) \
587  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, C, D) \
588  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, D, A) \
589  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, D, B) \
590  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, D, C) \
591  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, D, D) \
592  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, A, A) \
593  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, A, B) \
594  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, A, C) \
595  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, A, D) \
596  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, B, A) \
597  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, B, B) \
598  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, B, C) \
599  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, B, D) \
600  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, C, A) \
601  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, C, B) \
602  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, C, C) \
603  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, C, D) \
604  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, D, A) \
605  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, D, B) \
606  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, D, C) \
607  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, D, D) \
608  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, A, A) \
609  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, A, B) \
610  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, A, C) \
611  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, A, D) \
612  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, B, A) \
613  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, B, B) \
614  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, B, C) \
615  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, B, D) \
616  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, C, A) \
617  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, C, B) \
618  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, C, C) \
619  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, C, D) \
620  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, D, A) \
621  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, D, B) \
622  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, D, C) \
623  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, D, D) \
624  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, A, A) \
625  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, A, B) \
626  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, A, C) \
627  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, A, D) \
628  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, B, A) \
629  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, B, B) \
630  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, B, C) \
631  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, B, D) \
632  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, C, A) \
633  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, C, B) \
634  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, C, C) \
635  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, C, D) \
636  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, D, A) \
637  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, D, B) \
638  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, D, C) \
639  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, D, D) \
640  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, A, A) \
641  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, A, B) \
642  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, A, C) \
643  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, A, D) \
644  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, B, A) \
645  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, B, B) \
646  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, B, C) \
647  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, B, D) \
648  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, C, A) \
649  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, C, B) \
650  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, C, C) \
651  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, C, D) \
652  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, D, A) \
653  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, D, B) \
654  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, D, C) \
655  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, D, D) \
656  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, A, A) \
657  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, A, B) \
658  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, A, C) \
659  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, A, D) \
660  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, B, A) \
661  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, B, B) \
662  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, B, C) \
663  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, B, D) \
664  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, C, A) \
665  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, C, B) \
666  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, C, C) \
667  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, C, D) \
668  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, D, A) \
669  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, D, B) \
670  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, D, C) \
671  GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, D, D)
672 
673 #define GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(T, P, A, B, C, D) \
674  GLM_SWIZZLE_GEN_VEC2_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \
675  GLM_SWIZZLE_GEN_VEC3_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \
676  GLM_SWIZZLE_GEN_VEC4_FROM_VEC4_SWIZZLE(T, P, A, B, C, D)
677 
678 #define GLM_SWIZZLE_GEN_VEC_FROM_VEC4(T, P) \
679  GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(T, P, x, y, z, w) \
680  GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(T, P, r, g, b, a) \
681  GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(T, P, s, t, p, q)
682 
+ + + + diff --git a/common/glm/doc/api/a00020_source.html b/common/glm/doc/api/a00020_source.html new file mode 100644 index 000000000..319f91040 --- /dev/null +++ b/common/glm/doc/api/a00020_source.html @@ -0,0 +1,82 @@ + + + + + + + +0.9.9 API documenation: _vectorize.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
_vectorize.hpp
+
+
+
1 #pragma once
2 
3 namespace glm{
4 namespace detail
5 {
6  template<template<length_t L, typename T, qualifier Q> class vec, length_t L, typename R, typename T, qualifier Q>
7  struct functor1{};
8 
9  template<template<length_t L, typename T, qualifier Q> class vec, typename R, typename T, qualifier Q>
10  struct functor1<vec, 1, R, T, Q>
11  {
12  GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<1, R, Q> call(R (*Func) (T x), vec<1, T, Q> const& v)
13  {
14  return vec<1, R, Q>(Func(v.x));
15  }
16  };
17 
18  template<template<length_t L, typename T, qualifier Q> class vec, typename R, typename T, qualifier Q>
19  struct functor1<vec, 2, R, T, Q>
20  {
21  GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<2, R, Q> call(R (*Func) (T x), vec<2, T, Q> const& v)
22  {
23  return vec<2, R, Q>(Func(v.x), Func(v.y));
24  }
25  };
26 
27  template<template<length_t L, typename T, qualifier Q> class vec, typename R, typename T, qualifier Q>
28  struct functor1<vec, 3, R, T, Q>
29  {
30  GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<3, R, Q> call(R (*Func) (T x), vec<3, T, Q> const& v)
31  {
32  return vec<3, R, Q>(Func(v.x), Func(v.y), Func(v.z));
33  }
34  };
35 
36  template<template<length_t L, typename T, qualifier Q> class vec, typename R, typename T, qualifier Q>
37  struct functor1<vec, 4, R, T, Q>
38  {
39  GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<4, R, Q> call(R (*Func) (T x), vec<4, T, Q> const& v)
40  {
41  return vec<4, R, Q>(Func(v.x), Func(v.y), Func(v.z), Func(v.w));
42  }
43  };
44 
45  template<template<length_t L, typename T, qualifier Q> class vec, length_t L, typename T, qualifier Q>
46  struct functor2{};
47 
48  template<template<length_t L, typename T, qualifier Q> class vec, typename T, qualifier Q>
49  struct functor2<vec, 1, T, Q>
50  {
51  GLM_FUNC_QUALIFIER static vec<1, T, Q> call(T (*Func) (T x, T y), vec<1, T, Q> const& a, vec<1, T, Q> const& b)
52  {
53  return vec<1, T, Q>(Func(a.x, b.x));
54  }
55  };
56 
57  template<template<length_t L, typename T, qualifier Q> class vec, typename T, qualifier Q>
58  struct functor2<vec, 2, T, Q>
59  {
60  GLM_FUNC_QUALIFIER static vec<2, T, Q> call(T (*Func) (T x, T y), vec<2, T, Q> const& a, vec<2, T, Q> const& b)
61  {
62  return vec<2, T, Q>(Func(a.x, b.x), Func(a.y, b.y));
63  }
64  };
65 
66  template<template<length_t L, typename T, qualifier Q> class vec, typename T, qualifier Q>
67  struct functor2<vec, 3, T, Q>
68  {
69  GLM_FUNC_QUALIFIER static vec<3, T, Q> call(T (*Func) (T x, T y), vec<3, T, Q> const& a, vec<3, T, Q> const& b)
70  {
71  return vec<3, T, Q>(Func(a.x, b.x), Func(a.y, b.y), Func(a.z, b.z));
72  }
73  };
74 
75  template<template<length_t L, typename T, qualifier Q> class vec, typename T, qualifier Q>
76  struct functor2<vec, 4, T, Q>
77  {
78  GLM_FUNC_QUALIFIER static vec<4, T, Q> call(T (*Func) (T x, T y), vec<4, T, Q> const& a, vec<4, T, Q> const& b)
79  {
80  return vec<4, T, Q>(Func(a.x, b.x), Func(a.y, b.y), Func(a.z, b.z), Func(a.w, b.w));
81  }
82  };
83 
84  template<template<length_t L, typename T, qualifier Q> class vec, length_t L, typename T, qualifier Q>
85  struct functor2_vec_sca{};
86 
87  template<template<length_t L, typename T, qualifier Q> class vec, typename T, qualifier Q>
88  struct functor2_vec_sca<vec, 1, T, Q>
89  {
90  GLM_FUNC_QUALIFIER static vec<1, T, Q> call(T (*Func) (T x, T y), vec<1, T, Q> const& a, T b)
91  {
92  return vec<1, T, Q>(Func(a.x, b));
93  }
94  };
95 
96  template<template<length_t L, typename T, qualifier Q> class vec, typename T, qualifier Q>
97  struct functor2_vec_sca<vec, 2, T, Q>
98  {
99  GLM_FUNC_QUALIFIER static vec<2, T, Q> call(T (*Func) (T x, T y), vec<2, T, Q> const& a, T b)
100  {
101  return vec<2, T, Q>(Func(a.x, b), Func(a.y, b));
102  }
103  };
104 
105  template<template<length_t L, typename T, qualifier Q> class vec, typename T, qualifier Q>
106  struct functor2_vec_sca<vec, 3, T, Q>
107  {
108  GLM_FUNC_QUALIFIER static vec<3, T, Q> call(T (*Func) (T x, T y), vec<3, T, Q> const& a, T b)
109  {
110  return vec<3, T, Q>(Func(a.x, b), Func(a.y, b), Func(a.z, b));
111  }
112  };
113 
114  template<template<length_t L, typename T, qualifier Q> class vec, typename T, qualifier Q>
115  struct functor2_vec_sca<vec, 4, T, Q>
116  {
117  GLM_FUNC_QUALIFIER static vec<4, T, Q> call(T (*Func) (T x, T y), vec<4, T, Q> const& a, T b)
118  {
119  return vec<4, T, Q>(Func(a.x, b), Func(a.y, b), Func(a.z, b), Func(a.w, b));
120  }
121  };
122 }//namespace detail
123 }//namespace glm
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00023_source.html b/common/glm/doc/api/a00023_source.html new file mode 100644 index 000000000..1860b793a --- /dev/null +++ b/common/glm/doc/api/a00023_source.html @@ -0,0 +1,82 @@ + + + + + + + +0.9.9 API documenation: compute_common.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
compute_common.hpp
+
+
+
1 #pragma once
2 
3 #include "setup.hpp"
4 #include <limits>
5 
6 namespace glm{
7 namespace detail
8 {
9  template<typename genFIType, bool /*signed*/>
10  struct compute_abs
11  {};
12 
13  template<typename genFIType>
14  struct compute_abs<genFIType, true>
15  {
16  GLM_FUNC_QUALIFIER GLM_CONSTEXPR static genFIType call(genFIType x)
17  {
18  GLM_STATIC_ASSERT(
19  std::numeric_limits<genFIType>::is_iec559 || std::numeric_limits<genFIType>::is_signed,
20  "'abs' only accept floating-point and integer scalar or vector inputs");
21 
22  return x >= genFIType(0) ? x : -x;
23  // TODO, perf comp with: *(((int *) &x) + 1) &= 0x7fffffff;
24  }
25  };
26 
27 #if GLM_COMPILER & GLM_COMPILER_CUDA
28  template<>
29  struct compute_abs<float, true>
30  {
31  GLM_FUNC_QUALIFIER GLM_CONSTEXPR static float call(float x)
32  {
33  return fabsf(x);
34  }
35  };
36 #endif
37 
38  template<typename genFIType>
39  struct compute_abs<genFIType, false>
40  {
41  GLM_FUNC_QUALIFIER GLM_CONSTEXPR static genFIType call(genFIType x)
42  {
43  GLM_STATIC_ASSERT(
44  (!std::numeric_limits<genFIType>::is_signed && std::numeric_limits<genFIType>::is_integer),
45  "'abs' only accept floating-point and integer scalar or vector inputs");
46  return x;
47  }
48  };
49 }//namespace detail
50 }//namespace glm
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00026_source.html b/common/glm/doc/api/a00026_source.html new file mode 100644 index 000000000..00a280315 --- /dev/null +++ b/common/glm/doc/api/a00026_source.html @@ -0,0 +1,82 @@ + + + + + + + +0.9.9 API documenation: compute_vector_relational.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
compute_vector_relational.hpp
+
+
+
1 #pragma once
2 
3 //#include "compute_common.hpp"
4 #include "setup.hpp"
5 #include <limits>
6 
7 namespace glm{
8 namespace detail
9 {
10  template <typename T, bool isFloat>
11  struct compute_equal
12  {
13  GLM_FUNC_QUALIFIER GLM_CONSTEXPR static bool call(T a, T b)
14  {
15  return a == b;
16  }
17  };
18 /*
19  template <typename T>
20  struct compute_equal<T, true>
21  {
22  GLM_FUNC_QUALIFIER GLM_CONSTEXPR static bool call(T a, T b)
23  {
24  return detail::compute_abs<T, std::numeric_limits<T>::is_signed>::call(b - a) <= static_cast<T>(0);
25  //return std::memcmp(&a, &b, sizeof(T)) == 0;
26  }
27  };
28 */
29 }//namespace detail
30 }//namespace glm
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00029_source.html b/common/glm/doc/api/a00029_source.html new file mode 100644 index 000000000..ca814a131 --- /dev/null +++ b/common/glm/doc/api/a00029_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: qualifier.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
qualifier.hpp
+
+
+
1 #pragma once
2 
3 #include "setup.hpp"
4 
5 namespace glm
6 {
8  enum qualifier
9  {
10  packed_highp,
11  packed_mediump,
12  packed_lowp,
13 
14 # if GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE
15  aligned_highp,
16  aligned_mediump,
17  aligned_lowp, // ///< Typed data is aligned in memory allowing SIMD optimizations and operations are executed with high precision in term of ULPs to maximize performance
18  aligned = aligned_highp,
19 # endif
20 
21  highp = packed_highp,
22  mediump = packed_mediump,
23  lowp = packed_lowp,
24  packed = packed_highp,
25 
26 # if GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE && defined(GLM_FORCE_DEFAULT_ALIGNED_GENTYPES)
27  defaultp = aligned_highp
28 # else
29  defaultp = highp
30 # endif
31  };
32 
33  typedef qualifier precision;
34 
35  template<length_t L, typename T, qualifier Q = defaultp> struct vec;
36  template<length_t C, length_t R, typename T, qualifier Q = defaultp> struct mat;
37  template<typename T, qualifier Q = defaultp> struct qua;
38 
39 # if GLM_HAS_TEMPLATE_ALIASES
40  template <typename T, qualifier Q = defaultp> using tvec1 = vec<1, T, Q>;
41  template <typename T, qualifier Q = defaultp> using tvec2 = vec<2, T, Q>;
42  template <typename T, qualifier Q = defaultp> using tvec3 = vec<3, T, Q>;
43  template <typename T, qualifier Q = defaultp> using tvec4 = vec<4, T, Q>;
44  template <typename T, qualifier Q = defaultp> using tmat2x2 = mat<2, 2, T, Q>;
45  template <typename T, qualifier Q = defaultp> using tmat2x3 = mat<2, 3, T, Q>;
46  template <typename T, qualifier Q = defaultp> using tmat2x4 = mat<2, 4, T, Q>;
47  template <typename T, qualifier Q = defaultp> using tmat3x2 = mat<3, 2, T, Q>;
48  template <typename T, qualifier Q = defaultp> using tmat3x3 = mat<3, 3, T, Q>;
49  template <typename T, qualifier Q = defaultp> using tmat3x4 = mat<3, 4, T, Q>;
50  template <typename T, qualifier Q = defaultp> using tmat4x2 = mat<4, 2, T, Q>;
51  template <typename T, qualifier Q = defaultp> using tmat4x3 = mat<4, 3, T, Q>;
52  template <typename T, qualifier Q = defaultp> using tmat4x4 = mat<4, 4, T, Q>;
53  template <typename T, qualifier Q = defaultp> using tquat = qua<T, Q>;
54 # endif
55 
56 namespace detail
57 {
58  template<glm::qualifier P>
59  struct is_aligned
60  {
61  static const bool value = false;
62  };
63 
64 # if GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE
65  template<>
66  struct is_aligned<glm::aligned_lowp>
67  {
68  static const bool value = true;
69  };
70 
71  template<>
72  struct is_aligned<glm::aligned_mediump>
73  {
74  static const bool value = true;
75  };
76 
77  template<>
78  struct is_aligned<glm::aligned_highp>
79  {
80  static const bool value = true;
81  };
82 # endif
83 
84  template<length_t L, typename T, bool is_aligned>
85  struct storage
86  {
87  typedef struct type {
88  T data[L];
89  } type;
90  };
91 
92 # if GLM_HAS_ALIGNOF
93  template<length_t L, typename T>
94  struct storage<L, T, true>
95  {
96  typedef struct alignas(L * sizeof(T)) type {
97  T data[L];
98  } type;
99  };
100 
101  template<typename T>
102  struct storage<3, T, true>
103  {
104  typedef struct alignas(4 * sizeof(T)) type {
105  T data[4];
106  } type;
107  };
108 # endif
109 
110 # if GLM_ARCH & GLM_ARCH_SSE2_BIT
111  template<>
112  struct storage<4, float, true>
113  {
114  typedef glm_f32vec4 type;
115  };
116 
117  template<>
118  struct storage<4, int, true>
119  {
120  typedef glm_i32vec4 type;
121  };
122 
123  template<>
124  struct storage<4, unsigned int, true>
125  {
126  typedef glm_u32vec4 type;
127  };
128 
129  template<>
130  struct storage<2, double, true>
131  {
132  typedef glm_f64vec2 type;
133  };
134 
135  template<>
136  struct storage<2, detail::int64, true>
137  {
138  typedef glm_i64vec2 type;
139  };
140 
141  template<>
142  struct storage<2, detail::uint64, true>
143  {
144  typedef glm_u64vec2 type;
145  };
146 # endif
147 
148 # if (GLM_ARCH & GLM_ARCH_AVX_BIT)
149  template<>
150  struct storage<4, double, true>
151  {
152  typedef glm_f64vec4 type;
153  };
154 # endif
155 
156 # if (GLM_ARCH & GLM_ARCH_AVX2_BIT)
157  template<>
158  struct storage<4, detail::int64, true>
159  {
160  typedef glm_i64vec4 type;
161  };
162 
163  template<>
164  struct storage<4, detail::uint64, true>
165  {
166  typedef glm_u64vec4 type;
167  };
168 # endif
169 
170  enum genTypeEnum
171  {
172  GENTYPE_VEC,
173  GENTYPE_MAT,
174  GENTYPE_QUAT
175  };
176 
177  template <typename genType>
178  struct genTypeTrait
179  {};
180 
181  template <length_t C, length_t R, typename T>
182  struct genTypeTrait<mat<C, R, T> >
183  {
184  static const genTypeEnum GENTYPE = GENTYPE_MAT;
185  };
186 
187  template<typename genType, genTypeEnum type>
188  struct init_gentype
189  {
190  };
191 
192  template<typename genType>
193  struct init_gentype<genType, GENTYPE_QUAT>
194  {
195  GLM_FUNC_QUALIFIER GLM_CONSTEXPR static genType identity()
196  {
197  return genType(1, 0, 0, 0);
198  }
199  };
200 
201  template<typename genType>
202  struct init_gentype<genType, GENTYPE_MAT>
203  {
204  GLM_FUNC_QUALIFIER GLM_CONSTEXPR static genType identity()
205  {
206  return genType(1);
207  }
208  };
209 }//namespace detail
210 }//namespace glm
GLM_FUNC_DECL GLM_CONSTEXPR genType identity()
Builds an identity matrix.
+
detail::uint64 uint64
64 bit unsigned integer type.
+
detail::int64 int64
64 bit signed integer type.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00032_source.html b/common/glm/doc/api/a00032_source.html new file mode 100644 index 000000000..077bee2ff --- /dev/null +++ b/common/glm/doc/api/a00032_source.html @@ -0,0 +1,86 @@ + + + + + + + +0.9.9 API documenation: setup.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
setup.hpp
+
+
+
1 #ifndef GLM_SETUP_INCLUDED
2 
3 #include <cassert>
4 #include <cstddef>
5 
6 #define GLM_VERSION_MAJOR 0
7 #define GLM_VERSION_MINOR 9
8 #define GLM_VERSION_PATCH 9
9 #define GLM_VERSION_REVISION 1
10 #define GLM_VERSION 991
11 #define GLM_VERSION_MESSAGE "GLM: version 0.9.9.1"
12 
13 #define GLM_SETUP_INCLUDED GLM_VERSION
14 
16 // Active states
17 
18 #define GLM_DISABLE 0
19 #define GLM_ENABLE 1
20 
22 // Messages
23 
24 #if defined(GLM_FORCE_MESSAGES)
25 # define GLM_MESSAGES GLM_ENABLE
26 #else
27 # define GLM_MESSAGES GLM_DISABLE
28 #endif
29 
31 // Detect the platform
32 
33 #include "../simd/platform.h"
34 
36 // Build model
37 
38 #if defined(__arch64__) || defined(__LP64__) || defined(_M_X64) || defined(__ppc64__) || defined(__x86_64__)
39 # define GLM_MODEL GLM_MODEL_64
40 #elif defined(__i386__) || defined(__ppc__)
41 # define GLM_MODEL GLM_MODEL_32
42 #else
43 # define GLM_MODEL GLM_MODEL_32
44 #endif//
45 
46 #if !defined(GLM_MODEL) && GLM_COMPILER != 0
47 # error "GLM_MODEL undefined, your compiler may not be supported by GLM. Add #define GLM_MODEL 0 to ignore this message."
48 #endif//GLM_MODEL
49 
51 // C++ Version
52 
53 // User defines: GLM_FORCE_CXX98, GLM_FORCE_CXX03, GLM_FORCE_CXX11, GLM_FORCE_CXX14, GLM_FORCE_CXX17, GLM_FORCE_CXX2A
54 
55 #define GLM_LANG_CXX98_FLAG (1 << 1)
56 #define GLM_LANG_CXX03_FLAG (1 << 2)
57 #define GLM_LANG_CXX0X_FLAG (1 << 3)
58 #define GLM_LANG_CXX11_FLAG (1 << 4)
59 #define GLM_LANG_CXX14_FLAG (1 << 5)
60 #define GLM_LANG_CXX17_FLAG (1 << 6)
61 #define GLM_LANG_CXX2A_FLAG (1 << 7)
62 #define GLM_LANG_CXXMS_FLAG (1 << 8)
63 #define GLM_LANG_CXXGNU_FLAG (1 << 9)
64 
65 #define GLM_LANG_CXX98 GLM_LANG_CXX98_FLAG
66 #define GLM_LANG_CXX03 (GLM_LANG_CXX98 | GLM_LANG_CXX03_FLAG)
67 #define GLM_LANG_CXX0X (GLM_LANG_CXX03 | GLM_LANG_CXX0X_FLAG)
68 #define GLM_LANG_CXX11 (GLM_LANG_CXX0X | GLM_LANG_CXX11_FLAG)
69 #define GLM_LANG_CXX14 (GLM_LANG_CXX11 | GLM_LANG_CXX14_FLAG)
70 #define GLM_LANG_CXX17 (GLM_LANG_CXX14 | GLM_LANG_CXX17_FLAG)
71 #define GLM_LANG_CXX2A (GLM_LANG_CXX17 | GLM_LANG_CXX2A_FLAG)
72 #define GLM_LANG_CXXMS GLM_LANG_CXXMS_FLAG
73 #define GLM_LANG_CXXGNU GLM_LANG_CXXGNU_FLAG
74 
75 #if (defined(_MSC_EXTENSIONS))
76 # define GLM_LANG_EXT GLM_LANG_CXXMS_FLAG
77 #elif ((GLM_COMPILER & (GLM_COMPILER_CLANG | GLM_COMPILER_GCC)) && (GLM_ARCH & GLM_ARCH_SIMD_BIT))
78 # define GLM_LANG_EXT GLM_LANG_CXXMS_FLAG
79 #else
80 # define GLM_LANG_EXT 0
81 #endif
82 
83 #if (defined(GLM_FORCE_CXX_UNKNOWN))
84 # define GLM_LANG 0
85 #elif defined(GLM_FORCE_CXX2A)
86 # define GLM_LANG (GLM_LANG_CXX2A | GLM_LANG_EXT)
87 # define GLM_LANG_STL11_FORCED
88 #elif defined(GLM_FORCE_CXX17)
89 # define GLM_LANG (GLM_LANG_CXX17 | GLM_LANG_EXT)
90 # define GLM_LANG_STL11_FORCED
91 #elif defined(GLM_FORCE_CXX14)
92 # define GLM_LANG (GLM_LANG_CXX14 | GLM_LANG_EXT)
93 # define GLM_LANG_STL11_FORCED
94 #elif defined(GLM_FORCE_CXX11)
95 # define GLM_LANG (GLM_LANG_CXX11 | GLM_LANG_EXT)
96 # define GLM_LANG_STL11_FORCED
97 #elif defined(GLM_FORCE_CXX03)
98 # define GLM_LANG (GLM_LANG_CXX03 | GLM_LANG_EXT)
99 #elif defined(GLM_FORCE_CXX98)
100 # define GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_EXT)
101 #else
102 # if GLM_COMPILER & GLM_COMPILER_VC && defined(_MSVC_LANG)
103 # if GLM_COMPILER >= GLM_COMPILER_VC15_7
104 # define GLM_LANG_PLATFORM _MSVC_LANG
105 # elif GLM_COMPILER >= GLM_COMPILER_VC15
106 # if _MSVC_LANG > 201402L
107 # define GLM_LANG_PLATFORM 201402L
108 # else
109 # define GLM_LANG_PLATFORM _MSVC_LANG
110 # endif
111 # else
112 # define GLM_LANG_PLATFORM 0
113 # endif
114 # else
115 # define GLM_LANG_PLATFORM 0
116 # endif
117 
118 # if __cplusplus > 201703L || GLM_LANG_PLATFORM > 201703L
119 # define GLM_LANG (GLM_LANG_CXX2A | GLM_LANG_EXT)
120 # elif __cplusplus == 201703L || GLM_LANG_PLATFORM == 201703L
121 # define GLM_LANG (GLM_LANG_CXX17 | GLM_LANG_EXT)
122 # elif __cplusplus == 201402L || GLM_LANG_PLATFORM == 201402L
123 # define GLM_LANG (GLM_LANG_CXX14 | GLM_LANG_EXT)
124 # elif __cplusplus == 201103L || GLM_LANG_PLATFORM == 201103L
125 # define GLM_LANG (GLM_LANG_CXX11 | GLM_LANG_EXT)
126 # elif defined(__INTEL_CXX11_MODE__) || defined(_MSC_VER) || defined(__GXX_EXPERIMENTAL_CXX0X__)
127 # define GLM_LANG (GLM_LANG_CXX0X | GLM_LANG_EXT)
128 # elif __cplusplus == 199711L
129 # define GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_EXT)
130 # else
131 # define GLM_LANG (0 | GLM_LANG_EXT)
132 # endif
133 #endif
134 
136 // Has of C++ features
137 
138 // http://clang.llvm.org/cxx_status.html
139 // http://gcc.gnu.org/projects/cxx0x.html
140 // http://msdn.microsoft.com/en-us/library/vstudio/hh567368(v=vs.120).aspx
141 
142 // Android has multiple STLs but C++11 STL detection doesn't always work #284 #564
143 #if GLM_PLATFORM == GLM_PLATFORM_ANDROID && !defined(GLM_LANG_STL11_FORCED)
144 # define GLM_HAS_CXX11_STL 0
145 #elif GLM_COMPILER & GLM_COMPILER_CLANG
146 # if (defined(_LIBCPP_VERSION) && GLM_LANG & GLM_LANG_CXX11_FLAG) || defined(GLM_LANG_STL11_FORCED)
147 # define GLM_HAS_CXX11_STL 1
148 # else
149 # define GLM_HAS_CXX11_STL 0
150 # endif
151 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
152 # define GLM_HAS_CXX11_STL 1
153 #else
154 # define GLM_HAS_CXX11_STL ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
155  ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC48)) || \
156  ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)) || \
157  ((GLM_PLATFORM != GLM_PLATFORM_WINDOWS) && (GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL15))))
158 #endif
159 
160 // N1720
161 #if GLM_COMPILER & GLM_COMPILER_CLANG
162 # define GLM_HAS_STATIC_ASSERT __has_feature(cxx_static_assert)
163 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
164 # define GLM_HAS_STATIC_ASSERT 1
165 #else
166 # define GLM_HAS_STATIC_ASSERT ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
167  ((GLM_COMPILER & GLM_COMPILER_CUDA)) || \
168  ((GLM_COMPILER & GLM_COMPILER_VC))))
169 #endif
170 
171 // N1988
172 #if GLM_LANG & GLM_LANG_CXX11_FLAG
173 # define GLM_HAS_EXTENDED_INTEGER_TYPE 1
174 #else
175 # define GLM_HAS_EXTENDED_INTEGER_TYPE (\
176  ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_VC)) || \
177  ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_CUDA)) || \
178  ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_CLANG)))
179 #endif
180 
181 // N2672 Initializer lists http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm
182 #if GLM_COMPILER & GLM_COMPILER_CLANG
183 # define GLM_HAS_INITIALIZER_LISTS __has_feature(cxx_generalized_initializers)
184 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
185 # define GLM_HAS_INITIALIZER_LISTS 1
186 #else
187 # define GLM_HAS_INITIALIZER_LISTS ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
188  ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC15)) || \
189  ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL14)) || \
190  ((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA75))))
191 #endif
192 
193 // N2544 Unrestricted unions http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2544.pdf
194 #if GLM_COMPILER & GLM_COMPILER_CLANG
195 # define GLM_HAS_UNRESTRICTED_UNIONS __has_feature(cxx_unrestricted_unions)
196 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
197 # define GLM_HAS_UNRESTRICTED_UNIONS 1
198 #else
199 # define GLM_HAS_UNRESTRICTED_UNIONS (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
200  (GLM_COMPILER & GLM_COMPILER_VC) || \
201  ((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA75)))
202 #endif
203 
204 // N2346
205 #if GLM_COMPILER & GLM_COMPILER_CLANG
206 # define GLM_HAS_DEFAULTED_FUNCTIONS __has_feature(cxx_defaulted_functions)
207 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
208 # define GLM_HAS_DEFAULTED_FUNCTIONS 1
209 #else
210 # define GLM_HAS_DEFAULTED_FUNCTIONS ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
211  ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)) || \
212  ((GLM_COMPILER & GLM_COMPILER_INTEL)) || \
213  (GLM_COMPILER & GLM_COMPILER_CUDA)))
214 #endif
215 
216 // N2118
217 #if GLM_COMPILER & GLM_COMPILER_CLANG
218 # define GLM_HAS_RVALUE_REFERENCES __has_feature(cxx_rvalue_references)
219 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
220 # define GLM_HAS_RVALUE_REFERENCES 1
221 #else
222 # define GLM_HAS_RVALUE_REFERENCES ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
223  ((GLM_COMPILER & GLM_COMPILER_VC)) || \
224  ((GLM_COMPILER & GLM_COMPILER_CUDA))))
225 #endif
226 
227 // N2437 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf
228 #if GLM_COMPILER & GLM_COMPILER_CLANG
229 # define GLM_HAS_EXPLICIT_CONVERSION_OPERATORS __has_feature(cxx_explicit_conversions)
230 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
231 # define GLM_HAS_EXPLICIT_CONVERSION_OPERATORS 1
232 #else
233 # define GLM_HAS_EXPLICIT_CONVERSION_OPERATORS ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
234  ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL14)) || \
235  ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)) || \
236  ((GLM_COMPILER & GLM_COMPILER_CUDA))))
237 #endif
238 
239 // N2258 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2258.pdf
240 #if GLM_COMPILER & GLM_COMPILER_CLANG
241 # define GLM_HAS_TEMPLATE_ALIASES __has_feature(cxx_alias_templates)
242 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
243 # define GLM_HAS_TEMPLATE_ALIASES 1
244 #else
245 # define GLM_HAS_TEMPLATE_ALIASES ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
246  ((GLM_COMPILER & GLM_COMPILER_INTEL)) || \
247  ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)) || \
248  ((GLM_COMPILER & GLM_COMPILER_CUDA))))
249 #endif
250 
251 // N2930 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2930.html
252 #if GLM_COMPILER & GLM_COMPILER_CLANG
253 # define GLM_HAS_RANGE_FOR __has_feature(cxx_range_for)
254 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
255 # define GLM_HAS_RANGE_FOR 1
256 #else
257 # define GLM_HAS_RANGE_FOR ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
258  ((GLM_COMPILER & GLM_COMPILER_INTEL)) || \
259  ((GLM_COMPILER & GLM_COMPILER_VC)) || \
260  ((GLM_COMPILER & GLM_COMPILER_CUDA))))
261 #endif
262 
263 // N2341 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2341.pdf
264 #if GLM_COMPILER & GLM_COMPILER_CLANG
265 # define GLM_HAS_ALIGNOF __has_feature(cxx_alignas)
266 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
267 # define GLM_HAS_ALIGNOF 1
268 #else
269 # define GLM_HAS_ALIGNOF ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
270  ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL15)) || \
271  ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC14)) || \
272  ((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA70))))
273 #endif
274 
275 // N2235 Generalized Constant Expressions http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf
276 // N3652 Extended Constant Expressions http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3652.html
277 #if (GLM_ARCH & GLM_ARCH_SIMD_BIT) // Compiler SIMD intrinsics don't support constexpr...
278 # define GLM_HAS_CONSTEXPR 0
279 #elif (GLM_COMPILER & GLM_COMPILER_CLANG)
280 # define GLM_HAS_CONSTEXPR __has_feature(cxx_relaxed_constexpr)
281 #elif (GLM_LANG & GLM_LANG_CXX14_FLAG)
282 # define GLM_HAS_CONSTEXPR 1
283 #else
284 # define GLM_HAS_CONSTEXPR ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && GLM_HAS_INITIALIZER_LISTS && (\
285  ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL17)) || \
286  ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC15))))
287 #endif
288 
289 #if GLM_HAS_CONSTEXPR
290 # define GLM_CONSTEXPR constexpr
291 #else
292 # define GLM_CONSTEXPR
293 #endif
294 
295 //
296 #if GLM_LANG & GLM_LANG_CXX11_FLAG
297 # define GLM_HAS_ASSIGNABLE 1
298 #else
299 # define GLM_HAS_ASSIGNABLE ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
300  ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC15)) || \
301  ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC49))))
302 #endif
303 
304 //
305 #define GLM_HAS_TRIVIAL_QUERIES 0
306 
307 //
308 #if GLM_LANG & GLM_LANG_CXX11_FLAG
309 # define GLM_HAS_MAKE_SIGNED 1
310 #else
311 # define GLM_HAS_MAKE_SIGNED ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
312  ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)) || \
313  ((GLM_COMPILER & GLM_COMPILER_CUDA))))
314 #endif
315 
316 //
317 #if defined(GLM_FORCE_PURE)
318 # define GLM_HAS_BITSCAN_WINDOWS 0
319 #else
320 # define GLM_HAS_BITSCAN_WINDOWS ((GLM_PLATFORM & GLM_PLATFORM_WINDOWS) && (\
321  ((GLM_COMPILER & GLM_COMPILER_INTEL)) || \
322  ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC14) && (GLM_ARCH & GLM_ARCH_X86_BIT))))
323 #endif
324 
326 // OpenMP
327 #ifdef _OPENMP
328 # if GLM_COMPILER & GLM_COMPILER_GCC
329 # if GLM_COMPILER >= GLM_COMPILER_GCC61
330 # define GLM_HAS_OPENMP 45
331 # elif GLM_COMPILER >= GLM_COMPILER_GCC49
332 # define GLM_HAS_OPENMP 40
333 # elif GLM_COMPILER >= GLM_COMPILER_GCC47
334 # define GLM_HAS_OPENMP 31
335 # else
336 # define GLM_HAS_OPENMP 0
337 # endif
338 # elif GLM_COMPILER & GLM_COMPILER_CLANG
339 # if GLM_COMPILER >= GLM_COMPILER_CLANG38
340 # define GLM_HAS_OPENMP 31
341 # else
342 # define GLM_HAS_OPENMP 0
343 # endif
344 # elif GLM_COMPILER & GLM_COMPILER_VC
345 # define GLM_HAS_OPENMP 20
346 # elif GLM_COMPILER & GLM_COMPILER_INTEL
347 # if GLM_COMPILER >= GLM_COMPILER_INTEL16
348 # define GLM_HAS_OPENMP 40
349 # else
350 # define GLM_HAS_OPENMP 0
351 # endif
352 # else
353 # define GLM_HAS_OPENMP 0
354 # endif
355 #else
356 # define GLM_HAS_OPENMP 0
357 #endif
358 
360 // nullptr
361 
362 #if GLM_LANG & GLM_LANG_CXX0X_FLAG
363 # define GLM_CONFIG_NULLPTR GLM_ENABLE
364 #else
365 # define GLM_CONFIG_NULLPTR GLM_DISABLE
366 #endif
367 
368 #if GLM_CONFIG_NULLPTR == GLM_ENABLE
369 # define GLM_NULLPTR nullptr
370 #else
371 # define GLM_NULLPTR 0
372 #endif
373 
375 // Static assert
376 
377 #if GLM_HAS_STATIC_ASSERT
378 # define GLM_STATIC_ASSERT(x, message) static_assert(x, message)
379 #elif GLM_COMPILER & GLM_COMPILER_VC
380 # define GLM_STATIC_ASSERT(x, message) typedef char __CASSERT__##__LINE__[(x) ? 1 : -1]
381 #else
382 # define GLM_STATIC_ASSERT(x, message) assert(x)
383 #endif//GLM_LANG
384 
386 // Qualifiers
387 
388 #if GLM_COMPILER & GLM_COMPILER_CUDA
389 # define GLM_CUDA_FUNC_DEF __device__ __host__
390 # define GLM_CUDA_FUNC_DECL __device__ __host__
391 #else
392 # define GLM_CUDA_FUNC_DEF
393 # define GLM_CUDA_FUNC_DECL
394 #endif
395 
396 #if defined(GLM_FORCE_INLINE)
397 # if GLM_COMPILER & GLM_COMPILER_VC
398 # define GLM_INLINE __forceinline
399 # define GLM_NEVER_INLINE __declspec((noinline))
400 # elif GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG)
401 # define GLM_INLINE inline __attribute__((__always_inline__))
402 # define GLM_NEVER_INLINE __attribute__((__noinline__))
403 # elif GLM_COMPILER & GLM_COMPILER_CUDA
404 # define GLM_INLINE __forceinline__
405 # define GLM_NEVER_INLINE __noinline__
406 # else
407 # define GLM_INLINE inline
408 # define GLM_NEVER_INLINE
409 # endif//GLM_COMPILER
410 #else
411 # define GLM_INLINE inline
412 # define GLM_NEVER_INLINE
413 #endif//defined(GLM_FORCE_INLINE)
414 
415 #define GLM_FUNC_DECL GLM_CUDA_FUNC_DECL
416 #define GLM_FUNC_QUALIFIER GLM_CUDA_FUNC_DEF GLM_INLINE
417 
419 // Swizzle operators
420 
421 // User defines: GLM_FORCE_SWIZZLE
422 
423 #define GLM_SWIZZLE_DISABLED 0
424 #define GLM_SWIZZLE_OPERATOR 1
425 #define GLM_SWIZZLE_FUNCTION 2
426 
427 #if defined(GLM_FORCE_XYZW_ONLY)
428 # undef GLM_FORCE_SWIZZLE
429 #endif
430 
431 #if defined(GLM_FORCE_SWIZZLE) && (GLM_LANG & GLM_LANG_CXXMS_FLAG)
432 # define GLM_CONFIG_SWIZZLE GLM_SWIZZLE_OPERATOR
433 #elif defined(GLM_FORCE_SWIZZLE)
434 # define GLM_CONFIG_SWIZZLE GLM_SWIZZLE_FUNCTION
435 #else
436 # define GLM_CONFIG_SWIZZLE GLM_SWIZZLE_DISABLED
437 #endif
438 
440 // Allows using not basic types as genType
441 
442 // #define GLM_FORCE_UNRESTRICTED_GENTYPE
443 
444 #ifdef GLM_FORCE_UNRESTRICTED_GENTYPE
445 # define GLM_CONFIG_UNRESTRICTED_GENTYPE GLM_ENABLE
446 #else
447 # define GLM_CONFIG_UNRESTRICTED_GENTYPE GLM_DISABLE
448 #endif
449 
451 // Clip control, define GLM_FORCE_DEPTH_ZERO_TO_ONE before including GLM
452 // to use a clip space between 0 to 1.
453 // Coordinate system, define GLM_FORCE_LEFT_HANDED before including GLM
454 // to use left handed coordinate system by default.
455 
456 #define GLM_CLIP_CONTROL_ZO_BIT (1 << 0) // ZERO_TO_ONE
457 #define GLM_CLIP_CONTROL_NO_BIT (1 << 1) // NEGATIVE_ONE_TO_ONE
458 #define GLM_CLIP_CONTROL_LH_BIT (1 << 2) // LEFT_HANDED, For DirectX, Metal, Vulkan
459 #define GLM_CLIP_CONTROL_RH_BIT (1 << 3) // RIGHT_HANDED, For OpenGL, default in GLM
460 
461 #define GLM_CLIP_CONTROL_LH_ZO (GLM_CLIP_CONTROL_LH_BIT | GLM_CLIP_CONTROL_ZO_BIT)
462 #define GLM_CLIP_CONTROL_LH_NO (GLM_CLIP_CONTROL_LH_BIT | GLM_CLIP_CONTROL_NO_BIT)
463 #define GLM_CLIP_CONTROL_RH_ZO (GLM_CLIP_CONTROL_RH_BIT | GLM_CLIP_CONTROL_ZO_BIT)
464 #define GLM_CLIP_CONTROL_RH_NO (GLM_CLIP_CONTROL_RH_BIT | GLM_CLIP_CONTROL_NO_BIT)
465 
466 #ifdef GLM_FORCE_DEPTH_ZERO_TO_ONE
467 # ifdef GLM_FORCE_LEFT_HANDED
468 # define GLM_CONFIG_CLIP_CONTROL GLM_CLIP_CONTROL_LH_ZO
469 # else
470 # define GLM_CONFIG_CLIP_CONTROL GLM_CLIP_CONTROL_RH_ZO
471 # endif
472 #else
473 # ifdef GLM_FORCE_LEFT_HANDED
474 # define GLM_CONFIG_CLIP_CONTROL GLM_CLIP_CONTROL_LH_NO
475 # else
476 # define GLM_CONFIG_CLIP_CONTROL GLM_CLIP_CONTROL_RH_NO
477 # endif
478 #endif
479 
481 // Qualifiers
482 
483 #if (GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS))
484 # define GLM_DEPRECATED __declspec(deprecated)
485 # define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef __declspec(align(alignment)) type name
486 #elif GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG | GLM_COMPILER_INTEL)
487 # define GLM_DEPRECATED __attribute__((__deprecated__))
488 # define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef type name __attribute__((aligned(alignment)))
489 #elif GLM_COMPILER & GLM_COMPILER_CUDA
490 # define GLM_DEPRECATED
491 # define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef type name __align__(x)
492 #else
493 # define GLM_DEPRECATED
494 # define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef type name
495 #endif
496 
498 
499 #ifdef GLM_FORCE_EXPLICIT_CTOR
500 # define GLM_EXPLICIT explicit
501 #else
502 # define GLM_EXPLICIT
503 #endif
504 
506 // Length type: all length functions returns a length_t type.
507 // When GLM_FORCE_SIZE_T_LENGTH is defined, length_t is a typedef of size_t otherwise
508 // length_t is a typedef of int like GLSL defines it.
509 
510 #define GLM_LENGTH_INT 1
511 #define GLM_LENGTH_SIZE_T 2
512 
513 #ifdef GLM_FORCE_SIZE_T_LENGTH
514 # define GLM_CONFIG_LENGTH_TYPE GLM_LENGTH_SIZE_T
515 #else
516 # define GLM_CONFIG_LENGTH_TYPE GLM_LENGTH_INT
517 #endif
518 
519 namespace glm
520 {
521  using std::size_t;
522 # if GLM_CONFIG_LENGTH_TYPE == GLM_LENGTH_SIZE_T
523  typedef size_t length_t;
524 # else
525  typedef int length_t;
526 # endif
527 }//namespace glm
528 
530 // constexpr
531 
532 #if GLM_HAS_CONSTEXPR
533 # define GLM_CONFIG_CONSTEXP GLM_ENABLE
534 
535  namespace glm
536  {
537  template<typename T, std::size_t N>
538  constexpr std::size_t countof(T const (&)[N])
539  {
540  return N;
541  }
542  }//namespace glm
543 # define GLM_COUNTOF(arr) glm::countof(arr)
544 #elif defined(_MSC_VER)
545 # define GLM_CONFIG_CONSTEXP GLM_DISABLE
546 
547 # define GLM_COUNTOF(arr) _countof(arr)
548 #else
549 # define GLM_CONFIG_CONSTEXP GLM_DISABLE
550 
551 # define GLM_COUNTOF(arr) sizeof(arr) / sizeof(arr[0])
552 #endif
553 
555 // uint
556 
557 namespace glm{
558 namespace detail
559 {
560  template<typename T>
561  struct is_int
562  {
563  enum test {value = 0};
564  };
565 
566  template<>
567  struct is_int<unsigned int>
568  {
569  enum test {value = ~0};
570  };
571 
572  template<>
573  struct is_int<signed int>
574  {
575  enum test {value = ~0};
576  };
577 }//namespace detail
578 
579  typedef unsigned int uint;
580 }//namespace glm
581 
583 // 64-bit int
584 
585 #if GLM_HAS_EXTENDED_INTEGER_TYPE
586 # include <cstdint>
587 #endif
588 
589 namespace glm{
590 namespace detail
591 {
592 # if GLM_HAS_EXTENDED_INTEGER_TYPE
593  typedef std::uint64_t uint64;
594  typedef std::int64_t int64;
595 # elif (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) // C99 detected, 64 bit types available
596  typedef uint64_t uint64;
597  typedef int64_t int64;
598 # elif GLM_COMPILER & GLM_COMPILER_VC
599  typedef unsigned __int64 uint64;
600  typedef signed __int64 int64;
601 # elif GLM_COMPILER & GLM_COMPILER_GCC
602 # pragma GCC diagnostic ignored "-Wlong-long"
603  __extension__ typedef unsigned long long uint64;
604  __extension__ typedef signed long long int64;
605 # elif (GLM_COMPILER & GLM_COMPILER_CLANG)
606 # pragma clang diagnostic ignored "-Wc++11-long-long"
607  typedef unsigned long long uint64;
608  typedef signed long long int64;
609 # else//unknown compiler
610  typedef unsigned long long uint64;
611  typedef signed long long int64;
612 # endif
613 }//namespace detail
614 }//namespace glm
615 
617 // make_unsigned
618 
619 #if GLM_HAS_MAKE_SIGNED
620 # include <type_traits>
621 
622 namespace glm{
623 namespace detail
624 {
625  using std::make_unsigned;
626 }//namespace detail
627 }//namespace glm
628 
629 #else
630 
631 namespace glm{
632 namespace detail
633 {
634  template<typename genType>
635  struct make_unsigned
636  {};
637 
638  template<>
639  struct make_unsigned<char>
640  {
641  typedef unsigned char type;
642  };
643 
644  template<>
645  struct make_unsigned<short>
646  {
647  typedef unsigned short type;
648  };
649 
650  template<>
651  struct make_unsigned<int>
652  {
653  typedef unsigned int type;
654  };
655 
656  template<>
657  struct make_unsigned<long>
658  {
659  typedef unsigned long type;
660  };
661 
662  template<>
663  struct make_unsigned<int64>
664  {
665  typedef uint64 type;
666  };
667 
668  template<>
669  struct make_unsigned<unsigned char>
670  {
671  typedef unsigned char type;
672  };
673 
674  template<>
675  struct make_unsigned<unsigned short>
676  {
677  typedef unsigned short type;
678  };
679 
680  template<>
681  struct make_unsigned<unsigned int>
682  {
683  typedef unsigned int type;
684  };
685 
686  template<>
687  struct make_unsigned<unsigned long>
688  {
689  typedef unsigned long type;
690  };
691 
692  template<>
693  struct make_unsigned<uint64>
694  {
695  typedef uint64 type;
696  };
697 }//namespace detail
698 }//namespace glm
699 #endif
700 
702 // Only use x, y, z, w as vector type components
703 
704 #ifdef GLM_FORCE_XYZW_ONLY
705 # define GLM_CONFIG_XYZW_ONLY GLM_ENABLE
706 #else
707 # define GLM_CONFIG_XYZW_ONLY GLM_DISABLE
708 #endif
709 
711 // Configure the use of defaulted initialized types
712 
713 #define GLM_CTOR_INITIALIZER_LIST (1 << 1)
714 #define GLM_CTOR_INITIALISATION (1 << 2)
715 
716 #if defined(GLM_FORCE_CTOR_INIT) && GLM_HAS_INITIALIZER_LISTS
717 # define GLM_CONFIG_CTOR_INIT GLM_CTOR_INITIALIZER_LIST
718 #elif defined(GLM_FORCE_CTOR_INIT) && !GLM_HAS_INITIALIZER_LISTS
719 # define GLM_CONFIG_CTOR_INIT GLM_CTOR_INITIALISATION
720 #else
721 # define GLM_CONFIG_CTOR_INIT GLM_DISABLE
722 #endif
723 
725 // Configure the use of defaulted function
726 
727 #if GLM_HAS_DEFAULTED_FUNCTIONS && GLM_CONFIG_CTOR_INIT == GLM_DISABLE
728 # define GLM_CONFIG_DEFAULTED_FUNCTIONS GLM_ENABLE
729 # define GLM_DEFAULT = default
730 #else
731 # define GLM_CONFIG_DEFAULTED_FUNCTIONS GLM_DISABLE
732 # define GLM_DEFAULT
733 #endif
734 
736 // Configure the use of aligned gentypes
737 
738 #ifdef GLM_FORCE_ALIGNED // Legacy define
739 # define GLM_FORCE_DEFAULT_ALIGNED_GENTYPES
740 #endif
741 
742 #if GLM_HAS_ALIGNOF && (GLM_LANG & GLM_LANG_CXXMS_FLAG)
743 # define GLM_CONFIG_ALIGNED_GENTYPES GLM_ENABLE
744 #else
745 # define GLM_CONFIG_ALIGNED_GENTYPES GLM_DISABLE
746 #endif
747 
749 // Use SIMD instruction sets
750 
751 #if GLM_HAS_ALIGNOF && (GLM_LANG & GLM_LANG_CXXMS_FLAG) && (GLM_ARCH & GLM_ARCH_SIMD_BIT)
752 # define GLM_CONFIG_SIMD GLM_ENABLE
753 #else
754 # define GLM_CONFIG_SIMD GLM_DISABLE
755 #endif
756 
758 // Configure the use of anonymous structure as implementation detail
759 
760 #if ((GLM_CONFIG_SIMD == GLM_ENABLE) || (GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR) || (GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE))
761 # define GLM_CONFIG_ANONYMOUS_STRUCT GLM_ENABLE
762 #else
763 # define GLM_CONFIG_ANONYMOUS_STRUCT GLM_DISABLE
764 #endif
765 
767 // Precision
768 
769 #define GLM_HIGHP 1
770 #define GLM_MEDIUMP 2
771 #define GLM_LOWP 3
772 
773 #if defined(GLM_FORCE_PRECISION_HIGHP_BOOL) || defined(GLM_PRECISION_HIGHP_BOOL)
774 # define GLM_CONFIG_PRECISION_BOOL GLM_HIGHP
775 #elif defined(GLM_FORCE_PRECISION_MEDIUMP_BOOL) || defined(GLM_PRECISION_MEDIUMP_BOOL)
776 # define GLM_CONFIG_PRECISION_BOOL GLM_MEDIUMP
777 #elif defined(GLM_FORCE_PRECISION_LOWP_BOOL) || defined(GLM_PRECISION_LOWP_BOOL)
778 # define GLM_CONFIG_PRECISION_BOOL GLM_LOWP
779 #else
780 # define GLM_CONFIG_PRECISION_BOOL GLM_HIGHP
781 #endif
782 
783 #if defined(GLM_FORCE_PRECISION_HIGHP_INT) || defined(GLM_PRECISION_HIGHP_INT)
784 # define GLM_CONFIG_PRECISION_INT GLM_HIGHP
785 #elif defined(GLM_FORCE_PRECISION_MEDIUMP_INT) || defined(GLM_PRECISION_MEDIUMP_INT)
786 # define GLM_CONFIG_PRECISION_INT GLM_MEDIUMP
787 #elif defined(GLM_FORCE_PRECISION_LOWP_INT) || defined(GLM_PRECISION_LOWP_INT)
788 # define GLM_CONFIG_PRECISION_INT GLM_LOWP
789 #else
790 # define GLM_CONFIG_PRECISION_INT GLM_HIGHP
791 #endif
792 
793 #if defined(GLM_FORCE_PRECISION_HIGHP_UINT) || defined(GLM_PRECISION_HIGHP_UINT)
794 # define GLM_CONFIG_PRECISION_UINT GLM_HIGHP
795 #elif defined(GLM_FORCE_PRECISION_MEDIUMP_UINT) || defined(GLM_PRECISION_MEDIUMP_UINT)
796 # define GLM_CONFIG_PRECISION_UINT GLM_MEDIUMP
797 #elif defined(GLM_FORCE_PRECISION_LOWP_UINT) || defined(GLM_PRECISION_LOWP_UINT)
798 # define GLM_CONFIG_PRECISION_UINT GLM_LOWP
799 #else
800 # define GLM_CONFIG_PRECISION_UINT GLM_HIGHP
801 #endif
802 
803 #if defined(GLM_FORCE_PRECISION_HIGHP_FLOAT) || defined(GLM_PRECISION_HIGHP_FLOAT)
804 # define GLM_CONFIG_PRECISION_FLOAT GLM_HIGHP
805 #elif defined(GLM_FORCE_PRECISION_MEDIUMP_FLOAT) || defined(GLM_PRECISION_MEDIUMP_FLOAT)
806 # define GLM_CONFIG_PRECISION_FLOAT GLM_MEDIUMP
807 #elif defined(GLM_FORCE_PRECISION_LOWP_FLOAT) || defined(GLM_PRECISION_LOWP_FLOAT)
808 # define GLM_CONFIG_PRECISION_FLOAT GLM_LOWP
809 #else
810 # define GLM_CONFIG_PRECISION_FLOAT GLM_HIGHP
811 #endif
812 
813 #if defined(GLM_FORCE_PRECISION_HIGHP_DOUBLE) || defined(GLM_PRECISION_HIGHP_DOUBLE)
814 # define GLM_CONFIG_PRECISION_DOUBLE GLM_HIGHP
815 #elif defined(GLM_FORCE_PRECISION_MEDIUMP_DOUBLE) || defined(GLM_PRECISION_MEDIUMP_DOUBLE)
816 # define GLM_CONFIG_PRECISION_DOUBLE GLM_MEDIUMP
817 #elif defined(GLM_FORCE_PRECISION_LOWP_DOUBLE) || defined(GLM_PRECISION_LOWP_DOUBLE)
818 # define GLM_CONFIG_PRECISION_DOUBLE GLM_LOWP
819 #else
820 # define GLM_CONFIG_PRECISION_DOUBLE GLM_HIGHP
821 #endif
822 
824 // Check inclusions of different versions of GLM
825 
826 #elif ((GLM_SETUP_INCLUDED != GLM_VERSION) && !defined(GLM_FORCE_IGNORE_VERSION))
827 # error "GLM error: A different version of GLM is already included. Define GLM_FORCE_IGNORE_VERSION before including GLM headers to ignore this error."
828 #elif GLM_SETUP_INCLUDED == GLM_VERSION
829 
831 // Messages
832 
833 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_MESSAGE_DISPLAYED)
834 # define GLM_MESSAGE_DISPLAYED
835 # define GLM_STR_HELPER(x) #x
836 # define GLM_STR(x) GLM_STR_HELPER(x)
837 
838  // Report GLM version
839 # pragma message (GLM_STR(GLM_VERSION_MESSAGE))
840 
841  // Report C++ language
842 # if (GLM_LANG & GLM_LANG_CXX2A_FLAG) && (GLM_LANG & GLM_LANG_EXT)
843 # pragma message("GLM: C++ 2A with extensions")
844 # elif (GLM_LANG & GLM_LANG_CXX2A_FLAG)
845 # pragma message("GLM: C++ 2A")
846 # elif (GLM_LANG & GLM_LANG_CXX17_FLAG) && (GLM_LANG & GLM_LANG_EXT)
847 # pragma message("GLM: C++ 17 with extensions")
848 # elif (GLM_LANG & GLM_LANG_CXX17_FLAG)
849 # pragma message("GLM: C++ 17")
850 # elif (GLM_LANG & GLM_LANG_CXX14_FLAG) && (GLM_LANG & GLM_LANG_EXT)
851 # pragma message("GLM: C++ 14 with extensions")
852 # elif (GLM_LANG & GLM_LANG_CXX14_FLAG)
853 # pragma message("GLM: C++ 14")
854 # elif (GLM_LANG & GLM_LANG_CXX11_FLAG) && (GLM_LANG & GLM_LANG_EXT)
855 # pragma message("GLM: C++ 11 with extensions")
856 # elif (GLM_LANG & GLM_LANG_CXX11_FLAG)
857 # pragma message("GLM: C++ 11")
858 # elif (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_LANG & GLM_LANG_EXT)
859 # pragma message("GLM: C++ 0x with extensions")
860 # elif (GLM_LANG & GLM_LANG_CXX0X_FLAG)
861 # pragma message("GLM: C++ 0x")
862 # elif (GLM_LANG & GLM_LANG_CXX03_FLAG) && (GLM_LANG & GLM_LANG_EXT)
863 # pragma message("GLM: C++ 03 with extensions")
864 # elif (GLM_LANG & GLM_LANG_CXX03_FLAG)
865 # pragma message("GLM: C++ 03")
866 # elif (GLM_LANG & GLM_LANG_CXX98_FLAG) && (GLM_LANG & GLM_LANG_EXT)
867 # pragma message("GLM: C++ 98 with extensions")
868 # elif (GLM_LANG & GLM_LANG_CXX98_FLAG)
869 # pragma message("GLM: C++ 98")
870 # else
871 # pragma message("GLM: C++ language undetected")
872 # endif//GLM_LANG
873 
874  // Report compiler detection
875 # if GLM_COMPILER & GLM_COMPILER_CUDA
876 # pragma message("GLM: CUDA compiler detected")
877 # elif GLM_COMPILER & GLM_COMPILER_VC
878 # pragma message("GLM: Visual C++ compiler detected")
879 # elif GLM_COMPILER & GLM_COMPILER_CLANG
880 # pragma message("GLM: Clang compiler detected")
881 # elif GLM_COMPILER & GLM_COMPILER_INTEL
882 # pragma message("GLM: Intel Compiler detected")
883 # elif GLM_COMPILER & GLM_COMPILER_GCC
884 # pragma message("GLM: GCC compiler detected")
885 # else
886 # pragma message("GLM: Compiler not detected")
887 # endif
888 
889  // Report build target
890 # if (GLM_ARCH & GLM_ARCH_AVX2_BIT) && (GLM_MODEL == GLM_MODEL_64)
891 # pragma message("GLM: x86 64 bits with AVX2 instruction set build target")
892 # elif (GLM_ARCH & GLM_ARCH_AVX2_BIT) && (GLM_MODEL == GLM_MODEL_32)
893 # pragma message("GLM: x86 32 bits with AVX2 instruction set build target")
894 
895 # elif (GLM_ARCH & GLM_ARCH_AVX_BIT) && (GLM_MODEL == GLM_MODEL_64)
896 # pragma message("GLM: x86 64 bits with AVX instruction set build target")
897 # elif (GLM_ARCH & GLM_ARCH_AVX_BIT) && (GLM_MODEL == GLM_MODEL_32)
898 # pragma message("GLM: x86 32 bits with AVX instruction set build target")
899 
900 # elif (GLM_ARCH & GLM_ARCH_SSE42_BIT) && (GLM_MODEL == GLM_MODEL_64)
901 # pragma message("GLM: x86 64 bits with SSE4.2 instruction set build target")
902 # elif (GLM_ARCH & GLM_ARCH_SSE42_BIT) && (GLM_MODEL == GLM_MODEL_32)
903 # pragma message("GLM: x86 32 bits with SSE4.2 instruction set build target")
904 
905 # elif (GLM_ARCH & GLM_ARCH_SSE41_BIT) && (GLM_MODEL == GLM_MODEL_64)
906 # pragma message("GLM: x86 64 bits with SSE4.1 instruction set build target")
907 # elif (GLM_ARCH & GLM_ARCH_SSE41_BIT) && (GLM_MODEL == GLM_MODEL_32)
908 # pragma message("GLM: x86 32 bits with SSE4.1 instruction set build target")
909 
910 # elif (GLM_ARCH & GLM_ARCH_SSSE3_BIT) && (GLM_MODEL == GLM_MODEL_64)
911 # pragma message("GLM: x86 64 bits with SSSE3 instruction set build target")
912 # elif (GLM_ARCH & GLM_ARCH_SSSE3_BIT) && (GLM_MODEL == GLM_MODEL_32)
913 # pragma message("GLM: x86 32 bits with SSSE3 instruction set build target")
914 
915 # elif (GLM_ARCH & GLM_ARCH_SSE3_BIT) && (GLM_MODEL == GLM_MODEL_64)
916 # pragma message("GLM: x86 64 bits with SSE3 instruction set build target")
917 # elif (GLM_ARCH & GLM_ARCH_SSE3_BIT) && (GLM_MODEL == GLM_MODEL_32)
918 # pragma message("GLM: x86 32 bits with SSE3 instruction set build target")
919 
920 # elif (GLM_ARCH & GLM_ARCH_SSE2_BIT) && (GLM_MODEL == GLM_MODEL_64)
921 # pragma message("GLM: x86 64 bits with SSE2 instruction set build target")
922 # elif (GLM_ARCH & GLM_ARCH_SSE2_BIT) && (GLM_MODEL == GLM_MODEL_32)
923 # pragma message("GLM: x86 32 bits with SSE2 instruction set build target")
924 
925 # elif (GLM_ARCH & GLM_ARCH_X86_BIT) && (GLM_MODEL == GLM_MODEL_64)
926 # pragma message("GLM: x86 64 bits build target")
927 # elif (GLM_ARCH & GLM_ARCH_X86_BIT) && (GLM_MODEL == GLM_MODEL_32)
928 # pragma message("GLM: x86 32 bits build target")
929 
930 # elif (GLM_ARCH & GLM_ARCH_NEON_BIT) && (GLM_MODEL == GLM_MODEL_64)
931 # pragma message("GLM: ARM 64 bits with Neon instruction set build target")
932 # elif (GLM_ARCH & GLM_ARCH_NEON_BIT) && (GLM_MODEL == GLM_MODEL_32)
933 # pragma message("GLM: ARM 32 bits with Neon instruction set build target")
934 
935 # elif (GLM_ARCH & GLM_ARCH_ARM_BIT) && (GLM_MODEL == GLM_MODEL_64)
936 # pragma message("GLM: ARM 64 bits build target")
937 # elif (GLM_ARCH & GLM_ARCH_ARM_BIT) && (GLM_MODEL == GLM_MODEL_32)
938 # pragma message("GLM: ARM 32 bits build target")
939 
940 # elif (GLM_ARCH & GLM_ARCH_MIPS_BIT) && (GLM_MODEL == GLM_MODEL_64)
941 # pragma message("GLM: MIPS 64 bits build target")
942 # elif (GLM_ARCH & GLM_ARCH_MIPS_BIT) && (GLM_MODEL == GLM_MODEL_32)
943 # pragma message("GLM: MIPS 32 bits build target")
944 
945 # elif (GLM_ARCH & GLM_ARCH_PPC_BIT) && (GLM_MODEL == GLM_MODEL_64)
946 # pragma message("GLM: PowerPC 64 bits build target")
947 # elif (GLM_ARCH & GLM_ARCH_PPC_BIT) && (GLM_MODEL == GLM_MODEL_32)
948 # pragma message("GLM: PowerPC 32 bits build target")
949 # else
950 # pragma message("GLM: Unknown build target")
951 # endif//GLM_ARCH
952 
953  // Report platform name
954 # if(GLM_PLATFORM & GLM_PLATFORM_QNXNTO)
955 # pragma message("GLM: QNX platform detected")
956 //# elif(GLM_PLATFORM & GLM_PLATFORM_IOS)
957 //# pragma message("GLM: iOS platform detected")
958 # elif(GLM_PLATFORM & GLM_PLATFORM_APPLE)
959 # pragma message("GLM: Apple platform detected")
960 # elif(GLM_PLATFORM & GLM_PLATFORM_WINCE)
961 # pragma message("GLM: WinCE platform detected")
962 # elif(GLM_PLATFORM & GLM_PLATFORM_WINDOWS)
963 # pragma message("GLM: Windows platform detected")
964 # elif(GLM_PLATFORM & GLM_PLATFORM_CHROME_NACL)
965 # pragma message("GLM: Native Client detected")
966 # elif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
967 # pragma message("GLM: Android platform detected")
968 # elif(GLM_PLATFORM & GLM_PLATFORM_LINUX)
969 # pragma message("GLM: Linux platform detected")
970 # elif(GLM_PLATFORM & GLM_PLATFORM_UNIX)
971 # pragma message("GLM: UNIX platform detected")
972 # elif(GLM_PLATFORM & GLM_PLATFORM_UNKNOWN)
973 # pragma message("GLM: platform unknown")
974 # else
975 # pragma message("GLM: platform not detected")
976 # endif
977 
978  // Report whether only xyzw component are used
979 # if defined GLM_FORCE_XYZW_ONLY
980 # pragma message("GLM: GLM_FORCE_XYZW_ONLY is defined. Only x, y, z and w component are available in vector type. This define disables swizzle operators and SIMD instruction sets")
981 # endif
982 
983  // Report swizzle operator support
984 # if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
985 # pragma message("GLM: GLM_FORCE_SWIZZLE is defined, swizzling operators enabled")
986 # elif GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
987 # pragma message("GLM: GLM_FORCE_SWIZZLE is defined, swizzling functions enabled. Enable compiler C++ language extensions to enable swizzle operators.")
988 # else
989 # pragma message("GLM: GLM_FORCE_SWIZZLE is undefined. swizzling functions or operators are disabled.")
990 # endif
991 
992  // Report .length() type
993 # if GLM_CONFIG_LENGTH_TYPE == GLM_LENGTH_SIZE_T
994 # pragma message("GLM: GLM_FORCE_SIZE_T_LENGTH is defined. .length() returns a glm::length_t, a typedef of std::size_t.")
995 # else
996 # pragma message("GLM: GLM_FORCE_SIZE_T_LENGTH is undefined. .length() returns a glm::length_t, a typedef of int following GLSL.")
997 # endif
998 
999 # if GLM_CONFIG_UNRESTRICTED_GENTYPE == GLM_ENABLE
1000 # pragma message("GLM: GLM_FORCE_UNRESTRICTED_GENTYPE is defined. Removes GLSL restrictions on valid function genTypes.")
1001 # else
1002 # pragma message("GLM: GLM_FORCE_UNRESTRICTED_GENTYPE is undefined. Follows strictly GLSL on valid function genTypes.")
1003 # endif
1004 
1005 # ifdef GLM_FORCE_SINGLE_ONLY
1006 # pragma message("GLM: GLM_FORCE_SINGLE_ONLY is defined. Using only single precision floating-point types")
1007 # endif
1008 
1009 # if defined(GLM_FORCE_DEFAULT_ALIGNED_GENTYPES) && (GLM_CONFIG_ALIGNED_GENTYPES == GLM_DISABLE)
1010 # undef GLM_FORCE_DEFAULT_ALIGNED_GENTYPES
1011 # pragma message("GLM: GLM_FORCE_DEFAULT_ALIGNED_GENTYPES is defined but is disabled. It requires C++11 and language extensions")
1012 # endif
1013 
1014 # if GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_ZO_BIT
1015 # pragma message("GLM: GLM_FORCE_DEPTH_ZERO_TO_ONE is defined. Using zero to one depth clip space.")
1016 # else
1017 # pragma message("GLM: GLM_FORCE_DEPTH_ZERO_TO_ONE is undefined. Using negative one to one depth clip space.")
1018 # endif
1019 
1020 # if GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_LH_BIT
1021 # pragma message("GLM: GLM_FORCE_LEFT_HANDED is defined. Using left handed coordinate system.")
1022 # else
1023 # pragma message("GLM: GLM_FORCE_LEFT_HANDED is undefined. Using right handed coordinate system.")
1024 # endif
1025 #endif//GLM_MESSAGES
1026 
1027 #endif//GLM_SETUP_INCLUDED
detail::uint64 uint64
64 bit unsigned integer type.
+
int64 int64_t
64 bit signed integer type.
Definition: fwd.hpp:85
+
detail::int64 int64
64 bit signed integer type.
+
uint64 uint64_t
Default qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:143
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00035_source.html b/common/glm/doc/api/a00035_source.html new file mode 100644 index 000000000..c22a97e3a --- /dev/null +++ b/common/glm/doc/api/a00035_source.html @@ -0,0 +1,82 @@ + + + + + + + +0.9.9 API documenation: type_half.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_half.hpp
+
+
+
1 #pragma once
2 
3 #include "setup.hpp"
4 
5 namespace glm{
6 namespace detail
7 {
8  typedef short hdata;
9 
10  GLM_FUNC_DECL float toFloat32(hdata value);
11  GLM_FUNC_DECL hdata toFloat16(float const& value);
12 
13 }//namespace detail
14 }//namespace glm
15 
16 #include "type_half.inl"
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00038.html b/common/glm/doc/api/a00038.html new file mode 100644 index 000000000..49c67fd96 --- /dev/null +++ b/common/glm/doc/api/a00038.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: type_mat2x2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_mat2x2.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Core features

+ +

Definition in file type_mat2x2.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00038_source.html b/common/glm/doc/api/a00038_source.html new file mode 100644 index 000000000..8fa4f9d0e --- /dev/null +++ b/common/glm/doc/api/a00038_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: type_mat2x2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_mat2x2.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include "type_vec2.hpp"
7 #include <limits>
8 #include <cstddef>
9 
10 namespace glm
11 {
12  template<typename T, qualifier Q>
13  struct mat<2, 2, T, Q>
14  {
15  typedef vec<2, T, Q> col_type;
16  typedef vec<2, T, Q> row_type;
17  typedef mat<2, 2, T, Q> type;
18  typedef mat<2, 2, T, Q> transpose_type;
19  typedef T value_type;
20 
21  private:
22  col_type value[2];
23 
24  public:
25  // -- Accesses --
26 
27  typedef length_t length_type;
28  GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 2; }
29 
30  GLM_FUNC_DECL col_type & operator[](length_type i);
31  GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const;
32 
33  // -- Constructors --
34 
35  GLM_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT;
36  template<qualifier P>
37  GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<2, 2, T, P> const& m);
38 
39  GLM_FUNC_DECL explicit GLM_CONSTEXPR mat(T scalar);
40  GLM_FUNC_DECL GLM_CONSTEXPR mat(
41  T const& x1, T const& y1,
42  T const& x2, T const& y2);
43  GLM_FUNC_DECL GLM_CONSTEXPR mat(
44  col_type const& v1,
45  col_type const& v2);
46 
47  // -- Conversions --
48 
49  template<typename U, typename V, typename M, typename N>
50  GLM_FUNC_DECL GLM_CONSTEXPR mat(
51  U const& x1, V const& y1,
52  M const& x2, N const& y2);
53 
54  template<typename U, typename V>
55  GLM_FUNC_DECL GLM_CONSTEXPR mat(
56  vec<2, U, Q> const& v1,
57  vec<2, V, Q> const& v2);
58 
59  // -- Matrix conversions --
60 
61  template<typename U, qualifier P>
62  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 2, U, P> const& m);
63 
64  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 3, T, Q> const& x);
65  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 4, T, Q> const& x);
66  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 3, T, Q> const& x);
67  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 2, T, Q> const& x);
68  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 4, T, Q> const& x);
69  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 2, T, Q> const& x);
70  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 4, T, Q> const& x);
71  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 3, T, Q> const& x);
72 
73  // -- Unary arithmetic operators --
74 
75  template<typename U>
76  GLM_FUNC_DECL mat<2, 2, T, Q> & operator=(mat<2, 2, U, Q> const& m);
77  template<typename U>
78  GLM_FUNC_DECL mat<2, 2, T, Q> & operator+=(U s);
79  template<typename U>
80  GLM_FUNC_DECL mat<2, 2, T, Q> & operator+=(mat<2, 2, U, Q> const& m);
81  template<typename U>
82  GLM_FUNC_DECL mat<2, 2, T, Q> & operator-=(U s);
83  template<typename U>
84  GLM_FUNC_DECL mat<2, 2, T, Q> & operator-=(mat<2, 2, U, Q> const& m);
85  template<typename U>
86  GLM_FUNC_DECL mat<2, 2, T, Q> & operator*=(U s);
87  template<typename U>
88  GLM_FUNC_DECL mat<2, 2, T, Q> & operator*=(mat<2, 2, U, Q> const& m);
89  template<typename U>
90  GLM_FUNC_DECL mat<2, 2, T, Q> & operator/=(U s);
91  template<typename U>
92  GLM_FUNC_DECL mat<2, 2, T, Q> & operator/=(mat<2, 2, U, Q> const& m);
93 
94  // -- Increment and decrement operators --
95 
96  GLM_FUNC_DECL mat<2, 2, T, Q> & operator++ ();
97  GLM_FUNC_DECL mat<2, 2, T, Q> & operator-- ();
98  GLM_FUNC_DECL mat<2, 2, T, Q> operator++(int);
99  GLM_FUNC_DECL mat<2, 2, T, Q> operator--(int);
100  };
101 
102  // -- Unary operators --
103 
104  template<typename T, qualifier Q>
105  GLM_FUNC_DECL mat<2, 2, T, Q> operator+(mat<2, 2, T, Q> const& m);
106 
107  template<typename T, qualifier Q>
108  GLM_FUNC_DECL mat<2, 2, T, Q> operator-(mat<2, 2, T, Q> const& m);
109 
110  // -- Binary operators --
111 
112  template<typename T, qualifier Q>
113  GLM_FUNC_DECL mat<2, 2, T, Q> operator+(mat<2, 2, T, Q> const& m, T scalar);
114 
115  template<typename T, qualifier Q>
116  GLM_FUNC_DECL mat<2, 2, T, Q> operator+(T scalar, mat<2, 2, T, Q> const& m);
117 
118  template<typename T, qualifier Q>
119  GLM_FUNC_DECL mat<2, 2, T, Q> operator+(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
120 
121  template<typename T, qualifier Q>
122  GLM_FUNC_DECL mat<2, 2, T, Q> operator-(mat<2, 2, T, Q> const& m, T scalar);
123 
124  template<typename T, qualifier Q>
125  GLM_FUNC_DECL mat<2, 2, T, Q> operator-(T scalar, mat<2, 2, T, Q> const& m);
126 
127  template<typename T, qualifier Q>
128  GLM_FUNC_DECL mat<2, 2, T, Q> operator-(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
129 
130  template<typename T, qualifier Q>
131  GLM_FUNC_DECL mat<2, 2, T, Q> operator*(mat<2, 2, T, Q> const& m, T scalar);
132 
133  template<typename T, qualifier Q>
134  GLM_FUNC_DECL mat<2, 2, T, Q> operator*(T scalar, mat<2, 2, T, Q> const& m);
135 
136  template<typename T, qualifier Q>
137  GLM_FUNC_DECL typename mat<2, 2, T, Q>::col_type operator*(mat<2, 2, T, Q> const& m, typename mat<2, 2, T, Q>::row_type const& v);
138 
139  template<typename T, qualifier Q>
140  GLM_FUNC_DECL typename mat<2, 2, T, Q>::row_type operator*(typename mat<2, 2, T, Q>::col_type const& v, mat<2, 2, T, Q> const& m);
141 
142  template<typename T, qualifier Q>
143  GLM_FUNC_DECL mat<2, 2, T, Q> operator*(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
144 
145  template<typename T, qualifier Q>
146  GLM_FUNC_DECL mat<3, 2, T, Q> operator*(mat<2, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2);
147 
148  template<typename T, qualifier Q>
149  GLM_FUNC_DECL mat<4, 2, T, Q> operator*(mat<2, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
150 
151  template<typename T, qualifier Q>
152  GLM_FUNC_DECL mat<2, 2, T, Q> operator/(mat<2, 2, T, Q> const& m, T scalar);
153 
154  template<typename T, qualifier Q>
155  GLM_FUNC_DECL mat<2, 2, T, Q> operator/(T scalar, mat<2, 2, T, Q> const& m);
156 
157  template<typename T, qualifier Q>
158  GLM_FUNC_DECL typename mat<2, 2, T, Q>::col_type operator/(mat<2, 2, T, Q> const& m, typename mat<2, 2, T, Q>::row_type const& v);
159 
160  template<typename T, qualifier Q>
161  GLM_FUNC_DECL typename mat<2, 2, T, Q>::row_type operator/(typename mat<2, 2, T, Q>::col_type const& v, mat<2, 2, T, Q> const& m);
162 
163  template<typename T, qualifier Q>
164  GLM_FUNC_DECL mat<2, 2, T, Q> operator/(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
165 
166  // -- Boolean operators --
167 
168  template<typename T, qualifier Q>
169  GLM_FUNC_DECL bool operator==(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
170 
171  template<typename T, qualifier Q>
172  GLM_FUNC_DECL bool operator!=(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
173 } //namespace glm
174 
175 #ifndef GLM_EXTERNAL_TEMPLATE
176 #include "type_mat2x2.inl"
177 #endif
Definition: common.hpp:20
+
GLM_FUNC_DECL T length(qua< T, Q > const &q)
Returns the norm of a quaternions.
+
Core features
+
+ + + + diff --git a/common/glm/doc/api/a00041.html b/common/glm/doc/api/a00041.html new file mode 100644 index 000000000..bd20d346f --- /dev/null +++ b/common/glm/doc/api/a00041.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: type_mat2x3.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_mat2x3.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Core features

+ +

Definition in file type_mat2x3.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00041_source.html b/common/glm/doc/api/a00041_source.html new file mode 100644 index 000000000..ba6923550 --- /dev/null +++ b/common/glm/doc/api/a00041_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: type_mat2x3.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_mat2x3.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include "type_vec2.hpp"
7 #include "type_vec3.hpp"
8 #include <limits>
9 #include <cstddef>
10 
11 namespace glm
12 {
13  template<typename T, qualifier Q>
14  struct mat<2, 3, T, Q>
15  {
16  typedef vec<3, T, Q> col_type;
17  typedef vec<2, T, Q> row_type;
18  typedef mat<2, 3, T, Q> type;
19  typedef mat<3, 2, T, Q> transpose_type;
20  typedef T value_type;
21 
22  private:
23  col_type value[2];
24 
25  public:
26  // -- Accesses --
27 
28  typedef length_t length_type;
29  GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 2; }
30 
31  GLM_FUNC_DECL col_type & operator[](length_type i);
32  GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const;
33 
34  // -- Constructors --
35 
36  GLM_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT;
37  template<qualifier P>
38  GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<2, 3, T, P> const& m);
39 
40  GLM_FUNC_DECL explicit GLM_CONSTEXPR mat(T scalar);
41  GLM_FUNC_DECL GLM_CONSTEXPR mat(
42  T x0, T y0, T z0,
43  T x1, T y1, T z1);
44  GLM_FUNC_DECL GLM_CONSTEXPR mat(
45  col_type const& v0,
46  col_type const& v1);
47 
48  // -- Conversions --
49 
50  template<typename X1, typename Y1, typename Z1, typename X2, typename Y2, typename Z2>
51  GLM_FUNC_DECL GLM_CONSTEXPR mat(
52  X1 x1, Y1 y1, Z1 z1,
53  X2 x2, Y2 y2, Z2 z2);
54 
55  template<typename U, typename V>
56  GLM_FUNC_DECL GLM_CONSTEXPR mat(
57  vec<3, U, Q> const& v1,
58  vec<3, V, Q> const& v2);
59 
60  // -- Matrix conversions --
61 
62  template<typename U, qualifier P>
63  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 3, U, P> const& m);
64 
65  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 2, T, Q> const& x);
66  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 3, T, Q> const& x);
67  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 4, T, Q> const& x);
68  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 4, T, Q> const& x);
69  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 2, T, Q> const& x);
70  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 4, T, Q> const& x);
71  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 2, T, Q> const& x);
72  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 3, T, Q> const& x);
73 
74  // -- Unary arithmetic operators --
75 
76  template<typename U>
77  GLM_FUNC_DECL mat<2, 3, T, Q> & operator=(mat<2, 3, U, Q> const& m);
78  template<typename U>
79  GLM_FUNC_DECL mat<2, 3, T, Q> & operator+=(U s);
80  template<typename U>
81  GLM_FUNC_DECL mat<2, 3, T, Q> & operator+=(mat<2, 3, U, Q> const& m);
82  template<typename U>
83  GLM_FUNC_DECL mat<2, 3, T, Q> & operator-=(U s);
84  template<typename U>
85  GLM_FUNC_DECL mat<2, 3, T, Q> & operator-=(mat<2, 3, U, Q> const& m);
86  template<typename U>
87  GLM_FUNC_DECL mat<2, 3, T, Q> & operator*=(U s);
88  template<typename U>
89  GLM_FUNC_DECL mat<2, 3, T, Q> & operator/=(U s);
90 
91  // -- Increment and decrement operators --
92 
93  GLM_FUNC_DECL mat<2, 3, T, Q> & operator++ ();
94  GLM_FUNC_DECL mat<2, 3, T, Q> & operator-- ();
95  GLM_FUNC_DECL mat<2, 3, T, Q> operator++(int);
96  GLM_FUNC_DECL mat<2, 3, T, Q> operator--(int);
97  };
98 
99  // -- Unary operators --
100 
101  template<typename T, qualifier Q>
102  GLM_FUNC_DECL mat<2, 3, T, Q> operator+(mat<2, 3, T, Q> const& m);
103 
104  template<typename T, qualifier Q>
105  GLM_FUNC_DECL mat<2, 3, T, Q> operator-(mat<2, 3, T, Q> const& m);
106 
107  // -- Binary operators --
108 
109  template<typename T, qualifier Q>
110  GLM_FUNC_DECL mat<2, 3, T, Q> operator+(mat<2, 3, T, Q> const& m, T scalar);
111 
112  template<typename T, qualifier Q>
113  GLM_FUNC_DECL mat<2, 3, T, Q> operator+(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2);
114 
115  template<typename T, qualifier Q>
116  GLM_FUNC_DECL mat<2, 3, T, Q> operator-(mat<2, 3, T, Q> const& m, T scalar);
117 
118  template<typename T, qualifier Q>
119  GLM_FUNC_DECL mat<2, 3, T, Q> operator-(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2);
120 
121  template<typename T, qualifier Q>
122  GLM_FUNC_DECL mat<2, 3, T, Q> operator*(mat<2, 3, T, Q> const& m, T scalar);
123 
124  template<typename T, qualifier Q>
125  GLM_FUNC_DECL mat<2, 3, T, Q> operator*(T scalar, mat<2, 3, T, Q> const& m);
126 
127  template<typename T, qualifier Q>
128  GLM_FUNC_DECL typename mat<2, 3, T, Q>::col_type operator*(mat<2, 3, T, Q> const& m, typename mat<2, 3, T, Q>::row_type const& v);
129 
130  template<typename T, qualifier Q>
131  GLM_FUNC_DECL typename mat<2, 3, T, Q>::row_type operator*(typename mat<2, 3, T, Q>::col_type const& v, mat<2, 3, T, Q> const& m);
132 
133  template<typename T, qualifier Q>
134  GLM_FUNC_DECL mat<2, 3, T, Q> operator*(mat<2, 3, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
135 
136  template<typename T, qualifier Q>
137  GLM_FUNC_DECL mat<3, 3, T, Q> operator*(mat<2, 3, T, Q> const& m1, mat<3, 2, T, Q> const& m2);
138 
139  template<typename T, qualifier Q>
140  GLM_FUNC_DECL mat<4, 3, T, Q> operator*(mat<2, 3, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
141 
142  template<typename T, qualifier Q>
143  GLM_FUNC_DECL mat<2, 3, T, Q> operator/(mat<2, 3, T, Q> const& m, T scalar);
144 
145  template<typename T, qualifier Q>
146  GLM_FUNC_DECL mat<2, 3, T, Q> operator/(T scalar, mat<2, 3, T, Q> const& m);
147 
148  // -- Boolean operators --
149 
150  template<typename T, qualifier Q>
151  GLM_FUNC_DECL bool operator==(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2);
152 
153  template<typename T, qualifier Q>
154  GLM_FUNC_DECL bool operator!=(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2);
155 }//namespace glm
156 
157 #ifndef GLM_EXTERNAL_TEMPLATE
158 #include "type_mat2x3.inl"
159 #endif
Core features
+
Definition: common.hpp:20
+
GLM_FUNC_DECL T length(qua< T, Q > const &q)
Returns the norm of a quaternions.
+
Core features
+
+ + + + diff --git a/common/glm/doc/api/a00044.html b/common/glm/doc/api/a00044.html new file mode 100644 index 000000000..96dd556cc --- /dev/null +++ b/common/glm/doc/api/a00044.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: type_mat2x4.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_mat2x4.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Core features

+ +

Definition in file type_mat2x4.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00044_source.html b/common/glm/doc/api/a00044_source.html new file mode 100644 index 000000000..6bfe5138f --- /dev/null +++ b/common/glm/doc/api/a00044_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: type_mat2x4.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_mat2x4.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include "type_vec2.hpp"
7 #include "type_vec4.hpp"
8 #include <limits>
9 #include <cstddef>
10 
11 namespace glm
12 {
13  template<typename T, qualifier Q>
14  struct mat<2, 4, T, Q>
15  {
16  typedef vec<4, T, Q> col_type;
17  typedef vec<2, T, Q> row_type;
18  typedef mat<2, 4, T, Q> type;
19  typedef mat<4, 2, T, Q> transpose_type;
20  typedef T value_type;
21 
22  private:
23  col_type value[2];
24 
25  public:
26  // -- Accesses --
27 
28  typedef length_t length_type;
29  GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 2; }
30 
31  GLM_FUNC_DECL col_type & operator[](length_type i);
32  GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const;
33 
34  // -- Constructors --
35 
36  GLM_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT;
37  template<qualifier P>
38  GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<2, 4, T, P> const& m);
39 
40  GLM_FUNC_DECL explicit GLM_CONSTEXPR mat(T scalar);
41  GLM_FUNC_DECL GLM_CONSTEXPR mat(
42  T x0, T y0, T z0, T w0,
43  T x1, T y1, T z1, T w1);
44  GLM_FUNC_DECL GLM_CONSTEXPR mat(
45  col_type const& v0,
46  col_type const& v1);
47 
48  // -- Conversions --
49 
50  template<
51  typename X1, typename Y1, typename Z1, typename W1,
52  typename X2, typename Y2, typename Z2, typename W2>
53  GLM_FUNC_DECL GLM_CONSTEXPR mat(
54  X1 x1, Y1 y1, Z1 z1, W1 w1,
55  X2 x2, Y2 y2, Z2 z2, W2 w2);
56 
57  template<typename U, typename V>
58  GLM_FUNC_DECL GLM_CONSTEXPR mat(
59  vec<4, U, Q> const& v1,
60  vec<4, V, Q> const& v2);
61 
62  // -- Matrix conversions --
63 
64  template<typename U, qualifier P>
65  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 4, U, P> const& m);
66 
67  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 2, T, Q> const& x);
68  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 3, T, Q> const& x);
69  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 4, T, Q> const& x);
70  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 3, T, Q> const& x);
71  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 2, T, Q> const& x);
72  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 4, T, Q> const& x);
73  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 2, T, Q> const& x);
74  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 3, T, Q> const& x);
75 
76  // -- Unary arithmetic operators --
77 
78  template<typename U>
79  GLM_FUNC_DECL mat<2, 4, T, Q> & operator=(mat<2, 4, U, Q> const& m);
80  template<typename U>
81  GLM_FUNC_DECL mat<2, 4, T, Q> & operator+=(U s);
82  template<typename U>
83  GLM_FUNC_DECL mat<2, 4, T, Q> & operator+=(mat<2, 4, U, Q> const& m);
84  template<typename U>
85  GLM_FUNC_DECL mat<2, 4, T, Q> & operator-=(U s);
86  template<typename U>
87  GLM_FUNC_DECL mat<2, 4, T, Q> & operator-=(mat<2, 4, U, Q> const& m);
88  template<typename U>
89  GLM_FUNC_DECL mat<2, 4, T, Q> & operator*=(U s);
90  template<typename U>
91  GLM_FUNC_DECL mat<2, 4, T, Q> & operator/=(U s);
92 
93  // -- Increment and decrement operators --
94 
95  GLM_FUNC_DECL mat<2, 4, T, Q> & operator++ ();
96  GLM_FUNC_DECL mat<2, 4, T, Q> & operator-- ();
97  GLM_FUNC_DECL mat<2, 4, T, Q> operator++(int);
98  GLM_FUNC_DECL mat<2, 4, T, Q> operator--(int);
99  };
100 
101  // -- Unary operators --
102 
103  template<typename T, qualifier Q>
104  GLM_FUNC_DECL mat<2, 4, T, Q> operator+(mat<2, 4, T, Q> const& m);
105 
106  template<typename T, qualifier Q>
107  GLM_FUNC_DECL mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m);
108 
109  // -- Binary operators --
110 
111  template<typename T, qualifier Q>
112  GLM_FUNC_DECL mat<2, 4, T, Q> operator+(mat<2, 4, T, Q> const& m, T scalar);
113 
114  template<typename T, qualifier Q>
115  GLM_FUNC_DECL mat<2, 4, T, Q> operator+(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
116 
117  template<typename T, qualifier Q>
118  GLM_FUNC_DECL mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m, T scalar);
119 
120  template<typename T, qualifier Q>
121  GLM_FUNC_DECL mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
122 
123  template<typename T, qualifier Q>
124  GLM_FUNC_DECL mat<2, 4, T, Q> operator*(mat<2, 4, T, Q> const& m, T scalar);
125 
126  template<typename T, qualifier Q>
127  GLM_FUNC_DECL mat<2, 4, T, Q> operator*(T scalar, mat<2, 4, T, Q> const& m);
128 
129  template<typename T, qualifier Q>
130  GLM_FUNC_DECL typename mat<2, 4, T, Q>::col_type operator*(mat<2, 4, T, Q> const& m, typename mat<2, 4, T, Q>::row_type const& v);
131 
132  template<typename T, qualifier Q>
133  GLM_FUNC_DECL typename mat<2, 4, T, Q>::row_type operator*(typename mat<2, 4, T, Q>::col_type const& v, mat<2, 4, T, Q> const& m);
134 
135  template<typename T, qualifier Q>
136  GLM_FUNC_DECL mat<4, 4, T, Q> operator*(mat<2, 4, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
137 
138  template<typename T, qualifier Q>
139  GLM_FUNC_DECL mat<2, 4, T, Q> operator*(mat<2, 4, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
140 
141  template<typename T, qualifier Q>
142  GLM_FUNC_DECL mat<3, 4, T, Q> operator*(mat<2, 4, T, Q> const& m1, mat<3, 2, T, Q> const& m2);
143 
144  template<typename T, qualifier Q>
145  GLM_FUNC_DECL mat<2, 4, T, Q> operator/(mat<2, 4, T, Q> const& m, T scalar);
146 
147  template<typename T, qualifier Q>
148  GLM_FUNC_DECL mat<2, 4, T, Q> operator/(T scalar, mat<2, 4, T, Q> const& m);
149 
150  // -- Boolean operators --
151 
152  template<typename T, qualifier Q>
153  GLM_FUNC_DECL bool operator==(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
154 
155  template<typename T, qualifier Q>
156  GLM_FUNC_DECL bool operator!=(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
157 }//namespace glm
158 
159 #ifndef GLM_EXTERNAL_TEMPLATE
160 #include "type_mat2x4.inl"
161 #endif
Core features
+
Definition: common.hpp:20
+
GLM_FUNC_DECL T length(qua< T, Q > const &q)
Returns the norm of a quaternions.
+
Core features
+
+ + + + diff --git a/common/glm/doc/api/a00047.html b/common/glm/doc/api/a00047.html new file mode 100644 index 000000000..303d57e34 --- /dev/null +++ b/common/glm/doc/api/a00047.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: type_mat3x2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_mat3x2.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Core features

+ +

Definition in file type_mat3x2.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00047_source.html b/common/glm/doc/api/a00047_source.html new file mode 100644 index 000000000..e7e30e96f --- /dev/null +++ b/common/glm/doc/api/a00047_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: type_mat3x2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_mat3x2.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include "type_vec2.hpp"
7 #include "type_vec3.hpp"
8 #include <limits>
9 #include <cstddef>
10 
11 namespace glm
12 {
13  template<typename T, qualifier Q>
14  struct mat<3, 2, T, Q>
15  {
16  typedef vec<2, T, Q> col_type;
17  typedef vec<3, T, Q> row_type;
18  typedef mat<3, 2, T, Q> type;
19  typedef mat<2, 3, T, Q> transpose_type;
20  typedef T value_type;
21 
22  private:
23  col_type value[3];
24 
25  public:
26  // -- Accesses --
27 
28  typedef length_t length_type;
29  GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 3; }
30 
31  GLM_FUNC_DECL col_type & operator[](length_type i);
32  GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const;
33 
34  // -- Constructors --
35 
36  GLM_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT;
37  template<qualifier P>
38  GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<3, 2, T, P> const& m);
39 
40  GLM_FUNC_DECL explicit GLM_CONSTEXPR mat(T scalar);
41  GLM_FUNC_DECL GLM_CONSTEXPR mat(
42  T x0, T y0,
43  T x1, T y1,
44  T x2, T y2);
45  GLM_FUNC_DECL GLM_CONSTEXPR mat(
46  col_type const& v0,
47  col_type const& v1,
48  col_type const& v2);
49 
50  // -- Conversions --
51 
52  template<
53  typename X1, typename Y1,
54  typename X2, typename Y2,
55  typename X3, typename Y3>
56  GLM_FUNC_DECL GLM_CONSTEXPR mat(
57  X1 x1, Y1 y1,
58  X2 x2, Y2 y2,
59  X3 x3, Y3 y3);
60 
61  template<typename V1, typename V2, typename V3>
62  GLM_FUNC_DECL GLM_CONSTEXPR mat(
63  vec<2, V1, Q> const& v1,
64  vec<2, V2, Q> const& v2,
65  vec<2, V3, Q> const& v3);
66 
67  // -- Matrix conversions --
68 
69  template<typename U, qualifier P>
70  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 2, U, P> const& m);
71 
72  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 2, T, Q> const& x);
73  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 3, T, Q> const& x);
74  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 4, T, Q> const& x);
75  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 3, T, Q> const& x);
76  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 4, T, Q> const& x);
77  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 4, T, Q> const& x);
78  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 2, T, Q> const& x);
79  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 3, T, Q> const& x);
80 
81  // -- Unary arithmetic operators --
82 
83  template<typename U>
84  GLM_FUNC_DECL mat<3, 2, T, Q> & operator=(mat<3, 2, U, Q> const& m);
85  template<typename U>
86  GLM_FUNC_DECL mat<3, 2, T, Q> & operator+=(U s);
87  template<typename U>
88  GLM_FUNC_DECL mat<3, 2, T, Q> & operator+=(mat<3, 2, U, Q> const& m);
89  template<typename U>
90  GLM_FUNC_DECL mat<3, 2, T, Q> & operator-=(U s);
91  template<typename U>
92  GLM_FUNC_DECL mat<3, 2, T, Q> & operator-=(mat<3, 2, U, Q> const& m);
93  template<typename U>
94  GLM_FUNC_DECL mat<3, 2, T, Q> & operator*=(U s);
95  template<typename U>
96  GLM_FUNC_DECL mat<3, 2, T, Q> & operator/=(U s);
97 
98  // -- Increment and decrement operators --
99 
100  GLM_FUNC_DECL mat<3, 2, T, Q> & operator++ ();
101  GLM_FUNC_DECL mat<3, 2, T, Q> & operator-- ();
102  GLM_FUNC_DECL mat<3, 2, T, Q> operator++(int);
103  GLM_FUNC_DECL mat<3, 2, T, Q> operator--(int);
104  };
105 
106  // -- Unary operators --
107 
108  template<typename T, qualifier Q>
109  GLM_FUNC_DECL mat<3, 2, T, Q> operator+(mat<3, 2, T, Q> const& m);
110 
111  template<typename T, qualifier Q>
112  GLM_FUNC_DECL mat<3, 2, T, Q> operator-(mat<3, 2, T, Q> const& m);
113 
114  // -- Binary operators --
115 
116  template<typename T, qualifier Q>
117  GLM_FUNC_DECL mat<3, 2, T, Q> operator+(mat<3, 2, T, Q> const& m, T scalar);
118 
119  template<typename T, qualifier Q>
120  GLM_FUNC_DECL mat<3, 2, T, Q> operator+(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2);
121 
122  template<typename T, qualifier Q>
123  GLM_FUNC_DECL mat<3, 2, T, Q> operator-(mat<3, 2, T, Q> const& m, T scalar);
124 
125  template<typename T, qualifier Q>
126  GLM_FUNC_DECL mat<3, 2, T, Q> operator-(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2);
127 
128  template<typename T, qualifier Q>
129  GLM_FUNC_DECL mat<3, 2, T, Q> operator*(mat<3, 2, T, Q> const& m, T scalar);
130 
131  template<typename T, qualifier Q>
132  GLM_FUNC_DECL mat<3, 2, T, Q> operator*(T scalar, mat<3, 2, T, Q> const& m);
133 
134  template<typename T, qualifier Q>
135  GLM_FUNC_DECL typename mat<3, 2, T, Q>::col_type operator*(mat<3, 2, T, Q> const& m, typename mat<3, 2, T, Q>::row_type const& v);
136 
137  template<typename T, qualifier Q>
138  GLM_FUNC_DECL typename mat<3, 2, T, Q>::row_type operator*(typename mat<3, 2, T, Q>::col_type const& v, mat<3, 2, T, Q> const& m);
139 
140  template<typename T, qualifier Q>
141  GLM_FUNC_DECL mat<2, 2, T, Q> operator*(mat<3, 2, T, Q> const& m1, mat<2, 3, T, Q> const& m2);
142 
143  template<typename T, qualifier Q>
144  GLM_FUNC_DECL mat<3, 2, T, Q> operator*(mat<3, 2, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
145 
146  template<typename T, qualifier Q>
147  GLM_FUNC_DECL mat<4, 2, T, Q> operator*(mat<3, 2, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
148 
149  template<typename T, qualifier Q>
150  GLM_FUNC_DECL mat<3, 2, T, Q> operator/(mat<3, 2, T, Q> const& m, T scalar);
151 
152  template<typename T, qualifier Q>
153  GLM_FUNC_DECL mat<3, 2, T, Q> operator/(T scalar, mat<3, 2, T, Q> const& m);
154 
155  // -- Boolean operators --
156 
157  template<typename T, qualifier Q>
158  GLM_FUNC_DECL bool operator==(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2);
159 
160  template<typename T, qualifier Q>
161  GLM_FUNC_DECL bool operator!=(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2);
162 
163 }//namespace glm
164 
165 #ifndef GLM_EXTERNAL_TEMPLATE
166 #include "type_mat3x2.inl"
167 #endif
Core features
+
Definition: common.hpp:20
+
GLM_FUNC_DECL T length(qua< T, Q > const &q)
Returns the norm of a quaternions.
+
Core features
+
+ + + + diff --git a/common/glm/doc/api/a00050.html b/common/glm/doc/api/a00050.html new file mode 100644 index 000000000..43fcdab42 --- /dev/null +++ b/common/glm/doc/api/a00050.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: type_mat3x3.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_mat3x3.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Core features

+ +

Definition in file type_mat3x3.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00050_source.html b/common/glm/doc/api/a00050_source.html new file mode 100644 index 000000000..c5ab31987 --- /dev/null +++ b/common/glm/doc/api/a00050_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: type_mat3x3.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_mat3x3.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include "type_vec3.hpp"
7 #include <limits>
8 #include <cstddef>
9 
10 namespace glm
11 {
12  template<typename T, qualifier Q>
13  struct mat<3, 3, T, Q>
14  {
15  typedef vec<3, T, Q> col_type;
16  typedef vec<3, T, Q> row_type;
17  typedef mat<3, 3, T, Q> type;
18  typedef mat<3, 3, T, Q> transpose_type;
19  typedef T value_type;
20 
21  private:
22  col_type value[3];
23 
24  public:
25  // -- Accesses --
26 
27  typedef length_t length_type;
28  GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 3; }
29 
30  GLM_FUNC_DECL col_type & operator[](length_type i);
31  GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const;
32 
33  // -- Constructors --
34 
35  GLM_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT;
36  template<qualifier P>
37  GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<3, 3, T, P> const& m);
38 
39  GLM_FUNC_DECL explicit GLM_CONSTEXPR mat(T scalar);
40  GLM_FUNC_DECL GLM_CONSTEXPR mat(
41  T x0, T y0, T z0,
42  T x1, T y1, T z1,
43  T x2, T y2, T z2);
44  GLM_FUNC_DECL GLM_CONSTEXPR mat(
45  col_type const& v0,
46  col_type const& v1,
47  col_type const& v2);
48 
49  // -- Conversions --
50 
51  template<
52  typename X1, typename Y1, typename Z1,
53  typename X2, typename Y2, typename Z2,
54  typename X3, typename Y3, typename Z3>
55  GLM_FUNC_DECL GLM_CONSTEXPR mat(
56  X1 x1, Y1 y1, Z1 z1,
57  X2 x2, Y2 y2, Z2 z2,
58  X3 x3, Y3 y3, Z3 z3);
59 
60  template<typename V1, typename V2, typename V3>
61  GLM_FUNC_DECL GLM_CONSTEXPR mat(
62  vec<3, V1, Q> const& v1,
63  vec<3, V2, Q> const& v2,
64  vec<3, V3, Q> const& v3);
65 
66  // -- Matrix conversions --
67 
68  template<typename U, qualifier P>
69  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 3, U, P> const& m);
70 
71  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 2, T, Q> const& x);
72  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 4, T, Q> const& x);
73  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 3, T, Q> const& x);
74  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 2, T, Q> const& x);
75  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 4, T, Q> const& x);
76  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 2, T, Q> const& x);
77  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 4, T, Q> const& x);
78  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 3, T, Q> const& x);
79 
80  // -- Unary arithmetic operators --
81 
82  template<typename U>
83  GLM_FUNC_DECL mat<3, 3, T, Q> & operator=(mat<3, 3, U, Q> const& m);
84  template<typename U>
85  GLM_FUNC_DECL mat<3, 3, T, Q> & operator+=(U s);
86  template<typename U>
87  GLM_FUNC_DECL mat<3, 3, T, Q> & operator+=(mat<3, 3, U, Q> const& m);
88  template<typename U>
89  GLM_FUNC_DECL mat<3, 3, T, Q> & operator-=(U s);
90  template<typename U>
91  GLM_FUNC_DECL mat<3, 3, T, Q> & operator-=(mat<3, 3, U, Q> const& m);
92  template<typename U>
93  GLM_FUNC_DECL mat<3, 3, T, Q> & operator*=(U s);
94  template<typename U>
95  GLM_FUNC_DECL mat<3, 3, T, Q> & operator*=(mat<3, 3, U, Q> const& m);
96  template<typename U>
97  GLM_FUNC_DECL mat<3, 3, T, Q> & operator/=(U s);
98  template<typename U>
99  GLM_FUNC_DECL mat<3, 3, T, Q> & operator/=(mat<3, 3, U, Q> const& m);
100 
101  // -- Increment and decrement operators --
102 
103  GLM_FUNC_DECL mat<3, 3, T, Q> & operator++();
104  GLM_FUNC_DECL mat<3, 3, T, Q> & operator--();
105  GLM_FUNC_DECL mat<3, 3, T, Q> operator++(int);
106  GLM_FUNC_DECL mat<3, 3, T, Q> operator--(int);
107  };
108 
109  // -- Unary operators --
110 
111  template<typename T, qualifier Q>
112  GLM_FUNC_DECL mat<3, 3, T, Q> operator+(mat<3, 3, T, Q> const& m);
113 
114  template<typename T, qualifier Q>
115  GLM_FUNC_DECL mat<3, 3, T, Q> operator-(mat<3, 3, T, Q> const& m);
116 
117  // -- Binary operators --
118 
119  template<typename T, qualifier Q>
120  GLM_FUNC_DECL mat<3, 3, T, Q> operator+(mat<3, 3, T, Q> const& m, T scalar);
121 
122  template<typename T, qualifier Q>
123  GLM_FUNC_DECL mat<3, 3, T, Q> operator+(T scalar, mat<3, 3, T, Q> const& m);
124 
125  template<typename T, qualifier Q>
126  GLM_FUNC_DECL mat<3, 3, T, Q> operator+(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
127 
128  template<typename T, qualifier Q>
129  GLM_FUNC_DECL mat<3, 3, T, Q> operator-(mat<3, 3, T, Q> const& m, T scalar);
130 
131  template<typename T, qualifier Q>
132  GLM_FUNC_DECL mat<3, 3, T, Q> operator-(T scalar, mat<3, 3, T, Q> const& m);
133 
134  template<typename T, qualifier Q>
135  GLM_FUNC_DECL mat<3, 3, T, Q> operator-(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
136 
137  template<typename T, qualifier Q>
138  GLM_FUNC_DECL mat<3, 3, T, Q> operator*(mat<3, 3, T, Q> const& m, T scalar);
139 
140  template<typename T, qualifier Q>
141  GLM_FUNC_DECL mat<3, 3, T, Q> operator*(T scalar, mat<3, 3, T, Q> const& m);
142 
143  template<typename T, qualifier Q>
144  GLM_FUNC_DECL typename mat<3, 3, T, Q>::col_type operator*(mat<3, 3, T, Q> const& m, typename mat<3, 3, T, Q>::row_type const& v);
145 
146  template<typename T, qualifier Q>
147  GLM_FUNC_DECL typename mat<3, 3, T, Q>::row_type operator*(typename mat<3, 3, T, Q>::col_type const& v, mat<3, 3, T, Q> const& m);
148 
149  template<typename T, qualifier Q>
150  GLM_FUNC_DECL mat<3, 3, T, Q> operator*(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
151 
152  template<typename T, qualifier Q>
153  GLM_FUNC_DECL mat<2, 3, T, Q> operator*(mat<3, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2);
154 
155  template<typename T, qualifier Q>
156  GLM_FUNC_DECL mat<4, 3, T, Q> operator*(mat<3, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
157 
158  template<typename T, qualifier Q>
159  GLM_FUNC_DECL mat<3, 3, T, Q> operator/(mat<3, 3, T, Q> const& m, T scalar);
160 
161  template<typename T, qualifier Q>
162  GLM_FUNC_DECL mat<3, 3, T, Q> operator/(T scalar, mat<3, 3, T, Q> const& m);
163 
164  template<typename T, qualifier Q>
165  GLM_FUNC_DECL typename mat<3, 3, T, Q>::col_type operator/(mat<3, 3, T, Q> const& m, typename mat<3, 3, T, Q>::row_type const& v);
166 
167  template<typename T, qualifier Q>
168  GLM_FUNC_DECL typename mat<3, 3, T, Q>::row_type operator/(typename mat<3, 3, T, Q>::col_type const& v, mat<3, 3, T, Q> const& m);
169 
170  template<typename T, qualifier Q>
171  GLM_FUNC_DECL mat<3, 3, T, Q> operator/(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
172 
173  // -- Boolean operators --
174 
175  template<typename T, qualifier Q>
176  GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
177 
178  template<typename T, qualifier Q>
179  GLM_FUNC_DECL bool operator!=(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
180 }//namespace glm
181 
182 #ifndef GLM_EXTERNAL_TEMPLATE
183 #include "type_mat3x3.inl"
184 #endif
Core features
+
Definition: common.hpp:20
+
GLM_FUNC_DECL T length(qua< T, Q > const &q)
Returns the norm of a quaternions.
+
+ + + + diff --git a/common/glm/doc/api/a00053.html b/common/glm/doc/api/a00053.html new file mode 100644 index 000000000..d3403823b --- /dev/null +++ b/common/glm/doc/api/a00053.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: type_mat3x4.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_mat3x4.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Core features

+ +

Definition in file type_mat3x4.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00053_source.html b/common/glm/doc/api/a00053_source.html new file mode 100644 index 000000000..57bd2981d --- /dev/null +++ b/common/glm/doc/api/a00053_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: type_mat3x4.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_mat3x4.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include "type_vec3.hpp"
7 #include "type_vec4.hpp"
8 #include <limits>
9 #include <cstddef>
10 
11 namespace glm
12 {
13  template<typename T, qualifier Q>
14  struct mat<3, 4, T, Q>
15  {
16  typedef vec<4, T, Q> col_type;
17  typedef vec<3, T, Q> row_type;
18  typedef mat<3, 4, T, Q> type;
19  typedef mat<4, 3, T, Q> transpose_type;
20  typedef T value_type;
21 
22  private:
23  col_type value[3];
24 
25  public:
26  // -- Accesses --
27 
28  typedef length_t length_type;
29  GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 3; }
30 
31  GLM_FUNC_DECL col_type & operator[](length_type i);
32  GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const;
33 
34  // -- Constructors --
35 
36  GLM_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT;
37  template<qualifier P>
38  GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<3, 4, T, P> const& m);
39 
40  GLM_FUNC_DECL explicit GLM_CONSTEXPR mat(T scalar);
41  GLM_FUNC_DECL GLM_CONSTEXPR mat(
42  T x0, T y0, T z0, T w0,
43  T x1, T y1, T z1, T w1,
44  T x2, T y2, T z2, T w2);
45  GLM_FUNC_DECL GLM_CONSTEXPR mat(
46  col_type const& v0,
47  col_type const& v1,
48  col_type const& v2);
49 
50  // -- Conversions --
51 
52  template<
53  typename X1, typename Y1, typename Z1, typename W1,
54  typename X2, typename Y2, typename Z2, typename W2,
55  typename X3, typename Y3, typename Z3, typename W3>
56  GLM_FUNC_DECL GLM_CONSTEXPR mat(
57  X1 x1, Y1 y1, Z1 z1, W1 w1,
58  X2 x2, Y2 y2, Z2 z2, W2 w2,
59  X3 x3, Y3 y3, Z3 z3, W3 w3);
60 
61  template<typename V1, typename V2, typename V3>
62  GLM_FUNC_DECL GLM_CONSTEXPR mat(
63  vec<4, V1, Q> const& v1,
64  vec<4, V2, Q> const& v2,
65  vec<4, V3, Q> const& v3);
66 
67  // -- Matrix conversions --
68 
69  template<typename U, qualifier P>
70  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 4, U, P> const& m);
71 
72  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 2, T, Q> const& x);
73  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 3, T, Q> const& x);
74  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 4, T, Q> const& x);
75  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 3, T, Q> const& x);
76  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 2, T, Q> const& x);
77  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 4, T, Q> const& x);
78  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 2, T, Q> const& x);
79  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 3, T, Q> const& x);
80 
81  // -- Unary arithmetic operators --
82 
83  template<typename U>
84  GLM_FUNC_DECL mat<3, 4, T, Q> & operator=(mat<3, 4, U, Q> const& m);
85  template<typename U>
86  GLM_FUNC_DECL mat<3, 4, T, Q> & operator+=(U s);
87  template<typename U>
88  GLM_FUNC_DECL mat<3, 4, T, Q> & operator+=(mat<3, 4, U, Q> const& m);
89  template<typename U>
90  GLM_FUNC_DECL mat<3, 4, T, Q> & operator-=(U s);
91  template<typename U>
92  GLM_FUNC_DECL mat<3, 4, T, Q> & operator-=(mat<3, 4, U, Q> const& m);
93  template<typename U>
94  GLM_FUNC_DECL mat<3, 4, T, Q> & operator*=(U s);
95  template<typename U>
96  GLM_FUNC_DECL mat<3, 4, T, Q> & operator/=(U s);
97 
98  // -- Increment and decrement operators --
99 
100  GLM_FUNC_DECL mat<3, 4, T, Q> & operator++();
101  GLM_FUNC_DECL mat<3, 4, T, Q> & operator--();
102  GLM_FUNC_DECL mat<3, 4, T, Q> operator++(int);
103  GLM_FUNC_DECL mat<3, 4, T, Q> operator--(int);
104  };
105 
106  // -- Unary operators --
107 
108  template<typename T, qualifier Q>
109  GLM_FUNC_DECL mat<3, 4, T, Q> operator+(mat<3, 4, T, Q> const& m);
110 
111  template<typename T, qualifier Q>
112  GLM_FUNC_DECL mat<3, 4, T, Q> operator-(mat<3, 4, T, Q> const& m);
113 
114  // -- Binary operators --
115 
116  template<typename T, qualifier Q>
117  GLM_FUNC_DECL mat<3, 4, T, Q> operator+(mat<3, 4, T, Q> const& m, T scalar);
118 
119  template<typename T, qualifier Q>
120  GLM_FUNC_DECL mat<3, 4, T, Q> operator+(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
121 
122  template<typename T, qualifier Q>
123  GLM_FUNC_DECL mat<3, 4, T, Q> operator-(mat<3, 4, T, Q> const& m, T scalar);
124 
125  template<typename T, qualifier Q>
126  GLM_FUNC_DECL mat<3, 4, T, Q> operator-(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
127 
128  template<typename T, qualifier Q>
129  GLM_FUNC_DECL mat<3, 4, T, Q> operator*(mat<3, 4, T, Q> const& m, T scalar);
130 
131  template<typename T, qualifier Q>
132  GLM_FUNC_DECL mat<3, 4, T, Q> operator*(T scalar, mat<3, 4, T, Q> const& m);
133 
134  template<typename T, qualifier Q>
135  GLM_FUNC_DECL typename mat<3, 4, T, Q>::col_type operator*(mat<3, 4, T, Q> const& m, typename mat<3, 4, T, Q>::row_type const& v);
136 
137  template<typename T, qualifier Q>
138  GLM_FUNC_DECL typename mat<3, 4, T, Q>::row_type operator*(typename mat<3, 4, T, Q>::col_type const& v, mat<3, 4, T, Q> const& m);
139 
140  template<typename T, qualifier Q>
141  GLM_FUNC_DECL mat<4, 4, T, Q> operator*(mat<3, 4, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
142 
143  template<typename T, qualifier Q>
144  GLM_FUNC_DECL mat<2, 4, T, Q> operator*(mat<3, 4, T, Q> const& m1, mat<2, 3, T, Q> const& m2);
145 
146  template<typename T, qualifier Q>
147  GLM_FUNC_DECL mat<3, 4, T, Q> operator*(mat<3, 4, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
148 
149  template<typename T, qualifier Q>
150  GLM_FUNC_DECL mat<3, 4, T, Q> operator/(mat<3, 4, T, Q> const& m, T scalar);
151 
152  template<typename T, qualifier Q>
153  GLM_FUNC_DECL mat<3, 4, T, Q> operator/(T scalar, mat<3, 4, T, Q> const& m);
154 
155  // -- Boolean operators --
156 
157  template<typename T, qualifier Q>
158  GLM_FUNC_DECL bool operator==(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
159 
160  template<typename T, qualifier Q>
161  GLM_FUNC_DECL bool operator!=(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
162 }//namespace glm
163 
164 #ifndef GLM_EXTERNAL_TEMPLATE
165 #include "type_mat3x4.inl"
166 #endif
Core features
+
Core features
+
Definition: common.hpp:20
+
GLM_FUNC_DECL T length(qua< T, Q > const &q)
Returns the norm of a quaternions.
+
+ + + + diff --git a/common/glm/doc/api/a00056.html b/common/glm/doc/api/a00056.html new file mode 100644 index 000000000..1db6a627e --- /dev/null +++ b/common/glm/doc/api/a00056.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: type_mat4x2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_mat4x2.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Core features

+ +

Definition in file type_mat4x2.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00056_source.html b/common/glm/doc/api/a00056_source.html new file mode 100644 index 000000000..94a08278c --- /dev/null +++ b/common/glm/doc/api/a00056_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: type_mat4x2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_mat4x2.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include "type_vec2.hpp"
7 #include "type_vec4.hpp"
8 #include <limits>
9 #include <cstddef>
10 
11 namespace glm
12 {
13  template<typename T, qualifier Q>
14  struct mat<4, 2, T, Q>
15  {
16  typedef vec<2, T, Q> col_type;
17  typedef vec<4, T, Q> row_type;
18  typedef mat<4, 2, T, Q> type;
19  typedef mat<2, 4, T, Q> transpose_type;
20  typedef T value_type;
21 
22  private:
23  col_type value[4];
24 
25  public:
26  // -- Accesses --
27 
28  typedef length_t length_type;
29  GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 4; }
30 
31  GLM_FUNC_DECL col_type & operator[](length_type i);
32  GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const;
33 
34  // -- Constructors --
35 
36  GLM_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT;
37  template<qualifier P>
38  GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<4, 2, T, P> const& m);
39 
40  GLM_FUNC_DECL explicit GLM_CONSTEXPR mat(T scalar);
41  GLM_FUNC_DECL GLM_CONSTEXPR mat(
42  T x0, T y0,
43  T x1, T y1,
44  T x2, T y2,
45  T x3, T y3);
46  GLM_FUNC_DECL GLM_CONSTEXPR mat(
47  col_type const& v0,
48  col_type const& v1,
49  col_type const& v2,
50  col_type const& v3);
51 
52  // -- Conversions --
53 
54  template<
55  typename X0, typename Y0,
56  typename X1, typename Y1,
57  typename X2, typename Y2,
58  typename X3, typename Y3>
59  GLM_FUNC_DECL GLM_CONSTEXPR mat(
60  X0 x0, Y0 y0,
61  X1 x1, Y1 y1,
62  X2 x2, Y2 y2,
63  X3 x3, Y3 y3);
64 
65  template<typename V1, typename V2, typename V3, typename V4>
66  GLM_FUNC_DECL GLM_CONSTEXPR mat(
67  vec<2, V1, Q> const& v1,
68  vec<2, V2, Q> const& v2,
69  vec<2, V3, Q> const& v3,
70  vec<2, V4, Q> const& v4);
71 
72  // -- Matrix conversions --
73 
74  template<typename U, qualifier P>
75  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 2, U, P> const& m);
76 
77  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 2, T, Q> const& x);
78  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 3, T, Q> const& x);
79  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 4, T, Q> const& x);
80  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 3, T, Q> const& x);
81  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 2, T, Q> const& x);
82  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 4, T, Q> const& x);
83  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 3, T, Q> const& x);
84  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 4, T, Q> const& x);
85 
86  // -- Unary arithmetic operators --
87 
88  template<typename U>
89  GLM_FUNC_DECL mat<4, 2, T, Q> & operator=(mat<4, 2, U, Q> const& m);
90  template<typename U>
91  GLM_FUNC_DECL mat<4, 2, T, Q> & operator+=(U s);
92  template<typename U>
93  GLM_FUNC_DECL mat<4, 2, T, Q> & operator+=(mat<4, 2, U, Q> const& m);
94  template<typename U>
95  GLM_FUNC_DECL mat<4, 2, T, Q> & operator-=(U s);
96  template<typename U>
97  GLM_FUNC_DECL mat<4, 2, T, Q> & operator-=(mat<4, 2, U, Q> const& m);
98  template<typename U>
99  GLM_FUNC_DECL mat<4, 2, T, Q> & operator*=(U s);
100  template<typename U>
101  GLM_FUNC_DECL mat<4, 2, T, Q> & operator/=(U s);
102 
103  // -- Increment and decrement operators --
104 
105  GLM_FUNC_DECL mat<4, 2, T, Q> & operator++ ();
106  GLM_FUNC_DECL mat<4, 2, T, Q> & operator-- ();
107  GLM_FUNC_DECL mat<4, 2, T, Q> operator++(int);
108  GLM_FUNC_DECL mat<4, 2, T, Q> operator--(int);
109  };
110 
111  // -- Unary operators --
112 
113  template<typename T, qualifier Q>
114  GLM_FUNC_DECL mat<4, 2, T, Q> operator+(mat<4, 2, T, Q> const& m);
115 
116  template<typename T, qualifier Q>
117  GLM_FUNC_DECL mat<4, 2, T, Q> operator-(mat<4, 2, T, Q> const& m);
118 
119  // -- Binary operators --
120 
121  template<typename T, qualifier Q>
122  GLM_FUNC_DECL mat<4, 2, T, Q> operator+(mat<4, 2, T, Q> const& m, T scalar);
123 
124  template<typename T, qualifier Q>
125  GLM_FUNC_DECL mat<4, 2, T, Q> operator+(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
126 
127  template<typename T, qualifier Q>
128  GLM_FUNC_DECL mat<4, 2, T, Q> operator-(mat<4, 2, T, Q> const& m, T scalar);
129 
130  template<typename T, qualifier Q>
131  GLM_FUNC_DECL mat<4, 2, T, Q> operator-(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
132 
133  template<typename T, qualifier Q>
134  GLM_FUNC_DECL mat<4, 2, T, Q> operator*(mat<4, 2, T, Q> const& m, T scalar);
135 
136  template<typename T, qualifier Q>
137  GLM_FUNC_DECL mat<4, 2, T, Q> operator*(T scalar, mat<4, 2, T, Q> const& m);
138 
139  template<typename T, qualifier Q>
140  GLM_FUNC_DECL typename mat<4, 2, T, Q>::col_type operator*(mat<4, 2, T, Q> const& m, typename mat<4, 2, T, Q>::row_type const& v);
141 
142  template<typename T, qualifier Q>
143  GLM_FUNC_DECL typename mat<4, 2, T, Q>::row_type operator*(typename mat<4, 2, T, Q>::col_type const& v, mat<4, 2, T, Q> const& m);
144 
145  template<typename T, qualifier Q>
146  GLM_FUNC_DECL mat<2, 2, T, Q> operator*(mat<4, 2, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
147 
148  template<typename T, qualifier Q>
149  GLM_FUNC_DECL mat<3, 2, T, Q> operator*(mat<4, 2, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
150 
151  template<typename T, qualifier Q>
152  GLM_FUNC_DECL mat<4, 2, T, Q> operator*(mat<4, 2, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
153 
154  template<typename T, qualifier Q>
155  GLM_FUNC_DECL mat<4, 2, T, Q> operator/(mat<4, 2, T, Q> const& m, T scalar);
156 
157  template<typename T, qualifier Q>
158  GLM_FUNC_DECL mat<4, 2, T, Q> operator/(T scalar, mat<4, 2, T, Q> const& m);
159 
160  // -- Boolean operators --
161 
162  template<typename T, qualifier Q>
163  GLM_FUNC_DECL bool operator==(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
164 
165  template<typename T, qualifier Q>
166  GLM_FUNC_DECL bool operator!=(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
167 }//namespace glm
168 
169 #ifndef GLM_EXTERNAL_TEMPLATE
170 #include "type_mat4x2.inl"
171 #endif
Core features
+
Definition: common.hpp:20
+
GLM_FUNC_DECL T length(qua< T, Q > const &q)
Returns the norm of a quaternions.
+
Core features
+
+ + + + diff --git a/common/glm/doc/api/a00059.html b/common/glm/doc/api/a00059.html new file mode 100644 index 000000000..290a09454 --- /dev/null +++ b/common/glm/doc/api/a00059.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: type_mat4x3.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_mat4x3.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Core features

+ +

Definition in file type_mat4x3.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00059_source.html b/common/glm/doc/api/a00059_source.html new file mode 100644 index 000000000..adf9d8061 --- /dev/null +++ b/common/glm/doc/api/a00059_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: type_mat4x3.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_mat4x3.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include "type_vec3.hpp"
7 #include "type_vec4.hpp"
8 #include <limits>
9 #include <cstddef>
10 
11 namespace glm
12 {
13  template<typename T, qualifier Q>
14  struct mat<4, 3, T, Q>
15  {
16  typedef vec<3, T, Q> col_type;
17  typedef vec<4, T, Q> row_type;
18  typedef mat<4, 3, T, Q> type;
19  typedef mat<3, 4, T, Q> transpose_type;
20  typedef T value_type;
21 
22  private:
23  col_type value[4];
24 
25  public:
26  // -- Accesses --
27 
28  typedef length_t length_type;
29  GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 4; }
30 
31  GLM_FUNC_DECL col_type & operator[](length_type i);
32  GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const;
33 
34  // -- Constructors --
35 
36  GLM_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT;
37  template<qualifier P>
38  GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<4, 3, T, P> const& m);
39 
40  GLM_FUNC_DECL explicit GLM_CONSTEXPR mat(T const& x);
41  GLM_FUNC_DECL GLM_CONSTEXPR mat(
42  T const& x0, T const& y0, T const& z0,
43  T const& x1, T const& y1, T const& z1,
44  T const& x2, T const& y2, T const& z2,
45  T const& x3, T const& y3, T const& z3);
46  GLM_FUNC_DECL GLM_CONSTEXPR mat(
47  col_type const& v0,
48  col_type const& v1,
49  col_type const& v2,
50  col_type const& v3);
51 
52  // -- Conversions --
53 
54  template<
55  typename X1, typename Y1, typename Z1,
56  typename X2, typename Y2, typename Z2,
57  typename X3, typename Y3, typename Z3,
58  typename X4, typename Y4, typename Z4>
59  GLM_FUNC_DECL GLM_CONSTEXPR mat(
60  X1 const& x1, Y1 const& y1, Z1 const& z1,
61  X2 const& x2, Y2 const& y2, Z2 const& z2,
62  X3 const& x3, Y3 const& y3, Z3 const& z3,
63  X4 const& x4, Y4 const& y4, Z4 const& z4);
64 
65  template<typename V1, typename V2, typename V3, typename V4>
66  GLM_FUNC_DECL GLM_CONSTEXPR mat(
67  vec<3, V1, Q> const& v1,
68  vec<3, V2, Q> const& v2,
69  vec<3, V3, Q> const& v3,
70  vec<3, V4, Q> const& v4);
71 
72  // -- Matrix conversions --
73 
74  template<typename U, qualifier P>
75  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 3, U, P> const& m);
76 
77  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 2, T, Q> const& x);
78  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 3, T, Q> const& x);
79  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 4, T, Q> const& x);
80  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 3, T, Q> const& x);
81  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 2, T, Q> const& x);
82  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 4, T, Q> const& x);
83  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 2, T, Q> const& x);
84  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 4, T, Q> const& x);
85 
86  // -- Unary arithmetic operators --
87 
88  template<typename U>
89  GLM_FUNC_DECL mat<4, 3, T, Q> & operator=(mat<4, 3, U, Q> const& m);
90  template<typename U>
91  GLM_FUNC_DECL mat<4, 3, T, Q> & operator+=(U s);
92  template<typename U>
93  GLM_FUNC_DECL mat<4, 3, T, Q> & operator+=(mat<4, 3, U, Q> const& m);
94  template<typename U>
95  GLM_FUNC_DECL mat<4, 3, T, Q> & operator-=(U s);
96  template<typename U>
97  GLM_FUNC_DECL mat<4, 3, T, Q> & operator-=(mat<4, 3, U, Q> const& m);
98  template<typename U>
99  GLM_FUNC_DECL mat<4, 3, T, Q> & operator*=(U s);
100  template<typename U>
101  GLM_FUNC_DECL mat<4, 3, T, Q> & operator/=(U s);
102 
103  // -- Increment and decrement operators --
104 
105  GLM_FUNC_DECL mat<4, 3, T, Q>& operator++();
106  GLM_FUNC_DECL mat<4, 3, T, Q>& operator--();
107  GLM_FUNC_DECL mat<4, 3, T, Q> operator++(int);
108  GLM_FUNC_DECL mat<4, 3, T, Q> operator--(int);
109  };
110 
111  // -- Unary operators --
112 
113  template<typename T, qualifier Q>
114  GLM_FUNC_DECL mat<4, 3, T, Q> operator+(mat<4, 3, T, Q> const& m);
115 
116  template<typename T, qualifier Q>
117  GLM_FUNC_DECL mat<4, 3, T, Q> operator-(mat<4, 3, T, Q> const& m);
118 
119  // -- Binary operators --
120 
121  template<typename T, qualifier Q>
122  GLM_FUNC_DECL mat<4, 3, T, Q> operator+(mat<4, 3, T, Q> const& m, T const& s);
123 
124  template<typename T, qualifier Q>
125  GLM_FUNC_DECL mat<4, 3, T, Q> operator+(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
126 
127  template<typename T, qualifier Q>
128  GLM_FUNC_DECL mat<4, 3, T, Q> operator-(mat<4, 3, T, Q> const& m, T const& s);
129 
130  template<typename T, qualifier Q>
131  GLM_FUNC_DECL mat<4, 3, T, Q> operator-(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
132 
133  template<typename T, qualifier Q>
134  GLM_FUNC_DECL mat<4, 3, T, Q> operator*(mat<4, 3, T, Q> const& m, T const& s);
135 
136  template<typename T, qualifier Q>
137  GLM_FUNC_DECL mat<4, 3, T, Q> operator*(T const& s, mat<4, 3, T, Q> const& m);
138 
139  template<typename T, qualifier Q>
140  GLM_FUNC_DECL typename mat<4, 3, T, Q>::col_type operator*(mat<4, 3, T, Q> const& m, typename mat<4, 3, T, Q>::row_type const& v);
141 
142  template<typename T, qualifier Q>
143  GLM_FUNC_DECL typename mat<4, 3, T, Q>::row_type operator*(typename mat<4, 3, T, Q>::col_type const& v, mat<4, 3, T, Q> const& m);
144 
145  template<typename T, qualifier Q>
146  GLM_FUNC_DECL mat<2, 3, T, Q> operator*(mat<4, 3, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
147 
148  template<typename T, qualifier Q>
149  GLM_FUNC_DECL mat<3, 3, T, Q> operator*(mat<4, 3, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
150 
151  template<typename T, qualifier Q>
152  GLM_FUNC_DECL mat<4, 3, T, Q> operator*(mat<4, 3, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
153 
154  template<typename T, qualifier Q>
155  GLM_FUNC_DECL mat<4, 3, T, Q> operator/(mat<4, 3, T, Q> const& m, T const& s);
156 
157  template<typename T, qualifier Q>
158  GLM_FUNC_DECL mat<4, 3, T, Q> operator/(T const& s, mat<4, 3, T, Q> const& m);
159 
160  // -- Boolean operators --
161 
162  template<typename T, qualifier Q>
163  GLM_FUNC_DECL bool operator==(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
164 
165  template<typename T, qualifier Q>
166  GLM_FUNC_DECL bool operator!=(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
167 }//namespace glm
168 
169 #ifndef GLM_EXTERNAL_TEMPLATE
170 #include "type_mat4x3.inl"
171 #endif //GLM_EXTERNAL_TEMPLATE
Core features
+
Core features
+
Definition: common.hpp:20
+
GLM_FUNC_DECL T length(qua< T, Q > const &q)
Returns the norm of a quaternions.
+
+ + + + diff --git a/common/glm/doc/api/a00062.html b/common/glm/doc/api/a00062.html new file mode 100644 index 000000000..64c0c8711 --- /dev/null +++ b/common/glm/doc/api/a00062.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: type_mat4x4.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_mat4x4.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Core features

+ +

Definition in file type_mat4x4.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00062_source.html b/common/glm/doc/api/a00062_source.html new file mode 100644 index 000000000..747d4446d --- /dev/null +++ b/common/glm/doc/api/a00062_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: type_mat4x4.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_mat4x4.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include "type_vec4.hpp"
7 #include <limits>
8 #include <cstddef>
9 
10 namespace glm
11 {
12  template<typename T, qualifier Q>
13  struct mat<4, 4, T, Q>
14  {
15  typedef vec<4, T, Q> col_type;
16  typedef vec<4, T, Q> row_type;
17  typedef mat<4, 4, T, Q> type;
18  typedef mat<4, 4, T, Q> transpose_type;
19  typedef T value_type;
20 
21  private:
22  col_type value[4];
23 
24  public:
25  // -- Accesses --
26 
27  typedef length_t length_type;
28  GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 4;}
29 
30  GLM_FUNC_DECL col_type & operator[](length_type i);
31  GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const;
32 
33  // -- Constructors --
34 
35  GLM_FUNC_DECL GLM_CONSTEXPR mat() GLM_DEFAULT;
36  template<qualifier P>
37  GLM_FUNC_DECL GLM_CONSTEXPR mat(mat<4, 4, T, P> const& m);
38 
39  GLM_FUNC_DECL explicit GLM_CONSTEXPR mat(T const& x);
40  GLM_FUNC_DECL GLM_CONSTEXPR mat(
41  T const& x0, T const& y0, T const& z0, T const& w0,
42  T const& x1, T const& y1, T const& z1, T const& w1,
43  T const& x2, T const& y2, T const& z2, T const& w2,
44  T const& x3, T const& y3, T const& z3, T const& w3);
45  GLM_FUNC_DECL GLM_CONSTEXPR mat(
46  col_type const& v0,
47  col_type const& v1,
48  col_type const& v2,
49  col_type const& v3);
50 
51  // -- Conversions --
52 
53  template<
54  typename X1, typename Y1, typename Z1, typename W1,
55  typename X2, typename Y2, typename Z2, typename W2,
56  typename X3, typename Y3, typename Z3, typename W3,
57  typename X4, typename Y4, typename Z4, typename W4>
58  GLM_FUNC_DECL GLM_CONSTEXPR mat(
59  X1 const& x1, Y1 const& y1, Z1 const& z1, W1 const& w1,
60  X2 const& x2, Y2 const& y2, Z2 const& z2, W2 const& w2,
61  X3 const& x3, Y3 const& y3, Z3 const& z3, W3 const& w3,
62  X4 const& x4, Y4 const& y4, Z4 const& z4, W4 const& w4);
63 
64  template<typename V1, typename V2, typename V3, typename V4>
65  GLM_FUNC_DECL GLM_CONSTEXPR mat(
66  vec<4, V1, Q> const& v1,
67  vec<4, V2, Q> const& v2,
68  vec<4, V3, Q> const& v3,
69  vec<4, V4, Q> const& v4);
70 
71  // -- Matrix conversions --
72 
73  template<typename U, qualifier P>
74  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 4, U, P> const& m);
75 
76  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 2, T, Q> const& x);
77  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 3, T, Q> const& x);
78  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 3, T, Q> const& x);
79  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 2, T, Q> const& x);
80  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<2, 4, T, Q> const& x);
81  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 2, T, Q> const& x);
82  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<3, 4, T, Q> const& x);
83  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR mat(mat<4, 3, T, Q> const& x);
84 
85  // -- Unary arithmetic operators --
86 
87  template<typename U>
88  GLM_FUNC_DECL mat<4, 4, T, Q> & operator=(mat<4, 4, U, Q> const& m);
89  template<typename U>
90  GLM_FUNC_DECL mat<4, 4, T, Q> & operator+=(U s);
91  template<typename U>
92  GLM_FUNC_DECL mat<4, 4, T, Q> & operator+=(mat<4, 4, U, Q> const& m);
93  template<typename U>
94  GLM_FUNC_DECL mat<4, 4, T, Q> & operator-=(U s);
95  template<typename U>
96  GLM_FUNC_DECL mat<4, 4, T, Q> & operator-=(mat<4, 4, U, Q> const& m);
97  template<typename U>
98  GLM_FUNC_DECL mat<4, 4, T, Q> & operator*=(U s);
99  template<typename U>
100  GLM_FUNC_DECL mat<4, 4, T, Q> & operator*=(mat<4, 4, U, Q> const& m);
101  template<typename U>
102  GLM_FUNC_DECL mat<4, 4, T, Q> & operator/=(U s);
103  template<typename U>
104  GLM_FUNC_DECL mat<4, 4, T, Q> & operator/=(mat<4, 4, U, Q> const& m);
105 
106  // -- Increment and decrement operators --
107 
108  GLM_FUNC_DECL mat<4, 4, T, Q> & operator++();
109  GLM_FUNC_DECL mat<4, 4, T, Q> & operator--();
110  GLM_FUNC_DECL mat<4, 4, T, Q> operator++(int);
111  GLM_FUNC_DECL mat<4, 4, T, Q> operator--(int);
112  };
113 
114  // -- Unary operators --
115 
116  template<typename T, qualifier Q>
117  GLM_FUNC_DECL mat<4, 4, T, Q> operator+(mat<4, 4, T, Q> const& m);
118 
119  template<typename T, qualifier Q>
120  GLM_FUNC_DECL mat<4, 4, T, Q> operator-(mat<4, 4, T, Q> const& m);
121 
122  // -- Binary operators --
123 
124  template<typename T, qualifier Q>
125  GLM_FUNC_DECL mat<4, 4, T, Q> operator+(mat<4, 4, T, Q> const& m, T const& s);
126 
127  template<typename T, qualifier Q>
128  GLM_FUNC_DECL mat<4, 4, T, Q> operator+(T const& s, mat<4, 4, T, Q> const& m);
129 
130  template<typename T, qualifier Q>
131  GLM_FUNC_DECL mat<4, 4, T, Q> operator+(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
132 
133  template<typename T, qualifier Q>
134  GLM_FUNC_DECL mat<4, 4, T, Q> operator-(mat<4, 4, T, Q> const& m, T const& s);
135 
136  template<typename T, qualifier Q>
137  GLM_FUNC_DECL mat<4, 4, T, Q> operator-(T const& s, mat<4, 4, T, Q> const& m);
138 
139  template<typename T, qualifier Q>
140  GLM_FUNC_DECL mat<4, 4, T, Q> operator-(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
141 
142  template<typename T, qualifier Q>
143  GLM_FUNC_DECL mat<4, 4, T, Q> operator*(mat<4, 4, T, Q> const& m, T const& s);
144 
145  template<typename T, qualifier Q>
146  GLM_FUNC_DECL mat<4, 4, T, Q> operator*(T const& s, mat<4, 4, T, Q> const& m);
147 
148  template<typename T, qualifier Q>
149  GLM_FUNC_DECL typename mat<4, 4, T, Q>::col_type operator*(mat<4, 4, T, Q> const& m, typename mat<4, 4, T, Q>::row_type const& v);
150 
151  template<typename T, qualifier Q>
152  GLM_FUNC_DECL typename mat<4, 4, T, Q>::row_type operator*(typename mat<4, 4, T, Q>::col_type const& v, mat<4, 4, T, Q> const& m);
153 
154  template<typename T, qualifier Q>
155  GLM_FUNC_DECL mat<2, 4, T, Q> operator*(mat<4, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
156 
157  template<typename T, qualifier Q>
158  GLM_FUNC_DECL mat<3, 4, T, Q> operator*(mat<4, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
159 
160  template<typename T, qualifier Q>
161  GLM_FUNC_DECL mat<4, 4, T, Q> operator*(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
162 
163  template<typename T, qualifier Q>
164  GLM_FUNC_DECL mat<4, 4, T, Q> operator/(mat<4, 4, T, Q> const& m, T const& s);
165 
166  template<typename T, qualifier Q>
167  GLM_FUNC_DECL mat<4, 4, T, Q> operator/(T const& s, mat<4, 4, T, Q> const& m);
168 
169  template<typename T, qualifier Q>
170  GLM_FUNC_DECL typename mat<4, 4, T, Q>::col_type operator/(mat<4, 4, T, Q> const& m, typename mat<4, 4, T, Q>::row_type const& v);
171 
172  template<typename T, qualifier Q>
173  GLM_FUNC_DECL typename mat<4, 4, T, Q>::row_type operator/(typename mat<4, 4, T, Q>::col_type const& v, mat<4, 4, T, Q> const& m);
174 
175  template<typename T, qualifier Q>
176  GLM_FUNC_DECL mat<4, 4, T, Q> operator/(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
177 
178  // -- Boolean operators --
179 
180  template<typename T, qualifier Q>
181  GLM_FUNC_DECL bool operator==(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
182 
183  template<typename T, qualifier Q>
184  GLM_FUNC_DECL bool operator!=(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
185 }//namespace glm
186 
187 #ifndef GLM_EXTERNAL_TEMPLATE
188 #include "type_mat4x4.inl"
189 #endif//GLM_EXTERNAL_TEMPLATE
Core features
+
Definition: common.hpp:20
+
GLM_FUNC_DECL T length(qua< T, Q > const &q)
Returns the norm of a quaternions.
+
+ + + + diff --git a/common/glm/doc/api/a00065_source.html b/common/glm/doc/api/a00065_source.html new file mode 100644 index 000000000..5c8904406 --- /dev/null +++ b/common/glm/doc/api/a00065_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: type_quat.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_quat.hpp
+
+
+
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../detail/type_mat3x3.hpp"
18 #include "../detail/type_mat4x4.hpp"
19 #include "../detail/type_vec3.hpp"
20 #include "../detail/type_vec4.hpp"
21 #include "../ext/vector_relational.hpp"
22 #include "../ext/quaternion_relational.hpp"
23 #include "../gtc/constants.hpp"
24 #include "../gtc/matrix_transform.hpp"
25 
26 namespace glm
27 {
30 
31  template<typename T, qualifier Q>
32  struct qua
33  {
34  // -- Implementation detail --
35 
36  typedef qua<T, Q> type;
37  typedef T value_type;
38 
39  // -- Data --
40 
41 # if GLM_LANG & GLM_LANG_CXXMS_FLAG
42  union
43  {
44  struct { T x, y, z, w;};
45 
46  typename detail::storage<4, T, detail::is_aligned<Q>::value>::type data;
47  };
48 # else
49  T x, y, z, w;
50 # endif
51 
52  // -- Component accesses --
53 
54  typedef length_t length_type;
56  GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 4;}
57 
58  GLM_FUNC_DECL GLM_CONSTEXPR T & operator[](length_type i);
59  GLM_FUNC_DECL GLM_CONSTEXPR T const& operator[](length_type i) const;
60 
61  // -- Implicit basic constructors --
62 
63  GLM_FUNC_DECL GLM_CONSTEXPR qua() GLM_DEFAULT;
64  GLM_FUNC_DECL GLM_CONSTEXPR qua(qua<T, Q> const& q) GLM_DEFAULT;
65  template<qualifier P>
66  GLM_FUNC_DECL GLM_CONSTEXPR qua(qua<T, P> const& q);
67 
68  // -- Explicit basic constructors --
69 
70  GLM_FUNC_DECL GLM_CONSTEXPR qua(T s, vec<3, T, Q> const& v);
71  GLM_FUNC_DECL GLM_CONSTEXPR qua(T w, T x, T y, T z);
72 
73  // -- Conversion constructors --
74 
75  template<typename U, qualifier P>
76  GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT qua(qua<U, P> const& q);
77 
79 # if GLM_HAS_EXPLICIT_CONVERSION_OPERATORS
80  GLM_FUNC_DECL explicit operator mat<3, 3, T, Q>();
81  GLM_FUNC_DECL explicit operator mat<4, 4, T, Q>();
82 # endif
83 
90  GLM_FUNC_DECL qua(vec<3, T, Q> const& u, vec<3, T, Q> const& v);
91 
93  GLM_FUNC_DECL GLM_EXPLICIT qua(vec<3, T, Q> const& eulerAngles);
94  GLM_FUNC_DECL GLM_EXPLICIT qua(mat<3, 3, T, Q> const& q);
95  GLM_FUNC_DECL GLM_EXPLICIT qua(mat<4, 4, T, Q> const& q);
96 
97  // -- Unary arithmetic operators --
98 
99  GLM_FUNC_DECL qua<T, Q>& operator=(qua<T, Q> const& q) GLM_DEFAULT;
100 
101  template<typename U>
102  GLM_FUNC_DECL qua<T, Q>& operator=(qua<U, Q> const& q);
103  template<typename U>
104  GLM_FUNC_DECL qua<T, Q>& operator+=(qua<U, Q> const& q);
105  template<typename U>
106  GLM_FUNC_DECL qua<T, Q>& operator-=(qua<U, Q> const& q);
107  template<typename U>
108  GLM_FUNC_DECL qua<T, Q>& operator*=(qua<U, Q> const& q);
109  template<typename U>
110  GLM_FUNC_DECL qua<T, Q>& operator*=(U s);
111  template<typename U>
112  GLM_FUNC_DECL qua<T, Q>& operator/=(U s);
113  };
114 
115  // -- Unary bit operators --
116 
117  template<typename T, qualifier Q>
118  GLM_FUNC_DECL qua<T, Q> operator+(qua<T, Q> const& q);
119 
120  template<typename T, qualifier Q>
121  GLM_FUNC_DECL qua<T, Q> operator-(qua<T, Q> const& q);
122 
123  // -- Binary operators --
124 
125  template<typename T, qualifier Q>
126  GLM_FUNC_DECL qua<T, Q> operator+(qua<T, Q> const& q, qua<T, Q> const& p);
127 
128  template<typename T, qualifier Q>
129  GLM_FUNC_DECL qua<T, Q> operator-(qua<T, Q> const& q, qua<T, Q> const& p);
130 
131  template<typename T, qualifier Q>
132  GLM_FUNC_DECL qua<T, Q> operator*(qua<T, Q> const& q, qua<T, Q> const& p);
133 
134  template<typename T, qualifier Q>
135  GLM_FUNC_DECL vec<3, T, Q> operator*(qua<T, Q> const& q, vec<3, T, Q> const& v);
136 
137  template<typename T, qualifier Q>
138  GLM_FUNC_DECL vec<3, T, Q> operator*(vec<3, T, Q> const& v, qua<T, Q> const& q);
139 
140  template<typename T, qualifier Q>
141  GLM_FUNC_DECL vec<4, T, Q> operator*(qua<T, Q> const& q, vec<4, T, Q> const& v);
142 
143  template<typename T, qualifier Q>
144  GLM_FUNC_DECL vec<4, T, Q> operator*(vec<4, T, Q> const& v, qua<T, Q> const& q);
145 
146  template<typename T, qualifier Q>
147  GLM_FUNC_DECL qua<T, Q> operator*(qua<T, Q> const& q, T const& s);
148 
149  template<typename T, qualifier Q>
150  GLM_FUNC_DECL qua<T, Q> operator*(T const& s, qua<T, Q> const& q);
151 
152  template<typename T, qualifier Q>
153  GLM_FUNC_DECL qua<T, Q> operator/(qua<T, Q> const& q, T const& s);
154 
155  // -- Boolean operators --
156 
157  template<typename T, qualifier Q>
158  GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(qua<T, Q> const& q1, qua<T, Q> const& q2);
159 
160  template<typename T, qualifier Q>
161  GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(qua<T, Q> const& q1, qua<T, Q> const& q2);
162 
164 } //namespace glm
165 
166 #include "type_quat.inl"
GLM_FUNC_DECL vec< 3, T, Q > eulerAngles(qua< T, Q > const &x)
Returns euler angles, pitch as x, yaw as y, roll as z.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL T length(qua< T, Q > const &q)
Returns the norm of a quaternions.
+
+ + + + diff --git a/common/glm/doc/api/a00068.html b/common/glm/doc/api/a00068.html new file mode 100644 index 000000000..4f5264f03 --- /dev/null +++ b/common/glm/doc/api/a00068.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: type_vec1.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_vec1.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Core features

+ +

Definition in file type_vec1.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00068_source.html b/common/glm/doc/api/a00068_source.html new file mode 100644 index 000000000..cc2c1eb27 --- /dev/null +++ b/common/glm/doc/api/a00068_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: type_vec1.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_vec1.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include "qualifier.hpp"
7 #if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
8 # include "_swizzle.hpp"
9 #elif GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
10 # include "_swizzle_func.hpp"
11 #endif
12 #include <cstddef>
13 
14 namespace glm
15 {
16  template<typename T, qualifier Q>
17  struct vec<1, T, Q>
18  {
19  // -- Implementation detail --
20 
21  typedef T value_type;
22  typedef vec<1, T, Q> type;
23  typedef vec<1, bool, Q> bool_type;
24 
25  // -- Data --
26 
27 # if GLM_CONFIG_XYZW_ONLY
28  T x;
29 # elif GLM_CONFIG_ANONYMOUS_STRUCT == GLM_ENABLE
30  union
31  {
32  T x;
33  T r;
34  T s;
35 
36  typename detail::storage<1, T, detail::is_aligned<Q>::value>::type data;
37 /*
38 # if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
39  _GLM_SWIZZLE1_2_MEMBERS(T, Q, x)
40  _GLM_SWIZZLE1_2_MEMBERS(T, Q, r)
41  _GLM_SWIZZLE1_2_MEMBERS(T, Q, s)
42  _GLM_SWIZZLE1_3_MEMBERS(T, Q, x)
43  _GLM_SWIZZLE1_3_MEMBERS(T, Q, r)
44  _GLM_SWIZZLE1_3_MEMBERS(T, Q, s)
45  _GLM_SWIZZLE1_4_MEMBERS(T, Q, x)
46  _GLM_SWIZZLE1_4_MEMBERS(T, Q, r)
47  _GLM_SWIZZLE1_4_MEMBERS(T, Q, s)
48 # endif
49 */
50  };
51 # else
52  union {T x, r, s;};
53 /*
54 # if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
55  GLM_SWIZZLE_GEN_VEC_FROM_VEC1(T, Q)
56 # endif
57 */
58 # endif
59 
60  // -- Component accesses --
61 
63  typedef length_t length_type;
64  GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 1;}
65 
66  GLM_FUNC_DECL GLM_CONSTEXPR T & operator[](length_type i);
67  GLM_FUNC_DECL GLM_CONSTEXPR T const& operator[](length_type i) const;
68 
69  // -- Implicit basic constructors --
70 
71  GLM_FUNC_DECL GLM_CONSTEXPR vec() GLM_DEFAULT;
72  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec const& v) GLM_DEFAULT;
73  template<qualifier P>
74  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, T, P> const& v);
75 
76  // -- Explicit basic constructors --
77 
78  GLM_FUNC_DECL GLM_CONSTEXPR explicit vec(T scalar);
79 
80  // -- Conversion vector constructors --
81 
83  template<typename U, qualifier P>
84  GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<2, U, P> const& v);
86  template<typename U, qualifier P>
87  GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<3, U, P> const& v);
89  template<typename U, qualifier P>
90  GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<4, U, P> const& v);
91 
93  template<typename U, qualifier P>
94  GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<1, U, P> const& v);
95 
96  // -- Swizzle constructors --
97 /*
98 # if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
99  template<int E0>
100  GLM_FUNC_DECL GLM_CONSTEXPR vec(detail::_swizzle<1, T, Q, E0, -1,-2,-3> const& that)
101  {
102  *this = that();
103  }
104 # endif//GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
105 */
106  // -- Unary arithmetic operators --
107 
108  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> & operator=(vec const& v) GLM_DEFAULT;
109 
110  template<typename U>
111  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> & operator=(vec<1, U, Q> const& v);
112  template<typename U>
113  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> & operator+=(U scalar);
114  template<typename U>
115  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> & operator+=(vec<1, U, Q> const& v);
116  template<typename U>
117  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> & operator-=(U scalar);
118  template<typename U>
119  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> & operator-=(vec<1, U, Q> const& v);
120  template<typename U>
121  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> & operator*=(U scalar);
122  template<typename U>
123  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> & operator*=(vec<1, U, Q> const& v);
124  template<typename U>
125  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> & operator/=(U scalar);
126  template<typename U>
127  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> & operator/=(vec<1, U, Q> const& v);
128 
129  // -- Increment and decrement operators --
130 
131  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> & operator++();
132  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> & operator--();
133  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator++(int);
134  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator--(int);
135 
136  // -- Unary bit operators --
137 
138  template<typename U>
139  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> & operator%=(U scalar);
140  template<typename U>
141  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> & operator%=(vec<1, U, Q> const& v);
142  template<typename U>
143  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> & operator&=(U scalar);
144  template<typename U>
145  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> & operator&=(vec<1, U, Q> const& v);
146  template<typename U>
147  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> & operator|=(U scalar);
148  template<typename U>
149  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> & operator|=(vec<1, U, Q> const& v);
150  template<typename U>
151  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> & operator^=(U scalar);
152  template<typename U>
153  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> & operator^=(vec<1, U, Q> const& v);
154  template<typename U>
155  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> & operator<<=(U scalar);
156  template<typename U>
157  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> & operator<<=(vec<1, U, Q> const& v);
158  template<typename U>
159  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> & operator>>=(U scalar);
160  template<typename U>
161  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> & operator>>=(vec<1, U, Q> const& v);
162  };
163 
164  // -- Unary operators --
165 
166  template<typename T, qualifier Q>
167  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator+(vec<1, T, Q> const& v);
168 
169  template<typename T, qualifier Q>
170  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator-(vec<1, T, Q> const& v);
171 
172  // -- Binary operators --
173 
174  template<typename T, qualifier Q>
175  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator+(vec<1, T, Q> const& v, T scalar);
176 
177  template<typename T, qualifier Q>
178  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator+(T scalar, vec<1, T, Q> const& v);
179 
180  template<typename T, qualifier Q>
181  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator+(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2);
182 
183  template<typename T, qualifier Q>
184  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator-(vec<1, T, Q> const& v, T scalar);
185 
186  template<typename T, qualifier Q>
187  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator-(T scalar, vec<1, T, Q> const& v);
188 
189  template<typename T, qualifier Q>
190  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator-(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2);
191 
192  template<typename T, qualifier Q>
193  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator*(vec<1, T, Q> const& v, T scalar);
194 
195  template<typename T, qualifier Q>
196  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator*(T scalar, vec<1, T, Q> const& v);
197 
198  template<typename T, qualifier Q>
199  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator*(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2);
200 
201  template<typename T, qualifier Q>
202  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator/(vec<1, T, Q> const& v, T scalar);
203 
204  template<typename T, qualifier Q>
205  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator/(T scalar, vec<1, T, Q> const& v);
206 
207  template<typename T, qualifier Q>
208  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator/(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2);
209 
210  template<typename T, qualifier Q>
211  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator%(vec<1, T, Q> const& v, T scalar);
212 
213  template<typename T, qualifier Q>
214  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator%(T scalar, vec<1, T, Q> const& v);
215 
216  template<typename T, qualifier Q>
217  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator%(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2);
218 
219  template<typename T, qualifier Q>
220  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator&(vec<1, T, Q> const& v, T scalar);
221 
222  template<typename T, qualifier Q>
223  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator&(T scalar, vec<1, T, Q> const& v);
224 
225  template<typename T, qualifier Q>
226  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator&(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2);
227 
228  template<typename T, qualifier Q>
229  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator|(vec<1, T, Q> const& v, T scalar);
230 
231  template<typename T, qualifier Q>
232  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator|(T scalar, vec<1, T, Q> const& v);
233 
234  template<typename T, qualifier Q>
235  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator|(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2);
236 
237  template<typename T, qualifier Q>
238  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator^(vec<1, T, Q> const& v, T scalar);
239 
240  template<typename T, qualifier Q>
241  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator^(T scalar, vec<1, T, Q> const& v);
242 
243  template<typename T, qualifier Q>
244  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator^(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2);
245 
246  template<typename T, qualifier Q>
247  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator<<(vec<1, T, Q> const& v, T scalar);
248 
249  template<typename T, qualifier Q>
250  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator<<(T scalar, vec<1, T, Q> const& v);
251 
252  template<typename T, qualifier Q>
253  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator<<(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2);
254 
255  template<typename T, qualifier Q>
256  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator>>(vec<1, T, Q> const& v, T scalar);
257 
258  template<typename T, qualifier Q>
259  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator>>(T scalar, vec<1, T, Q> const& v);
260 
261  template<typename T, qualifier Q>
262  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator>>(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2);
263 
264  template<typename T, qualifier Q>
265  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, T, Q> operator~(vec<1, T, Q> const& v);
266 
267  // -- Boolean operators --
268 
269  template<typename T, qualifier Q>
270  GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2);
271 
272  template<typename T, qualifier Q>
273  GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2);
274 
275  template<qualifier Q>
276  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, bool, Q> operator&&(vec<1, bool, Q> const& v1, vec<1, bool, Q> const& v2);
277 
278  template<qualifier Q>
279  GLM_FUNC_DECL GLM_CONSTEXPR vec<1, bool, Q> operator||(vec<1, bool, Q> const& v1, vec<1, bool, Q> const& v2);
280 }//namespace glm
281 
282 #ifndef GLM_EXTERNAL_TEMPLATE
283 #include "type_vec1.inl"
284 #endif//GLM_EXTERNAL_TEMPLATE
Definition: common.hpp:20
+
GLM_FUNC_DECL T length(qua< T, Q > const &q)
Returns the norm of a quaternions.
+
+ + + + diff --git a/common/glm/doc/api/a00071.html b/common/glm/doc/api/a00071.html new file mode 100644 index 000000000..89f02952d --- /dev/null +++ b/common/glm/doc/api/a00071.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: type_vec2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_vec2.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Core features

+ +

Definition in file type_vec2.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00071_source.html b/common/glm/doc/api/a00071_source.html new file mode 100644 index 000000000..9742d963d --- /dev/null +++ b/common/glm/doc/api/a00071_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: type_vec2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_vec2.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include "qualifier.hpp"
7 #if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
8 # include "_swizzle.hpp"
9 #elif GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
10 # include "_swizzle_func.hpp"
11 #endif
12 #include <cstddef>
13 
14 namespace glm
15 {
16  template<typename T, qualifier Q>
17  struct vec<2, T, Q>
18  {
19  // -- Implementation detail --
20 
21  typedef T value_type;
22  typedef vec<2, T, Q> type;
23  typedef vec<2, bool, Q> bool_type;
24 
25  // -- Data --
26 
27 # if GLM_CONFIG_XYZW_ONLY
28  T x, y;
29 # elif GLM_CONFIG_ANONYMOUS_STRUCT == GLM_ENABLE
30  union
31  {
32  struct{ T x, y; };
33  struct{ T r, g; };
34  struct{ T s, t; };
35 
36  typename detail::storage<2, T, detail::is_aligned<Q>::value>::type data;
37 
38 # if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
39  GLM_SWIZZLE2_2_MEMBERS(T, Q, x, y)
40  GLM_SWIZZLE2_2_MEMBERS(T, Q, r, g)
41  GLM_SWIZZLE2_2_MEMBERS(T, Q, s, t)
42  GLM_SWIZZLE2_3_MEMBERS(T, Q, x, y)
43  GLM_SWIZZLE2_3_MEMBERS(T, Q, r, g)
44  GLM_SWIZZLE2_3_MEMBERS(T, Q, s, t)
45  GLM_SWIZZLE2_4_MEMBERS(T, Q, x, y)
46  GLM_SWIZZLE2_4_MEMBERS(T, Q, r, g)
47  GLM_SWIZZLE2_4_MEMBERS(T, Q, s, t)
48 # endif
49  };
50 # else
51  union {T x, r, s;};
52  union {T y, g, t;};
53 
54 # if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
55  GLM_SWIZZLE_GEN_VEC_FROM_VEC2(T, Q)
56 # endif//GLM_CONFIG_SWIZZLE
57 # endif
58 
59  // -- Component accesses --
60 
62  typedef length_t length_type;
63  GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 2;}
64 
65  GLM_FUNC_DECL GLM_CONSTEXPR T& operator[](length_type i);
66  GLM_FUNC_DECL GLM_CONSTEXPR T const& operator[](length_type i) const;
67 
68  // -- Implicit basic constructors --
69 
70  GLM_FUNC_DECL GLM_CONSTEXPR vec() GLM_DEFAULT;
71  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec const& v) GLM_DEFAULT;
72  template<qualifier P>
73  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, T, P> const& v);
74 
75  // -- Explicit basic constructors --
76 
77  GLM_FUNC_DECL GLM_CONSTEXPR explicit vec(T scalar);
78  GLM_FUNC_DECL GLM_CONSTEXPR vec(T x, T y);
79 
80  // -- Conversion constructors --
81 
82  template<typename U, qualifier P>
83  GLM_FUNC_DECL GLM_CONSTEXPR explicit vec(vec<1, U, P> const& v);
84 
86  template<typename A, typename B>
87  GLM_FUNC_DECL GLM_CONSTEXPR vec(A x, B y);
88  template<typename A, typename B>
89  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, Q> const& x, B y);
90  template<typename A, typename B>
91  GLM_FUNC_DECL GLM_CONSTEXPR vec(A x, vec<1, B, Q> const& y);
92  template<typename A, typename B>
93  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, Q> const& x, vec<1, B, Q> const& y);
94 
95  // -- Conversion vector constructors --
96 
98  template<typename U, qualifier P>
99  GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<3, U, P> const& v);
101  template<typename U, qualifier P>
102  GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<4, U, P> const& v);
103 
105  template<typename U, qualifier P>
106  GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<2, U, P> const& v);
107 
108  // -- Swizzle constructors --
109 # if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
110  template<int E0, int E1>
111  GLM_FUNC_DECL GLM_CONSTEXPR vec(detail::_swizzle<2, T, Q, E0, E1,-1,-2> const& that)
112  {
113  *this = that();
114  }
115 # endif//GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
116 
117  // -- Unary arithmetic operators --
118 
119  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator=(vec const& v) GLM_DEFAULT;
120 
121  template<typename U>
122  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator=(vec<2, U, Q> const& v);
123  template<typename U>
124  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator+=(U scalar);
125  template<typename U>
126  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator+=(vec<1, U, Q> const& v);
127  template<typename U>
128  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator+=(vec<2, U, Q> const& v);
129  template<typename U>
130  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator-=(U scalar);
131  template<typename U>
132  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator-=(vec<1, U, Q> const& v);
133  template<typename U>
134  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator-=(vec<2, U, Q> const& v);
135  template<typename U>
136  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator*=(U scalar);
137  template<typename U>
138  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator*=(vec<1, U, Q> const& v);
139  template<typename U>
140  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator*=(vec<2, U, Q> const& v);
141  template<typename U>
142  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator/=(U scalar);
143  template<typename U>
144  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator/=(vec<1, U, Q> const& v);
145  template<typename U>
146  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator/=(vec<2, U, Q> const& v);
147 
148  // -- Increment and decrement operators --
149 
150  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator++();
151  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator--();
152  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator++(int);
153  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator--(int);
154 
155  // -- Unary bit operators --
156 
157  template<typename U>
158  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator%=(U scalar);
159  template<typename U>
160  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator%=(vec<1, U, Q> const& v);
161  template<typename U>
162  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator%=(vec<2, U, Q> const& v);
163  template<typename U>
164  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator&=(U scalar);
165  template<typename U>
166  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator&=(vec<1, U, Q> const& v);
167  template<typename U>
168  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator&=(vec<2, U, Q> const& v);
169  template<typename U>
170  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator|=(U scalar);
171  template<typename U>
172  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator|=(vec<1, U, Q> const& v);
173  template<typename U>
174  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator|=(vec<2, U, Q> const& v);
175  template<typename U>
176  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator^=(U scalar);
177  template<typename U>
178  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator^=(vec<1, U, Q> const& v);
179  template<typename U>
180  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator^=(vec<2, U, Q> const& v);
181  template<typename U>
182  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator<<=(U scalar);
183  template<typename U>
184  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator<<=(vec<1, U, Q> const& v);
185  template<typename U>
186  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator<<=(vec<2, U, Q> const& v);
187  template<typename U>
188  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator>>=(U scalar);
189  template<typename U>
190  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator>>=(vec<1, U, Q> const& v);
191  template<typename U>
192  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> & operator>>=(vec<2, U, Q> const& v);
193  };
194 
195  // -- Unary operators --
196 
197  template<typename T, qualifier Q>
198  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator+(vec<2, T, Q> const& v);
199 
200  template<typename T, qualifier Q>
201  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator-(vec<2, T, Q> const& v);
202 
203  // -- Binary operators --
204 
205  template<typename T, qualifier Q>
206  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator+(vec<2, T, Q> const& v, T scalar);
207 
208  template<typename T, qualifier Q>
209  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator+(vec<2, T, Q> const& v1, vec<1, T, Q> const& v2);
210 
211  template<typename T, qualifier Q>
212  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator+(T scalar, vec<2, T, Q> const& v);
213 
214  template<typename T, qualifier Q>
215  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator+(vec<1, T, Q> const& v1, vec<2, T, Q> const& v2);
216 
217  template<typename T, qualifier Q>
218  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator+(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
219 
220  template<typename T, qualifier Q>
221  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator-(vec<2, T, Q> const& v, T scalar);
222 
223  template<typename T, qualifier Q>
224  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator-(vec<2, T, Q> const& v1, vec<1, T, Q> const& v2);
225 
226  template<typename T, qualifier Q>
227  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator-(T scalar, vec<2, T, Q> const& v);
228 
229  template<typename T, qualifier Q>
230  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator-(vec<1, T, Q> const& v1, vec<2, T, Q> const& v2);
231 
232  template<typename T, qualifier Q>
233  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator-(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
234 
235  template<typename T, qualifier Q>
236  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator*(vec<2, T, Q> const& v, T scalar);
237 
238  template<typename T, qualifier Q>
239  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator*(vec<2, T, Q> const& v1, vec<1, T, Q> const& v2);
240 
241  template<typename T, qualifier Q>
242  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator*(T scalar, vec<2, T, Q> const& v);
243 
244  template<typename T, qualifier Q>
245  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator*(vec<1, T, Q> const& v1, vec<2, T, Q> const& v2);
246 
247  template<typename T, qualifier Q>
248  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator*(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
249 
250  template<typename T, qualifier Q>
251  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator/(vec<2, T, Q> const& v, T scalar);
252 
253  template<typename T, qualifier Q>
254  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator/(vec<2, T, Q> const& v1, vec<1, T, Q> const& v2);
255 
256  template<typename T, qualifier Q>
257  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator/(T scalar, vec<2, T, Q> const& v);
258 
259  template<typename T, qualifier Q>
260  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator/(vec<1, T, Q> const& v1, vec<2, T, Q> const& v2);
261 
262  template<typename T, qualifier Q>
263  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator/(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
264 
265  template<typename T, qualifier Q>
266  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator%(vec<2, T, Q> const& v, T scalar);
267 
268  template<typename T, qualifier Q>
269  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator%(vec<2, T, Q> const& v1, vec<1, T, Q> const& v2);
270 
271  template<typename T, qualifier Q>
272  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator%(T scalar, vec<2, T, Q> const& v);
273 
274  template<typename T, qualifier Q>
275  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator%(vec<1, T, Q> const& v1, vec<2, T, Q> const& v2);
276 
277  template<typename T, qualifier Q>
278  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator%(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
279 
280  template<typename T, qualifier Q>
281  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator&(vec<2, T, Q> const& v, T scalar);
282 
283  template<typename T, qualifier Q>
284  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator&(vec<2, T, Q> const& v1, vec<1, T, Q> const& v2);
285 
286  template<typename T, qualifier Q>
287  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator&(T scalar, vec<2, T, Q> const& v);
288 
289  template<typename T, qualifier Q>
290  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator&(vec<1, T, Q> const& v1, vec<2, T, Q> const& v2);
291 
292  template<typename T, qualifier Q>
293  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator&(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
294 
295  template<typename T, qualifier Q>
296  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator|(vec<2, T, Q> const& v, T scalar);
297 
298  template<typename T, qualifier Q>
299  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator|(vec<2, T, Q> const& v1, vec<1, T, Q> const& v2);
300 
301  template<typename T, qualifier Q>
302  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator|(T scalar, vec<2, T, Q> const& v);
303 
304  template<typename T, qualifier Q>
305  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator|(vec<1, T, Q> const& v1, vec<2, T, Q> const& v2);
306 
307  template<typename T, qualifier Q>
308  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator|(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
309 
310  template<typename T, qualifier Q>
311  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator^(vec<2, T, Q> const& v, T scalar);
312 
313  template<typename T, qualifier Q>
314  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator^(vec<2, T, Q> const& v1, vec<1, T, Q> const& v2);
315 
316  template<typename T, qualifier Q>
317  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator^(T scalar, vec<2, T, Q> const& v);
318 
319  template<typename T, qualifier Q>
320  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator^(vec<1, T, Q> const& v1, vec<2, T, Q> const& v2);
321 
322  template<typename T, qualifier Q>
323  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator^(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
324 
325  template<typename T, qualifier Q>
326  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator<<(vec<2, T, Q> const& v, T scalar);
327 
328  template<typename T, qualifier Q>
329  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator<<(vec<2, T, Q> const& v1, vec<1, T, Q> const& v2);
330 
331  template<typename T, qualifier Q>
332  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator<<(T scalar, vec<2, T, Q> const& v);
333 
334  template<typename T, qualifier Q>
335  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator<<(vec<1, T, Q> const& v1, vec<2, T, Q> const& v2);
336 
337  template<typename T, qualifier Q>
338  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator<<(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
339 
340  template<typename T, qualifier Q>
341  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator>>(vec<2, T, Q> const& v, T scalar);
342 
343  template<typename T, qualifier Q>
344  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator>>(vec<2, T, Q> const& v1, vec<1, T, Q> const& v2);
345 
346  template<typename T, qualifier Q>
347  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator>>(T scalar, vec<2, T, Q> const& v);
348 
349  template<typename T, qualifier Q>
350  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator>>(vec<1, T, Q> const& v1, vec<2, T, Q> const& v2);
351 
352  template<typename T, qualifier Q>
353  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator>>(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
354 
355  template<typename T, qualifier Q>
356  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, T, Q> operator~(vec<2, T, Q> const& v);
357 
358  // -- Boolean operators --
359 
360  template<typename T, qualifier Q>
361  GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
362 
363  template<typename T, qualifier Q>
364  GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2);
365 
366  template<qualifier Q>
367  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, bool, Q> operator&&(vec<2, bool, Q> const& v1, vec<2, bool, Q> const& v2);
368 
369  template<qualifier Q>
370  GLM_FUNC_DECL GLM_CONSTEXPR vec<2, bool, Q> operator||(vec<2, bool, Q> const& v1, vec<2, bool, Q> const& v2);
371 }//namespace glm
372 
373 #ifndef GLM_EXTERNAL_TEMPLATE
374 #include "type_vec2.inl"
375 #endif//GLM_EXTERNAL_TEMPLATE
Definition: common.hpp:20
+
GLM_FUNC_DECL T length(qua< T, Q > const &q)
Returns the norm of a quaternions.
+
+ + + + diff --git a/common/glm/doc/api/a00074.html b/common/glm/doc/api/a00074.html new file mode 100644 index 000000000..e0f57b5f7 --- /dev/null +++ b/common/glm/doc/api/a00074.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: type_vec3.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_vec3.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Core features

+ +

Definition in file type_vec3.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00074_source.html b/common/glm/doc/api/a00074_source.html new file mode 100644 index 000000000..3d30d76c0 --- /dev/null +++ b/common/glm/doc/api/a00074_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: type_vec3.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_vec3.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include "qualifier.hpp"
7 #if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
8 # include "_swizzle.hpp"
9 #elif GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
10 # include "_swizzle_func.hpp"
11 #endif
12 #include <cstddef>
13 
14 namespace glm
15 {
16  template<typename T, qualifier Q>
17  struct vec<3, T, Q>
18  {
19  // -- Implementation detail --
20 
21  typedef T value_type;
22  typedef vec<3, T, Q> type;
23  typedef vec<3, bool, Q> bool_type;
24 
25  // -- Data --
26 
27 # if GLM_CONFIG_XYZW_ONLY
28  T x, y, z;
29 # elif GLM_CONFIG_ANONYMOUS_STRUCT == GLM_ENABLE
30  union
31  {
32  struct{ T x, y, z; };
33  struct{ T r, g, b; };
34  struct{ T s, t, p; };
35 
36  typename detail::storage<3, T, detail::is_aligned<Q>::value>::type data;
37 
38 # if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
39  GLM_SWIZZLE3_2_MEMBERS(T, Q, x, y, z)
40  GLM_SWIZZLE3_2_MEMBERS(T, Q, r, g, b)
41  GLM_SWIZZLE3_2_MEMBERS(T, Q, s, t, p)
42  GLM_SWIZZLE3_3_MEMBERS(T, Q, x, y, z)
43  GLM_SWIZZLE3_3_MEMBERS(T, Q, r, g, b)
44  GLM_SWIZZLE3_3_MEMBERS(T, Q, s, t, p)
45  GLM_SWIZZLE3_4_MEMBERS(T, Q, x, y, z)
46  GLM_SWIZZLE3_4_MEMBERS(T, Q, r, g, b)
47  GLM_SWIZZLE3_4_MEMBERS(T, Q, s, t, p)
48 # endif
49  };
50 # else
51  union { T x, r, s; };
52  union { T y, g, t; };
53  union { T z, b, p; };
54 
55 # if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
56  GLM_SWIZZLE_GEN_VEC_FROM_VEC3(T, Q)
57 # endif//GLM_CONFIG_SWIZZLE
58 # endif//GLM_LANG
59 
60  // -- Component accesses --
61 
63  typedef length_t length_type;
64  GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 3;}
65 
66  GLM_FUNC_DECL GLM_CONSTEXPR T & operator[](length_type i);
67  GLM_FUNC_DECL GLM_CONSTEXPR T const& operator[](length_type i) const;
68 
69  // -- Implicit basic constructors --
70 
71  GLM_FUNC_DECL GLM_CONSTEXPR vec() GLM_DEFAULT;
72  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec const& v) GLM_DEFAULT;
73  template<qualifier P>
74  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<3, T, P> const& v);
75 
76  // -- Explicit basic constructors --
77 
78  GLM_FUNC_DECL GLM_CONSTEXPR explicit vec(T scalar);
79  GLM_FUNC_DECL GLM_CONSTEXPR vec(T a, T b, T c);
80 
81  // -- Conversion scalar constructors --
82 
83  template<typename U, qualifier P>
84  GLM_FUNC_DECL GLM_CONSTEXPR explicit vec(vec<1, U, P> const& v);
85 
87  template<typename X, typename Y, typename Z>
88  GLM_FUNC_DECL GLM_CONSTEXPR vec(X x, Y y, Z z);
89  template<typename X, typename Y, typename Z>
90  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, Y _y, Z _z);
91  template<typename X, typename Y, typename Z>
92  GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, vec<1, Y, Q> const& _y, Z _z);
93  template<typename X, typename Y, typename Z>
94  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, Z _z);
95  template<typename X, typename Y, typename Z>
96  GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, Y _y, vec<1, Z, Q> const& _z);
97  template<typename X, typename Y, typename Z>
98  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, Y _y, vec<1, Z, Q> const& _z);
99  template<typename X, typename Y, typename Z>
100  GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z);
101  template<typename X, typename Y, typename Z>
102  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z);
103 
104  // -- Conversion vector constructors --
105 
107  template<typename A, typename B, qualifier P>
108  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, P> const& _xy, B _z);
110  template<typename A, typename B, qualifier P>
111  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, P> const& _xy, vec<1, B, P> const& _z);
113  template<typename A, typename B, qualifier P>
114  GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, vec<2, B, P> const& _yz);
116  template<typename A, typename B, qualifier P>
117  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const& _x, vec<2, B, P> const& _yz);
119  template<typename U, qualifier P>
120  GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<4, U, P> const& v);
121 
123  template<typename U, qualifier P>
124  GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<3, U, P> const& v);
125 
126  // -- Swizzle constructors --
127 # if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
128  template<int E0, int E1, int E2>
129  GLM_FUNC_DECL GLM_CONSTEXPR vec(detail::_swizzle<3, T, Q, E0, E1, E2, -1> const& that)
130  {
131  *this = that();
132  }
133 
134  template<int E0, int E1>
135  GLM_FUNC_DECL GLM_CONSTEXPR vec(detail::_swizzle<2, T, Q, E0, E1, -1, -2> const& v, T const& scalar)
136  {
137  *this = vec(v(), scalar);
138  }
139 
140  template<int E0, int E1>
141  GLM_FUNC_DECL GLM_CONSTEXPR vec(T const& scalar, detail::_swizzle<2, T, Q, E0, E1, -1, -2> const& v)
142  {
143  *this = vec(scalar, v());
144  }
145 # endif//GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
146 
147  // -- Unary arithmetic operators --
148 
149  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q>& operator=(vec<3, T, Q> const& v) GLM_DEFAULT;
150 
151  template<typename U>
152  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator=(vec<3, U, Q> const& v);
153  template<typename U>
154  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator+=(U scalar);
155  template<typename U>
156  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator+=(vec<1, U, Q> const& v);
157  template<typename U>
158  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator+=(vec<3, U, Q> const& v);
159  template<typename U>
160  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator-=(U scalar);
161  template<typename U>
162  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator-=(vec<1, U, Q> const& v);
163  template<typename U>
164  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator-=(vec<3, U, Q> const& v);
165  template<typename U>
166  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator*=(U scalar);
167  template<typename U>
168  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator*=(vec<1, U, Q> const& v);
169  template<typename U>
170  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator*=(vec<3, U, Q> const& v);
171  template<typename U>
172  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator/=(U scalar);
173  template<typename U>
174  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator/=(vec<1, U, Q> const& v);
175  template<typename U>
176  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator/=(vec<3, U, Q> const& v);
177 
178  // -- Increment and decrement operators --
179 
180  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator++();
181  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator--();
182  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator++(int);
183  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator--(int);
184 
185  // -- Unary bit operators --
186 
187  template<typename U>
188  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator%=(U scalar);
189  template<typename U>
190  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator%=(vec<1, U, Q> const& v);
191  template<typename U>
192  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator%=(vec<3, U, Q> const& v);
193  template<typename U>
194  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator&=(U scalar);
195  template<typename U>
196  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator&=(vec<1, U, Q> const& v);
197  template<typename U>
198  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator&=(vec<3, U, Q> const& v);
199  template<typename U>
200  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator|=(U scalar);
201  template<typename U>
202  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator|=(vec<1, U, Q> const& v);
203  template<typename U>
204  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator|=(vec<3, U, Q> const& v);
205  template<typename U>
206  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator^=(U scalar);
207  template<typename U>
208  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator^=(vec<1, U, Q> const& v);
209  template<typename U>
210  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator^=(vec<3, U, Q> const& v);
211  template<typename U>
212  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator<<=(U scalar);
213  template<typename U>
214  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator<<=(vec<1, U, Q> const& v);
215  template<typename U>
216  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator<<=(vec<3, U, Q> const& v);
217  template<typename U>
218  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator>>=(U scalar);
219  template<typename U>
220  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator>>=(vec<1, U, Q> const& v);
221  template<typename U>
222  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> & operator>>=(vec<3, U, Q> const& v);
223  };
224 
225  // -- Unary operators --
226 
227  template<typename T, qualifier Q>
228  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator+(vec<3, T, Q> const& v);
229 
230  template<typename T, qualifier Q>
231  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator-(vec<3, T, Q> const& v);
232 
233  // -- Binary operators --
234 
235  template<typename T, qualifier Q>
236  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator+(vec<3, T, Q> const& v, T scalar);
237 
238  template<typename T, qualifier Q>
239  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator+(vec<3, T, Q> const& v, vec<1, T, Q> const& scalar);
240 
241  template<typename T, qualifier Q>
242  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator+(T scalar, vec<3, T, Q> const& v);
243 
244  template<typename T, qualifier Q>
245  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator+(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
246 
247  template<typename T, qualifier Q>
248  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator+(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
249 
250  template<typename T, qualifier Q>
251  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator-(vec<3, T, Q> const& v, T scalar);
252 
253  template<typename T, qualifier Q>
254  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator-(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2);
255 
256  template<typename T, qualifier Q>
257  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator-(T scalar, vec<3, T, Q> const& v);
258 
259  template<typename T, qualifier Q>
260  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator-(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
261 
262  template<typename T, qualifier Q>
263  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator-(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
264 
265  template<typename T, qualifier Q>
266  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator*(vec<3, T, Q> const& v, T scalar);
267 
268  template<typename T, qualifier Q>
269  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator*(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2);
270 
271  template<typename T, qualifier Q>
272  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator*(T scalar, vec<3, T, Q> const& v);
273 
274  template<typename T, qualifier Q>
275  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator*(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
276 
277  template<typename T, qualifier Q>
278  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator*(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
279 
280  template<typename T, qualifier Q>
281  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator/(vec<3, T, Q> const& v, T scalar);
282 
283  template<typename T, qualifier Q>
284  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator/(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2);
285 
286  template<typename T, qualifier Q>
287  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator/(T scalar, vec<3, T, Q> const& v);
288 
289  template<typename T, qualifier Q>
290  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator/(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
291 
292  template<typename T, qualifier Q>
293  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator/(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
294 
295  template<typename T, qualifier Q>
296  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator%(vec<3, T, Q> const& v, T scalar);
297 
298  template<typename T, qualifier Q>
299  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator%(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2);
300 
301  template<typename T, qualifier Q>
302  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator%(T scalar, vec<3, T, Q> const& v);
303 
304  template<typename T, qualifier Q>
305  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator%(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
306 
307  template<typename T, qualifier Q>
308  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator%(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
309 
310  template<typename T, qualifier Q>
311  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator&(vec<3, T, Q> const& v1, T scalar);
312 
313  template<typename T, qualifier Q>
314  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator&(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2);
315 
316  template<typename T, qualifier Q>
317  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator&(T scalar, vec<3, T, Q> const& v);
318 
319  template<typename T, qualifier Q>
320  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator&(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
321 
322  template<typename T, qualifier Q>
323  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator&(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
324 
325  template<typename T, qualifier Q>
326  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator|(vec<3, T, Q> const& v, T scalar);
327 
328  template<typename T, qualifier Q>
329  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator|(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2);
330 
331  template<typename T, qualifier Q>
332  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator|(T scalar, vec<3, T, Q> const& v);
333 
334  template<typename T, qualifier Q>
335  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator|(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
336 
337  template<typename T, qualifier Q>
338  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator|(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
339 
340  template<typename T, qualifier Q>
341  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator^(vec<3, T, Q> const& v, T scalar);
342 
343  template<typename T, qualifier Q>
344  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator^(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2);
345 
346  template<typename T, qualifier Q>
347  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator^(T scalar, vec<3, T, Q> const& v);
348 
349  template<typename T, qualifier Q>
350  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator^(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
351 
352  template<typename T, qualifier Q>
353  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator^(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
354 
355  template<typename T, qualifier Q>
356  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator<<(vec<3, T, Q> const& v, T scalar);
357 
358  template<typename T, qualifier Q>
359  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator<<(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2);
360 
361  template<typename T, qualifier Q>
362  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator<<(T scalar, vec<3, T, Q> const& v);
363 
364  template<typename T, qualifier Q>
365  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator<<(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
366 
367  template<typename T, qualifier Q>
368  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator<<(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
369 
370  template<typename T, qualifier Q>
371  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator>>(vec<3, T, Q> const& v, T scalar);
372 
373  template<typename T, qualifier Q>
374  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator>>(vec<3, T, Q> const& v1, vec<1, T, Q> const& v2);
375 
376  template<typename T, qualifier Q>
377  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator>>(T scalar, vec<3, T, Q> const& v);
378 
379  template<typename T, qualifier Q>
380  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator>>(vec<1, T, Q> const& v1, vec<3, T, Q> const& v2);
381 
382  template<typename T, qualifier Q>
383  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator>>(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
384 
385  template<typename T, qualifier Q>
386  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, T, Q> operator~(vec<3, T, Q> const& v);
387 
388  // -- Boolean operators --
389 
390  template<typename T, qualifier Q>
391  GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
392 
393  template<typename T, qualifier Q>
394  GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
395 
396  template<qualifier Q>
397  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, bool, Q> operator&&(vec<3, bool, Q> const& v1, vec<3, bool, Q> const& v2);
398 
399  template<qualifier Q>
400  GLM_FUNC_DECL GLM_CONSTEXPR vec<3, bool, Q> operator||(vec<3, bool, Q> const& v1, vec<3, bool, Q> const& v2);
401 }//namespace glm
402 
403 #ifndef GLM_EXTERNAL_TEMPLATE
404 #include "type_vec3.inl"
405 #endif//GLM_EXTERNAL_TEMPLATE
Definition: common.hpp:20
+
GLM_FUNC_DECL T length(qua< T, Q > const &q)
Returns the norm of a quaternions.
+
+ + + + diff --git a/common/glm/doc/api/a00077.html b/common/glm/doc/api/a00077.html new file mode 100644 index 000000000..9cdc0cce3 --- /dev/null +++ b/common/glm/doc/api/a00077.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: type_vec4.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_vec4.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Core features

+ +

Definition in file type_vec4.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00077_source.html b/common/glm/doc/api/a00077_source.html new file mode 100644 index 000000000..95ba22dbd --- /dev/null +++ b/common/glm/doc/api/a00077_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: type_vec4.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_vec4.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include "qualifier.hpp"
7 #if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
8 # include "_swizzle.hpp"
9 #elif GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
10 # include "_swizzle_func.hpp"
11 #endif
12 #include <cstddef>
13 
14 namespace glm
15 {
16  template<typename T, qualifier Q>
17  struct vec<4, T, Q>
18  {
19  // -- Implementation detail --
20 
21  typedef T value_type;
22  typedef vec<4, T, Q> type;
23  typedef vec<4, bool, Q> bool_type;
24 
25  // -- Data --
26 
27 # if GLM_CONFIG_XYZW_ONLY
28  T x, y, z, w;
29 # elif GLM_CONFIG_ANONYMOUS_STRUCT == GLM_ENABLE
30  union
31  {
32  struct { T x, y, z, w; };
33  struct { T r, g, b, a; };
34  struct { T s, t, p, q; };
35 
36  typename detail::storage<4, T, detail::is_aligned<Q>::value>::type data;
37 
38 # if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
39  GLM_SWIZZLE4_2_MEMBERS(T, Q, x, y, z, w)
40  GLM_SWIZZLE4_2_MEMBERS(T, Q, r, g, b, a)
41  GLM_SWIZZLE4_2_MEMBERS(T, Q, s, t, p, q)
42  GLM_SWIZZLE4_3_MEMBERS(T, Q, x, y, z, w)
43  GLM_SWIZZLE4_3_MEMBERS(T, Q, r, g, b, a)
44  GLM_SWIZZLE4_3_MEMBERS(T, Q, s, t, p, q)
45  GLM_SWIZZLE4_4_MEMBERS(T, Q, x, y, z, w)
46  GLM_SWIZZLE4_4_MEMBERS(T, Q, r, g, b, a)
47  GLM_SWIZZLE4_4_MEMBERS(T, Q, s, t, p, q)
48 # endif
49  };
50 # else
51  union { T x, r, s; };
52  union { T y, g, t; };
53  union { T z, b, p; };
54  union { T w, a, q; };
55 
56 # if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
57  GLM_SWIZZLE_GEN_VEC_FROM_VEC4(T, Q)
58 # endif
59 # endif
60 
61  // -- Component accesses --
62 
64  typedef length_t length_type;
65  GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 4;}
66 
67  GLM_FUNC_DECL GLM_CONSTEXPR T & operator[](length_type i);
68  GLM_FUNC_DECL GLM_CONSTEXPR T const& operator[](length_type i) const;
69 
70  // -- Implicit basic constructors --
71 
72  GLM_FUNC_DECL GLM_CONSTEXPR vec() GLM_DEFAULT;
73  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<4, T, Q> const& v) GLM_DEFAULT;
74  template<qualifier P>
75  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<4, T, P> const& v);
76 
77  // -- Explicit basic constructors --
78 
79  GLM_FUNC_DECL GLM_CONSTEXPR explicit vec(T scalar);
80  GLM_FUNC_DECL GLM_CONSTEXPR vec(T x, T y, T z, T w);
81 
82  // -- Conversion scalar constructors --
83 
84  template<typename U, qualifier P>
85  GLM_FUNC_DECL GLM_CONSTEXPR explicit vec(vec<1, U, P> const& v);
86 
88  template<typename X, typename Y, typename Z, typename W>
89  GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, Y _y, Z _z, W _w);
90  template<typename X, typename Y, typename Z, typename W>
91  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, Y _y, Z _z, W _w);
92  template<typename X, typename Y, typename Z, typename W>
93  GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, vec<1, Y, Q> const& _y, Z _z, W _w);
94  template<typename X, typename Y, typename Z, typename W>
95  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, Z _z, W _w);
96  template<typename X, typename Y, typename Z, typename W>
97  GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, Y _y, vec<1, Z, Q> const& _z, W _w);
98  template<typename X, typename Y, typename Z, typename W>
99  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, Y _y, vec<1, Z, Q> const& _z, W _w);
100  template<typename X, typename Y, typename Z, typename W>
101  GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z, W _w);
102  template<typename X, typename Y, typename Z, typename W>
103  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z, W _w);
104  template<typename X, typename Y, typename Z, typename W>
105  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, Y _y, Z _z, vec<1, W, Q> const& _w);
106  template<typename X, typename Y, typename Z, typename W>
107  GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, vec<1, Y, Q> const& _y, Z _z, vec<1, W, Q> const& _w);
108  template<typename X, typename Y, typename Z, typename W>
109  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _y, Z _z, vec<1, W, Q> const& _w);
110  template<typename X, typename Y, typename Z, typename W>
111  GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, Y _y, vec<1, Z, Q> const& _z, vec<1, W, Q> const& _w);
112  template<typename X, typename Y, typename Z, typename W>
113  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, Y _y, vec<1, Z, Q> const& _z, vec<1, W, Q> const& _w);
114  template<typename X, typename Y, typename Z, typename W>
115  GLM_FUNC_DECL GLM_CONSTEXPR vec(X _x, vec<1, Y, Q> const& _y, vec<1, Z, Q> const& _z, vec<1, W, Q> const& _w);
116  template<typename X, typename Y, typename Z, typename W>
117  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, X, Q> const& _x, vec<1, Y, Q> const& _Y, vec<1, Z, Q> const& _z, vec<1, W, Q> const& _w);
118 
119  // -- Conversion vector constructors --
120 
122  template<typename A, typename B, typename C, qualifier P>
123  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, P> const& _xy, B _z, C _w);
125  template<typename A, typename B, typename C, qualifier P>
126  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, P> const& _xy, vec<1, B, P> const& _z, C _w);
128  template<typename A, typename B, typename C, qualifier P>
129  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, P> const& _xy, B _z, vec<1, C, P> const& _w);
131  template<typename A, typename B, typename C, qualifier P>
132  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, P> const& _xy, vec<1, B, P> const& _z, vec<1, C, P> const& _w);
134  template<typename A, typename B, typename C, qualifier P>
135  GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, vec<2, B, P> const& _yz, C _w);
137  template<typename A, typename B, typename C, qualifier P>
138  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const& _x, vec<2, B, P> const& _yz, C _w);
140  template<typename A, typename B, typename C, qualifier P>
141  GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, vec<2, B, P> const& _yz, vec<1, C, P> const& _w);
143  template<typename A, typename B, typename C, qualifier P>
144  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const& _x, vec<2, B, P> const& _yz, vec<1, C, P> const& _w);
146  template<typename A, typename B, typename C, qualifier P>
147  GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, B _y, vec<2, C, P> const& _zw);
149  template<typename A, typename B, typename C, qualifier P>
150  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const& _x, B _y, vec<2, C, P> const& _zw);
152  template<typename A, typename B, typename C, qualifier P>
153  GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, vec<1, B, P> const& _y, vec<2, C, P> const& _zw);
155  template<typename A, typename B, typename C, qualifier P>
156  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const& _x, vec<1, B, P> const& _y, vec<2, C, P> const& _zw);
158  template<typename A, typename B, qualifier P>
159  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<3, A, P> const& _xyz, B _w);
161  template<typename A, typename B, qualifier P>
162  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<3, A, P> const& _xyz, vec<1, B, P> const& _w);
164  template<typename A, typename B, qualifier P>
165  GLM_FUNC_DECL GLM_CONSTEXPR vec(A _x, vec<3, B, P> const& _yzw);
167  template<typename A, typename B, qualifier P>
168  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const& _x, vec<3, B, P> const& _yzw);
170  template<typename A, typename B, qualifier P>
171  GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<2, A, P> const& _xy, vec<2, B, P> const& _zw);
172 
174  template<typename U, qualifier P>
175  GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<4, U, P> const& v);
176 
177  // -- Swizzle constructors --
178 # if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
179  template<int E0, int E1, int E2, int E3>
180  GLM_FUNC_DECL GLM_CONSTEXPR vec(detail::_swizzle<4, T, Q, E0, E1, E2, E3> const& that)
181  {
182  *this = that();
183  }
184 
185  template<int E0, int E1, int F0, int F1>
186  GLM_FUNC_DECL GLM_CONSTEXPR vec(detail::_swizzle<2, T, Q, E0, E1, -1, -2> const& v, detail::_swizzle<2, T, Q, F0, F1, -1, -2> const& u)
187  {
188  *this = vec<4, T, Q>(v(), u());
189  }
190 
191  template<int E0, int E1>
192  GLM_FUNC_DECL GLM_CONSTEXPR vec(T const& x, T const& y, detail::_swizzle<2, T, Q, E0, E1, -1, -2> const& v)
193  {
194  *this = vec<4, T, Q>(x, y, v());
195  }
196 
197  template<int E0, int E1>
198  GLM_FUNC_DECL GLM_CONSTEXPR vec(T const& x, detail::_swizzle<2, T, Q, E0, E1, -1, -2> const& v, T const& w)
199  {
200  *this = vec<4, T, Q>(x, v(), w);
201  }
202 
203  template<int E0, int E1>
204  GLM_FUNC_DECL GLM_CONSTEXPR vec(detail::_swizzle<2, T, Q, E0, E1, -1, -2> const& v, T const& z, T const& w)
205  {
206  *this = vec<4, T, Q>(v(), z, w);
207  }
208 
209  template<int E0, int E1, int E2>
210  GLM_FUNC_DECL GLM_CONSTEXPR vec(detail::_swizzle<3, T, Q, E0, E1, E2, -1> const& v, T const& w)
211  {
212  *this = vec<4, T, Q>(v(), w);
213  }
214 
215  template<int E0, int E1, int E2>
216  GLM_FUNC_DECL GLM_CONSTEXPR vec(T const& x, detail::_swizzle<3, T, Q, E0, E1, E2, -1> const& v)
217  {
218  *this = vec<4, T, Q>(x, v());
219  }
220 # endif//GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
221 
222  // -- Unary arithmetic operators --
223 
224  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator=(vec<4, T, Q> const& v) GLM_DEFAULT;
225 
226  template<typename U>
227  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator=(vec<4, U, Q> const& v);
228  template<typename U>
229  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator+=(U scalar);
230  template<typename U>
231  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator+=(vec<1, U, Q> const& v);
232  template<typename U>
233  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator+=(vec<4, U, Q> const& v);
234  template<typename U>
235  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator-=(U scalar);
236  template<typename U>
237  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator-=(vec<1, U, Q> const& v);
238  template<typename U>
239  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator-=(vec<4, U, Q> const& v);
240  template<typename U>
241  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator*=(U scalar);
242  template<typename U>
243  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator*=(vec<1, U, Q> const& v);
244  template<typename U>
245  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator*=(vec<4, U, Q> const& v);
246  template<typename U>
247  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator/=(U scalar);
248  template<typename U>
249  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator/=(vec<1, U, Q> const& v);
250  template<typename U>
251  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q>& operator/=(vec<4, U, Q> const& v);
252 
253  // -- Increment and decrement operators --
254 
255  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator++();
256  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator--();
257  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator++(int);
258  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator--(int);
259 
260  // -- Unary bit operators --
261 
262  template<typename U>
263  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator%=(U scalar);
264  template<typename U>
265  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator%=(vec<1, U, Q> const& v);
266  template<typename U>
267  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator%=(vec<4, U, Q> const& v);
268  template<typename U>
269  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator&=(U scalar);
270  template<typename U>
271  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator&=(vec<1, U, Q> const& v);
272  template<typename U>
273  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator&=(vec<4, U, Q> const& v);
274  template<typename U>
275  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator|=(U scalar);
276  template<typename U>
277  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator|=(vec<1, U, Q> const& v);
278  template<typename U>
279  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator|=(vec<4, U, Q> const& v);
280  template<typename U>
281  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator^=(U scalar);
282  template<typename U>
283  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator^=(vec<1, U, Q> const& v);
284  template<typename U>
285  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator^=(vec<4, U, Q> const& v);
286  template<typename U>
287  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator<<=(U scalar);
288  template<typename U>
289  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator<<=(vec<1, U, Q> const& v);
290  template<typename U>
291  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator<<=(vec<4, U, Q> const& v);
292  template<typename U>
293  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator>>=(U scalar);
294  template<typename U>
295  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator>>=(vec<1, U, Q> const& v);
296  template<typename U>
297  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> & operator>>=(vec<4, U, Q> const& v);
298  };
299 
300  // -- Unary operators --
301 
302  template<typename T, qualifier Q>
303  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator+(vec<4, T, Q> const& v);
304 
305  template<typename T, qualifier Q>
306  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator-(vec<4, T, Q> const& v);
307 
308  // -- Binary operators --
309 
310  template<typename T, qualifier Q>
311  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator+(vec<4, T, Q> const& v, T const & scalar);
312 
313  template<typename T, qualifier Q>
314  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator+(vec<4, T, Q> const& v1, vec<1, T, Q> const& v2);
315 
316  template<typename T, qualifier Q>
317  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator+(T scalar, vec<4, T, Q> const& v);
318 
319  template<typename T, qualifier Q>
320  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator+(vec<1, T, Q> const& v1, vec<4, T, Q> const& v2);
321 
322  template<typename T, qualifier Q>
323  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator+(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2);
324 
325  template<typename T, qualifier Q>
326  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator-(vec<4, T, Q> const& v, T const & scalar);
327 
328  template<typename T, qualifier Q>
329  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator-(vec<4, T, Q> const& v1, vec<1, T, Q> const& v2);
330 
331  template<typename T, qualifier Q>
332  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator-(T scalar, vec<4, T, Q> const& v);
333 
334  template<typename T, qualifier Q>
335  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator-(vec<1, T, Q> const& v1, vec<4, T, Q> const& v2);
336 
337  template<typename T, qualifier Q>
338  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator-(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2);
339 
340  template<typename T, qualifier Q>
341  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator*(vec<4, T, Q> const& v, T const & scalar);
342 
343  template<typename T, qualifier Q>
344  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator*(vec<4, T, Q> const& v1, vec<1, T, Q> const& v2);
345 
346  template<typename T, qualifier Q>
347  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator*(T scalar, vec<4, T, Q> const& v);
348 
349  template<typename T, qualifier Q>
350  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator*(vec<1, T, Q> const& v1, vec<4, T, Q> const& v2);
351 
352  template<typename T, qualifier Q>
353  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator*(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2);
354 
355  template<typename T, qualifier Q>
356  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator/(vec<4, T, Q> const& v, T const & scalar);
357 
358  template<typename T, qualifier Q>
359  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator/(vec<4, T, Q> const& v1, vec<1, T, Q> const& v2);
360 
361  template<typename T, qualifier Q>
362  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator/(T scalar, vec<4, T, Q> const& v);
363 
364  template<typename T, qualifier Q>
365  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator/(vec<1, T, Q> const& v1, vec<4, T, Q> const& v2);
366 
367  template<typename T, qualifier Q>
368  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator/(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2);
369 
370  template<typename T, qualifier Q>
371  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator%(vec<4, T, Q> const& v, T scalar);
372 
373  template<typename T, qualifier Q>
374  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator%(vec<4, T, Q> const& v, vec<1, T, Q> const& scalar);
375 
376  template<typename T, qualifier Q>
377  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator%(T scalar, vec<4, T, Q> const& v);
378 
379  template<typename T, qualifier Q>
380  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator%(vec<1, T, Q> const& scalar, vec<4, T, Q> const& v);
381 
382  template<typename T, qualifier Q>
383  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator%(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2);
384 
385  template<typename T, qualifier Q>
386  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator&(vec<4, T, Q> const& v, T scalar);
387 
388  template<typename T, qualifier Q>
389  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator&(vec<4, T, Q> const& v, vec<1, T, Q> const& scalar);
390 
391  template<typename T, qualifier Q>
392  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator&(T scalar, vec<4, T, Q> const& v);
393 
394  template<typename T, qualifier Q>
395  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator&(vec<1, T, Q> const& scalar, vec<4, T, Q> const& v);
396 
397  template<typename T, qualifier Q>
398  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator&(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2);
399 
400  template<typename T, qualifier Q>
401  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator|(vec<4, T, Q> const& v, T scalar);
402 
403  template<typename T, qualifier Q>
404  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator|(vec<4, T, Q> const& v, vec<1, T, Q> const& scalar);
405 
406  template<typename T, qualifier Q>
407  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator|(T scalar, vec<4, T, Q> const& v);
408 
409  template<typename T, qualifier Q>
410  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator|(vec<1, T, Q> const& scalar, vec<4, T, Q> const& v);
411 
412  template<typename T, qualifier Q>
413  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator|(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2);
414 
415  template<typename T, qualifier Q>
416  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator^(vec<4, T, Q> const& v, T scalar);
417 
418  template<typename T, qualifier Q>
419  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator^(vec<4, T, Q> const& v, vec<1, T, Q> const& scalar);
420 
421  template<typename T, qualifier Q>
422  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator^(T scalar, vec<4, T, Q> const& v);
423 
424  template<typename T, qualifier Q>
425  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator^(vec<1, T, Q> const& scalar, vec<4, T, Q> const& v);
426 
427  template<typename T, qualifier Q>
428  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator^(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2);
429 
430  template<typename T, qualifier Q>
431  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator<<(vec<4, T, Q> const& v, T scalar);
432 
433  template<typename T, qualifier Q>
434  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator<<(vec<4, T, Q> const& v, vec<1, T, Q> const& scalar);
435 
436  template<typename T, qualifier Q>
437  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator<<(T scalar, vec<4, T, Q> const& v);
438 
439  template<typename T, qualifier Q>
440  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator<<(vec<1, T, Q> const& scalar, vec<4, T, Q> const& v);
441 
442  template<typename T, qualifier Q>
443  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator<<(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2);
444 
445  template<typename T, qualifier Q>
446  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator>>(vec<4, T, Q> const& v, T scalar);
447 
448  template<typename T, qualifier Q>
449  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator>>(vec<4, T, Q> const& v, vec<1, T, Q> const& scalar);
450 
451  template<typename T, qualifier Q>
452  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator>>(T scalar, vec<4, T, Q> const& v);
453 
454  template<typename T, qualifier Q>
455  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator>>(vec<1, T, Q> const& scalar, vec<4, T, Q> const& v);
456 
457  template<typename T, qualifier Q>
458  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator>>(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2);
459 
460  template<typename T, qualifier Q>
461  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, T, Q> operator~(vec<4, T, Q> const& v);
462 
463  // -- Boolean operators --
464 
465  template<typename T, qualifier Q>
466  GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2);
467 
468  template<typename T, qualifier Q>
469  GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2);
470 
471  template<qualifier Q>
472  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, bool, Q> operator&&(vec<4, bool, Q> const& v1, vec<4, bool, Q> const& v2);
473 
474  template<qualifier Q>
475  GLM_FUNC_DECL GLM_CONSTEXPR vec<4, bool, Q> operator||(vec<4, bool, Q> const& v1, vec<4, bool, Q> const& v2);
476 }//namespace glm
477 
478 #ifndef GLM_EXTERNAL_TEMPLATE
479 #include "type_vec4.inl"
480 #endif//GLM_EXTERNAL_TEMPLATE
Definition: common.hpp:20
+
GLM_FUNC_DECL T length(qua< T, Q > const &q)
Returns the norm of a quaternions.
+
+ + + + diff --git a/common/glm/doc/api/a00080.html b/common/glm/doc/api/a00080.html new file mode 100644 index 000000000..712288830 --- /dev/null +++ b/common/glm/doc/api/a00080.html @@ -0,0 +1,115 @@ + + + + + + + +0.9.9 API documenation: exponential.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
exponential.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > exp (vec< L, T, Q > const &v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > exp2 (vec< L, T, Q > const &v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > inversesqrt (vec< L, T, Q > const &v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > log (vec< L, T, Q > const &v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > log2 (vec< L, T, Q > const &v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > pow (vec< L, T, Q > const &base, vec< L, T, Q > const &exponent)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > sqrt (vec< L, T, Q > const &v)
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00080_source.html b/common/glm/doc/api/a00080_source.html new file mode 100644 index 000000000..df0d05dd4 --- /dev/null +++ b/common/glm/doc/api/a00080_source.html @@ -0,0 +1,93 @@ + + + + + + + +0.9.9 API documenation: exponential.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
exponential.hpp
+
+
+Go to the documentation of this file.
1 
15 #pragma once
16 
17 #include "detail/type_vec1.hpp"
18 #include "detail/type_vec2.hpp"
19 #include "detail/type_vec3.hpp"
20 #include "detail/type_vec4.hpp"
21 #include <cmath>
22 
23 namespace glm
24 {
27 
35  template<length_t L, typename T, qualifier Q>
36  GLM_FUNC_DECL vec<L, T, Q> pow(vec<L, T, Q> const& base, vec<L, T, Q> const& exponent);
37 
46  template<length_t L, typename T, qualifier Q>
47  GLM_FUNC_DECL vec<L, T, Q> exp(vec<L, T, Q> const& v);
48 
59  template<length_t L, typename T, qualifier Q>
60  GLM_FUNC_DECL vec<L, T, Q> log(vec<L, T, Q> const& v);
61 
70  template<length_t L, typename T, qualifier Q>
71  GLM_FUNC_DECL vec<L, T, Q> exp2(vec<L, T, Q> const& v);
72 
82  template<length_t L, typename T, qualifier Q>
83  GLM_FUNC_DECL vec<L, T, Q> log2(vec<L, T, Q> const& v);
84 
93  template<length_t L, typename T, qualifier Q>
94  GLM_FUNC_DECL vec<L, T, Q> sqrt(vec<L, T, Q> const& v);
95 
104  template<length_t L, typename T, qualifier Q>
105  GLM_FUNC_DECL vec<L, T, Q> inversesqrt(vec<L, T, Q> const& v);
106 
108 }//namespace glm
109 
110 #include "detail/func_exponential.inl"
Core features
+
GLM_FUNC_DECL vec< L, T, Q > exp2(vec< L, T, Q > const &v)
Returns 2 raised to the v power.
+
GLM_FUNC_DECL vec< L, T, Q > sqrt(vec< L, T, Q > const &v)
Returns the positive square root of v.
+
GLM_FUNC_DECL vec< L, T, Q > exp(vec< L, T, Q > const &v)
Returns the natural exponentiation of x, i.e., e^x.
+
GLM_FUNC_DECL vec< L, T, Q > pow(vec< L, T, Q > const &base, vec< L, T, Q > const &exponent)
Returns &#39;base&#39; raised to the power &#39;exponent&#39;.
+
Core features
+
GLM_FUNC_DECL vec< L, T, Q > inversesqrt(vec< L, T, Q > const &v)
Returns the reciprocal of the positive square root of v.
+
Core features
+
Definition: common.hpp:20
+
GLM_FUNC_DECL vec< L, T, Q > log2(vec< L, T, Q > const &v)
Returns the base 2 log of x, i.e., returns the value y, which satisfies the equation x = 2 ^ y...
+
GLM_FUNC_DECL vec< L, T, Q > log(vec< L, T, Q > const &v)
Returns the natural logarithm of v, i.e., returns the value y which satisfies the equation x = e^y...
+
Core features
+
+ + + + diff --git a/common/glm/doc/api/a00083.html b/common/glm/doc/api/a00083.html new file mode 100644 index 000000000..7688ee472 --- /dev/null +++ b/common/glm/doc/api/a00083.html @@ -0,0 +1,219 @@ + + + + + + + +0.9.9 API documenation: matrix_clip_space.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_clip_space.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > frustum (T left, T right, T bottom, T top, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > frustumLH (T left, T right, T bottom, T top, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > frustumLH_NO (T left, T right, T bottom, T top, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > frustumLH_ZO (T left, T right, T bottom, T top, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > frustumNO (T left, T right, T bottom, T top, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > frustumRH (T left, T right, T bottom, T top, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > frustumRH_NO (T left, T right, T bottom, T top, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > frustumRH_ZO (T left, T right, T bottom, T top, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > frustumZO (T left, T right, T bottom, T top, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > infinitePerspective (T fovy, T aspect, T near)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > infinitePerspectiveLH (T fovy, T aspect, T near)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > infinitePerspectiveRH (T fovy, T aspect, T near)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > ortho (T left, T right, T bottom, T top)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > ortho (T left, T right, T bottom, T top, T zNear, T zFar)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > orthoLH (T left, T right, T bottom, T top, T zNear, T zFar)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > orthoLH_NO (T left, T right, T bottom, T top, T zNear, T zFar)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > orthoLH_ZO (T left, T right, T bottom, T top, T zNear, T zFar)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > orthoNO (T left, T right, T bottom, T top, T zNear, T zFar)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > orthoRH (T left, T right, T bottom, T top, T zNear, T zFar)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > orthoRH_NO (T left, T right, T bottom, T top, T zNear, T zFar)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > orthoRH_ZO (T left, T right, T bottom, T top, T zNear, T zFar)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > orthoZO (T left, T right, T bottom, T top, T zNear, T zFar)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspective (T fovy, T aspect, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveFov (T fov, T width, T height, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveFovLH (T fov, T width, T height, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveFovLH_NO (T fov, T width, T height, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveFovLH_ZO (T fov, T width, T height, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveFovNO (T fov, T width, T height, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveFovRH (T fov, T width, T height, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveFovRH_NO (T fov, T width, T height, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveFovRH_ZO (T fov, T width, T height, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveFovZO (T fov, T width, T height, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveLH (T fovy, T aspect, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveLH_NO (T fovy, T aspect, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveLH_ZO (T fovy, T aspect, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveNO (T fovy, T aspect, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveRH (T fovy, T aspect, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveRH_NO (T fovy, T aspect, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveRH_ZO (T fovy, T aspect, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveZO (T fovy, T aspect, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > tweakedInfinitePerspective (T fovy, T aspect, T near)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > tweakedInfinitePerspective (T fovy, T aspect, T near, T ep)
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00083_source.html b/common/glm/doc/api/a00083_source.html new file mode 100644 index 000000000..0e40a7904 --- /dev/null +++ b/common/glm/doc/api/a00083_source.html @@ -0,0 +1,122 @@ + + + + + + + +0.9.9 API documenation: matrix_clip_space.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_clip_space.hpp
+
+
+Go to the documentation of this file.
1 
20 #pragma once
21 
22 // Dependencies
23 #include "../ext/scalar_constants.hpp"
24 #include "../geometric.hpp"
25 #include "../trigonometric.hpp"
26 
27 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
28 # pragma message("GLM: GLM_EXT_matrix_clip_space extension included")
29 #endif
30 
31 namespace glm
32 {
35 
42  template<typename T>
43  GLM_FUNC_DECL mat<4, 4, T, defaultp> ortho(
44  T left, T right, T bottom, T top);
45 
52  template<typename T>
53  GLM_FUNC_DECL mat<4, 4, T, defaultp> orthoLH_ZO(
54  T left, T right, T bottom, T top, T zNear, T zFar);
55 
62  template<typename T>
63  GLM_FUNC_DECL mat<4, 4, T, defaultp> orthoLH_NO(
64  T left, T right, T bottom, T top, T zNear, T zFar);
65 
72  template<typename T>
73  GLM_FUNC_DECL mat<4, 4, T, defaultp> orthoRH_ZO(
74  T left, T right, T bottom, T top, T zNear, T zFar);
75 
82  template<typename T>
83  GLM_FUNC_DECL mat<4, 4, T, defaultp> orthoRH_NO(
84  T left, T right, T bottom, T top, T zNear, T zFar);
85 
92  template<typename T>
93  GLM_FUNC_DECL mat<4, 4, T, defaultp> orthoZO(
94  T left, T right, T bottom, T top, T zNear, T zFar);
95 
102  template<typename T>
103  GLM_FUNC_DECL mat<4, 4, T, defaultp> orthoNO(
104  T left, T right, T bottom, T top, T zNear, T zFar);
105 
113  template<typename T>
114  GLM_FUNC_DECL mat<4, 4, T, defaultp> orthoLH(
115  T left, T right, T bottom, T top, T zNear, T zFar);
116 
124  template<typename T>
125  GLM_FUNC_DECL mat<4, 4, T, defaultp> orthoRH(
126  T left, T right, T bottom, T top, T zNear, T zFar);
127 
135  template<typename T>
136  GLM_FUNC_DECL mat<4, 4, T, defaultp> ortho(
137  T left, T right, T bottom, T top, T zNear, T zFar);
138 
143  template<typename T>
144  GLM_FUNC_DECL mat<4, 4, T, defaultp> frustumLH_ZO(
145  T left, T right, T bottom, T top, T near, T far);
146 
151  template<typename T>
152  GLM_FUNC_DECL mat<4, 4, T, defaultp> frustumLH_NO(
153  T left, T right, T bottom, T top, T near, T far);
154 
159  template<typename T>
160  GLM_FUNC_DECL mat<4, 4, T, defaultp> frustumRH_ZO(
161  T left, T right, T bottom, T top, T near, T far);
162 
167  template<typename T>
168  GLM_FUNC_DECL mat<4, 4, T, defaultp> frustumRH_NO(
169  T left, T right, T bottom, T top, T near, T far);
170 
175  template<typename T>
176  GLM_FUNC_DECL mat<4, 4, T, defaultp> frustumZO(
177  T left, T right, T bottom, T top, T near, T far);
178 
183  template<typename T>
184  GLM_FUNC_DECL mat<4, 4, T, defaultp> frustumNO(
185  T left, T right, T bottom, T top, T near, T far);
186 
192  template<typename T>
193  GLM_FUNC_DECL mat<4, 4, T, defaultp> frustumLH(
194  T left, T right, T bottom, T top, T near, T far);
195 
201  template<typename T>
202  GLM_FUNC_DECL mat<4, 4, T, defaultp> frustumRH(
203  T left, T right, T bottom, T top, T near, T far);
204 
210  template<typename T>
211  GLM_FUNC_DECL mat<4, 4, T, defaultp> frustum(
212  T left, T right, T bottom, T top, T near, T far);
213 
214 
224  template<typename T>
225  GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveRH_ZO(
226  T fovy, T aspect, T near, T far);
227 
237  template<typename T>
238  GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveRH_NO(
239  T fovy, T aspect, T near, T far);
240 
250  template<typename T>
251  GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveLH_ZO(
252  T fovy, T aspect, T near, T far);
253 
263  template<typename T>
264  GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveLH_NO(
265  T fovy, T aspect, T near, T far);
266 
276  template<typename T>
277  GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveZO(
278  T fovy, T aspect, T near, T far);
279 
289  template<typename T>
290  GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveNO(
291  T fovy, T aspect, T near, T far);
292 
303  template<typename T>
304  GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveRH(
305  T fovy, T aspect, T near, T far);
306 
317  template<typename T>
318  GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveLH(
319  T fovy, T aspect, T near, T far);
320 
331  template<typename T>
332  GLM_FUNC_DECL mat<4, 4, T, defaultp> perspective(
333  T fovy, T aspect, T near, T far);
334 
345  template<typename T>
346  GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveFovRH_ZO(
347  T fov, T width, T height, T near, T far);
348 
359  template<typename T>
360  GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveFovRH_NO(
361  T fov, T width, T height, T near, T far);
362 
373  template<typename T>
374  GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveFovLH_ZO(
375  T fov, T width, T height, T near, T far);
376 
387  template<typename T>
388  GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveFovLH_NO(
389  T fov, T width, T height, T near, T far);
390 
401  template<typename T>
402  GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveFovZO(
403  T fov, T width, T height, T near, T far);
404 
415  template<typename T>
416  GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveFovNO(
417  T fov, T width, T height, T near, T far);
418 
430  template<typename T>
431  GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveFovRH(
432  T fov, T width, T height, T near, T far);
433 
445  template<typename T>
446  GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveFovLH(
447  T fov, T width, T height, T near, T far);
448 
459  template<typename T>
460  GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveFov(
461  T fov, T width, T height, T near, T far);
462 
470  template<typename T>
471  GLM_FUNC_DECL mat<4, 4, T, defaultp> infinitePerspectiveLH(
472  T fovy, T aspect, T near);
473 
481  template<typename T>
482  GLM_FUNC_DECL mat<4, 4, T, defaultp> infinitePerspectiveRH(
483  T fovy, T aspect, T near);
484 
492  template<typename T>
493  GLM_FUNC_DECL mat<4, 4, T, defaultp> infinitePerspective(
494  T fovy, T aspect, T near);
495 
503  template<typename T>
504  GLM_FUNC_DECL mat<4, 4, T, defaultp> tweakedInfinitePerspective(
505  T fovy, T aspect, T near);
506 
515  template<typename T>
516  GLM_FUNC_DECL mat<4, 4, T, defaultp> tweakedInfinitePerspective(
517  T fovy, T aspect, T near, T ep);
518 
520 }//namespace glm
521 
522 #include "matrix_clip_space.inl"
GLM_FUNC_DECL mat< 4, 4, T, defaultp > orthoLH(T left, T right, T bottom, T top, T zNear, T zFar)
Creates a matrix for an orthographic parallel viewing volume, using left-handed coordinates.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveFovLH_NO(T fov, T width, T height, T near, T far)
Builds a perspective projection matrix based on a field of view using left-handed coordinates...
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveFovZO(T fov, T width, T height, T near, T far)
Builds a perspective projection matrix based on a field of view using left-handed coordinates if GLM_...
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveNO(T fovy, T aspect, T near, T far)
Creates a matrix for a symetric perspective-view frustum using left-handed coordinates if GLM_FORCE_L...
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > frustumLH_ZO(T left, T right, T bottom, T top, T near, T far)
Creates a left handed frustum matrix.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > orthoZO(T left, T right, T bottom, T top, T zNear, T zFar)
Creates a matrix for an orthographic parallel viewing volume, using left-handed coordinates.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveFovRH(T fov, T width, T height, T near, T far)
Builds a right handed perspective projection matrix based on a field of view.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > orthoRH(T left, T right, T bottom, T top, T zNear, T zFar)
Creates a matrix for an orthographic parallel viewing volume, using right-handed coordinates.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveRH(T fovy, T aspect, T near, T far)
Creates a matrix for a right handed, symetric perspective-view frustum.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > tweakedInfinitePerspective(T fovy, T aspect, T near, T ep)
Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics har...
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > frustumRH_NO(T left, T right, T bottom, T top, T near, T far)
Creates a right handed frustum matrix.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveFovNO(T fov, T width, T height, T near, T far)
Builds a perspective projection matrix based on a field of view using left-handed coordinates if GLM_...
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > frustumRH_ZO(T left, T right, T bottom, T top, T near, T far)
Creates a right handed frustum matrix.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > infinitePerspective(T fovy, T aspect, T near)
Creates a matrix for a symmetric perspective-view frustum with far plane at infinite with default han...
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspective(T fovy, T aspect, T near, T far)
Creates a matrix for a symetric perspective-view frustum based on the default handedness and default ...
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > orthoLH_ZO(T left, T right, T bottom, T top, T zNear, T zFar)
Creates a matrix for an orthographic parallel viewing volume, using left-handed coordinates.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveFovLH_ZO(T fov, T width, T height, T near, T far)
Builds a perspective projection matrix based on a field of view using left-handed coordinates...
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > frustumRH(T left, T right, T bottom, T top, T near, T far)
Creates a right handed frustum matrix.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > frustumLH_NO(T left, T right, T bottom, T top, T near, T far)
Creates a left handed frustum matrix.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > frustum(T left, T right, T bottom, T top, T near, T far)
Creates a frustum matrix with default handedness, using the default handedness and default near and f...
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveZO(T fovy, T aspect, T near, T far)
Creates a matrix for a symetric perspective-view frustum using left-handed coordinates if GLM_FORCE_L...
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > frustumNO(T left, T right, T bottom, T top, T near, T far)
Creates a frustum matrix using left-handed coordinates if GLM_FORCE_LEFT_HANDED if defined or right-h...
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > orthoRH_NO(T left, T right, T bottom, T top, T zNear, T zFar)
Creates a matrix for an orthographic parallel viewing volume, using right-handed coordinates.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > orthoNO(T left, T right, T bottom, T top, T zNear, T zFar)
Creates a matrix for an orthographic parallel viewing volume, using left-handed coordinates if GLM_FO...
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveRH_ZO(T fovy, T aspect, T near, T far)
Creates a matrix for a right handed, symetric perspective-view frustum.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveFov(T fov, T width, T height, T near, T far)
Builds a perspective projection matrix based on a field of view and the default handedness and defaul...
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > orthoLH_NO(T left, T right, T bottom, T top, T zNear, T zFar)
Creates a matrix for an orthographic parallel viewing volume using right-handed coordinates.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveLH_ZO(T fovy, T aspect, T near, T far)
Creates a matrix for a left handed, symetric perspective-view frustum.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > frustumLH(T left, T right, T bottom, T top, T near, T far)
Creates a left handed frustum matrix.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveFovLH(T fov, T width, T height, T near, T far)
Builds a left handed perspective projection matrix based on a field of view.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveLH(T fovy, T aspect, T near, T far)
Creates a matrix for a left handed, symetric perspective-view frustum.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > frustumZO(T left, T right, T bottom, T top, T near, T far)
Creates a frustum matrix using left-handed coordinates if GLM_FORCE_LEFT_HANDED if defined or right-h...
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveRH_NO(T fovy, T aspect, T near, T far)
Creates a matrix for a right handed, symetric perspective-view frustum.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveLH_NO(T fovy, T aspect, T near, T far)
Creates a matrix for a left handed, symetric perspective-view frustum.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > infinitePerspectiveRH(T fovy, T aspect, T near)
Creates a matrix for a right handed, symmetric perspective-view frustum with far plane at infinite...
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > orthoRH_ZO(T left, T right, T bottom, T top, T zNear, T zFar)
Creates a matrix for an orthographic parallel viewing volume, using left-handed coordinates.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveFovRH_ZO(T fov, T width, T height, T near, T far)
Builds a perspective projection matrix based on a field of view using right-handed coordinates...
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > ortho(T left, T right, T bottom, T top, T zNear, T zFar)
Creates a matrix for an orthographic parallel viewing volume, using the default handedness and defaul...
+
Definition: common.hpp:20
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveFovRH_NO(T fov, T width, T height, T near, T far)
Builds a perspective projection matrix based on a field of view using right-handed coordinates...
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > infinitePerspectiveLH(T fovy, T aspect, T near)
Creates a matrix for a left handed, symmetric perspective-view frustum with far plane at infinite...
+
+ + + + diff --git a/common/glm/doc/api/a00086.html b/common/glm/doc/api/a00086.html new file mode 100644 index 000000000..96f944138 --- /dev/null +++ b/common/glm/doc/api/a00086.html @@ -0,0 +1,97 @@ + + + + + + + +0.9.9 API documenation: matrix_double2x2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_double2x2.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + +

+Typedefs

typedef mat< 2, 2, double, defaultp > dmat2
 
typedef mat< 2, 2, double, defaultp > dmat2x2
 
+

Detailed Description

+

Core features

+ +

Definition in file matrix_double2x2.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00086_source.html b/common/glm/doc/api/a00086_source.html new file mode 100644 index 000000000..9a48a87a3 --- /dev/null +++ b/common/glm/doc/api/a00086_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: matrix_double2x2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_double2x2.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat2x2.hpp"
6 
7 namespace glm
8 {
11 
15  typedef mat<2, 2, double, defaultp> dmat2x2;
16 
20  typedef mat<2, 2, double, defaultp> dmat2;
21 
23 }//namespace glm
mat< 2, 2, double, defaultp > dmat2
2 columns of 2 components matrix of double-precision floating-point numbers.
+
Definition: common.hpp:20
+
mat< 2, 2, double, defaultp > dmat2x2
2 columns of 2 components matrix of double-precision floating-point numbers.
+
+ + + + diff --git a/common/glm/doc/api/a00089.html b/common/glm/doc/api/a00089.html new file mode 100644 index 000000000..5e5cc6749 --- /dev/null +++ b/common/glm/doc/api/a00089.html @@ -0,0 +1,105 @@ + + + + + + + +0.9.9 API documenation: matrix_double2x2_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_double2x2_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + +

+Typedefs

typedef mat< 2, 2, double, highp > highp_dmat2
 
typedef mat< 2, 2, double, highp > highp_dmat2x2
 
typedef mat< 2, 2, double, lowp > lowp_dmat2
 
typedef mat< 2, 2, double, lowp > lowp_dmat2x2
 
typedef mat< 2, 2, double, mediump > mediump_dmat2
 
typedef mat< 2, 2, double, mediump > mediump_dmat2x2
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00089_source.html b/common/glm/doc/api/a00089_source.html new file mode 100644 index 000000000..7189e4b44 --- /dev/null +++ b/common/glm/doc/api/a00089_source.html @@ -0,0 +1,88 @@ + + + + + + + +0.9.9 API documenation: matrix_double2x2_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_double2x2_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat2x2.hpp"
6 
7 namespace glm
8 {
11 
16  typedef mat<2, 2, double, lowp> lowp_dmat2;
17 
22  typedef mat<2, 2, double, mediump> mediump_dmat2;
23 
28  typedef mat<2, 2, double, highp> highp_dmat2;
29 
34  typedef mat<2, 2, double, lowp> lowp_dmat2x2;
35 
40  typedef mat<2, 2, double, mediump> mediump_dmat2x2;
41 
46  typedef mat<2, 2, double, highp> highp_dmat2x2;
47 
49 }//namespace glm
mat< 2, 2, double, mediump > mediump_dmat2
2 columns of 2 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 2, 2, double, highp > highp_dmat2x2
2 columns of 2 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 2, 2, double, lowp > lowp_dmat2x2
2 columns of 2 components matrix of double-precision floating-point numbers using low precision arith...
+
mat< 2, 2, double, mediump > mediump_dmat2x2
2 columns of 2 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 2, 2, double, lowp > lowp_dmat2
2 columns of 2 components matrix of double-precision floating-point numbers using low precision arith...
+
mat< 2, 2, double, highp > highp_dmat2
2 columns of 2 components matrix of double-precision floating-point numbers using medium precision ar...
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00092.html b/common/glm/doc/api/a00092.html new file mode 100644 index 000000000..2cb8821e0 --- /dev/null +++ b/common/glm/doc/api/a00092.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: matrix_double2x3.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_double2x3.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef mat< 2, 3, double, defaultp > dmat2x3
 
+

Detailed Description

+

Core features

+ +

Definition in file matrix_double2x3.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00092_source.html b/common/glm/doc/api/a00092_source.html new file mode 100644 index 000000000..b33a7f3e6 --- /dev/null +++ b/common/glm/doc/api/a00092_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: matrix_double2x3.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_double2x3.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat2x3.hpp"
6 
7 namespace glm
8 {
11 
15  typedef mat<2, 3, double, defaultp> dmat2x3;
16 
18 }//namespace glm
mat< 2, 3, double, defaultp > dmat2x3
2 columns of 3 components matrix of double-precision floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00095.html b/common/glm/doc/api/a00095.html new file mode 100644 index 000000000..464c76526 --- /dev/null +++ b/common/glm/doc/api/a00095.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: matrix_double2x3_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_double2x3_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef mat< 2, 3, double, highp > highp_dmat2x3
 
typedef mat< 2, 3, double, lowp > lowp_dmat2x3
 
typedef mat< 2, 3, double, mediump > mediump_dmat2x3
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00095_source.html b/common/glm/doc/api/a00095_source.html new file mode 100644 index 000000000..bc7326412 --- /dev/null +++ b/common/glm/doc/api/a00095_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: matrix_double2x3_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_double2x3_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat2x3.hpp"
6 
7 namespace glm
8 {
11 
16  typedef mat<2, 3, double, lowp> lowp_dmat2x3;
17 
22  typedef mat<2, 3, double, mediump> mediump_dmat2x3;
23 
28  typedef mat<2, 3, double, highp> highp_dmat2x3;
29 
31 }//namespace glm
mat< 2, 3, double, highp > highp_dmat2x3
2 columns of 3 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 2, 3, double, mediump > mediump_dmat2x3
2 columns of 3 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 2, 3, double, lowp > lowp_dmat2x3
2 columns of 3 components matrix of double-precision floating-point numbers using low precision arith...
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00098.html b/common/glm/doc/api/a00098.html new file mode 100644 index 000000000..8b731dbde --- /dev/null +++ b/common/glm/doc/api/a00098.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: matrix_double2x4.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_double2x4.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef mat< 2, 4, double, defaultp > dmat2x4
 
+

Detailed Description

+

Core features

+ +

Definition in file matrix_double2x4.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00098_source.html b/common/glm/doc/api/a00098_source.html new file mode 100644 index 000000000..cb77d606e --- /dev/null +++ b/common/glm/doc/api/a00098_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: matrix_double2x4.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_double2x4.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat2x4.hpp"
6 
7 namespace glm
8 {
11 
15  typedef mat<2, 4, double, defaultp> dmat2x4;
16 
18 }//namespace glm
mat< 2, 4, double, defaultp > dmat2x4
2 columns of 4 components matrix of double-precision floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00101.html b/common/glm/doc/api/a00101.html new file mode 100644 index 000000000..e93df3c5d --- /dev/null +++ b/common/glm/doc/api/a00101.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: matrix_double2x4_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_double2x4_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef mat< 2, 4, double, highp > highp_dmat2x4
 
typedef mat< 2, 4, double, lowp > lowp_dmat2x4
 
typedef mat< 2, 4, double, mediump > mediump_dmat2x4
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00101_source.html b/common/glm/doc/api/a00101_source.html new file mode 100644 index 000000000..cbe1c0aec --- /dev/null +++ b/common/glm/doc/api/a00101_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: matrix_double2x4_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_double2x4_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat2x4.hpp"
6 
7 namespace glm
8 {
11 
16  typedef mat<2, 4, double, lowp> lowp_dmat2x4;
17 
22  typedef mat<2, 4, double, mediump> mediump_dmat2x4;
23 
28  typedef mat<2, 4, double, highp> highp_dmat2x4;
29 
31 }//namespace glm
mat< 2, 4, double, highp > highp_dmat2x4
2 columns of 4 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 2, 4, double, mediump > mediump_dmat2x4
2 columns of 4 components matrix of double-precision floating-point numbers using medium precision ar...
+
Definition: common.hpp:20
+
mat< 2, 4, double, lowp > lowp_dmat2x4
2 columns of 4 components matrix of double-precision floating-point numbers using low precision arith...
+
+ + + + diff --git a/common/glm/doc/api/a00104.html b/common/glm/doc/api/a00104.html new file mode 100644 index 000000000..25ff46ac3 --- /dev/null +++ b/common/glm/doc/api/a00104.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: matrix_double3x2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_double3x2.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef mat< 3, 2, double, defaultp > dmat3x2
 
+

Detailed Description

+

Core features

+ +

Definition in file matrix_double3x2.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00104_source.html b/common/glm/doc/api/a00104_source.html new file mode 100644 index 000000000..370311a23 --- /dev/null +++ b/common/glm/doc/api/a00104_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: matrix_double3x2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_double3x2.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat3x2.hpp"
6 
7 namespace glm
8 {
11 
15  typedef mat<3, 2, double, defaultp> dmat3x2;
16 
18 }//namespace glm
mat< 3, 2, double, defaultp > dmat3x2
3 columns of 2 components matrix of double-precision floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00107.html b/common/glm/doc/api/a00107.html new file mode 100644 index 000000000..20876cc96 --- /dev/null +++ b/common/glm/doc/api/a00107.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: matrix_double3x2_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_double3x2_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef mat< 3, 2, double, highp > highp_dmat3x2
 
typedef mat< 3, 2, double, lowp > lowp_dmat3x2
 
typedef mat< 3, 2, double, mediump > mediump_dmat3x2
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00107_source.html b/common/glm/doc/api/a00107_source.html new file mode 100644 index 000000000..b07cdf193 --- /dev/null +++ b/common/glm/doc/api/a00107_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: matrix_double3x2_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_double3x2_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat3x2.hpp"
6 
7 namespace glm
8 {
11 
16  typedef mat<3, 2, double, lowp> lowp_dmat3x2;
17 
22  typedef mat<3, 2, double, mediump> mediump_dmat3x2;
23 
28  typedef mat<3, 2, double, highp> highp_dmat3x2;
29 
31 }//namespace glm
mat< 3, 2, double, highp > highp_dmat3x2
3 columns of 2 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 3, 2, double, mediump > mediump_dmat3x2
3 columns of 2 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 3, 2, double, lowp > lowp_dmat3x2
3 columns of 2 components matrix of double-precision floating-point numbers using low precision arith...
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00110.html b/common/glm/doc/api/a00110.html new file mode 100644 index 000000000..69658c54f --- /dev/null +++ b/common/glm/doc/api/a00110.html @@ -0,0 +1,97 @@ + + + + + + + +0.9.9 API documenation: matrix_double3x3.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_double3x3.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + +

+Typedefs

typedef mat< 3, 3, double, defaultp > dmat3
 
typedef mat< 3, 3, double, defaultp > dmat3x3
 
+

Detailed Description

+

Core features

+ +

Definition in file matrix_double3x3.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00110_source.html b/common/glm/doc/api/a00110_source.html new file mode 100644 index 000000000..8b6d2d663 --- /dev/null +++ b/common/glm/doc/api/a00110_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: matrix_double3x3.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_double3x3.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat3x3.hpp"
6 
7 namespace glm
8 {
11 
15  typedef mat<3, 3, double, defaultp> dmat3x3;
16 
20  typedef mat<3, 3, double, defaultp> dmat3;
21 
23 }//namespace glm
mat< 3, 3, double, defaultp > dmat3
3 columns of 3 components matrix of double-precision floating-point numbers.
+
mat< 3, 3, double, defaultp > dmat3x3
3 columns of 3 components matrix of double-precision floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00113.html b/common/glm/doc/api/a00113.html new file mode 100644 index 000000000..d8c1f1ce1 --- /dev/null +++ b/common/glm/doc/api/a00113.html @@ -0,0 +1,105 @@ + + + + + + + +0.9.9 API documenation: matrix_double3x3_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_double3x3_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + +

+Typedefs

typedef mat< 3, 3, double, highp > highp_dmat3
 
typedef mat< 3, 3, double, highp > highp_dmat3x3
 
typedef mat< 3, 3, double, lowp > lowp_dmat3
 
typedef mat< 3, 3, double, lowp > lowp_dmat3x3
 
typedef mat< 3, 3, double, mediump > mediump_dmat3
 
typedef mat< 3, 3, double, mediump > mediump_dmat3x3
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00113_source.html b/common/glm/doc/api/a00113_source.html new file mode 100644 index 000000000..0b2982706 --- /dev/null +++ b/common/glm/doc/api/a00113_source.html @@ -0,0 +1,88 @@ + + + + + + + +0.9.9 API documenation: matrix_double3x3_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_double3x3_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat3x3.hpp"
6 
7 namespace glm
8 {
11 
16  typedef mat<3, 3, double, lowp> lowp_dmat3;
17 
22  typedef mat<3, 3, double, mediump> mediump_dmat3;
23 
28  typedef mat<3, 3, double, highp> highp_dmat3;
29 
34  typedef mat<3, 3, double, lowp> lowp_dmat3x3;
35 
40  typedef mat<3, 3, double, mediump> mediump_dmat3x3;
41 
46  typedef mat<3, 3, double, highp> highp_dmat3x3;
47 
49 }//namespace glm
mat< 3, 3, double, highp > highp_dmat3
3 columns of 3 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 3, 3, double, highp > highp_dmat3x3
3 columns of 3 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 3, 3, double, lowp > lowp_dmat3
3 columns of 3 components matrix of double-precision floating-point numbers using low precision arith...
+
mat< 3, 3, double, lowp > lowp_dmat3x3
3 columns of 3 components matrix of double-precision floating-point numbers using low precision arith...
+
mat< 3, 3, double, mediump > mediump_dmat3
3 columns of 3 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 3, 3, double, mediump > mediump_dmat3x3
3 columns of 3 components matrix of double-precision floating-point numbers using medium precision ar...
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00116.html b/common/glm/doc/api/a00116.html new file mode 100644 index 000000000..1d89da602 --- /dev/null +++ b/common/glm/doc/api/a00116.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: matrix_double3x4.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_double3x4.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef mat< 3, 4, double, defaultp > dmat3x4
 
+

Detailed Description

+

Core features

+ +

Definition in file matrix_double3x4.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00116_source.html b/common/glm/doc/api/a00116_source.html new file mode 100644 index 000000000..ba13a5f3b --- /dev/null +++ b/common/glm/doc/api/a00116_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: matrix_double3x4.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_double3x4.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat3x4.hpp"
6 
7 namespace glm
8 {
11 
15  typedef mat<3, 4, double, defaultp> dmat3x4;
16 
18 }//namespace glm
mat< 3, 4, double, defaultp > dmat3x4
3 columns of 4 components matrix of double-precision floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00119.html b/common/glm/doc/api/a00119.html new file mode 100644 index 000000000..c7dddad9e --- /dev/null +++ b/common/glm/doc/api/a00119.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: matrix_double3x4_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_double3x4_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef mat< 3, 4, double, highp > highp_dmat3x4
 
typedef mat< 3, 4, double, lowp > lowp_dmat3x4
 
typedef mat< 3, 4, double, mediump > mediump_dmat3x4
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00119_source.html b/common/glm/doc/api/a00119_source.html new file mode 100644 index 000000000..89303c073 --- /dev/null +++ b/common/glm/doc/api/a00119_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: matrix_double3x4_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_double3x4_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat3x4.hpp"
6 
7 namespace glm
8 {
11 
16  typedef mat<3, 4, double, lowp> lowp_dmat3x4;
17 
22  typedef mat<3, 4, double, mediump> mediump_dmat3x4;
23 
28  typedef mat<3, 4, double, highp> highp_dmat3x4;
29 
31 }//namespace glm
mat< 3, 4, double, lowp > lowp_dmat3x4
3 columns of 4 components matrix of double-precision floating-point numbers using low precision arith...
+
mat< 3, 4, double, highp > highp_dmat3x4
3 columns of 4 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 3, 4, double, mediump > mediump_dmat3x4
3 columns of 4 components matrix of double-precision floating-point numbers using medium precision ar...
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00122.html b/common/glm/doc/api/a00122.html new file mode 100644 index 000000000..366ac6f4c --- /dev/null +++ b/common/glm/doc/api/a00122.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: matrix_double4x2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_double4x2.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef mat< 4, 2, double, defaultp > dmat4x2
 
+

Detailed Description

+

Core features

+ +

Definition in file matrix_double4x2.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00122_source.html b/common/glm/doc/api/a00122_source.html new file mode 100644 index 000000000..6e848aac9 --- /dev/null +++ b/common/glm/doc/api/a00122_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: matrix_double4x2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_double4x2.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat4x2.hpp"
6 
7 namespace glm
8 {
11 
15  typedef mat<4, 2, double, defaultp> dmat4x2;
16 
18 }//namespace glm
mat< 4, 2, double, defaultp > dmat4x2
4 columns of 2 components matrix of double-precision floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00125.html b/common/glm/doc/api/a00125.html new file mode 100644 index 000000000..201a58419 --- /dev/null +++ b/common/glm/doc/api/a00125.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: matrix_double4x2_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_double4x2_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef mat< 4, 2, double, highp > highp_dmat4x2
 
typedef mat< 4, 2, double, lowp > lowp_dmat4x2
 
typedef mat< 4, 2, double, mediump > mediump_dmat4x2
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00125_source.html b/common/glm/doc/api/a00125_source.html new file mode 100644 index 000000000..39577bfd1 --- /dev/null +++ b/common/glm/doc/api/a00125_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: matrix_double4x2_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_double4x2_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat4x2.hpp"
6 
7 namespace glm
8 {
11 
16  typedef mat<4, 2, double, lowp> lowp_dmat4x2;
17 
22  typedef mat<4, 2, double, mediump> mediump_dmat4x2;
23 
28  typedef mat<4, 2, double, highp> highp_dmat4x2;
29 
31 }//namespace glm
mat< 4, 2, double, highp > highp_dmat4x2
4 columns of 2 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 4, 2, double, mediump > mediump_dmat4x2
4 columns of 2 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 4, 2, double, lowp > lowp_dmat4x2
4 columns of 2 components matrix of double-precision floating-point numbers using low precision arith...
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00128.html b/common/glm/doc/api/a00128.html new file mode 100644 index 000000000..3faf985d2 --- /dev/null +++ b/common/glm/doc/api/a00128.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: matrix_double4x3.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_double4x3.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef mat< 4, 3, double, defaultp > dmat4x3
 
+

Detailed Description

+

Core features

+ +

Definition in file matrix_double4x3.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00128_source.html b/common/glm/doc/api/a00128_source.html new file mode 100644 index 000000000..1f53102d3 --- /dev/null +++ b/common/glm/doc/api/a00128_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: matrix_double4x3.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_double4x3.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat4x3.hpp"
6 
7 namespace glm
8 {
11 
15  typedef mat<4, 3, double, defaultp> dmat4x3;
16 
18 }//namespace glm
mat< 4, 3, double, defaultp > dmat4x3
4 columns of 3 components matrix of double-precision floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00131.html b/common/glm/doc/api/a00131.html new file mode 100644 index 000000000..d13c85732 --- /dev/null +++ b/common/glm/doc/api/a00131.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: matrix_double4x3_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_double4x3_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef mat< 4, 3, double, highp > highp_dmat4x3
 
typedef mat< 4, 3, double, lowp > lowp_dmat4x3
 
typedef mat< 4, 3, double, mediump > mediump_dmat4x3
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00131_source.html b/common/glm/doc/api/a00131_source.html new file mode 100644 index 000000000..8442ebff6 --- /dev/null +++ b/common/glm/doc/api/a00131_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: matrix_double4x3_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_double4x3_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat4x3.hpp"
6 
7 namespace glm
8 {
11 
16  typedef mat<4, 3, double, lowp> lowp_dmat4x3;
17 
22  typedef mat<4, 3, double, mediump> mediump_dmat4x3;
23 
28  typedef mat<4, 3, double, highp> highp_dmat4x3;
29 
31 }//namespace glm
mat< 4, 3, double, mediump > mediump_dmat4x3
4 columns of 3 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 4, 3, double, highp > highp_dmat4x3
4 columns of 3 components matrix of double-precision floating-point numbers using medium precision ar...
+
Definition: common.hpp:20
+
mat< 4, 3, double, lowp > lowp_dmat4x3
4 columns of 3 components matrix of double-precision floating-point numbers using low precision arith...
+
+ + + + diff --git a/common/glm/doc/api/a00134.html b/common/glm/doc/api/a00134.html new file mode 100644 index 000000000..062e8b629 --- /dev/null +++ b/common/glm/doc/api/a00134.html @@ -0,0 +1,97 @@ + + + + + + + +0.9.9 API documenation: matrix_double4x4.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_double4x4.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + +

+Typedefs

typedef mat< 4, 4, double, defaultp > dmat4
 
typedef mat< 4, 4, double, defaultp > dmat4x4
 
+

Detailed Description

+

Core features

+ +

Definition in file matrix_double4x4.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00134_source.html b/common/glm/doc/api/a00134_source.html new file mode 100644 index 000000000..ab49db3e5 --- /dev/null +++ b/common/glm/doc/api/a00134_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: matrix_double4x4.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_double4x4.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat4x4.hpp"
6 
7 namespace glm
8 {
11 
15  typedef mat<4, 4, double, defaultp> dmat4x4;
16 
20  typedef mat<4, 4, double, defaultp> dmat4;
21 
23 }//namespace glm
mat< 4, 4, double, defaultp > dmat4x4
4 columns of 4 components matrix of double-precision floating-point numbers.
+
mat< 4, 4, double, defaultp > dmat4
4 columns of 4 components matrix of double-precision floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00137.html b/common/glm/doc/api/a00137.html new file mode 100644 index 000000000..d4d38f698 --- /dev/null +++ b/common/glm/doc/api/a00137.html @@ -0,0 +1,105 @@ + + + + + + + +0.9.9 API documenation: matrix_double4x4_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_double4x4_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + +

+Typedefs

typedef mat< 4, 4, double, highp > highp_dmat4
 
typedef mat< 4, 4, double, highp > highp_dmat4x4
 
typedef mat< 4, 4, double, lowp > lowp_dmat4
 
typedef mat< 4, 4, double, lowp > lowp_dmat4x4
 
typedef mat< 4, 4, double, mediump > mediump_dmat4
 
typedef mat< 4, 4, double, mediump > mediump_dmat4x4
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00137_source.html b/common/glm/doc/api/a00137_source.html new file mode 100644 index 000000000..3688534a6 --- /dev/null +++ b/common/glm/doc/api/a00137_source.html @@ -0,0 +1,88 @@ + + + + + + + +0.9.9 API documenation: matrix_double4x4_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_double4x4_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat4x4.hpp"
6 
7 namespace glm
8 {
11 
16  typedef mat<4, 4, double, lowp> lowp_dmat4;
17 
22  typedef mat<4, 4, double, mediump> mediump_dmat4;
23 
28  typedef mat<4, 4, double, highp> highp_dmat4;
29 
34  typedef mat<4, 4, double, lowp> lowp_dmat4x4;
35 
40  typedef mat<4, 4, double, mediump> mediump_dmat4x4;
41 
46  typedef mat<4, 4, double, highp> highp_dmat4x4;
47 
49 }//namespace glm
mat< 4, 4, double, lowp > lowp_dmat4x4
4 columns of 4 components matrix of double-precision floating-point numbers using low precision arith...
+
mat< 4, 4, double, mediump > mediump_dmat4
4 columns of 4 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 4, 4, double, lowp > lowp_dmat4
4 columns of 4 components matrix of double-precision floating-point numbers using low precision arith...
+
mat< 4, 4, double, highp > highp_dmat4x4
4 columns of 4 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 4, 4, double, mediump > mediump_dmat4x4
4 columns of 4 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 4, 4, double, highp > highp_dmat4
4 columns of 4 components matrix of double-precision floating-point numbers using medium precision ar...
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00140.html b/common/glm/doc/api/a00140.html new file mode 100644 index 000000000..95865112e --- /dev/null +++ b/common/glm/doc/api/a00140.html @@ -0,0 +1,97 @@ + + + + + + + +0.9.9 API documenation: matrix_float2x2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_float2x2.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + +

+Typedefs

typedef mat< 2, 2, float, defaultp > mat2
 
typedef mat< 2, 2, float, defaultp > mat2x2
 
+

Detailed Description

+

Core features

+ +

Definition in file matrix_float2x2.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00140_source.html b/common/glm/doc/api/a00140_source.html new file mode 100644 index 000000000..1b696eced --- /dev/null +++ b/common/glm/doc/api/a00140_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: matrix_float2x2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_float2x2.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat2x2.hpp"
6 
7 namespace glm
8 {
11 
15  typedef mat<2, 2, float, defaultp> mat2x2;
16 
20  typedef mat<2, 2, float, defaultp> mat2;
21 
23 }//namespace glm
mat< 2, 2, float, defaultp > mat2
2 columns of 2 components matrix of single-precision floating-point numbers.
+
mat< 2, 2, float, defaultp > mat2x2
2 columns of 2 components matrix of single-precision floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00143.html b/common/glm/doc/api/a00143.html new file mode 100644 index 000000000..1f385aab5 --- /dev/null +++ b/common/glm/doc/api/a00143.html @@ -0,0 +1,105 @@ + + + + + + + +0.9.9 API documenation: matrix_float2x2_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_float2x2_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + +

+Typedefs

typedef mat< 2, 2, float, highp > highp_mat2
 
typedef mat< 2, 2, float, highp > highp_mat2x2
 
typedef mat< 2, 2, float, lowp > lowp_mat2
 
typedef mat< 2, 2, float, lowp > lowp_mat2x2
 
typedef mat< 2, 2, float, mediump > mediump_mat2
 
typedef mat< 2, 2, float, mediump > mediump_mat2x2
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00143_source.html b/common/glm/doc/api/a00143_source.html new file mode 100644 index 000000000..0d64dc98e --- /dev/null +++ b/common/glm/doc/api/a00143_source.html @@ -0,0 +1,88 @@ + + + + + + + +0.9.9 API documenation: matrix_float2x2_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_float2x2_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat2x2.hpp"
6 
7 namespace glm
8 {
11 
16  typedef mat<2, 2, float, lowp> lowp_mat2;
17 
22  typedef mat<2, 2, float, mediump> mediump_mat2;
23 
28  typedef mat<2, 2, float, highp> highp_mat2;
29 
34  typedef mat<2, 2, float, lowp> lowp_mat2x2;
35 
40  typedef mat<2, 2, float, mediump> mediump_mat2x2;
41 
46  typedef mat<2, 2, float, highp> highp_mat2x2;
47 
49 }//namespace glm
mat< 2, 2, float, mediump > mediump_mat2x2
2 columns of 2 components matrix of single-precision floating-point numbers using medium precision ar...
+
mat< 2, 2, float, highp > highp_mat2x2
2 columns of 2 components matrix of single-precision floating-point numbers using high precision arit...
+
mat< 2, 2, float, mediump > mediump_mat2
2 columns of 2 components matrix of single-precision floating-point numbers using medium precision ar...
+
mat< 2, 2, float, lowp > lowp_mat2x2
2 columns of 2 components matrix of single-precision floating-point numbers using low precision arith...
+
mat< 2, 2, float, highp > highp_mat2
2 columns of 2 components matrix of single-precision floating-point numbers using high precision arit...
+
mat< 2, 2, float, lowp > lowp_mat2
2 columns of 2 components matrix of single-precision floating-point numbers using low precision arith...
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00146.html b/common/glm/doc/api/a00146.html new file mode 100644 index 000000000..1fdd56adc --- /dev/null +++ b/common/glm/doc/api/a00146.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: matrix_float2x3.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_float2x3.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef mat< 2, 3, float, defaultp > mat2x3
 
+

Detailed Description

+

Core features

+ +

Definition in file matrix_float2x3.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00146_source.html b/common/glm/doc/api/a00146_source.html new file mode 100644 index 000000000..29b453df3 --- /dev/null +++ b/common/glm/doc/api/a00146_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: matrix_float2x3.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_float2x3.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat2x3.hpp"
6 
7 namespace glm
8 {
11 
15  typedef mat<2, 3, float, defaultp> mat2x3;
16 
18 }//namespace glm
mat< 2, 3, float, defaultp > mat2x3
2 columns of 3 components matrix of single-precision floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00149.html b/common/glm/doc/api/a00149.html new file mode 100644 index 000000000..7831a8820 --- /dev/null +++ b/common/glm/doc/api/a00149.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: matrix_float2x3_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_float2x3_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef mat< 2, 3, float, highp > highp_mat2x3
 
typedef mat< 2, 3, float, lowp > lowp_mat2x3
 
typedef mat< 2, 3, float, mediump > mediump_mat2x3
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00149_source.html b/common/glm/doc/api/a00149_source.html new file mode 100644 index 000000000..da5a6e8e9 --- /dev/null +++ b/common/glm/doc/api/a00149_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: matrix_float2x3_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_float2x3_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat2x3.hpp"
6 
7 namespace glm
8 {
11 
16  typedef mat<2, 3, float, lowp> lowp_mat2x3;
17 
22  typedef mat<2, 3, float, mediump> mediump_mat2x3;
23 
28  typedef mat<2, 3, float, highp> highp_mat2x3;
29 
31 }//namespace glm
mat< 2, 3, float, lowp > lowp_mat2x3
2 columns of 3 components matrix of single-precision floating-point numbers using low precision arith...
+
mat< 2, 3, float, highp > highp_mat2x3
2 columns of 3 components matrix of single-precision floating-point numbers using high precision arit...
+
mat< 2, 3, float, mediump > mediump_mat2x3
2 columns of 3 components matrix of single-precision floating-point numbers using medium precision ar...
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00152.html b/common/glm/doc/api/a00152.html new file mode 100644 index 000000000..6ac44583f --- /dev/null +++ b/common/glm/doc/api/a00152.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: matrix_float2x4.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_float2x4.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef mat< 2, 4, float, defaultp > mat2x4
 
+

Detailed Description

+

Core features

+ +

Definition in file matrix_float2x4.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00152_source.html b/common/glm/doc/api/a00152_source.html new file mode 100644 index 000000000..6f05a8b5b --- /dev/null +++ b/common/glm/doc/api/a00152_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: matrix_float2x4.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_float2x4.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat2x4.hpp"
6 
7 namespace glm
8 {
11 
15  typedef mat<2, 4, float, defaultp> mat2x4;
16 
18 }//namespace glm
mat< 2, 4, float, defaultp > mat2x4
2 columns of 4 components matrix of single-precision floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00155.html b/common/glm/doc/api/a00155.html new file mode 100644 index 000000000..cdea75a3b --- /dev/null +++ b/common/glm/doc/api/a00155.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: matrix_float2x4_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_float2x4_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef mat< 2, 4, float, highp > highp_mat2x4
 
typedef mat< 2, 4, float, lowp > lowp_mat2x4
 
typedef mat< 2, 4, float, mediump > mediump_mat2x4
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00155_source.html b/common/glm/doc/api/a00155_source.html new file mode 100644 index 000000000..37f7267e1 --- /dev/null +++ b/common/glm/doc/api/a00155_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: matrix_float2x4_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_float2x4_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat2x4.hpp"
6 
7 namespace glm
8 {
11 
16  typedef mat<2, 4, float, lowp> lowp_mat2x4;
17 
22  typedef mat<2, 4, float, mediump> mediump_mat2x4;
23 
28  typedef mat<2, 4, float, highp> highp_mat2x4;
29 
31 }//namespace glm
mat< 2, 4, float, mediump > mediump_mat2x4
2 columns of 4 components matrix of single-precision floating-point numbers using medium precision ar...
+
mat< 2, 4, float, lowp > lowp_mat2x4
2 columns of 4 components matrix of single-precision floating-point numbers using low precision arith...
+
mat< 2, 4, float, highp > highp_mat2x4
2 columns of 4 components matrix of single-precision floating-point numbers using high precision arit...
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00158.html b/common/glm/doc/api/a00158.html new file mode 100644 index 000000000..6711c658c --- /dev/null +++ b/common/glm/doc/api/a00158.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: matrix_float3x2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_float3x2.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef mat< 3, 2, float, defaultp > mat3x2
 
+

Detailed Description

+

Core features

+ +

Definition in file matrix_float3x2.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00158_source.html b/common/glm/doc/api/a00158_source.html new file mode 100644 index 000000000..29f555287 --- /dev/null +++ b/common/glm/doc/api/a00158_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: matrix_float3x2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_float3x2.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat3x2.hpp"
6 
7 namespace glm
8 {
11 
15  typedef mat<3, 2, float, defaultp> mat3x2;
16 
18 }//namespace glm
mat< 3, 2, float, defaultp > mat3x2
3 columns of 2 components matrix of single-precision floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00161.html b/common/glm/doc/api/a00161.html new file mode 100644 index 000000000..0af2dea50 --- /dev/null +++ b/common/glm/doc/api/a00161.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: matrix_float3x2_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_float3x2_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef mat< 3, 2, float, highp > highp_mat3x2
 
typedef mat< 3, 2, float, lowp > lowp_mat3x2
 
typedef mat< 3, 2, float, mediump > mediump_mat3x2
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00161_source.html b/common/glm/doc/api/a00161_source.html new file mode 100644 index 000000000..821aa50c5 --- /dev/null +++ b/common/glm/doc/api/a00161_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: matrix_float3x2_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_float3x2_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat3x2.hpp"
6 
7 namespace glm
8 {
11 
16  typedef mat<3, 2, float, lowp> lowp_mat3x2;
17 
22  typedef mat<3, 2, float, mediump> mediump_mat3x2;
23 
28  typedef mat<3, 2, float, highp> highp_mat3x2;
29 
31 }//namespace glm
mat< 3, 2, float, lowp > lowp_mat3x2
3 columns of 2 components matrix of single-precision floating-point numbers using low precision arith...
+
Definition: common.hpp:20
+
mat< 3, 2, float, mediump > mediump_mat3x2
3 columns of 2 components matrix of single-precision floating-point numbers using medium precision ar...
+
mat< 3, 2, float, highp > highp_mat3x2
3 columns of 2 components matrix of single-precision floating-point numbers using high precision arit...
+
+ + + + diff --git a/common/glm/doc/api/a00164.html b/common/glm/doc/api/a00164.html new file mode 100644 index 000000000..f813ce596 --- /dev/null +++ b/common/glm/doc/api/a00164.html @@ -0,0 +1,97 @@ + + + + + + + +0.9.9 API documenation: matrix_float3x3.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_float3x3.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + +

+Typedefs

typedef mat< 3, 3, float, defaultp > mat3
 
typedef mat< 3, 3, float, defaultp > mat3x3
 
+

Detailed Description

+

Core features

+ +

Definition in file matrix_float3x3.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00164_source.html b/common/glm/doc/api/a00164_source.html new file mode 100644 index 000000000..b3651e167 --- /dev/null +++ b/common/glm/doc/api/a00164_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: matrix_float3x3.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_float3x3.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat3x3.hpp"
6 
7 namespace glm
8 {
11 
15  typedef mat<3, 3, float, defaultp> mat3x3;
16 
20  typedef mat<3, 3, float, defaultp> mat3;
21 
23 }//namespace glm
mat< 3, 3, float, defaultp > mat3x3
3 columns of 3 components matrix of single-precision floating-point numbers.
+
mat< 3, 3, float, defaultp > mat3
3 columns of 3 components matrix of single-precision floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00167.html b/common/glm/doc/api/a00167.html new file mode 100644 index 000000000..e5d813b65 --- /dev/null +++ b/common/glm/doc/api/a00167.html @@ -0,0 +1,105 @@ + + + + + + + +0.9.9 API documenation: matrix_float3x3_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_float3x3_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + +

+Typedefs

typedef mat< 3, 3, float, highp > highp_mat3
 
typedef mat< 3, 3, float, highp > highp_mat3x3
 
typedef mat< 3, 3, float, lowp > lowp_mat3
 
typedef mat< 3, 3, float, lowp > lowp_mat3x3
 
typedef mat< 3, 3, float, mediump > mediump_mat3
 
typedef mat< 3, 3, float, mediump > mediump_mat3x3
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00167_source.html b/common/glm/doc/api/a00167_source.html new file mode 100644 index 000000000..014ee5907 --- /dev/null +++ b/common/glm/doc/api/a00167_source.html @@ -0,0 +1,88 @@ + + + + + + + +0.9.9 API documenation: matrix_float3x3_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_float3x3_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat3x3.hpp"
6 
7 namespace glm
8 {
11 
16  typedef mat<3, 3, float, lowp> lowp_mat3;
17 
22  typedef mat<3, 3, float, mediump> mediump_mat3;
23 
28  typedef mat<3, 3, float, highp> highp_mat3;
29 
34  typedef mat<3, 3, float, lowp> lowp_mat3x3;
35 
40  typedef mat<3, 3, float, mediump> mediump_mat3x3;
41 
46  typedef mat<3, 3, float, highp> highp_mat3x3;
47 
49 }//namespace glm
mat< 3, 3, float, highp > highp_mat3x3
3 columns of 3 components matrix of single-precision floating-point numbers using high precision arit...
+
mat< 3, 3, float, highp > highp_mat3
3 columns of 3 components matrix of single-precision floating-point numbers using high precision arit...
+
mat< 3, 3, float, lowp > lowp_mat3x3
3 columns of 3 components matrix of single-precision floating-point numbers using low precision arith...
+
mat< 3, 3, float, mediump > mediump_mat3
3 columns of 3 components matrix of single-precision floating-point numbers using medium precision ar...
+
mat< 3, 3, float, mediump > mediump_mat3x3
3 columns of 3 components matrix of single-precision floating-point numbers using medium precision ar...
+
mat< 3, 3, float, lowp > lowp_mat3
3 columns of 3 components matrix of single-precision floating-point numbers using low precision arith...
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00170.html b/common/glm/doc/api/a00170.html new file mode 100644 index 000000000..950d3ee05 --- /dev/null +++ b/common/glm/doc/api/a00170.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: matrix_float3x4.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_float3x4.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef mat< 3, 4, float, defaultp > mat3x4
 
+

Detailed Description

+

Core features

+ +

Definition in file matrix_float3x4.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00170_source.html b/common/glm/doc/api/a00170_source.html new file mode 100644 index 000000000..a91d0f3ef --- /dev/null +++ b/common/glm/doc/api/a00170_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: matrix_float3x4.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_float3x4.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat3x4.hpp"
6 
7 namespace glm
8 {
11 
15  typedef mat<3, 4, float, defaultp> mat3x4;
16 
18 }//namespace glm
mat< 3, 4, float, defaultp > mat3x4
3 columns of 4 components matrix of single-precision floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00173.html b/common/glm/doc/api/a00173.html new file mode 100644 index 000000000..edfbf09c6 --- /dev/null +++ b/common/glm/doc/api/a00173.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: matrix_float3x4_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_float3x4_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef mat< 3, 4, float, highp > highp_mat3x4
 
typedef mat< 3, 4, float, lowp > lowp_mat3x4
 
typedef mat< 3, 4, float, mediump > mediump_mat3x4
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00173_source.html b/common/glm/doc/api/a00173_source.html new file mode 100644 index 000000000..207a2d5b4 --- /dev/null +++ b/common/glm/doc/api/a00173_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: matrix_float3x4_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_float3x4_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat3x4.hpp"
6 
7 namespace glm
8 {
11 
16  typedef mat<3, 4, float, lowp> lowp_mat3x4;
17 
22  typedef mat<3, 4, float, mediump> mediump_mat3x4;
23 
28  typedef mat<3, 4, float, highp> highp_mat3x4;
29 
31 }//namespace glm
mat< 3, 4, float, highp > highp_mat3x4
3 columns of 4 components matrix of single-precision floating-point numbers using high precision arit...
+
mat< 3, 4, float, mediump > mediump_mat3x4
3 columns of 4 components matrix of single-precision floating-point numbers using medium precision ar...
+
Definition: common.hpp:20
+
mat< 3, 4, float, lowp > lowp_mat3x4
3 columns of 4 components matrix of single-precision floating-point numbers using low precision arith...
+
+ + + + diff --git a/common/glm/doc/api/a00176.html b/common/glm/doc/api/a00176.html new file mode 100644 index 000000000..cbce04ad2 --- /dev/null +++ b/common/glm/doc/api/a00176.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: matrix_float4x2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_float4x2.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef mat< 4, 2, float, defaultp > mat4x2
 
+

Detailed Description

+

Core features

+ +

Definition in file matrix_float4x2.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00176_source.html b/common/glm/doc/api/a00176_source.html new file mode 100644 index 000000000..b24365ce2 --- /dev/null +++ b/common/glm/doc/api/a00176_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: matrix_float4x2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_float4x2.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat4x2.hpp"
6 
7 namespace glm
8 {
11 
15  typedef mat<4, 2, float, defaultp> mat4x2;
16 
18 }//namespace glm
mat< 4, 2, float, defaultp > mat4x2
4 columns of 2 components matrix of single-precision floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00179_source.html b/common/glm/doc/api/a00179_source.html new file mode 100644 index 000000000..53ea725fd --- /dev/null +++ b/common/glm/doc/api/a00179_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: matrix_float4x2_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_float4x2_precision.hpp
+
+
+
1 
4 #pragma once
5 #include "../detail/type_mat2x2.hpp"
6 
7 namespace glm
8 {
11 
16  typedef mat<4, 2, float, lowp> lowp_mat4x2;
17 
22  typedef mat<4, 2, float, mediump> mediump_mat4x2;
23 
28  typedef mat<4, 2, float, highp> highp_mat4x2;
29 
31 }//namespace glm
mat< 4, 2, float, lowp > lowp_mat4x2
4 columns of 2 components matrix of single-precision floating-point numbers using low precision arith...
+
mat< 4, 2, float, mediump > mediump_mat4x2
4 columns of 2 components matrix of single-precision floating-point numbers using medium precision ar...
+
Definition: common.hpp:20
+
mat< 4, 2, float, highp > highp_mat4x2
4 columns of 2 components matrix of single-precision floating-point numbers using high precision arit...
+
+ + + + diff --git a/common/glm/doc/api/a00182.html b/common/glm/doc/api/a00182.html new file mode 100644 index 000000000..56a1ceecf --- /dev/null +++ b/common/glm/doc/api/a00182.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: matrix_float4x3.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_float4x3.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef mat< 4, 3, float, defaultp > mat4x3
 
+

Detailed Description

+

Core features

+ +

Definition in file matrix_float4x3.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00182_source.html b/common/glm/doc/api/a00182_source.html new file mode 100644 index 000000000..1a1968eab --- /dev/null +++ b/common/glm/doc/api/a00182_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: matrix_float4x3.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_float4x3.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat4x3.hpp"
6 
7 namespace glm
8 {
11 
15  typedef mat<4, 3, float, defaultp> mat4x3;
16 
18 }//namespace glm
mat< 4, 3, float, defaultp > mat4x3
4 columns of 3 components matrix of single-precision floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00185.html b/common/glm/doc/api/a00185.html new file mode 100644 index 000000000..b194cb829 --- /dev/null +++ b/common/glm/doc/api/a00185.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: matrix_float4x3_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_float4x3_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef mat< 4, 3, float, highp > highp_mat4x3
 
typedef mat< 4, 3, float, lowp > lowp_mat4x3
 
typedef mat< 4, 3, float, mediump > mediump_mat4x3
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00185_source.html b/common/glm/doc/api/a00185_source.html new file mode 100644 index 000000000..d782336a4 --- /dev/null +++ b/common/glm/doc/api/a00185_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: matrix_float4x3_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_float4x3_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat4x3.hpp"
6 
7 namespace glm
8 {
11 
16  typedef mat<4, 3, float, lowp> lowp_mat4x3;
17 
22  typedef mat<4, 3, float, mediump> mediump_mat4x3;
23 
28  typedef mat<4, 3, float, highp> highp_mat4x3;
29 
31 }//namespace glm
mat< 4, 3, float, mediump > mediump_mat4x3
4 columns of 3 components matrix of single-precision floating-point numbers using medium precision ar...
+
mat< 4, 3, float, lowp > lowp_mat4x3
4 columns of 3 components matrix of single-precision floating-point numbers using low precision arith...
+
mat< 4, 3, float, highp > highp_mat4x3
4 columns of 3 components matrix of single-precision floating-point numbers using high precision arit...
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00188.html b/common/glm/doc/api/a00188.html new file mode 100644 index 000000000..bf3559cf0 --- /dev/null +++ b/common/glm/doc/api/a00188.html @@ -0,0 +1,93 @@ + + + + + + + +0.9.9 API documenation: matrix_float4x4.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_float4x4.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + +
typedef mat< 4, 4, float, defaultp > mat4x4
 
typedef mat< 4, 4, float, defaultp > mat4
 
+

Detailed Description

+

Core features

+ +

Definition in file matrix_float4x4.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00188_source.html b/common/glm/doc/api/a00188_source.html new file mode 100644 index 000000000..045058a37 --- /dev/null +++ b/common/glm/doc/api/a00188_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: matrix_float4x4.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_float4x4.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat4x4.hpp"
6 
7 namespace glm
8 {
11 
15  typedef mat<4, 4, float, defaultp> mat4x4;
16 
20  typedef mat<4, 4, float, defaultp> mat4;
21 
23 }//namespace glm
mat< 4, 4, float, defaultp > mat4
4 columns of 4 components matrix of single-precision floating-point numbers.
+
Definition: common.hpp:20
+
mat< 4, 4, float, defaultp > mat4x4
4 columns of 4 components matrix of single-precision floating-point numbers.
+
+ + + + diff --git a/common/glm/doc/api/a00191.html b/common/glm/doc/api/a00191.html new file mode 100644 index 000000000..6190cac1d --- /dev/null +++ b/common/glm/doc/api/a00191.html @@ -0,0 +1,105 @@ + + + + + + + +0.9.9 API documenation: matrix_float4x4_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_float4x4_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + +

+Typedefs

typedef mat< 4, 4, float, highp > highp_mat4
 
typedef mat< 4, 4, float, highp > highp_mat4x4
 
typedef mat< 4, 4, float, lowp > lowp_mat4
 
typedef mat< 4, 4, float, lowp > lowp_mat4x4
 
typedef mat< 4, 4, float, mediump > mediump_mat4
 
typedef mat< 4, 4, float, mediump > mediump_mat4x4
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00191_source.html b/common/glm/doc/api/a00191_source.html new file mode 100644 index 000000000..d1a2d2e3e --- /dev/null +++ b/common/glm/doc/api/a00191_source.html @@ -0,0 +1,88 @@ + + + + + + + +0.9.9 API documenation: matrix_float4x4_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_float4x4_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_mat4x4.hpp"
6 
7 namespace glm
8 {
11 
16  typedef mat<4, 4, float, lowp> lowp_mat4;
17 
22  typedef mat<4, 4, float, mediump> mediump_mat4;
23 
28  typedef mat<4, 4, float, highp> highp_mat4;
29 
34  typedef mat<4, 4, float, lowp> lowp_mat4x4;
35 
40  typedef mat<4, 4, float, mediump> mediump_mat4x4;
41 
46  typedef mat<4, 4, float, highp> highp_mat4x4;
47 
49 }//namespace glm
mat< 4, 4, float, lowp > lowp_mat4
4 columns of 4 components matrix of single-precision floating-point numbers using low precision arith...
+
mat< 4, 4, float, highp > highp_mat4x4
4 columns of 4 components matrix of single-precision floating-point numbers using high precision arit...
+
mat< 4, 4, float, highp > highp_mat4
4 columns of 4 components matrix of single-precision floating-point numbers using high precision arit...
+
mat< 4, 4, float, mediump > mediump_mat4x4
4 columns of 4 components matrix of single-precision floating-point numbers using medium precision ar...
+
mat< 4, 4, float, mediump > mediump_mat4
4 columns of 4 components matrix of single-precision floating-point numbers using medium precision ar...
+
Definition: common.hpp:20
+
mat< 4, 4, float, lowp > lowp_mat4x4
4 columns of 4 components matrix of single-precision floating-point numbers using low precision arith...
+
+ + + + diff --git a/common/glm/doc/api/a00194.html b/common/glm/doc/api/a00194.html new file mode 100644 index 000000000..6fd650df1 --- /dev/null +++ b/common/glm/doc/api/a00194.html @@ -0,0 +1,114 @@ + + + + + + + +0.9.9 API documenation: matrix_projection.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_projection.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q, typename U >
GLM_FUNC_DECL mat< 4, 4, T, Q > pickMatrix (vec< 2, T, Q > const &center, vec< 2, T, Q > const &delta, vec< 4, U, Q > const &viewport)
 
template<typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > project (vec< 3, T, Q > const &obj, mat< 4, 4, T, Q > const &model, mat< 4, 4, T, Q > const &proj, vec< 4, U, Q > const &viewport)
 
template<typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > projectNO (vec< 3, T, Q > const &obj, mat< 4, 4, T, Q > const &model, mat< 4, 4, T, Q > const &proj, vec< 4, U, Q > const &viewport)
 
template<typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > projectZO (vec< 3, T, Q > const &obj, mat< 4, 4, T, Q > const &model, mat< 4, 4, T, Q > const &proj, vec< 4, U, Q > const &viewport)
 
template<typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > unProject (vec< 3, T, Q > const &win, mat< 4, 4, T, Q > const &model, mat< 4, 4, T, Q > const &proj, vec< 4, U, Q > const &viewport)
 
template<typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > unProjectNO (vec< 3, T, Q > const &win, mat< 4, 4, T, Q > const &model, mat< 4, 4, T, Q > const &proj, vec< 4, U, Q > const &viewport)
 
template<typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > unProjectZO (vec< 3, T, Q > const &win, mat< 4, 4, T, Q > const &model, mat< 4, 4, T, Q > const &proj, vec< 4, U, Q > const &viewport)
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00194_source.html b/common/glm/doc/api/a00194_source.html new file mode 100644 index 000000000..64de6d0ae --- /dev/null +++ b/common/glm/doc/api/a00194_source.html @@ -0,0 +1,90 @@ + + + + + + + +0.9.9 API documenation: matrix_projection.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_projection.hpp
+
+
+Go to the documentation of this file.
1 
20 #pragma once
21 
22 // Dependencies
23 #include "../gtc/constants.hpp"
24 #include "../geometric.hpp"
25 #include "../trigonometric.hpp"
26 #include "../matrix.hpp"
27 
28 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
29 # pragma message("GLM: GLM_EXT_matrix_projection extension included")
30 #endif
31 
32 namespace glm
33 {
36 
49  template<typename T, typename U, qualifier Q>
50  GLM_FUNC_DECL vec<3, T, Q> projectZO(
51  vec<3, T, Q> const& obj, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport);
52 
65  template<typename T, typename U, qualifier Q>
66  GLM_FUNC_DECL vec<3, T, Q> projectNO(
67  vec<3, T, Q> const& obj, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport);
68 
81  template<typename T, typename U, qualifier Q>
82  GLM_FUNC_DECL vec<3, T, Q> project(
83  vec<3, T, Q> const& obj, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport);
84 
97  template<typename T, typename U, qualifier Q>
98  GLM_FUNC_DECL vec<3, T, Q> unProjectZO(
99  vec<3, T, Q> const& win, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport);
100 
113  template<typename T, typename U, qualifier Q>
114  GLM_FUNC_DECL vec<3, T, Q> unProjectNO(
115  vec<3, T, Q> const& win, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport);
116 
129  template<typename T, typename U, qualifier Q>
130  GLM_FUNC_DECL vec<3, T, Q> unProject(
131  vec<3, T, Q> const& win, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport);
132 
142  template<typename T, qualifier Q, typename U>
143  GLM_FUNC_DECL mat<4, 4, T, Q> pickMatrix(
144  vec<2, T, Q> const& center, vec<2, T, Q> const& delta, vec<4, U, Q> const& viewport);
145 
147 }//namespace glm
148 
149 #include "matrix_projection.inl"
GLM_FUNC_DECL mat< 4, 4, T, Q > pickMatrix(vec< 2, T, Q > const &center, vec< 2, T, Q > const &delta, vec< 4, U, Q > const &viewport)
Define a picking region.
+
GLM_FUNC_DECL vec< 3, T, Q > projectNO(vec< 3, T, Q > const &obj, mat< 4, 4, T, Q > const &model, mat< 4, 4, T, Q > const &proj, vec< 4, U, Q > const &viewport)
Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates.
+
GLM_FUNC_DECL genType proj(genType const &x, genType const &Normal)
Projects x on Normal.
+
GLM_FUNC_DECL vec< 3, T, Q > projectZO(vec< 3, T, Q > const &obj, mat< 4, 4, T, Q > const &model, mat< 4, 4, T, Q > const &proj, vec< 4, U, Q > const &viewport)
Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates.
+
GLM_FUNC_DECL vec< 3, T, Q > unProjectNO(vec< 3, T, Q > const &win, mat< 4, 4, T, Q > const &model, mat< 4, 4, T, Q > const &proj, vec< 4, U, Q > const &viewport)
Map the specified window coordinates (win.x, win.y, win.z) into object coordinates.
+
GLM_FUNC_DECL vec< 3, T, Q > unProjectZO(vec< 3, T, Q > const &win, mat< 4, 4, T, Q > const &model, mat< 4, 4, T, Q > const &proj, vec< 4, U, Q > const &viewport)
Map the specified window coordinates (win.x, win.y, win.z) into object coordinates.
+
GLM_FUNC_DECL vec< 3, T, Q > project(vec< 3, T, Q > const &obj, mat< 4, 4, T, Q > const &model, mat< 4, 4, T, Q > const &proj, vec< 4, U, Q > const &viewport)
Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates using default near...
+
GLM_FUNC_DECL vec< 3, T, Q > unProject(vec< 3, T, Q > const &win, mat< 4, 4, T, Q > const &model, mat< 4, 4, T, Q > const &proj, vec< 4, U, Q > const &viewport)
Map the specified window coordinates (win.x, win.y, win.z) into object coordinates using default near...
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00197.html b/common/glm/doc/api/a00197.html new file mode 100644 index 000000000..f7cdae2b0 --- /dev/null +++ b/common/glm/doc/api/a00197.html @@ -0,0 +1,111 @@ + + + + + + + +0.9.9 API documenation: matrix_relational.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_relational.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + +

+Functions

template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< C, bool, Q > equal (mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y)
 
template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< C, bool, Q > equal (mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y, T epsilon)
 
template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< C, bool, Q > equal (mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y, vec< C, T, Q > const &epsilon)
 
template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< C, bool, Q > notEqual (mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y)
 
template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< C, bool, Q > notEqual (mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y, T epsilon)
 
template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< C, bool, Q > notEqual (mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y, vec< C, T, Q > const &epsilon)
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00197_source.html b/common/glm/doc/api/a00197_source.html new file mode 100644 index 000000000..66da8d620 --- /dev/null +++ b/common/glm/doc/api/a00197_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: matrix_relational.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_relational.hpp
+
+
+Go to the documentation of this file.
1 
15 #pragma once
16 
17 // Dependencies
18 #include "../detail/qualifier.hpp"
19 
20 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
21 # pragma message("GLM: GLM_EXT_matrix_relational extension included")
22 #endif
23 
24 namespace glm
25 {
28 
36  template<length_t C, length_t R, typename T, qualifier Q>
37  GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> equal(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y);
38 
46  template<length_t C, length_t R, typename T, qualifier Q>
47  GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> equal(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, T epsilon);
48 
56  template<length_t C, length_t R, typename T, qualifier Q>
57  GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> equal(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, vec<C, T, Q> const& epsilon);
58 
66  template<length_t C, length_t R, typename T, qualifier Q>
67  GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> notEqual(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y);
68 
76  template<length_t C, length_t R, typename T, qualifier Q>
77  GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> notEqual(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, T epsilon);
78 
86  template<length_t C, length_t R, typename T, qualifier Q>
87  GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> notEqual(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, vec<C, T, Q> const& epsilon);
88 
90 }//namespace glm
91 
92 #include "matrix_relational.inl"
GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon()
Return the epsilon constant for floating point types.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< C, bool, Q > notEqual(mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y, vec< C, T, Q > const &epsilon)
Returns the component-wise comparison of |x - y| >= epsilon.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< C, bool, Q > equal(mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y, vec< C, T, Q > const &epsilon)
Returns the component-wise comparison of |x - y| < epsilon.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00203.html b/common/glm/doc/api/a00203.html new file mode 100644 index 000000000..85cf7fa55 --- /dev/null +++ b/common/glm/doc/api/a00203.html @@ -0,0 +1,114 @@ + + + + + + + +0.9.9 API documenation: quaternion_common.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
quaternion_common.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > conjugate (qua< T, Q > const &q)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > inverse (qua< T, Q > const &q)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > isinf (qua< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > isnan (qua< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > lerp (qua< T, Q > const &x, qua< T, Q > const &y, T a)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > mix (qua< T, Q > const &x, qua< T, Q > const &y, T a)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > slerp (qua< T, Q > const &x, qua< T, Q > const &y, T a)
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00203_source.html b/common/glm/doc/api/a00203_source.html new file mode 100644 index 000000000..86ce61796 --- /dev/null +++ b/common/glm/doc/api/a00203_source.html @@ -0,0 +1,89 @@ + + + + + + + +0.9.9 API documenation: quaternion_common.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
quaternion_common.hpp
+
+
+Go to the documentation of this file.
1 
21 #pragma once
22 
23 // Dependency:
24 #include "../ext/scalar_constants.hpp"
25 #include "../ext/quaternion_geometric.hpp"
26 #include "../common.hpp"
27 #include "../trigonometric.hpp"
28 #include "../exponential.hpp"
29 #include <limits>
30 
31 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
32 # pragma message("GLM: GLM_EXT_quaternion_common extension included")
33 #endif
34 
35 namespace glm
36 {
39 
52  template<typename T, qualifier Q>
53  GLM_FUNC_DECL qua<T, Q> mix(qua<T, Q> const& x, qua<T, Q> const& y, T a);
54 
64  template<typename T, qualifier Q>
65  GLM_FUNC_DECL qua<T, Q> lerp(qua<T, Q> const& x, qua<T, Q> const& y, T a);
66 
76  template<typename T, qualifier Q>
77  GLM_FUNC_DECL qua<T, Q> slerp(qua<T, Q> const& x, qua<T, Q> const& y, T a);
78 
83  template<typename T, qualifier Q>
84  GLM_FUNC_DECL qua<T, Q> conjugate(qua<T, Q> const& q);
85 
90  template<typename T, qualifier Q>
91  GLM_FUNC_DECL qua<T, Q> inverse(qua<T, Q> const& q);
92 
103  template<typename T, qualifier Q>
104  GLM_FUNC_DECL vec<4, bool, Q> isnan(qua<T, Q> const& x);
105 
114  template<typename T, qualifier Q>
115  GLM_FUNC_DECL vec<4, bool, Q> isinf(qua<T, Q> const& x);
116 
118 } //namespace glm
119 
120 #include "quaternion_common.inl"
GLM_FUNC_DECL qua< T, Q > mix(qua< T, Q > const &x, qua< T, Q > const &y, T a)
Spherical linear interpolation of two quaternions.
+
GLM_FUNC_DECL qua< T, Q > slerp(qua< T, Q > const &x, qua< T, Q > const &y, T a)
Spherical linear interpolation of two quaternions.
+
GLM_FUNC_DECL vec< 4, bool, Q > isinf(qua< T, Q > const &x)
Returns true if x holds a positive infinity or negative infinity representation in the underlying imp...
+
GLM_FUNC_DECL qua< T, Q > conjugate(qua< T, Q > const &q)
Returns the q conjugate.
+
GLM_FUNC_DECL qua< T, Q > inverse(qua< T, Q > const &q)
Returns the q inverse.
+
GLM_FUNC_DECL vec< 4, bool, Q > isnan(qua< T, Q > const &x)
Returns true if x holds a NaN (not a number) representation in the underlying implementation&#39;s set of...
+
Definition: common.hpp:20
+
GLM_FUNC_DECL qua< T, Q > lerp(qua< T, Q > const &x, qua< T, Q > const &y, T a)
Linear interpolation of two quaternions.
+
+ + + + diff --git a/common/glm/doc/api/a00206.html b/common/glm/doc/api/a00206.html new file mode 100644 index 000000000..dcc783fd9 --- /dev/null +++ b/common/glm/doc/api/a00206.html @@ -0,0 +1,96 @@ + + + + + + + +0.9.9 API documenation: quaternion_double.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
quaternion_double.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

+typedef qua< double, defaultp > dquat
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00206_source.html b/common/glm/doc/api/a00206_source.html new file mode 100644 index 000000000..22348f124 --- /dev/null +++ b/common/glm/doc/api/a00206_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: quaternion_double.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
quaternion_double.hpp
+
+
+Go to the documentation of this file.
1 
20 #pragma once
21 
22 // Dependency:
23 #include "../detail/type_quat.hpp"
24 
25 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
26 # pragma message("GLM: GLM_EXT_quaternion_double extension included")
27 #endif
28 
29 namespace glm
30 {
33 
35  typedef qua<double, defaultp> dquat;
36 
38 } //namespace glm
39 
qua< double, defaultp > dquat
Quaternion of double-precision floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00209.html b/common/glm/doc/api/a00209.html new file mode 100644 index 000000000..1513127eb --- /dev/null +++ b/common/glm/doc/api/a00209.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: quaternion_double_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
quaternion_double_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef qua< double, highp > highp_dquat
 
typedef qua< double, lowp > lowp_dquat
 
typedef qua< double, mediump > mediump_dquat
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00209_source.html b/common/glm/doc/api/a00209_source.html new file mode 100644 index 000000000..cfd342b36 --- /dev/null +++ b/common/glm/doc/api/a00209_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: quaternion_double_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
quaternion_double_precision.hpp
+
+
+Go to the documentation of this file.
1 
11 #pragma once
12 
13 // Dependency:
14 #include "../detail/type_quat.hpp"
15 
16 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
17 # pragma message("GLM: GLM_EXT_quaternion_double_precision extension included")
18 #endif
19 
20 namespace glm
21 {
24 
28  typedef qua<double, lowp> lowp_dquat;
29 
33  typedef qua<double, mediump> mediump_dquat;
34 
38  typedef qua<double, highp> highp_dquat;
39 
41 } //namespace glm
42 
qua< double, highp > highp_dquat
Quaternion of high double-qualifier floating-point numbers using high precision arithmetic in term of...
+
qua< double, lowp > lowp_dquat
Quaternion of double-precision floating-point numbers using high precision arithmetic in term of ULPs...
+
qua< double, mediump > mediump_dquat
Quaternion of medium double-qualifier floating-point numbers using high precision arithmetic in term ...
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00212.html b/common/glm/doc/api/a00212.html new file mode 100644 index 000000000..d731bd7d1 --- /dev/null +++ b/common/glm/doc/api/a00212.html @@ -0,0 +1,105 @@ + + + + + + + +0.9.9 API documenation: quaternion_exponential.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
quaternion_exponential.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > exp (qua< T, Q > const &q)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > log (qua< T, Q > const &q)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > pow (qua< T, Q > const &q, T y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > sqrt (qua< T, Q > const &q)
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00212_source.html b/common/glm/doc/api/a00212_source.html new file mode 100644 index 000000000..eddcf467e --- /dev/null +++ b/common/glm/doc/api/a00212_source.html @@ -0,0 +1,86 @@ + + + + + + + +0.9.9 API documenation: quaternion_exponential.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
quaternion_exponential.hpp
+
+
+Go to the documentation of this file.
1 
15 #pragma once
16 
17 // Dependency:
18 #include "../common.hpp"
19 #include "../trigonometric.hpp"
20 #include "../geometric.hpp"
21 #include "../ext/scalar_constants.hpp"
22 
23 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
24 # pragma message("GLM: GLM_EXT_quaternion_exponential extension included")
25 #endif
26 
27 namespace glm
28 {
31 
36  template<typename T, qualifier Q>
37  GLM_FUNC_DECL qua<T, Q> exp(qua<T, Q> const& q);
38 
43  template<typename T, qualifier Q>
44  GLM_FUNC_DECL qua<T, Q> log(qua<T, Q> const& q);
45 
50  template<typename T, qualifier Q>
51  GLM_FUNC_DECL qua<T, Q> pow(qua<T, Q> const& q, T y);
52 
57  template<typename T, qualifier Q>
58  GLM_FUNC_DECL qua<T, Q> sqrt(qua<T, Q> const& q);
59 
61 } //namespace glm
62 
63 #include "quaternion_exponential.inl"
GLM_FUNC_DECL qua< T, Q > exp(qua< T, Q > const &q)
Returns a exponential of a quaternion.
+
GLM_FUNC_DECL qua< T, Q > sqrt(qua< T, Q > const &q)
Returns the square root of a quaternion.
+
GLM_FUNC_DECL qua< T, Q > log(qua< T, Q > const &q)
Returns a logarithm of a quaternion.
+
GLM_FUNC_DECL qua< T, Q > pow(qua< T, Q > const &q, T y)
Returns a quaternion raised to a power.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00215.html b/common/glm/doc/api/a00215.html new file mode 100644 index 000000000..99df553d0 --- /dev/null +++ b/common/glm/doc/api/a00215.html @@ -0,0 +1,96 @@ + + + + + + + +0.9.9 API documenation: quaternion_float.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
quaternion_float.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

+typedef qua< float, defaultp > quat
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00215_source.html b/common/glm/doc/api/a00215_source.html new file mode 100644 index 000000000..f20984b88 --- /dev/null +++ b/common/glm/doc/api/a00215_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: quaternion_float.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
quaternion_float.hpp
+
+
+Go to the documentation of this file.
1 
20 #pragma once
21 
22 // Dependency:
23 #include "../detail/type_quat.hpp"
24 
25 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
26 # pragma message("GLM: GLM_EXT_quaternion_float extension included")
27 #endif
28 
29 namespace glm
30 {
33 
35  typedef qua<float, defaultp> quat;
36 
38 } //namespace glm
39 
qua< float, defaultp > quat
Quaternion of single-precision floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00218.html b/common/glm/doc/api/a00218.html new file mode 100644 index 000000000..b4d83281d --- /dev/null +++ b/common/glm/doc/api/a00218.html @@ -0,0 +1,102 @@ + + + + + + + +0.9.9 API documenation: quaternion_float_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
quaternion_float_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

+typedef qua< float, highp > highp_quat
 
+typedef qua< float, lowp > lowp_quat
 
+typedef qua< float, mediump > mediump_quat
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00218_source.html b/common/glm/doc/api/a00218_source.html new file mode 100644 index 000000000..2daf06678 --- /dev/null +++ b/common/glm/doc/api/a00218_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: quaternion_float_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
quaternion_float_precision.hpp
+
+
+Go to the documentation of this file.
1 
11 #pragma once
12 
13 // Dependency:
14 #include "../detail/type_quat.hpp"
15 
16 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
17 # pragma message("GLM: GLM_EXT_quaternion_float_precision extension included")
18 #endif
19 
20 namespace glm
21 {
24 
26  typedef qua<float, lowp> lowp_quat;
27 
29  typedef qua<float, mediump> mediump_quat;
30 
32  typedef qua<float, highp> highp_quat;
33 
35 } //namespace glm
36 
qua< float, lowp > lowp_quat
Quaternion of single-precision floating-point numbers using high precision arithmetic in term of ULPs...
+
qua< float, mediump > mediump_quat
Quaternion of single-precision floating-point numbers using high precision arithmetic in term of ULPs...
+
Definition: common.hpp:20
+
qua< float, highp > highp_quat
Quaternion of single-precision floating-point numbers using high precision arithmetic in term of ULPs...
+
+ + + + diff --git a/common/glm/doc/api/a00221.html b/common/glm/doc/api/a00221.html new file mode 100644 index 000000000..d9979977f --- /dev/null +++ b/common/glm/doc/api/a00221.html @@ -0,0 +1,105 @@ + + + + + + + +0.9.9 API documenation: quaternion_geometric.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
quaternion_geometric.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER qua< T, Q > cross (qua< T, Q > const &q1, qua< T, Q > const &q2)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T dot (qua< T, Q > const &x, qua< T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T length (qua< T, Q > const &q)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > normalize (qua< T, Q > const &q)
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00221_source.html b/common/glm/doc/api/a00221_source.html new file mode 100644 index 000000000..7e6468cae --- /dev/null +++ b/common/glm/doc/api/a00221_source.html @@ -0,0 +1,86 @@ + + + + + + + +0.9.9 API documenation: quaternion_geometric.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
quaternion_geometric.hpp
+
+
+Go to the documentation of this file.
1 
15 #pragma once
16 
17 // Dependency:
18 #include "../geometric.hpp"
19 #include "../exponential.hpp"
20 #include "../ext/vector_relational.hpp"
21 
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_EXT_quaternion_geometric extension included")
24 #endif
25 
26 namespace glm
27 {
30 
37  template<typename T, qualifier Q>
38  GLM_FUNC_DECL T length(qua<T, Q> const& q);
39 
46  template<typename T, qualifier Q>
47  GLM_FUNC_DECL qua<T, Q> normalize(qua<T, Q> const& q);
48 
55  template<typename T, qualifier Q>
56  GLM_FUNC_DECL T dot(qua<T, Q> const& x, qua<T, Q> const& y);
57 
64  template<typename T, qualifier Q>
65  GLM_FUNC_QUALIFIER qua<T, Q> cross(qua<T, Q> const& q1, qua<T, Q> const& q2);
66 
68 } //namespace glm
69 
70 #include "quaternion_geometric.inl"
GLM_FUNC_DECL T dot(qua< T, Q > const &x, qua< T, Q > const &y)
Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ...
+
GLM_FUNC_DECL qua< T, Q > normalize(qua< T, Q > const &q)
Returns the normalized quaternion.
+
Definition: common.hpp:20
+
GLM_FUNC_QUALIFIER qua< T, Q > cross(qua< T, Q > const &q1, qua< T, Q > const &q2)
Compute a cross product.
+
GLM_FUNC_DECL T length(qua< T, Q > const &q)
Returns the norm of a quaternions.
+
+ + + + diff --git a/common/glm/doc/api/a00224.html b/common/glm/doc/api/a00224.html new file mode 100644 index 000000000..5b4010fec --- /dev/null +++ b/common/glm/doc/api/a00224.html @@ -0,0 +1,105 @@ + + + + + + + +0.9.9 API documenation: quaternion_relational.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
quaternion_relational.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > equal (qua< T, Q > const &x, qua< T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > equal (qua< T, Q > const &x, qua< T, Q > const &y, T epsilon)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > notEqual (qua< T, Q > const &x, qua< T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > notEqual (qua< T, Q > const &x, qua< T, Q > const &y, T epsilon)
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00224_source.html b/common/glm/doc/api/a00224_source.html new file mode 100644 index 000000000..47782113a --- /dev/null +++ b/common/glm/doc/api/a00224_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: quaternion_relational.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
quaternion_relational.hpp
+
+
+Go to the documentation of this file.
1 
17 #pragma once
18 
19 // Dependency:
20 #include "../vector_relational.hpp"
21 
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_EXT_quaternion_relational extension included")
24 #endif
25 
26 namespace glm
27 {
30 
35  template<typename T, qualifier Q>
36  GLM_FUNC_DECL vec<4, bool, Q> equal(qua<T, Q> const& x, qua<T, Q> const& y);
37 
42  template<typename T, qualifier Q>
43  GLM_FUNC_DECL vec<4, bool, Q> equal(qua<T, Q> const& x, qua<T, Q> const& y, T epsilon);
44 
49  template<typename T, qualifier Q>
50  GLM_FUNC_DECL vec<4, bool, Q> notEqual(qua<T, Q> const& x, qua<T, Q> const& y);
51 
56  template<typename T, qualifier Q>
57  GLM_FUNC_DECL vec<4, bool, Q> notEqual(qua<T, Q> const& x, qua<T, Q> const& y, T epsilon);
58 
60 } //namespace glm
61 
62 #include "quaternion_relational.inl"
GLM_FUNC_DECL vec< 4, bool, Q > equal(qua< T, Q > const &x, qua< T, Q > const &y, T epsilon)
Returns the component-wise comparison of |x - y| < epsilon.
+
GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon()
Return the epsilon constant for floating point types.
+
GLM_FUNC_DECL vec< 4, bool, Q > notEqual(qua< T, Q > const &x, qua< T, Q > const &y, T epsilon)
Returns the component-wise comparison of |x - y| >= epsilon.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00227.html b/common/glm/doc/api/a00227.html new file mode 100644 index 000000000..388cfeb43 --- /dev/null +++ b/common/glm/doc/api/a00227.html @@ -0,0 +1,96 @@ + + + + + + + +0.9.9 API documenation: quaternion_transform.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
quaternion_transform.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > rotate (qua< T, Q > const &q, T const &angle, vec< 3, T, Q > const &axis)
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00227_source.html b/common/glm/doc/api/a00227_source.html new file mode 100644 index 000000000..c7ee3bcbc --- /dev/null +++ b/common/glm/doc/api/a00227_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: quaternion_transform.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
quaternion_transform.hpp
+
+
+Go to the documentation of this file.
1 
18 #pragma once
19 
20 // Dependency:
21 #include "../common.hpp"
22 #include "../trigonometric.hpp"
23 #include "../geometric.hpp"
24 
25 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
26 # pragma message("GLM: GLM_EXT_quaternion_transform extension included")
27 #endif
28 
29 namespace glm
30 {
33 
42  template<typename T, qualifier Q>
43  GLM_FUNC_DECL qua<T, Q> rotate(qua<T, Q> const& q, T const& angle, vec<3, T, Q> const& axis);
45 } //namespace glm
46 
47 #include "quaternion_transform.inl"
GLM_FUNC_DECL vec< 3, T, Q > axis(qua< T, Q > const &x)
Returns the q rotation axis.
+
GLM_FUNC_DECL qua< T, Q > rotate(qua< T, Q > const &q, T const &angle, vec< 3, T, Q > const &axis)
Rotates a quaternion from a vector of 3 components axis and an angle.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL T angle(qua< T, Q > const &x)
Returns the quaternion rotation angle.
+
+ + + + diff --git a/common/glm/doc/api/a00230.html b/common/glm/doc/api/a00230.html new file mode 100644 index 000000000..b16684939 --- /dev/null +++ b/common/glm/doc/api/a00230.html @@ -0,0 +1,102 @@ + + + + + + + +0.9.9 API documenation: quaternion_trigonometric.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
quaternion_trigonometric.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL T angle (qua< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > angleAxis (T const &angle, vec< 3, T, Q > const &axis)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > axis (qua< T, Q > const &x)
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00230_source.html b/common/glm/doc/api/a00230_source.html new file mode 100644 index 000000000..6e7b120ed --- /dev/null +++ b/common/glm/doc/api/a00230_source.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: quaternion_trigonometric.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
quaternion_trigonometric.hpp
+
+
+Go to the documentation of this file.
1 
18 #pragma once
19 
20 // Dependency:
21 #include "../trigonometric.hpp"
22 #include "../exponential.hpp"
23 #include "scalar_constants.hpp"
24 #include "vector_relational.hpp"
25 #include <limits>
26 
27 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
28 # pragma message("GLM: GLM_EXT_quaternion_trigonometric extension included")
29 #endif
30 
31 namespace glm
32 {
35 
40  template<typename T, qualifier Q>
41  GLM_FUNC_DECL T angle(qua<T, Q> const& x);
42 
47  template<typename T, qualifier Q>
48  GLM_FUNC_DECL vec<3, T, Q> axis(qua<T, Q> const& x);
49 
57  template<typename T, qualifier Q>
58  GLM_FUNC_DECL qua<T, Q> angleAxis(T const& angle, vec<3, T, Q> const& axis);
59 
61 } //namespace glm
62 
63 #include "quaternion_trigonometric.inl"
GLM_FUNC_DECL qua< T, Q > angleAxis(T const &angle, vec< 3, T, Q > const &axis)
Build a quaternion from an angle and a normalized axis.
+
GLM_EXT_vector_relational
+
GLM_FUNC_DECL vec< 3, T, Q > axis(qua< T, Q > const &x)
Returns the q rotation axis.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL T angle(qua< T, Q > const &x)
Returns the quaternion rotation angle.
+
GLM_EXT_scalar_constants
+
+ + + + diff --git a/common/glm/doc/api/a00233.html b/common/glm/doc/api/a00233.html new file mode 100644 index 000000000..3787002b7 --- /dev/null +++ b/common/glm/doc/api/a00233.html @@ -0,0 +1,123 @@ + + + + + + + +0.9.9 API documenation: scalar_common.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
scalar_common.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T >
GLM_FUNC_DECL T fmax (T a, T b)
 
template<typename T >
GLM_FUNC_DECL T fmax (T a, T b, T C)
 
template<typename T >
GLM_FUNC_DECL T fmax (T a, T b, T C, T D)
 
template<typename T >
GLM_FUNC_DECL T fmin (T a, T b)
 
template<typename T >
GLM_FUNC_DECL T fmin (T a, T b, T c)
 
template<typename T >
GLM_FUNC_DECL T fmin (T a, T b, T c, T d)
 
template<typename T >
GLM_FUNC_DECL T max (T a, T b, T c)
 
template<typename T >
GLM_FUNC_DECL T max (T a, T b, T c, T d)
 
template<typename T >
GLM_FUNC_DECL T min (T a, T b, T c)
 
template<typename T >
GLM_FUNC_DECL T min (T a, T b, T c, T d)
 
+

Detailed Description

+

GLM_EXT_scalar_common

+ +

Definition in file scalar_common.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00233_source.html b/common/glm/doc/api/a00233_source.html new file mode 100644 index 000000000..bd82788a7 --- /dev/null +++ b/common/glm/doc/api/a00233_source.html @@ -0,0 +1,86 @@ + + + + + + + +0.9.9 API documenation: scalar_common.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
scalar_common.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../common.hpp"
18 
19 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
20 # pragma message("GLM: GLM_EXT_scalar_common extension included")
21 #endif
22 
23 namespace glm
24 {
27 
31  template<typename T>
32  GLM_FUNC_DECL T min(T a, T b, T c);
33 
37  template<typename T>
38  GLM_FUNC_DECL T min(T a, T b, T c, T d);
39 
43  template<typename T>
44  GLM_FUNC_DECL T max(T a, T b, T c);
45 
49  template<typename T>
50  GLM_FUNC_DECL T max(T a, T b, T c, T d);
51 
57  template<typename T>
58  GLM_FUNC_DECL T fmin(T a, T b);
59 
65  template<typename T>
66  GLM_FUNC_DECL T fmin(T a, T b, T c);
67 
73  template<typename T>
74  GLM_FUNC_DECL T fmin(T a, T b, T c, T d);
75 
81  template<typename T>
82  GLM_FUNC_DECL T fmax(T a, T b);
83 
89  template<typename T>
90  GLM_FUNC_DECL T fmax(T a, T b, T C);
91 
97  template<typename T>
98  GLM_FUNC_DECL T fmax(T a, T b, T C, T D);
99 
101 }//namespace glm
102 
103 #include "scalar_common.inl"
GLM_FUNC_DECL T fmin(T a, T b, T c, T d)
Returns the minimum component-wise values of 4 inputs.
+
GLM_FUNC_DECL T max(T a, T b, T c, T d)
Returns the maximum component-wise values of 4 inputs.
+
GLM_FUNC_DECL T min(T a, T b, T c, T d)
Returns the minimum component-wise values of 4 inputs.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL T fmax(T a, T b, T C, T D)
Returns the maximum component-wise values of 4 inputs.
+
+ + + + diff --git a/common/glm/doc/api/a00236.html b/common/glm/doc/api/a00236.html new file mode 100644 index 000000000..5c3f4428b --- /dev/null +++ b/common/glm/doc/api/a00236.html @@ -0,0 +1,101 @@ + + + + + + + +0.9.9 API documenation: scalar_constants.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
scalar_constants.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Functions

+template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon ()
 
+template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType pi ()
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00236_source.html b/common/glm/doc/api/a00236_source.html new file mode 100644 index 000000000..f085e4f6c --- /dev/null +++ b/common/glm/doc/api/a00236_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: scalar_constants.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
scalar_constants.hpp
+
+
+Go to the documentation of this file.
1 
11 #pragma once
12 
13 // Dependencies
14 #include "../detail/setup.hpp"
15 
16 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
17 # pragma message("GLM: GLM_EXT_scalar_constants extension included")
18 #endif
19 
20 namespace glm
21 {
24 
26  template<typename genType>
27  GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon();
28 
30  template<typename genType>
31  GLM_FUNC_DECL GLM_CONSTEXPR genType pi();
32 
34 } //namespace glm
35 
36 #include "scalar_constants.inl"
GLM_FUNC_DECL GLM_CONSTEXPR genType pi()
Return the pi constant for floating point types.
+
GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon()
Return the epsilon constant for floating point types.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00239.html b/common/glm/doc/api/a00239.html new file mode 100644 index 000000000..16c37741f --- /dev/null +++ b/common/glm/doc/api/a00239.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: scalar_float_sized.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
scalar_float_sized.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + +

+Typedefs

+typedef float float32
 
+typedef double float64
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00239_source.html b/common/glm/doc/api/a00239_source.html new file mode 100644 index 000000000..a522fb9e8 --- /dev/null +++ b/common/glm/doc/api/a00239_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: scalar_float_sized.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
scalar_float_sized.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 #include "../detail/setup.hpp"
17 
18 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
19 # pragma message("GLM: GLM_EXT_scalar_float_sized extension included")
20 #endif
21 
22 namespace glm
23 {
26 
28  typedef float float32;
29 
30 
31 # ifndef GLM_FORCE_SINGLE_ONLY
32 
34  typedef double float64;
35 
36 # endif//GLM_FORCE_SINGLE_ONLY
37 
39 }//namespace glm
double float64
Double precision floating-point numbers.
+
float float32
Single precision floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00242.html b/common/glm/doc/api/a00242.html new file mode 100644 index 000000000..5e4ce5962 --- /dev/null +++ b/common/glm/doc/api/a00242.html @@ -0,0 +1,105 @@ + + + + + + + +0.9.9 API documenation: scalar_int_sized.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
scalar_int_sized.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + +

+Typedefs

+typedef detail::int16 int16
 
+typedef detail::int32 int32
 
+typedef detail::int64 int64
 
+typedef detail::int8 int8
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00242_source.html b/common/glm/doc/api/a00242_source.html new file mode 100644 index 000000000..f5eb8228d --- /dev/null +++ b/common/glm/doc/api/a00242_source.html @@ -0,0 +1,89 @@ + + + + + + + +0.9.9 API documenation: scalar_int_sized.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
scalar_int_sized.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 #include "../detail/setup.hpp"
16 
17 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
18 # pragma message("GLM: GLM_EXT_scalar_int_sized extension included")
19 #endif
20 
21 namespace glm{
22 namespace detail
23 {
24 # if GLM_HAS_EXTENDED_INTEGER_TYPE
25  typedef std::int8_t int8;
26  typedef std::int16_t int16;
27  typedef std::int32_t int32;
28 # else
29  typedef char int8;
30  typedef short int16;
31  typedef int int32;
32 #endif//
33 
34  template<>
35  struct is_int<int8>
36  {
37  enum test {value = ~0};
38  };
39 
40  template<>
41  struct is_int<int16>
42  {
43  enum test {value = ~0};
44  };
45 
46  template<>
47  struct is_int<int64>
48  {
49  enum test {value = ~0};
50  };
51 }//namespace detail
52 
53 
56 
58  typedef detail::int8 int8;
59 
61  typedef detail::int16 int16;
62 
64  typedef detail::int32 int32;
65 
67  typedef detail::int64 int64;
68 
70 }//namespace glm
int32 int32_t
32 bit signed integer type.
Definition: fwd.hpp:71
+
int16 int16_t
16 bit signed integer type.
Definition: fwd.hpp:57
+
detail::int8 int8
8 bit signed integer type.
+
detail::int32 int32
32 bit signed integer type.
+
detail::int64 int64
64 bit signed integer type.
+
int8 int8_t
8 bit signed integer type.
Definition: fwd.hpp:43
+
detail::int16 int16
16 bit signed integer type.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00245.html b/common/glm/doc/api/a00245.html new file mode 100644 index 000000000..116638ea1 --- /dev/null +++ b/common/glm/doc/api/a00245.html @@ -0,0 +1,112 @@ + + + + + + + +0.9.9 API documenation: scalar_int_sized.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
scalar_int_sized.hpp File Reference
+
+
+ +

GLM_EXT_scalar_int_sized +More...

+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + +

+Typedefs

+typedef detail::int16 int16
 16 bit signed integer type.
 
+typedef detail::int32 int32
 32 bit signed integer type.
 
+typedef detail::int64 int64
 64 bit signed integer type.
 
+typedef detail::int8 int8
 8 bit signed integer type.
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00245_source.html b/common/glm/doc/api/a00245_source.html new file mode 100644 index 000000000..a8a103680 --- /dev/null +++ b/common/glm/doc/api/a00245_source.html @@ -0,0 +1,89 @@ + + + + + + + +0.9.9 API documenation: scalar_int_sized.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
scalar_int_sized.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 #include "../detail/setup.hpp"
16 
17 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
18 # pragma message("GLM: GLM_EXT_scalar_int_sized extension included")
19 #endif
20 
21 namespace glm{
22 namespace detail
23 {
24 # if GLM_HAS_EXTENDED_INTEGER_TYPE
25  typedef std::int8_t int8;
26  typedef std::int16_t int16;
27  typedef std::int32_t int32;
28 # else
29  typedef char int8;
30  typedef short int16;
31  typedef int int32;
32 #endif//
33 
34  template<>
35  struct is_int<int8>
36  {
37  enum test {value = ~0};
38  };
39 
40  template<>
41  struct is_int<int16>
42  {
43  enum test {value = ~0};
44  };
45 
46  template<>
47  struct is_int<int64>
48  {
49  enum test {value = ~0};
50  };
51 }//namespace detail
52 
53 
56 
58  typedef detail::int8 int8;
59 
61  typedef detail::int16 int16;
62 
64  typedef detail::int32 int32;
65 
67  typedef detail::int64 int64;
68 
70 }//namespace glm
Definition: common.hpp:18
+
int8 int8_t
8 bit signed integer type.
Definition: fwd.hpp:43
+
int16 int16_t
16 bit signed integer type.
Definition: fwd.hpp:57
+
detail::int16 int16
16 bit signed integer type.
+
int32 int32_t
32 bit signed integer type.
Definition: fwd.hpp:71
+
detail::int32 int32
32 bit signed integer type.
+
detail::int64 int64
64 bit signed integer type.
+
detail::int8 int8
8 bit signed integer type.
+
+ + + + diff --git a/common/glm/doc/api/a00248.html b/common/glm/doc/api/a00248.html new file mode 100644 index 000000000..19605004f --- /dev/null +++ b/common/glm/doc/api/a00248.html @@ -0,0 +1,105 @@ + + + + + + + +0.9.9 API documenation: scalar_uint_sized.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
scalar_uint_sized.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + +

+Typedefs

+typedef detail::uint16 uint16
 
+typedef detail::uint32 uint32
 
+typedef detail::uint64 uint64
 
+typedef detail::uint8 uint8
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00248_source.html b/common/glm/doc/api/a00248_source.html new file mode 100644 index 000000000..09d6b443b --- /dev/null +++ b/common/glm/doc/api/a00248_source.html @@ -0,0 +1,89 @@ + + + + + + + +0.9.9 API documenation: scalar_uint_sized.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
scalar_uint_sized.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 #include "../detail/setup.hpp"
16 
17 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
18 # pragma message("GLM: GLM_EXT_scalar_uint_sized extension included")
19 #endif
20 
21 namespace glm{
22 namespace detail
23 {
24 # if GLM_HAS_EXTENDED_INTEGER_TYPE
25  typedef std::uint8_t uint8;
26  typedef std::uint16_t uint16;
27  typedef std::uint32_t uint32;
28 # else
29  typedef unsigned char uint8;
30  typedef unsigned short uint16;
31  typedef unsigned int uint32;
32 #endif
33 
34  template<>
35  struct is_int<uint8>
36  {
37  enum test {value = ~0};
38  };
39 
40  template<>
41  struct is_int<uint16>
42  {
43  enum test {value = ~0};
44  };
45 
46  template<>
47  struct is_int<uint64>
48  {
49  enum test {value = ~0};
50  };
51 }//namespace detail
52 
53 
56 
58  typedef detail::uint8 uint8;
59 
61  typedef detail::uint16 uint16;
62 
64  typedef detail::uint32 uint32;
65 
67  typedef detail::uint64 uint64;
68 
70 }//namespace glm
detail::uint64 uint64
64 bit unsigned integer type.
+
uint32 uint32_t
Default qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:129
+
uint8 uint8_t
Default qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:101
+
detail::uint16 uint16
16 bit unsigned integer type.
+
detail::uint8 uint8
8 bit unsigned integer type.
+
detail::uint32 uint32
32 bit unsigned integer type.
+
Definition: common.hpp:20
+
uint16 uint16_t
Default qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:115
+
+ + + + diff --git a/common/glm/doc/api/a00251.html b/common/glm/doc/api/a00251.html new file mode 100644 index 000000000..b2563a36d --- /dev/null +++ b/common/glm/doc/api/a00251.html @@ -0,0 +1,96 @@ + + + + + + + +0.9.9 API documenation: vector_bool1.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_bool1.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

+typedef vec< 1, bool, defaultp > bvec1
 
+

Detailed Description

+

GLM_EXT_vector_bool1

+ +

Definition in file vector_bool1.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00251_source.html b/common/glm/doc/api/a00251_source.html new file mode 100644 index 000000000..d4d484a41 --- /dev/null +++ b/common/glm/doc/api/a00251_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: vector_bool1.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_bool1.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 #include "../detail/type_vec1.hpp"
16 
17 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
18 # pragma message("GLM: GLM_EXT_vector_bool1 extension included")
19 #endif
20 
21 namespace glm
22 {
25 
27  typedef vec<1, bool, defaultp> bvec1;
28 
30 }//namespace glm
vec< 1, bool, defaultp > bvec1
1 components vector of boolean.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00254.html b/common/glm/doc/api/a00254.html new file mode 100644 index 000000000..5a33d90d6 --- /dev/null +++ b/common/glm/doc/api/a00254.html @@ -0,0 +1,102 @@ + + + + + + + +0.9.9 API documenation: vector_bool1_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_bool1_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

+typedef vec< 1, bool, highp > highp_bvec1
 
+typedef vec< 1, bool, lowp > lowp_bvec1
 
+typedef vec< 1, bool, mediump > mediump_bvec1
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00254_source.html b/common/glm/doc/api/a00254_source.html new file mode 100644 index 000000000..43311bc2c --- /dev/null +++ b/common/glm/doc/api/a00254_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: vector_bool1_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_bool1_precision.hpp
+
+
+Go to the documentation of this file.
1 
11 #pragma once
12 
13 #include "../detail/type_vec1.hpp"
14 
15 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
16 # pragma message("GLM: GLM_EXT_vector_bool1_precision extension included")
17 #endif
18 
19 namespace glm
20 {
23 
25  typedef vec<1, bool, highp> highp_bvec1;
26 
28  typedef vec<1, bool, mediump> mediump_bvec1;
29 
31  typedef vec<1, bool, lowp> lowp_bvec1;
32 
34 }//namespace glm
vec< 1, bool, lowp > lowp_bvec1
1 component vector of bool values.
+
vec< 1, bool, mediump > mediump_bvec1
1 component vector of bool values.
+
Definition: common.hpp:20
+
vec< 1, bool, highp > highp_bvec1
1 component vector of bool values.
+
+ + + + diff --git a/common/glm/doc/api/a00257.html b/common/glm/doc/api/a00257.html new file mode 100644 index 000000000..c5be8c722 --- /dev/null +++ b/common/glm/doc/api/a00257.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: vector_bool2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_bool2.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef vec< 2, bool, defaultp > bvec2
 
+

Detailed Description

+

Core features

+ +

Definition in file vector_bool2.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00257_source.html b/common/glm/doc/api/a00257_source.html new file mode 100644 index 000000000..a46127c61 --- /dev/null +++ b/common/glm/doc/api/a00257_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: vector_bool2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_bool2.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec2.hpp"
6 
7 namespace glm
8 {
11 
15  typedef vec<2, bool, defaultp> bvec2;
16 
18 }//namespace glm
Definition: common.hpp:20
+
vec< 2, bool, defaultp > bvec2
2 components vector of boolean.
+
+ + + + diff --git a/common/glm/doc/api/a00260.html b/common/glm/doc/api/a00260.html new file mode 100644 index 000000000..759f7f2e9 --- /dev/null +++ b/common/glm/doc/api/a00260.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: vector_bool2_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_bool2_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef vec< 2, bool, highp > highp_bvec2
 
typedef vec< 2, bool, lowp > lowp_bvec2
 
typedef vec< 2, bool, mediump > mediump_bvec2
 
+

Detailed Description

+

Core features

+ +

Definition in file vector_bool2_precision.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00260_source.html b/common/glm/doc/api/a00260_source.html new file mode 100644 index 000000000..5c90b6ce2 --- /dev/null +++ b/common/glm/doc/api/a00260_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: vector_bool2_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_bool2_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec2.hpp"
6 
7 namespace glm
8 {
11 
16  typedef vec<2, bool, highp> highp_bvec2;
17 
22  typedef vec<2, bool, mediump> mediump_bvec2;
23 
28  typedef vec<2, bool, lowp> lowp_bvec2;
29 
31 }//namespace glm
vec< 2, bool, mediump > mediump_bvec2
2 components vector of medium qualifier bool numbers.
+
vec< 2, bool, highp > highp_bvec2
2 components vector of high qualifier bool numbers.
+
vec< 2, bool, lowp > lowp_bvec2
2 components vector of low qualifier bool numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00263.html b/common/glm/doc/api/a00263.html new file mode 100644 index 000000000..cc032c1f2 --- /dev/null +++ b/common/glm/doc/api/a00263.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: vector_bool3.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_bool3.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef vec< 3, bool, defaultp > bvec3
 
+

Detailed Description

+

Core features

+ +

Definition in file vector_bool3.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00263_source.html b/common/glm/doc/api/a00263_source.html new file mode 100644 index 000000000..e1366ca9a --- /dev/null +++ b/common/glm/doc/api/a00263_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: vector_bool3.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_bool3.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec3.hpp"
6 
7 namespace glm
8 {
11 
15  typedef vec<3, bool, defaultp> bvec3;
16 
18 }//namespace glm
Definition: common.hpp:20
+
vec< 3, bool, defaultp > bvec3
3 components vector of boolean.
+
+ + + + diff --git a/common/glm/doc/api/a00266.html b/common/glm/doc/api/a00266.html new file mode 100644 index 000000000..96580bd55 --- /dev/null +++ b/common/glm/doc/api/a00266.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: vector_bool3_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_bool3_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef vec< 3, bool, highp > highp_bvec3
 
typedef vec< 3, bool, lowp > lowp_bvec3
 
typedef vec< 3, bool, mediump > mediump_bvec3
 
+

Detailed Description

+

Core features

+ +

Definition in file vector_bool3_precision.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00266_source.html b/common/glm/doc/api/a00266_source.html new file mode 100644 index 000000000..2599e7683 --- /dev/null +++ b/common/glm/doc/api/a00266_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: vector_bool3_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_bool3_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec3.hpp"
6 
7 namespace glm
8 {
11 
16  typedef vec<3, bool, highp> highp_bvec3;
17 
22  typedef vec<3, bool, mediump> mediump_bvec3;
23 
28  typedef vec<3, bool, lowp> lowp_bvec3;
29 
31 }//namespace glm
vec< 3, bool, lowp > lowp_bvec3
3 components vector of low qualifier bool numbers.
+
vec< 3, bool, mediump > mediump_bvec3
3 components vector of medium qualifier bool numbers.
+
vec< 3, bool, highp > highp_bvec3
3 components vector of high qualifier bool numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00269.html b/common/glm/doc/api/a00269.html new file mode 100644 index 000000000..567bf44d4 --- /dev/null +++ b/common/glm/doc/api/a00269.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: vector_bool4.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_bool4.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef vec< 4, bool, defaultp > bvec4
 
+

Detailed Description

+

Core features

+ +

Definition in file vector_bool4.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00269_source.html b/common/glm/doc/api/a00269_source.html new file mode 100644 index 000000000..aed8ebd78 --- /dev/null +++ b/common/glm/doc/api/a00269_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: vector_bool4.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_bool4.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec4.hpp"
6 
7 namespace glm
8 {
11 
15  typedef vec<4, bool, defaultp> bvec4;
16 
18 }//namespace glm
vec< 4, bool, defaultp > bvec4
4 components vector of boolean.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00272.html b/common/glm/doc/api/a00272.html new file mode 100644 index 000000000..e02ae5ad2 --- /dev/null +++ b/common/glm/doc/api/a00272.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: vector_bool4_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_bool4_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef vec< 4, bool, highp > highp_bvec4
 
typedef vec< 4, bool, lowp > lowp_bvec4
 
typedef vec< 4, bool, mediump > mediump_bvec4
 
+

Detailed Description

+

Core features

+ +

Definition in file vector_bool4_precision.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00272_source.html b/common/glm/doc/api/a00272_source.html new file mode 100644 index 000000000..bb04d2fd0 --- /dev/null +++ b/common/glm/doc/api/a00272_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: vector_bool4_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_bool4_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec4.hpp"
6 
7 namespace glm
8 {
11 
16  typedef vec<4, bool, highp> highp_bvec4;
17 
22  typedef vec<4, bool, mediump> mediump_bvec4;
23 
28  typedef vec<4, bool, lowp> lowp_bvec4;
29 
31 }//namespace glm
vec< 4, bool, lowp > lowp_bvec4
4 components vector of low qualifier bool numbers.
+
vec< 4, bool, mediump > mediump_bvec4
4 components vector of medium qualifier bool numbers.
+
vec< 4, bool, highp > highp_bvec4
4 components vector of high qualifier bool numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00275.html b/common/glm/doc/api/a00275.html new file mode 100644 index 000000000..462c3b119 --- /dev/null +++ b/common/glm/doc/api/a00275.html @@ -0,0 +1,129 @@ + + + + + + + +0.9.9 API documenation: vector_common.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_common.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fmax (vec< L, T, Q > const &a, T b)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fmax (vec< L, T, Q > const &a, vec< L, T, Q > const &b)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fmax (vec< L, T, Q > const &a, vec< L, T, Q > const &b, vec< L, T, Q > const &c)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fmax (vec< L, T, Q > const &a, vec< L, T, Q > const &b, vec< L, T, Q > const &c, vec< L, T, Q > const &d)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fmin (vec< L, T, Q > const &x, T y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fmin (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fmin (vec< L, T, Q > const &a, vec< L, T, Q > const &b, vec< L, T, Q > const &c)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fmin (vec< L, T, Q > const &a, vec< L, T, Q > const &b, vec< L, T, Q > const &c, vec< L, T, Q > const &d)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > max (vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &z)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > max (vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &z, vec< L, T, Q > const &w)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > min (vec< L, T, Q > const &a, vec< L, T, Q > const &b, vec< L, T, Q > const &c)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > min (vec< L, T, Q > const &a, vec< L, T, Q > const &b, vec< L, T, Q > const &c, vec< L, T, Q > const &d)
 
+

Detailed Description

+

GLM_EXT_vector_common

+ +

Definition in file vector_common.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00275_source.html b/common/glm/doc/api/a00275_source.html new file mode 100644 index 000000000..7d8fb98b8 --- /dev/null +++ b/common/glm/doc/api/a00275_source.html @@ -0,0 +1,86 @@ + + + + + + + +0.9.9 API documenation: vector_common.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_common.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../ext/scalar_common.hpp"
18 #include "../common.hpp"
19 
20 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
21 # pragma message("GLM: GLM_EXT_vector_common extension included")
22 #endif
23 
24 namespace glm
25 {
28 
34  template<length_t L, typename T, qualifier Q>
35  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> min(vec<L, T, Q> const& a, vec<L, T, Q> const& b, vec<L, T, Q> const& c);
36 
42  template<length_t L, typename T, qualifier Q>
43  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> min(vec<L, T, Q> const& a, vec<L, T, Q> const& b, vec<L, T, Q> const& c, vec<L, T, Q> const& d);
44 
50  template<length_t L, typename T, qualifier Q>
51  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> max(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& z);
52 
58  template<length_t L, typename T, qualifier Q>
59  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> max( vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& z, vec<L, T, Q> const& w);
60 
68  template<length_t L, typename T, qualifier Q>
69  GLM_FUNC_DECL vec<L, T, Q> fmin(vec<L, T, Q> const& x, T y);
70 
78  template<length_t L, typename T, qualifier Q>
79  GLM_FUNC_DECL vec<L, T, Q> fmin(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
80 
88  template<length_t L, typename T, qualifier Q>
89  GLM_FUNC_DECL vec<L, T, Q> fmin(vec<L, T, Q> const& a, vec<L, T, Q> const& b, vec<L, T, Q> const& c);
90 
98  template<length_t L, typename T, qualifier Q>
99  GLM_FUNC_DECL vec<L, T, Q> fmin(vec<L, T, Q> const& a, vec<L, T, Q> const& b, vec<L, T, Q> const& c, vec<L, T, Q> const& d);
100 
108  template<length_t L, typename T, qualifier Q>
109  GLM_FUNC_DECL vec<L, T, Q> fmax(vec<L, T, Q> const& a, T b);
110 
118  template<length_t L, typename T, qualifier Q>
119  GLM_FUNC_DECL vec<L, T, Q> fmax(vec<L, T, Q> const& a, vec<L, T, Q> const& b);
120 
128  template<length_t L, typename T, qualifier Q>
129  GLM_FUNC_DECL vec<L, T, Q> fmax(vec<L, T, Q> const& a, vec<L, T, Q> const& b, vec<L, T, Q> const& c);
130 
138  template<length_t L, typename T, qualifier Q>
139  GLM_FUNC_DECL vec<L, T, Q> fmax(vec<L, T, Q> const& a, vec<L, T, Q> const& b, vec<L, T, Q> const& c, vec<L, T, Q> const& d);
140 
142 }//namespace glm
143 
144 #include "vector_common.inl"
GLM_FUNC_DECL vec< L, T, Q > fmax(vec< L, T, Q > const &a, vec< L, T, Q > const &b, vec< L, T, Q > const &c, vec< L, T, Q > const &d)
Returns y if x < y; otherwise, it returns x.
+
GLM_FUNC_DECL vec< L, T, Q > fmin(vec< L, T, Q > const &a, vec< L, T, Q > const &b, vec< L, T, Q > const &c, vec< L, T, Q > const &d)
Returns y if y < x; otherwise, it returns x.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > max(vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &z, vec< L, T, Q > const &w)
Return the maximum component-wise values of 4 inputs.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > min(vec< L, T, Q > const &a, vec< L, T, Q > const &b, vec< L, T, Q > const &c, vec< L, T, Q > const &d)
Return the minimum component-wise values of 4 inputs.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00278.html b/common/glm/doc/api/a00278.html new file mode 100644 index 000000000..e30feec78 --- /dev/null +++ b/common/glm/doc/api/a00278.html @@ -0,0 +1,96 @@ + + + + + + + +0.9.9 API documenation: vector_double1.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_double1.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

+typedef vec< 1, double, defaultp > dvec1
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00278_source.html b/common/glm/doc/api/a00278_source.html new file mode 100644 index 000000000..ba09f2a43 --- /dev/null +++ b/common/glm/doc/api/a00278_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: vector_double1.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_double1.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 #include "../detail/type_vec1.hpp"
17 
18 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
19 # pragma message("GLM: GLM_EXT_vector_dvec1 extension included")
20 #endif
21 
22 namespace glm
23 {
26 
28  typedef vec<1, double, defaultp> dvec1;
29 
31 }//namespace glm
Definition: common.hpp:20
+
vec< 1, double, defaultp > dvec1
1 components vector of double-precision floating-point numbers.
+
+ + + + diff --git a/common/glm/doc/api/a00281.html b/common/glm/doc/api/a00281.html new file mode 100644 index 000000000..edfe5738e --- /dev/null +++ b/common/glm/doc/api/a00281.html @@ -0,0 +1,102 @@ + + + + + + + +0.9.9 API documenation: vector_double1_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_double1_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

+typedef vec< 1, double, highp > highp_dvec1
 
+typedef vec< 1, double, lowp > lowp_dvec1
 
+typedef vec< 1, double, mediump > mediump_dvec1
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00281_source.html b/common/glm/doc/api/a00281_source.html new file mode 100644 index 000000000..10d05021a --- /dev/null +++ b/common/glm/doc/api/a00281_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: vector_double1_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_double1_precision.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 #include "../detail/type_vec1.hpp"
16 
17 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
18 # pragma message("GLM: GLM_EXT_vector_double1_precision extension included")
19 #endif
20 
21 namespace glm
22 {
25 
27  typedef vec<1, double, highp> highp_dvec1;
28 
30  typedef vec<1, double, mediump> mediump_dvec1;
31 
33  typedef vec<1, double, lowp> lowp_dvec1;
34 
36 }//namespace glm
vec< 1, double, mediump > mediump_dvec1
1 component vector of double-precision floating-point numbers using medium precision arithmetic in te...
+
vec< 1, double, highp > highp_dvec1
1 component vector of double-precision floating-point numbers using high precision arithmetic in term...
+
vec< 1, double, lowp > lowp_dvec1
1 component vector of double-precision floating-point numbers using low precision arithmetic in term ...
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00284.html b/common/glm/doc/api/a00284.html new file mode 100644 index 000000000..29f51fed8 --- /dev/null +++ b/common/glm/doc/api/a00284.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: vector_double2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_double2.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef vec< 2, double, defaultp > dvec2
 
+

Detailed Description

+

Core features

+ +

Definition in file vector_double2.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00284_source.html b/common/glm/doc/api/a00284_source.html new file mode 100644 index 000000000..d28765f4f --- /dev/null +++ b/common/glm/doc/api/a00284_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: vector_double2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_double2.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec2.hpp"
6 
7 namespace glm
8 {
11 
15  typedef vec<2, double, defaultp> dvec2;
16 
18 }//namespace glm
vec< 2, double, defaultp > dvec2
2 components vector of double-precision floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00287.html b/common/glm/doc/api/a00287.html new file mode 100644 index 000000000..1526da3c8 --- /dev/null +++ b/common/glm/doc/api/a00287.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: vector_double2_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_double2_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef vec< 2, double, highp > highp_dvec2
 
typedef vec< 2, double, lowp > lowp_dvec2
 
typedef vec< 2, double, mediump > mediump_dvec2
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00287_source.html b/common/glm/doc/api/a00287_source.html new file mode 100644 index 000000000..d4c434ceb --- /dev/null +++ b/common/glm/doc/api/a00287_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: vector_double2_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_double2_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec2.hpp"
6 
7 namespace glm
8 {
11 
16  typedef vec<2, double, highp> highp_dvec2;
17 
22  typedef vec<2, double, mediump> mediump_dvec2;
23 
28  typedef vec<2, double, lowp> lowp_dvec2;
29 
31 }//namespace glm
vec< 2, double, mediump > mediump_dvec2
2 components vector of medium double-qualifier floating-point numbers.
+
vec< 2, double, lowp > lowp_dvec2
2 components vector of low double-qualifier floating-point numbers.
+
vec< 2, double, highp > highp_dvec2
2 components vector of high double-qualifier floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00290.html b/common/glm/doc/api/a00290.html new file mode 100644 index 000000000..3a64a7296 --- /dev/null +++ b/common/glm/doc/api/a00290.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: vector_double3.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_double3.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef vec< 3, double, defaultp > dvec3
 
+

Detailed Description

+

Core features

+ +

Definition in file vector_double3.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00290_source.html b/common/glm/doc/api/a00290_source.html new file mode 100644 index 000000000..34f6446fc --- /dev/null +++ b/common/glm/doc/api/a00290_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: vector_double3.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_double3.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec3.hpp"
6 
7 namespace glm
8 {
11 
15  typedef vec<3, double, defaultp> dvec3;
16 
18 }//namespace glm
Definition: common.hpp:20
+
vec< 3, double, defaultp > dvec3
3 components vector of double-precision floating-point numbers.
+
+ + + + diff --git a/common/glm/doc/api/a00293.html b/common/glm/doc/api/a00293.html new file mode 100644 index 000000000..442d1f1c1 --- /dev/null +++ b/common/glm/doc/api/a00293.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: vector_double3_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_double3_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef vec< 3, double, highp > highp_dvec3
 
typedef vec< 3, double, lowp > lowp_dvec3
 
typedef vec< 3, double, mediump > mediump_dvec3
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00293_source.html b/common/glm/doc/api/a00293_source.html new file mode 100644 index 000000000..dd6c8b9ac --- /dev/null +++ b/common/glm/doc/api/a00293_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: vector_double3_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_double3_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec3.hpp"
6 
7 namespace glm
8 {
11 
17  typedef vec<3, double, highp> highp_dvec3;
18 
24  typedef vec<3, double, mediump> mediump_dvec3;
25 
31  typedef vec<3, double, lowp> lowp_dvec3;
32 
34 }//namespace glm
vec< 3, double, mediump > mediump_dvec3
3 components vector of medium double-qualifier floating-point numbers.
+
vec< 3, double, lowp > lowp_dvec3
3 components vector of low double-qualifier floating-point numbers.
+
vec< 3, double, highp > highp_dvec3
3 components vector of high double-qualifier floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00296.html b/common/glm/doc/api/a00296.html new file mode 100644 index 000000000..e5f7b7b53 --- /dev/null +++ b/common/glm/doc/api/a00296.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: vector_double4.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_double4.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef vec< 4, double, defaultp > dvec4
 
+

Detailed Description

+

Core features

+ +

Definition in file vector_double4.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00296_source.html b/common/glm/doc/api/a00296_source.html new file mode 100644 index 000000000..6e65ef0f2 --- /dev/null +++ b/common/glm/doc/api/a00296_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: vector_double4.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_double4.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec4.hpp"
6 
7 namespace glm
8 {
11 
15  typedef vec<4, double, defaultp> dvec4;
16 
18 }//namespace glm
vec< 4, double, defaultp > dvec4
4 components vector of double-precision floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00299.html b/common/glm/doc/api/a00299.html new file mode 100644 index 000000000..94231c2bf --- /dev/null +++ b/common/glm/doc/api/a00299.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: vector_double4_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_double4_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef vec< 4, double, highp > highp_dvec4
 
typedef vec< 4, double, lowp > lowp_dvec4
 
typedef vec< 4, double, mediump > mediump_dvec4
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00299_source.html b/common/glm/doc/api/a00299_source.html new file mode 100644 index 000000000..1ba00e9df --- /dev/null +++ b/common/glm/doc/api/a00299_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: vector_double4_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_double4_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/setup.hpp"
6 #include "../detail/type_vec4.hpp"
7 
8 namespace glm
9 {
12 
18  typedef vec<4, double, highp> highp_dvec4;
19 
25  typedef vec<4, double, mediump> mediump_dvec4;
26 
32  typedef vec<4, double, lowp> lowp_dvec4;
33 
35 }//namespace glm
vec< 4, double, highp > highp_dvec4
4 components vector of high double-qualifier floating-point numbers.
+
vec< 4, double, mediump > mediump_dvec4
4 components vector of medium double-qualifier floating-point numbers.
+
Definition: common.hpp:20
+
vec< 4, double, lowp > lowp_dvec4
4 components vector of low double-qualifier floating-point numbers.
+
+ + + + diff --git a/common/glm/doc/api/a00302.html b/common/glm/doc/api/a00302.html new file mode 100644 index 000000000..a09d76036 --- /dev/null +++ b/common/glm/doc/api/a00302.html @@ -0,0 +1,96 @@ + + + + + + + +0.9.9 API documenation: vector_float1.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_float1.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

+typedef vec< 1, float, defaultp > vec1
 
+

Detailed Description

+

GLM_EXT_vector_float1

+ +

Definition in file vector_float1.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00302_source.html b/common/glm/doc/api/a00302_source.html new file mode 100644 index 000000000..55956430a --- /dev/null +++ b/common/glm/doc/api/a00302_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: vector_float1.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_float1.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 #include "../detail/type_vec1.hpp"
17 
18 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
19 # pragma message("GLM: GLM_EXT_vector_float1 extension included")
20 #endif
21 
22 namespace glm
23 {
26 
28  typedef vec<1, float, defaultp> vec1;
29 
31 }//namespace glm
vec< 1, float, defaultp > vec1
1 components vector of single-precision floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00305.html b/common/glm/doc/api/a00305.html new file mode 100644 index 000000000..36a1ed798 --- /dev/null +++ b/common/glm/doc/api/a00305.html @@ -0,0 +1,102 @@ + + + + + + + +0.9.9 API documenation: vector_float1_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_float1_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

+typedef vec< 1, float, highp > highp_vec1
 
+typedef vec< 1, float, lowp > lowp_vec1
 
+typedef vec< 1, float, mediump > mediump_vec1
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00305_source.html b/common/glm/doc/api/a00305_source.html new file mode 100644 index 000000000..d48983c05 --- /dev/null +++ b/common/glm/doc/api/a00305_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: vector_float1_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_float1_precision.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 #include "../detail/type_vec1.hpp"
16 
17 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
18 # pragma message("GLM: GLM_EXT_vector_float1_precision extension included")
19 #endif
20 
21 namespace glm
22 {
25 
27  typedef vec<1, float, highp> highp_vec1;
28 
30  typedef vec<1, float, mediump> mediump_vec1;
31 
33  typedef vec<1, float, lowp> lowp_vec1;
34 
36 }//namespace glm
vec< 1, float, highp > highp_vec1
1 component vector of single-precision floating-point numbers using high precision arithmetic in term...
+
vec< 1, float, lowp > lowp_vec1
1 component vector of single-precision floating-point numbers using low precision arithmetic in term ...
+
vec< 1, float, mediump > mediump_vec1
1 component vector of single-precision floating-point numbers using medium precision arithmetic in te...
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00308.html b/common/glm/doc/api/a00308.html new file mode 100644 index 000000000..aa4d3f69a --- /dev/null +++ b/common/glm/doc/api/a00308.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: vector_float2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_float2.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef vec< 2, float, defaultp > vec2
 
+

Detailed Description

+

Core features

+ +

Definition in file vector_float2.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00308_source.html b/common/glm/doc/api/a00308_source.html new file mode 100644 index 000000000..000b102cc --- /dev/null +++ b/common/glm/doc/api/a00308_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: vector_float2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_float2.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec2.hpp"
6 
7 namespace glm
8 {
11 
15  typedef vec<2, float, defaultp> vec2;
16 
18 }//namespace glm
vec< 2, float, defaultp > vec2
2 components vector of single-precision floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00311.html b/common/glm/doc/api/a00311.html new file mode 100644 index 000000000..7eaf42d8d --- /dev/null +++ b/common/glm/doc/api/a00311.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: vector_float2_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_float2_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef vec< 2, float, highp > highp_vec2
 
typedef vec< 2, float, lowp > lowp_vec2
 
typedef vec< 2, float, mediump > mediump_vec2
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00311_source.html b/common/glm/doc/api/a00311_source.html new file mode 100644 index 000000000..d5f496d01 --- /dev/null +++ b/common/glm/doc/api/a00311_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: vector_float2_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_float2_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec2.hpp"
6 
7 namespace glm
8 {
11 
16  typedef vec<2, float, highp> highp_vec2;
17 
22  typedef vec<2, float, mediump> mediump_vec2;
23 
28  typedef vec<2, float, lowp> lowp_vec2;
29 
31 }//namespace glm
vec< 2, float, lowp > lowp_vec2
2 components vector of low single-qualifier floating-point numbers.
+
vec< 2, float, highp > highp_vec2
2 components vector of high single-qualifier floating-point numbers.
+
vec< 2, float, mediump > mediump_vec2
2 components vector of medium single-qualifier floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00314.html b/common/glm/doc/api/a00314.html new file mode 100644 index 000000000..4d5ce03ac --- /dev/null +++ b/common/glm/doc/api/a00314.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: vector_float3.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_float3.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef vec< 3, float, defaultp > vec3
 
+

Detailed Description

+

Core features

+ +

Definition in file vector_float3.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00314_source.html b/common/glm/doc/api/a00314_source.html new file mode 100644 index 000000000..a319895c1 --- /dev/null +++ b/common/glm/doc/api/a00314_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: vector_float3.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_float3.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec3.hpp"
6 
7 namespace glm
8 {
11 
15  typedef vec<3, float, defaultp> vec3;
16 
18 }//namespace glm
vec< 3, float, defaultp > vec3
3 components vector of single-precision floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00317.html b/common/glm/doc/api/a00317.html new file mode 100644 index 000000000..92284ca07 --- /dev/null +++ b/common/glm/doc/api/a00317.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: vector_float3_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_float3_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef vec< 3, float, highp > highp_vec3
 
typedef vec< 3, float, lowp > lowp_vec3
 
typedef vec< 3, float, mediump > mediump_vec3
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00317_source.html b/common/glm/doc/api/a00317_source.html new file mode 100644 index 000000000..f77e9654b --- /dev/null +++ b/common/glm/doc/api/a00317_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: vector_float3_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_float3_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec3.hpp"
6 
7 namespace glm
8 {
11 
16  typedef vec<3, float, highp> highp_vec3;
17 
22  typedef vec<3, float, mediump> mediump_vec3;
23 
28  typedef vec<3, float, lowp> lowp_vec3;
29 
31 }//namespace glm
vec< 3, float, lowp > lowp_vec3
3 components vector of low single-qualifier floating-point numbers.
+
vec< 3, float, mediump > mediump_vec3
3 components vector of medium single-qualifier floating-point numbers.
+
vec< 3, float, highp > highp_vec3
3 components vector of high single-qualifier floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00320.html b/common/glm/doc/api/a00320.html new file mode 100644 index 000000000..5e40f8615 --- /dev/null +++ b/common/glm/doc/api/a00320.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: vector_float4.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_float4.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef vec< 4, float, defaultp > vec4
 
+

Detailed Description

+

Core features

+ +

Definition in file vector_float4.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00320_source.html b/common/glm/doc/api/a00320_source.html new file mode 100644 index 000000000..15e07aba5 --- /dev/null +++ b/common/glm/doc/api/a00320_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: vector_float4.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_float4.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec4.hpp"
6 
7 namespace glm
8 {
11 
15  typedef vec<4, float, defaultp> vec4;
16 
18 }//namespace glm
vec< 4, float, defaultp > vec4
4 components vector of single-precision floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00323.html b/common/glm/doc/api/a00323.html new file mode 100644 index 000000000..c2513ab5e --- /dev/null +++ b/common/glm/doc/api/a00323.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: vector_float4_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_float4_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef vec< 4, float, highp > highp_vec4
 
typedef vec< 4, float, lowp > lowp_vec4
 
typedef vec< 4, float, mediump > mediump_vec4
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00323_source.html b/common/glm/doc/api/a00323_source.html new file mode 100644 index 000000000..3d7725489 --- /dev/null +++ b/common/glm/doc/api/a00323_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: vector_float4_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_float4_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec4.hpp"
6 
7 namespace glm
8 {
11 
16  typedef vec<4, float, highp> highp_vec4;
17 
22  typedef vec<4, float, mediump> mediump_vec4;
23 
28  typedef vec<4, float, lowp> lowp_vec4;
29 
31 }//namespace glm
vec< 4, float, highp > highp_vec4
4 components vector of high single-qualifier floating-point numbers.
+
vec< 4, float, lowp > lowp_vec4
4 components vector of low single-qualifier floating-point numbers.
+
Definition: common.hpp:20
+
vec< 4, float, mediump > mediump_vec4
4 components vector of medium single-qualifier floating-point numbers.
+
+ + + + diff --git a/common/glm/doc/api/a00326.html b/common/glm/doc/api/a00326.html new file mode 100644 index 000000000..9d98ca590 --- /dev/null +++ b/common/glm/doc/api/a00326.html @@ -0,0 +1,96 @@ + + + + + + + +0.9.9 API documenation: vector_int1.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_int1.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

+typedef vec< 1, int, defaultp > ivec1
 
+

Detailed Description

+

GLM_EXT_vector_int1

+ +

Definition in file vector_int1.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00326_source.html b/common/glm/doc/api/a00326_source.html new file mode 100644 index 000000000..a05f48421 --- /dev/null +++ b/common/glm/doc/api/a00326_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: vector_int1.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_int1.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 #include "../detail/type_vec1.hpp"
17 
18 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
19 # pragma message("GLM: GLM_EXT_vector_int1 extension included")
20 #endif
21 
22 namespace glm
23 {
26 
28  typedef vec<1, int, defaultp> ivec1;
29 
31 }//namespace glm
32 
vec< 1, int, defaultp > ivec1
1 component vector of signed integer numbers.
Definition: vector_int1.hpp:28
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00329.html b/common/glm/doc/api/a00329.html new file mode 100644 index 000000000..32e16ec6b --- /dev/null +++ b/common/glm/doc/api/a00329.html @@ -0,0 +1,102 @@ + + + + + + + +0.9.9 API documenation: vector_int1_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_int1_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

+typedef vec< 1, int, highp > highp_ivec1
 
+typedef vec< 1, int, lowp > lowp_ivec1
 
+typedef vec< 1, int, mediump > mediump_ivec1
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00329_source.html b/common/glm/doc/api/a00329_source.html new file mode 100644 index 000000000..566f3fe18 --- /dev/null +++ b/common/glm/doc/api/a00329_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: vector_int1_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_int1_precision.hpp
+
+
+Go to the documentation of this file.
1 
11 #pragma once
12 
13 #include "../detail/type_vec1.hpp"
14 
15 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
16 # pragma message("GLM: GLM_EXT_vector_int1_precision extension included")
17 #endif
18 
19 namespace glm
20 {
23 
25  typedef vec<1, int, highp> highp_ivec1;
26 
28  typedef vec<1, int, mediump> mediump_ivec1;
29 
31  typedef vec<1, int, lowp> lowp_ivec1;
32 
34 }//namespace glm
vec< 1, int, mediump > mediump_ivec1
1 component vector of signed integer values.
+
vec< 1, int, highp > highp_ivec1
1 component vector of signed integer values.
+
vec< 1, int, lowp > lowp_ivec1
1 component vector of signed integer values.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00332.html b/common/glm/doc/api/a00332.html new file mode 100644 index 000000000..9f2a0b4a7 --- /dev/null +++ b/common/glm/doc/api/a00332.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: vector_int2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_int2.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef vec< 2, int, defaultp > ivec2
 
+

Detailed Description

+

Core features

+ +

Definition in file vector_int2.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00332_source.html b/common/glm/doc/api/a00332_source.html new file mode 100644 index 000000000..6d13c17e1 --- /dev/null +++ b/common/glm/doc/api/a00332_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: vector_int2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_int2.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec2.hpp"
6 
7 namespace glm
8 {
11 
15  typedef vec<2, int, defaultp> ivec2;
16 
18 }//namespace glm
vec< 2, int, defaultp > ivec2
2 components vector of signed integer numbers.
Definition: vector_int2.hpp:15
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00335.html b/common/glm/doc/api/a00335.html new file mode 100644 index 000000000..34cac79e2 --- /dev/null +++ b/common/glm/doc/api/a00335.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: vector_int2_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_int2_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef vec< 2, int, highp > highp_ivec2
 
typedef vec< 2, int, lowp > lowp_ivec2
 
typedef vec< 2, int, mediump > mediump_ivec2
 
+

Detailed Description

+

Core features

+ +

Definition in file vector_int2_precision.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00335_source.html b/common/glm/doc/api/a00335_source.html new file mode 100644 index 000000000..3f18c1a96 --- /dev/null +++ b/common/glm/doc/api/a00335_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: vector_int2_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_int2_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec2.hpp"
6 
7 namespace glm
8 {
11 
16  typedef vec<2, int, highp> highp_ivec2;
17 
22  typedef vec<2, int, mediump> mediump_ivec2;
23 
28  typedef vec<2, int, lowp> lowp_ivec2;
29 
31 }//namespace glm
vec< 2, int, lowp > lowp_ivec2
2 components vector of low qualifier signed integer numbers.
+
vec< 2, int, mediump > mediump_ivec2
2 components vector of medium qualifier signed integer numbers.
+
vec< 2, int, highp > highp_ivec2
2 components vector of high qualifier signed integer numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00338.html b/common/glm/doc/api/a00338.html new file mode 100644 index 000000000..1eff9070c --- /dev/null +++ b/common/glm/doc/api/a00338.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: vector_int3.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_int3.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef vec< 3, int, defaultp > ivec3
 
+

Detailed Description

+

Core features

+ +

Definition in file vector_int3.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00338_source.html b/common/glm/doc/api/a00338_source.html new file mode 100644 index 000000000..3cfe0b665 --- /dev/null +++ b/common/glm/doc/api/a00338_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: vector_int3.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_int3.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec3.hpp"
6 
7 namespace glm
8 {
11 
15  typedef vec<3, int, defaultp> ivec3;
16 
18 }//namespace glm
Definition: common.hpp:20
+
vec< 3, int, defaultp > ivec3
3 components vector of signed integer numbers.
Definition: vector_int3.hpp:15
+
+ + + + diff --git a/common/glm/doc/api/a00341.html b/common/glm/doc/api/a00341.html new file mode 100644 index 000000000..5ed89cc24 --- /dev/null +++ b/common/glm/doc/api/a00341.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: vector_int3_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_int3_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef vec< 3, int, highp > highp_ivec3
 
typedef vec< 3, int, lowp > lowp_ivec3
 
typedef vec< 3, int, mediump > mediump_ivec3
 
+

Detailed Description

+

Core features

+ +

Definition in file vector_int3_precision.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00341_source.html b/common/glm/doc/api/a00341_source.html new file mode 100644 index 000000000..0db3991e7 --- /dev/null +++ b/common/glm/doc/api/a00341_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: vector_int3_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_int3_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec3.hpp"
6 
7 namespace glm
8 {
11 
16  typedef vec<3, int, highp> highp_ivec3;
17 
22  typedef vec<3, int, mediump> mediump_ivec3;
23 
28  typedef vec<3, int, lowp> lowp_ivec3;
29 
31 }//namespace glm
vec< 3, int, lowp > lowp_ivec3
3 components vector of low qualifier signed integer numbers.
+
vec< 3, int, mediump > mediump_ivec3
3 components vector of medium qualifier signed integer numbers.
+
Definition: common.hpp:20
+
vec< 3, int, highp > highp_ivec3
3 components vector of high qualifier signed integer numbers.
+
+ + + + diff --git a/common/glm/doc/api/a00344.html b/common/glm/doc/api/a00344.html new file mode 100644 index 000000000..df8861772 --- /dev/null +++ b/common/glm/doc/api/a00344.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: vector_int4.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_int4.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef vec< 4, int, defaultp > ivec4
 
+

Detailed Description

+

Core features

+ +

Definition in file vector_int4.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00344_source.html b/common/glm/doc/api/a00344_source.html new file mode 100644 index 000000000..bef1d2075 --- /dev/null +++ b/common/glm/doc/api/a00344_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: vector_int4.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_int4.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec4.hpp"
6 
7 namespace glm
8 {
11 
15  typedef vec<4, int, defaultp> ivec4;
16 
18 }//namespace glm
Definition: common.hpp:20
+
vec< 4, int, defaultp > ivec4
4 components vector of signed integer numbers.
Definition: vector_int4.hpp:15
+
+ + + + diff --git a/common/glm/doc/api/a00347.html b/common/glm/doc/api/a00347.html new file mode 100644 index 000000000..cac6bc4d6 --- /dev/null +++ b/common/glm/doc/api/a00347.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: vector_int4_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_int4_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef vec< 4, int, highp > highp_ivec4
 
typedef vec< 4, int, lowp > lowp_ivec4
 
typedef vec< 4, int, mediump > mediump_ivec4
 
+

Detailed Description

+

Core features

+ +

Definition in file vector_int4_precision.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00347_source.html b/common/glm/doc/api/a00347_source.html new file mode 100644 index 000000000..7a13d34ee --- /dev/null +++ b/common/glm/doc/api/a00347_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: vector_int4_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_int4_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec4.hpp"
6 
7 namespace glm
8 {
11 
16  typedef vec<4, int, highp> highp_ivec4;
17 
22  typedef vec<4, int, mediump> mediump_ivec4;
23 
28  typedef vec<4, int, lowp> lowp_ivec4;
29 
31 }//namespace glm
vec< 4, int, lowp > lowp_ivec4
4 components vector of low qualifier signed integer numbers.
+
vec< 4, int, highp > highp_ivec4
4 components vector of high qualifier signed integer numbers.
+
vec< 4, int, mediump > mediump_ivec4
4 components vector of medium qualifier signed integer numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00350.html b/common/glm/doc/api/a00350.html new file mode 100644 index 000000000..32505194f --- /dev/null +++ b/common/glm/doc/api/a00350.html @@ -0,0 +1,121 @@ + + + + + + + +0.9.9 API documenation: vector_relational.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_relational.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<length_t L, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR bool all (vec< L, bool, Q > const &v)
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR bool any (vec< L, bool, Q > const &v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > greaterThan (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > greaterThanEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > lessThan (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > lessThanEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > not_ (vec< L, bool, Q > const &v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00350_source.html b/common/glm/doc/api/a00350_source.html new file mode 100644 index 000000000..496368e47 --- /dev/null +++ b/common/glm/doc/api/a00350_source.html @@ -0,0 +1,91 @@ + + + + + + + +0.9.9 API documenation: vector_relational.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_relational.hpp
+
+
+Go to the documentation of this file.
1 
20 #pragma once
21 
22 #include "detail/qualifier.hpp"
23 #include "detail/setup.hpp"
24 
25 namespace glm
26 {
29 
37  template<length_t L, typename T, qualifier Q>
38  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> lessThan(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
39 
47  template<length_t L, typename T, qualifier Q>
48  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> lessThanEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
49 
57  template<length_t L, typename T, qualifier Q>
58  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> greaterThan(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
59 
67  template<length_t L, typename T, qualifier Q>
68  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> greaterThanEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
69 
77  template<length_t L, typename T, qualifier Q>
78  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
79 
87  template<length_t L, typename T, qualifier Q>
88  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
89 
96  template<length_t L, qualifier Q>
97  GLM_FUNC_DECL GLM_CONSTEXPR bool any(vec<L, bool, Q> const& v);
98 
105  template<length_t L, qualifier Q>
106  GLM_FUNC_DECL GLM_CONSTEXPR bool all(vec<L, bool, Q> const& v);
107 
115  template<length_t L, qualifier Q>
116  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> not_(vec<L, bool, Q> const& v);
117 
119 }//namespace glm
120 
121 #include "detail/func_vector_relational.inl"
GLM_FUNC_DECL GLM_CONSTEXPR bool all(vec< L, bool, Q > const &v)
Returns true if all components of x are true.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual(vec< L, T, Q > const &x, vec< L, T, Q > const &y)
Returns the component-wise comparison of result x != y.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal(vec< L, T, Q > const &x, vec< L, T, Q > const &y)
Returns the component-wise comparison of result x == y.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > lessThan(vec< L, T, Q > const &x, vec< L, T, Q > const &y)
Returns the component-wise comparison result of x < y.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > not_(vec< L, bool, Q > const &v)
Returns the component-wise logical complement of x.
+
GLM_FUNC_DECL GLM_CONSTEXPR bool any(vec< L, bool, Q > const &v)
Returns true if any component of x is true.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > greaterThanEqual(vec< L, T, Q > const &x, vec< L, T, Q > const &y)
Returns the component-wise comparison of result x >= y.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > lessThanEqual(vec< L, T, Q > const &x, vec< L, T, Q > const &y)
Returns the component-wise comparison of result x <= y.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > greaterThan(vec< L, T, Q > const &x, vec< L, T, Q > const &y)
Returns the component-wise comparison of result x > y.
+
+ + + + diff --git a/common/glm/doc/api/a00353.html b/common/glm/doc/api/a00353.html new file mode 100644 index 000000000..a8de8d365 --- /dev/null +++ b/common/glm/doc/api/a00353.html @@ -0,0 +1,96 @@ + + + + + + + +0.9.9 API documenation: vector_uint1.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_uint1.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

+typedef vec< 1, unsigned int, defaultp > uvec1
 
+

Detailed Description

+

GLM_EXT_vector_uint1

+ +

Definition in file vector_uint1.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00353_source.html b/common/glm/doc/api/a00353_source.html new file mode 100644 index 000000000..dc59917cd --- /dev/null +++ b/common/glm/doc/api/a00353_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: vector_uint1.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_uint1.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 #include "../detail/type_vec1.hpp"
17 
18 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
19 # pragma message("GLM: GLM_EXT_vector_uint1 extension included")
20 #endif
21 
22 namespace glm
23 {
26 
28  typedef vec<1, unsigned int, defaultp> uvec1;
29 
31 }//namespace glm
32 
vec< 1, unsigned int, defaultp > uvec1
1 component vector of unsigned integer numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00356.html b/common/glm/doc/api/a00356.html new file mode 100644 index 000000000..e20e77a54 --- /dev/null +++ b/common/glm/doc/api/a00356.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: vector_uint1_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_uint1_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef vec< 1, unsigned int, highp > highp_uvec1
 
typedef vec< 1, unsigned int, lowp > lowp_uvec1
 
typedef vec< 1, unsigned int, mediump > mediump_uvec1
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00356_source.html b/common/glm/doc/api/a00356_source.html new file mode 100644 index 000000000..19b9209ae --- /dev/null +++ b/common/glm/doc/api/a00356_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: vector_uint1_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_uint1_precision.hpp
+
+
+Go to the documentation of this file.
1 
11 #pragma once
12 
13 #include "../detail/type_vec1.hpp"
14 
15 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
16 # pragma message("GLM: GLM_EXT_vector_uint1_precision extension included")
17 #endif
18 
19 namespace glm
20 {
23 
27  typedef vec<1, unsigned int, highp> highp_uvec1;
28 
32  typedef vec<1, unsigned int, mediump> mediump_uvec1;
33 
37  typedef vec<1, unsigned int, lowp> lowp_uvec1;
38 
40 }//namespace glm
vec< 1, unsigned int, highp > highp_uvec1
1 component vector of unsigned integer values.
+
vec< 1, unsigned int, lowp > lowp_uvec1
1 component vector of unsigned integer values.
+
vec< 1, unsigned int, mediump > mediump_uvec1
1 component vector of unsigned integer values.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00359.html b/common/glm/doc/api/a00359.html new file mode 100644 index 000000000..8a01f3700 --- /dev/null +++ b/common/glm/doc/api/a00359.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: vector_uint2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_uint2.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef vec< 2, unsigned int, defaultp > uvec2
 
+

Detailed Description

+

Core features

+ +

Definition in file vector_uint2.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00359_source.html b/common/glm/doc/api/a00359_source.html new file mode 100644 index 000000000..20708ce86 --- /dev/null +++ b/common/glm/doc/api/a00359_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: vector_uint2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_uint2.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec2.hpp"
6 
7 namespace glm
8 {
11 
15  typedef vec<2, unsigned int, defaultp> uvec2;
16 
18 }//namespace glm
vec< 2, unsigned int, defaultp > uvec2
2 components vector of unsigned integer numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00362.html b/common/glm/doc/api/a00362.html new file mode 100644 index 000000000..6b96578fd --- /dev/null +++ b/common/glm/doc/api/a00362.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: vector_uint2_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_uint2_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef vec< 2, unsigned int, highp > highp_uvec2
 
typedef vec< 2, unsigned int, lowp > lowp_uvec2
 
typedef vec< 2, unsigned int, mediump > mediump_uvec2
 
+

Detailed Description

+

Core features

+ +

Definition in file vector_uint2_precision.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00362_source.html b/common/glm/doc/api/a00362_source.html new file mode 100644 index 000000000..f9d6d5130 --- /dev/null +++ b/common/glm/doc/api/a00362_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: vector_uint2_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_uint2_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec2.hpp"
6 
7 namespace glm
8 {
11 
16  typedef vec<2, unsigned int, highp> highp_uvec2;
17 
22  typedef vec<2, unsigned int, mediump> mediump_uvec2;
23 
28  typedef vec<2, unsigned int, lowp> lowp_uvec2;
29 
31 }//namespace glm
vec< 2, unsigned int, highp > highp_uvec2
2 components vector of high qualifier unsigned integer numbers.
+
vec< 2, unsigned int, mediump > mediump_uvec2
2 components vector of medium qualifier unsigned integer numbers.
+
vec< 2, unsigned int, lowp > lowp_uvec2
2 components vector of low qualifier unsigned integer numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00365.html b/common/glm/doc/api/a00365.html new file mode 100644 index 000000000..fc527b605 --- /dev/null +++ b/common/glm/doc/api/a00365.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: vector_uint3.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_uint3.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef vec< 3, unsigned int, defaultp > uvec3
 
+

Detailed Description

+

Core features

+ +

Definition in file vector_uint3.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00365_source.html b/common/glm/doc/api/a00365_source.html new file mode 100644 index 000000000..1070b1606 --- /dev/null +++ b/common/glm/doc/api/a00365_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: vector_uint3.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_uint3.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec3.hpp"
6 
7 namespace glm
8 {
11 
15  typedef vec<3, unsigned int, defaultp> uvec3;
16 
18 }//namespace glm
vec< 3, unsigned int, defaultp > uvec3
3 components vector of unsigned integer numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00368.html b/common/glm/doc/api/a00368.html new file mode 100644 index 000000000..bc39ddcaa --- /dev/null +++ b/common/glm/doc/api/a00368.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: vector_uint3_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_uint3_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef vec< 3, unsigned int, highp > highp_uvec3
 
typedef vec< 3, unsigned int, lowp > lowp_uvec3
 
typedef vec< 3, unsigned int, mediump > mediump_uvec3
 
+

Detailed Description

+

Core features

+ +

Definition in file vector_uint3_precision.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00368_source.html b/common/glm/doc/api/a00368_source.html new file mode 100644 index 000000000..7bcd9e365 --- /dev/null +++ b/common/glm/doc/api/a00368_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: vector_uint3_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_uint3_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec3.hpp"
6 
7 namespace glm
8 {
11 
16  typedef vec<3, unsigned int, highp> highp_uvec3;
17 
22  typedef vec<3, unsigned int, mediump> mediump_uvec3;
23 
28  typedef vec<3, unsigned int, lowp> lowp_uvec3;
29 
31 }//namespace glm
vec< 3, unsigned int, highp > highp_uvec3
3 components vector of high qualifier unsigned integer numbers.
+
vec< 3, unsigned int, lowp > lowp_uvec3
3 components vector of low qualifier unsigned integer numbers.
+
vec< 3, unsigned int, mediump > mediump_uvec3
3 components vector of medium qualifier unsigned integer numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00371.html b/common/glm/doc/api/a00371.html new file mode 100644 index 000000000..c9c2e0c1f --- /dev/null +++ b/common/glm/doc/api/a00371.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: vector_uint4.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_uint4.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef vec< 4, unsigned int, defaultp > uvec4
 
+

Detailed Description

+

Core features

+ +

Definition in file vector_uint4.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00371_source.html b/common/glm/doc/api/a00371_source.html new file mode 100644 index 000000000..78e332fc2 --- /dev/null +++ b/common/glm/doc/api/a00371_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: vector_uint4.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_uint4.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec4.hpp"
6 
7 namespace glm
8 {
11 
15  typedef vec<4, unsigned int, defaultp> uvec4;
16 
18 }//namespace glm
vec< 4, unsigned int, defaultp > uvec4
4 components vector of unsigned integer numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00374.html b/common/glm/doc/api/a00374.html new file mode 100644 index 000000000..1efee9b71 --- /dev/null +++ b/common/glm/doc/api/a00374.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: vector_uint4_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_uint4_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Typedefs

typedef vec< 4, unsigned int, highp > highp_uvec4
 
typedef vec< 4, unsigned int, lowp > lowp_uvec4
 
typedef vec< 4, unsigned int, mediump > mediump_uvec4
 
+

Detailed Description

+

Core features

+ +

Definition in file vector_uint4_precision.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00374_source.html b/common/glm/doc/api/a00374_source.html new file mode 100644 index 000000000..3b5e50017 --- /dev/null +++ b/common/glm/doc/api/a00374_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: vector_uint4_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_uint4_precision.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
5 #include "../detail/type_vec4.hpp"
6 
7 namespace glm
8 {
11 
16  typedef vec<4, unsigned int, highp> highp_uvec4;
17 
22  typedef vec<4, unsigned int, mediump> mediump_uvec4;
23 
28  typedef vec<4, unsigned int, lowp> lowp_uvec4;
29 
31 }//namespace glm
vec< 4, unsigned int, highp > highp_uvec4
4 components vector of high qualifier unsigned integer numbers.
+
vec< 4, unsigned int, mediump > mediump_uvec4
4 components vector of medium qualifier unsigned integer numbers.
+
Definition: common.hpp:20
+
vec< 4, unsigned int, lowp > lowp_uvec4
4 components vector of low qualifier unsigned integer numbers.
+
+ + + + diff --git a/common/glm/doc/api/a00377.html b/common/glm/doc/api/a00377.html new file mode 100644 index 000000000..aa8886dc7 --- /dev/null +++ b/common/glm/doc/api/a00377.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: ext.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ext.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Core features (Dependence)

+ +

Definition in file ext.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00377_source.html b/common/glm/doc/api/a00377_source.html new file mode 100644 index 000000000..b4e50bac5 --- /dev/null +++ b/common/glm/doc/api/a00377_source.html @@ -0,0 +1,239 @@ + + + + + + + +0.9.9 API documenation: ext.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ext.hpp
+
+
+Go to the documentation of this file.
1 
5 #include "detail/setup.hpp"
6 
7 #pragma once
8 
9 #include "glm.hpp"
10 
11 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_MESSAGE_EXT_INCLUDED_DISPLAYED)
12 # define GLM_MESSAGE_EXT_INCLUDED_DISPLAYED
13 # pragma message("GLM: All extensions included (not recommended)")
14 #endif//GLM_MESSAGES
15 
34 
48 #include "./ext/matrix_float4x2_precision.hpp"
53 
55 
62 
67 
68 #include "./ext/vector_bool1.hpp"
70 #include "./ext/vector_bool2.hpp"
72 #include "./ext/vector_bool3.hpp"
74 #include "./ext/vector_bool4.hpp"
76 
77 #include "./ext/vector_double1.hpp"
79 #include "./ext/vector_double2.hpp"
81 #include "./ext/vector_double3.hpp"
83 #include "./ext/vector_double4.hpp"
85 
86 #include "./ext/vector_float1.hpp"
88 #include "./ext/vector_float2.hpp"
90 #include "./ext/vector_float3.hpp"
92 #include "./ext/vector_float4.hpp"
94 
95 #include "./ext/vector_int1.hpp"
97 #include "./ext/vector_int2.hpp"
99 #include "./ext/vector_int3.hpp"
101 #include "./ext/vector_int4.hpp"
103 
105 
106 #include "./ext/vector_uint1.hpp"
108 #include "./ext/vector_uint2.hpp"
110 #include "./ext/vector_uint3.hpp"
112 #include "./ext/vector_uint4.hpp"
114 
115 #include "./gtc/bitfield.hpp"
116 #include "./gtc/color_space.hpp"
117 #include "./gtc/constants.hpp"
118 #include "./gtc/epsilon.hpp"
119 #include "./gtc/integer.hpp"
120 #include "./gtc/matrix_access.hpp"
121 #include "./gtc/matrix_integer.hpp"
122 #include "./gtc/matrix_inverse.hpp"
124 #include "./gtc/noise.hpp"
125 #include "./gtc/packing.hpp"
126 #include "./gtc/quaternion.hpp"
127 #include "./gtc/random.hpp"
128 #include "./gtc/reciprocal.hpp"
129 #include "./gtc/round.hpp"
130 #include "./gtc/type_precision.hpp"
131 #include "./gtc/type_ptr.hpp"
132 #include "./gtc/ulp.hpp"
133 #include "./gtc/vec1.hpp"
134 #if GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE
135 # include "./gtc/type_aligned.hpp"
136 #endif
137 
138 #ifdef GLM_ENABLE_EXPERIMENTAL
140 #include "./gtx/bit.hpp"
141 #include "./gtx/closest_point.hpp"
142 #include "./gtx/color_encoding.hpp"
143 #include "./gtx/color_space.hpp"
145 #include "./gtx/compatibility.hpp"
146 #include "./gtx/component_wise.hpp"
147 #include "./gtx/dual_quaternion.hpp"
148 #include "./gtx/euler_angles.hpp"
149 #include "./gtx/extend.hpp"
154 #include "./gtx/functions.hpp"
155 #include "./gtx/gradient_paint.hpp"
157 #include "./gtx/integer.hpp"
158 #include "./gtx/intersect.hpp"
159 #include "./gtx/log_base.hpp"
164 #include "./gtx/matrix_query.hpp"
165 #include "./gtx/mixed_product.hpp"
166 #include "./gtx/norm.hpp"
167 #include "./gtx/normal.hpp"
168 #include "./gtx/normalize_dot.hpp"
170 #include "./gtx/optimum_pow.hpp"
171 #include "./gtx/orthonormalize.hpp"
172 #include "./gtx/perpendicular.hpp"
174 #include "./gtx/projection.hpp"
175 #include "./gtx/quaternion.hpp"
176 #include "./gtx/raw_data.hpp"
177 #include "./gtx/rotate_vector.hpp"
178 #include "./gtx/spline.hpp"
179 #include "./gtx/std_based_type.hpp"
180 #if !(GLM_COMPILER & GLM_COMPILER_CUDA)
181 # include "./gtx/string_cast.hpp"
182 #endif
183 #include "./gtx/transform.hpp"
184 #include "./gtx/transform2.hpp"
185 #include "./gtx/vec_swizzle.hpp"
186 #include "./gtx/vector_angle.hpp"
187 #include "./gtx/vector_query.hpp"
188 #include "./gtx/wrap.hpp"
189 
190 #if GLM_HAS_TEMPLATE_ALIASES
192 #endif
193 
194 #if GLM_HAS_RANGE_FOR
195 # include "./gtx/range.hpp"
196 #endif
197 #endif//GLM_ENABLE_EXPERIMENTAL
GLM_EXT_quaternion_relational
+
GLM_GTX_matrix_interpolation
+
GLM_GTC_random
+
Core features
+
GLM_GTC_matrix_inverse
+
Core features
+ + +
GLM_EXT_scalar_float_sized
+
GLM_GTX_mixed_producte
+
GLM_GTX_fast_trigonometry
+
GLM_EXT_vector_uint1_precision
+ +
GLM_GTX_quaternion
+
GLM_GTX_matrix_major_storage
+
Core features
+
GLM_EXT_quaternion_float
+
GLM_GTX_matrix_cross_product
+
GLM_EXT_scalar_int_sized
+
GLM_GTX_norm
+ +
GLM_GTX_matrix_operation
+
GLM_GTX_fast_square_root
+
Core features
+
Core features
+
GLM_GTX_extend
+ +
Core features
+
GLM_GTX_component_wise
+ +
Core features
+ + +
GLM_EXT_quaternion_geometric
+
GLM_GTX_extented_min_max
+
GLM_GTX_dual_quaternion
+
Core features
+ +
GLM_GTX_transform
+
GLM_EXT_vector_relational
+
GLM_GTX_color_encoding
+
Core features
+ +
GLM_GTX_spline
+
GLM_EXT_scalar_relational
+
GLM_GTC_vec1
+
Core features
+ +
GLM_EXT_quaternion_float_precision
+
GLM_GTC_matrix_transform
+ +
Core features
+
GLM_EXT_quaternion_double
+
GLM_GTX_intersect
+ +
GLM_GTX_transform2
+ +
GLM_GTX_std_based_type
+
GLM_GTC_packing
+
Core features
+
Core features
+
GLM_EXT_quaternion_double_precision
+
GLM_GTX_polar_coordinates
+
GLM_GTC_integer
+
GLM_GTX_compatibility
+
Core features
+
GLM_EXT_vector_int1
+ +
GLM_GTX_string_cast
+
GLM_GTC_type_aligned
+
Core features
+
GLM_GTC_quaternion
+
GLM_GTX_wrap
+ +
GLM_GTX_log_base
+
GLM_GTC_constants
+
GLM_GTX_handed_coordinate_space
+
GLM_GTX_color_space_YCoCg
+
GLM_EXT_vector_int1_precision
+
Core features
+
GLM_GTX_associated_min_max
+
GLM_EXT_vector_double1_precision
+ +
Core features
+
Experimental extensions
+
GLM_GTC_type_precision
+
GLM_EXT_vector_float1_precision
+
Core features
+
GLM_GTX_vec_swizzle
+
Core features
+
Core features
+
GLM_GTX_bit
+
GLM_EXT_vector_double1
+ +
GLM_GTX_rotate_vector
+
GLM_GTC_type_ptr
+ + +
GLM_GTX_projection
+
GLM_GTX_integer
+
GLM_GTC_reciprocal
+
GLM_EXT_vector_bool1_precision
+ +
GLM_GTX_optimum_pow
+
GLM_GTC_color_space
+
GLM_GTX_closest_point
+
GLM_GTC_noise
+
Core features
+ +
GLM_GTC_ulp
+ +
Core features
+
Core features
+
GLM_GTX_vector_query
+
GLM_GTC_epsilon
+
Core features
+
Core features
+
GLM_GTX_range
+
Core features
+
Core features
+
GLM_GTX_orthonormalize
+
GLM_GTX_color_space
+ +
GLM_GTX_normal
+ +
Core features
+
GLM_GTX_raw_data
+
GLM_GTX_matrix_query
+
GLM_GTX_vector_angle
+ + + +
GLM_GTX_perpendicular
+
GLM_GTC_bitfield
+
GLM_GTX_functions
+
Core features
+
Core features
+
GLM_EXT_vector_uint1
+
GLM_GTC_round
+
Core features
+
GLM_EXT_vector_bool1
+
Core features
+
GLM_GTX_number_precision
+
GLM_GTC_matrix_access
+
Core features
+
GLM_GTX_gradient_paint
+
GLM_EXT_matrix_relational
+
GLM_EXT_vector_float1
+
GLM_GTX_fast_exponential
+ +
GLM_GTX_euler_angles
+ + +
GLM_GTX_normalize_dot
+
Core features
+
GLM_GTC_matrix_integer
+
GLM_EXT_scalar_constants
+ +
+ + + + diff --git a/common/glm/doc/api/a00380.html b/common/glm/doc/api/a00380.html new file mode 100644 index 000000000..78e2439c0 --- /dev/null +++ b/common/glm/doc/api/a00380.html @@ -0,0 +1,90 @@ + + + + + + + +0.9.9 API documenation: ext.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ext.hpp File Reference
+
+
+ +

Core features (Dependence) +More...

+ +

Go to the source code of this file.

+

Detailed Description

+

Core features (Dependence)

+ +

Definition in file ext.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00380_source.html b/common/glm/doc/api/a00380_source.html new file mode 100644 index 000000000..d67b69fb9 --- /dev/null +++ b/common/glm/doc/api/a00380_source.html @@ -0,0 +1,714 @@ + + + + + + + +0.9.9 API documenation: fwd.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
fwd.hpp
+
+
+
1 #pragma once
2 
3 #include "detail/qualifier.hpp"
4 
5 namespace glm
6 {
7 #if GLM_HAS_EXTENDED_INTEGER_TYPE
8  typedef std::int8_t int8;
9  typedef std::int16_t int16;
10  typedef std::int32_t int32;
11  typedef std::int64_t int64;
12 
13  typedef std::uint8_t uint8;
14  typedef std::uint16_t uint16;
15  typedef std::uint32_t uint32;
16  typedef std::uint64_t uint64;
17 #else
18  typedef char int8;
19  typedef short int16;
20  typedef int int32;
21  typedef detail::int64 int64;
22 
23  typedef unsigned char uint8;
24  typedef unsigned short uint16;
25  typedef unsigned int uint32;
26  typedef detail::uint64 uint64;
27 #endif
28 
29  // Scalar int
30 
31  typedef int8 lowp_i8;
32  typedef int8 mediump_i8;
33  typedef int8 highp_i8;
34  typedef int8 i8;
35 
36  typedef int8 lowp_int8;
37  typedef int8 mediump_int8;
38  typedef int8 highp_int8;
39 
40  typedef int8 lowp_int8_t;
42  typedef int8 highp_int8_t;
43  typedef int8 int8_t;
44 
45  typedef int16 lowp_i16;
46  typedef int16 mediump_i16;
47  typedef int16 highp_i16;
48  typedef int16 i16;
49 
50  typedef int16 lowp_int16;
52  typedef int16 highp_int16;
53 
57  typedef int16 int16_t;
58 
59  typedef int32 lowp_i32;
60  typedef int32 mediump_i32;
61  typedef int32 highp_i32;
62  typedef int32 i32;
63 
64  typedef int32 lowp_int32;
66  typedef int32 highp_int32;
67 
71  typedef int32 int32_t;
72 
73  typedef int64 lowp_i64;
74  typedef int64 mediump_i64;
75  typedef int64 highp_i64;
76  typedef int64 i64;
77 
78  typedef int64 lowp_int64;
80  typedef int64 highp_int64;
81 
85  typedef int64 int64_t;
86 
87  // Scalar uint
88 
89  typedef uint8 lowp_u8;
90  typedef uint8 mediump_u8;
91  typedef uint8 highp_u8;
92  typedef uint8 u8;
93 
94  typedef uint8 lowp_uint8;
96  typedef uint8 highp_uint8;
97 
101  typedef uint8 uint8_t;
102 
103  typedef uint16 lowp_u16;
105  typedef uint16 highp_u16;
106  typedef uint16 u16;
107 
111 
115  typedef uint16 uint16_t;
116 
117  typedef uint32 lowp_u32;
119  typedef uint32 highp_u32;
120  typedef uint32 u32;
121 
125 
129  typedef uint32 uint32_t;
130 
131  typedef uint64 lowp_u64;
133  typedef uint64 highp_u64;
134  typedef uint64 u64;
135 
139 
143  typedef uint64 uint64_t;
144 
145  // Scalar float
146 
147  typedef float lowp_f32;
148  typedef float mediump_f32;
149  typedef float highp_f32;
150  typedef float f32;
151 
152  typedef float lowp_float32;
153  typedef float mediump_float32;
154  typedef float highp_float32;
155  typedef float float32;
156 
157  typedef float lowp_float32_t;
158  typedef float mediump_float32_t;
159  typedef float highp_float32_t;
160  typedef float float32_t;
161 
162 
163  typedef double lowp_f64;
164  typedef double mediump_f64;
165  typedef double highp_f64;
166  typedef double f64;
167 
168  typedef double lowp_float64;
169  typedef double mediump_float64;
170  typedef double highp_float64;
171  typedef double float64;
172 
173  typedef double lowp_float64_t;
174  typedef double mediump_float64_t;
175  typedef double highp_float64_t;
176  typedef double float64_t;
177 
178  // Vector bool
179 
180  typedef vec<1, bool, lowp> lowp_bvec1;
181  typedef vec<2, bool, lowp> lowp_bvec2;
182  typedef vec<3, bool, lowp> lowp_bvec3;
183  typedef vec<4, bool, lowp> lowp_bvec4;
184 
185  typedef vec<1, bool, mediump> mediump_bvec1;
186  typedef vec<2, bool, mediump> mediump_bvec2;
187  typedef vec<3, bool, mediump> mediump_bvec3;
188  typedef vec<4, bool, mediump> mediump_bvec4;
189 
190  typedef vec<1, bool, highp> highp_bvec1;
191  typedef vec<2, bool, highp> highp_bvec2;
192  typedef vec<3, bool, highp> highp_bvec3;
193  typedef vec<4, bool, highp> highp_bvec4;
194 
195  typedef vec<1, bool, defaultp> bvec1;
196  typedef vec<2, bool, defaultp> bvec2;
197  typedef vec<3, bool, defaultp> bvec3;
198  typedef vec<4, bool, defaultp> bvec4;
199 
200  // Vector int
201 
202  typedef vec<1, i32, lowp> lowp_ivec1;
203  typedef vec<2, i32, lowp> lowp_ivec2;
204  typedef vec<3, i32, lowp> lowp_ivec3;
205  typedef vec<4, i32, lowp> lowp_ivec4;
206 
207  typedef vec<1, i32, mediump> mediump_ivec1;
208  typedef vec<2, i32, mediump> mediump_ivec2;
209  typedef vec<3, i32, mediump> mediump_ivec3;
210  typedef vec<4, i32, mediump> mediump_ivec4;
211 
212  typedef vec<1, i32, highp> highp_ivec1;
213  typedef vec<2, i32, highp> highp_ivec2;
214  typedef vec<3, i32, highp> highp_ivec3;
215  typedef vec<4, i32, highp> highp_ivec4;
216 
217  typedef vec<1, i32, defaultp> ivec1;
218  typedef vec<2, i32, defaultp> ivec2;
219  typedef vec<3, i32, defaultp> ivec3;
220  typedef vec<4, i32, defaultp> ivec4;
221 
222  typedef vec<1, i8, lowp> lowp_i8vec1;
223  typedef vec<2, i8, lowp> lowp_i8vec2;
224  typedef vec<3, i8, lowp> lowp_i8vec3;
225  typedef vec<4, i8, lowp> lowp_i8vec4;
226 
227  typedef vec<1, i8, mediump> mediump_i8vec1;
228  typedef vec<2, i8, mediump> mediump_i8vec2;
229  typedef vec<3, i8, mediump> mediump_i8vec3;
230  typedef vec<4, i8, mediump> mediump_i8vec4;
231 
232  typedef vec<1, i8, highp> highp_i8vec1;
233  typedef vec<2, i8, highp> highp_i8vec2;
234  typedef vec<3, i8, highp> highp_i8vec3;
235  typedef vec<4, i8, highp> highp_i8vec4;
236 
237  typedef vec<1, i8, defaultp> i8vec1;
238  typedef vec<2, i8, defaultp> i8vec2;
239  typedef vec<3, i8, defaultp> i8vec3;
240  typedef vec<4, i8, defaultp> i8vec4;
241 
242  typedef vec<1, i16, lowp> lowp_i16vec1;
243  typedef vec<2, i16, lowp> lowp_i16vec2;
244  typedef vec<3, i16, lowp> lowp_i16vec3;
245  typedef vec<4, i16, lowp> lowp_i16vec4;
246 
247  typedef vec<1, i16, mediump> mediump_i16vec1;
248  typedef vec<2, i16, mediump> mediump_i16vec2;
249  typedef vec<3, i16, mediump> mediump_i16vec3;
250  typedef vec<4, i16, mediump> mediump_i16vec4;
251 
252  typedef vec<1, i16, highp> highp_i16vec1;
253  typedef vec<2, i16, highp> highp_i16vec2;
254  typedef vec<3, i16, highp> highp_i16vec3;
255  typedef vec<4, i16, highp> highp_i16vec4;
256 
257  typedef vec<1, i16, defaultp> i16vec1;
258  typedef vec<2, i16, defaultp> i16vec2;
259  typedef vec<3, i16, defaultp> i16vec3;
260  typedef vec<4, i16, defaultp> i16vec4;
261 
262  typedef vec<1, i32, lowp> lowp_i32vec1;
263  typedef vec<2, i32, lowp> lowp_i32vec2;
264  typedef vec<3, i32, lowp> lowp_i32vec3;
265  typedef vec<4, i32, lowp> lowp_i32vec4;
266 
267  typedef vec<1, i32, mediump> mediump_i32vec1;
268  typedef vec<2, i32, mediump> mediump_i32vec2;
269  typedef vec<3, i32, mediump> mediump_i32vec3;
270  typedef vec<4, i32, mediump> mediump_i32vec4;
271 
272  typedef vec<1, i32, highp> highp_i32vec1;
273  typedef vec<2, i32, highp> highp_i32vec2;
274  typedef vec<3, i32, highp> highp_i32vec3;
275  typedef vec<4, i32, highp> highp_i32vec4;
276 
277  typedef vec<1, i32, defaultp> i32vec1;
278  typedef vec<2, i32, defaultp> i32vec2;
279  typedef vec<3, i32, defaultp> i32vec3;
280  typedef vec<4, i32, defaultp> i32vec4;
281 
282  typedef vec<1, i64, lowp> lowp_i64vec1;
283  typedef vec<2, i64, lowp> lowp_i64vec2;
284  typedef vec<3, i64, lowp> lowp_i64vec3;
285  typedef vec<4, i64, lowp> lowp_i64vec4;
286 
287  typedef vec<1, i64, mediump> mediump_i64vec1;
288  typedef vec<2, i64, mediump> mediump_i64vec2;
289  typedef vec<3, i64, mediump> mediump_i64vec3;
290  typedef vec<4, i64, mediump> mediump_i64vec4;
291 
292  typedef vec<1, i64, highp> highp_i64vec1;
293  typedef vec<2, i64, highp> highp_i64vec2;
294  typedef vec<3, i64, highp> highp_i64vec3;
295  typedef vec<4, i64, highp> highp_i64vec4;
296 
297  typedef vec<1, i64, defaultp> i64vec1;
298  typedef vec<2, i64, defaultp> i64vec2;
299  typedef vec<3, i64, defaultp> i64vec3;
300  typedef vec<4, i64, defaultp> i64vec4;
301 
302  // Vector uint
303 
304  typedef vec<1, u32, lowp> lowp_uvec1;
305  typedef vec<2, u32, lowp> lowp_uvec2;
306  typedef vec<3, u32, lowp> lowp_uvec3;
307  typedef vec<4, u32, lowp> lowp_uvec4;
308 
309  typedef vec<1, u32, mediump> mediump_uvec1;
310  typedef vec<2, u32, mediump> mediump_uvec2;
311  typedef vec<3, u32, mediump> mediump_uvec3;
312  typedef vec<4, u32, mediump> mediump_uvec4;
313 
314  typedef vec<1, u32, highp> highp_uvec1;
315  typedef vec<2, u32, highp> highp_uvec2;
316  typedef vec<3, u32, highp> highp_uvec3;
317  typedef vec<4, u32, highp> highp_uvec4;
318 
319  typedef vec<1, u32, defaultp> uvec1;
320  typedef vec<2, u32, defaultp> uvec2;
321  typedef vec<3, u32, defaultp> uvec3;
322  typedef vec<4, u32, defaultp> uvec4;
323 
324  typedef vec<1, u8, lowp> lowp_u8vec1;
325  typedef vec<2, u8, lowp> lowp_u8vec2;
326  typedef vec<3, u8, lowp> lowp_u8vec3;
327  typedef vec<4, u8, lowp> lowp_u8vec4;
328 
329  typedef vec<1, u8, mediump> mediump_u8vec1;
330  typedef vec<2, u8, mediump> mediump_u8vec2;
331  typedef vec<3, u8, mediump> mediump_u8vec3;
332  typedef vec<4, u8, mediump> mediump_u8vec4;
333 
334  typedef vec<1, u8, highp> highp_u8vec1;
335  typedef vec<2, u8, highp> highp_u8vec2;
336  typedef vec<3, u8, highp> highp_u8vec3;
337  typedef vec<4, u8, highp> highp_u8vec4;
338 
339  typedef vec<1, u8, defaultp> u8vec1;
340  typedef vec<2, u8, defaultp> u8vec2;
341  typedef vec<3, u8, defaultp> u8vec3;
342  typedef vec<4, u8, defaultp> u8vec4;
343 
344  typedef vec<1, u16, lowp> lowp_u16vec1;
345  typedef vec<2, u16, lowp> lowp_u16vec2;
346  typedef vec<3, u16, lowp> lowp_u16vec3;
347  typedef vec<4, u16, lowp> lowp_u16vec4;
348 
349  typedef vec<1, u16, mediump> mediump_u16vec1;
350  typedef vec<2, u16, mediump> mediump_u16vec2;
351  typedef vec<3, u16, mediump> mediump_u16vec3;
352  typedef vec<4, u16, mediump> mediump_u16vec4;
353 
354  typedef vec<1, u16, highp> highp_u16vec1;
355  typedef vec<2, u16, highp> highp_u16vec2;
356  typedef vec<3, u16, highp> highp_u16vec3;
357  typedef vec<4, u16, highp> highp_u16vec4;
358 
359  typedef vec<1, u16, defaultp> u16vec1;
360  typedef vec<2, u16, defaultp> u16vec2;
361  typedef vec<3, u16, defaultp> u16vec3;
362  typedef vec<4, u16, defaultp> u16vec4;
363 
364  typedef vec<1, u32, lowp> lowp_u32vec1;
365  typedef vec<2, u32, lowp> lowp_u32vec2;
366  typedef vec<3, u32, lowp> lowp_u32vec3;
367  typedef vec<4, u32, lowp> lowp_u32vec4;
368 
369  typedef vec<1, u32, mediump> mediump_u32vec1;
370  typedef vec<2, u32, mediump> mediump_u32vec2;
371  typedef vec<3, u32, mediump> mediump_u32vec3;
372  typedef vec<4, u32, mediump> mediump_u32vec4;
373 
374  typedef vec<1, u32, highp> highp_u32vec1;
375  typedef vec<2, u32, highp> highp_u32vec2;
376  typedef vec<3, u32, highp> highp_u32vec3;
377  typedef vec<4, u32, highp> highp_u32vec4;
378 
379  typedef vec<1, u32, defaultp> u32vec1;
380  typedef vec<2, u32, defaultp> u32vec2;
381  typedef vec<3, u32, defaultp> u32vec3;
382  typedef vec<4, u32, defaultp> u32vec4;
383 
384  typedef vec<1, u64, lowp> lowp_u64vec1;
385  typedef vec<2, u64, lowp> lowp_u64vec2;
386  typedef vec<3, u64, lowp> lowp_u64vec3;
387  typedef vec<4, u64, lowp> lowp_u64vec4;
388 
389  typedef vec<1, u64, mediump> mediump_u64vec1;
390  typedef vec<2, u64, mediump> mediump_u64vec2;
391  typedef vec<3, u64, mediump> mediump_u64vec3;
392  typedef vec<4, u64, mediump> mediump_u64vec4;
393 
394  typedef vec<1, u64, highp> highp_u64vec1;
395  typedef vec<2, u64, highp> highp_u64vec2;
396  typedef vec<3, u64, highp> highp_u64vec3;
397  typedef vec<4, u64, highp> highp_u64vec4;
398 
399  typedef vec<1, u64, defaultp> u64vec1;
400  typedef vec<2, u64, defaultp> u64vec2;
401  typedef vec<3, u64, defaultp> u64vec3;
402  typedef vec<4, u64, defaultp> u64vec4;
403 
404  // Vector float
405 
406  typedef vec<1, float, lowp> lowp_vec1;
407  typedef vec<2, float, lowp> lowp_vec2;
408  typedef vec<3, float, lowp> lowp_vec3;
409  typedef vec<4, float, lowp> lowp_vec4;
410 
411  typedef vec<1, float, mediump> mediump_vec1;
412  typedef vec<2, float, mediump> mediump_vec2;
413  typedef vec<3, float, mediump> mediump_vec3;
414  typedef vec<4, float, mediump> mediump_vec4;
415 
416  typedef vec<1, float, highp> highp_vec1;
417  typedef vec<2, float, highp> highp_vec2;
418  typedef vec<3, float, highp> highp_vec3;
419  typedef vec<4, float, highp> highp_vec4;
420 
421  typedef vec<1, float, defaultp> vec1;
422  typedef vec<2, float, defaultp> vec2;
423  typedef vec<3, float, defaultp> vec3;
424  typedef vec<4, float, defaultp> vec4;
425 
426  typedef vec<1, float, lowp> lowp_fvec1;
427  typedef vec<2, float, lowp> lowp_fvec2;
428  typedef vec<3, float, lowp> lowp_fvec3;
429  typedef vec<4, float, lowp> lowp_fvec4;
430 
431  typedef vec<1, float, mediump> mediump_fvec1;
432  typedef vec<2, float, mediump> mediump_fvec2;
433  typedef vec<3, float, mediump> mediump_fvec3;
434  typedef vec<4, float, mediump> mediump_fvec4;
435 
436  typedef vec<1, float, highp> highp_fvec1;
437  typedef vec<2, float, highp> highp_fvec2;
438  typedef vec<3, float, highp> highp_fvec3;
439  typedef vec<4, float, highp> highp_fvec4;
440 
441  typedef vec<1, f32, defaultp> fvec1;
442  typedef vec<2, f32, defaultp> fvec2;
443  typedef vec<3, f32, defaultp> fvec3;
444  typedef vec<4, f32, defaultp> fvec4;
445 
446  typedef vec<1, f32, lowp> lowp_f32vec1;
447  typedef vec<2, f32, lowp> lowp_f32vec2;
448  typedef vec<3, f32, lowp> lowp_f32vec3;
449  typedef vec<4, f32, lowp> lowp_f32vec4;
450 
451  typedef vec<1, f32, mediump> mediump_f32vec1;
452  typedef vec<2, f32, mediump> mediump_f32vec2;
453  typedef vec<3, f32, mediump> mediump_f32vec3;
454  typedef vec<4, f32, mediump> mediump_f32vec4;
455 
456  typedef vec<1, f32, highp> highp_f32vec1;
457  typedef vec<2, f32, highp> highp_f32vec2;
458  typedef vec<3, f32, highp> highp_f32vec3;
459  typedef vec<4, f32, highp> highp_f32vec4;
460 
461  typedef vec<1, f32, defaultp> f32vec1;
462  typedef vec<2, f32, defaultp> f32vec2;
463  typedef vec<3, f32, defaultp> f32vec3;
464  typedef vec<4, f32, defaultp> f32vec4;
465 
466  typedef vec<1, f64, lowp> lowp_dvec1;
467  typedef vec<2, f64, lowp> lowp_dvec2;
468  typedef vec<3, f64, lowp> lowp_dvec3;
469  typedef vec<4, f64, lowp> lowp_dvec4;
470 
471  typedef vec<1, f64, mediump> mediump_dvec1;
472  typedef vec<2, f64, mediump> mediump_dvec2;
473  typedef vec<3, f64, mediump> mediump_dvec3;
474  typedef vec<4, f64, mediump> mediump_dvec4;
475 
476  typedef vec<1, f64, highp> highp_dvec1;
477  typedef vec<2, f64, highp> highp_dvec2;
478  typedef vec<3, f64, highp> highp_dvec3;
479  typedef vec<4, f64, highp> highp_dvec4;
480 
481  typedef vec<1, f64, defaultp> dvec1;
482  typedef vec<2, f64, defaultp> dvec2;
483  typedef vec<3, f64, defaultp> dvec3;
484  typedef vec<4, f64, defaultp> dvec4;
485 
486  typedef vec<1, f64, lowp> lowp_f64vec1;
487  typedef vec<2, f64, lowp> lowp_f64vec2;
488  typedef vec<3, f64, lowp> lowp_f64vec3;
489  typedef vec<4, f64, lowp> lowp_f64vec4;
490 
491  typedef vec<1, f64, mediump> mediump_f64vec1;
492  typedef vec<2, f64, mediump> mediump_f64vec2;
493  typedef vec<3, f64, mediump> mediump_f64vec3;
494  typedef vec<4, f64, mediump> mediump_f64vec4;
495 
496  typedef vec<1, f64, highp> highp_f64vec1;
497  typedef vec<2, f64, highp> highp_f64vec2;
498  typedef vec<3, f64, highp> highp_f64vec3;
499  typedef vec<4, f64, highp> highp_f64vec4;
500 
501  typedef vec<1, f64, defaultp> f64vec1;
502  typedef vec<2, f64, defaultp> f64vec2;
503  typedef vec<3, f64, defaultp> f64vec3;
504  typedef vec<4, f64, defaultp> f64vec4;
505 
506  // Matrix NxN
507 
508  typedef mat<2, 2, f32, lowp> lowp_mat2;
509  typedef mat<3, 3, f32, lowp> lowp_mat3;
510  typedef mat<4, 4, f32, lowp> lowp_mat4;
511 
512  typedef mat<2, 2, f32, mediump> mediump_mat2;
513  typedef mat<3, 3, f32, mediump> mediump_mat3;
514  typedef mat<4, 4, f32, mediump> mediump_mat4;
515 
516  typedef mat<2, 2, f32, highp> highp_mat2;
517  typedef mat<3, 3, f32, highp> highp_mat3;
518  typedef mat<4, 4, f32, highp> highp_mat4;
519 
520  typedef mat<2, 2, f32, defaultp> mat2;
521  typedef mat<3, 3, f32, defaultp> mat3;
522  typedef mat<4, 4, f32, defaultp> mat4;
523 
524  typedef mat<2, 2, f32, lowp> lowp_fmat2;
525  typedef mat<3, 3, f32, lowp> lowp_fmat3;
526  typedef mat<4, 4, f32, lowp> lowp_fmat4;
527 
528  typedef mat<2, 2, f32, mediump> mediump_fmat2;
529  typedef mat<3, 3, f32, mediump> mediump_fmat3;
530  typedef mat<4, 4, f32, mediump> mediump_fmat4;
531 
532  typedef mat<2, 2, f32, highp> highp_fmat2;
533  typedef mat<3, 3, f32, highp> highp_fmat3;
534  typedef mat<4, 4, f32, highp> highp_fmat4;
535 
536  typedef mat<2, 2, f32, defaultp> fmat2;
537  typedef mat<3, 3, f32, defaultp> fmat3;
538  typedef mat<4, 4, f32, defaultp> fmat4;
539 
540  typedef mat<2, 2, f32, lowp> lowp_f32mat2;
541  typedef mat<3, 3, f32, lowp> lowp_f32mat3;
542  typedef mat<4, 4, f32, lowp> lowp_f32mat4;
543 
544  typedef mat<2, 2, f32, mediump> mediump_f32mat2;
545  typedef mat<3, 3, f32, mediump> mediump_f32mat3;
546  typedef mat<4, 4, f32, mediump> mediump_f32mat4;
547 
548  typedef mat<2, 2, f32, highp> highp_f32mat2;
549  typedef mat<3, 3, f32, highp> highp_f32mat3;
550  typedef mat<4, 4, f32, highp> highp_f32mat4;
551 
552  typedef mat<2, 2, f32, defaultp> f32mat2;
553  typedef mat<3, 3, f32, defaultp> f32mat3;
554  typedef mat<4, 4, f32, defaultp> f32mat4;
555 
556  typedef mat<2, 2, f64, lowp> lowp_dmat2;
557  typedef mat<3, 3, f64, lowp> lowp_dmat3;
558  typedef mat<4, 4, f64, lowp> lowp_dmat4;
559 
560  typedef mat<2, 2, f64, mediump> mediump_dmat2;
561  typedef mat<3, 3, f64, mediump> mediump_dmat3;
562  typedef mat<4, 4, f64, mediump> mediump_dmat4;
563 
564  typedef mat<2, 2, f64, highp> highp_dmat2;
565  typedef mat<3, 3, f64, highp> highp_dmat3;
566  typedef mat<4, 4, f64, highp> highp_dmat4;
567 
568  typedef mat<2, 2, f64, defaultp> dmat2;
569  typedef mat<3, 3, f64, defaultp> dmat3;
570  typedef mat<4, 4, f64, defaultp> dmat4;
571 
572  typedef mat<2, 2, f64, lowp> lowp_f64mat2;
573  typedef mat<3, 3, f64, lowp> lowp_f64mat3;
574  typedef mat<4, 4, f64, lowp> lowp_f64mat4;
575 
576  typedef mat<2, 2, f64, mediump> mediump_f64mat2;
577  typedef mat<3, 3, f64, mediump> mediump_f64mat3;
578  typedef mat<4, 4, f64, mediump> mediump_f64mat4;
579 
580  typedef mat<2, 2, f64, highp> highp_f64mat2;
581  typedef mat<3, 3, f64, highp> highp_f64mat3;
582  typedef mat<4, 4, f64, highp> highp_f64mat4;
583 
584  typedef mat<2, 2, f64, defaultp> f64mat2;
585  typedef mat<3, 3, f64, defaultp> f64mat3;
586  typedef mat<4, 4, f64, defaultp> f64mat4;
587 
588  // Matrix MxN
589 
590  typedef mat<2, 2, f32, lowp> lowp_mat2x2;
591  typedef mat<2, 3, f32, lowp> lowp_mat2x3;
592  typedef mat<2, 4, f32, lowp> lowp_mat2x4;
593  typedef mat<3, 2, f32, lowp> lowp_mat3x2;
594  typedef mat<3, 3, f32, lowp> lowp_mat3x3;
595  typedef mat<3, 4, f32, lowp> lowp_mat3x4;
596  typedef mat<4, 2, f32, lowp> lowp_mat4x2;
597  typedef mat<4, 3, f32, lowp> lowp_mat4x3;
598  typedef mat<4, 4, f32, lowp> lowp_mat4x4;
599 
600  typedef mat<2, 2, f32, mediump> mediump_mat2x2;
601  typedef mat<2, 3, f32, mediump> mediump_mat2x3;
602  typedef mat<2, 4, f32, mediump> mediump_mat2x4;
603  typedef mat<3, 2, f32, mediump> mediump_mat3x2;
604  typedef mat<3, 3, f32, mediump> mediump_mat3x3;
605  typedef mat<3, 4, f32, mediump> mediump_mat3x4;
606  typedef mat<4, 2, f32, mediump> mediump_mat4x2;
607  typedef mat<4, 3, f32, mediump> mediump_mat4x3;
608  typedef mat<4, 4, f32, mediump> mediump_mat4x4;
609 
610  typedef mat<2, 2, f32, highp> highp_mat2x2;
611  typedef mat<2, 3, f32, highp> highp_mat2x3;
612  typedef mat<2, 4, f32, highp> highp_mat2x4;
613  typedef mat<3, 2, f32, highp> highp_mat3x2;
614  typedef mat<3, 3, f32, highp> highp_mat3x3;
615  typedef mat<3, 4, f32, highp> highp_mat3x4;
616  typedef mat<4, 2, f32, highp> highp_mat4x2;
617  typedef mat<4, 3, f32, highp> highp_mat4x3;
618  typedef mat<4, 4, f32, highp> highp_mat4x4;
619 
620  typedef mat<2, 2, f32, defaultp> mat2x2;
621  typedef mat<3, 2, f32, defaultp> mat3x2;
622  typedef mat<4, 2, f32, defaultp> mat4x2;
623  typedef mat<2, 3, f32, defaultp> mat2x3;
624  typedef mat<3, 3, f32, defaultp> mat3x3;
625  typedef mat<4, 3, f32, defaultp> mat4x3;
626  typedef mat<2, 4, f32, defaultp> mat2x4;
627  typedef mat<3, 4, f32, defaultp> mat3x4;
628  typedef mat<4, 4, f32, defaultp> mat4x4;
629 
630  typedef mat<2, 2, f32, lowp> lowp_fmat2x2;
631  typedef mat<2, 3, f32, lowp> lowp_fmat2x3;
632  typedef mat<2, 4, f32, lowp> lowp_fmat2x4;
633  typedef mat<3, 2, f32, lowp> lowp_fmat3x2;
634  typedef mat<3, 3, f32, lowp> lowp_fmat3x3;
635  typedef mat<3, 4, f32, lowp> lowp_fmat3x4;
636  typedef mat<4, 2, f32, lowp> lowp_fmat4x2;
637  typedef mat<4, 3, f32, lowp> lowp_fmat4x3;
638  typedef mat<4, 4, f32, lowp> lowp_fmat4x4;
639 
640  typedef mat<2, 2, f32, mediump> mediump_fmat2x2;
641  typedef mat<2, 3, f32, mediump> mediump_fmat2x3;
642  typedef mat<2, 4, f32, mediump> mediump_fmat2x4;
643  typedef mat<3, 2, f32, mediump> mediump_fmat3x2;
644  typedef mat<3, 3, f32, mediump> mediump_fmat3x3;
645  typedef mat<3, 4, f32, mediump> mediump_fmat3x4;
646  typedef mat<4, 2, f32, mediump> mediump_fmat4x2;
647  typedef mat<4, 3, f32, mediump> mediump_fmat4x3;
648  typedef mat<4, 4, f32, mediump> mediump_fmat4x4;
649 
650  typedef mat<2, 2, f32, highp> highp_fmat2x2;
651  typedef mat<2, 3, f32, highp> highp_fmat2x3;
652  typedef mat<2, 4, f32, highp> highp_fmat2x4;
653  typedef mat<3, 2, f32, highp> highp_fmat3x2;
654  typedef mat<3, 3, f32, highp> highp_fmat3x3;
655  typedef mat<3, 4, f32, highp> highp_fmat3x4;
656  typedef mat<4, 2, f32, highp> highp_fmat4x2;
657  typedef mat<4, 3, f32, highp> highp_fmat4x3;
658  typedef mat<4, 4, f32, highp> highp_fmat4x4;
659 
660  typedef mat<2, 2, f32, defaultp> fmat2x2;
661  typedef mat<3, 2, f32, defaultp> fmat3x2;
662  typedef mat<4, 2, f32, defaultp> fmat4x2;
663  typedef mat<2, 3, f32, defaultp> fmat2x3;
664  typedef mat<3, 3, f32, defaultp> fmat3x3;
665  typedef mat<4, 3, f32, defaultp> fmat4x3;
666  typedef mat<2, 4, f32, defaultp> fmat2x4;
667  typedef mat<3, 4, f32, defaultp> fmat3x4;
668  typedef mat<4, 4, f32, defaultp> fmat4x4;
669 
670  typedef mat<2, 2, f32, lowp> lowp_f32mat2x2;
671  typedef mat<2, 3, f32, lowp> lowp_f32mat2x3;
672  typedef mat<2, 4, f32, lowp> lowp_f32mat2x4;
673  typedef mat<3, 2, f32, lowp> lowp_f32mat3x2;
674  typedef mat<3, 3, f32, lowp> lowp_f32mat3x3;
675  typedef mat<3, 4, f32, lowp> lowp_f32mat3x4;
676  typedef mat<4, 2, f32, lowp> lowp_f32mat4x2;
677  typedef mat<4, 3, f32, lowp> lowp_f32mat4x3;
678  typedef mat<4, 4, f32, lowp> lowp_f32mat4x4;
679 
680  typedef mat<2, 2, f32, mediump> mediump_f32mat2x2;
681  typedef mat<2, 3, f32, mediump> mediump_f32mat2x3;
682  typedef mat<2, 4, f32, mediump> mediump_f32mat2x4;
683  typedef mat<3, 2, f32, mediump> mediump_f32mat3x2;
684  typedef mat<3, 3, f32, mediump> mediump_f32mat3x3;
685  typedef mat<3, 4, f32, mediump> mediump_f32mat3x4;
686  typedef mat<4, 2, f32, mediump> mediump_f32mat4x2;
687  typedef mat<4, 3, f32, mediump> mediump_f32mat4x3;
688  typedef mat<4, 4, f32, mediump> mediump_f32mat4x4;
689 
690  typedef mat<2, 2, f32, highp> highp_f32mat2x2;
691  typedef mat<2, 3, f32, highp> highp_f32mat2x3;
692  typedef mat<2, 4, f32, highp> highp_f32mat2x4;
693  typedef mat<3, 2, f32, highp> highp_f32mat3x2;
694  typedef mat<3, 3, f32, highp> highp_f32mat3x3;
695  typedef mat<3, 4, f32, highp> highp_f32mat3x4;
696  typedef mat<4, 2, f32, highp> highp_f32mat4x2;
697  typedef mat<4, 3, f32, highp> highp_f32mat4x3;
698  typedef mat<4, 4, f32, highp> highp_f32mat4x4;
699 
700  typedef mat<2, 2, f32, defaultp> f32mat2x2;
701  typedef mat<3, 2, f32, defaultp> f32mat3x2;
702  typedef mat<4, 2, f32, defaultp> f32mat4x2;
703  typedef mat<2, 3, f32, defaultp> f32mat2x3;
704  typedef mat<3, 3, f32, defaultp> f32mat3x3;
705  typedef mat<4, 3, f32, defaultp> f32mat4x3;
706  typedef mat<2, 4, f32, defaultp> f32mat2x4;
707  typedef mat<3, 4, f32, defaultp> f32mat3x4;
708  typedef mat<4, 4, f32, defaultp> f32mat4x4;
709 
710  typedef mat<2, 2, double, lowp> lowp_dmat2x2;
711  typedef mat<2, 3, double, lowp> lowp_dmat2x3;
712  typedef mat<2, 4, double, lowp> lowp_dmat2x4;
713  typedef mat<3, 2, double, lowp> lowp_dmat3x2;
714  typedef mat<3, 3, double, lowp> lowp_dmat3x3;
715  typedef mat<3, 4, double, lowp> lowp_dmat3x4;
716  typedef mat<4, 2, double, lowp> lowp_dmat4x2;
717  typedef mat<4, 3, double, lowp> lowp_dmat4x3;
718  typedef mat<4, 4, double, lowp> lowp_dmat4x4;
719 
720  typedef mat<2, 2, double, mediump> mediump_dmat2x2;
721  typedef mat<2, 3, double, mediump> mediump_dmat2x3;
722  typedef mat<2, 4, double, mediump> mediump_dmat2x4;
723  typedef mat<3, 2, double, mediump> mediump_dmat3x2;
724  typedef mat<3, 3, double, mediump> mediump_dmat3x3;
725  typedef mat<3, 4, double, mediump> mediump_dmat3x4;
726  typedef mat<4, 2, double, mediump> mediump_dmat4x2;
727  typedef mat<4, 3, double, mediump> mediump_dmat4x3;
728  typedef mat<4, 4, double, mediump> mediump_dmat4x4;
729 
730  typedef mat<2, 2, double, highp> highp_dmat2x2;
731  typedef mat<2, 3, double, highp> highp_dmat2x3;
732  typedef mat<2, 4, double, highp> highp_dmat2x4;
733  typedef mat<3, 2, double, highp> highp_dmat3x2;
734  typedef mat<3, 3, double, highp> highp_dmat3x3;
735  typedef mat<3, 4, double, highp> highp_dmat3x4;
736  typedef mat<4, 2, double, highp> highp_dmat4x2;
737  typedef mat<4, 3, double, highp> highp_dmat4x3;
738  typedef mat<4, 4, double, highp> highp_dmat4x4;
739 
740  typedef mat<2, 2, double, defaultp> dmat2x2;
741  typedef mat<3, 2, double, defaultp> dmat3x2;
742  typedef mat<4, 2, double, defaultp> dmat4x2;
743  typedef mat<2, 3, double, defaultp> dmat2x3;
744  typedef mat<3, 3, double, defaultp> dmat3x3;
745  typedef mat<4, 3, double, defaultp> dmat4x3;
746  typedef mat<2, 4, double, defaultp> dmat2x4;
747  typedef mat<3, 4, double, defaultp> dmat3x4;
748  typedef mat<4, 4, double, defaultp> dmat4x4;
749 
750  typedef mat<2, 2, f64, lowp> lowp_f64mat2x2;
751  typedef mat<2, 3, f64, lowp> lowp_f64mat2x3;
752  typedef mat<2, 4, f64, lowp> lowp_f64mat2x4;
753  typedef mat<3, 2, f64, lowp> lowp_f64mat3x2;
754  typedef mat<3, 3, f64, lowp> lowp_f64mat3x3;
755  typedef mat<3, 4, f64, lowp> lowp_f64mat3x4;
756  typedef mat<4, 2, f64, lowp> lowp_f64mat4x2;
757  typedef mat<4, 3, f64, lowp> lowp_f64mat4x3;
758  typedef mat<4, 4, f64, lowp> lowp_f64mat4x4;
759 
760  typedef mat<2, 2, f64, mediump> mediump_f64mat2x2;
761  typedef mat<2, 3, f64, mediump> mediump_f64mat2x3;
762  typedef mat<2, 4, f64, mediump> mediump_f64mat2x4;
763  typedef mat<3, 2, f64, mediump> mediump_f64mat3x2;
764  typedef mat<3, 3, f64, mediump> mediump_f64mat3x3;
765  typedef mat<3, 4, f64, mediump> mediump_f64mat3x4;
766  typedef mat<4, 2, f64, mediump> mediump_f64mat4x2;
767  typedef mat<4, 3, f64, mediump> mediump_f64mat4x3;
768  typedef mat<4, 4, f64, mediump> mediump_f64mat4x4;
769 
770  typedef mat<2, 2, f64, highp> highp_f64mat2x2;
771  typedef mat<2, 3, f64, highp> highp_f64mat2x3;
772  typedef mat<2, 4, f64, highp> highp_f64mat2x4;
773  typedef mat<3, 2, f64, highp> highp_f64mat3x2;
774  typedef mat<3, 3, f64, highp> highp_f64mat3x3;
775  typedef mat<3, 4, f64, highp> highp_f64mat3x4;
776  typedef mat<4, 2, f64, highp> highp_f64mat4x2;
777  typedef mat<4, 3, f64, highp> highp_f64mat4x3;
778  typedef mat<4, 4, f64, highp> highp_f64mat4x4;
779 
780  typedef mat<2, 2, f64, defaultp> f64mat2x2;
781  typedef mat<3, 2, f64, defaultp> f64mat3x2;
782  typedef mat<4, 2, f64, defaultp> f64mat4x2;
783  typedef mat<2, 3, f64, defaultp> f64mat2x3;
784  typedef mat<3, 3, f64, defaultp> f64mat3x3;
785  typedef mat<4, 3, f64, defaultp> f64mat4x3;
786  typedef mat<2, 4, f64, defaultp> f64mat2x4;
787  typedef mat<3, 4, f64, defaultp> f64mat3x4;
788  typedef mat<4, 4, f64, defaultp> f64mat4x4;
789 
790  // Quaternion
791 
792  typedef qua<float, lowp> lowp_quat;
793  typedef qua<float, mediump> mediump_quat;
794  typedef qua<float, highp> highp_quat;
795  typedef qua<float, defaultp> quat;
796 
797  typedef qua<float, lowp> lowp_fquat;
798  typedef qua<float, mediump> mediump_fquat;
799  typedef qua<float, highp> highp_fquat;
800  typedef qua<float, defaultp> fquat;
801 
802  typedef qua<f32, lowp> lowp_f32quat;
803  typedef qua<f32, mediump> mediump_f32quat;
804  typedef qua<f32, highp> highp_f32quat;
805  typedef qua<f32, defaultp> f32quat;
806 
807  typedef qua<double, lowp> lowp_dquat;
808  typedef qua<double, mediump> mediump_dquat;
809  typedef qua<double, highp> highp_dquat;
810  typedef qua<double, defaultp> dquat;
811 
812  typedef qua<f64, lowp> lowp_f64quat;
813  typedef qua<f64, mediump> mediump_f64quat;
814  typedef qua<f64, highp> highp_f64quat;
815  typedef qua<f64, defaultp> f64quat;
816 }//namespace glm
817 
818 
mat< 4, 3, double, defaultp > dmat4x3
4 columns of 3 components matrix of double-precision floating-point numbers.
+
double f64
Default 64 bit double-qualifier floating-point scalar.
Definition: fwd.hpp:166
+
mat< 2, 3, float, lowp > lowp_mat2x3
2 columns of 3 components matrix of single-precision floating-point numbers using low precision arith...
+
vec< 1, unsigned int, highp > highp_uvec1
1 component vector of unsigned integer values.
+
vec< 4, unsigned int, highp > highp_uvec4
4 components vector of high qualifier unsigned integer numbers.
+
vec< 2, i8, highp > highp_i8vec2
High qualifier 8 bit signed integer vector of 2 components type.
Definition: fwd.hpp:233
+
vec< 2, f32, mediump > mediump_f32vec2
Medium single-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:452
+
int32 int32_t
32 bit signed integer type.
Definition: fwd.hpp:71
+
uint64 u64
Default qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:134
+
vec< 4, i64, mediump > mediump_i64vec4
Medium qualifier 64 bit signed integer vector of 4 components type.
Definition: fwd.hpp:290
+
vec< 3, u16, defaultp > u16vec3
Default qualifier 16 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:361
+
vec< 1, double, mediump > mediump_dvec1
1 component vector of double-precision floating-point numbers using medium precision arithmetic in te...
+
vec< 3, unsigned int, defaultp > uvec3
3 components vector of unsigned integer numbers.
+
vec< 1, i16, defaultp > i16vec1
16 bit signed integer scalar type.
Definition: fwd.hpp:257
+
mat< 3, 3, f32, lowp > lowp_f32mat3
Low single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:541
+
mat< 4, 4, f64, highp > highp_f64mat4x4
High double-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:778
+
vec< 1, unsigned int, lowp > lowp_uvec1
1 component vector of unsigned integer values.
+
mat< 3, 3, f32, mediump > mediump_fmat3
Medium single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:529
+
mat< 4, 2, f32, lowp > lowp_fmat4x2
Low single-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:636
+
mat< 3, 3, double, highp > highp_dmat3
3 columns of 3 components matrix of double-precision floating-point numbers using medium precision ar...
+
vec< 3, float, mediump > mediump_fvec3
Medium Single-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:433
+
uint16 highp_uint16_t
High qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:114
+
mat< 2, 3, f32, highp > highp_fmat2x3
High single-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:651
+
mat< 4, 3, f32, lowp > lowp_f32mat4x3
Low single-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:677
+
double mediump_float64
Medium 64 bit double-qualifier floating-point scalar.
Definition: fwd.hpp:169
+
mat< 3, 3, double, defaultp > dmat3
3 columns of 3 components matrix of double-precision floating-point numbers.
+
vec< 1, int, mediump > mediump_ivec1
1 component vector of signed integer values.
+
qua< f64, defaultp > f64quat
Double-qualifier floating-point quaternion.
Definition: fwd.hpp:815
+
mat< 3, 4, double, defaultp > dmat3x4
3 columns of 4 components matrix of double-precision floating-point numbers.
+
vec< 1, u64, mediump > mediump_u64vec1
Medium qualifier 64 bit unsigned integer scalar type.
Definition: fwd.hpp:389
+
vec< 4, u8, highp > highp_u8vec4
High qualifier 8 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:337
+
int16 int16_t
16 bit signed integer type.
Definition: fwd.hpp:57
+
vec< 2, f64, defaultp > f64vec2
Double-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:502
+
vec< 3, u32, highp > highp_u32vec3
High qualifier 32 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:376
+
vec< 4, f64, highp > highp_f64vec4
High double-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:499
+
int64 i64
64 bit signed integer type.
Definition: fwd.hpp:76
+
mat< 2, 3, f32, lowp > lowp_f32mat2x3
Low single-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:671
+
mat< 4, 4, f32, defaultp > f32mat4
Single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:554
+
int32 lowp_i32
Low qualifier 32 bit signed integer type.
Definition: fwd.hpp:59
+
vec< 1, i16, highp > highp_i16vec1
High qualifier 16 bit signed integer scalar type.
Definition: fwd.hpp:252
+
vec< 1, unsigned int, mediump > mediump_uvec1
1 component vector of unsigned integer values.
+
mat< 3, 4, f32, mediump > mediump_f32mat3x4
Medium single-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:685
+
vec< 4, int, lowp > lowp_ivec4
4 components vector of low qualifier signed integer numbers.
+
vec< 2, unsigned int, highp > highp_uvec2
2 components vector of high qualifier unsigned integer numbers.
+
vec< 3, i32, mediump > mediump_i32vec3
Medium qualifier 32 bit signed integer vector of 3 components type.
Definition: fwd.hpp:269
+
vec< 4, i16, highp > highp_i16vec4
High qualifier 16 bit signed integer vector of 4 components type.
Definition: fwd.hpp:255
+
uint8 mediump_uint8
Medium qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:95
+
vec< 3, i8, lowp > lowp_i8vec3
Low qualifier 8 bit signed integer vector of 3 components type.
Definition: fwd.hpp:224
+
vec< 4, i32, mediump > mediump_i32vec4
Medium qualifier 32 bit signed integer vector of 4 components type.
Definition: fwd.hpp:270
+
vec< 1, i8, lowp > lowp_i8vec1
Low qualifier 8 bit signed integer scalar type.
Definition: fwd.hpp:222
+
mat< 3, 4, double, lowp > lowp_dmat3x4
3 columns of 4 components matrix of double-precision floating-point numbers using low precision arith...
+
vec< 2, i64, defaultp > i64vec2
64 bit signed integer vector of 2 components type.
Definition: fwd.hpp:298
+
mat< 2, 4, float, mediump > mediump_mat2x4
2 columns of 4 components matrix of single-precision floating-point numbers using medium precision ar...
+
vec< 4, u16, lowp > lowp_u16vec4
Low qualifier 16 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:347
+
vec< 2, double, mediump > mediump_dvec2
2 components vector of medium double-qualifier floating-point numbers.
+
mat< 3, 4, f64, lowp > lowp_f64mat3x4
Low double-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:755
+
vec< 1, u32, mediump > mediump_u32vec1
Medium qualifier 32 bit unsigned integer scalar type.
Definition: fwd.hpp:369
+
mat< 3, 3, f32, mediump > mediump_f32mat3x3
Medium single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:684
+
mat< 4, 2, f32, mediump > mediump_f32mat4x2
Medium single-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:686
+
mat< 2, 2, double, defaultp > dmat2
2 columns of 2 components matrix of double-precision floating-point numbers.
+
mat< 3, 3, f32, lowp > lowp_fmat3
Low single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:525
+
vec< 3, u8, lowp > lowp_u8vec3
Low qualifier 8 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:326
+
mat< 2, 4, f32, lowp > lowp_f32mat2x4
Low single-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:672
+
mat< 4, 2, f32, highp > highp_f32mat4x2
High single-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:696
+
mat< 3, 3, f32, highp > highp_f32mat3
High single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:549
+
mat< 2, 2, float, mediump > mediump_mat2x2
2 columns of 2 components matrix of single-precision floating-point numbers using medium precision ar...
+
mat< 3, 4, f64, mediump > mediump_f64mat3x4
Medium double-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:765
+
mat< 4, 4, f32, lowp > lowp_fmat4x4
Low single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:638
+
detail::int8 int8
8 bit signed integer type.
+
vec< 4, bool, lowp > lowp_bvec4
4 components vector of low qualifier bool numbers.
+
vec< 4, f32, defaultp > fvec4
Single-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:444
+
mat< 2, 3, float, highp > highp_mat2x3
2 columns of 3 components matrix of single-precision floating-point numbers using high precision arit...
+
vec< 4, float, highp > highp_vec4
4 components vector of high single-qualifier floating-point numbers.
+
int8 lowp_int8_t
Low qualifier 8 bit signed integer type.
Definition: fwd.hpp:40
+
vec< 3, bool, lowp > lowp_bvec3
3 components vector of low qualifier bool numbers.
+
vec< 2, i16, mediump > mediump_i16vec2
Medium qualifier 16 bit signed integer vector of 2 components type.
Definition: fwd.hpp:248
+
int64 lowp_int64_t
Low qualifier 64 bit signed integer type.
Definition: fwd.hpp:82
+
mat< 2, 4, f32, highp > highp_f32mat2x4
High single-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:692
+
vec< 4, f32, highp > highp_f32vec4
High single-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:459
+
mat< 2, 2, f32, mediump > mediump_fmat2x2
Medium single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:640
+
mat< 4, 4, double, lowp > lowp_dmat4x4
4 columns of 4 components matrix of double-precision floating-point numbers using low precision arith...
+
mat< 2, 2, f32, lowp > lowp_f32mat2
Low single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:540
+
vec< 2, f32, lowp > lowp_f32vec2
Low single-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:447
+
mat< 3, 3, f32, defaultp > fmat3
Single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:537
+
uint32 u32
Default qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:120
+
mat< 2, 2, f64, highp > highp_f64mat2x2
High double-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:770
+
mat< 3, 3, double, highp > highp_dmat3x3
3 columns of 3 components matrix of double-precision floating-point numbers using medium precision ar...
+
vec< 3, unsigned int, highp > highp_uvec3
3 components vector of high qualifier unsigned integer numbers.
+
mat< 3, 2, double, highp > highp_dmat3x2
3 columns of 2 components matrix of double-precision floating-point numbers using medium precision ar...
+
vec< 3, i64, lowp > lowp_i64vec3
Low qualifier 64 bit signed integer vector of 3 components type.
Definition: fwd.hpp:284
+
int8 mediump_i8
Medium qualifier 8 bit signed integer type.
Definition: fwd.hpp:32
+
vec< 4, i16, defaultp > i16vec4
16 bit signed integer vector of 4 components type.
Definition: fwd.hpp:260
+
double float64
Double precision floating-point numbers.
+
mat< 2, 2, f32, lowp > lowp_fmat2x2
Low single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:630
+
uint8 lowp_uint8_t
Low qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:98
+
int32 highp_int32_t
32 bit signed integer type.
Definition: fwd.hpp:70
+
vec< 4, i8, lowp > lowp_i8vec4
Low qualifier 8 bit signed integer vector of 4 components type.
Definition: fwd.hpp:225
+
vec< 1, f64, defaultp > f64vec1
Double-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:501
+
mat< 2, 4, f32, defaultp > fmat2x4
Single-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:666
+
mat< 4, 4, double, mediump > mediump_dmat4
4 columns of 4 components matrix of double-precision floating-point numbers using medium precision ar...
+
int64 mediump_int64
Medium qualifier 64 bit signed integer type.
Definition: fwd.hpp:79
+
mat< 4, 3, f64, highp > highp_f64mat4x3
High double-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:777
+
mat< 2, 3, f32, defaultp > f32mat2x3
Single-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:703
+
mat< 4, 4, float, defaultp > mat4
4 columns of 4 components matrix of single-precision floating-point numbers.
+
mat< 4, 2, float, lowp > lowp_mat4x2
4 columns of 2 components matrix of single-precision floating-point numbers using low precision arith...
+
mat< 2, 2, float, highp > highp_mat2x2
2 columns of 2 components matrix of single-precision floating-point numbers using high precision arit...
+
vec< 1, i32, mediump > mediump_i32vec1
Medium qualifier 32 bit signed integer scalar type.
Definition: fwd.hpp:267
+
vec< 3, i8, highp > highp_i8vec3
High qualifier 8 bit signed integer vector of 3 components type.
Definition: fwd.hpp:234
+
vec< 3, unsigned int, lowp > lowp_uvec3
3 components vector of low qualifier unsigned integer numbers.
+
vec< 4, u32, highp > highp_u32vec4
High qualifier 32 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:377
+
vec< 1, float, highp > highp_vec1
1 component vector of single-precision floating-point numbers using high precision arithmetic in term...
+
double float64_t
Default 64 bit double-qualifier floating-point scalar.
Definition: fwd.hpp:176
+
vec< 3, i16, defaultp > i16vec3
16 bit signed integer vector of 3 components type.
Definition: fwd.hpp:259
+
mat< 4, 3, f32, highp > highp_fmat4x3
High single-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:657
+
vec< 1, float, lowp > lowp_fvec1
Low single-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:426
+
mat< 4, 4, float, lowp > lowp_mat4
4 columns of 4 components matrix of single-precision floating-point numbers using low precision arith...
+
mat< 2, 2, float, mediump > mediump_mat2
2 columns of 2 components matrix of single-precision floating-point numbers using medium precision ar...
+
uint32 mediump_uint32
Medium qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:123
+
mat< 4, 4, f64, highp > highp_f64mat4
High double-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:582
+
uint8 highp_u8
High qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:91
+
int64 lowp_int64
Low qualifier 64 bit signed integer type.
Definition: fwd.hpp:78
+
vec< 3, double, mediump > mediump_dvec3
3 components vector of medium double-qualifier floating-point numbers.
+
vec< 3, bool, mediump > mediump_bvec3
3 components vector of medium qualifier bool numbers.
+
mat< 3, 3, float, highp > highp_mat3x3
3 columns of 3 components matrix of single-precision floating-point numbers using high precision arit...
+
vec< 2, i32, defaultp > i32vec2
32 bit signed integer vector of 2 components type.
Definition: fwd.hpp:278
+
mat< 2, 2, f64, highp > highp_f64mat2
High double-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:580
+
vec< 4, bool, mediump > mediump_bvec4
4 components vector of medium qualifier bool numbers.
+
vec< 4, unsigned int, defaultp > uvec4
4 components vector of unsigned integer numbers.
+
mat< 2, 3, double, defaultp > dmat2x3
2 columns of 3 components matrix of double-precision floating-point numbers.
+
uint16 lowp_uint16_t
Low qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:112
+
mat< 3, 3, f32, highp > highp_fmat3
High single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:533
+
vec< 2, float, highp > highp_fvec2
High Single-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:437
+
vec< 1, float, lowp > lowp_vec1
1 component vector of single-precision floating-point numbers using low precision arithmetic in term ...
+
uint8 lowp_u8
Low qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:89
+
vec< 3, u32, lowp > lowp_u32vec3
Low qualifier 32 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:366
+
vec< 1, u64, lowp > lowp_u64vec1
Low qualifier 64 bit unsigned integer scalar type.
Definition: fwd.hpp:384
+
vec< 1, bool, lowp > lowp_bvec1
1 component vector of bool values.
+
mat< 4, 4, double, lowp > lowp_dmat4
4 columns of 4 components matrix of double-precision floating-point numbers using low precision arith...
+
int64 highp_int64_t
High qualifier 64 bit signed integer type.
Definition: fwd.hpp:84
+
mat< 2, 2, f64, lowp > lowp_f64mat2
Low double-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:572
+
vec< 1, f64, lowp > lowp_f64vec1
Low double-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:486
+
uint32 highp_uint32_t
High qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:128
+
mat< 2, 4, f64, mediump > mediump_f64mat2x4
Medium double-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:762
+
mat< 3, 3, f32, defaultp > fmat3x3
Single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:664
+
mat< 2, 3, f32, mediump > mediump_f32mat2x3
Medium single-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:681
+
uint64 mediump_uint64
Medium qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:137
+
mat< 2, 2, float, lowp > lowp_mat2x2
2 columns of 2 components matrix of single-precision floating-point numbers using low precision arith...
+
int32 mediump_i32
Medium qualifier 32 bit signed integer type.
Definition: fwd.hpp:60
+
mat< 2, 4, float, lowp > lowp_mat2x4
2 columns of 4 components matrix of single-precision floating-point numbers using low precision arith...
+
vec< 1, i64, defaultp > i64vec1
64 bit signed integer scalar type.
Definition: fwd.hpp:297
+
mat< 4, 4, f32, highp > highp_f32mat4x4
High single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:698
+
float lowp_f32
Low 32 bit single-qualifier floating-point scalar.
Definition: fwd.hpp:147
+
mat< 3, 2, f32, lowp > lowp_f32mat3x2
Low single-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:673
+
mat< 2, 2, f64, defaultp > f64mat2
Double-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:584
+
mat< 2, 2, f32, highp > highp_fmat2
High single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:532
+
vec< 2, unsigned int, mediump > mediump_uvec2
2 components vector of medium qualifier unsigned integer numbers.
+
vec< 2, f64, mediump > mediump_f64vec2
Medium double-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:492
+
mat< 4, 4, f32, mediump > mediump_fmat4
Medium single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:530
+
vec< 2, bool, mediump > mediump_bvec2
2 components vector of medium qualifier bool numbers.
+
vec< 1, u32, defaultp > u32vec1
Default qualifier 32 bit unsigned integer scalar type.
Definition: fwd.hpp:379
+
vec< 1, f32, highp > highp_f32vec1
High single-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:456
+
mat< 3, 2, double, defaultp > dmat3x2
3 columns of 2 components matrix of double-precision floating-point numbers.
+
uint16 lowp_uint16
Low qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:108
+
double highp_float64
High 64 bit double-qualifier floating-point scalar.
Definition: fwd.hpp:170
+
uint8 highp_uint8_t
High qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:100
+
int8 highp_i8
High qualifier 8 bit signed integer type.
Definition: fwd.hpp:33
+
mat< 3, 3, double, lowp > lowp_dmat3
3 columns of 3 components matrix of double-precision floating-point numbers using low precision arith...
+
mat< 2, 2, f32, lowp > lowp_f32mat2x2
Low single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:670
+
float mediump_float32_t
Medium 32 bit single-qualifier floating-point scalar.
Definition: fwd.hpp:158
+
mat< 3, 2, f32, defaultp > fmat3x2
Single-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:661
+
mat< 3, 3, float, defaultp > mat3x3
3 columns of 3 components matrix of single-precision floating-point numbers.
+
int16 highp_int16
High qualifier 16 bit signed integer type.
Definition: fwd.hpp:52
+
qua< float, lowp > lowp_quat
Quaternion of single-precision floating-point numbers using high precision arithmetic in term of ULPs...
+
int16 highp_i16
High qualifier 16 bit signed integer type.
Definition: fwd.hpp:47
+
float f32
Default 32 bit single-qualifier floating-point scalar.
Definition: fwd.hpp:150
+
vec< 2, i8, defaultp > i8vec2
8 bit signed integer vector of 2 components type.
Definition: fwd.hpp:238
+
mat< 3, 3, f32, mediump > mediump_f32mat3
Medium single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:545
+
mat< 4, 3, f32, defaultp > fmat4x3
Single-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:665
+
mat< 2, 4, float, defaultp > mat2x4
2 columns of 4 components matrix of single-precision floating-point numbers.
+
mat< 2, 4, f32, lowp > lowp_fmat2x4
Low single-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:632
+
uint8 u8
Default qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:92
+
vec< 3, u8, mediump > mediump_u8vec3
Medium qualifier 8 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:331
+
vec< 2, float, defaultp > vec2
2 components vector of single-precision floating-point numbers.
+
mat< 3, 2, f32, defaultp > f32mat3x2
Single-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:701
+
mat< 2, 4, double, defaultp > dmat2x4
2 columns of 4 components matrix of double-precision floating-point numbers.
+
uint32 lowp_uint32_t
Low qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:126
+
vec< 1, double, highp > highp_dvec1
1 component vector of double-precision floating-point numbers using high precision arithmetic in term...
+
double lowp_f64
Low 64 bit double-qualifier floating-point scalar.
Definition: fwd.hpp:163
+
vec< 2, unsigned int, lowp > lowp_uvec2
2 components vector of low qualifier unsigned integer numbers.
+
vec< 4, f32, defaultp > f32vec4
Single-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:464
+
vec< 3, bool, highp > highp_bvec3
3 components vector of high qualifier bool numbers.
+
vec< 4, bool, defaultp > bvec4
4 components vector of boolean.
+
vec< 4, u16, mediump > mediump_u16vec4
Medium qualifier 16 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:352
+
vec< 2, unsigned int, defaultp > uvec2
2 components vector of unsigned integer numbers.
+
vec< 3, float, lowp > lowp_fvec3
Low single-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:428
+
uint64 mediump_u64
Medium qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:132
+
vec< 1, i16, lowp > lowp_i16vec1
Low qualifier 16 bit signed integer scalar type.
Definition: fwd.hpp:242
+
mat< 3, 4, f32, mediump > mediump_fmat3x4
Medium single-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:645
+
vec< 3, u32, mediump > mediump_u32vec3
Medium qualifier 32 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:371
+
double mediump_float64_t
Medium 64 bit double-qualifier floating-point scalar.
Definition: fwd.hpp:174
+
mat< 3, 3, f32, highp > highp_f32mat3x3
High single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:694
+
mat< 4, 2, double, highp > highp_dmat4x2
4 columns of 2 components matrix of double-precision floating-point numbers using medium precision ar...
+
int16 i16
16 bit signed integer type.
Definition: fwd.hpp:48
+
mat< 3, 3, f32, mediump > mediump_fmat3x3
Medium single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:644
+
vec< 2, u8, defaultp > u8vec2
Default qualifier 8 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:340
+
double mediump_f64
Medium 64 bit double-qualifier floating-point scalar.
Definition: fwd.hpp:164
+
vec< 2, i64, highp > highp_i64vec2
High qualifier 64 bit signed integer vector of 2 components type.
Definition: fwd.hpp:293
+
vec< 4, i16, lowp > lowp_i16vec4
Low qualifier 16 bit signed integer vector of 4 components type.
Definition: fwd.hpp:245
+
vec< 1, u16, highp > highp_u16vec1
High qualifier 16 bit unsigned integer scalar type.
Definition: fwd.hpp:354
+
vec< 2, int, lowp > lowp_ivec2
2 components vector of low qualifier signed integer numbers.
+
mat< 3, 3, float, highp > highp_mat3
3 columns of 3 components matrix of single-precision floating-point numbers using high precision arit...
+
mat< 3, 3, f64, defaultp > f64mat3
Double-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:585
+
mat< 4, 3, double, mediump > mediump_dmat4x3
4 columns of 3 components matrix of double-precision floating-point numbers using medium precision ar...
+
vec< 2, int, mediump > mediump_ivec2
2 components vector of medium qualifier signed integer numbers.
+
int16 highp_int16_t
High qualifier 16 bit signed integer type.
Definition: fwd.hpp:56
+
vec< 4, i8, highp > highp_i8vec4
High qualifier 8 bit signed integer vector of 4 components type.
Definition: fwd.hpp:235
+
vec< 4, f64, lowp > lowp_f64vec4
Low double-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:489
+
mat< 4, 2, float, defaultp > mat4x2
4 columns of 2 components matrix of single-precision floating-point numbers.
+
vec< 4, unsigned int, mediump > mediump_uvec4
4 components vector of medium qualifier unsigned integer numbers.
+
uint64 highp_uint64
High qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:138
+
vec< 2, u32, highp > highp_u32vec2
High qualifier 32 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:375
+
vec< 1, bool, mediump > mediump_bvec1
1 component vector of bool values.
+
mat< 4, 4, double, defaultp > dmat4x4
4 columns of 4 components matrix of double-precision floating-point numbers.
+
qua< f32, highp > highp_f32quat
High single-qualifier floating-point quaternion.
Definition: fwd.hpp:804
+
vec< 2, i16, defaultp > i16vec2
16 bit signed integer vector of 2 components type.
Definition: fwd.hpp:258
+
mat< 2, 2, f64, lowp > lowp_f64mat2x2
Low double-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:750
+
vec< 4, u8, mediump > mediump_u8vec4
Medium qualifier 8 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:332
+
vec< 4, float, lowp > lowp_fvec4
Low single-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:429
+
mat< 4, 2, f64, lowp > lowp_f64mat4x2
Low double-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:756
+
mat< 4, 4, double, highp > highp_dmat4x4
4 columns of 4 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 3, 4, f32, highp > highp_f32mat3x4
High single-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:695
+
uint8 highp_uint8
High qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:96
+
uint64 lowp_uint64_t
Low qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:140
+
int32 highp_int32
High qualifier 32 bit signed integer type.
Definition: fwd.hpp:66
+
mat< 2, 3, f32, lowp > lowp_fmat2x3
Low single-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:631
+
mat< 2, 2, float, highp > highp_mat2
2 columns of 2 components matrix of single-precision floating-point numbers using high precision arit...
+
mat< 4, 4, f32, defaultp > f32mat4x4
Single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:708
+
vec< 1, i32, defaultp > i32vec1
32 bit signed integer scalar type.
Definition: fwd.hpp:277
+
mat< 4, 3, float, mediump > mediump_mat4x3
4 columns of 3 components matrix of single-precision floating-point numbers using medium precision ar...
+
uint16 mediump_u16
Medium qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:104
+
int32 mediump_int32_t
Medium qualifier 32 bit signed integer type.
Definition: fwd.hpp:69
+
vec< 4, u64, lowp > lowp_u64vec4
Low qualifier 64 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:387
+
qua< f64, highp > highp_f64quat
High double-qualifier floating-point quaternion.
Definition: fwd.hpp:814
+
mat< 3, 2, f64, mediump > mediump_f64mat3x2
Medium double-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:763
+
int8 highp_int8
High qualifier 8 bit signed integer type.
Definition: fwd.hpp:38
+
mat< 3, 4, float, highp > highp_mat3x4
3 columns of 4 components matrix of single-precision floating-point numbers using high precision arit...
+
vec< 3, i64, defaultp > i64vec3
64 bit signed integer vector of 3 components type.
Definition: fwd.hpp:299
+
vec< 3, f64, highp > highp_f64vec3
High double-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:498
+
vec< 1, f32, lowp > lowp_f32vec1
Low single-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:446
+
vec< 3, u32, defaultp > u32vec3
Default qualifier 32 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:381
+
mat< 2, 3, f64, lowp > lowp_f64mat2x3
Low double-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:751
+
mat< 4, 2, double, mediump > mediump_dmat4x2
4 columns of 2 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 3, 3, float, defaultp > mat3
3 columns of 3 components matrix of single-precision floating-point numbers.
+
vec< 1, double, lowp > lowp_dvec1
1 component vector of double-precision floating-point numbers using low precision arithmetic in term ...
+
mat< 4, 3, f64, defaultp > f64mat4x3
Double-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:785
+
mat< 4, 3, f32, defaultp > f32mat4x3
Single-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:705
+
mat< 3, 2, float, lowp > lowp_mat3x2
3 columns of 2 components matrix of single-precision floating-point numbers using low precision arith...
+
vec< 2, f32, defaultp > f32vec2
Single-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:462
+
mat< 4, 3, float, defaultp > mat4x3
4 columns of 3 components matrix of single-precision floating-point numbers.
+
mat< 4, 4, f32, mediump > mediump_f32mat4
Medium single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:546
+
vec< 3, float, lowp > lowp_vec3
3 components vector of low single-qualifier floating-point numbers.
+
mat< 2, 3, double, highp > highp_dmat2x3
2 columns of 3 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 3, 4, f64, highp > highp_f64mat3x4
High double-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:775
+
mat< 2, 2, f32, highp > highp_fmat2x2
High single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:650
+
mat< 4, 2, f32, mediump > mediump_fmat4x2
Medium single-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:646
+
mat< 3, 3, f64, highp > highp_f64mat3x3
High double-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:774
+
mat< 2, 2, double, mediump > mediump_dmat2
2 columns of 2 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 4, 4, f32, mediump > mediump_f32mat4x4
Medium single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:688
+
mat< 3, 3, float, lowp > lowp_mat3x3
3 columns of 3 components matrix of single-precision floating-point numbers using low precision arith...
+
vec< 4, bool, highp > highp_bvec4
4 components vector of high qualifier bool numbers.
+
uint64 highp_u64
High qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:133
+
float highp_f32
High 32 bit single-qualifier floating-point scalar.
Definition: fwd.hpp:149
+
vec< 2, double, lowp > lowp_dvec2
2 components vector of low double-qualifier floating-point numbers.
+
vec< 4, i64, lowp > lowp_i64vec4
Low qualifier 64 bit signed integer vector of 4 components type.
Definition: fwd.hpp:285
+
mat< 4, 2, f64, defaultp > f64mat4x2
Double-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:782
+
mat< 2, 3, f32, defaultp > fmat2x3
Single-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:663
+
double highp_float64_t
High 64 bit double-qualifier floating-point scalar.
Definition: fwd.hpp:175
+
uint64 lowp_uint64
Low qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:136
+
vec< 2, float, mediump > mediump_fvec2
Medium Single-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:432
+
vec< 4, float, defaultp > vec4
4 components vector of single-precision floating-point numbers.
+
mat< 4, 2, f32, highp > highp_fmat4x2
High single-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:656
+
mat< 3, 2, f64, highp > highp_f64mat3x2
High double-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:773
+
uint64 highp_uint64_t
High qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:142
+
mat< 2, 3, double, mediump > mediump_dmat2x3
2 columns of 3 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 3, 2, double, mediump > mediump_dmat3x2
3 columns of 2 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 3, 3, double, lowp > lowp_dmat3x3
3 columns of 3 components matrix of double-precision floating-point numbers using low precision arith...
+
vec< 4, u32, defaultp > u32vec4
Default qualifier 32 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:382
+
mat< 4, 4, f32, lowp > lowp_fmat4
Low single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:526
+
float float32
Single precision floating-point numbers.
+
vec< 1, int, highp > highp_ivec1
1 component vector of signed integer values.
+
mat< 2, 2, f32, defaultp > fmat2x2
Single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:660
+
float mediump_f32
Medium 32 bit single-qualifier floating-point scalar.
Definition: fwd.hpp:148
+
qua< f32, defaultp > f32quat
Single-qualifier floating-point quaternion.
Definition: fwd.hpp:805
+
vec< 4, f64, defaultp > f64vec4
Double-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:504
+
mat< 2, 2, float, defaultp > mat2
2 columns of 2 components matrix of single-precision floating-point numbers.
+
vec< 3, int, lowp > lowp_ivec3
3 components vector of low qualifier signed integer numbers.
+
int8 lowp_i8
Low qualifier 8 bit signed integer type.
Definition: fwd.hpp:31
+
mat< 3, 3, double, mediump > mediump_dmat3
3 columns of 3 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 2, 3, f64, defaultp > f64mat2x3
Double-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:783
+
vec< 3, float, mediump > mediump_vec3
3 components vector of medium single-qualifier floating-point numbers.
+
mat< 4, 4, f64, mediump > mediump_f64mat4x4
Medium double-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:768
+
vec< 1, f64, highp > highp_f64vec1
High double-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:496
+
float lowp_float32
Low 32 bit single-qualifier floating-point scalar.
Definition: fwd.hpp:152
+
mat< 2, 2, f32, defaultp > fmat2
Single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:536
+
vec< 3, u64, defaultp > u64vec3
Default qualifier 64 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:401
+
vec< 3, float, highp > highp_vec3
3 components vector of high single-qualifier floating-point numbers.
+
mat< 3, 3, f64, defaultp > f64mat3x3
Double-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:784
+
vec< 2, u64, mediump > mediump_u64vec2
Medium qualifier 64 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:390
+
mat< 3, 4, float, mediump > mediump_mat3x4
3 columns of 4 components matrix of single-precision floating-point numbers using medium precision ar...
+
mat< 3, 2, double, lowp > lowp_dmat3x2
3 columns of 2 components matrix of double-precision floating-point numbers using low precision arith...
+
vec< 2, f32, highp > highp_f32vec2
High single-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:457
+
mat< 2, 2, float, defaultp > mat2x2
2 columns of 2 components matrix of single-precision floating-point numbers.
+
mat< 2, 2, double, highp > highp_dmat2x2
2 columns of 2 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 4, 2, f32, defaultp > f32mat4x2
Single-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:702
+
vec< 4, f32, lowp > lowp_f32vec4
Low single-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:449
+
int64 mediump_int64_t
Medium qualifier 64 bit signed integer type.
Definition: fwd.hpp:83
+
vec< 3, u16, highp > highp_u16vec3
High qualifier 16 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:356
+
mat< 4, 4, f32, lowp > lowp_f32mat4x4
Low single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:678
+
vec< 1, u64, highp > highp_u64vec1
High qualifier 64 bit unsigned integer scalar type.
Definition: fwd.hpp:394
+
mat< 2, 2, f32, highp > highp_f32mat2x2
High single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:690
+
vec< 2, u64, lowp > lowp_u64vec2
Low qualifier 64 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:385
+
mat< 3, 4, f32, highp > highp_fmat3x4
High single-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:655
+
qua< f32, lowp > lowp_f32quat
Low single-qualifier floating-point quaternion.
Definition: fwd.hpp:802
+
int64 mediump_i64
Medium qualifier 64 bit signed integer type.
Definition: fwd.hpp:74
+
mat< 3, 2, f32, highp > highp_f32mat3x2
High single-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:693
+
int8 lowp_int8
Low qualifier 8 bit signed integer type.
Definition: fwd.hpp:36
+
mat< 3, 4, double, highp > highp_dmat3x4
3 columns of 4 components matrix of double-precision floating-point numbers using medium precision ar...
+
vec< 1, float, defaultp > vec1
1 components vector of single-precision floating-point numbers.
+
uint8 lowp_uint8
Low qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:94
+
vec< 4, u64, defaultp > u64vec4
Default qualifier 64 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:402
+
vec< 4, u32, lowp > lowp_u32vec4
Low qualifier 32 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:367
+
uint32 highp_uint32
High qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:124
+
vec< 4, u64, highp > highp_u64vec4
High qualifier 64 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:397
+
vec< 3, float, defaultp > vec3
3 components vector of single-precision floating-point numbers.
+
mat< 2, 2, f64, mediump > mediump_f64mat2
Medium double-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:576
+
vec< 2, u16, lowp > lowp_u16vec2
Low qualifier 16 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:345
+
uint16 highp_u16
High qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:105
+
vec< 3, u64, highp > highp_u64vec3
High qualifier 64 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:396
+
vec< 4, i8, defaultp > i8vec4
8 bit signed integer vector of 4 components type.
Definition: fwd.hpp:240
+
int64 lowp_i64
Low qualifier 64 bit signed integer type.
Definition: fwd.hpp:73
+
mat< 3, 4, double, mediump > mediump_dmat3x4
3 columns of 4 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 4, 2, double, lowp > lowp_dmat4x2
4 columns of 2 components matrix of double-precision floating-point numbers using low precision arith...
+
int16 mediump_i16
Medium qualifier 16 bit signed integer type.
Definition: fwd.hpp:46
+
vec< 3, u16, lowp > lowp_u16vec3
Low qualifier 16 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:346
+
mat< 2, 4, double, highp > highp_dmat2x4
2 columns of 4 components matrix of double-precision floating-point numbers using medium precision ar...
+
vec< 2, float, lowp > lowp_vec2
2 components vector of low single-qualifier floating-point numbers.
+
mat< 4, 4, double, mediump > mediump_dmat4x4
4 columns of 4 components matrix of double-precision floating-point numbers using medium precision ar...
+
vec< 2, i8, mediump > mediump_i8vec2
Medium qualifier 8 bit signed integer vector of 2 components type.
Definition: fwd.hpp:228
+
vec< 1, i64, highp > highp_i64vec1
High qualifier 64 bit signed integer scalar type.
Definition: fwd.hpp:292
+
int8 mediump_int8_t
Medium qualifier 8 bit signed integer type.
Definition: fwd.hpp:41
+
uint16 highp_uint16
High qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:110
+
int32 lowp_int32
Low qualifier 32 bit signed integer type.
Definition: fwd.hpp:64
+
mat< 2, 2, double, lowp > lowp_dmat2x2
2 columns of 2 components matrix of double-precision floating-point numbers using low precision arith...
+
mat< 4, 4, f32, highp > highp_fmat4
High single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:534
+
mat< 4, 4, float, highp > highp_mat4x4
4 columns of 4 components matrix of single-precision floating-point numbers using high precision arit...
+
double lowp_float64_t
Low 64 bit double-qualifier floating-point scalar.
Definition: fwd.hpp:173
+
mat< 4, 3, f64, mediump > mediump_f64mat4x3
Medium double-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:767
+
vec< 1, float, mediump > mediump_vec1
1 component vector of single-precision floating-point numbers using medium precision arithmetic in te...
+
vec< 2, double, defaultp > dvec2
2 components vector of double-precision floating-point numbers.
+
mat< 4, 3, f32, mediump > mediump_f32mat4x3
Medium single-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:687
+
vec< 3, int, mediump > mediump_ivec3
3 components vector of medium qualifier signed integer numbers.
+
mat< 2, 3, f64, mediump > mediump_f64mat2x3
Medium double-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:761
+
vec< 1, i8, mediump > mediump_i8vec1
Medium qualifier 8 bit signed integer scalar type.
Definition: fwd.hpp:227
+
vec< 2, u16, highp > highp_u16vec2
High qualifier 16 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:355
+
float highp_float32_t
High 32 bit single-qualifier floating-point scalar.
Definition: fwd.hpp:159
+
vec< 4, int, highp > highp_ivec4
4 components vector of high qualifier signed integer numbers.
+
detail::uint64 uint64
64 bit unsigned integer type.
+
mat< 2, 3, f64, highp > highp_f64mat2x3
High double-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:771
+
mat< 4, 2, f64, mediump > mediump_f64mat4x2
Medium double-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:766
+
vec< 1, u32, highp > highp_u32vec1
High qualifier 32 bit unsigned integer scalar type.
Definition: fwd.hpp:374
+
vec< 3, i8, mediump > mediump_i8vec3
Medium qualifier 8 bit signed integer vector of 3 components type.
Definition: fwd.hpp:229
+
mat< 3, 3, f32, defaultp > f32mat3x3
Single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:704
+
vec< 4, i8, mediump > mediump_i8vec4
Medium qualifier 8 bit signed integer vector of 4 components type.
Definition: fwd.hpp:230
+
vec< 2, float, lowp > lowp_fvec2
Low single-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:427
+
vec< 1, i8, defaultp > i8vec1
8 bit signed integer scalar type.
Definition: fwd.hpp:237
+
mat< 4, 3, f64, lowp > lowp_f64mat4x3
Low double-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:757
+
vec< 3, f32, defaultp > fvec3
Single-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:443
+
mat< 2, 2, f32, defaultp > f32mat2
Single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:552
+
vec< 2, u16, mediump > mediump_u16vec2
Medium qualifier 16 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:350
+
mat< 4, 4, f64, lowp > lowp_f64mat4x4
Low double-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:758
+
vec< 2, u8, lowp > lowp_u8vec2
Low qualifier 8 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:325
+
mat< 3, 3, f64, mediump > mediump_f64mat3
Medium double-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:577
+
mat< 2, 3, float, defaultp > mat2x3
2 columns of 3 components matrix of single-precision floating-point numbers.
+
float float32_t
Default 32 bit single-qualifier floating-point scalar.
Definition: fwd.hpp:160
+
mat< 4, 2, f32, defaultp > fmat4x2
Single-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:662
+
mat< 4, 4, double, highp > highp_dmat4
4 columns of 4 components matrix of double-precision floating-point numbers using medium precision ar...
+
vec< 4, u16, defaultp > u16vec4
Default qualifier 16 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:362
+
uint32 uint32_t
Default qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:129
+
vec< 3, u8, highp > highp_u8vec3
High qualifier 8 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:336
+
vec< 3, float, highp > highp_fvec3
High Single-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:438
+
qua< double, highp > highp_dquat
Quaternion of high double-qualifier floating-point numbers using high precision arithmetic in term of...
+
vec< 3, i32, highp > highp_i32vec3
High qualifier 32 bit signed integer vector of 3 components type.
Definition: fwd.hpp:274
+
vec< 1, i64, mediump > mediump_i64vec1
Medium qualifier 64 bit signed integer scalar type.
Definition: fwd.hpp:287
+
mat< 4, 2, float, mediump > mediump_mat4x2
4 columns of 2 components matrix of single-precision floating-point numbers using medium precision ar...
+
mat< 2, 4, f64, defaultp > f64mat2x4
Double-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:786
+
vec< 1, u8, lowp > lowp_u8vec1
Low qualifier 8 bit unsigned integer scalar type.
Definition: fwd.hpp:324
+
int64 int64_t
64 bit signed integer type.
Definition: fwd.hpp:85
+
vec< 1, i64, lowp > lowp_i64vec1
Low qualifier 64 bit signed integer scalar type.
Definition: fwd.hpp:282
+
vec< 2, i8, lowp > lowp_i8vec2
Low qualifier 8 bit signed integer vector of 2 components type.
Definition: fwd.hpp:223
+
int16 mediump_int16
Medium qualifier 16 bit signed integer type.
Definition: fwd.hpp:51
+
mat< 3, 3, f32, highp > highp_fmat3x3
High single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:654
+
mat< 4, 3, double, highp > highp_dmat4x3
4 columns of 3 components matrix of double-precision floating-point numbers using medium precision ar...
+
uint64 lowp_u64
Low qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:131
+
mat< 4, 4, f32, defaultp > fmat4x4
Single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:668
+
vec< 3, f32, highp > highp_f32vec3
High single-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:458
+
int8 i8
8 bit signed integer type.
Definition: fwd.hpp:34
+
uint64 mediump_uint64_t
Medium qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:141
+
uint16 mediump_uint16
Medium qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:109
+
vec< 1, int, lowp > lowp_ivec1
1 component vector of signed integer values.
+
mat< 2, 2, f32, mediump > mediump_f32mat2
Medium single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:544
+
mat< 2, 4, f32, defaultp > f32mat2x4
Single-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:706
+
vec< 4, float, mediump > mediump_fvec4
Medium Single-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:434
+
uint8 mediump_uint8_t
Medium qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:99
+
int16 lowp_i16
Low qualifier 16 bit signed integer type.
Definition: fwd.hpp:45
+
int32 i32
32 bit signed integer type.
Definition: fwd.hpp:62
+
mat< 3, 2, f32, highp > highp_fmat3x2
High single-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:653
+
vec< 1, u32, lowp > lowp_u32vec1
Low qualifier 32 bit unsigned integer scalar type.
Definition: fwd.hpp:364
+
uint8 uint8_t
Default qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:101
+
vec< 2, double, highp > highp_dvec2
2 components vector of high double-qualifier floating-point numbers.
+
mat< 3, 3, f32, lowp > lowp_fmat3x3
Low single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:634
+
vec< 4, float, highp > highp_fvec4
High Single-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:439
+
vec< 1, f32, mediump > mediump_f32vec1
Medium single-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:451
+
qua< double, lowp > lowp_dquat
Quaternion of double-precision floating-point numbers using high precision arithmetic in term of ULPs...
+
mat< 2, 2, double, mediump > mediump_dmat2x2
2 columns of 2 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 3, 3, float, mediump > mediump_mat3
3 columns of 3 components matrix of single-precision floating-point numbers using medium precision ar...
+
vec< 2, f64, lowp > lowp_f64vec2
Low double-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:487
+
mat< 3, 2, f64, defaultp > f64mat3x2
Double-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:781
+
mat< 4, 3, float, lowp > lowp_mat4x3
4 columns of 3 components matrix of single-precision floating-point numbers using low precision arith...
+
vec< 1, unsigned int, defaultp > uvec1
1 component vector of unsigned integer numbers.
+
int16 mediump_int16_t
Medium qualifier 16 bit signed integer type.
Definition: fwd.hpp:55
+
mat< 2, 4, float, highp > highp_mat2x4
2 columns of 4 components matrix of single-precision floating-point numbers using high precision arit...
+
mat< 2, 2, f64, mediump > mediump_f64mat2x2
Medium double-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:760
+
int32 highp_i32
High qualifier 32 bit signed integer type.
Definition: fwd.hpp:61
+
vec< 4, f64, mediump > mediump_f64vec4
Medium double-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:494
+
vec< 2, float, highp > highp_vec2
2 components vector of high single-qualifier floating-point numbers.
+
int64 highp_int64
High qualifier 64 bit signed integer type.
Definition: fwd.hpp:80
+
float lowp_float32_t
Low 32 bit single-qualifier floating-point scalar.
Definition: fwd.hpp:157
+
detail::uint16 uint16
16 bit unsigned integer type.
+
mat< 2, 4, f32, mediump > mediump_fmat2x4
Medium single-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:642
+
mat< 4, 4, f64, lowp > lowp_f64mat4
Low double-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:574
+
mat< 4, 2, double, defaultp > dmat4x2
4 columns of 2 components matrix of double-precision floating-point numbers.
+
vec< 2, bool, highp > highp_bvec2
2 components vector of high qualifier bool numbers.
+
mat< 3, 4, float, defaultp > mat3x4
3 columns of 4 components matrix of single-precision floating-point numbers.
+
mat< 4, 4, f32, highp > highp_fmat4x4
High single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:658
+
vec< 4, double, defaultp > dvec4
4 components vector of double-precision floating-point numbers.
+
vec< 4, i32, highp > highp_i32vec4
High qualifier 32 bit signed integer vector of 4 components type.
Definition: fwd.hpp:275
+
uint32 mediump_u32
Medium qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:118
+
uint8 mediump_u8
Medium qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:90
+
vec< 3, i16, highp > highp_i16vec3
High qualifier 16 bit signed integer vector of 3 components type.
Definition: fwd.hpp:254
+
vec< 4, i32, lowp > lowp_i32vec4
Low qualifier 32 bit signed integer vector of 4 components type.
Definition: fwd.hpp:265
+
double highp_f64
High 64 bit double-qualifier floating-point scalar.
Definition: fwd.hpp:165
+
mat< 3, 3, double, defaultp > dmat3x3
3 columns of 3 components matrix of double-precision floating-point numbers.
+
mat< 4, 4, f32, mediump > mediump_fmat4x4
Medium single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:648
+
vec< 2, i64, lowp > lowp_i64vec2
Low qualifier 64 bit signed integer vector of 2 components type.
Definition: fwd.hpp:283
+
mat< 2, 4, double, mediump > mediump_dmat2x4
2 columns of 4 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 4, 3, f32, lowp > lowp_fmat4x3
Low single-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:637
+
qua< f32, mediump > mediump_f32quat
Medium single-qualifier floating-point quaternion.
Definition: fwd.hpp:803
+
mat< 4, 3, f32, mediump > mediump_fmat4x3
Medium single-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:647
+
detail::int32 int32
32 bit signed integer type.
+
vec< 1, u8, mediump > mediump_u8vec1
Medium qualifier 8 bit unsigned integer scalar type.
Definition: fwd.hpp:329
+
mat< 2, 4, f32, highp > highp_fmat2x4
High single-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:652
+
vec< 3, u64, mediump > mediump_u64vec3
Medium qualifier 64 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:391
+
vec< 1, u64, defaultp > u64vec1
Default qualifier 64 bit unsigned integer scalar type.
Definition: fwd.hpp:399
+
vec< 1, f64, mediump > mediump_f64vec1
Medium double-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:491
+
vec< 1, int, defaultp > ivec1
1 component vector of signed integer numbers.
Definition: vector_int1.hpp:28
+
vec< 2, f32, defaultp > fvec2
Single-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:442
+
mat< 3, 3, f64, lowp > lowp_f64mat3
Low double-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:573
+
mat< 4, 4, f32, lowp > lowp_f32mat4
Low single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:542
+
mat< 3, 3, float, mediump > mediump_mat3x3
3 columns of 3 components matrix of single-precision floating-point numbers using medium precision ar...
+
vec< 1, i32, highp > highp_i32vec1
High qualifier 32 bit signed integer scalar type.
Definition: fwd.hpp:272
+
mat< 2, 4, f64, highp > highp_f64mat2x4
High double-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:772
+
vec< 1, u8, highp > highp_u8vec1
High qualifier 8 bit unsigned integer scalar type.
Definition: fwd.hpp:334
+
qua< double, defaultp > dquat
Quaternion of double-precision floating-point numbers.
+
mat< 2, 3, float, mediump > mediump_mat2x3
2 columns of 3 components matrix of single-precision floating-point numbers using medium precision ar...
+
vec< 3, u64, lowp > lowp_u64vec3
Low qualifier 64 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:386
+
vec< 3, double, lowp > lowp_dvec3
3 components vector of low double-qualifier floating-point numbers.
+
qua< f64, lowp > lowp_f64quat
Low double-qualifier floating-point quaternion.
Definition: fwd.hpp:812
+
detail::int64 int64
64 bit signed integer type.
+
mat< 3, 4, f32, defaultp > fmat3x4
Single-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:667
+
mat< 3, 4, f32, lowp > lowp_f32mat3x4
Low single-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:675
+
int32 mediump_int32
Medium qualifier 32 bit signed integer type.
Definition: fwd.hpp:65
+
detail::uint8 uint8
8 bit unsigned integer type.
+
vec< 2, float, mediump > mediump_vec2
2 components vector of medium single-qualifier floating-point numbers.
+
uint16 lowp_u16
Low qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:103
+
vec< 4, i64, highp > highp_i64vec4
High qualifier 64 bit signed integer vector of 4 components type.
Definition: fwd.hpp:295
+
vec< 2, i64, mediump > mediump_i64vec2
Medium qualifier 64 bit signed integer vector of 2 components type.
Definition: fwd.hpp:288
+
uint16 mediump_uint16_t
Medium qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:113
+
vec< 3, u8, defaultp > u8vec3
Default qualifier 8 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:341
+
vec< 3, double, highp > highp_dvec3
3 components vector of high double-qualifier floating-point numbers.
+
vec< 4, u64, mediump > mediump_u64vec4
Medium qualifier 64 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:392
+
mat< 3, 2, float, defaultp > mat3x2
3 columns of 2 components matrix of single-precision floating-point numbers.
+
vec< 3, f32, defaultp > f32vec3
Single-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:463
+
mat< 4, 4, float, highp > highp_mat4
4 columns of 4 components matrix of single-precision floating-point numbers using high precision arit...
+
vec< 1, i32, lowp > lowp_i32vec1
Low qualifier 32 bit signed integer scalar type.
Definition: fwd.hpp:262
+
vec< 4, float, lowp > lowp_vec4
4 components vector of low single-qualifier floating-point numbers.
+
vec< 2, i16, highp > highp_i16vec2
High qualifier 16 bit signed integer vector of 2 components type.
Definition: fwd.hpp:253
+
vec< 4, i16, mediump > mediump_i16vec4
Medium qualifier 16 bit signed integer vector of 4 components type.
Definition: fwd.hpp:250
+
int8 int8_t
8 bit signed integer type.
Definition: fwd.hpp:43
+
vec< 4, i64, defaultp > i64vec4
64 bit signed integer vector of 4 components type.
Definition: fwd.hpp:300
+
vec< 1, f32, defaultp > fvec1
Single-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:441
+
mat< 4, 4, double, defaultp > dmat4
4 columns of 4 components matrix of double-precision floating-point numbers.
+
mat< 4, 4, float, mediump > mediump_mat4x4
4 columns of 4 components matrix of single-precision floating-point numbers using medium precision ar...
+
vec< 3, i32, lowp > lowp_i32vec3
Low qualifier 32 bit signed integer vector of 3 components type.
Definition: fwd.hpp:264
+
vec< 4, double, highp > highp_dvec4
4 components vector of high double-qualifier floating-point numbers.
+
mat< 3, 2, f32, lowp > lowp_fmat3x2
Low single-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:633
+
vec< 4, f32, mediump > mediump_f32vec4
Medium single-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:454
+
detail::uint32 uint32
32 bit unsigned integer type.
+
qua< float, mediump > mediump_quat
Quaternion of single-precision floating-point numbers using high precision arithmetic in term of ULPs...
+
vec< 2, i32, highp > highp_i32vec2
High qualifier 32 bit signed integer vector of 2 components type.
Definition: fwd.hpp:273
+
mat< 3, 3, f64, highp > highp_f64mat3
High double-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:581
+
mat< 2, 3, double, lowp > lowp_dmat2x3
2 columns of 3 components matrix of double-precision floating-point numbers using low precision arith...
+
vec< 1, u8, defaultp > u8vec1
Default qualifier 8 bit unsigned integer scalar type.
Definition: fwd.hpp:339
+
mat< 4, 4, f32, defaultp > fmat4
Single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:538
+
mat< 3, 3, double, mediump > mediump_dmat3x3
3 columns of 3 components matrix of double-precision floating-point numbers using medium precision ar...
+
mat< 4, 4, float, mediump > mediump_mat4
4 columns of 4 components matrix of single-precision floating-point numbers using medium precision ar...
+
vec< 2, u32, defaultp > u32vec2
Default qualifier 32 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:380
+
vec< 2, bool, lowp > lowp_bvec2
2 components vector of low qualifier bool numbers.
+
int16 lowp_int16_t
Low qualifier 16 bit signed integer type.
Definition: fwd.hpp:54
+
mat< 2, 4, f32, mediump > mediump_f32mat2x4
Medium single-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:682
+
mat< 3, 4, f32, defaultp > f32mat3x4
Single-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:707
+
mat< 4, 4, f64, mediump > mediump_f64mat4
Medium double-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:578
+
vec< 1, u16, lowp > lowp_u16vec1
Low qualifier 16 bit unsigned integer scalar type.
Definition: fwd.hpp:344
+
qua< double, mediump > mediump_dquat
Quaternion of medium double-qualifier floating-point numbers using high precision arithmetic in term ...
+
vec< 3, i8, defaultp > i8vec3
8 bit signed integer vector of 3 components type.
Definition: fwd.hpp:239
+
qua< f64, mediump > mediump_f64quat
Medium double-qualifier floating-point quaternion.
Definition: fwd.hpp:813
+
vec< 4, int, mediump > mediump_ivec4
4 components vector of medium qualifier signed integer numbers.
+
detail::int16 int16
16 bit signed integer type.
+
vec< 3, f32, lowp > lowp_f32vec3
Low single-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:448
+
mat< 3, 3, f64, lowp > lowp_f64mat3x3
Low double-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:754
+
vec< 4, double, mediump > mediump_dvec4
4 components vector of medium double-qualifier floating-point numbers.
+
vec< 3, unsigned int, mediump > mediump_uvec3
3 components vector of medium qualifier unsigned integer numbers.
+
int16 lowp_int16
Low qualifier 16 bit signed integer type.
Definition: fwd.hpp:50
+
vec< 3, f64, defaultp > f64vec3
Double-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:503
+
qua< float, defaultp > quat
Quaternion of single-precision floating-point numbers.
+
uint64 uint64_t
Default qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:143
+
vec< 1, bool, defaultp > bvec1
1 components vector of boolean.
+
double lowp_float64
Low 64 bit double-qualifier floating-point scalar.
Definition: fwd.hpp:168
+
mat< 3, 3, float, lowp > lowp_mat3
3 columns of 3 components matrix of single-precision floating-point numbers using low precision arith...
+
mat< 2, 2, f32, mediump > mediump_fmat2
Medium single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:528
+
vec< 3, f32, mediump > mediump_f32vec3
Medium single-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:453
+
mat< 3, 3, f32, defaultp > f32mat3
Single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:553
+
mat< 2, 2, float, lowp > lowp_mat2
2 columns of 2 components matrix of single-precision floating-point numbers using low precision arith...
+
vec< 3, f64, mediump > mediump_f64vec3
Medium double-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:493
+
mat< 2, 3, f32, highp > highp_f32mat2x3
High single-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:691
+
vec< 1, u16, defaultp > u16vec1
Default qualifier 16 bit unsigned integer scalar type.
Definition: fwd.hpp:359
+
mat< 2, 2, f32, highp > highp_f32mat2
High single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:548
+
vec< 1, f32, defaultp > f32vec1
Single-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:461
+
int32 lowp_int32_t
Low qualifier 32 bit signed integer type.
Definition: fwd.hpp:68
+
mat< 3, 4, f32, lowp > lowp_fmat3x4
Low single-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:635
+
mat< 4, 3, float, highp > highp_mat4x3
4 columns of 3 components matrix of single-precision floating-point numbers using high precision arit...
+
mat< 2, 2, double, lowp > lowp_dmat2
2 columns of 2 components matrix of double-precision floating-point numbers using low precision arith...
+
vec< 2, int, highp > highp_ivec2
2 components vector of high qualifier signed integer numbers.
+
mat< 2, 2, f64, defaultp > f64mat2x2
Double-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:780
+
vec< 2, u32, mediump > mediump_u32vec2
Medium qualifier 32 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:370
+
mat< 2, 4, f64, lowp > lowp_f64mat2x4
Low double-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:752
+
mat< 4, 2, f32, lowp > lowp_f32mat4x2
Low single-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:676
+
vec< 2, u8, mediump > mediump_u8vec2
Medium qualifier 8 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:330
+
vec< 2, f64, highp > highp_f64vec2
High double-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:497
+
mat< 2, 2, double, highp > highp_dmat2
2 columns of 2 components matrix of double-precision floating-point numbers using medium precision ar...
+
vec< 2, u64, defaultp > u64vec2
Default qualifier 64 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:400
+
vec< 4, u16, highp > highp_u16vec4
High qualifier 16 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:357
+
vec< 1, float, highp > highp_fvec1
High single-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:436
+
uint32 highp_u32
High qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:119
+
vec< 2, int, defaultp > ivec2
2 components vector of signed integer numbers.
Definition: vector_int2.hpp:15
+
Definition: common.hpp:20
+
vec< 1, u16, mediump > mediump_u16vec1
Medium qualifier 16 bit unsigned integer scalar type.
Definition: fwd.hpp:349
+
vec< 1, bool, highp > highp_bvec1
1 component vector of bool values.
+
mat< 4, 4, f64, defaultp > f64mat4
Double-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:586
+
vec< 2, i32, lowp > lowp_i32vec2
Low qualifier 32 bit signed integer vector of 2 components type.
Definition: fwd.hpp:263
+
vec< 4, double, lowp > lowp_dvec4
4 components vector of low double-qualifier floating-point numbers.
+
vec< 4, u8, defaultp > u8vec4
Default qualifier 8 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:342
+
vec< 3, int, defaultp > ivec3
3 components vector of signed integer numbers.
Definition: vector_int3.hpp:15
+
uint16 uint16_t
Default qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:115
+
float mediump_float32
Medium 32 bit single-qualifier floating-point scalar.
Definition: fwd.hpp:153
+
vec< 3, i32, defaultp > i32vec3
32 bit signed integer vector of 3 components type.
Definition: fwd.hpp:279
+
vec< 1, i8, highp > highp_i8vec1
High qualifier 8 bit signed integer scalar type.
Definition: fwd.hpp:232
+
mat< 2, 2, f32, lowp > lowp_fmat2
Low single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:524
+
vec< 2, u32, lowp > lowp_u32vec2
Low qualifier 32 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:365
+
mat< 4, 3, f32, highp > highp_f32mat4x3
High single-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:697
+
vec< 2, bool, defaultp > bvec2
2 components vector of boolean.
+
vec< 4, u8, lowp > lowp_u8vec4
Low qualifier 8 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:327
+
mat< 4, 4, f32, highp > highp_f32mat4
High single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:550
+
vec< 3, int, highp > highp_ivec3
3 components vector of high qualifier signed integer numbers.
+
vec< 3, bool, defaultp > bvec3
3 components vector of boolean.
+
vec< 1, float, mediump > mediump_fvec1
Medium single-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:431
+
mat< 4, 2, float, highp > highp_mat4x2
4 columns of 2 components matrix of single-precision floating-point numbers using high precision arit...
+
mat< 2, 2, double, defaultp > dmat2x2
2 columns of 2 components matrix of double-precision floating-point numbers.
+
int8 highp_int8_t
High qualifier 8 bit signed integer type.
Definition: fwd.hpp:42
+
mat< 2, 3, f32, mediump > mediump_fmat2x3
Medium single-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:641
+
vec< 3, i16, lowp > lowp_i16vec3
Low qualifier 16 bit signed integer vector of 3 components type.
Definition: fwd.hpp:244
+
vec< 2, i32, mediump > mediump_i32vec2
Medium qualifier 32 bit signed integer vector of 2 components type.
Definition: fwd.hpp:268
+
vec< 3, i16, mediump > mediump_i16vec3
Medium qualifier 16 bit signed integer vector of 3 components type.
Definition: fwd.hpp:249
+
mat< 3, 2, f32, mediump > mediump_fmat3x2
Medium single-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:643
+
vec< 2, u64, highp > highp_u64vec2
High qualifier 64 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:395
+
mat< 3, 2, float, mediump > mediump_mat3x2
3 columns of 2 components matrix of single-precision floating-point numbers using medium precision ar...
+
vec< 4, unsigned int, lowp > lowp_uvec4
4 components vector of low qualifier unsigned integer numbers.
+
uint32 lowp_u32
Low qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:117
+
mat< 4, 4, f64, defaultp > f64mat4x4
Double-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:788
+
vec< 3, i64, mediump > mediump_i64vec3
Medium qualifier 64 bit signed integer vector of 3 components type.
Definition: fwd.hpp:289
+
mat< 3, 3, f32, lowp > lowp_f32mat3x3
Low single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:674
+
mat< 4, 3, double, lowp > lowp_dmat4x3
4 columns of 3 components matrix of double-precision floating-point numbers using low precision arith...
+
vec< 3, i64, highp > highp_i64vec3
High qualifier 64 bit signed integer vector of 3 components type.
Definition: fwd.hpp:294
+
uint32 mediump_uint32_t
Medium qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:127
+
uint32 lowp_uint32
Low qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:122
+
mat< 2, 2, f32, defaultp > f32mat2x2
Single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:700
+
vec< 3, double, defaultp > dvec3
3 components vector of double-precision floating-point numbers.
+
vec< 4, float, mediump > mediump_vec4
4 components vector of medium single-qualifier floating-point numbers.
+
int8 mediump_int8
Medium qualifier 8 bit signed integer type.
Definition: fwd.hpp:37
+
mat< 3, 2, f64, lowp > lowp_f64mat3x2
Low double-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:753
+
vec< 4, u32, mediump > mediump_u32vec4
Medium qualifier 32 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:372
+
mat< 2, 4, double, lowp > lowp_dmat2x4
2 columns of 4 components matrix of double-precision floating-point numbers using low precision arith...
+
mat< 4, 2, f64, highp > highp_f64mat4x2
High double-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:776
+
vec< 2, u16, defaultp > u16vec2
Default qualifier 16 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:360
+
mat< 2, 2, f32, mediump > mediump_f32mat2x2
High single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:680
+
mat< 3, 3, f64, mediump > mediump_f64mat3x3
Medium double-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:764
+
mat< 4, 4, float, defaultp > mat4x4
4 columns of 4 components matrix of single-precision floating-point numbers.
+
vec< 1, i16, mediump > mediump_i16vec1
Medium qualifier 16 bit signed integer scalar type.
Definition: fwd.hpp:247
+
vec< 3, u16, mediump > mediump_u16vec3
Medium qualifier 16 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:351
+
mat< 3, 4, f64, defaultp > f64mat3x4
Double-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:787
+
vec< 2, u8, highp > highp_u8vec2
High qualifier 8 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:335
+
vec< 4, i32, defaultp > i32vec4
32 bit signed integer vector of 4 components type.
Definition: fwd.hpp:280
+
vec< 1, double, defaultp > dvec1
1 components vector of double-precision floating-point numbers.
+
float highp_float32
High 32 bit single-qualifier floating-point scalar.
Definition: fwd.hpp:154
+
vec< 4, int, defaultp > ivec4
4 components vector of signed integer numbers.
Definition: vector_int4.hpp:15
+
mat< 3, 4, float, lowp > lowp_mat3x4
3 columns of 4 components matrix of single-precision floating-point numbers using low precision arith...
+
mat< 4, 4, float, lowp > lowp_mat4x4
4 columns of 4 components matrix of single-precision floating-point numbers using low precision arith...
+
vec< 2, i16, lowp > lowp_i16vec2
Low qualifier 16 bit signed integer vector of 2 components type.
Definition: fwd.hpp:243
+
vec< 3, f64, lowp > lowp_f64vec3
Low double-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:488
+
qua< float, highp > highp_quat
Quaternion of single-precision floating-point numbers using high precision arithmetic in term of ULPs...
+
mat< 3, 2, float, highp > highp_mat3x2
3 columns of 2 components matrix of single-precision floating-point numbers using high precision arit...
+
int64 highp_i64
High qualifier 64 bit signed integer type.
Definition: fwd.hpp:75
+
mat< 3, 2, f32, mediump > mediump_f32mat3x2
Medium single-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:683
+
uint16 u16
Default qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:106
+
+ + + + diff --git a/common/glm/doc/api/a00383.html b/common/glm/doc/api/a00383.html new file mode 100644 index 000000000..3d269c114 --- /dev/null +++ b/common/glm/doc/api/a00383.html @@ -0,0 +1,118 @@ + + + + + + + +0.9.9 API documenation: geometric.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
geometric.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > cross (vec< 3, T, Q > const &x, vec< 3, T, Q > const &y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T distance (vec< L, T, Q > const &p0, vec< L, T, Q > const &p1)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T dot (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > faceforward (vec< L, T, Q > const &N, vec< L, T, Q > const &I, vec< L, T, Q > const &Nref)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T length (vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > normalize (vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > reflect (vec< L, T, Q > const &I, vec< L, T, Q > const &N)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > refract (vec< L, T, Q > const &I, vec< L, T, Q > const &N, T eta)
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00383_source.html b/common/glm/doc/api/a00383_source.html new file mode 100644 index 000000000..d3a138c3f --- /dev/null +++ b/common/glm/doc/api/a00383_source.html @@ -0,0 +1,91 @@ + + + + + + + +0.9.9 API documenation: geometric.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
geometric.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 #include "detail/type_vec3.hpp"
16 
17 namespace glm
18 {
21 
29  template<length_t L, typename T, qualifier Q>
30  GLM_FUNC_DECL T length(vec<L, T, Q> const& x);
31 
39  template<length_t L, typename T, qualifier Q>
40  GLM_FUNC_DECL T distance(vec<L, T, Q> const& p0, vec<L, T, Q> const& p1);
41 
49  template<length_t L, typename T, qualifier Q>
50  GLM_FUNC_DECL T dot(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
51 
58  template<typename T, qualifier Q>
59  GLM_FUNC_DECL vec<3, T, Q> cross(vec<3, T, Q> const& x, vec<3, T, Q> const& y);
60 
69  template<length_t L, typename T, qualifier Q>
70  GLM_FUNC_DECL vec<L, T, Q> normalize(vec<L, T, Q> const& x);
71 
79  template<length_t L, typename T, qualifier Q>
80  GLM_FUNC_DECL vec<L, T, Q> faceforward(
81  vec<L, T, Q> const& N,
82  vec<L, T, Q> const& I,
83  vec<L, T, Q> const& Nref);
84 
93  template<length_t L, typename T, qualifier Q>
94  GLM_FUNC_DECL vec<L, T, Q> reflect(
95  vec<L, T, Q> const& I,
96  vec<L, T, Q> const& N);
97 
107  template<length_t L, typename T, qualifier Q>
108  GLM_FUNC_DECL vec<L, T, Q> refract(
109  vec<L, T, Q> const& I,
110  vec<L, T, Q> const& N,
111  T eta);
112 
114 }//namespace glm
115 
116 #include "detail/func_geometric.inl"
GLM_FUNC_DECL T length(vec< L, T, Q > const &x)
Returns the length of x, i.e., sqrt(x * x).
+
GLM_FUNC_DECL vec< L, T, Q > reflect(vec< L, T, Q > const &I, vec< L, T, Q > const &N)
For the incident vector I and surface orientation N, returns the reflection direction : result = I - ...
+
GLM_FUNC_DECL T distance(vec< L, T, Q > const &p0, vec< L, T, Q > const &p1)
Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).
+
GLM_FUNC_DECL vec< 3, T, Q > cross(vec< 3, T, Q > const &x, vec< 3, T, Q > const &y)
Returns the cross product of x and y.
+
GLM_FUNC_DECL vec< L, T, Q > normalize(vec< L, T, Q > const &x)
Returns a vector in the same direction as x but with length of 1.
+
GLM_FUNC_DECL vec< L, T, Q > faceforward(vec< L, T, Q > const &N, vec< L, T, Q > const &I, vec< L, T, Q > const &Nref)
If dot(Nref, I) < 0.0, return N, otherwise, return -N.
+
GLM_FUNC_DECL vec< L, T, Q > refract(vec< L, T, Q > const &I, vec< L, T, Q > const &N, T eta)
For the incident vector I and surface normal N, and the ratio of indices of refraction eta...
+
Core features
+
Definition: common.hpp:20
+
GLM_FUNC_DECL T dot(vec< L, T, Q > const &x, vec< L, T, Q > const &y)
Returns the dot product of x and y, i.e., result = x * y.
+
+ + + + diff --git a/common/glm/doc/api/a00386.html b/common/glm/doc/api/a00386.html new file mode 100644 index 000000000..acfa2fffa --- /dev/null +++ b/common/glm/doc/api/a00386.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: glm.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
glm.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Core features

+ +

Definition in file glm.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00386_source.html b/common/glm/doc/api/a00386_source.html new file mode 100644 index 000000000..b527011b9 --- /dev/null +++ b/common/glm/doc/api/a00386_source.html @@ -0,0 +1,101 @@ + + + + + + + +0.9.9 API documenation: glm.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
glm.hpp
+
+
+Go to the documentation of this file.
1 
103 #include "detail/_fixes.hpp"
104 
105 #include "detail/setup.hpp"
106 
107 #pragma once
108 
109 #include <cmath>
110 #include <climits>
111 #include <cfloat>
112 #include <limits>
113 #include <cassert>
114 #include "fwd.hpp"
115 
116 #include "vec2.hpp"
117 #include "vec3.hpp"
118 #include "vec4.hpp"
119 #include "mat2x2.hpp"
120 #include "mat2x3.hpp"
121 #include "mat2x4.hpp"
122 #include "mat3x2.hpp"
123 #include "mat3x3.hpp"
124 #include "mat3x4.hpp"
125 #include "mat4x2.hpp"
126 #include "mat4x3.hpp"
127 #include "mat4x4.hpp"
128 
129 #include "trigonometric.hpp"
130 #include "exponential.hpp"
131 #include "common.hpp"
132 #include "packing.hpp"
133 #include "geometric.hpp"
134 #include "matrix.hpp"
135 #include "vector_relational.hpp"
136 #include "integer.hpp"
Core features
+
Core features
+
Core features
+
Core features
+
Core features
+
Core features
+
Core features
+
Core features
+
Core features
+
Core features
+
Core features
+
Core features
+
Core features
+
Core features
+
Core features
+
Core features
+
Core features
+
Core features
+
Core features
+
Core features
+
+ + + + diff --git a/common/glm/doc/api/a00389.html b/common/glm/doc/api/a00389.html new file mode 100644 index 000000000..a57624a88 --- /dev/null +++ b/common/glm/doc/api/a00389.html @@ -0,0 +1,170 @@ + + + + + + + +0.9.9 API documenation: bitfield.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
bitfield.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

GLM_FUNC_DECL glm::u8vec2 bitfieldDeinterleave (glm::uint16 x)
 
GLM_FUNC_DECL glm::u16vec2 bitfieldDeinterleave (glm::uint32 x)
 
GLM_FUNC_DECL glm::u32vec2 bitfieldDeinterleave (glm::uint64 x)
 
template<typename genIUType >
GLM_FUNC_DECL genIUType bitfieldFillOne (genIUType Value, int FirstBit, int BitCount)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > bitfieldFillOne (vec< L, T, Q > const &Value, int FirstBit, int BitCount)
 
template<typename genIUType >
GLM_FUNC_DECL genIUType bitfieldFillZero (genIUType Value, int FirstBit, int BitCount)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > bitfieldFillZero (vec< L, T, Q > const &Value, int FirstBit, int BitCount)
 
GLM_FUNC_DECL int16 bitfieldInterleave (int8 x, int8 y)
 
GLM_FUNC_DECL uint16 bitfieldInterleave (uint8 x, uint8 y)
 
GLM_FUNC_DECL uint16 bitfieldInterleave (u8vec2 const &v)
 
GLM_FUNC_DECL int32 bitfieldInterleave (int16 x, int16 y)
 
GLM_FUNC_DECL uint32 bitfieldInterleave (uint16 x, uint16 y)
 
GLM_FUNC_DECL uint32 bitfieldInterleave (u16vec2 const &v)
 
GLM_FUNC_DECL int64 bitfieldInterleave (int32 x, int32 y)
 
GLM_FUNC_DECL uint64 bitfieldInterleave (uint32 x, uint32 y)
 
GLM_FUNC_DECL uint64 bitfieldInterleave (u32vec2 const &v)
 
GLM_FUNC_DECL int32 bitfieldInterleave (int8 x, int8 y, int8 z)
 
GLM_FUNC_DECL uint32 bitfieldInterleave (uint8 x, uint8 y, uint8 z)
 
GLM_FUNC_DECL int64 bitfieldInterleave (int16 x, int16 y, int16 z)
 
GLM_FUNC_DECL uint64 bitfieldInterleave (uint16 x, uint16 y, uint16 z)
 
GLM_FUNC_DECL int64 bitfieldInterleave (int32 x, int32 y, int32 z)
 
GLM_FUNC_DECL uint64 bitfieldInterleave (uint32 x, uint32 y, uint32 z)
 
GLM_FUNC_DECL int32 bitfieldInterleave (int8 x, int8 y, int8 z, int8 w)
 
GLM_FUNC_DECL uint32 bitfieldInterleave (uint8 x, uint8 y, uint8 z, uint8 w)
 
GLM_FUNC_DECL int64 bitfieldInterleave (int16 x, int16 y, int16 z, int16 w)
 
GLM_FUNC_DECL uint64 bitfieldInterleave (uint16 x, uint16 y, uint16 z, uint16 w)
 
template<typename genIUType >
GLM_FUNC_DECL genIUType bitfieldRotateLeft (genIUType In, int Shift)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > bitfieldRotateLeft (vec< L, T, Q > const &In, int Shift)
 
template<typename genIUType >
GLM_FUNC_DECL genIUType bitfieldRotateRight (genIUType In, int Shift)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > bitfieldRotateRight (vec< L, T, Q > const &In, int Shift)
 
template<typename genIUType >
GLM_FUNC_DECL genIUType mask (genIUType Bits)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > mask (vec< L, T, Q > const &v)
 
+

Detailed Description

+

GLM_GTC_bitfield

+
See also
Core features (dependence)
+
+GLM_GTC_bitfield (dependence)
+ +

Definition in file bitfield.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00389_source.html b/common/glm/doc/api/a00389_source.html new file mode 100644 index 000000000..b3fe2128b --- /dev/null +++ b/common/glm/doc/api/a00389_source.html @@ -0,0 +1,97 @@ + + + + + + + +0.9.9 API documenation: bitfield.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
bitfield.hpp
+
+
+Go to the documentation of this file.
1 
14 #include "../detail/setup.hpp"
15 
16 #pragma once
17 
18 // Dependencies
19 #include "../ext/scalar_int_sized.hpp"
20 #include "../ext/scalar_uint_sized.hpp"
21 #include "../detail/qualifier.hpp"
22 #include "../detail/_vectorize.hpp"
23 #include "type_precision.hpp"
24 #include <limits>
25 
26 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
27 # pragma message("GLM: GLM_GTC_bitfield extension included")
28 #endif
29 
30 namespace glm
31 {
34 
38  template<typename genIUType>
39  GLM_FUNC_DECL genIUType mask(genIUType Bits);
40 
48  template<length_t L, typename T, qualifier Q>
49  GLM_FUNC_DECL vec<L, T, Q> mask(vec<L, T, Q> const& v);
50 
54  template<typename genIUType>
55  GLM_FUNC_DECL genIUType bitfieldRotateRight(genIUType In, int Shift);
56 
64  template<length_t L, typename T, qualifier Q>
65  GLM_FUNC_DECL vec<L, T, Q> bitfieldRotateRight(vec<L, T, Q> const& In, int Shift);
66 
70  template<typename genIUType>
71  GLM_FUNC_DECL genIUType bitfieldRotateLeft(genIUType In, int Shift);
72 
80  template<length_t L, typename T, qualifier Q>
81  GLM_FUNC_DECL vec<L, T, Q> bitfieldRotateLeft(vec<L, T, Q> const& In, int Shift);
82 
86  template<typename genIUType>
87  GLM_FUNC_DECL genIUType bitfieldFillOne(genIUType Value, int FirstBit, int BitCount);
88 
96  template<length_t L, typename T, qualifier Q>
97  GLM_FUNC_DECL vec<L, T, Q> bitfieldFillOne(vec<L, T, Q> const& Value, int FirstBit, int BitCount);
98 
102  template<typename genIUType>
103  GLM_FUNC_DECL genIUType bitfieldFillZero(genIUType Value, int FirstBit, int BitCount);
104 
112  template<length_t L, typename T, qualifier Q>
113  GLM_FUNC_DECL vec<L, T, Q> bitfieldFillZero(vec<L, T, Q> const& Value, int FirstBit, int BitCount);
114 
120  GLM_FUNC_DECL int16 bitfieldInterleave(int8 x, int8 y);
121 
127  GLM_FUNC_DECL uint16 bitfieldInterleave(uint8 x, uint8 y);
128 
134  GLM_FUNC_DECL uint16 bitfieldInterleave(u8vec2 const& v);
135 
140 
146  GLM_FUNC_DECL int32 bitfieldInterleave(int16 x, int16 y);
147 
153  GLM_FUNC_DECL uint32 bitfieldInterleave(uint16 x, uint16 y);
154 
160  GLM_FUNC_DECL uint32 bitfieldInterleave(u16vec2 const& v);
161 
166 
172  GLM_FUNC_DECL int64 bitfieldInterleave(int32 x, int32 y);
173 
179  GLM_FUNC_DECL uint64 bitfieldInterleave(uint32 x, uint32 y);
180 
186  GLM_FUNC_DECL uint64 bitfieldInterleave(u32vec2 const& v);
187 
192 
198  GLM_FUNC_DECL int32 bitfieldInterleave(int8 x, int8 y, int8 z);
199 
205  GLM_FUNC_DECL uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z);
206 
212  GLM_FUNC_DECL int64 bitfieldInterleave(int16 x, int16 y, int16 z);
213 
219  GLM_FUNC_DECL uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z);
220 
226  GLM_FUNC_DECL int64 bitfieldInterleave(int32 x, int32 y, int32 z);
227 
233  GLM_FUNC_DECL uint64 bitfieldInterleave(uint32 x, uint32 y, uint32 z);
234 
240  GLM_FUNC_DECL int32 bitfieldInterleave(int8 x, int8 y, int8 z, int8 w);
241 
247  GLM_FUNC_DECL uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z, uint8 w);
248 
254  GLM_FUNC_DECL int64 bitfieldInterleave(int16 x, int16 y, int16 z, int16 w);
255 
261  GLM_FUNC_DECL uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z, uint16 w);
262 
264 } //namespace glm
265 
266 #include "bitfield.inl"
GLM_FUNC_DECL vec< L, T, Q > mask(vec< L, T, Q > const &v)
Build a mask of &#39;count&#39; bits.
+
GLM_FUNC_DECL vec< L, T, Q > bitfieldFillOne(vec< L, T, Q > const &Value, int FirstBit, int BitCount)
Set to 1 a range of bits.
+
vec< 2, u8, defaultp > u8vec2
Default qualifier 8 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:340
+
GLM_FUNC_DECL vec< L, T, Q > bitfieldRotateLeft(vec< L, T, Q > const &In, int Shift)
Rotate all bits to the left.
+
detail::uint64 uint64
64 bit unsigned integer type.
+
GLM_GTC_type_precision
+
detail::uint16 uint16
16 bit unsigned integer type.
+
detail::int64 int64
64 bit signed integer type.
+
GLM_FUNC_DECL glm::u32vec2 bitfieldDeinterleave(glm::uint64 x)
Deinterleaves the bits of x.
+
detail::uint32 uint32
32 bit unsigned integer type.
+
GLM_FUNC_DECL vec< L, T, Q > bitfieldFillZero(vec< L, T, Q > const &Value, int FirstBit, int BitCount)
Set to 0 a range of bits.
+
vec< 2, u32, defaultp > u32vec2
Default qualifier 32 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:380
+
Definition: common.hpp:20
+
GLM_FUNC_DECL vec< L, T, Q > bitfieldRotateRight(vec< L, T, Q > const &In, int Shift)
Rotate all bits to the right.
+
GLM_FUNC_DECL uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z, uint16 w)
Interleaves the bits of x, y, z and w.
+
vec< 2, u16, defaultp > u16vec2
Default qualifier 16 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:360
+
+ + + + diff --git a/common/glm/doc/api/a00392.html b/common/glm/doc/api/a00392.html new file mode 100644 index 000000000..e1a636c75 --- /dev/null +++ b/common/glm/doc/api/a00392.html @@ -0,0 +1,205 @@ + + + + + + + +0.9.9 API documenation: bitfield.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
bitfield.hpp File Reference
+
+
+ +

GLM_GTC_bitfield +More...

+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

GLM_FUNC_DECL glm::u8vec2 bitfieldDeinterleave (glm::uint16 x)
 Deinterleaves the bits of x. More...
 
GLM_FUNC_DECL glm::u16vec2 bitfieldDeinterleave (glm::uint32 x)
 Deinterleaves the bits of x. More...
 
GLM_FUNC_DECL glm::u32vec2 bitfieldDeinterleave (glm::uint64 x)
 Deinterleaves the bits of x. More...
 
template<typename genIUType >
GLM_FUNC_DECL genIUType bitfieldFillOne (genIUType Value, int FirstBit, int BitCount)
 Set to 1 a range of bits. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > bitfieldFillOne (vec< L, T, Q > const &Value, int FirstBit, int BitCount)
 Set to 1 a range of bits. More...
 
template<typename genIUType >
GLM_FUNC_DECL genIUType bitfieldFillZero (genIUType Value, int FirstBit, int BitCount)
 Set to 0 a range of bits. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > bitfieldFillZero (vec< L, T, Q > const &Value, int FirstBit, int BitCount)
 Set to 0 a range of bits. More...
 
GLM_FUNC_DECL int16 bitfieldInterleave (int8 x, int8 y)
 Interleaves the bits of x and y. More...
 
GLM_FUNC_DECL uint16 bitfieldInterleave (uint8 x, uint8 y)
 Interleaves the bits of x and y. More...
 
GLM_FUNC_DECL uint16 bitfieldInterleave (u8vec2 const &v)
 Interleaves the bits of x and y. More...
 
GLM_FUNC_DECL int32 bitfieldInterleave (int16 x, int16 y)
 Interleaves the bits of x and y. More...
 
GLM_FUNC_DECL uint32 bitfieldInterleave (uint16 x, uint16 y)
 Interleaves the bits of x and y. More...
 
GLM_FUNC_DECL uint32 bitfieldInterleave (u16vec2 const &v)
 Interleaves the bits of x and y. More...
 
GLM_FUNC_DECL int64 bitfieldInterleave (int32 x, int32 y)
 Interleaves the bits of x and y. More...
 
GLM_FUNC_DECL uint64 bitfieldInterleave (uint32 x, uint32 y)
 Interleaves the bits of x and y. More...
 
GLM_FUNC_DECL uint64 bitfieldInterleave (u32vec2 const &v)
 Interleaves the bits of x and y. More...
 
GLM_FUNC_DECL int32 bitfieldInterleave (int8 x, int8 y, int8 z)
 Interleaves the bits of x, y and z. More...
 
GLM_FUNC_DECL uint32 bitfieldInterleave (uint8 x, uint8 y, uint8 z)
 Interleaves the bits of x, y and z. More...
 
GLM_FUNC_DECL int64 bitfieldInterleave (int16 x, int16 y, int16 z)
 Interleaves the bits of x, y and z. More...
 
GLM_FUNC_DECL uint64 bitfieldInterleave (uint16 x, uint16 y, uint16 z)
 Interleaves the bits of x, y and z. More...
 
GLM_FUNC_DECL int64 bitfieldInterleave (int32 x, int32 y, int32 z)
 Interleaves the bits of x, y and z. More...
 
GLM_FUNC_DECL uint64 bitfieldInterleave (uint32 x, uint32 y, uint32 z)
 Interleaves the bits of x, y and z. More...
 
GLM_FUNC_DECL int32 bitfieldInterleave (int8 x, int8 y, int8 z, int8 w)
 Interleaves the bits of x, y, z and w. More...
 
GLM_FUNC_DECL uint32 bitfieldInterleave (uint8 x, uint8 y, uint8 z, uint8 w)
 Interleaves the bits of x, y, z and w. More...
 
GLM_FUNC_DECL int64 bitfieldInterleave (int16 x, int16 y, int16 z, int16 w)
 Interleaves the bits of x, y, z and w. More...
 
GLM_FUNC_DECL uint64 bitfieldInterleave (uint16 x, uint16 y, uint16 z, uint16 w)
 Interleaves the bits of x, y, z and w. More...
 
template<typename genIUType >
GLM_FUNC_DECL genIUType bitfieldRotateLeft (genIUType In, int Shift)
 Rotate all bits to the left. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > bitfieldRotateLeft (vec< L, T, Q > const &In, int Shift)
 Rotate all bits to the left. More...
 
template<typename genIUType >
GLM_FUNC_DECL genIUType bitfieldRotateRight (genIUType In, int Shift)
 Rotate all bits to the right. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > bitfieldRotateRight (vec< L, T, Q > const &In, int Shift)
 Rotate all bits to the right. More...
 
template<typename genIUType >
GLM_FUNC_DECL genIUType mask (genIUType Bits)
 Build a mask of 'count' bits. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > mask (vec< L, T, Q > const &v)
 Build a mask of 'count' bits. More...
 
+

Detailed Description

+

GLM_GTC_bitfield

+
See also
Core features (dependence)
+
+GLM_GTC_bitfield (dependence)
+ +

Definition in file bitfield.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00392_source.html b/common/glm/doc/api/a00392_source.html new file mode 100644 index 000000000..5015475b5 --- /dev/null +++ b/common/glm/doc/api/a00392_source.html @@ -0,0 +1,97 @@ + + + + + + + +0.9.9 API documenation: bitfield.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
bitfield.hpp
+
+
+Go to the documentation of this file.
1 
14 #include "../detail/setup.hpp"
15 
16 #pragma once
17 
18 // Dependencies
19 #include "../ext/scalar_int_sized.hpp"
20 #include "../ext/scalar_uint_sized.hpp"
21 #include "../detail/qualifier.hpp"
22 #include "../detail/_vectorize.hpp"
23 #include "type_precision.hpp"
24 #include <limits>
25 
26 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
27 # pragma message("GLM: GLM_GTC_bitfield extension included")
28 #endif
29 
30 namespace glm
31 {
34 
38  template<typename genIUType>
39  GLM_FUNC_DECL genIUType mask(genIUType Bits);
40 
48  template<length_t L, typename T, qualifier Q>
49  GLM_FUNC_DECL vec<L, T, Q> mask(vec<L, T, Q> const& v);
50 
54  template<typename genIUType>
55  GLM_FUNC_DECL genIUType bitfieldRotateRight(genIUType In, int Shift);
56 
64  template<length_t L, typename T, qualifier Q>
65  GLM_FUNC_DECL vec<L, T, Q> bitfieldRotateRight(vec<L, T, Q> const& In, int Shift);
66 
70  template<typename genIUType>
71  GLM_FUNC_DECL genIUType bitfieldRotateLeft(genIUType In, int Shift);
72 
80  template<length_t L, typename T, qualifier Q>
81  GLM_FUNC_DECL vec<L, T, Q> bitfieldRotateLeft(vec<L, T, Q> const& In, int Shift);
82 
86  template<typename genIUType>
87  GLM_FUNC_DECL genIUType bitfieldFillOne(genIUType Value, int FirstBit, int BitCount);
88 
96  template<length_t L, typename T, qualifier Q>
97  GLM_FUNC_DECL vec<L, T, Q> bitfieldFillOne(vec<L, T, Q> const& Value, int FirstBit, int BitCount);
98 
102  template<typename genIUType>
103  GLM_FUNC_DECL genIUType bitfieldFillZero(genIUType Value, int FirstBit, int BitCount);
104 
112  template<length_t L, typename T, qualifier Q>
113  GLM_FUNC_DECL vec<L, T, Q> bitfieldFillZero(vec<L, T, Q> const& Value, int FirstBit, int BitCount);
114 
120  GLM_FUNC_DECL int16 bitfieldInterleave(int8 x, int8 y);
121 
127  GLM_FUNC_DECL uint16 bitfieldInterleave(uint8 x, uint8 y);
128 
134  GLM_FUNC_DECL uint16 bitfieldInterleave(u8vec2 const& v);
135 
140 
146  GLM_FUNC_DECL int32 bitfieldInterleave(int16 x, int16 y);
147 
153  GLM_FUNC_DECL uint32 bitfieldInterleave(uint16 x, uint16 y);
154 
160  GLM_FUNC_DECL uint32 bitfieldInterleave(u16vec2 const& v);
161 
166 
172  GLM_FUNC_DECL int64 bitfieldInterleave(int32 x, int32 y);
173 
179  GLM_FUNC_DECL uint64 bitfieldInterleave(uint32 x, uint32 y);
180 
186  GLM_FUNC_DECL uint64 bitfieldInterleave(u32vec2 const& v);
187 
192 
198  GLM_FUNC_DECL int32 bitfieldInterleave(int8 x, int8 y, int8 z);
199 
205  GLM_FUNC_DECL uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z);
206 
212  GLM_FUNC_DECL int64 bitfieldInterleave(int16 x, int16 y, int16 z);
213 
219  GLM_FUNC_DECL uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z);
220 
226  GLM_FUNC_DECL int64 bitfieldInterleave(int32 x, int32 y, int32 z);
227 
233  GLM_FUNC_DECL uint64 bitfieldInterleave(uint32 x, uint32 y, uint32 z);
234 
240  GLM_FUNC_DECL int32 bitfieldInterleave(int8 x, int8 y, int8 z, int8 w);
241 
247  GLM_FUNC_DECL uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z, uint8 w);
248 
254  GLM_FUNC_DECL int64 bitfieldInterleave(int16 x, int16 y, int16 z, int16 w);
255 
261  GLM_FUNC_DECL uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z, uint16 w);
262 
264 } //namespace glm
265 
266 #include "bitfield.inl"
Definition: common.hpp:18
+
GLM_FUNC_DECL vec< L, T, Q > bitfieldRotateRight(vec< L, T, Q > const &In, int Shift)
Rotate all bits to the right.
+
GLM_FUNC_DECL uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z, uint16 w)
Interleaves the bits of x, y, z and w.
+
detail::uint32 uint32
32 bit unsigned integer type.
+
GLM_FUNC_DECL glm::u32vec2 bitfieldDeinterleave(glm::uint64 x)
Deinterleaves the bits of x.
+
vec< 2, u32, defaultp > u32vec2
Default qualifier 32 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:380
+
GLM_FUNC_DECL vec< L, T, Q > bitfieldFillOne(vec< L, T, Q > const &Value, int FirstBit, int BitCount)
Set to 1 a range of bits.
+
detail::int64 int64
64 bit signed integer type.
+
vec< 2, u16, defaultp > u16vec2
Default qualifier 16 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:360
+
GLM_FUNC_DECL vec< L, T, Q > bitfieldFillZero(vec< L, T, Q > const &Value, int FirstBit, int BitCount)
Set to 0 a range of bits.
+
GLM_GTC_type_precision
+
GLM_FUNC_DECL vec< L, T, Q > bitfieldRotateLeft(vec< L, T, Q > const &In, int Shift)
Rotate all bits to the left.
+
detail::uint64 uint64
64 bit unsigned integer type.
+
vec< 2, u8, defaultp > u8vec2
Default qualifier 8 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:340
+
detail::uint16 uint16
16 bit unsigned integer type.
+
GLM_FUNC_DECL vec< L, T, Q > mask(vec< L, T, Q > const &v)
Build a mask of &#39;count&#39; bits.
+
+ + + + diff --git a/common/glm/doc/api/a00395.html b/common/glm/doc/api/a00395.html new file mode 100644 index 000000000..4edd7d5f0 --- /dev/null +++ b/common/glm/doc/api/a00395.html @@ -0,0 +1,175 @@ + + + + + + + +0.9.9 API documenation: constants.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
constants.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType e ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType euler ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType four_over_pi ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType golden_ratio ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType half_pi ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType ln_ln_two ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType ln_ten ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType ln_two ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType one ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType one_over_pi ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType one_over_root_two ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType one_over_two_pi ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType quarter_pi ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType root_five ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType root_half_pi ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType root_ln_four ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType root_pi ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType root_three ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType root_two ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType root_two_pi ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType third ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType three_over_two_pi ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType two_over_pi ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType two_over_root_pi ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType two_pi ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType two_thirds ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType zero ()
 
+

Detailed Description

+

GLM_GTC_constants

+
See also
Core features (dependence)
+ +

Definition in file constants.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00395_source.html b/common/glm/doc/api/a00395_source.html new file mode 100644 index 000000000..1082f67cd --- /dev/null +++ b/common/glm/doc/api/a00395_source.html @@ -0,0 +1,109 @@ + + + + + + + +0.9.9 API documenation: constants.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
constants.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependencies
16 #include "../ext/scalar_constants.hpp"
17 
18 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
19 # pragma message("GLM: GLM_GTC_constants extension included")
20 #endif
21 
22 namespace glm
23 {
26 
29  template<typename genType>
30  GLM_FUNC_DECL GLM_CONSTEXPR genType zero();
31 
34  template<typename genType>
35  GLM_FUNC_DECL GLM_CONSTEXPR genType one();
36 
39  template<typename genType>
40  GLM_FUNC_DECL GLM_CONSTEXPR genType two_pi();
41 
44  template<typename genType>
45  GLM_FUNC_DECL GLM_CONSTEXPR genType root_pi();
46 
49  template<typename genType>
50  GLM_FUNC_DECL GLM_CONSTEXPR genType half_pi();
51 
54  template<typename genType>
55  GLM_FUNC_DECL GLM_CONSTEXPR genType three_over_two_pi();
56 
59  template<typename genType>
60  GLM_FUNC_DECL GLM_CONSTEXPR genType quarter_pi();
61 
64  template<typename genType>
65  GLM_FUNC_DECL GLM_CONSTEXPR genType one_over_pi();
66 
69  template<typename genType>
70  GLM_FUNC_DECL GLM_CONSTEXPR genType one_over_two_pi();
71 
74  template<typename genType>
75  GLM_FUNC_DECL GLM_CONSTEXPR genType two_over_pi();
76 
79  template<typename genType>
80  GLM_FUNC_DECL GLM_CONSTEXPR genType four_over_pi();
81 
84  template<typename genType>
85  GLM_FUNC_DECL GLM_CONSTEXPR genType two_over_root_pi();
86 
89  template<typename genType>
90  GLM_FUNC_DECL GLM_CONSTEXPR genType one_over_root_two();
91 
94  template<typename genType>
95  GLM_FUNC_DECL GLM_CONSTEXPR genType root_half_pi();
96 
99  template<typename genType>
100  GLM_FUNC_DECL GLM_CONSTEXPR genType root_two_pi();
101 
104  template<typename genType>
105  GLM_FUNC_DECL GLM_CONSTEXPR genType root_ln_four();
106 
109  template<typename genType>
110  GLM_FUNC_DECL GLM_CONSTEXPR genType e();
111 
114  template<typename genType>
115  GLM_FUNC_DECL GLM_CONSTEXPR genType euler();
116 
119  template<typename genType>
120  GLM_FUNC_DECL GLM_CONSTEXPR genType root_two();
121 
124  template<typename genType>
125  GLM_FUNC_DECL GLM_CONSTEXPR genType root_three();
126 
129  template<typename genType>
130  GLM_FUNC_DECL GLM_CONSTEXPR genType root_five();
131 
134  template<typename genType>
135  GLM_FUNC_DECL GLM_CONSTEXPR genType ln_two();
136 
139  template<typename genType>
140  GLM_FUNC_DECL GLM_CONSTEXPR genType ln_ten();
141 
144  template<typename genType>
145  GLM_FUNC_DECL GLM_CONSTEXPR genType ln_ln_two();
146 
149  template<typename genType>
150  GLM_FUNC_DECL GLM_CONSTEXPR genType third();
151 
154  template<typename genType>
155  GLM_FUNC_DECL GLM_CONSTEXPR genType two_thirds();
156 
159  template<typename genType>
160  GLM_FUNC_DECL GLM_CONSTEXPR genType golden_ratio();
161 
163 } //namespace glm
164 
165 #include "constants.inl"
GLM_FUNC_DECL GLM_CONSTEXPR genType quarter_pi()
Return pi / 4.
+
GLM_FUNC_DECL GLM_CONSTEXPR genType one()
Return 1.
+
GLM_FUNC_DECL GLM_CONSTEXPR genType one_over_two_pi()
Return 1 / (pi * 2).
+
GLM_FUNC_DECL GLM_CONSTEXPR genType root_two_pi()
Return sqrt(2 * pi).
+
GLM_FUNC_DECL GLM_CONSTEXPR genType root_ln_four()
Return sqrt(ln(4)).
+
GLM_FUNC_DECL GLM_CONSTEXPR genType root_five()
Return sqrt(5).
+
GLM_FUNC_DECL GLM_CONSTEXPR genType root_half_pi()
Return sqrt(pi / 2).
+
GLM_FUNC_DECL GLM_CONSTEXPR genType four_over_pi()
Return 4 / pi.
+
GLM_FUNC_DECL GLM_CONSTEXPR genType root_pi()
Return square root of pi.
+
GLM_FUNC_DECL GLM_CONSTEXPR genType third()
Return 1 / 3.
+
GLM_FUNC_DECL GLM_CONSTEXPR genType two_thirds()
Return 2 / 3.
+
GLM_FUNC_DECL GLM_CONSTEXPR genType one_over_root_two()
Return 1 / sqrt(2).
+
GLM_FUNC_DECL GLM_CONSTEXPR genType two_over_root_pi()
Return 2 / sqrt(pi).
+
GLM_FUNC_DECL GLM_CONSTEXPR genType ln_ten()
Return ln(10).
+
GLM_FUNC_DECL GLM_CONSTEXPR genType half_pi()
Return pi / 2.
+
GLM_FUNC_DECL GLM_CONSTEXPR genType one_over_pi()
Return 1 / pi.
+
GLM_FUNC_DECL GLM_CONSTEXPR genType e()
Return e constant.
+
GLM_FUNC_DECL GLM_CONSTEXPR genType two_over_pi()
Return 2 / pi.
+
GLM_FUNC_DECL GLM_CONSTEXPR genType root_two()
Return sqrt(2).
+
GLM_FUNC_DECL GLM_CONSTEXPR genType root_three()
Return sqrt(3).
+
GLM_FUNC_DECL GLM_CONSTEXPR genType two_pi()
Return pi * 2.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL GLM_CONSTEXPR genType three_over_two_pi()
Return pi / 2 * 3.
+
GLM_FUNC_DECL GLM_CONSTEXPR genType ln_two()
Return ln(2).
+
GLM_FUNC_DECL GLM_CONSTEXPR genType euler()
Return Euler&#39;s constant.
+
GLM_FUNC_DECL GLM_CONSTEXPR genType zero()
Return 0.
+
GLM_FUNC_DECL GLM_CONSTEXPR genType ln_ln_two()
Return ln(ln(2)).
+
GLM_FUNC_DECL GLM_CONSTEXPR genType golden_ratio()
Return the golden ratio constant.
+
+ + + + diff --git a/common/glm/doc/api/a00398.html b/common/glm/doc/api/a00398.html new file mode 100644 index 000000000..443e7d14a --- /dev/null +++ b/common/glm/doc/api/a00398.html @@ -0,0 +1,108 @@ + + + + + + + +0.9.9 API documenation: epsilon.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
epsilon.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, bool, Q > epsilonEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y, T const &epsilon)
 
template<typename genType >
GLM_FUNC_DECL bool epsilonEqual (genType const &x, genType const &y, genType const &epsilon)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, bool, Q > epsilonNotEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y, T const &epsilon)
 
template<typename genType >
GLM_FUNC_DECL bool epsilonNotEqual (genType const &x, genType const &y, genType const &epsilon)
 
+

Detailed Description

+

GLM_GTC_epsilon

+
See also
Core features (dependence)
+
+GLM_GTC_quaternion (dependence)
+ +

Definition in file epsilon.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00398_source.html b/common/glm/doc/api/a00398_source.html new file mode 100644 index 000000000..a73840b5a --- /dev/null +++ b/common/glm/doc/api/a00398_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: epsilon.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
epsilon.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependencies
17 #include "../detail/setup.hpp"
18 #include "../detail/qualifier.hpp"
19 
20 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
21 # pragma message("GLM: GLM_GTC_epsilon extension included")
22 #endif
23 
24 namespace glm
25 {
28 
33  template<length_t L, typename T, qualifier Q>
34  GLM_FUNC_DECL vec<L, bool, Q> epsilonEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T const& epsilon);
35 
40  template<typename genType>
41  GLM_FUNC_DECL bool epsilonEqual(genType const& x, genType const& y, genType const& epsilon);
42 
47  template<length_t L, typename T, qualifier Q>
48  GLM_FUNC_DECL vec<L, bool, Q> epsilonNotEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T const& epsilon);
49 
54  template<typename genType>
55  GLM_FUNC_DECL bool epsilonNotEqual(genType const& x, genType const& y, genType const& epsilon);
56 
58 }//namespace glm
59 
60 #include "epsilon.inl"
GLM_FUNC_DECL bool epsilonNotEqual(genType const &x, genType const &y, genType const &epsilon)
Returns the component-wise comparison of |x - y| >= epsilon.
+
GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon()
Return the epsilon constant for floating point types.
+
GLM_FUNC_DECL bool epsilonEqual(genType const &x, genType const &y, genType const &epsilon)
Returns the component-wise comparison of |x - y| < epsilon.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00401.html b/common/glm/doc/api/a00401.html new file mode 100644 index 000000000..ce4baa1ef --- /dev/null +++ b/common/glm/doc/api/a00401.html @@ -0,0 +1,133 @@ + + + + + + + +0.9.9 API documenation: integer.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
integer.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL int bitCount (genType v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, int, Q > bitCount (vec< L, T, Q > const &v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > bitfieldExtract (vec< L, T, Q > const &Value, int Offset, int Bits)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > bitfieldInsert (vec< L, T, Q > const &Base, vec< L, T, Q > const &Insert, int Offset, int Bits)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > bitfieldReverse (vec< L, T, Q > const &v)
 
template<typename genIUType >
GLM_FUNC_DECL int findLSB (genIUType x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, int, Q > findLSB (vec< L, T, Q > const &v)
 
template<typename genIUType >
GLM_FUNC_DECL int findMSB (genIUType x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, int, Q > findMSB (vec< L, T, Q > const &v)
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL void imulExtended (vec< L, int, Q > const &x, vec< L, int, Q > const &y, vec< L, int, Q > &msb, vec< L, int, Q > &lsb)
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL vec< L, uint, Q > uaddCarry (vec< L, uint, Q > const &x, vec< L, uint, Q > const &y, vec< L, uint, Q > &carry)
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL void umulExtended (vec< L, uint, Q > const &x, vec< L, uint, Q > const &y, vec< L, uint, Q > &msb, vec< L, uint, Q > &lsb)
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL vec< L, uint, Q > usubBorrow (vec< L, uint, Q > const &x, vec< L, uint, Q > const &y, vec< L, uint, Q > &borrow)
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00401_source.html b/common/glm/doc/api/a00401_source.html new file mode 100644 index 000000000..a685af656 --- /dev/null +++ b/common/glm/doc/api/a00401_source.html @@ -0,0 +1,94 @@ + + + + + + + +0.9.9 API documenation: integer.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
integer.hpp
+
+
+Go to the documentation of this file.
1 
17 #pragma once
18 
19 #include "detail/qualifier.hpp"
20 #include "common.hpp"
21 #include "vector_relational.hpp"
22 
23 namespace glm
24 {
27 
36  template<length_t L, qualifier Q>
37  GLM_FUNC_DECL vec<L, uint, Q> uaddCarry(
38  vec<L, uint, Q> const& x,
39  vec<L, uint, Q> const& y,
40  vec<L, uint, Q> & carry);
41 
50  template<length_t L, qualifier Q>
51  GLM_FUNC_DECL vec<L, uint, Q> usubBorrow(
52  vec<L, uint, Q> const& x,
53  vec<L, uint, Q> const& y,
54  vec<L, uint, Q> & borrow);
55 
64  template<length_t L, qualifier Q>
65  GLM_FUNC_DECL void umulExtended(
66  vec<L, uint, Q> const& x,
67  vec<L, uint, Q> const& y,
68  vec<L, uint, Q> & msb,
69  vec<L, uint, Q> & lsb);
70 
79  template<length_t L, qualifier Q>
80  GLM_FUNC_DECL void imulExtended(
81  vec<L, int, Q> const& x,
82  vec<L, int, Q> const& y,
83  vec<L, int, Q> & msb,
84  vec<L, int, Q> & lsb);
85 
102  template<length_t L, typename T, qualifier Q>
103  GLM_FUNC_DECL vec<L, T, Q> bitfieldExtract(
104  vec<L, T, Q> const& Value,
105  int Offset,
106  int Bits);
107 
123  template<length_t L, typename T, qualifier Q>
124  GLM_FUNC_DECL vec<L, T, Q> bitfieldInsert(
125  vec<L, T, Q> const& Base,
126  vec<L, T, Q> const& Insert,
127  int Offset,
128  int Bits);
129 
139  template<length_t L, typename T, qualifier Q>
140  GLM_FUNC_DECL vec<L, T, Q> bitfieldReverse(vec<L, T, Q> const& v);
141 
148  template<typename genType>
149  GLM_FUNC_DECL int bitCount(genType v);
150 
158  template<length_t L, typename T, qualifier Q>
159  GLM_FUNC_DECL vec<L, int, Q> bitCount(vec<L, T, Q> const& v);
160 
169  template<typename genIUType>
170  GLM_FUNC_DECL int findLSB(genIUType x);
171 
181  template<length_t L, typename T, qualifier Q>
182  GLM_FUNC_DECL vec<L, int, Q> findLSB(vec<L, T, Q> const& v);
183 
193  template<typename genIUType>
194  GLM_FUNC_DECL int findMSB(genIUType x);
195 
206  template<length_t L, typename T, qualifier Q>
207  GLM_FUNC_DECL vec<L, int, Q> findMSB(vec<L, T, Q> const& v);
208 
210 }//namespace glm
211 
212 #include "detail/func_integer.inl"
GLM_FUNC_DECL void umulExtended(vec< L, uint, Q > const &x, vec< L, uint, Q > const &y, vec< L, uint, Q > &msb, vec< L, uint, Q > &lsb)
Multiplies 32-bit integers x and y, producing a 64-bit result.
+
GLM_FUNC_DECL vec< L, int, Q > bitCount(vec< L, T, Q > const &v)
Returns the number of bits set to 1 in the binary representation of value.
+
GLM_FUNC_DECL vec< L, uint, Q > usubBorrow(vec< L, uint, Q > const &x, vec< L, uint, Q > const &y, vec< L, uint, Q > &borrow)
Subtracts the 32-bit unsigned integer y from x, returning the difference if non-negative, or pow(2, 32) plus the difference otherwise.
+
Core features
+
GLM_FUNC_DECL vec< L, int, Q > findLSB(vec< L, T, Q > const &v)
Returns the bit number of the least significant bit set to 1 in the binary representation of value...
+
GLM_FUNC_DECL void imulExtended(vec< L, int, Q > const &x, vec< L, int, Q > const &y, vec< L, int, Q > &msb, vec< L, int, Q > &lsb)
Multiplies 32-bit integers x and y, producing a 64-bit result.
+
GLM_FUNC_DECL vec< L, T, Q > bitfieldExtract(vec< L, T, Q > const &Value, int Offset, int Bits)
Extracts bits [offset, offset + bits - 1] from value, returning them in the least significant bits of...
+
GLM_FUNC_DECL vec< L, int, Q > findMSB(vec< L, T, Q > const &v)
Returns the bit number of the most significant bit in the binary representation of value...
+
GLM_FUNC_DECL vec< L, T, Q > bitfieldReverse(vec< L, T, Q > const &v)
Returns the reversal of the bits of value.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL vec< L, T, Q > bitfieldInsert(vec< L, T, Q > const &Base, vec< L, T, Q > const &Insert, int Offset, int Bits)
Returns the insertion the bits least-significant bits of insert into base.
+
Core features
+
GLM_FUNC_DECL vec< L, uint, Q > uaddCarry(vec< L, uint, Q > const &x, vec< L, uint, Q > const &y, vec< L, uint, Q > &carry)
Adds 32-bit unsigned integer x and y, returning the sum modulo pow(2, 32).
+
+ + + + diff --git a/common/glm/doc/api/a00404.html b/common/glm/doc/api/a00404.html new file mode 100644 index 000000000..b5985d049 --- /dev/null +++ b/common/glm/doc/api/a00404.html @@ -0,0 +1,106 @@ + + + + + + + +0.9.9 API documenation: matrix_access.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_access.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType::col_type column (genType const &m, length_t index)
 
template<typename genType >
GLM_FUNC_DECL genType column (genType const &m, length_t index, typename genType::col_type const &x)
 
template<typename genType >
GLM_FUNC_DECL genType::row_type row (genType const &m, length_t index)
 
template<typename genType >
GLM_FUNC_DECL genType row (genType const &m, length_t index, typename genType::row_type const &x)
 
+

Detailed Description

+

GLM_GTC_matrix_access

+
See also
Core features (dependence)
+ +

Definition in file matrix_access.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00404_source.html b/common/glm/doc/api/a00404_source.html new file mode 100644 index 000000000..d297d9369 --- /dev/null +++ b/common/glm/doc/api/a00404_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: matrix_access.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_access.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../detail/setup.hpp"
17 
18 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
19 # pragma message("GLM: GLM_GTC_matrix_access extension included")
20 #endif
21 
22 namespace glm
23 {
26 
29  template<typename genType>
30  GLM_FUNC_DECL typename genType::row_type row(
31  genType const& m,
32  length_t index);
33 
36  template<typename genType>
37  GLM_FUNC_DECL genType row(
38  genType const& m,
39  length_t index,
40  typename genType::row_type const& x);
41 
44  template<typename genType>
45  GLM_FUNC_DECL typename genType::col_type column(
46  genType const& m,
47  length_t index);
48 
51  template<typename genType>
52  GLM_FUNC_DECL genType column(
53  genType const& m,
54  length_t index,
55  typename genType::col_type const& x);
56 
58 }//namespace glm
59 
60 #include "matrix_access.inl"
GLM_FUNC_DECL genType row(genType const &m, length_t index, typename genType::row_type const &x)
Set a specific row to a matrix.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL genType column(genType const &m, length_t index, typename genType::col_type const &x)
Set a specific column to a matrix.
+
+ + + + diff --git a/common/glm/doc/api/a00407.html b/common/glm/doc/api/a00407.html new file mode 100644 index 000000000..4f022a475 --- /dev/null +++ b/common/glm/doc/api/a00407.html @@ -0,0 +1,286 @@ + + + + + + + +0.9.9 API documenation: matrix_integer.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_integer.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Typedefs

typedef mat< 2, 2, int, highp > highp_imat2
 
typedef mat< 2, 2, int, highp > highp_imat2x2
 
typedef mat< 2, 3, int, highp > highp_imat2x3
 
typedef mat< 2, 4, int, highp > highp_imat2x4
 
typedef mat< 3, 3, int, highp > highp_imat3
 
typedef mat< 3, 2, int, highp > highp_imat3x2
 
typedef mat< 3, 3, int, highp > highp_imat3x3
 
typedef mat< 3, 4, int, highp > highp_imat3x4
 
typedef mat< 4, 4, int, highp > highp_imat4
 
typedef mat< 4, 2, int, highp > highp_imat4x2
 
typedef mat< 4, 3, int, highp > highp_imat4x3
 
typedef mat< 4, 4, int, highp > highp_imat4x4
 
typedef mat< 2, 2, uint, highp > highp_umat2
 
typedef mat< 2, 2, uint, highp > highp_umat2x2
 
typedef mat< 2, 3, uint, highp > highp_umat2x3
 
typedef mat< 2, 4, uint, highp > highp_umat2x4
 
typedef mat< 3, 3, uint, highp > highp_umat3
 
typedef mat< 3, 2, uint, highp > highp_umat3x2
 
typedef mat< 3, 3, uint, highp > highp_umat3x3
 
typedef mat< 3, 4, uint, highp > highp_umat3x4
 
typedef mat< 4, 4, uint, highp > highp_umat4
 
typedef mat< 4, 2, uint, highp > highp_umat4x2
 
typedef mat< 4, 3, uint, highp > highp_umat4x3
 
typedef mat< 4, 4, uint, highp > highp_umat4x4
 
typedef mediump_imat2 imat2
 
typedef mediump_imat2x2 imat2x2
 
typedef mediump_imat2x3 imat2x3
 
typedef mediump_imat2x4 imat2x4
 
typedef mediump_imat3 imat3
 
typedef mediump_imat3x2 imat3x2
 
typedef mediump_imat3x3 imat3x3
 
typedef mediump_imat3x4 imat3x4
 
typedef mediump_imat4 imat4
 
typedef mediump_imat4x2 imat4x2
 
typedef mediump_imat4x3 imat4x3
 
typedef mediump_imat4x4 imat4x4
 
typedef mat< 2, 2, int, lowp > lowp_imat2
 
typedef mat< 2, 2, int, lowp > lowp_imat2x2
 
typedef mat< 2, 3, int, lowp > lowp_imat2x3
 
typedef mat< 2, 4, int, lowp > lowp_imat2x4
 
typedef mat< 3, 3, int, lowp > lowp_imat3
 
typedef mat< 3, 2, int, lowp > lowp_imat3x2
 
typedef mat< 3, 3, int, lowp > lowp_imat3x3
 
typedef mat< 3, 4, int, lowp > lowp_imat3x4
 
typedef mat< 4, 4, int, lowp > lowp_imat4
 
typedef mat< 4, 2, int, lowp > lowp_imat4x2
 
typedef mat< 4, 3, int, lowp > lowp_imat4x3
 
typedef mat< 4, 4, int, lowp > lowp_imat4x4
 
typedef mat< 2, 2, uint, lowp > lowp_umat2
 
typedef mat< 2, 2, uint, lowp > lowp_umat2x2
 
typedef mat< 2, 3, uint, lowp > lowp_umat2x3
 
typedef mat< 2, 4, uint, lowp > lowp_umat2x4
 
typedef mat< 3, 3, uint, lowp > lowp_umat3
 
typedef mat< 3, 2, uint, lowp > lowp_umat3x2
 
typedef mat< 3, 3, uint, lowp > lowp_umat3x3
 
typedef mat< 3, 4, uint, lowp > lowp_umat3x4
 
typedef mat< 4, 4, uint, lowp > lowp_umat4
 
typedef mat< 4, 2, uint, lowp > lowp_umat4x2
 
typedef mat< 4, 3, uint, lowp > lowp_umat4x3
 
typedef mat< 4, 4, uint, lowp > lowp_umat4x4
 
typedef mat< 2, 2, int, mediump > mediump_imat2
 
typedef mat< 2, 2, int, mediump > mediump_imat2x2
 
typedef mat< 2, 3, int, mediump > mediump_imat2x3
 
typedef mat< 2, 4, int, mediump > mediump_imat2x4
 
typedef mat< 3, 3, int, mediump > mediump_imat3
 
typedef mat< 3, 2, int, mediump > mediump_imat3x2
 
typedef mat< 3, 3, int, mediump > mediump_imat3x3
 
typedef mat< 3, 4, int, mediump > mediump_imat3x4
 
typedef mat< 4, 4, int, mediump > mediump_imat4
 
typedef mat< 4, 2, int, mediump > mediump_imat4x2
 
typedef mat< 4, 3, int, mediump > mediump_imat4x3
 
typedef mat< 4, 4, int, mediump > mediump_imat4x4
 
typedef mat< 2, 2, uint, mediump > mediump_umat2
 
typedef mat< 2, 2, uint, mediump > mediump_umat2x2
 
typedef mat< 2, 3, uint, mediump > mediump_umat2x3
 
typedef mat< 2, 4, uint, mediump > mediump_umat2x4
 
typedef mat< 3, 3, uint, mediump > mediump_umat3
 
typedef mat< 3, 2, uint, mediump > mediump_umat3x2
 
typedef mat< 3, 3, uint, mediump > mediump_umat3x3
 
typedef mat< 3, 4, uint, mediump > mediump_umat3x4
 
typedef mat< 4, 4, uint, mediump > mediump_umat4
 
typedef mat< 4, 2, uint, mediump > mediump_umat4x2
 
typedef mat< 4, 3, uint, mediump > mediump_umat4x3
 
typedef mat< 4, 4, uint, mediump > mediump_umat4x4
 
typedef mediump_umat2 umat2
 
typedef mediump_umat2x2 umat2x2
 
typedef mediump_umat2x3 umat2x3
 
typedef mediump_umat2x4 umat2x4
 
typedef mediump_umat3 umat3
 
typedef mediump_umat3x2 umat3x2
 
typedef mediump_umat3x3 umat3x3
 
typedef mediump_umat3x4 umat3x4
 
typedef mediump_umat4 umat4
 
typedef mediump_umat4x2 umat4x2
 
typedef mediump_umat4x3 umat4x3
 
typedef mediump_umat4x4 umat4x4
 
+

Detailed Description

+

GLM_GTC_matrix_integer

+
See also
Core features (dependence)
+ +

Definition in file matrix_integer.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00407_source.html b/common/glm/doc/api/a00407_source.html new file mode 100644 index 000000000..0ef21a23f --- /dev/null +++ b/common/glm/doc/api/a00407_source.html @@ -0,0 +1,178 @@ + + + + + + + +0.9.9 API documenation: matrix_integer.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_integer.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../mat2x2.hpp"
17 #include "../mat2x3.hpp"
18 #include "../mat2x4.hpp"
19 #include "../mat3x2.hpp"
20 #include "../mat3x3.hpp"
21 #include "../mat3x4.hpp"
22 #include "../mat4x2.hpp"
23 #include "../mat4x3.hpp"
24 #include "../mat4x4.hpp"
25 
26 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
27 # pragma message("GLM: GLM_GTC_matrix_integer extension included")
28 #endif
29 
30 namespace glm
31 {
34 
37  typedef mat<2, 2, int, highp> highp_imat2;
38 
41  typedef mat<3, 3, int, highp> highp_imat3;
42 
45  typedef mat<4, 4, int, highp> highp_imat4;
46 
49  typedef mat<2, 2, int, highp> highp_imat2x2;
50 
53  typedef mat<2, 3, int, highp> highp_imat2x3;
54 
57  typedef mat<2, 4, int, highp> highp_imat2x4;
58 
61  typedef mat<3, 2, int, highp> highp_imat3x2;
62 
65  typedef mat<3, 3, int, highp> highp_imat3x3;
66 
69  typedef mat<3, 4, int, highp> highp_imat3x4;
70 
73  typedef mat<4, 2, int, highp> highp_imat4x2;
74 
77  typedef mat<4, 3, int, highp> highp_imat4x3;
78 
81  typedef mat<4, 4, int, highp> highp_imat4x4;
82 
83 
86  typedef mat<2, 2, int, mediump> mediump_imat2;
87 
90  typedef mat<3, 3, int, mediump> mediump_imat3;
91 
94  typedef mat<4, 4, int, mediump> mediump_imat4;
95 
96 
99  typedef mat<2, 2, int, mediump> mediump_imat2x2;
100 
103  typedef mat<2, 3, int, mediump> mediump_imat2x3;
104 
107  typedef mat<2, 4, int, mediump> mediump_imat2x4;
108 
111  typedef mat<3, 2, int, mediump> mediump_imat3x2;
112 
115  typedef mat<3, 3, int, mediump> mediump_imat3x3;
116 
119  typedef mat<3, 4, int, mediump> mediump_imat3x4;
120 
123  typedef mat<4, 2, int, mediump> mediump_imat4x2;
124 
127  typedef mat<4, 3, int, mediump> mediump_imat4x3;
128 
131  typedef mat<4, 4, int, mediump> mediump_imat4x4;
132 
133 
136  typedef mat<2, 2, int, lowp> lowp_imat2;
137 
140  typedef mat<3, 3, int, lowp> lowp_imat3;
141 
144  typedef mat<4, 4, int, lowp> lowp_imat4;
145 
146 
149  typedef mat<2, 2, int, lowp> lowp_imat2x2;
150 
153  typedef mat<2, 3, int, lowp> lowp_imat2x3;
154 
157  typedef mat<2, 4, int, lowp> lowp_imat2x4;
158 
161  typedef mat<3, 2, int, lowp> lowp_imat3x2;
162 
165  typedef mat<3, 3, int, lowp> lowp_imat3x3;
166 
169  typedef mat<3, 4, int, lowp> lowp_imat3x4;
170 
173  typedef mat<4, 2, int, lowp> lowp_imat4x2;
174 
177  typedef mat<4, 3, int, lowp> lowp_imat4x3;
178 
181  typedef mat<4, 4, int, lowp> lowp_imat4x4;
182 
183 
186  typedef mat<2, 2, uint, highp> highp_umat2;
187 
190  typedef mat<3, 3, uint, highp> highp_umat3;
191 
194  typedef mat<4, 4, uint, highp> highp_umat4;
195 
198  typedef mat<2, 2, uint, highp> highp_umat2x2;
199 
202  typedef mat<2, 3, uint, highp> highp_umat2x3;
203 
206  typedef mat<2, 4, uint, highp> highp_umat2x4;
207 
210  typedef mat<3, 2, uint, highp> highp_umat3x2;
211 
214  typedef mat<3, 3, uint, highp> highp_umat3x3;
215 
218  typedef mat<3, 4, uint, highp> highp_umat3x4;
219 
222  typedef mat<4, 2, uint, highp> highp_umat4x2;
223 
226  typedef mat<4, 3, uint, highp> highp_umat4x3;
227 
230  typedef mat<4, 4, uint, highp> highp_umat4x4;
231 
232 
235  typedef mat<2, 2, uint, mediump> mediump_umat2;
236 
239  typedef mat<3, 3, uint, mediump> mediump_umat3;
240 
243  typedef mat<4, 4, uint, mediump> mediump_umat4;
244 
245 
248  typedef mat<2, 2, uint, mediump> mediump_umat2x2;
249 
252  typedef mat<2, 3, uint, mediump> mediump_umat2x3;
253 
256  typedef mat<2, 4, uint, mediump> mediump_umat2x4;
257 
260  typedef mat<3, 2, uint, mediump> mediump_umat3x2;
261 
264  typedef mat<3, 3, uint, mediump> mediump_umat3x3;
265 
268  typedef mat<3, 4, uint, mediump> mediump_umat3x4;
269 
272  typedef mat<4, 2, uint, mediump> mediump_umat4x2;
273 
276  typedef mat<4, 3, uint, mediump> mediump_umat4x3;
277 
280  typedef mat<4, 4, uint, mediump> mediump_umat4x4;
281 
282 
285  typedef mat<2, 2, uint, lowp> lowp_umat2;
286 
289  typedef mat<3, 3, uint, lowp> lowp_umat3;
290 
293  typedef mat<4, 4, uint, lowp> lowp_umat4;
294 
295 
298  typedef mat<2, 2, uint, lowp> lowp_umat2x2;
299 
302  typedef mat<2, 3, uint, lowp> lowp_umat2x3;
303 
306  typedef mat<2, 4, uint, lowp> lowp_umat2x4;
307 
310  typedef mat<3, 2, uint, lowp> lowp_umat3x2;
311 
314  typedef mat<3, 3, uint, lowp> lowp_umat3x3;
315 
318  typedef mat<3, 4, uint, lowp> lowp_umat3x4;
319 
322  typedef mat<4, 2, uint, lowp> lowp_umat4x2;
323 
326  typedef mat<4, 3, uint, lowp> lowp_umat4x3;
327 
330  typedef mat<4, 4, uint, lowp> lowp_umat4x4;
331 
332 #if(defined(GLM_PRECISION_HIGHP_INT))
333  typedef highp_imat2 imat2;
334  typedef highp_imat3 imat3;
335  typedef highp_imat4 imat4;
336  typedef highp_imat2x2 imat2x2;
337  typedef highp_imat2x3 imat2x3;
338  typedef highp_imat2x4 imat2x4;
339  typedef highp_imat3x2 imat3x2;
340  typedef highp_imat3x3 imat3x3;
341  typedef highp_imat3x4 imat3x4;
342  typedef highp_imat4x2 imat4x2;
343  typedef highp_imat4x3 imat4x3;
344  typedef highp_imat4x4 imat4x4;
345 #elif(defined(GLM_PRECISION_LOWP_INT))
346  typedef lowp_imat2 imat2;
347  typedef lowp_imat3 imat3;
348  typedef lowp_imat4 imat4;
349  typedef lowp_imat2x2 imat2x2;
350  typedef lowp_imat2x3 imat2x3;
351  typedef lowp_imat2x4 imat2x4;
352  typedef lowp_imat3x2 imat3x2;
353  typedef lowp_imat3x3 imat3x3;
354  typedef lowp_imat3x4 imat3x4;
355  typedef lowp_imat4x2 imat4x2;
356  typedef lowp_imat4x3 imat4x3;
357  typedef lowp_imat4x4 imat4x4;
358 #else //if(defined(GLM_PRECISION_MEDIUMP_INT))
359 
363 
367 
371 
375 
379 
383 
387 
391 
395 
399 
403 
407 #endif//GLM_PRECISION
408 
409 #if(defined(GLM_PRECISION_HIGHP_UINT))
410  typedef highp_umat2 umat2;
411  typedef highp_umat3 umat3;
412  typedef highp_umat4 umat4;
413  typedef highp_umat2x2 umat2x2;
414  typedef highp_umat2x3 umat2x3;
415  typedef highp_umat2x4 umat2x4;
416  typedef highp_umat3x2 umat3x2;
417  typedef highp_umat3x3 umat3x3;
418  typedef highp_umat3x4 umat3x4;
419  typedef highp_umat4x2 umat4x2;
420  typedef highp_umat4x3 umat4x3;
421  typedef highp_umat4x4 umat4x4;
422 #elif(defined(GLM_PRECISION_LOWP_UINT))
423  typedef lowp_umat2 umat2;
424  typedef lowp_umat3 umat3;
425  typedef lowp_umat4 umat4;
426  typedef lowp_umat2x2 umat2x2;
427  typedef lowp_umat2x3 umat2x3;
428  typedef lowp_umat2x4 umat2x4;
429  typedef lowp_umat3x2 umat3x2;
430  typedef lowp_umat3x3 umat3x3;
431  typedef lowp_umat3x4 umat3x4;
432  typedef lowp_umat4x2 umat4x2;
433  typedef lowp_umat4x3 umat4x3;
434  typedef lowp_umat4x4 umat4x4;
435 #else //if(defined(GLM_PRECISION_MEDIUMP_UINT))
436 
440 
444 
448 
452 
456 
460 
464 
468 
472 
476 
480 
484 #endif//GLM_PRECISION
485 
487 }//namespace glm
mat< 3, 3, int, mediump > mediump_imat3
Medium-qualifier signed integer 3x3 matrix.
+
mat< 4, 4, int, lowp > lowp_imat4
Low-qualifier signed integer 4x4 matrix.
+
mediump_umat3x4 umat3x4
Unsigned integer 3x4 matrix.
+
mat< 3, 3, uint, lowp > lowp_umat3
Low-qualifier unsigned integer 3x3 matrix.
+
mediump_imat4x2 imat4x2
Signed integer 4x2 matrix.
+
mat< 3, 4, int, highp > highp_imat3x4
High-qualifier signed integer 3x4 matrix.
+
mat< 2, 2, int, mediump > mediump_imat2x2
Medium-qualifier signed integer 2x2 matrix.
+
mat< 3, 3, int, highp > highp_imat3x3
High-qualifier signed integer 3x3 matrix.
+
mat< 3, 3, uint, highp > highp_umat3
High-qualifier unsigned integer 3x3 matrix.
+
mat< 2, 3, uint, lowp > lowp_umat2x3
Low-qualifier unsigned integer 2x3 matrix.
+
mediump_imat4x4 imat4x4
Signed integer 4x4 matrix.
+
mat< 3, 2, uint, mediump > mediump_umat3x2
Medium-qualifier unsigned integer 3x2 matrix.
+
mat< 2, 4, uint, lowp > lowp_umat2x4
Low-qualifier unsigned integer 2x4 matrix.
+
mat< 3, 2, uint, highp > highp_umat3x2
High-qualifier unsigned integer 3x2 matrix.
+
mat< 4, 4, int, lowp > lowp_imat4x4
Low-qualifier signed integer 4x4 matrix.
+
mediump_umat2x2 umat2x2
Unsigned integer 2x2 matrix.
+
mediump_umat2 umat2
Unsigned integer 2x2 matrix.
+
mat< 2, 4, int, lowp > lowp_imat2x4
Low-qualifier signed integer 2x4 matrix.
+
mat< 4, 3, uint, highp > highp_umat4x3
High-qualifier unsigned integer 4x3 matrix.
+
mat< 4, 4, uint, lowp > lowp_umat4x4
Low-qualifier unsigned integer 4x4 matrix.
+
mediump_imat2 imat2
Signed integer 2x2 matrix.
+
mat< 4, 4, int, mediump > mediump_imat4x4
Medium-qualifier signed integer 4x4 matrix.
+
mat< 4, 3, uint, mediump > mediump_umat4x3
Medium-qualifier unsigned integer 4x3 matrix.
+
mat< 3, 2, int, highp > highp_imat3x2
High-qualifier signed integer 3x2 matrix.
+
mediump_umat4x3 umat4x3
Unsigned integer 4x3 matrix.
+
mat< 3, 4, uint, highp > highp_umat3x4
High-qualifier unsigned integer 3x4 matrix.
+
mat< 2, 2, uint, lowp > lowp_umat2x2
Low-qualifier unsigned integer 2x2 matrix.
+
mat< 3, 4, uint, mediump > mediump_umat3x4
Medium-qualifier unsigned integer 3x4 matrix.
+
mat< 4, 4, int, highp > highp_imat4
High-qualifier signed integer 4x4 matrix.
+
mat< 3, 4, int, mediump > mediump_imat3x4
Medium-qualifier signed integer 3x4 matrix.
+
mediump_umat3x3 umat3x3
Unsigned integer 3x3 matrix.
+
mat< 3, 3, int, lowp > lowp_imat3x3
Low-qualifier signed integer 3x3 matrix.
+
mat< 3, 4, uint, lowp > lowp_umat3x4
Low-qualifier unsigned integer 3x4 matrix.
+
mediump_imat3x4 imat3x4
Signed integer 3x4 matrix.
+
mediump_imat2x4 imat2x4
Signed integer 2x4 matrix.
+
mat< 4, 3, int, lowp > lowp_imat4x3
Low-qualifier signed integer 4x3 matrix.
+
mat< 2, 2, uint, mediump > mediump_umat2x2
Medium-qualifier unsigned integer 2x2 matrix.
+
mediump_imat3 imat3
Signed integer 3x3 matrix.
+
mat< 3, 4, int, lowp > lowp_imat3x4
Low-qualifier signed integer 3x4 matrix.
+
mat< 3, 3, uint, mediump > mediump_umat3x3
Medium-qualifier unsigned integer 3x3 matrix.
+
mat< 4, 2, int, mediump > mediump_imat4x2
Medium-qualifier signed integer 4x2 matrix.
+
mat< 3, 3, uint, lowp > lowp_umat3x3
Low-qualifier unsigned integer 3x3 matrix.
+
mat< 4, 4, int, mediump > mediump_imat4
Medium-qualifier signed integer 4x4 matrix.
+
mediump_umat2x3 umat2x3
Unsigned integer 2x3 matrix.
+
mat< 3, 3, int, highp > highp_imat3
High-qualifier signed integer 3x3 matrix.
+
mat< 4, 2, uint, mediump > mediump_umat4x2
Medium-qualifier unsigned integer 4x2 matrix.
+
mediump_imat2x2 imat2x2
Signed integer 2x2 matrix.
+
mat< 4, 4, uint, mediump > mediump_umat4x4
Medium-qualifier unsigned integer 4x4 matrix.
+
mediump_imat4x3 imat4x3
Signed integer 4x3 matrix.
+
mat< 2, 3, int, lowp > lowp_imat2x3
Low-qualifier signed integer 2x3 matrix.
+
mat< 2, 2, int, highp > highp_imat2x2
High-qualifier signed integer 2x2 matrix.
+
mat< 2, 2, int, lowp > lowp_imat2x2
Low-qualifier signed integer 2x2 matrix.
+
mediump_umat3 umat3
Unsigned integer 3x3 matrix.
+
mat< 2, 2, int, lowp > lowp_imat2
Low-qualifier signed integer 2x2 matrix.
+
mat< 2, 3, uint, mediump > mediump_umat2x3
Medium-qualifier unsigned integer 2x3 matrix.
+
mat< 4, 4, int, highp > highp_imat4x4
High-qualifier signed integer 4x4 matrix.
+
mat< 2, 4, int, highp > highp_imat2x4
High-qualifier signed integer 2x4 matrix.
+
mat< 4, 4, uint, highp > highp_umat4
High-qualifier unsigned integer 4x4 matrix.
+
mat< 2, 4, uint, mediump > mediump_umat2x4
Medium-qualifier unsigned integer 2x4 matrix.
+
mat< 4, 2, uint, lowp > lowp_umat4x2
Low-qualifier unsigned integer 4x2 matrix.
+
mat< 3, 3, int, mediump > mediump_imat3x3
Medium-qualifier signed integer 3x3 matrix.
+
mat< 2, 2, uint, highp > highp_umat2
High-qualifier unsigned integer 2x2 matrix.
+
mat< 4, 3, uint, lowp > lowp_umat4x3
Low-qualifier unsigned integer 4x3 matrix.
+
mediump_umat4x4 umat4x4
Unsigned integer 4x4 matrix.
+
mat< 3, 3, int, lowp > lowp_imat3
Low-qualifier signed integer 3x3 matrix.
+
mat< 4, 3, int, highp > highp_imat4x3
High-qualifier signed integer 4x3 matrix.
+
mat< 3, 2, int, lowp > lowp_imat3x2
Low-qualifier signed integer 3x2 matrix.
+
mediump_imat3x2 imat3x2
Signed integer 3x2 matrix.
+
mat< 2, 3, uint, highp > highp_umat2x3
High-qualifier unsigned integer 2x3 matrix.
+
mat< 4, 4, uint, lowp > lowp_umat4
Low-qualifier unsigned integer 4x4 matrix.
+
mat< 2, 4, int, mediump > mediump_imat2x4
Medium-qualifier signed integer 2x4 matrix.
+
mat< 2, 4, uint, highp > highp_umat2x4
High-qualifier unsigned integer 2x4 matrix.
+
mat< 3, 2, int, mediump > mediump_imat3x2
Medium-qualifier signed integer 3x2 matrix.
+
mat< 2, 2, int, mediump > mediump_imat2
Medium-qualifier signed integer 2x2 matrix.
+
mat< 4, 2, int, highp > highp_imat4x2
High-qualifier signed integer 4x2 matrix.
+
mat< 2, 3, int, mediump > mediump_imat2x3
Medium-qualifier signed integer 2x3 matrix.
+
mat< 4, 4, uint, highp > highp_umat4x4
High-qualifier unsigned integer 4x4 matrix.
+
mat< 3, 2, uint, lowp > lowp_umat3x2
Low-qualifier unsigned integer 3x2 matrix.
+
mediump_imat2x3 imat2x3
Signed integer 2x3 matrix.
+
mat< 2, 2, uint, highp > highp_umat2x2
High-qualifier unsigned integer 2x2 matrix.
+
mat< 2, 3, int, highp > highp_imat2x3
High-qualifier signed integer 2x3 matrix.
+
mat< 2, 2, int, highp > highp_imat2
High-qualifier signed integer 2x2 matrix.
+
mat< 3, 3, uint, mediump > mediump_umat3
Medium-qualifier unsigned integer 3x3 matrix.
+
mediump_umat4 umat4
Unsigned integer 4x4 matrix.
+
mat< 2, 2, uint, lowp > lowp_umat2
Low-qualifier unsigned integer 2x2 matrix.
+
mat< 4, 2, uint, highp > highp_umat4x2
High-qualifier unsigned integer 4x2 matrix.
+
mediump_imat3x3 imat3x3
Signed integer 3x3 matrix.
+
Definition: common.hpp:20
+
mat< 4, 4, uint, mediump > mediump_umat4
Medium-qualifier unsigned integer 4x4 matrix.
+
mat< 4, 2, int, lowp > lowp_imat4x2
Low-qualifier signed integer 4x2 matrix.
+
mediump_umat2x4 umat2x4
Unsigned integer 2x4 matrix.
+
mediump_umat3x2 umat3x2
Unsigned integer 3x2 matrix.
+
mediump_imat4 imat4
Signed integer 4x4 matrix.
+
mat< 3, 3, uint, highp > highp_umat3x3
High-qualifier unsigned integer 3x3 matrix.
+
mat< 2, 2, uint, mediump > mediump_umat2
Medium-qualifier unsigned integer 2x2 matrix.
+
mediump_umat4x2 umat4x2
Unsigned integer 4x2 matrix.
+
mat< 4, 3, int, mediump > mediump_imat4x3
Medium-qualifier signed integer 4x3 matrix.
+
+ + + + diff --git a/common/glm/doc/api/a00410.html b/common/glm/doc/api/a00410.html new file mode 100644 index 000000000..f2a88d739 --- /dev/null +++ b/common/glm/doc/api/a00410.html @@ -0,0 +1,100 @@ + + + + + + + +0.9.9 API documenation: matrix_inverse.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_inverse.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType affineInverse (genType const &m)
 
template<typename genType >
GLM_FUNC_DECL genType inverseTranspose (genType const &m)
 
+

Detailed Description

+

GLM_GTC_matrix_inverse

+
See also
Core features (dependence)
+ +

Definition in file matrix_inverse.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00410_source.html b/common/glm/doc/api/a00410_source.html new file mode 100644 index 000000000..a5704df9b --- /dev/null +++ b/common/glm/doc/api/a00410_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: matrix_inverse.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_inverse.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependencies
16 #include "../detail/setup.hpp"
17 #include "../matrix.hpp"
18 #include "../mat2x2.hpp"
19 #include "../mat3x3.hpp"
20 #include "../mat4x4.hpp"
21 
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_GTC_matrix_inverse extension included")
24 #endif
25 
26 namespace glm
27 {
30 
36  template<typename genType>
37  GLM_FUNC_DECL genType affineInverse(genType const& m);
38 
44  template<typename genType>
45  GLM_FUNC_DECL genType inverseTranspose(genType const& m);
46 
48 }//namespace glm
49 
50 #include "matrix_inverse.inl"
GLM_FUNC_DECL genType inverseTranspose(genType const &m)
Compute the inverse transpose of a matrix.
+
GLM_FUNC_DECL genType affineInverse(genType const &m)
Fast matrix inverse for affine matrix.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00413.html b/common/glm/doc/api/a00413.html new file mode 100644 index 000000000..faabd4e7c --- /dev/null +++ b/common/glm/doc/api/a00413.html @@ -0,0 +1,103 @@ + + + + + + + +0.9.9 API documenation: noise.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
noise.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T perlin (vec< L, T, Q > const &p)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T perlin (vec< L, T, Q > const &p, vec< L, T, Q > const &rep)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T simplex (vec< L, T, Q > const &p)
 
+

Detailed Description

+

GLM_GTC_noise

+
See also
Core features (dependence)
+ +

Definition in file noise.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00413_source.html b/common/glm/doc/api/a00413_source.html new file mode 100644 index 000000000..5cdf4633f --- /dev/null +++ b/common/glm/doc/api/a00413_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: noise.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
noise.hpp
+
+
+Go to the documentation of this file.
1 
17 #pragma once
18 
19 // Dependencies
20 #include "../detail/setup.hpp"
21 #include "../detail/qualifier.hpp"
22 #include "../detail/_noise.hpp"
23 #include "../geometric.hpp"
24 #include "../common.hpp"
25 #include "../vector_relational.hpp"
26 #include "../vec2.hpp"
27 #include "../vec3.hpp"
28 #include "../vec4.hpp"
29 
30 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
31 # pragma message("GLM: GLM_GTC_noise extension included")
32 #endif
33 
34 namespace glm
35 {
38 
41  template<length_t L, typename T, qualifier Q>
42  GLM_FUNC_DECL T perlin(
43  vec<L, T, Q> const& p);
44 
47  template<length_t L, typename T, qualifier Q>
48  GLM_FUNC_DECL T perlin(
49  vec<L, T, Q> const& p,
50  vec<L, T, Q> const& rep);
51 
54  template<length_t L, typename T, qualifier Q>
55  GLM_FUNC_DECL T simplex(
56  vec<L, T, Q> const& p);
57 
59 }//namespace glm
60 
61 #include "noise.inl"
GLM_FUNC_DECL T perlin(vec< L, T, Q > const &p, vec< L, T, Q > const &rep)
Periodic perlin noise.
+
GLM_FUNC_DECL T simplex(vec< L, T, Q > const &p)
Simplex noise.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00416.html b/common/glm/doc/api/a00416.html new file mode 100644 index 000000000..22351dba7 --- /dev/null +++ b/common/glm/doc/api/a00416.html @@ -0,0 +1,120 @@ + + + + + + + +0.9.9 API documenation: packing.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
packing.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

GLM_FUNC_DECL double packDouble2x32 (uvec2 const &v)
 
GLM_FUNC_DECL uint packHalf2x16 (vec2 const &v)
 
GLM_FUNC_DECL uint packSnorm2x16 (vec2 const &v)
 
GLM_FUNC_DECL uint packSnorm4x8 (vec4 const &v)
 
GLM_FUNC_DECL uint packUnorm2x16 (vec2 const &v)
 
GLM_FUNC_DECL uint packUnorm4x8 (vec4 const &v)
 
GLM_FUNC_DECL uvec2 unpackDouble2x32 (double v)
 
GLM_FUNC_DECL vec2 unpackHalf2x16 (uint v)
 
GLM_FUNC_DECL vec2 unpackSnorm2x16 (uint p)
 
GLM_FUNC_DECL vec4 unpackSnorm4x8 (uint p)
 
GLM_FUNC_DECL vec2 unpackUnorm2x16 (uint p)
 
GLM_FUNC_DECL vec4 unpackUnorm4x8 (uint p)
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00416_source.html b/common/glm/doc/api/a00416_source.html new file mode 100644 index 000000000..15f0bc05f --- /dev/null +++ b/common/glm/doc/api/a00416_source.html @@ -0,0 +1,100 @@ + + + + + + + +0.9.9 API documenation: packing.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
packing.hpp
+
+
+Go to the documentation of this file.
1 
16 #pragma once
17 
18 #include "./ext/vector_uint2.hpp"
19 #include "./ext/vector_float2.hpp"
20 #include "./ext/vector_float4.hpp"
21 
22 namespace glm
23 {
26 
38  GLM_FUNC_DECL uint packUnorm2x16(vec2 const& v);
39 
51  GLM_FUNC_DECL uint packSnorm2x16(vec2 const& v);
52 
64  GLM_FUNC_DECL uint packUnorm4x8(vec4 const& v);
65 
77  GLM_FUNC_DECL uint packSnorm4x8(vec4 const& v);
78 
90  GLM_FUNC_DECL vec2 unpackUnorm2x16(uint p);
91 
103  GLM_FUNC_DECL vec2 unpackSnorm2x16(uint p);
104 
116  GLM_FUNC_DECL vec4 unpackUnorm4x8(uint p);
117 
129  GLM_FUNC_DECL vec4 unpackSnorm4x8(uint p);
130 
139  GLM_FUNC_DECL double packDouble2x32(uvec2 const& v);
140 
148  GLM_FUNC_DECL uvec2 unpackDouble2x32(double v);
149 
158  GLM_FUNC_DECL uint packHalf2x16(vec2 const& v);
159 
168  GLM_FUNC_DECL vec2 unpackHalf2x16(uint v);
169 
171 }//namespace glm
172 
173 #include "detail/func_packing.inl"
GLM_FUNC_DECL vec2 unpackHalf2x16(uint v)
Returns a two-component floating-point vector with components obtained by unpacking a 32-bit unsigned...
+
Core features
+
GLM_FUNC_DECL uint packSnorm2x16(vec2 const &v)
First, converts each component of the normalized floating-point value v into 8- or 16-bit integer val...
+
GLM_FUNC_DECL uint packUnorm2x16(vec2 const &v)
First, converts each component of the normalized floating-point value v into 8- or 16-bit integer val...
+
GLM_FUNC_DECL uint packHalf2x16(vec2 const &v)
Returns an unsigned integer obtained by converting the components of a two-component floating-point v...
+
GLM_FUNC_DECL vec2 unpackSnorm2x16(uint p)
First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
+
vec< 2, float, defaultp > vec2
2 components vector of single-precision floating-point numbers.
+
vec< 2, unsigned int, defaultp > uvec2
2 components vector of unsigned integer numbers.
+
GLM_FUNC_DECL uint packUnorm4x8(vec4 const &v)
First, converts each component of the normalized floating-point value v into 8- or 16-bit integer val...
+
GLM_FUNC_DECL uint packSnorm4x8(vec4 const &v)
First, converts each component of the normalized floating-point value v into 8- or 16-bit integer val...
+
vec< 4, float, defaultp > vec4
4 components vector of single-precision floating-point numbers.
+
GLM_FUNC_DECL vec4 unpackUnorm4x8(uint p)
First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
+
Core features
+
GLM_FUNC_DECL vec4 unpackSnorm4x8(uint p)
First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
+
GLM_FUNC_DECL vec2 unpackUnorm2x16(uint p)
First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
+
GLM_FUNC_DECL double packDouble2x32(uvec2 const &v)
Returns a double-qualifier value obtained by packing the components of v into a 64-bit value...
+
Core features
+
Definition: common.hpp:20
+
GLM_FUNC_DECL uvec2 unpackDouble2x32(double v)
Returns a two-component unsigned integer vector representation of v.
+
+ + + + diff --git a/common/glm/doc/api/a00419.html b/common/glm/doc/api/a00419.html new file mode 100644 index 000000000..054524cd1 --- /dev/null +++ b/common/glm/doc/api/a00419.html @@ -0,0 +1,135 @@ + + + + + + + +0.9.9 API documenation: packing.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
packing.hpp File Reference
+
+
+ +

Core features +More...

+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

GLM_FUNC_DECL double packDouble2x32 (uvec2 const &v)
 Returns a double-qualifier value obtained by packing the components of v into a 64-bit value. More...
 
GLM_FUNC_DECL uint packHalf2x16 (vec2 const &v)
 Returns an unsigned integer obtained by converting the components of a two-component floating-point vector to the 16-bit floating-point representation found in the OpenGL Specification, and then packing these two 16- bit integers into a 32-bit unsigned integer. More...
 
GLM_FUNC_DECL uint packSnorm2x16 (vec2 const &v)
 First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. More...
 
GLM_FUNC_DECL uint packSnorm4x8 (vec4 const &v)
 First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. More...
 
GLM_FUNC_DECL uint packUnorm2x16 (vec2 const &v)
 First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. More...
 
GLM_FUNC_DECL uint packUnorm4x8 (vec4 const &v)
 First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. More...
 
GLM_FUNC_DECL uvec2 unpackDouble2x32 (double v)
 Returns a two-component unsigned integer vector representation of v. More...
 
GLM_FUNC_DECL vec2 unpackHalf2x16 (uint v)
 Returns a two-component floating-point vector with components obtained by unpacking a 32-bit unsigned integer into a pair of 16-bit values, interpreting those values as 16-bit floating-point numbers according to the OpenGL Specification, and converting them to 32-bit floating-point values. More...
 
GLM_FUNC_DECL vec2 unpackSnorm2x16 (uint p)
 First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. More...
 
GLM_FUNC_DECL vec4 unpackSnorm4x8 (uint p)
 First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. More...
 
GLM_FUNC_DECL vec2 unpackUnorm2x16 (uint p)
 First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. More...
 
GLM_FUNC_DECL vec4 unpackUnorm4x8 (uint p)
 First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. More...
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00419_source.html b/common/glm/doc/api/a00419_source.html new file mode 100644 index 000000000..cb4ecf1a2 --- /dev/null +++ b/common/glm/doc/api/a00419_source.html @@ -0,0 +1,100 @@ + + + + + + + +0.9.9 API documenation: packing.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
packing.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 #include "./ext/vector_uint2.hpp"
17 #include "./ext/vector_float2.hpp"
18 #include "./ext/vector_float4.hpp"
19 
20 namespace glm
21 {
24 
36  GLM_FUNC_DECL uint packUnorm2x16(vec2 const& v);
37 
49  GLM_FUNC_DECL uint packSnorm2x16(vec2 const& v);
50 
62  GLM_FUNC_DECL uint packUnorm4x8(vec4 const& v);
63 
75  GLM_FUNC_DECL uint packSnorm4x8(vec4 const& v);
76 
88  GLM_FUNC_DECL vec2 unpackUnorm2x16(uint p);
89 
101  GLM_FUNC_DECL vec2 unpackSnorm2x16(uint p);
102 
114  GLM_FUNC_DECL vec4 unpackUnorm4x8(uint p);
115 
127  GLM_FUNC_DECL vec4 unpackSnorm4x8(uint p);
128 
137  GLM_FUNC_DECL double packDouble2x32(uvec2 const& v);
138 
146  GLM_FUNC_DECL uvec2 unpackDouble2x32(double v);
147 
156  GLM_FUNC_DECL uint packHalf2x16(vec2 const& v);
157 
166  GLM_FUNC_DECL vec2 unpackHalf2x16(uint v);
167 
169 }//namespace glm
170 
171 #include "detail/func_packing.inl"
vec< 2, float, defaultp > vec2
2 components vector of single-precision floating-point numbers.
+
Definition: common.hpp:18
+
Core features
+
Core features
+
GLM_FUNC_DECL vec2 unpackSnorm2x16(uint p)
First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
+
GLM_FUNC_DECL uint packSnorm4x8(vec4 const &v)
First, converts each component of the normalized floating-point value v into 8- or 16-bit integer val...
+
GLM_FUNC_DECL vec2 unpackUnorm2x16(uint p)
First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
+
GLM_FUNC_DECL uvec2 unpackDouble2x32(double v)
Returns a two-component unsigned integer vector representation of v.
+
GLM_FUNC_DECL vec4 unpackUnorm4x8(uint p)
First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
+
GLM_FUNC_DECL uint packUnorm2x16(vec2 const &v)
First, converts each component of the normalized floating-point value v into 8- or 16-bit integer val...
+
GLM_FUNC_DECL double packDouble2x32(uvec2 const &v)
Returns a double-qualifier value obtained by packing the components of v into a 64-bit value...
+
GLM_FUNC_DECL uint packSnorm2x16(vec2 const &v)
First, converts each component of the normalized floating-point value v into 8- or 16-bit integer val...
+
GLM_FUNC_DECL uint packUnorm4x8(vec4 const &v)
First, converts each component of the normalized floating-point value v into 8- or 16-bit integer val...
+
vec< 4, float, defaultp > vec4
4 components vector of single-precision floating-point numbers.
+
Core features
+
vec< 2, unsigned int, defaultp > uvec2
2 components vector of unsigned integer numbers.
+
GLM_FUNC_DECL uint packHalf2x16(vec2 const &v)
Returns an unsigned integer obtained by converting the components of a two-component floating-point v...
+
GLM_FUNC_DECL vec4 unpackSnorm4x8(uint p)
First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
+
GLM_FUNC_DECL vec2 unpackHalf2x16(uint v)
Returns a two-component floating-point vector with components obtained by unpacking a 32-bit unsigned...
+
+ + + + diff --git a/common/glm/doc/api/a00422.html b/common/glm/doc/api/a00422.html new file mode 100644 index 000000000..72d85e68f --- /dev/null +++ b/common/glm/doc/api/a00422.html @@ -0,0 +1,117 @@ + + + + + + + +0.9.9 API documenation: random.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
random.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T >
GLM_FUNC_DECL vec< 3, T, defaultp > ballRand (T Radius)
 
template<typename T >
GLM_FUNC_DECL vec< 2, T, defaultp > circularRand (T Radius)
 
template<typename T >
GLM_FUNC_DECL vec< 2, T, defaultp > diskRand (T Radius)
 
template<typename genType >
GLM_FUNC_DECL genType gaussRand (genType Mean, genType Deviation)
 
template<typename genType >
GLM_FUNC_DECL genType linearRand (genType Min, genType Max)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > linearRand (vec< L, T, Q > const &Min, vec< L, T, Q > const &Max)
 
template<typename T >
GLM_FUNC_DECL vec< 3, T, defaultp > sphericalRand (T Radius)
 
+

Detailed Description

+

GLM_GTC_random

+
See also
Core features (dependence)
+
+gtx_random (extended)
+ +

Definition in file random.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00422_source.html b/common/glm/doc/api/a00422_source.html new file mode 100644 index 000000000..7829fb367 --- /dev/null +++ b/common/glm/doc/api/a00422_source.html @@ -0,0 +1,88 @@ + + + + + + + +0.9.9 API documenation: random.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
random.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../ext/scalar_int_sized.hpp"
18 #include "../ext/scalar_uint_sized.hpp"
19 #include "../detail/qualifier.hpp"
20 
21 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
22 # pragma message("GLM: GLM_GTC_random extension included")
23 #endif
24 
25 namespace glm
26 {
29 
36  template<typename genType>
37  GLM_FUNC_DECL genType linearRand(genType Min, genType Max);
38 
46  template<length_t L, typename T, qualifier Q>
47  GLM_FUNC_DECL vec<L, T, Q> linearRand(vec<L, T, Q> const& Min, vec<L, T, Q> const& Max);
48 
52  template<typename genType>
53  GLM_FUNC_DECL genType gaussRand(genType Mean, genType Deviation);
54 
58  template<typename T>
59  GLM_FUNC_DECL vec<2, T, defaultp> circularRand(T Radius);
60 
64  template<typename T>
65  GLM_FUNC_DECL vec<3, T, defaultp> sphericalRand(T Radius);
66 
70  template<typename T>
71  GLM_FUNC_DECL vec<2, T, defaultp> diskRand(T Radius);
72 
76  template<typename T>
77  GLM_FUNC_DECL vec<3, T, defaultp> ballRand(T Radius);
78 
80 }//namespace glm
81 
82 #include "random.inl"
GLM_FUNC_DECL vec< 3, T, defaultp > sphericalRand(T Radius)
Generate a random 3D vector which coordinates are regulary distributed on a sphere of a given radius...
+
GLM_FUNC_DECL vec< 2, T, defaultp > circularRand(T Radius)
Generate a random 2D vector which coordinates are regulary distributed on a circle of a given radius...
+
GLM_FUNC_DECL vec< 2, T, defaultp > diskRand(T Radius)
Generate a random 2D vector which coordinates are regulary distributed within the area of a disk of a...
+
GLM_FUNC_DECL genType gaussRand(genType Mean, genType Deviation)
Generate random numbers in the interval [Min, Max], according a gaussian distribution.
+
GLM_FUNC_DECL vec< L, T, Q > linearRand(vec< L, T, Q > const &Min, vec< L, T, Q > const &Max)
Generate random numbers in the interval [Min, Max], according a linear distribution.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL vec< 3, T, defaultp > ballRand(T Radius)
Generate a random 3D vector which coordinates are regulary distributed within the volume of a ball of...
+
+ + + + diff --git a/common/glm/doc/api/a00425.html b/common/glm/doc/api/a00425.html new file mode 100644 index 000000000..196f30231 --- /dev/null +++ b/common/glm/doc/api/a00425.html @@ -0,0 +1,130 @@ + + + + + + + +0.9.9 API documenation: reciprocal.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
reciprocal.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType acot (genType x)
 
template<typename genType >
GLM_FUNC_DECL genType acoth (genType x)
 
template<typename genType >
GLM_FUNC_DECL genType acsc (genType x)
 
template<typename genType >
GLM_FUNC_DECL genType acsch (genType x)
 
template<typename genType >
GLM_FUNC_DECL genType asec (genType x)
 
template<typename genType >
GLM_FUNC_DECL genType asech (genType x)
 
template<typename genType >
GLM_FUNC_DECL genType cot (genType angle)
 
template<typename genType >
GLM_FUNC_DECL genType coth (genType angle)
 
template<typename genType >
GLM_FUNC_DECL genType csc (genType angle)
 
template<typename genType >
GLM_FUNC_DECL genType csch (genType angle)
 
template<typename genType >
GLM_FUNC_DECL genType sec (genType angle)
 
template<typename genType >
GLM_FUNC_DECL genType sech (genType angle)
 
+

Detailed Description

+

GLM_GTC_reciprocal

+
See also
Core features (dependence)
+ +

Definition in file reciprocal.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00425_source.html b/common/glm/doc/api/a00425_source.html new file mode 100644 index 000000000..04ac46a63 --- /dev/null +++ b/common/glm/doc/api/a00425_source.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: reciprocal.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
reciprocal.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependencies
16 #include "../detail/setup.hpp"
17 
18 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
19 # pragma message("GLM: GLM_GTC_reciprocal extension included")
20 #endif
21 
22 namespace glm
23 {
26 
33  template<typename genType>
34  GLM_FUNC_DECL genType sec(genType angle);
35 
42  template<typename genType>
43  GLM_FUNC_DECL genType csc(genType angle);
44 
51  template<typename genType>
52  GLM_FUNC_DECL genType cot(genType angle);
53 
60  template<typename genType>
61  GLM_FUNC_DECL genType asec(genType x);
62 
69  template<typename genType>
70  GLM_FUNC_DECL genType acsc(genType x);
71 
78  template<typename genType>
79  GLM_FUNC_DECL genType acot(genType x);
80 
86  template<typename genType>
87  GLM_FUNC_DECL genType sech(genType angle);
88 
94  template<typename genType>
95  GLM_FUNC_DECL genType csch(genType angle);
96 
102  template<typename genType>
103  GLM_FUNC_DECL genType coth(genType angle);
104 
111  template<typename genType>
112  GLM_FUNC_DECL genType asech(genType x);
113 
120  template<typename genType>
121  GLM_FUNC_DECL genType acsch(genType x);
122 
129  template<typename genType>
130  GLM_FUNC_DECL genType acoth(genType x);
131 
133 }//namespace glm
134 
135 #include "reciprocal.inl"
GLM_FUNC_DECL genType sec(genType angle)
Secant function.
+
GLM_FUNC_DECL genType acsc(genType x)
Inverse cosecant function.
+
GLM_FUNC_DECL genType csc(genType angle)
Cosecant function.
+
GLM_FUNC_DECL genType coth(genType angle)
Cotangent hyperbolic function.
+
GLM_FUNC_DECL genType cot(genType angle)
Cotangent function.
+
GLM_FUNC_DECL genType acoth(genType x)
Inverse cotangent hyperbolic function.
+
GLM_FUNC_DECL genType sech(genType angle)
Secant hyperbolic function.
+
GLM_FUNC_DECL genType asech(genType x)
Inverse secant hyperbolic function.
+
GLM_FUNC_DECL genType acot(genType x)
Inverse cotangent function.
+
GLM_FUNC_DECL genType acsch(genType x)
Inverse cosecant hyperbolic function.
+
GLM_FUNC_DECL genType csch(genType angle)
Cosecant hyperbolic function.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL genType asec(genType x)
Inverse secant function.
+
GLM_FUNC_DECL T angle(qua< T, Q > const &x)
Returns the quaternion rotation angle.
+
+ + + + diff --git a/common/glm/doc/api/a00428.html b/common/glm/doc/api/a00428.html new file mode 100644 index 000000000..18d79a28a --- /dev/null +++ b/common/glm/doc/api/a00428.html @@ -0,0 +1,147 @@ + + + + + + + +0.9.9 API documenation: round.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
round.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType ceilMultiple (genType v, genType Multiple)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > ceilMultiple (vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
 
template<typename genIUType >
GLM_FUNC_DECL genIUType ceilPowerOfTwo (genIUType v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > ceilPowerOfTwo (vec< L, T, Q > const &v)
 
template<typename genType >
GLM_FUNC_DECL genType floorMultiple (genType v, genType Multiple)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > floorMultiple (vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
 
template<typename genIUType >
GLM_FUNC_DECL genIUType floorPowerOfTwo (genIUType v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > floorPowerOfTwo (vec< L, T, Q > const &v)
 
template<typename genIUType >
GLM_FUNC_DECL bool isMultiple (genIUType v, genIUType Multiple)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, bool, Q > isMultiple (vec< L, T, Q > const &v, T Multiple)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, bool, Q > isMultiple (vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
 
template<typename genIUType >
GLM_FUNC_DECL bool isPowerOfTwo (genIUType v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, bool, Q > isPowerOfTwo (vec< L, T, Q > const &v)
 
template<typename genType >
GLM_FUNC_DECL genType roundMultiple (genType v, genType Multiple)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > roundMultiple (vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
 
template<typename genIUType >
GLM_FUNC_DECL genIUType roundPowerOfTwo (genIUType v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > roundPowerOfTwo (vec< L, T, Q > const &v)
 
+

Detailed Description

+

GLM_GTC_round

+
See also
Core features (dependence)
+
+GLM_GTC_round (dependence)
+ +

Definition in file round.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00428_source.html b/common/glm/doc/api/a00428_source.html new file mode 100644 index 000000000..4274b71e9 --- /dev/null +++ b/common/glm/doc/api/a00428_source.html @@ -0,0 +1,90 @@ + + + + + + + +0.9.9 API documenation: round.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
round.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependencies
17 #include "../detail/setup.hpp"
18 #include "../detail/qualifier.hpp"
19 #include "../detail/_vectorize.hpp"
20 #include "../vector_relational.hpp"
21 #include "../common.hpp"
22 #include <limits>
23 
24 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
25 # pragma message("GLM: GLM_GTC_integer extension included")
26 #endif
27 
28 namespace glm
29 {
32 
36  template<typename genIUType>
37  GLM_FUNC_DECL bool isPowerOfTwo(genIUType v);
38 
46  template<length_t L, typename T, qualifier Q>
47  GLM_FUNC_DECL vec<L, bool, Q> isPowerOfTwo(vec<L, T, Q> const& v);
48 
53  template<typename genIUType>
54  GLM_FUNC_DECL genIUType ceilPowerOfTwo(genIUType v);
55 
64  template<length_t L, typename T, qualifier Q>
65  GLM_FUNC_DECL vec<L, T, Q> ceilPowerOfTwo(vec<L, T, Q> const& v);
66 
71  template<typename genIUType>
72  GLM_FUNC_DECL genIUType floorPowerOfTwo(genIUType v);
73 
82  template<length_t L, typename T, qualifier Q>
83  GLM_FUNC_DECL vec<L, T, Q> floorPowerOfTwo(vec<L, T, Q> const& v);
84 
88  template<typename genIUType>
89  GLM_FUNC_DECL genIUType roundPowerOfTwo(genIUType v);
90 
98  template<length_t L, typename T, qualifier Q>
99  GLM_FUNC_DECL vec<L, T, Q> roundPowerOfTwo(vec<L, T, Q> const& v);
100 
104  template<typename genIUType>
105  GLM_FUNC_DECL bool isMultiple(genIUType v, genIUType Multiple);
106 
114  template<length_t L, typename T, qualifier Q>
115  GLM_FUNC_DECL vec<L, bool, Q> isMultiple(vec<L, T, Q> const& v, T Multiple);
116 
124  template<length_t L, typename T, qualifier Q>
125  GLM_FUNC_DECL vec<L, bool, Q> isMultiple(vec<L, T, Q> const& v, vec<L, T, Q> const& Multiple);
126 
135  template<typename genType>
136  GLM_FUNC_DECL genType ceilMultiple(genType v, genType Multiple);
137 
148  template<length_t L, typename T, qualifier Q>
149  GLM_FUNC_DECL vec<L, T, Q> ceilMultiple(vec<L, T, Q> const& v, vec<L, T, Q> const& Multiple);
150 
159  template<typename genType>
160  GLM_FUNC_DECL genType floorMultiple(genType v, genType Multiple);
161 
172  template<length_t L, typename T, qualifier Q>
173  GLM_FUNC_DECL vec<L, T, Q> floorMultiple(vec<L, T, Q> const& v, vec<L, T, Q> const& Multiple);
174 
183  template<typename genType>
184  GLM_FUNC_DECL genType roundMultiple(genType v, genType Multiple);
185 
196  template<length_t L, typename T, qualifier Q>
197  GLM_FUNC_DECL vec<L, T, Q> roundMultiple(vec<L, T, Q> const& v, vec<L, T, Q> const& Multiple);
198 
200 } //namespace glm
201 
202 #include "round.inl"
GLM_FUNC_DECL vec< L, T, Q > floorMultiple(vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
Lower multiple number of Source.
+
GLM_FUNC_DECL vec< L, T, Q > ceilMultiple(vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
Higher multiple number of Source.
+
GLM_FUNC_DECL vec< L, T, Q > floorPowerOfTwo(vec< L, T, Q > const &v)
Return the power of two number which value is just lower the input value, round down to a power of tw...
+
GLM_FUNC_DECL vec< L, bool, Q > isMultiple(vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
Return true if the &#39;Value&#39; is a multiple of &#39;Multiple&#39;.
+
GLM_FUNC_DECL vec< L, T, Q > ceilPowerOfTwo(vec< L, T, Q > const &v)
Return the power of two number which value is just higher the input value, round up to a power of two...
+
GLM_FUNC_DECL vec< L, bool, Q > isPowerOfTwo(vec< L, T, Q > const &v)
Return true if the value is a power of two number.
+
GLM_FUNC_DECL vec< L, T, Q > roundPowerOfTwo(vec< L, T, Q > const &v)
Return the power of two number which value is the closet to the input value.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL vec< L, T, Q > roundMultiple(vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
Lower multiple number of Source.
+
+ + + + diff --git a/common/glm/doc/api/a00431.html b/common/glm/doc/api/a00431.html new file mode 100644 index 000000000..d1597f511 --- /dev/null +++ b/common/glm/doc/api/a00431.html @@ -0,0 +1,167 @@ + + + + + + + +0.9.9 API documenation: round.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
round.hpp File Reference
+
+
+ +

GLM_GTC_round +More...

+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType ceilMultiple (genType v, genType Multiple)
 Higher multiple number of Source. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > ceilMultiple (vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
 Higher multiple number of Source. More...
 
template<typename genIUType >
GLM_FUNC_DECL genIUType ceilPowerOfTwo (genIUType v)
 Return the power of two number which value is just higher the input value, round up to a power of two. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > ceilPowerOfTwo (vec< L, T, Q > const &v)
 Return the power of two number which value is just higher the input value, round up to a power of two. More...
 
template<typename genType >
GLM_FUNC_DECL genType floorMultiple (genType v, genType Multiple)
 Lower multiple number of Source. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > floorMultiple (vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
 Lower multiple number of Source. More...
 
template<typename genIUType >
GLM_FUNC_DECL genIUType floorPowerOfTwo (genIUType v)
 Return the power of two number which value is just lower the input value, round down to a power of two. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > floorPowerOfTwo (vec< L, T, Q > const &v)
 Return the power of two number which value is just lower the input value, round down to a power of two. More...
 
template<typename genIUType >
GLM_FUNC_DECL bool isMultiple (genIUType v, genIUType Multiple)
 Return true if the 'Value' is a multiple of 'Multiple'. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, bool, Q > isMultiple (vec< L, T, Q > const &v, T Multiple)
 Return true if the 'Value' is a multiple of 'Multiple'. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, bool, Q > isMultiple (vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
 Return true if the 'Value' is a multiple of 'Multiple'. More...
 
template<typename genIUType >
GLM_FUNC_DECL bool isPowerOfTwo (genIUType v)
 Return true if the value is a power of two number. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, bool, Q > isPowerOfTwo (vec< L, T, Q > const &v)
 Return true if the value is a power of two number. More...
 
template<typename genType >
GLM_FUNC_DECL genType roundMultiple (genType v, genType Multiple)
 Lower multiple number of Source. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > roundMultiple (vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
 Lower multiple number of Source. More...
 
template<typename genIUType >
GLM_FUNC_DECL genIUType roundPowerOfTwo (genIUType v)
 Return the power of two number which value is the closet to the input value. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > roundPowerOfTwo (vec< L, T, Q > const &v)
 Return the power of two number which value is the closet to the input value. More...
 
+

Detailed Description

+

GLM_GTC_round

+
See also
Core features (dependence)
+
+GLM_GTC_round (dependence)
+ +

Definition in file round.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00431_source.html b/common/glm/doc/api/a00431_source.html new file mode 100644 index 000000000..2d6cbd8fa --- /dev/null +++ b/common/glm/doc/api/a00431_source.html @@ -0,0 +1,90 @@ + + + + + + + +0.9.9 API documenation: round.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
round.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependencies
17 #include "../detail/setup.hpp"
18 #include "../detail/qualifier.hpp"
19 #include "../detail/_vectorize.hpp"
20 #include "../vector_relational.hpp"
21 #include "../common.hpp"
22 #include <limits>
23 
24 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
25 # pragma message("GLM: GLM_GTC_integer extension included")
26 #endif
27 
28 namespace glm
29 {
32 
36  template<typename genIUType>
37  GLM_FUNC_DECL bool isPowerOfTwo(genIUType v);
38 
46  template<length_t L, typename T, qualifier Q>
47  GLM_FUNC_DECL vec<L, bool, Q> isPowerOfTwo(vec<L, T, Q> const& v);
48 
53  template<typename genIUType>
54  GLM_FUNC_DECL genIUType ceilPowerOfTwo(genIUType v);
55 
64  template<length_t L, typename T, qualifier Q>
65  GLM_FUNC_DECL vec<L, T, Q> ceilPowerOfTwo(vec<L, T, Q> const& v);
66 
71  template<typename genIUType>
72  GLM_FUNC_DECL genIUType floorPowerOfTwo(genIUType v);
73 
82  template<length_t L, typename T, qualifier Q>
83  GLM_FUNC_DECL vec<L, T, Q> floorPowerOfTwo(vec<L, T, Q> const& v);
84 
88  template<typename genIUType>
89  GLM_FUNC_DECL genIUType roundPowerOfTwo(genIUType v);
90 
98  template<length_t L, typename T, qualifier Q>
99  GLM_FUNC_DECL vec<L, T, Q> roundPowerOfTwo(vec<L, T, Q> const& v);
100 
104  template<typename genIUType>
105  GLM_FUNC_DECL bool isMultiple(genIUType v, genIUType Multiple);
106 
114  template<length_t L, typename T, qualifier Q>
115  GLM_FUNC_DECL vec<L, bool, Q> isMultiple(vec<L, T, Q> const& v, T Multiple);
116 
124  template<length_t L, typename T, qualifier Q>
125  GLM_FUNC_DECL vec<L, bool, Q> isMultiple(vec<L, T, Q> const& v, vec<L, T, Q> const& Multiple);
126 
135  template<typename genType>
136  GLM_FUNC_DECL genType ceilMultiple(genType v, genType Multiple);
137 
148  template<length_t L, typename T, qualifier Q>
149  GLM_FUNC_DECL vec<L, T, Q> ceilMultiple(vec<L, T, Q> const& v, vec<L, T, Q> const& Multiple);
150 
159  template<typename genType>
160  GLM_FUNC_DECL genType floorMultiple(genType v, genType Multiple);
161 
172  template<length_t L, typename T, qualifier Q>
173  GLM_FUNC_DECL vec<L, T, Q> floorMultiple(vec<L, T, Q> const& v, vec<L, T, Q> const& Multiple);
174 
183  template<typename genType>
184  GLM_FUNC_DECL genType roundMultiple(genType v, genType Multiple);
185 
196  template<length_t L, typename T, qualifier Q>
197  GLM_FUNC_DECL vec<L, T, Q> roundMultiple(vec<L, T, Q> const& v, vec<L, T, Q> const& Multiple);
198 
200 } //namespace glm
201 
202 #include "round.inl"
Definition: common.hpp:18
+
GLM_FUNC_DECL vec< L, bool, Q > isMultiple(vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
Return true if the &#39;Value&#39; is a multiple of &#39;Multiple&#39;.
+
GLM_FUNC_DECL vec< L, bool, Q > isPowerOfTwo(vec< L, T, Q > const &v)
Return true if the value is a power of two number.
+
GLM_FUNC_DECL vec< L, T, Q > ceilMultiple(vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
Higher multiple number of Source.
+
GLM_FUNC_DECL vec< L, T, Q > roundPowerOfTwo(vec< L, T, Q > const &v)
Return the power of two number which value is the closet to the input value.
+
GLM_FUNC_DECL vec< L, T, Q > roundMultiple(vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
Lower multiple number of Source.
+
GLM_FUNC_DECL vec< L, T, Q > floorMultiple(vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
Lower multiple number of Source.
+
GLM_FUNC_DECL vec< L, T, Q > floorPowerOfTwo(vec< L, T, Q > const &v)
Return the power of two number which value is just lower the input value, round down to a power of tw...
+
GLM_FUNC_DECL vec< L, T, Q > ceilPowerOfTwo(vec< L, T, Q > const &v)
Return the power of two number which value is just higher the input value, round up to a power of two...
+
+ + + + diff --git a/common/glm/doc/api/a00434.html b/common/glm/doc/api/a00434.html new file mode 100644 index 000000000..e05dc461e --- /dev/null +++ b/common/glm/doc/api/a00434.html @@ -0,0 +1,90 @@ + + + + + + + +0.9.9 API documenation: type_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

GLM_GTC_type_precision

+
See also
Core features (dependence)
+
+GLM_GTC_quaternion (dependence)
+ +

Definition in file type_precision.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00434_source.html b/common/glm/doc/api/a00434_source.html new file mode 100644 index 000000000..70bc465c9 --- /dev/null +++ b/common/glm/doc/api/a00434_source.html @@ -0,0 +1,524 @@ + + + + + + + +0.9.9 API documenation: type_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_precision.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../gtc/quaternion.hpp"
18 #include "../gtc/vec1.hpp"
19 #include "../ext/scalar_float_sized.hpp"
20 #include "../ext/scalar_int_sized.hpp"
21 #include "../ext/scalar_uint_sized.hpp"
22 #include "../detail/type_vec2.hpp"
23 #include "../detail/type_vec3.hpp"
24 #include "../detail/type_vec4.hpp"
25 #include "../detail/type_mat2x2.hpp"
26 #include "../detail/type_mat2x3.hpp"
27 #include "../detail/type_mat2x4.hpp"
28 #include "../detail/type_mat3x2.hpp"
29 #include "../detail/type_mat3x3.hpp"
30 #include "../detail/type_mat3x4.hpp"
31 #include "../detail/type_mat4x2.hpp"
32 #include "../detail/type_mat4x3.hpp"
33 #include "../detail/type_mat4x4.hpp"
34 
35 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
36 # pragma message("GLM: GLM_GTC_type_precision extension included")
37 #endif
38 
39 namespace glm
40 {
42  // Signed int vector types
43 
46 
49  typedef detail::int8 lowp_int8;
50 
53  typedef detail::int16 lowp_int16;
54 
57  typedef detail::int32 lowp_int32;
58 
61  typedef detail::int64 lowp_int64;
62 
65  typedef detail::int8 lowp_int8_t;
66 
69  typedef detail::int16 lowp_int16_t;
70 
73  typedef detail::int32 lowp_int32_t;
74 
78 
81  typedef detail::int8 lowp_i8;
82 
85  typedef detail::int16 lowp_i16;
86 
89  typedef detail::int32 lowp_i32;
90 
93  typedef detail::int64 lowp_i64;
94 
97  typedef detail::int8 mediump_int8;
98 
101  typedef detail::int16 mediump_int16;
102 
105  typedef detail::int32 mediump_int32;
106 
110 
113  typedef detail::int8 mediump_int8_t;
114 
117  typedef detail::int16 mediump_int16_t;
118 
121  typedef detail::int32 mediump_int32_t;
122 
126 
129  typedef detail::int8 mediump_i8;
130 
133  typedef detail::int16 mediump_i16;
134 
137  typedef detail::int32 mediump_i32;
138 
141  typedef detail::int64 mediump_i64;
142 
145  typedef detail::int8 highp_int8;
146 
149  typedef detail::int16 highp_int16;
150 
153  typedef detail::int32 highp_int32;
154 
157  typedef detail::int64 highp_int64;
158 
161  typedef detail::int8 highp_int8_t;
162 
165  typedef detail::int16 highp_int16_t;
166 
169  typedef detail::int32 highp_int32_t;
170 
174 
177  typedef detail::int8 highp_i8;
178 
181  typedef detail::int16 highp_i16;
182 
185  typedef detail::int32 highp_i32;
186 
189  typedef detail::int64 highp_i64;
190 
191 
192 #if GLM_HAS_EXTENDED_INTEGER_TYPE
193  using std::int8_t;
194  using std::int16_t;
195  using std::int32_t;
196  using std::int64_t;
197 #else
198  typedef detail::int8 int8_t;
201 
204  typedef detail::int16 int16_t;
205 
208  typedef detail::int32 int32_t;
209 
212  typedef detail::int64 int64_t;
213 #endif
214 
217  typedef detail::int8 i8;
218 
221  typedef detail::int16 i16;
222 
225  typedef detail::int32 i32;
226 
229  typedef detail::int64 i64;
230 
231 
232 
235  typedef vec<1, i8, lowp> lowp_i8vec1;
236 
239  typedef vec<2, i8, lowp> lowp_i8vec2;
240 
243  typedef vec<3, i8, lowp> lowp_i8vec3;
244 
247  typedef vec<4, i8, lowp> lowp_i8vec4;
248 
249 
252  typedef vec<1, i8, mediump> mediump_i8vec1;
253 
256  typedef vec<2, i8, mediump> mediump_i8vec2;
257 
260  typedef vec<3, i8, mediump> mediump_i8vec3;
261 
264  typedef vec<4, i8, mediump> mediump_i8vec4;
265 
266 
269  typedef vec<1, i8, highp> highp_i8vec1;
270 
273  typedef vec<2, i8, highp> highp_i8vec2;
274 
277  typedef vec<3, i8, highp> highp_i8vec3;
278 
281  typedef vec<4, i8, highp> highp_i8vec4;
282 
283 
284 
287  typedef vec<1, i8, defaultp> i8vec1;
288 
291  typedef vec<2, i8, defaultp> i8vec2;
292 
295  typedef vec<3, i8, defaultp> i8vec3;
296 
299  typedef vec<4, i8, defaultp> i8vec4;
300 
301 
302 
303 
304 
307  typedef vec<1, i16, lowp> lowp_i16vec1;
308 
311  typedef vec<2, i16, lowp> lowp_i16vec2;
312 
315  typedef vec<3, i16, lowp> lowp_i16vec3;
316 
319  typedef vec<4, i16, lowp> lowp_i16vec4;
320 
321 
324  typedef vec<1, i16, mediump> mediump_i16vec1;
325 
328  typedef vec<2, i16, mediump> mediump_i16vec2;
329 
332  typedef vec<3, i16, mediump> mediump_i16vec3;
333 
336  typedef vec<4, i16, mediump> mediump_i16vec4;
337 
338 
341  typedef vec<1, i16, highp> highp_i16vec1;
342 
345  typedef vec<2, i16, highp> highp_i16vec2;
346 
349  typedef vec<3, i16, highp> highp_i16vec3;
350 
353  typedef vec<4, i16, highp> highp_i16vec4;
354 
355 
356 
357 
360  typedef vec<1, i16, defaultp> i16vec1;
361 
364  typedef vec<2, i16, defaultp> i16vec2;
365 
368  typedef vec<3, i16, defaultp> i16vec3;
369 
372  typedef vec<4, i16, defaultp> i16vec4;
373 
374 
375 
378  typedef vec<1, i32, lowp> lowp_i32vec1;
379 
382  typedef vec<2, i32, lowp> lowp_i32vec2;
383 
386  typedef vec<3, i32, lowp> lowp_i32vec3;
387 
390  typedef vec<4, i32, lowp> lowp_i32vec4;
391 
392 
395  typedef vec<1, i32, mediump> mediump_i32vec1;
396 
399  typedef vec<2, i32, mediump> mediump_i32vec2;
400 
403  typedef vec<3, i32, mediump> mediump_i32vec3;
404 
407  typedef vec<4, i32, mediump> mediump_i32vec4;
408 
409 
412  typedef vec<1, i32, highp> highp_i32vec1;
413 
416  typedef vec<2, i32, highp> highp_i32vec2;
417 
420  typedef vec<3, i32, highp> highp_i32vec3;
421 
424  typedef vec<4, i32, highp> highp_i32vec4;
425 
426 
429  typedef vec<1, i32, defaultp> i32vec1;
430 
433  typedef vec<2, i32, defaultp> i32vec2;
434 
437  typedef vec<3, i32, defaultp> i32vec3;
438 
441  typedef vec<4, i32, defaultp> i32vec4;
442 
443 
444 
445 
448  typedef vec<1, i64, lowp> lowp_i64vec1;
449 
452  typedef vec<2, i64, lowp> lowp_i64vec2;
453 
456  typedef vec<3, i64, lowp> lowp_i64vec3;
457 
460  typedef vec<4, i64, lowp> lowp_i64vec4;
461 
462 
465  typedef vec<1, i64, mediump> mediump_i64vec1;
466 
469  typedef vec<2, i64, mediump> mediump_i64vec2;
470 
473  typedef vec<3, i64, mediump> mediump_i64vec3;
474 
477  typedef vec<4, i64, mediump> mediump_i64vec4;
478 
479 
482  typedef vec<1, i64, highp> highp_i64vec1;
483 
486  typedef vec<2, i64, highp> highp_i64vec2;
487 
490  typedef vec<3, i64, highp> highp_i64vec3;
491 
494  typedef vec<4, i64, highp> highp_i64vec4;
495 
496 
499  typedef vec<1, i64, defaultp> i64vec1;
500 
503  typedef vec<2, i64, defaultp> i64vec2;
504 
507  typedef vec<3, i64, defaultp> i64vec3;
508 
511  typedef vec<4, i64, defaultp> i64vec4;
512 
513 
515  // Unsigned int vector types
516 
519  typedef detail::uint8 lowp_uint8;
520 
523  typedef detail::uint16 lowp_uint16;
524 
527  typedef detail::uint32 lowp_uint32;
528 
531  typedef detail::uint64 lowp_uint64;
532 
535  typedef detail::uint8 lowp_uint8_t;
536 
539  typedef detail::uint16 lowp_uint16_t;
540 
543  typedef detail::uint32 lowp_uint32_t;
544 
548 
551  typedef detail::uint8 lowp_u8;
552 
555  typedef detail::uint16 lowp_u16;
556 
559  typedef detail::uint32 lowp_u32;
560 
563  typedef detail::uint64 lowp_u64;
564 
567  typedef detail::uint8 mediump_uint8;
568 
571  typedef detail::uint16 mediump_uint16;
572 
575  typedef detail::uint32 mediump_uint32;
576 
580 
583  typedef detail::uint8 mediump_uint8_t;
584 
587  typedef detail::uint16 mediump_uint16_t;
588 
591  typedef detail::uint32 mediump_uint32_t;
592 
596 
599  typedef detail::uint8 mediump_u8;
600 
603  typedef detail::uint16 mediump_u16;
604 
607  typedef detail::uint32 mediump_u32;
608 
611  typedef detail::uint64 mediump_u64;
612 
615  typedef detail::uint8 highp_uint8;
616 
619  typedef detail::uint16 highp_uint16;
620 
623  typedef detail::uint32 highp_uint32;
624 
628 
631  typedef detail::uint8 highp_uint8_t;
632 
635  typedef detail::uint16 highp_uint16_t;
636 
639  typedef detail::uint32 highp_uint32_t;
640 
644 
647  typedef detail::uint8 highp_u8;
648 
651  typedef detail::uint16 highp_u16;
652 
655  typedef detail::uint32 highp_u32;
656 
659  typedef detail::uint64 highp_u64;
660 
661 #if GLM_HAS_EXTENDED_INTEGER_TYPE
662  using std::uint8_t;
663  using std::uint16_t;
664  using std::uint32_t;
665  using std::uint64_t;
666 #else
667  typedef detail::uint8 uint8_t;
670 
673  typedef detail::uint16 uint16_t;
674 
677  typedef detail::uint32 uint32_t;
678 
681  typedef detail::uint64 uint64_t;
682 #endif
683 
686  typedef detail::uint8 u8;
687 
690  typedef detail::uint16 u16;
691 
694  typedef detail::uint32 u32;
695 
698  typedef detail::uint64 u64;
699 
700 
701 
702 
703 
705  // Float vector types
706 
709  typedef float32 lowp_float32;
710 
713  typedef float64 lowp_float64;
714 
717  typedef float32 lowp_float32_t;
718 
721  typedef float64 lowp_float64_t;
722 
725  typedef float32 lowp_f32;
726 
729  typedef float64 lowp_f64;
730 
733  typedef float32 lowp_float32;
734 
737  typedef float64 lowp_float64;
738 
741  typedef float32 lowp_float32_t;
742 
745  typedef float64 lowp_float64_t;
746 
749  typedef float32 lowp_f32;
750 
753  typedef float64 lowp_f64;
754 
755 
758  typedef float32 lowp_float32;
759 
762  typedef float64 lowp_float64;
763 
766  typedef float32 lowp_float32_t;
767 
770  typedef float64 lowp_float64_t;
771 
774  typedef float32 lowp_f32;
775 
778  typedef float64 lowp_f64;
779 
780 
783  typedef float32 mediump_float32;
784 
787  typedef float64 mediump_float64;
788 
791  typedef float32 mediump_float32_t;
792 
795  typedef float64 mediump_float64_t;
796 
799  typedef float32 mediump_f32;
800 
803  typedef float64 mediump_f64;
804 
805 
808  typedef float32 highp_float32;
809 
812  typedef float64 highp_float64;
813 
816  typedef float32 highp_float32_t;
817 
820  typedef float64 highp_float64_t;
821 
824  typedef float32 highp_f32;
825 
828  typedef float64 highp_f64;
829 
830 
831 #if(defined(GLM_PRECISION_LOWP_FLOAT))
832  typedef lowp_float32_t float32_t;
835 
838  typedef lowp_float64_t float64_t;
839 
842  typedef lowp_f32 f32;
843 
846  typedef lowp_f64 f64;
847 
848 #elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))
849  typedef mediump_float32 float32_t;
852 
855  typedef mediump_float64 float64_t;
856 
859  typedef mediump_float32 f32;
860 
863  typedef mediump_float64 f64;
864 
865 #else//(defined(GLM_PRECISION_HIGHP_FLOAT))
866 
869  typedef highp_float32_t float32_t;
870 
873  typedef highp_float64_t float64_t;
874 
877  typedef highp_float32_t f32;
878 
881  typedef highp_float64_t f64;
882 #endif
883 
884 
887  typedef vec<1, float, lowp> lowp_fvec1;
888 
891  typedef vec<2, float, lowp> lowp_fvec2;
892 
895  typedef vec<3, float, lowp> lowp_fvec3;
896 
899  typedef vec<4, float, lowp> lowp_fvec4;
900 
901 
904  typedef vec<1, float, mediump> mediump_fvec1;
905 
908  typedef vec<2, float, mediump> mediump_fvec2;
909 
912  typedef vec<3, float, mediump> mediump_fvec3;
913 
916  typedef vec<4, float, mediump> mediump_fvec4;
917 
918 
921  typedef vec<1, float, highp> highp_fvec1;
922 
925  typedef vec<2, float, highp> highp_fvec2;
926 
929  typedef vec<3, float, highp> highp_fvec3;
930 
933  typedef vec<4, float, highp> highp_fvec4;
934 
935 
938  typedef vec<1, f32, lowp> lowp_f32vec1;
939 
942  typedef vec<2, f32, lowp> lowp_f32vec2;
943 
946  typedef vec<3, f32, lowp> lowp_f32vec3;
947 
950  typedef vec<4, f32, lowp> lowp_f32vec4;
951 
954  typedef vec<1, f32, mediump> mediump_f32vec1;
955 
958  typedef vec<2, f32, mediump> mediump_f32vec2;
959 
962  typedef vec<3, f32, mediump> mediump_f32vec3;
963 
966  typedef vec<4, f32, mediump> mediump_f32vec4;
967 
970  typedef vec<1, f32, highp> highp_f32vec1;
971 
974  typedef vec<2, f32, highp> highp_f32vec2;
975 
978  typedef vec<3, f32, highp> highp_f32vec3;
979 
982  typedef vec<4, f32, highp> highp_f32vec4;
983 
984 
987  typedef vec<1, f64, lowp> lowp_f64vec1;
988 
991  typedef vec<2, f64, lowp> lowp_f64vec2;
992 
995  typedef vec<3, f64, lowp> lowp_f64vec3;
996 
999  typedef vec<4, f64, lowp> lowp_f64vec4;
1000 
1003  typedef vec<1, f64, mediump> mediump_f64vec1;
1004 
1007  typedef vec<2, f64, mediump> mediump_f64vec2;
1008 
1011  typedef vec<3, f64, mediump> mediump_f64vec3;
1012 
1015  typedef vec<4, f64, mediump> mediump_f64vec4;
1016 
1019  typedef vec<1, f64, highp> highp_f64vec1;
1020 
1023  typedef vec<2, f64, highp> highp_f64vec2;
1024 
1027  typedef vec<3, f64, highp> highp_f64vec3;
1028 
1031  typedef vec<4, f64, highp> highp_f64vec4;
1032 
1033 
1034 
1036  // Float matrix types
1037 
1040  //typedef lowp_f32 lowp_fmat1x1;
1041 
1044  typedef mat<2, 2, f32, lowp> lowp_fmat2x2;
1045 
1048  typedef mat<2, 3, f32, lowp> lowp_fmat2x3;
1049 
1052  typedef mat<2, 4, f32, lowp> lowp_fmat2x4;
1053 
1056  typedef mat<3, 2, f32, lowp> lowp_fmat3x2;
1057 
1060  typedef mat<3, 3, f32, lowp> lowp_fmat3x3;
1061 
1064  typedef mat<3, 4, f32, lowp> lowp_fmat3x4;
1065 
1068  typedef mat<4, 2, f32, lowp> lowp_fmat4x2;
1069 
1072  typedef mat<4, 3, f32, lowp> lowp_fmat4x3;
1073 
1076  typedef mat<4, 4, f32, lowp> lowp_fmat4x4;
1077 
1080  //typedef lowp_fmat1x1 lowp_fmat1;
1081 
1084  typedef lowp_fmat2x2 lowp_fmat2;
1085 
1088  typedef lowp_fmat3x3 lowp_fmat3;
1089 
1092  typedef lowp_fmat4x4 lowp_fmat4;
1093 
1094 
1097  //typedef mediump_f32 mediump_fmat1x1;
1098 
1101  typedef mat<2, 2, f32, mediump> mediump_fmat2x2;
1102 
1105  typedef mat<2, 3, f32, mediump> mediump_fmat2x3;
1106 
1109  typedef mat<2, 4, f32, mediump> mediump_fmat2x4;
1110 
1113  typedef mat<3, 2, f32, mediump> mediump_fmat3x2;
1114 
1117  typedef mat<3, 3, f32, mediump> mediump_fmat3x3;
1118 
1121  typedef mat<3, 4, f32, mediump> mediump_fmat3x4;
1122 
1125  typedef mat<4, 2, f32, mediump> mediump_fmat4x2;
1126 
1129  typedef mat<4, 3, f32, mediump> mediump_fmat4x3;
1130 
1133  typedef mat<4, 4, f32, mediump> mediump_fmat4x4;
1134 
1137  //typedef mediump_fmat1x1 mediump_fmat1;
1138 
1142 
1146 
1150 
1151 
1154  //typedef highp_f32 highp_fmat1x1;
1155 
1158  typedef mat<2, 2, f32, highp> highp_fmat2x2;
1159 
1162  typedef mat<2, 3, f32, highp> highp_fmat2x3;
1163 
1166  typedef mat<2, 4, f32, highp> highp_fmat2x4;
1167 
1170  typedef mat<3, 2, f32, highp> highp_fmat3x2;
1171 
1174  typedef mat<3, 3, f32, highp> highp_fmat3x3;
1175 
1178  typedef mat<3, 4, f32, highp> highp_fmat3x4;
1179 
1182  typedef mat<4, 2, f32, highp> highp_fmat4x2;
1183 
1186  typedef mat<4, 3, f32, highp> highp_fmat4x3;
1187 
1190  typedef mat<4, 4, f32, highp> highp_fmat4x4;
1191 
1194  //typedef highp_fmat1x1 highp_fmat1;
1195 
1198  typedef highp_fmat2x2 highp_fmat2;
1199 
1202  typedef highp_fmat3x3 highp_fmat3;
1203 
1206  typedef highp_fmat4x4 highp_fmat4;
1207 
1208 
1211  //typedef f32 lowp_f32mat1x1;
1212 
1215  typedef mat<2, 2, f32, lowp> lowp_f32mat2x2;
1216 
1219  typedef mat<2, 3, f32, lowp> lowp_f32mat2x3;
1220 
1223  typedef mat<2, 4, f32, lowp> lowp_f32mat2x4;
1224 
1227  typedef mat<3, 2, f32, lowp> lowp_f32mat3x2;
1228 
1231  typedef mat<3, 3, f32, lowp> lowp_f32mat3x3;
1232 
1235  typedef mat<3, 4, f32, lowp> lowp_f32mat3x4;
1236 
1239  typedef mat<4, 2, f32, lowp> lowp_f32mat4x2;
1240 
1243  typedef mat<4, 3, f32, lowp> lowp_f32mat4x3;
1244 
1247  typedef mat<4, 4, f32, lowp> lowp_f32mat4x4;
1248 
1251  //typedef detail::tmat1x1<f32, lowp> lowp_f32mat1;
1252 
1255  typedef lowp_f32mat2x2 lowp_f32mat2;
1256 
1259  typedef lowp_f32mat3x3 lowp_f32mat3;
1260 
1263  typedef lowp_f32mat4x4 lowp_f32mat4;
1264 
1265 
1268  //typedef f32 mediump_f32mat1x1;
1269 
1272  typedef mat<2, 2, f32, mediump> mediump_f32mat2x2;
1273 
1276  typedef mat<2, 3, f32, mediump> mediump_f32mat2x3;
1277 
1280  typedef mat<2, 4, f32, mediump> mediump_f32mat2x4;
1281 
1284  typedef mat<3, 2, f32, mediump> mediump_f32mat3x2;
1285 
1288  typedef mat<3, 3, f32, mediump> mediump_f32mat3x3;
1289 
1292  typedef mat<3, 4, f32, mediump> mediump_f32mat3x4;
1293 
1296  typedef mat<4, 2, f32, mediump> mediump_f32mat4x2;
1297 
1300  typedef mat<4, 3, f32, mediump> mediump_f32mat4x3;
1301 
1304  typedef mat<4, 4, f32, mediump> mediump_f32mat4x4;
1305 
1308  //typedef detail::tmat1x1<f32, mediump> f32mat1;
1309 
1313 
1317 
1321 
1322 
1325  //typedef f32 highp_f32mat1x1;
1326 
1329  typedef mat<2, 2, f32, highp> highp_f32mat2x2;
1330 
1333  typedef mat<2, 3, f32, highp> highp_f32mat2x3;
1334 
1337  typedef mat<2, 4, f32, highp> highp_f32mat2x4;
1338 
1341  typedef mat<3, 2, f32, highp> highp_f32mat3x2;
1342 
1345  typedef mat<3, 3, f32, highp> highp_f32mat3x3;
1346 
1349  typedef mat<3, 4, f32, highp> highp_f32mat3x4;
1350 
1353  typedef mat<4, 2, f32, highp> highp_f32mat4x2;
1354 
1357  typedef mat<4, 3, f32, highp> highp_f32mat4x3;
1358 
1361  typedef mat<4, 4, f32, highp> highp_f32mat4x4;
1362 
1365  //typedef detail::tmat1x1<f32, highp> f32mat1;
1366 
1370 
1374 
1378 
1379 
1382  //typedef f64 lowp_f64mat1x1;
1383 
1386  typedef mat<2, 2, f64, lowp> lowp_f64mat2x2;
1387 
1390  typedef mat<2, 3, f64, lowp> lowp_f64mat2x3;
1391 
1394  typedef mat<2, 4, f64, lowp> lowp_f64mat2x4;
1395 
1398  typedef mat<3, 2, f64, lowp> lowp_f64mat3x2;
1399 
1402  typedef mat<3, 3, f64, lowp> lowp_f64mat3x3;
1403 
1406  typedef mat<3, 4, f64, lowp> lowp_f64mat3x4;
1407 
1410  typedef mat<4, 2, f64, lowp> lowp_f64mat4x2;
1411 
1414  typedef mat<4, 3, f64, lowp> lowp_f64mat4x3;
1415 
1418  typedef mat<4, 4, f64, lowp> lowp_f64mat4x4;
1419 
1422  //typedef lowp_f64mat1x1 lowp_f64mat1;
1423 
1426  typedef lowp_f64mat2x2 lowp_f64mat2;
1427 
1430  typedef lowp_f64mat3x3 lowp_f64mat3;
1431 
1434  typedef lowp_f64mat4x4 lowp_f64mat4;
1435 
1436 
1439  //typedef f64 Highp_f64mat1x1;
1440 
1443  typedef mat<2, 2, f64, mediump> mediump_f64mat2x2;
1444 
1447  typedef mat<2, 3, f64, mediump> mediump_f64mat2x3;
1448 
1451  typedef mat<2, 4, f64, mediump> mediump_f64mat2x4;
1452 
1455  typedef mat<3, 2, f64, mediump> mediump_f64mat3x2;
1456 
1459  typedef mat<3, 3, f64, mediump> mediump_f64mat3x3;
1460 
1463  typedef mat<3, 4, f64, mediump> mediump_f64mat3x4;
1464 
1467  typedef mat<4, 2, f64, mediump> mediump_f64mat4x2;
1468 
1471  typedef mat<4, 3, f64, mediump> mediump_f64mat4x3;
1472 
1475  typedef mat<4, 4, f64, mediump> mediump_f64mat4x4;
1476 
1479  //typedef mediump_f64mat1x1 mediump_f64mat1;
1480 
1484 
1488 
1492 
1495  //typedef f64 highp_f64mat1x1;
1496 
1499  typedef mat<2, 2, f64, highp> highp_f64mat2x2;
1500 
1503  typedef mat<2, 3, f64, highp> highp_f64mat2x3;
1504 
1507  typedef mat<2, 4, f64, highp> highp_f64mat2x4;
1508 
1511  typedef mat<3, 2, f64, highp> highp_f64mat3x2;
1512 
1515  typedef mat<3, 3, f64, highp> highp_f64mat3x3;
1516 
1519  typedef mat<3, 4, f64, highp> highp_f64mat3x4;
1520 
1523  typedef mat<4, 2, f64, highp> highp_f64mat4x2;
1524 
1527  typedef mat<4, 3, f64, highp> highp_f64mat4x3;
1528 
1531  typedef mat<4, 4, f64, highp> highp_f64mat4x4;
1532 
1535  //typedef highp_f64mat1x1 highp_f64mat1;
1536 
1540 
1544 
1548 
1549 
1550 
1551 
1554  typedef vec<1, u8, lowp> lowp_u8vec1;
1555 
1558  typedef vec<2, u8, lowp> lowp_u8vec2;
1559 
1562  typedef vec<3, u8, lowp> lowp_u8vec3;
1563 
1566  typedef vec<4, u8, lowp> lowp_u8vec4;
1567 
1568 
1571  typedef vec<1, u8, mediump> mediump_u8vec1;
1572 
1575  typedef vec<2, u8, mediump> mediump_u8vec2;
1576 
1579  typedef vec<3, u8, mediump> mediump_u8vec3;
1580 
1583  typedef vec<4, u8, mediump> mediump_u8vec4;
1584 
1585 
1588  typedef vec<1, u8, highp> highp_u8vec1;
1589 
1592  typedef vec<2, u8, highp> highp_u8vec2;
1593 
1596  typedef vec<3, u8, highp> highp_u8vec3;
1597 
1600  typedef vec<4, u8, highp> highp_u8vec4;
1601 
1602 
1603 
1606  typedef vec<1, u8, defaultp> u8vec1;
1607 
1610  typedef vec<2, u8, defaultp> u8vec2;
1611 
1614  typedef vec<3, u8, defaultp> u8vec3;
1615 
1618  typedef vec<4, u8, defaultp> u8vec4;
1619 
1620 
1621 
1622 
1625  typedef vec<1, u16, lowp> lowp_u16vec1;
1626 
1629  typedef vec<2, u16, lowp> lowp_u16vec2;
1630 
1633  typedef vec<3, u16, lowp> lowp_u16vec3;
1634 
1637  typedef vec<4, u16, lowp> lowp_u16vec4;
1638 
1639 
1642  typedef vec<1, u16, mediump> mediump_u16vec1;
1643 
1646  typedef vec<2, u16, mediump> mediump_u16vec2;
1647 
1650  typedef vec<3, u16, mediump> mediump_u16vec3;
1651 
1654  typedef vec<4, u16, mediump> mediump_u16vec4;
1655 
1656 
1659  typedef vec<1, u16, highp> highp_u16vec1;
1660 
1663  typedef vec<2, u16, highp> highp_u16vec2;
1664 
1667  typedef vec<3, u16, highp> highp_u16vec3;
1668 
1671  typedef vec<4, u16, highp> highp_u16vec4;
1672 
1673 
1674 
1675 
1678  typedef vec<1, u16, defaultp> u16vec1;
1679 
1682  typedef vec<2, u16, defaultp> u16vec2;
1683 
1686  typedef vec<3, u16, defaultp> u16vec3;
1687 
1690  typedef vec<4, u16, defaultp> u16vec4;
1691 
1692 
1693 
1696  typedef vec<1, u32, lowp> lowp_u32vec1;
1697 
1700  typedef vec<2, u32, lowp> lowp_u32vec2;
1701 
1704  typedef vec<3, u32, lowp> lowp_u32vec3;
1705 
1708  typedef vec<4, u32, lowp> lowp_u32vec4;
1709 
1710 
1713  typedef vec<1, u32, mediump> mediump_u32vec1;
1714 
1717  typedef vec<2, u32, mediump> mediump_u32vec2;
1718 
1721  typedef vec<3, u32, mediump> mediump_u32vec3;
1722 
1725  typedef vec<4, u32, mediump> mediump_u32vec4;
1726 
1727 
1730  typedef vec<1, u32, highp> highp_u32vec1;
1731 
1734  typedef vec<2, u32, highp> highp_u32vec2;
1735 
1738  typedef vec<3, u32, highp> highp_u32vec3;
1739 
1742  typedef vec<4, u32, highp> highp_u32vec4;
1743 
1744 
1745 
1748  typedef vec<1, u32, defaultp> u32vec1;
1749 
1752  typedef vec<2, u32, defaultp> u32vec2;
1753 
1756  typedef vec<3, u32, defaultp> u32vec3;
1757 
1760  typedef vec<4, u32, defaultp> u32vec4;
1761 
1762 
1763 
1764 
1767  typedef vec<1, u64, lowp> lowp_u64vec1;
1768 
1771  typedef vec<2, u64, lowp> lowp_u64vec2;
1772 
1775  typedef vec<3, u64, lowp> lowp_u64vec3;
1776 
1779  typedef vec<4, u64, lowp> lowp_u64vec4;
1780 
1781 
1784  typedef vec<1, u64, mediump> mediump_u64vec1;
1785 
1788  typedef vec<2, u64, mediump> mediump_u64vec2;
1789 
1792  typedef vec<3, u64, mediump> mediump_u64vec3;
1793 
1796  typedef vec<4, u64, mediump> mediump_u64vec4;
1797 
1798 
1801  typedef vec<1, u64, highp> highp_u64vec1;
1802 
1805  typedef vec<2, u64, highp> highp_u64vec2;
1806 
1809  typedef vec<3, u64, highp> highp_u64vec3;
1810 
1813  typedef vec<4, u64, highp> highp_u64vec4;
1814 
1815 
1816 
1817 
1820  typedef vec<1, u64, defaultp> u64vec1;
1821 
1824  typedef vec<2, u64, defaultp> u64vec2;
1825 
1828  typedef vec<3, u64, defaultp> u64vec3;
1829 
1832  typedef vec<4, u64, defaultp> u64vec4;
1833 
1834 
1836  // Float vector types
1837 
1840  typedef float32 float32_t;
1841 
1844  typedef float32 f32;
1845 
1846 # ifndef GLM_FORCE_SINGLE_ONLY
1847 
1850  typedef float64 float64_t;
1851 
1854  typedef float64 f64;
1855 # endif//GLM_FORCE_SINGLE_ONLY
1856 
1859  typedef vec<1, float, defaultp> fvec1;
1860 
1863  typedef vec<2, float, defaultp> fvec2;
1864 
1867  typedef vec<3, float, defaultp> fvec3;
1868 
1871  typedef vec<4, float, defaultp> fvec4;
1872 
1873 
1876  typedef vec<1, f32, defaultp> f32vec1;
1877 
1880  typedef vec<2, f32, defaultp> f32vec2;
1881 
1884  typedef vec<3, f32, defaultp> f32vec3;
1885 
1888  typedef vec<4, f32, defaultp> f32vec4;
1889 
1890 # ifndef GLM_FORCE_SINGLE_ONLY
1891  typedef vec<1, f64, defaultp> f64vec1;
1894 
1897  typedef vec<2, f64, defaultp> f64vec2;
1898 
1901  typedef vec<3, f64, defaultp> f64vec3;
1902 
1905  typedef vec<4, f64, defaultp> f64vec4;
1906 # endif//GLM_FORCE_SINGLE_ONLY
1907 
1908 
1910  // Float matrix types
1911 
1914  //typedef detail::tmat1x1<f32> fmat1;
1915 
1918  typedef mat<2, 2, f32, defaultp> fmat2;
1919 
1922  typedef mat<3, 3, f32, defaultp> fmat3;
1923 
1926  typedef mat<4, 4, f32, defaultp> fmat4;
1927 
1928 
1931  //typedef f32 fmat1x1;
1932 
1935  typedef mat<2, 2, f32, defaultp> fmat2x2;
1936 
1939  typedef mat<2, 3, f32, defaultp> fmat2x3;
1940 
1943  typedef mat<2, 4, f32, defaultp> fmat2x4;
1944 
1947  typedef mat<3, 2, f32, defaultp> fmat3x2;
1948 
1951  typedef mat<3, 3, f32, defaultp> fmat3x3;
1952 
1955  typedef mat<3, 4, f32, defaultp> fmat3x4;
1956 
1959  typedef mat<4, 2, f32, defaultp> fmat4x2;
1960 
1963  typedef mat<4, 3, f32, defaultp> fmat4x3;
1964 
1967  typedef mat<4, 4, f32, defaultp> fmat4x4;
1968 
1969 
1972  //typedef detail::tmat1x1<f32, defaultp> f32mat1;
1973 
1976  typedef mat<2, 2, f32, defaultp> f32mat2;
1977 
1980  typedef mat<3, 3, f32, defaultp> f32mat3;
1981 
1984  typedef mat<4, 4, f32, defaultp> f32mat4;
1985 
1986 
1989  //typedef f32 f32mat1x1;
1990 
1993  typedef mat<2, 2, f32, defaultp> f32mat2x2;
1994 
1997  typedef mat<2, 3, f32, defaultp> f32mat2x3;
1998 
2001  typedef mat<2, 4, f32, defaultp> f32mat2x4;
2002 
2005  typedef mat<3, 2, f32, defaultp> f32mat3x2;
2006 
2009  typedef mat<3, 3, f32, defaultp> f32mat3x3;
2010 
2013  typedef mat<3, 4, f32, defaultp> f32mat3x4;
2014 
2017  typedef mat<4, 2, f32, defaultp> f32mat4x2;
2018 
2021  typedef mat<4, 3, f32, defaultp> f32mat4x3;
2022 
2025  typedef mat<4, 4, f32, defaultp> f32mat4x4;
2026 
2027 
2028 # ifndef GLM_FORCE_SINGLE_ONLY
2029 
2032  //typedef detail::tmat1x1<f64, defaultp> f64mat1;
2033 
2036  typedef mat<2, 2, f64, defaultp> f64mat2;
2037 
2040  typedef mat<3, 3, f64, defaultp> f64mat3;
2041 
2044  typedef mat<4, 4, f64, defaultp> f64mat4;
2045 
2046 
2049  //typedef f64 f64mat1x1;
2050 
2053  typedef mat<2, 2, f64, defaultp> f64mat2x2;
2054 
2057  typedef mat<2, 3, f64, defaultp> f64mat2x3;
2058 
2061  typedef mat<2, 4, f64, defaultp> f64mat2x4;
2062 
2065  typedef mat<3, 2, f64, defaultp> f64mat3x2;
2066 
2069  typedef mat<3, 3, f64, defaultp> f64mat3x3;
2070 
2073  typedef mat<3, 4, f64, defaultp> f64mat3x4;
2074 
2077  typedef mat<4, 2, f64, defaultp> f64mat4x2;
2078 
2081  typedef mat<4, 3, f64, defaultp> f64mat4x3;
2082 
2085  typedef mat<4, 4, f64, defaultp> f64mat4x4;
2086 
2087 # endif//GLM_FORCE_SINGLE_ONLY
2088 
2090  // Quaternion types
2091 
2094  typedef qua<f32, defaultp> f32quat;
2095 
2098  typedef qua<f32, lowp> lowp_f32quat;
2099 
2102  typedef qua<f64, lowp> lowp_f64quat;
2103 
2106  typedef qua<f32, mediump> mediump_f32quat;
2107 
2108 # ifndef GLM_FORCE_SINGLE_ONLY
2109 
2112  typedef qua<f64, mediump> mediump_f64quat;
2113 
2116  typedef qua<f32, highp> highp_f32quat;
2117 
2120  typedef qua<f64, highp> highp_f64quat;
2121 
2124  typedef qua<f64, defaultp> f64quat;
2125 
2126 # endif//GLM_FORCE_SINGLE_ONLY
2127 
2129 }//namespace glm
2130 
2131 #include "type_precision.inl"
double f64
Default 64 bit double-qualifier floating-point scalar.
Definition: fwd.hpp:166
+
vec< 2, i8, highp > highp_i8vec2
High qualifier 8 bit signed integer vector of 2 components type.
Definition: fwd.hpp:233
+
vec< 2, f32, mediump > mediump_f32vec2
Medium single-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:452
+
int32 int32_t
32 bit signed integer type.
Definition: fwd.hpp:71
+
uint64 u64
Default qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:134
+
vec< 4, i64, mediump > mediump_i64vec4
Medium qualifier 64 bit signed integer vector of 4 components type.
Definition: fwd.hpp:290
+
vec< 3, u16, defaultp > u16vec3
Default qualifier 16 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:361
+
vec< 1, i16, defaultp > i16vec1
16 bit signed integer scalar type.
Definition: fwd.hpp:257
+
mat< 3, 3, f32, lowp > lowp_f32mat3
Low single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:541
+
mat< 4, 4, f64, highp > highp_f64mat4x4
High double-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:778
+
mat< 3, 3, f32, mediump > mediump_fmat3
Medium single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:529
+
mat< 4, 2, f32, lowp > lowp_fmat4x2
Low single-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:636
+
vec< 3, float, mediump > mediump_fvec3
Medium Single-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:433
+
uint16 highp_uint16_t
High qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:114
+
mat< 2, 3, f32, highp > highp_fmat2x3
High single-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:651
+
mat< 4, 3, f32, lowp > lowp_f32mat4x3
Low single-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:677
+
double mediump_float64
Medium 64 bit double-qualifier floating-point scalar.
Definition: fwd.hpp:169
+
qua< f64, defaultp > f64quat
Double-qualifier floating-point quaternion.
Definition: fwd.hpp:815
+
vec< 1, u64, mediump > mediump_u64vec1
Medium qualifier 64 bit unsigned integer scalar type.
Definition: fwd.hpp:389
+
vec< 4, u8, highp > highp_u8vec4
High qualifier 8 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:337
+
int16 int16_t
16 bit signed integer type.
Definition: fwd.hpp:57
+
vec< 2, f64, defaultp > f64vec2
Double-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:502
+
vec< 3, u32, highp > highp_u32vec3
High qualifier 32 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:376
+
vec< 4, f64, highp > highp_f64vec4
High double-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:499
+
int64 i64
64 bit signed integer type.
Definition: fwd.hpp:76
+
mat< 2, 3, f32, lowp > lowp_f32mat2x3
Low single-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:671
+
mat< 4, 4, f32, defaultp > f32mat4
Single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:554
+
int32 lowp_i32
Low qualifier 32 bit signed integer type.
Definition: fwd.hpp:59
+
vec< 1, i16, highp > highp_i16vec1
High qualifier 16 bit signed integer scalar type.
Definition: fwd.hpp:252
+
mat< 3, 4, f32, mediump > mediump_f32mat3x4
Medium single-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:685
+
vec< 3, i32, mediump > mediump_i32vec3
Medium qualifier 32 bit signed integer vector of 3 components type.
Definition: fwd.hpp:269
+
vec< 4, i16, highp > highp_i16vec4
High qualifier 16 bit signed integer vector of 4 components type.
Definition: fwd.hpp:255
+
uint8 mediump_uint8
Medium qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:95
+
vec< 3, i8, lowp > lowp_i8vec3
Low qualifier 8 bit signed integer vector of 3 components type.
Definition: fwd.hpp:224
+
vec< 4, i32, mediump > mediump_i32vec4
Medium qualifier 32 bit signed integer vector of 4 components type.
Definition: fwd.hpp:270
+
vec< 1, i8, lowp > lowp_i8vec1
Low qualifier 8 bit signed integer scalar type.
Definition: fwd.hpp:222
+
vec< 2, i64, defaultp > i64vec2
64 bit signed integer vector of 2 components type.
Definition: fwd.hpp:298
+
vec< 4, u16, lowp > lowp_u16vec4
Low qualifier 16 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:347
+
mat< 3, 4, f64, lowp > lowp_f64mat3x4
Low double-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:755
+
vec< 1, u32, mediump > mediump_u32vec1
Medium qualifier 32 bit unsigned integer scalar type.
Definition: fwd.hpp:369
+
mat< 3, 3, f32, mediump > mediump_f32mat3x3
Medium single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:684
+
mat< 4, 2, f32, mediump > mediump_f32mat4x2
Medium single-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:686
+
mat< 3, 3, f32, lowp > lowp_fmat3
Low single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:525
+
vec< 3, u8, lowp > lowp_u8vec3
Low qualifier 8 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:326
+
mat< 2, 4, f32, lowp > lowp_f32mat2x4
Low single-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:672
+
mat< 4, 2, f32, highp > highp_f32mat4x2
High single-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:696
+
mat< 3, 3, f32, highp > highp_f32mat3
High single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:549
+
mat< 3, 4, f64, mediump > mediump_f64mat3x4
Medium double-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:765
+
mat< 4, 4, f32, lowp > lowp_fmat4x4
Low single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:638
+
vec< 4, f32, defaultp > fvec4
Single-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:444
+
int8 lowp_int8_t
Low qualifier 8 bit signed integer type.
Definition: fwd.hpp:40
+
vec< 2, i16, mediump > mediump_i16vec2
Medium qualifier 16 bit signed integer vector of 2 components type.
Definition: fwd.hpp:248
+
int64 lowp_int64_t
Low qualifier 64 bit signed integer type.
Definition: fwd.hpp:82
+
mat< 2, 4, f32, highp > highp_f32mat2x4
High single-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:692
+
vec< 4, f32, highp > highp_f32vec4
High single-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:459
+
mat< 2, 2, f32, mediump > mediump_fmat2x2
Medium single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:640
+
mat< 2, 2, f32, lowp > lowp_f32mat2
Low single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:540
+
vec< 2, f32, lowp > lowp_f32vec2
Low single-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:447
+
mat< 3, 3, f32, defaultp > fmat3
Single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:537
+
uint32 u32
Default qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:120
+
mat< 2, 2, f64, highp > highp_f64mat2x2
High double-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:770
+
vec< 3, i64, lowp > lowp_i64vec3
Low qualifier 64 bit signed integer vector of 3 components type.
Definition: fwd.hpp:284
+
int8 mediump_i8
Medium qualifier 8 bit signed integer type.
Definition: fwd.hpp:32
+
vec< 4, i16, defaultp > i16vec4
16 bit signed integer vector of 4 components type.
Definition: fwd.hpp:260
+
double float64
Double precision floating-point numbers.
+
mat< 2, 2, f32, lowp > lowp_fmat2x2
Low single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:630
+
uint8 lowp_uint8_t
Low qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:98
+
int32 highp_int32_t
32 bit signed integer type.
Definition: fwd.hpp:70
+
vec< 4, i8, lowp > lowp_i8vec4
Low qualifier 8 bit signed integer vector of 4 components type.
Definition: fwd.hpp:225
+
vec< 1, f64, defaultp > f64vec1
Double-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:501
+
mat< 2, 4, f32, defaultp > fmat2x4
Single-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:666
+
int64 mediump_int64
Medium qualifier 64 bit signed integer type.
Definition: fwd.hpp:79
+
mat< 4, 3, f64, highp > highp_f64mat4x3
High double-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:777
+
mat< 2, 3, f32, defaultp > f32mat2x3
Single-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:703
+
vec< 1, i32, mediump > mediump_i32vec1
Medium qualifier 32 bit signed integer scalar type.
Definition: fwd.hpp:267
+
vec< 3, i8, highp > highp_i8vec3
High qualifier 8 bit signed integer vector of 3 components type.
Definition: fwd.hpp:234
+
vec< 4, u32, highp > highp_u32vec4
High qualifier 32 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:377
+
double float64_t
Default 64 bit double-qualifier floating-point scalar.
Definition: fwd.hpp:176
+
vec< 3, i16, defaultp > i16vec3
16 bit signed integer vector of 3 components type.
Definition: fwd.hpp:259
+
mat< 4, 3, f32, highp > highp_fmat4x3
High single-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:657
+
vec< 1, float, lowp > lowp_fvec1
Low single-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:426
+
uint32 mediump_uint32
Medium qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:123
+
mat< 4, 4, f64, highp > highp_f64mat4
High double-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:582
+
uint8 highp_u8
High qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:91
+
int64 lowp_int64
Low qualifier 64 bit signed integer type.
Definition: fwd.hpp:78
+
vec< 2, i32, defaultp > i32vec2
32 bit signed integer vector of 2 components type.
Definition: fwd.hpp:278
+
mat< 2, 2, f64, highp > highp_f64mat2
High double-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:580
+
uint16 lowp_uint16_t
Low qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:112
+
mat< 3, 3, f32, highp > highp_fmat3
High single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:533
+
vec< 2, float, highp > highp_fvec2
High Single-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:437
+
uint8 lowp_u8
Low qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:89
+
vec< 3, u32, lowp > lowp_u32vec3
Low qualifier 32 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:366
+
vec< 1, u64, lowp > lowp_u64vec1
Low qualifier 64 bit unsigned integer scalar type.
Definition: fwd.hpp:384
+
int64 highp_int64_t
High qualifier 64 bit signed integer type.
Definition: fwd.hpp:84
+
mat< 2, 2, f64, lowp > lowp_f64mat2
Low double-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:572
+
vec< 1, f64, lowp > lowp_f64vec1
Low double-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:486
+
uint32 highp_uint32_t
High qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:128
+
mat< 2, 4, f64, mediump > mediump_f64mat2x4
Medium double-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:762
+
mat< 3, 3, f32, defaultp > fmat3x3
Single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:664
+
mat< 2, 3, f32, mediump > mediump_f32mat2x3
Medium single-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:681
+
uint64 mediump_uint64
Medium qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:137
+
int32 mediump_i32
Medium qualifier 32 bit signed integer type.
Definition: fwd.hpp:60
+
vec< 1, i64, defaultp > i64vec1
64 bit signed integer scalar type.
Definition: fwd.hpp:297
+
mat< 4, 4, f32, highp > highp_f32mat4x4
High single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:698
+
float lowp_f32
Low 32 bit single-qualifier floating-point scalar.
Definition: fwd.hpp:147
+
mat< 3, 2, f32, lowp > lowp_f32mat3x2
Low single-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:673
+
mat< 2, 2, f64, defaultp > f64mat2
Double-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:584
+
mat< 2, 2, f32, highp > highp_fmat2
High single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:532
+
vec< 2, f64, mediump > mediump_f64vec2
Medium double-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:492
+
mat< 4, 4, f32, mediump > mediump_fmat4
Medium single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:530
+
vec< 1, u32, defaultp > u32vec1
Default qualifier 32 bit unsigned integer scalar type.
Definition: fwd.hpp:379
+
vec< 1, f32, highp > highp_f32vec1
High single-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:456
+
uint16 lowp_uint16
Low qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:108
+
double highp_float64
High 64 bit double-qualifier floating-point scalar.
Definition: fwd.hpp:170
+
uint8 highp_uint8_t
High qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:100
+
int8 highp_i8
High qualifier 8 bit signed integer type.
Definition: fwd.hpp:33
+
mat< 2, 2, f32, lowp > lowp_f32mat2x2
Low single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:670
+
float mediump_float32_t
Medium 32 bit single-qualifier floating-point scalar.
Definition: fwd.hpp:158
+
mat< 3, 2, f32, defaultp > fmat3x2
Single-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:661
+
int16 highp_int16
High qualifier 16 bit signed integer type.
Definition: fwd.hpp:52
+
int16 highp_i16
High qualifier 16 bit signed integer type.
Definition: fwd.hpp:47
+
float f32
Default 32 bit single-qualifier floating-point scalar.
Definition: fwd.hpp:150
+
vec< 2, i8, defaultp > i8vec2
8 bit signed integer vector of 2 components type.
Definition: fwd.hpp:238
+
mat< 3, 3, f32, mediump > mediump_f32mat3
Medium single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:545
+
mat< 4, 3, f32, defaultp > fmat4x3
Single-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:665
+
mat< 2, 4, f32, lowp > lowp_fmat2x4
Low single-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:632
+
uint8 u8
Default qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:92
+
vec< 3, u8, mediump > mediump_u8vec3
Medium qualifier 8 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:331
+
mat< 3, 2, f32, defaultp > f32mat3x2
Single-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:701
+
uint32 lowp_uint32_t
Low qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:126
+
double lowp_f64
Low 64 bit double-qualifier floating-point scalar.
Definition: fwd.hpp:163
+
vec< 4, f32, defaultp > f32vec4
Single-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:464
+
vec< 4, u16, mediump > mediump_u16vec4
Medium qualifier 16 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:352
+
vec< 3, float, lowp > lowp_fvec3
Low single-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:428
+
uint64 mediump_u64
Medium qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:132
+
vec< 1, i16, lowp > lowp_i16vec1
Low qualifier 16 bit signed integer scalar type.
Definition: fwd.hpp:242
+
mat< 3, 4, f32, mediump > mediump_fmat3x4
Medium single-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:645
+
vec< 3, u32, mediump > mediump_u32vec3
Medium qualifier 32 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:371
+
double mediump_float64_t
Medium 64 bit double-qualifier floating-point scalar.
Definition: fwd.hpp:174
+
mat< 3, 3, f32, highp > highp_f32mat3x3
High single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:694
+
int16 i16
16 bit signed integer type.
Definition: fwd.hpp:48
+
mat< 3, 3, f32, mediump > mediump_fmat3x3
Medium single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:644
+
vec< 2, u8, defaultp > u8vec2
Default qualifier 8 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:340
+
double mediump_f64
Medium 64 bit double-qualifier floating-point scalar.
Definition: fwd.hpp:164
+
vec< 2, i64, highp > highp_i64vec2
High qualifier 64 bit signed integer vector of 2 components type.
Definition: fwd.hpp:293
+
vec< 4, i16, lowp > lowp_i16vec4
Low qualifier 16 bit signed integer vector of 4 components type.
Definition: fwd.hpp:245
+
vec< 1, u16, highp > highp_u16vec1
High qualifier 16 bit unsigned integer scalar type.
Definition: fwd.hpp:354
+
mat< 3, 3, f64, defaultp > f64mat3
Double-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:585
+
int16 highp_int16_t
High qualifier 16 bit signed integer type.
Definition: fwd.hpp:56
+
vec< 4, i8, highp > highp_i8vec4
High qualifier 8 bit signed integer vector of 4 components type.
Definition: fwd.hpp:235
+
vec< 4, f64, lowp > lowp_f64vec4
Low double-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:489
+
uint64 highp_uint64
High qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:138
+
vec< 2, u32, highp > highp_u32vec2
High qualifier 32 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:375
+
qua< f32, highp > highp_f32quat
High single-qualifier floating-point quaternion.
Definition: fwd.hpp:804
+
vec< 2, i16, defaultp > i16vec2
16 bit signed integer vector of 2 components type.
Definition: fwd.hpp:258
+
mat< 2, 2, f64, lowp > lowp_f64mat2x2
Low double-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:750
+
vec< 4, u8, mediump > mediump_u8vec4
Medium qualifier 8 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:332
+
vec< 4, float, lowp > lowp_fvec4
Low single-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:429
+
mat< 4, 2, f64, lowp > lowp_f64mat4x2
Low double-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:756
+
mat< 3, 4, f32, highp > highp_f32mat3x4
High single-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:695
+
uint8 highp_uint8
High qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:96
+
uint64 lowp_uint64_t
Low qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:140
+
int32 highp_int32
High qualifier 32 bit signed integer type.
Definition: fwd.hpp:66
+
mat< 2, 3, f32, lowp > lowp_fmat2x3
Low single-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:631
+
mat< 4, 4, f32, defaultp > f32mat4x4
Single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:708
+
vec< 1, i32, defaultp > i32vec1
32 bit signed integer scalar type.
Definition: fwd.hpp:277
+
uint16 mediump_u16
Medium qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:104
+
int32 mediump_int32_t
Medium qualifier 32 bit signed integer type.
Definition: fwd.hpp:69
+
vec< 4, u64, lowp > lowp_u64vec4
Low qualifier 64 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:387
+
qua< f64, highp > highp_f64quat
High double-qualifier floating-point quaternion.
Definition: fwd.hpp:814
+
mat< 3, 2, f64, mediump > mediump_f64mat3x2
Medium double-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:763
+
int8 highp_int8
High qualifier 8 bit signed integer type.
Definition: fwd.hpp:38
+
vec< 3, i64, defaultp > i64vec3
64 bit signed integer vector of 3 components type.
Definition: fwd.hpp:299
+
vec< 3, f64, highp > highp_f64vec3
High double-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:498
+
vec< 1, f32, lowp > lowp_f32vec1
Low single-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:446
+
vec< 3, u32, defaultp > u32vec3
Default qualifier 32 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:381
+
mat< 2, 3, f64, lowp > lowp_f64mat2x3
Low double-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:751
+
mat< 4, 3, f64, defaultp > f64mat4x3
Double-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:785
+
mat< 4, 3, f32, defaultp > f32mat4x3
Single-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:705
+
vec< 2, f32, defaultp > f32vec2
Single-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:462
+
mat< 4, 4, f32, mediump > mediump_f32mat4
Medium single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:546
+
mat< 3, 4, f64, highp > highp_f64mat3x4
High double-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:775
+
mat< 2, 2, f32, highp > highp_fmat2x2
High single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:650
+
mat< 4, 2, f32, mediump > mediump_fmat4x2
Medium single-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:646
+
mat< 3, 3, f64, highp > highp_f64mat3x3
High double-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:774
+
mat< 4, 4, f32, mediump > mediump_f32mat4x4
Medium single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:688
+
uint64 highp_u64
High qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:133
+
float highp_f32
High 32 bit single-qualifier floating-point scalar.
Definition: fwd.hpp:149
+
vec< 4, i64, lowp > lowp_i64vec4
Low qualifier 64 bit signed integer vector of 4 components type.
Definition: fwd.hpp:285
+
mat< 4, 2, f64, defaultp > f64mat4x2
Double-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:782
+
mat< 2, 3, f32, defaultp > fmat2x3
Single-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:663
+
double highp_float64_t
High 64 bit double-qualifier floating-point scalar.
Definition: fwd.hpp:175
+
uint64 lowp_uint64
Low qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:136
+
vec< 2, float, mediump > mediump_fvec2
Medium Single-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:432
+
mat< 4, 2, f32, highp > highp_fmat4x2
High single-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:656
+
mat< 3, 2, f64, highp > highp_f64mat3x2
High double-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:773
+
uint64 highp_uint64_t
High qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:142
+
vec< 4, u32, defaultp > u32vec4
Default qualifier 32 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:382
+
mat< 4, 4, f32, lowp > lowp_fmat4
Low single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:526
+
float float32
Single precision floating-point numbers.
+
mat< 2, 2, f32, defaultp > fmat2x2
Single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:660
+
float mediump_f32
Medium 32 bit single-qualifier floating-point scalar.
Definition: fwd.hpp:148
+
qua< f32, defaultp > f32quat
Single-qualifier floating-point quaternion.
Definition: fwd.hpp:805
+
vec< 4, f64, defaultp > f64vec4
Double-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:504
+
int8 lowp_i8
Low qualifier 8 bit signed integer type.
Definition: fwd.hpp:31
+
mat< 2, 3, f64, defaultp > f64mat2x3
Double-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:783
+
mat< 4, 4, f64, mediump > mediump_f64mat4x4
Medium double-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:768
+
vec< 1, f64, highp > highp_f64vec1
High double-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:496
+
float lowp_float32
Low 32 bit single-qualifier floating-point scalar.
Definition: fwd.hpp:152
+
mat< 2, 2, f32, defaultp > fmat2
Single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:536
+
vec< 3, u64, defaultp > u64vec3
Default qualifier 64 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:401
+
mat< 3, 3, f64, defaultp > f64mat3x3
Double-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:784
+
vec< 2, u64, mediump > mediump_u64vec2
Medium qualifier 64 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:390
+
vec< 2, f32, highp > highp_f32vec2
High single-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:457
+
mat< 4, 2, f32, defaultp > f32mat4x2
Single-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:702
+
vec< 4, f32, lowp > lowp_f32vec4
Low single-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:449
+
int64 mediump_int64_t
Medium qualifier 64 bit signed integer type.
Definition: fwd.hpp:83
+
vec< 3, u16, highp > highp_u16vec3
High qualifier 16 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:356
+
mat< 4, 4, f32, lowp > lowp_f32mat4x4
Low single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:678
+
vec< 1, u64, highp > highp_u64vec1
High qualifier 64 bit unsigned integer scalar type.
Definition: fwd.hpp:394
+
mat< 2, 2, f32, highp > highp_f32mat2x2
High single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:690
+
vec< 2, u64, lowp > lowp_u64vec2
Low qualifier 64 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:385
+
mat< 3, 4, f32, highp > highp_fmat3x4
High single-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:655
+
qua< f32, lowp > lowp_f32quat
Low single-qualifier floating-point quaternion.
Definition: fwd.hpp:802
+
int64 mediump_i64
Medium qualifier 64 bit signed integer type.
Definition: fwd.hpp:74
+
mat< 3, 2, f32, highp > highp_f32mat3x2
High single-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:693
+
int8 lowp_int8
Low qualifier 8 bit signed integer type.
Definition: fwd.hpp:36
+
uint8 lowp_uint8
Low qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:94
+
vec< 4, u64, defaultp > u64vec4
Default qualifier 64 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:402
+
vec< 4, u32, lowp > lowp_u32vec4
Low qualifier 32 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:367
+
uint32 highp_uint32
High qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:124
+
vec< 4, u64, highp > highp_u64vec4
High qualifier 64 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:397
+
mat< 2, 2, f64, mediump > mediump_f64mat2
Medium double-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:576
+
vec< 2, u16, lowp > lowp_u16vec2
Low qualifier 16 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:345
+
uint16 highp_u16
High qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:105
+
vec< 3, u64, highp > highp_u64vec3
High qualifier 64 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:396
+
vec< 4, i8, defaultp > i8vec4
8 bit signed integer vector of 4 components type.
Definition: fwd.hpp:240
+
int64 lowp_i64
Low qualifier 64 bit signed integer type.
Definition: fwd.hpp:73
+
int16 mediump_i16
Medium qualifier 16 bit signed integer type.
Definition: fwd.hpp:46
+
vec< 3, u16, lowp > lowp_u16vec3
Low qualifier 16 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:346
+
vec< 2, i8, mediump > mediump_i8vec2
Medium qualifier 8 bit signed integer vector of 2 components type.
Definition: fwd.hpp:228
+
vec< 1, i64, highp > highp_i64vec1
High qualifier 64 bit signed integer scalar type.
Definition: fwd.hpp:292
+
int8 mediump_int8_t
Medium qualifier 8 bit signed integer type.
Definition: fwd.hpp:41
+
uint16 highp_uint16
High qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:110
+
int32 lowp_int32
Low qualifier 32 bit signed integer type.
Definition: fwd.hpp:64
+
mat< 4, 4, f32, highp > highp_fmat4
High single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:534
+
double lowp_float64_t
Low 64 bit double-qualifier floating-point scalar.
Definition: fwd.hpp:173
+
mat< 4, 3, f64, mediump > mediump_f64mat4x3
Medium double-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:767
+
mat< 4, 3, f32, mediump > mediump_f32mat4x3
Medium single-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:687
+
mat< 2, 3, f64, mediump > mediump_f64mat2x3
Medium double-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:761
+
vec< 1, i8, mediump > mediump_i8vec1
Medium qualifier 8 bit signed integer scalar type.
Definition: fwd.hpp:227
+
vec< 2, u16, highp > highp_u16vec2
High qualifier 16 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:355
+
float highp_float32_t
High 32 bit single-qualifier floating-point scalar.
Definition: fwd.hpp:159
+
detail::uint64 uint64
64 bit unsigned integer type.
+
mat< 2, 3, f64, highp > highp_f64mat2x3
High double-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:771
+
mat< 4, 2, f64, mediump > mediump_f64mat4x2
Medium double-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:766
+
vec< 1, u32, highp > highp_u32vec1
High qualifier 32 bit unsigned integer scalar type.
Definition: fwd.hpp:374
+
vec< 3, i8, mediump > mediump_i8vec3
Medium qualifier 8 bit signed integer vector of 3 components type.
Definition: fwd.hpp:229
+
mat< 3, 3, f32, defaultp > f32mat3x3
Single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:704
+
vec< 4, i8, mediump > mediump_i8vec4
Medium qualifier 8 bit signed integer vector of 4 components type.
Definition: fwd.hpp:230
+
vec< 2, float, lowp > lowp_fvec2
Low single-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:427
+
vec< 1, i8, defaultp > i8vec1
8 bit signed integer scalar type.
Definition: fwd.hpp:237
+
mat< 4, 3, f64, lowp > lowp_f64mat4x3
Low double-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:757
+
vec< 3, f32, defaultp > fvec3
Single-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:443
+
mat< 2, 2, f32, defaultp > f32mat2
Single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:552
+
vec< 2, u16, mediump > mediump_u16vec2
Medium qualifier 16 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:350
+
mat< 4, 4, f64, lowp > lowp_f64mat4x4
Low double-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:758
+
vec< 2, u8, lowp > lowp_u8vec2
Low qualifier 8 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:325
+
mat< 3, 3, f64, mediump > mediump_f64mat3
Medium double-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:577
+
float float32_t
Default 32 bit single-qualifier floating-point scalar.
Definition: fwd.hpp:160
+
mat< 4, 2, f32, defaultp > fmat4x2
Single-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:662
+
vec< 4, u16, defaultp > u16vec4
Default qualifier 16 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:362
+
uint32 uint32_t
Default qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:129
+
vec< 3, u8, highp > highp_u8vec3
High qualifier 8 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:336
+
vec< 3, float, highp > highp_fvec3
High Single-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:438
+
vec< 3, i32, highp > highp_i32vec3
High qualifier 32 bit signed integer vector of 3 components type.
Definition: fwd.hpp:274
+
vec< 1, i64, mediump > mediump_i64vec1
Medium qualifier 64 bit signed integer scalar type.
Definition: fwd.hpp:287
+
mat< 2, 4, f64, defaultp > f64mat2x4
Double-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:786
+
vec< 1, u8, lowp > lowp_u8vec1
Low qualifier 8 bit unsigned integer scalar type.
Definition: fwd.hpp:324
+
int64 int64_t
64 bit signed integer type.
Definition: fwd.hpp:85
+
vec< 1, i64, lowp > lowp_i64vec1
Low qualifier 64 bit signed integer scalar type.
Definition: fwd.hpp:282
+
vec< 2, i8, lowp > lowp_i8vec2
Low qualifier 8 bit signed integer vector of 2 components type.
Definition: fwd.hpp:223
+
int16 mediump_int16
Medium qualifier 16 bit signed integer type.
Definition: fwd.hpp:51
+
mat< 3, 3, f32, highp > highp_fmat3x3
High single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:654
+
uint64 lowp_u64
Low qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:131
+
mat< 4, 4, f32, defaultp > fmat4x4
Single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:668
+
vec< 3, f32, highp > highp_f32vec3
High single-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:458
+
int8 i8
8 bit signed integer type.
Definition: fwd.hpp:34
+
uint64 mediump_uint64_t
Medium qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:141
+
uint16 mediump_uint16
Medium qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:109
+
mat< 2, 2, f32, mediump > mediump_f32mat2
Medium single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:544
+
mat< 2, 4, f32, defaultp > f32mat2x4
Single-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:706
+
vec< 4, float, mediump > mediump_fvec4
Medium Single-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:434
+
uint8 mediump_uint8_t
Medium qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:99
+
int16 lowp_i16
Low qualifier 16 bit signed integer type.
Definition: fwd.hpp:45
+
int32 i32
32 bit signed integer type.
Definition: fwd.hpp:62
+
mat< 3, 2, f32, highp > highp_fmat3x2
High single-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:653
+
vec< 1, u32, lowp > lowp_u32vec1
Low qualifier 32 bit unsigned integer scalar type.
Definition: fwd.hpp:364
+
uint8 uint8_t
Default qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:101
+
mat< 3, 3, f32, lowp > lowp_fmat3x3
Low single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:634
+
vec< 4, float, highp > highp_fvec4
High Single-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:439
+
vec< 1, f32, mediump > mediump_f32vec1
Medium single-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:451
+
vec< 2, f64, lowp > lowp_f64vec2
Low double-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:487
+
mat< 3, 2, f64, defaultp > f64mat3x2
Double-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:781
+
int16 mediump_int16_t
Medium qualifier 16 bit signed integer type.
Definition: fwd.hpp:55
+
mat< 2, 2, f64, mediump > mediump_f64mat2x2
Medium double-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:760
+
int32 highp_i32
High qualifier 32 bit signed integer type.
Definition: fwd.hpp:61
+
vec< 4, f64, mediump > mediump_f64vec4
Medium double-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:494
+
int64 highp_int64
High qualifier 64 bit signed integer type.
Definition: fwd.hpp:80
+
float lowp_float32_t
Low 32 bit single-qualifier floating-point scalar.
Definition: fwd.hpp:157
+
mat< 2, 4, f32, mediump > mediump_fmat2x4
Medium single-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:642
+
mat< 4, 4, f64, lowp > lowp_f64mat4
Low double-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:574
+
mat< 4, 4, f32, highp > highp_fmat4x4
High single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:658
+
vec< 4, i32, highp > highp_i32vec4
High qualifier 32 bit signed integer vector of 4 components type.
Definition: fwd.hpp:275
+
uint32 mediump_u32
Medium qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:118
+
uint8 mediump_u8
Medium qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:90
+
vec< 3, i16, highp > highp_i16vec3
High qualifier 16 bit signed integer vector of 3 components type.
Definition: fwd.hpp:254
+
vec< 4, i32, lowp > lowp_i32vec4
Low qualifier 32 bit signed integer vector of 4 components type.
Definition: fwd.hpp:265
+
double highp_f64
High 64 bit double-qualifier floating-point scalar.
Definition: fwd.hpp:165
+
mat< 4, 4, f32, mediump > mediump_fmat4x4
Medium single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:648
+
vec< 2, i64, lowp > lowp_i64vec2
Low qualifier 64 bit signed integer vector of 2 components type.
Definition: fwd.hpp:283
+
mat< 4, 3, f32, lowp > lowp_fmat4x3
Low single-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:637
+
qua< f32, mediump > mediump_f32quat
Medium single-qualifier floating-point quaternion.
Definition: fwd.hpp:803
+
mat< 4, 3, f32, mediump > mediump_fmat4x3
Medium single-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:647
+
vec< 1, u8, mediump > mediump_u8vec1
Medium qualifier 8 bit unsigned integer scalar type.
Definition: fwd.hpp:329
+
mat< 2, 4, f32, highp > highp_fmat2x4
High single-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:652
+
vec< 3, u64, mediump > mediump_u64vec3
Medium qualifier 64 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:391
+
vec< 1, u64, defaultp > u64vec1
Default qualifier 64 bit unsigned integer scalar type.
Definition: fwd.hpp:399
+
vec< 1, f64, mediump > mediump_f64vec1
Medium double-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:491
+
vec< 2, f32, defaultp > fvec2
Single-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:442
+
mat< 3, 3, f64, lowp > lowp_f64mat3
Low double-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:573
+
mat< 4, 4, f32, lowp > lowp_f32mat4
Low single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:542
+
vec< 1, i32, highp > highp_i32vec1
High qualifier 32 bit signed integer scalar type.
Definition: fwd.hpp:272
+
mat< 2, 4, f64, highp > highp_f64mat2x4
High double-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:772
+
vec< 1, u8, highp > highp_u8vec1
High qualifier 8 bit unsigned integer scalar type.
Definition: fwd.hpp:334
+
vec< 3, u64, lowp > lowp_u64vec3
Low qualifier 64 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:386
+
qua< f64, lowp > lowp_f64quat
Low double-qualifier floating-point quaternion.
Definition: fwd.hpp:812
+
detail::int64 int64
64 bit signed integer type.
+
mat< 3, 4, f32, defaultp > fmat3x4
Single-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:667
+
mat< 3, 4, f32, lowp > lowp_f32mat3x4
Low single-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:675
+
int32 mediump_int32
Medium qualifier 32 bit signed integer type.
Definition: fwd.hpp:65
+
uint16 lowp_u16
Low qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:103
+
vec< 4, i64, highp > highp_i64vec4
High qualifier 64 bit signed integer vector of 4 components type.
Definition: fwd.hpp:295
+
vec< 2, i64, mediump > mediump_i64vec2
Medium qualifier 64 bit signed integer vector of 2 components type.
Definition: fwd.hpp:288
+
uint16 mediump_uint16_t
Medium qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:113
+
vec< 3, u8, defaultp > u8vec3
Default qualifier 8 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:341
+
vec< 4, u64, mediump > mediump_u64vec4
Medium qualifier 64 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:392
+
vec< 3, f32, defaultp > f32vec3
Single-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:463
+
vec< 1, i32, lowp > lowp_i32vec1
Low qualifier 32 bit signed integer scalar type.
Definition: fwd.hpp:262
+
vec< 2, i16, highp > highp_i16vec2
High qualifier 16 bit signed integer vector of 2 components type.
Definition: fwd.hpp:253
+
vec< 4, i16, mediump > mediump_i16vec4
Medium qualifier 16 bit signed integer vector of 4 components type.
Definition: fwd.hpp:250
+
int8 int8_t
8 bit signed integer type.
Definition: fwd.hpp:43
+
vec< 4, i64, defaultp > i64vec4
64 bit signed integer vector of 4 components type.
Definition: fwd.hpp:300
+
vec< 1, f32, defaultp > fvec1
Single-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:441
+
vec< 3, i32, lowp > lowp_i32vec3
Low qualifier 32 bit signed integer vector of 3 components type.
Definition: fwd.hpp:264
+
mat< 3, 2, f32, lowp > lowp_fmat3x2
Low single-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:633
+
vec< 4, f32, mediump > mediump_f32vec4
Medium single-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:454
+
vec< 2, i32, highp > highp_i32vec2
High qualifier 32 bit signed integer vector of 2 components type.
Definition: fwd.hpp:273
+
mat< 3, 3, f64, highp > highp_f64mat3
High double-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:581
+
vec< 1, u8, defaultp > u8vec1
Default qualifier 8 bit unsigned integer scalar type.
Definition: fwd.hpp:339
+
mat< 4, 4, f32, defaultp > fmat4
Single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:538
+
vec< 2, u32, defaultp > u32vec2
Default qualifier 32 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:380
+
int16 lowp_int16_t
Low qualifier 16 bit signed integer type.
Definition: fwd.hpp:54
+
mat< 2, 4, f32, mediump > mediump_f32mat2x4
Medium single-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:682
+
mat< 3, 4, f32, defaultp > f32mat3x4
Single-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:707
+
mat< 4, 4, f64, mediump > mediump_f64mat4
Medium double-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:578
+
vec< 1, u16, lowp > lowp_u16vec1
Low qualifier 16 bit unsigned integer scalar type.
Definition: fwd.hpp:344
+
vec< 3, i8, defaultp > i8vec3
8 bit signed integer vector of 3 components type.
Definition: fwd.hpp:239
+
qua< f64, mediump > mediump_f64quat
Medium double-qualifier floating-point quaternion.
Definition: fwd.hpp:813
+
vec< 3, f32, lowp > lowp_f32vec3
Low single-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:448
+
mat< 3, 3, f64, lowp > lowp_f64mat3x3
Low double-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:754
+
int16 lowp_int16
Low qualifier 16 bit signed integer type.
Definition: fwd.hpp:50
+
vec< 3, f64, defaultp > f64vec3
Double-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:503
+
uint64 uint64_t
Default qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:143
+
double lowp_float64
Low 64 bit double-qualifier floating-point scalar.
Definition: fwd.hpp:168
+
mat< 2, 2, f32, mediump > mediump_fmat2
Medium single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:528
+
vec< 3, f32, mediump > mediump_f32vec3
Medium single-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:453
+
mat< 3, 3, f32, defaultp > f32mat3
Single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:553
+
vec< 3, f64, mediump > mediump_f64vec3
Medium double-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:493
+
mat< 2, 3, f32, highp > highp_f32mat2x3
High single-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:691
+
vec< 1, u16, defaultp > u16vec1
Default qualifier 16 bit unsigned integer scalar type.
Definition: fwd.hpp:359
+
mat< 2, 2, f32, highp > highp_f32mat2
High single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:548
+
vec< 1, f32, defaultp > f32vec1
Single-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:461
+
int32 lowp_int32_t
Low qualifier 32 bit signed integer type.
Definition: fwd.hpp:68
+
mat< 3, 4, f32, lowp > lowp_fmat3x4
Low single-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:635
+
mat< 2, 2, f64, defaultp > f64mat2x2
Double-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:780
+
vec< 2, u32, mediump > mediump_u32vec2
Medium qualifier 32 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:370
+
mat< 2, 4, f64, lowp > lowp_f64mat2x4
Low double-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:752
+
mat< 4, 2, f32, lowp > lowp_f32mat4x2
Low single-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:676
+
vec< 2, u8, mediump > mediump_u8vec2
Medium qualifier 8 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:330
+
vec< 2, f64, highp > highp_f64vec2
High double-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:497
+
vec< 2, u64, defaultp > u64vec2
Default qualifier 64 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:400
+
vec< 4, u16, highp > highp_u16vec4
High qualifier 16 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:357
+
vec< 1, float, highp > highp_fvec1
High single-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:436
+
uint32 highp_u32
High qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:119
+
Definition: common.hpp:20
+
vec< 1, u16, mediump > mediump_u16vec1
Medium qualifier 16 bit unsigned integer scalar type.
Definition: fwd.hpp:349
+
mat< 4, 4, f64, defaultp > f64mat4
Double-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:586
+
vec< 2, i32, lowp > lowp_i32vec2
Low qualifier 32 bit signed integer vector of 2 components type.
Definition: fwd.hpp:263
+
vec< 4, u8, defaultp > u8vec4
Default qualifier 8 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:342
+
uint16 uint16_t
Default qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:115
+
float mediump_float32
Medium 32 bit single-qualifier floating-point scalar.
Definition: fwd.hpp:153
+
vec< 3, i32, defaultp > i32vec3
32 bit signed integer vector of 3 components type.
Definition: fwd.hpp:279
+
vec< 1, i8, highp > highp_i8vec1
High qualifier 8 bit signed integer scalar type.
Definition: fwd.hpp:232
+
mat< 2, 2, f32, lowp > lowp_fmat2
Low single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:524
+
vec< 2, u32, lowp > lowp_u32vec2
Low qualifier 32 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:365
+
mat< 4, 3, f32, highp > highp_f32mat4x3
High single-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:697
+
vec< 4, u8, lowp > lowp_u8vec4
Low qualifier 8 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:327
+
mat< 4, 4, f32, highp > highp_f32mat4
High single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:550
+
vec< 1, float, mediump > mediump_fvec1
Medium single-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:431
+
int8 highp_int8_t
High qualifier 8 bit signed integer type.
Definition: fwd.hpp:42
+
mat< 2, 3, f32, mediump > mediump_fmat2x3
Medium single-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:641
+
vec< 3, i16, lowp > lowp_i16vec3
Low qualifier 16 bit signed integer vector of 3 components type.
Definition: fwd.hpp:244
+
vec< 2, i32, mediump > mediump_i32vec2
Medium qualifier 32 bit signed integer vector of 2 components type.
Definition: fwd.hpp:268
+
vec< 3, i16, mediump > mediump_i16vec3
Medium qualifier 16 bit signed integer vector of 3 components type.
Definition: fwd.hpp:249
+
mat< 3, 2, f32, mediump > mediump_fmat3x2
Medium single-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:643
+
vec< 2, u64, highp > highp_u64vec2
High qualifier 64 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:395
+
uint32 lowp_u32
Low qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:117
+
mat< 4, 4, f64, defaultp > f64mat4x4
Double-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:788
+
vec< 3, i64, mediump > mediump_i64vec3
Medium qualifier 64 bit signed integer vector of 3 components type.
Definition: fwd.hpp:289
+
mat< 3, 3, f32, lowp > lowp_f32mat3x3
Low single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:674
+
vec< 3, i64, highp > highp_i64vec3
High qualifier 64 bit signed integer vector of 3 components type.
Definition: fwd.hpp:294
+
uint32 mediump_uint32_t
Medium qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:127
+
uint32 lowp_uint32
Low qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:122
+
mat< 2, 2, f32, defaultp > f32mat2x2
Single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:700
+
int8 mediump_int8
Medium qualifier 8 bit signed integer type.
Definition: fwd.hpp:37
+
mat< 3, 2, f64, lowp > lowp_f64mat3x2
Low double-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:753
+
vec< 4, u32, mediump > mediump_u32vec4
Medium qualifier 32 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:372
+
mat< 4, 2, f64, highp > highp_f64mat4x2
High double-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:776
+
vec< 2, u16, defaultp > u16vec2
Default qualifier 16 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:360
+
mat< 2, 2, f32, mediump > mediump_f32mat2x2
High single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:680
+
mat< 3, 3, f64, mediump > mediump_f64mat3x3
Medium double-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:764
+
vec< 1, i16, mediump > mediump_i16vec1
Medium qualifier 16 bit signed integer scalar type.
Definition: fwd.hpp:247
+
vec< 3, u16, mediump > mediump_u16vec3
Medium qualifier 16 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:351
+
mat< 3, 4, f64, defaultp > f64mat3x4
Double-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:787
+
vec< 2, u8, highp > highp_u8vec2
High qualifier 8 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:335
+
vec< 4, i32, defaultp > i32vec4
32 bit signed integer vector of 4 components type.
Definition: fwd.hpp:280
+
float highp_float32
High 32 bit single-qualifier floating-point scalar.
Definition: fwd.hpp:154
+
vec< 2, i16, lowp > lowp_i16vec2
Low qualifier 16 bit signed integer vector of 2 components type.
Definition: fwd.hpp:243
+
vec< 3, f64, lowp > lowp_f64vec3
Low double-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:488
+
int64 highp_i64
High qualifier 64 bit signed integer type.
Definition: fwd.hpp:75
+
mat< 3, 2, f32, mediump > mediump_f32mat3x2
Medium single-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:683
+
uint16 u16
Default qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:106
+
+ + + + diff --git a/common/glm/doc/api/a00437.html b/common/glm/doc/api/a00437.html new file mode 100644 index 000000000..99ec49d48 --- /dev/null +++ b/common/glm/doc/api/a00437.html @@ -0,0 +1,195 @@ + + + + + + + +0.9.9 API documenation: type_ptr.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
type_ptr.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T >
GLM_FUNC_DECL mat< 2, 2, T, defaultp > make_mat2 (T const *const ptr)
 
template<typename T >
GLM_FUNC_DECL mat< 2, 2, T, defaultp > make_mat2x2 (T const *const ptr)
 
template<typename T >
GLM_FUNC_DECL mat< 2, 3, T, defaultp > make_mat2x3 (T const *const ptr)
 
template<typename T >
GLM_FUNC_DECL mat< 2, 4, T, defaultp > make_mat2x4 (T const *const ptr)
 
template<typename T >
GLM_FUNC_DECL mat< 3, 3, T, defaultp > make_mat3 (T const *const ptr)
 
template<typename T >
GLM_FUNC_DECL mat< 3, 2, T, defaultp > make_mat3x2 (T const *const ptr)
 
template<typename T >
GLM_FUNC_DECL mat< 3, 3, T, defaultp > make_mat3x3 (T const *const ptr)
 
template<typename T >
GLM_FUNC_DECL mat< 3, 4, T, defaultp > make_mat3x4 (T const *const ptr)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > make_mat4 (T const *const ptr)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 2, T, defaultp > make_mat4x2 (T const *const ptr)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 3, T, defaultp > make_mat4x3 (T const *const ptr)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > make_mat4x4 (T const *const ptr)
 
template<typename T >
GLM_FUNC_DECL qua< T, defaultp > make_quat (T const *const ptr)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 1, T, Q > make_vec1 (vec< 1, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 1, T, Q > make_vec1 (vec< 2, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 1, T, Q > make_vec1 (vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 1, T, Q > make_vec1 (vec< 4, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 2, T, Q > make_vec2 (vec< 1, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 2, T, Q > make_vec2 (vec< 2, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 2, T, Q > make_vec2 (vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 2, T, Q > make_vec2 (vec< 4, T, Q > const &v)
 
template<typename T >
GLM_FUNC_DECL vec< 2, T, defaultp > make_vec2 (T const *const ptr)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > make_vec3 (vec< 1, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > make_vec3 (vec< 2, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > make_vec3 (vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > make_vec3 (vec< 4, T, Q > const &v)
 
template<typename T >
GLM_FUNC_DECL vec< 3, T, defaultp > make_vec3 (T const *const ptr)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > make_vec4 (vec< 1, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > make_vec4 (vec< 2, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > make_vec4 (vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > make_vec4 (vec< 4, T, Q > const &v)
 
template<typename T >
GLM_FUNC_DECL vec< 4, T, defaultp > make_vec4 (T const *const ptr)
 
template<typename genType >
GLM_FUNC_DECL genType::value_type const * value_ptr (genType const &v)
 
+

Detailed Description

+

GLM_GTC_type_ptr

+
See also
Core features (dependence)
+
+GLM_GTC_quaternion (dependence)
+ +

Definition in file type_ptr.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00437_source.html b/common/glm/doc/api/a00437_source.html new file mode 100644 index 000000000..2febf2693 --- /dev/null +++ b/common/glm/doc/api/a00437_source.html @@ -0,0 +1,100 @@ + + + + + + + +0.9.9 API documenation: type_ptr.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_ptr.hpp
+
+
+Go to the documentation of this file.
1 
34 #pragma once
35 
36 // Dependency:
37 #include "../gtc/quaternion.hpp"
38 #include "../gtc/vec1.hpp"
39 #include "../vec2.hpp"
40 #include "../vec3.hpp"
41 #include "../vec4.hpp"
42 #include "../mat2x2.hpp"
43 #include "../mat2x3.hpp"
44 #include "../mat2x4.hpp"
45 #include "../mat3x2.hpp"
46 #include "../mat3x3.hpp"
47 #include "../mat3x4.hpp"
48 #include "../mat4x2.hpp"
49 #include "../mat4x3.hpp"
50 #include "../mat4x4.hpp"
51 #include <cstring>
52 
53 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
54 # pragma message("GLM: GLM_GTC_type_ptr extension included")
55 #endif
56 
57 namespace glm
58 {
61 
64  template<typename genType>
65  GLM_FUNC_DECL typename genType::value_type const * value_ptr(genType const& v);
66 
69  template <typename T, qualifier Q>
70  GLM_FUNC_DECL vec<1, T, Q> make_vec1(vec<1, T, Q> const& v);
71 
74  template <typename T, qualifier Q>
75  GLM_FUNC_DECL vec<1, T, Q> make_vec1(vec<2, T, Q> const& v);
76 
79  template <typename T, qualifier Q>
80  GLM_FUNC_DECL vec<1, T, Q> make_vec1(vec<3, T, Q> const& v);
81 
84  template <typename T, qualifier Q>
85  GLM_FUNC_DECL vec<1, T, Q> make_vec1(vec<4, T, Q> const& v);
86 
89  template <typename T, qualifier Q>
90  GLM_FUNC_DECL vec<2, T, Q> make_vec2(vec<1, T, Q> const& v);
91 
94  template <typename T, qualifier Q>
95  GLM_FUNC_DECL vec<2, T, Q> make_vec2(vec<2, T, Q> const& v);
96 
99  template <typename T, qualifier Q>
100  GLM_FUNC_DECL vec<2, T, Q> make_vec2(vec<3, T, Q> const& v);
101 
104  template <typename T, qualifier Q>
105  GLM_FUNC_DECL vec<2, T, Q> make_vec2(vec<4, T, Q> const& v);
106 
109  template <typename T, qualifier Q>
110  GLM_FUNC_DECL vec<3, T, Q> make_vec3(vec<1, T, Q> const& v);
111 
114  template <typename T, qualifier Q>
115  GLM_FUNC_DECL vec<3, T, Q> make_vec3(vec<2, T, Q> const& v);
116 
119  template <typename T, qualifier Q>
120  GLM_FUNC_DECL vec<3, T, Q> make_vec3(vec<3, T, Q> const& v);
121 
124  template <typename T, qualifier Q>
125  GLM_FUNC_DECL vec<3, T, Q> make_vec3(vec<4, T, Q> const& v);
126 
129  template <typename T, qualifier Q>
130  GLM_FUNC_DECL vec<4, T, Q> make_vec4(vec<1, T, Q> const& v);
131 
134  template <typename T, qualifier Q>
135  GLM_FUNC_DECL vec<4, T, Q> make_vec4(vec<2, T, Q> const& v);
136 
139  template <typename T, qualifier Q>
140  GLM_FUNC_DECL vec<4, T, Q> make_vec4(vec<3, T, Q> const& v);
141 
144  template <typename T, qualifier Q>
145  GLM_FUNC_DECL vec<4, T, Q> make_vec4(vec<4, T, Q> const& v);
146 
149  template<typename T>
150  GLM_FUNC_DECL vec<2, T, defaultp> make_vec2(T const * const ptr);
151 
154  template<typename T>
155  GLM_FUNC_DECL vec<3, T, defaultp> make_vec3(T const * const ptr);
156 
159  template<typename T>
160  GLM_FUNC_DECL vec<4, T, defaultp> make_vec4(T const * const ptr);
161 
164  template<typename T>
165  GLM_FUNC_DECL mat<2, 2, T, defaultp> make_mat2x2(T const * const ptr);
166 
169  template<typename T>
170  GLM_FUNC_DECL mat<2, 3, T, defaultp> make_mat2x3(T const * const ptr);
171 
174  template<typename T>
175  GLM_FUNC_DECL mat<2, 4, T, defaultp> make_mat2x4(T const * const ptr);
176 
179  template<typename T>
180  GLM_FUNC_DECL mat<3, 2, T, defaultp> make_mat3x2(T const * const ptr);
181 
184  template<typename T>
185  GLM_FUNC_DECL mat<3, 3, T, defaultp> make_mat3x3(T const * const ptr);
186 
189  template<typename T>
190  GLM_FUNC_DECL mat<3, 4, T, defaultp> make_mat3x4(T const * const ptr);
191 
194  template<typename T>
195  GLM_FUNC_DECL mat<4, 2, T, defaultp> make_mat4x2(T const * const ptr);
196 
199  template<typename T>
200  GLM_FUNC_DECL mat<4, 3, T, defaultp> make_mat4x3(T const * const ptr);
201 
204  template<typename T>
205  GLM_FUNC_DECL mat<4, 4, T, defaultp> make_mat4x4(T const * const ptr);
206 
209  template<typename T>
210  GLM_FUNC_DECL mat<2, 2, T, defaultp> make_mat2(T const * const ptr);
211 
214  template<typename T>
215  GLM_FUNC_DECL mat<3, 3, T, defaultp> make_mat3(T const * const ptr);
216 
219  template<typename T>
220  GLM_FUNC_DECL mat<4, 4, T, defaultp> make_mat4(T const * const ptr);
221 
224  template<typename T>
225  GLM_FUNC_DECL qua<T, defaultp> make_quat(T const * const ptr);
226 
228 }//namespace glm
229 
230 #include "type_ptr.inl"
GLM_FUNC_DECL mat< 4, 4, T, defaultp > make_mat4x4(T const *const ptr)
Build a matrix from a pointer.
+
GLM_FUNC_DECL genType::value_type const * value_ptr(genType const &v)
Return the constant address to the data of the input parameter.
+
GLM_FUNC_DECL mat< 2, 2, T, defaultp > make_mat2(T const *const ptr)
Build a matrix from a pointer.
+
GLM_FUNC_DECL mat< 3, 3, T, defaultp > make_mat3(T const *const ptr)
Build a matrix from a pointer.
+
GLM_FUNC_DECL mat< 2, 2, T, defaultp > make_mat2x2(T const *const ptr)
Build a matrix from a pointer.
+
GLM_FUNC_DECL vec< 1, T, Q > make_vec1(vec< 4, T, Q > const &v)
Build a vector from a pointer.
+
GLM_FUNC_DECL mat< 2, 4, T, defaultp > make_mat2x4(T const *const ptr)
Build a matrix from a pointer.
+
GLM_FUNC_DECL mat< 3, 4, T, defaultp > make_mat3x4(T const *const ptr)
Build a matrix from a pointer.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > make_mat4(T const *const ptr)
Build a matrix from a pointer.
+
GLM_FUNC_DECL vec< 4, T, defaultp > make_vec4(T const *const ptr)
Build a vector from a pointer.
+
GLM_FUNC_DECL mat< 4, 2, T, defaultp > make_mat4x2(T const *const ptr)
Build a matrix from a pointer.
+
GLM_FUNC_DECL mat< 3, 3, T, defaultp > make_mat3x3(T const *const ptr)
Build a matrix from a pointer.
+
GLM_FUNC_DECL qua< T, defaultp > make_quat(T const *const ptr)
Build a quaternion from a pointer.
+
GLM_FUNC_DECL vec< 2, T, defaultp > make_vec2(T const *const ptr)
Build a vector from a pointer.
+
GLM_FUNC_DECL vec< 3, T, defaultp > make_vec3(T const *const ptr)
Build a vector from a pointer.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL mat< 2, 3, T, defaultp > make_mat2x3(T const *const ptr)
Build a matrix from a pointer.
+
GLM_FUNC_DECL mat< 4, 3, T, defaultp > make_mat4x3(T const *const ptr)
Build a matrix from a pointer.
+
GLM_FUNC_DECL mat< 3, 2, T, defaultp > make_mat3x2(T const *const ptr)
Build a matrix from a pointer.
+
+ + + + diff --git a/common/glm/doc/api/a00440.html b/common/glm/doc/api/a00440.html new file mode 100644 index 000000000..3023bc6a4 --- /dev/null +++ b/common/glm/doc/api/a00440.html @@ -0,0 +1,112 @@ + + + + + + + +0.9.9 API documenation: ulp.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
ulp.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T >
GLM_FUNC_DECL uint float_distance (T const &x, T const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 2, uint, Q > float_distance (vec< 2, T, Q > const &x, vec< 2, T, Q > const &y)
 
template<typename genType >
GLM_FUNC_DECL genType next_float (genType const &x)
 
template<typename genType >
GLM_FUNC_DECL genType next_float (genType const &x, uint const &Distance)
 
template<typename genType >
GLM_FUNC_DECL genType prev_float (genType const &x)
 
template<typename genType >
GLM_FUNC_DECL genType prev_float (genType const &x, uint const &Distance)
 
+

Detailed Description

+

GLM_GTC_ulp

+
See also
Core features (dependence)
+ +

Definition in file ulp.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00440_source.html b/common/glm/doc/api/a00440_source.html new file mode 100644 index 000000000..a7825a9bf --- /dev/null +++ b/common/glm/doc/api/a00440_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: ulp.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ulp.hpp
+
+
+Go to the documentation of this file.
1 
15 #pragma once
16 
17 // Dependencies
18 #include "../gtc/constants.hpp"
19 #include "../ext/vector_relational.hpp"
20 
21 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
22 # pragma message("GLM: GLM_GTC_ulp extension included")
23 #endif
24 
25 namespace glm
26 {
29 
32  template<typename genType>
33  GLM_FUNC_DECL genType next_float(genType const& x);
34 
37  template<typename genType>
38  GLM_FUNC_DECL genType prev_float(genType const& x);
39 
42  template<typename genType>
43  GLM_FUNC_DECL genType next_float(genType const& x, uint const& Distance);
44 
47  template<typename genType>
48  GLM_FUNC_DECL genType prev_float(genType const& x, uint const& Distance);
49 
52  template<typename T>
53  GLM_FUNC_DECL uint float_distance(T const& x, T const& y);
54 
57  template<typename T, qualifier Q>
58  GLM_FUNC_DECL vec<2, uint, Q> float_distance(vec<2, T, Q> const& x, vec<2, T, Q> const& y);
59 
61 }// namespace glm
62 
63 #include "ulp.inl"
GLM_FUNC_DECL vec< 2, uint, Q > float_distance(vec< 2, T, Q > const &x, vec< 2, T, Q > const &y)
Return the distance in the number of ULP between 2 vectors.
+
GLM_FUNC_DECL genType prev_float(genType const &x, uint const &Distance)
Return the value(s) ULP distance before the input value(s).
+
GLM_FUNC_DECL genType next_float(genType const &x, uint const &Distance)
Return the value(s) ULP distance after the input value(s).
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00443.html b/common/glm/doc/api/a00443.html new file mode 100644 index 000000000..d876c903c --- /dev/null +++ b/common/glm/doc/api/a00443.html @@ -0,0 +1,88 @@ + + + + + + + +0.9.9 API documenation: vec1.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vec1.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

GLM_GTC_vec1

+
See also
Core features (dependence)
+ +

Definition in file vec1.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00443_source.html b/common/glm/doc/api/a00443_source.html new file mode 100644 index 000000000..6c626652a --- /dev/null +++ b/common/glm/doc/api/a00443_source.html @@ -0,0 +1,81 @@ + + + + + + + +0.9.9 API documenation: vec1.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vec1.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../ext/vector_bool1.hpp"
17 #include "../ext/vector_bool1_precision.hpp"
18 #include "../ext/vector_float1.hpp"
19 #include "../ext/vector_float1_precision.hpp"
20 #include "../ext/vector_double1.hpp"
21 #include "../ext/vector_double1_precision.hpp"
22 #include "../ext/vector_int1.hpp"
23 #include "../ext/vector_int1_precision.hpp"
24 #include "../ext/vector_uint1.hpp"
25 #include "../ext/vector_uint1_precision.hpp"
26 
27 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
28 # pragma message("GLM: GLM_GTC_vec1 extension included")
29 #endif
30 
+ + + + diff --git a/common/glm/doc/api/a00446.html b/common/glm/doc/api/a00446.html new file mode 100644 index 000000000..047bfc445 --- /dev/null +++ b/common/glm/doc/api/a00446.html @@ -0,0 +1,162 @@ + + + + + + + +0.9.9 API documenation: associated_min_max.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
associated_min_max.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , typename U >
GLM_FUNC_DECL U associatedMax (T x, U a, T y, U b)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< 2, U, Q > associatedMax (vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > associatedMax (T x, vec< L, U, Q > const &a, T y, vec< L, U, Q > const &b)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, U, Q > associatedMax (vec< L, T, Q > const &x, U a, vec< L, T, Q > const &y, U b)
 
template<typename T , typename U >
GLM_FUNC_DECL U associatedMax (T x, U a, T y, U b, T z, U c)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, U, Q > associatedMax (vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b, vec< L, T, Q > const &z, vec< L, U, Q > const &c)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > associatedMax (T x, vec< L, U, Q > const &a, T y, vec< L, U, Q > const &b, T z, vec< L, U, Q > const &c)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, U, Q > associatedMax (vec< L, T, Q > const &x, U a, vec< L, T, Q > const &y, U b, vec< L, T, Q > const &z, U c)
 
template<typename T , typename U >
GLM_FUNC_DECL U associatedMax (T x, U a, T y, U b, T z, U c, T w, U d)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, U, Q > associatedMax (vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b, vec< L, T, Q > const &z, vec< L, U, Q > const &c, vec< L, T, Q > const &w, vec< L, U, Q > const &d)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, U, Q > associatedMax (T x, vec< L, U, Q > const &a, T y, vec< L, U, Q > const &b, T z, vec< L, U, Q > const &c, T w, vec< L, U, Q > const &d)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, U, Q > associatedMax (vec< L, T, Q > const &x, U a, vec< L, T, Q > const &y, U b, vec< L, T, Q > const &z, U c, vec< L, T, Q > const &w, U d)
 
template<typename T , typename U , qualifier Q>
GLM_FUNC_DECL U associatedMin (T x, U a, T y, U b)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< 2, U, Q > associatedMin (vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, U, Q > associatedMin (T x, const vec< L, U, Q > &a, T y, const vec< L, U, Q > &b)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, U, Q > associatedMin (vec< L, T, Q > const &x, U a, vec< L, T, Q > const &y, U b)
 
template<typename T , typename U >
GLM_FUNC_DECL U associatedMin (T x, U a, T y, U b, T z, U c)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, U, Q > associatedMin (vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b, vec< L, T, Q > const &z, vec< L, U, Q > const &c)
 
template<typename T , typename U >
GLM_FUNC_DECL U associatedMin (T x, U a, T y, U b, T z, U c, T w, U d)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, U, Q > associatedMin (vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b, vec< L, T, Q > const &z, vec< L, U, Q > const &c, vec< L, T, Q > const &w, vec< L, U, Q > const &d)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, U, Q > associatedMin (T x, vec< L, U, Q > const &a, T y, vec< L, U, Q > const &b, T z, vec< L, U, Q > const &c, T w, vec< L, U, Q > const &d)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, U, Q > associatedMin (vec< L, T, Q > const &x, U a, vec< L, T, Q > const &y, U b, vec< L, T, Q > const &z, U c, vec< L, T, Q > const &w, U d)
 
+

Detailed Description

+

GLM_GTX_associated_min_max

+
See also
Core features (dependence)
+
+gtx_extented_min_max (dependence)
+ +

Definition in file associated_min_max.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00446_source.html b/common/glm/doc/api/a00446_source.html new file mode 100644 index 000000000..fbb71c48e --- /dev/null +++ b/common/glm/doc/api/a00446_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: associated_min_max.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
associated_min_max.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../glm.hpp"
18 
19 #ifndef GLM_ENABLE_EXPERIMENTAL
20 # error "GLM: GTX_associated_min_max is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
21 #endif
22 
23 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
24 # pragma message("GLM: GLM_GTX_associated_min_max extension included")
25 #endif
26 
27 namespace glm
28 {
31 
34  template<typename T, typename U, qualifier Q>
35  GLM_FUNC_DECL U associatedMin(T x, U a, T y, U b);
36 
39  template<length_t L, typename T, typename U, qualifier Q>
40  GLM_FUNC_DECL vec<2, U, Q> associatedMin(
41  vec<L, T, Q> const& x, vec<L, U, Q> const& a,
42  vec<L, T, Q> const& y, vec<L, U, Q> const& b);
43 
46  template<length_t L, typename T, typename U, qualifier Q>
47  GLM_FUNC_DECL vec<L, U, Q> associatedMin(
48  T x, const vec<L, U, Q>& a,
49  T y, const vec<L, U, Q>& b);
50 
53  template<length_t L, typename T, typename U, qualifier Q>
54  GLM_FUNC_DECL vec<L, U, Q> associatedMin(
55  vec<L, T, Q> const& x, U a,
56  vec<L, T, Q> const& y, U b);
57 
60  template<typename T, typename U>
61  GLM_FUNC_DECL U associatedMin(
62  T x, U a,
63  T y, U b,
64  T z, U c);
65 
68  template<length_t L, typename T, typename U, qualifier Q>
69  GLM_FUNC_DECL vec<L, U, Q> associatedMin(
70  vec<L, T, Q> const& x, vec<L, U, Q> const& a,
71  vec<L, T, Q> const& y, vec<L, U, Q> const& b,
72  vec<L, T, Q> const& z, vec<L, U, Q> const& c);
73 
76  template<typename T, typename U>
77  GLM_FUNC_DECL U associatedMin(
78  T x, U a,
79  T y, U b,
80  T z, U c,
81  T w, U d);
82 
85  template<length_t L, typename T, typename U, qualifier Q>
86  GLM_FUNC_DECL vec<L, U, Q> associatedMin(
87  vec<L, T, Q> const& x, vec<L, U, Q> const& a,
88  vec<L, T, Q> const& y, vec<L, U, Q> const& b,
89  vec<L, T, Q> const& z, vec<L, U, Q> const& c,
90  vec<L, T, Q> const& w, vec<L, U, Q> const& d);
91 
94  template<length_t L, typename T, typename U, qualifier Q>
95  GLM_FUNC_DECL vec<L, U, Q> associatedMin(
96  T x, vec<L, U, Q> const& a,
97  T y, vec<L, U, Q> const& b,
98  T z, vec<L, U, Q> const& c,
99  T w, vec<L, U, Q> const& d);
100 
103  template<length_t L, typename T, typename U, qualifier Q>
104  GLM_FUNC_DECL vec<L, U, Q> associatedMin(
105  vec<L, T, Q> const& x, U a,
106  vec<L, T, Q> const& y, U b,
107  vec<L, T, Q> const& z, U c,
108  vec<L, T, Q> const& w, U d);
109 
112  template<typename T, typename U>
113  GLM_FUNC_DECL U associatedMax(T x, U a, T y, U b);
114 
117  template<length_t L, typename T, typename U, qualifier Q>
118  GLM_FUNC_DECL vec<2, U, Q> associatedMax(
119  vec<L, T, Q> const& x, vec<L, U, Q> const& a,
120  vec<L, T, Q> const& y, vec<L, U, Q> const& b);
121 
124  template<length_t L, typename T, typename U, qualifier Q>
125  GLM_FUNC_DECL vec<L, T, Q> associatedMax(
126  T x, vec<L, U, Q> const& a,
127  T y, vec<L, U, Q> const& b);
128 
131  template<length_t L, typename T, typename U, qualifier Q>
132  GLM_FUNC_DECL vec<L, U, Q> associatedMax(
133  vec<L, T, Q> const& x, U a,
134  vec<L, T, Q> const& y, U b);
135 
138  template<typename T, typename U>
139  GLM_FUNC_DECL U associatedMax(
140  T x, U a,
141  T y, U b,
142  T z, U c);
143 
146  template<length_t L, typename T, typename U, qualifier Q>
147  GLM_FUNC_DECL vec<L, U, Q> associatedMax(
148  vec<L, T, Q> const& x, vec<L, U, Q> const& a,
149  vec<L, T, Q> const& y, vec<L, U, Q> const& b,
150  vec<L, T, Q> const& z, vec<L, U, Q> const& c);
151 
154  template<length_t L, typename T, typename U, qualifier Q>
155  GLM_FUNC_DECL vec<L, T, Q> associatedMax(
156  T x, vec<L, U, Q> const& a,
157  T y, vec<L, U, Q> const& b,
158  T z, vec<L, U, Q> const& c);
159 
162  template<length_t L, typename T, typename U, qualifier Q>
163  GLM_FUNC_DECL vec<L, U, Q> associatedMax(
164  vec<L, T, Q> const& x, U a,
165  vec<L, T, Q> const& y, U b,
166  vec<L, T, Q> const& z, U c);
167 
170  template<typename T, typename U>
171  GLM_FUNC_DECL U associatedMax(
172  T x, U a,
173  T y, U b,
174  T z, U c,
175  T w, U d);
176 
179  template<length_t L, typename T, typename U, qualifier Q>
180  GLM_FUNC_DECL vec<L, U, Q> associatedMax(
181  vec<L, T, Q> const& x, vec<L, U, Q> const& a,
182  vec<L, T, Q> const& y, vec<L, U, Q> const& b,
183  vec<L, T, Q> const& z, vec<L, U, Q> const& c,
184  vec<L, T, Q> const& w, vec<L, U, Q> const& d);
185 
188  template<length_t L, typename T, typename U, qualifier Q>
189  GLM_FUNC_DECL vec<L, U, Q> associatedMax(
190  T x, vec<L, U, Q> const& a,
191  T y, vec<L, U, Q> const& b,
192  T z, vec<L, U, Q> const& c,
193  T w, vec<L, U, Q> const& d);
194 
197  template<length_t L, typename T, typename U, qualifier Q>
198  GLM_FUNC_DECL vec<L, U, Q> associatedMax(
199  vec<L, T, Q> const& x, U a,
200  vec<L, T, Q> const& y, U b,
201  vec<L, T, Q> const& z, U c,
202  vec<L, T, Q> const& w, U d);
203 
205 } //namespace glm
206 
207 #include "associated_min_max.inl"
GLM_FUNC_DECL vec< L, U, Q > associatedMin(vec< L, T, Q > const &x, U a, vec< L, T, Q > const &y, U b, vec< L, T, Q > const &z, U c, vec< L, T, Q > const &w, U d)
Minimum comparison between 4 variables and returns 4 associated variable values.
+
GLM_FUNC_DECL vec< L, U, Q > associatedMax(vec< L, T, Q > const &x, U a, vec< L, T, Q > const &y, U b, vec< L, T, Q > const &z, U c, vec< L, T, Q > const &w, U d)
Maximum comparison between 4 variables and returns 4 associated variable values.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00449.html b/common/glm/doc/api/a00449.html new file mode 100644 index 000000000..0f6ea70fb --- /dev/null +++ b/common/glm/doc/api/a00449.html @@ -0,0 +1,121 @@ + + + + + + + +0.9.9 API documenation: bit.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
bit.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename genIUType >
GLM_FUNC_DECL genIUType highestBitValue (genIUType Value)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > highestBitValue (vec< L, T, Q > const &value)
 
template<typename genIUType >
GLM_FUNC_DECL genIUType lowestBitValue (genIUType Value)
 
template<typename genIUType >
GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoAbove (genIUType Value)
 
template<length_t L, typename T , qualifier Q>
GLM_DEPRECATED GLM_FUNC_DECL vec< L, T, Q > powerOfTwoAbove (vec< L, T, Q > const &value)
 
template<typename genIUType >
GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoBelow (genIUType Value)
 
template<length_t L, typename T , qualifier Q>
GLM_DEPRECATED GLM_FUNC_DECL vec< L, T, Q > powerOfTwoBelow (vec< L, T, Q > const &value)
 
template<typename genIUType >
GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoNearest (genIUType Value)
 
template<length_t L, typename T , qualifier Q>
GLM_DEPRECATED GLM_FUNC_DECL vec< L, T, Q > powerOfTwoNearest (vec< L, T, Q > const &value)
 
+

Detailed Description

+

GLM_GTX_bit

+
See also
Core features (dependence)
+ +

Definition in file bit.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00449_source.html b/common/glm/doc/api/a00449_source.html new file mode 100644 index 000000000..48839230c --- /dev/null +++ b/common/glm/doc/api/a00449_source.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: bit.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
bit.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependencies
16 #include "../gtc/bitfield.hpp"
17 
18 #ifndef GLM_ENABLE_EXPERIMENTAL
19 # error "GLM: GLM_GTX_bit is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
20 #endif
21 
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_GTX_bit extension is deprecated, include GLM_GTC_bitfield and GLM_GTC_integer instead")
24 #endif
25 
26 namespace glm
27 {
30 
32  template<typename genIUType>
33  GLM_FUNC_DECL genIUType highestBitValue(genIUType Value);
34 
36  template<typename genIUType>
37  GLM_FUNC_DECL genIUType lowestBitValue(genIUType Value);
38 
42  template<length_t L, typename T, qualifier Q>
43  GLM_FUNC_DECL vec<L, T, Q> highestBitValue(vec<L, T, Q> const& value);
44 
50  template<typename genIUType>
51  GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoAbove(genIUType Value);
52 
58  template<length_t L, typename T, qualifier Q>
59  GLM_DEPRECATED GLM_FUNC_DECL vec<L, T, Q> powerOfTwoAbove(vec<L, T, Q> const& value);
60 
66  template<typename genIUType>
67  GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoBelow(genIUType Value);
68 
74  template<length_t L, typename T, qualifier Q>
75  GLM_DEPRECATED GLM_FUNC_DECL vec<L, T, Q> powerOfTwoBelow(vec<L, T, Q> const& value);
76 
82  template<typename genIUType>
83  GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoNearest(genIUType Value);
84 
90  template<length_t L, typename T, qualifier Q>
91  GLM_DEPRECATED GLM_FUNC_DECL vec<L, T, Q> powerOfTwoNearest(vec<L, T, Q> const& value);
92 
94 } //namespace glm
95 
96 
97 #include "bit.inl"
98 
GLM_DEPRECATED GLM_FUNC_DECL vec< L, T, Q > powerOfTwoNearest(vec< L, T, Q > const &value)
Return the power of two number which value is the closet to the input value.
+
GLM_FUNC_DECL vec< L, T, Q > highestBitValue(vec< L, T, Q > const &value)
Find the highest bit set to 1 in a integer variable and return its value.
+
GLM_DEPRECATED GLM_FUNC_DECL vec< L, T, Q > powerOfTwoAbove(vec< L, T, Q > const &value)
Return the power of two number which value is just higher the input value.
+
GLM_DEPRECATED GLM_FUNC_DECL vec< L, T, Q > powerOfTwoBelow(vec< L, T, Q > const &value)
Return the power of two number which value is just lower the input value.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL genIUType lowestBitValue(genIUType Value)
+
+ + + + diff --git a/common/glm/doc/api/a00452.html b/common/glm/doc/api/a00452.html new file mode 100644 index 000000000..499beab6e --- /dev/null +++ b/common/glm/doc/api/a00452.html @@ -0,0 +1,101 @@ + + + + + + + +0.9.9 API documenation: closest_point.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
closest_point.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > closestPointOnLine (vec< 3, T, Q > const &point, vec< 3, T, Q > const &a, vec< 3, T, Q > const &b)
 
+template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 2, T, Q > closestPointOnLine (vec< 2, T, Q > const &point, vec< 2, T, Q > const &a, vec< 2, T, Q > const &b)
 
+

Detailed Description

+

GLM_GTX_closest_point

+
See also
Core features (dependence)
+ +

Definition in file closest_point.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00452_source.html b/common/glm/doc/api/a00452_source.html new file mode 100644 index 000000000..4e7b985b6 --- /dev/null +++ b/common/glm/doc/api/a00452_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: closest_point.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
closest_point.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 
18 #ifndef GLM_ENABLE_EXPERIMENTAL
19 # error "GLM: GLM_GTX_closest_point is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
20 #endif
21 
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_GTX_closest_point extension included")
24 #endif
25 
26 namespace glm
27 {
30 
33  template<typename T, qualifier Q>
34  GLM_FUNC_DECL vec<3, T, Q> closestPointOnLine(
35  vec<3, T, Q> const& point,
36  vec<3, T, Q> const& a,
37  vec<3, T, Q> const& b);
38 
40  template<typename T, qualifier Q>
41  GLM_FUNC_DECL vec<2, T, Q> closestPointOnLine(
42  vec<2, T, Q> const& point,
43  vec<2, T, Q> const& a,
44  vec<2, T, Q> const& b);
45 
47 }// namespace glm
48 
49 #include "closest_point.inl"
GLM_FUNC_DECL vec< 2, T, Q > closestPointOnLine(vec< 2, T, Q > const &point, vec< 2, T, Q > const &a, vec< 2, T, Q > const &b)
2d lines work as well
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00455.html b/common/glm/doc/api/a00455.html new file mode 100644 index 000000000..b0e8ff281 --- /dev/null +++ b/common/glm/doc/api/a00455.html @@ -0,0 +1,112 @@ + + + + + + + +0.9.9 API documenation: color_encoding.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
color_encoding.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + +

+Functions

+template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > convertD65XYZToD50XYZ (vec< 3, T, Q > const &ColorD65XYZ)
 
+template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > convertD65XYZToLinearSRGB (vec< 3, T, Q > const &ColorD65XYZ)
 
+template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > convertLinearSRGBToD50XYZ (vec< 3, T, Q > const &ColorLinearSRGB)
 
+template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > convertLinearSRGBToD65XYZ (vec< 3, T, Q > const &ColorLinearSRGB)
 
+

Detailed Description

+

GLM_GTX_color_encoding

+
See also
Core features (dependence)
+
+GLM_GTX_color_encoding (dependence)
+ +

Definition in file color_encoding.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00455_source.html b/common/glm/doc/api/a00455_source.html new file mode 100644 index 000000000..409b3157a --- /dev/null +++ b/common/glm/doc/api/a00455_source.html @@ -0,0 +1,86 @@ + + + + + + + +0.9.9 API documenation: color_encoding.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
color_encoding.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependencies
17 #include "../detail/setup.hpp"
18 #include "../detail/qualifier.hpp"
19 #include "../vec3.hpp"
20 #include <limits>
21 
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_GTC_color_encoding extension included")
24 #endif
25 
26 namespace glm
27 {
30 
32  template<typename T, qualifier Q>
33  GLM_FUNC_DECL vec<3, T, Q> convertLinearSRGBToD65XYZ(vec<3, T, Q> const& ColorLinearSRGB);
34 
36  template<typename T, qualifier Q>
37  GLM_FUNC_DECL vec<3, T, Q> convertLinearSRGBToD50XYZ(vec<3, T, Q> const& ColorLinearSRGB);
38 
40  template<typename T, qualifier Q>
41  GLM_FUNC_DECL vec<3, T, Q> convertD65XYZToLinearSRGB(vec<3, T, Q> const& ColorD65XYZ);
42 
44  template<typename T, qualifier Q>
45  GLM_FUNC_DECL vec<3, T, Q> convertD65XYZToD50XYZ(vec<3, T, Q> const& ColorD65XYZ);
46 
48 } //namespace glm
49 
50 #include "color_encoding.inl"
GLM_FUNC_DECL vec< 3, T, Q > convertD65XYZToD50XYZ(vec< 3, T, Q > const &ColorD65XYZ)
Convert a D65 YUV color to D50 YUV.
+
GLM_FUNC_DECL vec< 3, T, Q > convertD65XYZToLinearSRGB(vec< 3, T, Q > const &ColorD65XYZ)
Convert a D65 YUV color to linear sRGB.
+
GLM_FUNC_DECL vec< 3, T, Q > convertLinearSRGBToD50XYZ(vec< 3, T, Q > const &ColorLinearSRGB)
Convert a linear sRGB color to D50 YUV.
+
GLM_FUNC_DECL vec< 3, T, Q > convertLinearSRGBToD65XYZ(vec< 3, T, Q > const &ColorLinearSRGB)
Convert a linear sRGB color to D65 YUV.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00458.html b/common/glm/doc/api/a00458.html new file mode 100644 index 000000000..7d462e790 --- /dev/null +++ b/common/glm/doc/api/a00458.html @@ -0,0 +1,106 @@ + + + + + + + +0.9.9 API documenation: color_space_YCoCg.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
color_space_YCoCg.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > rgb2YCoCg (vec< 3, T, Q > const &rgbColor)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > rgb2YCoCgR (vec< 3, T, Q > const &rgbColor)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > YCoCg2rgb (vec< 3, T, Q > const &YCoCgColor)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > YCoCgR2rgb (vec< 3, T, Q > const &YCoCgColor)
 
+

Detailed Description

+

GLM_GTX_color_space_YCoCg

+
See also
Core features (dependence)
+ +

Definition in file color_space_YCoCg.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00458_source.html b/common/glm/doc/api/a00458_source.html new file mode 100644 index 000000000..bd5b3de2e --- /dev/null +++ b/common/glm/doc/api/a00458_source.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: color_space_YCoCg.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
color_space_YCoCg.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 
18 #ifndef GLM_ENABLE_EXPERIMENTAL
19 # error "GLM: GLM_GTX_color_space_YCoCg is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
20 #endif
21 
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_GTX_color_space_YCoCg extension included")
24 #endif
25 
26 namespace glm
27 {
30 
33  template<typename T, qualifier Q>
34  GLM_FUNC_DECL vec<3, T, Q> rgb2YCoCg(
35  vec<3, T, Q> const& rgbColor);
36 
39  template<typename T, qualifier Q>
40  GLM_FUNC_DECL vec<3, T, Q> YCoCg2rgb(
41  vec<3, T, Q> const& YCoCgColor);
42 
46  template<typename T, qualifier Q>
47  GLM_FUNC_DECL vec<3, T, Q> rgb2YCoCgR(
48  vec<3, T, Q> const& rgbColor);
49 
53  template<typename T, qualifier Q>
54  GLM_FUNC_DECL vec<3, T, Q> YCoCgR2rgb(
55  vec<3, T, Q> const& YCoCgColor);
56 
58 }//namespace glm
59 
60 #include "color_space_YCoCg.inl"
GLM_FUNC_DECL vec< 3, T, Q > rgb2YCoCgR(vec< 3, T, Q > const &rgbColor)
Convert a color from RGB color space to YCoCgR color space.
+
GLM_FUNC_DECL vec< 3, T, Q > rgbColor(vec< 3, T, Q > const &hsvValue)
Converts a color from HSV color space to its color in RGB color space.
+
GLM_FUNC_DECL vec< 3, T, Q > rgb2YCoCg(vec< 3, T, Q > const &rgbColor)
Convert a color from RGB color space to YCoCg color space.
+
GLM_FUNC_DECL vec< 3, T, Q > YCoCg2rgb(vec< 3, T, Q > const &YCoCgColor)
Convert a color from YCoCg color space to RGB color space.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL vec< 3, T, Q > YCoCgR2rgb(vec< 3, T, Q > const &YCoCgColor)
Convert a color from YCoCgR color space to RGB color space.
+
+ + + + diff --git a/common/glm/doc/api/a00461.html b/common/glm/doc/api/a00461.html new file mode 100644 index 000000000..e891e1409 --- /dev/null +++ b/common/glm/doc/api/a00461.html @@ -0,0 +1,346 @@ + + + + + + + +0.9.9 API documenation: compatibility.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
compatibility.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Typedefs

+typedef bool bool1
 
+typedef bool bool1x1
 
+typedef vec< 2, bool, highp > bool2
 
+typedef mat< 2, 2, bool, highp > bool2x2
 
+typedef mat< 2, 3, bool, highp > bool2x3
 
+typedef mat< 2, 4, bool, highp > bool2x4
 
+typedef vec< 3, bool, highp > bool3
 
+typedef mat< 3, 2, bool, highp > bool3x2
 
+typedef mat< 3, 3, bool, highp > bool3x3
 
+typedef mat< 3, 4, bool, highp > bool3x4
 
+typedef vec< 4, bool, highp > bool4
 
+typedef mat< 4, 2, bool, highp > bool4x2
 
+typedef mat< 4, 3, bool, highp > bool4x3
 
+typedef mat< 4, 4, bool, highp > bool4x4
 
+typedef double double1
 
+typedef double double1x1
 
+typedef vec< 2, double, highp > double2
 
+typedef mat< 2, 2, double, highp > double2x2
 
+typedef mat< 2, 3, double, highp > double2x3
 
+typedef mat< 2, 4, double, highp > double2x4
 
+typedef vec< 3, double, highp > double3
 
+typedef mat< 3, 2, double, highp > double3x2
 
+typedef mat< 3, 3, double, highp > double3x3
 
+typedef mat< 3, 4, double, highp > double3x4
 
+typedef vec< 4, double, highp > double4
 
+typedef mat< 4, 2, double, highp > double4x2
 
+typedef mat< 4, 3, double, highp > double4x3
 
+typedef mat< 4, 4, double, highp > double4x4
 
+typedef float float1
 
+typedef float float1x1
 
+typedef vec< 2, float, highp > float2
 
+typedef mat< 2, 2, float, highp > float2x2
 
+typedef mat< 2, 3, float, highp > float2x3
 
+typedef mat< 2, 4, float, highp > float2x4
 
+typedef vec< 3, float, highp > float3
 
+typedef mat< 3, 2, float, highp > float3x2
 
+typedef mat< 3, 3, float, highp > float3x3
 
+typedef mat< 3, 4, float, highp > float3x4
 
+typedef vec< 4, float, highp > float4
 
+typedef mat< 4, 2, float, highp > float4x2
 
+typedef mat< 4, 3, float, highp > float4x3
 
+typedef mat< 4, 4, float, highp > float4x4
 
+typedef int int1
 
+typedef int int1x1
 
+typedef vec< 2, int, highp > int2
 
+typedef mat< 2, 2, int, highp > int2x2
 
+typedef mat< 2, 3, int, highp > int2x3
 
+typedef mat< 2, 4, int, highp > int2x4
 
+typedef vec< 3, int, highp > int3
 
+typedef mat< 3, 2, int, highp > int3x2
 
+typedef mat< 3, 3, int, highp > int3x3
 
+typedef mat< 3, 4, int, highp > int3x4
 
+typedef vec< 4, int, highp > int4
 
+typedef mat< 4, 2, int, highp > int4x2
 
+typedef mat< 4, 3, int, highp > int4x3
 
+typedef mat< 4, 4, int, highp > int4x4
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER T atan2 (T x, T y)
 
+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER vec< 2, T, Q > atan2 (const vec< 2, T, Q > &x, const vec< 2, T, Q > &y)
 
+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER vec< 3, T, Q > atan2 (const vec< 3, T, Q > &x, const vec< 3, T, Q > &y)
 
+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER vec< 4, T, Q > atan2 (const vec< 4, T, Q > &x, const vec< 4, T, Q > &y)
 
+template<typename genType >
GLM_FUNC_DECL bool isfinite (genType const &x)
 
+template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 1, bool, Q > isfinite (const vec< 1, T, Q > &x)
 
+template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 2, bool, Q > isfinite (const vec< 2, T, Q > &x)
 
+template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, bool, Q > isfinite (const vec< 3, T, Q > &x)
 
+template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > isfinite (const vec< 4, T, Q > &x)
 
+template<typename T >
GLM_FUNC_QUALIFIER T lerp (T x, T y, T a)
 
+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER vec< 2, T, Q > lerp (const vec< 2, T, Q > &x, const vec< 2, T, Q > &y, T a)
 
+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER vec< 3, T, Q > lerp (const vec< 3, T, Q > &x, const vec< 3, T, Q > &y, T a)
 
+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER vec< 4, T, Q > lerp (const vec< 4, T, Q > &x, const vec< 4, T, Q > &y, T a)
 
+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER vec< 2, T, Q > lerp (const vec< 2, T, Q > &x, const vec< 2, T, Q > &y, const vec< 2, T, Q > &a)
 
+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER vec< 3, T, Q > lerp (const vec< 3, T, Q > &x, const vec< 3, T, Q > &y, const vec< 3, T, Q > &a)
 
+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER vec< 4, T, Q > lerp (const vec< 4, T, Q > &x, const vec< 4, T, Q > &y, const vec< 4, T, Q > &a)
 
+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER T saturate (T x)
 
+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER vec< 2, T, Q > saturate (const vec< 2, T, Q > &x)
 
+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER vec< 3, T, Q > saturate (const vec< 3, T, Q > &x)
 
+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER vec< 4, T, Q > saturate (const vec< 4, T, Q > &x)
 
+

Detailed Description

+

GLM_GTX_compatibility

+
See also
Core features (dependence)
+ +

Definition in file compatibility.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00461_source.html b/common/glm/doc/api/a00461_source.html new file mode 100644 index 000000000..c175512cc --- /dev/null +++ b/common/glm/doc/api/a00461_source.html @@ -0,0 +1,145 @@ + + + + + + + +0.9.9 API documenation: compatibility.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
compatibility.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 #include "../gtc/quaternion.hpp"
18 
19 #ifndef GLM_ENABLE_EXPERIMENTAL
20 # error "GLM: GLM_GTX_compatibility is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
21 #endif
22 
23 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
24 # pragma message("GLM: GLM_GTX_compatibility extension included")
25 #endif
26 
27 #if GLM_COMPILER & GLM_COMPILER_VC
28 # include <cfloat>
29 #elif GLM_COMPILER & GLM_COMPILER_GCC
30 # include <cmath>
31 # if(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
32 # undef isfinite
33 # endif
34 #endif//GLM_COMPILER
35 
36 namespace glm
37 {
40 
41  template<typename T> GLM_FUNC_QUALIFIER T lerp(T x, T y, T a){return mix(x, y, a);}
42  template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<2, T, Q> lerp(const vec<2, T, Q>& x, const vec<2, T, Q>& y, T a){return mix(x, y, a);}
43 
44  template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<3, T, Q> lerp(const vec<3, T, Q>& x, const vec<3, T, Q>& y, T a){return mix(x, y, a);}
45  template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<4, T, Q> lerp(const vec<4, T, Q>& x, const vec<4, T, Q>& y, T a){return mix(x, y, a);}
46  template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<2, T, Q> lerp(const vec<2, T, Q>& x, const vec<2, T, Q>& y, const vec<2, T, Q>& a){return mix(x, y, a);}
47  template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<3, T, Q> lerp(const vec<3, T, Q>& x, const vec<3, T, Q>& y, const vec<3, T, Q>& a){return mix(x, y, a);}
48  template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<4, T, Q> lerp(const vec<4, T, Q>& x, const vec<4, T, Q>& y, const vec<4, T, Q>& a){return mix(x, y, a);}
49 
50  template<typename T, qualifier Q> GLM_FUNC_QUALIFIER T saturate(T x){return clamp(x, T(0), T(1));}
51  template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<2, T, Q> saturate(const vec<2, T, Q>& x){return clamp(x, T(0), T(1));}
52  template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<3, T, Q> saturate(const vec<3, T, Q>& x){return clamp(x, T(0), T(1));}
53  template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<4, T, Q> saturate(const vec<4, T, Q>& x){return clamp(x, T(0), T(1));}
54 
55  template<typename T, qualifier Q> GLM_FUNC_QUALIFIER T atan2(T x, T y){return atan(x, y);}
56  template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<2, T, Q> atan2(const vec<2, T, Q>& x, const vec<2, T, Q>& y){return atan(x, y);}
57  template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<3, T, Q> atan2(const vec<3, T, Q>& x, const vec<3, T, Q>& y){return atan(x, y);}
58  template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<4, T, Q> atan2(const vec<4, T, Q>& x, const vec<4, T, Q>& y){return atan(x, y);}
59 
60  template<typename genType> GLM_FUNC_DECL bool isfinite(genType const& x);
61  template<typename T, qualifier Q> GLM_FUNC_DECL vec<1, bool, Q> isfinite(const vec<1, T, Q>& x);
62  template<typename T, qualifier Q> GLM_FUNC_DECL vec<2, bool, Q> isfinite(const vec<2, T, Q>& x);
63  template<typename T, qualifier Q> GLM_FUNC_DECL vec<3, bool, Q> isfinite(const vec<3, T, Q>& x);
64  template<typename T, qualifier Q> GLM_FUNC_DECL vec<4, bool, Q> isfinite(const vec<4, T, Q>& x);
65 
66  typedef bool bool1;
67  typedef vec<2, bool, highp> bool2;
68  typedef vec<3, bool, highp> bool3;
69  typedef vec<4, bool, highp> bool4;
70 
71  typedef bool bool1x1;
72  typedef mat<2, 2, bool, highp> bool2x2;
73  typedef mat<2, 3, bool, highp> bool2x3;
74  typedef mat<2, 4, bool, highp> bool2x4;
75  typedef mat<3, 2, bool, highp> bool3x2;
76  typedef mat<3, 3, bool, highp> bool3x3;
77  typedef mat<3, 4, bool, highp> bool3x4;
78  typedef mat<4, 2, bool, highp> bool4x2;
79  typedef mat<4, 3, bool, highp> bool4x3;
80  typedef mat<4, 4, bool, highp> bool4x4;
81 
82  typedef int int1;
83  typedef vec<2, int, highp> int2;
84  typedef vec<3, int, highp> int3;
85  typedef vec<4, int, highp> int4;
86 
87  typedef int int1x1;
88  typedef mat<2, 2, int, highp> int2x2;
89  typedef mat<2, 3, int, highp> int2x3;
90  typedef mat<2, 4, int, highp> int2x4;
91  typedef mat<3, 2, int, highp> int3x2;
92  typedef mat<3, 3, int, highp> int3x3;
93  typedef mat<3, 4, int, highp> int3x4;
94  typedef mat<4, 2, int, highp> int4x2;
95  typedef mat<4, 3, int, highp> int4x3;
96  typedef mat<4, 4, int, highp> int4x4;
97 
98  typedef float float1;
99  typedef vec<2, float, highp> float2;
100  typedef vec<3, float, highp> float3;
101  typedef vec<4, float, highp> float4;
102 
103  typedef float float1x1;
104  typedef mat<2, 2, float, highp> float2x2;
105  typedef mat<2, 3, float, highp> float2x3;
106  typedef mat<2, 4, float, highp> float2x4;
107  typedef mat<3, 2, float, highp> float3x2;
108  typedef mat<3, 3, float, highp> float3x3;
109  typedef mat<3, 4, float, highp> float3x4;
110  typedef mat<4, 2, float, highp> float4x2;
111  typedef mat<4, 3, float, highp> float4x3;
112  typedef mat<4, 4, float, highp> float4x4;
113 
114  typedef double double1;
115  typedef vec<2, double, highp> double2;
116  typedef vec<3, double, highp> double3;
117  typedef vec<4, double, highp> double4;
118 
119  typedef double double1x1;
120  typedef mat<2, 2, double, highp> double2x2;
121  typedef mat<2, 3, double, highp> double2x3;
122  typedef mat<2, 4, double, highp> double2x4;
123  typedef mat<3, 2, double, highp> double3x2;
124  typedef mat<3, 3, double, highp> double3x3;
125  typedef mat<3, 4, double, highp> double3x4;
126  typedef mat<4, 2, double, highp> double4x2;
127  typedef mat<4, 3, double, highp> double4x3;
128  typedef mat<4, 4, double, highp> double4x4;
129 
131 }//namespace glm
132 
133 #include "compatibility.inl"
mat< 3, 3, double, highp > double3x3
double-qualifier floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) ...
+
mat< 3, 2, float, highp > float3x2
single-qualifier floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) ...
+
mat< 4, 3, bool, highp > bool4x3
boolean matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
+
GLM_FUNC_DECL vec< 4, bool, Q > isfinite(const vec< 4, T, Q > &x)
Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)...
+
vec< 4, float, highp > float4
single-qualifier floating-point vector with 4 components. (From GLM_GTX_compatibility extension) ...
+
mat< 4, 2, bool, highp > bool4x2
boolean matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
+
mat< 2, 3, bool, highp > bool2x3
boolean matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
+
vec< 4, double, highp > double4
double-qualifier floating-point vector with 4 components. (From GLM_GTX_compatibility extension) ...
+
vec< 3, bool, highp > bool3
boolean type with 3 components. (From GLM_GTX_compatibility extension)
+
float float1x1
single-qualifier floating-point matrix with 1 component. (From GLM_GTX_compatibility extension) ...
+
mat< 2, 3, double, highp > double2x3
double-qualifier floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) ...
+
mat< 2, 4, bool, highp > bool2x4
boolean matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
+
mat< 4, 2, float, highp > float4x2
single-qualifier floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) ...
+
mat< 4, 2, int, highp > int4x2
integer matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)
+
mat< 2, 2, bool, highp > bool2x2
boolean matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
+
int int1x1
integer matrix with 1 component. (From GLM_GTX_compatibility extension)
+
mat< 2, 2, double, highp > double2x2
double-qualifier floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) ...
+
mat< 4, 4, int, highp > int4x4
integer matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
+
float float1
single-qualifier floating-point vector with 1 component. (From GLM_GTX_compatibility extension) ...
+
vec< 2, int, highp > int2
integer vector with 2 components. (From GLM_GTX_compatibility extension)
+
GLM_FUNC_QUALIFIER vec< 4, T, Q > saturate(const vec< 4, T, Q > &x)
Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
+
vec< 3, float, highp > float3
single-qualifier floating-point vector with 3 components. (From GLM_GTX_compatibility extension) ...
+
mat< 2, 4, int, highp > int2x4
integer matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)
+
mat< 4, 2, double, highp > double4x2
double-qualifier floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) ...
+
mat< 2, 4, double, highp > double2x4
double-qualifier floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) ...
+
GLM_FUNC_DECL GLM_CONSTEXPR genType clamp(genType x, genType minVal, genType maxVal)
Returns min(max(x, minVal), maxVal) for each component in x using the floating-point values minVal an...
+
bool bool1
boolean type with 1 component. (From GLM_GTX_compatibility extension)
+
vec< 2, double, highp > double2
double-qualifier floating-point vector with 2 components. (From GLM_GTX_compatibility extension) ...
+
mat< 2, 4, float, highp > float2x4
single-qualifier floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) ...
+
mat< 2, 3, int, highp > int2x3
integer matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)
+
mat< 4, 4, double, highp > double4x4
double-qualifier floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) ...
+
vec< 3, int, highp > int3
integer vector with 3 components. (From GLM_GTX_compatibility extension)
+
mat< 3, 4, float, highp > float3x4
single-qualifier floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension) ...
+
mat< 4, 4, float, highp > float4x4
single-qualifier floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) ...
+
vec< 4, int, highp > int4
integer vector with 4 components. (From GLM_GTX_compatibility extension)
+
mat< 3, 3, int, highp > int3x3
integer matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
+
vec< 3, double, highp > double3
double-qualifier floating-point vector with 3 components. (From GLM_GTX_compatibility extension) ...
+
mat< 3, 4, bool, highp > bool3x4
boolean matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)
+
int int1
integer vector with 1 component. (From GLM_GTX_compatibility extension)
+
double double1x1
double-qualifier floating-point matrix with 1 component. (From GLM_GTX_compatibility extension) ...
+
vec< 2, bool, highp > bool2
boolean type with 2 components. (From GLM_GTX_compatibility extension)
+
mat< 2, 3, float, highp > float2x3
single-qualifier floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) ...
+
mat< 4, 4, bool, highp > bool4x4
boolean matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
+
mat< 4, 3, double, highp > double4x3
double-qualifier floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) ...
+
mat< 2, 2, float, highp > float2x2
single-qualifier floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) ...
+
vec< 2, float, highp > float2
single-qualifier floating-point vector with 2 components. (From GLM_GTX_compatibility extension) ...
+
mat< 3, 2, int, highp > int3x2
integer matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
+
bool bool1x1
boolean matrix with 1 x 1 component. (From GLM_GTX_compatibility extension)
+
mat< 3, 2, double, highp > double3x2
double-qualifier floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) ...
+
mat< 3, 3, float, highp > float3x3
single-qualifier floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) ...
+
GLM_FUNC_QUALIFIER vec< 4, T, Q > atan2(const vec< 4, T, Q > &x, const vec< 4, T, Q > &y)
Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what q...
+
GLM_FUNC_DECL genTypeT mix(genTypeT x, genTypeT y, genTypeU a)
If genTypeU is a floating scalar or vector: Returns x * (1.0 - a) + y * a, i.e., the linear blend of ...
+
mat< 4, 3, int, highp > int4x3
integer matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)
+
Definition: common.hpp:20
+
mat< 4, 3, float, highp > float4x3
single-qualifier floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) ...
+
vec< 4, bool, highp > bool4
boolean type with 4 components. (From GLM_GTX_compatibility extension)
+
GLM_FUNC_QUALIFIER vec< 4, T, Q > lerp(const vec< 4, T, Q > &x, const vec< 4, T, Q > &y, const vec< 4, T, Q > &a)
Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using v...
+
GLM_FUNC_DECL vec< L, T, Q > atan(vec< L, T, Q > const &y, vec< L, T, Q > const &x)
Arc tangent.
+
double double1
double-qualifier floating-point vector with 1 component. (From GLM_GTX_compatibility extension) ...
+
mat< 3, 3, bool, highp > bool3x3
boolean matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)
+
mat< 3, 4, int, highp > int3x4
integer matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)
+
mat< 3, 4, double, highp > double3x4
double-qualifier floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension) ...
+
mat< 3, 2, bool, highp > bool3x2
boolean matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)
+
mat< 2, 2, int, highp > int2x2
integer matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
+
+ + + + diff --git a/common/glm/doc/api/a00464.html b/common/glm/doc/api/a00464.html new file mode 100644 index 000000000..3558273fd --- /dev/null +++ b/common/glm/doc/api/a00464.html @@ -0,0 +1,114 @@ + + + + + + + +0.9.9 API documenation: component_wise.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
component_wise.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType::value_type compAdd (genType const &v)
 
template<typename genType >
GLM_FUNC_DECL genType::value_type compMax (genType const &v)
 
template<typename genType >
GLM_FUNC_DECL genType::value_type compMin (genType const &v)
 
template<typename genType >
GLM_FUNC_DECL genType::value_type compMul (genType const &v)
 
template<typename floatType , length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, floatType, Q > compNormalize (vec< L, T, Q > const &v)
 
template<length_t L, typename T , typename floatType , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > compScale (vec< L, floatType, Q > const &v)
 
+

Detailed Description

+

GLM_GTX_component_wise

+
Date
2007-05-21 / 2011-06-07
+
Author
Christophe Riccio
+
See also
Core features (dependence)
+ +

Definition in file component_wise.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00464_source.html b/common/glm/doc/api/a00464_source.html new file mode 100644 index 000000000..afc676dc1 --- /dev/null +++ b/common/glm/doc/api/a00464_source.html @@ -0,0 +1,88 @@ + + + + + + + +0.9.9 API documenation: component_wise.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
component_wise.hpp
+
+
+Go to the documentation of this file.
1 
15 #pragma once
16 
17 // Dependencies
18 #include "../detail/setup.hpp"
19 #include "../detail/qualifier.hpp"
20 
21 #ifndef GLM_ENABLE_EXPERIMENTAL
22 # error "GLM: GLM_GTX_component_wise is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
23 #endif
24 
25 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
26 # pragma message("GLM: GLM_GTX_component_wise extension included")
27 #endif
28 
29 namespace glm
30 {
33 
37  template<typename floatType, length_t L, typename T, qualifier Q>
38  GLM_FUNC_DECL vec<L, floatType, Q> compNormalize(vec<L, T, Q> const& v);
39 
43  template<length_t L, typename T, typename floatType, qualifier Q>
44  GLM_FUNC_DECL vec<L, T, Q> compScale(vec<L, floatType, Q> const& v);
45 
48  template<typename genType>
49  GLM_FUNC_DECL typename genType::value_type compAdd(genType const& v);
50 
53  template<typename genType>
54  GLM_FUNC_DECL typename genType::value_type compMul(genType const& v);
55 
58  template<typename genType>
59  GLM_FUNC_DECL typename genType::value_type compMin(genType const& v);
60 
63  template<typename genType>
64  GLM_FUNC_DECL typename genType::value_type compMax(genType const& v);
65 
67 }//namespace glm
68 
69 #include "component_wise.inl"
GLM_FUNC_DECL vec< L, T, Q > compScale(vec< L, floatType, Q > const &v)
Convert a normalized float vector to an integer vector.
+
GLM_FUNC_DECL genType::value_type compAdd(genType const &v)
Add all vector components together.
+
GLM_FUNC_DECL genType::value_type compMin(genType const &v)
Find the minimum value between single vector components.
+
GLM_FUNC_DECL genType::value_type compMul(genType const &v)
Multiply all vector components together.
+
GLM_FUNC_DECL vec< L, floatType, Q > compNormalize(vec< L, T, Q > const &v)
Convert an integer vector to a normalized float vector.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL genType::value_type compMax(genType const &v)
Find the maximum value between single vector components.
+
+ + + + diff --git a/common/glm/doc/api/a00467.html b/common/glm/doc/api/a00467.html new file mode 100644 index 000000000..6b0ebb1aa --- /dev/null +++ b/common/glm/doc/api/a00467.html @@ -0,0 +1,151 @@ + + + + + + + +0.9.9 API documenation: dual_quaternion.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
dual_quaternion.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Typedefs

typedef highp_ddualquat ddualquat
 
typedef highp_fdualquat dualquat
 
typedef highp_fdualquat fdualquat
 
typedef tdualquat< double, highp > highp_ddualquat
 
typedef tdualquat< float, highp > highp_dualquat
 
typedef tdualquat< float, highp > highp_fdualquat
 
typedef tdualquat< double, lowp > lowp_ddualquat
 
typedef tdualquat< float, lowp > lowp_dualquat
 
typedef tdualquat< float, lowp > lowp_fdualquat
 
typedef tdualquat< double, mediump > mediump_ddualquat
 
typedef tdualquat< float, mediump > mediump_dualquat
 
typedef tdualquat< float, mediump > mediump_fdualquat
 
+ + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL tdualquat< T, Q > dual_quat_identity ()
 
template<typename T , qualifier Q>
GLM_FUNC_DECL tdualquat< T, Q > dualquat_cast (mat< 2, 4, T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL tdualquat< T, Q > dualquat_cast (mat< 3, 4, T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL tdualquat< T, Q > inverse (tdualquat< T, Q > const &q)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL tdualquat< T, Q > lerp (tdualquat< T, Q > const &x, tdualquat< T, Q > const &y, T const &a)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 2, 4, T, Q > mat2x4_cast (tdualquat< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 4, T, Q > mat3x4_cast (tdualquat< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL tdualquat< T, Q > normalize (tdualquat< T, Q > const &q)
 
+

Detailed Description

+

GLM_GTX_dual_quaternion

+
Author
Maksim Vorobiev (msome.nosp@m.one@.nosp@m.gmail.nosp@m..com)
+
See also
Core features (dependence)
+
+GLM_GTC_constants (dependence)
+
+GLM_GTC_quaternion (dependence)
+ +

Definition in file dual_quaternion.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00467_source.html b/common/glm/doc/api/a00467_source.html new file mode 100644 index 000000000..4c3257613 --- /dev/null +++ b/common/glm/doc/api/a00467_source.html @@ -0,0 +1,103 @@ + + + + + + + +0.9.9 API documenation: dual_quaternion.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
dual_quaternion.hpp
+
+
+Go to the documentation of this file.
1 
16 #pragma once
17 
18 // Dependency:
19 #include "../glm.hpp"
20 #include "../gtc/constants.hpp"
21 #include "../gtc/quaternion.hpp"
22 
23 #ifndef GLM_ENABLE_EXPERIMENTAL
24 # error "GLM: GLM_GTX_dual_quaternion is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
25 #endif
26 
27 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
28 # pragma message("GLM: GLM_GTX_dual_quaternion extension included")
29 #endif
30 
31 namespace glm
32 {
35 
36  template<typename T, qualifier Q = defaultp>
37  struct tdualquat
38  {
39  // -- Implementation detail --
40 
41  typedef T value_type;
42  typedef qua<T, Q> part_type;
43 
44  // -- Data --
45 
46  qua<T, Q> real, dual;
47 
48  // -- Component accesses --
49 
50  typedef length_t length_type;
52  GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 2;}
53 
54  GLM_FUNC_DECL part_type & operator[](length_type i);
55  GLM_FUNC_DECL part_type const& operator[](length_type i) const;
56 
57  // -- Implicit basic constructors --
58 
59  GLM_FUNC_DECL GLM_CONSTEXPR tdualquat() GLM_DEFAULT;
60  GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tdualquat<T, Q> const& d) GLM_DEFAULT;
61  template<qualifier P>
62  GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tdualquat<T, P> const& d);
63 
64  // -- Explicit basic constructors --
65 
66  GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(qua<T, Q> const& real);
67  GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(qua<T, Q> const& orientation, vec<3, T, Q> const& translation);
68  GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(qua<T, Q> const& real, qua<T, Q> const& dual);
69 
70  // -- Conversion constructors --
71 
72  template<typename U, qualifier P>
73  GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tdualquat(tdualquat<U, P> const& q);
74 
75  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR tdualquat(mat<2, 4, T, Q> const& holder_mat);
76  GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR tdualquat(mat<3, 4, T, Q> const& aug_mat);
77 
78  // -- Unary arithmetic operators --
79 
80  GLM_FUNC_DECL tdualquat<T, Q> & operator=(tdualquat<T, Q> const& m) GLM_DEFAULT;
81 
82  template<typename U>
83  GLM_FUNC_DECL tdualquat<T, Q> & operator=(tdualquat<U, Q> const& m);
84  template<typename U>
85  GLM_FUNC_DECL tdualquat<T, Q> & operator*=(U s);
86  template<typename U>
87  GLM_FUNC_DECL tdualquat<T, Q> & operator/=(U s);
88  };
89 
90  // -- Unary bit operators --
91 
92  template<typename T, qualifier Q>
93  GLM_FUNC_DECL tdualquat<T, Q> operator+(tdualquat<T, Q> const& q);
94 
95  template<typename T, qualifier Q>
96  GLM_FUNC_DECL tdualquat<T, Q> operator-(tdualquat<T, Q> const& q);
97 
98  // -- Binary operators --
99 
100  template<typename T, qualifier Q>
101  GLM_FUNC_DECL tdualquat<T, Q> operator+(tdualquat<T, Q> const& q, tdualquat<T, Q> const& p);
102 
103  template<typename T, qualifier Q>
104  GLM_FUNC_DECL tdualquat<T, Q> operator*(tdualquat<T, Q> const& q, tdualquat<T, Q> const& p);
105 
106  template<typename T, qualifier Q>
107  GLM_FUNC_DECL vec<3, T, Q> operator*(tdualquat<T, Q> const& q, vec<3, T, Q> const& v);
108 
109  template<typename T, qualifier Q>
110  GLM_FUNC_DECL vec<3, T, Q> operator*(vec<3, T, Q> const& v, tdualquat<T, Q> const& q);
111 
112  template<typename T, qualifier Q>
113  GLM_FUNC_DECL vec<4, T, Q> operator*(tdualquat<T, Q> const& q, vec<4, T, Q> const& v);
114 
115  template<typename T, qualifier Q>
116  GLM_FUNC_DECL vec<4, T, Q> operator*(vec<4, T, Q> const& v, tdualquat<T, Q> const& q);
117 
118  template<typename T, qualifier Q>
119  GLM_FUNC_DECL tdualquat<T, Q> operator*(tdualquat<T, Q> const& q, T const& s);
120 
121  template<typename T, qualifier Q>
122  GLM_FUNC_DECL tdualquat<T, Q> operator*(T const& s, tdualquat<T, Q> const& q);
123 
124  template<typename T, qualifier Q>
125  GLM_FUNC_DECL tdualquat<T, Q> operator/(tdualquat<T, Q> const& q, T const& s);
126 
127  // -- Boolean operators --
128 
129  template<typename T, qualifier Q>
130  GLM_FUNC_DECL bool operator==(tdualquat<T, Q> const& q1, tdualquat<T, Q> const& q2);
131 
132  template<typename T, qualifier Q>
133  GLM_FUNC_DECL bool operator!=(tdualquat<T, Q> const& q1, tdualquat<T, Q> const& q2);
134 
138  template <typename T, qualifier Q>
139  GLM_FUNC_DECL tdualquat<T, Q> dual_quat_identity();
140 
144  template<typename T, qualifier Q>
145  GLM_FUNC_DECL tdualquat<T, Q> normalize(tdualquat<T, Q> const& q);
146 
150  template<typename T, qualifier Q>
151  GLM_FUNC_DECL tdualquat<T, Q> lerp(tdualquat<T, Q> const& x, tdualquat<T, Q> const& y, T const& a);
152 
156  template<typename T, qualifier Q>
157  GLM_FUNC_DECL tdualquat<T, Q> inverse(tdualquat<T, Q> const& q);
158 
162  template<typename T, qualifier Q>
163  GLM_FUNC_DECL mat<2, 4, T, Q> mat2x4_cast(tdualquat<T, Q> const& x);
164 
168  template<typename T, qualifier Q>
169  GLM_FUNC_DECL mat<3, 4, T, Q> mat3x4_cast(tdualquat<T, Q> const& x);
170 
174  template<typename T, qualifier Q>
175  GLM_FUNC_DECL tdualquat<T, Q> dualquat_cast(mat<2, 4, T, Q> const& x);
176 
180  template<typename T, qualifier Q>
181  GLM_FUNC_DECL tdualquat<T, Q> dualquat_cast(mat<3, 4, T, Q> const& x);
182 
183 
187  typedef tdualquat<float, lowp> lowp_dualquat;
188 
192  typedef tdualquat<float, mediump> mediump_dualquat;
193 
197  typedef tdualquat<float, highp> highp_dualquat;
198 
199 
203  typedef tdualquat<float, lowp> lowp_fdualquat;
204 
208  typedef tdualquat<float, mediump> mediump_fdualquat;
209 
213  typedef tdualquat<float, highp> highp_fdualquat;
214 
215 
219  typedef tdualquat<double, lowp> lowp_ddualquat;
220 
224  typedef tdualquat<double, mediump> mediump_ddualquat;
225 
229  typedef tdualquat<double, highp> highp_ddualquat;
230 
231 
232 #if(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))
233  typedef highp_fdualquat dualquat;
237 
242 #elif(defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))
243  typedef highp_fdualquat dualquat;
244  typedef highp_fdualquat fdualquat;
245 #elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))
246  typedef mediump_fdualquat dualquat;
248 #elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && defined(GLM_PRECISION_LOWP_FLOAT))
249  typedef lowp_fdualquat dualquat;
250  typedef lowp_fdualquat fdualquat;
251 #else
252 # error "GLM error: multiple default precision requested for single-precision floating-point types"
253 #endif
254 
255 
256 #if(!defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE))
257  typedef highp_ddualquat ddualquat;
261 #elif(defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE))
262  typedef highp_ddualquat ddualquat;
263 #elif(!defined(GLM_PRECISION_HIGHP_DOUBLE) && defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE))
265 #elif(!defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && defined(GLM_PRECISION_LOWP_DOUBLE))
266  typedef lowp_ddualquat ddualquat;
267 #else
268 # error "GLM error: Multiple default precision requested for double-precision floating-point types"
269 #endif
270 
272 } //namespace glm
273 
274 #include "dual_quaternion.inl"
GLM_FUNC_DECL mat< 3, 4, T, Q > mat3x4_cast(tdualquat< T, Q > const &x)
Converts a quaternion to a 3 * 4 matrix.
+
tdualquat< double, lowp > lowp_ddualquat
Dual-quaternion of low double-qualifier floating-point numbers.
+
GLM_FUNC_DECL tdualquat< T, Q > inverse(tdualquat< T, Q > const &q)
Returns the q inverse.
+
tdualquat< float, highp > highp_dualquat
Dual-quaternion of high single-qualifier floating-point numbers.
+
GLM_FUNC_DECL tdualquat< T, Q > lerp(tdualquat< T, Q > const &x, tdualquat< T, Q > const &y, T const &a)
Returns the linear interpolation of two dual quaternion.
+
tdualquat< float, lowp > lowp_fdualquat
Dual-quaternion of low single-qualifier floating-point numbers.
+
highp_fdualquat fdualquat
Dual-quaternion of single-qualifier floating-point numbers.
+
GLM_FUNC_DECL mat< 2, 4, T, Q > mat2x4_cast(tdualquat< T, Q > const &x)
Converts a quaternion to a 2 * 4 matrix.
+
tdualquat< double, highp > highp_ddualquat
Dual-quaternion of high double-qualifier floating-point numbers.
+
tdualquat< float, mediump > mediump_fdualquat
Dual-quaternion of medium single-qualifier floating-point numbers.
+
highp_ddualquat ddualquat
Dual-quaternion of default double-qualifier floating-point numbers.
+
tdualquat< float, mediump > mediump_dualquat
Dual-quaternion of medium single-qualifier floating-point numbers.
+
GLM_FUNC_DECL tdualquat< T, Q > normalize(tdualquat< T, Q > const &q)
Returns the normalized quaternion.
+
GLM_FUNC_DECL tdualquat< T, Q > dual_quat_identity()
Creates an identity dual quaternion.
+
tdualquat< float, highp > highp_fdualquat
Dual-quaternion of high single-qualifier floating-point numbers.
+
tdualquat< double, mediump > mediump_ddualquat
Dual-quaternion of medium double-qualifier floating-point numbers.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > orientation(vec< 3, T, Q > const &Normal, vec< 3, T, Q > const &Up)
Build a rotation matrix from a normal and a up vector.
+
highp_fdualquat dualquat
Dual-quaternion of floating-point numbers.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL T length(qua< T, Q > const &q)
Returns the norm of a quaternions.
+
tdualquat< float, lowp > lowp_dualquat
Dual-quaternion of low single-qualifier floating-point numbers.
+
GLM_FUNC_DECL tdualquat< T, Q > dualquat_cast(mat< 3, 4, T, Q > const &x)
Converts a 3 * 4 matrix (augmented matrix rotation + translation) to a quaternion.
+
+ + + + diff --git a/common/glm/doc/api/a00470.html b/common/glm/doc/api/a00470.html new file mode 100644 index 000000000..7c5cb208d --- /dev/null +++ b/common/glm/doc/api/a00470.html @@ -0,0 +1,198 @@ + + + + + + + +0.9.9 API documenation: easing.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
easing.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType backEaseIn (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType backEaseIn (genType const &a, genType const &o)
 
template<typename genType >
GLM_FUNC_DECL genType backEaseInOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType backEaseInOut (genType const &a, genType const &o)
 
template<typename genType >
GLM_FUNC_DECL genType backEaseOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType backEaseOut (genType const &a, genType const &o)
 
template<typename genType >
GLM_FUNC_DECL genType bounceEaseIn (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType bounceEaseInOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType bounceEaseOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType circularEaseIn (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType circularEaseInOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType circularEaseOut (genType const &a)
 
+template<typename genType >
GLM_FUNC_DECL genType cubicEaseIn (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType cubicEaseInOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType cubicEaseOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType elasticEaseIn (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType elasticEaseInOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType elasticEaseOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType exponentialEaseIn (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType exponentialEaseInOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType exponentialEaseOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType linearInterpolation (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType quadraticEaseIn (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType quadraticEaseInOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType quadraticEaseOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType quarticEaseIn (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType quarticEaseInOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType quarticEaseOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType quinticEaseIn (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType quinticEaseInOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType quinticEaseOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType sineEaseIn (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType sineEaseInOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType sineEaseOut (genType const &a)
 
+

Detailed Description

+

GLM_GTX_easing

+
Author
Robert Chisholm
+
See also
Core features (dependence)
+ +

Definition in file easing.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00470_source.html b/common/glm/doc/api/a00470_source.html new file mode 100644 index 000000000..24a88d409 --- /dev/null +++ b/common/glm/doc/api/a00470_source.html @@ -0,0 +1,113 @@ + + + + + + + +0.9.9 API documenation: easing.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
easing.hpp
+
+
+Go to the documentation of this file.
1 
17 #pragma once
18 
19 // Dependency:
20 #include "../glm.hpp"
21 #include "../gtc/constants.hpp"
22 #include "../detail/qualifier.hpp"
23 
24 #ifndef GLM_ENABLE_EXPERIMENTAL
25 # error "GLM: GLM_GTX_easing is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
26 #endif
27 
28 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
29 # pragma message("GLM: GLM_GTX_easing extension included")
30 #endif
31 
32 namespace glm{
35 
38  template <typename genType>
39  GLM_FUNC_DECL genType linearInterpolation(genType const & a);
40 
43  template <typename genType>
44  GLM_FUNC_DECL genType quadraticEaseIn(genType const & a);
45 
48  template <typename genType>
49  GLM_FUNC_DECL genType quadraticEaseOut(genType const & a);
50 
55  template <typename genType>
56  GLM_FUNC_DECL genType quadraticEaseInOut(genType const & a);
57 
59  template <typename genType>
60  GLM_FUNC_DECL genType cubicEaseIn(genType const & a);
61 
64  template <typename genType>
65  GLM_FUNC_DECL genType cubicEaseOut(genType const & a);
66 
71  template <typename genType>
72  GLM_FUNC_DECL genType cubicEaseInOut(genType const & a);
73 
76  template <typename genType>
77  GLM_FUNC_DECL genType quarticEaseIn(genType const & a);
78 
81  template <typename genType>
82  GLM_FUNC_DECL genType quarticEaseOut(genType const & a);
83 
88  template <typename genType>
89  GLM_FUNC_DECL genType quarticEaseInOut(genType const & a);
90 
93  template <typename genType>
94  GLM_FUNC_DECL genType quinticEaseIn(genType const & a);
95 
98  template <typename genType>
99  GLM_FUNC_DECL genType quinticEaseOut(genType const & a);
100 
105  template <typename genType>
106  GLM_FUNC_DECL genType quinticEaseInOut(genType const & a);
107 
110  template <typename genType>
111  GLM_FUNC_DECL genType sineEaseIn(genType const & a);
112 
115  template <typename genType>
116  GLM_FUNC_DECL genType sineEaseOut(genType const & a);
117 
120  template <typename genType>
121  GLM_FUNC_DECL genType sineEaseInOut(genType const & a);
122 
125  template <typename genType>
126  GLM_FUNC_DECL genType circularEaseIn(genType const & a);
127 
130  template <typename genType>
131  GLM_FUNC_DECL genType circularEaseOut(genType const & a);
132 
137  template <typename genType>
138  GLM_FUNC_DECL genType circularEaseInOut(genType const & a);
139 
142  template <typename genType>
143  GLM_FUNC_DECL genType exponentialEaseIn(genType const & a);
144 
147  template <typename genType>
148  GLM_FUNC_DECL genType exponentialEaseOut(genType const & a);
149 
154  template <typename genType>
155  GLM_FUNC_DECL genType exponentialEaseInOut(genType const & a);
156 
159  template <typename genType>
160  GLM_FUNC_DECL genType elasticEaseIn(genType const & a);
161 
164  template <typename genType>
165  GLM_FUNC_DECL genType elasticEaseOut(genType const & a);
166 
171  template <typename genType>
172  GLM_FUNC_DECL genType elasticEaseInOut(genType const & a);
173 
175  template <typename genType>
176  GLM_FUNC_DECL genType backEaseIn(genType const& a);
177 
179  template <typename genType>
180  GLM_FUNC_DECL genType backEaseOut(genType const& a);
181 
183  template <typename genType>
184  GLM_FUNC_DECL genType backEaseInOut(genType const& a);
185 
189  template <typename genType>
190  GLM_FUNC_DECL genType backEaseIn(genType const& a, genType const& o);
191 
195  template <typename genType>
196  GLM_FUNC_DECL genType backEaseOut(genType const& a, genType const& o);
197 
201  template <typename genType>
202  GLM_FUNC_DECL genType backEaseInOut(genType const& a, genType const& o);
203 
205  template <typename genType>
206  GLM_FUNC_DECL genType bounceEaseIn(genType const& a);
207 
209  template <typename genType>
210  GLM_FUNC_DECL genType bounceEaseOut(genType const& a);
211 
213  template <typename genType>
214  GLM_FUNC_DECL genType bounceEaseInOut(genType const& a);
215 
217 }//namespace glm
218 
219 #include "easing.inl"
GLM_FUNC_DECL genType backEaseIn(genType const &a, genType const &o)
+
GLM_FUNC_DECL genType exponentialEaseOut(genType const &a)
Modelled after the exponential function y = -2^(-10x) + 1.
+
GLM_FUNC_DECL genType bounceEaseInOut(genType const &a)
+
GLM_FUNC_DECL genType quarticEaseIn(genType const &a)
Modelled after the quartic x^4.
+
GLM_FUNC_DECL genType quinticEaseIn(genType const &a)
Modelled after the quintic y = x^5.
+
GLM_FUNC_DECL genType circularEaseOut(genType const &a)
Modelled after shifted quadrant II of unit circle.
+
GLM_FUNC_DECL genType quinticEaseOut(genType const &a)
Modelled after the quintic y = (x - 1)^5 + 1.
+
GLM_FUNC_DECL genType sineEaseOut(genType const &a)
Modelled after quarter-cycle of sine wave (different phase)
+
GLM_FUNC_DECL genType circularEaseIn(genType const &a)
Modelled after shifted quadrant IV of unit circle.
+
GLM_FUNC_DECL genType bounceEaseOut(genType const &a)
+
GLM_FUNC_DECL genType bounceEaseIn(genType const &a)
+
GLM_FUNC_DECL genType sineEaseIn(genType const &a)
Modelled after quarter-cycle of sine wave.
+
GLM_FUNC_DECL genType quinticEaseInOut(genType const &a)
Modelled after the piecewise quintic y = (1/2)((2x)^5) ; [0, 0.5) y = (1/2)((2x-2)^5 + 2) ; [0...
+
GLM_FUNC_DECL genType quadraticEaseOut(genType const &a)
Modelled after the parabola y = -x^2 + 2x.
+
GLM_FUNC_DECL genType quarticEaseInOut(genType const &a)
Modelled after the piecewise quartic y = (1/2)((2x)^4) ; [0, 0.5) y = -(1/2)((2x-2)^4 - 2) ; [0...
+
GLM_FUNC_DECL genType linearInterpolation(genType const &a)
Modelled after the line y = x.
+
GLM_FUNC_DECL genType elasticEaseIn(genType const &a)
Modelled after the damped sine wave y = sin(13pi/2*x)*pow(2, 10 * (x - 1))
+
GLM_FUNC_DECL genType quadraticEaseInOut(genType const &a)
Modelled after the piecewise quadratic y = (1/2)((2x)^2) ; [0, 0.5) y = -(1/2)((2x-1)*(2x-3) - 1) ; [...
+
GLM_FUNC_DECL genType quadraticEaseIn(genType const &a)
Modelled after the parabola y = x^2.
+
GLM_FUNC_DECL genType cubicEaseInOut(genType const &a)
Modelled after the piecewise cubic y = (1/2)((2x)^3) ; [0, 0.5) y = (1/2)((2x-2)^3 + 2) ; [0...
+
GLM_FUNC_DECL genType cubicEaseIn(genType const &a)
Modelled after the cubic y = x^3.
+
GLM_FUNC_DECL genType elasticEaseInOut(genType const &a)
Modelled after the piecewise exponentially-damped sine wave: y = (1/2)*sin(13pi/2*(2*x))*pow(2, 10 * ((2*x) - 1)) ; [0,0.5) y = (1/2)*(sin(-13pi/2*((2x-1)+1))*pow(2,-10(2*x-1)) + 2) ; [0.5, 1].
+
GLM_FUNC_DECL genType exponentialEaseIn(genType const &a)
Modelled after the exponential function y = 2^(10(x - 1))
+
GLM_FUNC_DECL genType quarticEaseOut(genType const &a)
Modelled after the quartic y = 1 - (x - 1)^4.
+
GLM_FUNC_DECL genType sineEaseInOut(genType const &a)
Modelled after half sine wave.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL genType backEaseOut(genType const &a, genType const &o)
+
GLM_FUNC_DECL genType elasticEaseOut(genType const &a)
Modelled after the damped sine wave y = sin(-13pi/2*(x + 1))*pow(2, -10x) + 1.
+
GLM_FUNC_DECL genType exponentialEaseInOut(genType const &a)
Modelled after the piecewise exponential y = (1/2)2^(10(2x - 1)) ; [0,0.5) y = -(1/2)*2^(-10(2x - 1))...
+
GLM_FUNC_DECL genType circularEaseInOut(genType const &a)
Modelled after the piecewise circular function y = (1/2)(1 - sqrt(1 - 4x^2)) ; [0, 0.5) y = (1/2)(sqrt(-(2x - 3)*(2x - 1)) + 1) ; [0.5, 1].
+
GLM_FUNC_DECL genType backEaseInOut(genType const &a, genType const &o)
+
GLM_FUNC_DECL genType cubicEaseOut(genType const &a)
Modelled after the cubic y = (x - 1)^3 + 1.
+
+ + + + diff --git a/common/glm/doc/api/a00473.html b/common/glm/doc/api/a00473.html new file mode 100644 index 000000000..68257e1cd --- /dev/null +++ b/common/glm/doc/api/a00473.html @@ -0,0 +1,217 @@ + + + + + + + +0.9.9 API documenation: euler_angles.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
euler_angles.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > derivedEulerAngleX (T const &angleX, T const &angularVelocityX)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > derivedEulerAngleY (T const &angleY, T const &angularVelocityY)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > derivedEulerAngleZ (T const &angleZ, T const &angularVelocityZ)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleX (T const &angleX)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleXY (T const &angleX, T const &angleY)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleXYX (T const &t1, T const &t2, T const &t3)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleXYZ (T const &t1, T const &t2, T const &t3)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleXZ (T const &angleX, T const &angleZ)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleXZX (T const &t1, T const &t2, T const &t3)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleXZY (T const &t1, T const &t2, T const &t3)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleY (T const &angleY)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleYX (T const &angleY, T const &angleX)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleYXY (T const &t1, T const &t2, T const &t3)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleYXZ (T const &yaw, T const &pitch, T const &roll)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleYZ (T const &angleY, T const &angleZ)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleYZX (T const &t1, T const &t2, T const &t3)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleYZY (T const &t1, T const &t2, T const &t3)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZ (T const &angleZ)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZX (T const &angle, T const &angleX)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZXY (T const &t1, T const &t2, T const &t3)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZXZ (T const &t1, T const &t2, T const &t3)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZY (T const &angleZ, T const &angleY)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZYX (T const &t1, T const &t2, T const &t3)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZYZ (T const &t1, T const &t2, T const &t3)
 
template<typename T >
GLM_FUNC_DECL void extractEulerAngleXYX (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
 
template<typename T >
GLM_FUNC_DECL void extractEulerAngleXYZ (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
 
template<typename T >
GLM_FUNC_DECL void extractEulerAngleXZX (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
 
template<typename T >
GLM_FUNC_DECL void extractEulerAngleXZY (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
 
template<typename T >
GLM_FUNC_DECL void extractEulerAngleYXY (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
 
template<typename T >
GLM_FUNC_DECL void extractEulerAngleYXZ (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
 
template<typename T >
GLM_FUNC_DECL void extractEulerAngleYZX (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
 
template<typename T >
GLM_FUNC_DECL void extractEulerAngleYZY (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
 
template<typename T >
GLM_FUNC_DECL void extractEulerAngleZXY (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
 
template<typename T >
GLM_FUNC_DECL void extractEulerAngleZXZ (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
 
template<typename T >
GLM_FUNC_DECL void extractEulerAngleZYX (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
 
template<typename T >
GLM_FUNC_DECL void extractEulerAngleZYZ (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
 
template<typename T >
GLM_FUNC_DECL mat< 2, 2, T, defaultp > orientate2 (T const &angle)
 
template<typename T >
GLM_FUNC_DECL mat< 3, 3, T, defaultp > orientate3 (T const &angle)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > orientate3 (vec< 3, T, Q > const &angles)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > orientate4 (vec< 3, T, Q > const &angles)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > yawPitchRoll (T const &yaw, T const &pitch, T const &roll)
 
+

Detailed Description

+

GLM_GTX_euler_angles

+
See also
Core features (dependence)
+ +

Definition in file euler_angles.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00473_source.html b/common/glm/doc/api/a00473_source.html new file mode 100644 index 000000000..b10d18496 --- /dev/null +++ b/common/glm/doc/api/a00473_source.html @@ -0,0 +1,126 @@ + + + + + + + +0.9.9 API documenation: euler_angles.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
euler_angles.hpp
+
+
+Go to the documentation of this file.
1 
16 #pragma once
17 
18 // Dependency:
19 #include "../glm.hpp"
20 
21 #ifndef GLM_ENABLE_EXPERIMENTAL
22 # error "GLM: GLM_GTX_euler_angles is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
23 #endif
24 
25 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
26 # pragma message("GLM: GLM_GTX_euler_angles extension included")
27 #endif
28 
29 namespace glm
30 {
33 
36  template<typename T>
37  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleX(
38  T const& angleX);
39 
42  template<typename T>
43  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleY(
44  T const& angleY);
45 
48  template<typename T>
49  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleZ(
50  T const& angleZ);
51 
54  template <typename T>
55  GLM_FUNC_DECL mat<4, 4, T, defaultp> derivedEulerAngleX(
56  T const & angleX, T const & angularVelocityX);
57 
60  template <typename T>
61  GLM_FUNC_DECL mat<4, 4, T, defaultp> derivedEulerAngleY(
62  T const & angleY, T const & angularVelocityY);
63 
66  template <typename T>
67  GLM_FUNC_DECL mat<4, 4, T, defaultp> derivedEulerAngleZ(
68  T const & angleZ, T const & angularVelocityZ);
69 
72  template<typename T>
73  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleXY(
74  T const& angleX,
75  T const& angleY);
76 
79  template<typename T>
80  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleYX(
81  T const& angleY,
82  T const& angleX);
83 
86  template<typename T>
87  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleXZ(
88  T const& angleX,
89  T const& angleZ);
90 
93  template<typename T>
94  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleZX(
95  T const& angle,
96  T const& angleX);
97 
100  template<typename T>
101  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleYZ(
102  T const& angleY,
103  T const& angleZ);
104 
107  template<typename T>
108  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleZY(
109  T const& angleZ,
110  T const& angleY);
111 
114  template<typename T>
115  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleXYZ(
116  T const& t1,
117  T const& t2,
118  T const& t3);
119 
122  template<typename T>
123  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleYXZ(
124  T const& yaw,
125  T const& pitch,
126  T const& roll);
127 
130  template <typename T>
131  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleXZX(
132  T const & t1,
133  T const & t2,
134  T const & t3);
135 
138  template <typename T>
139  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleXYX(
140  T const & t1,
141  T const & t2,
142  T const & t3);
143 
146  template <typename T>
147  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleYXY(
148  T const & t1,
149  T const & t2,
150  T const & t3);
151 
154  template <typename T>
155  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleYZY(
156  T const & t1,
157  T const & t2,
158  T const & t3);
159 
162  template <typename T>
163  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleZYZ(
164  T const & t1,
165  T const & t2,
166  T const & t3);
167 
170  template <typename T>
171  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleZXZ(
172  T const & t1,
173  T const & t2,
174  T const & t3);
175 
178  template <typename T>
179  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleXZY(
180  T const & t1,
181  T const & t2,
182  T const & t3);
183 
186  template <typename T>
187  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleYZX(
188  T const & t1,
189  T const & t2,
190  T const & t3);
191 
194  template <typename T>
195  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleZYX(
196  T const & t1,
197  T const & t2,
198  T const & t3);
199 
202  template <typename T>
203  GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleZXY(
204  T const & t1,
205  T const & t2,
206  T const & t3);
207 
210  template<typename T>
211  GLM_FUNC_DECL mat<4, 4, T, defaultp> yawPitchRoll(
212  T const& yaw,
213  T const& pitch,
214  T const& roll);
215 
218  template<typename T>
219  GLM_FUNC_DECL mat<2, 2, T, defaultp> orientate2(T const& angle);
220 
223  template<typename T>
224  GLM_FUNC_DECL mat<3, 3, T, defaultp> orientate3(T const& angle);
225 
228  template<typename T, qualifier Q>
229  GLM_FUNC_DECL mat<3, 3, T, Q> orientate3(vec<3, T, Q> const& angles);
230 
233  template<typename T, qualifier Q>
234  GLM_FUNC_DECL mat<4, 4, T, Q> orientate4(vec<3, T, Q> const& angles);
235 
238  template<typename T>
239  GLM_FUNC_DECL void extractEulerAngleXYZ(mat<4, 4, T, defaultp> const& M,
240  T & t1,
241  T & t2,
242  T & t3);
243 
246  template <typename T>
247  GLM_FUNC_DECL void extractEulerAngleYXZ(mat<4, 4, T, defaultp> const & M,
248  T & t1,
249  T & t2,
250  T & t3);
251 
254  template <typename T>
255  GLM_FUNC_DECL void extractEulerAngleXZX(mat<4, 4, T, defaultp> const & M,
256  T & t1,
257  T & t2,
258  T & t3);
259 
262  template <typename T>
263  GLM_FUNC_DECL void extractEulerAngleXYX(mat<4, 4, T, defaultp> const & M,
264  T & t1,
265  T & t2,
266  T & t3);
267 
270  template <typename T>
271  GLM_FUNC_DECL void extractEulerAngleYXY(mat<4, 4, T, defaultp> const & M,
272  T & t1,
273  T & t2,
274  T & t3);
275 
278  template <typename T>
279  GLM_FUNC_DECL void extractEulerAngleYZY(mat<4, 4, T, defaultp> const & M,
280  T & t1,
281  T & t2,
282  T & t3);
283 
286  template <typename T>
287  GLM_FUNC_DECL void extractEulerAngleZYZ(mat<4, 4, T, defaultp> const & M,
288  T & t1,
289  T & t2,
290  T & t3);
291 
294  template <typename T>
295  GLM_FUNC_DECL void extractEulerAngleZXZ(mat<4, 4, T, defaultp> const & M,
296  T & t1,
297  T & t2,
298  T & t3);
299 
302  template <typename T>
303  GLM_FUNC_DECL void extractEulerAngleXZY(mat<4, 4, T, defaultp> const & M,
304  T & t1,
305  T & t2,
306  T & t3);
307 
310  template <typename T>
311  GLM_FUNC_DECL void extractEulerAngleYZX(mat<4, 4, T, defaultp> const & M,
312  T & t1,
313  T & t2,
314  T & t3);
315 
318  template <typename T>
319  GLM_FUNC_DECL void extractEulerAngleZYX(mat<4, 4, T, defaultp> const & M,
320  T & t1,
321  T & t2,
322  T & t3);
323 
326  template <typename T>
327  GLM_FUNC_DECL void extractEulerAngleZXY(mat<4, 4, T, defaultp> const & M,
328  T & t1,
329  T & t2,
330  T & t3);
331 
333 }//namespace glm
334 
335 #include "euler_angles.inl"
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleYZX(T const &t1, T const &t2, T const &t3)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z * X).
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZYZ(T const &t1, T const &t2, T const &t3)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y * Z).
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZYX(T const &t1, T const &t2, T const &t3)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y * X).
+
GLM_FUNC_DECL mat< 2, 2, T, defaultp > orientate2(T const &angle)
Creates a 2D 2 * 2 rotation matrix from an euler angle.
+
GLM_FUNC_DECL void extractEulerAngleYZY(mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
Extracts the (Y * Z * Y) Euler angles from the rotation matrix M.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleXY(T const &angleX, T const &angleY)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y).
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > yawPitchRoll(T const &yaw, T const &pitch, T const &roll)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
+
GLM_FUNC_DECL void extractEulerAngleXZX(mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
Extracts the (X * Z * X) Euler angles from the rotation matrix M.
+
GLM_FUNC_DECL void extractEulerAngleXYX(mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
Extracts the (X * Y * X) Euler angles from the rotation matrix M.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleY(T const &angleY)
Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Y.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleYXY(T const &t1, T const &t2, T const &t3)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Y).
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > derivedEulerAngleY(T const &angleY, T const &angularVelocityY)
Creates a 3D 4 * 4 homogeneous derived matrix from the rotation matrix about Y-axis.
+
GLM_FUNC_DECL void extractEulerAngleZYX(mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
Extracts the (Z * Y * X) Euler angles from the rotation matrix M.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleYZ(T const &angleY, T const &angleZ)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z).
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleXYX(T const &t1, T const &t2, T const &t3)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y * X).
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleX(T const &angleX)
Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle X.
+
GLM_FUNC_DECL void extractEulerAngleZXY(mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
Extracts the (Z * X * Y) Euler angles from the rotation matrix M.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleYZY(T const &t1, T const &t2, T const &t3)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z * Y).
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleYXZ(T const &yaw, T const &pitch, T const &roll)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
+
GLM_FUNC_DECL void extractEulerAngleZYZ(mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
Extracts the (Z * Y * Z) Euler angles from the rotation matrix M.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZX(T const &angle, T const &angleX)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X).
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleXZX(T const &t1, T const &t2, T const &t3)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z * X).
+
GLM_FUNC_DECL void extractEulerAngleYZX(mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
Extracts the (Y * Z * X) Euler angles from the rotation matrix M.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleYX(T const &angleY, T const &angleX)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X).
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZY(T const &angleZ, T const &angleY)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y).
+
GLM_FUNC_DECL mat< 3, 3, T, Q > orientate3(vec< 3, T, Q > const &angles)
Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z).
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleXZY(T const &t1, T const &t2, T const &t3)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z * Y).
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZ(T const &angleZ)
Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Z.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleXZ(T const &angleX, T const &angleZ)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z).
+
GLM_FUNC_DECL mat< 4, 4, T, Q > orientate4(vec< 3, T, Q > const &angles)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
+
GLM_FUNC_DECL void extractEulerAngleYXZ(mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
Extracts the (Y * X * Z) Euler angles from the rotation matrix M.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > derivedEulerAngleX(T const &angleX, T const &angularVelocityX)
Creates a 3D 4 * 4 homogeneous derived matrix from the rotation matrix about X-axis.
+
GLM_FUNC_DECL void extractEulerAngleXZY(mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
Extracts the (X * Z * Y) Euler angles from the rotation matrix M.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZXY(T const &t1, T const &t2, T const &t3)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X * Y).
+
GLM_FUNC_DECL T pitch(qua< T, Q > const &x)
Returns pitch value of euler angles expressed in radians.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleXYZ(T const &t1, T const &t2, T const &t3)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y * Z).
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZXZ(T const &t1, T const &t2, T const &t3)
Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X * Z).
+
GLM_FUNC_DECL T roll(qua< T, Q > const &x)
Returns roll value of euler angles expressed in radians.
+
GLM_FUNC_DECL void extractEulerAngleYXY(mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
Extracts the (Y * X * Y) Euler angles from the rotation matrix M.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL void extractEulerAngleXYZ(mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
Extracts the (X * Y * Z) Euler angles from the rotation matrix M.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > derivedEulerAngleZ(T const &angleZ, T const &angularVelocityZ)
Creates a 3D 4 * 4 homogeneous derived matrix from the rotation matrix about Z-axis.
+
GLM_FUNC_DECL void extractEulerAngleZXZ(mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
Extracts the (Z * X * Z) Euler angles from the rotation matrix M.
+
GLM_FUNC_DECL T yaw(qua< T, Q > const &x)
Returns yaw value of euler angles expressed in radians.
+
GLM_FUNC_DECL T angle(qua< T, Q > const &x)
Returns the quaternion rotation angle.
+
+ + + + diff --git a/common/glm/doc/api/a00476.html b/common/glm/doc/api/a00476.html new file mode 100644 index 000000000..6915ddd9b --- /dev/null +++ b/common/glm/doc/api/a00476.html @@ -0,0 +1,97 @@ + + + + + + + +0.9.9 API documenation: extend.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
extend.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType extend (genType const &Origin, genType const &Source, typename genType::value_type const Length)
 
+

Detailed Description

+

GLM_GTX_extend

+
See also
Core features (dependence)
+ +

Definition in file extend.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00476_source.html b/common/glm/doc/api/a00476_source.html new file mode 100644 index 000000000..cbc3f80c1 --- /dev/null +++ b/common/glm/doc/api/a00476_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: extend.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
extend.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 
18 #ifndef GLM_ENABLE_EXPERIMENTAL
19 # error "GLM: GLM_GTX_extend is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
20 #endif
21 
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_GTX_extend extension included")
24 #endif
25 
26 namespace glm
27 {
30 
33  template<typename genType>
34  GLM_FUNC_DECL genType extend(
35  genType const& Origin,
36  genType const& Source,
37  typename genType::value_type const Length);
38 
40 }//namespace glm
41 
42 #include "extend.inl"
GLM_FUNC_DECL genType extend(genType const &Origin, genType const &Source, typename genType::value_type const Length)
Extends of Length the Origin position using the (Source - Origin) direction.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00479.html b/common/glm/doc/api/a00479.html new file mode 100644 index 000000000..06d663e3c --- /dev/null +++ b/common/glm/doc/api/a00479.html @@ -0,0 +1,145 @@ + + + + + + + +0.9.9 API documenation: extended_min_max.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
extended_min_max.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType fclamp (genType x, genType minVal, genType maxVal)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fclamp (vec< L, T, Q > const &x, T minVal, T maxVal)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fclamp (vec< L, T, Q > const &x, vec< L, T, Q > const &minVal, vec< L, T, Q > const &maxVal)
 
template<typename genType >
GLM_FUNC_DECL genType fmax (genType x, genType y)
 
template<typename genType >
GLM_FUNC_DECL genType fmin (genType x, genType y)
 
template<typename T >
GLM_FUNC_DECL T max (T const &x, T const &y, T const &z)
 
template<typename T , template< typename > class C>
GLM_FUNC_DECL C< T > max (C< T > const &x, typename C< T >::T const &y, typename C< T >::T const &z)
 
template<typename T , template< typename > class C>
GLM_FUNC_DECL C< T > max (C< T > const &x, C< T > const &y, C< T > const &z)
 
template<typename T >
GLM_FUNC_DECL T max (T const &x, T const &y, T const &z, T const &w)
 
template<typename T , template< typename > class C>
GLM_FUNC_DECL C< T > max (C< T > const &x, typename C< T >::T const &y, typename C< T >::T const &z, typename C< T >::T const &w)
 
template<typename T , template< typename > class C>
GLM_FUNC_DECL C< T > max (C< T > const &x, C< T > const &y, C< T > const &z, C< T > const &w)
 
template<typename T >
GLM_FUNC_DECL T min (T const &x, T const &y, T const &z)
 
template<typename T , template< typename > class C>
GLM_FUNC_DECL C< T > min (C< T > const &x, typename C< T >::T const &y, typename C< T >::T const &z)
 
template<typename T , template< typename > class C>
GLM_FUNC_DECL C< T > min (C< T > const &x, C< T > const &y, C< T > const &z)
 
template<typename T >
GLM_FUNC_DECL T min (T const &x, T const &y, T const &z, T const &w)
 
template<typename T , template< typename > class C>
GLM_FUNC_DECL C< T > min (C< T > const &x, typename C< T >::T const &y, typename C< T >::T const &z, typename C< T >::T const &w)
 
template<typename T , template< typename > class C>
GLM_FUNC_DECL C< T > min (C< T > const &x, C< T > const &y, C< T > const &z, C< T > const &w)
 
+

Detailed Description

+

GLM_GTX_extented_min_max

+
See also
Core features (dependence)
+ +

Definition in file extended_min_max.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00479_source.html b/common/glm/doc/api/a00479_source.html new file mode 100644 index 000000000..72493bffd --- /dev/null +++ b/common/glm/doc/api/a00479_source.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: extended_min_max.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
extended_min_max.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 
18 #ifndef GLM_ENABLE_EXPERIMENTAL
19 # error "GLM: GLM_GTX_extented_min_max is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
20 #endif
21 
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_GTX_extented_min_max extension included")
24 #endif
25 
26 namespace glm
27 {
30 
33  template<typename T>
34  GLM_FUNC_DECL T min(
35  T const& x,
36  T const& y,
37  T const& z);
38 
41  template<typename T, template<typename> class C>
42  GLM_FUNC_DECL C<T> min(
43  C<T> const& x,
44  typename C<T>::T const& y,
45  typename C<T>::T const& z);
46 
49  template<typename T, template<typename> class C>
50  GLM_FUNC_DECL C<T> min(
51  C<T> const& x,
52  C<T> const& y,
53  C<T> const& z);
54 
57  template<typename T>
58  GLM_FUNC_DECL T min(
59  T const& x,
60  T const& y,
61  T const& z,
62  T const& w);
63 
66  template<typename T, template<typename> class C>
67  GLM_FUNC_DECL C<T> min(
68  C<T> const& x,
69  typename C<T>::T const& y,
70  typename C<T>::T const& z,
71  typename C<T>::T const& w);
72 
75  template<typename T, template<typename> class C>
76  GLM_FUNC_DECL C<T> min(
77  C<T> const& x,
78  C<T> const& y,
79  C<T> const& z,
80  C<T> const& w);
81 
84  template<typename T>
85  GLM_FUNC_DECL T max(
86  T const& x,
87  T const& y,
88  T const& z);
89 
92  template<typename T, template<typename> class C>
93  GLM_FUNC_DECL C<T> max(
94  C<T> const& x,
95  typename C<T>::T const& y,
96  typename C<T>::T const& z);
97 
100  template<typename T, template<typename> class C>
101  GLM_FUNC_DECL C<T> max(
102  C<T> const& x,
103  C<T> const& y,
104  C<T> const& z);
105 
108  template<typename T>
109  GLM_FUNC_DECL T max(
110  T const& x,
111  T const& y,
112  T const& z,
113  T const& w);
114 
117  template<typename T, template<typename> class C>
118  GLM_FUNC_DECL C<T> max(
119  C<T> const& x,
120  typename C<T>::T const& y,
121  typename C<T>::T const& z,
122  typename C<T>::T const& w);
123 
126  template<typename T, template<typename> class C>
127  GLM_FUNC_DECL C<T> max(
128  C<T> const& x,
129  C<T> const& y,
130  C<T> const& z,
131  C<T> const& w);
132 
138  template<typename genType>
139  GLM_FUNC_DECL genType fmin(genType x, genType y);
140 
147  template<typename genType>
148  GLM_FUNC_DECL genType fmax(genType x, genType y);
149 
155  template<typename genType>
156  GLM_FUNC_DECL genType fclamp(genType x, genType minVal, genType maxVal);
157 
165  template<length_t L, typename T, qualifier Q>
166  GLM_FUNC_DECL vec<L, T, Q> fclamp(vec<L, T, Q> const& x, T minVal, T maxVal);
167 
175  template<length_t L, typename T, qualifier Q>
176  GLM_FUNC_DECL vec<L, T, Q> fclamp(vec<L, T, Q> const& x, vec<L, T, Q> const& minVal, vec<L, T, Q> const& maxVal);
177 
178 
180 }//namespace glm
181 
182 #include "extended_min_max.inl"
GLM_FUNC_DECL genType fmin(genType x, genType y)
Returns y if y < x; otherwise, it returns x.
+
GLM_FUNC_DECL C< T > min(C< T > const &x, C< T > const &y, C< T > const &z, C< T > const &w)
Return the minimum component-wise values of 4 inputs.
+
GLM_FUNC_DECL vec< L, T, Q > fclamp(vec< L, T, Q > const &x, vec< L, T, Q > const &minVal, vec< L, T, Q > const &maxVal)
Returns min(max(x, minVal), maxVal) for each component in x.
+
GLM_FUNC_DECL genType fmax(genType x, genType y)
Returns y if x < y; otherwise, it returns x.
+
GLM_FUNC_DECL C< T > max(C< T > const &x, C< T > const &y, C< T > const &z, C< T > const &w)
Return the maximum component-wise values of 4 inputs.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00482.html b/common/glm/doc/api/a00482.html new file mode 100644 index 000000000..7888e7917 --- /dev/null +++ b/common/glm/doc/api/a00482.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: exterior_product.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
exterior_product.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL T cross (vec< 2, T, Q > const &v, vec< 2, T, Q > const &u)
 
+

Detailed Description

+

GLM_GTX_exterior_product

+
See also
Core features (dependence)
+
+GLM_GTX_exterior_product (dependence)
+ +

Definition in file exterior_product.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00482_source.html b/common/glm/doc/api/a00482_source.html new file mode 100644 index 000000000..eb8fbdebe --- /dev/null +++ b/common/glm/doc/api/a00482_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: exterior_product.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
exterior_product.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependencies
17 #include "../detail/setup.hpp"
18 #include "../detail/qualifier.hpp"
19 
20 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
21 # pragma message("GLM: GLM_GTX_exterior_product extension included")
22 #endif
23 
24 namespace glm
25 {
28 
35  template<typename T, qualifier Q>
36  GLM_FUNC_DECL T cross(vec<2, T, Q> const& v, vec<2, T, Q> const& u);
37 
39 } //namespace glm
40 
41 #include "exterior_product.inl"
GLM_FUNC_DECL T cross(vec< 2, T, Q > const &v, vec< 2, T, Q > const &u)
Returns the cross product of x and y.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00485.html b/common/glm/doc/api/a00485.html new file mode 100644 index 000000000..69791adf9 --- /dev/null +++ b/common/glm/doc/api/a00485.html @@ -0,0 +1,132 @@ + + + + + + + +0.9.9 API documenation: fast_exponential.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
fast_exponential.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T >
GLM_FUNC_DECL T fastExp (T x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fastExp (vec< L, T, Q > const &x)
 
template<typename T >
GLM_FUNC_DECL T fastExp2 (T x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fastExp2 (vec< L, T, Q > const &x)
 
template<typename T >
GLM_FUNC_DECL T fastLog (T x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fastLog (vec< L, T, Q > const &x)
 
template<typename T >
GLM_FUNC_DECL T fastLog2 (T x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fastLog2 (vec< L, T, Q > const &x)
 
template<typename genType >
GLM_FUNC_DECL genType fastPow (genType x, genType y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fastPow (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<typename genTypeT , typename genTypeU >
GLM_FUNC_DECL genTypeT fastPow (genTypeT x, genTypeU y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fastPow (vec< L, T, Q > const &x)
 
+

Detailed Description

+

GLM_GTX_fast_exponential

+
See also
Core features (dependence)
+
+gtx_half_float (dependence)
+ +

Definition in file fast_exponential.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00485_source.html b/common/glm/doc/api/a00485_source.html new file mode 100644 index 000000000..ea0e2f683 --- /dev/null +++ b/common/glm/doc/api/a00485_source.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: fast_exponential.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
fast_exponential.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../glm.hpp"
18 
19 #ifndef GLM_ENABLE_EXPERIMENTAL
20 # error "GLM: GLM_GTX_fast_exponential is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
21 #endif
22 
23 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
24 # pragma message("GLM: GLM_GTX_fast_exponential extension included")
25 #endif
26 
27 namespace glm
28 {
31 
34  template<typename genType>
35  GLM_FUNC_DECL genType fastPow(genType x, genType y);
36 
39  template<length_t L, typename T, qualifier Q>
40  GLM_FUNC_DECL vec<L, T, Q> fastPow(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
41 
44  template<typename genTypeT, typename genTypeU>
45  GLM_FUNC_DECL genTypeT fastPow(genTypeT x, genTypeU y);
46 
49  template<length_t L, typename T, qualifier Q>
50  GLM_FUNC_DECL vec<L, T, Q> fastPow(vec<L, T, Q> const& x);
51 
54  template<typename T>
55  GLM_FUNC_DECL T fastExp(T x);
56 
59  template<length_t L, typename T, qualifier Q>
60  GLM_FUNC_DECL vec<L, T, Q> fastExp(vec<L, T, Q> const& x);
61 
64  template<typename T>
65  GLM_FUNC_DECL T fastLog(T x);
66 
69  template<length_t L, typename T, qualifier Q>
70  GLM_FUNC_DECL vec<L, T, Q> fastLog(vec<L, T, Q> const& x);
71 
74  template<typename T>
75  GLM_FUNC_DECL T fastExp2(T x);
76 
79  template<length_t L, typename T, qualifier Q>
80  GLM_FUNC_DECL vec<L, T, Q> fastExp2(vec<L, T, Q> const& x);
81 
84  template<typename T>
85  GLM_FUNC_DECL T fastLog2(T x);
86 
89  template<length_t L, typename T, qualifier Q>
90  GLM_FUNC_DECL vec<L, T, Q> fastLog2(vec<L, T, Q> const& x);
91 
93 }//namespace glm
94 
95 #include "fast_exponential.inl"
GLM_FUNC_DECL vec< L, T, Q > fastPow(vec< L, T, Q > const &x)
Faster than the common pow function but less accurate.
+
GLM_FUNC_DECL vec< L, T, Q > fastLog2(vec< L, T, Q > const &x)
Faster than the common log2 function but less accurate.
+
GLM_FUNC_DECL vec< L, T, Q > fastExp(vec< L, T, Q > const &x)
Faster than the common exp function but less accurate.
+
GLM_FUNC_DECL vec< L, T, Q > fastLog(vec< L, T, Q > const &x)
Faster than the common exp2 function but less accurate.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL vec< L, T, Q > fastExp2(vec< L, T, Q > const &x)
Faster than the common exp2 function but less accurate.
+
+ + + + diff --git a/common/glm/doc/api/a00488.html b/common/glm/doc/api/a00488.html new file mode 100644 index 000000000..88dd63283 --- /dev/null +++ b/common/glm/doc/api/a00488.html @@ -0,0 +1,121 @@ + + + + + + + +0.9.9 API documenation: fast_square_root.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
fast_square_root.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType fastDistance (genType x, genType y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T fastDistance (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<typename genType >
GLM_FUNC_DECL genType fastInverseSqrt (genType x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fastInverseSqrt (vec< L, T, Q > const &x)
 
template<typename genType >
GLM_FUNC_DECL genType fastLength (genType x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T fastLength (vec< L, T, Q > const &x)
 
template<typename genType >
GLM_FUNC_DECL genType fastNormalize (genType const &x)
 
template<typename genType >
GLM_FUNC_DECL genType fastSqrt (genType x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fastSqrt (vec< L, T, Q > const &x)
 
+

Detailed Description

+

GLM_GTX_fast_square_root

+
See also
Core features (dependence)
+ +

Definition in file fast_square_root.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00488_source.html b/common/glm/doc/api/a00488_source.html new file mode 100644 index 000000000..06106133e --- /dev/null +++ b/common/glm/doc/api/a00488_source.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: fast_square_root.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
fast_square_root.hpp
+
+
+Go to the documentation of this file.
1 
15 #pragma once
16 
17 // Dependency:
18 #include "../common.hpp"
19 #include "../exponential.hpp"
20 #include "../geometric.hpp"
21 
22 #ifndef GLM_ENABLE_EXPERIMENTAL
23 # error "GLM: GLM_GTX_fast_square_root is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
24 #endif
25 
26 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
27 # pragma message("GLM: GLM_GTX_fast_square_root extension included")
28 #endif
29 
30 namespace glm
31 {
34 
38  template<typename genType>
39  GLM_FUNC_DECL genType fastSqrt(genType x);
40 
44  template<length_t L, typename T, qualifier Q>
45  GLM_FUNC_DECL vec<L, T, Q> fastSqrt(vec<L, T, Q> const& x);
46 
50  template<typename genType>
51  GLM_FUNC_DECL genType fastInverseSqrt(genType x);
52 
56  template<length_t L, typename T, qualifier Q>
57  GLM_FUNC_DECL vec<L, T, Q> fastInverseSqrt(vec<L, T, Q> const& x);
58 
62  template<typename genType>
63  GLM_FUNC_DECL genType fastLength(genType x);
64 
68  template<length_t L, typename T, qualifier Q>
69  GLM_FUNC_DECL T fastLength(vec<L, T, Q> const& x);
70 
74  template<typename genType>
75  GLM_FUNC_DECL genType fastDistance(genType x, genType y);
76 
80  template<length_t L, typename T, qualifier Q>
81  GLM_FUNC_DECL T fastDistance(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
82 
86  template<typename genType>
87  GLM_FUNC_DECL genType fastNormalize(genType const& x);
88 
90 }// namespace glm
91 
92 #include "fast_square_root.inl"
GLM_FUNC_DECL vec< L, T, Q > fastInverseSqrt(vec< L, T, Q > const &x)
Faster than the common inversesqrt function but less accurate.
+
GLM_FUNC_DECL vec< L, T, Q > fastSqrt(vec< L, T, Q > const &x)
Faster than the common sqrt function but less accurate.
+
GLM_FUNC_DECL T fastLength(vec< L, T, Q > const &x)
Faster than the common length function but less accurate.
+
GLM_FUNC_DECL genType fastNormalize(genType const &x)
Faster than the common normalize function but less accurate.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL T fastDistance(vec< L, T, Q > const &x, vec< L, T, Q > const &y)
Faster than the common distance function but less accurate.
+
+ + + + diff --git a/common/glm/doc/api/a00491.html b/common/glm/doc/api/a00491.html new file mode 100644 index 000000000..cc7622d62 --- /dev/null +++ b/common/glm/doc/api/a00491.html @@ -0,0 +1,118 @@ + + + + + + + +0.9.9 API documenation: fast_trigonometry.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
fast_trigonometry.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T >
GLM_FUNC_DECL T fastAcos (T angle)
 
template<typename T >
GLM_FUNC_DECL T fastAsin (T angle)
 
template<typename T >
GLM_FUNC_DECL T fastAtan (T y, T x)
 
template<typename T >
GLM_FUNC_DECL T fastAtan (T angle)
 
template<typename T >
GLM_FUNC_DECL T fastCos (T angle)
 
template<typename T >
GLM_FUNC_DECL T fastSin (T angle)
 
template<typename T >
GLM_FUNC_DECL T fastTan (T angle)
 
template<typename T >
GLM_FUNC_DECL T wrapAngle (T angle)
 
+

Detailed Description

+

GLM_GTX_fast_trigonometry

+
See also
Core features (dependence)
+ +

Definition in file fast_trigonometry.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00491_source.html b/common/glm/doc/api/a00491_source.html new file mode 100644 index 000000000..fd0d5ea07 --- /dev/null +++ b/common/glm/doc/api/a00491_source.html @@ -0,0 +1,90 @@ + + + + + + + +0.9.9 API documenation: fast_trigonometry.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
fast_trigonometry.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../gtc/constants.hpp"
17 
18 #ifndef GLM_ENABLE_EXPERIMENTAL
19 # error "GLM: GLM_GTX_fast_trigonometry is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
20 #endif
21 
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_GTX_fast_trigonometry extension included")
24 #endif
25 
26 namespace glm
27 {
30 
33  template<typename T>
34  GLM_FUNC_DECL T wrapAngle(T angle);
35 
38  template<typename T>
39  GLM_FUNC_DECL T fastSin(T angle);
40 
43  template<typename T>
44  GLM_FUNC_DECL T fastCos(T angle);
45 
49  template<typename T>
50  GLM_FUNC_DECL T fastTan(T angle);
51 
55  template<typename T>
56  GLM_FUNC_DECL T fastAsin(T angle);
57 
61  template<typename T>
62  GLM_FUNC_DECL T fastAcos(T angle);
63 
67  template<typename T>
68  GLM_FUNC_DECL T fastAtan(T y, T x);
69 
73  template<typename T>
74  GLM_FUNC_DECL T fastAtan(T angle);
75 
77 }//namespace glm
78 
79 #include "fast_trigonometry.inl"
GLM_FUNC_DECL T fastAsin(T angle)
Faster than the common asin function but less accurate.
+
GLM_FUNC_DECL T fastAtan(T angle)
Faster than the common atan function but less accurate.
+
GLM_FUNC_DECL T fastTan(T angle)
Faster than the common tan function but less accurate.
+
GLM_FUNC_DECL T fastCos(T angle)
Faster than the common cos function but less accurate.
+
GLM_FUNC_DECL T wrapAngle(T angle)
Wrap an angle to [0 2pi[ From GLM_GTX_fast_trigonometry extension.
+
GLM_FUNC_DECL T fastAcos(T angle)
Faster than the common acos function but less accurate.
+
GLM_FUNC_DECL T fastSin(T angle)
Faster than the common sin function but less accurate.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL T angle(qua< T, Q > const &x)
Returns the quaternion rotation angle.
+
+ + + + diff --git a/common/glm/doc/api/a00494.html b/common/glm/doc/api/a00494.html new file mode 100644 index 000000000..fcfe01e5a --- /dev/null +++ b/common/glm/doc/api/a00494.html @@ -0,0 +1,102 @@ + + + + + + + +0.9.9 API documenation: functions.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
functions.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Functions

template<typename T >
GLM_FUNC_DECL T gauss (T x, T ExpectedValue, T StandardDeviation)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T gauss (vec< 2, T, Q > const &Coord, vec< 2, T, Q > const &ExpectedValue, vec< 2, T, Q > const &StandardDeviation)
 
+

Detailed Description

+

GLM_GTX_functions

+
See also
Core features (dependence)
+
+GLM_GTC_quaternion (dependence)
+ +

Definition in file functions.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00494_source.html b/common/glm/doc/api/a00494_source.html new file mode 100644 index 000000000..3f127e3c6 --- /dev/null +++ b/common/glm/doc/api/a00494_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: functions.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
functions.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependencies
17 #include "../detail/setup.hpp"
18 #include "../detail/qualifier.hpp"
19 #include "../detail/type_vec2.hpp"
20 
21 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
22 # pragma message("GLM: GLM_GTX_functions extension included")
23 #endif
24 
25 namespace glm
26 {
29 
33  template<typename T>
34  GLM_FUNC_DECL T gauss(
35  T x,
36  T ExpectedValue,
37  T StandardDeviation);
38 
42  template<typename T, qualifier Q>
43  GLM_FUNC_DECL T gauss(
44  vec<2, T, Q> const& Coord,
45  vec<2, T, Q> const& ExpectedValue,
46  vec<2, T, Q> const& StandardDeviation);
47 
49 }//namespace glm
50 
51 #include "functions.inl"
52 
GLM_FUNC_DECL T gauss(vec< 2, T, Q > const &Coord, vec< 2, T, Q > const &ExpectedValue, vec< 2, T, Q > const &StandardDeviation)
2D gauss function
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00497.html b/common/glm/doc/api/a00497.html new file mode 100644 index 000000000..65a5ae126 --- /dev/null +++ b/common/glm/doc/api/a00497.html @@ -0,0 +1,102 @@ + + + + + + + +0.9.9 API documenation: gradient_paint.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gradient_paint.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL T linearGradient (vec< 2, T, Q > const &Point0, vec< 2, T, Q > const &Point1, vec< 2, T, Q > const &Position)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T radialGradient (vec< 2, T, Q > const &Center, T const &Radius, vec< 2, T, Q > const &Focal, vec< 2, T, Q > const &Position)
 
+

Detailed Description

+

GLM_GTX_gradient_paint

+
See also
Core features (dependence)
+
+GLM_GTX_optimum_pow (dependence)
+ +

Definition in file gradient_paint.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00497_source.html b/common/glm/doc/api/a00497_source.html new file mode 100644 index 000000000..3e67947b1 --- /dev/null +++ b/common/glm/doc/api/a00497_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: gradient_paint.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gradient_paint.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../glm.hpp"
18 #include "../gtx/optimum_pow.hpp"
19 
20 #ifndef GLM_ENABLE_EXPERIMENTAL
21 # error "GLM: GLM_GTX_gradient_paint is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
22 #endif
23 
24 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
25 # pragma message("GLM: GLM_GTX_gradient_paint extension included")
26 #endif
27 
28 namespace glm
29 {
32 
35  template<typename T, qualifier Q>
36  GLM_FUNC_DECL T radialGradient(
37  vec<2, T, Q> const& Center,
38  T const& Radius,
39  vec<2, T, Q> const& Focal,
40  vec<2, T, Q> const& Position);
41 
44  template<typename T, qualifier Q>
45  GLM_FUNC_DECL T linearGradient(
46  vec<2, T, Q> const& Point0,
47  vec<2, T, Q> const& Point1,
48  vec<2, T, Q> const& Position);
49 
51 }// namespace glm
52 
53 #include "gradient_paint.inl"
GLM_FUNC_DECL T linearGradient(vec< 2, T, Q > const &Point0, vec< 2, T, Q > const &Point1, vec< 2, T, Q > const &Position)
Return a color from a linear gradient.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL T radialGradient(vec< 2, T, Q > const &Center, T const &Radius, vec< 2, T, Q > const &Focal, vec< 2, T, Q > const &Position)
Return a color from a radial gradient.
+
+ + + + diff --git a/common/glm/doc/api/a00500.html b/common/glm/doc/api/a00500.html new file mode 100644 index 000000000..079dbbb7c --- /dev/null +++ b/common/glm/doc/api/a00500.html @@ -0,0 +1,100 @@ + + + + + + + +0.9.9 API documenation: handed_coordinate_space.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
handed_coordinate_space.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL bool leftHanded (vec< 3, T, Q > const &tangent, vec< 3, T, Q > const &binormal, vec< 3, T, Q > const &normal)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL bool rightHanded (vec< 3, T, Q > const &tangent, vec< 3, T, Q > const &binormal, vec< 3, T, Q > const &normal)
 
+

Detailed Description

+

GLM_GTX_handed_coordinate_space

+
See also
Core features (dependence)
+ +

Definition in file handed_coordinate_space.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00500_source.html b/common/glm/doc/api/a00500_source.html new file mode 100644 index 000000000..cea736c40 --- /dev/null +++ b/common/glm/doc/api/a00500_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: handed_coordinate_space.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
handed_coordinate_space.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 
18 #ifndef GLM_ENABLE_EXPERIMENTAL
19 # error "GLM: GLM_GTX_handed_coordinate_space is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
20 #endif
21 
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_GTX_handed_coordinate_space extension included")
24 #endif
25 
26 namespace glm
27 {
30 
33  template<typename T, qualifier Q>
34  GLM_FUNC_DECL bool rightHanded(
35  vec<3, T, Q> const& tangent,
36  vec<3, T, Q> const& binormal,
37  vec<3, T, Q> const& normal);
38 
41  template<typename T, qualifier Q>
42  GLM_FUNC_DECL bool leftHanded(
43  vec<3, T, Q> const& tangent,
44  vec<3, T, Q> const& binormal,
45  vec<3, T, Q> const& normal);
46 
48 }// namespace glm
49 
50 #include "handed_coordinate_space.inl"
GLM_FUNC_DECL bool leftHanded(vec< 3, T, Q > const &tangent, vec< 3, T, Q > const &binormal, vec< 3, T, Q > const &normal)
Return if a trihedron left handed or not.
+
GLM_FUNC_DECL bool rightHanded(vec< 3, T, Q > const &tangent, vec< 3, T, Q > const &binormal, vec< 3, T, Q > const &normal)
Return if a trihedron right handed or not.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00503.html b/common/glm/doc/api/a00503.html new file mode 100644 index 000000000..8205a5ab9 --- /dev/null +++ b/common/glm/doc/api/a00503.html @@ -0,0 +1,88 @@ + + + + + + + +0.9.9 API documenation: hash.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
hash.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

GLM_GTX_hash

+
See also
Core features (dependence)
+ +

Definition in file hash.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00503_source.html b/common/glm/doc/api/a00503_source.html new file mode 100644 index 000000000..2038eb1fa --- /dev/null +++ b/common/glm/doc/api/a00503_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: hash.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
hash.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 #ifndef GLM_ENABLE_EXPERIMENTAL
16 # error "GLM: GLM_GTX_hash is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
17 #endif
18 
19 #include <functional>
20 
21 #include "../vec2.hpp"
22 #include "../vec3.hpp"
23 #include "../vec4.hpp"
24 #include "../gtc/vec1.hpp"
25 
26 #include "../gtc/quaternion.hpp"
27 #include "../gtx/dual_quaternion.hpp"
28 
29 #include "../mat2x2.hpp"
30 #include "../mat2x3.hpp"
31 #include "../mat2x4.hpp"
32 
33 #include "../mat3x2.hpp"
34 #include "../mat3x3.hpp"
35 #include "../mat3x4.hpp"
36 
37 #include "../mat4x2.hpp"
38 #include "../mat4x3.hpp"
39 #include "../mat4x4.hpp"
40 
41 #if !GLM_HAS_CXX11_STL
42 # error "GLM_GTX_hash requires C++11 standard library support"
43 #endif
44 
45 namespace std
46 {
47  template<typename T, glm::qualifier Q>
48  struct hash<glm::vec<1, T,Q> >
49  {
50  GLM_FUNC_DECL size_t operator()(glm::vec<1, T, Q> const& v) const;
51  };
52 
53  template<typename T, glm::qualifier Q>
54  struct hash<glm::vec<2, T,Q> >
55  {
56  GLM_FUNC_DECL size_t operator()(glm::vec<2, T, Q> const& v) const;
57  };
58 
59  template<typename T, glm::qualifier Q>
60  struct hash<glm::vec<3, T,Q> >
61  {
62  GLM_FUNC_DECL size_t operator()(glm::vec<3, T, Q> const& v) const;
63  };
64 
65  template<typename T, glm::qualifier Q>
66  struct hash<glm::vec<4, T,Q> >
67  {
68  GLM_FUNC_DECL size_t operator()(glm::vec<4, T, Q> const& v) const;
69  };
70 
71  template<typename T, glm::qualifier Q>
72  struct hash<glm::tquat<T,Q>>
73  {
74  GLM_FUNC_DECL size_t operator()(glm::tquat<T, Q> const& q) const;
75  };
76 
77  template<typename T, glm::qualifier Q>
78  struct hash<glm::tdualquat<T,Q> >
79  {
80  GLM_FUNC_DECL size_t operator()(glm::tdualquat<T,Q> const& q) const;
81  };
82 
83  template<typename T, glm::qualifier Q>
84  struct hash<glm::mat<2, 2, T,Q> >
85  {
86  GLM_FUNC_DECL size_t operator()(glm::mat<2, 2, T,Q> const& m) const;
87  };
88 
89  template<typename T, glm::qualifier Q>
90  struct hash<glm::mat<2, 3, T,Q> >
91  {
92  GLM_FUNC_DECL size_t operator()(glm::mat<2, 3, T,Q> const& m) const;
93  };
94 
95  template<typename T, glm::qualifier Q>
96  struct hash<glm::mat<2, 4, T,Q> >
97  {
98  GLM_FUNC_DECL size_t operator()(glm::mat<2, 4, T,Q> const& m) const;
99  };
100 
101  template<typename T, glm::qualifier Q>
102  struct hash<glm::mat<3, 2, T,Q> >
103  {
104  GLM_FUNC_DECL size_t operator()(glm::mat<3, 2, T,Q> const& m) const;
105  };
106 
107  template<typename T, glm::qualifier Q>
108  struct hash<glm::mat<3, 3, T,Q> >
109  {
110  GLM_FUNC_DECL size_t operator()(glm::mat<3, 3, T,Q> const& m) const;
111  };
112 
113  template<typename T, glm::qualifier Q>
114  struct hash<glm::mat<3, 4, T,Q> >
115  {
116  GLM_FUNC_DECL size_t operator()(glm::mat<3, 4, T,Q> const& m) const;
117  };
118 
119  template<typename T, glm::qualifier Q>
120  struct hash<glm::mat<4, 2, T,Q> >
121  {
122  GLM_FUNC_DECL size_t operator()(glm::mat<4, 2, T,Q> const& m) const;
123  };
124 
125  template<typename T, glm::qualifier Q>
126  struct hash<glm::mat<4, 3, T,Q> >
127  {
128  GLM_FUNC_DECL size_t operator()(glm::mat<4, 3, T,Q> const& m) const;
129  };
130 
131  template<typename T, glm::qualifier Q>
132  struct hash<glm::mat<4, 4, T,Q> >
133  {
134  GLM_FUNC_DECL size_t operator()(glm::mat<4, 4, T,Q> const& m) const;
135  };
136 } // namespace std
137 
138 #include "hash.inl"
Definition: hash.hpp:45
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00506.html b/common/glm/doc/api/a00506.html new file mode 100644 index 000000000..6328e4404 --- /dev/null +++ b/common/glm/doc/api/a00506.html @@ -0,0 +1,114 @@ + + + + + + + +0.9.9 API documenation: intersect.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
intersect.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL bool intersectLineSphere (genType const &point0, genType const &point1, genType const &sphereCenter, typename genType::value_type sphereRadius, genType &intersectionPosition1, genType &intersectionNormal1, genType &intersectionPosition2=genType(), genType &intersectionNormal2=genType())
 
template<typename genType >
GLM_FUNC_DECL bool intersectLineTriangle (genType const &orig, genType const &dir, genType const &vert0, genType const &vert1, genType const &vert2, genType &position)
 
template<typename genType >
GLM_FUNC_DECL bool intersectRayPlane (genType const &orig, genType const &dir, genType const &planeOrig, genType const &planeNormal, typename genType::value_type &intersectionDistance)
 
template<typename genType >
GLM_FUNC_DECL bool intersectRaySphere (genType const &rayStarting, genType const &rayNormalizedDirection, genType const &sphereCenter, typename genType::value_type const sphereRadiusSquered, typename genType::value_type &intersectionDistance)
 
template<typename genType >
GLM_FUNC_DECL bool intersectRaySphere (genType const &rayStarting, genType const &rayNormalizedDirection, genType const &sphereCenter, const typename genType::value_type sphereRadius, genType &intersectionPosition, genType &intersectionNormal)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL bool intersectRayTriangle (vec< 3, T, Q > const &orig, vec< 3, T, Q > const &dir, vec< 3, T, Q > const &v0, vec< 3, T, Q > const &v1, vec< 3, T, Q > const &v2, vec< 2, T, Q > &baryPosition, T &distance)
 
+

Detailed Description

+

GLM_GTX_intersect

+
See also
Core features (dependence)
+
+GLM_GTX_closest_point (dependence)
+ +

Definition in file intersect.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00506_source.html b/common/glm/doc/api/a00506_source.html new file mode 100644 index 000000000..59d2ff87d --- /dev/null +++ b/common/glm/doc/api/a00506_source.html @@ -0,0 +1,88 @@ + + + + + + + +0.9.9 API documenation: intersect.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
intersect.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include <cfloat>
18 #include <limits>
19 #include "../glm.hpp"
20 #include "../geometric.hpp"
21 #include "../gtx/closest_point.hpp"
22 #include "../gtx/vector_query.hpp"
23 
24 #ifndef GLM_ENABLE_EXPERIMENTAL
25 # error "GLM: GLM_GTX_closest_point is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
26 #endif
27 
28 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
29 # pragma message("GLM: GLM_GTX_closest_point extension included")
30 #endif
31 
32 namespace glm
33 {
36 
40  template<typename genType>
41  GLM_FUNC_DECL bool intersectRayPlane(
42  genType const& orig, genType const& dir,
43  genType const& planeOrig, genType const& planeNormal,
44  typename genType::value_type & intersectionDistance);
45 
49  template<typename T, qualifier Q>
50  GLM_FUNC_DECL bool intersectRayTriangle(
51  vec<3, T, Q> const& orig, vec<3, T, Q> const& dir,
52  vec<3, T, Q> const& v0, vec<3, T, Q> const& v1, vec<3, T, Q> const& v2,
53  vec<2, T, Q>& baryPosition, T& distance);
54 
57  template<typename genType>
58  GLM_FUNC_DECL bool intersectLineTriangle(
59  genType const& orig, genType const& dir,
60  genType const& vert0, genType const& vert1, genType const& vert2,
61  genType & position);
62 
66  template<typename genType>
67  GLM_FUNC_DECL bool intersectRaySphere(
68  genType const& rayStarting, genType const& rayNormalizedDirection,
69  genType const& sphereCenter, typename genType::value_type const sphereRadiusSquered,
70  typename genType::value_type & intersectionDistance);
71 
74  template<typename genType>
75  GLM_FUNC_DECL bool intersectRaySphere(
76  genType const& rayStarting, genType const& rayNormalizedDirection,
77  genType const& sphereCenter, const typename genType::value_type sphereRadius,
78  genType & intersectionPosition, genType & intersectionNormal);
79 
82  template<typename genType>
83  GLM_FUNC_DECL bool intersectLineSphere(
84  genType const& point0, genType const& point1,
85  genType const& sphereCenter, typename genType::value_type sphereRadius,
86  genType & intersectionPosition1, genType & intersectionNormal1,
87  genType & intersectionPosition2 = genType(), genType & intersectionNormal2 = genType());
88 
90 }//namespace glm
91 
92 #include "intersect.inl"
GLM_FUNC_DECL bool intersectLineSphere(genType const &point0, genType const &point1, genType const &sphereCenter, typename genType::value_type sphereRadius, genType &intersectionPosition1, genType &intersectionNormal1, genType &intersectionPosition2=genType(), genType &intersectionNormal2=genType())
Compute the intersection of a line and a sphere.
+
GLM_FUNC_DECL T distance(vec< L, T, Q > const &p0, vec< L, T, Q > const &p1)
Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).
+
GLM_FUNC_DECL bool intersectRaySphere(genType const &rayStarting, genType const &rayNormalizedDirection, genType const &sphereCenter, const typename genType::value_type sphereRadius, genType &intersectionPosition, genType &intersectionNormal)
Compute the intersection of a ray and a sphere.
+
GLM_FUNC_DECL bool intersectRayPlane(genType const &orig, genType const &dir, genType const &planeOrig, genType const &planeNormal, typename genType::value_type &intersectionDistance)
Compute the intersection of a ray and a plane.
+
GLM_FUNC_DECL bool intersectLineTriangle(genType const &orig, genType const &dir, genType const &vert0, genType const &vert1, genType const &vert2, genType &position)
Compute the intersection of a line and a triangle.
+
GLM_FUNC_DECL bool intersectRayTriangle(vec< 3, T, Q > const &orig, vec< 3, T, Q > const &dir, vec< 3, T, Q > const &v0, vec< 3, T, Q > const &v1, vec< 3, T, Q > const &v2, vec< 2, T, Q > &baryPosition, T &distance)
Compute the intersection of a ray and a triangle.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00509.html b/common/glm/doc/api/a00509.html new file mode 100644 index 000000000..497e22734 --- /dev/null +++ b/common/glm/doc/api/a00509.html @@ -0,0 +1,93 @@ + + + + + + + +0.9.9 API documenation: io.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
io.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

GLM_GTX_io

+
Author
Jan P Springer (regni.nosp@m.rpsj.nosp@m.@gmai.nosp@m.l.co.nosp@m.m)
+
See also
Core features (dependence)
+
+GLM_GTC_matrix_access (dependence)
+
+GLM_GTC_quaternion (dependence)
+ +

Definition in file io.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00509_source.html b/common/glm/doc/api/a00509_source.html new file mode 100644 index 000000000..f263b6ab7 --- /dev/null +++ b/common/glm/doc/api/a00509_source.html @@ -0,0 +1,82 @@ + + + + + + + +0.9.9 API documenation: io.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
io.hpp
+
+
+Go to the documentation of this file.
1 
20 #pragma once
21 
22 // Dependency:
23 #include "../glm.hpp"
24 #include "../gtx/quaternion.hpp"
25 
26 #ifndef GLM_ENABLE_EXPERIMENTAL
27 # error "GLM: GLM_GTX_io is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
28 #endif
29 
30 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
31 # pragma message("GLM: GLM_GTX_io extension included")
32 #endif
33 
34 #include <iosfwd> // std::basic_ostream<> (fwd)
35 #include <locale> // std::locale, std::locale::facet, std::locale::id
36 #include <utility> // std::pair<>
37 
38 namespace glm
39 {
42 
43  namespace io
44  {
45  enum order_type { column_major, row_major};
46 
47  template<typename CTy>
48  class format_punct : public std::locale::facet
49  {
50  typedef CTy char_type;
51 
52  public:
53 
54  static std::locale::id id;
55 
56  bool formatted;
57  unsigned precision;
58  unsigned width;
59  char_type separator;
60  char_type delim_left;
61  char_type delim_right;
62  char_type space;
63  char_type newline;
64  order_type order;
65 
66  GLM_FUNC_DECL explicit format_punct(size_t a = 0);
67  GLM_FUNC_DECL explicit format_punct(format_punct const&);
68  };
69 
70  template<typename CTy, typename CTr = std::char_traits<CTy> >
71  class basic_state_saver {
72 
73  public:
74 
75  GLM_FUNC_DECL explicit basic_state_saver(std::basic_ios<CTy,CTr>&);
76  GLM_FUNC_DECL ~basic_state_saver();
77 
78  private:
79 
80  typedef ::std::basic_ios<CTy,CTr> state_type;
81  typedef typename state_type::char_type char_type;
82  typedef ::std::ios_base::fmtflags flags_type;
83  typedef ::std::streamsize streamsize_type;
84  typedef ::std::locale const locale_type;
85 
86  state_type& state_;
87  flags_type flags_;
88  streamsize_type precision_;
89  streamsize_type width_;
90  char_type fill_;
91  locale_type locale_;
92 
93  GLM_FUNC_DECL basic_state_saver& operator=(basic_state_saver const&);
94  };
95 
96  typedef basic_state_saver<char> state_saver;
97  typedef basic_state_saver<wchar_t> wstate_saver;
98 
99  template<typename CTy, typename CTr = std::char_traits<CTy> >
100  class basic_format_saver
101  {
102  public:
103 
104  GLM_FUNC_DECL explicit basic_format_saver(std::basic_ios<CTy,CTr>&);
105  GLM_FUNC_DECL ~basic_format_saver();
106 
107  private:
108 
109  basic_state_saver<CTy> const bss_;
110 
111  GLM_FUNC_DECL basic_format_saver& operator=(basic_format_saver const&);
112  };
113 
114  typedef basic_format_saver<char> format_saver;
115  typedef basic_format_saver<wchar_t> wformat_saver;
116 
117  struct precision
118  {
119  unsigned value;
120 
121  GLM_FUNC_DECL explicit precision(unsigned);
122  };
123 
124  struct width
125  {
126  unsigned value;
127 
128  GLM_FUNC_DECL explicit width(unsigned);
129  };
130 
131  template<typename CTy>
132  struct delimeter
133  {
134  CTy value[3];
135 
136  GLM_FUNC_DECL explicit delimeter(CTy /* left */, CTy /* right */, CTy /* separator */ = ',');
137  };
138 
139  struct order
140  {
141  order_type value;
142 
143  GLM_FUNC_DECL explicit order(order_type);
144  };
145 
146  // functions, inlined (inline)
147 
148  template<typename FTy, typename CTy, typename CTr>
149  FTy const& get_facet(std::basic_ios<CTy,CTr>&);
150  template<typename FTy, typename CTy, typename CTr>
151  std::basic_ios<CTy,CTr>& formatted(std::basic_ios<CTy,CTr>&);
152  template<typename FTy, typename CTy, typename CTr>
153  std::basic_ios<CTy,CTr>& unformattet(std::basic_ios<CTy,CTr>&);
154 
155  template<typename CTy, typename CTr>
156  std::basic_ostream<CTy, CTr>& operator<<(std::basic_ostream<CTy, CTr>&, precision const&);
157  template<typename CTy, typename CTr>
158  std::basic_ostream<CTy, CTr>& operator<<(std::basic_ostream<CTy, CTr>&, width const&);
159  template<typename CTy, typename CTr>
160  std::basic_ostream<CTy, CTr>& operator<<(std::basic_ostream<CTy, CTr>&, delimeter<CTy> const&);
161  template<typename CTy, typename CTr>
162  std::basic_ostream<CTy, CTr>& operator<<(std::basic_ostream<CTy, CTr>&, order const&);
163  }//namespace io
164 
165  template<typename CTy, typename CTr, typename T, qualifier Q>
166  GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, qua<T, Q> const&);
167  template<typename CTy, typename CTr, typename T, qualifier Q>
168  GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, vec<1, T, Q> const&);
169  template<typename CTy, typename CTr, typename T, qualifier Q>
170  GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, vec<2, T, Q> const&);
171  template<typename CTy, typename CTr, typename T, qualifier Q>
172  GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, vec<3, T, Q> const&);
173  template<typename CTy, typename CTr, typename T, qualifier Q>
174  GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, vec<4, T, Q> const&);
175  template<typename CTy, typename CTr, typename T, qualifier Q>
176  GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, mat<2, 2, T, Q> const&);
177  template<typename CTy, typename CTr, typename T, qualifier Q>
178  GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, mat<2, 3, T, Q> const&);
179  template<typename CTy, typename CTr, typename T, qualifier Q>
180  GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, mat<2, 4, T, Q> const&);
181  template<typename CTy, typename CTr, typename T, qualifier Q>
182  GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, mat<3, 2, T, Q> const&);
183  template<typename CTy, typename CTr, typename T, qualifier Q>
184  GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, mat<3, 3, T, Q> const&);
185  template<typename CTy, typename CTr, typename T, qualifier Q>
186  GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, mat<3, 4, T, Q> const&);
187  template<typename CTy, typename CTr, typename T, qualifier Q>
188  GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, mat<4, 2, T, Q> const&);
189  template<typename CTy, typename CTr, typename T, qualifier Q>
190  GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, mat<4, 3, T, Q> const&);
191  template<typename CTy, typename CTr, typename T, qualifier Q>
192  GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, mat<4, 4, T, Q> const&);
193 
194  template<typename CTy, typename CTr, typename T, qualifier Q>
195  GLM_FUNC_DECL std::basic_ostream<CTy,CTr> & operator<<(std::basic_ostream<CTy,CTr> &,
196  std::pair<mat<4, 4, T, Q> const, mat<4, 4, T, Q> const> const&);
197 
199 }//namespace glm
200 
201 #include "io.inl"
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00512.html b/common/glm/doc/api/a00512.html new file mode 100644 index 000000000..d0df9560a --- /dev/null +++ b/common/glm/doc/api/a00512.html @@ -0,0 +1,100 @@ + + + + + + + +0.9.9 API documenation: log_base.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
log_base.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType log (genType const &x, genType const &base)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > sign (vec< L, T, Q > const &x, vec< L, T, Q > const &base)
 
+

Detailed Description

+

GLM_GTX_log_base

+
See also
Core features (dependence)
+ +

Definition in file log_base.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00512_source.html b/common/glm/doc/api/a00512_source.html new file mode 100644 index 000000000..a15b0bfde --- /dev/null +++ b/common/glm/doc/api/a00512_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: log_base.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
log_base.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 
18 #ifndef GLM_ENABLE_EXPERIMENTAL
19 # error "GLM: GLM_GTX_log_base is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
20 #endif
21 
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_GTX_log_base extension included")
24 #endif
25 
26 namespace glm
27 {
30 
33  template<typename genType>
34  GLM_FUNC_DECL genType log(
35  genType const& x,
36  genType const& base);
37 
40  template<length_t L, typename T, qualifier Q>
41  GLM_FUNC_DECL vec<L, T, Q> sign(
42  vec<L, T, Q> const& x,
43  vec<L, T, Q> const& base);
44 
46 }//namespace glm
47 
48 #include "log_base.inl"
GLM_FUNC_DECL vec< L, T, Q > sign(vec< L, T, Q > const &x, vec< L, T, Q > const &base)
Logarithm for any base.
+
GLM_FUNC_DECL genType log(genType const &x, genType const &base)
Logarithm for any base.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00515.html b/common/glm/doc/api/a00515.html new file mode 100644 index 000000000..be4bffcd2 --- /dev/null +++ b/common/glm/doc/api/a00515.html @@ -0,0 +1,102 @@ + + + + + + + +0.9.9 API documenation: matrix_cross_product.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_cross_product.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > matrixCross3 (vec< 3, T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > matrixCross4 (vec< 3, T, Q > const &x)
 
+

Detailed Description

+

GLM_GTX_matrix_cross_product

+
See also
Core features (dependence)
+
+gtx_extented_min_max (dependence)
+ +

Definition in file matrix_cross_product.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00515_source.html b/common/glm/doc/api/a00515_source.html new file mode 100644 index 000000000..5c0a4a532 --- /dev/null +++ b/common/glm/doc/api/a00515_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: matrix_cross_product.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_cross_product.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../glm.hpp"
18 
19 #ifndef GLM_ENABLE_EXPERIMENTAL
20 # error "GLM: GLM_GTX_matrix_cross_product is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
21 #endif
22 
23 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
24 # pragma message("GLM: GLM_GTX_matrix_cross_product extension included")
25 #endif
26 
27 namespace glm
28 {
31 
34  template<typename T, qualifier Q>
35  GLM_FUNC_DECL mat<3, 3, T, Q> matrixCross3(
36  vec<3, T, Q> const& x);
37 
40  template<typename T, qualifier Q>
41  GLM_FUNC_DECL mat<4, 4, T, Q> matrixCross4(
42  vec<3, T, Q> const& x);
43 
45 }//namespace glm
46 
47 #include "matrix_cross_product.inl"
GLM_FUNC_DECL mat< 3, 3, T, Q > matrixCross3(vec< 3, T, Q > const &x)
Build a cross product matrix.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > matrixCross4(vec< 3, T, Q > const &x)
Build a cross product matrix.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00518.html b/common/glm/doc/api/a00518.html new file mode 100644 index 000000000..a1010a9c5 --- /dev/null +++ b/common/glm/doc/api/a00518.html @@ -0,0 +1,97 @@ + + + + + + + +0.9.9 API documenation: matrix_decompose.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_decompose.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL bool decompose (mat< 4, 4, T, Q > const &modelMatrix, vec< 3, T, Q > &scale, qua< T, Q > &orientation, vec< 3, T, Q > &translation, vec< 3, T, Q > &skew, vec< 4, T, Q > &perspective)
 
+

Detailed Description

+

GLM_GTX_matrix_decompose

+
See also
Core features (dependence)
+ +

Definition in file matrix_decompose.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00518_source.html b/common/glm/doc/api/a00518_source.html new file mode 100644 index 000000000..f1bcbd77b --- /dev/null +++ b/common/glm/doc/api/a00518_source.html @@ -0,0 +1,86 @@ + + + + + + + +0.9.9 API documenation: matrix_decompose.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_decompose.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependencies
16 #include "../mat4x4.hpp"
17 #include "../vec3.hpp"
18 #include "../vec4.hpp"
19 #include "../geometric.hpp"
20 #include "../gtc/quaternion.hpp"
21 #include "../gtc/matrix_transform.hpp"
22 
23 #ifndef GLM_ENABLE_EXPERIMENTAL
24 # error "GLM: GLM_GTX_matrix_decompose is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
25 #endif
26 
27 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
28 # pragma message("GLM: GLM_GTX_matrix_decompose extension included")
29 #endif
30 
31 namespace glm
32 {
35 
38  template<typename T, qualifier Q>
39  GLM_FUNC_DECL bool decompose(
40  mat<4, 4, T, Q> const& modelMatrix,
41  vec<3, T, Q> & scale, qua<T, Q> & orientation, vec<3, T, Q> & translation, vec<3, T, Q> & skew, vec<4, T, Q> & perspective);
42 
44 }//namespace glm
45 
46 #include "matrix_decompose.inl"
GLM_FUNC_DECL bool decompose(mat< 4, 4, T, Q > const &modelMatrix, vec< 3, T, Q > &scale, qua< T, Q > &orientation, vec< 3, T, Q > &translation, vec< 3, T, Q > &skew, vec< 4, T, Q > &perspective)
Decomposes a model matrix to translations, rotation and scale components.
+
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspective(T fovy, T aspect, T near, T far)
Creates a matrix for a symetric perspective-view frustum based on the default handedness and default ...
+
GLM_FUNC_DECL mat< 4, 4, T, Q > scale(mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &v)
Builds a scale 4 * 4 matrix created from 3 scalars.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > orientation(vec< 3, T, Q > const &Normal, vec< 3, T, Q > const &Up)
Build a rotation matrix from a normal and a up vector.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00521.html b/common/glm/doc/api/a00521.html new file mode 100644 index 000000000..437e655fe --- /dev/null +++ b/common/glm/doc/api/a00521.html @@ -0,0 +1,106 @@ + + + + + + + +0.9.9 API documenation: matrix_factorisation.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_factorisation.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + +

+Functions

template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL mat< C, R, T, Q > fliplr (mat< C, R, T, Q > const &in)
 
template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL mat< C, R, T, Q > flipud (mat< C, R, T, Q > const &in)
 
template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL void qr_decompose (mat< C, R, T, Q > const &in, mat<(C< R ? C :R), R, T, Q > &q, mat< C,(C< R ? C :R), T, Q > &r)
 
template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL void rq_decompose (mat< C, R, T, Q > const &in, mat<(C< R ? C :R), R, T, Q > &r, mat< C,(C< R ? C :R), T, Q > &q)
 
+

Detailed Description

+

GLM_GTX_matrix_factorisation

+
See also
Core features (dependence)
+ +

Definition in file matrix_factorisation.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00521_source.html b/common/glm/doc/api/a00521_source.html new file mode 100644 index 000000000..f486c3bf8 --- /dev/null +++ b/common/glm/doc/api/a00521_source.html @@ -0,0 +1,86 @@ + + + + + + + +0.9.9 API documenation: matrix_factorisation.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_factorisation.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 
18 #ifndef GLM_ENABLE_EXPERIMENTAL
19 # error "GLM: GLM_GTX_matrix_factorisation is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
20 #endif
21 
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_GTX_matrix_factorisation extension included")
24 #endif
25 
26 /*
27 Suggestions:
28  - Move helper functions flipud and fliplr to another file: They may be helpful in more general circumstances.
29  - Implement other types of matrix factorisation, such as: QL and LQ, L(D)U, eigendecompositions, etc...
30 */
31 
32 namespace glm
33 {
36 
40  template <length_t C, length_t R, typename T, qualifier Q>
41  GLM_FUNC_DECL mat<C, R, T, Q> flipud(mat<C, R, T, Q> const& in);
42 
46  template <length_t C, length_t R, typename T, qualifier Q>
47  GLM_FUNC_DECL mat<C, R, T, Q> fliplr(mat<C, R, T, Q> const& in);
48 
54  template <length_t C, length_t R, typename T, qualifier Q>
55  GLM_FUNC_DECL void qr_decompose(mat<C, R, T, Q> const& in, mat<(C < R ? C : R), R, T, Q>& q, mat<C, (C < R ? C : R), T, Q>& r);
56 
63  template <length_t C, length_t R, typename T, qualifier Q>
64  GLM_FUNC_DECL void rq_decompose(mat<C, R, T, Q> const& in, mat<(C < R ? C : R), R, T, Q>& r, mat<C, (C < R ? C : R), T, Q>& q);
65 
67 }
68 
69 #include "matrix_factorisation.inl"
GLM_FUNC_DECL void rq_decompose(mat< C, R, T, Q > const &in, mat<(C< R ? C :R), R, T, Q > &r, mat< C,(C< R ? C :R), T, Q > &q)
Performs RQ factorisation of a matrix.
+
GLM_FUNC_DECL void qr_decompose(mat< C, R, T, Q > const &in, mat<(C< R ? C :R), R, T, Q > &q, mat< C,(C< R ? C :R), T, Q > &r)
Performs QR factorisation of a matrix.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL mat< C, R, T, Q > fliplr(mat< C, R, T, Q > const &in)
Flips the matrix columns right and left.
+
GLM_FUNC_DECL mat< C, R, T, Q > flipud(mat< C, R, T, Q > const &in)
Flips the matrix rows up and down.
+
+ + + + diff --git a/common/glm/doc/api/a00524.html b/common/glm/doc/api/a00524.html new file mode 100644 index 000000000..ccba42dfa --- /dev/null +++ b/common/glm/doc/api/a00524.html @@ -0,0 +1,107 @@ + + + + + + + +0.9.9 API documenation: matrix_interpolation.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_interpolation.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL void axisAngle (mat< 4, 4, T, Q > const &Mat, vec< 3, T, Q > &Axis, T &Angle)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > axisAngleMatrix (vec< 3, T, Q > const &Axis, T const Angle)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > extractMatrixRotation (mat< 4, 4, T, Q > const &Mat)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > interpolate (mat< 4, 4, T, Q > const &m1, mat< 4, 4, T, Q > const &m2, T const Delta)
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00524_source.html b/common/glm/doc/api/a00524_source.html new file mode 100644 index 000000000..3c5533397 --- /dev/null +++ b/common/glm/doc/api/a00524_source.html @@ -0,0 +1,86 @@ + + + + + + + +0.9.9 API documenation: matrix_interpolation.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_interpolation.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../glm.hpp"
18 
19 #ifndef GLM_ENABLE_EXPERIMENTAL
20 # error "GLM: GLM_GTX_matrix_interpolation is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
21 #endif
22 
23 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
24 # pragma message("GLM: GLM_GTX_matrix_interpolation extension included")
25 #endif
26 
27 namespace glm
28 {
31 
34  template<typename T, qualifier Q>
35  GLM_FUNC_DECL void axisAngle(
36  mat<4, 4, T, Q> const& Mat, vec<3, T, Q> & Axis, T & Angle);
37 
40  template<typename T, qualifier Q>
41  GLM_FUNC_DECL mat<4, 4, T, Q> axisAngleMatrix(
42  vec<3, T, Q> const& Axis, T const Angle);
43 
46  template<typename T, qualifier Q>
47  GLM_FUNC_DECL mat<4, 4, T, Q> extractMatrixRotation(
48  mat<4, 4, T, Q> const& Mat);
49 
53  template<typename T, qualifier Q>
54  GLM_FUNC_DECL mat<4, 4, T, Q> interpolate(
55  mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2, T const Delta);
56 
58 }//namespace glm
59 
60 #include "matrix_interpolation.inl"
GLM_FUNC_DECL mat< 4, 4, T, Q > interpolate(mat< 4, 4, T, Q > const &m1, mat< 4, 4, T, Q > const &m2, T const Delta)
Build a interpolation of 4 * 4 matrixes.
+
GLM_FUNC_DECL void axisAngle(mat< 4, 4, T, Q > const &Mat, vec< 3, T, Q > &Axis, T &Angle)
Get the axis and angle of the rotation from a matrix.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > extractMatrixRotation(mat< 4, 4, T, Q > const &Mat)
Extracts the rotation part of a matrix.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > axisAngleMatrix(vec< 3, T, Q > const &Axis, T const Angle)
Build a matrix from axis and angle.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00527.html b/common/glm/doc/api/a00527.html new file mode 100644 index 000000000..1a07eb2b7 --- /dev/null +++ b/common/glm/doc/api/a00527.html @@ -0,0 +1,132 @@ + + + + + + + +0.9.9 API documenation: matrix_major_storage.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_major_storage.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 2, 2, T, Q > colMajor2 (vec< 2, T, Q > const &v1, vec< 2, T, Q > const &v2)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 2, 2, T, Q > colMajor2 (mat< 2, 2, T, Q > const &m)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > colMajor3 (vec< 3, T, Q > const &v1, vec< 3, T, Q > const &v2, vec< 3, T, Q > const &v3)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > colMajor3 (mat< 3, 3, T, Q > const &m)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > colMajor4 (vec< 4, T, Q > const &v1, vec< 4, T, Q > const &v2, vec< 4, T, Q > const &v3, vec< 4, T, Q > const &v4)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > colMajor4 (mat< 4, 4, T, Q > const &m)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 2, 2, T, Q > rowMajor2 (vec< 2, T, Q > const &v1, vec< 2, T, Q > const &v2)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 2, 2, T, Q > rowMajor2 (mat< 2, 2, T, Q > const &m)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > rowMajor3 (vec< 3, T, Q > const &v1, vec< 3, T, Q > const &v2, vec< 3, T, Q > const &v3)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > rowMajor3 (mat< 3, 3, T, Q > const &m)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > rowMajor4 (vec< 4, T, Q > const &v1, vec< 4, T, Q > const &v2, vec< 4, T, Q > const &v3, vec< 4, T, Q > const &v4)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > rowMajor4 (mat< 4, 4, T, Q > const &m)
 
+

Detailed Description

+

GLM_GTX_matrix_major_storage

+
See also
Core features (dependence)
+
+gtx_extented_min_max (dependence)
+ +

Definition in file matrix_major_storage.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00527_source.html b/common/glm/doc/api/a00527_source.html new file mode 100644 index 000000000..e0c82f7a0 --- /dev/null +++ b/common/glm/doc/api/a00527_source.html @@ -0,0 +1,88 @@ + + + + + + + +0.9.9 API documenation: matrix_major_storage.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_major_storage.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../glm.hpp"
18 
19 #ifndef GLM_ENABLE_EXPERIMENTAL
20 # error "GLM: GLM_GTX_matrix_major_storage is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
21 #endif
22 
23 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
24 # pragma message("GLM: GLM_GTX_matrix_major_storage extension included")
25 #endif
26 
27 namespace glm
28 {
31 
34  template<typename T, qualifier Q>
35  GLM_FUNC_DECL mat<2, 2, T, Q> rowMajor2(
36  vec<2, T, Q> const& v1,
37  vec<2, T, Q> const& v2);
38 
41  template<typename T, qualifier Q>
42  GLM_FUNC_DECL mat<2, 2, T, Q> rowMajor2(
43  mat<2, 2, T, Q> const& m);
44 
47  template<typename T, qualifier Q>
48  GLM_FUNC_DECL mat<3, 3, T, Q> rowMajor3(
49  vec<3, T, Q> const& v1,
50  vec<3, T, Q> const& v2,
51  vec<3, T, Q> const& v3);
52 
55  template<typename T, qualifier Q>
56  GLM_FUNC_DECL mat<3, 3, T, Q> rowMajor3(
57  mat<3, 3, T, Q> const& m);
58 
61  template<typename T, qualifier Q>
62  GLM_FUNC_DECL mat<4, 4, T, Q> rowMajor4(
63  vec<4, T, Q> const& v1,
64  vec<4, T, Q> const& v2,
65  vec<4, T, Q> const& v3,
66  vec<4, T, Q> const& v4);
67 
70  template<typename T, qualifier Q>
71  GLM_FUNC_DECL mat<4, 4, T, Q> rowMajor4(
72  mat<4, 4, T, Q> const& m);
73 
76  template<typename T, qualifier Q>
77  GLM_FUNC_DECL mat<2, 2, T, Q> colMajor2(
78  vec<2, T, Q> const& v1,
79  vec<2, T, Q> const& v2);
80 
83  template<typename T, qualifier Q>
84  GLM_FUNC_DECL mat<2, 2, T, Q> colMajor2(
85  mat<2, 2, T, Q> const& m);
86 
89  template<typename T, qualifier Q>
90  GLM_FUNC_DECL mat<3, 3, T, Q> colMajor3(
91  vec<3, T, Q> const& v1,
92  vec<3, T, Q> const& v2,
93  vec<3, T, Q> const& v3);
94 
97  template<typename T, qualifier Q>
98  GLM_FUNC_DECL mat<3, 3, T, Q> colMajor3(
99  mat<3, 3, T, Q> const& m);
100 
103  template<typename T, qualifier Q>
104  GLM_FUNC_DECL mat<4, 4, T, Q> colMajor4(
105  vec<4, T, Q> const& v1,
106  vec<4, T, Q> const& v2,
107  vec<4, T, Q> const& v3,
108  vec<4, T, Q> const& v4);
109 
112  template<typename T, qualifier Q>
113  GLM_FUNC_DECL mat<4, 4, T, Q> colMajor4(
114  mat<4, 4, T, Q> const& m);
115 
117 }//namespace glm
118 
119 #include "matrix_major_storage.inl"
GLM_FUNC_DECL mat< 2, 2, T, Q > colMajor2(mat< 2, 2, T, Q > const &m)
Build a column major matrix from other matrix.
+
GLM_FUNC_DECL mat< 2, 2, T, Q > rowMajor2(mat< 2, 2, T, Q > const &m)
Build a row major matrix from other matrix.
+
GLM_FUNC_DECL mat< 3, 3, T, Q > rowMajor3(mat< 3, 3, T, Q > const &m)
Build a row major matrix from other matrix.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > rowMajor4(mat< 4, 4, T, Q > const &m)
Build a row major matrix from other matrix.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > colMajor4(mat< 4, 4, T, Q > const &m)
Build a column major matrix from other matrix.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL mat< 3, 3, T, Q > colMajor3(mat< 3, 3, T, Q > const &m)
Build a column major matrix from other matrix.
+
+ + + + diff --git a/common/glm/doc/api/a00530.html b/common/glm/doc/api/a00530.html new file mode 100644 index 000000000..8c68c4f99 --- /dev/null +++ b/common/glm/doc/api/a00530.html @@ -0,0 +1,121 @@ + + + + + + + +0.9.9 API documenation: matrix_operation.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_operation.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 2, 2, T, Q > diagonal2x2 (vec< 2, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 2, 3, T, Q > diagonal2x3 (vec< 2, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 2, 4, T, Q > diagonal2x4 (vec< 2, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 2, T, Q > diagonal3x2 (vec< 2, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > diagonal3x3 (vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 4, T, Q > diagonal3x4 (vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 2, T, Q > diagonal4x2 (vec< 2, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 3, T, Q > diagonal4x3 (vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > diagonal4x4 (vec< 4, T, Q > const &v)
 
+

Detailed Description

+

GLM_GTX_matrix_operation

+
See also
Core features (dependence)
+ +

Definition in file matrix_operation.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00530_source.html b/common/glm/doc/api/a00530_source.html new file mode 100644 index 000000000..3be1e3438 --- /dev/null +++ b/common/glm/doc/api/a00530_source.html @@ -0,0 +1,91 @@ + + + + + + + +0.9.9 API documenation: matrix_operation.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_operation.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 
18 #ifndef GLM_ENABLE_EXPERIMENTAL
19 # error "GLM: GLM_GTX_matrix_operation is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
20 #endif
21 
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_GTX_matrix_operation extension included")
24 #endif
25 
26 namespace glm
27 {
30 
33  template<typename T, qualifier Q>
34  GLM_FUNC_DECL mat<2, 2, T, Q> diagonal2x2(
35  vec<2, T, Q> const& v);
36 
39  template<typename T, qualifier Q>
40  GLM_FUNC_DECL mat<2, 3, T, Q> diagonal2x3(
41  vec<2, T, Q> const& v);
42 
45  template<typename T, qualifier Q>
46  GLM_FUNC_DECL mat<2, 4, T, Q> diagonal2x4(
47  vec<2, T, Q> const& v);
48 
51  template<typename T, qualifier Q>
52  GLM_FUNC_DECL mat<3, 2, T, Q> diagonal3x2(
53  vec<2, T, Q> const& v);
54 
57  template<typename T, qualifier Q>
58  GLM_FUNC_DECL mat<3, 3, T, Q> diagonal3x3(
59  vec<3, T, Q> const& v);
60 
63  template<typename T, qualifier Q>
64  GLM_FUNC_DECL mat<3, 4, T, Q> diagonal3x4(
65  vec<3, T, Q> const& v);
66 
69  template<typename T, qualifier Q>
70  GLM_FUNC_DECL mat<4, 2, T, Q> diagonal4x2(
71  vec<2, T, Q> const& v);
72 
75  template<typename T, qualifier Q>
76  GLM_FUNC_DECL mat<4, 3, T, Q> diagonal4x3(
77  vec<3, T, Q> const& v);
78 
81  template<typename T, qualifier Q>
82  GLM_FUNC_DECL mat<4, 4, T, Q> diagonal4x4(
83  vec<4, T, Q> const& v);
84 
86 }//namespace glm
87 
88 #include "matrix_operation.inl"
GLM_FUNC_DECL mat< 4, 2, T, Q > diagonal4x2(vec< 2, T, Q > const &v)
Build a diagonal matrix.
+
GLM_FUNC_DECL mat< 3, 3, T, Q > diagonal3x3(vec< 3, T, Q > const &v)
Build a diagonal matrix.
+
GLM_FUNC_DECL mat< 2, 4, T, Q > diagonal2x4(vec< 2, T, Q > const &v)
Build a diagonal matrix.
+
GLM_FUNC_DECL mat< 3, 2, T, Q > diagonal3x2(vec< 2, T, Q > const &v)
Build a diagonal matrix.
+
GLM_FUNC_DECL mat< 3, 4, T, Q > diagonal3x4(vec< 3, T, Q > const &v)
Build a diagonal matrix.
+
GLM_FUNC_DECL mat< 4, 3, T, Q > diagonal4x3(vec< 3, T, Q > const &v)
Build a diagonal matrix.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > diagonal4x4(vec< 4, T, Q > const &v)
Build a diagonal matrix.
+
GLM_FUNC_DECL mat< 2, 3, T, Q > diagonal2x3(vec< 2, T, Q > const &v)
Build a diagonal matrix.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL mat< 2, 2, T, Q > diagonal2x2(vec< 2, T, Q > const &v)
Build a diagonal matrix.
+
+ + + + diff --git a/common/glm/doc/api/a00533.html b/common/glm/doc/api/a00533.html new file mode 100644 index 000000000..253bd22ef --- /dev/null +++ b/common/glm/doc/api/a00533.html @@ -0,0 +1,120 @@ + + + + + + + +0.9.9 API documenation: matrix_query.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_query.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<length_t C, length_t R, typename T , qualifier Q, template< length_t, length_t, typename, qualifier > class matType>
GLM_FUNC_DECL bool isIdentity (matType< C, R, T, Q > const &m, T const &epsilon)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL bool isNormalized (mat< 2, 2, T, Q > const &m, T const &epsilon)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL bool isNormalized (mat< 3, 3, T, Q > const &m, T const &epsilon)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL bool isNormalized (mat< 4, 4, T, Q > const &m, T const &epsilon)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL bool isNull (mat< 2, 2, T, Q > const &m, T const &epsilon)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL bool isNull (mat< 3, 3, T, Q > const &m, T const &epsilon)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL bool isNull (mat< 4, 4, T, Q > const &m, T const &epsilon)
 
template<length_t C, length_t R, typename T , qualifier Q, template< length_t, length_t, typename, qualifier > class matType>
GLM_FUNC_DECL bool isOrthogonal (matType< C, R, T, Q > const &m, T const &epsilon)
 
+

Detailed Description

+

GLM_GTX_matrix_query

+
See also
Core features (dependence)
+
+GLM_GTX_vector_query (dependence)
+ +

Definition in file matrix_query.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00533_source.html b/common/glm/doc/api/a00533_source.html new file mode 100644 index 000000000..b5be72bdb --- /dev/null +++ b/common/glm/doc/api/a00533_source.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: matrix_query.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_query.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../glm.hpp"
18 #include "../gtx/vector_query.hpp"
19 #include <limits>
20 
21 #ifndef GLM_ENABLE_EXPERIMENTAL
22 # error "GLM: GLM_GTX_matrix_query is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
23 #endif
24 
25 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
26 # pragma message("GLM: GLM_GTX_matrix_query extension included")
27 #endif
28 
29 namespace glm
30 {
33 
36  template<typename T, qualifier Q>
37  GLM_FUNC_DECL bool isNull(mat<2, 2, T, Q> const& m, T const& epsilon);
38 
41  template<typename T, qualifier Q>
42  GLM_FUNC_DECL bool isNull(mat<3, 3, T, Q> const& m, T const& epsilon);
43 
46  template<typename T, qualifier Q>
47  GLM_FUNC_DECL bool isNull(mat<4, 4, T, Q> const& m, T const& epsilon);
48 
51  template<length_t C, length_t R, typename T, qualifier Q, template<length_t, length_t, typename, qualifier> class matType>
52  GLM_FUNC_DECL bool isIdentity(matType<C, R, T, Q> const& m, T const& epsilon);
53 
56  template<typename T, qualifier Q>
57  GLM_FUNC_DECL bool isNormalized(mat<2, 2, T, Q> const& m, T const& epsilon);
58 
61  template<typename T, qualifier Q>
62  GLM_FUNC_DECL bool isNormalized(mat<3, 3, T, Q> const& m, T const& epsilon);
63 
66  template<typename T, qualifier Q>
67  GLM_FUNC_DECL bool isNormalized(mat<4, 4, T, Q> const& m, T const& epsilon);
68 
71  template<length_t C, length_t R, typename T, qualifier Q, template<length_t, length_t, typename, qualifier> class matType>
72  GLM_FUNC_DECL bool isOrthogonal(matType<C, R, T, Q> const& m, T const& epsilon);
73 
75 }//namespace glm
76 
77 #include "matrix_query.inl"
GLM_FUNC_DECL bool isNull(mat< 4, 4, T, Q > const &m, T const &epsilon)
Return whether a matrix is a null matrix.
+
GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon()
Return the epsilon constant for floating point types.
+
GLM_FUNC_DECL bool isNormalized(mat< 4, 4, T, Q > const &m, T const &epsilon)
Return whether a matrix is a normalized matrix.
+
GLM_FUNC_DECL bool isOrthogonal(matType< C, R, T, Q > const &m, T const &epsilon)
Return whether a matrix is an orthonormalized matrix.
+
GLM_FUNC_DECL bool isIdentity(matType< C, R, T, Q > const &m, T const &epsilon)
Return whether a matrix is an identity matrix.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00536.html b/common/glm/doc/api/a00536.html new file mode 100644 index 000000000..3050c5684 --- /dev/null +++ b/common/glm/doc/api/a00536.html @@ -0,0 +1,110 @@ + + + + + + + +0.9.9 API documenation: matrix_transform_2d.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix_transform_2d.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER mat< 3, 3, T, Q > rotate (mat< 3, 3, T, Q > const &m, T angle)
 
template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER mat< 3, 3, T, Q > scale (mat< 3, 3, T, Q > const &m, vec< 2, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER mat< 3, 3, T, Q > shearX (mat< 3, 3, T, Q > const &m, T y)
 
template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER mat< 3, 3, T, Q > shearY (mat< 3, 3, T, Q > const &m, T x)
 
template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER mat< 3, 3, T, Q > translate (mat< 3, 3, T, Q > const &m, vec< 2, T, Q > const &v)
 
+

Detailed Description

+

GLM_GTX_matrix_transform_2d

+
Author
Miguel Ãngel Pérez Martínez
+
See also
Core features (dependence)
+ +

Definition in file matrix_transform_2d.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00536_source.html b/common/glm/doc/api/a00536_source.html new file mode 100644 index 000000000..834fb4e43 --- /dev/null +++ b/common/glm/doc/api/a00536_source.html @@ -0,0 +1,88 @@ + + + + + + + +0.9.9 API documenation: matrix_transform_2d.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix_transform_2d.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../mat3x3.hpp"
18 #include "../vec2.hpp"
19 
20 #ifndef GLM_ENABLE_EXPERIMENTAL
21 # error "GLM: GLM_GTX_matrix_transform_2d is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
22 #endif
23 
24 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
25 # pragma message("GLM: GLM_GTX_matrix_transform_2d extension included")
26 #endif
27 
28 namespace glm
29 {
32 
37  template<typename T, qualifier Q>
38  GLM_FUNC_QUALIFIER mat<3, 3, T, Q> translate(
39  mat<3, 3, T, Q> const& m,
40  vec<2, T, Q> const& v);
41 
46  template<typename T, qualifier Q>
47  GLM_FUNC_QUALIFIER mat<3, 3, T, Q> rotate(
48  mat<3, 3, T, Q> const& m,
49  T angle);
50 
55  template<typename T, qualifier Q>
56  GLM_FUNC_QUALIFIER mat<3, 3, T, Q> scale(
57  mat<3, 3, T, Q> const& m,
58  vec<2, T, Q> const& v);
59 
64  template<typename T, qualifier Q>
65  GLM_FUNC_QUALIFIER mat<3, 3, T, Q> shearX(
66  mat<3, 3, T, Q> const& m,
67  T y);
68 
73  template<typename T, qualifier Q>
74  GLM_FUNC_QUALIFIER mat<3, 3, T, Q> shearY(
75  mat<3, 3, T, Q> const& m,
76  T x);
77 
79 }//namespace glm
80 
81 #include "matrix_transform_2d.inl"
GLM_FUNC_QUALIFIER mat< 3, 3, T, Q > scale(mat< 3, 3, T, Q > const &m, vec< 2, T, Q > const &v)
Builds a scale 3 * 3 matrix created from a vector of 2 components.
+
GLM_FUNC_QUALIFIER mat< 3, 3, T, Q > rotate(mat< 3, 3, T, Q > const &m, T angle)
Builds a rotation 3 * 3 matrix created from an angle.
+
GLM_FUNC_QUALIFIER mat< 3, 3, T, Q > translate(mat< 3, 3, T, Q > const &m, vec< 2, T, Q > const &v)
Builds a translation 3 * 3 matrix created from a vector of 2 components.
+
GLM_FUNC_QUALIFIER mat< 3, 3, T, Q > shearY(mat< 3, 3, T, Q > const &m, T x)
Builds a vertical (parallel to the y axis) shear 3 * 3 matrix.
+
GLM_FUNC_QUALIFIER mat< 3, 3, T, Q > shearX(mat< 3, 3, T, Q > const &m, T y)
Builds an horizontal (parallel to the x axis) shear 3 * 3 matrix.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL T angle(qua< T, Q > const &x)
Returns the quaternion rotation angle.
+
+ + + + diff --git a/common/glm/doc/api/a00539.html b/common/glm/doc/api/a00539.html new file mode 100644 index 000000000..da3b2bfa1 --- /dev/null +++ b/common/glm/doc/api/a00539.html @@ -0,0 +1,98 @@ + + + + + + + +0.9.9 API documenation: mixed_product.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
mixed_product.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + +

+Functions

+template<typename T , qualifier Q>
GLM_FUNC_DECL T mixedProduct (vec< 3, T, Q > const &v1, vec< 3, T, Q > const &v2, vec< 3, T, Q > const &v3)
 
+

Detailed Description

+

GLM_GTX_mixed_producte

+
See also
Core features (dependence)
+ +

Definition in file mixed_product.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00539_source.html b/common/glm/doc/api/a00539_source.html new file mode 100644 index 000000000..dbf1478cf --- /dev/null +++ b/common/glm/doc/api/a00539_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: mixed_product.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mixed_product.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 
18 #ifndef GLM_ENABLE_EXPERIMENTAL
19 # error "GLM: GLM_GTX_mixed_product is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
20 #endif
21 
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_GTX_mixed_product extension included")
24 #endif
25 
26 namespace glm
27 {
30 
32  template<typename T, qualifier Q>
33  GLM_FUNC_DECL T mixedProduct(
34  vec<3, T, Q> const& v1,
35  vec<3, T, Q> const& v2,
36  vec<3, T, Q> const& v3);
37 
39 }// namespace glm
40 
41 #include "mixed_product.inl"
GLM_FUNC_DECL T mixedProduct(vec< 3, T, Q > const &v1, vec< 3, T, Q > const &v2, vec< 3, T, Q > const &v3)
Mixed product of 3 vectors (from GLM_GTX_mixed_product extension)
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00542.html b/common/glm/doc/api/a00542.html new file mode 100644 index 000000000..5ae516bbe --- /dev/null +++ b/common/glm/doc/api/a00542.html @@ -0,0 +1,120 @@ + + + + + + + +0.9.9 API documenation: norm.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
norm.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T distance2 (vec< L, T, Q > const &p0, vec< L, T, Q > const &p1)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T l1Norm (vec< 3, T, Q > const &x, vec< 3, T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T l1Norm (vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T l2Norm (vec< 3, T, Q > const &x, vec< 3, T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T l2Norm (vec< 3, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T length2 (vec< L, T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T lxNorm (vec< 3, T, Q > const &x, vec< 3, T, Q > const &y, unsigned int Depth)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T lxNorm (vec< 3, T, Q > const &x, unsigned int Depth)
 
+

Detailed Description

+

GLM_GTX_norm

+
See also
Core features (dependence)
+
+GLM_GTX_quaternion (dependence)
+ +

Definition in file norm.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00542_source.html b/common/glm/doc/api/a00542_source.html new file mode 100644 index 000000000..f4e1b92c7 --- /dev/null +++ b/common/glm/doc/api/a00542_source.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: norm.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
norm.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../geometric.hpp"
18 #include "../gtx/quaternion.hpp"
19 
20 #ifndef GLM_ENABLE_EXPERIMENTAL
21 # error "GLM: GLM_GTX_norm is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
22 #endif
23 
24 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
25 # pragma message("GLM: GLM_GTX_norm extension included")
26 #endif
27 
28 namespace glm
29 {
32 
35  template<length_t L, typename T, qualifier Q>
36  GLM_FUNC_DECL T length2(vec<L, T, Q> const& x);
37 
40  template<length_t L, typename T, qualifier Q>
41  GLM_FUNC_DECL T distance2(vec<L, T, Q> const& p0, vec<L, T, Q> const& p1);
42 
45  template<typename T, qualifier Q>
46  GLM_FUNC_DECL T l1Norm(vec<3, T, Q> const& x, vec<3, T, Q> const& y);
47 
50  template<typename T, qualifier Q>
51  GLM_FUNC_DECL T l1Norm(vec<3, T, Q> const& v);
52 
55  template<typename T, qualifier Q>
56  GLM_FUNC_DECL T l2Norm(vec<3, T, Q> const& x, vec<3, T, Q> const& y);
57 
60  template<typename T, qualifier Q>
61  GLM_FUNC_DECL T l2Norm(vec<3, T, Q> const& x);
62 
65  template<typename T, qualifier Q>
66  GLM_FUNC_DECL T lxNorm(vec<3, T, Q> const& x, vec<3, T, Q> const& y, unsigned int Depth);
67 
70  template<typename T, qualifier Q>
71  GLM_FUNC_DECL T lxNorm(vec<3, T, Q> const& x, unsigned int Depth);
72 
74 }//namespace glm
75 
76 #include "norm.inl"
GLM_FUNC_DECL T l2Norm(vec< 3, T, Q > const &x)
Returns the L2 norm of v.
+
GLM_FUNC_DECL T l1Norm(vec< 3, T, Q > const &v)
Returns the L1 norm of v.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL T length2(vec< L, T, Q > const &x)
Returns the squared length of x.
+
GLM_FUNC_DECL T lxNorm(vec< 3, T, Q > const &x, unsigned int Depth)
Returns the L norm of v.
+
GLM_FUNC_DECL T distance2(vec< L, T, Q > const &p0, vec< L, T, Q > const &p1)
Returns the squared distance between p0 and p1, i.e., length2(p0 - p1).
+
+ + + + diff --git a/common/glm/doc/api/a00545.html b/common/glm/doc/api/a00545.html new file mode 100644 index 000000000..5b5f4c0d2 --- /dev/null +++ b/common/glm/doc/api/a00545.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: normal.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
normal.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > triangleNormal (vec< 3, T, Q > const &p1, vec< 3, T, Q > const &p2, vec< 3, T, Q > const &p3)
 
+

Detailed Description

+

GLM_GTX_normal

+
See also
Core features (dependence)
+
+gtx_extented_min_max (dependence)
+ +

Definition in file normal.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00545_source.html b/common/glm/doc/api/a00545_source.html new file mode 100644 index 000000000..d09758070 --- /dev/null +++ b/common/glm/doc/api/a00545_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: normal.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
normal.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../glm.hpp"
18 
19 #ifndef GLM_ENABLE_EXPERIMENTAL
20 # error "GLM: GLM_GTX_normal is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
21 #endif
22 
23 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
24 # pragma message("GLM: GLM_GTX_normal extension included")
25 #endif
26 
27 namespace glm
28 {
31 
35  template<typename T, qualifier Q>
36  GLM_FUNC_DECL vec<3, T, Q> triangleNormal(vec<3, T, Q> const& p1, vec<3, T, Q> const& p2, vec<3, T, Q> const& p3);
37 
39 }//namespace glm
40 
41 #include "normal.inl"
GLM_FUNC_DECL vec< 3, T, Q > triangleNormal(vec< 3, T, Q > const &p1, vec< 3, T, Q > const &p2, vec< 3, T, Q > const &p3)
Computes triangle normal from triangle points.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00548.html b/common/glm/doc/api/a00548.html new file mode 100644 index 000000000..eacfae7da --- /dev/null +++ b/common/glm/doc/api/a00548.html @@ -0,0 +1,102 @@ + + + + + + + +0.9.9 API documenation: normalize_dot.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
normalize_dot.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T fastNormalizeDot (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T normalizeDot (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
+

Detailed Description

+

GLM_GTX_normalize_dot

+
See also
Core features (dependence)
+
+GLM_GTX_fast_square_root (dependence)
+ +

Definition in file normalize_dot.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00548_source.html b/common/glm/doc/api/a00548_source.html new file mode 100644 index 000000000..788d0b3b2 --- /dev/null +++ b/common/glm/doc/api/a00548_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: normalize_dot.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
normalize_dot.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../gtx/fast_square_root.hpp"
18 
19 #ifndef GLM_ENABLE_EXPERIMENTAL
20 # error "GLM: GLM_GTX_normalize_dot is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
21 #endif
22 
23 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
24 # pragma message("GLM: GLM_GTX_normalize_dot extension included")
25 #endif
26 
27 namespace glm
28 {
31 
36  template<length_t L, typename T, qualifier Q>
37  GLM_FUNC_DECL T normalizeDot(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
38 
43  template<length_t L, typename T, qualifier Q>
44  GLM_FUNC_DECL T fastNormalizeDot(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
45 
47 }//namespace glm
48 
49 #include "normalize_dot.inl"
GLM_FUNC_DECL T normalizeDot(vec< L, T, Q > const &x, vec< L, T, Q > const &y)
Normalize parameters and returns the dot product of x and y.
+
GLM_FUNC_DECL T fastNormalizeDot(vec< L, T, Q > const &x, vec< L, T, Q > const &y)
Normalize parameters and returns the dot product of x and y.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00551.html b/common/glm/doc/api/a00551.html new file mode 100644 index 000000000..eda466a7e --- /dev/null +++ b/common/glm/doc/api/a00551.html @@ -0,0 +1,128 @@ + + + + + + + +0.9.9 API documenation: number_precision.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
number_precision.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + +

+Typedefs

+typedef f32 f32mat1
 
+typedef f32 f32mat1x1
 
+typedef f32 f32vec1
 
+typedef f64 f64mat1
 
+typedef f64 f64mat1x1
 
+typedef f64 f64vec1
 
+typedef u16 u16vec1
 
+typedef u32 u32vec1
 
+typedef u64 u64vec1
 
+typedef u8 u8vec1
 
+

Detailed Description

+

GLM_GTX_number_precision

+
See also
Core features (dependence)
+
+GLM_GTC_type_precision (dependence)
+
+GLM_GTC_quaternion (dependence)
+ +

Definition in file number_precision.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00551_source.html b/common/glm/doc/api/a00551_source.html new file mode 100644 index 000000000..d8e0ac73b --- /dev/null +++ b/common/glm/doc/api/a00551_source.html @@ -0,0 +1,98 @@ + + + + + + + +0.9.9 API documenation: number_precision.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
number_precision.hpp
+
+
+Go to the documentation of this file.
1 
15 #pragma once
16 
17 // Dependency:
18 #include "../glm.hpp"
19 #include "../gtc/type_precision.hpp"
20 
21 #ifndef GLM_ENABLE_EXPERIMENTAL
22 # error "GLM: GLM_GTX_number_precision is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
23 #endif
24 
25 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
26 # pragma message("GLM: GLM_GTX_number_precision extension included")
27 #endif
28 
29 namespace glm{
30 namespace gtx
31 {
33  // Unsigned int vector types
34 
37 
38  typedef u8 u8vec1;
39  typedef u16 u16vec1;
40  typedef u32 u32vec1;
41  typedef u64 u64vec1;
42 
44  // Float vector types
45 
46  typedef f32 f32vec1;
47  typedef f64 f64vec1;
48 
50  // Float matrix types
51 
52  typedef f32 f32mat1;
53  typedef f32 f32mat1x1;
54  typedef f64 f64mat1;
55  typedef f64 f64mat1x1;
56 
58 }//namespace gtx
59 }//namespace glm
60 
61 #include "number_precision.inl"
double f64
Default 64 bit double-qualifier floating-point scalar.
Definition: fwd.hpp:166
+
uint64 u64
Default qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:134
+
u8 u8vec1
8bit unsigned integer scalar. (from GLM_GTX_number_precision extension)
+
f64 f64mat1
Double-qualifier floating-point scalar. (from GLM_GTX_number_precision extension) ...
+
uint32 u32
Default qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:120
+
float f32
Default 32 bit single-qualifier floating-point scalar.
Definition: fwd.hpp:150
+
uint8 u8
Default qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:92
+
u16 u16vec1
16bit unsigned integer scalar. (from GLM_GTX_number_precision extension)
+
f64 f64vec1
Single-qualifier floating-point scalar. (from GLM_GTX_number_precision extension) ...
+
f32 f32vec1
Single-qualifier floating-point scalar. (from GLM_GTX_number_precision extension) ...
+
f32 f32mat1x1
Single-qualifier floating-point scalar. (from GLM_GTX_number_precision extension) ...
+
f32 f32mat1
Single-qualifier floating-point scalar. (from GLM_GTX_number_precision extension) ...
+
u64 u64vec1
64bit unsigned integer scalar. (from GLM_GTX_number_precision extension)
+
u32 u32vec1
32bit unsigned integer scalar. (from GLM_GTX_number_precision extension)
+
Definition: common.hpp:20
+
f64 f64mat1x1
Double-qualifier floating-point scalar. (from GLM_GTX_number_precision extension) ...
+
uint16 u16
Default qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:106
+
+ + + + diff --git a/common/glm/doc/api/a00554.html b/common/glm/doc/api/a00554.html new file mode 100644 index 000000000..967c0de2c --- /dev/null +++ b/common/glm/doc/api/a00554.html @@ -0,0 +1,103 @@ + + + + + + + +0.9.9 API documenation: optimum_pow.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
optimum_pow.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType pow2 (genType const &x)
 
template<typename genType >
GLM_FUNC_DECL genType pow3 (genType const &x)
 
template<typename genType >
GLM_FUNC_DECL genType pow4 (genType const &x)
 
+

Detailed Description

+

GLM_GTX_optimum_pow

+
See also
Core features (dependence)
+ +

Definition in file optimum_pow.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00554_source.html b/common/glm/doc/api/a00554_source.html new file mode 100644 index 000000000..1df1fded2 --- /dev/null +++ b/common/glm/doc/api/a00554_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: optimum_pow.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
optimum_pow.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 
18 #ifndef GLM_ENABLE_EXPERIMENTAL
19 # error "GLM: GLM_GTX_optimum_pow is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
20 #endif
21 
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_GTX_optimum_pow extension included")
24 #endif
25 
26 namespace glm{
27 namespace gtx
28 {
31 
35  template<typename genType>
36  GLM_FUNC_DECL genType pow2(genType const& x);
37 
41  template<typename genType>
42  GLM_FUNC_DECL genType pow3(genType const& x);
43 
47  template<typename genType>
48  GLM_FUNC_DECL genType pow4(genType const& x);
49 
51 }//namespace gtx
52 }//namespace glm
53 
54 #include "optimum_pow.inl"
GLM_FUNC_DECL genType pow4(genType const &x)
Returns x raised to the power of 4.
+
GLM_FUNC_DECL genType pow3(genType const &x)
Returns x raised to the power of 3.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL genType pow2(genType const &x)
Returns x raised to the power of 2.
+
+ + + + diff --git a/common/glm/doc/api/a00557.html b/common/glm/doc/api/a00557.html new file mode 100644 index 000000000..365457f8f --- /dev/null +++ b/common/glm/doc/api/a00557.html @@ -0,0 +1,102 @@ + + + + + + + +0.9.9 API documenation: orthonormalize.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
orthonormalize.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > orthonormalize (mat< 3, 3, T, Q > const &m)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > orthonormalize (vec< 3, T, Q > const &x, vec< 3, T, Q > const &y)
 
+

Detailed Description

+

GLM_GTX_orthonormalize

+
See also
Core features (dependence)
+
+gtx_extented_min_max (dependence)
+ +

Definition in file orthonormalize.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00557_source.html b/common/glm/doc/api/a00557_source.html new file mode 100644 index 000000000..5d0875f9d --- /dev/null +++ b/common/glm/doc/api/a00557_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: orthonormalize.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
orthonormalize.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../vec3.hpp"
18 #include "../mat3x3.hpp"
19 #include "../geometric.hpp"
20 
21 #ifndef GLM_ENABLE_EXPERIMENTAL
22 # error "GLM: GLM_GTX_orthonormalize is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
23 #endif
24 
25 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
26 # pragma message("GLM: GLM_GTX_orthonormalize extension included")
27 #endif
28 
29 namespace glm
30 {
33 
37  template<typename T, qualifier Q>
38  GLM_FUNC_DECL mat<3, 3, T, Q> orthonormalize(mat<3, 3, T, Q> const& m);
39 
43  template<typename T, qualifier Q>
44  GLM_FUNC_DECL vec<3, T, Q> orthonormalize(vec<3, T, Q> const& x, vec<3, T, Q> const& y);
45 
47 }//namespace glm
48 
49 #include "orthonormalize.inl"
Definition: common.hpp:20
+
GLM_FUNC_DECL vec< 3, T, Q > orthonormalize(vec< 3, T, Q > const &x, vec< 3, T, Q > const &y)
Orthonormalizes x according y.
+
+ + + + diff --git a/common/glm/doc/api/a00560.html b/common/glm/doc/api/a00560.html new file mode 100644 index 000000000..a1bc2747d --- /dev/null +++ b/common/glm/doc/api/a00560.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: perpendicular.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
perpendicular.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType perp (genType const &x, genType const &Normal)
 
+

Detailed Description

+

GLM_GTX_perpendicular

+
See also
Core features (dependence)
+
+GLM_GTX_projection (dependence)
+ +

Definition in file perpendicular.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00560_source.html b/common/glm/doc/api/a00560_source.html new file mode 100644 index 000000000..7d6cd2ad6 --- /dev/null +++ b/common/glm/doc/api/a00560_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: perpendicular.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
perpendicular.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../glm.hpp"
18 #include "../gtx/projection.hpp"
19 
20 #ifndef GLM_ENABLE_EXPERIMENTAL
21 # error "GLM: GLM_GTX_perpendicular is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
22 #endif
23 
24 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
25 # pragma message("GLM: GLM_GTX_perpendicular extension included")
26 #endif
27 
28 namespace glm
29 {
32 
35  template<typename genType>
36  GLM_FUNC_DECL genType perp(genType const& x, genType const& Normal);
37 
39 }//namespace glm
40 
41 #include "perpendicular.inl"
GLM_FUNC_DECL genType perp(genType const &x, genType const &Normal)
Projects x a perpendicular axis of Normal.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00563.html b/common/glm/doc/api/a00563.html new file mode 100644 index 000000000..9d8bebc8c --- /dev/null +++ b/common/glm/doc/api/a00563.html @@ -0,0 +1,100 @@ + + + + + + + +0.9.9 API documenation: polar_coordinates.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
polar_coordinates.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > euclidean (vec< 2, T, Q > const &polar)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > polar (vec< 3, T, Q > const &euclidean)
 
+

Detailed Description

+

GLM_GTX_polar_coordinates

+
See also
Core features (dependence)
+ +

Definition in file polar_coordinates.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00563_source.html b/common/glm/doc/api/a00563_source.html new file mode 100644 index 000000000..ccf17243b --- /dev/null +++ b/common/glm/doc/api/a00563_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: polar_coordinates.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
polar_coordinates.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 
18 #ifndef GLM_ENABLE_EXPERIMENTAL
19 # error "GLM: GLM_GTX_polar_coordinates is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
20 #endif
21 
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_GTX_polar_coordinates extension included")
24 #endif
25 
26 namespace glm
27 {
30 
34  template<typename T, qualifier Q>
35  GLM_FUNC_DECL vec<3, T, Q> polar(
36  vec<3, T, Q> const& euclidean);
37 
41  template<typename T, qualifier Q>
42  GLM_FUNC_DECL vec<3, T, Q> euclidean(
43  vec<2, T, Q> const& polar);
44 
46 }//namespace glm
47 
48 #include "polar_coordinates.inl"
GLM_FUNC_DECL vec< 3, T, Q > euclidean(vec< 2, T, Q > const &polar)
Convert Polar to Euclidean coordinates.
+
GLM_FUNC_DECL vec< 3, T, Q > polar(vec< 3, T, Q > const &euclidean)
Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude...
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00566.html b/common/glm/doc/api/a00566.html new file mode 100644 index 000000000..90ea58f5d --- /dev/null +++ b/common/glm/doc/api/a00566.html @@ -0,0 +1,97 @@ + + + + + + + +0.9.9 API documenation: projection.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
projection.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType proj (genType const &x, genType const &Normal)
 
+

Detailed Description

+

GLM_GTX_projection

+
See also
Core features (dependence)
+ +

Definition in file projection.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00566_source.html b/common/glm/doc/api/a00566_source.html new file mode 100644 index 000000000..f4d8e3a92 --- /dev/null +++ b/common/glm/doc/api/a00566_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: projection.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
projection.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../geometric.hpp"
17 
18 #ifndef GLM_ENABLE_EXPERIMENTAL
19 # error "GLM: GLM_GTX_projection is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
20 #endif
21 
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_GTX_projection extension included")
24 #endif
25 
26 namespace glm
27 {
30 
34  template<typename genType>
35  GLM_FUNC_DECL genType proj(genType const& x, genType const& Normal);
36 
38 }//namespace glm
39 
40 #include "projection.inl"
GLM_FUNC_DECL genType proj(genType const &x, genType const &Normal)
Projects x on Normal.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00569.html b/common/glm/doc/api/a00569.html new file mode 100644 index 000000000..e4cdd6e09 --- /dev/null +++ b/common/glm/doc/api/a00569.html @@ -0,0 +1,88 @@ + + + + + + + +0.9.9 API documenation: range.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
range.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

GLM_GTX_range

+
Author
Joshua Moerman
+ +

Definition in file range.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00569_source.html b/common/glm/doc/api/a00569_source.html new file mode 100644 index 000000000..387fafd32 --- /dev/null +++ b/common/glm/doc/api/a00569_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: range.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
range.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependencies
16 #include "../detail/setup.hpp"
17 
18 #ifndef GLM_ENABLE_EXPERIMENTAL
19 # error "GLM: GLM_GTX_range is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
20 #endif
21 
22 #if !GLM_HAS_RANGE_FOR
23 # error "GLM_GTX_range requires C++11 suppport or 'range for'"
24 #endif
25 
26 #include "../gtc/type_ptr.hpp"
27 #include "../gtc/vec1.hpp"
28 
29 namespace glm
30 {
33 
34 # if GLM_COMPILER & GLM_COMPILER_VC
35 # pragma warning(push)
36 # pragma warning(disable : 4100) // unreferenced formal parameter
37 # endif
38 
39  template<typename T, qualifier Q>
40  inline length_t components(vec<1, T, Q> const& v)
41  {
42  return v.length();
43  }
44 
45  template<typename T, qualifier Q>
46  inline length_t components(vec<2, T, Q> const& v)
47  {
48  return v.length();
49  }
50 
51  template<typename T, qualifier Q>
52  inline length_t components(vec<3, T, Q> const& v)
53  {
54  return v.length();
55  }
56 
57  template<typename T, qualifier Q>
58  inline length_t components(vec<4, T, Q> const& v)
59  {
60  return v.length();
61  }
62 
63  template<typename genType>
64  inline length_t components(genType const& m)
65  {
66  return m.length() * m[0].length();
67  }
68 
69  template<typename genType>
70  inline typename genType::value_type const * begin(genType const& v)
71  {
72  return value_ptr(v);
73  }
74 
75  template<typename genType>
76  inline typename genType::value_type const * end(genType const& v)
77  {
78  return begin(v) + components(v);
79  }
80 
81  template<typename genType>
82  inline typename genType::value_type * begin(genType& v)
83  {
84  return value_ptr(v);
85  }
86 
87  template<typename genType>
88  inline typename genType::value_type * end(genType& v)
89  {
90  return begin(v) + components(v);
91  }
92 
93 # if GLM_COMPILER & GLM_COMPILER_VC
94 # pragma warning(pop)
95 # endif
96 
98 }//namespace glm
GLM_FUNC_DECL genType::value_type const * value_ptr(genType const &v)
Return the constant address to the data of the input parameter.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00572.html b/common/glm/doc/api/a00572.html new file mode 100644 index 000000000..b44a8025c --- /dev/null +++ b/common/glm/doc/api/a00572.html @@ -0,0 +1,102 @@ + + + + + + + +0.9.9 API documenation: raw_data.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
raw_data.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + +

+Typedefs

typedef detail::uint8 byte
 
typedef detail::uint32 dword
 
typedef detail::uint64 qword
 
typedef detail::uint16 word
 
+

Detailed Description

+

GLM_GTX_raw_data

+
See also
Core features (dependence)
+ +

Definition in file raw_data.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00572_source.html b/common/glm/doc/api/a00572_source.html new file mode 100644 index 000000000..0f230c38a --- /dev/null +++ b/common/glm/doc/api/a00572_source.html @@ -0,0 +1,86 @@ + + + + + + + +0.9.9 API documenation: raw_data.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
raw_data.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependencies
16 #include "../ext/scalar_uint_sized.hpp"
17 #include "../detail/setup.hpp"
18 
19 #ifndef GLM_ENABLE_EXPERIMENTAL
20 # error "GLM: GLM_GTX_raw_data is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
21 #endif
22 
23 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
24 # pragma message("GLM: GLM_GTX_raw_data extension included")
25 #endif
26 
27 namespace glm
28 {
31 
34  typedef detail::uint8 byte;
35 
38  typedef detail::uint16 word;
39 
42  typedef detail::uint32 dword;
43 
46  typedef detail::uint64 qword;
47 
49 }// namespace glm
50 
51 #include "raw_data.inl"
detail::uint64 qword
Type for qword numbers.
Definition: raw_data.hpp:46
+
detail::uint32 dword
Type for dword numbers.
Definition: raw_data.hpp:42
+
detail::uint16 word
Type for word numbers.
Definition: raw_data.hpp:38
+
detail::uint8 byte
Type for byte numbers.
Definition: raw_data.hpp:34
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00575.html b/common/glm/doc/api/a00575.html new file mode 100644 index 000000000..d81bd3f5b --- /dev/null +++ b/common/glm/doc/api/a00575.html @@ -0,0 +1,104 @@ + + + + + + + +0.9.9 API documenation: rotate_normalized_axis.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
rotate_normalized_axis.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > rotateNormalizedAxis (mat< 4, 4, T, Q > const &m, T const &angle, vec< 3, T, Q > const &axis)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > rotateNormalizedAxis (qua< T, Q > const &q, T const &angle, vec< 3, T, Q > const &axis)
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00575_source.html b/common/glm/doc/api/a00575_source.html new file mode 100644 index 000000000..f657d1a04 --- /dev/null +++ b/common/glm/doc/api/a00575_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: rotate_normalized_axis.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
rotate_normalized_axis.hpp
+
+
+Go to the documentation of this file.
1 
15 #pragma once
16 
17 // Dependency:
18 #include "../glm.hpp"
19 #include "../gtc/epsilon.hpp"
20 #include "../gtc/quaternion.hpp"
21 
22 #ifndef GLM_ENABLE_EXPERIMENTAL
23 # error "GLM: GLM_GTX_rotate_normalized_axis is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
24 #endif
25 
26 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
27 # pragma message("GLM: GLM_GTX_rotate_normalized_axis extension included")
28 #endif
29 
30 namespace glm
31 {
34 
46  template<typename T, qualifier Q>
47  GLM_FUNC_DECL mat<4, 4, T, Q> rotateNormalizedAxis(
48  mat<4, 4, T, Q> const& m,
49  T const& angle,
50  vec<3, T, Q> const& axis);
51 
59  template<typename T, qualifier Q>
60  GLM_FUNC_DECL qua<T, Q> rotateNormalizedAxis(
61  qua<T, Q> const& q,
62  T const& angle,
63  vec<3, T, Q> const& axis);
64 
66 }//namespace glm
67 
68 #include "rotate_normalized_axis.inl"
GLM_FUNC_DECL qua< T, Q > rotateNormalizedAxis(qua< T, Q > const &q, T const &angle, vec< 3, T, Q > const &axis)
Rotates a quaternion from a vector of 3 components normalized axis and an angle.
+
GLM_FUNC_DECL vec< 3, T, Q > axis(qua< T, Q > const &x)
Returns the q rotation axis.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL T angle(qua< T, Q > const &x)
Returns the quaternion rotation angle.
+
+ + + + diff --git a/common/glm/doc/api/a00578.html b/common/glm/doc/api/a00578.html new file mode 100644 index 000000000..9a13ef1bc --- /dev/null +++ b/common/glm/doc/api/a00578.html @@ -0,0 +1,129 @@ + + + + + + + +0.9.9 API documenation: rotate_vector.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
rotate_vector.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > orientation (vec< 3, T, Q > const &Normal, vec< 3, T, Q > const &Up)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 2, T, Q > rotate (vec< 2, T, Q > const &v, T const &angle)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > rotate (vec< 3, T, Q > const &v, T const &angle, vec< 3, T, Q > const &normal)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > rotate (vec< 4, T, Q > const &v, T const &angle, vec< 3, T, Q > const &normal)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > rotateX (vec< 3, T, Q > const &v, T const &angle)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > rotateX (vec< 4, T, Q > const &v, T const &angle)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > rotateY (vec< 3, T, Q > const &v, T const &angle)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > rotateY (vec< 4, T, Q > const &v, T const &angle)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > rotateZ (vec< 3, T, Q > const &v, T const &angle)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > rotateZ (vec< 4, T, Q > const &v, T const &angle)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > slerp (vec< 3, T, Q > const &x, vec< 3, T, Q > const &y, T const &a)
 
+

Detailed Description

+

GLM_GTX_rotate_vector

+
See also
Core features (dependence)
+
+GLM_GTX_transform (dependence)
+ +

Definition in file rotate_vector.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00578_source.html b/common/glm/doc/api/a00578_source.html new file mode 100644 index 000000000..7808aeac7 --- /dev/null +++ b/common/glm/doc/api/a00578_source.html @@ -0,0 +1,89 @@ + + + + + + + +0.9.9 API documenation: rotate_vector.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
rotate_vector.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../gtx/transform.hpp"
18 #include "../gtc/epsilon.hpp"
19 #include "../ext/vector_relational.hpp"
20 #include "../glm.hpp"
21 
22 #ifndef GLM_ENABLE_EXPERIMENTAL
23 # error "GLM: GLM_GTX_rotate_vector is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
24 #endif
25 
26 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
27 # pragma message("GLM: GLM_GTX_rotate_vector extension included")
28 #endif
29 
30 namespace glm
31 {
34 
42  template<typename T, qualifier Q>
43  GLM_FUNC_DECL vec<3, T, Q> slerp(
44  vec<3, T, Q> const& x,
45  vec<3, T, Q> const& y,
46  T const& a);
47 
50  template<typename T, qualifier Q>
51  GLM_FUNC_DECL vec<2, T, Q> rotate(
52  vec<2, T, Q> const& v,
53  T const& angle);
54 
57  template<typename T, qualifier Q>
58  GLM_FUNC_DECL vec<3, T, Q> rotate(
59  vec<3, T, Q> const& v,
60  T const& angle,
61  vec<3, T, Q> const& normal);
62 
65  template<typename T, qualifier Q>
66  GLM_FUNC_DECL vec<4, T, Q> rotate(
67  vec<4, T, Q> const& v,
68  T const& angle,
69  vec<3, T, Q> const& normal);
70 
73  template<typename T, qualifier Q>
74  GLM_FUNC_DECL vec<3, T, Q> rotateX(
75  vec<3, T, Q> const& v,
76  T const& angle);
77 
80  template<typename T, qualifier Q>
81  GLM_FUNC_DECL vec<3, T, Q> rotateY(
82  vec<3, T, Q> const& v,
83  T const& angle);
84 
87  template<typename T, qualifier Q>
88  GLM_FUNC_DECL vec<3, T, Q> rotateZ(
89  vec<3, T, Q> const& v,
90  T const& angle);
91 
94  template<typename T, qualifier Q>
95  GLM_FUNC_DECL vec<4, T, Q> rotateX(
96  vec<4, T, Q> const& v,
97  T const& angle);
98 
101  template<typename T, qualifier Q>
102  GLM_FUNC_DECL vec<4, T, Q> rotateY(
103  vec<4, T, Q> const& v,
104  T const& angle);
105 
108  template<typename T, qualifier Q>
109  GLM_FUNC_DECL vec<4, T, Q> rotateZ(
110  vec<4, T, Q> const& v,
111  T const& angle);
112 
115  template<typename T, qualifier Q>
116  GLM_FUNC_DECL mat<4, 4, T, Q> orientation(
117  vec<3, T, Q> const& Normal,
118  vec<3, T, Q> const& Up);
119 
121 }//namespace glm
122 
123 #include "rotate_vector.inl"
GLM_FUNC_DECL vec< 4, T, Q > rotateX(vec< 4, T, Q > const &v, T const &angle)
Rotate a four dimensional vector around the X axis.
+
GLM_FUNC_DECL vec< 4, T, Q > rotateY(vec< 4, T, Q > const &v, T const &angle)
Rotate a four dimensional vector around the Y axis.
+
GLM_FUNC_DECL vec< 4, T, Q > rotateZ(vec< 4, T, Q > const &v, T const &angle)
Rotate a four dimensional vector around the Z axis.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > orientation(vec< 3, T, Q > const &Normal, vec< 3, T, Q > const &Up)
Build a rotation matrix from a normal and a up vector.
+
GLM_FUNC_DECL vec< 3, T, Q > slerp(vec< 3, T, Q > const &x, vec< 3, T, Q > const &y, T const &a)
Returns Spherical interpolation between two vectors.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL vec< 4, T, Q > rotate(vec< 4, T, Q > const &v, T const &angle, vec< 3, T, Q > const &normal)
Rotate a four dimensional vector around an axis.
+
GLM_FUNC_DECL T angle(qua< T, Q > const &x)
Returns the quaternion rotation angle.
+
+ + + + diff --git a/common/glm/doc/api/a00581.html b/common/glm/doc/api/a00581.html new file mode 100644 index 000000000..5dad4468c --- /dev/null +++ b/common/glm/doc/api/a00581.html @@ -0,0 +1,91 @@ + + + + + + + +0.9.9 API documenation: scalar_multiplication.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
scalar_multiplication.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Experimental extensions

+
Author
Joshua Moerman
+

Include <glm/gtx/scalar_multiplication.hpp> to use the features of this extension.

+

Enables scalar multiplication for all types

+

Since GLSL is very strict about types, the following (often used) combinations do not work: double * vec4 int * vec4 vec4 / int So we'll fix that! Of course "float * vec4" should remain the same (hence the enable_if magic)

+ +

Definition in file scalar_multiplication.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00581_source.html b/common/glm/doc/api/a00581_source.html new file mode 100644 index 000000000..f1cd8b8f8 --- /dev/null +++ b/common/glm/doc/api/a00581_source.html @@ -0,0 +1,94 @@ + + + + + + + +0.9.9 API documenation: scalar_multiplication.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
scalar_multiplication.hpp
+
+
+Go to the documentation of this file.
1 
15 #pragma once
16 
17 #include "../detail/setup.hpp"
18 
19 #ifndef GLM_ENABLE_EXPERIMENTAL
20 # error "GLM: GLM_GTX_scalar_multiplication is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
21 #endif
22 
23 #if !GLM_HAS_TEMPLATE_ALIASES && !(GLM_COMPILER & GLM_COMPILER_GCC)
24 # error "GLM_GTX_scalar_multiplication requires C++11 support or alias templates and if not support for GCC"
25 #endif
26 
27 #include "../vec2.hpp"
28 #include "../vec3.hpp"
29 #include "../vec4.hpp"
30 #include "../mat2x2.hpp"
31 #include <type_traits>
32 
33 namespace glm
34 {
35  template<typename T, typename Vec>
36  using return_type_scalar_multiplication = typename std::enable_if<
37  !std::is_same<T, float>::value // T may not be a float
38  && std::is_arithmetic<T>::value, Vec // But it may be an int or double (no vec3 or mat3, ...)
39  >::type;
40 
41 #define GLM_IMPLEMENT_SCAL_MULT(Vec) \
42  template<typename T> \
43  return_type_scalar_multiplication<T, Vec> \
44  operator*(T const& s, Vec rh){ \
45  return rh *= static_cast<float>(s); \
46  } \
47  \
48  template<typename T> \
49  return_type_scalar_multiplication<T, Vec> \
50  operator*(Vec lh, T const& s){ \
51  return lh *= static_cast<float>(s); \
52  } \
53  \
54  template<typename T> \
55  return_type_scalar_multiplication<T, Vec> \
56  operator/(Vec lh, T const& s){ \
57  return lh *= 1.0f / s; \
58  }
59 
60 GLM_IMPLEMENT_SCAL_MULT(vec2)
61 GLM_IMPLEMENT_SCAL_MULT(vec3)
62 GLM_IMPLEMENT_SCAL_MULT(vec4)
63 
64 GLM_IMPLEMENT_SCAL_MULT(mat2)
65 GLM_IMPLEMENT_SCAL_MULT(mat2x3)
66 GLM_IMPLEMENT_SCAL_MULT(mat2x4)
67 GLM_IMPLEMENT_SCAL_MULT(mat3x2)
68 GLM_IMPLEMENT_SCAL_MULT(mat3)
69 GLM_IMPLEMENT_SCAL_MULT(mat3x4)
70 GLM_IMPLEMENT_SCAL_MULT(mat4x2)
71 GLM_IMPLEMENT_SCAL_MULT(mat4x3)
72 GLM_IMPLEMENT_SCAL_MULT(mat4)
73 
74 #undef GLM_IMPLEMENT_SCAL_MULT
75 } // namespace glm
mat< 4, 4, float, defaultp > mat4
4 columns of 4 components matrix of single-precision floating-point numbers.
+
mat< 2, 4, float, defaultp > mat2x4
2 columns of 4 components matrix of single-precision floating-point numbers.
+
vec< 2, float, defaultp > vec2
2 components vector of single-precision floating-point numbers.
+
mat< 4, 2, float, defaultp > mat4x2
4 columns of 2 components matrix of single-precision floating-point numbers.
+
mat< 3, 3, float, defaultp > mat3
3 columns of 3 components matrix of single-precision floating-point numbers.
+
mat< 4, 3, float, defaultp > mat4x3
4 columns of 3 components matrix of single-precision floating-point numbers.
+
vec< 4, float, defaultp > vec4
4 components vector of single-precision floating-point numbers.
+
mat< 2, 2, float, defaultp > mat2
2 columns of 2 components matrix of single-precision floating-point numbers.
+
vec< 3, float, defaultp > vec3
3 components vector of single-precision floating-point numbers.
+
mat< 2, 3, float, defaultp > mat2x3
2 columns of 3 components matrix of single-precision floating-point numbers.
+
mat< 3, 4, float, defaultp > mat3x4
3 columns of 4 components matrix of single-precision floating-point numbers.
+
mat< 3, 2, float, defaultp > mat3x2
3 columns of 2 components matrix of single-precision floating-point numbers.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00584.html b/common/glm/doc/api/a00584.html new file mode 100644 index 000000000..9e44ed9b1 --- /dev/null +++ b/common/glm/doc/api/a00584.html @@ -0,0 +1,103 @@ + + + + + + + +0.9.9 API documenation: spline.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
spline.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType catmullRom (genType const &v1, genType const &v2, genType const &v3, genType const &v4, typename genType::value_type const &s)
 
template<typename genType >
GLM_FUNC_DECL genType cubic (genType const &v1, genType const &v2, genType const &v3, genType const &v4, typename genType::value_type const &s)
 
template<typename genType >
GLM_FUNC_DECL genType hermite (genType const &v1, genType const &t1, genType const &v2, genType const &t2, typename genType::value_type const &s)
 
+

Detailed Description

+

GLM_GTX_spline

+
See also
Core features (dependence)
+ +

Definition in file spline.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00584_source.html b/common/glm/doc/api/a00584_source.html new file mode 100644 index 000000000..47c8f5225 --- /dev/null +++ b/common/glm/doc/api/a00584_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: spline.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
spline.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 #include "../gtx/optimum_pow.hpp"
18 
19 #ifndef GLM_ENABLE_EXPERIMENTAL
20 # error "GLM: GLM_GTX_spline is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
21 #endif
22 
23 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
24 # pragma message("GLM: GLM_GTX_spline extension included")
25 #endif
26 
27 namespace glm
28 {
31 
34  template<typename genType>
35  GLM_FUNC_DECL genType catmullRom(
36  genType const& v1,
37  genType const& v2,
38  genType const& v3,
39  genType const& v4,
40  typename genType::value_type const& s);
41 
44  template<typename genType>
45  GLM_FUNC_DECL genType hermite(
46  genType const& v1,
47  genType const& t1,
48  genType const& v2,
49  genType const& t2,
50  typename genType::value_type const& s);
51 
54  template<typename genType>
55  GLM_FUNC_DECL genType cubic(
56  genType const& v1,
57  genType const& v2,
58  genType const& v3,
59  genType const& v4,
60  typename genType::value_type const& s);
61 
63 }//namespace glm
64 
65 #include "spline.inl"
GLM_FUNC_DECL genType hermite(genType const &v1, genType const &t1, genType const &v2, genType const &t2, typename genType::value_type const &s)
Return a point from a hermite curve.
+
GLM_FUNC_DECL genType catmullRom(genType const &v1, genType const &v2, genType const &v3, genType const &v4, typename genType::value_type const &s)
Return a point from a catmull rom curve.
+
GLM_FUNC_DECL genType cubic(genType const &v1, genType const &v2, genType const &v3, genType const &v4, typename genType::value_type const &s)
Return a point from a cubic curve.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00587.html b/common/glm/doc/api/a00587.html new file mode 100644 index 000000000..15713fc64 --- /dev/null +++ b/common/glm/doc/api/a00587.html @@ -0,0 +1,112 @@ + + + + + + + +0.9.9 API documenation: std_based_type.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
std_based_type.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + +

+Typedefs

typedef vec< 1, std::size_t, defaultp > size1
 
typedef vec< 1, std::size_t, defaultp > size1_t
 
typedef vec< 2, std::size_t, defaultp > size2
 
typedef vec< 2, std::size_t, defaultp > size2_t
 
typedef vec< 3, std::size_t, defaultp > size3
 
typedef vec< 3, std::size_t, defaultp > size3_t
 
typedef vec< 4, std::size_t, defaultp > size4
 
typedef vec< 4, std::size_t, defaultp > size4_t
 
+

Detailed Description

+

GLM_GTX_std_based_type

+
See also
Core features (dependence)
+
+gtx_extented_min_max (dependence)
+ +

Definition in file std_based_type.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00587_source.html b/common/glm/doc/api/a00587_source.html new file mode 100644 index 000000000..62ae8d82d --- /dev/null +++ b/common/glm/doc/api/a00587_source.html @@ -0,0 +1,90 @@ + + + + + + + +0.9.9 API documenation: std_based_type.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
std_based_type.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../glm.hpp"
18 #include <cstdlib>
19 
20 #ifndef GLM_ENABLE_EXPERIMENTAL
21 # error "GLM: GLM_GTX_std_based_type is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
22 #endif
23 
24 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
25 # pragma message("GLM: GLM_GTX_std_based_type extension included")
26 #endif
27 
28 namespace glm
29 {
32 
35  typedef vec<1, std::size_t, defaultp> size1;
36 
39  typedef vec<2, std::size_t, defaultp> size2;
40 
43  typedef vec<3, std::size_t, defaultp> size3;
44 
47  typedef vec<4, std::size_t, defaultp> size4;
48 
51  typedef vec<1, std::size_t, defaultp> size1_t;
52 
55  typedef vec<2, std::size_t, defaultp> size2_t;
56 
59  typedef vec<3, std::size_t, defaultp> size3_t;
60 
63  typedef vec<4, std::size_t, defaultp> size4_t;
64 
66 }//namespace glm
67 
68 #include "std_based_type.inl"
vec< 1, std::size_t, defaultp > size1
Vector type based of one std::size_t component.
+
vec< 1, std::size_t, defaultp > size1_t
Vector type based of one std::size_t component.
+
vec< 4, std::size_t, defaultp > size4_t
Vector type based of four std::size_t components.
+
vec< 3, std::size_t, defaultp > size3_t
Vector type based of three std::size_t components.
+
vec< 2, std::size_t, defaultp > size2
Vector type based of two std::size_t components.
+
vec< 3, std::size_t, defaultp > size3
Vector type based of three std::size_t components.
+
vec< 2, std::size_t, defaultp > size2_t
Vector type based of two std::size_t components.
+
vec< 4, std::size_t, defaultp > size4
Vector type based of four std::size_t components.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00590.html b/common/glm/doc/api/a00590.html new file mode 100644 index 000000000..0124acc26 --- /dev/null +++ b/common/glm/doc/api/a00590.html @@ -0,0 +1,101 @@ + + + + + + + +0.9.9 API documenation: string_cast.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
string_cast.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL std::string to_string (genType const &x)
 
+

Detailed Description

+

GLM_GTX_string_cast

+
See also
Core features (dependence)
+
+GLM_GTX_integer (dependence)
+
+GLM_GTX_quaternion (dependence)
+ +

Definition in file string_cast.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00590_source.html b/common/glm/doc/api/a00590_source.html new file mode 100644 index 000000000..b120461ee --- /dev/null +++ b/common/glm/doc/api/a00590_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: string_cast.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
string_cast.hpp
+
+
+Go to the documentation of this file.
1 
17 #pragma once
18 
19 // Dependency:
20 #include "../glm.hpp"
21 #include "../gtc/type_precision.hpp"
22 #include "../gtc/quaternion.hpp"
23 #include "../gtx/dual_quaternion.hpp"
24 #include <string>
25 #include <cmath>
26 
27 #ifndef GLM_ENABLE_EXPERIMENTAL
28 # error "GLM: GLM_GTX_string_cast is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
29 #endif
30 
31 #if(GLM_COMPILER & GLM_COMPILER_CUDA)
32 # error "GLM_GTX_string_cast is not supported on CUDA compiler"
33 #endif
34 
35 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
36 # pragma message("GLM: GLM_GTX_string_cast extension included")
37 #endif
38 
39 namespace glm
40 {
43 
46  template<typename genType>
47  GLM_FUNC_DECL std::string to_string(genType const& x);
48 
50 }//namespace glm
51 
52 #include "string_cast.inl"
GLM_FUNC_DECL std::string to_string(genType const &x)
Create a string from a GLM vector or matrix typed variable.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00593.html b/common/glm/doc/api/a00593.html new file mode 100644 index 000000000..73d5500e5 --- /dev/null +++ b/common/glm/doc/api/a00593.html @@ -0,0 +1,97 @@ + + + + + + + +0.9.9 API documenation: texture.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
texture.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
levels (vec< L, T, Q > const &Extent)
 
+

Detailed Description

+

GLM_GTX_texture

+
See also
Core features (dependence)
+ +

Definition in file texture.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00593_source.html b/common/glm/doc/api/a00593_source.html new file mode 100644 index 000000000..38e15b66f --- /dev/null +++ b/common/glm/doc/api/a00593_source.html @@ -0,0 +1,83 @@ + + + + + + + +0.9.9 API documenation: texture.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
texture.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 #include "../gtc/integer.hpp"
18 #include "../gtx/component_wise.hpp"
19 
20 #ifndef GLM_ENABLE_EXPERIMENTAL
21 # error "GLM: GLM_GTX_texture is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
22 #endif
23 
24 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
25 # pragma message("GLM: GLM_GTX_texture extension included")
26 #endif
27 
28 namespace glm
29 {
32 
39  template <length_t L, typename T, qualifier Q>
40  T levels(vec<L, T, Q> const& Extent);
41 
43 }// namespace glm
44 
45 #include "texture.inl"
46 
T levels(vec< L, T, Q > const &Extent)
Compute the number of mipmaps levels necessary to create a mipmap complete texture.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00596.html b/common/glm/doc/api/a00596.html new file mode 100644 index 000000000..432fabeab --- /dev/null +++ b/common/glm/doc/api/a00596.html @@ -0,0 +1,109 @@ + + + + + + + +0.9.9 API documenation: transform.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
transform.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > rotate (T angle, vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > scale (vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > translate (vec< 3, T, Q > const &v)
 
+

Detailed Description

+

GLM_GTX_transform

+
See also
Core features (dependence)
+
+GLM_GTC_matrix_transform (dependence)
+
+GLM_GTX_transform
+
+GLM_GTX_transform2
+ +

Definition in file transform.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00596_source.html b/common/glm/doc/api/a00596_source.html new file mode 100644 index 000000000..36b617b02 --- /dev/null +++ b/common/glm/doc/api/a00596_source.html @@ -0,0 +1,86 @@ + + + + + + + +0.9.9 API documenation: transform.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
transform.hpp
+
+
+Go to the documentation of this file.
1 
16 #pragma once
17 
18 // Dependency:
19 #include "../glm.hpp"
20 #include "../gtc/matrix_transform.hpp"
21 
22 #ifndef GLM_ENABLE_EXPERIMENTAL
23 # error "GLM: GLM_GTX_transform is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
24 #endif
25 
26 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
27 # pragma message("GLM: GLM_GTX_transform extension included")
28 #endif
29 
30 namespace glm
31 {
34 
38  template<typename T, qualifier Q>
39  GLM_FUNC_DECL mat<4, 4, T, Q> translate(
40  vec<3, T, Q> const& v);
41 
45  template<typename T, qualifier Q>
46  GLM_FUNC_DECL mat<4, 4, T, Q> rotate(
47  T angle,
48  vec<3, T, Q> const& v);
49 
53  template<typename T, qualifier Q>
54  GLM_FUNC_DECL mat<4, 4, T, Q> scale(
55  vec<3, T, Q> const& v);
56 
58 }// namespace glm
59 
60 #include "transform.inl"
GLM_FUNC_DECL mat< 4, 4, T, Q > rotate(T angle, vec< 3, T, Q > const &v)
Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in radians...
+
GLM_FUNC_DECL mat< 4, 4, T, Q > translate(vec< 3, T, Q > const &v)
Transforms a matrix with a translation 4 * 4 matrix created from 3 scalars.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > scale(vec< 3, T, Q > const &v)
Transforms a matrix with a scale 4 * 4 matrix created from a vector of 3 components.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL T angle(qua< T, Q > const &x)
Returns the quaternion rotation angle.
+
+ + + + diff --git a/common/glm/doc/api/a00599.html b/common/glm/doc/api/a00599.html new file mode 100644 index 000000000..a571a8d1c --- /dev/null +++ b/common/glm/doc/api/a00599.html @@ -0,0 +1,123 @@ + + + + + + + +0.9.9 API documenation: transform2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
transform2.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > proj2D (mat< 3, 3, T, Q > const &m, vec< 3, T, Q > const &normal)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > proj3D (mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &normal)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > scaleBias (T scale, T bias)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > scaleBias (mat< 4, 4, T, Q > const &m, T scale, T bias)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > shearX2D (mat< 3, 3, T, Q > const &m, T y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > shearX3D (mat< 4, 4, T, Q > const &m, T y, T z)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > shearY2D (mat< 3, 3, T, Q > const &m, T x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > shearY3D (mat< 4, 4, T, Q > const &m, T x, T z)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > shearZ3D (mat< 4, 4, T, Q > const &m, T x, T y)
 
+

Detailed Description

+

GLM_GTX_transform2

+
See also
Core features (dependence)
+
+GLM_GTX_transform (dependence)
+ +

Definition in file transform2.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00599_source.html b/common/glm/doc/api/a00599_source.html new file mode 100644 index 000000000..81bf3336b --- /dev/null +++ b/common/glm/doc/api/a00599_source.html @@ -0,0 +1,91 @@ + + + + + + + +0.9.9 API documenation: transform2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
transform2.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../glm.hpp"
18 #include "../gtx/transform.hpp"
19 
20 #ifndef GLM_ENABLE_EXPERIMENTAL
21 # error "GLM: GLM_GTX_transform2 is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
22 #endif
23 
24 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
25 # pragma message("GLM: GLM_GTX_transform2 extension included")
26 #endif
27 
28 namespace glm
29 {
32 
35  template<typename T, qualifier Q>
36  GLM_FUNC_DECL mat<3, 3, T, Q> shearX2D(mat<3, 3, T, Q> const& m, T y);
37 
40  template<typename T, qualifier Q>
41  GLM_FUNC_DECL mat<3, 3, T, Q> shearY2D(mat<3, 3, T, Q> const& m, T x);
42 
45  template<typename T, qualifier Q>
46  GLM_FUNC_DECL mat<4, 4, T, Q> shearX3D(mat<4, 4, T, Q> const& m, T y, T z);
47 
50  template<typename T, qualifier Q>
51  GLM_FUNC_DECL mat<4, 4, T, Q> shearY3D(mat<4, 4, T, Q> const& m, T x, T z);
52 
55  template<typename T, qualifier Q>
56  GLM_FUNC_DECL mat<4, 4, T, Q> shearZ3D(mat<4, 4, T, Q> const& m, T x, T y);
57 
58  //template<typename T> GLM_FUNC_QUALIFIER mat<4, 4, T, Q> shear(const mat<4, 4, T, Q> & m, shearPlane, planePoint, angle)
59  // Identity + tan(angle) * cross(Normal, OnPlaneVector) 0
60  // - dot(PointOnPlane, normal) * OnPlaneVector 1
61 
62  // Reflect functions seem to don't work
63  //template<typename T> mat<3, 3, T, Q> reflect2D(const mat<3, 3, T, Q> & m, const vec<3, T, Q>& normal){return reflect2DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension)
64  //template<typename T> mat<4, 4, T, Q> reflect3D(const mat<4, 4, T, Q> & m, const vec<3, T, Q>& normal){return reflect3DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension)
65 
68  template<typename T, qualifier Q>
69  GLM_FUNC_DECL mat<3, 3, T, Q> proj2D(mat<3, 3, T, Q> const& m, vec<3, T, Q> const& normal);
70 
73  template<typename T, qualifier Q>
74  GLM_FUNC_DECL mat<4, 4, T, Q> proj3D(mat<4, 4, T, Q> const & m, vec<3, T, Q> const& normal);
75 
78  template<typename T, qualifier Q>
79  GLM_FUNC_DECL mat<4, 4, T, Q> scaleBias(T scale, T bias);
80 
83  template<typename T, qualifier Q>
84  GLM_FUNC_DECL mat<4, 4, T, Q> scaleBias(mat<4, 4, T, Q> const& m, T scale, T bias);
85 
87 }// namespace glm
88 
89 #include "transform2.inl"
GLM_FUNC_DECL mat< 3, 3, T, Q > shearX2D(mat< 3, 3, T, Q > const &m, T y)
Transforms a matrix with a shearing on X axis.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > shearX3D(mat< 4, 4, T, Q > const &m, T y, T z)
Transforms a matrix with a shearing on X axis From GLM_GTX_transform2 extension.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > shearY3D(mat< 4, 4, T, Q > const &m, T x, T z)
Transforms a matrix with a shearing on Y axis.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > proj3D(mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &normal)
Build planar projection matrix along normal axis.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > scale(mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &v)
Builds a scale 4 * 4 matrix created from 3 scalars.
+
GLM_FUNC_DECL mat< 3, 3, T, Q > proj2D(mat< 3, 3, T, Q > const &m, vec< 3, T, Q > const &normal)
Build planar projection matrix along normal axis.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > scaleBias(mat< 4, 4, T, Q > const &m, T scale, T bias)
Build a scale bias matrix.
+
GLM_FUNC_DECL mat< 3, 3, T, Q > shearY2D(mat< 3, 3, T, Q > const &m, T x)
Transforms a matrix with a shearing on Y axis.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL mat< 4, 4, T, Q > shearZ3D(mat< 4, 4, T, Q > const &m, T x, T y)
Transforms a matrix with a shearing on Z axis.
+
+ + + + diff --git a/common/glm/doc/api/a00602.html b/common/glm/doc/api/a00602.html new file mode 100644 index 000000000..c132a320d --- /dev/null +++ b/common/glm/doc/api/a00602.html @@ -0,0 +1,88 @@ + + + + + + + +0.9.9 API documenation: type_trait.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_trait.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

GLM_GTX_type_trait

+
See also
Core features (dependence)
+ +

Definition in file type_trait.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00602_source.html b/common/glm/doc/api/a00602_source.html new file mode 100644 index 000000000..d89979a92 --- /dev/null +++ b/common/glm/doc/api/a00602_source.html @@ -0,0 +1,82 @@ + + + + + + + +0.9.9 API documenation: type_trait.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
type_trait.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 #ifndef GLM_ENABLE_EXPERIMENTAL
16 # error "GLM: GLM_GTX_type_trait is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
17 #endif
18 
19 // Dependency:
20 #include "../detail/qualifier.hpp"
21 #include "../gtc/quaternion.hpp"
22 #include "../gtx/dual_quaternion.hpp"
23 
24 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
25 # pragma message("GLM: GLM_GTX_type_trait extension included")
26 #endif
27 
28 namespace glm
29 {
32 
33  template<typename T>
34  struct type
35  {
36  static bool const is_vec = false;
37  static bool const is_mat = false;
38  static bool const is_quat = false;
39  static length_t const components = 0;
40  static length_t const cols = 0;
41  static length_t const rows = 0;
42  };
43 
44  template<length_t L, typename T, qualifier Q>
45  struct type<vec<L, T, Q> >
46  {
47  static bool const is_vec = true;
48  static bool const is_mat = false;
49  static bool const is_quat = false;
50  static length_t const components = L;
51  };
52 
53  template<length_t C, length_t R, typename T, qualifier Q>
54  struct type<mat<C, R, T, Q> >
55  {
56  static bool const is_vec = false;
57  static bool const is_mat = true;
58  static bool const is_quat = false;
59  static length_t const components = C;
60  static length_t const cols = C;
61  static length_t const rows = R;
62  };
63 
64  template<typename T, qualifier Q>
65  struct type<qua<T, Q> >
66  {
67  static bool const is_vec = false;
68  static bool const is_mat = false;
69  static bool const is_quat = true;
70  static length_t const components = 4;
71  };
72 
73  template<typename T, qualifier Q>
74  struct type<tdualquat<T, Q> >
75  {
76  static bool const is_vec = false;
77  static bool const is_mat = false;
78  static bool const is_quat = true;
79  static length_t const components = 8;
80  };
81 
83 }//namespace glm
84 
85 #include "type_trait.inl"
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00605.html b/common/glm/doc/api/a00605.html new file mode 100644 index 000000000..dc0998a5a --- /dev/null +++ b/common/glm/doc/api/a00605.html @@ -0,0 +1,88 @@ + + + + + + + +0.9.9 API documenation: vec_swizzle.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vec_swizzle.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

GLM_GTX_vec_swizzle

+
See also
Core features (dependence)
+ +

Definition in file vec_swizzle.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00605_source.html b/common/glm/doc/api/a00605_source.html new file mode 100644 index 000000000..62680437b --- /dev/null +++ b/common/glm/doc/api/a00605_source.html @@ -0,0 +1,82 @@ + + + + + + + +0.9.9 API documenation: vec_swizzle.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vec_swizzle.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 #include "../glm.hpp"
16 
17 #ifndef GLM_ENABLE_EXPERIMENTAL
18 # error "GLM: GLM_GTX_vec_swizzle is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
19 #endif
20 
21 namespace glm {
22  // xx
23  template<typename T, qualifier Q>
24  GLM_INLINE glm::vec<2, T, Q> xx(const glm::vec<1, T, Q> &v) {
25  return glm::vec<2, T, Q>(v.x, v.x);
26  }
27 
28  template<typename T, qualifier Q>
29  GLM_INLINE glm::vec<2, T, Q> xx(const glm::vec<2, T, Q> &v) {
30  return glm::vec<2, T, Q>(v.x, v.x);
31  }
32 
33  template<typename T, qualifier Q>
34  GLM_INLINE glm::vec<2, T, Q> xx(const glm::vec<3, T, Q> &v) {
35  return glm::vec<2, T, Q>(v.x, v.x);
36  }
37 
38  template<typename T, qualifier Q>
39  GLM_INLINE glm::vec<2, T, Q> xx(const glm::vec<4, T, Q> &v) {
40  return glm::vec<2, T, Q>(v.x, v.x);
41  }
42 
43  // xy
44  template<typename T, qualifier Q>
45  GLM_INLINE glm::vec<2, T, Q> xy(const glm::vec<2, T, Q> &v) {
46  return glm::vec<2, T, Q>(v.x, v.y);
47  }
48 
49  template<typename T, qualifier Q>
50  GLM_INLINE glm::vec<2, T, Q> xy(const glm::vec<3, T, Q> &v) {
51  return glm::vec<2, T, Q>(v.x, v.y);
52  }
53 
54  template<typename T, qualifier Q>
55  GLM_INLINE glm::vec<2, T, Q> xy(const glm::vec<4, T, Q> &v) {
56  return glm::vec<2, T, Q>(v.x, v.y);
57  }
58 
59  // xz
60  template<typename T, qualifier Q>
61  GLM_INLINE glm::vec<2, T, Q> xz(const glm::vec<3, T, Q> &v) {
62  return glm::vec<2, T, Q>(v.x, v.z);
63  }
64 
65  template<typename T, qualifier Q>
66  GLM_INLINE glm::vec<2, T, Q> xz(const glm::vec<4, T, Q> &v) {
67  return glm::vec<2, T, Q>(v.x, v.z);
68  }
69 
70  // xw
71  template<typename T, qualifier Q>
72  GLM_INLINE glm::vec<2, T, Q> xw(const glm::vec<4, T, Q> &v) {
73  return glm::vec<2, T, Q>(v.x, v.w);
74  }
75 
76  // yx
77  template<typename T, qualifier Q>
78  GLM_INLINE glm::vec<2, T, Q> yx(const glm::vec<2, T, Q> &v) {
79  return glm::vec<2, T, Q>(v.y, v.x);
80  }
81 
82  template<typename T, qualifier Q>
83  GLM_INLINE glm::vec<2, T, Q> yx(const glm::vec<3, T, Q> &v) {
84  return glm::vec<2, T, Q>(v.y, v.x);
85  }
86 
87  template<typename T, qualifier Q>
88  GLM_INLINE glm::vec<2, T, Q> yx(const glm::vec<4, T, Q> &v) {
89  return glm::vec<2, T, Q>(v.y, v.x);
90  }
91 
92  // yy
93  template<typename T, qualifier Q>
94  GLM_INLINE glm::vec<2, T, Q> yy(const glm::vec<2, T, Q> &v) {
95  return glm::vec<2, T, Q>(v.y, v.y);
96  }
97 
98  template<typename T, qualifier Q>
99  GLM_INLINE glm::vec<2, T, Q> yy(const glm::vec<3, T, Q> &v) {
100  return glm::vec<2, T, Q>(v.y, v.y);
101  }
102 
103  template<typename T, qualifier Q>
104  GLM_INLINE glm::vec<2, T, Q> yy(const glm::vec<4, T, Q> &v) {
105  return glm::vec<2, T, Q>(v.y, v.y);
106  }
107 
108  // yz
109  template<typename T, qualifier Q>
110  GLM_INLINE glm::vec<2, T, Q> yz(const glm::vec<3, T, Q> &v) {
111  return glm::vec<2, T, Q>(v.y, v.z);
112  }
113 
114  template<typename T, qualifier Q>
115  GLM_INLINE glm::vec<2, T, Q> yz(const glm::vec<4, T, Q> &v) {
116  return glm::vec<2, T, Q>(v.y, v.z);
117  }
118 
119  // yw
120  template<typename T, qualifier Q>
121  GLM_INLINE glm::vec<2, T, Q> yw(const glm::vec<4, T, Q> &v) {
122  return glm::vec<2, T, Q>(v.y, v.w);
123  }
124 
125  // zx
126  template<typename T, qualifier Q>
127  GLM_INLINE glm::vec<2, T, Q> zx(const glm::vec<3, T, Q> &v) {
128  return glm::vec<2, T, Q>(v.z, v.x);
129  }
130 
131  template<typename T, qualifier Q>
132  GLM_INLINE glm::vec<2, T, Q> zx(const glm::vec<4, T, Q> &v) {
133  return glm::vec<2, T, Q>(v.z, v.x);
134  }
135 
136  // zy
137  template<typename T, qualifier Q>
138  GLM_INLINE glm::vec<2, T, Q> zy(const glm::vec<3, T, Q> &v) {
139  return glm::vec<2, T, Q>(v.z, v.y);
140  }
141 
142  template<typename T, qualifier Q>
143  GLM_INLINE glm::vec<2, T, Q> zy(const glm::vec<4, T, Q> &v) {
144  return glm::vec<2, T, Q>(v.z, v.y);
145  }
146 
147  // zz
148  template<typename T, qualifier Q>
149  GLM_INLINE glm::vec<2, T, Q> zz(const glm::vec<3, T, Q> &v) {
150  return glm::vec<2, T, Q>(v.z, v.z);
151  }
152 
153  template<typename T, qualifier Q>
154  GLM_INLINE glm::vec<2, T, Q> zz(const glm::vec<4, T, Q> &v) {
155  return glm::vec<2, T, Q>(v.z, v.z);
156  }
157 
158  // zw
159  template<typename T, qualifier Q>
160  GLM_INLINE glm::vec<2, T, Q> zw(const glm::vec<4, T, Q> &v) {
161  return glm::vec<2, T, Q>(v.z, v.w);
162  }
163 
164  // wx
165  template<typename T, qualifier Q>
166  GLM_INLINE glm::vec<2, T, Q> wx(const glm::vec<4, T, Q> &v) {
167  return glm::vec<2, T, Q>(v.w, v.x);
168  }
169 
170  // wy
171  template<typename T, qualifier Q>
172  GLM_INLINE glm::vec<2, T, Q> wy(const glm::vec<4, T, Q> &v) {
173  return glm::vec<2, T, Q>(v.w, v.y);
174  }
175 
176  // wz
177  template<typename T, qualifier Q>
178  GLM_INLINE glm::vec<2, T, Q> wz(const glm::vec<4, T, Q> &v) {
179  return glm::vec<2, T, Q>(v.w, v.z);
180  }
181 
182  // ww
183  template<typename T, qualifier Q>
184  GLM_INLINE glm::vec<2, T, Q> ww(const glm::vec<4, T, Q> &v) {
185  return glm::vec<2, T, Q>(v.w, v.w);
186  }
187 
188  // xxx
189  template<typename T, qualifier Q>
190  GLM_INLINE glm::vec<3, T, Q> xxx(const glm::vec<1, T, Q> &v) {
191  return glm::vec<3, T, Q>(v.x, v.x, v.x);
192  }
193 
194  template<typename T, qualifier Q>
195  GLM_INLINE glm::vec<3, T, Q> xxx(const glm::vec<2, T, Q> &v) {
196  return glm::vec<3, T, Q>(v.x, v.x, v.x);
197  }
198 
199  template<typename T, qualifier Q>
200  GLM_INLINE glm::vec<3, T, Q> xxx(const glm::vec<3, T, Q> &v) {
201  return glm::vec<3, T, Q>(v.x, v.x, v.x);
202  }
203 
204  template<typename T, qualifier Q>
205  GLM_INLINE glm::vec<3, T, Q> xxx(const glm::vec<4, T, Q> &v) {
206  return glm::vec<3, T, Q>(v.x, v.x, v.x);
207  }
208 
209  // xxy
210  template<typename T, qualifier Q>
211  GLM_INLINE glm::vec<3, T, Q> xxy(const glm::vec<2, T, Q> &v) {
212  return glm::vec<3, T, Q>(v.x, v.x, v.y);
213  }
214 
215  template<typename T, qualifier Q>
216  GLM_INLINE glm::vec<3, T, Q> xxy(const glm::vec<3, T, Q> &v) {
217  return glm::vec<3, T, Q>(v.x, v.x, v.y);
218  }
219 
220  template<typename T, qualifier Q>
221  GLM_INLINE glm::vec<3, T, Q> xxy(const glm::vec<4, T, Q> &v) {
222  return glm::vec<3, T, Q>(v.x, v.x, v.y);
223  }
224 
225  // xxz
226  template<typename T, qualifier Q>
227  GLM_INLINE glm::vec<3, T, Q> xxz(const glm::vec<3, T, Q> &v) {
228  return glm::vec<3, T, Q>(v.x, v.x, v.z);
229  }
230 
231  template<typename T, qualifier Q>
232  GLM_INLINE glm::vec<3, T, Q> xxz(const glm::vec<4, T, Q> &v) {
233  return glm::vec<3, T, Q>(v.x, v.x, v.z);
234  }
235 
236  // xxw
237  template<typename T, qualifier Q>
238  GLM_INLINE glm::vec<3, T, Q> xxw(const glm::vec<4, T, Q> &v) {
239  return glm::vec<3, T, Q>(v.x, v.x, v.w);
240  }
241 
242  // xyx
243  template<typename T, qualifier Q>
244  GLM_INLINE glm::vec<3, T, Q> xyx(const glm::vec<2, T, Q> &v) {
245  return glm::vec<3, T, Q>(v.x, v.y, v.x);
246  }
247 
248  template<typename T, qualifier Q>
249  GLM_INLINE glm::vec<3, T, Q> xyx(const glm::vec<3, T, Q> &v) {
250  return glm::vec<3, T, Q>(v.x, v.y, v.x);
251  }
252 
253  template<typename T, qualifier Q>
254  GLM_INLINE glm::vec<3, T, Q> xyx(const glm::vec<4, T, Q> &v) {
255  return glm::vec<3, T, Q>(v.x, v.y, v.x);
256  }
257 
258  // xyy
259  template<typename T, qualifier Q>
260  GLM_INLINE glm::vec<3, T, Q> xyy(const glm::vec<2, T, Q> &v) {
261  return glm::vec<3, T, Q>(v.x, v.y, v.y);
262  }
263 
264  template<typename T, qualifier Q>
265  GLM_INLINE glm::vec<3, T, Q> xyy(const glm::vec<3, T, Q> &v) {
266  return glm::vec<3, T, Q>(v.x, v.y, v.y);
267  }
268 
269  template<typename T, qualifier Q>
270  GLM_INLINE glm::vec<3, T, Q> xyy(const glm::vec<4, T, Q> &v) {
271  return glm::vec<3, T, Q>(v.x, v.y, v.y);
272  }
273 
274  // xyz
275  template<typename T, qualifier Q>
276  GLM_INLINE glm::vec<3, T, Q> xyz(const glm::vec<3, T, Q> &v) {
277  return glm::vec<3, T, Q>(v.x, v.y, v.z);
278  }
279 
280  template<typename T, qualifier Q>
281  GLM_INLINE glm::vec<3, T, Q> xyz(const glm::vec<4, T, Q> &v) {
282  return glm::vec<3, T, Q>(v.x, v.y, v.z);
283  }
284 
285  // xyw
286  template<typename T, qualifier Q>
287  GLM_INLINE glm::vec<3, T, Q> xyw(const glm::vec<4, T, Q> &v) {
288  return glm::vec<3, T, Q>(v.x, v.y, v.w);
289  }
290 
291  // xzx
292  template<typename T, qualifier Q>
293  GLM_INLINE glm::vec<3, T, Q> xzx(const glm::vec<3, T, Q> &v) {
294  return glm::vec<3, T, Q>(v.x, v.z, v.x);
295  }
296 
297  template<typename T, qualifier Q>
298  GLM_INLINE glm::vec<3, T, Q> xzx(const glm::vec<4, T, Q> &v) {
299  return glm::vec<3, T, Q>(v.x, v.z, v.x);
300  }
301 
302  // xzy
303  template<typename T, qualifier Q>
304  GLM_INLINE glm::vec<3, T, Q> xzy(const glm::vec<3, T, Q> &v) {
305  return glm::vec<3, T, Q>(v.x, v.z, v.y);
306  }
307 
308  template<typename T, qualifier Q>
309  GLM_INLINE glm::vec<3, T, Q> xzy(const glm::vec<4, T, Q> &v) {
310  return glm::vec<3, T, Q>(v.x, v.z, v.y);
311  }
312 
313  // xzz
314  template<typename T, qualifier Q>
315  GLM_INLINE glm::vec<3, T, Q> xzz(const glm::vec<3, T, Q> &v) {
316  return glm::vec<3, T, Q>(v.x, v.z, v.z);
317  }
318 
319  template<typename T, qualifier Q>
320  GLM_INLINE glm::vec<3, T, Q> xzz(const glm::vec<4, T, Q> &v) {
321  return glm::vec<3, T, Q>(v.x, v.z, v.z);
322  }
323 
324  // xzw
325  template<typename T, qualifier Q>
326  GLM_INLINE glm::vec<3, T, Q> xzw(const glm::vec<4, T, Q> &v) {
327  return glm::vec<3, T, Q>(v.x, v.z, v.w);
328  }
329 
330  // xwx
331  template<typename T, qualifier Q>
332  GLM_INLINE glm::vec<3, T, Q> xwx(const glm::vec<4, T, Q> &v) {
333  return glm::vec<3, T, Q>(v.x, v.w, v.x);
334  }
335 
336  // xwy
337  template<typename T, qualifier Q>
338  GLM_INLINE glm::vec<3, T, Q> xwy(const glm::vec<4, T, Q> &v) {
339  return glm::vec<3, T, Q>(v.x, v.w, v.y);
340  }
341 
342  // xwz
343  template<typename T, qualifier Q>
344  GLM_INLINE glm::vec<3, T, Q> xwz(const glm::vec<4, T, Q> &v) {
345  return glm::vec<3, T, Q>(v.x, v.w, v.z);
346  }
347 
348  // xww
349  template<typename T, qualifier Q>
350  GLM_INLINE glm::vec<3, T, Q> xww(const glm::vec<4, T, Q> &v) {
351  return glm::vec<3, T, Q>(v.x, v.w, v.w);
352  }
353 
354  // yxx
355  template<typename T, qualifier Q>
356  GLM_INLINE glm::vec<3, T, Q> yxx(const glm::vec<2, T, Q> &v) {
357  return glm::vec<3, T, Q>(v.y, v.x, v.x);
358  }
359 
360  template<typename T, qualifier Q>
361  GLM_INLINE glm::vec<3, T, Q> yxx(const glm::vec<3, T, Q> &v) {
362  return glm::vec<3, T, Q>(v.y, v.x, v.x);
363  }
364 
365  template<typename T, qualifier Q>
366  GLM_INLINE glm::vec<3, T, Q> yxx(const glm::vec<4, T, Q> &v) {
367  return glm::vec<3, T, Q>(v.y, v.x, v.x);
368  }
369 
370  // yxy
371  template<typename T, qualifier Q>
372  GLM_INLINE glm::vec<3, T, Q> yxy(const glm::vec<2, T, Q> &v) {
373  return glm::vec<3, T, Q>(v.y, v.x, v.y);
374  }
375 
376  template<typename T, qualifier Q>
377  GLM_INLINE glm::vec<3, T, Q> yxy(const glm::vec<3, T, Q> &v) {
378  return glm::vec<3, T, Q>(v.y, v.x, v.y);
379  }
380 
381  template<typename T, qualifier Q>
382  GLM_INLINE glm::vec<3, T, Q> yxy(const glm::vec<4, T, Q> &v) {
383  return glm::vec<3, T, Q>(v.y, v.x, v.y);
384  }
385 
386  // yxz
387  template<typename T, qualifier Q>
388  GLM_INLINE glm::vec<3, T, Q> yxz(const glm::vec<3, T, Q> &v) {
389  return glm::vec<3, T, Q>(v.y, v.x, v.z);
390  }
391 
392  template<typename T, qualifier Q>
393  GLM_INLINE glm::vec<3, T, Q> yxz(const glm::vec<4, T, Q> &v) {
394  return glm::vec<3, T, Q>(v.y, v.x, v.z);
395  }
396 
397  // yxw
398  template<typename T, qualifier Q>
399  GLM_INLINE glm::vec<3, T, Q> yxw(const glm::vec<4, T, Q> &v) {
400  return glm::vec<3, T, Q>(v.y, v.x, v.w);
401  }
402 
403  // yyx
404  template<typename T, qualifier Q>
405  GLM_INLINE glm::vec<3, T, Q> yyx(const glm::vec<2, T, Q> &v) {
406  return glm::vec<3, T, Q>(v.y, v.y, v.x);
407  }
408 
409  template<typename T, qualifier Q>
410  GLM_INLINE glm::vec<3, T, Q> yyx(const glm::vec<3, T, Q> &v) {
411  return glm::vec<3, T, Q>(v.y, v.y, v.x);
412  }
413 
414  template<typename T, qualifier Q>
415  GLM_INLINE glm::vec<3, T, Q> yyx(const glm::vec<4, T, Q> &v) {
416  return glm::vec<3, T, Q>(v.y, v.y, v.x);
417  }
418 
419  // yyy
420  template<typename T, qualifier Q>
421  GLM_INLINE glm::vec<3, T, Q> yyy(const glm::vec<2, T, Q> &v) {
422  return glm::vec<3, T, Q>(v.y, v.y, v.y);
423  }
424 
425  template<typename T, qualifier Q>
426  GLM_INLINE glm::vec<3, T, Q> yyy(const glm::vec<3, T, Q> &v) {
427  return glm::vec<3, T, Q>(v.y, v.y, v.y);
428  }
429 
430  template<typename T, qualifier Q>
431  GLM_INLINE glm::vec<3, T, Q> yyy(const glm::vec<4, T, Q> &v) {
432  return glm::vec<3, T, Q>(v.y, v.y, v.y);
433  }
434 
435  // yyz
436  template<typename T, qualifier Q>
437  GLM_INLINE glm::vec<3, T, Q> yyz(const glm::vec<3, T, Q> &v) {
438  return glm::vec<3, T, Q>(v.y, v.y, v.z);
439  }
440 
441  template<typename T, qualifier Q>
442  GLM_INLINE glm::vec<3, T, Q> yyz(const glm::vec<4, T, Q> &v) {
443  return glm::vec<3, T, Q>(v.y, v.y, v.z);
444  }
445 
446  // yyw
447  template<typename T, qualifier Q>
448  GLM_INLINE glm::vec<3, T, Q> yyw(const glm::vec<4, T, Q> &v) {
449  return glm::vec<3, T, Q>(v.y, v.y, v.w);
450  }
451 
452  // yzx
453  template<typename T, qualifier Q>
454  GLM_INLINE glm::vec<3, T, Q> yzx(const glm::vec<3, T, Q> &v) {
455  return glm::vec<3, T, Q>(v.y, v.z, v.x);
456  }
457 
458  template<typename T, qualifier Q>
459  GLM_INLINE glm::vec<3, T, Q> yzx(const glm::vec<4, T, Q> &v) {
460  return glm::vec<3, T, Q>(v.y, v.z, v.x);
461  }
462 
463  // yzy
464  template<typename T, qualifier Q>
465  GLM_INLINE glm::vec<3, T, Q> yzy(const glm::vec<3, T, Q> &v) {
466  return glm::vec<3, T, Q>(v.y, v.z, v.y);
467  }
468 
469  template<typename T, qualifier Q>
470  GLM_INLINE glm::vec<3, T, Q> yzy(const glm::vec<4, T, Q> &v) {
471  return glm::vec<3, T, Q>(v.y, v.z, v.y);
472  }
473 
474  // yzz
475  template<typename T, qualifier Q>
476  GLM_INLINE glm::vec<3, T, Q> yzz(const glm::vec<3, T, Q> &v) {
477  return glm::vec<3, T, Q>(v.y, v.z, v.z);
478  }
479 
480  template<typename T, qualifier Q>
481  GLM_INLINE glm::vec<3, T, Q> yzz(const glm::vec<4, T, Q> &v) {
482  return glm::vec<3, T, Q>(v.y, v.z, v.z);
483  }
484 
485  // yzw
486  template<typename T, qualifier Q>
487  GLM_INLINE glm::vec<3, T, Q> yzw(const glm::vec<4, T, Q> &v) {
488  return glm::vec<3, T, Q>(v.y, v.z, v.w);
489  }
490 
491  // ywx
492  template<typename T, qualifier Q>
493  GLM_INLINE glm::vec<3, T, Q> ywx(const glm::vec<4, T, Q> &v) {
494  return glm::vec<3, T, Q>(v.y, v.w, v.x);
495  }
496 
497  // ywy
498  template<typename T, qualifier Q>
499  GLM_INLINE glm::vec<3, T, Q> ywy(const glm::vec<4, T, Q> &v) {
500  return glm::vec<3, T, Q>(v.y, v.w, v.y);
501  }
502 
503  // ywz
504  template<typename T, qualifier Q>
505  GLM_INLINE glm::vec<3, T, Q> ywz(const glm::vec<4, T, Q> &v) {
506  return glm::vec<3, T, Q>(v.y, v.w, v.z);
507  }
508 
509  // yww
510  template<typename T, qualifier Q>
511  GLM_INLINE glm::vec<3, T, Q> yww(const glm::vec<4, T, Q> &v) {
512  return glm::vec<3, T, Q>(v.y, v.w, v.w);
513  }
514 
515  // zxx
516  template<typename T, qualifier Q>
517  GLM_INLINE glm::vec<3, T, Q> zxx(const glm::vec<3, T, Q> &v) {
518  return glm::vec<3, T, Q>(v.z, v.x, v.x);
519  }
520 
521  template<typename T, qualifier Q>
522  GLM_INLINE glm::vec<3, T, Q> zxx(const glm::vec<4, T, Q> &v) {
523  return glm::vec<3, T, Q>(v.z, v.x, v.x);
524  }
525 
526  // zxy
527  template<typename T, qualifier Q>
528  GLM_INLINE glm::vec<3, T, Q> zxy(const glm::vec<3, T, Q> &v) {
529  return glm::vec<3, T, Q>(v.z, v.x, v.y);
530  }
531 
532  template<typename T, qualifier Q>
533  GLM_INLINE glm::vec<3, T, Q> zxy(const glm::vec<4, T, Q> &v) {
534  return glm::vec<3, T, Q>(v.z, v.x, v.y);
535  }
536 
537  // zxz
538  template<typename T, qualifier Q>
539  GLM_INLINE glm::vec<3, T, Q> zxz(const glm::vec<3, T, Q> &v) {
540  return glm::vec<3, T, Q>(v.z, v.x, v.z);
541  }
542 
543  template<typename T, qualifier Q>
544  GLM_INLINE glm::vec<3, T, Q> zxz(const glm::vec<4, T, Q> &v) {
545  return glm::vec<3, T, Q>(v.z, v.x, v.z);
546  }
547 
548  // zxw
549  template<typename T, qualifier Q>
550  GLM_INLINE glm::vec<3, T, Q> zxw(const glm::vec<4, T, Q> &v) {
551  return glm::vec<3, T, Q>(v.z, v.x, v.w);
552  }
553 
554  // zyx
555  template<typename T, qualifier Q>
556  GLM_INLINE glm::vec<3, T, Q> zyx(const glm::vec<3, T, Q> &v) {
557  return glm::vec<3, T, Q>(v.z, v.y, v.x);
558  }
559 
560  template<typename T, qualifier Q>
561  GLM_INLINE glm::vec<3, T, Q> zyx(const glm::vec<4, T, Q> &v) {
562  return glm::vec<3, T, Q>(v.z, v.y, v.x);
563  }
564 
565  // zyy
566  template<typename T, qualifier Q>
567  GLM_INLINE glm::vec<3, T, Q> zyy(const glm::vec<3, T, Q> &v) {
568  return glm::vec<3, T, Q>(v.z, v.y, v.y);
569  }
570 
571  template<typename T, qualifier Q>
572  GLM_INLINE glm::vec<3, T, Q> zyy(const glm::vec<4, T, Q> &v) {
573  return glm::vec<3, T, Q>(v.z, v.y, v.y);
574  }
575 
576  // zyz
577  template<typename T, qualifier Q>
578  GLM_INLINE glm::vec<3, T, Q> zyz(const glm::vec<3, T, Q> &v) {
579  return glm::vec<3, T, Q>(v.z, v.y, v.z);
580  }
581 
582  template<typename T, qualifier Q>
583  GLM_INLINE glm::vec<3, T, Q> zyz(const glm::vec<4, T, Q> &v) {
584  return glm::vec<3, T, Q>(v.z, v.y, v.z);
585  }
586 
587  // zyw
588  template<typename T, qualifier Q>
589  GLM_INLINE glm::vec<3, T, Q> zyw(const glm::vec<4, T, Q> &v) {
590  return glm::vec<3, T, Q>(v.z, v.y, v.w);
591  }
592 
593  // zzx
594  template<typename T, qualifier Q>
595  GLM_INLINE glm::vec<3, T, Q> zzx(const glm::vec<3, T, Q> &v) {
596  return glm::vec<3, T, Q>(v.z, v.z, v.x);
597  }
598 
599  template<typename T, qualifier Q>
600  GLM_INLINE glm::vec<3, T, Q> zzx(const glm::vec<4, T, Q> &v) {
601  return glm::vec<3, T, Q>(v.z, v.z, v.x);
602  }
603 
604  // zzy
605  template<typename T, qualifier Q>
606  GLM_INLINE glm::vec<3, T, Q> zzy(const glm::vec<3, T, Q> &v) {
607  return glm::vec<3, T, Q>(v.z, v.z, v.y);
608  }
609 
610  template<typename T, qualifier Q>
611  GLM_INLINE glm::vec<3, T, Q> zzy(const glm::vec<4, T, Q> &v) {
612  return glm::vec<3, T, Q>(v.z, v.z, v.y);
613  }
614 
615  // zzz
616  template<typename T, qualifier Q>
617  GLM_INLINE glm::vec<3, T, Q> zzz(const glm::vec<3, T, Q> &v) {
618  return glm::vec<3, T, Q>(v.z, v.z, v.z);
619  }
620 
621  template<typename T, qualifier Q>
622  GLM_INLINE glm::vec<3, T, Q> zzz(const glm::vec<4, T, Q> &v) {
623  return glm::vec<3, T, Q>(v.z, v.z, v.z);
624  }
625 
626  // zzw
627  template<typename T, qualifier Q>
628  GLM_INLINE glm::vec<3, T, Q> zzw(const glm::vec<4, T, Q> &v) {
629  return glm::vec<3, T, Q>(v.z, v.z, v.w);
630  }
631 
632  // zwx
633  template<typename T, qualifier Q>
634  GLM_INLINE glm::vec<3, T, Q> zwx(const glm::vec<4, T, Q> &v) {
635  return glm::vec<3, T, Q>(v.z, v.w, v.x);
636  }
637 
638  // zwy
639  template<typename T, qualifier Q>
640  GLM_INLINE glm::vec<3, T, Q> zwy(const glm::vec<4, T, Q> &v) {
641  return glm::vec<3, T, Q>(v.z, v.w, v.y);
642  }
643 
644  // zwz
645  template<typename T, qualifier Q>
646  GLM_INLINE glm::vec<3, T, Q> zwz(const glm::vec<4, T, Q> &v) {
647  return glm::vec<3, T, Q>(v.z, v.w, v.z);
648  }
649 
650  // zww
651  template<typename T, qualifier Q>
652  GLM_INLINE glm::vec<3, T, Q> zww(const glm::vec<4, T, Q> &v) {
653  return glm::vec<3, T, Q>(v.z, v.w, v.w);
654  }
655 
656  // wxx
657  template<typename T, qualifier Q>
658  GLM_INLINE glm::vec<3, T, Q> wxx(const glm::vec<4, T, Q> &v) {
659  return glm::vec<3, T, Q>(v.w, v.x, v.x);
660  }
661 
662  // wxy
663  template<typename T, qualifier Q>
664  GLM_INLINE glm::vec<3, T, Q> wxy(const glm::vec<4, T, Q> &v) {
665  return glm::vec<3, T, Q>(v.w, v.x, v.y);
666  }
667 
668  // wxz
669  template<typename T, qualifier Q>
670  GLM_INLINE glm::vec<3, T, Q> wxz(const glm::vec<4, T, Q> &v) {
671  return glm::vec<3, T, Q>(v.w, v.x, v.z);
672  }
673 
674  // wxw
675  template<typename T, qualifier Q>
676  GLM_INLINE glm::vec<3, T, Q> wxw(const glm::vec<4, T, Q> &v) {
677  return glm::vec<3, T, Q>(v.w, v.x, v.w);
678  }
679 
680  // wyx
681  template<typename T, qualifier Q>
682  GLM_INLINE glm::vec<3, T, Q> wyx(const glm::vec<4, T, Q> &v) {
683  return glm::vec<3, T, Q>(v.w, v.y, v.x);
684  }
685 
686  // wyy
687  template<typename T, qualifier Q>
688  GLM_INLINE glm::vec<3, T, Q> wyy(const glm::vec<4, T, Q> &v) {
689  return glm::vec<3, T, Q>(v.w, v.y, v.y);
690  }
691 
692  // wyz
693  template<typename T, qualifier Q>
694  GLM_INLINE glm::vec<3, T, Q> wyz(const glm::vec<4, T, Q> &v) {
695  return glm::vec<3, T, Q>(v.w, v.y, v.z);
696  }
697 
698  // wyw
699  template<typename T, qualifier Q>
700  GLM_INLINE glm::vec<3, T, Q> wyw(const glm::vec<4, T, Q> &v) {
701  return glm::vec<3, T, Q>(v.w, v.y, v.w);
702  }
703 
704  // wzx
705  template<typename T, qualifier Q>
706  GLM_INLINE glm::vec<3, T, Q> wzx(const glm::vec<4, T, Q> &v) {
707  return glm::vec<3, T, Q>(v.w, v.z, v.x);
708  }
709 
710  // wzy
711  template<typename T, qualifier Q>
712  GLM_INLINE glm::vec<3, T, Q> wzy(const glm::vec<4, T, Q> &v) {
713  return glm::vec<3, T, Q>(v.w, v.z, v.y);
714  }
715 
716  // wzz
717  template<typename T, qualifier Q>
718  GLM_INLINE glm::vec<3, T, Q> wzz(const glm::vec<4, T, Q> &v) {
719  return glm::vec<3, T, Q>(v.w, v.z, v.z);
720  }
721 
722  // wzw
723  template<typename T, qualifier Q>
724  GLM_INLINE glm::vec<3, T, Q> wzw(const glm::vec<4, T, Q> &v) {
725  return glm::vec<3, T, Q>(v.w, v.z, v.w);
726  }
727 
728  // wwx
729  template<typename T, qualifier Q>
730  GLM_INLINE glm::vec<3, T, Q> wwx(const glm::vec<4, T, Q> &v) {
731  return glm::vec<3, T, Q>(v.w, v.w, v.x);
732  }
733 
734  // wwy
735  template<typename T, qualifier Q>
736  GLM_INLINE glm::vec<3, T, Q> wwy(const glm::vec<4, T, Q> &v) {
737  return glm::vec<3, T, Q>(v.w, v.w, v.y);
738  }
739 
740  // wwz
741  template<typename T, qualifier Q>
742  GLM_INLINE glm::vec<3, T, Q> wwz(const glm::vec<4, T, Q> &v) {
743  return glm::vec<3, T, Q>(v.w, v.w, v.z);
744  }
745 
746  // www
747  template<typename T, qualifier Q>
748  GLM_INLINE glm::vec<3, T, Q> www(const glm::vec<4, T, Q> &v) {
749  return glm::vec<3, T, Q>(v.w, v.w, v.w);
750  }
751 
752  // xxxx
753  template<typename T, qualifier Q>
754  GLM_INLINE glm::vec<4, T, Q> xxxx(const glm::vec<1, T, Q> &v) {
755  return glm::vec<4, T, Q>(v.x, v.x, v.x, v.x);
756  }
757 
758  template<typename T, qualifier Q>
759  GLM_INLINE glm::vec<4, T, Q> xxxx(const glm::vec<2, T, Q> &v) {
760  return glm::vec<4, T, Q>(v.x, v.x, v.x, v.x);
761  }
762 
763  template<typename T, qualifier Q>
764  GLM_INLINE glm::vec<4, T, Q> xxxx(const glm::vec<3, T, Q> &v) {
765  return glm::vec<4, T, Q>(v.x, v.x, v.x, v.x);
766  }
767 
768  template<typename T, qualifier Q>
769  GLM_INLINE glm::vec<4, T, Q> xxxx(const glm::vec<4, T, Q> &v) {
770  return glm::vec<4, T, Q>(v.x, v.x, v.x, v.x);
771  }
772 
773  // xxxy
774  template<typename T, qualifier Q>
775  GLM_INLINE glm::vec<4, T, Q> xxxy(const glm::vec<2, T, Q> &v) {
776  return glm::vec<4, T, Q>(v.x, v.x, v.x, v.y);
777  }
778 
779  template<typename T, qualifier Q>
780  GLM_INLINE glm::vec<4, T, Q> xxxy(const glm::vec<3, T, Q> &v) {
781  return glm::vec<4, T, Q>(v.x, v.x, v.x, v.y);
782  }
783 
784  template<typename T, qualifier Q>
785  GLM_INLINE glm::vec<4, T, Q> xxxy(const glm::vec<4, T, Q> &v) {
786  return glm::vec<4, T, Q>(v.x, v.x, v.x, v.y);
787  }
788 
789  // xxxz
790  template<typename T, qualifier Q>
791  GLM_INLINE glm::vec<4, T, Q> xxxz(const glm::vec<3, T, Q> &v) {
792  return glm::vec<4, T, Q>(v.x, v.x, v.x, v.z);
793  }
794 
795  template<typename T, qualifier Q>
796  GLM_INLINE glm::vec<4, T, Q> xxxz(const glm::vec<4, T, Q> &v) {
797  return glm::vec<4, T, Q>(v.x, v.x, v.x, v.z);
798  }
799 
800  // xxxw
801  template<typename T, qualifier Q>
802  GLM_INLINE glm::vec<4, T, Q> xxxw(const glm::vec<4, T, Q> &v) {
803  return glm::vec<4, T, Q>(v.x, v.x, v.x, v.w);
804  }
805 
806  // xxyx
807  template<typename T, qualifier Q>
808  GLM_INLINE glm::vec<4, T, Q> xxyx(const glm::vec<2, T, Q> &v) {
809  return glm::vec<4, T, Q>(v.x, v.x, v.y, v.x);
810  }
811 
812  template<typename T, qualifier Q>
813  GLM_INLINE glm::vec<4, T, Q> xxyx(const glm::vec<3, T, Q> &v) {
814  return glm::vec<4, T, Q>(v.x, v.x, v.y, v.x);
815  }
816 
817  template<typename T, qualifier Q>
818  GLM_INLINE glm::vec<4, T, Q> xxyx(const glm::vec<4, T, Q> &v) {
819  return glm::vec<4, T, Q>(v.x, v.x, v.y, v.x);
820  }
821 
822  // xxyy
823  template<typename T, qualifier Q>
824  GLM_INLINE glm::vec<4, T, Q> xxyy(const glm::vec<2, T, Q> &v) {
825  return glm::vec<4, T, Q>(v.x, v.x, v.y, v.y);
826  }
827 
828  template<typename T, qualifier Q>
829  GLM_INLINE glm::vec<4, T, Q> xxyy(const glm::vec<3, T, Q> &v) {
830  return glm::vec<4, T, Q>(v.x, v.x, v.y, v.y);
831  }
832 
833  template<typename T, qualifier Q>
834  GLM_INLINE glm::vec<4, T, Q> xxyy(const glm::vec<4, T, Q> &v) {
835  return glm::vec<4, T, Q>(v.x, v.x, v.y, v.y);
836  }
837 
838  // xxyz
839  template<typename T, qualifier Q>
840  GLM_INLINE glm::vec<4, T, Q> xxyz(const glm::vec<3, T, Q> &v) {
841  return glm::vec<4, T, Q>(v.x, v.x, v.y, v.z);
842  }
843 
844  template<typename T, qualifier Q>
845  GLM_INLINE glm::vec<4, T, Q> xxyz(const glm::vec<4, T, Q> &v) {
846  return glm::vec<4, T, Q>(v.x, v.x, v.y, v.z);
847  }
848 
849  // xxyw
850  template<typename T, qualifier Q>
851  GLM_INLINE glm::vec<4, T, Q> xxyw(const glm::vec<4, T, Q> &v) {
852  return glm::vec<4, T, Q>(v.x, v.x, v.y, v.w);
853  }
854 
855  // xxzx
856  template<typename T, qualifier Q>
857  GLM_INLINE glm::vec<4, T, Q> xxzx(const glm::vec<3, T, Q> &v) {
858  return glm::vec<4, T, Q>(v.x, v.x, v.z, v.x);
859  }
860 
861  template<typename T, qualifier Q>
862  GLM_INLINE glm::vec<4, T, Q> xxzx(const glm::vec<4, T, Q> &v) {
863  return glm::vec<4, T, Q>(v.x, v.x, v.z, v.x);
864  }
865 
866  // xxzy
867  template<typename T, qualifier Q>
868  GLM_INLINE glm::vec<4, T, Q> xxzy(const glm::vec<3, T, Q> &v) {
869  return glm::vec<4, T, Q>(v.x, v.x, v.z, v.y);
870  }
871 
872  template<typename T, qualifier Q>
873  GLM_INLINE glm::vec<4, T, Q> xxzy(const glm::vec<4, T, Q> &v) {
874  return glm::vec<4, T, Q>(v.x, v.x, v.z, v.y);
875  }
876 
877  // xxzz
878  template<typename T, qualifier Q>
879  GLM_INLINE glm::vec<4, T, Q> xxzz(const glm::vec<3, T, Q> &v) {
880  return glm::vec<4, T, Q>(v.x, v.x, v.z, v.z);
881  }
882 
883  template<typename T, qualifier Q>
884  GLM_INLINE glm::vec<4, T, Q> xxzz(const glm::vec<4, T, Q> &v) {
885  return glm::vec<4, T, Q>(v.x, v.x, v.z, v.z);
886  }
887 
888  // xxzw
889  template<typename T, qualifier Q>
890  GLM_INLINE glm::vec<4, T, Q> xxzw(const glm::vec<4, T, Q> &v) {
891  return glm::vec<4, T, Q>(v.x, v.x, v.z, v.w);
892  }
893 
894  // xxwx
895  template<typename T, qualifier Q>
896  GLM_INLINE glm::vec<4, T, Q> xxwx(const glm::vec<4, T, Q> &v) {
897  return glm::vec<4, T, Q>(v.x, v.x, v.w, v.x);
898  }
899 
900  // xxwy
901  template<typename T, qualifier Q>
902  GLM_INLINE glm::vec<4, T, Q> xxwy(const glm::vec<4, T, Q> &v) {
903  return glm::vec<4, T, Q>(v.x, v.x, v.w, v.y);
904  }
905 
906  // xxwz
907  template<typename T, qualifier Q>
908  GLM_INLINE glm::vec<4, T, Q> xxwz(const glm::vec<4, T, Q> &v) {
909  return glm::vec<4, T, Q>(v.x, v.x, v.w, v.z);
910  }
911 
912  // xxww
913  template<typename T, qualifier Q>
914  GLM_INLINE glm::vec<4, T, Q> xxww(const glm::vec<4, T, Q> &v) {
915  return glm::vec<4, T, Q>(v.x, v.x, v.w, v.w);
916  }
917 
918  // xyxx
919  template<typename T, qualifier Q>
920  GLM_INLINE glm::vec<4, T, Q> xyxx(const glm::vec<2, T, Q> &v) {
921  return glm::vec<4, T, Q>(v.x, v.y, v.x, v.x);
922  }
923 
924  template<typename T, qualifier Q>
925  GLM_INLINE glm::vec<4, T, Q> xyxx(const glm::vec<3, T, Q> &v) {
926  return glm::vec<4, T, Q>(v.x, v.y, v.x, v.x);
927  }
928 
929  template<typename T, qualifier Q>
930  GLM_INLINE glm::vec<4, T, Q> xyxx(const glm::vec<4, T, Q> &v) {
931  return glm::vec<4, T, Q>(v.x, v.y, v.x, v.x);
932  }
933 
934  // xyxy
935  template<typename T, qualifier Q>
936  GLM_INLINE glm::vec<4, T, Q> xyxy(const glm::vec<2, T, Q> &v) {
937  return glm::vec<4, T, Q>(v.x, v.y, v.x, v.y);
938  }
939 
940  template<typename T, qualifier Q>
941  GLM_INLINE glm::vec<4, T, Q> xyxy(const glm::vec<3, T, Q> &v) {
942  return glm::vec<4, T, Q>(v.x, v.y, v.x, v.y);
943  }
944 
945  template<typename T, qualifier Q>
946  GLM_INLINE glm::vec<4, T, Q> xyxy(const glm::vec<4, T, Q> &v) {
947  return glm::vec<4, T, Q>(v.x, v.y, v.x, v.y);
948  }
949 
950  // xyxz
951  template<typename T, qualifier Q>
952  GLM_INLINE glm::vec<4, T, Q> xyxz(const glm::vec<3, T, Q> &v) {
953  return glm::vec<4, T, Q>(v.x, v.y, v.x, v.z);
954  }
955 
956  template<typename T, qualifier Q>
957  GLM_INLINE glm::vec<4, T, Q> xyxz(const glm::vec<4, T, Q> &v) {
958  return glm::vec<4, T, Q>(v.x, v.y, v.x, v.z);
959  }
960 
961  // xyxw
962  template<typename T, qualifier Q>
963  GLM_INLINE glm::vec<4, T, Q> xyxw(const glm::vec<4, T, Q> &v) {
964  return glm::vec<4, T, Q>(v.x, v.y, v.x, v.w);
965  }
966 
967  // xyyx
968  template<typename T, qualifier Q>
969  GLM_INLINE glm::vec<4, T, Q> xyyx(const glm::vec<2, T, Q> &v) {
970  return glm::vec<4, T, Q>(v.x, v.y, v.y, v.x);
971  }
972 
973  template<typename T, qualifier Q>
974  GLM_INLINE glm::vec<4, T, Q> xyyx(const glm::vec<3, T, Q> &v) {
975  return glm::vec<4, T, Q>(v.x, v.y, v.y, v.x);
976  }
977 
978  template<typename T, qualifier Q>
979  GLM_INLINE glm::vec<4, T, Q> xyyx(const glm::vec<4, T, Q> &v) {
980  return glm::vec<4, T, Q>(v.x, v.y, v.y, v.x);
981  }
982 
983  // xyyy
984  template<typename T, qualifier Q>
985  GLM_INLINE glm::vec<4, T, Q> xyyy(const glm::vec<2, T, Q> &v) {
986  return glm::vec<4, T, Q>(v.x, v.y, v.y, v.y);
987  }
988 
989  template<typename T, qualifier Q>
990  GLM_INLINE glm::vec<4, T, Q> xyyy(const glm::vec<3, T, Q> &v) {
991  return glm::vec<4, T, Q>(v.x, v.y, v.y, v.y);
992  }
993 
994  template<typename T, qualifier Q>
995  GLM_INLINE glm::vec<4, T, Q> xyyy(const glm::vec<4, T, Q> &v) {
996  return glm::vec<4, T, Q>(v.x, v.y, v.y, v.y);
997  }
998 
999  // xyyz
1000  template<typename T, qualifier Q>
1001  GLM_INLINE glm::vec<4, T, Q> xyyz(const glm::vec<3, T, Q> &v) {
1002  return glm::vec<4, T, Q>(v.x, v.y, v.y, v.z);
1003  }
1004 
1005  template<typename T, qualifier Q>
1006  GLM_INLINE glm::vec<4, T, Q> xyyz(const glm::vec<4, T, Q> &v) {
1007  return glm::vec<4, T, Q>(v.x, v.y, v.y, v.z);
1008  }
1009 
1010  // xyyw
1011  template<typename T, qualifier Q>
1012  GLM_INLINE glm::vec<4, T, Q> xyyw(const glm::vec<4, T, Q> &v) {
1013  return glm::vec<4, T, Q>(v.x, v.y, v.y, v.w);
1014  }
1015 
1016  // xyzx
1017  template<typename T, qualifier Q>
1018  GLM_INLINE glm::vec<4, T, Q> xyzx(const glm::vec<3, T, Q> &v) {
1019  return glm::vec<4, T, Q>(v.x, v.y, v.z, v.x);
1020  }
1021 
1022  template<typename T, qualifier Q>
1023  GLM_INLINE glm::vec<4, T, Q> xyzx(const glm::vec<4, T, Q> &v) {
1024  return glm::vec<4, T, Q>(v.x, v.y, v.z, v.x);
1025  }
1026 
1027  // xyzy
1028  template<typename T, qualifier Q>
1029  GLM_INLINE glm::vec<4, T, Q> xyzy(const glm::vec<3, T, Q> &v) {
1030  return glm::vec<4, T, Q>(v.x, v.y, v.z, v.y);
1031  }
1032 
1033  template<typename T, qualifier Q>
1034  GLM_INLINE glm::vec<4, T, Q> xyzy(const glm::vec<4, T, Q> &v) {
1035  return glm::vec<4, T, Q>(v.x, v.y, v.z, v.y);
1036  }
1037 
1038  // xyzz
1039  template<typename T, qualifier Q>
1040  GLM_INLINE glm::vec<4, T, Q> xyzz(const glm::vec<3, T, Q> &v) {
1041  return glm::vec<4, T, Q>(v.x, v.y, v.z, v.z);
1042  }
1043 
1044  template<typename T, qualifier Q>
1045  GLM_INLINE glm::vec<4, T, Q> xyzz(const glm::vec<4, T, Q> &v) {
1046  return glm::vec<4, T, Q>(v.x, v.y, v.z, v.z);
1047  }
1048 
1049  // xyzw
1050  template<typename T, qualifier Q>
1051  GLM_INLINE glm::vec<4, T, Q> xyzw(const glm::vec<4, T, Q> &v) {
1052  return glm::vec<4, T, Q>(v.x, v.y, v.z, v.w);
1053  }
1054 
1055  // xywx
1056  template<typename T, qualifier Q>
1057  GLM_INLINE glm::vec<4, T, Q> xywx(const glm::vec<4, T, Q> &v) {
1058  return glm::vec<4, T, Q>(v.x, v.y, v.w, v.x);
1059  }
1060 
1061  // xywy
1062  template<typename T, qualifier Q>
1063  GLM_INLINE glm::vec<4, T, Q> xywy(const glm::vec<4, T, Q> &v) {
1064  return glm::vec<4, T, Q>(v.x, v.y, v.w, v.y);
1065  }
1066 
1067  // xywz
1068  template<typename T, qualifier Q>
1069  GLM_INLINE glm::vec<4, T, Q> xywz(const glm::vec<4, T, Q> &v) {
1070  return glm::vec<4, T, Q>(v.x, v.y, v.w, v.z);
1071  }
1072 
1073  // xyww
1074  template<typename T, qualifier Q>
1075  GLM_INLINE glm::vec<4, T, Q> xyww(const glm::vec<4, T, Q> &v) {
1076  return glm::vec<4, T, Q>(v.x, v.y, v.w, v.w);
1077  }
1078 
1079  // xzxx
1080  template<typename T, qualifier Q>
1081  GLM_INLINE glm::vec<4, T, Q> xzxx(const glm::vec<3, T, Q> &v) {
1082  return glm::vec<4, T, Q>(v.x, v.z, v.x, v.x);
1083  }
1084 
1085  template<typename T, qualifier Q>
1086  GLM_INLINE glm::vec<4, T, Q> xzxx(const glm::vec<4, T, Q> &v) {
1087  return glm::vec<4, T, Q>(v.x, v.z, v.x, v.x);
1088  }
1089 
1090  // xzxy
1091  template<typename T, qualifier Q>
1092  GLM_INLINE glm::vec<4, T, Q> xzxy(const glm::vec<3, T, Q> &v) {
1093  return glm::vec<4, T, Q>(v.x, v.z, v.x, v.y);
1094  }
1095 
1096  template<typename T, qualifier Q>
1097  GLM_INLINE glm::vec<4, T, Q> xzxy(const glm::vec<4, T, Q> &v) {
1098  return glm::vec<4, T, Q>(v.x, v.z, v.x, v.y);
1099  }
1100 
1101  // xzxz
1102  template<typename T, qualifier Q>
1103  GLM_INLINE glm::vec<4, T, Q> xzxz(const glm::vec<3, T, Q> &v) {
1104  return glm::vec<4, T, Q>(v.x, v.z, v.x, v.z);
1105  }
1106 
1107  template<typename T, qualifier Q>
1108  GLM_INLINE glm::vec<4, T, Q> xzxz(const glm::vec<4, T, Q> &v) {
1109  return glm::vec<4, T, Q>(v.x, v.z, v.x, v.z);
1110  }
1111 
1112  // xzxw
1113  template<typename T, qualifier Q>
1114  GLM_INLINE glm::vec<4, T, Q> xzxw(const glm::vec<4, T, Q> &v) {
1115  return glm::vec<4, T, Q>(v.x, v.z, v.x, v.w);
1116  }
1117 
1118  // xzyx
1119  template<typename T, qualifier Q>
1120  GLM_INLINE glm::vec<4, T, Q> xzyx(const glm::vec<3, T, Q> &v) {
1121  return glm::vec<4, T, Q>(v.x, v.z, v.y, v.x);
1122  }
1123 
1124  template<typename T, qualifier Q>
1125  GLM_INLINE glm::vec<4, T, Q> xzyx(const glm::vec<4, T, Q> &v) {
1126  return glm::vec<4, T, Q>(v.x, v.z, v.y, v.x);
1127  }
1128 
1129  // xzyy
1130  template<typename T, qualifier Q>
1131  GLM_INLINE glm::vec<4, T, Q> xzyy(const glm::vec<3, T, Q> &v) {
1132  return glm::vec<4, T, Q>(v.x, v.z, v.y, v.y);
1133  }
1134 
1135  template<typename T, qualifier Q>
1136  GLM_INLINE glm::vec<4, T, Q> xzyy(const glm::vec<4, T, Q> &v) {
1137  return glm::vec<4, T, Q>(v.x, v.z, v.y, v.y);
1138  }
1139 
1140  // xzyz
1141  template<typename T, qualifier Q>
1142  GLM_INLINE glm::vec<4, T, Q> xzyz(const glm::vec<3, T, Q> &v) {
1143  return glm::vec<4, T, Q>(v.x, v.z, v.y, v.z);
1144  }
1145 
1146  template<typename T, qualifier Q>
1147  GLM_INLINE glm::vec<4, T, Q> xzyz(const glm::vec<4, T, Q> &v) {
1148  return glm::vec<4, T, Q>(v.x, v.z, v.y, v.z);
1149  }
1150 
1151  // xzyw
1152  template<typename T, qualifier Q>
1153  GLM_INLINE glm::vec<4, T, Q> xzyw(const glm::vec<4, T, Q> &v) {
1154  return glm::vec<4, T, Q>(v.x, v.z, v.y, v.w);
1155  }
1156 
1157  // xzzx
1158  template<typename T, qualifier Q>
1159  GLM_INLINE glm::vec<4, T, Q> xzzx(const glm::vec<3, T, Q> &v) {
1160  return glm::vec<4, T, Q>(v.x, v.z, v.z, v.x);
1161  }
1162 
1163  template<typename T, qualifier Q>
1164  GLM_INLINE glm::vec<4, T, Q> xzzx(const glm::vec<4, T, Q> &v) {
1165  return glm::vec<4, T, Q>(v.x, v.z, v.z, v.x);
1166  }
1167 
1168  // xzzy
1169  template<typename T, qualifier Q>
1170  GLM_INLINE glm::vec<4, T, Q> xzzy(const glm::vec<3, T, Q> &v) {
1171  return glm::vec<4, T, Q>(v.x, v.z, v.z, v.y);
1172  }
1173 
1174  template<typename T, qualifier Q>
1175  GLM_INLINE glm::vec<4, T, Q> xzzy(const glm::vec<4, T, Q> &v) {
1176  return glm::vec<4, T, Q>(v.x, v.z, v.z, v.y);
1177  }
1178 
1179  // xzzz
1180  template<typename T, qualifier Q>
1181  GLM_INLINE glm::vec<4, T, Q> xzzz(const glm::vec<3, T, Q> &v) {
1182  return glm::vec<4, T, Q>(v.x, v.z, v.z, v.z);
1183  }
1184 
1185  template<typename T, qualifier Q>
1186  GLM_INLINE glm::vec<4, T, Q> xzzz(const glm::vec<4, T, Q> &v) {
1187  return glm::vec<4, T, Q>(v.x, v.z, v.z, v.z);
1188  }
1189 
1190  // xzzw
1191  template<typename T, qualifier Q>
1192  GLM_INLINE glm::vec<4, T, Q> xzzw(const glm::vec<4, T, Q> &v) {
1193  return glm::vec<4, T, Q>(v.x, v.z, v.z, v.w);
1194  }
1195 
1196  // xzwx
1197  template<typename T, qualifier Q>
1198  GLM_INLINE glm::vec<4, T, Q> xzwx(const glm::vec<4, T, Q> &v) {
1199  return glm::vec<4, T, Q>(v.x, v.z, v.w, v.x);
1200  }
1201 
1202  // xzwy
1203  template<typename T, qualifier Q>
1204  GLM_INLINE glm::vec<4, T, Q> xzwy(const glm::vec<4, T, Q> &v) {
1205  return glm::vec<4, T, Q>(v.x, v.z, v.w, v.y);
1206  }
1207 
1208  // xzwz
1209  template<typename T, qualifier Q>
1210  GLM_INLINE glm::vec<4, T, Q> xzwz(const glm::vec<4, T, Q> &v) {
1211  return glm::vec<4, T, Q>(v.x, v.z, v.w, v.z);
1212  }
1213 
1214  // xzww
1215  template<typename T, qualifier Q>
1216  GLM_INLINE glm::vec<4, T, Q> xzww(const glm::vec<4, T, Q> &v) {
1217  return glm::vec<4, T, Q>(v.x, v.z, v.w, v.w);
1218  }
1219 
1220  // xwxx
1221  template<typename T, qualifier Q>
1222  GLM_INLINE glm::vec<4, T, Q> xwxx(const glm::vec<4, T, Q> &v) {
1223  return glm::vec<4, T, Q>(v.x, v.w, v.x, v.x);
1224  }
1225 
1226  // xwxy
1227  template<typename T, qualifier Q>
1228  GLM_INLINE glm::vec<4, T, Q> xwxy(const glm::vec<4, T, Q> &v) {
1229  return glm::vec<4, T, Q>(v.x, v.w, v.x, v.y);
1230  }
1231 
1232  // xwxz
1233  template<typename T, qualifier Q>
1234  GLM_INLINE glm::vec<4, T, Q> xwxz(const glm::vec<4, T, Q> &v) {
1235  return glm::vec<4, T, Q>(v.x, v.w, v.x, v.z);
1236  }
1237 
1238  // xwxw
1239  template<typename T, qualifier Q>
1240  GLM_INLINE glm::vec<4, T, Q> xwxw(const glm::vec<4, T, Q> &v) {
1241  return glm::vec<4, T, Q>(v.x, v.w, v.x, v.w);
1242  }
1243 
1244  // xwyx
1245  template<typename T, qualifier Q>
1246  GLM_INLINE glm::vec<4, T, Q> xwyx(const glm::vec<4, T, Q> &v) {
1247  return glm::vec<4, T, Q>(v.x, v.w, v.y, v.x);
1248  }
1249 
1250  // xwyy
1251  template<typename T, qualifier Q>
1252  GLM_INLINE glm::vec<4, T, Q> xwyy(const glm::vec<4, T, Q> &v) {
1253  return glm::vec<4, T, Q>(v.x, v.w, v.y, v.y);
1254  }
1255 
1256  // xwyz
1257  template<typename T, qualifier Q>
1258  GLM_INLINE glm::vec<4, T, Q> xwyz(const glm::vec<4, T, Q> &v) {
1259  return glm::vec<4, T, Q>(v.x, v.w, v.y, v.z);
1260  }
1261 
1262  // xwyw
1263  template<typename T, qualifier Q>
1264  GLM_INLINE glm::vec<4, T, Q> xwyw(const glm::vec<4, T, Q> &v) {
1265  return glm::vec<4, T, Q>(v.x, v.w, v.y, v.w);
1266  }
1267 
1268  // xwzx
1269  template<typename T, qualifier Q>
1270  GLM_INLINE glm::vec<4, T, Q> xwzx(const glm::vec<4, T, Q> &v) {
1271  return glm::vec<4, T, Q>(v.x, v.w, v.z, v.x);
1272  }
1273 
1274  // xwzy
1275  template<typename T, qualifier Q>
1276  GLM_INLINE glm::vec<4, T, Q> xwzy(const glm::vec<4, T, Q> &v) {
1277  return glm::vec<4, T, Q>(v.x, v.w, v.z, v.y);
1278  }
1279 
1280  // xwzz
1281  template<typename T, qualifier Q>
1282  GLM_INLINE glm::vec<4, T, Q> xwzz(const glm::vec<4, T, Q> &v) {
1283  return glm::vec<4, T, Q>(v.x, v.w, v.z, v.z);
1284  }
1285 
1286  // xwzw
1287  template<typename T, qualifier Q>
1288  GLM_INLINE glm::vec<4, T, Q> xwzw(const glm::vec<4, T, Q> &v) {
1289  return glm::vec<4, T, Q>(v.x, v.w, v.z, v.w);
1290  }
1291 
1292  // xwwx
1293  template<typename T, qualifier Q>
1294  GLM_INLINE glm::vec<4, T, Q> xwwx(const glm::vec<4, T, Q> &v) {
1295  return glm::vec<4, T, Q>(v.x, v.w, v.w, v.x);
1296  }
1297 
1298  // xwwy
1299  template<typename T, qualifier Q>
1300  GLM_INLINE glm::vec<4, T, Q> xwwy(const glm::vec<4, T, Q> &v) {
1301  return glm::vec<4, T, Q>(v.x, v.w, v.w, v.y);
1302  }
1303 
1304  // xwwz
1305  template<typename T, qualifier Q>
1306  GLM_INLINE glm::vec<4, T, Q> xwwz(const glm::vec<4, T, Q> &v) {
1307  return glm::vec<4, T, Q>(v.x, v.w, v.w, v.z);
1308  }
1309 
1310  // xwww
1311  template<typename T, qualifier Q>
1312  GLM_INLINE glm::vec<4, T, Q> xwww(const glm::vec<4, T, Q> &v) {
1313  return glm::vec<4, T, Q>(v.x, v.w, v.w, v.w);
1314  }
1315 
1316  // yxxx
1317  template<typename T, qualifier Q>
1318  GLM_INLINE glm::vec<4, T, Q> yxxx(const glm::vec<2, T, Q> &v) {
1319  return glm::vec<4, T, Q>(v.y, v.x, v.x, v.x);
1320  }
1321 
1322  template<typename T, qualifier Q>
1323  GLM_INLINE glm::vec<4, T, Q> yxxx(const glm::vec<3, T, Q> &v) {
1324  return glm::vec<4, T, Q>(v.y, v.x, v.x, v.x);
1325  }
1326 
1327  template<typename T, qualifier Q>
1328  GLM_INLINE glm::vec<4, T, Q> yxxx(const glm::vec<4, T, Q> &v) {
1329  return glm::vec<4, T, Q>(v.y, v.x, v.x, v.x);
1330  }
1331 
1332  // yxxy
1333  template<typename T, qualifier Q>
1334  GLM_INLINE glm::vec<4, T, Q> yxxy(const glm::vec<2, T, Q> &v) {
1335  return glm::vec<4, T, Q>(v.y, v.x, v.x, v.y);
1336  }
1337 
1338  template<typename T, qualifier Q>
1339  GLM_INLINE glm::vec<4, T, Q> yxxy(const glm::vec<3, T, Q> &v) {
1340  return glm::vec<4, T, Q>(v.y, v.x, v.x, v.y);
1341  }
1342 
1343  template<typename T, qualifier Q>
1344  GLM_INLINE glm::vec<4, T, Q> yxxy(const glm::vec<4, T, Q> &v) {
1345  return glm::vec<4, T, Q>(v.y, v.x, v.x, v.y);
1346  }
1347 
1348  // yxxz
1349  template<typename T, qualifier Q>
1350  GLM_INLINE glm::vec<4, T, Q> yxxz(const glm::vec<3, T, Q> &v) {
1351  return glm::vec<4, T, Q>(v.y, v.x, v.x, v.z);
1352  }
1353 
1354  template<typename T, qualifier Q>
1355  GLM_INLINE glm::vec<4, T, Q> yxxz(const glm::vec<4, T, Q> &v) {
1356  return glm::vec<4, T, Q>(v.y, v.x, v.x, v.z);
1357  }
1358 
1359  // yxxw
1360  template<typename T, qualifier Q>
1361  GLM_INLINE glm::vec<4, T, Q> yxxw(const glm::vec<4, T, Q> &v) {
1362  return glm::vec<4, T, Q>(v.y, v.x, v.x, v.w);
1363  }
1364 
1365  // yxyx
1366  template<typename T, qualifier Q>
1367  GLM_INLINE glm::vec<4, T, Q> yxyx(const glm::vec<2, T, Q> &v) {
1368  return glm::vec<4, T, Q>(v.y, v.x, v.y, v.x);
1369  }
1370 
1371  template<typename T, qualifier Q>
1372  GLM_INLINE glm::vec<4, T, Q> yxyx(const glm::vec<3, T, Q> &v) {
1373  return glm::vec<4, T, Q>(v.y, v.x, v.y, v.x);
1374  }
1375 
1376  template<typename T, qualifier Q>
1377  GLM_INLINE glm::vec<4, T, Q> yxyx(const glm::vec<4, T, Q> &v) {
1378  return glm::vec<4, T, Q>(v.y, v.x, v.y, v.x);
1379  }
1380 
1381  // yxyy
1382  template<typename T, qualifier Q>
1383  GLM_INLINE glm::vec<4, T, Q> yxyy(const glm::vec<2, T, Q> &v) {
1384  return glm::vec<4, T, Q>(v.y, v.x, v.y, v.y);
1385  }
1386 
1387  template<typename T, qualifier Q>
1388  GLM_INLINE glm::vec<4, T, Q> yxyy(const glm::vec<3, T, Q> &v) {
1389  return glm::vec<4, T, Q>(v.y, v.x, v.y, v.y);
1390  }
1391 
1392  template<typename T, qualifier Q>
1393  GLM_INLINE glm::vec<4, T, Q> yxyy(const glm::vec<4, T, Q> &v) {
1394  return glm::vec<4, T, Q>(v.y, v.x, v.y, v.y);
1395  }
1396 
1397  // yxyz
1398  template<typename T, qualifier Q>
1399  GLM_INLINE glm::vec<4, T, Q> yxyz(const glm::vec<3, T, Q> &v) {
1400  return glm::vec<4, T, Q>(v.y, v.x, v.y, v.z);
1401  }
1402 
1403  template<typename T, qualifier Q>
1404  GLM_INLINE glm::vec<4, T, Q> yxyz(const glm::vec<4, T, Q> &v) {
1405  return glm::vec<4, T, Q>(v.y, v.x, v.y, v.z);
1406  }
1407 
1408  // yxyw
1409  template<typename T, qualifier Q>
1410  GLM_INLINE glm::vec<4, T, Q> yxyw(const glm::vec<4, T, Q> &v) {
1411  return glm::vec<4, T, Q>(v.y, v.x, v.y, v.w);
1412  }
1413 
1414  // yxzx
1415  template<typename T, qualifier Q>
1416  GLM_INLINE glm::vec<4, T, Q> yxzx(const glm::vec<3, T, Q> &v) {
1417  return glm::vec<4, T, Q>(v.y, v.x, v.z, v.x);
1418  }
1419 
1420  template<typename T, qualifier Q>
1421  GLM_INLINE glm::vec<4, T, Q> yxzx(const glm::vec<4, T, Q> &v) {
1422  return glm::vec<4, T, Q>(v.y, v.x, v.z, v.x);
1423  }
1424 
1425  // yxzy
1426  template<typename T, qualifier Q>
1427  GLM_INLINE glm::vec<4, T, Q> yxzy(const glm::vec<3, T, Q> &v) {
1428  return glm::vec<4, T, Q>(v.y, v.x, v.z, v.y);
1429  }
1430 
1431  template<typename T, qualifier Q>
1432  GLM_INLINE glm::vec<4, T, Q> yxzy(const glm::vec<4, T, Q> &v) {
1433  return glm::vec<4, T, Q>(v.y, v.x, v.z, v.y);
1434  }
1435 
1436  // yxzz
1437  template<typename T, qualifier Q>
1438  GLM_INLINE glm::vec<4, T, Q> yxzz(const glm::vec<3, T, Q> &v) {
1439  return glm::vec<4, T, Q>(v.y, v.x, v.z, v.z);
1440  }
1441 
1442  template<typename T, qualifier Q>
1443  GLM_INLINE glm::vec<4, T, Q> yxzz(const glm::vec<4, T, Q> &v) {
1444  return glm::vec<4, T, Q>(v.y, v.x, v.z, v.z);
1445  }
1446 
1447  // yxzw
1448  template<typename T, qualifier Q>
1449  GLM_INLINE glm::vec<4, T, Q> yxzw(const glm::vec<4, T, Q> &v) {
1450  return glm::vec<4, T, Q>(v.y, v.x, v.z, v.w);
1451  }
1452 
1453  // yxwx
1454  template<typename T, qualifier Q>
1455  GLM_INLINE glm::vec<4, T, Q> yxwx(const glm::vec<4, T, Q> &v) {
1456  return glm::vec<4, T, Q>(v.y, v.x, v.w, v.x);
1457  }
1458 
1459  // yxwy
1460  template<typename T, qualifier Q>
1461  GLM_INLINE glm::vec<4, T, Q> yxwy(const glm::vec<4, T, Q> &v) {
1462  return glm::vec<4, T, Q>(v.y, v.x, v.w, v.y);
1463  }
1464 
1465  // yxwz
1466  template<typename T, qualifier Q>
1467  GLM_INLINE glm::vec<4, T, Q> yxwz(const glm::vec<4, T, Q> &v) {
1468  return glm::vec<4, T, Q>(v.y, v.x, v.w, v.z);
1469  }
1470 
1471  // yxww
1472  template<typename T, qualifier Q>
1473  GLM_INLINE glm::vec<4, T, Q> yxww(const glm::vec<4, T, Q> &v) {
1474  return glm::vec<4, T, Q>(v.y, v.x, v.w, v.w);
1475  }
1476 
1477  // yyxx
1478  template<typename T, qualifier Q>
1479  GLM_INLINE glm::vec<4, T, Q> yyxx(const glm::vec<2, T, Q> &v) {
1480  return glm::vec<4, T, Q>(v.y, v.y, v.x, v.x);
1481  }
1482 
1483  template<typename T, qualifier Q>
1484  GLM_INLINE glm::vec<4, T, Q> yyxx(const glm::vec<3, T, Q> &v) {
1485  return glm::vec<4, T, Q>(v.y, v.y, v.x, v.x);
1486  }
1487 
1488  template<typename T, qualifier Q>
1489  GLM_INLINE glm::vec<4, T, Q> yyxx(const glm::vec<4, T, Q> &v) {
1490  return glm::vec<4, T, Q>(v.y, v.y, v.x, v.x);
1491  }
1492 
1493  // yyxy
1494  template<typename T, qualifier Q>
1495  GLM_INLINE glm::vec<4, T, Q> yyxy(const glm::vec<2, T, Q> &v) {
1496  return glm::vec<4, T, Q>(v.y, v.y, v.x, v.y);
1497  }
1498 
1499  template<typename T, qualifier Q>
1500  GLM_INLINE glm::vec<4, T, Q> yyxy(const glm::vec<3, T, Q> &v) {
1501  return glm::vec<4, T, Q>(v.y, v.y, v.x, v.y);
1502  }
1503 
1504  template<typename T, qualifier Q>
1505  GLM_INLINE glm::vec<4, T, Q> yyxy(const glm::vec<4, T, Q> &v) {
1506  return glm::vec<4, T, Q>(v.y, v.y, v.x, v.y);
1507  }
1508 
1509  // yyxz
1510  template<typename T, qualifier Q>
1511  GLM_INLINE glm::vec<4, T, Q> yyxz(const glm::vec<3, T, Q> &v) {
1512  return glm::vec<4, T, Q>(v.y, v.y, v.x, v.z);
1513  }
1514 
1515  template<typename T, qualifier Q>
1516  GLM_INLINE glm::vec<4, T, Q> yyxz(const glm::vec<4, T, Q> &v) {
1517  return glm::vec<4, T, Q>(v.y, v.y, v.x, v.z);
1518  }
1519 
1520  // yyxw
1521  template<typename T, qualifier Q>
1522  GLM_INLINE glm::vec<4, T, Q> yyxw(const glm::vec<4, T, Q> &v) {
1523  return glm::vec<4, T, Q>(v.y, v.y, v.x, v.w);
1524  }
1525 
1526  // yyyx
1527  template<typename T, qualifier Q>
1528  GLM_INLINE glm::vec<4, T, Q> yyyx(const glm::vec<2, T, Q> &v) {
1529  return glm::vec<4, T, Q>(v.y, v.y, v.y, v.x);
1530  }
1531 
1532  template<typename T, qualifier Q>
1533  GLM_INLINE glm::vec<4, T, Q> yyyx(const glm::vec<3, T, Q> &v) {
1534  return glm::vec<4, T, Q>(v.y, v.y, v.y, v.x);
1535  }
1536 
1537  template<typename T, qualifier Q>
1538  GLM_INLINE glm::vec<4, T, Q> yyyx(const glm::vec<4, T, Q> &v) {
1539  return glm::vec<4, T, Q>(v.y, v.y, v.y, v.x);
1540  }
1541 
1542  // yyyy
1543  template<typename T, qualifier Q>
1544  GLM_INLINE glm::vec<4, T, Q> yyyy(const glm::vec<2, T, Q> &v) {
1545  return glm::vec<4, T, Q>(v.y, v.y, v.y, v.y);
1546  }
1547 
1548  template<typename T, qualifier Q>
1549  GLM_INLINE glm::vec<4, T, Q> yyyy(const glm::vec<3, T, Q> &v) {
1550  return glm::vec<4, T, Q>(v.y, v.y, v.y, v.y);
1551  }
1552 
1553  template<typename T, qualifier Q>
1554  GLM_INLINE glm::vec<4, T, Q> yyyy(const glm::vec<4, T, Q> &v) {
1555  return glm::vec<4, T, Q>(v.y, v.y, v.y, v.y);
1556  }
1557 
1558  // yyyz
1559  template<typename T, qualifier Q>
1560  GLM_INLINE glm::vec<4, T, Q> yyyz(const glm::vec<3, T, Q> &v) {
1561  return glm::vec<4, T, Q>(v.y, v.y, v.y, v.z);
1562  }
1563 
1564  template<typename T, qualifier Q>
1565  GLM_INLINE glm::vec<4, T, Q> yyyz(const glm::vec<4, T, Q> &v) {
1566  return glm::vec<4, T, Q>(v.y, v.y, v.y, v.z);
1567  }
1568 
1569  // yyyw
1570  template<typename T, qualifier Q>
1571  GLM_INLINE glm::vec<4, T, Q> yyyw(const glm::vec<4, T, Q> &v) {
1572  return glm::vec<4, T, Q>(v.y, v.y, v.y, v.w);
1573  }
1574 
1575  // yyzx
1576  template<typename T, qualifier Q>
1577  GLM_INLINE glm::vec<4, T, Q> yyzx(const glm::vec<3, T, Q> &v) {
1578  return glm::vec<4, T, Q>(v.y, v.y, v.z, v.x);
1579  }
1580 
1581  template<typename T, qualifier Q>
1582  GLM_INLINE glm::vec<4, T, Q> yyzx(const glm::vec<4, T, Q> &v) {
1583  return glm::vec<4, T, Q>(v.y, v.y, v.z, v.x);
1584  }
1585 
1586  // yyzy
1587  template<typename T, qualifier Q>
1588  GLM_INLINE glm::vec<4, T, Q> yyzy(const glm::vec<3, T, Q> &v) {
1589  return glm::vec<4, T, Q>(v.y, v.y, v.z, v.y);
1590  }
1591 
1592  template<typename T, qualifier Q>
1593  GLM_INLINE glm::vec<4, T, Q> yyzy(const glm::vec<4, T, Q> &v) {
1594  return glm::vec<4, T, Q>(v.y, v.y, v.z, v.y);
1595  }
1596 
1597  // yyzz
1598  template<typename T, qualifier Q>
1599  GLM_INLINE glm::vec<4, T, Q> yyzz(const glm::vec<3, T, Q> &v) {
1600  return glm::vec<4, T, Q>(v.y, v.y, v.z, v.z);
1601  }
1602 
1603  template<typename T, qualifier Q>
1604  GLM_INLINE glm::vec<4, T, Q> yyzz(const glm::vec<4, T, Q> &v) {
1605  return glm::vec<4, T, Q>(v.y, v.y, v.z, v.z);
1606  }
1607 
1608  // yyzw
1609  template<typename T, qualifier Q>
1610  GLM_INLINE glm::vec<4, T, Q> yyzw(const glm::vec<4, T, Q> &v) {
1611  return glm::vec<4, T, Q>(v.y, v.y, v.z, v.w);
1612  }
1613 
1614  // yywx
1615  template<typename T, qualifier Q>
1616  GLM_INLINE glm::vec<4, T, Q> yywx(const glm::vec<4, T, Q> &v) {
1617  return glm::vec<4, T, Q>(v.y, v.y, v.w, v.x);
1618  }
1619 
1620  // yywy
1621  template<typename T, qualifier Q>
1622  GLM_INLINE glm::vec<4, T, Q> yywy(const glm::vec<4, T, Q> &v) {
1623  return glm::vec<4, T, Q>(v.y, v.y, v.w, v.y);
1624  }
1625 
1626  // yywz
1627  template<typename T, qualifier Q>
1628  GLM_INLINE glm::vec<4, T, Q> yywz(const glm::vec<4, T, Q> &v) {
1629  return glm::vec<4, T, Q>(v.y, v.y, v.w, v.z);
1630  }
1631 
1632  // yyww
1633  template<typename T, qualifier Q>
1634  GLM_INLINE glm::vec<4, T, Q> yyww(const glm::vec<4, T, Q> &v) {
1635  return glm::vec<4, T, Q>(v.y, v.y, v.w, v.w);
1636  }
1637 
1638  // yzxx
1639  template<typename T, qualifier Q>
1640  GLM_INLINE glm::vec<4, T, Q> yzxx(const glm::vec<3, T, Q> &v) {
1641  return glm::vec<4, T, Q>(v.y, v.z, v.x, v.x);
1642  }
1643 
1644  template<typename T, qualifier Q>
1645  GLM_INLINE glm::vec<4, T, Q> yzxx(const glm::vec<4, T, Q> &v) {
1646  return glm::vec<4, T, Q>(v.y, v.z, v.x, v.x);
1647  }
1648 
1649  // yzxy
1650  template<typename T, qualifier Q>
1651  GLM_INLINE glm::vec<4, T, Q> yzxy(const glm::vec<3, T, Q> &v) {
1652  return glm::vec<4, T, Q>(v.y, v.z, v.x, v.y);
1653  }
1654 
1655  template<typename T, qualifier Q>
1656  GLM_INLINE glm::vec<4, T, Q> yzxy(const glm::vec<4, T, Q> &v) {
1657  return glm::vec<4, T, Q>(v.y, v.z, v.x, v.y);
1658  }
1659 
1660  // yzxz
1661  template<typename T, qualifier Q>
1662  GLM_INLINE glm::vec<4, T, Q> yzxz(const glm::vec<3, T, Q> &v) {
1663  return glm::vec<4, T, Q>(v.y, v.z, v.x, v.z);
1664  }
1665 
1666  template<typename T, qualifier Q>
1667  GLM_INLINE glm::vec<4, T, Q> yzxz(const glm::vec<4, T, Q> &v) {
1668  return glm::vec<4, T, Q>(v.y, v.z, v.x, v.z);
1669  }
1670 
1671  // yzxw
1672  template<typename T, qualifier Q>
1673  GLM_INLINE glm::vec<4, T, Q> yzxw(const glm::vec<4, T, Q> &v) {
1674  return glm::vec<4, T, Q>(v.y, v.z, v.x, v.w);
1675  }
1676 
1677  // yzyx
1678  template<typename T, qualifier Q>
1679  GLM_INLINE glm::vec<4, T, Q> yzyx(const glm::vec<3, T, Q> &v) {
1680  return glm::vec<4, T, Q>(v.y, v.z, v.y, v.x);
1681  }
1682 
1683  template<typename T, qualifier Q>
1684  GLM_INLINE glm::vec<4, T, Q> yzyx(const glm::vec<4, T, Q> &v) {
1685  return glm::vec<4, T, Q>(v.y, v.z, v.y, v.x);
1686  }
1687 
1688  // yzyy
1689  template<typename T, qualifier Q>
1690  GLM_INLINE glm::vec<4, T, Q> yzyy(const glm::vec<3, T, Q> &v) {
1691  return glm::vec<4, T, Q>(v.y, v.z, v.y, v.y);
1692  }
1693 
1694  template<typename T, qualifier Q>
1695  GLM_INLINE glm::vec<4, T, Q> yzyy(const glm::vec<4, T, Q> &v) {
1696  return glm::vec<4, T, Q>(v.y, v.z, v.y, v.y);
1697  }
1698 
1699  // yzyz
1700  template<typename T, qualifier Q>
1701  GLM_INLINE glm::vec<4, T, Q> yzyz(const glm::vec<3, T, Q> &v) {
1702  return glm::vec<4, T, Q>(v.y, v.z, v.y, v.z);
1703  }
1704 
1705  template<typename T, qualifier Q>
1706  GLM_INLINE glm::vec<4, T, Q> yzyz(const glm::vec<4, T, Q> &v) {
1707  return glm::vec<4, T, Q>(v.y, v.z, v.y, v.z);
1708  }
1709 
1710  // yzyw
1711  template<typename T, qualifier Q>
1712  GLM_INLINE glm::vec<4, T, Q> yzyw(const glm::vec<4, T, Q> &v) {
1713  return glm::vec<4, T, Q>(v.y, v.z, v.y, v.w);
1714  }
1715 
1716  // yzzx
1717  template<typename T, qualifier Q>
1718  GLM_INLINE glm::vec<4, T, Q> yzzx(const glm::vec<3, T, Q> &v) {
1719  return glm::vec<4, T, Q>(v.y, v.z, v.z, v.x);
1720  }
1721 
1722  template<typename T, qualifier Q>
1723  GLM_INLINE glm::vec<4, T, Q> yzzx(const glm::vec<4, T, Q> &v) {
1724  return glm::vec<4, T, Q>(v.y, v.z, v.z, v.x);
1725  }
1726 
1727  // yzzy
1728  template<typename T, qualifier Q>
1729  GLM_INLINE glm::vec<4, T, Q> yzzy(const glm::vec<3, T, Q> &v) {
1730  return glm::vec<4, T, Q>(v.y, v.z, v.z, v.y);
1731  }
1732 
1733  template<typename T, qualifier Q>
1734  GLM_INLINE glm::vec<4, T, Q> yzzy(const glm::vec<4, T, Q> &v) {
1735  return glm::vec<4, T, Q>(v.y, v.z, v.z, v.y);
1736  }
1737 
1738  // yzzz
1739  template<typename T, qualifier Q>
1740  GLM_INLINE glm::vec<4, T, Q> yzzz(const glm::vec<3, T, Q> &v) {
1741  return glm::vec<4, T, Q>(v.y, v.z, v.z, v.z);
1742  }
1743 
1744  template<typename T, qualifier Q>
1745  GLM_INLINE glm::vec<4, T, Q> yzzz(const glm::vec<4, T, Q> &v) {
1746  return glm::vec<4, T, Q>(v.y, v.z, v.z, v.z);
1747  }
1748 
1749  // yzzw
1750  template<typename T, qualifier Q>
1751  GLM_INLINE glm::vec<4, T, Q> yzzw(const glm::vec<4, T, Q> &v) {
1752  return glm::vec<4, T, Q>(v.y, v.z, v.z, v.w);
1753  }
1754 
1755  // yzwx
1756  template<typename T, qualifier Q>
1757  GLM_INLINE glm::vec<4, T, Q> yzwx(const glm::vec<4, T, Q> &v) {
1758  return glm::vec<4, T, Q>(v.y, v.z, v.w, v.x);
1759  }
1760 
1761  // yzwy
1762  template<typename T, qualifier Q>
1763  GLM_INLINE glm::vec<4, T, Q> yzwy(const glm::vec<4, T, Q> &v) {
1764  return glm::vec<4, T, Q>(v.y, v.z, v.w, v.y);
1765  }
1766 
1767  // yzwz
1768  template<typename T, qualifier Q>
1769  GLM_INLINE glm::vec<4, T, Q> yzwz(const glm::vec<4, T, Q> &v) {
1770  return glm::vec<4, T, Q>(v.y, v.z, v.w, v.z);
1771  }
1772 
1773  // yzww
1774  template<typename T, qualifier Q>
1775  GLM_INLINE glm::vec<4, T, Q> yzww(const glm::vec<4, T, Q> &v) {
1776  return glm::vec<4, T, Q>(v.y, v.z, v.w, v.w);
1777  }
1778 
1779  // ywxx
1780  template<typename T, qualifier Q>
1781  GLM_INLINE glm::vec<4, T, Q> ywxx(const glm::vec<4, T, Q> &v) {
1782  return glm::vec<4, T, Q>(v.y, v.w, v.x, v.x);
1783  }
1784 
1785  // ywxy
1786  template<typename T, qualifier Q>
1787  GLM_INLINE glm::vec<4, T, Q> ywxy(const glm::vec<4, T, Q> &v) {
1788  return glm::vec<4, T, Q>(v.y, v.w, v.x, v.y);
1789  }
1790 
1791  // ywxz
1792  template<typename T, qualifier Q>
1793  GLM_INLINE glm::vec<4, T, Q> ywxz(const glm::vec<4, T, Q> &v) {
1794  return glm::vec<4, T, Q>(v.y, v.w, v.x, v.z);
1795  }
1796 
1797  // ywxw
1798  template<typename T, qualifier Q>
1799  GLM_INLINE glm::vec<4, T, Q> ywxw(const glm::vec<4, T, Q> &v) {
1800  return glm::vec<4, T, Q>(v.y, v.w, v.x, v.w);
1801  }
1802 
1803  // ywyx
1804  template<typename T, qualifier Q>
1805  GLM_INLINE glm::vec<4, T, Q> ywyx(const glm::vec<4, T, Q> &v) {
1806  return glm::vec<4, T, Q>(v.y, v.w, v.y, v.x);
1807  }
1808 
1809  // ywyy
1810  template<typename T, qualifier Q>
1811  GLM_INLINE glm::vec<4, T, Q> ywyy(const glm::vec<4, T, Q> &v) {
1812  return glm::vec<4, T, Q>(v.y, v.w, v.y, v.y);
1813  }
1814 
1815  // ywyz
1816  template<typename T, qualifier Q>
1817  GLM_INLINE glm::vec<4, T, Q> ywyz(const glm::vec<4, T, Q> &v) {
1818  return glm::vec<4, T, Q>(v.y, v.w, v.y, v.z);
1819  }
1820 
1821  // ywyw
1822  template<typename T, qualifier Q>
1823  GLM_INLINE glm::vec<4, T, Q> ywyw(const glm::vec<4, T, Q> &v) {
1824  return glm::vec<4, T, Q>(v.y, v.w, v.y, v.w);
1825  }
1826 
1827  // ywzx
1828  template<typename T, qualifier Q>
1829  GLM_INLINE glm::vec<4, T, Q> ywzx(const glm::vec<4, T, Q> &v) {
1830  return glm::vec<4, T, Q>(v.y, v.w, v.z, v.x);
1831  }
1832 
1833  // ywzy
1834  template<typename T, qualifier Q>
1835  GLM_INLINE glm::vec<4, T, Q> ywzy(const glm::vec<4, T, Q> &v) {
1836  return glm::vec<4, T, Q>(v.y, v.w, v.z, v.y);
1837  }
1838 
1839  // ywzz
1840  template<typename T, qualifier Q>
1841  GLM_INLINE glm::vec<4, T, Q> ywzz(const glm::vec<4, T, Q> &v) {
1842  return glm::vec<4, T, Q>(v.y, v.w, v.z, v.z);
1843  }
1844 
1845  // ywzw
1846  template<typename T, qualifier Q>
1847  GLM_INLINE glm::vec<4, T, Q> ywzw(const glm::vec<4, T, Q> &v) {
1848  return glm::vec<4, T, Q>(v.y, v.w, v.z, v.w);
1849  }
1850 
1851  // ywwx
1852  template<typename T, qualifier Q>
1853  GLM_INLINE glm::vec<4, T, Q> ywwx(const glm::vec<4, T, Q> &v) {
1854  return glm::vec<4, T, Q>(v.y, v.w, v.w, v.x);
1855  }
1856 
1857  // ywwy
1858  template<typename T, qualifier Q>
1859  GLM_INLINE glm::vec<4, T, Q> ywwy(const glm::vec<4, T, Q> &v) {
1860  return glm::vec<4, T, Q>(v.y, v.w, v.w, v.y);
1861  }
1862 
1863  // ywwz
1864  template<typename T, qualifier Q>
1865  GLM_INLINE glm::vec<4, T, Q> ywwz(const glm::vec<4, T, Q> &v) {
1866  return glm::vec<4, T, Q>(v.y, v.w, v.w, v.z);
1867  }
1868 
1869  // ywww
1870  template<typename T, qualifier Q>
1871  GLM_INLINE glm::vec<4, T, Q> ywww(const glm::vec<4, T, Q> &v) {
1872  return glm::vec<4, T, Q>(v.y, v.w, v.w, v.w);
1873  }
1874 
1875  // zxxx
1876  template<typename T, qualifier Q>
1877  GLM_INLINE glm::vec<4, T, Q> zxxx(const glm::vec<3, T, Q> &v) {
1878  return glm::vec<4, T, Q>(v.z, v.x, v.x, v.x);
1879  }
1880 
1881  template<typename T, qualifier Q>
1882  GLM_INLINE glm::vec<4, T, Q> zxxx(const glm::vec<4, T, Q> &v) {
1883  return glm::vec<4, T, Q>(v.z, v.x, v.x, v.x);
1884  }
1885 
1886  // zxxy
1887  template<typename T, qualifier Q>
1888  GLM_INLINE glm::vec<4, T, Q> zxxy(const glm::vec<3, T, Q> &v) {
1889  return glm::vec<4, T, Q>(v.z, v.x, v.x, v.y);
1890  }
1891 
1892  template<typename T, qualifier Q>
1893  GLM_INLINE glm::vec<4, T, Q> zxxy(const glm::vec<4, T, Q> &v) {
1894  return glm::vec<4, T, Q>(v.z, v.x, v.x, v.y);
1895  }
1896 
1897  // zxxz
1898  template<typename T, qualifier Q>
1899  GLM_INLINE glm::vec<4, T, Q> zxxz(const glm::vec<3, T, Q> &v) {
1900  return glm::vec<4, T, Q>(v.z, v.x, v.x, v.z);
1901  }
1902 
1903  template<typename T, qualifier Q>
1904  GLM_INLINE glm::vec<4, T, Q> zxxz(const glm::vec<4, T, Q> &v) {
1905  return glm::vec<4, T, Q>(v.z, v.x, v.x, v.z);
1906  }
1907 
1908  // zxxw
1909  template<typename T, qualifier Q>
1910  GLM_INLINE glm::vec<4, T, Q> zxxw(const glm::vec<4, T, Q> &v) {
1911  return glm::vec<4, T, Q>(v.z, v.x, v.x, v.w);
1912  }
1913 
1914  // zxyx
1915  template<typename T, qualifier Q>
1916  GLM_INLINE glm::vec<4, T, Q> zxyx(const glm::vec<3, T, Q> &v) {
1917  return glm::vec<4, T, Q>(v.z, v.x, v.y, v.x);
1918  }
1919 
1920  template<typename T, qualifier Q>
1921  GLM_INLINE glm::vec<4, T, Q> zxyx(const glm::vec<4, T, Q> &v) {
1922  return glm::vec<4, T, Q>(v.z, v.x, v.y, v.x);
1923  }
1924 
1925  // zxyy
1926  template<typename T, qualifier Q>
1927  GLM_INLINE glm::vec<4, T, Q> zxyy(const glm::vec<3, T, Q> &v) {
1928  return glm::vec<4, T, Q>(v.z, v.x, v.y, v.y);
1929  }
1930 
1931  template<typename T, qualifier Q>
1932  GLM_INLINE glm::vec<4, T, Q> zxyy(const glm::vec<4, T, Q> &v) {
1933  return glm::vec<4, T, Q>(v.z, v.x, v.y, v.y);
1934  }
1935 
1936  // zxyz
1937  template<typename T, qualifier Q>
1938  GLM_INLINE glm::vec<4, T, Q> zxyz(const glm::vec<3, T, Q> &v) {
1939  return glm::vec<4, T, Q>(v.z, v.x, v.y, v.z);
1940  }
1941 
1942  template<typename T, qualifier Q>
1943  GLM_INLINE glm::vec<4, T, Q> zxyz(const glm::vec<4, T, Q> &v) {
1944  return glm::vec<4, T, Q>(v.z, v.x, v.y, v.z);
1945  }
1946 
1947  // zxyw
1948  template<typename T, qualifier Q>
1949  GLM_INLINE glm::vec<4, T, Q> zxyw(const glm::vec<4, T, Q> &v) {
1950  return glm::vec<4, T, Q>(v.z, v.x, v.y, v.w);
1951  }
1952 
1953  // zxzx
1954  template<typename T, qualifier Q>
1955  GLM_INLINE glm::vec<4, T, Q> zxzx(const glm::vec<3, T, Q> &v) {
1956  return glm::vec<4, T, Q>(v.z, v.x, v.z, v.x);
1957  }
1958 
1959  template<typename T, qualifier Q>
1960  GLM_INLINE glm::vec<4, T, Q> zxzx(const glm::vec<4, T, Q> &v) {
1961  return glm::vec<4, T, Q>(v.z, v.x, v.z, v.x);
1962  }
1963 
1964  // zxzy
1965  template<typename T, qualifier Q>
1966  GLM_INLINE glm::vec<4, T, Q> zxzy(const glm::vec<3, T, Q> &v) {
1967  return glm::vec<4, T, Q>(v.z, v.x, v.z, v.y);
1968  }
1969 
1970  template<typename T, qualifier Q>
1971  GLM_INLINE glm::vec<4, T, Q> zxzy(const glm::vec<4, T, Q> &v) {
1972  return glm::vec<4, T, Q>(v.z, v.x, v.z, v.y);
1973  }
1974 
1975  // zxzz
1976  template<typename T, qualifier Q>
1977  GLM_INLINE glm::vec<4, T, Q> zxzz(const glm::vec<3, T, Q> &v) {
1978  return glm::vec<4, T, Q>(v.z, v.x, v.z, v.z);
1979  }
1980 
1981  template<typename T, qualifier Q>
1982  GLM_INLINE glm::vec<4, T, Q> zxzz(const glm::vec<4, T, Q> &v) {
1983  return glm::vec<4, T, Q>(v.z, v.x, v.z, v.z);
1984  }
1985 
1986  // zxzw
1987  template<typename T, qualifier Q>
1988  GLM_INLINE glm::vec<4, T, Q> zxzw(const glm::vec<4, T, Q> &v) {
1989  return glm::vec<4, T, Q>(v.z, v.x, v.z, v.w);
1990  }
1991 
1992  // zxwx
1993  template<typename T, qualifier Q>
1994  GLM_INLINE glm::vec<4, T, Q> zxwx(const glm::vec<4, T, Q> &v) {
1995  return glm::vec<4, T, Q>(v.z, v.x, v.w, v.x);
1996  }
1997 
1998  // zxwy
1999  template<typename T, qualifier Q>
2000  GLM_INLINE glm::vec<4, T, Q> zxwy(const glm::vec<4, T, Q> &v) {
2001  return glm::vec<4, T, Q>(v.z, v.x, v.w, v.y);
2002  }
2003 
2004  // zxwz
2005  template<typename T, qualifier Q>
2006  GLM_INLINE glm::vec<4, T, Q> zxwz(const glm::vec<4, T, Q> &v) {
2007  return glm::vec<4, T, Q>(v.z, v.x, v.w, v.z);
2008  }
2009 
2010  // zxww
2011  template<typename T, qualifier Q>
2012  GLM_INLINE glm::vec<4, T, Q> zxww(const glm::vec<4, T, Q> &v) {
2013  return glm::vec<4, T, Q>(v.z, v.x, v.w, v.w);
2014  }
2015 
2016  // zyxx
2017  template<typename T, qualifier Q>
2018  GLM_INLINE glm::vec<4, T, Q> zyxx(const glm::vec<3, T, Q> &v) {
2019  return glm::vec<4, T, Q>(v.z, v.y, v.x, v.x);
2020  }
2021 
2022  template<typename T, qualifier Q>
2023  GLM_INLINE glm::vec<4, T, Q> zyxx(const glm::vec<4, T, Q> &v) {
2024  return glm::vec<4, T, Q>(v.z, v.y, v.x, v.x);
2025  }
2026 
2027  // zyxy
2028  template<typename T, qualifier Q>
2029  GLM_INLINE glm::vec<4, T, Q> zyxy(const glm::vec<3, T, Q> &v) {
2030  return glm::vec<4, T, Q>(v.z, v.y, v.x, v.y);
2031  }
2032 
2033  template<typename T, qualifier Q>
2034  GLM_INLINE glm::vec<4, T, Q> zyxy(const glm::vec<4, T, Q> &v) {
2035  return glm::vec<4, T, Q>(v.z, v.y, v.x, v.y);
2036  }
2037 
2038  // zyxz
2039  template<typename T, qualifier Q>
2040  GLM_INLINE glm::vec<4, T, Q> zyxz(const glm::vec<3, T, Q> &v) {
2041  return glm::vec<4, T, Q>(v.z, v.y, v.x, v.z);
2042  }
2043 
2044  template<typename T, qualifier Q>
2045  GLM_INLINE glm::vec<4, T, Q> zyxz(const glm::vec<4, T, Q> &v) {
2046  return glm::vec<4, T, Q>(v.z, v.y, v.x, v.z);
2047  }
2048 
2049  // zyxw
2050  template<typename T, qualifier Q>
2051  GLM_INLINE glm::vec<4, T, Q> zyxw(const glm::vec<4, T, Q> &v) {
2052  return glm::vec<4, T, Q>(v.z, v.y, v.x, v.w);
2053  }
2054 
2055  // zyyx
2056  template<typename T, qualifier Q>
2057  GLM_INLINE glm::vec<4, T, Q> zyyx(const glm::vec<3, T, Q> &v) {
2058  return glm::vec<4, T, Q>(v.z, v.y, v.y, v.x);
2059  }
2060 
2061  template<typename T, qualifier Q>
2062  GLM_INLINE glm::vec<4, T, Q> zyyx(const glm::vec<4, T, Q> &v) {
2063  return glm::vec<4, T, Q>(v.z, v.y, v.y, v.x);
2064  }
2065 
2066  // zyyy
2067  template<typename T, qualifier Q>
2068  GLM_INLINE glm::vec<4, T, Q> zyyy(const glm::vec<3, T, Q> &v) {
2069  return glm::vec<4, T, Q>(v.z, v.y, v.y, v.y);
2070  }
2071 
2072  template<typename T, qualifier Q>
2073  GLM_INLINE glm::vec<4, T, Q> zyyy(const glm::vec<4, T, Q> &v) {
2074  return glm::vec<4, T, Q>(v.z, v.y, v.y, v.y);
2075  }
2076 
2077  // zyyz
2078  template<typename T, qualifier Q>
2079  GLM_INLINE glm::vec<4, T, Q> zyyz(const glm::vec<3, T, Q> &v) {
2080  return glm::vec<4, T, Q>(v.z, v.y, v.y, v.z);
2081  }
2082 
2083  template<typename T, qualifier Q>
2084  GLM_INLINE glm::vec<4, T, Q> zyyz(const glm::vec<4, T, Q> &v) {
2085  return glm::vec<4, T, Q>(v.z, v.y, v.y, v.z);
2086  }
2087 
2088  // zyyw
2089  template<typename T, qualifier Q>
2090  GLM_INLINE glm::vec<4, T, Q> zyyw(const glm::vec<4, T, Q> &v) {
2091  return glm::vec<4, T, Q>(v.z, v.y, v.y, v.w);
2092  }
2093 
2094  // zyzx
2095  template<typename T, qualifier Q>
2096  GLM_INLINE glm::vec<4, T, Q> zyzx(const glm::vec<3, T, Q> &v) {
2097  return glm::vec<4, T, Q>(v.z, v.y, v.z, v.x);
2098  }
2099 
2100  template<typename T, qualifier Q>
2101  GLM_INLINE glm::vec<4, T, Q> zyzx(const glm::vec<4, T, Q> &v) {
2102  return glm::vec<4, T, Q>(v.z, v.y, v.z, v.x);
2103  }
2104 
2105  // zyzy
2106  template<typename T, qualifier Q>
2107  GLM_INLINE glm::vec<4, T, Q> zyzy(const glm::vec<3, T, Q> &v) {
2108  return glm::vec<4, T, Q>(v.z, v.y, v.z, v.y);
2109  }
2110 
2111  template<typename T, qualifier Q>
2112  GLM_INLINE glm::vec<4, T, Q> zyzy(const glm::vec<4, T, Q> &v) {
2113  return glm::vec<4, T, Q>(v.z, v.y, v.z, v.y);
2114  }
2115 
2116  // zyzz
2117  template<typename T, qualifier Q>
2118  GLM_INLINE glm::vec<4, T, Q> zyzz(const glm::vec<3, T, Q> &v) {
2119  return glm::vec<4, T, Q>(v.z, v.y, v.z, v.z);
2120  }
2121 
2122  template<typename T, qualifier Q>
2123  GLM_INLINE glm::vec<4, T, Q> zyzz(const glm::vec<4, T, Q> &v) {
2124  return glm::vec<4, T, Q>(v.z, v.y, v.z, v.z);
2125  }
2126 
2127  // zyzw
2128  template<typename T, qualifier Q>
2129  GLM_INLINE glm::vec<4, T, Q> zyzw(const glm::vec<4, T, Q> &v) {
2130  return glm::vec<4, T, Q>(v.z, v.y, v.z, v.w);
2131  }
2132 
2133  // zywx
2134  template<typename T, qualifier Q>
2135  GLM_INLINE glm::vec<4, T, Q> zywx(const glm::vec<4, T, Q> &v) {
2136  return glm::vec<4, T, Q>(v.z, v.y, v.w, v.x);
2137  }
2138 
2139  // zywy
2140  template<typename T, qualifier Q>
2141  GLM_INLINE glm::vec<4, T, Q> zywy(const glm::vec<4, T, Q> &v) {
2142  return glm::vec<4, T, Q>(v.z, v.y, v.w, v.y);
2143  }
2144 
2145  // zywz
2146  template<typename T, qualifier Q>
2147  GLM_INLINE glm::vec<4, T, Q> zywz(const glm::vec<4, T, Q> &v) {
2148  return glm::vec<4, T, Q>(v.z, v.y, v.w, v.z);
2149  }
2150 
2151  // zyww
2152  template<typename T, qualifier Q>
2153  GLM_INLINE glm::vec<4, T, Q> zyww(const glm::vec<4, T, Q> &v) {
2154  return glm::vec<4, T, Q>(v.z, v.y, v.w, v.w);
2155  }
2156 
2157  // zzxx
2158  template<typename T, qualifier Q>
2159  GLM_INLINE glm::vec<4, T, Q> zzxx(const glm::vec<3, T, Q> &v) {
2160  return glm::vec<4, T, Q>(v.z, v.z, v.x, v.x);
2161  }
2162 
2163  template<typename T, qualifier Q>
2164  GLM_INLINE glm::vec<4, T, Q> zzxx(const glm::vec<4, T, Q> &v) {
2165  return glm::vec<4, T, Q>(v.z, v.z, v.x, v.x);
2166  }
2167 
2168  // zzxy
2169  template<typename T, qualifier Q>
2170  GLM_INLINE glm::vec<4, T, Q> zzxy(const glm::vec<3, T, Q> &v) {
2171  return glm::vec<4, T, Q>(v.z, v.z, v.x, v.y);
2172  }
2173 
2174  template<typename T, qualifier Q>
2175  GLM_INLINE glm::vec<4, T, Q> zzxy(const glm::vec<4, T, Q> &v) {
2176  return glm::vec<4, T, Q>(v.z, v.z, v.x, v.y);
2177  }
2178 
2179  // zzxz
2180  template<typename T, qualifier Q>
2181  GLM_INLINE glm::vec<4, T, Q> zzxz(const glm::vec<3, T, Q> &v) {
2182  return glm::vec<4, T, Q>(v.z, v.z, v.x, v.z);
2183  }
2184 
2185  template<typename T, qualifier Q>
2186  GLM_INLINE glm::vec<4, T, Q> zzxz(const glm::vec<4, T, Q> &v) {
2187  return glm::vec<4, T, Q>(v.z, v.z, v.x, v.z);
2188  }
2189 
2190  // zzxw
2191  template<typename T, qualifier Q>
2192  GLM_INLINE glm::vec<4, T, Q> zzxw(const glm::vec<4, T, Q> &v) {
2193  return glm::vec<4, T, Q>(v.z, v.z, v.x, v.w);
2194  }
2195 
2196  // zzyx
2197  template<typename T, qualifier Q>
2198  GLM_INLINE glm::vec<4, T, Q> zzyx(const glm::vec<3, T, Q> &v) {
2199  return glm::vec<4, T, Q>(v.z, v.z, v.y, v.x);
2200  }
2201 
2202  template<typename T, qualifier Q>
2203  GLM_INLINE glm::vec<4, T, Q> zzyx(const glm::vec<4, T, Q> &v) {
2204  return glm::vec<4, T, Q>(v.z, v.z, v.y, v.x);
2205  }
2206 
2207  // zzyy
2208  template<typename T, qualifier Q>
2209  GLM_INLINE glm::vec<4, T, Q> zzyy(const glm::vec<3, T, Q> &v) {
2210  return glm::vec<4, T, Q>(v.z, v.z, v.y, v.y);
2211  }
2212 
2213  template<typename T, qualifier Q>
2214  GLM_INLINE glm::vec<4, T, Q> zzyy(const glm::vec<4, T, Q> &v) {
2215  return glm::vec<4, T, Q>(v.z, v.z, v.y, v.y);
2216  }
2217 
2218  // zzyz
2219  template<typename T, qualifier Q>
2220  GLM_INLINE glm::vec<4, T, Q> zzyz(const glm::vec<3, T, Q> &v) {
2221  return glm::vec<4, T, Q>(v.z, v.z, v.y, v.z);
2222  }
2223 
2224  template<typename T, qualifier Q>
2225  GLM_INLINE glm::vec<4, T, Q> zzyz(const glm::vec<4, T, Q> &v) {
2226  return glm::vec<4, T, Q>(v.z, v.z, v.y, v.z);
2227  }
2228 
2229  // zzyw
2230  template<typename T, qualifier Q>
2231  GLM_INLINE glm::vec<4, T, Q> zzyw(const glm::vec<4, T, Q> &v) {
2232  return glm::vec<4, T, Q>(v.z, v.z, v.y, v.w);
2233  }
2234 
2235  // zzzx
2236  template<typename T, qualifier Q>
2237  GLM_INLINE glm::vec<4, T, Q> zzzx(const glm::vec<3, T, Q> &v) {
2238  return glm::vec<4, T, Q>(v.z, v.z, v.z, v.x);
2239  }
2240 
2241  template<typename T, qualifier Q>
2242  GLM_INLINE glm::vec<4, T, Q> zzzx(const glm::vec<4, T, Q> &v) {
2243  return glm::vec<4, T, Q>(v.z, v.z, v.z, v.x);
2244  }
2245 
2246  // zzzy
2247  template<typename T, qualifier Q>
2248  GLM_INLINE glm::vec<4, T, Q> zzzy(const glm::vec<3, T, Q> &v) {
2249  return glm::vec<4, T, Q>(v.z, v.z, v.z, v.y);
2250  }
2251 
2252  template<typename T, qualifier Q>
2253  GLM_INLINE glm::vec<4, T, Q> zzzy(const glm::vec<4, T, Q> &v) {
2254  return glm::vec<4, T, Q>(v.z, v.z, v.z, v.y);
2255  }
2256 
2257  // zzzz
2258  template<typename T, qualifier Q>
2259  GLM_INLINE glm::vec<4, T, Q> zzzz(const glm::vec<3, T, Q> &v) {
2260  return glm::vec<4, T, Q>(v.z, v.z, v.z, v.z);
2261  }
2262 
2263  template<typename T, qualifier Q>
2264  GLM_INLINE glm::vec<4, T, Q> zzzz(const glm::vec<4, T, Q> &v) {
2265  return glm::vec<4, T, Q>(v.z, v.z, v.z, v.z);
2266  }
2267 
2268  // zzzw
2269  template<typename T, qualifier Q>
2270  GLM_INLINE glm::vec<4, T, Q> zzzw(const glm::vec<4, T, Q> &v) {
2271  return glm::vec<4, T, Q>(v.z, v.z, v.z, v.w);
2272  }
2273 
2274  // zzwx
2275  template<typename T, qualifier Q>
2276  GLM_INLINE glm::vec<4, T, Q> zzwx(const glm::vec<4, T, Q> &v) {
2277  return glm::vec<4, T, Q>(v.z, v.z, v.w, v.x);
2278  }
2279 
2280  // zzwy
2281  template<typename T, qualifier Q>
2282  GLM_INLINE glm::vec<4, T, Q> zzwy(const glm::vec<4, T, Q> &v) {
2283  return glm::vec<4, T, Q>(v.z, v.z, v.w, v.y);
2284  }
2285 
2286  // zzwz
2287  template<typename T, qualifier Q>
2288  GLM_INLINE glm::vec<4, T, Q> zzwz(const glm::vec<4, T, Q> &v) {
2289  return glm::vec<4, T, Q>(v.z, v.z, v.w, v.z);
2290  }
2291 
2292  // zzww
2293  template<typename T, qualifier Q>
2294  GLM_INLINE glm::vec<4, T, Q> zzww(const glm::vec<4, T, Q> &v) {
2295  return glm::vec<4, T, Q>(v.z, v.z, v.w, v.w);
2296  }
2297 
2298  // zwxx
2299  template<typename T, qualifier Q>
2300  GLM_INLINE glm::vec<4, T, Q> zwxx(const glm::vec<4, T, Q> &v) {
2301  return glm::vec<4, T, Q>(v.z, v.w, v.x, v.x);
2302  }
2303 
2304  // zwxy
2305  template<typename T, qualifier Q>
2306  GLM_INLINE glm::vec<4, T, Q> zwxy(const glm::vec<4, T, Q> &v) {
2307  return glm::vec<4, T, Q>(v.z, v.w, v.x, v.y);
2308  }
2309 
2310  // zwxz
2311  template<typename T, qualifier Q>
2312  GLM_INLINE glm::vec<4, T, Q> zwxz(const glm::vec<4, T, Q> &v) {
2313  return glm::vec<4, T, Q>(v.z, v.w, v.x, v.z);
2314  }
2315 
2316  // zwxw
2317  template<typename T, qualifier Q>
2318  GLM_INLINE glm::vec<4, T, Q> zwxw(const glm::vec<4, T, Q> &v) {
2319  return glm::vec<4, T, Q>(v.z, v.w, v.x, v.w);
2320  }
2321 
2322  // zwyx
2323  template<typename T, qualifier Q>
2324  GLM_INLINE glm::vec<4, T, Q> zwyx(const glm::vec<4, T, Q> &v) {
2325  return glm::vec<4, T, Q>(v.z, v.w, v.y, v.x);
2326  }
2327 
2328  // zwyy
2329  template<typename T, qualifier Q>
2330  GLM_INLINE glm::vec<4, T, Q> zwyy(const glm::vec<4, T, Q> &v) {
2331  return glm::vec<4, T, Q>(v.z, v.w, v.y, v.y);
2332  }
2333 
2334  // zwyz
2335  template<typename T, qualifier Q>
2336  GLM_INLINE glm::vec<4, T, Q> zwyz(const glm::vec<4, T, Q> &v) {
2337  return glm::vec<4, T, Q>(v.z, v.w, v.y, v.z);
2338  }
2339 
2340  // zwyw
2341  template<typename T, qualifier Q>
2342  GLM_INLINE glm::vec<4, T, Q> zwyw(const glm::vec<4, T, Q> &v) {
2343  return glm::vec<4, T, Q>(v.z, v.w, v.y, v.w);
2344  }
2345 
2346  // zwzx
2347  template<typename T, qualifier Q>
2348  GLM_INLINE glm::vec<4, T, Q> zwzx(const glm::vec<4, T, Q> &v) {
2349  return glm::vec<4, T, Q>(v.z, v.w, v.z, v.x);
2350  }
2351 
2352  // zwzy
2353  template<typename T, qualifier Q>
2354  GLM_INLINE glm::vec<4, T, Q> zwzy(const glm::vec<4, T, Q> &v) {
2355  return glm::vec<4, T, Q>(v.z, v.w, v.z, v.y);
2356  }
2357 
2358  // zwzz
2359  template<typename T, qualifier Q>
2360  GLM_INLINE glm::vec<4, T, Q> zwzz(const glm::vec<4, T, Q> &v) {
2361  return glm::vec<4, T, Q>(v.z, v.w, v.z, v.z);
2362  }
2363 
2364  // zwzw
2365  template<typename T, qualifier Q>
2366  GLM_INLINE glm::vec<4, T, Q> zwzw(const glm::vec<4, T, Q> &v) {
2367  return glm::vec<4, T, Q>(v.z, v.w, v.z, v.w);
2368  }
2369 
2370  // zwwx
2371  template<typename T, qualifier Q>
2372  GLM_INLINE glm::vec<4, T, Q> zwwx(const glm::vec<4, T, Q> &v) {
2373  return glm::vec<4, T, Q>(v.z, v.w, v.w, v.x);
2374  }
2375 
2376  // zwwy
2377  template<typename T, qualifier Q>
2378  GLM_INLINE glm::vec<4, T, Q> zwwy(const glm::vec<4, T, Q> &v) {
2379  return glm::vec<4, T, Q>(v.z, v.w, v.w, v.y);
2380  }
2381 
2382  // zwwz
2383  template<typename T, qualifier Q>
2384  GLM_INLINE glm::vec<4, T, Q> zwwz(const glm::vec<4, T, Q> &v) {
2385  return glm::vec<4, T, Q>(v.z, v.w, v.w, v.z);
2386  }
2387 
2388  // zwww
2389  template<typename T, qualifier Q>
2390  GLM_INLINE glm::vec<4, T, Q> zwww(const glm::vec<4, T, Q> &v) {
2391  return glm::vec<4, T, Q>(v.z, v.w, v.w, v.w);
2392  }
2393 
2394  // wxxx
2395  template<typename T, qualifier Q>
2396  GLM_INLINE glm::vec<4, T, Q> wxxx(const glm::vec<4, T, Q> &v) {
2397  return glm::vec<4, T, Q>(v.w, v.x, v.x, v.x);
2398  }
2399 
2400  // wxxy
2401  template<typename T, qualifier Q>
2402  GLM_INLINE glm::vec<4, T, Q> wxxy(const glm::vec<4, T, Q> &v) {
2403  return glm::vec<4, T, Q>(v.w, v.x, v.x, v.y);
2404  }
2405 
2406  // wxxz
2407  template<typename T, qualifier Q>
2408  GLM_INLINE glm::vec<4, T, Q> wxxz(const glm::vec<4, T, Q> &v) {
2409  return glm::vec<4, T, Q>(v.w, v.x, v.x, v.z);
2410  }
2411 
2412  // wxxw
2413  template<typename T, qualifier Q>
2414  GLM_INLINE glm::vec<4, T, Q> wxxw(const glm::vec<4, T, Q> &v) {
2415  return glm::vec<4, T, Q>(v.w, v.x, v.x, v.w);
2416  }
2417 
2418  // wxyx
2419  template<typename T, qualifier Q>
2420  GLM_INLINE glm::vec<4, T, Q> wxyx(const glm::vec<4, T, Q> &v) {
2421  return glm::vec<4, T, Q>(v.w, v.x, v.y, v.x);
2422  }
2423 
2424  // wxyy
2425  template<typename T, qualifier Q>
2426  GLM_INLINE glm::vec<4, T, Q> wxyy(const glm::vec<4, T, Q> &v) {
2427  return glm::vec<4, T, Q>(v.w, v.x, v.y, v.y);
2428  }
2429 
2430  // wxyz
2431  template<typename T, qualifier Q>
2432  GLM_INLINE glm::vec<4, T, Q> wxyz(const glm::vec<4, T, Q> &v) {
2433  return glm::vec<4, T, Q>(v.w, v.x, v.y, v.z);
2434  }
2435 
2436  // wxyw
2437  template<typename T, qualifier Q>
2438  GLM_INLINE glm::vec<4, T, Q> wxyw(const glm::vec<4, T, Q> &v) {
2439  return glm::vec<4, T, Q>(v.w, v.x, v.y, v.w);
2440  }
2441 
2442  // wxzx
2443  template<typename T, qualifier Q>
2444  GLM_INLINE glm::vec<4, T, Q> wxzx(const glm::vec<4, T, Q> &v) {
2445  return glm::vec<4, T, Q>(v.w, v.x, v.z, v.x);
2446  }
2447 
2448  // wxzy
2449  template<typename T, qualifier Q>
2450  GLM_INLINE glm::vec<4, T, Q> wxzy(const glm::vec<4, T, Q> &v) {
2451  return glm::vec<4, T, Q>(v.w, v.x, v.z, v.y);
2452  }
2453 
2454  // wxzz
2455  template<typename T, qualifier Q>
2456  GLM_INLINE glm::vec<4, T, Q> wxzz(const glm::vec<4, T, Q> &v) {
2457  return glm::vec<4, T, Q>(v.w, v.x, v.z, v.z);
2458  }
2459 
2460  // wxzw
2461  template<typename T, qualifier Q>
2462  GLM_INLINE glm::vec<4, T, Q> wxzw(const glm::vec<4, T, Q> &v) {
2463  return glm::vec<4, T, Q>(v.w, v.x, v.z, v.w);
2464  }
2465 
2466  // wxwx
2467  template<typename T, qualifier Q>
2468  GLM_INLINE glm::vec<4, T, Q> wxwx(const glm::vec<4, T, Q> &v) {
2469  return glm::vec<4, T, Q>(v.w, v.x, v.w, v.x);
2470  }
2471 
2472  // wxwy
2473  template<typename T, qualifier Q>
2474  GLM_INLINE glm::vec<4, T, Q> wxwy(const glm::vec<4, T, Q> &v) {
2475  return glm::vec<4, T, Q>(v.w, v.x, v.w, v.y);
2476  }
2477 
2478  // wxwz
2479  template<typename T, qualifier Q>
2480  GLM_INLINE glm::vec<4, T, Q> wxwz(const glm::vec<4, T, Q> &v) {
2481  return glm::vec<4, T, Q>(v.w, v.x, v.w, v.z);
2482  }
2483 
2484  // wxww
2485  template<typename T, qualifier Q>
2486  GLM_INLINE glm::vec<4, T, Q> wxww(const glm::vec<4, T, Q> &v) {
2487  return glm::vec<4, T, Q>(v.w, v.x, v.w, v.w);
2488  }
2489 
2490  // wyxx
2491  template<typename T, qualifier Q>
2492  GLM_INLINE glm::vec<4, T, Q> wyxx(const glm::vec<4, T, Q> &v) {
2493  return glm::vec<4, T, Q>(v.w, v.y, v.x, v.x);
2494  }
2495 
2496  // wyxy
2497  template<typename T, qualifier Q>
2498  GLM_INLINE glm::vec<4, T, Q> wyxy(const glm::vec<4, T, Q> &v) {
2499  return glm::vec<4, T, Q>(v.w, v.y, v.x, v.y);
2500  }
2501 
2502  // wyxz
2503  template<typename T, qualifier Q>
2504  GLM_INLINE glm::vec<4, T, Q> wyxz(const glm::vec<4, T, Q> &v) {
2505  return glm::vec<4, T, Q>(v.w, v.y, v.x, v.z);
2506  }
2507 
2508  // wyxw
2509  template<typename T, qualifier Q>
2510  GLM_INLINE glm::vec<4, T, Q> wyxw(const glm::vec<4, T, Q> &v) {
2511  return glm::vec<4, T, Q>(v.w, v.y, v.x, v.w);
2512  }
2513 
2514  // wyyx
2515  template<typename T, qualifier Q>
2516  GLM_INLINE glm::vec<4, T, Q> wyyx(const glm::vec<4, T, Q> &v) {
2517  return glm::vec<4, T, Q>(v.w, v.y, v.y, v.x);
2518  }
2519 
2520  // wyyy
2521  template<typename T, qualifier Q>
2522  GLM_INLINE glm::vec<4, T, Q> wyyy(const glm::vec<4, T, Q> &v) {
2523  return glm::vec<4, T, Q>(v.w, v.y, v.y, v.y);
2524  }
2525 
2526  // wyyz
2527  template<typename T, qualifier Q>
2528  GLM_INLINE glm::vec<4, T, Q> wyyz(const glm::vec<4, T, Q> &v) {
2529  return glm::vec<4, T, Q>(v.w, v.y, v.y, v.z);
2530  }
2531 
2532  // wyyw
2533  template<typename T, qualifier Q>
2534  GLM_INLINE glm::vec<4, T, Q> wyyw(const glm::vec<4, T, Q> &v) {
2535  return glm::vec<4, T, Q>(v.w, v.y, v.y, v.w);
2536  }
2537 
2538  // wyzx
2539  template<typename T, qualifier Q>
2540  GLM_INLINE glm::vec<4, T, Q> wyzx(const glm::vec<4, T, Q> &v) {
2541  return glm::vec<4, T, Q>(v.w, v.y, v.z, v.x);
2542  }
2543 
2544  // wyzy
2545  template<typename T, qualifier Q>
2546  GLM_INLINE glm::vec<4, T, Q> wyzy(const glm::vec<4, T, Q> &v) {
2547  return glm::vec<4, T, Q>(v.w, v.y, v.z, v.y);
2548  }
2549 
2550  // wyzz
2551  template<typename T, qualifier Q>
2552  GLM_INLINE glm::vec<4, T, Q> wyzz(const glm::vec<4, T, Q> &v) {
2553  return glm::vec<4, T, Q>(v.w, v.y, v.z, v.z);
2554  }
2555 
2556  // wyzw
2557  template<typename T, qualifier Q>
2558  GLM_INLINE glm::vec<4, T, Q> wyzw(const glm::vec<4, T, Q> &v) {
2559  return glm::vec<4, T, Q>(v.w, v.y, v.z, v.w);
2560  }
2561 
2562  // wywx
2563  template<typename T, qualifier Q>
2564  GLM_INLINE glm::vec<4, T, Q> wywx(const glm::vec<4, T, Q> &v) {
2565  return glm::vec<4, T, Q>(v.w, v.y, v.w, v.x);
2566  }
2567 
2568  // wywy
2569  template<typename T, qualifier Q>
2570  GLM_INLINE glm::vec<4, T, Q> wywy(const glm::vec<4, T, Q> &v) {
2571  return glm::vec<4, T, Q>(v.w, v.y, v.w, v.y);
2572  }
2573 
2574  // wywz
2575  template<typename T, qualifier Q>
2576  GLM_INLINE glm::vec<4, T, Q> wywz(const glm::vec<4, T, Q> &v) {
2577  return glm::vec<4, T, Q>(v.w, v.y, v.w, v.z);
2578  }
2579 
2580  // wyww
2581  template<typename T, qualifier Q>
2582  GLM_INLINE glm::vec<4, T, Q> wyww(const glm::vec<4, T, Q> &v) {
2583  return glm::vec<4, T, Q>(v.w, v.y, v.w, v.w);
2584  }
2585 
2586  // wzxx
2587  template<typename T, qualifier Q>
2588  GLM_INLINE glm::vec<4, T, Q> wzxx(const glm::vec<4, T, Q> &v) {
2589  return glm::vec<4, T, Q>(v.w, v.z, v.x, v.x);
2590  }
2591 
2592  // wzxy
2593  template<typename T, qualifier Q>
2594  GLM_INLINE glm::vec<4, T, Q> wzxy(const glm::vec<4, T, Q> &v) {
2595  return glm::vec<4, T, Q>(v.w, v.z, v.x, v.y);
2596  }
2597 
2598  // wzxz
2599  template<typename T, qualifier Q>
2600  GLM_INLINE glm::vec<4, T, Q> wzxz(const glm::vec<4, T, Q> &v) {
2601  return glm::vec<4, T, Q>(v.w, v.z, v.x, v.z);
2602  }
2603 
2604  // wzxw
2605  template<typename T, qualifier Q>
2606  GLM_INLINE glm::vec<4, T, Q> wzxw(const glm::vec<4, T, Q> &v) {
2607  return glm::vec<4, T, Q>(v.w, v.z, v.x, v.w);
2608  }
2609 
2610  // wzyx
2611  template<typename T, qualifier Q>
2612  GLM_INLINE glm::vec<4, T, Q> wzyx(const glm::vec<4, T, Q> &v) {
2613  return glm::vec<4, T, Q>(v.w, v.z, v.y, v.x);
2614  }
2615 
2616  // wzyy
2617  template<typename T, qualifier Q>
2618  GLM_INLINE glm::vec<4, T, Q> wzyy(const glm::vec<4, T, Q> &v) {
2619  return glm::vec<4, T, Q>(v.w, v.z, v.y, v.y);
2620  }
2621 
2622  // wzyz
2623  template<typename T, qualifier Q>
2624  GLM_INLINE glm::vec<4, T, Q> wzyz(const glm::vec<4, T, Q> &v) {
2625  return glm::vec<4, T, Q>(v.w, v.z, v.y, v.z);
2626  }
2627 
2628  // wzyw
2629  template<typename T, qualifier Q>
2630  GLM_INLINE glm::vec<4, T, Q> wzyw(const glm::vec<4, T, Q> &v) {
2631  return glm::vec<4, T, Q>(v.w, v.z, v.y, v.w);
2632  }
2633 
2634  // wzzx
2635  template<typename T, qualifier Q>
2636  GLM_INLINE glm::vec<4, T, Q> wzzx(const glm::vec<4, T, Q> &v) {
2637  return glm::vec<4, T, Q>(v.w, v.z, v.z, v.x);
2638  }
2639 
2640  // wzzy
2641  template<typename T, qualifier Q>
2642  GLM_INLINE glm::vec<4, T, Q> wzzy(const glm::vec<4, T, Q> &v) {
2643  return glm::vec<4, T, Q>(v.w, v.z, v.z, v.y);
2644  }
2645 
2646  // wzzz
2647  template<typename T, qualifier Q>
2648  GLM_INLINE glm::vec<4, T, Q> wzzz(const glm::vec<4, T, Q> &v) {
2649  return glm::vec<4, T, Q>(v.w, v.z, v.z, v.z);
2650  }
2651 
2652  // wzzw
2653  template<typename T, qualifier Q>
2654  GLM_INLINE glm::vec<4, T, Q> wzzw(const glm::vec<4, T, Q> &v) {
2655  return glm::vec<4, T, Q>(v.w, v.z, v.z, v.w);
2656  }
2657 
2658  // wzwx
2659  template<typename T, qualifier Q>
2660  GLM_INLINE glm::vec<4, T, Q> wzwx(const glm::vec<4, T, Q> &v) {
2661  return glm::vec<4, T, Q>(v.w, v.z, v.w, v.x);
2662  }
2663 
2664  // wzwy
2665  template<typename T, qualifier Q>
2666  GLM_INLINE glm::vec<4, T, Q> wzwy(const glm::vec<4, T, Q> &v) {
2667  return glm::vec<4, T, Q>(v.w, v.z, v.w, v.y);
2668  }
2669 
2670  // wzwz
2671  template<typename T, qualifier Q>
2672  GLM_INLINE glm::vec<4, T, Q> wzwz(const glm::vec<4, T, Q> &v) {
2673  return glm::vec<4, T, Q>(v.w, v.z, v.w, v.z);
2674  }
2675 
2676  // wzww
2677  template<typename T, qualifier Q>
2678  GLM_INLINE glm::vec<4, T, Q> wzww(const glm::vec<4, T, Q> &v) {
2679  return glm::vec<4, T, Q>(v.w, v.z, v.w, v.w);
2680  }
2681 
2682  // wwxx
2683  template<typename T, qualifier Q>
2684  GLM_INLINE glm::vec<4, T, Q> wwxx(const glm::vec<4, T, Q> &v) {
2685  return glm::vec<4, T, Q>(v.w, v.w, v.x, v.x);
2686  }
2687 
2688  // wwxy
2689  template<typename T, qualifier Q>
2690  GLM_INLINE glm::vec<4, T, Q> wwxy(const glm::vec<4, T, Q> &v) {
2691  return glm::vec<4, T, Q>(v.w, v.w, v.x, v.y);
2692  }
2693 
2694  // wwxz
2695  template<typename T, qualifier Q>
2696  GLM_INLINE glm::vec<4, T, Q> wwxz(const glm::vec<4, T, Q> &v) {
2697  return glm::vec<4, T, Q>(v.w, v.w, v.x, v.z);
2698  }
2699 
2700  // wwxw
2701  template<typename T, qualifier Q>
2702  GLM_INLINE glm::vec<4, T, Q> wwxw(const glm::vec<4, T, Q> &v) {
2703  return glm::vec<4, T, Q>(v.w, v.w, v.x, v.w);
2704  }
2705 
2706  // wwyx
2707  template<typename T, qualifier Q>
2708  GLM_INLINE glm::vec<4, T, Q> wwyx(const glm::vec<4, T, Q> &v) {
2709  return glm::vec<4, T, Q>(v.w, v.w, v.y, v.x);
2710  }
2711 
2712  // wwyy
2713  template<typename T, qualifier Q>
2714  GLM_INLINE glm::vec<4, T, Q> wwyy(const glm::vec<4, T, Q> &v) {
2715  return glm::vec<4, T, Q>(v.w, v.w, v.y, v.y);
2716  }
2717 
2718  // wwyz
2719  template<typename T, qualifier Q>
2720  GLM_INLINE glm::vec<4, T, Q> wwyz(const glm::vec<4, T, Q> &v) {
2721  return glm::vec<4, T, Q>(v.w, v.w, v.y, v.z);
2722  }
2723 
2724  // wwyw
2725  template<typename T, qualifier Q>
2726  GLM_INLINE glm::vec<4, T, Q> wwyw(const glm::vec<4, T, Q> &v) {
2727  return glm::vec<4, T, Q>(v.w, v.w, v.y, v.w);
2728  }
2729 
2730  // wwzx
2731  template<typename T, qualifier Q>
2732  GLM_INLINE glm::vec<4, T, Q> wwzx(const glm::vec<4, T, Q> &v) {
2733  return glm::vec<4, T, Q>(v.w, v.w, v.z, v.x);
2734  }
2735 
2736  // wwzy
2737  template<typename T, qualifier Q>
2738  GLM_INLINE glm::vec<4, T, Q> wwzy(const glm::vec<4, T, Q> &v) {
2739  return glm::vec<4, T, Q>(v.w, v.w, v.z, v.y);
2740  }
2741 
2742  // wwzz
2743  template<typename T, qualifier Q>
2744  GLM_INLINE glm::vec<4, T, Q> wwzz(const glm::vec<4, T, Q> &v) {
2745  return glm::vec<4, T, Q>(v.w, v.w, v.z, v.z);
2746  }
2747 
2748  // wwzw
2749  template<typename T, qualifier Q>
2750  GLM_INLINE glm::vec<4, T, Q> wwzw(const glm::vec<4, T, Q> &v) {
2751  return glm::vec<4, T, Q>(v.w, v.w, v.z, v.w);
2752  }
2753 
2754  // wwwx
2755  template<typename T, qualifier Q>
2756  GLM_INLINE glm::vec<4, T, Q> wwwx(const glm::vec<4, T, Q> &v) {
2757  return glm::vec<4, T, Q>(v.w, v.w, v.w, v.x);
2758  }
2759 
2760  // wwwy
2761  template<typename T, qualifier Q>
2762  GLM_INLINE glm::vec<4, T, Q> wwwy(const glm::vec<4, T, Q> &v) {
2763  return glm::vec<4, T, Q>(v.w, v.w, v.w, v.y);
2764  }
2765 
2766  // wwwz
2767  template<typename T, qualifier Q>
2768  GLM_INLINE glm::vec<4, T, Q> wwwz(const glm::vec<4, T, Q> &v) {
2769  return glm::vec<4, T, Q>(v.w, v.w, v.w, v.z);
2770  }
2771 
2772  // wwww
2773  template<typename T, qualifier Q>
2774  GLM_INLINE glm::vec<4, T, Q> wwww(const glm::vec<4, T, Q> &v) {
2775  return glm::vec<4, T, Q>(v.w, v.w, v.w, v.w);
2776  }
2777 
2778 }
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00608.html b/common/glm/doc/api/a00608.html new file mode 100644 index 000000000..0c25d92b9 --- /dev/null +++ b/common/glm/doc/api/a00608.html @@ -0,0 +1,107 @@ + + + + + + + +0.9.9 API documenation: vector_angle.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_angle.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T angle (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T orientedAngle (vec< 2, T, Q > const &x, vec< 2, T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T orientedAngle (vec< 3, T, Q > const &x, vec< 3, T, Q > const &y, vec< 3, T, Q > const &ref)
 
+

Detailed Description

+

GLM_GTX_vector_angle

+
See also
Core features (dependence)
+
+GLM_GTX_quaternion (dependence)
+
+gtx_epsilon (dependence)
+ +

Definition in file vector_angle.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00608_source.html b/common/glm/doc/api/a00608_source.html new file mode 100644 index 000000000..eb16bf404 --- /dev/null +++ b/common/glm/doc/api/a00608_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: vector_angle.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_angle.hpp
+
+
+Go to the documentation of this file.
1 
15 #pragma once
16 
17 // Dependency:
18 #include "../glm.hpp"
19 #include "../gtc/epsilon.hpp"
20 #include "../gtx/quaternion.hpp"
21 #include "../gtx/rotate_vector.hpp"
22 
23 #ifndef GLM_ENABLE_EXPERIMENTAL
24 # error "GLM: GLM_GTX_vector_angle is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
25 #endif
26 
27 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
28 # pragma message("GLM: GLM_GTX_vector_angle extension included")
29 #endif
30 
31 namespace glm
32 {
35 
39  template<length_t L, typename T, qualifier Q>
40  GLM_FUNC_DECL T angle(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
41 
45  template<typename T, qualifier Q>
46  GLM_FUNC_DECL T orientedAngle(vec<2, T, Q> const& x, vec<2, T, Q> const& y);
47 
51  template<typename T, qualifier Q>
52  GLM_FUNC_DECL T orientedAngle(vec<3, T, Q> const& x, vec<3, T, Q> const& y, vec<3, T, Q> const& ref);
53 
55 }// namespace glm
56 
57 #include "vector_angle.inl"
GLM_FUNC_DECL T orientedAngle(vec< 3, T, Q > const &x, vec< 3, T, Q > const &y, vec< 3, T, Q > const &ref)
Returns the oriented angle between two 3d vectors based from a reference axis.
+
GLM_FUNC_DECL T angle(vec< L, T, Q > const &x, vec< L, T, Q > const &y)
Returns the absolute angle between two vectors.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00611.html b/common/glm/doc/api/a00611.html new file mode 100644 index 000000000..9e8aa6dca --- /dev/null +++ b/common/glm/doc/api/a00611.html @@ -0,0 +1,112 @@ + + + + + + + +0.9.9 API documenation: vector_query.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
vector_query.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL bool areCollinear (vec< L, T, Q > const &v0, vec< L, T, Q > const &v1, T const &epsilon)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL bool areOrthogonal (vec< L, T, Q > const &v0, vec< L, T, Q > const &v1, T const &epsilon)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL bool areOrthonormal (vec< L, T, Q > const &v0, vec< L, T, Q > const &v1, T const &epsilon)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, bool, Q > isCompNull (vec< L, T, Q > const &v, T const &epsilon)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL bool isNormalized (vec< L, T, Q > const &v, T const &epsilon)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL bool isNull (vec< L, T, Q > const &v, T const &epsilon)
 
+

Detailed Description

+

GLM_GTX_vector_query

+
See also
Core features (dependence)
+ +

Definition in file vector_query.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00611_source.html b/common/glm/doc/api/a00611_source.html new file mode 100644 index 000000000..40c1264ca --- /dev/null +++ b/common/glm/doc/api/a00611_source.html @@ -0,0 +1,89 @@ + + + + + + + +0.9.9 API documenation: vector_query.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vector_query.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 #include <cfloat>
18 #include <limits>
19 
20 #ifndef GLM_ENABLE_EXPERIMENTAL
21 # error "GLM: GLM_GTX_vector_query is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
22 #endif
23 
24 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
25 # pragma message("GLM: GLM_GTX_vector_query extension included")
26 #endif
27 
28 namespace glm
29 {
32 
35  template<length_t L, typename T, qualifier Q>
36  GLM_FUNC_DECL bool areCollinear(vec<L, T, Q> const& v0, vec<L, T, Q> const& v1, T const& epsilon);
37 
40  template<length_t L, typename T, qualifier Q>
41  GLM_FUNC_DECL bool areOrthogonal(vec<L, T, Q> const& v0, vec<L, T, Q> const& v1, T const& epsilon);
42 
45  template<length_t L, typename T, qualifier Q>
46  GLM_FUNC_DECL bool isNormalized(vec<L, T, Q> const& v, T const& epsilon);
47 
50  template<length_t L, typename T, qualifier Q>
51  GLM_FUNC_DECL bool isNull(vec<L, T, Q> const& v, T const& epsilon);
52 
55  template<length_t L, typename T, qualifier Q>
56  GLM_FUNC_DECL vec<L, bool, Q> isCompNull(vec<L, T, Q> const& v, T const& epsilon);
57 
60  template<length_t L, typename T, qualifier Q>
61  GLM_FUNC_DECL bool areOrthonormal(vec<L, T, Q> const& v0, vec<L, T, Q> const& v1, T const& epsilon);
62 
64 }// namespace glm
65 
66 #include "vector_query.inl"
GLM_FUNC_DECL bool isNormalized(vec< L, T, Q > const &v, T const &epsilon)
Check whether a vector is normalized.
+
GLM_FUNC_DECL bool areOrthonormal(vec< L, T, Q > const &v0, vec< L, T, Q > const &v1, T const &epsilon)
Check whether two vectors are orthonormal.
+
GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon()
Return the epsilon constant for floating point types.
+
GLM_FUNC_DECL bool areCollinear(vec< L, T, Q > const &v0, vec< L, T, Q > const &v1, T const &epsilon)
Check whether two vectors are collinears.
+
GLM_FUNC_DECL vec< L, bool, Q > isCompNull(vec< L, T, Q > const &v, T const &epsilon)
Check whether a each component of a vector is null.
+
GLM_FUNC_DECL bool areOrthogonal(vec< L, T, Q > const &v0, vec< L, T, Q > const &v1, T const &epsilon)
Check whether two vectors are orthogonals.
+
GLM_FUNC_DECL bool isNull(vec< L, T, Q > const &v, T const &epsilon)
Check whether a vector is null.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00614.html b/common/glm/doc/api/a00614.html new file mode 100644 index 000000000..3f03b5437 --- /dev/null +++ b/common/glm/doc/api/a00614.html @@ -0,0 +1,106 @@ + + + + + + + +0.9.9 API documenation: wrap.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
wrap.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType clamp (genType const &Texcoord)
 
template<typename genType >
GLM_FUNC_DECL genType mirrorClamp (genType const &Texcoord)
 
template<typename genType >
GLM_FUNC_DECL genType mirrorRepeat (genType const &Texcoord)
 
template<typename genType >
GLM_FUNC_DECL genType repeat (genType const &Texcoord)
 
+

Detailed Description

+

GLM_GTX_wrap

+
See also
Core features (dependence)
+ +

Definition in file wrap.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00614_source.html b/common/glm/doc/api/a00614_source.html new file mode 100644 index 000000000..052a22ebb --- /dev/null +++ b/common/glm/doc/api/a00614_source.html @@ -0,0 +1,86 @@ + + + + + + + +0.9.9 API documenation: wrap.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
wrap.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 #include "../gtc/vec1.hpp"
18 
19 #ifndef GLM_ENABLE_EXPERIMENTAL
20 # error "GLM: GLM_GTX_wrap is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
21 #endif
22 
23 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
24 # pragma message("GLM: GLM_GTX_wrap extension included")
25 #endif
26 
27 namespace glm
28 {
31 
34  template<typename genType>
35  GLM_FUNC_DECL genType clamp(genType const& Texcoord);
36 
39  template<typename genType>
40  GLM_FUNC_DECL genType repeat(genType const& Texcoord);
41 
44  template<typename genType>
45  GLM_FUNC_DECL genType mirrorClamp(genType const& Texcoord);
46 
49  template<typename genType>
50  GLM_FUNC_DECL genType mirrorRepeat(genType const& Texcoord);
51 
53 }// namespace glm
54 
55 #include "wrap.inl"
GLM_FUNC_DECL genType clamp(genType const &Texcoord)
Simulate GL_CLAMP OpenGL wrap mode.
+
GLM_FUNC_DECL genType repeat(genType const &Texcoord)
Simulate GL_REPEAT OpenGL wrap mode.
+
GLM_FUNC_DECL genType mirrorRepeat(genType const &Texcoord)
Simulate GL_MIRROR_REPEAT OpenGL wrap mode.
+
GLM_FUNC_DECL genType mirrorClamp(genType const &Texcoord)
Simulate GL_MIRRORED_REPEAT OpenGL wrap mode.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00617.html b/common/glm/doc/api/a00617.html new file mode 100644 index 000000000..96fa9f86a --- /dev/null +++ b/common/glm/doc/api/a00617.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: mat2x2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mat2x2.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Core features

+ +

Definition in file mat2x2.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00617_source.html b/common/glm/doc/api/a00617_source.html new file mode 100644 index 000000000..227db67a7 --- /dev/null +++ b/common/glm/doc/api/a00617_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: mat2x2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mat2x2.hpp
+
+ + + + + diff --git a/common/glm/doc/api/a00620.html b/common/glm/doc/api/a00620.html new file mode 100644 index 000000000..f8ef08d3e --- /dev/null +++ b/common/glm/doc/api/a00620.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: mat2x3.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mat2x3.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Core features

+ +

Definition in file mat2x3.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00620_source.html b/common/glm/doc/api/a00620_source.html new file mode 100644 index 000000000..538708ec7 --- /dev/null +++ b/common/glm/doc/api/a00620_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: mat2x3.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mat2x3.hpp
+
+ + + + + diff --git a/common/glm/doc/api/a00623.html b/common/glm/doc/api/a00623.html new file mode 100644 index 000000000..f4efc2a8a --- /dev/null +++ b/common/glm/doc/api/a00623.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: mat2x4.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mat2x4.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Core features

+ +

Definition in file mat2x4.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00623_source.html b/common/glm/doc/api/a00623_source.html new file mode 100644 index 000000000..d77c460fb --- /dev/null +++ b/common/glm/doc/api/a00623_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: mat2x4.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mat2x4.hpp
+
+ + + + + diff --git a/common/glm/doc/api/a00626.html b/common/glm/doc/api/a00626.html new file mode 100644 index 000000000..60932d180 --- /dev/null +++ b/common/glm/doc/api/a00626.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: mat3x2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mat3x2.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Core features

+ +

Definition in file mat3x2.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00626_source.html b/common/glm/doc/api/a00626_source.html new file mode 100644 index 000000000..65914ea3e --- /dev/null +++ b/common/glm/doc/api/a00626_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: mat3x2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mat3x2.hpp
+
+ + + + + diff --git a/common/glm/doc/api/a00629.html b/common/glm/doc/api/a00629.html new file mode 100644 index 000000000..fc760644a --- /dev/null +++ b/common/glm/doc/api/a00629.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: mat3x3.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mat3x3.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Core features

+ +

Definition in file mat3x3.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00629_source.html b/common/glm/doc/api/a00629_source.html new file mode 100644 index 000000000..4500b4f21 --- /dev/null +++ b/common/glm/doc/api/a00629_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: mat3x3.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mat3x3.hpp
+
+ + + + + diff --git a/common/glm/doc/api/a00632.html b/common/glm/doc/api/a00632.html new file mode 100644 index 000000000..595553c76 --- /dev/null +++ b/common/glm/doc/api/a00632.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: mat3x4.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mat3x4.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Core features

+ +

Definition in file mat3x4.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00632_source.html b/common/glm/doc/api/a00632_source.html new file mode 100644 index 000000000..d5a719f85 --- /dev/null +++ b/common/glm/doc/api/a00632_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: mat3x4.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mat3x4.hpp
+
+ + + + + diff --git a/common/glm/doc/api/a00635.html b/common/glm/doc/api/a00635.html new file mode 100644 index 000000000..154580c49 --- /dev/null +++ b/common/glm/doc/api/a00635.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: mat4x2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mat4x2.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Core features

+ +

Definition in file mat4x2.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00635_source.html b/common/glm/doc/api/a00635_source.html new file mode 100644 index 000000000..c15032e76 --- /dev/null +++ b/common/glm/doc/api/a00635_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: mat4x2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mat4x2.hpp
+
+
+Go to the documentation of this file.
1 
4 #pragma once
8 #include "./ext/matrix_float4x2_precision.hpp"
9 
Core features
+
Core features
+ +
+ + + + diff --git a/common/glm/doc/api/a00638.html b/common/glm/doc/api/a00638.html new file mode 100644 index 000000000..308df77ee --- /dev/null +++ b/common/glm/doc/api/a00638.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: mat4x3.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mat4x3.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Core features

+ +

Definition in file mat4x3.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00638_source.html b/common/glm/doc/api/a00638_source.html new file mode 100644 index 000000000..a2e1773f0 --- /dev/null +++ b/common/glm/doc/api/a00638_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: mat4x3.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mat4x3.hpp
+
+ + + + + diff --git a/common/glm/doc/api/a00641.html b/common/glm/doc/api/a00641.html new file mode 100644 index 000000000..09b8991f4 --- /dev/null +++ b/common/glm/doc/api/a00641.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: mat4x4.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mat4x4.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Core features

+ +

Definition in file mat4x4.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00641_source.html b/common/glm/doc/api/a00641_source.html new file mode 100644 index 000000000..786774442 --- /dev/null +++ b/common/glm/doc/api/a00641_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: mat4x4.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mat4x4.hpp
+
+ + + + + diff --git a/common/glm/doc/api/a00644.html b/common/glm/doc/api/a00644.html new file mode 100644 index 000000000..28860ee3a --- /dev/null +++ b/common/glm/doc/api/a00644.html @@ -0,0 +1,109 @@ + + + + + + + +0.9.9 API documenation: matrix.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + +

+Functions

template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL T determinant (mat< C, R, T, Q > const &m)
 
template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL mat< C, R, T, Q > inverse (mat< C, R, T, Q > const &m)
 
template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL mat< C, R, T, Q > matrixCompMult (mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y)
 
template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL detail::outerProduct_trait< C, R, T, Q >::type outerProduct (vec< C, T, Q > const &c, vec< R, T, Q > const &r)
 
template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL mat< C, R, T, Q >::transpose_type transpose (mat< C, R, T, Q > const &x)
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00644_source.html b/common/glm/doc/api/a00644_source.html new file mode 100644 index 000000000..ee7097696 --- /dev/null +++ b/common/glm/doc/api/a00644_source.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: matrix.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependencies
16 #include "detail/qualifier.hpp"
17 #include "detail/setup.hpp"
18 #include "vec2.hpp"
19 #include "vec3.hpp"
20 #include "vec4.hpp"
21 #include "mat2x2.hpp"
22 #include "mat2x3.hpp"
23 #include "mat2x4.hpp"
24 #include "mat3x2.hpp"
25 #include "mat3x3.hpp"
26 #include "mat3x4.hpp"
27 #include "mat4x2.hpp"
28 #include "mat4x3.hpp"
29 #include "mat4x4.hpp"
30 
31 namespace glm {
32 namespace detail
33 {
34  template<length_t C, length_t R, typename T, qualifier Q>
35  struct outerProduct_trait{};
36 
37  template<typename T, qualifier Q>
38  struct outerProduct_trait<2, 2, T, Q>
39  {
40  typedef mat<2, 2, T, Q> type;
41  };
42 
43  template<typename T, qualifier Q>
44  struct outerProduct_trait<2, 3, T, Q>
45  {
46  typedef mat<3, 2, T, Q> type;
47  };
48 
49  template<typename T, qualifier Q>
50  struct outerProduct_trait<2, 4, T, Q>
51  {
52  typedef mat<4, 2, T, Q> type;
53  };
54 
55  template<typename T, qualifier Q>
56  struct outerProduct_trait<3, 2, T, Q>
57  {
58  typedef mat<2, 3, T, Q> type;
59  };
60 
61  template<typename T, qualifier Q>
62  struct outerProduct_trait<3, 3, T, Q>
63  {
64  typedef mat<3, 3, T, Q> type;
65  };
66 
67  template<typename T, qualifier Q>
68  struct outerProduct_trait<3, 4, T, Q>
69  {
70  typedef mat<4, 3, T, Q> type;
71  };
72 
73  template<typename T, qualifier Q>
74  struct outerProduct_trait<4, 2, T, Q>
75  {
76  typedef mat<2, 4, T, Q> type;
77  };
78 
79  template<typename T, qualifier Q>
80  struct outerProduct_trait<4, 3, T, Q>
81  {
82  typedef mat<3, 4, T, Q> type;
83  };
84 
85  template<typename T, qualifier Q>
86  struct outerProduct_trait<4, 4, T, Q>
87  {
88  typedef mat<4, 4, T, Q> type;
89  };
90 }//namespace detail
91 
94 
105  template<length_t C, length_t R, typename T, qualifier Q>
106  GLM_FUNC_DECL mat<C, R, T, Q> matrixCompMult(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y);
107 
119  template<length_t C, length_t R, typename T, qualifier Q>
120  GLM_FUNC_DECL typename detail::outerProduct_trait<C, R, T, Q>::type outerProduct(vec<C, T, Q> const& c, vec<R, T, Q> const& r);
121 
131  template<length_t C, length_t R, typename T, qualifier Q>
132  GLM_FUNC_DECL typename mat<C, R, T, Q>::transpose_type transpose(mat<C, R, T, Q> const& x);
133 
143  template<length_t C, length_t R, typename T, qualifier Q>
144  GLM_FUNC_DECL T determinant(mat<C, R, T, Q> const& m);
145 
155  template<length_t C, length_t R, typename T, qualifier Q>
156  GLM_FUNC_DECL mat<C, R, T, Q> inverse(mat<C, R, T, Q> const& m);
157 
159 }//namespace glm
160 
161 #include "detail/func_matrix.inl"
GLM_FUNC_DECL mat< C, R, T, Q > inverse(mat< C, R, T, Q > const &m)
Return the inverse of a squared matrix.
+
GLM_FUNC_DECL mat< C, R, T, Q > matrixCompMult(mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y)
Multiply matrix x by matrix y component-wise, i.e., result[i][j] is the scalar product of x[i][j] and...
+
Core features
+
Core features
+
Core features
+
Core features
+
Core features
+
Core features
+
GLM_FUNC_DECL detail::outerProduct_trait< C, R, T, Q >::type outerProduct(vec< C, T, Q > const &c, vec< R, T, Q > const &r)
Treats the first parameter c as a column vector and the second parameter r as a row vector and does a...
+
Core features
+
Core features
+
Core features
+
Core features
+
Core features
+
Definition: common.hpp:20
+
Core features
+
GLM_FUNC_DECL T determinant(mat< C, R, T, Q > const &m)
Return the determinant of a squared matrix.
+
GLM_FUNC_DECL mat< C, R, T, Q >::transpose_type transpose(mat< C, R, T, Q > const &x)
Returns the transposed matrix of x.
+
+ + + + diff --git a/common/glm/doc/api/a00647.html b/common/glm/doc/api/a00647.html new file mode 100644 index 000000000..621e996cb --- /dev/null +++ b/common/glm/doc/api/a00647.html @@ -0,0 +1,139 @@ + + + + + + + +0.9.9 API documenation: trigonometric.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
trigonometric.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > acos (vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > acosh (vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > asin (vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > asinh (vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > atan (vec< L, T, Q > const &y, vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > atan (vec< L, T, Q > const &y_over_x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > atanh (vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > cos (vec< L, T, Q > const &angle)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > cosh (vec< L, T, Q > const &angle)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > degrees (vec< L, T, Q > const &radians)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > radians (vec< L, T, Q > const &degrees)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > sin (vec< L, T, Q > const &angle)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > sinh (vec< L, T, Q > const &angle)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > tan (vec< L, T, Q > const &angle)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > tanh (vec< L, T, Q > const &angle)
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a00647_source.html b/common/glm/doc/api/a00647_source.html new file mode 100644 index 000000000..ebb785a07 --- /dev/null +++ b/common/glm/doc/api/a00647_source.html @@ -0,0 +1,97 @@ + + + + + + + +0.9.9 API documenation: trigonometric.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
trigonometric.hpp
+
+
+Go to the documentation of this file.
1 
19 #pragma once
20 
21 #include "detail/setup.hpp"
22 #include "detail/qualifier.hpp"
23 
24 namespace glm
25 {
28 
37  template<length_t L, typename T, qualifier Q>
38  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> radians(vec<L, T, Q> const& degrees);
39 
48  template<length_t L, typename T, qualifier Q>
49  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> degrees(vec<L, T, Q> const& radians);
50 
60  template<length_t L, typename T, qualifier Q>
61  GLM_FUNC_DECL vec<L, T, Q> sin(vec<L, T, Q> const& angle);
62 
72  template<length_t L, typename T, qualifier Q>
73  GLM_FUNC_DECL vec<L, T, Q> cos(vec<L, T, Q> const& angle);
74 
83  template<length_t L, typename T, qualifier Q>
84  GLM_FUNC_DECL vec<L, T, Q> tan(vec<L, T, Q> const& angle);
85 
96  template<length_t L, typename T, qualifier Q>
97  GLM_FUNC_DECL vec<L, T, Q> asin(vec<L, T, Q> const& x);
98 
109  template<length_t L, typename T, qualifier Q>
110  GLM_FUNC_DECL vec<L, T, Q> acos(vec<L, T, Q> const& x);
111 
124  template<length_t L, typename T, qualifier Q>
125  GLM_FUNC_DECL vec<L, T, Q> atan(vec<L, T, Q> const& y, vec<L, T, Q> const& x);
126 
136  template<length_t L, typename T, qualifier Q>
137  GLM_FUNC_DECL vec<L, T, Q> atan(vec<L, T, Q> const& y_over_x);
138 
147  template<length_t L, typename T, qualifier Q>
148  GLM_FUNC_DECL vec<L, T, Q> sinh(vec<L, T, Q> const& angle);
149 
158  template<length_t L, typename T, qualifier Q>
159  GLM_FUNC_DECL vec<L, T, Q> cosh(vec<L, T, Q> const& angle);
160 
169  template<length_t L, typename T, qualifier Q>
170  GLM_FUNC_DECL vec<L, T, Q> tanh(vec<L, T, Q> const& angle);
171 
180  template<length_t L, typename T, qualifier Q>
181  GLM_FUNC_DECL vec<L, T, Q> asinh(vec<L, T, Q> const& x);
182 
192  template<length_t L, typename T, qualifier Q>
193  GLM_FUNC_DECL vec<L, T, Q> acosh(vec<L, T, Q> const& x);
194 
204  template<length_t L, typename T, qualifier Q>
205  GLM_FUNC_DECL vec<L, T, Q> atanh(vec<L, T, Q> const& x);
206 
208 }//namespace glm
209 
210 #include "detail/func_trigonometric.inl"
GLM_FUNC_DECL vec< L, T, Q > cosh(vec< L, T, Q > const &angle)
Returns the hyperbolic cosine function, (exp(x) + exp(-x)) / 2.
+
GLM_FUNC_DECL vec< L, T, Q > atan(vec< L, T, Q > const &y_over_x)
Arc tangent.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > degrees(vec< L, T, Q > const &radians)
Converts radians to degrees and returns the result.
+
GLM_FUNC_DECL vec< L, T, Q > sinh(vec< L, T, Q > const &angle)
Returns the hyperbolic sine function, (exp(x) - exp(-x)) / 2.
+
GLM_FUNC_DECL vec< L, T, Q > acos(vec< L, T, Q > const &x)
Arc cosine.
+
GLM_FUNC_DECL vec< L, T, Q > tanh(vec< L, T, Q > const &angle)
Returns the hyperbolic tangent function, sinh(angle) / cosh(angle)
+
GLM_FUNC_DECL vec< L, T, Q > asin(vec< L, T, Q > const &x)
Arc sine.
+
GLM_FUNC_DECL vec< L, T, Q > sin(vec< L, T, Q > const &angle)
The standard trigonometric sine function.
+
GLM_FUNC_DECL vec< L, T, Q > atanh(vec< L, T, Q > const &x)
Arc hyperbolic tangent; returns the inverse of tanh.
+
GLM_FUNC_DECL vec< L, T, Q > cos(vec< L, T, Q > const &angle)
The standard trigonometric cosine function.
+
GLM_FUNC_DECL vec< L, T, Q > tan(vec< L, T, Q > const &angle)
The standard trigonometric tangent function.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > radians(vec< L, T, Q > const &degrees)
Converts degrees to radians and returns the result.
+
GLM_FUNC_DECL vec< L, T, Q > acosh(vec< L, T, Q > const &x)
Arc hyperbolic cosine; returns the non-negative inverse of cosh.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL T angle(qua< T, Q > const &x)
Returns the quaternion rotation angle.
+
GLM_FUNC_DECL vec< L, T, Q > asinh(vec< L, T, Q > const &x)
Arc hyperbolic sine; returns the inverse of sinh.
+
+ + + + diff --git a/common/glm/doc/api/a00650.html b/common/glm/doc/api/a00650.html new file mode 100644 index 000000000..cf8ad03ce --- /dev/null +++ b/common/glm/doc/api/a00650.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: vec2.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vec2.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Core features

+ +

Definition in file vec2.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00650_source.html b/common/glm/doc/api/a00650_source.html new file mode 100644 index 000000000..dafde1c7b --- /dev/null +++ b/common/glm/doc/api/a00650_source.html @@ -0,0 +1,91 @@ + + + + + + + +0.9.9 API documenation: vec2.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vec2.hpp
+
+ + + + + diff --git a/common/glm/doc/api/a00653.html b/common/glm/doc/api/a00653.html new file mode 100644 index 000000000..9b3d0d987 --- /dev/null +++ b/common/glm/doc/api/a00653.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: vec3.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vec3.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Core features

+ +

Definition in file vec3.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00653_source.html b/common/glm/doc/api/a00653_source.html new file mode 100644 index 000000000..bffb4c7fa --- /dev/null +++ b/common/glm/doc/api/a00653_source.html @@ -0,0 +1,91 @@ + + + + + + + +0.9.9 API documenation: vec3.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vec3.hpp
+
+ + + + + diff --git a/common/glm/doc/api/a00656.html b/common/glm/doc/api/a00656.html new file mode 100644 index 000000000..a59c1f119 --- /dev/null +++ b/common/glm/doc/api/a00656.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: vec4.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vec4.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

Core features

+ +

Definition in file vec4.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00656_source.html b/common/glm/doc/api/a00656_source.html new file mode 100644 index 000000000..734509507 --- /dev/null +++ b/common/glm/doc/api/a00656_source.html @@ -0,0 +1,91 @@ + + + + + + + +0.9.9 API documenation: vec4.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vec4.hpp
+
+ + + + + diff --git a/common/glm/doc/api/a00659.html b/common/glm/doc/api/a00659.html new file mode 100644 index 000000000..2b0bea763 --- /dev/null +++ b/common/glm/doc/api/a00659.html @@ -0,0 +1,90 @@ + + + + + + + +0.9.9 API documenation: vec4.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
vec4.hpp File Reference
+
+
+ +

Core features +More...

+ +

Go to the source code of this file.

+

Detailed Description

+

Core features

+ +

Definition in file vec4.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a00659_source.html b/common/glm/doc/api/a00659_source.html new file mode 100644 index 000000000..7c41e4c82 --- /dev/null +++ b/common/glm/doc/api/a00659_source.html @@ -0,0 +1,82 @@ + + + + + + + +0.9.9 API documenation: man.doxy Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
man.doxy
+
+
+
1 # Doxyfile 1.8.10
2 
3 # This file describes the settings to be used by the documentation system
4 # doxygen (www.doxygen.org) for a project.
5 #
6 # All text after a double hash (##) is considered a comment and is placed in
7 # front of the TAG it is preceding.
8 #
9 # All text after a single hash (#) is considered a comment and will be ignored.
10 # The format is:
11 # TAG = value [value, ...]
12 # For lists, items can also be appended using:
13 # TAG += value [value, ...]
14 # Values that contain spaces should be placed between quotes (\" \").
15 
16 #---------------------------------------------------------------------------
17 # Project related configuration options
18 #---------------------------------------------------------------------------
19 
20 # This tag specifies the encoding used for all characters in the config file
21 # that follow. The default is UTF-8 which is also the encoding used for all text
22 # before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
23 # built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
24 # for the list of possible encodings.
25 # The default value is: UTF-8.
26 
27 DOXYFILE_ENCODING = UTF-8
28 
29 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
30 # double-quotes, unless you are using Doxywizard) that should identify the
31 # project for which the documentation is generated. This name is used in the
32 # title of most generated pages and in a few other places.
33 # The default value is: My Project.
34 
35 PROJECT_NAME = "0.9.9 API documenation"
36 
37 # The PROJECT_NUMBER tag can be used to enter a project or revision number. This
38 # could be handy for archiving the generated documentation or if some version
39 # control system is used.
40 
41 PROJECT_NUMBER =
42 
43 # Using the PROJECT_BRIEF tag one can provide an optional one line description
44 # for a project that appears at the top of each page and should give viewer a
45 # quick idea about the purpose of the project. Keep the description short.
46 
47 PROJECT_BRIEF =
48 
49 # With the PROJECT_LOGO tag one can specify a logo or an icon that is included
50 # in the documentation. The maximum height of the logo should not exceed 55
51 # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
52 # the logo to the output directory.
53 
54 PROJECT_LOGO = G:/Source/G-Truc/glm/doc/manual/logo-mini.png
55 
56 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
57 # into which the generated documentation will be written. If a relative path is
58 # entered, it will be relative to the location where doxygen was started. If
59 # left blank the current directory will be used.
60 
61 OUTPUT_DIRECTORY = .
62 
63 # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
64 # directories (in 2 levels) under the output directory of each output format and
65 # will distribute the generated files over these directories. Enabling this
66 # option can be useful when feeding doxygen a huge amount of source files, where
67 # putting all generated files in the same directory would otherwise causes
68 # performance problems for the file system.
69 # The default value is: NO.
70 
71 CREATE_SUBDIRS = NO
72 
73 # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
74 # characters to appear in the names of generated files. If set to NO, non-ASCII
75 # characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
76 # U+3044.
77 # The default value is: NO.
78 
79 ALLOW_UNICODE_NAMES = NO
80 
81 # The OUTPUT_LANGUAGE tag is used to specify the language in which all
82 # documentation generated by doxygen is written. Doxygen will use this
83 # information to generate all constant output in the proper language.
84 # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
85 # Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
86 # Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
87 # Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
88 # Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
89 # Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
90 # Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
91 # Ukrainian and Vietnamese.
92 # The default value is: English.
93 
94 OUTPUT_LANGUAGE = English
95 
96 # If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
97 # descriptions after the members that are listed in the file and class
98 # documentation (similar to Javadoc). Set to NO to disable this.
99 # The default value is: YES.
100 
101 BRIEF_MEMBER_DESC = YES
102 
103 # If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
104 # description of a member or function before the detailed description
105 #
106 # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
107 # brief descriptions will be completely suppressed.
108 # The default value is: YES.
109 
110 REPEAT_BRIEF = YES
111 
112 # This tag implements a quasi-intelligent brief description abbreviator that is
113 # used to form the text in various listings. Each string in this list, if found
114 # as the leading text of the brief description, will be stripped from the text
115 # and the result, after processing the whole list, is used as the annotated
116 # text. Otherwise, the brief description is used as-is. If left blank, the
117 # following values are used ($name is automatically replaced with the name of
118 # the entity):The $name class, The $name widget, The $name file, is, provides,
119 # specifies, contains, represents, a, an and the.
120 
121 ABBREVIATE_BRIEF = "The $name class " \
122  "The $name widget " \
123  "The $name file " \
124  is \
125  provides \
126  specifies \
127  contains \
128  represents \
129  a \
130  an \
131  the
132 
133 # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
134 # doxygen will generate a detailed section even if there is only a brief
135 # description.
136 # The default value is: NO.
137 
138 ALWAYS_DETAILED_SEC = NO
139 
140 # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
141 # inherited members of a class in the documentation of that class as if those
142 # members were ordinary class members. Constructors, destructors and assignment
143 # operators of the base classes will not be shown.
144 # The default value is: NO.
145 
146 INLINE_INHERITED_MEMB = NO
147 
148 # If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
149 # before files name in the file list and in the header files. If set to NO the
150 # shortest path that makes the file name unique will be used
151 # The default value is: YES.
152 
153 FULL_PATH_NAMES = NO
154 
155 # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
156 # Stripping is only done if one of the specified strings matches the left-hand
157 # part of the path. The tag can be used to show relative paths in the file list.
158 # If left blank the directory from which doxygen is run is used as the path to
159 # strip.
160 #
161 # Note that you can specify absolute paths here, but also relative paths, which
162 # will be relative from the directory where doxygen is started.
163 # This tag requires that the tag FULL_PATH_NAMES is set to YES.
164 
165 STRIP_FROM_PATH = "C:/Documents and Settings/Groove/ "
166 
167 # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
168 # path mentioned in the documentation of a class, which tells the reader which
169 # header file to include in order to use a class. If left blank only the name of
170 # the header file containing the class definition is used. Otherwise one should
171 # specify the list of include paths that are normally passed to the compiler
172 # using the -I flag.
173 
174 STRIP_FROM_INC_PATH =
175 
176 # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
177 # less readable) file names. This can be useful is your file systems doesn't
178 # support long names like on DOS, Mac, or CD-ROM.
179 # The default value is: NO.
180 
181 SHORT_NAMES = YES
182 
183 # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
184 # first line (until the first dot) of a Javadoc-style comment as the brief
185 # description. If set to NO, the Javadoc-style will behave just like regular Qt-
186 # style comments (thus requiring an explicit @brief command for a brief
187 # description.)
188 # The default value is: NO.
189 
190 JAVADOC_AUTOBRIEF = YES
191 
192 # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
193 # line (until the first dot) of a Qt-style comment as the brief description. If
194 # set to NO, the Qt-style will behave just like regular Qt-style comments (thus
195 # requiring an explicit \brief command for a brief description.)
196 # The default value is: NO.
197 
198 QT_AUTOBRIEF = NO
199 
200 # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
201 # multi-line C++ special comment block (i.e. a block of
202 # a brief description. This used to be the default behavior. The new default is
203 # to treat a multi-line C++ comment block as a detailed description. Set this
204 # tag to YES if you prefer the old behavior instead.
205 #
206 # Note that setting this tag to YES also means that rational rose comments are
207 # not recognized any more.
208 # The default value is: NO.
209 
210 MULTILINE_CPP_IS_BRIEF = NO
211 
212 # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
213 # documentation from any documented member that it re-implements.
214 # The default value is: YES.
215 
216 INHERIT_DOCS = YES
217 
218 # If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
219 # page for each member. If set to NO, the documentation of a member will be part
220 # of the file/class/namespace that contains it.
221 # The default value is: NO.
222 
223 SEPARATE_MEMBER_PAGES = NO
224 
225 # The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
226 # uses this value to replace tabs by spaces in code fragments.
227 # Minimum value: 1, maximum value: 16, default value: 4.
228 
229 TAB_SIZE = 8
230 
231 # This tag can be used to specify a number of aliases that act as commands in
232 # the documentation. An alias has the form:
233 # name=value
234 # For example adding
235 # "sideeffect=@par Side Effects:\n"
236 # will allow you to put the command \sideeffect (or @sideeffect) in the
237 # documentation, which will result in a user-defined paragraph with heading
238 # "Side Effects:". You can put \n's in the value part of an alias to insert
239 # newlines.
240 
241 ALIASES =
242 
243 # This tag can be used to specify a number of word-keyword mappings (TCL only).
244 # A mapping has the form "name=value". For example adding "class=itcl::class"
245 # will allow you to use the command class in the itcl::class meaning.
246 
247 TCL_SUBST =
248 
249 # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
250 # only. Doxygen will then generate output that is more tailored for C. For
251 # instance, some of the names that are used will be different. The list of all
252 # members will be omitted, etc.
253 # The default value is: NO.
254 
255 OPTIMIZE_OUTPUT_FOR_C = NO
256 
257 # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
258 # Python sources only. Doxygen will then generate output that is more tailored
259 # for that language. For instance, namespaces will be presented as packages,
260 # qualified scopes will look different, etc.
261 # The default value is: NO.
262 
263 OPTIMIZE_OUTPUT_JAVA = NO
264 
265 # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
266 # sources. Doxygen will then generate output that is tailored for Fortran.
267 # The default value is: NO.
268 
269 OPTIMIZE_FOR_FORTRAN = NO
270 
271 # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
272 # sources. Doxygen will then generate output that is tailored for VHDL.
273 # The default value is: NO.
274 
275 OPTIMIZE_OUTPUT_VHDL = NO
276 
277 # Doxygen selects the parser to use depending on the extension of the files it
278 # parses. With this tag you can assign which parser to use for a given
279 # extension. Doxygen has a built-in mapping, but you can override or extend it
280 # using this tag. The format is ext=language, where ext is a file extension, and
281 # language is one of the parsers supported by doxygen: IDL, Java, Javascript,
282 # C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
283 # FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
284 # Fortran. In the later case the parser tries to guess whether the code is fixed
285 # or free formatted code, this is the default for Fortran type files), VHDL. For
286 # instance to make doxygen treat .inc files as Fortran files (default is PHP),
287 # and .f files as C (default is Fortran), use: inc=Fortran f=C.
288 #
289 # Note: For files without extension you can use no_extension as a placeholder.
290 #
291 # Note that for custom extensions you also need to set FILE_PATTERNS otherwise
292 # the files are not read by doxygen.
293 
294 EXTENSION_MAPPING =
295 
296 # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
297 # according to the Markdown format, which allows for more readable
298 # documentation. See http://daringfireball.net/projects/markdown/ for details.
299 # The output of markdown processing is further processed by doxygen, so you can
300 # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
301 # case of backward compatibilities issues.
302 # The default value is: YES.
303 
304 MARKDOWN_SUPPORT = YES
305 
306 # When enabled doxygen tries to link words that correspond to documented
307 # classes, or namespaces to their corresponding documentation. Such a link can
308 # be prevented in individual cases by putting a % sign in front of the word or
309 # globally by setting AUTOLINK_SUPPORT to NO.
310 # The default value is: YES.
311 
312 AUTOLINK_SUPPORT = YES
313 
314 # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
315 # to include (a tag file for) the STL sources as input, then you should set this
316 # tag to YES in order to let doxygen match functions declarations and
317 # definitions whose arguments contain STL classes (e.g. func(std::string);
318 # versus func(std::string) {}). This also make the inheritance and collaboration
319 # diagrams that involve STL classes more complete and accurate.
320 # The default value is: NO.
321 
322 BUILTIN_STL_SUPPORT = NO
323 
324 # If you use Microsoft's C++/CLI language, you should set this option to YES to
325 # enable parsing support.
326 # The default value is: NO.
327 
328 CPP_CLI_SUPPORT = NO
329 
330 # Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
331 # http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
332 # will parse them like normal C++ but will assume all classes use public instead
333 # of private inheritance when no explicit protection keyword is present.
334 # The default value is: NO.
335 
336 SIP_SUPPORT = NO
337 
338 # For Microsoft's IDL there are propget and propput attributes to indicate
339 # getter and setter methods for a property. Setting this option to YES will make
340 # doxygen to replace the get and set methods by a property in the documentation.
341 # This will only work if the methods are indeed getting or setting a simple
342 # type. If this is not the case, or you want to show the methods anyway, you
343 # should set this option to NO.
344 # The default value is: YES.
345 
346 IDL_PROPERTY_SUPPORT = YES
347 
348 # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
349 # tag is set to YES then doxygen will reuse the documentation of the first
350 # member in the group (if any) for the other members of the group. By default
351 # all members of a group must be documented explicitly.
352 # The default value is: NO.
353 
354 DISTRIBUTE_GROUP_DOC = NO
355 
356 # If one adds a struct or class to a group and this option is enabled, then also
357 # any nested class or struct is added to the same group. By default this option
358 # is disabled and one has to add nested compounds explicitly via \ingroup.
359 # The default value is: NO.
360 
361 GROUP_NESTED_COMPOUNDS = NO
362 
363 # Set the SUBGROUPING tag to YES to allow class member groups of the same type
364 # (for instance a group of public functions) to be put as a subgroup of that
365 # type (e.g. under the Public Functions section). Set it to NO to prevent
366 # subgrouping. Alternatively, this can be done per class using the
367 # \nosubgrouping command.
368 # The default value is: YES.
369 
370 SUBGROUPING = NO
371 
372 # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
373 # are shown inside the group in which they are included (e.g. using \ingroup)
374 # instead of on a separate page (for HTML and Man pages) or section (for LaTeX
375 # and RTF).
376 #
377 # Note that this feature does not work in combination with
378 # SEPARATE_MEMBER_PAGES.
379 # The default value is: NO.
380 
381 INLINE_GROUPED_CLASSES = NO
382 
383 # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
384 # with only public data fields or simple typedef fields will be shown inline in
385 # the documentation of the scope in which they are defined (i.e. file,
386 # namespace, or group documentation), provided this scope is documented. If set
387 # to NO, structs, classes, and unions are shown on a separate page (for HTML and
388 # Man pages) or section (for LaTeX and RTF).
389 # The default value is: NO.
390 
391 INLINE_SIMPLE_STRUCTS = NO
392 
393 # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
394 # enum is documented as struct, union, or enum with the name of the typedef. So
395 # typedef struct TypeS {} TypeT, will appear in the documentation as a struct
396 # with name TypeT. When disabled the typedef will appear as a member of a file,
397 # namespace, or class. And the struct will be named TypeS. This can typically be
398 # useful for C code in case the coding convention dictates that all compound
399 # types are typedef'ed and only the typedef is referenced, never the tag name.
400 # The default value is: NO.
401 
402 TYPEDEF_HIDES_STRUCT = NO
403 
404 # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
405 # cache is used to resolve symbols given their name and scope. Since this can be
406 # an expensive process and often the same symbol appears multiple times in the
407 # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
408 # doxygen will become slower. If the cache is too large, memory is wasted. The
409 # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
410 # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
411 # symbols. At the end of a run doxygen will report the cache usage and suggest
412 # the optimal cache size from a speed point of view.
413 # Minimum value: 0, maximum value: 9, default value: 0.
414 
415 LOOKUP_CACHE_SIZE = 0
416 
417 #---------------------------------------------------------------------------
418 # Build related configuration options
419 #---------------------------------------------------------------------------
420 
421 # If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
422 # documentation are documented, even if no documentation was available. Private
423 # class members and static file members will be hidden unless the
424 # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
425 # Note: This will also disable the warnings about undocumented members that are
426 # normally produced when WARNINGS is set to YES.
427 # The default value is: NO.
428 
429 EXTRACT_ALL = NO
430 
431 # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
432 # be included in the documentation.
433 # The default value is: NO.
434 
435 EXTRACT_PRIVATE = NO
436 
437 # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
438 # scope will be included in the documentation.
439 # The default value is: NO.
440 
441 EXTRACT_PACKAGE = NO
442 
443 # If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
444 # included in the documentation.
445 # The default value is: NO.
446 
447 EXTRACT_STATIC = YES
448 
449 # If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
450 # locally in source files will be included in the documentation. If set to NO,
451 # only classes defined in header files are included. Does not have any effect
452 # for Java sources.
453 # The default value is: YES.
454 
455 EXTRACT_LOCAL_CLASSES = NO
456 
457 # This flag is only useful for Objective-C code. If set to YES, local methods,
458 # which are defined in the implementation section but not in the interface are
459 # included in the documentation. If set to NO, only methods in the interface are
460 # included.
461 # The default value is: NO.
462 
463 EXTRACT_LOCAL_METHODS = NO
464 
465 # If this flag is set to YES, the members of anonymous namespaces will be
466 # extracted and appear in the documentation as a namespace called
467 # 'anonymous_namespace{file}', where file will be replaced with the base name of
468 # the file that contains the anonymous namespace. By default anonymous namespace
469 # are hidden.
470 # The default value is: NO.
471 
472 EXTRACT_ANON_NSPACES = NO
473 
474 # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
475 # undocumented members inside documented classes or files. If set to NO these
476 # members will be included in the various overviews, but no documentation
477 # section is generated. This option has no effect if EXTRACT_ALL is enabled.
478 # The default value is: NO.
479 
480 HIDE_UNDOC_MEMBERS = YES
481 
482 # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
483 # undocumented classes that are normally visible in the class hierarchy. If set
484 # to NO, these classes will be included in the various overviews. This option
485 # has no effect if EXTRACT_ALL is enabled.
486 # The default value is: NO.
487 
488 HIDE_UNDOC_CLASSES = YES
489 
490 # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
491 # (class|struct|union) declarations. If set to NO, these declarations will be
492 # included in the documentation.
493 # The default value is: NO.
494 
495 HIDE_FRIEND_COMPOUNDS = YES
496 
497 # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
498 # documentation blocks found inside the body of a function. If set to NO, these
499 # blocks will be appended to the function's detailed documentation block.
500 # The default value is: NO.
501 
502 HIDE_IN_BODY_DOCS = YES
503 
504 # The INTERNAL_DOCS tag determines if documentation that is typed after a
505 # \internal command is included. If the tag is set to NO then the documentation
506 # will be excluded. Set it to YES to include the internal documentation.
507 # The default value is: NO.
508 
509 INTERNAL_DOCS = NO
510 
511 # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
512 # names in lower-case letters. If set to YES, upper-case letters are also
513 # allowed. This is useful if you have classes or files whose names only differ
514 # in case and if your file system supports case sensitive file names. Windows
515 # and Mac users are advised to set this option to NO.
516 # The default value is: system dependent.
517 
518 CASE_SENSE_NAMES = YES
519 
520 # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
521 # their full class and namespace scopes in the documentation. If set to YES, the
522 # scope will be hidden.
523 # The default value is: NO.
524 
525 HIDE_SCOPE_NAMES = YES
526 
527 # If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
528 # append additional text to a page's title, such as Class Reference. If set to
529 # YES the compound reference will be hidden.
530 # The default value is: NO.
531 
532 HIDE_COMPOUND_REFERENCE= NO
533 
534 # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
535 # the files that are included by a file in the documentation of that file.
536 # The default value is: YES.
537 
538 SHOW_INCLUDE_FILES = NO
539 
540 # If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
541 # grouped member an include statement to the documentation, telling the reader
542 # which file to include in order to use the member.
543 # The default value is: NO.
544 
545 SHOW_GROUPED_MEMB_INC = NO
546 
547 # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
548 # files with double quotes in the documentation rather than with sharp brackets.
549 # The default value is: NO.
550 
551 FORCE_LOCAL_INCLUDES = NO
552 
553 # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
554 # documentation for inline members.
555 # The default value is: YES.
556 
557 INLINE_INFO = NO
558 
559 # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
560 # (detailed) documentation of file and class members alphabetically by member
561 # name. If set to NO, the members will appear in declaration order.
562 # The default value is: YES.
563 
564 SORT_MEMBER_DOCS = YES
565 
566 # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
567 # descriptions of file, namespace and class members alphabetically by member
568 # name. If set to NO, the members will appear in declaration order. Note that
569 # this will also influence the order of the classes in the class list.
570 # The default value is: NO.
571 
572 SORT_BRIEF_DOCS = YES
573 
574 # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
575 # (brief and detailed) documentation of class members so that constructors and
576 # destructors are listed first. If set to NO the constructors will appear in the
577 # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
578 # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
579 # member documentation.
580 # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
581 # detailed member documentation.
582 # The default value is: NO.
583 
584 SORT_MEMBERS_CTORS_1ST = NO
585 
586 # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
587 # of group names into alphabetical order. If set to NO the group names will
588 # appear in their defined order.
589 # The default value is: NO.
590 
591 SORT_GROUP_NAMES = NO
592 
593 # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
594 # fully-qualified names, including namespaces. If set to NO, the class list will
595 # be sorted only by class name, not including the namespace part.
596 # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
597 # Note: This option applies only to the class list, not to the alphabetical
598 # list.
599 # The default value is: NO.
600 
601 SORT_BY_SCOPE_NAME = YES
602 
603 # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
604 # type resolution of all parameters of a function it will reject a match between
605 # the prototype and the implementation of a member function even if there is
606 # only one candidate or it is obvious which candidate to choose by doing a
607 # simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
608 # accept a match between prototype and implementation in such cases.
609 # The default value is: NO.
610 
611 STRICT_PROTO_MATCHING = NO
612 
613 # The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
614 # list. This list is created by putting \todo commands in the documentation.
615 # The default value is: YES.
616 
617 GENERATE_TODOLIST = YES
618 
619 # The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
620 # list. This list is created by putting \test commands in the documentation.
621 # The default value is: YES.
622 
623 GENERATE_TESTLIST = YES
624 
625 # The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
626 # list. This list is created by putting \bug commands in the documentation.
627 # The default value is: YES.
628 
629 GENERATE_BUGLIST = YES
630 
631 # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
632 # the deprecated list. This list is created by putting \deprecated commands in
633 # the documentation.
634 # The default value is: YES.
635 
636 GENERATE_DEPRECATEDLIST= YES
637 
638 # The ENABLED_SECTIONS tag can be used to enable conditional documentation
639 # sections, marked by \if <section_label> ... \endif and \cond <section_label>
640 # ... \endcond blocks.
641 
642 ENABLED_SECTIONS =
643 
644 # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
645 # initial value of a variable or macro / define can have for it to appear in the
646 # documentation. If the initializer consists of more lines than specified here
647 # it will be hidden. Use a value of 0 to hide initializers completely. The
648 # appearance of the value of individual variables and macros / defines can be
649 # controlled using \showinitializer or \hideinitializer command in the
650 # documentation regardless of this setting.
651 # Minimum value: 0, maximum value: 10000, default value: 30.
652 
653 MAX_INITIALIZER_LINES = 30
654 
655 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
656 # the bottom of the documentation of classes and structs. If set to YES, the
657 # list will mention the files that were used to generate the documentation.
658 # The default value is: YES.
659 
660 SHOW_USED_FILES = NO
661 
662 # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
663 # will remove the Files entry from the Quick Index and from the Folder Tree View
664 # (if specified).
665 # The default value is: YES.
666 
667 SHOW_FILES = YES
668 
669 # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
670 # page. This will remove the Namespaces entry from the Quick Index and from the
671 # Folder Tree View (if specified).
672 # The default value is: YES.
673 
674 SHOW_NAMESPACES = YES
675 
676 # The FILE_VERSION_FILTER tag can be used to specify a program or script that
677 # doxygen should invoke to get the current version for each file (typically from
678 # the version control system). Doxygen will invoke the program by executing (via
679 # popen()) the command command input-file, where command is the value of the
680 # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
681 # by doxygen. Whatever the program writes to standard output is used as the file
682 # version. For an example see the documentation.
683 
684 FILE_VERSION_FILTER =
685 
686 # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
687 # by doxygen. The layout file controls the global structure of the generated
688 # output files in an output format independent way. To create the layout file
689 # that represents doxygen's defaults, run doxygen with the -l option. You can
690 # optionally specify a file name after the option, if omitted DoxygenLayout.xml
691 # will be used as the name of the layout file.
692 #
693 # Note that if you run doxygen from a directory containing a file called
694 # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
695 # tag is left empty.
696 
697 LAYOUT_FILE =
698 
699 # The CITE_BIB_FILES tag can be used to specify one or more bib files containing
700 # the reference definitions. This must be a list of .bib files. The .bib
701 # extension is automatically appended if omitted. This requires the bibtex tool
702 # to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
703 # For LaTeX the style of the bibliography can be controlled using
704 # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
705 # search path. See also \cite for info how to create references.
706 
707 CITE_BIB_FILES =
708 
709 #---------------------------------------------------------------------------
710 # Configuration options related to warning and progress messages
711 #---------------------------------------------------------------------------
712 
713 # The QUIET tag can be used to turn on/off the messages that are generated to
714 # standard output by doxygen. If QUIET is set to YES this implies that the
715 # messages are off.
716 # The default value is: NO.
717 
718 QUIET = NO
719 
720 # The WARNINGS tag can be used to turn on/off the warning messages that are
721 # generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
722 # this implies that the warnings are on.
723 #
724 # Tip: Turn warnings on while writing the documentation.
725 # The default value is: YES.
726 
727 WARNINGS = YES
728 
729 # If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
730 # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
731 # will automatically be disabled.
732 # The default value is: YES.
733 
734 WARN_IF_UNDOCUMENTED = YES
735 
736 # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
737 # potential errors in the documentation, such as not documenting some parameters
738 # in a documented function, or documenting parameters that don't exist or using
739 # markup commands wrongly.
740 # The default value is: YES.
741 
742 WARN_IF_DOC_ERROR = YES
743 
744 # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
745 # are documented, but have no documentation for their parameters or return
746 # value. If set to NO, doxygen will only warn about wrong or incomplete
747 # parameter documentation, but not about the absence of documentation.
748 # The default value is: NO.
749 
750 WARN_NO_PARAMDOC = NO
751 
752 # The WARN_FORMAT tag determines the format of the warning messages that doxygen
753 # can produce. The string should contain the $file, $line, and $text tags, which
754 # will be replaced by the file and line number from which the warning originated
755 # and the warning text. Optionally the format may contain $version, which will
756 # be replaced by the version of the file (if it could be obtained via
757 # FILE_VERSION_FILTER)
758 # The default value is: $file:$line: $text.
759 
760 WARN_FORMAT = "$file:$line: $text"
761 
762 # The WARN_LOGFILE tag can be used to specify a file to which warning and error
763 # messages should be written. If left blank the output is written to standard
764 # error (stderr).
765 
766 WARN_LOGFILE =
767 
768 #---------------------------------------------------------------------------
769 # Configuration options related to the input files
770 #---------------------------------------------------------------------------
771 
772 # The INPUT tag is used to specify the files and/or directories that contain
773 # documented source files. You may enter file names like myfile.cpp or
774 # directories like /usr/src/myproject. Separate the files or directories with
775 # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
776 # Note: If this tag is empty the current directory is searched.
777 
778 INPUT = ../glm \
779  .
780 
781 # This tag can be used to specify the character encoding of the source files
782 # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
783 # libiconv (or the iconv built into libc) for the transcoding. See the libiconv
784 # documentation (see: http://www.gnu.org/software/libiconv) for the list of
785 # possible encodings.
786 # The default value is: UTF-8.
787 
788 INPUT_ENCODING = UTF-8
789 
790 # If the value of the INPUT tag contains directories, you can use the
791 # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
792 # *.h) to filter out the source-files in the directories.
793 #
794 # Note that for custom extensions or not directly supported extensions you also
795 # need to set EXTENSION_MAPPING for the extension otherwise the files are not
796 # read by doxygen.
797 #
798 # If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
799 # *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
800 # *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
801 # *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd,
802 # *.vhdl, *.ucf, *.qsf, *.as and *.js.
803 
804 FILE_PATTERNS = *.hpp \
805  *.doxy
806 
807 # The RECURSIVE tag can be used to specify whether or not subdirectories should
808 # be searched for input files as well.
809 # The default value is: NO.
810 
811 RECURSIVE = YES
812 
813 # The EXCLUDE tag can be used to specify files and/or directories that should be
814 # excluded from the INPUT source files. This way you can easily exclude a
815 # subdirectory from a directory tree whose root is specified with the INPUT tag.
816 #
817 # Note that relative paths are relative to the directory from which doxygen is
818 # run.
819 
820 EXCLUDE =
821 
822 # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
823 # directories that are symbolic links (a Unix file system feature) are excluded
824 # from the input.
825 # The default value is: NO.
826 
827 EXCLUDE_SYMLINKS = NO
828 
829 # If the value of the INPUT tag contains directories, you can use the
830 # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
831 # certain files from those directories.
832 #
833 # Note that the wildcards are matched against the file with absolute path, so to
834 # exclude all test directories for example use the pattern */test/*
835 
836 EXCLUDE_PATTERNS =
837 
838 # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
839 # (namespaces, classes, functions, etc.) that should be excluded from the
840 # output. The symbol name can be a fully qualified name, a word, or if the
841 # wildcard * is used, a substring. Examples: ANamespace, AClass,
842 # AClass::ANamespace, ANamespace::*Test
843 #
844 # Note that the wildcards are matched against the file with absolute path, so to
845 # exclude all test directories use the pattern */test/*
846 
847 EXCLUDE_SYMBOLS =
848 
849 # The EXAMPLE_PATH tag can be used to specify one or more files or directories
850 # that contain example code fragments that are included (see the \include
851 # command).
852 
853 EXAMPLE_PATH =
854 
855 # If the value of the EXAMPLE_PATH tag contains directories, you can use the
856 # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
857 # *.h) to filter out the source-files in the directories. If left blank all
858 # files are included.
859 
860 EXAMPLE_PATTERNS = *
861 
862 # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
863 # searched for input files to be used with the \include or \dontinclude commands
864 # irrespective of the value of the RECURSIVE tag.
865 # The default value is: NO.
866 
867 EXAMPLE_RECURSIVE = NO
868 
869 # The IMAGE_PATH tag can be used to specify one or more files or directories
870 # that contain images that are to be included in the documentation (see the
871 # \image command).
872 
873 IMAGE_PATH =
874 
875 # The INPUT_FILTER tag can be used to specify a program that doxygen should
876 # invoke to filter for each input file. Doxygen will invoke the filter program
877 # by executing (via popen()) the command:
878 #
879 # <filter> <input-file>
880 #
881 # where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
882 # name of an input file. Doxygen will then use the output that the filter
883 # program writes to standard output. If FILTER_PATTERNS is specified, this tag
884 # will be ignored.
885 #
886 # Note that the filter must not add or remove lines; it is applied before the
887 # code is scanned, but not when the output code is generated. If lines are added
888 # or removed, the anchors will not be placed correctly.
889 
890 INPUT_FILTER =
891 
892 # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
893 # basis. Doxygen will compare the file name with each pattern and apply the
894 # filter if there is a match. The filters are a list of the form: pattern=filter
895 # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
896 # filters are used. If the FILTER_PATTERNS tag is empty or if none of the
897 # patterns match the file name, INPUT_FILTER is applied.
898 
899 FILTER_PATTERNS =
900 
901 # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
902 # INPUT_FILTER) will also be used to filter the input files that are used for
903 # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
904 # The default value is: NO.
905 
906 FILTER_SOURCE_FILES = NO
907 
908 # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
909 # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
910 # it is also possible to disable source filtering for a specific pattern using
911 # *.ext= (so without naming a filter).
912 # This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
913 
914 FILTER_SOURCE_PATTERNS =
915 
916 # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
917 # is part of the input, its contents will be placed on the main page
918 # (index.html). This can be useful if you have a project on for instance GitHub
919 # and want to reuse the introduction page also for the doxygen output.
920 
921 USE_MDFILE_AS_MAINPAGE =
922 
923 #---------------------------------------------------------------------------
924 # Configuration options related to source browsing
925 #---------------------------------------------------------------------------
926 
927 # If the SOURCE_BROWSER tag is set to YES then a list of source files will be
928 # generated. Documented entities will be cross-referenced with these sources.
929 #
930 # Note: To get rid of all source code in the generated output, make sure that
931 # also VERBATIM_HEADERS is set to NO.
932 # The default value is: NO.
933 
934 SOURCE_BROWSER = YES
935 
936 # Setting the INLINE_SOURCES tag to YES will include the body of functions,
937 # classes and enums directly into the documentation.
938 # The default value is: NO.
939 
940 INLINE_SOURCES = NO
941 
942 # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
943 # special comment blocks from generated source code fragments. Normal C, C++ and
944 # Fortran comments will always remain visible.
945 # The default value is: YES.
946 
947 STRIP_CODE_COMMENTS = YES
948 
949 # If the REFERENCED_BY_RELATION tag is set to YES then for each documented
950 # function all documented functions referencing it will be listed.
951 # The default value is: NO.
952 
953 REFERENCED_BY_RELATION = YES
954 
955 # If the REFERENCES_RELATION tag is set to YES then for each documented function
956 # all documented entities called/used by that function will be listed.
957 # The default value is: NO.
958 
959 REFERENCES_RELATION = YES
960 
961 # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
962 # to YES then the hyperlinks from functions in REFERENCES_RELATION and
963 # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
964 # link to the documentation.
965 # The default value is: YES.
966 
967 REFERENCES_LINK_SOURCE = YES
968 
969 # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
970 # source code will show a tooltip with additional information such as prototype,
971 # brief description and links to the definition and documentation. Since this
972 # will make the HTML file larger and loading of large files a bit slower, you
973 # can opt to disable this feature.
974 # The default value is: YES.
975 # This tag requires that the tag SOURCE_BROWSER is set to YES.
976 
977 SOURCE_TOOLTIPS = YES
978 
979 # If the USE_HTAGS tag is set to YES then the references to source code will
980 # point to the HTML generated by the htags(1) tool instead of doxygen built-in
981 # source browser. The htags tool is part of GNU's global source tagging system
982 # (see http://www.gnu.org/software/global/global.html). You will need version
983 # 4.8.6 or higher.
984 #
985 # To use it do the following:
986 # - Install the latest version of global
987 # - Enable SOURCE_BROWSER and USE_HTAGS in the config file
988 # - Make sure the INPUT points to the root of the source tree
989 # - Run doxygen as normal
990 #
991 # Doxygen will invoke htags (and that will in turn invoke gtags), so these
992 # tools must be available from the command line (i.e. in the search path).
993 #
994 # The result: instead of the source browser generated by doxygen, the links to
995 # source code will now point to the output of htags.
996 # The default value is: NO.
997 # This tag requires that the tag SOURCE_BROWSER is set to YES.
998 
999 USE_HTAGS = NO
1000 
1001 # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
1002 # verbatim copy of the header file for each class for which an include is
1003 # specified. Set to NO to disable this.
1004 # See also: Section \class.
1005 # The default value is: YES.
1006 
1007 VERBATIM_HEADERS = YES
1008 
1009 # If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
1010 # clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
1011 # cost of reduced performance. This can be particularly helpful with template
1012 # rich C++ code for which doxygen's built-in parser lacks the necessary type
1013 # information.
1014 # Note: The availability of this option depends on whether or not doxygen was
1015 # compiled with the --with-libclang option.
1016 # The default value is: NO.
1017 
1018 CLANG_ASSISTED_PARSING = NO
1019 
1020 # If clang assisted parsing is enabled you can provide the compiler with command
1021 # line options that you would normally use when invoking the compiler. Note that
1022 # the include paths will already be set by doxygen for the files and directories
1023 # specified with INPUT and INCLUDE_PATH.
1024 # This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
1025 
1026 CLANG_OPTIONS =
1027 
1028 #---------------------------------------------------------------------------
1029 # Configuration options related to the alphabetical class index
1030 #---------------------------------------------------------------------------
1031 
1032 # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
1033 # compounds will be generated. Enable this if the project contains a lot of
1034 # classes, structs, unions or interfaces.
1035 # The default value is: YES.
1036 
1037 ALPHABETICAL_INDEX = NO
1038 
1039 # The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
1040 # which the alphabetical index list will be split.
1041 # Minimum value: 1, maximum value: 20, default value: 5.
1042 # This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
1043 
1044 COLS_IN_ALPHA_INDEX = 5
1045 
1046 # In case all classes in a project start with a common prefix, all classes will
1047 # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
1048 # can be used to specify a prefix (or a list of prefixes) that should be ignored
1049 # while generating the index headers.
1050 # This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
1051 
1052 IGNORE_PREFIX =
1053 
1054 #---------------------------------------------------------------------------
1055 # Configuration options related to the HTML output
1056 #---------------------------------------------------------------------------
1057 
1058 # If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
1059 # The default value is: YES.
1060 
1061 GENERATE_HTML = YES
1062 
1063 # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
1064 # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
1065 # it.
1066 # The default directory is: html.
1067 # This tag requires that the tag GENERATE_HTML is set to YES.
1068 
1069 HTML_OUTPUT = html
1070 
1071 # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
1072 # generated HTML page (for example: .htm, .php, .asp).
1073 # The default value is: .html.
1074 # This tag requires that the tag GENERATE_HTML is set to YES.
1075 
1076 HTML_FILE_EXTENSION = .html
1077 
1078 # The HTML_HEADER tag can be used to specify a user-defined HTML header file for
1079 # each generated HTML page. If the tag is left blank doxygen will generate a
1080 # standard header.
1081 #
1082 # To get valid HTML the header file that includes any scripts and style sheets
1083 # that doxygen needs, which is dependent on the configuration options used (e.g.
1084 # the setting GENERATE_TREEVIEW). It is highly recommended to start with a
1085 # default header using
1086 # doxygen -w html new_header.html new_footer.html new_stylesheet.css
1087 # YourConfigFile
1088 # and then modify the file new_header.html. See also section "Doxygen usage"
1089 # for information on how to generate the default header that doxygen normally
1090 # uses.
1091 # Note: The header is subject to change so you typically have to regenerate the
1092 # default header when upgrading to a newer version of doxygen. For a description
1093 # of the possible markers and block names see the documentation.
1094 # This tag requires that the tag GENERATE_HTML is set to YES.
1095 
1096 HTML_HEADER =
1097 
1098 # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
1099 # generated HTML page. If the tag is left blank doxygen will generate a standard
1100 # footer. See HTML_HEADER for more information on how to generate a default
1101 # footer and what special commands can be used inside the footer. See also
1102 # section "Doxygen usage" for information on how to generate the default footer
1103 # that doxygen normally uses.
1104 # This tag requires that the tag GENERATE_HTML is set to YES.
1105 
1106 HTML_FOOTER =
1107 
1108 # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
1109 # sheet that is used by each HTML page. It can be used to fine-tune the look of
1110 # the HTML output. If left blank doxygen will generate a default style sheet.
1111 # See also section "Doxygen usage" for information on how to generate the style
1112 # sheet that doxygen normally uses.
1113 # Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
1114 # it is more robust and this tag (HTML_STYLESHEET) will in the future become
1115 # obsolete.
1116 # This tag requires that the tag GENERATE_HTML is set to YES.
1117 
1118 HTML_STYLESHEET =
1119 
1120 # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
1121 # cascading style sheets that are included after the standard style sheets
1122 # created by doxygen. Using this option one can overrule certain style aspects.
1123 # This is preferred over using HTML_STYLESHEET since it does not replace the
1124 # standard style sheet and is therefore more robust against future updates.
1125 # Doxygen will copy the style sheet files to the output directory.
1126 # Note: The order of the extra style sheet files is of importance (e.g. the last
1127 # style sheet in the list overrules the setting of the previous ones in the
1128 # list). For an example see the documentation.
1129 # This tag requires that the tag GENERATE_HTML is set to YES.
1130 
1131 HTML_EXTRA_STYLESHEET =
1132 
1133 # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
1134 # other source files which should be copied to the HTML output directory. Note
1135 # that these files will be copied to the base HTML output directory. Use the
1136 # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
1137 # files. In the HTML_STYLESHEET file, use the file name only. Also note that the
1138 # files will be copied as-is; there are no commands or markers available.
1139 # This tag requires that the tag GENERATE_HTML is set to YES.
1140 
1141 HTML_EXTRA_FILES =
1142 
1143 # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
1144 # will adjust the colors in the style sheet and background images according to
1145 # this color. Hue is specified as an angle on a colorwheel, see
1146 # http://en.wikipedia.org/wiki/Hue for more information. For instance the value
1147 # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
1148 # purple, and 360 is red again.
1149 # Minimum value: 0, maximum value: 359, default value: 220.
1150 # This tag requires that the tag GENERATE_HTML is set to YES.
1151 
1152 HTML_COLORSTYLE_HUE = 220
1153 
1154 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
1155 # in the HTML output. For a value of 0 the output will use grayscales only. A
1156 # value of 255 will produce the most vivid colors.
1157 # Minimum value: 0, maximum value: 255, default value: 100.
1158 # This tag requires that the tag GENERATE_HTML is set to YES.
1159 
1160 HTML_COLORSTYLE_SAT = 100
1161 
1162 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
1163 # luminance component of the colors in the HTML output. Values below 100
1164 # gradually make the output lighter, whereas values above 100 make the output
1165 # darker. The value divided by 100 is the actual gamma applied, so 80 represents
1166 # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
1167 # change the gamma.
1168 # Minimum value: 40, maximum value: 240, default value: 80.
1169 # This tag requires that the tag GENERATE_HTML is set to YES.
1170 
1171 HTML_COLORSTYLE_GAMMA = 80
1172 
1173 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
1174 # page will contain the date and time when the page was generated. Setting this
1175 # to YES can help to show when doxygen was last run and thus if the
1176 # documentation is up to date.
1177 # The default value is: NO.
1178 # This tag requires that the tag GENERATE_HTML is set to YES.
1179 
1180 HTML_TIMESTAMP = NO
1181 
1182 # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
1183 # documentation will contain sections that can be hidden and shown after the
1184 # page has loaded.
1185 # The default value is: NO.
1186 # This tag requires that the tag GENERATE_HTML is set to YES.
1187 
1188 HTML_DYNAMIC_SECTIONS = NO
1189 
1190 # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
1191 # shown in the various tree structured indices initially; the user can expand
1192 # and collapse entries dynamically later on. Doxygen will expand the tree to
1193 # such a level that at most the specified number of entries are visible (unless
1194 # a fully collapsed tree already exceeds this amount). So setting the number of
1195 # entries 1 will produce a full collapsed tree by default. 0 is a special value
1196 # representing an infinite number of entries and will result in a full expanded
1197 # tree by default.
1198 # Minimum value: 0, maximum value: 9999, default value: 100.
1199 # This tag requires that the tag GENERATE_HTML is set to YES.
1200 
1201 HTML_INDEX_NUM_ENTRIES = 100
1202 
1203 # If the GENERATE_DOCSET tag is set to YES, additional index files will be
1204 # generated that can be used as input for Apple's Xcode 3 integrated development
1205 # environment (see: http://developer.apple.com/tools/xcode/), introduced with
1206 # OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
1207 # Makefile in the HTML output directory. Running make will produce the docset in
1208 # that directory and running make install will install the docset in
1209 # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
1210 # startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
1211 # for more information.
1212 # The default value is: NO.
1213 # This tag requires that the tag GENERATE_HTML is set to YES.
1214 
1215 GENERATE_DOCSET = NO
1216 
1217 # This tag determines the name of the docset feed. A documentation feed provides
1218 # an umbrella under which multiple documentation sets from a single provider
1219 # (such as a company or product suite) can be grouped.
1220 # The default value is: Doxygen generated docs.
1221 # This tag requires that the tag GENERATE_DOCSET is set to YES.
1222 
1223 DOCSET_FEEDNAME = "Doxygen generated docs"
1224 
1225 # This tag specifies a string that should uniquely identify the documentation
1226 # set bundle. This should be a reverse domain-name style string, e.g.
1227 # com.mycompany.MyDocSet. Doxygen will append .docset to the name.
1228 # The default value is: org.doxygen.Project.
1229 # This tag requires that the tag GENERATE_DOCSET is set to YES.
1230 
1231 DOCSET_BUNDLE_ID = org.doxygen.Project
1232 
1233 # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
1234 # the documentation publisher. This should be a reverse domain-name style
1235 # string, e.g. com.mycompany.MyDocSet.documentation.
1236 # The default value is: org.doxygen.Publisher.
1237 # This tag requires that the tag GENERATE_DOCSET is set to YES.
1238 
1239 DOCSET_PUBLISHER_ID = org.doxygen.Publisher
1240 
1241 # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
1242 # The default value is: Publisher.
1243 # This tag requires that the tag GENERATE_DOCSET is set to YES.
1244 
1245 DOCSET_PUBLISHER_NAME = Publisher
1246 
1247 # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
1248 # additional HTML index files: index.hhp, index.hhc, and index.hhk. The
1249 # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
1250 # (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
1251 # Windows.
1252 #
1253 # The HTML Help Workshop contains a compiler that can convert all HTML output
1254 # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
1255 # files are now used as the Windows 98 help format, and will replace the old
1256 # Windows help format (.hlp) on all Windows platforms in the future. Compressed
1257 # HTML files also contain an index, a table of contents, and you can search for
1258 # words in the documentation. The HTML workshop also contains a viewer for
1259 # compressed HTML files.
1260 # The default value is: NO.
1261 # This tag requires that the tag GENERATE_HTML is set to YES.
1262 
1263 GENERATE_HTMLHELP = NO
1264 
1265 # The CHM_FILE tag can be used to specify the file name of the resulting .chm
1266 # file. You can add a path in front of the file if the result should not be
1267 # written to the html output directory.
1268 # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
1269 
1270 CHM_FILE =
1271 
1272 # The HHC_LOCATION tag can be used to specify the location (absolute path
1273 # including file name) of the HTML help compiler (hhc.exe). If non-empty,
1274 # doxygen will try to run the HTML help compiler on the generated index.hhp.
1275 # The file has to be specified with full path.
1276 # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
1277 
1278 HHC_LOCATION =
1279 
1280 # The GENERATE_CHI flag controls if a separate .chi index file is generated
1281 # (YES) or that it should be included in the master .chm file (NO).
1282 # The default value is: NO.
1283 # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
1284 
1285 GENERATE_CHI = NO
1286 
1287 # The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
1288 # and project file content.
1289 # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
1290 
1291 CHM_INDEX_ENCODING =
1292 
1293 # The BINARY_TOC flag controls whether a binary table of contents is generated
1294 # (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
1295 # enables the Previous and Next buttons.
1296 # The default value is: NO.
1297 # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
1298 
1299 BINARY_TOC = NO
1300 
1301 # The TOC_EXPAND flag can be set to YES to add extra items for group members to
1302 # the table of contents of the HTML help documentation and to the tree view.
1303 # The default value is: NO.
1304 # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
1305 
1306 TOC_EXPAND = NO
1307 
1308 # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
1309 # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
1310 # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
1311 # (.qch) of the generated HTML documentation.
1312 # The default value is: NO.
1313 # This tag requires that the tag GENERATE_HTML is set to YES.
1314 
1315 GENERATE_QHP = NO
1316 
1317 # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
1318 # the file name of the resulting .qch file. The path specified is relative to
1319 # the HTML output folder.
1320 # This tag requires that the tag GENERATE_QHP is set to YES.
1321 
1322 QCH_FILE =
1323 
1324 # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
1325 # Project output. For more information please see Qt Help Project / Namespace
1326 # (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
1327 # The default value is: org.doxygen.Project.
1328 # This tag requires that the tag GENERATE_QHP is set to YES.
1329 
1330 QHP_NAMESPACE = org.doxygen.Project
1331 
1332 # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
1333 # Help Project output. For more information please see Qt Help Project / Virtual
1334 # Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
1335 # folders).
1336 # The default value is: doc.
1337 # This tag requires that the tag GENERATE_QHP is set to YES.
1338 
1339 QHP_VIRTUAL_FOLDER = doc
1340 
1341 # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
1342 # filter to add. For more information please see Qt Help Project / Custom
1343 # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
1344 # filters).
1345 # This tag requires that the tag GENERATE_QHP is set to YES.
1346 
1347 QHP_CUST_FILTER_NAME =
1348 
1349 # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
1350 # custom filter to add. For more information please see Qt Help Project / Custom
1351 # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
1352 # filters).
1353 # This tag requires that the tag GENERATE_QHP is set to YES.
1354 
1355 QHP_CUST_FILTER_ATTRS =
1356 
1357 # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
1358 # project's filter section matches. Qt Help Project / Filter Attributes (see:
1359 # http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
1360 # This tag requires that the tag GENERATE_QHP is set to YES.
1361 
1362 QHP_SECT_FILTER_ATTRS =
1363 
1364 # The QHG_LOCATION tag can be used to specify the location of Qt's
1365 # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
1366 # generated .qhp file.
1367 # This tag requires that the tag GENERATE_QHP is set to YES.
1368 
1369 QHG_LOCATION =
1370 
1371 # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
1372 # generated, together with the HTML files, they form an Eclipse help plugin. To
1373 # install this plugin and make it available under the help contents menu in
1374 # Eclipse, the contents of the directory containing the HTML and XML files needs
1375 # to be copied into the plugins directory of eclipse. The name of the directory
1376 # within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
1377 # After copying Eclipse needs to be restarted before the help appears.
1378 # The default value is: NO.
1379 # This tag requires that the tag GENERATE_HTML is set to YES.
1380 
1381 GENERATE_ECLIPSEHELP = NO
1382 
1383 # A unique identifier for the Eclipse help plugin. When installing the plugin
1384 # the directory name containing the HTML and XML files should also have this
1385 # name. Each documentation set should have its own identifier.
1386 # The default value is: org.doxygen.Project.
1387 # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
1388 
1389 ECLIPSE_DOC_ID = org.doxygen.Project
1390 
1391 # If you want full control over the layout of the generated HTML pages it might
1392 # be necessary to disable the index and replace it with your own. The
1393 # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
1394 # of each HTML page. A value of NO enables the index and the value YES disables
1395 # it. Since the tabs in the index contain the same information as the navigation
1396 # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
1397 # The default value is: NO.
1398 # This tag requires that the tag GENERATE_HTML is set to YES.
1399 
1400 DISABLE_INDEX = NO
1401 
1402 # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
1403 # structure should be generated to display hierarchical information. If the tag
1404 # value is set to YES, a side panel will be generated containing a tree-like
1405 # index structure (just like the one that is generated for HTML Help). For this
1406 # to work a browser that supports JavaScript, DHTML, CSS and frames is required
1407 # (i.e. any modern browser). Windows users are probably better off using the
1408 # HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
1409 # further fine-tune the look of the index. As an example, the default style
1410 # sheet generated by doxygen has an example that shows how to put an image at
1411 # the root of the tree instead of the PROJECT_NAME. Since the tree basically has
1412 # the same information as the tab index, you could consider setting
1413 # DISABLE_INDEX to YES when enabling this option.
1414 # The default value is: NO.
1415 # This tag requires that the tag GENERATE_HTML is set to YES.
1416 
1417 GENERATE_TREEVIEW = NO
1418 
1419 # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
1420 # doxygen will group on one line in the generated HTML documentation.
1421 #
1422 # Note that a value of 0 will completely suppress the enum values from appearing
1423 # in the overview section.
1424 # Minimum value: 0, maximum value: 20, default value: 4.
1425 # This tag requires that the tag GENERATE_HTML is set to YES.
1426 
1427 ENUM_VALUES_PER_LINE = 4
1428 
1429 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
1430 # to set the initial width (in pixels) of the frame in which the tree is shown.
1431 # Minimum value: 0, maximum value: 1500, default value: 250.
1432 # This tag requires that the tag GENERATE_HTML is set to YES.
1433 
1434 TREEVIEW_WIDTH = 250
1435 
1436 # If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
1437 # external symbols imported via tag files in a separate window.
1438 # The default value is: NO.
1439 # This tag requires that the tag GENERATE_HTML is set to YES.
1440 
1441 EXT_LINKS_IN_WINDOW = NO
1442 
1443 # Use this tag to change the font size of LaTeX formulas included as images in
1444 # the HTML documentation. When you change the font size after a successful
1445 # doxygen run you need to manually remove any form_*.png images from the HTML
1446 # output directory to force them to be regenerated.
1447 # Minimum value: 8, maximum value: 50, default value: 10.
1448 # This tag requires that the tag GENERATE_HTML is set to YES.
1449 
1450 FORMULA_FONTSIZE = 10
1451 
1452 # Use the FORMULA_TRANPARENT tag to determine whether or not the images
1453 # generated for formulas are transparent PNGs. Transparent PNGs are not
1454 # supported properly for IE 6.0, but are supported on all modern browsers.
1455 #
1456 # Note that when changing this option you need to delete any form_*.png files in
1457 # the HTML output directory before the changes have effect.
1458 # The default value is: YES.
1459 # This tag requires that the tag GENERATE_HTML is set to YES.
1460 
1461 FORMULA_TRANSPARENT = YES
1462 
1463 # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
1464 # http://www.mathjax.org) which uses client side Javascript for the rendering
1465 # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
1466 # installed or if you want to formulas look prettier in the HTML output. When
1467 # enabled you may also need to install MathJax separately and configure the path
1468 # to it using the MATHJAX_RELPATH option.
1469 # The default value is: NO.
1470 # This tag requires that the tag GENERATE_HTML is set to YES.
1471 
1472 USE_MATHJAX = NO
1473 
1474 # When MathJax is enabled you can set the default output format to be used for
1475 # the MathJax output. See the MathJax site (see:
1476 # http://docs.mathjax.org/en/latest/output.html) for more details.
1477 # Possible values are: HTML-CSS (which is slower, but has the best
1478 # compatibility), NativeMML (i.e. MathML) and SVG.
1479 # The default value is: HTML-CSS.
1480 # This tag requires that the tag USE_MATHJAX is set to YES.
1481 
1482 MATHJAX_FORMAT = HTML-CSS
1483 
1484 # When MathJax is enabled you need to specify the location relative to the HTML
1485 # output directory using the MATHJAX_RELPATH option. The destination directory
1486 # should contain the MathJax.js script. For instance, if the mathjax directory
1487 # is located at the same level as the HTML output directory, then
1488 # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
1489 # Content Delivery Network so you can quickly see the result without installing
1490 # MathJax. However, it is strongly recommended to install a local copy of
1491 # MathJax from http://www.mathjax.org before deployment.
1492 # The default value is: http://cdn.mathjax.org/mathjax/latest.
1493 # This tag requires that the tag USE_MATHJAX is set to YES.
1494 
1495 MATHJAX_RELPATH = http://www.mathjax.org/mathjax
1496 
1497 # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
1498 # extension names that should be enabled during MathJax rendering. For example
1499 # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
1500 # This tag requires that the tag USE_MATHJAX is set to YES.
1501 
1502 MATHJAX_EXTENSIONS =
1503 
1504 # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
1505 # of code that will be used on startup of the MathJax code. See the MathJax site
1506 # (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
1507 # example see the documentation.
1508 # This tag requires that the tag USE_MATHJAX is set to YES.
1509 
1510 MATHJAX_CODEFILE =
1511 
1512 # When the SEARCHENGINE tag is enabled doxygen will generate a search box for
1513 # the HTML output. The underlying search engine uses javascript and DHTML and
1514 # should work on any modern browser. Note that when using HTML help
1515 # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
1516 # there is already a search function so this one should typically be disabled.
1517 # For large projects the javascript based search engine can be slow, then
1518 # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
1519 # search using the keyboard; to jump to the search box use <access key> + S
1520 # (what the <access key> is depends on the OS and browser, but it is typically
1521 # <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
1522 # key> to jump into the search results window, the results can be navigated
1523 # using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
1524 # the search. The filter options can be selected when the cursor is inside the
1525 # search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
1526 # to select a filter and <Enter> or <escape> to activate or cancel the filter
1527 # option.
1528 # The default value is: YES.
1529 # This tag requires that the tag GENERATE_HTML is set to YES.
1530 
1531 SEARCHENGINE = YES
1532 
1533 # When the SERVER_BASED_SEARCH tag is enabled the search engine will be
1534 # implemented using a web server instead of a web client using Javascript. There
1535 # are two flavors of web server based searching depending on the EXTERNAL_SEARCH
1536 # setting. When disabled, doxygen will generate a PHP script for searching and
1537 # an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
1538 # and searching needs to be provided by external tools. See the section
1539 # "External Indexing and Searching" for details.
1540 # The default value is: NO.
1541 # This tag requires that the tag SEARCHENGINE is set to YES.
1542 
1543 SERVER_BASED_SEARCH = NO
1544 
1545 # When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
1546 # script for searching. Instead the search results are written to an XML file
1547 # which needs to be processed by an external indexer. Doxygen will invoke an
1548 # external search engine pointed to by the SEARCHENGINE_URL option to obtain the
1549 # search results.
1550 #
1551 # Doxygen ships with an example indexer (doxyindexer) and search engine
1552 # (doxysearch.cgi) which are based on the open source search engine library
1553 # Xapian (see: http://xapian.org/).
1554 #
1555 # See the section "External Indexing and Searching" for details.
1556 # The default value is: NO.
1557 # This tag requires that the tag SEARCHENGINE is set to YES.
1558 
1559 EXTERNAL_SEARCH = NO
1560 
1561 # The SEARCHENGINE_URL should point to a search engine hosted by a web server
1562 # which will return the search results when EXTERNAL_SEARCH is enabled.
1563 #
1564 # Doxygen ships with an example indexer (doxyindexer) and search engine
1565 # (doxysearch.cgi) which are based on the open source search engine library
1566 # Xapian (see: http://xapian.org/). See the section "External Indexing and
1567 # Searching" for details.
1568 # This tag requires that the tag SEARCHENGINE is set to YES.
1569 
1570 SEARCHENGINE_URL =
1571 
1572 # When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
1573 # search data is written to a file for indexing by an external tool. With the
1574 # SEARCHDATA_FILE tag the name of this file can be specified.
1575 # The default file is: searchdata.xml.
1576 # This tag requires that the tag SEARCHENGINE is set to YES.
1577 
1578 SEARCHDATA_FILE = searchdata.xml
1579 
1580 # When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
1581 # EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
1582 # useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
1583 # projects and redirect the results back to the right project.
1584 # This tag requires that the tag SEARCHENGINE is set to YES.
1585 
1586 EXTERNAL_SEARCH_ID =
1587 
1588 # The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
1589 # projects other than the one defined by this configuration file, but that are
1590 # all added to the same external search index. Each project needs to have a
1591 # unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
1592 # to a relative location where the documentation can be found. The format is:
1593 # EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
1594 # This tag requires that the tag SEARCHENGINE is set to YES.
1595 
1596 EXTRA_SEARCH_MAPPINGS =
1597 
1598 #---------------------------------------------------------------------------
1599 # Configuration options related to the LaTeX output
1600 #---------------------------------------------------------------------------
1601 
1602 # If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
1603 # The default value is: YES.
1604 
1605 GENERATE_LATEX = NO
1606 
1607 # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
1608 # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
1609 # it.
1610 # The default directory is: latex.
1611 # This tag requires that the tag GENERATE_LATEX is set to YES.
1612 
1613 LATEX_OUTPUT = latex
1614 
1615 # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
1616 # invoked.
1617 #
1618 # Note that when enabling USE_PDFLATEX this option is only used for generating
1619 # bitmaps for formulas in the HTML output, but not in the Makefile that is
1620 # written to the output directory.
1621 # The default file is: latex.
1622 # This tag requires that the tag GENERATE_LATEX is set to YES.
1623 
1624 LATEX_CMD_NAME = latex
1625 
1626 # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
1627 # index for LaTeX.
1628 # The default file is: makeindex.
1629 # This tag requires that the tag GENERATE_LATEX is set to YES.
1630 
1631 MAKEINDEX_CMD_NAME = makeindex
1632 
1633 # If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
1634 # documents. This may be useful for small projects and may help to save some
1635 # trees in general.
1636 # The default value is: NO.
1637 # This tag requires that the tag GENERATE_LATEX is set to YES.
1638 
1639 COMPACT_LATEX = NO
1640 
1641 # The PAPER_TYPE tag can be used to set the paper type that is used by the
1642 # printer.
1643 # Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
1644 # 14 inches) and executive (7.25 x 10.5 inches).
1645 # The default value is: a4.
1646 # This tag requires that the tag GENERATE_LATEX is set to YES.
1647 
1648 PAPER_TYPE = a4wide
1649 
1650 # The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
1651 # that should be included in the LaTeX output. The package can be specified just
1652 # by its name or with the correct syntax as to be used with the LaTeX
1653 # \usepackage command. To get the times font for instance you can specify :
1654 # EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
1655 # To use the option intlimits with the amsmath package you can specify:
1656 # EXTRA_PACKAGES=[intlimits]{amsmath}
1657 # If left blank no extra packages will be included.
1658 # This tag requires that the tag GENERATE_LATEX is set to YES.
1659 
1660 EXTRA_PACKAGES =
1661 
1662 # The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
1663 # generated LaTeX document. The header should contain everything until the first
1664 # chapter. If it is left blank doxygen will generate a standard header. See
1665 # section "Doxygen usage" for information on how to let doxygen write the
1666 # default header to a separate file.
1667 #
1668 # Note: Only use a user-defined header if you know what you are doing! The
1669 # following commands have a special meaning inside the header: $title,
1670 # $datetime, $date, $doxygenversion, $projectname, $projectnumber,
1671 # $projectbrief, $projectlogo. Doxygen will replace $title with the empty
1672 # string, for the replacement values of the other commands the user is referred
1673 # to HTML_HEADER.
1674 # This tag requires that the tag GENERATE_LATEX is set to YES.
1675 
1676 LATEX_HEADER =
1677 
1678 # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
1679 # generated LaTeX document. The footer should contain everything after the last
1680 # chapter. If it is left blank doxygen will generate a standard footer. See
1681 # LATEX_HEADER for more information on how to generate a default footer and what
1682 # special commands can be used inside the footer.
1683 #
1684 # Note: Only use a user-defined footer if you know what you are doing!
1685 # This tag requires that the tag GENERATE_LATEX is set to YES.
1686 
1687 LATEX_FOOTER =
1688 
1689 # The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
1690 # LaTeX style sheets that are included after the standard style sheets created
1691 # by doxygen. Using this option one can overrule certain style aspects. Doxygen
1692 # will copy the style sheet files to the output directory.
1693 # Note: The order of the extra style sheet files is of importance (e.g. the last
1694 # style sheet in the list overrules the setting of the previous ones in the
1695 # list).
1696 # This tag requires that the tag GENERATE_LATEX is set to YES.
1697 
1698 LATEX_EXTRA_STYLESHEET =
1699 
1700 # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
1701 # other source files which should be copied to the LATEX_OUTPUT output
1702 # directory. Note that the files will be copied as-is; there are no commands or
1703 # markers available.
1704 # This tag requires that the tag GENERATE_LATEX is set to YES.
1705 
1706 LATEX_EXTRA_FILES =
1707 
1708 # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
1709 # prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
1710 # contain links (just like the HTML output) instead of page references. This
1711 # makes the output suitable for online browsing using a PDF viewer.
1712 # The default value is: YES.
1713 # This tag requires that the tag GENERATE_LATEX is set to YES.
1714 
1715 PDF_HYPERLINKS = NO
1716 
1717 # If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
1718 # the PDF file directly from the LaTeX files. Set this option to YES, to get a
1719 # higher quality PDF documentation.
1720 # The default value is: YES.
1721 # This tag requires that the tag GENERATE_LATEX is set to YES.
1722 
1723 USE_PDFLATEX = YES
1724 
1725 # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
1726 # command to the generated LaTeX files. This will instruct LaTeX to keep running
1727 # if errors occur, instead of asking the user for help. This option is also used
1728 # when generating formulas in HTML.
1729 # The default value is: NO.
1730 # This tag requires that the tag GENERATE_LATEX is set to YES.
1731 
1732 LATEX_BATCHMODE = NO
1733 
1734 # If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
1735 # index chapters (such as File Index, Compound Index, etc.) in the output.
1736 # The default value is: NO.
1737 # This tag requires that the tag GENERATE_LATEX is set to YES.
1738 
1739 LATEX_HIDE_INDICES = NO
1740 
1741 # If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
1742 # code with syntax highlighting in the LaTeX output.
1743 #
1744 # Note that which sources are shown also depends on other settings such as
1745 # SOURCE_BROWSER.
1746 # The default value is: NO.
1747 # This tag requires that the tag GENERATE_LATEX is set to YES.
1748 
1749 LATEX_SOURCE_CODE = NO
1750 
1751 # The LATEX_BIB_STYLE tag can be used to specify the style to use for the
1752 # bibliography, e.g. plainnat, or ieeetr. See
1753 # http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
1754 # The default value is: plain.
1755 # This tag requires that the tag GENERATE_LATEX is set to YES.
1756 
1757 LATEX_BIB_STYLE = plain
1758 
1759 #---------------------------------------------------------------------------
1760 # Configuration options related to the RTF output
1761 #---------------------------------------------------------------------------
1762 
1763 # If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
1764 # RTF output is optimized for Word 97 and may not look too pretty with other RTF
1765 # readers/editors.
1766 # The default value is: NO.
1767 
1768 GENERATE_RTF = NO
1769 
1770 # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
1771 # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
1772 # it.
1773 # The default directory is: rtf.
1774 # This tag requires that the tag GENERATE_RTF is set to YES.
1775 
1776 RTF_OUTPUT = glm.rtf
1777 
1778 # If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
1779 # documents. This may be useful for small projects and may help to save some
1780 # trees in general.
1781 # The default value is: NO.
1782 # This tag requires that the tag GENERATE_RTF is set to YES.
1783 
1784 COMPACT_RTF = NO
1785 
1786 # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
1787 # contain hyperlink fields. The RTF file will contain links (just like the HTML
1788 # output) instead of page references. This makes the output suitable for online
1789 # browsing using Word or some other Word compatible readers that support those
1790 # fields.
1791 #
1792 # Note: WordPad (write) and others do not support links.
1793 # The default value is: NO.
1794 # This tag requires that the tag GENERATE_RTF is set to YES.
1795 
1796 RTF_HYPERLINKS = YES
1797 
1798 # Load stylesheet definitions from file. Syntax is similar to doxygen's config
1799 # file, i.e. a series of assignments. You only have to provide replacements,
1800 # missing definitions are set to their default value.
1801 #
1802 # See also section "Doxygen usage" for information on how to generate the
1803 # default style sheet that doxygen normally uses.
1804 # This tag requires that the tag GENERATE_RTF is set to YES.
1805 
1806 RTF_STYLESHEET_FILE =
1807 
1808 # Set optional variables used in the generation of an RTF document. Syntax is
1809 # similar to doxygen's config file. A template extensions file can be generated
1810 # using doxygen -e rtf extensionFile.
1811 # This tag requires that the tag GENERATE_RTF is set to YES.
1812 
1813 RTF_EXTENSIONS_FILE =
1814 
1815 # If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
1816 # with syntax highlighting in the RTF output.
1817 #
1818 # Note that which sources are shown also depends on other settings such as
1819 # SOURCE_BROWSER.
1820 # The default value is: NO.
1821 # This tag requires that the tag GENERATE_RTF is set to YES.
1822 
1823 RTF_SOURCE_CODE = NO
1824 
1825 #---------------------------------------------------------------------------
1826 # Configuration options related to the man page output
1827 #---------------------------------------------------------------------------
1828 
1829 # If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
1830 # classes and files.
1831 # The default value is: NO.
1832 
1833 GENERATE_MAN = NO
1834 
1835 # The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
1836 # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
1837 # it. A directory man3 will be created inside the directory specified by
1838 # MAN_OUTPUT.
1839 # The default directory is: man.
1840 # This tag requires that the tag GENERATE_MAN is set to YES.
1841 
1842 MAN_OUTPUT = man
1843 
1844 # The MAN_EXTENSION tag determines the extension that is added to the generated
1845 # man pages. In case the manual section does not start with a number, the number
1846 # 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
1847 # optional.
1848 # The default value is: .3.
1849 # This tag requires that the tag GENERATE_MAN is set to YES.
1850 
1851 MAN_EXTENSION = .3
1852 
1853 # The MAN_SUBDIR tag determines the name of the directory created within
1854 # MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
1855 # MAN_EXTENSION with the initial . removed.
1856 # This tag requires that the tag GENERATE_MAN is set to YES.
1857 
1858 MAN_SUBDIR =
1859 
1860 # If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
1861 # will generate one additional man file for each entity documented in the real
1862 # man page(s). These additional files only source the real man page, but without
1863 # them the man command would be unable to find the correct page.
1864 # The default value is: NO.
1865 # This tag requires that the tag GENERATE_MAN is set to YES.
1866 
1867 MAN_LINKS = NO
1868 
1869 #---------------------------------------------------------------------------
1870 # Configuration options related to the XML output
1871 #---------------------------------------------------------------------------
1872 
1873 # If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
1874 # captures the structure of the code including all documentation.
1875 # The default value is: NO.
1876 
1877 GENERATE_XML = NO
1878 
1879 # The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
1880 # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
1881 # it.
1882 # The default directory is: xml.
1883 # This tag requires that the tag GENERATE_XML is set to YES.
1884 
1885 XML_OUTPUT = xml
1886 
1887 # If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
1888 # listings (including syntax highlighting and cross-referencing information) to
1889 # the XML output. Note that enabling this will significantly increase the size
1890 # of the XML output.
1891 # The default value is: YES.
1892 # This tag requires that the tag GENERATE_XML is set to YES.
1893 
1894 XML_PROGRAMLISTING = YES
1895 
1896 #---------------------------------------------------------------------------
1897 # Configuration options related to the DOCBOOK output
1898 #---------------------------------------------------------------------------
1899 
1900 # If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
1901 # that can be used to generate PDF.
1902 # The default value is: NO.
1903 
1904 GENERATE_DOCBOOK = NO
1905 
1906 # The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
1907 # If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
1908 # front of it.
1909 # The default directory is: docbook.
1910 # This tag requires that the tag GENERATE_DOCBOOK is set to YES.
1911 
1912 DOCBOOK_OUTPUT = docbook
1913 
1914 # If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
1915 # program listings (including syntax highlighting and cross-referencing
1916 # information) to the DOCBOOK output. Note that enabling this will significantly
1917 # increase the size of the DOCBOOK output.
1918 # The default value is: NO.
1919 # This tag requires that the tag GENERATE_DOCBOOK is set to YES.
1920 
1921 DOCBOOK_PROGRAMLISTING = NO
1922 
1923 #---------------------------------------------------------------------------
1924 # Configuration options for the AutoGen Definitions output
1925 #---------------------------------------------------------------------------
1926 
1927 # If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
1928 # AutoGen Definitions (see http://autogen.sf.net) file that captures the
1929 # structure of the code including all documentation. Note that this feature is
1930 # still experimental and incomplete at the moment.
1931 # The default value is: NO.
1932 
1933 GENERATE_AUTOGEN_DEF = NO
1934 
1935 #---------------------------------------------------------------------------
1936 # Configuration options related to the Perl module output
1937 #---------------------------------------------------------------------------
1938 
1939 # If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
1940 # file that captures the structure of the code including all documentation.
1941 #
1942 # Note that this feature is still experimental and incomplete at the moment.
1943 # The default value is: NO.
1944 
1945 GENERATE_PERLMOD = NO
1946 
1947 # If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
1948 # Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
1949 # output from the Perl module output.
1950 # The default value is: NO.
1951 # This tag requires that the tag GENERATE_PERLMOD is set to YES.
1952 
1953 PERLMOD_LATEX = NO
1954 
1955 # If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
1956 # formatted so it can be parsed by a human reader. This is useful if you want to
1957 # understand what is going on. On the other hand, if this tag is set to NO, the
1958 # size of the Perl module output will be much smaller and Perl will parse it
1959 # just the same.
1960 # The default value is: YES.
1961 # This tag requires that the tag GENERATE_PERLMOD is set to YES.
1962 
1963 PERLMOD_PRETTY = YES
1964 
1965 # The names of the make variables in the generated doxyrules.make file are
1966 # prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
1967 # so different doxyrules.make files included by the same Makefile don't
1968 # overwrite each other's variables.
1969 # This tag requires that the tag GENERATE_PERLMOD is set to YES.
1970 
1971 PERLMOD_MAKEVAR_PREFIX =
1972 
1973 #---------------------------------------------------------------------------
1974 # Configuration options related to the preprocessor
1975 #---------------------------------------------------------------------------
1976 
1977 # If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
1978 # C-preprocessor directives found in the sources and include files.
1979 # The default value is: YES.
1980 
1981 ENABLE_PREPROCESSING = YES
1982 
1983 # If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
1984 # in the source code. If set to NO, only conditional compilation will be
1985 # performed. Macro expansion can be done in a controlled way by setting
1986 # EXPAND_ONLY_PREDEF to YES.
1987 # The default value is: NO.
1988 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
1989 
1990 MACRO_EXPANSION = NO
1991 
1992 # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
1993 # the macro expansion is limited to the macros specified with the PREDEFINED and
1994 # EXPAND_AS_DEFINED tags.
1995 # The default value is: NO.
1996 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
1997 
1998 EXPAND_ONLY_PREDEF = NO
1999 
2000 # If the SEARCH_INCLUDES tag is set to YES, the include files in the
2001 # INCLUDE_PATH will be searched if a #include is found.
2002 # The default value is: YES.
2003 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
2004 
2005 SEARCH_INCLUDES = YES
2006 
2007 # The INCLUDE_PATH tag can be used to specify one or more directories that
2008 # contain include files that are not input files but should be processed by the
2009 # preprocessor.
2010 # This tag requires that the tag SEARCH_INCLUDES is set to YES.
2011 
2012 INCLUDE_PATH =
2013 
2014 # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
2015 # patterns (like *.h and *.hpp) to filter out the header-files in the
2016 # directories. If left blank, the patterns specified with FILE_PATTERNS will be
2017 # used.
2018 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
2019 
2020 INCLUDE_FILE_PATTERNS =
2021 
2022 # The PREDEFINED tag can be used to specify one or more macro names that are
2023 # defined before the preprocessor is started (similar to the -D option of e.g.
2024 # gcc). The argument of the tag is a list of macros of the form: name or
2025 # name=definition (no spaces). If the definition and the "=" are omitted, "=1"
2026 # is assumed. To prevent a macro definition from being undefined via #undef or
2027 # recursively expanded use the := operator instead of the = operator.
2028 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
2029 
2030 PREDEFINED =
2031 
2032 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
2033 # tag can be used to specify a list of macro names that should be expanded. The
2034 # macro definition that is found in the sources will be used. Use the PREDEFINED
2035 # tag if you want to use a different macro definition that overrules the
2036 # definition found in the source code.
2037 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
2038 
2039 EXPAND_AS_DEFINED =
2040 
2041 # If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
2042 # remove all references to function-like macros that are alone on a line, have
2043 # an all uppercase name, and do not end with a semicolon. Such function macros
2044 # are typically used for boiler-plate code, and will confuse the parser if not
2045 # removed.
2046 # The default value is: YES.
2047 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
2048 
2049 SKIP_FUNCTION_MACROS = YES
2050 
2051 #---------------------------------------------------------------------------
2052 # Configuration options related to external references
2053 #---------------------------------------------------------------------------
2054 
2055 # The TAGFILES tag can be used to specify one or more tag files. For each tag
2056 # file the location of the external documentation should be added. The format of
2057 # a tag file without this location is as follows:
2058 # TAGFILES = file1 file2 ...
2059 # Adding location for the tag files is done as follows:
2060 # TAGFILES = file1=loc1 "file2 = loc2" ...
2061 # where loc1 and loc2 can be relative or absolute paths or URLs. See the
2062 # section "Linking to external documentation" for more information about the use
2063 # of tag files.
2064 # Note: Each tag file must have a unique name (where the name does NOT include
2065 # the path). If a tag file is not located in the directory in which doxygen is
2066 # run, you must also specify the path to the tagfile here.
2067 
2068 TAGFILES =
2069 
2070 # When a file name is specified after GENERATE_TAGFILE, doxygen will create a
2071 # tag file that is based on the input files it reads. See section "Linking to
2072 # external documentation" for more information about the usage of tag files.
2073 
2074 GENERATE_TAGFILE =
2075 
2076 # If the ALLEXTERNALS tag is set to YES, all external class will be listed in
2077 # the class index. If set to NO, only the inherited external classes will be
2078 # listed.
2079 # The default value is: NO.
2080 
2081 ALLEXTERNALS = NO
2082 
2083 # If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
2084 # in the modules index. If set to NO, only the current project's groups will be
2085 # listed.
2086 # The default value is: YES.
2087 
2088 EXTERNAL_GROUPS = YES
2089 
2090 # If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
2091 # the related pages index. If set to NO, only the current project's pages will
2092 # be listed.
2093 # The default value is: YES.
2094 
2095 EXTERNAL_PAGES = YES
2096 
2097 # The PERL_PATH should be the absolute path and name of the perl script
2098 # interpreter (i.e. the result of 'which perl').
2099 # The default file (with absolute path) is: /usr/bin/perl.
2100 
2101 PERL_PATH = /usr/bin/perl
2102 
2103 #---------------------------------------------------------------------------
2104 # Configuration options related to the dot tool
2105 #---------------------------------------------------------------------------
2106 
2107 # If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
2108 # (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
2109 # NO turns the diagrams off. Note that this option also works with HAVE_DOT
2110 # disabled, but it is recommended to install and use dot, since it yields more
2111 # powerful graphs.
2112 # The default value is: YES.
2113 
2114 CLASS_DIAGRAMS = YES
2115 
2116 # You can define message sequence charts within doxygen comments using the \msc
2117 # command. Doxygen will then run the mscgen tool (see:
2118 # http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
2119 # documentation. The MSCGEN_PATH tag allows you to specify the directory where
2120 # the mscgen tool resides. If left empty the tool is assumed to be found in the
2121 # default search path.
2122 
2123 MSCGEN_PATH =
2124 
2125 # You can include diagrams made with dia in doxygen documentation. Doxygen will
2126 # then run dia to produce the diagram and insert it in the documentation. The
2127 # DIA_PATH tag allows you to specify the directory where the dia binary resides.
2128 # If left empty dia is assumed to be found in the default search path.
2129 
2130 DIA_PATH =
2131 
2132 # If set to YES the inheritance and collaboration graphs will hide inheritance
2133 # and usage relations if the target is undocumented or is not a class.
2134 # The default value is: YES.
2135 
2136 HIDE_UNDOC_RELATIONS = YES
2137 
2138 # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
2139 # available from the path. This tool is part of Graphviz (see:
2140 # http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
2141 # Bell Labs. The other options in this section have no effect if this option is
2142 # set to NO
2143 # The default value is: NO.
2144 
2145 HAVE_DOT = NO
2146 
2147 # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
2148 # to run in parallel. When set to 0 doxygen will base this on the number of
2149 # processors available in the system. You can set it explicitly to a value
2150 # larger than 0 to get control over the balance between CPU load and processing
2151 # speed.
2152 # Minimum value: 0, maximum value: 32, default value: 0.
2153 # This tag requires that the tag HAVE_DOT is set to YES.
2154 
2155 DOT_NUM_THREADS = 0
2156 
2157 # When you want a differently looking font in the dot files that doxygen
2158 # generates you can specify the font name using DOT_FONTNAME. You need to make
2159 # sure dot is able to find the font, which can be done by putting it in a
2160 # standard location or by setting the DOTFONTPATH environment variable or by
2161 # setting DOT_FONTPATH to the directory containing the font.
2162 # The default value is: Helvetica.
2163 # This tag requires that the tag HAVE_DOT is set to YES.
2164 
2165 DOT_FONTNAME = Helvetica
2166 
2167 # The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
2168 # dot graphs.
2169 # Minimum value: 4, maximum value: 24, default value: 10.
2170 # This tag requires that the tag HAVE_DOT is set to YES.
2171 
2172 DOT_FONTSIZE = 10
2173 
2174 # By default doxygen will tell dot to use the default font as specified with
2175 # DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
2176 # the path where dot can find it using this tag.
2177 # This tag requires that the tag HAVE_DOT is set to YES.
2178 
2179 DOT_FONTPATH =
2180 
2181 # If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
2182 # each documented class showing the direct and indirect inheritance relations.
2183 # Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
2184 # The default value is: YES.
2185 # This tag requires that the tag HAVE_DOT is set to YES.
2186 
2187 CLASS_GRAPH = YES
2188 
2189 # If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
2190 # graph for each documented class showing the direct and indirect implementation
2191 # dependencies (inheritance, containment, and class references variables) of the
2192 # class with other documented classes.
2193 # The default value is: YES.
2194 # This tag requires that the tag HAVE_DOT is set to YES.
2195 
2196 COLLABORATION_GRAPH = YES
2197 
2198 # If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
2199 # groups, showing the direct groups dependencies.
2200 # The default value is: YES.
2201 # This tag requires that the tag HAVE_DOT is set to YES.
2202 
2203 GROUP_GRAPHS = YES
2204 
2205 # If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
2206 # collaboration diagrams in a style similar to the OMG's Unified Modeling
2207 # Language.
2208 # The default value is: NO.
2209 # This tag requires that the tag HAVE_DOT is set to YES.
2210 
2211 UML_LOOK = NO
2212 
2213 # If the UML_LOOK tag is enabled, the fields and methods are shown inside the
2214 # class node. If there are many fields or methods and many nodes the graph may
2215 # become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
2216 # number of items for each type to make the size more manageable. Set this to 0
2217 # for no limit. Note that the threshold may be exceeded by 50% before the limit
2218 # is enforced. So when you set the threshold to 10, up to 15 fields may appear,
2219 # but if the number exceeds 15, the total amount of fields shown is limited to
2220 # 10.
2221 # Minimum value: 0, maximum value: 100, default value: 10.
2222 # This tag requires that the tag HAVE_DOT is set to YES.
2223 
2224 UML_LIMIT_NUM_FIELDS = 10
2225 
2226 # If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
2227 # collaboration graphs will show the relations between templates and their
2228 # instances.
2229 # The default value is: NO.
2230 # This tag requires that the tag HAVE_DOT is set to YES.
2231 
2232 TEMPLATE_RELATIONS = NO
2233 
2234 # If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
2235 # YES then doxygen will generate a graph for each documented file showing the
2236 # direct and indirect include dependencies of the file with other documented
2237 # files.
2238 # The default value is: YES.
2239 # This tag requires that the tag HAVE_DOT is set to YES.
2240 
2241 INCLUDE_GRAPH = YES
2242 
2243 # If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
2244 # set to YES then doxygen will generate a graph for each documented file showing
2245 # the direct and indirect include dependencies of the file with other documented
2246 # files.
2247 # The default value is: YES.
2248 # This tag requires that the tag HAVE_DOT is set to YES.
2249 
2250 INCLUDED_BY_GRAPH = YES
2251 
2252 # If the CALL_GRAPH tag is set to YES then doxygen will generate a call
2253 # dependency graph for every global function or class method.
2254 #
2255 # Note that enabling this option will significantly increase the time of a run.
2256 # So in most cases it will be better to enable call graphs for selected
2257 # functions only using the \callgraph command. Disabling a call graph can be
2258 # accomplished by means of the command \hidecallgraph.
2259 # The default value is: NO.
2260 # This tag requires that the tag HAVE_DOT is set to YES.
2261 
2262 CALL_GRAPH = YES
2263 
2264 # If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
2265 # dependency graph for every global function or class method.
2266 #
2267 # Note that enabling this option will significantly increase the time of a run.
2268 # So in most cases it will be better to enable caller graphs for selected
2269 # functions only using the \callergraph command. Disabling a caller graph can be
2270 # accomplished by means of the command \hidecallergraph.
2271 # The default value is: NO.
2272 # This tag requires that the tag HAVE_DOT is set to YES.
2273 
2274 CALLER_GRAPH = YES
2275 
2276 # If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
2277 # hierarchy of all classes instead of a textual one.
2278 # The default value is: YES.
2279 # This tag requires that the tag HAVE_DOT is set to YES.
2280 
2281 GRAPHICAL_HIERARCHY = YES
2282 
2283 # If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
2284 # dependencies a directory has on other directories in a graphical way. The
2285 # dependency relations are determined by the #include relations between the
2286 # files in the directories.
2287 # The default value is: YES.
2288 # This tag requires that the tag HAVE_DOT is set to YES.
2289 
2290 DIRECTORY_GRAPH = YES
2291 
2292 # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
2293 # generated by dot. For an explanation of the image formats see the section
2294 # output formats in the documentation of the dot tool (Graphviz (see:
2295 # http://www.graphviz.org/)).
2296 # Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
2297 # to make the SVG files visible in IE 9+ (other browsers do not have this
2298 # requirement).
2299 # Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo,
2300 # png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
2301 # png:gdiplus:gdiplus.
2302 # The default value is: png.
2303 # This tag requires that the tag HAVE_DOT is set to YES.
2304 
2305 DOT_IMAGE_FORMAT = png
2306 
2307 # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
2308 # enable generation of interactive SVG images that allow zooming and panning.
2309 #
2310 # Note that this requires a modern browser other than Internet Explorer. Tested
2311 # and working are Firefox, Chrome, Safari, and Opera.
2312 # Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
2313 # the SVG files visible. Older versions of IE do not have SVG support.
2314 # The default value is: NO.
2315 # This tag requires that the tag HAVE_DOT is set to YES.
2316 
2317 INTERACTIVE_SVG = NO
2318 
2319 # The DOT_PATH tag can be used to specify the path where the dot tool can be
2320 # found. If left blank, it is assumed the dot tool can be found in the path.
2321 # This tag requires that the tag HAVE_DOT is set to YES.
2322 
2323 DOT_PATH =
2324 
2325 # The DOTFILE_DIRS tag can be used to specify one or more directories that
2326 # contain dot files that are included in the documentation (see the \dotfile
2327 # command).
2328 # This tag requires that the tag HAVE_DOT is set to YES.
2329 
2330 DOTFILE_DIRS =
2331 
2332 # The MSCFILE_DIRS tag can be used to specify one or more directories that
2333 # contain msc files that are included in the documentation (see the \mscfile
2334 # command).
2335 
2336 MSCFILE_DIRS =
2337 
2338 # The DIAFILE_DIRS tag can be used to specify one or more directories that
2339 # contain dia files that are included in the documentation (see the \diafile
2340 # command).
2341 
2342 DIAFILE_DIRS =
2343 
2344 # When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
2345 # path where java can find the plantuml.jar file. If left blank, it is assumed
2346 # PlantUML is not used or called during a preprocessing step. Doxygen will
2347 # generate a warning when it encounters a \startuml command in this case and
2348 # will not generate output for the diagram.
2349 
2350 PLANTUML_JAR_PATH =
2351 
2352 # When using plantuml, the specified paths are searched for files specified by
2353 # the !include statement in a plantuml block.
2354 
2355 PLANTUML_INCLUDE_PATH =
2356 
2357 # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
2358 # that will be shown in the graph. If the number of nodes in a graph becomes
2359 # larger than this value, doxygen will truncate the graph, which is visualized
2360 # by representing a node as a red box. Note that doxygen if the number of direct
2361 # children of the root node in a graph is already larger than
2362 # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
2363 # the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
2364 # Minimum value: 0, maximum value: 10000, default value: 50.
2365 # This tag requires that the tag HAVE_DOT is set to YES.
2366 
2367 DOT_GRAPH_MAX_NODES = 50
2368 
2369 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
2370 # generated by dot. A depth value of 3 means that only nodes reachable from the
2371 # root by following a path via at most 3 edges will be shown. Nodes that lay
2372 # further from the root node will be omitted. Note that setting this option to 1
2373 # or 2 may greatly reduce the computation time needed for large code bases. Also
2374 # note that the size of a graph can be further restricted by
2375 # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
2376 # Minimum value: 0, maximum value: 1000, default value: 0.
2377 # This tag requires that the tag HAVE_DOT is set to YES.
2378 
2379 MAX_DOT_GRAPH_DEPTH = 1000
2380 
2381 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
2382 # background. This is disabled by default, because dot on Windows does not seem
2383 # to support this out of the box.
2384 #
2385 # Warning: Depending on the platform used, enabling this option may lead to
2386 # badly anti-aliased labels on the edges of a graph (i.e. they become hard to
2387 # read).
2388 # The default value is: NO.
2389 # This tag requires that the tag HAVE_DOT is set to YES.
2390 
2391 DOT_TRANSPARENT = NO
2392 
2393 # Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
2394 # files in one run (i.e. multiple -o and -T options on the command line). This
2395 # makes dot run faster, but since only newer versions of dot (>1.8.10) support
2396 # this, this feature is disabled by default.
2397 # The default value is: NO.
2398 # This tag requires that the tag HAVE_DOT is set to YES.
2399 
2400 DOT_MULTI_TARGETS = NO
2401 
2402 # If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
2403 # explaining the meaning of the various boxes and arrows in the dot generated
2404 # graphs.
2405 # The default value is: YES.
2406 # This tag requires that the tag HAVE_DOT is set to YES.
2407 
2408 GENERATE_LEGEND = YES
2409 
2410 # If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
2411 # files that are used to generate the various graphs.
2412 # The default value is: YES.
2413 # This tag requires that the tag HAVE_DOT is set to YES.
2414 
2415 DOT_CLEANUP = YES
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a00662.html b/common/glm/doc/api/a00662.html new file mode 100644 index 000000000..982f7dba1 --- /dev/null +++ b/common/glm/doc/api/a00662.html @@ -0,0 +1,1605 @@ + + + + + + + +0.9.9 API documenation: Common functions + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
Common functions
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType abs (genType x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > abs (vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > ceil (vec< L, T, Q > const &x)
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType clamp (genType x, genType minVal, genType maxVal)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > clamp (vec< L, T, Q > const &x, T minVal, T maxVal)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > clamp (vec< L, T, Q > const &x, vec< L, T, Q > const &minVal, vec< L, T, Q > const &maxVal)
 
GLM_FUNC_DECL int floatBitsToInt (float const &v)
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL vec< L, int, Q > floatBitsToInt (vec< L, float, Q > const &v)
 
GLM_FUNC_DECL uint floatBitsToUint (float const &v)
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL vec< L, uint, Q > floatBitsToUint (vec< L, float, Q > const &v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > floor (vec< L, T, Q > const &x)
 
template<typename genType >
GLM_FUNC_DECL genType fma (genType const &a, genType const &b, genType const &c)
 
template<typename genType >
GLM_FUNC_DECL genType fract (genType x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fract (vec< L, T, Q > const &x)
 
template<typename genType , typename genIType >
GLM_FUNC_DECL genType frexp (genType const &x, genIType &exp)
 
GLM_FUNC_DECL float intBitsToFloat (int const &v)
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL vec< L, float, Q > intBitsToFloat (vec< L, int, Q > const &v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, bool, Q > isinf (vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, bool, Q > isnan (vec< L, T, Q > const &x)
 
template<typename genType , typename genIType >
GLM_FUNC_DECL genType ldexp (genType const &x, genIType const &exp)
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType max (genType x, genType y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > max (vec< L, T, Q > const &x, T y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > max (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType min (genType x, genType y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > min (vec< L, T, Q > const &x, T y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > min (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<typename genTypeT , typename genTypeU >
GLM_FUNC_DECL genTypeT mix (genTypeT x, genTypeT y, genTypeU a)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > mod (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<typename genType >
GLM_FUNC_DECL genType modf (genType x, genType &i)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > round (vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > roundEven (vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > sign (vec< L, T, Q > const &x)
 
template<typename genType >
GLM_FUNC_DECL genType smoothstep (genType edge0, genType edge1, genType x)
 
template<typename genType >
GLM_FUNC_DECL genType step (genType edge, genType x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > step (T edge, vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > step (vec< L, T, Q > const &edge, vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > trunc (vec< L, T, Q > const &x)
 
GLM_FUNC_DECL float uintBitsToFloat (uint const &v)
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL vec< L, float, Q > uintBitsToFloat (vec< L, uint, Q > const &v)
 
+

Detailed Description

+

Provides GLSL common functions.

+

These all operate component-wise. The description is per component.

+

Include <glm/common.hpp> to use these core features.

+

Function Documentation

+ +

◆ abs() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::abs (genType x)
+
+ +

Returns x if x >= 0; otherwise, it returns -x.

+
Template Parameters
+ + +
genTypefloating-point or signed integer; scalar or vector types.
+
+
+
See also
GLSL abs man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ abs() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> glm::abs (vec< L, T, Q > const & x)
+
+ +

Returns x if x >= 0; otherwise, it returns -x.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point or signed integer scalar types
QValue from qualifier enum
+
+
+
See also
GLSL abs man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ ceil()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::ceil (vec< L, T, Q > const & x)
+
+ +

Returns a value equal to the nearest integer that is greater than or equal to x.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL ceil man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ clamp() [1/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::clamp (genType x,
genType minVal,
genType maxVal 
)
+
+ +

Returns min(max(x, minVal), maxVal) for each component in x using the floating-point values minVal and maxVal.

+
Template Parameters
+ + +
genTypeFloating-point or integer; scalar or vector types.
+
+
+
See also
GLSL clamp man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +

Referenced by glm::saturate().

+ +
+
+ +

◆ clamp() [2/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> glm::clamp (vec< L, T, Q > const & x,
minVal,
maxVal 
)
+
+ +

Returns min(max(x, minVal), maxVal) for each component in x using the floating-point values minVal and maxVal.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+
See also
GLSL clamp man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ clamp() [3/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> glm::clamp (vec< L, T, Q > const & x,
vec< L, T, Q > const & minVal,
vec< L, T, Q > const & maxVal 
)
+
+ +

Returns min(max(x, minVal), maxVal) for each component in x using the floating-point values minVal and maxVal.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+
See also
GLSL clamp man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ floatBitsToInt() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL int glm::floatBitsToInt (float const & v)
+
+ +

Returns a signed integer value representing the encoding of a floating-point value.

+

The floating-point value's bit-level representation is preserved.

+
See also
GLSL floatBitsToInt man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ floatBitsToInt() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, int, Q> glm::floatBitsToInt (vec< L, float, Q > const & v)
+
+ +

Returns a signed integer value representing the encoding of a floating-point value.

+

The floatingpoint value's bit-level representation is preserved.

+
Template Parameters
+ + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
QValue from qualifier enum
+
+
+
See also
GLSL floatBitsToInt man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ floatBitsToUint() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint glm::floatBitsToUint (float const & v)
+
+ +

Returns a unsigned integer value representing the encoding of a floating-point value.

+

The floatingpoint value's bit-level representation is preserved.

+
See also
GLSL floatBitsToUint man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ floatBitsToUint() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, uint, Q> glm::floatBitsToUint (vec< L, float, Q > const & v)
+
+ +

Returns a unsigned integer value representing the encoding of a floating-point value.

+

The floatingpoint value's bit-level representation is preserved.

+
Template Parameters
+ + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
QValue from qualifier enum
+
+
+
See also
GLSL floatBitsToUint man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ floor()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::floor (vec< L, T, Q > const & x)
+
+ +

Returns a value equal to the nearest integer that is less then or equal to x.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL floor man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ fma()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::fma (genType const & a,
genType const & b,
genType const & c 
)
+
+ +

Computes and returns a * b + c.

+
Template Parameters
+ + +
genTypeFloating-point scalar or vector types.
+
+
+
See also
GLSL fma man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ fract() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::fract (genType x)
+
+ +

Return x - floor(x).

+
Template Parameters
+ + +
genTypeFloating-point scalar or vector types.
+
+
+
See also
GLSL fract man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ fract() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::fract (vec< L, T, Q > const & x)
+
+ +

Return x - floor(x).

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL fract man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ frexp()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::frexp (genType const & x,
genIType & exp 
)
+
+ +

Splits x into a floating-point significand in the range [0.5, 1.0) and an integral exponent of two, such that: x = significand * exp(2, exponent)

+

The significand is returned by the function and the exponent is returned in the parameter exp. For a floating-point value of zero, the significant and exponent are both zero. For a floating-point value that is an infinity or is not a number, the results are undefined.

+
Template Parameters
+ + +
genTypeFloating-point scalar or vector types.
+
+
+
See also
GLSL frexp man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ intBitsToFloat() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL float glm::intBitsToFloat (int const & v)
+
+ +

Returns a floating-point value corresponding to a signed integer encoding of a floating-point value.

+

If an inf or NaN is passed in, it will not signal, and the resulting floating point value is unspecified. Otherwise, the bit-level representation is preserved.

+
See also
GLSL intBitsToFloat man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ intBitsToFloat() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, float, Q> glm::intBitsToFloat (vec< L, int, Q > const & v)
+
+ +

Returns a floating-point value corresponding to a signed integer encoding of a floating-point value.

+

If an inf or NaN is passed in, it will not signal, and the resulting floating point value is unspecified. Otherwise, the bit-level representation is preserved.

+
Template Parameters
+ + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
QValue from qualifier enum
+
+
+
See also
GLSL intBitsToFloat man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ isinf()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, bool, Q> glm::isinf (vec< L, T, Q > const & x)
+
+ +

Returns true if x holds a positive infinity or negative infinity representation in the underlying implementation's set of floating point representations.

+

Returns false otherwise, including for implementations with no infinity representations.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL isinf man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ isnan()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, bool, Q> glm::isnan (vec< L, T, Q > const & x)
+
+ +

Returns true if x holds a NaN (not a number) representation in the underlying implementation's set of floating point representations.

+

Returns false otherwise, including for implementations with no NaN representations.

+

/!\ When using compiler fast math, this function may fail.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL isnan man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ ldexp()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::ldexp (genType const & x,
genIType const & exp 
)
+
+ +

Builds a floating-point number from x and the corresponding integral exponent of two in exp, returning: significand * exp(2, exponent)

+

If this product is too large to be represented in the floating-point type, the result is undefined.

+
Template Parameters
+ + +
genTypeFloating-point scalar or vector types.
+
+
+
See also
GLSL ldexp man page;
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ max() [1/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::max (genType x,
genType y 
)
+
+ +

Returns y if x < y; otherwise, it returns x.

+
Template Parameters
+ + +
genTypeFloating-point or integer; scalar or vector types.
+
+
+
See also
GLSL max man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ max() [2/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> glm::max (vec< L, T, Q > const & x,
y 
)
+
+ +

Returns y if x < y; otherwise, it returns x.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+
See also
GLSL max man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ max() [3/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> glm::max (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Returns y if x < y; otherwise, it returns x.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+
See also
GLSL max man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ min() [1/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::min (genType x,
genType y 
)
+
+ +

Returns y if y < x; otherwise, it returns x.

+
Template Parameters
+ + +
genTypeFloating-point or integer; scalar or vector types.
+
+
+
See also
GLSL min man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ min() [2/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> glm::min (vec< L, T, Q > const & x,
y 
)
+
+ +

Returns y if y < x; otherwise, it returns x.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+
See also
GLSL min man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ min() [3/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> glm::min (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Returns y if y < x; otherwise, it returns x.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+
See also
GLSL min man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ mix()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genTypeT glm::mix (genTypeT x,
genTypeT y,
genTypeU a 
)
+
+ +

If genTypeU is a floating scalar or vector: Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a.

+

The value for a is not restricted to the range [0, 1].

+

If genTypeU is a boolean scalar or vector: Selects which vector each returned component comes from. For a component of 'a' that is false, the corresponding component of 'x' is returned. For a component of 'a' that is true, the corresponding component of 'y' is returned. Components of 'x' and 'y' that are not selected are allowed to be invalid floating point values and will have no effect on the results. Thus, this provides different functionality than genType mix(genType x, genType y, genType(a)) where a is a Boolean vector.

+
See also
GLSL mix man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+
Parameters
+ + + + +
[in]xValue to interpolate.
[in]yValue to interpolate.
[in]aInterpolant.
+
+
+
Template Parameters
+ + + +
genTypeTFloating point scalar or vector.
genTypeUFloating point or boolean scalar or vector. It can't be a vector if it is the length of genTypeT.
+
+
+
#include <glm/glm.hpp>
...
float a;
bool b;
...
glm::vec4 r = glm::mix(g, h, a); // Interpolate with a floating-point scalar two vectors.
glm::vec4 s = glm::mix(g, h, b); // Returns g or h;
glm::dvec3 t = glm::mix(e, f, a); // Types of the third parameter is not required to match with the first and the second.
glm::vec4 u = glm::mix(g, h, r); // Interpolations can be perform per component with a vector for the last parameter.
+

Referenced by glm::lerp().

+ +
+
+ +

◆ mod()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::mod (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Modulus.

+

Returns x - y * floor(x / y) for each component in x using the floating point value y.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types, include glm/gtc/integer for integer scalar types support
QValue from qualifier enum
+
+
+
See also
GLSL mod man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ modf()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::modf (genType x,
genType & i 
)
+
+ +

Returns the fractional part of x and sets i to the integer part (as a whole number floating point value).

+

Both the return value and the output parameter will have the same sign as x.

+
Template Parameters
+ + +
genTypeFloating-point scalar or vector types.
+
+
+
See also
GLSL modf man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ round()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::round (vec< L, T, Q > const & x)
+
+ +

Returns a value equal to the nearest integer to x.

+

The fraction 0.5 will round in a direction chosen by the implementation, presumably the direction that is fastest. This includes the possibility that round(x) returns the same value as roundEven(x) for all values of x.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL round man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ roundEven()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::roundEven (vec< L, T, Q > const & x)
+
+ +

Returns a value equal to the nearest integer to x.

+

A fractional part of 0.5 will round toward the nearest even integer. (Both 3.5 and 4.5 for x will return 4.0.)

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL roundEven man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+
+New round to even technique
+ +
+
+ +

◆ sign()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::sign (vec< L, T, Q > const & x)
+
+ +

Returns 1.0 if x > 0, 0.0 if x == 0, or -1.0 if x < 0.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL sign man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ smoothstep()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::smoothstep (genType edge0,
genType edge1,
genType x 
)
+
+ +

Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and performs smooth Hermite interpolation between 0 and 1 when edge0 < x < edge1.

+

This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to: genType t; t = clamp ((x - edge0) / (edge1 - edge0), 0, 1); return t * t * (3 - 2 * t); Results are undefined if edge0 >= edge1.

+
Template Parameters
+ + +
genTypeFloating-point scalar or vector types.
+
+
+
See also
GLSL smoothstep man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ step() [1/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::step (genType edge,
genType x 
)
+
+ +

Returns 0.0 if x < edge, otherwise it returns 1.0 for each component of a genType.

+
See also
GLSL step man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ step() [2/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::step (edge,
vec< L, T, Q > const & x 
)
+
+ +

Returns 0.0 if x < edge, otherwise it returns 1.0.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL step man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ step() [3/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::step (vec< L, T, Q > const & edge,
vec< L, T, Q > const & x 
)
+
+ +

Returns 0.0 if x < edge, otherwise it returns 1.0.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL step man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ trunc()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::trunc (vec< L, T, Q > const & x)
+
+ +

Returns a value equal to the nearest integer to x whose absolute value is not larger than the absolute value of x.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL trunc man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ uintBitsToFloat() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL float glm::uintBitsToFloat (uint const & v)
+
+ +

Returns a floating-point value corresponding to a unsigned integer encoding of a floating-point value.

+

If an inf or NaN is passed in, it will not signal, and the resulting floating point value is unspecified. Otherwise, the bit-level representation is preserved.

+
See also
GLSL uintBitsToFloat man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ uintBitsToFloat() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, float, Q> glm::uintBitsToFloat (vec< L, uint, Q > const & v)
+
+ +

Returns a floating-point value corresponding to a unsigned integer encoding of a floating-point value.

+

If an inf or NaN is passed in, it will not signal, and the resulting floating point value is unspecified. Otherwise, the bit-level representation is preserved.

+
Template Parameters
+ + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
QValue from qualifier enum
+
+
+
See also
GLSL uintBitsToFloat man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00662_source.html b/common/glm/doc/api/a00662_source.html new file mode 100644 index 000000000..19b8a8589 --- /dev/null +++ b/common/glm/doc/api/a00662_source.html @@ -0,0 +1,82 @@ + + + + + + + +0.9.9 API documenation: man.doxy Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
man.doxy
+
+
+
1 # Doxyfile 1.8.10
2 
3 # This file describes the settings to be used by the documentation system
4 # doxygen (www.doxygen.org) for a project.
5 #
6 # All text after a double hash (##) is considered a comment and is placed in
7 # front of the TAG it is preceding.
8 #
9 # All text after a single hash (#) is considered a comment and will be ignored.
10 # The format is:
11 # TAG = value [value, ...]
12 # For lists, items can also be appended using:
13 # TAG += value [value, ...]
14 # Values that contain spaces should be placed between quotes (\" \").
15 
16 #---------------------------------------------------------------------------
17 # Project related configuration options
18 #---------------------------------------------------------------------------
19 
20 # This tag specifies the encoding used for all characters in the config file
21 # that follow. The default is UTF-8 which is also the encoding used for all text
22 # before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
23 # built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
24 # for the list of possible encodings.
25 # The default value is: UTF-8.
26 
27 DOXYFILE_ENCODING = UTF-8
28 
29 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
30 # double-quotes, unless you are using Doxywizard) that should identify the
31 # project for which the documentation is generated. This name is used in the
32 # title of most generated pages and in a few other places.
33 # The default value is: My Project.
34 
35 PROJECT_NAME = "0.9.9 API documenation"
36 
37 # The PROJECT_NUMBER tag can be used to enter a project or revision number. This
38 # could be handy for archiving the generated documentation or if some version
39 # control system is used.
40 
41 PROJECT_NUMBER =
42 
43 # Using the PROJECT_BRIEF tag one can provide an optional one line description
44 # for a project that appears at the top of each page and should give viewer a
45 # quick idea about the purpose of the project. Keep the description short.
46 
47 PROJECT_BRIEF =
48 
49 # With the PROJECT_LOGO tag one can specify a logo or an icon that is included
50 # in the documentation. The maximum height of the logo should not exceed 55
51 # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
52 # the logo to the output directory.
53 
54 PROJECT_LOGO = G:/Source/G-Truc/glm/doc/manual/logo-mini.png
55 
56 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
57 # into which the generated documentation will be written. If a relative path is
58 # entered, it will be relative to the location where doxygen was started. If
59 # left blank the current directory will be used.
60 
61 OUTPUT_DIRECTORY = .
62 
63 # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
64 # directories (in 2 levels) under the output directory of each output format and
65 # will distribute the generated files over these directories. Enabling this
66 # option can be useful when feeding doxygen a huge amount of source files, where
67 # putting all generated files in the same directory would otherwise causes
68 # performance problems for the file system.
69 # The default value is: NO.
70 
71 CREATE_SUBDIRS = NO
72 
73 # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
74 # characters to appear in the names of generated files. If set to NO, non-ASCII
75 # characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
76 # U+3044.
77 # The default value is: NO.
78 
79 ALLOW_UNICODE_NAMES = NO
80 
81 # The OUTPUT_LANGUAGE tag is used to specify the language in which all
82 # documentation generated by doxygen is written. Doxygen will use this
83 # information to generate all constant output in the proper language.
84 # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
85 # Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
86 # Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
87 # Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
88 # Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
89 # Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
90 # Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
91 # Ukrainian and Vietnamese.
92 # The default value is: English.
93 
94 OUTPUT_LANGUAGE = English
95 
96 # If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
97 # descriptions after the members that are listed in the file and class
98 # documentation (similar to Javadoc). Set to NO to disable this.
99 # The default value is: YES.
100 
101 BRIEF_MEMBER_DESC = YES
102 
103 # If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
104 # description of a member or function before the detailed description
105 #
106 # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
107 # brief descriptions will be completely suppressed.
108 # The default value is: YES.
109 
110 REPEAT_BRIEF = YES
111 
112 # This tag implements a quasi-intelligent brief description abbreviator that is
113 # used to form the text in various listings. Each string in this list, if found
114 # as the leading text of the brief description, will be stripped from the text
115 # and the result, after processing the whole list, is used as the annotated
116 # text. Otherwise, the brief description is used as-is. If left blank, the
117 # following values are used ($name is automatically replaced with the name of
118 # the entity):The $name class, The $name widget, The $name file, is, provides,
119 # specifies, contains, represents, a, an and the.
120 
121 ABBREVIATE_BRIEF = "The $name class " \
122  "The $name widget " \
123  "The $name file " \
124  is \
125  provides \
126  specifies \
127  contains \
128  represents \
129  a \
130  an \
131  the
132 
133 # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
134 # doxygen will generate a detailed section even if there is only a brief
135 # description.
136 # The default value is: NO.
137 
138 ALWAYS_DETAILED_SEC = NO
139 
140 # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
141 # inherited members of a class in the documentation of that class as if those
142 # members were ordinary class members. Constructors, destructors and assignment
143 # operators of the base classes will not be shown.
144 # The default value is: NO.
145 
146 INLINE_INHERITED_MEMB = NO
147 
148 # If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
149 # before files name in the file list and in the header files. If set to NO the
150 # shortest path that makes the file name unique will be used
151 # The default value is: YES.
152 
153 FULL_PATH_NAMES = NO
154 
155 # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
156 # Stripping is only done if one of the specified strings matches the left-hand
157 # part of the path. The tag can be used to show relative paths in the file list.
158 # If left blank the directory from which doxygen is run is used as the path to
159 # strip.
160 #
161 # Note that you can specify absolute paths here, but also relative paths, which
162 # will be relative from the directory where doxygen is started.
163 # This tag requires that the tag FULL_PATH_NAMES is set to YES.
164 
165 STRIP_FROM_PATH = "C:/Documents and Settings/Groove/ "
166 
167 # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
168 # path mentioned in the documentation of a class, which tells the reader which
169 # header file to include in order to use a class. If left blank only the name of
170 # the header file containing the class definition is used. Otherwise one should
171 # specify the list of include paths that are normally passed to the compiler
172 # using the -I flag.
173 
174 STRIP_FROM_INC_PATH =
175 
176 # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
177 # less readable) file names. This can be useful is your file systems doesn't
178 # support long names like on DOS, Mac, or CD-ROM.
179 # The default value is: NO.
180 
181 SHORT_NAMES = YES
182 
183 # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
184 # first line (until the first dot) of a Javadoc-style comment as the brief
185 # description. If set to NO, the Javadoc-style will behave just like regular Qt-
186 # style comments (thus requiring an explicit @brief command for a brief
187 # description.)
188 # The default value is: NO.
189 
190 JAVADOC_AUTOBRIEF = YES
191 
192 # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
193 # line (until the first dot) of a Qt-style comment as the brief description. If
194 # set to NO, the Qt-style will behave just like regular Qt-style comments (thus
195 # requiring an explicit \brief command for a brief description.)
196 # The default value is: NO.
197 
198 QT_AUTOBRIEF = NO
199 
200 # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
201 # multi-line C++ special comment block (i.e. a block of
202 # a brief description. This used to be the default behavior. The new default is
203 # to treat a multi-line C++ comment block as a detailed description. Set this
204 # tag to YES if you prefer the old behavior instead.
205 #
206 # Note that setting this tag to YES also means that rational rose comments are
207 # not recognized any more.
208 # The default value is: NO.
209 
210 MULTILINE_CPP_IS_BRIEF = NO
211 
212 # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
213 # documentation from any documented member that it re-implements.
214 # The default value is: YES.
215 
216 INHERIT_DOCS = YES
217 
218 # If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
219 # page for each member. If set to NO, the documentation of a member will be part
220 # of the file/class/namespace that contains it.
221 # The default value is: NO.
222 
223 SEPARATE_MEMBER_PAGES = NO
224 
225 # The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
226 # uses this value to replace tabs by spaces in code fragments.
227 # Minimum value: 1, maximum value: 16, default value: 4.
228 
229 TAB_SIZE = 8
230 
231 # This tag can be used to specify a number of aliases that act as commands in
232 # the documentation. An alias has the form:
233 # name=value
234 # For example adding
235 # "sideeffect=@par Side Effects:\n"
236 # will allow you to put the command \sideeffect (or @sideeffect) in the
237 # documentation, which will result in a user-defined paragraph with heading
238 # "Side Effects:". You can put \n's in the value part of an alias to insert
239 # newlines.
240 
241 ALIASES =
242 
243 # This tag can be used to specify a number of word-keyword mappings (TCL only).
244 # A mapping has the form "name=value". For example adding "class=itcl::class"
245 # will allow you to use the command class in the itcl::class meaning.
246 
247 TCL_SUBST =
248 
249 # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
250 # only. Doxygen will then generate output that is more tailored for C. For
251 # instance, some of the names that are used will be different. The list of all
252 # members will be omitted, etc.
253 # The default value is: NO.
254 
255 OPTIMIZE_OUTPUT_FOR_C = NO
256 
257 # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
258 # Python sources only. Doxygen will then generate output that is more tailored
259 # for that language. For instance, namespaces will be presented as packages,
260 # qualified scopes will look different, etc.
261 # The default value is: NO.
262 
263 OPTIMIZE_OUTPUT_JAVA = NO
264 
265 # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
266 # sources. Doxygen will then generate output that is tailored for Fortran.
267 # The default value is: NO.
268 
269 OPTIMIZE_FOR_FORTRAN = NO
270 
271 # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
272 # sources. Doxygen will then generate output that is tailored for VHDL.
273 # The default value is: NO.
274 
275 OPTIMIZE_OUTPUT_VHDL = NO
276 
277 # Doxygen selects the parser to use depending on the extension of the files it
278 # parses. With this tag you can assign which parser to use for a given
279 # extension. Doxygen has a built-in mapping, but you can override or extend it
280 # using this tag. The format is ext=language, where ext is a file extension, and
281 # language is one of the parsers supported by doxygen: IDL, Java, Javascript,
282 # C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
283 # FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
284 # Fortran. In the later case the parser tries to guess whether the code is fixed
285 # or free formatted code, this is the default for Fortran type files), VHDL. For
286 # instance to make doxygen treat .inc files as Fortran files (default is PHP),
287 # and .f files as C (default is Fortran), use: inc=Fortran f=C.
288 #
289 # Note: For files without extension you can use no_extension as a placeholder.
290 #
291 # Note that for custom extensions you also need to set FILE_PATTERNS otherwise
292 # the files are not read by doxygen.
293 
294 EXTENSION_MAPPING =
295 
296 # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
297 # according to the Markdown format, which allows for more readable
298 # documentation. See http://daringfireball.net/projects/markdown/ for details.
299 # The output of markdown processing is further processed by doxygen, so you can
300 # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
301 # case of backward compatibilities issues.
302 # The default value is: YES.
303 
304 MARKDOWN_SUPPORT = YES
305 
306 # When enabled doxygen tries to link words that correspond to documented
307 # classes, or namespaces to their corresponding documentation. Such a link can
308 # be prevented in individual cases by putting a % sign in front of the word or
309 # globally by setting AUTOLINK_SUPPORT to NO.
310 # The default value is: YES.
311 
312 AUTOLINK_SUPPORT = YES
313 
314 # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
315 # to include (a tag file for) the STL sources as input, then you should set this
316 # tag to YES in order to let doxygen match functions declarations and
317 # definitions whose arguments contain STL classes (e.g. func(std::string);
318 # versus func(std::string) {}). This also make the inheritance and collaboration
319 # diagrams that involve STL classes more complete and accurate.
320 # The default value is: NO.
321 
322 BUILTIN_STL_SUPPORT = NO
323 
324 # If you use Microsoft's C++/CLI language, you should set this option to YES to
325 # enable parsing support.
326 # The default value is: NO.
327 
328 CPP_CLI_SUPPORT = NO
329 
330 # Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
331 # http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
332 # will parse them like normal C++ but will assume all classes use public instead
333 # of private inheritance when no explicit protection keyword is present.
334 # The default value is: NO.
335 
336 SIP_SUPPORT = NO
337 
338 # For Microsoft's IDL there are propget and propput attributes to indicate
339 # getter and setter methods for a property. Setting this option to YES will make
340 # doxygen to replace the get and set methods by a property in the documentation.
341 # This will only work if the methods are indeed getting or setting a simple
342 # type. If this is not the case, or you want to show the methods anyway, you
343 # should set this option to NO.
344 # The default value is: YES.
345 
346 IDL_PROPERTY_SUPPORT = YES
347 
348 # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
349 # tag is set to YES then doxygen will reuse the documentation of the first
350 # member in the group (if any) for the other members of the group. By default
351 # all members of a group must be documented explicitly.
352 # The default value is: NO.
353 
354 DISTRIBUTE_GROUP_DOC = NO
355 
356 # If one adds a struct or class to a group and this option is enabled, then also
357 # any nested class or struct is added to the same group. By default this option
358 # is disabled and one has to add nested compounds explicitly via \ingroup.
359 # The default value is: NO.
360 
361 GROUP_NESTED_COMPOUNDS = NO
362 
363 # Set the SUBGROUPING tag to YES to allow class member groups of the same type
364 # (for instance a group of public functions) to be put as a subgroup of that
365 # type (e.g. under the Public Functions section). Set it to NO to prevent
366 # subgrouping. Alternatively, this can be done per class using the
367 # \nosubgrouping command.
368 # The default value is: YES.
369 
370 SUBGROUPING = NO
371 
372 # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
373 # are shown inside the group in which they are included (e.g. using \ingroup)
374 # instead of on a separate page (for HTML and Man pages) or section (for LaTeX
375 # and RTF).
376 #
377 # Note that this feature does not work in combination with
378 # SEPARATE_MEMBER_PAGES.
379 # The default value is: NO.
380 
381 INLINE_GROUPED_CLASSES = NO
382 
383 # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
384 # with only public data fields or simple typedef fields will be shown inline in
385 # the documentation of the scope in which they are defined (i.e. file,
386 # namespace, or group documentation), provided this scope is documented. If set
387 # to NO, structs, classes, and unions are shown on a separate page (for HTML and
388 # Man pages) or section (for LaTeX and RTF).
389 # The default value is: NO.
390 
391 INLINE_SIMPLE_STRUCTS = NO
392 
393 # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
394 # enum is documented as struct, union, or enum with the name of the typedef. So
395 # typedef struct TypeS {} TypeT, will appear in the documentation as a struct
396 # with name TypeT. When disabled the typedef will appear as a member of a file,
397 # namespace, or class. And the struct will be named TypeS. This can typically be
398 # useful for C code in case the coding convention dictates that all compound
399 # types are typedef'ed and only the typedef is referenced, never the tag name.
400 # The default value is: NO.
401 
402 TYPEDEF_HIDES_STRUCT = NO
403 
404 # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
405 # cache is used to resolve symbols given their name and scope. Since this can be
406 # an expensive process and often the same symbol appears multiple times in the
407 # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
408 # doxygen will become slower. If the cache is too large, memory is wasted. The
409 # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
410 # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
411 # symbols. At the end of a run doxygen will report the cache usage and suggest
412 # the optimal cache size from a speed point of view.
413 # Minimum value: 0, maximum value: 9, default value: 0.
414 
415 LOOKUP_CACHE_SIZE = 0
416 
417 #---------------------------------------------------------------------------
418 # Build related configuration options
419 #---------------------------------------------------------------------------
420 
421 # If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
422 # documentation are documented, even if no documentation was available. Private
423 # class members and static file members will be hidden unless the
424 # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
425 # Note: This will also disable the warnings about undocumented members that are
426 # normally produced when WARNINGS is set to YES.
427 # The default value is: NO.
428 
429 EXTRACT_ALL = NO
430 
431 # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
432 # be included in the documentation.
433 # The default value is: NO.
434 
435 EXTRACT_PRIVATE = NO
436 
437 # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
438 # scope will be included in the documentation.
439 # The default value is: NO.
440 
441 EXTRACT_PACKAGE = NO
442 
443 # If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
444 # included in the documentation.
445 # The default value is: NO.
446 
447 EXTRACT_STATIC = YES
448 
449 # If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
450 # locally in source files will be included in the documentation. If set to NO,
451 # only classes defined in header files are included. Does not have any effect
452 # for Java sources.
453 # The default value is: YES.
454 
455 EXTRACT_LOCAL_CLASSES = NO
456 
457 # This flag is only useful for Objective-C code. If set to YES, local methods,
458 # which are defined in the implementation section but not in the interface are
459 # included in the documentation. If set to NO, only methods in the interface are
460 # included.
461 # The default value is: NO.
462 
463 EXTRACT_LOCAL_METHODS = NO
464 
465 # If this flag is set to YES, the members of anonymous namespaces will be
466 # extracted and appear in the documentation as a namespace called
467 # 'anonymous_namespace{file}', where file will be replaced with the base name of
468 # the file that contains the anonymous namespace. By default anonymous namespace
469 # are hidden.
470 # The default value is: NO.
471 
472 EXTRACT_ANON_NSPACES = NO
473 
474 # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
475 # undocumented members inside documented classes or files. If set to NO these
476 # members will be included in the various overviews, but no documentation
477 # section is generated. This option has no effect if EXTRACT_ALL is enabled.
478 # The default value is: NO.
479 
480 HIDE_UNDOC_MEMBERS = YES
481 
482 # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
483 # undocumented classes that are normally visible in the class hierarchy. If set
484 # to NO, these classes will be included in the various overviews. This option
485 # has no effect if EXTRACT_ALL is enabled.
486 # The default value is: NO.
487 
488 HIDE_UNDOC_CLASSES = YES
489 
490 # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
491 # (class|struct|union) declarations. If set to NO, these declarations will be
492 # included in the documentation.
493 # The default value is: NO.
494 
495 HIDE_FRIEND_COMPOUNDS = YES
496 
497 # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
498 # documentation blocks found inside the body of a function. If set to NO, these
499 # blocks will be appended to the function's detailed documentation block.
500 # The default value is: NO.
501 
502 HIDE_IN_BODY_DOCS = YES
503 
504 # The INTERNAL_DOCS tag determines if documentation that is typed after a
505 # \internal command is included. If the tag is set to NO then the documentation
506 # will be excluded. Set it to YES to include the internal documentation.
507 # The default value is: NO.
508 
509 INTERNAL_DOCS = NO
510 
511 # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
512 # names in lower-case letters. If set to YES, upper-case letters are also
513 # allowed. This is useful if you have classes or files whose names only differ
514 # in case and if your file system supports case sensitive file names. Windows
515 # and Mac users are advised to set this option to NO.
516 # The default value is: system dependent.
517 
518 CASE_SENSE_NAMES = YES
519 
520 # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
521 # their full class and namespace scopes in the documentation. If set to YES, the
522 # scope will be hidden.
523 # The default value is: NO.
524 
525 HIDE_SCOPE_NAMES = YES
526 
527 # If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
528 # append additional text to a page's title, such as Class Reference. If set to
529 # YES the compound reference will be hidden.
530 # The default value is: NO.
531 
532 HIDE_COMPOUND_REFERENCE= NO
533 
534 # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
535 # the files that are included by a file in the documentation of that file.
536 # The default value is: YES.
537 
538 SHOW_INCLUDE_FILES = NO
539 
540 # If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
541 # grouped member an include statement to the documentation, telling the reader
542 # which file to include in order to use the member.
543 # The default value is: NO.
544 
545 SHOW_GROUPED_MEMB_INC = NO
546 
547 # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
548 # files with double quotes in the documentation rather than with sharp brackets.
549 # The default value is: NO.
550 
551 FORCE_LOCAL_INCLUDES = NO
552 
553 # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
554 # documentation for inline members.
555 # The default value is: YES.
556 
557 INLINE_INFO = NO
558 
559 # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
560 # (detailed) documentation of file and class members alphabetically by member
561 # name. If set to NO, the members will appear in declaration order.
562 # The default value is: YES.
563 
564 SORT_MEMBER_DOCS = YES
565 
566 # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
567 # descriptions of file, namespace and class members alphabetically by member
568 # name. If set to NO, the members will appear in declaration order. Note that
569 # this will also influence the order of the classes in the class list.
570 # The default value is: NO.
571 
572 SORT_BRIEF_DOCS = YES
573 
574 # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
575 # (brief and detailed) documentation of class members so that constructors and
576 # destructors are listed first. If set to NO the constructors will appear in the
577 # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
578 # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
579 # member documentation.
580 # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
581 # detailed member documentation.
582 # The default value is: NO.
583 
584 SORT_MEMBERS_CTORS_1ST = NO
585 
586 # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
587 # of group names into alphabetical order. If set to NO the group names will
588 # appear in their defined order.
589 # The default value is: NO.
590 
591 SORT_GROUP_NAMES = NO
592 
593 # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
594 # fully-qualified names, including namespaces. If set to NO, the class list will
595 # be sorted only by class name, not including the namespace part.
596 # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
597 # Note: This option applies only to the class list, not to the alphabetical
598 # list.
599 # The default value is: NO.
600 
601 SORT_BY_SCOPE_NAME = YES
602 
603 # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
604 # type resolution of all parameters of a function it will reject a match between
605 # the prototype and the implementation of a member function even if there is
606 # only one candidate or it is obvious which candidate to choose by doing a
607 # simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
608 # accept a match between prototype and implementation in such cases.
609 # The default value is: NO.
610 
611 STRICT_PROTO_MATCHING = NO
612 
613 # The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
614 # list. This list is created by putting \todo commands in the documentation.
615 # The default value is: YES.
616 
617 GENERATE_TODOLIST = YES
618 
619 # The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
620 # list. This list is created by putting \test commands in the documentation.
621 # The default value is: YES.
622 
623 GENERATE_TESTLIST = YES
624 
625 # The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
626 # list. This list is created by putting \bug commands in the documentation.
627 # The default value is: YES.
628 
629 GENERATE_BUGLIST = YES
630 
631 # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
632 # the deprecated list. This list is created by putting \deprecated commands in
633 # the documentation.
634 # The default value is: YES.
635 
636 GENERATE_DEPRECATEDLIST= YES
637 
638 # The ENABLED_SECTIONS tag can be used to enable conditional documentation
639 # sections, marked by \if <section_label> ... \endif and \cond <section_label>
640 # ... \endcond blocks.
641 
642 ENABLED_SECTIONS =
643 
644 # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
645 # initial value of a variable or macro / define can have for it to appear in the
646 # documentation. If the initializer consists of more lines than specified here
647 # it will be hidden. Use a value of 0 to hide initializers completely. The
648 # appearance of the value of individual variables and macros / defines can be
649 # controlled using \showinitializer or \hideinitializer command in the
650 # documentation regardless of this setting.
651 # Minimum value: 0, maximum value: 10000, default value: 30.
652 
653 MAX_INITIALIZER_LINES = 30
654 
655 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
656 # the bottom of the documentation of classes and structs. If set to YES, the
657 # list will mention the files that were used to generate the documentation.
658 # The default value is: YES.
659 
660 SHOW_USED_FILES = NO
661 
662 # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
663 # will remove the Files entry from the Quick Index and from the Folder Tree View
664 # (if specified).
665 # The default value is: YES.
666 
667 SHOW_FILES = YES
668 
669 # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
670 # page. This will remove the Namespaces entry from the Quick Index and from the
671 # Folder Tree View (if specified).
672 # The default value is: YES.
673 
674 SHOW_NAMESPACES = YES
675 
676 # The FILE_VERSION_FILTER tag can be used to specify a program or script that
677 # doxygen should invoke to get the current version for each file (typically from
678 # the version control system). Doxygen will invoke the program by executing (via
679 # popen()) the command command input-file, where command is the value of the
680 # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
681 # by doxygen. Whatever the program writes to standard output is used as the file
682 # version. For an example see the documentation.
683 
684 FILE_VERSION_FILTER =
685 
686 # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
687 # by doxygen. The layout file controls the global structure of the generated
688 # output files in an output format independent way. To create the layout file
689 # that represents doxygen's defaults, run doxygen with the -l option. You can
690 # optionally specify a file name after the option, if omitted DoxygenLayout.xml
691 # will be used as the name of the layout file.
692 #
693 # Note that if you run doxygen from a directory containing a file called
694 # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
695 # tag is left empty.
696 
697 LAYOUT_FILE =
698 
699 # The CITE_BIB_FILES tag can be used to specify one or more bib files containing
700 # the reference definitions. This must be a list of .bib files. The .bib
701 # extension is automatically appended if omitted. This requires the bibtex tool
702 # to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
703 # For LaTeX the style of the bibliography can be controlled using
704 # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
705 # search path. See also \cite for info how to create references.
706 
707 CITE_BIB_FILES =
708 
709 #---------------------------------------------------------------------------
710 # Configuration options related to warning and progress messages
711 #---------------------------------------------------------------------------
712 
713 # The QUIET tag can be used to turn on/off the messages that are generated to
714 # standard output by doxygen. If QUIET is set to YES this implies that the
715 # messages are off.
716 # The default value is: NO.
717 
718 QUIET = NO
719 
720 # The WARNINGS tag can be used to turn on/off the warning messages that are
721 # generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
722 # this implies that the warnings are on.
723 #
724 # Tip: Turn warnings on while writing the documentation.
725 # The default value is: YES.
726 
727 WARNINGS = YES
728 
729 # If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
730 # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
731 # will automatically be disabled.
732 # The default value is: YES.
733 
734 WARN_IF_UNDOCUMENTED = YES
735 
736 # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
737 # potential errors in the documentation, such as not documenting some parameters
738 # in a documented function, or documenting parameters that don't exist or using
739 # markup commands wrongly.
740 # The default value is: YES.
741 
742 WARN_IF_DOC_ERROR = YES
743 
744 # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
745 # are documented, but have no documentation for their parameters or return
746 # value. If set to NO, doxygen will only warn about wrong or incomplete
747 # parameter documentation, but not about the absence of documentation.
748 # The default value is: NO.
749 
750 WARN_NO_PARAMDOC = NO
751 
752 # The WARN_FORMAT tag determines the format of the warning messages that doxygen
753 # can produce. The string should contain the $file, $line, and $text tags, which
754 # will be replaced by the file and line number from which the warning originated
755 # and the warning text. Optionally the format may contain $version, which will
756 # be replaced by the version of the file (if it could be obtained via
757 # FILE_VERSION_FILTER)
758 # The default value is: $file:$line: $text.
759 
760 WARN_FORMAT = "$file:$line: $text"
761 
762 # The WARN_LOGFILE tag can be used to specify a file to which warning and error
763 # messages should be written. If left blank the output is written to standard
764 # error (stderr).
765 
766 WARN_LOGFILE =
767 
768 #---------------------------------------------------------------------------
769 # Configuration options related to the input files
770 #---------------------------------------------------------------------------
771 
772 # The INPUT tag is used to specify the files and/or directories that contain
773 # documented source files. You may enter file names like myfile.cpp or
774 # directories like /usr/src/myproject. Separate the files or directories with
775 # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
776 # Note: If this tag is empty the current directory is searched.
777 
778 INPUT = ../glm \
779  .
780 
781 # This tag can be used to specify the character encoding of the source files
782 # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
783 # libiconv (or the iconv built into libc) for the transcoding. See the libiconv
784 # documentation (see: http://www.gnu.org/software/libiconv) for the list of
785 # possible encodings.
786 # The default value is: UTF-8.
787 
788 INPUT_ENCODING = UTF-8
789 
790 # If the value of the INPUT tag contains directories, you can use the
791 # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
792 # *.h) to filter out the source-files in the directories.
793 #
794 # Note that for custom extensions or not directly supported extensions you also
795 # need to set EXTENSION_MAPPING for the extension otherwise the files are not
796 # read by doxygen.
797 #
798 # If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
799 # *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
800 # *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
801 # *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd,
802 # *.vhdl, *.ucf, *.qsf, *.as and *.js.
803 
804 FILE_PATTERNS = *.hpp \
805  *.doxy
806 
807 # The RECURSIVE tag can be used to specify whether or not subdirectories should
808 # be searched for input files as well.
809 # The default value is: NO.
810 
811 RECURSIVE = YES
812 
813 # The EXCLUDE tag can be used to specify files and/or directories that should be
814 # excluded from the INPUT source files. This way you can easily exclude a
815 # subdirectory from a directory tree whose root is specified with the INPUT tag.
816 #
817 # Note that relative paths are relative to the directory from which doxygen is
818 # run.
819 
820 EXCLUDE =
821 
822 # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
823 # directories that are symbolic links (a Unix file system feature) are excluded
824 # from the input.
825 # The default value is: NO.
826 
827 EXCLUDE_SYMLINKS = NO
828 
829 # If the value of the INPUT tag contains directories, you can use the
830 # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
831 # certain files from those directories.
832 #
833 # Note that the wildcards are matched against the file with absolute path, so to
834 # exclude all test directories for example use the pattern */test/*
835 
836 EXCLUDE_PATTERNS =
837 
838 # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
839 # (namespaces, classes, functions, etc.) that should be excluded from the
840 # output. The symbol name can be a fully qualified name, a word, or if the
841 # wildcard * is used, a substring. Examples: ANamespace, AClass,
842 # AClass::ANamespace, ANamespace::*Test
843 #
844 # Note that the wildcards are matched against the file with absolute path, so to
845 # exclude all test directories use the pattern */test/*
846 
847 EXCLUDE_SYMBOLS =
848 
849 # The EXAMPLE_PATH tag can be used to specify one or more files or directories
850 # that contain example code fragments that are included (see the \include
851 # command).
852 
853 EXAMPLE_PATH =
854 
855 # If the value of the EXAMPLE_PATH tag contains directories, you can use the
856 # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
857 # *.h) to filter out the source-files in the directories. If left blank all
858 # files are included.
859 
860 EXAMPLE_PATTERNS = *
861 
862 # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
863 # searched for input files to be used with the \include or \dontinclude commands
864 # irrespective of the value of the RECURSIVE tag.
865 # The default value is: NO.
866 
867 EXAMPLE_RECURSIVE = NO
868 
869 # The IMAGE_PATH tag can be used to specify one or more files or directories
870 # that contain images that are to be included in the documentation (see the
871 # \image command).
872 
873 IMAGE_PATH =
874 
875 # The INPUT_FILTER tag can be used to specify a program that doxygen should
876 # invoke to filter for each input file. Doxygen will invoke the filter program
877 # by executing (via popen()) the command:
878 #
879 # <filter> <input-file>
880 #
881 # where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
882 # name of an input file. Doxygen will then use the output that the filter
883 # program writes to standard output. If FILTER_PATTERNS is specified, this tag
884 # will be ignored.
885 #
886 # Note that the filter must not add or remove lines; it is applied before the
887 # code is scanned, but not when the output code is generated. If lines are added
888 # or removed, the anchors will not be placed correctly.
889 
890 INPUT_FILTER =
891 
892 # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
893 # basis. Doxygen will compare the file name with each pattern and apply the
894 # filter if there is a match. The filters are a list of the form: pattern=filter
895 # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
896 # filters are used. If the FILTER_PATTERNS tag is empty or if none of the
897 # patterns match the file name, INPUT_FILTER is applied.
898 
899 FILTER_PATTERNS =
900 
901 # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
902 # INPUT_FILTER) will also be used to filter the input files that are used for
903 # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
904 # The default value is: NO.
905 
906 FILTER_SOURCE_FILES = NO
907 
908 # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
909 # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
910 # it is also possible to disable source filtering for a specific pattern using
911 # *.ext= (so without naming a filter).
912 # This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
913 
914 FILTER_SOURCE_PATTERNS =
915 
916 # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
917 # is part of the input, its contents will be placed on the main page
918 # (index.html). This can be useful if you have a project on for instance GitHub
919 # and want to reuse the introduction page also for the doxygen output.
920 
921 USE_MDFILE_AS_MAINPAGE =
922 
923 #---------------------------------------------------------------------------
924 # Configuration options related to source browsing
925 #---------------------------------------------------------------------------
926 
927 # If the SOURCE_BROWSER tag is set to YES then a list of source files will be
928 # generated. Documented entities will be cross-referenced with these sources.
929 #
930 # Note: To get rid of all source code in the generated output, make sure that
931 # also VERBATIM_HEADERS is set to NO.
932 # The default value is: NO.
933 
934 SOURCE_BROWSER = YES
935 
936 # Setting the INLINE_SOURCES tag to YES will include the body of functions,
937 # classes and enums directly into the documentation.
938 # The default value is: NO.
939 
940 INLINE_SOURCES = NO
941 
942 # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
943 # special comment blocks from generated source code fragments. Normal C, C++ and
944 # Fortran comments will always remain visible.
945 # The default value is: YES.
946 
947 STRIP_CODE_COMMENTS = YES
948 
949 # If the REFERENCED_BY_RELATION tag is set to YES then for each documented
950 # function all documented functions referencing it will be listed.
951 # The default value is: NO.
952 
953 REFERENCED_BY_RELATION = YES
954 
955 # If the REFERENCES_RELATION tag is set to YES then for each documented function
956 # all documented entities called/used by that function will be listed.
957 # The default value is: NO.
958 
959 REFERENCES_RELATION = YES
960 
961 # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
962 # to YES then the hyperlinks from functions in REFERENCES_RELATION and
963 # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
964 # link to the documentation.
965 # The default value is: YES.
966 
967 REFERENCES_LINK_SOURCE = YES
968 
969 # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
970 # source code will show a tooltip with additional information such as prototype,
971 # brief description and links to the definition and documentation. Since this
972 # will make the HTML file larger and loading of large files a bit slower, you
973 # can opt to disable this feature.
974 # The default value is: YES.
975 # This tag requires that the tag SOURCE_BROWSER is set to YES.
976 
977 SOURCE_TOOLTIPS = YES
978 
979 # If the USE_HTAGS tag is set to YES then the references to source code will
980 # point to the HTML generated by the htags(1) tool instead of doxygen built-in
981 # source browser. The htags tool is part of GNU's global source tagging system
982 # (see http://www.gnu.org/software/global/global.html). You will need version
983 # 4.8.6 or higher.
984 #
985 # To use it do the following:
986 # - Install the latest version of global
987 # - Enable SOURCE_BROWSER and USE_HTAGS in the config file
988 # - Make sure the INPUT points to the root of the source tree
989 # - Run doxygen as normal
990 #
991 # Doxygen will invoke htags (and that will in turn invoke gtags), so these
992 # tools must be available from the command line (i.e. in the search path).
993 #
994 # The result: instead of the source browser generated by doxygen, the links to
995 # source code will now point to the output of htags.
996 # The default value is: NO.
997 # This tag requires that the tag SOURCE_BROWSER is set to YES.
998 
999 USE_HTAGS = NO
1000 
1001 # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
1002 # verbatim copy of the header file for each class for which an include is
1003 # specified. Set to NO to disable this.
1004 # See also: Section \class.
1005 # The default value is: YES.
1006 
1007 VERBATIM_HEADERS = YES
1008 
1009 # If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
1010 # clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
1011 # cost of reduced performance. This can be particularly helpful with template
1012 # rich C++ code for which doxygen's built-in parser lacks the necessary type
1013 # information.
1014 # Note: The availability of this option depends on whether or not doxygen was
1015 # compiled with the --with-libclang option.
1016 # The default value is: NO.
1017 
1018 CLANG_ASSISTED_PARSING = NO
1019 
1020 # If clang assisted parsing is enabled you can provide the compiler with command
1021 # line options that you would normally use when invoking the compiler. Note that
1022 # the include paths will already be set by doxygen for the files and directories
1023 # specified with INPUT and INCLUDE_PATH.
1024 # This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
1025 
1026 CLANG_OPTIONS =
1027 
1028 #---------------------------------------------------------------------------
1029 # Configuration options related to the alphabetical class index
1030 #---------------------------------------------------------------------------
1031 
1032 # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
1033 # compounds will be generated. Enable this if the project contains a lot of
1034 # classes, structs, unions or interfaces.
1035 # The default value is: YES.
1036 
1037 ALPHABETICAL_INDEX = NO
1038 
1039 # The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
1040 # which the alphabetical index list will be split.
1041 # Minimum value: 1, maximum value: 20, default value: 5.
1042 # This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
1043 
1044 COLS_IN_ALPHA_INDEX = 5
1045 
1046 # In case all classes in a project start with a common prefix, all classes will
1047 # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
1048 # can be used to specify a prefix (or a list of prefixes) that should be ignored
1049 # while generating the index headers.
1050 # This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
1051 
1052 IGNORE_PREFIX =
1053 
1054 #---------------------------------------------------------------------------
1055 # Configuration options related to the HTML output
1056 #---------------------------------------------------------------------------
1057 
1058 # If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
1059 # The default value is: YES.
1060 
1061 GENERATE_HTML = YES
1062 
1063 # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
1064 # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
1065 # it.
1066 # The default directory is: html.
1067 # This tag requires that the tag GENERATE_HTML is set to YES.
1068 
1069 HTML_OUTPUT = html
1070 
1071 # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
1072 # generated HTML page (for example: .htm, .php, .asp).
1073 # The default value is: .html.
1074 # This tag requires that the tag GENERATE_HTML is set to YES.
1075 
1076 HTML_FILE_EXTENSION = .html
1077 
1078 # The HTML_HEADER tag can be used to specify a user-defined HTML header file for
1079 # each generated HTML page. If the tag is left blank doxygen will generate a
1080 # standard header.
1081 #
1082 # To get valid HTML the header file that includes any scripts and style sheets
1083 # that doxygen needs, which is dependent on the configuration options used (e.g.
1084 # the setting GENERATE_TREEVIEW). It is highly recommended to start with a
1085 # default header using
1086 # doxygen -w html new_header.html new_footer.html new_stylesheet.css
1087 # YourConfigFile
1088 # and then modify the file new_header.html. See also section "Doxygen usage"
1089 # for information on how to generate the default header that doxygen normally
1090 # uses.
1091 # Note: The header is subject to change so you typically have to regenerate the
1092 # default header when upgrading to a newer version of doxygen. For a description
1093 # of the possible markers and block names see the documentation.
1094 # This tag requires that the tag GENERATE_HTML is set to YES.
1095 
1096 HTML_HEADER =
1097 
1098 # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
1099 # generated HTML page. If the tag is left blank doxygen will generate a standard
1100 # footer. See HTML_HEADER for more information on how to generate a default
1101 # footer and what special commands can be used inside the footer. See also
1102 # section "Doxygen usage" for information on how to generate the default footer
1103 # that doxygen normally uses.
1104 # This tag requires that the tag GENERATE_HTML is set to YES.
1105 
1106 HTML_FOOTER =
1107 
1108 # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
1109 # sheet that is used by each HTML page. It can be used to fine-tune the look of
1110 # the HTML output. If left blank doxygen will generate a default style sheet.
1111 # See also section "Doxygen usage" for information on how to generate the style
1112 # sheet that doxygen normally uses.
1113 # Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
1114 # it is more robust and this tag (HTML_STYLESHEET) will in the future become
1115 # obsolete.
1116 # This tag requires that the tag GENERATE_HTML is set to YES.
1117 
1118 HTML_STYLESHEET =
1119 
1120 # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
1121 # cascading style sheets that are included after the standard style sheets
1122 # created by doxygen. Using this option one can overrule certain style aspects.
1123 # This is preferred over using HTML_STYLESHEET since it does not replace the
1124 # standard style sheet and is therefore more robust against future updates.
1125 # Doxygen will copy the style sheet files to the output directory.
1126 # Note: The order of the extra style sheet files is of importance (e.g. the last
1127 # style sheet in the list overrules the setting of the previous ones in the
1128 # list). For an example see the documentation.
1129 # This tag requires that the tag GENERATE_HTML is set to YES.
1130 
1131 HTML_EXTRA_STYLESHEET =
1132 
1133 # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
1134 # other source files which should be copied to the HTML output directory. Note
1135 # that these files will be copied to the base HTML output directory. Use the
1136 # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
1137 # files. In the HTML_STYLESHEET file, use the file name only. Also note that the
1138 # files will be copied as-is; there are no commands or markers available.
1139 # This tag requires that the tag GENERATE_HTML is set to YES.
1140 
1141 HTML_EXTRA_FILES =
1142 
1143 # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
1144 # will adjust the colors in the style sheet and background images according to
1145 # this color. Hue is specified as an angle on a colorwheel, see
1146 # http://en.wikipedia.org/wiki/Hue for more information. For instance the value
1147 # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
1148 # purple, and 360 is red again.
1149 # Minimum value: 0, maximum value: 359, default value: 220.
1150 # This tag requires that the tag GENERATE_HTML is set to YES.
1151 
1152 HTML_COLORSTYLE_HUE = 220
1153 
1154 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
1155 # in the HTML output. For a value of 0 the output will use grayscales only. A
1156 # value of 255 will produce the most vivid colors.
1157 # Minimum value: 0, maximum value: 255, default value: 100.
1158 # This tag requires that the tag GENERATE_HTML is set to YES.
1159 
1160 HTML_COLORSTYLE_SAT = 100
1161 
1162 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
1163 # luminance component of the colors in the HTML output. Values below 100
1164 # gradually make the output lighter, whereas values above 100 make the output
1165 # darker. The value divided by 100 is the actual gamma applied, so 80 represents
1166 # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
1167 # change the gamma.
1168 # Minimum value: 40, maximum value: 240, default value: 80.
1169 # This tag requires that the tag GENERATE_HTML is set to YES.
1170 
1171 HTML_COLORSTYLE_GAMMA = 80
1172 
1173 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
1174 # page will contain the date and time when the page was generated. Setting this
1175 # to YES can help to show when doxygen was last run and thus if the
1176 # documentation is up to date.
1177 # The default value is: NO.
1178 # This tag requires that the tag GENERATE_HTML is set to YES.
1179 
1180 HTML_TIMESTAMP = NO
1181 
1182 # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
1183 # documentation will contain sections that can be hidden and shown after the
1184 # page has loaded.
1185 # The default value is: NO.
1186 # This tag requires that the tag GENERATE_HTML is set to YES.
1187 
1188 HTML_DYNAMIC_SECTIONS = NO
1189 
1190 # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
1191 # shown in the various tree structured indices initially; the user can expand
1192 # and collapse entries dynamically later on. Doxygen will expand the tree to
1193 # such a level that at most the specified number of entries are visible (unless
1194 # a fully collapsed tree already exceeds this amount). So setting the number of
1195 # entries 1 will produce a full collapsed tree by default. 0 is a special value
1196 # representing an infinite number of entries and will result in a full expanded
1197 # tree by default.
1198 # Minimum value: 0, maximum value: 9999, default value: 100.
1199 # This tag requires that the tag GENERATE_HTML is set to YES.
1200 
1201 HTML_INDEX_NUM_ENTRIES = 100
1202 
1203 # If the GENERATE_DOCSET tag is set to YES, additional index files will be
1204 # generated that can be used as input for Apple's Xcode 3 integrated development
1205 # environment (see: http://developer.apple.com/tools/xcode/), introduced with
1206 # OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
1207 # Makefile in the HTML output directory. Running make will produce the docset in
1208 # that directory and running make install will install the docset in
1209 # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
1210 # startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
1211 # for more information.
1212 # The default value is: NO.
1213 # This tag requires that the tag GENERATE_HTML is set to YES.
1214 
1215 GENERATE_DOCSET = NO
1216 
1217 # This tag determines the name of the docset feed. A documentation feed provides
1218 # an umbrella under which multiple documentation sets from a single provider
1219 # (such as a company or product suite) can be grouped.
1220 # The default value is: Doxygen generated docs.
1221 # This tag requires that the tag GENERATE_DOCSET is set to YES.
1222 
1223 DOCSET_FEEDNAME = "Doxygen generated docs"
1224 
1225 # This tag specifies a string that should uniquely identify the documentation
1226 # set bundle. This should be a reverse domain-name style string, e.g.
1227 # com.mycompany.MyDocSet. Doxygen will append .docset to the name.
1228 # The default value is: org.doxygen.Project.
1229 # This tag requires that the tag GENERATE_DOCSET is set to YES.
1230 
1231 DOCSET_BUNDLE_ID = org.doxygen.Project
1232 
1233 # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
1234 # the documentation publisher. This should be a reverse domain-name style
1235 # string, e.g. com.mycompany.MyDocSet.documentation.
1236 # The default value is: org.doxygen.Publisher.
1237 # This tag requires that the tag GENERATE_DOCSET is set to YES.
1238 
1239 DOCSET_PUBLISHER_ID = org.doxygen.Publisher
1240 
1241 # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
1242 # The default value is: Publisher.
1243 # This tag requires that the tag GENERATE_DOCSET is set to YES.
1244 
1245 DOCSET_PUBLISHER_NAME = Publisher
1246 
1247 # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
1248 # additional HTML index files: index.hhp, index.hhc, and index.hhk. The
1249 # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
1250 # (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
1251 # Windows.
1252 #
1253 # The HTML Help Workshop contains a compiler that can convert all HTML output
1254 # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
1255 # files are now used as the Windows 98 help format, and will replace the old
1256 # Windows help format (.hlp) on all Windows platforms in the future. Compressed
1257 # HTML files also contain an index, a table of contents, and you can search for
1258 # words in the documentation. The HTML workshop also contains a viewer for
1259 # compressed HTML files.
1260 # The default value is: NO.
1261 # This tag requires that the tag GENERATE_HTML is set to YES.
1262 
1263 GENERATE_HTMLHELP = NO
1264 
1265 # The CHM_FILE tag can be used to specify the file name of the resulting .chm
1266 # file. You can add a path in front of the file if the result should not be
1267 # written to the html output directory.
1268 # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
1269 
1270 CHM_FILE =
1271 
1272 # The HHC_LOCATION tag can be used to specify the location (absolute path
1273 # including file name) of the HTML help compiler (hhc.exe). If non-empty,
1274 # doxygen will try to run the HTML help compiler on the generated index.hhp.
1275 # The file has to be specified with full path.
1276 # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
1277 
1278 HHC_LOCATION =
1279 
1280 # The GENERATE_CHI flag controls if a separate .chi index file is generated
1281 # (YES) or that it should be included in the master .chm file (NO).
1282 # The default value is: NO.
1283 # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
1284 
1285 GENERATE_CHI = NO
1286 
1287 # The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
1288 # and project file content.
1289 # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
1290 
1291 CHM_INDEX_ENCODING =
1292 
1293 # The BINARY_TOC flag controls whether a binary table of contents is generated
1294 # (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
1295 # enables the Previous and Next buttons.
1296 # The default value is: NO.
1297 # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
1298 
1299 BINARY_TOC = NO
1300 
1301 # The TOC_EXPAND flag can be set to YES to add extra items for group members to
1302 # the table of contents of the HTML help documentation and to the tree view.
1303 # The default value is: NO.
1304 # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
1305 
1306 TOC_EXPAND = NO
1307 
1308 # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
1309 # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
1310 # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
1311 # (.qch) of the generated HTML documentation.
1312 # The default value is: NO.
1313 # This tag requires that the tag GENERATE_HTML is set to YES.
1314 
1315 GENERATE_QHP = NO
1316 
1317 # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
1318 # the file name of the resulting .qch file. The path specified is relative to
1319 # the HTML output folder.
1320 # This tag requires that the tag GENERATE_QHP is set to YES.
1321 
1322 QCH_FILE =
1323 
1324 # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
1325 # Project output. For more information please see Qt Help Project / Namespace
1326 # (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
1327 # The default value is: org.doxygen.Project.
1328 # This tag requires that the tag GENERATE_QHP is set to YES.
1329 
1330 QHP_NAMESPACE = org.doxygen.Project
1331 
1332 # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
1333 # Help Project output. For more information please see Qt Help Project / Virtual
1334 # Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
1335 # folders).
1336 # The default value is: doc.
1337 # This tag requires that the tag GENERATE_QHP is set to YES.
1338 
1339 QHP_VIRTUAL_FOLDER = doc
1340 
1341 # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
1342 # filter to add. For more information please see Qt Help Project / Custom
1343 # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
1344 # filters).
1345 # This tag requires that the tag GENERATE_QHP is set to YES.
1346 
1347 QHP_CUST_FILTER_NAME =
1348 
1349 # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
1350 # custom filter to add. For more information please see Qt Help Project / Custom
1351 # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
1352 # filters).
1353 # This tag requires that the tag GENERATE_QHP is set to YES.
1354 
1355 QHP_CUST_FILTER_ATTRS =
1356 
1357 # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
1358 # project's filter section matches. Qt Help Project / Filter Attributes (see:
1359 # http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
1360 # This tag requires that the tag GENERATE_QHP is set to YES.
1361 
1362 QHP_SECT_FILTER_ATTRS =
1363 
1364 # The QHG_LOCATION tag can be used to specify the location of Qt's
1365 # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
1366 # generated .qhp file.
1367 # This tag requires that the tag GENERATE_QHP is set to YES.
1368 
1369 QHG_LOCATION =
1370 
1371 # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
1372 # generated, together with the HTML files, they form an Eclipse help plugin. To
1373 # install this plugin and make it available under the help contents menu in
1374 # Eclipse, the contents of the directory containing the HTML and XML files needs
1375 # to be copied into the plugins directory of eclipse. The name of the directory
1376 # within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
1377 # After copying Eclipse needs to be restarted before the help appears.
1378 # The default value is: NO.
1379 # This tag requires that the tag GENERATE_HTML is set to YES.
1380 
1381 GENERATE_ECLIPSEHELP = NO
1382 
1383 # A unique identifier for the Eclipse help plugin. When installing the plugin
1384 # the directory name containing the HTML and XML files should also have this
1385 # name. Each documentation set should have its own identifier.
1386 # The default value is: org.doxygen.Project.
1387 # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
1388 
1389 ECLIPSE_DOC_ID = org.doxygen.Project
1390 
1391 # If you want full control over the layout of the generated HTML pages it might
1392 # be necessary to disable the index and replace it with your own. The
1393 # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
1394 # of each HTML page. A value of NO enables the index and the value YES disables
1395 # it. Since the tabs in the index contain the same information as the navigation
1396 # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
1397 # The default value is: NO.
1398 # This tag requires that the tag GENERATE_HTML is set to YES.
1399 
1400 DISABLE_INDEX = NO
1401 
1402 # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
1403 # structure should be generated to display hierarchical information. If the tag
1404 # value is set to YES, a side panel will be generated containing a tree-like
1405 # index structure (just like the one that is generated for HTML Help). For this
1406 # to work a browser that supports JavaScript, DHTML, CSS and frames is required
1407 # (i.e. any modern browser). Windows users are probably better off using the
1408 # HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
1409 # further fine-tune the look of the index. As an example, the default style
1410 # sheet generated by doxygen has an example that shows how to put an image at
1411 # the root of the tree instead of the PROJECT_NAME. Since the tree basically has
1412 # the same information as the tab index, you could consider setting
1413 # DISABLE_INDEX to YES when enabling this option.
1414 # The default value is: NO.
1415 # This tag requires that the tag GENERATE_HTML is set to YES.
1416 
1417 GENERATE_TREEVIEW = NO
1418 
1419 # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
1420 # doxygen will group on one line in the generated HTML documentation.
1421 #
1422 # Note that a value of 0 will completely suppress the enum values from appearing
1423 # in the overview section.
1424 # Minimum value: 0, maximum value: 20, default value: 4.
1425 # This tag requires that the tag GENERATE_HTML is set to YES.
1426 
1427 ENUM_VALUES_PER_LINE = 4
1428 
1429 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
1430 # to set the initial width (in pixels) of the frame in which the tree is shown.
1431 # Minimum value: 0, maximum value: 1500, default value: 250.
1432 # This tag requires that the tag GENERATE_HTML is set to YES.
1433 
1434 TREEVIEW_WIDTH = 250
1435 
1436 # If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
1437 # external symbols imported via tag files in a separate window.
1438 # The default value is: NO.
1439 # This tag requires that the tag GENERATE_HTML is set to YES.
1440 
1441 EXT_LINKS_IN_WINDOW = NO
1442 
1443 # Use this tag to change the font size of LaTeX formulas included as images in
1444 # the HTML documentation. When you change the font size after a successful
1445 # doxygen run you need to manually remove any form_*.png images from the HTML
1446 # output directory to force them to be regenerated.
1447 # Minimum value: 8, maximum value: 50, default value: 10.
1448 # This tag requires that the tag GENERATE_HTML is set to YES.
1449 
1450 FORMULA_FONTSIZE = 10
1451 
1452 # Use the FORMULA_TRANPARENT tag to determine whether or not the images
1453 # generated for formulas are transparent PNGs. Transparent PNGs are not
1454 # supported properly for IE 6.0, but are supported on all modern browsers.
1455 #
1456 # Note that when changing this option you need to delete any form_*.png files in
1457 # the HTML output directory before the changes have effect.
1458 # The default value is: YES.
1459 # This tag requires that the tag GENERATE_HTML is set to YES.
1460 
1461 FORMULA_TRANSPARENT = YES
1462 
1463 # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
1464 # http://www.mathjax.org) which uses client side Javascript for the rendering
1465 # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
1466 # installed or if you want to formulas look prettier in the HTML output. When
1467 # enabled you may also need to install MathJax separately and configure the path
1468 # to it using the MATHJAX_RELPATH option.
1469 # The default value is: NO.
1470 # This tag requires that the tag GENERATE_HTML is set to YES.
1471 
1472 USE_MATHJAX = NO
1473 
1474 # When MathJax is enabled you can set the default output format to be used for
1475 # the MathJax output. See the MathJax site (see:
1476 # http://docs.mathjax.org/en/latest/output.html) for more details.
1477 # Possible values are: HTML-CSS (which is slower, but has the best
1478 # compatibility), NativeMML (i.e. MathML) and SVG.
1479 # The default value is: HTML-CSS.
1480 # This tag requires that the tag USE_MATHJAX is set to YES.
1481 
1482 MATHJAX_FORMAT = HTML-CSS
1483 
1484 # When MathJax is enabled you need to specify the location relative to the HTML
1485 # output directory using the MATHJAX_RELPATH option. The destination directory
1486 # should contain the MathJax.js script. For instance, if the mathjax directory
1487 # is located at the same level as the HTML output directory, then
1488 # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
1489 # Content Delivery Network so you can quickly see the result without installing
1490 # MathJax. However, it is strongly recommended to install a local copy of
1491 # MathJax from http://www.mathjax.org before deployment.
1492 # The default value is: http://cdn.mathjax.org/mathjax/latest.
1493 # This tag requires that the tag USE_MATHJAX is set to YES.
1494 
1495 MATHJAX_RELPATH = http://www.mathjax.org/mathjax
1496 
1497 # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
1498 # extension names that should be enabled during MathJax rendering. For example
1499 # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
1500 # This tag requires that the tag USE_MATHJAX is set to YES.
1501 
1502 MATHJAX_EXTENSIONS =
1503 
1504 # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
1505 # of code that will be used on startup of the MathJax code. See the MathJax site
1506 # (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
1507 # example see the documentation.
1508 # This tag requires that the tag USE_MATHJAX is set to YES.
1509 
1510 MATHJAX_CODEFILE =
1511 
1512 # When the SEARCHENGINE tag is enabled doxygen will generate a search box for
1513 # the HTML output. The underlying search engine uses javascript and DHTML and
1514 # should work on any modern browser. Note that when using HTML help
1515 # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
1516 # there is already a search function so this one should typically be disabled.
1517 # For large projects the javascript based search engine can be slow, then
1518 # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
1519 # search using the keyboard; to jump to the search box use <access key> + S
1520 # (what the <access key> is depends on the OS and browser, but it is typically
1521 # <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
1522 # key> to jump into the search results window, the results can be navigated
1523 # using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
1524 # the search. The filter options can be selected when the cursor is inside the
1525 # search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
1526 # to select a filter and <Enter> or <escape> to activate or cancel the filter
1527 # option.
1528 # The default value is: YES.
1529 # This tag requires that the tag GENERATE_HTML is set to YES.
1530 
1531 SEARCHENGINE = YES
1532 
1533 # When the SERVER_BASED_SEARCH tag is enabled the search engine will be
1534 # implemented using a web server instead of a web client using Javascript. There
1535 # are two flavors of web server based searching depending on the EXTERNAL_SEARCH
1536 # setting. When disabled, doxygen will generate a PHP script for searching and
1537 # an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
1538 # and searching needs to be provided by external tools. See the section
1539 # "External Indexing and Searching" for details.
1540 # The default value is: NO.
1541 # This tag requires that the tag SEARCHENGINE is set to YES.
1542 
1543 SERVER_BASED_SEARCH = NO
1544 
1545 # When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
1546 # script for searching. Instead the search results are written to an XML file
1547 # which needs to be processed by an external indexer. Doxygen will invoke an
1548 # external search engine pointed to by the SEARCHENGINE_URL option to obtain the
1549 # search results.
1550 #
1551 # Doxygen ships with an example indexer (doxyindexer) and search engine
1552 # (doxysearch.cgi) which are based on the open source search engine library
1553 # Xapian (see: http://xapian.org/).
1554 #
1555 # See the section "External Indexing and Searching" for details.
1556 # The default value is: NO.
1557 # This tag requires that the tag SEARCHENGINE is set to YES.
1558 
1559 EXTERNAL_SEARCH = NO
1560 
1561 # The SEARCHENGINE_URL should point to a search engine hosted by a web server
1562 # which will return the search results when EXTERNAL_SEARCH is enabled.
1563 #
1564 # Doxygen ships with an example indexer (doxyindexer) and search engine
1565 # (doxysearch.cgi) which are based on the open source search engine library
1566 # Xapian (see: http://xapian.org/). See the section "External Indexing and
1567 # Searching" for details.
1568 # This tag requires that the tag SEARCHENGINE is set to YES.
1569 
1570 SEARCHENGINE_URL =
1571 
1572 # When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
1573 # search data is written to a file for indexing by an external tool. With the
1574 # SEARCHDATA_FILE tag the name of this file can be specified.
1575 # The default file is: searchdata.xml.
1576 # This tag requires that the tag SEARCHENGINE is set to YES.
1577 
1578 SEARCHDATA_FILE = searchdata.xml
1579 
1580 # When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
1581 # EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
1582 # useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
1583 # projects and redirect the results back to the right project.
1584 # This tag requires that the tag SEARCHENGINE is set to YES.
1585 
1586 EXTERNAL_SEARCH_ID =
1587 
1588 # The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
1589 # projects other than the one defined by this configuration file, but that are
1590 # all added to the same external search index. Each project needs to have a
1591 # unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
1592 # to a relative location where the documentation can be found. The format is:
1593 # EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
1594 # This tag requires that the tag SEARCHENGINE is set to YES.
1595 
1596 EXTRA_SEARCH_MAPPINGS =
1597 
1598 #---------------------------------------------------------------------------
1599 # Configuration options related to the LaTeX output
1600 #---------------------------------------------------------------------------
1601 
1602 # If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
1603 # The default value is: YES.
1604 
1605 GENERATE_LATEX = NO
1606 
1607 # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
1608 # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
1609 # it.
1610 # The default directory is: latex.
1611 # This tag requires that the tag GENERATE_LATEX is set to YES.
1612 
1613 LATEX_OUTPUT = latex
1614 
1615 # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
1616 # invoked.
1617 #
1618 # Note that when enabling USE_PDFLATEX this option is only used for generating
1619 # bitmaps for formulas in the HTML output, but not in the Makefile that is
1620 # written to the output directory.
1621 # The default file is: latex.
1622 # This tag requires that the tag GENERATE_LATEX is set to YES.
1623 
1624 LATEX_CMD_NAME = latex
1625 
1626 # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
1627 # index for LaTeX.
1628 # The default file is: makeindex.
1629 # This tag requires that the tag GENERATE_LATEX is set to YES.
1630 
1631 MAKEINDEX_CMD_NAME = makeindex
1632 
1633 # If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
1634 # documents. This may be useful for small projects and may help to save some
1635 # trees in general.
1636 # The default value is: NO.
1637 # This tag requires that the tag GENERATE_LATEX is set to YES.
1638 
1639 COMPACT_LATEX = NO
1640 
1641 # The PAPER_TYPE tag can be used to set the paper type that is used by the
1642 # printer.
1643 # Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
1644 # 14 inches) and executive (7.25 x 10.5 inches).
1645 # The default value is: a4.
1646 # This tag requires that the tag GENERATE_LATEX is set to YES.
1647 
1648 PAPER_TYPE = a4wide
1649 
1650 # The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
1651 # that should be included in the LaTeX output. The package can be specified just
1652 # by its name or with the correct syntax as to be used with the LaTeX
1653 # \usepackage command. To get the times font for instance you can specify :
1654 # EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
1655 # To use the option intlimits with the amsmath package you can specify:
1656 # EXTRA_PACKAGES=[intlimits]{amsmath}
1657 # If left blank no extra packages will be included.
1658 # This tag requires that the tag GENERATE_LATEX is set to YES.
1659 
1660 EXTRA_PACKAGES =
1661 
1662 # The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
1663 # generated LaTeX document. The header should contain everything until the first
1664 # chapter. If it is left blank doxygen will generate a standard header. See
1665 # section "Doxygen usage" for information on how to let doxygen write the
1666 # default header to a separate file.
1667 #
1668 # Note: Only use a user-defined header if you know what you are doing! The
1669 # following commands have a special meaning inside the header: $title,
1670 # $datetime, $date, $doxygenversion, $projectname, $projectnumber,
1671 # $projectbrief, $projectlogo. Doxygen will replace $title with the empty
1672 # string, for the replacement values of the other commands the user is referred
1673 # to HTML_HEADER.
1674 # This tag requires that the tag GENERATE_LATEX is set to YES.
1675 
1676 LATEX_HEADER =
1677 
1678 # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
1679 # generated LaTeX document. The footer should contain everything after the last
1680 # chapter. If it is left blank doxygen will generate a standard footer. See
1681 # LATEX_HEADER for more information on how to generate a default footer and what
1682 # special commands can be used inside the footer.
1683 #
1684 # Note: Only use a user-defined footer if you know what you are doing!
1685 # This tag requires that the tag GENERATE_LATEX is set to YES.
1686 
1687 LATEX_FOOTER =
1688 
1689 # The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
1690 # LaTeX style sheets that are included after the standard style sheets created
1691 # by doxygen. Using this option one can overrule certain style aspects. Doxygen
1692 # will copy the style sheet files to the output directory.
1693 # Note: The order of the extra style sheet files is of importance (e.g. the last
1694 # style sheet in the list overrules the setting of the previous ones in the
1695 # list).
1696 # This tag requires that the tag GENERATE_LATEX is set to YES.
1697 
1698 LATEX_EXTRA_STYLESHEET =
1699 
1700 # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
1701 # other source files which should be copied to the LATEX_OUTPUT output
1702 # directory. Note that the files will be copied as-is; there are no commands or
1703 # markers available.
1704 # This tag requires that the tag GENERATE_LATEX is set to YES.
1705 
1706 LATEX_EXTRA_FILES =
1707 
1708 # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
1709 # prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
1710 # contain links (just like the HTML output) instead of page references. This
1711 # makes the output suitable for online browsing using a PDF viewer.
1712 # The default value is: YES.
1713 # This tag requires that the tag GENERATE_LATEX is set to YES.
1714 
1715 PDF_HYPERLINKS = NO
1716 
1717 # If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
1718 # the PDF file directly from the LaTeX files. Set this option to YES, to get a
1719 # higher quality PDF documentation.
1720 # The default value is: YES.
1721 # This tag requires that the tag GENERATE_LATEX is set to YES.
1722 
1723 USE_PDFLATEX = YES
1724 
1725 # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
1726 # command to the generated LaTeX files. This will instruct LaTeX to keep running
1727 # if errors occur, instead of asking the user for help. This option is also used
1728 # when generating formulas in HTML.
1729 # The default value is: NO.
1730 # This tag requires that the tag GENERATE_LATEX is set to YES.
1731 
1732 LATEX_BATCHMODE = NO
1733 
1734 # If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
1735 # index chapters (such as File Index, Compound Index, etc.) in the output.
1736 # The default value is: NO.
1737 # This tag requires that the tag GENERATE_LATEX is set to YES.
1738 
1739 LATEX_HIDE_INDICES = NO
1740 
1741 # If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
1742 # code with syntax highlighting in the LaTeX output.
1743 #
1744 # Note that which sources are shown also depends on other settings such as
1745 # SOURCE_BROWSER.
1746 # The default value is: NO.
1747 # This tag requires that the tag GENERATE_LATEX is set to YES.
1748 
1749 LATEX_SOURCE_CODE = NO
1750 
1751 # The LATEX_BIB_STYLE tag can be used to specify the style to use for the
1752 # bibliography, e.g. plainnat, or ieeetr. See
1753 # http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
1754 # The default value is: plain.
1755 # This tag requires that the tag GENERATE_LATEX is set to YES.
1756 
1757 LATEX_BIB_STYLE = plain
1758 
1759 #---------------------------------------------------------------------------
1760 # Configuration options related to the RTF output
1761 #---------------------------------------------------------------------------
1762 
1763 # If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
1764 # RTF output is optimized for Word 97 and may not look too pretty with other RTF
1765 # readers/editors.
1766 # The default value is: NO.
1767 
1768 GENERATE_RTF = NO
1769 
1770 # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
1771 # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
1772 # it.
1773 # The default directory is: rtf.
1774 # This tag requires that the tag GENERATE_RTF is set to YES.
1775 
1776 RTF_OUTPUT = glm.rtf
1777 
1778 # If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
1779 # documents. This may be useful for small projects and may help to save some
1780 # trees in general.
1781 # The default value is: NO.
1782 # This tag requires that the tag GENERATE_RTF is set to YES.
1783 
1784 COMPACT_RTF = NO
1785 
1786 # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
1787 # contain hyperlink fields. The RTF file will contain links (just like the HTML
1788 # output) instead of page references. This makes the output suitable for online
1789 # browsing using Word or some other Word compatible readers that support those
1790 # fields.
1791 #
1792 # Note: WordPad (write) and others do not support links.
1793 # The default value is: NO.
1794 # This tag requires that the tag GENERATE_RTF is set to YES.
1795 
1796 RTF_HYPERLINKS = YES
1797 
1798 # Load stylesheet definitions from file. Syntax is similar to doxygen's config
1799 # file, i.e. a series of assignments. You only have to provide replacements,
1800 # missing definitions are set to their default value.
1801 #
1802 # See also section "Doxygen usage" for information on how to generate the
1803 # default style sheet that doxygen normally uses.
1804 # This tag requires that the tag GENERATE_RTF is set to YES.
1805 
1806 RTF_STYLESHEET_FILE =
1807 
1808 # Set optional variables used in the generation of an RTF document. Syntax is
1809 # similar to doxygen's config file. A template extensions file can be generated
1810 # using doxygen -e rtf extensionFile.
1811 # This tag requires that the tag GENERATE_RTF is set to YES.
1812 
1813 RTF_EXTENSIONS_FILE =
1814 
1815 # If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
1816 # with syntax highlighting in the RTF output.
1817 #
1818 # Note that which sources are shown also depends on other settings such as
1819 # SOURCE_BROWSER.
1820 # The default value is: NO.
1821 # This tag requires that the tag GENERATE_RTF is set to YES.
1822 
1823 RTF_SOURCE_CODE = NO
1824 
1825 #---------------------------------------------------------------------------
1826 # Configuration options related to the man page output
1827 #---------------------------------------------------------------------------
1828 
1829 # If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
1830 # classes and files.
1831 # The default value is: NO.
1832 
1833 GENERATE_MAN = NO
1834 
1835 # The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
1836 # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
1837 # it. A directory man3 will be created inside the directory specified by
1838 # MAN_OUTPUT.
1839 # The default directory is: man.
1840 # This tag requires that the tag GENERATE_MAN is set to YES.
1841 
1842 MAN_OUTPUT = man
1843 
1844 # The MAN_EXTENSION tag determines the extension that is added to the generated
1845 # man pages. In case the manual section does not start with a number, the number
1846 # 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
1847 # optional.
1848 # The default value is: .3.
1849 # This tag requires that the tag GENERATE_MAN is set to YES.
1850 
1851 MAN_EXTENSION = .3
1852 
1853 # The MAN_SUBDIR tag determines the name of the directory created within
1854 # MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
1855 # MAN_EXTENSION with the initial . removed.
1856 # This tag requires that the tag GENERATE_MAN is set to YES.
1857 
1858 MAN_SUBDIR =
1859 
1860 # If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
1861 # will generate one additional man file for each entity documented in the real
1862 # man page(s). These additional files only source the real man page, but without
1863 # them the man command would be unable to find the correct page.
1864 # The default value is: NO.
1865 # This tag requires that the tag GENERATE_MAN is set to YES.
1866 
1867 MAN_LINKS = NO
1868 
1869 #---------------------------------------------------------------------------
1870 # Configuration options related to the XML output
1871 #---------------------------------------------------------------------------
1872 
1873 # If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
1874 # captures the structure of the code including all documentation.
1875 # The default value is: NO.
1876 
1877 GENERATE_XML = NO
1878 
1879 # The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
1880 # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
1881 # it.
1882 # The default directory is: xml.
1883 # This tag requires that the tag GENERATE_XML is set to YES.
1884 
1885 XML_OUTPUT = xml
1886 
1887 # If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
1888 # listings (including syntax highlighting and cross-referencing information) to
1889 # the XML output. Note that enabling this will significantly increase the size
1890 # of the XML output.
1891 # The default value is: YES.
1892 # This tag requires that the tag GENERATE_XML is set to YES.
1893 
1894 XML_PROGRAMLISTING = YES
1895 
1896 #---------------------------------------------------------------------------
1897 # Configuration options related to the DOCBOOK output
1898 #---------------------------------------------------------------------------
1899 
1900 # If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
1901 # that can be used to generate PDF.
1902 # The default value is: NO.
1903 
1904 GENERATE_DOCBOOK = NO
1905 
1906 # The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
1907 # If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
1908 # front of it.
1909 # The default directory is: docbook.
1910 # This tag requires that the tag GENERATE_DOCBOOK is set to YES.
1911 
1912 DOCBOOK_OUTPUT = docbook
1913 
1914 # If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
1915 # program listings (including syntax highlighting and cross-referencing
1916 # information) to the DOCBOOK output. Note that enabling this will significantly
1917 # increase the size of the DOCBOOK output.
1918 # The default value is: NO.
1919 # This tag requires that the tag GENERATE_DOCBOOK is set to YES.
1920 
1921 DOCBOOK_PROGRAMLISTING = NO
1922 
1923 #---------------------------------------------------------------------------
1924 # Configuration options for the AutoGen Definitions output
1925 #---------------------------------------------------------------------------
1926 
1927 # If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
1928 # AutoGen Definitions (see http://autogen.sf.net) file that captures the
1929 # structure of the code including all documentation. Note that this feature is
1930 # still experimental and incomplete at the moment.
1931 # The default value is: NO.
1932 
1933 GENERATE_AUTOGEN_DEF = NO
1934 
1935 #---------------------------------------------------------------------------
1936 # Configuration options related to the Perl module output
1937 #---------------------------------------------------------------------------
1938 
1939 # If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
1940 # file that captures the structure of the code including all documentation.
1941 #
1942 # Note that this feature is still experimental and incomplete at the moment.
1943 # The default value is: NO.
1944 
1945 GENERATE_PERLMOD = NO
1946 
1947 # If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
1948 # Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
1949 # output from the Perl module output.
1950 # The default value is: NO.
1951 # This tag requires that the tag GENERATE_PERLMOD is set to YES.
1952 
1953 PERLMOD_LATEX = NO
1954 
1955 # If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
1956 # formatted so it can be parsed by a human reader. This is useful if you want to
1957 # understand what is going on. On the other hand, if this tag is set to NO, the
1958 # size of the Perl module output will be much smaller and Perl will parse it
1959 # just the same.
1960 # The default value is: YES.
1961 # This tag requires that the tag GENERATE_PERLMOD is set to YES.
1962 
1963 PERLMOD_PRETTY = YES
1964 
1965 # The names of the make variables in the generated doxyrules.make file are
1966 # prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
1967 # so different doxyrules.make files included by the same Makefile don't
1968 # overwrite each other's variables.
1969 # This tag requires that the tag GENERATE_PERLMOD is set to YES.
1970 
1971 PERLMOD_MAKEVAR_PREFIX =
1972 
1973 #---------------------------------------------------------------------------
1974 # Configuration options related to the preprocessor
1975 #---------------------------------------------------------------------------
1976 
1977 # If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
1978 # C-preprocessor directives found in the sources and include files.
1979 # The default value is: YES.
1980 
1981 ENABLE_PREPROCESSING = YES
1982 
1983 # If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
1984 # in the source code. If set to NO, only conditional compilation will be
1985 # performed. Macro expansion can be done in a controlled way by setting
1986 # EXPAND_ONLY_PREDEF to YES.
1987 # The default value is: NO.
1988 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
1989 
1990 MACRO_EXPANSION = NO
1991 
1992 # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
1993 # the macro expansion is limited to the macros specified with the PREDEFINED and
1994 # EXPAND_AS_DEFINED tags.
1995 # The default value is: NO.
1996 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
1997 
1998 EXPAND_ONLY_PREDEF = NO
1999 
2000 # If the SEARCH_INCLUDES tag is set to YES, the include files in the
2001 # INCLUDE_PATH will be searched if a #include is found.
2002 # The default value is: YES.
2003 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
2004 
2005 SEARCH_INCLUDES = YES
2006 
2007 # The INCLUDE_PATH tag can be used to specify one or more directories that
2008 # contain include files that are not input files but should be processed by the
2009 # preprocessor.
2010 # This tag requires that the tag SEARCH_INCLUDES is set to YES.
2011 
2012 INCLUDE_PATH =
2013 
2014 # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
2015 # patterns (like *.h and *.hpp) to filter out the header-files in the
2016 # directories. If left blank, the patterns specified with FILE_PATTERNS will be
2017 # used.
2018 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
2019 
2020 INCLUDE_FILE_PATTERNS =
2021 
2022 # The PREDEFINED tag can be used to specify one or more macro names that are
2023 # defined before the preprocessor is started (similar to the -D option of e.g.
2024 # gcc). The argument of the tag is a list of macros of the form: name or
2025 # name=definition (no spaces). If the definition and the "=" are omitted, "=1"
2026 # is assumed. To prevent a macro definition from being undefined via #undef or
2027 # recursively expanded use the := operator instead of the = operator.
2028 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
2029 
2030 PREDEFINED =
2031 
2032 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
2033 # tag can be used to specify a list of macro names that should be expanded. The
2034 # macro definition that is found in the sources will be used. Use the PREDEFINED
2035 # tag if you want to use a different macro definition that overrules the
2036 # definition found in the source code.
2037 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
2038 
2039 EXPAND_AS_DEFINED =
2040 
2041 # If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
2042 # remove all references to function-like macros that are alone on a line, have
2043 # an all uppercase name, and do not end with a semicolon. Such function macros
2044 # are typically used for boiler-plate code, and will confuse the parser if not
2045 # removed.
2046 # The default value is: YES.
2047 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
2048 
2049 SKIP_FUNCTION_MACROS = YES
2050 
2051 #---------------------------------------------------------------------------
2052 # Configuration options related to external references
2053 #---------------------------------------------------------------------------
2054 
2055 # The TAGFILES tag can be used to specify one or more tag files. For each tag
2056 # file the location of the external documentation should be added. The format of
2057 # a tag file without this location is as follows:
2058 # TAGFILES = file1 file2 ...
2059 # Adding location for the tag files is done as follows:
2060 # TAGFILES = file1=loc1 "file2 = loc2" ...
2061 # where loc1 and loc2 can be relative or absolute paths or URLs. See the
2062 # section "Linking to external documentation" for more information about the use
2063 # of tag files.
2064 # Note: Each tag file must have a unique name (where the name does NOT include
2065 # the path). If a tag file is not located in the directory in which doxygen is
2066 # run, you must also specify the path to the tagfile here.
2067 
2068 TAGFILES =
2069 
2070 # When a file name is specified after GENERATE_TAGFILE, doxygen will create a
2071 # tag file that is based on the input files it reads. See section "Linking to
2072 # external documentation" for more information about the usage of tag files.
2073 
2074 GENERATE_TAGFILE =
2075 
2076 # If the ALLEXTERNALS tag is set to YES, all external class will be listed in
2077 # the class index. If set to NO, only the inherited external classes will be
2078 # listed.
2079 # The default value is: NO.
2080 
2081 ALLEXTERNALS = NO
2082 
2083 # If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
2084 # in the modules index. If set to NO, only the current project's groups will be
2085 # listed.
2086 # The default value is: YES.
2087 
2088 EXTERNAL_GROUPS = YES
2089 
2090 # If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
2091 # the related pages index. If set to NO, only the current project's pages will
2092 # be listed.
2093 # The default value is: YES.
2094 
2095 EXTERNAL_PAGES = YES
2096 
2097 # The PERL_PATH should be the absolute path and name of the perl script
2098 # interpreter (i.e. the result of 'which perl').
2099 # The default file (with absolute path) is: /usr/bin/perl.
2100 
2101 PERL_PATH = /usr/bin/perl
2102 
2103 #---------------------------------------------------------------------------
2104 # Configuration options related to the dot tool
2105 #---------------------------------------------------------------------------
2106 
2107 # If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
2108 # (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
2109 # NO turns the diagrams off. Note that this option also works with HAVE_DOT
2110 # disabled, but it is recommended to install and use dot, since it yields more
2111 # powerful graphs.
2112 # The default value is: YES.
2113 
2114 CLASS_DIAGRAMS = YES
2115 
2116 # You can define message sequence charts within doxygen comments using the \msc
2117 # command. Doxygen will then run the mscgen tool (see:
2118 # http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
2119 # documentation. The MSCGEN_PATH tag allows you to specify the directory where
2120 # the mscgen tool resides. If left empty the tool is assumed to be found in the
2121 # default search path.
2122 
2123 MSCGEN_PATH =
2124 
2125 # You can include diagrams made with dia in doxygen documentation. Doxygen will
2126 # then run dia to produce the diagram and insert it in the documentation. The
2127 # DIA_PATH tag allows you to specify the directory where the dia binary resides.
2128 # If left empty dia is assumed to be found in the default search path.
2129 
2130 DIA_PATH =
2131 
2132 # If set to YES the inheritance and collaboration graphs will hide inheritance
2133 # and usage relations if the target is undocumented or is not a class.
2134 # The default value is: YES.
2135 
2136 HIDE_UNDOC_RELATIONS = YES
2137 
2138 # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
2139 # available from the path. This tool is part of Graphviz (see:
2140 # http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
2141 # Bell Labs. The other options in this section have no effect if this option is
2142 # set to NO
2143 # The default value is: NO.
2144 
2145 HAVE_DOT = NO
2146 
2147 # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
2148 # to run in parallel. When set to 0 doxygen will base this on the number of
2149 # processors available in the system. You can set it explicitly to a value
2150 # larger than 0 to get control over the balance between CPU load and processing
2151 # speed.
2152 # Minimum value: 0, maximum value: 32, default value: 0.
2153 # This tag requires that the tag HAVE_DOT is set to YES.
2154 
2155 DOT_NUM_THREADS = 0
2156 
2157 # When you want a differently looking font in the dot files that doxygen
2158 # generates you can specify the font name using DOT_FONTNAME. You need to make
2159 # sure dot is able to find the font, which can be done by putting it in a
2160 # standard location or by setting the DOTFONTPATH environment variable or by
2161 # setting DOT_FONTPATH to the directory containing the font.
2162 # The default value is: Helvetica.
2163 # This tag requires that the tag HAVE_DOT is set to YES.
2164 
2165 DOT_FONTNAME = Helvetica
2166 
2167 # The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
2168 # dot graphs.
2169 # Minimum value: 4, maximum value: 24, default value: 10.
2170 # This tag requires that the tag HAVE_DOT is set to YES.
2171 
2172 DOT_FONTSIZE = 10
2173 
2174 # By default doxygen will tell dot to use the default font as specified with
2175 # DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
2176 # the path where dot can find it using this tag.
2177 # This tag requires that the tag HAVE_DOT is set to YES.
2178 
2179 DOT_FONTPATH =
2180 
2181 # If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
2182 # each documented class showing the direct and indirect inheritance relations.
2183 # Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
2184 # The default value is: YES.
2185 # This tag requires that the tag HAVE_DOT is set to YES.
2186 
2187 CLASS_GRAPH = YES
2188 
2189 # If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
2190 # graph for each documented class showing the direct and indirect implementation
2191 # dependencies (inheritance, containment, and class references variables) of the
2192 # class with other documented classes.
2193 # The default value is: YES.
2194 # This tag requires that the tag HAVE_DOT is set to YES.
2195 
2196 COLLABORATION_GRAPH = YES
2197 
2198 # If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
2199 # groups, showing the direct groups dependencies.
2200 # The default value is: YES.
2201 # This tag requires that the tag HAVE_DOT is set to YES.
2202 
2203 GROUP_GRAPHS = YES
2204 
2205 # If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
2206 # collaboration diagrams in a style similar to the OMG's Unified Modeling
2207 # Language.
2208 # The default value is: NO.
2209 # This tag requires that the tag HAVE_DOT is set to YES.
2210 
2211 UML_LOOK = NO
2212 
2213 # If the UML_LOOK tag is enabled, the fields and methods are shown inside the
2214 # class node. If there are many fields or methods and many nodes the graph may
2215 # become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
2216 # number of items for each type to make the size more manageable. Set this to 0
2217 # for no limit. Note that the threshold may be exceeded by 50% before the limit
2218 # is enforced. So when you set the threshold to 10, up to 15 fields may appear,
2219 # but if the number exceeds 15, the total amount of fields shown is limited to
2220 # 10.
2221 # Minimum value: 0, maximum value: 100, default value: 10.
2222 # This tag requires that the tag HAVE_DOT is set to YES.
2223 
2224 UML_LIMIT_NUM_FIELDS = 10
2225 
2226 # If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
2227 # collaboration graphs will show the relations between templates and their
2228 # instances.
2229 # The default value is: NO.
2230 # This tag requires that the tag HAVE_DOT is set to YES.
2231 
2232 TEMPLATE_RELATIONS = NO
2233 
2234 # If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
2235 # YES then doxygen will generate a graph for each documented file showing the
2236 # direct and indirect include dependencies of the file with other documented
2237 # files.
2238 # The default value is: YES.
2239 # This tag requires that the tag HAVE_DOT is set to YES.
2240 
2241 INCLUDE_GRAPH = YES
2242 
2243 # If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
2244 # set to YES then doxygen will generate a graph for each documented file showing
2245 # the direct and indirect include dependencies of the file with other documented
2246 # files.
2247 # The default value is: YES.
2248 # This tag requires that the tag HAVE_DOT is set to YES.
2249 
2250 INCLUDED_BY_GRAPH = YES
2251 
2252 # If the CALL_GRAPH tag is set to YES then doxygen will generate a call
2253 # dependency graph for every global function or class method.
2254 #
2255 # Note that enabling this option will significantly increase the time of a run.
2256 # So in most cases it will be better to enable call graphs for selected
2257 # functions only using the \callgraph command. Disabling a call graph can be
2258 # accomplished by means of the command \hidecallgraph.
2259 # The default value is: NO.
2260 # This tag requires that the tag HAVE_DOT is set to YES.
2261 
2262 CALL_GRAPH = YES
2263 
2264 # If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
2265 # dependency graph for every global function or class method.
2266 #
2267 # Note that enabling this option will significantly increase the time of a run.
2268 # So in most cases it will be better to enable caller graphs for selected
2269 # functions only using the \callergraph command. Disabling a caller graph can be
2270 # accomplished by means of the command \hidecallergraph.
2271 # The default value is: NO.
2272 # This tag requires that the tag HAVE_DOT is set to YES.
2273 
2274 CALLER_GRAPH = YES
2275 
2276 # If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
2277 # hierarchy of all classes instead of a textual one.
2278 # The default value is: YES.
2279 # This tag requires that the tag HAVE_DOT is set to YES.
2280 
2281 GRAPHICAL_HIERARCHY = YES
2282 
2283 # If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
2284 # dependencies a directory has on other directories in a graphical way. The
2285 # dependency relations are determined by the #include relations between the
2286 # files in the directories.
2287 # The default value is: YES.
2288 # This tag requires that the tag HAVE_DOT is set to YES.
2289 
2290 DIRECTORY_GRAPH = YES
2291 
2292 # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
2293 # generated by dot. For an explanation of the image formats see the section
2294 # output formats in the documentation of the dot tool (Graphviz (see:
2295 # http://www.graphviz.org/)).
2296 # Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
2297 # to make the SVG files visible in IE 9+ (other browsers do not have this
2298 # requirement).
2299 # Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo,
2300 # png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
2301 # png:gdiplus:gdiplus.
2302 # The default value is: png.
2303 # This tag requires that the tag HAVE_DOT is set to YES.
2304 
2305 DOT_IMAGE_FORMAT = png
2306 
2307 # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
2308 # enable generation of interactive SVG images that allow zooming and panning.
2309 #
2310 # Note that this requires a modern browser other than Internet Explorer. Tested
2311 # and working are Firefox, Chrome, Safari, and Opera.
2312 # Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
2313 # the SVG files visible. Older versions of IE do not have SVG support.
2314 # The default value is: NO.
2315 # This tag requires that the tag HAVE_DOT is set to YES.
2316 
2317 INTERACTIVE_SVG = NO
2318 
2319 # The DOT_PATH tag can be used to specify the path where the dot tool can be
2320 # found. If left blank, it is assumed the dot tool can be found in the path.
2321 # This tag requires that the tag HAVE_DOT is set to YES.
2322 
2323 DOT_PATH =
2324 
2325 # The DOTFILE_DIRS tag can be used to specify one or more directories that
2326 # contain dot files that are included in the documentation (see the \dotfile
2327 # command).
2328 # This tag requires that the tag HAVE_DOT is set to YES.
2329 
2330 DOTFILE_DIRS =
2331 
2332 # The MSCFILE_DIRS tag can be used to specify one or more directories that
2333 # contain msc files that are included in the documentation (see the \mscfile
2334 # command).
2335 
2336 MSCFILE_DIRS =
2337 
2338 # The DIAFILE_DIRS tag can be used to specify one or more directories that
2339 # contain dia files that are included in the documentation (see the \diafile
2340 # command).
2341 
2342 DIAFILE_DIRS =
2343 
2344 # When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
2345 # path where java can find the plantuml.jar file. If left blank, it is assumed
2346 # PlantUML is not used or called during a preprocessing step. Doxygen will
2347 # generate a warning when it encounters a \startuml command in this case and
2348 # will not generate output for the diagram.
2349 
2350 PLANTUML_JAR_PATH =
2351 
2352 # When using plantuml, the specified paths are searched for files specified by
2353 # the !include statement in a plantuml block.
2354 
2355 PLANTUML_INCLUDE_PATH =
2356 
2357 # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
2358 # that will be shown in the graph. If the number of nodes in a graph becomes
2359 # larger than this value, doxygen will truncate the graph, which is visualized
2360 # by representing a node as a red box. Note that doxygen if the number of direct
2361 # children of the root node in a graph is already larger than
2362 # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
2363 # the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
2364 # Minimum value: 0, maximum value: 10000, default value: 50.
2365 # This tag requires that the tag HAVE_DOT is set to YES.
2366 
2367 DOT_GRAPH_MAX_NODES = 50
2368 
2369 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
2370 # generated by dot. A depth value of 3 means that only nodes reachable from the
2371 # root by following a path via at most 3 edges will be shown. Nodes that lay
2372 # further from the root node will be omitted. Note that setting this option to 1
2373 # or 2 may greatly reduce the computation time needed for large code bases. Also
2374 # note that the size of a graph can be further restricted by
2375 # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
2376 # Minimum value: 0, maximum value: 1000, default value: 0.
2377 # This tag requires that the tag HAVE_DOT is set to YES.
2378 
2379 MAX_DOT_GRAPH_DEPTH = 1000
2380 
2381 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
2382 # background. This is disabled by default, because dot on Windows does not seem
2383 # to support this out of the box.
2384 #
2385 # Warning: Depending on the platform used, enabling this option may lead to
2386 # badly anti-aliased labels on the edges of a graph (i.e. they become hard to
2387 # read).
2388 # The default value is: NO.
2389 # This tag requires that the tag HAVE_DOT is set to YES.
2390 
2391 DOT_TRANSPARENT = NO
2392 
2393 # Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
2394 # files in one run (i.e. multiple -o and -T options on the command line). This
2395 # makes dot run faster, but since only newer versions of dot (>1.8.10) support
2396 # this, this feature is disabled by default.
2397 # The default value is: NO.
2398 # This tag requires that the tag HAVE_DOT is set to YES.
2399 
2400 DOT_MULTI_TARGETS = NO
2401 
2402 # If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
2403 # explaining the meaning of the various boxes and arrows in the dot generated
2404 # graphs.
2405 # The default value is: YES.
2406 # This tag requires that the tag HAVE_DOT is set to YES.
2407 
2408 GENERATE_LEGEND = YES
2409 
2410 # If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
2411 # files that are used to generate the various graphs.
2412 # The default value is: YES.
2413 # This tag requires that the tag HAVE_DOT is set to YES.
2414 
2415 DOT_CLEANUP = YES
Definition: common.hpp:18
+
+ + + + diff --git a/common/glm/doc/api/a00663.html b/common/glm/doc/api/a00663.html new file mode 100644 index 000000000..387841ffb --- /dev/null +++ b/common/glm/doc/api/a00663.html @@ -0,0 +1,618 @@ + + + + + + + +0.9.9 API documenation: GLM_GTC_quaternion + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTC_quaternion
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > eulerAngles (qua< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > greaterThan (qua< T, Q > const &x, qua< T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > greaterThanEqual (qua< T, Q > const &x, qua< T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > lessThan (qua< T, Q > const &x, qua< T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > lessThanEqual (qua< T, Q > const &x, qua< T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > mat3_cast (qua< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > mat4_cast (qua< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T pitch (qua< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > quat_cast (mat< 3, 3, T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > quat_cast (mat< 4, 4, T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > quatLookAt (vec< 3, T, Q > const &direction, vec< 3, T, Q > const &up)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > quatLookAtLH (vec< 3, T, Q > const &direction, vec< 3, T, Q > const &up)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > quatLookAtRH (vec< 3, T, Q > const &direction, vec< 3, T, Q > const &up)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T roll (qua< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T yaw (qua< T, Q > const &x)
 
+

Detailed Description

+

Include <glm/gtc/quaternion.hpp> to use the features of this extension.

+

Defines a templated quaternion type and several quaternion operations.

+

Function Documentation

+ +

◆ eulerAngles()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::eulerAngles (qua< T, Q > const & x)
+
+ +

Returns euler angles, pitch as x, yaw as y, roll as z.

+

The result is expressed in radians.

+
Template Parameters
+ + +
TFloating-point scalar types.
+
+
+
See also
GLM_GTC_quaternion
+ +
+
+ +

◆ greaterThan()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<4, bool, Q> glm::greaterThan (qua< T, Q > const & x,
qua< T, Q > const & y 
)
+
+ +

Returns the component-wise comparison of result x > y.

+
Template Parameters
+ + + +
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLM_EXT_quaternion_relational
+ +
+
+ +

◆ greaterThanEqual()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<4, bool, Q> glm::greaterThanEqual (qua< T, Q > const & x,
qua< T, Q > const & y 
)
+
+ +

Returns the component-wise comparison of result x >= y.

+
Template Parameters
+ + + +
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLM_EXT_quaternion_relational
+ +
+
+ +

◆ lessThan()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<4, bool, Q> glm::lessThan (qua< T, Q > const & x,
qua< T, Q > const & y 
)
+
+ +

Returns the component-wise comparison result of x < y.

+
Template Parameters
+ + + +
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLM_EXT_quaternion_relational
+ +
+
+ +

◆ lessThanEqual()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<4, bool, Q> glm::lessThanEqual (qua< T, Q > const & x,
qua< T, Q > const & y 
)
+
+ +

Returns the component-wise comparison of result x <= y.

+
Template Parameters
+ + + +
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLM_EXT_quaternion_relational
+ +
+
+ +

◆ mat3_cast()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<3, 3, T, Q> glm::mat3_cast (qua< T, Q > const & x)
+
+ +

Converts a quaternion to a 3 * 3 matrix.

+
Template Parameters
+ + +
TFloating-point scalar types.
+
+
+
See also
GLM_GTC_quaternion
+ +

Referenced by glm::toMat3().

+ +
+
+ +

◆ mat4_cast()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::mat4_cast (qua< T, Q > const & x)
+
+ +

Converts a quaternion to a 4 * 4 matrix.

+
Template Parameters
+ + +
TFloating-point scalar types.
+
+
+
See also
GLM_GTC_quaternion
+ +

Referenced by glm::toMat4().

+ +
+
+ +

◆ pitch()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL T glm::pitch (qua< T, Q > const & x)
+
+ +

Returns pitch value of euler angles expressed in radians.

+
Template Parameters
+ + +
TFloating-point scalar types.
+
+
+
See also
GLM_GTC_quaternion
+ +
+
+ +

◆ quat_cast() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL qua<T, Q> glm::quat_cast (mat< 3, 3, T, Q > const & x)
+
+ +

Converts a pure rotation 3 * 3 matrix to a quaternion.

+
Template Parameters
+ + +
TFloating-point scalar types.
+
+
+
See also
GLM_GTC_quaternion
+ +

Referenced by glm::toQuat().

+ +
+
+ +

◆ quat_cast() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL qua<T, Q> glm::quat_cast (mat< 4, 4, T, Q > const & x)
+
+ +

Converts a pure rotation 4 * 4 matrix to a quaternion.

+
Template Parameters
+ + +
TFloating-point scalar types.
+
+
+
See also
GLM_GTC_quaternion
+ +
+
+ +

◆ quatLookAt()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL qua<T, Q> glm::quatLookAt (vec< 3, T, Q > const & direction,
vec< 3, T, Q > const & up 
)
+
+ +

Build a look at quaternion based on the default handedness.

+
Parameters
+ + + +
directionDesired forward direction. Needs to be normalized.
upUp vector, how the camera is oriented. Typically (0, 1, 0).
+
+
+ +
+
+ +

◆ quatLookAtLH()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL qua<T, Q> glm::quatLookAtLH (vec< 3, T, Q > const & direction,
vec< 3, T, Q > const & up 
)
+
+ +

Build a left-handed look at quaternion.

+
Parameters
+ + + +
directionDesired forward direction onto which the +z-axis gets mapped. Needs to be normalized.
upUp vector, how the camera is oriented. Typically (0, 1, 0).
+
+
+ +
+
+ +

◆ quatLookAtRH()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL qua<T, Q> glm::quatLookAtRH (vec< 3, T, Q > const & direction,
vec< 3, T, Q > const & up 
)
+
+ +

Build a right-handed look at quaternion.

+
Parameters
+ + + +
directionDesired forward direction onto which the -z-axis gets mapped. Needs to be normalized.
upUp vector, how the camera is oriented. Typically (0, 1, 0).
+
+
+ +
+
+ +

◆ roll()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL T glm::roll (qua< T, Q > const & x)
+
+ +

Returns roll value of euler angles expressed in radians.

+
Template Parameters
+ + +
TFloating-point scalar types.
+
+
+
See also
GLM_GTC_quaternion
+ +
+
+ +

◆ yaw()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL T glm::yaw (qua< T, Q > const & x)
+
+ +

Returns yaw value of euler angles expressed in radians.

+
Template Parameters
+ + +
TFloating-point scalar types.
+
+
+
See also
GLM_GTC_quaternion
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00664.html b/common/glm/doc/api/a00664.html new file mode 100644 index 000000000..78847d52f --- /dev/null +++ b/common/glm/doc/api/a00664.html @@ -0,0 +1,366 @@ + + + + + + + +0.9.9 API documenation: Exponential functions + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
Exponential functions
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > exp (vec< L, T, Q > const &v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > exp2 (vec< L, T, Q > const &v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > inversesqrt (vec< L, T, Q > const &v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > log (vec< L, T, Q > const &v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > log2 (vec< L, T, Q > const &v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > pow (vec< L, T, Q > const &base, vec< L, T, Q > const &exponent)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > sqrt (vec< L, T, Q > const &v)
 
+

Detailed Description

+

Provides GLSL exponential functions.

+

These all operate component-wise. The description is per component.

+

Include <glm/exponential.hpp> to use these core features.

+

Function Documentation

+ +

◆ exp()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::exp (vec< L, T, Q > const & v)
+
+ +

Returns the natural exponentiation of x, i.e., e^x.

+
Parameters
+ + +
vexp function is defined for input values of v defined in the range (inf-, inf+) in the limit of the type qualifier.
+
+
+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TFloating-point scalar types.
+
+
+
See also
GLSL exp man page
+
+GLSL 4.20.8 specification, section 8.2 Exponential Functions
+ +
+
+ +

◆ exp2()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::exp2 (vec< L, T, Q > const & v)
+
+ +

Returns 2 raised to the v power.

+
Parameters
+ + +
vexp2 function is defined for input values of v defined in the range (inf-, inf+) in the limit of the type qualifier.
+
+
+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TFloating-point scalar types.
+
+
+
See also
GLSL exp2 man page
+
+GLSL 4.20.8 specification, section 8.2 Exponential Functions
+ +
+
+ +

◆ inversesqrt()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::inversesqrt (vec< L, T, Q > const & v)
+
+ +

Returns the reciprocal of the positive square root of v.

+
Parameters
+ + +
vinversesqrt function is defined for input values of v defined in the range [0, inf+) in the limit of the type qualifier.
+
+
+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TFloating-point scalar types.
+
+
+
See also
GLSL inversesqrt man page
+
+GLSL 4.20.8 specification, section 8.2 Exponential Functions
+ +
+
+ +

◆ log()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::log (vec< L, T, Q > const & v)
+
+ +

Returns the natural logarithm of v, i.e., returns the value y which satisfies the equation x = e^y.

+

Results are undefined if v <= 0.

+
Parameters
+ + +
vlog function is defined for input values of v defined in the range (0, inf+) in the limit of the type qualifier.
+
+
+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TFloating-point scalar types.
+
+
+
See also
GLSL log man page
+
+GLSL 4.20.8 specification, section 8.2 Exponential Functions
+ +
+
+ +

◆ log2()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::log2 (vec< L, T, Q > const & v)
+
+ +

Returns the base 2 log of x, i.e., returns the value y, which satisfies the equation x = 2 ^ y.

+
Parameters
+ + +
vlog2 function is defined for input values of v defined in the range (0, inf+) in the limit of the type qualifier.
+
+
+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TFloating-point scalar types.
+
+
+
See also
GLSL log2 man page
+
+GLSL 4.20.8 specification, section 8.2 Exponential Functions
+ +
+
+ +

◆ pow()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::pow (vec< L, T, Q > const & base,
vec< L, T, Q > const & exponent 
)
+
+ +

Returns 'base' raised to the power 'exponent'.

+
Parameters
+ + + +
baseFloating point value. pow function is defined for input values of 'base' defined in the range (inf-, inf+) in the limit of the type qualifier.
exponentFloating point value representing the 'exponent'.
+
+
+
See also
GLSL pow man page
+
+GLSL 4.20.8 specification, section 8.2 Exponential Functions
+ +
+
+ +

◆ sqrt()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::sqrt (vec< L, T, Q > const & v)
+
+ +

Returns the positive square root of v.

+
Parameters
+ + +
vsqrt function is defined for input values of v defined in the range [0, inf+) in the limit of the type qualifier.
+
+
+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TFloating-point scalar types.
+
+
+
See also
GLSL sqrt man page
+
+GLSL 4.20.8 specification, section 8.2 Exponential Functions
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00665.html b/common/glm/doc/api/a00665.html new file mode 100644 index 000000000..22b55b139 --- /dev/null +++ b/common/glm/doc/api/a00665.html @@ -0,0 +1,2743 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_matrix_clip_space + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_matrix_clip_space
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > frustum (T left, T right, T bottom, T top, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > frustumLH (T left, T right, T bottom, T top, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > frustumLH_NO (T left, T right, T bottom, T top, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > frustumLH_ZO (T left, T right, T bottom, T top, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > frustumNO (T left, T right, T bottom, T top, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > frustumRH (T left, T right, T bottom, T top, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > frustumRH_NO (T left, T right, T bottom, T top, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > frustumRH_ZO (T left, T right, T bottom, T top, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > frustumZO (T left, T right, T bottom, T top, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > infinitePerspective (T fovy, T aspect, T near)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > infinitePerspectiveLH (T fovy, T aspect, T near)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > infinitePerspectiveRH (T fovy, T aspect, T near)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > ortho (T left, T right, T bottom, T top)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > ortho (T left, T right, T bottom, T top, T zNear, T zFar)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > orthoLH (T left, T right, T bottom, T top, T zNear, T zFar)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > orthoLH_NO (T left, T right, T bottom, T top, T zNear, T zFar)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > orthoLH_ZO (T left, T right, T bottom, T top, T zNear, T zFar)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > orthoNO (T left, T right, T bottom, T top, T zNear, T zFar)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > orthoRH (T left, T right, T bottom, T top, T zNear, T zFar)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > orthoRH_NO (T left, T right, T bottom, T top, T zNear, T zFar)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > orthoRH_ZO (T left, T right, T bottom, T top, T zNear, T zFar)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > orthoZO (T left, T right, T bottom, T top, T zNear, T zFar)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspective (T fovy, T aspect, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveFov (T fov, T width, T height, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveFovLH (T fov, T width, T height, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveFovLH_NO (T fov, T width, T height, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveFovLH_ZO (T fov, T width, T height, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveFovNO (T fov, T width, T height, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveFovRH (T fov, T width, T height, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveFovRH_NO (T fov, T width, T height, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveFovRH_ZO (T fov, T width, T height, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveFovZO (T fov, T width, T height, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveLH (T fovy, T aspect, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveLH_NO (T fovy, T aspect, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveLH_ZO (T fovy, T aspect, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveNO (T fovy, T aspect, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveRH (T fovy, T aspect, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveRH_NO (T fovy, T aspect, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveRH_ZO (T fovy, T aspect, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > perspectiveZO (T fovy, T aspect, T near, T far)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > tweakedInfinitePerspective (T fovy, T aspect, T near)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > tweakedInfinitePerspective (T fovy, T aspect, T near, T ep)
 
+

Detailed Description

+

Defines functions that generate common transformation matrices.

+

The matrices generated by this extension use standard OpenGL fixed-function conventions. For example, the lookAt function generates a transform from world space into the specific eye space that the projective matrix functions (perspective, ortho, etc) are designed to expect. The OpenGL compatibility specifications defines the particular layout of this eye space.

+

Include <glm/ext/matrix_clip_space.hpp> to use the features of this extension.

+
See also
GLM_EXT_matrix_transform
+
+GLM_EXT_matrix_projection
+

Function Documentation

+ +

◆ frustum()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::frustum (left,
right,
bottom,
top,
near,
far 
)
+
+ +

Creates a frustum matrix with default handedness, using the default handedness and default near and far clip planes definition.

+

To change default handedness use GLM_FORCE_LEFT_HANDED. To change default near and far clip planes definition use GLM_FORCE_DEPTH_ZERO_TO_ONE.

+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+
See also
glFrustum man page
+ +
+
+ +

◆ frustumLH()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::frustumLH (left,
right,
bottom,
top,
near,
far 
)
+
+ +

Creates a left handed frustum matrix.

+

If GLM_FORCE_DEPTH_ZERO_TO_ONE is defined, the near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition) Otherwise, the near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)

+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ frustumLH_NO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::frustumLH_NO (left,
right,
bottom,
top,
near,
far 
)
+
+ +

Creates a left handed frustum matrix.

+

The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)

+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ frustumLH_ZO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::frustumLH_ZO (left,
right,
bottom,
top,
near,
far 
)
+
+ +

Creates a left handed frustum matrix.

+

The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)

+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ frustumNO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::frustumNO (left,
right,
bottom,
top,
near,
far 
)
+
+ +

Creates a frustum matrix using left-handed coordinates if GLM_FORCE_LEFT_HANDED if defined or right-handed coordinates otherwise.

+

The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)

+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ frustumRH()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::frustumRH (left,
right,
bottom,
top,
near,
far 
)
+
+ +

Creates a right handed frustum matrix.

+

If GLM_FORCE_DEPTH_ZERO_TO_ONE is defined, the near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition) Otherwise, the near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)

+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ frustumRH_NO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::frustumRH_NO (left,
right,
bottom,
top,
near,
far 
)
+
+ +

Creates a right handed frustum matrix.

+

The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)

+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ frustumRH_ZO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::frustumRH_ZO (left,
right,
bottom,
top,
near,
far 
)
+
+ +

Creates a right handed frustum matrix.

+

The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)

+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ frustumZO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::frustumZO (left,
right,
bottom,
top,
near,
far 
)
+
+ +

Creates a frustum matrix using left-handed coordinates if GLM_FORCE_LEFT_HANDED if defined or right-handed coordinates otherwise.

+

The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)

+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ infinitePerspective()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::infinitePerspective (fovy,
aspect,
near 
)
+
+ +

Creates a matrix for a symmetric perspective-view frustum with far plane at infinite with default handedness.

+
Parameters
+ + + + +
fovySpecifies the field of view angle, in degrees, in the y direction. Expressed in radians.
aspectSpecifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
nearSpecifies the distance from the viewer to the near clipping plane (always positive).
+
+
+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ infinitePerspectiveLH()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::infinitePerspectiveLH (fovy,
aspect,
near 
)
+
+ +

Creates a matrix for a left handed, symmetric perspective-view frustum with far plane at infinite.

+
Parameters
+ + + + +
fovySpecifies the field of view angle, in degrees, in the y direction. Expressed in radians.
aspectSpecifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
nearSpecifies the distance from the viewer to the near clipping plane (always positive).
+
+
+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ infinitePerspectiveRH()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::infinitePerspectiveRH (fovy,
aspect,
near 
)
+
+ +

Creates a matrix for a right handed, symmetric perspective-view frustum with far plane at infinite.

+
Parameters
+ + + + +
fovySpecifies the field of view angle, in degrees, in the y direction. Expressed in radians.
aspectSpecifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
nearSpecifies the distance from the viewer to the near clipping plane (always positive).
+
+
+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ ortho() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::ortho (left,
right,
bottom,
top 
)
+
+ +

Creates a matrix for projecting two-dimensional coordinates onto the screen.

+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+
See also
- glm::ortho(T const& left, T const& right, T const& bottom, T const& top, T const& zNear, T const& zFar)
+
+gluOrtho2D man page
+ +
+
+ +

◆ ortho() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::ortho (left,
right,
bottom,
top,
zNear,
zFar 
)
+
+ +

Creates a matrix for an orthographic parallel viewing volume, using the default handedness and default near and far clip planes definition.

+

To change default handedness use GLM_FORCE_LEFT_HANDED. To change default near and far clip planes definition use GLM_FORCE_DEPTH_ZERO_TO_ONE.

+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+
See also
- glm::ortho(T const& left, T const& right, T const& bottom, T const& top)
+
+glOrtho man page
+ +
+
+ +

◆ orthoLH()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::orthoLH (left,
right,
bottom,
top,
zNear,
zFar 
)
+
+ +

Creates a matrix for an orthographic parallel viewing volume, using left-handed coordinates.

+

If GLM_FORCE_DEPTH_ZERO_TO_ONE is defined, the near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition) Otherwise, the near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)

+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+
See also
- glm::ortho(T const& left, T const& right, T const& bottom, T const& top)
+ +
+
+ +

◆ orthoLH_NO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::orthoLH_NO (left,
right,
bottom,
top,
zNear,
zFar 
)
+
+ +

Creates a matrix for an orthographic parallel viewing volume using right-handed coordinates.

+

The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)

+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+
See also
- glm::ortho(T const& left, T const& right, T const& bottom, T const& top)
+ +
+
+ +

◆ orthoLH_ZO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::orthoLH_ZO (left,
right,
bottom,
top,
zNear,
zFar 
)
+
+ +

Creates a matrix for an orthographic parallel viewing volume, using left-handed coordinates.

+

The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)

+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+
See also
- glm::ortho(T const& left, T const& right, T const& bottom, T const& top)
+ +
+
+ +

◆ orthoNO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::orthoNO (left,
right,
bottom,
top,
zNear,
zFar 
)
+
+ +

Creates a matrix for an orthographic parallel viewing volume, using left-handed coordinates if GLM_FORCE_LEFT_HANDED if defined or right-handed coordinates otherwise.

+

The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)

+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+
See also
- glm::ortho(T const& left, T const& right, T const& bottom, T const& top)
+ +
+
+ +

◆ orthoRH()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::orthoRH (left,
right,
bottom,
top,
zNear,
zFar 
)
+
+ +

Creates a matrix for an orthographic parallel viewing volume, using right-handed coordinates.

+

If GLM_FORCE_DEPTH_ZERO_TO_ONE is defined, the near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition) Otherwise, the near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)

+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+
See also
- glm::ortho(T const& left, T const& right, T const& bottom, T const& top)
+ +
+
+ +

◆ orthoRH_NO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::orthoRH_NO (left,
right,
bottom,
top,
zNear,
zFar 
)
+
+ +

Creates a matrix for an orthographic parallel viewing volume, using right-handed coordinates.

+

The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)

+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+
See also
- glm::ortho(T const& left, T const& right, T const& bottom, T const& top)
+ +
+
+ +

◆ orthoRH_ZO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::orthoRH_ZO (left,
right,
bottom,
top,
zNear,
zFar 
)
+
+ +

Creates a matrix for an orthographic parallel viewing volume, using left-handed coordinates.

+

The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)

+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+
See also
- glm::ortho(T const& left, T const& right, T const& bottom, T const& top)
+ +
+
+ +

◆ orthoZO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::orthoZO (left,
right,
bottom,
top,
zNear,
zFar 
)
+
+ +

Creates a matrix for an orthographic parallel viewing volume, using left-handed coordinates.

+

The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)

+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+
See also
- glm::ortho(T const& left, T const& right, T const& bottom, T const& top)
+ +
+
+ +

◆ perspective()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::perspective (fovy,
aspect,
near,
far 
)
+
+ +

Creates a matrix for a symetric perspective-view frustum based on the default handedness and default near and far clip planes definition.

+

To change default handedness use GLM_FORCE_LEFT_HANDED. To change default near and far clip planes definition use GLM_FORCE_DEPTH_ZERO_TO_ONE.

+
Parameters
+ + + + + +
fovySpecifies the field of view angle in the y direction. Expressed in radians.
aspectSpecifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
nearSpecifies the distance from the viewer to the near clipping plane (always positive).
farSpecifies the distance from the viewer to the far clipping plane (always positive).
+
+
+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+
See also
gluPerspective man page
+ +
+
+ +

◆ perspectiveFov()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::perspectiveFov (fov,
width,
height,
near,
far 
)
+
+ +

Builds a perspective projection matrix based on a field of view and the default handedness and default near and far clip planes definition.

+

To change default handedness use GLM_FORCE_LEFT_HANDED. To change default near and far clip planes definition use GLM_FORCE_DEPTH_ZERO_TO_ONE.

+
Parameters
+ + + + + + +
fovExpressed in radians.
widthWidth of the viewport
heightHeight of the viewport
nearSpecifies the distance from the viewer to the near clipping plane (always positive).
farSpecifies the distance from the viewer to the far clipping plane (always positive).
+
+
+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ perspectiveFovLH()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::perspectiveFovLH (fov,
width,
height,
near,
far 
)
+
+ +

Builds a left handed perspective projection matrix based on a field of view.

+

If GLM_FORCE_DEPTH_ZERO_TO_ONE is defined, the near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition) Otherwise, the near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)

+
Parameters
+ + + + + + +
fovExpressed in radians.
widthWidth of the viewport
heightHeight of the viewport
nearSpecifies the distance from the viewer to the near clipping plane (always positive).
farSpecifies the distance from the viewer to the far clipping plane (always positive).
+
+
+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ perspectiveFovLH_NO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::perspectiveFovLH_NO (fov,
width,
height,
near,
far 
)
+
+ +

Builds a perspective projection matrix based on a field of view using left-handed coordinates.

+

The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)

+
Parameters
+ + + + + + +
fovExpressed in radians.
widthWidth of the viewport
heightHeight of the viewport
nearSpecifies the distance from the viewer to the near clipping plane (always positive).
farSpecifies the distance from the viewer to the far clipping plane (always positive).
+
+
+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ perspectiveFovLH_ZO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::perspectiveFovLH_ZO (fov,
width,
height,
near,
far 
)
+
+ +

Builds a perspective projection matrix based on a field of view using left-handed coordinates.

+

The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)

+
Parameters
+ + + + + + +
fovExpressed in radians.
widthWidth of the viewport
heightHeight of the viewport
nearSpecifies the distance from the viewer to the near clipping plane (always positive).
farSpecifies the distance from the viewer to the far clipping plane (always positive).
+
+
+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ perspectiveFovNO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::perspectiveFovNO (fov,
width,
height,
near,
far 
)
+
+ +

Builds a perspective projection matrix based on a field of view using left-handed coordinates if GLM_FORCE_LEFT_HANDED if defined or right-handed coordinates otherwise.

+

The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)

+
Parameters
+ + + + + + +
fovExpressed in radians.
widthWidth of the viewport
heightHeight of the viewport
nearSpecifies the distance from the viewer to the near clipping plane (always positive).
farSpecifies the distance from the viewer to the far clipping plane (always positive).
+
+
+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ perspectiveFovRH()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::perspectiveFovRH (fov,
width,
height,
near,
far 
)
+
+ +

Builds a right handed perspective projection matrix based on a field of view.

+

If GLM_FORCE_DEPTH_ZERO_TO_ONE is defined, the near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition) Otherwise, the near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)

+
Parameters
+ + + + + + +
fovExpressed in radians.
widthWidth of the viewport
heightHeight of the viewport
nearSpecifies the distance from the viewer to the near clipping plane (always positive).
farSpecifies the distance from the viewer to the far clipping plane (always positive).
+
+
+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ perspectiveFovRH_NO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::perspectiveFovRH_NO (fov,
width,
height,
near,
far 
)
+
+ +

Builds a perspective projection matrix based on a field of view using right-handed coordinates.

+

The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)

+
Parameters
+ + + + + + +
fovExpressed in radians.
widthWidth of the viewport
heightHeight of the viewport
nearSpecifies the distance from the viewer to the near clipping plane (always positive).
farSpecifies the distance from the viewer to the far clipping plane (always positive).
+
+
+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ perspectiveFovRH_ZO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::perspectiveFovRH_ZO (fov,
width,
height,
near,
far 
)
+
+ +

Builds a perspective projection matrix based on a field of view using right-handed coordinates.

+

The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)

+
Parameters
+ + + + + + +
fovExpressed in radians.
widthWidth of the viewport
heightHeight of the viewport
nearSpecifies the distance from the viewer to the near clipping plane (always positive).
farSpecifies the distance from the viewer to the far clipping plane (always positive).
+
+
+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ perspectiveFovZO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::perspectiveFovZO (fov,
width,
height,
near,
far 
)
+
+ +

Builds a perspective projection matrix based on a field of view using left-handed coordinates if GLM_FORCE_LEFT_HANDED if defined or right-handed coordinates otherwise.

+

The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)

+
Parameters
+ + + + + + +
fovExpressed in radians.
widthWidth of the viewport
heightHeight of the viewport
nearSpecifies the distance from the viewer to the near clipping plane (always positive).
farSpecifies the distance from the viewer to the far clipping plane (always positive).
+
+
+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ perspectiveLH()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::perspectiveLH (fovy,
aspect,
near,
far 
)
+
+ +

Creates a matrix for a left handed, symetric perspective-view frustum.

+

If GLM_FORCE_DEPTH_ZERO_TO_ONE is defined, the near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition) Otherwise, the near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)

+
Parameters
+ + + + + +
fovySpecifies the field of view angle, in degrees, in the y direction. Expressed in radians.
aspectSpecifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
nearSpecifies the distance from the viewer to the near clipping plane (always positive).
farSpecifies the distance from the viewer to the far clipping plane (always positive).
+
+
+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ perspectiveLH_NO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::perspectiveLH_NO (fovy,
aspect,
near,
far 
)
+
+ +

Creates a matrix for a left handed, symetric perspective-view frustum.

+

The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)

+
Parameters
+ + + + + +
fovySpecifies the field of view angle, in degrees, in the y direction. Expressed in radians.
aspectSpecifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
nearSpecifies the distance from the viewer to the near clipping plane (always positive).
farSpecifies the distance from the viewer to the far clipping plane (always positive).
+
+
+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ perspectiveLH_ZO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::perspectiveLH_ZO (fovy,
aspect,
near,
far 
)
+
+ +

Creates a matrix for a left handed, symetric perspective-view frustum.

+

The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)

+
Parameters
+ + + + + +
fovySpecifies the field of view angle, in degrees, in the y direction. Expressed in radians.
aspectSpecifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
nearSpecifies the distance from the viewer to the near clipping plane (always positive).
farSpecifies the distance from the viewer to the far clipping plane (always positive).
+
+
+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ perspectiveNO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::perspectiveNO (fovy,
aspect,
near,
far 
)
+
+ +

Creates a matrix for a symetric perspective-view frustum using left-handed coordinates if GLM_FORCE_LEFT_HANDED if defined or right-handed coordinates otherwise.

+

The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)

+
Parameters
+ + + + + +
fovySpecifies the field of view angle, in degrees, in the y direction. Expressed in radians.
aspectSpecifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
nearSpecifies the distance from the viewer to the near clipping plane (always positive).
farSpecifies the distance from the viewer to the far clipping plane (always positive).
+
+
+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ perspectiveRH()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::perspectiveRH (fovy,
aspect,
near,
far 
)
+
+ +

Creates a matrix for a right handed, symetric perspective-view frustum.

+

If GLM_FORCE_DEPTH_ZERO_TO_ONE is defined, the near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition) Otherwise, the near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)

+
Parameters
+ + + + + +
fovySpecifies the field of view angle, in degrees, in the y direction. Expressed in radians.
aspectSpecifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
nearSpecifies the distance from the viewer to the near clipping plane (always positive).
farSpecifies the distance from the viewer to the far clipping plane (always positive).
+
+
+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ perspectiveRH_NO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::perspectiveRH_NO (fovy,
aspect,
near,
far 
)
+
+ +

Creates a matrix for a right handed, symetric perspective-view frustum.

+

The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)

+
Parameters
+ + + + + +
fovySpecifies the field of view angle, in degrees, in the y direction. Expressed in radians.
aspectSpecifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
nearSpecifies the distance from the viewer to the near clipping plane (always positive).
farSpecifies the distance from the viewer to the far clipping plane (always positive).
+
+
+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ perspectiveRH_ZO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::perspectiveRH_ZO (fovy,
aspect,
near,
far 
)
+
+ +

Creates a matrix for a right handed, symetric perspective-view frustum.

+

The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)

+
Parameters
+ + + + + +
fovySpecifies the field of view angle, in degrees, in the y direction. Expressed in radians.
aspectSpecifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
nearSpecifies the distance from the viewer to the near clipping plane (always positive).
farSpecifies the distance from the viewer to the far clipping plane (always positive).
+
+
+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ perspectiveZO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::perspectiveZO (fovy,
aspect,
near,
far 
)
+
+ +

Creates a matrix for a symetric perspective-view frustum using left-handed coordinates if GLM_FORCE_LEFT_HANDED if defined or right-handed coordinates otherwise.

+

The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)

+
Parameters
+ + + + + +
fovySpecifies the field of view angle, in degrees, in the y direction. Expressed in radians.
aspectSpecifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
nearSpecifies the distance from the viewer to the near clipping plane (always positive).
farSpecifies the distance from the viewer to the far clipping plane (always positive).
+
+
+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ tweakedInfinitePerspective() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::tweakedInfinitePerspective (fovy,
aspect,
near 
)
+
+ +

Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping.

+
Parameters
+ + + + +
fovySpecifies the field of view angle, in degrees, in the y direction. Expressed in radians.
aspectSpecifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
nearSpecifies the distance from the viewer to the near clipping plane (always positive).
+
+
+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+ +

◆ tweakedInfinitePerspective() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::tweakedInfinitePerspective (fovy,
aspect,
near,
ep 
)
+
+ +

Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping.

+
Parameters
+ + + + + +
fovySpecifies the field of view angle, in degrees, in the y direction. Expressed in radians.
aspectSpecifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
nearSpecifies the distance from the viewer to the near clipping plane (always positive).
epEpsilon
+
+
+
Template Parameters
+ + +
TA floating-point scalar type
+
+
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00666.html b/common/glm/doc/api/a00666.html new file mode 100644 index 000000000..efebeeef1 --- /dev/null +++ b/common/glm/doc/api/a00666.html @@ -0,0 +1,530 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_matrix_projection + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_matrix_projection
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q, typename U >
GLM_FUNC_DECL mat< 4, 4, T, Q > pickMatrix (vec< 2, T, Q > const &center, vec< 2, T, Q > const &delta, vec< 4, U, Q > const &viewport)
 
template<typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > project (vec< 3, T, Q > const &obj, mat< 4, 4, T, Q > const &model, mat< 4, 4, T, Q > const &proj, vec< 4, U, Q > const &viewport)
 
template<typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > projectNO (vec< 3, T, Q > const &obj, mat< 4, 4, T, Q > const &model, mat< 4, 4, T, Q > const &proj, vec< 4, U, Q > const &viewport)
 
template<typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > projectZO (vec< 3, T, Q > const &obj, mat< 4, 4, T, Q > const &model, mat< 4, 4, T, Q > const &proj, vec< 4, U, Q > const &viewport)
 
template<typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > unProject (vec< 3, T, Q > const &win, mat< 4, 4, T, Q > const &model, mat< 4, 4, T, Q > const &proj, vec< 4, U, Q > const &viewport)
 
template<typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > unProjectNO (vec< 3, T, Q > const &win, mat< 4, 4, T, Q > const &model, mat< 4, 4, T, Q > const &proj, vec< 4, U, Q > const &viewport)
 
template<typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > unProjectZO (vec< 3, T, Q > const &win, mat< 4, 4, T, Q > const &model, mat< 4, 4, T, Q > const &proj, vec< 4, U, Q > const &viewport)
 
+

Detailed Description

+

Functions that generate common projection transformation matrices.

+

The matrices generated by this extension use standard OpenGL fixed-function conventions. For example, the lookAt function generates a transform from world space into the specific eye space that the projective matrix functions (perspective, ortho, etc) are designed to expect. The OpenGL compatibility specifications defines the particular layout of this eye space.

+

Include <glm/ext/matrix_projection.hpp> to use the features of this extension.

+
See also
GLM_EXT_matrix_transform
+
+GLM_EXT_matrix_clip_space
+

Function Documentation

+ +

◆ pickMatrix()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::pickMatrix (vec< 2, T, Q > const & center,
vec< 2, T, Q > const & delta,
vec< 4, U, Q > const & viewport 
)
+
+ +

Define a picking region.

+
Parameters
+ + + + +
centerSpecify the center of a picking region in window coordinates.
deltaSpecify the width and height, respectively, of the picking region in window coordinates.
viewportRendering viewport
+
+
+
Template Parameters
+ + + +
TNative type used for the computation. Currently supported: half (not recommended), float or double.
UCurrently supported: Floating-point types and integer types.
+
+
+
See also
gluPickMatrix man page
+ +
+
+ +

◆ project()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::project (vec< 3, T, Q > const & obj,
mat< 4, 4, T, Q > const & model,
mat< 4, 4, T, Q > const & proj,
vec< 4, U, Q > const & viewport 
)
+
+ +

Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates using default near and far clip planes definition.

+

To change default near and far clip planes definition use GLM_FORCE_DEPTH_ZERO_TO_ONE.

+
Parameters
+ + + + + +
objSpecify the object coordinates.
modelSpecifies the current modelview matrix
projSpecifies the current projection matrix
viewportSpecifies the current viewport
+
+
+
Returns
Return the computed window coordinates.
+
Template Parameters
+ + + +
TNative type used for the computation. Currently supported: half (not recommended), float or double.
UCurrently supported: Floating-point types and integer types.
+
+
+
See also
gluProject man page
+ +
+
+ +

◆ projectNO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::projectNO (vec< 3, T, Q > const & obj,
mat< 4, 4, T, Q > const & model,
mat< 4, 4, T, Q > const & proj,
vec< 4, U, Q > const & viewport 
)
+
+ +

Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates.

+

The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)

+
Parameters
+ + + + + +
objSpecify the object coordinates.
modelSpecifies the current modelview matrix
projSpecifies the current projection matrix
viewportSpecifies the current viewport
+
+
+
Returns
Return the computed window coordinates.
+
Template Parameters
+ + + +
TNative type used for the computation. Currently supported: half (not recommended), float or double.
UCurrently supported: Floating-point types and integer types.
+
+
+
See also
gluProject man page
+ +
+
+ +

◆ projectZO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::projectZO (vec< 3, T, Q > const & obj,
mat< 4, 4, T, Q > const & model,
mat< 4, 4, T, Q > const & proj,
vec< 4, U, Q > const & viewport 
)
+
+ +

Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates.

+

The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)

+
Parameters
+ + + + + +
objSpecify the object coordinates.
modelSpecifies the current modelview matrix
projSpecifies the current projection matrix
viewportSpecifies the current viewport
+
+
+
Returns
Return the computed window coordinates.
+
Template Parameters
+ + + +
TNative type used for the computation. Currently supported: half (not recommended), float or double.
UCurrently supported: Floating-point types and integer types.
+
+
+
See also
gluProject man page
+ +
+
+ +

◆ unProject()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::unProject (vec< 3, T, Q > const & win,
mat< 4, 4, T, Q > const & model,
mat< 4, 4, T, Q > const & proj,
vec< 4, U, Q > const & viewport 
)
+
+ +

Map the specified window coordinates (win.x, win.y, win.z) into object coordinates using default near and far clip planes definition.

+

To change default near and far clip planes definition use GLM_FORCE_DEPTH_ZERO_TO_ONE.

+
Parameters
+ + + + + +
winSpecify the window coordinates to be mapped.
modelSpecifies the modelview matrix
projSpecifies the projection matrix
viewportSpecifies the viewport
+
+
+
Returns
Returns the computed object coordinates.
+
Template Parameters
+ + + +
TNative type used for the computation. Currently supported: half (not recommended), float or double.
UCurrently supported: Floating-point types and integer types.
+
+
+
See also
gluUnProject man page
+ +
+
+ +

◆ unProjectNO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::unProjectNO (vec< 3, T, Q > const & win,
mat< 4, 4, T, Q > const & model,
mat< 4, 4, T, Q > const & proj,
vec< 4, U, Q > const & viewport 
)
+
+ +

Map the specified window coordinates (win.x, win.y, win.z) into object coordinates.

+

The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)

+
Parameters
+ + + + + +
winSpecify the window coordinates to be mapped.
modelSpecifies the modelview matrix
projSpecifies the projection matrix
viewportSpecifies the viewport
+
+
+
Returns
Returns the computed object coordinates.
+
Template Parameters
+ + + +
TNative type used for the computation. Currently supported: half (not recommended), float or double.
UCurrently supported: Floating-point types and integer types.
+
+
+
See also
gluUnProject man page
+ +
+
+ +

◆ unProjectZO()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::unProjectZO (vec< 3, T, Q > const & win,
mat< 4, 4, T, Q > const & model,
mat< 4, 4, T, Q > const & proj,
vec< 4, U, Q > const & viewport 
)
+
+ +

Map the specified window coordinates (win.x, win.y, win.z) into object coordinates.

+

The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)

+
Parameters
+ + + + + +
winSpecify the window coordinates to be mapped.
modelSpecifies the modelview matrix
projSpecifies the projection matrix
viewportSpecifies the viewport
+
+
+
Returns
Returns the computed object coordinates.
+
Template Parameters
+ + + +
TNative type used for the computation. Currently supported: half (not recommended), float or double.
UCurrently supported: Floating-point types and integer types.
+
+
+
See also
gluUnProject man page
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00667.html b/common/glm/doc/api/a00667.html new file mode 100644 index 000000000..7bcc5c43b --- /dev/null +++ b/common/glm/doc/api/a00667.html @@ -0,0 +1,374 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_matrix_relational + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_matrix_relational
+
+
+ + + + + + + + + + + + + + + + + + + + +

+Functions

template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< C, bool, Q > equal (mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y)
 
template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< C, bool, Q > equal (mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y, T epsilon)
 
template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< C, bool, Q > equal (mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y, vec< C, T, Q > const &epsilon)
 
template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< C, bool, Q > notEqual (mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y)
 
template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< C, bool, Q > notEqual (mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y, T epsilon)
 
template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< C, bool, Q > notEqual (mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y, vec< C, T, Q > const &epsilon)
 
+

Detailed Description

+

Exposes comparison functions for matrix types that take a user defined epsilon values.

+

Include <glm/ext/matrix_relational.hpp> to use the features of this extension.

+
See also
GLM_EXT_vector_relational
+
+GLM_EXT_scalar_relational
+
+GLM_EXT_quaternion_relational
+

Function Documentation

+ +

◆ equal() [1/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> glm::equal (mat< C, R, T, Q > const & x,
mat< C, R, T, Q > const & y 
)
+
+ +

Perform a component-wise equal-to comparison of two matrices.

+

Return a boolean vector which components value is True if this expression is satisfied per column of the matrices.

+
Template Parameters
+ + + + + +
CInteger between 1 and 4 included that qualify the number of columns of the matrix
RInteger between 1 and 4 included that qualify the number of rows of the matrix
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+ +
+
+ +

◆ equal() [2/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> glm::equal (mat< C, R, T, Q > const & x,
mat< C, R, T, Q > const & y,
epsilon 
)
+
+ +

Returns the component-wise comparison of |x - y| < epsilon.

+

True if this expression is satisfied.

+
Template Parameters
+ + + + + +
CInteger between 1 and 4 included that qualify the number of columns of the matrix
RInteger between 1 and 4 included that qualify the number of rows of the matrix
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+ +
+
+ +

◆ equal() [3/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> glm::equal (mat< C, R, T, Q > const & x,
mat< C, R, T, Q > const & y,
vec< C, T, Q > const & epsilon 
)
+
+ +

Returns the component-wise comparison of |x - y| < epsilon.

+

True if this expression is satisfied.

+
Template Parameters
+ + + + + +
CInteger between 1 and 4 included that qualify the number of columns of the matrix
RInteger between 1 and 4 included that qualify the number of rows of the matrix
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+ +
+
+ +

◆ notEqual() [1/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> glm::notEqual (mat< C, R, T, Q > const & x,
mat< C, R, T, Q > const & y 
)
+
+ +

Perform a component-wise not-equal-to comparison of two matrices.

+

Return a boolean vector which components value is True if this expression is satisfied per column of the matrices.

+
Template Parameters
+ + + + + +
CInteger between 1 and 4 included that qualify the number of columns of the matrix
RInteger between 1 and 4 included that qualify the number of rows of the matrix
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+ +
+
+ +

◆ notEqual() [2/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> glm::notEqual (mat< C, R, T, Q > const & x,
mat< C, R, T, Q > const & y,
epsilon 
)
+
+ +

Returns the component-wise comparison of |x - y| < epsilon.

+

True if this expression is not satisfied.

+
Template Parameters
+ + + + + +
CInteger between 1 and 4 included that qualify the number of columns of the matrix
RInteger between 1 and 4 included that qualify the number of rows of the matrix
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+ +
+
+ +

◆ notEqual() [3/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> glm::notEqual (mat< C, R, T, Q > const & x,
mat< C, R, T, Q > const & y,
vec< C, T, Q > const & epsilon 
)
+
+ +

Returns the component-wise comparison of |x - y| >= epsilon.

+

True if this expression is not satisfied.

+
Template Parameters
+ + + + + +
CInteger between 1 and 4 included that qualify the number of columns of the matrix
RInteger between 1 and 4 included that qualify the number of rows of the matrix
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00668.html b/common/glm/doc/api/a00668.html new file mode 100644 index 000000000..d72fac30f --- /dev/null +++ b/common/glm/doc/api/a00668.html @@ -0,0 +1,425 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_matrix_transform + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_matrix_transform
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +

+Functions

+template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType identity ()
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > lookAt (vec< 3, T, Q > const &eye, vec< 3, T, Q > const &center, vec< 3, T, Q > const &up)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > lookAtLH (vec< 3, T, Q > const &eye, vec< 3, T, Q > const &center, vec< 3, T, Q > const &up)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > lookAtRH (vec< 3, T, Q > const &eye, vec< 3, T, Q > const &center, vec< 3, T, Q > const &up)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > rotate (mat< 4, 4, T, Q > const &m, T angle, vec< 3, T, Q > const &axis)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > scale (mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > translate (mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &v)
 
+

Detailed Description

+

Defines functions that generate common transformation matrices.

+

The matrices generated by this extension use standard OpenGL fixed-function conventions. For example, the lookAt function generates a transform from world space into the specific eye space that the projective matrix functions (perspective, ortho, etc) are designed to expect. The OpenGL compatibility specifications defines the particular layout of this eye space.

+

Include <glm/ext/matrix_transform.hpp> to use the features of this extension.

+
See also
GLM_EXT_matrix_projection
+
+GLM_EXT_matrix_clip_space
+

Function Documentation

+ +

◆ lookAt()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::lookAt (vec< 3, T, Q > const & eye,
vec< 3, T, Q > const & center,
vec< 3, T, Q > const & up 
)
+
+ +

Build a look at view matrix based on the default handedness.

+
Parameters
+ + + + +
eyePosition of the camera
centerPosition where the camera is looking at
upNormalized up vector, how the camera is oriented. Typically (0, 0, 1)
+
+
+
Template Parameters
+ + + +
TA floating-point scalar type
QA value from qualifier enum
+
+
+
See also
- frustum(T const& left, T const& right, T const& bottom, T const& top, T const& nearVal, T const& farVal) frustum(T const& left, T const& right, T const& bottom, T const& top, T const& nearVal, T const& farVal)
+
+gluLookAt man page
+ +
+
+ +

◆ lookAtLH()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::lookAtLH (vec< 3, T, Q > const & eye,
vec< 3, T, Q > const & center,
vec< 3, T, Q > const & up 
)
+
+ +

Build a left handed look at view matrix.

+
Parameters
+ + + + +
eyePosition of the camera
centerPosition where the camera is looking at
upNormalized up vector, how the camera is oriented. Typically (0, 0, 1)
+
+
+
Template Parameters
+ + + +
TA floating-point scalar type
QA value from qualifier enum
+
+
+
See also
- frustum(T const& left, T const& right, T const& bottom, T const& top, T const& nearVal, T const& farVal) frustum(T const& left, T const& right, T const& bottom, T const& top, T const& nearVal, T const& farVal)
+ +
+
+ +

◆ lookAtRH()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::lookAtRH (vec< 3, T, Q > const & eye,
vec< 3, T, Q > const & center,
vec< 3, T, Q > const & up 
)
+
+ +

Build a right handed look at view matrix.

+
Parameters
+ + + + +
eyePosition of the camera
centerPosition where the camera is looking at
upNormalized up vector, how the camera is oriented. Typically (0, 0, 1)
+
+
+
Template Parameters
+ + + +
TA floating-point scalar type
QA value from qualifier enum
+
+
+
See also
- frustum(T const& left, T const& right, T const& bottom, T const& top, T const& nearVal, T const& farVal) frustum(T const& left, T const& right, T const& bottom, T const& top, T const& nearVal, T const& farVal)
+ +
+
+ +

◆ rotate()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::rotate (mat< 4, 4, T, Q > const & m,
angle,
vec< 3, T, Q > const & axis 
)
+
+ +

Builds a rotation 4 * 4 matrix created from an axis vector and an angle.

+
Parameters
+ + + + +
mInput matrix multiplied by this rotation matrix.
angleRotation angle expressed in radians.
axisRotation axis, recommended to be normalized.
+
+
+
Template Parameters
+ + + +
TA floating-point scalar type
QA value from qualifier enum
+
+
+
See also
- rotate(mat<4, 4, T, Q> const& m, T angle, T x, T y, T z)
+
+- rotate(T angle, vec<3, T, Q> const& v)
+
+glRotate man page
+ +
+
+ +

◆ scale()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::scale (mat< 4, 4, T, Q > const & m,
vec< 3, T, Q > const & v 
)
+
+ +

Builds a scale 4 * 4 matrix created from 3 scalars.

+
Parameters
+ + + +
mInput matrix multiplied by this scale matrix.
vRatio of scaling for each axis.
+
+
+
Template Parameters
+ + + +
TA floating-point scalar type
QA value from qualifier enum
+
+
+
See also
- scale(mat<4, 4, T, Q> const& m, T x, T y, T z)
+
+- scale(vec<3, T, Q> const& v)
+
+glScale man page
+ +
+
+ +

◆ translate()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::translate (mat< 4, 4, T, Q > const & m,
vec< 3, T, Q > const & v 
)
+
+ +

Builds a translation 4 * 4 matrix created from a vector of 3 components.

+
Parameters
+ + + +
mInput matrix multiplied by this translation matrix.
vCoordinates of a translation vector.
+
+
+
Template Parameters
+ + + +
TA floating-point scalar type
QA value from qualifier enum
+
+
+
#include <glm/glm.hpp>
...
glm::mat4 m = glm::translate(glm::mat4(1.0f), glm::vec3(1.0f));
// m[0][0] == 1.0f, m[0][1] == 0.0f, m[0][2] == 0.0f, m[0][3] == 0.0f
// m[1][0] == 0.0f, m[1][1] == 1.0f, m[1][2] == 0.0f, m[1][3] == 0.0f
// m[2][0] == 0.0f, m[2][1] == 0.0f, m[2][2] == 1.0f, m[2][3] == 0.0f
// m[3][0] == 1.0f, m[3][1] == 1.0f, m[3][2] == 1.0f, m[3][3] == 1.0f
See also
- translate(mat<4, 4, T, Q> const& m, T x, T y, T z)
+
+- translate(vec<3, T, Q> const& v)
+
+glTranslate man page
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00669.html b/common/glm/doc/api/a00669.html new file mode 100644 index 000000000..ea35a1fba --- /dev/null +++ b/common/glm/doc/api/a00669.html @@ -0,0 +1,393 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_quaternion_common + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_quaternion_common
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > conjugate (qua< T, Q > const &q)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > inverse (qua< T, Q > const &q)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > isinf (qua< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > isnan (qua< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > lerp (qua< T, Q > const &x, qua< T, Q > const &y, T a)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > mix (qua< T, Q > const &x, qua< T, Q > const &y, T a)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > slerp (qua< T, Q > const &x, qua< T, Q > const &y, T a)
 
+

Detailed Description

+

Provides common functions for quaternion types.

+

Include <glm/ext/quaternion_common.hpp> to use the features of this extension.

+
See also
GLM_EXT_scalar_common
+
+GLM_EXT_vector_common
+
+GLM_EXT_quaternion_float
+
+GLM_EXT_quaternion_double
+
+GLM_EXT_quaternion_exponential
+
+GLM_EXT_quaternion_geometric
+
+GLM_EXT_quaternion_relational
+
+GLM_EXT_quaternion_trigonometric
+
+GLM_EXT_quaternion_transform
+

Function Documentation

+ +

◆ conjugate()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL qua<T, Q> glm::conjugate (qua< T, Q > const & q)
+
+ +

Returns the q conjugate.

+
Template Parameters
+ + + +
TA floating-point scalar type
QA value from qualifier enum
+
+
+ +
+
+ +

◆ inverse()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL qua<T, Q> glm::inverse (qua< T, Q > const & q)
+
+ +

Returns the q inverse.

+
Template Parameters
+ + + +
TA floating-point scalar type
QA value from qualifier enum
+
+
+ +
+
+ +

◆ isinf()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<4, bool, Q> glm::isinf (qua< T, Q > const & x)
+
+ +

Returns true if x holds a positive infinity or negative infinity representation in the underlying implementation's set of floating point representations.

+

Returns false otherwise, including for implementations with no infinity representations.

+
Template Parameters
+ + + +
TA floating-point scalar type
QA value from qualifier enum
+
+
+ +
+
+ +

◆ isnan()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<4, bool, Q> glm::isnan (qua< T, Q > const & x)
+
+ +

Returns true if x holds a NaN (not a number) representation in the underlying implementation's set of floating point representations.

+

Returns false otherwise, including for implementations with no NaN representations.

+

/!\ When using compiler fast math, this function may fail.

+
Template Parameters
+ + + +
TA floating-point scalar type
QA value from qualifier enum
+
+
+ +
+
+ +

◆ lerp()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL qua<T, Q> glm::lerp (qua< T, Q > const & x,
qua< T, Q > const & y,
a 
)
+
+ +

Linear interpolation of two quaternions.

+

The interpolation is oriented.

+
Parameters
+ + + + +
xA quaternion
yA quaternion
aInterpolation factor. The interpolation is defined in the range [0, 1].
+
+
+
Template Parameters
+ + + +
TA floating-point scalar type
QA value from qualifier enum
+
+
+ +
+
+ +

◆ mix()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL qua<T, Q> glm::mix (qua< T, Q > const & x,
qua< T, Q > const & y,
a 
)
+
+ +

Spherical linear interpolation of two quaternions.

+

The interpolation is oriented and the rotation is performed at constant speed. For short path spherical linear interpolation, use the slerp function.

+
Parameters
+ + + + +
xA quaternion
yA quaternion
aInterpolation factor. The interpolation is defined beyond the range [0, 1].
+
+
+
Template Parameters
+ + + +
TA floating-point scalar type
QA value from qualifier enum
+
+
+
See also
- slerp(qua<T, Q> const& x, qua<T, Q> const& y, T const& a)
+ +
+
+ +

◆ slerp()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL qua<T, Q> glm::slerp (qua< T, Q > const & x,
qua< T, Q > const & y,
a 
)
+
+ +

Spherical linear interpolation of two quaternions.

+

The interpolation always take the short path and the rotation is performed at constant speed.

+
Parameters
+ + + + +
xA quaternion
yA quaternion
aInterpolation factor. The interpolation is defined beyond the range [0, 1].
+
+
+
Template Parameters
+ + + +
TA floating-point scalar type
QA value from qualifier enum
+
+
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00670.html b/common/glm/doc/api/a00670.html new file mode 100644 index 000000000..41dd165b0 --- /dev/null +++ b/common/glm/doc/api/a00670.html @@ -0,0 +1,104 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_quaternion_double + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_quaternion_double
+
+
+ + + + +

+Typedefs

+typedef qua< double, defaultp > dquat
 
+

Detailed Description

+

Exposes double-precision floating point quaternion type.

+

Include <glm/ext/quaternion_double.hpp> to use the features of this extension.

+
See also
GLM_EXT_quaternion_float
+
+GLM_EXT_quaternion_double_precision
+
+GLM_EXT_quaternion_common
+
+GLM_EXT_quaternion_exponential
+
+GLM_EXT_quaternion_geometric
+
+GLM_EXT_quaternion_relational
+
+GLM_EXT_quaternion_transform
+
+GLM_EXT_quaternion_trigonometric
+
+ + + + diff --git a/common/glm/doc/api/a00671.html b/common/glm/doc/api/a00671.html new file mode 100644 index 000000000..0648d6d05 --- /dev/null +++ b/common/glm/doc/api/a00671.html @@ -0,0 +1,150 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_quaternion_double_precision + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_quaternion_double_precision
+
+
+ + + + + + + + +

+Typedefs

typedef qua< double, highp > highp_dquat
 
typedef qua< double, lowp > lowp_dquat
 
typedef qua< double, mediump > mediump_dquat
 
+

Detailed Description

+

Exposes double-precision floating point quaternion type with various precision in term of ULPs.

+

Include <glm/ext/quaternion_double_precision.hpp> to use the features of this extension.

+

Typedef Documentation

+ +

◆ highp_dquat

+ +
+
+ + + + +
typedef qua< double, highp > highp_dquat
+
+ +

Quaternion of high double-qualifier floating-point numbers using high precision arithmetic in term of ULPs.

+
See also
GLM_EXT_quaternion_double_precision
+ +

Definition at line 38 of file quaternion_double_precision.hpp.

+ +
+
+ +

◆ lowp_dquat

+ +
+
+ + + + +
typedef qua< double, lowp > lowp_dquat
+
+ +

Quaternion of double-precision floating-point numbers using high precision arithmetic in term of ULPs.

+
See also
GLM_EXT_quaternion_double_precision
+ +

Definition at line 28 of file quaternion_double_precision.hpp.

+ +
+
+ +

◆ mediump_dquat

+ +
+
+ + + + +
typedef qua< double, mediump > mediump_dquat
+
+ +

Quaternion of medium double-qualifier floating-point numbers using high precision arithmetic in term of ULPs.

+
See also
GLM_EXT_quaternion_double_precision
+ +

Definition at line 33 of file quaternion_double_precision.hpp.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00672.html b/common/glm/doc/api/a00672.html new file mode 100644 index 000000000..d3c837538 --- /dev/null +++ b/common/glm/doc/api/a00672.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_quaternion_exponential + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
GLM_EXT_quaternion_exponential
+
+
+

Provides exponential functions for quaternion types.

+

Include <glm/ext/quaternion_exponential.hpp> to use the features of this extension.

+
See also
core_exponential
+
+GLM_EXT_quaternion_float
+
+GLM_EXT_quaternion_double
+
+ + + + diff --git a/common/glm/doc/api/a00673.html b/common/glm/doc/api/a00673.html new file mode 100644 index 000000000..e54db65d3 --- /dev/null +++ b/common/glm/doc/api/a00673.html @@ -0,0 +1,104 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_quaternion_float + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_quaternion_float
+
+
+ + + + +

+Typedefs

+typedef qua< float, defaultp > quat
 
+

Detailed Description

+

Exposes single-precision floating point quaternion type.

+

Include <glm/ext/quaternion_float.hpp> to use the features of this extension.

+
See also
GLM_EXT_quaternion_double
+
+GLM_EXT_quaternion_float_precision
+
+GLM_EXT_quaternion_common
+
+GLM_EXT_quaternion_exponential
+
+GLM_EXT_quaternion_geometric
+
+GLM_EXT_quaternion_relational
+
+GLM_EXT_quaternion_transform
+
+GLM_EXT_quaternion_trigonometric
+
+ + + + diff --git a/common/glm/doc/api/a00674.html b/common/glm/doc/api/a00674.html new file mode 100644 index 000000000..9493ef090 --- /dev/null +++ b/common/glm/doc/api/a00674.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_quaternion_float_precision + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_quaternion_float_precision
+
+
+ + + + + + + + +

+Typedefs

+typedef qua< float, highp > highp_quat
 
+typedef qua< float, lowp > lowp_quat
 
+typedef qua< float, mediump > mediump_quat
 
+

Detailed Description

+

Exposes single-precision floating point quaternion type with various precision in term of ULPs.

+

Include <glm/ext/quaternion_float_precision.hpp> to use the features of this extension.

+
+ + + + diff --git a/common/glm/doc/api/a00675.html b/common/glm/doc/api/a00675.html new file mode 100644 index 000000000..6148025d6 --- /dev/null +++ b/common/glm/doc/api/a00675.html @@ -0,0 +1,236 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_quaternion_geometric + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_quaternion_geometric
+
+
+ + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER qua< T, Q > cross (qua< T, Q > const &q1, qua< T, Q > const &q2)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T dot (qua< T, Q > const &x, qua< T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T length (qua< T, Q > const &q)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > normalize (qua< T, Q > const &q)
 
+

Detailed Description

+

Provides geometric functions for quaternion types.

+

Include <glm/ext/quaternion_geometric.hpp> to use the features of this extension.

+
See also
core_geometric
+
+GLM_EXT_quaternion_float
+
+GLM_EXT_quaternion_double
+

Function Documentation

+ +

◆ cross()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_QUALIFIER qua<T, Q> glm::cross (qua< T, Q > const & q1,
qua< T, Q > const & q2 
)
+
+ +

Compute a cross product.

+
Template Parameters
+ + + +
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLM_EXT_quaternion_geometric
+ +
+
+ +

◆ dot()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::dot (qua< T, Q > const & x,
qua< T, Q > const & y 
)
+
+ +

Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ...

+
Template Parameters
+ + + +
TFloating-point scalar types.
QValue from qualifier enum
+
+
+
See also
GLM_EXT_quaternion_geometric
+ +
+
+ +

◆ length()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL T glm::length (qua< T, Q > const & q)
+
+ +

Returns the norm of a quaternions.

+
Template Parameters
+ + + +
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLM_EXT_quaternion_geometric
+ +
+
+ +

◆ normalize()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL qua<T, Q> glm::normalize (qua< T, Q > const & q)
+
+ +

Returns the normalized quaternion.

+
Template Parameters
+ + + +
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLM_EXT_quaternion_geometric
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00676.html b/common/glm/doc/api/a00676.html new file mode 100644 index 000000000..13a91ad56 --- /dev/null +++ b/common/glm/doc/api/a00676.html @@ -0,0 +1,268 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_quaternion_relational + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_quaternion_relational
+
+
+ + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > equal (qua< T, Q > const &x, qua< T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > equal (qua< T, Q > const &x, qua< T, Q > const &y, T epsilon)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > notEqual (qua< T, Q > const &x, qua< T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > notEqual (qua< T, Q > const &x, qua< T, Q > const &y, T epsilon)
 
+

Detailed Description

+

Exposes comparison functions for quaternion types that take a user defined epsilon values.

+

Include <glm/ext/quaternion_relational.hpp> to use the features of this extension.

+
See also
core_vector_relational
+
+GLM_EXT_vector_relational
+
+GLM_EXT_matrix_relational
+
+GLM_EXT_quaternion_float
+
+GLM_EXT_quaternion_double
+

Function Documentation

+ +

◆ equal() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<4, bool, Q> glm::equal (qua< T, Q > const & x,
qua< T, Q > const & y 
)
+
+ +

Returns the component-wise comparison of result x == y.

+
Template Parameters
+ + + +
TFloating-point scalar types
QValue from qualifier enum
+
+
+ +
+
+ +

◆ equal() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<4, bool, Q> glm::equal (qua< T, Q > const & x,
qua< T, Q > const & y,
epsilon 
)
+
+ +

Returns the component-wise comparison of |x - y| < epsilon.

+
Template Parameters
+ + + +
TFloating-point scalar types
QValue from qualifier enum
+
+
+ +
+
+ +

◆ notEqual() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<4, bool, Q> glm::notEqual (qua< T, Q > const & x,
qua< T, Q > const & y 
)
+
+ +

Returns the component-wise comparison of result x != y.

+
Template Parameters
+ + + +
TFloating-point scalar types
QValue from qualifier enum
+
+
+ +
+
+ +

◆ notEqual() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<4, bool, Q> glm::notEqual (qua< T, Q > const & x,
qua< T, Q > const & y,
epsilon 
)
+
+ +

Returns the component-wise comparison of |x - y| >= epsilon.

+
Template Parameters
+ + + +
TFloating-point scalar types
QValue from qualifier enum
+
+
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00677.html b/common/glm/doc/api/a00677.html new file mode 100644 index 000000000..9f08e6408 --- /dev/null +++ b/common/glm/doc/api/a00677.html @@ -0,0 +1,282 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_quaternion_transform + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_quaternion_transform
+
+
+ + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > exp (qua< T, Q > const &q)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > log (qua< T, Q > const &q)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > pow (qua< T, Q > const &q, T y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > rotate (qua< T, Q > const &q, T const &angle, vec< 3, T, Q > const &axis)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > sqrt (qua< T, Q > const &q)
 
+

Detailed Description

+

Provides transformation functions for quaternion types.

+

Include <glm/ext/quaternion_transform.hpp> to use the features of this extension.

+
See also
GLM_EXT_quaternion_float
+
+GLM_EXT_quaternion_double
+
+GLM_EXT_quaternion_exponential
+
+GLM_EXT_quaternion_geometric
+
+GLM_EXT_quaternion_relational
+
+GLM_EXT_quaternion_trigonometric
+

Function Documentation

+ +

◆ exp()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL qua<T, Q> glm::exp (qua< T, Q > const & q)
+
+ +

Returns a exponential of a quaternion.

+
Template Parameters
+ + + +
TA floating-point scalar type
QA value from qualifier enum
+
+
+ +
+
+ +

◆ log()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL qua<T, Q> glm::log (qua< T, Q > const & q)
+
+ +

Returns a logarithm of a quaternion.

+
Template Parameters
+ + + +
TA floating-point scalar type
QA value from qualifier enum
+
+
+ +
+
+ +

◆ pow()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL qua<T, Q> glm::pow (qua< T, Q > const & q,
y 
)
+
+ +

Returns a quaternion raised to a power.

+
Template Parameters
+ + + +
TA floating-point scalar type
QA value from qualifier enum
+
+
+ +
+
+ +

◆ rotate()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL qua<T, Q> glm::rotate (qua< T, Q > const & q,
T const & angle,
vec< 3, T, Q > const & axis 
)
+
+ +

Rotates a quaternion from a vector of 3 components axis and an angle.

+
Parameters
+ + + + +
qSource orientation
angleAngle expressed in radians.
axisAxis of the rotation
+
+
+
Template Parameters
+ + + +
TFloating-point scalar types
QValue from qualifier enum
+
+
+ +
+
+ +

◆ sqrt()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL qua<T, Q> glm::sqrt (qua< T, Q > const & q)
+
+ +

Returns the square root of a quaternion.

+
Template Parameters
+ + + +
TA floating-point scalar type
QA value from qualifier enum
+
+
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00678.html b/common/glm/doc/api/a00678.html new file mode 100644 index 000000000..89989df2a --- /dev/null +++ b/common/glm/doc/api/a00678.html @@ -0,0 +1,205 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_quaternion_trigonometric + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_quaternion_trigonometric
+
+
+ + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL T angle (qua< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > angleAxis (T const &angle, vec< 3, T, Q > const &axis)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > axis (qua< T, Q > const &x)
 
+

Detailed Description

+

Provides trigonometric functions for quaternion types.

+

Include <glm/ext/quaternion_trigonometric.hpp> to use the features of this extension.

+
See also
GLM_EXT_quaternion_float
+
+GLM_EXT_quaternion_double
+
+GLM_EXT_quaternion_exponential
+
+GLM_EXT_quaternion_geometric
+
+GLM_EXT_quaternion_relational
+
+GLM_EXT_quaternion_transform
+

Function Documentation

+ +

◆ angle()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL T glm::angle (qua< T, Q > const & x)
+
+ +

Returns the quaternion rotation angle.

+
Template Parameters
+ + + +
TA floating-point scalar type
QA value from qualifier enum
+
+
+ +
+
+ +

◆ angleAxis()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL qua<T, Q> glm::angleAxis (T const & angle,
vec< 3, T, Q > const & axis 
)
+
+ +

Build a quaternion from an angle and a normalized axis.

+
Parameters
+ + + +
angleAngle expressed in radians.
axisAxis of the quaternion, must be normalized.
+
+
+
Template Parameters
+ + + +
TA floating-point scalar type
QA value from qualifier enum
+
+
+ +
+
+ +

◆ axis()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::axis (qua< T, Q > const & x)
+
+ +

Returns the q rotation axis.

+
Template Parameters
+ + + +
TA floating-point scalar type
QA value from qualifier enum
+
+
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00679.html b/common/glm/doc/api/a00679.html new file mode 100644 index 000000000..71ac116ab --- /dev/null +++ b/common/glm/doc/api/a00679.html @@ -0,0 +1,564 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_scalar_common + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_scalar_common
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T >
GLM_FUNC_DECL T fmax (T a, T b)
 
template<typename T >
GLM_FUNC_DECL T fmax (T a, T b, T C)
 
template<typename T >
GLM_FUNC_DECL T fmax (T a, T b, T C, T D)
 
template<typename T >
GLM_FUNC_DECL T fmin (T a, T b)
 
template<typename T >
GLM_FUNC_DECL T fmin (T a, T b, T c)
 
template<typename T >
GLM_FUNC_DECL T fmin (T a, T b, T c, T d)
 
template<typename T >
GLM_FUNC_DECL T max (T a, T b, T c)
 
template<typename T >
GLM_FUNC_DECL T max (T a, T b, T c, T d)
 
template<typename T >
GLM_FUNC_DECL T min (T a, T b, T c)
 
template<typename T >
GLM_FUNC_DECL T min (T a, T b, T c, T d)
 
+

Detailed Description

+

Exposes min and max functions for 3 to 4 scalar parameters.

+

Include <glm/ext/scalar_common.hpp> to use the features of this extension.

+
See also
Common functions
+
+GLM_EXT_vector_common
+

Function Documentation

+ +

◆ fmax() [1/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::fmax (a,
b 
)
+
+ +

Returns the maximum component-wise values of 2 inputs.

+

If one of the two arguments is NaN, the value of the other argument is returned.

+
Template Parameters
+ + +
TA floating-point scalar type.
+
+
+
See also
std::fmax documentation
+ +
+
+ +

◆ fmax() [2/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::fmax (a,
b,
C 
)
+
+ +

Returns the maximum component-wise values of 3 inputs.

+

If one of the two arguments is NaN, the value of the other argument is returned.

+
Template Parameters
+ + +
TA floating-point scalar type.
+
+
+
See also
std::fmax documentation
+ +
+
+ +

◆ fmax() [3/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::fmax (a,
b,
C,
D 
)
+
+ +

Returns the maximum component-wise values of 4 inputs.

+

If one of the two arguments is NaN, the value of the other argument is returned.

+
Template Parameters
+ + +
TA floating-point scalar type.
+
+
+
See also
std::fmax documentation
+ +
+
+ +

◆ fmin() [1/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::fmin (a,
b 
)
+
+ +

Returns the minimum component-wise values of 2 inputs.

+

If one of the two arguments is NaN, the value of the other argument is returned.

+
Template Parameters
+ + +
TA floating-point scalar type.
+
+
+
See also
std::fmin documentation
+ +
+
+ +

◆ fmin() [2/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::fmin (a,
b,
c 
)
+
+ +

Returns the minimum component-wise values of 3 inputs.

+

If one of the two arguments is NaN, the value of the other argument is returned.

+
Template Parameters
+ + +
TA floating-point scalar type.
+
+
+
See also
std::fmin documentation
+ +
+
+ +

◆ fmin() [3/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::fmin (a,
b,
c,
d 
)
+
+ +

Returns the minimum component-wise values of 4 inputs.

+

If one of the two arguments is NaN, the value of the other argument is returned.

+
Template Parameters
+ + +
TA floating-point scalar type.
+
+
+
See also
std::fmin documentation
+ +
+
+ +

◆ max() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::max (a,
b,
c 
)
+
+ +

Returns the maximum component-wise values of 3 inputs.

+
Template Parameters
+ + +
TA floating-point scalar type.
+
+
+ +
+
+ +

◆ max() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::max (a,
b,
c,
d 
)
+
+ +

Returns the maximum component-wise values of 4 inputs.

+
Template Parameters
+ + +
TA floating-point scalar type.
+
+
+ +
+
+ +

◆ min() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::min (a,
b,
c 
)
+
+ +

Returns the minimum component-wise values of 3 inputs.

+
Template Parameters
+ + +
TA floating-point scalar type.
+
+
+ +
+
+ +

◆ min() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::min (a,
b,
c,
d 
)
+
+ +

Returns the minimum component-wise values of 4 inputs.

+
Template Parameters
+ + +
TA floating-point scalar type.
+
+
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00680.html b/common/glm/doc/api/a00680.html new file mode 100644 index 000000000..43562b7ef --- /dev/null +++ b/common/glm/doc/api/a00680.html @@ -0,0 +1,94 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_scalar_constants + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_scalar_constants
+
+
+ + + + + + + + +

+Functions

+template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon ()
 
+template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType pi ()
 
+

Detailed Description

+

Provides a list of constants and precomputed useful values.

+

Include <glm/ext/scalar_constants.hpp> to use the features of this extension.

+
+ + + + diff --git a/common/glm/doc/api/a00681.html b/common/glm/doc/api/a00681.html new file mode 100644 index 000000000..385a3ebe1 --- /dev/null +++ b/common/glm/doc/api/a00681.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_scalar_float_sized + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_scalar_float_sized
+
+
+ + + + + + +

+Typedefs

+typedef float float32
 
+typedef double float64
 
+

Detailed Description

+

Exposes sized float scalar types.

+

Include <glm/ext/scalar_float_sized.hpp> to use the features of this extension.

+
See also
GLM_EXT_scalar_int_sized
+
+GLM_EXT_scalar_uint_sized
+
+ + + + diff --git a/common/glm/doc/api/a00682.html b/common/glm/doc/api/a00682.html new file mode 100644 index 000000000..a3a7a0d4b --- /dev/null +++ b/common/glm/doc/api/a00682.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_scalar_int_sized + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_scalar_int_sized
+
+
+ + + + + + + + + + +

+Typedefs

+typedef detail::int16 int16
 
+typedef detail::int32 int32
 
+typedef detail::int64 int64
 
+typedef detail::int8 int8
 
+

Detailed Description

+

Exposes sized signed integer scalar types.

+

Include <glm/ext/scalar_int_sized.hpp> to use the features of this extension.

+
See also
GLM_EXT_scalar_uint_sized
+
+ + + + diff --git a/common/glm/doc/api/a00683.html b/common/glm/doc/api/a00683.html new file mode 100644 index 000000000..c1afbdd57 --- /dev/null +++ b/common/glm/doc/api/a00683.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_scalar_relational + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
GLM_EXT_scalar_relational
+
+
+

Exposes comparison functions for scalar types that take a user defined epsilon values.

+

Include <glm/ext/scalar_relational.hpp> to use the features of this extension.

+
See also
core_vector_relational
+
+GLM_EXT_vector_relational
+
+GLM_EXT_matrix_relational
+
+ + + + diff --git a/common/glm/doc/api/a00684.html b/common/glm/doc/api/a00684.html new file mode 100644 index 000000000..903dbb7a6 --- /dev/null +++ b/common/glm/doc/api/a00684.html @@ -0,0 +1,99 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_scalar_uint_sized + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_scalar_uint_sized
+
+
+ + + + + + + + + + +

+Typedefs

+typedef detail::uint16 uint16
 
+typedef detail::uint32 uint32
 
+typedef detail::uint64 uint64
 
+typedef detail::uint8 uint8
 
+

Detailed Description

+

Exposes sized unsigned integer scalar types.

+

Include <glm/ext/scalar_uint_sized.hpp> to use the features of this extension.

+
See also
GLM_EXT_scalar_int_sized
+
+ + + + diff --git a/common/glm/doc/api/a00685.html b/common/glm/doc/api/a00685.html new file mode 100644 index 000000000..9769ba118 --- /dev/null +++ b/common/glm/doc/api/a00685.html @@ -0,0 +1,90 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_vector_bool1 + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_vector_bool1
+
+
+ + + + +

+Typedefs

+typedef vec< 1, bool, defaultp > bvec1
 
+

Detailed Description

+

Exposes bvec1 vector type.

+

Include <glm/ext/vector_bool1.hpp> to use the features of this extension.

+
See also
GLM_EXT_vector_bool1_precision extension.
+
+ + + + diff --git a/common/glm/doc/api/a00686.html b/common/glm/doc/api/a00686.html new file mode 100644 index 000000000..f7a29c4b5 --- /dev/null +++ b/common/glm/doc/api/a00686.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_vector_bool1_precision + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_vector_bool1_precision
+
+
+ + + + + + + + +

+Typedefs

+typedef vec< 1, bool, highp > highp_bvec1
 
+typedef vec< 1, bool, lowp > lowp_bvec1
 
+typedef vec< 1, bool, mediump > mediump_bvec1
 
+

Detailed Description

+

Exposes highp_bvec1, mediump_bvec1 and lowp_bvec1 types.

+

Include <glm/ext/vector_bool1_precision.hpp> to use the features of this extension.

+
+ + + + diff --git a/common/glm/doc/api/a00687.html b/common/glm/doc/api/a00687.html new file mode 100644 index 000000000..527941e74 --- /dev/null +++ b/common/glm/doc/api/a00687.html @@ -0,0 +1,670 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_vector_common + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_vector_common
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fmax (vec< L, T, Q > const &a, T b)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fmax (vec< L, T, Q > const &a, vec< L, T, Q > const &b)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fmax (vec< L, T, Q > const &a, vec< L, T, Q > const &b, vec< L, T, Q > const &c)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fmax (vec< L, T, Q > const &a, vec< L, T, Q > const &b, vec< L, T, Q > const &c, vec< L, T, Q > const &d)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fmin (vec< L, T, Q > const &x, T y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fmin (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fmin (vec< L, T, Q > const &a, vec< L, T, Q > const &b, vec< L, T, Q > const &c)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fmin (vec< L, T, Q > const &a, vec< L, T, Q > const &b, vec< L, T, Q > const &c, vec< L, T, Q > const &d)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > max (vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &z)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > max (vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &z, vec< L, T, Q > const &w)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > min (vec< L, T, Q > const &a, vec< L, T, Q > const &b, vec< L, T, Q > const &c)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > min (vec< L, T, Q > const &a, vec< L, T, Q > const &b, vec< L, T, Q > const &c, vec< L, T, Q > const &d)
 
+

Detailed Description

+

Exposes min and max functions for 3 to 4 vector parameters.

+

Include <glm/ext/vector_common.hpp> to use the features of this extension.

+
See also
core_common
+
+GLM_EXT_scalar_common
+

Function Documentation

+ +

◆ fmax() [1/4]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::fmax (vec< L, T, Q > const & a,
b 
)
+
+ +

Returns y if x < y; otherwise, it returns x.

+

If one of the two arguments is NaN, the value of the other argument is returned.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
std::fmax documentation
+ +
+
+ +

◆ fmax() [2/4]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::fmax (vec< L, T, Q > const & a,
vec< L, T, Q > const & b 
)
+
+ +

Returns y if x < y; otherwise, it returns x.

+

If one of the two arguments is NaN, the value of the other argument is returned.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
std::fmax documentation
+ +
+
+ +

◆ fmax() [3/4]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::fmax (vec< L, T, Q > const & a,
vec< L, T, Q > const & b,
vec< L, T, Q > const & c 
)
+
+ +

Returns y if x < y; otherwise, it returns x.

+

If one of the two arguments is NaN, the value of the other argument is returned.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
std::fmax documentation
+ +
+
+ +

◆ fmax() [4/4]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::fmax (vec< L, T, Q > const & a,
vec< L, T, Q > const & b,
vec< L, T, Q > const & c,
vec< L, T, Q > const & d 
)
+
+ +

Returns y if x < y; otherwise, it returns x.

+

If one of the two arguments is NaN, the value of the other argument is returned.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
std::fmax documentation
+ +
+
+ +

◆ fmin() [1/4]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::fmin (vec< L, T, Q > const & x,
y 
)
+
+ +

Returns y if y < x; otherwise, it returns x.

+

If one of the two arguments is NaN, the value of the other argument is returned.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
std::fmin documentation
+ +
+
+ +

◆ fmin() [2/4]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::fmin (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Returns y if y < x; otherwise, it returns x.

+

If one of the two arguments is NaN, the value of the other argument is returned.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
std::fmin documentation
+ +
+
+ +

◆ fmin() [3/4]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::fmin (vec< L, T, Q > const & a,
vec< L, T, Q > const & b,
vec< L, T, Q > const & c 
)
+
+ +

Returns y if y < x; otherwise, it returns x.

+

If one of the two arguments is NaN, the value of the other argument is returned.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
std::fmin documentation
+ +
+
+ +

◆ fmin() [4/4]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::fmin (vec< L, T, Q > const & a,
vec< L, T, Q > const & b,
vec< L, T, Q > const & c,
vec< L, T, Q > const & d 
)
+
+ +

Returns y if y < x; otherwise, it returns x.

+

If one of the two arguments is NaN, the value of the other argument is returned.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
std::fmin documentation
+ +
+
+ +

◆ max() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> glm::max (vec< L, T, Q > const & x,
vec< L, T, Q > const & y,
vec< L, T, Q > const & z 
)
+
+ +

Return the maximum component-wise values of 3 inputs.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+ +
+
+ +

◆ max() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> glm::max (vec< L, T, Q > const & x,
vec< L, T, Q > const & y,
vec< L, T, Q > const & z,
vec< L, T, Q > const & w 
)
+
+ +

Return the maximum component-wise values of 4 inputs.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+ +
+
+ +

◆ min() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> glm::min (vec< L, T, Q > const & a,
vec< L, T, Q > const & b,
vec< L, T, Q > const & c 
)
+
+ +

Return the minimum component-wise values of 3 inputs.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+ +
+
+ +

◆ min() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> glm::min (vec< L, T, Q > const & a,
vec< L, T, Q > const & b,
vec< L, T, Q > const & c,
vec< L, T, Q > const & d 
)
+
+ +

Return the minimum component-wise values of 4 inputs.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00688.html b/common/glm/doc/api/a00688.html new file mode 100644 index 000000000..c00433954 --- /dev/null +++ b/common/glm/doc/api/a00688.html @@ -0,0 +1,92 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_vector_double1 + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_vector_double1
+
+
+ + + + +

+Typedefs

+typedef vec< 1, double, defaultp > dvec1
 
+

Detailed Description

+

Exposes double-precision floating point vector type with one component.

+

Include <glm/ext/vector_double1.hpp> to use the features of this extension.

+
See also
GLM_EXT_vector_double1_precision extension.
+
+GLM_EXT_vector_float1 extension.
+
+ + + + diff --git a/common/glm/doc/api/a00689.html b/common/glm/doc/api/a00689.html new file mode 100644 index 000000000..71ad1f9b8 --- /dev/null +++ b/common/glm/doc/api/a00689.html @@ -0,0 +1,96 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_vector_double1_precision + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_vector_double1_precision
+
+
+ + + + + + + + +

+Typedefs

+typedef vec< 1, double, highp > highp_dvec1
 
+typedef vec< 1, double, lowp > lowp_dvec1
 
+typedef vec< 1, double, mediump > mediump_dvec1
 
+

Detailed Description

+

Exposes highp_dvec1, mediump_dvec1 and lowp_dvec1 types.

+

Include <glm/ext/vector_double1_precision.hpp> to use the features of this extension.

+
See also
GLM_EXT_vector_double1
+
+ + + + diff --git a/common/glm/doc/api/a00690.html b/common/glm/doc/api/a00690.html new file mode 100644 index 000000000..3538f6d8f --- /dev/null +++ b/common/glm/doc/api/a00690.html @@ -0,0 +1,92 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_vector_float1 + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_vector_float1
+
+
+ + + + +

+Typedefs

+typedef vec< 1, float, defaultp > vec1
 
+

Detailed Description

+

Exposes single-precision floating point vector type with one component.

+

Include <glm/ext/vector_float1.hpp> to use the features of this extension.

+
See also
GLM_EXT_vector_float1_precision extension.
+
+GLM_EXT_vector_double1 extension.
+
+ + + + diff --git a/common/glm/doc/api/a00691.html b/common/glm/doc/api/a00691.html new file mode 100644 index 000000000..e31dd86b2 --- /dev/null +++ b/common/glm/doc/api/a00691.html @@ -0,0 +1,96 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_vector_float1_precision + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_vector_float1_precision
+
+
+ + + + + + + + +

+Typedefs

+typedef vec< 1, float, highp > highp_vec1
 
+typedef vec< 1, float, lowp > lowp_vec1
 
+typedef vec< 1, float, mediump > mediump_vec1
 
+

Detailed Description

+

Exposes highp_vec1, mediump_vec1 and lowp_vec1 types.

+

Include <glm/ext/vector_float1_precision.hpp> to use the features of this extension.

+
See also
GLM_EXT_vector_float1 extension.
+
+ + + + diff --git a/common/glm/doc/api/a00692.html b/common/glm/doc/api/a00692.html new file mode 100644 index 000000000..b35947486 --- /dev/null +++ b/common/glm/doc/api/a00692.html @@ -0,0 +1,92 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_vector_int1 + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_vector_int1
+
+
+ + + + +

+Typedefs

+typedef vec< 1, int, defaultp > ivec1
 
+

Detailed Description

+

Exposes ivec1 vector type.

+

Include <glm/ext/vector_int1.hpp> to use the features of this extension.

+
See also
GLM_EXT_vector_uint1 extension.
+
+GLM_EXT_vector_int1_precision extension.
+
+ + + + diff --git a/common/glm/doc/api/a00693.html b/common/glm/doc/api/a00693.html new file mode 100644 index 000000000..3767cdde8 --- /dev/null +++ b/common/glm/doc/api/a00693.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_vector_int1_precision + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_vector_int1_precision
+
+
+ + + + + + + + +

+Typedefs

+typedef vec< 1, int, highp > highp_ivec1
 
+typedef vec< 1, int, lowp > lowp_ivec1
 
+typedef vec< 1, int, mediump > mediump_ivec1
 
+

Detailed Description

+

Exposes highp_ivec1, mediump_ivec1 and lowp_ivec1 types.

+

Include <glm/ext/vector_int1_precision.hpp> to use the features of this extension.

+
+ + + + diff --git a/common/glm/doc/api/a00694.html b/common/glm/doc/api/a00694.html new file mode 100644 index 000000000..75869ddef --- /dev/null +++ b/common/glm/doc/api/a00694.html @@ -0,0 +1,284 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_vector_relational + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_vector_relational
+
+
+ + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal (vec< L, T, Q > const &x, vec< L, T, Q > const &y, T epsilon)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal (vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y, T epsilon)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
 
+

Detailed Description

+

Exposes comparison functions for vector types that take a user defined epsilon values.

+

Include <glm/ext/vector_relational.hpp> to use the features of this extension.

+
See also
core_vector_relational
+
+GLM_EXT_scalar_relational
+
+GLM_EXT_matrix_relational
+

Function Documentation

+ +

◆ equal() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> glm::equal (vec< L, T, Q > const & x,
vec< L, T, Q > const & y,
epsilon 
)
+
+ +

Returns the component-wise comparison of |x - y| < epsilon.

+

True if this expression is satisfied.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+ +
+
+ +

◆ equal() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> glm::equal (vec< L, T, Q > const & x,
vec< L, T, Q > const & y,
vec< L, T, Q > const & epsilon 
)
+
+ +

Returns the component-wise comparison of |x - y| < epsilon.

+

True if this expression is satisfied.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+ +
+
+ +

◆ notEqual() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> glm::notEqual (vec< L, T, Q > const & x,
vec< L, T, Q > const & y,
epsilon 
)
+
+ +

Returns the component-wise comparison of |x - y| >= epsilon.

+

True if this expression is not satisfied.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+ +
+
+ +

◆ notEqual() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> glm::notEqual (vec< L, T, Q > const & x,
vec< L, T, Q > const & y,
vec< L, T, Q > const & epsilon 
)
+
+ +

Returns the component-wise comparison of |x - y| >= epsilon.

+

True if this expression is not satisfied.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00695.html b/common/glm/doc/api/a00695.html new file mode 100644 index 000000000..6adf962c6 --- /dev/null +++ b/common/glm/doc/api/a00695.html @@ -0,0 +1,92 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_vector_uint1 + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_vector_uint1
+
+
+ + + + +

+Typedefs

+typedef vec< 1, unsigned int, defaultp > uvec1
 
+

Detailed Description

+

Exposes uvec1 vector type.

+

Include <glm/ext/vector_uvec1.hpp> to use the features of this extension.

+
See also
GLM_EXT_vector_int1 extension.
+
+GLM_EXT_vector_uint1_precision extension.
+
+ + + + diff --git a/common/glm/doc/api/a00696.html b/common/glm/doc/api/a00696.html new file mode 100644 index 000000000..142d9f93b --- /dev/null +++ b/common/glm/doc/api/a00696.html @@ -0,0 +1,150 @@ + + + + + + + +0.9.9 API documenation: GLM_EXT_vector_uint1_precision + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_EXT_vector_uint1_precision
+
+
+ + + + + + + + +

+Typedefs

typedef vec< 1, unsigned int, highp > highp_uvec1
 
typedef vec< 1, unsigned int, lowp > lowp_uvec1
 
typedef vec< 1, unsigned int, mediump > mediump_uvec1
 
+

Detailed Description

+

Exposes highp_uvec1, mediump_uvec1 and lowp_uvec1 types.

+

Include <glm/ext/vector_uint1_precision.hpp> to use the features of this extension.

+

Typedef Documentation

+ +

◆ highp_uvec1

+ +
+
+ + + + +
typedef vec< 1, u32, highp > highp_uvec1
+
+ +

1 component vector of unsigned integer values.

+
See also
GLM_EXT_vector_uint1_precision
+ +

Definition at line 27 of file vector_uint1_precision.hpp.

+ +
+
+ +

◆ lowp_uvec1

+ +
+
+ + + + +
typedef vec< 1, u32, lowp > lowp_uvec1
+
+ +

1 component vector of unsigned integer values.

+
See also
GLM_EXT_vector_uint1_precision
+ +

Definition at line 37 of file vector_uint1_precision.hpp.

+ +
+
+ +

◆ mediump_uvec1

+ +
+
+ + + + +
typedef vec< 1, u32, mediump > mediump_uvec1
+
+ +

1 component vector of unsigned integer values.

+
See also
GLM_EXT_vector_uint1_precision
+ +

Definition at line 32 of file vector_uint1_precision.hpp.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00697.html b/common/glm/doc/api/a00697.html new file mode 100644 index 000000000..b880f6bce --- /dev/null +++ b/common/glm/doc/api/a00697.html @@ -0,0 +1,423 @@ + + + + + + + +0.9.9 API documenation: Geometric functions + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
Geometric functions
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > cross (vec< 3, T, Q > const &x, vec< 3, T, Q > const &y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T distance (vec< L, T, Q > const &p0, vec< L, T, Q > const &p1)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T dot (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > faceforward (vec< L, T, Q > const &N, vec< L, T, Q > const &I, vec< L, T, Q > const &Nref)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T length (vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > normalize (vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > reflect (vec< L, T, Q > const &I, vec< L, T, Q > const &N)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > refract (vec< L, T, Q > const &I, vec< L, T, Q > const &N, T eta)
 
+

Detailed Description

+

These operate on vectors as vectors, not component-wise.

+

Include <glm/geometric.hpp> to use these core features.

+

Function Documentation

+ +

◆ cross()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::cross (vec< 3, T, Q > const & x,
vec< 3, T, Q > const & y 
)
+
+ +

Returns the cross product of x and y.

+
Template Parameters
+ + +
TFloating-point scalar types.
+
+
+
See also
GLSL cross man page
+
+GLSL 4.20.8 specification, section 8.5 Geometric Functions
+ +
+
+ +

◆ distance()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::distance (vec< L, T, Q > const & p0,
vec< L, T, Q > const & p1 
)
+
+ +

Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TFloating-point scalar types.
+
+
+
See also
GLSL distance man page
+
+GLSL 4.20.8 specification, section 8.5 Geometric Functions
+ +
+
+ +

◆ dot()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::dot (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Returns the dot product of x and y, i.e., result = x * y.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TFloating-point scalar types.
+
+
+
See also
GLSL dot man page
+
+GLSL 4.20.8 specification, section 8.5 Geometric Functions
+ +
+
+ +

◆ faceforward()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::faceforward (vec< L, T, Q > const & N,
vec< L, T, Q > const & I,
vec< L, T, Q > const & Nref 
)
+
+ +

If dot(Nref, I) < 0.0, return N, otherwise, return -N.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TFloating-point scalar types.
+
+
+
See also
GLSL faceforward man page
+
+GLSL 4.20.8 specification, section 8.5 Geometric Functions
+ +
+
+ +

◆ length()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL T glm::length (vec< L, T, Q > const & x)
+
+ +

Returns the length of x, i.e., sqrt(x * x).

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TFloating-point scalar types.
+
+
+
See also
GLSL length man page
+
+GLSL 4.20.8 specification, section 8.5 Geometric Functions
+ +
+
+ +

◆ normalize()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::normalize (vec< L, T, Q > const & x)
+
+ +

Returns a vector in the same direction as x but with length of 1.

+

According to issue 10 GLSL 1.10 specification, if length(x) == 0 then result is undefined and generate an error.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TFloating-point scalar types.
+
+
+
See also
GLSL normalize man page
+
+GLSL 4.20.8 specification, section 8.5 Geometric Functions
+ +
+
+ +

◆ reflect()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::reflect (vec< L, T, Q > const & I,
vec< L, T, Q > const & N 
)
+
+ +

For the incident vector I and surface orientation N, returns the reflection direction : result = I - 2.0 * dot(N, I) * N.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TFloating-point scalar types.
+
+
+
See also
GLSL reflect man page
+
+GLSL 4.20.8 specification, section 8.5 Geometric Functions
+ +
+
+ +

◆ refract()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::refract (vec< L, T, Q > const & I,
vec< L, T, Q > const & N,
eta 
)
+
+ +

For the incident vector I and surface normal N, and the ratio of indices of refraction eta, return the refraction vector.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TFloating-point scalar types.
+
+
+
See also
GLSL refract man page
+
+GLSL 4.20.8 specification, section 8.5 Geometric Functions
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00698.html b/common/glm/doc/api/a00698.html new file mode 100644 index 000000000..1ca2120d5 --- /dev/null +++ b/common/glm/doc/api/a00698.html @@ -0,0 +1,138 @@ + + + + + + + +0.9.9 API documenation: Core features + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
Core features
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Modules

 Common functions
 
 Exponential functions
 
 Geometric functions
 
 Vector types
 
 Vector types with precision qualifiers
 
 Matrix types
 
 Matrix types with precision qualifiers
 
 Integer functions
 
 Matrix functions
 
 Floating-Point Pack and Unpack Functions
 
 Angle and Trigonometry Functions
 
 Vector Relational Functions
 
+ + + +

+Typedefs

typedef mat< 3, 2, float, defaultp > mat3x2
 
+

Detailed Description

+

Features that implement in C++ the GLSL specification as closely as possible.

+

The GLM core consists of C++ types that mirror GLSL types and C++ functions that mirror the GLSL functions.

+

The best documentation for GLM Core is the current GLSL specification, version 4.2 (pdf file).

+

GLM core functionalities require <glm/glm.hpp> to be included to be used.

+

Typedef Documentation

+ +

◆ mat3x2

+ +
+
+ + + + +
typedef mat< 3, 2, f32, defaultp > mat3x2
+
+ +

3 columns of 2 components matrix of single-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+ +

Definition at line 15 of file matrix_float3x2.hpp.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00699.html b/common/glm/doc/api/a00699.html new file mode 100644 index 000000000..b70dc38a5 --- /dev/null +++ b/common/glm/doc/api/a00699.html @@ -0,0 +1,401 @@ + + + + + + + +0.9.9 API documenation: Vector types + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
Vector types
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Typedefs

typedef vec< 2, bool, defaultp > bvec2
 
typedef vec< 3, bool, defaultp > bvec3
 
typedef vec< 4, bool, defaultp > bvec4
 
typedef vec< 2, double, defaultp > dvec2
 
typedef vec< 3, double, defaultp > dvec3
 
typedef vec< 4, double, defaultp > dvec4
 
typedef vec< 2, int, defaultp > ivec2
 
typedef vec< 3, int, defaultp > ivec3
 
typedef vec< 4, int, defaultp > ivec4
 
typedef vec< 2, unsigned int, defaultp > uvec2
 
typedef vec< 3, unsigned int, defaultp > uvec3
 
typedef vec< 4, unsigned int, defaultp > uvec4
 
typedef vec< 2, float, defaultp > vec2
 
typedef vec< 3, float, defaultp > vec3
 
typedef vec< 4, float, defaultp > vec4
 
+

Detailed Description

+

Vector types of two to four components with an exhaustive set of operators.

+

Typedef Documentation

+ +

◆ bvec2

+ +
+
+ + + + +
typedef vec< 2, bool, defaultp > bvec2
+
+ +

2 components vector of boolean.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+ +

Definition at line 15 of file vector_bool2.hpp.

+ +
+
+ +

◆ bvec3

+ +
+
+ + + + +
typedef vec< 3, bool, defaultp > bvec3
+
+ +

3 components vector of boolean.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+ +

Definition at line 15 of file vector_bool3.hpp.

+ +
+
+ +

◆ bvec4

+ +
+
+ + + + +
typedef vec< 4, bool, defaultp > bvec4
+
+ +

4 components vector of boolean.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+ +

Definition at line 15 of file vector_bool4.hpp.

+ +
+
+ +

◆ dvec2

+ +
+
+ + + + +
typedef vec< 2, f64, defaultp > dvec2
+
+ +

2 components vector of double-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+ +

Definition at line 15 of file vector_double2.hpp.

+ +
+
+ +

◆ dvec3

+ +
+
+ + + + +
typedef vec< 3, f64, defaultp > dvec3
+
+ +

3 components vector of double-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+ +

Definition at line 15 of file vector_double3.hpp.

+ +
+
+ +

◆ dvec4

+ +
+
+ + + + +
typedef vec< 4, f64, defaultp > dvec4
+
+ +

4 components vector of double-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+ +

Definition at line 15 of file vector_double4.hpp.

+ +
+
+ +

◆ ivec2

+ +
+
+ + + + +
typedef vec< 2, i32, defaultp > ivec2
+
+ +

2 components vector of signed integer numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+ +

Definition at line 15 of file vector_int2.hpp.

+ +
+
+ +

◆ ivec3

+ +
+
+ + + + +
typedef vec< 3, i32, defaultp > ivec3
+
+ +

3 components vector of signed integer numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+ +

Definition at line 15 of file vector_int3.hpp.

+ +
+
+ +

◆ ivec4

+ +
+
+ + + + +
typedef vec< 4, i32, defaultp > ivec4
+
+ +

4 components vector of signed integer numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+ +

Definition at line 15 of file vector_int4.hpp.

+ +
+
+ +

◆ uvec2

+ +
+
+ + + + +
typedef vec< 2, u32, defaultp > uvec2
+
+ +

2 components vector of unsigned integer numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+ +

Definition at line 15 of file vector_uint2.hpp.

+ +
+
+ +

◆ uvec3

+ +
+
+ + + + +
typedef vec< 3, u32, defaultp > uvec3
+
+ +

3 components vector of unsigned integer numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+ +

Definition at line 15 of file vector_uint3.hpp.

+ +
+
+ +

◆ uvec4

+ +
+
+ + + + +
typedef vec< 4, u32, defaultp > uvec4
+
+ +

4 components vector of unsigned integer numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+ +

Definition at line 15 of file vector_uint4.hpp.

+ +
+
+ +

◆ vec2

+ +
+
+ + + + +
typedef vec< 2, float, defaultp > vec2
+
+ +

2 components vector of single-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+ +

Definition at line 15 of file vector_float2.hpp.

+ +
+
+ +

◆ vec3

+ +
+
+ + + + +
typedef vec< 3, float, defaultp > vec3
+
+ +

3 components vector of single-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+ +

Definition at line 15 of file vector_float3.hpp.

+ +
+
+ +

◆ vec4

+ +
+
+ + + + +
typedef vec< 4, float, defaultp > vec4
+
+ +

4 components vector of single-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+ +

Definition at line 15 of file vector_float4.hpp.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00700.html b/common/glm/doc/api/a00700.html new file mode 100644 index 000000000..9d3293b50 --- /dev/null +++ b/common/glm/doc/api/a00700.html @@ -0,0 +1,1130 @@ + + + + + + + +0.9.9 API documenation: Vector types with precision qualifiers + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
Vector types with precision qualifiers
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Typedefs

typedef vec< 2, bool, highp > highp_bvec2
 
typedef vec< 3, bool, highp > highp_bvec3
 
typedef vec< 4, bool, highp > highp_bvec4
 
typedef vec< 2, double, highp > highp_dvec2
 
typedef vec< 3, double, highp > highp_dvec3
 
typedef vec< 4, double, highp > highp_dvec4
 
typedef vec< 2, int, highp > highp_ivec2
 
typedef vec< 3, int, highp > highp_ivec3
 
typedef vec< 4, int, highp > highp_ivec4
 
typedef vec< 2, unsigned int, highp > highp_uvec2
 
typedef vec< 3, unsigned int, highp > highp_uvec3
 
typedef vec< 4, unsigned int, highp > highp_uvec4
 
typedef vec< 2, float, highp > highp_vec2
 
typedef vec< 3, float, highp > highp_vec3
 
typedef vec< 4, float, highp > highp_vec4
 
typedef vec< 2, bool, lowp > lowp_bvec2
 
typedef vec< 3, bool, lowp > lowp_bvec3
 
typedef vec< 4, bool, lowp > lowp_bvec4
 
typedef vec< 2, double, lowp > lowp_dvec2
 
typedef vec< 3, double, lowp > lowp_dvec3
 
typedef vec< 4, double, lowp > lowp_dvec4
 
typedef vec< 2, int, lowp > lowp_ivec2
 
typedef vec< 3, int, lowp > lowp_ivec3
 
typedef vec< 4, int, lowp > lowp_ivec4
 
typedef vec< 2, unsigned int, lowp > lowp_uvec2
 
typedef vec< 3, unsigned int, lowp > lowp_uvec3
 
typedef vec< 4, unsigned int, lowp > lowp_uvec4
 
typedef vec< 2, float, lowp > lowp_vec2
 
typedef vec< 3, float, lowp > lowp_vec3
 
typedef vec< 4, float, lowp > lowp_vec4
 
typedef vec< 2, bool, mediump > mediump_bvec2
 
typedef vec< 3, bool, mediump > mediump_bvec3
 
typedef vec< 4, bool, mediump > mediump_bvec4
 
typedef vec< 2, double, mediump > mediump_dvec2
 
typedef vec< 3, double, mediump > mediump_dvec3
 
typedef vec< 4, double, mediump > mediump_dvec4
 
typedef vec< 2, int, mediump > mediump_ivec2
 
typedef vec< 3, int, mediump > mediump_ivec3
 
typedef vec< 4, int, mediump > mediump_ivec4
 
typedef vec< 2, unsigned int, mediump > mediump_uvec2
 
typedef vec< 3, unsigned int, mediump > mediump_uvec3
 
typedef vec< 4, unsigned int, mediump > mediump_uvec4
 
typedef vec< 2, float, mediump > mediump_vec2
 
typedef vec< 3, float, mediump > mediump_vec3
 
typedef vec< 4, float, mediump > mediump_vec4
 
+

Detailed Description

+

Vector types with precision qualifiers which may result in various precision in term of ULPs.

+

GLSL allows defining qualifiers for particular variables. With OpenGL's GLSL, these qualifiers have no effect; they are there for compatibility, with OpenGL ES's GLSL, these qualifiers do have an effect.

+

C++ has no language equivalent to qualifier qualifiers. So GLM provides the next-best thing: a number of typedefs that use a particular qualifier.

+

None of these types make any guarantees about the actual qualifier used.

+

Typedef Documentation

+ +

◆ highp_bvec2

+ +
+
+ + + + +
typedef vec< 2, bool, highp > highp_bvec2
+
+ +

2 components vector of high qualifier bool numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file vector_bool2_precision.hpp.

+ +
+
+ +

◆ highp_bvec3

+ +
+
+ + + + +
typedef vec< 3, bool, highp > highp_bvec3
+
+ +

3 components vector of high qualifier bool numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file vector_bool3_precision.hpp.

+ +
+
+ +

◆ highp_bvec4

+ +
+
+ + + + +
typedef vec< 4, bool, highp > highp_bvec4
+
+ +

4 components vector of high qualifier bool numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file vector_bool4_precision.hpp.

+ +
+
+ +

◆ highp_dvec2

+ +
+
+ + + + +
typedef vec< 2, f64, highp > highp_dvec2
+
+ +

2 components vector of high double-qualifier floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file vector_double2_precision.hpp.

+ +
+
+ +

◆ highp_dvec3

+ +
+
+ + + + +
typedef vec< 3, f64, highp > highp_dvec3
+
+ +

3 components vector of high double-qualifier floating-point numbers.

+

There is no guarantee on the actual qualifier.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 17 of file vector_double3_precision.hpp.

+ +
+
+ +

◆ highp_dvec4

+ +
+
+ + + + +
typedef vec< 4, f64, highp > highp_dvec4
+
+ +

4 components vector of high double-qualifier floating-point numbers.

+

There is no guarantee on the actual qualifier.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 18 of file vector_double4_precision.hpp.

+ +
+
+ +

◆ highp_ivec2

+ +
+
+ + + + +
typedef vec< 2, i32, highp > highp_ivec2
+
+ +

2 components vector of high qualifier signed integer numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file vector_int2_precision.hpp.

+ +
+
+ +

◆ highp_ivec3

+ +
+
+ + + + +
typedef vec< 3, i32, highp > highp_ivec3
+
+ +

3 components vector of high qualifier signed integer numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file vector_int3_precision.hpp.

+ +
+
+ +

◆ highp_ivec4

+ +
+
+ + + + +
typedef vec< 4, i32, highp > highp_ivec4
+
+ +

4 components vector of high qualifier signed integer numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file vector_int4_precision.hpp.

+ +
+
+ +

◆ highp_uvec2

+ +
+
+ + + + +
typedef vec< 2, u32, highp > highp_uvec2
+
+ +

2 components vector of high qualifier unsigned integer numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file vector_uint2_precision.hpp.

+ +
+
+ +

◆ highp_uvec3

+ +
+
+ + + + +
typedef vec< 3, u32, highp > highp_uvec3
+
+ +

3 components vector of high qualifier unsigned integer numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file vector_uint3_precision.hpp.

+ +
+
+ +

◆ highp_uvec4

+ +
+
+ + + + +
typedef vec< 4, u32, highp > highp_uvec4
+
+ +

4 components vector of high qualifier unsigned integer numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file vector_uint4_precision.hpp.

+ +
+
+ +

◆ highp_vec2

+ +
+
+ + + + +
typedef vec< 2, float, highp > highp_vec2
+
+ +

2 components vector of high single-qualifier floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file vector_float2_precision.hpp.

+ +
+
+ +

◆ highp_vec3

+ +
+
+ + + + +
typedef vec< 3, float, highp > highp_vec3
+
+ +

3 components vector of high single-qualifier floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file vector_float3_precision.hpp.

+ +
+
+ +

◆ highp_vec4

+ +
+
+ + + + +
typedef vec< 4, float, highp > highp_vec4
+
+ +

4 components vector of high single-qualifier floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file vector_float4_precision.hpp.

+ +
+
+ +

◆ lowp_bvec2

+ +
+
+ + + + +
typedef vec< 2, bool, lowp > lowp_bvec2
+
+ +

2 components vector of low qualifier bool numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file vector_bool2_precision.hpp.

+ +
+
+ +

◆ lowp_bvec3

+ +
+
+ + + + +
typedef vec< 3, bool, lowp > lowp_bvec3
+
+ +

3 components vector of low qualifier bool numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file vector_bool3_precision.hpp.

+ +
+
+ +

◆ lowp_bvec4

+ +
+
+ + + + +
typedef vec< 4, bool, lowp > lowp_bvec4
+
+ +

4 components vector of low qualifier bool numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file vector_bool4_precision.hpp.

+ +
+
+ +

◆ lowp_dvec2

+ +
+
+ + + + +
typedef vec< 2, f64, lowp > lowp_dvec2
+
+ +

2 components vector of low double-qualifier floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file vector_double2_precision.hpp.

+ +
+
+ +

◆ lowp_dvec3

+ +
+
+ + + + +
typedef vec< 3, f64, lowp > lowp_dvec3
+
+ +

3 components vector of low double-qualifier floating-point numbers.

+

There is no guarantee on the actual qualifier.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 31 of file vector_double3_precision.hpp.

+ +
+
+ +

◆ lowp_dvec4

+ +
+
+ + + + +
typedef vec< 4, f64, lowp > lowp_dvec4
+
+ +

4 components vector of low double-qualifier floating-point numbers.

+

There is no guarantee on the actual qualifier.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 32 of file vector_double4_precision.hpp.

+ +
+
+ +

◆ lowp_ivec2

+ +
+
+ + + + +
typedef vec< 2, i32, lowp > lowp_ivec2
+
+ +

2 components vector of low qualifier signed integer numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file vector_int2_precision.hpp.

+ +
+
+ +

◆ lowp_ivec3

+ +
+
+ + + + +
typedef vec< 3, i32, lowp > lowp_ivec3
+
+ +

3 components vector of low qualifier signed integer numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file vector_int3_precision.hpp.

+ +
+
+ +

◆ lowp_ivec4

+ +
+
+ + + + +
typedef vec< 4, i32, lowp > lowp_ivec4
+
+ +

4 components vector of low qualifier signed integer numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file vector_int4_precision.hpp.

+ +
+
+ +

◆ lowp_uvec2

+ +
+
+ + + + +
typedef vec< 2, u32, lowp > lowp_uvec2
+
+ +

2 components vector of low qualifier unsigned integer numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file vector_uint2_precision.hpp.

+ +
+
+ +

◆ lowp_uvec3

+ +
+
+ + + + +
typedef vec< 3, u32, lowp > lowp_uvec3
+
+ +

3 components vector of low qualifier unsigned integer numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file vector_uint3_precision.hpp.

+ +
+
+ +

◆ lowp_uvec4

+ +
+
+ + + + +
typedef vec< 4, u32, lowp > lowp_uvec4
+
+ +

4 components vector of low qualifier unsigned integer numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file vector_uint4_precision.hpp.

+ +
+
+ +

◆ lowp_vec2

+ +
+
+ + + + +
typedef vec< 2, float, lowp > lowp_vec2
+
+ +

2 components vector of low single-qualifier floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file vector_float2_precision.hpp.

+ +
+
+ +

◆ lowp_vec3

+ +
+
+ + + + +
typedef vec< 3, float, lowp > lowp_vec3
+
+ +

3 components vector of low single-qualifier floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file vector_float3_precision.hpp.

+ +
+
+ +

◆ lowp_vec4

+ +
+
+ + + + +
typedef vec< 4, float, lowp > lowp_vec4
+
+ +

4 components vector of low single-qualifier floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file vector_float4_precision.hpp.

+ +
+
+ +

◆ mediump_bvec2

+ +
+
+ + + + +
typedef vec< 2, bool, mediump > mediump_bvec2
+
+ +

2 components vector of medium qualifier bool numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file vector_bool2_precision.hpp.

+ +
+
+ +

◆ mediump_bvec3

+ +
+
+ + + + +
typedef vec< 3, bool, mediump > mediump_bvec3
+
+ +

3 components vector of medium qualifier bool numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file vector_bool3_precision.hpp.

+ +
+
+ +

◆ mediump_bvec4

+ +
+
+ + + + +
typedef vec< 4, bool, mediump > mediump_bvec4
+
+ +

4 components vector of medium qualifier bool numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file vector_bool4_precision.hpp.

+ +
+
+ +

◆ mediump_dvec2

+ +
+
+ + + + +
typedef vec< 2, f64, mediump > mediump_dvec2
+
+ +

2 components vector of medium double-qualifier floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file vector_double2_precision.hpp.

+ +
+
+ +

◆ mediump_dvec3

+ +
+
+ + + + +
typedef vec< 3, f64, mediump > mediump_dvec3
+
+ +

3 components vector of medium double-qualifier floating-point numbers.

+

There is no guarantee on the actual qualifier.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 24 of file vector_double3_precision.hpp.

+ +
+
+ +

◆ mediump_dvec4

+ +
+
+ + + + +
typedef vec< 4, f64, mediump > mediump_dvec4
+
+ +

4 components vector of medium double-qualifier floating-point numbers.

+

There is no guarantee on the actual qualifier.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 25 of file vector_double4_precision.hpp.

+ +
+
+ +

◆ mediump_ivec2

+ +
+
+ + + + +
typedef vec< 2, i32, mediump > mediump_ivec2
+
+ +

2 components vector of medium qualifier signed integer numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file vector_int2_precision.hpp.

+ +
+
+ +

◆ mediump_ivec3

+ +
+
+ + + + +
typedef vec< 3, i32, mediump > mediump_ivec3
+
+ +

3 components vector of medium qualifier signed integer numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file vector_int3_precision.hpp.

+ +
+
+ +

◆ mediump_ivec4

+ +
+
+ + + + +
typedef vec< 4, i32, mediump > mediump_ivec4
+
+ +

4 components vector of medium qualifier signed integer numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file vector_int4_precision.hpp.

+ +
+
+ +

◆ mediump_uvec2

+ +
+
+ + + + +
typedef vec< 2, u32, mediump > mediump_uvec2
+
+ +

2 components vector of medium qualifier unsigned integer numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file vector_uint2_precision.hpp.

+ +
+
+ +

◆ mediump_uvec3

+ +
+
+ + + + +
typedef vec< 3, u32, mediump > mediump_uvec3
+
+ +

3 components vector of medium qualifier unsigned integer numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file vector_uint3_precision.hpp.

+ +
+
+ +

◆ mediump_uvec4

+ +
+
+ + + + +
typedef vec< 4, u32, mediump > mediump_uvec4
+
+ +

4 components vector of medium qualifier unsigned integer numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file vector_uint4_precision.hpp.

+ +
+
+ +

◆ mediump_vec2

+ +
+
+ + + + +
typedef vec< 2, float, mediump > mediump_vec2
+
+ +

2 components vector of medium single-qualifier floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file vector_float2_precision.hpp.

+ +
+
+ +

◆ mediump_vec3

+ +
+
+ + + + +
typedef vec< 3, float, mediump > mediump_vec3
+
+ +

3 components vector of medium single-qualifier floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file vector_float3_precision.hpp.

+ +
+
+ +

◆ mediump_vec4

+ +
+
+ + + + +
typedef vec< 4, float, mediump > mediump_vec4
+
+ +

4 components vector of medium single-qualifier floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.5 Vectors
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file vector_float4_precision.hpp.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00701.html b/common/glm/doc/api/a00701.html new file mode 100644 index 000000000..a12afb967 --- /dev/null +++ b/common/glm/doc/api/a00701.html @@ -0,0 +1,570 @@ + + + + + + + +0.9.9 API documenation: Matrix types + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
Matrix types
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Typedefs

typedef mat< 2, 2, double, defaultp > dmat2
 
typedef mat< 2, 2, double, defaultp > dmat2x2
 
typedef mat< 2, 3, double, defaultp > dmat2x3
 
typedef mat< 2, 4, double, defaultp > dmat2x4
 
typedef mat< 3, 3, double, defaultp > dmat3
 
typedef mat< 3, 2, double, defaultp > dmat3x2
 
typedef mat< 3, 3, double, defaultp > dmat3x3
 
typedef mat< 3, 4, double, defaultp > dmat3x4
 
typedef mat< 4, 4, double, defaultp > dmat4
 
typedef mat< 4, 2, double, defaultp > dmat4x2
 
typedef mat< 4, 3, double, defaultp > dmat4x3
 
typedef mat< 4, 4, double, defaultp > dmat4x4
 
typedef mat< 2, 2, float, defaultp > mat2
 
typedef mat< 2, 2, float, defaultp > mat2x2
 
typedef mat< 2, 3, float, defaultp > mat2x3
 
typedef mat< 2, 4, float, defaultp > mat2x4
 
typedef mat< 3, 3, float, defaultp > mat3
 
typedef mat< 3, 3, float, defaultp > mat3x3
 
typedef mat< 3, 4, float, defaultp > mat3x4
 
typedef mat< 4, 2, float, defaultp > mat4x2
 
typedef mat< 4, 3, float, defaultp > mat4x3
 
typedef mat< 4, 4, float, defaultp > mat4x4
 
typedef mat< 4, 4, float, defaultp > mat4
 
+

Detailed Description

+

Matrix types of with C columns and R rows where C and R are values between 2 to 4 included.

+

These types have exhaustive sets of operators.

+

Typedef Documentation

+ +

◆ dmat2

+ +
+
+ + + + +
typedef mat< 2, 2, f64, defaultp > dmat2
+
+ +

2 columns of 2 components matrix of double-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+ +

Definition at line 20 of file matrix_double2x2.hpp.

+ +
+
+ +

◆ dmat2x2

+ +
+
+ + + + +
typedef mat< 2, 2, double, defaultp > dmat2x2
+
+ +

2 columns of 2 components matrix of double-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+ +

Definition at line 15 of file matrix_double2x2.hpp.

+ +
+
+ +

◆ dmat2x3

+ +
+
+ + + + +
typedef mat< 2, 3, double, defaultp > dmat2x3
+
+ +

2 columns of 3 components matrix of double-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+ +

Definition at line 15 of file matrix_double2x3.hpp.

+ +
+
+ +

◆ dmat2x4

+ +
+
+ + + + +
typedef mat< 2, 4, double, defaultp > dmat2x4
+
+ +

2 columns of 4 components matrix of double-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+ +

Definition at line 15 of file matrix_double2x4.hpp.

+ +
+
+ +

◆ dmat3

+ +
+
+ + + + +
typedef mat< 3, 3, f64, defaultp > dmat3
+
+ +

3 columns of 3 components matrix of double-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+ +

Definition at line 20 of file matrix_double3x3.hpp.

+ +
+
+ +

◆ dmat3x2

+ +
+
+ + + + +
typedef mat< 3, 2, double, defaultp > dmat3x2
+
+ +

3 columns of 2 components matrix of double-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+ +

Definition at line 15 of file matrix_double3x2.hpp.

+ +
+
+ +

◆ dmat3x3

+ +
+
+ + + + +
typedef mat< 3, 3, double, defaultp > dmat3x3
+
+ +

3 columns of 3 components matrix of double-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+ +

Definition at line 15 of file matrix_double3x3.hpp.

+ +
+
+ +

◆ dmat3x4

+ +
+
+ + + + +
typedef mat< 3, 4, double, defaultp > dmat3x4
+
+ +

3 columns of 4 components matrix of double-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+ +

Definition at line 15 of file matrix_double3x4.hpp.

+ +
+
+ +

◆ dmat4

+ +
+
+ + + + +
typedef mat< 4, 4, f64, defaultp > dmat4
+
+ +

4 columns of 4 components matrix of double-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+ +

Definition at line 20 of file matrix_double4x4.hpp.

+ +
+
+ +

◆ dmat4x2

+ +
+
+ + + + +
typedef mat< 4, 2, double, defaultp > dmat4x2
+
+ +

4 columns of 2 components matrix of double-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+ +

Definition at line 15 of file matrix_double4x2.hpp.

+ +
+
+ +

◆ dmat4x3

+ +
+
+ + + + +
typedef mat< 4, 3, double, defaultp > dmat4x3
+
+ +

4 columns of 3 components matrix of double-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+ +

Definition at line 15 of file matrix_double4x3.hpp.

+ +
+
+ +

◆ dmat4x4

+ +
+
+ + + + +
typedef mat< 4, 4, double, defaultp > dmat4x4
+
+ +

4 columns of 4 components matrix of double-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+ +

Definition at line 15 of file matrix_double4x4.hpp.

+ +
+
+ +

◆ mat2

+ +
+
+ + + + +
typedef mat< 2, 2, f32, defaultp > mat2
+
+ +

2 columns of 2 components matrix of single-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+ +

Definition at line 20 of file matrix_float2x2.hpp.

+ +
+
+ +

◆ mat2x2

+ +
+
+ + + + +
typedef mat< 2, 2, f32, defaultp > mat2x2
+
+ +

2 columns of 2 components matrix of single-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+ +

Definition at line 15 of file matrix_float2x2.hpp.

+ +
+
+ +

◆ mat2x3

+ +
+
+ + + + +
typedef mat< 2, 3, f32, defaultp > mat2x3
+
+ +

2 columns of 3 components matrix of single-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+ +

Definition at line 15 of file matrix_float2x3.hpp.

+ +
+
+ +

◆ mat2x4

+ +
+
+ + + + +
typedef mat< 2, 4, f32, defaultp > mat2x4
+
+ +

2 columns of 4 components matrix of single-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+ +

Definition at line 15 of file matrix_float2x4.hpp.

+ +
+
+ +

◆ mat3

+ +
+
+ + + + +
typedef mat< 3, 3, f32, defaultp > mat3
+
+ +

3 columns of 3 components matrix of single-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+ +

Definition at line 20 of file matrix_float3x3.hpp.

+ +
+
+ +

◆ mat3x3

+ +
+
+ + + + +
typedef mat< 3, 3, f32, defaultp > mat3x3
+
+ +

3 columns of 3 components matrix of single-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+ +

Definition at line 15 of file matrix_float3x3.hpp.

+ +
+
+ +

◆ mat3x4

+ +
+
+ + + + +
typedef mat< 3, 4, f32, defaultp > mat3x4
+
+ +

3 columns of 4 components matrix of single-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+ +

Definition at line 15 of file matrix_float3x4.hpp.

+ +
+
+ +

◆ mat4

+ +
+
+ + + + +
typedef mat< 4, 4, f32, defaultp > mat4
+
+ +

4 columns of 4 components matrix of single-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+ +

Definition at line 20 of file matrix_float4x4.hpp.

+ +
+
+ +

◆ mat4x2

+ +
+
+ + + + +
typedef mat< 4, 2, f32, defaultp > mat4x2
+
+ +

4 columns of 2 components matrix of single-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+ +

Definition at line 15 of file matrix_float4x2.hpp.

+ +
+
+ +

◆ mat4x3

+ +
+
+ + + + +
typedef mat< 4, 3, f32, defaultp > mat4x3
+
+ +

4 columns of 3 components matrix of single-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+ +

Definition at line 15 of file matrix_float4x3.hpp.

+ +
+
+ +

◆ mat4x4

+ +
+
+ + + + +
typedef mat< 4, 4, f32, defaultp > mat4x4
+
+ +

4 columns of 4 components matrix of single-precision floating-point numbers.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+ +

Definition at line 15 of file matrix_float4x4.hpp.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00702.html b/common/glm/doc/api/a00702.html new file mode 100644 index 000000000..2a1e83733 --- /dev/null +++ b/common/glm/doc/api/a00702.html @@ -0,0 +1,1745 @@ + + + + + + + +0.9.9 API documenation: Matrix types with precision qualifiers + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
Matrix types with precision qualifiers
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Typedefs

typedef mat< 2, 2, double, highp > highp_dmat2
 
typedef mat< 2, 2, double, highp > highp_dmat2x2
 
typedef mat< 2, 3, double, highp > highp_dmat2x3
 
typedef mat< 2, 4, double, highp > highp_dmat2x4
 
typedef mat< 3, 3, double, highp > highp_dmat3
 
typedef mat< 3, 2, double, highp > highp_dmat3x2
 
typedef mat< 3, 3, double, highp > highp_dmat3x3
 
typedef mat< 3, 4, double, highp > highp_dmat3x4
 
typedef mat< 4, 4, double, highp > highp_dmat4
 
typedef mat< 4, 2, double, highp > highp_dmat4x2
 
typedef mat< 4, 3, double, highp > highp_dmat4x3
 
typedef mat< 4, 4, double, highp > highp_dmat4x4
 
typedef mat< 2, 2, float, highp > highp_mat2
 
typedef mat< 2, 2, float, highp > highp_mat2x2
 
typedef mat< 2, 3, float, highp > highp_mat2x3
 
typedef mat< 2, 4, float, highp > highp_mat2x4
 
typedef mat< 3, 3, float, highp > highp_mat3
 
typedef mat< 3, 2, float, highp > highp_mat3x2
 
typedef mat< 3, 3, float, highp > highp_mat3x3
 
typedef mat< 3, 4, float, highp > highp_mat3x4
 
typedef mat< 4, 4, float, highp > highp_mat4
 
typedef mat< 4, 2, float, highp > highp_mat4x2
 
typedef mat< 4, 3, float, highp > highp_mat4x3
 
typedef mat< 4, 4, float, highp > highp_mat4x4
 
typedef mat< 2, 2, double, lowp > lowp_dmat2
 
typedef mat< 2, 2, double, lowp > lowp_dmat2x2
 
typedef mat< 2, 3, double, lowp > lowp_dmat2x3
 
typedef mat< 2, 4, double, lowp > lowp_dmat2x4
 
typedef mat< 3, 3, double, lowp > lowp_dmat3
 
typedef mat< 3, 2, double, lowp > lowp_dmat3x2
 
typedef mat< 3, 3, double, lowp > lowp_dmat3x3
 
typedef mat< 3, 4, double, lowp > lowp_dmat3x4
 
typedef mat< 4, 4, double, lowp > lowp_dmat4
 
typedef mat< 4, 2, double, lowp > lowp_dmat4x2
 
typedef mat< 4, 3, double, lowp > lowp_dmat4x3
 
typedef mat< 4, 4, double, lowp > lowp_dmat4x4
 
typedef mat< 2, 2, float, lowp > lowp_mat2
 
typedef mat< 2, 2, float, lowp > lowp_mat2x2
 
typedef mat< 2, 3, float, lowp > lowp_mat2x3
 
typedef mat< 2, 4, float, lowp > lowp_mat2x4
 
typedef mat< 3, 3, float, lowp > lowp_mat3
 
typedef mat< 3, 2, float, lowp > lowp_mat3x2
 
typedef mat< 3, 3, float, lowp > lowp_mat3x3
 
typedef mat< 3, 4, float, lowp > lowp_mat3x4
 
typedef mat< 4, 4, float, lowp > lowp_mat4
 
typedef mat< 4, 2, float, lowp > lowp_mat4x2
 
typedef mat< 4, 3, float, lowp > lowp_mat4x3
 
typedef mat< 4, 4, float, lowp > lowp_mat4x4
 
typedef mat< 2, 2, double, mediump > mediump_dmat2
 
typedef mat< 2, 2, double, mediump > mediump_dmat2x2
 
typedef mat< 2, 3, double, mediump > mediump_dmat2x3
 
typedef mat< 2, 4, double, mediump > mediump_dmat2x4
 
typedef mat< 3, 3, double, mediump > mediump_dmat3
 
typedef mat< 3, 2, double, mediump > mediump_dmat3x2
 
typedef mat< 3, 3, double, mediump > mediump_dmat3x3
 
typedef mat< 3, 4, double, mediump > mediump_dmat3x4
 
typedef mat< 4, 4, double, mediump > mediump_dmat4
 
typedef mat< 4, 2, double, mediump > mediump_dmat4x2
 
typedef mat< 4, 3, double, mediump > mediump_dmat4x3
 
typedef mat< 4, 4, double, mediump > mediump_dmat4x4
 
typedef mat< 2, 2, float, mediump > mediump_mat2
 
typedef mat< 2, 2, float, mediump > mediump_mat2x2
 
typedef mat< 2, 3, float, mediump > mediump_mat2x3
 
typedef mat< 2, 4, float, mediump > mediump_mat2x4
 
typedef mat< 3, 3, float, mediump > mediump_mat3
 
typedef mat< 3, 2, float, mediump > mediump_mat3x2
 
typedef mat< 3, 3, float, mediump > mediump_mat3x3
 
typedef mat< 3, 4, float, mediump > mediump_mat3x4
 
typedef mat< 4, 4, float, mediump > mediump_mat4
 
typedef mat< 4, 2, float, mediump > mediump_mat4x2
 
typedef mat< 4, 3, float, mediump > mediump_mat4x3
 
typedef mat< 4, 4, float, mediump > mediump_mat4x4
 
+

Detailed Description

+

Matrix types with precision qualifiers which may result in various precision in term of ULPs.

+

GLSL allows defining qualifiers for particular variables. With OpenGL's GLSL, these qualifiers have no effect; they are there for compatibility, with OpenGL ES's GLSL, these qualifiers do have an effect.

+

C++ has no language equivalent to qualifier qualifiers. So GLM provides the next-best thing: a number of typedefs that use a particular qualifier.

+

None of these types make any guarantees about the actual qualifier used.

+

Typedef Documentation

+ +

◆ highp_dmat2

+ +
+
+ + + + +
typedef mat< 2, 2, f64, highp > highp_dmat2
+
+ +

2 columns of 2 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_double2x2_precision.hpp.

+ +
+
+ +

◆ highp_dmat2x2

+ +
+
+ + + + +
typedef mat< 2, 2, double, highp > highp_dmat2x2
+
+ +

2 columns of 2 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 46 of file matrix_double2x2_precision.hpp.

+ +
+
+ +

◆ highp_dmat2x3

+ +
+
+ + + + +
typedef mat< 2, 3, double, highp > highp_dmat2x3
+
+ +

2 columns of 3 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_double2x3_precision.hpp.

+ +
+
+ +

◆ highp_dmat2x4

+ +
+
+ + + + +
typedef mat< 2, 4, double, highp > highp_dmat2x4
+
+ +

2 columns of 4 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_double2x4_precision.hpp.

+ +
+
+ +

◆ highp_dmat3

+ +
+
+ + + + +
typedef mat< 3, 3, f64, highp > highp_dmat3
+
+ +

3 columns of 3 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_double3x3_precision.hpp.

+ +
+
+ +

◆ highp_dmat3x2

+ +
+
+ + + + +
typedef mat< 3, 2, double, highp > highp_dmat3x2
+
+ +

3 columns of 2 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_double3x2_precision.hpp.

+ +
+
+ +

◆ highp_dmat3x3

+ +
+
+ + + + +
typedef mat< 3, 3, double, highp > highp_dmat3x3
+
+ +

3 columns of 3 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 46 of file matrix_double3x3_precision.hpp.

+ +
+
+ +

◆ highp_dmat3x4

+ +
+
+ + + + +
typedef mat< 3, 4, double, highp > highp_dmat3x4
+
+ +

3 columns of 4 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_double3x4_precision.hpp.

+ +
+
+ +

◆ highp_dmat4

+ +
+
+ + + + +
typedef mat< 4, 4, f64, highp > highp_dmat4
+
+ +

4 columns of 4 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_double4x4_precision.hpp.

+ +
+
+ +

◆ highp_dmat4x2

+ +
+
+ + + + +
typedef mat< 4, 2, double, highp > highp_dmat4x2
+
+ +

4 columns of 2 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_double4x2_precision.hpp.

+ +
+
+ +

◆ highp_dmat4x3

+ +
+
+ + + + +
typedef mat< 4, 3, double, highp > highp_dmat4x3
+
+ +

4 columns of 3 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_double4x3_precision.hpp.

+ +
+
+ +

◆ highp_dmat4x4

+ +
+
+ + + + +
typedef mat< 4, 4, double, highp > highp_dmat4x4
+
+ +

4 columns of 4 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 46 of file matrix_double4x4_precision.hpp.

+ +
+
+ +

◆ highp_mat2

+ +
+
+ + + + +
typedef mat< 2, 2, f32, highp > highp_mat2
+
+ +

2 columns of 2 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_float2x2_precision.hpp.

+ +
+
+ +

◆ highp_mat2x2

+ +
+
+ + + + +
typedef mat< 2, 2, f32, highp > highp_mat2x2
+
+ +

2 columns of 2 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 46 of file matrix_float2x2_precision.hpp.

+ +
+
+ +

◆ highp_mat2x3

+ +
+
+ + + + +
typedef mat< 2, 3, f32, highp > highp_mat2x3
+
+ +

2 columns of 3 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_float2x3_precision.hpp.

+ +
+
+ +

◆ highp_mat2x4

+ +
+
+ + + + +
typedef mat< 2, 4, f32, highp > highp_mat2x4
+
+ +

2 columns of 4 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_float2x4_precision.hpp.

+ +
+
+ +

◆ highp_mat3

+ +
+
+ + + + +
typedef mat< 3, 3, f32, highp > highp_mat3
+
+ +

3 columns of 3 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_float3x3_precision.hpp.

+ +
+
+ +

◆ highp_mat3x2

+ +
+
+ + + + +
typedef mat< 3, 2, f32, highp > highp_mat3x2
+
+ +

3 columns of 2 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_float3x2_precision.hpp.

+ +
+
+ +

◆ highp_mat3x3

+ +
+
+ + + + +
typedef mat< 3, 3, f32, highp > highp_mat3x3
+
+ +

3 columns of 3 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 46 of file matrix_float3x3_precision.hpp.

+ +
+
+ +

◆ highp_mat3x4

+ +
+
+ + + + +
typedef mat< 3, 4, f32, highp > highp_mat3x4
+
+ +

3 columns of 4 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_float3x4_precision.hpp.

+ +
+
+ +

◆ highp_mat4

+ +
+
+ + + + +
typedef mat< 4, 4, f32, highp > highp_mat4
+
+ +

4 columns of 4 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_float4x4_precision.hpp.

+ +
+
+ +

◆ highp_mat4x2

+ +
+
+ + + + +
typedef mat< 4, 2, f32, highp > highp_mat4x2
+
+ +

4 columns of 2 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_float4x2_precision.hpp.

+ +
+
+ +

◆ highp_mat4x3

+ +
+
+ + + + +
typedef mat< 4, 3, f32, highp > highp_mat4x3
+
+ +

4 columns of 3 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_float4x3_precision.hpp.

+ +
+
+ +

◆ highp_mat4x4

+ +
+
+ + + + +
typedef mat< 4, 4, f32, highp > highp_mat4x4
+
+ +

4 columns of 4 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 46 of file matrix_float4x4_precision.hpp.

+ +
+
+ +

◆ lowp_dmat2

+ +
+
+ + + + +
typedef mat< 2, 2, f64, lowp > lowp_dmat2
+
+ +

2 columns of 2 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_double2x2_precision.hpp.

+ +
+
+ +

◆ lowp_dmat2x2

+ +
+
+ + + + +
typedef mat< 2, 2, double, lowp > lowp_dmat2x2
+
+ +

2 columns of 2 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 34 of file matrix_double2x2_precision.hpp.

+ +
+
+ +

◆ lowp_dmat2x3

+ +
+
+ + + + +
typedef mat< 2, 3, double, lowp > lowp_dmat2x3
+
+ +

2 columns of 3 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_double2x3_precision.hpp.

+ +
+
+ +

◆ lowp_dmat2x4

+ +
+
+ + + + +
typedef mat< 2, 4, double, lowp > lowp_dmat2x4
+
+ +

2 columns of 4 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_double2x4_precision.hpp.

+ +
+
+ +

◆ lowp_dmat3

+ +
+
+ + + + +
typedef mat< 3, 3, f64, lowp > lowp_dmat3
+
+ +

3 columns of 3 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_double3x3_precision.hpp.

+ +
+
+ +

◆ lowp_dmat3x2

+ +
+
+ + + + +
typedef mat< 3, 2, double, lowp > lowp_dmat3x2
+
+ +

3 columns of 2 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_double3x2_precision.hpp.

+ +
+
+ +

◆ lowp_dmat3x3

+ +
+
+ + + + +
typedef mat< 3, 3, double, lowp > lowp_dmat3x3
+
+ +

3 columns of 3 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 34 of file matrix_double3x3_precision.hpp.

+ +
+
+ +

◆ lowp_dmat3x4

+ +
+
+ + + + +
typedef mat< 3, 4, double, lowp > lowp_dmat3x4
+
+ +

3 columns of 4 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_double3x4_precision.hpp.

+ +
+
+ +

◆ lowp_dmat4

+ +
+
+ + + + +
typedef mat< 4, 4, f64, lowp > lowp_dmat4
+
+ +

4 columns of 4 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_double4x4_precision.hpp.

+ +
+
+ +

◆ lowp_dmat4x2

+ +
+
+ + + + +
typedef mat< 4, 2, double, lowp > lowp_dmat4x2
+
+ +

4 columns of 2 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_double4x2_precision.hpp.

+ +
+
+ +

◆ lowp_dmat4x3

+ +
+
+ + + + +
typedef mat< 4, 3, double, lowp > lowp_dmat4x3
+
+ +

4 columns of 3 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_double4x3_precision.hpp.

+ +
+
+ +

◆ lowp_dmat4x4

+ +
+
+ + + + +
typedef mat< 4, 4, double, lowp > lowp_dmat4x4
+
+ +

4 columns of 4 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 34 of file matrix_double4x4_precision.hpp.

+ +
+
+ +

◆ lowp_mat2

+ +
+
+ + + + +
typedef mat< 2, 2, f32, lowp > lowp_mat2
+
+ +

2 columns of 2 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_float2x2_precision.hpp.

+ +
+
+ +

◆ lowp_mat2x2

+ +
+
+ + + + +
typedef mat< 2, 2, f32, lowp > lowp_mat2x2
+
+ +

2 columns of 2 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 34 of file matrix_float2x2_precision.hpp.

+ +
+
+ +

◆ lowp_mat2x3

+ +
+
+ + + + +
typedef mat< 2, 3, f32, lowp > lowp_mat2x3
+
+ +

2 columns of 3 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_float2x3_precision.hpp.

+ +
+
+ +

◆ lowp_mat2x4

+ +
+
+ + + + +
typedef mat< 2, 4, f32, lowp > lowp_mat2x4
+
+ +

2 columns of 4 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_float2x4_precision.hpp.

+ +
+
+ +

◆ lowp_mat3

+ +
+
+ + + + +
typedef mat< 3, 3, f32, lowp > lowp_mat3
+
+ +

3 columns of 3 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_float3x3_precision.hpp.

+ +
+
+ +

◆ lowp_mat3x2

+ +
+
+ + + + +
typedef mat< 3, 2, f32, lowp > lowp_mat3x2
+
+ +

3 columns of 2 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_float3x2_precision.hpp.

+ +
+
+ +

◆ lowp_mat3x3

+ +
+
+ + + + +
typedef mat< 3, 3, f32, lowp > lowp_mat3x3
+
+ +

3 columns of 3 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 34 of file matrix_float3x3_precision.hpp.

+ +
+
+ +

◆ lowp_mat3x4

+ +
+
+ + + + +
typedef mat< 3, 4, f32, lowp > lowp_mat3x4
+
+ +

3 columns of 4 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_float3x4_precision.hpp.

+ +
+
+ +

◆ lowp_mat4

+ +
+
+ + + + +
typedef mat< 4, 4, f32, lowp > lowp_mat4
+
+ +

4 columns of 4 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_float4x4_precision.hpp.

+ +
+
+ +

◆ lowp_mat4x2

+ +
+
+ + + + +
typedef mat< 4, 2, f32, lowp > lowp_mat4x2
+
+ +

4 columns of 2 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_float4x2_precision.hpp.

+ +
+
+ +

◆ lowp_mat4x3

+ +
+
+ + + + +
typedef mat< 4, 3, f32, lowp > lowp_mat4x3
+
+ +

4 columns of 3 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_float4x3_precision.hpp.

+ +
+
+ +

◆ lowp_mat4x4

+ +
+
+ + + + +
typedef mat< 4, 4, f32, lowp > lowp_mat4x4
+
+ +

4 columns of 4 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 34 of file matrix_float4x4_precision.hpp.

+ +
+
+ +

◆ mediump_dmat2

+ +
+
+ + + + +
typedef mat< 2, 2, f64, mediump > mediump_dmat2
+
+ +

2 columns of 2 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_double2x2_precision.hpp.

+ +
+
+ +

◆ mediump_dmat2x2

+ +
+
+ + + + +
typedef mat< 2, 2, double, mediump > mediump_dmat2x2
+
+ +

2 columns of 2 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 40 of file matrix_double2x2_precision.hpp.

+ +
+
+ +

◆ mediump_dmat2x3

+ +
+
+ + + + +
typedef mat< 2, 3, double, mediump > mediump_dmat2x3
+
+ +

2 columns of 3 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_double2x3_precision.hpp.

+ +
+
+ +

◆ mediump_dmat2x4

+ +
+
+ + + + +
typedef mat< 2, 4, double, mediump > mediump_dmat2x4
+
+ +

2 columns of 4 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_double2x4_precision.hpp.

+ +
+
+ +

◆ mediump_dmat3

+ +
+
+ + + + +
typedef mat< 3, 3, f64, mediump > mediump_dmat3
+
+ +

3 columns of 3 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_double3x3_precision.hpp.

+ +
+
+ +

◆ mediump_dmat3x2

+ +
+
+ + + + +
typedef mat< 3, 2, double, mediump > mediump_dmat3x2
+
+ +

3 columns of 2 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_double3x2_precision.hpp.

+ +
+
+ +

◆ mediump_dmat3x3

+ +
+
+ + + + +
typedef mat< 3, 3, double, mediump > mediump_dmat3x3
+
+ +

3 columns of 3 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 40 of file matrix_double3x3_precision.hpp.

+ +
+
+ +

◆ mediump_dmat3x4

+ +
+
+ + + + +
typedef mat< 3, 4, double, mediump > mediump_dmat3x4
+
+ +

3 columns of 4 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_double3x4_precision.hpp.

+ +
+
+ +

◆ mediump_dmat4

+ +
+
+ + + + +
typedef mat< 4, 4, f64, mediump > mediump_dmat4
+
+ +

4 columns of 4 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_double4x4_precision.hpp.

+ +
+
+ +

◆ mediump_dmat4x2

+ +
+
+ + + + +
typedef mat< 4, 2, double, mediump > mediump_dmat4x2
+
+ +

4 columns of 2 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_double4x2_precision.hpp.

+ +
+
+ +

◆ mediump_dmat4x3

+ +
+
+ + + + +
typedef mat< 4, 3, double, mediump > mediump_dmat4x3
+
+ +

4 columns of 3 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_double4x3_precision.hpp.

+ +
+
+ +

◆ mediump_dmat4x4

+ +
+
+ + + + +
typedef mat< 4, 4, double, mediump > mediump_dmat4x4
+
+ +

4 columns of 4 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 40 of file matrix_double4x4_precision.hpp.

+ +
+
+ +

◆ mediump_mat2

+ +
+
+ + + + +
typedef mat< 2, 2, f32, mediump > mediump_mat2
+
+ +

2 columns of 2 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_float2x2_precision.hpp.

+ +
+
+ +

◆ mediump_mat2x2

+ +
+
+ + + + +
typedef mat< 2, 2, f32, mediump > mediump_mat2x2
+
+ +

2 columns of 2 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 40 of file matrix_float2x2_precision.hpp.

+ +
+
+ +

◆ mediump_mat2x3

+ +
+
+ + + + +
typedef mat< 2, 3, f32, mediump > mediump_mat2x3
+
+ +

2 columns of 3 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_float2x3_precision.hpp.

+ +
+
+ +

◆ mediump_mat2x4

+ +
+
+ + + + +
typedef mat< 2, 4, f32, mediump > mediump_mat2x4
+
+ +

2 columns of 4 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_float2x4_precision.hpp.

+ +
+
+ +

◆ mediump_mat3

+ +
+
+ + + + +
typedef mat< 3, 3, f32, mediump > mediump_mat3
+
+ +

3 columns of 3 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_float3x3_precision.hpp.

+ +
+
+ +

◆ mediump_mat3x2

+ +
+
+ + + + +
typedef mat< 3, 2, f32, mediump > mediump_mat3x2
+
+ +

3 columns of 2 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_float3x2_precision.hpp.

+ +
+
+ +

◆ mediump_mat3x3

+ +
+
+ + + + +
typedef mat< 3, 3, f32, mediump > mediump_mat3x3
+
+ +

3 columns of 3 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 40 of file matrix_float3x3_precision.hpp.

+ +
+
+ +

◆ mediump_mat3x4

+ +
+
+ + + + +
typedef mat< 3, 4, f32, mediump > mediump_mat3x4
+
+ +

3 columns of 4 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_float3x4_precision.hpp.

+ +
+
+ +

◆ mediump_mat4

+ +
+
+ + + + +
typedef mat< 4, 4, f32, mediump > mediump_mat4
+
+ +

4 columns of 4 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_float4x4_precision.hpp.

+ +
+
+ +

◆ mediump_mat4x2

+ +
+
+ + + + +
typedef mat< 4, 2, f32, mediump > mediump_mat4x2
+
+ +

4 columns of 2 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_float4x2_precision.hpp.

+ +
+
+ +

◆ mediump_mat4x3

+ +
+
+ + + + +
typedef mat< 4, 3, f32, mediump > mediump_mat4x3
+
+ +

4 columns of 3 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_float4x3_precision.hpp.

+ +
+
+ +

◆ mediump_mat4x4

+ +
+
+ + + + +
typedef mat< 4, 4, f32, mediump > mediump_mat4x4
+
+ +

4 columns of 4 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 40 of file matrix_float4x4_precision.hpp.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00703.html b/common/glm/doc/api/a00703.html new file mode 100644 index 000000000..7028cb21e --- /dev/null +++ b/common/glm/doc/api/a00703.html @@ -0,0 +1,151 @@ + + + + + + + +0.9.9 API documenation: Stable extensions + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
Stable extensions
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Modules

 GLM_EXT_matrix_clip_space
 
 GLM_EXT_matrix_projection
 
 GLM_EXT_matrix_relational
 
 GLM_EXT_matrix_transform
 
 GLM_EXT_quaternion_common
 
 GLM_EXT_quaternion_double
 
 GLM_EXT_quaternion_double_precision
 
 GLM_EXT_quaternion_exponential
 
 GLM_EXT_quaternion_float
 
 GLM_EXT_quaternion_float_precision
 
 GLM_EXT_quaternion_geometric
 
 GLM_EXT_quaternion_relational
 
 GLM_EXT_quaternion_transform
 
 GLM_EXT_quaternion_trigonometric
 
 GLM_EXT_scalar_common
 
 GLM_EXT_scalar_constants
 
 GLM_EXT_scalar_float_sized
 
 GLM_EXT_scalar_int_sized
 
 GLM_EXT_scalar_relational
 
 GLM_EXT_scalar_uint_sized
 
 GLM_EXT_vector_bool1
 
 GLM_EXT_vector_bool1_precision
 
 GLM_EXT_vector_common
 
 GLM_EXT_vector_double1
 
 GLM_EXT_vector_double1_precision
 
 GLM_EXT_vector_float1
 
 GLM_EXT_vector_float1_precision
 
 GLM_EXT_vector_int1
 
 GLM_EXT_vector_int1_precision
 
 GLM_EXT_vector_relational
 
 GLM_EXT_vector_uint1
 
 GLM_EXT_vector_uint1_precision
 
+

Detailed Description

+

Additional features not specified by GLSL specification.

+

EXT extensions are fully tested and documented.

+

Even if it's highly unrecommended, it's possible to include all the extensions at once by including <glm/ext.hpp>. Otherwise, each extension needs to be included a specific file.

+
+ + + + diff --git a/common/glm/doc/api/a00704.html b/common/glm/doc/api/a00704.html new file mode 100644 index 000000000..afe98518f --- /dev/null +++ b/common/glm/doc/api/a00704.html @@ -0,0 +1,127 @@ + + + + + + + +0.9.9 API documenation: Recommended extensions + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
Recommended extensions
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Modules

 GLM_GTC_quaternion
 
 GLM_GTC_bitfield
 
 GLM_GTC_color_space
 
 GLM_GTC_constants
 
 GLM_GTC_epsilon
 
 GLM_GTC_integer
 
 GLM_GTC_matrix_access
 
 GLM_GTC_matrix_integer
 
 GLM_GTC_matrix_inverse
 
 GLM_GTC_matrix_transform
 
 GLM_GTC_noise
 
 GLM_GTC_packing
 
 GLM_GTC_random
 
 GLM_GTC_reciprocal
 
 GLM_GTC_round
 
 GLM_GTC_type_aligned
 
 GLM_GTC_type_precision
 
 GLM_GTC_type_ptr
 
 GLM_GTC_ulp
 
 GLM_GTC_vec1
 
+

Detailed Description

+

Additional features not specified by GLSL specification.

+

GTC extensions aim to be stable with tests and documentation.

+

Even if it's highly unrecommended, it's possible to include all the extensions at once by including <glm/ext.hpp>. Otherwise, each extension needs to be included a specific file.

+
+ + + + diff --git a/common/glm/doc/api/a00705.html b/common/glm/doc/api/a00705.html new file mode 100644 index 000000000..79a73dacf --- /dev/null +++ b/common/glm/doc/api/a00705.html @@ -0,0 +1,211 @@ + + + + + + + +0.9.9 API documenation: Experimental extensions + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
Experimental extensions
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Modules

 GLM_GTX_associated_min_max
 
 GLM_GTX_bit
 
 GLM_GTX_closest_point
 
 GLM_GTX_color_encoding
 
 GLM_GTX_color_space
 
 GLM_GTX_color_space_YCoCg
 
 GLM_GTX_common
 
 GLM_GTX_compatibility
 
 GLM_GTX_component_wise
 
 GLM_GTX_dual_quaternion
 
 GLM_GTX_easing
 
 GLM_GTX_euler_angles
 
 GLM_GTX_extend
 
 GLM_GTX_extented_min_max
 
 GLM_GTX_exterior_product
 
 GLM_GTX_fast_exponential
 
 GLM_GTX_fast_square_root
 
 GLM_GTX_fast_trigonometry
 
 GLM_GTX_functions
 
 GLM_GTX_gradient_paint
 
 GLM_GTX_handed_coordinate_space
 
 GLM_GTX_hash
 
 GLM_GTX_integer
 
 GLM_GTX_intersect
 
 GLM_GTX_io
 
 GLM_GTX_log_base
 
 GLM_GTX_matrix_cross_product
 
 GLM_GTX_matrix_decompose
 
 GLM_GTX_matrix_factorisation
 
 GLM_GTX_matrix_interpolation
 
 GLM_GTX_matrix_major_storage
 
 GLM_GTX_matrix_operation
 
 GLM_GTX_matrix_query
 
 GLM_GTX_matrix_transform_2d
 
 GLM_GTX_mixed_producte
 
 GLM_GTX_norm
 
 GLM_GTX_normal
 
 GLM_GTX_normalize_dot
 
 GLM_GTX_number_precision
 
 GLM_GTX_optimum_pow
 
 GLM_GTX_orthonormalize
 
 GLM_GTX_perpendicular
 
 GLM_GTX_polar_coordinates
 
 GLM_GTX_projection
 
 GLM_GTX_quaternion
 
 GLM_GTX_range
 
 GLM_GTX_raw_data
 
 GLM_GTX_rotate_normalized_axis
 
 GLM_GTX_rotate_vector
 
 GLM_GTX_scalar_relational
 
 GLM_GTX_spline
 
 GLM_GTX_std_based_type
 
 GLM_GTX_string_cast
 
 GLM_GTX_texture
 
 GLM_GTX_transform
 
 GLM_GTX_transform2
 
 GLM_GTX_type_aligned
 
 GLM_GTX_type_trait
 
 GLM_GTX_vec_swizzle
 
 GLM_GTX_vector_angle
 
 GLM_GTX_vector_query
 
 GLM_GTX_wrap
 
+

Detailed Description

+

Experimental features not specified by GLSL specification.

+

Experimental extensions are useful functions and types, but the development of their API and functionality is not necessarily stable. They can change substantially between versions. Backwards compatibility is not much of an issue for them.

+

Even if it's highly unrecommended, it's possible to include all the extensions at once by including <glm/ext.hpp>. Otherwise, each extension needs to be included a specific file.

+
+ + + + diff --git a/common/glm/doc/api/a00706.html b/common/glm/doc/api/a00706.html new file mode 100644 index 000000000..1d67cbb30 --- /dev/null +++ b/common/glm/doc/api/a00706.html @@ -0,0 +1,1244 @@ + + + + + + + +0.9.9 API documenation: GLM_GTC_bitfield + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTC_bitfield
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

GLM_FUNC_DECL glm::u8vec2 bitfieldDeinterleave (glm::uint16 x)
 
GLM_FUNC_DECL glm::u16vec2 bitfieldDeinterleave (glm::uint32 x)
 
GLM_FUNC_DECL glm::u32vec2 bitfieldDeinterleave (glm::uint64 x)
 
template<typename genIUType >
GLM_FUNC_DECL genIUType bitfieldFillOne (genIUType Value, int FirstBit, int BitCount)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > bitfieldFillOne (vec< L, T, Q > const &Value, int FirstBit, int BitCount)
 
template<typename genIUType >
GLM_FUNC_DECL genIUType bitfieldFillZero (genIUType Value, int FirstBit, int BitCount)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > bitfieldFillZero (vec< L, T, Q > const &Value, int FirstBit, int BitCount)
 
GLM_FUNC_DECL int16 bitfieldInterleave (int8 x, int8 y)
 
GLM_FUNC_DECL uint16 bitfieldInterleave (uint8 x, uint8 y)
 
GLM_FUNC_DECL uint16 bitfieldInterleave (u8vec2 const &v)
 
GLM_FUNC_DECL int32 bitfieldInterleave (int16 x, int16 y)
 
GLM_FUNC_DECL uint32 bitfieldInterleave (uint16 x, uint16 y)
 
GLM_FUNC_DECL uint32 bitfieldInterleave (u16vec2 const &v)
 
GLM_FUNC_DECL int64 bitfieldInterleave (int32 x, int32 y)
 
GLM_FUNC_DECL uint64 bitfieldInterleave (uint32 x, uint32 y)
 
GLM_FUNC_DECL uint64 bitfieldInterleave (u32vec2 const &v)
 
GLM_FUNC_DECL int32 bitfieldInterleave (int8 x, int8 y, int8 z)
 
GLM_FUNC_DECL uint32 bitfieldInterleave (uint8 x, uint8 y, uint8 z)
 
GLM_FUNC_DECL int64 bitfieldInterleave (int16 x, int16 y, int16 z)
 
GLM_FUNC_DECL uint64 bitfieldInterleave (uint16 x, uint16 y, uint16 z)
 
GLM_FUNC_DECL int64 bitfieldInterleave (int32 x, int32 y, int32 z)
 
GLM_FUNC_DECL uint64 bitfieldInterleave (uint32 x, uint32 y, uint32 z)
 
GLM_FUNC_DECL int32 bitfieldInterleave (int8 x, int8 y, int8 z, int8 w)
 
GLM_FUNC_DECL uint32 bitfieldInterleave (uint8 x, uint8 y, uint8 z, uint8 w)
 
GLM_FUNC_DECL int64 bitfieldInterleave (int16 x, int16 y, int16 z, int16 w)
 
GLM_FUNC_DECL uint64 bitfieldInterleave (uint16 x, uint16 y, uint16 z, uint16 w)
 
template<typename genIUType >
GLM_FUNC_DECL genIUType bitfieldRotateLeft (genIUType In, int Shift)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > bitfieldRotateLeft (vec< L, T, Q > const &In, int Shift)
 
template<typename genIUType >
GLM_FUNC_DECL genIUType bitfieldRotateRight (genIUType In, int Shift)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > bitfieldRotateRight (vec< L, T, Q > const &In, int Shift)
 
template<typename genIUType >
GLM_FUNC_DECL genIUType mask (genIUType Bits)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > mask (vec< L, T, Q > const &v)
 
+

Detailed Description

+

Include <glm/gtc/bitfield.hpp> to use the features of this extension.

+

Allow to perform bit operations on integer values

+

Function Documentation

+ +

◆ bitfieldDeinterleave() [1/3]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL glm::u8vec2 glm::bitfieldDeinterleave (glm::uint16 x)
+
+ +

Deinterleaves the bits of x.

+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldDeinterleave() [2/3]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL glm::u16vec2 glm::bitfieldDeinterleave (glm::uint32 x)
+
+ +

Deinterleaves the bits of x.

+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldDeinterleave() [3/3]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL glm::u32vec2 glm::bitfieldDeinterleave (glm::uint64 x)
+
+ +

Deinterleaves the bits of x.

+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldFillOne() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genIUType glm::bitfieldFillOne (genIUType Value,
int FirstBit,
int BitCount 
)
+
+ +

Set to 1 a range of bits.

+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldFillOne() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::bitfieldFillOne (vec< L, T, Q > const & Value,
int FirstBit,
int BitCount 
)
+
+ +

Set to 1 a range of bits.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TSigned and unsigned integer scalar types
QValue from qualifier enum
+
+
+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldFillZero() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genIUType glm::bitfieldFillZero (genIUType Value,
int FirstBit,
int BitCount 
)
+
+ +

Set to 0 a range of bits.

+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldFillZero() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::bitfieldFillZero (vec< L, T, Q > const & Value,
int FirstBit,
int BitCount 
)
+
+ +

Set to 0 a range of bits.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TSigned and unsigned integer scalar types
QValue from qualifier enum
+
+
+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldInterleave() [1/19]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL int16 glm::bitfieldInterleave (int8 x,
int8 y 
)
+
+ +

Interleaves the bits of x and y.

+

The first bit is the first bit of x followed by the first bit of y. The other bits are interleaved following the previous sequence.

+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldInterleave() [2/19]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL uint16 glm::bitfieldInterleave (uint8 x,
uint8 y 
)
+
+ +

Interleaves the bits of x and y.

+

The first bit is the first bit of x followed by the first bit of y. The other bits are interleaved following the previous sequence.

+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldInterleave() [3/19]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint16 glm::bitfieldInterleave (u8vec2 const & v)
+
+ +

Interleaves the bits of x and y.

+

The first bit is the first bit of v.x followed by the first bit of v.y. The other bits are interleaved following the previous sequence.

+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldInterleave() [4/19]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL int32 glm::bitfieldInterleave (int16 x,
int16 y 
)
+
+ +

Interleaves the bits of x and y.

+

The first bit is the first bit of x followed by the first bit of y. The other bits are interleaved following the previous sequence.

+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldInterleave() [5/19]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL uint32 glm::bitfieldInterleave (uint16 x,
uint16 y 
)
+
+ +

Interleaves the bits of x and y.

+

The first bit is the first bit of x followed by the first bit of y. The other bits are interleaved following the previous sequence.

+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldInterleave() [6/19]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint32 glm::bitfieldInterleave (u16vec2 const & v)
+
+ +

Interleaves the bits of x and y.

+

The first bit is the first bit of v.x followed by the first bit of v.y. The other bits are interleaved following the previous sequence.

+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldInterleave() [7/19]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL int64 glm::bitfieldInterleave (int32 x,
int32 y 
)
+
+ +

Interleaves the bits of x and y.

+

The first bit is the first bit of x followed by the first bit of y. The other bits are interleaved following the previous sequence.

+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldInterleave() [8/19]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL uint64 glm::bitfieldInterleave (uint32 x,
uint32 y 
)
+
+ +

Interleaves the bits of x and y.

+

The first bit is the first bit of x followed by the first bit of y. The other bits are interleaved following the previous sequence.

+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldInterleave() [9/19]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint64 glm::bitfieldInterleave (u32vec2 const & v)
+
+ +

Interleaves the bits of x and y.

+

The first bit is the first bit of v.x followed by the first bit of v.y. The other bits are interleaved following the previous sequence.

+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldInterleave() [10/19]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL int32 glm::bitfieldInterleave (int8 x,
int8 y,
int8 z 
)
+
+ +

Interleaves the bits of x, y and z.

+

The first bit is the first bit of x followed by the first bit of y and the first bit of z. The other bits are interleaved following the previous sequence.

+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldInterleave() [11/19]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL uint32 glm::bitfieldInterleave (uint8 x,
uint8 y,
uint8 z 
)
+
+ +

Interleaves the bits of x, y and z.

+

The first bit is the first bit of x followed by the first bit of y and the first bit of z. The other bits are interleaved following the previous sequence.

+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldInterleave() [12/19]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL int64 glm::bitfieldInterleave (int16 x,
int16 y,
int16 z 
)
+
+ +

Interleaves the bits of x, y and z.

+

The first bit is the first bit of x followed by the first bit of y and the first bit of z. The other bits are interleaved following the previous sequence.

+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldInterleave() [13/19]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL uint64 glm::bitfieldInterleave (uint16 x,
uint16 y,
uint16 z 
)
+
+ +

Interleaves the bits of x, y and z.

+

The first bit is the first bit of x followed by the first bit of y and the first bit of z. The other bits are interleaved following the previous sequence.

+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldInterleave() [14/19]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL int64 glm::bitfieldInterleave (int32 x,
int32 y,
int32 z 
)
+
+ +

Interleaves the bits of x, y and z.

+

The first bit is the first bit of x followed by the first bit of y and the first bit of z. The other bits are interleaved following the previous sequence.

+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldInterleave() [15/19]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL uint64 glm::bitfieldInterleave (uint32 x,
uint32 y,
uint32 z 
)
+
+ +

Interleaves the bits of x, y and z.

+

The first bit is the first bit of x followed by the first bit of y and the first bit of z. The other bits are interleaved following the previous sequence.

+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldInterleave() [16/19]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL int32 glm::bitfieldInterleave (int8 x,
int8 y,
int8 z,
int8 w 
)
+
+ +

Interleaves the bits of x, y, z and w.

+

The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w. The other bits are interleaved following the previous sequence.

+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldInterleave() [17/19]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL uint32 glm::bitfieldInterleave (uint8 x,
uint8 y,
uint8 z,
uint8 w 
)
+
+ +

Interleaves the bits of x, y, z and w.

+

The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w. The other bits are interleaved following the previous sequence.

+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldInterleave() [18/19]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL int64 glm::bitfieldInterleave (int16 x,
int16 y,
int16 z,
int16 w 
)
+
+ +

Interleaves the bits of x, y, z and w.

+

The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w. The other bits are interleaved following the previous sequence.

+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldInterleave() [19/19]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL uint64 glm::bitfieldInterleave (uint16 x,
uint16 y,
uint16 z,
uint16 w 
)
+
+ +

Interleaves the bits of x, y, z and w.

+

The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w. The other bits are interleaved following the previous sequence.

+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldRotateLeft() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genIUType glm::bitfieldRotateLeft (genIUType In,
int Shift 
)
+
+ +

Rotate all bits to the left.

+

All the bits dropped in the left side are inserted back on the right side.

+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldRotateLeft() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::bitfieldRotateLeft (vec< L, T, Q > const & In,
int Shift 
)
+
+ +

Rotate all bits to the left.

+

All the bits dropped in the left side are inserted back on the right side.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TSigned and unsigned integer scalar types
QValue from qualifier enum
+
+
+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldRotateRight() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genIUType glm::bitfieldRotateRight (genIUType In,
int Shift 
)
+
+ +

Rotate all bits to the right.

+

All the bits dropped in the right side are inserted back on the left side.

+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ bitfieldRotateRight() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::bitfieldRotateRight (vec< L, T, Q > const & In,
int Shift 
)
+
+ +

Rotate all bits to the right.

+

All the bits dropped in the right side are inserted back on the left side.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TSigned and unsigned integer scalar types
QValue from qualifier enum
+
+
+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ mask() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genIUType glm::mask (genIUType Bits)
+
+ +

Build a mask of 'count' bits.

+
See also
GLM_GTC_bitfield
+ +
+
+ +

◆ mask() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::mask (vec< L, T, Q > const & v)
+
+ +

Build a mask of 'count' bits.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TSigned and unsigned integer scalar types
QValue from qualifier enum
+
+
+
See also
GLM_GTC_bitfield
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00707.html b/common/glm/doc/api/a00707.html new file mode 100644 index 000000000..7a310a4af --- /dev/null +++ b/common/glm/doc/api/a00707.html @@ -0,0 +1,173 @@ + + + + + + + +0.9.9 API documenation: GLM_GTC_color_space + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTC_color_space
+
+
+ + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > convertLinearToSRGB (vec< L, T, Q > const &ColorLinear)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > convertLinearToSRGB (vec< L, T, Q > const &ColorLinear, T Gamma)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > convertSRGBToLinear (vec< L, T, Q > const &ColorSRGB)
 
+template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > convertSRGBToLinear (vec< L, T, Q > const &ColorSRGB, T Gamma)
 
+

Detailed Description

+

Include <glm/gtc/color_space.hpp> to use the features of this extension.

+

Allow to perform bit operations on integer values

+

Function Documentation

+ +

◆ convertLinearToSRGB() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::convertLinearToSRGB (vec< L, T, Q > const & ColorLinear)
+
+ +

Convert a linear color to sRGB color using a standard gamma correction.

+

IEC 61966-2-1:1999 / Rec. 709 specification https://www.w3.org/Graphics/Color/srgb

+ +
+
+ +

◆ convertLinearToSRGB() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::convertLinearToSRGB (vec< L, T, Q > const & ColorLinear,
Gamma 
)
+
+ +

Convert a linear color to sRGB color using a custom gamma correction.

+

IEC 61966-2-1:1999 / Rec. 709 specification https://www.w3.org/Graphics/Color/srgb

+ +
+
+ +

◆ convertSRGBToLinear()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::convertSRGBToLinear (vec< L, T, Q > const & ColorSRGB)
+
+ +

Convert a sRGB color to linear color using a standard gamma correction.

+

IEC 61966-2-1:1999 / Rec. 709 specification https://www.w3.org/Graphics/Color/srgb

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00708.html b/common/glm/doc/api/a00708.html new file mode 100644 index 000000000..1b969bdcc --- /dev/null +++ b/common/glm/doc/api/a00708.html @@ -0,0 +1,708 @@ + + + + + + + +0.9.9 API documenation: GLM_GTC_constants + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTC_constants
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType e ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType euler ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType four_over_pi ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType golden_ratio ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType half_pi ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType ln_ln_two ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType ln_ten ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType ln_two ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType one ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType one_over_pi ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType one_over_root_two ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType one_over_two_pi ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType quarter_pi ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType root_five ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType root_half_pi ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType root_ln_four ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType root_pi ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType root_three ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType root_two ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType root_two_pi ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType third ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType three_over_two_pi ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType two_over_pi ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType two_over_root_pi ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType two_pi ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType two_thirds ()
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType zero ()
 
+

Detailed Description

+

Include <glm/gtc/constants.hpp> to use the features of this extension.

+

Provide a list of constants and precomputed useful values.

+

Function Documentation

+ +

◆ e()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::e ()
+
+ +

Return e constant.

+
See also
GLM_GTC_constants
+ +
+
+ +

◆ euler()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::euler ()
+
+ +

Return Euler's constant.

+
See also
GLM_GTC_constants
+ +
+
+ +

◆ four_over_pi()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::four_over_pi ()
+
+ +

Return 4 / pi.

+
See also
GLM_GTC_constants
+ +
+
+ +

◆ golden_ratio()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::golden_ratio ()
+
+ +

Return the golden ratio constant.

+
See also
GLM_GTC_constants
+ +
+
+ +

◆ half_pi()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::half_pi ()
+
+ +

Return pi / 2.

+
See also
GLM_GTC_constants
+ +
+
+ +

◆ ln_ln_two()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::ln_ln_two ()
+
+ +

Return ln(ln(2)).

+
See also
GLM_GTC_constants
+ +
+
+ +

◆ ln_ten()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::ln_ten ()
+
+ +

Return ln(10).

+
See also
GLM_GTC_constants
+ +
+
+ +

◆ ln_two()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::ln_two ()
+
+ +

Return ln(2).

+
See also
GLM_GTC_constants
+ +
+
+ +

◆ one()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::one ()
+
+ +

Return 1.

+
See also
GLM_GTC_constants
+ +
+
+ +

◆ one_over_pi()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::one_over_pi ()
+
+ +

Return 1 / pi.

+
See also
GLM_GTC_constants
+ +
+
+ +

◆ one_over_root_two()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::one_over_root_two ()
+
+ +

Return 1 / sqrt(2).

+
See also
GLM_GTC_constants
+ +
+
+ +

◆ one_over_two_pi()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::one_over_two_pi ()
+
+ +

Return 1 / (pi * 2).

+
See also
GLM_GTC_constants
+ +
+
+ +

◆ quarter_pi()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::quarter_pi ()
+
+ +

Return pi / 4.

+
See also
GLM_GTC_constants
+ +
+
+ +

◆ root_five()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::root_five ()
+
+ +

Return sqrt(5).

+
See also
GLM_GTC_constants
+ +
+
+ +

◆ root_half_pi()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::root_half_pi ()
+
+ +

Return sqrt(pi / 2).

+
See also
GLM_GTC_constants
+ +
+
+ +

◆ root_ln_four()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::root_ln_four ()
+
+ +

Return sqrt(ln(4)).

+
See also
GLM_GTC_constants
+ +
+
+ +

◆ root_pi()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::root_pi ()
+
+ +

Return square root of pi.

+
See also
GLM_GTC_constants
+ +
+
+ +

◆ root_three()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::root_three ()
+
+ +

Return sqrt(3).

+
See also
GLM_GTC_constants
+ +
+
+ +

◆ root_two()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::root_two ()
+
+ +

Return sqrt(2).

+
See also
GLM_GTC_constants
+ +
+
+ +

◆ root_two_pi()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::root_two_pi ()
+
+ +

Return sqrt(2 * pi).

+
See also
GLM_GTC_constants
+ +
+
+ +

◆ third()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::third ()
+
+ +

Return 1 / 3.

+
See also
GLM_GTC_constants
+ +
+
+ +

◆ three_over_two_pi()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::three_over_two_pi ()
+
+ +

Return pi / 2 * 3.

+
See also
GLM_GTC_constants
+ +
+
+ +

◆ two_over_pi()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::two_over_pi ()
+
+ +

Return 2 / pi.

+
See also
GLM_GTC_constants
+ +
+
+ +

◆ two_over_root_pi()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::two_over_root_pi ()
+
+ +

Return 2 / sqrt(pi).

+
See also
GLM_GTC_constants
+ +
+
+ +

◆ two_pi()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::two_pi ()
+
+ +

Return pi * 2.

+
See also
GLM_GTC_constants
+ +
+
+ +

◆ two_thirds()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::two_thirds ()
+
+ +

Return 2 / 3.

+
See also
GLM_GTC_constants
+ +
+
+ +

◆ zero()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR genType glm::zero ()
+
+ +

Return 0.

+
See also
GLM_GTC_constants
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00709.html b/common/glm/doc/api/a00709.html new file mode 100644 index 000000000..077914319 --- /dev/null +++ b/common/glm/doc/api/a00709.html @@ -0,0 +1,251 @@ + + + + + + + +0.9.9 API documenation: GLM_GTC_epsilon + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTC_epsilon
+
+
+ + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, bool, Q > epsilonEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y, T const &epsilon)
 
template<typename genType >
GLM_FUNC_DECL bool epsilonEqual (genType const &x, genType const &y, genType const &epsilon)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, bool, Q > epsilonNotEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y, T const &epsilon)
 
template<typename genType >
GLM_FUNC_DECL bool epsilonNotEqual (genType const &x, genType const &y, genType const &epsilon)
 
+

Detailed Description

+

Include <glm/gtc/epsilon.hpp> to use the features of this extension.

+

Comparison functions for a user defined epsilon values.

+

Function Documentation

+ +

◆ epsilonEqual() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, bool, Q> glm::epsilonEqual (vec< L, T, Q > const & x,
vec< L, T, Q > const & y,
T const & epsilon 
)
+
+ +

Returns the component-wise comparison of |x - y| < epsilon.

+

True if this expression is satisfied.

+
See also
GLM_GTC_epsilon
+ +
+
+ +

◆ epsilonEqual() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL bool glm::epsilonEqual (genType const & x,
genType const & y,
genType const & epsilon 
)
+
+ +

Returns the component-wise comparison of |x - y| < epsilon.

+

True if this expression is satisfied.

+
See also
GLM_GTC_epsilon
+ +
+
+ +

◆ epsilonNotEqual() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, bool, Q> glm::epsilonNotEqual (vec< L, T, Q > const & x,
vec< L, T, Q > const & y,
T const & epsilon 
)
+
+ +

Returns the component-wise comparison of |x - y| < epsilon.

+

True if this expression is not satisfied.

+
See also
GLM_GTC_epsilon
+ +
+
+ +

◆ epsilonNotEqual() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL bool glm::epsilonNotEqual (genType const & x,
genType const & y,
genType const & epsilon 
)
+
+ +

Returns the component-wise comparison of |x - y| >= epsilon.

+

True if this expression is not satisfied.

+
See also
GLM_GTC_epsilon
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00710.html b/common/glm/doc/api/a00710.html new file mode 100644 index 000000000..1284cfd05 --- /dev/null +++ b/common/glm/doc/api/a00710.html @@ -0,0 +1,189 @@ + + + + + + + +0.9.9 API documenation: GLM_GTC_integer + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTC_integer
+
+
+ + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, int, Q > iround (vec< L, T, Q > const &x)
 
template<typename genIUType >
GLM_FUNC_DECL genIUType log2 (genIUType x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, uint, Q > uround (vec< L, T, Q > const &x)
 
+

Detailed Description

+

Include <glm/gtc/integer.hpp> to use the features of this extension.

+

Allow to perform bit operations on integer values

+

Function Documentation

+ +

◆ iround()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, int, Q> glm::iround (vec< L, T, Q > const & x)
+
+ +

Returns a value equal to the nearest integer to x.

+

The fraction 0.5 will round in a direction chosen by the implementation, presumably the direction that is fastest.

+
Parameters
+ + +
xThe values of the argument must be greater or equal to zero.
+
+
+
Template Parameters
+ + +
Tfloating point scalar types.
+
+
+
See also
GLSL round man page
+
+GLM_GTC_integer
+ +
+
+ +

◆ log2()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genIUType glm::log2 (genIUType x)
+
+ +

Returns the log2 of x for integer values.

+

Can be reliably using to compute mipmap count from the texture size.

See also
GLM_GTC_integer
+ +
+
+ +

◆ uround()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, uint, Q> glm::uround (vec< L, T, Q > const & x)
+
+ +

Returns a value equal to the nearest integer to x.

+

The fraction 0.5 will round in a direction chosen by the implementation, presumably the direction that is fastest.

+
Parameters
+ + +
xThe values of the argument must be greater or equal to zero.
+
+
+
Template Parameters
+ + +
Tfloating point scalar types.
+
+
+
See also
GLSL round man page
+
+GLM_GTC_integer
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00711.html b/common/glm/doc/api/a00711.html new file mode 100644 index 000000000..f1c190256 --- /dev/null +++ b/common/glm/doc/api/a00711.html @@ -0,0 +1,235 @@ + + + + + + + +0.9.9 API documenation: GLM_GTC_matrix_access + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTC_matrix_access
+
+
+ + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType::col_type column (genType const &m, length_t index)
 
template<typename genType >
GLM_FUNC_DECL genType column (genType const &m, length_t index, typename genType::col_type const &x)
 
template<typename genType >
GLM_FUNC_DECL genType::row_type row (genType const &m, length_t index)
 
template<typename genType >
GLM_FUNC_DECL genType row (genType const &m, length_t index, typename genType::row_type const &x)
 
+

Detailed Description

+

Include <glm/gtc/matrix_access.hpp> to use the features of this extension.

+

Defines functions to access rows or columns of a matrix easily.

+

Function Documentation

+ +

◆ column() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType::col_type glm::column (genType const & m,
length_t index 
)
+
+ +

Get a specific column of a matrix.

+
See also
GLM_GTC_matrix_access
+ +
+
+ +

◆ column() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::column (genType const & m,
length_t index,
typename genType::col_type const & x 
)
+
+ +

Set a specific column to a matrix.

+
See also
GLM_GTC_matrix_access
+ +
+
+ +

◆ row() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType::row_type glm::row (genType const & m,
length_t index 
)
+
+ +

Get a specific row of a matrix.

+
See also
GLM_GTC_matrix_access
+ +
+
+ +

◆ row() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::row (genType const & m,
length_t index,
typename genType::row_type const & x 
)
+
+ +

Set a specific row to a matrix.

+
See also
GLM_GTC_matrix_access
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00712.html b/common/glm/doc/api/a00712.html new file mode 100644 index 000000000..f59844661 --- /dev/null +++ b/common/glm/doc/api/a00712.html @@ -0,0 +1,2103 @@ + + + + + + + +0.9.9 API documenation: GLM_GTC_matrix_integer + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTC_matrix_integer
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Typedefs

typedef mat< 2, 2, int, highp > highp_imat2
 
typedef mat< 2, 2, int, highp > highp_imat2x2
 
typedef mat< 2, 3, int, highp > highp_imat2x3
 
typedef mat< 2, 4, int, highp > highp_imat2x4
 
typedef mat< 3, 3, int, highp > highp_imat3
 
typedef mat< 3, 2, int, highp > highp_imat3x2
 
typedef mat< 3, 3, int, highp > highp_imat3x3
 
typedef mat< 3, 4, int, highp > highp_imat3x4
 
typedef mat< 4, 4, int, highp > highp_imat4
 
typedef mat< 4, 2, int, highp > highp_imat4x2
 
typedef mat< 4, 3, int, highp > highp_imat4x3
 
typedef mat< 4, 4, int, highp > highp_imat4x4
 
typedef mat< 2, 2, uint, highp > highp_umat2
 
typedef mat< 2, 2, uint, highp > highp_umat2x2
 
typedef mat< 2, 3, uint, highp > highp_umat2x3
 
typedef mat< 2, 4, uint, highp > highp_umat2x4
 
typedef mat< 3, 3, uint, highp > highp_umat3
 
typedef mat< 3, 2, uint, highp > highp_umat3x2
 
typedef mat< 3, 3, uint, highp > highp_umat3x3
 
typedef mat< 3, 4, uint, highp > highp_umat3x4
 
typedef mat< 4, 4, uint, highp > highp_umat4
 
typedef mat< 4, 2, uint, highp > highp_umat4x2
 
typedef mat< 4, 3, uint, highp > highp_umat4x3
 
typedef mat< 4, 4, uint, highp > highp_umat4x4
 
typedef mediump_imat2 imat2
 
typedef mediump_imat2x2 imat2x2
 
typedef mediump_imat2x3 imat2x3
 
typedef mediump_imat2x4 imat2x4
 
typedef mediump_imat3 imat3
 
typedef mediump_imat3x2 imat3x2
 
typedef mediump_imat3x3 imat3x3
 
typedef mediump_imat3x4 imat3x4
 
typedef mediump_imat4 imat4
 
typedef mediump_imat4x2 imat4x2
 
typedef mediump_imat4x3 imat4x3
 
typedef mediump_imat4x4 imat4x4
 
typedef mat< 2, 2, int, lowp > lowp_imat2
 
typedef mat< 2, 2, int, lowp > lowp_imat2x2
 
typedef mat< 2, 3, int, lowp > lowp_imat2x3
 
typedef mat< 2, 4, int, lowp > lowp_imat2x4
 
typedef mat< 3, 3, int, lowp > lowp_imat3
 
typedef mat< 3, 2, int, lowp > lowp_imat3x2
 
typedef mat< 3, 3, int, lowp > lowp_imat3x3
 
typedef mat< 3, 4, int, lowp > lowp_imat3x4
 
typedef mat< 4, 4, int, lowp > lowp_imat4
 
typedef mat< 4, 2, int, lowp > lowp_imat4x2
 
typedef mat< 4, 3, int, lowp > lowp_imat4x3
 
typedef mat< 4, 4, int, lowp > lowp_imat4x4
 
typedef mat< 2, 2, uint, lowp > lowp_umat2
 
typedef mat< 2, 2, uint, lowp > lowp_umat2x2
 
typedef mat< 2, 3, uint, lowp > lowp_umat2x3
 
typedef mat< 2, 4, uint, lowp > lowp_umat2x4
 
typedef mat< 3, 3, uint, lowp > lowp_umat3
 
typedef mat< 3, 2, uint, lowp > lowp_umat3x2
 
typedef mat< 3, 3, uint, lowp > lowp_umat3x3
 
typedef mat< 3, 4, uint, lowp > lowp_umat3x4
 
typedef mat< 4, 4, uint, lowp > lowp_umat4
 
typedef mat< 4, 2, uint, lowp > lowp_umat4x2
 
typedef mat< 4, 3, uint, lowp > lowp_umat4x3
 
typedef mat< 4, 4, uint, lowp > lowp_umat4x4
 
typedef mat< 2, 2, int, mediump > mediump_imat2
 
typedef mat< 2, 2, int, mediump > mediump_imat2x2
 
typedef mat< 2, 3, int, mediump > mediump_imat2x3
 
typedef mat< 2, 4, int, mediump > mediump_imat2x4
 
typedef mat< 3, 3, int, mediump > mediump_imat3
 
typedef mat< 3, 2, int, mediump > mediump_imat3x2
 
typedef mat< 3, 3, int, mediump > mediump_imat3x3
 
typedef mat< 3, 4, int, mediump > mediump_imat3x4
 
typedef mat< 4, 4, int, mediump > mediump_imat4
 
typedef mat< 4, 2, int, mediump > mediump_imat4x2
 
typedef mat< 4, 3, int, mediump > mediump_imat4x3
 
typedef mat< 4, 4, int, mediump > mediump_imat4x4
 
typedef mat< 2, 2, uint, mediump > mediump_umat2
 
typedef mat< 2, 2, uint, mediump > mediump_umat2x2
 
typedef mat< 2, 3, uint, mediump > mediump_umat2x3
 
typedef mat< 2, 4, uint, mediump > mediump_umat2x4
 
typedef mat< 3, 3, uint, mediump > mediump_umat3
 
typedef mat< 3, 2, uint, mediump > mediump_umat3x2
 
typedef mat< 3, 3, uint, mediump > mediump_umat3x3
 
typedef mat< 3, 4, uint, mediump > mediump_umat3x4
 
typedef mat< 4, 4, uint, mediump > mediump_umat4
 
typedef mat< 4, 2, uint, mediump > mediump_umat4x2
 
typedef mat< 4, 3, uint, mediump > mediump_umat4x3
 
typedef mat< 4, 4, uint, mediump > mediump_umat4x4
 
typedef mediump_umat2 umat2
 
typedef mediump_umat2x2 umat2x2
 
typedef mediump_umat2x3 umat2x3
 
typedef mediump_umat2x4 umat2x4
 
typedef mediump_umat3 umat3
 
typedef mediump_umat3x2 umat3x2
 
typedef mediump_umat3x3 umat3x3
 
typedef mediump_umat3x4 umat3x4
 
typedef mediump_umat4 umat4
 
typedef mediump_umat4x2 umat4x2
 
typedef mediump_umat4x3 umat4x3
 
typedef mediump_umat4x4 umat4x4
 
+

Detailed Description

+

Include <glm/gtc/matrix_integer.hpp> to use the features of this extension.

+

Defines a number of matrices with integer types.

+

Typedef Documentation

+ +

◆ highp_imat2

+ +
+
+ + + + +
typedef mat<2, 2, int, highp> highp_imat2
+
+ +

High-qualifier signed integer 2x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 37 of file matrix_integer.hpp.

+ +
+
+ +

◆ highp_imat2x2

+ +
+
+ + + + +
typedef mat<2, 2, int, highp> highp_imat2x2
+
+ +

High-qualifier signed integer 2x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 49 of file matrix_integer.hpp.

+ +
+
+ +

◆ highp_imat2x3

+ +
+
+ + + + +
typedef mat<2, 3, int, highp> highp_imat2x3
+
+ +

High-qualifier signed integer 2x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 53 of file matrix_integer.hpp.

+ +
+
+ +

◆ highp_imat2x4

+ +
+
+ + + + +
typedef mat<2, 4, int, highp> highp_imat2x4
+
+ +

High-qualifier signed integer 2x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 57 of file matrix_integer.hpp.

+ +
+
+ +

◆ highp_imat3

+ +
+
+ + + + +
typedef mat<3, 3, int, highp> highp_imat3
+
+ +

High-qualifier signed integer 3x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 41 of file matrix_integer.hpp.

+ +
+
+ +

◆ highp_imat3x2

+ +
+
+ + + + +
typedef mat<3, 2, int, highp> highp_imat3x2
+
+ +

High-qualifier signed integer 3x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 61 of file matrix_integer.hpp.

+ +
+
+ +

◆ highp_imat3x3

+ +
+
+ + + + +
typedef mat<3, 3, int, highp> highp_imat3x3
+
+ +

High-qualifier signed integer 3x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 65 of file matrix_integer.hpp.

+ +
+
+ +

◆ highp_imat3x4

+ +
+
+ + + + +
typedef mat<3, 4, int, highp> highp_imat3x4
+
+ +

High-qualifier signed integer 3x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 69 of file matrix_integer.hpp.

+ +
+
+ +

◆ highp_imat4

+ +
+
+ + + + +
typedef mat<4, 4, int, highp> highp_imat4
+
+ +

High-qualifier signed integer 4x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 45 of file matrix_integer.hpp.

+ +
+
+ +

◆ highp_imat4x2

+ +
+
+ + + + +
typedef mat<4, 2, int, highp> highp_imat4x2
+
+ +

High-qualifier signed integer 4x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 73 of file matrix_integer.hpp.

+ +
+
+ +

◆ highp_imat4x3

+ +
+
+ + + + +
typedef mat<4, 3, int, highp> highp_imat4x3
+
+ +

High-qualifier signed integer 4x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 77 of file matrix_integer.hpp.

+ +
+
+ +

◆ highp_imat4x4

+ +
+
+ + + + +
typedef mat<4, 4, int, highp> highp_imat4x4
+
+ +

High-qualifier signed integer 4x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 81 of file matrix_integer.hpp.

+ +
+
+ +

◆ highp_umat2

+ +
+
+ + + + +
typedef mat<2, 2, uint, highp> highp_umat2
+
+ +

High-qualifier unsigned integer 2x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 186 of file matrix_integer.hpp.

+ +
+
+ +

◆ highp_umat2x2

+ +
+
+ + + + +
typedef mat<2, 2, uint, highp> highp_umat2x2
+
+ +

High-qualifier unsigned integer 2x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 198 of file matrix_integer.hpp.

+ +
+
+ +

◆ highp_umat2x3

+ +
+
+ + + + +
typedef mat<2, 3, uint, highp> highp_umat2x3
+
+ +

High-qualifier unsigned integer 2x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 202 of file matrix_integer.hpp.

+ +
+
+ +

◆ highp_umat2x4

+ +
+
+ + + + +
typedef mat<2, 4, uint, highp> highp_umat2x4
+
+ +

High-qualifier unsigned integer 2x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 206 of file matrix_integer.hpp.

+ +
+
+ +

◆ highp_umat3

+ +
+
+ + + + +
typedef mat<3, 3, uint, highp> highp_umat3
+
+ +

High-qualifier unsigned integer 3x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 190 of file matrix_integer.hpp.

+ +
+
+ +

◆ highp_umat3x2

+ +
+
+ + + + +
typedef mat<3, 2, uint, highp> highp_umat3x2
+
+ +

High-qualifier unsigned integer 3x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 210 of file matrix_integer.hpp.

+ +
+
+ +

◆ highp_umat3x3

+ +
+
+ + + + +
typedef mat<3, 3, uint, highp> highp_umat3x3
+
+ +

High-qualifier unsigned integer 3x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 214 of file matrix_integer.hpp.

+ +
+
+ +

◆ highp_umat3x4

+ +
+
+ + + + +
typedef mat<3, 4, uint, highp> highp_umat3x4
+
+ +

High-qualifier unsigned integer 3x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 218 of file matrix_integer.hpp.

+ +
+
+ +

◆ highp_umat4

+ +
+
+ + + + +
typedef mat<4, 4, uint, highp> highp_umat4
+
+ +

High-qualifier unsigned integer 4x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 194 of file matrix_integer.hpp.

+ +
+
+ +

◆ highp_umat4x2

+ +
+
+ + + + +
typedef mat<4, 2, uint, highp> highp_umat4x2
+
+ +

High-qualifier unsigned integer 4x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 222 of file matrix_integer.hpp.

+ +
+
+ +

◆ highp_umat4x3

+ +
+
+ + + + +
typedef mat<4, 3, uint, highp> highp_umat4x3
+
+ +

High-qualifier unsigned integer 4x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 226 of file matrix_integer.hpp.

+ +
+
+ +

◆ highp_umat4x4

+ +
+
+ + + + +
typedef mat<4, 4, uint, highp> highp_umat4x4
+
+ +

High-qualifier unsigned integer 4x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 230 of file matrix_integer.hpp.

+ +
+
+ +

◆ imat2

+ +
+
+ + + + +
typedef mediump_imat2 imat2
+
+ +

Signed integer 2x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 362 of file matrix_integer.hpp.

+ +
+
+ +

◆ imat2x2

+ +
+
+ + + + +
typedef mediump_imat2x2 imat2x2
+
+ +

Signed integer 2x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 374 of file matrix_integer.hpp.

+ +
+
+ +

◆ imat2x3

+ +
+
+ + + + +
typedef mediump_imat2x3 imat2x3
+
+ +

Signed integer 2x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 378 of file matrix_integer.hpp.

+ +
+
+ +

◆ imat2x4

+ +
+
+ + + + +
typedef mediump_imat2x4 imat2x4
+
+ +

Signed integer 2x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 382 of file matrix_integer.hpp.

+ +
+
+ +

◆ imat3

+ +
+
+ + + + +
typedef mediump_imat3 imat3
+
+ +

Signed integer 3x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 366 of file matrix_integer.hpp.

+ +
+
+ +

◆ imat3x2

+ +
+
+ + + + +
typedef mediump_imat3x2 imat3x2
+
+ +

Signed integer 3x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 386 of file matrix_integer.hpp.

+ +
+
+ +

◆ imat3x3

+ +
+
+ + + + +
typedef mediump_imat3x3 imat3x3
+
+ +

Signed integer 3x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 390 of file matrix_integer.hpp.

+ +
+
+ +

◆ imat3x4

+ +
+
+ + + + +
typedef mediump_imat3x4 imat3x4
+
+ +

Signed integer 3x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 394 of file matrix_integer.hpp.

+ +
+
+ +

◆ imat4

+ +
+
+ + + + +
typedef mediump_imat4 imat4
+
+ +

Signed integer 4x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 370 of file matrix_integer.hpp.

+ +
+
+ +

◆ imat4x2

+ +
+
+ + + + +
typedef mediump_imat4x2 imat4x2
+
+ +

Signed integer 4x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 398 of file matrix_integer.hpp.

+ +
+
+ +

◆ imat4x3

+ +
+
+ + + + +
typedef mediump_imat4x3 imat4x3
+
+ +

Signed integer 4x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 402 of file matrix_integer.hpp.

+ +
+
+ +

◆ imat4x4

+ +
+
+ + + + +
typedef mediump_imat4x4 imat4x4
+
+ +

Signed integer 4x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 406 of file matrix_integer.hpp.

+ +
+
+ +

◆ lowp_imat2

+ +
+
+ + + + +
typedef mat<2, 2, int, lowp> lowp_imat2
+
+ +

Low-qualifier signed integer 2x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 136 of file matrix_integer.hpp.

+ +
+
+ +

◆ lowp_imat2x2

+ +
+
+ + + + +
typedef mat<2, 2, int, lowp> lowp_imat2x2
+
+ +

Low-qualifier signed integer 2x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 149 of file matrix_integer.hpp.

+ +
+
+ +

◆ lowp_imat2x3

+ +
+
+ + + + +
typedef mat<2, 3, int, lowp> lowp_imat2x3
+
+ +

Low-qualifier signed integer 2x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 153 of file matrix_integer.hpp.

+ +
+
+ +

◆ lowp_imat2x4

+ +
+
+ + + + +
typedef mat<2, 4, int, lowp> lowp_imat2x4
+
+ +

Low-qualifier signed integer 2x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 157 of file matrix_integer.hpp.

+ +
+
+ +

◆ lowp_imat3

+ +
+
+ + + + +
typedef mat<3, 3, int, lowp> lowp_imat3
+
+ +

Low-qualifier signed integer 3x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 140 of file matrix_integer.hpp.

+ +
+
+ +

◆ lowp_imat3x2

+ +
+
+ + + + +
typedef mat<3, 2, int, lowp> lowp_imat3x2
+
+ +

Low-qualifier signed integer 3x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 161 of file matrix_integer.hpp.

+ +
+
+ +

◆ lowp_imat3x3

+ +
+
+ + + + +
typedef mat<3, 3, int, lowp> lowp_imat3x3
+
+ +

Low-qualifier signed integer 3x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 165 of file matrix_integer.hpp.

+ +
+
+ +

◆ lowp_imat3x4

+ +
+
+ + + + +
typedef mat<3, 4, int, lowp> lowp_imat3x4
+
+ +

Low-qualifier signed integer 3x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 169 of file matrix_integer.hpp.

+ +
+
+ +

◆ lowp_imat4

+ +
+
+ + + + +
typedef mat<4, 4, int, lowp> lowp_imat4
+
+ +

Low-qualifier signed integer 4x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 144 of file matrix_integer.hpp.

+ +
+
+ +

◆ lowp_imat4x2

+ +
+
+ + + + +
typedef mat<4, 2, int, lowp> lowp_imat4x2
+
+ +

Low-qualifier signed integer 4x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 173 of file matrix_integer.hpp.

+ +
+
+ +

◆ lowp_imat4x3

+ +
+
+ + + + +
typedef mat<4, 3, int, lowp> lowp_imat4x3
+
+ +

Low-qualifier signed integer 4x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 177 of file matrix_integer.hpp.

+ +
+
+ +

◆ lowp_imat4x4

+ +
+
+ + + + +
typedef mat<4, 4, int, lowp> lowp_imat4x4
+
+ +

Low-qualifier signed integer 4x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 181 of file matrix_integer.hpp.

+ +
+
+ +

◆ lowp_umat2

+ +
+
+ + + + +
typedef mat<2, 2, uint, lowp> lowp_umat2
+
+ +

Low-qualifier unsigned integer 2x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 285 of file matrix_integer.hpp.

+ +
+
+ +

◆ lowp_umat2x2

+ +
+
+ + + + +
typedef mat<2, 2, uint, lowp> lowp_umat2x2
+
+ +

Low-qualifier unsigned integer 2x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 298 of file matrix_integer.hpp.

+ +
+
+ +

◆ lowp_umat2x3

+ +
+
+ + + + +
typedef mat<2, 3, uint, lowp> lowp_umat2x3
+
+ +

Low-qualifier unsigned integer 2x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 302 of file matrix_integer.hpp.

+ +
+
+ +

◆ lowp_umat2x4

+ +
+
+ + + + +
typedef mat<2, 4, uint, lowp> lowp_umat2x4
+
+ +

Low-qualifier unsigned integer 2x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 306 of file matrix_integer.hpp.

+ +
+
+ +

◆ lowp_umat3

+ +
+
+ + + + +
typedef mat<3, 3, uint, lowp> lowp_umat3
+
+ +

Low-qualifier unsigned integer 3x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 289 of file matrix_integer.hpp.

+ +
+
+ +

◆ lowp_umat3x2

+ +
+
+ + + + +
typedef mat<3, 2, uint, lowp> lowp_umat3x2
+
+ +

Low-qualifier unsigned integer 3x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 310 of file matrix_integer.hpp.

+ +
+
+ +

◆ lowp_umat3x3

+ +
+
+ + + + +
typedef mat<3, 3, uint, lowp> lowp_umat3x3
+
+ +

Low-qualifier unsigned integer 3x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 314 of file matrix_integer.hpp.

+ +
+
+ +

◆ lowp_umat3x4

+ +
+
+ + + + +
typedef mat<3, 4, uint, lowp> lowp_umat3x4
+
+ +

Low-qualifier unsigned integer 3x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 318 of file matrix_integer.hpp.

+ +
+
+ +

◆ lowp_umat4

+ +
+
+ + + + +
typedef mat<4, 4, uint, lowp> lowp_umat4
+
+ +

Low-qualifier unsigned integer 4x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 293 of file matrix_integer.hpp.

+ +
+
+ +

◆ lowp_umat4x2

+ +
+
+ + + + +
typedef mat<4, 2, uint, lowp> lowp_umat4x2
+
+ +

Low-qualifier unsigned integer 4x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 322 of file matrix_integer.hpp.

+ +
+
+ +

◆ lowp_umat4x3

+ +
+
+ + + + +
typedef mat<4, 3, uint, lowp> lowp_umat4x3
+
+ +

Low-qualifier unsigned integer 4x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 326 of file matrix_integer.hpp.

+ +
+
+ +

◆ lowp_umat4x4

+ +
+
+ + + + +
typedef mat<4, 4, uint, lowp> lowp_umat4x4
+
+ +

Low-qualifier unsigned integer 4x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 330 of file matrix_integer.hpp.

+ +
+
+ +

◆ mediump_imat2

+ +
+
+ + + + +
typedef mat<2, 2, int, mediump> mediump_imat2
+
+ +

Medium-qualifier signed integer 2x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 86 of file matrix_integer.hpp.

+ +
+
+ +

◆ mediump_imat2x2

+ +
+
+ + + + +
typedef mat<2, 2, int, mediump> mediump_imat2x2
+
+ +

Medium-qualifier signed integer 2x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 99 of file matrix_integer.hpp.

+ +
+
+ +

◆ mediump_imat2x3

+ +
+
+ + + + +
typedef mat<2, 3, int, mediump> mediump_imat2x3
+
+ +

Medium-qualifier signed integer 2x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 103 of file matrix_integer.hpp.

+ +
+
+ +

◆ mediump_imat2x4

+ +
+
+ + + + +
typedef mat<2, 4, int, mediump> mediump_imat2x4
+
+ +

Medium-qualifier signed integer 2x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 107 of file matrix_integer.hpp.

+ +
+
+ +

◆ mediump_imat3

+ +
+
+ + + + +
typedef mat<3, 3, int, mediump> mediump_imat3
+
+ +

Medium-qualifier signed integer 3x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 90 of file matrix_integer.hpp.

+ +
+
+ +

◆ mediump_imat3x2

+ +
+
+ + + + +
typedef mat<3, 2, int, mediump> mediump_imat3x2
+
+ +

Medium-qualifier signed integer 3x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 111 of file matrix_integer.hpp.

+ +
+
+ +

◆ mediump_imat3x3

+ +
+
+ + + + +
typedef mat<3, 3, int, mediump> mediump_imat3x3
+
+ +

Medium-qualifier signed integer 3x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 115 of file matrix_integer.hpp.

+ +
+
+ +

◆ mediump_imat3x4

+ +
+
+ + + + +
typedef mat<3, 4, int, mediump> mediump_imat3x4
+
+ +

Medium-qualifier signed integer 3x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 119 of file matrix_integer.hpp.

+ +
+
+ +

◆ mediump_imat4

+ +
+
+ + + + +
typedef mat<4, 4, int, mediump> mediump_imat4
+
+ +

Medium-qualifier signed integer 4x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 94 of file matrix_integer.hpp.

+ +
+
+ +

◆ mediump_imat4x2

+ +
+
+ + + + +
typedef mat<4, 2, int, mediump> mediump_imat4x2
+
+ +

Medium-qualifier signed integer 4x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 123 of file matrix_integer.hpp.

+ +
+
+ +

◆ mediump_imat4x3

+ +
+
+ + + + +
typedef mat<4, 3, int, mediump> mediump_imat4x3
+
+ +

Medium-qualifier signed integer 4x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 127 of file matrix_integer.hpp.

+ +
+
+ +

◆ mediump_imat4x4

+ +
+
+ + + + +
typedef mat<4, 4, int, mediump> mediump_imat4x4
+
+ +

Medium-qualifier signed integer 4x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 131 of file matrix_integer.hpp.

+ +
+
+ +

◆ mediump_umat2

+ +
+
+ + + + +
typedef mat<2, 2, uint, mediump> mediump_umat2
+
+ +

Medium-qualifier unsigned integer 2x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 235 of file matrix_integer.hpp.

+ +
+
+ +

◆ mediump_umat2x2

+ +
+
+ + + + +
typedef mat<2, 2, uint, mediump> mediump_umat2x2
+
+ +

Medium-qualifier unsigned integer 2x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 248 of file matrix_integer.hpp.

+ +
+
+ +

◆ mediump_umat2x3

+ +
+
+ + + + +
typedef mat<2, 3, uint, mediump> mediump_umat2x3
+
+ +

Medium-qualifier unsigned integer 2x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 252 of file matrix_integer.hpp.

+ +
+
+ +

◆ mediump_umat2x4

+ +
+
+ + + + +
typedef mat<2, 4, uint, mediump> mediump_umat2x4
+
+ +

Medium-qualifier unsigned integer 2x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 256 of file matrix_integer.hpp.

+ +
+
+ +

◆ mediump_umat3

+ +
+
+ + + + +
typedef mat<3, 3, uint, mediump> mediump_umat3
+
+ +

Medium-qualifier unsigned integer 3x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 239 of file matrix_integer.hpp.

+ +
+
+ +

◆ mediump_umat3x2

+ +
+
+ + + + +
typedef mat<3, 2, uint, mediump> mediump_umat3x2
+
+ +

Medium-qualifier unsigned integer 3x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 260 of file matrix_integer.hpp.

+ +
+
+ +

◆ mediump_umat3x3

+ +
+
+ + + + +
typedef mat<3, 3, uint, mediump> mediump_umat3x3
+
+ +

Medium-qualifier unsigned integer 3x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 264 of file matrix_integer.hpp.

+ +
+
+ +

◆ mediump_umat3x4

+ +
+
+ + + + +
typedef mat<3, 4, uint, mediump> mediump_umat3x4
+
+ +

Medium-qualifier unsigned integer 3x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 268 of file matrix_integer.hpp.

+ +
+
+ +

◆ mediump_umat4

+ +
+
+ + + + +
typedef mat<4, 4, uint, mediump> mediump_umat4
+
+ +

Medium-qualifier unsigned integer 4x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 243 of file matrix_integer.hpp.

+ +
+
+ +

◆ mediump_umat4x2

+ +
+
+ + + + +
typedef mat<4, 2, uint, mediump> mediump_umat4x2
+
+ +

Medium-qualifier unsigned integer 4x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 272 of file matrix_integer.hpp.

+ +
+
+ +

◆ mediump_umat4x3

+ +
+
+ + + + +
typedef mat<4, 3, uint, mediump> mediump_umat4x3
+
+ +

Medium-qualifier unsigned integer 4x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 276 of file matrix_integer.hpp.

+ +
+
+ +

◆ mediump_umat4x4

+ +
+
+ + + + +
typedef mat<4, 4, uint, mediump> mediump_umat4x4
+
+ +

Medium-qualifier unsigned integer 4x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 280 of file matrix_integer.hpp.

+ +
+
+ +

◆ umat2

+ +
+
+ + + + +
typedef mediump_umat2 umat2
+
+ +

Unsigned integer 2x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 439 of file matrix_integer.hpp.

+ +
+
+ +

◆ umat2x2

+ +
+
+ + + + +
typedef mediump_umat2x2 umat2x2
+
+ +

Unsigned integer 2x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 451 of file matrix_integer.hpp.

+ +
+
+ +

◆ umat2x3

+ +
+
+ + + + +
typedef mediump_umat2x3 umat2x3
+
+ +

Unsigned integer 2x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 455 of file matrix_integer.hpp.

+ +
+
+ +

◆ umat2x4

+ +
+
+ + + + +
typedef mediump_umat2x4 umat2x4
+
+ +

Unsigned integer 2x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 459 of file matrix_integer.hpp.

+ +
+
+ +

◆ umat3

+ +
+
+ + + + +
typedef mediump_umat3 umat3
+
+ +

Unsigned integer 3x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 443 of file matrix_integer.hpp.

+ +
+
+ +

◆ umat3x2

+ +
+
+ + + + +
typedef mediump_umat3x2 umat3x2
+
+ +

Unsigned integer 3x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 463 of file matrix_integer.hpp.

+ +
+
+ +

◆ umat3x3

+ +
+
+ + + + +
typedef mediump_umat3x3 umat3x3
+
+ +

Unsigned integer 3x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 467 of file matrix_integer.hpp.

+ +
+
+ +

◆ umat3x4

+ +
+
+ + + + +
typedef mediump_umat3x4 umat3x4
+
+ +

Unsigned integer 3x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 471 of file matrix_integer.hpp.

+ +
+
+ +

◆ umat4

+ +
+
+ + + + +
typedef mediump_umat4 umat4
+
+ +

Unsigned integer 4x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 447 of file matrix_integer.hpp.

+ +
+
+ +

◆ umat4x2

+ +
+
+ + + + +
typedef mediump_umat4x2 umat4x2
+
+ +

Unsigned integer 4x2 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 475 of file matrix_integer.hpp.

+ +
+
+ +

◆ umat4x3

+ +
+
+ + + + +
typedef mediump_umat4x3 umat4x3
+
+ +

Unsigned integer 4x3 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 479 of file matrix_integer.hpp.

+ +
+
+ +

◆ umat4x4

+ +
+
+ + + + +
typedef mediump_umat4x4 umat4x4
+
+ +

Unsigned integer 4x4 matrix.

+
See also
GLM_GTC_matrix_integer
+ +

Definition at line 483 of file matrix_integer.hpp.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00713.html b/common/glm/doc/api/a00713.html new file mode 100644 index 000000000..c78a3c331 --- /dev/null +++ b/common/glm/doc/api/a00713.html @@ -0,0 +1,159 @@ + + + + + + + +0.9.9 API documenation: GLM_GTC_matrix_inverse + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTC_matrix_inverse
+
+
+ + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType affineInverse (genType const &m)
 
template<typename genType >
GLM_FUNC_DECL genType inverseTranspose (genType const &m)
 
+

Detailed Description

+

Include <glm/gtc/matrix_integer.hpp> to use the features of this extension.

+

Defines additional matrix inverting functions.

+

Function Documentation

+ +

◆ affineInverse()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::affineInverse (genType const & m)
+
+ +

Fast matrix inverse for affine matrix.

+
Parameters
+ + +
mInput matrix to invert.
+
+
+
Template Parameters
+ + +
genTypeSquared floating-point matrix: half, float or double. Inverse of matrix based of half-qualifier floating point value is highly innacurate.
+
+
+
See also
GLM_GTC_matrix_inverse
+ +
+
+ +

◆ inverseTranspose()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::inverseTranspose (genType const & m)
+
+ +

Compute the inverse transpose of a matrix.

+
Parameters
+ + +
mInput matrix to invert transpose.
+
+
+
Template Parameters
+ + +
genTypeSquared floating-point matrix: half, float or double. Inverse of matrix based of half-qualifier floating point value is highly innacurate.
+
+
+
See also
GLM_GTC_matrix_inverse
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00714.html b/common/glm/doc/api/a00714.html new file mode 100644 index 000000000..e8698e12e --- /dev/null +++ b/common/glm/doc/api/a00714.html @@ -0,0 +1,80 @@ + + + + + + + +0.9.9 API documenation: GLM_GTC_matrix_transform + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
GLM_GTC_matrix_transform
+
+
+

Include <glm/gtc/matrix_transform.hpp> to use the features of this extension.

+

Defines functions that generate common transformation matrices.

+

The matrices generated by this extension use standard OpenGL fixed-function conventions. For example, the lookAt function generates a transform from world space into the specific eye space that the projective matrix functions (perspective, ortho, etc) are designed to expect. The OpenGL compatibility specifications defines the particular layout of this eye space.

+
+ + + + diff --git a/common/glm/doc/api/a00715.html b/common/glm/doc/api/a00715.html new file mode 100644 index 000000000..36d7a6cdf --- /dev/null +++ b/common/glm/doc/api/a00715.html @@ -0,0 +1,169 @@ + + + + + + + +0.9.9 API documenation: GLM_GTC_noise + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
+
+
+ + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T perlin (vec< L, T, Q > const &p)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T perlin (vec< L, T, Q > const &p, vec< L, T, Q > const &rep)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T simplex (vec< L, T, Q > const &p)
 
+

Detailed Description

+

Include <glm/gtc/noise.hpp> to use the features of this extension.

+

Defines 2D, 3D and 4D procedural noise functions Based on the work of Stefan Gustavson and Ashima Arts on "webgl-noise": https://github.com/ashima/webgl-noise Following Stefan Gustavson's paper "Simplex noise demystified": http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf

+

Function Documentation

+ +

◆ perlin() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL T glm::perlin (vec< L, T, Q > const & p)
+
+ +

Classic perlin noise.

+
See also
GLM_GTC_noise
+ +
+
+ +

◆ perlin() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::perlin (vec< L, T, Q > const & p,
vec< L, T, Q > const & rep 
)
+
+ +

Periodic perlin noise.

+
See also
GLM_GTC_noise
+ +
+
+ +

◆ simplex()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL T glm::simplex (vec< L, T, Q > const & p)
+
+ +

Simplex noise.

+
See also
GLM_GTC_noise
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00716.html b/common/glm/doc/api/a00716.html new file mode 100644 index 000000000..ed3b141d7 --- /dev/null +++ b/common/glm/doc/api/a00716.html @@ -0,0 +1,2088 @@ + + + + + + + +0.9.9 API documenation: GLM_GTC_packing + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTC_packing
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

GLM_FUNC_DECL uint32 packF2x11_1x10 (vec3 const &v)
 
GLM_FUNC_DECL uint32 packF3x9_E1x5 (vec3 const &v)
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL vec< L, uint16, Q > packHalf (vec< L, float, Q > const &v)
 
GLM_FUNC_DECL uint16 packHalf1x16 (float v)
 
GLM_FUNC_DECL uint64 packHalf4x16 (vec4 const &v)
 
GLM_FUNC_DECL uint32 packI3x10_1x2 (ivec4 const &v)
 
GLM_FUNC_DECL int packInt2x16 (i16vec2 const &v)
 
GLM_FUNC_DECL int64 packInt2x32 (i32vec2 const &v)
 
GLM_FUNC_DECL int16 packInt2x8 (i8vec2 const &v)
 
GLM_FUNC_DECL int64 packInt4x16 (i16vec4 const &v)
 
GLM_FUNC_DECL int32 packInt4x8 (i8vec4 const &v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > packRGBM (vec< 3, T, Q > const &rgb)
 
template<typename intType , length_t L, typename floatType , qualifier Q>
GLM_FUNC_DECL vec< L, intType, Q > packSnorm (vec< L, floatType, Q > const &v)
 
GLM_FUNC_DECL uint16 packSnorm1x16 (float v)
 
GLM_FUNC_DECL uint8 packSnorm1x8 (float s)
 
GLM_FUNC_DECL uint16 packSnorm2x8 (vec2 const &v)
 
GLM_FUNC_DECL uint32 packSnorm3x10_1x2 (vec4 const &v)
 
GLM_FUNC_DECL uint64 packSnorm4x16 (vec4 const &v)
 
GLM_FUNC_DECL uint32 packU3x10_1x2 (uvec4 const &v)
 
GLM_FUNC_DECL uint packUint2x16 (u16vec2 const &v)
 
GLM_FUNC_DECL uint64 packUint2x32 (u32vec2 const &v)
 
GLM_FUNC_DECL uint16 packUint2x8 (u8vec2 const &v)
 
GLM_FUNC_DECL uint64 packUint4x16 (u16vec4 const &v)
 
GLM_FUNC_DECL uint32 packUint4x8 (u8vec4 const &v)
 
template<typename uintType , length_t L, typename floatType , qualifier Q>
GLM_FUNC_DECL vec< L, uintType, Q > packUnorm (vec< L, floatType, Q > const &v)
 
GLM_FUNC_DECL uint16 packUnorm1x16 (float v)
 
GLM_FUNC_DECL uint16 packUnorm1x5_1x6_1x5 (vec3 const &v)
 
GLM_FUNC_DECL uint8 packUnorm1x8 (float v)
 
GLM_FUNC_DECL uint8 packUnorm2x3_1x2 (vec3 const &v)
 
GLM_FUNC_DECL uint8 packUnorm2x4 (vec2 const &v)
 
GLM_FUNC_DECL uint16 packUnorm2x8 (vec2 const &v)
 
GLM_FUNC_DECL uint32 packUnorm3x10_1x2 (vec4 const &v)
 
GLM_FUNC_DECL uint16 packUnorm3x5_1x1 (vec4 const &v)
 
GLM_FUNC_DECL uint64 packUnorm4x16 (vec4 const &v)
 
GLM_FUNC_DECL uint16 packUnorm4x4 (vec4 const &v)
 
GLM_FUNC_DECL vec3 unpackF2x11_1x10 (uint32 p)
 
GLM_FUNC_DECL vec3 unpackF3x9_E1x5 (uint32 p)
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL vec< L, float, Q > unpackHalf (vec< L, uint16, Q > const &p)
 
GLM_FUNC_DECL float unpackHalf1x16 (uint16 v)
 
GLM_FUNC_DECL vec4 unpackHalf4x16 (uint64 p)
 
GLM_FUNC_DECL ivec4 unpackI3x10_1x2 (uint32 p)
 
GLM_FUNC_DECL i16vec2 unpackInt2x16 (int p)
 
GLM_FUNC_DECL i32vec2 unpackInt2x32 (int64 p)
 
GLM_FUNC_DECL i8vec2 unpackInt2x8 (int16 p)
 
GLM_FUNC_DECL i16vec4 unpackInt4x16 (int64 p)
 
GLM_FUNC_DECL i8vec4 unpackInt4x8 (int32 p)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > unpackRGBM (vec< 4, T, Q > const &rgbm)
 
template<typename floatType , length_t L, typename intType , qualifier Q>
GLM_FUNC_DECL vec< L, floatType, Q > unpackSnorm (vec< L, intType, Q > const &v)
 
GLM_FUNC_DECL float unpackSnorm1x16 (uint16 p)
 
GLM_FUNC_DECL float unpackSnorm1x8 (uint8 p)
 
GLM_FUNC_DECL vec2 unpackSnorm2x8 (uint16 p)
 
GLM_FUNC_DECL vec4 unpackSnorm3x10_1x2 (uint32 p)
 
GLM_FUNC_DECL vec4 unpackSnorm4x16 (uint64 p)
 
GLM_FUNC_DECL uvec4 unpackU3x10_1x2 (uint32 p)
 
GLM_FUNC_DECL u16vec2 unpackUint2x16 (uint p)
 
GLM_FUNC_DECL u32vec2 unpackUint2x32 (uint64 p)
 
GLM_FUNC_DECL u8vec2 unpackUint2x8 (uint16 p)
 
GLM_FUNC_DECL u16vec4 unpackUint4x16 (uint64 p)
 
GLM_FUNC_DECL u8vec4 unpackUint4x8 (uint32 p)
 
template<typename floatType , length_t L, typename uintType , qualifier Q>
GLM_FUNC_DECL vec< L, floatType, Q > unpackUnorm (vec< L, uintType, Q > const &v)
 
GLM_FUNC_DECL float unpackUnorm1x16 (uint16 p)
 
GLM_FUNC_DECL vec3 unpackUnorm1x5_1x6_1x5 (uint16 p)
 
GLM_FUNC_DECL float unpackUnorm1x8 (uint8 p)
 
GLM_FUNC_DECL vec3 unpackUnorm2x3_1x2 (uint8 p)
 
GLM_FUNC_DECL vec2 unpackUnorm2x4 (uint8 p)
 
GLM_FUNC_DECL vec2 unpackUnorm2x8 (uint16 p)
 
GLM_FUNC_DECL vec4 unpackUnorm3x10_1x2 (uint32 p)
 
GLM_FUNC_DECL vec4 unpackUnorm3x5_1x1 (uint16 p)
 
GLM_FUNC_DECL vec4 unpackUnorm4x16 (uint64 p)
 
GLM_FUNC_DECL vec4 unpackUnorm4x4 (uint16 p)
 
+

Detailed Description

+

Include <glm/gtc/packing.hpp> to use the features of this extension.

+

This extension provides a set of function to convert vertors to packed formats.

+

Function Documentation

+ +

◆ packF2x11_1x10()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint32 glm::packF2x11_1x10 (vec3 const & v)
+
+ +

First, converts the first two components of the normalized floating-point value v into 11-bit signless floating-point values.

+

Then, converts the third component of the normalized floating-point value v into a 10-bit signless floating-point value. Then, the results are packed into the returned 32-bit unsigned integer.

+

The first vector component specifies the 11 least-significant bits of the result; the last component specifies the 10 most-significant bits.

+
See also
GLM_GTC_packing
+
+vec3 unpackF2x11_1x10(uint32 const& p)
+ +
+
+ +

◆ packF3x9_E1x5()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint32 glm::packF3x9_E1x5 (vec3 const & v)
+
+ +

First, converts the first two components of the normalized floating-point value v into 11-bit signless floating-point values.

+

Then, converts the third component of the normalized floating-point value v into a 10-bit signless floating-point value. Then, the results are packed into the returned 32-bit unsigned integer.

+

The first vector component specifies the 11 least-significant bits of the result; the last component specifies the 10 most-significant bits.

+

packF3x9_E1x5 allows encoding into RGBE / RGB9E5 format

+
See also
GLM_GTC_packing
+
+vec3 unpackF3x9_E1x5(uint32 const& p)
+ +
+
+ +

◆ packHalf()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, uint16, Q> glm::packHalf (vec< L, float, Q > const & v)
+
+ +

Returns an unsigned integer vector obtained by converting the components of a floating-point vector to the 16-bit floating-point representation found in the OpenGL Specification.

+

The first vector component specifies the 16 least-significant bits of the result; the forth component specifies the 16 most-significant bits.

+
See also
GLM_GTC_packing
+
+vec<L, float, Q> unpackHalf(vec<L, uint16, Q> const& p)
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ packHalf1x16()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint16 glm::packHalf1x16 (float v)
+
+ +

Returns an unsigned integer obtained by converting the components of a floating-point scalar to the 16-bit floating-point representation found in the OpenGL Specification, and then packing this 16-bit value into a 16-bit unsigned integer.

+
See also
GLM_GTC_packing
+
+uint32 packHalf2x16(vec2 const& v)
+
+uint64 packHalf4x16(vec4 const& v)
+
+GLSL packHalf2x16 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ packHalf4x16()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint64 glm::packHalf4x16 (vec4 const & v)
+
+ +

Returns an unsigned integer obtained by converting the components of a four-component floating-point vector to the 16-bit floating-point representation found in the OpenGL Specification, and then packing these four 16-bit values into a 64-bit unsigned integer.

+

The first vector component specifies the 16 least-significant bits of the result; the forth component specifies the 16 most-significant bits.

+
See also
GLM_GTC_packing
+
+uint16 packHalf1x16(float const& v)
+
+uint32 packHalf2x16(vec2 const& v)
+
+GLSL packHalf2x16 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ packI3x10_1x2()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint32 glm::packI3x10_1x2 (ivec4 const & v)
+
+ +

Returns an unsigned integer obtained by converting the components of a four-component signed integer vector to the 10-10-10-2-bit signed integer representation found in the OpenGL Specification, and then packing these four values into a 32-bit unsigned integer.

+

The first vector component specifies the 10 least-significant bits of the result; the forth component specifies the 2 most-significant bits.

+
See also
GLM_GTC_packing
+
+uint32 packI3x10_1x2(uvec4 const& v)
+
+uint32 packSnorm3x10_1x2(vec4 const& v)
+
+uint32 packUnorm3x10_1x2(vec4 const& v)
+
+ivec4 unpackI3x10_1x2(uint32 const& p)
+ +
+
+ +

◆ packInt2x16()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL int glm::packInt2x16 (i16vec2 const & v)
+
+ +

Convert each component from an integer vector into a packed unsigned integer.

+
See also
GLM_GTC_packing
+
+i16vec2 unpackInt2x16(int p)
+ +
+
+ +

◆ packInt2x32()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL int64 glm::packInt2x32 (i32vec2 const & v)
+
+ +

Convert each component from an integer vector into a packed unsigned integer.

+
See also
GLM_GTC_packing
+
+i32vec2 unpackInt2x32(int p)
+ +
+
+ +

◆ packInt2x8()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL int16 glm::packInt2x8 (i8vec2 const & v)
+
+ +

Convert each component from an integer vector into a packed unsigned integer.

+
See also
GLM_GTC_packing
+
+i8vec2 unpackInt2x8(int16 p)
+ +
+
+ +

◆ packInt4x16()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL int64 glm::packInt4x16 (i16vec4 const & v)
+
+ +

Convert each component from an integer vector into a packed unsigned integer.

+
See also
GLM_GTC_packing
+
+i16vec4 unpackInt4x16(int64 p)
+ +
+
+ +

◆ packInt4x8()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL int32 glm::packInt4x8 (i8vec4 const & v)
+
+ +

Convert each component from an integer vector into a packed unsigned integer.

+
See also
GLM_GTC_packing
+
+i8vec4 unpackInt4x8(int32 p)
+ +
+
+ +

◆ packRGBM()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<4, T, Q> glm::packRGBM (vec< 3, T, Q > const & rgb)
+
+ +

Returns an unsigned integer vector obtained by converting the components of a floating-point vector to the 16-bit floating-point representation found in the OpenGL Specification.

+

The first vector component specifies the 16 least-significant bits of the result; the forth component specifies the 16 most-significant bits.

+
See also
GLM_GTC_packing
+
+vec<3, T, Q> unpackRGBM(vec<4, T, Q> const& p)
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ packSnorm()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, intType, Q> glm::packSnorm (vec< L, floatType, Q > const & v)
+
+ +

Convert each component of the normalized floating-point vector into signed integer values.

+
See also
GLM_GTC_packing
+
+vec<L, floatType, Q> unpackSnorm(vec<L, intType, Q> const& p);
+ +
+
+ +

◆ packSnorm1x16()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint16 glm::packSnorm1x16 (float v)
+
+ +

First, converts the normalized floating-point value v into 16-bit integer value.

+

Then, the results are packed into the returned 16-bit unsigned integer.

+

The conversion to fixed point is done as follows: packSnorm1x8: round(clamp(s, -1, +1) * 32767.0)

+
See also
GLM_GTC_packing
+
+uint32 packSnorm2x16(vec2 const& v)
+
+uint64 packSnorm4x16(vec4 const& v)
+
+GLSL packSnorm4x8 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ packSnorm1x8()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint8 glm::packSnorm1x8 (float s)
+
+ +

First, converts the normalized floating-point value v into 8-bit integer value.

+

Then, the results are packed into the returned 8-bit unsigned integer.

+

The conversion to fixed point is done as follows: packSnorm1x8: round(clamp(s, -1, +1) * 127.0)

+
See also
GLM_GTC_packing
+
+uint16 packSnorm2x8(vec2 const& v)
+
+uint32 packSnorm4x8(vec4 const& v)
+
+GLSL packSnorm4x8 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ packSnorm2x8()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint16 glm::packSnorm2x8 (vec2 const & v)
+
+ +

First, converts each component of the normalized floating-point value v into 8-bit integer values.

+

Then, the results are packed into the returned 16-bit unsigned integer.

+

The conversion for component c of v to fixed point is done as follows: packSnorm2x8: round(clamp(c, -1, +1) * 127.0)

+

The first component of the vector will be written to the least significant bits of the output; the last component will be written to the most significant bits.

+
See also
GLM_GTC_packing
+
+uint8 packSnorm1x8(float const& v)
+
+uint32 packSnorm4x8(vec4 const& v)
+
+GLSL packSnorm4x8 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ packSnorm3x10_1x2()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint32 glm::packSnorm3x10_1x2 (vec4 const & v)
+
+ +

First, converts the first three components of the normalized floating-point value v into 10-bit signed integer values.

+

Then, converts the forth component of the normalized floating-point value v into 2-bit signed integer values. Then, the results are packed into the returned 32-bit unsigned integer.

+

The conversion for component c of v to fixed point is done as follows: packSnorm3x10_1x2(xyz): round(clamp(c, -1, +1) * 511.0) packSnorm3x10_1x2(w): round(clamp(c, -1, +1) * 1.0)

+

The first vector component specifies the 10 least-significant bits of the result; the forth component specifies the 2 most-significant bits.

+
See also
GLM_GTC_packing
+
+vec4 unpackSnorm3x10_1x2(uint32 const& p)
+
+uint32 packUnorm3x10_1x2(vec4 const& v)
+
+uint32 packU3x10_1x2(uvec4 const& v)
+
+uint32 packI3x10_1x2(ivec4 const& v)
+ +
+
+ +

◆ packSnorm4x16()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint64 glm::packSnorm4x16 (vec4 const & v)
+
+ +

First, converts each component of the normalized floating-point value v into 16-bit integer values.

+

Then, the results are packed into the returned 64-bit unsigned integer.

+

The conversion for component c of v to fixed point is done as follows: packSnorm2x8: round(clamp(c, -1, +1) * 32767.0)

+

The first component of the vector will be written to the least significant bits of the output; the last component will be written to the most significant bits.

+
See also
GLM_GTC_packing
+
+uint16 packSnorm1x16(float const& v)
+
+uint32 packSnorm2x16(vec2 const& v)
+
+GLSL packSnorm4x8 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ packU3x10_1x2()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint32 glm::packU3x10_1x2 (uvec4 const & v)
+
+ +

Returns an unsigned integer obtained by converting the components of a four-component unsigned integer vector to the 10-10-10-2-bit unsigned integer representation found in the OpenGL Specification, and then packing these four values into a 32-bit unsigned integer.

+

The first vector component specifies the 10 least-significant bits of the result; the forth component specifies the 2 most-significant bits.

+
See also
GLM_GTC_packing
+
+uint32 packI3x10_1x2(ivec4 const& v)
+
+uint32 packSnorm3x10_1x2(vec4 const& v)
+
+uint32 packUnorm3x10_1x2(vec4 const& v)
+
+ivec4 unpackU3x10_1x2(uint32 const& p)
+ +
+
+ +

◆ packUint2x16()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint glm::packUint2x16 (u16vec2 const & v)
+
+ +

Convert each component from an integer vector into a packed unsigned integer.

+
See also
GLM_GTC_packing
+
+u16vec2 unpackUint2x16(uint p)
+ +
+
+ +

◆ packUint2x32()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint64 glm::packUint2x32 (u32vec2 const & v)
+
+ +

Convert each component from an integer vector into a packed unsigned integer.

+
See also
GLM_GTC_packing
+
+u32vec2 unpackUint2x32(int p)
+ +
+
+ +

◆ packUint2x8()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint16 glm::packUint2x8 (u8vec2 const & v)
+
+ +

Convert each component from an integer vector into a packed unsigned integer.

+
See also
GLM_GTC_packing
+
+u8vec2 unpackInt2x8(uint16 p)
+ +
+
+ +

◆ packUint4x16()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint64 glm::packUint4x16 (u16vec4 const & v)
+
+ +

Convert each component from an integer vector into a packed unsigned integer.

+
See also
GLM_GTC_packing
+
+u16vec4 unpackUint4x16(uint64 p)
+ +
+
+ +

◆ packUint4x8()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint32 glm::packUint4x8 (u8vec4 const & v)
+
+ +

Convert each component from an integer vector into a packed unsigned integer.

+
See also
GLM_GTC_packing
+
+u8vec4 unpackUint4x8(uint32 p)
+ +
+
+ +

◆ packUnorm()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, uintType, Q> glm::packUnorm (vec< L, floatType, Q > const & v)
+
+ +

Convert each component of the normalized floating-point vector into unsigned integer values.

+
See also
GLM_GTC_packing
+
+vec<L, floatType, Q> unpackUnorm(vec<L, intType, Q> const& p);
+ +
+
+ +

◆ packUnorm1x16()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint16 glm::packUnorm1x16 (float v)
+
+ +

First, converts the normalized floating-point value v into a 16-bit integer value.

+

Then, the results are packed into the returned 16-bit unsigned integer.

+

The conversion for component c of v to fixed point is done as follows: packUnorm1x16: round(clamp(c, 0, +1) * 65535.0)

+
See also
GLM_GTC_packing
+
+uint16 packSnorm1x16(float const& v)
+
+uint64 packSnorm4x16(vec4 const& v)
+
+GLSL packUnorm4x8 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ packUnorm1x5_1x6_1x5()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint16 glm::packUnorm1x5_1x6_1x5 (vec3 const & v)
+
+ +

Convert each component of the normalized floating-point vector into unsigned integer values.

+
See also
GLM_GTC_packing
+
+vec3 unpackUnorm1x5_1x6_1x5(uint16 p)
+ +
+
+ +

◆ packUnorm1x8()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint8 glm::packUnorm1x8 (float v)
+
+ +

First, converts the normalized floating-point value v into a 8-bit integer value.

+

Then, the results are packed into the returned 8-bit unsigned integer.

+

The conversion for component c of v to fixed point is done as follows: packUnorm1x8: round(clamp(c, 0, +1) * 255.0)

+
See also
GLM_GTC_packing
+
+uint16 packUnorm2x8(vec2 const& v)
+
+uint32 packUnorm4x8(vec4 const& v)
+
+GLSL packUnorm4x8 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ packUnorm2x3_1x2()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint8 glm::packUnorm2x3_1x2 (vec3 const & v)
+
+ +

Convert each component of the normalized floating-point vector into unsigned integer values.

+
See also
GLM_GTC_packing
+
+vec3 unpackUnorm2x3_1x2(uint8 p)
+ +
+
+ +

◆ packUnorm2x4()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint8 glm::packUnorm2x4 (vec2 const & v)
+
+ +

Convert each component of the normalized floating-point vector into unsigned integer values.

+
See also
GLM_GTC_packing
+
+vec2 unpackUnorm2x4(uint8 p)
+ +
+
+ +

◆ packUnorm2x8()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint16 glm::packUnorm2x8 (vec2 const & v)
+
+ +

First, converts each component of the normalized floating-point value v into 8-bit integer values.

+

Then, the results are packed into the returned 16-bit unsigned integer.

+

The conversion for component c of v to fixed point is done as follows: packUnorm2x8: round(clamp(c, 0, +1) * 255.0)

+

The first component of the vector will be written to the least significant bits of the output; the last component will be written to the most significant bits.

+
See also
GLM_GTC_packing
+
+uint8 packUnorm1x8(float const& v)
+
+uint32 packUnorm4x8(vec4 const& v)
+
+GLSL packUnorm4x8 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ packUnorm3x10_1x2()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint32 glm::packUnorm3x10_1x2 (vec4 const & v)
+
+ +

First, converts the first three components of the normalized floating-point value v into 10-bit unsigned integer values.

+

Then, converts the forth component of the normalized floating-point value v into 2-bit signed uninteger values. Then, the results are packed into the returned 32-bit unsigned integer.

+

The conversion for component c of v to fixed point is done as follows: packUnorm3x10_1x2(xyz): round(clamp(c, 0, +1) * 1023.0) packUnorm3x10_1x2(w): round(clamp(c, 0, +1) * 3.0)

+

The first vector component specifies the 10 least-significant bits of the result; the forth component specifies the 2 most-significant bits.

+
See also
GLM_GTC_packing
+
+vec4 unpackUnorm3x10_1x2(uint32 const& p)
+
+uint32 packUnorm3x10_1x2(vec4 const& v)
+
+uint32 packU3x10_1x2(uvec4 const& v)
+
+uint32 packI3x10_1x2(ivec4 const& v)
+ +
+
+ +

◆ packUnorm3x5_1x1()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint16 glm::packUnorm3x5_1x1 (vec4 const & v)
+
+ +

Convert each component of the normalized floating-point vector into unsigned integer values.

+
See also
GLM_GTC_packing
+
+vec4 unpackUnorm3x5_1x1(uint16 p)
+ +
+
+ +

◆ packUnorm4x16()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint64 glm::packUnorm4x16 (vec4 const & v)
+
+ +

First, converts each component of the normalized floating-point value v into 16-bit integer values.

+

Then, the results are packed into the returned 64-bit unsigned integer.

+

The conversion for component c of v to fixed point is done as follows: packUnorm4x16: round(clamp(c, 0, +1) * 65535.0)

+

The first component of the vector will be written to the least significant bits of the output; the last component will be written to the most significant bits.

+
See also
GLM_GTC_packing
+
+uint16 packUnorm1x16(float const& v)
+
+uint32 packUnorm2x16(vec2 const& v)
+
+GLSL packUnorm4x8 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ packUnorm4x4()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint16 glm::packUnorm4x4 (vec4 const & v)
+
+ +

Convert each component of the normalized floating-point vector into unsigned integer values.

+
See also
GLM_GTC_packing
+
+vec4 unpackUnorm4x4(uint16 p)
+ +
+
+ +

◆ unpackF2x11_1x10()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec3 glm::unpackF2x11_1x10 (uint32 p)
+
+ +

First, unpacks a single 32-bit unsigned integer p into two 11-bit signless floating-point values and one 10-bit signless floating-point value .

+

Then, each component is converted to a normalized floating-point value to generate the returned three-component vector.

+

The first component of the returned vector will be extracted from the least significant bits of the input; the last component will be extracted from the most significant bits.

+
See also
GLM_GTC_packing
+
+uint32 packF2x11_1x10(vec3 const& v)
+ +
+
+ +

◆ unpackF3x9_E1x5()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec3 glm::unpackF3x9_E1x5 (uint32 p)
+
+ +

First, unpacks a single 32-bit unsigned integer p into two 11-bit signless floating-point values and one 10-bit signless floating-point value .

+

Then, each component is converted to a normalized floating-point value to generate the returned three-component vector.

+

The first component of the returned vector will be extracted from the least significant bits of the input; the last component will be extracted from the most significant bits.

+

unpackF3x9_E1x5 allows decoding RGBE / RGB9E5 data

+
See also
GLM_GTC_packing
+
+uint32 packF3x9_E1x5(vec3 const& v)
+ +
+
+ +

◆ unpackHalf()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, float, Q> glm::unpackHalf (vec< L, uint16, Q > const & p)
+
+ +

Returns a floating-point vector with components obtained by reinterpreting an integer vector as 16-bit floating-point numbers and converting them to 32-bit floating-point values.

+

The first component of the vector is obtained from the 16 least-significant bits of v; the forth component is obtained from the 16 most-significant bits of v.

+
See also
GLM_GTC_packing
+
+vec<L, uint16, Q> packHalf(vec<L, float, Q> const& v)
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ unpackHalf1x16()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL float glm::unpackHalf1x16 (uint16 v)
+
+ +

Returns a floating-point scalar with components obtained by unpacking a 16-bit unsigned integer into a 16-bit value, interpreted as a 16-bit floating-point number according to the OpenGL Specification, and converting it to 32-bit floating-point values.

+
See also
GLM_GTC_packing
+
+vec2 unpackHalf2x16(uint32 const& v)
+
+vec4 unpackHalf4x16(uint64 const& v)
+
+GLSL unpackHalf2x16 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ unpackHalf4x16()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec4 glm::unpackHalf4x16 (uint64 p)
+
+ +

Returns a four-component floating-point vector with components obtained by unpacking a 64-bit unsigned integer into four 16-bit values, interpreting those values as 16-bit floating-point numbers according to the OpenGL Specification, and converting them to 32-bit floating-point values.

+

The first component of the vector is obtained from the 16 least-significant bits of v; the forth component is obtained from the 16 most-significant bits of v.

+
See also
GLM_GTC_packing
+
+float unpackHalf1x16(uint16 const& v)
+
+vec2 unpackHalf2x16(uint32 const& v)
+
+GLSL unpackHalf2x16 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ unpackI3x10_1x2()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL ivec4 glm::unpackI3x10_1x2 (uint32 p)
+
+ +

Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit signed integers.

+

The first component of the returned vector will be extracted from the least significant bits of the input; the last component will be extracted from the most significant bits.

+
See also
GLM_GTC_packing
+
+uint32 packU3x10_1x2(uvec4 const& v)
+
+vec4 unpackSnorm3x10_1x2(uint32 const& p);
+
+uvec4 unpackI3x10_1x2(uint32 const& p);
+ +
+
+ +

◆ unpackInt2x16()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL i16vec2 glm::unpackInt2x16 (int p)
+
+ +

Convert a packed integer into an integer vector.

+
See also
GLM_GTC_packing
+
+int packInt2x16(i16vec2 const& v)
+ +
+
+ +

◆ unpackInt2x32()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL i32vec2 glm::unpackInt2x32 (int64 p)
+
+ +

Convert a packed integer into an integer vector.

+
See also
GLM_GTC_packing
+
+int packInt2x16(i32vec2 const& v)
+ +
+
+ +

◆ unpackInt2x8()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL i8vec2 glm::unpackInt2x8 (int16 p)
+
+ +

Convert a packed integer into an integer vector.

+
See also
GLM_GTC_packing
+
+int16 packInt2x8(i8vec2 const& v)
+ +
+
+ +

◆ unpackInt4x16()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL i16vec4 glm::unpackInt4x16 (int64 p)
+
+ +

Convert a packed integer into an integer vector.

+
See also
GLM_GTC_packing
+
+int64 packInt4x16(i16vec4 const& v)
+ +
+
+ +

◆ unpackInt4x8()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL i8vec4 glm::unpackInt4x8 (int32 p)
+
+ +

Convert a packed integer into an integer vector.

+
See also
GLM_GTC_packing
+
+int32 packInt2x8(i8vec4 const& v)
+ +
+
+ +

◆ unpackRGBM()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::unpackRGBM (vec< 4, T, Q > const & rgbm)
+
+ +

Returns a floating-point vector with components obtained by reinterpreting an integer vector as 16-bit floating-point numbers and converting them to 32-bit floating-point values.

+

The first component of the vector is obtained from the 16 least-significant bits of v; the forth component is obtained from the 16 most-significant bits of v.

+
See also
GLM_GTC_packing
+
+vec<4, T, Q> packRGBM(vec<3, float, Q> const& v)
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ unpackSnorm()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, floatType, Q> glm::unpackSnorm (vec< L, intType, Q > const & v)
+
+ +

Convert a packed integer to a normalized floating-point vector.

+
See also
GLM_GTC_packing
+
+vec<L, intType, Q> packSnorm(vec<L, floatType, Q> const& v)
+ +
+
+ +

◆ unpackSnorm1x16()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL float glm::unpackSnorm1x16 (uint16 p)
+
+ +

First, unpacks a single 16-bit unsigned integer p into a single 16-bit signed integers.

+

Then, each component is converted to a normalized floating-point value to generate the returned scalar.

+

The conversion for unpacked fixed-point value f to floating point is done as follows: unpackSnorm1x16: clamp(f / 32767.0, -1, +1)

+
See also
GLM_GTC_packing
+
+vec2 unpackSnorm2x16(uint32 p)
+
+vec4 unpackSnorm4x16(uint64 p)
+
+GLSL unpackSnorm4x8 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ unpackSnorm1x8()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL float glm::unpackSnorm1x8 (uint8 p)
+
+ +

First, unpacks a single 8-bit unsigned integer p into a single 8-bit signed integers.

+

Then, the value is converted to a normalized floating-point value to generate the returned scalar.

+

The conversion for unpacked fixed-point value f to floating point is done as follows: unpackSnorm1x8: clamp(f / 127.0, -1, +1)

+
See also
GLM_GTC_packing
+
+vec2 unpackSnorm2x8(uint16 p)
+
+vec4 unpackSnorm4x8(uint32 p)
+
+GLSL unpackSnorm4x8 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ unpackSnorm2x8()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec2 glm::unpackSnorm2x8 (uint16 p)
+
+ +

First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit signed integers.

+

Then, each component is converted to a normalized floating-point value to generate the returned two-component vector.

+

The conversion for unpacked fixed-point value f to floating point is done as follows: unpackSnorm2x8: clamp(f / 127.0, -1, +1)

+

The first component of the returned vector will be extracted from the least significant bits of the input; the last component will be extracted from the most significant bits.

+
See also
GLM_GTC_packing
+
+float unpackSnorm1x8(uint8 p)
+
+vec4 unpackSnorm4x8(uint32 p)
+
+GLSL unpackSnorm4x8 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ unpackSnorm3x10_1x2()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec4 glm::unpackSnorm3x10_1x2 (uint32 p)
+
+ +

First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers.

+

Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.

+

The conversion for unpacked fixed-point value f to floating point is done as follows: unpackSnorm3x10_1x2(xyz): clamp(f / 511.0, -1, +1) unpackSnorm3x10_1x2(w): clamp(f / 511.0, -1, +1)

+

The first component of the returned vector will be extracted from the least significant bits of the input; the last component will be extracted from the most significant bits.

+
See also
GLM_GTC_packing
+
+uint32 packSnorm3x10_1x2(vec4 const& v)
+
+vec4 unpackUnorm3x10_1x2(uint32 const& p))
+
+uvec4 unpackI3x10_1x2(uint32 const& p)
+
+uvec4 unpackU3x10_1x2(uint32 const& p)
+ +
+
+ +

◆ unpackSnorm4x16()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec4 glm::unpackSnorm4x16 (uint64 p)
+
+ +

First, unpacks a single 64-bit unsigned integer p into four 16-bit signed integers.

+

Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.

+

The conversion for unpacked fixed-point value f to floating point is done as follows: unpackSnorm4x16: clamp(f / 32767.0, -1, +1)

+

The first component of the returned vector will be extracted from the least significant bits of the input; the last component will be extracted from the most significant bits.

+
See also
GLM_GTC_packing
+
+float unpackSnorm1x16(uint16 p)
+
+vec2 unpackSnorm2x16(uint32 p)
+
+GLSL unpackSnorm4x8 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ unpackU3x10_1x2()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uvec4 glm::unpackU3x10_1x2 (uint32 p)
+
+ +

Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit unsigned integers.

+

The first component of the returned vector will be extracted from the least significant bits of the input; the last component will be extracted from the most significant bits.

+
See also
GLM_GTC_packing
+
+uint32 packU3x10_1x2(uvec4 const& v)
+
+vec4 unpackSnorm3x10_1x2(uint32 const& p);
+
+uvec4 unpackI3x10_1x2(uint32 const& p);
+ +
+
+ +

◆ unpackUint2x16()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL u16vec2 glm::unpackUint2x16 (uint p)
+
+ +

Convert a packed integer into an integer vector.

+
See also
GLM_GTC_packing
+
+uint packUint2x16(u16vec2 const& v)
+ +
+
+ +

◆ unpackUint2x32()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL u32vec2 glm::unpackUint2x32 (uint64 p)
+
+ +

Convert a packed integer into an integer vector.

+
See also
GLM_GTC_packing
+
+int packUint2x16(u32vec2 const& v)
+ +
+
+ +

◆ unpackUint2x8()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL u8vec2 glm::unpackUint2x8 (uint16 p)
+
+ +

Convert a packed integer into an integer vector.

+
See also
GLM_GTC_packing
+
+uint16 packInt2x8(u8vec2 const& v)
+ +
+
+ +

◆ unpackUint4x16()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL u16vec4 glm::unpackUint4x16 (uint64 p)
+
+ +

Convert a packed integer into an integer vector.

+
See also
GLM_GTC_packing
+
+uint64 packUint4x16(u16vec4 const& v)
+ +
+
+ +

◆ unpackUint4x8()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL u8vec4 glm::unpackUint4x8 (uint32 p)
+
+ +

Convert a packed integer into an integer vector.

+
See also
GLM_GTC_packing
+
+uint32 packUint4x8(u8vec2 const& v)
+ +
+
+ +

◆ unpackUnorm()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, floatType, Q> glm::unpackUnorm (vec< L, uintType, Q > const & v)
+
+ +

Convert a packed integer to a normalized floating-point vector.

+
See also
GLM_GTC_packing
+
+vec<L, intType, Q> packUnorm(vec<L, floatType, Q> const& v)
+ +
+
+ +

◆ unpackUnorm1x16()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL float glm::unpackUnorm1x16 (uint16 p)
+
+ +

First, unpacks a single 16-bit unsigned integer p into a of 16-bit unsigned integers.

+

Then, the value is converted to a normalized floating-point value to generate the returned scalar.

+

The conversion for unpacked fixed-point value f to floating point is done as follows: unpackUnorm1x16: f / 65535.0

+
See also
GLM_GTC_packing
+
+vec2 unpackUnorm2x16(uint32 p)
+
+vec4 unpackUnorm4x16(uint64 p)
+
+GLSL unpackUnorm2x16 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ unpackUnorm1x5_1x6_1x5()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec3 glm::unpackUnorm1x5_1x6_1x5 (uint16 p)
+
+ +

Convert a packed integer to a normalized floating-point vector.

+
See also
GLM_GTC_packing
+
+uint16 packUnorm1x5_1x6_1x5(vec3 const& v)
+ +
+
+ +

◆ unpackUnorm1x8()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL float glm::unpackUnorm1x8 (uint8 p)
+
+ +

Convert a single 8-bit integer to a normalized floating-point value.

+

The conversion for unpacked fixed-point value f to floating point is done as follows: unpackUnorm4x8: f / 255.0

+
See also
GLM_GTC_packing
+
+vec2 unpackUnorm2x8(uint16 p)
+
+vec4 unpackUnorm4x8(uint32 p)
+
+GLSL unpackUnorm4x8 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ unpackUnorm2x3_1x2()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec3 glm::unpackUnorm2x3_1x2 (uint8 p)
+
+ +

Convert a packed integer to a normalized floating-point vector.

+
See also
GLM_GTC_packing
+
+uint8 packUnorm2x3_1x2(vec3 const& v)
+ +
+
+ +

◆ unpackUnorm2x4()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec2 glm::unpackUnorm2x4 (uint8 p)
+
+ +

Convert a packed integer to a normalized floating-point vector.

+
See also
GLM_GTC_packing
+
+uint8 packUnorm2x4(vec2 const& v)
+ +
+
+ +

◆ unpackUnorm2x8()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec2 glm::unpackUnorm2x8 (uint16 p)
+
+ +

First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit unsigned integers.

+

Then, each component is converted to a normalized floating-point value to generate the returned two-component vector.

+

The conversion for unpacked fixed-point value f to floating point is done as follows: unpackUnorm4x8: f / 255.0

+

The first component of the returned vector will be extracted from the least significant bits of the input; the last component will be extracted from the most significant bits.

+
See also
GLM_GTC_packing
+
+float unpackUnorm1x8(uint8 v)
+
+vec4 unpackUnorm4x8(uint32 p)
+
+GLSL unpackUnorm4x8 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ unpackUnorm3x10_1x2()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec4 glm::unpackUnorm3x10_1x2 (uint32 p)
+
+ +

First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers.

+

Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.

+

The conversion for unpacked fixed-point value f to floating point is done as follows: unpackSnorm3x10_1x2(xyz): clamp(f / 1023.0, 0, +1) unpackSnorm3x10_1x2(w): clamp(f / 3.0, 0, +1)

+

The first component of the returned vector will be extracted from the least significant bits of the input; the last component will be extracted from the most significant bits.

+
See also
GLM_GTC_packing
+
+uint32 packSnorm3x10_1x2(vec4 const& v)
+
+vec4 unpackInorm3x10_1x2(uint32 const& p))
+
+uvec4 unpackI3x10_1x2(uint32 const& p)
+
+uvec4 unpackU3x10_1x2(uint32 const& p)
+ +
+
+ +

◆ unpackUnorm3x5_1x1()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec4 glm::unpackUnorm3x5_1x1 (uint16 p)
+
+ +

Convert a packed integer to a normalized floating-point vector.

+
See also
GLM_GTC_packing
+
+uint16 packUnorm3x5_1x1(vec4 const& v)
+ +
+
+ +

◆ unpackUnorm4x16()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec4 glm::unpackUnorm4x16 (uint64 p)
+
+ +

First, unpacks a single 64-bit unsigned integer p into four 16-bit unsigned integers.

+

Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.

+

The conversion for unpacked fixed-point value f to floating point is done as follows: unpackUnormx4x16: f / 65535.0

+

The first component of the returned vector will be extracted from the least significant bits of the input; the last component will be extracted from the most significant bits.

+
See also
GLM_GTC_packing
+
+float unpackUnorm1x16(uint16 p)
+
+vec2 unpackUnorm2x16(uint32 p)
+
+GLSL unpackUnorm2x16 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ unpackUnorm4x4()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec4 glm::unpackUnorm4x4 (uint16 p)
+
+ +

Convert a packed integer to a normalized floating-point vector.

+
See also
GLM_GTC_packing
+
+uint16 packUnorm4x4(vec4 const& v)
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00717.html b/common/glm/doc/api/a00717.html new file mode 100644 index 000000000..93321e62c --- /dev/null +++ b/common/glm/doc/api/a00717.html @@ -0,0 +1,311 @@ + + + + + + + +0.9.9 API documenation: GLM_GTC_random + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T >
GLM_FUNC_DECL vec< 3, T, defaultp > ballRand (T Radius)
 
template<typename T >
GLM_FUNC_DECL vec< 2, T, defaultp > circularRand (T Radius)
 
template<typename T >
GLM_FUNC_DECL vec< 2, T, defaultp > diskRand (T Radius)
 
template<typename genType >
GLM_FUNC_DECL genType gaussRand (genType Mean, genType Deviation)
 
template<typename genType >
GLM_FUNC_DECL genType linearRand (genType Min, genType Max)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > linearRand (vec< L, T, Q > const &Min, vec< L, T, Q > const &Max)
 
template<typename T >
GLM_FUNC_DECL vec< 3, T, defaultp > sphericalRand (T Radius)
 
+

Detailed Description

+

Include <glm/gtc/random.hpp> to use the features of this extension.

+

Generate random number from various distribution methods.

+

Function Documentation

+ +

◆ ballRand()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<3, T, defaultp> glm::ballRand (Radius)
+
+ +

Generate a random 3D vector which coordinates are regulary distributed within the volume of a ball of a given radius.

+
See also
GLM_GTC_random
+ +
+
+ +

◆ circularRand()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<2, T, defaultp> glm::circularRand (Radius)
+
+ +

Generate a random 2D vector which coordinates are regulary distributed on a circle of a given radius.

+
See also
GLM_GTC_random
+ +
+
+ +

◆ diskRand()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<2, T, defaultp> glm::diskRand (Radius)
+
+ +

Generate a random 2D vector which coordinates are regulary distributed within the area of a disk of a given radius.

+
See also
GLM_GTC_random
+ +
+
+ +

◆ gaussRand()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::gaussRand (genType Mean,
genType Deviation 
)
+
+ +

Generate random numbers in the interval [Min, Max], according a gaussian distribution.

+
See also
GLM_GTC_random
+ +
+
+ +

◆ linearRand() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::linearRand (genType Min,
genType Max 
)
+
+ +

Generate random numbers in the interval [Min, Max], according a linear distribution.

+
Parameters
+ + + +
MinMinimum value included in the sampling
MaxMaximum value included in the sampling
+
+
+
Template Parameters
+ + +
genTypeValue type. Currently supported: float or double scalars.
+
+
+
See also
GLM_GTC_random
+ +
+
+ +

◆ linearRand() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::linearRand (vec< L, T, Q > const & Min,
vec< L, T, Q > const & Max 
)
+
+ +

Generate random numbers in the interval [Min, Max], according a linear distribution.

+
Parameters
+ + + +
MinMinimum value included in the sampling
MaxMaximum value included in the sampling
+
+
+
Template Parameters
+ + +
TValue type. Currently supported: float or double.
+
+
+
See also
GLM_GTC_random
+ +
+
+ +

◆ sphericalRand()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<3, T, defaultp> glm::sphericalRand (Radius)
+
+ +

Generate a random 3D vector which coordinates are regulary distributed on a sphere of a given radius.

+
See also
GLM_GTC_random
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00718.html b/common/glm/doc/api/a00718.html new file mode 100644 index 000000000..4ccaa8e61 --- /dev/null +++ b/common/glm/doc/api/a00718.html @@ -0,0 +1,456 @@ + + + + + + + +0.9.9 API documenation: GLM_GTC_reciprocal + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTC_reciprocal
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType acot (genType x)
 
template<typename genType >
GLM_FUNC_DECL genType acoth (genType x)
 
template<typename genType >
GLM_FUNC_DECL genType acsc (genType x)
 
template<typename genType >
GLM_FUNC_DECL genType acsch (genType x)
 
template<typename genType >
GLM_FUNC_DECL genType asec (genType x)
 
template<typename genType >
GLM_FUNC_DECL genType asech (genType x)
 
template<typename genType >
GLM_FUNC_DECL genType cot (genType angle)
 
template<typename genType >
GLM_FUNC_DECL genType coth (genType angle)
 
template<typename genType >
GLM_FUNC_DECL genType csc (genType angle)
 
template<typename genType >
GLM_FUNC_DECL genType csch (genType angle)
 
template<typename genType >
GLM_FUNC_DECL genType sec (genType angle)
 
template<typename genType >
GLM_FUNC_DECL genType sech (genType angle)
 
+

Detailed Description

+

Include <glm/gtc/reciprocal.hpp> to use the features of this extension.

+

Define secant, cosecant and cotangent functions.

+

Function Documentation

+ +

◆ acot()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::acot (genType x)
+
+ +

Inverse cotangent function.

+
Returns
Return an angle expressed in radians.
+
Template Parameters
+ + +
genTypeFloating-point scalar or vector types.
+
+
+
See also
GLM_GTC_reciprocal
+ +
+
+ +

◆ acoth()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::acoth (genType x)
+
+ +

Inverse cotangent hyperbolic function.

+
Returns
Return an angle expressed in radians.
+
Template Parameters
+ + +
genTypeFloating-point scalar or vector types.
+
+
+
See also
GLM_GTC_reciprocal
+ +
+
+ +

◆ acsc()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::acsc (genType x)
+
+ +

Inverse cosecant function.

+
Returns
Return an angle expressed in radians.
+
Template Parameters
+ + +
genTypeFloating-point scalar or vector types.
+
+
+
See also
GLM_GTC_reciprocal
+ +
+
+ +

◆ acsch()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::acsch (genType x)
+
+ +

Inverse cosecant hyperbolic function.

+
Returns
Return an angle expressed in radians.
+
Template Parameters
+ + +
genTypeFloating-point scalar or vector types.
+
+
+
See also
GLM_GTC_reciprocal
+ +
+
+ +

◆ asec()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::asec (genType x)
+
+ +

Inverse secant function.

+
Returns
Return an angle expressed in radians.
+
Template Parameters
+ + +
genTypeFloating-point scalar or vector types.
+
+
+
See also
GLM_GTC_reciprocal
+ +
+
+ +

◆ asech()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::asech (genType x)
+
+ +

Inverse secant hyperbolic function.

+
Returns
Return an angle expressed in radians.
+
Template Parameters
+ + +
genTypeFloating-point scalar or vector types.
+
+
+
See also
GLM_GTC_reciprocal
+ +
+
+ +

◆ cot()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::cot (genType angle)
+
+ +

Cotangent function.

+

adjacent / opposite or 1 / tan(x)

+
Template Parameters
+ + +
genTypeFloating-point scalar or vector types.
+
+
+
See also
GLM_GTC_reciprocal
+ +
+
+ +

◆ coth()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::coth (genType angle)
+
+ +

Cotangent hyperbolic function.

+
Template Parameters
+ + +
genTypeFloating-point scalar or vector types.
+
+
+
See also
GLM_GTC_reciprocal
+ +
+
+ +

◆ csc()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::csc (genType angle)
+
+ +

Cosecant function.

+

hypotenuse / opposite or 1 / sin(x)

+
Template Parameters
+ + +
genTypeFloating-point scalar or vector types.
+
+
+
See also
GLM_GTC_reciprocal
+ +
+
+ +

◆ csch()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::csch (genType angle)
+
+ +

Cosecant hyperbolic function.

+
Template Parameters
+ + +
genTypeFloating-point scalar or vector types.
+
+
+
See also
GLM_GTC_reciprocal
+ +
+
+ +

◆ sec()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::sec (genType angle)
+
+ +

Secant function.

+

hypotenuse / adjacent or 1 / cos(x)

+
Template Parameters
+ + +
genTypeFloating-point scalar or vector types.
+
+
+
See also
GLM_GTC_reciprocal
+ +
+
+ +

◆ sech()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::sech (genType angle)
+
+ +

Secant hyperbolic function.

+
Template Parameters
+ + +
genTypeFloating-point scalar or vector types.
+
+
+
See also
GLM_GTC_reciprocal
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00719.html b/common/glm/doc/api/a00719.html new file mode 100644 index 000000000..7f6a241b5 --- /dev/null +++ b/common/glm/doc/api/a00719.html @@ -0,0 +1,717 @@ + + + + + + + +0.9.9 API documenation: GLM_GTC_round + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType ceilMultiple (genType v, genType Multiple)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > ceilMultiple (vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
 
template<typename genIUType >
GLM_FUNC_DECL genIUType ceilPowerOfTwo (genIUType v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > ceilPowerOfTwo (vec< L, T, Q > const &v)
 
template<typename genType >
GLM_FUNC_DECL genType floorMultiple (genType v, genType Multiple)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > floorMultiple (vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
 
template<typename genIUType >
GLM_FUNC_DECL genIUType floorPowerOfTwo (genIUType v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > floorPowerOfTwo (vec< L, T, Q > const &v)
 
template<typename genIUType >
GLM_FUNC_DECL bool isMultiple (genIUType v, genIUType Multiple)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, bool, Q > isMultiple (vec< L, T, Q > const &v, T Multiple)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, bool, Q > isMultiple (vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
 
template<typename genIUType >
GLM_FUNC_DECL bool isPowerOfTwo (genIUType v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, bool, Q > isPowerOfTwo (vec< L, T, Q > const &v)
 
template<typename genType >
GLM_FUNC_DECL genType roundMultiple (genType v, genType Multiple)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > roundMultiple (vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
 
template<typename genIUType >
GLM_FUNC_DECL genIUType roundPowerOfTwo (genIUType v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > roundPowerOfTwo (vec< L, T, Q > const &v)
 
+

Detailed Description

+

Include <glm/gtc/round.hpp> to use the features of this extension.

+

Rounding value to specific boundings

+

Function Documentation

+ +

◆ ceilMultiple() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::ceilMultiple (genType v,
genType Multiple 
)
+
+ +

Higher multiple number of Source.

+
Template Parameters
+ + +
genTypeFloating-point or integer scalar or vector types.
+
+
+
Parameters
+ + + +
vSource value to which is applied the function
MultipleMust be a null or positive value
+
+
+
See also
GLM_GTC_round
+ +
+
+ +

◆ ceilMultiple() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::ceilMultiple (vec< L, T, Q > const & v,
vec< L, T, Q > const & Multiple 
)
+
+ +

Higher multiple number of Source.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+
Parameters
+ + + +
vSource values to which is applied the function
MultipleMust be a null or positive value
+
+
+
See also
GLM_GTC_round
+ +
+
+ +

◆ ceilPowerOfTwo() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genIUType glm::ceilPowerOfTwo (genIUType v)
+
+ +

Return the power of two number which value is just higher the input value, round up to a power of two.

+
See also
GLM_GTC_round
+ +
+
+ +

◆ ceilPowerOfTwo() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::ceilPowerOfTwo (vec< L, T, Q > const & v)
+
+ +

Return the power of two number which value is just higher the input value, round up to a power of two.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+
See also
GLM_GTC_round
+ +
+
+ +

◆ floorMultiple() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::floorMultiple (genType v,
genType Multiple 
)
+
+ +

Lower multiple number of Source.

+
Template Parameters
+ + +
genTypeFloating-point or integer scalar or vector types.
+
+
+
Parameters
+ + + +
vSource value to which is applied the function
MultipleMust be a null or positive value
+
+
+
See also
GLM_GTC_round
+ +
+
+ +

◆ floorMultiple() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::floorMultiple (vec< L, T, Q > const & v,
vec< L, T, Q > const & Multiple 
)
+
+ +

Lower multiple number of Source.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+
Parameters
+ + + +
vSource values to which is applied the function
MultipleMust be a null or positive value
+
+
+
See also
GLM_GTC_round
+ +
+
+ +

◆ floorPowerOfTwo() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genIUType glm::floorPowerOfTwo (genIUType v)
+
+ +

Return the power of two number which value is just lower the input value, round down to a power of two.

+
See also
GLM_GTC_round
+ +
+
+ +

◆ floorPowerOfTwo() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::floorPowerOfTwo (vec< L, T, Q > const & v)
+
+ +

Return the power of two number which value is just lower the input value, round down to a power of two.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+
See also
GLM_GTC_round
+ +
+
+ +

◆ isMultiple() [1/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL bool glm::isMultiple (genIUType v,
genIUType Multiple 
)
+
+ +

Return true if the 'Value' is a multiple of 'Multiple'.

+
See also
GLM_GTC_round
+ +
+
+ +

◆ isMultiple() [2/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, bool, Q> glm::isMultiple (vec< L, T, Q > const & v,
Multiple 
)
+
+ +

Return true if the 'Value' is a multiple of 'Multiple'.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+
See also
GLM_GTC_round
+ +
+
+ +

◆ isMultiple() [3/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, bool, Q> glm::isMultiple (vec< L, T, Q > const & v,
vec< L, T, Q > const & Multiple 
)
+
+ +

Return true if the 'Value' is a multiple of 'Multiple'.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+
See also
GLM_GTC_round
+ +
+
+ +

◆ isPowerOfTwo() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL bool glm::isPowerOfTwo (genIUType v)
+
+ +

Return true if the value is a power of two number.

+
See also
GLM_GTC_round
+ +
+
+ +

◆ isPowerOfTwo() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, bool, Q> glm::isPowerOfTwo (vec< L, T, Q > const & v)
+
+ +

Return true if the value is a power of two number.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+
See also
GLM_GTC_round
+ +
+
+ +

◆ roundMultiple() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::roundMultiple (genType v,
genType Multiple 
)
+
+ +

Lower multiple number of Source.

+
Template Parameters
+ + +
genTypeFloating-point or integer scalar or vector types.
+
+
+
Parameters
+ + + +
vSource value to which is applied the function
MultipleMust be a null or positive value
+
+
+
See also
GLM_GTC_round
+ +
+
+ +

◆ roundMultiple() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::roundMultiple (vec< L, T, Q > const & v,
vec< L, T, Q > const & Multiple 
)
+
+ +

Lower multiple number of Source.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+
Parameters
+ + + +
vSource values to which is applied the function
MultipleMust be a null or positive value
+
+
+
See also
GLM_GTC_round
+ +
+
+ +

◆ roundPowerOfTwo() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genIUType glm::roundPowerOfTwo (genIUType v)
+
+ +

Return the power of two number which value is the closet to the input value.

+
See also
GLM_GTC_round
+ +
+
+ +

◆ roundPowerOfTwo() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::roundPowerOfTwo (vec< L, T, Q > const & v)
+
+ +

Return the power of two number which value is the closet to the input value.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+
See also
GLM_GTC_round
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00720.html b/common/glm/doc/api/a00720.html new file mode 100644 index 000000000..22bfba8f0 --- /dev/null +++ b/common/glm/doc/api/a00720.html @@ -0,0 +1,1142 @@ + + + + + + + +0.9.9 API documenation: GLM_GTC_type_aligned + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTC_type_aligned
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Typedefs

+typedef aligned_highp_bvec1 aligned_bvec1
 
+typedef aligned_highp_bvec2 aligned_bvec2
 
+typedef aligned_highp_bvec3 aligned_bvec3
 
+typedef aligned_highp_bvec4 aligned_bvec4
 
+typedef aligned_highp_dmat2 aligned_dmat2
 
+typedef aligned_highp_dmat2x2 aligned_dmat2x2
 
+typedef aligned_highp_dmat2x3 aligned_dmat2x3
 
+typedef aligned_highp_dmat2x4 aligned_dmat2x4
 
+typedef aligned_highp_dmat3 aligned_dmat3
 
+typedef aligned_highp_dmat3x2 aligned_dmat3x2
 
+typedef aligned_highp_dmat3x3 aligned_dmat3x3
 
+typedef aligned_highp_dmat3x4 aligned_dmat3x4
 
+typedef aligned_highp_dmat4 aligned_dmat4
 
+typedef aligned_highp_dmat4x2 aligned_dmat4x2
 
+typedef aligned_highp_dmat4x3 aligned_dmat4x3
 
+typedef aligned_highp_dmat4x4 aligned_dmat4x4
 
+typedef aligned_highp_dvec1 aligned_dvec1
 
+typedef aligned_highp_dvec2 aligned_dvec2
 
+typedef aligned_highp_dvec3 aligned_dvec3
 
+typedef aligned_highp_dvec4 aligned_dvec4
 
+typedef vec< 1, bool, aligned_highp > aligned_highp_bvec1
 
+typedef vec< 2, bool, aligned_highp > aligned_highp_bvec2
 
+typedef vec< 3, bool, aligned_highp > aligned_highp_bvec3
 
+typedef vec< 4, bool, aligned_highp > aligned_highp_bvec4
 
+typedef mat< 2, 2, double, aligned_highp > aligned_highp_dmat2
 
+typedef mat< 2, 2, double, aligned_highp > aligned_highp_dmat2x2
 
+typedef mat< 2, 3, double, aligned_highp > aligned_highp_dmat2x3
 
+typedef mat< 2, 4, double, aligned_highp > aligned_highp_dmat2x4
 
+typedef mat< 3, 3, double, aligned_highp > aligned_highp_dmat3
 
+typedef mat< 3, 2, double, aligned_highp > aligned_highp_dmat3x2
 
+typedef mat< 3, 3, double, aligned_highp > aligned_highp_dmat3x3
 
+typedef mat< 3, 4, double, aligned_highp > aligned_highp_dmat3x4
 
+typedef mat< 4, 4, double, aligned_highp > aligned_highp_dmat4
 
+typedef mat< 4, 2, double, aligned_highp > aligned_highp_dmat4x2
 
+typedef mat< 4, 3, double, aligned_highp > aligned_highp_dmat4x3
 
+typedef mat< 4, 4, double, aligned_highp > aligned_highp_dmat4x4
 
+typedef vec< 1, double, aligned_highp > aligned_highp_dvec1
 
+typedef vec< 2, double, aligned_highp > aligned_highp_dvec2
 
+typedef vec< 3, double, aligned_highp > aligned_highp_dvec3
 
+typedef vec< 4, double, aligned_highp > aligned_highp_dvec4
 
+typedef vec< 1, int, aligned_highp > aligned_highp_ivec1
 
+typedef vec< 2, int, aligned_highp > aligned_highp_ivec2
 
+typedef vec< 3, int, aligned_highp > aligned_highp_ivec3
 
+typedef vec< 4, int, aligned_highp > aligned_highp_ivec4
 
+typedef mat< 2, 2, float, aligned_highp > aligned_highp_mat2
 
+typedef mat< 2, 2, float, aligned_highp > aligned_highp_mat2x2
 
+typedef mat< 2, 3, float, aligned_highp > aligned_highp_mat2x3
 
+typedef mat< 2, 4, float, aligned_highp > aligned_highp_mat2x4
 
+typedef mat< 3, 3, float, aligned_highp > aligned_highp_mat3
 
+typedef mat< 3, 2, float, aligned_highp > aligned_highp_mat3x2
 
+typedef mat< 3, 3, float, aligned_highp > aligned_highp_mat3x3
 
+typedef mat< 3, 4, float, aligned_highp > aligned_highp_mat3x4
 
+typedef mat< 4, 4, float, aligned_highp > aligned_highp_mat4
 
+typedef mat< 4, 2, float, aligned_highp > aligned_highp_mat4x2
 
+typedef mat< 4, 3, float, aligned_highp > aligned_highp_mat4x3
 
+typedef mat< 4, 4, float, aligned_highp > aligned_highp_mat4x4
 
+typedef vec< 1, uint, aligned_highp > aligned_highp_uvec1
 
+typedef vec< 2, uint, aligned_highp > aligned_highp_uvec2
 
+typedef vec< 3, uint, aligned_highp > aligned_highp_uvec3
 
+typedef vec< 4, uint, aligned_highp > aligned_highp_uvec4
 
+typedef vec< 1, float, aligned_highp > aligned_highp_vec1
 
+typedef vec< 2, float, aligned_highp > aligned_highp_vec2
 
+typedef vec< 3, float, aligned_highp > aligned_highp_vec3
 
+typedef vec< 4, float, aligned_highp > aligned_highp_vec4
 
+typedef aligned_highp_ivec1 aligned_ivec1
 
+typedef aligned_highp_ivec2 aligned_ivec2
 
+typedef aligned_highp_ivec3 aligned_ivec3
 
+typedef aligned_highp_ivec4 aligned_ivec4
 
+typedef vec< 1, bool, aligned_lowp > aligned_lowp_bvec1
 
+typedef vec< 2, bool, aligned_lowp > aligned_lowp_bvec2
 
+typedef vec< 3, bool, aligned_lowp > aligned_lowp_bvec3
 
+typedef vec< 4, bool, aligned_lowp > aligned_lowp_bvec4
 
+typedef mat< 2, 2, double, aligned_lowp > aligned_lowp_dmat2
 
+typedef mat< 2, 2, double, aligned_lowp > aligned_lowp_dmat2x2
 
+typedef mat< 2, 3, double, aligned_lowp > aligned_lowp_dmat2x3
 
+typedef mat< 2, 4, double, aligned_lowp > aligned_lowp_dmat2x4
 
+typedef mat< 3, 3, double, aligned_lowp > aligned_lowp_dmat3
 
+typedef mat< 3, 2, double, aligned_lowp > aligned_lowp_dmat3x2
 
+typedef mat< 3, 3, double, aligned_lowp > aligned_lowp_dmat3x3
 
+typedef mat< 3, 4, double, aligned_lowp > aligned_lowp_dmat3x4
 
+typedef mat< 4, 4, double, aligned_lowp > aligned_lowp_dmat4
 
+typedef mat< 4, 2, double, aligned_lowp > aligned_lowp_dmat4x2
 
+typedef mat< 4, 3, double, aligned_lowp > aligned_lowp_dmat4x3
 
+typedef mat< 4, 4, double, aligned_lowp > aligned_lowp_dmat4x4
 
+typedef vec< 1, double, aligned_lowp > aligned_lowp_dvec1
 
+typedef vec< 2, double, aligned_lowp > aligned_lowp_dvec2
 
+typedef vec< 3, double, aligned_lowp > aligned_lowp_dvec3
 
+typedef vec< 4, double, aligned_lowp > aligned_lowp_dvec4
 
+typedef vec< 1, int, aligned_lowp > aligned_lowp_ivec1
 
+typedef vec< 2, int, aligned_lowp > aligned_lowp_ivec2
 
+typedef vec< 3, int, aligned_lowp > aligned_lowp_ivec3
 
+typedef vec< 4, int, aligned_lowp > aligned_lowp_ivec4
 
+typedef mat< 2, 2, float, aligned_lowp > aligned_lowp_mat2
 
+typedef mat< 2, 2, float, aligned_lowp > aligned_lowp_mat2x2
 
+typedef mat< 2, 3, float, aligned_lowp > aligned_lowp_mat2x3
 
+typedef mat< 2, 4, float, aligned_lowp > aligned_lowp_mat2x4
 
+typedef mat< 3, 3, float, aligned_lowp > aligned_lowp_mat3
 
+typedef mat< 3, 2, float, aligned_lowp > aligned_lowp_mat3x2
 
+typedef mat< 3, 3, float, aligned_lowp > aligned_lowp_mat3x3
 
+typedef mat< 3, 4, float, aligned_lowp > aligned_lowp_mat3x4
 
+typedef mat< 4, 4, float, aligned_lowp > aligned_lowp_mat4
 
+typedef mat< 4, 2, float, aligned_lowp > aligned_lowp_mat4x2
 
+typedef mat< 4, 3, float, aligned_lowp > aligned_lowp_mat4x3
 
+typedef mat< 4, 4, float, aligned_lowp > aligned_lowp_mat4x4
 
+typedef vec< 1, uint, aligned_lowp > aligned_lowp_uvec1
 
+typedef vec< 2, uint, aligned_lowp > aligned_lowp_uvec2
 
+typedef vec< 3, uint, aligned_lowp > aligned_lowp_uvec3
 
+typedef vec< 4, uint, aligned_lowp > aligned_lowp_uvec4
 
+typedef vec< 1, float, aligned_lowp > aligned_lowp_vec1
 
+typedef vec< 2, float, aligned_lowp > aligned_lowp_vec2
 
+typedef vec< 3, float, aligned_lowp > aligned_lowp_vec3
 
+typedef vec< 4, float, aligned_lowp > aligned_lowp_vec4
 
+typedef aligned_highp_mat2 aligned_mat2
 
+typedef aligned_highp_mat2x2 aligned_mat2x2
 
+typedef aligned_highp_mat2x3 aligned_mat2x3
 
+typedef aligned_highp_mat2x4 aligned_mat2x4
 
+typedef aligned_highp_mat3 aligned_mat3
 
+typedef aligned_highp_mat3x2 aligned_mat3x2
 
+typedef aligned_highp_mat3x3 aligned_mat3x3
 
+typedef aligned_highp_mat3x4 aligned_mat3x4
 
+typedef aligned_highp_mat4 aligned_mat4
 
+typedef aligned_highp_mat4x2 aligned_mat4x2
 
+typedef aligned_highp_mat4x3 aligned_mat4x3
 
+typedef aligned_highp_mat4x4 aligned_mat4x4
 
+typedef vec< 1, bool, aligned_mediump > aligned_mediump_bvec1
 
+typedef vec< 2, bool, aligned_mediump > aligned_mediump_bvec2
 
+typedef vec< 3, bool, aligned_mediump > aligned_mediump_bvec3
 
+typedef vec< 4, bool, aligned_mediump > aligned_mediump_bvec4
 
+typedef mat< 2, 2, double, aligned_mediump > aligned_mediump_dmat2
 
+typedef mat< 2, 2, double, aligned_mediump > aligned_mediump_dmat2x2
 
+typedef mat< 2, 3, double, aligned_mediump > aligned_mediump_dmat2x3
 
+typedef mat< 2, 4, double, aligned_mediump > aligned_mediump_dmat2x4
 
+typedef mat< 3, 3, double, aligned_mediump > aligned_mediump_dmat3
 
+typedef mat< 3, 2, double, aligned_mediump > aligned_mediump_dmat3x2
 
+typedef mat< 3, 3, double, aligned_mediump > aligned_mediump_dmat3x3
 
+typedef mat< 3, 4, double, aligned_mediump > aligned_mediump_dmat3x4
 
+typedef mat< 4, 4, double, aligned_mediump > aligned_mediump_dmat4
 
+typedef mat< 4, 2, double, aligned_mediump > aligned_mediump_dmat4x2
 
+typedef mat< 4, 3, double, aligned_mediump > aligned_mediump_dmat4x3
 
+typedef mat< 4, 4, double, aligned_mediump > aligned_mediump_dmat4x4
 
+typedef vec< 1, double, aligned_mediump > aligned_mediump_dvec1
 
+typedef vec< 2, double, aligned_mediump > aligned_mediump_dvec2
 
+typedef vec< 3, double, aligned_mediump > aligned_mediump_dvec3
 
+typedef vec< 4, double, aligned_mediump > aligned_mediump_dvec4
 
+typedef vec< 1, int, aligned_mediump > aligned_mediump_ivec1
 
+typedef vec< 2, int, aligned_mediump > aligned_mediump_ivec2
 
+typedef vec< 3, int, aligned_mediump > aligned_mediump_ivec3
 
+typedef vec< 4, int, aligned_mediump > aligned_mediump_ivec4
 
+typedef mat< 2, 2, float, aligned_mediump > aligned_mediump_mat2
 
+typedef mat< 2, 2, float, aligned_mediump > aligned_mediump_mat2x2
 
+typedef mat< 2, 3, float, aligned_mediump > aligned_mediump_mat2x3
 
+typedef mat< 2, 4, float, aligned_mediump > aligned_mediump_mat2x4
 
+typedef mat< 3, 3, float, aligned_mediump > aligned_mediump_mat3
 
+typedef mat< 3, 2, float, aligned_mediump > aligned_mediump_mat3x2
 
+typedef mat< 3, 3, float, aligned_mediump > aligned_mediump_mat3x3
 
+typedef mat< 3, 4, float, aligned_mediump > aligned_mediump_mat3x4
 
+typedef mat< 4, 4, float, aligned_mediump > aligned_mediump_mat4
 
+typedef mat< 4, 2, float, aligned_mediump > aligned_mediump_mat4x2
 
+typedef mat< 4, 3, float, aligned_mediump > aligned_mediump_mat4x3
 
+typedef mat< 4, 4, float, aligned_mediump > aligned_mediump_mat4x4
 
+typedef vec< 1, uint, aligned_mediump > aligned_mediump_uvec1
 
+typedef vec< 2, uint, aligned_mediump > aligned_mediump_uvec2
 
+typedef vec< 3, uint, aligned_mediump > aligned_mediump_uvec3
 
+typedef vec< 4, uint, aligned_mediump > aligned_mediump_uvec4
 
+typedef vec< 1, float, aligned_mediump > aligned_mediump_vec1
 
+typedef vec< 2, float, aligned_mediump > aligned_mediump_vec2
 
+typedef vec< 3, float, aligned_mediump > aligned_mediump_vec3
 
+typedef vec< 4, float, aligned_mediump > aligned_mediump_vec4
 
+typedef aligned_highp_uvec1 aligned_uvec1
 
+typedef aligned_highp_uvec2 aligned_uvec2
 
+typedef aligned_highp_uvec3 aligned_uvec3
 
+typedef aligned_highp_uvec4 aligned_uvec4
 
+typedef aligned_highp_vec1 aligned_vec1
 
+typedef aligned_highp_vec2 aligned_vec2
 
+typedef aligned_highp_vec3 aligned_vec3
 
+typedef aligned_highp_vec4 aligned_vec4
 
+typedef packed_highp_bvec1 packed_bvec1
 
+typedef packed_highp_bvec2 packed_bvec2
 
+typedef packed_highp_bvec3 packed_bvec3
 
+typedef packed_highp_bvec4 packed_bvec4
 
+typedef packed_highp_dmat2 packed_dmat2
 
+typedef packed_highp_dmat2x2 packed_dmat2x2
 
+typedef packed_highp_dmat2x3 packed_dmat2x3
 
+typedef packed_highp_dmat2x4 packed_dmat2x4
 
+typedef packed_highp_dmat3 packed_dmat3
 
+typedef packed_highp_dmat3x2 packed_dmat3x2
 
+typedef packed_highp_dmat3x3 packed_dmat3x3
 
+typedef packed_highp_dmat3x4 packed_dmat3x4
 
+typedef packed_highp_dmat4 packed_dmat4
 
+typedef packed_highp_dmat4x2 packed_dmat4x2
 
+typedef packed_highp_dmat4x3 packed_dmat4x3
 
+typedef packed_highp_dmat4x4 packed_dmat4x4
 
+typedef packed_highp_dvec1 packed_dvec1
 
+typedef packed_highp_dvec2 packed_dvec2
 
+typedef packed_highp_dvec3 packed_dvec3
 
+typedef packed_highp_dvec4 packed_dvec4
 
+typedef vec< 1, bool, packed_highp > packed_highp_bvec1
 
+typedef vec< 2, bool, packed_highp > packed_highp_bvec2
 
+typedef vec< 3, bool, packed_highp > packed_highp_bvec3
 
+typedef vec< 4, bool, packed_highp > packed_highp_bvec4
 
+typedef mat< 2, 2, double, packed_highp > packed_highp_dmat2
 
+typedef mat< 2, 2, double, packed_highp > packed_highp_dmat2x2
 
+typedef mat< 2, 3, double, packed_highp > packed_highp_dmat2x3
 
+typedef mat< 2, 4, double, packed_highp > packed_highp_dmat2x4
 
+typedef mat< 3, 3, double, packed_highp > packed_highp_dmat3
 
+typedef mat< 3, 2, double, packed_highp > packed_highp_dmat3x2
 
+typedef mat< 3, 3, double, packed_highp > packed_highp_dmat3x3
 
+typedef mat< 3, 4, double, packed_highp > packed_highp_dmat3x4
 
+typedef mat< 4, 4, double, packed_highp > packed_highp_dmat4
 
+typedef mat< 4, 2, double, packed_highp > packed_highp_dmat4x2
 
+typedef mat< 4, 3, double, packed_highp > packed_highp_dmat4x3
 
+typedef mat< 4, 4, double, packed_highp > packed_highp_dmat4x4
 
+typedef vec< 1, double, packed_highp > packed_highp_dvec1
 
+typedef vec< 2, double, packed_highp > packed_highp_dvec2
 
+typedef vec< 3, double, packed_highp > packed_highp_dvec3
 
+typedef vec< 4, double, packed_highp > packed_highp_dvec4
 
+typedef vec< 1, int, packed_highp > packed_highp_ivec1
 
+typedef vec< 2, int, packed_highp > packed_highp_ivec2
 
+typedef vec< 3, int, packed_highp > packed_highp_ivec3
 
+typedef vec< 4, int, packed_highp > packed_highp_ivec4
 
+typedef mat< 2, 2, float, packed_highp > packed_highp_mat2
 
+typedef mat< 2, 2, float, packed_highp > packed_highp_mat2x2
 
+typedef mat< 2, 3, float, packed_highp > packed_highp_mat2x3
 
+typedef mat< 2, 4, float, packed_highp > packed_highp_mat2x4
 
+typedef mat< 3, 3, float, packed_highp > packed_highp_mat3
 
+typedef mat< 3, 2, float, packed_highp > packed_highp_mat3x2
 
+typedef mat< 3, 3, float, packed_highp > packed_highp_mat3x3
 
+typedef mat< 3, 4, float, packed_highp > packed_highp_mat3x4
 
+typedef mat< 4, 4, float, packed_highp > packed_highp_mat4
 
+typedef mat< 4, 2, float, packed_highp > packed_highp_mat4x2
 
+typedef mat< 4, 3, float, packed_highp > packed_highp_mat4x3
 
+typedef mat< 4, 4, float, packed_highp > packed_highp_mat4x4
 
+typedef vec< 1, uint, packed_highp > packed_highp_uvec1
 
+typedef vec< 2, uint, packed_highp > packed_highp_uvec2
 
+typedef vec< 3, uint, packed_highp > packed_highp_uvec3
 
+typedef vec< 4, uint, packed_highp > packed_highp_uvec4
 
+typedef vec< 1, float, packed_highp > packed_highp_vec1
 
+typedef vec< 2, float, packed_highp > packed_highp_vec2
 
+typedef vec< 3, float, packed_highp > packed_highp_vec3
 
+typedef vec< 4, float, packed_highp > packed_highp_vec4
 
+typedef packed_highp_ivec1 packed_ivec1
 
+typedef packed_highp_ivec2 packed_ivec2
 
+typedef packed_highp_ivec3 packed_ivec3
 
+typedef packed_highp_ivec4 packed_ivec4
 
+typedef vec< 1, bool, packed_lowp > packed_lowp_bvec1
 
+typedef vec< 2, bool, packed_lowp > packed_lowp_bvec2
 
+typedef vec< 3, bool, packed_lowp > packed_lowp_bvec3
 
+typedef vec< 4, bool, packed_lowp > packed_lowp_bvec4
 
+typedef mat< 2, 2, double, packed_lowp > packed_lowp_dmat2
 
+typedef mat< 2, 2, double, packed_lowp > packed_lowp_dmat2x2
 
+typedef mat< 2, 3, double, packed_lowp > packed_lowp_dmat2x3
 
+typedef mat< 2, 4, double, packed_lowp > packed_lowp_dmat2x4
 
+typedef mat< 3, 3, double, packed_lowp > packed_lowp_dmat3
 
+typedef mat< 3, 2, double, packed_lowp > packed_lowp_dmat3x2
 
+typedef mat< 3, 3, double, packed_lowp > packed_lowp_dmat3x3
 
+typedef mat< 3, 4, double, packed_lowp > packed_lowp_dmat3x4
 
+typedef mat< 4, 4, double, packed_lowp > packed_lowp_dmat4
 
+typedef mat< 4, 2, double, packed_lowp > packed_lowp_dmat4x2
 
+typedef mat< 4, 3, double, packed_lowp > packed_lowp_dmat4x3
 
+typedef mat< 4, 4, double, packed_lowp > packed_lowp_dmat4x4
 
+typedef vec< 1, double, packed_lowp > packed_lowp_dvec1
 
+typedef vec< 2, double, packed_lowp > packed_lowp_dvec2
 
+typedef vec< 3, double, packed_lowp > packed_lowp_dvec3
 
+typedef vec< 4, double, packed_lowp > packed_lowp_dvec4
 
+typedef vec< 1, int, packed_lowp > packed_lowp_ivec1
 
+typedef vec< 2, int, packed_lowp > packed_lowp_ivec2
 
+typedef vec< 3, int, packed_lowp > packed_lowp_ivec3
 
+typedef vec< 4, int, packed_lowp > packed_lowp_ivec4
 
+typedef mat< 2, 2, float, packed_lowp > packed_lowp_mat2
 
+typedef mat< 2, 2, float, packed_lowp > packed_lowp_mat2x2
 
+typedef mat< 2, 3, float, packed_lowp > packed_lowp_mat2x3
 
+typedef mat< 2, 4, float, packed_lowp > packed_lowp_mat2x4
 
+typedef mat< 3, 3, float, packed_lowp > packed_lowp_mat3
 
+typedef mat< 3, 2, float, packed_lowp > packed_lowp_mat3x2
 
+typedef mat< 3, 3, float, packed_lowp > packed_lowp_mat3x3
 
+typedef mat< 3, 4, float, packed_lowp > packed_lowp_mat3x4
 
+typedef mat< 4, 4, float, packed_lowp > packed_lowp_mat4
 
+typedef mat< 4, 2, float, packed_lowp > packed_lowp_mat4x2
 
+typedef mat< 4, 3, float, packed_lowp > packed_lowp_mat4x3
 
+typedef mat< 4, 4, float, packed_lowp > packed_lowp_mat4x4
 
+typedef vec< 1, uint, packed_lowp > packed_lowp_uvec1
 
+typedef vec< 2, uint, packed_lowp > packed_lowp_uvec2
 
+typedef vec< 3, uint, packed_lowp > packed_lowp_uvec3
 
+typedef vec< 4, uint, packed_lowp > packed_lowp_uvec4
 
+typedef vec< 1, float, packed_lowp > packed_lowp_vec1
 
+typedef vec< 2, float, packed_lowp > packed_lowp_vec2
 
+typedef vec< 3, float, packed_lowp > packed_lowp_vec3
 
+typedef vec< 4, float, packed_lowp > packed_lowp_vec4
 
+typedef packed_highp_mat2 packed_mat2
 
+typedef packed_highp_mat2x2 packed_mat2x2
 
+typedef packed_highp_mat2x3 packed_mat2x3
 
+typedef packed_highp_mat2x4 packed_mat2x4
 
+typedef packed_highp_mat3 packed_mat3
 
+typedef packed_highp_mat3x2 packed_mat3x2
 
+typedef packed_highp_mat3x3 packed_mat3x3
 
+typedef packed_highp_mat3x4 packed_mat3x4
 
+typedef packed_highp_mat4 packed_mat4
 
+typedef packed_highp_mat4x2 packed_mat4x2
 
+typedef packed_highp_mat4x3 packed_mat4x3
 
+typedef packed_highp_mat4x4 packed_mat4x4
 
+typedef vec< 1, bool, packed_mediump > packed_mediump_bvec1
 
+typedef vec< 2, bool, packed_mediump > packed_mediump_bvec2
 
+typedef vec< 3, bool, packed_mediump > packed_mediump_bvec3
 
+typedef vec< 4, bool, packed_mediump > packed_mediump_bvec4
 
+typedef mat< 2, 2, double, packed_mediump > packed_mediump_dmat2
 
+typedef mat< 2, 2, double, packed_mediump > packed_mediump_dmat2x2
 
+typedef mat< 2, 3, double, packed_mediump > packed_mediump_dmat2x3
 
+typedef mat< 2, 4, double, packed_mediump > packed_mediump_dmat2x4
 
+typedef mat< 3, 3, double, packed_mediump > packed_mediump_dmat3
 
+typedef mat< 3, 2, double, packed_mediump > packed_mediump_dmat3x2
 
+typedef mat< 3, 3, double, packed_mediump > packed_mediump_dmat3x3
 
+typedef mat< 3, 4, double, packed_mediump > packed_mediump_dmat3x4
 
+typedef mat< 4, 4, double, packed_mediump > packed_mediump_dmat4
 
+typedef mat< 4, 2, double, packed_mediump > packed_mediump_dmat4x2
 
+typedef mat< 4, 3, double, packed_mediump > packed_mediump_dmat4x3
 
+typedef mat< 4, 4, double, packed_mediump > packed_mediump_dmat4x4
 
+typedef vec< 1, double, packed_mediump > packed_mediump_dvec1
 
+typedef vec< 2, double, packed_mediump > packed_mediump_dvec2
 
+typedef vec< 3, double, packed_mediump > packed_mediump_dvec3
 
+typedef vec< 4, double, packed_mediump > packed_mediump_dvec4
 
+typedef vec< 1, int, packed_mediump > packed_mediump_ivec1
 
+typedef vec< 2, int, packed_mediump > packed_mediump_ivec2
 
+typedef vec< 3, int, packed_mediump > packed_mediump_ivec3
 
+typedef vec< 4, int, packed_mediump > packed_mediump_ivec4
 
+typedef mat< 2, 2, float, packed_mediump > packed_mediump_mat2
 
+typedef mat< 2, 2, float, packed_mediump > packed_mediump_mat2x2
 
+typedef mat< 2, 3, float, packed_mediump > packed_mediump_mat2x3
 
+typedef mat< 2, 4, float, packed_mediump > packed_mediump_mat2x4
 
+typedef mat< 3, 3, float, packed_mediump > packed_mediump_mat3
 
+typedef mat< 3, 2, float, packed_mediump > packed_mediump_mat3x2
 
+typedef mat< 3, 3, float, packed_mediump > packed_mediump_mat3x3
 
+typedef mat< 3, 4, float, packed_mediump > packed_mediump_mat3x4
 
+typedef mat< 4, 4, float, packed_mediump > packed_mediump_mat4
 
+typedef mat< 4, 2, float, packed_mediump > packed_mediump_mat4x2
 
+typedef mat< 4, 3, float, packed_mediump > packed_mediump_mat4x3
 
+typedef mat< 4, 4, float, packed_mediump > packed_mediump_mat4x4
 
+typedef vec< 1, uint, packed_mediump > packed_mediump_uvec1
 
+typedef vec< 2, uint, packed_mediump > packed_mediump_uvec2
 
+typedef vec< 3, uint, packed_mediump > packed_mediump_uvec3
 
+typedef vec< 4, uint, packed_mediump > packed_mediump_uvec4
 
+typedef vec< 1, float, packed_mediump > packed_mediump_vec1
 
+typedef vec< 2, float, packed_mediump > packed_mediump_vec2
 
+typedef vec< 3, float, packed_mediump > packed_mediump_vec3
 
+typedef vec< 4, float, packed_mediump > packed_mediump_vec4
 
+typedef packed_highp_uvec1 packed_uvec1
 
+typedef packed_highp_uvec2 packed_uvec2
 
+typedef packed_highp_uvec3 packed_uvec3
 
+typedef packed_highp_uvec4 packed_uvec4
 
+typedef packed_highp_vec1 packed_vec1
 
+typedef packed_highp_vec2 packed_vec2
 
+typedef packed_highp_vec3 packed_vec3
 
+typedef packed_highp_vec4 packed_vec4
 
+

Detailed Description

+

Include <glm/gtc/type_aligned.hpp> to use the features of this extension.

+

Aligned types allowing SIMD optimizations of vectors and matrices types

+
+ + + + diff --git a/common/glm/doc/api/a00721.html b/common/glm/doc/api/a00721.html new file mode 100644 index 000000000..47dec1b62 --- /dev/null +++ b/common/glm/doc/api/a00721.html @@ -0,0 +1,9337 @@ + + + + + + + +0.9.9 API documenation: GLM_GTC_type_precision + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTC_type_precision
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Typedefs

typedef float f32
 
typedef mat< 2, 2, f32, defaultp > f32mat2
 
typedef mat< 2, 2, f32, defaultp > f32mat2x2
 
typedef mat< 2, 3, f32, defaultp > f32mat2x3
 
typedef mat< 2, 4, f32, defaultp > f32mat2x4
 
typedef mat< 3, 3, f32, defaultp > f32mat3
 
typedef mat< 3, 2, f32, defaultp > f32mat3x2
 
typedef mat< 3, 3, f32, defaultp > f32mat3x3
 
typedef mat< 3, 4, f32, defaultp > f32mat3x4
 
typedef mat< 4, 4, f32, defaultp > f32mat4
 
typedef mat< 4, 2, f32, defaultp > f32mat4x2
 
typedef mat< 4, 3, f32, defaultp > f32mat4x3
 
typedef mat< 4, 4, f32, defaultp > f32mat4x4
 
typedef qua< f32, defaultp > f32quat
 
typedef vec< 1, f32, defaultp > f32vec1
 
typedef vec< 2, f32, defaultp > f32vec2
 
typedef vec< 3, f32, defaultp > f32vec3
 
typedef vec< 4, f32, defaultp > f32vec4
 
typedef double f64
 
typedef mat< 2, 2, f64, defaultp > f64mat2
 
typedef mat< 2, 2, f64, defaultp > f64mat2x2
 
typedef mat< 2, 3, f64, defaultp > f64mat2x3
 
typedef mat< 2, 4, f64, defaultp > f64mat2x4
 
typedef mat< 3, 3, f64, defaultp > f64mat3
 
typedef mat< 3, 2, f64, defaultp > f64mat3x2
 
typedef mat< 3, 3, f64, defaultp > f64mat3x3
 
typedef mat< 3, 4, f64, defaultp > f64mat3x4
 
typedef mat< 4, 4, f64, defaultp > f64mat4
 
typedef mat< 4, 2, f64, defaultp > f64mat4x2
 
typedef mat< 4, 3, f64, defaultp > f64mat4x3
 
typedef mat< 4, 4, f64, defaultp > f64mat4x4
 
typedef qua< f64, defaultp > f64quat
 
typedef vec< 1, f64, defaultp > f64vec1
 
typedef vec< 2, f64, defaultp > f64vec2
 
typedef vec< 3, f64, defaultp > f64vec3
 
typedef vec< 4, f64, defaultp > f64vec4
 
typedef float float32_t
 
typedef double float64_t
 
typedef mat< 2, 2, f32, defaultp > fmat2
 
typedef mat< 2, 2, f32, defaultp > fmat2x2
 
typedef mat< 2, 3, f32, defaultp > fmat2x3
 
typedef mat< 2, 4, f32, defaultp > fmat2x4
 
typedef mat< 3, 3, f32, defaultp > fmat3
 
typedef mat< 3, 2, f32, defaultp > fmat3x2
 
typedef mat< 3, 3, f32, defaultp > fmat3x3
 
typedef mat< 3, 4, f32, defaultp > fmat3x4
 
typedef mat< 4, 4, f32, defaultp > fmat4
 
typedef mat< 4, 2, f32, defaultp > fmat4x2
 
typedef mat< 4, 3, f32, defaultp > fmat4x3
 
typedef mat< 4, 4, f32, defaultp > fmat4x4
 
typedef vec< 1, f32, defaultp > fvec1
 
typedef vec< 2, f32, defaultp > fvec2
 
typedef vec< 3, f32, defaultp > fvec3
 
typedef vec< 4, f32, defaultp > fvec4
 
typedef float highp_f32
 
typedef mat< 2, 2, f32, highp > highp_f32mat2
 
typedef mat< 2, 2, f32, highp > highp_f32mat2x2
 
typedef mat< 2, 3, f32, highp > highp_f32mat2x3
 
typedef mat< 2, 4, f32, highp > highp_f32mat2x4
 
typedef mat< 3, 3, f32, highp > highp_f32mat3
 
typedef mat< 3, 2, f32, highp > highp_f32mat3x2
 
typedef mat< 3, 3, f32, highp > highp_f32mat3x3
 
typedef mat< 3, 4, f32, highp > highp_f32mat3x4
 
typedef mat< 4, 4, f32, highp > highp_f32mat4
 
typedef mat< 4, 2, f32, highp > highp_f32mat4x2
 
typedef mat< 4, 3, f32, highp > highp_f32mat4x3
 
typedef mat< 4, 4, f32, highp > highp_f32mat4x4
 
typedef qua< f32, highp > highp_f32quat
 
typedef vec< 1, f32, highp > highp_f32vec1
 
typedef vec< 2, f32, highp > highp_f32vec2
 
typedef vec< 3, f32, highp > highp_f32vec3
 
typedef vec< 4, f32, highp > highp_f32vec4
 
typedef double highp_f64
 
typedef mat< 2, 2, f64, highp > highp_f64mat2
 
typedef mat< 2, 2, f64, highp > highp_f64mat2x2
 
typedef mat< 2, 3, f64, highp > highp_f64mat2x3
 
typedef mat< 2, 4, f64, highp > highp_f64mat2x4
 
typedef mat< 3, 3, f64, highp > highp_f64mat3
 
typedef mat< 3, 2, f64, highp > highp_f64mat3x2
 
typedef mat< 3, 3, f64, highp > highp_f64mat3x3
 
typedef mat< 3, 4, f64, highp > highp_f64mat3x4
 
typedef mat< 4, 4, f64, highp > highp_f64mat4
 
typedef mat< 4, 2, f64, highp > highp_f64mat4x2
 
typedef mat< 4, 3, f64, highp > highp_f64mat4x3
 
typedef mat< 4, 4, f64, highp > highp_f64mat4x4
 
typedef qua< f64, highp > highp_f64quat
 
typedef vec< 1, f64, highp > highp_f64vec1
 
typedef vec< 2, f64, highp > highp_f64vec2
 
typedef vec< 3, f64, highp > highp_f64vec3
 
typedef vec< 4, f64, highp > highp_f64vec4
 
typedef float highp_float32
 
typedef float highp_float32_t
 
typedef double highp_float64
 
typedef double highp_float64_t
 
typedef mat< 2, 2, f32, highp > highp_fmat2
 
typedef mat< 2, 2, f32, highp > highp_fmat2x2
 
typedef mat< 2, 3, f32, highp > highp_fmat2x3
 
typedef mat< 2, 4, f32, highp > highp_fmat2x4
 
typedef mat< 3, 3, f32, highp > highp_fmat3
 
typedef mat< 3, 2, f32, highp > highp_fmat3x2
 
typedef mat< 3, 3, f32, highp > highp_fmat3x3
 
typedef mat< 3, 4, f32, highp > highp_fmat3x4
 
typedef mat< 4, 4, f32, highp > highp_fmat4
 
typedef mat< 4, 2, f32, highp > highp_fmat4x2
 
typedef mat< 4, 3, f32, highp > highp_fmat4x3
 
typedef mat< 4, 4, f32, highp > highp_fmat4x4
 
typedef vec< 1, float, highp > highp_fvec1
 
typedef vec< 2, float, highp > highp_fvec2
 
typedef vec< 3, float, highp > highp_fvec3
 
typedef vec< 4, float, highp > highp_fvec4
 
typedef int16 highp_i16
 
typedef vec< 1, i16, highp > highp_i16vec1
 
typedef vec< 2, i16, highp > highp_i16vec2
 
typedef vec< 3, i16, highp > highp_i16vec3
 
typedef vec< 4, i16, highp > highp_i16vec4
 
typedef int32 highp_i32
 
typedef vec< 1, i32, highp > highp_i32vec1
 
typedef vec< 2, i32, highp > highp_i32vec2
 
typedef vec< 3, i32, highp > highp_i32vec3
 
typedef vec< 4, i32, highp > highp_i32vec4
 
typedef int64 highp_i64
 
typedef vec< 1, i64, highp > highp_i64vec1
 
typedef vec< 2, i64, highp > highp_i64vec2
 
typedef vec< 3, i64, highp > highp_i64vec3
 
typedef vec< 4, i64, highp > highp_i64vec4
 
typedef int8 highp_i8
 
typedef vec< 1, i8, highp > highp_i8vec1
 
typedef vec< 2, i8, highp > highp_i8vec2
 
typedef vec< 3, i8, highp > highp_i8vec3
 
typedef vec< 4, i8, highp > highp_i8vec4
 
typedef int16 highp_int16
 
typedef int16 highp_int16_t
 
typedef int32 highp_int32
 
typedef int32 highp_int32_t
 
typedef int64 highp_int64
 
typedef int64 highp_int64_t
 
typedef int8 highp_int8
 
typedef int8 highp_int8_t
 
typedef uint16 highp_u16
 
typedef vec< 1, u16, highp > highp_u16vec1
 
typedef vec< 2, u16, highp > highp_u16vec2
 
typedef vec< 3, u16, highp > highp_u16vec3
 
typedef vec< 4, u16, highp > highp_u16vec4
 
typedef uint32 highp_u32
 
typedef vec< 1, u32, highp > highp_u32vec1
 
typedef vec< 2, u32, highp > highp_u32vec2
 
typedef vec< 3, u32, highp > highp_u32vec3
 
typedef vec< 4, u32, highp > highp_u32vec4
 
typedef uint64 highp_u64
 
typedef vec< 1, u64, highp > highp_u64vec1
 
typedef vec< 2, u64, highp > highp_u64vec2
 
typedef vec< 3, u64, highp > highp_u64vec3
 
typedef vec< 4, u64, highp > highp_u64vec4
 
typedef uint8 highp_u8
 
typedef vec< 1, u8, highp > highp_u8vec1
 
typedef vec< 2, u8, highp > highp_u8vec2
 
typedef vec< 3, u8, highp > highp_u8vec3
 
typedef vec< 4, u8, highp > highp_u8vec4
 
typedef uint16 highp_uint16
 
typedef uint16 highp_uint16_t
 
typedef uint32 highp_uint32
 
typedef uint32 highp_uint32_t
 
typedef uint64 highp_uint64
 
typedef uint64 highp_uint64_t
 
typedef uint8 highp_uint8
 
typedef uint8 highp_uint8_t
 
typedef int16 i16
 
typedef vec< 1, i16, defaultp > i16vec1
 
typedef vec< 2, i16, defaultp > i16vec2
 
typedef vec< 3, i16, defaultp > i16vec3
 
typedef vec< 4, i16, defaultp > i16vec4
 
typedef int32 i32
 
typedef vec< 1, i32, defaultp > i32vec1
 
typedef vec< 2, i32, defaultp > i32vec2
 
typedef vec< 3, i32, defaultp > i32vec3
 
typedef vec< 4, i32, defaultp > i32vec4
 
typedef int64 i64
 
typedef vec< 1, i64, defaultp > i64vec1
 
typedef vec< 2, i64, defaultp > i64vec2
 
typedef vec< 3, i64, defaultp > i64vec3
 
typedef vec< 4, i64, defaultp > i64vec4
 
typedef int8 i8
 
typedef vec< 1, i8, defaultp > i8vec1
 
typedef vec< 2, i8, defaultp > i8vec2
 
typedef vec< 3, i8, defaultp > i8vec3
 
typedef vec< 4, i8, defaultp > i8vec4
 
typedef int16 int16_t
 
typedef int32 int32_t
 
typedef int64 int64_t
 
typedef int8 int8_t
 
typedef float lowp_f32
 
typedef mat< 2, 2, f32, lowp > lowp_f32mat2
 
typedef mat< 2, 2, f32, lowp > lowp_f32mat2x2
 
typedef mat< 2, 3, f32, lowp > lowp_f32mat2x3
 
typedef mat< 2, 4, f32, lowp > lowp_f32mat2x4
 
typedef mat< 3, 3, f32, lowp > lowp_f32mat3
 
typedef mat< 3, 2, f32, lowp > lowp_f32mat3x2
 
typedef mat< 3, 3, f32, lowp > lowp_f32mat3x3
 
typedef mat< 3, 4, f32, lowp > lowp_f32mat3x4
 
typedef mat< 4, 4, f32, lowp > lowp_f32mat4
 
typedef mat< 4, 2, f32, lowp > lowp_f32mat4x2
 
typedef mat< 4, 3, f32, lowp > lowp_f32mat4x3
 
typedef mat< 4, 4, f32, lowp > lowp_f32mat4x4
 
typedef qua< f32, lowp > lowp_f32quat
 
typedef vec< 1, f32, lowp > lowp_f32vec1
 
typedef vec< 2, f32, lowp > lowp_f32vec2
 
typedef vec< 3, f32, lowp > lowp_f32vec3
 
typedef vec< 4, f32, lowp > lowp_f32vec4
 
typedef double lowp_f64
 
typedef mat< 2, 2, f64, lowp > lowp_f64mat2
 
typedef mat< 2, 2, f64, lowp > lowp_f64mat2x2
 
typedef mat< 2, 3, f64, lowp > lowp_f64mat2x3
 
typedef mat< 2, 4, f64, lowp > lowp_f64mat2x4
 
typedef mat< 3, 3, f64, lowp > lowp_f64mat3
 
typedef mat< 3, 2, f64, lowp > lowp_f64mat3x2
 
typedef mat< 3, 3, f64, lowp > lowp_f64mat3x3
 
typedef mat< 3, 4, f64, lowp > lowp_f64mat3x4
 
typedef mat< 4, 4, f64, lowp > lowp_f64mat4
 
typedef mat< 4, 2, f64, lowp > lowp_f64mat4x2
 
typedef mat< 4, 3, f64, lowp > lowp_f64mat4x3
 
typedef mat< 4, 4, f64, lowp > lowp_f64mat4x4
 
typedef qua< f64, lowp > lowp_f64quat
 
typedef vec< 1, f64, lowp > lowp_f64vec1
 
typedef vec< 2, f64, lowp > lowp_f64vec2
 
typedef vec< 3, f64, lowp > lowp_f64vec3
 
typedef vec< 4, f64, lowp > lowp_f64vec4
 
typedef float lowp_float32
 
typedef float lowp_float32_t
 
typedef double lowp_float64
 
typedef double lowp_float64_t
 
typedef mat< 2, 2, f32, lowp > lowp_fmat2
 
typedef mat< 2, 2, f32, lowp > lowp_fmat2x2
 
typedef mat< 2, 3, f32, lowp > lowp_fmat2x3
 
typedef mat< 2, 4, f32, lowp > lowp_fmat2x4
 
typedef mat< 3, 3, f32, lowp > lowp_fmat3
 
typedef mat< 3, 2, f32, lowp > lowp_fmat3x2
 
typedef mat< 3, 3, f32, lowp > lowp_fmat3x3
 
typedef mat< 3, 4, f32, lowp > lowp_fmat3x4
 
typedef mat< 4, 4, f32, lowp > lowp_fmat4
 
typedef mat< 4, 2, f32, lowp > lowp_fmat4x2
 
typedef mat< 4, 3, f32, lowp > lowp_fmat4x3
 
typedef mat< 4, 4, f32, lowp > lowp_fmat4x4
 
typedef vec< 1, float, lowp > lowp_fvec1
 
typedef vec< 2, float, lowp > lowp_fvec2
 
typedef vec< 3, float, lowp > lowp_fvec3
 
typedef vec< 4, float, lowp > lowp_fvec4
 
typedef int16 lowp_i16
 
typedef vec< 1, i16, lowp > lowp_i16vec1
 
typedef vec< 2, i16, lowp > lowp_i16vec2
 
typedef vec< 3, i16, lowp > lowp_i16vec3
 
typedef vec< 4, i16, lowp > lowp_i16vec4
 
typedef int32 lowp_i32
 
typedef vec< 1, i32, lowp > lowp_i32vec1
 
typedef vec< 2, i32, lowp > lowp_i32vec2
 
typedef vec< 3, i32, lowp > lowp_i32vec3
 
typedef vec< 4, i32, lowp > lowp_i32vec4
 
typedef int64 lowp_i64
 
typedef vec< 1, i64, lowp > lowp_i64vec1
 
typedef vec< 2, i64, lowp > lowp_i64vec2
 
typedef vec< 3, i64, lowp > lowp_i64vec3
 
typedef vec< 4, i64, lowp > lowp_i64vec4
 
typedef int8 lowp_i8
 
typedef vec< 1, i8, lowp > lowp_i8vec1
 
typedef vec< 2, i8, lowp > lowp_i8vec2
 
typedef vec< 3, i8, lowp > lowp_i8vec3
 
typedef vec< 4, i8, lowp > lowp_i8vec4
 
typedef int16 lowp_int16
 
typedef int16 lowp_int16_t
 
typedef int32 lowp_int32
 
typedef int32 lowp_int32_t
 
typedef int64 lowp_int64
 
typedef int64 lowp_int64_t
 
typedef int8 lowp_int8
 
typedef int8 lowp_int8_t
 
typedef uint16 lowp_u16
 
typedef vec< 1, u16, lowp > lowp_u16vec1
 
typedef vec< 2, u16, lowp > lowp_u16vec2
 
typedef vec< 3, u16, lowp > lowp_u16vec3
 
typedef vec< 4, u16, lowp > lowp_u16vec4
 
typedef uint32 lowp_u32
 
typedef vec< 1, u32, lowp > lowp_u32vec1
 
typedef vec< 2, u32, lowp > lowp_u32vec2
 
typedef vec< 3, u32, lowp > lowp_u32vec3
 
typedef vec< 4, u32, lowp > lowp_u32vec4
 
typedef uint64 lowp_u64
 
typedef vec< 1, u64, lowp > lowp_u64vec1
 
typedef vec< 2, u64, lowp > lowp_u64vec2
 
typedef vec< 3, u64, lowp > lowp_u64vec3
 
typedef vec< 4, u64, lowp > lowp_u64vec4
 
typedef uint8 lowp_u8
 
typedef vec< 1, u8, lowp > lowp_u8vec1
 
typedef vec< 2, u8, lowp > lowp_u8vec2
 
typedef vec< 3, u8, lowp > lowp_u8vec3
 
typedef vec< 4, u8, lowp > lowp_u8vec4
 
typedef uint16 lowp_uint16
 
typedef uint16 lowp_uint16_t
 
typedef uint32 lowp_uint32
 
typedef uint32 lowp_uint32_t
 
typedef uint64 lowp_uint64
 
typedef uint64 lowp_uint64_t
 
typedef uint8 lowp_uint8
 
typedef uint8 lowp_uint8_t
 
typedef float mediump_f32
 
typedef mat< 2, 2, f32, mediump > mediump_f32mat2
 
typedef mat< 2, 2, f32, mediump > mediump_f32mat2x2
 
typedef mat< 2, 3, f32, mediump > mediump_f32mat2x3
 
typedef mat< 2, 4, f32, mediump > mediump_f32mat2x4
 
typedef mat< 3, 3, f32, mediump > mediump_f32mat3
 
typedef mat< 3, 2, f32, mediump > mediump_f32mat3x2
 
typedef mat< 3, 3, f32, mediump > mediump_f32mat3x3
 
typedef mat< 3, 4, f32, mediump > mediump_f32mat3x4
 
typedef mat< 4, 4, f32, mediump > mediump_f32mat4
 
typedef mat< 4, 2, f32, mediump > mediump_f32mat4x2
 
typedef mat< 4, 3, f32, mediump > mediump_f32mat4x3
 
typedef mat< 4, 4, f32, mediump > mediump_f32mat4x4
 
typedef qua< f32, mediump > mediump_f32quat
 
typedef vec< 1, f32, mediump > mediump_f32vec1
 
typedef vec< 2, f32, mediump > mediump_f32vec2
 
typedef vec< 3, f32, mediump > mediump_f32vec3
 
typedef vec< 4, f32, mediump > mediump_f32vec4
 
typedef double mediump_f64
 
typedef mat< 2, 2, f64, mediump > mediump_f64mat2
 
typedef mat< 2, 2, f64, mediump > mediump_f64mat2x2
 
typedef mat< 2, 3, f64, mediump > mediump_f64mat2x3
 
typedef mat< 2, 4, f64, mediump > mediump_f64mat2x4
 
typedef mat< 3, 3, f64, mediump > mediump_f64mat3
 
typedef mat< 3, 2, f64, mediump > mediump_f64mat3x2
 
typedef mat< 3, 3, f64, mediump > mediump_f64mat3x3
 
typedef mat< 3, 4, f64, mediump > mediump_f64mat3x4
 
typedef mat< 4, 4, f64, mediump > mediump_f64mat4
 
typedef mat< 4, 2, f64, mediump > mediump_f64mat4x2
 
typedef mat< 4, 3, f64, mediump > mediump_f64mat4x3
 
typedef mat< 4, 4, f64, mediump > mediump_f64mat4x4
 
typedef qua< f64, mediump > mediump_f64quat
 
typedef vec< 1, f64, mediump > mediump_f64vec1
 
typedef vec< 2, f64, mediump > mediump_f64vec2
 
typedef vec< 3, f64, mediump > mediump_f64vec3
 
typedef vec< 4, f64, mediump > mediump_f64vec4
 
typedef float mediump_float32
 
typedef float mediump_float32_t
 
typedef double mediump_float64
 
typedef double mediump_float64_t
 
typedef mat< 2, 2, f32, mediump > mediump_fmat2
 
typedef mat< 2, 2, f32, mediump > mediump_fmat2x2
 
typedef mat< 2, 3, f32, mediump > mediump_fmat2x3
 
typedef mat< 2, 4, f32, mediump > mediump_fmat2x4
 
typedef mat< 3, 3, f32, mediump > mediump_fmat3
 
typedef mat< 3, 2, f32, mediump > mediump_fmat3x2
 
typedef mat< 3, 3, f32, mediump > mediump_fmat3x3
 
typedef mat< 3, 4, f32, mediump > mediump_fmat3x4
 
typedef mat< 4, 4, f32, mediump > mediump_fmat4
 
typedef mat< 4, 2, f32, mediump > mediump_fmat4x2
 
typedef mat< 4, 3, f32, mediump > mediump_fmat4x3
 
typedef mat< 4, 4, f32, mediump > mediump_fmat4x4
 
typedef vec< 1, float, mediump > mediump_fvec1
 
typedef vec< 2, float, mediump > mediump_fvec2
 
typedef vec< 3, float, mediump > mediump_fvec3
 
typedef vec< 4, float, mediump > mediump_fvec4
 
typedef int16 mediump_i16
 
typedef vec< 1, i16, mediump > mediump_i16vec1
 
typedef vec< 2, i16, mediump > mediump_i16vec2
 
typedef vec< 3, i16, mediump > mediump_i16vec3
 
typedef vec< 4, i16, mediump > mediump_i16vec4
 
typedef int32 mediump_i32
 
typedef vec< 1, i32, mediump > mediump_i32vec1
 
typedef vec< 2, i32, mediump > mediump_i32vec2
 
typedef vec< 3, i32, mediump > mediump_i32vec3
 
typedef vec< 4, i32, mediump > mediump_i32vec4
 
typedef int64 mediump_i64
 
typedef vec< 1, i64, mediump > mediump_i64vec1
 
typedef vec< 2, i64, mediump > mediump_i64vec2
 
typedef vec< 3, i64, mediump > mediump_i64vec3
 
typedef vec< 4, i64, mediump > mediump_i64vec4
 
typedef int8 mediump_i8
 
typedef vec< 1, i8, mediump > mediump_i8vec1
 
typedef vec< 2, i8, mediump > mediump_i8vec2
 
typedef vec< 3, i8, mediump > mediump_i8vec3
 
typedef vec< 4, i8, mediump > mediump_i8vec4
 
typedef int16 mediump_int16
 
typedef int16 mediump_int16_t
 
typedef int32 mediump_int32
 
typedef int32 mediump_int32_t
 
typedef int64 mediump_int64
 
typedef int64 mediump_int64_t
 
typedef int8 mediump_int8
 
typedef int8 mediump_int8_t
 
typedef uint16 mediump_u16
 
typedef vec< 1, u16, mediump > mediump_u16vec1
 
typedef vec< 2, u16, mediump > mediump_u16vec2
 
typedef vec< 3, u16, mediump > mediump_u16vec3
 
typedef vec< 4, u16, mediump > mediump_u16vec4
 
typedef uint32 mediump_u32
 
typedef vec< 1, u32, mediump > mediump_u32vec1
 
typedef vec< 2, u32, mediump > mediump_u32vec2
 
typedef vec< 3, u32, mediump > mediump_u32vec3
 
typedef vec< 4, u32, mediump > mediump_u32vec4
 
typedef uint64 mediump_u64
 
typedef vec< 1, u64, mediump > mediump_u64vec1
 
typedef vec< 2, u64, mediump > mediump_u64vec2
 
typedef vec< 3, u64, mediump > mediump_u64vec3
 
typedef vec< 4, u64, mediump > mediump_u64vec4
 
typedef uint8 mediump_u8
 
typedef vec< 1, u8, mediump > mediump_u8vec1
 
typedef vec< 2, u8, mediump > mediump_u8vec2
 
typedef vec< 3, u8, mediump > mediump_u8vec3
 
typedef vec< 4, u8, mediump > mediump_u8vec4
 
typedef uint16 mediump_uint16
 
typedef uint16 mediump_uint16_t
 
typedef uint32 mediump_uint32
 
typedef uint32 mediump_uint32_t
 
typedef uint64 mediump_uint64
 
typedef uint64 mediump_uint64_t
 
typedef uint8 mediump_uint8
 
typedef uint8 mediump_uint8_t
 
typedef uint16 u16
 
typedef vec< 1, u16, defaultp > u16vec1
 
typedef vec< 2, u16, defaultp > u16vec2
 
typedef vec< 3, u16, defaultp > u16vec3
 
typedef vec< 4, u16, defaultp > u16vec4
 
typedef uint32 u32
 
typedef vec< 1, u32, defaultp > u32vec1
 
typedef vec< 2, u32, defaultp > u32vec2
 
typedef vec< 3, u32, defaultp > u32vec3
 
typedef vec< 4, u32, defaultp > u32vec4
 
typedef uint64 u64
 
typedef vec< 1, u64, defaultp > u64vec1
 
typedef vec< 2, u64, defaultp > u64vec2
 
typedef vec< 3, u64, defaultp > u64vec3
 
typedef vec< 4, u64, defaultp > u64vec4
 
typedef uint8 u8
 
typedef vec< 1, u8, defaultp > u8vec1
 
typedef vec< 2, u8, defaultp > u8vec2
 
typedef vec< 3, u8, defaultp > u8vec3
 
typedef vec< 4, u8, defaultp > u8vec4
 
typedef uint16 uint16_t
 
typedef uint32 uint32_t
 
typedef uint64 uint64_t
 
typedef uint8 uint8_t
 
+

Detailed Description

+

Include <glm/gtc/type_precision.hpp> to use the features of this extension.

+

Defines specific C++-based qualifier types.

+

Typedef Documentation

+ +

◆ f32

+ +
+
+ + + + +
typedef float32 f32
+
+ +

Default 32 bit single-qualifier floating-point scalar.

+

32 bit single-qualifier floating-point scalar.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 150 of file fwd.hpp.

+ +
+
+ +

◆ f32mat2

+ +
+
+ + + + +
typedef mat< 2, 2, f32, defaultp > f32mat2
+
+ +

Single-qualifier floating-point 1x1 matrix.

+
See also
GLM_GTC_type_precision Single-qualifier floating-point 2x2 matrix.
+
+GLM_GTC_type_precision
+ +

Definition at line 552 of file fwd.hpp.

+ +
+
+ +

◆ f32mat2x2

+ +
+
+ + + + +
typedef mat< 2, 2, f32, defaultp > f32mat2x2
+
+ +

Single-qualifier floating-point 1x1 matrix.

+
See also
GLM_GTC_type_precision Single-qualifier floating-point 2x2 matrix.
+
+GLM_GTC_type_precision
+ +

Definition at line 700 of file fwd.hpp.

+ +
+
+ +

◆ f32mat2x3

+ +
+
+ + + + +
typedef mat< 2, 3, f32, defaultp > f32mat2x3
+
+ +

Single-qualifier floating-point 2x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 703 of file fwd.hpp.

+ +
+
+ +

◆ f32mat2x4

+ +
+
+ + + + +
typedef mat< 2, 4, f32, defaultp > f32mat2x4
+
+ +

Single-qualifier floating-point 2x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 706 of file fwd.hpp.

+ +
+
+ +

◆ f32mat3

+ +
+
+ + + + +
typedef mat< 3, 3, f32, defaultp > f32mat3
+
+ +

Single-qualifier floating-point 3x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 553 of file fwd.hpp.

+ +
+
+ +

◆ f32mat3x2

+ +
+
+ + + + +
typedef mat< 3, 2, f32, defaultp > f32mat3x2
+
+ +

Single-qualifier floating-point 3x2 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 701 of file fwd.hpp.

+ +
+
+ +

◆ f32mat3x3

+ +
+
+ + + + +
typedef mat< 3, 3, f32, defaultp > f32mat3x3
+
+ +

Single-qualifier floating-point 3x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 704 of file fwd.hpp.

+ +
+
+ +

◆ f32mat3x4

+ +
+
+ + + + +
typedef mat< 3, 4, f32, defaultp > f32mat3x4
+
+ +

Single-qualifier floating-point 3x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 707 of file fwd.hpp.

+ +
+
+ +

◆ f32mat4

+ +
+
+ + + + +
typedef mat< 4, 4, f32, defaultp > f32mat4
+
+ +

Single-qualifier floating-point 4x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 554 of file fwd.hpp.

+ +
+
+ +

◆ f32mat4x2

+ +
+
+ + + + +
typedef mat< 4, 2, f32, defaultp > f32mat4x2
+
+ +

Single-qualifier floating-point 4x2 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 702 of file fwd.hpp.

+ +
+
+ +

◆ f32mat4x3

+ +
+
+ + + + +
typedef mat< 4, 3, f32, defaultp > f32mat4x3
+
+ +

Single-qualifier floating-point 4x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 705 of file fwd.hpp.

+ +
+
+ +

◆ f32mat4x4

+ +
+
+ + + + +
typedef mat< 4, 4, f32, defaultp > f32mat4x4
+
+ +

Single-qualifier floating-point 4x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 708 of file fwd.hpp.

+ +
+
+ +

◆ f32quat

+ +
+
+ + + + +
typedef qua< f32, defaultp > f32quat
+
+ +

Single-qualifier floating-point quaternion.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 805 of file fwd.hpp.

+ +
+
+ +

◆ f32vec1

+ +
+
+ + + + +
typedef vec< 1, f32, defaultp > f32vec1
+
+ +

Single-qualifier floating-point vector of 1 component.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 461 of file fwd.hpp.

+ +
+
+ +

◆ f32vec2

+ +
+
+ + + + +
typedef vec< 2, f32, defaultp > f32vec2
+
+ +

Single-qualifier floating-point vector of 2 components.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 462 of file fwd.hpp.

+ +
+
+ +

◆ f32vec3

+ +
+
+ + + + +
typedef vec< 3, f32, defaultp > f32vec3
+
+ +

Single-qualifier floating-point vector of 3 components.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 463 of file fwd.hpp.

+ +
+
+ +

◆ f32vec4

+ +
+
+ + + + +
typedef vec< 4, f32, defaultp > f32vec4
+
+ +

Single-qualifier floating-point vector of 4 components.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 464 of file fwd.hpp.

+ +
+
+ +

◆ f64

+ +
+
+ + + + +
typedef float64 f64
+
+ +

Default 64 bit double-qualifier floating-point scalar.

+

64 bit double-qualifier floating-point scalar.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 166 of file fwd.hpp.

+ +
+
+ +

◆ f64mat2

+ +
+
+ + + + +
typedef mat< 2, 2, f64, defaultp > f64mat2
+
+ +

Double-qualifier floating-point 1x1 matrix.

+
See also
GLM_GTC_type_precision Double-qualifier floating-point 2x2 matrix.
+
+GLM_GTC_type_precision
+ +

Definition at line 584 of file fwd.hpp.

+ +
+
+ +

◆ f64mat2x2

+ +
+
+ + + + +
typedef mat< 2, 2, f64, defaultp > f64mat2x2
+
+ +

Double-qualifier floating-point 1x1 matrix.

+
See also
GLM_GTC_type_precision Double-qualifier floating-point 2x2 matrix.
+
+GLM_GTC_type_precision
+ +

Definition at line 780 of file fwd.hpp.

+ +
+
+ +

◆ f64mat2x3

+ +
+
+ + + + +
typedef mat< 2, 3, f64, defaultp > f64mat2x3
+
+ +

Double-qualifier floating-point 2x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 783 of file fwd.hpp.

+ +
+
+ +

◆ f64mat2x4

+ +
+
+ + + + +
typedef mat< 2, 4, f64, defaultp > f64mat2x4
+
+ +

Double-qualifier floating-point 2x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 786 of file fwd.hpp.

+ +
+
+ +

◆ f64mat3

+ +
+
+ + + + +
typedef mat< 3, 3, f64, defaultp > f64mat3
+
+ +

Double-qualifier floating-point 3x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 585 of file fwd.hpp.

+ +
+
+ +

◆ f64mat3x2

+ +
+
+ + + + +
typedef mat< 3, 2, f64, defaultp > f64mat3x2
+
+ +

Double-qualifier floating-point 3x2 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 781 of file fwd.hpp.

+ +
+
+ +

◆ f64mat3x3

+ +
+
+ + + + +
typedef mat< 3, 3, f64, defaultp > f64mat3x3
+
+ +

Double-qualifier floating-point 3x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 784 of file fwd.hpp.

+ +
+
+ +

◆ f64mat3x4

+ +
+
+ + + + +
typedef mat< 3, 4, f64, defaultp > f64mat3x4
+
+ +

Double-qualifier floating-point 3x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 787 of file fwd.hpp.

+ +
+
+ +

◆ f64mat4

+ +
+
+ + + + +
typedef mat< 4, 4, f64, defaultp > f64mat4
+
+ +

Double-qualifier floating-point 4x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 586 of file fwd.hpp.

+ +
+
+ +

◆ f64mat4x2

+ +
+
+ + + + +
typedef mat< 4, 2, f64, defaultp > f64mat4x2
+
+ +

Double-qualifier floating-point 4x2 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 782 of file fwd.hpp.

+ +
+
+ +

◆ f64mat4x3

+ +
+
+ + + + +
typedef mat< 4, 3, f64, defaultp > f64mat4x3
+
+ +

Double-qualifier floating-point 4x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 785 of file fwd.hpp.

+ +
+
+ +

◆ f64mat4x4

+ +
+
+ + + + +
typedef mat< 4, 4, f64, defaultp > f64mat4x4
+
+ +

Double-qualifier floating-point 4x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 788 of file fwd.hpp.

+ +
+
+ +

◆ f64quat

+ +
+
+ + + + +
typedef qua< f64, defaultp > f64quat
+
+ +

Double-qualifier floating-point quaternion.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 815 of file fwd.hpp.

+ +
+
+ +

◆ f64vec1

+ +
+
+ + + + +
typedef vec< 1, f64, defaultp > f64vec1
+
+ +

Double-qualifier floating-point vector of 1 component.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 501 of file fwd.hpp.

+ +
+
+ +

◆ f64vec2

+ +
+
+ + + + +
typedef vec< 2, f64, defaultp > f64vec2
+
+ +

Double-qualifier floating-point vector of 2 components.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 502 of file fwd.hpp.

+ +
+
+ +

◆ f64vec3

+ +
+
+ + + + +
typedef vec< 3, f64, defaultp > f64vec3
+
+ +

Double-qualifier floating-point vector of 3 components.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 503 of file fwd.hpp.

+ +
+
+ +

◆ f64vec4

+ +
+
+ + + + +
typedef vec< 4, f64, defaultp > f64vec4
+
+ +

Double-qualifier floating-point vector of 4 components.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 504 of file fwd.hpp.

+ +
+
+ +

◆ float32_t

+ +
+
+ + + + +
typedef float32 float32_t
+
+ +

Default 32 bit single-qualifier floating-point scalar.

+

32 bit single-qualifier floating-point scalar.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 160 of file fwd.hpp.

+ +
+
+ +

◆ float64_t

+ +
+
+ + + + +
typedef float64 float64_t
+
+ +

Default 64 bit double-qualifier floating-point scalar.

+

64 bit double-qualifier floating-point scalar.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 176 of file fwd.hpp.

+ +
+
+ +

◆ fmat2

+ +
+
+ + + + +
typedef mat< 2, 2, f32, defaultp > fmat2
+
+ +

Single-qualifier floating-point 1x1 matrix.

+
See also
GLM_GTC_type_precision Single-qualifier floating-point 2x2 matrix.
+
+GLM_GTC_type_precision
+ +

Definition at line 536 of file fwd.hpp.

+ +
+
+ +

◆ fmat2x2

+ +
+
+ + + + +
typedef mat< 2, 2, f32, defaultp > fmat2x2
+
+ +

Single-qualifier floating-point 1x1 matrix.

+
See also
GLM_GTC_type_precision Single-qualifier floating-point 2x2 matrix.
+
+GLM_GTC_type_precision
+ +

Definition at line 660 of file fwd.hpp.

+ +
+
+ +

◆ fmat2x3

+ +
+
+ + + + +
typedef mat< 2, 3, f32, defaultp > fmat2x3
+
+ +

Single-qualifier floating-point 2x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 663 of file fwd.hpp.

+ +
+
+ +

◆ fmat2x4

+ +
+
+ + + + +
typedef mat< 2, 4, f32, defaultp > fmat2x4
+
+ +

Single-qualifier floating-point 2x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 666 of file fwd.hpp.

+ +
+
+ +

◆ fmat3

+ +
+
+ + + + +
typedef mat< 3, 3, f32, defaultp > fmat3
+
+ +

Single-qualifier floating-point 3x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 537 of file fwd.hpp.

+ +
+
+ +

◆ fmat3x2

+ +
+
+ + + + +
typedef mat< 3, 2, f32, defaultp > fmat3x2
+
+ +

Single-qualifier floating-point 3x2 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 661 of file fwd.hpp.

+ +
+
+ +

◆ fmat3x3

+ +
+
+ + + + +
typedef mat< 3, 3, f32, defaultp > fmat3x3
+
+ +

Single-qualifier floating-point 3x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 664 of file fwd.hpp.

+ +
+
+ +

◆ fmat3x4

+ +
+
+ + + + +
typedef mat< 3, 4, f32, defaultp > fmat3x4
+
+ +

Single-qualifier floating-point 3x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 667 of file fwd.hpp.

+ +
+
+ +

◆ fmat4

+ +
+
+ + + + +
typedef mat< 4, 4, f32, defaultp > fmat4
+
+ +

Single-qualifier floating-point 4x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 538 of file fwd.hpp.

+ +
+
+ +

◆ fmat4x2

+ +
+
+ + + + +
typedef mat< 4, 2, f32, defaultp > fmat4x2
+
+ +

Single-qualifier floating-point 4x2 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 662 of file fwd.hpp.

+ +
+
+ +

◆ fmat4x3

+ +
+
+ + + + +
typedef mat< 4, 3, f32, defaultp > fmat4x3
+
+ +

Single-qualifier floating-point 4x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 665 of file fwd.hpp.

+ +
+
+ +

◆ fmat4x4

+ +
+
+ + + + +
typedef mat< 4, 4, f32, defaultp > fmat4x4
+
+ +

Single-qualifier floating-point 4x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 668 of file fwd.hpp.

+ +
+
+ +

◆ fvec1

+ +
+
+ + + + +
typedef vec< 1, float, defaultp > fvec1
+
+ +

Single-qualifier floating-point vector of 1 component.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 441 of file fwd.hpp.

+ +
+
+ +

◆ fvec2

+ +
+
+ + + + +
typedef vec< 2, float, defaultp > fvec2
+
+ +

Single-qualifier floating-point vector of 2 components.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 442 of file fwd.hpp.

+ +
+
+ +

◆ fvec3

+ +
+
+ + + + +
typedef vec< 3, float, defaultp > fvec3
+
+ +

Single-qualifier floating-point vector of 3 components.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 443 of file fwd.hpp.

+ +
+
+ +

◆ fvec4

+ +
+
+ + + + +
typedef vec< 4, float, defaultp > fvec4
+
+ +

Single-qualifier floating-point vector of 4 components.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 444 of file fwd.hpp.

+ +
+
+ +

◆ highp_f32

+ +
+
+ + + + +
typedef float32 highp_f32
+
+ +

High 32 bit single-qualifier floating-point scalar.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 149 of file fwd.hpp.

+ +
+
+ +

◆ highp_f32mat2

+ +
+
+ + + + +
typedef highp_f32mat2x2 highp_f32mat2
+
+ +

High single-qualifier floating-point 1x1 matrix.

+
See also
GLM_GTC_type_precision High single-qualifier floating-point 2x2 matrix.
+
+GLM_GTC_type_precision
+ +

Definition at line 548 of file fwd.hpp.

+ +
+
+ +

◆ highp_f32mat2x2

+ +
+
+ + + + +
typedef mat< 2, 2, f32, highp > highp_f32mat2x2
+
+ +

High single-qualifier floating-point 1x1 matrix.

+
See also
GLM_GTC_type_precision High single-qualifier floating-point 2x2 matrix.
+
+GLM_GTC_type_precision
+ +

Definition at line 690 of file fwd.hpp.

+ +
+
+ +

◆ highp_f32mat2x3

+ +
+
+ + + + +
typedef mat< 2, 3, f32, highp > highp_f32mat2x3
+
+ +

High single-qualifier floating-point 2x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 691 of file fwd.hpp.

+ +
+
+ +

◆ highp_f32mat2x4

+ +
+
+ + + + +
typedef mat< 2, 4, f32, highp > highp_f32mat2x4
+
+ +

High single-qualifier floating-point 2x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 692 of file fwd.hpp.

+ +
+
+ +

◆ highp_f32mat3

+ +
+
+ + + + +
typedef highp_f32mat3x3 highp_f32mat3
+
+ +

High single-qualifier floating-point 3x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 549 of file fwd.hpp.

+ +
+
+ +

◆ highp_f32mat3x2

+ +
+
+ + + + +
typedef mat< 3, 2, f32, highp > highp_f32mat3x2
+
+ +

High single-qualifier floating-point 3x2 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 693 of file fwd.hpp.

+ +
+
+ +

◆ highp_f32mat3x3

+ +
+
+ + + + +
typedef mat< 3, 3, f32, highp > highp_f32mat3x3
+
+ +

High single-qualifier floating-point 3x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 694 of file fwd.hpp.

+ +
+
+ +

◆ highp_f32mat3x4

+ +
+
+ + + + +
typedef mat< 3, 4, f32, highp > highp_f32mat3x4
+
+ +

High single-qualifier floating-point 3x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 695 of file fwd.hpp.

+ +
+
+ +

◆ highp_f32mat4

+ +
+
+ + + + +
typedef highp_f32mat4x4 highp_f32mat4
+
+ +

High single-qualifier floating-point 4x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 550 of file fwd.hpp.

+ +
+
+ +

◆ highp_f32mat4x2

+ +
+
+ + + + +
typedef mat< 4, 2, f32, highp > highp_f32mat4x2
+
+ +

High single-qualifier floating-point 4x2 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 696 of file fwd.hpp.

+ +
+
+ +

◆ highp_f32mat4x3

+ +
+
+ + + + +
typedef mat< 4, 3, f32, highp > highp_f32mat4x3
+
+ +

High single-qualifier floating-point 4x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 697 of file fwd.hpp.

+ +
+
+ +

◆ highp_f32mat4x4

+ +
+
+ + + + +
typedef mat< 4, 4, f32, highp > highp_f32mat4x4
+
+ +

High single-qualifier floating-point 4x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 698 of file fwd.hpp.

+ +
+
+ +

◆ highp_f32quat

+ +
+
+ + + + +
typedef qua< f32, highp > highp_f32quat
+
+ +

High single-qualifier floating-point quaternion.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 804 of file fwd.hpp.

+ +
+
+ +

◆ highp_f32vec1

+ +
+
+ + + + +
typedef vec< 1, f32, highp > highp_f32vec1
+
+ +

High single-qualifier floating-point vector of 1 component.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 456 of file fwd.hpp.

+ +
+
+ +

◆ highp_f32vec2

+ +
+
+ + + + +
typedef vec< 2, f32, highp > highp_f32vec2
+
+ +

High single-qualifier floating-point vector of 2 components.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 457 of file fwd.hpp.

+ +
+
+ +

◆ highp_f32vec3

+ +
+
+ + + + +
typedef vec< 3, f32, highp > highp_f32vec3
+
+ +

High single-qualifier floating-point vector of 3 components.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 458 of file fwd.hpp.

+ +
+
+ +

◆ highp_f32vec4

+ +
+
+ + + + +
typedef vec< 4, f32, highp > highp_f32vec4
+
+ +

High single-qualifier floating-point vector of 4 components.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 459 of file fwd.hpp.

+ +
+
+ +

◆ highp_f64

+ +
+
+ + + + +
typedef float64 highp_f64
+
+ +

High 64 bit double-qualifier floating-point scalar.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 165 of file fwd.hpp.

+ +
+
+ +

◆ highp_f64mat2

+ +
+
+ + + + +
typedef highp_f64mat2x2 highp_f64mat2
+
+ +

High double-qualifier floating-point 1x1 matrix.

+
See also
GLM_GTC_type_precision High double-qualifier floating-point 2x2 matrix.
+
+GLM_GTC_type_precision
+ +

Definition at line 580 of file fwd.hpp.

+ +
+
+ +

◆ highp_f64mat2x2

+ +
+
+ + + + +
typedef mat< 2, 2, f64, highp > highp_f64mat2x2
+
+ +

High double-qualifier floating-point 1x1 matrix.

+
See also
GLM_GTC_type_precision High double-qualifier floating-point 2x2 matrix.
+
+GLM_GTC_type_precision
+ +

Definition at line 770 of file fwd.hpp.

+ +
+
+ +

◆ highp_f64mat2x3

+ +
+
+ + + + +
typedef mat< 2, 3, f64, highp > highp_f64mat2x3
+
+ +

High double-qualifier floating-point 2x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 771 of file fwd.hpp.

+ +
+
+ +

◆ highp_f64mat2x4

+ +
+
+ + + + +
typedef mat< 2, 4, f64, highp > highp_f64mat2x4
+
+ +

High double-qualifier floating-point 2x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 772 of file fwd.hpp.

+ +
+
+ +

◆ highp_f64mat3

+ +
+
+ + + + +
typedef highp_f64mat3x3 highp_f64mat3
+
+ +

High double-qualifier floating-point 3x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 581 of file fwd.hpp.

+ +
+
+ +

◆ highp_f64mat3x2

+ +
+
+ + + + +
typedef mat< 3, 2, f64, highp > highp_f64mat3x2
+
+ +

High double-qualifier floating-point 3x2 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 773 of file fwd.hpp.

+ +
+
+ +

◆ highp_f64mat3x3

+ +
+
+ + + + +
typedef mat< 3, 3, f64, highp > highp_f64mat3x3
+
+ +

High double-qualifier floating-point 3x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 774 of file fwd.hpp.

+ +
+
+ +

◆ highp_f64mat3x4

+ +
+
+ + + + +
typedef mat< 3, 4, f64, highp > highp_f64mat3x4
+
+ +

High double-qualifier floating-point 3x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 775 of file fwd.hpp.

+ +
+
+ +

◆ highp_f64mat4

+ +
+
+ + + + +
typedef highp_f64mat4x4 highp_f64mat4
+
+ +

High double-qualifier floating-point 4x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 582 of file fwd.hpp.

+ +
+
+ +

◆ highp_f64mat4x2

+ +
+
+ + + + +
typedef mat< 4, 2, f64, highp > highp_f64mat4x2
+
+ +

High double-qualifier floating-point 4x2 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 776 of file fwd.hpp.

+ +
+
+ +

◆ highp_f64mat4x3

+ +
+
+ + + + +
typedef mat< 4, 3, f64, highp > highp_f64mat4x3
+
+ +

High double-qualifier floating-point 4x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 777 of file fwd.hpp.

+ +
+
+ +

◆ highp_f64mat4x4

+ +
+
+ + + + +
typedef mat< 4, 4, f64, highp > highp_f64mat4x4
+
+ +

High double-qualifier floating-point 4x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 778 of file fwd.hpp.

+ +
+
+ +

◆ highp_f64quat

+ +
+
+ + + + +
typedef qua< f64, highp > highp_f64quat
+
+ +

High double-qualifier floating-point quaternion.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 814 of file fwd.hpp.

+ +
+
+ +

◆ highp_f64vec1

+ +
+
+ + + + +
typedef vec< 1, f64, highp > highp_f64vec1
+
+ +

High double-qualifier floating-point vector of 1 component.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 496 of file fwd.hpp.

+ +
+
+ +

◆ highp_f64vec2

+ +
+
+ + + + +
typedef vec< 2, f64, highp > highp_f64vec2
+
+ +

High double-qualifier floating-point vector of 2 components.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 497 of file fwd.hpp.

+ +
+
+ +

◆ highp_f64vec3

+ +
+
+ + + + +
typedef vec< 3, f64, highp > highp_f64vec3
+
+ +

High double-qualifier floating-point vector of 3 components.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 498 of file fwd.hpp.

+ +
+
+ +

◆ highp_f64vec4

+ +
+
+ + + + +
typedef vec< 4, f64, highp > highp_f64vec4
+
+ +

High double-qualifier floating-point vector of 4 components.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 499 of file fwd.hpp.

+ +
+
+ +

◆ highp_float32

+ +
+
+ + + + +
typedef float32 highp_float32
+
+ +

High 32 bit single-qualifier floating-point scalar.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 154 of file fwd.hpp.

+ +
+
+ +

◆ highp_float32_t

+ +
+
+ + + + +
typedef float32 highp_float32_t
+
+ +

High 32 bit single-qualifier floating-point scalar.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 159 of file fwd.hpp.

+ +
+
+ +

◆ highp_float64

+ +
+
+ + + + +
typedef float64 highp_float64
+
+ +

High 64 bit double-qualifier floating-point scalar.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 170 of file fwd.hpp.

+ +
+
+ +

◆ highp_float64_t

+ +
+
+ + + + +
typedef float64 highp_float64_t
+
+ +

High 64 bit double-qualifier floating-point scalar.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 175 of file fwd.hpp.

+ +
+
+ +

◆ highp_fmat2

+ +
+
+ + + + +
typedef highp_fmat2x2 highp_fmat2
+
+ +

High single-qualifier floating-point 1x1 matrix.

+
See also
GLM_GTC_type_precision High single-qualifier floating-point 2x2 matrix.
+
+GLM_GTC_type_precision
+ +

Definition at line 532 of file fwd.hpp.

+ +
+
+ +

◆ highp_fmat2x2

+ +
+
+ + + + +
typedef mat< 2, 2, f32, highp > highp_fmat2x2
+
+ +

High single-qualifier floating-point 1x1 matrix.

+
See also
GLM_GTC_type_precision High single-qualifier floating-point 2x2 matrix.
+
+GLM_GTC_type_precision
+ +

Definition at line 650 of file fwd.hpp.

+ +
+
+ +

◆ highp_fmat2x3

+ +
+
+ + + + +
typedef mat< 2, 3, f32, highp > highp_fmat2x3
+
+ +

High single-qualifier floating-point 2x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 651 of file fwd.hpp.

+ +
+
+ +

◆ highp_fmat2x4

+ +
+
+ + + + +
typedef mat< 2, 4, f32, highp > highp_fmat2x4
+
+ +

High single-qualifier floating-point 2x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 652 of file fwd.hpp.

+ +
+
+ +

◆ highp_fmat3

+ +
+
+ + + + +
typedef highp_fmat3x3 highp_fmat3
+
+ +

High single-qualifier floating-point 3x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 533 of file fwd.hpp.

+ +
+
+ +

◆ highp_fmat3x2

+ +
+
+ + + + +
typedef mat< 3, 2, f32, highp > highp_fmat3x2
+
+ +

High single-qualifier floating-point 3x2 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 653 of file fwd.hpp.

+ +
+
+ +

◆ highp_fmat3x3

+ +
+
+ + + + +
typedef mat< 3, 3, f32, highp > highp_fmat3x3
+
+ +

High single-qualifier floating-point 3x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 654 of file fwd.hpp.

+ +
+
+ +

◆ highp_fmat3x4

+ +
+
+ + + + +
typedef mat< 3, 4, f32, highp > highp_fmat3x4
+
+ +

High single-qualifier floating-point 3x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 655 of file fwd.hpp.

+ +
+
+ +

◆ highp_fmat4

+ +
+
+ + + + +
typedef highp_fmat4x4 highp_fmat4
+
+ +

High single-qualifier floating-point 4x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 534 of file fwd.hpp.

+ +
+
+ +

◆ highp_fmat4x2

+ +
+
+ + + + +
typedef mat< 4, 2, f32, highp > highp_fmat4x2
+
+ +

High single-qualifier floating-point 4x2 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 656 of file fwd.hpp.

+ +
+
+ +

◆ highp_fmat4x3

+ +
+
+ + + + +
typedef mat< 4, 3, f32, highp > highp_fmat4x3
+
+ +

High single-qualifier floating-point 4x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 657 of file fwd.hpp.

+ +
+
+ +

◆ highp_fmat4x4

+ +
+
+ + + + +
typedef mat< 4, 4, f32, highp > highp_fmat4x4
+
+ +

High single-qualifier floating-point 4x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 658 of file fwd.hpp.

+ +
+
+ +

◆ highp_fvec1

+ +
+
+ + + + +
typedef vec< 1, float, highp > highp_fvec1
+
+ +

High single-qualifier floating-point vector of 1 component.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 436 of file fwd.hpp.

+ +
+
+ +

◆ highp_fvec2

+ +
+
+ + + + +
typedef vec< 2, float, highp > highp_fvec2
+
+ +

High Single-qualifier floating-point vector of 2 components.

+
See also
core_precision
+ +

Definition at line 437 of file fwd.hpp.

+ +
+
+ +

◆ highp_fvec3

+ +
+
+ + + + +
typedef vec< 3, float, highp > highp_fvec3
+
+ +

High Single-qualifier floating-point vector of 3 components.

+
See also
core_precision
+ +

Definition at line 438 of file fwd.hpp.

+ +
+
+ +

◆ highp_fvec4

+ +
+
+ + + + +
typedef vec< 4, float, highp > highp_fvec4
+
+ +

High Single-qualifier floating-point vector of 4 components.

+
See also
core_precision
+ +

Definition at line 439 of file fwd.hpp.

+ +
+
+ +

◆ highp_i16

+ +
+
+ + + + +
typedef detail::int16 highp_i16
+
+ +

High qualifier 16 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 47 of file fwd.hpp.

+ +
+
+ +

◆ highp_i16vec1

+ +
+
+ + + + +
typedef vec< 1, i16, highp > highp_i16vec1
+
+ +

High qualifier 16 bit signed integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 252 of file fwd.hpp.

+ +
+
+ +

◆ highp_i16vec2

+ +
+
+ + + + +
typedef vec< 2, i16, highp > highp_i16vec2
+
+ +

High qualifier 16 bit signed integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 253 of file fwd.hpp.

+ +
+
+ +

◆ highp_i16vec3

+ +
+
+ + + + +
typedef vec< 3, i16, highp > highp_i16vec3
+
+ +

High qualifier 16 bit signed integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 254 of file fwd.hpp.

+ +
+
+ +

◆ highp_i16vec4

+ +
+
+ + + + +
typedef vec< 4, i16, highp > highp_i16vec4
+
+ +

High qualifier 16 bit signed integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 255 of file fwd.hpp.

+ +
+
+ +

◆ highp_i32

+ +
+
+ + + + +
typedef detail::int32 highp_i32
+
+ +

High qualifier 32 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 61 of file fwd.hpp.

+ +
+
+ +

◆ highp_i32vec1

+ +
+
+ + + + +
typedef vec< 1, i32, highp > highp_i32vec1
+
+ +

High qualifier 32 bit signed integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 272 of file fwd.hpp.

+ +
+
+ +

◆ highp_i32vec2

+ +
+
+ + + + +
typedef vec< 2, i32, highp > highp_i32vec2
+
+ +

High qualifier 32 bit signed integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 273 of file fwd.hpp.

+ +
+
+ +

◆ highp_i32vec3

+ +
+
+ + + + +
typedef vec< 3, i32, highp > highp_i32vec3
+
+ +

High qualifier 32 bit signed integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 274 of file fwd.hpp.

+ +
+
+ +

◆ highp_i32vec4

+ +
+
+ + + + +
typedef vec< 4, i32, highp > highp_i32vec4
+
+ +

High qualifier 32 bit signed integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 275 of file fwd.hpp.

+ +
+
+ +

◆ highp_i64

+ +
+
+ + + + +
typedef detail::int64 highp_i64
+
+ +

High qualifier 64 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 75 of file fwd.hpp.

+ +
+
+ +

◆ highp_i64vec1

+ +
+
+ + + + +
typedef vec< 1, i64, highp > highp_i64vec1
+
+ +

High qualifier 64 bit signed integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 292 of file fwd.hpp.

+ +
+
+ +

◆ highp_i64vec2

+ +
+
+ + + + +
typedef vec< 2, i64, highp > highp_i64vec2
+
+ +

High qualifier 64 bit signed integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 293 of file fwd.hpp.

+ +
+
+ +

◆ highp_i64vec3

+ +
+
+ + + + +
typedef vec< 3, i64, highp > highp_i64vec3
+
+ +

High qualifier 64 bit signed integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 294 of file fwd.hpp.

+ +
+
+ +

◆ highp_i64vec4

+ +
+
+ + + + +
typedef vec< 4, i64, highp > highp_i64vec4
+
+ +

High qualifier 64 bit signed integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 295 of file fwd.hpp.

+ +
+
+ +

◆ highp_i8

+ +
+
+ + + + +
typedef detail::int8 highp_i8
+
+ +

High qualifier 8 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 33 of file fwd.hpp.

+ +
+
+ +

◆ highp_i8vec1

+ +
+
+ + + + +
typedef vec< 1, i8, highp > highp_i8vec1
+
+ +

High qualifier 8 bit signed integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 232 of file fwd.hpp.

+ +
+
+ +

◆ highp_i8vec2

+ +
+
+ + + + +
typedef vec< 2, i8, highp > highp_i8vec2
+
+ +

High qualifier 8 bit signed integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 233 of file fwd.hpp.

+ +
+
+ +

◆ highp_i8vec3

+ +
+
+ + + + +
typedef vec< 3, i8, highp > highp_i8vec3
+
+ +

High qualifier 8 bit signed integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 234 of file fwd.hpp.

+ +
+
+ +

◆ highp_i8vec4

+ +
+
+ + + + +
typedef vec< 4, i8, highp > highp_i8vec4
+
+ +

High qualifier 8 bit signed integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 235 of file fwd.hpp.

+ +
+
+ +

◆ highp_int16

+ +
+
+ + + + +
typedef detail::int16 highp_int16
+
+ +

High qualifier 16 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 52 of file fwd.hpp.

+ +
+
+ +

◆ highp_int16_t

+ +
+
+ + + + +
typedef detail::int16 highp_int16_t
+
+ +

High qualifier 16 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 56 of file fwd.hpp.

+ +
+
+ +

◆ highp_int32

+ +
+
+ + + + +
typedef detail::int32 highp_int32
+
+ +

High qualifier 32 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 66 of file fwd.hpp.

+ +
+
+ +

◆ highp_int32_t

+ +
+
+ + + + +
typedef detail::int32 highp_int32_t
+
+ +

32 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 70 of file fwd.hpp.

+ +
+
+ +

◆ highp_int64

+ +
+
+ + + + +
typedef detail::int64 highp_int64
+
+ +

High qualifier 64 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 80 of file fwd.hpp.

+ +
+
+ +

◆ highp_int64_t

+ +
+
+ + + + +
typedef detail::int64 highp_int64_t
+
+ +

High qualifier 64 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 84 of file fwd.hpp.

+ +
+
+ +

◆ highp_int8

+ +
+
+ + + + +
typedef detail::int8 highp_int8
+
+ +

High qualifier 8 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 38 of file fwd.hpp.

+ +
+
+ +

◆ highp_int8_t

+ +
+
+ + + + +
typedef detail::int8 highp_int8_t
+
+ +

High qualifier 8 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 42 of file fwd.hpp.

+ +
+
+ +

◆ highp_u16

+ +
+
+ + + + +
typedef detail::uint16 highp_u16
+
+ +

High qualifier 16 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 105 of file fwd.hpp.

+ +
+
+ +

◆ highp_u16vec1

+ +
+
+ + + + +
typedef vec< 1, u16, highp > highp_u16vec1
+
+ +

High qualifier 16 bit unsigned integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 354 of file fwd.hpp.

+ +
+
+ +

◆ highp_u16vec2

+ +
+
+ + + + +
typedef vec< 2, u16, highp > highp_u16vec2
+
+ +

High qualifier 16 bit unsigned integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 355 of file fwd.hpp.

+ +
+
+ +

◆ highp_u16vec3

+ +
+
+ + + + +
typedef vec< 3, u16, highp > highp_u16vec3
+
+ +

High qualifier 16 bit unsigned integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 356 of file fwd.hpp.

+ +
+
+ +

◆ highp_u16vec4

+ +
+
+ + + + +
typedef vec< 4, u16, highp > highp_u16vec4
+
+ +

High qualifier 16 bit unsigned integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 357 of file fwd.hpp.

+ +
+
+ +

◆ highp_u32

+ +
+
+ + + + +
typedef detail::uint32 highp_u32
+
+ +

High qualifier 32 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 119 of file fwd.hpp.

+ +
+
+ +

◆ highp_u32vec1

+ +
+
+ + + + +
typedef vec< 1, u32, highp > highp_u32vec1
+
+ +

High qualifier 32 bit unsigned integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 374 of file fwd.hpp.

+ +
+
+ +

◆ highp_u32vec2

+ +
+
+ + + + +
typedef vec< 2, u32, highp > highp_u32vec2
+
+ +

High qualifier 32 bit unsigned integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 375 of file fwd.hpp.

+ +
+
+ +

◆ highp_u32vec3

+ +
+
+ + + + +
typedef vec< 3, u32, highp > highp_u32vec3
+
+ +

High qualifier 32 bit unsigned integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 376 of file fwd.hpp.

+ +
+
+ +

◆ highp_u32vec4

+ +
+
+ + + + +
typedef vec< 4, u32, highp > highp_u32vec4
+
+ +

High qualifier 32 bit unsigned integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 377 of file fwd.hpp.

+ +
+
+ +

◆ highp_u64

+ +
+
+ + + + +
typedef detail::uint64 highp_u64
+
+ +

High qualifier 64 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 133 of file fwd.hpp.

+ +
+
+ +

◆ highp_u64vec1

+ +
+
+ + + + +
typedef vec< 1, u64, highp > highp_u64vec1
+
+ +

High qualifier 64 bit unsigned integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 394 of file fwd.hpp.

+ +
+
+ +

◆ highp_u64vec2

+ +
+
+ + + + +
typedef vec< 2, u64, highp > highp_u64vec2
+
+ +

High qualifier 64 bit unsigned integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 395 of file fwd.hpp.

+ +
+
+ +

◆ highp_u64vec3

+ +
+
+ + + + +
typedef vec< 3, u64, highp > highp_u64vec3
+
+ +

High qualifier 64 bit unsigned integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 396 of file fwd.hpp.

+ +
+
+ +

◆ highp_u64vec4

+ +
+
+ + + + +
typedef vec< 4, u64, highp > highp_u64vec4
+
+ +

High qualifier 64 bit unsigned integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 397 of file fwd.hpp.

+ +
+
+ +

◆ highp_u8

+ +
+
+ + + + +
typedef detail::uint8 highp_u8
+
+ +

High qualifier 8 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 91 of file fwd.hpp.

+ +
+
+ +

◆ highp_u8vec1

+ +
+
+ + + + +
typedef vec< 1, u8, highp > highp_u8vec1
+
+ +

High qualifier 8 bit unsigned integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 334 of file fwd.hpp.

+ +
+
+ +

◆ highp_u8vec2

+ +
+
+ + + + +
typedef vec< 2, u8, highp > highp_u8vec2
+
+ +

High qualifier 8 bit unsigned integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 335 of file fwd.hpp.

+ +
+
+ +

◆ highp_u8vec3

+ +
+
+ + + + +
typedef vec< 3, u8, highp > highp_u8vec3
+
+ +

High qualifier 8 bit unsigned integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 336 of file fwd.hpp.

+ +
+
+ +

◆ highp_u8vec4

+ +
+
+ + + + +
typedef vec< 4, u8, highp > highp_u8vec4
+
+ +

High qualifier 8 bit unsigned integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 337 of file fwd.hpp.

+ +
+
+ +

◆ highp_uint16

+ +
+
+ + + + +
typedef detail::uint16 highp_uint16
+
+ +

High qualifier 16 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 110 of file fwd.hpp.

+ +
+
+ +

◆ highp_uint16_t

+ +
+
+ + + + +
typedef detail::uint16 highp_uint16_t
+
+ +

High qualifier 16 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 114 of file fwd.hpp.

+ +
+
+ +

◆ highp_uint32

+ +
+
+ + + + +
typedef detail::uint32 highp_uint32
+
+ +

High qualifier 32 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 124 of file fwd.hpp.

+ +
+
+ +

◆ highp_uint32_t

+ +
+
+ + + + +
typedef detail::uint32 highp_uint32_t
+
+ +

High qualifier 32 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 128 of file fwd.hpp.

+ +
+
+ +

◆ highp_uint64

+ +
+
+ + + + +
typedef detail::uint64 highp_uint64
+
+ +

High qualifier 64 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 138 of file fwd.hpp.

+ +
+
+ +

◆ highp_uint64_t

+ +
+
+ + + + +
typedef detail::uint64 highp_uint64_t
+
+ +

High qualifier 64 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 142 of file fwd.hpp.

+ +
+
+ +

◆ highp_uint8

+ +
+
+ + + + +
typedef detail::uint8 highp_uint8
+
+ +

High qualifier 8 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 96 of file fwd.hpp.

+ +
+
+ +

◆ highp_uint8_t

+ +
+
+ + + + +
typedef detail::uint8 highp_uint8_t
+
+ +

High qualifier 8 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 100 of file fwd.hpp.

+ +
+
+ +

◆ i16

+ +
+
+ + + + +
typedef detail::int16 i16
+
+ +

16 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 48 of file fwd.hpp.

+ +
+
+ +

◆ i16vec1

+ +
+
+ + + + +
typedef vec< 1, i16, defaultp > i16vec1
+
+ +

16 bit signed integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 257 of file fwd.hpp.

+ +
+
+ +

◆ i16vec2

+ +
+
+ + + + +
typedef vec< 2, i16, defaultp > i16vec2
+
+ +

16 bit signed integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 258 of file fwd.hpp.

+ +
+
+ +

◆ i16vec3

+ +
+
+ + + + +
typedef vec< 3, i16, defaultp > i16vec3
+
+ +

16 bit signed integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 259 of file fwd.hpp.

+ +
+
+ +

◆ i16vec4

+ +
+
+ + + + +
typedef vec< 4, i16, defaultp > i16vec4
+
+ +

16 bit signed integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 260 of file fwd.hpp.

+ +
+
+ +

◆ i32

+ +
+
+ + + + +
typedef detail::int32 i32
+
+ +

32 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 62 of file fwd.hpp.

+ +
+
+ +

◆ i32vec1

+ +
+
+ + + + +
typedef vec< 1, i32, defaultp > i32vec1
+
+ +

32 bit signed integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 277 of file fwd.hpp.

+ +
+
+ +

◆ i32vec2

+ +
+
+ + + + +
typedef vec< 2, i32, defaultp > i32vec2
+
+ +

32 bit signed integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 278 of file fwd.hpp.

+ +
+
+ +

◆ i32vec3

+ +
+
+ + + + +
typedef vec< 3, i32, defaultp > i32vec3
+
+ +

32 bit signed integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 279 of file fwd.hpp.

+ +
+
+ +

◆ i32vec4

+ +
+
+ + + + +
typedef vec< 4, i32, defaultp > i32vec4
+
+ +

32 bit signed integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 280 of file fwd.hpp.

+ +
+
+ +

◆ i64

+ +
+
+ + + + +
typedef detail::int64 i64
+
+ +

64 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 76 of file fwd.hpp.

+ +
+
+ +

◆ i64vec1

+ +
+
+ + + + +
typedef vec< 1, i64, defaultp > i64vec1
+
+ +

64 bit signed integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 297 of file fwd.hpp.

+ +
+
+ +

◆ i64vec2

+ +
+
+ + + + +
typedef vec< 2, i64, defaultp > i64vec2
+
+ +

64 bit signed integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 298 of file fwd.hpp.

+ +
+
+ +

◆ i64vec3

+ +
+
+ + + + +
typedef vec< 3, i64, defaultp > i64vec3
+
+ +

64 bit signed integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 299 of file fwd.hpp.

+ +
+
+ +

◆ i64vec4

+ +
+
+ + + + +
typedef vec< 4, i64, defaultp > i64vec4
+
+ +

64 bit signed integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 300 of file fwd.hpp.

+ +
+
+ +

◆ i8

+ +
+
+ + + + +
typedef detail::int8 i8
+
+ +

8 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 34 of file fwd.hpp.

+ +
+
+ +

◆ i8vec1

+ +
+
+ + + + +
typedef vec< 1, i8, defaultp > i8vec1
+
+ +

8 bit signed integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 237 of file fwd.hpp.

+ +
+
+ +

◆ i8vec2

+ +
+
+ + + + +
typedef vec< 2, i8, defaultp > i8vec2
+
+ +

8 bit signed integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 238 of file fwd.hpp.

+ +
+
+ +

◆ i8vec3

+ +
+
+ + + + +
typedef vec< 3, i8, defaultp > i8vec3
+
+ +

8 bit signed integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 239 of file fwd.hpp.

+ +
+
+ +

◆ i8vec4

+ +
+
+ + + + +
typedef vec< 4, i8, defaultp > i8vec4
+
+ +

8 bit signed integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 240 of file fwd.hpp.

+ +
+
+ +

◆ int16_t

+ +
+
+ + + + +
typedef detail::int16 int16_t
+
+ +

16 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 57 of file fwd.hpp.

+ +
+
+ +

◆ int32_t

+ +
+
+ + + + +
typedef detail::int32 int32_t
+
+ +

32 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 71 of file fwd.hpp.

+ +
+
+ +

◆ int64_t

+ +
+
+ + + + +
typedef detail::int64 int64_t
+
+ +

64 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 85 of file fwd.hpp.

+ +
+
+ +

◆ int8_t

+ +
+
+ + + + +
typedef detail::int8 int8_t
+
+ +

8 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 43 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f32

+ +
+
+ + + + +
typedef float32 lowp_f32
+
+ +

Low 32 bit single-qualifier floating-point scalar.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 147 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f32mat2

+ +
+
+ + + + +
typedef lowp_f32mat2x2 lowp_f32mat2
+
+ +

Low single-qualifier floating-point 1x1 matrix.

+
See also
GLM_GTC_type_precision Low single-qualifier floating-point 2x2 matrix.
+
+GLM_GTC_type_precision
+ +

Definition at line 540 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f32mat2x2

+ +
+
+ + + + +
typedef mat< 2, 2, f32, lowp > lowp_f32mat2x2
+
+ +

Low single-qualifier floating-point 1x1 matrix.

+
See also
GLM_GTC_type_precision Low single-qualifier floating-point 2x2 matrix.
+
+GLM_GTC_type_precision
+ +

Definition at line 670 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f32mat2x3

+ +
+
+ + + + +
typedef mat< 2, 3, f32, lowp > lowp_f32mat2x3
+
+ +

Low single-qualifier floating-point 2x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 671 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f32mat2x4

+ +
+
+ + + + +
typedef mat< 2, 4, f32, lowp > lowp_f32mat2x4
+
+ +

Low single-qualifier floating-point 2x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 672 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f32mat3

+ +
+
+ + + + +
typedef lowp_f32mat3x3 lowp_f32mat3
+
+ +

Low single-qualifier floating-point 3x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 541 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f32mat3x2

+ +
+
+ + + + +
typedef mat< 3, 2, f32, lowp > lowp_f32mat3x2
+
+ +

Low single-qualifier floating-point 3x2 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 673 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f32mat3x3

+ +
+
+ + + + +
typedef mat< 3, 3, f32, lowp > lowp_f32mat3x3
+
+ +

Low single-qualifier floating-point 3x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 674 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f32mat3x4

+ +
+
+ + + + +
typedef mat< 3, 4, f32, lowp > lowp_f32mat3x4
+
+ +

Low single-qualifier floating-point 3x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 675 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f32mat4

+ +
+
+ + + + +
typedef lowp_f32mat4x4 lowp_f32mat4
+
+ +

Low single-qualifier floating-point 4x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 542 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f32mat4x2

+ +
+
+ + + + +
typedef mat< 4, 2, f32, lowp > lowp_f32mat4x2
+
+ +

Low single-qualifier floating-point 4x2 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 676 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f32mat4x3

+ +
+
+ + + + +
typedef mat< 4, 3, f32, lowp > lowp_f32mat4x3
+
+ +

Low single-qualifier floating-point 4x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 677 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f32mat4x4

+ +
+
+ + + + +
typedef mat< 4, 4, f32, lowp > lowp_f32mat4x4
+
+ +

Low single-qualifier floating-point 4x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 678 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f32quat

+ +
+
+ + + + +
typedef qua< f32, lowp > lowp_f32quat
+
+ +

Low single-qualifier floating-point quaternion.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 802 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f32vec1

+ +
+
+ + + + +
typedef vec< 1, f32, lowp > lowp_f32vec1
+
+ +

Low single-qualifier floating-point vector of 1 component.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 446 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f32vec2

+ +
+
+ + + + +
typedef vec< 2, f32, lowp > lowp_f32vec2
+
+ +

Low single-qualifier floating-point vector of 2 components.

+
See also
core_precision
+ +

Definition at line 447 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f32vec3

+ +
+
+ + + + +
typedef vec< 3, f32, lowp > lowp_f32vec3
+
+ +

Low single-qualifier floating-point vector of 3 components.

+
See also
core_precision
+ +

Definition at line 448 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f32vec4

+ +
+
+ + + + +
typedef vec< 4, f32, lowp > lowp_f32vec4
+
+ +

Low single-qualifier floating-point vector of 4 components.

+
See also
core_precision
+ +

Definition at line 449 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f64

+ +
+
+ + + + +
typedef float64 lowp_f64
+
+ +

Low 64 bit double-qualifier floating-point scalar.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 163 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f64mat2

+ +
+
+ + + + +
typedef lowp_f64mat2x2 lowp_f64mat2
+
+ +

Low double-qualifier floating-point 1x1 matrix.

+
See also
GLM_GTC_type_precision Low double-qualifier floating-point 2x2 matrix.
+
+GLM_GTC_type_precision
+ +

Definition at line 572 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f64mat2x2

+ +
+
+ + + + +
typedef mat< 2, 2, f64, lowp > lowp_f64mat2x2
+
+ +

Low double-qualifier floating-point 1x1 matrix.

+
See also
GLM_GTC_type_precision Low double-qualifier floating-point 2x2 matrix.
+
+GLM_GTC_type_precision
+ +

Definition at line 750 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f64mat2x3

+ +
+
+ + + + +
typedef mat< 2, 3, f64, lowp > lowp_f64mat2x3
+
+ +

Low double-qualifier floating-point 2x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 751 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f64mat2x4

+ +
+
+ + + + +
typedef mat< 2, 4, f64, lowp > lowp_f64mat2x4
+
+ +

Low double-qualifier floating-point 2x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 752 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f64mat3

+ +
+
+ + + + +
typedef lowp_f64mat3x3 lowp_f64mat3
+
+ +

Low double-qualifier floating-point 3x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 573 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f64mat3x2

+ +
+
+ + + + +
typedef mat< 3, 2, f64, lowp > lowp_f64mat3x2
+
+ +

Low double-qualifier floating-point 3x2 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 753 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f64mat3x3

+ +
+
+ + + + +
typedef mat< 3, 3, f64, lowp > lowp_f64mat3x3
+
+ +

Low double-qualifier floating-point 3x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 754 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f64mat3x4

+ +
+
+ + + + +
typedef mat< 3, 4, f64, lowp > lowp_f64mat3x4
+
+ +

Low double-qualifier floating-point 3x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 755 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f64mat4

+ +
+
+ + + + +
typedef lowp_f64mat4x4 lowp_f64mat4
+
+ +

Low double-qualifier floating-point 4x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 574 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f64mat4x2

+ +
+
+ + + + +
typedef mat< 4, 2, f64, lowp > lowp_f64mat4x2
+
+ +

Low double-qualifier floating-point 4x2 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 756 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f64mat4x3

+ +
+
+ + + + +
typedef mat< 4, 3, f64, lowp > lowp_f64mat4x3
+
+ +

Low double-qualifier floating-point 4x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 757 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f64mat4x4

+ +
+
+ + + + +
typedef mat< 4, 4, f64, lowp > lowp_f64mat4x4
+
+ +

Low double-qualifier floating-point 4x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 758 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f64quat

+ +
+
+ + + + +
typedef qua< f64, lowp > lowp_f64quat
+
+ +

Low double-qualifier floating-point quaternion.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 812 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f64vec1

+ +
+
+ + + + +
typedef vec< 1, f64, lowp > lowp_f64vec1
+
+ +

Low double-qualifier floating-point vector of 1 component.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 486 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f64vec2

+ +
+
+ + + + +
typedef vec< 2, f64, lowp > lowp_f64vec2
+
+ +

Low double-qualifier floating-point vector of 2 components.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 487 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f64vec3

+ +
+
+ + + + +
typedef vec< 3, f64, lowp > lowp_f64vec3
+
+ +

Low double-qualifier floating-point vector of 3 components.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 488 of file fwd.hpp.

+ +
+
+ +

◆ lowp_f64vec4

+ +
+
+ + + + +
typedef vec< 4, f64, lowp > lowp_f64vec4
+
+ +

Low double-qualifier floating-point vector of 4 components.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 489 of file fwd.hpp.

+ +
+
+ +

◆ lowp_float32

+ +
+
+ + + + +
typedef float32 lowp_float32
+
+ +

Low 32 bit single-qualifier floating-point scalar.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 152 of file fwd.hpp.

+ +
+
+ +

◆ lowp_float32_t

+ +
+
+ + + + +
typedef float32 lowp_float32_t
+
+ +

Low 32 bit single-qualifier floating-point scalar.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 157 of file fwd.hpp.

+ +
+
+ +

◆ lowp_float64

+ +
+
+ + + + +
typedef float64 lowp_float64
+
+ +

Low 64 bit double-qualifier floating-point scalar.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 168 of file fwd.hpp.

+ +
+
+ +

◆ lowp_float64_t

+ +
+
+ + + + +
typedef float64 lowp_float64_t
+
+ +

Low 64 bit double-qualifier floating-point scalar.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 173 of file fwd.hpp.

+ +
+
+ +

◆ lowp_fmat2

+ +
+
+ + + + +
typedef lowp_fmat2x2 lowp_fmat2
+
+ +

Low single-qualifier floating-point 1x1 matrix.

+
See also
GLM_GTC_type_precision Low single-qualifier floating-point 2x2 matrix.
+
+GLM_GTC_type_precision
+ +

Definition at line 524 of file fwd.hpp.

+ +
+
+ +

◆ lowp_fmat2x2

+ +
+
+ + + + +
typedef mat< 2, 2, f32, lowp > lowp_fmat2x2
+
+ +

Low single-qualifier floating-point 1x1 matrix.

+
See also
GLM_GTC_type_precision Low single-qualifier floating-point 2x2 matrix.
+
+GLM_GTC_type_precision
+ +

Definition at line 630 of file fwd.hpp.

+ +
+
+ +

◆ lowp_fmat2x3

+ +
+
+ + + + +
typedef mat< 2, 3, f32, lowp > lowp_fmat2x3
+
+ +

Low single-qualifier floating-point 2x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 631 of file fwd.hpp.

+ +
+
+ +

◆ lowp_fmat2x4

+ +
+
+ + + + +
typedef mat< 2, 4, f32, lowp > lowp_fmat2x4
+
+ +

Low single-qualifier floating-point 2x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 632 of file fwd.hpp.

+ +
+
+ +

◆ lowp_fmat3

+ +
+
+ + + + +
typedef lowp_fmat3x3 lowp_fmat3
+
+ +

Low single-qualifier floating-point 3x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 525 of file fwd.hpp.

+ +
+
+ +

◆ lowp_fmat3x2

+ +
+
+ + + + +
typedef mat< 3, 2, f32, lowp > lowp_fmat3x2
+
+ +

Low single-qualifier floating-point 3x2 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 633 of file fwd.hpp.

+ +
+
+ +

◆ lowp_fmat3x3

+ +
+
+ + + + +
typedef mat< 3, 3, f32, lowp > lowp_fmat3x3
+
+ +

Low single-qualifier floating-point 3x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 634 of file fwd.hpp.

+ +
+
+ +

◆ lowp_fmat3x4

+ +
+
+ + + + +
typedef mat< 3, 4, f32, lowp > lowp_fmat3x4
+
+ +

Low single-qualifier floating-point 3x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 635 of file fwd.hpp.

+ +
+
+ +

◆ lowp_fmat4

+ +
+
+ + + + +
typedef lowp_fmat4x4 lowp_fmat4
+
+ +

Low single-qualifier floating-point 4x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 526 of file fwd.hpp.

+ +
+
+ +

◆ lowp_fmat4x2

+ +
+
+ + + + +
typedef mat< 4, 2, f32, lowp > lowp_fmat4x2
+
+ +

Low single-qualifier floating-point 4x2 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 636 of file fwd.hpp.

+ +
+
+ +

◆ lowp_fmat4x3

+ +
+
+ + + + +
typedef mat< 4, 3, f32, lowp > lowp_fmat4x3
+
+ +

Low single-qualifier floating-point 4x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 637 of file fwd.hpp.

+ +
+
+ +

◆ lowp_fmat4x4

+ +
+
+ + + + +
typedef mat< 4, 4, f32, lowp > lowp_fmat4x4
+
+ +

Low single-qualifier floating-point 4x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 638 of file fwd.hpp.

+ +
+
+ +

◆ lowp_fvec1

+ +
+
+ + + + +
typedef vec< 1, float, lowp > lowp_fvec1
+
+ +

Low single-qualifier floating-point vector of 1 component.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 426 of file fwd.hpp.

+ +
+
+ +

◆ lowp_fvec2

+ +
+
+ + + + +
typedef vec< 2, float, lowp > lowp_fvec2
+
+ +

Low single-qualifier floating-point vector of 2 components.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 427 of file fwd.hpp.

+ +
+
+ +

◆ lowp_fvec3

+ +
+
+ + + + +
typedef vec< 3, float, lowp > lowp_fvec3
+
+ +

Low single-qualifier floating-point vector of 3 components.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 428 of file fwd.hpp.

+ +
+
+ +

◆ lowp_fvec4

+ +
+
+ + + + +
typedef vec< 4, float, lowp > lowp_fvec4
+
+ +

Low single-qualifier floating-point vector of 4 components.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 429 of file fwd.hpp.

+ +
+
+ +

◆ lowp_i16

+ +
+
+ + + + +
typedef detail::int16 lowp_i16
+
+ +

Low qualifier 16 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 45 of file fwd.hpp.

+ +
+
+ +

◆ lowp_i16vec1

+ +
+
+ + + + +
typedef vec< 1, i16, lowp > lowp_i16vec1
+
+ +

Low qualifier 16 bit signed integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 242 of file fwd.hpp.

+ +
+
+ +

◆ lowp_i16vec2

+ +
+
+ + + + +
typedef vec< 2, i16, lowp > lowp_i16vec2
+
+ +

Low qualifier 16 bit signed integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 243 of file fwd.hpp.

+ +
+
+ +

◆ lowp_i16vec3

+ +
+
+ + + + +
typedef vec< 3, i16, lowp > lowp_i16vec3
+
+ +

Low qualifier 16 bit signed integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 244 of file fwd.hpp.

+ +
+
+ +

◆ lowp_i16vec4

+ +
+
+ + + + +
typedef vec< 4, i16, lowp > lowp_i16vec4
+
+ +

Low qualifier 16 bit signed integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 245 of file fwd.hpp.

+ +
+
+ +

◆ lowp_i32

+ +
+
+ + + + +
typedef detail::int32 lowp_i32
+
+ +

Low qualifier 32 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 59 of file fwd.hpp.

+ +
+
+ +

◆ lowp_i32vec1

+ +
+
+ + + + +
typedef vec< 1, i32, lowp > lowp_i32vec1
+
+ +

Low qualifier 32 bit signed integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 262 of file fwd.hpp.

+ +
+
+ +

◆ lowp_i32vec2

+ +
+
+ + + + +
typedef vec< 2, i32, lowp > lowp_i32vec2
+
+ +

Low qualifier 32 bit signed integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 263 of file fwd.hpp.

+ +
+
+ +

◆ lowp_i32vec3

+ +
+
+ + + + +
typedef vec< 3, i32, lowp > lowp_i32vec3
+
+ +

Low qualifier 32 bit signed integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 264 of file fwd.hpp.

+ +
+
+ +

◆ lowp_i32vec4

+ +
+
+ + + + +
typedef vec< 4, i32, lowp > lowp_i32vec4
+
+ +

Low qualifier 32 bit signed integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 265 of file fwd.hpp.

+ +
+
+ +

◆ lowp_i64

+ +
+
+ + + + +
typedef detail::int64 lowp_i64
+
+ +

Low qualifier 64 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 73 of file fwd.hpp.

+ +
+
+ +

◆ lowp_i64vec1

+ +
+
+ + + + +
typedef vec< 1, i64, lowp > lowp_i64vec1
+
+ +

Low qualifier 64 bit signed integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 282 of file fwd.hpp.

+ +
+
+ +

◆ lowp_i64vec2

+ +
+
+ + + + +
typedef vec< 2, i64, lowp > lowp_i64vec2
+
+ +

Low qualifier 64 bit signed integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 283 of file fwd.hpp.

+ +
+
+ +

◆ lowp_i64vec3

+ +
+
+ + + + +
typedef vec< 3, i64, lowp > lowp_i64vec3
+
+ +

Low qualifier 64 bit signed integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 284 of file fwd.hpp.

+ +
+
+ +

◆ lowp_i64vec4

+ +
+
+ + + + +
typedef vec< 4, i64, lowp > lowp_i64vec4
+
+ +

Low qualifier 64 bit signed integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 285 of file fwd.hpp.

+ +
+
+ +

◆ lowp_i8

+ +
+
+ + + + +
typedef detail::int8 lowp_i8
+
+ +

Low qualifier 8 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 31 of file fwd.hpp.

+ +
+
+ +

◆ lowp_i8vec1

+ +
+
+ + + + +
typedef vec< 1, i8, lowp > lowp_i8vec1
+
+ +

Low qualifier 8 bit signed integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 222 of file fwd.hpp.

+ +
+
+ +

◆ lowp_i8vec2

+ +
+
+ + + + +
typedef vec< 2, i8, lowp > lowp_i8vec2
+
+ +

Low qualifier 8 bit signed integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 223 of file fwd.hpp.

+ +
+
+ +

◆ lowp_i8vec3

+ +
+
+ + + + +
typedef vec< 3, i8, lowp > lowp_i8vec3
+
+ +

Low qualifier 8 bit signed integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 224 of file fwd.hpp.

+ +
+
+ +

◆ lowp_i8vec4

+ +
+
+ + + + +
typedef vec< 4, i8, lowp > lowp_i8vec4
+
+ +

Low qualifier 8 bit signed integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 225 of file fwd.hpp.

+ +
+
+ +

◆ lowp_int16

+ +
+
+ + + + +
typedef detail::int16 lowp_int16
+
+ +

Low qualifier 16 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 50 of file fwd.hpp.

+ +
+
+ +

◆ lowp_int16_t

+ +
+
+ + + + +
typedef detail::int16 lowp_int16_t
+
+ +

Low qualifier 16 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 54 of file fwd.hpp.

+ +
+
+ +

◆ lowp_int32

+ +
+
+ + + + +
typedef detail::int32 lowp_int32
+
+ +

Low qualifier 32 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 64 of file fwd.hpp.

+ +
+
+ +

◆ lowp_int32_t

+ +
+
+ + + + +
typedef detail::int32 lowp_int32_t
+
+ +

Low qualifier 32 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 68 of file fwd.hpp.

+ +
+
+ +

◆ lowp_int64

+ +
+
+ + + + +
typedef detail::int64 lowp_int64
+
+ +

Low qualifier 64 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 78 of file fwd.hpp.

+ +
+
+ +

◆ lowp_int64_t

+ +
+
+ + + + +
typedef detail::int64 lowp_int64_t
+
+ +

Low qualifier 64 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 82 of file fwd.hpp.

+ +
+
+ +

◆ lowp_int8

+ +
+
+ + + + +
typedef detail::int8 lowp_int8
+
+ +

Low qualifier 8 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 36 of file fwd.hpp.

+ +
+
+ +

◆ lowp_int8_t

+ +
+
+ + + + +
typedef detail::int8 lowp_int8_t
+
+ +

Low qualifier 8 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 40 of file fwd.hpp.

+ +
+
+ +

◆ lowp_u16

+ +
+
+ + + + +
typedef detail::uint16 lowp_u16
+
+ +

Low qualifier 16 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 103 of file fwd.hpp.

+ +
+
+ +

◆ lowp_u16vec1

+ +
+
+ + + + +
typedef vec< 1, u16, lowp > lowp_u16vec1
+
+ +

Low qualifier 16 bit unsigned integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 344 of file fwd.hpp.

+ +
+
+ +

◆ lowp_u16vec2

+ +
+
+ + + + +
typedef vec< 2, u16, lowp > lowp_u16vec2
+
+ +

Low qualifier 16 bit unsigned integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 345 of file fwd.hpp.

+ +
+
+ +

◆ lowp_u16vec3

+ +
+
+ + + + +
typedef vec< 3, u16, lowp > lowp_u16vec3
+
+ +

Low qualifier 16 bit unsigned integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 346 of file fwd.hpp.

+ +
+
+ +

◆ lowp_u16vec4

+ +
+
+ + + + +
typedef vec< 4, u16, lowp > lowp_u16vec4
+
+ +

Low qualifier 16 bit unsigned integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 347 of file fwd.hpp.

+ +
+
+ +

◆ lowp_u32

+ +
+
+ + + + +
typedef detail::uint32 lowp_u32
+
+ +

Low qualifier 32 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 117 of file fwd.hpp.

+ +
+
+ +

◆ lowp_u32vec1

+ +
+
+ + + + +
typedef vec< 1, u32, lowp > lowp_u32vec1
+
+ +

Low qualifier 32 bit unsigned integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 364 of file fwd.hpp.

+ +
+
+ +

◆ lowp_u32vec2

+ +
+
+ + + + +
typedef vec< 2, u32, lowp > lowp_u32vec2
+
+ +

Low qualifier 32 bit unsigned integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 365 of file fwd.hpp.

+ +
+
+ +

◆ lowp_u32vec3

+ +
+
+ + + + +
typedef vec< 3, u32, lowp > lowp_u32vec3
+
+ +

Low qualifier 32 bit unsigned integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 366 of file fwd.hpp.

+ +
+
+ +

◆ lowp_u32vec4

+ +
+
+ + + + +
typedef vec< 4, u32, lowp > lowp_u32vec4
+
+ +

Low qualifier 32 bit unsigned integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 367 of file fwd.hpp.

+ +
+
+ +

◆ lowp_u64

+ +
+
+ + + + +
typedef detail::uint64 lowp_u64
+
+ +

Low qualifier 64 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 131 of file fwd.hpp.

+ +
+
+ +

◆ lowp_u64vec1

+ +
+
+ + + + +
typedef vec< 1, u64, lowp > lowp_u64vec1
+
+ +

Low qualifier 64 bit unsigned integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 384 of file fwd.hpp.

+ +
+
+ +

◆ lowp_u64vec2

+ +
+
+ + + + +
typedef vec< 2, u64, lowp > lowp_u64vec2
+
+ +

Low qualifier 64 bit unsigned integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 385 of file fwd.hpp.

+ +
+
+ +

◆ lowp_u64vec3

+ +
+
+ + + + +
typedef vec< 3, u64, lowp > lowp_u64vec3
+
+ +

Low qualifier 64 bit unsigned integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 386 of file fwd.hpp.

+ +
+
+ +

◆ lowp_u64vec4

+ +
+
+ + + + +
typedef vec< 4, u64, lowp > lowp_u64vec4
+
+ +

Low qualifier 64 bit unsigned integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 387 of file fwd.hpp.

+ +
+
+ +

◆ lowp_u8

+ +
+
+ + + + +
typedef detail::uint8 lowp_u8
+
+ +

Low qualifier 8 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 89 of file fwd.hpp.

+ +
+
+ +

◆ lowp_u8vec1

+ +
+
+ + + + +
typedef vec< 1, u8, lowp > lowp_u8vec1
+
+ +

Low qualifier 8 bit unsigned integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 324 of file fwd.hpp.

+ +
+
+ +

◆ lowp_u8vec2

+ +
+
+ + + + +
typedef vec< 2, u8, lowp > lowp_u8vec2
+
+ +

Low qualifier 8 bit unsigned integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 325 of file fwd.hpp.

+ +
+
+ +

◆ lowp_u8vec3

+ +
+
+ + + + +
typedef vec< 3, u8, lowp > lowp_u8vec3
+
+ +

Low qualifier 8 bit unsigned integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 326 of file fwd.hpp.

+ +
+
+ +

◆ lowp_u8vec4

+ +
+
+ + + + +
typedef vec< 4, u8, lowp > lowp_u8vec4
+
+ +

Low qualifier 8 bit unsigned integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 327 of file fwd.hpp.

+ +
+
+ +

◆ lowp_uint16

+ +
+
+ + + + +
typedef detail::uint16 lowp_uint16
+
+ +

Low qualifier 16 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 108 of file fwd.hpp.

+ +
+
+ +

◆ lowp_uint16_t

+ +
+
+ + + + +
typedef detail::uint16 lowp_uint16_t
+
+ +

Low qualifier 16 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 112 of file fwd.hpp.

+ +
+
+ +

◆ lowp_uint32

+ +
+
+ + + + +
typedef detail::uint32 lowp_uint32
+
+ +

Low qualifier 32 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 122 of file fwd.hpp.

+ +
+
+ +

◆ lowp_uint32_t

+ +
+
+ + + + +
typedef detail::uint32 lowp_uint32_t
+
+ +

Low qualifier 32 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 126 of file fwd.hpp.

+ +
+
+ +

◆ lowp_uint64

+ +
+
+ + + + +
typedef detail::uint64 lowp_uint64
+
+ +

Low qualifier 64 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 136 of file fwd.hpp.

+ +
+
+ +

◆ lowp_uint64_t

+ +
+
+ + + + +
typedef detail::uint64 lowp_uint64_t
+
+ +

Low qualifier 64 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 140 of file fwd.hpp.

+ +
+
+ +

◆ lowp_uint8

+ +
+
+ + + + +
typedef detail::uint8 lowp_uint8
+
+ +

Low qualifier 8 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 94 of file fwd.hpp.

+ +
+
+ +

◆ lowp_uint8_t

+ +
+
+ + + + +
typedef detail::uint8 lowp_uint8_t
+
+ +

Low qualifier 8 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 98 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f32

+ +
+
+ + + + +
typedef float32 mediump_f32
+
+ +

Medium 32 bit single-qualifier floating-point scalar.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 148 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f32mat2

+ +
+
+ + + + +
typedef mediump_f32mat2x2 mediump_f32mat2
+
+ +

Medium single-qualifier floating-point 1x1 matrix.

+
See also
GLM_GTC_type_precision Medium single-qualifier floating-point 2x2 matrix.
+
+GLM_GTC_type_precision
+ +

Definition at line 544 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f32mat2x2

+ +
+
+ + + + +
typedef mat< 2, 2, f32, mediump > mediump_f32mat2x2
+
+ +

High single-qualifier floating-point 1x1 matrix.

+
See also
GLM_GTC_type_precision Low single-qualifier floating-point 2x2 matrix.
+
+GLM_GTC_type_precision
+ +

Definition at line 680 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f32mat2x3

+ +
+
+ + + + +
typedef mat< 2, 3, f32, mediump > mediump_f32mat2x3
+
+ +

Medium single-qualifier floating-point 2x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 681 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f32mat2x4

+ +
+
+ + + + +
typedef mat< 2, 4, f32, mediump > mediump_f32mat2x4
+
+ +

Medium single-qualifier floating-point 2x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 682 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f32mat3

+ +
+
+ + + + +
typedef mediump_f32mat3x3 mediump_f32mat3
+
+ +

Medium single-qualifier floating-point 3x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 545 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f32mat3x2

+ +
+
+ + + + +
typedef mat< 3, 2, f32, mediump > mediump_f32mat3x2
+
+ +

Medium single-qualifier floating-point 3x2 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 683 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f32mat3x3

+ +
+
+ + + + +
typedef mat< 3, 3, f32, mediump > mediump_f32mat3x3
+
+ +

Medium single-qualifier floating-point 3x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 684 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f32mat3x4

+ +
+
+ + + + +
typedef mat< 3, 4, f32, mediump > mediump_f32mat3x4
+
+ +

Medium single-qualifier floating-point 3x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 685 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f32mat4

+ +
+
+ + + + +
typedef mediump_f32mat4x4 mediump_f32mat4
+
+ +

Medium single-qualifier floating-point 4x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 546 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f32mat4x2

+ +
+
+ + + + +
typedef mat< 4, 2, f32, mediump > mediump_f32mat4x2
+
+ +

Medium single-qualifier floating-point 4x2 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 686 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f32mat4x3

+ +
+
+ + + + +
typedef mat< 4, 3, f32, mediump > mediump_f32mat4x3
+
+ +

Medium single-qualifier floating-point 4x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 687 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f32mat4x4

+ +
+
+ + + + +
typedef mat< 4, 4, f32, mediump > mediump_f32mat4x4
+
+ +

Medium single-qualifier floating-point 4x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 688 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f32quat

+ +
+
+ + + + +
typedef qua< f32, mediump > mediump_f32quat
+
+ +

Medium single-qualifier floating-point quaternion.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 803 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f32vec1

+ +
+
+ + + + +
typedef vec< 1, f32, mediump > mediump_f32vec1
+
+ +

Medium single-qualifier floating-point vector of 1 component.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 451 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f32vec2

+ +
+
+ + + + +
typedef vec< 2, f32, mediump > mediump_f32vec2
+
+ +

Medium single-qualifier floating-point vector of 2 components.

+
See also
core_precision
+ +

Definition at line 452 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f32vec3

+ +
+
+ + + + +
typedef vec< 3, f32, mediump > mediump_f32vec3
+
+ +

Medium single-qualifier floating-point vector of 3 components.

+
See also
core_precision
+ +

Definition at line 453 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f32vec4

+ +
+
+ + + + +
typedef vec< 4, f32, mediump > mediump_f32vec4
+
+ +

Medium single-qualifier floating-point vector of 4 components.

+
See also
core_precision
+ +

Definition at line 454 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f64

+ +
+
+ + + + +
typedef float64 mediump_f64
+
+ +

Medium 64 bit double-qualifier floating-point scalar.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 164 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f64mat2

+ +
+
+ + + + +
typedef mediump_f64mat2x2 mediump_f64mat2
+
+ +

Medium double-qualifier floating-point 1x1 matrix.

+
See also
GLM_GTC_type_precision Medium double-qualifier floating-point 2x2 matrix.
+
+GLM_GTC_type_precision
+ +

Definition at line 576 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f64mat2x2

+ +
+
+ + + + +
typedef mat< 2, 2, f64, mediump > mediump_f64mat2x2
+
+ +

Medium double-qualifier floating-point 1x1 matrix.

+
See also
GLM_GTC_type_precision Medium double-qualifier floating-point 2x2 matrix.
+
+GLM_GTC_type_precision
+ +

Definition at line 760 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f64mat2x3

+ +
+
+ + + + +
typedef mat< 2, 3, f64, mediump > mediump_f64mat2x3
+
+ +

Medium double-qualifier floating-point 2x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 761 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f64mat2x4

+ +
+
+ + + + +
typedef mat< 2, 4, f64, mediump > mediump_f64mat2x4
+
+ +

Medium double-qualifier floating-point 2x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 762 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f64mat3

+ +
+
+ + + + +
typedef mediump_f64mat3x3 mediump_f64mat3
+
+ +

Medium double-qualifier floating-point 3x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 577 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f64mat3x2

+ +
+
+ + + + +
typedef mat< 3, 2, f64, mediump > mediump_f64mat3x2
+
+ +

Medium double-qualifier floating-point 3x2 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 763 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f64mat3x3

+ +
+
+ + + + +
typedef mat< 3, 3, f64, mediump > mediump_f64mat3x3
+
+ +

Medium double-qualifier floating-point 3x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 764 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f64mat3x4

+ +
+
+ + + + +
typedef mat< 3, 4, f64, mediump > mediump_f64mat3x4
+
+ +

Medium double-qualifier floating-point 3x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 765 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f64mat4

+ +
+
+ + + + +
typedef mediump_f64mat4x4 mediump_f64mat4
+
+ +

Medium double-qualifier floating-point 4x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 578 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f64mat4x2

+ +
+
+ + + + +
typedef mat< 4, 2, f64, mediump > mediump_f64mat4x2
+
+ +

Medium double-qualifier floating-point 4x2 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 766 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f64mat4x3

+ +
+
+ + + + +
typedef mat< 4, 3, f64, mediump > mediump_f64mat4x3
+
+ +

Medium double-qualifier floating-point 4x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 767 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f64mat4x4

+ +
+
+ + + + +
typedef mat< 4, 4, f64, mediump > mediump_f64mat4x4
+
+ +

Medium double-qualifier floating-point 4x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 768 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f64quat

+ +
+
+ + + + +
typedef qua< f64, mediump > mediump_f64quat
+
+ +

Medium double-qualifier floating-point quaternion.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 813 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f64vec1

+ +
+
+ + + + +
typedef vec< 1, f64, mediump > mediump_f64vec1
+
+ +

Medium double-qualifier floating-point vector of 1 component.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 491 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f64vec2

+ +
+
+ + + + +
typedef vec< 2, f64, mediump > mediump_f64vec2
+
+ +

Medium double-qualifier floating-point vector of 2 components.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 492 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f64vec3

+ +
+
+ + + + +
typedef vec< 3, f64, mediump > mediump_f64vec3
+
+ +

Medium double-qualifier floating-point vector of 3 components.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 493 of file fwd.hpp.

+ +
+
+ +

◆ mediump_f64vec4

+ +
+
+ + + + +
typedef vec< 4, f64, mediump > mediump_f64vec4
+
+ +

Medium double-qualifier floating-point vector of 4 components.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 494 of file fwd.hpp.

+ +
+
+ +

◆ mediump_float32

+ +
+
+ + + + +
typedef float32 mediump_float32
+
+ +

Medium 32 bit single-qualifier floating-point scalar.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 153 of file fwd.hpp.

+ +
+
+ +

◆ mediump_float32_t

+ +
+
+ + + + +
typedef float32 mediump_float32_t
+
+ +

Medium 32 bit single-qualifier floating-point scalar.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 158 of file fwd.hpp.

+ +
+
+ +

◆ mediump_float64

+ +
+
+ + + + +
typedef float64 mediump_float64
+
+ +

Medium 64 bit double-qualifier floating-point scalar.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 169 of file fwd.hpp.

+ +
+
+ +

◆ mediump_float64_t

+ +
+
+ + + + +
typedef float64 mediump_float64_t
+
+ +

Medium 64 bit double-qualifier floating-point scalar.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 174 of file fwd.hpp.

+ +
+
+ +

◆ mediump_fmat2

+ +
+
+ + + + +
typedef mediump_fmat2x2 mediump_fmat2
+
+ +

Medium single-qualifier floating-point 1x1 matrix.

+
See also
GLM_GTC_type_precision Medium single-qualifier floating-point 2x2 matrix.
+
+GLM_GTC_type_precision
+ +

Definition at line 528 of file fwd.hpp.

+ +
+
+ +

◆ mediump_fmat2x2

+ +
+
+ + + + +
typedef mat< 2, 2, f32, mediump > mediump_fmat2x2
+
+ +

Medium single-qualifier floating-point 1x1 matrix.

+
See also
GLM_GTC_type_precision Medium single-qualifier floating-point 2x2 matrix.
+
+GLM_GTC_type_precision
+ +

Definition at line 640 of file fwd.hpp.

+ +
+
+ +

◆ mediump_fmat2x3

+ +
+
+ + + + +
typedef mat< 2, 3, f32, mediump > mediump_fmat2x3
+
+ +

Medium single-qualifier floating-point 2x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 641 of file fwd.hpp.

+ +
+
+ +

◆ mediump_fmat2x4

+ +
+
+ + + + +
typedef mat< 2, 4, f32, mediump > mediump_fmat2x4
+
+ +

Medium single-qualifier floating-point 2x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 642 of file fwd.hpp.

+ +
+
+ +

◆ mediump_fmat3

+ +
+
+ + + + +
typedef mediump_fmat3x3 mediump_fmat3
+
+ +

Medium single-qualifier floating-point 3x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 529 of file fwd.hpp.

+ +
+
+ +

◆ mediump_fmat3x2

+ +
+
+ + + + +
typedef mat< 3, 2, f32, mediump > mediump_fmat3x2
+
+ +

Medium single-qualifier floating-point 3x2 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 643 of file fwd.hpp.

+ +
+
+ +

◆ mediump_fmat3x3

+ +
+
+ + + + +
typedef mat< 3, 3, f32, mediump > mediump_fmat3x3
+
+ +

Medium single-qualifier floating-point 3x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 644 of file fwd.hpp.

+ +
+
+ +

◆ mediump_fmat3x4

+ +
+
+ + + + +
typedef mat< 3, 4, f32, mediump > mediump_fmat3x4
+
+ +

Medium single-qualifier floating-point 3x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 645 of file fwd.hpp.

+ +
+
+ +

◆ mediump_fmat4

+ +
+
+ + + + +
typedef mediump_fmat4x4 mediump_fmat4
+
+ +

Medium single-qualifier floating-point 4x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 530 of file fwd.hpp.

+ +
+
+ +

◆ mediump_fmat4x2

+ +
+
+ + + + +
typedef mat< 4, 2, f32, mediump > mediump_fmat4x2
+
+ +

Medium single-qualifier floating-point 4x2 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 646 of file fwd.hpp.

+ +
+
+ +

◆ mediump_fmat4x3

+ +
+
+ + + + +
typedef mat< 4, 3, f32, mediump > mediump_fmat4x3
+
+ +

Medium single-qualifier floating-point 4x3 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 647 of file fwd.hpp.

+ +
+
+ +

◆ mediump_fmat4x4

+ +
+
+ + + + +
typedef mat< 4, 4, f32, mediump > mediump_fmat4x4
+
+ +

Medium single-qualifier floating-point 4x4 matrix.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 648 of file fwd.hpp.

+ +
+
+ +

◆ mediump_fvec1

+ +
+
+ + + + +
typedef vec< 1, float, mediump > mediump_fvec1
+
+ +

Medium single-qualifier floating-point vector of 1 component.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 431 of file fwd.hpp.

+ +
+
+ +

◆ mediump_fvec2

+ +
+
+ + + + +
typedef vec< 2, float, mediump > mediump_fvec2
+
+ +

Medium Single-qualifier floating-point vector of 2 components.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 432 of file fwd.hpp.

+ +
+
+ +

◆ mediump_fvec3

+ +
+
+ + + + +
typedef vec< 3, float, mediump > mediump_fvec3
+
+ +

Medium Single-qualifier floating-point vector of 3 components.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 433 of file fwd.hpp.

+ +
+
+ +

◆ mediump_fvec4

+ +
+
+ + + + +
typedef vec< 4, float, mediump > mediump_fvec4
+
+ +

Medium Single-qualifier floating-point vector of 4 components.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 434 of file fwd.hpp.

+ +
+
+ +

◆ mediump_i16

+ +
+
+ + + + +
typedef detail::int16 mediump_i16
+
+ +

Medium qualifier 16 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 46 of file fwd.hpp.

+ +
+
+ +

◆ mediump_i16vec1

+ +
+
+ + + + +
typedef vec< 1, i16, mediump > mediump_i16vec1
+
+ +

Medium qualifier 16 bit signed integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 247 of file fwd.hpp.

+ +
+
+ +

◆ mediump_i16vec2

+ +
+
+ + + + +
typedef vec< 2, i16, mediump > mediump_i16vec2
+
+ +

Medium qualifier 16 bit signed integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 248 of file fwd.hpp.

+ +
+
+ +

◆ mediump_i16vec3

+ +
+
+ + + + +
typedef vec< 3, i16, mediump > mediump_i16vec3
+
+ +

Medium qualifier 16 bit signed integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 249 of file fwd.hpp.

+ +
+
+ +

◆ mediump_i16vec4

+ +
+
+ + + + +
typedef vec< 4, i16, mediump > mediump_i16vec4
+
+ +

Medium qualifier 16 bit signed integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 250 of file fwd.hpp.

+ +
+
+ +

◆ mediump_i32

+ +
+
+ + + + +
typedef detail::int32 mediump_i32
+
+ +

Medium qualifier 32 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 60 of file fwd.hpp.

+ +
+
+ +

◆ mediump_i32vec1

+ +
+
+ + + + +
typedef vec< 1, i32, mediump > mediump_i32vec1
+
+ +

Medium qualifier 32 bit signed integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 267 of file fwd.hpp.

+ +
+
+ +

◆ mediump_i32vec2

+ +
+
+ + + + +
typedef vec< 2, i32, mediump > mediump_i32vec2
+
+ +

Medium qualifier 32 bit signed integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 268 of file fwd.hpp.

+ +
+
+ +

◆ mediump_i32vec3

+ +
+
+ + + + +
typedef vec< 3, i32, mediump > mediump_i32vec3
+
+ +

Medium qualifier 32 bit signed integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 269 of file fwd.hpp.

+ +
+
+ +

◆ mediump_i32vec4

+ +
+
+ + + + +
typedef vec< 4, i32, mediump > mediump_i32vec4
+
+ +

Medium qualifier 32 bit signed integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 270 of file fwd.hpp.

+ +
+
+ +

◆ mediump_i64

+ +
+
+ + + + +
typedef detail::int64 mediump_i64
+
+ +

Medium qualifier 64 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 74 of file fwd.hpp.

+ +
+
+ +

◆ mediump_i64vec1

+ +
+
+ + + + +
typedef vec< 1, i64, mediump > mediump_i64vec1
+
+ +

Medium qualifier 64 bit signed integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 287 of file fwd.hpp.

+ +
+
+ +

◆ mediump_i64vec2

+ +
+
+ + + + +
typedef vec< 2, i64, mediump > mediump_i64vec2
+
+ +

Medium qualifier 64 bit signed integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 288 of file fwd.hpp.

+ +
+
+ +

◆ mediump_i64vec3

+ +
+
+ + + + +
typedef vec< 3, i64, mediump > mediump_i64vec3
+
+ +

Medium qualifier 64 bit signed integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 289 of file fwd.hpp.

+ +
+
+ +

◆ mediump_i64vec4

+ +
+
+ + + + +
typedef vec< 4, i64, mediump > mediump_i64vec4
+
+ +

Medium qualifier 64 bit signed integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 290 of file fwd.hpp.

+ +
+
+ +

◆ mediump_i8

+ +
+
+ + + + +
typedef detail::int8 mediump_i8
+
+ +

Medium qualifier 8 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 32 of file fwd.hpp.

+ +
+
+ +

◆ mediump_i8vec1

+ +
+
+ + + + +
typedef vec< 1, i8, mediump > mediump_i8vec1
+
+ +

Medium qualifier 8 bit signed integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 227 of file fwd.hpp.

+ +
+
+ +

◆ mediump_i8vec2

+ +
+
+ + + + +
typedef vec< 2, i8, mediump > mediump_i8vec2
+
+ +

Medium qualifier 8 bit signed integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 228 of file fwd.hpp.

+ +
+
+ +

◆ mediump_i8vec3

+ +
+
+ + + + +
typedef vec< 3, i8, mediump > mediump_i8vec3
+
+ +

Medium qualifier 8 bit signed integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 229 of file fwd.hpp.

+ +
+
+ +

◆ mediump_i8vec4

+ +
+
+ + + + +
typedef vec< 4, i8, mediump > mediump_i8vec4
+
+ +

Medium qualifier 8 bit signed integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 230 of file fwd.hpp.

+ +
+
+ +

◆ mediump_int16

+ +
+
+ + + + +
typedef detail::int16 mediump_int16
+
+ +

Medium qualifier 16 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 51 of file fwd.hpp.

+ +
+
+ +

◆ mediump_int16_t

+ +
+
+ + + + +
typedef detail::int16 mediump_int16_t
+
+ +

Medium qualifier 16 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 55 of file fwd.hpp.

+ +
+
+ +

◆ mediump_int32

+ +
+
+ + + + +
typedef detail::int32 mediump_int32
+
+ +

Medium qualifier 32 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 65 of file fwd.hpp.

+ +
+
+ +

◆ mediump_int32_t

+ +
+
+ + + + +
typedef detail::int32 mediump_int32_t
+
+ +

Medium qualifier 32 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 69 of file fwd.hpp.

+ +
+
+ +

◆ mediump_int64

+ +
+
+ + + + +
typedef detail::int64 mediump_int64
+
+ +

Medium qualifier 64 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 79 of file fwd.hpp.

+ +
+
+ +

◆ mediump_int64_t

+ +
+
+ + + + +
typedef detail::int64 mediump_int64_t
+
+ +

Medium qualifier 64 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 83 of file fwd.hpp.

+ +
+
+ +

◆ mediump_int8

+ +
+
+ + + + +
typedef detail::int8 mediump_int8
+
+ +

Medium qualifier 8 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 37 of file fwd.hpp.

+ +
+
+ +

◆ mediump_int8_t

+ +
+
+ + + + +
typedef detail::int8 mediump_int8_t
+
+ +

Medium qualifier 8 bit signed integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 41 of file fwd.hpp.

+ +
+
+ +

◆ mediump_u16

+ +
+
+ + + + +
typedef detail::uint16 mediump_u16
+
+ +

Medium qualifier 16 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 104 of file fwd.hpp.

+ +
+
+ +

◆ mediump_u16vec1

+ +
+
+ + + + +
typedef vec< 1, u16, mediump > mediump_u16vec1
+
+ +

Medium qualifier 16 bit unsigned integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 349 of file fwd.hpp.

+ +
+
+ +

◆ mediump_u16vec2

+ +
+
+ + + + +
typedef vec< 2, u16, mediump > mediump_u16vec2
+
+ +

Medium qualifier 16 bit unsigned integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 350 of file fwd.hpp.

+ +
+
+ +

◆ mediump_u16vec3

+ +
+
+ + + + +
typedef vec< 3, u16, mediump > mediump_u16vec3
+
+ +

Medium qualifier 16 bit unsigned integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 351 of file fwd.hpp.

+ +
+
+ +

◆ mediump_u16vec4

+ +
+
+ + + + +
typedef vec< 4, u16, mediump > mediump_u16vec4
+
+ +

Medium qualifier 16 bit unsigned integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 352 of file fwd.hpp.

+ +
+
+ +

◆ mediump_u32

+ +
+
+ + + + +
typedef detail::uint32 mediump_u32
+
+ +

Medium qualifier 32 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 118 of file fwd.hpp.

+ +
+
+ +

◆ mediump_u32vec1

+ +
+
+ + + + +
typedef vec< 1, u32, mediump > mediump_u32vec1
+
+ +

Medium qualifier 32 bit unsigned integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 369 of file fwd.hpp.

+ +
+
+ +

◆ mediump_u32vec2

+ +
+
+ + + + +
typedef vec< 2, u32, mediump > mediump_u32vec2
+
+ +

Medium qualifier 32 bit unsigned integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 370 of file fwd.hpp.

+ +
+
+ +

◆ mediump_u32vec3

+ +
+
+ + + + +
typedef vec< 3, u32, mediump > mediump_u32vec3
+
+ +

Medium qualifier 32 bit unsigned integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 371 of file fwd.hpp.

+ +
+
+ +

◆ mediump_u32vec4

+ +
+
+ + + + +
typedef vec< 4, u32, mediump > mediump_u32vec4
+
+ +

Medium qualifier 32 bit unsigned integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 372 of file fwd.hpp.

+ +
+
+ +

◆ mediump_u64

+ +
+
+ + + + +
typedef detail::uint64 mediump_u64
+
+ +

Medium qualifier 64 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 132 of file fwd.hpp.

+ +
+
+ +

◆ mediump_u64vec1

+ +
+
+ + + + +
typedef vec< 1, u64, mediump > mediump_u64vec1
+
+ +

Medium qualifier 64 bit unsigned integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 389 of file fwd.hpp.

+ +
+
+ +

◆ mediump_u64vec2

+ +
+
+ + + + +
typedef vec< 2, u64, mediump > mediump_u64vec2
+
+ +

Medium qualifier 64 bit unsigned integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 390 of file fwd.hpp.

+ +
+
+ +

◆ mediump_u64vec3

+ +
+
+ + + + +
typedef vec< 3, u64, mediump > mediump_u64vec3
+
+ +

Medium qualifier 64 bit unsigned integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 391 of file fwd.hpp.

+ +
+
+ +

◆ mediump_u64vec4

+ +
+
+ + + + +
typedef vec< 4, u64, mediump > mediump_u64vec4
+
+ +

Medium qualifier 64 bit unsigned integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 392 of file fwd.hpp.

+ +
+
+ +

◆ mediump_u8

+ +
+
+ + + + +
typedef detail::uint8 mediump_u8
+
+ +

Medium qualifier 8 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 90 of file fwd.hpp.

+ +
+
+ +

◆ mediump_u8vec1

+ +
+
+ + + + +
typedef vec< 1, u8, mediump > mediump_u8vec1
+
+ +

Medium qualifier 8 bit unsigned integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 329 of file fwd.hpp.

+ +
+
+ +

◆ mediump_u8vec2

+ +
+
+ + + + +
typedef vec< 2, u8, mediump > mediump_u8vec2
+
+ +

Medium qualifier 8 bit unsigned integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 330 of file fwd.hpp.

+ +
+
+ +

◆ mediump_u8vec3

+ +
+
+ + + + +
typedef vec< 3, u8, mediump > mediump_u8vec3
+
+ +

Medium qualifier 8 bit unsigned integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 331 of file fwd.hpp.

+ +
+
+ +

◆ mediump_u8vec4

+ +
+
+ + + + +
typedef vec< 4, u8, mediump > mediump_u8vec4
+
+ +

Medium qualifier 8 bit unsigned integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 332 of file fwd.hpp.

+ +
+
+ +

◆ mediump_uint16

+ +
+
+ + + + +
typedef detail::uint16 mediump_uint16
+
+ +

Medium qualifier 16 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 109 of file fwd.hpp.

+ +
+
+ +

◆ mediump_uint16_t

+ +
+
+ + + + +
typedef detail::uint16 mediump_uint16_t
+
+ +

Medium qualifier 16 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 113 of file fwd.hpp.

+ +
+
+ +

◆ mediump_uint32

+ +
+
+ + + + +
typedef detail::uint32 mediump_uint32
+
+ +

Medium qualifier 32 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 123 of file fwd.hpp.

+ +
+
+ +

◆ mediump_uint32_t

+ +
+
+ + + + +
typedef detail::uint32 mediump_uint32_t
+
+ +

Medium qualifier 32 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 127 of file fwd.hpp.

+ +
+
+ +

◆ mediump_uint64

+ +
+
+ + + + +
typedef detail::uint64 mediump_uint64
+
+ +

Medium qualifier 64 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 137 of file fwd.hpp.

+ +
+
+ +

◆ mediump_uint64_t

+ +
+
+ + + + +
typedef detail::uint64 mediump_uint64_t
+
+ +

Medium qualifier 64 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 141 of file fwd.hpp.

+ +
+
+ +

◆ mediump_uint8

+ +
+
+ + + + +
typedef detail::uint8 mediump_uint8
+
+ +

Medium qualifier 8 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 95 of file fwd.hpp.

+ +
+
+ +

◆ mediump_uint8_t

+ +
+
+ + + + +
typedef detail::uint8 mediump_uint8_t
+
+ +

Medium qualifier 8 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 99 of file fwd.hpp.

+ +
+
+ +

◆ u16

+ +
+
+ + + + +
typedef detail::uint16 u16
+
+ +

Default qualifier 16 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 106 of file fwd.hpp.

+ +
+
+ +

◆ u16vec1

+ +
+
+ + + + +
typedef vec< 1, u16, defaultp > u16vec1
+
+ +

Default qualifier 16 bit unsigned integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 359 of file fwd.hpp.

+ +
+
+ +

◆ u16vec2

+ +
+
+ + + + +
typedef vec< 2, u16, defaultp > u16vec2
+
+ +

Default qualifier 16 bit unsigned integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 360 of file fwd.hpp.

+ +
+
+ +

◆ u16vec3

+ +
+
+ + + + +
typedef vec< 3, u16, defaultp > u16vec3
+
+ +

Default qualifier 16 bit unsigned integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 361 of file fwd.hpp.

+ +
+
+ +

◆ u16vec4

+ +
+
+ + + + +
typedef vec< 4, u16, defaultp > u16vec4
+
+ +

Default qualifier 16 bit unsigned integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 362 of file fwd.hpp.

+ +
+
+ +

◆ u32

+ +
+
+ + + + +
typedef detail::uint32 u32
+
+ +

Default qualifier 32 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 120 of file fwd.hpp.

+ +
+
+ +

◆ u32vec1

+ +
+
+ + + + +
typedef vec< 1, u32, defaultp > u32vec1
+
+ +

Default qualifier 32 bit unsigned integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 379 of file fwd.hpp.

+ +
+
+ +

◆ u32vec2

+ +
+
+ + + + +
typedef vec< 2, u32, defaultp > u32vec2
+
+ +

Default qualifier 32 bit unsigned integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 380 of file fwd.hpp.

+ +
+
+ +

◆ u32vec3

+ +
+
+ + + + +
typedef vec< 3, u32, defaultp > u32vec3
+
+ +

Default qualifier 32 bit unsigned integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 381 of file fwd.hpp.

+ +
+
+ +

◆ u32vec4

+ +
+
+ + + + +
typedef vec< 4, u32, defaultp > u32vec4
+
+ +

Default qualifier 32 bit unsigned integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 382 of file fwd.hpp.

+ +
+
+ +

◆ u64

+ +
+
+ + + + +
typedef detail::uint64 u64
+
+ +

Default qualifier 64 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 134 of file fwd.hpp.

+ +
+
+ +

◆ u64vec1

+ +
+
+ + + + +
typedef vec< 1, u64, defaultp > u64vec1
+
+ +

Default qualifier 64 bit unsigned integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 399 of file fwd.hpp.

+ +
+
+ +

◆ u64vec2

+ +
+
+ + + + +
typedef vec< 2, u64, defaultp > u64vec2
+
+ +

Default qualifier 64 bit unsigned integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 400 of file fwd.hpp.

+ +
+
+ +

◆ u64vec3

+ +
+
+ + + + +
typedef vec< 3, u64, defaultp > u64vec3
+
+ +

Default qualifier 64 bit unsigned integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 401 of file fwd.hpp.

+ +
+
+ +

◆ u64vec4

+ +
+
+ + + + +
typedef vec< 4, u64, defaultp > u64vec4
+
+ +

Default qualifier 64 bit unsigned integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 402 of file fwd.hpp.

+ +
+
+ +

◆ u8

+ +
+
+ + + + +
typedef detail::uint8 u8
+
+ +

Default qualifier 8 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 92 of file fwd.hpp.

+ +
+
+ +

◆ u8vec1

+ +
+
+ + + + +
typedef vec< 1, u8, defaultp > u8vec1
+
+ +

Default qualifier 8 bit unsigned integer scalar type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 339 of file fwd.hpp.

+ +
+
+ +

◆ u8vec2

+ +
+
+ + + + +
typedef vec< 2, u8, defaultp > u8vec2
+
+ +

Default qualifier 8 bit unsigned integer vector of 2 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 340 of file fwd.hpp.

+ +
+
+ +

◆ u8vec3

+ +
+
+ + + + +
typedef vec< 3, u8, defaultp > u8vec3
+
+ +

Default qualifier 8 bit unsigned integer vector of 3 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 341 of file fwd.hpp.

+ +
+
+ +

◆ u8vec4

+ +
+
+ + + + +
typedef vec< 4, u8, defaultp > u8vec4
+
+ +

Default qualifier 8 bit unsigned integer vector of 4 components type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 342 of file fwd.hpp.

+ +
+
+ +

◆ uint16_t

+ +
+
+ + + + +
typedef detail::uint16 uint16_t
+
+ +

Default qualifier 16 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 115 of file fwd.hpp.

+ +
+
+ +

◆ uint32_t

+ +
+
+ + + + +
typedef detail::uint32 uint32_t
+
+ +

Default qualifier 32 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 129 of file fwd.hpp.

+ +
+
+ +

◆ uint64_t

+ +
+
+ + + + +
typedef detail::uint64 uint64_t
+
+ +

Default qualifier 64 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 143 of file fwd.hpp.

+ +
+
+ +

◆ uint8_t

+ +
+
+ + + + +
typedef detail::uint8 uint8_t
+
+ +

Default qualifier 8 bit unsigned integer type.

+
See also
GLM_GTC_type_precision
+ +

Definition at line 101 of file fwd.hpp.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00722.html b/common/glm/doc/api/a00722.html new file mode 100644 index 000000000..9c452a987 --- /dev/null +++ b/common/glm/doc/api/a00722.html @@ -0,0 +1,882 @@ + + + + + + + +0.9.9 API documenation: GLM_GTC_type_ptr + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTC_type_ptr
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T >
GLM_FUNC_DECL mat< 2, 2, T, defaultp > make_mat2 (T const *const ptr)
 
template<typename T >
GLM_FUNC_DECL mat< 2, 2, T, defaultp > make_mat2x2 (T const *const ptr)
 
template<typename T >
GLM_FUNC_DECL mat< 2, 3, T, defaultp > make_mat2x3 (T const *const ptr)
 
template<typename T >
GLM_FUNC_DECL mat< 2, 4, T, defaultp > make_mat2x4 (T const *const ptr)
 
template<typename T >
GLM_FUNC_DECL mat< 3, 3, T, defaultp > make_mat3 (T const *const ptr)
 
template<typename T >
GLM_FUNC_DECL mat< 3, 2, T, defaultp > make_mat3x2 (T const *const ptr)
 
template<typename T >
GLM_FUNC_DECL mat< 3, 3, T, defaultp > make_mat3x3 (T const *const ptr)
 
template<typename T >
GLM_FUNC_DECL mat< 3, 4, T, defaultp > make_mat3x4 (T const *const ptr)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > make_mat4 (T const *const ptr)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 2, T, defaultp > make_mat4x2 (T const *const ptr)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 3, T, defaultp > make_mat4x3 (T const *const ptr)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > make_mat4x4 (T const *const ptr)
 
template<typename T >
GLM_FUNC_DECL qua< T, defaultp > make_quat (T const *const ptr)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 1, T, Q > make_vec1 (vec< 1, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 1, T, Q > make_vec1 (vec< 2, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 1, T, Q > make_vec1 (vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 1, T, Q > make_vec1 (vec< 4, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 2, T, Q > make_vec2 (vec< 1, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 2, T, Q > make_vec2 (vec< 2, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 2, T, Q > make_vec2 (vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 2, T, Q > make_vec2 (vec< 4, T, Q > const &v)
 
template<typename T >
GLM_FUNC_DECL vec< 2, T, defaultp > make_vec2 (T const *const ptr)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > make_vec3 (vec< 1, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > make_vec3 (vec< 2, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > make_vec3 (vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > make_vec3 (vec< 4, T, Q > const &v)
 
template<typename T >
GLM_FUNC_DECL vec< 3, T, defaultp > make_vec3 (T const *const ptr)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > make_vec4 (vec< 1, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > make_vec4 (vec< 2, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > make_vec4 (vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > make_vec4 (vec< 4, T, Q > const &v)
 
template<typename T >
GLM_FUNC_DECL vec< 4, T, defaultp > make_vec4 (T const *const ptr)
 
template<typename genType >
GLM_FUNC_DECL genType::value_type const * value_ptr (genType const &v)
 
+

Detailed Description

+

Include <glm/gtc/type_ptr.hpp> to use the features of this extension.

+

Handles the interaction between pointers and vector, matrix types.

+

This extension defines an overloaded function, glm::value_ptr. It returns a pointer to the memory layout of the object. Matrix types store their values in column-major order.

+

This is useful for uploading data to matrices or copying data to buffer objects.

+

Example:

#include <glm/glm.hpp>
glm::vec3 aVector(3);
glm::mat4 someMatrix(1.0);
glUniform3fv(uniformLoc, 1, glm::value_ptr(aVector));
glUniformMatrix4fv(uniformMatrixLoc, 1, GL_FALSE, glm::value_ptr(someMatrix));

<glm/gtc/type_ptr.hpp> need to be included to use the features of this extension.

+

Function Documentation

+ +

◆ make_mat2()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<2, 2, T, defaultp> glm::make_mat2 (T const *const ptr)
+
+ +

Build a matrix from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_mat2x2()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<2, 2, T, defaultp> glm::make_mat2x2 (T const *const ptr)
+
+ +

Build a matrix from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_mat2x3()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<2, 3, T, defaultp> glm::make_mat2x3 (T const *const ptr)
+
+ +

Build a matrix from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_mat2x4()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<2, 4, T, defaultp> glm::make_mat2x4 (T const *const ptr)
+
+ +

Build a matrix from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_mat3()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<3, 3, T, defaultp> glm::make_mat3 (T const *const ptr)
+
+ +

Build a matrix from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_mat3x2()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<3, 2, T, defaultp> glm::make_mat3x2 (T const *const ptr)
+
+ +

Build a matrix from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_mat3x3()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<3, 3, T, defaultp> glm::make_mat3x3 (T const *const ptr)
+
+ +

Build a matrix from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_mat3x4()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<3, 4, T, defaultp> glm::make_mat3x4 (T const *const ptr)
+
+ +

Build a matrix from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_mat4()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::make_mat4 (T const *const ptr)
+
+ +

Build a matrix from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_mat4x2()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<4, 2, T, defaultp> glm::make_mat4x2 (T const *const ptr)
+
+ +

Build a matrix from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_mat4x3()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<4, 3, T, defaultp> glm::make_mat4x3 (T const *const ptr)
+
+ +

Build a matrix from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_mat4x4()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::make_mat4x4 (T const *const ptr)
+
+ +

Build a matrix from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_quat()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL qua<T, defaultp> glm::make_quat (T const *const ptr)
+
+ +

Build a quaternion from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_vec1() [1/4]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<1, T, Q> glm::make_vec1 (vec< 1, T, Q > const & v)
+
+ +

Build a vector from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_vec1() [2/4]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<1, T, Q> glm::make_vec1 (vec< 2, T, Q > const & v)
+
+ +

Build a vector from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_vec1() [3/4]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<1, T, Q> glm::make_vec1 (vec< 3, T, Q > const & v)
+
+ +

Build a vector from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_vec1() [4/4]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<1, T, Q> glm::make_vec1 (vec< 4, T, Q > const & v)
+
+ +

Build a vector from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_vec2() [1/5]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<2, T, Q> glm::make_vec2 (vec< 1, T, Q > const & v)
+
+ +

Build a vector from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_vec2() [2/5]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<2, T, Q> glm::make_vec2 (vec< 2, T, Q > const & v)
+
+ +

Build a vector from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_vec2() [3/5]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<2, T, Q> glm::make_vec2 (vec< 3, T, Q > const & v)
+
+ +

Build a vector from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_vec2() [4/5]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<2, T, Q> glm::make_vec2 (vec< 4, T, Q > const & v)
+
+ +

Build a vector from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_vec2() [5/5]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<2, T, defaultp> glm::make_vec2 (T const *const ptr)
+
+ +

Build a vector from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_vec3() [1/5]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::make_vec3 (vec< 1, T, Q > const & v)
+
+ +

Build a vector from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_vec3() [2/5]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::make_vec3 (vec< 2, T, Q > const & v)
+
+ +

Build a vector from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_vec3() [3/5]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::make_vec3 (vec< 3, T, Q > const & v)
+
+ +

Build a vector from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_vec3() [4/5]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::make_vec3 (vec< 4, T, Q > const & v)
+
+ +

Build a vector from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_vec3() [5/5]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<3, T, defaultp> glm::make_vec3 (T const *const ptr)
+
+ +

Build a vector from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_vec4() [1/5]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<4, T, Q> glm::make_vec4 (vec< 1, T, Q > const & v)
+
+ +

Build a vector from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_vec4() [2/5]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<4, T, Q> glm::make_vec4 (vec< 2, T, Q > const & v)
+
+ +

Build a vector from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_vec4() [3/5]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<4, T, Q> glm::make_vec4 (vec< 3, T, Q > const & v)
+
+ +

Build a vector from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_vec4() [4/5]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<4, T, Q> glm::make_vec4 (vec< 4, T, Q > const & v)
+
+ +

Build a vector from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ make_vec4() [5/5]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<4, T, defaultp> glm::make_vec4 (T const *const ptr)
+
+ +

Build a vector from a pointer.

+
See also
GLM_GTC_type_ptr
+ +
+
+ +

◆ value_ptr()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType::value_type const* glm::value_ptr (genType const & v)
+
+ +

Return the constant address to the data of the input parameter.

+
See also
GLM_GTC_type_ptr
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00723.html b/common/glm/doc/api/a00723.html new file mode 100644 index 000000000..99d84bd94 --- /dev/null +++ b/common/glm/doc/api/a00723.html @@ -0,0 +1,271 @@ + + + + + + + +0.9.9 API documenation: GLM_GTC_ulp + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T >
GLM_FUNC_DECL uint float_distance (T const &x, T const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 2, uint, Q > float_distance (vec< 2, T, Q > const &x, vec< 2, T, Q > const &y)
 
template<typename genType >
GLM_FUNC_DECL genType next_float (genType const &x)
 
template<typename genType >
GLM_FUNC_DECL genType next_float (genType const &x, uint const &Distance)
 
template<typename genType >
GLM_FUNC_DECL genType prev_float (genType const &x)
 
template<typename genType >
GLM_FUNC_DECL genType prev_float (genType const &x, uint const &Distance)
 
+

Detailed Description

+

Include <glm/gtc/ulp.hpp> to use the features of this extension.

+

Allow the measurement of the accuracy of a function against a reference implementation. This extension works on floating-point data and provide results in ULP.

+

Function Documentation

+ +

◆ float_distance() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL uint glm::float_distance (T const & x,
T const & y 
)
+
+ +

Return the distance in the number of ULP between 2 scalars.

+
See also
GLM_GTC_ulp
+ +
+
+ +

◆ float_distance() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<2, uint, Q> glm::float_distance (vec< 2, T, Q > const & x,
vec< 2, T, Q > const & y 
)
+
+ +

Return the distance in the number of ULP between 2 vectors.

+
See also
GLM_GTC_ulp
+ +
+
+ +

◆ next_float() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::next_float (genType const & x)
+
+ +

Return the next ULP value(s) after the input value(s).

+
See also
GLM_GTC_ulp
+ +
+
+ +

◆ next_float() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::next_float (genType const & x,
uint const & Distance 
)
+
+ +

Return the value(s) ULP distance after the input value(s).

+
See also
GLM_GTC_ulp
+ +
+
+ +

◆ prev_float() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::prev_float (genType const & x)
+
+ +

Return the previous ULP value(s) before the input value(s).

+
See also
GLM_GTC_ulp
+ +
+
+ +

◆ prev_float() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::prev_float (genType const & x,
uint const & Distance 
)
+
+ +

Return the value(s) ULP distance before the input value(s).

+
See also
GLM_GTC_ulp
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00724.html b/common/glm/doc/api/a00724.html new file mode 100644 index 000000000..2117fabf6 --- /dev/null +++ b/common/glm/doc/api/a00724.html @@ -0,0 +1,79 @@ + + + + + + + +0.9.9 API documenation: GLM_GTC_vec1 + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
+
+
+

Include <glm/gtc/vec1.hpp> to use the features of this extension.

+

Add vec1, ivec1, uvec1 and bvec1 types.

+
+ + + + diff --git a/common/glm/doc/api/a00725.html b/common/glm/doc/api/a00725.html new file mode 100644 index 000000000..6cc2cb986 --- /dev/null +++ b/common/glm/doc/api/a00725.html @@ -0,0 +1,1363 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_associated_min_max + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_associated_min_max
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , typename U >
GLM_FUNC_DECL U associatedMax (T x, U a, T y, U b)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< 2, U, Q > associatedMax (vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > associatedMax (T x, vec< L, U, Q > const &a, T y, vec< L, U, Q > const &b)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, U, Q > associatedMax (vec< L, T, Q > const &x, U a, vec< L, T, Q > const &y, U b)
 
template<typename T , typename U >
GLM_FUNC_DECL U associatedMax (T x, U a, T y, U b, T z, U c)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, U, Q > associatedMax (vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b, vec< L, T, Q > const &z, vec< L, U, Q > const &c)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > associatedMax (T x, vec< L, U, Q > const &a, T y, vec< L, U, Q > const &b, T z, vec< L, U, Q > const &c)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, U, Q > associatedMax (vec< L, T, Q > const &x, U a, vec< L, T, Q > const &y, U b, vec< L, T, Q > const &z, U c)
 
template<typename T , typename U >
GLM_FUNC_DECL U associatedMax (T x, U a, T y, U b, T z, U c, T w, U d)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, U, Q > associatedMax (vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b, vec< L, T, Q > const &z, vec< L, U, Q > const &c, vec< L, T, Q > const &w, vec< L, U, Q > const &d)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, U, Q > associatedMax (T x, vec< L, U, Q > const &a, T y, vec< L, U, Q > const &b, T z, vec< L, U, Q > const &c, T w, vec< L, U, Q > const &d)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, U, Q > associatedMax (vec< L, T, Q > const &x, U a, vec< L, T, Q > const &y, U b, vec< L, T, Q > const &z, U c, vec< L, T, Q > const &w, U d)
 
template<typename T , typename U , qualifier Q>
GLM_FUNC_DECL U associatedMin (T x, U a, T y, U b)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< 2, U, Q > associatedMin (vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, U, Q > associatedMin (T x, const vec< L, U, Q > &a, T y, const vec< L, U, Q > &b)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, U, Q > associatedMin (vec< L, T, Q > const &x, U a, vec< L, T, Q > const &y, U b)
 
template<typename T , typename U >
GLM_FUNC_DECL U associatedMin (T x, U a, T y, U b, T z, U c)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, U, Q > associatedMin (vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b, vec< L, T, Q > const &z, vec< L, U, Q > const &c)
 
template<typename T , typename U >
GLM_FUNC_DECL U associatedMin (T x, U a, T y, U b, T z, U c, T w, U d)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, U, Q > associatedMin (vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b, vec< L, T, Q > const &z, vec< L, U, Q > const &c, vec< L, T, Q > const &w, vec< L, U, Q > const &d)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, U, Q > associatedMin (T x, vec< L, U, Q > const &a, T y, vec< L, U, Q > const &b, T z, vec< L, U, Q > const &c, T w, vec< L, U, Q > const &d)
 
template<length_t L, typename T , typename U , qualifier Q>
GLM_FUNC_DECL vec< L, U, Q > associatedMin (vec< L, T, Q > const &x, U a, vec< L, T, Q > const &y, U b, vec< L, T, Q > const &z, U c, vec< L, T, Q > const &w, U d)
 
+

Detailed Description

+

Include <glm/gtx/associated_min_max.hpp> to use the features of this extension.

+

Min and max functions that return associated values not the compared onces.

+

Function Documentation

+ +

◆ associatedMax() [1/12]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL U glm::associatedMax (x,
a,
y,
b 
)
+
+ +

Maximum comparison between 2 variables and returns 2 associated variable values.

+
See also
GLM_GTX_associated_min_max
+ +
+
+ +

◆ associatedMax() [2/12]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<2, U, Q> glm::associatedMax (vec< L, T, Q > const & x,
vec< L, U, Q > const & a,
vec< L, T, Q > const & y,
vec< L, U, Q > const & b 
)
+
+ +

Maximum comparison between 2 variables and returns 2 associated variable values.

+
See also
GLM_GTX_associated_min_max
+ +
+
+ +

◆ associatedMax() [3/12]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::associatedMax (x,
vec< L, U, Q > const & a,
y,
vec< L, U, Q > const & b 
)
+
+ +

Maximum comparison between 2 variables and returns 2 associated variable values.

+
See also
GLM_GTX_associated_min_max
+ +
+
+ +

◆ associatedMax() [4/12]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, U, Q> glm::associatedMax (vec< L, T, Q > const & x,
a,
vec< L, T, Q > const & y,
b 
)
+
+ +

Maximum comparison between 2 variables and returns 2 associated variable values.

+
See also
GLM_GTX_associated_min_max
+ +
+
+ +

◆ associatedMax() [5/12]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL U glm::associatedMax (x,
a,
y,
b,
z,
c 
)
+
+ +

Maximum comparison between 3 variables and returns 3 associated variable values.

+
See also
GLM_GTX_associated_min_max
+ +
+
+ +

◆ associatedMax() [6/12]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, U, Q> glm::associatedMax (vec< L, T, Q > const & x,
vec< L, U, Q > const & a,
vec< L, T, Q > const & y,
vec< L, U, Q > const & b,
vec< L, T, Q > const & z,
vec< L, U, Q > const & c 
)
+
+ +

Maximum comparison between 3 variables and returns 3 associated variable values.

+
See also
GLM_GTX_associated_min_max
+ +
+
+ +

◆ associatedMax() [7/12]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::associatedMax (x,
vec< L, U, Q > const & a,
y,
vec< L, U, Q > const & b,
z,
vec< L, U, Q > const & c 
)
+
+ +

Maximum comparison between 3 variables and returns 3 associated variable values.

+
See also
GLM_GTX_associated_min_max
+ +
+
+ +

◆ associatedMax() [8/12]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, U, Q> glm::associatedMax (vec< L, T, Q > const & x,
a,
vec< L, T, Q > const & y,
b,
vec< L, T, Q > const & z,
c 
)
+
+ +

Maximum comparison between 3 variables and returns 3 associated variable values.

+
See also
GLM_GTX_associated_min_max
+ +
+
+ +

◆ associatedMax() [9/12]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL U glm::associatedMax (x,
a,
y,
b,
z,
c,
w,
d 
)
+
+ +

Maximum comparison between 4 variables and returns 4 associated variable values.

+
See also
GLM_GTX_associated_min_max
+ +
+
+ +

◆ associatedMax() [10/12]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, U, Q> glm::associatedMax (vec< L, T, Q > const & x,
vec< L, U, Q > const & a,
vec< L, T, Q > const & y,
vec< L, U, Q > const & b,
vec< L, T, Q > const & z,
vec< L, U, Q > const & c,
vec< L, T, Q > const & w,
vec< L, U, Q > const & d 
)
+
+ +

Maximum comparison between 4 variables and returns 4 associated variable values.

+
See also
GLM_GTX_associated_min_max
+ +
+
+ +

◆ associatedMax() [11/12]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, U, Q> glm::associatedMax (x,
vec< L, U, Q > const & a,
y,
vec< L, U, Q > const & b,
z,
vec< L, U, Q > const & c,
w,
vec< L, U, Q > const & d 
)
+
+ +

Maximum comparison between 4 variables and returns 4 associated variable values.

+
See also
GLM_GTX_associated_min_max
+ +
+
+ +

◆ associatedMax() [12/12]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, U, Q> glm::associatedMax (vec< L, T, Q > const & x,
a,
vec< L, T, Q > const & y,
b,
vec< L, T, Q > const & z,
c,
vec< L, T, Q > const & w,
d 
)
+
+ +

Maximum comparison between 4 variables and returns 4 associated variable values.

+
See also
GLM_GTX_associated_min_max
+ +
+
+ +

◆ associatedMin() [1/10]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL U glm::associatedMin (x,
a,
y,
b 
)
+
+ +

Minimum comparison between 2 variables and returns 2 associated variable values.

+
See also
GLM_GTX_associated_min_max
+ +
+
+ +

◆ associatedMin() [2/10]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<2, U, Q> glm::associatedMin (vec< L, T, Q > const & x,
vec< L, U, Q > const & a,
vec< L, T, Q > const & y,
vec< L, U, Q > const & b 
)
+
+ +

Minimum comparison between 2 variables and returns 2 associated variable values.

+
See also
GLM_GTX_associated_min_max
+ +
+
+ +

◆ associatedMin() [3/10]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, U, Q> glm::associatedMin (x,
const vec< L, U, Q > & a,
y,
const vec< L, U, Q > & b 
)
+
+ +

Minimum comparison between 2 variables and returns 2 associated variable values.

+
See also
GLM_GTX_associated_min_max
+ +
+
+ +

◆ associatedMin() [4/10]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, U, Q> glm::associatedMin (vec< L, T, Q > const & x,
a,
vec< L, T, Q > const & y,
b 
)
+
+ +

Minimum comparison between 2 variables and returns 2 associated variable values.

+
See also
GLM_GTX_associated_min_max
+ +
+
+ +

◆ associatedMin() [5/10]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL U glm::associatedMin (x,
a,
y,
b,
z,
c 
)
+
+ +

Minimum comparison between 3 variables and returns 3 associated variable values.

+
See also
GLM_GTX_associated_min_max
+ +
+
+ +

◆ associatedMin() [6/10]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, U, Q> glm::associatedMin (vec< L, T, Q > const & x,
vec< L, U, Q > const & a,
vec< L, T, Q > const & y,
vec< L, U, Q > const & b,
vec< L, T, Q > const & z,
vec< L, U, Q > const & c 
)
+
+ +

Minimum comparison between 3 variables and returns 3 associated variable values.

+
See also
GLM_GTX_associated_min_max
+ +
+
+ +

◆ associatedMin() [7/10]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL U glm::associatedMin (x,
a,
y,
b,
z,
c,
w,
d 
)
+
+ +

Minimum comparison between 4 variables and returns 4 associated variable values.

+
See also
GLM_GTX_associated_min_max
+ +
+
+ +

◆ associatedMin() [8/10]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, U, Q> glm::associatedMin (vec< L, T, Q > const & x,
vec< L, U, Q > const & a,
vec< L, T, Q > const & y,
vec< L, U, Q > const & b,
vec< L, T, Q > const & z,
vec< L, U, Q > const & c,
vec< L, T, Q > const & w,
vec< L, U, Q > const & d 
)
+
+ +

Minimum comparison between 4 variables and returns 4 associated variable values.

+
See also
GLM_GTX_associated_min_max
+ +
+
+ +

◆ associatedMin() [9/10]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, U, Q> glm::associatedMin (x,
vec< L, U, Q > const & a,
y,
vec< L, U, Q > const & b,
z,
vec< L, U, Q > const & c,
w,
vec< L, U, Q > const & d 
)
+
+ +

Minimum comparison between 4 variables and returns 4 associated variable values.

+
See also
GLM_GTX_associated_min_max
+ +
+
+ +

◆ associatedMin() [10/10]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, U, Q> glm::associatedMin (vec< L, T, Q > const & x,
a,
vec< L, T, Q > const & y,
b,
vec< L, T, Q > const & z,
c,
vec< L, T, Q > const & w,
d 
)
+
+ +

Minimum comparison between 4 variables and returns 4 associated variable values.

+
See also
GLM_GTX_associated_min_max
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00726.html b/common/glm/doc/api/a00726.html new file mode 100644 index 000000000..79cb4bd6d --- /dev/null +++ b/common/glm/doc/api/a00726.html @@ -0,0 +1,317 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_bit + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename genIUType >
GLM_FUNC_DECL genIUType highestBitValue (genIUType Value)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > highestBitValue (vec< L, T, Q > const &value)
 
template<typename genIUType >
GLM_FUNC_DECL genIUType lowestBitValue (genIUType Value)
 
template<typename genIUType >
GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoAbove (genIUType Value)
 
template<length_t L, typename T , qualifier Q>
GLM_DEPRECATED GLM_FUNC_DECL vec< L, T, Q > powerOfTwoAbove (vec< L, T, Q > const &value)
 
template<typename genIUType >
GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoBelow (genIUType Value)
 
template<length_t L, typename T , qualifier Q>
GLM_DEPRECATED GLM_FUNC_DECL vec< L, T, Q > powerOfTwoBelow (vec< L, T, Q > const &value)
 
template<typename genIUType >
GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoNearest (genIUType Value)
 
template<length_t L, typename T , qualifier Q>
GLM_DEPRECATED GLM_FUNC_DECL vec< L, T, Q > powerOfTwoNearest (vec< L, T, Q > const &value)
 
+

Detailed Description

+

Include <glm/gtx/bit.hpp> to use the features of this extension.

+

Allow to perform bit operations on integer values

+

Function Documentation

+ +

◆ highestBitValue() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genIUType glm::highestBitValue (genIUType Value)
+
+
See also
GLM_GTX_bit
+ +
+
+ +

◆ highestBitValue() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::highestBitValue (vec< L, T, Q > const & value)
+
+ +

Find the highest bit set to 1 in a integer variable and return its value.

+
See also
GLM_GTX_bit
+ +
+
+ +

◆ lowestBitValue()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genIUType glm::lowestBitValue (genIUType Value)
+
+
See also
GLM_GTX_bit
+ +
+
+ +

◆ powerOfTwoAbove() [1/2]

+ +
+
+ + + + + + + + +
GLM_DEPRECATED GLM_FUNC_DECL genIUType glm::powerOfTwoAbove (genIUType Value)
+
+ +

Return the power of two number which value is just higher the input value.

+

Deprecated, use ceilPowerOfTwo from GTC_round instead

+
See also
GLM_GTC_round
+
+GLM_GTX_bit
+ +
+
+ +

◆ powerOfTwoAbove() [2/2]

+ +
+
+ + + + + + + + +
GLM_DEPRECATED GLM_FUNC_DECL vec<L, T, Q> glm::powerOfTwoAbove (vec< L, T, Q > const & value)
+
+ +

Return the power of two number which value is just higher the input value.

+

Deprecated, use ceilPowerOfTwo from GTC_round instead

+
See also
GLM_GTC_round
+
+GLM_GTX_bit
+ +
+
+ +

◆ powerOfTwoBelow() [1/2]

+ +
+
+ + + + + + + + +
GLM_DEPRECATED GLM_FUNC_DECL genIUType glm::powerOfTwoBelow (genIUType Value)
+
+ +

Return the power of two number which value is just lower the input value.

+

Deprecated, use floorPowerOfTwo from GTC_round instead

+
See also
GLM_GTC_round
+
+GLM_GTX_bit
+ +
+
+ +

◆ powerOfTwoBelow() [2/2]

+ +
+
+ + + + + + + + +
GLM_DEPRECATED GLM_FUNC_DECL vec<L, T, Q> glm::powerOfTwoBelow (vec< L, T, Q > const & value)
+
+ +

Return the power of two number which value is just lower the input value.

+

Deprecated, use floorPowerOfTwo from GTC_round instead

+
See also
GLM_GTC_round
+
+GLM_GTX_bit
+ +
+
+ +

◆ powerOfTwoNearest() [1/2]

+ +
+
+ + + + + + + + +
GLM_DEPRECATED GLM_FUNC_DECL genIUType glm::powerOfTwoNearest (genIUType Value)
+
+ +

Return the power of two number which value is the closet to the input value.

+

Deprecated, use roundPowerOfTwo from GTC_round instead

+
See also
GLM_GTC_round
+
+GLM_GTX_bit
+ +
+
+ +

◆ powerOfTwoNearest() [2/2]

+ +
+
+ + + + + + + + +
GLM_DEPRECATED GLM_FUNC_DECL vec<L, T, Q> glm::powerOfTwoNearest (vec< L, T, Q > const & value)
+
+ +

Return the power of two number which value is the closet to the input value.

+

Deprecated, use roundPowerOfTwo from GTC_round instead

+
See also
GLM_GTC_round
+
+GLM_GTX_bit
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00727.html b/common/glm/doc/api/a00727.html new file mode 100644 index 000000000..2d885fd7a --- /dev/null +++ b/common/glm/doc/api/a00727.html @@ -0,0 +1,131 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_closest_point + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_closest_point
+
+
+ + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > closestPointOnLine (vec< 3, T, Q > const &point, vec< 3, T, Q > const &a, vec< 3, T, Q > const &b)
 
+template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 2, T, Q > closestPointOnLine (vec< 2, T, Q > const &point, vec< 2, T, Q > const &a, vec< 2, T, Q > const &b)
 
+

Detailed Description

+

Include <glm/gtx/closest_point.hpp> to use the features of this extension.

+

Find the point on a straight line which is the closet of a point.

+

Function Documentation

+ +

◆ closestPointOnLine()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::closestPointOnLine (vec< 3, T, Q > const & point,
vec< 3, T, Q > const & a,
vec< 3, T, Q > const & b 
)
+
+ +

Find the point on a straight line which is the closet of a point.

+
See also
GLM_GTX_closest_point
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00728.html b/common/glm/doc/api/a00728.html new file mode 100644 index 000000000..f19b30dcc --- /dev/null +++ b/common/glm/doc/api/a00728.html @@ -0,0 +1,102 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_color_encoding + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_color_encoding
+
+
+ + + + + + + + + + + + + + +

+Functions

+template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > convertD65XYZToD50XYZ (vec< 3, T, Q > const &ColorD65XYZ)
 
+template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > convertD65XYZToLinearSRGB (vec< 3, T, Q > const &ColorD65XYZ)
 
+template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > convertLinearSRGBToD50XYZ (vec< 3, T, Q > const &ColorLinearSRGB)
 
+template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > convertLinearSRGBToD65XYZ (vec< 3, T, Q > const &ColorLinearSRGB)
 
+

Detailed Description

+

Include <glm/gtx/color_encoding.hpp> to use the features of this extension.

+

Allow to perform bit operations on integer values

+
+ + + + diff --git a/common/glm/doc/api/a00729.html b/common/glm/doc/api/a00729.html new file mode 100644 index 000000000..e48d0baf6 --- /dev/null +++ b/common/glm/doc/api/a00729.html @@ -0,0 +1,251 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_color_space + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_color_space
+
+
+ + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > hsvColor (vec< 3, T, Q > const &rgbValue)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T luminosity (vec< 3, T, Q > const &color)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > rgbColor (vec< 3, T, Q > const &hsvValue)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > saturation (T const s)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > saturation (T const s, vec< 3, T, Q > const &color)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > saturation (T const s, vec< 4, T, Q > const &color)
 
+

Detailed Description

+

Include <glm/gtx/color_space.hpp> to use the features of this extension.

+

Related to RGB to HSV conversions and operations.

+

Function Documentation

+ +

◆ hsvColor()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::hsvColor (vec< 3, T, Q > const & rgbValue)
+
+ +

Converts a color from RGB color space to its color in HSV color space.

+
See also
GLM_GTX_color_space
+ +
+
+ +

◆ luminosity()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL T glm::luminosity (vec< 3, T, Q > const & color)
+
+ +

Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals.

+
See also
GLM_GTX_color_space
+ +
+
+ +

◆ rgbColor()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::rgbColor (vec< 3, T, Q > const & hsvValue)
+
+ +

Converts a color from HSV color space to its color in RGB color space.

+
See also
GLM_GTX_color_space
+ +
+
+ +

◆ saturation() [1/3]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::saturation (T const s)
+
+ +

Build a saturation matrix.

+
See also
GLM_GTX_color_space
+ +
+
+ +

◆ saturation() [2/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::saturation (T const s,
vec< 3, T, Q > const & color 
)
+
+ +

Modify the saturation of a color.

+
See also
GLM_GTX_color_space
+ +
+
+ +

◆ saturation() [3/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<4, T, Q> glm::saturation (T const s,
vec< 4, T, Q > const & color 
)
+
+ +

Modify the saturation of a color.

+
See also
GLM_GTX_color_space
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00730.html b/common/glm/doc/api/a00730.html new file mode 100644 index 000000000..6dc3874b7 --- /dev/null +++ b/common/glm/doc/api/a00730.html @@ -0,0 +1,187 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_color_space_YCoCg + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_color_space_YCoCg
+
+
+ + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > rgb2YCoCg (vec< 3, T, Q > const &rgbColor)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > rgb2YCoCgR (vec< 3, T, Q > const &rgbColor)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > YCoCg2rgb (vec< 3, T, Q > const &YCoCgColor)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > YCoCgR2rgb (vec< 3, T, Q > const &YCoCgColor)
 
+

Detailed Description

+

Include <glm/gtx/color_space_YCoCg.hpp> to use the features of this extension.

+

RGB to YCoCg conversions and operations

+

Function Documentation

+ +

◆ rgb2YCoCg()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::rgb2YCoCg (vec< 3, T, Q > const & rgbColor)
+
+ +

Convert a color from RGB color space to YCoCg color space.

+
See also
GLM_GTX_color_space_YCoCg
+ +
+
+ +

◆ rgb2YCoCgR()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::rgb2YCoCgR (vec< 3, T, Q > const & rgbColor)
+
+ +

Convert a color from RGB color space to YCoCgR color space.

+
See also
"YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range"
+
+GLM_GTX_color_space_YCoCg
+ +
+
+ +

◆ YCoCg2rgb()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::YCoCg2rgb (vec< 3, T, Q > const & YCoCgColor)
+
+ +

Convert a color from YCoCg color space to RGB color space.

+
See also
GLM_GTX_color_space_YCoCg
+ +
+
+ +

◆ YCoCgR2rgb()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::YCoCgR2rgb (vec< 3, T, Q > const & YCoCgColor)
+
+ +

Convert a color from YCoCgR color space to RGB color space.

+
See also
"YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range"
+
+GLM_GTX_color_space_YCoCg
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00731.html b/common/glm/doc/api/a00731.html new file mode 100644 index 000000000..706077bf9 --- /dev/null +++ b/common/glm/doc/api/a00731.html @@ -0,0 +1,245 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_common + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
+
+
+ + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, bool, Q > closeBounded (vec< L, T, Q > const &Value, vec< L, T, Q > const &Min, vec< L, T, Q > const &Max)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fmod (vec< L, T, Q > const &v)
 
template<typename genType >
GLM_FUNC_DECL genType::bool_type isdenormal (genType const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, bool, Q > openBounded (vec< L, T, Q > const &Value, vec< L, T, Q > const &Min, vec< L, T, Q > const &Max)
 
+

Detailed Description

+

Include <glm/gtx/common.hpp> to use the features of this extension.

+

Provide functions to increase the compatibility with Cg and HLSL languages

+

Function Documentation

+ +

◆ closeBounded()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, bool, Q> glm::closeBounded (vec< L, T, Q > const & Value,
vec< L, T, Q > const & Min,
vec< L, T, Q > const & Max 
)
+
+ +

Returns whether vector components values are within an interval.

+

A closed interval includes its endpoints, and is denoted with square brackets.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+
See also
GLM_EXT_vector_relational
+ +
+
+ +

◆ fmod()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::fmod (vec< L, T, Q > const & v)
+
+ +

Similar to 'mod' but with a different rounding and integer support.

+

Returns 'x - y * trunc(x/y)' instead of 'x - y * floor(x/y)'

+
See also
GLSL mod vs HLSL fmod
+
+GLSL mod man page
+ +
+
+ +

◆ isdenormal()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType::bool_type glm::isdenormal (genType const & x)
+
+ +

Returns true if x is a denormalized number Numbers whose absolute value is too small to be represented in the normal format are represented in an alternate, denormalized format.

+

This format is less precise but can represent values closer to zero.

+
Template Parameters
+ + +
genTypeFloating-point scalar or vector types.
+
+
+
See also
GLSL isnan man page
+
+GLSL 4.20.8 specification, section 8.3 Common Functions
+ +
+
+ +

◆ openBounded()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, bool, Q> glm::openBounded (vec< L, T, Q > const & Value,
vec< L, T, Q > const & Min,
vec< L, T, Q > const & Max 
)
+
+ +

Returns whether vector components values are within an interval.

+

A open interval excludes its endpoints, and is denoted with square brackets.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point or integer scalar types
QValue from qualifier enum
+
+
+
See also
GLM_EXT_vector_relational
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00732.html b/common/glm/doc/api/a00732.html new file mode 100644 index 000000000..335562d16 --- /dev/null +++ b/common/glm/doc/api/a00732.html @@ -0,0 +1,338 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_compatibility + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_compatibility
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Typedefs

+typedef bool bool1
 
+typedef bool bool1x1
 
+typedef vec< 2, bool, highp > bool2
 
+typedef mat< 2, 2, bool, highp > bool2x2
 
+typedef mat< 2, 3, bool, highp > bool2x3
 
+typedef mat< 2, 4, bool, highp > bool2x4
 
+typedef vec< 3, bool, highp > bool3
 
+typedef mat< 3, 2, bool, highp > bool3x2
 
+typedef mat< 3, 3, bool, highp > bool3x3
 
+typedef mat< 3, 4, bool, highp > bool3x4
 
+typedef vec< 4, bool, highp > bool4
 
+typedef mat< 4, 2, bool, highp > bool4x2
 
+typedef mat< 4, 3, bool, highp > bool4x3
 
+typedef mat< 4, 4, bool, highp > bool4x4
 
+typedef double double1
 
+typedef double double1x1
 
+typedef vec< 2, double, highp > double2
 
+typedef mat< 2, 2, double, highp > double2x2
 
+typedef mat< 2, 3, double, highp > double2x3
 
+typedef mat< 2, 4, double, highp > double2x4
 
+typedef vec< 3, double, highp > double3
 
+typedef mat< 3, 2, double, highp > double3x2
 
+typedef mat< 3, 3, double, highp > double3x3
 
+typedef mat< 3, 4, double, highp > double3x4
 
+typedef vec< 4, double, highp > double4
 
+typedef mat< 4, 2, double, highp > double4x2
 
+typedef mat< 4, 3, double, highp > double4x3
 
+typedef mat< 4, 4, double, highp > double4x4
 
+typedef float float1
 
+typedef float float1x1
 
+typedef vec< 2, float, highp > float2
 
+typedef mat< 2, 2, float, highp > float2x2
 
+typedef mat< 2, 3, float, highp > float2x3
 
+typedef mat< 2, 4, float, highp > float2x4
 
+typedef vec< 3, float, highp > float3
 
+typedef mat< 3, 2, float, highp > float3x2
 
+typedef mat< 3, 3, float, highp > float3x3
 
+typedef mat< 3, 4, float, highp > float3x4
 
+typedef vec< 4, float, highp > float4
 
+typedef mat< 4, 2, float, highp > float4x2
 
+typedef mat< 4, 3, float, highp > float4x3
 
+typedef mat< 4, 4, float, highp > float4x4
 
+typedef int int1
 
+typedef int int1x1
 
+typedef vec< 2, int, highp > int2
 
+typedef mat< 2, 2, int, highp > int2x2
 
+typedef mat< 2, 3, int, highp > int2x3
 
+typedef mat< 2, 4, int, highp > int2x4
 
+typedef vec< 3, int, highp > int3
 
+typedef mat< 3, 2, int, highp > int3x2
 
+typedef mat< 3, 3, int, highp > int3x3
 
+typedef mat< 3, 4, int, highp > int3x4
 
+typedef vec< 4, int, highp > int4
 
+typedef mat< 4, 2, int, highp > int4x2
 
+typedef mat< 4, 3, int, highp > int4x3
 
+typedef mat< 4, 4, int, highp > int4x4
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER T atan2 (T x, T y)
 
+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER vec< 2, T, Q > atan2 (const vec< 2, T, Q > &x, const vec< 2, T, Q > &y)
 
+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER vec< 3, T, Q > atan2 (const vec< 3, T, Q > &x, const vec< 3, T, Q > &y)
 
+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER vec< 4, T, Q > atan2 (const vec< 4, T, Q > &x, const vec< 4, T, Q > &y)
 
+template<typename genType >
GLM_FUNC_DECL bool isfinite (genType const &x)
 
+template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 1, bool, Q > isfinite (const vec< 1, T, Q > &x)
 
+template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 2, bool, Q > isfinite (const vec< 2, T, Q > &x)
 
+template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, bool, Q > isfinite (const vec< 3, T, Q > &x)
 
+template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > isfinite (const vec< 4, T, Q > &x)
 
+template<typename T >
GLM_FUNC_QUALIFIER T lerp (T x, T y, T a)
 
+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER vec< 2, T, Q > lerp (const vec< 2, T, Q > &x, const vec< 2, T, Q > &y, T a)
 
+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER vec< 3, T, Q > lerp (const vec< 3, T, Q > &x, const vec< 3, T, Q > &y, T a)
 
+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER vec< 4, T, Q > lerp (const vec< 4, T, Q > &x, const vec< 4, T, Q > &y, T a)
 
+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER vec< 2, T, Q > lerp (const vec< 2, T, Q > &x, const vec< 2, T, Q > &y, const vec< 2, T, Q > &a)
 
+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER vec< 3, T, Q > lerp (const vec< 3, T, Q > &x, const vec< 3, T, Q > &y, const vec< 3, T, Q > &a)
 
+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER vec< 4, T, Q > lerp (const vec< 4, T, Q > &x, const vec< 4, T, Q > &y, const vec< 4, T, Q > &a)
 
+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER T saturate (T x)
 
+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER vec< 2, T, Q > saturate (const vec< 2, T, Q > &x)
 
+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER vec< 3, T, Q > saturate (const vec< 3, T, Q > &x)
 
+template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER vec< 4, T, Q > saturate (const vec< 4, T, Q > &x)
 
+

Detailed Description

+

Include <glm/gtx/compatibility.hpp> to use the features of this extension.

+

Provide functions to increase the compatibility with Cg and HLSL languages

+
+ + + + diff --git a/common/glm/doc/api/a00733.html b/common/glm/doc/api/a00733.html new file mode 100644 index 000000000..e5604be72 --- /dev/null +++ b/common/glm/doc/api/a00733.html @@ -0,0 +1,231 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_component_wise + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_component_wise
+
+
+ + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType::value_type compAdd (genType const &v)
 
template<typename genType >
GLM_FUNC_DECL genType::value_type compMax (genType const &v)
 
template<typename genType >
GLM_FUNC_DECL genType::value_type compMin (genType const &v)
 
template<typename genType >
GLM_FUNC_DECL genType::value_type compMul (genType const &v)
 
template<typename floatType , length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, floatType, Q > compNormalize (vec< L, T, Q > const &v)
 
template<length_t L, typename T , typename floatType , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > compScale (vec< L, floatType, Q > const &v)
 
+

Detailed Description

+

Include <glm/gtx/component_wise.hpp> to use the features of this extension.

+

Operations between components of a type

+

Function Documentation

+ +

◆ compAdd()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType::value_type glm::compAdd (genType const & v)
+
+ +

Add all vector components together.

+
See also
GLM_GTX_component_wise
+ +
+
+ +

◆ compMax()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType::value_type glm::compMax (genType const & v)
+
+ +

Find the maximum value between single vector components.

+
See also
GLM_GTX_component_wise
+ +
+
+ +

◆ compMin()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType::value_type glm::compMin (genType const & v)
+
+ +

Find the minimum value between single vector components.

+
See also
GLM_GTX_component_wise
+ +
+
+ +

◆ compMul()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType::value_type glm::compMul (genType const & v)
+
+ +

Multiply all vector components together.

+
See also
GLM_GTX_component_wise
+ +
+
+ +

◆ compNormalize()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, floatType, Q> glm::compNormalize (vec< L, T, Q > const & v)
+
+ +

Convert an integer vector to a normalized float vector.

+

If the parameter value type is already a floating qualifier type, the value is passed through.

See also
GLM_GTX_component_wise
+ +
+
+ +

◆ compScale()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::compScale (vec< L, floatType, Q > const & v)
+
+ +

Convert a normalized float vector to an integer vector.

+

If the parameter value type is already a floating qualifier type, the value is passed through.

See also
GLM_GTX_component_wise
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00734.html b/common/glm/doc/api/a00734.html new file mode 100644 index 000000000..2ac1b22bd --- /dev/null +++ b/common/glm/doc/api/a00734.html @@ -0,0 +1,551 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_dual_quaternion + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_dual_quaternion
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Typedefs

typedef highp_ddualquat ddualquat
 
typedef highp_fdualquat dualquat
 
typedef highp_fdualquat fdualquat
 
typedef tdualquat< double, highp > highp_ddualquat
 
typedef tdualquat< float, highp > highp_dualquat
 
typedef tdualquat< float, highp > highp_fdualquat
 
typedef tdualquat< double, lowp > lowp_ddualquat
 
typedef tdualquat< float, lowp > lowp_dualquat
 
typedef tdualquat< float, lowp > lowp_fdualquat
 
typedef tdualquat< double, mediump > mediump_ddualquat
 
typedef tdualquat< float, mediump > mediump_dualquat
 
typedef tdualquat< float, mediump > mediump_fdualquat
 
+ + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL tdualquat< T, Q > dual_quat_identity ()
 
template<typename T , qualifier Q>
GLM_FUNC_DECL tdualquat< T, Q > dualquat_cast (mat< 2, 4, T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL tdualquat< T, Q > dualquat_cast (mat< 3, 4, T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL tdualquat< T, Q > inverse (tdualquat< T, Q > const &q)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL tdualquat< T, Q > lerp (tdualquat< T, Q > const &x, tdualquat< T, Q > const &y, T const &a)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 2, 4, T, Q > mat2x4_cast (tdualquat< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 4, T, Q > mat3x4_cast (tdualquat< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL tdualquat< T, Q > normalize (tdualquat< T, Q > const &q)
 
+

Detailed Description

+

Include <glm/gtx/dual_quaternion.hpp> to use the features of this extension.

+

Defines a templated dual-quaternion type and several dual-quaternion operations.

+

Typedef Documentation

+ +

◆ ddualquat

+ +
+
+ + + + +
typedef highp_ddualquat ddualquat
+
+ +

Dual-quaternion of default double-qualifier floating-point numbers.

+
See also
GLM_GTX_dual_quaternion
+ +

Definition at line 260 of file dual_quaternion.hpp.

+ +
+
+ +

◆ dualquat

+ +
+
+ + + + +
typedef highp_fdualquat dualquat
+
+ +

Dual-quaternion of floating-point numbers.

+
See also
GLM_GTX_dual_quaternion
+ +

Definition at line 236 of file dual_quaternion.hpp.

+ +
+
+ +

◆ fdualquat

+ +
+
+ + + + +
typedef highp_fdualquat fdualquat
+
+ +

Dual-quaternion of single-qualifier floating-point numbers.

+
See also
GLM_GTX_dual_quaternion
+ +

Definition at line 241 of file dual_quaternion.hpp.

+ +
+
+ +

◆ highp_ddualquat

+ +
+
+ + + + +
typedef tdualquat<double, highp> highp_ddualquat
+
+ +

Dual-quaternion of high double-qualifier floating-point numbers.

+
See also
GLM_GTX_dual_quaternion
+ +

Definition at line 229 of file dual_quaternion.hpp.

+ +
+
+ +

◆ highp_dualquat

+ +
+
+ + + + +
typedef tdualquat<float, highp> highp_dualquat
+
+ +

Dual-quaternion of high single-qualifier floating-point numbers.

+
See also
GLM_GTX_dual_quaternion
+ +

Definition at line 197 of file dual_quaternion.hpp.

+ +
+
+ +

◆ highp_fdualquat

+ +
+
+ + + + +
typedef tdualquat<float, highp> highp_fdualquat
+
+ +

Dual-quaternion of high single-qualifier floating-point numbers.

+
See also
GLM_GTX_dual_quaternion
+ +

Definition at line 213 of file dual_quaternion.hpp.

+ +
+
+ +

◆ lowp_ddualquat

+ +
+
+ + + + +
typedef tdualquat<double, lowp> lowp_ddualquat
+
+ +

Dual-quaternion of low double-qualifier floating-point numbers.

+
See also
GLM_GTX_dual_quaternion
+ +

Definition at line 219 of file dual_quaternion.hpp.

+ +
+
+ +

◆ lowp_dualquat

+ +
+
+ + + + +
typedef tdualquat<float, lowp> lowp_dualquat
+
+ +

Dual-quaternion of low single-qualifier floating-point numbers.

+
See also
GLM_GTX_dual_quaternion
+ +

Definition at line 187 of file dual_quaternion.hpp.

+ +
+
+ +

◆ lowp_fdualquat

+ +
+
+ + + + +
typedef tdualquat<float, lowp> lowp_fdualquat
+
+ +

Dual-quaternion of low single-qualifier floating-point numbers.

+
See also
GLM_GTX_dual_quaternion
+ +

Definition at line 203 of file dual_quaternion.hpp.

+ +
+
+ +

◆ mediump_ddualquat

+ +
+
+ + + + +
typedef tdualquat<double, mediump> mediump_ddualquat
+
+ +

Dual-quaternion of medium double-qualifier floating-point numbers.

+
See also
GLM_GTX_dual_quaternion
+ +

Definition at line 224 of file dual_quaternion.hpp.

+ +
+
+ +

◆ mediump_dualquat

+ +
+
+ + + + +
typedef tdualquat<float, mediump> mediump_dualquat
+
+ +

Dual-quaternion of medium single-qualifier floating-point numbers.

+
See also
GLM_GTX_dual_quaternion
+ +

Definition at line 192 of file dual_quaternion.hpp.

+ +
+
+ +

◆ mediump_fdualquat

+ +
+
+ + + + +
typedef tdualquat<float, mediump> mediump_fdualquat
+
+ +

Dual-quaternion of medium single-qualifier floating-point numbers.

+
See also
GLM_GTX_dual_quaternion
+ +

Definition at line 208 of file dual_quaternion.hpp.

+ +
+
+

Function Documentation

+ +

◆ dual_quat_identity()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL tdualquat<T, Q> glm::dual_quat_identity ()
+
+ +

Creates an identity dual quaternion.

+
See also
GLM_GTX_dual_quaternion
+ +
+
+ +

◆ dualquat_cast() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL tdualquat<T, Q> glm::dualquat_cast (mat< 2, 4, T, Q > const & x)
+
+ +

Converts a 2 * 4 matrix (matrix which holds real and dual parts) to a quaternion.

+
See also
GLM_GTX_dual_quaternion
+ +
+
+ +

◆ dualquat_cast() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL tdualquat<T, Q> glm::dualquat_cast (mat< 3, 4, T, Q > const & x)
+
+ +

Converts a 3 * 4 matrix (augmented matrix rotation + translation) to a quaternion.

+
See also
GLM_GTX_dual_quaternion
+ +
+
+ +

◆ inverse()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL tdualquat<T, Q> glm::inverse (tdualquat< T, Q > const & q)
+
+ +

Returns the q inverse.

+
See also
GLM_GTX_dual_quaternion
+ +
+
+ +

◆ lerp()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL tdualquat<T, Q> glm::lerp (tdualquat< T, Q > const & x,
tdualquat< T, Q > const & y,
T const & a 
)
+
+ +

Returns the linear interpolation of two dual quaternion.

+
See also
gtc_dual_quaternion
+ +
+
+ +

◆ mat2x4_cast()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<2, 4, T, Q> glm::mat2x4_cast (tdualquat< T, Q > const & x)
+
+ +

Converts a quaternion to a 2 * 4 matrix.

+
See also
GLM_GTX_dual_quaternion
+ +
+
+ +

◆ mat3x4_cast()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<3, 4, T, Q> glm::mat3x4_cast (tdualquat< T, Q > const & x)
+
+ +

Converts a quaternion to a 3 * 4 matrix.

+
See also
GLM_GTX_dual_quaternion
+ +
+
+ +

◆ normalize()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL tdualquat<T, Q> glm::normalize (tdualquat< T, Q > const & q)
+
+ +

Returns the normalized quaternion.

+
See also
GLM_GTX_dual_quaternion
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00735.html b/common/glm/doc/api/a00735.html new file mode 100644 index 000000000..4bc9327fc --- /dev/null +++ b/common/glm/doc/api/a00735.html @@ -0,0 +1,917 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_easing + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType backEaseIn (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType backEaseIn (genType const &a, genType const &o)
 
template<typename genType >
GLM_FUNC_DECL genType backEaseInOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType backEaseInOut (genType const &a, genType const &o)
 
template<typename genType >
GLM_FUNC_DECL genType backEaseOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType backEaseOut (genType const &a, genType const &o)
 
template<typename genType >
GLM_FUNC_DECL genType bounceEaseIn (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType bounceEaseInOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType bounceEaseOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType circularEaseIn (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType circularEaseInOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType circularEaseOut (genType const &a)
 
+template<typename genType >
GLM_FUNC_DECL genType cubicEaseIn (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType cubicEaseInOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType cubicEaseOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType elasticEaseIn (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType elasticEaseInOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType elasticEaseOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType exponentialEaseIn (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType exponentialEaseInOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType exponentialEaseOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType linearInterpolation (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType quadraticEaseIn (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType quadraticEaseInOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType quadraticEaseOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType quarticEaseIn (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType quarticEaseInOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType quarticEaseOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType quinticEaseIn (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType quinticEaseInOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType quinticEaseOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType sineEaseIn (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType sineEaseInOut (genType const &a)
 
template<typename genType >
GLM_FUNC_DECL genType sineEaseOut (genType const &a)
 
+

Detailed Description

+

Include <glm/gtx/easing.hpp> to use the features of this extension.

+

Easing functions for animations and transitons All functions take a parameter x in the range [0.0,1.0]

+

Based on the AHEasing project of Warren Moore (https://github.com/warrenm/AHEasing)

+

Function Documentation

+ +

◆ backEaseIn() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::backEaseIn (genType const & a)
+
+
See also
GLM_GTX_easing
+ +
+
+ +

◆ backEaseIn() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::backEaseIn (genType const & a,
genType const & o 
)
+
+
Parameters
+ + + +
aparameter
oOptional overshoot modifier
+
+
+
See also
GLM_GTX_easing
+ +
+
+ +

◆ backEaseInOut() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::backEaseInOut (genType const & a)
+
+
See also
GLM_GTX_easing
+ +
+
+ +

◆ backEaseInOut() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::backEaseInOut (genType const & a,
genType const & o 
)
+
+
Parameters
+ + + +
aparameter
oOptional overshoot modifier
+
+
+
See also
GLM_GTX_easing
+ +
+
+ +

◆ backEaseOut() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::backEaseOut (genType const & a)
+
+
See also
GLM_GTX_easing
+ +
+
+ +

◆ backEaseOut() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::backEaseOut (genType const & a,
genType const & o 
)
+
+
Parameters
+ + + +
aparameter
oOptional overshoot modifier
+
+
+
See also
GLM_GTX_easing
+ +
+
+ +

◆ bounceEaseIn()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::bounceEaseIn (genType const & a)
+
+
See also
GLM_GTX_easing
+ +
+
+ +

◆ bounceEaseInOut()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::bounceEaseInOut (genType const & a)
+
+
See also
GLM_GTX_easing
+ +
+
+ +

◆ bounceEaseOut()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::bounceEaseOut (genType const & a)
+
+
See also
GLM_GTX_easing
+ +
+
+ +

◆ circularEaseIn()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::circularEaseIn (genType const & a)
+
+ +

Modelled after shifted quadrant IV of unit circle.

+
See also
GLM_GTX_easing
+ +
+
+ +

◆ circularEaseInOut()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::circularEaseInOut (genType const & a)
+
+ +

Modelled after the piecewise circular function y = (1/2)(1 - sqrt(1 - 4x^2)) ; [0, 0.5) y = (1/2)(sqrt(-(2x - 3)*(2x - 1)) + 1) ; [0.5, 1].

+
See also
GLM_GTX_easing
+ +
+
+ +

◆ circularEaseOut()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::circularEaseOut (genType const & a)
+
+ +

Modelled after shifted quadrant II of unit circle.

+
See also
GLM_GTX_easing
+ +
+
+ +

◆ cubicEaseInOut()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::cubicEaseInOut (genType const & a)
+
+ +

Modelled after the piecewise cubic y = (1/2)((2x)^3) ; [0, 0.5) y = (1/2)((2x-2)^3 + 2) ; [0.5, 1].

+
See also
GLM_GTX_easing
+ +
+
+ +

◆ cubicEaseOut()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::cubicEaseOut (genType const & a)
+
+ +

Modelled after the cubic y = (x - 1)^3 + 1.

+
See also
GLM_GTX_easing
+ +
+
+ +

◆ elasticEaseIn()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::elasticEaseIn (genType const & a)
+
+ +

Modelled after the damped sine wave y = sin(13pi/2*x)*pow(2, 10 * (x - 1))

+
See also
GLM_GTX_easing
+ +
+
+ +

◆ elasticEaseInOut()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::elasticEaseInOut (genType const & a)
+
+ +

Modelled after the piecewise exponentially-damped sine wave: y = (1/2)*sin(13pi/2*(2*x))*pow(2, 10 * ((2*x) - 1)) ; [0,0.5) y = (1/2)*(sin(-13pi/2*((2x-1)+1))*pow(2,-10(2*x-1)) + 2) ; [0.5, 1].

+
See also
GLM_GTX_easing
+ +
+
+ +

◆ elasticEaseOut()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::elasticEaseOut (genType const & a)
+
+ +

Modelled after the damped sine wave y = sin(-13pi/2*(x + 1))*pow(2, -10x) + 1.

+
See also
GLM_GTX_easing
+ +
+
+ +

◆ exponentialEaseIn()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::exponentialEaseIn (genType const & a)
+
+ +

Modelled after the exponential function y = 2^(10(x - 1))

+
See also
GLM_GTX_easing
+ +
+
+ +

◆ exponentialEaseInOut()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::exponentialEaseInOut (genType const & a)
+
+ +

Modelled after the piecewise exponential y = (1/2)2^(10(2x - 1)) ; [0,0.5) y = -(1/2)*2^(-10(2x - 1))) + 1 ; [0.5,1].

+
See also
GLM_GTX_easing
+ +
+
+ +

◆ exponentialEaseOut()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::exponentialEaseOut (genType const & a)
+
+ +

Modelled after the exponential function y = -2^(-10x) + 1.

+
See also
GLM_GTX_easing
+ +
+
+ +

◆ linearInterpolation()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::linearInterpolation (genType const & a)
+
+ +

Modelled after the line y = x.

+
See also
GLM_GTX_easing
+ +
+
+ +

◆ quadraticEaseIn()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::quadraticEaseIn (genType const & a)
+
+ +

Modelled after the parabola y = x^2.

+
See also
GLM_GTX_easing
+ +
+
+ +

◆ quadraticEaseInOut()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::quadraticEaseInOut (genType const & a)
+
+ +

Modelled after the piecewise quadratic y = (1/2)((2x)^2) ; [0, 0.5) y = -(1/2)((2x-1)*(2x-3) - 1) ; [0.5, 1].

+
See also
GLM_GTX_easing
+ +
+
+ +

◆ quadraticEaseOut()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::quadraticEaseOut (genType const & a)
+
+ +

Modelled after the parabola y = -x^2 + 2x.

+
See also
GLM_GTX_easing
+ +
+
+ +

◆ quarticEaseIn()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::quarticEaseIn (genType const & a)
+
+ +

Modelled after the quartic x^4.

+
See also
GLM_GTX_easing
+ +
+
+ +

◆ quarticEaseInOut()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::quarticEaseInOut (genType const & a)
+
+ +

Modelled after the piecewise quartic y = (1/2)((2x)^4) ; [0, 0.5) y = -(1/2)((2x-2)^4 - 2) ; [0.5, 1].

+
See also
GLM_GTX_easing
+ +
+
+ +

◆ quarticEaseOut()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::quarticEaseOut (genType const & a)
+
+ +

Modelled after the quartic y = 1 - (x - 1)^4.

+
See also
GLM_GTX_easing
+ +
+
+ +

◆ quinticEaseIn()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::quinticEaseIn (genType const & a)
+
+ +

Modelled after the quintic y = x^5.

+
See also
GLM_GTX_easing
+ +
+
+ +

◆ quinticEaseInOut()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::quinticEaseInOut (genType const & a)
+
+ +

Modelled after the piecewise quintic y = (1/2)((2x)^5) ; [0, 0.5) y = (1/2)((2x-2)^5 + 2) ; [0.5, 1].

+
See also
GLM_GTX_easing
+ +
+
+ +

◆ quinticEaseOut()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::quinticEaseOut (genType const & a)
+
+ +

Modelled after the quintic y = (x - 1)^5 + 1.

+
See also
GLM_GTX_easing
+ +
+
+ +

◆ sineEaseIn()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::sineEaseIn (genType const & a)
+
+ +

Modelled after quarter-cycle of sine wave.

+
See also
GLM_GTX_easing
+ +
+
+ +

◆ sineEaseInOut()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::sineEaseInOut (genType const & a)
+
+ +

Modelled after half sine wave.

+
See also
GLM_GTX_easing
+ +
+
+ +

◆ sineEaseOut()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::sineEaseOut (genType const & a)
+
+ +

Modelled after quarter-cycle of sine wave (different phase)

+
See also
GLM_GTX_easing
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00736.html b/common/glm/doc/api/a00736.html new file mode 100644 index 000000000..55efdec00 --- /dev/null +++ b/common/glm/doc/api/a00736.html @@ -0,0 +1,1634 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_euler_angles + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_euler_angles
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > derivedEulerAngleX (T const &angleX, T const &angularVelocityX)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > derivedEulerAngleY (T const &angleY, T const &angularVelocityY)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > derivedEulerAngleZ (T const &angleZ, T const &angularVelocityZ)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleX (T const &angleX)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleXY (T const &angleX, T const &angleY)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleXYX (T const &t1, T const &t2, T const &t3)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleXYZ (T const &t1, T const &t2, T const &t3)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleXZ (T const &angleX, T const &angleZ)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleXZX (T const &t1, T const &t2, T const &t3)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleXZY (T const &t1, T const &t2, T const &t3)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleY (T const &angleY)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleYX (T const &angleY, T const &angleX)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleYXY (T const &t1, T const &t2, T const &t3)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleYXZ (T const &yaw, T const &pitch, T const &roll)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleYZ (T const &angleY, T const &angleZ)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleYZX (T const &t1, T const &t2, T const &t3)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleYZY (T const &t1, T const &t2, T const &t3)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZ (T const &angleZ)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZX (T const &angle, T const &angleX)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZXY (T const &t1, T const &t2, T const &t3)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZXZ (T const &t1, T const &t2, T const &t3)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZY (T const &angleZ, T const &angleY)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZYX (T const &t1, T const &t2, T const &t3)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > eulerAngleZYZ (T const &t1, T const &t2, T const &t3)
 
template<typename T >
GLM_FUNC_DECL void extractEulerAngleXYX (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
 
template<typename T >
GLM_FUNC_DECL void extractEulerAngleXYZ (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
 
template<typename T >
GLM_FUNC_DECL void extractEulerAngleXZX (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
 
template<typename T >
GLM_FUNC_DECL void extractEulerAngleXZY (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
 
template<typename T >
GLM_FUNC_DECL void extractEulerAngleYXY (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
 
template<typename T >
GLM_FUNC_DECL void extractEulerAngleYXZ (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
 
template<typename T >
GLM_FUNC_DECL void extractEulerAngleYZX (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
 
template<typename T >
GLM_FUNC_DECL void extractEulerAngleYZY (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
 
template<typename T >
GLM_FUNC_DECL void extractEulerAngleZXY (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
 
template<typename T >
GLM_FUNC_DECL void extractEulerAngleZXZ (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
 
template<typename T >
GLM_FUNC_DECL void extractEulerAngleZYX (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
 
template<typename T >
GLM_FUNC_DECL void extractEulerAngleZYZ (mat< 4, 4, T, defaultp > const &M, T &t1, T &t2, T &t3)
 
template<typename T >
GLM_FUNC_DECL mat< 2, 2, T, defaultp > orientate2 (T const &angle)
 
template<typename T >
GLM_FUNC_DECL mat< 3, 3, T, defaultp > orientate3 (T const &angle)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > orientate3 (vec< 3, T, Q > const &angles)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > orientate4 (vec< 3, T, Q > const &angles)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > yawPitchRoll (T const &yaw, T const &pitch, T const &roll)
 
+

Detailed Description

+

Include <glm/gtx/euler_angles.hpp> to use the features of this extension.

+

Build matrices from Euler angles.

+

Extraction of Euler angles from rotation matrix. Based on the original paper 2014 Mike Day - Extracting Euler Angles from a Rotation Matrix.

+

Function Documentation

+ +

◆ derivedEulerAngleX()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::derivedEulerAngleX (T const & angleX,
T const & angularVelocityX 
)
+
+ +

Creates a 3D 4 * 4 homogeneous derived matrix from the rotation matrix about X-axis.

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ derivedEulerAngleY()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::derivedEulerAngleY (T const & angleY,
T const & angularVelocityY 
)
+
+ +

Creates a 3D 4 * 4 homogeneous derived matrix from the rotation matrix about Y-axis.

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ derivedEulerAngleZ()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::derivedEulerAngleZ (T const & angleZ,
T const & angularVelocityZ 
)
+
+ +

Creates a 3D 4 * 4 homogeneous derived matrix from the rotation matrix about Z-axis.

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ eulerAngleX()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::eulerAngleX (T const & angleX)
+
+ +

Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle X.

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ eulerAngleXY()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::eulerAngleXY (T const & angleX,
T const & angleY 
)
+
+ +

Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y).

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ eulerAngleXYX()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::eulerAngleXYX (T const & t1,
T const & t2,
T const & t3 
)
+
+ +

Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y * X).

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ eulerAngleXYZ()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::eulerAngleXYZ (T const & t1,
T const & t2,
T const & t3 
)
+
+ +

Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y * Z).

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ eulerAngleXZ()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::eulerAngleXZ (T const & angleX,
T const & angleZ 
)
+
+ +

Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z).

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ eulerAngleXZX()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::eulerAngleXZX (T const & t1,
T const & t2,
T const & t3 
)
+
+ +

Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z * X).

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ eulerAngleXZY()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::eulerAngleXZY (T const & t1,
T const & t2,
T const & t3 
)
+
+ +

Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z * Y).

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ eulerAngleY()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::eulerAngleY (T const & angleY)
+
+ +

Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Y.

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ eulerAngleYX()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::eulerAngleYX (T const & angleY,
T const & angleX 
)
+
+ +

Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X).

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ eulerAngleYXY()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::eulerAngleYXY (T const & t1,
T const & t2,
T const & t3 
)
+
+ +

Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Y).

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ eulerAngleYXZ()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::eulerAngleYXZ (T const & yaw,
T const & pitch,
T const & roll 
)
+
+ +

Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ eulerAngleYZ()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::eulerAngleYZ (T const & angleY,
T const & angleZ 
)
+
+ +

Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z).

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ eulerAngleYZX()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::eulerAngleYZX (T const & t1,
T const & t2,
T const & t3 
)
+
+ +

Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z * X).

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ eulerAngleYZY()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::eulerAngleYZY (T const & t1,
T const & t2,
T const & t3 
)
+
+ +

Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z * Y).

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ eulerAngleZ()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::eulerAngleZ (T const & angleZ)
+
+ +

Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Z.

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ eulerAngleZX()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::eulerAngleZX (T const & angle,
T const & angleX 
)
+
+ +

Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X).

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ eulerAngleZXY()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::eulerAngleZXY (T const & t1,
T const & t2,
T const & t3 
)
+
+ +

Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X * Y).

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ eulerAngleZXZ()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::eulerAngleZXZ (T const & t1,
T const & t2,
T const & t3 
)
+
+ +

Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X * Z).

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ eulerAngleZY()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::eulerAngleZY (T const & angleZ,
T const & angleY 
)
+
+ +

Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y).

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ eulerAngleZYX()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::eulerAngleZYX (T const & t1,
T const & t2,
T const & t3 
)
+
+ +

Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y * X).

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ eulerAngleZYZ()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::eulerAngleZYZ (T const & t1,
T const & t2,
T const & t3 
)
+
+ +

Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y * Z).

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ extractEulerAngleXYX()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL void glm::extractEulerAngleXYX (mat< 4, 4, T, defaultp > const & M,
T & t1,
T & t2,
T & t3 
)
+
+ +

Extracts the (X * Y * X) Euler angles from the rotation matrix M.

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ extractEulerAngleXYZ()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL void glm::extractEulerAngleXYZ (mat< 4, 4, T, defaultp > const & M,
T & t1,
T & t2,
T & t3 
)
+
+ +

Extracts the (X * Y * Z) Euler angles from the rotation matrix M.

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ extractEulerAngleXZX()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL void glm::extractEulerAngleXZX (mat< 4, 4, T, defaultp > const & M,
T & t1,
T & t2,
T & t3 
)
+
+ +

Extracts the (X * Z * X) Euler angles from the rotation matrix M.

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ extractEulerAngleXZY()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL void glm::extractEulerAngleXZY (mat< 4, 4, T, defaultp > const & M,
T & t1,
T & t2,
T & t3 
)
+
+ +

Extracts the (X * Z * Y) Euler angles from the rotation matrix M.

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ extractEulerAngleYXY()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL void glm::extractEulerAngleYXY (mat< 4, 4, T, defaultp > const & M,
T & t1,
T & t2,
T & t3 
)
+
+ +

Extracts the (Y * X * Y) Euler angles from the rotation matrix M.

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ extractEulerAngleYXZ()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL void glm::extractEulerAngleYXZ (mat< 4, 4, T, defaultp > const & M,
T & t1,
T & t2,
T & t3 
)
+
+ +

Extracts the (Y * X * Z) Euler angles from the rotation matrix M.

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ extractEulerAngleYZX()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL void glm::extractEulerAngleYZX (mat< 4, 4, T, defaultp > const & M,
T & t1,
T & t2,
T & t3 
)
+
+ +

Extracts the (Y * Z * X) Euler angles from the rotation matrix M.

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ extractEulerAngleYZY()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL void glm::extractEulerAngleYZY (mat< 4, 4, T, defaultp > const & M,
T & t1,
T & t2,
T & t3 
)
+
+ +

Extracts the (Y * Z * Y) Euler angles from the rotation matrix M.

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ extractEulerAngleZXY()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL void glm::extractEulerAngleZXY (mat< 4, 4, T, defaultp > const & M,
T & t1,
T & t2,
T & t3 
)
+
+ +

Extracts the (Z * X * Y) Euler angles from the rotation matrix M.

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ extractEulerAngleZXZ()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL void glm::extractEulerAngleZXZ (mat< 4, 4, T, defaultp > const & M,
T & t1,
T & t2,
T & t3 
)
+
+ +

Extracts the (Z * X * Z) Euler angles from the rotation matrix M.

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ extractEulerAngleZYX()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL void glm::extractEulerAngleZYX (mat< 4, 4, T, defaultp > const & M,
T & t1,
T & t2,
T & t3 
)
+
+ +

Extracts the (Z * Y * X) Euler angles from the rotation matrix M.

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ extractEulerAngleZYZ()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL void glm::extractEulerAngleZYZ (mat< 4, 4, T, defaultp > const & M,
T & t1,
T & t2,
T & t3 
)
+
+ +

Extracts the (Z * Y * Z) Euler angles from the rotation matrix M.

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ orientate2()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<2, 2, T, defaultp> glm::orientate2 (T const & angle)
+
+ +

Creates a 2D 2 * 2 rotation matrix from an euler angle.

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ orientate3() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<3, 3, T, defaultp> glm::orientate3 (T const & angle)
+
+ +

Creates a 2D 4 * 4 homogeneous rotation matrix from an euler angle.

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ orientate3() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<3, 3, T, Q> glm::orientate3 (vec< 3, T, Q > const & angles)
+
+ +

Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z).

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ orientate4()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::orientate4 (vec< 3, T, Q > const & angles)
+
+ +

Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).

+
See also
GLM_GTX_euler_angles
+ +
+
+ +

◆ yawPitchRoll()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, defaultp> glm::yawPitchRoll (T const & yaw,
T const & pitch,
T const & roll 
)
+
+ +

Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).

+
See also
GLM_GTX_euler_angles
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00737.html b/common/glm/doc/api/a00737.html new file mode 100644 index 000000000..b1575c2ea --- /dev/null +++ b/common/glm/doc/api/a00737.html @@ -0,0 +1,127 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_extend + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
+
+
+ + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType extend (genType const &Origin, genType const &Source, typename genType::value_type const Length)
 
+

Detailed Description

+

Include <glm/gtx/extend.hpp> to use the features of this extension.

+

Extend a position from a source to a position at a defined length.

+

Function Documentation

+ +

◆ extend()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::extend (genType const & Origin,
genType const & Source,
typename genType::value_type const Length 
)
+
+ +

Extends of Length the Origin position using the (Source - Origin) direction.

+
See also
GLM_GTX_extend
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00738.html b/common/glm/doc/api/a00738.html new file mode 100644 index 000000000..ec36d7d3d --- /dev/null +++ b/common/glm/doc/api/a00738.html @@ -0,0 +1,832 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_extented_min_max + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_extented_min_max
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType fclamp (genType x, genType minVal, genType maxVal)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fclamp (vec< L, T, Q > const &x, T minVal, T maxVal)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fclamp (vec< L, T, Q > const &x, vec< L, T, Q > const &minVal, vec< L, T, Q > const &maxVal)
 
template<typename genType >
GLM_FUNC_DECL genType fmax (genType x, genType y)
 
template<typename genType >
GLM_FUNC_DECL genType fmin (genType x, genType y)
 
template<typename T >
GLM_FUNC_DECL T max (T const &x, T const &y, T const &z)
 
template<typename T , template< typename > class C>
GLM_FUNC_DECL C< T > max (C< T > const &x, typename C< T >::T const &y, typename C< T >::T const &z)
 
template<typename T , template< typename > class C>
GLM_FUNC_DECL C< T > max (C< T > const &x, C< T > const &y, C< T > const &z)
 
template<typename T >
GLM_FUNC_DECL T max (T const &x, T const &y, T const &z, T const &w)
 
template<typename T , template< typename > class C>
GLM_FUNC_DECL C< T > max (C< T > const &x, typename C< T >::T const &y, typename C< T >::T const &z, typename C< T >::T const &w)
 
template<typename T , template< typename > class C>
GLM_FUNC_DECL C< T > max (C< T > const &x, C< T > const &y, C< T > const &z, C< T > const &w)
 
template<typename T >
GLM_FUNC_DECL T min (T const &x, T const &y, T const &z)
 
template<typename T , template< typename > class C>
GLM_FUNC_DECL C< T > min (C< T > const &x, typename C< T >::T const &y, typename C< T >::T const &z)
 
template<typename T , template< typename > class C>
GLM_FUNC_DECL C< T > min (C< T > const &x, C< T > const &y, C< T > const &z)
 
template<typename T >
GLM_FUNC_DECL T min (T const &x, T const &y, T const &z, T const &w)
 
template<typename T , template< typename > class C>
GLM_FUNC_DECL C< T > min (C< T > const &x, typename C< T >::T const &y, typename C< T >::T const &z, typename C< T >::T const &w)
 
template<typename T , template< typename > class C>
GLM_FUNC_DECL C< T > min (C< T > const &x, C< T > const &y, C< T > const &z, C< T > const &w)
 
+

Detailed Description

+

Include <glm/gtx/extented_min_max.hpp> to use the features of this extension.

+

Min and max functions for 3 to 4 parameters.

+

Function Documentation

+ +

◆ fclamp() [1/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::fclamp (genType x,
genType minVal,
genType maxVal 
)
+
+ +

Returns min(max(x, minVal), maxVal) for each component in x.

+

If one of the two arguments is NaN, the value of the other argument is returned.

+
Template Parameters
+ + +
genTypeFloating-point scalar or vector types.
+
+
+
See also
gtx_extented_min_max
+ +
+
+ +

◆ fclamp() [2/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::fclamp (vec< L, T, Q > const & x,
minVal,
maxVal 
)
+
+ +

Returns min(max(x, minVal), maxVal) for each component in x.

+

If one of the two arguments is NaN, the value of the other argument is returned.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
gtx_extented_min_max
+ +
+
+ +

◆ fclamp() [3/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::fclamp (vec< L, T, Q > const & x,
vec< L, T, Q > const & minVal,
vec< L, T, Q > const & maxVal 
)
+
+ +

Returns min(max(x, minVal), maxVal) for each component in x.

+

If one of the two arguments is NaN, the value of the other argument is returned.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
gtx_extented_min_max
+ +
+
+ +

◆ fmax()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::fmax (genType x,
genType y 
)
+
+ +

Returns y if x < y; otherwise, it returns x.

+

If one of the two arguments is NaN, the value of the other argument is returned.

+
Template Parameters
+ + +
genTypeFloating-point; scalar or vector types.
+
+
+
See also
gtx_extented_min_max
+
+std::fmax documentation
+ +
+
+ +

◆ fmin()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::fmin (genType x,
genType y 
)
+
+ +

Returns y if y < x; otherwise, it returns x.

+

If one of the two arguments is NaN, the value of the other argument is returned.

+
Template Parameters
+ + +
genTypeFloating-point or integer; scalar or vector types.
+
+
+
See also
gtx_extented_min_max
+ +
+
+ +

◆ max() [1/6]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::max (T const & x,
T const & y,
T const & z 
)
+
+ +

Return the maximum component-wise values of 3 inputs.

+
See also
gtx_extented_min_max
+ +
+
+ +

◆ max() [2/6]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL C<T> glm::max (C< T > const & x,
typename C< T >::T const & y,
typename C< T >::T const & z 
)
+
+ +

Return the maximum component-wise values of 3 inputs.

+
See also
gtx_extented_min_max
+ +
+
+ +

◆ max() [3/6]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL C<T> glm::max (C< T > const & x,
C< T > const & y,
C< T > const & z 
)
+
+ +

Return the maximum component-wise values of 3 inputs.

+
See also
gtx_extented_min_max
+ +
+
+ +

◆ max() [4/6]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::max (T const & x,
T const & y,
T const & z,
T const & w 
)
+
+ +

Return the maximum component-wise values of 4 inputs.

+
See also
gtx_extented_min_max
+ +
+
+ +

◆ max() [5/6]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL C<T> glm::max (C< T > const & x,
typename C< T >::T const & y,
typename C< T >::T const & z,
typename C< T >::T const & w 
)
+
+ +

Return the maximum component-wise values of 4 inputs.

+
See also
gtx_extented_min_max
+ +
+
+ +

◆ max() [6/6]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL C<T> glm::max (C< T > const & x,
C< T > const & y,
C< T > const & z,
C< T > const & w 
)
+
+ +

Return the maximum component-wise values of 4 inputs.

+
See also
gtx_extented_min_max
+ +
+
+ +

◆ min() [1/6]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::min (T const & x,
T const & y,
T const & z 
)
+
+ +

Return the minimum component-wise values of 3 inputs.

+
See also
gtx_extented_min_max
+ +
+
+ +

◆ min() [2/6]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL C<T> glm::min (C< T > const & x,
typename C< T >::T const & y,
typename C< T >::T const & z 
)
+
+ +

Return the minimum component-wise values of 3 inputs.

+
See also
gtx_extented_min_max
+ +
+
+ +

◆ min() [3/6]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL C<T> glm::min (C< T > const & x,
C< T > const & y,
C< T > const & z 
)
+
+ +

Return the minimum component-wise values of 3 inputs.

+
See also
gtx_extented_min_max
+ +
+
+ +

◆ min() [4/6]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::min (T const & x,
T const & y,
T const & z,
T const & w 
)
+
+ +

Return the minimum component-wise values of 4 inputs.

+
See also
gtx_extented_min_max
+ +
+
+ +

◆ min() [5/6]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL C<T> glm::min (C< T > const & x,
typename C< T >::T const & y,
typename C< T >::T const & z,
typename C< T >::T const & w 
)
+
+ +

Return the minimum component-wise values of 4 inputs.

+
See also
gtx_extented_min_max
+ +
+
+ +

◆ min() [6/6]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL C<T> glm::min (C< T > const & x,
C< T > const & y,
C< T > const & z,
C< T > const & w 
)
+
+ +

Return the minimum component-wise values of 4 inputs.

+
See also
gtx_extented_min_max
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00739.html b/common/glm/doc/api/a00739.html new file mode 100644 index 000000000..95e63d375 --- /dev/null +++ b/common/glm/doc/api/a00739.html @@ -0,0 +1,128 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_exterior_product + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_exterior_product
+
+
+ + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL T cross (vec< 2, T, Q > const &v, vec< 2, T, Q > const &u)
 
+

Detailed Description

+

Include <glm/gtx/exterior_product.hpp> to use the features of this extension.

+

Allow to perform bit operations on integer values

+

Function Documentation

+ +

◆ cross()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::cross (vec< 2, T, Q > const & v,
vec< 2, T, Q > const & u 
)
+
+ +

Returns the cross product of x and y.

+
Template Parameters
+ + + +
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
Exterior product
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00740.html b/common/glm/doc/api/a00740.html new file mode 100644 index 000000000..f5aa0f67c --- /dev/null +++ b/common/glm/doc/api/a00740.html @@ -0,0 +1,405 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_fast_exponential + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_fast_exponential
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T >
GLM_FUNC_DECL T fastExp (T x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fastExp (vec< L, T, Q > const &x)
 
template<typename T >
GLM_FUNC_DECL T fastExp2 (T x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fastExp2 (vec< L, T, Q > const &x)
 
template<typename T >
GLM_FUNC_DECL T fastLog (T x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fastLog (vec< L, T, Q > const &x)
 
template<typename T >
GLM_FUNC_DECL T fastLog2 (T x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fastLog2 (vec< L, T, Q > const &x)
 
template<typename genType >
GLM_FUNC_DECL genType fastPow (genType x, genType y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fastPow (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<typename genTypeT , typename genTypeU >
GLM_FUNC_DECL genTypeT fastPow (genTypeT x, genTypeU y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fastPow (vec< L, T, Q > const &x)
 
+

Detailed Description

+

Include <glm/gtx/fast_exponential.hpp> to use the features of this extension.

+

Fast but less accurate implementations of exponential based functions.

+

Function Documentation

+ +

◆ fastExp() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL T glm::fastExp (x)
+
+ +

Faster than the common exp function but less accurate.

+
See also
GLM_GTX_fast_exponential
+ +
+
+ +

◆ fastExp() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::fastExp (vec< L, T, Q > const & x)
+
+ +

Faster than the common exp function but less accurate.

+
See also
GLM_GTX_fast_exponential
+ +
+
+ +

◆ fastExp2() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL T glm::fastExp2 (x)
+
+ +

Faster than the common exp2 function but less accurate.

+
See also
GLM_GTX_fast_exponential
+ +
+
+ +

◆ fastExp2() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::fastExp2 (vec< L, T, Q > const & x)
+
+ +

Faster than the common exp2 function but less accurate.

+
See also
GLM_GTX_fast_exponential
+ +
+
+ +

◆ fastLog() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL T glm::fastLog (x)
+
+ +

Faster than the common log function but less accurate.

+
See also
GLM_GTX_fast_exponential
+ +
+
+ +

◆ fastLog() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::fastLog (vec< L, T, Q > const & x)
+
+ +

Faster than the common exp2 function but less accurate.

+
See also
GLM_GTX_fast_exponential
+ +
+
+ +

◆ fastLog2() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL T glm::fastLog2 (x)
+
+ +

Faster than the common log2 function but less accurate.

+
See also
GLM_GTX_fast_exponential
+ +
+
+ +

◆ fastLog2() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::fastLog2 (vec< L, T, Q > const & x)
+
+ +

Faster than the common log2 function but less accurate.

+
See also
GLM_GTX_fast_exponential
+ +
+
+ +

◆ fastPow() [1/4]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::fastPow (genType x,
genType y 
)
+
+ +

Faster than the common pow function but less accurate.

+
See also
GLM_GTX_fast_exponential
+ +
+
+ +

◆ fastPow() [2/4]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::fastPow (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Faster than the common pow function but less accurate.

+
See also
GLM_GTX_fast_exponential
+ +
+
+ +

◆ fastPow() [3/4]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genTypeT glm::fastPow (genTypeT x,
genTypeU y 
)
+
+ +

Faster than the common pow function but less accurate.

+
See also
GLM_GTX_fast_exponential
+ +
+
+ +

◆ fastPow() [4/4]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::fastPow (vec< L, T, Q > const & x)
+
+ +

Faster than the common pow function but less accurate.

+
See also
GLM_GTX_fast_exponential
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00741.html b/common/glm/doc/api/a00741.html new file mode 100644 index 000000000..5110aa79b --- /dev/null +++ b/common/glm/doc/api/a00741.html @@ -0,0 +1,325 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_fast_square_root + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_fast_square_root
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType fastDistance (genType x, genType y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T fastDistance (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<typename genType >
GLM_FUNC_DECL genType fastInverseSqrt (genType x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fastInverseSqrt (vec< L, T, Q > const &x)
 
template<typename genType >
GLM_FUNC_DECL genType fastLength (genType x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T fastLength (vec< L, T, Q > const &x)
 
template<typename genType >
GLM_FUNC_DECL genType fastNormalize (genType const &x)
 
template<typename genType >
GLM_FUNC_DECL genType fastSqrt (genType x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fastSqrt (vec< L, T, Q > const &x)
 
+

Detailed Description

+

Include <glm/gtx/fast_square_root.hpp> to use the features of this extension.

+

Fast but less accurate implementations of square root based functions.

    +
  • Sqrt optimisation based on Newton's method, www.gamedev.net/community/forums/topic.asp?topic id=139956
  • +
+

Function Documentation

+ +

◆ fastDistance() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::fastDistance (genType x,
genType y 
)
+
+ +

Faster than the common distance function but less accurate.

+
See also
GLM_GTX_fast_square_root extension.
+ +
+
+ +

◆ fastDistance() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::fastDistance (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Faster than the common distance function but less accurate.

+
See also
GLM_GTX_fast_square_root extension.
+ +
+
+ +

◆ fastInverseSqrt() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::fastInverseSqrt (genType x)
+
+ +

Faster than the common inversesqrt function but less accurate.

+
See also
GLM_GTX_fast_square_root extension.
+ +
+
+ +

◆ fastInverseSqrt() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::fastInverseSqrt (vec< L, T, Q > const & x)
+
+ +

Faster than the common inversesqrt function but less accurate.

+
See also
GLM_GTX_fast_square_root extension.
+ +
+
+ +

◆ fastLength() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::fastLength (genType x)
+
+ +

Faster than the common length function but less accurate.

+
See also
GLM_GTX_fast_square_root extension.
+ +
+
+ +

◆ fastLength() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL T glm::fastLength (vec< L, T, Q > const & x)
+
+ +

Faster than the common length function but less accurate.

+
See also
GLM_GTX_fast_square_root extension.
+ +
+
+ +

◆ fastNormalize()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::fastNormalize (genType const & x)
+
+ +

Faster than the common normalize function but less accurate.

+
See also
GLM_GTX_fast_square_root extension.
+ +
+
+ +

◆ fastSqrt() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::fastSqrt (genType x)
+
+ +

Faster than the common sqrt function but less accurate.

+
See also
GLM_GTX_fast_square_root extension.
+ +
+
+ +

◆ fastSqrt() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::fastSqrt (vec< L, T, Q > const & x)
+
+ +

Faster than the common sqrt function but less accurate.

+
See also
GLM_GTX_fast_square_root extension.
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00742.html b/common/glm/doc/api/a00742.html new file mode 100644 index 000000000..c35968cdd --- /dev/null +++ b/common/glm/doc/api/a00742.html @@ -0,0 +1,288 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_fast_trigonometry + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_fast_trigonometry
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T >
GLM_FUNC_DECL T fastAcos (T angle)
 
template<typename T >
GLM_FUNC_DECL T fastAsin (T angle)
 
template<typename T >
GLM_FUNC_DECL T fastAtan (T y, T x)
 
template<typename T >
GLM_FUNC_DECL T fastAtan (T angle)
 
template<typename T >
GLM_FUNC_DECL T fastCos (T angle)
 
template<typename T >
GLM_FUNC_DECL T fastSin (T angle)
 
template<typename T >
GLM_FUNC_DECL T fastTan (T angle)
 
template<typename T >
GLM_FUNC_DECL T wrapAngle (T angle)
 
+

Detailed Description

+

Include <glm/gtx/fast_trigonometry.hpp> to use the features of this extension.

+

Fast but less accurate implementations of trigonometric functions.

+

Function Documentation

+ +

◆ fastAcos()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL T glm::fastAcos (angle)
+
+ +

Faster than the common acos function but less accurate.

+

Defined between -2pi and 2pi. From GLM_GTX_fast_trigonometry extension.

+ +
+
+ +

◆ fastAsin()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL T glm::fastAsin (angle)
+
+ +

Faster than the common asin function but less accurate.

+

Defined between -2pi and 2pi. From GLM_GTX_fast_trigonometry extension.

+ +
+
+ +

◆ fastAtan() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::fastAtan (y,
x 
)
+
+ +

Faster than the common atan function but less accurate.

+

Defined between -2pi and 2pi. From GLM_GTX_fast_trigonometry extension.

+ +
+
+ +

◆ fastAtan() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL T glm::fastAtan (angle)
+
+ +

Faster than the common atan function but less accurate.

+

Defined between -2pi and 2pi. From GLM_GTX_fast_trigonometry extension.

+ +
+
+ +

◆ fastCos()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL T glm::fastCos (angle)
+
+ +

Faster than the common cos function but less accurate.

+

From GLM_GTX_fast_trigonometry extension.

+ +
+
+ +

◆ fastSin()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL T glm::fastSin (angle)
+
+ +

Faster than the common sin function but less accurate.

+

From GLM_GTX_fast_trigonometry extension.

+ +
+
+ +

◆ fastTan()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL T glm::fastTan (angle)
+
+ +

Faster than the common tan function but less accurate.

+

Defined between -2pi and 2pi. From GLM_GTX_fast_trigonometry extension.

+ +
+
+ +

◆ wrapAngle()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL T glm::wrapAngle (angle)
+
+ +

Wrap an angle to [0 2pi[ From GLM_GTX_fast_trigonometry extension.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00743.html b/common/glm/doc/api/a00743.html new file mode 100644 index 000000000..4b730cb74 --- /dev/null +++ b/common/glm/doc/api/a00743.html @@ -0,0 +1,167 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_functions + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_functions
+
+
+ + + + + + + + +

+Functions

template<typename T >
GLM_FUNC_DECL T gauss (T x, T ExpectedValue, T StandardDeviation)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T gauss (vec< 2, T, Q > const &Coord, vec< 2, T, Q > const &ExpectedValue, vec< 2, T, Q > const &StandardDeviation)
 
+

Detailed Description

+

Include <glm/gtx/functions.hpp> to use the features of this extension.

+

List of useful common functions.

+

Function Documentation

+ +

◆ gauss() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::gauss (x,
ExpectedValue,
StandardDeviation 
)
+
+ +

1D gauss function

+
See also
GLM_GTC_epsilon
+ +
+
+ +

◆ gauss() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::gauss (vec< 2, T, Q > const & Coord,
vec< 2, T, Q > const & ExpectedValue,
vec< 2, T, Q > const & StandardDeviation 
)
+
+ +

2D gauss function

+
See also
GLM_GTC_epsilon
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00744.html b/common/glm/doc/api/a00744.html new file mode 100644 index 000000000..185af632f --- /dev/null +++ b/common/glm/doc/api/a00744.html @@ -0,0 +1,173 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_gradient_paint + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_gradient_paint
+
+
+ + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL T linearGradient (vec< 2, T, Q > const &Point0, vec< 2, T, Q > const &Point1, vec< 2, T, Q > const &Position)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T radialGradient (vec< 2, T, Q > const &Center, T const &Radius, vec< 2, T, Q > const &Focal, vec< 2, T, Q > const &Position)
 
+

Detailed Description

+

Include <glm/gtx/gradient_paint.hpp> to use the features of this extension.

+

Functions that return the color of procedural gradient for specific coordinates.

+

Function Documentation

+ +

◆ linearGradient()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::linearGradient (vec< 2, T, Q > const & Point0,
vec< 2, T, Q > const & Point1,
vec< 2, T, Q > const & Position 
)
+
+ +

Return a color from a linear gradient.

+
See also
- GLM_GTX_gradient_paint
+ +
+
+ +

◆ radialGradient()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::radialGradient (vec< 2, T, Q > const & Center,
T const & Radius,
vec< 2, T, Q > const & Focal,
vec< 2, T, Q > const & Position 
)
+
+ +

Return a color from a radial gradient.

+
See also
- GLM_GTX_gradient_paint
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00745.html b/common/glm/doc/api/a00745.html new file mode 100644 index 000000000..1c67ebc16 --- /dev/null +++ b/common/glm/doc/api/a00745.html @@ -0,0 +1,167 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_handed_coordinate_space + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_handed_coordinate_space
+
+
+ + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL bool leftHanded (vec< 3, T, Q > const &tangent, vec< 3, T, Q > const &binormal, vec< 3, T, Q > const &normal)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL bool rightHanded (vec< 3, T, Q > const &tangent, vec< 3, T, Q > const &binormal, vec< 3, T, Q > const &normal)
 
+

Detailed Description

+

Include <glm/gtx/handed_coordinate_system.hpp> to use the features of this extension.

+

To know if a set of three basis vectors defines a right or left-handed coordinate system.

+

Function Documentation

+ +

◆ leftHanded()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL bool glm::leftHanded (vec< 3, T, Q > const & tangent,
vec< 3, T, Q > const & binormal,
vec< 3, T, Q > const & normal 
)
+
+ +

Return if a trihedron left handed or not.

+

From GLM_GTX_handed_coordinate_space extension.

+ +
+
+ +

◆ rightHanded()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL bool glm::rightHanded (vec< 3, T, Q > const & tangent,
vec< 3, T, Q > const & binormal,
vec< 3, T, Q > const & normal 
)
+
+ +

Return if a trihedron right handed or not.

+

From GLM_GTX_handed_coordinate_space extension.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00746.html b/common/glm/doc/api/a00746.html new file mode 100644 index 000000000..3d7523d99 --- /dev/null +++ b/common/glm/doc/api/a00746.html @@ -0,0 +1,79 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_hash + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
+

Include <glm/gtx/hash.hpp> to use the features of this extension.

+

Add std::hash support for glm types

+
+ + + + diff --git a/common/glm/doc/api/a00747.html b/common/glm/doc/api/a00747.html new file mode 100644 index 000000000..14ac4a22f --- /dev/null +++ b/common/glm/doc/api/a00747.html @@ -0,0 +1,360 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_integer + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
+
+
+ + + + +

+Typedefs

typedef signed int sint
 
+ + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType factorial (genType const &x)
 
GLM_FUNC_DECL unsigned int floor_log2 (unsigned int x)
 
GLM_FUNC_DECL int mod (int x, int y)
 
GLM_FUNC_DECL uint mod (uint x, uint y)
 
GLM_FUNC_DECL uint nlz (uint x)
 
GLM_FUNC_DECL int pow (int x, uint y)
 
GLM_FUNC_DECL uint pow (uint x, uint y)
 
GLM_FUNC_DECL int sqrt (int x)
 
GLM_FUNC_DECL uint sqrt (uint x)
 
+

Detailed Description

+

Include <glm/gtx/integer.hpp> to use the features of this extension.

+

Add support for integer for core functions

+

Typedef Documentation

+ +

◆ sint

+ +
+
+ + + + +
typedef signed int sint
+
+ +

32bit signed integer.

+

From GLM_GTX_integer extension.

+ +

Definition at line 55 of file gtx/integer.hpp.

+ +
+
+

Function Documentation

+ +

◆ factorial()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::factorial (genType const & x)
+
+ +

Return the factorial value of a number (!12 max, integer only) From GLM_GTX_integer extension.

+ +
+
+ +

◆ floor_log2()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL unsigned int glm::floor_log2 (unsigned int x)
+
+ +

Returns the floor log2 of x.

+

From GLM_GTX_integer extension.

+ +
+
+ +

◆ mod() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL int glm::mod (int x,
int y 
)
+
+ +

Modulus.

+

Returns x - y * floor(x / y) for each component in x using the floating point value y. From GLM_GTX_integer extension.

+ +
+
+ +

◆ mod() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL uint glm::mod (uint x,
uint y 
)
+
+ +

Modulus.

+

Returns x - y * floor(x / y) for each component in x using the floating point value y. From GLM_GTX_integer extension.

+ +
+
+ +

◆ nlz()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint glm::nlz (uint x)
+
+ +

Returns the number of leading zeros.

+

From GLM_GTX_integer extension.

+ +
+
+ +

◆ pow() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL int glm::pow (int x,
uint y 
)
+
+ +

Returns x raised to the y power.

+

From GLM_GTX_integer extension.

+ +
+
+ +

◆ pow() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL uint glm::pow (uint x,
uint y 
)
+
+ +

Returns x raised to the y power.

+

From GLM_GTX_integer extension.

+ +
+
+ +

◆ sqrt() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL int glm::sqrt (int x)
+
+ +

Returns the positive square root of x.

+

From GLM_GTX_integer extension.

+ +
+
+ +

◆ sqrt() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint glm::sqrt (uint x)
+
+ +

Returns the positive square root of x.

+

From GLM_GTX_integer extension.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00748.html b/common/glm/doc/api/a00748.html new file mode 100644 index 000000000..12985e267 --- /dev/null +++ b/common/glm/doc/api/a00748.html @@ -0,0 +1,441 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_intersect + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_intersect
+
+
+ + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL bool intersectLineSphere (genType const &point0, genType const &point1, genType const &sphereCenter, typename genType::value_type sphereRadius, genType &intersectionPosition1, genType &intersectionNormal1, genType &intersectionPosition2=genType(), genType &intersectionNormal2=genType())
 
template<typename genType >
GLM_FUNC_DECL bool intersectLineTriangle (genType const &orig, genType const &dir, genType const &vert0, genType const &vert1, genType const &vert2, genType &position)
 
template<typename genType >
GLM_FUNC_DECL bool intersectRayPlane (genType const &orig, genType const &dir, genType const &planeOrig, genType const &planeNormal, typename genType::value_type &intersectionDistance)
 
template<typename genType >
GLM_FUNC_DECL bool intersectRaySphere (genType const &rayStarting, genType const &rayNormalizedDirection, genType const &sphereCenter, typename genType::value_type const sphereRadiusSquered, typename genType::value_type &intersectionDistance)
 
template<typename genType >
GLM_FUNC_DECL bool intersectRaySphere (genType const &rayStarting, genType const &rayNormalizedDirection, genType const &sphereCenter, const typename genType::value_type sphereRadius, genType &intersectionPosition, genType &intersectionNormal)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL bool intersectRayTriangle (vec< 3, T, Q > const &orig, vec< 3, T, Q > const &dir, vec< 3, T, Q > const &v0, vec< 3, T, Q > const &v1, vec< 3, T, Q > const &v2, vec< 2, T, Q > &baryPosition, T &distance)
 
+

Detailed Description

+

Include <glm/gtx/intersect.hpp> to use the features of this extension.

+

Add intersection functions

+

Function Documentation

+ +

◆ intersectLineSphere()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL bool glm::intersectLineSphere (genType const & point0,
genType const & point1,
genType const & sphereCenter,
typename genType::value_type sphereRadius,
genType & intersectionPosition1,
genType & intersectionNormal1,
genType & intersectionPosition2 = genType(),
genType & intersectionNormal2 = genType() 
)
+
+ +

Compute the intersection of a line and a sphere.

+

From GLM_GTX_intersect extension

+ +
+
+ +

◆ intersectLineTriangle()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL bool glm::intersectLineTriangle (genType const & orig,
genType const & dir,
genType const & vert0,
genType const & vert1,
genType const & vert2,
genType & position 
)
+
+ +

Compute the intersection of a line and a triangle.

+

From GLM_GTX_intersect extension.

+ +
+
+ +

◆ intersectRayPlane()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL bool glm::intersectRayPlane (genType const & orig,
genType const & dir,
genType const & planeOrig,
genType const & planeNormal,
typename genType::value_type & intersectionDistance 
)
+
+ +

Compute the intersection of a ray and a plane.

+

Ray direction and plane normal must be unit length. From GLM_GTX_intersect extension.

+ +
+
+ +

◆ intersectRaySphere() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL bool glm::intersectRaySphere (genType const & rayStarting,
genType const & rayNormalizedDirection,
genType const & sphereCenter,
typename genType::value_type const sphereRadiusSquered,
typename genType::value_type & intersectionDistance 
)
+
+ +

Compute the intersection distance of a ray and a sphere.

+

The ray direction vector is unit length. From GLM_GTX_intersect extension.

+ +
+
+ +

◆ intersectRaySphere() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL bool glm::intersectRaySphere (genType const & rayStarting,
genType const & rayNormalizedDirection,
genType const & sphereCenter,
const typename genType::value_type sphereRadius,
genType & intersectionPosition,
genType & intersectionNormal 
)
+
+ +

Compute the intersection of a ray and a sphere.

+

From GLM_GTX_intersect extension.

+ +
+
+ +

◆ intersectRayTriangle()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL bool glm::intersectRayTriangle (vec< 3, T, Q > const & orig,
vec< 3, T, Q > const & dir,
vec< 3, T, Q > const & v0,
vec< 3, T, Q > const & v1,
vec< 3, T, Q > const & v2,
vec< 2, T, Q > & baryPosition,
T & distance 
)
+
+ +

Compute the intersection of a ray and a triangle.

+

Based om Tomas Möller implementation http://fileadmin.cs.lth.se/cs/Personal/Tomas_Akenine-Moller/raytri/ From GLM_GTX_intersect extension.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00749.html b/common/glm/doc/api/a00749.html new file mode 100644 index 000000000..995e0cfee --- /dev/null +++ b/common/glm/doc/api/a00749.html @@ -0,0 +1,81 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_io + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
+

Detailed Description

+

Include <glm/gtx/io.hpp> to use the features of this extension.

+

std::[w]ostream support for glm types

+

std::[w]ostream support for glm types + qualifier/width/etc. manipulators based on howard hinnant's std::chrono io proposal [http://home.roadrunner.com/~hinnant/bloomington/chrono_io.html]

+
+ + + + diff --git a/common/glm/doc/api/a00750.html b/common/glm/doc/api/a00750.html new file mode 100644 index 000000000..29e8952a7 --- /dev/null +++ b/common/glm/doc/api/a00750.html @@ -0,0 +1,155 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_log_base + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_log_base
+
+
+ + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType log (genType const &x, genType const &base)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > sign (vec< L, T, Q > const &x, vec< L, T, Q > const &base)
 
+

Detailed Description

+

Include <glm/gtx/log_base.hpp> to use the features of this extension.

+

Logarithm for any base. base can be a vector or a scalar.

+

Function Documentation

+ +

◆ log()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::log (genType const & x,
genType const & base 
)
+
+ +

Logarithm for any base.

+

From GLM_GTX_log_base.

+ +
+
+ +

◆ sign()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::sign (vec< L, T, Q > const & x,
vec< L, T, Q > const & base 
)
+
+ +

Logarithm for any base.

+

From GLM_GTX_log_base.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00751.html b/common/glm/doc/api/a00751.html new file mode 100644 index 000000000..e52e23bae --- /dev/null +++ b/common/glm/doc/api/a00751.html @@ -0,0 +1,135 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_matrix_cross_product + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_matrix_cross_product
+
+
+ + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > matrixCross3 (vec< 3, T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > matrixCross4 (vec< 3, T, Q > const &x)
 
+

Detailed Description

+

Include <glm/gtx/matrix_cross_product.hpp> to use the features of this extension.

+

Build cross product matrices

+

Function Documentation

+ +

◆ matrixCross3()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<3, 3, T, Q> glm::matrixCross3 (vec< 3, T, Q > const & x)
+
+ +

Build a cross product matrix.

+

From GLM_GTX_matrix_cross_product extension.

+ +
+
+ +

◆ matrixCross4()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::matrixCross4 (vec< 3, T, Q > const & x)
+
+ +

Build a cross product matrix.

+

From GLM_GTX_matrix_cross_product extension.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00752.html b/common/glm/doc/api/a00752.html new file mode 100644 index 000000000..a240b34df --- /dev/null +++ b/common/glm/doc/api/a00752.html @@ -0,0 +1,145 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_matrix_decompose + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_matrix_decompose
+
+
+ + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL bool decompose (mat< 4, 4, T, Q > const &modelMatrix, vec< 3, T, Q > &scale, qua< T, Q > &orientation, vec< 3, T, Q > &translation, vec< 3, T, Q > &skew, vec< 4, T, Q > &perspective)
 
+

Detailed Description

+

Include <glm/gtx/matrix_decompose.hpp> to use the features of this extension.

+

Decomposes a model matrix to translations, rotation and scale components

+

Function Documentation

+ +

◆ decompose()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL bool glm::decompose (mat< 4, 4, T, Q > const & modelMatrix,
vec< 3, T, Q > & scale,
qua< T, Q > & orientation,
vec< 3, T, Q > & translation,
vec< 3, T, Q > & skew,
vec< 4, T, Q > & perspective 
)
+
+ +

Decomposes a model matrix to translations, rotation and scale components.

+
See also
GLM_GTX_matrix_decompose
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00753.html b/common/glm/doc/api/a00753.html new file mode 100644 index 000000000..640913130 --- /dev/null +++ b/common/glm/doc/api/a00753.html @@ -0,0 +1,185 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_matrix_factorisation + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_matrix_factorisation
+
+
+ + + + + + + + + + + + + + +

+Functions

template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL mat< C, R, T, Q > fliplr (mat< C, R, T, Q > const &in)
 
template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL mat< C, R, T, Q > flipud (mat< C, R, T, Q > const &in)
 
template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL void qr_decompose (mat< C, R, T, Q > const &in, mat<(C< R ? C :R), R, T, Q > &q, mat< C,(C< R ? C :R), T, Q > &r)
 
template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL void rq_decompose (mat< C, R, T, Q > const &in, mat<(C< R ? C :R), R, T, Q > &r, mat< C,(C< R ? C :R), T, Q > &q)
 
+

Detailed Description

+

Include <glm/gtx/matrix_factorisation.hpp> to use the features of this extension.

+

Functions to factor matrices in various forms

+

Function Documentation

+ +

◆ fliplr()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<C, R, T, Q> glm::fliplr (mat< C, R, T, Q > const & in)
+
+ +

Flips the matrix columns right and left.

+

From GLM_GTX_matrix_factorisation extension.

+ +
+
+ +

◆ flipud()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<C, R, T, Q> glm::flipud (mat< C, R, T, Q > const & in)
+
+ +

Flips the matrix rows up and down.

+

From GLM_GTX_matrix_factorisation extension.

+ +
+
+ +

◆ qr_decompose()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL void glm::qr_decompose (mat< C, R, T, Q > const & in)
+
+ +

Performs QR factorisation of a matrix.

+

Returns 2 matrices, q and r, such that the columns of q are orthonormal and span the same subspace than those of the input matrix, r is an upper triangular matrix, and q*r=in. Given an n-by-m input matrix, q has dimensions min(n,m)-by-m, and r has dimensions n-by-min(n,m).

+

From GLM_GTX_matrix_factorisation extension.

+ +
+
+ +

◆ rq_decompose()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL void glm::rq_decompose (mat< C, R, T, Q > const & in)
+
+ +

Performs RQ factorisation of a matrix.

+

Returns 2 matrices, r and q, such that r is an upper triangular matrix, the rows of q are orthonormal and span the same subspace than those of the input matrix, and r*q=in. Note that in the context of RQ factorisation, the diagonal is seen as starting in the lower-right corner of the matrix, instead of the usual upper-left. Given an n-by-m input matrix, r has dimensions min(n,m)-by-m, and q has dimensions n-by-min(n,m).

+

From GLM_GTX_matrix_factorisation extension.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00754.html b/common/glm/doc/api/a00754.html new file mode 100644 index 000000000..86b411668 --- /dev/null +++ b/common/glm/doc/api/a00754.html @@ -0,0 +1,225 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_matrix_interpolation + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_matrix_interpolation
+
+
+ + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL void axisAngle (mat< 4, 4, T, Q > const &Mat, vec< 3, T, Q > &Axis, T &Angle)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > axisAngleMatrix (vec< 3, T, Q > const &Axis, T const Angle)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > extractMatrixRotation (mat< 4, 4, T, Q > const &Mat)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > interpolate (mat< 4, 4, T, Q > const &m1, mat< 4, 4, T, Q > const &m2, T const Delta)
 
+

Detailed Description

+

Include <glm/gtx/matrix_interpolation.hpp> to use the features of this extension.

+

Allows to directly interpolate two matrices.

+

Function Documentation

+ +

◆ axisAngle()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL void glm::axisAngle (mat< 4, 4, T, Q > const & Mat,
vec< 3, T, Q > & Axis,
T & Angle 
)
+
+ +

Get the axis and angle of the rotation from a matrix.

+

From GLM_GTX_matrix_interpolation extension.

+ +
+
+ +

◆ axisAngleMatrix()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::axisAngleMatrix (vec< 3, T, Q > const & Axis,
T const Angle 
)
+
+ +

Build a matrix from axis and angle.

+

From GLM_GTX_matrix_interpolation extension.

+ +
+
+ +

◆ extractMatrixRotation()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::extractMatrixRotation (mat< 4, 4, T, Q > const & Mat)
+
+ +

Extracts the rotation part of a matrix.

+

From GLM_GTX_matrix_interpolation extension.

+ +
+
+ +

◆ interpolate()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::interpolate (mat< 4, 4, T, Q > const & m1,
mat< 4, 4, T, Q > const & m2,
T const Delta 
)
+
+ +

Build a interpolation of 4 * 4 matrixes.

+

From GLM_GTX_matrix_interpolation extension. Warning! works only with rotation and/or translation matrixes, scale will generate unexpected results.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00755.html b/common/glm/doc/api/a00755.html new file mode 100644 index 000000000..3577baca8 --- /dev/null +++ b/common/glm/doc/api/a00755.html @@ -0,0 +1,471 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_matrix_major_storage + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_matrix_major_storage
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 2, 2, T, Q > colMajor2 (vec< 2, T, Q > const &v1, vec< 2, T, Q > const &v2)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 2, 2, T, Q > colMajor2 (mat< 2, 2, T, Q > const &m)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > colMajor3 (vec< 3, T, Q > const &v1, vec< 3, T, Q > const &v2, vec< 3, T, Q > const &v3)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > colMajor3 (mat< 3, 3, T, Q > const &m)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > colMajor4 (vec< 4, T, Q > const &v1, vec< 4, T, Q > const &v2, vec< 4, T, Q > const &v3, vec< 4, T, Q > const &v4)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > colMajor4 (mat< 4, 4, T, Q > const &m)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 2, 2, T, Q > rowMajor2 (vec< 2, T, Q > const &v1, vec< 2, T, Q > const &v2)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 2, 2, T, Q > rowMajor2 (mat< 2, 2, T, Q > const &m)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > rowMajor3 (vec< 3, T, Q > const &v1, vec< 3, T, Q > const &v2, vec< 3, T, Q > const &v3)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > rowMajor3 (mat< 3, 3, T, Q > const &m)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > rowMajor4 (vec< 4, T, Q > const &v1, vec< 4, T, Q > const &v2, vec< 4, T, Q > const &v3, vec< 4, T, Q > const &v4)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > rowMajor4 (mat< 4, 4, T, Q > const &m)
 
+

Detailed Description

+

Include <glm/gtx/matrix_major_storage.hpp> to use the features of this extension.

+

Build matrices with specific matrix order, row or column

+

Function Documentation

+ +

◆ colMajor2() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<2, 2, T, Q> glm::colMajor2 (vec< 2, T, Q > const & v1,
vec< 2, T, Q > const & v2 
)
+
+ +

Build a column major matrix from column vectors.

+

From GLM_GTX_matrix_major_storage extension.

+ +
+
+ +

◆ colMajor2() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<2, 2, T, Q> glm::colMajor2 (mat< 2, 2, T, Q > const & m)
+
+ +

Build a column major matrix from other matrix.

+

From GLM_GTX_matrix_major_storage extension.

+ +
+
+ +

◆ colMajor3() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<3, 3, T, Q> glm::colMajor3 (vec< 3, T, Q > const & v1,
vec< 3, T, Q > const & v2,
vec< 3, T, Q > const & v3 
)
+
+ +

Build a column major matrix from column vectors.

+

From GLM_GTX_matrix_major_storage extension.

+ +
+
+ +

◆ colMajor3() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<3, 3, T, Q> glm::colMajor3 (mat< 3, 3, T, Q > const & m)
+
+ +

Build a column major matrix from other matrix.

+

From GLM_GTX_matrix_major_storage extension.

+ +
+
+ +

◆ colMajor4() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::colMajor4 (vec< 4, T, Q > const & v1,
vec< 4, T, Q > const & v2,
vec< 4, T, Q > const & v3,
vec< 4, T, Q > const & v4 
)
+
+ +

Build a column major matrix from column vectors.

+

From GLM_GTX_matrix_major_storage extension.

+ +
+
+ +

◆ colMajor4() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::colMajor4 (mat< 4, 4, T, Q > const & m)
+
+ +

Build a column major matrix from other matrix.

+

From GLM_GTX_matrix_major_storage extension.

+ +
+
+ +

◆ rowMajor2() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<2, 2, T, Q> glm::rowMajor2 (vec< 2, T, Q > const & v1,
vec< 2, T, Q > const & v2 
)
+
+ +

Build a row major matrix from row vectors.

+

From GLM_GTX_matrix_major_storage extension.

+ +
+
+ +

◆ rowMajor2() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<2, 2, T, Q> glm::rowMajor2 (mat< 2, 2, T, Q > const & m)
+
+ +

Build a row major matrix from other matrix.

+

From GLM_GTX_matrix_major_storage extension.

+ +
+
+ +

◆ rowMajor3() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<3, 3, T, Q> glm::rowMajor3 (vec< 3, T, Q > const & v1,
vec< 3, T, Q > const & v2,
vec< 3, T, Q > const & v3 
)
+
+ +

Build a row major matrix from row vectors.

+

From GLM_GTX_matrix_major_storage extension.

+ +
+
+ +

◆ rowMajor3() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<3, 3, T, Q> glm::rowMajor3 (mat< 3, 3, T, Q > const & m)
+
+ +

Build a row major matrix from other matrix.

+

From GLM_GTX_matrix_major_storage extension.

+ +
+
+ +

◆ rowMajor4() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::rowMajor4 (vec< 4, T, Q > const & v1,
vec< 4, T, Q > const & v2,
vec< 4, T, Q > const & v3,
vec< 4, T, Q > const & v4 
)
+
+ +

Build a row major matrix from row vectors.

+

From GLM_GTX_matrix_major_storage extension.

+ +
+
+ +

◆ rowMajor4() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::rowMajor4 (mat< 4, 4, T, Q > const & m)
+
+ +

Build a row major matrix from other matrix.

+

From GLM_GTX_matrix_major_storage extension.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00756.html b/common/glm/doc/api/a00756.html new file mode 100644 index 000000000..a6fe7ebcc --- /dev/null +++ b/common/glm/doc/api/a00756.html @@ -0,0 +1,303 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_matrix_operation + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_matrix_operation
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 2, 2, T, Q > diagonal2x2 (vec< 2, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 2, 3, T, Q > diagonal2x3 (vec< 2, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 2, 4, T, Q > diagonal2x4 (vec< 2, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 2, T, Q > diagonal3x2 (vec< 2, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > diagonal3x3 (vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 4, T, Q > diagonal3x4 (vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 2, T, Q > diagonal4x2 (vec< 2, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 3, T, Q > diagonal4x3 (vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > diagonal4x4 (vec< 4, T, Q > const &v)
 
+

Detailed Description

+

Include <glm/gtx/matrix_operation.hpp> to use the features of this extension.

+

Build diagonal matrices from vectors.

+

Function Documentation

+ +

◆ diagonal2x2()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<2, 2, T, Q> glm::diagonal2x2 (vec< 2, T, Q > const & v)
+
+ +

Build a diagonal matrix.

+

From GLM_GTX_matrix_operation extension.

+ +
+
+ +

◆ diagonal2x3()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<2, 3, T, Q> glm::diagonal2x3 (vec< 2, T, Q > const & v)
+
+ +

Build a diagonal matrix.

+

From GLM_GTX_matrix_operation extension.

+ +
+
+ +

◆ diagonal2x4()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<2, 4, T, Q> glm::diagonal2x4 (vec< 2, T, Q > const & v)
+
+ +

Build a diagonal matrix.

+

From GLM_GTX_matrix_operation extension.

+ +
+
+ +

◆ diagonal3x2()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<3, 2, T, Q> glm::diagonal3x2 (vec< 2, T, Q > const & v)
+
+ +

Build a diagonal matrix.

+

From GLM_GTX_matrix_operation extension.

+ +
+
+ +

◆ diagonal3x3()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<3, 3, T, Q> glm::diagonal3x3 (vec< 3, T, Q > const & v)
+
+ +

Build a diagonal matrix.

+

From GLM_GTX_matrix_operation extension.

+ +
+
+ +

◆ diagonal3x4()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<3, 4, T, Q> glm::diagonal3x4 (vec< 3, T, Q > const & v)
+
+ +

Build a diagonal matrix.

+

From GLM_GTX_matrix_operation extension.

+ +
+
+ +

◆ diagonal4x2()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<4, 2, T, Q> glm::diagonal4x2 (vec< 2, T, Q > const & v)
+
+ +

Build a diagonal matrix.

+

From GLM_GTX_matrix_operation extension.

+ +
+
+ +

◆ diagonal4x3()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<4, 3, T, Q> glm::diagonal4x3 (vec< 3, T, Q > const & v)
+
+ +

Build a diagonal matrix.

+

From GLM_GTX_matrix_operation extension.

+ +
+
+ +

◆ diagonal4x4()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::diagonal4x4 (vec< 4, T, Q > const & v)
+
+ +

Build a diagonal matrix.

+

From GLM_GTX_matrix_operation extension.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00757.html b/common/glm/doc/api/a00757.html new file mode 100644 index 000000000..30522c42e --- /dev/null +++ b/common/glm/doc/api/a00757.html @@ -0,0 +1,359 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_matrix_query + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_matrix_query
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<length_t C, length_t R, typename T , qualifier Q, template< length_t, length_t, typename, qualifier > class matType>
GLM_FUNC_DECL bool isIdentity (matType< C, R, T, Q > const &m, T const &epsilon)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL bool isNormalized (mat< 2, 2, T, Q > const &m, T const &epsilon)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL bool isNormalized (mat< 3, 3, T, Q > const &m, T const &epsilon)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL bool isNormalized (mat< 4, 4, T, Q > const &m, T const &epsilon)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL bool isNull (mat< 2, 2, T, Q > const &m, T const &epsilon)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL bool isNull (mat< 3, 3, T, Q > const &m, T const &epsilon)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL bool isNull (mat< 4, 4, T, Q > const &m, T const &epsilon)
 
template<length_t C, length_t R, typename T , qualifier Q, template< length_t, length_t, typename, qualifier > class matType>
GLM_FUNC_DECL bool isOrthogonal (matType< C, R, T, Q > const &m, T const &epsilon)
 
+

Detailed Description

+

Include <glm/gtx/matrix_query.hpp> to use the features of this extension.

+

Query to evaluate matrix properties

+

Function Documentation

+ +

◆ isIdentity()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL bool glm::isIdentity (matType< C, R, T, Q > const & m,
T const & epsilon 
)
+
+ +

Return whether a matrix is an identity matrix.

+

From GLM_GTX_matrix_query extension.

+ +
+
+ +

◆ isNormalized() [1/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL bool glm::isNormalized (mat< 2, 2, T, Q > const & m,
T const & epsilon 
)
+
+ +

Return whether a matrix is a normalized matrix.

+

From GLM_GTX_matrix_query extension.

+ +
+
+ +

◆ isNormalized() [2/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL bool glm::isNormalized (mat< 3, 3, T, Q > const & m,
T const & epsilon 
)
+
+ +

Return whether a matrix is a normalized matrix.

+

From GLM_GTX_matrix_query extension.

+ +
+
+ +

◆ isNormalized() [3/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL bool glm::isNormalized (mat< 4, 4, T, Q > const & m,
T const & epsilon 
)
+
+ +

Return whether a matrix is a normalized matrix.

+

From GLM_GTX_matrix_query extension.

+ +
+
+ +

◆ isNull() [1/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL bool glm::isNull (mat< 2, 2, T, Q > const & m,
T const & epsilon 
)
+
+ +

Return whether a matrix a null matrix.

+

From GLM_GTX_matrix_query extension.

+ +
+
+ +

◆ isNull() [2/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL bool glm::isNull (mat< 3, 3, T, Q > const & m,
T const & epsilon 
)
+
+ +

Return whether a matrix a null matrix.

+

From GLM_GTX_matrix_query extension.

+ +
+
+ +

◆ isNull() [3/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL bool glm::isNull (mat< 4, 4, T, Q > const & m,
T const & epsilon 
)
+
+ +

Return whether a matrix is a null matrix.

+

From GLM_GTX_matrix_query extension.

+ +
+
+ +

◆ isOrthogonal()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL bool glm::isOrthogonal (matType< C, R, T, Q > const & m,
T const & epsilon 
)
+
+ +

Return whether a matrix is an orthonormalized matrix.

+

From GLM_GTX_matrix_query extension.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00758.html b/common/glm/doc/api/a00758.html new file mode 100644 index 000000000..78b4d548f --- /dev/null +++ b/common/glm/doc/api/a00758.html @@ -0,0 +1,287 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_matrix_transform_2d + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_matrix_transform_2d
+
+
+ + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER mat< 3, 3, T, Q > rotate (mat< 3, 3, T, Q > const &m, T angle)
 
template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER mat< 3, 3, T, Q > scale (mat< 3, 3, T, Q > const &m, vec< 2, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER mat< 3, 3, T, Q > shearX (mat< 3, 3, T, Q > const &m, T y)
 
template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER mat< 3, 3, T, Q > shearY (mat< 3, 3, T, Q > const &m, T x)
 
template<typename T , qualifier Q>
GLM_FUNC_QUALIFIER mat< 3, 3, T, Q > translate (mat< 3, 3, T, Q > const &m, vec< 2, T, Q > const &v)
 
+

Detailed Description

+

Include <glm/gtx/matrix_transform_2d.hpp> to use the features of this extension.

+

Defines functions that generate common 2d transformation matrices.

+

Function Documentation

+ +

◆ rotate()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> glm::rotate (mat< 3, 3, T, Q > const & m,
angle 
)
+
+ +

Builds a rotation 3 * 3 matrix created from an angle.

+
Parameters
+ + + +
mInput matrix multiplied by this translation matrix.
angleRotation angle expressed in radians.
+
+
+ +
+
+ +

◆ scale()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> glm::scale (mat< 3, 3, T, Q > const & m,
vec< 2, T, Q > const & v 
)
+
+ +

Builds a scale 3 * 3 matrix created from a vector of 2 components.

+
Parameters
+ + + +
mInput matrix multiplied by this translation matrix.
vCoordinates of a scale vector.
+
+
+ +
+
+ +

◆ shearX()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> glm::shearX (mat< 3, 3, T, Q > const & m,
y 
)
+
+ +

Builds an horizontal (parallel to the x axis) shear 3 * 3 matrix.

+
Parameters
+ + + +
mInput matrix multiplied by this translation matrix.
yShear factor.
+
+
+ +
+
+ +

◆ shearY()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> glm::shearY (mat< 3, 3, T, Q > const & m,
x 
)
+
+ +

Builds a vertical (parallel to the y axis) shear 3 * 3 matrix.

+
Parameters
+ + + +
mInput matrix multiplied by this translation matrix.
xShear factor.
+
+
+ +
+
+ +

◆ translate()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> glm::translate (mat< 3, 3, T, Q > const & m,
vec< 2, T, Q > const & v 
)
+
+ +

Builds a translation 3 * 3 matrix created from a vector of 2 components.

+
Parameters
+ + + +
mInput matrix multiplied by this translation matrix.
vCoordinates of a translation vector.
+
+
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00759.html b/common/glm/doc/api/a00759.html new file mode 100644 index 000000000..77a0a2f63 --- /dev/null +++ b/common/glm/doc/api/a00759.html @@ -0,0 +1,90 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_mixed_producte + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_mixed_producte
+
+
+ + + + + +

+Functions

+template<typename T , qualifier Q>
GLM_FUNC_DECL T mixedProduct (vec< 3, T, Q > const &v1, vec< 3, T, Q > const &v2, vec< 3, T, Q > const &v3)
 
+

Detailed Description

+

Include <glm/gtx/mixed_product.hpp> to use the features of this extension.

+

Mixed product of 3 vectors.

+
+ + + + diff --git a/common/glm/doc/api/a00760.html b/common/glm/doc/api/a00760.html new file mode 100644 index 000000000..559265e81 --- /dev/null +++ b/common/glm/doc/api/a00760.html @@ -0,0 +1,335 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_norm + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T distance2 (vec< L, T, Q > const &p0, vec< L, T, Q > const &p1)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T l1Norm (vec< 3, T, Q > const &x, vec< 3, T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T l1Norm (vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T l2Norm (vec< 3, T, Q > const &x, vec< 3, T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T l2Norm (vec< 3, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T length2 (vec< L, T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T lxNorm (vec< 3, T, Q > const &x, vec< 3, T, Q > const &y, unsigned int Depth)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T lxNorm (vec< 3, T, Q > const &x, unsigned int Depth)
 
+

Detailed Description

+

Include <glm/gtx/norm.hpp> to use the features of this extension.

+

Various ways to compute vector norms.

+

Function Documentation

+ +

◆ distance2()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::distance2 (vec< L, T, Q > const & p0,
vec< L, T, Q > const & p1 
)
+
+ +

Returns the squared distance between p0 and p1, i.e., length2(p0 - p1).

+

From GLM_GTX_norm extension.

+ +
+
+ +

◆ l1Norm() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::l1Norm (vec< 3, T, Q > const & x,
vec< 3, T, Q > const & y 
)
+
+ +

Returns the L1 norm between x and y.

+

From GLM_GTX_norm extension.

+ +
+
+ +

◆ l1Norm() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL T glm::l1Norm (vec< 3, T, Q > const & v)
+
+ +

Returns the L1 norm of v.

+

From GLM_GTX_norm extension.

+ +
+
+ +

◆ l2Norm() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::l2Norm (vec< 3, T, Q > const & x,
vec< 3, T, Q > const & y 
)
+
+ +

Returns the L2 norm between x and y.

+

From GLM_GTX_norm extension.

+ +
+
+ +

◆ l2Norm() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL T glm::l2Norm (vec< 3, T, Q > const & x)
+
+ +

Returns the L2 norm of v.

+

From GLM_GTX_norm extension.

+ +
+
+ +

◆ length2()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL T glm::length2 (vec< L, T, Q > const & x)
+
+ +

Returns the squared length of x.

+

From GLM_GTX_norm extension.

+ +
+
+ +

◆ lxNorm() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::lxNorm (vec< 3, T, Q > const & x,
vec< 3, T, Q > const & y,
unsigned int Depth 
)
+
+ +

Returns the L norm between x and y.

+

From GLM_GTX_norm extension.

+ +
+
+ +

◆ lxNorm() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::lxNorm (vec< 3, T, Q > const & x,
unsigned int Depth 
)
+
+ +

Returns the L norm of v.

+

From GLM_GTX_norm extension.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00761.html b/common/glm/doc/api/a00761.html new file mode 100644 index 000000000..90f09ba20 --- /dev/null +++ b/common/glm/doc/api/a00761.html @@ -0,0 +1,127 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_normal + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
+
+
+ + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > triangleNormal (vec< 3, T, Q > const &p1, vec< 3, T, Q > const &p2, vec< 3, T, Q > const &p3)
 
+

Detailed Description

+

Include <glm/gtx/normal.hpp> to use the features of this extension.

+

Compute the normal of a triangle.

+

Function Documentation

+ +

◆ triangleNormal()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::triangleNormal (vec< 3, T, Q > const & p1,
vec< 3, T, Q > const & p2,
vec< 3, T, Q > const & p3 
)
+
+ +

Computes triangle normal from triangle points.

+
See also
GLM_GTX_normal
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00762.html b/common/glm/doc/api/a00762.html new file mode 100644 index 000000000..19f51c2f3 --- /dev/null +++ b/common/glm/doc/api/a00762.html @@ -0,0 +1,157 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_normalize_dot + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_normalize_dot
+
+
+ + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T fastNormalizeDot (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T normalizeDot (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
+

Detailed Description

+

Include <glm/gtx/normalized_dot.hpp> to use the features of this extension.

+

Dot product of vectors that need to be normalize with a single square root.

+

Function Documentation

+ +

◆ fastNormalizeDot()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::fastNormalizeDot (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Normalize parameters and returns the dot product of x and y.

+

Faster that dot(fastNormalize(x), fastNormalize(y)).

+
See also
GLM_GTX_normalize_dot extension.
+ +
+
+ +

◆ normalizeDot()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::normalizeDot (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Normalize parameters and returns the dot product of x and y.

+

It's faster that dot(normalize(x), normalize(y)).

+
See also
GLM_GTX_normalize_dot extension.
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00763.html b/common/glm/doc/api/a00763.html new file mode 100644 index 000000000..e29cb2398 --- /dev/null +++ b/common/glm/doc/api/a00763.html @@ -0,0 +1,116 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_number_precision + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_number_precision
+
+
+ + + + + + + + + + + + + + + + + + + + + + +

+Typedefs

+typedef f32 f32mat1
 
+typedef f32 f32mat1x1
 
+typedef f32 f32vec1
 
+typedef f64 f64mat1
 
+typedef f64 f64mat1x1
 
+typedef f64 f64vec1
 
+typedef u16 u16vec1
 
+typedef u32 u32vec1
 
+typedef u64 u64vec1
 
+typedef u8 u8vec1
 
+

Detailed Description

+

Include <glm/gtx/number_precision.hpp> to use the features of this extension.

+

Defined size types.

+
+ + + + diff --git a/common/glm/doc/api/a00764.html b/common/glm/doc/api/a00764.html new file mode 100644 index 000000000..42a8beb9e --- /dev/null +++ b/common/glm/doc/api/a00764.html @@ -0,0 +1,159 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_optimum_pow + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_optimum_pow
+
+
+ + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType pow2 (genType const &x)
 
template<typename genType >
GLM_FUNC_DECL genType pow3 (genType const &x)
 
template<typename genType >
GLM_FUNC_DECL genType pow4 (genType const &x)
 
+

Detailed Description

+

Include <glm/gtx/optimum_pow.hpp> to use the features of this extension.

+

Integer exponentiation of power functions.

+

Function Documentation

+ +

◆ pow2()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::gtx::pow2 (genType const & x)
+
+ +

Returns x raised to the power of 2.

+
See also
GLM_GTX_optimum_pow
+ +
+
+ +

◆ pow3()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::gtx::pow3 (genType const & x)
+
+ +

Returns x raised to the power of 3.

+
See also
GLM_GTX_optimum_pow
+ +
+
+ +

◆ pow4()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::gtx::pow4 (genType const & x)
+
+ +

Returns x raised to the power of 4.

+
See also
GLM_GTX_optimum_pow
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00765.html b/common/glm/doc/api/a00765.html new file mode 100644 index 000000000..fca4a0e1e --- /dev/null +++ b/common/glm/doc/api/a00765.html @@ -0,0 +1,145 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_orthonormalize + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_orthonormalize
+
+
+ + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > orthonormalize (mat< 3, 3, T, Q > const &m)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > orthonormalize (vec< 3, T, Q > const &x, vec< 3, T, Q > const &y)
 
+

Detailed Description

+

Include <glm/gtx/orthonormalize.hpp> to use the features of this extension.

+

Orthonormalize matrices.

+

Function Documentation

+ +

◆ orthonormalize() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<3, 3, T, Q> glm::orthonormalize (mat< 3, 3, T, Q > const & m)
+
+ +

Returns the orthonormalized matrix of m.

+
See also
GLM_GTX_orthonormalize
+ +
+
+ +

◆ orthonormalize() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::orthonormalize (vec< 3, T, Q > const & x,
vec< 3, T, Q > const & y 
)
+
+ +

Orthonormalizes x according y.

+
See also
GLM_GTX_orthonormalize
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00766.html b/common/glm/doc/api/a00766.html new file mode 100644 index 000000000..d2013e260 --- /dev/null +++ b/common/glm/doc/api/a00766.html @@ -0,0 +1,121 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_perpendicular + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_perpendicular
+
+
+ + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType perp (genType const &x, genType const &Normal)
 
+

Detailed Description

+

Include <glm/gtx/perpendicular.hpp> to use the features of this extension.

+

Perpendicular of a vector from other one

+

Function Documentation

+ +

◆ perp()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::perp (genType const & x,
genType const & Normal 
)
+
+ +

Projects x a perpendicular axis of Normal.

+

From GLM_GTX_perpendicular extension.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00767.html b/common/glm/doc/api/a00767.html new file mode 100644 index 000000000..99d5211e3 --- /dev/null +++ b/common/glm/doc/api/a00767.html @@ -0,0 +1,135 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_polar_coordinates + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_polar_coordinates
+
+
+ + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > euclidean (vec< 2, T, Q > const &polar)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > polar (vec< 3, T, Q > const &euclidean)
 
+

Detailed Description

+

Include <glm/gtx/polar_coordinates.hpp> to use the features of this extension.

+

Conversion from Euclidean space to polar space and revert.

+

Function Documentation

+ +

◆ euclidean()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::euclidean (vec< 2, T, Q > const & polar)
+
+ +

Convert Polar to Euclidean coordinates.

+
See also
GLM_GTX_polar_coordinates
+ +
+
+ +

◆ polar()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::polar (vec< 3, T, Q > const & euclidean)
+
+ +

Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude.

+
See also
GLM_GTX_polar_coordinates
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00768.html b/common/glm/doc/api/a00768.html new file mode 100644 index 000000000..30214983a --- /dev/null +++ b/common/glm/doc/api/a00768.html @@ -0,0 +1,121 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_projection + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_projection
+
+
+ + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType proj (genType const &x, genType const &Normal)
 
+

Detailed Description

+

Include <glm/gtx/projection.hpp> to use the features of this extension.

+

Projection of a vector to other one

+

Function Documentation

+ +

◆ proj()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::proj (genType const & x,
genType const & Normal 
)
+
+ +

Projects x on Normal.

+
See also
GLM_GTX_projection
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00769.html b/common/glm/doc/api/a00769.html new file mode 100644 index 000000000..27ad91658 --- /dev/null +++ b/common/glm/doc/api/a00769.html @@ -0,0 +1,616 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_quaternion + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_quaternion
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > cross (qua< T, Q > const &q, vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > cross (vec< 3, T, Q > const &v, qua< T, Q > const &q)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T extractRealComponent (qua< T, Q > const &q)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > fastMix (qua< T, Q > const &x, qua< T, Q > const &y, T const &a)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > intermediate (qua< T, Q > const &prev, qua< T, Q > const &curr, qua< T, Q > const &next)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T length2 (qua< T, Q > const &q)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > quat_identity ()
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > rotate (qua< T, Q > const &q, vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > rotate (qua< T, Q > const &q, vec< 4, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > rotation (vec< 3, T, Q > const &orig, vec< 3, T, Q > const &dest)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > shortMix (qua< T, Q > const &x, qua< T, Q > const &y, T const &a)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > squad (qua< T, Q > const &q1, qua< T, Q > const &q2, qua< T, Q > const &s1, qua< T, Q > const &s2, T const &h)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > toMat3 (qua< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > toMat4 (qua< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > toQuat (mat< 3, 3, T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > toQuat (mat< 4, 4, T, Q > const &x)
 
+

Detailed Description

+

Include <glm/gtx/quaternion.hpp> to use the features of this extension.

+

Extented quaternion types and functions

+

Function Documentation

+ +

◆ cross() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::cross (qua< T, Q > const & q,
vec< 3, T, Q > const & v 
)
+
+ +

Compute a cross product between a quaternion and a vector.

+
See also
GLM_GTX_quaternion
+ +
+
+ +

◆ cross() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::cross (vec< 3, T, Q > const & v,
qua< T, Q > const & q 
)
+
+ +

Compute a cross product between a vector and a quaternion.

+
See also
GLM_GTX_quaternion
+ +
+
+ +

◆ extractRealComponent()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL T glm::extractRealComponent (qua< T, Q > const & q)
+
+ +

Extract the real component of a quaternion.

+
See also
GLM_GTX_quaternion
+ +
+
+ +

◆ fastMix()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL qua<T, Q> glm::fastMix (qua< T, Q > const & x,
qua< T, Q > const & y,
T const & a 
)
+
+ +

Quaternion normalized linear interpolation.

+
See also
GLM_GTX_quaternion
+ +
+
+ +

◆ intermediate()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL qua<T, Q> glm::intermediate (qua< T, Q > const & prev,
qua< T, Q > const & curr,
qua< T, Q > const & next 
)
+
+ +

Returns an intermediate control point for squad interpolation.

+
See also
GLM_GTX_quaternion
+ +
+
+ +

◆ length2()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL T glm::length2 (qua< T, Q > const & q)
+
+ +

Returns the squared length of x.

+
See also
GLM_GTX_quaternion
+ +
+
+ +

◆ quat_identity()

+ +
+
+ + + + + + + +
GLM_FUNC_DECL qua<T, Q> glm::quat_identity ()
+
+ +

Create an identity quaternion.

+
See also
GLM_GTX_quaternion
+ +
+
+ +

◆ rotate() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::rotate (qua< T, Q > const & q,
vec< 3, T, Q > const & v 
)
+
+ +

Returns quarternion square root.

+
See also
GLM_GTX_quaternion Rotates a 3 components vector by a quaternion.
+
+GLM_GTX_quaternion
+ +
+
+ +

◆ rotate() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<4, T, Q> glm::rotate (qua< T, Q > const & q,
vec< 4, T, Q > const & v 
)
+
+ +

Rotates a 4 components vector by a quaternion.

+
See also
GLM_GTX_quaternion
+ +
+
+ +

◆ rotation()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL qua<T, Q> glm::rotation (vec< 3, T, Q > const & orig,
vec< 3, T, Q > const & dest 
)
+
+ +

Compute the rotation between two vectors.

+

param orig vector, needs to be normalized param dest vector, needs to be normalized

+
See also
GLM_GTX_quaternion
+ +
+
+ +

◆ shortMix()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL qua<T, Q> glm::shortMix (qua< T, Q > const & x,
qua< T, Q > const & y,
T const & a 
)
+
+ +

Quaternion interpolation using the rotation short path.

+
See also
GLM_GTX_quaternion
+ +
+
+ +

◆ squad()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL qua<T, Q> glm::squad (qua< T, Q > const & q1,
qua< T, Q > const & q2,
qua< T, Q > const & s1,
qua< T, Q > const & s2,
T const & h 
)
+
+ +

Compute a point on a path according squad equation.

+

q1 and q2 are control points; s1 and s2 are intermediate control points.

+
See also
GLM_GTX_quaternion
+ +
+
+ +

◆ toMat3()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<3, 3, T, Q> glm::toMat3 (qua< T, Q > const & x)
+
+ +

Converts a quaternion to a 3 * 3 matrix.

+
See also
GLM_GTX_quaternion
+ +

Definition at line 113 of file gtx/quaternion.hpp.

+ +

References glm::mat3_cast().

+ +
+
+ +

◆ toMat4()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::toMat4 (qua< T, Q > const & x)
+
+ +

Converts a quaternion to a 4 * 4 matrix.

+
See also
GLM_GTX_quaternion
+ +

Definition at line 120 of file gtx/quaternion.hpp.

+ +

References glm::mat4_cast().

+ +
+
+ +

◆ toQuat() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL qua<T, Q> glm::toQuat (mat< 3, 3, T, Q > const & x)
+
+ +

Converts a 3 * 3 matrix to a quaternion.

+
See also
GLM_GTX_quaternion
+ +

Definition at line 127 of file gtx/quaternion.hpp.

+ +

References glm::quat_cast().

+ +
+
+ +

◆ toQuat() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL qua<T, Q> glm::toQuat (mat< 4, 4, T, Q > const & x)
+
+ +

Converts a 4 * 4 matrix to a quaternion.

+
See also
GLM_GTX_quaternion
+ +

Definition at line 134 of file gtx/quaternion.hpp.

+ +

References glm::quat_cast().

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00770.html b/common/glm/doc/api/a00770.html new file mode 100644 index 000000000..6041ec40a --- /dev/null +++ b/common/glm/doc/api/a00770.html @@ -0,0 +1,80 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_range + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
+
+
+

Detailed Description

+

Include <glm/gtx/range.hpp> to use the features of this extension.

+

Defines begin and end for vectors and matrices. Useful for range-based for loop. The range is defined over the elements, not over columns or rows (e.g. mat4 has 16 elements).

+
+ + + + diff --git a/common/glm/doc/api/a00771.html b/common/glm/doc/api/a00771.html new file mode 100644 index 000000000..bfe9f7961 --- /dev/null +++ b/common/glm/doc/api/a00771.html @@ -0,0 +1,171 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_raw_data + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_raw_data
+
+
+ + + + + + + + + + +

+Typedefs

typedef detail::uint8 byte
 
typedef detail::uint32 dword
 
typedef detail::uint64 qword
 
typedef detail::uint16 word
 
+

Detailed Description

+

Include <glm/gtx/raw_data.hpp> to use the features of this extension.

+

Projection of a vector to other one

+

Typedef Documentation

+ +

◆ byte

+ +
+
+ + + + +
typedef detail::uint8 byte
+
+ +

Type for byte numbers.

+

From GLM_GTX_raw_data extension.

+ +

Definition at line 34 of file raw_data.hpp.

+ +
+
+ +

◆ dword

+ +
+
+ + + + +
typedef detail::uint32 dword
+
+ +

Type for dword numbers.

+

From GLM_GTX_raw_data extension.

+ +

Definition at line 42 of file raw_data.hpp.

+ +
+
+ +

◆ qword

+ +
+
+ + + + +
typedef detail::uint64 qword
+
+ +

Type for qword numbers.

+

From GLM_GTX_raw_data extension.

+ +

Definition at line 46 of file raw_data.hpp.

+ +
+
+ +

◆ word

+ +
+
+ + + + +
typedef detail::uint16 word
+
+ +

Type for word numbers.

+

From GLM_GTX_raw_data extension.

+ +

Definition at line 38 of file raw_data.hpp.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00772.html b/common/glm/doc/api/a00772.html new file mode 100644 index 000000000..e124b075f --- /dev/null +++ b/common/glm/doc/api/a00772.html @@ -0,0 +1,195 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_rotate_normalized_axis + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_rotate_normalized_axis
+
+
+ + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > rotateNormalizedAxis (mat< 4, 4, T, Q > const &m, T const &angle, vec< 3, T, Q > const &axis)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > rotateNormalizedAxis (qua< T, Q > const &q, T const &angle, vec< 3, T, Q > const &axis)
 
+

Detailed Description

+

Include <glm/gtx/rotate_normalized_axis.hpp> to use the features of this extension.

+

Quaternions and matrices rotations around normalized axis.

+

Function Documentation

+ +

◆ rotateNormalizedAxis() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::rotateNormalizedAxis (mat< 4, 4, T, Q > const & m,
T const & angle,
vec< 3, T, Q > const & axis 
)
+
+ +

Builds a rotation 4 * 4 matrix created from a normalized axis and an angle.

+
Parameters
+ + + + +
mInput matrix multiplied by this rotation matrix.
angleRotation angle expressed in radians.
axisRotation axis, must be normalized.
+
+
+
Template Parameters
+ + +
TValue type used to build the matrix. Currently supported: half (not recommended), float or double.
+
+
+
See also
GLM_GTX_rotate_normalized_axis
+
+- rotate(T angle, T x, T y, T z)
+
+- rotate(mat<4, 4, T, Q> const& m, T angle, T x, T y, T z)
+
+- rotate(T angle, vec<3, T, Q> const& v)
+ +
+
+ +

◆ rotateNormalizedAxis() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL qua<T, Q> glm::rotateNormalizedAxis (qua< T, Q > const & q,
T const & angle,
vec< 3, T, Q > const & axis 
)
+
+ +

Rotates a quaternion from a vector of 3 components normalized axis and an angle.

+
Parameters
+ + + + +
qSource orientation
angleAngle expressed in radians.
axisNormalized axis of the rotation, must be normalized.
+
+
+
See also
GLM_GTX_rotate_normalized_axis
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00773.html b/common/glm/doc/api/a00773.html new file mode 100644 index 000000000..530f8f50f --- /dev/null +++ b/common/glm/doc/api/a00773.html @@ -0,0 +1,487 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_rotate_vector + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_rotate_vector
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > orientation (vec< 3, T, Q > const &Normal, vec< 3, T, Q > const &Up)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 2, T, Q > rotate (vec< 2, T, Q > const &v, T const &angle)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > rotate (vec< 3, T, Q > const &v, T const &angle, vec< 3, T, Q > const &normal)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > rotate (vec< 4, T, Q > const &v, T const &angle, vec< 3, T, Q > const &normal)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > rotateX (vec< 3, T, Q > const &v, T const &angle)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > rotateX (vec< 4, T, Q > const &v, T const &angle)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > rotateY (vec< 3, T, Q > const &v, T const &angle)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > rotateY (vec< 4, T, Q > const &v, T const &angle)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > rotateZ (vec< 3, T, Q > const &v, T const &angle)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > rotateZ (vec< 4, T, Q > const &v, T const &angle)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > slerp (vec< 3, T, Q > const &x, vec< 3, T, Q > const &y, T const &a)
 
+

Detailed Description

+

Include <glm/gtx/rotate_vector.hpp> to use the features of this extension.

+

Function to directly rotate a vector

+

Function Documentation

+ +

◆ orientation()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::orientation (vec< 3, T, Q > const & Normal,
vec< 3, T, Q > const & Up 
)
+
+ +

Build a rotation matrix from a normal and a up vector.

+

From GLM_GTX_rotate_vector extension.

+ +
+
+ +

◆ rotate() [1/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<2, T, Q> glm::rotate (vec< 2, T, Q > const & v,
T const & angle 
)
+
+ +

Rotate a two dimensional vector.

+

From GLM_GTX_rotate_vector extension.

+ +
+
+ +

◆ rotate() [2/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::rotate (vec< 3, T, Q > const & v,
T const & angle,
vec< 3, T, Q > const & normal 
)
+
+ +

Rotate a three dimensional vector around an axis.

+

From GLM_GTX_rotate_vector extension.

+ +
+
+ +

◆ rotate() [3/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<4, T, Q> glm::rotate (vec< 4, T, Q > const & v,
T const & angle,
vec< 3, T, Q > const & normal 
)
+
+ +

Rotate a four dimensional vector around an axis.

+

From GLM_GTX_rotate_vector extension.

+ +
+
+ +

◆ rotateX() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::rotateX (vec< 3, T, Q > const & v,
T const & angle 
)
+
+ +

Rotate a three dimensional vector around the X axis.

+

From GLM_GTX_rotate_vector extension.

+ +
+
+ +

◆ rotateX() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<4, T, Q> glm::rotateX (vec< 4, T, Q > const & v,
T const & angle 
)
+
+ +

Rotate a four dimensional vector around the X axis.

+

From GLM_GTX_rotate_vector extension.

+ +
+
+ +

◆ rotateY() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::rotateY (vec< 3, T, Q > const & v,
T const & angle 
)
+
+ +

Rotate a three dimensional vector around the Y axis.

+

From GLM_GTX_rotate_vector extension.

+ +
+
+ +

◆ rotateY() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<4, T, Q> glm::rotateY (vec< 4, T, Q > const & v,
T const & angle 
)
+
+ +

Rotate a four dimensional vector around the Y axis.

+

From GLM_GTX_rotate_vector extension.

+ +
+
+ +

◆ rotateZ() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::rotateZ (vec< 3, T, Q > const & v,
T const & angle 
)
+
+ +

Rotate a three dimensional vector around the Z axis.

+

From GLM_GTX_rotate_vector extension.

+ +
+
+ +

◆ rotateZ() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<4, T, Q> glm::rotateZ (vec< 4, T, Q > const & v,
T const & angle 
)
+
+ +

Rotate a four dimensional vector around the Z axis.

+

From GLM_GTX_rotate_vector extension.

+ +
+
+ +

◆ slerp()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<3, T, Q> glm::slerp (vec< 3, T, Q > const & x,
vec< 3, T, Q > const & y,
T const & a 
)
+
+ +

Returns Spherical interpolation between two vectors.

+
Parameters
+ + + + +
xA first vector
yA second vector
aInterpolation factor. The interpolation is defined beyond the range [0, 1].
+
+
+
See also
GLM_GTX_rotate_vector
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00774.html b/common/glm/doc/api/a00774.html new file mode 100644 index 000000000..b99a3a4ae --- /dev/null +++ b/common/glm/doc/api/a00774.html @@ -0,0 +1,79 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_scalar_relational + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
GLM_GTX_scalar_relational
+
+
+

Include <glm/gtx/scalar_relational.hpp> to use the features of this extension.

+

Extend a position from a source to a position at a defined length.

+
+ + + + diff --git a/common/glm/doc/api/a00775.html b/common/glm/doc/api/a00775.html new file mode 100644 index 000000000..77ec9f155 --- /dev/null +++ b/common/glm/doc/api/a00775.html @@ -0,0 +1,243 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_spline + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
+
+
+ + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType catmullRom (genType const &v1, genType const &v2, genType const &v3, genType const &v4, typename genType::value_type const &s)
 
template<typename genType >
GLM_FUNC_DECL genType cubic (genType const &v1, genType const &v2, genType const &v3, genType const &v4, typename genType::value_type const &s)
 
template<typename genType >
GLM_FUNC_DECL genType hermite (genType const &v1, genType const &t1, genType const &v2, genType const &t2, typename genType::value_type const &s)
 
+

Detailed Description

+

Include <glm/gtx/spline.hpp> to use the features of this extension.

+

Spline functions

+

Function Documentation

+ +

◆ catmullRom()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::catmullRom (genType const & v1,
genType const & v2,
genType const & v3,
genType const & v4,
typename genType::value_type const & s 
)
+
+ +

Return a point from a catmull rom curve.

+
See also
GLM_GTX_spline extension.
+ +
+
+ +

◆ cubic()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::cubic (genType const & v1,
genType const & v2,
genType const & v3,
genType const & v4,
typename genType::value_type const & s 
)
+
+ +

Return a point from a cubic curve.

+
See also
GLM_GTX_spline extension.
+ +
+
+ +

◆ hermite()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL genType glm::hermite (genType const & v1,
genType const & t1,
genType const & v2,
genType const & t2,
typename genType::value_type const & s 
)
+
+ +

Return a point from a hermite curve.

+
See also
GLM_GTX_spline extension.
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00776.html b/common/glm/doc/api/a00776.html new file mode 100644 index 000000000..7bf155162 --- /dev/null +++ b/common/glm/doc/api/a00776.html @@ -0,0 +1,255 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_std_based_type + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_std_based_type
+
+
+ + + + + + + + + + + + + + + + + + +

+Typedefs

typedef vec< 1, std::size_t, defaultp > size1
 
typedef vec< 1, std::size_t, defaultp > size1_t
 
typedef vec< 2, std::size_t, defaultp > size2
 
typedef vec< 2, std::size_t, defaultp > size2_t
 
typedef vec< 3, std::size_t, defaultp > size3
 
typedef vec< 3, std::size_t, defaultp > size3_t
 
typedef vec< 4, std::size_t, defaultp > size4
 
typedef vec< 4, std::size_t, defaultp > size4_t
 
+

Detailed Description

+

Include <glm/gtx/std_based_type.hpp> to use the features of this extension.

+

Adds vector types based on STL value types.

+

Typedef Documentation

+ +

◆ size1

+ +
+
+ + + + +
typedef vec<1, std::size_t, defaultp> size1
+
+ +

Vector type based of one std::size_t component.

+
See also
GLM_GTX_std_based_type
+ +

Definition at line 35 of file std_based_type.hpp.

+ +
+
+ +

◆ size1_t

+ +
+
+ + + + +
typedef vec<1, std::size_t, defaultp> size1_t
+
+ +

Vector type based of one std::size_t component.

+
See also
GLM_GTX_std_based_type
+ +

Definition at line 51 of file std_based_type.hpp.

+ +
+
+ +

◆ size2

+ +
+
+ + + + +
typedef vec<2, std::size_t, defaultp> size2
+
+ +

Vector type based of two std::size_t components.

+
See also
GLM_GTX_std_based_type
+ +

Definition at line 39 of file std_based_type.hpp.

+ +
+
+ +

◆ size2_t

+ +
+
+ + + + +
typedef vec<2, std::size_t, defaultp> size2_t
+
+ +

Vector type based of two std::size_t components.

+
See also
GLM_GTX_std_based_type
+ +

Definition at line 55 of file std_based_type.hpp.

+ +
+
+ +

◆ size3

+ +
+
+ + + + +
typedef vec<3, std::size_t, defaultp> size3
+
+ +

Vector type based of three std::size_t components.

+
See also
GLM_GTX_std_based_type
+ +

Definition at line 43 of file std_based_type.hpp.

+ +
+
+ +

◆ size3_t

+ +
+
+ + + + +
typedef vec<3, std::size_t, defaultp> size3_t
+
+ +

Vector type based of three std::size_t components.

+
See also
GLM_GTX_std_based_type
+ +

Definition at line 59 of file std_based_type.hpp.

+ +
+
+ +

◆ size4

+ +
+
+ + + + +
typedef vec<4, std::size_t, defaultp> size4
+
+ +

Vector type based of four std::size_t components.

+
See also
GLM_GTX_std_based_type
+ +

Definition at line 47 of file std_based_type.hpp.

+ +
+
+ +

◆ size4_t

+ +
+
+ + + + +
typedef vec<4, std::size_t, defaultp> size4_t
+
+ +

Vector type based of four std::size_t components.

+
See also
GLM_GTX_std_based_type
+ +

Definition at line 63 of file std_based_type.hpp.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00777.html b/common/glm/doc/api/a00777.html new file mode 100644 index 000000000..4a0327a64 --- /dev/null +++ b/common/glm/doc/api/a00777.html @@ -0,0 +1,112 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_string_cast + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_string_cast
+
+
+ + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL std::string to_string (genType const &x)
 
+

Detailed Description

+

Include <glm/gtx/string_cast.hpp> to use the features of this extension.

+

Setup strings for GLM type values

+

This extension is not supported with CUDA

+

Function Documentation

+ +

◆ to_string()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL std::string glm::to_string (genType const & x)
+
+ +

Create a string from a GLM vector or matrix typed variable.

+
See also
GLM_GTX_string_cast extension.
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00778.html b/common/glm/doc/api/a00778.html new file mode 100644 index 000000000..2c9e8271b --- /dev/null +++ b/common/glm/doc/api/a00778.html @@ -0,0 +1,124 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_texture + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
+
+
+ + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
levels (vec< L, T, Q > const &Extent)
 
+

Detailed Description

+

Include <glm/gtx/texture.hpp> to use the features of this extension.

+

Wrapping mode of texture coordinates.

+

Function Documentation

+ +

◆ levels()

+ +
+
+ + + + + + + + +
T glm::levels (vec< L, T, Q > const & Extent)
+
+ +

Compute the number of mipmaps levels necessary to create a mipmap complete texture.

+
Parameters
+ + +
ExtentExtent of the texture base level mipmap
+
+
+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point or signed integer scalar types
QValue from qualifier enum
+
+
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00779.html b/common/glm/doc/api/a00779.html new file mode 100644 index 000000000..a31215792 --- /dev/null +++ b/common/glm/doc/api/a00779.html @@ -0,0 +1,175 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_transform + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_transform
+
+
+ + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > rotate (T angle, vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > scale (vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > translate (vec< 3, T, Q > const &v)
 
+

Detailed Description

+

Include <glm/gtx/transform.hpp> to use the features of this extension.

+

Add transformation matrices

+

Function Documentation

+ +

◆ rotate()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::rotate (angle,
vec< 3, T, Q > const & v 
)
+
+ +

Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in radians.

+
See also
GLM_GTC_matrix_transform
+
+GLM_GTX_transform
+ +
+
+ +

◆ scale()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::scale (vec< 3, T, Q > const & v)
+
+ +

Transforms a matrix with a scale 4 * 4 matrix created from a vector of 3 components.

+
See also
GLM_GTC_matrix_transform
+
+GLM_GTX_transform
+ +
+
+ +

◆ translate()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::translate (vec< 3, T, Q > const & v)
+
+ +

Transforms a matrix with a translation 4 * 4 matrix created from 3 scalars.

+
See also
GLM_GTC_matrix_transform
+
+GLM_GTX_transform
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00780.html b/common/glm/doc/api/a00780.html new file mode 100644 index 000000000..7ba60cbbe --- /dev/null +++ b/common/glm/doc/api/a00780.html @@ -0,0 +1,416 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_transform2 + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_transform2
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > proj2D (mat< 3, 3, T, Q > const &m, vec< 3, T, Q > const &normal)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > proj3D (mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &normal)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > scaleBias (T scale, T bias)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > scaleBias (mat< 4, 4, T, Q > const &m, T scale, T bias)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > shearX2D (mat< 3, 3, T, Q > const &m, T y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > shearX3D (mat< 4, 4, T, Q > const &m, T y, T z)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > shearY2D (mat< 3, 3, T, Q > const &m, T x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > shearY3D (mat< 4, 4, T, Q > const &m, T x, T z)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > shearZ3D (mat< 4, 4, T, Q > const &m, T x, T y)
 
+

Detailed Description

+

Include <glm/gtx/transform2.hpp> to use the features of this extension.

+

Add extra transformation matrices

+

Function Documentation

+ +

◆ proj2D()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<3, 3, T, Q> glm::proj2D (mat< 3, 3, T, Q > const & m,
vec< 3, T, Q > const & normal 
)
+
+ +

Build planar projection matrix along normal axis.

+

From GLM_GTX_transform2 extension.

+ +
+
+ +

◆ proj3D()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::proj3D (mat< 4, 4, T, Q > const & m,
vec< 3, T, Q > const & normal 
)
+
+ +

Build planar projection matrix along normal axis.

+

From GLM_GTX_transform2 extension.

+ +
+
+ +

◆ scaleBias() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::scaleBias (scale,
bias 
)
+
+ +

Build a scale bias matrix.

+

From GLM_GTX_transform2 extension.

+ +
+
+ +

◆ scaleBias() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::scaleBias (mat< 4, 4, T, Q > const & m,
scale,
bias 
)
+
+ +

Build a scale bias matrix.

+

From GLM_GTX_transform2 extension.

+ +
+
+ +

◆ shearX2D()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<3, 3, T, Q> glm::shearX2D (mat< 3, 3, T, Q > const & m,
y 
)
+
+ +

Transforms a matrix with a shearing on X axis.

+

From GLM_GTX_transform2 extension.

+ +
+
+ +

◆ shearX3D()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::shearX3D (mat< 4, 4, T, Q > const & m,
y,
z 
)
+
+ +

Transforms a matrix with a shearing on X axis From GLM_GTX_transform2 extension.

+ +
+
+ +

◆ shearY2D()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<3, 3, T, Q> glm::shearY2D (mat< 3, 3, T, Q > const & m,
x 
)
+
+ +

Transforms a matrix with a shearing on Y axis.

+

From GLM_GTX_transform2 extension.

+ +
+
+ +

◆ shearY3D()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::shearY3D (mat< 4, 4, T, Q > const & m,
x,
z 
)
+
+ +

Transforms a matrix with a shearing on Y axis.

+

From GLM_GTX_transform2 extension.

+ +
+
+ +

◆ shearZ3D()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<4, 4, T, Q> glm::shearZ3D (mat< 4, 4, T, Q > const & m,
x,
y 
)
+
+ +

Transforms a matrix with a shearing on Z axis.

+

From GLM_GTX_transform2 extension.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00781.html b/common/glm/doc/api/a00781.html new file mode 100644 index 000000000..88b0b34d5 --- /dev/null +++ b/common/glm/doc/api/a00781.html @@ -0,0 +1,8135 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_type_aligned + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_type_aligned
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

 GLM_ALIGNED_TYPEDEF (lowp_int8, aligned_lowp_int8, 1)
 
 GLM_ALIGNED_TYPEDEF (lowp_int16, aligned_lowp_int16, 2)
 
 GLM_ALIGNED_TYPEDEF (lowp_int32, aligned_lowp_int32, 4)
 
 GLM_ALIGNED_TYPEDEF (lowp_int64, aligned_lowp_int64, 8)
 
 GLM_ALIGNED_TYPEDEF (lowp_int8_t, aligned_lowp_int8_t, 1)
 
 GLM_ALIGNED_TYPEDEF (lowp_int16_t, aligned_lowp_int16_t, 2)
 
 GLM_ALIGNED_TYPEDEF (lowp_int32_t, aligned_lowp_int32_t, 4)
 
 GLM_ALIGNED_TYPEDEF (lowp_int64_t, aligned_lowp_int64_t, 8)
 
 GLM_ALIGNED_TYPEDEF (lowp_i8, aligned_lowp_i8, 1)
 
 GLM_ALIGNED_TYPEDEF (lowp_i16, aligned_lowp_i16, 2)
 
 GLM_ALIGNED_TYPEDEF (lowp_i32, aligned_lowp_i32, 4)
 
 GLM_ALIGNED_TYPEDEF (lowp_i64, aligned_lowp_i64, 8)
 
 GLM_ALIGNED_TYPEDEF (mediump_int8, aligned_mediump_int8, 1)
 
 GLM_ALIGNED_TYPEDEF (mediump_int16, aligned_mediump_int16, 2)
 
 GLM_ALIGNED_TYPEDEF (mediump_int32, aligned_mediump_int32, 4)
 
 GLM_ALIGNED_TYPEDEF (mediump_int64, aligned_mediump_int64, 8)
 
 GLM_ALIGNED_TYPEDEF (mediump_int8_t, aligned_mediump_int8_t, 1)
 
 GLM_ALIGNED_TYPEDEF (mediump_int16_t, aligned_mediump_int16_t, 2)
 
 GLM_ALIGNED_TYPEDEF (mediump_int32_t, aligned_mediump_int32_t, 4)
 
 GLM_ALIGNED_TYPEDEF (mediump_int64_t, aligned_mediump_int64_t, 8)
 
 GLM_ALIGNED_TYPEDEF (mediump_i8, aligned_mediump_i8, 1)
 
 GLM_ALIGNED_TYPEDEF (mediump_i16, aligned_mediump_i16, 2)
 
 GLM_ALIGNED_TYPEDEF (mediump_i32, aligned_mediump_i32, 4)
 
 GLM_ALIGNED_TYPEDEF (mediump_i64, aligned_mediump_i64, 8)
 
 GLM_ALIGNED_TYPEDEF (highp_int8, aligned_highp_int8, 1)
 
 GLM_ALIGNED_TYPEDEF (highp_int16, aligned_highp_int16, 2)
 
 GLM_ALIGNED_TYPEDEF (highp_int32, aligned_highp_int32, 4)
 
 GLM_ALIGNED_TYPEDEF (highp_int64, aligned_highp_int64, 8)
 
 GLM_ALIGNED_TYPEDEF (highp_int8_t, aligned_highp_int8_t, 1)
 
 GLM_ALIGNED_TYPEDEF (highp_int16_t, aligned_highp_int16_t, 2)
 
 GLM_ALIGNED_TYPEDEF (highp_int32_t, aligned_highp_int32_t, 4)
 
 GLM_ALIGNED_TYPEDEF (highp_int64_t, aligned_highp_int64_t, 8)
 
 GLM_ALIGNED_TYPEDEF (highp_i8, aligned_highp_i8, 1)
 
 GLM_ALIGNED_TYPEDEF (highp_i16, aligned_highp_i16, 2)
 
 GLM_ALIGNED_TYPEDEF (highp_i32, aligned_highp_i32, 4)
 
 GLM_ALIGNED_TYPEDEF (highp_i64, aligned_highp_i64, 8)
 
 GLM_ALIGNED_TYPEDEF (int8, aligned_int8, 1)
 
 GLM_ALIGNED_TYPEDEF (int16, aligned_int16, 2)
 
 GLM_ALIGNED_TYPEDEF (int32, aligned_int32, 4)
 
 GLM_ALIGNED_TYPEDEF (int64, aligned_int64, 8)
 
 GLM_ALIGNED_TYPEDEF (int8_t, aligned_int8_t, 1)
 
 GLM_ALIGNED_TYPEDEF (int16_t, aligned_int16_t, 2)
 
 GLM_ALIGNED_TYPEDEF (int32_t, aligned_int32_t, 4)
 
 GLM_ALIGNED_TYPEDEF (int64_t, aligned_int64_t, 8)
 
 GLM_ALIGNED_TYPEDEF (i8, aligned_i8, 1)
 
 GLM_ALIGNED_TYPEDEF (i16, aligned_i16, 2)
 
 GLM_ALIGNED_TYPEDEF (i32, aligned_i32, 4)
 
 GLM_ALIGNED_TYPEDEF (i64, aligned_i64, 8)
 
 GLM_ALIGNED_TYPEDEF (ivec1, aligned_ivec1, 4)
 
 GLM_ALIGNED_TYPEDEF (ivec2, aligned_ivec2, 8)
 
 GLM_ALIGNED_TYPEDEF (ivec3, aligned_ivec3, 16)
 
 GLM_ALIGNED_TYPEDEF (ivec4, aligned_ivec4, 16)
 
 GLM_ALIGNED_TYPEDEF (i8vec1, aligned_i8vec1, 1)
 
 GLM_ALIGNED_TYPEDEF (i8vec2, aligned_i8vec2, 2)
 
 GLM_ALIGNED_TYPEDEF (i8vec3, aligned_i8vec3, 4)
 
 GLM_ALIGNED_TYPEDEF (i8vec4, aligned_i8vec4, 4)
 
 GLM_ALIGNED_TYPEDEF (i16vec1, aligned_i16vec1, 2)
 
 GLM_ALIGNED_TYPEDEF (i16vec2, aligned_i16vec2, 4)
 
 GLM_ALIGNED_TYPEDEF (i16vec3, aligned_i16vec3, 8)
 
 GLM_ALIGNED_TYPEDEF (i16vec4, aligned_i16vec4, 8)
 
 GLM_ALIGNED_TYPEDEF (i32vec1, aligned_i32vec1, 4)
 
 GLM_ALIGNED_TYPEDEF (i32vec2, aligned_i32vec2, 8)
 
 GLM_ALIGNED_TYPEDEF (i32vec3, aligned_i32vec3, 16)
 
 GLM_ALIGNED_TYPEDEF (i32vec4, aligned_i32vec4, 16)
 
 GLM_ALIGNED_TYPEDEF (i64vec1, aligned_i64vec1, 8)
 
 GLM_ALIGNED_TYPEDEF (i64vec2, aligned_i64vec2, 16)
 
 GLM_ALIGNED_TYPEDEF (i64vec3, aligned_i64vec3, 32)
 
 GLM_ALIGNED_TYPEDEF (i64vec4, aligned_i64vec4, 32)
 
 GLM_ALIGNED_TYPEDEF (lowp_uint8, aligned_lowp_uint8, 1)
 
 GLM_ALIGNED_TYPEDEF (lowp_uint16, aligned_lowp_uint16, 2)
 
 GLM_ALIGNED_TYPEDEF (lowp_uint32, aligned_lowp_uint32, 4)
 
 GLM_ALIGNED_TYPEDEF (lowp_uint64, aligned_lowp_uint64, 8)
 
 GLM_ALIGNED_TYPEDEF (lowp_uint8_t, aligned_lowp_uint8_t, 1)
 
 GLM_ALIGNED_TYPEDEF (lowp_uint16_t, aligned_lowp_uint16_t, 2)
 
 GLM_ALIGNED_TYPEDEF (lowp_uint32_t, aligned_lowp_uint32_t, 4)
 
 GLM_ALIGNED_TYPEDEF (lowp_uint64_t, aligned_lowp_uint64_t, 8)
 
 GLM_ALIGNED_TYPEDEF (lowp_u8, aligned_lowp_u8, 1)
 
 GLM_ALIGNED_TYPEDEF (lowp_u16, aligned_lowp_u16, 2)
 
 GLM_ALIGNED_TYPEDEF (lowp_u32, aligned_lowp_u32, 4)
 
 GLM_ALIGNED_TYPEDEF (lowp_u64, aligned_lowp_u64, 8)
 
 GLM_ALIGNED_TYPEDEF (mediump_uint8, aligned_mediump_uint8, 1)
 
 GLM_ALIGNED_TYPEDEF (mediump_uint16, aligned_mediump_uint16, 2)
 
 GLM_ALIGNED_TYPEDEF (mediump_uint32, aligned_mediump_uint32, 4)
 
 GLM_ALIGNED_TYPEDEF (mediump_uint64, aligned_mediump_uint64, 8)
 
 GLM_ALIGNED_TYPEDEF (mediump_uint8_t, aligned_mediump_uint8_t, 1)
 
 GLM_ALIGNED_TYPEDEF (mediump_uint16_t, aligned_mediump_uint16_t, 2)
 
 GLM_ALIGNED_TYPEDEF (mediump_uint32_t, aligned_mediump_uint32_t, 4)
 
 GLM_ALIGNED_TYPEDEF (mediump_uint64_t, aligned_mediump_uint64_t, 8)
 
 GLM_ALIGNED_TYPEDEF (mediump_u8, aligned_mediump_u8, 1)
 
 GLM_ALIGNED_TYPEDEF (mediump_u16, aligned_mediump_u16, 2)
 
 GLM_ALIGNED_TYPEDEF (mediump_u32, aligned_mediump_u32, 4)
 
 GLM_ALIGNED_TYPEDEF (mediump_u64, aligned_mediump_u64, 8)
 
 GLM_ALIGNED_TYPEDEF (highp_uint8, aligned_highp_uint8, 1)
 
 GLM_ALIGNED_TYPEDEF (highp_uint16, aligned_highp_uint16, 2)
 
 GLM_ALIGNED_TYPEDEF (highp_uint32, aligned_highp_uint32, 4)
 
 GLM_ALIGNED_TYPEDEF (highp_uint64, aligned_highp_uint64, 8)
 
 GLM_ALIGNED_TYPEDEF (highp_uint8_t, aligned_highp_uint8_t, 1)
 
 GLM_ALIGNED_TYPEDEF (highp_uint16_t, aligned_highp_uint16_t, 2)
 
 GLM_ALIGNED_TYPEDEF (highp_uint32_t, aligned_highp_uint32_t, 4)
 
 GLM_ALIGNED_TYPEDEF (highp_uint64_t, aligned_highp_uint64_t, 8)
 
 GLM_ALIGNED_TYPEDEF (highp_u8, aligned_highp_u8, 1)
 
 GLM_ALIGNED_TYPEDEF (highp_u16, aligned_highp_u16, 2)
 
 GLM_ALIGNED_TYPEDEF (highp_u32, aligned_highp_u32, 4)
 
 GLM_ALIGNED_TYPEDEF (highp_u64, aligned_highp_u64, 8)
 
 GLM_ALIGNED_TYPEDEF (uint8, aligned_uint8, 1)
 
 GLM_ALIGNED_TYPEDEF (uint16, aligned_uint16, 2)
 
 GLM_ALIGNED_TYPEDEF (uint32, aligned_uint32, 4)
 
 GLM_ALIGNED_TYPEDEF (uint64, aligned_uint64, 8)
 
 GLM_ALIGNED_TYPEDEF (uint8_t, aligned_uint8_t, 1)
 
 GLM_ALIGNED_TYPEDEF (uint16_t, aligned_uint16_t, 2)
 
 GLM_ALIGNED_TYPEDEF (uint32_t, aligned_uint32_t, 4)
 
 GLM_ALIGNED_TYPEDEF (uint64_t, aligned_uint64_t, 8)
 
 GLM_ALIGNED_TYPEDEF (u8, aligned_u8, 1)
 
 GLM_ALIGNED_TYPEDEF (u16, aligned_u16, 2)
 
 GLM_ALIGNED_TYPEDEF (u32, aligned_u32, 4)
 
 GLM_ALIGNED_TYPEDEF (u64, aligned_u64, 8)
 
 GLM_ALIGNED_TYPEDEF (uvec1, aligned_uvec1, 4)
 
 GLM_ALIGNED_TYPEDEF (uvec2, aligned_uvec2, 8)
 
 GLM_ALIGNED_TYPEDEF (uvec3, aligned_uvec3, 16)
 
 GLM_ALIGNED_TYPEDEF (uvec4, aligned_uvec4, 16)
 
 GLM_ALIGNED_TYPEDEF (u8vec1, aligned_u8vec1, 1)
 
 GLM_ALIGNED_TYPEDEF (u8vec2, aligned_u8vec2, 2)
 
 GLM_ALIGNED_TYPEDEF (u8vec3, aligned_u8vec3, 4)
 
 GLM_ALIGNED_TYPEDEF (u8vec4, aligned_u8vec4, 4)
 
 GLM_ALIGNED_TYPEDEF (u16vec1, aligned_u16vec1, 2)
 
 GLM_ALIGNED_TYPEDEF (u16vec2, aligned_u16vec2, 4)
 
 GLM_ALIGNED_TYPEDEF (u16vec3, aligned_u16vec3, 8)
 
 GLM_ALIGNED_TYPEDEF (u16vec4, aligned_u16vec4, 8)
 
 GLM_ALIGNED_TYPEDEF (u32vec1, aligned_u32vec1, 4)
 
 GLM_ALIGNED_TYPEDEF (u32vec2, aligned_u32vec2, 8)
 
 GLM_ALIGNED_TYPEDEF (u32vec3, aligned_u32vec3, 16)
 
 GLM_ALIGNED_TYPEDEF (u32vec4, aligned_u32vec4, 16)
 
 GLM_ALIGNED_TYPEDEF (u64vec1, aligned_u64vec1, 8)
 
 GLM_ALIGNED_TYPEDEF (u64vec2, aligned_u64vec2, 16)
 
 GLM_ALIGNED_TYPEDEF (u64vec3, aligned_u64vec3, 32)
 
 GLM_ALIGNED_TYPEDEF (u64vec4, aligned_u64vec4, 32)
 
 GLM_ALIGNED_TYPEDEF (float32, aligned_float32, 4)
 
 GLM_ALIGNED_TYPEDEF (float32_t, aligned_float32_t, 4)
 
 GLM_ALIGNED_TYPEDEF (float32, aligned_f32, 4)
 
 GLM_ALIGNED_TYPEDEF (float64, aligned_float64, 8)
 
 GLM_ALIGNED_TYPEDEF (float64_t, aligned_float64_t, 8)
 
 GLM_ALIGNED_TYPEDEF (float64, aligned_f64, 8)
 
 GLM_ALIGNED_TYPEDEF (vec1, aligned_vec1, 4)
 
 GLM_ALIGNED_TYPEDEF (vec2, aligned_vec2, 8)
 
 GLM_ALIGNED_TYPEDEF (vec3, aligned_vec3, 16)
 
 GLM_ALIGNED_TYPEDEF (vec4, aligned_vec4, 16)
 
 GLM_ALIGNED_TYPEDEF (fvec1, aligned_fvec1, 4)
 
 GLM_ALIGNED_TYPEDEF (fvec2, aligned_fvec2, 8)
 
 GLM_ALIGNED_TYPEDEF (fvec3, aligned_fvec3, 16)
 
 GLM_ALIGNED_TYPEDEF (fvec4, aligned_fvec4, 16)
 
 GLM_ALIGNED_TYPEDEF (f32vec1, aligned_f32vec1, 4)
 
 GLM_ALIGNED_TYPEDEF (f32vec2, aligned_f32vec2, 8)
 
 GLM_ALIGNED_TYPEDEF (f32vec3, aligned_f32vec3, 16)
 
 GLM_ALIGNED_TYPEDEF (f32vec4, aligned_f32vec4, 16)
 
 GLM_ALIGNED_TYPEDEF (dvec1, aligned_dvec1, 8)
 
 GLM_ALIGNED_TYPEDEF (dvec2, aligned_dvec2, 16)
 
 GLM_ALIGNED_TYPEDEF (dvec3, aligned_dvec3, 32)
 
 GLM_ALIGNED_TYPEDEF (dvec4, aligned_dvec4, 32)
 
 GLM_ALIGNED_TYPEDEF (f64vec1, aligned_f64vec1, 8)
 
 GLM_ALIGNED_TYPEDEF (f64vec2, aligned_f64vec2, 16)
 
 GLM_ALIGNED_TYPEDEF (f64vec3, aligned_f64vec3, 32)
 
 GLM_ALIGNED_TYPEDEF (f64vec4, aligned_f64vec4, 32)
 
 GLM_ALIGNED_TYPEDEF (mat2, aligned_mat2, 16)
 
 GLM_ALIGNED_TYPEDEF (mat3, aligned_mat3, 16)
 
 GLM_ALIGNED_TYPEDEF (mat4, aligned_mat4, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat2x2, aligned_fmat2, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat3x3, aligned_fmat3, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat4x4, aligned_fmat4, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat2x2, aligned_fmat2x2, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat2x3, aligned_fmat2x3, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat2x4, aligned_fmat2x4, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat3x2, aligned_fmat3x2, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat3x3, aligned_fmat3x3, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat3x4, aligned_fmat3x4, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat4x2, aligned_fmat4x2, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat4x3, aligned_fmat4x3, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat4x4, aligned_fmat4x4, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat2x2, aligned_f32mat2, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat3x3, aligned_f32mat3, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat4x4, aligned_f32mat4, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat2x2, aligned_f32mat2x2, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat2x3, aligned_f32mat2x3, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat2x4, aligned_f32mat2x4, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat3x2, aligned_f32mat3x2, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat3x3, aligned_f32mat3x3, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat3x4, aligned_f32mat3x4, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat4x2, aligned_f32mat4x2, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat4x3, aligned_f32mat4x3, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat4x4, aligned_f32mat4x4, 16)
 
 GLM_ALIGNED_TYPEDEF (f64mat2x2, aligned_f64mat2, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat3x3, aligned_f64mat3, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat4x4, aligned_f64mat4, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat2x2, aligned_f64mat2x2, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat2x3, aligned_f64mat2x3, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat2x4, aligned_f64mat2x4, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat3x2, aligned_f64mat3x2, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat3x3, aligned_f64mat3x3, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat3x4, aligned_f64mat3x4, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat4x2, aligned_f64mat4x2, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat4x3, aligned_f64mat4x3, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat4x4, aligned_f64mat4x4, 32)
 
 GLM_ALIGNED_TYPEDEF (quat, aligned_quat, 16)
 
 GLM_ALIGNED_TYPEDEF (quat, aligned_fquat, 16)
 
 GLM_ALIGNED_TYPEDEF (dquat, aligned_dquat, 32)
 
 GLM_ALIGNED_TYPEDEF (f32quat, aligned_f32quat, 16)
 
 GLM_ALIGNED_TYPEDEF (f64quat, aligned_f64quat, 32)
 
+

Detailed Description

+

Include <glm/gtx/type_aligned.hpp> to use the features of this extension.

+

Defines aligned types.

+

Function Documentation

+ +

◆ GLM_ALIGNED_TYPEDEF() [1/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (lowp_int8 ,
aligned_lowp_int8 ,
 
)
+
+ +

Low qualifier 8 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [2/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (lowp_int16 ,
aligned_lowp_int16 ,
 
)
+
+ +

Low qualifier 16 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [3/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (lowp_int32 ,
aligned_lowp_int32 ,
 
)
+
+ +

Low qualifier 32 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [4/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (lowp_int64 ,
aligned_lowp_int64 ,
 
)
+
+ +

Low qualifier 64 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [5/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (lowp_int8_t ,
aligned_lowp_int8_t ,
 
)
+
+ +

Low qualifier 8 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [6/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (lowp_int16_t ,
aligned_lowp_int16_t ,
 
)
+
+ +

Low qualifier 16 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [7/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (lowp_int32_t ,
aligned_lowp_int32_t ,
 
)
+
+ +

Low qualifier 32 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [8/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (lowp_int64_t ,
aligned_lowp_int64_t ,
 
)
+
+ +

Low qualifier 64 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [9/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (lowp_i8 ,
aligned_lowp_i8 ,
 
)
+
+ +

Low qualifier 8 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [10/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (lowp_i16 ,
aligned_lowp_i16 ,
 
)
+
+ +

Low qualifier 16 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [11/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (lowp_i32 ,
aligned_lowp_i32 ,
 
)
+
+ +

Low qualifier 32 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [12/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (lowp_i64 ,
aligned_lowp_i64 ,
 
)
+
+ +

Low qualifier 64 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [13/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (mediump_int8 ,
aligned_mediump_int8 ,
 
)
+
+ +

Medium qualifier 8 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [14/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (mediump_int16 ,
aligned_mediump_int16 ,
 
)
+
+ +

Medium qualifier 16 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [15/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (mediump_int32 ,
aligned_mediump_int32 ,
 
)
+
+ +

Medium qualifier 32 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [16/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (mediump_int64 ,
aligned_mediump_int64 ,
 
)
+
+ +

Medium qualifier 64 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [17/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (mediump_int8_t ,
aligned_mediump_int8_t ,
 
)
+
+ +

Medium qualifier 8 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [18/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (mediump_int16_t ,
aligned_mediump_int16_t ,
 
)
+
+ +

Medium qualifier 16 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [19/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (mediump_int32_t ,
aligned_mediump_int32_t ,
 
)
+
+ +

Medium qualifier 32 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [20/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (mediump_int64_t ,
aligned_mediump_int64_t ,
 
)
+
+ +

Medium qualifier 64 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [21/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (mediump_i8 ,
aligned_mediump_i8 ,
 
)
+
+ +

Medium qualifier 8 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [22/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (mediump_i16 ,
aligned_mediump_i16 ,
 
)
+
+ +

Medium qualifier 16 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [23/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (mediump_i32 ,
aligned_mediump_i32 ,
 
)
+
+ +

Medium qualifier 32 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [24/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (mediump_i64 ,
aligned_mediump_i64 ,
 
)
+
+ +

Medium qualifier 64 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [25/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (highp_int8 ,
aligned_highp_int8 ,
 
)
+
+ +

High qualifier 8 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [26/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (highp_int16 ,
aligned_highp_int16 ,
 
)
+
+ +

High qualifier 16 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [27/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (highp_int32 ,
aligned_highp_int32 ,
 
)
+
+ +

High qualifier 32 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [28/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (highp_int64 ,
aligned_highp_int64 ,
 
)
+
+ +

High qualifier 64 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [29/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (highp_int8_t ,
aligned_highp_int8_t ,
 
)
+
+ +

High qualifier 8 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [30/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (highp_int16_t ,
aligned_highp_int16_t ,
 
)
+
+ +

High qualifier 16 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [31/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (highp_int32_t ,
aligned_highp_int32_t ,
 
)
+
+ +

High qualifier 32 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [32/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (highp_int64_t ,
aligned_highp_int64_t ,
 
)
+
+ +

High qualifier 64 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [33/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (highp_i8 ,
aligned_highp_i8 ,
 
)
+
+ +

High qualifier 8 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [34/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (highp_i16 ,
aligned_highp_i16 ,
 
)
+
+ +

High qualifier 16 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [35/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (highp_i32 ,
aligned_highp_i32 ,
 
)
+
+ +

High qualifier 32 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [36/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (highp_i64 ,
aligned_highp_i64 ,
 
)
+
+ +

High qualifier 64 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [37/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (int8 ,
aligned_int8 ,
 
)
+
+ +

Default qualifier 8 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [38/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (int16 ,
aligned_int16 ,
 
)
+
+ +

Default qualifier 16 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [39/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (int32 ,
aligned_int32 ,
 
)
+
+ +

Default qualifier 32 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [40/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (int64 ,
aligned_int64 ,
 
)
+
+ +

Default qualifier 64 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [41/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (int8_t ,
aligned_int8_t ,
 
)
+
+ +

Default qualifier 8 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [42/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (int16_t ,
aligned_int16_t ,
 
)
+
+ +

Default qualifier 16 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [43/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (int32_t ,
aligned_int32_t ,
 
)
+
+ +

Default qualifier 32 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [44/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (int64_t ,
aligned_int64_t ,
 
)
+
+ +

Default qualifier 64 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [45/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (i8 ,
aligned_i8 ,
 
)
+
+ +

Default qualifier 8 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [46/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (i16 ,
aligned_i16 ,
 
)
+
+ +

Default qualifier 16 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [47/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (i32 ,
aligned_i32 ,
 
)
+
+ +

Default qualifier 32 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [48/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (i64 ,
aligned_i64 ,
 
)
+
+ +

Default qualifier 64 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [49/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (ivec1 ,
aligned_ivec1 ,
 
)
+
+ +

Default qualifier 32 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [50/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (ivec2 ,
aligned_ivec2 ,
 
)
+
+ +

Default qualifier 32 bit signed integer aligned vector of 2 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [51/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (ivec3 ,
aligned_ivec3 ,
16  
)
+
+ +

Default qualifier 32 bit signed integer aligned vector of 3 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [52/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (ivec4 ,
aligned_ivec4 ,
16  
)
+
+ +

Default qualifier 32 bit signed integer aligned vector of 4 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [53/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (i8vec1 ,
aligned_i8vec1 ,
 
)
+
+ +

Default qualifier 8 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [54/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (i8vec2 ,
aligned_i8vec2 ,
 
)
+
+ +

Default qualifier 8 bit signed integer aligned vector of 2 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [55/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (i8vec3 ,
aligned_i8vec3 ,
 
)
+
+ +

Default qualifier 8 bit signed integer aligned vector of 3 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [56/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (i8vec4 ,
aligned_i8vec4 ,
 
)
+
+ +

Default qualifier 8 bit signed integer aligned vector of 4 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [57/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (i16vec1 ,
aligned_i16vec1 ,
 
)
+
+ +

Default qualifier 16 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [58/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (i16vec2 ,
aligned_i16vec2 ,
 
)
+
+ +

Default qualifier 16 bit signed integer aligned vector of 2 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [59/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (i16vec3 ,
aligned_i16vec3 ,
 
)
+
+ +

Default qualifier 16 bit signed integer aligned vector of 3 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [60/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (i16vec4 ,
aligned_i16vec4 ,
 
)
+
+ +

Default qualifier 16 bit signed integer aligned vector of 4 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [61/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (i32vec1 ,
aligned_i32vec1 ,
 
)
+
+ +

Default qualifier 32 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [62/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (i32vec2 ,
aligned_i32vec2 ,
 
)
+
+ +

Default qualifier 32 bit signed integer aligned vector of 2 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [63/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (i32vec3 ,
aligned_i32vec3 ,
16  
)
+
+ +

Default qualifier 32 bit signed integer aligned vector of 3 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [64/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (i32vec4 ,
aligned_i32vec4 ,
16  
)
+
+ +

Default qualifier 32 bit signed integer aligned vector of 4 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [65/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (i64vec1 ,
aligned_i64vec1 ,
 
)
+
+ +

Default qualifier 64 bit signed integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [66/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (i64vec2 ,
aligned_i64vec2 ,
16  
)
+
+ +

Default qualifier 64 bit signed integer aligned vector of 2 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [67/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (i64vec3 ,
aligned_i64vec3 ,
32  
)
+
+ +

Default qualifier 64 bit signed integer aligned vector of 3 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [68/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (i64vec4 ,
aligned_i64vec4 ,
32  
)
+
+ +

Default qualifier 64 bit signed integer aligned vector of 4 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [69/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (lowp_uint8 ,
aligned_lowp_uint8 ,
 
)
+
+ +

Low qualifier 8 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [70/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (lowp_uint16 ,
aligned_lowp_uint16 ,
 
)
+
+ +

Low qualifier 16 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [71/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (lowp_uint32 ,
aligned_lowp_uint32 ,
 
)
+
+ +

Low qualifier 32 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [72/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (lowp_uint64 ,
aligned_lowp_uint64 ,
 
)
+
+ +

Low qualifier 64 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [73/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (lowp_uint8_t ,
aligned_lowp_uint8_t ,
 
)
+
+ +

Low qualifier 8 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [74/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (lowp_uint16_t ,
aligned_lowp_uint16_t ,
 
)
+
+ +

Low qualifier 16 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [75/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (lowp_uint32_t ,
aligned_lowp_uint32_t ,
 
)
+
+ +

Low qualifier 32 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [76/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (lowp_uint64_t ,
aligned_lowp_uint64_t ,
 
)
+
+ +

Low qualifier 64 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [77/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (lowp_u8 ,
aligned_lowp_u8 ,
 
)
+
+ +

Low qualifier 8 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [78/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (lowp_u16 ,
aligned_lowp_u16 ,
 
)
+
+ +

Low qualifier 16 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [79/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (lowp_u32 ,
aligned_lowp_u32 ,
 
)
+
+ +

Low qualifier 32 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [80/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (lowp_u64 ,
aligned_lowp_u64 ,
 
)
+
+ +

Low qualifier 64 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [81/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (mediump_uint8 ,
aligned_mediump_uint8 ,
 
)
+
+ +

Medium qualifier 8 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [82/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (mediump_uint16 ,
aligned_mediump_uint16 ,
 
)
+
+ +

Medium qualifier 16 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [83/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (mediump_uint32 ,
aligned_mediump_uint32 ,
 
)
+
+ +

Medium qualifier 32 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [84/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (mediump_uint64 ,
aligned_mediump_uint64 ,
 
)
+
+ +

Medium qualifier 64 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [85/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (mediump_uint8_t ,
aligned_mediump_uint8_t ,
 
)
+
+ +

Medium qualifier 8 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [86/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (mediump_uint16_t ,
aligned_mediump_uint16_t ,
 
)
+
+ +

Medium qualifier 16 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [87/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (mediump_uint32_t ,
aligned_mediump_uint32_t ,
 
)
+
+ +

Medium qualifier 32 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [88/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (mediump_uint64_t ,
aligned_mediump_uint64_t ,
 
)
+
+ +

Medium qualifier 64 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [89/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (mediump_u8 ,
aligned_mediump_u8 ,
 
)
+
+ +

Medium qualifier 8 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [90/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (mediump_u16 ,
aligned_mediump_u16 ,
 
)
+
+ +

Medium qualifier 16 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [91/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (mediump_u32 ,
aligned_mediump_u32 ,
 
)
+
+ +

Medium qualifier 32 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [92/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (mediump_u64 ,
aligned_mediump_u64 ,
 
)
+
+ +

Medium qualifier 64 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [93/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (highp_uint8 ,
aligned_highp_uint8 ,
 
)
+
+ +

High qualifier 8 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [94/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (highp_uint16 ,
aligned_highp_uint16 ,
 
)
+
+ +

High qualifier 16 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [95/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (highp_uint32 ,
aligned_highp_uint32 ,
 
)
+
+ +

High qualifier 32 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [96/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (highp_uint64 ,
aligned_highp_uint64 ,
 
)
+
+ +

High qualifier 64 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [97/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (highp_uint8_t ,
aligned_highp_uint8_t ,
 
)
+
+ +

High qualifier 8 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [98/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (highp_uint16_t ,
aligned_highp_uint16_t ,
 
)
+
+ +

High qualifier 16 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [99/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (highp_uint32_t ,
aligned_highp_uint32_t ,
 
)
+
+ +

High qualifier 32 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [100/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (highp_uint64_t ,
aligned_highp_uint64_t ,
 
)
+
+ +

High qualifier 64 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [101/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (highp_u8 ,
aligned_highp_u8 ,
 
)
+
+ +

High qualifier 8 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [102/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (highp_u16 ,
aligned_highp_u16 ,
 
)
+
+ +

High qualifier 16 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [103/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (highp_u32 ,
aligned_highp_u32 ,
 
)
+
+ +

High qualifier 32 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [104/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (highp_u64 ,
aligned_highp_u64 ,
 
)
+
+ +

High qualifier 64 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [105/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (uint8 ,
aligned_uint8 ,
 
)
+
+ +

Default qualifier 8 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [106/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (uint16 ,
aligned_uint16 ,
 
)
+
+ +

Default qualifier 16 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [107/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (uint32 ,
aligned_uint32 ,
 
)
+
+ +

Default qualifier 32 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [108/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (uint64 ,
aligned_uint64 ,
 
)
+
+ +

Default qualifier 64 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [109/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (uint8_t ,
aligned_uint8_t ,
 
)
+
+ +

Default qualifier 8 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [110/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (uint16_t ,
aligned_uint16_t ,
 
)
+
+ +

Default qualifier 16 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [111/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (uint32_t ,
aligned_uint32_t ,
 
)
+
+ +

Default qualifier 32 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [112/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (uint64_t ,
aligned_uint64_t ,
 
)
+
+ +

Default qualifier 64 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [113/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (u8 ,
aligned_u8 ,
 
)
+
+ +

Default qualifier 8 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [114/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (u16 ,
aligned_u16 ,
 
)
+
+ +

Default qualifier 16 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [115/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (u32 ,
aligned_u32 ,
 
)
+
+ +

Default qualifier 32 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [116/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (u64 ,
aligned_u64 ,
 
)
+
+ +

Default qualifier 64 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [117/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (uvec1 ,
aligned_uvec1 ,
 
)
+
+ +

Default qualifier 32 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [118/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (uvec2 ,
aligned_uvec2 ,
 
)
+
+ +

Default qualifier 32 bit unsigned integer aligned vector of 2 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [119/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (uvec3 ,
aligned_uvec3 ,
16  
)
+
+ +

Default qualifier 32 bit unsigned integer aligned vector of 3 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [120/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (uvec4 ,
aligned_uvec4 ,
16  
)
+
+ +

Default qualifier 32 bit unsigned integer aligned vector of 4 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [121/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (u8vec1 ,
aligned_u8vec1 ,
 
)
+
+ +

Default qualifier 8 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [122/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (u8vec2 ,
aligned_u8vec2 ,
 
)
+
+ +

Default qualifier 8 bit unsigned integer aligned vector of 2 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [123/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (u8vec3 ,
aligned_u8vec3 ,
 
)
+
+ +

Default qualifier 8 bit unsigned integer aligned vector of 3 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [124/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (u8vec4 ,
aligned_u8vec4 ,
 
)
+
+ +

Default qualifier 8 bit unsigned integer aligned vector of 4 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [125/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (u16vec1 ,
aligned_u16vec1 ,
 
)
+
+ +

Default qualifier 16 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [126/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (u16vec2 ,
aligned_u16vec2 ,
 
)
+
+ +

Default qualifier 16 bit unsigned integer aligned vector of 2 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [127/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (u16vec3 ,
aligned_u16vec3 ,
 
)
+
+ +

Default qualifier 16 bit unsigned integer aligned vector of 3 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [128/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (u16vec4 ,
aligned_u16vec4 ,
 
)
+
+ +

Default qualifier 16 bit unsigned integer aligned vector of 4 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [129/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (u32vec1 ,
aligned_u32vec1 ,
 
)
+
+ +

Default qualifier 32 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [130/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (u32vec2 ,
aligned_u32vec2 ,
 
)
+
+ +

Default qualifier 32 bit unsigned integer aligned vector of 2 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [131/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (u32vec3 ,
aligned_u32vec3 ,
16  
)
+
+ +

Default qualifier 32 bit unsigned integer aligned vector of 3 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [132/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (u32vec4 ,
aligned_u32vec4 ,
16  
)
+
+ +

Default qualifier 32 bit unsigned integer aligned vector of 4 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [133/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (u64vec1 ,
aligned_u64vec1 ,
 
)
+
+ +

Default qualifier 64 bit unsigned integer aligned scalar type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [134/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (u64vec2 ,
aligned_u64vec2 ,
16  
)
+
+ +

Default qualifier 64 bit unsigned integer aligned vector of 2 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [135/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (u64vec3 ,
aligned_u64vec3 ,
32  
)
+
+ +

Default qualifier 64 bit unsigned integer aligned vector of 3 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [136/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (u64vec4 ,
aligned_u64vec4 ,
32  
)
+
+ +

Default qualifier 64 bit unsigned integer aligned vector of 4 components type.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [137/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (float32 ,
aligned_float32 ,
 
)
+
+ +

32 bit single-qualifier floating-point aligned scalar.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [138/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (float32_t ,
aligned_float32_t ,
 
)
+
+ +

32 bit single-qualifier floating-point aligned scalar.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [139/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (float32 ,
aligned_f32 ,
 
)
+
+ +

32 bit single-qualifier floating-point aligned scalar.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [140/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (float64 ,
aligned_float64 ,
 
)
+
+ +

64 bit double-qualifier floating-point aligned scalar.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [141/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (float64_t ,
aligned_float64_t ,
 
)
+
+ +

64 bit double-qualifier floating-point aligned scalar.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [142/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (float64 ,
aligned_f64 ,
 
)
+
+ +

64 bit double-qualifier floating-point aligned scalar.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [143/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (vec1 ,
aligned_vec1 ,
 
)
+
+ +

Single-qualifier floating-point aligned vector of 1 component.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [144/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (vec2 ,
aligned_vec2 ,
 
)
+
+ +

Single-qualifier floating-point aligned vector of 2 components.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [145/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (vec3 ,
aligned_vec3 ,
16  
)
+
+ +

Single-qualifier floating-point aligned vector of 3 components.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [146/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (vec4 ,
aligned_vec4 ,
16  
)
+
+ +

Single-qualifier floating-point aligned vector of 4 components.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [147/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (fvec1 ,
aligned_fvec1 ,
 
)
+
+ +

Single-qualifier floating-point aligned vector of 1 component.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [148/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (fvec2 ,
aligned_fvec2 ,
 
)
+
+ +

Single-qualifier floating-point aligned vector of 2 components.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [149/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (fvec3 ,
aligned_fvec3 ,
16  
)
+
+ +

Single-qualifier floating-point aligned vector of 3 components.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [150/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (fvec4 ,
aligned_fvec4 ,
16  
)
+
+ +

Single-qualifier floating-point aligned vector of 4 components.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [151/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f32vec1 ,
aligned_f32vec1 ,
 
)
+
+ +

Single-qualifier floating-point aligned vector of 1 component.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [152/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f32vec2 ,
aligned_f32vec2 ,
 
)
+
+ +

Single-qualifier floating-point aligned vector of 2 components.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [153/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f32vec3 ,
aligned_f32vec3 ,
16  
)
+
+ +

Single-qualifier floating-point aligned vector of 3 components.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [154/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f32vec4 ,
aligned_f32vec4 ,
16  
)
+
+ +

Single-qualifier floating-point aligned vector of 4 components.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [155/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (dvec1 ,
aligned_dvec1 ,
 
)
+
+ +

Double-qualifier floating-point aligned vector of 1 component.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [156/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (dvec2 ,
aligned_dvec2 ,
16  
)
+
+ +

Double-qualifier floating-point aligned vector of 2 components.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [157/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (dvec3 ,
aligned_dvec3 ,
32  
)
+
+ +

Double-qualifier floating-point aligned vector of 3 components.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [158/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (dvec4 ,
aligned_dvec4 ,
32  
)
+
+ +

Double-qualifier floating-point aligned vector of 4 components.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [159/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f64vec1 ,
aligned_f64vec1 ,
 
)
+
+ +

Double-qualifier floating-point aligned vector of 1 component.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [160/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f64vec2 ,
aligned_f64vec2 ,
16  
)
+
+ +

Double-qualifier floating-point aligned vector of 2 components.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [161/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f64vec3 ,
aligned_f64vec3 ,
32  
)
+
+ +

Double-qualifier floating-point aligned vector of 3 components.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [162/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f64vec4 ,
aligned_f64vec4 ,
32  
)
+
+ +

Double-qualifier floating-point aligned vector of 4 components.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [163/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_ALIGNED_TYPEDEF (mat2 ,
aligned_mat2 ,
16  
)
+
+ +

Single-qualifier floating-point aligned 1x1 matrix.

+
See also
GLM_GTX_type_aligned Single-qualifier floating-point aligned 2x2 matrix.
+
+GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [164/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_ALIGNED_TYPEDEF (mat3 ,
aligned_mat3 ,
16  
)
+
+ +

Single-qualifier floating-point aligned 3x3 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [165/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_ALIGNED_TYPEDEF (mat4 ,
aligned_mat4 ,
16  
)
+
+ +

Single-qualifier floating-point aligned 4x4 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [166/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (fmat2x2 ,
aligned_fmat2 ,
16  
)
+
+ +

Single-qualifier floating-point aligned 1x1 matrix.

+
See also
GLM_GTX_type_aligned Single-qualifier floating-point aligned 2x2 matrix.
+
+GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [167/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (fmat3x3 ,
aligned_fmat3 ,
16  
)
+
+ +

Single-qualifier floating-point aligned 3x3 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [168/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (fmat4x4 ,
aligned_fmat4 ,
16  
)
+
+ +

Single-qualifier floating-point aligned 4x4 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [169/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (fmat2x2 ,
aligned_fmat2x2 ,
16  
)
+
+ +

Single-qualifier floating-point aligned 1x1 matrix.

+
See also
GLM_GTX_type_aligned Single-qualifier floating-point aligned 2x2 matrix.
+
+GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [170/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (fmat2x3 ,
aligned_fmat2x3 ,
16  
)
+
+ +

Single-qualifier floating-point aligned 2x3 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [171/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (fmat2x4 ,
aligned_fmat2x4 ,
16  
)
+
+ +

Single-qualifier floating-point aligned 2x4 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [172/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (fmat3x2 ,
aligned_fmat3x2 ,
16  
)
+
+ +

Single-qualifier floating-point aligned 3x2 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [173/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (fmat3x3 ,
aligned_fmat3x3 ,
16  
)
+
+ +

Single-qualifier floating-point aligned 3x3 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [174/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (fmat3x4 ,
aligned_fmat3x4 ,
16  
)
+
+ +

Single-qualifier floating-point aligned 3x4 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [175/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (fmat4x2 ,
aligned_fmat4x2 ,
16  
)
+
+ +

Single-qualifier floating-point aligned 4x2 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [176/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (fmat4x3 ,
aligned_fmat4x3 ,
16  
)
+
+ +

Single-qualifier floating-point aligned 4x3 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [177/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (fmat4x4 ,
aligned_fmat4x4 ,
16  
)
+
+ +

Single-qualifier floating-point aligned 4x4 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [178/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f32mat2x2 ,
aligned_f32mat2 ,
16  
)
+
+ +

Single-qualifier floating-point aligned 1x1 matrix.

+
See also
GLM_GTX_type_aligned Single-qualifier floating-point aligned 2x2 matrix.
+
+GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [179/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f32mat3x3 ,
aligned_f32mat3 ,
16  
)
+
+ +

Single-qualifier floating-point aligned 3x3 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [180/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f32mat4x4 ,
aligned_f32mat4 ,
16  
)
+
+ +

Single-qualifier floating-point aligned 4x4 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [181/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f32mat2x2 ,
aligned_f32mat2x2 ,
16  
)
+
+ +

Single-qualifier floating-point aligned 1x1 matrix.

+
See also
GLM_GTX_type_aligned Single-qualifier floating-point aligned 2x2 matrix.
+
+GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [182/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f32mat2x3 ,
aligned_f32mat2x3 ,
16  
)
+
+ +

Single-qualifier floating-point aligned 2x3 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [183/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f32mat2x4 ,
aligned_f32mat2x4 ,
16  
)
+
+ +

Single-qualifier floating-point aligned 2x4 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [184/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f32mat3x2 ,
aligned_f32mat3x2 ,
16  
)
+
+ +

Single-qualifier floating-point aligned 3x2 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [185/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f32mat3x3 ,
aligned_f32mat3x3 ,
16  
)
+
+ +

Single-qualifier floating-point aligned 3x3 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [186/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f32mat3x4 ,
aligned_f32mat3x4 ,
16  
)
+
+ +

Single-qualifier floating-point aligned 3x4 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [187/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f32mat4x2 ,
aligned_f32mat4x2 ,
16  
)
+
+ +

Single-qualifier floating-point aligned 4x2 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [188/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f32mat4x3 ,
aligned_f32mat4x3 ,
16  
)
+
+ +

Single-qualifier floating-point aligned 4x3 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [189/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f32mat4x4 ,
aligned_f32mat4x4 ,
16  
)
+
+ +

Single-qualifier floating-point aligned 4x4 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [190/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f64mat2x2 ,
aligned_f64mat2 ,
32  
)
+
+ +

Double-qualifier floating-point aligned 1x1 matrix.

+
See also
GLM_GTX_type_aligned Double-qualifier floating-point aligned 2x2 matrix.
+
+GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [191/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f64mat3x3 ,
aligned_f64mat3 ,
32  
)
+
+ +

Double-qualifier floating-point aligned 3x3 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [192/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f64mat4x4 ,
aligned_f64mat4 ,
32  
)
+
+ +

Double-qualifier floating-point aligned 4x4 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [193/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f64mat2x2 ,
aligned_f64mat2x2 ,
32  
)
+
+ +

Double-qualifier floating-point aligned 1x1 matrix.

+
See also
GLM_GTX_type_aligned Double-qualifier floating-point aligned 2x2 matrix.
+
+GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [194/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f64mat2x3 ,
aligned_f64mat2x3 ,
32  
)
+
+ +

Double-qualifier floating-point aligned 2x3 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [195/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f64mat2x4 ,
aligned_f64mat2x4 ,
32  
)
+
+ +

Double-qualifier floating-point aligned 2x4 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [196/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f64mat3x2 ,
aligned_f64mat3x2 ,
32  
)
+
+ +

Double-qualifier floating-point aligned 3x2 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [197/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f64mat3x3 ,
aligned_f64mat3x3 ,
32  
)
+
+ +

Double-qualifier floating-point aligned 3x3 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [198/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f64mat3x4 ,
aligned_f64mat3x4 ,
32  
)
+
+ +

Double-qualifier floating-point aligned 3x4 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [199/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f64mat4x2 ,
aligned_f64mat4x2 ,
32  
)
+
+ +

Double-qualifier floating-point aligned 4x2 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [200/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f64mat4x3 ,
aligned_f64mat4x3 ,
32  
)
+
+ +

Double-qualifier floating-point aligned 4x3 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [201/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f64mat4x4 ,
aligned_f64mat4x4 ,
32  
)
+
+ +

Double-qualifier floating-point aligned 4x4 matrix.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [202/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (quat ,
aligned_quat ,
16  
)
+
+ +

Single-qualifier floating-point aligned quaternion.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [203/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (quat ,
aligned_fquat ,
16  
)
+
+ +

Single-qualifier floating-point aligned quaternion.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [204/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (dquat ,
aligned_dquat ,
32  
)
+
+ +

Double-qualifier floating-point aligned quaternion.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [205/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f32quat ,
aligned_f32quat ,
16  
)
+
+ +

Single-qualifier floating-point aligned quaternion.

+
See also
GLM_GTX_type_aligned
+ +
+
+ +

◆ GLM_ALIGNED_TYPEDEF() [206/206]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
glm::GLM_ALIGNED_TYPEDEF (f64quat ,
aligned_f64quat ,
32  
)
+
+ +

Double-qualifier floating-point aligned quaternion.

+
See also
GLM_GTX_type_aligned
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00782.html b/common/glm/doc/api/a00782.html new file mode 100644 index 000000000..9667825e7 --- /dev/null +++ b/common/glm/doc/api/a00782.html @@ -0,0 +1,80 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_type_trait + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
GLM_GTX_type_trait
+
+
+

Detailed Description

+

Include <glm/gtx/type_trait.hpp> to use the features of this extension.

+

Defines traits for each type.

+
+ + + + diff --git a/common/glm/doc/api/a00783.html b/common/glm/doc/api/a00783.html new file mode 100644 index 000000000..61718fe5e --- /dev/null +++ b/common/glm/doc/api/a00783.html @@ -0,0 +1,79 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_vec_swizzle + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
GLM_GTX_vec_swizzle
+
+
+

Include <glm/gtx/vec_swizzle.hpp> to use the features of this extension.

+

Functions to perform swizzle operation.

+
+ + + + diff --git a/common/glm/doc/api/a00784.html b/common/glm/doc/api/a00784.html new file mode 100644 index 000000000..c86342387 --- /dev/null +++ b/common/glm/doc/api/a00784.html @@ -0,0 +1,195 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_vector_angle + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_vector_angle
+
+
+ + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T angle (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T orientedAngle (vec< 2, T, Q > const &x, vec< 2, T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T orientedAngle (vec< 3, T, Q > const &x, vec< 3, T, Q > const &y, vec< 3, T, Q > const &ref)
 
+

Detailed Description

+

Include <glm/gtx/vector_angle.hpp> to use the features of this extension.

+

Compute angle between vectors

+

Function Documentation

+ +

◆ angle()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::angle (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Returns the absolute angle between two vectors.

+

Parameters need to be normalized.

See also
GLM_GTX_vector_angle extension.
+ +
+
+ +

◆ orientedAngle() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::orientedAngle (vec< 2, T, Q > const & x,
vec< 2, T, Q > const & y 
)
+
+ +

Returns the oriented angle between two 2d vectors.

+

Parameters need to be normalized.

See also
GLM_GTX_vector_angle extension.
+ +
+
+ +

◆ orientedAngle() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL T glm::orientedAngle (vec< 3, T, Q > const & x,
vec< 3, T, Q > const & y,
vec< 3, T, Q > const & ref 
)
+
+ +

Returns the oriented angle between two 3d vectors based from a reference axis.

+

Parameters need to be normalized.

See also
GLM_GTX_vector_angle extension.
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00785.html b/common/glm/doc/api/a00785.html new file mode 100644 index 000000000..f2f81c33c --- /dev/null +++ b/common/glm/doc/api/a00785.html @@ -0,0 +1,309 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_vector_query + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
GLM_GTX_vector_query
+
+
+ + + + + + + + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL bool areCollinear (vec< L, T, Q > const &v0, vec< L, T, Q > const &v1, T const &epsilon)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL bool areOrthogonal (vec< L, T, Q > const &v0, vec< L, T, Q > const &v1, T const &epsilon)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL bool areOrthonormal (vec< L, T, Q > const &v0, vec< L, T, Q > const &v1, T const &epsilon)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, bool, Q > isCompNull (vec< L, T, Q > const &v, T const &epsilon)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL bool isNormalized (vec< L, T, Q > const &v, T const &epsilon)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL bool isNull (vec< L, T, Q > const &v, T const &epsilon)
 
+

Detailed Description

+

Include <glm/gtx/vector_query.hpp> to use the features of this extension.

+

Query informations of vector types

+

Function Documentation

+ +

◆ areCollinear()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL bool glm::areCollinear (vec< L, T, Q > const & v0,
vec< L, T, Q > const & v1,
T const & epsilon 
)
+
+ +

Check whether two vectors are collinears.

+
See also
GLM_GTX_vector_query extensions.
+ +
+
+ +

◆ areOrthogonal()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL bool glm::areOrthogonal (vec< L, T, Q > const & v0,
vec< L, T, Q > const & v1,
T const & epsilon 
)
+
+ +

Check whether two vectors are orthogonals.

+
See also
GLM_GTX_vector_query extensions.
+ +
+
+ +

◆ areOrthonormal()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL bool glm::areOrthonormal (vec< L, T, Q > const & v0,
vec< L, T, Q > const & v1,
T const & epsilon 
)
+
+ +

Check whether two vectors are orthonormal.

+
See also
GLM_GTX_vector_query extensions.
+ +
+
+ +

◆ isCompNull()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, bool, Q> glm::isCompNull (vec< L, T, Q > const & v,
T const & epsilon 
)
+
+ +

Check whether a each component of a vector is null.

+
See also
GLM_GTX_vector_query extensions.
+ +
+
+ +

◆ isNormalized()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL bool glm::isNormalized (vec< L, T, Q > const & v,
T const & epsilon 
)
+
+ +

Check whether a vector is normalized.

+
See also
GLM_GTX_vector_query extensions.
+ +
+
+ +

◆ isNull()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL bool glm::isNull (vec< L, T, Q > const & v,
T const & epsilon 
)
+
+ +

Check whether a vector is null.

+
See also
GLM_GTX_vector_query extensions.
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00786.html b/common/glm/doc/api/a00786.html new file mode 100644 index 000000000..0ca5b5efa --- /dev/null +++ b/common/glm/doc/api/a00786.html @@ -0,0 +1,183 @@ + + + + + + + +0.9.9 API documenation: GLM_GTX_wrap + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ + +
+
+ + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType clamp (genType const &Texcoord)
 
template<typename genType >
GLM_FUNC_DECL genType mirrorClamp (genType const &Texcoord)
 
template<typename genType >
GLM_FUNC_DECL genType mirrorRepeat (genType const &Texcoord)
 
template<typename genType >
GLM_FUNC_DECL genType repeat (genType const &Texcoord)
 
+

Detailed Description

+

Include <glm/gtx/wrap.hpp> to use the features of this extension.

+

Wrapping mode of texture coordinates.

+

Function Documentation

+ +

◆ clamp()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::clamp (genType const & Texcoord)
+
+ +

Simulate GL_CLAMP OpenGL wrap mode.

+
See also
GLM_GTX_wrap extension.
+ +
+
+ +

◆ mirrorClamp()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::mirrorClamp (genType const & Texcoord)
+
+ +

Simulate GL_MIRRORED_REPEAT OpenGL wrap mode.

+
See also
GLM_GTX_wrap extension.
+ +
+
+ +

◆ mirrorRepeat()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::mirrorRepeat (genType const & Texcoord)
+
+ +

Simulate GL_MIRROR_REPEAT OpenGL wrap mode.

+
See also
GLM_GTX_wrap extension.
+ +
+
+ +

◆ repeat()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL genType glm::repeat (genType const & Texcoord)
+
+ +

Simulate GL_REPEAT OpenGL wrap mode.

+
See also
GLM_GTX_wrap extension.
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00787.html b/common/glm/doc/api/a00787.html new file mode 100644 index 000000000..13727c10b --- /dev/null +++ b/common/glm/doc/api/a00787.html @@ -0,0 +1,636 @@ + + + + + + + +0.9.9 API documenation: Integer functions + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
Integer functions
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL int bitCount (genType v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, int, Q > bitCount (vec< L, T, Q > const &v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > bitfieldExtract (vec< L, T, Q > const &Value, int Offset, int Bits)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > bitfieldInsert (vec< L, T, Q > const &Base, vec< L, T, Q > const &Insert, int Offset, int Bits)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > bitfieldReverse (vec< L, T, Q > const &v)
 
template<typename genIUType >
GLM_FUNC_DECL int findLSB (genIUType x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, int, Q > findLSB (vec< L, T, Q > const &v)
 
template<typename genIUType >
GLM_FUNC_DECL int findMSB (genIUType x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, int, Q > findMSB (vec< L, T, Q > const &v)
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL void imulExtended (vec< L, int, Q > const &x, vec< L, int, Q > const &y, vec< L, int, Q > &msb, vec< L, int, Q > &lsb)
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL vec< L, uint, Q > uaddCarry (vec< L, uint, Q > const &x, vec< L, uint, Q > const &y, vec< L, uint, Q > &carry)
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL void umulExtended (vec< L, uint, Q > const &x, vec< L, uint, Q > const &y, vec< L, uint, Q > &msb, vec< L, uint, Q > &lsb)
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL vec< L, uint, Q > usubBorrow (vec< L, uint, Q > const &x, vec< L, uint, Q > const &y, vec< L, uint, Q > &borrow)
 
+

Detailed Description

+

Provides GLSL functions on integer types.

+

These all operate component-wise. The description is per component. The notation [a, b] means the set of bits from bit-number a through bit-number b, inclusive. The lowest-order bit is bit 0.

+

Include <glm/integer.hpp> to use these core features.

+

Function Documentation

+ +

◆ bitCount() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL int glm::bitCount (genType v)
+
+ +

Returns the number of bits set to 1 in the binary representation of value.

+
Template Parameters
+ + +
genTypeSigned or unsigned integer scalar or vector types.
+
+
+
See also
GLSL bitCount man page
+
+GLSL 4.20.8 specification, section 8.8 Integer Functions
+ +
+
+ +

◆ bitCount() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, int, Q> glm::bitCount (vec< L, T, Q > const & v)
+
+ +

Returns the number of bits set to 1 in the binary representation of value.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TSigned or unsigned integer scalar or vector types.
+
+
+
See also
GLSL bitCount man page
+
+GLSL 4.20.8 specification, section 8.8 Integer Functions
+ +
+
+ +

◆ bitfieldExtract()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::bitfieldExtract (vec< L, T, Q > const & Value,
int Offset,
int Bits 
)
+
+ +

Extracts bits [offset, offset + bits - 1] from value, returning them in the least significant bits of the result.

+

For unsigned data types, the most significant bits of the result will be set to zero. For signed data types, the most significant bits will be set to the value of bit offset + base - 1.

+

If bits is zero, the result will be zero. The result will be undefined if offset or bits is negative, or if the sum of offset and bits is greater than the number of bits used to store the operand.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TSigned or unsigned integer scalar types.
+
+
+
See also
GLSL bitfieldExtract man page
+
+GLSL 4.20.8 specification, section 8.8 Integer Functions
+ +
+
+ +

◆ bitfieldInsert()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::bitfieldInsert (vec< L, T, Q > const & Base,
vec< L, T, Q > const & Insert,
int Offset,
int Bits 
)
+
+ +

Returns the insertion the bits least-significant bits of insert into base.

+

The result will have bits [offset, offset + bits - 1] taken from bits [0, bits - 1] of insert, and all other bits taken directly from the corresponding bits of base. If bits is zero, the result will simply be base. The result will be undefined if offset or bits is negative, or if the sum of offset and bits is greater than the number of bits used to store the operand.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TSigned or unsigned integer scalar or vector types.
+
+
+
See also
GLSL bitfieldInsert man page
+
+GLSL 4.20.8 specification, section 8.8 Integer Functions
+ +
+
+ +

◆ bitfieldReverse()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::bitfieldReverse (vec< L, T, Q > const & v)
+
+ +

Returns the reversal of the bits of value.

+

The bit numbered n of the result will be taken from bit (bits - 1) - n of value, where bits is the total number of bits used to represent value.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TSigned or unsigned integer scalar or vector types.
+
+
+
See also
GLSL bitfieldReverse man page
+
+GLSL 4.20.8 specification, section 8.8 Integer Functions
+ +
+
+ +

◆ findLSB() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL int glm::findLSB (genIUType x)
+
+ +

Returns the bit number of the least significant bit set to 1 in the binary representation of value.

+

If value is zero, -1 will be returned.

+
Template Parameters
+ + +
genIUTypeSigned or unsigned integer scalar types.
+
+
+
See also
GLSL findLSB man page
+
+GLSL 4.20.8 specification, section 8.8 Integer Functions
+ +
+
+ +

◆ findLSB() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, int, Q> glm::findLSB (vec< L, T, Q > const & v)
+
+ +

Returns the bit number of the least significant bit set to 1 in the binary representation of value.

+

If value is zero, -1 will be returned.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TSigned or unsigned integer scalar types.
+
+
+
See also
GLSL findLSB man page
+
+GLSL 4.20.8 specification, section 8.8 Integer Functions
+ +
+
+ +

◆ findMSB() [1/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL int glm::findMSB (genIUType x)
+
+ +

Returns the bit number of the most significant bit in the binary representation of value.

+

For positive integers, the result will be the bit number of the most significant bit set to 1. For negative integers, the result will be the bit number of the most significant bit set to 0. For a value of zero or negative one, -1 will be returned.

+
Template Parameters
+ + +
genIUTypeSigned or unsigned integer scalar types.
+
+
+
See also
GLSL findMSB man page
+
+GLSL 4.20.8 specification, section 8.8 Integer Functions
+ +
+
+ +

◆ findMSB() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, int, Q> glm::findMSB (vec< L, T, Q > const & v)
+
+ +

Returns the bit number of the most significant bit in the binary representation of value.

+

For positive integers, the result will be the bit number of the most significant bit set to 1. For negative integers, the result will be the bit number of the most significant bit set to 0. For a value of zero or negative one, -1 will be returned.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TSigned or unsigned integer scalar types.
+
+
+
See also
GLSL findMSB man page
+
+GLSL 4.20.8 specification, section 8.8 Integer Functions
+ +
+
+ +

◆ imulExtended()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL void glm::imulExtended (vec< L, int, Q > const & x,
vec< L, int, Q > const & y,
vec< L, int, Q > & msb,
vec< L, int, Q > & lsb 
)
+
+ +

Multiplies 32-bit integers x and y, producing a 64-bit result.

+

The 32 least-significant bits are returned in lsb. The 32 most-significant bits are returned in msb.

+
Template Parameters
+ + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
+
+
+
See also
GLSL imulExtended man page
+
+GLSL 4.20.8 specification, section 8.8 Integer Functions
+ +
+
+ +

◆ uaddCarry()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, uint, Q> glm::uaddCarry (vec< L, uint, Q > const & x,
vec< L, uint, Q > const & y,
vec< L, uint, Q > & carry 
)
+
+ +

Adds 32-bit unsigned integer x and y, returning the sum modulo pow(2, 32).

+

The value carry is set to 0 if the sum was less than pow(2, 32), or to 1 otherwise.

+
Template Parameters
+ + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
+
+
+
See also
GLSL uaddCarry man page
+
+GLSL 4.20.8 specification, section 8.8 Integer Functions
+ +
+
+ +

◆ umulExtended()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL void glm::umulExtended (vec< L, uint, Q > const & x,
vec< L, uint, Q > const & y,
vec< L, uint, Q > & msb,
vec< L, uint, Q > & lsb 
)
+
+ +

Multiplies 32-bit integers x and y, producing a 64-bit result.

+

The 32 least-significant bits are returned in lsb. The 32 most-significant bits are returned in msb.

+
Template Parameters
+ + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
+
+
+
See also
GLSL umulExtended man page
+
+GLSL 4.20.8 specification, section 8.8 Integer Functions
+ +
+
+ +

◆ usubBorrow()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, uint, Q> glm::usubBorrow (vec< L, uint, Q > const & x,
vec< L, uint, Q > const & y,
vec< L, uint, Q > & borrow 
)
+
+ +

Subtracts the 32-bit unsigned integer y from x, returning the difference if non-negative, or pow(2, 32) plus the difference otherwise.

+

The value borrow is set to 0 if x >= y, or to 1 otherwise.

+
Template Parameters
+ + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
+
+
+
See also
GLSL usubBorrow man page
+
+GLSL 4.20.8 specification, section 8.8 Integer Functions
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00788.html b/common/glm/doc/api/a00788.html new file mode 100644 index 000000000..20edfce12 --- /dev/null +++ b/common/glm/doc/api/a00788.html @@ -0,0 +1,282 @@ + + + + + + + +0.9.9 API documenation: Matrix functions + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
Matrix functions
+
+
+ + + + + + + + + + + + + + + + + +

+Functions

template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL T determinant (mat< C, R, T, Q > const &m)
 
template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL mat< C, R, T, Q > inverse (mat< C, R, T, Q > const &m)
 
template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL mat< C, R, T, Q > matrixCompMult (mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y)
 
template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL detail::outerProduct_trait< C, R, T, Q >::type outerProduct (vec< C, T, Q > const &c, vec< R, T, Q > const &r)
 
template<length_t C, length_t R, typename T , qualifier Q>
GLM_FUNC_DECL mat< C, R, T, Q >::transpose_type transpose (mat< C, R, T, Q > const &x)
 
+

Detailed Description

+

Provides GLSL matrix functions.

+

Include <glm/matrix.hpp> to use these core features.

+

Function Documentation

+ +

◆ determinant()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL T glm::determinant (mat< C, R, T, Q > const & m)
+
+ +

Return the determinant of a squared matrix.

+
Template Parameters
+ + + + + +
CInteger between 1 and 4 included that qualify the number a column
RInteger between 1 and 4 included that qualify the number a row
TFloating-point or signed integer scalar types
QValue from qualifier enum
+
+
+
See also
GLSL determinant man page
+
+GLSL 4.20.8 specification, section 8.6 Matrix Functions
+ +
+
+ +

◆ inverse()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<C, R, T, Q> glm::inverse (mat< C, R, T, Q > const & m)
+
+ +

Return the inverse of a squared matrix.

+
Template Parameters
+ + + + + +
CInteger between 1 and 4 included that qualify the number a column
RInteger between 1 and 4 included that qualify the number a row
TFloating-point or signed integer scalar types
QValue from qualifier enum
+
+
+
See also
GLSL inverse man page
+
+GLSL 4.20.8 specification, section 8.6 Matrix Functions
+ +
+
+ +

◆ matrixCompMult()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL mat<C, R, T, Q> glm::matrixCompMult (mat< C, R, T, Q > const & x,
mat< C, R, T, Q > const & y 
)
+
+ +

Multiply matrix x by matrix y component-wise, i.e., result[i][j] is the scalar product of x[i][j] and y[i][j].

+
Template Parameters
+ + + + + +
CInteger between 1 and 4 included that qualify the number a column
RInteger between 1 and 4 included that qualify the number a row
TFloating-point or signed integer scalar types
QValue from qualifier enum
+
+
+
See also
GLSL matrixCompMult man page
+
+GLSL 4.20.8 specification, section 8.6 Matrix Functions
+ +
+
+ +

◆ outerProduct()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL detail::outerProduct_trait<C, R, T, Q>::type glm::outerProduct (vec< C, T, Q > const & c,
vec< R, T, Q > const & r 
)
+
+ +

Treats the first parameter c as a column vector and the second parameter r as a row vector and does a linear algebraic matrix multiply c * r.

+
Template Parameters
+ + + + + +
CInteger between 1 and 4 included that qualify the number a column
RInteger between 1 and 4 included that qualify the number a row
TFloating-point or signed integer scalar types
QValue from qualifier enum
+
+
+
See also
GLSL outerProduct man page
+
+GLSL 4.20.8 specification, section 8.6 Matrix Functions
+ +
+
+ +

◆ transpose()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL mat<C, R, T, Q>::transpose_type glm::transpose (mat< C, R, T, Q > const & x)
+
+ +

Returns the transposed matrix of x.

+
Template Parameters
+ + + + + +
CInteger between 1 and 4 included that qualify the number a column
RInteger between 1 and 4 included that qualify the number a row
TFloating-point or signed integer scalar types
QValue from qualifier enum
+
+
+
See also
GLSL transpose man page
+
+GLSL 4.20.8 specification, section 8.6 Matrix Functions
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00789.html b/common/glm/doc/api/a00789.html new file mode 100644 index 000000000..f8d99acae --- /dev/null +++ b/common/glm/doc/api/a00789.html @@ -0,0 +1,416 @@ + + + + + + + +0.9.9 API documenation: Floating-Point Pack and Unpack Functions + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
Floating-Point Pack and Unpack Functions
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

GLM_FUNC_DECL double packDouble2x32 (uvec2 const &v)
 
GLM_FUNC_DECL uint packHalf2x16 (vec2 const &v)
 
GLM_FUNC_DECL uint packSnorm2x16 (vec2 const &v)
 
GLM_FUNC_DECL uint packSnorm4x8 (vec4 const &v)
 
GLM_FUNC_DECL uint packUnorm2x16 (vec2 const &v)
 
GLM_FUNC_DECL uint packUnorm4x8 (vec4 const &v)
 
GLM_FUNC_DECL uvec2 unpackDouble2x32 (double v)
 
GLM_FUNC_DECL vec2 unpackHalf2x16 (uint v)
 
GLM_FUNC_DECL vec2 unpackSnorm2x16 (uint p)
 
GLM_FUNC_DECL vec4 unpackSnorm4x8 (uint p)
 
GLM_FUNC_DECL vec2 unpackUnorm2x16 (uint p)
 
GLM_FUNC_DECL vec4 unpackUnorm4x8 (uint p)
 
+

Detailed Description

+

Provides GLSL functions to pack and unpack half, single and double-precision floating point values into more compact integer types.

+

These functions do not operate component-wise, rather as described in each case.

+

Include <glm/packing.hpp> to use these core features.

+

Function Documentation

+ +

◆ packDouble2x32()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL double glm::packDouble2x32 (uvec2 const & v)
+
+ +

Returns a double-qualifier value obtained by packing the components of v into a 64-bit value.

+

If an IEEE 754 Inf or NaN is created, it will not signal, and the resulting floating point value is unspecified. Otherwise, the bit- level representation of v is preserved. The first vector component specifies the 32 least significant bits; the second component specifies the 32 most significant bits.

+
See also
GLSL packDouble2x32 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ packHalf2x16()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint glm::packHalf2x16 (vec2 const & v)
+
+ +

Returns an unsigned integer obtained by converting the components of a two-component floating-point vector to the 16-bit floating-point representation found in the OpenGL Specification, and then packing these two 16- bit integers into a 32-bit unsigned integer.

+

The first vector component specifies the 16 least-significant bits of the result; the second component specifies the 16 most-significant bits.

+
See also
GLSL packHalf2x16 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ packSnorm2x16()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint glm::packSnorm2x16 (vec2 const & v)
+
+ +

First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values.

+

Then, the results are packed into the returned 32-bit unsigned integer.

+

The conversion for component c of v to fixed point is done as follows: packSnorm2x16: round(clamp(v, -1, +1) * 32767.0)

+

The first component of the vector will be written to the least significant bits of the output; the last component will be written to the most significant bits.

+
See also
GLSL packSnorm2x16 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ packSnorm4x8()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint glm::packSnorm4x8 (vec4 const & v)
+
+ +

First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values.

+

Then, the results are packed into the returned 32-bit unsigned integer.

+

The conversion for component c of v to fixed point is done as follows: packSnorm4x8: round(clamp(c, -1, +1) * 127.0)

+

The first component of the vector will be written to the least significant bits of the output; the last component will be written to the most significant bits.

+
See also
GLSL packSnorm4x8 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ packUnorm2x16()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint glm::packUnorm2x16 (vec2 const & v)
+
+ +

First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values.

+

Then, the results are packed into the returned 32-bit unsigned integer.

+

The conversion for component c of v to fixed point is done as follows: packUnorm2x16: round(clamp(c, 0, +1) * 65535.0)

+

The first component of the vector will be written to the least significant bits of the output; the last component will be written to the most significant bits.

+
See also
GLSL packUnorm2x16 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ packUnorm4x8()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uint glm::packUnorm4x8 (vec4 const & v)
+
+ +

First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values.

+

Then, the results are packed into the returned 32-bit unsigned integer.

+

The conversion for component c of v to fixed point is done as follows: packUnorm4x8: round(clamp(c, 0, +1) * 255.0)

+

The first component of the vector will be written to the least significant bits of the output; the last component will be written to the most significant bits.

+
See also
GLSL packUnorm4x8 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ unpackDouble2x32()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL uvec2 glm::unpackDouble2x32 (double v)
+
+ +

Returns a two-component unsigned integer vector representation of v.

+

The bit-level representation of v is preserved. The first component of the vector contains the 32 least significant bits of the double; the second component consists the 32 most significant bits.

+
See also
GLSL unpackDouble2x32 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ unpackHalf2x16()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec2 glm::unpackHalf2x16 (uint v)
+
+ +

Returns a two-component floating-point vector with components obtained by unpacking a 32-bit unsigned integer into a pair of 16-bit values, interpreting those values as 16-bit floating-point numbers according to the OpenGL Specification, and converting them to 32-bit floating-point values.

+

The first component of the vector is obtained from the 16 least-significant bits of v; the second component is obtained from the 16 most-significant bits of v.

+
See also
GLSL unpackHalf2x16 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ unpackSnorm2x16()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec2 glm::unpackSnorm2x16 (uint p)
+
+ +

First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.

+

Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.

+

The conversion for unpacked fixed-point value f to floating point is done as follows: unpackSnorm2x16: clamp(f / 32767.0, -1, +1)

+

The first component of the returned vector will be extracted from the least significant bits of the input; the last component will be extracted from the most significant bits.

+
See also
GLSL unpackSnorm2x16 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ unpackSnorm4x8()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec4 glm::unpackSnorm4x8 (uint p)
+
+ +

First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.

+

Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.

+

The conversion for unpacked fixed-point value f to floating point is done as follows: unpackSnorm4x8: clamp(f / 127.0, -1, +1)

+

The first component of the returned vector will be extracted from the least significant bits of the input; the last component will be extracted from the most significant bits.

+
See also
GLSL unpackSnorm4x8 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ unpackUnorm2x16()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec2 glm::unpackUnorm2x16 (uint p)
+
+ +

First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.

+

Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.

+

The conversion for unpacked fixed-point value f to floating point is done as follows: unpackUnorm2x16: f / 65535.0

+

The first component of the returned vector will be extracted from the least significant bits of the input; the last component will be extracted from the most significant bits.

+
See also
GLSL unpackUnorm2x16 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+ +

◆ unpackUnorm4x8()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec4 glm::unpackUnorm4x8 (uint p)
+
+ +

First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.

+

Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.

+

The conversion for unpacked fixed-point value f to floating point is done as follows: unpackUnorm4x8: f / 255.0

+

The first component of the returned vector will be extracted from the least significant bits of the input; the last component will be extracted from the most significant bits.

+
See also
GLSL unpackUnorm4x8 man page
+
+GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00790.html b/common/glm/doc/api/a00790.html new file mode 100644 index 000000000..e95dd033e --- /dev/null +++ b/common/glm/doc/api/a00790.html @@ -0,0 +1,620 @@ + + + + + + + +0.9.9 API documenation: Angle and Trigonometry Functions + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
Angle and Trigonometry Functions
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > acos (vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > acosh (vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > asin (vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > asinh (vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > atan (vec< L, T, Q > const &y, vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > atan (vec< L, T, Q > const &y_over_x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > atanh (vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > cos (vec< L, T, Q > const &angle)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > cosh (vec< L, T, Q > const &angle)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > degrees (vec< L, T, Q > const &radians)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > radians (vec< L, T, Q > const &degrees)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > sin (vec< L, T, Q > const &angle)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > sinh (vec< L, T, Q > const &angle)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > tan (vec< L, T, Q > const &angle)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > tanh (vec< L, T, Q > const &angle)
 
+

Detailed Description

+

Function parameters specified as angle are assumed to be in units of radians.

+

In no case will any of these functions result in a divide by zero error. If the divisor of a ratio is 0, then results will be undefined.

+

These all operate component-wise. The description is per component.

+

Include <glm/trigonometric.hpp> to use these core features.

+
See also
ext_vector_trigonometric
+

Function Documentation

+ +

◆ acos()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::acos (vec< L, T, Q > const & x)
+
+ +

Arc cosine.

+

Returns an angle whose sine is x. The range of values returned by this function is [0, PI]. Results are undefined if |x| > 1.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL acos man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+ +

◆ acosh()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::acosh (vec< L, T, Q > const & x)
+
+ +

Arc hyperbolic cosine; returns the non-negative inverse of cosh.

+

Results are undefined if x < 1.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL acosh man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+ +

◆ asin()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::asin (vec< L, T, Q > const & x)
+
+ +

Arc sine.

+

Returns an angle whose sine is x. The range of values returned by this function is [-PI/2, PI/2]. Results are undefined if |x| > 1.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL asin man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+ +

◆ asinh()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::asinh (vec< L, T, Q > const & x)
+
+ +

Arc hyperbolic sine; returns the inverse of sinh.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL asinh man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+ +

◆ atan() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::atan (vec< L, T, Q > const & y,
vec< L, T, Q > const & x 
)
+
+ +

Arc tangent.

+

Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL atan man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +

Referenced by glm::atan2().

+ +
+
+ +

◆ atan() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::atan (vec< L, T, Q > const & y_over_x)
+
+ +

Arc tangent.

+

Returns an angle whose tangent is y_over_x. The range of values returned by this function is [-PI/2, PI/2].

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL atan man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+ +

◆ atanh()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::atanh (vec< L, T, Q > const & x)
+
+ +

Arc hyperbolic tangent; returns the inverse of tanh.

+

Results are undefined if abs(x) >= 1.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL atanh man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+ +

◆ cos()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::cos (vec< L, T, Q > const & angle)
+
+ +

The standard trigonometric cosine function.

+

The values returned by this function will range from [-1, 1].

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL cos man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+ +

◆ cosh()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::cosh (vec< L, T, Q > const & angle)
+
+ +

Returns the hyperbolic cosine function, (exp(x) + exp(-x)) / 2.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL cosh man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+ +

◆ degrees()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> glm::degrees (vec< L, T, Q > const & radians)
+
+ +

Converts radians to degrees and returns the result.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL degrees man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+ +

◆ radians()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> glm::radians (vec< L, T, Q > const & degrees)
+
+ +

Converts degrees to radians and returns the result.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL radians man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+ +

◆ sin()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::sin (vec< L, T, Q > const & angle)
+
+ +

The standard trigonometric sine function.

+

The values returned by this function will range from [-1, 1].

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL sin man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+ +

◆ sinh()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::sinh (vec< L, T, Q > const & angle)
+
+ +

Returns the hyperbolic sine function, (exp(x) - exp(-x)) / 2.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL sinh man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+ +

◆ tan()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::tan (vec< L, T, Q > const & angle)
+
+ +

The standard trigonometric tangent function.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL tan man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+ +

◆ tanh()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::tanh (vec< L, T, Q > const & angle)
+
+ +

Returns the hyperbolic tangent function, sinh(angle) / cosh(angle)

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL tanh man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00791.html b/common/glm/doc/api/a00791.html new file mode 100644 index 000000000..174646d02 --- /dev/null +++ b/common/glm/doc/api/a00791.html @@ -0,0 +1,445 @@ + + + + + + + +0.9.9 API documenation: Vector Relational Functions + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
Vector Relational Functions
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<length_t L, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR bool all (vec< L, bool, Q > const &v)
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR bool any (vec< L, bool, Q > const &v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > greaterThan (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > greaterThanEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > lessThan (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > lessThanEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > not_ (vec< L, bool, Q > const &v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 
+

Detailed Description

+

Relational and equality operators (<, <=, >, >=, ==, !=) are defined to operate on scalars and produce scalar Boolean results.

+

For vector results, use the following built-in functions.

+

In all cases, the sizes of all the input and return vectors for any particular call must match.

+

Include <glm/vector_relational.hpp> to use these core features.

+
See also
GLM_EXT_vector_relational
+

Function Documentation

+ +

◆ all()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR bool glm::all (vec< L, bool, Q > const & v)
+
+ +

Returns true if all components of x are true.

+
Template Parameters
+ + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
+
+
+
See also
GLSL all man page
+
+GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
+ +
+
+ +

◆ any()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR bool glm::any (vec< L, bool, Q > const & v)
+
+ +

Returns true if any component of x is true.

+
Template Parameters
+ + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
+
+
+
See also
GLSL any man page
+
+GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
+ +
+
+ +

◆ equal()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> glm::equal (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Returns the component-wise comparison of result x == y.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TA floating-point, integer or bool scalar type.
+
+
+
See also
GLSL equal man page
+
+GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
+ +
+
+ +

◆ greaterThan()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> glm::greaterThan (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Returns the component-wise comparison of result x > y.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TA floating-point or integer scalar type.
+
+
+
See also
GLSL greaterThan man page
+
+GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
+ +
+
+ +

◆ greaterThanEqual()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> glm::greaterThanEqual (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Returns the component-wise comparison of result x >= y.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TA floating-point or integer scalar type.
+
+
+
See also
GLSL greaterThanEqual man page
+
+GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
+ +
+
+ +

◆ lessThan()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> glm::lessThan (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Returns the component-wise comparison result of x < y.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TA floating-point or integer scalar type.
+
+
+
See also
GLSL lessThan man page
+
+GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
+ +
+
+ +

◆ lessThanEqual()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> glm::lessThanEqual (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Returns the component-wise comparison of result x <= y.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TA floating-point or integer scalar type.
+
+
+
See also
GLSL lessThanEqual man page
+
+GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
+ +
+
+ +

◆ not_()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> glm::not_ (vec< L, bool, Q > const & v)
+
+ +

Returns the component-wise logical complement of x.

+

/!\ Because of language incompatibilities between C++ and GLSL, GLM defines the function not but not_ instead.

+
Template Parameters
+ + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
+
+
+
See also
GLSL not man page
+
+GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
+ +
+
+ +

◆ notEqual()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> glm::notEqual (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Returns the component-wise comparison of result x != y.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TA floating-point, integer or bool scalar type.
+
+
+
See also
GLSL notEqual man page
+
+GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00792.html b/common/glm/doc/api/a00792.html new file mode 100644 index 000000000..a908c8f07 --- /dev/null +++ b/common/glm/doc/api/a00792.html @@ -0,0 +1,1741 @@ + + + + + + + +0.9.9 API documenation: Core_precision + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
Core_precision
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Typedefs

typedef mat< 2, 2, double, highp > highp_dmat2
 
typedef mat< 2, 2, double, highp > highp_dmat2x2
 
typedef mat< 2, 3, double, highp > highp_dmat2x3
 
typedef mat< 2, 4, double, highp > highp_dmat2x4
 
typedef mat< 3, 3, double, highp > highp_dmat3
 
typedef mat< 3, 2, double, highp > highp_dmat3x2
 
typedef mat< 3, 3, double, highp > highp_dmat3x3
 
typedef mat< 3, 4, double, highp > highp_dmat3x4
 
typedef mat< 4, 4, double, highp > highp_dmat4
 
typedef mat< 4, 2, double, highp > highp_dmat4x2
 
typedef mat< 4, 3, double, highp > highp_dmat4x3
 
typedef mat< 4, 4, double, highp > highp_dmat4x4
 
typedef mat< 2, 2, float, highp > highp_mat2
 
typedef mat< 2, 2, float, highp > highp_mat2x2
 
typedef mat< 2, 3, float, highp > highp_mat2x3
 
typedef mat< 2, 4, float, highp > highp_mat2x4
 
typedef mat< 3, 3, float, highp > highp_mat3
 
typedef mat< 3, 2, float, highp > highp_mat3x2
 
typedef mat< 3, 3, float, highp > highp_mat3x3
 
typedef mat< 3, 4, float, highp > highp_mat3x4
 
typedef mat< 4, 4, float, highp > highp_mat4
 
typedef mat< 4, 2, float, highp > highp_mat4x2
 
typedef mat< 4, 3, float, highp > highp_mat4x3
 
typedef mat< 4, 4, float, highp > highp_mat4x4
 
typedef mat< 2, 2, double, lowp > lowp_dmat2
 
typedef mat< 2, 2, double, lowp > lowp_dmat2x2
 
typedef mat< 2, 3, double, lowp > lowp_dmat2x3
 
typedef mat< 2, 4, double, lowp > lowp_dmat2x4
 
typedef mat< 3, 3, double, lowp > lowp_dmat3
 
typedef mat< 3, 2, double, lowp > lowp_dmat3x2
 
typedef mat< 3, 3, double, lowp > lowp_dmat3x3
 
typedef mat< 3, 4, double, lowp > lowp_dmat3x4
 
typedef mat< 4, 4, double, lowp > lowp_dmat4
 
typedef mat< 4, 2, double, lowp > lowp_dmat4x2
 
typedef mat< 4, 3, double, lowp > lowp_dmat4x3
 
typedef mat< 4, 4, double, lowp > lowp_dmat4x4
 
typedef mat< 2, 2, float, lowp > lowp_mat2
 
typedef mat< 2, 2, float, lowp > lowp_mat2x2
 
typedef mat< 2, 3, float, lowp > lowp_mat2x3
 
typedef mat< 2, 4, float, lowp > lowp_mat2x4
 
typedef mat< 3, 3, float, lowp > lowp_mat3
 
typedef mat< 3, 2, float, lowp > lowp_mat3x2
 
typedef mat< 3, 3, float, lowp > lowp_mat3x3
 
typedef mat< 3, 4, float, lowp > lowp_mat3x4
 
typedef mat< 4, 4, float, lowp > lowp_mat4
 
typedef mat< 4, 2, float, lowp > lowp_mat4x2
 
typedef mat< 4, 3, float, lowp > lowp_mat4x3
 
typedef mat< 4, 4, float, lowp > lowp_mat4x4
 
typedef mat< 2, 2, double, mediump > mediump_dmat2
 
typedef mat< 2, 2, double, mediump > mediump_dmat2x2
 
typedef mat< 2, 3, double, mediump > mediump_dmat2x3
 
typedef mat< 2, 4, double, mediump > mediump_dmat2x4
 
typedef mat< 3, 3, double, mediump > mediump_dmat3
 
typedef mat< 3, 2, double, mediump > mediump_dmat3x2
 
typedef mat< 3, 3, double, mediump > mediump_dmat3x3
 
typedef mat< 3, 4, double, mediump > mediump_dmat3x4
 
typedef mat< 4, 4, double, mediump > mediump_dmat4
 
typedef mat< 4, 2, double, mediump > mediump_dmat4x2
 
typedef mat< 4, 3, double, mediump > mediump_dmat4x3
 
typedef mat< 4, 4, double, mediump > mediump_dmat4x4
 
typedef mat< 2, 2, float, mediump > mediump_mat2
 
typedef mat< 2, 2, float, mediump > mediump_mat2x2
 
typedef mat< 2, 3, float, mediump > mediump_mat2x3
 
typedef mat< 2, 4, float, mediump > mediump_mat2x4
 
typedef mat< 3, 3, float, mediump > mediump_mat3
 
typedef mat< 3, 2, float, mediump > mediump_mat3x2
 
typedef mat< 3, 3, float, mediump > mediump_mat3x3
 
typedef mat< 3, 4, float, mediump > mediump_mat3x4
 
typedef mat< 4, 4, float, mediump > mediump_mat4
 
typedef mat< 4, 2, float, mediump > mediump_mat4x2
 
typedef mat< 4, 3, float, mediump > mediump_mat4x3
 
typedef mat< 4, 4, float, mediump > mediump_mat4x4
 
+

Detailed Description

+

Typedef Documentation

+ +

◆ highp_dmat2

+ +
+
+ + + + +
typedef mat< 2, 2, f64, highp > highp_dmat2
+
+ +

2 columns of 2 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_double2x2_precision.hpp.

+ +
+
+ +

◆ highp_dmat2x2

+ +
+
+ + + + +
typedef mat< 2, 2, double, highp > highp_dmat2x2
+
+ +

2 columns of 2 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 46 of file matrix_double2x2_precision.hpp.

+ +
+
+ +

◆ highp_dmat2x3

+ +
+
+ + + + +
typedef mat< 2, 3, double, highp > highp_dmat2x3
+
+ +

2 columns of 3 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_double2x3_precision.hpp.

+ +
+
+ +

◆ highp_dmat2x4

+ +
+
+ + + + +
typedef mat< 2, 4, double, highp > highp_dmat2x4
+
+ +

2 columns of 4 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_double2x4_precision.hpp.

+ +
+
+ +

◆ highp_dmat3

+ +
+
+ + + + +
typedef mat< 3, 3, f64, highp > highp_dmat3
+
+ +

3 columns of 3 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_double3x3_precision.hpp.

+ +
+
+ +

◆ highp_dmat3x2

+ +
+
+ + + + +
typedef mat< 3, 2, double, highp > highp_dmat3x2
+
+ +

3 columns of 2 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_double3x2_precision.hpp.

+ +
+
+ +

◆ highp_dmat3x3

+ +
+
+ + + + +
typedef mat< 3, 3, double, highp > highp_dmat3x3
+
+ +

3 columns of 3 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 46 of file matrix_double3x3_precision.hpp.

+ +
+
+ +

◆ highp_dmat3x4

+ +
+
+ + + + +
typedef mat< 3, 4, double, highp > highp_dmat3x4
+
+ +

3 columns of 4 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_double3x4_precision.hpp.

+ +
+
+ +

◆ highp_dmat4

+ +
+
+ + + + +
typedef mat< 4, 4, f64, highp > highp_dmat4
+
+ +

4 columns of 4 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_double4x4_precision.hpp.

+ +
+
+ +

◆ highp_dmat4x2

+ +
+
+ + + + +
typedef mat< 4, 2, double, highp > highp_dmat4x2
+
+ +

4 columns of 2 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_double4x2_precision.hpp.

+ +
+
+ +

◆ highp_dmat4x3

+ +
+
+ + + + +
typedef mat< 4, 3, double, highp > highp_dmat4x3
+
+ +

4 columns of 3 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_double4x3_precision.hpp.

+ +
+
+ +

◆ highp_dmat4x4

+ +
+
+ + + + +
typedef mat< 4, 4, double, highp > highp_dmat4x4
+
+ +

4 columns of 4 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 46 of file matrix_double4x4_precision.hpp.

+ +
+
+ +

◆ highp_mat2

+ +
+
+ + + + +
typedef mat< 2, 2, f32, highp > highp_mat2
+
+ +

2 columns of 2 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_float2x2_precision.hpp.

+ +
+
+ +

◆ highp_mat2x2

+ +
+
+ + + + +
typedef mat< 2, 2, f32, highp > highp_mat2x2
+
+ +

2 columns of 2 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 46 of file matrix_float2x2_precision.hpp.

+ +
+
+ +

◆ highp_mat2x3

+ +
+
+ + + + +
typedef mat< 2, 3, f32, highp > highp_mat2x3
+
+ +

2 columns of 3 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_float2x3_precision.hpp.

+ +
+
+ +

◆ highp_mat2x4

+ +
+
+ + + + +
typedef mat< 2, 4, f32, highp > highp_mat2x4
+
+ +

2 columns of 4 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_float2x4_precision.hpp.

+ +
+
+ +

◆ highp_mat3

+ +
+
+ + + + +
typedef mat< 3, 3, f32, highp > highp_mat3
+
+ +

3 columns of 3 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_float3x3_precision.hpp.

+ +
+
+ +

◆ highp_mat3x2

+ +
+
+ + + + +
typedef mat< 3, 2, f32, highp > highp_mat3x2
+
+ +

3 columns of 2 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_float3x2_precision.hpp.

+ +
+
+ +

◆ highp_mat3x3

+ +
+
+ + + + +
typedef mat< 3, 3, f32, highp > highp_mat3x3
+
+ +

3 columns of 3 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 46 of file matrix_float3x3_precision.hpp.

+ +
+
+ +

◆ highp_mat3x4

+ +
+
+ + + + +
typedef mat< 3, 4, f32, highp > highp_mat3x4
+
+ +

3 columns of 4 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_float3x4_precision.hpp.

+ +
+
+ +

◆ highp_mat4

+ +
+
+ + + + +
typedef mat< 4, 4, f32, highp > highp_mat4
+
+ +

4 columns of 4 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_float4x4_precision.hpp.

+ +
+
+ +

◆ highp_mat4x2

+ +
+
+ + + + +
typedef mat< 4, 2, f32, highp > highp_mat4x2
+
+ +

4 columns of 2 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_float4x2_precision.hpp.

+ +
+
+ +

◆ highp_mat4x3

+ +
+
+ + + + +
typedef mat< 4, 3, f32, highp > highp_mat4x3
+
+ +

4 columns of 3 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 28 of file matrix_float4x3_precision.hpp.

+ +
+
+ +

◆ highp_mat4x4

+ +
+
+ + + + +
typedef mat< 4, 4, f32, highp > highp_mat4x4
+
+ +

4 columns of 4 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 46 of file matrix_float4x4_precision.hpp.

+ +
+
+ +

◆ lowp_dmat2

+ +
+
+ + + + +
typedef mat< 2, 2, f64, lowp > lowp_dmat2
+
+ +

2 columns of 2 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_double2x2_precision.hpp.

+ +
+
+ +

◆ lowp_dmat2x2

+ +
+
+ + + + +
typedef mat< 2, 2, double, lowp > lowp_dmat2x2
+
+ +

2 columns of 2 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 34 of file matrix_double2x2_precision.hpp.

+ +
+
+ +

◆ lowp_dmat2x3

+ +
+
+ + + + +
typedef mat< 2, 3, double, lowp > lowp_dmat2x3
+
+ +

2 columns of 3 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_double2x3_precision.hpp.

+ +
+
+ +

◆ lowp_dmat2x4

+ +
+
+ + + + +
typedef mat< 2, 4, double, lowp > lowp_dmat2x4
+
+ +

2 columns of 4 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_double2x4_precision.hpp.

+ +
+
+ +

◆ lowp_dmat3

+ +
+
+ + + + +
typedef mat< 3, 3, f64, lowp > lowp_dmat3
+
+ +

3 columns of 3 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_double3x3_precision.hpp.

+ +
+
+ +

◆ lowp_dmat3x2

+ +
+
+ + + + +
typedef mat< 3, 2, double, lowp > lowp_dmat3x2
+
+ +

3 columns of 2 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_double3x2_precision.hpp.

+ +
+
+ +

◆ lowp_dmat3x3

+ +
+
+ + + + +
typedef mat< 3, 3, double, lowp > lowp_dmat3x3
+
+ +

3 columns of 3 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 34 of file matrix_double3x3_precision.hpp.

+ +
+
+ +

◆ lowp_dmat3x4

+ +
+
+ + + + +
typedef mat< 3, 4, double, lowp > lowp_dmat3x4
+
+ +

3 columns of 4 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_double3x4_precision.hpp.

+ +
+
+ +

◆ lowp_dmat4

+ +
+
+ + + + +
typedef mat< 4, 4, f64, lowp > lowp_dmat4
+
+ +

4 columns of 4 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_double4x4_precision.hpp.

+ +
+
+ +

◆ lowp_dmat4x2

+ +
+
+ + + + +
typedef mat< 4, 2, double, lowp > lowp_dmat4x2
+
+ +

4 columns of 2 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_double4x2_precision.hpp.

+ +
+
+ +

◆ lowp_dmat4x3

+ +
+
+ + + + +
typedef mat< 4, 3, double, lowp > lowp_dmat4x3
+
+ +

4 columns of 3 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_double4x3_precision.hpp.

+ +
+
+ +

◆ lowp_dmat4x4

+ +
+
+ + + + +
typedef mat< 4, 4, double, lowp > lowp_dmat4x4
+
+ +

4 columns of 4 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 34 of file matrix_double4x4_precision.hpp.

+ +
+
+ +

◆ lowp_mat2

+ +
+
+ + + + +
typedef mat< 2, 2, f32, lowp > lowp_mat2
+
+ +

2 columns of 2 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_float2x2_precision.hpp.

+ +
+
+ +

◆ lowp_mat2x2

+ +
+
+ + + + +
typedef mat< 2, 2, f32, lowp > lowp_mat2x2
+
+ +

2 columns of 2 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 34 of file matrix_float2x2_precision.hpp.

+ +
+
+ +

◆ lowp_mat2x3

+ +
+
+ + + + +
typedef mat< 2, 3, f32, lowp > lowp_mat2x3
+
+ +

2 columns of 3 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_float2x3_precision.hpp.

+ +
+
+ +

◆ lowp_mat2x4

+ +
+
+ + + + +
typedef mat< 2, 4, f32, lowp > lowp_mat2x4
+
+ +

2 columns of 4 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_float2x4_precision.hpp.

+ +
+
+ +

◆ lowp_mat3

+ +
+
+ + + + +
typedef mat< 3, 3, f32, lowp > lowp_mat3
+
+ +

3 columns of 3 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_float3x3_precision.hpp.

+ +
+
+ +

◆ lowp_mat3x2

+ +
+
+ + + + +
typedef mat< 3, 2, f32, lowp > lowp_mat3x2
+
+ +

3 columns of 2 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_float3x2_precision.hpp.

+ +
+
+ +

◆ lowp_mat3x3

+ +
+
+ + + + +
typedef mat< 3, 3, f32, lowp > lowp_mat3x3
+
+ +

3 columns of 3 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 34 of file matrix_float3x3_precision.hpp.

+ +
+
+ +

◆ lowp_mat3x4

+ +
+
+ + + + +
typedef mat< 3, 4, f32, lowp > lowp_mat3x4
+
+ +

3 columns of 4 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_float3x4_precision.hpp.

+ +
+
+ +

◆ lowp_mat4

+ +
+
+ + + + +
typedef mat< 4, 4, f32, lowp > lowp_mat4
+
+ +

4 columns of 4 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_float4x4_precision.hpp.

+ +
+
+ +

◆ lowp_mat4x2

+ +
+
+ + + + +
typedef mat< 4, 2, f32, lowp > lowp_mat4x2
+
+ +

4 columns of 2 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_float4x2_precision.hpp.

+ +
+
+ +

◆ lowp_mat4x3

+ +
+
+ + + + +
typedef mat< 4, 3, f32, lowp > lowp_mat4x3
+
+ +

4 columns of 3 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 16 of file matrix_float4x3_precision.hpp.

+ +
+
+ +

◆ lowp_mat4x4

+ +
+
+ + + + +
typedef mat< 4, 4, f32, lowp > lowp_mat4x4
+
+ +

4 columns of 4 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 34 of file matrix_float4x4_precision.hpp.

+ +
+
+ +

◆ mediump_dmat2

+ +
+
+ + + + +
typedef mat< 2, 2, f64, mediump > mediump_dmat2
+
+ +

2 columns of 2 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_double2x2_precision.hpp.

+ +
+
+ +

◆ mediump_dmat2x2

+ +
+
+ + + + +
typedef mat< 2, 2, double, mediump > mediump_dmat2x2
+
+ +

2 columns of 2 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 40 of file matrix_double2x2_precision.hpp.

+ +
+
+ +

◆ mediump_dmat2x3

+ +
+
+ + + + +
typedef mat< 2, 3, double, mediump > mediump_dmat2x3
+
+ +

2 columns of 3 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_double2x3_precision.hpp.

+ +
+
+ +

◆ mediump_dmat2x4

+ +
+
+ + + + +
typedef mat< 2, 4, double, mediump > mediump_dmat2x4
+
+ +

2 columns of 4 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_double2x4_precision.hpp.

+ +
+
+ +

◆ mediump_dmat3

+ +
+
+ + + + +
typedef mat< 3, 3, f64, mediump > mediump_dmat3
+
+ +

3 columns of 3 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_double3x3_precision.hpp.

+ +
+
+ +

◆ mediump_dmat3x2

+ +
+
+ + + + +
typedef mat< 3, 2, double, mediump > mediump_dmat3x2
+
+ +

3 columns of 2 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_double3x2_precision.hpp.

+ +
+
+ +

◆ mediump_dmat3x3

+ +
+
+ + + + +
typedef mat< 3, 3, double, mediump > mediump_dmat3x3
+
+ +

3 columns of 3 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 40 of file matrix_double3x3_precision.hpp.

+ +
+
+ +

◆ mediump_dmat3x4

+ +
+
+ + + + +
typedef mat< 3, 4, double, mediump > mediump_dmat3x4
+
+ +

3 columns of 4 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_double3x4_precision.hpp.

+ +
+
+ +

◆ mediump_dmat4

+ +
+
+ + + + +
typedef mat< 4, 4, f64, mediump > mediump_dmat4
+
+ +

4 columns of 4 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_double4x4_precision.hpp.

+ +
+
+ +

◆ mediump_dmat4x2

+ +
+
+ + + + +
typedef mat< 4, 2, double, mediump > mediump_dmat4x2
+
+ +

4 columns of 2 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_double4x2_precision.hpp.

+ +
+
+ +

◆ mediump_dmat4x3

+ +
+
+ + + + +
typedef mat< 4, 3, double, mediump > mediump_dmat4x3
+
+ +

4 columns of 3 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_double4x3_precision.hpp.

+ +
+
+ +

◆ mediump_dmat4x4

+ +
+
+ + + + +
typedef mat< 4, 4, double, mediump > mediump_dmat4x4
+
+ +

4 columns of 4 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 40 of file matrix_double4x4_precision.hpp.

+ +
+
+ +

◆ mediump_mat2

+ +
+
+ + + + +
typedef mat< 2, 2, f32, mediump > mediump_mat2
+
+ +

2 columns of 2 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_float2x2_precision.hpp.

+ +
+
+ +

◆ mediump_mat2x2

+ +
+
+ + + + +
typedef mat< 2, 2, f32, mediump > mediump_mat2x2
+
+ +

2 columns of 2 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 40 of file matrix_float2x2_precision.hpp.

+ +
+
+ +

◆ mediump_mat2x3

+ +
+
+ + + + +
typedef mat< 2, 3, f32, mediump > mediump_mat2x3
+
+ +

2 columns of 3 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_float2x3_precision.hpp.

+ +
+
+ +

◆ mediump_mat2x4

+ +
+
+ + + + +
typedef mat< 2, 4, f32, mediump > mediump_mat2x4
+
+ +

2 columns of 4 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_float2x4_precision.hpp.

+ +
+
+ +

◆ mediump_mat3

+ +
+
+ + + + +
typedef mat< 3, 3, f32, mediump > mediump_mat3
+
+ +

3 columns of 3 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_float3x3_precision.hpp.

+ +
+
+ +

◆ mediump_mat3x2

+ +
+
+ + + + +
typedef mat< 3, 2, f32, mediump > mediump_mat3x2
+
+ +

3 columns of 2 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_float3x2_precision.hpp.

+ +
+
+ +

◆ mediump_mat3x3

+ +
+
+ + + + +
typedef mat< 3, 3, f32, mediump > mediump_mat3x3
+
+ +

3 columns of 3 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 40 of file matrix_float3x3_precision.hpp.

+ +
+
+ +

◆ mediump_mat3x4

+ +
+
+ + + + +
typedef mat< 3, 4, f32, mediump > mediump_mat3x4
+
+ +

3 columns of 4 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_float3x4_precision.hpp.

+ +
+
+ +

◆ mediump_mat4

+ +
+
+ + + + +
typedef mat< 4, 4, f32, mediump > mediump_mat4
+
+ +

4 columns of 4 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_float4x4_precision.hpp.

+ +
+
+ +

◆ mediump_mat4x2

+ +
+
+ + + + +
typedef mat< 4, 2, f32, mediump > mediump_mat4x2
+
+ +

4 columns of 2 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_float4x2_precision.hpp.

+ +
+
+ +

◆ mediump_mat4x3

+ +
+
+ + + + +
typedef mat< 4, 3, f32, mediump > mediump_mat4x3
+
+ +

4 columns of 3 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 22 of file matrix_float4x3_precision.hpp.

+ +
+
+ +

◆ mediump_mat4x4

+ +
+
+ + + + +
typedef mat< 4, 4, f32, mediump > mediump_mat4x4
+
+ +

4 columns of 4 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.

+
See also
GLSL 4.20.8 specification, section 4.1.6 Matrices
+
+GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier
+ +

Definition at line 40 of file matrix_float4x4_precision.hpp.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00793.html b/common/glm/doc/api/a00793.html new file mode 100644 index 000000000..e56063899 --- /dev/null +++ b/common/glm/doc/api/a00793.html @@ -0,0 +1,455 @@ + + + + + + + +0.9.9 API documenation: Vector Relational Functions + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
Vector Relational Functions
+
+
+ +

Include <glm/vector_relational.hpp> to use these core features. +More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<length_t L, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR bool all (vec< L, bool, Q > const &v)
 Returns true if all components of x are true. More...
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR bool any (vec< L, bool, Q > const &v)
 Returns true if any component of x is true. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 Returns the component-wise comparison of result x == y. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > greaterThan (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 Returns the component-wise comparison of result x > y. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > greaterThanEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 Returns the component-wise comparison of result x >= y. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > lessThan (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 Returns the component-wise comparison result of x < y. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > lessThanEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 Returns the component-wise comparison of result x <= y. More...
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > not_ (vec< L, bool, Q > const &v)
 Returns the component-wise logical complement of x. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 Returns the component-wise comparison of result x != y. More...
 
+

Detailed Description

+

Include <glm/vector_relational.hpp> to use these core features.

+

Relational and equality operators (<, <=, >, >=, ==, !=) are defined to operate on scalars and produce scalar Boolean results. For vector results, use the following built-in functions.

+

In all cases, the sizes of all the input and return vectors for any particular call must match.

+

Function Documentation

+ +

◆ all()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR bool glm::all (vec< L, bool, Q > const & v)
+
+ +

Returns true if all components of x are true.

+
Template Parameters
+ + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
+
+
+
See also
GLSL all man page
+
+GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
+ +
+
+ +

◆ any()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR bool glm::any (vec< L, bool, Q > const & v)
+
+ +

Returns true if any component of x is true.

+
Template Parameters
+ + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
+
+
+
See also
GLSL any man page
+
+GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
+ +
+
+ +

◆ equal()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> glm::equal (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Returns the component-wise comparison of result x == y.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TA floating-point, integer or bool scalar type.
+
+
+
See also
GLSL equal man page
+
+GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
+ +
+
+ +

◆ greaterThan()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> glm::greaterThan (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Returns the component-wise comparison of result x > y.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TA floating-point or integer scalar type.
+
+
+
See also
GLSL greaterThan man page
+
+GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
+ +
+
+ +

◆ greaterThanEqual()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> glm::greaterThanEqual (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Returns the component-wise comparison of result x >= y.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TA floating-point or integer scalar type.
+
+
+
See also
GLSL greaterThanEqual man page
+
+GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
+ +
+
+ +

◆ lessThan()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> glm::lessThan (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Returns the component-wise comparison result of x < y.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TA floating-point or integer scalar type.
+
+
+
See also
GLSL lessThan man page
+
+GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
+ +
+
+ +

◆ lessThanEqual()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> glm::lessThanEqual (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Returns the component-wise comparison of result x <= y.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TA floating-point or integer scalar type.
+
+
+
See also
GLSL lessThanEqual man page
+
+GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
+ +
+
+ +

◆ not_()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> glm::not_ (vec< L, bool, Q > const & v)
+
+ +

Returns the component-wise logical complement of x.

+

/!\ Because of language incompatibilities between C++ and GLSL, GLM defines the function not but not_ instead.

+
Template Parameters
+ + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
+
+
+
See also
GLSL not man page
+
+GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
+ +
+
+ +

◆ notEqual()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> glm::notEqual (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Returns the component-wise comparison of result x != y.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TA floating-point, integer or bool scalar type.
+
+
+
See also
GLSL notEqual man page
+
+GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00794.html b/common/glm/doc/api/a00794.html new file mode 100644 index 000000000..00bf582aa --- /dev/null +++ b/common/glm/doc/api/a00794.html @@ -0,0 +1,636 @@ + + + + + + + +0.9.9 API documenation: Angle and Trigonometry Functions + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
Angle and Trigonometry Functions
+
+
+ +

Include <glm/trigonometric.hpp> to use these core features. +More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > acos (vec< L, T, Q > const &x)
 Arc cosine. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > acosh (vec< L, T, Q > const &x)
 Arc hyperbolic cosine; returns the non-negative inverse of cosh. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > asin (vec< L, T, Q > const &x)
 Arc sine. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > asinh (vec< L, T, Q > const &x)
 Arc hyperbolic sine; returns the inverse of sinh. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > atan (vec< L, T, Q > const &y, vec< L, T, Q > const &x)
 Arc tangent. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > atan (vec< L, T, Q > const &y_over_x)
 Arc tangent. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > atanh (vec< L, T, Q > const &x)
 Arc hyperbolic tangent; returns the inverse of tanh. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > cos (vec< L, T, Q > const &angle)
 The standard trigonometric cosine function. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > cosh (vec< L, T, Q > const &angle)
 Returns the hyperbolic cosine function, (exp(x) + exp(-x)) / 2. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > degrees (vec< L, T, Q > const &radians)
 Converts radians to degrees and returns the result. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, T, Q > radians (vec< L, T, Q > const &degrees)
 Converts degrees to radians and returns the result. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > sin (vec< L, T, Q > const &angle)
 The standard trigonometric sine function. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > sinh (vec< L, T, Q > const &angle)
 Returns the hyperbolic sine function, (exp(x) - exp(-x)) / 2. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > tan (vec< L, T, Q > const &angle)
 The standard trigonometric tangent function. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > tanh (vec< L, T, Q > const &angle)
 Returns the hyperbolic tangent function, sinh(angle) / cosh(angle) More...
 
+

Detailed Description

+

Include <glm/trigonometric.hpp> to use these core features.

+

Function parameters specified as angle are assumed to be in units of radians. In no case will any of these functions result in a divide by zero error. If the divisor of a ratio is 0, then results will be undefined.

+

These all operate component-wise. The description is per component.

+

Function Documentation

+ +

◆ acos()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::acos (vec< L, T, Q > const & x)
+
+ +

Arc cosine.

+

Returns an angle whose sine is x. The range of values returned by this function is [0, PI]. Results are undefined if |x| > 1.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL acos man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+ +

◆ acosh()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::acosh (vec< L, T, Q > const & x)
+
+ +

Arc hyperbolic cosine; returns the non-negative inverse of cosh.

+

Results are undefined if x < 1.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL acosh man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+ +

◆ asin()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::asin (vec< L, T, Q > const & x)
+
+ +

Arc sine.

+

Returns an angle whose sine is x. The range of values returned by this function is [-PI/2, PI/2]. Results are undefined if |x| > 1.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL asin man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+ +

◆ asinh()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::asinh (vec< L, T, Q > const & x)
+
+ +

Arc hyperbolic sine; returns the inverse of sinh.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL asinh man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+ +

◆ atan() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::atan (vec< L, T, Q > const & y,
vec< L, T, Q > const & x 
)
+
+ +

Arc tangent.

+

Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL atan man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +

Referenced by glm::atan2().

+ +
+
+ +

◆ atan() [2/2]

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::atan (vec< L, T, Q > const & y_over_x)
+
+ +

Arc tangent.

+

Returns an angle whose tangent is y_over_x. The range of values returned by this function is [-PI/2, PI/2].

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL atan man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+ +

◆ atanh()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::atanh (vec< L, T, Q > const & x)
+
+ +

Arc hyperbolic tangent; returns the inverse of tanh.

+

Results are undefined if abs(x) >= 1.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL atanh man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+ +

◆ cos()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::cos (vec< L, T, Q > const & angle)
+
+ +

The standard trigonometric cosine function.

+

The values returned by this function will range from [-1, 1].

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL cos man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+ +

◆ cosh()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::cosh (vec< L, T, Q > const & angle)
+
+ +

Returns the hyperbolic cosine function, (exp(x) + exp(-x)) / 2.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL cosh man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+ +

◆ degrees()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> glm::degrees (vec< L, T, Q > const & radians)
+
+ +

Converts radians to degrees and returns the result.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL degrees man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+ +

◆ radians()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> glm::radians (vec< L, T, Q > const & degrees)
+
+ +

Converts degrees to radians and returns the result.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL radians man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+ +

◆ sin()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::sin (vec< L, T, Q > const & angle)
+
+ +

The standard trigonometric sine function.

+

The values returned by this function will range from [-1, 1].

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL sin man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+ +

◆ sinh()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::sinh (vec< L, T, Q > const & angle)
+
+ +

Returns the hyperbolic sine function, (exp(x) - exp(-x)) / 2.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL sinh man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+ +

◆ tan()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::tan (vec< L, T, Q > const & angle)
+
+ +

The standard trigonometric tangent function.

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL tan man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+ +

◆ tanh()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL vec<L, T, Q> glm::tanh (vec< L, T, Q > const & angle)
+
+ +

Returns the hyperbolic tangent function, sinh(angle) / cosh(angle)

+
Template Parameters
+ + + + +
LInteger between 1 and 4 included that qualify the dimension of the vector
TFloating-point scalar types
QValue from qualifier enum
+
+
+
See also
GLSL tanh man page
+
+GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00795.html b/common/glm/doc/api/a00795.html new file mode 100644 index 000000000..fd1c30385 --- /dev/null +++ b/common/glm/doc/api/a00795.html @@ -0,0 +1,455 @@ + + + + + + + +0.9.9 API documenation: Vector Relational Functions + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
Vector Relational Functions
+
+
+ +

Include <glm/vector_relational.hpp> to use these core features. +More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<length_t L, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR bool all (vec< L, bool, Q > const &v)
 Returns true if all components of x are true. More...
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR bool any (vec< L, bool, Q > const &v)
 Returns true if any component of x is true. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 Returns the component-wise comparison of result x == y. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > greaterThan (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 Returns the component-wise comparison of result x > y. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > greaterThanEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 Returns the component-wise comparison of result x >= y. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > lessThan (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 Returns the component-wise comparison result of x < y. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > lessThanEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 Returns the component-wise comparison of result x <= y. More...
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > not_ (vec< L, bool, Q > const &v)
 Returns the component-wise logical complement of x. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y)
 Returns the component-wise comparison of result x != y. More...
 
+

Detailed Description

+

Include <glm/vector_relational.hpp> to use these core features.

+

Relational and equality operators (<, <=, >, >=, ==, !=) are defined to operate on scalars and produce scalar Boolean results. For vector results, use the following built-in functions.

+

In all cases, the sizes of all the input and return vectors for any particular call must match.

+

Function Documentation

+ +

◆ all()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR bool glm::all (vec< L, bool, Q > const & v)
+
+ +

Returns true if all components of x are true.

+
Template Parameters
+ + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
+
+
+
See also
GLSL all man page
+
+GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
+ +
+
+ +

◆ any()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR bool glm::any (vec< L, bool, Q > const & v)
+
+ +

Returns true if any component of x is true.

+
Template Parameters
+ + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
+
+
+
See also
GLSL any man page
+
+GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
+ +
+
+ +

◆ equal()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> glm::equal (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Returns the component-wise comparison of result x == y.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TA floating-point, integer or bool scalar type.
+
+
+
See also
GLSL equal man page
+
+GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
+ +
+
+ +

◆ greaterThan()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> glm::greaterThan (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Returns the component-wise comparison of result x > y.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TA floating-point or integer scalar type.
+
+
+
See also
GLSL greaterThan man page
+
+GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
+ +
+
+ +

◆ greaterThanEqual()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> glm::greaterThanEqual (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Returns the component-wise comparison of result x >= y.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TA floating-point or integer scalar type.
+
+
+
See also
GLSL greaterThanEqual man page
+
+GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
+ +
+
+ +

◆ lessThan()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> glm::lessThan (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Returns the component-wise comparison result of x < y.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TA floating-point or integer scalar type.
+
+
+
See also
GLSL lessThan man page
+
+GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
+ +
+
+ +

◆ lessThanEqual()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> glm::lessThanEqual (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Returns the component-wise comparison of result x <= y.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TA floating-point or integer scalar type.
+
+
+
See also
GLSL lessThanEqual man page
+
+GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
+ +
+
+ +

◆ not_()

+ +
+
+ + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> glm::not_ (vec< L, bool, Q > const & v)
+
+ +

Returns the component-wise logical complement of x.

+

/!\ Because of language incompatibilities between C++ and GLSL, GLM defines the function not but not_ instead.

+
Template Parameters
+ + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
+
+
+
See also
GLSL not man page
+
+GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
+ +
+
+ +

◆ notEqual()

+ +
+
+ + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> glm::notEqual (vec< L, T, Q > const & x,
vec< L, T, Q > const & y 
)
+
+ +

Returns the component-wise comparison of result x != y.

+
Template Parameters
+ + + +
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TA floating-point, integer or bool scalar type.
+
+
+
See also
GLSL notEqual man page
+
+GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00796.html b/common/glm/doc/api/a00796.html new file mode 100644 index 000000000..bd6112cef --- /dev/null +++ b/common/glm/doc/api/a00796.html @@ -0,0 +1,107 @@ + + + + + + + +0.9.9 API documenation: Ext_bvec1 + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
Ext_bvec1
+
+
+ + + + + +

+Typedefs

typedef vec< 1, bool, defaultp > bvec1
 1 components vector of boolean. More...
 
+

Detailed Description

+

Typedef Documentation

+ +

◆ bvec1

+ +
+
+ + + + +
typedef vec< 1, bool, defaultp > bvec1
+
+ +

1 components vector of boolean.

+
See also
GLM_EXT_vector_bool1 extension.
+ +

Definition at line 29 of file vector_bool1.hpp.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a00797.html b/common/glm/doc/api/a00797.html new file mode 100644 index 000000000..0bd3d6eb9 --- /dev/null +++ b/common/glm/doc/api/a00797.html @@ -0,0 +1,107 @@ + + + + + + + +0.9.9 API documenation: Ext_vector_uint1 + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
Ext_vector_uint1
+
+
+ + + + + +

+Typedefs

typedef vec< 1, unsigned int, defaultp > uvec1
 1 component vector of unsigned integer numbers. More...
 
+

Detailed Description

+

Typedef Documentation

+ +

◆ uvec1

+ +
+
+ + + + +
typedef vec< 1, u32, defaultp > uvec1
+
+ +

1 component vector of unsigned integer numbers.

+
See also
Ext_vector_uint1 extension.
+ +

Definition at line 29 of file vector_uint1.hpp.

+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a01343.html b/common/glm/doc/api/a01343.html new file mode 100644 index 000000000..a7cdd9c8e --- /dev/null +++ b/common/glm/doc/api/a01343.html @@ -0,0 +1,104 @@ + + + + + + + +0.9.9 API documenation: color_space.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtc/color_space.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > convertLinearToSRGB (vec< L, T, Q > const &ColorLinear)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > convertLinearToSRGB (vec< L, T, Q > const &ColorLinear, T Gamma)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > convertSRGBToLinear (vec< L, T, Q > const &ColorSRGB)
 
+

Detailed Description

+
See also
Core features (dependence)
+
+GLM_GTC_color_space (dependence)
+ +

Definition in file gtc/color_space.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01343_source.html b/common/glm/doc/api/a01343_source.html new file mode 100644 index 000000000..db9126ed0 --- /dev/null +++ b/common/glm/doc/api/a01343_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: color_space.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtc/color_space.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependencies
17 #include "../detail/setup.hpp"
18 #include "../detail/qualifier.hpp"
19 #include "../exponential.hpp"
20 #include "../vec3.hpp"
21 #include "../vec4.hpp"
22 #include <limits>
23 
24 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
25 # pragma message("GLM: GLM_GTC_color_space extension included")
26 #endif
27 
28 namespace glm
29 {
32 
35  template<length_t L, typename T, qualifier Q>
36  GLM_FUNC_DECL vec<L, T, Q> convertLinearToSRGB(vec<L, T, Q> const& ColorLinear);
37 
40  template<length_t L, typename T, qualifier Q>
41  GLM_FUNC_DECL vec<L, T, Q> convertLinearToSRGB(vec<L, T, Q> const& ColorLinear, T Gamma);
42 
45  template<length_t L, typename T, qualifier Q>
46  GLM_FUNC_DECL vec<L, T, Q> convertSRGBToLinear(vec<L, T, Q> const& ColorSRGB);
47 
49  // IEC 61966-2-1:1999 / Rec. 709 specification https://www.w3.org/Graphics/Color/srgb
50  template<length_t L, typename T, qualifier Q>
51  GLM_FUNC_DECL vec<L, T, Q> convertSRGBToLinear(vec<L, T, Q> const& ColorSRGB, T Gamma);
52 
54 } //namespace glm
55 
56 #include "color_space.inl"
GLM_FUNC_DECL vec< L, T, Q > convertSRGBToLinear(vec< L, T, Q > const &ColorSRGB, T Gamma)
Convert a sRGB color to linear color using a custom gamma correction.
+
GLM_FUNC_DECL vec< L, T, Q > convertLinearToSRGB(vec< L, T, Q > const &ColorLinear, T Gamma)
Convert a linear color to sRGB color using a custom gamma correction.
+
Definition: common.hpp:18
+
+ + + + diff --git a/common/glm/doc/api/a01346.html b/common/glm/doc/api/a01346.html new file mode 100644 index 000000000..098b91662 --- /dev/null +++ b/common/glm/doc/api/a01346.html @@ -0,0 +1,109 @@ + + + + + + + +0.9.9 API documenation: color_space.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtc/color_space.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > convertLinearToSRGB (vec< L, T, Q > const &ColorLinear)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > convertLinearToSRGB (vec< L, T, Q > const &ColorLinear, T Gamma)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > convertSRGBToLinear (vec< L, T, Q > const &ColorSRGB)
 
+template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > convertSRGBToLinear (vec< L, T, Q > const &ColorSRGB, T Gamma)
 
+

Detailed Description

+

GLM_GTC_color_space

+
See also
Core features (dependence)
+
+GLM_GTC_color_space (dependence)
+ +

Definition in file gtc/color_space.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01346_source.html b/common/glm/doc/api/a01346_source.html new file mode 100644 index 000000000..8c6d9ad27 --- /dev/null +++ b/common/glm/doc/api/a01346_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: color_space.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtc/color_space.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependencies
17 #include "../detail/setup.hpp"
18 #include "../detail/qualifier.hpp"
19 #include "../exponential.hpp"
20 #include "../vec3.hpp"
21 #include "../vec4.hpp"
22 #include <limits>
23 
24 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
25 # pragma message("GLM: GLM_GTC_color_space extension included")
26 #endif
27 
28 namespace glm
29 {
32 
35  template<length_t L, typename T, qualifier Q>
36  GLM_FUNC_DECL vec<L, T, Q> convertLinearToSRGB(vec<L, T, Q> const& ColorLinear);
37 
40  template<length_t L, typename T, qualifier Q>
41  GLM_FUNC_DECL vec<L, T, Q> convertLinearToSRGB(vec<L, T, Q> const& ColorLinear, T Gamma);
42 
45  template<length_t L, typename T, qualifier Q>
46  GLM_FUNC_DECL vec<L, T, Q> convertSRGBToLinear(vec<L, T, Q> const& ColorSRGB);
47 
49  // IEC 61966-2-1:1999 / Rec. 709 specification https://www.w3.org/Graphics/Color/srgb
50  template<length_t L, typename T, qualifier Q>
51  GLM_FUNC_DECL vec<L, T, Q> convertSRGBToLinear(vec<L, T, Q> const& ColorSRGB, T Gamma);
52 
54 } //namespace glm
55 
56 #include "color_space.inl"
GLM_FUNC_DECL vec< L, T, Q > convertSRGBToLinear(vec< L, T, Q > const &ColorSRGB, T Gamma)
Convert a sRGB color to linear color using a custom gamma correction.
+
GLM_FUNC_DECL vec< L, T, Q > convertLinearToSRGB(vec< L, T, Q > const &ColorLinear, T Gamma)
Convert a linear color to sRGB color using a custom gamma correction.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a01347.html b/common/glm/doc/api/a01347.html new file mode 100644 index 000000000..e859fe696 --- /dev/null +++ b/common/glm/doc/api/a01347.html @@ -0,0 +1,104 @@ + + + + + + + +0.9.9 API documenation: color_space.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtc/color_space.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > convertLinearToSRGB (vec< L, T, Q > const &ColorLinear)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > convertLinearToSRGB (vec< L, T, Q > const &ColorLinear, T Gamma)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > convertSRGBToLinear (vec< L, T, Q > const &ColorSRGB)
 
+

Detailed Description

+
See also
Core features (dependence)
+
+GLM_GTC_color_space (dependence)
+ +

Definition in file gtc/color_space.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01347_source.html b/common/glm/doc/api/a01347_source.html new file mode 100644 index 000000000..3ba8d6601 --- /dev/null +++ b/common/glm/doc/api/a01347_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: color_space.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtc/color_space.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependencies
17 #include "../detail/setup.hpp"
18 #include "../detail/qualifier.hpp"
19 #include "../exponential.hpp"
20 #include "../vec3.hpp"
21 #include "../vec4.hpp"
22 #include <limits>
23 
24 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
25 # pragma message("GLM: GLM_GTC_color_space extension included")
26 #endif
27 
28 namespace glm
29 {
32 
35  template<length_t L, typename T, qualifier Q>
36  GLM_FUNC_DECL vec<L, T, Q> convertLinearToSRGB(vec<L, T, Q> const& ColorLinear);
37 
40  template<length_t L, typename T, qualifier Q>
41  GLM_FUNC_DECL vec<L, T, Q> convertLinearToSRGB(vec<L, T, Q> const& ColorLinear, T Gamma);
42 
45  template<length_t L, typename T, qualifier Q>
46  GLM_FUNC_DECL vec<L, T, Q> convertSRGBToLinear(vec<L, T, Q> const& ColorSRGB);
47 
49  // IEC 61966-2-1:1999 / Rec. 709 specification https://www.w3.org/Graphics/Color/srgb
50  template<length_t L, typename T, qualifier Q>
51  GLM_FUNC_DECL vec<L, T, Q> convertSRGBToLinear(vec<L, T, Q> const& ColorSRGB, T Gamma);
52 
54 } //namespace glm
55 
56 #include "color_space.inl"
Definition: common.hpp:18
+
GLM_FUNC_DECL vec< L, T, Q > convertSRGBToLinear(vec< L, T, Q > const &ColorSRGB, T Gamma)
Convert a sRGB color to linear color using a custom gamma correction.
+
GLM_FUNC_DECL vec< L, T, Q > convertLinearToSRGB(vec< L, T, Q > const &ColorLinear, T Gamma)
Convert a linear color to sRGB color using a custom gamma correction.
+
+ + + + diff --git a/common/glm/doc/api/a01348.html b/common/glm/doc/api/a01348.html new file mode 100644 index 000000000..64148f5b3 --- /dev/null +++ b/common/glm/doc/api/a01348.html @@ -0,0 +1,116 @@ + + + + + + + +0.9.9 API documenation: color_space.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtc/color_space.hpp File Reference
+
+
+ +

GLM_GTC_color_space +More...

+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > convertLinearToSRGB (vec< L, T, Q > const &ColorLinear)
 Convert a linear color to sRGB color using a standard gamma correction. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > convertLinearToSRGB (vec< L, T, Q > const &ColorLinear, T Gamma)
 Convert a linear color to sRGB color using a custom gamma correction. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > convertSRGBToLinear (vec< L, T, Q > const &ColorSRGB)
 Convert a sRGB color to linear color using a standard gamma correction. More...
 
+template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > convertSRGBToLinear (vec< L, T, Q > const &ColorSRGB, T Gamma)
 Convert a sRGB color to linear color using a custom gamma correction.
 
+

Detailed Description

+

GLM_GTC_color_space

+
See also
Core features (dependence)
+
+GLM_GTC_color_space (dependence)
+ +

Definition in file gtc/color_space.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01348_source.html b/common/glm/doc/api/a01348_source.html new file mode 100644 index 000000000..9d3f19484 --- /dev/null +++ b/common/glm/doc/api/a01348_source.html @@ -0,0 +1,84 @@ + + + + + + + +0.9.9 API documenation: color_space.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtc/color_space.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependencies
17 #include "../detail/setup.hpp"
18 #include "../detail/qualifier.hpp"
19 #include "../exponential.hpp"
20 #include "../vec3.hpp"
21 #include "../vec4.hpp"
22 #include <limits>
23 
24 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
25 # pragma message("GLM: GLM_GTC_color_space extension included")
26 #endif
27 
28 namespace glm
29 {
32 
35  template<length_t L, typename T, qualifier Q>
36  GLM_FUNC_DECL vec<L, T, Q> convertLinearToSRGB(vec<L, T, Q> const& ColorLinear);
37 
40  template<length_t L, typename T, qualifier Q>
41  GLM_FUNC_DECL vec<L, T, Q> convertLinearToSRGB(vec<L, T, Q> const& ColorLinear, T Gamma);
42 
45  template<length_t L, typename T, qualifier Q>
46  GLM_FUNC_DECL vec<L, T, Q> convertSRGBToLinear(vec<L, T, Q> const& ColorSRGB);
47 
49  // IEC 61966-2-1:1999 / Rec. 709 specification https://www.w3.org/Graphics/Color/srgb
50  template<length_t L, typename T, qualifier Q>
51  GLM_FUNC_DECL vec<L, T, Q> convertSRGBToLinear(vec<L, T, Q> const& ColorSRGB, T Gamma);
52 
54 } //namespace glm
55 
56 #include "color_space.inl"
GLM_FUNC_DECL vec< L, T, Q > convertLinearToSRGB(vec< L, T, Q > const &ColorLinear, T Gamma)
Convert a linear color to sRGB color using a custom gamma correction.
+
GLM_FUNC_DECL vec< L, T, Q > convertSRGBToLinear(vec< L, T, Q > const &ColorSRGB, T Gamma)
Convert a sRGB color to linear color using a custom gamma correction.
+
Definition: common.hpp:18
+
+ + + + diff --git a/common/glm/doc/api/a01349.html b/common/glm/doc/api/a01349.html new file mode 100644 index 000000000..8ecbc284d --- /dev/null +++ b/common/glm/doc/api/a01349.html @@ -0,0 +1,112 @@ + + + + + + + +0.9.9 API documenation: color_space.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtx/color_space.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > hsvColor (vec< 3, T, Q > const &rgbValue)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T luminosity (vec< 3, T, Q > const &color)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > rgbColor (vec< 3, T, Q > const &hsvValue)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > saturation (T const s)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > saturation (T const s, vec< 3, T, Q > const &color)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > saturation (T const s, vec< 4, T, Q > const &color)
 
+

Detailed Description

+

GLM_GTX_color_space

+
See also
Core features (dependence)
+ +

Definition in file gtx/color_space.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01349_source.html b/common/glm/doc/api/a01349_source.html new file mode 100644 index 000000000..f33884e48 --- /dev/null +++ b/common/glm/doc/api/a01349_source.html @@ -0,0 +1,86 @@ + + + + + + + +0.9.9 API documenation: color_space.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtx/color_space.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 
18 #ifndef GLM_ENABLE_EXPERIMENTAL
19 # error "GLM: GLM_GTX_color_space is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
20 #endif
21 
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_GTX_color_space extension included")
24 #endif
25 
26 namespace glm
27 {
30 
33  template<typename T, qualifier Q>
34  GLM_FUNC_DECL vec<3, T, Q> rgbColor(
35  vec<3, T, Q> const& hsvValue);
36 
39  template<typename T, qualifier Q>
40  GLM_FUNC_DECL vec<3, T, Q> hsvColor(
41  vec<3, T, Q> const& rgbValue);
42 
45  template<typename T>
46  GLM_FUNC_DECL mat<4, 4, T, defaultp> saturation(
47  T const s);
48 
51  template<typename T, qualifier Q>
52  GLM_FUNC_DECL vec<3, T, Q> saturation(
53  T const s,
54  vec<3, T, Q> const& color);
55 
58  template<typename T, qualifier Q>
59  GLM_FUNC_DECL vec<4, T, Q> saturation(
60  T const s,
61  vec<4, T, Q> const& color);
62 
65  template<typename T, qualifier Q>
66  GLM_FUNC_DECL T luminosity(
67  vec<3, T, Q> const& color);
68 
70 }//namespace glm
71 
72 #include "color_space.inl"
GLM_FUNC_DECL vec< 3, T, Q > rgbColor(vec< 3, T, Q > const &hsvValue)
Converts a color from HSV color space to its color in RGB color space.
+
GLM_FUNC_DECL vec< 3, T, Q > hsvColor(vec< 3, T, Q > const &rgbValue)
Converts a color from RGB color space to its color in HSV color space.
+
GLM_FUNC_DECL vec< 4, T, Q > saturation(T const s, vec< 4, T, Q > const &color)
Modify the saturation of a color.
+
GLM_FUNC_DECL T luminosity(vec< 3, T, Q > const &color)
Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a01350.html b/common/glm/doc/api/a01350.html new file mode 100644 index 000000000..d50b39721 --- /dev/null +++ b/common/glm/doc/api/a01350.html @@ -0,0 +1,111 @@ + + + + + + + +0.9.9 API documenation: color_space.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtx/color_space.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > hsvColor (vec< 3, T, Q > const &rgbValue)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T luminosity (vec< 3, T, Q > const &color)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > rgbColor (vec< 3, T, Q > const &hsvValue)
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > saturation (T const s)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > saturation (T const s, vec< 3, T, Q > const &color)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > saturation (T const s, vec< 4, T, Q > const &color)
 
+

Detailed Description

+
See also
Core features (dependence)
+ +

Definition in file gtx/color_space.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01350_source.html b/common/glm/doc/api/a01350_source.html new file mode 100644 index 000000000..0c74b88f8 --- /dev/null +++ b/common/glm/doc/api/a01350_source.html @@ -0,0 +1,86 @@ + + + + + + + +0.9.9 API documenation: color_space.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtx/color_space.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 
18 #ifndef GLM_ENABLE_EXPERIMENTAL
19 # error "GLM: GLM_GTX_color_space is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
20 #endif
21 
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_GTX_color_space extension included")
24 #endif
25 
26 namespace glm
27 {
30 
33  template<typename T, qualifier Q>
34  GLM_FUNC_DECL vec<3, T, Q> rgbColor(
35  vec<3, T, Q> const& hsvValue);
36 
39  template<typename T, qualifier Q>
40  GLM_FUNC_DECL vec<3, T, Q> hsvColor(
41  vec<3, T, Q> const& rgbValue);
42 
45  template<typename T>
46  GLM_FUNC_DECL mat<4, 4, T, defaultp> saturation(
47  T const s);
48 
51  template<typename T, qualifier Q>
52  GLM_FUNC_DECL vec<3, T, Q> saturation(
53  T const s,
54  vec<3, T, Q> const& color);
55 
58  template<typename T, qualifier Q>
59  GLM_FUNC_DECL vec<4, T, Q> saturation(
60  T const s,
61  vec<4, T, Q> const& color);
62 
65  template<typename T, qualifier Q>
66  GLM_FUNC_DECL T luminosity(
67  vec<3, T, Q> const& color);
68 
70 }//namespace glm
71 
72 #include "color_space.inl"
Definition: common.hpp:18
+
GLM_FUNC_DECL vec< 3, T, Q > rgbColor(vec< 3, T, Q > const &hsvValue)
Converts a color from HSV color space to its color in RGB color space.
+
GLM_FUNC_DECL vec< 3, T, Q > hsvColor(vec< 3, T, Q > const &rgbValue)
Converts a color from RGB color space to its color in HSV color space.
+
GLM_FUNC_DECL vec< 4, T, Q > saturation(T const s, vec< 4, T, Q > const &color)
Modify the saturation of a color.
+
GLM_FUNC_DECL T luminosity(vec< 3, T, Q > const &color)
Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals.
+
+ + + + diff --git a/common/glm/doc/api/a01351.html b/common/glm/doc/api/a01351.html new file mode 100644 index 000000000..7596c10c3 --- /dev/null +++ b/common/glm/doc/api/a01351.html @@ -0,0 +1,121 @@ + + + + + + + +0.9.9 API documenation: color_space.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtx/color_space.hpp File Reference
+
+
+ +

GLM_GTX_color_space +More...

+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > hsvColor (vec< 3, T, Q > const &rgbValue)
 Converts a color from RGB color space to its color in HSV color space. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T luminosity (vec< 3, T, Q > const &color)
 Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > rgbColor (vec< 3, T, Q > const &hsvValue)
 Converts a color from HSV color space to its color in RGB color space. More...
 
template<typename T >
GLM_FUNC_DECL mat< 4, 4, T, defaultp > saturation (T const s)
 Build a saturation matrix. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > saturation (T const s, vec< 3, T, Q > const &color)
 Modify the saturation of a color. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > saturation (T const s, vec< 4, T, Q > const &color)
 Modify the saturation of a color. More...
 
+

Detailed Description

+

GLM_GTX_color_space

+
See also
Core features (dependence)
+ +

Definition in file gtx/color_space.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01351_source.html b/common/glm/doc/api/a01351_source.html new file mode 100644 index 000000000..5a59ca73e --- /dev/null +++ b/common/glm/doc/api/a01351_source.html @@ -0,0 +1,86 @@ + + + + + + + +0.9.9 API documenation: color_space.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtx/color_space.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 
18 #ifndef GLM_ENABLE_EXPERIMENTAL
19 # error "GLM: GLM_GTX_color_space is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
20 #endif
21 
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_GTX_color_space extension included")
24 #endif
25 
26 namespace glm
27 {
30 
33  template<typename T, qualifier Q>
34  GLM_FUNC_DECL vec<3, T, Q> rgbColor(
35  vec<3, T, Q> const& hsvValue);
36 
39  template<typename T, qualifier Q>
40  GLM_FUNC_DECL vec<3, T, Q> hsvColor(
41  vec<3, T, Q> const& rgbValue);
42 
45  template<typename T>
46  GLM_FUNC_DECL mat<4, 4, T, defaultp> saturation(
47  T const s);
48 
51  template<typename T, qualifier Q>
52  GLM_FUNC_DECL vec<3, T, Q> saturation(
53  T const s,
54  vec<3, T, Q> const& color);
55 
58  template<typename T, qualifier Q>
59  GLM_FUNC_DECL vec<4, T, Q> saturation(
60  T const s,
61  vec<4, T, Q> const& color);
62 
65  template<typename T, qualifier Q>
66  GLM_FUNC_DECL T luminosity(
67  vec<3, T, Q> const& color);
68 
70 }//namespace glm
71 
72 #include "color_space.inl"
GLM_FUNC_DECL vec< 3, T, Q > rgbColor(vec< 3, T, Q > const &hsvValue)
Converts a color from HSV color space to its color in RGB color space.
+
GLM_FUNC_DECL vec< 3, T, Q > hsvColor(vec< 3, T, Q > const &rgbValue)
Converts a color from RGB color space to its color in HSV color space.
+
GLM_FUNC_DECL vec< 4, T, Q > saturation(T const s, vec< 4, T, Q > const &color)
Modify the saturation of a color.
+
GLM_FUNC_DECL T luminosity(vec< 3, T, Q > const &color)
Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals.
+
Definition: common.hpp:18
+
+ + + + diff --git a/common/glm/doc/api/a01352.html b/common/glm/doc/api/a01352.html new file mode 100644 index 000000000..503c361bb --- /dev/null +++ b/common/glm/doc/api/a01352.html @@ -0,0 +1,106 @@ + + + + + + + +0.9.9 API documenation: common.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtx/common.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, bool, Q > closeBounded (vec< L, T, Q > const &Value, vec< L, T, Q > const &Min, vec< L, T, Q > const &Max)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fmod (vec< L, T, Q > const &v)
 
template<typename genType >
GLM_FUNC_DECL genType::bool_type isdenormal (genType const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, bool, Q > openBounded (vec< L, T, Q > const &Value, vec< L, T, Q > const &Min, vec< L, T, Q > const &Max)
 
+

Detailed Description

+

GLM_GTX_common

+
See also
Core features (dependence)
+ +

Definition in file gtx/common.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01352_source.html b/common/glm/doc/api/a01352_source.html new file mode 100644 index 000000000..032dad6ff --- /dev/null +++ b/common/glm/doc/api/a01352_source.html @@ -0,0 +1,86 @@ + + + + + + + +0.9.9 API documenation: common.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtx/common.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependencies:
16 #include "../vec2.hpp"
17 #include "../vec3.hpp"
18 #include "../vec4.hpp"
19 #include "../gtc/vec1.hpp"
20 
21 #ifndef GLM_ENABLE_EXPERIMENTAL
22 # error "GLM: GLM_GTX_common is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
23 #endif
24 
25 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
26 # pragma message("GLM: GLM_GTX_common extension included")
27 #endif
28 
29 namespace glm
30 {
33 
42  template<typename genType>
43  GLM_FUNC_DECL typename genType::bool_type isdenormal(genType const& x);
44 
50  template<length_t L, typename T, qualifier Q>
51  GLM_FUNC_DECL vec<L, T, Q> fmod(vec<L, T, Q> const& v);
52 
60  template <length_t L, typename T, qualifier Q>
61  GLM_FUNC_DECL vec<L, bool, Q> openBounded(vec<L, T, Q> const& Value, vec<L, T, Q> const& Min, vec<L, T, Q> const& Max);
62 
70  template <length_t L, typename T, qualifier Q>
71  GLM_FUNC_DECL vec<L, bool, Q> closeBounded(vec<L, T, Q> const& Value, vec<L, T, Q> const& Min, vec<L, T, Q> const& Max);
72 
74 }//namespace glm
75 
76 #include "common.inl"
GLM_FUNC_DECL vec< L, bool, Q > openBounded(vec< L, T, Q > const &Value, vec< L, T, Q > const &Min, vec< L, T, Q > const &Max)
Returns whether vector components values are within an interval.
+
GLM_FUNC_DECL genType::bool_type isdenormal(genType const &x)
Returns true if x is a denormalized number Numbers whose absolute value is too small to be represente...
+
GLM_FUNC_DECL vec< L, bool, Q > closeBounded(vec< L, T, Q > const &Value, vec< L, T, Q > const &Min, vec< L, T, Q > const &Max)
Returns whether vector components values are within an interval.
+
GLM_FUNC_DECL vec< L, T, Q > fmod(vec< L, T, Q > const &v)
Similar to &#39;mod&#39; but with a different rounding and integer support.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a01353.html b/common/glm/doc/api/a01353.html new file mode 100644 index 000000000..91f803bf9 --- /dev/null +++ b/common/glm/doc/api/a01353.html @@ -0,0 +1,105 @@ + + + + + + + +0.9.9 API documenation: common.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtx/common.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, bool, Q > closeBounded (vec< L, T, Q > const &Value, vec< L, T, Q > const &Min, vec< L, T, Q > const &Max)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fmod (vec< L, T, Q > const &v)
 
template<typename genType >
GLM_FUNC_DECL genType::bool_type isdenormal (genType const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, bool, Q > openBounded (vec< L, T, Q > const &Value, vec< L, T, Q > const &Min, vec< L, T, Q > const &Max)
 
+

Detailed Description

+
See also
Core features (dependence)
+ +

Definition in file gtx/common.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01353_source.html b/common/glm/doc/api/a01353_source.html new file mode 100644 index 000000000..3cc86cb97 --- /dev/null +++ b/common/glm/doc/api/a01353_source.html @@ -0,0 +1,86 @@ + + + + + + + +0.9.9 API documenation: common.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtx/common.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependencies:
16 #include "../vec2.hpp"
17 #include "../vec3.hpp"
18 #include "../vec4.hpp"
19 #include "../gtc/vec1.hpp"
20 
21 #ifndef GLM_ENABLE_EXPERIMENTAL
22 # error "GLM: GLM_GTX_common is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
23 #endif
24 
25 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
26 # pragma message("GLM: GLM_GTX_common extension included")
27 #endif
28 
29 namespace glm
30 {
33 
42  template<typename genType>
43  GLM_FUNC_DECL typename genType::bool_type isdenormal(genType const& x);
44 
50  template<length_t L, typename T, qualifier Q>
51  GLM_FUNC_DECL vec<L, T, Q> fmod(vec<L, T, Q> const& v);
52 
60  template <length_t L, typename T, qualifier Q>
61  GLM_FUNC_DECL vec<L, bool, Q> openBounded(vec<L, T, Q> const& Value, vec<L, T, Q> const& Min, vec<L, T, Q> const& Max);
62 
70  template <length_t L, typename T, qualifier Q>
71  GLM_FUNC_DECL vec<L, bool, Q> closeBounded(vec<L, T, Q> const& Value, vec<L, T, Q> const& Min, vec<L, T, Q> const& Max);
72 
74 }//namespace glm
75 
76 #include "common.inl"
Definition: common.hpp:18
+
GLM_FUNC_DECL vec< L, bool, Q > openBounded(vec< L, T, Q > const &Value, vec< L, T, Q > const &Min, vec< L, T, Q > const &Max)
Returns whether vector components values are within an interval.
+
GLM_FUNC_DECL genType::bool_type isdenormal(genType const &x)
Returns true if x is a denormalized number Numbers whose absolute value is too small to be represente...
+
GLM_FUNC_DECL vec< L, bool, Q > closeBounded(vec< L, T, Q > const &Value, vec< L, T, Q > const &Min, vec< L, T, Q > const &Max)
Returns whether vector components values are within an interval.
+
GLM_FUNC_DECL vec< L, T, Q > fmod(vec< L, T, Q > const &v)
Similar to &#39;mod&#39; but with a different rounding and integer support.
+
+ + + + diff --git a/common/glm/doc/api/a01354.html b/common/glm/doc/api/a01354.html new file mode 100644 index 000000000..27a360da8 --- /dev/null +++ b/common/glm/doc/api/a01354.html @@ -0,0 +1,113 @@ + + + + + + + +0.9.9 API documenation: common.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtx/common.hpp File Reference
+
+
+ +

GLM_GTX_common +More...

+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, bool, Q > closeBounded (vec< L, T, Q > const &Value, vec< L, T, Q > const &Min, vec< L, T, Q > const &Max)
 Returns whether vector components values are within an interval. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, T, Q > fmod (vec< L, T, Q > const &v)
 Similar to 'mod' but with a different rounding and integer support. More...
 
template<typename genType >
GLM_FUNC_DECL genType::bool_type isdenormal (genType const &x)
 Returns true if x is a denormalized number Numbers whose absolute value is too small to be represented in the normal format are represented in an alternate, denormalized format. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, bool, Q > openBounded (vec< L, T, Q > const &Value, vec< L, T, Q > const &Min, vec< L, T, Q > const &Max)
 Returns whether vector components values are within an interval. More...
 
+

Detailed Description

+

GLM_GTX_common

+
See also
Core features (dependence)
+ +

Definition in file gtx/common.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01354_source.html b/common/glm/doc/api/a01354_source.html new file mode 100644 index 000000000..7fefe6817 --- /dev/null +++ b/common/glm/doc/api/a01354_source.html @@ -0,0 +1,86 @@ + + + + + + + +0.9.9 API documenation: common.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtx/common.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependencies:
16 #include "../vec2.hpp"
17 #include "../vec3.hpp"
18 #include "../vec4.hpp"
19 #include "../gtc/vec1.hpp"
20 
21 #ifndef GLM_ENABLE_EXPERIMENTAL
22 # error "GLM: GLM_GTX_common is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
23 #endif
24 
25 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
26 # pragma message("GLM: GLM_GTX_common extension included")
27 #endif
28 
29 namespace glm
30 {
33 
42  template<typename genType>
43  GLM_FUNC_DECL typename genType::bool_type isdenormal(genType const& x);
44 
50  template<length_t L, typename T, qualifier Q>
51  GLM_FUNC_DECL vec<L, T, Q> fmod(vec<L, T, Q> const& v);
52 
60  template <length_t L, typename T, qualifier Q>
61  GLM_FUNC_DECL vec<L, bool, Q> openBounded(vec<L, T, Q> const& Value, vec<L, T, Q> const& Min, vec<L, T, Q> const& Max);
62 
70  template <length_t L, typename T, qualifier Q>
71  GLM_FUNC_DECL vec<L, bool, Q> closeBounded(vec<L, T, Q> const& Value, vec<L, T, Q> const& Min, vec<L, T, Q> const& Max);
72 
74 }//namespace glm
75 
76 #include "common.inl"
GLM_FUNC_DECL genType::bool_type isdenormal(genType const &x)
Returns true if x is a denormalized number Numbers whose absolute value is too small to be represente...
+
GLM_FUNC_DECL vec< L, T, Q > fmod(vec< L, T, Q > const &v)
Similar to &#39;mod&#39; but with a different rounding and integer support.
+
GLM_FUNC_DECL vec< L, bool, Q > openBounded(vec< L, T, Q > const &Value, vec< L, T, Q > const &Min, vec< L, T, Q > const &Max)
Returns whether vector components values are within an interval.
+
GLM_FUNC_DECL vec< L, bool, Q > closeBounded(vec< L, T, Q > const &Value, vec< L, T, Q > const &Min, vec< L, T, Q > const &Max)
Returns whether vector components values are within an interval.
+
Definition: common.hpp:18
+
+ + + + diff --git a/common/glm/doc/api/a01355.html b/common/glm/doc/api/a01355.html new file mode 100644 index 000000000..c022f51ed --- /dev/null +++ b/common/glm/doc/api/a01355.html @@ -0,0 +1,105 @@ + + + + + + + +0.9.9 API documenation: integer.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtc/integer.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, int, Q > iround (vec< L, T, Q > const &x)
 
template<typename genIUType >
GLM_FUNC_DECL genIUType log2 (genIUType x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, uint, Q > uround (vec< L, T, Q > const &x)
 
+

Detailed Description

+

GLM_GTC_integer

+
See also
Core features (dependence)
+
+GLM_GTC_integer (dependence)
+ +

Definition in file gtc/integer.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01355_source.html b/common/glm/doc/api/a01355_source.html new file mode 100644 index 000000000..1affe35d8 --- /dev/null +++ b/common/glm/doc/api/a01355_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: integer.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtc/integer.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependencies
17 #include "../detail/setup.hpp"
18 #include "../detail/qualifier.hpp"
19 #include "../common.hpp"
20 #include "../integer.hpp"
21 #include "../exponential.hpp"
22 #include <limits>
23 
24 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
25 # pragma message("GLM: GLM_GTC_integer extension included")
26 #endif
27 
28 namespace glm
29 {
32 
35  template<typename genIUType>
36  GLM_FUNC_DECL genIUType log2(genIUType x);
37 
47  template<length_t L, typename T, qualifier Q>
48  GLM_FUNC_DECL vec<L, int, Q> iround(vec<L, T, Q> const& x);
49 
59  template<length_t L, typename T, qualifier Q>
60  GLM_FUNC_DECL vec<L, uint, Q> uround(vec<L, T, Q> const& x);
61 
63 } //namespace glm
64 
65 #include "integer.inl"
GLM_FUNC_DECL vec< L, int, Q > iround(vec< L, T, Q > const &x)
Returns a value equal to the nearest integer to x.
+
GLM_FUNC_DECL genIUType log2(genIUType x)
Returns the log2 of x for integer values.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL vec< L, uint, Q > uround(vec< L, T, Q > const &x)
Returns a value equal to the nearest integer to x.
+
+ + + + diff --git a/common/glm/doc/api/a01356.html b/common/glm/doc/api/a01356.html new file mode 100644 index 000000000..e3384eecf --- /dev/null +++ b/common/glm/doc/api/a01356.html @@ -0,0 +1,104 @@ + + + + + + + +0.9.9 API documenation: integer.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtc/integer.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, int, Q > iround (vec< L, T, Q > const &x)
 
template<typename genIUType >
GLM_FUNC_DECL genIUType log2 (genIUType x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, uint, Q > uround (vec< L, T, Q > const &x)
 
+

Detailed Description

+
See also
Core features (dependence)
+
+GLM_GTC_integer (dependence)
+ +

Definition in file gtc/integer.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01356_source.html b/common/glm/doc/api/a01356_source.html new file mode 100644 index 000000000..869269210 --- /dev/null +++ b/common/glm/doc/api/a01356_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: integer.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtc/integer.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependencies
17 #include "../detail/setup.hpp"
18 #include "../detail/qualifier.hpp"
19 #include "../common.hpp"
20 #include "../integer.hpp"
21 #include "../exponential.hpp"
22 #include <limits>
23 
24 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
25 # pragma message("GLM: GLM_GTC_integer extension included")
26 #endif
27 
28 namespace glm
29 {
32 
35  template<typename genIUType>
36  GLM_FUNC_DECL genIUType log2(genIUType x);
37 
47  template<length_t L, typename T, qualifier Q>
48  GLM_FUNC_DECL vec<L, int, Q> iround(vec<L, T, Q> const& x);
49 
59  template<length_t L, typename T, qualifier Q>
60  GLM_FUNC_DECL vec<L, uint, Q> uround(vec<L, T, Q> const& x);
61 
63 } //namespace glm
64 
65 #include "integer.inl"
GLM_FUNC_DECL vec< L, int, Q > iround(vec< L, T, Q > const &x)
Returns a value equal to the nearest integer to x.
+
Definition: common.hpp:18
+
GLM_FUNC_DECL genIUType log2(genIUType x)
Returns the log2 of x for integer values.
+
GLM_FUNC_DECL vec< L, uint, Q > uround(vec< L, T, Q > const &x)
Returns a value equal to the nearest integer to x.
+
+ + + + diff --git a/common/glm/doc/api/a01357.html b/common/glm/doc/api/a01357.html new file mode 100644 index 000000000..f66a25b2c --- /dev/null +++ b/common/glm/doc/api/a01357.html @@ -0,0 +1,111 @@ + + + + + + + +0.9.9 API documenation: integer.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtc/integer.hpp File Reference
+
+
+ +

GLM_GTC_integer +More...

+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, int, Q > iround (vec< L, T, Q > const &x)
 Returns a value equal to the nearest integer to x. More...
 
template<typename genIUType >
GLM_FUNC_DECL genIUType log2 (genIUType x)
 Returns the log2 of x for integer values. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, uint, Q > uround (vec< L, T, Q > const &x)
 Returns a value equal to the nearest integer to x. More...
 
+

Detailed Description

+

GLM_GTC_integer

+
See also
Core features (dependence)
+
+GLM_GTC_integer (dependence)
+ +

Definition in file gtc/integer.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01357_source.html b/common/glm/doc/api/a01357_source.html new file mode 100644 index 000000000..a482dd42f --- /dev/null +++ b/common/glm/doc/api/a01357_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: integer.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtc/integer.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependencies
17 #include "../detail/setup.hpp"
18 #include "../detail/qualifier.hpp"
19 #include "../common.hpp"
20 #include "../integer.hpp"
21 #include "../exponential.hpp"
22 #include <limits>
23 
24 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
25 # pragma message("GLM: GLM_GTC_integer extension included")
26 #endif
27 
28 namespace glm
29 {
32 
35  template<typename genIUType>
36  GLM_FUNC_DECL genIUType log2(genIUType x);
37 
47  template<length_t L, typename T, qualifier Q>
48  GLM_FUNC_DECL vec<L, int, Q> iround(vec<L, T, Q> const& x);
49 
59  template<length_t L, typename T, qualifier Q>
60  GLM_FUNC_DECL vec<L, uint, Q> uround(vec<L, T, Q> const& x);
61 
63 } //namespace glm
64 
65 #include "integer.inl"
GLM_FUNC_DECL vec< L, uint, Q > uround(vec< L, T, Q > const &x)
Returns a value equal to the nearest integer to x.
+
GLM_FUNC_DECL genIUType log2(genIUType x)
Returns the log2 of x for integer values.
+
GLM_FUNC_DECL vec< L, int, Q > iround(vec< L, T, Q > const &x)
Returns a value equal to the nearest integer to x.
+
Definition: common.hpp:18
+
+ + + + diff --git a/common/glm/doc/api/a01358.html b/common/glm/doc/api/a01358.html new file mode 100644 index 000000000..b3af9205e --- /dev/null +++ b/common/glm/doc/api/a01358.html @@ -0,0 +1,119 @@ + + + + + + + +0.9.9 API documenation: integer.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtx/integer.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef signed int sint
 
+ + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType factorial (genType const &x)
 
GLM_FUNC_DECL unsigned int floor_log2 (unsigned int x)
 
GLM_FUNC_DECL int mod (int x, int y)
 
GLM_FUNC_DECL uint mod (uint x, uint y)
 
GLM_FUNC_DECL uint nlz (uint x)
 
GLM_FUNC_DECL int pow (int x, uint y)
 
GLM_FUNC_DECL uint pow (uint x, uint y)
 
GLM_FUNC_DECL int sqrt (int x)
 
GLM_FUNC_DECL uint sqrt (uint x)
 
+

Detailed Description

+

GLM_GTX_integer

+
See also
Core features (dependence)
+ +

Definition in file gtx/integer.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01358_source.html b/common/glm/doc/api/a01358_source.html new file mode 100644 index 000000000..2a1b6657b --- /dev/null +++ b/common/glm/doc/api/a01358_source.html @@ -0,0 +1,89 @@ + + + + + + + +0.9.9 API documenation: integer.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtx/integer.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 #include "../gtc/integer.hpp"
18 
19 #ifndef GLM_ENABLE_EXPERIMENTAL
20 # error "GLM: GLM_GTX_integer is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
21 #endif
22 
23 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
24 # pragma message("GLM: GLM_GTX_integer extension included")
25 #endif
26 
27 namespace glm
28 {
31 
34  GLM_FUNC_DECL int pow(int x, uint y);
35 
38  GLM_FUNC_DECL int sqrt(int x);
39 
42  GLM_FUNC_DECL unsigned int floor_log2(unsigned int x);
43 
46  GLM_FUNC_DECL int mod(int x, int y);
47 
50  template<typename genType>
51  GLM_FUNC_DECL genType factorial(genType const& x);
52 
55  typedef signed int sint;
56 
59  GLM_FUNC_DECL uint pow(uint x, uint y);
60 
63  GLM_FUNC_DECL uint sqrt(uint x);
64 
67  GLM_FUNC_DECL uint mod(uint x, uint y);
68 
71  GLM_FUNC_DECL uint nlz(uint x);
72 
74 }//namespace glm
75 
76 #include "integer.inl"
signed int sint
32bit signed integer.
Definition: gtx/integer.hpp:55
+
GLM_FUNC_DECL uint nlz(uint x)
Returns the number of leading zeros.
+
GLM_FUNC_DECL uint mod(uint x, uint y)
Modulus.
+
GLM_FUNC_DECL unsigned int floor_log2(unsigned int x)
Returns the floor log2 of x.
+
GLM_FUNC_DECL uint pow(uint x, uint y)
Returns x raised to the y power.
+
GLM_FUNC_DECL genType factorial(genType const &x)
Return the factorial value of a number (!12 max, integer only) From GLM_GTX_integer extension...
+
Definition: common.hpp:20
+
GLM_FUNC_DECL uint sqrt(uint x)
Returns the positive square root of x.
+
+ + + + diff --git a/common/glm/doc/api/a01359.html b/common/glm/doc/api/a01359.html new file mode 100644 index 000000000..60a4fe373 --- /dev/null +++ b/common/glm/doc/api/a01359.html @@ -0,0 +1,118 @@ + + + + + + + +0.9.9 API documenation: integer.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtx/integer.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Typedefs

typedef signed int sint
 
+ + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType factorial (genType const &x)
 
GLM_FUNC_DECL unsigned int floor_log2 (unsigned int x)
 
GLM_FUNC_DECL int mod (int x, int y)
 
GLM_FUNC_DECL uint mod (uint x, uint y)
 
GLM_FUNC_DECL uint nlz (uint x)
 
GLM_FUNC_DECL int pow (int x, uint y)
 
GLM_FUNC_DECL uint pow (uint x, uint y)
 
GLM_FUNC_DECL int sqrt (int x)
 
GLM_FUNC_DECL uint sqrt (uint x)
 
+

Detailed Description

+
See also
Core features (dependence)
+ +

Definition in file gtx/integer.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01359_source.html b/common/glm/doc/api/a01359_source.html new file mode 100644 index 000000000..75c17839d --- /dev/null +++ b/common/glm/doc/api/a01359_source.html @@ -0,0 +1,89 @@ + + + + + + + +0.9.9 API documenation: integer.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtx/integer.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 #include "../gtc/integer.hpp"
18 
19 #ifndef GLM_ENABLE_EXPERIMENTAL
20 # error "GLM: GLM_GTX_integer is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
21 #endif
22 
23 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
24 # pragma message("GLM: GLM_GTX_integer extension included")
25 #endif
26 
27 namespace glm
28 {
31 
34  GLM_FUNC_DECL int pow(int x, uint y);
35 
38  GLM_FUNC_DECL int sqrt(int x);
39 
42  GLM_FUNC_DECL unsigned int floor_log2(unsigned int x);
43 
46  GLM_FUNC_DECL int mod(int x, int y);
47 
50  template<typename genType>
51  GLM_FUNC_DECL genType factorial(genType const& x);
52 
55  typedef signed int sint;
56 
59  GLM_FUNC_DECL uint pow(uint x, uint y);
60 
63  GLM_FUNC_DECL uint sqrt(uint x);
64 
67  GLM_FUNC_DECL uint mod(uint x, uint y);
68 
71  GLM_FUNC_DECL uint nlz(uint x);
72 
74 }//namespace glm
75 
76 #include "integer.inl"
Definition: common.hpp:18
+
signed int sint
32bit signed integer.
Definition: gtx/integer.hpp:55
+
GLM_FUNC_DECL uint nlz(uint x)
Returns the number of leading zeros.
+
GLM_FUNC_DECL uint mod(uint x, uint y)
Modulus.
+
GLM_FUNC_DECL unsigned int floor_log2(unsigned int x)
Returns the floor log2 of x.
+
GLM_FUNC_DECL uint pow(uint x, uint y)
Returns x raised to the y power.
+
GLM_FUNC_DECL genType factorial(genType const &x)
Return the factorial value of a number (!12 max, integer only) From GLM_GTX_integer extension...
+
GLM_FUNC_DECL uint sqrt(uint x)
Returns the positive square root of x.
+
+ + + + diff --git a/common/glm/doc/api/a01360.html b/common/glm/doc/api/a01360.html new file mode 100644 index 000000000..81965f7ea --- /dev/null +++ b/common/glm/doc/api/a01360.html @@ -0,0 +1,132 @@ + + + + + + + +0.9.9 API documenation: integer.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtx/integer.hpp File Reference
+
+
+ +

GLM_GTX_integer +More...

+ +

Go to the source code of this file.

+ + + + + +

+Typedefs

typedef signed int sint
 32bit signed integer. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL genType factorial (genType const &x)
 Return the factorial value of a number (!12 max, integer only) From GLM_GTX_integer extension. More...
 
GLM_FUNC_DECL unsigned int floor_log2 (unsigned int x)
 Returns the floor log2 of x. More...
 
GLM_FUNC_DECL int mod (int x, int y)
 Modulus. More...
 
GLM_FUNC_DECL uint mod (uint x, uint y)
 Modulus. More...
 
GLM_FUNC_DECL uint nlz (uint x)
 Returns the number of leading zeros. More...
 
GLM_FUNC_DECL int pow (int x, uint y)
 Returns x raised to the y power. More...
 
GLM_FUNC_DECL uint pow (uint x, uint y)
 Returns x raised to the y power. More...
 
GLM_FUNC_DECL int sqrt (int x)
 Returns the positive square root of x. More...
 
GLM_FUNC_DECL uint sqrt (uint x)
 Returns the positive square root of x. More...
 
+

Detailed Description

+

GLM_GTX_integer

+
See also
Core features (dependence)
+ +

Definition in file gtx/integer.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01360_source.html b/common/glm/doc/api/a01360_source.html new file mode 100644 index 000000000..d4c7b0957 --- /dev/null +++ b/common/glm/doc/api/a01360_source.html @@ -0,0 +1,89 @@ + + + + + + + +0.9.9 API documenation: integer.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtx/integer.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 #include "../gtc/integer.hpp"
18 
19 #ifndef GLM_ENABLE_EXPERIMENTAL
20 # error "GLM: GLM_GTX_integer is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
21 #endif
22 
23 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
24 # pragma message("GLM: GLM_GTX_integer extension included")
25 #endif
26 
27 namespace glm
28 {
31 
34  GLM_FUNC_DECL int pow(int x, uint y);
35 
38  GLM_FUNC_DECL int sqrt(int x);
39 
42  GLM_FUNC_DECL unsigned int floor_log2(unsigned int x);
43 
46  GLM_FUNC_DECL int mod(int x, int y);
47 
50  template<typename genType>
51  GLM_FUNC_DECL genType factorial(genType const& x);
52 
55  typedef signed int sint;
56 
59  GLM_FUNC_DECL uint pow(uint x, uint y);
60 
63  GLM_FUNC_DECL uint sqrt(uint x);
64 
67  GLM_FUNC_DECL uint mod(uint x, uint y);
68 
71  GLM_FUNC_DECL uint nlz(uint x);
72 
74 }//namespace glm
75 
76 #include "integer.inl"
signed int sint
32bit signed integer.
Definition: gtx/integer.hpp:55
+
GLM_FUNC_DECL uint nlz(uint x)
Returns the number of leading zeros.
+
GLM_FUNC_DECL uint mod(uint x, uint y)
Modulus.
+
GLM_FUNC_DECL genType factorial(genType const &x)
Return the factorial value of a number (!12 max, integer only) From GLM_GTX_integer extension...
+
GLM_FUNC_DECL unsigned int floor_log2(unsigned int x)
Returns the floor log2 of x.
+
GLM_FUNC_DECL uint sqrt(uint x)
Returns the positive square root of x.
+
Definition: common.hpp:18
+
GLM_FUNC_DECL uint pow(uint x, uint y)
Returns x raised to the y power.
+
+ + + + diff --git a/common/glm/doc/api/a01361.html b/common/glm/doc/api/a01361.html new file mode 100644 index 000000000..175ce86dd --- /dev/null +++ b/common/glm/doc/api/a01361.html @@ -0,0 +1,115 @@ + + + + + + + +0.9.9 API documenation: matrix_transform.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
ext/matrix_transform.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + +

+Functions

+template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType identity ()
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > lookAt (vec< 3, T, Q > const &eye, vec< 3, T, Q > const &center, vec< 3, T, Q > const &up)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > lookAtLH (vec< 3, T, Q > const &eye, vec< 3, T, Q > const &center, vec< 3, T, Q > const &up)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > lookAtRH (vec< 3, T, Q > const &eye, vec< 3, T, Q > const &center, vec< 3, T, Q > const &up)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > rotate (mat< 4, 4, T, Q > const &m, T angle, vec< 3, T, Q > const &axis)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > scale (mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > translate (mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &v)
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a01361_source.html b/common/glm/doc/api/a01361_source.html new file mode 100644 index 000000000..2a839c828 --- /dev/null +++ b/common/glm/doc/api/a01361_source.html @@ -0,0 +1,91 @@ + + + + + + + +0.9.9 API documenation: matrix_transform.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ext/matrix_transform.hpp
+
+
+Go to the documentation of this file.
1 
20 #pragma once
21 
22 // Dependencies
23 #include "../gtc/constants.hpp"
24 #include "../geometric.hpp"
25 #include "../trigonometric.hpp"
26 #include "../matrix.hpp"
27 
28 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
29 # pragma message("GLM: GLM_EXT_matrix_transform extension included")
30 #endif
31 
32 namespace glm
33 {
36 
38  template<typename genType>
39  GLM_FUNC_DECL GLM_CONSTEXPR genType identity();
40 
63  template<typename T, qualifier Q>
64  GLM_FUNC_DECL mat<4, 4, T, Q> translate(
65  mat<4, 4, T, Q> const& m, vec<3, T, Q> const& v);
66 
79  template<typename T, qualifier Q>
80  GLM_FUNC_DECL mat<4, 4, T, Q> rotate(
81  mat<4, 4, T, Q> const& m, T angle, vec<3, T, Q> const& axis);
82 
94  template<typename T, qualifier Q>
95  GLM_FUNC_DECL mat<4, 4, T, Q> scale(
96  mat<4, 4, T, Q> const& m, vec<3, T, Q> const& v);
97 
108  template<typename T, qualifier Q>
109  GLM_FUNC_DECL mat<4, 4, T, Q> lookAtRH(
110  vec<3, T, Q> const& eye, vec<3, T, Q> const& center, vec<3, T, Q> const& up);
111 
122  template<typename T, qualifier Q>
123  GLM_FUNC_DECL mat<4, 4, T, Q> lookAtLH(
124  vec<3, T, Q> const& eye, vec<3, T, Q> const& center, vec<3, T, Q> const& up);
125 
137  template<typename T, qualifier Q>
138  GLM_FUNC_DECL mat<4, 4, T, Q> lookAt(
139  vec<3, T, Q> const& eye, vec<3, T, Q> const& center, vec<3, T, Q> const& up);
140 
142 }//namespace glm
143 
144 #include "matrix_transform.inl"
GLM_FUNC_DECL mat< 4, 4, T, Q > translate(mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &v)
Builds a translation 4 * 4 matrix created from a vector of 3 components.
+
GLM_FUNC_DECL vec< 3, T, Q > axis(qua< T, Q > const &x)
Returns the q rotation axis.
+
GLM_FUNC_DECL GLM_CONSTEXPR genType identity()
Builds an identity matrix.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > scale(mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &v)
Builds a scale 4 * 4 matrix created from 3 scalars.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > rotate(mat< 4, 4, T, Q > const &m, T angle, vec< 3, T, Q > const &axis)
Builds a rotation 4 * 4 matrix created from an axis vector and an angle.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > lookAtRH(vec< 3, T, Q > const &eye, vec< 3, T, Q > const &center, vec< 3, T, Q > const &up)
Build a right handed look at view matrix.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > lookAtLH(vec< 3, T, Q > const &eye, vec< 3, T, Q > const &center, vec< 3, T, Q > const &up)
Build a left handed look at view matrix.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL T angle(qua< T, Q > const &x)
Returns the quaternion rotation angle.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > lookAt(vec< 3, T, Q > const &eye, vec< 3, T, Q > const &center, vec< 3, T, Q > const &up)
Build a look at view matrix based on the default handedness.
+
+ + + + diff --git a/common/glm/doc/api/a01362.html b/common/glm/doc/api/a01362.html new file mode 100644 index 000000000..2dda34461 --- /dev/null +++ b/common/glm/doc/api/a01362.html @@ -0,0 +1,107 @@ + + + + + + + +0.9.9 API documenation: matrix_transform.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
ext/matrix_transform.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > lookAt (vec< 3, T, Q > const &eye, vec< 3, T, Q > const &center, vec< 3, T, Q > const &up)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > lookAtLH (vec< 3, T, Q > const &eye, vec< 3, T, Q > const &center, vec< 3, T, Q > const &up)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > lookAtRH (vec< 3, T, Q > const &eye, vec< 3, T, Q > const &center, vec< 3, T, Q > const &up)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > rotate (mat< 4, 4, T, Q > const &m, T angle, vec< 3, T, Q > const &axis)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > scale (mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > translate (mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &v)
 
+
+ + + + diff --git a/common/glm/doc/api/a01362_source.html b/common/glm/doc/api/a01362_source.html new file mode 100644 index 000000000..8a8b01d8a --- /dev/null +++ b/common/glm/doc/api/a01362_source.html @@ -0,0 +1,91 @@ + + + + + + + +0.9.9 API documenation: matrix_transform.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ext/matrix_transform.hpp
+
+
+Go to the documentation of this file.
1 
20 #pragma once
21 
22 // Dependencies
23 #include "../gtc/constants.hpp"
24 #include "../geometric.hpp"
25 #include "../trigonometric.hpp"
26 #include "../matrix.hpp"
27 
28 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
29 # pragma message("GLM: GLM_EXT_matrix_transform extension included")
30 #endif
31 
32 namespace glm
33 {
36 
38  template<typename genType>
39  GLM_FUNC_DECL GLM_CONSTEXPR genType identity();
40 
63  template<typename T, qualifier Q>
64  GLM_FUNC_DECL mat<4, 4, T, Q> translate(
65  mat<4, 4, T, Q> const& m, vec<3, T, Q> const& v);
66 
79  template<typename T, qualifier Q>
80  GLM_FUNC_DECL mat<4, 4, T, Q> rotate(
81  mat<4, 4, T, Q> const& m, T angle, vec<3, T, Q> const& axis);
82 
94  template<typename T, qualifier Q>
95  GLM_FUNC_DECL mat<4, 4, T, Q> scale(
96  mat<4, 4, T, Q> const& m, vec<3, T, Q> const& v);
97 
108  template<typename T, qualifier Q>
109  GLM_FUNC_DECL mat<4, 4, T, Q> lookAtRH(
110  vec<3, T, Q> const& eye, vec<3, T, Q> const& center, vec<3, T, Q> const& up);
111 
122  template<typename T, qualifier Q>
123  GLM_FUNC_DECL mat<4, 4, T, Q> lookAtLH(
124  vec<3, T, Q> const& eye, vec<3, T, Q> const& center, vec<3, T, Q> const& up);
125 
137  template<typename T, qualifier Q>
138  GLM_FUNC_DECL mat<4, 4, T, Q> lookAt(
139  vec<3, T, Q> const& eye, vec<3, T, Q> const& center, vec<3, T, Q> const& up);
140 
142 }//namespace glm
143 
144 #include "matrix_transform.inl"
Definition: common.hpp:18
+
GLM_FUNC_DECL mat< 4, 4, T, Q > translate(mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &v)
Builds a translation 4 * 4 matrix created from a vector of 3 components.
+
GLM_FUNC_DECL vec< 3, T, Q > axis(qua< T, Q > const &x)
Returns the q rotation axis.
+
GLM_FUNC_DECL GLM_CONSTEXPR genType identity()
Builds an identity matrix.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > scale(mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &v)
Builds a scale 4 * 4 matrix created from 3 scalars.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > rotate(mat< 4, 4, T, Q > const &m, T angle, vec< 3, T, Q > const &axis)
Builds a rotation 4 * 4 matrix created from an axis vector and an angle.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > lookAtRH(vec< 3, T, Q > const &eye, vec< 3, T, Q > const &center, vec< 3, T, Q > const &up)
Build a right handed look at view matrix.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > lookAtLH(vec< 3, T, Q > const &eye, vec< 3, T, Q > const &center, vec< 3, T, Q > const &up)
Build a left handed look at view matrix.
+
GLM_FUNC_DECL T angle(qua< T, Q > const &x)
Returns the quaternion rotation angle.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > lookAt(vec< 3, T, Q > const &eye, vec< 3, T, Q > const &center, vec< 3, T, Q > const &up)
Build a look at view matrix based on the default handedness.
+
+ + + + diff --git a/common/glm/doc/api/a01363.html b/common/glm/doc/api/a01363.html new file mode 100644 index 000000000..68838ba8a --- /dev/null +++ b/common/glm/doc/api/a01363.html @@ -0,0 +1,126 @@ + + + + + + + +0.9.9 API documenation: matrix_transform.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
ext/matrix_transform.hpp File Reference
+
+
+ +

GLM_EXT_matrix_transform +More...

+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

+template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR genType identity ()
 Builds an identity matrix.
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > lookAt (vec< 3, T, Q > const &eye, vec< 3, T, Q > const &center, vec< 3, T, Q > const &up)
 Build a look at view matrix based on the default handedness. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > lookAtLH (vec< 3, T, Q > const &eye, vec< 3, T, Q > const &center, vec< 3, T, Q > const &up)
 Build a left handed look at view matrix. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > lookAtRH (vec< 3, T, Q > const &eye, vec< 3, T, Q > const &center, vec< 3, T, Q > const &up)
 Build a right handed look at view matrix. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > rotate (mat< 4, 4, T, Q > const &m, T angle, vec< 3, T, Q > const &axis)
 Builds a rotation 4 * 4 matrix created from an axis vector and an angle. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > scale (mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &v)
 Builds a scale 4 * 4 matrix created from 3 scalars. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > translate (mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &v)
 Builds a translation 4 * 4 matrix created from a vector of 3 components. More...
 
+

Detailed Description

+

GLM_EXT_matrix_transform

+
See also
Core features (dependence)
+ +

Definition in file ext/matrix_transform.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01363_source.html b/common/glm/doc/api/a01363_source.html new file mode 100644 index 000000000..1e6fe2b33 --- /dev/null +++ b/common/glm/doc/api/a01363_source.html @@ -0,0 +1,91 @@ + + + + + + + +0.9.9 API documenation: matrix_transform.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ext/matrix_transform.hpp
+
+
+Go to the documentation of this file.
1 
19 #pragma once
20 
21 // Dependencies
22 #include "../gtc/constants.hpp"
23 #include "../geometric.hpp"
24 #include "../trigonometric.hpp"
25 #include "../matrix.hpp"
26 
27 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
28 # pragma message("GLM: GLM_EXT_matrix_transform extension included")
29 #endif
30 
31 namespace glm
32 {
35 
37  template<typename genType>
38  GLM_FUNC_DECL GLM_CONSTEXPR genType identity();
39 
59  template<typename T, qualifier Q>
60  GLM_FUNC_DECL mat<4, 4, T, Q> translate(
61  mat<4, 4, T, Q> const& m, vec<3, T, Q> const& v);
62 
73  template<typename T, qualifier Q>
74  GLM_FUNC_DECL mat<4, 4, T, Q> rotate(
75  mat<4, 4, T, Q> const& m, T angle, vec<3, T, Q> const& axis);
76 
86  template<typename T, qualifier Q>
87  GLM_FUNC_DECL mat<4, 4, T, Q> scale(
88  mat<4, 4, T, Q> const& m, vec<3, T, Q> const& v);
89 
97  template<typename T, qualifier Q>
98  GLM_FUNC_DECL mat<4, 4, T, Q> lookAtRH(
99  vec<3, T, Q> const& eye, vec<3, T, Q> const& center, vec<3, T, Q> const& up);
100 
108  template<typename T, qualifier Q>
109  GLM_FUNC_DECL mat<4, 4, T, Q> lookAtLH(
110  vec<3, T, Q> const& eye, vec<3, T, Q> const& center, vec<3, T, Q> const& up);
111 
120  template<typename T, qualifier Q>
121  GLM_FUNC_DECL mat<4, 4, T, Q> lookAt(
122  vec<3, T, Q> const& eye, vec<3, T, Q> const& center, vec<3, T, Q> const& up);
123 
125 }//namespace glm
126 
127 #include "matrix_transform.inl"
GLM_FUNC_DECL mat< 4, 4, T, Q > rotate(mat< 4, 4, T, Q > const &m, T angle, vec< 3, T, Q > const &axis)
Builds a rotation 4 * 4 matrix created from an axis vector and an angle.
+
GLM_FUNC_DECL vec< 3, T, Q > axis(qua< T, Q > const &x)
Returns the q rotation axis.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > lookAtRH(vec< 3, T, Q > const &eye, vec< 3, T, Q > const &center, vec< 3, T, Q > const &up)
Build a right handed look at view matrix.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > translate(mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &v)
Builds a translation 4 * 4 matrix created from a vector of 3 components.
+
GLM_FUNC_DECL T angle(qua< T, Q > const &x)
Returns the quaternion rotation angle.
+
GLM_FUNC_DECL GLM_CONSTEXPR genType identity()
Builds an identity matrix.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > lookAt(vec< 3, T, Q > const &eye, vec< 3, T, Q > const &center, vec< 3, T, Q > const &up)
Build a look at view matrix based on the default handedness.
+
Definition: common.hpp:18
+
GLM_FUNC_DECL mat< 4, 4, T, Q > scale(mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &v)
Builds a scale 4 * 4 matrix created from 3 scalars.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > lookAtLH(vec< 3, T, Q > const &eye, vec< 3, T, Q > const &center, vec< 3, T, Q > const &up)
Build a left handed look at view matrix.
+
+ + + + diff --git a/common/glm/doc/api/a01364.html b/common/glm/doc/api/a01364.html new file mode 100644 index 000000000..3cefc7cc1 --- /dev/null +++ b/common/glm/doc/api/a01364.html @@ -0,0 +1,92 @@ + + + + + + + +0.9.9 API documenation: matrix_transform.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtc/matrix_transform.hpp File Reference
+
+ + + + + diff --git a/common/glm/doc/api/a01364_source.html b/common/glm/doc/api/a01364_source.html new file mode 100644 index 000000000..ad94b9188 --- /dev/null +++ b/common/glm/doc/api/a01364_source.html @@ -0,0 +1,81 @@ + + + + + + + +0.9.9 API documenation: matrix_transform.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtc/matrix_transform.hpp
+
+
+Go to the documentation of this file.
1 
21 #pragma once
22 
23 // Dependencies
24 #include "../mat4x4.hpp"
25 #include "../vec2.hpp"
26 #include "../vec3.hpp"
27 #include "../vec4.hpp"
28 #include "../ext/matrix_projection.hpp"
29 #include "../ext/matrix_clip_space.hpp"
30 #include "../ext/matrix_transform.hpp"
31 
32 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
33 # pragma message("GLM: GLM_GTC_matrix_transform extension included")
34 #endif
35 
36 #include "matrix_transform.inl"
+ + + + diff --git a/common/glm/doc/api/a01365.html b/common/glm/doc/api/a01365.html new file mode 100644 index 000000000..6d92997f3 --- /dev/null +++ b/common/glm/doc/api/a01365.html @@ -0,0 +1,91 @@ + + + + + + + +0.9.9 API documenation: matrix_transform.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtc/matrix_transform.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+
See also
Core features (dependence)
+
+GLM_GTX_transform
+
+GLM_GTX_transform2
+ +

Definition in file gtc/matrix_transform.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01365_source.html b/common/glm/doc/api/a01365_source.html new file mode 100644 index 000000000..a9dec095d --- /dev/null +++ b/common/glm/doc/api/a01365_source.html @@ -0,0 +1,81 @@ + + + + + + + +0.9.9 API documenation: matrix_transform.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtc/matrix_transform.hpp
+
+
+Go to the documentation of this file.
1 
21 #pragma once
22 
23 // Dependencies
24 #include "../mat4x4.hpp"
25 #include "../vec2.hpp"
26 #include "../vec3.hpp"
27 #include "../vec4.hpp"
28 #include "../ext/matrix_projection.hpp"
29 #include "../ext/matrix_clip_space.hpp"
30 #include "../ext/matrix_transform.hpp"
31 
32 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
33 # pragma message("GLM: GLM_GTC_matrix_transform extension included")
34 #endif
35 
36 #include "matrix_transform.inl"
+ + + + diff --git a/common/glm/doc/api/a01366.html b/common/glm/doc/api/a01366.html new file mode 100644 index 000000000..2226b6319 --- /dev/null +++ b/common/glm/doc/api/a01366.html @@ -0,0 +1,95 @@ + + + + + + + +0.9.9 API documenation: matrix_transform.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtc/matrix_transform.hpp File Reference
+
+ + + + + diff --git a/common/glm/doc/api/a01366_source.html b/common/glm/doc/api/a01366_source.html new file mode 100644 index 000000000..a2d1a1a5d --- /dev/null +++ b/common/glm/doc/api/a01366_source.html @@ -0,0 +1,81 @@ + + + + + + + +0.9.9 API documenation: matrix_transform.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtc/matrix_transform.hpp
+
+
+Go to the documentation of this file.
1 
21 #pragma once
22 
23 // Dependencies
24 #include "../mat4x4.hpp"
25 #include "../vec2.hpp"
26 #include "../vec3.hpp"
27 #include "../vec4.hpp"
28 #include "../ext/matrix_projection.hpp"
29 #include "../ext/matrix_clip_space.hpp"
30 #include "../ext/matrix_transform.hpp"
31 
32 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
33 # pragma message("GLM: GLM_GTC_matrix_transform extension included")
34 #endif
35 
36 #include "matrix_transform.inl"
+ + + + diff --git a/common/glm/doc/api/a01367.html b/common/glm/doc/api/a01367.html new file mode 100644 index 000000000..2b989b1a9 --- /dev/null +++ b/common/glm/doc/api/a01367.html @@ -0,0 +1,242 @@ + + + + + + + +0.9.9 API documenation: packing.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtc/packing.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

GLM_FUNC_DECL uint32 packF2x11_1x10 (vec3 const &v)
 
GLM_FUNC_DECL uint32 packF3x9_E1x5 (vec3 const &v)
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL vec< L, uint16, Q > packHalf (vec< L, float, Q > const &v)
 
GLM_FUNC_DECL uint16 packHalf1x16 (float v)
 
GLM_FUNC_DECL uint64 packHalf4x16 (vec4 const &v)
 
GLM_FUNC_DECL uint32 packI3x10_1x2 (ivec4 const &v)
 
GLM_FUNC_DECL int packInt2x16 (i16vec2 const &v)
 
GLM_FUNC_DECL int64 packInt2x32 (i32vec2 const &v)
 
GLM_FUNC_DECL int16 packInt2x8 (i8vec2 const &v)
 
GLM_FUNC_DECL int64 packInt4x16 (i16vec4 const &v)
 
GLM_FUNC_DECL int32 packInt4x8 (i8vec4 const &v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > packRGBM (vec< 3, T, Q > const &rgb)
 
template<typename intType , length_t L, typename floatType , qualifier Q>
GLM_FUNC_DECL vec< L, intType, Q > packSnorm (vec< L, floatType, Q > const &v)
 
GLM_FUNC_DECL uint16 packSnorm1x16 (float v)
 
GLM_FUNC_DECL uint8 packSnorm1x8 (float s)
 
GLM_FUNC_DECL uint16 packSnorm2x8 (vec2 const &v)
 
GLM_FUNC_DECL uint32 packSnorm3x10_1x2 (vec4 const &v)
 
GLM_FUNC_DECL uint64 packSnorm4x16 (vec4 const &v)
 
GLM_FUNC_DECL uint32 packU3x10_1x2 (uvec4 const &v)
 
GLM_FUNC_DECL uint packUint2x16 (u16vec2 const &v)
 
GLM_FUNC_DECL uint64 packUint2x32 (u32vec2 const &v)
 
GLM_FUNC_DECL uint16 packUint2x8 (u8vec2 const &v)
 
GLM_FUNC_DECL uint64 packUint4x16 (u16vec4 const &v)
 
GLM_FUNC_DECL uint32 packUint4x8 (u8vec4 const &v)
 
template<typename uintType , length_t L, typename floatType , qualifier Q>
GLM_FUNC_DECL vec< L, uintType, Q > packUnorm (vec< L, floatType, Q > const &v)
 
GLM_FUNC_DECL uint16 packUnorm1x16 (float v)
 
GLM_FUNC_DECL uint16 packUnorm1x5_1x6_1x5 (vec3 const &v)
 
GLM_FUNC_DECL uint8 packUnorm1x8 (float v)
 
GLM_FUNC_DECL uint8 packUnorm2x3_1x2 (vec3 const &v)
 
GLM_FUNC_DECL uint8 packUnorm2x4 (vec2 const &v)
 
GLM_FUNC_DECL uint16 packUnorm2x8 (vec2 const &v)
 
GLM_FUNC_DECL uint32 packUnorm3x10_1x2 (vec4 const &v)
 
GLM_FUNC_DECL uint16 packUnorm3x5_1x1 (vec4 const &v)
 
GLM_FUNC_DECL uint64 packUnorm4x16 (vec4 const &v)
 
GLM_FUNC_DECL uint16 packUnorm4x4 (vec4 const &v)
 
GLM_FUNC_DECL vec3 unpackF2x11_1x10 (uint32 p)
 
GLM_FUNC_DECL vec3 unpackF3x9_E1x5 (uint32 p)
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL vec< L, float, Q > unpackHalf (vec< L, uint16, Q > const &p)
 
GLM_FUNC_DECL float unpackHalf1x16 (uint16 v)
 
GLM_FUNC_DECL vec4 unpackHalf4x16 (uint64 p)
 
GLM_FUNC_DECL ivec4 unpackI3x10_1x2 (uint32 p)
 
GLM_FUNC_DECL i16vec2 unpackInt2x16 (int p)
 
GLM_FUNC_DECL i32vec2 unpackInt2x32 (int64 p)
 
GLM_FUNC_DECL i8vec2 unpackInt2x8 (int16 p)
 
GLM_FUNC_DECL i16vec4 unpackInt4x16 (int64 p)
 
GLM_FUNC_DECL i8vec4 unpackInt4x8 (int32 p)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > unpackRGBM (vec< 4, T, Q > const &rgbm)
 
template<typename floatType , length_t L, typename intType , qualifier Q>
GLM_FUNC_DECL vec< L, floatType, Q > unpackSnorm (vec< L, intType, Q > const &v)
 
GLM_FUNC_DECL float unpackSnorm1x16 (uint16 p)
 
GLM_FUNC_DECL float unpackSnorm1x8 (uint8 p)
 
GLM_FUNC_DECL vec2 unpackSnorm2x8 (uint16 p)
 
GLM_FUNC_DECL vec4 unpackSnorm3x10_1x2 (uint32 p)
 
GLM_FUNC_DECL vec4 unpackSnorm4x16 (uint64 p)
 
GLM_FUNC_DECL uvec4 unpackU3x10_1x2 (uint32 p)
 
GLM_FUNC_DECL u16vec2 unpackUint2x16 (uint p)
 
GLM_FUNC_DECL u32vec2 unpackUint2x32 (uint64 p)
 
GLM_FUNC_DECL u8vec2 unpackUint2x8 (uint16 p)
 
GLM_FUNC_DECL u16vec4 unpackUint4x16 (uint64 p)
 
GLM_FUNC_DECL u8vec4 unpackUint4x8 (uint32 p)
 
template<typename floatType , length_t L, typename uintType , qualifier Q>
GLM_FUNC_DECL vec< L, floatType, Q > unpackUnorm (vec< L, uintType, Q > const &v)
 
GLM_FUNC_DECL float unpackUnorm1x16 (uint16 p)
 
GLM_FUNC_DECL vec3 unpackUnorm1x5_1x6_1x5 (uint16 p)
 
GLM_FUNC_DECL float unpackUnorm1x8 (uint8 p)
 
GLM_FUNC_DECL vec3 unpackUnorm2x3_1x2 (uint8 p)
 
GLM_FUNC_DECL vec2 unpackUnorm2x4 (uint8 p)
 
GLM_FUNC_DECL vec2 unpackUnorm2x8 (uint16 p)
 
GLM_FUNC_DECL vec4 unpackUnorm3x10_1x2 (uint32 p)
 
GLM_FUNC_DECL vec4 unpackUnorm3x5_1x1 (uint16 p)
 
GLM_FUNC_DECL vec4 unpackUnorm4x16 (uint64 p)
 
GLM_FUNC_DECL vec4 unpackUnorm4x4 (uint16 p)
 
+

Detailed Description

+

GLM_GTC_packing

+
See also
Core features (dependence)
+ +

Definition in file gtc/packing.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01367_source.html b/common/glm/doc/api/a01367_source.html new file mode 100644 index 000000000..ebe662680 --- /dev/null +++ b/common/glm/doc/api/a01367_source.html @@ -0,0 +1,170 @@ + + + + + + + +0.9.9 API documenation: packing.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtc/packing.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "type_precision.hpp"
18 
19 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
20 # pragma message("GLM: GLM_GTC_packing extension included")
21 #endif
22 
23 namespace glm
24 {
27 
39  GLM_FUNC_DECL uint8 packUnorm1x8(float v);
40 
51  GLM_FUNC_DECL float unpackUnorm1x8(uint8 p);
52 
67  GLM_FUNC_DECL uint16 packUnorm2x8(vec2 const& v);
68 
83  GLM_FUNC_DECL vec2 unpackUnorm2x8(uint16 p);
84 
96  GLM_FUNC_DECL uint8 packSnorm1x8(float s);
97 
109  GLM_FUNC_DECL float unpackSnorm1x8(uint8 p);
110 
125  GLM_FUNC_DECL uint16 packSnorm2x8(vec2 const& v);
126 
141  GLM_FUNC_DECL vec2 unpackSnorm2x8(uint16 p);
142 
154  GLM_FUNC_DECL uint16 packUnorm1x16(float v);
155 
167  GLM_FUNC_DECL float unpackUnorm1x16(uint16 p);
168 
183  GLM_FUNC_DECL uint64 packUnorm4x16(vec4 const& v);
184 
199  GLM_FUNC_DECL vec4 unpackUnorm4x16(uint64 p);
200 
212  GLM_FUNC_DECL uint16 packSnorm1x16(float v);
213 
225  GLM_FUNC_DECL float unpackSnorm1x16(uint16 p);
226 
241  GLM_FUNC_DECL uint64 packSnorm4x16(vec4 const& v);
242 
257  GLM_FUNC_DECL vec4 unpackSnorm4x16(uint64 p);
258 
268  GLM_FUNC_DECL uint16 packHalf1x16(float v);
269 
279  GLM_FUNC_DECL float unpackHalf1x16(uint16 v);
280 
292  GLM_FUNC_DECL uint64 packHalf4x16(vec4 const& v);
293 
305  GLM_FUNC_DECL vec4 unpackHalf4x16(uint64 p);
306 
318  GLM_FUNC_DECL uint32 packI3x10_1x2(ivec4 const& v);
319 
329  GLM_FUNC_DECL ivec4 unpackI3x10_1x2(uint32 p);
330 
342  GLM_FUNC_DECL uint32 packU3x10_1x2(uvec4 const& v);
343 
353  GLM_FUNC_DECL uvec4 unpackU3x10_1x2(uint32 p);
354 
371  GLM_FUNC_DECL uint32 packSnorm3x10_1x2(vec4 const& v);
372 
388  GLM_FUNC_DECL vec4 unpackSnorm3x10_1x2(uint32 p);
389 
406  GLM_FUNC_DECL uint32 packUnorm3x10_1x2(vec4 const& v);
407 
423  GLM_FUNC_DECL vec4 unpackUnorm3x10_1x2(uint32 p);
424 
434  GLM_FUNC_DECL uint32 packF2x11_1x10(vec3 const& v);
435 
444  GLM_FUNC_DECL vec3 unpackF2x11_1x10(uint32 p);
445 
446 
458  GLM_FUNC_DECL uint32 packF3x9_E1x5(vec3 const& v);
459 
470  GLM_FUNC_DECL vec3 unpackF3x9_E1x5(uint32 p);
471 
480  template<length_t L, typename T, qualifier Q>
481  GLM_FUNC_DECL vec<4, T, Q> packRGBM(vec<3, T, Q> const& rgb);
482 
490  template<length_t L, typename T, qualifier Q>
491  GLM_FUNC_DECL vec<3, T, Q> unpackRGBM(vec<4, T, Q> const& rgbm);
492 
501  template<length_t L, qualifier Q>
502  GLM_FUNC_DECL vec<L, uint16, Q> packHalf(vec<L, float, Q> const& v);
503 
511  template<length_t L, qualifier Q>
512  GLM_FUNC_DECL vec<L, float, Q> unpackHalf(vec<L, uint16, Q> const& p);
513 
518  template<typename uintType, length_t L, typename floatType, qualifier Q>
519  GLM_FUNC_DECL vec<L, uintType, Q> packUnorm(vec<L, floatType, Q> const& v);
520 
525  template<typename floatType, length_t L, typename uintType, qualifier Q>
526  GLM_FUNC_DECL vec<L, floatType, Q> unpackUnorm(vec<L, uintType, Q> const& v);
527 
532  template<typename intType, length_t L, typename floatType, qualifier Q>
533  GLM_FUNC_DECL vec<L, intType, Q> packSnorm(vec<L, floatType, Q> const& v);
534 
539  template<typename floatType, length_t L, typename intType, qualifier Q>
540  GLM_FUNC_DECL vec<L, floatType, Q> unpackSnorm(vec<L, intType, Q> const& v);
541 
546  GLM_FUNC_DECL uint8 packUnorm2x4(vec2 const& v);
547 
552  GLM_FUNC_DECL vec2 unpackUnorm2x4(uint8 p);
553 
558  GLM_FUNC_DECL uint16 packUnorm4x4(vec4 const& v);
559 
564  GLM_FUNC_DECL vec4 unpackUnorm4x4(uint16 p);
565 
570  GLM_FUNC_DECL uint16 packUnorm1x5_1x6_1x5(vec3 const& v);
571 
576  GLM_FUNC_DECL vec3 unpackUnorm1x5_1x6_1x5(uint16 p);
577 
582  GLM_FUNC_DECL uint16 packUnorm3x5_1x1(vec4 const& v);
583 
588  GLM_FUNC_DECL vec4 unpackUnorm3x5_1x1(uint16 p);
589 
594  GLM_FUNC_DECL uint8 packUnorm2x3_1x2(vec3 const& v);
595 
600  GLM_FUNC_DECL vec3 unpackUnorm2x3_1x2(uint8 p);
601 
602 
603 
608  GLM_FUNC_DECL int16 packInt2x8(i8vec2 const& v);
609 
614  GLM_FUNC_DECL i8vec2 unpackInt2x8(int16 p);
615 
620  GLM_FUNC_DECL uint16 packUint2x8(u8vec2 const& v);
621 
626  GLM_FUNC_DECL u8vec2 unpackUint2x8(uint16 p);
627 
632  GLM_FUNC_DECL int32 packInt4x8(i8vec4 const& v);
633 
638  GLM_FUNC_DECL i8vec4 unpackInt4x8(int32 p);
639 
644  GLM_FUNC_DECL uint32 packUint4x8(u8vec4 const& v);
645 
650  GLM_FUNC_DECL u8vec4 unpackUint4x8(uint32 p);
651 
656  GLM_FUNC_DECL int packInt2x16(i16vec2 const& v);
657 
662  GLM_FUNC_DECL i16vec2 unpackInt2x16(int p);
663 
668  GLM_FUNC_DECL int64 packInt4x16(i16vec4 const& v);
669 
674  GLM_FUNC_DECL i16vec4 unpackInt4x16(int64 p);
675 
680  GLM_FUNC_DECL uint packUint2x16(u16vec2 const& v);
681 
686  GLM_FUNC_DECL u16vec2 unpackUint2x16(uint p);
687 
692  GLM_FUNC_DECL uint64 packUint4x16(u16vec4 const& v);
693 
698  GLM_FUNC_DECL u16vec4 unpackUint4x16(uint64 p);
699 
704  GLM_FUNC_DECL int64 packInt2x32(i32vec2 const& v);
705 
710  GLM_FUNC_DECL i32vec2 unpackInt2x32(int64 p);
711 
716  GLM_FUNC_DECL uint64 packUint2x32(u32vec2 const& v);
717 
722  GLM_FUNC_DECL u32vec2 unpackUint2x32(uint64 p);
723 
724 
726 }// namespace glm
727 
728 #include "packing.inl"
GLM_FUNC_DECL vec4 unpackHalf4x16(uint64 p)
Returns a four-component floating-point vector with components obtained by unpacking a 64-bit unsigne...
+
GLM_FUNC_DECL uint8 packUnorm2x4(vec2 const &v)
Convert each component of the normalized floating-point vector into unsigned integer values...
+
GLM_FUNC_DECL uint16 packUnorm1x16(float v)
First, converts the normalized floating-point value v into a 16-bit integer value.
+
GLM_FUNC_DECL int64 packInt4x16(i16vec4 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL u32vec2 unpackUint2x32(uint64 p)
Convert a packed integer into an integer vector.
+
GLM_FUNC_DECL uint8 packUnorm2x3_1x2(vec3 const &v)
Convert each component of the normalized floating-point vector into unsigned integer values...
+
GLM_FUNC_DECL vec3 unpackUnorm1x5_1x6_1x5(uint16 p)
Convert a packed integer to a normalized floating-point vector.
+
GLM_FUNC_DECL vec4 unpackUnorm4x4(uint16 p)
Convert a packed integer to a normalized floating-point vector.
+
vec< 4, i16, defaultp > i16vec4
16 bit signed integer vector of 4 components type.
Definition: fwd.hpp:260
+
GLM_FUNC_DECL uint64 packUint2x32(u32vec2 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL uint16 packSnorm2x8(vec2 const &v)
First, converts each component of the normalized floating-point value v into 8-bit integer values...
+
GLM_FUNC_DECL uint64 packUint4x16(u16vec4 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL uint8 packSnorm1x8(float s)
First, converts the normalized floating-point value v into 8-bit integer value.
+
GLM_FUNC_DECL uint32 packSnorm3x10_1x2(vec4 const &v)
First, converts the first three components of the normalized floating-point value v into 10-bit signe...
+
vec< 2, i32, defaultp > i32vec2
32 bit signed integer vector of 2 components type.
Definition: fwd.hpp:278
+
vec< 4, unsigned int, defaultp > uvec4
4 components vector of unsigned integer numbers.
+
GLM_FUNC_DECL vec3 unpackUnorm2x3_1x2(uint8 p)
Convert a packed integer to a normalized floating-point vector.
+
GLM_FUNC_DECL uint64 packSnorm4x16(vec4 const &v)
First, converts each component of the normalized floating-point value v into 16-bit integer values...
+
GLM_FUNC_DECL vec< L, floatType, Q > unpackUnorm(vec< L, uintType, Q > const &v)
Convert a packed integer to a normalized floating-point vector.
+
vec< 2, i8, defaultp > i8vec2
8 bit signed integer vector of 2 components type.
Definition: fwd.hpp:238
+
vec< 2, float, defaultp > vec2
2 components vector of single-precision floating-point numbers.
+
GLM_FUNC_DECL float unpackHalf1x16(uint16 v)
Returns a floating-point scalar with components obtained by unpacking a 16-bit unsigned integer into ...
+
GLM_FUNC_DECL uint16 packHalf1x16(float v)
Returns an unsigned integer obtained by converting the components of a floating-point scalar to the 1...
+
GLM_FUNC_DECL uint packUint2x16(u16vec2 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL uint64 packHalf4x16(vec4 const &v)
Returns an unsigned integer obtained by converting the components of a four-component floating-point ...
+
vec< 2, u8, defaultp > u8vec2
Default qualifier 8 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:340
+
vec< 2, i16, defaultp > i16vec2
16 bit signed integer vector of 2 components type.
Definition: fwd.hpp:258
+
GLM_FUNC_DECL i32vec2 unpackInt2x32(int64 p)
Convert a packed integer into an integer vector.
+
GLM_FUNC_DECL ivec4 unpackI3x10_1x2(uint32 p)
Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit signed integers...
+
GLM_FUNC_DECL vec4 unpackSnorm4x16(uint64 p)
First, unpacks a single 64-bit unsigned integer p into four 16-bit signed integers.
+
GLM_FUNC_DECL vec< L, float, Q > unpackHalf(vec< L, uint16, Q > const &p)
Returns a floating-point vector with components obtained by reinterpreting an integer vector as 16-bi...
+
GLM_FUNC_DECL vec2 unpackSnorm2x8(uint16 p)
First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit signed integers.
+
vec< 4, float, defaultp > vec4
4 components vector of single-precision floating-point numbers.
+
GLM_FUNC_DECL u16vec2 unpackUint2x16(uint p)
Convert a packed integer into an integer vector.
+
GLM_FUNC_DECL uint16 packUnorm2x8(vec2 const &v)
First, converts each component of the normalized floating-point value v into 8-bit integer values...
+
GLM_FUNC_DECL vec< 3, T, Q > unpackRGBM(vec< 4, T, Q > const &rgbm)
Returns a floating-point vector with components obtained by reinterpreting an integer vector as 16-bi...
+
GLM_FUNC_DECL uint32 packI3x10_1x2(ivec4 const &v)
Returns an unsigned integer obtained by converting the components of a four-component signed integer ...
+
GLM_FUNC_DECL uint8 packUnorm1x8(float v)
First, converts the normalized floating-point value v into a 8-bit integer value. ...
+
GLM_FUNC_DECL i8vec4 unpackInt4x8(int32 p)
Convert a packed integer into an integer vector.
+
GLM_FUNC_DECL float unpackSnorm1x8(uint8 p)
First, unpacks a single 8-bit unsigned integer p into a single 8-bit signed integers.
+
GLM_FUNC_DECL vec< 4, T, Q > packRGBM(vec< 3, T, Q > const &rgb)
Returns an unsigned integer vector obtained by converting the components of a floating-point vector t...
+
GLM_FUNC_DECL int32 packInt4x8(i8vec4 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL vec4 unpackUnorm3x10_1x2(uint32 p)
First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers.
+
vec< 3, float, defaultp > vec3
3 components vector of single-precision floating-point numbers.
+
vec< 4, i8, defaultp > i8vec4
8 bit signed integer vector of 4 components type.
Definition: fwd.hpp:240
+
GLM_FUNC_DECL uint32 packUnorm3x10_1x2(vec4 const &v)
First, converts the first three components of the normalized floating-point value v into 10-bit unsig...
+
GLM_FUNC_DECL uvec4 unpackU3x10_1x2(uint32 p)
Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit unsigned integers...
+
GLM_FUNC_DECL vec3 unpackF2x11_1x10(uint32 p)
First, unpacks a single 32-bit unsigned integer p into two 11-bit signless floating-point values and ...
+
detail::uint64 uint64
64 bit unsigned integer type.
+
GLM_GTC_type_precision
+
vec< 4, u16, defaultp > u16vec4
Default qualifier 16 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:362
+
GLM_FUNC_DECL vec2 unpackUnorm2x8(uint16 p)
First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit unsigned integers.
+
GLM_FUNC_DECL vec3 unpackF3x9_E1x5(uint32 p)
First, unpacks a single 32-bit unsigned integer p into two 11-bit signless floating-point values and ...
+
GLM_FUNC_DECL vec4 unpackUnorm3x5_1x1(uint16 p)
Convert a packed integer to a normalized floating-point vector.
+
GLM_FUNC_DECL uint16 packUnorm1x5_1x6_1x5(vec3 const &v)
Convert each component of the normalized floating-point vector into unsigned integer values...
+
GLM_FUNC_DECL i8vec2 unpackInt2x8(int16 p)
Convert a packed integer into an integer vector.
+
GLM_FUNC_DECL uint32 packUint4x8(u8vec4 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL uint64 packUnorm4x16(vec4 const &v)
First, converts each component of the normalized floating-point value v into 16-bit integer values...
+
GLM_FUNC_DECL u16vec4 unpackUint4x16(uint64 p)
Convert a packed integer into an integer vector.
+
GLM_FUNC_DECL u8vec2 unpackUint2x8(uint16 p)
Convert a packed integer into an integer vector.
+
detail::int64 int64
64 bit signed integer type.
+
GLM_FUNC_DECL uint32 packU3x10_1x2(uvec4 const &v)
Returns an unsigned integer obtained by converting the components of a four-component unsigned intege...
+
GLM_FUNC_DECL i16vec2 unpackInt2x16(int p)
Convert a packed integer into an integer vector.
+
GLM_FUNC_DECL uint16 packUnorm4x4(vec4 const &v)
Convert each component of the normalized floating-point vector into unsigned integer values...
+
GLM_FUNC_DECL vec4 unpackUnorm4x16(uint64 p)
First, unpacks a single 64-bit unsigned integer p into four 16-bit unsigned integers.
+
GLM_FUNC_DECL uint32 packF3x9_E1x5(vec3 const &v)
First, converts the first two components of the normalized floating-point value v into 11-bit signles...
+
vec< 2, u32, defaultp > u32vec2
Default qualifier 32 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:380
+
GLM_FUNC_DECL vec2 unpackUnorm2x4(uint8 p)
Convert a packed integer to a normalized floating-point vector.
+
GLM_FUNC_DECL uint16 packSnorm1x16(float v)
First, converts the normalized floating-point value v into 16-bit integer value.
+
GLM_FUNC_DECL vec< L, intType, Q > packSnorm(vec< L, floatType, Q > const &v)
Convert each component of the normalized floating-point vector into signed integer values...
+
GLM_FUNC_DECL uint32 packF2x11_1x10(vec3 const &v)
First, converts the first two components of the normalized floating-point value v into 11-bit signles...
+
GLM_FUNC_DECL float unpackUnorm1x8(uint8 p)
Convert a single 8-bit integer to a normalized floating-point value.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL vec4 unpackSnorm3x10_1x2(uint32 p)
First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers.
+
vec< 4, u8, defaultp > u8vec4
Default qualifier 8 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:342
+
GLM_FUNC_DECL int packInt2x16(i16vec2 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL vec< L, floatType, Q > unpackSnorm(vec< L, intType, Q > const &v)
Convert a packed integer to a normalized floating-point vector.
+
GLM_FUNC_DECL vec< L, uintType, Q > packUnorm(vec< L, floatType, Q > const &v)
Convert each component of the normalized floating-point vector into unsigned integer values...
+
GLM_FUNC_DECL uint16 packUint2x8(u8vec2 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL int16 packInt2x8(i8vec2 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL uint16 packUnorm3x5_1x1(vec4 const &v)
Convert each component of the normalized floating-point vector into unsigned integer values...
+
GLM_FUNC_DECL vec< L, uint16, Q > packHalf(vec< L, float, Q > const &v)
Returns an unsigned integer vector obtained by converting the components of a floating-point vector t...
+
GLM_FUNC_DECL float unpackSnorm1x16(uint16 p)
First, unpacks a single 16-bit unsigned integer p into a single 16-bit signed integers.
+
vec< 2, u16, defaultp > u16vec2
Default qualifier 16 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:360
+
GLM_FUNC_DECL float unpackUnorm1x16(uint16 p)
First, unpacks a single 16-bit unsigned integer p into a of 16-bit unsigned integers.
+
GLM_FUNC_DECL i16vec4 unpackInt4x16(int64 p)
Convert a packed integer into an integer vector.
+
vec< 4, int, defaultp > ivec4
4 components vector of signed integer numbers.
Definition: vector_int4.hpp:15
+
GLM_FUNC_DECL int64 packInt2x32(i32vec2 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL u8vec4 unpackUint4x8(uint32 p)
Convert a packed integer into an integer vector.
+
+ + + + diff --git a/common/glm/doc/api/a01368.html b/common/glm/doc/api/a01368.html new file mode 100644 index 000000000..969c9e6e5 --- /dev/null +++ b/common/glm/doc/api/a01368.html @@ -0,0 +1,241 @@ + + + + + + + +0.9.9 API documenation: packing.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtc/packing.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

GLM_FUNC_DECL uint32 packF2x11_1x10 (vec3 const &v)
 
GLM_FUNC_DECL uint32 packF3x9_E1x5 (vec3 const &v)
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL vec< L, uint16, Q > packHalf (vec< L, float, Q > const &v)
 
GLM_FUNC_DECL uint16 packHalf1x16 (float v)
 
GLM_FUNC_DECL uint64 packHalf4x16 (vec4 const &v)
 
GLM_FUNC_DECL uint32 packI3x10_1x2 (ivec4 const &v)
 
GLM_FUNC_DECL int packInt2x16 (i16vec2 const &v)
 
GLM_FUNC_DECL int64 packInt2x32 (i32vec2 const &v)
 
GLM_FUNC_DECL int16 packInt2x8 (i8vec2 const &v)
 
GLM_FUNC_DECL int64 packInt4x16 (i16vec4 const &v)
 
GLM_FUNC_DECL int32 packInt4x8 (i8vec4 const &v)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > packRGBM (vec< 3, T, Q > const &rgb)
 
template<typename intType , length_t L, typename floatType , qualifier Q>
GLM_FUNC_DECL vec< L, intType, Q > packSnorm (vec< L, floatType, Q > const &v)
 
GLM_FUNC_DECL uint16 packSnorm1x16 (float v)
 
GLM_FUNC_DECL uint8 packSnorm1x8 (float s)
 
GLM_FUNC_DECL uint16 packSnorm2x8 (vec2 const &v)
 
GLM_FUNC_DECL uint32 packSnorm3x10_1x2 (vec4 const &v)
 
GLM_FUNC_DECL uint64 packSnorm4x16 (vec4 const &v)
 
GLM_FUNC_DECL uint32 packU3x10_1x2 (uvec4 const &v)
 
GLM_FUNC_DECL uint packUint2x16 (u16vec2 const &v)
 
GLM_FUNC_DECL uint64 packUint2x32 (u32vec2 const &v)
 
GLM_FUNC_DECL uint16 packUint2x8 (u8vec2 const &v)
 
GLM_FUNC_DECL uint64 packUint4x16 (u16vec4 const &v)
 
GLM_FUNC_DECL uint32 packUint4x8 (u8vec4 const &v)
 
template<typename uintType , length_t L, typename floatType , qualifier Q>
GLM_FUNC_DECL vec< L, uintType, Q > packUnorm (vec< L, floatType, Q > const &v)
 
GLM_FUNC_DECL uint16 packUnorm1x16 (float v)
 
GLM_FUNC_DECL uint16 packUnorm1x5_1x6_1x5 (vec3 const &v)
 
GLM_FUNC_DECL uint8 packUnorm1x8 (float v)
 
GLM_FUNC_DECL uint8 packUnorm2x3_1x2 (vec3 const &v)
 
GLM_FUNC_DECL uint8 packUnorm2x4 (vec2 const &v)
 
GLM_FUNC_DECL uint16 packUnorm2x8 (vec2 const &v)
 
GLM_FUNC_DECL uint32 packUnorm3x10_1x2 (vec4 const &v)
 
GLM_FUNC_DECL uint16 packUnorm3x5_1x1 (vec4 const &v)
 
GLM_FUNC_DECL uint64 packUnorm4x16 (vec4 const &v)
 
GLM_FUNC_DECL uint16 packUnorm4x4 (vec4 const &v)
 
GLM_FUNC_DECL vec3 unpackF2x11_1x10 (uint32 p)
 
GLM_FUNC_DECL vec3 unpackF3x9_E1x5 (uint32 p)
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL vec< L, float, Q > unpackHalf (vec< L, uint16, Q > const &p)
 
GLM_FUNC_DECL float unpackHalf1x16 (uint16 v)
 
GLM_FUNC_DECL vec4 unpackHalf4x16 (uint64 p)
 
GLM_FUNC_DECL ivec4 unpackI3x10_1x2 (uint32 p)
 
GLM_FUNC_DECL i16vec2 unpackInt2x16 (int p)
 
GLM_FUNC_DECL i32vec2 unpackInt2x32 (int64 p)
 
GLM_FUNC_DECL i8vec2 unpackInt2x8 (int16 p)
 
GLM_FUNC_DECL i16vec4 unpackInt4x16 (int64 p)
 
GLM_FUNC_DECL i8vec4 unpackInt4x8 (int32 p)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > unpackRGBM (vec< 4, T, Q > const &rgbm)
 
template<typename floatType , length_t L, typename intType , qualifier Q>
GLM_FUNC_DECL vec< L, floatType, Q > unpackSnorm (vec< L, intType, Q > const &v)
 
GLM_FUNC_DECL float unpackSnorm1x16 (uint16 p)
 
GLM_FUNC_DECL float unpackSnorm1x8 (uint8 p)
 
GLM_FUNC_DECL vec2 unpackSnorm2x8 (uint16 p)
 
GLM_FUNC_DECL vec4 unpackSnorm3x10_1x2 (uint32 p)
 
GLM_FUNC_DECL vec4 unpackSnorm4x16 (uint64 p)
 
GLM_FUNC_DECL uvec4 unpackU3x10_1x2 (uint32 p)
 
GLM_FUNC_DECL u16vec2 unpackUint2x16 (uint p)
 
GLM_FUNC_DECL u32vec2 unpackUint2x32 (uint64 p)
 
GLM_FUNC_DECL u8vec2 unpackUint2x8 (uint16 p)
 
GLM_FUNC_DECL u16vec4 unpackUint4x16 (uint64 p)
 
GLM_FUNC_DECL u8vec4 unpackUint4x8 (uint32 p)
 
template<typename floatType , length_t L, typename uintType , qualifier Q>
GLM_FUNC_DECL vec< L, floatType, Q > unpackUnorm (vec< L, uintType, Q > const &v)
 
GLM_FUNC_DECL float unpackUnorm1x16 (uint16 p)
 
GLM_FUNC_DECL vec3 unpackUnorm1x5_1x6_1x5 (uint16 p)
 
GLM_FUNC_DECL float unpackUnorm1x8 (uint8 p)
 
GLM_FUNC_DECL vec3 unpackUnorm2x3_1x2 (uint8 p)
 
GLM_FUNC_DECL vec2 unpackUnorm2x4 (uint8 p)
 
GLM_FUNC_DECL vec2 unpackUnorm2x8 (uint16 p)
 
GLM_FUNC_DECL vec4 unpackUnorm3x10_1x2 (uint32 p)
 
GLM_FUNC_DECL vec4 unpackUnorm3x5_1x1 (uint16 p)
 
GLM_FUNC_DECL vec4 unpackUnorm4x16 (uint64 p)
 
GLM_FUNC_DECL vec4 unpackUnorm4x4 (uint16 p)
 
+

Detailed Description

+
See also
Core features (dependence)
+ +

Definition in file gtc/packing.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01368_source.html b/common/glm/doc/api/a01368_source.html new file mode 100644 index 000000000..d088fbeb8 --- /dev/null +++ b/common/glm/doc/api/a01368_source.html @@ -0,0 +1,170 @@ + + + + + + + +0.9.9 API documenation: packing.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtc/packing.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "type_precision.hpp"
18 
19 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
20 # pragma message("GLM: GLM_GTC_packing extension included")
21 #endif
22 
23 namespace glm
24 {
27 
39  GLM_FUNC_DECL uint8 packUnorm1x8(float v);
40 
51  GLM_FUNC_DECL float unpackUnorm1x8(uint8 p);
52 
67  GLM_FUNC_DECL uint16 packUnorm2x8(vec2 const& v);
68 
83  GLM_FUNC_DECL vec2 unpackUnorm2x8(uint16 p);
84 
96  GLM_FUNC_DECL uint8 packSnorm1x8(float s);
97 
109  GLM_FUNC_DECL float unpackSnorm1x8(uint8 p);
110 
125  GLM_FUNC_DECL uint16 packSnorm2x8(vec2 const& v);
126 
141  GLM_FUNC_DECL vec2 unpackSnorm2x8(uint16 p);
142 
154  GLM_FUNC_DECL uint16 packUnorm1x16(float v);
155 
167  GLM_FUNC_DECL float unpackUnorm1x16(uint16 p);
168 
183  GLM_FUNC_DECL uint64 packUnorm4x16(vec4 const& v);
184 
199  GLM_FUNC_DECL vec4 unpackUnorm4x16(uint64 p);
200 
212  GLM_FUNC_DECL uint16 packSnorm1x16(float v);
213 
225  GLM_FUNC_DECL float unpackSnorm1x16(uint16 p);
226 
241  GLM_FUNC_DECL uint64 packSnorm4x16(vec4 const& v);
242 
257  GLM_FUNC_DECL vec4 unpackSnorm4x16(uint64 p);
258 
268  GLM_FUNC_DECL uint16 packHalf1x16(float v);
269 
279  GLM_FUNC_DECL float unpackHalf1x16(uint16 v);
280 
292  GLM_FUNC_DECL uint64 packHalf4x16(vec4 const& v);
293 
305  GLM_FUNC_DECL vec4 unpackHalf4x16(uint64 p);
306 
318  GLM_FUNC_DECL uint32 packI3x10_1x2(ivec4 const& v);
319 
329  GLM_FUNC_DECL ivec4 unpackI3x10_1x2(uint32 p);
330 
342  GLM_FUNC_DECL uint32 packU3x10_1x2(uvec4 const& v);
343 
353  GLM_FUNC_DECL uvec4 unpackU3x10_1x2(uint32 p);
354 
371  GLM_FUNC_DECL uint32 packSnorm3x10_1x2(vec4 const& v);
372 
388  GLM_FUNC_DECL vec4 unpackSnorm3x10_1x2(uint32 p);
389 
406  GLM_FUNC_DECL uint32 packUnorm3x10_1x2(vec4 const& v);
407 
423  GLM_FUNC_DECL vec4 unpackUnorm3x10_1x2(uint32 p);
424 
434  GLM_FUNC_DECL uint32 packF2x11_1x10(vec3 const& v);
435 
444  GLM_FUNC_DECL vec3 unpackF2x11_1x10(uint32 p);
445 
446 
458  GLM_FUNC_DECL uint32 packF3x9_E1x5(vec3 const& v);
459 
470  GLM_FUNC_DECL vec3 unpackF3x9_E1x5(uint32 p);
471 
480  template<length_t L, typename T, qualifier Q>
481  GLM_FUNC_DECL vec<4, T, Q> packRGBM(vec<3, T, Q> const& rgb);
482 
490  template<length_t L, typename T, qualifier Q>
491  GLM_FUNC_DECL vec<3, T, Q> unpackRGBM(vec<4, T, Q> const& rgbm);
492 
501  template<length_t L, qualifier Q>
502  GLM_FUNC_DECL vec<L, uint16, Q> packHalf(vec<L, float, Q> const& v);
503 
511  template<length_t L, qualifier Q>
512  GLM_FUNC_DECL vec<L, float, Q> unpackHalf(vec<L, uint16, Q> const& p);
513 
518  template<typename uintType, length_t L, typename floatType, qualifier Q>
519  GLM_FUNC_DECL vec<L, uintType, Q> packUnorm(vec<L, floatType, Q> const& v);
520 
525  template<typename floatType, length_t L, typename uintType, qualifier Q>
526  GLM_FUNC_DECL vec<L, floatType, Q> unpackUnorm(vec<L, uintType, Q> const& v);
527 
532  template<typename intType, length_t L, typename floatType, qualifier Q>
533  GLM_FUNC_DECL vec<L, intType, Q> packSnorm(vec<L, floatType, Q> const& v);
534 
539  template<typename floatType, length_t L, typename intType, qualifier Q>
540  GLM_FUNC_DECL vec<L, floatType, Q> unpackSnorm(vec<L, intType, Q> const& v);
541 
546  GLM_FUNC_DECL uint8 packUnorm2x4(vec2 const& v);
547 
552  GLM_FUNC_DECL vec2 unpackUnorm2x4(uint8 p);
553 
558  GLM_FUNC_DECL uint16 packUnorm4x4(vec4 const& v);
559 
564  GLM_FUNC_DECL vec4 unpackUnorm4x4(uint16 p);
565 
570  GLM_FUNC_DECL uint16 packUnorm1x5_1x6_1x5(vec3 const& v);
571 
576  GLM_FUNC_DECL vec3 unpackUnorm1x5_1x6_1x5(uint16 p);
577 
582  GLM_FUNC_DECL uint16 packUnorm3x5_1x1(vec4 const& v);
583 
588  GLM_FUNC_DECL vec4 unpackUnorm3x5_1x1(uint16 p);
589 
594  GLM_FUNC_DECL uint8 packUnorm2x3_1x2(vec3 const& v);
595 
600  GLM_FUNC_DECL vec3 unpackUnorm2x3_1x2(uint8 p);
601 
602 
603 
608  GLM_FUNC_DECL int16 packInt2x8(i8vec2 const& v);
609 
614  GLM_FUNC_DECL i8vec2 unpackInt2x8(int16 p);
615 
620  GLM_FUNC_DECL uint16 packUint2x8(u8vec2 const& v);
621 
626  GLM_FUNC_DECL u8vec2 unpackUint2x8(uint16 p);
627 
632  GLM_FUNC_DECL int32 packInt4x8(i8vec4 const& v);
633 
638  GLM_FUNC_DECL i8vec4 unpackInt4x8(int32 p);
639 
644  GLM_FUNC_DECL uint32 packUint4x8(u8vec4 const& v);
645 
650  GLM_FUNC_DECL u8vec4 unpackUint4x8(uint32 p);
651 
656  GLM_FUNC_DECL int packInt2x16(i16vec2 const& v);
657 
662  GLM_FUNC_DECL i16vec2 unpackInt2x16(int p);
663 
668  GLM_FUNC_DECL int64 packInt4x16(i16vec4 const& v);
669 
674  GLM_FUNC_DECL i16vec4 unpackInt4x16(int64 p);
675 
680  GLM_FUNC_DECL uint packUint2x16(u16vec2 const& v);
681 
686  GLM_FUNC_DECL u16vec2 unpackUint2x16(uint p);
687 
692  GLM_FUNC_DECL uint64 packUint4x16(u16vec4 const& v);
693 
698  GLM_FUNC_DECL u16vec4 unpackUint4x16(uint64 p);
699 
704  GLM_FUNC_DECL int64 packInt2x32(i32vec2 const& v);
705 
710  GLM_FUNC_DECL i32vec2 unpackInt2x32(int64 p);
711 
716  GLM_FUNC_DECL uint64 packUint2x32(u32vec2 const& v);
717 
722  GLM_FUNC_DECL u32vec2 unpackUint2x32(uint64 p);
723 
724 
726 }// namespace glm
727 
728 #include "packing.inl"
GLM_FUNC_DECL vec4 unpackHalf4x16(uint64 p)
Returns a four-component floating-point vector with components obtained by unpacking a 64-bit unsigne...
+
Definition: common.hpp:18
+
GLM_FUNC_DECL uint8 packUnorm2x4(vec2 const &v)
Convert each component of the normalized floating-point vector into unsigned integer values...
+
GLM_FUNC_DECL uint16 packUnorm1x16(float v)
First, converts the normalized floating-point value v into a 16-bit integer value.
+
GLM_FUNC_DECL int64 packInt4x16(i16vec4 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL u32vec2 unpackUint2x32(uint64 p)
Convert a packed integer into an integer vector.
+
GLM_FUNC_DECL uint8 packUnorm2x3_1x2(vec3 const &v)
Convert each component of the normalized floating-point vector into unsigned integer values...
+
GLM_FUNC_DECL vec3 unpackUnorm1x5_1x6_1x5(uint16 p)
Convert a packed integer to a normalized floating-point vector.
+
GLM_FUNC_DECL vec4 unpackUnorm4x4(uint16 p)
Convert a packed integer to a normalized floating-point vector.
+
vec< 4, i16, defaultp > i16vec4
16 bit signed integer vector of 4 components type.
Definition: fwd.hpp:260
+
GLM_FUNC_DECL uint64 packUint2x32(u32vec2 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL uint16 packSnorm2x8(vec2 const &v)
First, converts each component of the normalized floating-point value v into 8-bit integer values...
+
GLM_FUNC_DECL uint64 packUint4x16(u16vec4 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL uint8 packSnorm1x8(float s)
First, converts the normalized floating-point value v into 8-bit integer value.
+
GLM_FUNC_DECL uint32 packSnorm3x10_1x2(vec4 const &v)
First, converts the first three components of the normalized floating-point value v into 10-bit signe...
+
vec< 2, i32, defaultp > i32vec2
32 bit signed integer vector of 2 components type.
Definition: fwd.hpp:278
+
vec< 4, unsigned int, defaultp > uvec4
4 components vector of unsigned integer numbers.
+
GLM_FUNC_DECL vec3 unpackUnorm2x3_1x2(uint8 p)
Convert a packed integer to a normalized floating-point vector.
+
GLM_FUNC_DECL uint64 packSnorm4x16(vec4 const &v)
First, converts each component of the normalized floating-point value v into 16-bit integer values...
+
GLM_FUNC_DECL vec< L, floatType, Q > unpackUnorm(vec< L, uintType, Q > const &v)
Convert a packed integer to a normalized floating-point vector.
+
vec< 2, i8, defaultp > i8vec2
8 bit signed integer vector of 2 components type.
Definition: fwd.hpp:238
+
vec< 2, float, defaultp > vec2
2 components vector of single-precision floating-point numbers.
+
GLM_FUNC_DECL float unpackHalf1x16(uint16 v)
Returns a floating-point scalar with components obtained by unpacking a 16-bit unsigned integer into ...
+
GLM_FUNC_DECL uint16 packHalf1x16(float v)
Returns an unsigned integer obtained by converting the components of a floating-point scalar to the 1...
+
GLM_FUNC_DECL uint packUint2x16(u16vec2 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL uint64 packHalf4x16(vec4 const &v)
Returns an unsigned integer obtained by converting the components of a four-component floating-point ...
+
vec< 2, u8, defaultp > u8vec2
Default qualifier 8 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:340
+
vec< 2, i16, defaultp > i16vec2
16 bit signed integer vector of 2 components type.
Definition: fwd.hpp:258
+
GLM_FUNC_DECL i32vec2 unpackInt2x32(int64 p)
Convert a packed integer into an integer vector.
+
GLM_FUNC_DECL ivec4 unpackI3x10_1x2(uint32 p)
Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit signed integers...
+
GLM_FUNC_DECL vec4 unpackSnorm4x16(uint64 p)
First, unpacks a single 64-bit unsigned integer p into four 16-bit signed integers.
+
GLM_FUNC_DECL vec< L, float, Q > unpackHalf(vec< L, uint16, Q > const &p)
Returns a floating-point vector with components obtained by reinterpreting an integer vector as 16-bi...
+
GLM_FUNC_DECL vec2 unpackSnorm2x8(uint16 p)
First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit signed integers.
+
vec< 4, float, defaultp > vec4
4 components vector of single-precision floating-point numbers.
+
GLM_FUNC_DECL u16vec2 unpackUint2x16(uint p)
Convert a packed integer into an integer vector.
+
GLM_FUNC_DECL uint16 packUnorm2x8(vec2 const &v)
First, converts each component of the normalized floating-point value v into 8-bit integer values...
+
GLM_FUNC_DECL vec< 3, T, Q > unpackRGBM(vec< 4, T, Q > const &rgbm)
Returns a floating-point vector with components obtained by reinterpreting an integer vector as 16-bi...
+
GLM_FUNC_DECL uint32 packI3x10_1x2(ivec4 const &v)
Returns an unsigned integer obtained by converting the components of a four-component signed integer ...
+
GLM_FUNC_DECL uint8 packUnorm1x8(float v)
First, converts the normalized floating-point value v into a 8-bit integer value. ...
+
GLM_FUNC_DECL i8vec4 unpackInt4x8(int32 p)
Convert a packed integer into an integer vector.
+
GLM_FUNC_DECL float unpackSnorm1x8(uint8 p)
First, unpacks a single 8-bit unsigned integer p into a single 8-bit signed integers.
+
GLM_FUNC_DECL vec< 4, T, Q > packRGBM(vec< 3, T, Q > const &rgb)
Returns an unsigned integer vector obtained by converting the components of a floating-point vector t...
+
GLM_FUNC_DECL int32 packInt4x8(i8vec4 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL vec4 unpackUnorm3x10_1x2(uint32 p)
First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers.
+
vec< 3, float, defaultp > vec3
3 components vector of single-precision floating-point numbers.
+
vec< 4, i8, defaultp > i8vec4
8 bit signed integer vector of 4 components type.
Definition: fwd.hpp:240
+
GLM_FUNC_DECL uint32 packUnorm3x10_1x2(vec4 const &v)
First, converts the first three components of the normalized floating-point value v into 10-bit unsig...
+
GLM_FUNC_DECL uvec4 unpackU3x10_1x2(uint32 p)
Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit unsigned integers...
+
GLM_FUNC_DECL vec3 unpackF2x11_1x10(uint32 p)
First, unpacks a single 32-bit unsigned integer p into two 11-bit signless floating-point values and ...
+
detail::uint64 uint64
64 bit unsigned integer type.
+
GLM_GTC_type_precision
+
vec< 4, u16, defaultp > u16vec4
Default qualifier 16 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:362
+
GLM_FUNC_DECL vec2 unpackUnorm2x8(uint16 p)
First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit unsigned integers.
+
GLM_FUNC_DECL vec3 unpackF3x9_E1x5(uint32 p)
First, unpacks a single 32-bit unsigned integer p into two 11-bit signless floating-point values and ...
+
GLM_FUNC_DECL vec4 unpackUnorm3x5_1x1(uint16 p)
Convert a packed integer to a normalized floating-point vector.
+
GLM_FUNC_DECL uint16 packUnorm1x5_1x6_1x5(vec3 const &v)
Convert each component of the normalized floating-point vector into unsigned integer values...
+
GLM_FUNC_DECL i8vec2 unpackInt2x8(int16 p)
Convert a packed integer into an integer vector.
+
GLM_FUNC_DECL uint32 packUint4x8(u8vec4 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL uint64 packUnorm4x16(vec4 const &v)
First, converts each component of the normalized floating-point value v into 16-bit integer values...
+
GLM_FUNC_DECL u16vec4 unpackUint4x16(uint64 p)
Convert a packed integer into an integer vector.
+
GLM_FUNC_DECL u8vec2 unpackUint2x8(uint16 p)
Convert a packed integer into an integer vector.
+
detail::int64 int64
64 bit signed integer type.
+
GLM_FUNC_DECL uint32 packU3x10_1x2(uvec4 const &v)
Returns an unsigned integer obtained by converting the components of a four-component unsigned intege...
+
GLM_FUNC_DECL i16vec2 unpackInt2x16(int p)
Convert a packed integer into an integer vector.
+
GLM_FUNC_DECL uint16 packUnorm4x4(vec4 const &v)
Convert each component of the normalized floating-point vector into unsigned integer values...
+
GLM_FUNC_DECL vec4 unpackUnorm4x16(uint64 p)
First, unpacks a single 64-bit unsigned integer p into four 16-bit unsigned integers.
+
GLM_FUNC_DECL uint32 packF3x9_E1x5(vec3 const &v)
First, converts the first two components of the normalized floating-point value v into 11-bit signles...
+
vec< 2, u32, defaultp > u32vec2
Default qualifier 32 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:380
+
GLM_FUNC_DECL vec2 unpackUnorm2x4(uint8 p)
Convert a packed integer to a normalized floating-point vector.
+
GLM_FUNC_DECL uint16 packSnorm1x16(float v)
First, converts the normalized floating-point value v into 16-bit integer value.
+
GLM_FUNC_DECL vec< L, intType, Q > packSnorm(vec< L, floatType, Q > const &v)
Convert each component of the normalized floating-point vector into signed integer values...
+
GLM_FUNC_DECL uint32 packF2x11_1x10(vec3 const &v)
First, converts the first two components of the normalized floating-point value v into 11-bit signles...
+
GLM_FUNC_DECL float unpackUnorm1x8(uint8 p)
Convert a single 8-bit integer to a normalized floating-point value.
+
GLM_FUNC_DECL vec4 unpackSnorm3x10_1x2(uint32 p)
First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers.
+
vec< 4, u8, defaultp > u8vec4
Default qualifier 8 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:342
+
GLM_FUNC_DECL int packInt2x16(i16vec2 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL vec< L, floatType, Q > unpackSnorm(vec< L, intType, Q > const &v)
Convert a packed integer to a normalized floating-point vector.
+
GLM_FUNC_DECL vec< L, uintType, Q > packUnorm(vec< L, floatType, Q > const &v)
Convert each component of the normalized floating-point vector into unsigned integer values...
+
GLM_FUNC_DECL uint16 packUint2x8(u8vec2 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL int16 packInt2x8(i8vec2 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL uint16 packUnorm3x5_1x1(vec4 const &v)
Convert each component of the normalized floating-point vector into unsigned integer values...
+
GLM_FUNC_DECL vec< L, uint16, Q > packHalf(vec< L, float, Q > const &v)
Returns an unsigned integer vector obtained by converting the components of a floating-point vector t...
+
GLM_FUNC_DECL float unpackSnorm1x16(uint16 p)
First, unpacks a single 16-bit unsigned integer p into a single 16-bit signed integers.
+
vec< 2, u16, defaultp > u16vec2
Default qualifier 16 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:360
+
GLM_FUNC_DECL float unpackUnorm1x16(uint16 p)
First, unpacks a single 16-bit unsigned integer p into a of 16-bit unsigned integers.
+
GLM_FUNC_DECL i16vec4 unpackInt4x16(int64 p)
Convert a packed integer into an integer vector.
+
vec< 4, int, defaultp > ivec4
4 components vector of signed integer numbers.
Definition: vector_int4.hpp:15
+
GLM_FUNC_DECL int64 packInt2x32(i32vec2 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL u8vec4 unpackUint4x8(uint32 p)
Convert a packed integer into an integer vector.
+
+ + + + diff --git a/common/glm/doc/api/a01369.html b/common/glm/doc/api/a01369.html new file mode 100644 index 000000000..b8e0a0cc5 --- /dev/null +++ b/common/glm/doc/api/a01369.html @@ -0,0 +1,315 @@ + + + + + + + +0.9.9 API documenation: packing.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtc/packing.hpp File Reference
+
+
+ +

GLM_GTC_packing +More...

+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

GLM_FUNC_DECL uint32 packF2x11_1x10 (vec3 const &v)
 First, converts the first two components of the normalized floating-point value v into 11-bit signless floating-point values. More...
 
GLM_FUNC_DECL uint32 packF3x9_E1x5 (vec3 const &v)
 First, converts the first two components of the normalized floating-point value v into 11-bit signless floating-point values. More...
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL vec< L, uint16, Q > packHalf (vec< L, float, Q > const &v)
 Returns an unsigned integer vector obtained by converting the components of a floating-point vector to the 16-bit floating-point representation found in the OpenGL Specification. More...
 
GLM_FUNC_DECL uint16 packHalf1x16 (float v)
 Returns an unsigned integer obtained by converting the components of a floating-point scalar to the 16-bit floating-point representation found in the OpenGL Specification, and then packing this 16-bit value into a 16-bit unsigned integer. More...
 
GLM_FUNC_DECL uint64 packHalf4x16 (vec4 const &v)
 Returns an unsigned integer obtained by converting the components of a four-component floating-point vector to the 16-bit floating-point representation found in the OpenGL Specification, and then packing these four 16-bit values into a 64-bit unsigned integer. More...
 
GLM_FUNC_DECL uint32 packI3x10_1x2 (ivec4 const &v)
 Returns an unsigned integer obtained by converting the components of a four-component signed integer vector to the 10-10-10-2-bit signed integer representation found in the OpenGL Specification, and then packing these four values into a 32-bit unsigned integer. More...
 
GLM_FUNC_DECL int packInt2x16 (i16vec2 const &v)
 Convert each component from an integer vector into a packed unsigned integer. More...
 
GLM_FUNC_DECL int64 packInt2x32 (i32vec2 const &v)
 Convert each component from an integer vector into a packed unsigned integer. More...
 
GLM_FUNC_DECL int16 packInt2x8 (i8vec2 const &v)
 Convert each component from an integer vector into a packed unsigned integer. More...
 
GLM_FUNC_DECL int64 packInt4x16 (i16vec4 const &v)
 Convert each component from an integer vector into a packed unsigned integer. More...
 
GLM_FUNC_DECL int32 packInt4x8 (i8vec4 const &v)
 Convert each component from an integer vector into a packed unsigned integer. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > packRGBM (vec< 3, T, Q > const &rgb)
 Returns an unsigned integer vector obtained by converting the components of a floating-point vector to the 16-bit floating-point representation found in the OpenGL Specification. More...
 
template<typename intType , length_t L, typename floatType , qualifier Q>
GLM_FUNC_DECL vec< L, intType, Q > packSnorm (vec< L, floatType, Q > const &v)
 Convert each component of the normalized floating-point vector into signed integer values. More...
 
GLM_FUNC_DECL uint16 packSnorm1x16 (float v)
 First, converts the normalized floating-point value v into 16-bit integer value. More...
 
GLM_FUNC_DECL uint8 packSnorm1x8 (float s)
 First, converts the normalized floating-point value v into 8-bit integer value. More...
 
GLM_FUNC_DECL uint16 packSnorm2x8 (vec2 const &v)
 First, converts each component of the normalized floating-point value v into 8-bit integer values. More...
 
GLM_FUNC_DECL uint32 packSnorm3x10_1x2 (vec4 const &v)
 First, converts the first three components of the normalized floating-point value v into 10-bit signed integer values. More...
 
GLM_FUNC_DECL uint64 packSnorm4x16 (vec4 const &v)
 First, converts each component of the normalized floating-point value v into 16-bit integer values. More...
 
GLM_FUNC_DECL uint32 packU3x10_1x2 (uvec4 const &v)
 Returns an unsigned integer obtained by converting the components of a four-component unsigned integer vector to the 10-10-10-2-bit unsigned integer representation found in the OpenGL Specification, and then packing these four values into a 32-bit unsigned integer. More...
 
GLM_FUNC_DECL uint packUint2x16 (u16vec2 const &v)
 Convert each component from an integer vector into a packed unsigned integer. More...
 
GLM_FUNC_DECL uint64 packUint2x32 (u32vec2 const &v)
 Convert each component from an integer vector into a packed unsigned integer. More...
 
GLM_FUNC_DECL uint16 packUint2x8 (u8vec2 const &v)
 Convert each component from an integer vector into a packed unsigned integer. More...
 
GLM_FUNC_DECL uint64 packUint4x16 (u16vec4 const &v)
 Convert each component from an integer vector into a packed unsigned integer. More...
 
GLM_FUNC_DECL uint32 packUint4x8 (u8vec4 const &v)
 Convert each component from an integer vector into a packed unsigned integer. More...
 
template<typename uintType , length_t L, typename floatType , qualifier Q>
GLM_FUNC_DECL vec< L, uintType, Q > packUnorm (vec< L, floatType, Q > const &v)
 Convert each component of the normalized floating-point vector into unsigned integer values. More...
 
GLM_FUNC_DECL uint16 packUnorm1x16 (float v)
 First, converts the normalized floating-point value v into a 16-bit integer value. More...
 
GLM_FUNC_DECL uint16 packUnorm1x5_1x6_1x5 (vec3 const &v)
 Convert each component of the normalized floating-point vector into unsigned integer values. More...
 
GLM_FUNC_DECL uint8 packUnorm1x8 (float v)
 First, converts the normalized floating-point value v into a 8-bit integer value. More...
 
GLM_FUNC_DECL uint8 packUnorm2x3_1x2 (vec3 const &v)
 Convert each component of the normalized floating-point vector into unsigned integer values. More...
 
GLM_FUNC_DECL uint8 packUnorm2x4 (vec2 const &v)
 Convert each component of the normalized floating-point vector into unsigned integer values. More...
 
GLM_FUNC_DECL uint16 packUnorm2x8 (vec2 const &v)
 First, converts each component of the normalized floating-point value v into 8-bit integer values. More...
 
GLM_FUNC_DECL uint32 packUnorm3x10_1x2 (vec4 const &v)
 First, converts the first three components of the normalized floating-point value v into 10-bit unsigned integer values. More...
 
GLM_FUNC_DECL uint16 packUnorm3x5_1x1 (vec4 const &v)
 Convert each component of the normalized floating-point vector into unsigned integer values. More...
 
GLM_FUNC_DECL uint64 packUnorm4x16 (vec4 const &v)
 First, converts each component of the normalized floating-point value v into 16-bit integer values. More...
 
GLM_FUNC_DECL uint16 packUnorm4x4 (vec4 const &v)
 Convert each component of the normalized floating-point vector into unsigned integer values. More...
 
GLM_FUNC_DECL vec3 unpackF2x11_1x10 (uint32 p)
 First, unpacks a single 32-bit unsigned integer p into two 11-bit signless floating-point values and one 10-bit signless floating-point value . More...
 
GLM_FUNC_DECL vec3 unpackF3x9_E1x5 (uint32 p)
 First, unpacks a single 32-bit unsigned integer p into two 11-bit signless floating-point values and one 10-bit signless floating-point value . More...
 
template<length_t L, qualifier Q>
GLM_FUNC_DECL vec< L, float, Q > unpackHalf (vec< L, uint16, Q > const &p)
 Returns a floating-point vector with components obtained by reinterpreting an integer vector as 16-bit floating-point numbers and converting them to 32-bit floating-point values. More...
 
GLM_FUNC_DECL float unpackHalf1x16 (uint16 v)
 Returns a floating-point scalar with components obtained by unpacking a 16-bit unsigned integer into a 16-bit value, interpreted as a 16-bit floating-point number according to the OpenGL Specification, and converting it to 32-bit floating-point values. More...
 
GLM_FUNC_DECL vec4 unpackHalf4x16 (uint64 p)
 Returns a four-component floating-point vector with components obtained by unpacking a 64-bit unsigned integer into four 16-bit values, interpreting those values as 16-bit floating-point numbers according to the OpenGL Specification, and converting them to 32-bit floating-point values. More...
 
GLM_FUNC_DECL ivec4 unpackI3x10_1x2 (uint32 p)
 Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit signed integers. More...
 
GLM_FUNC_DECL i16vec2 unpackInt2x16 (int p)
 Convert a packed integer into an integer vector. More...
 
GLM_FUNC_DECL i32vec2 unpackInt2x32 (int64 p)
 Convert a packed integer into an integer vector. More...
 
GLM_FUNC_DECL i8vec2 unpackInt2x8 (int16 p)
 Convert a packed integer into an integer vector. More...
 
GLM_FUNC_DECL i16vec4 unpackInt4x16 (int64 p)
 Convert a packed integer into an integer vector. More...
 
GLM_FUNC_DECL i8vec4 unpackInt4x8 (int32 p)
 Convert a packed integer into an integer vector. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > unpackRGBM (vec< 4, T, Q > const &rgbm)
 Returns a floating-point vector with components obtained by reinterpreting an integer vector as 16-bit floating-point numbers and converting them to 32-bit floating-point values. More...
 
template<typename floatType , length_t L, typename intType , qualifier Q>
GLM_FUNC_DECL vec< L, floatType, Q > unpackSnorm (vec< L, intType, Q > const &v)
 Convert a packed integer to a normalized floating-point vector. More...
 
GLM_FUNC_DECL float unpackSnorm1x16 (uint16 p)
 First, unpacks a single 16-bit unsigned integer p into a single 16-bit signed integers. More...
 
GLM_FUNC_DECL float unpackSnorm1x8 (uint8 p)
 First, unpacks a single 8-bit unsigned integer p into a single 8-bit signed integers. More...
 
GLM_FUNC_DECL vec2 unpackSnorm2x8 (uint16 p)
 First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit signed integers. More...
 
GLM_FUNC_DECL vec4 unpackSnorm3x10_1x2 (uint32 p)
 First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers. More...
 
GLM_FUNC_DECL vec4 unpackSnorm4x16 (uint64 p)
 First, unpacks a single 64-bit unsigned integer p into four 16-bit signed integers. More...
 
GLM_FUNC_DECL uvec4 unpackU3x10_1x2 (uint32 p)
 Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit unsigned integers. More...
 
GLM_FUNC_DECL u16vec2 unpackUint2x16 (uint p)
 Convert a packed integer into an integer vector. More...
 
GLM_FUNC_DECL u32vec2 unpackUint2x32 (uint64 p)
 Convert a packed integer into an integer vector. More...
 
GLM_FUNC_DECL u8vec2 unpackUint2x8 (uint16 p)
 Convert a packed integer into an integer vector. More...
 
GLM_FUNC_DECL u16vec4 unpackUint4x16 (uint64 p)
 Convert a packed integer into an integer vector. More...
 
GLM_FUNC_DECL u8vec4 unpackUint4x8 (uint32 p)
 Convert a packed integer into an integer vector. More...
 
template<typename floatType , length_t L, typename uintType , qualifier Q>
GLM_FUNC_DECL vec< L, floatType, Q > unpackUnorm (vec< L, uintType, Q > const &v)
 Convert a packed integer to a normalized floating-point vector. More...
 
GLM_FUNC_DECL float unpackUnorm1x16 (uint16 p)
 First, unpacks a single 16-bit unsigned integer p into a of 16-bit unsigned integers. More...
 
GLM_FUNC_DECL vec3 unpackUnorm1x5_1x6_1x5 (uint16 p)
 Convert a packed integer to a normalized floating-point vector. More...
 
GLM_FUNC_DECL float unpackUnorm1x8 (uint8 p)
 Convert a single 8-bit integer to a normalized floating-point value. More...
 
GLM_FUNC_DECL vec3 unpackUnorm2x3_1x2 (uint8 p)
 Convert a packed integer to a normalized floating-point vector. More...
 
GLM_FUNC_DECL vec2 unpackUnorm2x4 (uint8 p)
 Convert a packed integer to a normalized floating-point vector. More...
 
GLM_FUNC_DECL vec2 unpackUnorm2x8 (uint16 p)
 First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit unsigned integers. More...
 
GLM_FUNC_DECL vec4 unpackUnorm3x10_1x2 (uint32 p)
 First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers. More...
 
GLM_FUNC_DECL vec4 unpackUnorm3x5_1x1 (uint16 p)
 Convert a packed integer to a normalized floating-point vector. More...
 
GLM_FUNC_DECL vec4 unpackUnorm4x16 (uint64 p)
 First, unpacks a single 64-bit unsigned integer p into four 16-bit unsigned integers. More...
 
GLM_FUNC_DECL vec4 unpackUnorm4x4 (uint16 p)
 Convert a packed integer to a normalized floating-point vector. More...
 
+

Detailed Description

+

GLM_GTC_packing

+
See also
Core features (dependence)
+ +

Definition in file gtc/packing.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01369_source.html b/common/glm/doc/api/a01369_source.html new file mode 100644 index 000000000..7b2f37fe7 --- /dev/null +++ b/common/glm/doc/api/a01369_source.html @@ -0,0 +1,170 @@ + + + + + + + +0.9.9 API documenation: packing.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtc/packing.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "type_precision.hpp"
18 
19 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
20 # pragma message("GLM: GLM_GTC_packing extension included")
21 #endif
22 
23 namespace glm
24 {
27 
39  GLM_FUNC_DECL uint8 packUnorm1x8(float v);
40 
51  GLM_FUNC_DECL float unpackUnorm1x8(uint8 p);
52 
67  GLM_FUNC_DECL uint16 packUnorm2x8(vec2 const& v);
68 
83  GLM_FUNC_DECL vec2 unpackUnorm2x8(uint16 p);
84 
96  GLM_FUNC_DECL uint8 packSnorm1x8(float s);
97 
109  GLM_FUNC_DECL float unpackSnorm1x8(uint8 p);
110 
125  GLM_FUNC_DECL uint16 packSnorm2x8(vec2 const& v);
126 
141  GLM_FUNC_DECL vec2 unpackSnorm2x8(uint16 p);
142 
154  GLM_FUNC_DECL uint16 packUnorm1x16(float v);
155 
167  GLM_FUNC_DECL float unpackUnorm1x16(uint16 p);
168 
183  GLM_FUNC_DECL uint64 packUnorm4x16(vec4 const& v);
184 
199  GLM_FUNC_DECL vec4 unpackUnorm4x16(uint64 p);
200 
212  GLM_FUNC_DECL uint16 packSnorm1x16(float v);
213 
225  GLM_FUNC_DECL float unpackSnorm1x16(uint16 p);
226 
241  GLM_FUNC_DECL uint64 packSnorm4x16(vec4 const& v);
242 
257  GLM_FUNC_DECL vec4 unpackSnorm4x16(uint64 p);
258 
268  GLM_FUNC_DECL uint16 packHalf1x16(float v);
269 
279  GLM_FUNC_DECL float unpackHalf1x16(uint16 v);
280 
292  GLM_FUNC_DECL uint64 packHalf4x16(vec4 const& v);
293 
305  GLM_FUNC_DECL vec4 unpackHalf4x16(uint64 p);
306 
318  GLM_FUNC_DECL uint32 packI3x10_1x2(ivec4 const& v);
319 
329  GLM_FUNC_DECL ivec4 unpackI3x10_1x2(uint32 p);
330 
342  GLM_FUNC_DECL uint32 packU3x10_1x2(uvec4 const& v);
343 
353  GLM_FUNC_DECL uvec4 unpackU3x10_1x2(uint32 p);
354 
371  GLM_FUNC_DECL uint32 packSnorm3x10_1x2(vec4 const& v);
372 
388  GLM_FUNC_DECL vec4 unpackSnorm3x10_1x2(uint32 p);
389 
406  GLM_FUNC_DECL uint32 packUnorm3x10_1x2(vec4 const& v);
407 
423  GLM_FUNC_DECL vec4 unpackUnorm3x10_1x2(uint32 p);
424 
434  GLM_FUNC_DECL uint32 packF2x11_1x10(vec3 const& v);
435 
444  GLM_FUNC_DECL vec3 unpackF2x11_1x10(uint32 p);
445 
446 
458  GLM_FUNC_DECL uint32 packF3x9_E1x5(vec3 const& v);
459 
470  GLM_FUNC_DECL vec3 unpackF3x9_E1x5(uint32 p);
471 
480  template<length_t L, typename T, qualifier Q>
481  GLM_FUNC_DECL vec<4, T, Q> packRGBM(vec<3, T, Q> const& rgb);
482 
490  template<length_t L, typename T, qualifier Q>
491  GLM_FUNC_DECL vec<3, T, Q> unpackRGBM(vec<4, T, Q> const& rgbm);
492 
501  template<length_t L, qualifier Q>
502  GLM_FUNC_DECL vec<L, uint16, Q> packHalf(vec<L, float, Q> const& v);
503 
511  template<length_t L, qualifier Q>
512  GLM_FUNC_DECL vec<L, float, Q> unpackHalf(vec<L, uint16, Q> const& p);
513 
518  template<typename uintType, length_t L, typename floatType, qualifier Q>
519  GLM_FUNC_DECL vec<L, uintType, Q> packUnorm(vec<L, floatType, Q> const& v);
520 
525  template<typename floatType, length_t L, typename uintType, qualifier Q>
526  GLM_FUNC_DECL vec<L, floatType, Q> unpackUnorm(vec<L, uintType, Q> const& v);
527 
532  template<typename intType, length_t L, typename floatType, qualifier Q>
533  GLM_FUNC_DECL vec<L, intType, Q> packSnorm(vec<L, floatType, Q> const& v);
534 
539  template<typename floatType, length_t L, typename intType, qualifier Q>
540  GLM_FUNC_DECL vec<L, floatType, Q> unpackSnorm(vec<L, intType, Q> const& v);
541 
546  GLM_FUNC_DECL uint8 packUnorm2x4(vec2 const& v);
547 
552  GLM_FUNC_DECL vec2 unpackUnorm2x4(uint8 p);
553 
558  GLM_FUNC_DECL uint16 packUnorm4x4(vec4 const& v);
559 
564  GLM_FUNC_DECL vec4 unpackUnorm4x4(uint16 p);
565 
570  GLM_FUNC_DECL uint16 packUnorm1x5_1x6_1x5(vec3 const& v);
571 
576  GLM_FUNC_DECL vec3 unpackUnorm1x5_1x6_1x5(uint16 p);
577 
582  GLM_FUNC_DECL uint16 packUnorm3x5_1x1(vec4 const& v);
583 
588  GLM_FUNC_DECL vec4 unpackUnorm3x5_1x1(uint16 p);
589 
594  GLM_FUNC_DECL uint8 packUnorm2x3_1x2(vec3 const& v);
595 
600  GLM_FUNC_DECL vec3 unpackUnorm2x3_1x2(uint8 p);
601 
602 
603 
608  GLM_FUNC_DECL int16 packInt2x8(i8vec2 const& v);
609 
614  GLM_FUNC_DECL i8vec2 unpackInt2x8(int16 p);
615 
620  GLM_FUNC_DECL uint16 packUint2x8(u8vec2 const& v);
621 
626  GLM_FUNC_DECL u8vec2 unpackUint2x8(uint16 p);
627 
632  GLM_FUNC_DECL int32 packInt4x8(i8vec4 const& v);
633 
638  GLM_FUNC_DECL i8vec4 unpackInt4x8(int32 p);
639 
644  GLM_FUNC_DECL uint32 packUint4x8(u8vec4 const& v);
645 
650  GLM_FUNC_DECL u8vec4 unpackUint4x8(uint32 p);
651 
656  GLM_FUNC_DECL int packInt2x16(i16vec2 const& v);
657 
662  GLM_FUNC_DECL i16vec2 unpackInt2x16(int p);
663 
668  GLM_FUNC_DECL int64 packInt4x16(i16vec4 const& v);
669 
674  GLM_FUNC_DECL i16vec4 unpackInt4x16(int64 p);
675 
680  GLM_FUNC_DECL uint packUint2x16(u16vec2 const& v);
681 
686  GLM_FUNC_DECL u16vec2 unpackUint2x16(uint p);
687 
692  GLM_FUNC_DECL uint64 packUint4x16(u16vec4 const& v);
693 
698  GLM_FUNC_DECL u16vec4 unpackUint4x16(uint64 p);
699 
704  GLM_FUNC_DECL int64 packInt2x32(i32vec2 const& v);
705 
710  GLM_FUNC_DECL i32vec2 unpackInt2x32(int64 p);
711 
716  GLM_FUNC_DECL uint64 packUint2x32(u32vec2 const& v);
717 
722  GLM_FUNC_DECL u32vec2 unpackUint2x32(uint64 p);
723 
724 
726 }// namespace glm
727 
728 #include "packing.inl"
GLM_FUNC_DECL vec< L, uintType, Q > packUnorm(vec< L, floatType, Q > const &v)
Convert each component of the normalized floating-point vector into unsigned integer values...
+
GLM_FUNC_DECL uint16 packUint2x8(u8vec2 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL int64 packInt4x16(i16vec4 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
vec< 3, float, defaultp > vec3
3 components vector of single-precision floating-point numbers.
+
GLM_FUNC_DECL vec< L, uint16, Q > packHalf(vec< L, float, Q > const &v)
Returns an unsigned integer vector obtained by converting the components of a floating-point vector t...
+
GLM_FUNC_DECL u32vec2 unpackUint2x32(uint64 p)
Convert a packed integer into an integer vector.
+
GLM_FUNC_DECL uint8 packUnorm2x3_1x2(vec3 const &v)
Convert each component of the normalized floating-point vector into unsigned integer values...
+
GLM_FUNC_DECL vec4 unpackUnorm4x4(uint16 p)
Convert a packed integer to a normalized floating-point vector.
+
GLM_FUNC_DECL float unpackSnorm1x16(uint16 p)
First, unpacks a single 16-bit unsigned integer p into a single 16-bit signed integers.
+
detail::uint64 uint64
64 bit unsigned integer type.
+
GLM_FUNC_DECL float unpackUnorm1x16(uint16 p)
First, unpacks a single 16-bit unsigned integer p into a of 16-bit unsigned integers.
+
vec< 4, unsigned int, defaultp > uvec4
4 components vector of unsigned integer numbers.
+
GLM_FUNC_DECL vec< L, floatType, Q > unpackUnorm(vec< L, uintType, Q > const &v)
Convert a packed integer to a normalized floating-point vector.
+
GLM_FUNC_DECL float unpackHalf1x16(uint16 v)
Returns a floating-point scalar with components obtained by unpacking a 16-bit unsigned integer into ...
+
GLM_FUNC_DECL uint16 packHalf1x16(float v)
Returns an unsigned integer obtained by converting the components of a floating-point scalar to the 1...
+
GLM_FUNC_DECL uint packUint2x16(u16vec2 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
vec< 4, u8, defaultp > u8vec4
Default qualifier 8 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:342
+
vec< 2, float, defaultp > vec2
2 components vector of single-precision floating-point numbers.
+
GLM_FUNC_DECL uint16 packUnorm1x16(float v)
First, converts the normalized floating-point value v into a 16-bit integer value.
+
GLM_FUNC_DECL vec3 unpackUnorm1x5_1x6_1x5(uint16 p)
Convert a packed integer to a normalized floating-point vector.
+
GLM_FUNC_DECL i32vec2 unpackInt2x32(int64 p)
Convert a packed integer into an integer vector.
+
GLM_FUNC_DECL ivec4 unpackI3x10_1x2(uint32 p)
Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit signed integers...
+
GLM_FUNC_DECL uint64 packUint2x32(u32vec2 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL vec4 unpackSnorm4x16(uint64 p)
First, unpacks a single 64-bit unsigned integer p into four 16-bit signed integers.
+
GLM_FUNC_DECL uint16 packSnorm2x8(vec2 const &v)
First, converts each component of the normalized floating-point value v into 8-bit integer values...
+
GLM_FUNC_DECL uint64 packUint4x16(u16vec4 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL uint8 packSnorm1x8(float s)
First, converts the normalized floating-point value v into 8-bit integer value.
+
GLM_FUNC_DECL uint32 packSnorm3x10_1x2(vec4 const &v)
First, converts the first three components of the normalized floating-point value v into 10-bit signe...
+
GLM_FUNC_DECL vec3 unpackUnorm2x3_1x2(uint8 p)
Convert a packed integer to a normalized floating-point vector.
+
GLM_FUNC_DECL uint64 packSnorm4x16(vec4 const &v)
First, converts each component of the normalized floating-point value v into 16-bit integer values...
+
GLM_FUNC_DECL u16vec2 unpackUint2x16(uint p)
Convert a packed integer into an integer vector.
+
GLM_FUNC_DECL uint16 packUnorm2x8(vec2 const &v)
First, converts each component of the normalized floating-point value v into 8-bit integer values...
+
GLM_FUNC_DECL vec< 3, T, Q > unpackRGBM(vec< 4, T, Q > const &rgbm)
Returns a floating-point vector with components obtained by reinterpreting an integer vector as 16-bi...
+
GLM_FUNC_DECL uint32 packI3x10_1x2(ivec4 const &v)
Returns an unsigned integer obtained by converting the components of a four-component signed integer ...
+
GLM_FUNC_DECL uint64 packHalf4x16(vec4 const &v)
Returns an unsigned integer obtained by converting the components of a four-component floating-point ...
+
GLM_FUNC_DECL float unpackSnorm1x8(uint8 p)
First, unpacks a single 8-bit unsigned integer p into a single 8-bit signed integers.
+
GLM_FUNC_DECL uvec4 unpackU3x10_1x2(uint32 p)
Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit unsigned integers...
+
GLM_FUNC_DECL vec< L, float, Q > unpackHalf(vec< L, uint16, Q > const &p)
Returns a floating-point vector with components obtained by reinterpreting an integer vector as 16-bi...
+
GLM_FUNC_DECL vec2 unpackSnorm2x8(uint16 p)
First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit signed integers.
+
GLM_FUNC_DECL uint16 packUnorm1x5_1x6_1x5(vec3 const &v)
Convert each component of the normalized floating-point vector into unsigned integer values...
+
GLM_FUNC_DECL i8vec2 unpackInt2x8(int16 p)
Convert a packed integer into an integer vector.
+
vec< 2, i8, defaultp > i8vec2
8 bit signed integer vector of 2 components type.
Definition: fwd.hpp:238
+
GLM_FUNC_DECL uint32 packUint4x8(u8vec4 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL uint64 packUnorm4x16(vec4 const &v)
First, converts each component of the normalized floating-point value v into 16-bit integer values...
+
GLM_FUNC_DECL uint8 packUnorm1x8(float v)
First, converts the normalized floating-point value v into a 8-bit integer value. ...
+
GLM_FUNC_DECL u16vec4 unpackUint4x16(uint64 p)
Convert a packed integer into an integer vector.
+
GLM_FUNC_DECL i8vec4 unpackInt4x8(int32 p)
Convert a packed integer into an integer vector.
+
GLM_FUNC_DECL vec< 4, T, Q > packRGBM(vec< 3, T, Q > const &rgb)
Returns an unsigned integer vector obtained by converting the components of a floating-point vector t...
+
GLM_FUNC_DECL int32 packInt4x8(i8vec4 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL u8vec2 unpackUint2x8(uint16 p)
Convert a packed integer into an integer vector.
+
GLM_FUNC_DECL vec4 unpackUnorm3x10_1x2(uint32 p)
First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers.
+
vec< 4, i8, defaultp > i8vec4
8 bit signed integer vector of 4 components type.
Definition: fwd.hpp:240
+
GLM_FUNC_DECL uint32 packUnorm3x10_1x2(vec4 const &v)
First, converts the first three components of the normalized floating-point value v into 10-bit unsig...
+
GLM_FUNC_DECL uint32 packU3x10_1x2(uvec4 const &v)
Returns an unsigned integer obtained by converting the components of a four-component unsigned intege...
+
vec< 2, i16, defaultp > i16vec2
16 bit signed integer vector of 2 components type.
Definition: fwd.hpp:258
+
GLM_FUNC_DECL i16vec2 unpackInt2x16(int p)
Convert a packed integer into an integer vector.
+
GLM_FUNC_DECL vec3 unpackF2x11_1x10(uint32 p)
First, unpacks a single 32-bit unsigned integer p into two 11-bit signless floating-point values and ...
+
GLM_GTC_type_precision
+
vec< 2, u16, defaultp > u16vec2
Default qualifier 16 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:360
+
vec< 4, i16, defaultp > i16vec4
16 bit signed integer vector of 4 components type.
Definition: fwd.hpp:260
+
GLM_FUNC_DECL vec2 unpackUnorm2x8(uint16 p)
First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit unsigned integers.
+
GLM_FUNC_DECL vec3 unpackF3x9_E1x5(uint32 p)
First, unpacks a single 32-bit unsigned integer p into two 11-bit signless floating-point values and ...
+
GLM_FUNC_DECL vec4 unpackUnorm3x5_1x1(uint16 p)
Convert a packed integer to a normalized floating-point vector.
+
vec< 2, u32, defaultp > u32vec2
Default qualifier 32 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:380
+
GLM_FUNC_DECL float unpackUnorm1x8(uint8 p)
Convert a single 8-bit integer to a normalized floating-point value.
+
vec< 2, u8, defaultp > u8vec2
Default qualifier 8 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:340
+
GLM_FUNC_DECL int packInt2x16(i16vec2 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL vec< L, floatType, Q > unpackSnorm(vec< L, intType, Q > const &v)
Convert a packed integer to a normalized floating-point vector.
+
GLM_FUNC_DECL int16 packInt2x8(i8vec2 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL uint16 packUnorm3x5_1x1(vec4 const &v)
Convert each component of the normalized floating-point vector into unsigned integer values...
+
GLM_FUNC_DECL uint16 packUnorm4x4(vec4 const &v)
Convert each component of the normalized floating-point vector into unsigned integer values...
+
Definition: common.hpp:18
+
detail::int64 int64
64 bit signed integer type.
+
vec< 4, u16, defaultp > u16vec4
Default qualifier 16 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:362
+
GLM_FUNC_DECL vec4 unpackUnorm4x16(uint64 p)
First, unpacks a single 64-bit unsigned integer p into four 16-bit unsigned integers.
+
vec< 4, float, defaultp > vec4
4 components vector of single-precision floating-point numbers.
+
vec< 2, i32, defaultp > i32vec2
32 bit signed integer vector of 2 components type.
Definition: fwd.hpp:278
+
GLM_FUNC_DECL i16vec4 unpackInt4x16(int64 p)
Convert a packed integer into an integer vector.
+
GLM_FUNC_DECL uint32 packF3x9_E1x5(vec3 const &v)
First, converts the first two components of the normalized floating-point value v into 11-bit signles...
+
GLM_FUNC_DECL int64 packInt2x32(i32vec2 const &v)
Convert each component from an integer vector into a packed unsigned integer.
+
GLM_FUNC_DECL u8vec4 unpackUint4x8(uint32 p)
Convert a packed integer into an integer vector.
+
vec< 4, int, defaultp > ivec4
4 components vector of signed integer numbers.
Definition: vector_int4.hpp:15
+
GLM_FUNC_DECL vec2 unpackUnorm2x4(uint8 p)
Convert a packed integer to a normalized floating-point vector.
+
GLM_FUNC_DECL uint16 packSnorm1x16(float v)
First, converts the normalized floating-point value v into 16-bit integer value.
+
GLM_FUNC_DECL vec< L, intType, Q > packSnorm(vec< L, floatType, Q > const &v)
Convert each component of the normalized floating-point vector into signed integer values...
+
GLM_FUNC_DECL uint32 packF2x11_1x10(vec3 const &v)
First, converts the first two components of the normalized floating-point value v into 11-bit signles...
+
GLM_FUNC_DECL vec4 unpackHalf4x16(uint64 p)
Returns a four-component floating-point vector with components obtained by unpacking a 64-bit unsigne...
+
GLM_FUNC_DECL vec4 unpackSnorm3x10_1x2(uint32 p)
First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers.
+
GLM_FUNC_DECL uint8 packUnorm2x4(vec2 const &v)
Convert each component of the normalized floating-point vector into unsigned integer values...
+
+ + + + diff --git a/common/glm/doc/api/a01370.html b/common/glm/doc/api/a01370.html new file mode 100644 index 000000000..cf29f4efb --- /dev/null +++ b/common/glm/doc/api/a01370.html @@ -0,0 +1,141 @@ + + + + + + + +0.9.9 API documenation: quaternion.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtc/quaternion.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > eulerAngles (qua< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > greaterThan (qua< T, Q > const &x, qua< T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > greaterThanEqual (qua< T, Q > const &x, qua< T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > lessThan (qua< T, Q > const &x, qua< T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > lessThanEqual (qua< T, Q > const &x, qua< T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > mat3_cast (qua< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > mat4_cast (qua< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T pitch (qua< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > quat_cast (mat< 3, 3, T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > quat_cast (mat< 4, 4, T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > quatLookAt (vec< 3, T, Q > const &direction, vec< 3, T, Q > const &up)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > quatLookAtLH (vec< 3, T, Q > const &direction, vec< 3, T, Q > const &up)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > quatLookAtRH (vec< 3, T, Q > const &direction, vec< 3, T, Q > const &up)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T roll (qua< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T yaw (qua< T, Q > const &x)
 
+

Detailed Description

+

GLM_GTC_quaternion

+
See also
Core features (dependence)
+
+GLM_GTC_constants (dependence)
+ +

Definition in file gtc/quaternion.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01370_source.html b/common/glm/doc/api/a01370_source.html new file mode 100644 index 000000000..f09d0e0a2 --- /dev/null +++ b/common/glm/doc/api/a01370_source.html @@ -0,0 +1,96 @@ + + + + + + + +0.9.9 API documenation: quaternion.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtc/quaternion.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../gtc/constants.hpp"
18 #include "../gtc/matrix_transform.hpp"
19 #include "../ext/vector_relational.hpp"
20 #include "../ext/quaternion_common.hpp"
21 #include "../ext/quaternion_float.hpp"
22 #include "../ext/quaternion_float_precision.hpp"
23 #include "../ext/quaternion_double.hpp"
24 #include "../ext/quaternion_double_precision.hpp"
25 #include "../ext/quaternion_relational.hpp"
26 #include "../ext/quaternion_geometric.hpp"
27 #include "../ext/quaternion_trigonometric.hpp"
28 #include "../ext/quaternion_transform.hpp"
29 #include "../detail/type_mat3x3.hpp"
30 #include "../detail/type_mat4x4.hpp"
31 #include "../detail/type_vec3.hpp"
32 #include "../detail/type_vec4.hpp"
33 
34 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
35 # pragma message("GLM: GLM_GTC_quaternion extension included")
36 #endif
37 
38 namespace glm
39 {
42 
49  template<typename T, qualifier Q>
50  GLM_FUNC_DECL vec<3, T, Q> eulerAngles(qua<T, Q> const& x);
51 
57  template<typename T, qualifier Q>
58  GLM_FUNC_DECL T roll(qua<T, Q> const& x);
59 
65  template<typename T, qualifier Q>
66  GLM_FUNC_DECL T pitch(qua<T, Q> const& x);
67 
73  template<typename T, qualifier Q>
74  GLM_FUNC_DECL T yaw(qua<T, Q> const& x);
75 
81  template<typename T, qualifier Q>
82  GLM_FUNC_DECL mat<3, 3, T, Q> mat3_cast(qua<T, Q> const& x);
83 
89  template<typename T, qualifier Q>
90  GLM_FUNC_DECL mat<4, 4, T, Q> mat4_cast(qua<T, Q> const& x);
91 
97  template<typename T, qualifier Q>
98  GLM_FUNC_DECL qua<T, Q> quat_cast(mat<3, 3, T, Q> const& x);
99 
105  template<typename T, qualifier Q>
106  GLM_FUNC_DECL qua<T, Q> quat_cast(mat<4, 4, T, Q> const& x);
107 
114  template<typename T, qualifier Q>
115  GLM_FUNC_DECL vec<4, bool, Q> lessThan(qua<T, Q> const& x, qua<T, Q> const& y);
116 
123  template<typename T, qualifier Q>
124  GLM_FUNC_DECL vec<4, bool, Q> lessThanEqual(qua<T, Q> const& x, qua<T, Q> const& y);
125 
132  template<typename T, qualifier Q>
133  GLM_FUNC_DECL vec<4, bool, Q> greaterThan(qua<T, Q> const& x, qua<T, Q> const& y);
134 
141  template<typename T, qualifier Q>
142  GLM_FUNC_DECL vec<4, bool, Q> greaterThanEqual(qua<T, Q> const& x, qua<T, Q> const& y);
143 
148  template<typename T, qualifier Q>
149  GLM_FUNC_DECL qua<T, Q> quatLookAt(
150  vec<3, T, Q> const& direction,
151  vec<3, T, Q> const& up);
152 
157  template<typename T, qualifier Q>
158  GLM_FUNC_DECL qua<T, Q> quatLookAtRH(
159  vec<3, T, Q> const& direction,
160  vec<3, T, Q> const& up);
161 
166  template<typename T, qualifier Q>
167  GLM_FUNC_DECL qua<T, Q> quatLookAtLH(
168  vec<3, T, Q> const& direction,
169  vec<3, T, Q> const& up);
171 } //namespace glm
172 
173 #include "quaternion.inl"
GLM_FUNC_DECL vec< 4, bool, Q > lessThan(qua< T, Q > const &x, qua< T, Q > const &y)
Returns the component-wise comparison result of x < y.
+
GLM_FUNC_DECL qua< T, Q > quat_cast(mat< 4, 4, T, Q > const &x)
Converts a pure rotation 4 * 4 matrix to a quaternion.
+
GLM_FUNC_DECL qua< T, Q > quatLookAt(vec< 3, T, Q > const &direction, vec< 3, T, Q > const &up)
Build a look at quaternion based on the default handedness.
+
GLM_FUNC_DECL vec< 3, T, Q > eulerAngles(qua< T, Q > const &x)
Returns euler angles, pitch as x, yaw as y, roll as z.
+
GLM_FUNC_DECL mat< 3, 3, T, Q > mat3_cast(qua< T, Q > const &x)
Converts a quaternion to a 3 * 3 matrix.
+
GLM_FUNC_DECL vec< 4, bool, Q > greaterThanEqual(qua< T, Q > const &x, qua< T, Q > const &y)
Returns the component-wise comparison of result x >= y.
+
GLM_FUNC_DECL vec< 4, bool, Q > greaterThan(qua< T, Q > const &x, qua< T, Q > const &y)
Returns the component-wise comparison of result x > y.
+
GLM_FUNC_DECL T pitch(qua< T, Q > const &x)
Returns pitch value of euler angles expressed in radians.
+
GLM_FUNC_DECL qua< T, Q > quatLookAtRH(vec< 3, T, Q > const &direction, vec< 3, T, Q > const &up)
Build a right-handed look at quaternion.
+
GLM_FUNC_DECL qua< T, Q > quatLookAtLH(vec< 3, T, Q > const &direction, vec< 3, T, Q > const &up)
Build a left-handed look at quaternion.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > mat4_cast(qua< T, Q > const &x)
Converts a quaternion to a 4 * 4 matrix.
+
GLM_FUNC_DECL T roll(qua< T, Q > const &x)
Returns roll value of euler angles expressed in radians.
+
Definition: common.hpp:20
+
GLM_FUNC_DECL T yaw(qua< T, Q > const &x)
Returns yaw value of euler angles expressed in radians.
+
GLM_FUNC_DECL vec< 4, bool, Q > lessThanEqual(qua< T, Q > const &x, qua< T, Q > const &y)
Returns the component-wise comparison of result x <= y.
+
+ + + + diff --git a/common/glm/doc/api/a01371.html b/common/glm/doc/api/a01371.html new file mode 100644 index 000000000..85c7e5035 --- /dev/null +++ b/common/glm/doc/api/a01371.html @@ -0,0 +1,140 @@ + + + + + + + +0.9.9 API documenation: quaternion.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtc/quaternion.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > eulerAngles (qua< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > greaterThan (qua< T, Q > const &x, qua< T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > greaterThanEqual (qua< T, Q > const &x, qua< T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > lessThan (qua< T, Q > const &x, qua< T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > lessThanEqual (qua< T, Q > const &x, qua< T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > mat3_cast (qua< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > mat4_cast (qua< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T pitch (qua< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > quat_cast (mat< 3, 3, T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > quat_cast (mat< 4, 4, T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > quatLookAt (vec< 3, T, Q > const &direction, vec< 3, T, Q > const &up)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > quatLookAtLH (vec< 3, T, Q > const &direction, vec< 3, T, Q > const &up)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > quatLookAtRH (vec< 3, T, Q > const &direction, vec< 3, T, Q > const &up)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T roll (qua< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T yaw (qua< T, Q > const &x)
 
+

Detailed Description

+
See also
Core features (dependence)
+
+GLM_GTC_constants (dependence)
+ +

Definition in file gtc/quaternion.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01371_source.html b/common/glm/doc/api/a01371_source.html new file mode 100644 index 000000000..80907eae8 --- /dev/null +++ b/common/glm/doc/api/a01371_source.html @@ -0,0 +1,96 @@ + + + + + + + +0.9.9 API documenation: quaternion.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtc/quaternion.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../gtc/constants.hpp"
18 #include "../gtc/matrix_transform.hpp"
19 #include "../ext/vector_relational.hpp"
20 #include "../ext/quaternion_common.hpp"
21 #include "../ext/quaternion_float.hpp"
22 #include "../ext/quaternion_float_precision.hpp"
23 #include "../ext/quaternion_double.hpp"
24 #include "../ext/quaternion_double_precision.hpp"
25 #include "../ext/quaternion_relational.hpp"
26 #include "../ext/quaternion_geometric.hpp"
27 #include "../ext/quaternion_trigonometric.hpp"
28 #include "../ext/quaternion_transform.hpp"
29 #include "../detail/type_mat3x3.hpp"
30 #include "../detail/type_mat4x4.hpp"
31 #include "../detail/type_vec3.hpp"
32 #include "../detail/type_vec4.hpp"
33 
34 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
35 # pragma message("GLM: GLM_GTC_quaternion extension included")
36 #endif
37 
38 namespace glm
39 {
42 
49  template<typename T, qualifier Q>
50  GLM_FUNC_DECL vec<3, T, Q> eulerAngles(qua<T, Q> const& x);
51 
57  template<typename T, qualifier Q>
58  GLM_FUNC_DECL T roll(qua<T, Q> const& x);
59 
65  template<typename T, qualifier Q>
66  GLM_FUNC_DECL T pitch(qua<T, Q> const& x);
67 
73  template<typename T, qualifier Q>
74  GLM_FUNC_DECL T yaw(qua<T, Q> const& x);
75 
81  template<typename T, qualifier Q>
82  GLM_FUNC_DECL mat<3, 3, T, Q> mat3_cast(qua<T, Q> const& x);
83 
89  template<typename T, qualifier Q>
90  GLM_FUNC_DECL mat<4, 4, T, Q> mat4_cast(qua<T, Q> const& x);
91 
97  template<typename T, qualifier Q>
98  GLM_FUNC_DECL qua<T, Q> quat_cast(mat<3, 3, T, Q> const& x);
99 
105  template<typename T, qualifier Q>
106  GLM_FUNC_DECL qua<T, Q> quat_cast(mat<4, 4, T, Q> const& x);
107 
114  template<typename T, qualifier Q>
115  GLM_FUNC_DECL vec<4, bool, Q> lessThan(qua<T, Q> const& x, qua<T, Q> const& y);
116 
123  template<typename T, qualifier Q>
124  GLM_FUNC_DECL vec<4, bool, Q> lessThanEqual(qua<T, Q> const& x, qua<T, Q> const& y);
125 
132  template<typename T, qualifier Q>
133  GLM_FUNC_DECL vec<4, bool, Q> greaterThan(qua<T, Q> const& x, qua<T, Q> const& y);
134 
141  template<typename T, qualifier Q>
142  GLM_FUNC_DECL vec<4, bool, Q> greaterThanEqual(qua<T, Q> const& x, qua<T, Q> const& y);
143 
148  template<typename T, qualifier Q>
149  GLM_FUNC_DECL qua<T, Q> quatLookAt(
150  vec<3, T, Q> const& direction,
151  vec<3, T, Q> const& up);
152 
157  template<typename T, qualifier Q>
158  GLM_FUNC_DECL qua<T, Q> quatLookAtRH(
159  vec<3, T, Q> const& direction,
160  vec<3, T, Q> const& up);
161 
166  template<typename T, qualifier Q>
167  GLM_FUNC_DECL qua<T, Q> quatLookAtLH(
168  vec<3, T, Q> const& direction,
169  vec<3, T, Q> const& up);
171 } //namespace glm
172 
173 #include "quaternion.inl"
GLM_FUNC_DECL vec< 4, bool, Q > lessThan(qua< T, Q > const &x, qua< T, Q > const &y)
Returns the component-wise comparison result of x < y.
+
Definition: common.hpp:18
+
GLM_FUNC_DECL qua< T, Q > quat_cast(mat< 4, 4, T, Q > const &x)
Converts a pure rotation 4 * 4 matrix to a quaternion.
+
GLM_FUNC_DECL qua< T, Q > quatLookAt(vec< 3, T, Q > const &direction, vec< 3, T, Q > const &up)
Build a look at quaternion based on the default handedness.
+
GLM_FUNC_DECL vec< 3, T, Q > eulerAngles(qua< T, Q > const &x)
Returns euler angles, pitch as x, yaw as y, roll as z.
+
GLM_FUNC_DECL mat< 3, 3, T, Q > mat3_cast(qua< T, Q > const &x)
Converts a quaternion to a 3 * 3 matrix.
+
GLM_FUNC_DECL vec< 4, bool, Q > greaterThanEqual(qua< T, Q > const &x, qua< T, Q > const &y)
Returns the component-wise comparison of result x >= y.
+
GLM_FUNC_DECL vec< 4, bool, Q > greaterThan(qua< T, Q > const &x, qua< T, Q > const &y)
Returns the component-wise comparison of result x > y.
+
GLM_FUNC_DECL T pitch(qua< T, Q > const &x)
Returns pitch value of euler angles expressed in radians.
+
GLM_FUNC_DECL qua< T, Q > quatLookAtRH(vec< 3, T, Q > const &direction, vec< 3, T, Q > const &up)
Build a right-handed look at quaternion.
+
GLM_FUNC_DECL qua< T, Q > quatLookAtLH(vec< 3, T, Q > const &direction, vec< 3, T, Q > const &up)
Build a left-handed look at quaternion.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > mat4_cast(qua< T, Q > const &x)
Converts a quaternion to a 4 * 4 matrix.
+
GLM_FUNC_DECL T roll(qua< T, Q > const &x)
Returns roll value of euler angles expressed in radians.
+
GLM_FUNC_DECL T yaw(qua< T, Q > const &x)
Returns yaw value of euler angles expressed in radians.
+
GLM_FUNC_DECL vec< 4, bool, Q > lessThanEqual(qua< T, Q > const &x, qua< T, Q > const &y)
Returns the component-wise comparison of result x <= y.
+
+ + + + diff --git a/common/glm/doc/api/a01372.html b/common/glm/doc/api/a01372.html new file mode 100644 index 000000000..7e49edf0c --- /dev/null +++ b/common/glm/doc/api/a01372.html @@ -0,0 +1,159 @@ + + + + + + + +0.9.9 API documenation: quaternion.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtc/quaternion.hpp File Reference
+
+
+ +

GLM_GTC_quaternion +More...

+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > eulerAngles (qua< T, Q > const &x)
 Returns euler angles, pitch as x, yaw as y, roll as z. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > greaterThan (qua< T, Q > const &x, qua< T, Q > const &y)
 Returns the component-wise comparison of result x > y. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > greaterThanEqual (qua< T, Q > const &x, qua< T, Q > const &y)
 Returns the component-wise comparison of result x >= y. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > lessThan (qua< T, Q > const &x, qua< T, Q > const &y)
 Returns the component-wise comparison result of x < y. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, bool, Q > lessThanEqual (qua< T, Q > const &x, qua< T, Q > const &y)
 Returns the component-wise comparison of result x <= y. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > mat3_cast (qua< T, Q > const &x)
 Converts a quaternion to a 3 * 3 matrix. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > mat4_cast (qua< T, Q > const &x)
 Converts a quaternion to a 4 * 4 matrix. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T pitch (qua< T, Q > const &x)
 Returns pitch value of euler angles expressed in radians. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > quat_cast (mat< 3, 3, T, Q > const &x)
 Converts a pure rotation 3 * 3 matrix to a quaternion. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > quat_cast (mat< 4, 4, T, Q > const &x)
 Converts a pure rotation 4 * 4 matrix to a quaternion. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > quatLookAt (vec< 3, T, Q > const &direction, vec< 3, T, Q > const &up)
 Build a look at quaternion based on the default handedness. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > quatLookAtLH (vec< 3, T, Q > const &direction, vec< 3, T, Q > const &up)
 Build a left-handed look at quaternion. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > quatLookAtRH (vec< 3, T, Q > const &direction, vec< 3, T, Q > const &up)
 Build a right-handed look at quaternion. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T roll (qua< T, Q > const &x)
 Returns roll value of euler angles expressed in radians. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T yaw (qua< T, Q > const &x)
 Returns yaw value of euler angles expressed in radians. More...
 
+

Detailed Description

+

GLM_GTC_quaternion

+
See also
Core features (dependence)
+
+GLM_GTC_constants (dependence)
+ +

Definition in file gtc/quaternion.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01372_source.html b/common/glm/doc/api/a01372_source.html new file mode 100644 index 000000000..02f3789ea --- /dev/null +++ b/common/glm/doc/api/a01372_source.html @@ -0,0 +1,96 @@ + + + + + + + +0.9.9 API documenation: quaternion.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtc/quaternion.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../gtc/constants.hpp"
18 #include "../gtc/matrix_transform.hpp"
19 #include "../ext/vector_relational.hpp"
20 #include "../ext/quaternion_common.hpp"
21 #include "../ext/quaternion_float.hpp"
22 #include "../ext/quaternion_float_precision.hpp"
23 #include "../ext/quaternion_double.hpp"
24 #include "../ext/quaternion_double_precision.hpp"
25 #include "../ext/quaternion_relational.hpp"
26 #include "../ext/quaternion_geometric.hpp"
27 #include "../ext/quaternion_trigonometric.hpp"
28 #include "../ext/quaternion_transform.hpp"
29 #include "../detail/type_mat3x3.hpp"
30 #include "../detail/type_mat4x4.hpp"
31 #include "../detail/type_vec3.hpp"
32 #include "../detail/type_vec4.hpp"
33 
34 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
35 # pragma message("GLM: GLM_GTC_quaternion extension included")
36 #endif
37 
38 namespace glm
39 {
42 
49  template<typename T, qualifier Q>
50  GLM_FUNC_DECL vec<3, T, Q> eulerAngles(qua<T, Q> const& x);
51 
57  template<typename T, qualifier Q>
58  GLM_FUNC_DECL T roll(qua<T, Q> const& x);
59 
65  template<typename T, qualifier Q>
66  GLM_FUNC_DECL T pitch(qua<T, Q> const& x);
67 
73  template<typename T, qualifier Q>
74  GLM_FUNC_DECL T yaw(qua<T, Q> const& x);
75 
81  template<typename T, qualifier Q>
82  GLM_FUNC_DECL mat<3, 3, T, Q> mat3_cast(qua<T, Q> const& x);
83 
89  template<typename T, qualifier Q>
90  GLM_FUNC_DECL mat<4, 4, T, Q> mat4_cast(qua<T, Q> const& x);
91 
97  template<typename T, qualifier Q>
98  GLM_FUNC_DECL qua<T, Q> quat_cast(mat<3, 3, T, Q> const& x);
99 
105  template<typename T, qualifier Q>
106  GLM_FUNC_DECL qua<T, Q> quat_cast(mat<4, 4, T, Q> const& x);
107 
114  template<typename T, qualifier Q>
115  GLM_FUNC_DECL vec<4, bool, Q> lessThan(qua<T, Q> const& x, qua<T, Q> const& y);
116 
123  template<typename T, qualifier Q>
124  GLM_FUNC_DECL vec<4, bool, Q> lessThanEqual(qua<T, Q> const& x, qua<T, Q> const& y);
125 
132  template<typename T, qualifier Q>
133  GLM_FUNC_DECL vec<4, bool, Q> greaterThan(qua<T, Q> const& x, qua<T, Q> const& y);
134 
141  template<typename T, qualifier Q>
142  GLM_FUNC_DECL vec<4, bool, Q> greaterThanEqual(qua<T, Q> const& x, qua<T, Q> const& y);
143 
148  template<typename T, qualifier Q>
149  GLM_FUNC_DECL qua<T, Q> quatLookAt(
150  vec<3, T, Q> const& direction,
151  vec<3, T, Q> const& up);
152 
157  template<typename T, qualifier Q>
158  GLM_FUNC_DECL qua<T, Q> quatLookAtRH(
159  vec<3, T, Q> const& direction,
160  vec<3, T, Q> const& up);
161 
166  template<typename T, qualifier Q>
167  GLM_FUNC_DECL qua<T, Q> quatLookAtLH(
168  vec<3, T, Q> const& direction,
169  vec<3, T, Q> const& up);
171 } //namespace glm
172 
173 #include "quaternion.inl"
GLM_FUNC_DECL vec< 3, T, Q > eulerAngles(qua< T, Q > const &x)
Returns euler angles, pitch as x, yaw as y, roll as z.
+
GLM_FUNC_DECL mat< 3, 3, T, Q > mat3_cast(qua< T, Q > const &x)
Converts a quaternion to a 3 * 3 matrix.
+
GLM_FUNC_DECL T pitch(qua< T, Q > const &x)
Returns pitch value of euler angles expressed in radians.
+
GLM_FUNC_DECL vec< 4, bool, Q > greaterThanEqual(qua< T, Q > const &x, qua< T, Q > const &y)
Returns the component-wise comparison of result x >= y.
+
GLM_FUNC_DECL qua< T, Q > quatLookAtLH(vec< 3, T, Q > const &direction, vec< 3, T, Q > const &up)
Build a left-handed look at quaternion.
+
GLM_FUNC_DECL vec< 4, bool, Q > greaterThan(qua< T, Q > const &x, qua< T, Q > const &y)
Returns the component-wise comparison of result x > y.
+
GLM_FUNC_DECL T roll(qua< T, Q > const &x)
Returns roll value of euler angles expressed in radians.
+
GLM_FUNC_DECL qua< T, Q > quatLookAtRH(vec< 3, T, Q > const &direction, vec< 3, T, Q > const &up)
Build a right-handed look at quaternion.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > mat4_cast(qua< T, Q > const &x)
Converts a quaternion to a 4 * 4 matrix.
+
GLM_FUNC_DECL vec< 4, bool, Q > lessThanEqual(qua< T, Q > const &x, qua< T, Q > const &y)
Returns the component-wise comparison of result x <= y.
+
GLM_FUNC_DECL T yaw(qua< T, Q > const &x)
Returns yaw value of euler angles expressed in radians.
+
GLM_FUNC_DECL qua< T, Q > quat_cast(mat< 4, 4, T, Q > const &x)
Converts a pure rotation 4 * 4 matrix to a quaternion.
+
GLM_FUNC_DECL vec< 4, bool, Q > lessThan(qua< T, Q > const &x, qua< T, Q > const &y)
Returns the component-wise comparison result of x < y.
+
GLM_FUNC_DECL qua< T, Q > quatLookAt(vec< 3, T, Q > const &direction, vec< 3, T, Q > const &up)
Build a look at quaternion based on the default handedness.
+
Definition: common.hpp:18
+
+ + + + diff --git a/common/glm/doc/api/a01373.html b/common/glm/doc/api/a01373.html new file mode 100644 index 000000000..0be80e2e2 --- /dev/null +++ b/common/glm/doc/api/a01373.html @@ -0,0 +1,144 @@ + + + + + + + +0.9.9 API documenation: quaternion.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtx/quaternion.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > cross (qua< T, Q > const &q, vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > cross (vec< 3, T, Q > const &v, qua< T, Q > const &q)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T extractRealComponent (qua< T, Q > const &q)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > fastMix (qua< T, Q > const &x, qua< T, Q > const &y, T const &a)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > intermediate (qua< T, Q > const &prev, qua< T, Q > const &curr, qua< T, Q > const &next)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T length2 (qua< T, Q > const &q)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > quat_identity ()
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > rotate (qua< T, Q > const &q, vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > rotate (qua< T, Q > const &q, vec< 4, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > rotation (vec< 3, T, Q > const &orig, vec< 3, T, Q > const &dest)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > shortMix (qua< T, Q > const &x, qua< T, Q > const &y, T const &a)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > squad (qua< T, Q > const &q1, qua< T, Q > const &q2, qua< T, Q > const &s1, qua< T, Q > const &s2, T const &h)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > toMat3 (qua< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > toMat4 (qua< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > toQuat (mat< 3, 3, T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > toQuat (mat< 4, 4, T, Q > const &x)
 
+

Detailed Description

+

GLM_GTX_quaternion

+
See also
Core features (dependence)
+
+gtx_extented_min_max (dependence)
+ +

Definition in file gtx/quaternion.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01373_source.html b/common/glm/doc/api/a01373_source.html new file mode 100644 index 000000000..bdca20e81 --- /dev/null +++ b/common/glm/doc/api/a01373_source.html @@ -0,0 +1,98 @@ + + + + + + + +0.9.9 API documenation: quaternion.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtx/quaternion.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../glm.hpp"
18 #include "../gtc/constants.hpp"
19 #include "../gtc/quaternion.hpp"
20 #include "../ext/quaternion_exponential.hpp"
21 #include "../gtx/norm.hpp"
22 
23 #ifndef GLM_ENABLE_EXPERIMENTAL
24 # error "GLM: GLM_GTX_quaternion is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
25 #endif
26 
27 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
28 # pragma message("GLM: GLM_GTX_quaternion extension included")
29 #endif
30 
31 namespace glm
32 {
35 
39  template<typename T, qualifier Q>
40  GLM_FUNC_DECL qua<T, Q> quat_identity();
41 
45  template<typename T, qualifier Q>
46  GLM_FUNC_DECL vec<3, T, Q> cross(
47  qua<T, Q> const& q,
48  vec<3, T, Q> const& v);
49 
53  template<typename T, qualifier Q>
54  GLM_FUNC_DECL vec<3, T, Q> cross(
55  vec<3, T, Q> const& v,
56  qua<T, Q> const& q);
57 
62  template<typename T, qualifier Q>
63  GLM_FUNC_DECL qua<T, Q> squad(
64  qua<T, Q> const& q1,
65  qua<T, Q> const& q2,
66  qua<T, Q> const& s1,
67  qua<T, Q> const& s2,
68  T const& h);
69 
73  template<typename T, qualifier Q>
74  GLM_FUNC_DECL qua<T, Q> intermediate(
75  qua<T, Q> const& prev,
76  qua<T, Q> const& curr,
77  qua<T, Q> const& next);
78 
82  //template<typename T, qualifier Q>
83  //qua<T, Q> sqrt(
84  // qua<T, Q> const& q);
85 
89  template<typename T, qualifier Q>
90  GLM_FUNC_DECL vec<3, T, Q> rotate(
91  qua<T, Q> const& q,
92  vec<3, T, Q> const& v);
93 
97  template<typename T, qualifier Q>
98  GLM_FUNC_DECL vec<4, T, Q> rotate(
99  qua<T, Q> const& q,
100  vec<4, T, Q> const& v);
101 
105  template<typename T, qualifier Q>
106  GLM_FUNC_DECL T extractRealComponent(
107  qua<T, Q> const& q);
108 
112  template<typename T, qualifier Q>
113  GLM_FUNC_DECL mat<3, 3, T, Q> toMat3(
114  qua<T, Q> const& x){return mat3_cast(x);}
115 
119  template<typename T, qualifier Q>
120  GLM_FUNC_DECL mat<4, 4, T, Q> toMat4(
121  qua<T, Q> const& x){return mat4_cast(x);}
122 
126  template<typename T, qualifier Q>
127  GLM_FUNC_DECL qua<T, Q> toQuat(
128  mat<3, 3, T, Q> const& x){return quat_cast(x);}
129 
133  template<typename T, qualifier Q>
134  GLM_FUNC_DECL qua<T, Q> toQuat(
135  mat<4, 4, T, Q> const& x){return quat_cast(x);}
136 
140  template<typename T, qualifier Q>
141  GLM_FUNC_DECL qua<T, Q> shortMix(
142  qua<T, Q> const& x,
143  qua<T, Q> const& y,
144  T const& a);
145 
149  template<typename T, qualifier Q>
150  GLM_FUNC_DECL qua<T, Q> fastMix(
151  qua<T, Q> const& x,
152  qua<T, Q> const& y,
153  T const& a);
154 
160  template<typename T, qualifier Q>
161  GLM_FUNC_DECL qua<T, Q> rotation(
162  vec<3, T, Q> const& orig,
163  vec<3, T, Q> const& dest);
164 
168  template<typename T, qualifier Q>
169  GLM_FUNC_DECL T length2(qua<T, Q> const& q);
170 
172 }//namespace glm
173 
174 #include "quaternion.inl"
GLM_FUNC_DECL T length2(qua< T, Q > const &q)
Returns the squared length of x.
+
GLM_FUNC_DECL qua< T, Q > quat_cast(mat< 3, 3, T, Q > const &x)
Converts a pure rotation 3 * 3 matrix to a quaternion.
+
GLM_FUNC_DECL qua< T, Q > quat_identity()
Create an identity quaternion.
+
GLM_FUNC_DECL qua< T, Q > fastMix(qua< T, Q > const &x, qua< T, Q > const &y, T const &a)
Quaternion normalized linear interpolation.
+
GLM_FUNC_DECL vec< 4, T, Q > rotate(qua< T, Q > const &q, vec< 4, T, Q > const &v)
Rotates a 4 components vector by a quaternion.
+
GLM_FUNC_DECL qua< T, Q > shortMix(qua< T, Q > const &x, qua< T, Q > const &y, T const &a)
Quaternion interpolation using the rotation short path.
+
GLM_FUNC_DECL qua< T, Q > toQuat(mat< 4, 4, T, Q > const &x)
Converts a 4 * 4 matrix to a quaternion.
+
GLM_FUNC_DECL mat< 3, 3, T, Q > toMat3(qua< T, Q > const &x)
Converts a quaternion to a 3 * 3 matrix.
+
GLM_FUNC_DECL qua< T, Q > intermediate(qua< T, Q > const &prev, qua< T, Q > const &curr, qua< T, Q > const &next)
Returns an intermediate control point for squad interpolation.
+
GLM_FUNC_DECL vec< 3, T, Q > cross(vec< 3, T, Q > const &v, qua< T, Q > const &q)
Compute a cross product between a vector and a quaternion.
+
GLM_FUNC_DECL mat< 3, 3, T, Q > mat3_cast(qua< T, Q > const &x)
Converts a quaternion to a 3 * 3 matrix.
+
GLM_FUNC_DECL T extractRealComponent(qua< T, Q > const &q)
Extract the real component of a quaternion.
+
GLM_FUNC_DECL qua< T, Q > squad(qua< T, Q > const &q1, qua< T, Q > const &q2, qua< T, Q > const &s1, qua< T, Q > const &s2, T const &h)
Compute a point on a path according squad equation.
+
GLM_FUNC_DECL qua< T, Q > rotation(vec< 3, T, Q > const &orig, vec< 3, T, Q > const &dest)
Compute the rotation between two vectors.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > toMat4(qua< T, Q > const &x)
Converts a quaternion to a 4 * 4 matrix.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > mat4_cast(qua< T, Q > const &x)
Converts a quaternion to a 4 * 4 matrix.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a01374.html b/common/glm/doc/api/a01374.html new file mode 100644 index 000000000..26ffdcf08 --- /dev/null +++ b/common/glm/doc/api/a01374.html @@ -0,0 +1,143 @@ + + + + + + + +0.9.9 API documenation: quaternion.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtx/quaternion.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > cross (qua< T, Q > const &q, vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > cross (vec< 3, T, Q > const &v, qua< T, Q > const &q)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T extractRealComponent (qua< T, Q > const &q)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > fastMix (qua< T, Q > const &x, qua< T, Q > const &y, T const &a)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > intermediate (qua< T, Q > const &prev, qua< T, Q > const &curr, qua< T, Q > const &next)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T length2 (qua< T, Q > const &q)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > quat_identity ()
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > rotate (qua< T, Q > const &q, vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > rotate (qua< T, Q > const &q, vec< 4, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > rotation (vec< 3, T, Q > const &orig, vec< 3, T, Q > const &dest)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > shortMix (qua< T, Q > const &x, qua< T, Q > const &y, T const &a)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > squad (qua< T, Q > const &q1, qua< T, Q > const &q2, qua< T, Q > const &s1, qua< T, Q > const &s2, T const &h)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > toMat3 (qua< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > toMat4 (qua< T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > toQuat (mat< 3, 3, T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > toQuat (mat< 4, 4, T, Q > const &x)
 
+

Detailed Description

+
See also
Core features (dependence)
+
+gtx_extented_min_max (dependence)
+ +

Definition in file gtx/quaternion.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01374_source.html b/common/glm/doc/api/a01374_source.html new file mode 100644 index 000000000..933b2ad45 --- /dev/null +++ b/common/glm/doc/api/a01374_source.html @@ -0,0 +1,98 @@ + + + + + + + +0.9.9 API documenation: quaternion.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtx/quaternion.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../glm.hpp"
18 #include "../gtc/constants.hpp"
19 #include "../gtc/quaternion.hpp"
20 #include "../ext/quaternion_exponential.hpp"
21 #include "../gtx/norm.hpp"
22 
23 #ifndef GLM_ENABLE_EXPERIMENTAL
24 # error "GLM: GLM_GTX_quaternion is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
25 #endif
26 
27 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
28 # pragma message("GLM: GLM_GTX_quaternion extension included")
29 #endif
30 
31 namespace glm
32 {
35 
39  template<typename T, qualifier Q>
40  GLM_FUNC_DECL qua<T, Q> quat_identity();
41 
45  template<typename T, qualifier Q>
46  GLM_FUNC_DECL vec<3, T, Q> cross(
47  qua<T, Q> const& q,
48  vec<3, T, Q> const& v);
49 
53  template<typename T, qualifier Q>
54  GLM_FUNC_DECL vec<3, T, Q> cross(
55  vec<3, T, Q> const& v,
56  qua<T, Q> const& q);
57 
62  template<typename T, qualifier Q>
63  GLM_FUNC_DECL qua<T, Q> squad(
64  qua<T, Q> const& q1,
65  qua<T, Q> const& q2,
66  qua<T, Q> const& s1,
67  qua<T, Q> const& s2,
68  T const& h);
69 
73  template<typename T, qualifier Q>
74  GLM_FUNC_DECL qua<T, Q> intermediate(
75  qua<T, Q> const& prev,
76  qua<T, Q> const& curr,
77  qua<T, Q> const& next);
78 
82  //template<typename T, qualifier Q>
83  //qua<T, Q> sqrt(
84  // qua<T, Q> const& q);
85 
89  template<typename T, qualifier Q>
90  GLM_FUNC_DECL vec<3, T, Q> rotate(
91  qua<T, Q> const& q,
92  vec<3, T, Q> const& v);
93 
97  template<typename T, qualifier Q>
98  GLM_FUNC_DECL vec<4, T, Q> rotate(
99  qua<T, Q> const& q,
100  vec<4, T, Q> const& v);
101 
105  template<typename T, qualifier Q>
106  GLM_FUNC_DECL T extractRealComponent(
107  qua<T, Q> const& q);
108 
112  template<typename T, qualifier Q>
113  GLM_FUNC_DECL mat<3, 3, T, Q> toMat3(
114  qua<T, Q> const& x){return mat3_cast(x);}
115 
119  template<typename T, qualifier Q>
120  GLM_FUNC_DECL mat<4, 4, T, Q> toMat4(
121  qua<T, Q> const& x){return mat4_cast(x);}
122 
126  template<typename T, qualifier Q>
127  GLM_FUNC_DECL qua<T, Q> toQuat(
128  mat<3, 3, T, Q> const& x){return quat_cast(x);}
129 
133  template<typename T, qualifier Q>
134  GLM_FUNC_DECL qua<T, Q> toQuat(
135  mat<4, 4, T, Q> const& x){return quat_cast(x);}
136 
140  template<typename T, qualifier Q>
141  GLM_FUNC_DECL qua<T, Q> shortMix(
142  qua<T, Q> const& x,
143  qua<T, Q> const& y,
144  T const& a);
145 
149  template<typename T, qualifier Q>
150  GLM_FUNC_DECL qua<T, Q> fastMix(
151  qua<T, Q> const& x,
152  qua<T, Q> const& y,
153  T const& a);
154 
160  template<typename T, qualifier Q>
161  GLM_FUNC_DECL qua<T, Q> rotation(
162  vec<3, T, Q> const& orig,
163  vec<3, T, Q> const& dest);
164 
168  template<typename T, qualifier Q>
169  GLM_FUNC_DECL T length2(qua<T, Q> const& q);
170 
172 }//namespace glm
173 
174 #include "quaternion.inl"
GLM_FUNC_DECL T length2(qua< T, Q > const &q)
Returns the squared length of x.
+
GLM_FUNC_DECL qua< T, Q > quat_cast(mat< 3, 3, T, Q > const &x)
Converts a pure rotation 3 * 3 matrix to a quaternion.
+
GLM_FUNC_DECL qua< T, Q > quat_identity()
Create an identity quaternion.
+
Definition: common.hpp:18
+
GLM_FUNC_DECL qua< T, Q > fastMix(qua< T, Q > const &x, qua< T, Q > const &y, T const &a)
Quaternion normalized linear interpolation.
+
GLM_FUNC_DECL vec< 4, T, Q > rotate(qua< T, Q > const &q, vec< 4, T, Q > const &v)
Rotates a 4 components vector by a quaternion.
+
GLM_FUNC_DECL qua< T, Q > shortMix(qua< T, Q > const &x, qua< T, Q > const &y, T const &a)
Quaternion interpolation using the rotation short path.
+
GLM_FUNC_DECL qua< T, Q > toQuat(mat< 4, 4, T, Q > const &x)
Converts a 4 * 4 matrix to a quaternion.
+
GLM_FUNC_DECL mat< 3, 3, T, Q > toMat3(qua< T, Q > const &x)
Converts a quaternion to a 3 * 3 matrix.
+
GLM_FUNC_DECL qua< T, Q > intermediate(qua< T, Q > const &prev, qua< T, Q > const &curr, qua< T, Q > const &next)
Returns an intermediate control point for squad interpolation.
+
GLM_FUNC_DECL vec< 3, T, Q > cross(vec< 3, T, Q > const &v, qua< T, Q > const &q)
Compute a cross product between a vector and a quaternion.
+
GLM_FUNC_DECL mat< 3, 3, T, Q > mat3_cast(qua< T, Q > const &x)
Converts a quaternion to a 3 * 3 matrix.
+
GLM_FUNC_DECL T extractRealComponent(qua< T, Q > const &q)
Extract the real component of a quaternion.
+
GLM_FUNC_DECL qua< T, Q > squad(qua< T, Q > const &q1, qua< T, Q > const &q2, qua< T, Q > const &s1, qua< T, Q > const &s2, T const &h)
Compute a point on a path according squad equation.
+
GLM_FUNC_DECL qua< T, Q > rotation(vec< 3, T, Q > const &orig, vec< 3, T, Q > const &dest)
Compute the rotation between two vectors.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > toMat4(qua< T, Q > const &x)
Converts a quaternion to a 4 * 4 matrix.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > mat4_cast(qua< T, Q > const &x)
Converts a quaternion to a 4 * 4 matrix.
+
+ + + + diff --git a/common/glm/doc/api/a01375.html b/common/glm/doc/api/a01375.html new file mode 100644 index 000000000..3a6f6c550 --- /dev/null +++ b/common/glm/doc/api/a01375.html @@ -0,0 +1,163 @@ + + + + + + + +0.9.9 API documenation: quaternion.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtx/quaternion.hpp File Reference
+
+
+ +

GLM_GTX_quaternion +More...

+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > cross (qua< T, Q > const &q, vec< 3, T, Q > const &v)
 Compute a cross product between a quaternion and a vector. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > cross (vec< 3, T, Q > const &v, qua< T, Q > const &q)
 Compute a cross product between a vector and a quaternion. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T extractRealComponent (qua< T, Q > const &q)
 Extract the real component of a quaternion. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > fastMix (qua< T, Q > const &x, qua< T, Q > const &y, T const &a)
 Quaternion normalized linear interpolation. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > intermediate (qua< T, Q > const &prev, qua< T, Q > const &curr, qua< T, Q > const &next)
 Returns an intermediate control point for squad interpolation. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T length2 (qua< T, Q > const &q)
 Returns the squared length of x. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > quat_identity ()
 Create an identity quaternion. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 3, T, Q > rotate (qua< T, Q > const &q, vec< 3, T, Q > const &v)
 Returns quarternion square root. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL vec< 4, T, Q > rotate (qua< T, Q > const &q, vec< 4, T, Q > const &v)
 Rotates a 4 components vector by a quaternion. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > rotation (vec< 3, T, Q > const &orig, vec< 3, T, Q > const &dest)
 Compute the rotation between two vectors. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > shortMix (qua< T, Q > const &x, qua< T, Q > const &y, T const &a)
 Quaternion interpolation using the rotation short path. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > squad (qua< T, Q > const &q1, qua< T, Q > const &q2, qua< T, Q > const &s1, qua< T, Q > const &s2, T const &h)
 Compute a point on a path according squad equation. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 3, 3, T, Q > toMat3 (qua< T, Q > const &x)
 Converts a quaternion to a 3 * 3 matrix. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL mat< 4, 4, T, Q > toMat4 (qua< T, Q > const &x)
 Converts a quaternion to a 4 * 4 matrix. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > toQuat (mat< 3, 3, T, Q > const &x)
 Converts a 3 * 3 matrix to a quaternion. More...
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > toQuat (mat< 4, 4, T, Q > const &x)
 Converts a 4 * 4 matrix to a quaternion. More...
 
+

Detailed Description

+

GLM_GTX_quaternion

+
See also
Core features (dependence)
+
+gtx_extented_min_max (dependence)
+ +

Definition in file gtx/quaternion.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01375_source.html b/common/glm/doc/api/a01375_source.html new file mode 100644 index 000000000..1c594ad39 --- /dev/null +++ b/common/glm/doc/api/a01375_source.html @@ -0,0 +1,98 @@ + + + + + + + +0.9.9 API documenation: quaternion.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtx/quaternion.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../glm.hpp"
18 #include "../gtc/constants.hpp"
19 #include "../gtc/quaternion.hpp"
20 #include "../ext/quaternion_exponential.hpp"
21 #include "../gtx/norm.hpp"
22 
23 #ifndef GLM_ENABLE_EXPERIMENTAL
24 # error "GLM: GLM_GTX_quaternion is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
25 #endif
26 
27 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
28 # pragma message("GLM: GLM_GTX_quaternion extension included")
29 #endif
30 
31 namespace glm
32 {
35 
39  template<typename T, qualifier Q>
40  GLM_FUNC_DECL qua<T, Q> quat_identity();
41 
45  template<typename T, qualifier Q>
46  GLM_FUNC_DECL vec<3, T, Q> cross(
47  qua<T, Q> const& q,
48  vec<3, T, Q> const& v);
49 
53  template<typename T, qualifier Q>
54  GLM_FUNC_DECL vec<3, T, Q> cross(
55  vec<3, T, Q> const& v,
56  qua<T, Q> const& q);
57 
62  template<typename T, qualifier Q>
63  GLM_FUNC_DECL qua<T, Q> squad(
64  qua<T, Q> const& q1,
65  qua<T, Q> const& q2,
66  qua<T, Q> const& s1,
67  qua<T, Q> const& s2,
68  T const& h);
69 
73  template<typename T, qualifier Q>
74  GLM_FUNC_DECL qua<T, Q> intermediate(
75  qua<T, Q> const& prev,
76  qua<T, Q> const& curr,
77  qua<T, Q> const& next);
78 
82  //template<typename T, qualifier Q>
83  //qua<T, Q> sqrt(
84  // qua<T, Q> const& q);
85 
89  template<typename T, qualifier Q>
90  GLM_FUNC_DECL vec<3, T, Q> rotate(
91  qua<T, Q> const& q,
92  vec<3, T, Q> const& v);
93 
97  template<typename T, qualifier Q>
98  GLM_FUNC_DECL vec<4, T, Q> rotate(
99  qua<T, Q> const& q,
100  vec<4, T, Q> const& v);
101 
105  template<typename T, qualifier Q>
106  GLM_FUNC_DECL T extractRealComponent(
107  qua<T, Q> const& q);
108 
112  template<typename T, qualifier Q>
113  GLM_FUNC_DECL mat<3, 3, T, Q> toMat3(
114  qua<T, Q> const& x){return mat3_cast(x);}
115 
119  template<typename T, qualifier Q>
120  GLM_FUNC_DECL mat<4, 4, T, Q> toMat4(
121  qua<T, Q> const& x){return mat4_cast(x);}
122 
126  template<typename T, qualifier Q>
127  GLM_FUNC_DECL qua<T, Q> toQuat(
128  mat<3, 3, T, Q> const& x){return quat_cast(x);}
129 
133  template<typename T, qualifier Q>
134  GLM_FUNC_DECL qua<T, Q> toQuat(
135  mat<4, 4, T, Q> const& x){return quat_cast(x);}
136 
140  template<typename T, qualifier Q>
141  GLM_FUNC_DECL qua<T, Q> shortMix(
142  qua<T, Q> const& x,
143  qua<T, Q> const& y,
144  T const& a);
145 
149  template<typename T, qualifier Q>
150  GLM_FUNC_DECL qua<T, Q> fastMix(
151  qua<T, Q> const& x,
152  qua<T, Q> const& y,
153  T const& a);
154 
160  template<typename T, qualifier Q>
161  GLM_FUNC_DECL qua<T, Q> rotation(
162  vec<3, T, Q> const& orig,
163  vec<3, T, Q> const& dest);
164 
168  template<typename T, qualifier Q>
169  GLM_FUNC_DECL T length2(qua<T, Q> const& q);
170 
172 }//namespace glm
173 
174 #include "quaternion.inl"
GLM_FUNC_DECL qua< T, Q > intermediate(qua< T, Q > const &prev, qua< T, Q > const &curr, qua< T, Q > const &next)
Returns an intermediate control point for squad interpolation.
+
GLM_FUNC_DECL qua< T, Q > toQuat(mat< 4, 4, T, Q > const &x)
Converts a 4 * 4 matrix to a quaternion.
+
GLM_FUNC_DECL mat< 3, 3, T, Q > mat3_cast(qua< T, Q > const &x)
Converts a quaternion to a 3 * 3 matrix.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > toMat4(qua< T, Q > const &x)
Converts a quaternion to a 4 * 4 matrix.
+
GLM_FUNC_DECL mat< 3, 3, T, Q > toMat3(qua< T, Q > const &x)
Converts a quaternion to a 3 * 3 matrix.
+
GLM_FUNC_DECL qua< T, Q > rotation(vec< 3, T, Q > const &orig, vec< 3, T, Q > const &dest)
Compute the rotation between two vectors.
+
GLM_FUNC_DECL mat< 4, 4, T, Q > mat4_cast(qua< T, Q > const &x)
Converts a quaternion to a 4 * 4 matrix.
+
GLM_FUNC_DECL T extractRealComponent(qua< T, Q > const &q)
Extract the real component of a quaternion.
+
GLM_FUNC_DECL qua< T, Q > quat_cast(mat< 3, 3, T, Q > const &x)
Converts a pure rotation 3 * 3 matrix to a quaternion.
+
GLM_FUNC_DECL qua< T, Q > squad(qua< T, Q > const &q1, qua< T, Q > const &q2, qua< T, Q > const &s1, qua< T, Q > const &s2, T const &h)
Compute a point on a path according squad equation.
+
GLM_FUNC_DECL vec< 3, T, Q > cross(vec< 3, T, Q > const &v, qua< T, Q > const &q)
Compute a cross product between a vector and a quaternion.
+
GLM_FUNC_DECL qua< T, Q > quat_identity()
Create an identity quaternion.
+
GLM_FUNC_DECL T length2(qua< T, Q > const &q)
Returns the squared length of x.
+
GLM_FUNC_DECL vec< 4, T, Q > rotate(qua< T, Q > const &q, vec< 4, T, Q > const &v)
Rotates a 4 components vector by a quaternion.
+
GLM_FUNC_DECL qua< T, Q > shortMix(qua< T, Q > const &x, qua< T, Q > const &y, T const &a)
Quaternion interpolation using the rotation short path.
+
Definition: common.hpp:18
+
GLM_FUNC_DECL qua< T, Q > fastMix(qua< T, Q > const &x, qua< T, Q > const &y, T const &a)
Quaternion normalized linear interpolation.
+
+ + + + diff --git a/common/glm/doc/api/a01376.html b/common/glm/doc/api/a01376.html new file mode 100644 index 000000000..33e17408a --- /dev/null +++ b/common/glm/doc/api/a01376.html @@ -0,0 +1,186 @@ + + + + + + + +0.9.9 API documenation: scalar_relational.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
ext/scalar_relational.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR bool equal (genType const &x, genType const &y, genType const &epsilon)
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR bool notEqual (genType const &x, genType const &y, genType const &epsilon)
 
+

Detailed Description

+

Function Documentation

+ +

◆ equal()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR bool glm::equal (genType const & x,
genType const & y,
genType const & epsilon 
)
+
+ +

Returns the component-wise comparison of |x - y| < epsilon.

+

True if this expression is satisfied.

+
Template Parameters
+ + +
genTypeFloating-point or integer scalar types
+
+
+ +
+
+ +

◆ notEqual()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR bool glm::notEqual (genType const & x,
genType const & y,
genType const & epsilon 
)
+
+ +

Returns the component-wise comparison of |x - y| >= epsilon.

+

True if this expression is not satisfied.

+
Template Parameters
+ + +
genTypeFloating-point or integer scalar types
+
+
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a01376_source.html b/common/glm/doc/api/a01376_source.html new file mode 100644 index 000000000..2e29cea32 --- /dev/null +++ b/common/glm/doc/api/a01376_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: scalar_relational.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ext/scalar_relational.hpp
+
+
+Go to the documentation of this file.
1 
15 #pragma once
16 
17 // Dependencies
18 #include "../detail/qualifier.hpp"
19 
20 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
21 # pragma message("GLM: GLM_EXT_scalar_relational extension included")
22 #endif
23 
24 namespace glm
25 {
30  template<typename genType>
31  GLM_FUNC_DECL GLM_CONSTEXPR bool equal(genType const& x, genType const& y, genType const& epsilon);
32 
37  template<typename genType>
38  GLM_FUNC_DECL GLM_CONSTEXPR bool notEqual(genType const& x, genType const& y, genType const& epsilon);
39 
41 }//namespace glm
42 
43 #include "scalar_relational.inl"
GLM_FUNC_DECL GLM_CONSTEXPR vec< C, bool, Q > notEqual(mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y)
Perform a component-wise not-equal-to comparison of two matrices.
+
GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon()
Return the epsilon constant for floating point types.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< C, bool, Q > equal(mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y)
Perform a component-wise equal-to comparison of two matrices.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a01377.html b/common/glm/doc/api/a01377.html new file mode 100644 index 000000000..bf48137c8 --- /dev/null +++ b/common/glm/doc/api/a01377.html @@ -0,0 +1,182 @@ + + + + + + + +0.9.9 API documenation: scalar_relational.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
ext/scalar_relational.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR bool equal (genType const &x, genType const &y, genType const &epsilon)
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR bool notEqual (genType const &x, genType const &y, genType const &epsilon)
 
+

Function Documentation

+ +

◆ equal()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR bool glm::equal (genType const & x,
genType const & y,
genType const & epsilon 
)
+
+ +

Returns the component-wise comparison of |x - y| < epsilon.

+

True if this expression is satisfied.

+
Template Parameters
+ + +
genTypeFloating-point or integer scalar types
+
+
+ +
+
+ +

◆ notEqual()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR bool glm::notEqual (genType const & x,
genType const & y,
genType const & epsilon 
)
+
+ +

Returns the component-wise comparison of |x - y| >= epsilon.

+

True if this expression is not satisfied.

+
Template Parameters
+ + +
genTypeFloating-point or integer scalar types
+
+
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a01377_source.html b/common/glm/doc/api/a01377_source.html new file mode 100644 index 000000000..f85c4725a --- /dev/null +++ b/common/glm/doc/api/a01377_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: scalar_relational.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ext/scalar_relational.hpp
+
+
+Go to the documentation of this file.
1 
15 #pragma once
16 
17 // Dependencies
18 #include "../detail/qualifier.hpp"
19 
20 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
21 # pragma message("GLM: GLM_EXT_scalar_relational extension included")
22 #endif
23 
24 namespace glm
25 {
30  template<typename genType>
31  GLM_FUNC_DECL GLM_CONSTEXPR bool equal(genType const& x, genType const& y, genType const& epsilon);
32 
37  template<typename genType>
38  GLM_FUNC_DECL GLM_CONSTEXPR bool notEqual(genType const& x, genType const& y, genType const& epsilon);
39 
41 }//namespace glm
42 
43 #include "scalar_relational.inl"
Definition: common.hpp:18
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< C, bool, Q > notEqual(mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y)
Perform a component-wise not-equal-to comparison of two matrices.
+
GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon()
Return the epsilon constant for floating point types.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< C, bool, Q > equal(mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y)
Perform a component-wise equal-to comparison of two matrices.
+
+ + + + diff --git a/common/glm/doc/api/a01378.html b/common/glm/doc/api/a01378.html new file mode 100644 index 000000000..cfb747ef9 --- /dev/null +++ b/common/glm/doc/api/a01378.html @@ -0,0 +1,194 @@ + + + + + + + +0.9.9 API documenation: scalar_relational.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
ext/scalar_relational.hpp File Reference
+
+
+ +

GLM_EXT_scalar_relational +More...

+ +

Go to the source code of this file.

+ + + + + + + + + + +

+Functions

template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR bool equal (genType const &x, genType const &y, genType const &epsilon)
 Returns the component-wise comparison of |x - y| < epsilon. More...
 
template<typename genType >
GLM_FUNC_DECL GLM_CONSTEXPR bool notEqual (genType const &x, genType const &y, genType const &epsilon)
 Returns the component-wise comparison of |x - y| >= epsilon. More...
 
+

Detailed Description

+

GLM_EXT_scalar_relational

+
See also
Core features (dependence)
+ +

Definition in file ext/scalar_relational.hpp.

+

Function Documentation

+ +

◆ equal()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR bool glm::equal (genType const & x,
genType const & y,
genType const & epsilon 
)
+
+ +

Returns the component-wise comparison of |x - y| < epsilon.

+

True if this expression is satisfied.

+
Template Parameters
+ + +
genTypeFloating-point or integer scalar types
+
+
+
See also
GLM_EXT_scalar_relational
+ +
+
+ +

◆ notEqual()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
GLM_FUNC_DECL GLM_CONSTEXPR bool glm::notEqual (genType const & x,
genType const & y,
genType const & epsilon 
)
+
+ +

Returns the component-wise comparison of |x - y| >= epsilon.

+

True if this expression is not satisfied.

+
Template Parameters
+ + +
genTypeFloating-point or integer scalar types
+
+
+
See also
GLM_EXT_scalar_relational
+ +
+
+
+ + + + diff --git a/common/glm/doc/api/a01378_source.html b/common/glm/doc/api/a01378_source.html new file mode 100644 index 000000000..939b3fa62 --- /dev/null +++ b/common/glm/doc/api/a01378_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: scalar_relational.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ext/scalar_relational.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependencies
16 #include "../detail/qualifier.hpp"
17 
18 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
19 # pragma message("GLM: GLM_EXT_scalar_relational extension included")
20 #endif
21 
22 namespace glm
23 {
30  template<typename genType>
31  GLM_FUNC_DECL GLM_CONSTEXPR bool equal(genType const& x, genType const& y, genType const& epsilon);
32 
39  template<typename genType>
40  GLM_FUNC_DECL GLM_CONSTEXPR bool notEqual(genType const& x, genType const& y, genType const& epsilon);
41 
43 }//namespace glm
44 
45 #include "scalar_relational.inl"
GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon()
Return the epsilon constant for floating point types.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< C, bool, Q > notEqual(mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y)
Perform a component-wise not-equal-to comparison of two matrices.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< C, bool, Q > equal(mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y)
Perform a component-wise equal-to comparison of two matrices.
+
Definition: common.hpp:18
+
+ + + + diff --git a/common/glm/doc/api/a01379.html b/common/glm/doc/api/a01379.html new file mode 100644 index 000000000..e598b9433 --- /dev/null +++ b/common/glm/doc/api/a01379.html @@ -0,0 +1,88 @@ + + + + + + + +0.9.9 API documenation: scalar_relational.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtx/scalar_relational.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+

GLM_GTX_scalar_relational

+
See also
Core features (dependence)
+ +

Definition in file gtx/scalar_relational.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01379_source.html b/common/glm/doc/api/a01379_source.html new file mode 100644 index 000000000..b15532dd7 --- /dev/null +++ b/common/glm/doc/api/a01379_source.html @@ -0,0 +1,82 @@ + + + + + + + +0.9.9 API documenation: scalar_relational.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtx/scalar_relational.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 
18 #ifndef GLM_ENABLE_EXPERIMENTAL
19 # error "GLM: GLM_GTX_extend is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
20 #endif
21 
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_GTX_extend extension included")
24 #endif
25 
26 namespace glm
27 {
30 
31 
32 
34 }//namespace glm
35 
36 #include "scalar_relational.inl"
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a01380.html b/common/glm/doc/api/a01380.html new file mode 100644 index 000000000..5a9a40daa --- /dev/null +++ b/common/glm/doc/api/a01380.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: scalar_relational.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtx/scalar_relational.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+
See also
Core features (dependence)
+ +

Definition in file gtx/scalar_relational.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01380_source.html b/common/glm/doc/api/a01380_source.html new file mode 100644 index 000000000..287fd452c --- /dev/null +++ b/common/glm/doc/api/a01380_source.html @@ -0,0 +1,82 @@ + + + + + + + +0.9.9 API documenation: scalar_relational.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtx/scalar_relational.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 
18 #ifndef GLM_ENABLE_EXPERIMENTAL
19 # error "GLM: GLM_GTX_extend is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
20 #endif
21 
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_GTX_extend extension included")
24 #endif
25 
26 namespace glm
27 {
30 
31 
32 
34 }//namespace glm
35 
36 #include "scalar_relational.inl"
Definition: common.hpp:18
+
+ + + + diff --git a/common/glm/doc/api/a01381.html b/common/glm/doc/api/a01381.html new file mode 100644 index 000000000..07563dd3e --- /dev/null +++ b/common/glm/doc/api/a01381.html @@ -0,0 +1,91 @@ + + + + + + + +0.9.9 API documenation: scalar_relational.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtx/scalar_relational.hpp File Reference
+
+ + + + + diff --git a/common/glm/doc/api/a01381_source.html b/common/glm/doc/api/a01381_source.html new file mode 100644 index 000000000..09783dbb8 --- /dev/null +++ b/common/glm/doc/api/a01381_source.html @@ -0,0 +1,82 @@ + + + + + + + +0.9.9 API documenation: scalar_relational.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtx/scalar_relational.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 
18 #ifndef GLM_ENABLE_EXPERIMENTAL
19 # error "GLM: GLM_GTX_extend is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
20 #endif
21 
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_GTX_extend extension included")
24 #endif
25 
26 namespace glm
27 {
30 
31 
32 
34 }//namespace glm
35 
36 #include "scalar_relational.inl"
Definition: common.hpp:18
+
+ + + + diff --git a/common/glm/doc/api/a01382.html b/common/glm/doc/api/a01382.html new file mode 100644 index 000000000..fb1165ab1 --- /dev/null +++ b/common/glm/doc/api/a01382.html @@ -0,0 +1,1150 @@ + + + + + + + +0.9.9 API documenation: type_aligned.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtc/type_aligned.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Typedefs

+typedef aligned_highp_bvec1 aligned_bvec1
 
+typedef aligned_highp_bvec2 aligned_bvec2
 
+typedef aligned_highp_bvec3 aligned_bvec3
 
+typedef aligned_highp_bvec4 aligned_bvec4
 
+typedef aligned_highp_dmat2 aligned_dmat2
 
+typedef aligned_highp_dmat2x2 aligned_dmat2x2
 
+typedef aligned_highp_dmat2x3 aligned_dmat2x3
 
+typedef aligned_highp_dmat2x4 aligned_dmat2x4
 
+typedef aligned_highp_dmat3 aligned_dmat3
 
+typedef aligned_highp_dmat3x2 aligned_dmat3x2
 
+typedef aligned_highp_dmat3x3 aligned_dmat3x3
 
+typedef aligned_highp_dmat3x4 aligned_dmat3x4
 
+typedef aligned_highp_dmat4 aligned_dmat4
 
+typedef aligned_highp_dmat4x2 aligned_dmat4x2
 
+typedef aligned_highp_dmat4x3 aligned_dmat4x3
 
+typedef aligned_highp_dmat4x4 aligned_dmat4x4
 
+typedef aligned_highp_dvec1 aligned_dvec1
 
+typedef aligned_highp_dvec2 aligned_dvec2
 
+typedef aligned_highp_dvec3 aligned_dvec3
 
+typedef aligned_highp_dvec4 aligned_dvec4
 
+typedef vec< 1, bool, aligned_highp > aligned_highp_bvec1
 
+typedef vec< 2, bool, aligned_highp > aligned_highp_bvec2
 
+typedef vec< 3, bool, aligned_highp > aligned_highp_bvec3
 
+typedef vec< 4, bool, aligned_highp > aligned_highp_bvec4
 
+typedef mat< 2, 2, double, aligned_highp > aligned_highp_dmat2
 
+typedef mat< 2, 2, double, aligned_highp > aligned_highp_dmat2x2
 
+typedef mat< 2, 3, double, aligned_highp > aligned_highp_dmat2x3
 
+typedef mat< 2, 4, double, aligned_highp > aligned_highp_dmat2x4
 
+typedef mat< 3, 3, double, aligned_highp > aligned_highp_dmat3
 
+typedef mat< 3, 2, double, aligned_highp > aligned_highp_dmat3x2
 
+typedef mat< 3, 3, double, aligned_highp > aligned_highp_dmat3x3
 
+typedef mat< 3, 4, double, aligned_highp > aligned_highp_dmat3x4
 
+typedef mat< 4, 4, double, aligned_highp > aligned_highp_dmat4
 
+typedef mat< 4, 2, double, aligned_highp > aligned_highp_dmat4x2
 
+typedef mat< 4, 3, double, aligned_highp > aligned_highp_dmat4x3
 
+typedef mat< 4, 4, double, aligned_highp > aligned_highp_dmat4x4
 
+typedef vec< 1, double, aligned_highp > aligned_highp_dvec1
 
+typedef vec< 2, double, aligned_highp > aligned_highp_dvec2
 
+typedef vec< 3, double, aligned_highp > aligned_highp_dvec3
 
+typedef vec< 4, double, aligned_highp > aligned_highp_dvec4
 
+typedef vec< 1, int, aligned_highp > aligned_highp_ivec1
 
+typedef vec< 2, int, aligned_highp > aligned_highp_ivec2
 
+typedef vec< 3, int, aligned_highp > aligned_highp_ivec3
 
+typedef vec< 4, int, aligned_highp > aligned_highp_ivec4
 
+typedef mat< 2, 2, float, aligned_highp > aligned_highp_mat2
 
+typedef mat< 2, 2, float, aligned_highp > aligned_highp_mat2x2
 
+typedef mat< 2, 3, float, aligned_highp > aligned_highp_mat2x3
 
+typedef mat< 2, 4, float, aligned_highp > aligned_highp_mat2x4
 
+typedef mat< 3, 3, float, aligned_highp > aligned_highp_mat3
 
+typedef mat< 3, 2, float, aligned_highp > aligned_highp_mat3x2
 
+typedef mat< 3, 3, float, aligned_highp > aligned_highp_mat3x3
 
+typedef mat< 3, 4, float, aligned_highp > aligned_highp_mat3x4
 
+typedef mat< 4, 4, float, aligned_highp > aligned_highp_mat4
 
+typedef mat< 4, 2, float, aligned_highp > aligned_highp_mat4x2
 
+typedef mat< 4, 3, float, aligned_highp > aligned_highp_mat4x3
 
+typedef mat< 4, 4, float, aligned_highp > aligned_highp_mat4x4
 
+typedef vec< 1, uint, aligned_highp > aligned_highp_uvec1
 
+typedef vec< 2, uint, aligned_highp > aligned_highp_uvec2
 
+typedef vec< 3, uint, aligned_highp > aligned_highp_uvec3
 
+typedef vec< 4, uint, aligned_highp > aligned_highp_uvec4
 
+typedef vec< 1, float, aligned_highp > aligned_highp_vec1
 
+typedef vec< 2, float, aligned_highp > aligned_highp_vec2
 
+typedef vec< 3, float, aligned_highp > aligned_highp_vec3
 
+typedef vec< 4, float, aligned_highp > aligned_highp_vec4
 
+typedef aligned_highp_ivec1 aligned_ivec1
 
+typedef aligned_highp_ivec2 aligned_ivec2
 
+typedef aligned_highp_ivec3 aligned_ivec3
 
+typedef aligned_highp_ivec4 aligned_ivec4
 
+typedef vec< 1, bool, aligned_lowp > aligned_lowp_bvec1
 
+typedef vec< 2, bool, aligned_lowp > aligned_lowp_bvec2
 
+typedef vec< 3, bool, aligned_lowp > aligned_lowp_bvec3
 
+typedef vec< 4, bool, aligned_lowp > aligned_lowp_bvec4
 
+typedef mat< 2, 2, double, aligned_lowp > aligned_lowp_dmat2
 
+typedef mat< 2, 2, double, aligned_lowp > aligned_lowp_dmat2x2
 
+typedef mat< 2, 3, double, aligned_lowp > aligned_lowp_dmat2x3
 
+typedef mat< 2, 4, double, aligned_lowp > aligned_lowp_dmat2x4
 
+typedef mat< 3, 3, double, aligned_lowp > aligned_lowp_dmat3
 
+typedef mat< 3, 2, double, aligned_lowp > aligned_lowp_dmat3x2
 
+typedef mat< 3, 3, double, aligned_lowp > aligned_lowp_dmat3x3
 
+typedef mat< 3, 4, double, aligned_lowp > aligned_lowp_dmat3x4
 
+typedef mat< 4, 4, double, aligned_lowp > aligned_lowp_dmat4
 
+typedef mat< 4, 2, double, aligned_lowp > aligned_lowp_dmat4x2
 
+typedef mat< 4, 3, double, aligned_lowp > aligned_lowp_dmat4x3
 
+typedef mat< 4, 4, double, aligned_lowp > aligned_lowp_dmat4x4
 
+typedef vec< 1, double, aligned_lowp > aligned_lowp_dvec1
 
+typedef vec< 2, double, aligned_lowp > aligned_lowp_dvec2
 
+typedef vec< 3, double, aligned_lowp > aligned_lowp_dvec3
 
+typedef vec< 4, double, aligned_lowp > aligned_lowp_dvec4
 
+typedef vec< 1, int, aligned_lowp > aligned_lowp_ivec1
 
+typedef vec< 2, int, aligned_lowp > aligned_lowp_ivec2
 
+typedef vec< 3, int, aligned_lowp > aligned_lowp_ivec3
 
+typedef vec< 4, int, aligned_lowp > aligned_lowp_ivec4
 
+typedef mat< 2, 2, float, aligned_lowp > aligned_lowp_mat2
 
+typedef mat< 2, 2, float, aligned_lowp > aligned_lowp_mat2x2
 
+typedef mat< 2, 3, float, aligned_lowp > aligned_lowp_mat2x3
 
+typedef mat< 2, 4, float, aligned_lowp > aligned_lowp_mat2x4
 
+typedef mat< 3, 3, float, aligned_lowp > aligned_lowp_mat3
 
+typedef mat< 3, 2, float, aligned_lowp > aligned_lowp_mat3x2
 
+typedef mat< 3, 3, float, aligned_lowp > aligned_lowp_mat3x3
 
+typedef mat< 3, 4, float, aligned_lowp > aligned_lowp_mat3x4
 
+typedef mat< 4, 4, float, aligned_lowp > aligned_lowp_mat4
 
+typedef mat< 4, 2, float, aligned_lowp > aligned_lowp_mat4x2
 
+typedef mat< 4, 3, float, aligned_lowp > aligned_lowp_mat4x3
 
+typedef mat< 4, 4, float, aligned_lowp > aligned_lowp_mat4x4
 
+typedef vec< 1, uint, aligned_lowp > aligned_lowp_uvec1
 
+typedef vec< 2, uint, aligned_lowp > aligned_lowp_uvec2
 
+typedef vec< 3, uint, aligned_lowp > aligned_lowp_uvec3
 
+typedef vec< 4, uint, aligned_lowp > aligned_lowp_uvec4
 
+typedef vec< 1, float, aligned_lowp > aligned_lowp_vec1
 
+typedef vec< 2, float, aligned_lowp > aligned_lowp_vec2
 
+typedef vec< 3, float, aligned_lowp > aligned_lowp_vec3
 
+typedef vec< 4, float, aligned_lowp > aligned_lowp_vec4
 
+typedef aligned_highp_mat2 aligned_mat2
 
+typedef aligned_highp_mat2x2 aligned_mat2x2
 
+typedef aligned_highp_mat2x3 aligned_mat2x3
 
+typedef aligned_highp_mat2x4 aligned_mat2x4
 
+typedef aligned_highp_mat3 aligned_mat3
 
+typedef aligned_highp_mat3x2 aligned_mat3x2
 
+typedef aligned_highp_mat3x3 aligned_mat3x3
 
+typedef aligned_highp_mat3x4 aligned_mat3x4
 
+typedef aligned_highp_mat4 aligned_mat4
 
+typedef aligned_highp_mat4x2 aligned_mat4x2
 
+typedef aligned_highp_mat4x3 aligned_mat4x3
 
+typedef aligned_highp_mat4x4 aligned_mat4x4
 
+typedef vec< 1, bool, aligned_mediump > aligned_mediump_bvec1
 
+typedef vec< 2, bool, aligned_mediump > aligned_mediump_bvec2
 
+typedef vec< 3, bool, aligned_mediump > aligned_mediump_bvec3
 
+typedef vec< 4, bool, aligned_mediump > aligned_mediump_bvec4
 
+typedef mat< 2, 2, double, aligned_mediump > aligned_mediump_dmat2
 
+typedef mat< 2, 2, double, aligned_mediump > aligned_mediump_dmat2x2
 
+typedef mat< 2, 3, double, aligned_mediump > aligned_mediump_dmat2x3
 
+typedef mat< 2, 4, double, aligned_mediump > aligned_mediump_dmat2x4
 
+typedef mat< 3, 3, double, aligned_mediump > aligned_mediump_dmat3
 
+typedef mat< 3, 2, double, aligned_mediump > aligned_mediump_dmat3x2
 
+typedef mat< 3, 3, double, aligned_mediump > aligned_mediump_dmat3x3
 
+typedef mat< 3, 4, double, aligned_mediump > aligned_mediump_dmat3x4
 
+typedef mat< 4, 4, double, aligned_mediump > aligned_mediump_dmat4
 
+typedef mat< 4, 2, double, aligned_mediump > aligned_mediump_dmat4x2
 
+typedef mat< 4, 3, double, aligned_mediump > aligned_mediump_dmat4x3
 
+typedef mat< 4, 4, double, aligned_mediump > aligned_mediump_dmat4x4
 
+typedef vec< 1, double, aligned_mediump > aligned_mediump_dvec1
 
+typedef vec< 2, double, aligned_mediump > aligned_mediump_dvec2
 
+typedef vec< 3, double, aligned_mediump > aligned_mediump_dvec3
 
+typedef vec< 4, double, aligned_mediump > aligned_mediump_dvec4
 
+typedef vec< 1, int, aligned_mediump > aligned_mediump_ivec1
 
+typedef vec< 2, int, aligned_mediump > aligned_mediump_ivec2
 
+typedef vec< 3, int, aligned_mediump > aligned_mediump_ivec3
 
+typedef vec< 4, int, aligned_mediump > aligned_mediump_ivec4
 
+typedef mat< 2, 2, float, aligned_mediump > aligned_mediump_mat2
 
+typedef mat< 2, 2, float, aligned_mediump > aligned_mediump_mat2x2
 
+typedef mat< 2, 3, float, aligned_mediump > aligned_mediump_mat2x3
 
+typedef mat< 2, 4, float, aligned_mediump > aligned_mediump_mat2x4
 
+typedef mat< 3, 3, float, aligned_mediump > aligned_mediump_mat3
 
+typedef mat< 3, 2, float, aligned_mediump > aligned_mediump_mat3x2
 
+typedef mat< 3, 3, float, aligned_mediump > aligned_mediump_mat3x3
 
+typedef mat< 3, 4, float, aligned_mediump > aligned_mediump_mat3x4
 
+typedef mat< 4, 4, float, aligned_mediump > aligned_mediump_mat4
 
+typedef mat< 4, 2, float, aligned_mediump > aligned_mediump_mat4x2
 
+typedef mat< 4, 3, float, aligned_mediump > aligned_mediump_mat4x3
 
+typedef mat< 4, 4, float, aligned_mediump > aligned_mediump_mat4x4
 
+typedef vec< 1, uint, aligned_mediump > aligned_mediump_uvec1
 
+typedef vec< 2, uint, aligned_mediump > aligned_mediump_uvec2
 
+typedef vec< 3, uint, aligned_mediump > aligned_mediump_uvec3
 
+typedef vec< 4, uint, aligned_mediump > aligned_mediump_uvec4
 
+typedef vec< 1, float, aligned_mediump > aligned_mediump_vec1
 
+typedef vec< 2, float, aligned_mediump > aligned_mediump_vec2
 
+typedef vec< 3, float, aligned_mediump > aligned_mediump_vec3
 
+typedef vec< 4, float, aligned_mediump > aligned_mediump_vec4
 
+typedef aligned_highp_uvec1 aligned_uvec1
 
+typedef aligned_highp_uvec2 aligned_uvec2
 
+typedef aligned_highp_uvec3 aligned_uvec3
 
+typedef aligned_highp_uvec4 aligned_uvec4
 
+typedef aligned_highp_vec1 aligned_vec1
 
+typedef aligned_highp_vec2 aligned_vec2
 
+typedef aligned_highp_vec3 aligned_vec3
 
+typedef aligned_highp_vec4 aligned_vec4
 
+typedef packed_highp_bvec1 packed_bvec1
 
+typedef packed_highp_bvec2 packed_bvec2
 
+typedef packed_highp_bvec3 packed_bvec3
 
+typedef packed_highp_bvec4 packed_bvec4
 
+typedef packed_highp_dmat2 packed_dmat2
 
+typedef packed_highp_dmat2x2 packed_dmat2x2
 
+typedef packed_highp_dmat2x3 packed_dmat2x3
 
+typedef packed_highp_dmat2x4 packed_dmat2x4
 
+typedef packed_highp_dmat3 packed_dmat3
 
+typedef packed_highp_dmat3x2 packed_dmat3x2
 
+typedef packed_highp_dmat3x3 packed_dmat3x3
 
+typedef packed_highp_dmat3x4 packed_dmat3x4
 
+typedef packed_highp_dmat4 packed_dmat4
 
+typedef packed_highp_dmat4x2 packed_dmat4x2
 
+typedef packed_highp_dmat4x3 packed_dmat4x3
 
+typedef packed_highp_dmat4x4 packed_dmat4x4
 
+typedef packed_highp_dvec1 packed_dvec1
 
+typedef packed_highp_dvec2 packed_dvec2
 
+typedef packed_highp_dvec3 packed_dvec3
 
+typedef packed_highp_dvec4 packed_dvec4
 
+typedef vec< 1, bool, packed_highp > packed_highp_bvec1
 
+typedef vec< 2, bool, packed_highp > packed_highp_bvec2
 
+typedef vec< 3, bool, packed_highp > packed_highp_bvec3
 
+typedef vec< 4, bool, packed_highp > packed_highp_bvec4
 
+typedef mat< 2, 2, double, packed_highp > packed_highp_dmat2
 
+typedef mat< 2, 2, double, packed_highp > packed_highp_dmat2x2
 
+typedef mat< 2, 3, double, packed_highp > packed_highp_dmat2x3
 
+typedef mat< 2, 4, double, packed_highp > packed_highp_dmat2x4
 
+typedef mat< 3, 3, double, packed_highp > packed_highp_dmat3
 
+typedef mat< 3, 2, double, packed_highp > packed_highp_dmat3x2
 
+typedef mat< 3, 3, double, packed_highp > packed_highp_dmat3x3
 
+typedef mat< 3, 4, double, packed_highp > packed_highp_dmat3x4
 
+typedef mat< 4, 4, double, packed_highp > packed_highp_dmat4
 
+typedef mat< 4, 2, double, packed_highp > packed_highp_dmat4x2
 
+typedef mat< 4, 3, double, packed_highp > packed_highp_dmat4x3
 
+typedef mat< 4, 4, double, packed_highp > packed_highp_dmat4x4
 
+typedef vec< 1, double, packed_highp > packed_highp_dvec1
 
+typedef vec< 2, double, packed_highp > packed_highp_dvec2
 
+typedef vec< 3, double, packed_highp > packed_highp_dvec3
 
+typedef vec< 4, double, packed_highp > packed_highp_dvec4
 
+typedef vec< 1, int, packed_highp > packed_highp_ivec1
 
+typedef vec< 2, int, packed_highp > packed_highp_ivec2
 
+typedef vec< 3, int, packed_highp > packed_highp_ivec3
 
+typedef vec< 4, int, packed_highp > packed_highp_ivec4
 
+typedef mat< 2, 2, float, packed_highp > packed_highp_mat2
 
+typedef mat< 2, 2, float, packed_highp > packed_highp_mat2x2
 
+typedef mat< 2, 3, float, packed_highp > packed_highp_mat2x3
 
+typedef mat< 2, 4, float, packed_highp > packed_highp_mat2x4
 
+typedef mat< 3, 3, float, packed_highp > packed_highp_mat3
 
+typedef mat< 3, 2, float, packed_highp > packed_highp_mat3x2
 
+typedef mat< 3, 3, float, packed_highp > packed_highp_mat3x3
 
+typedef mat< 3, 4, float, packed_highp > packed_highp_mat3x4
 
+typedef mat< 4, 4, float, packed_highp > packed_highp_mat4
 
+typedef mat< 4, 2, float, packed_highp > packed_highp_mat4x2
 
+typedef mat< 4, 3, float, packed_highp > packed_highp_mat4x3
 
+typedef mat< 4, 4, float, packed_highp > packed_highp_mat4x4
 
+typedef vec< 1, uint, packed_highp > packed_highp_uvec1
 
+typedef vec< 2, uint, packed_highp > packed_highp_uvec2
 
+typedef vec< 3, uint, packed_highp > packed_highp_uvec3
 
+typedef vec< 4, uint, packed_highp > packed_highp_uvec4
 
+typedef vec< 1, float, packed_highp > packed_highp_vec1
 
+typedef vec< 2, float, packed_highp > packed_highp_vec2
 
+typedef vec< 3, float, packed_highp > packed_highp_vec3
 
+typedef vec< 4, float, packed_highp > packed_highp_vec4
 
+typedef packed_highp_ivec1 packed_ivec1
 
+typedef packed_highp_ivec2 packed_ivec2
 
+typedef packed_highp_ivec3 packed_ivec3
 
+typedef packed_highp_ivec4 packed_ivec4
 
+typedef vec< 1, bool, packed_lowp > packed_lowp_bvec1
 
+typedef vec< 2, bool, packed_lowp > packed_lowp_bvec2
 
+typedef vec< 3, bool, packed_lowp > packed_lowp_bvec3
 
+typedef vec< 4, bool, packed_lowp > packed_lowp_bvec4
 
+typedef mat< 2, 2, double, packed_lowp > packed_lowp_dmat2
 
+typedef mat< 2, 2, double, packed_lowp > packed_lowp_dmat2x2
 
+typedef mat< 2, 3, double, packed_lowp > packed_lowp_dmat2x3
 
+typedef mat< 2, 4, double, packed_lowp > packed_lowp_dmat2x4
 
+typedef mat< 3, 3, double, packed_lowp > packed_lowp_dmat3
 
+typedef mat< 3, 2, double, packed_lowp > packed_lowp_dmat3x2
 
+typedef mat< 3, 3, double, packed_lowp > packed_lowp_dmat3x3
 
+typedef mat< 3, 4, double, packed_lowp > packed_lowp_dmat3x4
 
+typedef mat< 4, 4, double, packed_lowp > packed_lowp_dmat4
 
+typedef mat< 4, 2, double, packed_lowp > packed_lowp_dmat4x2
 
+typedef mat< 4, 3, double, packed_lowp > packed_lowp_dmat4x3
 
+typedef mat< 4, 4, double, packed_lowp > packed_lowp_dmat4x4
 
+typedef vec< 1, double, packed_lowp > packed_lowp_dvec1
 
+typedef vec< 2, double, packed_lowp > packed_lowp_dvec2
 
+typedef vec< 3, double, packed_lowp > packed_lowp_dvec3
 
+typedef vec< 4, double, packed_lowp > packed_lowp_dvec4
 
+typedef vec< 1, int, packed_lowp > packed_lowp_ivec1
 
+typedef vec< 2, int, packed_lowp > packed_lowp_ivec2
 
+typedef vec< 3, int, packed_lowp > packed_lowp_ivec3
 
+typedef vec< 4, int, packed_lowp > packed_lowp_ivec4
 
+typedef mat< 2, 2, float, packed_lowp > packed_lowp_mat2
 
+typedef mat< 2, 2, float, packed_lowp > packed_lowp_mat2x2
 
+typedef mat< 2, 3, float, packed_lowp > packed_lowp_mat2x3
 
+typedef mat< 2, 4, float, packed_lowp > packed_lowp_mat2x4
 
+typedef mat< 3, 3, float, packed_lowp > packed_lowp_mat3
 
+typedef mat< 3, 2, float, packed_lowp > packed_lowp_mat3x2
 
+typedef mat< 3, 3, float, packed_lowp > packed_lowp_mat3x3
 
+typedef mat< 3, 4, float, packed_lowp > packed_lowp_mat3x4
 
+typedef mat< 4, 4, float, packed_lowp > packed_lowp_mat4
 
+typedef mat< 4, 2, float, packed_lowp > packed_lowp_mat4x2
 
+typedef mat< 4, 3, float, packed_lowp > packed_lowp_mat4x3
 
+typedef mat< 4, 4, float, packed_lowp > packed_lowp_mat4x4
 
+typedef vec< 1, uint, packed_lowp > packed_lowp_uvec1
 
+typedef vec< 2, uint, packed_lowp > packed_lowp_uvec2
 
+typedef vec< 3, uint, packed_lowp > packed_lowp_uvec3
 
+typedef vec< 4, uint, packed_lowp > packed_lowp_uvec4
 
+typedef vec< 1, float, packed_lowp > packed_lowp_vec1
 
+typedef vec< 2, float, packed_lowp > packed_lowp_vec2
 
+typedef vec< 3, float, packed_lowp > packed_lowp_vec3
 
+typedef vec< 4, float, packed_lowp > packed_lowp_vec4
 
+typedef packed_highp_mat2 packed_mat2
 
+typedef packed_highp_mat2x2 packed_mat2x2
 
+typedef packed_highp_mat2x3 packed_mat2x3
 
+typedef packed_highp_mat2x4 packed_mat2x4
 
+typedef packed_highp_mat3 packed_mat3
 
+typedef packed_highp_mat3x2 packed_mat3x2
 
+typedef packed_highp_mat3x3 packed_mat3x3
 
+typedef packed_highp_mat3x4 packed_mat3x4
 
+typedef packed_highp_mat4 packed_mat4
 
+typedef packed_highp_mat4x2 packed_mat4x2
 
+typedef packed_highp_mat4x3 packed_mat4x3
 
+typedef packed_highp_mat4x4 packed_mat4x4
 
+typedef vec< 1, bool, packed_mediump > packed_mediump_bvec1
 
+typedef vec< 2, bool, packed_mediump > packed_mediump_bvec2
 
+typedef vec< 3, bool, packed_mediump > packed_mediump_bvec3
 
+typedef vec< 4, bool, packed_mediump > packed_mediump_bvec4
 
+typedef mat< 2, 2, double, packed_mediump > packed_mediump_dmat2
 
+typedef mat< 2, 2, double, packed_mediump > packed_mediump_dmat2x2
 
+typedef mat< 2, 3, double, packed_mediump > packed_mediump_dmat2x3
 
+typedef mat< 2, 4, double, packed_mediump > packed_mediump_dmat2x4
 
+typedef mat< 3, 3, double, packed_mediump > packed_mediump_dmat3
 
+typedef mat< 3, 2, double, packed_mediump > packed_mediump_dmat3x2
 
+typedef mat< 3, 3, double, packed_mediump > packed_mediump_dmat3x3
 
+typedef mat< 3, 4, double, packed_mediump > packed_mediump_dmat3x4
 
+typedef mat< 4, 4, double, packed_mediump > packed_mediump_dmat4
 
+typedef mat< 4, 2, double, packed_mediump > packed_mediump_dmat4x2
 
+typedef mat< 4, 3, double, packed_mediump > packed_mediump_dmat4x3
 
+typedef mat< 4, 4, double, packed_mediump > packed_mediump_dmat4x4
 
+typedef vec< 1, double, packed_mediump > packed_mediump_dvec1
 
+typedef vec< 2, double, packed_mediump > packed_mediump_dvec2
 
+typedef vec< 3, double, packed_mediump > packed_mediump_dvec3
 
+typedef vec< 4, double, packed_mediump > packed_mediump_dvec4
 
+typedef vec< 1, int, packed_mediump > packed_mediump_ivec1
 
+typedef vec< 2, int, packed_mediump > packed_mediump_ivec2
 
+typedef vec< 3, int, packed_mediump > packed_mediump_ivec3
 
+typedef vec< 4, int, packed_mediump > packed_mediump_ivec4
 
+typedef mat< 2, 2, float, packed_mediump > packed_mediump_mat2
 
+typedef mat< 2, 2, float, packed_mediump > packed_mediump_mat2x2
 
+typedef mat< 2, 3, float, packed_mediump > packed_mediump_mat2x3
 
+typedef mat< 2, 4, float, packed_mediump > packed_mediump_mat2x4
 
+typedef mat< 3, 3, float, packed_mediump > packed_mediump_mat3
 
+typedef mat< 3, 2, float, packed_mediump > packed_mediump_mat3x2
 
+typedef mat< 3, 3, float, packed_mediump > packed_mediump_mat3x3
 
+typedef mat< 3, 4, float, packed_mediump > packed_mediump_mat3x4
 
+typedef mat< 4, 4, float, packed_mediump > packed_mediump_mat4
 
+typedef mat< 4, 2, float, packed_mediump > packed_mediump_mat4x2
 
+typedef mat< 4, 3, float, packed_mediump > packed_mediump_mat4x3
 
+typedef mat< 4, 4, float, packed_mediump > packed_mediump_mat4x4
 
+typedef vec< 1, uint, packed_mediump > packed_mediump_uvec1
 
+typedef vec< 2, uint, packed_mediump > packed_mediump_uvec2
 
+typedef vec< 3, uint, packed_mediump > packed_mediump_uvec3
 
+typedef vec< 4, uint, packed_mediump > packed_mediump_uvec4
 
+typedef vec< 1, float, packed_mediump > packed_mediump_vec1
 
+typedef vec< 2, float, packed_mediump > packed_mediump_vec2
 
+typedef vec< 3, float, packed_mediump > packed_mediump_vec3
 
+typedef vec< 4, float, packed_mediump > packed_mediump_vec4
 
+typedef packed_highp_uvec1 packed_uvec1
 
+typedef packed_highp_uvec2 packed_uvec2
 
+typedef packed_highp_uvec3 packed_uvec3
 
+typedef packed_highp_uvec4 packed_uvec4
 
+typedef packed_highp_vec1 packed_vec1
 
+typedef packed_highp_vec2 packed_vec2
 
+typedef packed_highp_vec3 packed_vec3
 
+typedef packed_highp_vec4 packed_vec4
 
+

Detailed Description

+

GLM_GTC_type_aligned

+
See also
Core features (dependence)
+ +

Definition in file gtc/type_aligned.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01382_source.html b/common/glm/doc/api/a01382_source.html new file mode 100644 index 000000000..4d1b679f7 --- /dev/null +++ b/common/glm/doc/api/a01382_source.html @@ -0,0 +1,434 @@ + + + + + + + +0.9.9 API documenation: type_aligned.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtc/type_aligned.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 #if !GLM_CONFIG_ANONYMOUS_STRUCT
16 # error "GLM: Aligned gentypes require to enable C++ language extensions."
17 #endif
18 
19 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
20 # pragma message("GLM: GLM_GTC_type_aligned extension included")
21 #endif
22 
23 #include "../mat4x4.hpp"
24 #include "../mat4x3.hpp"
25 #include "../mat4x2.hpp"
26 #include "../mat3x4.hpp"
27 #include "../mat3x3.hpp"
28 #include "../mat3x2.hpp"
29 #include "../mat2x4.hpp"
30 #include "../mat2x3.hpp"
31 #include "../mat2x2.hpp"
32 #include "../gtc/vec1.hpp"
33 #include "../vec2.hpp"
34 #include "../vec3.hpp"
35 #include "../vec4.hpp"
36 
37 namespace glm
38 {
41 
42  // -- *vec1 --
43 
45  typedef vec<1, float, aligned_highp> aligned_highp_vec1;
46 
48  typedef vec<1, float, aligned_mediump> aligned_mediump_vec1;
49 
51  typedef vec<1, float, aligned_lowp> aligned_lowp_vec1;
52 
54  typedef vec<1, double, aligned_highp> aligned_highp_dvec1;
55 
57  typedef vec<1, double, aligned_mediump> aligned_mediump_dvec1;
58 
60  typedef vec<1, double, aligned_lowp> aligned_lowp_dvec1;
61 
63  typedef vec<1, int, aligned_highp> aligned_highp_ivec1;
64 
66  typedef vec<1, int, aligned_mediump> aligned_mediump_ivec1;
67 
69  typedef vec<1, int, aligned_lowp> aligned_lowp_ivec1;
70 
72  typedef vec<1, uint, aligned_highp> aligned_highp_uvec1;
73 
75  typedef vec<1, uint, aligned_mediump> aligned_mediump_uvec1;
76 
78  typedef vec<1, uint, aligned_lowp> aligned_lowp_uvec1;
79 
81  typedef vec<1, bool, aligned_highp> aligned_highp_bvec1;
82 
84  typedef vec<1, bool, aligned_mediump> aligned_mediump_bvec1;
85 
87  typedef vec<1, bool, aligned_lowp> aligned_lowp_bvec1;
88 
90  typedef vec<1, float, packed_highp> packed_highp_vec1;
91 
93  typedef vec<1, float, packed_mediump> packed_mediump_vec1;
94 
96  typedef vec<1, float, packed_lowp> packed_lowp_vec1;
97 
99  typedef vec<1, double, packed_highp> packed_highp_dvec1;
100 
102  typedef vec<1, double, packed_mediump> packed_mediump_dvec1;
103 
105  typedef vec<1, double, packed_lowp> packed_lowp_dvec1;
106 
108  typedef vec<1, int, packed_highp> packed_highp_ivec1;
109 
111  typedef vec<1, int, packed_mediump> packed_mediump_ivec1;
112 
114  typedef vec<1, int, packed_lowp> packed_lowp_ivec1;
115 
117  typedef vec<1, uint, packed_highp> packed_highp_uvec1;
118 
120  typedef vec<1, uint, packed_mediump> packed_mediump_uvec1;
121 
123  typedef vec<1, uint, packed_lowp> packed_lowp_uvec1;
124 
126  typedef vec<1, bool, packed_highp> packed_highp_bvec1;
127 
129  typedef vec<1, bool, packed_mediump> packed_mediump_bvec1;
130 
132  typedef vec<1, bool, packed_lowp> packed_lowp_bvec1;
133 
134  // -- *vec2 --
135 
137  typedef vec<2, float, aligned_highp> aligned_highp_vec2;
138 
140  typedef vec<2, float, aligned_mediump> aligned_mediump_vec2;
141 
143  typedef vec<2, float, aligned_lowp> aligned_lowp_vec2;
144 
146  typedef vec<2, double, aligned_highp> aligned_highp_dvec2;
147 
149  typedef vec<2, double, aligned_mediump> aligned_mediump_dvec2;
150 
152  typedef vec<2, double, aligned_lowp> aligned_lowp_dvec2;
153 
155  typedef vec<2, int, aligned_highp> aligned_highp_ivec2;
156 
158  typedef vec<2, int, aligned_mediump> aligned_mediump_ivec2;
159 
161  typedef vec<2, int, aligned_lowp> aligned_lowp_ivec2;
162 
164  typedef vec<2, uint, aligned_highp> aligned_highp_uvec2;
165 
167  typedef vec<2, uint, aligned_mediump> aligned_mediump_uvec2;
168 
170  typedef vec<2, uint, aligned_lowp> aligned_lowp_uvec2;
171 
173  typedef vec<2, bool, aligned_highp> aligned_highp_bvec2;
174 
176  typedef vec<2, bool, aligned_mediump> aligned_mediump_bvec2;
177 
179  typedef vec<2, bool, aligned_lowp> aligned_lowp_bvec2;
180 
182  typedef vec<2, float, packed_highp> packed_highp_vec2;
183 
185  typedef vec<2, float, packed_mediump> packed_mediump_vec2;
186 
188  typedef vec<2, float, packed_lowp> packed_lowp_vec2;
189 
191  typedef vec<2, double, packed_highp> packed_highp_dvec2;
192 
194  typedef vec<2, double, packed_mediump> packed_mediump_dvec2;
195 
197  typedef vec<2, double, packed_lowp> packed_lowp_dvec2;
198 
200  typedef vec<2, int, packed_highp> packed_highp_ivec2;
201 
203  typedef vec<2, int, packed_mediump> packed_mediump_ivec2;
204 
206  typedef vec<2, int, packed_lowp> packed_lowp_ivec2;
207 
209  typedef vec<2, uint, packed_highp> packed_highp_uvec2;
210 
212  typedef vec<2, uint, packed_mediump> packed_mediump_uvec2;
213 
215  typedef vec<2, uint, packed_lowp> packed_lowp_uvec2;
216 
218  typedef vec<2, bool, packed_highp> packed_highp_bvec2;
219 
221  typedef vec<2, bool, packed_mediump> packed_mediump_bvec2;
222 
224  typedef vec<2, bool, packed_lowp> packed_lowp_bvec2;
225 
226  // -- *vec3 --
227 
229  typedef vec<3, float, aligned_highp> aligned_highp_vec3;
230 
232  typedef vec<3, float, aligned_mediump> aligned_mediump_vec3;
233 
235  typedef vec<3, float, aligned_lowp> aligned_lowp_vec3;
236 
238  typedef vec<3, double, aligned_highp> aligned_highp_dvec3;
239 
241  typedef vec<3, double, aligned_mediump> aligned_mediump_dvec3;
242 
244  typedef vec<3, double, aligned_lowp> aligned_lowp_dvec3;
245 
247  typedef vec<3, int, aligned_highp> aligned_highp_ivec3;
248 
250  typedef vec<3, int, aligned_mediump> aligned_mediump_ivec3;
251 
253  typedef vec<3, int, aligned_lowp> aligned_lowp_ivec3;
254 
256  typedef vec<3, uint, aligned_highp> aligned_highp_uvec3;
257 
259  typedef vec<3, uint, aligned_mediump> aligned_mediump_uvec3;
260 
262  typedef vec<3, uint, aligned_lowp> aligned_lowp_uvec3;
263 
265  typedef vec<3, bool, aligned_highp> aligned_highp_bvec3;
266 
268  typedef vec<3, bool, aligned_mediump> aligned_mediump_bvec3;
269 
271  typedef vec<3, bool, aligned_lowp> aligned_lowp_bvec3;
272 
274  typedef vec<3, float, packed_highp> packed_highp_vec3;
275 
277  typedef vec<3, float, packed_mediump> packed_mediump_vec3;
278 
280  typedef vec<3, float, packed_lowp> packed_lowp_vec3;
281 
283  typedef vec<3, double, packed_highp> packed_highp_dvec3;
284 
286  typedef vec<3, double, packed_mediump> packed_mediump_dvec3;
287 
289  typedef vec<3, double, packed_lowp> packed_lowp_dvec3;
290 
292  typedef vec<3, int, packed_highp> packed_highp_ivec3;
293 
295  typedef vec<3, int, packed_mediump> packed_mediump_ivec3;
296 
298  typedef vec<3, int, packed_lowp> packed_lowp_ivec3;
299 
301  typedef vec<3, uint, packed_highp> packed_highp_uvec3;
302 
304  typedef vec<3, uint, packed_mediump> packed_mediump_uvec3;
305 
307  typedef vec<3, uint, packed_lowp> packed_lowp_uvec3;
308 
310  typedef vec<3, bool, packed_highp> packed_highp_bvec3;
311 
313  typedef vec<3, bool, packed_mediump> packed_mediump_bvec3;
314 
316  typedef vec<3, bool, packed_lowp> packed_lowp_bvec3;
317 
318  // -- *vec4 --
319 
321  typedef vec<4, float, aligned_highp> aligned_highp_vec4;
322 
324  typedef vec<4, float, aligned_mediump> aligned_mediump_vec4;
325 
327  typedef vec<4, float, aligned_lowp> aligned_lowp_vec4;
328 
330  typedef vec<4, double, aligned_highp> aligned_highp_dvec4;
331 
333  typedef vec<4, double, aligned_mediump> aligned_mediump_dvec4;
334 
336  typedef vec<4, double, aligned_lowp> aligned_lowp_dvec4;
337 
339  typedef vec<4, int, aligned_highp> aligned_highp_ivec4;
340 
342  typedef vec<4, int, aligned_mediump> aligned_mediump_ivec4;
343 
345  typedef vec<4, int, aligned_lowp> aligned_lowp_ivec4;
346 
348  typedef vec<4, uint, aligned_highp> aligned_highp_uvec4;
349 
351  typedef vec<4, uint, aligned_mediump> aligned_mediump_uvec4;
352 
354  typedef vec<4, uint, aligned_lowp> aligned_lowp_uvec4;
355 
357  typedef vec<4, bool, aligned_highp> aligned_highp_bvec4;
358 
360  typedef vec<4, bool, aligned_mediump> aligned_mediump_bvec4;
361 
363  typedef vec<4, bool, aligned_lowp> aligned_lowp_bvec4;
364 
366  typedef vec<4, float, packed_highp> packed_highp_vec4;
367 
369  typedef vec<4, float, packed_mediump> packed_mediump_vec4;
370 
372  typedef vec<4, float, packed_lowp> packed_lowp_vec4;
373 
375  typedef vec<4, double, packed_highp> packed_highp_dvec4;
376 
378  typedef vec<4, double, packed_mediump> packed_mediump_dvec4;
379 
381  typedef vec<4, double, packed_lowp> packed_lowp_dvec4;
382 
384  typedef vec<4, int, packed_highp> packed_highp_ivec4;
385 
387  typedef vec<4, int, packed_mediump> packed_mediump_ivec4;
388 
390  typedef vec<4, int, packed_lowp> packed_lowp_ivec4;
391 
393  typedef vec<4, uint, packed_highp> packed_highp_uvec4;
394 
396  typedef vec<4, uint, packed_mediump> packed_mediump_uvec4;
397 
399  typedef vec<4, uint, packed_lowp> packed_lowp_uvec4;
400 
402  typedef vec<4, bool, packed_highp> packed_highp_bvec4;
403 
405  typedef vec<4, bool, packed_mediump> packed_mediump_bvec4;
406 
408  typedef vec<4, bool, packed_lowp> packed_lowp_bvec4;
409 
410  // -- *mat2 --
411 
413  typedef mat<2, 2, float, aligned_highp> aligned_highp_mat2;
414 
416  typedef mat<2, 2, float, aligned_mediump> aligned_mediump_mat2;
417 
419  typedef mat<2, 2, float, aligned_lowp> aligned_lowp_mat2;
420 
422  typedef mat<2, 2, double, aligned_highp> aligned_highp_dmat2;
423 
425  typedef mat<2, 2, double, aligned_mediump> aligned_mediump_dmat2;
426 
428  typedef mat<2, 2, double, aligned_lowp> aligned_lowp_dmat2;
429 
431  typedef mat<2, 2, float, packed_highp> packed_highp_mat2;
432 
434  typedef mat<2, 2, float, packed_mediump> packed_mediump_mat2;
435 
437  typedef mat<2, 2, float, packed_lowp> packed_lowp_mat2;
438 
440  typedef mat<2, 2, double, packed_highp> packed_highp_dmat2;
441 
443  typedef mat<2, 2, double, packed_mediump> packed_mediump_dmat2;
444 
446  typedef mat<2, 2, double, packed_lowp> packed_lowp_dmat2;
447 
448  // -- *mat3 --
449 
451  typedef mat<3, 3, float, aligned_highp> aligned_highp_mat3;
452 
454  typedef mat<3, 3, float, aligned_mediump> aligned_mediump_mat3;
455 
457  typedef mat<3, 3, float, aligned_lowp> aligned_lowp_mat3;
458 
460  typedef mat<3, 3, double, aligned_highp> aligned_highp_dmat3;
461 
463  typedef mat<3, 3, double, aligned_mediump> aligned_mediump_dmat3;
464 
466  typedef mat<3, 3, double, aligned_lowp> aligned_lowp_dmat3;
467 
469  typedef mat<3, 3, float, packed_highp> packed_highp_mat3;
470 
472  typedef mat<3, 3, float, packed_mediump> packed_mediump_mat3;
473 
475  typedef mat<3, 3, float, packed_lowp> packed_lowp_mat3;
476 
478  typedef mat<3, 3, double, packed_highp> packed_highp_dmat3;
479 
481  typedef mat<3, 3, double, packed_mediump> packed_mediump_dmat3;
482 
484  typedef mat<3, 3, double, packed_lowp> packed_lowp_dmat3;
485 
486  // -- *mat4 --
487 
489  typedef mat<4, 4, float, aligned_highp> aligned_highp_mat4;
490 
492  typedef mat<4, 4, float, aligned_mediump> aligned_mediump_mat4;
493 
495  typedef mat<4, 4, float, aligned_lowp> aligned_lowp_mat4;
496 
498  typedef mat<4, 4, double, aligned_highp> aligned_highp_dmat4;
499 
501  typedef mat<4, 4, double, aligned_mediump> aligned_mediump_dmat4;
502 
504  typedef mat<4, 4, double, aligned_lowp> aligned_lowp_dmat4;
505 
507  typedef mat<4, 4, float, packed_highp> packed_highp_mat4;
508 
510  typedef mat<4, 4, float, packed_mediump> packed_mediump_mat4;
511 
513  typedef mat<4, 4, float, packed_lowp> packed_lowp_mat4;
514 
516  typedef mat<4, 4, double, packed_highp> packed_highp_dmat4;
517 
519  typedef mat<4, 4, double, packed_mediump> packed_mediump_dmat4;
520 
522  typedef mat<4, 4, double, packed_lowp> packed_lowp_dmat4;
523 
524  // -- *mat2x2 --
525 
527  typedef mat<2, 2, float, aligned_highp> aligned_highp_mat2x2;
528 
530  typedef mat<2, 2, float, aligned_mediump> aligned_mediump_mat2x2;
531 
533  typedef mat<2, 2, float, aligned_lowp> aligned_lowp_mat2x2;
534 
536  typedef mat<2, 2, double, aligned_highp> aligned_highp_dmat2x2;
537 
539  typedef mat<2, 2, double, aligned_mediump> aligned_mediump_dmat2x2;
540 
542  typedef mat<2, 2, double, aligned_lowp> aligned_lowp_dmat2x2;
543 
545  typedef mat<2, 2, float, packed_highp> packed_highp_mat2x2;
546 
548  typedef mat<2, 2, float, packed_mediump> packed_mediump_mat2x2;
549 
551  typedef mat<2, 2, float, packed_lowp> packed_lowp_mat2x2;
552 
554  typedef mat<2, 2, double, packed_highp> packed_highp_dmat2x2;
555 
557  typedef mat<2, 2, double, packed_mediump> packed_mediump_dmat2x2;
558 
560  typedef mat<2, 2, double, packed_lowp> packed_lowp_dmat2x2;
561 
562  // -- *mat2x3 --
563 
565  typedef mat<2, 3, float, aligned_highp> aligned_highp_mat2x3;
566 
568  typedef mat<2, 3, float, aligned_mediump> aligned_mediump_mat2x3;
569 
571  typedef mat<2, 3, float, aligned_lowp> aligned_lowp_mat2x3;
572 
574  typedef mat<2, 3, double, aligned_highp> aligned_highp_dmat2x3;
575 
577  typedef mat<2, 3, double, aligned_mediump> aligned_mediump_dmat2x3;
578 
580  typedef mat<2, 3, double, aligned_lowp> aligned_lowp_dmat2x3;
581 
583  typedef mat<2, 3, float, packed_highp> packed_highp_mat2x3;
584 
586  typedef mat<2, 3, float, packed_mediump> packed_mediump_mat2x3;
587 
589  typedef mat<2, 3, float, packed_lowp> packed_lowp_mat2x3;
590 
592  typedef mat<2, 3, double, packed_highp> packed_highp_dmat2x3;
593 
595  typedef mat<2, 3, double, packed_mediump> packed_mediump_dmat2x3;
596 
598  typedef mat<2, 3, double, packed_lowp> packed_lowp_dmat2x3;
599 
600  // -- *mat2x4 --
601 
603  typedef mat<2, 4, float, aligned_highp> aligned_highp_mat2x4;
604 
606  typedef mat<2, 4, float, aligned_mediump> aligned_mediump_mat2x4;
607 
609  typedef mat<2, 4, float, aligned_lowp> aligned_lowp_mat2x4;
610 
612  typedef mat<2, 4, double, aligned_highp> aligned_highp_dmat2x4;
613 
615  typedef mat<2, 4, double, aligned_mediump> aligned_mediump_dmat2x4;
616 
618  typedef mat<2, 4, double, aligned_lowp> aligned_lowp_dmat2x4;
619 
621  typedef mat<2, 4, float, packed_highp> packed_highp_mat2x4;
622 
624  typedef mat<2, 4, float, packed_mediump> packed_mediump_mat2x4;
625 
627  typedef mat<2, 4, float, packed_lowp> packed_lowp_mat2x4;
628 
630  typedef mat<2, 4, double, packed_highp> packed_highp_dmat2x4;
631 
633  typedef mat<2, 4, double, packed_mediump> packed_mediump_dmat2x4;
634 
636  typedef mat<2, 4, double, packed_lowp> packed_lowp_dmat2x4;
637 
638  // -- *mat3x2 --
639 
641  typedef mat<3, 2, float, aligned_highp> aligned_highp_mat3x2;
642 
644  typedef mat<3, 2, float, aligned_mediump> aligned_mediump_mat3x2;
645 
647  typedef mat<3, 2, float, aligned_lowp> aligned_lowp_mat3x2;
648 
650  typedef mat<3, 2, double, aligned_highp> aligned_highp_dmat3x2;
651 
653  typedef mat<3, 2, double, aligned_mediump> aligned_mediump_dmat3x2;
654 
656  typedef mat<3, 2, double, aligned_lowp> aligned_lowp_dmat3x2;
657 
659  typedef mat<3, 2, float, packed_highp> packed_highp_mat3x2;
660 
662  typedef mat<3, 2, float, packed_mediump> packed_mediump_mat3x2;
663 
665  typedef mat<3, 2, float, packed_lowp> packed_lowp_mat3x2;
666 
668  typedef mat<3, 2, double, packed_highp> packed_highp_dmat3x2;
669 
671  typedef mat<3, 2, double, packed_mediump> packed_mediump_dmat3x2;
672 
674  typedef mat<3, 2, double, packed_lowp> packed_lowp_dmat3x2;
675 
676  // -- *mat3x3 --
677 
679  typedef mat<3, 3, float, aligned_highp> aligned_highp_mat3x3;
680 
682  typedef mat<3, 3, float, aligned_mediump> aligned_mediump_mat3x3;
683 
685  typedef mat<3, 3, float, aligned_lowp> aligned_lowp_mat3x3;
686 
688  typedef mat<3, 3, double, aligned_highp> aligned_highp_dmat3x3;
689 
691  typedef mat<3, 3, double, aligned_mediump> aligned_mediump_dmat3x3;
692 
694  typedef mat<3, 3, double, aligned_lowp> aligned_lowp_dmat3x3;
695 
697  typedef mat<3, 3, float, packed_highp> packed_highp_mat3x3;
698 
700  typedef mat<3, 3, float, packed_mediump> packed_mediump_mat3x3;
701 
703  typedef mat<3, 3, float, packed_lowp> packed_lowp_mat3x3;
704 
706  typedef mat<3, 3, double, packed_highp> packed_highp_dmat3x3;
707 
709  typedef mat<3, 3, double, packed_mediump> packed_mediump_dmat3x3;
710 
712  typedef mat<3, 3, double, packed_lowp> packed_lowp_dmat3x3;
713 
714  // -- *mat3x4 --
715 
717  typedef mat<3, 4, float, aligned_highp> aligned_highp_mat3x4;
718 
720  typedef mat<3, 4, float, aligned_mediump> aligned_mediump_mat3x4;
721 
723  typedef mat<3, 4, float, aligned_lowp> aligned_lowp_mat3x4;
724 
726  typedef mat<3, 4, double, aligned_highp> aligned_highp_dmat3x4;
727 
729  typedef mat<3, 4, double, aligned_mediump> aligned_mediump_dmat3x4;
730 
732  typedef mat<3, 4, double, aligned_lowp> aligned_lowp_dmat3x4;
733 
735  typedef mat<3, 4, float, packed_highp> packed_highp_mat3x4;
736 
738  typedef mat<3, 4, float, packed_mediump> packed_mediump_mat3x4;
739 
741  typedef mat<3, 4, float, packed_lowp> packed_lowp_mat3x4;
742 
744  typedef mat<3, 4, double, packed_highp> packed_highp_dmat3x4;
745 
747  typedef mat<3, 4, double, packed_mediump> packed_mediump_dmat3x4;
748 
750  typedef mat<3, 4, double, packed_lowp> packed_lowp_dmat3x4;
751 
752  // -- *mat4x2 --
753 
755  typedef mat<4, 2, float, aligned_highp> aligned_highp_mat4x2;
756 
758  typedef mat<4, 2, float, aligned_mediump> aligned_mediump_mat4x2;
759 
761  typedef mat<4, 2, float, aligned_lowp> aligned_lowp_mat4x2;
762 
764  typedef mat<4, 2, double, aligned_highp> aligned_highp_dmat4x2;
765 
767  typedef mat<4, 2, double, aligned_mediump> aligned_mediump_dmat4x2;
768 
770  typedef mat<4, 2, double, aligned_lowp> aligned_lowp_dmat4x2;
771 
773  typedef mat<4, 2, float, packed_highp> packed_highp_mat4x2;
774 
776  typedef mat<4, 2, float, packed_mediump> packed_mediump_mat4x2;
777 
779  typedef mat<4, 2, float, packed_lowp> packed_lowp_mat4x2;
780 
782  typedef mat<4, 2, double, packed_highp> packed_highp_dmat4x2;
783 
785  typedef mat<4, 2, double, packed_mediump> packed_mediump_dmat4x2;
786 
788  typedef mat<4, 2, double, packed_lowp> packed_lowp_dmat4x2;
789 
790  // -- *mat4x3 --
791 
793  typedef mat<4, 3, float, aligned_highp> aligned_highp_mat4x3;
794 
796  typedef mat<4, 3, float, aligned_mediump> aligned_mediump_mat4x3;
797 
799  typedef mat<4, 3, float, aligned_lowp> aligned_lowp_mat4x3;
800 
802  typedef mat<4, 3, double, aligned_highp> aligned_highp_dmat4x3;
803 
805  typedef mat<4, 3, double, aligned_mediump> aligned_mediump_dmat4x3;
806 
808  typedef mat<4, 3, double, aligned_lowp> aligned_lowp_dmat4x3;
809 
811  typedef mat<4, 3, float, packed_highp> packed_highp_mat4x3;
812 
814  typedef mat<4, 3, float, packed_mediump> packed_mediump_mat4x3;
815 
817  typedef mat<4, 3, float, packed_lowp> packed_lowp_mat4x3;
818 
820  typedef mat<4, 3, double, packed_highp> packed_highp_dmat4x3;
821 
823  typedef mat<4, 3, double, packed_mediump> packed_mediump_dmat4x3;
824 
826  typedef mat<4, 3, double, packed_lowp> packed_lowp_dmat4x3;
827 
828  // -- *mat4x4 --
829 
831  typedef mat<4, 4, float, aligned_highp> aligned_highp_mat4x4;
832 
834  typedef mat<4, 4, float, aligned_mediump> aligned_mediump_mat4x4;
835 
837  typedef mat<4, 4, float, aligned_lowp> aligned_lowp_mat4x4;
838 
840  typedef mat<4, 4, double, aligned_highp> aligned_highp_dmat4x4;
841 
843  typedef mat<4, 4, double, aligned_mediump> aligned_mediump_dmat4x4;
844 
846  typedef mat<4, 4, double, aligned_lowp> aligned_lowp_dmat4x4;
847 
849  typedef mat<4, 4, float, packed_highp> packed_highp_mat4x4;
850 
852  typedef mat<4, 4, float, packed_mediump> packed_mediump_mat4x4;
853 
855  typedef mat<4, 4, float, packed_lowp> packed_lowp_mat4x4;
856 
858  typedef mat<4, 4, double, packed_highp> packed_highp_dmat4x4;
859 
861  typedef mat<4, 4, double, packed_mediump> packed_mediump_dmat4x4;
862 
864  typedef mat<4, 4, double, packed_lowp> packed_lowp_dmat4x4;
865 
866  // -- default --
867 
868 #if(defined(GLM_PRECISION_LOWP_FLOAT))
877 
884 
903 #elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))
912 
919 
938 #else //defined(GLM_PRECISION_HIGHP_FLOAT)
941 
944 
947 
950 
953 
956 
959 
962 
965 
968 
971 
974 
977 
980 
983 
986 
989 
992 
995 
998 
1001 
1004 
1007 
1010 
1013 
1016 
1019 
1022 
1025 
1028 
1031 
1034 #endif//GLM_PRECISION
1035 
1036 #if(defined(GLM_PRECISION_LOWP_DOUBLE))
1045 
1052 
1071 #elif(defined(GLM_PRECISION_MEDIUMP_DOUBLE))
1080 
1087 
1106 #else //defined(GLM_PRECISION_HIGHP_DOUBLE)
1109 
1112 
1115 
1118 
1121 
1124 
1127 
1130 
1133 
1136 
1139 
1142 
1145 
1148 
1151 
1154 
1157 
1160 
1163 
1166 
1169 
1172 
1175 
1178 
1181 
1184 
1187 
1190 
1193 
1196 
1199 
1202 #endif//GLM_PRECISION
1203 
1204 #if(defined(GLM_PRECISION_LOWP_INT))
1209 #elif(defined(GLM_PRECISION_MEDIUMP_INT))
1214 #else //defined(GLM_PRECISION_HIGHP_INT)
1217 
1220 
1223 
1226 
1229 
1232 
1235 
1238 #endif//GLM_PRECISION
1239 
1240  // -- Unsigned integer definition --
1241 
1242 #if(defined(GLM_PRECISION_LOWP_UINT))
1247 #elif(defined(GLM_PRECISION_MEDIUMP_UINT))
1252 #else //defined(GLM_PRECISION_HIGHP_UINT)
1255 
1258 
1261 
1264 
1267 
1270 
1273 
1276 #endif//GLM_PRECISION
1277 
1278 #if(defined(GLM_PRECISION_LOWP_BOOL))
1283 #elif(defined(GLM_PRECISION_MEDIUMP_BOOL))
1288 #else //defined(GLM_PRECISION_HIGHP_BOOL)
1291 
1294 
1297 
1300 
1303 
1306 
1309 
1312 #endif//GLM_PRECISION
1313 
1315 }//namespace glm
mat< 3, 2, double, packed_lowp > packed_lowp_dmat3x2
3 by 2 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
vec< 1, int, aligned_lowp > aligned_lowp_ivec1
1 component vector aligned in memory of signed integer numbers.
+
mat< 3, 2, float, packed_mediump > packed_mediump_mat3x2
3 by 2 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
aligned_highp_dmat4x2 aligned_dmat4x2
4 by 2 matrix tightly aligned in memory of double-precision floating-point numbers.
+
packed_highp_dmat4x2 packed_dmat4x2
4 by 2 matrix tightly packed in memory of double-precision floating-point numbers.
+
vec< 4, double, aligned_lowp > aligned_lowp_dvec4
4 components vector aligned in memory of double-precision floating-point numbers using low precision ...
+
mat< 3, 2, float, packed_lowp > packed_lowp_mat3x2
3 by 2 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
mat< 3, 4, float, packed_highp > packed_highp_mat3x4
3 by 4 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
vec< 1, uint, aligned_lowp > aligned_lowp_uvec1
1 component vector aligned in memory of unsigned integer numbers.
+
vec< 1, bool, aligned_highp > aligned_highp_bvec1
1 component vector aligned in memory of bool values.
+
vec< 1, float, aligned_lowp > aligned_lowp_vec1
1 component vector aligned in memory of single-precision floating-point numbers using low precision a...
+
packed_highp_bvec4 packed_bvec4
4 components vector tightly packed in memory of bool values.
+
aligned_highp_mat3 aligned_mat3
3 by 3 matrix tightly aligned in memory of single-precision floating-point numbers.
+
vec< 2, bool, aligned_lowp > aligned_lowp_bvec2
2 components vector aligned in memory of bool values.
+
packed_highp_mat2 packed_mat2
2 by 2 matrix tightly packed in memory of single-precision floating-point numbers.
+
mat< 4, 4, double, packed_mediump > packed_mediump_dmat4
4 by 4 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
packed_highp_dmat2x4 packed_dmat2x4
2 by 4 matrix tightly packed in memory of double-precision floating-point numbers.
+
packed_highp_mat4x3 packed_mat4x3
4 by 3 matrix tightly packed in memory of single-precision floating-point numbers.
+
mat< 2, 4, double, packed_lowp > packed_lowp_dmat2x4
2 by 4 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
mat< 4, 4, float, aligned_mediump > aligned_mediump_mat4x4
4 by 4 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
vec< 1, uint, packed_highp > packed_highp_uvec1
1 component vector tightly packed in memory of unsigned integer numbers.
+
mat< 3, 2, float, aligned_mediump > aligned_mediump_mat3x2
3 by 2 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
mat< 4, 2, float, aligned_mediump > aligned_mediump_mat4x2
4 by 2 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
mat< 3, 3, float, packed_mediump > packed_mediump_mat3x3
3 by 3 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
packed_highp_uvec3 packed_uvec3
3 components vector tightly packed in memory of unsigned integer numbers.
+
vec< 4, bool, packed_highp > packed_highp_bvec4
4 components vector tightly packed in memory of bool values.
+
vec< 2, float, packed_lowp > packed_lowp_vec2
2 components vector tightly packed in memory of single-precision floating-point numbers using low pre...
+
mat< 3, 3, float, aligned_lowp > aligned_lowp_mat3x3
3 by 3 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
packed_highp_mat4 packed_mat4
4 by 4 matrix tightly packed in memory of single-precision floating-point numbers.
+
mat< 4, 4, double, packed_mediump > packed_mediump_dmat4x4
4 by 4 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
mat< 4, 2, double, aligned_lowp > aligned_lowp_dmat4x2
4 by 2 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
aligned_highp_bvec4 aligned_bvec4
4 components vector aligned in memory of bool values.
+
vec< 1, double, aligned_mediump > aligned_mediump_dvec1
1 component vector aligned in memory of double-precision floating-point numbers using medium precisio...
+
mat< 4, 4, double, packed_highp > packed_highp_dmat4
4 by 4 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
aligned_highp_dmat3x4 aligned_dmat3x4
3 by 4 matrix tightly aligned in memory of double-precision floating-point numbers.
+
vec< 4, bool, packed_lowp > packed_lowp_bvec4
4 components vector tightly packed in memory of bool values.
+
aligned_highp_bvec2 aligned_bvec2
2 components vector aligned in memory of bool values.
+
aligned_highp_mat2x4 aligned_mat2x4
2 by 4 matrix tightly aligned in memory of single-precision floating-point numbers.
+
packed_highp_vec1 packed_vec1
1 component vector tightly packed in memory of single-precision floating-point numbers.
+
packed_highp_dmat3x3 packed_dmat3x3
3 by 3 matrix tightly packed in memory of double-precision floating-point numbers.
+
mat< 4, 3, double, aligned_highp > aligned_highp_dmat4x3
4 by 3 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
mat< 3, 4, double, packed_highp > packed_highp_dmat3x4
3 by 4 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
aligned_highp_dmat2x2 aligned_dmat2x2
2 by 2 matrix tightly aligned in memory of double-precision floating-point numbers.
+
vec< 1, int, packed_highp > packed_highp_ivec1
1 component vector tightly packed in memory of signed integer numbers.
+
vec< 2, float, aligned_highp > aligned_highp_vec2
2 components vector aligned in memory of single-precision floating-point numbers using high precision...
+
mat< 4, 4, float, aligned_lowp > aligned_lowp_mat4x4
4 by 4 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
vec< 4, double, packed_highp > packed_highp_dvec4
4 components vector tightly packed in memory of double-precision floating-point numbers using high pr...
+
vec< 1, float, packed_lowp > packed_lowp_vec1
1 component vector tightly packed in memory of single-precision floating-point numbers using low prec...
+
vec< 2, int, packed_highp > packed_highp_ivec2
2 components vector tightly packed in memory of signed integer numbers.
+
mat< 3, 2, float, packed_highp > packed_highp_mat3x2
3 by 2 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
vec< 3, float, aligned_lowp > aligned_lowp_vec3
3 components vector aligned in memory of single-precision floating-point numbers using low precision ...
+
aligned_highp_dmat4x3 aligned_dmat4x3
4 by 3 matrix tightly aligned in memory of double-precision floating-point numbers.
+
mat< 3, 3, double, packed_mediump > packed_mediump_dmat3x3
3 by 3 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
vec< 2, double, packed_highp > packed_highp_dvec2
2 components vector tightly packed in memory of double-precision floating-point numbers using high pr...
+
vec< 3, int, packed_lowp > packed_lowp_ivec3
3 components vector tightly packed in memory of signed integer numbers.
+
mat< 2, 3, double, packed_highp > packed_highp_dmat2x3
2 by 3 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
packed_highp_dmat2x3 packed_dmat2x3
2 by 3 matrix tightly packed in memory of double-precision floating-point numbers.
+
vec< 2, bool, packed_mediump > packed_mediump_bvec2
2 components vector tightly packed in memory of bool values.
+
vec< 4, float, aligned_lowp > aligned_lowp_vec4
4 components vector aligned in memory of single-precision floating-point numbers using low precision ...
+
mat< 3, 3, double, packed_lowp > packed_lowp_dmat3
3 by 3 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
packed_highp_vec2 packed_vec2
2 components vector tightly packed in memory of single-precision floating-point numbers.
+
vec< 4, int, aligned_lowp > aligned_lowp_ivec4
4 components vector aligned in memory of signed integer numbers.
+
aligned_highp_vec2 aligned_vec2
2 components vector aligned in memory of single-precision floating-point numbers. ...
+
packed_highp_uvec2 packed_uvec2
2 components vector tightly packed in memory of unsigned integer numbers.
+
vec< 1, float, aligned_highp > aligned_highp_vec1
1 component vector aligned in memory of single-precision floating-point numbers using high precision ...
+
mat< 4, 2, double, aligned_mediump > aligned_mediump_dmat4x2
4 by 2 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
aligned_highp_mat4x4 aligned_mat4x4
4 by 4 matrix tightly aligned in memory of single-precision floating-point numbers.
+
mat< 4, 4, double, packed_highp > packed_highp_dmat4x4
4 by 4 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
mat< 2, 3, double, aligned_lowp > aligned_lowp_dmat2x3
2 by 3 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
mat< 2, 3, float, packed_mediump > packed_mediump_mat2x3
2 by 3 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
mat< 2, 4, float, packed_lowp > packed_lowp_mat2x4
2 by 4 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
vec< 3, int, aligned_mediump > aligned_mediump_ivec3
3 components vector aligned in memory of signed integer numbers.
+
vec< 2, uint, aligned_lowp > aligned_lowp_uvec2
2 components vector aligned in memory of unsigned integer numbers.
+
aligned_highp_mat2x2 aligned_mat2x2
2 by 2 matrix tightly aligned in memory of single-precision floating-point numbers.
+
vec< 4, bool, aligned_mediump > aligned_mediump_bvec4
4 components vector aligned in memory of bool values.
+
vec< 2, bool, packed_highp > packed_highp_bvec2
2 components vector tightly packed in memory of bool values.
+
vec< 4, int, aligned_highp > aligned_highp_ivec4
4 components vector aligned in memory of signed integer numbers.
+
mat< 2, 2, float, aligned_highp > aligned_highp_mat2
2 by 2 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
packed_highp_dvec4 packed_dvec4
4 components vector tightly packed in memory of double-precision floating-point numbers.
+
vec< 3, uint, packed_mediump > packed_mediump_uvec3
3 components vector tightly packed in memory of unsigned integer numbers.
+
vec< 2, double, aligned_lowp > aligned_lowp_dvec2
2 components vector aligned in memory of double-precision floating-point numbers using low precision ...
+
packed_highp_dmat4 packed_dmat4
4 by 4 matrix tightly packed in memory of double-precision floating-point numbers.
+
mat< 2, 4, double, aligned_highp > aligned_highp_dmat2x4
2 by 4 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
vec< 2, bool, packed_lowp > packed_lowp_bvec2
2 components vector tightly packed in memory of bool values.
+
aligned_highp_mat4 aligned_mat4
4 by 4 matrix tightly aligned in memory of single-precision floating-point numbers.
+
vec< 1, uint, aligned_highp > aligned_highp_uvec1
1 component vector aligned in memory of unsigned integer numbers.
+
vec< 2, int, aligned_mediump > aligned_mediump_ivec2
2 components vector aligned in memory of signed integer numbers.
+
mat< 3, 4, double, aligned_mediump > aligned_mediump_dmat3x4
3 by 4 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
vec< 2, float, aligned_lowp > aligned_lowp_vec2
2 components vector aligned in memory of single-precision floating-point numbers using low precision ...
+
mat< 2, 2, double, packed_highp > packed_highp_dmat2
2 by 2 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
mat< 2, 2, double, aligned_mediump > aligned_mediump_dmat2x2
2 by 2 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
vec< 3, double, aligned_mediump > aligned_mediump_dvec3
3 components vector aligned in memory of double-precision floating-point numbers using medium precisi...
+
mat< 4, 2, float, packed_highp > packed_highp_mat4x2
4 by 2 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
vec< 3, bool, packed_mediump > packed_mediump_bvec3
3 components vector tightly packed in memory of bool values.
+
vec< 2, uint, packed_mediump > packed_mediump_uvec2
2 components vector tightly packed in memory of unsigned integer numbers.
+
vec< 4, float, packed_lowp > packed_lowp_vec4
4 components vector tightly packed in memory of single-precision floating-point numbers using low pre...
+
aligned_highp_vec4 aligned_vec4
4 components vector aligned in memory of single-precision floating-point numbers. ...
+
vec< 4, uint, aligned_lowp > aligned_lowp_uvec4
4 components vector aligned in memory of unsigned integer numbers.
+
mat< 2, 2, float, packed_mediump > packed_mediump_mat2
2 by 2 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
vec< 1, double, packed_highp > packed_highp_dvec1
1 component vector tightly packed in memory of double-precision floating-point numbers using high pre...
+
mat< 3, 3, double, aligned_mediump > aligned_mediump_dmat3x3
3 by 3 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
aligned_highp_dvec4 aligned_dvec4
4 components vector aligned in memory of double-precision floating-point numbers. ...
+
packed_highp_mat3x3 packed_mat3x3
3 by 3 matrix tightly packed in memory of single-precision floating-point numbers.
+
vec< 1, uint, packed_lowp > packed_lowp_uvec1
1 component vector tightly packed in memory of unsigned integer numbers.
+
mat< 3, 2, double, packed_highp > packed_highp_dmat3x2
3 by 2 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
mat< 4, 4, double, packed_lowp > packed_lowp_dmat4x4
4 by 4 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
mat< 2, 2, double, packed_lowp > packed_lowp_dmat2
2 by 2 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
packed_highp_mat2x4 packed_mat2x4
2 by 4 matrix tightly packed in memory of single-precision floating-point numbers.
+
mat< 2, 4, double, aligned_lowp > aligned_lowp_dmat2x4
2 by 4 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
vec< 1, int, aligned_highp > aligned_highp_ivec1
1 component vector aligned in memory of signed integer numbers.
+
vec< 3, float, aligned_highp > aligned_highp_vec3
3 components vector aligned in memory of single-precision floating-point numbers using high precision...
+
aligned_highp_dmat3x2 aligned_dmat3x2
3 by 2 matrix tightly aligned in memory of double-precision floating-point numbers.
+
mat< 3, 4, double, aligned_highp > aligned_highp_dmat3x4
3 by 4 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
vec< 4, double, aligned_highp > aligned_highp_dvec4
4 components vector aligned in memory of double-precision floating-point numbers using high precision...
+
mat< 2, 4, float, aligned_mediump > aligned_mediump_mat2x4
2 by 4 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
vec< 2, double, packed_lowp > packed_lowp_dvec2
2 components vector tightly packed in memory of double-precision floating-point numbers using low pre...
+
mat< 3, 4, float, packed_lowp > packed_lowp_mat3x4
3 by 4 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
vec< 3, uint, aligned_mediump > aligned_mediump_uvec3
3 components vector aligned in memory of unsigned integer numbers.
+
vec< 1, bool, aligned_mediump > aligned_mediump_bvec1
1 component vector aligned in memory of bool values.
+
vec< 2, double, packed_mediump > packed_mediump_dvec2
2 components vector tightly packed in memory of double-precision floating-point numbers using medium ...
+
vec< 4, float, packed_highp > packed_highp_vec4
4 components vector tightly packed in memory of single-precision floating-point numbers using high pr...
+
vec< 2, int, packed_mediump > packed_mediump_ivec2
2 components vector tightly packed in memory of signed integer numbers.
+
vec< 2, float, aligned_mediump > aligned_mediump_vec2
2 components vector aligned in memory of single-precision floating-point numbers using medium precisi...
+
mat< 4, 4, double, packed_lowp > packed_lowp_dmat4
4 by 4 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
mat< 4, 4, float, aligned_mediump > aligned_mediump_mat4
4 by 4 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
mat< 3, 3, float, packed_lowp > packed_lowp_mat3
3 by 3 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
vec< 3, uint, packed_highp > packed_highp_uvec3
3 components vector tightly packed in memory of unsigned integer numbers.
+
mat< 2, 2, double, packed_mediump > packed_mediump_dmat2x2
2 by 2 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
packed_highp_uvec4 packed_uvec4
4 components vector tightly packed in memory of unsigned integer numbers.
+
aligned_highp_dmat2x3 aligned_dmat2x3
2 by 3 matrix tightly aligned in memory of double-precision floating-point numbers.
+
mat< 4, 2, double, aligned_highp > aligned_highp_dmat4x2
4 by 2 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
vec< 1, float, aligned_mediump > aligned_mediump_vec1
1 component vector aligned in memory of single-precision floating-point numbers using medium precisio...
+
aligned_highp_bvec1 aligned_bvec1
1 component vector aligned in memory of bool values.
+
mat< 3, 4, float, packed_mediump > packed_mediump_mat3x4
3 by 4 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
packed_highp_ivec3 packed_ivec3
3 components vector tightly packed in memory of signed integer numbers.
+
mat< 2, 4, float, packed_highp > packed_highp_mat2x4
2 by 4 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
packed_highp_dmat2x2 packed_dmat2x2
2 by 2 matrix tightly packed in memory of double-precision floating-point numbers.
+
mat< 2, 3, float, packed_lowp > packed_lowp_mat2x3
2 by 3 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
mat< 4, 3, float, packed_highp > packed_highp_mat4x3
4 by 3 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
packed_highp_mat2x2 packed_mat2x2
2 by 2 matrix tightly packed in memory of single-precision floating-point numbers.
+
aligned_highp_uvec1 aligned_uvec1
1 component vector aligned in memory of unsigned integer numbers.
+
mat< 2, 3, float, packed_highp > packed_highp_mat2x3
2 by 3 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
vec< 1, double, packed_lowp > packed_lowp_dvec1
1 component vector tightly packed in memory of double-precision floating-point numbers using low prec...
+
vec< 2, uint, packed_lowp > packed_lowp_uvec2
2 components vector tightly packed in memory of unsigned integer numbers.
+
mat< 2, 4, float, packed_mediump > packed_mediump_mat2x4
2 by 4 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
vec< 2, bool, aligned_highp > aligned_highp_bvec2
2 components vector aligned in memory of bool values.
+
mat< 4, 4, float, aligned_lowp > aligned_lowp_mat4
4 by 4 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
vec< 2, uint, packed_highp > packed_highp_uvec2
2 components vector tightly packed in memory of unsigned integer numbers.
+
aligned_highp_uvec2 aligned_uvec2
2 components vector aligned in memory of unsigned integer numbers.
+
mat< 3, 3, double, aligned_lowp > aligned_lowp_dmat3
3 by 3 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
vec< 1, double, aligned_highp > aligned_highp_dvec1
1 component vector aligned in memory of double-precision floating-point numbers using high precision ...
+
mat< 3, 3, float, packed_highp > packed_highp_mat3x3
3 by 3 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
aligned_highp_mat2 aligned_mat2
2 by 2 matrix tightly aligned in memory of single-precision floating-point numbers.
+
packed_highp_dmat3 packed_dmat3
3 by 3 matrix tightly packed in memory of double-precision floating-point numbers.
+
vec< 3, bool, aligned_mediump > aligned_mediump_bvec3
3 components vector aligned in memory of bool values.
+
mat< 4, 4, double, aligned_mediump > aligned_mediump_dmat4x4
4 by 4 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
vec< 2, int, aligned_lowp > aligned_lowp_ivec2
2 components vector aligned in memory of signed integer numbers.
+
vec< 2, int, packed_lowp > packed_lowp_ivec2
2 components vector tightly packed in memory of signed integer numbers.
+
vec< 3, double, packed_lowp > packed_lowp_dvec3
3 components vector tightly packed in memory of double-precision floating-point numbers using low pre...
+
vec< 4, bool, aligned_lowp > aligned_lowp_bvec4
4 components vector aligned in memory of bool values.
+
mat< 4, 4, float, aligned_highp > aligned_highp_mat4
4 by 4 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
mat< 2, 4, double, aligned_mediump > aligned_mediump_dmat2x4
2 by 4 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
mat< 4, 4, double, aligned_highp > aligned_highp_dmat4x4
4 by 4 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
packed_highp_mat2x3 packed_mat2x3
2 by 3 matrix tightly packed in memory of single-precision floating-point numbers.
+
vec< 2, float, packed_mediump > packed_mediump_vec2
2 components vector tightly packed in memory of single-precision floating-point numbers using medium ...
+
mat< 4, 4, float, packed_lowp > packed_lowp_mat4x4
4 by 4 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
vec< 3, double, packed_highp > packed_highp_dvec3
3 components vector tightly packed in memory of double-precision floating-point numbers using high pr...
+
mat< 4, 3, double, packed_highp > packed_highp_dmat4x3
4 by 3 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
aligned_highp_dmat3x3 aligned_dmat3x3
3 by 3 matrix tightly aligned in memory of double-precision floating-point numbers.
+
aligned_highp_dmat2x4 aligned_dmat2x4
2 by 4 matrix tightly aligned in memory of double-precision floating-point numbers.
+
vec< 1, bool, aligned_lowp > aligned_lowp_bvec1
1 component vector aligned in memory of bool values.
+
aligned_highp_ivec4 aligned_ivec4
4 components vector aligned in memory of signed integer numbers.
+
aligned_highp_uvec4 aligned_uvec4
4 components vector aligned in memory of unsigned integer numbers.
+
mat< 2, 3, float, aligned_mediump > aligned_mediump_mat2x3
2 by 3 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
mat< 2, 2, float, aligned_mediump > aligned_mediump_mat2x2
2 by 2 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
vec< 2, double, aligned_mediump > aligned_mediump_dvec2
2 components vector aligned in memory of double-precision floating-point numbers using medium precisi...
+
vec< 3, int, packed_mediump > packed_mediump_ivec3
3 components vector tightly packed in memory of signed integer numbers.
+
vec< 1, bool, packed_lowp > packed_lowp_bvec1
1 component vector tightly packed in memory of bool values.
+
packed_highp_ivec2 packed_ivec2
2 components vector tightly packed in memory of signed integer numbers.
+
vec< 2, float, packed_highp > packed_highp_vec2
2 components vector tightly packed in memory of single-precision floating-point numbers using high pr...
+
aligned_highp_ivec3 aligned_ivec3
3 components vector aligned in memory of signed integer numbers.
+
mat< 4, 3, float, aligned_lowp > aligned_lowp_mat4x3
4 by 3 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
mat< 3, 2, double, aligned_highp > aligned_highp_dmat3x2
3 by 2 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
vec< 4, int, packed_mediump > packed_mediump_ivec4
4 components vector tightly packed in memory of signed integer numbers.
+
mat< 2, 2, double, aligned_lowp > aligned_lowp_dmat2
2 by 2 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
vec< 3, uint, packed_lowp > packed_lowp_uvec3
3 components vector tightly packed in memory of unsigned integer numbers.
+
mat< 3, 4, double, packed_mediump > packed_mediump_dmat3x4
3 by 4 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
mat< 2, 3, float, aligned_highp > aligned_highp_mat2x3
2 by 3 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
mat< 4, 3, float, aligned_highp > aligned_highp_mat4x3
4 by 3 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
mat< 3, 4, double, packed_lowp > packed_lowp_dmat3x4
3 by 4 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
vec< 3, bool, aligned_lowp > aligned_lowp_bvec3
3 components vector aligned in memory of bool values.
+
mat< 2, 3, double, aligned_mediump > aligned_mediump_dmat2x3
2 by 3 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
mat< 3, 3, float, packed_mediump > packed_mediump_mat3
3 by 3 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
mat< 2, 4, double, packed_highp > packed_highp_dmat2x4
2 by 4 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
mat< 4, 4, double, aligned_mediump > aligned_mediump_dmat4
4 by 4 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
vec< 3, float, aligned_mediump > aligned_mediump_vec3
3 components vector aligned in memory of single-precision floating-point numbers using medium precisi...
+
vec< 2, uint, aligned_highp > aligned_highp_uvec2
2 components vector aligned in memory of unsigned integer numbers.
+
mat< 4, 4, double, aligned_lowp > aligned_lowp_dmat4
4 by 4 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
aligned_highp_dmat2 aligned_dmat2
2 by 2 matrix tightly aligned in memory of double-precision floating-point numbers.
+
mat< 4, 4, double, aligned_highp > aligned_highp_dmat4
4 by 4 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
aligned_highp_dvec3 aligned_dvec3
3 components vector aligned in memory of double-precision floating-point numbers. ...
+
packed_highp_vec3 packed_vec3
3 components vector tightly packed in memory of single-precision floating-point numbers.
+
mat< 2, 2, float, packed_highp > packed_highp_mat2
2 by 2 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
packed_highp_bvec3 packed_bvec3
3 components vector tightly packed in memory of bool values.
+
packed_highp_mat4x2 packed_mat4x2
4 by 2 matrix tightly packed in memory of single-precision floating-point numbers.
+
packed_highp_dmat3x4 packed_dmat3x4
3 by 4 matrix tightly packed in memory of double-precision floating-point numbers.
+
vec< 1, int, packed_mediump > packed_mediump_ivec1
1 component vector tightly packed in memory of signed integer numbers.
+
packed_highp_dvec1 packed_dvec1
1 component vector tightly packed in memory of double-precision floating-point numbers.
+
mat< 2, 2, float, aligned_mediump > aligned_mediump_mat2
2 by 2 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
mat< 2, 2, double, aligned_highp > aligned_highp_dmat2
2 by 2 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
mat< 4, 3, double, packed_mediump > packed_mediump_dmat4x3
4 by 3 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
aligned_highp_vec1 aligned_vec1
1 component vector aligned in memory of single-precision floating-point numbers.
+
aligned_highp_mat4x3 aligned_mat4x3
4 by 3 matrix tightly aligned in memory of single-precision floating-point numbers.
+
mat< 4, 4, float, packed_mediump > packed_mediump_mat4x4
4 by 4 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
mat< 4, 3, double, aligned_lowp > aligned_lowp_dmat4x3
4 by 3 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
mat< 4, 4, float, packed_highp > packed_highp_mat4x4
4 by 4 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
vec< 4, bool, packed_mediump > packed_mediump_bvec4
4 components vector tightly packed in memory of bool values.
+
vec< 4, int, packed_highp > packed_highp_ivec4
4 components vector tightly packed in memory of signed integer numbers.
+
packed_highp_dvec2 packed_dvec2
2 components vector tightly packed in memory of double-precision floating-point numbers.
+
vec< 4, float, aligned_mediump > aligned_mediump_vec4
4 components vector aligned in memory of single-precision floating-point numbers using medium precisi...
+
mat< 4, 2, float, packed_mediump > packed_mediump_mat4x2
4 by 2 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
vec< 4, int, aligned_mediump > aligned_mediump_ivec4
4 components vector aligned in memory of signed integer numbers.
+
packed_highp_dmat4x3 packed_dmat4x3
4 by 3 matrix tightly packed in memory of double-precision floating-point numbers.
+
aligned_highp_dvec1 aligned_dvec1
1 component vector aligned in memory of double-precision floating-point numbers.
+
mat< 2, 2, double, aligned_lowp > aligned_lowp_dmat2x2
2 by 2 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
packed_highp_ivec4 packed_ivec4
4 components vector tightly packed in memory of signed integer numbers.
+
vec< 1, uint, packed_mediump > packed_mediump_uvec1
1 component vector tightly packed in memory of unsigned integer numbers.
+
vec< 1, double, aligned_lowp > aligned_lowp_dvec1
1 component vector aligned in memory of double-precision floating-point numbers using low precision a...
+
vec< 2, int, aligned_highp > aligned_highp_ivec2
2 components vector aligned in memory of signed integer numbers.
+
mat< 2, 4, float, aligned_highp > aligned_highp_mat2x4
2 by 4 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
mat< 2, 2, double, packed_highp > packed_highp_dmat2x2
2 by 2 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
mat< 4, 4, float, packed_lowp > packed_lowp_mat4
4 by 4 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
mat< 4, 2, float, aligned_highp > aligned_highp_mat4x2
4 by 2 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
mat< 2, 3, double, packed_mediump > packed_mediump_dmat2x3
2 by 3 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
mat< 3, 2, double, packed_mediump > packed_mediump_dmat3x2
3 by 2 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
vec< 4, uint, packed_highp > packed_highp_uvec4
4 components vector tightly packed in memory of unsigned integer numbers.
+
vec< 3, int, aligned_lowp > aligned_lowp_ivec3
3 components vector aligned in memory of signed integer numbers.
+
vec< 2, double, aligned_highp > aligned_highp_dvec2
2 components vector aligned in memory of double-precision floating-point numbers using high precision...
+
aligned_highp_mat2x3 aligned_mat2x3
2 by 3 matrix tightly aligned in memory of single-precision floating-point numbers.
+
mat< 3, 2, double, aligned_mediump > aligned_mediump_dmat3x2
3 by 2 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
vec< 4, double, packed_lowp > packed_lowp_dvec4
4 components vector tightly packed in memory of double-precision floating-point numbers using low pre...
+
mat< 4, 4, double, aligned_lowp > aligned_lowp_dmat4x4
4 by 4 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
packed_highp_ivec1 packed_ivec1
1 component vector tightly packed in memory of signed integer numbers.
+
aligned_highp_mat3x2 aligned_mat3x2
3 by 2 matrix tightly aligned in memory of single-precision floating-point numbers.
+
mat< 3, 3, double, packed_mediump > packed_mediump_dmat3
3 by 3 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
vec< 1, double, packed_mediump > packed_mediump_dvec1
1 component vector tightly packed in memory of double-precision floating-point numbers using medium p...
+
vec< 2, bool, aligned_mediump > aligned_mediump_bvec2
2 components vector aligned in memory of bool values.
+
mat< 2, 4, double, packed_mediump > packed_mediump_dmat2x4
2 by 4 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
mat< 3, 2, double, aligned_lowp > aligned_lowp_dmat3x2
3 by 2 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
mat< 2, 2, float, packed_highp > packed_highp_mat2x2
2 by 2 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
packed_highp_dmat3x2 packed_dmat3x2
3 by 2 matrix tightly packed in memory of double-precision floating-point numbers.
+
vec< 1, bool, packed_highp > packed_highp_bvec1
1 component vector tightly packed in memory of bool values.
+
mat< 3, 3, double, packed_lowp > packed_lowp_dmat3x3
3 by 3 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
mat< 2, 2, double, packed_mediump > packed_mediump_dmat2
2 by 2 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
mat< 3, 3, float, packed_lowp > packed_lowp_mat3x3
3 by 3 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
aligned_highp_mat3x3 aligned_mat3x3
3 by 3 matrix tightly aligned in memory of single-precision floating-point numbers.
+
aligned_highp_dvec2 aligned_dvec2
2 components vector aligned in memory of double-precision floating-point numbers. ...
+
vec< 4, int, packed_lowp > packed_lowp_ivec4
4 components vector tightly packed in memory of signed integer numbers.
+
mat< 4, 2, float, aligned_lowp > aligned_lowp_mat4x2
4 by 2 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
vec< 4, uint, packed_mediump > packed_mediump_uvec4
4 components vector tightly packed in memory of unsigned integer numbers.
+
mat< 2, 2, double, packed_lowp > packed_lowp_dmat2x2
2 by 2 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
packed_highp_bvec1 packed_bvec1
1 components vector tightly packed in memory of bool values.
+
mat< 4, 3, float, packed_lowp > packed_lowp_mat4x3
4 by 3 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
vec< 3, bool, packed_highp > packed_highp_bvec3
3 components vector tightly packed in memory of bool values.
+
mat< 3, 3, double, aligned_lowp > aligned_lowp_dmat3x3
3 by 3 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
vec< 2, uint, aligned_mediump > aligned_mediump_uvec2
2 components vector aligned in memory of unsigned integer numbers.
+
aligned_highp_uvec3 aligned_uvec3
3 components vector aligned in memory of unsigned integer numbers.
+
vec< 1, float, packed_highp > packed_highp_vec1
1 component vector tightly packed in memory of single-precision floating-point numbers using high pre...
+
mat< 4, 2, double, packed_lowp > packed_lowp_dmat4x2
4 by 2 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
vec< 3, float, packed_lowp > packed_lowp_vec3
3 components vector tightly packed in memory of single-precision floating-point numbers using low pre...
+
mat< 2, 3, float, aligned_lowp > aligned_lowp_mat2x3
2 by 3 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
vec< 3, int, aligned_highp > aligned_highp_ivec3
3 components vector aligned in memory of signed integer numbers.
+
packed_highp_mat3 packed_mat3
3 by 3 matrix tightly packed in memory of single-precision floating-point numbers.
+
mat< 3, 3, float, aligned_mediump > aligned_mediump_mat3x3
3 by 3 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
mat< 4, 2, double, packed_mediump > packed_mediump_dmat4x2
4 by 2 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
mat< 2, 2, float, aligned_highp > aligned_highp_mat2x2
2 by 2 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
aligned_highp_dmat4 aligned_dmat4
4 by 4 matrix tightly aligned in memory of double-precision floating-point numbers.
+
mat< 2, 2, float, packed_lowp > packed_lowp_mat2
2 by 2 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
mat< 3, 3, double, packed_highp > packed_highp_dmat3x3
3 by 3 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
mat< 3, 3, float, aligned_lowp > aligned_lowp_mat3
3 by 3 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
packed_highp_mat4x4 packed_mat4x4
4 by 4 matrix tightly packed in memory of single-precision floating-point numbers.
+
mat< 3, 3, float, aligned_highp > aligned_highp_mat3x3
3 by 3 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
vec< 1, int, packed_lowp > packed_lowp_ivec1
1 component vector tightly packed in memory of signed integer numbers.
+
vec< 1, int, aligned_mediump > aligned_mediump_ivec1
1 component vector aligned in memory of signed integer numbers.
+
vec< 4, bool, aligned_highp > aligned_highp_bvec4
4 components vector aligned in memory of bool values.
+
mat< 3, 3, double, aligned_mediump > aligned_mediump_dmat3
3 by 3 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
vec< 4, double, aligned_mediump > aligned_mediump_dvec4
4 components vector aligned in memory of double-precision floating-point numbers using medium precisi...
+
mat< 4, 2, double, packed_highp > packed_highp_dmat4x2
4 by 2 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
aligned_highp_bvec3 aligned_bvec3
3 components vector aligned in memory of bool values.
+
mat< 2, 2, float, packed_mediump > packed_mediump_mat2x2
2 by 2 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
mat< 4, 3, float, aligned_mediump > aligned_mediump_mat4x3
4 by 3 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
mat< 2, 4, float, aligned_lowp > aligned_lowp_mat2x4
2 by 4 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
vec< 4, uint, packed_lowp > packed_lowp_uvec4
4 components vector tightly packed in memory of unsigned integer numbers.
+
mat< 4, 2, float, packed_lowp > packed_lowp_mat4x2
4 by 2 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
vec< 3, uint, aligned_lowp > aligned_lowp_uvec3
3 components vector aligned in memory of unsigned integer numbers.
+
packed_highp_uvec1 packed_uvec1
1 component vector tightly packed in memory of unsigned integer numbers.
+
vec< 4, double, packed_mediump > packed_mediump_dvec4
4 components vector tightly packed in memory of double-precision floating-point numbers using medium ...
+
mat< 3, 2, float, aligned_highp > aligned_highp_mat3x2
3 by 2 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
mat< 4, 3, double, packed_lowp > packed_lowp_dmat4x3
4 by 3 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
packed_highp_vec4 packed_vec4
4 components vector tightly packed in memory of single-precision floating-point numbers.
+
mat< 3, 3, double, aligned_highp > aligned_highp_dmat3
3 by 3 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
mat< 2, 3, double, packed_lowp > packed_lowp_dmat2x3
2 by 3 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
mat< 3, 4, float, aligned_mediump > aligned_mediump_mat3x4
3 by 4 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
packed_highp_dmat4x4 packed_dmat4x4
4 by 4 matrix tightly packed in memory of double-precision floating-point numbers.
+
vec< 3, double, aligned_highp > aligned_highp_dvec3
3 components vector aligned in memory of double-precision floating-point numbers using high precision...
+
aligned_highp_vec3 aligned_vec3
3 components vector aligned in memory of single-precision floating-point numbers. ...
+
vec< 4, float, packed_mediump > packed_mediump_vec4
4 components vector tightly packed in memory of single-precision floating-point numbers using medium ...
+
vec< 1, float, packed_mediump > packed_mediump_vec1
1 component vector tightly packed in memory of single-precision floating-point numbers using medium p...
+
aligned_highp_ivec2 aligned_ivec2
2 components vector aligned in memory of signed integer numbers.
+
Definition: common.hpp:20
+
packed_highp_mat3x2 packed_mat3x2
3 by 2 matrix tightly packed in memory of single-precision floating-point numbers.
+
mat< 4, 4, float, aligned_highp > aligned_highp_mat4x4
4 by 4 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
vec< 1, bool, packed_mediump > packed_mediump_bvec1
1 component vector tightly packed in memory of bool values.
+
vec< 3, float, packed_highp > packed_highp_vec3
3 components vector tightly packed in memory of single-precision floating-point numbers using high pr...
+
vec< 4, uint, aligned_highp > aligned_highp_uvec4
4 components vector aligned in memory of unsigned integer numbers.
+
packed_highp_dvec3 packed_dvec3
3 components vector tightly packed in memory of double-precision floating-point numbers.
+
aligned_highp_mat4x2 aligned_mat4x2
4 by 2 matrix tightly aligned in memory of single-precision floating-point numbers.
+
mat< 2, 2, double, aligned_mediump > aligned_mediump_dmat2
2 by 2 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
packed_highp_bvec2 packed_bvec2
2 components vector tightly packed in memory of bool values.
+
mat< 4, 4, float, packed_highp > packed_highp_mat4
4 by 4 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
mat< 3, 4, double, aligned_lowp > aligned_lowp_dmat3x4
3 by 4 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
mat< 3, 3, float, aligned_mediump > aligned_mediump_mat3
3 by 3 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
vec< 4, float, aligned_highp > aligned_highp_vec4
4 components vector aligned in memory of single-precision floating-point numbers using high precision...
+
aligned_highp_ivec1 aligned_ivec1
1 component vector aligned in memory of signed integer numbers.
+
mat< 2, 2, float, packed_lowp > packed_lowp_mat2x2
2 by 2 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
mat< 2, 2, float, aligned_lowp > aligned_lowp_mat2
2 by 2 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
mat< 2, 2, float, aligned_lowp > aligned_lowp_mat2x2
2 by 2 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
vec< 3, bool, aligned_highp > aligned_highp_bvec3
3 components vector aligned in memory of bool values.
+
mat< 3, 3, double, aligned_highp > aligned_highp_dmat3x3
3 by 3 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
aligned_highp_dmat3 aligned_dmat3
3 by 3 matrix tightly aligned in memory of double-precision floating-point numbers.
+
mat< 2, 3, double, aligned_highp > aligned_highp_dmat2x3
2 by 3 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
mat< 3, 4, float, aligned_lowp > aligned_lowp_mat3x4
3 by 4 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
vec< 3, int, packed_highp > packed_highp_ivec3
3 components vector tightly packed in memory of signed integer numbers.
+
mat< 3, 2, float, aligned_lowp > aligned_lowp_mat3x2
3 by 2 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
mat< 4, 3, float, packed_mediump > packed_mediump_mat4x3
4 by 3 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
packed_highp_dmat2 packed_dmat2
2 by 2 matrix tightly packed in memory of double-precision floating-point numbers.
+
vec< 3, double, aligned_lowp > aligned_lowp_dvec3
3 components vector aligned in memory of double-precision floating-point numbers using low precision ...
+
vec< 3, float, packed_mediump > packed_mediump_vec3
3 components vector tightly packed in memory of single-precision floating-point numbers using medium ...
+
aligned_highp_dmat4x4 aligned_dmat4x4
4 by 4 matrix tightly aligned in memory of double-precision floating-point numbers.
+
mat< 3, 3, double, packed_highp > packed_highp_dmat3
3 by 3 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
vec< 3, bool, packed_lowp > packed_lowp_bvec3
3 components vector tightly packed in memory of bool values.
+
vec< 3, double, packed_mediump > packed_mediump_dvec3
3 components vector tightly packed in memory of double-precision floating-point numbers using medium ...
+
vec< 3, uint, aligned_highp > aligned_highp_uvec3
3 components vector aligned in memory of unsigned integer numbers.
+
mat< 2, 2, double, aligned_highp > aligned_highp_dmat2x2
2 by 2 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
vec< 1, uint, aligned_mediump > aligned_mediump_uvec1
1 component vector aligned in memory of unsigned integer numbers.
+
mat< 3, 3, float, aligned_highp > aligned_highp_mat3
3 by 3 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
mat< 4, 4, float, packed_mediump > packed_mediump_mat4
4 by 4 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
packed_highp_mat3x4 packed_mat3x4
3 by 4 matrix tightly packed in memory of single-precision floating-point numbers.
+
mat< 4, 3, double, aligned_mediump > aligned_mediump_dmat4x3
4 by 3 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
vec< 4, uint, aligned_mediump > aligned_mediump_uvec4
4 components vector aligned in memory of unsigned integer numbers.
+
mat< 3, 4, float, aligned_highp > aligned_highp_mat3x4
3 by 4 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
aligned_highp_mat3x4 aligned_mat3x4
3 by 4 matrix tightly aligned in memory of single-precision floating-point numbers.
+
mat< 3, 3, float, packed_highp > packed_highp_mat3
3 by 3 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
+ + + + diff --git a/common/glm/doc/api/a01383.html b/common/glm/doc/api/a01383.html new file mode 100644 index 000000000..9bc23f13d --- /dev/null +++ b/common/glm/doc/api/a01383.html @@ -0,0 +1,87 @@ + + + + + + + +0.9.9 API documenation: type_aligned.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtc/type_aligned.hpp File Reference
+
+
+ +

Go to the source code of this file.

+

Detailed Description

+
See also
Core features (dependence)
+ +

Definition in file gtc/type_aligned.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01383_source.html b/common/glm/doc/api/a01383_source.html new file mode 100644 index 000000000..f5553600f --- /dev/null +++ b/common/glm/doc/api/a01383_source.html @@ -0,0 +1,434 @@ + + + + + + + +0.9.9 API documenation: type_aligned.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtc/type_aligned.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 #if !GLM_CONFIG_ANONYMOUS_STRUCT
16 # error "GLM: Aligned gentypes require to enable C++ language extensions."
17 #endif
18 
19 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
20 # pragma message("GLM: GLM_GTC_type_aligned extension included")
21 #endif
22 
23 #include "../mat4x4.hpp"
24 #include "../mat4x3.hpp"
25 #include "../mat4x2.hpp"
26 #include "../mat3x4.hpp"
27 #include "../mat3x3.hpp"
28 #include "../mat3x2.hpp"
29 #include "../mat2x4.hpp"
30 #include "../mat2x3.hpp"
31 #include "../mat2x2.hpp"
32 #include "../gtc/vec1.hpp"
33 #include "../vec2.hpp"
34 #include "../vec3.hpp"
35 #include "../vec4.hpp"
36 
37 namespace glm
38 {
41 
42  // -- *vec1 --
43 
45  typedef vec<1, float, aligned_highp> aligned_highp_vec1;
46 
48  typedef vec<1, float, aligned_mediump> aligned_mediump_vec1;
49 
51  typedef vec<1, float, aligned_lowp> aligned_lowp_vec1;
52 
54  typedef vec<1, double, aligned_highp> aligned_highp_dvec1;
55 
57  typedef vec<1, double, aligned_mediump> aligned_mediump_dvec1;
58 
60  typedef vec<1, double, aligned_lowp> aligned_lowp_dvec1;
61 
63  typedef vec<1, int, aligned_highp> aligned_highp_ivec1;
64 
66  typedef vec<1, int, aligned_mediump> aligned_mediump_ivec1;
67 
69  typedef vec<1, int, aligned_lowp> aligned_lowp_ivec1;
70 
72  typedef vec<1, uint, aligned_highp> aligned_highp_uvec1;
73 
75  typedef vec<1, uint, aligned_mediump> aligned_mediump_uvec1;
76 
78  typedef vec<1, uint, aligned_lowp> aligned_lowp_uvec1;
79 
81  typedef vec<1, bool, aligned_highp> aligned_highp_bvec1;
82 
84  typedef vec<1, bool, aligned_mediump> aligned_mediump_bvec1;
85 
87  typedef vec<1, bool, aligned_lowp> aligned_lowp_bvec1;
88 
90  typedef vec<1, float, packed_highp> packed_highp_vec1;
91 
93  typedef vec<1, float, packed_mediump> packed_mediump_vec1;
94 
96  typedef vec<1, float, packed_lowp> packed_lowp_vec1;
97 
99  typedef vec<1, double, packed_highp> packed_highp_dvec1;
100 
102  typedef vec<1, double, packed_mediump> packed_mediump_dvec1;
103 
105  typedef vec<1, double, packed_lowp> packed_lowp_dvec1;
106 
108  typedef vec<1, int, packed_highp> packed_highp_ivec1;
109 
111  typedef vec<1, int, packed_mediump> packed_mediump_ivec1;
112 
114  typedef vec<1, int, packed_lowp> packed_lowp_ivec1;
115 
117  typedef vec<1, uint, packed_highp> packed_highp_uvec1;
118 
120  typedef vec<1, uint, packed_mediump> packed_mediump_uvec1;
121 
123  typedef vec<1, uint, packed_lowp> packed_lowp_uvec1;
124 
126  typedef vec<1, bool, packed_highp> packed_highp_bvec1;
127 
129  typedef vec<1, bool, packed_mediump> packed_mediump_bvec1;
130 
132  typedef vec<1, bool, packed_lowp> packed_lowp_bvec1;
133 
134  // -- *vec2 --
135 
137  typedef vec<2, float, aligned_highp> aligned_highp_vec2;
138 
140  typedef vec<2, float, aligned_mediump> aligned_mediump_vec2;
141 
143  typedef vec<2, float, aligned_lowp> aligned_lowp_vec2;
144 
146  typedef vec<2, double, aligned_highp> aligned_highp_dvec2;
147 
149  typedef vec<2, double, aligned_mediump> aligned_mediump_dvec2;
150 
152  typedef vec<2, double, aligned_lowp> aligned_lowp_dvec2;
153 
155  typedef vec<2, int, aligned_highp> aligned_highp_ivec2;
156 
158  typedef vec<2, int, aligned_mediump> aligned_mediump_ivec2;
159 
161  typedef vec<2, int, aligned_lowp> aligned_lowp_ivec2;
162 
164  typedef vec<2, uint, aligned_highp> aligned_highp_uvec2;
165 
167  typedef vec<2, uint, aligned_mediump> aligned_mediump_uvec2;
168 
170  typedef vec<2, uint, aligned_lowp> aligned_lowp_uvec2;
171 
173  typedef vec<2, bool, aligned_highp> aligned_highp_bvec2;
174 
176  typedef vec<2, bool, aligned_mediump> aligned_mediump_bvec2;
177 
179  typedef vec<2, bool, aligned_lowp> aligned_lowp_bvec2;
180 
182  typedef vec<2, float, packed_highp> packed_highp_vec2;
183 
185  typedef vec<2, float, packed_mediump> packed_mediump_vec2;
186 
188  typedef vec<2, float, packed_lowp> packed_lowp_vec2;
189 
191  typedef vec<2, double, packed_highp> packed_highp_dvec2;
192 
194  typedef vec<2, double, packed_mediump> packed_mediump_dvec2;
195 
197  typedef vec<2, double, packed_lowp> packed_lowp_dvec2;
198 
200  typedef vec<2, int, packed_highp> packed_highp_ivec2;
201 
203  typedef vec<2, int, packed_mediump> packed_mediump_ivec2;
204 
206  typedef vec<2, int, packed_lowp> packed_lowp_ivec2;
207 
209  typedef vec<2, uint, packed_highp> packed_highp_uvec2;
210 
212  typedef vec<2, uint, packed_mediump> packed_mediump_uvec2;
213 
215  typedef vec<2, uint, packed_lowp> packed_lowp_uvec2;
216 
218  typedef vec<2, bool, packed_highp> packed_highp_bvec2;
219 
221  typedef vec<2, bool, packed_mediump> packed_mediump_bvec2;
222 
224  typedef vec<2, bool, packed_lowp> packed_lowp_bvec2;
225 
226  // -- *vec3 --
227 
229  typedef vec<3, float, aligned_highp> aligned_highp_vec3;
230 
232  typedef vec<3, float, aligned_mediump> aligned_mediump_vec3;
233 
235  typedef vec<3, float, aligned_lowp> aligned_lowp_vec3;
236 
238  typedef vec<3, double, aligned_highp> aligned_highp_dvec3;
239 
241  typedef vec<3, double, aligned_mediump> aligned_mediump_dvec3;
242 
244  typedef vec<3, double, aligned_lowp> aligned_lowp_dvec3;
245 
247  typedef vec<3, int, aligned_highp> aligned_highp_ivec3;
248 
250  typedef vec<3, int, aligned_mediump> aligned_mediump_ivec3;
251 
253  typedef vec<3, int, aligned_lowp> aligned_lowp_ivec3;
254 
256  typedef vec<3, uint, aligned_highp> aligned_highp_uvec3;
257 
259  typedef vec<3, uint, aligned_mediump> aligned_mediump_uvec3;
260 
262  typedef vec<3, uint, aligned_lowp> aligned_lowp_uvec3;
263 
265  typedef vec<3, bool, aligned_highp> aligned_highp_bvec3;
266 
268  typedef vec<3, bool, aligned_mediump> aligned_mediump_bvec3;
269 
271  typedef vec<3, bool, aligned_lowp> aligned_lowp_bvec3;
272 
274  typedef vec<3, float, packed_highp> packed_highp_vec3;
275 
277  typedef vec<3, float, packed_mediump> packed_mediump_vec3;
278 
280  typedef vec<3, float, packed_lowp> packed_lowp_vec3;
281 
283  typedef vec<3, double, packed_highp> packed_highp_dvec3;
284 
286  typedef vec<3, double, packed_mediump> packed_mediump_dvec3;
287 
289  typedef vec<3, double, packed_lowp> packed_lowp_dvec3;
290 
292  typedef vec<3, int, packed_highp> packed_highp_ivec3;
293 
295  typedef vec<3, int, packed_mediump> packed_mediump_ivec3;
296 
298  typedef vec<3, int, packed_lowp> packed_lowp_ivec3;
299 
301  typedef vec<3, uint, packed_highp> packed_highp_uvec3;
302 
304  typedef vec<3, uint, packed_mediump> packed_mediump_uvec3;
305 
307  typedef vec<3, uint, packed_lowp> packed_lowp_uvec3;
308 
310  typedef vec<3, bool, packed_highp> packed_highp_bvec3;
311 
313  typedef vec<3, bool, packed_mediump> packed_mediump_bvec3;
314 
316  typedef vec<3, bool, packed_lowp> packed_lowp_bvec3;
317 
318  // -- *vec4 --
319 
321  typedef vec<4, float, aligned_highp> aligned_highp_vec4;
322 
324  typedef vec<4, float, aligned_mediump> aligned_mediump_vec4;
325 
327  typedef vec<4, float, aligned_lowp> aligned_lowp_vec4;
328 
330  typedef vec<4, double, aligned_highp> aligned_highp_dvec4;
331 
333  typedef vec<4, double, aligned_mediump> aligned_mediump_dvec4;
334 
336  typedef vec<4, double, aligned_lowp> aligned_lowp_dvec4;
337 
339  typedef vec<4, int, aligned_highp> aligned_highp_ivec4;
340 
342  typedef vec<4, int, aligned_mediump> aligned_mediump_ivec4;
343 
345  typedef vec<4, int, aligned_lowp> aligned_lowp_ivec4;
346 
348  typedef vec<4, uint, aligned_highp> aligned_highp_uvec4;
349 
351  typedef vec<4, uint, aligned_mediump> aligned_mediump_uvec4;
352 
354  typedef vec<4, uint, aligned_lowp> aligned_lowp_uvec4;
355 
357  typedef vec<4, bool, aligned_highp> aligned_highp_bvec4;
358 
360  typedef vec<4, bool, aligned_mediump> aligned_mediump_bvec4;
361 
363  typedef vec<4, bool, aligned_lowp> aligned_lowp_bvec4;
364 
366  typedef vec<4, float, packed_highp> packed_highp_vec4;
367 
369  typedef vec<4, float, packed_mediump> packed_mediump_vec4;
370 
372  typedef vec<4, float, packed_lowp> packed_lowp_vec4;
373 
375  typedef vec<4, double, packed_highp> packed_highp_dvec4;
376 
378  typedef vec<4, double, packed_mediump> packed_mediump_dvec4;
379 
381  typedef vec<4, double, packed_lowp> packed_lowp_dvec4;
382 
384  typedef vec<4, int, packed_highp> packed_highp_ivec4;
385 
387  typedef vec<4, int, packed_mediump> packed_mediump_ivec4;
388 
390  typedef vec<4, int, packed_lowp> packed_lowp_ivec4;
391 
393  typedef vec<4, uint, packed_highp> packed_highp_uvec4;
394 
396  typedef vec<4, uint, packed_mediump> packed_mediump_uvec4;
397 
399  typedef vec<4, uint, packed_lowp> packed_lowp_uvec4;
400 
402  typedef vec<4, bool, packed_highp> packed_highp_bvec4;
403 
405  typedef vec<4, bool, packed_mediump> packed_mediump_bvec4;
406 
408  typedef vec<4, bool, packed_lowp> packed_lowp_bvec4;
409 
410  // -- *mat2 --
411 
413  typedef mat<2, 2, float, aligned_highp> aligned_highp_mat2;
414 
416  typedef mat<2, 2, float, aligned_mediump> aligned_mediump_mat2;
417 
419  typedef mat<2, 2, float, aligned_lowp> aligned_lowp_mat2;
420 
422  typedef mat<2, 2, double, aligned_highp> aligned_highp_dmat2;
423 
425  typedef mat<2, 2, double, aligned_mediump> aligned_mediump_dmat2;
426 
428  typedef mat<2, 2, double, aligned_lowp> aligned_lowp_dmat2;
429 
431  typedef mat<2, 2, float, packed_highp> packed_highp_mat2;
432 
434  typedef mat<2, 2, float, packed_mediump> packed_mediump_mat2;
435 
437  typedef mat<2, 2, float, packed_lowp> packed_lowp_mat2;
438 
440  typedef mat<2, 2, double, packed_highp> packed_highp_dmat2;
441 
443  typedef mat<2, 2, double, packed_mediump> packed_mediump_dmat2;
444 
446  typedef mat<2, 2, double, packed_lowp> packed_lowp_dmat2;
447 
448  // -- *mat3 --
449 
451  typedef mat<3, 3, float, aligned_highp> aligned_highp_mat3;
452 
454  typedef mat<3, 3, float, aligned_mediump> aligned_mediump_mat3;
455 
457  typedef mat<3, 3, float, aligned_lowp> aligned_lowp_mat3;
458 
460  typedef mat<3, 3, double, aligned_highp> aligned_highp_dmat3;
461 
463  typedef mat<3, 3, double, aligned_mediump> aligned_mediump_dmat3;
464 
466  typedef mat<3, 3, double, aligned_lowp> aligned_lowp_dmat3;
467 
469  typedef mat<3, 3, float, packed_highp> packed_highp_mat3;
470 
472  typedef mat<3, 3, float, packed_mediump> packed_mediump_mat3;
473 
475  typedef mat<3, 3, float, packed_lowp> packed_lowp_mat3;
476 
478  typedef mat<3, 3, double, packed_highp> packed_highp_dmat3;
479 
481  typedef mat<3, 3, double, packed_mediump> packed_mediump_dmat3;
482 
484  typedef mat<3, 3, double, packed_lowp> packed_lowp_dmat3;
485 
486  // -- *mat4 --
487 
489  typedef mat<4, 4, float, aligned_highp> aligned_highp_mat4;
490 
492  typedef mat<4, 4, float, aligned_mediump> aligned_mediump_mat4;
493 
495  typedef mat<4, 4, float, aligned_lowp> aligned_lowp_mat4;
496 
498  typedef mat<4, 4, double, aligned_highp> aligned_highp_dmat4;
499 
501  typedef mat<4, 4, double, aligned_mediump> aligned_mediump_dmat4;
502 
504  typedef mat<4, 4, double, aligned_lowp> aligned_lowp_dmat4;
505 
507  typedef mat<4, 4, float, packed_highp> packed_highp_mat4;
508 
510  typedef mat<4, 4, float, packed_mediump> packed_mediump_mat4;
511 
513  typedef mat<4, 4, float, packed_lowp> packed_lowp_mat4;
514 
516  typedef mat<4, 4, double, packed_highp> packed_highp_dmat4;
517 
519  typedef mat<4, 4, double, packed_mediump> packed_mediump_dmat4;
520 
522  typedef mat<4, 4, double, packed_lowp> packed_lowp_dmat4;
523 
524  // -- *mat2x2 --
525 
527  typedef mat<2, 2, float, aligned_highp> aligned_highp_mat2x2;
528 
530  typedef mat<2, 2, float, aligned_mediump> aligned_mediump_mat2x2;
531 
533  typedef mat<2, 2, float, aligned_lowp> aligned_lowp_mat2x2;
534 
536  typedef mat<2, 2, double, aligned_highp> aligned_highp_dmat2x2;
537 
539  typedef mat<2, 2, double, aligned_mediump> aligned_mediump_dmat2x2;
540 
542  typedef mat<2, 2, double, aligned_lowp> aligned_lowp_dmat2x2;
543 
545  typedef mat<2, 2, float, packed_highp> packed_highp_mat2x2;
546 
548  typedef mat<2, 2, float, packed_mediump> packed_mediump_mat2x2;
549 
551  typedef mat<2, 2, float, packed_lowp> packed_lowp_mat2x2;
552 
554  typedef mat<2, 2, double, packed_highp> packed_highp_dmat2x2;
555 
557  typedef mat<2, 2, double, packed_mediump> packed_mediump_dmat2x2;
558 
560  typedef mat<2, 2, double, packed_lowp> packed_lowp_dmat2x2;
561 
562  // -- *mat2x3 --
563 
565  typedef mat<2, 3, float, aligned_highp> aligned_highp_mat2x3;
566 
568  typedef mat<2, 3, float, aligned_mediump> aligned_mediump_mat2x3;
569 
571  typedef mat<2, 3, float, aligned_lowp> aligned_lowp_mat2x3;
572 
574  typedef mat<2, 3, double, aligned_highp> aligned_highp_dmat2x3;
575 
577  typedef mat<2, 3, double, aligned_mediump> aligned_mediump_dmat2x3;
578 
580  typedef mat<2, 3, double, aligned_lowp> aligned_lowp_dmat2x3;
581 
583  typedef mat<2, 3, float, packed_highp> packed_highp_mat2x3;
584 
586  typedef mat<2, 3, float, packed_mediump> packed_mediump_mat2x3;
587 
589  typedef mat<2, 3, float, packed_lowp> packed_lowp_mat2x3;
590 
592  typedef mat<2, 3, double, packed_highp> packed_highp_dmat2x3;
593 
595  typedef mat<2, 3, double, packed_mediump> packed_mediump_dmat2x3;
596 
598  typedef mat<2, 3, double, packed_lowp> packed_lowp_dmat2x3;
599 
600  // -- *mat2x4 --
601 
603  typedef mat<2, 4, float, aligned_highp> aligned_highp_mat2x4;
604 
606  typedef mat<2, 4, float, aligned_mediump> aligned_mediump_mat2x4;
607 
609  typedef mat<2, 4, float, aligned_lowp> aligned_lowp_mat2x4;
610 
612  typedef mat<2, 4, double, aligned_highp> aligned_highp_dmat2x4;
613 
615  typedef mat<2, 4, double, aligned_mediump> aligned_mediump_dmat2x4;
616 
618  typedef mat<2, 4, double, aligned_lowp> aligned_lowp_dmat2x4;
619 
621  typedef mat<2, 4, float, packed_highp> packed_highp_mat2x4;
622 
624  typedef mat<2, 4, float, packed_mediump> packed_mediump_mat2x4;
625 
627  typedef mat<2, 4, float, packed_lowp> packed_lowp_mat2x4;
628 
630  typedef mat<2, 4, double, packed_highp> packed_highp_dmat2x4;
631 
633  typedef mat<2, 4, double, packed_mediump> packed_mediump_dmat2x4;
634 
636  typedef mat<2, 4, double, packed_lowp> packed_lowp_dmat2x4;
637 
638  // -- *mat3x2 --
639 
641  typedef mat<3, 2, float, aligned_highp> aligned_highp_mat3x2;
642 
644  typedef mat<3, 2, float, aligned_mediump> aligned_mediump_mat3x2;
645 
647  typedef mat<3, 2, float, aligned_lowp> aligned_lowp_mat3x2;
648 
650  typedef mat<3, 2, double, aligned_highp> aligned_highp_dmat3x2;
651 
653  typedef mat<3, 2, double, aligned_mediump> aligned_mediump_dmat3x2;
654 
656  typedef mat<3, 2, double, aligned_lowp> aligned_lowp_dmat3x2;
657 
659  typedef mat<3, 2, float, packed_highp> packed_highp_mat3x2;
660 
662  typedef mat<3, 2, float, packed_mediump> packed_mediump_mat3x2;
663 
665  typedef mat<3, 2, float, packed_lowp> packed_lowp_mat3x2;
666 
668  typedef mat<3, 2, double, packed_highp> packed_highp_dmat3x2;
669 
671  typedef mat<3, 2, double, packed_mediump> packed_mediump_dmat3x2;
672 
674  typedef mat<3, 2, double, packed_lowp> packed_lowp_dmat3x2;
675 
676  // -- *mat3x3 --
677 
679  typedef mat<3, 3, float, aligned_highp> aligned_highp_mat3x3;
680 
682  typedef mat<3, 3, float, aligned_mediump> aligned_mediump_mat3x3;
683 
685  typedef mat<3, 3, float, aligned_lowp> aligned_lowp_mat3x3;
686 
688  typedef mat<3, 3, double, aligned_highp> aligned_highp_dmat3x3;
689 
691  typedef mat<3, 3, double, aligned_mediump> aligned_mediump_dmat3x3;
692 
694  typedef mat<3, 3, double, aligned_lowp> aligned_lowp_dmat3x3;
695 
697  typedef mat<3, 3, float, packed_highp> packed_highp_mat3x3;
698 
700  typedef mat<3, 3, float, packed_mediump> packed_mediump_mat3x3;
701 
703  typedef mat<3, 3, float, packed_lowp> packed_lowp_mat3x3;
704 
706  typedef mat<3, 3, double, packed_highp> packed_highp_dmat3x3;
707 
709  typedef mat<3, 3, double, packed_mediump> packed_mediump_dmat3x3;
710 
712  typedef mat<3, 3, double, packed_lowp> packed_lowp_dmat3x3;
713 
714  // -- *mat3x4 --
715 
717  typedef mat<3, 4, float, aligned_highp> aligned_highp_mat3x4;
718 
720  typedef mat<3, 4, float, aligned_mediump> aligned_mediump_mat3x4;
721 
723  typedef mat<3, 4, float, aligned_lowp> aligned_lowp_mat3x4;
724 
726  typedef mat<3, 4, double, aligned_highp> aligned_highp_dmat3x4;
727 
729  typedef mat<3, 4, double, aligned_mediump> aligned_mediump_dmat3x4;
730 
732  typedef mat<3, 4, double, aligned_lowp> aligned_lowp_dmat3x4;
733 
735  typedef mat<3, 4, float, packed_highp> packed_highp_mat3x4;
736 
738  typedef mat<3, 4, float, packed_mediump> packed_mediump_mat3x4;
739 
741  typedef mat<3, 4, float, packed_lowp> packed_lowp_mat3x4;
742 
744  typedef mat<3, 4, double, packed_highp> packed_highp_dmat3x4;
745 
747  typedef mat<3, 4, double, packed_mediump> packed_mediump_dmat3x4;
748 
750  typedef mat<3, 4, double, packed_lowp> packed_lowp_dmat3x4;
751 
752  // -- *mat4x2 --
753 
755  typedef mat<4, 2, float, aligned_highp> aligned_highp_mat4x2;
756 
758  typedef mat<4, 2, float, aligned_mediump> aligned_mediump_mat4x2;
759 
761  typedef mat<4, 2, float, aligned_lowp> aligned_lowp_mat4x2;
762 
764  typedef mat<4, 2, double, aligned_highp> aligned_highp_dmat4x2;
765 
767  typedef mat<4, 2, double, aligned_mediump> aligned_mediump_dmat4x2;
768 
770  typedef mat<4, 2, double, aligned_lowp> aligned_lowp_dmat4x2;
771 
773  typedef mat<4, 2, float, packed_highp> packed_highp_mat4x2;
774 
776  typedef mat<4, 2, float, packed_mediump> packed_mediump_mat4x2;
777 
779  typedef mat<4, 2, float, packed_lowp> packed_lowp_mat4x2;
780 
782  typedef mat<4, 2, double, packed_highp> packed_highp_dmat4x2;
783 
785  typedef mat<4, 2, double, packed_mediump> packed_mediump_dmat4x2;
786 
788  typedef mat<4, 2, double, packed_lowp> packed_lowp_dmat4x2;
789 
790  // -- *mat4x3 --
791 
793  typedef mat<4, 3, float, aligned_highp> aligned_highp_mat4x3;
794 
796  typedef mat<4, 3, float, aligned_mediump> aligned_mediump_mat4x3;
797 
799  typedef mat<4, 3, float, aligned_lowp> aligned_lowp_mat4x3;
800 
802  typedef mat<4, 3, double, aligned_highp> aligned_highp_dmat4x3;
803 
805  typedef mat<4, 3, double, aligned_mediump> aligned_mediump_dmat4x3;
806 
808  typedef mat<4, 3, double, aligned_lowp> aligned_lowp_dmat4x3;
809 
811  typedef mat<4, 3, float, packed_highp> packed_highp_mat4x3;
812 
814  typedef mat<4, 3, float, packed_mediump> packed_mediump_mat4x3;
815 
817  typedef mat<4, 3, float, packed_lowp> packed_lowp_mat4x3;
818 
820  typedef mat<4, 3, double, packed_highp> packed_highp_dmat4x3;
821 
823  typedef mat<4, 3, double, packed_mediump> packed_mediump_dmat4x3;
824 
826  typedef mat<4, 3, double, packed_lowp> packed_lowp_dmat4x3;
827 
828  // -- *mat4x4 --
829 
831  typedef mat<4, 4, float, aligned_highp> aligned_highp_mat4x4;
832 
834  typedef mat<4, 4, float, aligned_mediump> aligned_mediump_mat4x4;
835 
837  typedef mat<4, 4, float, aligned_lowp> aligned_lowp_mat4x4;
838 
840  typedef mat<4, 4, double, aligned_highp> aligned_highp_dmat4x4;
841 
843  typedef mat<4, 4, double, aligned_mediump> aligned_mediump_dmat4x4;
844 
846  typedef mat<4, 4, double, aligned_lowp> aligned_lowp_dmat4x4;
847 
849  typedef mat<4, 4, float, packed_highp> packed_highp_mat4x4;
850 
852  typedef mat<4, 4, float, packed_mediump> packed_mediump_mat4x4;
853 
855  typedef mat<4, 4, float, packed_lowp> packed_lowp_mat4x4;
856 
858  typedef mat<4, 4, double, packed_highp> packed_highp_dmat4x4;
859 
861  typedef mat<4, 4, double, packed_mediump> packed_mediump_dmat4x4;
862 
864  typedef mat<4, 4, double, packed_lowp> packed_lowp_dmat4x4;
865 
866  // -- default --
867 
868 #if(defined(GLM_PRECISION_LOWP_FLOAT))
877 
884 
903 #elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))
912 
919 
938 #else //defined(GLM_PRECISION_HIGHP_FLOAT)
941 
944 
947 
950 
953 
956 
959 
962 
965 
968 
971 
974 
977 
980 
983 
986 
989 
992 
995 
998 
1001 
1004 
1007 
1010 
1013 
1016 
1019 
1022 
1025 
1028 
1031 
1034 #endif//GLM_PRECISION
1035 
1036 #if(defined(GLM_PRECISION_LOWP_DOUBLE))
1045 
1052 
1071 #elif(defined(GLM_PRECISION_MEDIUMP_DOUBLE))
1080 
1087 
1106 #else //defined(GLM_PRECISION_HIGHP_DOUBLE)
1109 
1112 
1115 
1118 
1121 
1124 
1127 
1130 
1133 
1136 
1139 
1142 
1145 
1148 
1151 
1154 
1157 
1160 
1163 
1166 
1169 
1172 
1175 
1178 
1181 
1184 
1187 
1190 
1193 
1196 
1199 
1202 #endif//GLM_PRECISION
1203 
1204 #if(defined(GLM_PRECISION_LOWP_INT))
1209 #elif(defined(GLM_PRECISION_MEDIUMP_INT))
1214 #else //defined(GLM_PRECISION_HIGHP_INT)
1217 
1220 
1223 
1226 
1229 
1232 
1235 
1238 #endif//GLM_PRECISION
1239 
1240  // -- Unsigned integer definition --
1241 
1242 #if(defined(GLM_PRECISION_LOWP_UINT))
1247 #elif(defined(GLM_PRECISION_MEDIUMP_UINT))
1252 #else //defined(GLM_PRECISION_HIGHP_UINT)
1255 
1258 
1261 
1264 
1267 
1270 
1273 
1276 #endif//GLM_PRECISION
1277 
1278 #if(defined(GLM_PRECISION_LOWP_BOOL))
1283 #elif(defined(GLM_PRECISION_MEDIUMP_BOOL))
1288 #else //defined(GLM_PRECISION_HIGHP_BOOL)
1291 
1294 
1297 
1300 
1303 
1306 
1309 
1312 #endif//GLM_PRECISION
1313 
1315 }//namespace glm
mat< 3, 2, double, packed_lowp > packed_lowp_dmat3x2
3 by 2 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
vec< 1, int, aligned_lowp > aligned_lowp_ivec1
1 component vector aligned in memory of signed integer numbers.
+
mat< 3, 2, float, packed_mediump > packed_mediump_mat3x2
3 by 2 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
aligned_highp_dmat4x2 aligned_dmat4x2
4 by 2 matrix tightly aligned in memory of double-precision floating-point numbers.
+
packed_highp_dmat4x2 packed_dmat4x2
4 by 2 matrix tightly packed in memory of double-precision floating-point numbers.
+
vec< 4, double, aligned_lowp > aligned_lowp_dvec4
4 components vector aligned in memory of double-precision floating-point numbers using low precision ...
+
mat< 3, 2, float, packed_lowp > packed_lowp_mat3x2
3 by 2 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
mat< 3, 4, float, packed_highp > packed_highp_mat3x4
3 by 4 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
vec< 1, uint, aligned_lowp > aligned_lowp_uvec1
1 component vector aligned in memory of unsigned integer numbers.
+
vec< 1, bool, aligned_highp > aligned_highp_bvec1
1 component vector aligned in memory of bool values.
+
vec< 1, float, aligned_lowp > aligned_lowp_vec1
1 component vector aligned in memory of single-precision floating-point numbers using low precision a...
+
packed_highp_bvec4 packed_bvec4
4 components vector tightly packed in memory of bool values.
+
aligned_highp_mat3 aligned_mat3
3 by 3 matrix tightly aligned in memory of single-precision floating-point numbers.
+
vec< 2, bool, aligned_lowp > aligned_lowp_bvec2
2 components vector aligned in memory of bool values.
+
packed_highp_mat2 packed_mat2
2 by 2 matrix tightly packed in memory of single-precision floating-point numbers.
+
mat< 4, 4, double, packed_mediump > packed_mediump_dmat4
4 by 4 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
packed_highp_dmat2x4 packed_dmat2x4
2 by 4 matrix tightly packed in memory of double-precision floating-point numbers.
+
packed_highp_mat4x3 packed_mat4x3
4 by 3 matrix tightly packed in memory of single-precision floating-point numbers.
+
mat< 2, 4, double, packed_lowp > packed_lowp_dmat2x4
2 by 4 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
mat< 4, 4, float, aligned_mediump > aligned_mediump_mat4x4
4 by 4 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
vec< 1, uint, packed_highp > packed_highp_uvec1
1 component vector tightly packed in memory of unsigned integer numbers.
+
mat< 3, 2, float, aligned_mediump > aligned_mediump_mat3x2
3 by 2 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
mat< 4, 2, float, aligned_mediump > aligned_mediump_mat4x2
4 by 2 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
mat< 3, 3, float, packed_mediump > packed_mediump_mat3x3
3 by 3 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
packed_highp_uvec3 packed_uvec3
3 components vector tightly packed in memory of unsigned integer numbers.
+
vec< 4, bool, packed_highp > packed_highp_bvec4
4 components vector tightly packed in memory of bool values.
+
vec< 2, float, packed_lowp > packed_lowp_vec2
2 components vector tightly packed in memory of single-precision floating-point numbers using low pre...
+
mat< 3, 3, float, aligned_lowp > aligned_lowp_mat3x3
3 by 3 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
Definition: common.hpp:18
+
packed_highp_mat4 packed_mat4
4 by 4 matrix tightly packed in memory of single-precision floating-point numbers.
+
mat< 4, 4, double, packed_mediump > packed_mediump_dmat4x4
4 by 4 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
mat< 4, 2, double, aligned_lowp > aligned_lowp_dmat4x2
4 by 2 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
aligned_highp_bvec4 aligned_bvec4
4 components vector aligned in memory of bool values.
+
vec< 1, double, aligned_mediump > aligned_mediump_dvec1
1 component vector aligned in memory of double-precision floating-point numbers using medium precisio...
+
mat< 4, 4, double, packed_highp > packed_highp_dmat4
4 by 4 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
aligned_highp_dmat3x4 aligned_dmat3x4
3 by 4 matrix tightly aligned in memory of double-precision floating-point numbers.
+
vec< 4, bool, packed_lowp > packed_lowp_bvec4
4 components vector tightly packed in memory of bool values.
+
aligned_highp_bvec2 aligned_bvec2
2 components vector aligned in memory of bool values.
+
aligned_highp_mat2x4 aligned_mat2x4
2 by 4 matrix tightly aligned in memory of single-precision floating-point numbers.
+
packed_highp_vec1 packed_vec1
1 component vector tightly packed in memory of single-precision floating-point numbers.
+
packed_highp_dmat3x3 packed_dmat3x3
3 by 3 matrix tightly packed in memory of double-precision floating-point numbers.
+
mat< 4, 3, double, aligned_highp > aligned_highp_dmat4x3
4 by 3 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
mat< 3, 4, double, packed_highp > packed_highp_dmat3x4
3 by 4 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
aligned_highp_dmat2x2 aligned_dmat2x2
2 by 2 matrix tightly aligned in memory of double-precision floating-point numbers.
+
vec< 1, int, packed_highp > packed_highp_ivec1
1 component vector tightly packed in memory of signed integer numbers.
+
vec< 2, float, aligned_highp > aligned_highp_vec2
2 components vector aligned in memory of single-precision floating-point numbers using high precision...
+
mat< 4, 4, float, aligned_lowp > aligned_lowp_mat4x4
4 by 4 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
vec< 4, double, packed_highp > packed_highp_dvec4
4 components vector tightly packed in memory of double-precision floating-point numbers using high pr...
+
vec< 1, float, packed_lowp > packed_lowp_vec1
1 component vector tightly packed in memory of single-precision floating-point numbers using low prec...
+
vec< 2, int, packed_highp > packed_highp_ivec2
2 components vector tightly packed in memory of signed integer numbers.
+
mat< 3, 2, float, packed_highp > packed_highp_mat3x2
3 by 2 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
vec< 3, float, aligned_lowp > aligned_lowp_vec3
3 components vector aligned in memory of single-precision floating-point numbers using low precision ...
+
aligned_highp_dmat4x3 aligned_dmat4x3
4 by 3 matrix tightly aligned in memory of double-precision floating-point numbers.
+
mat< 3, 3, double, packed_mediump > packed_mediump_dmat3x3
3 by 3 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
vec< 2, double, packed_highp > packed_highp_dvec2
2 components vector tightly packed in memory of double-precision floating-point numbers using high pr...
+
vec< 3, int, packed_lowp > packed_lowp_ivec3
3 components vector tightly packed in memory of signed integer numbers.
+
mat< 2, 3, double, packed_highp > packed_highp_dmat2x3
2 by 3 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
packed_highp_dmat2x3 packed_dmat2x3
2 by 3 matrix tightly packed in memory of double-precision floating-point numbers.
+
vec< 2, bool, packed_mediump > packed_mediump_bvec2
2 components vector tightly packed in memory of bool values.
+
vec< 4, float, aligned_lowp > aligned_lowp_vec4
4 components vector aligned in memory of single-precision floating-point numbers using low precision ...
+
mat< 3, 3, double, packed_lowp > packed_lowp_dmat3
3 by 3 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
packed_highp_vec2 packed_vec2
2 components vector tightly packed in memory of single-precision floating-point numbers.
+
vec< 4, int, aligned_lowp > aligned_lowp_ivec4
4 components vector aligned in memory of signed integer numbers.
+
aligned_highp_vec2 aligned_vec2
2 components vector aligned in memory of single-precision floating-point numbers. ...
+
packed_highp_uvec2 packed_uvec2
2 components vector tightly packed in memory of unsigned integer numbers.
+
vec< 1, float, aligned_highp > aligned_highp_vec1
1 component vector aligned in memory of single-precision floating-point numbers using high precision ...
+
mat< 4, 2, double, aligned_mediump > aligned_mediump_dmat4x2
4 by 2 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
aligned_highp_mat4x4 aligned_mat4x4
4 by 4 matrix tightly aligned in memory of single-precision floating-point numbers.
+
mat< 4, 4, double, packed_highp > packed_highp_dmat4x4
4 by 4 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
mat< 2, 3, double, aligned_lowp > aligned_lowp_dmat2x3
2 by 3 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
mat< 2, 3, float, packed_mediump > packed_mediump_mat2x3
2 by 3 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
mat< 2, 4, float, packed_lowp > packed_lowp_mat2x4
2 by 4 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
vec< 3, int, aligned_mediump > aligned_mediump_ivec3
3 components vector aligned in memory of signed integer numbers.
+
vec< 2, uint, aligned_lowp > aligned_lowp_uvec2
2 components vector aligned in memory of unsigned integer numbers.
+
aligned_highp_mat2x2 aligned_mat2x2
2 by 2 matrix tightly aligned in memory of single-precision floating-point numbers.
+
vec< 4, bool, aligned_mediump > aligned_mediump_bvec4
4 components vector aligned in memory of bool values.
+
vec< 2, bool, packed_highp > packed_highp_bvec2
2 components vector tightly packed in memory of bool values.
+
vec< 4, int, aligned_highp > aligned_highp_ivec4
4 components vector aligned in memory of signed integer numbers.
+
mat< 2, 2, float, aligned_highp > aligned_highp_mat2
2 by 2 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
packed_highp_dvec4 packed_dvec4
4 components vector tightly packed in memory of double-precision floating-point numbers.
+
vec< 3, uint, packed_mediump > packed_mediump_uvec3
3 components vector tightly packed in memory of unsigned integer numbers.
+
vec< 2, double, aligned_lowp > aligned_lowp_dvec2
2 components vector aligned in memory of double-precision floating-point numbers using low precision ...
+
packed_highp_dmat4 packed_dmat4
4 by 4 matrix tightly packed in memory of double-precision floating-point numbers.
+
mat< 2, 4, double, aligned_highp > aligned_highp_dmat2x4
2 by 4 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
vec< 2, bool, packed_lowp > packed_lowp_bvec2
2 components vector tightly packed in memory of bool values.
+
aligned_highp_mat4 aligned_mat4
4 by 4 matrix tightly aligned in memory of single-precision floating-point numbers.
+
vec< 1, uint, aligned_highp > aligned_highp_uvec1
1 component vector aligned in memory of unsigned integer numbers.
+
vec< 2, int, aligned_mediump > aligned_mediump_ivec2
2 components vector aligned in memory of signed integer numbers.
+
mat< 3, 4, double, aligned_mediump > aligned_mediump_dmat3x4
3 by 4 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
vec< 2, float, aligned_lowp > aligned_lowp_vec2
2 components vector aligned in memory of single-precision floating-point numbers using low precision ...
+
mat< 2, 2, double, packed_highp > packed_highp_dmat2
2 by 2 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
mat< 2, 2, double, aligned_mediump > aligned_mediump_dmat2x2
2 by 2 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
vec< 3, double, aligned_mediump > aligned_mediump_dvec3
3 components vector aligned in memory of double-precision floating-point numbers using medium precisi...
+
mat< 4, 2, float, packed_highp > packed_highp_mat4x2
4 by 2 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
vec< 3, bool, packed_mediump > packed_mediump_bvec3
3 components vector tightly packed in memory of bool values.
+
vec< 2, uint, packed_mediump > packed_mediump_uvec2
2 components vector tightly packed in memory of unsigned integer numbers.
+
vec< 4, float, packed_lowp > packed_lowp_vec4
4 components vector tightly packed in memory of single-precision floating-point numbers using low pre...
+
aligned_highp_vec4 aligned_vec4
4 components vector aligned in memory of single-precision floating-point numbers. ...
+
vec< 4, uint, aligned_lowp > aligned_lowp_uvec4
4 components vector aligned in memory of unsigned integer numbers.
+
mat< 2, 2, float, packed_mediump > packed_mediump_mat2
2 by 2 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
vec< 1, double, packed_highp > packed_highp_dvec1
1 component vector tightly packed in memory of double-precision floating-point numbers using high pre...
+
mat< 3, 3, double, aligned_mediump > aligned_mediump_dmat3x3
3 by 3 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
aligned_highp_dvec4 aligned_dvec4
4 components vector aligned in memory of double-precision floating-point numbers. ...
+
packed_highp_mat3x3 packed_mat3x3
3 by 3 matrix tightly packed in memory of single-precision floating-point numbers.
+
vec< 1, uint, packed_lowp > packed_lowp_uvec1
1 component vector tightly packed in memory of unsigned integer numbers.
+
mat< 3, 2, double, packed_highp > packed_highp_dmat3x2
3 by 2 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
mat< 4, 4, double, packed_lowp > packed_lowp_dmat4x4
4 by 4 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
mat< 2, 2, double, packed_lowp > packed_lowp_dmat2
2 by 2 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
packed_highp_mat2x4 packed_mat2x4
2 by 4 matrix tightly packed in memory of single-precision floating-point numbers.
+
mat< 2, 4, double, aligned_lowp > aligned_lowp_dmat2x4
2 by 4 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
vec< 1, int, aligned_highp > aligned_highp_ivec1
1 component vector aligned in memory of signed integer numbers.
+
vec< 3, float, aligned_highp > aligned_highp_vec3
3 components vector aligned in memory of single-precision floating-point numbers using high precision...
+
aligned_highp_dmat3x2 aligned_dmat3x2
3 by 2 matrix tightly aligned in memory of double-precision floating-point numbers.
+
mat< 3, 4, double, aligned_highp > aligned_highp_dmat3x4
3 by 4 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
vec< 4, double, aligned_highp > aligned_highp_dvec4
4 components vector aligned in memory of double-precision floating-point numbers using high precision...
+
mat< 2, 4, float, aligned_mediump > aligned_mediump_mat2x4
2 by 4 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
vec< 2, double, packed_lowp > packed_lowp_dvec2
2 components vector tightly packed in memory of double-precision floating-point numbers using low pre...
+
mat< 3, 4, float, packed_lowp > packed_lowp_mat3x4
3 by 4 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
vec< 3, uint, aligned_mediump > aligned_mediump_uvec3
3 components vector aligned in memory of unsigned integer numbers.
+
vec< 1, bool, aligned_mediump > aligned_mediump_bvec1
1 component vector aligned in memory of bool values.
+
vec< 2, double, packed_mediump > packed_mediump_dvec2
2 components vector tightly packed in memory of double-precision floating-point numbers using medium ...
+
vec< 4, float, packed_highp > packed_highp_vec4
4 components vector tightly packed in memory of single-precision floating-point numbers using high pr...
+
vec< 2, int, packed_mediump > packed_mediump_ivec2
2 components vector tightly packed in memory of signed integer numbers.
+
vec< 2, float, aligned_mediump > aligned_mediump_vec2
2 components vector aligned in memory of single-precision floating-point numbers using medium precisi...
+
mat< 4, 4, double, packed_lowp > packed_lowp_dmat4
4 by 4 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
mat< 4, 4, float, aligned_mediump > aligned_mediump_mat4
4 by 4 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
mat< 3, 3, float, packed_lowp > packed_lowp_mat3
3 by 3 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
vec< 3, uint, packed_highp > packed_highp_uvec3
3 components vector tightly packed in memory of unsigned integer numbers.
+
mat< 2, 2, double, packed_mediump > packed_mediump_dmat2x2
2 by 2 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
packed_highp_uvec4 packed_uvec4
4 components vector tightly packed in memory of unsigned integer numbers.
+
aligned_highp_dmat2x3 aligned_dmat2x3
2 by 3 matrix tightly aligned in memory of double-precision floating-point numbers.
+
mat< 4, 2, double, aligned_highp > aligned_highp_dmat4x2
4 by 2 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
vec< 1, float, aligned_mediump > aligned_mediump_vec1
1 component vector aligned in memory of single-precision floating-point numbers using medium precisio...
+
aligned_highp_bvec1 aligned_bvec1
1 component vector aligned in memory of bool values.
+
mat< 3, 4, float, packed_mediump > packed_mediump_mat3x4
3 by 4 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
packed_highp_ivec3 packed_ivec3
3 components vector tightly packed in memory of signed integer numbers.
+
mat< 2, 4, float, packed_highp > packed_highp_mat2x4
2 by 4 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
packed_highp_dmat2x2 packed_dmat2x2
2 by 2 matrix tightly packed in memory of double-precision floating-point numbers.
+
mat< 2, 3, float, packed_lowp > packed_lowp_mat2x3
2 by 3 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
mat< 4, 3, float, packed_highp > packed_highp_mat4x3
4 by 3 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
packed_highp_mat2x2 packed_mat2x2
2 by 2 matrix tightly packed in memory of single-precision floating-point numbers.
+
aligned_highp_uvec1 aligned_uvec1
1 component vector aligned in memory of unsigned integer numbers.
+
mat< 2, 3, float, packed_highp > packed_highp_mat2x3
2 by 3 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
vec< 1, double, packed_lowp > packed_lowp_dvec1
1 component vector tightly packed in memory of double-precision floating-point numbers using low prec...
+
vec< 2, uint, packed_lowp > packed_lowp_uvec2
2 components vector tightly packed in memory of unsigned integer numbers.
+
mat< 2, 4, float, packed_mediump > packed_mediump_mat2x4
2 by 4 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
vec< 2, bool, aligned_highp > aligned_highp_bvec2
2 components vector aligned in memory of bool values.
+
mat< 4, 4, float, aligned_lowp > aligned_lowp_mat4
4 by 4 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
vec< 2, uint, packed_highp > packed_highp_uvec2
2 components vector tightly packed in memory of unsigned integer numbers.
+
aligned_highp_uvec2 aligned_uvec2
2 components vector aligned in memory of unsigned integer numbers.
+
mat< 3, 3, double, aligned_lowp > aligned_lowp_dmat3
3 by 3 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
vec< 1, double, aligned_highp > aligned_highp_dvec1
1 component vector aligned in memory of double-precision floating-point numbers using high precision ...
+
mat< 3, 3, float, packed_highp > packed_highp_mat3x3
3 by 3 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
aligned_highp_mat2 aligned_mat2
2 by 2 matrix tightly aligned in memory of single-precision floating-point numbers.
+
packed_highp_dmat3 packed_dmat3
3 by 3 matrix tightly packed in memory of double-precision floating-point numbers.
+
vec< 3, bool, aligned_mediump > aligned_mediump_bvec3
3 components vector aligned in memory of bool values.
+
mat< 4, 4, double, aligned_mediump > aligned_mediump_dmat4x4
4 by 4 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
vec< 2, int, aligned_lowp > aligned_lowp_ivec2
2 components vector aligned in memory of signed integer numbers.
+
vec< 2, int, packed_lowp > packed_lowp_ivec2
2 components vector tightly packed in memory of signed integer numbers.
+
vec< 3, double, packed_lowp > packed_lowp_dvec3
3 components vector tightly packed in memory of double-precision floating-point numbers using low pre...
+
vec< 4, bool, aligned_lowp > aligned_lowp_bvec4
4 components vector aligned in memory of bool values.
+
mat< 4, 4, float, aligned_highp > aligned_highp_mat4
4 by 4 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
mat< 2, 4, double, aligned_mediump > aligned_mediump_dmat2x4
2 by 4 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
mat< 4, 4, double, aligned_highp > aligned_highp_dmat4x4
4 by 4 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
packed_highp_mat2x3 packed_mat2x3
2 by 3 matrix tightly packed in memory of single-precision floating-point numbers.
+
vec< 2, float, packed_mediump > packed_mediump_vec2
2 components vector tightly packed in memory of single-precision floating-point numbers using medium ...
+
mat< 4, 4, float, packed_lowp > packed_lowp_mat4x4
4 by 4 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
vec< 3, double, packed_highp > packed_highp_dvec3
3 components vector tightly packed in memory of double-precision floating-point numbers using high pr...
+
mat< 4, 3, double, packed_highp > packed_highp_dmat4x3
4 by 3 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
aligned_highp_dmat3x3 aligned_dmat3x3
3 by 3 matrix tightly aligned in memory of double-precision floating-point numbers.
+
aligned_highp_dmat2x4 aligned_dmat2x4
2 by 4 matrix tightly aligned in memory of double-precision floating-point numbers.
+
vec< 1, bool, aligned_lowp > aligned_lowp_bvec1
1 component vector aligned in memory of bool values.
+
aligned_highp_ivec4 aligned_ivec4
4 components vector aligned in memory of signed integer numbers.
+
aligned_highp_uvec4 aligned_uvec4
4 components vector aligned in memory of unsigned integer numbers.
+
mat< 2, 3, float, aligned_mediump > aligned_mediump_mat2x3
2 by 3 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
mat< 2, 2, float, aligned_mediump > aligned_mediump_mat2x2
2 by 2 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
vec< 2, double, aligned_mediump > aligned_mediump_dvec2
2 components vector aligned in memory of double-precision floating-point numbers using medium precisi...
+
vec< 3, int, packed_mediump > packed_mediump_ivec3
3 components vector tightly packed in memory of signed integer numbers.
+
vec< 1, bool, packed_lowp > packed_lowp_bvec1
1 component vector tightly packed in memory of bool values.
+
packed_highp_ivec2 packed_ivec2
2 components vector tightly packed in memory of signed integer numbers.
+
vec< 2, float, packed_highp > packed_highp_vec2
2 components vector tightly packed in memory of single-precision floating-point numbers using high pr...
+
aligned_highp_ivec3 aligned_ivec3
3 components vector aligned in memory of signed integer numbers.
+
mat< 4, 3, float, aligned_lowp > aligned_lowp_mat4x3
4 by 3 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
mat< 3, 2, double, aligned_highp > aligned_highp_dmat3x2
3 by 2 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
vec< 4, int, packed_mediump > packed_mediump_ivec4
4 components vector tightly packed in memory of signed integer numbers.
+
mat< 2, 2, double, aligned_lowp > aligned_lowp_dmat2
2 by 2 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
vec< 3, uint, packed_lowp > packed_lowp_uvec3
3 components vector tightly packed in memory of unsigned integer numbers.
+
mat< 3, 4, double, packed_mediump > packed_mediump_dmat3x4
3 by 4 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
mat< 2, 3, float, aligned_highp > aligned_highp_mat2x3
2 by 3 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
mat< 4, 3, float, aligned_highp > aligned_highp_mat4x3
4 by 3 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
mat< 3, 4, double, packed_lowp > packed_lowp_dmat3x4
3 by 4 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
vec< 3, bool, aligned_lowp > aligned_lowp_bvec3
3 components vector aligned in memory of bool values.
+
mat< 2, 3, double, aligned_mediump > aligned_mediump_dmat2x3
2 by 3 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
mat< 3, 3, float, packed_mediump > packed_mediump_mat3
3 by 3 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
mat< 2, 4, double, packed_highp > packed_highp_dmat2x4
2 by 4 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
mat< 4, 4, double, aligned_mediump > aligned_mediump_dmat4
4 by 4 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
vec< 3, float, aligned_mediump > aligned_mediump_vec3
3 components vector aligned in memory of single-precision floating-point numbers using medium precisi...
+
vec< 2, uint, aligned_highp > aligned_highp_uvec2
2 components vector aligned in memory of unsigned integer numbers.
+
mat< 4, 4, double, aligned_lowp > aligned_lowp_dmat4
4 by 4 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
aligned_highp_dmat2 aligned_dmat2
2 by 2 matrix tightly aligned in memory of double-precision floating-point numbers.
+
mat< 4, 4, double, aligned_highp > aligned_highp_dmat4
4 by 4 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
aligned_highp_dvec3 aligned_dvec3
3 components vector aligned in memory of double-precision floating-point numbers. ...
+
packed_highp_vec3 packed_vec3
3 components vector tightly packed in memory of single-precision floating-point numbers.
+
mat< 2, 2, float, packed_highp > packed_highp_mat2
2 by 2 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
packed_highp_bvec3 packed_bvec3
3 components vector tightly packed in memory of bool values.
+
packed_highp_mat4x2 packed_mat4x2
4 by 2 matrix tightly packed in memory of single-precision floating-point numbers.
+
packed_highp_dmat3x4 packed_dmat3x4
3 by 4 matrix tightly packed in memory of double-precision floating-point numbers.
+
vec< 1, int, packed_mediump > packed_mediump_ivec1
1 component vector tightly packed in memory of signed integer numbers.
+
packed_highp_dvec1 packed_dvec1
1 component vector tightly packed in memory of double-precision floating-point numbers.
+
mat< 2, 2, float, aligned_mediump > aligned_mediump_mat2
2 by 2 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
mat< 2, 2, double, aligned_highp > aligned_highp_dmat2
2 by 2 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
mat< 4, 3, double, packed_mediump > packed_mediump_dmat4x3
4 by 3 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
aligned_highp_vec1 aligned_vec1
1 component vector aligned in memory of single-precision floating-point numbers.
+
aligned_highp_mat4x3 aligned_mat4x3
4 by 3 matrix tightly aligned in memory of single-precision floating-point numbers.
+
mat< 4, 4, float, packed_mediump > packed_mediump_mat4x4
4 by 4 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
mat< 4, 3, double, aligned_lowp > aligned_lowp_dmat4x3
4 by 3 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
mat< 4, 4, float, packed_highp > packed_highp_mat4x4
4 by 4 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
vec< 4, bool, packed_mediump > packed_mediump_bvec4
4 components vector tightly packed in memory of bool values.
+
vec< 4, int, packed_highp > packed_highp_ivec4
4 components vector tightly packed in memory of signed integer numbers.
+
packed_highp_dvec2 packed_dvec2
2 components vector tightly packed in memory of double-precision floating-point numbers.
+
vec< 4, float, aligned_mediump > aligned_mediump_vec4
4 components vector aligned in memory of single-precision floating-point numbers using medium precisi...
+
mat< 4, 2, float, packed_mediump > packed_mediump_mat4x2
4 by 2 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
vec< 4, int, aligned_mediump > aligned_mediump_ivec4
4 components vector aligned in memory of signed integer numbers.
+
packed_highp_dmat4x3 packed_dmat4x3
4 by 3 matrix tightly packed in memory of double-precision floating-point numbers.
+
aligned_highp_dvec1 aligned_dvec1
1 component vector aligned in memory of double-precision floating-point numbers.
+
mat< 2, 2, double, aligned_lowp > aligned_lowp_dmat2x2
2 by 2 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
packed_highp_ivec4 packed_ivec4
4 components vector tightly packed in memory of signed integer numbers.
+
vec< 1, uint, packed_mediump > packed_mediump_uvec1
1 component vector tightly packed in memory of unsigned integer numbers.
+
vec< 1, double, aligned_lowp > aligned_lowp_dvec1
1 component vector aligned in memory of double-precision floating-point numbers using low precision a...
+
vec< 2, int, aligned_highp > aligned_highp_ivec2
2 components vector aligned in memory of signed integer numbers.
+
mat< 2, 4, float, aligned_highp > aligned_highp_mat2x4
2 by 4 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
mat< 2, 2, double, packed_highp > packed_highp_dmat2x2
2 by 2 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
mat< 4, 4, float, packed_lowp > packed_lowp_mat4
4 by 4 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
mat< 4, 2, float, aligned_highp > aligned_highp_mat4x2
4 by 2 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
mat< 2, 3, double, packed_mediump > packed_mediump_dmat2x3
2 by 3 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
mat< 3, 2, double, packed_mediump > packed_mediump_dmat3x2
3 by 2 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
vec< 4, uint, packed_highp > packed_highp_uvec4
4 components vector tightly packed in memory of unsigned integer numbers.
+
vec< 3, int, aligned_lowp > aligned_lowp_ivec3
3 components vector aligned in memory of signed integer numbers.
+
vec< 2, double, aligned_highp > aligned_highp_dvec2
2 components vector aligned in memory of double-precision floating-point numbers using high precision...
+
aligned_highp_mat2x3 aligned_mat2x3
2 by 3 matrix tightly aligned in memory of single-precision floating-point numbers.
+
mat< 3, 2, double, aligned_mediump > aligned_mediump_dmat3x2
3 by 2 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
vec< 4, double, packed_lowp > packed_lowp_dvec4
4 components vector tightly packed in memory of double-precision floating-point numbers using low pre...
+
mat< 4, 4, double, aligned_lowp > aligned_lowp_dmat4x4
4 by 4 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
packed_highp_ivec1 packed_ivec1
1 component vector tightly packed in memory of signed integer numbers.
+
aligned_highp_mat3x2 aligned_mat3x2
3 by 2 matrix tightly aligned in memory of single-precision floating-point numbers.
+
mat< 3, 3, double, packed_mediump > packed_mediump_dmat3
3 by 3 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
vec< 1, double, packed_mediump > packed_mediump_dvec1
1 component vector tightly packed in memory of double-precision floating-point numbers using medium p...
+
vec< 2, bool, aligned_mediump > aligned_mediump_bvec2
2 components vector aligned in memory of bool values.
+
mat< 2, 4, double, packed_mediump > packed_mediump_dmat2x4
2 by 4 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
mat< 3, 2, double, aligned_lowp > aligned_lowp_dmat3x2
3 by 2 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
mat< 2, 2, float, packed_highp > packed_highp_mat2x2
2 by 2 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
packed_highp_dmat3x2 packed_dmat3x2
3 by 2 matrix tightly packed in memory of double-precision floating-point numbers.
+
vec< 1, bool, packed_highp > packed_highp_bvec1
1 component vector tightly packed in memory of bool values.
+
mat< 3, 3, double, packed_lowp > packed_lowp_dmat3x3
3 by 3 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
mat< 2, 2, double, packed_mediump > packed_mediump_dmat2
2 by 2 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
mat< 3, 3, float, packed_lowp > packed_lowp_mat3x3
3 by 3 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
aligned_highp_mat3x3 aligned_mat3x3
3 by 3 matrix tightly aligned in memory of single-precision floating-point numbers.
+
aligned_highp_dvec2 aligned_dvec2
2 components vector aligned in memory of double-precision floating-point numbers. ...
+
vec< 4, int, packed_lowp > packed_lowp_ivec4
4 components vector tightly packed in memory of signed integer numbers.
+
mat< 4, 2, float, aligned_lowp > aligned_lowp_mat4x2
4 by 2 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
vec< 4, uint, packed_mediump > packed_mediump_uvec4
4 components vector tightly packed in memory of unsigned integer numbers.
+
mat< 2, 2, double, packed_lowp > packed_lowp_dmat2x2
2 by 2 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
packed_highp_bvec1 packed_bvec1
1 components vector tightly packed in memory of bool values.
+
mat< 4, 3, float, packed_lowp > packed_lowp_mat4x3
4 by 3 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
vec< 3, bool, packed_highp > packed_highp_bvec3
3 components vector tightly packed in memory of bool values.
+
mat< 3, 3, double, aligned_lowp > aligned_lowp_dmat3x3
3 by 3 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
vec< 2, uint, aligned_mediump > aligned_mediump_uvec2
2 components vector aligned in memory of unsigned integer numbers.
+
aligned_highp_uvec3 aligned_uvec3
3 components vector aligned in memory of unsigned integer numbers.
+
vec< 1, float, packed_highp > packed_highp_vec1
1 component vector tightly packed in memory of single-precision floating-point numbers using high pre...
+
mat< 4, 2, double, packed_lowp > packed_lowp_dmat4x2
4 by 2 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
vec< 3, float, packed_lowp > packed_lowp_vec3
3 components vector tightly packed in memory of single-precision floating-point numbers using low pre...
+
mat< 2, 3, float, aligned_lowp > aligned_lowp_mat2x3
2 by 3 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
vec< 3, int, aligned_highp > aligned_highp_ivec3
3 components vector aligned in memory of signed integer numbers.
+
packed_highp_mat3 packed_mat3
3 by 3 matrix tightly packed in memory of single-precision floating-point numbers.
+
mat< 3, 3, float, aligned_mediump > aligned_mediump_mat3x3
3 by 3 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
mat< 4, 2, double, packed_mediump > packed_mediump_dmat4x2
4 by 2 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
mat< 2, 2, float, aligned_highp > aligned_highp_mat2x2
2 by 2 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
aligned_highp_dmat4 aligned_dmat4
4 by 4 matrix tightly aligned in memory of double-precision floating-point numbers.
+
mat< 2, 2, float, packed_lowp > packed_lowp_mat2
2 by 2 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
mat< 3, 3, double, packed_highp > packed_highp_dmat3x3
3 by 3 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
mat< 3, 3, float, aligned_lowp > aligned_lowp_mat3
3 by 3 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
packed_highp_mat4x4 packed_mat4x4
4 by 4 matrix tightly packed in memory of single-precision floating-point numbers.
+
mat< 3, 3, float, aligned_highp > aligned_highp_mat3x3
3 by 3 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
vec< 1, int, packed_lowp > packed_lowp_ivec1
1 component vector tightly packed in memory of signed integer numbers.
+
vec< 1, int, aligned_mediump > aligned_mediump_ivec1
1 component vector aligned in memory of signed integer numbers.
+
vec< 4, bool, aligned_highp > aligned_highp_bvec4
4 components vector aligned in memory of bool values.
+
mat< 3, 3, double, aligned_mediump > aligned_mediump_dmat3
3 by 3 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
vec< 4, double, aligned_mediump > aligned_mediump_dvec4
4 components vector aligned in memory of double-precision floating-point numbers using medium precisi...
+
mat< 4, 2, double, packed_highp > packed_highp_dmat4x2
4 by 2 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
aligned_highp_bvec3 aligned_bvec3
3 components vector aligned in memory of bool values.
+
mat< 2, 2, float, packed_mediump > packed_mediump_mat2x2
2 by 2 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
mat< 4, 3, float, aligned_mediump > aligned_mediump_mat4x3
4 by 3 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
mat< 2, 4, float, aligned_lowp > aligned_lowp_mat2x4
2 by 4 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
vec< 4, uint, packed_lowp > packed_lowp_uvec4
4 components vector tightly packed in memory of unsigned integer numbers.
+
mat< 4, 2, float, packed_lowp > packed_lowp_mat4x2
4 by 2 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
vec< 3, uint, aligned_lowp > aligned_lowp_uvec3
3 components vector aligned in memory of unsigned integer numbers.
+
packed_highp_uvec1 packed_uvec1
1 component vector tightly packed in memory of unsigned integer numbers.
+
vec< 4, double, packed_mediump > packed_mediump_dvec4
4 components vector tightly packed in memory of double-precision floating-point numbers using medium ...
+
mat< 3, 2, float, aligned_highp > aligned_highp_mat3x2
3 by 2 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
mat< 4, 3, double, packed_lowp > packed_lowp_dmat4x3
4 by 3 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
packed_highp_vec4 packed_vec4
4 components vector tightly packed in memory of single-precision floating-point numbers.
+
mat< 3, 3, double, aligned_highp > aligned_highp_dmat3
3 by 3 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
mat< 2, 3, double, packed_lowp > packed_lowp_dmat2x3
2 by 3 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
mat< 3, 4, float, aligned_mediump > aligned_mediump_mat3x4
3 by 4 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
packed_highp_dmat4x4 packed_dmat4x4
4 by 4 matrix tightly packed in memory of double-precision floating-point numbers.
+
vec< 3, double, aligned_highp > aligned_highp_dvec3
3 components vector aligned in memory of double-precision floating-point numbers using high precision...
+
aligned_highp_vec3 aligned_vec3
3 components vector aligned in memory of single-precision floating-point numbers. ...
+
vec< 4, float, packed_mediump > packed_mediump_vec4
4 components vector tightly packed in memory of single-precision floating-point numbers using medium ...
+
vec< 1, float, packed_mediump > packed_mediump_vec1
1 component vector tightly packed in memory of single-precision floating-point numbers using medium p...
+
aligned_highp_ivec2 aligned_ivec2
2 components vector aligned in memory of signed integer numbers.
+
packed_highp_mat3x2 packed_mat3x2
3 by 2 matrix tightly packed in memory of single-precision floating-point numbers.
+
mat< 4, 4, float, aligned_highp > aligned_highp_mat4x4
4 by 4 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
vec< 1, bool, packed_mediump > packed_mediump_bvec1
1 component vector tightly packed in memory of bool values.
+
vec< 3, float, packed_highp > packed_highp_vec3
3 components vector tightly packed in memory of single-precision floating-point numbers using high pr...
+
vec< 4, uint, aligned_highp > aligned_highp_uvec4
4 components vector aligned in memory of unsigned integer numbers.
+
packed_highp_dvec3 packed_dvec3
3 components vector tightly packed in memory of double-precision floating-point numbers.
+
aligned_highp_mat4x2 aligned_mat4x2
4 by 2 matrix tightly aligned in memory of single-precision floating-point numbers.
+
mat< 2, 2, double, aligned_mediump > aligned_mediump_dmat2
2 by 2 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
packed_highp_bvec2 packed_bvec2
2 components vector tightly packed in memory of bool values.
+
mat< 4, 4, float, packed_highp > packed_highp_mat4
4 by 4 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
mat< 3, 4, double, aligned_lowp > aligned_lowp_dmat3x4
3 by 4 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
mat< 3, 3, float, aligned_mediump > aligned_mediump_mat3
3 by 3 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
vec< 4, float, aligned_highp > aligned_highp_vec4
4 components vector aligned in memory of single-precision floating-point numbers using high precision...
+
aligned_highp_ivec1 aligned_ivec1
1 component vector aligned in memory of signed integer numbers.
+
mat< 2, 2, float, packed_lowp > packed_lowp_mat2x2
2 by 2 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
mat< 2, 2, float, aligned_lowp > aligned_lowp_mat2
2 by 2 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
mat< 2, 2, float, aligned_lowp > aligned_lowp_mat2x2
2 by 2 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
vec< 3, bool, aligned_highp > aligned_highp_bvec3
3 components vector aligned in memory of bool values.
+
mat< 3, 3, double, aligned_highp > aligned_highp_dmat3x3
3 by 3 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
aligned_highp_dmat3 aligned_dmat3
3 by 3 matrix tightly aligned in memory of double-precision floating-point numbers.
+
mat< 2, 3, double, aligned_highp > aligned_highp_dmat2x3
2 by 3 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
mat< 3, 4, float, aligned_lowp > aligned_lowp_mat3x4
3 by 4 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
vec< 3, int, packed_highp > packed_highp_ivec3
3 components vector tightly packed in memory of signed integer numbers.
+
mat< 3, 2, float, aligned_lowp > aligned_lowp_mat3x2
3 by 2 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
mat< 4, 3, float, packed_mediump > packed_mediump_mat4x3
4 by 3 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
packed_highp_dmat2 packed_dmat2
2 by 2 matrix tightly packed in memory of double-precision floating-point numbers.
+
vec< 3, double, aligned_lowp > aligned_lowp_dvec3
3 components vector aligned in memory of double-precision floating-point numbers using low precision ...
+
vec< 3, float, packed_mediump > packed_mediump_vec3
3 components vector tightly packed in memory of single-precision floating-point numbers using medium ...
+
aligned_highp_dmat4x4 aligned_dmat4x4
4 by 4 matrix tightly aligned in memory of double-precision floating-point numbers.
+
mat< 3, 3, double, packed_highp > packed_highp_dmat3
3 by 3 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
vec< 3, bool, packed_lowp > packed_lowp_bvec3
3 components vector tightly packed in memory of bool values.
+
vec< 3, double, packed_mediump > packed_mediump_dvec3
3 components vector tightly packed in memory of double-precision floating-point numbers using medium ...
+
vec< 3, uint, aligned_highp > aligned_highp_uvec3
3 components vector aligned in memory of unsigned integer numbers.
+
mat< 2, 2, double, aligned_highp > aligned_highp_dmat2x2
2 by 2 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
vec< 1, uint, aligned_mediump > aligned_mediump_uvec1
1 component vector aligned in memory of unsigned integer numbers.
+
mat< 3, 3, float, aligned_highp > aligned_highp_mat3
3 by 3 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
mat< 4, 4, float, packed_mediump > packed_mediump_mat4
4 by 4 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
packed_highp_mat3x4 packed_mat3x4
3 by 4 matrix tightly packed in memory of single-precision floating-point numbers.
+
mat< 4, 3, double, aligned_mediump > aligned_mediump_dmat4x3
4 by 3 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
vec< 4, uint, aligned_mediump > aligned_mediump_uvec4
4 components vector aligned in memory of unsigned integer numbers.
+
mat< 3, 4, float, aligned_highp > aligned_highp_mat3x4
3 by 4 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
aligned_highp_mat3x4 aligned_mat3x4
3 by 4 matrix tightly aligned in memory of single-precision floating-point numbers.
+
mat< 3, 3, float, packed_highp > packed_highp_mat3
3 by 3 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
+ + + + diff --git a/common/glm/doc/api/a01384.html b/common/glm/doc/api/a01384.html new file mode 100644 index 000000000..e17b7fb6f --- /dev/null +++ b/common/glm/doc/api/a01384.html @@ -0,0 +1,1505 @@ + + + + + + + +0.9.9 API documenation: type_aligned.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtc/type_aligned.hpp File Reference
+
+
+ +

GLM_GTC_type_aligned +More...

+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Typedefs

+typedef aligned_highp_bvec1 aligned_bvec1
 1 component vector aligned in memory of bool values.
 
+typedef aligned_highp_bvec2 aligned_bvec2
 2 components vector aligned in memory of bool values.
 
+typedef aligned_highp_bvec3 aligned_bvec3
 3 components vector aligned in memory of bool values.
 
+typedef aligned_highp_bvec4 aligned_bvec4
 4 components vector aligned in memory of bool values.
 
+typedef aligned_highp_dmat2 aligned_dmat2
 2 by 2 matrix tightly aligned in memory of double-precision floating-point numbers.
 
+typedef aligned_highp_dmat2x2 aligned_dmat2x2
 2 by 2 matrix tightly aligned in memory of double-precision floating-point numbers.
 
+typedef aligned_highp_dmat2x3 aligned_dmat2x3
 2 by 3 matrix tightly aligned in memory of double-precision floating-point numbers.
 
+typedef aligned_highp_dmat2x4 aligned_dmat2x4
 2 by 4 matrix tightly aligned in memory of double-precision floating-point numbers.
 
+typedef aligned_highp_dmat3 aligned_dmat3
 3 by 3 matrix tightly aligned in memory of double-precision floating-point numbers.
 
+typedef aligned_highp_dmat3x2 aligned_dmat3x2
 3 by 2 matrix tightly aligned in memory of double-precision floating-point numbers.
 
+typedef aligned_highp_dmat3x3 aligned_dmat3x3
 3 by 3 matrix tightly aligned in memory of double-precision floating-point numbers.
 
+typedef aligned_highp_dmat3x4 aligned_dmat3x4
 3 by 4 matrix tightly aligned in memory of double-precision floating-point numbers.
 
+typedef aligned_highp_dmat4 aligned_dmat4
 4 by 4 matrix tightly aligned in memory of double-precision floating-point numbers.
 
+typedef aligned_highp_dmat4x2 aligned_dmat4x2
 4 by 2 matrix tightly aligned in memory of double-precision floating-point numbers.
 
+typedef aligned_highp_dmat4x3 aligned_dmat4x3
 4 by 3 matrix tightly aligned in memory of double-precision floating-point numbers.
 
+typedef aligned_highp_dmat4x4 aligned_dmat4x4
 4 by 4 matrix tightly aligned in memory of double-precision floating-point numbers.
 
+typedef aligned_highp_dvec1 aligned_dvec1
 1 component vector aligned in memory of double-precision floating-point numbers.
 
+typedef aligned_highp_dvec2 aligned_dvec2
 2 components vector aligned in memory of double-precision floating-point numbers.
 
+typedef aligned_highp_dvec3 aligned_dvec3
 3 components vector aligned in memory of double-precision floating-point numbers.
 
+typedef aligned_highp_dvec4 aligned_dvec4
 4 components vector aligned in memory of double-precision floating-point numbers.
 
+typedef vec< 1, bool, aligned_highp > aligned_highp_bvec1
 1 component vector aligned in memory of bool values.
 
+typedef vec< 2, bool, aligned_highp > aligned_highp_bvec2
 2 components vector aligned in memory of bool values.
 
+typedef vec< 3, bool, aligned_highp > aligned_highp_bvec3
 3 components vector aligned in memory of bool values.
 
+typedef vec< 4, bool, aligned_highp > aligned_highp_bvec4
 4 components vector aligned in memory of bool values.
 
+typedef mat< 2, 2, double, aligned_highp > aligned_highp_dmat2
 2 by 2 matrix aligned in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 2, 2, double, aligned_highp > aligned_highp_dmat2x2
 2 by 2 matrix aligned in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 2, 3, double, aligned_highp > aligned_highp_dmat2x3
 2 by 3 matrix aligned in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 2, 4, double, aligned_highp > aligned_highp_dmat2x4
 2 by 4 matrix aligned in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 3, 3, double, aligned_highp > aligned_highp_dmat3
 3 by 3 matrix aligned in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 3, 2, double, aligned_highp > aligned_highp_dmat3x2
 3 by 2 matrix aligned in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 3, 3, double, aligned_highp > aligned_highp_dmat3x3
 3 by 3 matrix aligned in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 3, 4, double, aligned_highp > aligned_highp_dmat3x4
 3 by 4 matrix aligned in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 4, 4, double, aligned_highp > aligned_highp_dmat4
 4 by 4 matrix aligned in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 4, 2, double, aligned_highp > aligned_highp_dmat4x2
 4 by 2 matrix aligned in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 4, 3, double, aligned_highp > aligned_highp_dmat4x3
 4 by 3 matrix aligned in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 4, 4, double, aligned_highp > aligned_highp_dmat4x4
 4 by 4 matrix aligned in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef vec< 1, double, aligned_highp > aligned_highp_dvec1
 1 component vector aligned in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef vec< 2, double, aligned_highp > aligned_highp_dvec2
 2 components vector aligned in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef vec< 3, double, aligned_highp > aligned_highp_dvec3
 3 components vector aligned in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef vec< 4, double, aligned_highp > aligned_highp_dvec4
 4 components vector aligned in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef vec< 1, int, aligned_highp > aligned_highp_ivec1
 1 component vector aligned in memory of signed integer numbers.
 
+typedef vec< 2, int, aligned_highp > aligned_highp_ivec2
 2 components vector aligned in memory of signed integer numbers.
 
+typedef vec< 3, int, aligned_highp > aligned_highp_ivec3
 3 components vector aligned in memory of signed integer numbers.
 
+typedef vec< 4, int, aligned_highp > aligned_highp_ivec4
 4 components vector aligned in memory of signed integer numbers.
 
+typedef mat< 2, 2, float, aligned_highp > aligned_highp_mat2
 2 by 2 matrix aligned in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 2, 2, float, aligned_highp > aligned_highp_mat2x2
 2 by 2 matrix aligned in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 2, 3, float, aligned_highp > aligned_highp_mat2x3
 2 by 3 matrix aligned in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 2, 4, float, aligned_highp > aligned_highp_mat2x4
 2 by 4 matrix aligned in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 3, 3, float, aligned_highp > aligned_highp_mat3
 3 by 3 matrix aligned in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 3, 2, float, aligned_highp > aligned_highp_mat3x2
 3 by 2 matrix aligned in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 3, 3, float, aligned_highp > aligned_highp_mat3x3
 3 by 3 matrix aligned in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 3, 4, float, aligned_highp > aligned_highp_mat3x4
 3 by 4 matrix aligned in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 4, 4, float, aligned_highp > aligned_highp_mat4
 4 by 4 matrix aligned in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 4, 2, float, aligned_highp > aligned_highp_mat4x2
 4 by 2 matrix aligned in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 4, 3, float, aligned_highp > aligned_highp_mat4x3
 4 by 3 matrix aligned in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 4, 4, float, aligned_highp > aligned_highp_mat4x4
 4 by 4 matrix aligned in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef vec< 1, uint, aligned_highp > aligned_highp_uvec1
 1 component vector aligned in memory of unsigned integer numbers.
 
+typedef vec< 2, uint, aligned_highp > aligned_highp_uvec2
 2 components vector aligned in memory of unsigned integer numbers.
 
+typedef vec< 3, uint, aligned_highp > aligned_highp_uvec3
 3 components vector aligned in memory of unsigned integer numbers.
 
+typedef vec< 4, uint, aligned_highp > aligned_highp_uvec4
 4 components vector aligned in memory of unsigned integer numbers.
 
+typedef vec< 1, float, aligned_highp > aligned_highp_vec1
 1 component vector aligned in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef vec< 2, float, aligned_highp > aligned_highp_vec2
 2 components vector aligned in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef vec< 3, float, aligned_highp > aligned_highp_vec3
 3 components vector aligned in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef vec< 4, float, aligned_highp > aligned_highp_vec4
 4 components vector aligned in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef aligned_highp_ivec1 aligned_ivec1
 1 component vector aligned in memory of signed integer numbers.
 
+typedef aligned_highp_ivec2 aligned_ivec2
 2 components vector aligned in memory of signed integer numbers.
 
+typedef aligned_highp_ivec3 aligned_ivec3
 3 components vector aligned in memory of signed integer numbers.
 
+typedef aligned_highp_ivec4 aligned_ivec4
 4 components vector aligned in memory of signed integer numbers.
 
+typedef vec< 1, bool, aligned_lowp > aligned_lowp_bvec1
 1 component vector aligned in memory of bool values.
 
+typedef vec< 2, bool, aligned_lowp > aligned_lowp_bvec2
 2 components vector aligned in memory of bool values.
 
+typedef vec< 3, bool, aligned_lowp > aligned_lowp_bvec3
 3 components vector aligned in memory of bool values.
 
+typedef vec< 4, bool, aligned_lowp > aligned_lowp_bvec4
 4 components vector aligned in memory of bool values.
 
+typedef mat< 2, 2, double, aligned_lowp > aligned_lowp_dmat2
 2 by 2 matrix aligned in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 2, 2, double, aligned_lowp > aligned_lowp_dmat2x2
 2 by 2 matrix aligned in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 2, 3, double, aligned_lowp > aligned_lowp_dmat2x3
 2 by 3 matrix aligned in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 2, 4, double, aligned_lowp > aligned_lowp_dmat2x4
 2 by 4 matrix aligned in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 3, 3, double, aligned_lowp > aligned_lowp_dmat3
 3 by 3 matrix aligned in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 3, 2, double, aligned_lowp > aligned_lowp_dmat3x2
 3 by 2 matrix aligned in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 3, 3, double, aligned_lowp > aligned_lowp_dmat3x3
 3 by 3 matrix aligned in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 3, 4, double, aligned_lowp > aligned_lowp_dmat3x4
 3 by 4 matrix aligned in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 4, 4, double, aligned_lowp > aligned_lowp_dmat4
 4 by 4 matrix aligned in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 4, 2, double, aligned_lowp > aligned_lowp_dmat4x2
 4 by 2 matrix aligned in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 4, 3, double, aligned_lowp > aligned_lowp_dmat4x3
 4 by 3 matrix aligned in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 4, 4, double, aligned_lowp > aligned_lowp_dmat4x4
 4 by 4 matrix aligned in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef vec< 1, double, aligned_lowp > aligned_lowp_dvec1
 1 component vector aligned in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef vec< 2, double, aligned_lowp > aligned_lowp_dvec2
 2 components vector aligned in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef vec< 3, double, aligned_lowp > aligned_lowp_dvec3
 3 components vector aligned in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef vec< 4, double, aligned_lowp > aligned_lowp_dvec4
 4 components vector aligned in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef vec< 1, int, aligned_lowp > aligned_lowp_ivec1
 1 component vector aligned in memory of signed integer numbers.
 
+typedef vec< 2, int, aligned_lowp > aligned_lowp_ivec2
 2 components vector aligned in memory of signed integer numbers.
 
+typedef vec< 3, int, aligned_lowp > aligned_lowp_ivec3
 3 components vector aligned in memory of signed integer numbers.
 
+typedef vec< 4, int, aligned_lowp > aligned_lowp_ivec4
 4 components vector aligned in memory of signed integer numbers.
 
+typedef mat< 2, 2, float, aligned_lowp > aligned_lowp_mat2
 2 by 2 matrix aligned in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 2, 2, float, aligned_lowp > aligned_lowp_mat2x2
 2 by 2 matrix aligned in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 2, 3, float, aligned_lowp > aligned_lowp_mat2x3
 2 by 3 matrix aligned in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 2, 4, float, aligned_lowp > aligned_lowp_mat2x4
 2 by 4 matrix aligned in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 3, 3, float, aligned_lowp > aligned_lowp_mat3
 3 by 3 matrix aligned in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 3, 2, float, aligned_lowp > aligned_lowp_mat3x2
 3 by 2 matrix aligned in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 3, 3, float, aligned_lowp > aligned_lowp_mat3x3
 3 by 3 matrix aligned in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 3, 4, float, aligned_lowp > aligned_lowp_mat3x4
 3 by 4 matrix aligned in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 4, 4, float, aligned_lowp > aligned_lowp_mat4
 4 by 4 matrix aligned in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 4, 2, float, aligned_lowp > aligned_lowp_mat4x2
 4 by 2 matrix aligned in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 4, 3, float, aligned_lowp > aligned_lowp_mat4x3
 4 by 3 matrix aligned in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 4, 4, float, aligned_lowp > aligned_lowp_mat4x4
 4 by 4 matrix aligned in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef vec< 1, uint, aligned_lowp > aligned_lowp_uvec1
 1 component vector aligned in memory of unsigned integer numbers.
 
+typedef vec< 2, uint, aligned_lowp > aligned_lowp_uvec2
 2 components vector aligned in memory of unsigned integer numbers.
 
+typedef vec< 3, uint, aligned_lowp > aligned_lowp_uvec3
 3 components vector aligned in memory of unsigned integer numbers.
 
+typedef vec< 4, uint, aligned_lowp > aligned_lowp_uvec4
 4 components vector aligned in memory of unsigned integer numbers.
 
+typedef vec< 1, float, aligned_lowp > aligned_lowp_vec1
 1 component vector aligned in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef vec< 2, float, aligned_lowp > aligned_lowp_vec2
 2 components vector aligned in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef vec< 3, float, aligned_lowp > aligned_lowp_vec3
 3 components vector aligned in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef vec< 4, float, aligned_lowp > aligned_lowp_vec4
 4 components vector aligned in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef aligned_highp_mat2 aligned_mat2
 2 by 2 matrix tightly aligned in memory of single-precision floating-point numbers.
 
+typedef aligned_highp_mat2x2 aligned_mat2x2
 2 by 2 matrix tightly aligned in memory of single-precision floating-point numbers.
 
+typedef aligned_highp_mat2x3 aligned_mat2x3
 2 by 3 matrix tightly aligned in memory of single-precision floating-point numbers.
 
+typedef aligned_highp_mat2x4 aligned_mat2x4
 2 by 4 matrix tightly aligned in memory of single-precision floating-point numbers.
 
+typedef aligned_highp_mat3 aligned_mat3
 3 by 3 matrix tightly aligned in memory of single-precision floating-point numbers.
 
+typedef aligned_highp_mat3x2 aligned_mat3x2
 3 by 2 matrix tightly aligned in memory of single-precision floating-point numbers.
 
+typedef aligned_highp_mat3x3 aligned_mat3x3
 3 by 3 matrix tightly aligned in memory of single-precision floating-point numbers.
 
+typedef aligned_highp_mat3x4 aligned_mat3x4
 3 by 4 matrix tightly aligned in memory of single-precision floating-point numbers.
 
+typedef aligned_highp_mat4 aligned_mat4
 4 by 4 matrix tightly aligned in memory of single-precision floating-point numbers.
 
+typedef aligned_highp_mat4x2 aligned_mat4x2
 4 by 2 matrix tightly aligned in memory of single-precision floating-point numbers.
 
+typedef aligned_highp_mat4x3 aligned_mat4x3
 4 by 3 matrix tightly aligned in memory of single-precision floating-point numbers.
 
+typedef aligned_highp_mat4x4 aligned_mat4x4
 4 by 4 matrix tightly aligned in memory of single-precision floating-point numbers.
 
+typedef vec< 1, bool, aligned_mediump > aligned_mediump_bvec1
 1 component vector aligned in memory of bool values.
 
+typedef vec< 2, bool, aligned_mediump > aligned_mediump_bvec2
 2 components vector aligned in memory of bool values.
 
+typedef vec< 3, bool, aligned_mediump > aligned_mediump_bvec3
 3 components vector aligned in memory of bool values.
 
+typedef vec< 4, bool, aligned_mediump > aligned_mediump_bvec4
 4 components vector aligned in memory of bool values.
 
+typedef mat< 2, 2, double, aligned_mediump > aligned_mediump_dmat2
 2 by 2 matrix aligned in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 2, 2, double, aligned_mediump > aligned_mediump_dmat2x2
 2 by 2 matrix aligned in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 2, 3, double, aligned_mediump > aligned_mediump_dmat2x3
 2 by 3 matrix aligned in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 2, 4, double, aligned_mediump > aligned_mediump_dmat2x4
 2 by 4 matrix aligned in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 3, 3, double, aligned_mediump > aligned_mediump_dmat3
 3 by 3 matrix aligned in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 3, 2, double, aligned_mediump > aligned_mediump_dmat3x2
 3 by 2 matrix aligned in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 3, 3, double, aligned_mediump > aligned_mediump_dmat3x3
 3 by 3 matrix aligned in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 3, 4, double, aligned_mediump > aligned_mediump_dmat3x4
 3 by 4 matrix aligned in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 4, 4, double, aligned_mediump > aligned_mediump_dmat4
 4 by 4 matrix aligned in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 4, 2, double, aligned_mediump > aligned_mediump_dmat4x2
 4 by 2 matrix aligned in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 4, 3, double, aligned_mediump > aligned_mediump_dmat4x3
 4 by 3 matrix aligned in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 4, 4, double, aligned_mediump > aligned_mediump_dmat4x4
 4 by 4 matrix aligned in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef vec< 1, double, aligned_mediump > aligned_mediump_dvec1
 1 component vector aligned in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef vec< 2, double, aligned_mediump > aligned_mediump_dvec2
 2 components vector aligned in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef vec< 3, double, aligned_mediump > aligned_mediump_dvec3
 3 components vector aligned in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef vec< 4, double, aligned_mediump > aligned_mediump_dvec4
 4 components vector aligned in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef vec< 1, int, aligned_mediump > aligned_mediump_ivec1
 1 component vector aligned in memory of signed integer numbers.
 
+typedef vec< 2, int, aligned_mediump > aligned_mediump_ivec2
 2 components vector aligned in memory of signed integer numbers.
 
+typedef vec< 3, int, aligned_mediump > aligned_mediump_ivec3
 3 components vector aligned in memory of signed integer numbers.
 
+typedef vec< 4, int, aligned_mediump > aligned_mediump_ivec4
 4 components vector aligned in memory of signed integer numbers.
 
+typedef mat< 2, 2, float, aligned_mediump > aligned_mediump_mat2
 2 by 2 matrix aligned in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 2, 2, float, aligned_mediump > aligned_mediump_mat2x2
 2 by 2 matrix aligned in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 2, 3, float, aligned_mediump > aligned_mediump_mat2x3
 2 by 3 matrix aligned in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 2, 4, float, aligned_mediump > aligned_mediump_mat2x4
 2 by 4 matrix aligned in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 3, 3, float, aligned_mediump > aligned_mediump_mat3
 3 by 3 matrix aligned in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 3, 2, float, aligned_mediump > aligned_mediump_mat3x2
 3 by 2 matrix aligned in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 3, 3, float, aligned_mediump > aligned_mediump_mat3x3
 3 by 3 matrix aligned in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 3, 4, float, aligned_mediump > aligned_mediump_mat3x4
 3 by 4 matrix aligned in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 4, 4, float, aligned_mediump > aligned_mediump_mat4
 4 by 4 matrix aligned in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 4, 2, float, aligned_mediump > aligned_mediump_mat4x2
 4 by 2 matrix aligned in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 4, 3, float, aligned_mediump > aligned_mediump_mat4x3
 4 by 3 matrix aligned in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 4, 4, float, aligned_mediump > aligned_mediump_mat4x4
 4 by 4 matrix aligned in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef vec< 1, uint, aligned_mediump > aligned_mediump_uvec1
 1 component vector aligned in memory of unsigned integer numbers.
 
+typedef vec< 2, uint, aligned_mediump > aligned_mediump_uvec2
 2 components vector aligned in memory of unsigned integer numbers.
 
+typedef vec< 3, uint, aligned_mediump > aligned_mediump_uvec3
 3 components vector aligned in memory of unsigned integer numbers.
 
+typedef vec< 4, uint, aligned_mediump > aligned_mediump_uvec4
 4 components vector aligned in memory of unsigned integer numbers.
 
+typedef vec< 1, float, aligned_mediump > aligned_mediump_vec1
 1 component vector aligned in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef vec< 2, float, aligned_mediump > aligned_mediump_vec2
 2 components vector aligned in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef vec< 3, float, aligned_mediump > aligned_mediump_vec3
 3 components vector aligned in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef vec< 4, float, aligned_mediump > aligned_mediump_vec4
 4 components vector aligned in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef aligned_highp_uvec1 aligned_uvec1
 1 component vector aligned in memory of unsigned integer numbers.
 
+typedef aligned_highp_uvec2 aligned_uvec2
 2 components vector aligned in memory of unsigned integer numbers.
 
+typedef aligned_highp_uvec3 aligned_uvec3
 3 components vector aligned in memory of unsigned integer numbers.
 
+typedef aligned_highp_uvec4 aligned_uvec4
 4 components vector aligned in memory of unsigned integer numbers.
 
+typedef aligned_highp_vec1 aligned_vec1
 1 component vector aligned in memory of single-precision floating-point numbers.
 
+typedef aligned_highp_vec2 aligned_vec2
 2 components vector aligned in memory of single-precision floating-point numbers.
 
+typedef aligned_highp_vec3 aligned_vec3
 3 components vector aligned in memory of single-precision floating-point numbers.
 
+typedef aligned_highp_vec4 aligned_vec4
 4 components vector aligned in memory of single-precision floating-point numbers.
 
+typedef packed_highp_bvec1 packed_bvec1
 1 components vector tightly packed in memory of bool values.
 
+typedef packed_highp_bvec2 packed_bvec2
 2 components vector tightly packed in memory of bool values.
 
+typedef packed_highp_bvec3 packed_bvec3
 3 components vector tightly packed in memory of bool values.
 
+typedef packed_highp_bvec4 packed_bvec4
 4 components vector tightly packed in memory of bool values.
 
+typedef packed_highp_dmat2 packed_dmat2
 2 by 2 matrix tightly packed in memory of double-precision floating-point numbers.
 
+typedef packed_highp_dmat2x2 packed_dmat2x2
 2 by 2 matrix tightly packed in memory of double-precision floating-point numbers.
 
+typedef packed_highp_dmat2x3 packed_dmat2x3
 2 by 3 matrix tightly packed in memory of double-precision floating-point numbers.
 
+typedef packed_highp_dmat2x4 packed_dmat2x4
 2 by 4 matrix tightly packed in memory of double-precision floating-point numbers.
 
+typedef packed_highp_dmat3 packed_dmat3
 3 by 3 matrix tightly packed in memory of double-precision floating-point numbers.
 
+typedef packed_highp_dmat3x2 packed_dmat3x2
 3 by 2 matrix tightly packed in memory of double-precision floating-point numbers.
 
+typedef packed_highp_dmat3x3 packed_dmat3x3
 3 by 3 matrix tightly packed in memory of double-precision floating-point numbers.
 
+typedef packed_highp_dmat3x4 packed_dmat3x4
 3 by 4 matrix tightly packed in memory of double-precision floating-point numbers.
 
+typedef packed_highp_dmat4 packed_dmat4
 4 by 4 matrix tightly packed in memory of double-precision floating-point numbers.
 
+typedef packed_highp_dmat4x2 packed_dmat4x2
 4 by 2 matrix tightly packed in memory of double-precision floating-point numbers.
 
+typedef packed_highp_dmat4x3 packed_dmat4x3
 4 by 3 matrix tightly packed in memory of double-precision floating-point numbers.
 
+typedef packed_highp_dmat4x4 packed_dmat4x4
 4 by 4 matrix tightly packed in memory of double-precision floating-point numbers.
 
+typedef packed_highp_dvec1 packed_dvec1
 1 component vector tightly packed in memory of double-precision floating-point numbers.
 
+typedef packed_highp_dvec2 packed_dvec2
 2 components vector tightly packed in memory of double-precision floating-point numbers.
 
+typedef packed_highp_dvec3 packed_dvec3
 3 components vector tightly packed in memory of double-precision floating-point numbers.
 
+typedef packed_highp_dvec4 packed_dvec4
 4 components vector tightly packed in memory of double-precision floating-point numbers.
 
+typedef vec< 1, bool, packed_highp > packed_highp_bvec1
 1 component vector tightly packed in memory of bool values.
 
+typedef vec< 2, bool, packed_highp > packed_highp_bvec2
 2 components vector tightly packed in memory of bool values.
 
+typedef vec< 3, bool, packed_highp > packed_highp_bvec3
 3 components vector tightly packed in memory of bool values.
 
+typedef vec< 4, bool, packed_highp > packed_highp_bvec4
 4 components vector tightly packed in memory of bool values.
 
+typedef mat< 2, 2, double, packed_highp > packed_highp_dmat2
 2 by 2 matrix tightly packed in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 2, 2, double, packed_highp > packed_highp_dmat2x2
 2 by 2 matrix tightly packed in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 2, 3, double, packed_highp > packed_highp_dmat2x3
 2 by 3 matrix tightly packed in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 2, 4, double, packed_highp > packed_highp_dmat2x4
 2 by 4 matrix tightly packed in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 3, 3, double, packed_highp > packed_highp_dmat3
 3 by 3 matrix tightly packed in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 3, 2, double, packed_highp > packed_highp_dmat3x2
 3 by 2 matrix tightly packed in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 3, 3, double, packed_highp > packed_highp_dmat3x3
 3 by 3 matrix tightly packed in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 3, 4, double, packed_highp > packed_highp_dmat3x4
 3 by 4 matrix tightly packed in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 4, 4, double, packed_highp > packed_highp_dmat4
 4 by 4 matrix tightly packed in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 4, 2, double, packed_highp > packed_highp_dmat4x2
 4 by 2 matrix tightly packed in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 4, 3, double, packed_highp > packed_highp_dmat4x3
 4 by 3 matrix tightly packed in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 4, 4, double, packed_highp > packed_highp_dmat4x4
 4 by 4 matrix tightly packed in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef vec< 1, double, packed_highp > packed_highp_dvec1
 1 component vector tightly packed in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef vec< 2, double, packed_highp > packed_highp_dvec2
 2 components vector tightly packed in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef vec< 3, double, packed_highp > packed_highp_dvec3
 3 components vector tightly packed in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef vec< 4, double, packed_highp > packed_highp_dvec4
 4 components vector tightly packed in memory of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef vec< 1, int, packed_highp > packed_highp_ivec1
 1 component vector tightly packed in memory of signed integer numbers.
 
+typedef vec< 2, int, packed_highp > packed_highp_ivec2
 2 components vector tightly packed in memory of signed integer numbers.
 
+typedef vec< 3, int, packed_highp > packed_highp_ivec3
 3 components vector tightly packed in memory of signed integer numbers.
 
+typedef vec< 4, int, packed_highp > packed_highp_ivec4
 4 components vector tightly packed in memory of signed integer numbers.
 
+typedef mat< 2, 2, float, packed_highp > packed_highp_mat2
 2 by 2 matrix tightly packed in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 2, 2, float, packed_highp > packed_highp_mat2x2
 2 by 2 matrix tightly packed in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 2, 3, float, packed_highp > packed_highp_mat2x3
 2 by 3 matrix tightly packed in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 2, 4, float, packed_highp > packed_highp_mat2x4
 2 by 4 matrix tightly packed in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 3, 3, float, packed_highp > packed_highp_mat3
 3 by 3 matrix tightly packed in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 3, 2, float, packed_highp > packed_highp_mat3x2
 3 by 2 matrix tightly packed in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 3, 3, float, packed_highp > packed_highp_mat3x3
 3 by 3 matrix tightly packed in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 3, 4, float, packed_highp > packed_highp_mat3x4
 3 by 4 matrix tightly packed in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 4, 4, float, packed_highp > packed_highp_mat4
 4 by 4 matrix tightly packed in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 4, 2, float, packed_highp > packed_highp_mat4x2
 4 by 2 matrix tightly packed in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 4, 3, float, packed_highp > packed_highp_mat4x3
 4 by 3 matrix tightly packed in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef mat< 4, 4, float, packed_highp > packed_highp_mat4x4
 4 by 4 matrix tightly packed in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef vec< 1, uint, packed_highp > packed_highp_uvec1
 1 component vector tightly packed in memory of unsigned integer numbers.
 
+typedef vec< 2, uint, packed_highp > packed_highp_uvec2
 2 components vector tightly packed in memory of unsigned integer numbers.
 
+typedef vec< 3, uint, packed_highp > packed_highp_uvec3
 3 components vector tightly packed in memory of unsigned integer numbers.
 
+typedef vec< 4, uint, packed_highp > packed_highp_uvec4
 4 components vector tightly packed in memory of unsigned integer numbers.
 
+typedef vec< 1, float, packed_highp > packed_highp_vec1
 1 component vector tightly packed in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef vec< 2, float, packed_highp > packed_highp_vec2
 2 components vector tightly packed in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef vec< 3, float, packed_highp > packed_highp_vec3
 3 components vector tightly packed in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef vec< 4, float, packed_highp > packed_highp_vec4
 4 components vector tightly packed in memory of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
 
+typedef packed_highp_ivec1 packed_ivec1
 1 component vector tightly packed in memory of signed integer numbers.
 
+typedef packed_highp_ivec2 packed_ivec2
 2 components vector tightly packed in memory of signed integer numbers.
 
+typedef packed_highp_ivec3 packed_ivec3
 3 components vector tightly packed in memory of signed integer numbers.
 
+typedef packed_highp_ivec4 packed_ivec4
 4 components vector tightly packed in memory of signed integer numbers.
 
+typedef vec< 1, bool, packed_lowp > packed_lowp_bvec1
 1 component vector tightly packed in memory of bool values.
 
+typedef vec< 2, bool, packed_lowp > packed_lowp_bvec2
 2 components vector tightly packed in memory of bool values.
 
+typedef vec< 3, bool, packed_lowp > packed_lowp_bvec3
 3 components vector tightly packed in memory of bool values.
 
+typedef vec< 4, bool, packed_lowp > packed_lowp_bvec4
 4 components vector tightly packed in memory of bool values.
 
+typedef mat< 2, 2, double, packed_lowp > packed_lowp_dmat2
 2 by 2 matrix tightly packed in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 2, 2, double, packed_lowp > packed_lowp_dmat2x2
 2 by 2 matrix tightly packed in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 2, 3, double, packed_lowp > packed_lowp_dmat2x3
 2 by 3 matrix tightly packed in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 2, 4, double, packed_lowp > packed_lowp_dmat2x4
 2 by 4 matrix tightly packed in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 3, 3, double, packed_lowp > packed_lowp_dmat3
 3 by 3 matrix tightly packed in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 3, 2, double, packed_lowp > packed_lowp_dmat3x2
 3 by 2 matrix tightly packed in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 3, 3, double, packed_lowp > packed_lowp_dmat3x3
 3 by 3 matrix tightly packed in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 3, 4, double, packed_lowp > packed_lowp_dmat3x4
 3 by 4 matrix tightly packed in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 4, 4, double, packed_lowp > packed_lowp_dmat4
 4 by 4 matrix tightly packed in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 4, 2, double, packed_lowp > packed_lowp_dmat4x2
 4 by 2 matrix tightly packed in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 4, 3, double, packed_lowp > packed_lowp_dmat4x3
 4 by 3 matrix tightly packed in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 4, 4, double, packed_lowp > packed_lowp_dmat4x4
 4 by 4 matrix tightly packed in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef vec< 1, double, packed_lowp > packed_lowp_dvec1
 1 component vector tightly packed in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef vec< 2, double, packed_lowp > packed_lowp_dvec2
 2 components vector tightly packed in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef vec< 3, double, packed_lowp > packed_lowp_dvec3
 3 components vector tightly packed in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef vec< 4, double, packed_lowp > packed_lowp_dvec4
 4 components vector tightly packed in memory of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef vec< 1, int, packed_lowp > packed_lowp_ivec1
 1 component vector tightly packed in memory of signed integer numbers.
 
+typedef vec< 2, int, packed_lowp > packed_lowp_ivec2
 2 components vector tightly packed in memory of signed integer numbers.
 
+typedef vec< 3, int, packed_lowp > packed_lowp_ivec3
 3 components vector tightly packed in memory of signed integer numbers.
 
+typedef vec< 4, int, packed_lowp > packed_lowp_ivec4
 4 components vector tightly packed in memory of signed integer numbers.
 
+typedef mat< 2, 2, float, packed_lowp > packed_lowp_mat2
 2 by 2 matrix tightly packed in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 2, 2, float, packed_lowp > packed_lowp_mat2x2
 2 by 2 matrix tightly packed in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 2, 3, float, packed_lowp > packed_lowp_mat2x3
 2 by 3 matrix tightly packed in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 2, 4, float, packed_lowp > packed_lowp_mat2x4
 2 by 4 matrix tightly packed in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 3, 3, float, packed_lowp > packed_lowp_mat3
 3 by 3 matrix tightly packed in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 3, 2, float, packed_lowp > packed_lowp_mat3x2
 3 by 2 matrix tightly packed in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 3, 3, float, packed_lowp > packed_lowp_mat3x3
 3 by 3 matrix tightly packed in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 3, 4, float, packed_lowp > packed_lowp_mat3x4
 3 by 4 matrix tightly packed in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 4, 4, float, packed_lowp > packed_lowp_mat4
 4 by 4 matrix tightly packed in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 4, 2, float, packed_lowp > packed_lowp_mat4x2
 4 by 2 matrix tightly packed in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 4, 3, float, packed_lowp > packed_lowp_mat4x3
 4 by 3 matrix tightly packed in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef mat< 4, 4, float, packed_lowp > packed_lowp_mat4x4
 4 by 4 matrix tightly packed in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef vec< 1, uint, packed_lowp > packed_lowp_uvec1
 1 component vector tightly packed in memory of unsigned integer numbers.
 
+typedef vec< 2, uint, packed_lowp > packed_lowp_uvec2
 2 components vector tightly packed in memory of unsigned integer numbers.
 
+typedef vec< 3, uint, packed_lowp > packed_lowp_uvec3
 3 components vector tightly packed in memory of unsigned integer numbers.
 
+typedef vec< 4, uint, packed_lowp > packed_lowp_uvec4
 4 components vector tightly packed in memory of unsigned integer numbers.
 
+typedef vec< 1, float, packed_lowp > packed_lowp_vec1
 1 component vector tightly packed in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef vec< 2, float, packed_lowp > packed_lowp_vec2
 2 components vector tightly packed in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef vec< 3, float, packed_lowp > packed_lowp_vec3
 3 components vector tightly packed in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef vec< 4, float, packed_lowp > packed_lowp_vec4
 4 components vector tightly packed in memory of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
 
+typedef packed_highp_mat2 packed_mat2
 2 by 2 matrix tightly packed in memory of single-precision floating-point numbers.
 
+typedef packed_highp_mat2x2 packed_mat2x2
 2 by 2 matrix tightly packed in memory of single-precision floating-point numbers.
 
+typedef packed_highp_mat2x3 packed_mat2x3
 2 by 3 matrix tightly packed in memory of single-precision floating-point numbers.
 
+typedef packed_highp_mat2x4 packed_mat2x4
 2 by 4 matrix tightly packed in memory of single-precision floating-point numbers.
 
+typedef packed_highp_mat3 packed_mat3
 3 by 3 matrix tightly packed in memory of single-precision floating-point numbers.
 
+typedef packed_highp_mat3x2 packed_mat3x2
 3 by 2 matrix tightly packed in memory of single-precision floating-point numbers.
 
+typedef packed_highp_mat3x3 packed_mat3x3
 3 by 3 matrix tightly packed in memory of single-precision floating-point numbers.
 
+typedef packed_highp_mat3x4 packed_mat3x4
 3 by 4 matrix tightly packed in memory of single-precision floating-point numbers.
 
+typedef packed_highp_mat4 packed_mat4
 4 by 4 matrix tightly packed in memory of single-precision floating-point numbers.
 
+typedef packed_highp_mat4x2 packed_mat4x2
 4 by 2 matrix tightly packed in memory of single-precision floating-point numbers.
 
+typedef packed_highp_mat4x3 packed_mat4x3
 4 by 3 matrix tightly packed in memory of single-precision floating-point numbers.
 
+typedef packed_highp_mat4x4 packed_mat4x4
 4 by 4 matrix tightly packed in memory of single-precision floating-point numbers.
 
+typedef vec< 1, bool, packed_mediump > packed_mediump_bvec1
 1 component vector tightly packed in memory of bool values.
 
+typedef vec< 2, bool, packed_mediump > packed_mediump_bvec2
 2 components vector tightly packed in memory of bool values.
 
+typedef vec< 3, bool, packed_mediump > packed_mediump_bvec3
 3 components vector tightly packed in memory of bool values.
 
+typedef vec< 4, bool, packed_mediump > packed_mediump_bvec4
 4 components vector tightly packed in memory of bool values.
 
+typedef mat< 2, 2, double, packed_mediump > packed_mediump_dmat2
 2 by 2 matrix tightly packed in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 2, 2, double, packed_mediump > packed_mediump_dmat2x2
 2 by 2 matrix tightly packed in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 2, 3, double, packed_mediump > packed_mediump_dmat2x3
 2 by 3 matrix tightly packed in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 2, 4, double, packed_mediump > packed_mediump_dmat2x4
 2 by 4 matrix tightly packed in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 3, 3, double, packed_mediump > packed_mediump_dmat3
 3 by 3 matrix tightly packed in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 3, 2, double, packed_mediump > packed_mediump_dmat3x2
 3 by 2 matrix tightly packed in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 3, 3, double, packed_mediump > packed_mediump_dmat3x3
 3 by 3 matrix tightly packed in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 3, 4, double, packed_mediump > packed_mediump_dmat3x4
 3 by 4 matrix tightly packed in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 4, 4, double, packed_mediump > packed_mediump_dmat4
 4 by 4 matrix tightly packed in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 4, 2, double, packed_mediump > packed_mediump_dmat4x2
 4 by 2 matrix tightly packed in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 4, 3, double, packed_mediump > packed_mediump_dmat4x3
 4 by 3 matrix tightly packed in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 4, 4, double, packed_mediump > packed_mediump_dmat4x4
 4 by 4 matrix tightly packed in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef vec< 1, double, packed_mediump > packed_mediump_dvec1
 1 component vector tightly packed in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef vec< 2, double, packed_mediump > packed_mediump_dvec2
 2 components vector tightly packed in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef vec< 3, double, packed_mediump > packed_mediump_dvec3
 3 components vector tightly packed in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef vec< 4, double, packed_mediump > packed_mediump_dvec4
 4 components vector tightly packed in memory of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef vec< 1, int, packed_mediump > packed_mediump_ivec1
 1 component vector tightly packed in memory of signed integer numbers.
 
+typedef vec< 2, int, packed_mediump > packed_mediump_ivec2
 2 components vector tightly packed in memory of signed integer numbers.
 
+typedef vec< 3, int, packed_mediump > packed_mediump_ivec3
 3 components vector tightly packed in memory of signed integer numbers.
 
+typedef vec< 4, int, packed_mediump > packed_mediump_ivec4
 4 components vector tightly packed in memory of signed integer numbers.
 
+typedef mat< 2, 2, float, packed_mediump > packed_mediump_mat2
 2 by 2 matrix tightly packed in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 2, 2, float, packed_mediump > packed_mediump_mat2x2
 2 by 2 matrix tightly packed in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 2, 3, float, packed_mediump > packed_mediump_mat2x3
 2 by 3 matrix tightly packed in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 2, 4, float, packed_mediump > packed_mediump_mat2x4
 2 by 4 matrix tightly packed in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 3, 3, float, packed_mediump > packed_mediump_mat3
 3 by 3 matrix tightly packed in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 3, 2, float, packed_mediump > packed_mediump_mat3x2
 3 by 2 matrix tightly packed in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 3, 3, float, packed_mediump > packed_mediump_mat3x3
 3 by 3 matrix tightly packed in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 3, 4, float, packed_mediump > packed_mediump_mat3x4
 3 by 4 matrix tightly packed in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 4, 4, float, packed_mediump > packed_mediump_mat4
 4 by 4 matrix tightly packed in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 4, 2, float, packed_mediump > packed_mediump_mat4x2
 4 by 2 matrix tightly packed in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 4, 3, float, packed_mediump > packed_mediump_mat4x3
 4 by 3 matrix tightly packed in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef mat< 4, 4, float, packed_mediump > packed_mediump_mat4x4
 4 by 4 matrix tightly packed in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef vec< 1, uint, packed_mediump > packed_mediump_uvec1
 1 component vector tightly packed in memory of unsigned integer numbers.
 
+typedef vec< 2, uint, packed_mediump > packed_mediump_uvec2
 2 components vector tightly packed in memory of unsigned integer numbers.
 
+typedef vec< 3, uint, packed_mediump > packed_mediump_uvec3
 3 components vector tightly packed in memory of unsigned integer numbers.
 
+typedef vec< 4, uint, packed_mediump > packed_mediump_uvec4
 4 components vector tightly packed in memory of unsigned integer numbers.
 
+typedef vec< 1, float, packed_mediump > packed_mediump_vec1
 1 component vector tightly packed in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef vec< 2, float, packed_mediump > packed_mediump_vec2
 2 components vector tightly packed in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef vec< 3, float, packed_mediump > packed_mediump_vec3
 3 components vector tightly packed in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef vec< 4, float, packed_mediump > packed_mediump_vec4
 4 components vector tightly packed in memory of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
 
+typedef packed_highp_uvec1 packed_uvec1
 1 component vector tightly packed in memory of unsigned integer numbers.
 
+typedef packed_highp_uvec2 packed_uvec2
 2 components vector tightly packed in memory of unsigned integer numbers.
 
+typedef packed_highp_uvec3 packed_uvec3
 3 components vector tightly packed in memory of unsigned integer numbers.
 
+typedef packed_highp_uvec4 packed_uvec4
 4 components vector tightly packed in memory of unsigned integer numbers.
 
+typedef packed_highp_vec1 packed_vec1
 1 component vector tightly packed in memory of single-precision floating-point numbers.
 
+typedef packed_highp_vec2 packed_vec2
 2 components vector tightly packed in memory of single-precision floating-point numbers.
 
+typedef packed_highp_vec3 packed_vec3
 3 components vector tightly packed in memory of single-precision floating-point numbers.
 
+typedef packed_highp_vec4 packed_vec4
 4 components vector tightly packed in memory of single-precision floating-point numbers.
 
+

Detailed Description

+

GLM_GTC_type_aligned

+
See also
Core features (dependence)
+ +

Definition in file gtc/type_aligned.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01384_source.html b/common/glm/doc/api/a01384_source.html new file mode 100644 index 000000000..4b68e3886 --- /dev/null +++ b/common/glm/doc/api/a01384_source.html @@ -0,0 +1,434 @@ + + + + + + + +0.9.9 API documenation: type_aligned.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtc/type_aligned.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 #if !GLM_CONFIG_ANONYMOUS_STRUCT
16 # error "GLM: Aligned gentypes require to enable C++ language extensions."
17 #endif
18 
19 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
20 # pragma message("GLM: GLM_GTC_type_aligned extension included")
21 #endif
22 
23 #include "../mat4x4.hpp"
24 #include "../mat4x3.hpp"
25 #include "../mat4x2.hpp"
26 #include "../mat3x4.hpp"
27 #include "../mat3x3.hpp"
28 #include "../mat3x2.hpp"
29 #include "../mat2x4.hpp"
30 #include "../mat2x3.hpp"
31 #include "../mat2x2.hpp"
32 #include "../gtc/vec1.hpp"
33 #include "../vec2.hpp"
34 #include "../vec3.hpp"
35 #include "../vec4.hpp"
36 
37 namespace glm
38 {
41 
42  // -- *vec1 --
43 
45  typedef vec<1, float, aligned_highp> aligned_highp_vec1;
46 
48  typedef vec<1, float, aligned_mediump> aligned_mediump_vec1;
49 
51  typedef vec<1, float, aligned_lowp> aligned_lowp_vec1;
52 
54  typedef vec<1, double, aligned_highp> aligned_highp_dvec1;
55 
57  typedef vec<1, double, aligned_mediump> aligned_mediump_dvec1;
58 
60  typedef vec<1, double, aligned_lowp> aligned_lowp_dvec1;
61 
63  typedef vec<1, int, aligned_highp> aligned_highp_ivec1;
64 
66  typedef vec<1, int, aligned_mediump> aligned_mediump_ivec1;
67 
69  typedef vec<1, int, aligned_lowp> aligned_lowp_ivec1;
70 
72  typedef vec<1, uint, aligned_highp> aligned_highp_uvec1;
73 
75  typedef vec<1, uint, aligned_mediump> aligned_mediump_uvec1;
76 
78  typedef vec<1, uint, aligned_lowp> aligned_lowp_uvec1;
79 
81  typedef vec<1, bool, aligned_highp> aligned_highp_bvec1;
82 
84  typedef vec<1, bool, aligned_mediump> aligned_mediump_bvec1;
85 
87  typedef vec<1, bool, aligned_lowp> aligned_lowp_bvec1;
88 
90  typedef vec<1, float, packed_highp> packed_highp_vec1;
91 
93  typedef vec<1, float, packed_mediump> packed_mediump_vec1;
94 
96  typedef vec<1, float, packed_lowp> packed_lowp_vec1;
97 
99  typedef vec<1, double, packed_highp> packed_highp_dvec1;
100 
102  typedef vec<1, double, packed_mediump> packed_mediump_dvec1;
103 
105  typedef vec<1, double, packed_lowp> packed_lowp_dvec1;
106 
108  typedef vec<1, int, packed_highp> packed_highp_ivec1;
109 
111  typedef vec<1, int, packed_mediump> packed_mediump_ivec1;
112 
114  typedef vec<1, int, packed_lowp> packed_lowp_ivec1;
115 
117  typedef vec<1, uint, packed_highp> packed_highp_uvec1;
118 
120  typedef vec<1, uint, packed_mediump> packed_mediump_uvec1;
121 
123  typedef vec<1, uint, packed_lowp> packed_lowp_uvec1;
124 
126  typedef vec<1, bool, packed_highp> packed_highp_bvec1;
127 
129  typedef vec<1, bool, packed_mediump> packed_mediump_bvec1;
130 
132  typedef vec<1, bool, packed_lowp> packed_lowp_bvec1;
133 
134  // -- *vec2 --
135 
137  typedef vec<2, float, aligned_highp> aligned_highp_vec2;
138 
140  typedef vec<2, float, aligned_mediump> aligned_mediump_vec2;
141 
143  typedef vec<2, float, aligned_lowp> aligned_lowp_vec2;
144 
146  typedef vec<2, double, aligned_highp> aligned_highp_dvec2;
147 
149  typedef vec<2, double, aligned_mediump> aligned_mediump_dvec2;
150 
152  typedef vec<2, double, aligned_lowp> aligned_lowp_dvec2;
153 
155  typedef vec<2, int, aligned_highp> aligned_highp_ivec2;
156 
158  typedef vec<2, int, aligned_mediump> aligned_mediump_ivec2;
159 
161  typedef vec<2, int, aligned_lowp> aligned_lowp_ivec2;
162 
164  typedef vec<2, uint, aligned_highp> aligned_highp_uvec2;
165 
167  typedef vec<2, uint, aligned_mediump> aligned_mediump_uvec2;
168 
170  typedef vec<2, uint, aligned_lowp> aligned_lowp_uvec2;
171 
173  typedef vec<2, bool, aligned_highp> aligned_highp_bvec2;
174 
176  typedef vec<2, bool, aligned_mediump> aligned_mediump_bvec2;
177 
179  typedef vec<2, bool, aligned_lowp> aligned_lowp_bvec2;
180 
182  typedef vec<2, float, packed_highp> packed_highp_vec2;
183 
185  typedef vec<2, float, packed_mediump> packed_mediump_vec2;
186 
188  typedef vec<2, float, packed_lowp> packed_lowp_vec2;
189 
191  typedef vec<2, double, packed_highp> packed_highp_dvec2;
192 
194  typedef vec<2, double, packed_mediump> packed_mediump_dvec2;
195 
197  typedef vec<2, double, packed_lowp> packed_lowp_dvec2;
198 
200  typedef vec<2, int, packed_highp> packed_highp_ivec2;
201 
203  typedef vec<2, int, packed_mediump> packed_mediump_ivec2;
204 
206  typedef vec<2, int, packed_lowp> packed_lowp_ivec2;
207 
209  typedef vec<2, uint, packed_highp> packed_highp_uvec2;
210 
212  typedef vec<2, uint, packed_mediump> packed_mediump_uvec2;
213 
215  typedef vec<2, uint, packed_lowp> packed_lowp_uvec2;
216 
218  typedef vec<2, bool, packed_highp> packed_highp_bvec2;
219 
221  typedef vec<2, bool, packed_mediump> packed_mediump_bvec2;
222 
224  typedef vec<2, bool, packed_lowp> packed_lowp_bvec2;
225 
226  // -- *vec3 --
227 
229  typedef vec<3, float, aligned_highp> aligned_highp_vec3;
230 
232  typedef vec<3, float, aligned_mediump> aligned_mediump_vec3;
233 
235  typedef vec<3, float, aligned_lowp> aligned_lowp_vec3;
236 
238  typedef vec<3, double, aligned_highp> aligned_highp_dvec3;
239 
241  typedef vec<3, double, aligned_mediump> aligned_mediump_dvec3;
242 
244  typedef vec<3, double, aligned_lowp> aligned_lowp_dvec3;
245 
247  typedef vec<3, int, aligned_highp> aligned_highp_ivec3;
248 
250  typedef vec<3, int, aligned_mediump> aligned_mediump_ivec3;
251 
253  typedef vec<3, int, aligned_lowp> aligned_lowp_ivec3;
254 
256  typedef vec<3, uint, aligned_highp> aligned_highp_uvec3;
257 
259  typedef vec<3, uint, aligned_mediump> aligned_mediump_uvec3;
260 
262  typedef vec<3, uint, aligned_lowp> aligned_lowp_uvec3;
263 
265  typedef vec<3, bool, aligned_highp> aligned_highp_bvec3;
266 
268  typedef vec<3, bool, aligned_mediump> aligned_mediump_bvec3;
269 
271  typedef vec<3, bool, aligned_lowp> aligned_lowp_bvec3;
272 
274  typedef vec<3, float, packed_highp> packed_highp_vec3;
275 
277  typedef vec<3, float, packed_mediump> packed_mediump_vec3;
278 
280  typedef vec<3, float, packed_lowp> packed_lowp_vec3;
281 
283  typedef vec<3, double, packed_highp> packed_highp_dvec3;
284 
286  typedef vec<3, double, packed_mediump> packed_mediump_dvec3;
287 
289  typedef vec<3, double, packed_lowp> packed_lowp_dvec3;
290 
292  typedef vec<3, int, packed_highp> packed_highp_ivec3;
293 
295  typedef vec<3, int, packed_mediump> packed_mediump_ivec3;
296 
298  typedef vec<3, int, packed_lowp> packed_lowp_ivec3;
299 
301  typedef vec<3, uint, packed_highp> packed_highp_uvec3;
302 
304  typedef vec<3, uint, packed_mediump> packed_mediump_uvec3;
305 
307  typedef vec<3, uint, packed_lowp> packed_lowp_uvec3;
308 
310  typedef vec<3, bool, packed_highp> packed_highp_bvec3;
311 
313  typedef vec<3, bool, packed_mediump> packed_mediump_bvec3;
314 
316  typedef vec<3, bool, packed_lowp> packed_lowp_bvec3;
317 
318  // -- *vec4 --
319 
321  typedef vec<4, float, aligned_highp> aligned_highp_vec4;
322 
324  typedef vec<4, float, aligned_mediump> aligned_mediump_vec4;
325 
327  typedef vec<4, float, aligned_lowp> aligned_lowp_vec4;
328 
330  typedef vec<4, double, aligned_highp> aligned_highp_dvec4;
331 
333  typedef vec<4, double, aligned_mediump> aligned_mediump_dvec4;
334 
336  typedef vec<4, double, aligned_lowp> aligned_lowp_dvec4;
337 
339  typedef vec<4, int, aligned_highp> aligned_highp_ivec4;
340 
342  typedef vec<4, int, aligned_mediump> aligned_mediump_ivec4;
343 
345  typedef vec<4, int, aligned_lowp> aligned_lowp_ivec4;
346 
348  typedef vec<4, uint, aligned_highp> aligned_highp_uvec4;
349 
351  typedef vec<4, uint, aligned_mediump> aligned_mediump_uvec4;
352 
354  typedef vec<4, uint, aligned_lowp> aligned_lowp_uvec4;
355 
357  typedef vec<4, bool, aligned_highp> aligned_highp_bvec4;
358 
360  typedef vec<4, bool, aligned_mediump> aligned_mediump_bvec4;
361 
363  typedef vec<4, bool, aligned_lowp> aligned_lowp_bvec4;
364 
366  typedef vec<4, float, packed_highp> packed_highp_vec4;
367 
369  typedef vec<4, float, packed_mediump> packed_mediump_vec4;
370 
372  typedef vec<4, float, packed_lowp> packed_lowp_vec4;
373 
375  typedef vec<4, double, packed_highp> packed_highp_dvec4;
376 
378  typedef vec<4, double, packed_mediump> packed_mediump_dvec4;
379 
381  typedef vec<4, double, packed_lowp> packed_lowp_dvec4;
382 
384  typedef vec<4, int, packed_highp> packed_highp_ivec4;
385 
387  typedef vec<4, int, packed_mediump> packed_mediump_ivec4;
388 
390  typedef vec<4, int, packed_lowp> packed_lowp_ivec4;
391 
393  typedef vec<4, uint, packed_highp> packed_highp_uvec4;
394 
396  typedef vec<4, uint, packed_mediump> packed_mediump_uvec4;
397 
399  typedef vec<4, uint, packed_lowp> packed_lowp_uvec4;
400 
402  typedef vec<4, bool, packed_highp> packed_highp_bvec4;
403 
405  typedef vec<4, bool, packed_mediump> packed_mediump_bvec4;
406 
408  typedef vec<4, bool, packed_lowp> packed_lowp_bvec4;
409 
410  // -- *mat2 --
411 
413  typedef mat<2, 2, float, aligned_highp> aligned_highp_mat2;
414 
416  typedef mat<2, 2, float, aligned_mediump> aligned_mediump_mat2;
417 
419  typedef mat<2, 2, float, aligned_lowp> aligned_lowp_mat2;
420 
422  typedef mat<2, 2, double, aligned_highp> aligned_highp_dmat2;
423 
425  typedef mat<2, 2, double, aligned_mediump> aligned_mediump_dmat2;
426 
428  typedef mat<2, 2, double, aligned_lowp> aligned_lowp_dmat2;
429 
431  typedef mat<2, 2, float, packed_highp> packed_highp_mat2;
432 
434  typedef mat<2, 2, float, packed_mediump> packed_mediump_mat2;
435 
437  typedef mat<2, 2, float, packed_lowp> packed_lowp_mat2;
438 
440  typedef mat<2, 2, double, packed_highp> packed_highp_dmat2;
441 
443  typedef mat<2, 2, double, packed_mediump> packed_mediump_dmat2;
444 
446  typedef mat<2, 2, double, packed_lowp> packed_lowp_dmat2;
447 
448  // -- *mat3 --
449 
451  typedef mat<3, 3, float, aligned_highp> aligned_highp_mat3;
452 
454  typedef mat<3, 3, float, aligned_mediump> aligned_mediump_mat3;
455 
457  typedef mat<3, 3, float, aligned_lowp> aligned_lowp_mat3;
458 
460  typedef mat<3, 3, double, aligned_highp> aligned_highp_dmat3;
461 
463  typedef mat<3, 3, double, aligned_mediump> aligned_mediump_dmat3;
464 
466  typedef mat<3, 3, double, aligned_lowp> aligned_lowp_dmat3;
467 
469  typedef mat<3, 3, float, packed_highp> packed_highp_mat3;
470 
472  typedef mat<3, 3, float, packed_mediump> packed_mediump_mat3;
473 
475  typedef mat<3, 3, float, packed_lowp> packed_lowp_mat3;
476 
478  typedef mat<3, 3, double, packed_highp> packed_highp_dmat3;
479 
481  typedef mat<3, 3, double, packed_mediump> packed_mediump_dmat3;
482 
484  typedef mat<3, 3, double, packed_lowp> packed_lowp_dmat3;
485 
486  // -- *mat4 --
487 
489  typedef mat<4, 4, float, aligned_highp> aligned_highp_mat4;
490 
492  typedef mat<4, 4, float, aligned_mediump> aligned_mediump_mat4;
493 
495  typedef mat<4, 4, float, aligned_lowp> aligned_lowp_mat4;
496 
498  typedef mat<4, 4, double, aligned_highp> aligned_highp_dmat4;
499 
501  typedef mat<4, 4, double, aligned_mediump> aligned_mediump_dmat4;
502 
504  typedef mat<4, 4, double, aligned_lowp> aligned_lowp_dmat4;
505 
507  typedef mat<4, 4, float, packed_highp> packed_highp_mat4;
508 
510  typedef mat<4, 4, float, packed_mediump> packed_mediump_mat4;
511 
513  typedef mat<4, 4, float, packed_lowp> packed_lowp_mat4;
514 
516  typedef mat<4, 4, double, packed_highp> packed_highp_dmat4;
517 
519  typedef mat<4, 4, double, packed_mediump> packed_mediump_dmat4;
520 
522  typedef mat<4, 4, double, packed_lowp> packed_lowp_dmat4;
523 
524  // -- *mat2x2 --
525 
527  typedef mat<2, 2, float, aligned_highp> aligned_highp_mat2x2;
528 
530  typedef mat<2, 2, float, aligned_mediump> aligned_mediump_mat2x2;
531 
533  typedef mat<2, 2, float, aligned_lowp> aligned_lowp_mat2x2;
534 
536  typedef mat<2, 2, double, aligned_highp> aligned_highp_dmat2x2;
537 
539  typedef mat<2, 2, double, aligned_mediump> aligned_mediump_dmat2x2;
540 
542  typedef mat<2, 2, double, aligned_lowp> aligned_lowp_dmat2x2;
543 
545  typedef mat<2, 2, float, packed_highp> packed_highp_mat2x2;
546 
548  typedef mat<2, 2, float, packed_mediump> packed_mediump_mat2x2;
549 
551  typedef mat<2, 2, float, packed_lowp> packed_lowp_mat2x2;
552 
554  typedef mat<2, 2, double, packed_highp> packed_highp_dmat2x2;
555 
557  typedef mat<2, 2, double, packed_mediump> packed_mediump_dmat2x2;
558 
560  typedef mat<2, 2, double, packed_lowp> packed_lowp_dmat2x2;
561 
562  // -- *mat2x3 --
563 
565  typedef mat<2, 3, float, aligned_highp> aligned_highp_mat2x3;
566 
568  typedef mat<2, 3, float, aligned_mediump> aligned_mediump_mat2x3;
569 
571  typedef mat<2, 3, float, aligned_lowp> aligned_lowp_mat2x3;
572 
574  typedef mat<2, 3, double, aligned_highp> aligned_highp_dmat2x3;
575 
577  typedef mat<2, 3, double, aligned_mediump> aligned_mediump_dmat2x3;
578 
580  typedef mat<2, 3, double, aligned_lowp> aligned_lowp_dmat2x3;
581 
583  typedef mat<2, 3, float, packed_highp> packed_highp_mat2x3;
584 
586  typedef mat<2, 3, float, packed_mediump> packed_mediump_mat2x3;
587 
589  typedef mat<2, 3, float, packed_lowp> packed_lowp_mat2x3;
590 
592  typedef mat<2, 3, double, packed_highp> packed_highp_dmat2x3;
593 
595  typedef mat<2, 3, double, packed_mediump> packed_mediump_dmat2x3;
596 
598  typedef mat<2, 3, double, packed_lowp> packed_lowp_dmat2x3;
599 
600  // -- *mat2x4 --
601 
603  typedef mat<2, 4, float, aligned_highp> aligned_highp_mat2x4;
604 
606  typedef mat<2, 4, float, aligned_mediump> aligned_mediump_mat2x4;
607 
609  typedef mat<2, 4, float, aligned_lowp> aligned_lowp_mat2x4;
610 
612  typedef mat<2, 4, double, aligned_highp> aligned_highp_dmat2x4;
613 
615  typedef mat<2, 4, double, aligned_mediump> aligned_mediump_dmat2x4;
616 
618  typedef mat<2, 4, double, aligned_lowp> aligned_lowp_dmat2x4;
619 
621  typedef mat<2, 4, float, packed_highp> packed_highp_mat2x4;
622 
624  typedef mat<2, 4, float, packed_mediump> packed_mediump_mat2x4;
625 
627  typedef mat<2, 4, float, packed_lowp> packed_lowp_mat2x4;
628 
630  typedef mat<2, 4, double, packed_highp> packed_highp_dmat2x4;
631 
633  typedef mat<2, 4, double, packed_mediump> packed_mediump_dmat2x4;
634 
636  typedef mat<2, 4, double, packed_lowp> packed_lowp_dmat2x4;
637 
638  // -- *mat3x2 --
639 
641  typedef mat<3, 2, float, aligned_highp> aligned_highp_mat3x2;
642 
644  typedef mat<3, 2, float, aligned_mediump> aligned_mediump_mat3x2;
645 
647  typedef mat<3, 2, float, aligned_lowp> aligned_lowp_mat3x2;
648 
650  typedef mat<3, 2, double, aligned_highp> aligned_highp_dmat3x2;
651 
653  typedef mat<3, 2, double, aligned_mediump> aligned_mediump_dmat3x2;
654 
656  typedef mat<3, 2, double, aligned_lowp> aligned_lowp_dmat3x2;
657 
659  typedef mat<3, 2, float, packed_highp> packed_highp_mat3x2;
660 
662  typedef mat<3, 2, float, packed_mediump> packed_mediump_mat3x2;
663 
665  typedef mat<3, 2, float, packed_lowp> packed_lowp_mat3x2;
666 
668  typedef mat<3, 2, double, packed_highp> packed_highp_dmat3x2;
669 
671  typedef mat<3, 2, double, packed_mediump> packed_mediump_dmat3x2;
672 
674  typedef mat<3, 2, double, packed_lowp> packed_lowp_dmat3x2;
675 
676  // -- *mat3x3 --
677 
679  typedef mat<3, 3, float, aligned_highp> aligned_highp_mat3x3;
680 
682  typedef mat<3, 3, float, aligned_mediump> aligned_mediump_mat3x3;
683 
685  typedef mat<3, 3, float, aligned_lowp> aligned_lowp_mat3x3;
686 
688  typedef mat<3, 3, double, aligned_highp> aligned_highp_dmat3x3;
689 
691  typedef mat<3, 3, double, aligned_mediump> aligned_mediump_dmat3x3;
692 
694  typedef mat<3, 3, double, aligned_lowp> aligned_lowp_dmat3x3;
695 
697  typedef mat<3, 3, float, packed_highp> packed_highp_mat3x3;
698 
700  typedef mat<3, 3, float, packed_mediump> packed_mediump_mat3x3;
701 
703  typedef mat<3, 3, float, packed_lowp> packed_lowp_mat3x3;
704 
706  typedef mat<3, 3, double, packed_highp> packed_highp_dmat3x3;
707 
709  typedef mat<3, 3, double, packed_mediump> packed_mediump_dmat3x3;
710 
712  typedef mat<3, 3, double, packed_lowp> packed_lowp_dmat3x3;
713 
714  // -- *mat3x4 --
715 
717  typedef mat<3, 4, float, aligned_highp> aligned_highp_mat3x4;
718 
720  typedef mat<3, 4, float, aligned_mediump> aligned_mediump_mat3x4;
721 
723  typedef mat<3, 4, float, aligned_lowp> aligned_lowp_mat3x4;
724 
726  typedef mat<3, 4, double, aligned_highp> aligned_highp_dmat3x4;
727 
729  typedef mat<3, 4, double, aligned_mediump> aligned_mediump_dmat3x4;
730 
732  typedef mat<3, 4, double, aligned_lowp> aligned_lowp_dmat3x4;
733 
735  typedef mat<3, 4, float, packed_highp> packed_highp_mat3x4;
736 
738  typedef mat<3, 4, float, packed_mediump> packed_mediump_mat3x4;
739 
741  typedef mat<3, 4, float, packed_lowp> packed_lowp_mat3x4;
742 
744  typedef mat<3, 4, double, packed_highp> packed_highp_dmat3x4;
745 
747  typedef mat<3, 4, double, packed_mediump> packed_mediump_dmat3x4;
748 
750  typedef mat<3, 4, double, packed_lowp> packed_lowp_dmat3x4;
751 
752  // -- *mat4x2 --
753 
755  typedef mat<4, 2, float, aligned_highp> aligned_highp_mat4x2;
756 
758  typedef mat<4, 2, float, aligned_mediump> aligned_mediump_mat4x2;
759 
761  typedef mat<4, 2, float, aligned_lowp> aligned_lowp_mat4x2;
762 
764  typedef mat<4, 2, double, aligned_highp> aligned_highp_dmat4x2;
765 
767  typedef mat<4, 2, double, aligned_mediump> aligned_mediump_dmat4x2;
768 
770  typedef mat<4, 2, double, aligned_lowp> aligned_lowp_dmat4x2;
771 
773  typedef mat<4, 2, float, packed_highp> packed_highp_mat4x2;
774 
776  typedef mat<4, 2, float, packed_mediump> packed_mediump_mat4x2;
777 
779  typedef mat<4, 2, float, packed_lowp> packed_lowp_mat4x2;
780 
782  typedef mat<4, 2, double, packed_highp> packed_highp_dmat4x2;
783 
785  typedef mat<4, 2, double, packed_mediump> packed_mediump_dmat4x2;
786 
788  typedef mat<4, 2, double, packed_lowp> packed_lowp_dmat4x2;
789 
790  // -- *mat4x3 --
791 
793  typedef mat<4, 3, float, aligned_highp> aligned_highp_mat4x3;
794 
796  typedef mat<4, 3, float, aligned_mediump> aligned_mediump_mat4x3;
797 
799  typedef mat<4, 3, float, aligned_lowp> aligned_lowp_mat4x3;
800 
802  typedef mat<4, 3, double, aligned_highp> aligned_highp_dmat4x3;
803 
805  typedef mat<4, 3, double, aligned_mediump> aligned_mediump_dmat4x3;
806 
808  typedef mat<4, 3, double, aligned_lowp> aligned_lowp_dmat4x3;
809 
811  typedef mat<4, 3, float, packed_highp> packed_highp_mat4x3;
812 
814  typedef mat<4, 3, float, packed_mediump> packed_mediump_mat4x3;
815 
817  typedef mat<4, 3, float, packed_lowp> packed_lowp_mat4x3;
818 
820  typedef mat<4, 3, double, packed_highp> packed_highp_dmat4x3;
821 
823  typedef mat<4, 3, double, packed_mediump> packed_mediump_dmat4x3;
824 
826  typedef mat<4, 3, double, packed_lowp> packed_lowp_dmat4x3;
827 
828  // -- *mat4x4 --
829 
831  typedef mat<4, 4, float, aligned_highp> aligned_highp_mat4x4;
832 
834  typedef mat<4, 4, float, aligned_mediump> aligned_mediump_mat4x4;
835 
837  typedef mat<4, 4, float, aligned_lowp> aligned_lowp_mat4x4;
838 
840  typedef mat<4, 4, double, aligned_highp> aligned_highp_dmat4x4;
841 
843  typedef mat<4, 4, double, aligned_mediump> aligned_mediump_dmat4x4;
844 
846  typedef mat<4, 4, double, aligned_lowp> aligned_lowp_dmat4x4;
847 
849  typedef mat<4, 4, float, packed_highp> packed_highp_mat4x4;
850 
852  typedef mat<4, 4, float, packed_mediump> packed_mediump_mat4x4;
853 
855  typedef mat<4, 4, float, packed_lowp> packed_lowp_mat4x4;
856 
858  typedef mat<4, 4, double, packed_highp> packed_highp_dmat4x4;
859 
861  typedef mat<4, 4, double, packed_mediump> packed_mediump_dmat4x4;
862 
864  typedef mat<4, 4, double, packed_lowp> packed_lowp_dmat4x4;
865 
866  // -- default --
867 
868 #if(defined(GLM_PRECISION_LOWP_FLOAT))
877 
884 
903 #elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))
912 
919 
938 #else //defined(GLM_PRECISION_HIGHP_FLOAT)
941 
944 
947 
950 
953 
956 
959 
962 
965 
968 
971 
974 
977 
980 
983 
986 
989 
992 
995 
998 
1001 
1004 
1007 
1010 
1013 
1016 
1019 
1022 
1025 
1028 
1031 
1034 #endif//GLM_PRECISION
1035 
1036 #if(defined(GLM_PRECISION_LOWP_DOUBLE))
1045 
1052 
1071 #elif(defined(GLM_PRECISION_MEDIUMP_DOUBLE))
1080 
1087 
1106 #else //defined(GLM_PRECISION_HIGHP_DOUBLE)
1109 
1112 
1115 
1118 
1121 
1124 
1127 
1130 
1133 
1136 
1139 
1142 
1145 
1148 
1151 
1154 
1157 
1160 
1163 
1166 
1169 
1172 
1175 
1178 
1181 
1184 
1187 
1190 
1193 
1196 
1199 
1202 #endif//GLM_PRECISION
1203 
1204 #if(defined(GLM_PRECISION_LOWP_INT))
1209 #elif(defined(GLM_PRECISION_MEDIUMP_INT))
1214 #else //defined(GLM_PRECISION_HIGHP_INT)
1217 
1220 
1223 
1226 
1229 
1232 
1235 
1238 #endif//GLM_PRECISION
1239 
1240  // -- Unsigned integer definition --
1241 
1242 #if(defined(GLM_PRECISION_LOWP_UINT))
1247 #elif(defined(GLM_PRECISION_MEDIUMP_UINT))
1252 #else //defined(GLM_PRECISION_HIGHP_UINT)
1255 
1258 
1261 
1264 
1267 
1270 
1273 
1276 #endif//GLM_PRECISION
1277 
1278 #if(defined(GLM_PRECISION_LOWP_BOOL))
1283 #elif(defined(GLM_PRECISION_MEDIUMP_BOOL))
1288 #else //defined(GLM_PRECISION_HIGHP_BOOL)
1291 
1294 
1297 
1300 
1303 
1306 
1309 
1312 #endif//GLM_PRECISION
1313 
1315 }//namespace glm
mat< 3, 4, double, aligned_lowp > aligned_lowp_dmat3x4
3 by 4 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
vec< 2, bool, aligned_mediump > aligned_mediump_bvec2
2 components vector aligned in memory of bool values.
+
vec< 4, bool, packed_lowp > packed_lowp_bvec4
4 components vector tightly packed in memory of bool values.
+
aligned_highp_mat2x4 aligned_mat2x4
2 by 4 matrix tightly aligned in memory of single-precision floating-point numbers.
+
vec< 1, bool, packed_highp > packed_highp_bvec1
1 component vector tightly packed in memory of bool values.
+
mat< 4, 3, double, aligned_highp > aligned_highp_dmat4x3
4 by 3 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
vec< 3, float, aligned_highp > aligned_highp_vec3
3 components vector aligned in memory of single-precision floating-point numbers using high precision...
+
aligned_highp_dmat3x2 aligned_dmat3x2
3 by 2 matrix tightly aligned in memory of double-precision floating-point numbers.
+
mat< 3, 4, double, aligned_highp > aligned_highp_dmat3x4
3 by 4 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
vec< 3, uint, aligned_mediump > aligned_mediump_uvec3
3 components vector aligned in memory of unsigned integer numbers.
+
mat< 3, 4, float, aligned_lowp > aligned_lowp_mat3x4
3 by 4 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
vec< 3, int, packed_highp > packed_highp_ivec3
3 components vector tightly packed in memory of signed integer numbers.
+
mat< 3, 2, float, aligned_lowp > aligned_lowp_mat3x2
3 by 2 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
mat< 4, 3, float, packed_mediump > packed_mediump_mat4x3
4 by 3 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
packed_highp_bvec1 packed_bvec1
1 components vector tightly packed in memory of bool values.
+
mat< 4, 3, float, packed_lowp > packed_lowp_mat4x3
4 by 3 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
vec< 4, float, packed_highp > packed_highp_vec4
4 components vector tightly packed in memory of single-precision floating-point numbers using high pr...
+
vec< 2, double, packed_highp > packed_highp_dvec2
2 components vector tightly packed in memory of double-precision floating-point numbers using high pr...
+
packed_highp_dmat2 packed_dmat2
2 by 2 matrix tightly packed in memory of double-precision floating-point numbers.
+
vec< 2, float, aligned_mediump > aligned_mediump_vec2
2 components vector aligned in memory of single-precision floating-point numbers using medium precisi...
+
vec< 3, double, aligned_lowp > aligned_lowp_dvec3
3 components vector aligned in memory of double-precision floating-point numbers using low precision ...
+
mat< 3, 3, double, aligned_lowp > aligned_lowp_dmat3x3
3 by 3 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
mat< 4, 2, double, packed_lowp > packed_lowp_dmat4x2
4 by 2 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
vec< 3, uint, packed_highp > packed_highp_uvec3
3 components vector tightly packed in memory of unsigned integer numbers.
+
vec< 3, float, packed_lowp > packed_lowp_vec3
3 components vector tightly packed in memory of single-precision floating-point numbers using low pre...
+
vec< 3, uint, aligned_highp > aligned_highp_uvec3
3 components vector aligned in memory of unsigned integer numbers.
+
vec< 1, uint, aligned_mediump > aligned_mediump_uvec1
1 component vector aligned in memory of unsigned integer numbers.
+
packed_highp_mat3 packed_mat3
3 by 3 matrix tightly packed in memory of single-precision floating-point numbers.
+
mat< 2, 2, float, aligned_highp > aligned_highp_mat2x2
2 by 2 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
aligned_highp_dmat2x3 aligned_dmat2x3
2 by 3 matrix tightly aligned in memory of double-precision floating-point numbers.
+
mat< 4, 2, double, aligned_highp > aligned_highp_dmat4x2
4 by 2 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
packed_highp_vec2 packed_vec2
2 components vector tightly packed in memory of single-precision floating-point numbers.
+
aligned_highp_dmat4 aligned_dmat4
4 by 4 matrix tightly aligned in memory of double-precision floating-point numbers.
+
packed_highp_uvec2 packed_uvec2
2 components vector tightly packed in memory of unsigned integer numbers.
+
mat< 3, 3, double, packed_highp > packed_highp_dmat3x3
3 by 3 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
packed_highp_dmat2x2 packed_dmat2x2
2 by 2 matrix tightly packed in memory of double-precision floating-point numbers.
+
mat< 4, 4, float, packed_mediump > packed_mediump_mat4
4 by 4 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
packed_highp_mat4x4 packed_mat4x4
4 by 4 matrix tightly packed in memory of single-precision floating-point numbers.
+
vec< 4, uint, aligned_mediump > aligned_mediump_uvec4
4 components vector aligned in memory of unsigned integer numbers.
+
mat< 3, 3, float, aligned_highp > aligned_highp_mat3x3
3 by 3 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
vec< 4, int, aligned_highp > aligned_highp_ivec4
4 components vector aligned in memory of signed integer numbers.
+
aligned_highp_uvec1 aligned_uvec1
1 component vector aligned in memory of unsigned integer numbers.
+
vec< 1, double, packed_lowp > packed_lowp_dvec1
1 component vector tightly packed in memory of double-precision floating-point numbers using low prec...
+
mat< 2, 2, float, aligned_highp > aligned_highp_mat2
2 by 2 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
vec< 2, uint, packed_lowp > packed_lowp_uvec2
2 components vector tightly packed in memory of unsigned integer numbers.
+
vec< 1, int, aligned_lowp > aligned_lowp_ivec1
1 component vector aligned in memory of signed integer numbers.
+
mat< 4, 2, double, packed_highp > packed_highp_dmat4x2
4 by 2 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
vec< 2, bool, aligned_highp > aligned_highp_bvec2
2 components vector aligned in memory of bool values.
+
packed_highp_dmat4x2 packed_dmat4x2
4 by 2 matrix tightly packed in memory of double-precision floating-point numbers.
+
packed_highp_uvec1 packed_uvec1
1 component vector tightly packed in memory of unsigned integer numbers.
+
vec< 1, bool, aligned_highp > aligned_highp_bvec1
1 component vector aligned in memory of bool values.
+
mat< 2, 4, double, aligned_highp > aligned_highp_dmat2x4
2 by 4 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
packed_highp_vec4 packed_vec4
4 components vector tightly packed in memory of single-precision floating-point numbers.
+
vec< 3, bool, aligned_mediump > aligned_mediump_bvec3
3 components vector aligned in memory of bool values.
+
vec< 3, double, aligned_mediump > aligned_mediump_dvec3
3 components vector aligned in memory of double-precision floating-point numbers using medium precisi...
+
mat< 4, 4, double, aligned_mediump > aligned_mediump_dmat4x4
4 by 4 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
vec< 1, uint, packed_highp > packed_highp_uvec1
1 component vector tightly packed in memory of unsigned integer numbers.
+
vec< 2, int, aligned_lowp > aligned_lowp_ivec2
2 components vector aligned in memory of signed integer numbers.
+
mat< 2, 3, double, packed_lowp > packed_lowp_dmat2x3
2 by 3 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
vec< 3, double, packed_lowp > packed_lowp_dvec3
3 components vector tightly packed in memory of double-precision floating-point numbers using low pre...
+
aligned_highp_vec3 aligned_vec3
3 components vector aligned in memory of single-precision floating-point numbers. ...
+
mat< 2, 2, float, packed_mediump > packed_mediump_mat2
2 by 2 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
aligned_highp_ivec2 aligned_ivec2
2 components vector aligned in memory of signed integer numbers.
+
vec< 2, float, packed_mediump > packed_mediump_vec2
2 components vector tightly packed in memory of single-precision floating-point numbers using medium ...
+
mat< 4, 4, float, packed_lowp > packed_lowp_mat4x4
4 by 4 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
vec< 3, double, packed_highp > packed_highp_dvec3
3 components vector tightly packed in memory of double-precision floating-point numbers using high pr...
+
vec< 4, uint, aligned_highp > aligned_highp_uvec4
4 components vector aligned in memory of unsigned integer numbers.
+
aligned_highp_dmat2x4 aligned_dmat2x4
2 by 4 matrix tightly aligned in memory of double-precision floating-point numbers.
+
packed_highp_bvec2 packed_bvec2
2 components vector tightly packed in memory of bool values.
+
aligned_highp_ivec4 aligned_ivec4
4 components vector aligned in memory of signed integer numbers.
+
vec< 2, double, aligned_mediump > aligned_mediump_dvec2
2 components vector aligned in memory of double-precision floating-point numbers using medium precisi...
+
vec< 3, int, packed_mediump > packed_mediump_ivec3
3 components vector tightly packed in memory of signed integer numbers.
+
vec< 4, float, aligned_highp > aligned_highp_vec4
4 components vector aligned in memory of single-precision floating-point numbers using high precision...
+
packed_highp_ivec2 packed_ivec2
2 components vector tightly packed in memory of signed integer numbers.
+
aligned_highp_ivec3 aligned_ivec3
3 components vector aligned in memory of signed integer numbers.
+
mat< 2, 4, double, aligned_lowp > aligned_lowp_dmat2x4
2 by 4 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
mat< 3, 2, double, aligned_highp > aligned_highp_dmat3x2
3 by 2 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
vec< 1, int, aligned_highp > aligned_highp_ivec1
1 component vector aligned in memory of signed integer numbers.
+
aligned_highp_dmat2x2 aligned_dmat2x2
2 by 2 matrix tightly aligned in memory of double-precision floating-point numbers.
+
mat< 2, 4, float, aligned_mediump > aligned_mediump_mat2x4
2 by 4 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
mat< 3, 4, float, packed_lowp > packed_lowp_mat3x4
3 by 4 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
mat< 3, 3, double, aligned_highp > aligned_highp_dmat3x3
3 by 3 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
mat< 3, 4, double, packed_mediump > packed_mediump_dmat3x4
3 by 4 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
mat< 3, 2, float, packed_highp > packed_highp_mat3x2
3 by 2 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
vec< 3, float, aligned_lowp > aligned_lowp_vec3
3 components vector aligned in memory of single-precision floating-point numbers using low precision ...
+
aligned_highp_dmat4x3 aligned_dmat4x3
4 by 3 matrix tightly aligned in memory of double-precision floating-point numbers.
+
vec< 2, int, packed_mediump > packed_mediump_ivec2
2 components vector tightly packed in memory of signed integer numbers.
+
mat< 4, 4, float, aligned_mediump > aligned_mediump_mat4
4 by 4 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
vec< 3, float, packed_mediump > packed_mediump_vec3
3 components vector tightly packed in memory of single-precision floating-point numbers using medium ...
+
aligned_highp_bvec1 aligned_bvec1
1 component vector aligned in memory of bool values.
+
mat< 3, 3, float, aligned_highp > aligned_highp_mat3
3 by 3 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
vec< 1, float, aligned_highp > aligned_highp_vec1
1 component vector aligned in memory of single-precision floating-point numbers using high precision ...
+
mat< 4, 4, double, aligned_highp > aligned_highp_dmat4
4 by 4 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
mat< 4, 2, double, aligned_mediump > aligned_mediump_dmat4x2
4 by 2 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
mat< 2, 4, float, packed_lowp > packed_lowp_mat2x4
2 by 4 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
aligned_highp_mat3x4 aligned_mat3x4
3 by 4 matrix tightly aligned in memory of single-precision floating-point numbers.
+
packed_highp_dmat3x4 packed_dmat3x4
3 by 4 matrix tightly packed in memory of double-precision floating-point numbers.
+
mat< 3, 2, float, packed_lowp > packed_lowp_mat3x2
3 by 2 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
vec< 2, double, aligned_lowp > aligned_lowp_dvec2
2 components vector aligned in memory of double-precision floating-point numbers using low precision ...
+
vec< 4, bool, packed_mediump > packed_mediump_bvec4
4 components vector tightly packed in memory of bool values.
+
vec< 2, uint, packed_highp > packed_highp_uvec2
2 components vector tightly packed in memory of unsigned integer numbers.
+
vec< 2, bool, packed_lowp > packed_lowp_bvec2
2 components vector tightly packed in memory of bool values.
+
mat< 3, 4, double, aligned_mediump > aligned_mediump_dmat3x4
3 by 4 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
vec< 1, double, aligned_highp > aligned_highp_dvec1
1 component vector aligned in memory of double-precision floating-point numbers using high precision ...
+
packed_highp_bvec4 packed_bvec4
4 components vector tightly packed in memory of bool values.
+
aligned_highp_mat3 aligned_mat3
3 by 3 matrix tightly aligned in memory of single-precision floating-point numbers.
+
mat< 2, 2, double, packed_highp > packed_highp_dmat2
2 by 2 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
packed_highp_dmat2x4 packed_dmat2x4
2 by 4 matrix tightly packed in memory of double-precision floating-point numbers.
+
packed_highp_mat4x3 packed_mat4x3
4 by 3 matrix tightly packed in memory of single-precision floating-point numbers.
+
mat< 2, 2, double, aligned_lowp > aligned_lowp_dmat2x2
2 by 2 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
mat< 3, 2, float, aligned_mediump > aligned_mediump_mat3x2
3 by 2 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
vec< 2, uint, packed_mediump > packed_mediump_uvec2
2 components vector tightly packed in memory of unsigned integer numbers.
+
vec< 2, int, packed_lowp > packed_lowp_ivec2
2 components vector tightly packed in memory of signed integer numbers.
+
mat< 4, 2, float, aligned_mediump > aligned_mediump_mat4x2
4 by 2 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
vec< 1, double, aligned_lowp > aligned_lowp_dvec1
1 component vector aligned in memory of double-precision floating-point numbers using low precision a...
+
vec< 4, bool, aligned_lowp > aligned_lowp_bvec4
4 components vector aligned in memory of bool values.
+
vec< 4, uint, aligned_lowp > aligned_lowp_uvec4
4 components vector aligned in memory of unsigned integer numbers.
+
mat< 2, 4, double, aligned_mediump > aligned_mediump_dmat2x4
2 by 4 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
mat< 2, 2, double, packed_highp > packed_highp_dmat2x2
2 by 2 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
mat< 4, 4, float, packed_lowp > packed_lowp_mat4
4 by 4 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
packed_highp_mat4 packed_mat4
4 by 4 matrix tightly packed in memory of single-precision floating-point numbers.
+
aligned_highp_dvec4 aligned_dvec4
4 components vector aligned in memory of double-precision floating-point numbers. ...
+
packed_highp_mat2x3 packed_mat2x3
2 by 3 matrix tightly packed in memory of single-precision floating-point numbers.
+
mat< 4, 4, double, packed_mediump > packed_mediump_dmat4x4
4 by 4 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
mat< 4, 2, double, aligned_lowp > aligned_lowp_dmat4x2
4 by 2 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
aligned_highp_dmat3x3 aligned_dmat3x3
3 by 3 matrix tightly aligned in memory of double-precision floating-point numbers.
+
aligned_highp_mat2x3 aligned_mat2x3
2 by 3 matrix tightly aligned in memory of single-precision floating-point numbers.
+
mat< 2, 3, float, aligned_mediump > aligned_mediump_mat2x3
2 by 3 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
mat< 2, 2, double, packed_lowp > packed_lowp_dmat2
2 by 2 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
aligned_highp_bvec2 aligned_bvec2
2 components vector aligned in memory of bool values.
+
vec< 1, bool, packed_lowp > packed_lowp_bvec1
1 component vector tightly packed in memory of bool values.
+
vec< 2, float, packed_highp > packed_highp_vec2
2 components vector tightly packed in memory of single-precision floating-point numbers using high pr...
+
packed_highp_vec1 packed_vec1
1 component vector tightly packed in memory of single-precision floating-point numbers.
+
packed_highp_dmat3x3 packed_dmat3x3
3 by 3 matrix tightly packed in memory of double-precision floating-point numbers.
+
mat< 3, 3, double, packed_mediump > packed_mediump_dmat3
3 by 3 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
vec< 1, int, packed_highp > packed_highp_ivec1
1 component vector tightly packed in memory of signed integer numbers.
+
mat< 3, 2, double, aligned_lowp > aligned_lowp_dmat3x2
3 by 2 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
vec< 4, double, aligned_highp > aligned_highp_dvec4
4 components vector aligned in memory of double-precision floating-point numbers using high precision...
+
mat< 4, 4, float, aligned_lowp > aligned_lowp_mat4x4
4 by 4 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
packed_highp_dmat3x2 packed_dmat3x2
3 by 2 matrix tightly packed in memory of double-precision floating-point numbers.
+
mat< 4, 3, float, aligned_highp > aligned_highp_mat4x3
4 by 3 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
vec< 1, float, packed_lowp > packed_lowp_vec1
1 component vector tightly packed in memory of single-precision floating-point numbers using low prec...
+
mat< 2, 3, double, aligned_mediump > aligned_mediump_dmat2x3
2 by 3 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
mat< 2, 3, double, packed_highp > packed_highp_dmat2x3
2 by 3 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
packed_highp_dmat2x3 packed_dmat2x3
2 by 3 matrix tightly packed in memory of double-precision floating-point numbers.
+
mat< 4, 4, double, packed_lowp > packed_lowp_dmat4
4 by 4 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
mat< 3, 3, float, packed_lowp > packed_lowp_mat3
3 by 3 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
packed_highp_uvec4 packed_uvec4
4 components vector tightly packed in memory of unsigned integer numbers.
+
vec< 4, uint, packed_mediump > packed_mediump_uvec4
4 components vector tightly packed in memory of unsigned integer numbers.
+
mat< 4, 4, double, aligned_mediump > aligned_mediump_dmat4
4 by 4 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
vec< 2, bool, packed_mediump > packed_mediump_bvec2
2 components vector tightly packed in memory of bool values.
+
vec< 3, float, aligned_mediump > aligned_mediump_vec3
3 components vector aligned in memory of single-precision floating-point numbers using medium precisi...
+
vec< 2, uint, aligned_highp > aligned_highp_uvec2
2 components vector aligned in memory of unsigned integer numbers.
+
vec< 3, bool, packed_highp > packed_highp_bvec3
3 components vector tightly packed in memory of bool values.
+
vec< 1, float, aligned_mediump > aligned_mediump_vec1
1 component vector aligned in memory of single-precision floating-point numbers using medium precisio...
+
vec< 4, int, aligned_lowp > aligned_lowp_ivec4
4 components vector aligned in memory of signed integer numbers.
+
aligned_highp_uvec3 aligned_uvec3
3 components vector aligned in memory of unsigned integer numbers.
+
aligned_highp_vec2 aligned_vec2
2 components vector aligned in memory of single-precision floating-point numbers. ...
+
aligned_highp_dmat2 aligned_dmat2
2 by 2 matrix tightly aligned in memory of double-precision floating-point numbers.
+
vec< 3, int, aligned_highp > aligned_highp_ivec3
3 components vector aligned in memory of signed integer numbers.
+
mat< 3, 4, float, packed_mediump > packed_mediump_mat3x4
3 by 4 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
packed_highp_ivec3 packed_ivec3
3 components vector tightly packed in memory of signed integer numbers.
+
mat< 2, 4, float, packed_highp > packed_highp_mat2x4
2 by 4 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
mat< 4, 4, double, packed_highp > packed_highp_dmat4x4
4 by 4 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
mat< 2, 3, double, aligned_lowp > aligned_lowp_dmat2x3
2 by 3 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
mat< 2, 3, float, packed_mediump > packed_mediump_mat2x3
2 by 3 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
packed_highp_vec3 packed_vec3
3 components vector tightly packed in memory of single-precision floating-point numbers.
+
vec< 3, int, aligned_mediump > aligned_mediump_ivec3
3 components vector aligned in memory of signed integer numbers.
+
vec< 4, bool, aligned_mediump > aligned_mediump_bvec4
4 components vector aligned in memory of bool values.
+
packed_highp_mat4x2 packed_mat4x2
4 by 2 matrix tightly packed in memory of single-precision floating-point numbers.
+
packed_highp_mat2x2 packed_mat2x2
2 by 2 matrix tightly packed in memory of single-precision floating-point numbers.
+
mat< 2, 3, float, packed_highp > packed_highp_mat2x3
2 by 3 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
mat< 2, 2, float, aligned_mediump > aligned_mediump_mat2
2 by 2 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
mat< 3, 3, float, aligned_lowp > aligned_lowp_mat3
3 by 3 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
mat< 2, 4, float, packed_mediump > packed_mediump_mat2x4
2 by 4 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
aligned_highp_vec1 aligned_vec1
1 component vector aligned in memory of single-precision floating-point numbers.
+
aligned_highp_mat4x3 aligned_mat4x3
4 by 3 matrix tightly aligned in memory of single-precision floating-point numbers.
+
vec< 1, int, aligned_mediump > aligned_mediump_ivec1
1 component vector aligned in memory of signed integer numbers.
+
mat< 4, 4, float, packed_highp > packed_highp_mat4x4
4 by 4 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
aligned_highp_mat4 aligned_mat4
4 by 4 matrix tightly aligned in memory of single-precision floating-point numbers.
+
aligned_highp_uvec2 aligned_uvec2
2 components vector aligned in memory of unsigned integer numbers.
+
mat< 3, 3, double, aligned_lowp > aligned_lowp_dmat3
3 by 3 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
vec< 2, float, aligned_lowp > aligned_lowp_vec2
2 components vector aligned in memory of single-precision floating-point numbers using low precision ...
+
vec< 4, uint, packed_lowp > packed_lowp_uvec4
4 components vector tightly packed in memory of unsigned integer numbers.
+
mat< 4, 2, float, packed_lowp > packed_lowp_mat4x2
4 by 2 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
vec< 4, float, aligned_mediump > aligned_mediump_vec4
4 components vector aligned in memory of single-precision floating-point numbers using medium precisi...
+
mat< 2, 2, double, aligned_mediump > aligned_mediump_dmat2x2
2 by 2 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
aligned_highp_mat2 aligned_mat2
2 by 2 matrix tightly aligned in memory of single-precision floating-point numbers.
+
vec< 4, int, aligned_mediump > aligned_mediump_ivec4
4 components vector aligned in memory of signed integer numbers.
+
packed_highp_dmat3 packed_dmat3
3 by 3 matrix tightly packed in memory of double-precision floating-point numbers.
+
vec< 4, double, packed_mediump > packed_mediump_dvec4
4 components vector tightly packed in memory of double-precision floating-point numbers using medium ...
+
aligned_highp_dvec1 aligned_dvec1
1 component vector aligned in memory of double-precision floating-point numbers.
+
packed_highp_ivec4 packed_ivec4
4 components vector tightly packed in memory of signed integer numbers.
+
mat< 4, 2, float, packed_highp > packed_highp_mat4x2
4 by 2 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
vec< 3, bool, packed_mediump > packed_mediump_bvec3
3 components vector tightly packed in memory of bool values.
+
mat< 4, 3, double, packed_lowp > packed_lowp_dmat4x3
4 by 3 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
vec< 4, float, packed_lowp > packed_lowp_vec4
4 components vector tightly packed in memory of single-precision floating-point numbers using low pre...
+
vec< 2, int, aligned_highp > aligned_highp_ivec2
2 components vector aligned in memory of signed integer numbers.
+
aligned_highp_vec4 aligned_vec4
4 components vector aligned in memory of single-precision floating-point numbers. ...
+
mat< 3, 3, double, aligned_highp > aligned_highp_dmat3
3 by 3 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
mat< 2, 4, float, aligned_highp > aligned_highp_mat2x4
2 by 4 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
mat< 4, 4, double, aligned_highp > aligned_highp_dmat4x4
4 by 4 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
packed_highp_dmat4x4 packed_dmat4x4
4 by 4 matrix tightly packed in memory of double-precision floating-point numbers.
+
mat< 3, 3, double, aligned_mediump > aligned_mediump_dmat3x3
3 by 3 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
mat< 4, 3, double, packed_highp > packed_highp_dmat4x3
4 by 3 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
vec< 4, uint, packed_highp > packed_highp_uvec4
4 components vector tightly packed in memory of unsigned integer numbers.
+
vec< 3, double, aligned_highp > aligned_highp_dvec3
3 components vector aligned in memory of double-precision floating-point numbers using high precision...
+
packed_highp_mat3x3 packed_mat3x3
3 by 3 matrix tightly packed in memory of single-precision floating-point numbers.
+
vec< 1, uint, packed_lowp > packed_lowp_uvec1
1 component vector tightly packed in memory of unsigned integer numbers.
+
vec< 1, float, packed_mediump > packed_mediump_vec1
1 component vector tightly packed in memory of single-precision floating-point numbers using medium p...
+
mat< 3, 2, double, packed_highp > packed_highp_dmat3x2
3 by 2 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
vec< 1, bool, aligned_lowp > aligned_lowp_bvec1
1 component vector aligned in memory of bool values.
+
aligned_highp_uvec4 aligned_uvec4
4 components vector aligned in memory of unsigned integer numbers.
+
mat< 4, 4, float, aligned_highp > aligned_highp_mat4x4
4 by 4 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
mat< 4, 4, double, aligned_lowp > aligned_lowp_dmat4x4
4 by 4 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
packed_highp_mat2x4 packed_mat2x4
2 by 4 matrix tightly packed in memory of single-precision floating-point numbers.
+
aligned_highp_mat4x2 aligned_mat4x2
4 by 2 matrix tightly aligned in memory of single-precision floating-point numbers.
+
vec< 4, int, packed_mediump > packed_mediump_ivec4
4 components vector tightly packed in memory of signed integer numbers.
+
vec< 1, double, packed_mediump > packed_mediump_dvec1
1 component vector tightly packed in memory of double-precision floating-point numbers using medium p...
+
mat< 2, 2, float, packed_highp > packed_highp_mat2x2
2 by 2 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
vec< 2, double, packed_lowp > packed_lowp_dvec2
2 components vector tightly packed in memory of double-precision floating-point numbers using low pre...
+
aligned_highp_ivec1 aligned_ivec1
1 component vector aligned in memory of signed integer numbers.
+
mat< 2, 2, float, packed_lowp > packed_lowp_mat2x2
2 by 2 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
vec< 3, uint, packed_lowp > packed_lowp_uvec3
3 components vector tightly packed in memory of unsigned integer numbers.
+
mat< 3, 3, double, packed_lowp > packed_lowp_dmat3x3
3 by 3 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
mat< 3, 3, float, packed_lowp > packed_lowp_mat3x3
3 by 3 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
aligned_highp_mat3x3 aligned_mat3x3
3 by 3 matrix tightly aligned in memory of single-precision floating-point numbers.
+
mat< 2, 2, float, aligned_lowp > aligned_lowp_mat2
2 by 2 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
vec< 3, bool, aligned_lowp > aligned_lowp_bvec3
3 components vector aligned in memory of bool values.
+
vec< 1, bool, aligned_mediump > aligned_mediump_bvec1
1 component vector aligned in memory of bool values.
+
vec< 2, double, packed_mediump > packed_mediump_dvec2
2 components vector tightly packed in memory of double-precision floating-point numbers using medium ...
+
mat< 2, 2, float, aligned_lowp > aligned_lowp_mat2x2
2 by 2 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
mat< 2, 3, double, aligned_highp > aligned_highp_dmat2x3
2 by 3 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
mat< 2, 2, double, packed_mediump > packed_mediump_dmat2x2
2 by 2 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
mat< 4, 2, float, aligned_lowp > aligned_lowp_mat4x2
4 by 2 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
mat< 2, 2, double, packed_lowp > packed_lowp_dmat2x2
2 by 2 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
aligned_highp_dmat4x4 aligned_dmat4x4
4 by 4 matrix tightly aligned in memory of double-precision floating-point numbers.
+
mat< 3, 3, double, packed_highp > packed_highp_dmat3
3 by 3 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
vec< 3, bool, packed_lowp > packed_lowp_bvec3
3 components vector tightly packed in memory of bool values.
+
vec< 3, double, packed_mediump > packed_mediump_dvec3
3 components vector tightly packed in memory of double-precision floating-point numbers using medium ...
+
mat< 2, 2, double, aligned_highp > aligned_highp_dmat2x2
2 by 2 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
aligned_highp_dvec3 aligned_dvec3
3 components vector aligned in memory of double-precision floating-point numbers. ...
+
mat< 2, 3, float, packed_lowp > packed_lowp_mat2x3
2 by 3 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
mat< 4, 3, float, packed_highp > packed_highp_mat4x3
4 by 3 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
mat< 2, 2, float, packed_highp > packed_highp_mat2
2 by 2 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
vec< 1, int, packed_mediump > packed_mediump_ivec1
1 component vector tightly packed in memory of signed integer numbers.
+
packed_highp_mat3x4 packed_mat3x4
3 by 4 matrix tightly packed in memory of single-precision floating-point numbers.
+
mat< 4, 3, double, aligned_mediump > aligned_mediump_dmat4x3
4 by 3 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
mat< 4, 3, double, packed_mediump > packed_mediump_dmat4x3
4 by 3 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
mat< 4, 4, float, packed_mediump > packed_mediump_mat4x4
4 by 4 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
vec< 4, bool, aligned_highp > aligned_highp_bvec4
4 components vector aligned in memory of bool values.
+
mat< 3, 3, double, aligned_mediump > aligned_mediump_dmat3
3 by 3 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
vec< 4, double, aligned_mediump > aligned_mediump_dvec4
4 components vector aligned in memory of double-precision floating-point numbers using medium precisi...
+
mat< 4, 4, float, aligned_lowp > aligned_lowp_mat4
4 by 4 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
mat< 2, 2, float, packed_mediump > packed_mediump_mat2x2
2 by 2 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
mat< 3, 2, float, packed_mediump > packed_mediump_mat3x2
3 by 2 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
mat< 4, 3, float, aligned_mediump > aligned_mediump_mat4x3
4 by 3 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
aligned_highp_dmat4x2 aligned_dmat4x2
4 by 2 matrix tightly aligned in memory of double-precision floating-point numbers.
+
vec< 4, int, packed_highp > packed_highp_ivec4
4 components vector tightly packed in memory of signed integer numbers.
+
mat< 3, 3, float, packed_highp > packed_highp_mat3x3
3 by 3 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
mat< 3, 4, float, packed_highp > packed_highp_mat3x4
3 by 4 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
vec< 1, uint, aligned_lowp > aligned_lowp_uvec1
1 component vector aligned in memory of unsigned integer numbers.
+
mat< 3, 2, float, aligned_highp > aligned_highp_mat3x2
3 by 2 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
vec< 1, uint, packed_mediump > packed_mediump_uvec1
1 component vector tightly packed in memory of unsigned integer numbers.
+
vec< 2, bool, aligned_lowp > aligned_lowp_bvec2
2 components vector aligned in memory of bool values.
+
mat< 4, 4, float, aligned_highp > aligned_highp_mat4
4 by 4 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
mat< 4, 4, double, packed_mediump > packed_mediump_dmat4
4 by 4 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
mat< 2, 4, double, packed_lowp > packed_lowp_dmat2x4
2 by 4 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
vec< 4, bool, packed_highp > packed_highp_bvec4
4 components vector tightly packed in memory of bool values.
+
mat< 4, 2, float, aligned_highp > aligned_highp_mat4x2
4 by 2 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
mat< 3, 2, double, packed_mediump > packed_mediump_dmat3x2
3 by 2 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
vec< 2, float, packed_lowp > packed_lowp_vec2
2 components vector tightly packed in memory of single-precision floating-point numbers using low pre...
+
vec< 3, int, aligned_lowp > aligned_lowp_ivec3
3 components vector aligned in memory of signed integer numbers.
+
vec< 4, float, packed_mediump > packed_mediump_vec4
4 components vector tightly packed in memory of single-precision floating-point numbers using medium ...
+
vec< 2, double, aligned_highp > aligned_highp_dvec2
2 components vector aligned in memory of double-precision floating-point numbers using high precision...
+
mat< 3, 2, double, aligned_mediump > aligned_mediump_dmat3x2
3 by 2 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
packed_highp_mat3x2 packed_mat3x2
3 by 2 matrix tightly packed in memory of single-precision floating-point numbers.
+
mat< 2, 2, float, aligned_mediump > aligned_mediump_mat2x2
2 by 2 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
vec< 4, double, packed_lowp > packed_lowp_dvec4
4 components vector tightly packed in memory of double-precision floating-point numbers using low pre...
+
vec< 1, bool, packed_mediump > packed_mediump_bvec1
1 component vector tightly packed in memory of bool values.
+
packed_highp_ivec1 packed_ivec1
1 component vector tightly packed in memory of signed integer numbers.
+
vec< 1, double, aligned_mediump > aligned_mediump_dvec1
1 component vector aligned in memory of double-precision floating-point numbers using medium precisio...
+
aligned_highp_mat3x2 aligned_mat3x2
3 by 2 matrix tightly aligned in memory of single-precision floating-point numbers.
+
mat< 4, 3, float, aligned_lowp > aligned_lowp_mat4x3
4 by 3 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
mat< 4, 4, double, packed_highp > packed_highp_dmat4
4 by 4 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
mat< 4, 4, float, packed_highp > packed_highp_mat4
4 by 4 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
mat< 2, 4, double, packed_mediump > packed_mediump_dmat2x4
2 by 4 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
aligned_highp_dmat3x4 aligned_dmat3x4
3 by 4 matrix tightly aligned in memory of double-precision floating-point numbers.
+
mat< 3, 3, float, aligned_mediump > aligned_mediump_mat3
3 by 3 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
mat< 2, 2, double, aligned_lowp > aligned_lowp_dmat2
2 by 2 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
mat< 2, 3, float, aligned_highp > aligned_highp_mat2x3
2 by 3 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
mat< 2, 2, double, packed_mediump > packed_mediump_dmat2
2 by 2 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
mat< 3, 4, double, packed_lowp > packed_lowp_dmat3x4
3 by 4 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
mat< 3, 4, double, packed_highp > packed_highp_dmat3x4
3 by 4 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
vec< 2, float, aligned_highp > aligned_highp_vec2
2 components vector aligned in memory of single-precision floating-point numbers using high precision...
+
vec< 3, bool, aligned_highp > aligned_highp_bvec3
3 components vector aligned in memory of bool values.
+
aligned_highp_dvec2 aligned_dvec2
2 components vector aligned in memory of double-precision floating-point numbers. ...
+
vec< 4, int, packed_lowp > packed_lowp_ivec4
4 components vector tightly packed in memory of signed integer numbers.
+
vec< 4, double, packed_highp > packed_highp_dvec4
4 components vector tightly packed in memory of double-precision floating-point numbers using high pr...
+
aligned_highp_dmat3 aligned_dmat3
3 by 3 matrix tightly aligned in memory of double-precision floating-point numbers.
+
mat< 3, 3, float, packed_mediump > packed_mediump_mat3
3 by 3 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
vec< 2, int, packed_highp > packed_highp_ivec2
2 components vector tightly packed in memory of signed integer numbers.
+
mat< 2, 4, double, packed_highp > packed_highp_dmat2x4
2 by 4 matrix tightly packed in memory of double-precision floating-point numbers using high precisio...
+
mat< 3, 3, double, packed_mediump > packed_mediump_dmat3x3
3 by 3 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
vec< 3, int, packed_lowp > packed_lowp_ivec3
3 components vector tightly packed in memory of signed integer numbers.
+
mat< 4, 4, double, aligned_lowp > aligned_lowp_dmat4
4 by 4 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
vec< 2, uint, aligned_mediump > aligned_mediump_uvec2
2 components vector aligned in memory of unsigned integer numbers.
+
Definition: common.hpp:18
+
vec< 1, float, packed_highp > packed_highp_vec1
1 component vector tightly packed in memory of single-precision floating-point numbers using high pre...
+
mat< 2, 3, float, aligned_lowp > aligned_lowp_mat2x3
2 by 3 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
mat< 3, 3, float, aligned_mediump > aligned_mediump_mat3x3
3 by 3 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
vec< 4, float, aligned_lowp > aligned_lowp_vec4
4 components vector aligned in memory of single-precision floating-point numbers using low precision ...
+
mat< 3, 3, double, packed_lowp > packed_lowp_dmat3
3 by 3 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
mat< 4, 2, double, packed_mediump > packed_mediump_dmat4x2
4 by 2 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
packed_highp_bvec3 packed_bvec3
3 components vector tightly packed in memory of bool values.
+
mat< 2, 2, float, packed_lowp > packed_lowp_mat2
2 by 2 matrix tightly packed in memory of single-precision floating-point numbers using low precision...
+
packed_highp_dvec1 packed_dvec1
1 component vector tightly packed in memory of double-precision floating-point numbers.
+
aligned_highp_mat4x4 aligned_mat4x4
4 by 4 matrix tightly aligned in memory of single-precision floating-point numbers.
+
mat< 2, 2, double, aligned_highp > aligned_highp_dmat2
2 by 2 matrix aligned in memory of double-precision floating-point numbers using high precision arith...
+
mat< 3, 4, float, aligned_highp > aligned_highp_mat3x4
3 by 4 matrix aligned in memory of single-precision floating-point numbers using high precision arith...
+
mat< 3, 3, float, packed_highp > packed_highp_mat3
3 by 3 matrix tightly packed in memory of single-precision floating-point numbers using high precisio...
+
vec< 2, uint, aligned_lowp > aligned_lowp_uvec2
2 components vector aligned in memory of unsigned integer numbers.
+
aligned_highp_mat2x2 aligned_mat2x2
2 by 2 matrix tightly aligned in memory of single-precision floating-point numbers.
+
vec< 2, bool, packed_highp > packed_highp_bvec2
2 components vector tightly packed in memory of bool values.
+
vec< 1, int, packed_lowp > packed_lowp_ivec1
1 component vector tightly packed in memory of signed integer numbers.
+
mat< 4, 3, double, aligned_lowp > aligned_lowp_dmat4x3
4 by 3 matrix aligned in memory of double-precision floating-point numbers using low precision arithm...
+
mat< 3, 2, double, packed_lowp > packed_lowp_dmat3x2
3 by 2 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
aligned_highp_bvec3 aligned_bvec3
3 components vector aligned in memory of bool values.
+
packed_highp_dvec4 packed_dvec4
4 components vector tightly packed in memory of double-precision floating-point numbers.
+
mat< 2, 4, float, aligned_lowp > aligned_lowp_mat2x4
2 by 4 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
vec< 3, uint, packed_mediump > packed_mediump_uvec3
3 components vector tightly packed in memory of unsigned integer numbers.
+
packed_highp_dvec2 packed_dvec2
2 components vector tightly packed in memory of double-precision floating-point numbers.
+
vec< 3, uint, aligned_lowp > aligned_lowp_uvec3
3 components vector aligned in memory of unsigned integer numbers.
+
vec< 4, double, aligned_lowp > aligned_lowp_dvec4
4 components vector aligned in memory of double-precision floating-point numbers using low precision ...
+
mat< 4, 2, float, packed_mediump > packed_mediump_mat4x2
4 by 2 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
packed_highp_dmat4 packed_dmat4
4 by 4 matrix tightly packed in memory of double-precision floating-point numbers.
+
packed_highp_dmat4x3 packed_dmat4x3
4 by 3 matrix tightly packed in memory of double-precision floating-point numbers.
+
vec< 1, float, aligned_lowp > aligned_lowp_vec1
1 component vector aligned in memory of single-precision floating-point numbers using low precision a...
+
vec< 1, uint, aligned_highp > aligned_highp_uvec1
1 component vector aligned in memory of unsigned integer numbers.
+
vec< 2, int, aligned_mediump > aligned_mediump_ivec2
2 components vector aligned in memory of signed integer numbers.
+
packed_highp_mat2 packed_mat2
2 by 2 matrix tightly packed in memory of single-precision floating-point numbers.
+
mat< 4, 4, float, aligned_mediump > aligned_mediump_mat4x4
4 by 4 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
mat< 3, 4, float, aligned_mediump > aligned_mediump_mat3x4
3 by 4 matrix aligned in memory of single-precision floating-point numbers using medium precision ari...
+
mat< 3, 3, float, packed_mediump > packed_mediump_mat3x3
3 by 3 matrix tightly packed in memory of single-precision floating-point numbers using medium precis...
+
packed_highp_uvec3 packed_uvec3
3 components vector tightly packed in memory of unsigned integer numbers.
+
mat< 2, 3, double, packed_mediump > packed_mediump_dmat2x3
2 by 3 matrix tightly packed in memory of double-precision floating-point numbers using medium precis...
+
mat< 3, 3, float, aligned_lowp > aligned_lowp_mat3x3
3 by 3 matrix aligned in memory of single-precision floating-point numbers using low precision arithm...
+
vec< 1, double, packed_highp > packed_highp_dvec1
1 component vector tightly packed in memory of double-precision floating-point numbers using high pre...
+
vec< 3, float, packed_highp > packed_highp_vec3
3 components vector tightly packed in memory of single-precision floating-point numbers using high pr...
+
aligned_highp_bvec4 aligned_bvec4
4 components vector aligned in memory of bool values.
+
mat< 4, 4, double, packed_lowp > packed_lowp_dmat4x4
4 by 4 matrix tightly packed in memory of double-precision floating-point numbers using low precision...
+
packed_highp_dvec3 packed_dvec3
3 components vector tightly packed in memory of double-precision floating-point numbers.
+
mat< 2, 2, double, aligned_mediump > aligned_mediump_dmat2
2 by 2 matrix aligned in memory of double-precision floating-point numbers using medium precision ari...
+
+ + + + diff --git a/common/glm/doc/api/a01385.html b/common/glm/doc/api/a01385.html new file mode 100644 index 000000000..3a5736846 --- /dev/null +++ b/common/glm/doc/api/a01385.html @@ -0,0 +1,508 @@ + + + + + + + +0.9.9 API documenation: type_aligned.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtx/type_aligned.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

 GLM_ALIGNED_TYPEDEF (lowp_int8, aligned_lowp_int8, 1)
 
 GLM_ALIGNED_TYPEDEF (lowp_int16, aligned_lowp_int16, 2)
 
 GLM_ALIGNED_TYPEDEF (lowp_int32, aligned_lowp_int32, 4)
 
 GLM_ALIGNED_TYPEDEF (lowp_int64, aligned_lowp_int64, 8)
 
 GLM_ALIGNED_TYPEDEF (lowp_int8_t, aligned_lowp_int8_t, 1)
 
 GLM_ALIGNED_TYPEDEF (lowp_int16_t, aligned_lowp_int16_t, 2)
 
 GLM_ALIGNED_TYPEDEF (lowp_int32_t, aligned_lowp_int32_t, 4)
 
 GLM_ALIGNED_TYPEDEF (lowp_int64_t, aligned_lowp_int64_t, 8)
 
 GLM_ALIGNED_TYPEDEF (lowp_i8, aligned_lowp_i8, 1)
 
 GLM_ALIGNED_TYPEDEF (lowp_i16, aligned_lowp_i16, 2)
 
 GLM_ALIGNED_TYPEDEF (lowp_i32, aligned_lowp_i32, 4)
 
 GLM_ALIGNED_TYPEDEF (lowp_i64, aligned_lowp_i64, 8)
 
 GLM_ALIGNED_TYPEDEF (mediump_int8, aligned_mediump_int8, 1)
 
 GLM_ALIGNED_TYPEDEF (mediump_int16, aligned_mediump_int16, 2)
 
 GLM_ALIGNED_TYPEDEF (mediump_int32, aligned_mediump_int32, 4)
 
 GLM_ALIGNED_TYPEDEF (mediump_int64, aligned_mediump_int64, 8)
 
 GLM_ALIGNED_TYPEDEF (mediump_int8_t, aligned_mediump_int8_t, 1)
 
 GLM_ALIGNED_TYPEDEF (mediump_int16_t, aligned_mediump_int16_t, 2)
 
 GLM_ALIGNED_TYPEDEF (mediump_int32_t, aligned_mediump_int32_t, 4)
 
 GLM_ALIGNED_TYPEDEF (mediump_int64_t, aligned_mediump_int64_t, 8)
 
 GLM_ALIGNED_TYPEDEF (mediump_i8, aligned_mediump_i8, 1)
 
 GLM_ALIGNED_TYPEDEF (mediump_i16, aligned_mediump_i16, 2)
 
 GLM_ALIGNED_TYPEDEF (mediump_i32, aligned_mediump_i32, 4)
 
 GLM_ALIGNED_TYPEDEF (mediump_i64, aligned_mediump_i64, 8)
 
 GLM_ALIGNED_TYPEDEF (highp_int8, aligned_highp_int8, 1)
 
 GLM_ALIGNED_TYPEDEF (highp_int16, aligned_highp_int16, 2)
 
 GLM_ALIGNED_TYPEDEF (highp_int32, aligned_highp_int32, 4)
 
 GLM_ALIGNED_TYPEDEF (highp_int64, aligned_highp_int64, 8)
 
 GLM_ALIGNED_TYPEDEF (highp_int8_t, aligned_highp_int8_t, 1)
 
 GLM_ALIGNED_TYPEDEF (highp_int16_t, aligned_highp_int16_t, 2)
 
 GLM_ALIGNED_TYPEDEF (highp_int32_t, aligned_highp_int32_t, 4)
 
 GLM_ALIGNED_TYPEDEF (highp_int64_t, aligned_highp_int64_t, 8)
 
 GLM_ALIGNED_TYPEDEF (highp_i8, aligned_highp_i8, 1)
 
 GLM_ALIGNED_TYPEDEF (highp_i16, aligned_highp_i16, 2)
 
 GLM_ALIGNED_TYPEDEF (highp_i32, aligned_highp_i32, 4)
 
 GLM_ALIGNED_TYPEDEF (highp_i64, aligned_highp_i64, 8)
 
 GLM_ALIGNED_TYPEDEF (int8, aligned_int8, 1)
 
 GLM_ALIGNED_TYPEDEF (int16, aligned_int16, 2)
 
 GLM_ALIGNED_TYPEDEF (int32, aligned_int32, 4)
 
 GLM_ALIGNED_TYPEDEF (int64, aligned_int64, 8)
 
 GLM_ALIGNED_TYPEDEF (int8_t, aligned_int8_t, 1)
 
 GLM_ALIGNED_TYPEDEF (int16_t, aligned_int16_t, 2)
 
 GLM_ALIGNED_TYPEDEF (int32_t, aligned_int32_t, 4)
 
 GLM_ALIGNED_TYPEDEF (int64_t, aligned_int64_t, 8)
 
 GLM_ALIGNED_TYPEDEF (i8, aligned_i8, 1)
 
 GLM_ALIGNED_TYPEDEF (i16, aligned_i16, 2)
 
 GLM_ALIGNED_TYPEDEF (i32, aligned_i32, 4)
 
 GLM_ALIGNED_TYPEDEF (i64, aligned_i64, 8)
 
 GLM_ALIGNED_TYPEDEF (ivec1, aligned_ivec1, 4)
 
 GLM_ALIGNED_TYPEDEF (ivec2, aligned_ivec2, 8)
 
 GLM_ALIGNED_TYPEDEF (ivec3, aligned_ivec3, 16)
 
 GLM_ALIGNED_TYPEDEF (ivec4, aligned_ivec4, 16)
 
 GLM_ALIGNED_TYPEDEF (i8vec1, aligned_i8vec1, 1)
 
 GLM_ALIGNED_TYPEDEF (i8vec2, aligned_i8vec2, 2)
 
 GLM_ALIGNED_TYPEDEF (i8vec3, aligned_i8vec3, 4)
 
 GLM_ALIGNED_TYPEDEF (i8vec4, aligned_i8vec4, 4)
 
 GLM_ALIGNED_TYPEDEF (i16vec1, aligned_i16vec1, 2)
 
 GLM_ALIGNED_TYPEDEF (i16vec2, aligned_i16vec2, 4)
 
 GLM_ALIGNED_TYPEDEF (i16vec3, aligned_i16vec3, 8)
 
 GLM_ALIGNED_TYPEDEF (i16vec4, aligned_i16vec4, 8)
 
 GLM_ALIGNED_TYPEDEF (i32vec1, aligned_i32vec1, 4)
 
 GLM_ALIGNED_TYPEDEF (i32vec2, aligned_i32vec2, 8)
 
 GLM_ALIGNED_TYPEDEF (i32vec3, aligned_i32vec3, 16)
 
 GLM_ALIGNED_TYPEDEF (i32vec4, aligned_i32vec4, 16)
 
 GLM_ALIGNED_TYPEDEF (i64vec1, aligned_i64vec1, 8)
 
 GLM_ALIGNED_TYPEDEF (i64vec2, aligned_i64vec2, 16)
 
 GLM_ALIGNED_TYPEDEF (i64vec3, aligned_i64vec3, 32)
 
 GLM_ALIGNED_TYPEDEF (i64vec4, aligned_i64vec4, 32)
 
 GLM_ALIGNED_TYPEDEF (lowp_uint8, aligned_lowp_uint8, 1)
 
 GLM_ALIGNED_TYPEDEF (lowp_uint16, aligned_lowp_uint16, 2)
 
 GLM_ALIGNED_TYPEDEF (lowp_uint32, aligned_lowp_uint32, 4)
 
 GLM_ALIGNED_TYPEDEF (lowp_uint64, aligned_lowp_uint64, 8)
 
 GLM_ALIGNED_TYPEDEF (lowp_uint8_t, aligned_lowp_uint8_t, 1)
 
 GLM_ALIGNED_TYPEDEF (lowp_uint16_t, aligned_lowp_uint16_t, 2)
 
 GLM_ALIGNED_TYPEDEF (lowp_uint32_t, aligned_lowp_uint32_t, 4)
 
 GLM_ALIGNED_TYPEDEF (lowp_uint64_t, aligned_lowp_uint64_t, 8)
 
 GLM_ALIGNED_TYPEDEF (lowp_u8, aligned_lowp_u8, 1)
 
 GLM_ALIGNED_TYPEDEF (lowp_u16, aligned_lowp_u16, 2)
 
 GLM_ALIGNED_TYPEDEF (lowp_u32, aligned_lowp_u32, 4)
 
 GLM_ALIGNED_TYPEDEF (lowp_u64, aligned_lowp_u64, 8)
 
 GLM_ALIGNED_TYPEDEF (mediump_uint8, aligned_mediump_uint8, 1)
 
 GLM_ALIGNED_TYPEDEF (mediump_uint16, aligned_mediump_uint16, 2)
 
 GLM_ALIGNED_TYPEDEF (mediump_uint32, aligned_mediump_uint32, 4)
 
 GLM_ALIGNED_TYPEDEF (mediump_uint64, aligned_mediump_uint64, 8)
 
 GLM_ALIGNED_TYPEDEF (mediump_uint8_t, aligned_mediump_uint8_t, 1)
 
 GLM_ALIGNED_TYPEDEF (mediump_uint16_t, aligned_mediump_uint16_t, 2)
 
 GLM_ALIGNED_TYPEDEF (mediump_uint32_t, aligned_mediump_uint32_t, 4)
 
 GLM_ALIGNED_TYPEDEF (mediump_uint64_t, aligned_mediump_uint64_t, 8)
 
 GLM_ALIGNED_TYPEDEF (mediump_u8, aligned_mediump_u8, 1)
 
 GLM_ALIGNED_TYPEDEF (mediump_u16, aligned_mediump_u16, 2)
 
 GLM_ALIGNED_TYPEDEF (mediump_u32, aligned_mediump_u32, 4)
 
 GLM_ALIGNED_TYPEDEF (mediump_u64, aligned_mediump_u64, 8)
 
 GLM_ALIGNED_TYPEDEF (highp_uint8, aligned_highp_uint8, 1)
 
 GLM_ALIGNED_TYPEDEF (highp_uint16, aligned_highp_uint16, 2)
 
 GLM_ALIGNED_TYPEDEF (highp_uint32, aligned_highp_uint32, 4)
 
 GLM_ALIGNED_TYPEDEF (highp_uint64, aligned_highp_uint64, 8)
 
 GLM_ALIGNED_TYPEDEF (highp_uint8_t, aligned_highp_uint8_t, 1)
 
 GLM_ALIGNED_TYPEDEF (highp_uint16_t, aligned_highp_uint16_t, 2)
 
 GLM_ALIGNED_TYPEDEF (highp_uint32_t, aligned_highp_uint32_t, 4)
 
 GLM_ALIGNED_TYPEDEF (highp_uint64_t, aligned_highp_uint64_t, 8)
 
 GLM_ALIGNED_TYPEDEF (highp_u8, aligned_highp_u8, 1)
 
 GLM_ALIGNED_TYPEDEF (highp_u16, aligned_highp_u16, 2)
 
 GLM_ALIGNED_TYPEDEF (highp_u32, aligned_highp_u32, 4)
 
 GLM_ALIGNED_TYPEDEF (highp_u64, aligned_highp_u64, 8)
 
 GLM_ALIGNED_TYPEDEF (uint8, aligned_uint8, 1)
 
 GLM_ALIGNED_TYPEDEF (uint16, aligned_uint16, 2)
 
 GLM_ALIGNED_TYPEDEF (uint32, aligned_uint32, 4)
 
 GLM_ALIGNED_TYPEDEF (uint64, aligned_uint64, 8)
 
 GLM_ALIGNED_TYPEDEF (uint8_t, aligned_uint8_t, 1)
 
 GLM_ALIGNED_TYPEDEF (uint16_t, aligned_uint16_t, 2)
 
 GLM_ALIGNED_TYPEDEF (uint32_t, aligned_uint32_t, 4)
 
 GLM_ALIGNED_TYPEDEF (uint64_t, aligned_uint64_t, 8)
 
 GLM_ALIGNED_TYPEDEF (u8, aligned_u8, 1)
 
 GLM_ALIGNED_TYPEDEF (u16, aligned_u16, 2)
 
 GLM_ALIGNED_TYPEDEF (u32, aligned_u32, 4)
 
 GLM_ALIGNED_TYPEDEF (u64, aligned_u64, 8)
 
 GLM_ALIGNED_TYPEDEF (uvec1, aligned_uvec1, 4)
 
 GLM_ALIGNED_TYPEDEF (uvec2, aligned_uvec2, 8)
 
 GLM_ALIGNED_TYPEDEF (uvec3, aligned_uvec3, 16)
 
 GLM_ALIGNED_TYPEDEF (uvec4, aligned_uvec4, 16)
 
 GLM_ALIGNED_TYPEDEF (u8vec1, aligned_u8vec1, 1)
 
 GLM_ALIGNED_TYPEDEF (u8vec2, aligned_u8vec2, 2)
 
 GLM_ALIGNED_TYPEDEF (u8vec3, aligned_u8vec3, 4)
 
 GLM_ALIGNED_TYPEDEF (u8vec4, aligned_u8vec4, 4)
 
 GLM_ALIGNED_TYPEDEF (u16vec1, aligned_u16vec1, 2)
 
 GLM_ALIGNED_TYPEDEF (u16vec2, aligned_u16vec2, 4)
 
 GLM_ALIGNED_TYPEDEF (u16vec3, aligned_u16vec3, 8)
 
 GLM_ALIGNED_TYPEDEF (u16vec4, aligned_u16vec4, 8)
 
 GLM_ALIGNED_TYPEDEF (u32vec1, aligned_u32vec1, 4)
 
 GLM_ALIGNED_TYPEDEF (u32vec2, aligned_u32vec2, 8)
 
 GLM_ALIGNED_TYPEDEF (u32vec3, aligned_u32vec3, 16)
 
 GLM_ALIGNED_TYPEDEF (u32vec4, aligned_u32vec4, 16)
 
 GLM_ALIGNED_TYPEDEF (u64vec1, aligned_u64vec1, 8)
 
 GLM_ALIGNED_TYPEDEF (u64vec2, aligned_u64vec2, 16)
 
 GLM_ALIGNED_TYPEDEF (u64vec3, aligned_u64vec3, 32)
 
 GLM_ALIGNED_TYPEDEF (u64vec4, aligned_u64vec4, 32)
 
 GLM_ALIGNED_TYPEDEF (float32, aligned_float32, 4)
 
 GLM_ALIGNED_TYPEDEF (float32_t, aligned_float32_t, 4)
 
 GLM_ALIGNED_TYPEDEF (float32, aligned_f32, 4)
 
 GLM_ALIGNED_TYPEDEF (float64, aligned_float64, 8)
 
 GLM_ALIGNED_TYPEDEF (float64_t, aligned_float64_t, 8)
 
 GLM_ALIGNED_TYPEDEF (float64, aligned_f64, 8)
 
 GLM_ALIGNED_TYPEDEF (vec1, aligned_vec1, 4)
 
 GLM_ALIGNED_TYPEDEF (vec2, aligned_vec2, 8)
 
 GLM_ALIGNED_TYPEDEF (vec3, aligned_vec3, 16)
 
 GLM_ALIGNED_TYPEDEF (vec4, aligned_vec4, 16)
 
 GLM_ALIGNED_TYPEDEF (fvec1, aligned_fvec1, 4)
 
 GLM_ALIGNED_TYPEDEF (fvec2, aligned_fvec2, 8)
 
 GLM_ALIGNED_TYPEDEF (fvec3, aligned_fvec3, 16)
 
 GLM_ALIGNED_TYPEDEF (fvec4, aligned_fvec4, 16)
 
 GLM_ALIGNED_TYPEDEF (f32vec1, aligned_f32vec1, 4)
 
 GLM_ALIGNED_TYPEDEF (f32vec2, aligned_f32vec2, 8)
 
 GLM_ALIGNED_TYPEDEF (f32vec3, aligned_f32vec3, 16)
 
 GLM_ALIGNED_TYPEDEF (f32vec4, aligned_f32vec4, 16)
 
 GLM_ALIGNED_TYPEDEF (dvec1, aligned_dvec1, 8)
 
 GLM_ALIGNED_TYPEDEF (dvec2, aligned_dvec2, 16)
 
 GLM_ALIGNED_TYPEDEF (dvec3, aligned_dvec3, 32)
 
 GLM_ALIGNED_TYPEDEF (dvec4, aligned_dvec4, 32)
 
 GLM_ALIGNED_TYPEDEF (f64vec1, aligned_f64vec1, 8)
 
 GLM_ALIGNED_TYPEDEF (f64vec2, aligned_f64vec2, 16)
 
 GLM_ALIGNED_TYPEDEF (f64vec3, aligned_f64vec3, 32)
 
 GLM_ALIGNED_TYPEDEF (f64vec4, aligned_f64vec4, 32)
 
 GLM_ALIGNED_TYPEDEF (mat2, aligned_mat2, 16)
 
 GLM_ALIGNED_TYPEDEF (mat3, aligned_mat3, 16)
 
 GLM_ALIGNED_TYPEDEF (mat4, aligned_mat4, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat2x2, aligned_fmat2, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat3x3, aligned_fmat3, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat4x4, aligned_fmat4, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat2x2, aligned_fmat2x2, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat2x3, aligned_fmat2x3, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat2x4, aligned_fmat2x4, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat3x2, aligned_fmat3x2, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat3x3, aligned_fmat3x3, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat3x4, aligned_fmat3x4, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat4x2, aligned_fmat4x2, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat4x3, aligned_fmat4x3, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat4x4, aligned_fmat4x4, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat2x2, aligned_f32mat2, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat3x3, aligned_f32mat3, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat4x4, aligned_f32mat4, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat2x2, aligned_f32mat2x2, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat2x3, aligned_f32mat2x3, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat2x4, aligned_f32mat2x4, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat3x2, aligned_f32mat3x2, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat3x3, aligned_f32mat3x3, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat3x4, aligned_f32mat3x4, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat4x2, aligned_f32mat4x2, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat4x3, aligned_f32mat4x3, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat4x4, aligned_f32mat4x4, 16)
 
 GLM_ALIGNED_TYPEDEF (f64mat2x2, aligned_f64mat2, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat3x3, aligned_f64mat3, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat4x4, aligned_f64mat4, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat2x2, aligned_f64mat2x2, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat2x3, aligned_f64mat2x3, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat2x4, aligned_f64mat2x4, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat3x2, aligned_f64mat3x2, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat3x3, aligned_f64mat3x3, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat3x4, aligned_f64mat3x4, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat4x2, aligned_f64mat4x2, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat4x3, aligned_f64mat4x3, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat4x4, aligned_f64mat4x4, 32)
 
 GLM_ALIGNED_TYPEDEF (quat, aligned_quat, 16)
 
 GLM_ALIGNED_TYPEDEF (quat, aligned_fquat, 16)
 
 GLM_ALIGNED_TYPEDEF (dquat, aligned_dquat, 32)
 
 GLM_ALIGNED_TYPEDEF (f32quat, aligned_f32quat, 16)
 
 GLM_ALIGNED_TYPEDEF (f64quat, aligned_f64quat, 32)
 
+

Detailed Description

+

GLM_GTX_type_aligned

+
See also
Core features (dependence)
+
+GLM_GTC_quaternion (dependence)
+ +

Definition in file gtx/type_aligned.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01385_source.html b/common/glm/doc/api/a01385_source.html new file mode 100644 index 000000000..4e71181bf --- /dev/null +++ b/common/glm/doc/api/a01385_source.html @@ -0,0 +1,296 @@ + + + + + + + +0.9.9 API documenation: type_aligned.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtx/type_aligned.hpp
+
+
+Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../gtc/type_precision.hpp"
18 #include "../gtc/quaternion.hpp"
19 
20 #ifndef GLM_ENABLE_EXPERIMENTAL
21 # error "GLM: GLM_GTX_type_aligned is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
22 #endif
23 
24 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
25 # pragma message("GLM: GLM_GTX_type_aligned extension included")
26 #endif
27 
28 namespace glm
29 {
31  // Signed int vector types
32 
35 
38  GLM_ALIGNED_TYPEDEF(lowp_int8, aligned_lowp_int8, 1);
39 
42  GLM_ALIGNED_TYPEDEF(lowp_int16, aligned_lowp_int16, 2);
43 
46  GLM_ALIGNED_TYPEDEF(lowp_int32, aligned_lowp_int32, 4);
47 
50  GLM_ALIGNED_TYPEDEF(lowp_int64, aligned_lowp_int64, 8);
51 
52 
55  GLM_ALIGNED_TYPEDEF(lowp_int8_t, aligned_lowp_int8_t, 1);
56 
59  GLM_ALIGNED_TYPEDEF(lowp_int16_t, aligned_lowp_int16_t, 2);
60 
63  GLM_ALIGNED_TYPEDEF(lowp_int32_t, aligned_lowp_int32_t, 4);
64 
67  GLM_ALIGNED_TYPEDEF(lowp_int64_t, aligned_lowp_int64_t, 8);
68 
69 
72  GLM_ALIGNED_TYPEDEF(lowp_i8, aligned_lowp_i8, 1);
73 
76  GLM_ALIGNED_TYPEDEF(lowp_i16, aligned_lowp_i16, 2);
77 
80  GLM_ALIGNED_TYPEDEF(lowp_i32, aligned_lowp_i32, 4);
81 
84  GLM_ALIGNED_TYPEDEF(lowp_i64, aligned_lowp_i64, 8);
85 
86 
89  GLM_ALIGNED_TYPEDEF(mediump_int8, aligned_mediump_int8, 1);
90 
93  GLM_ALIGNED_TYPEDEF(mediump_int16, aligned_mediump_int16, 2);
94 
97  GLM_ALIGNED_TYPEDEF(mediump_int32, aligned_mediump_int32, 4);
98 
101  GLM_ALIGNED_TYPEDEF(mediump_int64, aligned_mediump_int64, 8);
102 
103 
106  GLM_ALIGNED_TYPEDEF(mediump_int8_t, aligned_mediump_int8_t, 1);
107 
110  GLM_ALIGNED_TYPEDEF(mediump_int16_t, aligned_mediump_int16_t, 2);
111 
114  GLM_ALIGNED_TYPEDEF(mediump_int32_t, aligned_mediump_int32_t, 4);
115 
118  GLM_ALIGNED_TYPEDEF(mediump_int64_t, aligned_mediump_int64_t, 8);
119 
120 
123  GLM_ALIGNED_TYPEDEF(mediump_i8, aligned_mediump_i8, 1);
124 
127  GLM_ALIGNED_TYPEDEF(mediump_i16, aligned_mediump_i16, 2);
128 
131  GLM_ALIGNED_TYPEDEF(mediump_i32, aligned_mediump_i32, 4);
132 
135  GLM_ALIGNED_TYPEDEF(mediump_i64, aligned_mediump_i64, 8);
136 
137 
140  GLM_ALIGNED_TYPEDEF(highp_int8, aligned_highp_int8, 1);
141 
144  GLM_ALIGNED_TYPEDEF(highp_int16, aligned_highp_int16, 2);
145 
148  GLM_ALIGNED_TYPEDEF(highp_int32, aligned_highp_int32, 4);
149 
152  GLM_ALIGNED_TYPEDEF(highp_int64, aligned_highp_int64, 8);
153 
154 
157  GLM_ALIGNED_TYPEDEF(highp_int8_t, aligned_highp_int8_t, 1);
158 
161  GLM_ALIGNED_TYPEDEF(highp_int16_t, aligned_highp_int16_t, 2);
162 
165  GLM_ALIGNED_TYPEDEF(highp_int32_t, aligned_highp_int32_t, 4);
166 
169  GLM_ALIGNED_TYPEDEF(highp_int64_t, aligned_highp_int64_t, 8);
170 
171 
174  GLM_ALIGNED_TYPEDEF(highp_i8, aligned_highp_i8, 1);
175 
178  GLM_ALIGNED_TYPEDEF(highp_i16, aligned_highp_i16, 2);
179 
182  GLM_ALIGNED_TYPEDEF(highp_i32, aligned_highp_i32, 4);
183 
186  GLM_ALIGNED_TYPEDEF(highp_i64, aligned_highp_i64, 8);
187 
188 
191  GLM_ALIGNED_TYPEDEF(int8, aligned_int8, 1);
192 
195  GLM_ALIGNED_TYPEDEF(int16, aligned_int16, 2);
196 
199  GLM_ALIGNED_TYPEDEF(int32, aligned_int32, 4);
200 
203  GLM_ALIGNED_TYPEDEF(int64, aligned_int64, 8);
204 
205 
208  GLM_ALIGNED_TYPEDEF(int8_t, aligned_int8_t, 1);
209 
212  GLM_ALIGNED_TYPEDEF(int16_t, aligned_int16_t, 2);
213 
216  GLM_ALIGNED_TYPEDEF(int32_t, aligned_int32_t, 4);
217 
220  GLM_ALIGNED_TYPEDEF(int64_t, aligned_int64_t, 8);
221 
222 
225  GLM_ALIGNED_TYPEDEF(i8, aligned_i8, 1);
226 
229  GLM_ALIGNED_TYPEDEF(i16, aligned_i16, 2);
230 
233  GLM_ALIGNED_TYPEDEF(i32, aligned_i32, 4);
234 
237  GLM_ALIGNED_TYPEDEF(i64, aligned_i64, 8);
238 
239 
243 
247 
251 
255 
256 
259  GLM_ALIGNED_TYPEDEF(i8vec1, aligned_i8vec1, 1);
260 
263  GLM_ALIGNED_TYPEDEF(i8vec2, aligned_i8vec2, 2);
264 
267  GLM_ALIGNED_TYPEDEF(i8vec3, aligned_i8vec3, 4);
268 
271  GLM_ALIGNED_TYPEDEF(i8vec4, aligned_i8vec4, 4);
272 
273 
276  GLM_ALIGNED_TYPEDEF(i16vec1, aligned_i16vec1, 2);
277 
280  GLM_ALIGNED_TYPEDEF(i16vec2, aligned_i16vec2, 4);
281 
284  GLM_ALIGNED_TYPEDEF(i16vec3, aligned_i16vec3, 8);
285 
288  GLM_ALIGNED_TYPEDEF(i16vec4, aligned_i16vec4, 8);
289 
290 
293  GLM_ALIGNED_TYPEDEF(i32vec1, aligned_i32vec1, 4);
294 
297  GLM_ALIGNED_TYPEDEF(i32vec2, aligned_i32vec2, 8);
298 
301  GLM_ALIGNED_TYPEDEF(i32vec3, aligned_i32vec3, 16);
302 
305  GLM_ALIGNED_TYPEDEF(i32vec4, aligned_i32vec4, 16);
306 
307 
310  GLM_ALIGNED_TYPEDEF(i64vec1, aligned_i64vec1, 8);
311 
314  GLM_ALIGNED_TYPEDEF(i64vec2, aligned_i64vec2, 16);
315 
318  GLM_ALIGNED_TYPEDEF(i64vec3, aligned_i64vec3, 32);
319 
322  GLM_ALIGNED_TYPEDEF(i64vec4, aligned_i64vec4, 32);
323 
324 
326  // Unsigned int vector types
327 
330  GLM_ALIGNED_TYPEDEF(lowp_uint8, aligned_lowp_uint8, 1);
331 
334  GLM_ALIGNED_TYPEDEF(lowp_uint16, aligned_lowp_uint16, 2);
335 
338  GLM_ALIGNED_TYPEDEF(lowp_uint32, aligned_lowp_uint32, 4);
339 
342  GLM_ALIGNED_TYPEDEF(lowp_uint64, aligned_lowp_uint64, 8);
343 
344 
347  GLM_ALIGNED_TYPEDEF(lowp_uint8_t, aligned_lowp_uint8_t, 1);
348 
351  GLM_ALIGNED_TYPEDEF(lowp_uint16_t, aligned_lowp_uint16_t, 2);
352 
355  GLM_ALIGNED_TYPEDEF(lowp_uint32_t, aligned_lowp_uint32_t, 4);
356 
359  GLM_ALIGNED_TYPEDEF(lowp_uint64_t, aligned_lowp_uint64_t, 8);
360 
361 
364  GLM_ALIGNED_TYPEDEF(lowp_u8, aligned_lowp_u8, 1);
365 
368  GLM_ALIGNED_TYPEDEF(lowp_u16, aligned_lowp_u16, 2);
369 
372  GLM_ALIGNED_TYPEDEF(lowp_u32, aligned_lowp_u32, 4);
373 
376  GLM_ALIGNED_TYPEDEF(lowp_u64, aligned_lowp_u64, 8);
377 
378 
381  GLM_ALIGNED_TYPEDEF(mediump_uint8, aligned_mediump_uint8, 1);
382 
385  GLM_ALIGNED_TYPEDEF(mediump_uint16, aligned_mediump_uint16, 2);
386 
389  GLM_ALIGNED_TYPEDEF(mediump_uint32, aligned_mediump_uint32, 4);
390 
393  GLM_ALIGNED_TYPEDEF(mediump_uint64, aligned_mediump_uint64, 8);
394 
395 
398  GLM_ALIGNED_TYPEDEF(mediump_uint8_t, aligned_mediump_uint8_t, 1);
399 
402  GLM_ALIGNED_TYPEDEF(mediump_uint16_t, aligned_mediump_uint16_t, 2);
403 
406  GLM_ALIGNED_TYPEDEF(mediump_uint32_t, aligned_mediump_uint32_t, 4);
407 
410  GLM_ALIGNED_TYPEDEF(mediump_uint64_t, aligned_mediump_uint64_t, 8);
411 
412 
415  GLM_ALIGNED_TYPEDEF(mediump_u8, aligned_mediump_u8, 1);
416 
419  GLM_ALIGNED_TYPEDEF(mediump_u16, aligned_mediump_u16, 2);
420 
423  GLM_ALIGNED_TYPEDEF(mediump_u32, aligned_mediump_u32, 4);
424 
427  GLM_ALIGNED_TYPEDEF(mediump_u64, aligned_mediump_u64, 8);
428 
429 
432  GLM_ALIGNED_TYPEDEF(highp_uint8, aligned_highp_uint8, 1);
433 
436  GLM_ALIGNED_TYPEDEF(highp_uint16, aligned_highp_uint16, 2);
437 
440  GLM_ALIGNED_TYPEDEF(highp_uint32, aligned_highp_uint32, 4);
441 
444  GLM_ALIGNED_TYPEDEF(highp_uint64, aligned_highp_uint64, 8);
445 
446 
449  GLM_ALIGNED_TYPEDEF(highp_uint8_t, aligned_highp_uint8_t, 1);
450 
453  GLM_ALIGNED_TYPEDEF(highp_uint16_t, aligned_highp_uint16_t, 2);
454 
457  GLM_ALIGNED_TYPEDEF(highp_uint32_t, aligned_highp_uint32_t, 4);
458 
461  GLM_ALIGNED_TYPEDEF(highp_uint64_t, aligned_highp_uint64_t, 8);
462 
463 
466  GLM_ALIGNED_TYPEDEF(highp_u8, aligned_highp_u8, 1);
467 
470  GLM_ALIGNED_TYPEDEF(highp_u16, aligned_highp_u16, 2);
471 
474  GLM_ALIGNED_TYPEDEF(highp_u32, aligned_highp_u32, 4);
475 
478  GLM_ALIGNED_TYPEDEF(highp_u64, aligned_highp_u64, 8);
479 
480 
483  GLM_ALIGNED_TYPEDEF(uint8, aligned_uint8, 1);
484 
487  GLM_ALIGNED_TYPEDEF(uint16, aligned_uint16, 2);
488 
491  GLM_ALIGNED_TYPEDEF(uint32, aligned_uint32, 4);
492 
495  GLM_ALIGNED_TYPEDEF(uint64, aligned_uint64, 8);
496 
497 
500  GLM_ALIGNED_TYPEDEF(uint8_t, aligned_uint8_t, 1);
501 
504  GLM_ALIGNED_TYPEDEF(uint16_t, aligned_uint16_t, 2);
505 
508  GLM_ALIGNED_TYPEDEF(uint32_t, aligned_uint32_t, 4);
509 
512  GLM_ALIGNED_TYPEDEF(uint64_t, aligned_uint64_t, 8);
513 
514 
517  GLM_ALIGNED_TYPEDEF(u8, aligned_u8, 1);
518 
521  GLM_ALIGNED_TYPEDEF(u16, aligned_u16, 2);
522 
525  GLM_ALIGNED_TYPEDEF(u32, aligned_u32, 4);
526 
529  GLM_ALIGNED_TYPEDEF(u64, aligned_u64, 8);
530 
531 
535 
539 
543 
547 
548 
551  GLM_ALIGNED_TYPEDEF(u8vec1, aligned_u8vec1, 1);
552 
555  GLM_ALIGNED_TYPEDEF(u8vec2, aligned_u8vec2, 2);
556 
559  GLM_ALIGNED_TYPEDEF(u8vec3, aligned_u8vec3, 4);
560 
563  GLM_ALIGNED_TYPEDEF(u8vec4, aligned_u8vec4, 4);
564 
565 
568  GLM_ALIGNED_TYPEDEF(u16vec1, aligned_u16vec1, 2);
569 
572  GLM_ALIGNED_TYPEDEF(u16vec2, aligned_u16vec2, 4);
573 
576  GLM_ALIGNED_TYPEDEF(u16vec3, aligned_u16vec3, 8);
577 
580  GLM_ALIGNED_TYPEDEF(u16vec4, aligned_u16vec4, 8);
581 
582 
585  GLM_ALIGNED_TYPEDEF(u32vec1, aligned_u32vec1, 4);
586 
589  GLM_ALIGNED_TYPEDEF(u32vec2, aligned_u32vec2, 8);
590 
593  GLM_ALIGNED_TYPEDEF(u32vec3, aligned_u32vec3, 16);
594 
597  GLM_ALIGNED_TYPEDEF(u32vec4, aligned_u32vec4, 16);
598 
599 
602  GLM_ALIGNED_TYPEDEF(u64vec1, aligned_u64vec1, 8);
603 
606  GLM_ALIGNED_TYPEDEF(u64vec2, aligned_u64vec2, 16);
607 
610  GLM_ALIGNED_TYPEDEF(u64vec3, aligned_u64vec3, 32);
611 
614  GLM_ALIGNED_TYPEDEF(u64vec4, aligned_u64vec4, 32);
615 
616 
618  // Float vector types
619 
622  GLM_ALIGNED_TYPEDEF(float32, aligned_float32, 4);
623 
626  GLM_ALIGNED_TYPEDEF(float32_t, aligned_float32_t, 4);
627 
630  GLM_ALIGNED_TYPEDEF(float32, aligned_f32, 4);
631 
632 # ifndef GLM_FORCE_SINGLE_ONLY
633 
636  GLM_ALIGNED_TYPEDEF(float64, aligned_float64, 8);
637 
640  GLM_ALIGNED_TYPEDEF(float64_t, aligned_float64_t, 8);
641 
644  GLM_ALIGNED_TYPEDEF(float64, aligned_f64, 8);
645 
646 # endif//GLM_FORCE_SINGLE_ONLY
647 
648 
652 
656 
660 
664 
665 
668  GLM_ALIGNED_TYPEDEF(fvec1, aligned_fvec1, 4);
669 
672  GLM_ALIGNED_TYPEDEF(fvec2, aligned_fvec2, 8);
673 
676  GLM_ALIGNED_TYPEDEF(fvec3, aligned_fvec3, 16);
677 
680  GLM_ALIGNED_TYPEDEF(fvec4, aligned_fvec4, 16);
681 
682 
685  GLM_ALIGNED_TYPEDEF(f32vec1, aligned_f32vec1, 4);
686 
689  GLM_ALIGNED_TYPEDEF(f32vec2, aligned_f32vec2, 8);
690 
693  GLM_ALIGNED_TYPEDEF(f32vec3, aligned_f32vec3, 16);
694 
697  GLM_ALIGNED_TYPEDEF(f32vec4, aligned_f32vec4, 16);
698 
699 
703 
707 
711 
715 
716 
717 # ifndef GLM_FORCE_SINGLE_ONLY
718 
721  GLM_ALIGNED_TYPEDEF(f64vec1, aligned_f64vec1, 8);
722 
725  GLM_ALIGNED_TYPEDEF(f64vec2, aligned_f64vec2, 16);
726 
729  GLM_ALIGNED_TYPEDEF(f64vec3, aligned_f64vec3, 32);
730 
733  GLM_ALIGNED_TYPEDEF(f64vec4, aligned_f64vec4, 32);
734 
735 # endif//GLM_FORCE_SINGLE_ONLY
736 
738  // Float matrix types
739 
742  //typedef detail::tmat1<f32> mat1;
743 
747 
751 
755 
756 
759  //typedef detail::tmat1x1<f32> mat1;
760 
764 
768 
772 
773 
776  //typedef detail::tmat1x1<f32> fmat1;
777 
780  GLM_ALIGNED_TYPEDEF(fmat2x2, aligned_fmat2, 16);
781 
784  GLM_ALIGNED_TYPEDEF(fmat3x3, aligned_fmat3, 16);
785 
788  GLM_ALIGNED_TYPEDEF(fmat4x4, aligned_fmat4, 16);
789 
790 
793  //typedef f32 fmat1x1;
794 
797  GLM_ALIGNED_TYPEDEF(fmat2x2, aligned_fmat2x2, 16);
798 
801  GLM_ALIGNED_TYPEDEF(fmat2x3, aligned_fmat2x3, 16);
802 
805  GLM_ALIGNED_TYPEDEF(fmat2x4, aligned_fmat2x4, 16);
806 
809  GLM_ALIGNED_TYPEDEF(fmat3x2, aligned_fmat3x2, 16);
810 
813  GLM_ALIGNED_TYPEDEF(fmat3x3, aligned_fmat3x3, 16);
814 
817  GLM_ALIGNED_TYPEDEF(fmat3x4, aligned_fmat3x4, 16);
818 
821  GLM_ALIGNED_TYPEDEF(fmat4x2, aligned_fmat4x2, 16);
822 
825  GLM_ALIGNED_TYPEDEF(fmat4x3, aligned_fmat4x3, 16);
826 
829  GLM_ALIGNED_TYPEDEF(fmat4x4, aligned_fmat4x4, 16);
830 
831 
834  //typedef detail::tmat1x1<f32, defaultp> f32mat1;
835 
838  GLM_ALIGNED_TYPEDEF(f32mat2x2, aligned_f32mat2, 16);
839 
842  GLM_ALIGNED_TYPEDEF(f32mat3x3, aligned_f32mat3, 16);
843 
846  GLM_ALIGNED_TYPEDEF(f32mat4x4, aligned_f32mat4, 16);
847 
848 
851  //typedef f32 f32mat1x1;
852 
855  GLM_ALIGNED_TYPEDEF(f32mat2x2, aligned_f32mat2x2, 16);
856 
859  GLM_ALIGNED_TYPEDEF(f32mat2x3, aligned_f32mat2x3, 16);
860 
863  GLM_ALIGNED_TYPEDEF(f32mat2x4, aligned_f32mat2x4, 16);
864 
867  GLM_ALIGNED_TYPEDEF(f32mat3x2, aligned_f32mat3x2, 16);
868 
871  GLM_ALIGNED_TYPEDEF(f32mat3x3, aligned_f32mat3x3, 16);
872 
875  GLM_ALIGNED_TYPEDEF(f32mat3x4, aligned_f32mat3x4, 16);
876 
879  GLM_ALIGNED_TYPEDEF(f32mat4x2, aligned_f32mat4x2, 16);
880 
883  GLM_ALIGNED_TYPEDEF(f32mat4x3, aligned_f32mat4x3, 16);
884 
887  GLM_ALIGNED_TYPEDEF(f32mat4x4, aligned_f32mat4x4, 16);
888 
889 
890 # ifndef GLM_FORCE_SINGLE_ONLY
891 
894  //typedef detail::tmat1x1<f64, defaultp> f64mat1;
895 
898  GLM_ALIGNED_TYPEDEF(f64mat2x2, aligned_f64mat2, 32);
899 
902  GLM_ALIGNED_TYPEDEF(f64mat3x3, aligned_f64mat3, 32);
903 
906  GLM_ALIGNED_TYPEDEF(f64mat4x4, aligned_f64mat4, 32);
907 
908 
911  //typedef f64 f64mat1x1;
912 
915  GLM_ALIGNED_TYPEDEF(f64mat2x2, aligned_f64mat2x2, 32);
916 
919  GLM_ALIGNED_TYPEDEF(f64mat2x3, aligned_f64mat2x3, 32);
920 
923  GLM_ALIGNED_TYPEDEF(f64mat2x4, aligned_f64mat2x4, 32);
924 
927  GLM_ALIGNED_TYPEDEF(f64mat3x2, aligned_f64mat3x2, 32);
928 
931  GLM_ALIGNED_TYPEDEF(f64mat3x3, aligned_f64mat3x3, 32);
932 
935  GLM_ALIGNED_TYPEDEF(f64mat3x4, aligned_f64mat3x4, 32);
936 
939  GLM_ALIGNED_TYPEDEF(f64mat4x2, aligned_f64mat4x2, 32);
940 
943  GLM_ALIGNED_TYPEDEF(f64mat4x3, aligned_f64mat4x3, 32);
944 
947  GLM_ALIGNED_TYPEDEF(f64mat4x4, aligned_f64mat4x4, 32);
948 
949 # endif//GLM_FORCE_SINGLE_ONLY
950 
951 
953  // Quaternion types
954 
957  GLM_ALIGNED_TYPEDEF(quat, aligned_quat, 16);
958 
961  GLM_ALIGNED_TYPEDEF(quat, aligned_fquat, 16);
962 
965  GLM_ALIGNED_TYPEDEF(dquat, aligned_dquat, 32);
966 
969  GLM_ALIGNED_TYPEDEF(f32quat, aligned_f32quat, 16);
970 
971 # ifndef GLM_FORCE_SINGLE_ONLY
972 
975  GLM_ALIGNED_TYPEDEF(f64quat, aligned_f64quat, 32);
976 
977 # endif//GLM_FORCE_SINGLE_ONLY
978 
980 }//namespace glm
981 
982 #include "type_aligned.inl"
int32 int32_t
32 bit signed integer type.
Definition: fwd.hpp:71
+
uint64 u64
Default qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:134
+
vec< 3, u16, defaultp > u16vec3
Default qualifier 16 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:361
+
vec< 3, unsigned int, defaultp > uvec3
3 components vector of unsigned integer numbers.
+
vec< 1, i16, defaultp > i16vec1
16 bit signed integer scalar type.
Definition: fwd.hpp:257
+
uint16 highp_uint16_t
High qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:114
+
qua< f64, defaultp > f64quat
Double-qualifier floating-point quaternion.
Definition: fwd.hpp:815
+
aligned_highp_mat3 aligned_mat3
3 by 3 matrix tightly aligned in memory of single-precision floating-point numbers.
+
int16 int16_t
16 bit signed integer type.
Definition: fwd.hpp:57
+
vec< 2, f64, defaultp > f64vec2
Double-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:502
+
int64 i64
64 bit signed integer type.
Definition: fwd.hpp:76
+
int32 lowp_i32
Low qualifier 32 bit signed integer type.
Definition: fwd.hpp:59
+
uint8 mediump_uint8
Medium qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:95
+
vec< 2, i64, defaultp > i64vec2
64 bit signed integer vector of 2 components type.
Definition: fwd.hpp:298
+
vec< 4, f32, defaultp > fvec4
Single-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:444
+
int8 lowp_int8_t
Low qualifier 8 bit signed integer type.
Definition: fwd.hpp:40
+
int64 lowp_int64_t
Low qualifier 64 bit signed integer type.
Definition: fwd.hpp:82
+
uint32 u32
Default qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:120
+
int8 mediump_i8
Medium qualifier 8 bit signed integer type.
Definition: fwd.hpp:32
+
vec< 4, i16, defaultp > i16vec4
16 bit signed integer vector of 4 components type.
Definition: fwd.hpp:260
+
double float64
Double precision floating-point numbers.
+
uint8 lowp_uint8_t
Low qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:98
+
int32 highp_int32_t
32 bit signed integer type.
Definition: fwd.hpp:70
+
vec< 1, f64, defaultp > f64vec1
Double-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:501
+
mat< 2, 4, f32, defaultp > fmat2x4
Single-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:666
+
int64 mediump_int64
Medium qualifier 64 bit signed integer type.
Definition: fwd.hpp:79
+
mat< 2, 3, f32, defaultp > f32mat2x3
Single-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:703
+
mat< 4, 4, float, defaultp > mat4
4 columns of 4 components matrix of single-precision floating-point numbers.
+
double float64_t
Default 64 bit double-qualifier floating-point scalar.
Definition: fwd.hpp:176
+
vec< 3, i16, defaultp > i16vec3
16 bit signed integer vector of 3 components type.
Definition: fwd.hpp:259
+
aligned_highp_vec2 aligned_vec2
2 components vector aligned in memory of single-precision floating-point numbers. ...
+
uint32 mediump_uint32
Medium qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:123
+
uint8 highp_u8
High qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:91
+
int64 lowp_int64
Low qualifier 64 bit signed integer type.
Definition: fwd.hpp:78
+
vec< 2, i32, defaultp > i32vec2
32 bit signed integer vector of 2 components type.
Definition: fwd.hpp:278
+
aligned_highp_mat4x4 aligned_mat4x4
4 by 4 matrix tightly aligned in memory of single-precision floating-point numbers.
+
vec< 4, unsigned int, defaultp > uvec4
4 components vector of unsigned integer numbers.
+
uint16 lowp_uint16_t
Low qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:112
+
uint8 lowp_u8
Low qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:89
+
aligned_highp_mat2x2 aligned_mat2x2
2 by 2 matrix tightly aligned in memory of single-precision floating-point numbers.
+
int64 highp_int64_t
High qualifier 64 bit signed integer type.
Definition: fwd.hpp:84
+
uint32 highp_uint32_t
High qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:128
+
mat< 3, 3, f32, defaultp > fmat3x3
Single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:664
+
uint64 mediump_uint64
Medium qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:137
+
int32 mediump_i32
Medium qualifier 32 bit signed integer type.
Definition: fwd.hpp:60
+
vec< 1, i64, defaultp > i64vec1
64 bit signed integer scalar type.
Definition: fwd.hpp:297
+
vec< 1, u32, defaultp > u32vec1
Default qualifier 32 bit unsigned integer scalar type.
Definition: fwd.hpp:379
+
aligned_highp_mat4 aligned_mat4
4 by 4 matrix tightly aligned in memory of single-precision floating-point numbers.
+
uint16 lowp_uint16
Low qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:108
+
uint8 highp_uint8_t
High qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:100
+
int8 highp_i8
High qualifier 8 bit signed integer type.
Definition: fwd.hpp:33
+
mat< 3, 2, f32, defaultp > fmat3x2
Single-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:661
+
mat< 3, 3, float, defaultp > mat3x3
3 columns of 3 components matrix of single-precision floating-point numbers.
+
int16 highp_int16
High qualifier 16 bit signed integer type.
Definition: fwd.hpp:52
+
int16 highp_i16
High qualifier 16 bit signed integer type.
Definition: fwd.hpp:47
+
vec< 2, i8, defaultp > i8vec2
8 bit signed integer vector of 2 components type.
Definition: fwd.hpp:238
+
mat< 4, 3, f32, defaultp > fmat4x3
Single-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:665
+
uint8 u8
Default qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:92
+
vec< 2, float, defaultp > vec2
2 components vector of single-precision floating-point numbers.
+
mat< 3, 2, f32, defaultp > f32mat3x2
Single-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:701
+
uint32 lowp_uint32_t
Low qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:126
+
aligned_highp_vec4 aligned_vec4
4 components vector aligned in memory of single-precision floating-point numbers. ...
+
vec< 4, f32, defaultp > f32vec4
Single-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:464
+
vec< 2, unsigned int, defaultp > uvec2
2 components vector of unsigned integer numbers.
+
uint64 mediump_u64
Medium qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:132
+
aligned_highp_dvec4 aligned_dvec4
4 components vector aligned in memory of double-precision floating-point numbers. ...
+
int16 i16
16 bit signed integer type.
Definition: fwd.hpp:48
+
vec< 2, u8, defaultp > u8vec2
Default qualifier 8 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:340
+
int16 highp_int16_t
High qualifier 16 bit signed integer type.
Definition: fwd.hpp:56
+
uint64 highp_uint64
High qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:138
+
vec< 2, i16, defaultp > i16vec2
16 bit signed integer vector of 2 components type.
Definition: fwd.hpp:258
+
uint8 highp_uint8
High qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:96
+
uint64 lowp_uint64_t
Low qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:140
+
int32 highp_int32
High qualifier 32 bit signed integer type.
Definition: fwd.hpp:66
+
mat< 4, 4, f32, defaultp > f32mat4x4
Single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:708
+
vec< 1, i32, defaultp > i32vec1
32 bit signed integer scalar type.
Definition: fwd.hpp:277
+
uint16 mediump_u16
Medium qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:104
+
int32 mediump_int32_t
Medium qualifier 32 bit signed integer type.
Definition: fwd.hpp:69
+
int8 highp_int8
High qualifier 8 bit signed integer type.
Definition: fwd.hpp:38
+
vec< 3, i64, defaultp > i64vec3
64 bit signed integer vector of 3 components type.
Definition: fwd.hpp:299
+
vec< 3, u32, defaultp > u32vec3
Default qualifier 32 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:381
+
mat< 3, 3, float, defaultp > mat3
3 columns of 3 components matrix of single-precision floating-point numbers.
+
mat< 4, 3, f64, defaultp > f64mat4x3
Double-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:785
+
mat< 4, 3, f32, defaultp > f32mat4x3
Single-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:705
+
vec< 2, f32, defaultp > f32vec2
Single-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:462
+
uint64 highp_u64
High qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:133
+
aligned_highp_uvec1 aligned_uvec1
1 component vector aligned in memory of unsigned integer numbers.
+
mat< 4, 2, f64, defaultp > f64mat4x2
Double-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:782
+
mat< 2, 3, f32, defaultp > fmat2x3
Single-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:663
+
uint64 lowp_uint64
Low qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:136
+
vec< 4, float, defaultp > vec4
4 components vector of single-precision floating-point numbers.
+
uint64 highp_uint64_t
High qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:142
+
vec< 4, u32, defaultp > u32vec4
Default qualifier 32 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:382
+
float float32
Single precision floating-point numbers.
+
aligned_highp_uvec2 aligned_uvec2
2 components vector aligned in memory of unsigned integer numbers.
+
mat< 2, 2, f32, defaultp > fmat2x2
Single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:660
+
qua< f32, defaultp > f32quat
Single-qualifier floating-point quaternion.
Definition: fwd.hpp:805
+
vec< 4, f64, defaultp > f64vec4
Double-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:504
+
aligned_highp_mat2 aligned_mat2
2 by 2 matrix tightly aligned in memory of single-precision floating-point numbers.
+
mat< 2, 2, float, defaultp > mat2
2 columns of 2 components matrix of single-precision floating-point numbers.
+
int8 lowp_i8
Low qualifier 8 bit signed integer type.
Definition: fwd.hpp:31
+
mat< 2, 3, f64, defaultp > f64mat2x3
Double-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:783
+
vec< 3, u64, defaultp > u64vec3
Default qualifier 64 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:401
+
mat< 3, 3, f64, defaultp > f64mat3x3
Double-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:784
+
mat< 2, 2, float, defaultp > mat2x2
2 columns of 2 components matrix of single-precision floating-point numbers.
+
mat< 4, 2, f32, defaultp > f32mat4x2
Single-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:702
+
int64 mediump_int64_t
Medium qualifier 64 bit signed integer type.
Definition: fwd.hpp:83
+
int64 mediump_i64
Medium qualifier 64 bit signed integer type.
Definition: fwd.hpp:74
+
int8 lowp_int8
Low qualifier 8 bit signed integer type.
Definition: fwd.hpp:36
+
aligned_highp_ivec4 aligned_ivec4
4 components vector aligned in memory of signed integer numbers.
+
vec< 1, float, defaultp > vec1
1 components vector of single-precision floating-point numbers.
+
aligned_highp_uvec4 aligned_uvec4
4 components vector aligned in memory of unsigned integer numbers.
+
uint8 lowp_uint8
Low qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:94
+
vec< 4, u64, defaultp > u64vec4
Default qualifier 64 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:402
+
uint32 highp_uint32
High qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:124
+
vec< 3, float, defaultp > vec3
3 components vector of single-precision floating-point numbers.
+
aligned_highp_ivec3 aligned_ivec3
3 components vector aligned in memory of signed integer numbers.
+
uint16 highp_u16
High qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:105
+
vec< 4, i8, defaultp > i8vec4
8 bit signed integer vector of 4 components type.
Definition: fwd.hpp:240
+
int64 lowp_i64
Low qualifier 64 bit signed integer type.
Definition: fwd.hpp:73
+
int16 mediump_i16
Medium qualifier 16 bit signed integer type.
Definition: fwd.hpp:46
+
int8 mediump_int8_t
Medium qualifier 8 bit signed integer type.
Definition: fwd.hpp:41
+
uint16 highp_uint16
High qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:110
+
int32 lowp_int32
Low qualifier 32 bit signed integer type.
Definition: fwd.hpp:64
+
vec< 2, double, defaultp > dvec2
2 components vector of double-precision floating-point numbers.
+
detail::uint64 uint64
64 bit unsigned integer type.
+
mat< 3, 3, f32, defaultp > f32mat3x3
Single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:704
+
vec< 1, i8, defaultp > i8vec1
8 bit signed integer scalar type.
Definition: fwd.hpp:237
+
vec< 3, f32, defaultp > fvec3
Single-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:443
+
float float32_t
Default 32 bit single-qualifier floating-point scalar.
Definition: fwd.hpp:160
+
mat< 4, 2, f32, defaultp > fmat4x2
Single-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:662
+
vec< 4, u16, defaultp > u16vec4
Default qualifier 16 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:362
+
uint32 uint32_t
Default qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:129
+
aligned_highp_dvec3 aligned_dvec3
3 components vector aligned in memory of double-precision floating-point numbers. ...
+
mat< 2, 4, f64, defaultp > f64mat2x4
Double-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:786
+
int64 int64_t
64 bit signed integer type.
Definition: fwd.hpp:85
+
int16 mediump_int16
Medium qualifier 16 bit signed integer type.
Definition: fwd.hpp:51
+
uint64 lowp_u64
Low qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:131
+
aligned_highp_vec1 aligned_vec1
1 component vector aligned in memory of single-precision floating-point numbers.
+
mat< 4, 4, f32, defaultp > fmat4x4
Single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:668
+
int8 i8
8 bit signed integer type.
Definition: fwd.hpp:34
+
uint64 mediump_uint64_t
Medium qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:141
+
uint16 mediump_uint16
Medium qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:109
+
mat< 2, 4, f32, defaultp > f32mat2x4
Single-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:706
+
uint8 mediump_uint8_t
Medium qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:99
+
int16 lowp_i16
Low qualifier 16 bit signed integer type.
Definition: fwd.hpp:45
+
int32 i32
32 bit signed integer type.
Definition: fwd.hpp:62
+
uint8 uint8_t
Default qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:101
+
aligned_highp_dvec1 aligned_dvec1
1 component vector aligned in memory of double-precision floating-point numbers.
+
GLM_ALIGNED_TYPEDEF(f64quat, aligned_f64quat, 32)
Double-qualifier floating-point aligned quaternion.
+
mat< 3, 2, f64, defaultp > f64mat3x2
Double-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:781
+
vec< 1, unsigned int, defaultp > uvec1
1 component vector of unsigned integer numbers.
+
int16 mediump_int16_t
Medium qualifier 16 bit signed integer type.
Definition: fwd.hpp:55
+
int32 highp_i32
High qualifier 32 bit signed integer type.
Definition: fwd.hpp:61
+
int64 highp_int64
High qualifier 64 bit signed integer type.
Definition: fwd.hpp:80
+
vec< 4, double, defaultp > dvec4
4 components vector of double-precision floating-point numbers.
+
uint32 mediump_u32
Medium qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:118
+
uint8 mediump_u8
Medium qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:90
+
vec< 1, u64, defaultp > u64vec1
Default qualifier 64 bit unsigned integer scalar type.
Definition: fwd.hpp:399
+
vec< 1, int, defaultp > ivec1
1 component vector of signed integer numbers.
Definition: vector_int1.hpp:28
+
vec< 2, f32, defaultp > fvec2
Single-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:442
+
qua< double, defaultp > dquat
Quaternion of double-precision floating-point numbers.
+
detail::int64 int64
64 bit signed integer type.
+
mat< 3, 4, f32, defaultp > fmat3x4
Single-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:667
+
int32 mediump_int32
Medium qualifier 32 bit signed integer type.
Definition: fwd.hpp:65
+
uint16 lowp_u16
Low qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:103
+
uint16 mediump_uint16_t
Medium qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:113
+
vec< 3, u8, defaultp > u8vec3
Default qualifier 8 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:341
+
aligned_highp_mat3x3 aligned_mat3x3
3 by 3 matrix tightly aligned in memory of single-precision floating-point numbers.
+
vec< 3, f32, defaultp > f32vec3
Single-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:463
+
aligned_highp_dvec2 aligned_dvec2
2 components vector aligned in memory of double-precision floating-point numbers. ...
+
int8 int8_t
8 bit signed integer type.
Definition: fwd.hpp:43
+
vec< 4, i64, defaultp > i64vec4
64 bit signed integer vector of 4 components type.
Definition: fwd.hpp:300
+
vec< 1, f32, defaultp > fvec1
Single-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:441
+
aligned_highp_uvec3 aligned_uvec3
3 components vector aligned in memory of unsigned integer numbers.
+
vec< 1, u8, defaultp > u8vec1
Default qualifier 8 bit unsigned integer scalar type.
Definition: fwd.hpp:339
+
vec< 2, u32, defaultp > u32vec2
Default qualifier 32 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:380
+
int16 lowp_int16_t
Low qualifier 16 bit signed integer type.
Definition: fwd.hpp:54
+
mat< 3, 4, f32, defaultp > f32mat3x4
Single-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:707
+
vec< 3, i8, defaultp > i8vec3
8 bit signed integer vector of 3 components type.
Definition: fwd.hpp:239
+
int16 lowp_int16
Low qualifier 16 bit signed integer type.
Definition: fwd.hpp:50
+
vec< 3, f64, defaultp > f64vec3
Double-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:503
+
qua< float, defaultp > quat
Quaternion of single-precision floating-point numbers.
+
uint64 uint64_t
Default qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:143
+
vec< 1, u16, defaultp > u16vec1
Default qualifier 16 bit unsigned integer scalar type.
Definition: fwd.hpp:359
+
vec< 1, f32, defaultp > f32vec1
Single-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:461
+
int32 lowp_int32_t
Low qualifier 32 bit signed integer type.
Definition: fwd.hpp:68
+
mat< 2, 2, f64, defaultp > f64mat2x2
Double-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:780
+
vec< 2, u64, defaultp > u64vec2
Default qualifier 64 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:400
+
aligned_highp_vec3 aligned_vec3
3 components vector aligned in memory of single-precision floating-point numbers. ...
+
uint32 highp_u32
High qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:119
+
vec< 2, int, defaultp > ivec2
2 components vector of signed integer numbers.
Definition: vector_int2.hpp:15
+
aligned_highp_ivec2 aligned_ivec2
2 components vector aligned in memory of signed integer numbers.
+
Definition: common.hpp:20
+
vec< 4, u8, defaultp > u8vec4
Default qualifier 8 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:342
+
vec< 3, int, defaultp > ivec3
3 components vector of signed integer numbers.
Definition: vector_int3.hpp:15
+
uint16 uint16_t
Default qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:115
+
vec< 3, i32, defaultp > i32vec3
32 bit signed integer vector of 3 components type.
Definition: fwd.hpp:279
+
int8 highp_int8_t
High qualifier 8 bit signed integer type.
Definition: fwd.hpp:42
+
aligned_highp_ivec1 aligned_ivec1
1 component vector aligned in memory of signed integer numbers.
+
uint32 lowp_u32
Low qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:117
+
mat< 4, 4, f64, defaultp > f64mat4x4
Double-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:788
+
uint32 mediump_uint32_t
Medium qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:127
+
uint32 lowp_uint32
Low qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:122
+
mat< 2, 2, f32, defaultp > f32mat2x2
Single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:700
+
vec< 3, double, defaultp > dvec3
3 components vector of double-precision floating-point numbers.
+
int8 mediump_int8
Medium qualifier 8 bit signed integer type.
Definition: fwd.hpp:37
+
vec< 2, u16, defaultp > u16vec2
Default qualifier 16 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:360
+
mat< 4, 4, float, defaultp > mat4x4
4 columns of 4 components matrix of single-precision floating-point numbers.
+
mat< 3, 4, f64, defaultp > f64mat3x4
Double-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:787
+
vec< 4, i32, defaultp > i32vec4
32 bit signed integer vector of 4 components type.
Definition: fwd.hpp:280
+
vec< 1, double, defaultp > dvec1
1 components vector of double-precision floating-point numbers.
+
vec< 4, int, defaultp > ivec4
4 components vector of signed integer numbers.
Definition: vector_int4.hpp:15
+
int64 highp_i64
High qualifier 64 bit signed integer type.
Definition: fwd.hpp:75
+
uint16 u16
Default qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:106
+
+ + + + diff --git a/common/glm/doc/api/a01386.html b/common/glm/doc/api/a01386.html new file mode 100644 index 000000000..a715e0026 --- /dev/null +++ b/common/glm/doc/api/a01386.html @@ -0,0 +1,507 @@ + + + + + + + +0.9.9 API documenation: type_aligned.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtx/type_aligned.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

 GLM_ALIGNED_TYPEDEF (lowp_int8, aligned_lowp_int8, 1)
 
 GLM_ALIGNED_TYPEDEF (lowp_int16, aligned_lowp_int16, 2)
 
 GLM_ALIGNED_TYPEDEF (lowp_int32, aligned_lowp_int32, 4)
 
 GLM_ALIGNED_TYPEDEF (lowp_int64, aligned_lowp_int64, 8)
 
 GLM_ALIGNED_TYPEDEF (lowp_int8_t, aligned_lowp_int8_t, 1)
 
 GLM_ALIGNED_TYPEDEF (lowp_int16_t, aligned_lowp_int16_t, 2)
 
 GLM_ALIGNED_TYPEDEF (lowp_int32_t, aligned_lowp_int32_t, 4)
 
 GLM_ALIGNED_TYPEDEF (lowp_int64_t, aligned_lowp_int64_t, 8)
 
 GLM_ALIGNED_TYPEDEF (lowp_i8, aligned_lowp_i8, 1)
 
 GLM_ALIGNED_TYPEDEF (lowp_i16, aligned_lowp_i16, 2)
 
 GLM_ALIGNED_TYPEDEF (lowp_i32, aligned_lowp_i32, 4)
 
 GLM_ALIGNED_TYPEDEF (lowp_i64, aligned_lowp_i64, 8)
 
 GLM_ALIGNED_TYPEDEF (mediump_int8, aligned_mediump_int8, 1)
 
 GLM_ALIGNED_TYPEDEF (mediump_int16, aligned_mediump_int16, 2)
 
 GLM_ALIGNED_TYPEDEF (mediump_int32, aligned_mediump_int32, 4)
 
 GLM_ALIGNED_TYPEDEF (mediump_int64, aligned_mediump_int64, 8)
 
 GLM_ALIGNED_TYPEDEF (mediump_int8_t, aligned_mediump_int8_t, 1)
 
 GLM_ALIGNED_TYPEDEF (mediump_int16_t, aligned_mediump_int16_t, 2)
 
 GLM_ALIGNED_TYPEDEF (mediump_int32_t, aligned_mediump_int32_t, 4)
 
 GLM_ALIGNED_TYPEDEF (mediump_int64_t, aligned_mediump_int64_t, 8)
 
 GLM_ALIGNED_TYPEDEF (mediump_i8, aligned_mediump_i8, 1)
 
 GLM_ALIGNED_TYPEDEF (mediump_i16, aligned_mediump_i16, 2)
 
 GLM_ALIGNED_TYPEDEF (mediump_i32, aligned_mediump_i32, 4)
 
 GLM_ALIGNED_TYPEDEF (mediump_i64, aligned_mediump_i64, 8)
 
 GLM_ALIGNED_TYPEDEF (highp_int8, aligned_highp_int8, 1)
 
 GLM_ALIGNED_TYPEDEF (highp_int16, aligned_highp_int16, 2)
 
 GLM_ALIGNED_TYPEDEF (highp_int32, aligned_highp_int32, 4)
 
 GLM_ALIGNED_TYPEDEF (highp_int64, aligned_highp_int64, 8)
 
 GLM_ALIGNED_TYPEDEF (highp_int8_t, aligned_highp_int8_t, 1)
 
 GLM_ALIGNED_TYPEDEF (highp_int16_t, aligned_highp_int16_t, 2)
 
 GLM_ALIGNED_TYPEDEF (highp_int32_t, aligned_highp_int32_t, 4)
 
 GLM_ALIGNED_TYPEDEF (highp_int64_t, aligned_highp_int64_t, 8)
 
 GLM_ALIGNED_TYPEDEF (highp_i8, aligned_highp_i8, 1)
 
 GLM_ALIGNED_TYPEDEF (highp_i16, aligned_highp_i16, 2)
 
 GLM_ALIGNED_TYPEDEF (highp_i32, aligned_highp_i32, 4)
 
 GLM_ALIGNED_TYPEDEF (highp_i64, aligned_highp_i64, 8)
 
 GLM_ALIGNED_TYPEDEF (int8, aligned_int8, 1)
 
 GLM_ALIGNED_TYPEDEF (int16, aligned_int16, 2)
 
 GLM_ALIGNED_TYPEDEF (int32, aligned_int32, 4)
 
 GLM_ALIGNED_TYPEDEF (int64, aligned_int64, 8)
 
 GLM_ALIGNED_TYPEDEF (int8_t, aligned_int8_t, 1)
 
 GLM_ALIGNED_TYPEDEF (int16_t, aligned_int16_t, 2)
 
 GLM_ALIGNED_TYPEDEF (int32_t, aligned_int32_t, 4)
 
 GLM_ALIGNED_TYPEDEF (int64_t, aligned_int64_t, 8)
 
 GLM_ALIGNED_TYPEDEF (i8, aligned_i8, 1)
 
 GLM_ALIGNED_TYPEDEF (i16, aligned_i16, 2)
 
 GLM_ALIGNED_TYPEDEF (i32, aligned_i32, 4)
 
 GLM_ALIGNED_TYPEDEF (i64, aligned_i64, 8)
 
 GLM_ALIGNED_TYPEDEF (ivec1, aligned_ivec1, 4)
 
 GLM_ALIGNED_TYPEDEF (ivec2, aligned_ivec2, 8)
 
 GLM_ALIGNED_TYPEDEF (ivec3, aligned_ivec3, 16)
 
 GLM_ALIGNED_TYPEDEF (ivec4, aligned_ivec4, 16)
 
 GLM_ALIGNED_TYPEDEF (i8vec1, aligned_i8vec1, 1)
 
 GLM_ALIGNED_TYPEDEF (i8vec2, aligned_i8vec2, 2)
 
 GLM_ALIGNED_TYPEDEF (i8vec3, aligned_i8vec3, 4)
 
 GLM_ALIGNED_TYPEDEF (i8vec4, aligned_i8vec4, 4)
 
 GLM_ALIGNED_TYPEDEF (i16vec1, aligned_i16vec1, 2)
 
 GLM_ALIGNED_TYPEDEF (i16vec2, aligned_i16vec2, 4)
 
 GLM_ALIGNED_TYPEDEF (i16vec3, aligned_i16vec3, 8)
 
 GLM_ALIGNED_TYPEDEF (i16vec4, aligned_i16vec4, 8)
 
 GLM_ALIGNED_TYPEDEF (i32vec1, aligned_i32vec1, 4)
 
 GLM_ALIGNED_TYPEDEF (i32vec2, aligned_i32vec2, 8)
 
 GLM_ALIGNED_TYPEDEF (i32vec3, aligned_i32vec3, 16)
 
 GLM_ALIGNED_TYPEDEF (i32vec4, aligned_i32vec4, 16)
 
 GLM_ALIGNED_TYPEDEF (i64vec1, aligned_i64vec1, 8)
 
 GLM_ALIGNED_TYPEDEF (i64vec2, aligned_i64vec2, 16)
 
 GLM_ALIGNED_TYPEDEF (i64vec3, aligned_i64vec3, 32)
 
 GLM_ALIGNED_TYPEDEF (i64vec4, aligned_i64vec4, 32)
 
 GLM_ALIGNED_TYPEDEF (lowp_uint8, aligned_lowp_uint8, 1)
 
 GLM_ALIGNED_TYPEDEF (lowp_uint16, aligned_lowp_uint16, 2)
 
 GLM_ALIGNED_TYPEDEF (lowp_uint32, aligned_lowp_uint32, 4)
 
 GLM_ALIGNED_TYPEDEF (lowp_uint64, aligned_lowp_uint64, 8)
 
 GLM_ALIGNED_TYPEDEF (lowp_uint8_t, aligned_lowp_uint8_t, 1)
 
 GLM_ALIGNED_TYPEDEF (lowp_uint16_t, aligned_lowp_uint16_t, 2)
 
 GLM_ALIGNED_TYPEDEF (lowp_uint32_t, aligned_lowp_uint32_t, 4)
 
 GLM_ALIGNED_TYPEDEF (lowp_uint64_t, aligned_lowp_uint64_t, 8)
 
 GLM_ALIGNED_TYPEDEF (lowp_u8, aligned_lowp_u8, 1)
 
 GLM_ALIGNED_TYPEDEF (lowp_u16, aligned_lowp_u16, 2)
 
 GLM_ALIGNED_TYPEDEF (lowp_u32, aligned_lowp_u32, 4)
 
 GLM_ALIGNED_TYPEDEF (lowp_u64, aligned_lowp_u64, 8)
 
 GLM_ALIGNED_TYPEDEF (mediump_uint8, aligned_mediump_uint8, 1)
 
 GLM_ALIGNED_TYPEDEF (mediump_uint16, aligned_mediump_uint16, 2)
 
 GLM_ALIGNED_TYPEDEF (mediump_uint32, aligned_mediump_uint32, 4)
 
 GLM_ALIGNED_TYPEDEF (mediump_uint64, aligned_mediump_uint64, 8)
 
 GLM_ALIGNED_TYPEDEF (mediump_uint8_t, aligned_mediump_uint8_t, 1)
 
 GLM_ALIGNED_TYPEDEF (mediump_uint16_t, aligned_mediump_uint16_t, 2)
 
 GLM_ALIGNED_TYPEDEF (mediump_uint32_t, aligned_mediump_uint32_t, 4)
 
 GLM_ALIGNED_TYPEDEF (mediump_uint64_t, aligned_mediump_uint64_t, 8)
 
 GLM_ALIGNED_TYPEDEF (mediump_u8, aligned_mediump_u8, 1)
 
 GLM_ALIGNED_TYPEDEF (mediump_u16, aligned_mediump_u16, 2)
 
 GLM_ALIGNED_TYPEDEF (mediump_u32, aligned_mediump_u32, 4)
 
 GLM_ALIGNED_TYPEDEF (mediump_u64, aligned_mediump_u64, 8)
 
 GLM_ALIGNED_TYPEDEF (highp_uint8, aligned_highp_uint8, 1)
 
 GLM_ALIGNED_TYPEDEF (highp_uint16, aligned_highp_uint16, 2)
 
 GLM_ALIGNED_TYPEDEF (highp_uint32, aligned_highp_uint32, 4)
 
 GLM_ALIGNED_TYPEDEF (highp_uint64, aligned_highp_uint64, 8)
 
 GLM_ALIGNED_TYPEDEF (highp_uint8_t, aligned_highp_uint8_t, 1)
 
 GLM_ALIGNED_TYPEDEF (highp_uint16_t, aligned_highp_uint16_t, 2)
 
 GLM_ALIGNED_TYPEDEF (highp_uint32_t, aligned_highp_uint32_t, 4)
 
 GLM_ALIGNED_TYPEDEF (highp_uint64_t, aligned_highp_uint64_t, 8)
 
 GLM_ALIGNED_TYPEDEF (highp_u8, aligned_highp_u8, 1)
 
 GLM_ALIGNED_TYPEDEF (highp_u16, aligned_highp_u16, 2)
 
 GLM_ALIGNED_TYPEDEF (highp_u32, aligned_highp_u32, 4)
 
 GLM_ALIGNED_TYPEDEF (highp_u64, aligned_highp_u64, 8)
 
 GLM_ALIGNED_TYPEDEF (uint8, aligned_uint8, 1)
 
 GLM_ALIGNED_TYPEDEF (uint16, aligned_uint16, 2)
 
 GLM_ALIGNED_TYPEDEF (uint32, aligned_uint32, 4)
 
 GLM_ALIGNED_TYPEDEF (uint64, aligned_uint64, 8)
 
 GLM_ALIGNED_TYPEDEF (uint8_t, aligned_uint8_t, 1)
 
 GLM_ALIGNED_TYPEDEF (uint16_t, aligned_uint16_t, 2)
 
 GLM_ALIGNED_TYPEDEF (uint32_t, aligned_uint32_t, 4)
 
 GLM_ALIGNED_TYPEDEF (uint64_t, aligned_uint64_t, 8)
 
 GLM_ALIGNED_TYPEDEF (u8, aligned_u8, 1)
 
 GLM_ALIGNED_TYPEDEF (u16, aligned_u16, 2)
 
 GLM_ALIGNED_TYPEDEF (u32, aligned_u32, 4)
 
 GLM_ALIGNED_TYPEDEF (u64, aligned_u64, 8)
 
 GLM_ALIGNED_TYPEDEF (uvec1, aligned_uvec1, 4)
 
 GLM_ALIGNED_TYPEDEF (uvec2, aligned_uvec2, 8)
 
 GLM_ALIGNED_TYPEDEF (uvec3, aligned_uvec3, 16)
 
 GLM_ALIGNED_TYPEDEF (uvec4, aligned_uvec4, 16)
 
 GLM_ALIGNED_TYPEDEF (u8vec1, aligned_u8vec1, 1)
 
 GLM_ALIGNED_TYPEDEF (u8vec2, aligned_u8vec2, 2)
 
 GLM_ALIGNED_TYPEDEF (u8vec3, aligned_u8vec3, 4)
 
 GLM_ALIGNED_TYPEDEF (u8vec4, aligned_u8vec4, 4)
 
 GLM_ALIGNED_TYPEDEF (u16vec1, aligned_u16vec1, 2)
 
 GLM_ALIGNED_TYPEDEF (u16vec2, aligned_u16vec2, 4)
 
 GLM_ALIGNED_TYPEDEF (u16vec3, aligned_u16vec3, 8)
 
 GLM_ALIGNED_TYPEDEF (u16vec4, aligned_u16vec4, 8)
 
 GLM_ALIGNED_TYPEDEF (u32vec1, aligned_u32vec1, 4)
 
 GLM_ALIGNED_TYPEDEF (u32vec2, aligned_u32vec2, 8)
 
 GLM_ALIGNED_TYPEDEF (u32vec3, aligned_u32vec3, 16)
 
 GLM_ALIGNED_TYPEDEF (u32vec4, aligned_u32vec4, 16)
 
 GLM_ALIGNED_TYPEDEF (u64vec1, aligned_u64vec1, 8)
 
 GLM_ALIGNED_TYPEDEF (u64vec2, aligned_u64vec2, 16)
 
 GLM_ALIGNED_TYPEDEF (u64vec3, aligned_u64vec3, 32)
 
 GLM_ALIGNED_TYPEDEF (u64vec4, aligned_u64vec4, 32)
 
 GLM_ALIGNED_TYPEDEF (float32, aligned_float32, 4)
 
 GLM_ALIGNED_TYPEDEF (float32_t, aligned_float32_t, 4)
 
 GLM_ALIGNED_TYPEDEF (float32, aligned_f32, 4)
 
 GLM_ALIGNED_TYPEDEF (float64, aligned_float64, 8)
 
 GLM_ALIGNED_TYPEDEF (float64_t, aligned_float64_t, 8)
 
 GLM_ALIGNED_TYPEDEF (float64, aligned_f64, 8)
 
 GLM_ALIGNED_TYPEDEF (vec1, aligned_vec1, 4)
 
 GLM_ALIGNED_TYPEDEF (vec2, aligned_vec2, 8)
 
 GLM_ALIGNED_TYPEDEF (vec3, aligned_vec3, 16)
 
 GLM_ALIGNED_TYPEDEF (vec4, aligned_vec4, 16)
 
 GLM_ALIGNED_TYPEDEF (fvec1, aligned_fvec1, 4)
 
 GLM_ALIGNED_TYPEDEF (fvec2, aligned_fvec2, 8)
 
 GLM_ALIGNED_TYPEDEF (fvec3, aligned_fvec3, 16)
 
 GLM_ALIGNED_TYPEDEF (fvec4, aligned_fvec4, 16)
 
 GLM_ALIGNED_TYPEDEF (f32vec1, aligned_f32vec1, 4)
 
 GLM_ALIGNED_TYPEDEF (f32vec2, aligned_f32vec2, 8)
 
 GLM_ALIGNED_TYPEDEF (f32vec3, aligned_f32vec3, 16)
 
 GLM_ALIGNED_TYPEDEF (f32vec4, aligned_f32vec4, 16)
 
 GLM_ALIGNED_TYPEDEF (dvec1, aligned_dvec1, 8)
 
 GLM_ALIGNED_TYPEDEF (dvec2, aligned_dvec2, 16)
 
 GLM_ALIGNED_TYPEDEF (dvec3, aligned_dvec3, 32)
 
 GLM_ALIGNED_TYPEDEF (dvec4, aligned_dvec4, 32)
 
 GLM_ALIGNED_TYPEDEF (f64vec1, aligned_f64vec1, 8)
 
 GLM_ALIGNED_TYPEDEF (f64vec2, aligned_f64vec2, 16)
 
 GLM_ALIGNED_TYPEDEF (f64vec3, aligned_f64vec3, 32)
 
 GLM_ALIGNED_TYPEDEF (f64vec4, aligned_f64vec4, 32)
 
 GLM_ALIGNED_TYPEDEF (mat2, aligned_mat2, 16)
 
 GLM_ALIGNED_TYPEDEF (mat3, aligned_mat3, 16)
 
 GLM_ALIGNED_TYPEDEF (mat4, aligned_mat4, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat2x2, aligned_fmat2, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat3x3, aligned_fmat3, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat4x4, aligned_fmat4, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat2x2, aligned_fmat2x2, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat2x3, aligned_fmat2x3, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat2x4, aligned_fmat2x4, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat3x2, aligned_fmat3x2, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat3x3, aligned_fmat3x3, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat3x4, aligned_fmat3x4, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat4x2, aligned_fmat4x2, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat4x3, aligned_fmat4x3, 16)
 
 GLM_ALIGNED_TYPEDEF (fmat4x4, aligned_fmat4x4, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat2x2, aligned_f32mat2, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat3x3, aligned_f32mat3, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat4x4, aligned_f32mat4, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat2x2, aligned_f32mat2x2, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat2x3, aligned_f32mat2x3, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat2x4, aligned_f32mat2x4, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat3x2, aligned_f32mat3x2, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat3x3, aligned_f32mat3x3, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat3x4, aligned_f32mat3x4, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat4x2, aligned_f32mat4x2, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat4x3, aligned_f32mat4x3, 16)
 
 GLM_ALIGNED_TYPEDEF (f32mat4x4, aligned_f32mat4x4, 16)
 
 GLM_ALIGNED_TYPEDEF (f64mat2x2, aligned_f64mat2, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat3x3, aligned_f64mat3, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat4x4, aligned_f64mat4, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat2x2, aligned_f64mat2x2, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat2x3, aligned_f64mat2x3, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat2x4, aligned_f64mat2x4, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat3x2, aligned_f64mat3x2, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat3x3, aligned_f64mat3x3, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat3x4, aligned_f64mat3x4, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat4x2, aligned_f64mat4x2, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat4x3, aligned_f64mat4x3, 32)
 
 GLM_ALIGNED_TYPEDEF (f64mat4x4, aligned_f64mat4x4, 32)
 
 GLM_ALIGNED_TYPEDEF (quat, aligned_quat, 16)
 
 GLM_ALIGNED_TYPEDEF (quat, aligned_fquat, 16)
 
 GLM_ALIGNED_TYPEDEF (dquat, aligned_dquat, 32)
 
 GLM_ALIGNED_TYPEDEF (f32quat, aligned_f32quat, 16)
 
 GLM_ALIGNED_TYPEDEF (f64quat, aligned_f64quat, 32)
 
+

Detailed Description

+
See also
Core features (dependence)
+
+GLM_GTC_quaternion (dependence)
+ +

Definition in file gtx/type_aligned.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01386_source.html b/common/glm/doc/api/a01386_source.html new file mode 100644 index 000000000..f64a8c634 --- /dev/null +++ b/common/glm/doc/api/a01386_source.html @@ -0,0 +1,296 @@ + + + + + + + +0.9.9 API documenation: type_aligned.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtx/type_aligned.hpp
+
+
+Go to the documentation of this file.
1 
16 #pragma once
17 
18 // Dependency:
19 #include "../gtc/type_precision.hpp"
20 #include "../gtc/quaternion.hpp"
21 
22 #ifndef GLM_ENABLE_EXPERIMENTAL
23 # error "GLM: GLM_GTX_type_aligned is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
24 #endif
25 
26 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
27 # pragma message("GLM: GLM_GTX_type_aligned extension included")
28 #endif
29 
30 namespace glm
31 {
33  // Signed int vector types
34 
37 
40  GLM_ALIGNED_TYPEDEF(lowp_int8, aligned_lowp_int8, 1);
41 
44  GLM_ALIGNED_TYPEDEF(lowp_int16, aligned_lowp_int16, 2);
45 
48  GLM_ALIGNED_TYPEDEF(lowp_int32, aligned_lowp_int32, 4);
49 
52  GLM_ALIGNED_TYPEDEF(lowp_int64, aligned_lowp_int64, 8);
53 
54 
57  GLM_ALIGNED_TYPEDEF(lowp_int8_t, aligned_lowp_int8_t, 1);
58 
61  GLM_ALIGNED_TYPEDEF(lowp_int16_t, aligned_lowp_int16_t, 2);
62 
65  GLM_ALIGNED_TYPEDEF(lowp_int32_t, aligned_lowp_int32_t, 4);
66 
69  GLM_ALIGNED_TYPEDEF(lowp_int64_t, aligned_lowp_int64_t, 8);
70 
71 
74  GLM_ALIGNED_TYPEDEF(lowp_i8, aligned_lowp_i8, 1);
75 
78  GLM_ALIGNED_TYPEDEF(lowp_i16, aligned_lowp_i16, 2);
79 
82  GLM_ALIGNED_TYPEDEF(lowp_i32, aligned_lowp_i32, 4);
83 
86  GLM_ALIGNED_TYPEDEF(lowp_i64, aligned_lowp_i64, 8);
87 
88 
91  GLM_ALIGNED_TYPEDEF(mediump_int8, aligned_mediump_int8, 1);
92 
95  GLM_ALIGNED_TYPEDEF(mediump_int16, aligned_mediump_int16, 2);
96 
99  GLM_ALIGNED_TYPEDEF(mediump_int32, aligned_mediump_int32, 4);
100 
103  GLM_ALIGNED_TYPEDEF(mediump_int64, aligned_mediump_int64, 8);
104 
105 
108  GLM_ALIGNED_TYPEDEF(mediump_int8_t, aligned_mediump_int8_t, 1);
109 
112  GLM_ALIGNED_TYPEDEF(mediump_int16_t, aligned_mediump_int16_t, 2);
113 
116  GLM_ALIGNED_TYPEDEF(mediump_int32_t, aligned_mediump_int32_t, 4);
117 
120  GLM_ALIGNED_TYPEDEF(mediump_int64_t, aligned_mediump_int64_t, 8);
121 
122 
125  GLM_ALIGNED_TYPEDEF(mediump_i8, aligned_mediump_i8, 1);
126 
129  GLM_ALIGNED_TYPEDEF(mediump_i16, aligned_mediump_i16, 2);
130 
133  GLM_ALIGNED_TYPEDEF(mediump_i32, aligned_mediump_i32, 4);
134 
137  GLM_ALIGNED_TYPEDEF(mediump_i64, aligned_mediump_i64, 8);
138 
139 
142  GLM_ALIGNED_TYPEDEF(highp_int8, aligned_highp_int8, 1);
143 
146  GLM_ALIGNED_TYPEDEF(highp_int16, aligned_highp_int16, 2);
147 
150  GLM_ALIGNED_TYPEDEF(highp_int32, aligned_highp_int32, 4);
151 
154  GLM_ALIGNED_TYPEDEF(highp_int64, aligned_highp_int64, 8);
155 
156 
159  GLM_ALIGNED_TYPEDEF(highp_int8_t, aligned_highp_int8_t, 1);
160 
163  GLM_ALIGNED_TYPEDEF(highp_int16_t, aligned_highp_int16_t, 2);
164 
167  GLM_ALIGNED_TYPEDEF(highp_int32_t, aligned_highp_int32_t, 4);
168 
171  GLM_ALIGNED_TYPEDEF(highp_int64_t, aligned_highp_int64_t, 8);
172 
173 
176  GLM_ALIGNED_TYPEDEF(highp_i8, aligned_highp_i8, 1);
177 
180  GLM_ALIGNED_TYPEDEF(highp_i16, aligned_highp_i16, 2);
181 
184  GLM_ALIGNED_TYPEDEF(highp_i32, aligned_highp_i32, 4);
185 
188  GLM_ALIGNED_TYPEDEF(highp_i64, aligned_highp_i64, 8);
189 
190 
193  GLM_ALIGNED_TYPEDEF(int8, aligned_int8, 1);
194 
197  GLM_ALIGNED_TYPEDEF(int16, aligned_int16, 2);
198 
201  GLM_ALIGNED_TYPEDEF(int32, aligned_int32, 4);
202 
205  GLM_ALIGNED_TYPEDEF(int64, aligned_int64, 8);
206 
207 
210  GLM_ALIGNED_TYPEDEF(int8_t, aligned_int8_t, 1);
211 
214  GLM_ALIGNED_TYPEDEF(int16_t, aligned_int16_t, 2);
215 
218  GLM_ALIGNED_TYPEDEF(int32_t, aligned_int32_t, 4);
219 
222  GLM_ALIGNED_TYPEDEF(int64_t, aligned_int64_t, 8);
223 
224 
227  GLM_ALIGNED_TYPEDEF(i8, aligned_i8, 1);
228 
231  GLM_ALIGNED_TYPEDEF(i16, aligned_i16, 2);
232 
235  GLM_ALIGNED_TYPEDEF(i32, aligned_i32, 4);
236 
239  GLM_ALIGNED_TYPEDEF(i64, aligned_i64, 8);
240 
241 
245 
249 
253 
257 
258 
261  GLM_ALIGNED_TYPEDEF(i8vec1, aligned_i8vec1, 1);
262 
265  GLM_ALIGNED_TYPEDEF(i8vec2, aligned_i8vec2, 2);
266 
269  GLM_ALIGNED_TYPEDEF(i8vec3, aligned_i8vec3, 4);
270 
273  GLM_ALIGNED_TYPEDEF(i8vec4, aligned_i8vec4, 4);
274 
275 
278  GLM_ALIGNED_TYPEDEF(i16vec1, aligned_i16vec1, 2);
279 
282  GLM_ALIGNED_TYPEDEF(i16vec2, aligned_i16vec2, 4);
283 
286  GLM_ALIGNED_TYPEDEF(i16vec3, aligned_i16vec3, 8);
287 
290  GLM_ALIGNED_TYPEDEF(i16vec4, aligned_i16vec4, 8);
291 
292 
295  GLM_ALIGNED_TYPEDEF(i32vec1, aligned_i32vec1, 4);
296 
299  GLM_ALIGNED_TYPEDEF(i32vec2, aligned_i32vec2, 8);
300 
303  GLM_ALIGNED_TYPEDEF(i32vec3, aligned_i32vec3, 16);
304 
307  GLM_ALIGNED_TYPEDEF(i32vec4, aligned_i32vec4, 16);
308 
309 
312  GLM_ALIGNED_TYPEDEF(i64vec1, aligned_i64vec1, 8);
313 
316  GLM_ALIGNED_TYPEDEF(i64vec2, aligned_i64vec2, 16);
317 
320  GLM_ALIGNED_TYPEDEF(i64vec3, aligned_i64vec3, 32);
321 
324  GLM_ALIGNED_TYPEDEF(i64vec4, aligned_i64vec4, 32);
325 
326 
328  // Unsigned int vector types
329 
332  GLM_ALIGNED_TYPEDEF(lowp_uint8, aligned_lowp_uint8, 1);
333 
336  GLM_ALIGNED_TYPEDEF(lowp_uint16, aligned_lowp_uint16, 2);
337 
340  GLM_ALIGNED_TYPEDEF(lowp_uint32, aligned_lowp_uint32, 4);
341 
344  GLM_ALIGNED_TYPEDEF(lowp_uint64, aligned_lowp_uint64, 8);
345 
346 
349  GLM_ALIGNED_TYPEDEF(lowp_uint8_t, aligned_lowp_uint8_t, 1);
350 
353  GLM_ALIGNED_TYPEDEF(lowp_uint16_t, aligned_lowp_uint16_t, 2);
354 
357  GLM_ALIGNED_TYPEDEF(lowp_uint32_t, aligned_lowp_uint32_t, 4);
358 
361  GLM_ALIGNED_TYPEDEF(lowp_uint64_t, aligned_lowp_uint64_t, 8);
362 
363 
366  GLM_ALIGNED_TYPEDEF(lowp_u8, aligned_lowp_u8, 1);
367 
370  GLM_ALIGNED_TYPEDEF(lowp_u16, aligned_lowp_u16, 2);
371 
374  GLM_ALIGNED_TYPEDEF(lowp_u32, aligned_lowp_u32, 4);
375 
378  GLM_ALIGNED_TYPEDEF(lowp_u64, aligned_lowp_u64, 8);
379 
380 
383  GLM_ALIGNED_TYPEDEF(mediump_uint8, aligned_mediump_uint8, 1);
384 
387  GLM_ALIGNED_TYPEDEF(mediump_uint16, aligned_mediump_uint16, 2);
388 
391  GLM_ALIGNED_TYPEDEF(mediump_uint32, aligned_mediump_uint32, 4);
392 
395  GLM_ALIGNED_TYPEDEF(mediump_uint64, aligned_mediump_uint64, 8);
396 
397 
400  GLM_ALIGNED_TYPEDEF(mediump_uint8_t, aligned_mediump_uint8_t, 1);
401 
404  GLM_ALIGNED_TYPEDEF(mediump_uint16_t, aligned_mediump_uint16_t, 2);
405 
408  GLM_ALIGNED_TYPEDEF(mediump_uint32_t, aligned_mediump_uint32_t, 4);
409 
412  GLM_ALIGNED_TYPEDEF(mediump_uint64_t, aligned_mediump_uint64_t, 8);
413 
414 
417  GLM_ALIGNED_TYPEDEF(mediump_u8, aligned_mediump_u8, 1);
418 
421  GLM_ALIGNED_TYPEDEF(mediump_u16, aligned_mediump_u16, 2);
422 
425  GLM_ALIGNED_TYPEDEF(mediump_u32, aligned_mediump_u32, 4);
426 
429  GLM_ALIGNED_TYPEDEF(mediump_u64, aligned_mediump_u64, 8);
430 
431 
434  GLM_ALIGNED_TYPEDEF(highp_uint8, aligned_highp_uint8, 1);
435 
438  GLM_ALIGNED_TYPEDEF(highp_uint16, aligned_highp_uint16, 2);
439 
442  GLM_ALIGNED_TYPEDEF(highp_uint32, aligned_highp_uint32, 4);
443 
446  GLM_ALIGNED_TYPEDEF(highp_uint64, aligned_highp_uint64, 8);
447 
448 
451  GLM_ALIGNED_TYPEDEF(highp_uint8_t, aligned_highp_uint8_t, 1);
452 
455  GLM_ALIGNED_TYPEDEF(highp_uint16_t, aligned_highp_uint16_t, 2);
456 
459  GLM_ALIGNED_TYPEDEF(highp_uint32_t, aligned_highp_uint32_t, 4);
460 
463  GLM_ALIGNED_TYPEDEF(highp_uint64_t, aligned_highp_uint64_t, 8);
464 
465 
468  GLM_ALIGNED_TYPEDEF(highp_u8, aligned_highp_u8, 1);
469 
472  GLM_ALIGNED_TYPEDEF(highp_u16, aligned_highp_u16, 2);
473 
476  GLM_ALIGNED_TYPEDEF(highp_u32, aligned_highp_u32, 4);
477 
480  GLM_ALIGNED_TYPEDEF(highp_u64, aligned_highp_u64, 8);
481 
482 
485  GLM_ALIGNED_TYPEDEF(uint8, aligned_uint8, 1);
486 
489  GLM_ALIGNED_TYPEDEF(uint16, aligned_uint16, 2);
490 
493  GLM_ALIGNED_TYPEDEF(uint32, aligned_uint32, 4);
494 
497  GLM_ALIGNED_TYPEDEF(uint64, aligned_uint64, 8);
498 
499 
502  GLM_ALIGNED_TYPEDEF(uint8_t, aligned_uint8_t, 1);
503 
506  GLM_ALIGNED_TYPEDEF(uint16_t, aligned_uint16_t, 2);
507 
510  GLM_ALIGNED_TYPEDEF(uint32_t, aligned_uint32_t, 4);
511 
514  GLM_ALIGNED_TYPEDEF(uint64_t, aligned_uint64_t, 8);
515 
516 
519  GLM_ALIGNED_TYPEDEF(u8, aligned_u8, 1);
520 
523  GLM_ALIGNED_TYPEDEF(u16, aligned_u16, 2);
524 
527  GLM_ALIGNED_TYPEDEF(u32, aligned_u32, 4);
528 
531  GLM_ALIGNED_TYPEDEF(u64, aligned_u64, 8);
532 
533 
537 
541 
545 
549 
550 
553  GLM_ALIGNED_TYPEDEF(u8vec1, aligned_u8vec1, 1);
554 
557  GLM_ALIGNED_TYPEDEF(u8vec2, aligned_u8vec2, 2);
558 
561  GLM_ALIGNED_TYPEDEF(u8vec3, aligned_u8vec3, 4);
562 
565  GLM_ALIGNED_TYPEDEF(u8vec4, aligned_u8vec4, 4);
566 
567 
570  GLM_ALIGNED_TYPEDEF(u16vec1, aligned_u16vec1, 2);
571 
574  GLM_ALIGNED_TYPEDEF(u16vec2, aligned_u16vec2, 4);
575 
578  GLM_ALIGNED_TYPEDEF(u16vec3, aligned_u16vec3, 8);
579 
582  GLM_ALIGNED_TYPEDEF(u16vec4, aligned_u16vec4, 8);
583 
584 
587  GLM_ALIGNED_TYPEDEF(u32vec1, aligned_u32vec1, 4);
588 
591  GLM_ALIGNED_TYPEDEF(u32vec2, aligned_u32vec2, 8);
592 
595  GLM_ALIGNED_TYPEDEF(u32vec3, aligned_u32vec3, 16);
596 
599  GLM_ALIGNED_TYPEDEF(u32vec4, aligned_u32vec4, 16);
600 
601 
604  GLM_ALIGNED_TYPEDEF(u64vec1, aligned_u64vec1, 8);
605 
608  GLM_ALIGNED_TYPEDEF(u64vec2, aligned_u64vec2, 16);
609 
612  GLM_ALIGNED_TYPEDEF(u64vec3, aligned_u64vec3, 32);
613 
616  GLM_ALIGNED_TYPEDEF(u64vec4, aligned_u64vec4, 32);
617 
618 
620  // Float vector types
621 
624  GLM_ALIGNED_TYPEDEF(float32, aligned_float32, 4);
625 
628  GLM_ALIGNED_TYPEDEF(float32_t, aligned_float32_t, 4);
629 
632  GLM_ALIGNED_TYPEDEF(float32, aligned_f32, 4);
633 
634 # ifndef GLM_FORCE_SINGLE_ONLY
635 
638  GLM_ALIGNED_TYPEDEF(float64, aligned_float64, 8);
639 
642  GLM_ALIGNED_TYPEDEF(float64_t, aligned_float64_t, 8);
643 
646  GLM_ALIGNED_TYPEDEF(float64, aligned_f64, 8);
647 
648 # endif//GLM_FORCE_SINGLE_ONLY
649 
650 
654 
658 
662 
666 
667 
670  GLM_ALIGNED_TYPEDEF(fvec1, aligned_fvec1, 4);
671 
674  GLM_ALIGNED_TYPEDEF(fvec2, aligned_fvec2, 8);
675 
678  GLM_ALIGNED_TYPEDEF(fvec3, aligned_fvec3, 16);
679 
682  GLM_ALIGNED_TYPEDEF(fvec4, aligned_fvec4, 16);
683 
684 
687  GLM_ALIGNED_TYPEDEF(f32vec1, aligned_f32vec1, 4);
688 
691  GLM_ALIGNED_TYPEDEF(f32vec2, aligned_f32vec2, 8);
692 
695  GLM_ALIGNED_TYPEDEF(f32vec3, aligned_f32vec3, 16);
696 
699  GLM_ALIGNED_TYPEDEF(f32vec4, aligned_f32vec4, 16);
700 
701 
705 
709 
713 
717 
718 
719 # ifndef GLM_FORCE_SINGLE_ONLY
720 
723  GLM_ALIGNED_TYPEDEF(f64vec1, aligned_f64vec1, 8);
724 
727  GLM_ALIGNED_TYPEDEF(f64vec2, aligned_f64vec2, 16);
728 
731  GLM_ALIGNED_TYPEDEF(f64vec3, aligned_f64vec3, 32);
732 
735  GLM_ALIGNED_TYPEDEF(f64vec4, aligned_f64vec4, 32);
736 
737 # endif//GLM_FORCE_SINGLE_ONLY
738 
740  // Float matrix types
741 
744  //typedef detail::tmat1<f32> mat1;
745 
749 
753 
757 
758 
761  //typedef detail::tmat1x1<f32> mat1;
762 
766 
770 
774 
775 
778  //typedef detail::tmat1x1<f32> fmat1;
779 
782  GLM_ALIGNED_TYPEDEF(fmat2x2, aligned_fmat2, 16);
783 
786  GLM_ALIGNED_TYPEDEF(fmat3x3, aligned_fmat3, 16);
787 
790  GLM_ALIGNED_TYPEDEF(fmat4x4, aligned_fmat4, 16);
791 
792 
795  //typedef f32 fmat1x1;
796 
799  GLM_ALIGNED_TYPEDEF(fmat2x2, aligned_fmat2x2, 16);
800 
803  GLM_ALIGNED_TYPEDEF(fmat2x3, aligned_fmat2x3, 16);
804 
807  GLM_ALIGNED_TYPEDEF(fmat2x4, aligned_fmat2x4, 16);
808 
811  GLM_ALIGNED_TYPEDEF(fmat3x2, aligned_fmat3x2, 16);
812 
815  GLM_ALIGNED_TYPEDEF(fmat3x3, aligned_fmat3x3, 16);
816 
819  GLM_ALIGNED_TYPEDEF(fmat3x4, aligned_fmat3x4, 16);
820 
823  GLM_ALIGNED_TYPEDEF(fmat4x2, aligned_fmat4x2, 16);
824 
827  GLM_ALIGNED_TYPEDEF(fmat4x3, aligned_fmat4x3, 16);
828 
831  GLM_ALIGNED_TYPEDEF(fmat4x4, aligned_fmat4x4, 16);
832 
833 
836  //typedef detail::tmat1x1<f32, defaultp> f32mat1;
837 
840  GLM_ALIGNED_TYPEDEF(f32mat2x2, aligned_f32mat2, 16);
841 
844  GLM_ALIGNED_TYPEDEF(f32mat3x3, aligned_f32mat3, 16);
845 
848  GLM_ALIGNED_TYPEDEF(f32mat4x4, aligned_f32mat4, 16);
849 
850 
853  //typedef f32 f32mat1x1;
854 
857  GLM_ALIGNED_TYPEDEF(f32mat2x2, aligned_f32mat2x2, 16);
858 
861  GLM_ALIGNED_TYPEDEF(f32mat2x3, aligned_f32mat2x3, 16);
862 
865  GLM_ALIGNED_TYPEDEF(f32mat2x4, aligned_f32mat2x4, 16);
866 
869  GLM_ALIGNED_TYPEDEF(f32mat3x2, aligned_f32mat3x2, 16);
870 
873  GLM_ALIGNED_TYPEDEF(f32mat3x3, aligned_f32mat3x3, 16);
874 
877  GLM_ALIGNED_TYPEDEF(f32mat3x4, aligned_f32mat3x4, 16);
878 
881  GLM_ALIGNED_TYPEDEF(f32mat4x2, aligned_f32mat4x2, 16);
882 
885  GLM_ALIGNED_TYPEDEF(f32mat4x3, aligned_f32mat4x3, 16);
886 
889  GLM_ALIGNED_TYPEDEF(f32mat4x4, aligned_f32mat4x4, 16);
890 
891 
892 # ifndef GLM_FORCE_SINGLE_ONLY
893 
896  //typedef detail::tmat1x1<f64, defaultp> f64mat1;
897 
900  GLM_ALIGNED_TYPEDEF(f64mat2x2, aligned_f64mat2, 32);
901 
904  GLM_ALIGNED_TYPEDEF(f64mat3x3, aligned_f64mat3, 32);
905 
908  GLM_ALIGNED_TYPEDEF(f64mat4x4, aligned_f64mat4, 32);
909 
910 
913  //typedef f64 f64mat1x1;
914 
917  GLM_ALIGNED_TYPEDEF(f64mat2x2, aligned_f64mat2x2, 32);
918 
921  GLM_ALIGNED_TYPEDEF(f64mat2x3, aligned_f64mat2x3, 32);
922 
925  GLM_ALIGNED_TYPEDEF(f64mat2x4, aligned_f64mat2x4, 32);
926 
929  GLM_ALIGNED_TYPEDEF(f64mat3x2, aligned_f64mat3x2, 32);
930 
933  GLM_ALIGNED_TYPEDEF(f64mat3x3, aligned_f64mat3x3, 32);
934 
937  GLM_ALIGNED_TYPEDEF(f64mat3x4, aligned_f64mat3x4, 32);
938 
941  GLM_ALIGNED_TYPEDEF(f64mat4x2, aligned_f64mat4x2, 32);
942 
945  GLM_ALIGNED_TYPEDEF(f64mat4x3, aligned_f64mat4x3, 32);
946 
949  GLM_ALIGNED_TYPEDEF(f64mat4x4, aligned_f64mat4x4, 32);
950 
951 # endif//GLM_FORCE_SINGLE_ONLY
952 
953 
955  // Quaternion types
956 
959  GLM_ALIGNED_TYPEDEF(quat, aligned_quat, 16);
960 
963  GLM_ALIGNED_TYPEDEF(quat, aligned_fquat, 16);
964 
967  GLM_ALIGNED_TYPEDEF(dquat, aligned_dquat, 32);
968 
971  GLM_ALIGNED_TYPEDEF(f32quat, aligned_f32quat, 16);
972 
973 # ifndef GLM_FORCE_SINGLE_ONLY
974 
977  GLM_ALIGNED_TYPEDEF(f64quat, aligned_f64quat, 32);
978 
979 # endif//GLM_FORCE_SINGLE_ONLY
980 
982 }//namespace glm
983 
984 #include "type_aligned.inl"
int32 int32_t
32 bit signed integer type.
Definition: fwd.hpp:71
+
uint64 u64
Default qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:134
+
vec< 3, u16, defaultp > u16vec3
Default qualifier 16 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:361
+
vec< 3, unsigned int, defaultp > uvec3
3 components vector of unsigned integer numbers.
+
vec< 1, i16, defaultp > i16vec1
16 bit signed integer scalar type.
Definition: fwd.hpp:257
+
uint16 highp_uint16_t
High qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:114
+
qua< f64, defaultp > f64quat
Double-qualifier floating-point quaternion.
Definition: fwd.hpp:815
+
aligned_highp_mat3 aligned_mat3
3 by 3 matrix tightly aligned in memory of single-precision floating-point numbers.
+
int16 int16_t
16 bit signed integer type.
Definition: fwd.hpp:57
+
vec< 2, f64, defaultp > f64vec2
Double-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:502
+
int64 i64
64 bit signed integer type.
Definition: fwd.hpp:76
+
int32 lowp_i32
Low qualifier 32 bit signed integer type.
Definition: fwd.hpp:59
+
Definition: common.hpp:18
+
uint8 mediump_uint8
Medium qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:95
+
vec< 2, i64, defaultp > i64vec2
64 bit signed integer vector of 2 components type.
Definition: fwd.hpp:298
+
vec< 4, f32, defaultp > fvec4
Single-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:444
+
int8 lowp_int8_t
Low qualifier 8 bit signed integer type.
Definition: fwd.hpp:40
+
int64 lowp_int64_t
Low qualifier 64 bit signed integer type.
Definition: fwd.hpp:82
+
uint32 u32
Default qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:120
+
int8 mediump_i8
Medium qualifier 8 bit signed integer type.
Definition: fwd.hpp:32
+
vec< 4, i16, defaultp > i16vec4
16 bit signed integer vector of 4 components type.
Definition: fwd.hpp:260
+
double float64
Double precision floating-point numbers.
+
uint8 lowp_uint8_t
Low qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:98
+
int32 highp_int32_t
32 bit signed integer type.
Definition: fwd.hpp:70
+
vec< 1, f64, defaultp > f64vec1
Double-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:501
+
mat< 2, 4, f32, defaultp > fmat2x4
Single-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:666
+
mat< 3, 3, float, defaultp > mat3
3 columns of 3 components matrix of single-precision floating-point numbers.
+
int64 mediump_int64
Medium qualifier 64 bit signed integer type.
Definition: fwd.hpp:79
+
mat< 2, 3, f32, defaultp > f32mat2x3
Single-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:703
+
double float64_t
Default 64 bit double-qualifier floating-point scalar.
Definition: fwd.hpp:176
+
vec< 3, i16, defaultp > i16vec3
16 bit signed integer vector of 3 components type.
Definition: fwd.hpp:259
+
aligned_highp_vec2 aligned_vec2
2 components vector aligned in memory of single-precision floating-point numbers. ...
+
uint32 mediump_uint32
Medium qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:123
+
uint8 highp_u8
High qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:91
+
int64 lowp_int64
Low qualifier 64 bit signed integer type.
Definition: fwd.hpp:78
+
vec< 2, i32, defaultp > i32vec2
32 bit signed integer vector of 2 components type.
Definition: fwd.hpp:278
+
aligned_highp_mat4x4 aligned_mat4x4
4 by 4 matrix tightly aligned in memory of single-precision floating-point numbers.
+
vec< 4, unsigned int, defaultp > uvec4
4 components vector of unsigned integer numbers.
+
uint16 lowp_uint16_t
Low qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:112
+
uint8 lowp_u8
Low qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:89
+
aligned_highp_mat2x2 aligned_mat2x2
2 by 2 matrix tightly aligned in memory of single-precision floating-point numbers.
+
int64 highp_int64_t
High qualifier 64 bit signed integer type.
Definition: fwd.hpp:84
+
uint32 highp_uint32_t
High qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:128
+
mat< 3, 3, f32, defaultp > fmat3x3
Single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:664
+
uint64 mediump_uint64
Medium qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:137
+
int32 mediump_i32
Medium qualifier 32 bit signed integer type.
Definition: fwd.hpp:60
+
vec< 1, i64, defaultp > i64vec1
64 bit signed integer scalar type.
Definition: fwd.hpp:297
+
vec< 1, u32, defaultp > u32vec1
Default qualifier 32 bit unsigned integer scalar type.
Definition: fwd.hpp:379
+
aligned_highp_mat4 aligned_mat4
4 by 4 matrix tightly aligned in memory of single-precision floating-point numbers.
+
uint16 lowp_uint16
Low qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:108
+
uint8 highp_uint8_t
High qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:100
+
int8 highp_i8
High qualifier 8 bit signed integer type.
Definition: fwd.hpp:33
+
mat< 3, 2, f32, defaultp > fmat3x2
Single-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:661
+
int16 highp_int16
High qualifier 16 bit signed integer type.
Definition: fwd.hpp:52
+
int16 highp_i16
High qualifier 16 bit signed integer type.
Definition: fwd.hpp:47
+
vec< 2, i8, defaultp > i8vec2
8 bit signed integer vector of 2 components type.
Definition: fwd.hpp:238
+
mat< 4, 3, f32, defaultp > fmat4x3
Single-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:665
+
uint8 u8
Default qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:92
+
vec< 2, float, defaultp > vec2
2 components vector of single-precision floating-point numbers.
+
mat< 3, 2, f32, defaultp > f32mat3x2
Single-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:701
+
uint32 lowp_uint32_t
Low qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:126
+
aligned_highp_vec4 aligned_vec4
4 components vector aligned in memory of single-precision floating-point numbers. ...
+
vec< 4, f32, defaultp > f32vec4
Single-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:464
+
vec< 2, unsigned int, defaultp > uvec2
2 components vector of unsigned integer numbers.
+
uint64 mediump_u64
Medium qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:132
+
aligned_highp_dvec4 aligned_dvec4
4 components vector aligned in memory of double-precision floating-point numbers. ...
+
int16 i16
16 bit signed integer type.
Definition: fwd.hpp:48
+
vec< 2, u8, defaultp > u8vec2
Default qualifier 8 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:340
+
int16 highp_int16_t
High qualifier 16 bit signed integer type.
Definition: fwd.hpp:56
+
uint64 highp_uint64
High qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:138
+
vec< 2, i16, defaultp > i16vec2
16 bit signed integer vector of 2 components type.
Definition: fwd.hpp:258
+
uint8 highp_uint8
High qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:96
+
uint64 lowp_uint64_t
Low qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:140
+
int32 highp_int32
High qualifier 32 bit signed integer type.
Definition: fwd.hpp:66
+
mat< 4, 4, f32, defaultp > f32mat4x4
Single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:708
+
vec< 1, i32, defaultp > i32vec1
32 bit signed integer scalar type.
Definition: fwd.hpp:277
+
uint16 mediump_u16
Medium qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:104
+
int32 mediump_int32_t
Medium qualifier 32 bit signed integer type.
Definition: fwd.hpp:69
+
int8 highp_int8
High qualifier 8 bit signed integer type.
Definition: fwd.hpp:38
+
vec< 3, i64, defaultp > i64vec3
64 bit signed integer vector of 3 components type.
Definition: fwd.hpp:299
+
vec< 3, u32, defaultp > u32vec3
Default qualifier 32 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:381
+
mat< 4, 3, f64, defaultp > f64mat4x3
Double-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:785
+
mat< 4, 3, f32, defaultp > f32mat4x3
Single-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:705
+
vec< 2, f32, defaultp > f32vec2
Single-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:462
+
uint64 highp_u64
High qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:133
+
aligned_highp_uvec1 aligned_uvec1
1 component vector aligned in memory of unsigned integer numbers.
+
mat< 3, 3, float, defaultp > mat3x3
3 columns of 3 components matrix of single-precision floating-point numbers.
+
mat< 4, 2, f64, defaultp > f64mat4x2
Double-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:782
+
mat< 2, 3, f32, defaultp > fmat2x3
Single-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:663
+
uint64 lowp_uint64
Low qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:136
+
vec< 4, float, defaultp > vec4
4 components vector of single-precision floating-point numbers.
+
uint64 highp_uint64_t
High qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:142
+
vec< 4, u32, defaultp > u32vec4
Default qualifier 32 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:382
+
float float32
Single precision floating-point numbers.
+
aligned_highp_uvec2 aligned_uvec2
2 components vector aligned in memory of unsigned integer numbers.
+
mat< 2, 2, f32, defaultp > fmat2x2
Single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:660
+
qua< f32, defaultp > f32quat
Single-qualifier floating-point quaternion.
Definition: fwd.hpp:805
+
vec< 4, f64, defaultp > f64vec4
Double-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:504
+
aligned_highp_mat2 aligned_mat2
2 by 2 matrix tightly aligned in memory of single-precision floating-point numbers.
+
int8 lowp_i8
Low qualifier 8 bit signed integer type.
Definition: fwd.hpp:31
+
mat< 2, 3, f64, defaultp > f64mat2x3
Double-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:783
+
vec< 3, u64, defaultp > u64vec3
Default qualifier 64 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:401
+
mat< 3, 3, f64, defaultp > f64mat3x3
Double-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:784
+
mat< 4, 2, f32, defaultp > f32mat4x2
Single-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:702
+
int64 mediump_int64_t
Medium qualifier 64 bit signed integer type.
Definition: fwd.hpp:83
+
int64 mediump_i64
Medium qualifier 64 bit signed integer type.
Definition: fwd.hpp:74
+
int8 lowp_int8
Low qualifier 8 bit signed integer type.
Definition: fwd.hpp:36
+
aligned_highp_ivec4 aligned_ivec4
4 components vector aligned in memory of signed integer numbers.
+
vec< 1, float, defaultp > vec1
1 components vector of single-precision floating-point numbers.
+
aligned_highp_uvec4 aligned_uvec4
4 components vector aligned in memory of unsigned integer numbers.
+
uint8 lowp_uint8
Low qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:94
+
vec< 4, u64, defaultp > u64vec4
Default qualifier 64 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:402
+
uint32 highp_uint32
High qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:124
+
vec< 3, float, defaultp > vec3
3 components vector of single-precision floating-point numbers.
+
aligned_highp_ivec3 aligned_ivec3
3 components vector aligned in memory of signed integer numbers.
+
uint16 highp_u16
High qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:105
+
vec< 4, i8, defaultp > i8vec4
8 bit signed integer vector of 4 components type.
Definition: fwd.hpp:240
+
int64 lowp_i64
Low qualifier 64 bit signed integer type.
Definition: fwd.hpp:73
+
int16 mediump_i16
Medium qualifier 16 bit signed integer type.
Definition: fwd.hpp:46
+
int8 mediump_int8_t
Medium qualifier 8 bit signed integer type.
Definition: fwd.hpp:41
+
uint16 highp_uint16
High qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:110
+
int32 lowp_int32
Low qualifier 32 bit signed integer type.
Definition: fwd.hpp:64
+
vec< 2, double, defaultp > dvec2
2 components vector of double-precision floating-point numbers.
+
detail::uint64 uint64
64 bit unsigned integer type.
+
mat< 3, 3, f32, defaultp > f32mat3x3
Single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:704
+
vec< 1, i8, defaultp > i8vec1
8 bit signed integer scalar type.
Definition: fwd.hpp:237
+
vec< 3, f32, defaultp > fvec3
Single-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:443
+
float float32_t
Default 32 bit single-qualifier floating-point scalar.
Definition: fwd.hpp:160
+
mat< 4, 2, f32, defaultp > fmat4x2
Single-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:662
+
vec< 4, u16, defaultp > u16vec4
Default qualifier 16 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:362
+
uint32 uint32_t
Default qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:129
+
aligned_highp_dvec3 aligned_dvec3
3 components vector aligned in memory of double-precision floating-point numbers. ...
+
mat< 2, 4, f64, defaultp > f64mat2x4
Double-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:786
+
int64 int64_t
64 bit signed integer type.
Definition: fwd.hpp:85
+
int16 mediump_int16
Medium qualifier 16 bit signed integer type.
Definition: fwd.hpp:51
+
uint64 lowp_u64
Low qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:131
+
aligned_highp_vec1 aligned_vec1
1 component vector aligned in memory of single-precision floating-point numbers.
+
mat< 4, 4, f32, defaultp > fmat4x4
Single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:668
+
int8 i8
8 bit signed integer type.
Definition: fwd.hpp:34
+
uint64 mediump_uint64_t
Medium qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:141
+
uint16 mediump_uint16
Medium qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:109
+
mat< 2, 4, f32, defaultp > f32mat2x4
Single-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:706
+
uint8 mediump_uint8_t
Medium qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:99
+
int16 lowp_i16
Low qualifier 16 bit signed integer type.
Definition: fwd.hpp:45
+
int32 i32
32 bit signed integer type.
Definition: fwd.hpp:62
+
uint8 uint8_t
Default qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:101
+
aligned_highp_dvec1 aligned_dvec1
1 component vector aligned in memory of double-precision floating-point numbers.
+
GLM_ALIGNED_TYPEDEF(f64quat, aligned_f64quat, 32)
Double-qualifier floating-point aligned quaternion.
+
mat< 3, 2, f64, defaultp > f64mat3x2
Double-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:781
+
vec< 1, unsigned int, defaultp > uvec1
1 component vector of unsigned integer numbers.
+
int16 mediump_int16_t
Medium qualifier 16 bit signed integer type.
Definition: fwd.hpp:55
+
int32 highp_i32
High qualifier 32 bit signed integer type.
Definition: fwd.hpp:61
+
int64 highp_int64
High qualifier 64 bit signed integer type.
Definition: fwd.hpp:80
+
mat< 2, 2, float, defaultp > mat2
2 columns of 2 components matrix of single-precision floating-point numbers.
+
vec< 4, double, defaultp > dvec4
4 components vector of double-precision floating-point numbers.
+
uint32 mediump_u32
Medium qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:118
+
uint8 mediump_u8
Medium qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:90
+
vec< 1, u64, defaultp > u64vec1
Default qualifier 64 bit unsigned integer scalar type.
Definition: fwd.hpp:399
+
vec< 1, int, defaultp > ivec1
1 component vector of signed integer numbers.
Definition: vector_int1.hpp:28
+
vec< 2, f32, defaultp > fvec2
Single-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:442
+
qua< double, defaultp > dquat
Quaternion of double-precision floating-point numbers.
+
detail::int64 int64
64 bit signed integer type.
+
mat< 3, 4, f32, defaultp > fmat3x4
Single-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:667
+
int32 mediump_int32
Medium qualifier 32 bit signed integer type.
Definition: fwd.hpp:65
+
uint16 lowp_u16
Low qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:103
+
uint16 mediump_uint16_t
Medium qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:113
+
vec< 3, u8, defaultp > u8vec3
Default qualifier 8 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:341
+
aligned_highp_mat3x3 aligned_mat3x3
3 by 3 matrix tightly aligned in memory of single-precision floating-point numbers.
+
vec< 3, f32, defaultp > f32vec3
Single-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:463
+
mat< 4, 4, float, defaultp > mat4
4 columns of 4 components matrix of single-precision floating-point numbers.
+
mat< 4, 4, float, defaultp > mat4x4
4 columns of 4 components matrix of single-precision floating-point numbers.
+
aligned_highp_dvec2 aligned_dvec2
2 components vector aligned in memory of double-precision floating-point numbers. ...
+
int8 int8_t
8 bit signed integer type.
Definition: fwd.hpp:43
+
vec< 4, i64, defaultp > i64vec4
64 bit signed integer vector of 4 components type.
Definition: fwd.hpp:300
+
vec< 1, f32, defaultp > fvec1
Single-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:441
+
aligned_highp_uvec3 aligned_uvec3
3 components vector aligned in memory of unsigned integer numbers.
+
vec< 1, u8, defaultp > u8vec1
Default qualifier 8 bit unsigned integer scalar type.
Definition: fwd.hpp:339
+
vec< 2, u32, defaultp > u32vec2
Default qualifier 32 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:380
+
mat< 2, 2, float, defaultp > mat2x2
2 columns of 2 components matrix of single-precision floating-point numbers.
+
int16 lowp_int16_t
Low qualifier 16 bit signed integer type.
Definition: fwd.hpp:54
+
mat< 3, 4, f32, defaultp > f32mat3x4
Single-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:707
+
vec< 3, i8, defaultp > i8vec3
8 bit signed integer vector of 3 components type.
Definition: fwd.hpp:239
+
int16 lowp_int16
Low qualifier 16 bit signed integer type.
Definition: fwd.hpp:50
+
vec< 3, f64, defaultp > f64vec3
Double-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:503
+
qua< float, defaultp > quat
Quaternion of single-precision floating-point numbers.
+
uint64 uint64_t
Default qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:143
+
vec< 1, u16, defaultp > u16vec1
Default qualifier 16 bit unsigned integer scalar type.
Definition: fwd.hpp:359
+
vec< 1, f32, defaultp > f32vec1
Single-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:461
+
int32 lowp_int32_t
Low qualifier 32 bit signed integer type.
Definition: fwd.hpp:68
+
mat< 2, 2, f64, defaultp > f64mat2x2
Double-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:780
+
vec< 2, u64, defaultp > u64vec2
Default qualifier 64 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:400
+
aligned_highp_vec3 aligned_vec3
3 components vector aligned in memory of single-precision floating-point numbers. ...
+
uint32 highp_u32
High qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:119
+
vec< 2, int, defaultp > ivec2
2 components vector of signed integer numbers.
Definition: vector_int2.hpp:15
+
aligned_highp_ivec2 aligned_ivec2
2 components vector aligned in memory of signed integer numbers.
+
vec< 4, u8, defaultp > u8vec4
Default qualifier 8 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:342
+
vec< 3, int, defaultp > ivec3
3 components vector of signed integer numbers.
Definition: vector_int3.hpp:15
+
uint16 uint16_t
Default qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:115
+
vec< 3, i32, defaultp > i32vec3
32 bit signed integer vector of 3 components type.
Definition: fwd.hpp:279
+
int8 highp_int8_t
High qualifier 8 bit signed integer type.
Definition: fwd.hpp:42
+
aligned_highp_ivec1 aligned_ivec1
1 component vector aligned in memory of signed integer numbers.
+
uint32 lowp_u32
Low qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:117
+
mat< 4, 4, f64, defaultp > f64mat4x4
Double-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:788
+
uint32 mediump_uint32_t
Medium qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:127
+
uint32 lowp_uint32
Low qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:122
+
mat< 2, 2, f32, defaultp > f32mat2x2
Single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:700
+
vec< 3, double, defaultp > dvec3
3 components vector of double-precision floating-point numbers.
+
int8 mediump_int8
Medium qualifier 8 bit signed integer type.
Definition: fwd.hpp:37
+
vec< 2, u16, defaultp > u16vec2
Default qualifier 16 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:360
+
mat< 3, 4, f64, defaultp > f64mat3x4
Double-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:787
+
vec< 4, i32, defaultp > i32vec4
32 bit signed integer vector of 4 components type.
Definition: fwd.hpp:280
+
vec< 1, double, defaultp > dvec1
1 components vector of double-precision floating-point numbers.
+
vec< 4, int, defaultp > ivec4
4 components vector of signed integer numbers.
Definition: vector_int4.hpp:15
+
int64 highp_i64
High qualifier 64 bit signed integer type.
Definition: fwd.hpp:75
+
uint16 u16
Default qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:106
+
+ + + + diff --git a/common/glm/doc/api/a01387.html b/common/glm/doc/api/a01387.html new file mode 100644 index 000000000..f859ad773 --- /dev/null +++ b/common/glm/doc/api/a01387.html @@ -0,0 +1,717 @@ + + + + + + + +0.9.9 API documenation: type_aligned.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gtx/type_aligned.hpp File Reference
+
+
+ +

GLM_GTX_type_aligned +More...

+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

 GLM_ALIGNED_TYPEDEF (lowp_int8, aligned_lowp_int8, 1)
 Low qualifier 8 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (lowp_int16, aligned_lowp_int16, 2)
 Low qualifier 16 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (lowp_int32, aligned_lowp_int32, 4)
 Low qualifier 32 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (lowp_int64, aligned_lowp_int64, 8)
 Low qualifier 64 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (lowp_int8_t, aligned_lowp_int8_t, 1)
 Low qualifier 8 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (lowp_int16_t, aligned_lowp_int16_t, 2)
 Low qualifier 16 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (lowp_int32_t, aligned_lowp_int32_t, 4)
 Low qualifier 32 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (lowp_int64_t, aligned_lowp_int64_t, 8)
 Low qualifier 64 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (lowp_i8, aligned_lowp_i8, 1)
 Low qualifier 8 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (lowp_i16, aligned_lowp_i16, 2)
 Low qualifier 16 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (lowp_i32, aligned_lowp_i32, 4)
 Low qualifier 32 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (lowp_i64, aligned_lowp_i64, 8)
 Low qualifier 64 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (mediump_int8, aligned_mediump_int8, 1)
 Medium qualifier 8 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (mediump_int16, aligned_mediump_int16, 2)
 Medium qualifier 16 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (mediump_int32, aligned_mediump_int32, 4)
 Medium qualifier 32 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (mediump_int64, aligned_mediump_int64, 8)
 Medium qualifier 64 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (mediump_int8_t, aligned_mediump_int8_t, 1)
 Medium qualifier 8 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (mediump_int16_t, aligned_mediump_int16_t, 2)
 Medium qualifier 16 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (mediump_int32_t, aligned_mediump_int32_t, 4)
 Medium qualifier 32 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (mediump_int64_t, aligned_mediump_int64_t, 8)
 Medium qualifier 64 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (mediump_i8, aligned_mediump_i8, 1)
 Medium qualifier 8 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (mediump_i16, aligned_mediump_i16, 2)
 Medium qualifier 16 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (mediump_i32, aligned_mediump_i32, 4)
 Medium qualifier 32 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (mediump_i64, aligned_mediump_i64, 8)
 Medium qualifier 64 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (highp_int8, aligned_highp_int8, 1)
 High qualifier 8 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (highp_int16, aligned_highp_int16, 2)
 High qualifier 16 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (highp_int32, aligned_highp_int32, 4)
 High qualifier 32 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (highp_int64, aligned_highp_int64, 8)
 High qualifier 64 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (highp_int8_t, aligned_highp_int8_t, 1)
 High qualifier 8 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (highp_int16_t, aligned_highp_int16_t, 2)
 High qualifier 16 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (highp_int32_t, aligned_highp_int32_t, 4)
 High qualifier 32 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (highp_int64_t, aligned_highp_int64_t, 8)
 High qualifier 64 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (highp_i8, aligned_highp_i8, 1)
 High qualifier 8 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (highp_i16, aligned_highp_i16, 2)
 High qualifier 16 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (highp_i32, aligned_highp_i32, 4)
 High qualifier 32 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (highp_i64, aligned_highp_i64, 8)
 High qualifier 64 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (int8, aligned_int8, 1)
 Default qualifier 8 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (int16, aligned_int16, 2)
 Default qualifier 16 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (int32, aligned_int32, 4)
 Default qualifier 32 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (int64, aligned_int64, 8)
 Default qualifier 64 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (int8_t, aligned_int8_t, 1)
 Default qualifier 8 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (int16_t, aligned_int16_t, 2)
 Default qualifier 16 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (int32_t, aligned_int32_t, 4)
 Default qualifier 32 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (int64_t, aligned_int64_t, 8)
 Default qualifier 64 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (i8, aligned_i8, 1)
 Default qualifier 8 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (i16, aligned_i16, 2)
 Default qualifier 16 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (i32, aligned_i32, 4)
 Default qualifier 32 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (i64, aligned_i64, 8)
 Default qualifier 64 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (ivec1, aligned_ivec1, 4)
 Default qualifier 32 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (ivec2, aligned_ivec2, 8)
 Default qualifier 32 bit signed integer aligned vector of 2 components type. More...
 
 GLM_ALIGNED_TYPEDEF (ivec3, aligned_ivec3, 16)
 Default qualifier 32 bit signed integer aligned vector of 3 components type. More...
 
 GLM_ALIGNED_TYPEDEF (ivec4, aligned_ivec4, 16)
 Default qualifier 32 bit signed integer aligned vector of 4 components type. More...
 
 GLM_ALIGNED_TYPEDEF (i8vec1, aligned_i8vec1, 1)
 Default qualifier 8 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (i8vec2, aligned_i8vec2, 2)
 Default qualifier 8 bit signed integer aligned vector of 2 components type. More...
 
 GLM_ALIGNED_TYPEDEF (i8vec3, aligned_i8vec3, 4)
 Default qualifier 8 bit signed integer aligned vector of 3 components type. More...
 
 GLM_ALIGNED_TYPEDEF (i8vec4, aligned_i8vec4, 4)
 Default qualifier 8 bit signed integer aligned vector of 4 components type. More...
 
 GLM_ALIGNED_TYPEDEF (i16vec1, aligned_i16vec1, 2)
 Default qualifier 16 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (i16vec2, aligned_i16vec2, 4)
 Default qualifier 16 bit signed integer aligned vector of 2 components type. More...
 
 GLM_ALIGNED_TYPEDEF (i16vec3, aligned_i16vec3, 8)
 Default qualifier 16 bit signed integer aligned vector of 3 components type. More...
 
 GLM_ALIGNED_TYPEDEF (i16vec4, aligned_i16vec4, 8)
 Default qualifier 16 bit signed integer aligned vector of 4 components type. More...
 
 GLM_ALIGNED_TYPEDEF (i32vec1, aligned_i32vec1, 4)
 Default qualifier 32 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (i32vec2, aligned_i32vec2, 8)
 Default qualifier 32 bit signed integer aligned vector of 2 components type. More...
 
 GLM_ALIGNED_TYPEDEF (i32vec3, aligned_i32vec3, 16)
 Default qualifier 32 bit signed integer aligned vector of 3 components type. More...
 
 GLM_ALIGNED_TYPEDEF (i32vec4, aligned_i32vec4, 16)
 Default qualifier 32 bit signed integer aligned vector of 4 components type. More...
 
 GLM_ALIGNED_TYPEDEF (i64vec1, aligned_i64vec1, 8)
 Default qualifier 64 bit signed integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (i64vec2, aligned_i64vec2, 16)
 Default qualifier 64 bit signed integer aligned vector of 2 components type. More...
 
 GLM_ALIGNED_TYPEDEF (i64vec3, aligned_i64vec3, 32)
 Default qualifier 64 bit signed integer aligned vector of 3 components type. More...
 
 GLM_ALIGNED_TYPEDEF (i64vec4, aligned_i64vec4, 32)
 Default qualifier 64 bit signed integer aligned vector of 4 components type. More...
 
 GLM_ALIGNED_TYPEDEF (lowp_uint8, aligned_lowp_uint8, 1)
 Low qualifier 8 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (lowp_uint16, aligned_lowp_uint16, 2)
 Low qualifier 16 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (lowp_uint32, aligned_lowp_uint32, 4)
 Low qualifier 32 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (lowp_uint64, aligned_lowp_uint64, 8)
 Low qualifier 64 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (lowp_uint8_t, aligned_lowp_uint8_t, 1)
 Low qualifier 8 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (lowp_uint16_t, aligned_lowp_uint16_t, 2)
 Low qualifier 16 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (lowp_uint32_t, aligned_lowp_uint32_t, 4)
 Low qualifier 32 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (lowp_uint64_t, aligned_lowp_uint64_t, 8)
 Low qualifier 64 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (lowp_u8, aligned_lowp_u8, 1)
 Low qualifier 8 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (lowp_u16, aligned_lowp_u16, 2)
 Low qualifier 16 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (lowp_u32, aligned_lowp_u32, 4)
 Low qualifier 32 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (lowp_u64, aligned_lowp_u64, 8)
 Low qualifier 64 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (mediump_uint8, aligned_mediump_uint8, 1)
 Medium qualifier 8 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (mediump_uint16, aligned_mediump_uint16, 2)
 Medium qualifier 16 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (mediump_uint32, aligned_mediump_uint32, 4)
 Medium qualifier 32 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (mediump_uint64, aligned_mediump_uint64, 8)
 Medium qualifier 64 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (mediump_uint8_t, aligned_mediump_uint8_t, 1)
 Medium qualifier 8 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (mediump_uint16_t, aligned_mediump_uint16_t, 2)
 Medium qualifier 16 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (mediump_uint32_t, aligned_mediump_uint32_t, 4)
 Medium qualifier 32 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (mediump_uint64_t, aligned_mediump_uint64_t, 8)
 Medium qualifier 64 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (mediump_u8, aligned_mediump_u8, 1)
 Medium qualifier 8 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (mediump_u16, aligned_mediump_u16, 2)
 Medium qualifier 16 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (mediump_u32, aligned_mediump_u32, 4)
 Medium qualifier 32 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (mediump_u64, aligned_mediump_u64, 8)
 Medium qualifier 64 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (highp_uint8, aligned_highp_uint8, 1)
 High qualifier 8 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (highp_uint16, aligned_highp_uint16, 2)
 High qualifier 16 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (highp_uint32, aligned_highp_uint32, 4)
 High qualifier 32 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (highp_uint64, aligned_highp_uint64, 8)
 High qualifier 64 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (highp_uint8_t, aligned_highp_uint8_t, 1)
 High qualifier 8 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (highp_uint16_t, aligned_highp_uint16_t, 2)
 High qualifier 16 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (highp_uint32_t, aligned_highp_uint32_t, 4)
 High qualifier 32 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (highp_uint64_t, aligned_highp_uint64_t, 8)
 High qualifier 64 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (highp_u8, aligned_highp_u8, 1)
 High qualifier 8 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (highp_u16, aligned_highp_u16, 2)
 High qualifier 16 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (highp_u32, aligned_highp_u32, 4)
 High qualifier 32 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (highp_u64, aligned_highp_u64, 8)
 High qualifier 64 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (uint8, aligned_uint8, 1)
 Default qualifier 8 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (uint16, aligned_uint16, 2)
 Default qualifier 16 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (uint32, aligned_uint32, 4)
 Default qualifier 32 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (uint64, aligned_uint64, 8)
 Default qualifier 64 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (uint8_t, aligned_uint8_t, 1)
 Default qualifier 8 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (uint16_t, aligned_uint16_t, 2)
 Default qualifier 16 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (uint32_t, aligned_uint32_t, 4)
 Default qualifier 32 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (uint64_t, aligned_uint64_t, 8)
 Default qualifier 64 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (u8, aligned_u8, 1)
 Default qualifier 8 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (u16, aligned_u16, 2)
 Default qualifier 16 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (u32, aligned_u32, 4)
 Default qualifier 32 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (u64, aligned_u64, 8)
 Default qualifier 64 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (uvec1, aligned_uvec1, 4)
 Default qualifier 32 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (uvec2, aligned_uvec2, 8)
 Default qualifier 32 bit unsigned integer aligned vector of 2 components type. More...
 
 GLM_ALIGNED_TYPEDEF (uvec3, aligned_uvec3, 16)
 Default qualifier 32 bit unsigned integer aligned vector of 3 components type. More...
 
 GLM_ALIGNED_TYPEDEF (uvec4, aligned_uvec4, 16)
 Default qualifier 32 bit unsigned integer aligned vector of 4 components type. More...
 
 GLM_ALIGNED_TYPEDEF (u8vec1, aligned_u8vec1, 1)
 Default qualifier 8 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (u8vec2, aligned_u8vec2, 2)
 Default qualifier 8 bit unsigned integer aligned vector of 2 components type. More...
 
 GLM_ALIGNED_TYPEDEF (u8vec3, aligned_u8vec3, 4)
 Default qualifier 8 bit unsigned integer aligned vector of 3 components type. More...
 
 GLM_ALIGNED_TYPEDEF (u8vec4, aligned_u8vec4, 4)
 Default qualifier 8 bit unsigned integer aligned vector of 4 components type. More...
 
 GLM_ALIGNED_TYPEDEF (u16vec1, aligned_u16vec1, 2)
 Default qualifier 16 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (u16vec2, aligned_u16vec2, 4)
 Default qualifier 16 bit unsigned integer aligned vector of 2 components type. More...
 
 GLM_ALIGNED_TYPEDEF (u16vec3, aligned_u16vec3, 8)
 Default qualifier 16 bit unsigned integer aligned vector of 3 components type. More...
 
 GLM_ALIGNED_TYPEDEF (u16vec4, aligned_u16vec4, 8)
 Default qualifier 16 bit unsigned integer aligned vector of 4 components type. More...
 
 GLM_ALIGNED_TYPEDEF (u32vec1, aligned_u32vec1, 4)
 Default qualifier 32 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (u32vec2, aligned_u32vec2, 8)
 Default qualifier 32 bit unsigned integer aligned vector of 2 components type. More...
 
 GLM_ALIGNED_TYPEDEF (u32vec3, aligned_u32vec3, 16)
 Default qualifier 32 bit unsigned integer aligned vector of 3 components type. More...
 
 GLM_ALIGNED_TYPEDEF (u32vec4, aligned_u32vec4, 16)
 Default qualifier 32 bit unsigned integer aligned vector of 4 components type. More...
 
 GLM_ALIGNED_TYPEDEF (u64vec1, aligned_u64vec1, 8)
 Default qualifier 64 bit unsigned integer aligned scalar type. More...
 
 GLM_ALIGNED_TYPEDEF (u64vec2, aligned_u64vec2, 16)
 Default qualifier 64 bit unsigned integer aligned vector of 2 components type. More...
 
 GLM_ALIGNED_TYPEDEF (u64vec3, aligned_u64vec3, 32)
 Default qualifier 64 bit unsigned integer aligned vector of 3 components type. More...
 
 GLM_ALIGNED_TYPEDEF (u64vec4, aligned_u64vec4, 32)
 Default qualifier 64 bit unsigned integer aligned vector of 4 components type. More...
 
 GLM_ALIGNED_TYPEDEF (float32, aligned_float32, 4)
 32 bit single-qualifier floating-point aligned scalar. More...
 
 GLM_ALIGNED_TYPEDEF (float32_t, aligned_float32_t, 4)
 32 bit single-qualifier floating-point aligned scalar. More...
 
 GLM_ALIGNED_TYPEDEF (float32, aligned_f32, 4)
 32 bit single-qualifier floating-point aligned scalar. More...
 
 GLM_ALIGNED_TYPEDEF (float64, aligned_float64, 8)
 64 bit double-qualifier floating-point aligned scalar. More...
 
 GLM_ALIGNED_TYPEDEF (float64_t, aligned_float64_t, 8)
 64 bit double-qualifier floating-point aligned scalar. More...
 
 GLM_ALIGNED_TYPEDEF (float64, aligned_f64, 8)
 64 bit double-qualifier floating-point aligned scalar. More...
 
 GLM_ALIGNED_TYPEDEF (vec1, aligned_vec1, 4)
 Single-qualifier floating-point aligned vector of 1 component. More...
 
 GLM_ALIGNED_TYPEDEF (vec2, aligned_vec2, 8)
 Single-qualifier floating-point aligned vector of 2 components. More...
 
 GLM_ALIGNED_TYPEDEF (vec3, aligned_vec3, 16)
 Single-qualifier floating-point aligned vector of 3 components. More...
 
 GLM_ALIGNED_TYPEDEF (vec4, aligned_vec4, 16)
 Single-qualifier floating-point aligned vector of 4 components. More...
 
 GLM_ALIGNED_TYPEDEF (fvec1, aligned_fvec1, 4)
 Single-qualifier floating-point aligned vector of 1 component. More...
 
 GLM_ALIGNED_TYPEDEF (fvec2, aligned_fvec2, 8)
 Single-qualifier floating-point aligned vector of 2 components. More...
 
 GLM_ALIGNED_TYPEDEF (fvec3, aligned_fvec3, 16)
 Single-qualifier floating-point aligned vector of 3 components. More...
 
 GLM_ALIGNED_TYPEDEF (fvec4, aligned_fvec4, 16)
 Single-qualifier floating-point aligned vector of 4 components. More...
 
 GLM_ALIGNED_TYPEDEF (f32vec1, aligned_f32vec1, 4)
 Single-qualifier floating-point aligned vector of 1 component. More...
 
 GLM_ALIGNED_TYPEDEF (f32vec2, aligned_f32vec2, 8)
 Single-qualifier floating-point aligned vector of 2 components. More...
 
 GLM_ALIGNED_TYPEDEF (f32vec3, aligned_f32vec3, 16)
 Single-qualifier floating-point aligned vector of 3 components. More...
 
 GLM_ALIGNED_TYPEDEF (f32vec4, aligned_f32vec4, 16)
 Single-qualifier floating-point aligned vector of 4 components. More...
 
 GLM_ALIGNED_TYPEDEF (dvec1, aligned_dvec1, 8)
 Double-qualifier floating-point aligned vector of 1 component. More...
 
 GLM_ALIGNED_TYPEDEF (dvec2, aligned_dvec2, 16)
 Double-qualifier floating-point aligned vector of 2 components. More...
 
 GLM_ALIGNED_TYPEDEF (dvec3, aligned_dvec3, 32)
 Double-qualifier floating-point aligned vector of 3 components. More...
 
 GLM_ALIGNED_TYPEDEF (dvec4, aligned_dvec4, 32)
 Double-qualifier floating-point aligned vector of 4 components. More...
 
 GLM_ALIGNED_TYPEDEF (f64vec1, aligned_f64vec1, 8)
 Double-qualifier floating-point aligned vector of 1 component. More...
 
 GLM_ALIGNED_TYPEDEF (f64vec2, aligned_f64vec2, 16)
 Double-qualifier floating-point aligned vector of 2 components. More...
 
 GLM_ALIGNED_TYPEDEF (f64vec3, aligned_f64vec3, 32)
 Double-qualifier floating-point aligned vector of 3 components. More...
 
 GLM_ALIGNED_TYPEDEF (f64vec4, aligned_f64vec4, 32)
 Double-qualifier floating-point aligned vector of 4 components. More...
 
 GLM_ALIGNED_TYPEDEF (mat2, aligned_mat2, 16)
 Single-qualifier floating-point aligned 1x1 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (mat3, aligned_mat3, 16)
 Single-qualifier floating-point aligned 3x3 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (mat4, aligned_mat4, 16)
 Single-qualifier floating-point aligned 4x4 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (fmat2x2, aligned_fmat2, 16)
 Single-qualifier floating-point aligned 1x1 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (fmat3x3, aligned_fmat3, 16)
 Single-qualifier floating-point aligned 3x3 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (fmat4x4, aligned_fmat4, 16)
 Single-qualifier floating-point aligned 4x4 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (fmat2x2, aligned_fmat2x2, 16)
 Single-qualifier floating-point aligned 1x1 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (fmat2x3, aligned_fmat2x3, 16)
 Single-qualifier floating-point aligned 2x3 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (fmat2x4, aligned_fmat2x4, 16)
 Single-qualifier floating-point aligned 2x4 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (fmat3x2, aligned_fmat3x2, 16)
 Single-qualifier floating-point aligned 3x2 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (fmat3x3, aligned_fmat3x3, 16)
 Single-qualifier floating-point aligned 3x3 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (fmat3x4, aligned_fmat3x4, 16)
 Single-qualifier floating-point aligned 3x4 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (fmat4x2, aligned_fmat4x2, 16)
 Single-qualifier floating-point aligned 4x2 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (fmat4x3, aligned_fmat4x3, 16)
 Single-qualifier floating-point aligned 4x3 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (fmat4x4, aligned_fmat4x4, 16)
 Single-qualifier floating-point aligned 4x4 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (f32mat2x2, aligned_f32mat2, 16)
 Single-qualifier floating-point aligned 1x1 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (f32mat3x3, aligned_f32mat3, 16)
 Single-qualifier floating-point aligned 3x3 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (f32mat4x4, aligned_f32mat4, 16)
 Single-qualifier floating-point aligned 4x4 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (f32mat2x2, aligned_f32mat2x2, 16)
 Single-qualifier floating-point aligned 1x1 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (f32mat2x3, aligned_f32mat2x3, 16)
 Single-qualifier floating-point aligned 2x3 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (f32mat2x4, aligned_f32mat2x4, 16)
 Single-qualifier floating-point aligned 2x4 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (f32mat3x2, aligned_f32mat3x2, 16)
 Single-qualifier floating-point aligned 3x2 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (f32mat3x3, aligned_f32mat3x3, 16)
 Single-qualifier floating-point aligned 3x3 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (f32mat3x4, aligned_f32mat3x4, 16)
 Single-qualifier floating-point aligned 3x4 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (f32mat4x2, aligned_f32mat4x2, 16)
 Single-qualifier floating-point aligned 4x2 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (f32mat4x3, aligned_f32mat4x3, 16)
 Single-qualifier floating-point aligned 4x3 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (f32mat4x4, aligned_f32mat4x4, 16)
 Single-qualifier floating-point aligned 4x4 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (f64mat2x2, aligned_f64mat2, 32)
 Double-qualifier floating-point aligned 1x1 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (f64mat3x3, aligned_f64mat3, 32)
 Double-qualifier floating-point aligned 3x3 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (f64mat4x4, aligned_f64mat4, 32)
 Double-qualifier floating-point aligned 4x4 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (f64mat2x2, aligned_f64mat2x2, 32)
 Double-qualifier floating-point aligned 1x1 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (f64mat2x3, aligned_f64mat2x3, 32)
 Double-qualifier floating-point aligned 2x3 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (f64mat2x4, aligned_f64mat2x4, 32)
 Double-qualifier floating-point aligned 2x4 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (f64mat3x2, aligned_f64mat3x2, 32)
 Double-qualifier floating-point aligned 3x2 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (f64mat3x3, aligned_f64mat3x3, 32)
 Double-qualifier floating-point aligned 3x3 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (f64mat3x4, aligned_f64mat3x4, 32)
 Double-qualifier floating-point aligned 3x4 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (f64mat4x2, aligned_f64mat4x2, 32)
 Double-qualifier floating-point aligned 4x2 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (f64mat4x3, aligned_f64mat4x3, 32)
 Double-qualifier floating-point aligned 4x3 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (f64mat4x4, aligned_f64mat4x4, 32)
 Double-qualifier floating-point aligned 4x4 matrix. More...
 
 GLM_ALIGNED_TYPEDEF (quat, aligned_quat, 16)
 Single-qualifier floating-point aligned quaternion. More...
 
 GLM_ALIGNED_TYPEDEF (quat, aligned_fquat, 16)
 Single-qualifier floating-point aligned quaternion. More...
 
 GLM_ALIGNED_TYPEDEF (dquat, aligned_dquat, 32)
 Double-qualifier floating-point aligned quaternion. More...
 
 GLM_ALIGNED_TYPEDEF (f32quat, aligned_f32quat, 16)
 Single-qualifier floating-point aligned quaternion. More...
 
 GLM_ALIGNED_TYPEDEF (f64quat, aligned_f64quat, 32)
 Double-qualifier floating-point aligned quaternion. More...
 
+

Detailed Description

+

GLM_GTX_type_aligned

+
See also
Core features (dependence)
+
+GLM_GTC_quaternion (dependence)
+ +

Definition in file gtx/type_aligned.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01387_source.html b/common/glm/doc/api/a01387_source.html new file mode 100644 index 000000000..d2baccb26 --- /dev/null +++ b/common/glm/doc/api/a01387_source.html @@ -0,0 +1,294 @@ + + + + + + + +0.9.9 API documenation: type_aligned.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtx/type_aligned.hpp
+
+
+Go to the documentation of this file.
1 
16 #pragma once
17 
18 // Dependency:
19 #include "../gtc/type_precision.hpp"
20 #include "../gtc/quaternion.hpp"
21 
22 #ifndef GLM_ENABLE_EXPERIMENTAL
23 # error "GLM: GLM_GTX_type_aligned is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
24 #endif
25 
26 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
27 # pragma message("GLM: GLM_GTX_type_aligned extension included")
28 #endif
29 
30 namespace glm
31 {
33  // Signed int vector types
34 
37 
40  GLM_ALIGNED_TYPEDEF(lowp_int8, aligned_lowp_int8, 1);
41 
44  GLM_ALIGNED_TYPEDEF(lowp_int16, aligned_lowp_int16, 2);
45 
48  GLM_ALIGNED_TYPEDEF(lowp_int32, aligned_lowp_int32, 4);
49 
52  GLM_ALIGNED_TYPEDEF(lowp_int64, aligned_lowp_int64, 8);
53 
54 
57  GLM_ALIGNED_TYPEDEF(lowp_int8_t, aligned_lowp_int8_t, 1);
58 
61  GLM_ALIGNED_TYPEDEF(lowp_int16_t, aligned_lowp_int16_t, 2);
62 
65  GLM_ALIGNED_TYPEDEF(lowp_int32_t, aligned_lowp_int32_t, 4);
66 
69  GLM_ALIGNED_TYPEDEF(lowp_int64_t, aligned_lowp_int64_t, 8);
70 
71 
74  GLM_ALIGNED_TYPEDEF(lowp_i8, aligned_lowp_i8, 1);
75 
78  GLM_ALIGNED_TYPEDEF(lowp_i16, aligned_lowp_i16, 2);
79 
82  GLM_ALIGNED_TYPEDEF(lowp_i32, aligned_lowp_i32, 4);
83 
86  GLM_ALIGNED_TYPEDEF(lowp_i64, aligned_lowp_i64, 8);
87 
88 
91  GLM_ALIGNED_TYPEDEF(mediump_int8, aligned_mediump_int8, 1);
92 
95  GLM_ALIGNED_TYPEDEF(mediump_int16, aligned_mediump_int16, 2);
96 
99  GLM_ALIGNED_TYPEDEF(mediump_int32, aligned_mediump_int32, 4);
100 
103  GLM_ALIGNED_TYPEDEF(mediump_int64, aligned_mediump_int64, 8);
104 
105 
108  GLM_ALIGNED_TYPEDEF(mediump_int8_t, aligned_mediump_int8_t, 1);
109 
112  GLM_ALIGNED_TYPEDEF(mediump_int16_t, aligned_mediump_int16_t, 2);
113 
116  GLM_ALIGNED_TYPEDEF(mediump_int32_t, aligned_mediump_int32_t, 4);
117 
120  GLM_ALIGNED_TYPEDEF(mediump_int64_t, aligned_mediump_int64_t, 8);
121 
122 
125  GLM_ALIGNED_TYPEDEF(mediump_i8, aligned_mediump_i8, 1);
126 
129  GLM_ALIGNED_TYPEDEF(mediump_i16, aligned_mediump_i16, 2);
130 
133  GLM_ALIGNED_TYPEDEF(mediump_i32, aligned_mediump_i32, 4);
134 
137  GLM_ALIGNED_TYPEDEF(mediump_i64, aligned_mediump_i64, 8);
138 
139 
142  GLM_ALIGNED_TYPEDEF(highp_int8, aligned_highp_int8, 1);
143 
146  GLM_ALIGNED_TYPEDEF(highp_int16, aligned_highp_int16, 2);
147 
150  GLM_ALIGNED_TYPEDEF(highp_int32, aligned_highp_int32, 4);
151 
154  GLM_ALIGNED_TYPEDEF(highp_int64, aligned_highp_int64, 8);
155 
156 
159  GLM_ALIGNED_TYPEDEF(highp_int8_t, aligned_highp_int8_t, 1);
160 
163  GLM_ALIGNED_TYPEDEF(highp_int16_t, aligned_highp_int16_t, 2);
164 
167  GLM_ALIGNED_TYPEDEF(highp_int32_t, aligned_highp_int32_t, 4);
168 
171  GLM_ALIGNED_TYPEDEF(highp_int64_t, aligned_highp_int64_t, 8);
172 
173 
176  GLM_ALIGNED_TYPEDEF(highp_i8, aligned_highp_i8, 1);
177 
180  GLM_ALIGNED_TYPEDEF(highp_i16, aligned_highp_i16, 2);
181 
184  GLM_ALIGNED_TYPEDEF(highp_i32, aligned_highp_i32, 4);
185 
188  GLM_ALIGNED_TYPEDEF(highp_i64, aligned_highp_i64, 8);
189 
190 
193  GLM_ALIGNED_TYPEDEF(int8, aligned_int8, 1);
194 
197  GLM_ALIGNED_TYPEDEF(int16, aligned_int16, 2);
198 
201  GLM_ALIGNED_TYPEDEF(int32, aligned_int32, 4);
202 
205  GLM_ALIGNED_TYPEDEF(int64, aligned_int64, 8);
206 
207 
210  GLM_ALIGNED_TYPEDEF(int8_t, aligned_int8_t, 1);
211 
214  GLM_ALIGNED_TYPEDEF(int16_t, aligned_int16_t, 2);
215 
218  GLM_ALIGNED_TYPEDEF(int32_t, aligned_int32_t, 4);
219 
222  GLM_ALIGNED_TYPEDEF(int64_t, aligned_int64_t, 8);
223 
224 
227  GLM_ALIGNED_TYPEDEF(i8, aligned_i8, 1);
228 
231  GLM_ALIGNED_TYPEDEF(i16, aligned_i16, 2);
232 
235  GLM_ALIGNED_TYPEDEF(i32, aligned_i32, 4);
236 
239  GLM_ALIGNED_TYPEDEF(i64, aligned_i64, 8);
240 
241 
245 
249 
253 
257 
258 
261  GLM_ALIGNED_TYPEDEF(i8vec1, aligned_i8vec1, 1);
262 
265  GLM_ALIGNED_TYPEDEF(i8vec2, aligned_i8vec2, 2);
266 
269  GLM_ALIGNED_TYPEDEF(i8vec3, aligned_i8vec3, 4);
270 
273  GLM_ALIGNED_TYPEDEF(i8vec4, aligned_i8vec4, 4);
274 
275 
278  GLM_ALIGNED_TYPEDEF(i16vec1, aligned_i16vec1, 2);
279 
282  GLM_ALIGNED_TYPEDEF(i16vec2, aligned_i16vec2, 4);
283 
286  GLM_ALIGNED_TYPEDEF(i16vec3, aligned_i16vec3, 8);
287 
290  GLM_ALIGNED_TYPEDEF(i16vec4, aligned_i16vec4, 8);
291 
292 
295  GLM_ALIGNED_TYPEDEF(i32vec1, aligned_i32vec1, 4);
296 
299  GLM_ALIGNED_TYPEDEF(i32vec2, aligned_i32vec2, 8);
300 
303  GLM_ALIGNED_TYPEDEF(i32vec3, aligned_i32vec3, 16);
304 
307  GLM_ALIGNED_TYPEDEF(i32vec4, aligned_i32vec4, 16);
308 
309 
312  GLM_ALIGNED_TYPEDEF(i64vec1, aligned_i64vec1, 8);
313 
316  GLM_ALIGNED_TYPEDEF(i64vec2, aligned_i64vec2, 16);
317 
320  GLM_ALIGNED_TYPEDEF(i64vec3, aligned_i64vec3, 32);
321 
324  GLM_ALIGNED_TYPEDEF(i64vec4, aligned_i64vec4, 32);
325 
326 
328  // Unsigned int vector types
329 
332  GLM_ALIGNED_TYPEDEF(lowp_uint8, aligned_lowp_uint8, 1);
333 
336  GLM_ALIGNED_TYPEDEF(lowp_uint16, aligned_lowp_uint16, 2);
337 
340  GLM_ALIGNED_TYPEDEF(lowp_uint32, aligned_lowp_uint32, 4);
341 
344  GLM_ALIGNED_TYPEDEF(lowp_uint64, aligned_lowp_uint64, 8);
345 
346 
349  GLM_ALIGNED_TYPEDEF(lowp_uint8_t, aligned_lowp_uint8_t, 1);
350 
353  GLM_ALIGNED_TYPEDEF(lowp_uint16_t, aligned_lowp_uint16_t, 2);
354 
357  GLM_ALIGNED_TYPEDEF(lowp_uint32_t, aligned_lowp_uint32_t, 4);
358 
361  GLM_ALIGNED_TYPEDEF(lowp_uint64_t, aligned_lowp_uint64_t, 8);
362 
363 
366  GLM_ALIGNED_TYPEDEF(lowp_u8, aligned_lowp_u8, 1);
367 
370  GLM_ALIGNED_TYPEDEF(lowp_u16, aligned_lowp_u16, 2);
371 
374  GLM_ALIGNED_TYPEDEF(lowp_u32, aligned_lowp_u32, 4);
375 
378  GLM_ALIGNED_TYPEDEF(lowp_u64, aligned_lowp_u64, 8);
379 
380 
383  GLM_ALIGNED_TYPEDEF(mediump_uint8, aligned_mediump_uint8, 1);
384 
387  GLM_ALIGNED_TYPEDEF(mediump_uint16, aligned_mediump_uint16, 2);
388 
391  GLM_ALIGNED_TYPEDEF(mediump_uint32, aligned_mediump_uint32, 4);
392 
395  GLM_ALIGNED_TYPEDEF(mediump_uint64, aligned_mediump_uint64, 8);
396 
397 
400  GLM_ALIGNED_TYPEDEF(mediump_uint8_t, aligned_mediump_uint8_t, 1);
401 
404  GLM_ALIGNED_TYPEDEF(mediump_uint16_t, aligned_mediump_uint16_t, 2);
405 
408  GLM_ALIGNED_TYPEDEF(mediump_uint32_t, aligned_mediump_uint32_t, 4);
409 
412  GLM_ALIGNED_TYPEDEF(mediump_uint64_t, aligned_mediump_uint64_t, 8);
413 
414 
417  GLM_ALIGNED_TYPEDEF(mediump_u8, aligned_mediump_u8, 1);
418 
421  GLM_ALIGNED_TYPEDEF(mediump_u16, aligned_mediump_u16, 2);
422 
425  GLM_ALIGNED_TYPEDEF(mediump_u32, aligned_mediump_u32, 4);
426 
429  GLM_ALIGNED_TYPEDEF(mediump_u64, aligned_mediump_u64, 8);
430 
431 
434  GLM_ALIGNED_TYPEDEF(highp_uint8, aligned_highp_uint8, 1);
435 
438  GLM_ALIGNED_TYPEDEF(highp_uint16, aligned_highp_uint16, 2);
439 
442  GLM_ALIGNED_TYPEDEF(highp_uint32, aligned_highp_uint32, 4);
443 
446  GLM_ALIGNED_TYPEDEF(highp_uint64, aligned_highp_uint64, 8);
447 
448 
451  GLM_ALIGNED_TYPEDEF(highp_uint8_t, aligned_highp_uint8_t, 1);
452 
455  GLM_ALIGNED_TYPEDEF(highp_uint16_t, aligned_highp_uint16_t, 2);
456 
459  GLM_ALIGNED_TYPEDEF(highp_uint32_t, aligned_highp_uint32_t, 4);
460 
463  GLM_ALIGNED_TYPEDEF(highp_uint64_t, aligned_highp_uint64_t, 8);
464 
465 
468  GLM_ALIGNED_TYPEDEF(highp_u8, aligned_highp_u8, 1);
469 
472  GLM_ALIGNED_TYPEDEF(highp_u16, aligned_highp_u16, 2);
473 
476  GLM_ALIGNED_TYPEDEF(highp_u32, aligned_highp_u32, 4);
477 
480  GLM_ALIGNED_TYPEDEF(highp_u64, aligned_highp_u64, 8);
481 
482 
485  GLM_ALIGNED_TYPEDEF(uint8, aligned_uint8, 1);
486 
489  GLM_ALIGNED_TYPEDEF(uint16, aligned_uint16, 2);
490 
493  GLM_ALIGNED_TYPEDEF(uint32, aligned_uint32, 4);
494 
497  GLM_ALIGNED_TYPEDEF(uint64, aligned_uint64, 8);
498 
499 
502  GLM_ALIGNED_TYPEDEF(uint8_t, aligned_uint8_t, 1);
503 
506  GLM_ALIGNED_TYPEDEF(uint16_t, aligned_uint16_t, 2);
507 
510  GLM_ALIGNED_TYPEDEF(uint32_t, aligned_uint32_t, 4);
511 
514  GLM_ALIGNED_TYPEDEF(uint64_t, aligned_uint64_t, 8);
515 
516 
519  GLM_ALIGNED_TYPEDEF(u8, aligned_u8, 1);
520 
523  GLM_ALIGNED_TYPEDEF(u16, aligned_u16, 2);
524 
527  GLM_ALIGNED_TYPEDEF(u32, aligned_u32, 4);
528 
531  GLM_ALIGNED_TYPEDEF(u64, aligned_u64, 8);
532 
533 
537 
541 
545 
549 
550 
553  GLM_ALIGNED_TYPEDEF(u8vec1, aligned_u8vec1, 1);
554 
557  GLM_ALIGNED_TYPEDEF(u8vec2, aligned_u8vec2, 2);
558 
561  GLM_ALIGNED_TYPEDEF(u8vec3, aligned_u8vec3, 4);
562 
565  GLM_ALIGNED_TYPEDEF(u8vec4, aligned_u8vec4, 4);
566 
567 
570  GLM_ALIGNED_TYPEDEF(u16vec1, aligned_u16vec1, 2);
571 
574  GLM_ALIGNED_TYPEDEF(u16vec2, aligned_u16vec2, 4);
575 
578  GLM_ALIGNED_TYPEDEF(u16vec3, aligned_u16vec3, 8);
579 
582  GLM_ALIGNED_TYPEDEF(u16vec4, aligned_u16vec4, 8);
583 
584 
587  GLM_ALIGNED_TYPEDEF(u32vec1, aligned_u32vec1, 4);
588 
591  GLM_ALIGNED_TYPEDEF(u32vec2, aligned_u32vec2, 8);
592 
595  GLM_ALIGNED_TYPEDEF(u32vec3, aligned_u32vec3, 16);
596 
599  GLM_ALIGNED_TYPEDEF(u32vec4, aligned_u32vec4, 16);
600 
601 
604  GLM_ALIGNED_TYPEDEF(u64vec1, aligned_u64vec1, 8);
605 
608  GLM_ALIGNED_TYPEDEF(u64vec2, aligned_u64vec2, 16);
609 
612  GLM_ALIGNED_TYPEDEF(u64vec3, aligned_u64vec3, 32);
613 
616  GLM_ALIGNED_TYPEDEF(u64vec4, aligned_u64vec4, 32);
617 
618 
620  // Float vector types
621 
624  GLM_ALIGNED_TYPEDEF(float32, aligned_float32, 4);
625 
628  GLM_ALIGNED_TYPEDEF(float32_t, aligned_float32_t, 4);
629 
632  GLM_ALIGNED_TYPEDEF(float32, aligned_f32, 4);
633 
634 # ifndef GLM_FORCE_SINGLE_ONLY
635 
638  GLM_ALIGNED_TYPEDEF(float64, aligned_float64, 8);
639 
642  GLM_ALIGNED_TYPEDEF(float64_t, aligned_float64_t, 8);
643 
646  GLM_ALIGNED_TYPEDEF(float64, aligned_f64, 8);
647 
648 # endif//GLM_FORCE_SINGLE_ONLY
649 
650 
654 
658 
662 
666 
667 
670  GLM_ALIGNED_TYPEDEF(fvec1, aligned_fvec1, 4);
671 
674  GLM_ALIGNED_TYPEDEF(fvec2, aligned_fvec2, 8);
675 
678  GLM_ALIGNED_TYPEDEF(fvec3, aligned_fvec3, 16);
679 
682  GLM_ALIGNED_TYPEDEF(fvec4, aligned_fvec4, 16);
683 
684 
687  GLM_ALIGNED_TYPEDEF(f32vec1, aligned_f32vec1, 4);
688 
691  GLM_ALIGNED_TYPEDEF(f32vec2, aligned_f32vec2, 8);
692 
695  GLM_ALIGNED_TYPEDEF(f32vec3, aligned_f32vec3, 16);
696 
699  GLM_ALIGNED_TYPEDEF(f32vec4, aligned_f32vec4, 16);
700 
701 
705 
709 
713 
717 
718 
719 # ifndef GLM_FORCE_SINGLE_ONLY
720 
723  GLM_ALIGNED_TYPEDEF(f64vec1, aligned_f64vec1, 8);
724 
727  GLM_ALIGNED_TYPEDEF(f64vec2, aligned_f64vec2, 16);
728 
731  GLM_ALIGNED_TYPEDEF(f64vec3, aligned_f64vec3, 32);
732 
735  GLM_ALIGNED_TYPEDEF(f64vec4, aligned_f64vec4, 32);
736 
737 # endif//GLM_FORCE_SINGLE_ONLY
738 
740  // Float matrix types
741 
744  //typedef detail::tmat1<f32> mat1;
745 
749 
753 
757 
758 
761  //typedef detail::tmat1x1<f32> mat1;
762 
766 
770 
774 
775 
778  //typedef detail::tmat1x1<f32> fmat1;
779 
782  GLM_ALIGNED_TYPEDEF(fmat2x2, aligned_fmat2, 16);
783 
786  GLM_ALIGNED_TYPEDEF(fmat3x3, aligned_fmat3, 16);
787 
790  GLM_ALIGNED_TYPEDEF(fmat4x4, aligned_fmat4, 16);
791 
792 
795  //typedef f32 fmat1x1;
796 
799  GLM_ALIGNED_TYPEDEF(fmat2x2, aligned_fmat2x2, 16);
800 
803  GLM_ALIGNED_TYPEDEF(fmat2x3, aligned_fmat2x3, 16);
804 
807  GLM_ALIGNED_TYPEDEF(fmat2x4, aligned_fmat2x4, 16);
808 
811  GLM_ALIGNED_TYPEDEF(fmat3x2, aligned_fmat3x2, 16);
812 
815  GLM_ALIGNED_TYPEDEF(fmat3x3, aligned_fmat3x3, 16);
816 
819  GLM_ALIGNED_TYPEDEF(fmat3x4, aligned_fmat3x4, 16);
820 
823  GLM_ALIGNED_TYPEDEF(fmat4x2, aligned_fmat4x2, 16);
824 
827  GLM_ALIGNED_TYPEDEF(fmat4x3, aligned_fmat4x3, 16);
828 
831  GLM_ALIGNED_TYPEDEF(fmat4x4, aligned_fmat4x4, 16);
832 
833 
836  //typedef detail::tmat1x1<f32, defaultp> f32mat1;
837 
840  GLM_ALIGNED_TYPEDEF(f32mat2x2, aligned_f32mat2, 16);
841 
844  GLM_ALIGNED_TYPEDEF(f32mat3x3, aligned_f32mat3, 16);
845 
848  GLM_ALIGNED_TYPEDEF(f32mat4x4, aligned_f32mat4, 16);
849 
850 
853  //typedef f32 f32mat1x1;
854 
857  GLM_ALIGNED_TYPEDEF(f32mat2x2, aligned_f32mat2x2, 16);
858 
861  GLM_ALIGNED_TYPEDEF(f32mat2x3, aligned_f32mat2x3, 16);
862 
865  GLM_ALIGNED_TYPEDEF(f32mat2x4, aligned_f32mat2x4, 16);
866 
869  GLM_ALIGNED_TYPEDEF(f32mat3x2, aligned_f32mat3x2, 16);
870 
873  GLM_ALIGNED_TYPEDEF(f32mat3x3, aligned_f32mat3x3, 16);
874 
877  GLM_ALIGNED_TYPEDEF(f32mat3x4, aligned_f32mat3x4, 16);
878 
881  GLM_ALIGNED_TYPEDEF(f32mat4x2, aligned_f32mat4x2, 16);
882 
885  GLM_ALIGNED_TYPEDEF(f32mat4x3, aligned_f32mat4x3, 16);
886 
889  GLM_ALIGNED_TYPEDEF(f32mat4x4, aligned_f32mat4x4, 16);
890 
891 
892 # ifndef GLM_FORCE_SINGLE_ONLY
893 
896  //typedef detail::tmat1x1<f64, defaultp> f64mat1;
897 
900  GLM_ALIGNED_TYPEDEF(f64mat2x2, aligned_f64mat2, 32);
901 
904  GLM_ALIGNED_TYPEDEF(f64mat3x3, aligned_f64mat3, 32);
905 
908  GLM_ALIGNED_TYPEDEF(f64mat4x4, aligned_f64mat4, 32);
909 
910 
913  //typedef f64 f64mat1x1;
914 
917  GLM_ALIGNED_TYPEDEF(f64mat2x2, aligned_f64mat2x2, 32);
918 
921  GLM_ALIGNED_TYPEDEF(f64mat2x3, aligned_f64mat2x3, 32);
922 
925  GLM_ALIGNED_TYPEDEF(f64mat2x4, aligned_f64mat2x4, 32);
926 
929  GLM_ALIGNED_TYPEDEF(f64mat3x2, aligned_f64mat3x2, 32);
930 
933  GLM_ALIGNED_TYPEDEF(f64mat3x3, aligned_f64mat3x3, 32);
934 
937  GLM_ALIGNED_TYPEDEF(f64mat3x4, aligned_f64mat3x4, 32);
938 
941  GLM_ALIGNED_TYPEDEF(f64mat4x2, aligned_f64mat4x2, 32);
942 
945  GLM_ALIGNED_TYPEDEF(f64mat4x3, aligned_f64mat4x3, 32);
946 
949  GLM_ALIGNED_TYPEDEF(f64mat4x4, aligned_f64mat4x4, 32);
950 
951 # endif//GLM_FORCE_SINGLE_ONLY
952 
953 
955  // Quaternion types
956 
959  GLM_ALIGNED_TYPEDEF(quat, aligned_quat, 16);
960 
963  GLM_ALIGNED_TYPEDEF(quat, aligned_fquat, 16);
964 
967  GLM_ALIGNED_TYPEDEF(dquat, aligned_dquat, 32);
968 
971  GLM_ALIGNED_TYPEDEF(f32quat, aligned_f32quat, 16);
972 
973 # ifndef GLM_FORCE_SINGLE_ONLY
974 
977  GLM_ALIGNED_TYPEDEF(f64quat, aligned_f64quat, 32);
978 
979 # endif//GLM_FORCE_SINGLE_ONLY
980 
982 }//namespace glm
983 
984 #include "type_aligned.inl"
vec< 1, u64, defaultp > u64vec1
Default qualifier 64 bit unsigned integer scalar type.
Definition: fwd.hpp:399
+
uint16 highp_u16
High qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:105
+
vec< 4, f32, defaultp > fvec4
Single-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:444
+
vec< 4, double, defaultp > dvec4
4 components vector of double-precision floating-point numbers.
+
qua< float, defaultp > quat
Quaternion of single-precision floating-point numbers.
+
mat< 3, 4, f32, defaultp > fmat3x4
Single-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:667
+
mat< 4, 4, f64, defaultp > f64mat4x4
Double-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:788
+
int32 lowp_int32
Low qualifier 32 bit signed integer type.
Definition: fwd.hpp:64
+
vec< 3, double, defaultp > dvec3
3 components vector of double-precision floating-point numbers.
+
mat< 4, 4, f32, defaultp > f32mat4x4
Single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:708
+
vec< 3, float, defaultp > vec3
3 components vector of single-precision floating-point numbers.
+
detail::uint64 uint64
64 bit unsigned integer type.
+
uint8 lowp_uint8_t
Low qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:98
+
mat< 3, 3, float, defaultp > mat3
3 columns of 3 components matrix of single-precision floating-point numbers.
+
vec< 2, f32, defaultp > f32vec2
Single-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:462
+
int8 int8_t
8 bit signed integer type.
Definition: fwd.hpp:43
+
mat< 4, 2, f32, defaultp > fmat4x2
Single-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:662
+
vec< 4, i32, defaultp > i32vec4
32 bit signed integer vector of 4 components type.
Definition: fwd.hpp:280
+
uint32 uint32_t
Default qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:129
+
vec< 1, u8, defaultp > u8vec1
Default qualifier 8 bit unsigned integer scalar type.
Definition: fwd.hpp:339
+
mat< 2, 3, f32, defaultp > fmat2x3
Single-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:663
+
uint64 mediump_uint64_t
Medium qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:141
+
aligned_highp_uvec1 aligned_uvec1
1 component vector aligned in memory of unsigned integer numbers.
+
vec< 4, unsigned int, defaultp > uvec4
4 components vector of unsigned integer numbers.
+
uint64 u64
Default qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:134
+
int32 i32
32 bit signed integer type.
Definition: fwd.hpp:62
+
int16 lowp_int16
Low qualifier 16 bit signed integer type.
Definition: fwd.hpp:50
+
vec< 4, f64, defaultp > f64vec4
Double-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:504
+
uint64 highp_uint64_t
High qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:142
+
vec< 1, u32, defaultp > u32vec1
Default qualifier 32 bit unsigned integer scalar type.
Definition: fwd.hpp:379
+
qua< f64, defaultp > f64quat
Double-qualifier floating-point quaternion.
Definition: fwd.hpp:815
+
vec< 3, f64, defaultp > f64vec3
Double-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:503
+
mat< 2, 3, f64, defaultp > f64mat2x3
Double-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:783
+
int64 highp_int64
High qualifier 64 bit signed integer type.
Definition: fwd.hpp:80
+
vec< 2, f64, defaultp > f64vec2
Double-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:502
+
mat< 3, 2, f64, defaultp > f64mat3x2
Double-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:781
+
vec< 1, u16, defaultp > u16vec1
Default qualifier 16 bit unsigned integer scalar type.
Definition: fwd.hpp:359
+
int16 highp_i16
High qualifier 16 bit signed integer type.
Definition: fwd.hpp:47
+
mat< 4, 4, float, defaultp > mat4
4 columns of 4 components matrix of single-precision floating-point numbers.
+
uint8 u8
Default qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:92
+
uint32 mediump_u32
Medium qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:118
+
aligned_highp_vec3 aligned_vec3
3 components vector aligned in memory of single-precision floating-point numbers. ...
+
aligned_highp_ivec2 aligned_ivec2
2 components vector aligned in memory of signed integer numbers.
+
mat< 3, 3, f64, defaultp > f64mat3x3
Double-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:784
+
int64 mediump_i64
Medium qualifier 64 bit signed integer type.
Definition: fwd.hpp:74
+
vec< 4, u8, defaultp > u8vec4
Default qualifier 8 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:342
+
uint8 lowp_uint8
Low qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:94
+
uint16 uint16_t
Default qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:115
+
vec< 2, float, defaultp > vec2
2 components vector of single-precision floating-point numbers.
+
uint32 highp_u32
High qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:119
+
aligned_highp_ivec4 aligned_ivec4
4 components vector aligned in memory of signed integer numbers.
+
vec< 2, int, defaultp > ivec2
2 components vector of signed integer numbers.
Definition: vector_int2.hpp:15
+
uint32 highp_uint32
High qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:124
+
aligned_highp_ivec3 aligned_ivec3
3 components vector aligned in memory of signed integer numbers.
+
vec< 3, f32, defaultp > f32vec3
Single-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:463
+
int64 lowp_i64
Low qualifier 64 bit signed integer type.
Definition: fwd.hpp:73
+
uint16 lowp_u16
Low qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:103
+
uint8 highp_uint8
High qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:96
+
vec< 1, i8, defaultp > i8vec1
8 bit signed integer scalar type.
Definition: fwd.hpp:237
+
mat< 2, 4, f32, defaultp > fmat2x4
Single-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:666
+
vec< 3, f32, defaultp > fvec3
Single-qualifier floating-point vector of 3 components.
Definition: fwd.hpp:443
+
vec< 4, i64, defaultp > i64vec4
64 bit signed integer vector of 4 components type.
Definition: fwd.hpp:300
+
vec< 3, i64, defaultp > i64vec3
64 bit signed integer vector of 3 components type.
Definition: fwd.hpp:299
+
vec< 1, f32, defaultp > fvec1
Single-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:441
+
mat< 2, 2, f32, defaultp > f32mat2x2
Single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:700
+
int8 mediump_int8
Medium qualifier 8 bit signed integer type.
Definition: fwd.hpp:37
+
mat< 2, 4, f64, defaultp > f64mat2x4
Double-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:786
+
mat< 4, 4, f32, defaultp > fmat4x4
Single-qualifier floating-point 4x4 matrix.
Definition: fwd.hpp:668
+
uint16 u16
Default qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:106
+
int64 int64_t
64 bit signed integer type.
Definition: fwd.hpp:85
+
int16 lowp_int16_t
Low qualifier 16 bit signed integer type.
Definition: fwd.hpp:54
+
mat< 3, 4, f32, defaultp > f32mat3x4
Single-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:707
+
uint8 mediump_uint8_t
Medium qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:99
+
int32 int32_t
32 bit signed integer type.
Definition: fwd.hpp:71
+
int16 lowp_i16
Low qualifier 16 bit signed integer type.
Definition: fwd.hpp:45
+
GLM_ALIGNED_TYPEDEF(f64quat, aligned_f64quat, 32)
Double-qualifier floating-point aligned quaternion.
+
vec< 1, i16, defaultp > i16vec1
16 bit signed integer scalar type.
Definition: fwd.hpp:257
+
aligned_highp_mat3 aligned_mat3
3 by 3 matrix tightly aligned in memory of single-precision floating-point numbers.
+
uint8 uint8_t
Default qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:101
+
mat< 3, 2, f32, defaultp > fmat3x2
Single-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:661
+
int16 highp_int16
High qualifier 16 bit signed integer type.
Definition: fwd.hpp:52
+
vec< 2, unsigned int, defaultp > uvec2
2 components vector of unsigned integer numbers.
+
mat< 4, 3, f32, defaultp > fmat4x3
Single-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:665
+
int16 int16_t
16 bit signed integer type.
Definition: fwd.hpp:57
+
int64 i64
64 bit signed integer type.
Definition: fwd.hpp:76
+
int64 mediump_int64_t
Medium qualifier 64 bit signed integer type.
Definition: fwd.hpp:83
+
aligned_highp_dvec4 aligned_dvec4
4 components vector aligned in memory of double-precision floating-point numbers. ...
+
vec< 2, i64, defaultp > i64vec2
64 bit signed integer vector of 2 components type.
Definition: fwd.hpp:298
+
int32 mediump_int32
Medium qualifier 32 bit signed integer type.
Definition: fwd.hpp:65
+
vec< 4, u64, defaultp > u64vec4
Default qualifier 64 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:402
+
vec< 3, u8, defaultp > u8vec3
Default qualifier 8 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:341
+
int64 lowp_int64_t
Low qualifier 64 bit signed integer type.
Definition: fwd.hpp:82
+
int8 mediump_int8_t
Medium qualifier 8 bit signed integer type.
Definition: fwd.hpp:41
+
uint16 highp_uint16
High qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:110
+
int8 mediump_i8
Medium qualifier 8 bit signed integer type.
Definition: fwd.hpp:32
+
aligned_highp_uvec3 aligned_uvec3
3 components vector aligned in memory of unsigned integer numbers.
+
aligned_highp_vec2 aligned_vec2
2 components vector aligned in memory of single-precision floating-point numbers. ...
+
int32 highp_int32_t
32 bit signed integer type.
Definition: fwd.hpp:70
+
mat< 4, 3, f32, defaultp > f32mat4x3
Single-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:705
+
uint16 lowp_uint16_t
Low qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:112
+
vec< 2, double, defaultp > dvec2
2 components vector of double-precision floating-point numbers.
+
vec< 3, u16, defaultp > u16vec3
Default qualifier 16 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:361
+
uint8 lowp_u8
Low qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:89
+
aligned_highp_vec1 aligned_vec1
1 component vector aligned in memory of single-precision floating-point numbers.
+
vec< 1, i64, defaultp > i64vec1
64 bit signed integer scalar type.
Definition: fwd.hpp:297
+
uint64 lowp_uint64
Low qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:136
+
uint16 mediump_uint16
Medium qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:109
+
vec< 3, i8, defaultp > i8vec3
8 bit signed integer vector of 3 components type.
Definition: fwd.hpp:239
+
mat< 2, 4, f32, defaultp > f32mat2x4
Single-qualifier floating-point 2x4 matrix.
Definition: fwd.hpp:706
+
aligned_highp_mat4 aligned_mat4
4 by 4 matrix tightly aligned in memory of single-precision floating-point numbers.
+
aligned_highp_uvec2 aligned_uvec2
2 components vector aligned in memory of unsigned integer numbers.
+
uint16 highp_uint16_t
High qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:114
+
aligned_highp_mat2 aligned_mat2
2 by 2 matrix tightly aligned in memory of single-precision floating-point numbers.
+
aligned_highp_dvec1 aligned_dvec1
1 component vector aligned in memory of double-precision floating-point numbers.
+
vec< 2, i8, defaultp > i8vec2
8 bit signed integer vector of 2 components type.
Definition: fwd.hpp:238
+
vec< 1, f32, defaultp > f32vec1
Single-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:461
+
mat< 3, 2, f32, defaultp > f32mat3x2
Single-qualifier floating-point 3x2 matrix.
Definition: fwd.hpp:701
+
aligned_highp_vec4 aligned_vec4
4 components vector aligned in memory of single-precision floating-point numbers. ...
+
mat< 3, 3, float, defaultp > mat3x3
3 columns of 3 components matrix of single-precision floating-point numbers.
+
vec< 3, i32, defaultp > i32vec3
32 bit signed integer vector of 3 components type.
Definition: fwd.hpp:279
+
uint8 mediump_uint8
Medium qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:95
+
aligned_highp_uvec4 aligned_uvec4
4 components vector aligned in memory of unsigned integer numbers.
+
vec< 3, int, defaultp > ivec3
3 components vector of signed integer numbers.
Definition: vector_int3.hpp:15
+
uint32 lowp_u32
Low qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:117
+
int8 highp_int8_t
High qualifier 8 bit signed integer type.
Definition: fwd.hpp:42
+
vec< 4, i8, defaultp > i8vec4
8 bit signed integer vector of 4 components type.
Definition: fwd.hpp:240
+
aligned_highp_ivec1 aligned_ivec1
1 component vector aligned in memory of signed integer numbers.
+
uint64 highp_uint64
High qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:138
+
aligned_highp_mat3x3 aligned_mat3x3
3 by 3 matrix tightly aligned in memory of single-precision floating-point numbers.
+
uint32 lowp_uint32
Low qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:122
+
vec< 2, i16, defaultp > i16vec2
16 bit signed integer vector of 2 components type.
Definition: fwd.hpp:258
+
uint32 mediump_uint32_t
Medium qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:127
+
uint16 mediump_u16
Medium qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:104
+
mat< 3, 3, f32, defaultp > f32mat3x3
Single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:704
+
vec< 1, float, defaultp > vec1
1 components vector of single-precision floating-point numbers.
+
uint32 u32
Default qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:120
+
vec< 2, u16, defaultp > u16vec2
Default qualifier 16 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:360
+
vec< 4, i16, defaultp > i16vec4
16 bit signed integer vector of 4 components type.
Definition: fwd.hpp:260
+
vec< 3, u32, defaultp > u32vec3
Default qualifier 32 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:381
+
aligned_highp_dvec3 aligned_dvec3
3 components vector aligned in memory of double-precision floating-point numbers. ...
+
int64 highp_i64
High qualifier 64 bit signed integer type.
Definition: fwd.hpp:75
+
int64 lowp_int64
Low qualifier 64 bit signed integer type.
Definition: fwd.hpp:78
+
int64 highp_int64_t
High qualifier 64 bit signed integer type.
Definition: fwd.hpp:84
+
mat< 3, 3, f32, defaultp > fmat3x3
Single-qualifier floating-point 3x3 matrix.
Definition: fwd.hpp:664
+
vec< 2, u32, defaultp > u32vec2
Default qualifier 32 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:380
+
int8 i8
8 bit signed integer type.
Definition: fwd.hpp:34
+
vec< 4, u32, defaultp > u32vec4
Default qualifier 32 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:382
+
uint16 lowp_uint16
Low qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:108
+
uint8 highp_uint8_t
High qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:100
+
mat< 2, 2, f32, defaultp > fmat2x2
Single-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:660
+
int8 highp_i8
High qualifier 8 bit signed integer type.
Definition: fwd.hpp:33
+
vec< 1, int, defaultp > ivec1
1 component vector of signed integer numbers.
Definition: vector_int1.hpp:29
+
mat< 2, 2, f64, defaultp > f64mat2x2
Double-qualifier floating-point 1x1 matrix.
Definition: fwd.hpp:780
+
uint32 lowp_uint32_t
Low qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:126
+
int8 lowp_i8
Low qualifier 8 bit signed integer type.
Definition: fwd.hpp:31
+
mat< 4, 2, f32, defaultp > f32mat4x2
Single-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:702
+
int32 lowp_i32
Low qualifier 32 bit signed integer type.
Definition: fwd.hpp:59
+
vec< 2, u8, defaultp > u8vec2
Default qualifier 8 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:340
+
mat< 2, 2, float, defaultp > mat2x2
2 columns of 2 components matrix of single-precision floating-point numbers.
+
vec< 1, double, defaultp > dvec1
1 components vector of double-precision floating-point numbers.
+
int16 highp_int16_t
High qualifier 16 bit signed integer type.
Definition: fwd.hpp:56
+
int8 lowp_int8_t
Low qualifier 8 bit signed integer type.
Definition: fwd.hpp:40
+
uint16 mediump_uint16_t
Medium qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:113
+
aligned_highp_dvec2 aligned_dvec2
2 components vector aligned in memory of double-precision floating-point numbers. ...
+
vec< 1, i32, defaultp > i32vec1
32 bit signed integer scalar type.
Definition: fwd.hpp:277
+
int16 mediump_i16
Medium qualifier 16 bit signed integer type.
Definition: fwd.hpp:46
+
vec< 1, f64, defaultp > f64vec1
Double-qualifier floating-point vector of 1 component.
Definition: fwd.hpp:501
+
mat< 2, 3, f32, defaultp > f32mat2x3
Single-qualifier floating-point 2x3 matrix.
Definition: fwd.hpp:703
+
uint64 lowp_uint64_t
Low qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:140
+
int32 highp_int32
High qualifier 32 bit signed integer type.
Definition: fwd.hpp:66
+
int8 highp_int8
High qualifier 8 bit signed integer type.
Definition: fwd.hpp:38
+
double float64_t
Default 64 bit double-qualifier floating-point scalar.
Definition: fwd.hpp:176
+
vec< 3, i16, defaultp > i16vec3
16 bit signed integer vector of 3 components type.
Definition: fwd.hpp:259
+
Definition: common.hpp:18
+
uint32 mediump_uint32
Medium qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:123
+
uint8 highp_u8
High qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:91
+
qua< double, defaultp > dquat
Quaternion of double-precision floating-point numbers.
+
int32 mediump_int32_t
Medium qualifier 32 bit signed integer type.
Definition: fwd.hpp:69
+
int64 mediump_int64
Medium qualifier 64 bit signed integer type.
Definition: fwd.hpp:79
+
mat< 4, 3, f64, defaultp > f64mat4x3
Double-qualifier floating-point 4x3 matrix.
Definition: fwd.hpp:785
+
detail::int64 int64
64 bit signed integer type.
+
vec< 4, u16, defaultp > u16vec4
Default qualifier 16 bit unsigned integer vector of 4 components type.
Definition: fwd.hpp:362
+
mat< 4, 4, float, defaultp > mat4x4
4 columns of 4 components matrix of single-precision floating-point numbers.
+
mat< 3, 4, f64, defaultp > f64mat3x4
Double-qualifier floating-point 3x4 matrix.
Definition: fwd.hpp:787
+
float float32_t
Default 32 bit single-qualifier floating-point scalar.
Definition: fwd.hpp:160
+
vec< 4, float, defaultp > vec4
4 components vector of single-precision floating-point numbers.
+
vec< 2, i32, defaultp > i32vec2
32 bit signed integer vector of 2 components type.
Definition: fwd.hpp:278
+
uint32 highp_uint32_t
High qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:128
+
aligned_highp_mat4x4 aligned_mat4x4
4 by 4 matrix tightly aligned in memory of single-precision floating-point numbers.
+
int16 mediump_int16
Medium qualifier 16 bit signed integer type.
Definition: fwd.hpp:51
+
int32 mediump_i32
Medium qualifier 32 bit signed integer type.
Definition: fwd.hpp:60
+
uint64 lowp_u64
Low qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:131
+
aligned_highp_mat2x2 aligned_mat2x2
2 by 2 matrix tightly aligned in memory of single-precision floating-point numbers.
+
uint64 highp_u64
High qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:133
+
vec< 4, int, defaultp > ivec4
4 components vector of signed integer numbers.
Definition: vector_int4.hpp:15
+
uint64 mediump_uint64
Medium qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:137
+
mat< 4, 2, f64, defaultp > f64mat4x2
Double-qualifier floating-point 4x2 matrix.
Definition: fwd.hpp:782
+
vec< 3, unsigned int, defaultp > uvec3
3 components vector of unsigned integer numbers.
+
uint64 uint64_t
Default qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:143
+
mat< 2, 2, float, defaultp > mat2
2 columns of 2 components matrix of single-precision floating-point numbers.
+
int16 mediump_int16_t
Medium qualifier 16 bit signed integer type.
Definition: fwd.hpp:55
+
int32 lowp_int32_t
Low qualifier 32 bit signed integer type.
Definition: fwd.hpp:68
+
qua< f32, defaultp > f32quat
Single-qualifier floating-point quaternion.
Definition: fwd.hpp:805
+
vec< 2, u64, defaultp > u64vec2
Default qualifier 64 bit unsigned integer vector of 2 components type.
Definition: fwd.hpp:400
+
int32 highp_i32
High qualifier 32 bit signed integer type.
Definition: fwd.hpp:61
+
uint8 mediump_u8
Medium qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:90
+
vec< 3, u64, defaultp > u64vec3
Default qualifier 64 bit unsigned integer vector of 3 components type.
Definition: fwd.hpp:401
+
int16 i16
16 bit signed integer type.
Definition: fwd.hpp:48
+
vec< 4, f32, defaultp > f32vec4
Single-qualifier floating-point vector of 4 components.
Definition: fwd.hpp:464
+
uint64 mediump_u64
Medium qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:132
+
vec< 2, f32, defaultp > fvec2
Single-qualifier floating-point vector of 2 components.
Definition: fwd.hpp:442
+
vec< 1, unsigned int, defaultp > uvec1
1 component vector of unsigned integer numbers.
+
int8 lowp_int8
Low qualifier 8 bit signed integer type.
Definition: fwd.hpp:36
+
+ + + + diff --git a/common/glm/doc/api/a01388.html b/common/glm/doc/api/a01388.html new file mode 100644 index 000000000..658485362 --- /dev/null +++ b/common/glm/doc/api/a01388.html @@ -0,0 +1,105 @@ + + + + + + + +0.9.9 API documenation: vector_relational.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
ext/vector_relational.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal (vec< L, T, Q > const &x, vec< L, T, Q > const &y, T epsilon)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal (vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y, T epsilon)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
 
+

Detailed Description

+
+ + + + diff --git a/common/glm/doc/api/a01388_source.html b/common/glm/doc/api/a01388_source.html new file mode 100644 index 000000000..da54ade99 --- /dev/null +++ b/common/glm/doc/api/a01388_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: vector_relational.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ext/vector_relational.hpp
+
+
+Go to the documentation of this file.
1 
15 #pragma once
16 
17 // Dependencies
18 #include "../detail/qualifier.hpp"
19 
20 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
21 # pragma message("GLM: GLM_EXT_vector_relational extension included")
22 #endif
23 
24 namespace glm
25 {
28 
35  template<length_t L, typename T, qualifier Q>
36  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T epsilon);
37 
44  template<length_t L, typename T, qualifier Q>
45  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& epsilon);
46 
53  template<length_t L, typename T, qualifier Q>
54  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T epsilon);
55 
62  template<length_t L, typename T, qualifier Q>
63  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& epsilon);
64 
66 }//namespace glm
67 
68 #include "vector_relational.inl"
GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon()
Return the epsilon constant for floating point types.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal(vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
Returns the component-wise comparison of |x - y| < epsilon.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual(vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
Returns the component-wise comparison of |x - y| >= epsilon.
+
Definition: common.hpp:20
+
+ + + + diff --git a/common/glm/doc/api/a01389.html b/common/glm/doc/api/a01389.html new file mode 100644 index 000000000..d8d9b71c0 --- /dev/null +++ b/common/glm/doc/api/a01389.html @@ -0,0 +1,101 @@ + + + + + + + +0.9.9 API documenation: vector_relational.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
ext/vector_relational.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal (vec< L, T, Q > const &x, vec< L, T, Q > const &y, T epsilon)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal (vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y, T epsilon)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
 
+
+ + + + diff --git a/common/glm/doc/api/a01389_source.html b/common/glm/doc/api/a01389_source.html new file mode 100644 index 000000000..690598bbc --- /dev/null +++ b/common/glm/doc/api/a01389_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: vector_relational.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ext/vector_relational.hpp
+
+
+Go to the documentation of this file.
1 
15 #pragma once
16 
17 // Dependencies
18 #include "../detail/qualifier.hpp"
19 
20 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
21 # pragma message("GLM: GLM_EXT_vector_relational extension included")
22 #endif
23 
24 namespace glm
25 {
28 
35  template<length_t L, typename T, qualifier Q>
36  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T epsilon);
37 
44  template<length_t L, typename T, qualifier Q>
45  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& epsilon);
46 
53  template<length_t L, typename T, qualifier Q>
54  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T epsilon);
55 
62  template<length_t L, typename T, qualifier Q>
63  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& epsilon);
64 
66 }//namespace glm
67 
68 #include "vector_relational.inl"
Definition: common.hpp:18
+
GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon()
Return the epsilon constant for floating point types.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal(vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
Returns the component-wise comparison of |x - y| < epsilon.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual(vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
Returns the component-wise comparison of |x - y| >= epsilon.
+
+ + + + diff --git a/common/glm/doc/api/a01390.html b/common/glm/doc/api/a01390.html new file mode 100644 index 000000000..c0867b053 --- /dev/null +++ b/common/glm/doc/api/a01390.html @@ -0,0 +1,113 @@ + + + + + + + +0.9.9 API documenation: vector_relational.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
ext/vector_relational.hpp File Reference
+
+
+ +

GLM_EXT_vector_relational +More...

+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal (vec< L, T, Q > const &x, vec< L, T, Q > const &y, T epsilon)
 Returns the component-wise comparison of |x - y| < epsilon. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal (vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
 Returns the component-wise comparison of |x - y| < epsilon. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y, T epsilon)
 Returns the component-wise comparison of |x - y| >= epsilon. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
 Returns the component-wise comparison of |x - y| >= epsilon. More...
 
+

Detailed Description

+

GLM_EXT_vector_relational

+
See also
Core features (dependence)
+ +

Definition in file ext/vector_relational.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01390_source.html b/common/glm/doc/api/a01390_source.html new file mode 100644 index 000000000..b47e2fec5 --- /dev/null +++ b/common/glm/doc/api/a01390_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: vector_relational.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ext/vector_relational.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependencies
16 #include "../detail/qualifier.hpp"
17 
18 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
19 # pragma message("GLM: GLM_EXT_vector_relational extension included")
20 #endif
21 
22 namespace glm
23 {
26 
35  template<length_t L, typename T, qualifier Q>
36  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T epsilon);
37 
46  template<length_t L, typename T, qualifier Q>
47  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& epsilon);
48 
57  template<length_t L, typename T, qualifier Q>
58  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T epsilon);
59 
68  template<length_t L, typename T, qualifier Q>
69  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& epsilon);
70 
72 }//namespace glm
73 
74 #include "vector_relational.inl"
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal(vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
Returns the component-wise comparison of |x - y| < epsilon.
+
GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon()
Return the epsilon constant for floating point types.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual(vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
Returns the component-wise comparison of |x - y| >= epsilon.
+
Definition: common.hpp:18
+
+ + + + diff --git a/common/glm/doc/api/a01391.html b/common/glm/doc/api/a01391.html new file mode 100644 index 000000000..6ced2d610 --- /dev/null +++ b/common/glm/doc/api/a01391.html @@ -0,0 +1,113 @@ + + + + + + + +0.9.9 API documenation: vector_relational.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
ext/vector_relational.hpp File Reference
+
+
+ +

GLM_EXT_vector_relational +More...

+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal (vec< L, T, Q > const &x, vec< L, T, Q > const &y, T epsilon)
 Returns the component-wise comparison of |x - y| < epsilon. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal (vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
 Returns the component-wise comparison of |x - y| < epsilon. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y, T epsilon)
 Returns the component-wise comparison of |x - y| >= epsilon. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
 Returns the component-wise comparison of |x - y| >= epsilon. More...
 
+

Detailed Description

+

GLM_EXT_vector_relational

+
See also
Core features (dependence)
+ +

Definition in file ext/vector_relational.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01391_source.html b/common/glm/doc/api/a01391_source.html new file mode 100644 index 000000000..03a260560 --- /dev/null +++ b/common/glm/doc/api/a01391_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: vector_relational.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ext/vector_relational.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependencies
16 #include "../detail/qualifier.hpp"
17 
18 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
19 # pragma message("GLM: GLM_EXT_vector_relational extension included")
20 #endif
21 
22 namespace glm
23 {
26 
35  template<length_t L, typename T, qualifier Q>
36  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T epsilon);
37 
46  template<length_t L, typename T, qualifier Q>
47  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& epsilon);
48 
57  template<length_t L, typename T, qualifier Q>
58  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T epsilon);
59 
68  template<length_t L, typename T, qualifier Q>
69  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& epsilon);
70 
72 }//namespace glm
73 
74 #include "vector_relational.inl"
GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon()
Return the epsilon constant for floating point types.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal(vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
Returns the component-wise comparison of |x - y| < epsilon.
+
Definition: common.hpp:18
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual(vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
Returns the component-wise comparison of |x - y| >= epsilon.
+
+ + + + diff --git a/common/glm/doc/api/a01392.html b/common/glm/doc/api/a01392.html new file mode 100644 index 000000000..5c69e4f0b --- /dev/null +++ b/common/glm/doc/api/a01392.html @@ -0,0 +1,113 @@ + + + + + + + +0.9.9 API documenation: vector_relational.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
ext/vector_relational.hpp File Reference
+
+
+ +

GLM_EXT_vector_relational +More...

+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal (vec< L, T, Q > const &x, vec< L, T, Q > const &y, T epsilon)
 Returns the component-wise comparison of |x - y| < epsilon. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal (vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
 Returns the component-wise comparison of |x - y| < epsilon. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y, T epsilon)
 Returns the component-wise comparison of |x - y| >= epsilon. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
 Returns the component-wise comparison of |x - y| >= epsilon. More...
 
+

Detailed Description

+

GLM_EXT_vector_relational

+
See also
Core features (dependence)
+ +

Definition in file ext/vector_relational.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01392_source.html b/common/glm/doc/api/a01392_source.html new file mode 100644 index 000000000..10b85927a --- /dev/null +++ b/common/glm/doc/api/a01392_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: vector_relational.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ext/vector_relational.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependencies
16 #include "../detail/qualifier.hpp"
17 
18 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
19 # pragma message("GLM: GLM_EXT_vector_relational extension included")
20 #endif
21 
22 namespace glm
23 {
26 
35  template<length_t L, typename T, qualifier Q>
36  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T epsilon);
37 
46  template<length_t L, typename T, qualifier Q>
47  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& epsilon);
48 
57  template<length_t L, typename T, qualifier Q>
58  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T epsilon);
59 
68  template<length_t L, typename T, qualifier Q>
69  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& epsilon);
70 
72 }//namespace glm
73 
74 #include "vector_relational.inl"
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal(vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
Returns the component-wise comparison of |x - y| < epsilon.
+
GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon()
Return the epsilon constant for floating point types.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual(vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
Returns the component-wise comparison of |x - y| >= epsilon.
+
Definition: common.hpp:18
+
+ + + + diff --git a/common/glm/doc/api/a01393.html b/common/glm/doc/api/a01393.html new file mode 100644 index 000000000..e69143059 --- /dev/null +++ b/common/glm/doc/api/a01393.html @@ -0,0 +1,113 @@ + + + + + + + +0.9.9 API documenation: vector_relational.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
ext/vector_relational.hpp File Reference
+
+
+ +

GLM_EXT_matrix_relational +More...

+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal (vec< L, T, Q > const &x, vec< L, T, Q > const &y, T epsilon)
 Returns the component-wise comparison of |x - y| < epsilon. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal (vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
 Returns the component-wise comparison of |x - y| < epsilon. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y, T epsilon)
 Returns the component-wise comparison of |x - y| >= epsilon. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
 Returns the component-wise comparison of |x - y| >= epsilon. More...
 
+

Detailed Description

+

GLM_EXT_matrix_relational

+
See also
Core features (dependence)
+ +

Definition in file ext/vector_relational.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01393_source.html b/common/glm/doc/api/a01393_source.html new file mode 100644 index 000000000..7d86b75ea --- /dev/null +++ b/common/glm/doc/api/a01393_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: vector_relational.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ext/vector_relational.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependencies
16 #include "../detail/qualifier.hpp"
17 
18 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
19 # pragma message("GLM: GLM_EXT_vector_relational extension included")
20 #endif
21 
22 namespace glm
23 {
26 
35  template<length_t L, typename T, qualifier Q>
36  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T epsilon);
37 
46  template<length_t L, typename T, qualifier Q>
47  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& epsilon);
48 
57  template<length_t L, typename T, qualifier Q>
58  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T epsilon);
59 
68  template<length_t L, typename T, qualifier Q>
69  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& epsilon);
70 
72 }//namespace glm
73 
74 #include "vector_relational.inl"
GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon()
Return the epsilon constant for floating point types.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal(vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
Returns the component-wise comparison of |x - y| < epsilon.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual(vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
Returns the component-wise comparison of |x - y| >= epsilon.
+
Definition: common.hpp:18
+
+ + + + diff --git a/common/glm/doc/api/a01394.html b/common/glm/doc/api/a01394.html new file mode 100644 index 000000000..9f3a3b754 --- /dev/null +++ b/common/glm/doc/api/a01394.html @@ -0,0 +1,113 @@ + + + + + + + +0.9.9 API documenation: vector_relational.hpp File Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
ext/vector_relational.hpp File Reference
+
+
+ +

GLM_EXT_vector_relational +More...

+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + +

+Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal (vec< L, T, Q > const &x, vec< L, T, Q > const &y, T epsilon)
 Returns the component-wise comparison of |x - y| < epsilon. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal (vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
 Returns the component-wise comparison of |x - y| < epsilon. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y, T epsilon)
 Returns the component-wise comparison of |x - y| >= epsilon. More...
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual (vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
 Returns the component-wise comparison of |x - y| >= epsilon. More...
 
+

Detailed Description

+

GLM_EXT_vector_relational

+
See also
Core features (dependence)
+ +

Definition in file ext/vector_relational.hpp.

+
+ + + + diff --git a/common/glm/doc/api/a01394_source.html b/common/glm/doc/api/a01394_source.html new file mode 100644 index 000000000..8731a6c61 --- /dev/null +++ b/common/glm/doc/api/a01394_source.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: vector_relational.hpp Source File + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ext/vector_relational.hpp
+
+
+Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependencies
16 #include "../detail/qualifier.hpp"
17 
18 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
19 # pragma message("GLM: GLM_EXT_vector_relational extension included")
20 #endif
21 
22 namespace glm
23 {
26 
35  template<length_t L, typename T, qualifier Q>
36  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T epsilon);
37 
46  template<length_t L, typename T, qualifier Q>
47  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& epsilon);
48 
57  template<length_t L, typename T, qualifier Q>
58  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T epsilon);
59 
68  template<length_t L, typename T, qualifier Q>
69  GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& epsilon);
70 
72 }//namespace glm
73 
74 #include "vector_relational.inl"
GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon()
Return the epsilon constant for floating point types.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > equal(vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
Returns the component-wise comparison of |x - y| < epsilon.
+
GLM_FUNC_DECL GLM_CONSTEXPR vec< L, bool, Q > notEqual(vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)
Returns the component-wise comparison of |x - y| >= epsilon.
+
Definition: common.hpp:18
+
+ + + + diff --git a/common/glm/doc/api/bc_s.png b/common/glm/doc/api/bc_s.png new file mode 100644 index 0000000000000000000000000000000000000000..a274117185b99f403e7ec5e6cebee7c654c143a5 GIT binary patch literal 600 zcmV-e0;m0nP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02p*dSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;(#7eog=Y0m(^3K~y+TZIaDPTTu|j2Lz>{XoY~)O$Dh| zyATzzHBg9MRHTI#H!3blsS7J85z%UG6UjnE$Rdj_0tOx!N`ycQZxP)KVuDf^6-2=g zs8A4d{sPa0+{eo^i{CKk++pT^3F3h~GAoJ?Km6i_q2EG!Du+yXj=Aa*7+&-u{^}nx zp>t9}t)7D*)}!pg4*o@E>1|Ovm}DH*`y&=?yB8IPZl#jq8ut8u*k9Ufpw*5(=XLDn!P;W!VULw%T6sc9+zVciNQSY?B0NY=1 z{&7(|2$l_0;M)2)@f4A`kZw?MN_JU4kGi{9etMSZ{mI mTy+UL=Lpd!dstz950N_+H^+xJK<-@t0000_E)H!3HEvS)PI@#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=DjSL74G){)!Z!phSslL`iUdT1k0gQ7S`0VrE{6US4X6f{C7i zo@I`4ogYw*rKgKyh(vg@1KWHx>A&qphK!k$92(g)gk6Pn_=FlX8$6qSB$)Ly_OfZZ mgfSd0Sbc!OlQE>Jk&%J1|%O$WD@{VjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCf`#@Q5sCVBk9p!i>lBSEK+1B}!Z)N`mv#O3D+9QW**oGxJLH@={9_O!N%& zEOU(O{D5kVJzX3_G=h^I*ypQB|7|xaWS*eZ#Fg0fLCYnqC0KEn(i$#KEe6IWE{BE% gOacc&4jf=$xZ3Z0eESR?CZKi(Pgg&ebxsLQ0ArjqIRF3v literal 0 HcmV?d00001 diff --git a/common/glm/doc/api/dir_02cc19cee4c4780485bfe81520450212.html b/common/glm/doc/api/dir_02cc19cee4c4780485bfe81520450212.html new file mode 100644 index 000000000..1e12b2830 --- /dev/null +++ b/common/glm/doc/api/dir_02cc19cee4c4780485bfe81520450212.html @@ -0,0 +1,81 @@ + + + + + + + +0.9.9 API documenation: christophericcio Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
christophericcio Directory Reference
+
+
+
+ + + + diff --git a/common/glm/doc/api/dir_1551bf7b389c96495cd64da3774a1843.html b/common/glm/doc/api/dir_1551bf7b389c96495cd64da3774a1843.html new file mode 100644 index 000000000..0d8dadab0 --- /dev/null +++ b/common/glm/doc/api/dir_1551bf7b389c96495cd64da3774a1843.html @@ -0,0 +1,81 @@ + + + + + + + +0.9.9 API documenation: doc Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
doc Directory Reference
+
+
+
+ + + + diff --git a/common/glm/doc/api/dir_2c9f37f6a8d2004101d7524672238505.html b/common/glm/doc/api/dir_2c9f37f6a8d2004101d7524672238505.html new file mode 100644 index 000000000..0b6b77af8 --- /dev/null +++ b/common/glm/doc/api/dir_2c9f37f6a8d2004101d7524672238505.html @@ -0,0 +1,111 @@ + + + + + + + +0.9.9 API documenation: detail Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
detail Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Files

file  type_mat2x2.hpp [code]
 
file  type_mat2x3.hpp [code]
 
file  type_mat2x4.hpp [code]
 
file  type_mat3x2.hpp [code]
 
file  type_mat3x3.hpp [code]
 
file  type_mat3x4.hpp [code]
 
file  type_mat4x2.hpp [code]
 
file  type_mat4x3.hpp [code]
 
file  type_mat4x4.hpp [code]
 
file  type_vec1.hpp [code]
 
file  type_vec2.hpp [code]
 
file  type_vec3.hpp [code]
 
file  type_vec4.hpp [code]
 
+
+ + + + diff --git a/common/glm/doc/api/dir_3da5c411f748022d233cc92a3c5e2a02.html b/common/glm/doc/api/dir_3da5c411f748022d233cc92a3c5e2a02.html new file mode 100644 index 000000000..df4be4ac4 --- /dev/null +++ b/common/glm/doc/api/dir_3da5c411f748022d233cc92a3c5e2a02.html @@ -0,0 +1,211 @@ + + + + + + + +0.9.9 API documenation: gtx Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtx Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Files

file  associated_min_max.hpp [code]
 
file  bit.hpp [code]
 
file  closest_point.hpp [code]
 
file  color_encoding.hpp [code]
 
file  gtx/color_space.hpp [code]
 
file  color_space_YCoCg.hpp [code]
 
file  gtx/common.hpp [code]
 
file  compatibility.hpp [code]
 
file  component_wise.hpp [code]
 
file  dual_quaternion.hpp [code]
 
file  easing.hpp [code]
 
file  euler_angles.hpp [code]
 
file  extend.hpp [code]
 
file  extended_min_max.hpp [code]
 
file  exterior_product.hpp [code]
 
file  fast_exponential.hpp [code]
 
file  fast_square_root.hpp [code]
 
file  fast_trigonometry.hpp [code]
 
file  functions.hpp [code]
 
file  gradient_paint.hpp [code]
 
file  handed_coordinate_space.hpp [code]
 
file  hash.hpp [code]
 
file  gtx/integer.hpp [code]
 
file  intersect.hpp [code]
 
file  io.hpp [code]
 
file  log_base.hpp [code]
 
file  matrix_cross_product.hpp [code]
 
file  matrix_decompose.hpp [code]
 
file  matrix_factorisation.hpp [code]
 
file  matrix_interpolation.hpp [code]
 
file  matrix_major_storage.hpp [code]
 
file  matrix_operation.hpp [code]
 
file  matrix_query.hpp [code]
 
file  matrix_transform_2d.hpp [code]
 
file  mixed_product.hpp [code]
 
file  norm.hpp [code]
 
file  normal.hpp [code]
 
file  normalize_dot.hpp [code]
 
file  number_precision.hpp [code]
 
file  optimum_pow.hpp [code]
 
file  orthonormalize.hpp [code]
 
file  perpendicular.hpp [code]
 
file  polar_coordinates.hpp [code]
 
file  projection.hpp [code]
 
file  gtx/quaternion.hpp [code]
 
file  range.hpp [code]
 
file  raw_data.hpp [code]
 
file  rotate_normalized_axis.hpp [code]
 
file  rotate_vector.hpp [code]
 
file  scalar_multiplication.hpp [code]
 
file  gtx/scalar_relational.hpp [code]
 
file  spline.hpp [code]
 
file  std_based_type.hpp [code]
 
file  string_cast.hpp [code]
 
file  texture.hpp [code]
 
file  transform.hpp [code]
 
file  transform2.hpp [code]
 
file  gtx/type_aligned.hpp [code]
 
file  type_trait.hpp [code]
 
file  vec_swizzle.hpp [code]
 
file  vector_angle.hpp [code]
 
file  vector_query.hpp [code]
 
file  wrap.hpp [code]
 
+
+ + + + diff --git a/common/glm/doc/api/dir_4ca6aa55b50e6be994025af27820140e.html b/common/glm/doc/api/dir_4ca6aa55b50e6be994025af27820140e.html new file mode 100644 index 000000000..7e18f8a57 --- /dev/null +++ b/common/glm/doc/api/dir_4ca6aa55b50e6be994025af27820140e.html @@ -0,0 +1,132 @@ + + + + + + + +0.9.9 API documenation: glm Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
glm Directory Reference
+
+
+ + +

+Directories

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Files

file  common.hpp [code]
 
file  exponential.hpp [code]
 
file  ext.hpp [code]
 
file  geometric.hpp [code]
 
file  glm.hpp [code]
 
file  integer.hpp [code]
 
file  mat2x2.hpp [code]
 
file  mat2x3.hpp [code]
 
file  mat2x4.hpp [code]
 
file  mat3x2.hpp [code]
 
file  mat3x3.hpp [code]
 
file  mat3x4.hpp [code]
 
file  mat4x2.hpp [code]
 
file  mat4x3.hpp [code]
 
file  mat4x4.hpp [code]
 
file  matrix.hpp [code]
 
file  packing.hpp [code]
 
file  trigonometric.hpp [code]
 
file  vec2.hpp [code]
 
file  vec3.hpp [code]
 
file  vec4.hpp [code]
 
file  vector_relational.hpp [code]
 
+
+ + + + diff --git a/common/glm/doc/api/dir_54de7df3bc9880881b14ec07f256fd2e.html b/common/glm/doc/api/dir_54de7df3bc9880881b14ec07f256fd2e.html new file mode 100644 index 000000000..3904862a3 --- /dev/null +++ b/common/glm/doc/api/dir_54de7df3bc9880881b14ec07f256fd2e.html @@ -0,0 +1,81 @@ + + + + + + + +0.9.9 API documenation: Documents Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Documents Directory Reference
+
+
+
+ + + + diff --git a/common/glm/doc/api/dir_627f4a52155b61a75c7c4851d7df9027.html b/common/glm/doc/api/dir_627f4a52155b61a75c7c4851d7df9027.html new file mode 100644 index 000000000..64ab80175 --- /dev/null +++ b/common/glm/doc/api/dir_627f4a52155b61a75c7c4851d7df9027.html @@ -0,0 +1,81 @@ + + + + + + + +0.9.9 API documenation: Github Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Github Directory Reference
+
+
+
+ + + + diff --git a/common/glm/doc/api/dir_6399a054f5929b58eaa476233e406ce8.html b/common/glm/doc/api/dir_6399a054f5929b58eaa476233e406ce8.html new file mode 100644 index 000000000..e4b4f529b --- /dev/null +++ b/common/glm/doc/api/dir_6399a054f5929b58eaa476233e406ce8.html @@ -0,0 +1,81 @@ + + + + + + + +0.9.9 API documenation: Repository Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Repository Directory Reference
+
+
+
+ + + + diff --git a/common/glm/doc/api/dir_b115b02f1dab989141fcd87ab0462f01.html b/common/glm/doc/api/dir_b115b02f1dab989141fcd87ab0462f01.html new file mode 100644 index 000000000..d69b02c97 --- /dev/null +++ b/common/glm/doc/api/dir_b115b02f1dab989141fcd87ab0462f01.html @@ -0,0 +1,279 @@ + + + + + + + +0.9.9 API documenation: ext Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ext Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Files

file  matrix_clip_space.hpp [code]
 
file  matrix_double2x2.hpp [code]
 
file  matrix_double2x2_precision.hpp [code]
 
file  matrix_double2x3.hpp [code]
 
file  matrix_double2x3_precision.hpp [code]
 
file  matrix_double2x4.hpp [code]
 
file  matrix_double2x4_precision.hpp [code]
 
file  matrix_double3x2.hpp [code]
 
file  matrix_double3x2_precision.hpp [code]
 
file  matrix_double3x3.hpp [code]
 
file  matrix_double3x3_precision.hpp [code]
 
file  matrix_double3x4.hpp [code]
 
file  matrix_double3x4_precision.hpp [code]
 
file  matrix_double4x2.hpp [code]
 
file  matrix_double4x2_precision.hpp [code]
 
file  matrix_double4x3.hpp [code]
 
file  matrix_double4x3_precision.hpp [code]
 
file  matrix_double4x4.hpp [code]
 
file  matrix_double4x4_precision.hpp [code]
 
file  matrix_float2x2.hpp [code]
 
file  matrix_float2x2_precision.hpp [code]
 
file  matrix_float2x3.hpp [code]
 
file  matrix_float2x3_precision.hpp [code]
 
file  matrix_float2x4.hpp [code]
 
file  matrix_float2x4_precision.hpp [code]
 
file  matrix_float3x2.hpp [code]
 
file  matrix_float3x2_precision.hpp [code]
 
file  matrix_float3x3.hpp [code]
 
file  matrix_float3x3_precision.hpp [code]
 
file  matrix_float3x4.hpp [code]
 
file  matrix_float3x4_precision.hpp [code]
 
file  matrix_float4x2.hpp [code]
 
file  matrix_float4x3.hpp [code]
 
file  matrix_float4x3_precision.hpp [code]
 
file  matrix_float4x4.hpp [code]
 
file  matrix_float4x4_precision.hpp [code]
 
file  matrix_projection.hpp [code]
 
file  matrix_relational.hpp [code]
 
file  ext/matrix_transform.hpp [code]
 
file  quaternion_common.hpp [code]
 
file  quaternion_double.hpp [code]
 
file  quaternion_double_precision.hpp [code]
 
file  quaternion_exponential.hpp [code]
 
file  quaternion_float.hpp [code]
 
file  quaternion_float_precision.hpp [code]
 
file  quaternion_geometric.hpp [code]
 
file  quaternion_relational.hpp [code]
 
file  quaternion_transform.hpp [code]
 
file  quaternion_trigonometric.hpp [code]
 
file  scalar_common.hpp [code]
 
file  scalar_constants.hpp [code]
 
file  scalar_float_sized.hpp [code]
 
file  scalar_int_sized.hpp [code]
 
file  ext/scalar_relational.hpp [code]
 
file  scalar_uint_sized.hpp [code]
 
file  vector_bool1.hpp [code]
 
file  vector_bool1_precision.hpp [code]
 
file  vector_bool2.hpp [code]
 
file  vector_bool2_precision.hpp [code]
 
file  vector_bool3.hpp [code]
 
file  vector_bool3_precision.hpp [code]
 
file  vector_bool4.hpp [code]
 
file  vector_bool4_precision.hpp [code]
 
file  vector_common.hpp [code]
 
file  vector_double1.hpp [code]
 
file  vector_double1_precision.hpp [code]
 
file  vector_double2.hpp [code]
 
file  vector_double2_precision.hpp [code]
 
file  vector_double3.hpp [code]
 
file  vector_double3_precision.hpp [code]
 
file  vector_double4.hpp [code]
 
file  vector_double4_precision.hpp [code]
 
file  vector_float1.hpp [code]
 
file  vector_float1_precision.hpp [code]
 
file  vector_float2.hpp [code]
 
file  vector_float2_precision.hpp [code]
 
file  vector_float3.hpp [code]
 
file  vector_float3_precision.hpp [code]
 
file  vector_float4.hpp [code]
 
file  vector_float4_precision.hpp [code]
 
file  vector_int1.hpp [code]
 
file  vector_int1_precision.hpp [code]
 
file  vector_int2.hpp [code]
 
file  vector_int2_precision.hpp [code]
 
file  vector_int3.hpp [code]
 
file  vector_int3_precision.hpp [code]
 
file  vector_int4.hpp [code]
 
file  vector_int4_precision.hpp [code]
 
file  ext/vector_relational.hpp [code]
 
file  vector_uint1.hpp [code]
 
file  vector_uint1_precision.hpp [code]
 
file  vector_uint2.hpp [code]
 
file  vector_uint2_precision.hpp [code]
 
file  vector_uint3.hpp [code]
 
file  vector_uint3_precision.hpp [code]
 
file  vector_uint4.hpp [code]
 
file  vector_uint4_precision.hpp [code]
 
+
+ + + + diff --git a/common/glm/doc/api/dir_d522931ffa1371640980b621734a4381.html b/common/glm/doc/api/dir_d522931ffa1371640980b621734a4381.html new file mode 100644 index 000000000..9cd363817 --- /dev/null +++ b/common/glm/doc/api/dir_d522931ffa1371640980b621734a4381.html @@ -0,0 +1,81 @@ + + + + + + + +0.9.9 API documenation: Users Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
Users Directory Reference
+
+
+
+ + + + diff --git a/common/glm/doc/api/dir_e6ae9283c4fa4619048a0a88dfd00585.html b/common/glm/doc/api/dir_e6ae9283c4fa4619048a0a88dfd00585.html new file mode 100644 index 000000000..4640124bd --- /dev/null +++ b/common/glm/doc/api/dir_e6ae9283c4fa4619048a0a88dfd00585.html @@ -0,0 +1,125 @@ + + + + + + + +0.9.9 API documenation: gtc Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gtc Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Files

file  bitfield.hpp [code]
 
file  gtc/color_space.hpp [code]
 
file  constants.hpp [code]
 
file  epsilon.hpp [code]
 
file  gtc/integer.hpp [code]
 
file  matrix_access.hpp [code]
 
file  matrix_integer.hpp [code]
 
file  matrix_inverse.hpp [code]
 
file  gtc/matrix_transform.hpp [code]
 
file  noise.hpp [code]
 
file  gtc/packing.hpp [code]
 
file  gtc/quaternion.hpp [code]
 
file  random.hpp [code]
 
file  reciprocal.hpp [code]
 
file  round.hpp [code]
 
file  gtc/type_aligned.hpp [code]
 
file  type_precision.hpp [code]
 
file  type_ptr.hpp [code]
 
file  ulp.hpp [code]
 
file  vec1.hpp [code]
 
+
+ + + + diff --git a/common/glm/doc/api/dir_ffdfd01cf51cdb2fe8bd5e55c6e0c4e8.html b/common/glm/doc/api/dir_ffdfd01cf51cdb2fe8bd5e55c6e0c4e8.html new file mode 100644 index 000000000..f87d38856 --- /dev/null +++ b/common/glm/doc/api/dir_ffdfd01cf51cdb2fe8bd5e55c6e0c4e8.html @@ -0,0 +1,85 @@ + + + + + + + +0.9.9 API documenation: glm Directory Reference + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
glm Directory Reference
+
+
+ + +

+Directories

+
+ + + + diff --git a/common/glm/doc/api/doc.png b/common/glm/doc/api/doc.png new file mode 100644 index 0000000000000000000000000000000000000000..f3953d1fce2c582d87c6434d2fea7607ccc943ac GIT binary patch literal 624 zcmV-$0+0QPP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02p*dSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;(#7eog=Y0pUqRK~zXfwUo^(L}3)h=TEY*^#`!C6dTEc zEW`q_kbJCAD5X#eWidW#6d5)7ngxY?m5)(FXfo>j1IP2c=bGrgjjpc6(|hl8?>)cw zJm;NBh{(UnYsM+B8K=CaTx_bGuBsd_nzC~$=@FGw7uI2w%q09JmE4JXzyBt$DVcGV z+db&Obdxq9L8%_Bv+%Qk4PxCd3-OwgnF@*@L5G0=JYBQmscw~G5gs60efG>(2lAQ* zz{fvC7$N9nzS;mK$bd@z!V3u*P6Xu7pz}buX5K7zv#YYvZji}Jm8E)g)B*5%RKTT) zA2P1|HHvQ=jJb2j9C&&NkOmBXG$P>T7P`akI&FvCeX>nurO9&VfC=O&BZM(|YK06Z z2e^kG48miZzp{>a&%E99M?iKAveg?EkTY?o%$o%kYAufO3f%W27QDyVuoHIasTDGu zz5sdL5-ap-wfC#A<+RS{_$a5l$!ys35f=n2#N=P2PFaeL+mn$ zlD`p8t&riA8BPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02p*dSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;(#7eog=Y2;@mbK~!i%?U`MOlvNnV-<#|vWp0Y>Vry>t zpfHziA_HNHpa_<>2%?~^)gX&l8j8%doZ2nR&24pZ^CPv@*6~!f*6k$YdOqwo?QHyoj=HDY$j2KOrJs6|LPTKr;#EKE4sZO8vV2m2t zZO(;AQCwohh|yHP|K`CMHMHBD3z4F@#EMY>Wl%Q^02JjH55@on`NadVUQh)#pY7g= zkK=?79)*Z6^b{j8FOSE8UUGHg;XG@=&XK;b?_!u|fz}PUH+G$b`<5BY_`^AMnmF5b zzxaRWTm`D^ub>!1*EH4CYnstz&0qJhKr)qiPIjXjX&vyB)vdW^Rq z;|%*S25pJc=Sb+0xdbtjha%J_NL zBVL_TS6{y3d&at{SB+j#{R?~@bCZQmuJYqUS2M4SHuK6n_H_6W=caW;^DW`poqh@0 zdYwmh_`VSIZ%&%!IA&f+3gLRV_RY8YF$=uN>2V9BD|~Dch9BkyatL#~W_Ba@WFzYH zfQMe@5E(Pf8`MRN_PJSWs{ax{es~Mx4YWBQ6n>qr!;d&GX(MX$ExtAvLmkXRfu!Fa zeF6t_!q}Pd$izzK*3f2diF40*^04c13RG6>7dO>U(%h8^S4Nw2ZDi(z9L7Oiv2X5~tLr&+f|B&_YJ`4{8Rh{q=YlQJv^u&M!ts5CYC-yhLSSuQ@)je!8=6dXAqRp{!9bW3`p(%r$0p(TFPLPlNHv3eUJ#sYyKl8ZQ zf*5}MF6H~rDb4^}Kwk%p0X=b78-JMb8rlhwHe#L!Ig+dO4jF&yb>CybT-5vG@4>O{ zGk@Ieclhys$(1Lz%sh;SHv2?@F86gDGY$sS@QuD!FN^NMSl~gfoB(Q5FkhqbGKT*f znf1fZJc|1I$ZM+wPd7{k)QPVH#sC&o@HHGu{A42`^YrwnvFsRv_EyjquLZFgb?jr$ zD}_G%ZYBmVA93sQ)aGdBo>oG8&Ur?2=R>-WxqEC1lsh+yB{hmCUG9M4YF(&z>?>qW|-QW)EvmjQL$6VJxe64>BU3_`{W8H|CjGjBs zXzqMS_c3>m(*nikMzN&cW%9n1i50eE>crOpV*rb~%-3)%@e}*7k^9WT&+4hD4cRdS zyjwsYL0h~Q#JV#%ypOua(8Z_yb*{_P^^LgK=(+QZ=IVK!4elYISabJywm@P3@H3BM z@zf3^^F74@ak2=|lc$%|mO#@t&pO%(LA$1Q-Q#lbWl*<9Q+5a-MHavZyJ;^nmObNuqTF0|$AMD9M# z76=bLu5R{-BAHfGgAni@WYO;qd~#~2ZS3690OF*;iO6-|)%S|V&maSAdm3O4a{*6) zy4<{7Pk4;}O->h%u@M^SfBjXy*PY7+ zXzRI#>$I>>%ujIRCLfg4_F$f7J!yf0T=k5FLAD>-_20mJ=ky!j;Av|{oXWVJr?#WW9F?hT!S7D1(ICO zxvGY)_dRoA@_vEnuFLplfkqF#pdfy{D0&|KUNV9<`|MM-?6{0U>!gREUFRG<55_{gYCSH9S7dCA zC3yso)3Qd!+6e>5dYkWc;nxY%C;a*zB==dzgK-g03ly#)QXo<}{x&*# z$)KObd0F8n7PejVpS%x`3TVsZC7&;mwhy!!qehS8m#^O->~oRhiH_^&MH%n#sE=73 zJt2tmrIq(bp4oEWFvkrw{)pd?UVpdEwIIeX5B!QCCyZ>qfib{)68kJVIpJD3ZkH(# zpY(X_>heXKVhAhF$rJv~Bj%X}_ZSbvn9ohHeXv~&eg6jRU%iZt;eF2XSsxcSZ9OiW zi<~@s-_bW=L5dvq1I#bJz}!5b%eOX5%rhq_!d%EEfB1Y-1FegUr-yr!Q);Zcg-70$ z{spbAt3+Q3_B#I7rru;&txNv&{CTAPJPsz@e$Ep$uR!XJq@~s`zBt&Cw8oxE)~gSa zGivHJZ0LrR8rA`@CKl)wwaKh&Tne-mFQ+I_kP|X|Q|r)R(i(p@S&cqepeZ~$XXo)> zfm%pSF4_XUnegmxs13SO17Yn2fAk~ z!^V%`m-OvNxQyTuISYO*lK=B=>H9g*1rEjfI3HkauRta6#Q%i54KZ!L+zjptV&|KZ l6o~({xp0XF+gvE9 + + + + + + +0.9.9 API documenation: File List + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
File List
+
+
+
Here is a list of all documented files with brief descriptions:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 _features.hpp
 _fixes.hpp
 _noise.hpp
 _swizzle.hpp
 _swizzle_func.hpp
 _vectorize.hpp
 associated_min_max.hppGLM_GTX_associated_min_max
 bit.hppGLM_GTX_bit
 bitfield.hppGLM_GTC_bitfield
 closest_point.hppGLM_GTX_closest_point
 color_encoding.hppGLM_GTX_color_encoding
 gtc/color_space.hppGLM_GTC_color_space
 gtx/color_space.hppGLM_GTX_color_space
 color_space_YCoCg.hppGLM_GTX_color_space_YCoCg
 common.hppCore features
 gtx/common.hppGLM_GTX_common
 compatibility.hppGLM_GTX_compatibility
 component_wise.hppGLM_GTX_component_wise
 compute_common.hpp
 compute_vector_relational.hpp
 constants.hppGLM_GTC_constants
 dual_quaternion.hppGLM_GTX_dual_quaternion
 easing.hppGLM_GTX_easing
 epsilon.hppGLM_GTC_epsilon
 euler_angles.hppGLM_GTX_euler_angles
 exponential.hppCore features
 ext.hppCore features (Dependence)
 extend.hppGLM_GTX_extend
 extended_min_max.hppGLM_GTX_extented_min_max
 exterior_product.hppGLM_GTX_exterior_product
 fast_exponential.hppGLM_GTX_fast_exponential
 fast_square_root.hppGLM_GTX_fast_square_root
 fast_trigonometry.hppGLM_GTX_fast_trigonometry
 functions.hppGLM_GTX_functions
 fwd.hpp
 geometric.hppCore features
 glm.hppCore features
 gradient_paint.hppGLM_GTX_gradient_paint
 handed_coordinate_space.hppGLM_GTX_handed_coordinate_space
 hash.hppGLM_GTX_hash
 gtc/integer.hppGLM_GTC_integer
 gtx/integer.hppGLM_GTX_integer
 integer.hppCore features
 intersect.hppGLM_GTX_intersect
 io.hppGLM_GTX_io
 log_base.hppGLM_GTX_log_base
 man.doxy
 mat2x2.hppCore features
 mat2x3.hppCore features
 mat2x4.hppCore features
 mat3x2.hppCore features
 mat3x3.hppCore features
 mat3x4.hppCore features
 mat4x2.hppCore features
 mat4x3.hppCore features
 mat4x4.hppCore features
 matrix.hppCore features
 matrix_access.hppGLM_GTC_matrix_access
 matrix_clip_space.hppGLM_EXT_matrix_clip_space
 matrix_cross_product.hppGLM_GTX_matrix_cross_product
 matrix_decompose.hppGLM_GTX_matrix_decompose
 matrix_double2x2.hppCore features
 matrix_double2x2_precision.hppCore features
 matrix_double2x3.hppCore features
 matrix_double2x3_precision.hppCore features
 matrix_double2x4.hppCore features
 matrix_double2x4_precision.hppCore features
 matrix_double3x2.hppCore features
 matrix_double3x2_precision.hppCore features
 matrix_double3x3.hppCore features
 matrix_double3x3_precision.hppCore features
 matrix_double3x4.hppCore features
 matrix_double3x4_precision.hppCore features
 matrix_double4x2.hppCore features
 matrix_double4x2_precision.hppCore features
 matrix_double4x3.hppCore features
 matrix_double4x3_precision.hppCore features
 matrix_double4x4.hppCore features
 matrix_double4x4_precision.hppCore features
 matrix_factorisation.hppGLM_GTX_matrix_factorisation
 matrix_float2x2.hppCore features
 matrix_float2x2_precision.hppCore features
 matrix_float2x3.hppCore features
 matrix_float2x3_precision.hppCore features
 matrix_float2x4.hppCore features
 matrix_float2x4_precision.hppCore features
 matrix_float3x2.hppCore features
 matrix_float3x2_precision.hppCore features
 matrix_float3x3.hppCore features
 matrix_float3x3_precision.hppCore features
 matrix_float3x4.hppCore features
 matrix_float3x4_precision.hppCore features
 matrix_float4x2.hppCore features
 matrix_float4x2_precision.hpp
 matrix_float4x3.hppCore features
 matrix_float4x3_precision.hppCore features
 matrix_float4x4.hppCore features
 matrix_float4x4_precision.hppCore features
 matrix_integer.hppGLM_GTC_matrix_integer
 matrix_interpolation.hppGLM_GTX_matrix_interpolation
 matrix_inverse.hppGLM_GTC_matrix_inverse
 matrix_major_storage.hppGLM_GTX_matrix_major_storage
 matrix_operation.hppGLM_GTX_matrix_operation
 matrix_projection.hppGLM_EXT_matrix_projection
 matrix_query.hppGLM_GTX_matrix_query
 matrix_relational.hppGLM_EXT_matrix_relational
 ext/matrix_transform.hppGLM_EXT_matrix_transform
 gtc/matrix_transform.hppGLM_GTC_matrix_transform
 matrix_transform_2d.hppGLM_GTX_matrix_transform_2d
 mixed_product.hppGLM_GTX_mixed_producte
 noise.hppGLM_GTC_noise
 norm.hppGLM_GTX_norm
 normal.hppGLM_GTX_normal
 normalize_dot.hppGLM_GTX_normalize_dot
 number_precision.hppGLM_GTX_number_precision
 optimum_pow.hppGLM_GTX_optimum_pow
 orthonormalize.hppGLM_GTX_orthonormalize
 gtc/packing.hppGLM_GTC_packing
 packing.hppCore features
 perpendicular.hppGLM_GTX_perpendicular
 polar_coordinates.hppGLM_GTX_polar_coordinates
 projection.hppGLM_GTX_projection
 qualifier.hpp
 gtc/quaternion.hppGLM_GTC_quaternion
 gtx/quaternion.hppGLM_GTX_quaternion
 quaternion_common.hppGLM_EXT_quaternion_common
 quaternion_double.hppGLM_EXT_quaternion_double
 quaternion_double_precision.hppGLM_EXT_quaternion_double_precision
 quaternion_exponential.hppGLM_EXT_quaternion_exponential
 quaternion_float.hppGLM_EXT_quaternion_float
 quaternion_float_precision.hppGLM_EXT_quaternion_float_precision
 quaternion_geometric.hppGLM_EXT_quaternion_geometric
 quaternion_relational.hppGLM_EXT_quaternion_relational
 quaternion_transform.hppGLM_EXT_quaternion_transform
 quaternion_trigonometric.hppGLM_EXT_quaternion_trigonometric
 random.hppGLM_GTC_random
 range.hppGLM_GTX_range
 raw_data.hppGLM_GTX_raw_data
 reciprocal.hppGLM_GTC_reciprocal
 rotate_normalized_axis.hppGLM_GTX_rotate_normalized_axis
 rotate_vector.hppGLM_GTX_rotate_vector
 round.hppGLM_GTC_round
 scalar_common.hppGLM_EXT_scalar_common
 scalar_constants.hppGLM_EXT_scalar_constants
 scalar_float_sized.hppGLM_EXT_scalar_float_sized
 scalar_int_sized.hppGLM_EXT_scalar_int_sized
 scalar_multiplication.hppExperimental extensions
 ext/scalar_relational.hppGLM_EXT_scalar_relational
 gtx/scalar_relational.hppGLM_GTX_scalar_relational
 scalar_uint_sized.hppGLM_EXT_scalar_uint_sized
 setup.hpp
 spline.hppGLM_GTX_spline
 std_based_type.hppGLM_GTX_std_based_type
 string_cast.hppGLM_GTX_string_cast
 texture.hppGLM_GTX_texture
 transform.hppGLM_GTX_transform
 transform2.hppGLM_GTX_transform2
 trigonometric.hppCore features
 gtc/type_aligned.hppGLM_GTC_type_aligned
 gtx/type_aligned.hppGLM_GTX_type_aligned
 type_half.hpp
 type_mat2x2.hppCore features
 type_mat2x3.hppCore features
 type_mat2x4.hppCore features
 type_mat3x2.hppCore features
 type_mat3x3.hppCore features
 type_mat3x4.hppCore features
 type_mat4x2.hppCore features
 type_mat4x3.hppCore features
 type_mat4x4.hppCore features
 type_precision.hppGLM_GTC_type_precision
 type_ptr.hppGLM_GTC_type_ptr
 type_quat.hpp
 type_trait.hppGLM_GTX_type_trait
 type_vec1.hppCore features
 type_vec2.hppCore features
 type_vec3.hppCore features
 type_vec4.hppCore features
 ulp.hppGLM_GTC_ulp
 vec1.hppGLM_GTC_vec1
 vec2.hppCore features
 vec3.hppCore features
 vec4.hppCore features
 vec_swizzle.hppGLM_GTX_vec_swizzle
 vector_angle.hppGLM_GTX_vector_angle
 vector_bool1.hppGLM_EXT_vector_bool1
 vector_bool1_precision.hppGLM_EXT_vector_bool1_precision
 vector_bool2.hppCore features
 vector_bool2_precision.hppCore features
 vector_bool3.hppCore features
 vector_bool3_precision.hppCore features
 vector_bool4.hppCore features
 vector_bool4_precision.hppCore features
 vector_common.hppGLM_EXT_vector_common
 vector_double1.hppGLM_EXT_vector_double1
 vector_double1_precision.hppGLM_EXT_vector_double1_precision
 vector_double2.hppCore features
 vector_double2_precision.hppCore features
 vector_double3.hppCore features
 vector_double3_precision.hppCore features
 vector_double4.hppCore features
 vector_double4_precision.hppCore features
 vector_float1.hppGLM_EXT_vector_float1
 vector_float1_precision.hppGLM_EXT_vector_float1_precision
 vector_float2.hppCore features
 vector_float2_precision.hppCore features
 vector_float3.hppCore features
 vector_float3_precision.hppCore features
 vector_float4.hppCore features
 vector_float4_precision.hppCore features
 vector_int1.hppGLM_EXT_vector_int1
 vector_int1_precision.hppGLM_EXT_vector_int1_precision
 vector_int2.hppCore features
 vector_int2_precision.hppCore features
 vector_int3.hppCore features
 vector_int3_precision.hppCore features
 vector_int4.hppCore features
 vector_int4_precision.hppCore features
 vector_query.hppGLM_GTX_vector_query
 ext/vector_relational.hppGLM_EXT_vector_relational
 vector_relational.hppCore features
 vector_uint1.hppGLM_EXT_vector_uint1
 vector_uint1_precision.hppGLM_EXT_vector_uint1_precision
 vector_uint2.hppCore features
 vector_uint2_precision.hppCore features
 vector_uint3.hppCore features
 vector_uint3_precision.hppCore features
 vector_uint4.hppCore features
 vector_uint4_precision.hppCore features
 wrap.hppGLM_GTX_wrap
+
+
+ + + + diff --git a/common/glm/doc/api/folderclosed.png b/common/glm/doc/api/folderclosed.png new file mode 100644 index 0000000000000000000000000000000000000000..2a4bb4a518c6acc32a6ebd2ab728b603c1d7bc1b GIT binary patch literal 573 zcmV-D0>b@?P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02p*dSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;(#7eog=Y0j^0zK~zXfwbQ#wLqQM*;Jku`45rJBQ{G)k+Vh~a_|I?kd;G1{Q`+V1KNk6 z{?Li_6x_>LyHYOY|A*FY1MqdfZ{fy>o>ZHf;V1}(W+(`!VhKhfWhFSNd(>a%7U z-hKA_>a)f(Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02p*dSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;(#7eog=Y0mVr~K~zXfwUoO~0znjpc?Am}!q^zKFd7@R z@zQuJyfoe#wJ=&Jp+SQ-YAD!9;VnT!K>`|+H9@5?k!V3dVPV2soEI4XGc)V5!(b?u z;>(%yGw1)8VVMXKwH2!vCRQ;_tYVm0MM>>b(0dY`3o4xmDjo^?eiqif|6mm*Y+ij7 z^z$aD_Mve11U>C23fro(<{mT+wu+L{v7pMG4tYU98TA$Y1IXjEdqH0}g34(XWb*)x zVs2H??YN-JG0mt?dKh&?!Rz!87!;HmP~=t`f&z_%2l%|1Qo>&s;~?ha?yKYBqbh8I zEfr$;1sVwl@R|M@MK#(`o + + + + + + +0.9.9 API documenation: OpenGL Mathematics (GLM) + + + + + + + + + +
+
+ + + + + + + +
+
0.9.9 API documenation +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
OpenGL Mathematics (GLM)
+
+ + + + + diff --git a/common/glm/doc/api/jquery.js b/common/glm/doc/api/jquery.js new file mode 100644 index 000000000..2771c749a --- /dev/null +++ b/common/glm/doc/api/jquery.js @@ -0,0 +1,115 @@ +/* + @licstart The following is the entire license notice for the + JavaScript code in this file. + + Copyright (C) 1997-2017 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice + for the JavaScript code in this file + */ +/*! + * jQuery JavaScript Library v1.7.1 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Mon Nov 21 21:11:03 2011 -0500 + */ +(function(bb,L){var av=bb.document,bu=bb.navigator,bl=bb.location;var b=(function(){var bF=function(b0,b1){return new bF.fn.init(b0,b1,bD)},bU=bb.jQuery,bH=bb.$,bD,bY=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b40){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bb.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bb.attachEvent("onload",bF.ready);var b0=false;try{b0=bb.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bb.JSON&&bb.JSON.parse){return bb.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(bb.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bb.execScript||function(b1){bb["eval"].call(bb,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b40&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b21?aJ.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv
a";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bG=av.createElement("select");bx=bG.appendChild(av.createElement("option"));bE=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bJ.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bJ.optDisabled=!bx.disabled;try{delete bv.test}catch(bC){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bE=av.createElement("input");bE.value="t";bE.setAttribute("type","radio");bJ.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bv.appendChild(bE);bD=av.createDocumentFragment();bD.appendChild(bv.lastChild);bJ.checkClone=bD.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bE.checked;bD.removeChild(bE);bD.appendChild(bv);bv.innerHTML="";if(bb.getComputedStyle){bA=av.createElement("div");bA.style.width="0";bA.style.marginRight="0";bv.style.width="2px";bv.appendChild(bA);bJ.reliableMarginRight=(parseInt((bb.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bB="on"+by;bw=(bB in bv);if(!bw){bv.setAttribute(bB,"return;");bw=(typeof bv[bB]==="function")}bJ[by+"Bubbles"]=bw}}bD.removeChild(bv);bD=bG=bx=bA=bv=bE=null;b(function(){var bM,bU,bV,bT,bN,bO,bL,bS,bR,e,bP,bQ=av.getElementsByTagName("body")[0];if(!bQ){return}bL=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bP="
";bM=av.createElement("div");bM.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bQ.insertBefore(bM,bQ.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="
t
";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";b.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="
";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bP;bU=bv.firstChild;bV=bU.firstChild;bN=bU.nextSibling.firstChild.firstChild;bO={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bN.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bO.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bU.style.overflow="hidden";bU.style.position="relative";bO.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bO.doesNotIncludeMarginInBodyOffset=(bQ.offsetTop!==bL);bQ.removeChild(bM);bv=bM=null;b.extend(bJ,bO)});return bJ})();var aS=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aU,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType;if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aY:be)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bx,bz){var by,bA,bv,e,bw=0;if(bz&&bx.nodeType===1){bA=bz.toLowerCase().split(af);e=bA.length;for(;bw=0)}}})});var bd=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/\bhover(\.\S+)?\b/,aO=/^key/,bf=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bb,bI])}}for(bC=0;bCbA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aO.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bf.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}}); +/*! + * Sizzle CSS Selector Engine + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){var bH=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bA=true,bK=/\\/g,bO=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bA=false;return 0});var by=function(bV,e,bY,bZ){bY=bY||[];e=e||av;var b1=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bV||typeof bV!=="string"){return bY}var bS,b3,b6,bR,b2,b5,b4,bX,bU=true,bT=by.isXML(e),bW=[],b0=bV;do{bH.exec("");bS=bH.exec(b0);if(bS){b0=bS[3];bW.push(bS[1]);if(bS[2]){bR=bS[3];break}}}while(bS);if(bW.length>1&&bD.exec(bV)){if(bW.length===2&&bE.relative[bW[0]]){b3=bM(bW[0]+bW[1],e,bZ)}else{b3=bE.relative[bW[0]]?[e]:by(bW.shift(),e);while(bW.length){bV=bW.shift();if(bE.relative[bV]){bV+=bW.shift()}b3=bM(bV,b3,bZ)}}}else{if(!bZ&&bW.length>1&&e.nodeType===9&&!bT&&bE.match.ID.test(bW[0])&&!bE.match.ID.test(bW[bW.length-1])){b2=by.find(bW.shift(),e,bT);e=b2.expr?by.filter(b2.expr,b2.set)[0]:b2.set[0]}if(e){b2=bZ?{expr:bW.pop(),set:bF(bZ)}:by.find(bW.pop(),bW.length===1&&(bW[0]==="~"||bW[0]==="+")&&e.parentNode?e.parentNode:e,bT);b3=b2.expr?by.filter(b2.expr,b2.set):b2.set;if(bW.length>0){b6=bF(b3)}else{bU=false}while(bW.length){b5=bW.pop();b4=b5;if(!bE.relative[b5]){b5=""}else{b4=bW.pop()}if(b4==null){b4=e}bE.relative[b5](b6,b4,bT)}}else{b6=bW=[]}}if(!b6){b6=b3}if(!b6){by.error(b5||bV)}if(bL.call(b6)==="[object Array]"){if(!bU){bY.push.apply(bY,b6)}else{if(e&&e.nodeType===1){for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&(b6[bX]===true||b6[bX].nodeType===1&&by.contains(e,b6[bX]))){bY.push(b3[bX])}}}else{for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&b6[bX].nodeType===1){bY.push(b3[bX])}}}}}else{bF(b6,bY)}if(bR){by(bR,b1,bY,bZ);by.uniqueSort(bY)}return bY};by.uniqueSort=function(bR){if(bJ){bB=bA;bR.sort(bJ);if(bB){for(var e=1;e0};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[]}for(bS=0,bU=bE.order.length;bS":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS=0)){if(!bS){e.push(bV)}}else{if(bS){bR[bU]=false}}}}return false},ID:function(e){return e[1].replace(bK,"")},TAG:function(bR,e){return bR[1].replace(bK,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){by.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0}else{if(e[2]){by.error(e[0])}}e[0]=bI++;return e},ATTR:function(bU,bR,bS,e,bV,bW){var bT=bU[1]=bU[1].replace(bK,"");if(!bW&&bE.attrMap[bT]){bU[1]=bE.attrMap[bT]}bU[4]=(bU[4]||bU[5]||"").replace(bK,"");if(bU[2]==="~="){bU[4]=" "+bU[4]+" "}return bU},PSEUDO:function(bU,bR,bS,e,bV){if(bU[1]==="not"){if((bH.exec(bU[3])||"").length>1||/^\w/.test(bU[3])){bU[3]=by(bU[3],null,null,bR)}else{var bT=by.filter(bU[3],bR,bS,true^bV);if(!bS){e.push.apply(e,bT)}return false}}else{if(bE.match.POS.test(bU[0])||bE.match.CHILD.test(bU[0])){return true}}return bU},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bS,bR,e){return !!by(e[3],bS).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bR,e){return e===0},last:function(bS,bR,e,bT){return bR===bT.length-1},even:function(bR,e){return e%2===0},odd:function(bR,e){return e%2===1},lt:function(bS,bR,e){return bRe[3]-0},nth:function(bS,bR,e){return e[3]-0===bR},eq:function(bS,bR,e){return e[3]-0===bR}},filter:{PSEUDO:function(bS,bX,bW,bY){var e=bX[1],bR=bE.filters[e];if(bR){return bR(bS,bW,bX,bY)}else{if(e==="contains"){return(bS.textContent||bS.innerText||bw([bS])||"").indexOf(bX[3])>=0}else{if(e==="not"){var bT=bX[3];for(var bV=0,bU=bT.length;bV=0)}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bV,bT){var bS=bT[1],e=by.attr?by.attr(bV,bS):bE.attrHandle[bS]?bE.attrHandle[bS](bV):bV[bS]!=null?bV[bS]:bV.getAttribute(bS),bW=e+"",bU=bT[2],bR=bT[4];return e==null?bU==="!=":!bU&&by.attr?e!=null:bU==="="?bW===bR:bU==="*="?bW.indexOf(bR)>=0:bU==="~="?(" "+bW+" ").indexOf(bR)>=0:!bR?bW&&e!==false:bU==="!="?bW!==bR:bU==="^="?bW.indexOf(bR)===0:bU==="$="?bW.substr(bW.length-bR.length)===bR:bU==="|="?bW===bR||bW.substr(0,bR.length+1)===bR+"-":false},POS:function(bU,bR,bS,bV){var e=bR[2],bT=bE.setFilters[e];if(bT){return bT(bU,bS,bR,bV)}}}};var bD=bE.match.POS,bx=function(bR,e){return"\\"+(e-0+1)};for(var bz in bE.match){bE.match[bz]=new RegExp(bE.match[bz].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bE.leftMatch[bz]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bE.match[bz].source.replace(/\\(\d+)/g,bx))}var bF=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e}return bR};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType}catch(bP){bF=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU)}else{if(typeof bU.length==="number"){for(var e=bU.length;bS";e.insertBefore(bR,e.firstChild);if(av.getElementById(bS)){bE.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:L:[]}};bE.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT}}e.removeChild(bR);e=bR=null})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bE.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS])}}bU=bT}return bU}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bE.attrHandle.href=function(bR){return bR.getAttribute("href",2)}}e=null})();if(av.querySelectorAll){(function(){var e=by,bT=av.createElement("div"),bS="__sizzle__";bT.innerHTML="

";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return}by=function(b4,bV,bZ,b3){bV=bV||av;if(!b3&&!by.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bF(bV.getElementsByTagName(b4),bZ)}else{if(b2[2]&&bE.find.CLASS&&bV.getElementsByClassName){return bF(bV.getElementsByClassName(b2[2]),bZ)}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bF([bV.body],bZ)}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bF([bY],bZ)}}else{return bF([],bZ)}}}try{return bF(bV.querySelectorAll(b4),bZ)}catch(b0){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var bW=bV,bX=bV.getAttribute("id"),bU=bX||bS,b6=bV.parentNode,b5=/^\s*[+~]/.test(b4);if(!bX){bV.setAttribute("id",bU)}else{bU=bU.replace(/'/g,"\\$&")}if(b5&&b6){bV=bV.parentNode}try{if(!b5||b6){return bF(bV.querySelectorAll("[id='"+bU+"'] "+b4),bZ)}}catch(b1){}finally{if(!bX){bW.removeAttribute("id")}}}}}return e(b4,bV,bZ,b3)};for(var bR in e){by[bR]=e[bR]}bT=null})()}(function(){var e=av.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(av.createElement("div"),"div"),bR=false;try{bS.call(av.documentElement,"[test!='']:sizzle")}catch(bT){bR=true}by.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!by.isXML(bW)){try{if(bR||!bE.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV}}}catch(bX){}}return by(bY,null,null,[bW]).length>0}}})();(function(){var e=av.createElement("div");e.innerHTML="
";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bE.order.splice(1,0,"CLASS");bE.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1])}};e=null})();function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT0){bU=e;break}}}e=e[bR]}bZ[bT]=bU}}}if(av.documentElement.contains){by.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true)}}else{if(av.documentElement.compareDocumentPosition){by.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16)}}else{by.contains=function(){return false}}}by.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false};var bM=function(bS,e,bW){var bV,bX=[],bU="",bY=e.nodeType?[e]:e;while((bV=bE.match.PSEUDO.exec(bS))){bU+=bV[0];bS=bS.replace(bE.match.PSEUDO,"")}bS=bE.relative[bS]?bS+"*":bS;for(var bT=0,bR=bY.length;bT0){for(bB=bA;bB=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(by,bx){var bv=[],bw,e,bz=this[0];if(b.isArray(by)){var bB=1;while(bz&&bz.ownerDocument&&bz!==bx){for(bw=0;bw-1:b.find.matchesSelector(bz,by)){bv.push(bz);break}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===bx||bz.nodeType===11){break}}}}bv=bv.length>1?b.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(C(bx[0])||C(bw[0])?bw:b.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bv){b.fn[e]=function(by,bw){var bx=b.map(this,bv,by);if(!ab.test(e)){bw=by}if(bw&&typeof bw==="string"){bx=b.filter(bw,bx)}bx=this.length>1&&!ay[e]?b.unique(bx):bx;if((this.length>1||a9.test(bw))&&aq.test(e)){bx=bx.reverse()}return this.pushStack(bx,e,P.call(arguments).join(","))}});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){break}}return by},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw)}}return e}});function aG(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e})}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e})}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1});if(bp.test(bw)){return b.filter(bw,bv,!e)}else{bw=b.filter(bw,bv)}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e})}function a(e){var bw=aR.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aR="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ag=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,w=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},ac=a(av);ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div
","
"]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bw){var bv=b(this);bv.text(e.call(this,bw,bv.text()))})}if(typeof e!=="object"&&e!==L){return this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e)}else{bv.append(e)}})},wrap:function(e){var bv=b.isFunction(e);return this.each(function(bw){b(this).wrapAll(bv?e.call(this,bw):e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=b.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b.clean(arguments));return e}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return b.clone(this,bv,e)})},html:function(bx){if(bx===L){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ag,""):null}else{if(typeof bx==="string"&&!ae.test(bx)&&(b.support.leadingWhitespace||!ar.test(bx))&&!ax[(d.exec(bx)||["",""])[1].toLowerCase()]){bx=bx.replace(R,"<$1>");try{for(var bw=0,bv=this.length;bw1&&bw0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,e,bC.selector)}}});function bg(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function E(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(e)}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az)}}}function al(e){var bv=av.createElement("div");ac.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild}b.extend({clone:function(by,bA,bw){var e,bv,bx,bz=b.support.html5Clone||!ah.test("<"+by.nodeName)?by.cloneNode(true):al(by);if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){ai(by,bz);e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){if(bv[bx]){ai(e[bx],bv[bx])}}}if(bA){t(by,bz);if(bw){e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){t(e[bx],bv[bx])}}}e=bv=null;return bz},clean:function(bw,by,bH,bA){var bF;by=by||av;if(typeof by.createElement==="undefined"){by=by.ownerDocument||by[0]&&by[0].ownerDocument||av}var bI=[],bB;for(var bE=0,bz;(bz=bw[bE])!=null;bE++){if(typeof bz==="number"){bz+=""}if(!bz){continue}if(typeof bz==="string"){if(!W.test(bz)){bz=by.createTextNode(bz)}else{bz=bz.replace(R,"<$1>");var bK=(d.exec(bz)||["",""])[1].toLowerCase(),bx=ax[bK]||ax._default,bD=bx[0],bv=by.createElement("div");if(by===av){ac.appendChild(bv)}else{a(by).appendChild(bv)}bv.innerHTML=bx[1]+bz+bx[2];while(bD--){bv=bv.lastChild}if(!b.support.tbody){var e=w.test(bz),bC=bK==="table"&&!e?bv.firstChild&&bv.firstChild.childNodes:bx[1]===""&&!e?bv.childNodes:[];for(bB=bC.length-1;bB>=0;--bB){if(b.nodeName(bC[bB],"tbody")&&!bC[bB].childNodes.length){bC[bB].parentNode.removeChild(bC[bB])}}}if(!b.support.leadingWhitespace&&ar.test(bz)){bv.insertBefore(by.createTextNode(ar.exec(bz)[0]),bv.firstChild)}bz=bv.childNodes}}var bG;if(!b.support.appendChecked){if(bz[0]&&typeof(bG=bz.length)==="number"){for(bB=0;bB=0){return bx+"px"}}else{return bx}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bv,e){return au.test((e&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,e=b.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&b.trim(bw.replace(ak,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ak.test(bw)?bw.replace(ak,e):bw+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bw,bv){var e;b.swap(bw,{display:"inline-block"},function(){if(bv){e=Z(bw,"margin-right","marginRight")}else{e=bw.style.marginRight}});return e}}}});if(av.defaultView&&av.defaultView.getComputedStyle){aI=function(by,bw){var bv,bx,e;bw=bw.replace(z,"-$1").toLowerCase();if((bx=by.ownerDocument.defaultView)&&(e=bx.getComputedStyle(by,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(by.ownerDocument.documentElement,by)){bv=b.style(by,bw)}}return bv}}if(av.documentElement.currentStyle){aX=function(bz,bw){var bA,e,by,bv=bz.currentStyle&&bz.currentStyle[bw],bx=bz.style;if(bv===null&&bx&&(by=bx[bw])){bv=by}if(!bc.test(bv)&&bn.test(bv)){bA=bx.left;e=bz.runtimeStyle&&bz.runtimeStyle.left;if(e){bz.runtimeStyle.left=bz.currentStyle.left}bx.left=bw==="fontSize"?"1em":(bv||0);bv=bx.pixelLeft+"px";bx.left=bA;if(e){bz.runtimeStyle.left=e}}return bv===""?"auto":bv}}Z=aI||aX;function p(by,bw,bv){var bA=bw==="width"?by.offsetWidth:by.offsetHeight,bz=bw==="width"?an:a1,bx=0,e=bz.length;if(bA>0){if(bv!=="border"){for(;bx)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,br=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,aa={},r={},aE,s,aV=["*/"]+["*"];try{aE=bl.href}catch(aw){aE=av.createElement("a");aE.href="";aE=aE.href}s=K.exec(aE.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("
").append(bD.replace(a6,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aZ.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.on(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){am(bv,b.ajaxSettings)}else{e=bv;bv=b.ajaxSettings}am(bv,e);return bv},ajaxSettings:{url:aE,isLocal:aM.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aV},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bb.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(aa),ajaxTransport:f(r),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b.Callbacks("once memory"),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aD.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bW||"";bJ.readyState=bZ>0?4:0;var bT,b4,b3,bX=bU,bY=b0?bj(bD,bJ,b0):L,bV,b2;if(bZ>=200&&bZ<300||bZ===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bV}if((b2=bJ.getResponseHeader("Etag"))){b.etag[bC]=b2}}if(bZ===304){bX="notmodified";bT=true}else{try{b4=G(bD,bY);bX="success";bT=true}catch(b1){bX="parsererror";b3=b1}}}else{b3=bX;if(!bX||bZ){bX="error";if(bZ<0){bZ=0}}}bJ.status=bZ;bJ.statusText=""+(bU||bX);if(bT){bR.resolveWith(bS,[b4,bX,bJ])}else{bR.rejectWith(bS,[bJ,bX,b3])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bS,[bJ,bX]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(bA<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(c,s[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=s[1]||bI[2]!=s[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aW(aa,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aQ.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data;delete bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(br,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aV+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aW(r,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(bA<2){bF(-1,bM)}else{throw bM}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){v(bx,e[bx],bw,by)}}return bv.join("&").replace(k,"+")}});function v(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||ap.test(bw)){bx(bw,bz)}else{v(bw+"["+(typeof bz==="object"||b.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var e in by){v(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA=bw.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bw.animatedProperties[this.prop]=true;for(bA in bw.animatedProperties){if(bw.animatedProperties[bA]!==true){e=false}}if(e){if(bw.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bw.overflow[bC]})}if(bw.hide){b(bz).hide()}if(bw.hide||bw.show){for(bA in bw.animatedProperties){b.style(bz,bA,bw.orig[bA]);b.removeData(bz,"fxshow"+bA,true);b.removeData(bz,"toggle"+bA,true)}}bv=bw.complete;if(bv){bw.complete=false;bv.call(bz)}}return false}else{if(bw.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bw.duration;this.pos=b.easing[bw.animatedProperties[this.prop]](this.state,bB,0,1,bw.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bw,bv=b.timers,e=0;for(;e").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!a8){a8=av.createElement("iframe");a8.frameBorder=a8.width=a8.height=0}e.appendChild(a8);if(!m||!a8.createElement){m=(a8.contentWindow||a8.contentDocument).document;m.write((av.compatMode==="CSS1Compat"?"":"")+"");m.close()}bv=m.createElement(bx);m.body.appendChild(bv);bw=b.css(bv,"display");e.removeChild(a8)}Q[bx]=bw}return Q[bx]}var V=/^t(?:able|d|h)$/i,ad=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){b.fn.offset=function(bI){var by=this[0],bB;if(bI){return this.each(function(e){b.offset.setOffset(this,bI,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return b.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bH=by.ownerDocument,bw=bH.documentElement;if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aK(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{b.fn.offset=function(bF){var bz=this[0];if(bF){return this.each(function(bG){b.offset.setOffset(this,bF,bG)})}if(!bz||!bz.ownerDocument){return null}if(bz===bz.ownerDocument.body){return b.offset.bodyOffset(bz)}var bC,bw=bz.offsetParent,bv=bz,bE=bz.ownerDocument,bx=bE.documentElement,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.support.fixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ad.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ad.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bv,e){var bw="scroll"+e;b.fn[bw]=function(bz){var bx,by;if(bz===L){bx=this[0];if(!bx){return null}by=aK(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:b.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=aK(this);if(by){by.scrollTo(!bv?bz:b(by).scrollLeft(),bv?bz:b(by).scrollTop())}else{this[bw]=bz}})}});function aK(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();b.fn["inner"+e]=function(){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,"padding")):this[bw]():null};b.fn["outer"+e]=function(by){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,by?"margin":"border")):this[bw]():null};b.fn[bw]=function(bz){var bA=this[0];if(!bA){return bz==null?null:this}if(b.isFunction(bz)){return this.each(function(bE){var bD=b(this);bD[bw](bz.call(this,bE,bD[bw]()))})}if(b.isWindow(bA)){var bB=bA.document.documentElement["client"+e],bx=bA.document.body;return bA.document.compatMode==="CSS1Compat"&&bB||bx&&bx["client"+e]||bB}else{if(bA.nodeType===9){return Math.max(bA.documentElement["client"+e],bA.body["scroll"+e],bA.documentElement["scroll"+e],bA.body["offset"+e],bA.documentElement["offset"+e])}else{if(bz===L){var bC=b.css(bA,bw),by=parseFloat(bC);return b.isNumeric(by)?by:bC}else{return this.css(bw,typeof bz==="string"?bz:bz+"px")}}}}});bb.jQuery=bb.$=b;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return b})}})(window);/*! + * jQuery UI 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI + */ +(function(a,d){a.ui=a.ui||{};if(a.ui.version){return}a.extend(a.ui,{version:"1.8.18",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(e,f){return typeof e==="number"?this.each(function(){var g=this;setTimeout(function(){a(g).focus();if(f){f.call(g)}},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;if((a.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){e=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(a.curCSS(this,"position",1))&&(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}else{e=this.parents().filter(function(){return(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!e.length?a(document):e},zIndex:function(h){if(h!==d){return this.css("zIndex",h)}if(this.length){var f=a(this[0]),e,g;while(f.length&&f[0]!==document){e=f.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){g=parseInt(f.css("zIndex"),10);if(!isNaN(g)&&g!==0){return g}}f=f.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(g,e){var f=e==="Width"?["Left","Right"]:["Top","Bottom"],h=e.toLowerCase(),k={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};function j(m,l,i,n){a.each(f,function(){l-=parseFloat(a.curCSS(m,"padding"+this,true))||0;if(i){l-=parseFloat(a.curCSS(m,"border"+this+"Width",true))||0}if(n){l-=parseFloat(a.curCSS(m,"margin"+this,true))||0}});return l}a.fn["inner"+e]=function(i){if(i===d){return k["inner"+e].call(this)}return this.each(function(){a(this).css(h,j(this,i)+"px")})};a.fn["outer"+e]=function(i,l){if(typeof i!=="number"){return k["outer"+e].call(this,i)}return this.each(function(){a(this).css(h,j(this,i,true,l)+"px")})}});function c(g,e){var j=g.nodeName.toLowerCase();if("area"===j){var i=g.parentNode,h=i.name,f;if(!g.href||!h||i.nodeName.toLowerCase()!=="map"){return false}f=a("img[usemap=#"+h+"]")[0];return !!f&&b(f)}return(/input|select|textarea|button|object/.test(j)?!g.disabled:"a"==j?g.href||e:e)&&b(g)}function b(e){return !a(e).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.extend(a.expr[":"],{data:function(g,f,e){return !!a.data(g,e[3])},focusable:function(e){return c(e,!isNaN(a.attr(e,"tabindex")))},tabbable:function(g){var e=a.attr(g,"tabindex"),f=isNaN(e);return(f||e>=0)&&c(g,!f)}});a(function(){var e=document.body,f=e.appendChild(f=document.createElement("div"));f.offsetHeight;a.extend(f.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=f.offsetHeight===100;a.support.selectstart="onselectstart" in f;e.removeChild(f).style.display="none"});a.extend(a.ui,{plugin:{add:function(f,g,j){var h=a.ui[f].prototype;for(var e in j){h.plugins[e]=h.plugins[e]||[];h.plugins[e].push([g,j[e]])}},call:function(e,g,f){var j=e.plugins[g];if(!j||!e.element[0].parentNode){return}for(var h=0;h0){return true}h[e]=1;g=(h[e]>0);h[e]=0;return g},isOverAxis:function(f,e,g){return(f>e)&&(f<(e+g))},isOver:function(j,f,i,h,e,g){return a.ui.isOverAxis(j,i,e)&&a.ui.isOverAxis(f,h,g)}})})(jQuery);/*! + * jQuery UI Widget 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Widget + */ +(function(b,d){if(b.cleanData){var c=b.cleanData;b.cleanData=function(f){for(var g=0,h;(h=f[g])!=null;g++){try{b(h).triggerHandler("remove")}catch(j){}}c(f)}}else{var a=b.fn.remove;b.fn.remove=function(e,f){return this.each(function(){if(!f){if(!e||b.filter(e,[this]).length){b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(g){}})}}return a.call(b(this),e,f)})}}b.widget=function(f,h,e){var g=f.split(".")[0],j;f=f.split(".")[1];j=g+"-"+f;if(!e){e=h;h=b.Widget}b.expr[":"][j]=function(k){return !!b.data(k,f)};b[g]=b[g]||{};b[g][f]=function(k,l){if(arguments.length){this._createWidget(k,l)}};var i=new h();i.options=b.extend(true,{},i.options);b[g][f].prototype=b.extend(true,i,{namespace:g,widgetName:f,widgetEventPrefix:b[g][f].prototype.widgetEventPrefix||f,widgetBaseClass:j},e);b.widget.bridge(f,b[g][f])};b.widget.bridge=function(f,e){b.fn[f]=function(i){var g=typeof i==="string",h=Array.prototype.slice.call(arguments,1),j=this;i=!g&&h.length?b.extend.apply(null,[true,i].concat(h)):i;if(g&&i.charAt(0)==="_"){return j}if(g){this.each(function(){var k=b.data(this,f),l=k&&b.isFunction(k[i])?k[i].apply(k,h):k;if(l!==k&&l!==d){j=l;return false}})}else{this.each(function(){var k=b.data(this,f);if(k){k.option(i||{})._init()}else{b.data(this,f,new e(i,this))}})}return j}};b.Widget=function(e,f){if(arguments.length){this._createWidget(e,f)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(f,g){b.data(g,this.widgetName,this);this.element=b(g);this.options=b.extend(true,{},this.options,this._getCreateOptions(),f);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(f,g){var e=f;if(arguments.length===0){return b.extend({},this.options)}if(typeof f==="string"){if(g===d){return this.options[f]}e={};e[f]=g}this._setOptions(e);return this},_setOptions:function(f){var e=this;b.each(f,function(g,h){e._setOption(g,h)});return this},_setOption:function(e,f){this.options[e]=f;if(e==="disabled"){this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(e,f,g){var j,i,h=this.options[e];g=g||{};f=b.Event(f);f.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase();f.target=this.element[0];i=f.originalEvent;if(i){for(j in i){if(!(j in f)){f[j]=i[j]}}}this.element.trigger(f,g);return !(b.isFunction(h)&&h.call(this.element[0],f,g)===false||f.isDefaultPrevented())}}})(jQuery);/*! + * jQuery UI Mouse 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Mouse + * + * Depends: + * jquery.ui.widget.js + */ +(function(b,c){var a=false;b(document).mouseup(function(d){a=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var d=this;this.element.bind("mousedown."+this.widgetName,function(e){return d._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(true===b.data(e.target,d.widgetName+".preventClickEvent")){b.removeData(e.target,d.widgetName+".preventClickEvent");e.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(f){if(a){return}(this._mouseStarted&&this._mouseUp(f));this._mouseDownEvent=f;var e=this,g=(f.which==1),d=(typeof this.options.cancel=="string"&&f.target.nodeName?b(f.target).closest(this.options.cancel).length:false);if(!g||d||!this._mouseCapture(f)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f)){this._mouseStarted=(this._mouseStart(f)!==false);if(!this._mouseStarted){f.preventDefault();return true}}if(true===b.data(f.target,this.widgetName+".preventClickEvent")){b.removeData(f.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(h){return e._mouseMove(h)};this._mouseUpDelegate=function(h){return e._mouseUp(h)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);f.preventDefault();a=true;return true},_mouseMove:function(d){if(b.browser.msie&&!(document.documentMode>=9)&&!d.button){return this._mouseUp(d)}if(this._mouseStarted){this._mouseDrag(d);return d.preventDefault()}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,d)!==false);(this._mouseStarted?this._mouseDrag(d):this._mouseUp(d))}return !this._mouseStarted},_mouseUp:function(d){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(d.target==this._mouseDownEvent.target){b.data(d.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(d)}return false},_mouseDistanceMet:function(d){return(Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance)},_mouseDelayMet:function(d){return this.mouseDelayMet},_mouseStart:function(d){},_mouseDrag:function(d){},_mouseStop:function(d){},_mouseCapture:function(d){return true}})})(jQuery);(function(c,d){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var f=this,k=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(k.aspectRatio),aspectRatio:k.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:k.helper||k.ghost||k.animate?k.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){this.element.wrap(c('
').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=k.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var l=this.handles.split(",");this.handles={};for(var g=0;g
');if(/sw|se|ne|nw/.test(j)){h.css({zIndex:++k.zIndex})}if("se"==j){h.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[j]=".ui-resizable-"+j;this.element.append(h)}}this._renderAxis=function(q){q=q||this.element;for(var n in this.handles){if(this.handles[n].constructor==String){this.handles[n]=c(this.handles[n],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var o=c(this.handles[n],this.element),p=0;p=/sw|ne|nw|se|n|s/.test(n)?o.outerHeight():o.outerWidth();var m=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");q.css(m,p);this._proportionallyResize()}if(!c(this.handles[n]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!f.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}f.axis=i&&i[1]?i[1]:"se"}});if(k.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){if(k.disabled){return}c(this).removeClass("ui-resizable-autohide");f._handles.show()},function(){if(k.disabled){return}if(!f.resizing){c(this).addClass("ui-resizable-autohide");f._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var e=function(g){c(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var f=this.element;f.after(this.originalElement.css({position:f.css("position"),width:f.outerWidth(),height:f.outerHeight(),top:f.css("top"),left:f.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement);return this},_mouseCapture:function(f){var g=false;for(var e in this.handles){if(c(this.handles[e])[0]==f.target){g=true}}return !this.options.disabled&&g},_mouseStart:function(g){var j=this.options,f=this.element.position(),e=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(e.is(".ui-draggable")||(/absolute/).test(e.css("position"))){e.css({position:"absolute",top:f.top,left:f.left})}this._renderProxy();var k=b(this.helper.css("left")),h=b(this.helper.css("top"));if(j.containment){k+=c(j.containment).scrollLeft()||0;h+=c(j.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:k,top:h};this.size=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalSize=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalPosition={left:k,top:h};this.sizeDiff={width:e.outerWidth()-e.width(),height:e.outerHeight()-e.height()};this.originalMousePosition={left:g.pageX,top:g.pageY};this.aspectRatio=(typeof j.aspectRatio=="number")?j.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var i=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",i=="auto"?this.axis+"-resize":i);e.addClass("ui-resizable-resizing");this._propagate("start",g);return true},_mouseDrag:function(e){var h=this.helper,g=this.options,m={},q=this,j=this.originalMousePosition,n=this.axis;var r=(e.pageX-j.left)||0,p=(e.pageY-j.top)||0;var i=this._change[n];if(!i){return false}var l=i.apply(this,[e,r,p]),k=c.browser.msie&&c.browser.version<7,f=this.sizeDiff;this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey){l=this._updateRatio(l,e)}l=this._respectSize(l,e);this._propagate("resize",e);h.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(l);this._trigger("resize",e,this.ui());return false},_mouseStop:function(h){this.resizing=false;var i=this.options,m=this;if(this._helper){var g=this._proportionallyResizeElements,e=g.length&&(/textarea/i).test(g[0].nodeName),f=e&&c.ui.hasScroll(g[0],"left")?0:m.sizeDiff.height,k=e?0:m.sizeDiff.width;var n={width:(m.helper.width()-k),height:(m.helper.height()-f)},j=(parseInt(m.element.css("left"),10)+(m.position.left-m.originalPosition.left))||null,l=(parseInt(m.element.css("top"),10)+(m.position.top-m.originalPosition.top))||null;if(!i.animate){this.element.css(c.extend(n,{top:l,left:j}))}m.helper.height(m.size.height);m.helper.width(m.size.width);if(this._helper&&!i.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",h);if(this._helper){this.helper.remove()}return false},_updateVirtualBoundaries:function(g){var j=this.options,i,h,f,k,e;e={minWidth:a(j.minWidth)?j.minWidth:0,maxWidth:a(j.maxWidth)?j.maxWidth:Infinity,minHeight:a(j.minHeight)?j.minHeight:0,maxHeight:a(j.maxHeight)?j.maxHeight:Infinity};if(this._aspectRatio||g){i=e.minHeight*this.aspectRatio;f=e.minWidth/this.aspectRatio;h=e.maxHeight*this.aspectRatio;k=e.maxWidth/this.aspectRatio;if(i>e.minWidth){e.minWidth=i}if(f>e.minHeight){e.minHeight=f}if(hl.width),s=a(l.height)&&i.minHeight&&(i.minHeight>l.height);if(h){l.width=i.minWidth}if(s){l.height=i.minHeight}if(t){l.width=i.maxWidth}if(m){l.height=i.maxHeight}var f=this.originalPosition.left+this.originalSize.width,p=this.position.top+this.size.height;var k=/sw|nw|w/.test(q),e=/nw|ne|n/.test(q);if(h&&k){l.left=f-i.minWidth}if(t&&k){l.left=f-i.maxWidth}if(s&&e){l.top=p-i.minHeight}if(m&&e){l.top=p-i.maxHeight}var n=!l.width&&!l.height;if(n&&!l.left&&l.top){l.top=null}else{if(n&&!l.top&&l.left){l.left=null}}return l},_proportionallyResize:function(){var k=this.options;if(!this._proportionallyResizeElements.length){return}var g=this.helper||this.element;for(var f=0;f');var e=c.browser.msie&&c.browser.version<7,g=(e?1:0),h=(e?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+h,height:this.element.outerHeight()+h,position:"absolute",left:this.elementOffset.left-g+"px",top:this.elementOffset.top-g+"px",zIndex:++i.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(g,f,e){return{width:this.originalSize.width+f}},w:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{left:i.left+f,width:g.width-f}},n:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{top:i.top+e,height:g.height-e}},s:function(g,f,e){return{height:this.originalSize.height+e}},se:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},sw:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[g,f,e]))},ne:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},nw:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[g,f,e]))}},_propagate:function(f,e){c.ui.plugin.call(this,f,[e,this.ui()]);(f!="resize"&&this._trigger(f,e,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.18"});c.ui.plugin.add("resizable","alsoResize",{start:function(f,g){var e=c(this).data("resizable"),i=e.options;var h=function(j){c(j).each(function(){var k=c(this);k.data("resizable-alsoresize",{width:parseInt(k.width(),10),height:parseInt(k.height(),10),left:parseInt(k.css("left"),10),top:parseInt(k.css("top"),10)})})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.parentNode){if(i.alsoResize.length){i.alsoResize=i.alsoResize[0];h(i.alsoResize)}else{c.each(i.alsoResize,function(j){h(j)})}}else{h(i.alsoResize)}},resize:function(g,i){var f=c(this).data("resizable"),j=f.options,h=f.originalSize,l=f.originalPosition;var k={height:(f.size.height-h.height)||0,width:(f.size.width-h.width)||0,top:(f.position.top-l.top)||0,left:(f.position.left-l.left)||0},e=function(m,n){c(m).each(function(){var q=c(this),r=c(this).data("resizable-alsoresize"),p={},o=n&&n.length?n:q.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(o,function(s,u){var t=(r[u]||0)+(k[u]||0);if(t&&t>=0){p[u]=t||null}});q.css(p)})};if(typeof(j.alsoResize)=="object"&&!j.alsoResize.nodeType){c.each(j.alsoResize,function(m,n){e(m,n)})}else{e(j.alsoResize)}},stop:function(e,f){c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(i,n){var p=c(this).data("resizable"),j=p.options;var h=p._proportionallyResizeElements,e=h.length&&(/textarea/i).test(h[0].nodeName),f=e&&c.ui.hasScroll(h[0],"left")?0:p.sizeDiff.height,l=e?0:p.sizeDiff.width;var g={width:(p.size.width-l),height:(p.size.height-f)},k=(parseInt(p.element.css("left"),10)+(p.position.left-p.originalPosition.left))||null,m=(parseInt(p.element.css("top"),10)+(p.position.top-p.originalPosition.top))||null;p.element.animate(c.extend(g,m&&k?{top:m,left:k}:{}),{duration:j.animateDuration,easing:j.animateEasing,step:function(){var o={width:parseInt(p.element.css("width"),10),height:parseInt(p.element.css("height"),10),top:parseInt(p.element.css("top"),10),left:parseInt(p.element.css("left"),10)};if(h&&h.length){c(h[0]).css({width:o.width,height:o.height})}p._updateCache(o);p._propagate("resize",i)}})}});c.ui.plugin.add("resizable","containment",{start:function(f,r){var t=c(this).data("resizable"),j=t.options,l=t.element;var g=j.containment,k=(g instanceof c)?g.get(0):(/parent/.test(g))?l.parent().get(0):g;if(!k){return}t.containerElement=c(k);if(/document/.test(g)||g==document){t.containerOffset={left:0,top:0};t.containerPosition={left:0,top:0};t.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var n=c(k),i=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){i[p]=b(n.css("padding"+o))});t.containerOffset=n.offset();t.containerPosition=n.position();t.containerSize={height:(n.innerHeight()-i[3]),width:(n.innerWidth()-i[1])};var q=t.containerOffset,e=t.containerSize.height,m=t.containerSize.width,h=(c.ui.hasScroll(k,"left")?k.scrollWidth:m),s=(c.ui.hasScroll(k)?k.scrollHeight:e);t.parentData={element:k,left:q.left,top:q.top,width:h,height:s}}},resize:function(g,q){var t=c(this).data("resizable"),i=t.options,f=t.containerSize,p=t.containerOffset,m=t.size,n=t.position,r=t._aspectRatio||g.shiftKey,e={top:0,left:0},h=t.containerElement;if(h[0]!=document&&(/static/).test(h.css("position"))){e=p}if(n.left<(t._helper?p.left:0)){t.size.width=t.size.width+(t._helper?(t.position.left-p.left):(t.position.left-e.left));if(r){t.size.height=t.size.width/i.aspectRatio}t.position.left=i.helper?p.left:0}if(n.top<(t._helper?p.top:0)){t.size.height=t.size.height+(t._helper?(t.position.top-p.top):t.position.top);if(r){t.size.width=t.size.height*i.aspectRatio}t.position.top=t._helper?p.top:0}t.offset.left=t.parentData.left+t.position.left;t.offset.top=t.parentData.top+t.position.top;var l=Math.abs((t._helper?t.offset.left-e.left:(t.offset.left-e.left))+t.sizeDiff.width),s=Math.abs((t._helper?t.offset.top-e.top:(t.offset.top-p.top))+t.sizeDiff.height);var k=t.containerElement.get(0)==t.element.parent().get(0),j=/relative|absolute/.test(t.containerElement.css("position"));if(k&&j){l-=t.parentData.left}if(l+t.size.width>=t.parentData.width){t.size.width=t.parentData.width-l;if(r){t.size.height=t.size.width/t.aspectRatio}}if(s+t.size.height>=t.parentData.height){t.size.height=t.parentData.height-s;if(r){t.size.width=t.size.height*t.aspectRatio}}},stop:function(f,n){var q=c(this).data("resizable"),g=q.options,l=q.position,m=q.containerOffset,e=q.containerPosition,i=q.containerElement;var j=c(q.helper),r=j.offset(),p=j.outerWidth()-q.sizeDiff.width,k=j.outerHeight()-q.sizeDiff.height;if(q._helper&&!g.animate&&(/relative/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}if(q._helper&&!g.animate&&(/static/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}}});c.ui.plugin.add("resizable","ghost",{start:function(g,h){var e=c(this).data("resizable"),i=e.options,f=e.size;e.ghost=e.originalElement.clone();e.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:"");e.ghost.appendTo(e.helper)},resize:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost){e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})}},stop:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost&&e.helper){e.helper.get(0).removeChild(e.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(e,m){var p=c(this).data("resizable"),h=p.options,k=p.size,i=p.originalSize,j=p.originalPosition,n=p.axis,l=h._aspectRatio||e.shiftKey;h.grid=typeof h.grid=="number"?[h.grid,h.grid]:h.grid;var g=Math.round((k.width-i.width)/(h.grid[0]||1))*(h.grid[0]||1),f=Math.round((k.height-i.height)/(h.grid[1]||1))*(h.grid[1]||1);if(/^(se|s|e)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f}else{if(/^(ne)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f}else{if(/^(sw)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.left=j.left-g}else{p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f;p.position.left=j.left-g}}}}});var b=function(e){return parseInt(e,10)||0};var a=function(e){return !isNaN(parseInt(e,10))}})(jQuery);/*! + * jQuery hashchange event - v1.3 - 7/21/2010 + * http://benalman.com/projects/jquery-hashchange-plugin/ + * + * Copyright (c) 2010 "Cowboy" Ben Alman + * Dual licensed under the MIT and GPL licenses. + * http://benalman.com/about/license/ + */ +(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$(' + + +
+
+
Modules
+
+
+
Here is a list of all modules:
+
[detail level 12]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Core featuresFeatures that implement in C++ the GLSL specification as closely as possible
 Stable extensionsAdditional features not specified by GLSL specification
 Recommended extensionsAdditional features not specified by GLSL specification
 Experimental extensionsExperimental features not specified by GLSL specification
+ + + + + + diff --git a/common/glm/doc/api/nav_f.png b/common/glm/doc/api/nav_f.png new file mode 100644 index 0000000000000000000000000000000000000000..c77a42e73e0d578c24e875d78248305b3f2cefaa GIT binary patch literal 233 zcmeAS@N?(olHy`uVBq!ia0vp^j6iI`!2~2XGqLUl2^0spJ29*~C-V}>VM%xNb!1@J z*w6hZkrl}2EbxddW?->OfqC8z3LnOj`&slOcI0(30-1UEw^#93M zy-Qhm+)ew+xs;4W6WN4bTnhB&y&4ke$$I5Uz{xoxx7h!CzUZ_&qTkuR_xRrj9%YQP Yo=$vuW&M?pKwB6*UHx3vIVCg!0El2spa1{> literal 0 HcmV?d00001 diff --git a/common/glm/doc/api/nav_g.png b/common/glm/doc/api/nav_g.png new file mode 100644 index 0000000000000000000000000000000000000000..2093a237a94f6c83e19ec6e5fd42f7ddabdafa81 GIT binary patch literal 95 zcmeAS@N?(olHy`uVBq!ia0vp^j6lrB!3HFm1ilyoDK$?Q$B+ufw|5PB85lU25BhtE tr?otc=hd~V+ws&_A@j8Fiv!KanMprAyFYeY$Kep*R+Vo@qXL1JcJiC$i6iGqoq zfu3cKah)GfjjpGQV~9jJ@8Of23^Ze#Ft^>bP0l+XkKPlYoV literal 0 HcmV?d00001 diff --git a/common/glm/doc/api/open.png b/common/glm/doc/api/open.png new file mode 100644 index 0000000000000000000000000000000000000000..a4d7097583a38ed1636084bf63588f1dbc1461d7 GIT binary patch literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^oFL4>1|%O$WD@{VjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCf`#@Q5sCVBk9p!i>lBSEK+1B}!Z)N`mv#O3D+9QW**oGxJLH@={9_O!N%& zEOU(O{D5kdJY5_^G=h^QdLCR(S^U4nz_B%f)xaTukw+kefq4d(gakvRs`GIt?*0cr O)eN4lelF{r5}E)Iel0}+ literal 0 HcmV?d00001 diff --git a/common/glm/doc/api/search/all_0.html b/common/glm/doc/api/search/all_0.html new file mode 100644 index 000000000..5125b9400 --- /dev/null +++ b/common/glm/doc/api/search/all_0.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/all_0.js b/common/glm/doc/api/search/all_0.js new file mode 100644 index 000000000..6e2ac904b --- /dev/null +++ b/common/glm/doc/api/search/all_0.js @@ -0,0 +1,208 @@ +var searchData= +[ + ['abs',['abs',['../a00662.html#ga439e60a72eadecfeda2df5449c613a64',1,'glm::abs(genType x)'],['../a00662.html#ga81d3abddd0ef0c8de579bc541ecadab6',1,'glm::abs(vec< L, T, Q > const &x)']]], + ['acos',['acos',['../a00790.html#gacc9b092df8257c68f19c9053703e2563',1,'glm']]], + ['acosh',['acosh',['../a00790.html#ga858f35dc66fd2688f20c52b5f25be76a',1,'glm']]], + ['acot',['acot',['../a00718.html#gaeadfb9c9d71093f7865b2ba2ca8d104d',1,'glm']]], + ['acoth',['acoth',['../a00718.html#gafaca98a7100170db8841f446282debfa',1,'glm']]], + ['acsc',['acsc',['../a00718.html#ga1b4bed91476b9b915e76b4a30236d330',1,'glm']]], + ['acsch',['acsch',['../a00718.html#ga4b50aa5e5afc7e19ec113ab91596c576',1,'glm']]], + ['affineinverse',['affineInverse',['../a00713.html#gae0fcc5fc8783291f9702272de428fa0e',1,'glm']]], + ['aligned_5fbvec1',['aligned_bvec1',['../a00720.html#ga780a35f764020f553a9601a3fcdcd059',1,'glm']]], + ['aligned_5fbvec2',['aligned_bvec2',['../a00720.html#gae766b317c5afec852bfb3d74a3c54bc8',1,'glm']]], + ['aligned_5fbvec3',['aligned_bvec3',['../a00720.html#gae1964ba70d15915e5b710926decbb3cb',1,'glm']]], + ['aligned_5fbvec4',['aligned_bvec4',['../a00720.html#gae164a1f7879f828bc35e50b79d786b05',1,'glm']]], + ['aligned_5fdmat2',['aligned_dmat2',['../a00720.html#ga6783859382677d35fcd5dac7dcbefdbd',1,'glm']]], + ['aligned_5fdmat2x2',['aligned_dmat2x2',['../a00720.html#ga449a3ec2dde6b6bb4bb94c49a6aad388',1,'glm']]], + ['aligned_5fdmat2x3',['aligned_dmat2x3',['../a00720.html#ga53d519a7b1bfb69076b3ec206a6b3bd1',1,'glm']]], + ['aligned_5fdmat2x4',['aligned_dmat2x4',['../a00720.html#ga5ccb2baeb0ab57b818c24e0d486c59d0',1,'glm']]], + ['aligned_5fdmat3',['aligned_dmat3',['../a00720.html#ga19aa695ffdb45ce29f7ea0b5029627de',1,'glm']]], + ['aligned_5fdmat3x2',['aligned_dmat3x2',['../a00720.html#ga5f5123d834bd1170edf8c386834e112c',1,'glm']]], + ['aligned_5fdmat3x3',['aligned_dmat3x3',['../a00720.html#ga635bf3732281a2c2ca54d8f9d33d178f',1,'glm']]], + ['aligned_5fdmat3x4',['aligned_dmat3x4',['../a00720.html#gaf488c6ad88c185054595d4d5c7ba5b9d',1,'glm']]], + ['aligned_5fdmat4',['aligned_dmat4',['../a00720.html#ga001bb387ae8192fa94dbd8b23b600439',1,'glm']]], + ['aligned_5fdmat4x2',['aligned_dmat4x2',['../a00720.html#gaa409cfb737bd59b68dc683e9b03930cc',1,'glm']]], + ['aligned_5fdmat4x3',['aligned_dmat4x3',['../a00720.html#ga621e89ca1dbdcb7b5a3e7de237c44121',1,'glm']]], + ['aligned_5fdmat4x4',['aligned_dmat4x4',['../a00720.html#gac9bda778d0b7ad82f656dab99b71857a',1,'glm']]], + ['aligned_5fdvec1',['aligned_dvec1',['../a00720.html#ga4974f46ae5a19415d91316960a53617a',1,'glm']]], + ['aligned_5fdvec2',['aligned_dvec2',['../a00720.html#ga18d859f87122b2b3b2992ffe86dbebc0',1,'glm']]], + ['aligned_5fdvec3',['aligned_dvec3',['../a00720.html#gaa37869eea77d28419b2fb0ff70b69bf0',1,'glm']]], + ['aligned_5fdvec4',['aligned_dvec4',['../a00720.html#ga8a9f0a4795ccc442fa9901845026f9f5',1,'glm']]], + ['aligned_5fhighp_5fbvec1',['aligned_highp_bvec1',['../a00720.html#ga862843a45b01c35ffe4d44c47ea774ad',1,'glm']]], + ['aligned_5fhighp_5fbvec2',['aligned_highp_bvec2',['../a00720.html#ga0731b593c5e33559954c80f8687e76c6',1,'glm']]], + ['aligned_5fhighp_5fbvec3',['aligned_highp_bvec3',['../a00720.html#ga0913bdf048d0cb74af1d2512aec675bc',1,'glm']]], + ['aligned_5fhighp_5fbvec4',['aligned_highp_bvec4',['../a00720.html#ga9df1d0c425852cf63a57e533b7a83f4f',1,'glm']]], + ['aligned_5fhighp_5fdmat2',['aligned_highp_dmat2',['../a00720.html#ga3a7eeae43cb7673e14cc89bf02f7dd45',1,'glm']]], + ['aligned_5fhighp_5fdmat2x2',['aligned_highp_dmat2x2',['../a00720.html#gaef26dfe3855a91644665b55c9096a8c8',1,'glm']]], + ['aligned_5fhighp_5fdmat2x3',['aligned_highp_dmat2x3',['../a00720.html#gaa7c9d4ab7ab651cdf8001fe7843e238b',1,'glm']]], + ['aligned_5fhighp_5fdmat2x4',['aligned_highp_dmat2x4',['../a00720.html#gaa0d2b8a75f1908dcf32c27f8524bdced',1,'glm']]], + ['aligned_5fhighp_5fdmat3',['aligned_highp_dmat3',['../a00720.html#gad8f6abb2c9994850b5d5c04a5f979ed8',1,'glm']]], + ['aligned_5fhighp_5fdmat3x2',['aligned_highp_dmat3x2',['../a00720.html#gab069b2fc2ec785fc4e193cf26c022679',1,'glm']]], + ['aligned_5fhighp_5fdmat3x3',['aligned_highp_dmat3x3',['../a00720.html#ga66073b1ddef34b681741f572338ddb8e',1,'glm']]], + ['aligned_5fhighp_5fdmat3x4',['aligned_highp_dmat3x4',['../a00720.html#ga683c8ca66de323ea533a760abedd0efc',1,'glm']]], + ['aligned_5fhighp_5fdmat4',['aligned_highp_dmat4',['../a00720.html#gacaa7407ea00ffdd322ce86a57adb547e',1,'glm']]], + ['aligned_5fhighp_5fdmat4x2',['aligned_highp_dmat4x2',['../a00720.html#ga93a23ca3d42818d56e0702213c66354b',1,'glm']]], + ['aligned_5fhighp_5fdmat4x3',['aligned_highp_dmat4x3',['../a00720.html#gacab7374b560745cb1d0a306a90353f58',1,'glm']]], + ['aligned_5fhighp_5fdmat4x4',['aligned_highp_dmat4x4',['../a00720.html#ga1fbfba14368b742972d3b58a0a303682',1,'glm']]], + ['aligned_5fhighp_5fdvec1',['aligned_highp_dvec1',['../a00720.html#gaf0448b0f7ceb8273f7eda3a92205eefc',1,'glm']]], + ['aligned_5fhighp_5fdvec2',['aligned_highp_dvec2',['../a00720.html#gab173a333e6b7ce153ceba66ac4a321cf',1,'glm']]], + ['aligned_5fhighp_5fdvec3',['aligned_highp_dvec3',['../a00720.html#gae94ef61edfa047d05bc69b6065fc42ba',1,'glm']]], + ['aligned_5fhighp_5fdvec4',['aligned_highp_dvec4',['../a00720.html#ga8fad35c5677f228e261fe541f15363a4',1,'glm']]], + ['aligned_5fhighp_5fivec1',['aligned_highp_ivec1',['../a00720.html#gad63b8c5b4dc0500d54d7414ef555178f',1,'glm']]], + ['aligned_5fhighp_5fivec2',['aligned_highp_ivec2',['../a00720.html#ga41563650f36cb7f479e080de21e08418',1,'glm']]], + ['aligned_5fhighp_5fivec3',['aligned_highp_ivec3',['../a00720.html#ga6eca5170bb35eac90b4972590fd31a06',1,'glm']]], + ['aligned_5fhighp_5fivec4',['aligned_highp_ivec4',['../a00720.html#ga31bfa801e1579fdba752ec3f7a45ec91',1,'glm']]], + ['aligned_5fhighp_5fmat2',['aligned_highp_mat2',['../a00720.html#gaf9db5e8a929c317da5aa12cc53741b63',1,'glm']]], + ['aligned_5fhighp_5fmat2x2',['aligned_highp_mat2x2',['../a00720.html#gab559d943abf92bc588bcd3f4c0e4664b',1,'glm']]], + ['aligned_5fhighp_5fmat2x3',['aligned_highp_mat2x3',['../a00720.html#ga50c9af5aa3a848956d625fc64dc8488e',1,'glm']]], + ['aligned_5fhighp_5fmat2x4',['aligned_highp_mat2x4',['../a00720.html#ga0edcfdd179f8a158342eead48a4d0c2a',1,'glm']]], + ['aligned_5fhighp_5fmat3',['aligned_highp_mat3',['../a00720.html#gabab3afcc04459c7b123604ae5dc663f6',1,'glm']]], + ['aligned_5fhighp_5fmat3x2',['aligned_highp_mat3x2',['../a00720.html#ga9fc2167b47c9be9295f2d8eea7f0ca75',1,'glm']]], + ['aligned_5fhighp_5fmat3x3',['aligned_highp_mat3x3',['../a00720.html#ga2f7b8c99ba6f2d07c73a195a8143c259',1,'glm']]], + ['aligned_5fhighp_5fmat3x4',['aligned_highp_mat3x4',['../a00720.html#ga52e00afd0eb181e6738f40cf41787049',1,'glm']]], + ['aligned_5fhighp_5fmat4',['aligned_highp_mat4',['../a00720.html#ga058ae939bfdbcbb80521dd4a3b01afba',1,'glm']]], + ['aligned_5fhighp_5fmat4x2',['aligned_highp_mat4x2',['../a00720.html#ga84e1f5e0718952a079b748825c03f956',1,'glm']]], + ['aligned_5fhighp_5fmat4x3',['aligned_highp_mat4x3',['../a00720.html#gafff1684c4ff19b4a818138ccacc1e78d',1,'glm']]], + ['aligned_5fhighp_5fmat4x4',['aligned_highp_mat4x4',['../a00720.html#ga40d49648083a0498a12a4bb41ae6ece8',1,'glm']]], + ['aligned_5fhighp_5fuvec1',['aligned_highp_uvec1',['../a00720.html#ga5b80e28396c6ef7d32c6fd18df498451',1,'glm']]], + ['aligned_5fhighp_5fuvec2',['aligned_highp_uvec2',['../a00720.html#ga04db692662a4908beeaf5a5ba6e19483',1,'glm']]], + ['aligned_5fhighp_5fuvec3',['aligned_highp_uvec3',['../a00720.html#ga073fd6e8b241afade6d8afbd676b2667',1,'glm']]], + ['aligned_5fhighp_5fuvec4',['aligned_highp_uvec4',['../a00720.html#gabdd60462042859f876c17c7346c732a5',1,'glm']]], + ['aligned_5fhighp_5fvec1',['aligned_highp_vec1',['../a00720.html#ga4d0bd70d5fac49b800546d608b707513',1,'glm']]], + ['aligned_5fhighp_5fvec2',['aligned_highp_vec2',['../a00720.html#gac9f8482dde741fb6bab7248b81a45465',1,'glm']]], + ['aligned_5fhighp_5fvec3',['aligned_highp_vec3',['../a00720.html#ga65415d2d68c9cc0ca554524a8f5510b2',1,'glm']]], + ['aligned_5fhighp_5fvec4',['aligned_highp_vec4',['../a00720.html#ga7cb26d354dd69d23849c34c4fba88da9',1,'glm']]], + ['aligned_5fivec1',['aligned_ivec1',['../a00720.html#ga76298aed82a439063c3d55980c84aa0b',1,'glm']]], + ['aligned_5fivec2',['aligned_ivec2',['../a00720.html#gae4f38fd2c86cee6940986197777b3ca4',1,'glm']]], + ['aligned_5fivec3',['aligned_ivec3',['../a00720.html#ga32794322d294e5ace7fed4a61896f270',1,'glm']]], + ['aligned_5fivec4',['aligned_ivec4',['../a00720.html#ga7f79eae5927c9033d84617e49f6f34e4',1,'glm']]], + ['aligned_5flowp_5fbvec1',['aligned_lowp_bvec1',['../a00720.html#gac6036449ab1c4abf8efe1ea00fcdd1c9',1,'glm']]], + ['aligned_5flowp_5fbvec2',['aligned_lowp_bvec2',['../a00720.html#ga59fadcd3835646e419372ae8b43c5d37',1,'glm']]], + ['aligned_5flowp_5fbvec3',['aligned_lowp_bvec3',['../a00720.html#ga83aab4d191053f169c93a3e364f2e118',1,'glm']]], + ['aligned_5flowp_5fbvec4',['aligned_lowp_bvec4',['../a00720.html#gaa7a76555ee4853614e5755181a8dd54e',1,'glm']]], + ['aligned_5flowp_5fdmat2',['aligned_lowp_dmat2',['../a00720.html#ga79a90173d8faa9816dc852ce447d66ca',1,'glm']]], + ['aligned_5flowp_5fdmat2x2',['aligned_lowp_dmat2x2',['../a00720.html#ga07cb8e846666cbf56045b064fb553d2e',1,'glm']]], + ['aligned_5flowp_5fdmat2x3',['aligned_lowp_dmat2x3',['../a00720.html#ga7a4536b6e1f2ebb690f63816b5d7e48b',1,'glm']]], + ['aligned_5flowp_5fdmat2x4',['aligned_lowp_dmat2x4',['../a00720.html#gab0cf4f7c9a264941519acad286e055ea',1,'glm']]], + ['aligned_5flowp_5fdmat3',['aligned_lowp_dmat3',['../a00720.html#gac00e15efded8a57c9dec3aed0fb547e7',1,'glm']]], + ['aligned_5flowp_5fdmat3x2',['aligned_lowp_dmat3x2',['../a00720.html#gaa281a47d5d627313984d0f8df993b648',1,'glm']]], + ['aligned_5flowp_5fdmat3x3',['aligned_lowp_dmat3x3',['../a00720.html#ga7f3148a72355e39932d6855baca42ebc',1,'glm']]], + ['aligned_5flowp_5fdmat3x4',['aligned_lowp_dmat3x4',['../a00720.html#gaea3ccc5ef5b178e6e49b4fa1427605d3',1,'glm']]], + ['aligned_5flowp_5fdmat4',['aligned_lowp_dmat4',['../a00720.html#gab92c6d7d58d43dfb8147e9aedfe8351b',1,'glm']]], + ['aligned_5flowp_5fdmat4x2',['aligned_lowp_dmat4x2',['../a00720.html#gaf806dfdaffb2e9f7681b1cd2825898ce',1,'glm']]], + ['aligned_5flowp_5fdmat4x3',['aligned_lowp_dmat4x3',['../a00720.html#gab0931ac7807fa1428c7bbf249efcdf0d',1,'glm']]], + ['aligned_5flowp_5fdmat4x4',['aligned_lowp_dmat4x4',['../a00720.html#gad8220a93d2fca2dd707821b4ab6f809e',1,'glm']]], + ['aligned_5flowp_5fdvec1',['aligned_lowp_dvec1',['../a00720.html#ga7f8a2cc5a686e52b1615761f4978ca62',1,'glm']]], + ['aligned_5flowp_5fdvec2',['aligned_lowp_dvec2',['../a00720.html#ga0e37cff4a43cca866101f0a35f01db6d',1,'glm']]], + ['aligned_5flowp_5fdvec3',['aligned_lowp_dvec3',['../a00720.html#gab9e669c4efd52d3347fc6d5f6b20fd59',1,'glm']]], + ['aligned_5flowp_5fdvec4',['aligned_lowp_dvec4',['../a00720.html#ga226f5ec7a953cea559c16fe3aff9924f',1,'glm']]], + ['aligned_5flowp_5fivec1',['aligned_lowp_ivec1',['../a00720.html#ga1101d3a82b2e3f5f8828bd8f3adab3e1',1,'glm']]], + ['aligned_5flowp_5fivec2',['aligned_lowp_ivec2',['../a00720.html#ga44c4accad582cfbd7226a19b83b0cadc',1,'glm']]], + ['aligned_5flowp_5fivec3',['aligned_lowp_ivec3',['../a00720.html#ga65663f10a02e52cedcddbcfe36ddf38d',1,'glm']]], + ['aligned_5flowp_5fivec4',['aligned_lowp_ivec4',['../a00720.html#gaae92fcec8b2e0328ffbeac31cc4fc419',1,'glm']]], + ['aligned_5flowp_5fmat2',['aligned_lowp_mat2',['../a00720.html#ga17c424412207b00dba1cf587b099eea3',1,'glm']]], + ['aligned_5flowp_5fmat2x2',['aligned_lowp_mat2x2',['../a00720.html#ga0e44aeb930a47f9cbf2db15b56433b0f',1,'glm']]], + ['aligned_5flowp_5fmat2x3',['aligned_lowp_mat2x3',['../a00720.html#ga7dec6d96bc61312b1e56d137c9c74030',1,'glm']]], + ['aligned_5flowp_5fmat2x4',['aligned_lowp_mat2x4',['../a00720.html#gaa694fab1f8df5f658846573ba8ffc563',1,'glm']]], + ['aligned_5flowp_5fmat3',['aligned_lowp_mat3',['../a00720.html#ga1eb9076cc28ead5020fd3029fd0472c5',1,'glm']]], + ['aligned_5flowp_5fmat3x2',['aligned_lowp_mat3x2',['../a00720.html#ga2d6639f0bd777bae1ee0eba71cd7bfdc',1,'glm']]], + ['aligned_5flowp_5fmat3x3',['aligned_lowp_mat3x3',['../a00720.html#gaeaab04e378a90956eec8d68a99d777ed',1,'glm']]], + ['aligned_5flowp_5fmat3x4',['aligned_lowp_mat3x4',['../a00720.html#ga1f03696ab066572c6c044e63edf635a2',1,'glm']]], + ['aligned_5flowp_5fmat4',['aligned_lowp_mat4',['../a00720.html#ga25ea2f684e36aa5e978b4f2f86593824',1,'glm']]], + ['aligned_5flowp_5fmat4x2',['aligned_lowp_mat4x2',['../a00720.html#ga2cb16c3fdfb15e0719d942ee3b548bc4',1,'glm']]], + ['aligned_5flowp_5fmat4x3',['aligned_lowp_mat4x3',['../a00720.html#ga7e96981e872f17a780d9f1c22dc1f512',1,'glm']]], + ['aligned_5flowp_5fmat4x4',['aligned_lowp_mat4x4',['../a00720.html#gadae3dcfc22d28c64d0548cbfd9d08719',1,'glm']]], + ['aligned_5flowp_5fuvec1',['aligned_lowp_uvec1',['../a00720.html#gad09b93acc43c43423408d17a64f6d7ca',1,'glm']]], + ['aligned_5flowp_5fuvec2',['aligned_lowp_uvec2',['../a00720.html#ga6f94fcd28dde906fc6cad5f742b55c1a',1,'glm']]], + ['aligned_5flowp_5fuvec3',['aligned_lowp_uvec3',['../a00720.html#ga9e9f006970b1a00862e3e6e599eedd4c',1,'glm']]], + ['aligned_5flowp_5fuvec4',['aligned_lowp_uvec4',['../a00720.html#ga46b1b0b9eb8625a5d69137bd66cd13dc',1,'glm']]], + ['aligned_5flowp_5fvec1',['aligned_lowp_vec1',['../a00720.html#gab34aee3d5e121c543fea11d2c50ecc43',1,'glm']]], + ['aligned_5flowp_5fvec2',['aligned_lowp_vec2',['../a00720.html#ga53ac5d252317f1fa43c2ef921857bf13',1,'glm']]], + ['aligned_5flowp_5fvec3',['aligned_lowp_vec3',['../a00720.html#ga98f0b5cd65fce164ff1367c2a3b3aa1e',1,'glm']]], + ['aligned_5flowp_5fvec4',['aligned_lowp_vec4',['../a00720.html#ga82f7275d6102593a69ce38cdad680409',1,'glm']]], + ['aligned_5fmat2',['aligned_mat2',['../a00720.html#ga5a8a5f8c47cd7d5502dd9932f83472b9',1,'glm']]], + ['aligned_5fmat2x2',['aligned_mat2x2',['../a00720.html#gabb04f459d81d753d278b2072e2375e8e',1,'glm']]], + ['aligned_5fmat2x3',['aligned_mat2x3',['../a00720.html#ga832476bb1c59ef673db37433ff34e399',1,'glm']]], + ['aligned_5fmat2x4',['aligned_mat2x4',['../a00720.html#gadab11a7504430825b648ff7c7e36b725',1,'glm']]], + ['aligned_5fmat3',['aligned_mat3',['../a00720.html#ga43a92a24ca863e0e0f3b65834b3cf714',1,'glm']]], + ['aligned_5fmat3x2',['aligned_mat3x2',['../a00720.html#ga5c0df24ba85eafafc0eb0c90690510ed',1,'glm']]], + ['aligned_5fmat3x3',['aligned_mat3x3',['../a00720.html#gadb065dbe5c11271fef8cf2ea8608f187',1,'glm']]], + ['aligned_5fmat3x4',['aligned_mat3x4',['../a00720.html#ga88061c72c997b94c420f2b0a60d9df26',1,'glm']]], + ['aligned_5fmat4',['aligned_mat4',['../a00720.html#gab0fddcf95dd51cbcbf624ea7c40dfeb8',1,'glm']]], + ['aligned_5fmat4x2',['aligned_mat4x2',['../a00720.html#gac9a2d0fb815fd5c2bd58b869c55e32d3',1,'glm']]], + ['aligned_5fmat4x3',['aligned_mat4x3',['../a00720.html#ga452bbbfd26e244de216e4d004d50bb74',1,'glm']]], + ['aligned_5fmat4x4',['aligned_mat4x4',['../a00720.html#ga8b8fb86973a0b768c5bd802c92fac1a1',1,'glm']]], + ['aligned_5fmediump_5fbvec1',['aligned_mediump_bvec1',['../a00720.html#gadd3b8bd71a758f7fb0da8e525156f34e',1,'glm']]], + ['aligned_5fmediump_5fbvec2',['aligned_mediump_bvec2',['../a00720.html#gacb183eb5e67ec0d0ea5a016cba962810',1,'glm']]], + ['aligned_5fmediump_5fbvec3',['aligned_mediump_bvec3',['../a00720.html#gacfa4a542f1b20a5b63ad702dfb6fd587',1,'glm']]], + ['aligned_5fmediump_5fbvec4',['aligned_mediump_bvec4',['../a00720.html#ga91bc1f513bb9b0fd60281d57ded9a48c',1,'glm']]], + ['aligned_5fmediump_5fdmat2',['aligned_mediump_dmat2',['../a00720.html#ga62a2dfd668c91072b72c3109fc6cda28',1,'glm']]], + ['aligned_5fmediump_5fdmat2x2',['aligned_mediump_dmat2x2',['../a00720.html#ga9b7feec247d378dd407ba81f56ea96c8',1,'glm']]], + ['aligned_5fmediump_5fdmat2x3',['aligned_mediump_dmat2x3',['../a00720.html#gafcb189f4f93648fe7ca802ca4aca2eb8',1,'glm']]], + ['aligned_5fmediump_5fdmat2x4',['aligned_mediump_dmat2x4',['../a00720.html#ga92f8873e3bbd5ca1323c8bbe5725cc5e',1,'glm']]], + ['aligned_5fmediump_5fdmat3',['aligned_mediump_dmat3',['../a00720.html#ga6dc2832b747c00e0a0df621aba196960',1,'glm']]], + ['aligned_5fmediump_5fdmat3x2',['aligned_mediump_dmat3x2',['../a00720.html#ga5a97f0355d801de3444d42c1d5b40438',1,'glm']]], + ['aligned_5fmediump_5fdmat3x3',['aligned_mediump_dmat3x3',['../a00720.html#ga649d0acf01054b17e679cf00e150e025',1,'glm']]], + ['aligned_5fmediump_5fdmat3x4',['aligned_mediump_dmat3x4',['../a00720.html#ga45e155a4840f69b2fa4ed8047a676860',1,'glm']]], + ['aligned_5fmediump_5fdmat4',['aligned_mediump_dmat4',['../a00720.html#ga8a9376d82f0e946e25137eb55543e6ce',1,'glm']]], + ['aligned_5fmediump_5fdmat4x2',['aligned_mediump_dmat4x2',['../a00720.html#gabc25e547f4de4af62403492532cd1b6d',1,'glm']]], + ['aligned_5fmediump_5fdmat4x3',['aligned_mediump_dmat4x3',['../a00720.html#gae84f4763ecdc7457ecb7930bad12057c',1,'glm']]], + ['aligned_5fmediump_5fdmat4x4',['aligned_mediump_dmat4x4',['../a00720.html#gaa292ebaa907afdecb2d5967fb4fb1247',1,'glm']]], + ['aligned_5fmediump_5fdvec1',['aligned_mediump_dvec1',['../a00720.html#ga7180b685c581adb224406a7f831608e3',1,'glm']]], + ['aligned_5fmediump_5fdvec2',['aligned_mediump_dvec2',['../a00720.html#ga9af1eabe22f569e70d9893be72eda0f5',1,'glm']]], + ['aligned_5fmediump_5fdvec3',['aligned_mediump_dvec3',['../a00720.html#ga058e7ddab1428e47f2197bdd3a5a6953',1,'glm']]], + ['aligned_5fmediump_5fdvec4',['aligned_mediump_dvec4',['../a00720.html#gaffd747ea2aea1e69c2ecb04e68521b21',1,'glm']]], + ['aligned_5fmediump_5fivec1',['aligned_mediump_ivec1',['../a00720.html#ga20e63dd980b81af10cadbbe219316650',1,'glm']]], + ['aligned_5fmediump_5fivec2',['aligned_mediump_ivec2',['../a00720.html#gaea13d89d49daca2c796aeaa82fc2c2f2',1,'glm']]], + ['aligned_5fmediump_5fivec3',['aligned_mediump_ivec3',['../a00720.html#gabbf0f15e9c3d9868e43241ad018f82bd',1,'glm']]], + ['aligned_5fmediump_5fivec4',['aligned_mediump_ivec4',['../a00720.html#ga6099dd7878d0a78101a4250d8cd2d736',1,'glm']]], + ['aligned_5fmediump_5fmat2',['aligned_mediump_mat2',['../a00720.html#gaf6f041b212c57664d88bc6aefb7e36f3',1,'glm']]], + ['aligned_5fmediump_5fmat2x2',['aligned_mediump_mat2x2',['../a00720.html#ga04bf49316ee777d42fcfe681ee37d7be',1,'glm']]], + ['aligned_5fmediump_5fmat2x3',['aligned_mediump_mat2x3',['../a00720.html#ga26a0b61e444a51a37b9737cf4d84291b',1,'glm']]], + ['aligned_5fmediump_5fmat2x4',['aligned_mediump_mat2x4',['../a00720.html#ga163facc9ed2692ea1300ed57c5d12b17',1,'glm']]], + ['aligned_5fmediump_5fmat3',['aligned_mediump_mat3',['../a00720.html#ga3b76ba17ae5d53debeb6f7e55919a57c',1,'glm']]], + ['aligned_5fmediump_5fmat3x2',['aligned_mediump_mat3x2',['../a00720.html#ga80dee705d714300378e0847f45059097',1,'glm']]], + ['aligned_5fmediump_5fmat3x3',['aligned_mediump_mat3x3',['../a00720.html#ga721f5404caf40d68962dcc0529de71d9',1,'glm']]], + ['aligned_5fmediump_5fmat3x4',['aligned_mediump_mat3x4',['../a00720.html#ga98f4dc6722a2541a990918c074075359',1,'glm']]], + ['aligned_5fmediump_5fmat4',['aligned_mediump_mat4',['../a00720.html#gaeefee8317192174596852ce19b602720',1,'glm']]], + ['aligned_5fmediump_5fmat4x2',['aligned_mediump_mat4x2',['../a00720.html#ga46f372a006345c252a41267657cc22c0',1,'glm']]], + ['aligned_5fmediump_5fmat4x3',['aligned_mediump_mat4x3',['../a00720.html#ga0effece4545acdebdc2a5512a303110e',1,'glm']]], + ['aligned_5fmediump_5fmat4x4',['aligned_mediump_mat4x4',['../a00720.html#ga312864244cae4e8f10f478cffd0f76de',1,'glm']]], + ['aligned_5fmediump_5fuvec1',['aligned_mediump_uvec1',['../a00720.html#gacb78126ea2eb779b41c7511128ff1283',1,'glm']]], + ['aligned_5fmediump_5fuvec2',['aligned_mediump_uvec2',['../a00720.html#ga081d53e0a71443d0b68ea61c870f9adc',1,'glm']]], + ['aligned_5fmediump_5fuvec3',['aligned_mediump_uvec3',['../a00720.html#gad6fc921bdde2bdbc7e09b028e1e9b379',1,'glm']]], + ['aligned_5fmediump_5fuvec4',['aligned_mediump_uvec4',['../a00720.html#ga73ea0c1ba31580e107d21270883f51fc',1,'glm']]], + ['aligned_5fmediump_5fvec1',['aligned_mediump_vec1',['../a00720.html#ga6b797eec76fa471e300158f3453b3b2e',1,'glm']]], + ['aligned_5fmediump_5fvec2',['aligned_mediump_vec2',['../a00720.html#ga026a55ddbf2bafb1432f1157a2708616',1,'glm']]], + ['aligned_5fmediump_5fvec3',['aligned_mediump_vec3',['../a00720.html#ga3a25e494173f6a64637b08a1b50a2132',1,'glm']]], + ['aligned_5fmediump_5fvec4',['aligned_mediump_vec4',['../a00720.html#ga320d1c661cff2ef214eb50241f2928b2',1,'glm']]], + ['aligned_5fuvec1',['aligned_uvec1',['../a00720.html#ga1ff8ed402c93d280ff0597c1c5e7c548',1,'glm']]], + ['aligned_5fuvec2',['aligned_uvec2',['../a00720.html#ga074137e3be58528d67041c223d49f398',1,'glm']]], + ['aligned_5fuvec3',['aligned_uvec3',['../a00720.html#ga2a8d9c3046f89d854eb758adfa0811c0',1,'glm']]], + ['aligned_5fuvec4',['aligned_uvec4',['../a00720.html#gabf842c45eea186170c267a328e3f3b7d',1,'glm']]], + ['aligned_5fvec1',['aligned_vec1',['../a00720.html#ga05e6d4c908965d04191c2070a8d0a65e',1,'glm']]], + ['aligned_5fvec2',['aligned_vec2',['../a00720.html#ga0682462f8096a226773e20fac993cde5',1,'glm']]], + ['aligned_5fvec3',['aligned_vec3',['../a00720.html#ga7cf643b66664e0cd3c48759ae66c2bd0',1,'glm']]], + ['aligned_5fvec4',['aligned_vec4',['../a00720.html#ga85d89e83cb8137e1be1446de8c3b643a',1,'glm']]], + ['all',['all',['../a00791.html#ga87e53f50b679f5f95c5cb4780311b3dd',1,'glm']]], + ['angle',['angle',['../a00678.html#ga8aa248b31d5ade470c87304df5eb7bd8',1,'glm::angle(qua< T, Q > const &x)'],['../a00784.html#ga2e2917b4cb75ca3d043ac15ff88f14e1',1,'glm::angle(vec< L, T, Q > const &x, vec< L, T, Q > const &y)']]], + ['angleaxis',['angleAxis',['../a00678.html#ga5c0095cfcb218c75a4b79d7687950036',1,'glm']]], + ['any',['any',['../a00791.html#ga911b3f8e41459dd551ccb6d385d91061',1,'glm']]], + ['arecollinear',['areCollinear',['../a00785.html#ga13da4a787a2ff70e95d561fb19ff91b4',1,'glm']]], + ['areorthogonal',['areOrthogonal',['../a00785.html#gac7b95b3f798e3c293262b2bdaad47c57',1,'glm']]], + ['areorthonormal',['areOrthonormal',['../a00785.html#ga1b091c3d7f9ee3b0708311c001c293e3',1,'glm']]], + ['asec',['asec',['../a00718.html#ga2c5b7f962c2c9ff684e6d2de48db1f10',1,'glm']]], + ['asech',['asech',['../a00718.html#gaec7586dccfe431f850d006f3824b8ca6',1,'glm']]], + ['asin',['asin',['../a00790.html#ga0552d2df4865fa8c3d7cfc3ec2caac73',1,'glm']]], + ['asinh',['asinh',['../a00790.html#ga3ef16b501ee859fddde88e22192a5950',1,'glm']]], + ['associated_5fmin_5fmax_2ehpp',['associated_min_max.hpp',['../a00446.html',1,'']]], + ['associatedmax',['associatedMax',['../a00725.html#ga7d9c8785230c8db60f72ec8975f1ba45',1,'glm::associatedMax(T x, U a, T y, U b)'],['../a00725.html#ga5c6758bc50aa7fbe700f87123a045aad',1,'glm::associatedMax(vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b)'],['../a00725.html#ga0d169d6ce26b03248df175f39005d77f',1,'glm::associatedMax(T x, vec< L, U, Q > const &a, T y, vec< L, U, Q > const &b)'],['../a00725.html#ga4086269afabcb81dd7ded33cb3448653',1,'glm::associatedMax(vec< L, T, Q > const &x, U a, vec< L, T, Q > const &y, U b)'],['../a00725.html#gaec891e363d91abbf3a4443cf2f652209',1,'glm::associatedMax(T x, U a, T y, U b, T z, U c)'],['../a00725.html#gab84fdc35016a31e8cd0cbb8296bddf7c',1,'glm::associatedMax(vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b, vec< L, T, Q > const &z, vec< L, U, Q > const &c)'],['../a00725.html#gadd2a2002f4f2144bbc39eb2336dd2fba',1,'glm::associatedMax(T x, vec< L, U, Q > const &a, T y, vec< L, U, Q > const &b, T z, vec< L, U, Q > const &c)'],['../a00725.html#ga19f59d1141a51a3b2108a9807af78f7f',1,'glm::associatedMax(vec< L, T, Q > const &x, U a, vec< L, T, Q > const &y, U b, vec< L, T, Q > const &z, U c)'],['../a00725.html#ga3038ffcb43eaa6af75897a99a5047ccc',1,'glm::associatedMax(T x, U a, T y, U b, T z, U c, T w, U d)'],['../a00725.html#gaf5ab0c428f8d1cd9e3b45fcfbf6423a6',1,'glm::associatedMax(vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b, vec< L, T, Q > const &z, vec< L, U, Q > const &c, vec< L, T, Q > const &w, vec< L, U, Q > const &d)'],['../a00725.html#ga11477c2c4b5b0bfd1b72b29df3725a9d',1,'glm::associatedMax(T x, vec< L, U, Q > const &a, T y, vec< L, U, Q > const &b, T z, vec< L, U, Q > const &c, T w, vec< L, U, Q > const &d)'],['../a00725.html#gab9c3dd74cac899d2c625b5767ea3b3fb',1,'glm::associatedMax(vec< L, T, Q > const &x, U a, vec< L, T, Q > const &y, U b, vec< L, T, Q > const &z, U c, vec< L, T, Q > const &w, U d)']]], + ['associatedmin',['associatedMin',['../a00725.html#gacc01bd272359572fc28437ae214a02df',1,'glm::associatedMin(T x, U a, T y, U b)'],['../a00725.html#gac2f0dff90948f2e44386a5eafd941d1c',1,'glm::associatedMin(vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b)'],['../a00725.html#gacfec519c820331d023ef53a511749319',1,'glm::associatedMin(T x, const vec< L, U, Q > &a, T y, const vec< L, U, Q > &b)'],['../a00725.html#ga4757c7cab2d809124a8525d0a9deeb37',1,'glm::associatedMin(vec< L, T, Q > const &x, U a, vec< L, T, Q > const &y, U b)'],['../a00725.html#gad0aa8f86259a26d839d34a3577a923fc',1,'glm::associatedMin(T x, U a, T y, U b, T z, U c)'],['../a00725.html#ga723e5411cebc7ffbd5c81ffeec61127d',1,'glm::associatedMin(vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b, vec< L, T, Q > const &z, vec< L, U, Q > const &c)'],['../a00725.html#ga432224ebe2085eaa2b63a077ecbbbff6',1,'glm::associatedMin(T x, U a, T y, U b, T z, U c, T w, U d)'],['../a00725.html#ga66b08118bc88f0494bcacb7cdb940556',1,'glm::associatedMin(vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b, vec< L, T, Q > const &z, vec< L, U, Q > const &c, vec< L, T, Q > const &w, vec< L, U, Q > const &d)'],['../a00725.html#ga78c28fde1a7080fb7420bd88e68c6c68',1,'glm::associatedMin(T x, vec< L, U, Q > const &a, T y, vec< L, U, Q > const &b, T z, vec< L, U, Q > const &c, T w, vec< L, U, Q > const &d)'],['../a00725.html#ga2db7e351994baee78540a562d4bb6d3b',1,'glm::associatedMin(vec< L, T, Q > const &x, U a, vec< L, T, Q > const &y, U b, vec< L, T, Q > const &z, U c, vec< L, T, Q > const &w, U d)']]], + ['atan',['atan',['../a00790.html#gac61629f3a4aa14057e7a8cae002291db',1,'glm::atan(vec< L, T, Q > const &y, vec< L, T, Q > const &x)'],['../a00790.html#ga5229f087eaccbc466f1c609ce3107b95',1,'glm::atan(vec< L, T, Q > const &y_over_x)']]], + ['atan2',['atan2',['../a00732.html#gac63011205bf6d0be82589dc56dd26708',1,'glm::atan2(T x, T y)'],['../a00732.html#ga83bc41bd6f89113ee8006576b12bfc50',1,'glm::atan2(const vec< 2, T, Q > &x, const vec< 2, T, Q > &y)'],['../a00732.html#gac39314f5087e7e51e592897cabbc1927',1,'glm::atan2(const vec< 3, T, Q > &x, const vec< 3, T, Q > &y)'],['../a00732.html#gaba86c28da7bf5bdac64fecf7d56e8ff3',1,'glm::atan2(const vec< 4, T, Q > &x, const vec< 4, T, Q > &y)']]], + ['atanh',['atanh',['../a00790.html#gabc925650e618357d07da255531658b87',1,'glm']]], + ['axis',['axis',['../a00678.html#ga764254f10248b505e936e5309a88c23d',1,'glm']]], + ['axisangle',['axisAngle',['../a00754.html#gafefe32ce5a90a135287ba34fac3623bc',1,'glm']]], + ['axisanglematrix',['axisAngleMatrix',['../a00754.html#ga3a788e2f5223397df5c426413ecc2f6b',1,'glm']]], + ['angle_20and_20trigonometry_20functions',['Angle and Trigonometry Functions',['../a00790.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/all_1.html b/common/glm/doc/api/search/all_1.html new file mode 100644 index 000000000..b8ff87111 --- /dev/null +++ b/common/glm/doc/api/search/all_1.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/all_1.js b/common/glm/doc/api/search/all_1.js new file mode 100644 index 000000000..8d4af3ff1 --- /dev/null +++ b/common/glm/doc/api/search/all_1.js @@ -0,0 +1,41 @@ +var searchData= +[ + ['backeasein',['backEaseIn',['../a00735.html#ga93cddcdb6347a44d5927cc2bf2570816',1,'glm::backEaseIn(genType const &a)'],['../a00735.html#ga33777c9dd98f61d9472f96aafdf2bd36',1,'glm::backEaseIn(genType const &a, genType const &o)']]], + ['backeaseinout',['backEaseInOut',['../a00735.html#gace6d24722a2f6722b56398206eb810bb',1,'glm::backEaseInOut(genType const &a)'],['../a00735.html#ga68a7b760f2afdfab298d5cd6d7611fb1',1,'glm::backEaseInOut(genType const &a, genType const &o)']]], + ['backeaseout',['backEaseOut',['../a00735.html#gabf25069fa906413c858fd46903d520b9',1,'glm::backEaseOut(genType const &a)'],['../a00735.html#ga640c1ac6fe9d277a197da69daf60ee4f',1,'glm::backEaseOut(genType const &a, genType const &o)']]], + ['ballrand',['ballRand',['../a00717.html#ga7c53b7797f3147af68a11c767679fa3f',1,'glm']]], + ['bit_2ehpp',['bit.hpp',['../a00449.html',1,'']]], + ['bitcount',['bitCount',['../a00787.html#ga44abfe3379e11cbd29425a843420d0d6',1,'glm::bitCount(genType v)'],['../a00787.html#gaac7b15e40bdea8d9aa4c4cb34049f7b5',1,'glm::bitCount(vec< L, T, Q > const &v)']]], + ['bitfield_2ehpp',['bitfield.hpp',['../a00389.html',1,'']]], + ['bitfielddeinterleave',['bitfieldDeinterleave',['../a00706.html#ga091d934233a2e121df91b8c7230357c8',1,'glm::bitfieldDeinterleave(glm::uint16 x)'],['../a00706.html#ga7d1cc24dfbcdd932c3a2abbb76235f98',1,'glm::bitfieldDeinterleave(glm::uint32 x)'],['../a00706.html#ga8dbb8c87092f33bd815dd8a840be5d60',1,'glm::bitfieldDeinterleave(glm::uint64 x)']]], + ['bitfieldextract',['bitfieldExtract',['../a00787.html#ga346b25ab11e793e91a4a69c8aa6819f2',1,'glm']]], + ['bitfieldfillone',['bitfieldFillOne',['../a00706.html#ga46f9295abe3b5c7658f5b13c7f819f0a',1,'glm::bitfieldFillOne(genIUType Value, int FirstBit, int BitCount)'],['../a00706.html#ga3e96dd1f0a4bc892f063251ed118c0c1',1,'glm::bitfieldFillOne(vec< L, T, Q > const &Value, int FirstBit, int BitCount)']]], + ['bitfieldfillzero',['bitfieldFillZero',['../a00706.html#ga697b86998b7d74ee0a69d8e9f8819fee',1,'glm::bitfieldFillZero(genIUType Value, int FirstBit, int BitCount)'],['../a00706.html#ga0d16c9acef4be79ea9b47c082a0cf7c2',1,'glm::bitfieldFillZero(vec< L, T, Q > const &Value, int FirstBit, int BitCount)']]], + ['bitfieldinsert',['bitfieldInsert',['../a00787.html#ga2e82992340d421fadb61a473df699b20',1,'glm']]], + ['bitfieldinterleave',['bitfieldInterleave',['../a00706.html#ga24cad0069f9a0450abd80b3e89501adf',1,'glm::bitfieldInterleave(int8 x, int8 y)'],['../a00706.html#ga9a4976a529aec2cee56525e1165da484',1,'glm::bitfieldInterleave(uint8 x, uint8 y)'],['../a00706.html#ga4a76bbca39c40153f3203d0a1926e142',1,'glm::bitfieldInterleave(u8vec2 const &v)'],['../a00706.html#gac51c33a394593f0631fa3aa5bb778809',1,'glm::bitfieldInterleave(int16 x, int16 y)'],['../a00706.html#ga94f3646a5667f4be56f8dcf3310e963f',1,'glm::bitfieldInterleave(uint16 x, uint16 y)'],['../a00706.html#ga406c4ee56af4ca37a73f449f154eca3e',1,'glm::bitfieldInterleave(u16vec2 const &v)'],['../a00706.html#gaebb756a24a0784e3d6fba8bd011ab77a',1,'glm::bitfieldInterleave(int32 x, int32 y)'],['../a00706.html#ga2f1e2b3fe699e7d897ae38b2115ddcbd',1,'glm::bitfieldInterleave(uint32 x, uint32 y)'],['../a00706.html#ga8cb17574d60abd6ade84bc57c10e8f78',1,'glm::bitfieldInterleave(u32vec2 const &v)'],['../a00706.html#ga8fdb724dccd4a07d57efc01147102137',1,'glm::bitfieldInterleave(int8 x, int8 y, int8 z)'],['../a00706.html#ga9fc2a0dd5dcf8b00e113f272a5feca93',1,'glm::bitfieldInterleave(uint8 x, uint8 y, uint8 z)'],['../a00706.html#gaa901c36a842fa5d126ea650549f17b24',1,'glm::bitfieldInterleave(int16 x, int16 y, int16 z)'],['../a00706.html#ga3afd6d38881fe3948c53d4214d2197fd',1,'glm::bitfieldInterleave(uint16 x, uint16 y, uint16 z)'],['../a00706.html#gad2075d96a6640121edaa98ea534102ca',1,'glm::bitfieldInterleave(int32 x, int32 y, int32 z)'],['../a00706.html#gab19fbc739fc0cf7247978602c36f7da8',1,'glm::bitfieldInterleave(uint32 x, uint32 y, uint32 z)'],['../a00706.html#ga8a44ae22f5c953b296c42d067dccbe6d',1,'glm::bitfieldInterleave(int8 x, int8 y, int8 z, int8 w)'],['../a00706.html#ga14bb274d54a3c26f4919dd7ed0dd0c36',1,'glm::bitfieldInterleave(uint8 x, uint8 y, uint8 z, uint8 w)'],['../a00706.html#ga180a63161e1319fbd5a53c84d0429c7a',1,'glm::bitfieldInterleave(int16 x, int16 y, int16 z, int16 w)'],['../a00706.html#gafca8768671a14c8016facccb66a89f26',1,'glm::bitfieldInterleave(uint16 x, uint16 y, uint16 z, uint16 w)']]], + ['bitfieldreverse',['bitfieldReverse',['../a00787.html#ga750a1d92464489b7711dee67aa3441b6',1,'glm']]], + ['bitfieldrotateleft',['bitfieldRotateLeft',['../a00706.html#ga2eb49678a344ce1495bdb5586d9896b9',1,'glm::bitfieldRotateLeft(genIUType In, int Shift)'],['../a00706.html#gae186317091b1a39214ebf79008d44a1e',1,'glm::bitfieldRotateLeft(vec< L, T, Q > const &In, int Shift)']]], + ['bitfieldrotateright',['bitfieldRotateRight',['../a00706.html#ga1c33d075c5fb8bd8dbfd5092bfc851ca',1,'glm::bitfieldRotateRight(genIUType In, int Shift)'],['../a00706.html#ga590488e1fc00a6cfe5d3bcaf93fbfe88',1,'glm::bitfieldRotateRight(vec< L, T, Q > const &In, int Shift)']]], + ['bool1',['bool1',['../a00732.html#gaddcd7aa2e30e61af5b38660613d3979e',1,'glm']]], + ['bool1x1',['bool1x1',['../a00732.html#ga7f895c936f0c29c8729afbbf22806090',1,'glm']]], + ['bool2',['bool2',['../a00732.html#gaa09ab65ec9c3c54305ff502e2b1fe6d9',1,'glm']]], + ['bool2x2',['bool2x2',['../a00732.html#gadb3703955e513632f98ba12fe051ba3e',1,'glm']]], + ['bool2x3',['bool2x3',['../a00732.html#ga9ae6ee155d0f90cb1ae5b6c4546738a0',1,'glm']]], + ['bool2x4',['bool2x4',['../a00732.html#ga4d7fa65be8e8e4ad6d920b45c44e471f',1,'glm']]], + ['bool3',['bool3',['../a00732.html#ga99629f818737f342204071ef8296b2ed',1,'glm']]], + ['bool3x2',['bool3x2',['../a00732.html#gac7d7311f7e0fa8b6163d96dab033a755',1,'glm']]], + ['bool3x3',['bool3x3',['../a00732.html#ga6c97b99aac3e302053ffb58aace9033c',1,'glm']]], + ['bool3x4',['bool3x4',['../a00732.html#gae7d6b679463d37d6c527d478fb470fdf',1,'glm']]], + ['bool4',['bool4',['../a00732.html#ga13c3200b82708f73faac6d7f09ec91a3',1,'glm']]], + ['bool4x2',['bool4x2',['../a00732.html#ga9ed830f52408b2f83c085063a3eaf1d0',1,'glm']]], + ['bool4x3',['bool4x3',['../a00732.html#gad0f5dc7f22c2065b1b06d57f1c0658fe',1,'glm']]], + ['bool4x4',['bool4x4',['../a00732.html#ga7d2a7d13986602ae2896bfaa394235d4',1,'glm']]], + ['bounceeasein',['bounceEaseIn',['../a00735.html#gaac30767f2e430b0c3fc859a4d59c7b5b',1,'glm']]], + ['bounceeaseinout',['bounceEaseInOut',['../a00735.html#gadf9f38eff1e5f4c2fa5b629a25ae413e',1,'glm']]], + ['bounceeaseout',['bounceEaseOut',['../a00735.html#ga94007005ff0dcfa0749ebfa2aec540b2',1,'glm']]], + ['bvec1',['bvec1',['../a00685.html#ga067af382616d93f8e850baae5154cdcc',1,'glm']]], + ['bvec2',['bvec2',['../a00699.html#ga0b6123e03653cc1bbe366fc55238a934',1,'glm']]], + ['bvec3',['bvec3',['../a00699.html#ga197151b72dfaf289daf98b361760ffe7',1,'glm']]], + ['bvec4',['bvec4',['../a00699.html#ga9f7b9712373ff4342d9114619b55f5e3',1,'glm']]], + ['byte',['byte',['../a00771.html#ga3005cb0d839d546c616becfa6602c607',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/all_10.html b/common/glm/doc/api/search/all_10.html new file mode 100644 index 000000000..50bc449e1 --- /dev/null +++ b/common/glm/doc/api/search/all_10.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/all_10.js b/common/glm/doc/api/search/all_10.js new file mode 100644 index 000000000..b47019a4d --- /dev/null +++ b/common/glm/doc/api/search/all_10.js @@ -0,0 +1,49 @@ +var searchData= +[ + ['stable_20extensions',['Stable extensions',['../a00703.html',1,'']]], + ['saturate',['saturate',['../a00732.html#ga0fd09e616d122bc2ed9726682ffd44b7',1,'glm::saturate(T x)'],['../a00732.html#gaee97b8001c794a78a44f5d59f62a8aba',1,'glm::saturate(const vec< 2, T, Q > &x)'],['../a00732.html#ga39bfe3a421286ee31680d45c31ccc161',1,'glm::saturate(const vec< 3, T, Q > &x)'],['../a00732.html#ga356f8c3a7e7d6376d3d4b0a026407183',1,'glm::saturate(const vec< 4, T, Q > &x)']]], + ['saturation',['saturation',['../a00729.html#ga01a97152b44e1550edcac60bd849e884',1,'glm::saturation(T const s)'],['../a00729.html#ga2156cea600e90148ece5bc96fd6db43a',1,'glm::saturation(T const s, vec< 3, T, Q > const &color)'],['../a00729.html#gaba0eacee0736dae860e9371cc1ae4785',1,'glm::saturation(T const s, vec< 4, T, Q > const &color)']]], + ['scalar_5fcommon_2ehpp',['scalar_common.hpp',['../a00233.html',1,'']]], + ['scalar_5fconstants_2ehpp',['scalar_constants.hpp',['../a00236.html',1,'']]], + ['scalar_5ffloat_5fsized_2ehpp',['scalar_float_sized.hpp',['../a00239.html',1,'']]], + ['scalar_5fint_5fsized_2ehpp',['scalar_int_sized.hpp',['../a00242.html',1,'']]], + ['scalar_5fmultiplication_2ehpp',['scalar_multiplication.hpp',['../a00581.html',1,'']]], + ['scalar_5fuint_5fsized_2ehpp',['scalar_uint_sized.hpp',['../a00248.html',1,'']]], + ['scale',['scale',['../a00668.html#ga05051adbee603fb3c5095d8cf5cc229b',1,'glm::scale(mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &v)'],['../a00758.html#gadb47d2ad2bd984b213e8ff7d9cd8154e',1,'glm::scale(mat< 3, 3, T, Q > const &m, vec< 2, T, Q > const &v)'],['../a00779.html#gafbeefee8fec884d566e4ada0049174d7',1,'glm::scale(vec< 3, T, Q > const &v)']]], + ['scalebias',['scaleBias',['../a00780.html#gabf249498b236e62c983d90d30d63c99c',1,'glm::scaleBias(T scale, T bias)'],['../a00780.html#gae2bdd91a76759fecfbaef97e3020aa8e',1,'glm::scaleBias(mat< 4, 4, T, Q > const &m, T scale, T bias)']]], + ['sec',['sec',['../a00718.html#gae4bcbebee670c5ea155f0777b3acbd84',1,'glm']]], + ['sech',['sech',['../a00718.html#ga9a5cfd1e7170104a7b33863b1b75e5ae',1,'glm']]], + ['shearx',['shearX',['../a00758.html#ga2a118ece5db1e2022112b954846012af',1,'glm']]], + ['shearx2d',['shearX2D',['../a00780.html#gabf714b8a358181572b32a45555f71948',1,'glm']]], + ['shearx3d',['shearX3D',['../a00780.html#ga73e867c6cd4d700fe2054437e56106c4',1,'glm']]], + ['sheary',['shearY',['../a00758.html#ga717f1833369c1ac4a40e4ac015af885e',1,'glm']]], + ['sheary2d',['shearY2D',['../a00780.html#gac7998d0763d9181550c77e8af09a182c',1,'glm']]], + ['sheary3d',['shearY3D',['../a00780.html#gade5bb65ffcb513973db1a1314fb5cfac',1,'glm']]], + ['shearz3d',['shearZ3D',['../a00780.html#ga6591e0a3a9d2c9c0b6577bb4dace0255',1,'glm']]], + ['shortmix',['shortMix',['../a00769.html#gadc576cc957adc2a568cdcbc3799175bc',1,'glm']]], + ['sign',['sign',['../a00662.html#ga1e2e5cfff800056540e32f6c9b604b28',1,'glm::sign(vec< L, T, Q > const &x)'],['../a00750.html#ga04ef803a24f3d4f8c67dbccb33b0fce0',1,'glm::sign(vec< L, T, Q > const &x, vec< L, T, Q > const &base)']]], + ['simplex',['simplex',['../a00715.html#ga8122468c69015ff397349a7dcc638b27',1,'glm']]], + ['sin',['sin',['../a00790.html#ga29747fd108cb7292ae5a284f69691a69',1,'glm']]], + ['sineeasein',['sineEaseIn',['../a00735.html#gafb338ac6f6b2bcafee50e3dca5201dbf',1,'glm']]], + ['sineeaseinout',['sineEaseInOut',['../a00735.html#gaa46e3d5fbf7a15caa28eff9ef192d7c7',1,'glm']]], + ['sineeaseout',['sineEaseOut',['../a00735.html#gab3e454f883afc1606ef91363881bf5a3',1,'glm']]], + ['sinh',['sinh',['../a00790.html#gac7c39ff21809e281552b4dbe46f4a39d',1,'glm']]], + ['sint',['sint',['../a00747.html#gada7e83fdfe943aba4f1d5bf80cb66f40',1,'glm']]], + ['size1',['size1',['../a00776.html#gaeb877ac8f9a3703961736c1c5072cf68',1,'glm']]], + ['size1_5ft',['size1_t',['../a00776.html#gaaf6accc57f5aa50447ba7310ce3f0d6f',1,'glm']]], + ['size2',['size2',['../a00776.html#ga1bfe8c4975ff282bce41be2bacd524fe',1,'glm']]], + ['size2_5ft',['size2_t',['../a00776.html#ga5976c25657d4e2b5f73f39364c3845d6',1,'glm']]], + ['size3',['size3',['../a00776.html#gae1c72956d0359b0db332c6c8774d3b04',1,'glm']]], + ['size3_5ft',['size3_t',['../a00776.html#gaf2654983c60d641fd3808e65a8dfad8d',1,'glm']]], + ['size4',['size4',['../a00776.html#ga3a19dde617beaf8ce3cfc2ac5064e9aa',1,'glm']]], + ['size4_5ft',['size4_t',['../a00776.html#gaa423efcea63675a2df26990dbcb58656',1,'glm']]], + ['slerp',['slerp',['../a00669.html#gae7fc3c945be366b9942b842f55da428a',1,'glm::slerp(qua< T, Q > const &x, qua< T, Q > const &y, T a)'],['../a00773.html#ga8b11b18ce824174ea1a5a69ea14e2cee',1,'glm::slerp(vec< 3, T, Q > const &x, vec< 3, T, Q > const &y, T const &a)']]], + ['smoothstep',['smoothstep',['../a00662.html#ga562edf7eca082cc5b7a0aaf180436daf',1,'glm']]], + ['sphericalrand',['sphericalRand',['../a00717.html#ga22f90fcaccdf001c516ca90f6428e138',1,'glm']]], + ['spline_2ehpp',['spline.hpp',['../a00584.html',1,'']]], + ['sqrt',['sqrt',['../a00664.html#gaa83e5f1648b7ccdf33b87c07c76cb77c',1,'glm::sqrt(vec< L, T, Q > const &v)'],['../a00677.html#ga64b7b255ed7bcba616fe6b44470b022e',1,'glm::sqrt(qua< T, Q > const &q)'],['../a00747.html#ga7ce36693a75879ccd9bb10167cfa722d',1,'glm::sqrt(int x)'],['../a00747.html#ga1975d318978d6dacf78b6444fa5ed7bc',1,'glm::sqrt(uint x)']]], + ['squad',['squad',['../a00769.html#ga0b9bf3459e132ad8a18fe970669e3e35',1,'glm']]], + ['std_5fbased_5ftype_2ehpp',['std_based_type.hpp',['../a00587.html',1,'']]], + ['step',['step',['../a00662.html#ga015a1261ff23e12650211aa872863cce',1,'glm::step(genType edge, genType x)'],['../a00662.html#ga8f9a911a48ef244b51654eaefc81c551',1,'glm::step(T edge, vec< L, T, Q > const &x)'],['../a00662.html#gaf4a5fc81619c7d3e8b22f53d4a098c7f',1,'glm::step(vec< L, T, Q > const &edge, vec< L, T, Q > const &x)']]], + ['string_5fcast_2ehpp',['string_cast.hpp',['../a00590.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/all_11.html b/common/glm/doc/api/search/all_11.html new file mode 100644 index 000000000..b35c8bf0e --- /dev/null +++ b/common/glm/doc/api/search/all_11.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/all_11.js b/common/glm/doc/api/search/all_11.js new file mode 100644 index 000000000..cfd6f8433 --- /dev/null +++ b/common/glm/doc/api/search/all_11.js @@ -0,0 +1,40 @@ +var searchData= +[ + ['tan',['tan',['../a00790.html#ga293a34cfb9f0115cc606b4a97c84f11f',1,'glm']]], + ['tanh',['tanh',['../a00790.html#gaa1bccbfdcbe40ed2ffcddc2aa8bfd0f1',1,'glm']]], + ['texture_2ehpp',['texture.hpp',['../a00593.html',1,'']]], + ['third',['third',['../a00708.html#ga3077c6311010a214b69ddc8214ec13b5',1,'glm']]], + ['three_5fover_5ftwo_5fpi',['three_over_two_pi',['../a00708.html#gae94950df74b0ce382b1fc1d978ef7394',1,'glm']]], + ['to_5fstring',['to_string',['../a00777.html#ga8f0dced1fd45e67e2d77e80ab93c7af5',1,'glm']]], + ['tomat3',['toMat3',['../a00769.html#gaab0afabb894b28a983fb8ec610409d56',1,'glm']]], + ['tomat4',['toMat4',['../a00769.html#gadfa2c77094e8cc9adad321d938855ffb',1,'glm']]], + ['toquat',['toQuat',['../a00769.html#ga798de5d186499c9a9231cd92c8afaef1',1,'glm::toQuat(mat< 3, 3, T, Q > const &x)'],['../a00769.html#ga5eb36f51e1638e710451eba194dbc011',1,'glm::toQuat(mat< 4, 4, T, Q > const &x)']]], + ['transform_2ehpp',['transform.hpp',['../a00596.html',1,'']]], + ['transform2_2ehpp',['transform2.hpp',['../a00599.html',1,'']]], + ['translate',['translate',['../a00668.html#ga1a4ecc4ad82652b8fb14dcb087879284',1,'glm::translate(mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &v)'],['../a00758.html#gaf4573ae47c80938aa9053ef6a33755ab',1,'glm::translate(mat< 3, 3, T, Q > const &m, vec< 2, T, Q > const &v)'],['../a00779.html#ga309a30e652e58c396e2c3d4db3ee7658',1,'glm::translate(vec< 3, T, Q > const &v)']]], + ['transpose',['transpose',['../a00788.html#gae679d841da8ce9dbcc6c2d454f15bc35',1,'glm']]], + ['trianglenormal',['triangleNormal',['../a00761.html#gaff1cb5496925dfa7962df457772a7f35',1,'glm']]], + ['trigonometric_2ehpp',['trigonometric.hpp',['../a00647.html',1,'']]], + ['trunc',['trunc',['../a00662.html#gaf9375e3e06173271d49e6ffa3a334259',1,'glm']]], + ['tweakedinfiniteperspective',['tweakedInfinitePerspective',['../a00665.html#gaaeacc04a2a6f4b18c5899d37e7bb3ef9',1,'glm::tweakedInfinitePerspective(T fovy, T aspect, T near)'],['../a00665.html#gaf5b3c85ff6737030a1d2214474ffa7a8',1,'glm::tweakedInfinitePerspective(T fovy, T aspect, T near, T ep)']]], + ['two_5fover_5fpi',['two_over_pi',['../a00708.html#ga74eadc8a211253079683219a3ea0462a',1,'glm']]], + ['two_5fover_5froot_5fpi',['two_over_root_pi',['../a00708.html#ga5827301817640843cf02026a8d493894',1,'glm']]], + ['two_5fpi',['two_pi',['../a00708.html#gaa5276a4617566abcfe49286f40e3a256',1,'glm']]], + ['two_5fthirds',['two_thirds',['../a00708.html#ga9b4d2f4322edcf63a6737b92a29dd1f5',1,'glm']]], + ['type_5fmat2x2_2ehpp',['type_mat2x2.hpp',['../a00038.html',1,'']]], + ['type_5fmat2x3_2ehpp',['type_mat2x3.hpp',['../a00041.html',1,'']]], + ['type_5fmat2x4_2ehpp',['type_mat2x4.hpp',['../a00044.html',1,'']]], + ['type_5fmat3x2_2ehpp',['type_mat3x2.hpp',['../a00047.html',1,'']]], + ['type_5fmat3x3_2ehpp',['type_mat3x3.hpp',['../a00050.html',1,'']]], + ['type_5fmat3x4_2ehpp',['type_mat3x4.hpp',['../a00053.html',1,'']]], + ['type_5fmat4x2_2ehpp',['type_mat4x2.hpp',['../a00056.html',1,'']]], + ['type_5fmat4x3_2ehpp',['type_mat4x3.hpp',['../a00059.html',1,'']]], + ['type_5fmat4x4_2ehpp',['type_mat4x4.hpp',['../a00062.html',1,'']]], + ['type_5fprecision_2ehpp',['type_precision.hpp',['../a00434.html',1,'']]], + ['type_5fptr_2ehpp',['type_ptr.hpp',['../a00437.html',1,'']]], + ['type_5ftrait_2ehpp',['type_trait.hpp',['../a00602.html',1,'']]], + ['type_5fvec1_2ehpp',['type_vec1.hpp',['../a00068.html',1,'']]], + ['type_5fvec2_2ehpp',['type_vec2.hpp',['../a00071.html',1,'']]], + ['type_5fvec3_2ehpp',['type_vec3.hpp',['../a00074.html',1,'']]], + ['type_5fvec4_2ehpp',['type_vec4.hpp',['../a00077.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/all_12.html b/common/glm/doc/api/search/all_12.html new file mode 100644 index 000000000..fd265245b --- /dev/null +++ b/common/glm/doc/api/search/all_12.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/all_12.js b/common/glm/doc/api/search/all_12.js new file mode 100644 index 000000000..5d3f32e08 --- /dev/null +++ b/common/glm/doc/api/search/all_12.js @@ -0,0 +1,97 @@ +var searchData= +[ + ['u16',['u16',['../a00721.html#gaa2d7acc0adb536fab71fe261232a40ff',1,'glm']]], + ['u16vec1',['u16vec1',['../a00721.html#ga08c05ba8ffb19f5d14ab584e1e9e9ee5',1,'glm::u16vec1()'],['../a00763.html#ga52cc069a92e126c3a8dcde93424d2ef0',1,'glm::gtx::u16vec1()']]], + ['u16vec2',['u16vec2',['../a00721.html#ga2a78447eb9d66a114b193f4a25899c16',1,'glm']]], + ['u16vec3',['u16vec3',['../a00721.html#ga1c522ca821c27b862fe51cf4024b064b',1,'glm']]], + ['u16vec4',['u16vec4',['../a00721.html#ga529496d75775fb656a07993ea9af2450',1,'glm']]], + ['u32',['u32',['../a00721.html#ga8165913e068444f7842302d40ba897b9',1,'glm']]], + ['u32vec1',['u32vec1',['../a00721.html#gae627372cfd5f20dd87db490387b71195',1,'glm::u32vec1()'],['../a00763.html#ga9bbc1e14aea65cba5e2dcfef6a67d9f3',1,'glm::gtx::u32vec1()']]], + ['u32vec2',['u32vec2',['../a00721.html#ga2a266e46ee218d0c680f12b35c500cc0',1,'glm']]], + ['u32vec3',['u32vec3',['../a00721.html#gae267358ff2a41d156d97f5762630235a',1,'glm']]], + ['u32vec4',['u32vec4',['../a00721.html#ga31cef34e4cd04840c54741ff2f7005f0',1,'glm']]], + ['u64',['u64',['../a00721.html#gaf3f312156984c365e9f65620354da70b',1,'glm']]], + ['u64vec1',['u64vec1',['../a00721.html#gaf09f3ca4b671a4a4f84505eb4cc865fd',1,'glm::u64vec1()'],['../a00763.html#ga818de170e2584ab037130f2881925974',1,'glm::gtx::u64vec1()']]], + ['u64vec2',['u64vec2',['../a00721.html#gaef3824ed4fe435a019c5b9dddf53fec5',1,'glm']]], + ['u64vec3',['u64vec3',['../a00721.html#ga489b89ba93d4f7b3934df78debc52276',1,'glm']]], + ['u64vec4',['u64vec4',['../a00721.html#ga3945dd6515d4498cb603e65ff867ab03',1,'glm']]], + ['u8',['u8',['../a00721.html#gaecc7082561fc9028b844b6cf3d305d36',1,'glm']]], + ['u8vec1',['u8vec1',['../a00721.html#ga29b349e037f0b24320b4548a143daee2',1,'glm::u8vec1()'],['../a00763.html#ga5853fe457f4c8a6bc09343d0e9833980',1,'glm::gtx::u8vec1()']]], + ['u8vec2',['u8vec2',['../a00721.html#ga518b8d948a6b4ddb72f84d5c3b7b6611',1,'glm']]], + ['u8vec3',['u8vec3',['../a00721.html#ga7c5706f6bbe5282e5598acf7e7b377e2',1,'glm']]], + ['u8vec4',['u8vec4',['../a00721.html#ga20779a61de2fd526a17f12fe53ec46b1',1,'glm']]], + ['uaddcarry',['uaddCarry',['../a00787.html#gaedcec48743632dff6786bcc492074b1b',1,'glm']]], + ['uint16',['uint16',['../a00684.html#ga05f6b0ae8f6a6e135b0e290c25fe0e4e',1,'glm']]], + ['uint16_5ft',['uint16_t',['../a00721.html#ga91f91f411080c37730856ff5887f5bcf',1,'glm']]], + ['uint32',['uint32',['../a00684.html#ga1134b580f8da4de94ca6b1de4d37975e',1,'glm']]], + ['uint32_5ft',['uint32_t',['../a00721.html#ga2171d9dc1fefb1c82e2817f45b622eac',1,'glm']]], + ['uint64',['uint64',['../a00684.html#gab630f76c26b50298187f7889104d4b9c',1,'glm']]], + ['uint64_5ft',['uint64_t',['../a00721.html#ga3999d3e7ff22025c16ddb601e14dfdee',1,'glm']]], + ['uint8',['uint8',['../a00684.html#gadde6aaee8457bee49c2a92621fe22b79',1,'glm']]], + ['uint8_5ft',['uint8_t',['../a00721.html#ga28d97808322d3c92186e4a0c067d7e8e',1,'glm']]], + ['uintbitstofloat',['uintBitsToFloat',['../a00662.html#gab2bae0d15dcdca6093f88f76b3975d97',1,'glm::uintBitsToFloat(uint const &v)'],['../a00662.html#ga97f46b5f7b42fe44482e13356eb394ae',1,'glm::uintBitsToFloat(vec< L, uint, Q > const &v)']]], + ['ulp_2ehpp',['ulp.hpp',['../a00440.html',1,'']]], + ['umat2',['umat2',['../a00712.html#ga4cae85566f900debf930c41944b64691',1,'glm']]], + ['umat2x2',['umat2x2',['../a00712.html#gabf8acdd33ce8951051edbca5200898aa',1,'glm']]], + ['umat2x3',['umat2x3',['../a00712.html#ga1870da7578d5022b973a83155d386ab3',1,'glm']]], + ['umat2x4',['umat2x4',['../a00712.html#ga57936a3998e992370e59a223e0ee4fd4',1,'glm']]], + ['umat3',['umat3',['../a00712.html#ga5085e3ff02abbac5e537eb7b89ab63b6',1,'glm']]], + ['umat3x2',['umat3x2',['../a00712.html#ga9cd7fa637a4a6788337f45231fad9e1a',1,'glm']]], + ['umat3x3',['umat3x3',['../a00712.html#ga1f2cfcf3357db0cdf31fcb15e3c6bafb',1,'glm']]], + ['umat3x4',['umat3x4',['../a00712.html#gae7c78ff3fc4309605ab0fa186c8d48ba',1,'glm']]], + ['umat4',['umat4',['../a00712.html#ga38bc7bb6494e344185df596deeb4544c',1,'glm']]], + ['umat4x2',['umat4x2',['../a00712.html#ga70fa2d05896aa83cbc8c07672a429b53',1,'glm']]], + ['umat4x3',['umat4x3',['../a00712.html#ga87581417945411f75cb31dd6ca1dba98',1,'glm']]], + ['umat4x4',['umat4x4',['../a00712.html#gaf72e6d399c42985db6872c50f53d7eb8',1,'glm']]], + ['umulextended',['umulExtended',['../a00787.html#ga732e2fb56db57ea541c7e5c92b7121be',1,'glm']]], + ['unpackdouble2x32',['unpackDouble2x32',['../a00789.html#ga5f4296dc5f12f0aa67ac05b8bb322483',1,'glm']]], + ['unpackf2x11_5f1x10',['unpackF2x11_1x10',['../a00716.html#ga2b1fd1e854705b1345e98409e0a25e50',1,'glm']]], + ['unpackf3x9_5fe1x5',['unpackF3x9_E1x5',['../a00716.html#gab9e60ebe3ad3eeced6a9ec6eb876d74e',1,'glm']]], + ['unpackhalf',['unpackHalf',['../a00716.html#ga30d6b2f1806315bcd6047131f547d33b',1,'glm']]], + ['unpackhalf1x16',['unpackHalf1x16',['../a00716.html#gac37dedaba24b00adb4ec6e8f92c19dbf',1,'glm']]], + ['unpackhalf2x16',['unpackHalf2x16',['../a00789.html#gaf59b52e6b28da9335322c4ae19b5d745',1,'glm']]], + ['unpackhalf4x16',['unpackHalf4x16',['../a00716.html#ga57dfc41b2eb20b0ac00efae7d9c49dcd',1,'glm']]], + ['unpacki3x10_5f1x2',['unpackI3x10_1x2',['../a00716.html#ga9a05330e5490be0908d3b117d82aff56',1,'glm']]], + ['unpackint2x16',['unpackInt2x16',['../a00716.html#gaccde055882918a3175de82f4ca8b7d8e',1,'glm']]], + ['unpackint2x32',['unpackInt2x32',['../a00716.html#gab297c0bfd38433524791eb0584d8f08d',1,'glm']]], + ['unpackint2x8',['unpackInt2x8',['../a00716.html#gab0c59f1e259fca9e68adb2207a6b665e',1,'glm']]], + ['unpackint4x16',['unpackInt4x16',['../a00716.html#ga52c154a9b232b62c22517a700cc0c78c',1,'glm']]], + ['unpackint4x8',['unpackInt4x8',['../a00716.html#ga1cd8d2038cdd33a860801aa155a26221',1,'glm']]], + ['unpackrgbm',['unpackRGBM',['../a00716.html#ga5c1ec97894b05ea21a05aea4f0204a02',1,'glm']]], + ['unpacksnorm',['unpackSnorm',['../a00716.html#ga6d49b31e5c3f9df8e1f99ab62b999482',1,'glm']]], + ['unpacksnorm1x16',['unpackSnorm1x16',['../a00716.html#ga96dd15002370627a443c835ab03a766c',1,'glm']]], + ['unpacksnorm1x8',['unpackSnorm1x8',['../a00716.html#ga4851ff86678aa1c7ace9d67846894285',1,'glm']]], + ['unpacksnorm2x16',['unpackSnorm2x16',['../a00789.html#gacd8f8971a3fe28418be0d0fa1f786b38',1,'glm']]], + ['unpacksnorm2x8',['unpackSnorm2x8',['../a00716.html#ga8b128e89be449fc71336968a66bf6e1a',1,'glm']]], + ['unpacksnorm3x10_5f1x2',['unpackSnorm3x10_1x2',['../a00716.html#ga7a4fbf79be9740e3c57737bc2af05e5b',1,'glm']]], + ['unpacksnorm4x16',['unpackSnorm4x16',['../a00716.html#gaaddf9c353528fe896106f7181219c7f4',1,'glm']]], + ['unpacksnorm4x8',['unpackSnorm4x8',['../a00789.html#ga2db488646d48b7c43d3218954523fe82',1,'glm']]], + ['unpacku3x10_5f1x2',['unpackU3x10_1x2',['../a00716.html#ga48df3042a7d079767f5891a1bfd8a60a',1,'glm']]], + ['unpackuint2x16',['unpackUint2x16',['../a00716.html#ga035bbbeab7ec2b28c0529757395b645b',1,'glm']]], + ['unpackuint2x32',['unpackUint2x32',['../a00716.html#gaf942ff11b65e83eb5f77e68329ebc6ab',1,'glm']]], + ['unpackuint2x8',['unpackUint2x8',['../a00716.html#gaa7600a6c71784b637a410869d2a5adcd',1,'glm']]], + ['unpackuint4x16',['unpackUint4x16',['../a00716.html#gab173834ef14cfc23a96a959f3ff4b8dc',1,'glm']]], + ['unpackuint4x8',['unpackUint4x8',['../a00716.html#gaf6dc0e4341810a641c7ed08f10e335d1',1,'glm']]], + ['unpackunorm',['unpackUnorm',['../a00716.html#ga3e6ac9178b59f0b1b2f7599f2183eb7f',1,'glm']]], + ['unpackunorm1x16',['unpackUnorm1x16',['../a00716.html#ga83d34160a5cb7bcb5339823210fc7501',1,'glm']]], + ['unpackunorm1x5_5f1x6_5f1x5',['unpackUnorm1x5_1x6_1x5',['../a00716.html#gab3bc08ecfc0f3339be93fb2b3b56d88a',1,'glm']]], + ['unpackunorm1x8',['unpackUnorm1x8',['../a00716.html#ga1319207e30874fb4931a9ee913983ee1',1,'glm']]], + ['unpackunorm2x16',['unpackUnorm2x16',['../a00789.html#ga1f66188e5d65afeb9ffba1ad971e4007',1,'glm']]], + ['unpackunorm2x3_5f1x2',['unpackUnorm2x3_1x2',['../a00716.html#ga6abd5a9014df3b5ce4059008d2491260',1,'glm']]], + ['unpackunorm2x4',['unpackUnorm2x4',['../a00716.html#ga2e50476132fe5f27f08e273d9c70d85b',1,'glm']]], + ['unpackunorm2x8',['unpackUnorm2x8',['../a00716.html#ga637cbe3913dd95c6e7b4c99c61bd611f',1,'glm']]], + ['unpackunorm3x10_5f1x2',['unpackUnorm3x10_1x2',['../a00716.html#ga5156d3060355fe332865da2c7f78815f',1,'glm']]], + ['unpackunorm3x5_5f1x1',['unpackUnorm3x5_1x1',['../a00716.html#ga5ff95ff5bc16f396432ab67243dbae4d',1,'glm']]], + ['unpackunorm4x16',['unpackUnorm4x16',['../a00716.html#ga2ae149c5d2473ac1e5f347bb654a242d',1,'glm']]], + ['unpackunorm4x4',['unpackUnorm4x4',['../a00716.html#gac58ee89d0e224bb6df5e8bbb18843a2d',1,'glm']]], + ['unpackunorm4x8',['unpackUnorm4x8',['../a00789.html#ga7f903259150b67e9466f5f8edffcd197',1,'glm']]], + ['unproject',['unProject',['../a00666.html#ga36641e5d60f994e01c3d8f56b10263d2',1,'glm']]], + ['unprojectno',['unProjectNO',['../a00666.html#gae089ba9fc150ff69c252a20e508857b5',1,'glm']]], + ['unprojectzo',['unProjectZO',['../a00666.html#gade5136413ce530f8e606124d570fba32',1,'glm']]], + ['uround',['uround',['../a00710.html#ga6715b9d573972a0f7763d30d45bcaec4',1,'glm']]], + ['usubborrow',['usubBorrow',['../a00787.html#gae3316ba1229ad9b9f09480833321b053',1,'glm']]], + ['uvec1',['uvec1',['../a00695.html#gac3bdd96183d23876c58a1424585fefe7',1,'glm']]], + ['uvec2',['uvec2',['../a00699.html#ga2f6d9ec3ae14813ade37d6aee3715fdb',1,'glm']]], + ['uvec3',['uvec3',['../a00699.html#ga3d3e55874babd4bf93baa7bbc83ae418',1,'glm']]], + ['uvec4',['uvec4',['../a00699.html#gaa57e96bb337867329d5f43bcc27c1095',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/all_13.html b/common/glm/doc/api/search/all_13.html new file mode 100644 index 000000000..04f66e2fe --- /dev/null +++ b/common/glm/doc/api/search/all_13.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/all_13.js b/common/glm/doc/api/search/all_13.js new file mode 100644 index 000000000..7227e3d0a --- /dev/null +++ b/common/glm/doc/api/search/all_13.js @@ -0,0 +1,60 @@ +var searchData= +[ + ['vector_20relational_20functions',['Vector Relational Functions',['../a00791.html',1,'']]], + ['vector_20types',['Vector types',['../a00699.html',1,'']]], + ['vector_20types_20with_20precision_20qualifiers',['Vector types with precision qualifiers',['../a00700.html',1,'']]], + ['value_5fptr',['value_ptr',['../a00722.html#ga1c64669e1ba1160ad9386e43dc57569a',1,'glm']]], + ['vec1',['vec1',['../a00690.html#gadfc071d934d8dae7955a1d530a3cf656',1,'glm']]], + ['vec1_2ehpp',['vec1.hpp',['../a00443.html',1,'']]], + ['vec2',['vec2',['../a00699.html#gabe65c061834f61b4f7cb6037b19006a4',1,'glm']]], + ['vec2_2ehpp',['vec2.hpp',['../a00650.html',1,'']]], + ['vec3',['vec3',['../a00699.html#ga9c3019b13faf179e4ad3626ea66df334',1,'glm']]], + ['vec3_2ehpp',['vec3.hpp',['../a00653.html',1,'']]], + ['vec4',['vec4',['../a00699.html#gac215a35481a6597d1bf622a382e9d6e2',1,'glm']]], + ['vec4_2ehpp',['vec4.hpp',['../a00656.html',1,'']]], + ['vec_5fswizzle_2ehpp',['vec_swizzle.hpp',['../a00605.html',1,'']]], + ['vector_5fangle_2ehpp',['vector_angle.hpp',['../a00608.html',1,'']]], + ['vector_5fbool1_2ehpp',['vector_bool1.hpp',['../a00251.html',1,'']]], + ['vector_5fbool1_5fprecision_2ehpp',['vector_bool1_precision.hpp',['../a00254.html',1,'']]], + ['vector_5fbool2_2ehpp',['vector_bool2.hpp',['../a00257.html',1,'']]], + ['vector_5fbool2_5fprecision_2ehpp',['vector_bool2_precision.hpp',['../a00260.html',1,'']]], + ['vector_5fbool3_2ehpp',['vector_bool3.hpp',['../a00263.html',1,'']]], + ['vector_5fbool3_5fprecision_2ehpp',['vector_bool3_precision.hpp',['../a00266.html',1,'']]], + ['vector_5fbool4_2ehpp',['vector_bool4.hpp',['../a00269.html',1,'']]], + ['vector_5fbool4_5fprecision_2ehpp',['vector_bool4_precision.hpp',['../a00272.html',1,'']]], + ['vector_5fcommon_2ehpp',['vector_common.hpp',['../a00275.html',1,'']]], + ['vector_5fdouble1_2ehpp',['vector_double1.hpp',['../a00278.html',1,'']]], + ['vector_5fdouble1_5fprecision_2ehpp',['vector_double1_precision.hpp',['../a00281.html',1,'']]], + ['vector_5fdouble2_2ehpp',['vector_double2.hpp',['../a00284.html',1,'']]], + ['vector_5fdouble2_5fprecision_2ehpp',['vector_double2_precision.hpp',['../a00287.html',1,'']]], + ['vector_5fdouble3_2ehpp',['vector_double3.hpp',['../a00290.html',1,'']]], + ['vector_5fdouble3_5fprecision_2ehpp',['vector_double3_precision.hpp',['../a00293.html',1,'']]], + ['vector_5fdouble4_2ehpp',['vector_double4.hpp',['../a00296.html',1,'']]], + ['vector_5fdouble4_5fprecision_2ehpp',['vector_double4_precision.hpp',['../a00299.html',1,'']]], + ['vector_5ffloat1_2ehpp',['vector_float1.hpp',['../a00302.html',1,'']]], + ['vector_5ffloat1_5fprecision_2ehpp',['vector_float1_precision.hpp',['../a00305.html',1,'']]], + ['vector_5ffloat2_2ehpp',['vector_float2.hpp',['../a00308.html',1,'']]], + ['vector_5ffloat2_5fprecision_2ehpp',['vector_float2_precision.hpp',['../a00311.html',1,'']]], + ['vector_5ffloat3_2ehpp',['vector_float3.hpp',['../a00314.html',1,'']]], + ['vector_5ffloat3_5fprecision_2ehpp',['vector_float3_precision.hpp',['../a00317.html',1,'']]], + ['vector_5ffloat4_2ehpp',['vector_float4.hpp',['../a00320.html',1,'']]], + ['vector_5ffloat4_5fprecision_2ehpp',['vector_float4_precision.hpp',['../a00323.html',1,'']]], + ['vector_5fint1_2ehpp',['vector_int1.hpp',['../a00326.html',1,'']]], + ['vector_5fint1_5fprecision_2ehpp',['vector_int1_precision.hpp',['../a00329.html',1,'']]], + ['vector_5fint2_2ehpp',['vector_int2.hpp',['../a00332.html',1,'']]], + ['vector_5fint2_5fprecision_2ehpp',['vector_int2_precision.hpp',['../a00335.html',1,'']]], + ['vector_5fint3_2ehpp',['vector_int3.hpp',['../a00338.html',1,'']]], + ['vector_5fint3_5fprecision_2ehpp',['vector_int3_precision.hpp',['../a00341.html',1,'']]], + ['vector_5fint4_2ehpp',['vector_int4.hpp',['../a00344.html',1,'']]], + ['vector_5fint4_5fprecision_2ehpp',['vector_int4_precision.hpp',['../a00347.html',1,'']]], + ['vector_5fquery_2ehpp',['vector_query.hpp',['../a00611.html',1,'']]], + ['vector_5frelational_2ehpp',['vector_relational.hpp',['../a00350.html',1,'']]], + ['vector_5fuint1_2ehpp',['vector_uint1.hpp',['../a00353.html',1,'']]], + ['vector_5fuint1_5fprecision_2ehpp',['vector_uint1_precision.hpp',['../a00356.html',1,'']]], + ['vector_5fuint2_2ehpp',['vector_uint2.hpp',['../a00359.html',1,'']]], + ['vector_5fuint2_5fprecision_2ehpp',['vector_uint2_precision.hpp',['../a00362.html',1,'']]], + ['vector_5fuint3_2ehpp',['vector_uint3.hpp',['../a00365.html',1,'']]], + ['vector_5fuint3_5fprecision_2ehpp',['vector_uint3_precision.hpp',['../a00368.html',1,'']]], + ['vector_5fuint4_2ehpp',['vector_uint4.hpp',['../a00371.html',1,'']]], + ['vector_5fuint4_5fprecision_2ehpp',['vector_uint4_precision.hpp',['../a00374.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/all_14.html b/common/glm/doc/api/search/all_14.html new file mode 100644 index 000000000..285f34bd2 --- /dev/null +++ b/common/glm/doc/api/search/all_14.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/all_14.js b/common/glm/doc/api/search/all_14.js new file mode 100644 index 000000000..be996817a --- /dev/null +++ b/common/glm/doc/api/search/all_14.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['word',['word',['../a00771.html#ga16e9fea0ef1e6c4ef472d3d1731c49a5',1,'glm']]], + ['wrap_2ehpp',['wrap.hpp',['../a00614.html',1,'']]], + ['wrapangle',['wrapAngle',['../a00742.html#ga069527c6dbd64f53435b8ebc4878b473',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/all_15.html b/common/glm/doc/api/search/all_15.html new file mode 100644 index 000000000..0ed74e012 --- /dev/null +++ b/common/glm/doc/api/search/all_15.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/all_15.js b/common/glm/doc/api/search/all_15.js new file mode 100644 index 000000000..b97977c02 --- /dev/null +++ b/common/glm/doc/api/search/all_15.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['yaw',['yaw',['../a00663.html#ga8da38cdfdc452dafa660c2f46506bad5',1,'glm']]], + ['yawpitchroll',['yawPitchRoll',['../a00736.html#gae6aa26ccb020d281b449619e419a609e',1,'glm']]], + ['ycocg2rgb',['YCoCg2rgb',['../a00730.html#ga163596b804c7241810b2534a99eb1343',1,'glm']]], + ['ycocgr2rgb',['YCoCgR2rgb',['../a00730.html#gaf8d30574c8576838097d8e20c295384a',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/all_16.html b/common/glm/doc/api/search/all_16.html new file mode 100644 index 000000000..696f02520 --- /dev/null +++ b/common/glm/doc/api/search/all_16.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/all_16.js b/common/glm/doc/api/search/all_16.js new file mode 100644 index 000000000..8aae6ecd4 --- /dev/null +++ b/common/glm/doc/api/search/all_16.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['zero',['zero',['../a00708.html#ga788f5a421fc0f40a1296ebc094cbaa8a',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/all_2.html b/common/glm/doc/api/search/all_2.html new file mode 100644 index 000000000..2f17735ef --- /dev/null +++ b/common/glm/doc/api/search/all_2.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/all_2.js b/common/glm/doc/api/search/all_2.js new file mode 100644 index 000000000..dcb4613df --- /dev/null +++ b/common/glm/doc/api/search/all_2.js @@ -0,0 +1,51 @@ +var searchData= +[ + ['catmullrom',['catmullRom',['../a00775.html#ga8119c04f8210fd0d292757565cd6918d',1,'glm']]], + ['ceil',['ceil',['../a00662.html#gafb9d2a645a23aca12d4d6de0104b7657',1,'glm']]], + ['ceilmultiple',['ceilMultiple',['../a00719.html#ga1d89ac88582aaf4d5dfa5feb4a376fd4',1,'glm::ceilMultiple(genType v, genType Multiple)'],['../a00719.html#gab77fdcc13f8e92d2e0b1b7d7aeab8e9d',1,'glm::ceilMultiple(vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)']]], + ['ceilpoweroftwo',['ceilPowerOfTwo',['../a00719.html#ga5c3ef36ae32aa4271f1544f92bd578b6',1,'glm::ceilPowerOfTwo(genIUType v)'],['../a00719.html#gab53d4a97c0d3e297be5f693cdfdfe5d2',1,'glm::ceilPowerOfTwo(vec< L, T, Q > const &v)']]], + ['circulareasein',['circularEaseIn',['../a00735.html#ga34508d4b204a321ec26d6086aa047997',1,'glm']]], + ['circulareaseinout',['circularEaseInOut',['../a00735.html#ga0c1027637a5b02d4bb3612aa12599d69',1,'glm']]], + ['circulareaseout',['circularEaseOut',['../a00735.html#ga26fefde9ced9b72745fe21f1a3fe8da7',1,'glm']]], + ['circularrand',['circularRand',['../a00717.html#ga9dd05c36025088fae25b97c869e88517',1,'glm']]], + ['clamp',['clamp',['../a00662.html#ga7cd77683da6361e297c56443fc70806d',1,'glm::clamp(genType x, genType minVal, genType maxVal)'],['../a00662.html#gafba2e0674deb5953878d89483cd6323d',1,'glm::clamp(vec< L, T, Q > const &x, T minVal, T maxVal)'],['../a00662.html#gaa0f2f12e9108b09e22a3f0b2008a0b5d',1,'glm::clamp(vec< L, T, Q > const &x, vec< L, T, Q > const &minVal, vec< L, T, Q > const &maxVal)'],['../a00786.html#ga6c0cc6bd1d67ea1008d2592e998bad33',1,'glm::clamp(genType const &Texcoord)']]], + ['closebounded',['closeBounded',['../a00731.html#gab7d89c14c48ad01f720fb5daf8813161',1,'glm']]], + ['closest_5fpoint_2ehpp',['closest_point.hpp',['../a00452.html',1,'']]], + ['closestpointonline',['closestPointOnLine',['../a00727.html#ga36529c278ef716986151d58d151d697d',1,'glm::closestPointOnLine(vec< 3, T, Q > const &point, vec< 3, T, Q > const &a, vec< 3, T, Q > const &b)'],['../a00727.html#ga55bcbcc5fc06cb7ff7bc7a6e0e155eb0',1,'glm::closestPointOnLine(vec< 2, T, Q > const &point, vec< 2, T, Q > const &a, vec< 2, T, Q > const &b)']]], + ['colmajor2',['colMajor2',['../a00755.html#gaaff72f11286e59a4a88ed21a347f284c',1,'glm::colMajor2(vec< 2, T, Q > const &v1, vec< 2, T, Q > const &v2)'],['../a00755.html#gafc25fd44196c92b1397b127aec1281ab',1,'glm::colMajor2(mat< 2, 2, T, Q > const &m)']]], + ['colmajor3',['colMajor3',['../a00755.html#ga1e25b72b085087740c92f5c70f3b051f',1,'glm::colMajor3(vec< 3, T, Q > const &v1, vec< 3, T, Q > const &v2, vec< 3, T, Q > const &v3)'],['../a00755.html#ga86bd0656e787bb7f217607572590af27',1,'glm::colMajor3(mat< 3, 3, T, Q > const &m)']]], + ['colmajor4',['colMajor4',['../a00755.html#gaf4aa6c7e17bfce41a6c13bf6469fab05',1,'glm::colMajor4(vec< 4, T, Q > const &v1, vec< 4, T, Q > const &v2, vec< 4, T, Q > const &v3, vec< 4, T, Q > const &v4)'],['../a00755.html#gaf3f9511c366c20ba2e4a64c9e4cec2b3',1,'glm::colMajor4(mat< 4, 4, T, Q > const &m)']]], + ['color_5fencoding_2ehpp',['color_encoding.hpp',['../a00455.html',1,'']]], + ['color_5fspace_5fycocg_2ehpp',['color_space_YCoCg.hpp',['../a00458.html',1,'']]], + ['column',['column',['../a00711.html#ga96022eb0d3fae39d89fc7a954e59b374',1,'glm::column(genType const &m, length_t index)'],['../a00711.html#ga9e757377523890e8b80c5843dbe4dd15',1,'glm::column(genType const &m, length_t index, typename genType::col_type const &x)']]], + ['common_2ehpp',['common.hpp',['../a00002.html',1,'']]], + ['compadd',['compAdd',['../a00733.html#gaf71833350e15e74d31cbf8a3e7f27051',1,'glm']]], + ['compatibility_2ehpp',['compatibility.hpp',['../a00461.html',1,'']]], + ['compmax',['compMax',['../a00733.html#gabfa4bb19298c8c73d4217ba759c496b6',1,'glm']]], + ['compmin',['compMin',['../a00733.html#gab5d0832b5c7bb01b8d7395973bfb1425',1,'glm']]], + ['compmul',['compMul',['../a00733.html#gae8ab88024197202c9479d33bdc5a8a5d',1,'glm']]], + ['compnormalize',['compNormalize',['../a00733.html#ga8f2b81ada8515875e58cb1667b6b9908',1,'glm']]], + ['component_5fwise_2ehpp',['component_wise.hpp',['../a00464.html',1,'']]], + ['compscale',['compScale',['../a00733.html#ga80abc2980d65d675f435d178c36880eb',1,'glm']]], + ['conjugate',['conjugate',['../a00669.html#ga10d7bda73201788ac2ab28cd8d0d409b',1,'glm']]], + ['constants_2ehpp',['constants.hpp',['../a00395.html',1,'']]], + ['convertd65xyztod50xyz',['convertD65XYZToD50XYZ',['../a00728.html#gad12f4f65022b2c80e33fcba2ced0dc48',1,'glm']]], + ['convertd65xyztolinearsrgb',['convertD65XYZToLinearSRGB',['../a00728.html#ga5265386fc3ac29e4c580d37ed470859c',1,'glm']]], + ['convertlinearsrgbtod50xyz',['convertLinearSRGBToD50XYZ',['../a00728.html#ga1522ba180e3d83d554a734056da031f9',1,'glm']]], + ['convertlinearsrgbtod65xyz',['convertLinearSRGBToD65XYZ',['../a00728.html#gaf9e130d9d4ccf51cc99317de7449f369',1,'glm']]], + ['convertlineartosrgb',['convertLinearToSRGB',['../a00707.html#ga42239e7b3da900f7ef37cec7e2476579',1,'glm::convertLinearToSRGB(vec< L, T, Q > const &ColorLinear)'],['../a00707.html#gaace0a21167d13d26116c283009af57f6',1,'glm::convertLinearToSRGB(vec< L, T, Q > const &ColorLinear, T Gamma)']]], + ['convertsrgbtolinear',['convertSRGBToLinear',['../a00707.html#ga16c798b7a226b2c3079dedc55083d187',1,'glm::convertSRGBToLinear(vec< L, T, Q > const &ColorSRGB)'],['../a00707.html#gad1b91f27a9726c9cb403f9fee6e2e200',1,'glm::convertSRGBToLinear(vec< L, T, Q > const &ColorSRGB, T Gamma)']]], + ['core_20features',['Core features',['../a00698.html',1,'']]], + ['common_20functions',['Common functions',['../a00662.html',1,'']]], + ['cos',['cos',['../a00790.html#ga6a41efc740e3b3c937447d3a6284130e',1,'glm']]], + ['cosh',['cosh',['../a00790.html#ga4e260e372742c5f517aca196cf1e62b3',1,'glm']]], + ['cot',['cot',['../a00718.html#ga3a7b517a95bbd3ad74da3aea87a66314',1,'glm']]], + ['coth',['coth',['../a00718.html#ga6b8b770eb7198e4dea59d52e6db81442',1,'glm']]], + ['cross',['cross',['../a00675.html#ga755beaa929c75751dee646cccba37e4c',1,'glm::cross(qua< T, Q > const &q1, qua< T, Q > const &q2)'],['../a00697.html#gaeeec0794212fe84fc9d261de067c9587',1,'glm::cross(vec< 3, T, Q > const &x, vec< 3, T, Q > const &y)'],['../a00739.html#gac36e72b934ea6a9dd313772d7e78fa93',1,'glm::cross(vec< 2, T, Q > const &v, vec< 2, T, Q > const &u)'],['../a00769.html#ga2f32f970411c44cdd38bb98960198385',1,'glm::cross(qua< T, Q > const &q, vec< 3, T, Q > const &v)'],['../a00769.html#ga9f5f77255756e5668dfee7f0d07ed021',1,'glm::cross(vec< 3, T, Q > const &v, qua< T, Q > const &q)']]], + ['csc',['csc',['../a00718.html#ga59dd0005b6474eea48af743b4f14ebbb',1,'glm']]], + ['csch',['csch',['../a00718.html#ga6d95843ff3ca6472ab399ba171d290a0',1,'glm']]], + ['cubic',['cubic',['../a00775.html#ga6b867eb52e2fc933d2e0bf26aabc9a70',1,'glm']]], + ['cubiceasein',['cubicEaseIn',['../a00735.html#gaff52f746102b94864d105563ba8895ae',1,'glm']]], + ['cubiceaseinout',['cubicEaseInOut',['../a00735.html#ga55134072b42d75452189321d4a2ad91c',1,'glm']]], + ['cubiceaseout',['cubicEaseOut',['../a00735.html#ga40d746385d8bcc5973f5bc6a2340ca91',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/all_3.html b/common/glm/doc/api/search/all_3.html new file mode 100644 index 000000000..a3e6f7dbb --- /dev/null +++ b/common/glm/doc/api/search/all_3.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/all_3.js b/common/glm/doc/api/search/all_3.js new file mode 100644 index 000000000..35dc1e06d --- /dev/null +++ b/common/glm/doc/api/search/all_3.js @@ -0,0 +1,59 @@ +var searchData= +[ + ['ddualquat',['ddualquat',['../a00734.html#ga3d71f98d84ba59dfe4e369fde4714cd6',1,'glm']]], + ['decompose',['decompose',['../a00752.html#gac0e342656ba09a9bc97c57182ba73124',1,'glm']]], + ['degrees',['degrees',['../a00790.html#ga8faec9e303538065911ba8b3caf7326b',1,'glm']]], + ['derivedeuleranglex',['derivedEulerAngleX',['../a00736.html#ga994b8186b3b80d91cf90bc403164692f',1,'glm']]], + ['derivedeulerangley',['derivedEulerAngleY',['../a00736.html#ga0a4c56ecce7abcb69508ebe6313e9d10',1,'glm']]], + ['derivedeuleranglez',['derivedEulerAngleZ',['../a00736.html#gae8b397348201c42667be983ba3f344df',1,'glm']]], + ['determinant',['determinant',['../a00788.html#gad7928795124768e058f99dce270f5c8d',1,'glm']]], + ['diagonal2x2',['diagonal2x2',['../a00756.html#ga58a32a2beeb2478dae2a721368cdd4ac',1,'glm']]], + ['diagonal2x3',['diagonal2x3',['../a00756.html#gab69f900206a430e2875a5a073851e175',1,'glm']]], + ['diagonal2x4',['diagonal2x4',['../a00756.html#ga30b4dbfed60a919d66acc8a63bcdc549',1,'glm']]], + ['diagonal3x2',['diagonal3x2',['../a00756.html#ga832c805d5130d28ad76236958d15b47d',1,'glm']]], + ['diagonal3x3',['diagonal3x3',['../a00756.html#ga5487ff9cdbc8e04d594adef1bcb16ee0',1,'glm']]], + ['diagonal3x4',['diagonal3x4',['../a00756.html#gad7551139cff0c4208d27f0ad3437833e',1,'glm']]], + ['diagonal4x2',['diagonal4x2',['../a00756.html#gacb8969e6543ba775c6638161a37ac330',1,'glm']]], + ['diagonal4x3',['diagonal4x3',['../a00756.html#gae235def5049d6740f0028433f5e13f90',1,'glm']]], + ['diagonal4x4',['diagonal4x4',['../a00756.html#ga0b4cd8dea436791b072356231ee8578f',1,'glm']]], + ['diskrand',['diskRand',['../a00717.html#gaa0b18071f3f97dbf8bcf6f53c6fe5f73',1,'glm']]], + ['distance',['distance',['../a00697.html#gaa68de6c53e20dfb2dac2d20197562e3f',1,'glm']]], + ['distance2',['distance2',['../a00760.html#ga85660f1b79f66c09c7b5a6f80e68c89f',1,'glm']]], + ['dmat2',['dmat2',['../a00701.html#ga21dbd1f987775d7cc7607c139531c7e6',1,'glm']]], + ['dmat2x2',['dmat2x2',['../a00701.html#ga66b6a9af787e468a46dfe24189e87f9b',1,'glm']]], + ['dmat2x3',['dmat2x3',['../a00701.html#ga92cd388753d48e20de69ea2dbedf826a',1,'glm']]], + ['dmat2x4',['dmat2x4',['../a00701.html#gaef2198807e937072803ae0ae45e1965e',1,'glm']]], + ['dmat3',['dmat3',['../a00701.html#ga6f40aa56265b4b0ccad41b86802efe33',1,'glm']]], + ['dmat3x2',['dmat3x2',['../a00701.html#ga001e3e0638fbf8719788fc64c5b8cf39',1,'glm']]], + ['dmat3x3',['dmat3x3',['../a00701.html#ga970cb3306be25a5ca5db5a9456831228',1,'glm']]], + ['dmat3x4',['dmat3x4',['../a00701.html#ga0412a634d183587e6188e9b11869f8f4',1,'glm']]], + ['dmat4',['dmat4',['../a00701.html#ga0f34486bb7fec8e5a5b3830b6a6cbeca',1,'glm']]], + ['dmat4x2',['dmat4x2',['../a00701.html#ga9bc0b3ab8b6ba2cb6782e179ad7ad156',1,'glm']]], + ['dmat4x3',['dmat4x3',['../a00701.html#gacd18864049f8c83799babe7e596ca05b',1,'glm']]], + ['dmat4x4',['dmat4x4',['../a00701.html#gad5a6484b983b74f9d801cab8bc4e6a10',1,'glm']]], + ['dot',['dot',['../a00675.html#ga84865a56acb8fbd7bc4f5c0b928e3cfc',1,'glm::dot(qua< T, Q > const &x, qua< T, Q > const &y)'],['../a00697.html#gaad6c5d9d39bdc0bf43baf1b22e147a0a',1,'glm::dot(vec< L, T, Q > const &x, vec< L, T, Q > const &y)']]], + ['double1',['double1',['../a00732.html#ga20b861a9b6e2a300323671c57a02525b',1,'glm']]], + ['double1x1',['double1x1',['../a00732.html#ga45f16a4dd0db1f199afaed9fd12fe9a8',1,'glm']]], + ['double2',['double2',['../a00732.html#ga31b729b04facccda73f07ed26958b3c2',1,'glm']]], + ['double2x2',['double2x2',['../a00732.html#gae57d0201096834d25f2b91b319e7cdbd',1,'glm']]], + ['double2x3',['double2x3',['../a00732.html#ga3655bc324008553ca61f39952d0b2d08',1,'glm']]], + ['double2x4',['double2x4',['../a00732.html#gacd33061fc64a7b2dcfd7322c49d9557a',1,'glm']]], + ['double3',['double3',['../a00732.html#ga3d8b9028a1053a44a98902cd1c389472',1,'glm']]], + ['double3x2',['double3x2',['../a00732.html#ga5ec08fc39c9d783dfcc488be240fe975',1,'glm']]], + ['double3x3',['double3x3',['../a00732.html#ga4bad5bb20c6ddaecfe4006c93841d180',1,'glm']]], + ['double3x4',['double3x4',['../a00732.html#ga2ef022e453d663d70aec414b2a80f756',1,'glm']]], + ['double4',['double4',['../a00732.html#gaf92f58af24f35617518aeb3d4f63fda6',1,'glm']]], + ['double4x2',['double4x2',['../a00732.html#gabca29ccceea53669618b751aae0ba83d',1,'glm']]], + ['double4x3',['double4x3',['../a00732.html#gafad66a02ccd360c86d6ab9ff9cfbc19c',1,'glm']]], + ['double4x4',['double4x4',['../a00732.html#gaab541bed2e788e4537852a2492860806',1,'glm']]], + ['dquat',['dquat',['../a00670.html#ga1181459aa5d640a3ea43861b118f3f0b',1,'glm']]], + ['dual_5fquat_5fidentity',['dual_quat_identity',['../a00734.html#ga0b35c0e30df8a875dbaa751e0bd800e0',1,'glm']]], + ['dual_5fquaternion_2ehpp',['dual_quaternion.hpp',['../a00467.html',1,'']]], + ['dualquat',['dualquat',['../a00734.html#gae93abee0c979902fbec6a7bee0f6fae1',1,'glm']]], + ['dualquat_5fcast',['dualquat_cast',['../a00734.html#gac4064ff813759740201765350eac4236',1,'glm::dualquat_cast(mat< 2, 4, T, Q > const &x)'],['../a00734.html#ga91025ebdca0f4ea54da08497b00e8c84',1,'glm::dualquat_cast(mat< 3, 4, T, Q > const &x)']]], + ['dvec1',['dvec1',['../a00688.html#ga6221af17edc2d4477a4583d2cd53e569',1,'glm']]], + ['dvec2',['dvec2',['../a00699.html#ga8b09c71aaac7da7867ae58377fe219a8',1,'glm']]], + ['dvec3',['dvec3',['../a00699.html#ga5b83ae3d0fdec519c038e4d2cf967cf0',1,'glm']]], + ['dvec4',['dvec4',['../a00699.html#ga57debab5d98ce618f7b2a97fe26eb3ac',1,'glm']]], + ['dword',['dword',['../a00771.html#ga86e46fff9f80ae33893d8d697f2ca98a',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/all_4.html b/common/glm/doc/api/search/all_4.html new file mode 100644 index 000000000..6452295dc --- /dev/null +++ b/common/glm/doc/api/search/all_4.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/all_4.js b/common/glm/doc/api/search/all_4.js new file mode 100644 index 000000000..7d66a4e7a --- /dev/null +++ b/common/glm/doc/api/search/all_4.js @@ -0,0 +1,68 @@ +var searchData= +[ + ['exponential_20functions',['Exponential functions',['../a00664.html',1,'']]], + ['e',['e',['../a00708.html#ga4b7956eb6e2fbedfc7cf2e46e85c5139',1,'glm']]], + ['easing_2ehpp',['easing.hpp',['../a00470.html',1,'']]], + ['elasticeasein',['elasticEaseIn',['../a00735.html#ga230918eccee4e113d10ec5b8cdc58695',1,'glm']]], + ['elasticeaseinout',['elasticEaseInOut',['../a00735.html#ga2db4ac8959559b11b4029e54812908d6',1,'glm']]], + ['elasticeaseout',['elasticEaseOut',['../a00735.html#gace9c9d1bdf88bf2ab1e7cdefa54c7365',1,'glm']]], + ['epsilon',['epsilon',['../a00680.html#ga2a1e57fc5592b69cfae84174cbfc9429',1,'glm']]], + ['epsilon_2ehpp',['epsilon.hpp',['../a00398.html',1,'']]], + ['epsilonequal',['epsilonEqual',['../a00709.html#ga91b417866cafadd076004778217a1844',1,'glm::epsilonEqual(vec< L, T, Q > const &x, vec< L, T, Q > const &y, T const &epsilon)'],['../a00709.html#gaa7f227999ca09e7ca994e8b35aba47bb',1,'glm::epsilonEqual(genType const &x, genType const &y, genType const &epsilon)']]], + ['epsilonnotequal',['epsilonNotEqual',['../a00709.html#gaf840d33b9a5261ec78dcd5125743b025',1,'glm::epsilonNotEqual(vec< L, T, Q > const &x, vec< L, T, Q > const &y, T const &epsilon)'],['../a00709.html#ga50a92103fb0cbd796908e1bf20c79aaf',1,'glm::epsilonNotEqual(genType const &x, genType const &y, genType const &epsilon)']]], + ['equal',['equal',['../a00667.html#ga27e90dcb7941c9b70e295dc3f6f6369f',1,'glm::equal(mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y)'],['../a00667.html#gaf5d687d70d11708b68c36c6db5777040',1,'glm::equal(mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y, T epsilon)'],['../a00667.html#gafa6a053e81179fa4292b35651c83c3fb',1,'glm::equal(mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y, vec< C, T, Q > const &epsilon)'],['../a00676.html#gad7827af0549504ff1cd6a359786acc7a',1,'glm::equal(qua< T, Q > const &x, qua< T, Q > const &y)'],['../a00676.html#gaa001eecb91106463169a8e5ef1577b39',1,'glm::equal(qua< T, Q > const &x, qua< T, Q > const &y, T epsilon)'],['../a01376.html#a90ebafeace352ccc14055418ebd220be',1,'glm::equal(genType const &x, genType const &y, genType const &epsilon)'],['../a00694.html#ga2ac7651a2fa7354f2da610dbd50d28e2',1,'glm::equal(vec< L, T, Q > const &x, vec< L, T, Q > const &y, T epsilon)'],['../a00694.html#ga37d261a65f69babc82cec2ae1af7145f',1,'glm::equal(vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)'],['../a00791.html#gab4c5cfdaa70834421397a85aa83ad946',1,'glm::equal(vec< L, T, Q > const &x, vec< L, T, Q > const &y)']]], + ['euclidean',['euclidean',['../a00767.html#ga1821d5b3324201e60a9e2823d0b5d0c8',1,'glm']]], + ['euler',['euler',['../a00708.html#gad8fe2e6f90bce9d829e9723b649fbd42',1,'glm']]], + ['euler_5fangles_2ehpp',['euler_angles.hpp',['../a00473.html',1,'']]], + ['eulerangles',['eulerAngles',['../a00663.html#gaf4dd967dead22dd932fc7460ceecb03f',1,'glm']]], + ['euleranglex',['eulerAngleX',['../a00736.html#gafba6282e4ed3ff8b5c75331abfba3489',1,'glm']]], + ['euleranglexy',['eulerAngleXY',['../a00736.html#ga64036577ee17a2d24be0dbc05881d4e2',1,'glm']]], + ['euleranglexyx',['eulerAngleXYX',['../a00736.html#ga29bd0787a28a6648159c0d6e69706066',1,'glm']]], + ['euleranglexyz',['eulerAngleXYZ',['../a00736.html#ga1975e0f0e9bed7f716dc9946da2ab645',1,'glm']]], + ['euleranglexz',['eulerAngleXZ',['../a00736.html#gaa39bd323c65c2fc0a1508be33a237ce9',1,'glm']]], + ['euleranglexzx',['eulerAngleXZX',['../a00736.html#ga60171c79a17aec85d7891ae1d1533ec9',1,'glm']]], + ['euleranglexzy',['eulerAngleXZY',['../a00736.html#ga996dce12a60d8a674ba6737a535fa910',1,'glm']]], + ['eulerangley',['eulerAngleY',['../a00736.html#gab84bf4746805fd69b8ecbb230e3974c5',1,'glm']]], + ['eulerangleyx',['eulerAngleYX',['../a00736.html#ga4f57e6dd25c3cffbbd4daa6ef3f4486d',1,'glm']]], + ['eulerangleyxy',['eulerAngleYXY',['../a00736.html#ga750fba9894117f87bcc529d7349d11de',1,'glm']]], + ['eulerangleyxz',['eulerAngleYXZ',['../a00736.html#gab8ba99a9814f6d9edf417b6c6d5b0c10',1,'glm']]], + ['eulerangleyz',['eulerAngleYZ',['../a00736.html#ga220379e10ac8cca55e275f0c9018fed9',1,'glm']]], + ['eulerangleyzx',['eulerAngleYZX',['../a00736.html#ga08bef16357b8f9b3051b3dcaec4b7848',1,'glm']]], + ['eulerangleyzy',['eulerAngleYZY',['../a00736.html#ga5e5e40abc27630749b42b3327c76d6e4',1,'glm']]], + ['euleranglez',['eulerAngleZ',['../a00736.html#ga5b3935248bb6c3ec6b0d9297d406e251',1,'glm']]], + ['euleranglezx',['eulerAngleZX',['../a00736.html#ga483903115cd4059228961046a28d69b5',1,'glm']]], + ['euleranglezxy',['eulerAngleZXY',['../a00736.html#gab4505c54d2dd654df4569fd1f04c43aa',1,'glm']]], + ['euleranglezxz',['eulerAngleZXZ',['../a00736.html#ga178f966c52b01e4d65e31ebd007e3247',1,'glm']]], + ['euleranglezy',['eulerAngleZY',['../a00736.html#ga400b2bd5984999efab663f3a68e1d020',1,'glm']]], + ['euleranglezyx',['eulerAngleZYX',['../a00736.html#ga2e61f1e39069c47530acab9167852dd6',1,'glm']]], + ['euleranglezyz',['eulerAngleZYZ',['../a00736.html#gacd795f1dbecaf74974f9c76bbcca6830',1,'glm']]], + ['exp',['exp',['../a00664.html#ga071566cadc7505455e611f2a0353f4d4',1,'glm::exp(vec< L, T, Q > const &v)'],['../a00677.html#gaab2d37ef7265819f1d2939b9dc2c52ac',1,'glm::exp(qua< T, Q > const &q)']]], + ['exp2',['exp2',['../a00664.html#gaff17ace6b579a03bf223ed4d1ed2cd16',1,'glm']]], + ['exponential_2ehpp',['exponential.hpp',['../a00080.html',1,'']]], + ['exponentialeasein',['exponentialEaseIn',['../a00735.html#ga7f24ee9219ab4c84dc8de24be84c1e3c',1,'glm']]], + ['exponentialeaseinout',['exponentialEaseInOut',['../a00735.html#ga232fb6dc093c5ce94bee105ff2947501',1,'glm']]], + ['exponentialeaseout',['exponentialEaseOut',['../a00735.html#ga517f2bcfd15bc2c25c466ae50808efc3',1,'glm']]], + ['ext_2ehpp',['ext.hpp',['../a00377.html',1,'']]], + ['extend',['extend',['../a00737.html#ga8140caae613b0f847ab0d7175dc03a37',1,'glm']]], + ['extend_2ehpp',['extend.hpp',['../a00476.html',1,'']]], + ['extended_5fmin_5fmax_2ehpp',['extended_min_max.hpp',['../a00479.html',1,'']]], + ['exterior_5fproduct_2ehpp',['exterior_product.hpp',['../a00482.html',1,'']]], + ['extracteuleranglexyx',['extractEulerAngleXYX',['../a00736.html#gaf1077a72171d0f3b08f022ab5ff88af7',1,'glm']]], + ['extracteuleranglexyz',['extractEulerAngleXYZ',['../a00736.html#gacea701562f778c1da4d3a0a1cf091000',1,'glm']]], + ['extracteuleranglexzx',['extractEulerAngleXZX',['../a00736.html#gacf0bc6c031f25fa3ee0055b62c8260d0',1,'glm']]], + ['extracteuleranglexzy',['extractEulerAngleXZY',['../a00736.html#gabe5a65d8eb1cd873c8de121cce1a15ed',1,'glm']]], + ['extracteulerangleyxy',['extractEulerAngleYXY',['../a00736.html#gaab8868556361a190db94374e9983ed39',1,'glm']]], + ['extracteulerangleyxz',['extractEulerAngleYXZ',['../a00736.html#gaf0937518e63037335a0e8358b6f053c5',1,'glm']]], + ['extracteulerangleyzx',['extractEulerAngleYZX',['../a00736.html#ga9049b78466796c0de2971756e25b93d3',1,'glm']]], + ['extracteulerangleyzy',['extractEulerAngleYZY',['../a00736.html#ga11dad972c109e4bf8694c915017c44a6',1,'glm']]], + ['extracteuleranglezxy',['extractEulerAngleZXY',['../a00736.html#ga81fbbca2ba0c778b9662d5355b4e2363',1,'glm']]], + ['extracteuleranglezxz',['extractEulerAngleZXZ',['../a00736.html#ga59359fef9bad92afaca55e193f91e702',1,'glm']]], + ['extracteuleranglezyx',['extractEulerAngleZYX',['../a00736.html#ga2d6c11a4abfa60c565483cee2d3f7665',1,'glm']]], + ['extracteuleranglezyz',['extractEulerAngleZYZ',['../a00736.html#gafdfa880a64b565223550c2d3938b1aeb',1,'glm']]], + ['extractmatrixrotation',['extractMatrixRotation',['../a00754.html#gabbc1c7385a145f04b5c54228965df145',1,'glm']]], + ['extractrealcomponent',['extractRealComponent',['../a00769.html#ga321953c1b2e7befe6f5dcfddbfc6b76b',1,'glm']]], + ['experimental_20extensions',['Experimental extensions',['../a00705.html',1,'']]], + ['matrix_5ftransform_2ehpp',['matrix_transform.hpp',['../a01361.html',1,'']]], + ['scalar_5frelational_2ehpp',['scalar_relational.hpp',['../a01376.html',1,'']]], + ['vector_5frelational_2ehpp',['vector_relational.hpp',['../a01388.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/all_5.html b/common/glm/doc/api/search/all_5.html new file mode 100644 index 000000000..e59e1d536 --- /dev/null +++ b/common/glm/doc/api/search/all_5.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/all_5.js b/common/glm/doc/api/search/all_5.js new file mode 100644 index 000000000..aed96f89d --- /dev/null +++ b/common/glm/doc/api/search/all_5.js @@ -0,0 +1,131 @@ +var searchData= +[ + ['floating_2dpoint_20pack_20and_20unpack_20functions',['Floating-Point Pack and Unpack Functions',['../a00789.html',1,'']]], + ['f32',['f32',['../a00721.html#gabe6a542dd6c1d5ffd847f1b9b4c9c9b7',1,'glm']]], + ['f32mat1',['f32mat1',['../a00763.html#ga145ad477a2a3e152855511c3b52469a6',1,'glm::gtx']]], + ['f32mat1x1',['f32mat1x1',['../a00763.html#gac88c6a4dbfc380aa26e3adbbade36348',1,'glm::gtx']]], + ['f32mat2',['f32mat2',['../a00721.html#gab12383ed6ac7595ed6fde4d266c58425',1,'glm']]], + ['f32mat2x2',['f32mat2x2',['../a00721.html#ga04100c76f7d55a0dd0983ccf05142bff',1,'glm']]], + ['f32mat2x3',['f32mat2x3',['../a00721.html#gab256cdab5eb582e426d749ae77b5b566',1,'glm']]], + ['f32mat2x4',['f32mat2x4',['../a00721.html#gaf512b74c4400b68f9fdf9388b3d6aac8',1,'glm']]], + ['f32mat3',['f32mat3',['../a00721.html#ga856f3905ee7cc2e4890a8a1d56c150be',1,'glm']]], + ['f32mat3x2',['f32mat3x2',['../a00721.html#ga1320a08e14fdff3821241eefab6947e9',1,'glm']]], + ['f32mat3x3',['f32mat3x3',['../a00721.html#ga65261fa8a21045c8646ddff114a56174',1,'glm']]], + ['f32mat3x4',['f32mat3x4',['../a00721.html#gab90ade28222f8b861d5ceaf81a3a7f5d',1,'glm']]], + ['f32mat4',['f32mat4',['../a00721.html#ga99d1b85ff99956b33da7e9992aad129a',1,'glm']]], + ['f32mat4x2',['f32mat4x2',['../a00721.html#ga3b32ca1e57a4ef91babbc3d35a34ea20',1,'glm']]], + ['f32mat4x3',['f32mat4x3',['../a00721.html#ga239b96198771b7add8eea7e6b59840c0',1,'glm']]], + ['f32mat4x4',['f32mat4x4',['../a00721.html#gaee4da0e9fbd8cfa2f89cb80889719dc3',1,'glm']]], + ['f32quat',['f32quat',['../a00721.html#ga38e674196ba411d642be40c47bf33939',1,'glm']]], + ['f32vec1',['f32vec1',['../a00721.html#ga701f32ab5b3fb06996b41f5c0d643805',1,'glm::f32vec1()'],['../a00763.html#ga07f8d7348eb7ae059a84c118fdfeb943',1,'glm::gtx::f32vec1()']]], + ['f32vec2',['f32vec2',['../a00721.html#ga5d6c70e080409a76a257dc55bd8ea2c8',1,'glm']]], + ['f32vec3',['f32vec3',['../a00721.html#gaea5c4518e175162e306d2c2b5ef5ac79',1,'glm']]], + ['f32vec4',['f32vec4',['../a00721.html#ga31c6ca0e074a44007f49a9a3720b18c8',1,'glm']]], + ['f64',['f64',['../a00721.html#ga1d794d240091678f602e8de225b8d8c9',1,'glm']]], + ['f64mat1',['f64mat1',['../a00763.html#ga59bfa589419b5265d01314fcecd33435',1,'glm::gtx']]], + ['f64mat1x1',['f64mat1x1',['../a00763.html#ga448eeb08d0b7d8c43a8b292c981955fd',1,'glm::gtx']]], + ['f64mat2',['f64mat2',['../a00721.html#gad9771450a54785d13080cdde0fe20c1d',1,'glm']]], + ['f64mat2x2',['f64mat2x2',['../a00721.html#ga9ec7c4c79e303c053e30729a95fb2c37',1,'glm']]], + ['f64mat2x3',['f64mat2x3',['../a00721.html#gae3ab5719fc4c1e966631dbbcba8d412a',1,'glm']]], + ['f64mat2x4',['f64mat2x4',['../a00721.html#gac87278e0c702ba8afff76316d4eeb769',1,'glm']]], + ['f64mat3',['f64mat3',['../a00721.html#ga9b69181efbf8f37ae934f135137b29c0',1,'glm']]], + ['f64mat3x2',['f64mat3x2',['../a00721.html#ga2473d8bf3f4abf967c4d0e18175be6f7',1,'glm']]], + ['f64mat3x3',['f64mat3x3',['../a00721.html#ga916c1aed91cf91f7b41399ebe7c6e185',1,'glm']]], + ['f64mat3x4',['f64mat3x4',['../a00721.html#gaab239fa9e35b65a67cbaa6ac082f3675',1,'glm']]], + ['f64mat4',['f64mat4',['../a00721.html#ga0ecd3f4952536e5ef12702b44d2626fc',1,'glm']]], + ['f64mat4x2',['f64mat4x2',['../a00721.html#gab7daf79d6bc06a68bea1c6f5e11b5512',1,'glm']]], + ['f64mat4x3',['f64mat4x3',['../a00721.html#ga3e2e66ffbe341a80bc005ba2b9552110',1,'glm']]], + ['f64mat4x4',['f64mat4x4',['../a00721.html#gae52e2b7077a9ff928a06ab5ce600b81e',1,'glm']]], + ['f64quat',['f64quat',['../a00721.html#ga2b114a2f2af0fe1dfeb569c767822940',1,'glm']]], + ['f64vec1',['f64vec1',['../a00721.html#gade502df1ce14f837fae7f60a03ddb9b0',1,'glm::f64vec1()'],['../a00763.html#gae5987a61b8c03d5c432a9e62f0b3efe1',1,'glm::gtx::f64vec1()']]], + ['f64vec2',['f64vec2',['../a00721.html#gadc4e1594f9555d919131ee02b17822a2',1,'glm']]], + ['f64vec3',['f64vec3',['../a00721.html#gaa7a1ddca75c5f629173bf4772db7a635',1,'glm']]], + ['f64vec4',['f64vec4',['../a00721.html#ga66e92e57260bdb910609b9a56bf83e97',1,'glm']]], + ['faceforward',['faceforward',['../a00697.html#ga7aed0a36c738169402404a3a5d54e43b',1,'glm']]], + ['factorial',['factorial',['../a00747.html#ga8cbd3120905f398ec321b5d1836e08fb',1,'glm']]], + ['fast_5fexponential_2ehpp',['fast_exponential.hpp',['../a00485.html',1,'']]], + ['fast_5fsquare_5froot_2ehpp',['fast_square_root.hpp',['../a00488.html',1,'']]], + ['fast_5ftrigonometry_2ehpp',['fast_trigonometry.hpp',['../a00491.html',1,'']]], + ['fastacos',['fastAcos',['../a00742.html#ga9721d63356e5d94fdc4b393a426ab26b',1,'glm']]], + ['fastasin',['fastAsin',['../a00742.html#ga562cb62c51fbfe7fac7db0bce706b81f',1,'glm']]], + ['fastatan',['fastAtan',['../a00742.html#ga8d197c6ef564f5e5d59af3b3f8adcc2c',1,'glm::fastAtan(T y, T x)'],['../a00742.html#gae25de86a968490ff56856fa425ec9d30',1,'glm::fastAtan(T angle)']]], + ['fastcos',['fastCos',['../a00742.html#gab34c8b45c23c0165a64dcecfcc3b302a',1,'glm']]], + ['fastdistance',['fastDistance',['../a00741.html#gaac333418d0c4e0cc6d3d219ed606c238',1,'glm::fastDistance(genType x, genType y)'],['../a00741.html#ga42d3e771fa7cb3c60d828e315829df19',1,'glm::fastDistance(vec< L, T, Q > const &x, vec< L, T, Q > const &y)']]], + ['fastexp',['fastExp',['../a00740.html#gaa3180ac8f96ab37ab96e0cacaf608e10',1,'glm::fastExp(T x)'],['../a00740.html#ga3ba6153aec6bd74628f8b00530aa8d58',1,'glm::fastExp(vec< L, T, Q > const &x)']]], + ['fastexp2',['fastExp2',['../a00740.html#ga0af50585955eb14c60bb286297fabab2',1,'glm::fastExp2(T x)'],['../a00740.html#gacaaed8b67d20d244b7de217e7816c1b6',1,'glm::fastExp2(vec< L, T, Q > const &x)']]], + ['fastinversesqrt',['fastInverseSqrt',['../a00741.html#ga7f081b14d9c7035c8714eba5f7f75a8f',1,'glm::fastInverseSqrt(genType x)'],['../a00741.html#gadcd7be12b1e5ee182141359d4c45dd24',1,'glm::fastInverseSqrt(vec< L, T, Q > const &x)']]], + ['fastlength',['fastLength',['../a00741.html#gafe697d6287719538346bbdf8b1367c59',1,'glm::fastLength(genType x)'],['../a00741.html#ga90f66be92ef61e705c005e7b3209edb8',1,'glm::fastLength(vec< L, T, Q > const &x)']]], + ['fastlog',['fastLog',['../a00740.html#gae1bdc97b7f96a600e29c753f1cd4388a',1,'glm::fastLog(T x)'],['../a00740.html#ga937256993a7219e73f186bb348fe6be8',1,'glm::fastLog(vec< L, T, Q > const &x)']]], + ['fastlog2',['fastLog2',['../a00740.html#ga6e98118685f6dc9e05fbb13dd5e5234e',1,'glm::fastLog2(T x)'],['../a00740.html#ga7562043539194ccc24649f8475bc5584',1,'glm::fastLog2(vec< L, T, Q > const &x)']]], + ['fastmix',['fastMix',['../a00769.html#ga264e10708d58dd0ff53b7902a2bd2561',1,'glm']]], + ['fastnormalize',['fastNormalize',['../a00741.html#ga3b02c1d6e0c754144e2f1e110bf9f16c',1,'glm']]], + ['fastnormalizedot',['fastNormalizeDot',['../a00762.html#ga2746fb9b5bd22b06b2f7c8babba5de9e',1,'glm']]], + ['fastpow',['fastPow',['../a00740.html#ga5340e98a11fcbbd936ba6e983a154d50',1,'glm::fastPow(genType x, genType y)'],['../a00740.html#ga15325a8ed2d1c4ed2412c4b3b3927aa2',1,'glm::fastPow(vec< L, T, Q > const &x, vec< L, T, Q > const &y)'],['../a00740.html#ga7f2562db9c3e02ae76169c36b086c3f6',1,'glm::fastPow(genTypeT x, genTypeU y)'],['../a00740.html#ga1abe488c0829da5b9de70ac64aeaa7e5',1,'glm::fastPow(vec< L, T, Q > const &x)']]], + ['fastsin',['fastSin',['../a00742.html#ga0aab3257bb3b628d10a1e0483e2c6915',1,'glm']]], + ['fastsqrt',['fastSqrt',['../a00741.html#ga6c460e9414a50b2fc455c8f64c86cdc9',1,'glm::fastSqrt(genType x)'],['../a00741.html#gae83f0c03614f73eae5478c5b6274ee6d',1,'glm::fastSqrt(vec< L, T, Q > const &x)']]], + ['fasttan',['fastTan',['../a00742.html#gaf29b9c1101a10007b4f79ee89df27ba2',1,'glm']]], + ['fclamp',['fclamp',['../a00738.html#ga1e28539d3a46965ed9ef92ec7cb3b18a',1,'glm::fclamp(genType x, genType minVal, genType maxVal)'],['../a00738.html#ga60796d08903489ee185373593bc16b9d',1,'glm::fclamp(vec< L, T, Q > const &x, T minVal, T maxVal)'],['../a00738.html#ga5c15fa4709763c269c86c0b8b3aa2297',1,'glm::fclamp(vec< L, T, Q > const &x, vec< L, T, Q > const &minVal, vec< L, T, Q > const &maxVal)']]], + ['fdualquat',['fdualquat',['../a00734.html#ga237c2b9b42c9a930e49de5840ae0f930',1,'glm']]], + ['findlsb',['findLSB',['../a00787.html#gaf74c4d969fa34ab8acb9d390f5ca5274',1,'glm::findLSB(genIUType x)'],['../a00787.html#ga4454c0331d6369888c28ab677f4810c7',1,'glm::findLSB(vec< L, T, Q > const &v)']]], + ['findmsb',['findMSB',['../a00787.html#ga7e4a794d766861c70bc961630f8ef621',1,'glm::findMSB(genIUType x)'],['../a00787.html#ga39ac4d52028bb6ab08db5ad6562c2872',1,'glm::findMSB(vec< L, T, Q > const &v)']]], + ['fliplr',['fliplr',['../a00753.html#gaf39f4e5f78eb29c1a90277d45b9b3feb',1,'glm']]], + ['flipud',['flipud',['../a00753.html#ga85003371f0ba97380dd25e8905de1870',1,'glm']]], + ['float1',['float1',['../a00732.html#gaf5208d01f6c6fbcb7bb55d610b9c0ead',1,'glm']]], + ['float1x1',['float1x1',['../a00732.html#ga73720b8dc4620835b17f74d428f98c0c',1,'glm']]], + ['float2',['float2',['../a00732.html#ga02d3c013982c183906c61d74aa3166ce',1,'glm']]], + ['float2x2',['float2x2',['../a00732.html#ga33d43ecbb60a85a1366ff83f8a0ec85f',1,'glm']]], + ['float2x3',['float2x3',['../a00732.html#ga939b0cff15cee3030f75c1b2e36f89fe',1,'glm']]], + ['float2x4',['float2x4',['../a00732.html#gafec3cfd901ab334a92e0242b8f2269b4',1,'glm']]], + ['float3',['float3',['../a00732.html#ga821ff110fc8533a053cbfcc93e078cc0',1,'glm']]], + ['float32',['float32',['../a00681.html#gaacdc525d6f7bddb3ae95d5c311bd06a1',1,'glm']]], + ['float32_5ft',['float32_t',['../a00721.html#gaa4947bc8b47c72fceea9bda730ecf603',1,'glm']]], + ['float3x2',['float3x2',['../a00732.html#gaa6c69f04ba95f3faedf95dae874de576',1,'glm']]], + ['float3x3',['float3x3',['../a00732.html#ga6ceb5d38a58becdf420026e12a6562f3',1,'glm']]], + ['float3x4',['float3x4',['../a00732.html#ga4d2679c321b793ca3784fe0315bb5332',1,'glm']]], + ['float4',['float4',['../a00732.html#gae2da7345087db3815a25d8837a727ef1',1,'glm']]], + ['float4x2',['float4x2',['../a00732.html#ga308b9af0c221145bcfe9bfc129d9098e',1,'glm']]], + ['float4x3',['float4x3',['../a00732.html#gac0a51b4812038aa81d73ffcc37f741ac',1,'glm']]], + ['float4x4',['float4x4',['../a00732.html#gad3051649b3715d828a4ab92cdae7c3bf',1,'glm']]], + ['float64',['float64',['../a00681.html#ga232fad1b0d6dcc7c16aabde98b2e2a80',1,'glm']]], + ['float64_5ft',['float64_t',['../a00721.html#ga728366fef72cd96f0a5fa6429f05469e',1,'glm']]], + ['float_5fdistance',['float_distance',['../a00723.html#ga2e09bd6c8b0a9c91f6f5683d68245634',1,'glm::float_distance(T const &x, T const &y)'],['../a00723.html#ga72b3223069013f336d8c31812b7ada80',1,'glm::float_distance(vec< 2, T, Q > const &x, vec< 2, T, Q > const &y)']]], + ['floatbitstoint',['floatBitsToInt',['../a00662.html#ga1425c1c3160ec51214b03a0469a3013d',1,'glm::floatBitsToInt(float const &v)'],['../a00662.html#ga99f7d62f78ac5ea3b49bae715c9488ed',1,'glm::floatBitsToInt(vec< L, float, Q > const &v)']]], + ['floatbitstouint',['floatBitsToUint',['../a00662.html#ga70e0271c34af52f3100c7960e18c3f2b',1,'glm::floatBitsToUint(float const &v)'],['../a00662.html#ga49418ba4c8a60fbbb5d57b705f3e26db',1,'glm::floatBitsToUint(vec< L, float, Q > const &v)']]], + ['floor',['floor',['../a00662.html#gaa9d0742639e85b29c7c5de11cfd6840d',1,'glm']]], + ['floor_5flog2',['floor_log2',['../a00747.html#ga7011b4e1c1e1ed492149b028feacc00e',1,'glm']]], + ['floormultiple',['floorMultiple',['../a00719.html#ga2ffa3cd5f2ea746ee1bf57c46da6315e',1,'glm::floorMultiple(genType v, genType Multiple)'],['../a00719.html#gacdd8901448f51f0b192380e422fae3e4',1,'glm::floorMultiple(vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)']]], + ['floorpoweroftwo',['floorPowerOfTwo',['../a00719.html#gafe273a57935d04c9db677bf67f9a71f4',1,'glm::floorPowerOfTwo(genIUType v)'],['../a00719.html#gaf0d591a8fca8ddb9289cdeb44b989c2d',1,'glm::floorPowerOfTwo(vec< L, T, Q > const &v)']]], + ['fma',['fma',['../a00662.html#gad0f444d4b81cc53c3b6edf5aa25078c2',1,'glm']]], + ['fmat2',['fmat2',['../a00721.html#ga4541dc2feb2a31d6ecb5a303f3dd3280',1,'glm']]], + ['fmat2x2',['fmat2x2',['../a00721.html#ga3350c93c3275298f940a42875388e4b4',1,'glm']]], + ['fmat2x3',['fmat2x3',['../a00721.html#ga55a2d2a8eb09b5633668257eb3cad453',1,'glm']]], + ['fmat2x4',['fmat2x4',['../a00721.html#ga681381f19f11c9e5ee45cda2c56937ff',1,'glm']]], + ['fmat3',['fmat3',['../a00721.html#ga253d453c20e037730023fea0215cb6f6',1,'glm']]], + ['fmat3x2',['fmat3x2',['../a00721.html#ga6af54d70d9beb0a7ef992a879e86b04f',1,'glm']]], + ['fmat3x3',['fmat3x3',['../a00721.html#gaa07c86650253672a19dbfb898f3265b8',1,'glm']]], + ['fmat3x4',['fmat3x4',['../a00721.html#ga44e158af77a670ee1b58c03cda9e1619',1,'glm']]], + ['fmat4',['fmat4',['../a00721.html#ga8cb400c0f4438f2640035d7b9824a0ca',1,'glm']]], + ['fmat4x2',['fmat4x2',['../a00721.html#ga8c8aa45aafcc23238edb1d5aeb801774',1,'glm']]], + ['fmat4x3',['fmat4x3',['../a00721.html#ga4295048a78bdf46b8a7de77ec665b497',1,'glm']]], + ['fmat4x4',['fmat4x4',['../a00721.html#gad01cc6479bde1fd1870f13d3ed9530b3',1,'glm']]], + ['fmax',['fmax',['../a00679.html#ga36920478565cf608e93064283ce06421',1,'glm::fmax(T a, T b)'],['../a00679.html#ga0007bba71ca451ac70e99d28dfbeaab9',1,'glm::fmax(T a, T b, T C)'],['../a00679.html#ga27e260b1ff4d04c3ad4b864d26cbaf08',1,'glm::fmax(T a, T b, T C, T D)'],['../a00687.html#gad66b6441f7200db16c9f341711733c56',1,'glm::fmax(vec< L, T, Q > const &a, T b)'],['../a00687.html#ga8df4be3f48d6717c40ea788fd30deebf',1,'glm::fmax(vec< L, T, Q > const &a, vec< L, T, Q > const &b)'],['../a00687.html#ga0f04ba924294dae4234ca93ede23229a',1,'glm::fmax(vec< L, T, Q > const &a, vec< L, T, Q > const &b, vec< L, T, Q > const &c)'],['../a00687.html#ga4ed3eb250ccbe17bfe8ded8a6b72d230',1,'glm::fmax(vec< L, T, Q > const &a, vec< L, T, Q > const &b, vec< L, T, Q > const &c, vec< L, T, Q > const &d)'],['../a00738.html#gae5792cb2b51190057e4aea027eb56f81',1,'glm::fmax(genType x, genType y)']]], + ['fmin',['fmin',['../a00679.html#ga7b2b438a765e2a62098c79eb212f28f0',1,'glm::fmin(T a, T b)'],['../a00679.html#ga1a95fe4cf5437e8133f1093fe9726a64',1,'glm::fmin(T a, T b, T c)'],['../a00679.html#ga3d6f9c6c16bfd6f38f2c4f8076e8b661',1,'glm::fmin(T a, T b, T c, T d)'],['../a00687.html#gae989203363cff9eab5093630df4fe071',1,'glm::fmin(vec< L, T, Q > const &x, T y)'],['../a00687.html#ga7c42e93cd778c9181d1cdeea4d3e43bd',1,'glm::fmin(vec< L, T, Q > const &x, vec< L, T, Q > const &y)'],['../a00687.html#ga7e62739055b49189d9355471f78fe000',1,'glm::fmin(vec< L, T, Q > const &a, vec< L, T, Q > const &b, vec< L, T, Q > const &c)'],['../a00687.html#ga4a543dd7d22ad1f3b8b839f808a9d93c',1,'glm::fmin(vec< L, T, Q > const &a, vec< L, T, Q > const &b, vec< L, T, Q > const &c, vec< L, T, Q > const &d)'],['../a00738.html#gaa3200559611ac5b9b9ae7283547916a7',1,'glm::fmin(genType x, genType y)']]], + ['fmod',['fmod',['../a00731.html#gae5e80425df9833164ad469e83b475fb4',1,'glm']]], + ['four_5fover_5fpi',['four_over_pi',['../a00708.html#ga753950e5140e4ea6a88e4a18ba61dc09',1,'glm']]], + ['fract',['fract',['../a00662.html#ga8ba89e40e55ae5cdf228548f9b7639c7',1,'glm::fract(genType x)'],['../a00662.html#ga2df623004f634b440d61e018d62c751b',1,'glm::fract(vec< L, T, Q > const &x)']]], + ['frexp',['frexp',['../a00662.html#ga20620e83544d1a988857a3bc4ebe0e1d',1,'glm']]], + ['frustum',['frustum',['../a00665.html#ga0bcd4542e0affc63a0b8c08fcb839ea9',1,'glm']]], + ['frustumlh',['frustumLH',['../a00665.html#gae4277c37f61d81da01bc9db14ea90296',1,'glm']]], + ['frustumlh_5fno',['frustumLH_NO',['../a00665.html#ga259520cad03b3f8bca9417920035ed01',1,'glm']]], + ['frustumlh_5fzo',['frustumLH_ZO',['../a00665.html#ga94218b094862d17798370242680b9030',1,'glm']]], + ['frustumno',['frustumNO',['../a00665.html#gae34ec664ad44860bf4b5ba631f0e0e90',1,'glm']]], + ['frustumrh',['frustumRH',['../a00665.html#ga4366ab45880c6c5f8b3e8c371ca4b136',1,'glm']]], + ['frustumrh_5fno',['frustumRH_NO',['../a00665.html#ga9236c8439f21be186b79c97b588836b9',1,'glm']]], + ['frustumrh_5fzo',['frustumRH_ZO',['../a00665.html#ga7654a9227f14d5382786b9fc0eb5692d',1,'glm']]], + ['frustumzo',['frustumZO',['../a00665.html#gaa73322e152edf50cf30a6edac342a757',1,'glm']]], + ['functions_2ehpp',['functions.hpp',['../a00494.html',1,'']]], + ['fvec1',['fvec1',['../a00721.html#ga98b9ed43cf8c5cf1d354b23c7df9119f',1,'glm']]], + ['fvec2',['fvec2',['../a00721.html#ga24273aa02abaecaab7f160bac437a339',1,'glm']]], + ['fvec3',['fvec3',['../a00721.html#ga89930533646b30d021759298aa6bf04a',1,'glm']]], + ['fvec4',['fvec4',['../a00721.html#ga713c796c54875cf4092d42ff9d9096b0',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/all_6.html b/common/glm/doc/api/search/all_6.html new file mode 100644 index 000000000..f75a754e9 --- /dev/null +++ b/common/glm/doc/api/search/all_6.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/all_6.js b/common/glm/doc/api/search/all_6.js new file mode 100644 index 000000000..c642d270b --- /dev/null +++ b/common/glm/doc/api/search/all_6.js @@ -0,0 +1,135 @@ +var searchData= +[ + ['color_5fspace_2ehpp',['color_space.hpp',['../a01346.html',1,'(Global Namespace)'],['../a01349.html',1,'(Global Namespace)']]], + ['common_2ehpp',['common.hpp',['../a01352.html',1,'']]], + ['geometric_20functions',['Geometric functions',['../a00697.html',1,'']]], + ['glm_5fext_5fmatrix_5fclip_5fspace',['GLM_EXT_matrix_clip_space',['../a00665.html',1,'']]], + ['glm_5fext_5fmatrix_5fprojection',['GLM_EXT_matrix_projection',['../a00666.html',1,'']]], + ['glm_5fext_5fmatrix_5frelational',['GLM_EXT_matrix_relational',['../a00667.html',1,'']]], + ['glm_5fext_5fmatrix_5ftransform',['GLM_EXT_matrix_transform',['../a00668.html',1,'']]], + ['glm_5fext_5fquaternion_5fcommon',['GLM_EXT_quaternion_common',['../a00669.html',1,'']]], + ['glm_5fext_5fquaternion_5fdouble',['GLM_EXT_quaternion_double',['../a00670.html',1,'']]], + ['glm_5fext_5fquaternion_5fdouble_5fprecision',['GLM_EXT_quaternion_double_precision',['../a00671.html',1,'']]], + ['glm_5fext_5fquaternion_5fexponential',['GLM_EXT_quaternion_exponential',['../a00672.html',1,'']]], + ['glm_5fext_5fquaternion_5ffloat',['GLM_EXT_quaternion_float',['../a00673.html',1,'']]], + ['glm_5fext_5fquaternion_5ffloat_5fprecision',['GLM_EXT_quaternion_float_precision',['../a00674.html',1,'']]], + ['glm_5fext_5fquaternion_5fgeometric',['GLM_EXT_quaternion_geometric',['../a00675.html',1,'']]], + ['glm_5fext_5fquaternion_5frelational',['GLM_EXT_quaternion_relational',['../a00676.html',1,'']]], + ['glm_5fext_5fquaternion_5ftransform',['GLM_EXT_quaternion_transform',['../a00677.html',1,'']]], + ['glm_5fext_5fquaternion_5ftrigonometric',['GLM_EXT_quaternion_trigonometric',['../a00678.html',1,'']]], + ['glm_5fext_5fscalar_5fcommon',['GLM_EXT_scalar_common',['../a00679.html',1,'']]], + ['glm_5fext_5fscalar_5fconstants',['GLM_EXT_scalar_constants',['../a00680.html',1,'']]], + ['glm_5fext_5fscalar_5ffloat_5fsized',['GLM_EXT_scalar_float_sized',['../a00681.html',1,'']]], + ['glm_5fext_5fscalar_5fint_5fsized',['GLM_EXT_scalar_int_sized',['../a00682.html',1,'']]], + ['glm_5fext_5fscalar_5frelational',['GLM_EXT_scalar_relational',['../a00683.html',1,'']]], + ['glm_5fext_5fscalar_5fuint_5fsized',['GLM_EXT_scalar_uint_sized',['../a00684.html',1,'']]], + ['glm_5fext_5fvector_5fbool1',['GLM_EXT_vector_bool1',['../a00685.html',1,'']]], + ['glm_5fext_5fvector_5fbool1_5fprecision',['GLM_EXT_vector_bool1_precision',['../a00686.html',1,'']]], + ['glm_5fext_5fvector_5fcommon',['GLM_EXT_vector_common',['../a00687.html',1,'']]], + ['glm_5fext_5fvector_5fdouble1',['GLM_EXT_vector_double1',['../a00688.html',1,'']]], + ['glm_5fext_5fvector_5fdouble1_5fprecision',['GLM_EXT_vector_double1_precision',['../a00689.html',1,'']]], + ['glm_5fext_5fvector_5ffloat1',['GLM_EXT_vector_float1',['../a00690.html',1,'']]], + ['glm_5fext_5fvector_5ffloat1_5fprecision',['GLM_EXT_vector_float1_precision',['../a00691.html',1,'']]], + ['glm_5fext_5fvector_5fint1',['GLM_EXT_vector_int1',['../a00692.html',1,'']]], + ['glm_5fext_5fvector_5fint1_5fprecision',['GLM_EXT_vector_int1_precision',['../a00693.html',1,'']]], + ['glm_5fext_5fvector_5frelational',['GLM_EXT_vector_relational',['../a00694.html',1,'']]], + ['glm_5fext_5fvector_5fuint1',['GLM_EXT_vector_uint1',['../a00695.html',1,'']]], + ['glm_5fext_5fvector_5fuint1_5fprecision',['GLM_EXT_vector_uint1_precision',['../a00696.html',1,'']]], + ['gauss',['gauss',['../a00743.html#ga0b50b197ff74261a0fad90f4b8d24702',1,'glm::gauss(T x, T ExpectedValue, T StandardDeviation)'],['../a00743.html#gad19ec8754a83c0b9a8dc16b7e60705ab',1,'glm::gauss(vec< 2, T, Q > const &Coord, vec< 2, T, Q > const &ExpectedValue, vec< 2, T, Q > const &StandardDeviation)']]], + ['gaussrand',['gaussRand',['../a00717.html#ga5193a83e49e4fdc5652c084711083574',1,'glm']]], + ['geometric_2ehpp',['geometric.hpp',['../a00383.html',1,'']]], + ['glm_2ehpp',['glm.hpp',['../a00386.html',1,'']]], + ['glm_5faligned_5ftypedef',['GLM_ALIGNED_TYPEDEF',['../a00781.html#gab5cd5c5fad228b25c782084f1cc30114',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_int8, aligned_lowp_int8, 1)'],['../a00781.html#ga5bb5dd895ef625c1b113f2cf400186b0',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_int16, aligned_lowp_int16, 2)'],['../a00781.html#gac6efa54cf7c6c86f7158922abdb1a430',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_int32, aligned_lowp_int32, 4)'],['../a00781.html#ga6612eb77c8607048e7552279a11eeb5f',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_int64, aligned_lowp_int64, 8)'],['../a00781.html#ga7ddc1848ff2223026db8968ce0c97497',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_int8_t, aligned_lowp_int8_t, 1)'],['../a00781.html#ga22240dd9458b0f8c11fbcc4f48714f68',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_int16_t, aligned_lowp_int16_t, 2)'],['../a00781.html#ga8130ea381d76a2cc34a93ccbb6cf487d',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_int32_t, aligned_lowp_int32_t, 4)'],['../a00781.html#ga7ccb60f3215d293fd62b33b31ed0e7be',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_int64_t, aligned_lowp_int64_t, 8)'],['../a00781.html#gac20d508d2ef5cc95ad3daf083c57ec2a',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_i8, aligned_lowp_i8, 1)'],['../a00781.html#ga50257b48069a31d0c8d9c1f644d267de',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_i16, aligned_lowp_i16, 2)'],['../a00781.html#gaa07e98e67b7a3435c0746018c7a2a839',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_i32, aligned_lowp_i32, 4)'],['../a00781.html#ga62601fc6f8ca298b77285bedf03faffd',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_i64, aligned_lowp_i64, 8)'],['../a00781.html#gac8cff825951aeb54dd846037113c72db',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_int8, aligned_mediump_int8, 1)'],['../a00781.html#ga78f443d88f438575a62b5df497cdf66b',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_int16, aligned_mediump_int16, 2)'],['../a00781.html#ga0680cd3b5d4e8006985fb41a4f9b57af',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_int32, aligned_mediump_int32, 4)'],['../a00781.html#gad9e5babb1dd3e3531b42c37bf25dd951',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_int64, aligned_mediump_int64, 8)'],['../a00781.html#ga353fd9fa8a9ad952fcabd0d53ad9a6dd',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_int8_t, aligned_mediump_int8_t, 1)'],['../a00781.html#ga2196442c0e5c5e8c77842de388c42521',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_int16_t, aligned_mediump_int16_t, 2)'],['../a00781.html#ga1284488189daf897cf095c5eefad9744',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_int32_t, aligned_mediump_int32_t, 4)'],['../a00781.html#ga73fdc86a539808af58808b7c60a1c4d8',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_int64_t, aligned_mediump_int64_t, 8)'],['../a00781.html#gafafeea923e1983262c972e2b83922d3b',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_i8, aligned_mediump_i8, 1)'],['../a00781.html#ga4b35ca5fe8f55c9d2fe54fdb8d8896f4',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_i16, aligned_mediump_i16, 2)'],['../a00781.html#ga63b882e29170d428463d99c3d630acc6',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_i32, aligned_mediump_i32, 4)'],['../a00781.html#ga8b20507bb048c1edea2d441cc953e6f0',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_i64, aligned_mediump_i64, 8)'],['../a00781.html#ga56c5ca60813027b603c7b61425a0479d',1,'glm::GLM_ALIGNED_TYPEDEF(highp_int8, aligned_highp_int8, 1)'],['../a00781.html#ga7a751b3aff24c0259f4a7357c2969089',1,'glm::GLM_ALIGNED_TYPEDEF(highp_int16, aligned_highp_int16, 2)'],['../a00781.html#ga70cd2144351c556469ee6119e59971fc',1,'glm::GLM_ALIGNED_TYPEDEF(highp_int32, aligned_highp_int32, 4)'],['../a00781.html#ga46bbf08dc004d8c433041e0b5018a5d3',1,'glm::GLM_ALIGNED_TYPEDEF(highp_int64, aligned_highp_int64, 8)'],['../a00781.html#gab3e10c77a20d1abad2de1c561c7a5c18',1,'glm::GLM_ALIGNED_TYPEDEF(highp_int8_t, aligned_highp_int8_t, 1)'],['../a00781.html#ga968f30319ebeaca9ebcd3a25a8e139fb',1,'glm::GLM_ALIGNED_TYPEDEF(highp_int16_t, aligned_highp_int16_t, 2)'],['../a00781.html#gaae773c28e6390c6aa76f5b678b7098a3',1,'glm::GLM_ALIGNED_TYPEDEF(highp_int32_t, aligned_highp_int32_t, 4)'],['../a00781.html#ga790cfff1ca39d0ed696ffed980809311',1,'glm::GLM_ALIGNED_TYPEDEF(highp_int64_t, aligned_highp_int64_t, 8)'],['../a00781.html#ga8265b91eb23c120a9b0c3e381bc37b96',1,'glm::GLM_ALIGNED_TYPEDEF(highp_i8, aligned_highp_i8, 1)'],['../a00781.html#gae6d384de17588d8edb894fbe06e0d410',1,'glm::GLM_ALIGNED_TYPEDEF(highp_i16, aligned_highp_i16, 2)'],['../a00781.html#ga9c8172b745ee03fc5b2b91c350c2922f',1,'glm::GLM_ALIGNED_TYPEDEF(highp_i32, aligned_highp_i32, 4)'],['../a00781.html#ga77e0dff12aa4020ddc3f8cabbea7b2e6',1,'glm::GLM_ALIGNED_TYPEDEF(highp_i64, aligned_highp_i64, 8)'],['../a00781.html#gabd82b9faa9d4d618dbbe0fc8a1efee63',1,'glm::GLM_ALIGNED_TYPEDEF(int8, aligned_int8, 1)'],['../a00781.html#ga285649744560be21000cfd81bbb5d507',1,'glm::GLM_ALIGNED_TYPEDEF(int16, aligned_int16, 2)'],['../a00781.html#ga07732da630b2deda428ce95c0ecaf3ff',1,'glm::GLM_ALIGNED_TYPEDEF(int32, aligned_int32, 4)'],['../a00781.html#ga1a8da2a8c51f69c07a2e7f473aa420f4',1,'glm::GLM_ALIGNED_TYPEDEF(int64, aligned_int64, 8)'],['../a00781.html#ga848aedf13e2d9738acf0bb482c590174',1,'glm::GLM_ALIGNED_TYPEDEF(int8_t, aligned_int8_t, 1)'],['../a00781.html#gafd2803d39049dd45a37a63931e25d943',1,'glm::GLM_ALIGNED_TYPEDEF(int16_t, aligned_int16_t, 2)'],['../a00781.html#gae553b33349d6da832cf0724f1e024094',1,'glm::GLM_ALIGNED_TYPEDEF(int32_t, aligned_int32_t, 4)'],['../a00781.html#ga16d223a2b3409e812e1d3bd87f0e9e5c',1,'glm::GLM_ALIGNED_TYPEDEF(int64_t, aligned_int64_t, 8)'],['../a00781.html#ga2de065d2ddfdb366bcd0febca79ae2ad',1,'glm::GLM_ALIGNED_TYPEDEF(i8, aligned_i8, 1)'],['../a00781.html#gabd786bdc20a11c8cb05c92c8212e28d3',1,'glm::GLM_ALIGNED_TYPEDEF(i16, aligned_i16, 2)'],['../a00781.html#gad4aefe56691cdb640c72f0d46d3fb532',1,'glm::GLM_ALIGNED_TYPEDEF(i32, aligned_i32, 4)'],['../a00781.html#ga8fe9745f7de24a8394518152ff9fccdc',1,'glm::GLM_ALIGNED_TYPEDEF(i64, aligned_i64, 8)'],['../a00781.html#gaaad735483450099f7f882d4e3a3569bd',1,'glm::GLM_ALIGNED_TYPEDEF(ivec1, aligned_ivec1, 4)'],['../a00781.html#gac7b6f823802edbd6edbaf70ea25bf068',1,'glm::GLM_ALIGNED_TYPEDEF(ivec2, aligned_ivec2, 8)'],['../a00781.html#ga3e235bcd2b8029613f25b8d40a2d3ef7',1,'glm::GLM_ALIGNED_TYPEDEF(ivec3, aligned_ivec3, 16)'],['../a00781.html#ga50d8a9523968c77f8325b4c9bfbff41e',1,'glm::GLM_ALIGNED_TYPEDEF(ivec4, aligned_ivec4, 16)'],['../a00781.html#ga9ec20fdfb729c702032da9378c79679f',1,'glm::GLM_ALIGNED_TYPEDEF(i8vec1, aligned_i8vec1, 1)'],['../a00781.html#ga25b3fe1d9e8d0a5e86c1949c1acd8131',1,'glm::GLM_ALIGNED_TYPEDEF(i8vec2, aligned_i8vec2, 2)'],['../a00781.html#ga2958f907719d94d8109b562540c910e2',1,'glm::GLM_ALIGNED_TYPEDEF(i8vec3, aligned_i8vec3, 4)'],['../a00781.html#ga1fe6fc032a978f1c845fac9aa0668714',1,'glm::GLM_ALIGNED_TYPEDEF(i8vec4, aligned_i8vec4, 4)'],['../a00781.html#gaa4161e7a496dc96972254143fe873e55',1,'glm::GLM_ALIGNED_TYPEDEF(i16vec1, aligned_i16vec1, 2)'],['../a00781.html#ga9d7cb211ccda69b1c22ddeeb0f3e7aba',1,'glm::GLM_ALIGNED_TYPEDEF(i16vec2, aligned_i16vec2, 4)'],['../a00781.html#gaaee91dd2ab34423bcc11072ef6bd0f02',1,'glm::GLM_ALIGNED_TYPEDEF(i16vec3, aligned_i16vec3, 8)'],['../a00781.html#ga49f047ccaa8b31fad9f26c67bf9b3510',1,'glm::GLM_ALIGNED_TYPEDEF(i16vec4, aligned_i16vec4, 8)'],['../a00781.html#ga904e9c2436bb099397c0823506a0771f',1,'glm::GLM_ALIGNED_TYPEDEF(i32vec1, aligned_i32vec1, 4)'],['../a00781.html#gaf90651cf2f5e7ee2b11cfdc5a6749534',1,'glm::GLM_ALIGNED_TYPEDEF(i32vec2, aligned_i32vec2, 8)'],['../a00781.html#ga7354a4ead8cb17868aec36b9c30d6010',1,'glm::GLM_ALIGNED_TYPEDEF(i32vec3, aligned_i32vec3, 16)'],['../a00781.html#gad2ecbdea18732163e2636e27b37981ee',1,'glm::GLM_ALIGNED_TYPEDEF(i32vec4, aligned_i32vec4, 16)'],['../a00781.html#ga965b1c9aa1800e93d4abc2eb2b5afcbf',1,'glm::GLM_ALIGNED_TYPEDEF(i64vec1, aligned_i64vec1, 8)'],['../a00781.html#ga1f9e9c2ea2768675dff9bae5cde2d829',1,'glm::GLM_ALIGNED_TYPEDEF(i64vec2, aligned_i64vec2, 16)'],['../a00781.html#gad77c317b7d942322cd5be4c8127b3187',1,'glm::GLM_ALIGNED_TYPEDEF(i64vec3, aligned_i64vec3, 32)'],['../a00781.html#ga716f8ea809bdb11b5b542d8b71aeb04f',1,'glm::GLM_ALIGNED_TYPEDEF(i64vec4, aligned_i64vec4, 32)'],['../a00781.html#gad46f8e9082d5878b1bc04f9c1471cdaa',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_uint8, aligned_lowp_uint8, 1)'],['../a00781.html#ga1246094581af624aca6c7499aaabf801',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_uint16, aligned_lowp_uint16, 2)'],['../a00781.html#ga7a5009a1d0196bbf21dd7518f61f0249',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_uint32, aligned_lowp_uint32, 4)'],['../a00781.html#ga45213fd18b3bb1df391671afefe4d1e7',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_uint64, aligned_lowp_uint64, 8)'],['../a00781.html#ga0ba26b4e3fd9ecbc25358efd68d8a4ca',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_uint8_t, aligned_lowp_uint8_t, 1)'],['../a00781.html#gaf2b58f5fb6d4ec8ce7b76221d3af43e1',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_uint16_t, aligned_lowp_uint16_t, 2)'],['../a00781.html#gadc246401847dcba155f0699425e49dcd',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_uint32_t, aligned_lowp_uint32_t, 4)'],['../a00781.html#gaace64bddf51a9def01498da9a94fb01c',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_uint64_t, aligned_lowp_uint64_t, 8)'],['../a00781.html#gad7bb97c29d664bd86ffb1bed4abc5534',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_u8, aligned_lowp_u8, 1)'],['../a00781.html#ga404bba7785130e0b1384d695a9450b28',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_u16, aligned_lowp_u16, 2)'],['../a00781.html#ga31ba41fd896257536958ec6080203d2a',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_u32, aligned_lowp_u32, 4)'],['../a00781.html#gacca5f13627f57b3505676e40a6e43e5e',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_u64, aligned_lowp_u64, 8)'],['../a00781.html#ga5faf1d3e70bf33174dd7f3d01d5b883b',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_uint8, aligned_mediump_uint8, 1)'],['../a00781.html#ga727e2bf2c433bb3b0182605860a48363',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_uint16, aligned_mediump_uint16, 2)'],['../a00781.html#ga12566ca66d5962dadb4a5eb4c74e891e',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_uint32, aligned_mediump_uint32, 4)'],['../a00781.html#ga7b66a97a8acaa35c5a377b947318c6bc',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_uint64, aligned_mediump_uint64, 8)'],['../a00781.html#gaa9cde002439b74fa66120a16a9f55fcc',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_uint8_t, aligned_mediump_uint8_t, 1)'],['../a00781.html#ga1ca98c67f7d1e975f7c5202f1da1df1f',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_uint16_t, aligned_mediump_uint16_t, 2)'],['../a00781.html#ga1dc8bc6199d785f235576948d80a597c',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_uint32_t, aligned_mediump_uint32_t, 4)'],['../a00781.html#gad14a0f2ec93519682b73d70b8e401d81',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_uint64_t, aligned_mediump_uint64_t, 8)'],['../a00781.html#gada8b996eb6526dc1ead813bd49539d1b',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_u8, aligned_mediump_u8, 1)'],['../a00781.html#ga28948f6bfb52b42deb9d73ae1ea8d8b0',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_u16, aligned_mediump_u16, 2)'],['../a00781.html#gad6a7c0b5630f89d3f1c5b4ef2919bb4c',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_u32, aligned_mediump_u32, 4)'],['../a00781.html#gaa0fc531cbaa972ac3a0b86d21ef4a7fa',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_u64, aligned_mediump_u64, 8)'],['../a00781.html#ga0ee829f7b754b262bbfe6317c0d678ac',1,'glm::GLM_ALIGNED_TYPEDEF(highp_uint8, aligned_highp_uint8, 1)'],['../a00781.html#ga447848a817a626cae08cedc9778b331c',1,'glm::GLM_ALIGNED_TYPEDEF(highp_uint16, aligned_highp_uint16, 2)'],['../a00781.html#ga6027ae13b2734f542a6e7beee11b8820',1,'glm::GLM_ALIGNED_TYPEDEF(highp_uint32, aligned_highp_uint32, 4)'],['../a00781.html#ga2aca46c8608c95ef991ee4c332acde5f',1,'glm::GLM_ALIGNED_TYPEDEF(highp_uint64, aligned_highp_uint64, 8)'],['../a00781.html#gaff50b10dd1c48be324fdaffd18e2c7ea',1,'glm::GLM_ALIGNED_TYPEDEF(highp_uint8_t, aligned_highp_uint8_t, 1)'],['../a00781.html#ga9fc4421dbb833d5461e6d4e59dcfde55',1,'glm::GLM_ALIGNED_TYPEDEF(highp_uint16_t, aligned_highp_uint16_t, 2)'],['../a00781.html#ga329f1e2b94b33ba5e3918197030bcf03',1,'glm::GLM_ALIGNED_TYPEDEF(highp_uint32_t, aligned_highp_uint32_t, 4)'],['../a00781.html#ga71e646f7e301aa422328194162c9c998',1,'glm::GLM_ALIGNED_TYPEDEF(highp_uint64_t, aligned_highp_uint64_t, 8)'],['../a00781.html#ga8942e09f479489441a7a5004c6d8cb66',1,'glm::GLM_ALIGNED_TYPEDEF(highp_u8, aligned_highp_u8, 1)'],['../a00781.html#gaab32497d6e4db16ee439dbedd64c5865',1,'glm::GLM_ALIGNED_TYPEDEF(highp_u16, aligned_highp_u16, 2)'],['../a00781.html#gaaadbb34952eca8e3d7fe122c3e167742',1,'glm::GLM_ALIGNED_TYPEDEF(highp_u32, aligned_highp_u32, 4)'],['../a00781.html#ga92024d27c74a3650afb55ec8e024ed25',1,'glm::GLM_ALIGNED_TYPEDEF(highp_u64, aligned_highp_u64, 8)'],['../a00781.html#gabde1d0b4072df35453db76075ab896a6',1,'glm::GLM_ALIGNED_TYPEDEF(uint8, aligned_uint8, 1)'],['../a00781.html#ga06c296c9e398b294c8c9dd2a7693dcbb',1,'glm::GLM_ALIGNED_TYPEDEF(uint16, aligned_uint16, 2)'],['../a00781.html#gacf1744488c96ebd33c9f36ad33b2010a',1,'glm::GLM_ALIGNED_TYPEDEF(uint32, aligned_uint32, 4)'],['../a00781.html#ga3328061a64c20ba59d5f9da24c2cd059',1,'glm::GLM_ALIGNED_TYPEDEF(uint64, aligned_uint64, 8)'],['../a00781.html#gaf6ced36f13bae57f377bafa6f5fcc299',1,'glm::GLM_ALIGNED_TYPEDEF(uint8_t, aligned_uint8_t, 1)'],['../a00781.html#gafbc7fb7847bfc78a339d1d371c915c73',1,'glm::GLM_ALIGNED_TYPEDEF(uint16_t, aligned_uint16_t, 2)'],['../a00781.html#gaa86bc56a73fd8120b1121b5f5e6245ae',1,'glm::GLM_ALIGNED_TYPEDEF(uint32_t, aligned_uint32_t, 4)'],['../a00781.html#ga68c0b9e669060d0eb5ab8c3ddeb483d8',1,'glm::GLM_ALIGNED_TYPEDEF(uint64_t, aligned_uint64_t, 8)'],['../a00781.html#ga4f3bab577daf3343e99cc005134bce86',1,'glm::GLM_ALIGNED_TYPEDEF(u8, aligned_u8, 1)'],['../a00781.html#ga13a2391339d0790d43b76d00a7611c4f',1,'glm::GLM_ALIGNED_TYPEDEF(u16, aligned_u16, 2)'],['../a00781.html#ga197570e03acbc3d18ab698e342971e8f',1,'glm::GLM_ALIGNED_TYPEDEF(u32, aligned_u32, 4)'],['../a00781.html#ga0f033b21e145a1faa32c62ede5878993',1,'glm::GLM_ALIGNED_TYPEDEF(u64, aligned_u64, 8)'],['../a00781.html#ga509af83527f5cd512e9a7873590663aa',1,'glm::GLM_ALIGNED_TYPEDEF(uvec1, aligned_uvec1, 4)'],['../a00781.html#ga94e86186978c502c6dc0c0d9c4a30679',1,'glm::GLM_ALIGNED_TYPEDEF(uvec2, aligned_uvec2, 8)'],['../a00781.html#ga5cec574686a7f3c8ed24bb195c5e2d0a',1,'glm::GLM_ALIGNED_TYPEDEF(uvec3, aligned_uvec3, 16)'],['../a00781.html#ga47edfdcee9c89b1ebdaf20450323b1d4',1,'glm::GLM_ALIGNED_TYPEDEF(uvec4, aligned_uvec4, 16)'],['../a00781.html#ga5611d6718e3a00096918a64192e73a45',1,'glm::GLM_ALIGNED_TYPEDEF(u8vec1, aligned_u8vec1, 1)'],['../a00781.html#ga19837e6f72b60d994a805ef564c6c326',1,'glm::GLM_ALIGNED_TYPEDEF(u8vec2, aligned_u8vec2, 2)'],['../a00781.html#ga9740cf8e34f068049b42a2753f9601c2',1,'glm::GLM_ALIGNED_TYPEDEF(u8vec3, aligned_u8vec3, 4)'],['../a00781.html#ga8b8588bb221448f5541a858903822a57',1,'glm::GLM_ALIGNED_TYPEDEF(u8vec4, aligned_u8vec4, 4)'],['../a00781.html#ga991abe990c16de26b2129d6bc2f4c051',1,'glm::GLM_ALIGNED_TYPEDEF(u16vec1, aligned_u16vec1, 2)'],['../a00781.html#gac01bb9fc32a1cd76c2b80d030f71df4c',1,'glm::GLM_ALIGNED_TYPEDEF(u16vec2, aligned_u16vec2, 4)'],['../a00781.html#ga09540dbca093793a36a8997e0d4bee77',1,'glm::GLM_ALIGNED_TYPEDEF(u16vec3, aligned_u16vec3, 8)'],['../a00781.html#gaecafb5996f5a44f57e34d29c8670741e',1,'glm::GLM_ALIGNED_TYPEDEF(u16vec4, aligned_u16vec4, 8)'],['../a00781.html#gac6b161a04d2f8408fe1c9d857e8daac0',1,'glm::GLM_ALIGNED_TYPEDEF(u32vec1, aligned_u32vec1, 4)'],['../a00781.html#ga1fa0dfc8feb0fa17dab2acd43e05342b',1,'glm::GLM_ALIGNED_TYPEDEF(u32vec2, aligned_u32vec2, 8)'],['../a00781.html#ga0019500abbfa9c66eff61ca75eaaed94',1,'glm::GLM_ALIGNED_TYPEDEF(u32vec3, aligned_u32vec3, 16)'],['../a00781.html#ga14fd29d01dae7b08a04e9facbcc18824',1,'glm::GLM_ALIGNED_TYPEDEF(u32vec4, aligned_u32vec4, 16)'],['../a00781.html#gab253845f534a67136f9619843cade903',1,'glm::GLM_ALIGNED_TYPEDEF(u64vec1, aligned_u64vec1, 8)'],['../a00781.html#ga929427a7627940cdf3304f9c050b677d',1,'glm::GLM_ALIGNED_TYPEDEF(u64vec2, aligned_u64vec2, 16)'],['../a00781.html#gae373b6c04fdf9879f33d63e6949c037e',1,'glm::GLM_ALIGNED_TYPEDEF(u64vec3, aligned_u64vec3, 32)'],['../a00781.html#ga53a8a03dca2015baec4584f45b8e9cdc',1,'glm::GLM_ALIGNED_TYPEDEF(u64vec4, aligned_u64vec4, 32)'],['../a00781.html#gab3301bae94ef5bf59fbdd9a24e7d2a01',1,'glm::GLM_ALIGNED_TYPEDEF(float32, aligned_float32, 4)'],['../a00781.html#gada9b0bea273d3ae0286f891533b9568f',1,'glm::GLM_ALIGNED_TYPEDEF(float32_t, aligned_float32_t, 4)'],['../a00781.html#gadbce23b9f23d77bb3884e289a574ebd5',1,'glm::GLM_ALIGNED_TYPEDEF(float32, aligned_f32, 4)'],['../a00781.html#ga75930684ff2233171c573e603f216162',1,'glm::GLM_ALIGNED_TYPEDEF(float64, aligned_float64, 8)'],['../a00781.html#ga6e3a2d83b131336219a0f4c7cbba2a48',1,'glm::GLM_ALIGNED_TYPEDEF(float64_t, aligned_float64_t, 8)'],['../a00781.html#gaa4deaa0dea930c393d55e7a4352b0a20',1,'glm::GLM_ALIGNED_TYPEDEF(float64, aligned_f64, 8)'],['../a00781.html#ga81bc497b2bfc6f80bab690c6ee28f0f9',1,'glm::GLM_ALIGNED_TYPEDEF(vec1, aligned_vec1, 4)'],['../a00781.html#gada3e8f783e9d4b90006695a16c39d4d4',1,'glm::GLM_ALIGNED_TYPEDEF(vec2, aligned_vec2, 8)'],['../a00781.html#gab8d081fac3a38d6f55fa552f32168d32',1,'glm::GLM_ALIGNED_TYPEDEF(vec3, aligned_vec3, 16)'],['../a00781.html#ga12fe7b9769c964c5b48dcfd8b7f40198',1,'glm::GLM_ALIGNED_TYPEDEF(vec4, aligned_vec4, 16)'],['../a00781.html#gaefab04611c7f8fe1fd9be3071efea6cc',1,'glm::GLM_ALIGNED_TYPEDEF(fvec1, aligned_fvec1, 4)'],['../a00781.html#ga2543c05ba19b3bd19d45b1227390c5b4',1,'glm::GLM_ALIGNED_TYPEDEF(fvec2, aligned_fvec2, 8)'],['../a00781.html#ga009afd727fd657ef33a18754d6d28f60',1,'glm::GLM_ALIGNED_TYPEDEF(fvec3, aligned_fvec3, 16)'],['../a00781.html#ga2f26177e74bfb301a3d0e02ec3c3ef53',1,'glm::GLM_ALIGNED_TYPEDEF(fvec4, aligned_fvec4, 16)'],['../a00781.html#ga309f495a1d6b75ddf195b674b65cb1e4',1,'glm::GLM_ALIGNED_TYPEDEF(f32vec1, aligned_f32vec1, 4)'],['../a00781.html#ga5e185865a2217d0cd47187644683a8c3',1,'glm::GLM_ALIGNED_TYPEDEF(f32vec2, aligned_f32vec2, 8)'],['../a00781.html#gade4458b27b039b9ca34f8ec049f3115a',1,'glm::GLM_ALIGNED_TYPEDEF(f32vec3, aligned_f32vec3, 16)'],['../a00781.html#ga2e8a12c5e6a9c4ae4ddaeda1d1cffe3b',1,'glm::GLM_ALIGNED_TYPEDEF(f32vec4, aligned_f32vec4, 16)'],['../a00781.html#ga3e0f35fa0c626285a8bad41707e7316c',1,'glm::GLM_ALIGNED_TYPEDEF(dvec1, aligned_dvec1, 8)'],['../a00781.html#ga78bfec2f185d1d365ea0a9ef1e3d45b8',1,'glm::GLM_ALIGNED_TYPEDEF(dvec2, aligned_dvec2, 16)'],['../a00781.html#ga01fe6fee6db5df580b6724a7e681f069',1,'glm::GLM_ALIGNED_TYPEDEF(dvec3, aligned_dvec3, 32)'],['../a00781.html#ga687d5b8f551d5af32425c0b2fba15e99',1,'glm::GLM_ALIGNED_TYPEDEF(dvec4, aligned_dvec4, 32)'],['../a00781.html#ga8e842371d46842ff8f1813419ba49d0f',1,'glm::GLM_ALIGNED_TYPEDEF(f64vec1, aligned_f64vec1, 8)'],['../a00781.html#ga32814aa0f19316b43134fc25f2aad2b9',1,'glm::GLM_ALIGNED_TYPEDEF(f64vec2, aligned_f64vec2, 16)'],['../a00781.html#gaf3d3bbc1e93909b689123b085e177a14',1,'glm::GLM_ALIGNED_TYPEDEF(f64vec3, aligned_f64vec3, 32)'],['../a00781.html#ga804c654cead1139bd250f90f9bb01fad',1,'glm::GLM_ALIGNED_TYPEDEF(f64vec4, aligned_f64vec4, 32)'],['../a00781.html#gacce4ac532880b8c7469d3c31974420a1',1,'glm::GLM_ALIGNED_TYPEDEF(mat2, aligned_mat2, 16)'],['../a00781.html#ga0498e0e249a6faddaf96aa55d7f81c3b',1,'glm::GLM_ALIGNED_TYPEDEF(mat3, aligned_mat3, 16)'],['../a00781.html#ga7435d87de82a0d652b35dc5b9cc718d5',1,'glm::GLM_ALIGNED_TYPEDEF(mat4, aligned_mat4, 16)'],['../a00781.html#ga719da577361541a4c43a2dd1d0e361e1',1,'glm::GLM_ALIGNED_TYPEDEF(fmat2x2, aligned_fmat2, 16)'],['../a00781.html#ga6e7ee4f541e1d7db66cd1a224caacafb',1,'glm::GLM_ALIGNED_TYPEDEF(fmat3x3, aligned_fmat3, 16)'],['../a00781.html#gae5d672d359f2a39f63f98c7975057486',1,'glm::GLM_ALIGNED_TYPEDEF(fmat4x4, aligned_fmat4, 16)'],['../a00781.html#ga6fa2df037dbfc5fe8c8e0b4db8a34953',1,'glm::GLM_ALIGNED_TYPEDEF(fmat2x2, aligned_fmat2x2, 16)'],['../a00781.html#ga0743b4f4f69a3227b82ff58f6abbad62',1,'glm::GLM_ALIGNED_TYPEDEF(fmat2x3, aligned_fmat2x3, 16)'],['../a00781.html#ga1a76b325fdf70f961d835edd182c63dd',1,'glm::GLM_ALIGNED_TYPEDEF(fmat2x4, aligned_fmat2x4, 16)'],['../a00781.html#ga4b4e181cd041ba28c3163e7b8074aef0',1,'glm::GLM_ALIGNED_TYPEDEF(fmat3x2, aligned_fmat3x2, 16)'],['../a00781.html#ga27b13f465abc8a40705698145e222c3f',1,'glm::GLM_ALIGNED_TYPEDEF(fmat3x3, aligned_fmat3x3, 16)'],['../a00781.html#ga2608d19cc275830a6f8c0b6405625a4f',1,'glm::GLM_ALIGNED_TYPEDEF(fmat3x4, aligned_fmat3x4, 16)'],['../a00781.html#ga93f09768241358a287c4cca538f1f7e7',1,'glm::GLM_ALIGNED_TYPEDEF(fmat4x2, aligned_fmat4x2, 16)'],['../a00781.html#ga7c117e3ecca089e10247b1d41d88aff9',1,'glm::GLM_ALIGNED_TYPEDEF(fmat4x3, aligned_fmat4x3, 16)'],['../a00781.html#ga07c75cd04ba42dc37fa3e105f89455c5',1,'glm::GLM_ALIGNED_TYPEDEF(fmat4x4, aligned_fmat4x4, 16)'],['../a00781.html#ga65ff0d690a34a4d7f46f9b2eb51525ee',1,'glm::GLM_ALIGNED_TYPEDEF(f32mat2x2, aligned_f32mat2, 16)'],['../a00781.html#gadd8ddbe2bf65ccede865ba2f510176dc',1,'glm::GLM_ALIGNED_TYPEDEF(f32mat3x3, aligned_f32mat3, 16)'],['../a00781.html#gaf18dbff14bf13d3ff540c517659ec045',1,'glm::GLM_ALIGNED_TYPEDEF(f32mat4x4, aligned_f32mat4, 16)'],['../a00781.html#ga66339f6139bf7ff19e245beb33f61cc8',1,'glm::GLM_ALIGNED_TYPEDEF(f32mat2x2, aligned_f32mat2x2, 16)'],['../a00781.html#ga1558a48b3934011b52612809f443e46d',1,'glm::GLM_ALIGNED_TYPEDEF(f32mat2x3, aligned_f32mat2x3, 16)'],['../a00781.html#gaa52e5732daa62851627021ad551c7680',1,'glm::GLM_ALIGNED_TYPEDEF(f32mat2x4, aligned_f32mat2x4, 16)'],['../a00781.html#gac09663c42566bcb58d23c6781ac4e85a',1,'glm::GLM_ALIGNED_TYPEDEF(f32mat3x2, aligned_f32mat3x2, 16)'],['../a00781.html#ga3f510999e59e1b309113e1d561162b29',1,'glm::GLM_ALIGNED_TYPEDEF(f32mat3x3, aligned_f32mat3x3, 16)'],['../a00781.html#ga2c9c94f0c89cd71ce56551db6cf4aaec',1,'glm::GLM_ALIGNED_TYPEDEF(f32mat3x4, aligned_f32mat3x4, 16)'],['../a00781.html#ga99ce8274c750fbfdf0e70c95946a2875',1,'glm::GLM_ALIGNED_TYPEDEF(f32mat4x2, aligned_f32mat4x2, 16)'],['../a00781.html#ga9476ef66790239df53dbe66f3989c3b5',1,'glm::GLM_ALIGNED_TYPEDEF(f32mat4x3, aligned_f32mat4x3, 16)'],['../a00781.html#gacc429b3b0b49921e12713b6d31e14e1d',1,'glm::GLM_ALIGNED_TYPEDEF(f32mat4x4, aligned_f32mat4x4, 16)'],['../a00781.html#ga88f6c6fa06e6e64479763e69444669cf',1,'glm::GLM_ALIGNED_TYPEDEF(f64mat2x2, aligned_f64mat2, 32)'],['../a00781.html#gaae8e4639c991e64754145ab8e4c32083',1,'glm::GLM_ALIGNED_TYPEDEF(f64mat3x3, aligned_f64mat3, 32)'],['../a00781.html#ga6e9094f3feb3b5b49d0f83683a101fde',1,'glm::GLM_ALIGNED_TYPEDEF(f64mat4x4, aligned_f64mat4, 32)'],['../a00781.html#gadbd2c639c03de1c3e9591b5a39f65559',1,'glm::GLM_ALIGNED_TYPEDEF(f64mat2x2, aligned_f64mat2x2, 32)'],['../a00781.html#gab059d7b9fe2094acc563b7223987499f',1,'glm::GLM_ALIGNED_TYPEDEF(f64mat2x3, aligned_f64mat2x3, 32)'],['../a00781.html#gabbc811d1c52ed2b8cfcaff1378f75c69',1,'glm::GLM_ALIGNED_TYPEDEF(f64mat2x4, aligned_f64mat2x4, 32)'],['../a00781.html#ga9ddf5212777734d2fd841a84439f3bdf',1,'glm::GLM_ALIGNED_TYPEDEF(f64mat3x2, aligned_f64mat3x2, 32)'],['../a00781.html#gad1dda32ed09f94bfcf0a7d8edfb6cf13',1,'glm::GLM_ALIGNED_TYPEDEF(f64mat3x3, aligned_f64mat3x3, 32)'],['../a00781.html#ga5875e0fa72f07e271e7931811cbbf31a',1,'glm::GLM_ALIGNED_TYPEDEF(f64mat3x4, aligned_f64mat3x4, 32)'],['../a00781.html#ga41e82cd6ac07f912ba2a2d45799dcf0d',1,'glm::GLM_ALIGNED_TYPEDEF(f64mat4x2, aligned_f64mat4x2, 32)'],['../a00781.html#ga0892638d6ba773043b3d63d1d092622e',1,'glm::GLM_ALIGNED_TYPEDEF(f64mat4x3, aligned_f64mat4x3, 32)'],['../a00781.html#ga912a16432608b822f1e13607529934c1',1,'glm::GLM_ALIGNED_TYPEDEF(f64mat4x4, aligned_f64mat4x4, 32)'],['../a00781.html#gafd945a8ea86b042aba410e0560df9a3d',1,'glm::GLM_ALIGNED_TYPEDEF(quat, aligned_quat, 16)'],['../a00781.html#ga19c2ba545d1f2f36bcb7b60c9a228622',1,'glm::GLM_ALIGNED_TYPEDEF(quat, aligned_fquat, 16)'],['../a00781.html#gaabc28c84a3288b697605d4688686f9a9',1,'glm::GLM_ALIGNED_TYPEDEF(dquat, aligned_dquat, 32)'],['../a00781.html#ga1ed8aeb5ca67fade269a46105f1bf273',1,'glm::GLM_ALIGNED_TYPEDEF(f32quat, aligned_f32quat, 16)'],['../a00781.html#ga95cc03b8b475993fa50e05e38e203303',1,'glm::GLM_ALIGNED_TYPEDEF(f64quat, aligned_f64quat, 32)']]], + ['golden_5fratio',['golden_ratio',['../a00708.html#ga748cf8642830657c5b7eae04d0a80899',1,'glm']]], + ['gradient_5fpaint_2ehpp',['gradient_paint.hpp',['../a00497.html',1,'']]], + ['greaterthan',['greaterThan',['../a00663.html#ga8f7fa76e06c417b757ddfd438f3f677b',1,'glm::greaterThan(qua< T, Q > const &x, qua< T, Q > const &y)'],['../a00791.html#gadfdb8ea82deca869ddc7e63ea5a63ae4',1,'glm::greaterThan(vec< L, T, Q > const &x, vec< L, T, Q > const &y)']]], + ['greaterthanequal',['greaterThanEqual',['../a00663.html#ga388cbeba987dae7b5937f742efa49a5a',1,'glm::greaterThanEqual(qua< T, Q > const &x, qua< T, Q > const &y)'],['../a00791.html#ga859975f538940f8d18fe62f916b9abd7',1,'glm::greaterThanEqual(vec< L, T, Q > const &x, vec< L, T, Q > const &y)']]], + ['glm_5fgtc_5fbitfield',['GLM_GTC_bitfield',['../a00706.html',1,'']]], + ['glm_5fgtc_5fcolor_5fspace',['GLM_GTC_color_space',['../a00707.html',1,'']]], + ['glm_5fgtc_5fconstants',['GLM_GTC_constants',['../a00708.html',1,'']]], + ['glm_5fgtc_5fepsilon',['GLM_GTC_epsilon',['../a00709.html',1,'']]], + ['glm_5fgtc_5finteger',['GLM_GTC_integer',['../a00710.html',1,'']]], + ['glm_5fgtc_5fmatrix_5faccess',['GLM_GTC_matrix_access',['../a00711.html',1,'']]], + ['glm_5fgtc_5fmatrix_5finteger',['GLM_GTC_matrix_integer',['../a00712.html',1,'']]], + ['glm_5fgtc_5fmatrix_5finverse',['GLM_GTC_matrix_inverse',['../a00713.html',1,'']]], + ['glm_5fgtc_5fmatrix_5ftransform',['GLM_GTC_matrix_transform',['../a00714.html',1,'']]], + ['glm_5fgtc_5fnoise',['GLM_GTC_noise',['../a00715.html',1,'']]], + ['glm_5fgtc_5fpacking',['GLM_GTC_packing',['../a00716.html',1,'']]], + ['glm_5fgtc_5fquaternion',['GLM_GTC_quaternion',['../a00663.html',1,'']]], + ['glm_5fgtc_5frandom',['GLM_GTC_random',['../a00717.html',1,'']]], + ['glm_5fgtc_5freciprocal',['GLM_GTC_reciprocal',['../a00718.html',1,'']]], + ['glm_5fgtc_5fround',['GLM_GTC_round',['../a00719.html',1,'']]], + ['glm_5fgtc_5ftype_5faligned',['GLM_GTC_type_aligned',['../a00720.html',1,'']]], + ['glm_5fgtc_5ftype_5fprecision',['GLM_GTC_type_precision',['../a00721.html',1,'']]], + ['glm_5fgtc_5ftype_5fptr',['GLM_GTC_type_ptr',['../a00722.html',1,'']]], + ['glm_5fgtc_5fulp',['GLM_GTC_ulp',['../a00723.html',1,'']]], + ['glm_5fgtc_5fvec1',['GLM_GTC_vec1',['../a00724.html',1,'']]], + ['glm_5fgtx_5fassociated_5fmin_5fmax',['GLM_GTX_associated_min_max',['../a00725.html',1,'']]], + ['glm_5fgtx_5fbit',['GLM_GTX_bit',['../a00726.html',1,'']]], + ['glm_5fgtx_5fclosest_5fpoint',['GLM_GTX_closest_point',['../a00727.html',1,'']]], + ['glm_5fgtx_5fcolor_5fencoding',['GLM_GTX_color_encoding',['../a00728.html',1,'']]], + ['glm_5fgtx_5fcolor_5fspace',['GLM_GTX_color_space',['../a00729.html',1,'']]], + ['glm_5fgtx_5fcolor_5fspace_5fycocg',['GLM_GTX_color_space_YCoCg',['../a00730.html',1,'']]], + ['glm_5fgtx_5fcommon',['GLM_GTX_common',['../a00731.html',1,'']]], + ['glm_5fgtx_5fcompatibility',['GLM_GTX_compatibility',['../a00732.html',1,'']]], + ['glm_5fgtx_5fcomponent_5fwise',['GLM_GTX_component_wise',['../a00733.html',1,'']]], + ['glm_5fgtx_5fdual_5fquaternion',['GLM_GTX_dual_quaternion',['../a00734.html',1,'']]], + ['glm_5fgtx_5feasing',['GLM_GTX_easing',['../a00735.html',1,'']]], + ['glm_5fgtx_5feuler_5fangles',['GLM_GTX_euler_angles',['../a00736.html',1,'']]], + ['glm_5fgtx_5fextend',['GLM_GTX_extend',['../a00737.html',1,'']]], + ['glm_5fgtx_5fextented_5fmin_5fmax',['GLM_GTX_extented_min_max',['../a00738.html',1,'']]], + ['glm_5fgtx_5fexterior_5fproduct',['GLM_GTX_exterior_product',['../a00739.html',1,'']]], + ['glm_5fgtx_5ffast_5fexponential',['GLM_GTX_fast_exponential',['../a00740.html',1,'']]], + ['glm_5fgtx_5ffast_5fsquare_5froot',['GLM_GTX_fast_square_root',['../a00741.html',1,'']]], + ['glm_5fgtx_5ffast_5ftrigonometry',['GLM_GTX_fast_trigonometry',['../a00742.html',1,'']]], + ['glm_5fgtx_5ffunctions',['GLM_GTX_functions',['../a00743.html',1,'']]], + ['glm_5fgtx_5fgradient_5fpaint',['GLM_GTX_gradient_paint',['../a00744.html',1,'']]], + ['glm_5fgtx_5fhanded_5fcoordinate_5fspace',['GLM_GTX_handed_coordinate_space',['../a00745.html',1,'']]], + ['glm_5fgtx_5fhash',['GLM_GTX_hash',['../a00746.html',1,'']]], + ['glm_5fgtx_5finteger',['GLM_GTX_integer',['../a00747.html',1,'']]], + ['glm_5fgtx_5fintersect',['GLM_GTX_intersect',['../a00748.html',1,'']]], + ['glm_5fgtx_5fio',['GLM_GTX_io',['../a00749.html',1,'']]], + ['glm_5fgtx_5flog_5fbase',['GLM_GTX_log_base',['../a00750.html',1,'']]], + ['glm_5fgtx_5fmatrix_5fcross_5fproduct',['GLM_GTX_matrix_cross_product',['../a00751.html',1,'']]], + ['glm_5fgtx_5fmatrix_5fdecompose',['GLM_GTX_matrix_decompose',['../a00752.html',1,'']]], + ['glm_5fgtx_5fmatrix_5ffactorisation',['GLM_GTX_matrix_factorisation',['../a00753.html',1,'']]], + ['glm_5fgtx_5fmatrix_5finterpolation',['GLM_GTX_matrix_interpolation',['../a00754.html',1,'']]], + ['glm_5fgtx_5fmatrix_5fmajor_5fstorage',['GLM_GTX_matrix_major_storage',['../a00755.html',1,'']]], + ['glm_5fgtx_5fmatrix_5foperation',['GLM_GTX_matrix_operation',['../a00756.html',1,'']]], + ['glm_5fgtx_5fmatrix_5fquery',['GLM_GTX_matrix_query',['../a00757.html',1,'']]], + ['glm_5fgtx_5fmatrix_5ftransform_5f2d',['GLM_GTX_matrix_transform_2d',['../a00758.html',1,'']]], + ['glm_5fgtx_5fmixed_5fproducte',['GLM_GTX_mixed_producte',['../a00759.html',1,'']]], + ['glm_5fgtx_5fnorm',['GLM_GTX_norm',['../a00760.html',1,'']]], + ['glm_5fgtx_5fnormal',['GLM_GTX_normal',['../a00761.html',1,'']]], + ['glm_5fgtx_5fnormalize_5fdot',['GLM_GTX_normalize_dot',['../a00762.html',1,'']]], + ['glm_5fgtx_5fnumber_5fprecision',['GLM_GTX_number_precision',['../a00763.html',1,'']]], + ['glm_5fgtx_5foptimum_5fpow',['GLM_GTX_optimum_pow',['../a00764.html',1,'']]], + ['glm_5fgtx_5forthonormalize',['GLM_GTX_orthonormalize',['../a00765.html',1,'']]], + ['glm_5fgtx_5fperpendicular',['GLM_GTX_perpendicular',['../a00766.html',1,'']]], + ['glm_5fgtx_5fpolar_5fcoordinates',['GLM_GTX_polar_coordinates',['../a00767.html',1,'']]], + ['glm_5fgtx_5fprojection',['GLM_GTX_projection',['../a00768.html',1,'']]], + ['glm_5fgtx_5fquaternion',['GLM_GTX_quaternion',['../a00769.html',1,'']]], + ['glm_5fgtx_5frange',['GLM_GTX_range',['../a00770.html',1,'']]], + ['glm_5fgtx_5fraw_5fdata',['GLM_GTX_raw_data',['../a00771.html',1,'']]], + ['glm_5fgtx_5frotate_5fnormalized_5faxis',['GLM_GTX_rotate_normalized_axis',['../a00772.html',1,'']]], + ['glm_5fgtx_5frotate_5fvector',['GLM_GTX_rotate_vector',['../a00773.html',1,'']]], + ['glm_5fgtx_5fscalar_5frelational',['GLM_GTX_scalar_relational',['../a00774.html',1,'']]], + ['glm_5fgtx_5fspline',['GLM_GTX_spline',['../a00775.html',1,'']]], + ['glm_5fgtx_5fstd_5fbased_5ftype',['GLM_GTX_std_based_type',['../a00776.html',1,'']]], + ['glm_5fgtx_5fstring_5fcast',['GLM_GTX_string_cast',['../a00777.html',1,'']]], + ['glm_5fgtx_5ftexture',['GLM_GTX_texture',['../a00778.html',1,'']]], + ['glm_5fgtx_5ftransform',['GLM_GTX_transform',['../a00779.html',1,'']]], + ['glm_5fgtx_5ftransform2',['GLM_GTX_transform2',['../a00780.html',1,'']]], + ['glm_5fgtx_5ftype_5faligned',['GLM_GTX_type_aligned',['../a00781.html',1,'']]], + ['glm_5fgtx_5ftype_5ftrait',['GLM_GTX_type_trait',['../a00782.html',1,'']]], + ['glm_5fgtx_5fvec_5fswizzle',['GLM_GTX_vec_swizzle',['../a00783.html',1,'']]], + ['glm_5fgtx_5fvector_5fangle',['GLM_GTX_vector_angle',['../a00784.html',1,'']]], + ['glm_5fgtx_5fvector_5fquery',['GLM_GTX_vector_query',['../a00785.html',1,'']]], + ['glm_5fgtx_5fwrap',['GLM_GTX_wrap',['../a00786.html',1,'']]], + ['integer_2ehpp',['integer.hpp',['../a01355.html',1,'(Global Namespace)'],['../a01358.html',1,'(Global Namespace)']]], + ['matrix_5ftransform_2ehpp',['matrix_transform.hpp',['../a01364.html',1,'']]], + ['packing_2ehpp',['packing.hpp',['../a01367.html',1,'']]], + ['quaternion_2ehpp',['quaternion.hpp',['../a01370.html',1,'(Global Namespace)'],['../a01373.html',1,'(Global Namespace)']]], + ['scalar_5frelational_2ehpp',['scalar_relational.hpp',['../a01379.html',1,'']]], + ['type_5faligned_2ehpp',['type_aligned.hpp',['../a01382.html',1,'(Global Namespace)'],['../a01385.html',1,'(Global Namespace)']]] +]; diff --git a/common/glm/doc/api/search/all_7.html b/common/glm/doc/api/search/all_7.html new file mode 100644 index 000000000..88acd9466 --- /dev/null +++ b/common/glm/doc/api/search/all_7.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/all_7.js b/common/glm/doc/api/search/all_7.js new file mode 100644 index 000000000..e86eae01f --- /dev/null +++ b/common/glm/doc/api/search/all_7.js @@ -0,0 +1,194 @@ +var searchData= +[ + ['half_5fpi',['half_pi',['../a00708.html#ga0c36b41d462e45641faf7d7938948bac',1,'glm']]], + ['handed_5fcoordinate_5fspace_2ehpp',['handed_coordinate_space.hpp',['../a00500.html',1,'']]], + ['hash_2ehpp',['hash.hpp',['../a00503.html',1,'']]], + ['hermite',['hermite',['../a00775.html#gaa69e143f6374d32f934a8edeaa50bac9',1,'glm']]], + ['highestbitvalue',['highestBitValue',['../a00726.html#ga0dcc8fe7c3d3ad60dea409281efa3d05',1,'glm::highestBitValue(genIUType Value)'],['../a00726.html#ga898ef075ccf809a1e480faab48fe96bf',1,'glm::highestBitValue(vec< L, T, Q > const &value)']]], + ['highp_5fbvec1',['highp_bvec1',['../a00686.html#gae8a1e14abae1387274f57741750c06a2',1,'glm']]], + ['highp_5fbvec2',['highp_bvec2',['../a00700.html#gac6c781a85f012d77a75310a3058702c2',1,'glm']]], + ['highp_5fbvec3',['highp_bvec3',['../a00700.html#gaedb70027d89a0a405046aefda4eabaa6',1,'glm']]], + ['highp_5fbvec4',['highp_bvec4',['../a00700.html#gaee663ff64429443ab07a5327074192f6',1,'glm']]], + ['highp_5fddualquat',['highp_ddualquat',['../a00734.html#ga8f67eafa7197d7a668dad5105a463d2a',1,'glm']]], + ['highp_5fdmat2',['highp_dmat2',['../a00702.html#ga369b447bb1b312449b679ea1f90f3cea',1,'glm']]], + ['highp_5fdmat2x2',['highp_dmat2x2',['../a00702.html#gae27ac20302c2e39b6c78e7fe18e62ef7',1,'glm']]], + ['highp_5fdmat2x3',['highp_dmat2x3',['../a00702.html#gad4689ec33bc2c26e10132b174b49001a',1,'glm']]], + ['highp_5fdmat2x4',['highp_dmat2x4',['../a00702.html#ga5ceeb46670fdc000a0701910cc5061c9',1,'glm']]], + ['highp_5fdmat3',['highp_dmat3',['../a00702.html#ga86d6d4dbad92ffdcc759773340e15a97',1,'glm']]], + ['highp_5fdmat3x2',['highp_dmat3x2',['../a00702.html#ga3647309010a2160e9ec89bc6f7c95c35',1,'glm']]], + ['highp_5fdmat3x3',['highp_dmat3x3',['../a00702.html#gae367ea93c4ad8a7c101dd27b8b2b04ce',1,'glm']]], + ['highp_5fdmat3x4',['highp_dmat3x4',['../a00702.html#ga6543eeeb64f48d79a0b96484308c50f0',1,'glm']]], + ['highp_5fdmat4',['highp_dmat4',['../a00702.html#ga945254f459860741138bceb74da496b9',1,'glm']]], + ['highp_5fdmat4x2',['highp_dmat4x2',['../a00702.html#gaeda1f474c668eaecc443bea85a4a4eca',1,'glm']]], + ['highp_5fdmat4x3',['highp_dmat4x3',['../a00702.html#gacf237c2d8832fe8db2d7e187585d34bd',1,'glm']]], + ['highp_5fdmat4x4',['highp_dmat4x4',['../a00702.html#ga118d24a3d12c034e7cccef7bf2f01b8a',1,'glm']]], + ['highp_5fdquat',['highp_dquat',['../a00671.html#gaf13a25f41afc03480b40fc71bd249cec',1,'glm']]], + ['highp_5fdualquat',['highp_dualquat',['../a00734.html#ga9ef5bf1da52a9d4932335a517086ceaf',1,'glm']]], + ['highp_5fdvec1',['highp_dvec1',['../a00689.html#ga77c22c4426da3a6865c88d3fc907e3fe',1,'glm']]], + ['highp_5fdvec2',['highp_dvec2',['../a00700.html#gab98d77cca255914f5e29697fcbc2d975',1,'glm']]], + ['highp_5fdvec3',['highp_dvec3',['../a00700.html#gab24dc20dcdc5b71282634bdbf6b70105',1,'glm']]], + ['highp_5fdvec4',['highp_dvec4',['../a00700.html#gab654f4ed4a99d64a6cfc65320c2a7590',1,'glm']]], + ['highp_5ff32',['highp_f32',['../a00721.html#ga6906e1ef0b34064b4b675489c5c38725',1,'glm']]], + ['highp_5ff32mat2',['highp_f32mat2',['../a00721.html#ga298f7d4d273678d0282812368da27fda',1,'glm']]], + ['highp_5ff32mat2x2',['highp_f32mat2x2',['../a00721.html#gae5eb02d92b7d4605a4b7f37ae5cb2968',1,'glm']]], + ['highp_5ff32mat2x3',['highp_f32mat2x3',['../a00721.html#ga0aeb5cb001473b08c88175012708a379',1,'glm']]], + ['highp_5ff32mat2x4',['highp_f32mat2x4',['../a00721.html#ga88938ee1e7981fa3402e88da6ad74531',1,'glm']]], + ['highp_5ff32mat3',['highp_f32mat3',['../a00721.html#ga24f9ef3263b1638564713892cc37981f',1,'glm']]], + ['highp_5ff32mat3x2',['highp_f32mat3x2',['../a00721.html#ga36537e701456f12c20e73f469cac4967',1,'glm']]], + ['highp_5ff32mat3x3',['highp_f32mat3x3',['../a00721.html#gaab691ae40c37976d268d8cac0096e0e1',1,'glm']]], + ['highp_5ff32mat3x4',['highp_f32mat3x4',['../a00721.html#gaa5086dbd6efb272d13fc88829330861d',1,'glm']]], + ['highp_5ff32mat4',['highp_f32mat4',['../a00721.html#ga14c90ca49885723f51d06e295587236f',1,'glm']]], + ['highp_5ff32mat4x2',['highp_f32mat4x2',['../a00721.html#ga602e119c6b246b4f6edcf66845f2aa0f',1,'glm']]], + ['highp_5ff32mat4x3',['highp_f32mat4x3',['../a00721.html#ga66bffdd8e5c0d3ef9958bbab9ca1ba59',1,'glm']]], + ['highp_5ff32mat4x4',['highp_f32mat4x4',['../a00721.html#gaf1b712b97b2322685fbbed28febe5f84',1,'glm']]], + ['highp_5ff32quat',['highp_f32quat',['../a00721.html#ga4252cf7f5b0e3cd47c3d3badf0ef43b3',1,'glm']]], + ['highp_5ff32vec1',['highp_f32vec1',['../a00721.html#gab1b1c9e8667902b78b2c330e4d383a61',1,'glm']]], + ['highp_5ff32vec2',['highp_f32vec2',['../a00721.html#ga0b8ebd4262331e139ff257d7cf2a4b77',1,'glm']]], + ['highp_5ff32vec3',['highp_f32vec3',['../a00721.html#ga522775dbcc6d96246a1c5cf02344fd8c',1,'glm']]], + ['highp_5ff32vec4',['highp_f32vec4',['../a00721.html#ga0f038d4e09862a74f03d102c59eda73e',1,'glm']]], + ['highp_5ff64',['highp_f64',['../a00721.html#ga51d5266017d88f62737c1973923a7cf4',1,'glm']]], + ['highp_5ff64mat2',['highp_f64mat2',['../a00721.html#gaf7adb92ce8de0afaff01436b039fd924',1,'glm']]], + ['highp_5ff64mat2x2',['highp_f64mat2x2',['../a00721.html#ga773ea237a051827cfc20de960bc73ff0',1,'glm']]], + ['highp_5ff64mat2x3',['highp_f64mat2x3',['../a00721.html#ga8342c7469384c6d769cacc9e309278d9',1,'glm']]], + ['highp_5ff64mat2x4',['highp_f64mat2x4',['../a00721.html#ga5a67a7440b9c0d1538533540f99036a5',1,'glm']]], + ['highp_5ff64mat3',['highp_f64mat3',['../a00721.html#ga609bf0ace941d6ab1bb2f9522a04e546',1,'glm']]], + ['highp_5ff64mat3x2',['highp_f64mat3x2',['../a00721.html#ga5bdbfb4ce7d05ce1e1b663f50be17e8a',1,'glm']]], + ['highp_5ff64mat3x3',['highp_f64mat3x3',['../a00721.html#ga7c2cadb9b85cc7e0d125db21ca19dea4',1,'glm']]], + ['highp_5ff64mat3x4',['highp_f64mat3x4',['../a00721.html#gad310b1dddeec9ec837a104e7db8de580',1,'glm']]], + ['highp_5ff64mat4',['highp_f64mat4',['../a00721.html#gad308e0ed27d64daa4213fb257fcbd5a5',1,'glm']]], + ['highp_5ff64mat4x2',['highp_f64mat4x2',['../a00721.html#ga58c4631421e323e252fc716b6103e38c',1,'glm']]], + ['highp_5ff64mat4x3',['highp_f64mat4x3',['../a00721.html#gae94823d65648e44d972863c6caa13103',1,'glm']]], + ['highp_5ff64mat4x4',['highp_f64mat4x4',['../a00721.html#ga09a2374b725c4246d263ee36fb66434c',1,'glm']]], + ['highp_5ff64quat',['highp_f64quat',['../a00721.html#gafcfdd74a115163af2ce1093551747352',1,'glm']]], + ['highp_5ff64vec1',['highp_f64vec1',['../a00721.html#ga62c31b133ceee9984fbee05ac4c434a9',1,'glm']]], + ['highp_5ff64vec2',['highp_f64vec2',['../a00721.html#ga670ea1b0a1172bc73b1d7c1e0c26cce2',1,'glm']]], + ['highp_5ff64vec3',['highp_f64vec3',['../a00721.html#gacd1196090ece7a69fb5c3e43a7d4d851',1,'glm']]], + ['highp_5ff64vec4',['highp_f64vec4',['../a00721.html#ga61185c44c8cc0b25d9a0f67d8a267444',1,'glm']]], + ['highp_5ffdualquat',['highp_fdualquat',['../a00734.html#ga4c4e55e9c99dc57b299ed590968da564',1,'glm']]], + ['highp_5ffloat32',['highp_float32',['../a00721.html#gac5a7f21136e0a78d0a1b9f60ef2f8aea',1,'glm']]], + ['highp_5ffloat32_5ft',['highp_float32_t',['../a00721.html#ga5376ef18dca9d248897c3363ef5a06b2',1,'glm']]], + ['highp_5ffloat64',['highp_float64',['../a00721.html#gadbb198a4d7aad82a0f4dc466ef6f6215',1,'glm']]], + ['highp_5ffloat64_5ft',['highp_float64_t',['../a00721.html#gaaeeb0077198cff40e3f48b1108ece139',1,'glm']]], + ['highp_5ffmat2',['highp_fmat2',['../a00721.html#gae98c88d9a7befa9b5877f49176225535',1,'glm']]], + ['highp_5ffmat2x2',['highp_fmat2x2',['../a00721.html#ga28635abcddb2f3e92c33c3f0fcc682ad',1,'glm']]], + ['highp_5ffmat2x3',['highp_fmat2x3',['../a00721.html#gacf111095594996fef29067b2454fccad',1,'glm']]], + ['highp_5ffmat2x4',['highp_fmat2x4',['../a00721.html#ga4920a1536f161f7ded1d6909b7fef0d2',1,'glm']]], + ['highp_5ffmat3',['highp_fmat3',['../a00721.html#gaed2dc69e0d507d4191092dbd44b3eb75',1,'glm']]], + ['highp_5ffmat3x2',['highp_fmat3x2',['../a00721.html#gae54e4d1aeb5a0f0c64822e6f1b299e19',1,'glm']]], + ['highp_5ffmat3x3',['highp_fmat3x3',['../a00721.html#gaa5b44d3ef6efcf33f44876673a7a936e',1,'glm']]], + ['highp_5ffmat3x4',['highp_fmat3x4',['../a00721.html#ga961fac2a885907ffcf4d40daac6615c5',1,'glm']]], + ['highp_5ffmat4',['highp_fmat4',['../a00721.html#gabf28443ce0cc0959077ec39b21f32c39',1,'glm']]], + ['highp_5ffmat4x2',['highp_fmat4x2',['../a00721.html#ga076961cf2d120c7168b957cb2ed107b3',1,'glm']]], + ['highp_5ffmat4x3',['highp_fmat4x3',['../a00721.html#gae406ec670f64170a7437b5e302eeb2cb',1,'glm']]], + ['highp_5ffmat4x4',['highp_fmat4x4',['../a00721.html#gaee80c7cd3caa0f2635058656755f6f69',1,'glm']]], + ['highp_5ffvec1',['highp_fvec1',['../a00721.html#gaa1040342c4efdedc8f90e6267db8d41c',1,'glm']]], + ['highp_5ffvec2',['highp_fvec2',['../a00721.html#ga7c0d196f5fa79f7e892a2f323a0be1ae',1,'glm']]], + ['highp_5ffvec3',['highp_fvec3',['../a00721.html#ga6ef77413883f48d6b53b4169b25edbd0',1,'glm']]], + ['highp_5ffvec4',['highp_fvec4',['../a00721.html#ga8b839abbb44f5102609eed89f6ed61f7',1,'glm']]], + ['highp_5fi16',['highp_i16',['../a00721.html#ga0336abc2604dd2c20c30e036454b64f8',1,'glm']]], + ['highp_5fi16vec1',['highp_i16vec1',['../a00721.html#ga70fdfcc1fd38084bde83c3f06a8b9f19',1,'glm']]], + ['highp_5fi16vec2',['highp_i16vec2',['../a00721.html#gaa7db3ad10947cf70cae6474d05ebd227',1,'glm']]], + ['highp_5fi16vec3',['highp_i16vec3',['../a00721.html#ga5609c8fa2b7eac3dec337d321cb0ca96',1,'glm']]], + ['highp_5fi16vec4',['highp_i16vec4',['../a00721.html#ga7a18659438828f91ccca28f1a1e067b4',1,'glm']]], + ['highp_5fi32',['highp_i32',['../a00721.html#ga727675ac6b5d2fc699520e0059735e25',1,'glm']]], + ['highp_5fi32vec1',['highp_i32vec1',['../a00721.html#ga6a9d71cc62745302f70422b7dc98755c',1,'glm']]], + ['highp_5fi32vec2',['highp_i32vec2',['../a00721.html#gaa9b4579f8e6f3d9b649a965bcb785530',1,'glm']]], + ['highp_5fi32vec3',['highp_i32vec3',['../a00721.html#ga31e070ea3bdee623e6e18a61ba5718b1',1,'glm']]], + ['highp_5fi32vec4',['highp_i32vec4',['../a00721.html#gadf70eaaa230aeed5a4c9f4c9c5c55902',1,'glm']]], + ['highp_5fi64',['highp_i64',['../a00721.html#gac25db6d2b1e2a0f351b77ba3409ac4cd',1,'glm']]], + ['highp_5fi64vec1',['highp_i64vec1',['../a00721.html#gabd2fda3cd208acf5a370ec9b5b3c58d4',1,'glm']]], + ['highp_5fi64vec2',['highp_i64vec2',['../a00721.html#gad9d1903cb20899966e8ebe0670889a5f',1,'glm']]], + ['highp_5fi64vec3',['highp_i64vec3',['../a00721.html#ga62324224b9c6cce9c6b4db96bb704a8a',1,'glm']]], + ['highp_5fi64vec4',['highp_i64vec4',['../a00721.html#gad23b1be9b3bf20352089a6b738f0ebba',1,'glm']]], + ['highp_5fi8',['highp_i8',['../a00721.html#gacb88796f2d08ef253d0345aff20c3aee',1,'glm']]], + ['highp_5fi8vec1',['highp_i8vec1',['../a00721.html#ga1d8c10949691b0fd990253476f47beb3',1,'glm']]], + ['highp_5fi8vec2',['highp_i8vec2',['../a00721.html#ga50542e4cb9b2f9bec213b66e06145d07',1,'glm']]], + ['highp_5fi8vec3',['highp_i8vec3',['../a00721.html#ga8396bfdc081d9113190d0c39c9f67084',1,'glm']]], + ['highp_5fi8vec4',['highp_i8vec4',['../a00721.html#ga4824e3ddf6e608117dfe4809430737b4',1,'glm']]], + ['highp_5fimat2',['highp_imat2',['../a00712.html#ga8499cc3b016003f835314c1c756e9db9',1,'glm']]], + ['highp_5fimat2x2',['highp_imat2x2',['../a00712.html#gaa389e2d1c3b10941cae870bc0aeba5b3',1,'glm']]], + ['highp_5fimat2x3',['highp_imat2x3',['../a00712.html#gaba49d890e06c9444795f5a133fbf1336',1,'glm']]], + ['highp_5fimat2x4',['highp_imat2x4',['../a00712.html#ga05a970fd4366dad6c8a0be676b1eae5b',1,'glm']]], + ['highp_5fimat3',['highp_imat3',['../a00712.html#gaca4506a3efa679eff7c006d9826291fd',1,'glm']]], + ['highp_5fimat3x2',['highp_imat3x2',['../a00712.html#ga91c671c3ff9706c2393e78b22fd84bcb',1,'glm']]], + ['highp_5fimat3x3',['highp_imat3x3',['../a00712.html#ga07d7b7173e2a6f843ff5f1c615a95b41',1,'glm']]], + ['highp_5fimat3x4',['highp_imat3x4',['../a00712.html#ga53008f580be99018a17b357b5a4ffc0d',1,'glm']]], + ['highp_5fimat4',['highp_imat4',['../a00712.html#ga7cfb09b34e0fcf73eaf6512d6483ef56',1,'glm']]], + ['highp_5fimat4x2',['highp_imat4x2',['../a00712.html#ga1858820fb292cae396408b2034407f72',1,'glm']]], + ['highp_5fimat4x3',['highp_imat4x3',['../a00712.html#ga6be0b80ae74bb309bc5b964d93d68fc5',1,'glm']]], + ['highp_5fimat4x4',['highp_imat4x4',['../a00712.html#ga2c783ee6f8f040ab37df2f70392c8b44',1,'glm']]], + ['highp_5fint16',['highp_int16',['../a00721.html#ga5fde0fa4a3852a9dd5d637a92ee74718',1,'glm']]], + ['highp_5fint16_5ft',['highp_int16_t',['../a00721.html#gacaea06d0a79ef3172e887a7a6ba434ff',1,'glm']]], + ['highp_5fint32',['highp_int32',['../a00721.html#ga84ed04b4e0de18c977e932d617e7c223',1,'glm']]], + ['highp_5fint32_5ft',['highp_int32_t',['../a00721.html#ga2c71c8bd9e2fe7d2e93ca250d8b6157f',1,'glm']]], + ['highp_5fint64',['highp_int64',['../a00721.html#ga226a8d52b4e3f77aaa6231135e886aac',1,'glm']]], + ['highp_5fint64_5ft',['highp_int64_t',['../a00721.html#ga73c6abb280a45feeff60f9accaee91f3',1,'glm']]], + ['highp_5fint8',['highp_int8',['../a00721.html#gad0549c902a96a7164e4ac858d5f39dbf',1,'glm']]], + ['highp_5fint8_5ft',['highp_int8_t',['../a00721.html#ga1085c50dd8fbeb5e7e609b1c127492a5',1,'glm']]], + ['highp_5fivec1',['highp_ivec1',['../a00693.html#ga7e02566f2bd2caa68e61be45a477c77e',1,'glm']]], + ['highp_5fivec2',['highp_ivec2',['../a00700.html#gaa18f6b80b41c214f10666948539c1f93',1,'glm']]], + ['highp_5fivec3',['highp_ivec3',['../a00700.html#ga7dd782c3ef5719bc6d5c3ca826b8ad18',1,'glm']]], + ['highp_5fivec4',['highp_ivec4',['../a00700.html#gafb84dccdf5d82443df3ffc8428dcaf3e',1,'glm']]], + ['highp_5fmat2',['highp_mat2',['../a00702.html#ga4d5a0055544a516237dcdace049b143d',1,'glm']]], + ['highp_5fmat2x2',['highp_mat2x2',['../a00702.html#ga2352ae43b284c9f71446674c0208c05d',1,'glm']]], + ['highp_5fmat2x3',['highp_mat2x3',['../a00702.html#ga7a0e3fe41512b0494e598f5c58722f19',1,'glm']]], + ['highp_5fmat2x4',['highp_mat2x4',['../a00702.html#ga61f36a81f2ed1b5f9fc8bc3b26faec8f',1,'glm']]], + ['highp_5fmat3',['highp_mat3',['../a00702.html#ga3fd9849f3da5ed6e3decc3fb10a20b3e',1,'glm']]], + ['highp_5fmat3x2',['highp_mat3x2',['../a00702.html#ga1eda47a00027ec440eac05d63739c71b',1,'glm']]], + ['highp_5fmat3x3',['highp_mat3x3',['../a00702.html#ga2ea82e12f4d7afcfce8f59894d400230',1,'glm']]], + ['highp_5fmat3x4',['highp_mat3x4',['../a00702.html#ga6454b3a26ea30f69de8e44c08a63d1b7',1,'glm']]], + ['highp_5fmat4',['highp_mat4',['../a00702.html#gad72e13d669d039f12ae5afa23148adc1',1,'glm']]], + ['highp_5fmat4x2',['highp_mat4x2',['../a00702.html#gab68b66e6d2c37b804d0baf970fa4f0e5',1,'glm']]], + ['highp_5fmat4x3',['highp_mat4x3',['../a00702.html#ga8d5a4e65fb976e4553b84995b95ecb38',1,'glm']]], + ['highp_5fmat4x4',['highp_mat4x4',['../a00702.html#ga58cc504be0e3b61c48bc91554a767b9f',1,'glm']]], + ['highp_5fquat',['highp_quat',['../a00674.html#gaa2fd8085774376310aeb80588e0eab6e',1,'glm']]], + ['highp_5fu16',['highp_u16',['../a00721.html#ga8e62c883d13f47015f3b70ed88751369',1,'glm']]], + ['highp_5fu16vec1',['highp_u16vec1',['../a00721.html#gad064202b4cf9a2972475c03de657cb39',1,'glm']]], + ['highp_5fu16vec2',['highp_u16vec2',['../a00721.html#ga791b15ceb3f1e09d1a0ec6f3057ca159',1,'glm']]], + ['highp_5fu16vec3',['highp_u16vec3',['../a00721.html#gacfd806749008f0ade6ac4bb9dd91082f',1,'glm']]], + ['highp_5fu16vec4',['highp_u16vec4',['../a00721.html#ga8a85a3d54a8a9e14fe7a1f96196c4f61',1,'glm']]], + ['highp_5fu32',['highp_u32',['../a00721.html#ga7a6f1929464dcc680b16381a4ee5f2cf',1,'glm']]], + ['highp_5fu32vec1',['highp_u32vec1',['../a00721.html#ga0e35a565b9036bfc3989f5e23a0792e3',1,'glm']]], + ['highp_5fu32vec2',['highp_u32vec2',['../a00721.html#ga2f256334f83fba4c2d219e414b51df6c',1,'glm']]], + ['highp_5fu32vec3',['highp_u32vec3',['../a00721.html#gaf14d7a50502464e7cbfa074f24684cb1',1,'glm']]], + ['highp_5fu32vec4',['highp_u32vec4',['../a00721.html#ga22166f0da65038b447f3c5e534fff1c2',1,'glm']]], + ['highp_5fu64',['highp_u64',['../a00721.html#ga0c181fdf06a309691999926b6690c969',1,'glm']]], + ['highp_5fu64vec1',['highp_u64vec1',['../a00721.html#gae4fe774744852c4d7d069be2e05257ab',1,'glm']]], + ['highp_5fu64vec2',['highp_u64vec2',['../a00721.html#ga78f77b8b2d17b431ac5a68c0b5d7050d',1,'glm']]], + ['highp_5fu64vec3',['highp_u64vec3',['../a00721.html#ga41bdabea6e589029659331ba47eb78c1',1,'glm']]], + ['highp_5fu64vec4',['highp_u64vec4',['../a00721.html#ga4f15b41aa24b11cc42ad5798c04a2325',1,'glm']]], + ['highp_5fu8',['highp_u8',['../a00721.html#gacd1259f3a9e8d2a9df5be2d74322ef9c',1,'glm']]], + ['highp_5fu8vec1',['highp_u8vec1',['../a00721.html#ga8408cb76b6550ff01fa0a3024e7b68d2',1,'glm']]], + ['highp_5fu8vec2',['highp_u8vec2',['../a00721.html#ga27585b7c3ab300059f11fcba465f6fd2',1,'glm']]], + ['highp_5fu8vec3',['highp_u8vec3',['../a00721.html#ga45721c13b956eb691cbd6c6c1429167a',1,'glm']]], + ['highp_5fu8vec4',['highp_u8vec4',['../a00721.html#gae0b75ad0fed8c00ddc0b5ce335d31060',1,'glm']]], + ['highp_5fuint16',['highp_uint16',['../a00721.html#ga746dc6da204f5622e395f492997dbf57',1,'glm']]], + ['highp_5fuint16_5ft',['highp_uint16_t',['../a00721.html#gacf54c3330ef60aa3d16cb676c7bcb8c7',1,'glm']]], + ['highp_5fuint32',['highp_uint32',['../a00721.html#ga256b12b650c3f2fb86878fd1c5db8bc3',1,'glm']]], + ['highp_5fuint32_5ft',['highp_uint32_t',['../a00721.html#gae978599c9711ac263ba732d4ac225b0e',1,'glm']]], + ['highp_5fuint64',['highp_uint64',['../a00721.html#gaa38d732f5d4a7bc42a1b43b9d3c141ce',1,'glm']]], + ['highp_5fuint64_5ft',['highp_uint64_t',['../a00721.html#gaa46172d7dc1c7ffe3e78107ff88adf08',1,'glm']]], + ['highp_5fuint8',['highp_uint8',['../a00721.html#ga97432f9979e73e66567361fd01e4cffb',1,'glm']]], + ['highp_5fuint8_5ft',['highp_uint8_t',['../a00721.html#gac4e00a26a2adb5f2c0a7096810df29e5',1,'glm']]], + ['highp_5fumat2',['highp_umat2',['../a00712.html#ga42cbce64c4c1cd121b8437daa6e110de',1,'glm']]], + ['highp_5fumat2x2',['highp_umat2x2',['../a00712.html#ga5337b7bc95f9cbac08a0c00b3f936b28',1,'glm']]], + ['highp_5fumat2x3',['highp_umat2x3',['../a00712.html#ga90718c7128320b24b52f9ea70e643ad4',1,'glm']]], + ['highp_5fumat2x4',['highp_umat2x4',['../a00712.html#gadca0a4724b4a6f56a2355b6f6e19248b',1,'glm']]], + ['highp_5fumat3',['highp_umat3',['../a00712.html#gaa1143120339b7d2d469d327662e8a172',1,'glm']]], + ['highp_5fumat3x2',['highp_umat3x2',['../a00712.html#ga844a5da2e7fc03fc7cccc7f1b70809c4',1,'glm']]], + ['highp_5fumat3x3',['highp_umat3x3',['../a00712.html#ga1f7d41c36b980774a4d2e7c1647fb4b2',1,'glm']]], + ['highp_5fumat3x4',['highp_umat3x4',['../a00712.html#ga25ee15c323924f2d0fe9896d329e5086',1,'glm']]], + ['highp_5fumat4',['highp_umat4',['../a00712.html#gaf665e4e78c2cc32a54ab40325738f9c9',1,'glm']]], + ['highp_5fumat4x2',['highp_umat4x2',['../a00712.html#gae69eb82ec08b0dc9bf2ead2a339ff801',1,'glm']]], + ['highp_5fumat4x3',['highp_umat4x3',['../a00712.html#ga45a8163d02c43216252056b0c120f3a5',1,'glm']]], + ['highp_5fumat4x4',['highp_umat4x4',['../a00712.html#ga6a56cbb769aed334c95241664415f9ba',1,'glm']]], + ['highp_5fuvec1',['highp_uvec1',['../a00696.html#gacda57dd8c2bff4934c7f09ddd87c0f39',1,'glm']]], + ['highp_5fuvec2',['highp_uvec2',['../a00700.html#gad5dd50da9e37387ca6b4e6f9c80fe6f8',1,'glm']]], + ['highp_5fuvec3',['highp_uvec3',['../a00700.html#gaef61508dd40ec523416697982f9ceaae',1,'glm']]], + ['highp_5fuvec4',['highp_uvec4',['../a00700.html#gaeebd7dd9f3e678691f8620241e5f9221',1,'glm']]], + ['highp_5fvec1',['highp_vec1',['../a00691.html#ga9e8ed21862a897c156c0b2abca70b1e9',1,'glm']]], + ['highp_5fvec2',['highp_vec2',['../a00700.html#gaa92c1954d71b1e7914874bd787b43d1c',1,'glm']]], + ['highp_5fvec3',['highp_vec3',['../a00700.html#gaca61dfaccbf2f58f2d8063a4e76b44a9',1,'glm']]], + ['highp_5fvec4',['highp_vec4',['../a00700.html#gad281decae52948b82feb3a9db8f63a7b',1,'glm']]], + ['hsvcolor',['hsvColor',['../a00729.html#ga789802bec2d4fe0f9741c731b4a8a7d8',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/all_8.html b/common/glm/doc/api/search/all_8.html new file mode 100644 index 000000000..b74d5fd80 --- /dev/null +++ b/common/glm/doc/api/search/all_8.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/all_8.js b/common/glm/doc/api/search/all_8.js new file mode 100644 index 000000000..1891c3f2f --- /dev/null +++ b/common/glm/doc/api/search/all_8.js @@ -0,0 +1,93 @@ +var searchData= +[ + ['integer_20functions',['Integer functions',['../a00787.html',1,'']]], + ['i16',['i16',['../a00721.html#ga3ab5fe184343d394fb6c2723c3ee3699',1,'glm']]], + ['i16vec1',['i16vec1',['../a00721.html#gafe730798732aa7b0647096a004db1b1c',1,'glm']]], + ['i16vec2',['i16vec2',['../a00721.html#ga2996630ba7b10535af8e065cf326f761',1,'glm']]], + ['i16vec3',['i16vec3',['../a00721.html#gae9c90a867a6026b1f6eab00456f3fb8b',1,'glm']]], + ['i16vec4',['i16vec4',['../a00721.html#ga550831bfc26d1e0101c1cb3d79938c06',1,'glm']]], + ['i32',['i32',['../a00721.html#ga96faea43ac5f875d2d3ffbf8d213e3eb',1,'glm']]], + ['i32vec1',['i32vec1',['../a00721.html#ga54b8a4e0f5a7203a821bf8e9c1265bcf',1,'glm']]], + ['i32vec2',['i32vec2',['../a00721.html#ga8b44026374982dcd1e52d22bac99247e',1,'glm']]], + ['i32vec3',['i32vec3',['../a00721.html#ga7f526b5cccef126a2ebcf9bdd890394e',1,'glm']]], + ['i32vec4',['i32vec4',['../a00721.html#ga866a05905c49912309ed1fa5f5980e61',1,'glm']]], + ['i64',['i64',['../a00721.html#gadb997e409103d4da18abd837e636a496',1,'glm']]], + ['i64vec1',['i64vec1',['../a00721.html#ga2b65767f8b5aed1bd1cf86c541662b50',1,'glm']]], + ['i64vec2',['i64vec2',['../a00721.html#ga48310188e1d0c616bf8d78c92447523b',1,'glm']]], + ['i64vec3',['i64vec3',['../a00721.html#ga667948cfe6fb3d6606c750729ec49f77',1,'glm']]], + ['i64vec4',['i64vec4',['../a00721.html#gaa4e31c3d9de067029efeb161a44b0232',1,'glm']]], + ['i8',['i8',['../a00721.html#ga302ec977b0c0c3ea245b6c9275495355',1,'glm']]], + ['i8vec1',['i8vec1',['../a00721.html#ga7e80d927ff0a3861ced68dfff8a4020b',1,'glm']]], + ['i8vec2',['i8vec2',['../a00721.html#gad06935764d78f43f9d542c784c2212ec',1,'glm']]], + ['i8vec3',['i8vec3',['../a00721.html#ga5a08d36cf7917cd19d081a603d0eae3e',1,'glm']]], + ['i8vec4',['i8vec4',['../a00721.html#ga4177a44206121dabc8c4ff1c0f544574',1,'glm']]], + ['identity',['identity',['../a00668.html#ga81696f2b8d1db02ea1aff8da8f269314',1,'glm']]], + ['imat2',['imat2',['../a00712.html#gaabe04f9948d4a213bb1c20137de03e01',1,'glm']]], + ['imat2x2',['imat2x2',['../a00712.html#gaa4732a240522ad9bc28144fda2fc14ec',1,'glm']]], + ['imat2x3',['imat2x3',['../a00712.html#ga3f42dd3d5d94a0fd5706f7ec8dd0c605',1,'glm']]], + ['imat2x4',['imat2x4',['../a00712.html#ga9d8faafdca42583d67e792dd038fc668',1,'glm']]], + ['imat3',['imat3',['../a00712.html#ga038f68437155ffa3c2583a15264a8195',1,'glm']]], + ['imat3x2',['imat3x2',['../a00712.html#ga7b33bbe4f12c060892bd3cc8d4cd737f',1,'glm']]], + ['imat3x3',['imat3x3',['../a00712.html#ga6aacc960f62e8f7d2fe9d32d5050e7a4',1,'glm']]], + ['imat3x4',['imat3x4',['../a00712.html#ga6e9ce23496d8b08dfc302d4039694b58',1,'glm']]], + ['imat4',['imat4',['../a00712.html#ga96b0d26a33b81bb6a60ca0f39682f7eb',1,'glm']]], + ['imat4x2',['imat4x2',['../a00712.html#ga8ce7ef51d8b2c1901fa5414deccbc3fa',1,'glm']]], + ['imat4x3',['imat4x3',['../a00712.html#ga705ee0bf49d6c3de4404ce2481bf0df5',1,'glm']]], + ['imat4x4',['imat4x4',['../a00712.html#ga43ed5e4f475b6f4cad7cba78f29c405b',1,'glm']]], + ['imulextended',['imulExtended',['../a00787.html#gac0c510a70e852f57594a9141848642e3',1,'glm']]], + ['infiniteperspective',['infinitePerspective',['../a00665.html#ga44fa38a18349450325cae2661bb115ca',1,'glm']]], + ['infiniteperspectivelh',['infinitePerspectiveLH',['../a00665.html#ga3201b30f5b3ea0f933246d87bfb992a9',1,'glm']]], + ['infiniteperspectiverh',['infinitePerspectiveRH',['../a00665.html#ga99672ffe5714ef478dab2437255fe7e1',1,'glm']]], + ['int1',['int1',['../a00732.html#ga0670a2111b5e4a6410bd027fa0232fc3',1,'glm']]], + ['int16',['int16',['../a00682.html#ga4355d16fcf9f644c9ac84293f0b1801f',1,'glm']]], + ['int16_5ft',['int16_t',['../a00721.html#gae8f5e3e964ca2ae240adc2c0d74adede',1,'glm']]], + ['int1x1',['int1x1',['../a00732.html#ga056ffe02d3a45af626f8e62221881c7a',1,'glm']]], + ['int2',['int2',['../a00732.html#gafe3a8fd56354caafe24bfe1b1e3ad22a',1,'glm']]], + ['int2x2',['int2x2',['../a00732.html#ga4e5ce477c15836b21e3c42daac68554d',1,'glm']]], + ['int2x3',['int2x3',['../a00732.html#ga197ded5ad8354f6b6fb91189d7a269b3',1,'glm']]], + ['int2x4',['int2x4',['../a00732.html#ga2749d59a7fddbac44f34ba78e57ef807',1,'glm']]], + ['int3',['int3',['../a00732.html#ga909c38a425f215a50c847145d7da09f0',1,'glm']]], + ['int32',['int32',['../a00682.html#ga56f1a81c92849566ae864511088eb7e8',1,'glm']]], + ['int32_5ft',['int32_t',['../a00721.html#ga042ef09ff2f0cb24a36f541bcb3a3710',1,'glm']]], + ['int3x2',['int3x2',['../a00732.html#gaa4cbe16a92cf3664376c7a2fc5126aa8',1,'glm']]], + ['int3x3',['int3x3',['../a00732.html#ga15c9649286f0bf431bdf9b3509580048',1,'glm']]], + ['int3x4',['int3x4',['../a00732.html#gaacac46ddc7d15d0f9529d05c92946a0f',1,'glm']]], + ['int4',['int4',['../a00732.html#gaecdef18c819c205aeee9f94dc93de56a',1,'glm']]], + ['int4x2',['int4x2',['../a00732.html#ga97a39dd9bc7d572810d80b8467cbffa1',1,'glm']]], + ['int4x3',['int4x3',['../a00732.html#gae4a2c53f14aeec9a17c2b81142b7e82d',1,'glm']]], + ['int4x4',['int4x4',['../a00732.html#ga04dee1552424198b8f58b377c2ee00d8',1,'glm']]], + ['int64',['int64',['../a00682.html#gaff5189f97f9e842d9636a0f240001b2e',1,'glm']]], + ['int64_5ft',['int64_t',['../a00721.html#ga322a7d7d2c2c68994dc872a33de63c61',1,'glm']]], + ['int8',['int8',['../a00682.html#gae47c588f3ab8c61121c1c7ab7edc47cd',1,'glm']]], + ['int8_5ft',['int8_t',['../a00721.html#ga4bf09d8838a86866b39ee6e109341645',1,'glm']]], + ['intbitstofloat',['intBitsToFloat',['../a00662.html#ga4fb7c21c2dce064b26fd9ccdaf9adcd4',1,'glm::intBitsToFloat(int const &v)'],['../a00662.html#ga7a0a8291a1cf3e1c2aee33030a1bd7b0',1,'glm::intBitsToFloat(vec< L, int, Q > const &v)']]], + ['integer_2ehpp',['integer.hpp',['../a00401.html',1,'']]], + ['intermediate',['intermediate',['../a00769.html#gacc5cd5f3e78de61d141c2355417424de',1,'glm']]], + ['interpolate',['interpolate',['../a00754.html#ga4e67863d150724b10c1ac00972dc958c',1,'glm']]], + ['intersect_2ehpp',['intersect.hpp',['../a00506.html',1,'']]], + ['intersectlinesphere',['intersectLineSphere',['../a00748.html#ga9c68139f3d8a4f3d7fe45f9dbc0de5b7',1,'glm']]], + ['intersectlinetriangle',['intersectLineTriangle',['../a00748.html#ga9d29b9b3acb504d43986502f42740df4',1,'glm']]], + ['intersectrayplane',['intersectRayPlane',['../a00748.html#gad3697a9700ea379739a667ea02573488',1,'glm']]], + ['intersectraysphere',['intersectRaySphere',['../a00748.html#gac88f8cd84c4bcb5b947d56acbbcfa56e',1,'glm::intersectRaySphere(genType const &rayStarting, genType const &rayNormalizedDirection, genType const &sphereCenter, typename genType::value_type const sphereRadiusSquered, typename genType::value_type &intersectionDistance)'],['../a00748.html#gad28c00515b823b579c608aafa1100c1d',1,'glm::intersectRaySphere(genType const &rayStarting, genType const &rayNormalizedDirection, genType const &sphereCenter, const typename genType::value_type sphereRadius, genType &intersectionPosition, genType &intersectionNormal)']]], + ['intersectraytriangle',['intersectRayTriangle',['../a00748.html#ga65bf2c594482f04881c36bc761f9e946',1,'glm']]], + ['inverse',['inverse',['../a00669.html#gab41da854ae678e23e114b598cbca4065',1,'glm::inverse(qua< T, Q > const &q)'],['../a00734.html#ga070f521a953f6461af4ab4cf8ccbf27e',1,'glm::inverse(tdualquat< T, Q > const &q)'],['../a00788.html#gaed509fe8129b01e4f20a6d0de5690091',1,'glm::inverse(mat< C, R, T, Q > const &m)']]], + ['inversesqrt',['inversesqrt',['../a00664.html#ga523dd6bd0ad9f75ae2d24c8e4b017b7a',1,'glm']]], + ['inversetranspose',['inverseTranspose',['../a00713.html#gab213cd0e3ead5f316d583f99d6312008',1,'glm']]], + ['io_2ehpp',['io.hpp',['../a00509.html',1,'']]], + ['iround',['iround',['../a00710.html#ga57824268ebe13a922f1d69a5d37f637f',1,'glm']]], + ['iscompnull',['isCompNull',['../a00785.html#gaf6ec1688eab7442fe96fe4941d5d4e76',1,'glm']]], + ['isdenormal',['isdenormal',['../a00731.html#ga74aa7c7462245d83bd5a9edf9c6c2d91',1,'glm']]], + ['isfinite',['isfinite',['../a00732.html#gaf4b04dcd3526996d68c1bfe17bfc8657',1,'glm::isfinite(genType const &x)'],['../a00732.html#gac3b12b8ac3014418fe53c299478b6603',1,'glm::isfinite(const vec< 1, T, Q > &x)'],['../a00732.html#ga8e76dc3e406ce6a4155c2b12a2e4b084',1,'glm::isfinite(const vec< 2, T, Q > &x)'],['../a00732.html#ga929ef27f896d902c1771a2e5e150fc97',1,'glm::isfinite(const vec< 3, T, Q > &x)'],['../a00732.html#ga19925badbe10ce61df1d0de00be0b5ad',1,'glm::isfinite(const vec< 4, T, Q > &x)']]], + ['isidentity',['isIdentity',['../a00757.html#gaee935d145581c82e82b154ccfd78ad91',1,'glm']]], + ['isinf',['isinf',['../a00662.html#ga2885587c23a106301f20443896365b62',1,'glm::isinf(vec< L, T, Q > const &x)'],['../a00669.html#ga45722741ea266b4e861938b365c5f362',1,'glm::isinf(qua< T, Q > const &x)']]], + ['ismultiple',['isMultiple',['../a00719.html#gaec593d33956a8fe43f78fccc63ddde9a',1,'glm::isMultiple(genIUType v, genIUType Multiple)'],['../a00719.html#ga354caf634ef333d9cb4844407416256a',1,'glm::isMultiple(vec< L, T, Q > const &v, T Multiple)'],['../a00719.html#gabb4360e38c0943d8981ba965dead519d',1,'glm::isMultiple(vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)']]], + ['isnan',['isnan',['../a00662.html#ga29ef934c00306490de837b4746b4e14d',1,'glm::isnan(vec< L, T, Q > const &x)'],['../a00669.html#ga1bb55f8963616502e96dc564384d8a03',1,'glm::isnan(qua< T, Q > const &x)']]], + ['isnormalized',['isNormalized',['../a00757.html#gae785af56f47ce220a1609f7f84aa077a',1,'glm::isNormalized(mat< 2, 2, T, Q > const &m, T const &epsilon)'],['../a00757.html#gaa068311695f28f5f555f5f746a6a66fb',1,'glm::isNormalized(mat< 3, 3, T, Q > const &m, T const &epsilon)'],['../a00757.html#ga4d9bb4d0465df49fedfad79adc6ce4ad',1,'glm::isNormalized(mat< 4, 4, T, Q > const &m, T const &epsilon)'],['../a00785.html#gac3c974f459fd75453134fad7ae89a39e',1,'glm::isNormalized(vec< L, T, Q > const &v, T const &epsilon)']]], + ['isnull',['isNull',['../a00757.html#ga9790ec222ce948c0ff0d8ce927340dba',1,'glm::isNull(mat< 2, 2, T, Q > const &m, T const &epsilon)'],['../a00757.html#gae14501c6b14ccda6014cc5350080103d',1,'glm::isNull(mat< 3, 3, T, Q > const &m, T const &epsilon)'],['../a00757.html#ga2b98bb30a9fefa7cdea5f1dcddba677b',1,'glm::isNull(mat< 4, 4, T, Q > const &m, T const &epsilon)'],['../a00785.html#gab4a3637dbcb4bb42dc55caea7a1e0495',1,'glm::isNull(vec< L, T, Q > const &v, T const &epsilon)']]], + ['isorthogonal',['isOrthogonal',['../a00757.html#ga58f3289f74dcab653387dd78ad93ca40',1,'glm']]], + ['ispoweroftwo',['isPowerOfTwo',['../a00719.html#gadf491730354aa7da67fbe23d4d688763',1,'glm::isPowerOfTwo(genIUType v)'],['../a00719.html#gabf2b61ded7049bcb13e25164f832a290',1,'glm::isPowerOfTwo(vec< L, T, Q > const &v)']]], + ['ivec1',['ivec1',['../a00692.html#gaedd0562c2e77714929d7723a7e2e0dba',1,'glm']]], + ['ivec2',['ivec2',['../a00699.html#ga6f9269106d91b2d2b91bcf27cd5f5560',1,'glm']]], + ['ivec3',['ivec3',['../a00699.html#gad0d784d8eee201aca362484d2daee46c',1,'glm']]], + ['ivec4',['ivec4',['../a00699.html#ga5abb4603dae0ce58c595e66d9123d812',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/all_9.html b/common/glm/doc/api/search/all_9.html new file mode 100644 index 000000000..95e88dd25 --- /dev/null +++ b/common/glm/doc/api/search/all_9.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/all_9.js b/common/glm/doc/api/search/all_9.js new file mode 100644 index 000000000..3dcda7ecc --- /dev/null +++ b/common/glm/doc/api/search/all_9.js @@ -0,0 +1,213 @@ +var searchData= +[ + ['l1norm',['l1Norm',['../a00760.html#gae2fc0b2aa967bebfd6a244700bff6997',1,'glm::l1Norm(vec< 3, T, Q > const &x, vec< 3, T, Q > const &y)'],['../a00760.html#ga1a7491e2037ceeb37f83ce41addfc0be',1,'glm::l1Norm(vec< 3, T, Q > const &v)']]], + ['l2norm',['l2Norm',['../a00760.html#ga41340b2ef40a9307ab0f137181565168',1,'glm::l2Norm(vec< 3, T, Q > const &x, vec< 3, T, Q > const &y)'],['../a00760.html#gae288bde8f0e41fb4ed62e65137b18cba',1,'glm::l2Norm(vec< 3, T, Q > const &x)']]], + ['ldexp',['ldexp',['../a00662.html#ga52e319d7289b849ec92055abd4830533',1,'glm']]], + ['lefthanded',['leftHanded',['../a00745.html#ga6f1bad193b9a3b048543d1935cf04dd3',1,'glm']]], + ['length',['length',['../a00675.html#gab703732449be6c7199369b3f9a91ed38',1,'glm::length(qua< T, Q > const &q)'],['../a00697.html#ga0cdabbb000834d994a1d6dc56f8f5263',1,'glm::length(vec< L, T, Q > const &x)']]], + ['length2',['length2',['../a00760.html#ga8d1789651050adb7024917984b41c3de',1,'glm::length2(vec< L, T, Q > const &x)'],['../a00769.html#ga58a609b1b8ab965f5df2702e8ca4e75b',1,'glm::length2(qua< T, Q > const &q)']]], + ['lerp',['lerp',['../a00669.html#ga6033dc0741051fa463a0a147ba29f293',1,'glm::lerp(qua< T, Q > const &x, qua< T, Q > const &y, T a)'],['../a00732.html#ga5494ba3a95ea6594c86fc75236886864',1,'glm::lerp(T x, T y, T a)'],['../a00732.html#gaa551c0a0e16d2d4608e49f7696df897f',1,'glm::lerp(const vec< 2, T, Q > &x, const vec< 2, T, Q > &y, T a)'],['../a00732.html#ga44a8b5fd776320f1713413dec959b32a',1,'glm::lerp(const vec< 3, T, Q > &x, const vec< 3, T, Q > &y, T a)'],['../a00732.html#ga89ac8e000199292ec7875519d27e214b',1,'glm::lerp(const vec< 4, T, Q > &x, const vec< 4, T, Q > &y, T a)'],['../a00732.html#gaf68de5baf72d16135368b8ef4f841604',1,'glm::lerp(const vec< 2, T, Q > &x, const vec< 2, T, Q > &y, const vec< 2, T, Q > &a)'],['../a00732.html#ga4ae1a616c8540a2649eab8e0cd051bb3',1,'glm::lerp(const vec< 3, T, Q > &x, const vec< 3, T, Q > &y, const vec< 3, T, Q > &a)'],['../a00732.html#gab5477ab69c40de4db5d58d3359529724',1,'glm::lerp(const vec< 4, T, Q > &x, const vec< 4, T, Q > &y, const vec< 4, T, Q > &a)'],['../a00734.html#gace8380112d16d33f520839cb35a4d173',1,'glm::lerp(tdualquat< T, Q > const &x, tdualquat< T, Q > const &y, T const &a)']]], + ['lessthan',['lessThan',['../a00663.html#gad091a2d22c8acfebfa92bcfca1dfe9c4',1,'glm::lessThan(qua< T, Q > const &x, qua< T, Q > const &y)'],['../a00791.html#gae90ed1592c395f93e3f3dfce6b2f39c6',1,'glm::lessThan(vec< L, T, Q > const &x, vec< L, T, Q > const &y)']]], + ['lessthanequal',['lessThanEqual',['../a00663.html#gac00012eea281800d2403f4ea8443134d',1,'glm::lessThanEqual(qua< T, Q > const &x, qua< T, Q > const &y)'],['../a00791.html#gab0bdafc019d227257ff73fb5bcca1718',1,'glm::lessThanEqual(vec< L, T, Q > const &x, vec< L, T, Q > const &y)']]], + ['levels',['levels',['../a00778.html#gaa8c377f4e63486db4fa872d77880da73',1,'glm']]], + ['lineargradient',['linearGradient',['../a00744.html#ga849241df1e55129b8ce9476200307419',1,'glm']]], + ['linearinterpolation',['linearInterpolation',['../a00735.html#ga290c3e47cb0a49f2e8abe90b1872b649',1,'glm']]], + ['linearrand',['linearRand',['../a00717.html#ga04e241ab88374a477a2c2ceadd2fa03d',1,'glm::linearRand(genType Min, genType Max)'],['../a00717.html#ga94731130c298a9ff5e5025fdee6d97a0',1,'glm::linearRand(vec< L, T, Q > const &Min, vec< L, T, Q > const &Max)']]], + ['ln_5fln_5ftwo',['ln_ln_two',['../a00708.html#gaca94292c839ed31a405ab7a81ae7e850',1,'glm']]], + ['ln_5ften',['ln_ten',['../a00708.html#gaf97ebc6c059ffd788e6c4946f71ef66c',1,'glm']]], + ['ln_5ftwo',['ln_two',['../a00708.html#ga24f4d27765678116f41a2f336ab7975c',1,'glm']]], + ['log',['log',['../a00664.html#ga918c9f3fd086ce20e6760c903bd30fa9',1,'glm::log(vec< L, T, Q > const &v)'],['../a00677.html#gaa5f7b20e296671b16ce25a2ab7ad5473',1,'glm::log(qua< T, Q > const &q)'],['../a00750.html#ga60a7b0a401da660869946b2b77c710c9',1,'glm::log(genType const &x, genType const &base)']]], + ['log2',['log2',['../a00664.html#ga82831c7d9cca777cebedfe03a19c8d75',1,'glm::log2(vec< L, T, Q > const &v)'],['../a00710.html#ga9bd682e74bfacb005c735305207ec417',1,'glm::log2(genIUType x)']]], + ['log_5fbase_2ehpp',['log_base.hpp',['../a00512.html',1,'']]], + ['lookat',['lookAt',['../a00668.html#gaa64aa951a0e99136bba9008d2b59c78e',1,'glm']]], + ['lookatlh',['lookAtLH',['../a00668.html#gab2c09e25b0a16d3a9d89cc85bbae41b0',1,'glm']]], + ['lookatrh',['lookAtRH',['../a00668.html#gacfa12c8889c754846bc20c65d9b5c701',1,'glm']]], + ['lowestbitvalue',['lowestBitValue',['../a00726.html#ga2ff6568089f3a9b67f5c30918855fc6f',1,'glm']]], + ['lowp_5fbvec1',['lowp_bvec1',['../a00686.html#ga24a3d364e2ddd444f5b9e7975bbef8f9',1,'glm']]], + ['lowp_5fbvec2',['lowp_bvec2',['../a00700.html#ga5a5452140650988b94d5716e4d872465',1,'glm']]], + ['lowp_5fbvec3',['lowp_bvec3',['../a00700.html#ga79e0922a977662a8fd39d7829be3908b',1,'glm']]], + ['lowp_5fbvec4',['lowp_bvec4',['../a00700.html#ga15ac87724048ab7169bb5d3572939dd3',1,'glm']]], + ['lowp_5fddualquat',['lowp_ddualquat',['../a00734.html#gab4c5103338af3dac7e0fbc86895a3f1a',1,'glm']]], + ['lowp_5fdmat2',['lowp_dmat2',['../a00702.html#gad8e2727a6e7aa68280245bb0022118e1',1,'glm']]], + ['lowp_5fdmat2x2',['lowp_dmat2x2',['../a00702.html#gac61b94f5d9775f83f321bac899322fe2',1,'glm']]], + ['lowp_5fdmat2x3',['lowp_dmat2x3',['../a00702.html#gaf6bf2f5bde7ad5b9c289f777b93094af',1,'glm']]], + ['lowp_5fdmat2x4',['lowp_dmat2x4',['../a00702.html#ga97507a31ecee8609887d0f23bbde92c7',1,'glm']]], + ['lowp_5fdmat3',['lowp_dmat3',['../a00702.html#ga0cab80beee64a5f8d2ae4e823983063a',1,'glm']]], + ['lowp_5fdmat3x2',['lowp_dmat3x2',['../a00702.html#ga1e0ea3fba496bc7c6f620d2590acb66b',1,'glm']]], + ['lowp_5fdmat3x3',['lowp_dmat3x3',['../a00702.html#gac017848a9df570f60916a21a297b1e8e',1,'glm']]], + ['lowp_5fdmat3x4',['lowp_dmat3x4',['../a00702.html#ga93add35d2a44c5830978b827e8c295e8',1,'glm']]], + ['lowp_5fdmat4',['lowp_dmat4',['../a00702.html#ga708bc5b91bbfedd21debac8dcf2a64cd',1,'glm']]], + ['lowp_5fdmat4x2',['lowp_dmat4x2',['../a00702.html#ga382dc5295cead78766239a8457abfa98',1,'glm']]], + ['lowp_5fdmat4x3',['lowp_dmat4x3',['../a00702.html#ga3d7ea07da7c6e5c81a3f4c8b3d44056e',1,'glm']]], + ['lowp_5fdmat4x4',['lowp_dmat4x4',['../a00702.html#ga5b0413198b7e9f061f7534a221c9dac9',1,'glm']]], + ['lowp_5fdquat',['lowp_dquat',['../a00671.html#ga9e6e5f42e67dd5877350ba485c191f1c',1,'glm']]], + ['lowp_5fdualquat',['lowp_dualquat',['../a00734.html#gade05d29ebd4deea0f883d0e1bb4169aa',1,'glm']]], + ['lowp_5fdvec1',['lowp_dvec1',['../a00689.html#gaf906eb86b6e96c35138d0e4928e1435a',1,'glm']]], + ['lowp_5fdvec2',['lowp_dvec2',['../a00700.html#ga108086730d086b7f6f7a033955dfb9c3',1,'glm']]], + ['lowp_5fdvec3',['lowp_dvec3',['../a00700.html#ga42c518b2917e19ce6946a84c64a3a4b2',1,'glm']]], + ['lowp_5fdvec4',['lowp_dvec4',['../a00700.html#ga0b4432cb8d910e406576d10d802e190d',1,'glm']]], + ['lowp_5ff32',['lowp_f32',['../a00721.html#gaeea53879fc327293cf3352a409b7867b',1,'glm']]], + ['lowp_5ff32mat2',['lowp_f32mat2',['../a00721.html#ga52409bc6d4a2ce3421526c069220d685',1,'glm']]], + ['lowp_5ff32mat2x2',['lowp_f32mat2x2',['../a00721.html#ga1d091b6abfba1772450e1745a06525bc',1,'glm']]], + ['lowp_5ff32mat2x3',['lowp_f32mat2x3',['../a00721.html#ga961ccb34cd1a5654c772c8709e001dc5',1,'glm']]], + ['lowp_5ff32mat2x4',['lowp_f32mat2x4',['../a00721.html#gacc6bf0209dda0c7c14851a646071c974',1,'glm']]], + ['lowp_5ff32mat3',['lowp_f32mat3',['../a00721.html#ga4187f89f196505b40e63f516139511e5',1,'glm']]], + ['lowp_5ff32mat3x2',['lowp_f32mat3x2',['../a00721.html#gac53f9d7ab04eace67adad026092fb1e8',1,'glm']]], + ['lowp_5ff32mat3x3',['lowp_f32mat3x3',['../a00721.html#ga841211b641cff1fcf861bdb14e5e4abc',1,'glm']]], + ['lowp_5ff32mat3x4',['lowp_f32mat3x4',['../a00721.html#ga21b1b22dec013a72656e3644baf8a1e1',1,'glm']]], + ['lowp_5ff32mat4',['lowp_f32mat4',['../a00721.html#ga766aed2871e6173a81011a877f398f04',1,'glm']]], + ['lowp_5ff32mat4x2',['lowp_f32mat4x2',['../a00721.html#gae6f3fcb702a666de07650c149cfa845a',1,'glm']]], + ['lowp_5ff32mat4x3',['lowp_f32mat4x3',['../a00721.html#gac21eda58a1475449a5709b412ebd776c',1,'glm']]], + ['lowp_5ff32mat4x4',['lowp_f32mat4x4',['../a00721.html#ga4143d129898f91545948c46859adce44',1,'glm']]], + ['lowp_5ff32quat',['lowp_f32quat',['../a00721.html#gaa3ba60ef8f69c6aeb1629594eaa95347',1,'glm']]], + ['lowp_5ff32vec1',['lowp_f32vec1',['../a00721.html#ga43e5b41c834fcaf4db5a831c0e28128e',1,'glm']]], + ['lowp_5ff32vec2',['lowp_f32vec2',['../a00721.html#gaf3b694b2b8ded7e0b9f07b061917e1a0',1,'glm']]], + ['lowp_5ff32vec3',['lowp_f32vec3',['../a00721.html#gaf739a2cd7b81783a43148b53e40d983b',1,'glm']]], + ['lowp_5ff32vec4',['lowp_f32vec4',['../a00721.html#ga4e2e1debe022074ab224c9faf856d374',1,'glm']]], + ['lowp_5ff64',['lowp_f64',['../a00721.html#gabc7a97c07cbfac8e35eb5e63beb4b679',1,'glm']]], + ['lowp_5ff64mat2',['lowp_f64mat2',['../a00721.html#gafc730f6b4242763b0eda0ffa25150292',1,'glm']]], + ['lowp_5ff64mat2x2',['lowp_f64mat2x2',['../a00721.html#ga771fda9109933db34f808d92b9b84d7e',1,'glm']]], + ['lowp_5ff64mat2x3',['lowp_f64mat2x3',['../a00721.html#ga39e90adcffe33264bd608fa9c6bd184b',1,'glm']]], + ['lowp_5ff64mat2x4',['lowp_f64mat2x4',['../a00721.html#ga50265a202fbfe0a25fc70066c31d9336',1,'glm']]], + ['lowp_5ff64mat3',['lowp_f64mat3',['../a00721.html#ga58119a41d143ebaea0df70fe882e8a40',1,'glm']]], + ['lowp_5ff64mat3x2',['lowp_f64mat3x2',['../a00721.html#gab0eb2d65514ee3e49905aa2caad8c0ad',1,'glm']]], + ['lowp_5ff64mat3x3',['lowp_f64mat3x3',['../a00721.html#gac8f8a12ee03105ef8861dc652434e3b7',1,'glm']]], + ['lowp_5ff64mat3x4',['lowp_f64mat3x4',['../a00721.html#gade8d1edfb23996ab6c622e65e3893271',1,'glm']]], + ['lowp_5ff64mat4',['lowp_f64mat4',['../a00721.html#ga7451266e67794bd1125163502bc4a570',1,'glm']]], + ['lowp_5ff64mat4x2',['lowp_f64mat4x2',['../a00721.html#gab0cecb80fd106bc369b9e46a165815ce',1,'glm']]], + ['lowp_5ff64mat4x3',['lowp_f64mat4x3',['../a00721.html#gae731613b25db3a5ef5a05d21e57a57d3',1,'glm']]], + ['lowp_5ff64mat4x4',['lowp_f64mat4x4',['../a00721.html#ga8c9cd734e03cd49674f3e287aa4a6f95',1,'glm']]], + ['lowp_5ff64quat',['lowp_f64quat',['../a00721.html#gaa3ee2bc4af03cc06578b66b3e3f878ae',1,'glm']]], + ['lowp_5ff64vec1',['lowp_f64vec1',['../a00721.html#gaf2d02c5f4d59135b9bc524fe317fd26b',1,'glm']]], + ['lowp_5ff64vec2',['lowp_f64vec2',['../a00721.html#ga4e641a54d70c81eabf56c25c966d04bd',1,'glm']]], + ['lowp_5ff64vec3',['lowp_f64vec3',['../a00721.html#gae7a4711107b7d078fc5f03ce2227b90b',1,'glm']]], + ['lowp_5ff64vec4',['lowp_f64vec4',['../a00721.html#gaa666bb9e6d204d3bea0b3a39a3a335f4',1,'glm']]], + ['lowp_5ffdualquat',['lowp_fdualquat',['../a00734.html#gaa38f671be25a7f3b136a452a8bb42860',1,'glm']]], + ['lowp_5ffloat32',['lowp_float32',['../a00721.html#ga41b0d390bd8cc827323b1b3816ff4bf8',1,'glm']]], + ['lowp_5ffloat32_5ft',['lowp_float32_t',['../a00721.html#gaea881cae4ddc6c0fbf7cc5b08177ca5b',1,'glm']]], + ['lowp_5ffloat64',['lowp_float64',['../a00721.html#ga3714dab2c16a6545a405cb0c3b3aaa6f',1,'glm']]], + ['lowp_5ffloat64_5ft',['lowp_float64_t',['../a00721.html#ga7286a37076a09da140df18bfa75d4e38',1,'glm']]], + ['lowp_5ffmat2',['lowp_fmat2',['../a00721.html#ga5bba0ce31210e274f73efacd3364c03f',1,'glm']]], + ['lowp_5ffmat2x2',['lowp_fmat2x2',['../a00721.html#gab0feb11edd0d3ab3e8ed996d349a5066',1,'glm']]], + ['lowp_5ffmat2x3',['lowp_fmat2x3',['../a00721.html#ga71cdb53801ed4c3aadb3603c04723210',1,'glm']]], + ['lowp_5ffmat2x4',['lowp_fmat2x4',['../a00721.html#gaab217601c74974a84acbca428123ecf7',1,'glm']]], + ['lowp_5ffmat3',['lowp_fmat3',['../a00721.html#ga83079315e230e8f39728f4bf0d2f9a9b',1,'glm']]], + ['lowp_5ffmat3x2',['lowp_fmat3x2',['../a00721.html#ga49b98e7d71804af45d86886a489e633c',1,'glm']]], + ['lowp_5ffmat3x3',['lowp_fmat3x3',['../a00721.html#gaba56275dd04a7a61560b0e8fa5d365b4',1,'glm']]], + ['lowp_5ffmat3x4',['lowp_fmat3x4',['../a00721.html#ga28733aec7288191b314d42154fd0b690',1,'glm']]], + ['lowp_5ffmat4',['lowp_fmat4',['../a00721.html#ga5803cb9ae26399762d8bba9e0b2fc09f',1,'glm']]], + ['lowp_5ffmat4x2',['lowp_fmat4x2',['../a00721.html#ga5868c2dcce41cc3ea5edcaeae239f62c',1,'glm']]], + ['lowp_5ffmat4x3',['lowp_fmat4x3',['../a00721.html#ga5e649bbdb135fbcb4bfe950f4c73a444',1,'glm']]], + ['lowp_5ffmat4x4',['lowp_fmat4x4',['../a00721.html#gac2f5263708ac847b361a9841e74ddf9f',1,'glm']]], + ['lowp_5ffvec1',['lowp_fvec1',['../a00721.html#ga346b2336fff168a7e0df1583aae3e5a5',1,'glm']]], + ['lowp_5ffvec2',['lowp_fvec2',['../a00721.html#ga62a32c31f4e2e8ca859663b6e3289a2d',1,'glm']]], + ['lowp_5ffvec3',['lowp_fvec3',['../a00721.html#ga40b5c557efebb5bb99d6b9aa81095afa',1,'glm']]], + ['lowp_5ffvec4',['lowp_fvec4',['../a00721.html#ga755484ffbe39ae3db2875953ed04e7b7',1,'glm']]], + ['lowp_5fi16',['lowp_i16',['../a00721.html#ga392b673fd10847bfb78fb808c6cf8ff7',1,'glm']]], + ['lowp_5fi16vec1',['lowp_i16vec1',['../a00721.html#ga501a2f313f1c220eef4ab02bdabdc3c6',1,'glm']]], + ['lowp_5fi16vec2',['lowp_i16vec2',['../a00721.html#ga7cac84b520a6b57f2fbd880d3d63c51b',1,'glm']]], + ['lowp_5fi16vec3',['lowp_i16vec3',['../a00721.html#gab69ef9cbc2a9214bf5596c528c801b72',1,'glm']]], + ['lowp_5fi16vec4',['lowp_i16vec4',['../a00721.html#ga1d47d94d17c2406abdd1f087a816e387',1,'glm']]], + ['lowp_5fi32',['lowp_i32',['../a00721.html#ga7ff73a45cea9613ebf1a9fad0b9f82ac',1,'glm']]], + ['lowp_5fi32vec1',['lowp_i32vec1',['../a00721.html#gae31ac3608cf643ceffd6554874bec4a0',1,'glm']]], + ['lowp_5fi32vec2',['lowp_i32vec2',['../a00721.html#ga867a3c2d99ab369a454167d2c0a24dbd',1,'glm']]], + ['lowp_5fi32vec3',['lowp_i32vec3',['../a00721.html#ga5fe17c87ede1b1b4d92454cff4da076d',1,'glm']]], + ['lowp_5fi32vec4',['lowp_i32vec4',['../a00721.html#gac9b2eb4296ffe50a32eacca9ed932c08',1,'glm']]], + ['lowp_5fi64',['lowp_i64',['../a00721.html#ga354736e0c645099cd44c42fb2f87c2b8',1,'glm']]], + ['lowp_5fi64vec1',['lowp_i64vec1',['../a00721.html#gab0f7d875db5f3cc9f3168c5a0ed56437',1,'glm']]], + ['lowp_5fi64vec2',['lowp_i64vec2',['../a00721.html#gab485c48f06a4fdd6b8d58d343bb49f3c',1,'glm']]], + ['lowp_5fi64vec3',['lowp_i64vec3',['../a00721.html#ga5cb1dc9e8d300c2cdb0d7ff2308fa36c',1,'glm']]], + ['lowp_5fi64vec4',['lowp_i64vec4',['../a00721.html#gabb4229a4c1488bf063eed0c45355bb9c',1,'glm']]], + ['lowp_5fi8',['lowp_i8',['../a00721.html#ga552a6bde5e75984efb0f863278da2e54',1,'glm']]], + ['lowp_5fi8vec1',['lowp_i8vec1',['../a00721.html#ga036d6c7ca9fbbdc5f3871bfcb937c85c',1,'glm']]], + ['lowp_5fi8vec2',['lowp_i8vec2',['../a00721.html#gac03e5099d27eeaa74b6016ea435a1df2',1,'glm']]], + ['lowp_5fi8vec3',['lowp_i8vec3',['../a00721.html#gae2f43ace6b5b33ab49516d9e40af1845',1,'glm']]], + ['lowp_5fi8vec4',['lowp_i8vec4',['../a00721.html#ga6d388e9b9aa1b389f0672d9c7dfc61c5',1,'glm']]], + ['lowp_5fimat2',['lowp_imat2',['../a00712.html#gaa0bff0be804142bb16d441aec0a7962e',1,'glm']]], + ['lowp_5fimat2x2',['lowp_imat2x2',['../a00712.html#ga92b95b679975d408645547ab45a8dcd8',1,'glm']]], + ['lowp_5fimat2x3',['lowp_imat2x3',['../a00712.html#ga8c9e7a388f8e7c52f1e6857dee8afb65',1,'glm']]], + ['lowp_5fimat2x4',['lowp_imat2x4',['../a00712.html#ga9cc13bd1f8dd2933e9fa31fe3f70e16e',1,'glm']]], + ['lowp_5fimat3',['lowp_imat3',['../a00712.html#ga69bfe668f4170379fc1f35d82b060c43',1,'glm']]], + ['lowp_5fimat3x2',['lowp_imat3x2',['../a00712.html#ga33db8f27491d30906cd37c0d86b3f432',1,'glm']]], + ['lowp_5fimat3x3',['lowp_imat3x3',['../a00712.html#ga664f061df00020048c3f8530329ace45',1,'glm']]], + ['lowp_5fimat3x4',['lowp_imat3x4',['../a00712.html#ga9273faab33623d944af4080befbb2c80',1,'glm']]], + ['lowp_5fimat4',['lowp_imat4',['../a00712.html#gad1e77f7270cad461ca4fcb4c3ec2e98c',1,'glm']]], + ['lowp_5fimat4x2',['lowp_imat4x2',['../a00712.html#ga26ec1a2ba08a1488f5f05336858a0f09',1,'glm']]], + ['lowp_5fimat4x3',['lowp_imat4x3',['../a00712.html#ga8f40483a3ae634ead8ad22272c543a33',1,'glm']]], + ['lowp_5fimat4x4',['lowp_imat4x4',['../a00712.html#gaf65677e53ac8e31a107399340d5e2451',1,'glm']]], + ['lowp_5fint16',['lowp_int16',['../a00721.html#ga698e36b01167fc0f037889334dce8def',1,'glm']]], + ['lowp_5fint16_5ft',['lowp_int16_t',['../a00721.html#ga8b2cd8d31eb345b2d641d9261c38db1a',1,'glm']]], + ['lowp_5fint32',['lowp_int32',['../a00721.html#ga864aabca5f3296e176e0c3ed9cc16b02',1,'glm']]], + ['lowp_5fint32_5ft',['lowp_int32_t',['../a00721.html#ga0350631d35ff800e6133ac6243b13cbc',1,'glm']]], + ['lowp_5fint64',['lowp_int64',['../a00721.html#gaf645b1a60203b39c0207baff5e3d8c3c',1,'glm']]], + ['lowp_5fint64_5ft',['lowp_int64_t',['../a00721.html#gaebf341fc4a5be233f7dde962c2e33847',1,'glm']]], + ['lowp_5fint8',['lowp_int8',['../a00721.html#ga760bcf26fdb23a2c3ecad3c928a19ae6',1,'glm']]], + ['lowp_5fint8_5ft',['lowp_int8_t',['../a00721.html#ga119c41d73fe9977358174eb3ac1035a3',1,'glm']]], + ['lowp_5fivec1',['lowp_ivec1',['../a00693.html#ga836dbb1dc516c233b7f5fe9763bc15dc',1,'glm']]], + ['lowp_5fivec2',['lowp_ivec2',['../a00700.html#ga8433c6c1fdd80c0a83941d94aff73fa0',1,'glm']]], + ['lowp_5fivec3',['lowp_ivec3',['../a00700.html#gac1a86a75b3c68ebb704d7094043669d6',1,'glm']]], + ['lowp_5fivec4',['lowp_ivec4',['../a00700.html#ga27fc23da61859cd6356326c5f1c796de',1,'glm']]], + ['lowp_5fmat2',['lowp_mat2',['../a00702.html#gae400c4ce1f5f3e1fa12861b2baed331a',1,'glm']]], + ['lowp_5fmat2x2',['lowp_mat2x2',['../a00702.html#ga2df7cdaf9a571ce7a1b09435f502c694',1,'glm']]], + ['lowp_5fmat2x3',['lowp_mat2x3',['../a00702.html#ga3eee3a74d0f1de8635d846dfb29ec4bb',1,'glm']]], + ['lowp_5fmat2x4',['lowp_mat2x4',['../a00702.html#gade27f8324a16626cbce5d3e7da66b070',1,'glm']]], + ['lowp_5fmat3',['lowp_mat3',['../a00702.html#ga6271ebc85ed778ccc15458c3d86fc854',1,'glm']]], + ['lowp_5fmat3x2',['lowp_mat3x2',['../a00702.html#gaabf6cf90fd31efe25c94965507e98390',1,'glm']]], + ['lowp_5fmat3x3',['lowp_mat3x3',['../a00702.html#ga63362cb4a63fc1be7d2e49cd5d574c84',1,'glm']]], + ['lowp_5fmat3x4',['lowp_mat3x4',['../a00702.html#gac5fc6786688eff02904ca5e7d6960092',1,'glm']]], + ['lowp_5fmat4',['lowp_mat4',['../a00702.html#ga2dedee030500865267cd5851c00c139d',1,'glm']]], + ['lowp_5fmat4x2',['lowp_mat4x2',['../a00702.html#gafa3cdb8f24d09d761ec9ae2a4c7e5e21',1,'glm']]], + ['lowp_5fmat4x3',['lowp_mat4x3',['../a00702.html#ga534c3ef5c3b8fdd8656b6afc205b4b77',1,'glm']]], + ['lowp_5fmat4x4',['lowp_mat4x4',['../a00702.html#ga686468a9a815bd4db8cddae42a6d6b87',1,'glm']]], + ['lowp_5fquat',['lowp_quat',['../a00674.html#gade62c5316c1c11a79c34c00c189558eb',1,'glm']]], + ['lowp_5fu16',['lowp_u16',['../a00721.html#ga504ce1631cb2ac02fcf1d44d8c2aa126',1,'glm']]], + ['lowp_5fu16vec1',['lowp_u16vec1',['../a00721.html#gaa6aab4ee7189b86716f5d7015d43021d',1,'glm']]], + ['lowp_5fu16vec2',['lowp_u16vec2',['../a00721.html#ga2a7d997da9ac29cb931e35bd399f58df',1,'glm']]], + ['lowp_5fu16vec3',['lowp_u16vec3',['../a00721.html#gac0253db6c3d3bae1f591676307a9dd8c',1,'glm']]], + ['lowp_5fu16vec4',['lowp_u16vec4',['../a00721.html#gaa7f00459b9a2e5b2757e70afc0c189e1',1,'glm']]], + ['lowp_5fu32',['lowp_u32',['../a00721.html#ga4f072ada9552e1e480bbb3b1acde5250',1,'glm']]], + ['lowp_5fu32vec1',['lowp_u32vec1',['../a00721.html#gabed3be8dfdc4a0df4bf3271dbd7344c4',1,'glm']]], + ['lowp_5fu32vec2',['lowp_u32vec2',['../a00721.html#gaf7e286e81347011e257ee779524e73b9',1,'glm']]], + ['lowp_5fu32vec3',['lowp_u32vec3',['../a00721.html#gad3ad390560a671b1f676fbf03cd3aa15',1,'glm']]], + ['lowp_5fu32vec4',['lowp_u32vec4',['../a00721.html#ga4502885718742aa238c36a312c3f3f20',1,'glm']]], + ['lowp_5fu64',['lowp_u64',['../a00721.html#ga30069d1f02b19599cbfadf98c23ac6ed',1,'glm']]], + ['lowp_5fu64vec1',['lowp_u64vec1',['../a00721.html#ga859be7b9d3a3765c1cafc14dbcf249a6',1,'glm']]], + ['lowp_5fu64vec2',['lowp_u64vec2',['../a00721.html#ga581485db4ba6ddb501505ee711fd8e42',1,'glm']]], + ['lowp_5fu64vec3',['lowp_u64vec3',['../a00721.html#gaa4a8682bec7ec8af666ef87fae38d5d1',1,'glm']]], + ['lowp_5fu64vec4',['lowp_u64vec4',['../a00721.html#ga6fccc89c34045c86339f6fa781ce96de',1,'glm']]], + ['lowp_5fu8',['lowp_u8',['../a00721.html#ga1b09f03da7ac43055c68a349d5445083',1,'glm']]], + ['lowp_5fu8vec1',['lowp_u8vec1',['../a00721.html#ga4b2e0e10d8d154fec9cab50e216588ec',1,'glm']]], + ['lowp_5fu8vec2',['lowp_u8vec2',['../a00721.html#gae6f63fa38635431e51a8f2602f15c566',1,'glm']]], + ['lowp_5fu8vec3',['lowp_u8vec3',['../a00721.html#ga150dc47e31c6b8cf8461803c8d56f7bd',1,'glm']]], + ['lowp_5fu8vec4',['lowp_u8vec4',['../a00721.html#ga9910927f3a4d1addb3da6a82542a8287',1,'glm']]], + ['lowp_5fuint16',['lowp_uint16',['../a00721.html#gad68bfd9f881856fc863a6ebca0b67f78',1,'glm']]], + ['lowp_5fuint16_5ft',['lowp_uint16_t',['../a00721.html#ga91c4815f93177eb423362fd296a87e9f',1,'glm']]], + ['lowp_5fuint32',['lowp_uint32',['../a00721.html#gaa6a5b461bbf5fe20982472aa51896d4b',1,'glm']]], + ['lowp_5fuint32_5ft',['lowp_uint32_t',['../a00721.html#gaf1b735b4b1145174f4e4167d13778f9b',1,'glm']]], + ['lowp_5fuint64',['lowp_uint64',['../a00721.html#gaa212b805736a759998e312cbdd550fae',1,'glm']]], + ['lowp_5fuint64_5ft',['lowp_uint64_t',['../a00721.html#ga8dd3a3281ae5c970ffe0c41d538aa153',1,'glm']]], + ['lowp_5fuint8',['lowp_uint8',['../a00721.html#gaf49470869e9be2c059629b250619804e',1,'glm']]], + ['lowp_5fuint8_5ft',['lowp_uint8_t',['../a00721.html#ga667b2ece2b258be898812dc2177995d1',1,'glm']]], + ['lowp_5fumat2',['lowp_umat2',['../a00712.html#gaf2fba702d990437fc88ff3f3a76846ee',1,'glm']]], + ['lowp_5fumat2x2',['lowp_umat2x2',['../a00712.html#ga7b2e9d89745f7175051284e54c81d81c',1,'glm']]], + ['lowp_5fumat2x3',['lowp_umat2x3',['../a00712.html#ga3072f90fd86f17a862e21589fbb14c0f',1,'glm']]], + ['lowp_5fumat2x4',['lowp_umat2x4',['../a00712.html#ga8bb45fec4bd77bd81b4ae7eb961a270d',1,'glm']]], + ['lowp_5fumat3',['lowp_umat3',['../a00712.html#gaf1145f72bcdd590f5808c4bc170c2924',1,'glm']]], + ['lowp_5fumat3x2',['lowp_umat3x2',['../a00712.html#ga56ea68c6a6cba8d8c21d17bb14e69c6b',1,'glm']]], + ['lowp_5fumat3x3',['lowp_umat3x3',['../a00712.html#ga4f660a39a395cc14f018f985e7dfbeb5',1,'glm']]], + ['lowp_5fumat3x4',['lowp_umat3x4',['../a00712.html#gaec3d624306bd59649f021864709d56b5',1,'glm']]], + ['lowp_5fumat4',['lowp_umat4',['../a00712.html#gac092c6105827bf9ea080db38074b78eb',1,'glm']]], + ['lowp_5fumat4x2',['lowp_umat4x2',['../a00712.html#ga7716c2b210d141846f1ac4e774adef5e',1,'glm']]], + ['lowp_5fumat4x3',['lowp_umat4x3',['../a00712.html#ga09ab33a2636f5f43f7fae29cfbc20fff',1,'glm']]], + ['lowp_5fumat4x4',['lowp_umat4x4',['../a00712.html#ga10aafc66cf1a0ece336b1c5ae13d0cc0',1,'glm']]], + ['lowp_5fuvec1',['lowp_uvec1',['../a00696.html#ga8bf3fc8a7863d140f48b29341c750402',1,'glm']]], + ['lowp_5fuvec2',['lowp_uvec2',['../a00700.html#ga752ee45136011301b64afd8c310c47a4',1,'glm']]], + ['lowp_5fuvec3',['lowp_uvec3',['../a00700.html#ga7b2efbdd6bdc2f8250c57f3e5dc9a292',1,'glm']]], + ['lowp_5fuvec4',['lowp_uvec4',['../a00700.html#ga5e6a632ec1165cf9f54ceeaa5e9b2b1e',1,'glm']]], + ['lowp_5fvec1',['lowp_vec1',['../a00691.html#ga0a57630f03031706b1d26a7d70d9184c',1,'glm']]], + ['lowp_5fvec2',['lowp_vec2',['../a00700.html#ga30e8baef5d56d5c166872a2bc00f36e9',1,'glm']]], + ['lowp_5fvec3',['lowp_vec3',['../a00700.html#ga868e8e4470a3ef97c7ee3032bf90dc79',1,'glm']]], + ['lowp_5fvec4',['lowp_vec4',['../a00700.html#gace3acb313c800552a9411953eb8b2ed7',1,'glm']]], + ['luminosity',['luminosity',['../a00729.html#gad028e0a4f1a9c812b39439b746295b34',1,'glm']]], + ['lxnorm',['lxNorm',['../a00760.html#gacad23d30497eb16f67709f2375d1f66a',1,'glm::lxNorm(vec< 3, T, Q > const &x, vec< 3, T, Q > const &y, unsigned int Depth)'],['../a00760.html#gac61b6d81d796d6eb4d4183396a19ab91',1,'glm::lxNorm(vec< 3, T, Q > const &x, unsigned int Depth)']]] +]; diff --git a/common/glm/doc/api/search/all_a.html b/common/glm/doc/api/search/all_a.html new file mode 100644 index 000000000..3148a8e51 --- /dev/null +++ b/common/glm/doc/api/search/all_a.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/all_a.js b/common/glm/doc/api/search/all_a.js new file mode 100644 index 000000000..d675c7e8c --- /dev/null +++ b/common/glm/doc/api/search/all_a.js @@ -0,0 +1,296 @@ +var searchData= +[ + ['matrix_20functions',['Matrix functions',['../a00788.html',1,'']]], + ['matrix_20types',['Matrix types',['../a00701.html',1,'']]], + ['matrix_20types_20with_20precision_20qualifiers',['Matrix types with precision qualifiers',['../a00702.html',1,'']]], + ['make_5fmat2',['make_mat2',['../a00722.html#ga04409e74dc3da251d2501acf5b4b546c',1,'glm']]], + ['make_5fmat2x2',['make_mat2x2',['../a00722.html#gae49e1c7bcd5abec74d1c34155031f663',1,'glm']]], + ['make_5fmat2x3',['make_mat2x3',['../a00722.html#ga21982104164789cf8985483aaefc25e8',1,'glm']]], + ['make_5fmat2x4',['make_mat2x4',['../a00722.html#ga078b862c90b0e9a79ed43a58997d8388',1,'glm']]], + ['make_5fmat3',['make_mat3',['../a00722.html#ga611ee7c4d4cadfc83a8fa8e1d10a170f',1,'glm']]], + ['make_5fmat3x2',['make_mat3x2',['../a00722.html#ga27a24e121dc39e6857620e0f85b6e1a8',1,'glm']]], + ['make_5fmat3x3',['make_mat3x3',['../a00722.html#gaf2e8337b15c3362aaeb6e5849e1c0536',1,'glm']]], + ['make_5fmat3x4',['make_mat3x4',['../a00722.html#ga05dd66232aedb993e3b8e7b35eaf932b',1,'glm']]], + ['make_5fmat4',['make_mat4',['../a00722.html#gae7bcedb710d1446c87fd1fc93ed8ee9a',1,'glm']]], + ['make_5fmat4x2',['make_mat4x2',['../a00722.html#ga8b34c9b25bf3310d8ff9c828c7e2d97c',1,'glm']]], + ['make_5fmat4x3',['make_mat4x3',['../a00722.html#ga0330bf6640092d7985fac92927bbd42b',1,'glm']]], + ['make_5fmat4x4',['make_mat4x4',['../a00722.html#ga8f084be30e404844bfbb4a551ac2728c',1,'glm']]], + ['make_5fquat',['make_quat',['../a00722.html#ga58110d7d81cf7d029e2bab7f8cd9b246',1,'glm']]], + ['make_5fvec1',['make_vec1',['../a00722.html#ga4135f03f3049f0a4eb76545c4967957c',1,'glm::make_vec1(vec< 1, T, Q > const &v)'],['../a00722.html#ga13c92b81e55f201b052a6404d57da220',1,'glm::make_vec1(vec< 2, T, Q > const &v)'],['../a00722.html#ga3c23cc74086d361e22bbd5e91a334e03',1,'glm::make_vec1(vec< 3, T, Q > const &v)'],['../a00722.html#ga6af06bb60d64ca8bcd169e3c93bc2419',1,'glm::make_vec1(vec< 4, T, Q > const &v)']]], + ['make_5fvec2',['make_vec2',['../a00722.html#ga8476d0e6f1b9b4a6193cc25f59d8a896',1,'glm::make_vec2(vec< 1, T, Q > const &v)'],['../a00722.html#gae54bd325a08ad26edf63929201adebc7',1,'glm::make_vec2(vec< 2, T, Q > const &v)'],['../a00722.html#ga0084fea4694cf47276e9cccbe7b1015a',1,'glm::make_vec2(vec< 3, T, Q > const &v)'],['../a00722.html#ga2b81f71f3a222fe5bba81e3983751249',1,'glm::make_vec2(vec< 4, T, Q > const &v)'],['../a00722.html#ga81253cf7b0ebfbb1e70540c5774e6824',1,'glm::make_vec2(T const *const ptr)']]], + ['make_5fvec3',['make_vec3',['../a00722.html#ga9147e4b3a5d0f4772edfbfd179d7ea0b',1,'glm::make_vec3(vec< 1, T, Q > const &v)'],['../a00722.html#ga482b60a842a5b154d3eed392417a9511',1,'glm::make_vec3(vec< 2, T, Q > const &v)'],['../a00722.html#gacd57046034df557b8b1c457f58613623',1,'glm::make_vec3(vec< 3, T, Q > const &v)'],['../a00722.html#ga8b589ed7d41a298b516d2a69169248f1',1,'glm::make_vec3(vec< 4, T, Q > const &v)'],['../a00722.html#gad9e0d36ff489cb30c65ad1fa40351651',1,'glm::make_vec3(T const *const ptr)']]], + ['make_5fvec4',['make_vec4',['../a00722.html#ga600cb97f70c5d50d3a4a145e1cafbf37',1,'glm::make_vec4(vec< 1, T, Q > const &v)'],['../a00722.html#gaa9bd116caf28196fd1cf00b278286fa7',1,'glm::make_vec4(vec< 2, T, Q > const &v)'],['../a00722.html#ga4036328ba4702c74cbdfad1fc03d1b8f',1,'glm::make_vec4(vec< 3, T, Q > const &v)'],['../a00722.html#gaa95cb15732f708f613e65a0578895ae5',1,'glm::make_vec4(vec< 4, T, Q > const &v)'],['../a00722.html#ga63f576518993efc22a969f18f80e29bb',1,'glm::make_vec4(T const *const ptr)']]], + ['mask',['mask',['../a00706.html#gad7eba518a0b71662114571ee76939f8a',1,'glm::mask(genIUType Bits)'],['../a00706.html#ga2e64e3b922a296033b825311e7f5fff1',1,'glm::mask(vec< L, T, Q > const &v)']]], + ['mat2',['mat2',['../a00701.html#ga8dd59e7fc6913ac5d61b86553e9148ba',1,'glm']]], + ['mat2x2',['mat2x2',['../a00701.html#gaaa17ef6bfa4e4f2692348b1460c8efcb',1,'glm']]], + ['mat2x2_2ehpp',['mat2x2.hpp',['../a00617.html',1,'']]], + ['mat2x3',['mat2x3',['../a00701.html#ga493ab21243abe564b3f7d381e677d29a',1,'glm']]], + ['mat2x3_2ehpp',['mat2x3.hpp',['../a00620.html',1,'']]], + ['mat2x4',['mat2x4',['../a00701.html#ga8e879b57ddd81e5bf5a88929844e8b40',1,'glm']]], + ['mat2x4_2ehpp',['mat2x4.hpp',['../a00623.html',1,'']]], + ['mat2x4_5fcast',['mat2x4_cast',['../a00734.html#gae99d143b37f9cad4cd9285571aab685a',1,'glm']]], + ['mat3',['mat3',['../a00701.html#gaefb0fc7a4960b782c18708bb6b655262',1,'glm']]], + ['mat3_5fcast',['mat3_cast',['../a00663.html#ga333ab70047fbe4132406100c292dbc89',1,'glm']]], + ['mat3x2',['mat3x2',['../a00698.html#ga2c27aea32de57d58aec8e92d5d2181e2',1,'glm']]], + ['mat3x2_2ehpp',['mat3x2.hpp',['../a00626.html',1,'']]], + ['mat3x3',['mat3x3',['../a00701.html#gab91887d7565059dac640e3a1921c914a',1,'glm']]], + ['mat3x3_2ehpp',['mat3x3.hpp',['../a00629.html',1,'']]], + ['mat3x4',['mat3x4',['../a00701.html#gaf991cad0b34f64e33af186326dbc4d66',1,'glm']]], + ['mat3x4_2ehpp',['mat3x4.hpp',['../a00632.html',1,'']]], + ['mat3x4_5fcast',['mat3x4_cast',['../a00734.html#gaf59f5bb69620d2891c3795c6f2639179',1,'glm']]], + ['mat4',['mat4',['../a00701.html#ga0db98d836c5549d31cf64ecd043b7af7',1,'glm']]], + ['mat4_5fcast',['mat4_cast',['../a00663.html#ga1113212d9bdefc2e31ad40e5bbb506f3',1,'glm']]], + ['mat4x2',['mat4x2',['../a00701.html#gad941c947ad6cdd117a0e8554a4754983',1,'glm']]], + ['mat4x2_2ehpp',['mat4x2.hpp',['../a00635.html',1,'']]], + ['mat4x3',['mat4x3',['../a00701.html#gac7574544bb94777bdbd2eb224eb72fd0',1,'glm']]], + ['mat4x3_2ehpp',['mat4x3.hpp',['../a00638.html',1,'']]], + ['mat4x4',['mat4x4',['../a00701.html#gab2d35cc2655f44d60958d60a1de34e81',1,'glm']]], + ['mat4x4_2ehpp',['mat4x4.hpp',['../a00641.html',1,'']]], + ['matrix_2ehpp',['matrix.hpp',['../a00644.html',1,'']]], + ['matrix_5faccess_2ehpp',['matrix_access.hpp',['../a00404.html',1,'']]], + ['matrix_5fclip_5fspace_2ehpp',['matrix_clip_space.hpp',['../a00083.html',1,'']]], + ['matrix_5fcross_5fproduct_2ehpp',['matrix_cross_product.hpp',['../a00515.html',1,'']]], + ['matrix_5fdecompose_2ehpp',['matrix_decompose.hpp',['../a00518.html',1,'']]], + ['matrix_5fdouble2x2_2ehpp',['matrix_double2x2.hpp',['../a00086.html',1,'']]], + ['matrix_5fdouble2x2_5fprecision_2ehpp',['matrix_double2x2_precision.hpp',['../a00089.html',1,'']]], + ['matrix_5fdouble2x3_2ehpp',['matrix_double2x3.hpp',['../a00092.html',1,'']]], + ['matrix_5fdouble2x3_5fprecision_2ehpp',['matrix_double2x3_precision.hpp',['../a00095.html',1,'']]], + ['matrix_5fdouble2x4_2ehpp',['matrix_double2x4.hpp',['../a00098.html',1,'']]], + ['matrix_5fdouble2x4_5fprecision_2ehpp',['matrix_double2x4_precision.hpp',['../a00101.html',1,'']]], + ['matrix_5fdouble3x2_2ehpp',['matrix_double3x2.hpp',['../a00104.html',1,'']]], + ['matrix_5fdouble3x2_5fprecision_2ehpp',['matrix_double3x2_precision.hpp',['../a00107.html',1,'']]], + ['matrix_5fdouble3x3_2ehpp',['matrix_double3x3.hpp',['../a00110.html',1,'']]], + ['matrix_5fdouble3x3_5fprecision_2ehpp',['matrix_double3x3_precision.hpp',['../a00113.html',1,'']]], + ['matrix_5fdouble3x4_2ehpp',['matrix_double3x4.hpp',['../a00116.html',1,'']]], + ['matrix_5fdouble3x4_5fprecision_2ehpp',['matrix_double3x4_precision.hpp',['../a00119.html',1,'']]], + ['matrix_5fdouble4x2_2ehpp',['matrix_double4x2.hpp',['../a00122.html',1,'']]], + ['matrix_5fdouble4x2_5fprecision_2ehpp',['matrix_double4x2_precision.hpp',['../a00125.html',1,'']]], + ['matrix_5fdouble4x3_2ehpp',['matrix_double4x3.hpp',['../a00128.html',1,'']]], + ['matrix_5fdouble4x3_5fprecision_2ehpp',['matrix_double4x3_precision.hpp',['../a00131.html',1,'']]], + ['matrix_5fdouble4x4_2ehpp',['matrix_double4x4.hpp',['../a00134.html',1,'']]], + ['matrix_5fdouble4x4_5fprecision_2ehpp',['matrix_double4x4_precision.hpp',['../a00137.html',1,'']]], + ['matrix_5ffactorisation_2ehpp',['matrix_factorisation.hpp',['../a00521.html',1,'']]], + ['matrix_5ffloat2x2_2ehpp',['matrix_float2x2.hpp',['../a00140.html',1,'']]], + ['matrix_5ffloat2x2_5fprecision_2ehpp',['matrix_float2x2_precision.hpp',['../a00143.html',1,'']]], + ['matrix_5ffloat2x3_2ehpp',['matrix_float2x3.hpp',['../a00146.html',1,'']]], + ['matrix_5ffloat2x3_5fprecision_2ehpp',['matrix_float2x3_precision.hpp',['../a00149.html',1,'']]], + ['matrix_5ffloat2x4_2ehpp',['matrix_float2x4.hpp',['../a00152.html',1,'']]], + ['matrix_5ffloat2x4_5fprecision_2ehpp',['matrix_float2x4_precision.hpp',['../a00155.html',1,'']]], + ['matrix_5ffloat3x2_2ehpp',['matrix_float3x2.hpp',['../a00158.html',1,'']]], + ['matrix_5ffloat3x2_5fprecision_2ehpp',['matrix_float3x2_precision.hpp',['../a00161.html',1,'']]], + ['matrix_5ffloat3x3_2ehpp',['matrix_float3x3.hpp',['../a00164.html',1,'']]], + ['matrix_5ffloat3x3_5fprecision_2ehpp',['matrix_float3x3_precision.hpp',['../a00167.html',1,'']]], + ['matrix_5ffloat3x4_2ehpp',['matrix_float3x4.hpp',['../a00170.html',1,'']]], + ['matrix_5ffloat3x4_5fprecision_2ehpp',['matrix_float3x4_precision.hpp',['../a00173.html',1,'']]], + ['matrix_5ffloat4x2_2ehpp',['matrix_float4x2.hpp',['../a00176.html',1,'']]], + ['matrix_5ffloat4x3_2ehpp',['matrix_float4x3.hpp',['../a00182.html',1,'']]], + ['matrix_5ffloat4x3_5fprecision_2ehpp',['matrix_float4x3_precision.hpp',['../a00185.html',1,'']]], + ['matrix_5ffloat4x4_2ehpp',['matrix_float4x4.hpp',['../a00188.html',1,'']]], + ['matrix_5ffloat4x4_5fprecision_2ehpp',['matrix_float4x4_precision.hpp',['../a00191.html',1,'']]], + ['matrix_5finteger_2ehpp',['matrix_integer.hpp',['../a00407.html',1,'']]], + ['matrix_5finterpolation_2ehpp',['matrix_interpolation.hpp',['../a00524.html',1,'']]], + ['matrix_5finverse_2ehpp',['matrix_inverse.hpp',['../a00410.html',1,'']]], + ['matrix_5fmajor_5fstorage_2ehpp',['matrix_major_storage.hpp',['../a00527.html',1,'']]], + ['matrix_5foperation_2ehpp',['matrix_operation.hpp',['../a00530.html',1,'']]], + ['matrix_5fprojection_2ehpp',['matrix_projection.hpp',['../a00194.html',1,'']]], + ['matrix_5fquery_2ehpp',['matrix_query.hpp',['../a00533.html',1,'']]], + ['matrix_5frelational_2ehpp',['matrix_relational.hpp',['../a00197.html',1,'']]], + ['matrix_5ftransform_5f2d_2ehpp',['matrix_transform_2d.hpp',['../a00536.html',1,'']]], + ['matrixcompmult',['matrixCompMult',['../a00788.html#gaf14569404c779fedca98d0b9b8e58c1f',1,'glm']]], + ['matrixcross3',['matrixCross3',['../a00751.html#ga5802386bb4c37b3332a3b6fd8b6960ff',1,'glm']]], + ['matrixcross4',['matrixCross4',['../a00751.html#ga20057fff91ddafa102934adb25458cde',1,'glm']]], + ['max',['max',['../a00662.html#gae02d42887fc5570451f880e3c624b9ac',1,'glm::max(genType x, genType y)'],['../a00662.html#ga03e45d6e60d1c36edb00c52edeea0f31',1,'glm::max(vec< L, T, Q > const &x, T y)'],['../a00662.html#gac1fec0c3303b572a6d4697a637213870',1,'glm::max(vec< L, T, Q > const &x, vec< L, T, Q > const &y)'],['../a00679.html#gaa20839d9ab14514f8966f69877ea0de8',1,'glm::max(T a, T b, T c)'],['../a00679.html#ga2274b5e75ed84b0b1e50d8d22f1f2f67',1,'glm::max(T a, T b, T c, T d)'],['../a00687.html#gaa45d34f6a2906f8bf58ab2ba5429234d',1,'glm::max(vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &z)'],['../a00687.html#ga94d42b8da2b4ded5ddf7504fbdc6bf10',1,'glm::max(vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &z, vec< L, T, Q > const &w)'],['../a00738.html#ga04991ccb9865c4c4e58488cfb209ce69',1,'glm::max(T const &x, T const &y, T const &z)'],['../a00738.html#gae1b7bbe5c91de4924835ea3e14530744',1,'glm::max(C< T > const &x, typename C< T >::T const &y, typename C< T >::T const &z)'],['../a00738.html#gaf832e9d4ab4826b2dda2fda25935a3a4',1,'glm::max(C< T > const &x, C< T > const &y, C< T > const &z)'],['../a00738.html#ga78e04a0cef1c4863fcae1a2130500d87',1,'glm::max(T const &x, T const &y, T const &z, T const &w)'],['../a00738.html#ga7cca8b53cfda402040494cdf40fbdf4a',1,'glm::max(C< T > const &x, typename C< T >::T const &y, typename C< T >::T const &z, typename C< T >::T const &w)'],['../a00738.html#gaacffbc466c2d08c140b181e7fd8a4858',1,'glm::max(C< T > const &x, C< T > const &y, C< T > const &z, C< T > const &w)']]], + ['mediump_5fbvec1',['mediump_bvec1',['../a00686.html#ga7b4ccb989ba179fa44f7b0879c782621',1,'glm']]], + ['mediump_5fbvec2',['mediump_bvec2',['../a00700.html#ga1e743764869efa9223c2bcefccedaddc',1,'glm']]], + ['mediump_5fbvec3',['mediump_bvec3',['../a00700.html#ga50c783c25082882ef00fe2e5cddba4aa',1,'glm']]], + ['mediump_5fbvec4',['mediump_bvec4',['../a00700.html#ga0be2c682258604a35004f088782a9645',1,'glm']]], + ['mediump_5fddualquat',['mediump_ddualquat',['../a00734.html#ga0fb11e48e2d16348ccb06a25213641b4',1,'glm']]], + ['mediump_5fdmat2',['mediump_dmat2',['../a00702.html#ga6205fd19be355600334edef6af0b27cb',1,'glm']]], + ['mediump_5fdmat2x2',['mediump_dmat2x2',['../a00702.html#ga51dc36a7719cb458fa5114831c20d64f',1,'glm']]], + ['mediump_5fdmat2x3',['mediump_dmat2x3',['../a00702.html#ga741e05adf1f12d5d913f67088db1009a',1,'glm']]], + ['mediump_5fdmat2x4',['mediump_dmat2x4',['../a00702.html#ga685bda24922d112786af385deb4deb43',1,'glm']]], + ['mediump_5fdmat3',['mediump_dmat3',['../a00702.html#ga939fbf9c53008a8e84c7dd7cf8de29e2',1,'glm']]], + ['mediump_5fdmat3x2',['mediump_dmat3x2',['../a00702.html#ga2076157df85e49b8c021e03e46a376c1',1,'glm']]], + ['mediump_5fdmat3x3',['mediump_dmat3x3',['../a00702.html#ga47bd2aae4701ee2fc865674a9df3d7a6',1,'glm']]], + ['mediump_5fdmat3x4',['mediump_dmat3x4',['../a00702.html#ga3a132bd05675c2e46556f67cf738600b',1,'glm']]], + ['mediump_5fdmat4',['mediump_dmat4',['../a00702.html#gaf650bc667bf2a0e496b5a9182bc8d378',1,'glm']]], + ['mediump_5fdmat4x2',['mediump_dmat4x2',['../a00702.html#gae220fa4c5a7b13ef2ab0420340de645c',1,'glm']]], + ['mediump_5fdmat4x3',['mediump_dmat4x3',['../a00702.html#ga43ef60e4d996db15c9c8f069a96ff763',1,'glm']]], + ['mediump_5fdmat4x4',['mediump_dmat4x4',['../a00702.html#ga5389b3ab32dc0d72bea00057ab6d1dd3',1,'glm']]], + ['mediump_5fdquat',['mediump_dquat',['../a00671.html#gacdf73b1f7fd8f5a0c79a3934e99c1a14',1,'glm']]], + ['mediump_5fdualquat',['mediump_dualquat',['../a00734.html#gaa7aeb54c167712b38f2178a1be2360ad',1,'glm']]], + ['mediump_5fdvec1',['mediump_dvec1',['../a00689.html#ga79a789ebb176b37a45848f7ccdd3b3dd',1,'glm']]], + ['mediump_5fdvec2',['mediump_dvec2',['../a00700.html#ga2f4f6e9a69a0281d06940fd0990cafc3',1,'glm']]], + ['mediump_5fdvec3',['mediump_dvec3',['../a00700.html#ga61c3b1dff4ec7c878af80503141b9f37',1,'glm']]], + ['mediump_5fdvec4',['mediump_dvec4',['../a00700.html#ga23a8bca00914a51542bfea13a4778186',1,'glm']]], + ['mediump_5ff32',['mediump_f32',['../a00721.html#ga3b27fcd9eaa2757f0aaf6b0ce0d85c80',1,'glm']]], + ['mediump_5ff32mat2',['mediump_f32mat2',['../a00721.html#gaf9020c6176a75bc84828ab01ea7dac25',1,'glm']]], + ['mediump_5ff32mat2x2',['mediump_f32mat2x2',['../a00721.html#gaa3ca74a44102035b3ffb5c9c52dfdd3f',1,'glm']]], + ['mediump_5ff32mat2x3',['mediump_f32mat2x3',['../a00721.html#gad4cc829ab1ad3e05ac0a24828a3c95cf',1,'glm']]], + ['mediump_5ff32mat2x4',['mediump_f32mat2x4',['../a00721.html#gae71445ac6cd0b9fba3e5c905cd030fb1',1,'glm']]], + ['mediump_5ff32mat3',['mediump_f32mat3',['../a00721.html#gaaaf878d0d7bfc0aac054fe269a886ca8',1,'glm']]], + ['mediump_5ff32mat3x2',['mediump_f32mat3x2',['../a00721.html#gaaab39454f56cf9fc6d940358ce5e6a0f',1,'glm']]], + ['mediump_5ff32mat3x3',['mediump_f32mat3x3',['../a00721.html#gacd80ad7640e9e32f2edcb8330b1ffe4f',1,'glm']]], + ['mediump_5ff32mat3x4',['mediump_f32mat3x4',['../a00721.html#ga8df705d775b776f5ae6b39e2ab892899',1,'glm']]], + ['mediump_5ff32mat4',['mediump_f32mat4',['../a00721.html#ga4491baaebbc46a20f1cb5da985576bf4',1,'glm']]], + ['mediump_5ff32mat4x2',['mediump_f32mat4x2',['../a00721.html#gab005efe0fa4de1a928e8ddec4bc2c43f',1,'glm']]], + ['mediump_5ff32mat4x3',['mediump_f32mat4x3',['../a00721.html#gade108f16633cf95fa500b5b8c36c8b00',1,'glm']]], + ['mediump_5ff32mat4x4',['mediump_f32mat4x4',['../a00721.html#ga936e95b881ecd2d109459ca41913fa99',1,'glm']]], + ['mediump_5ff32quat',['mediump_f32quat',['../a00721.html#gaa40c03d52dbfbfaf03e75773b9606ff3',1,'glm']]], + ['mediump_5ff32vec1',['mediump_f32vec1',['../a00721.html#gabb33cab7d7c74cc14aa95455d0690865',1,'glm']]], + ['mediump_5ff32vec2',['mediump_f32vec2',['../a00721.html#gad6eb11412a3161ca8dc1d63b2a307c4b',1,'glm']]], + ['mediump_5ff32vec3',['mediump_f32vec3',['../a00721.html#ga062ffef2973bd8241df993c3b30b327c',1,'glm']]], + ['mediump_5ff32vec4',['mediump_f32vec4',['../a00721.html#gad80c84bcd5f585840faa6179f6fd446c',1,'glm']]], + ['mediump_5ff64',['mediump_f64',['../a00721.html#ga6d40381d78472553f878f66e443feeef',1,'glm']]], + ['mediump_5ff64mat2',['mediump_f64mat2',['../a00721.html#gac1281da5ded55047e8892b0e1f1ae965',1,'glm']]], + ['mediump_5ff64mat2x2',['mediump_f64mat2x2',['../a00721.html#ga4fd527644cccbca4cb205320eab026f3',1,'glm']]], + ['mediump_5ff64mat2x3',['mediump_f64mat2x3',['../a00721.html#gafd9a6ebc0c7b95f5c581d00d16a17c54',1,'glm']]], + ['mediump_5ff64mat2x4',['mediump_f64mat2x4',['../a00721.html#gaf306dd69e53633636aee38cea79d4cb7',1,'glm']]], + ['mediump_5ff64mat3',['mediump_f64mat3',['../a00721.html#gad35fb67eb1d03c5a514f0bd7aed1c776',1,'glm']]], + ['mediump_5ff64mat3x2',['mediump_f64mat3x2',['../a00721.html#gacd926d36a72433f6cac51dd60fa13107',1,'glm']]], + ['mediump_5ff64mat3x3',['mediump_f64mat3x3',['../a00721.html#ga84d88a6e3a54ccd2b67e195af4a4c23e',1,'glm']]], + ['mediump_5ff64mat3x4',['mediump_f64mat3x4',['../a00721.html#gad38c544d332b8c4bd0b70b1bd9feccc2',1,'glm']]], + ['mediump_5ff64mat4',['mediump_f64mat4',['../a00721.html#gaa805ef691c711dc41e2776cfb67f5cf5',1,'glm']]], + ['mediump_5ff64mat4x2',['mediump_f64mat4x2',['../a00721.html#ga17d36f0ea22314117e1cec9594b33945',1,'glm']]], + ['mediump_5ff64mat4x3',['mediump_f64mat4x3',['../a00721.html#ga54697a78f9a4643af6a57fc2e626ec0d',1,'glm']]], + ['mediump_5ff64mat4x4',['mediump_f64mat4x4',['../a00721.html#ga66edb8de17b9235029472f043ae107e9',1,'glm']]], + ['mediump_5ff64quat',['mediump_f64quat',['../a00721.html#ga5e52f485059ce6e3010c590b882602c9',1,'glm']]], + ['mediump_5ff64vec1',['mediump_f64vec1',['../a00721.html#gac30fdf8afa489400053275b6a3350127',1,'glm']]], + ['mediump_5ff64vec2',['mediump_f64vec2',['../a00721.html#ga8ebc04ecf6440c4ee24718a16600ce6b',1,'glm']]], + ['mediump_5ff64vec3',['mediump_f64vec3',['../a00721.html#ga461c4c7d0757404dd0dba931760b25cf',1,'glm']]], + ['mediump_5ff64vec4',['mediump_f64vec4',['../a00721.html#gacfea053bd6bb3eddb996a4f94de22a3e',1,'glm']]], + ['mediump_5ffdualquat',['mediump_fdualquat',['../a00734.html#ga4a6b594ff7e81150d8143001367a9431',1,'glm']]], + ['mediump_5ffloat32',['mediump_float32',['../a00721.html#ga7812bf00676fb1a86dcd62cca354d2c7',1,'glm']]], + ['mediump_5ffloat32_5ft',['mediump_float32_t',['../a00721.html#gae4dee61f8fe1caccec309fbed02faf12',1,'glm']]], + ['mediump_5ffloat64',['mediump_float64',['../a00721.html#gab83d8aae6e4f115e97a785e8574a115f',1,'glm']]], + ['mediump_5ffloat64_5ft',['mediump_float64_t',['../a00721.html#gac61843e4fa96c1f4e9d8316454f32a8e',1,'glm']]], + ['mediump_5ffmat2',['mediump_fmat2',['../a00721.html#ga74e9133378fd0b4da8ac0bc0876702ff',1,'glm']]], + ['mediump_5ffmat2x2',['mediump_fmat2x2',['../a00721.html#ga98a687c17b174ea316b5f397b64f44bc',1,'glm']]], + ['mediump_5ffmat2x3',['mediump_fmat2x3',['../a00721.html#gaa03f939d90d5ef157df957d93f0b9a64',1,'glm']]], + ['mediump_5ffmat2x4',['mediump_fmat2x4',['../a00721.html#ga35223623e9ccebd8a281873b71b7d213',1,'glm']]], + ['mediump_5ffmat3',['mediump_fmat3',['../a00721.html#ga80823dfad5dba98512c76af498343847',1,'glm']]], + ['mediump_5ffmat3x2',['mediump_fmat3x2',['../a00721.html#ga42569e5b92f8635cedeadb1457ee1467',1,'glm']]], + ['mediump_5ffmat3x3',['mediump_fmat3x3',['../a00721.html#gaa6f526388c74a66b3d52315a14d434ae',1,'glm']]], + ['mediump_5ffmat3x4',['mediump_fmat3x4',['../a00721.html#gaefe8ef520c6cb78590ebbefe648da4d4',1,'glm']]], + ['mediump_5ffmat4',['mediump_fmat4',['../a00721.html#gac1c38778c0b5a1263f07753c05a4f7b9',1,'glm']]], + ['mediump_5ffmat4x2',['mediump_fmat4x2',['../a00721.html#gacea38a85893e17e6834b6cb09a9ad0cf',1,'glm']]], + ['mediump_5ffmat4x3',['mediump_fmat4x3',['../a00721.html#ga41ad497f7eae211556aefd783cb02b90',1,'glm']]], + ['mediump_5ffmat4x4',['mediump_fmat4x4',['../a00721.html#ga22e27beead07bff4d5ce9d6065a57279',1,'glm']]], + ['mediump_5ffvec1',['mediump_fvec1',['../a00721.html#ga367964fc2133d3f1b5b3755ff9cf6c9b',1,'glm']]], + ['mediump_5ffvec2',['mediump_fvec2',['../a00721.html#ga44bfa55cda5dbf53f24a1fb7610393d6',1,'glm']]], + ['mediump_5ffvec3',['mediump_fvec3',['../a00721.html#ga999dc6703ad16e3d3c26b74ea8083f07',1,'glm']]], + ['mediump_5ffvec4',['mediump_fvec4',['../a00721.html#ga1bed890513c0f50b7e7ba4f7f359dbfb',1,'glm']]], + ['mediump_5fi16',['mediump_i16',['../a00721.html#ga62a17cddeb4dffb4e18fe3aea23f051a',1,'glm']]], + ['mediump_5fi16vec1',['mediump_i16vec1',['../a00721.html#gacc44265ed440bf5e6e566782570de842',1,'glm']]], + ['mediump_5fi16vec2',['mediump_i16vec2',['../a00721.html#ga4b5e2c9aaa5d7717bf71179aefa12e88',1,'glm']]], + ['mediump_5fi16vec3',['mediump_i16vec3',['../a00721.html#ga3be6c7fc5fe08fa2274bdb001d5f2633',1,'glm']]], + ['mediump_5fi16vec4',['mediump_i16vec4',['../a00721.html#gaf52982bb23e3a3772649b2c5bb84b107',1,'glm']]], + ['mediump_5fi32',['mediump_i32',['../a00721.html#gaf5e94bf2a20af7601787c154751dc2e1',1,'glm']]], + ['mediump_5fi32vec1',['mediump_i32vec1',['../a00721.html#ga46a57f71e430637559097a732b550a7e',1,'glm']]], + ['mediump_5fi32vec2',['mediump_i32vec2',['../a00721.html#ga20bf224bd4f8a24ecc4ed2004a40c219',1,'glm']]], + ['mediump_5fi32vec3',['mediump_i32vec3',['../a00721.html#ga13a221b910aa9eb1b04ca1c86e81015a',1,'glm']]], + ['mediump_5fi32vec4',['mediump_i32vec4',['../a00721.html#ga6addd4dfee87fc09ab9525e3d07db4c8',1,'glm']]], + ['mediump_5fi64',['mediump_i64',['../a00721.html#ga3ebcb1f6d8d8387253de8bccb058d77f',1,'glm']]], + ['mediump_5fi64vec1',['mediump_i64vec1',['../a00721.html#ga8343e9d244fb17a5bbf0d94d36b3695e',1,'glm']]], + ['mediump_5fi64vec2',['mediump_i64vec2',['../a00721.html#ga2c94aeae3457325944ca1059b0b68330',1,'glm']]], + ['mediump_5fi64vec3',['mediump_i64vec3',['../a00721.html#ga8089722ffdf868cdfe721dea1fb6a90e',1,'glm']]], + ['mediump_5fi64vec4',['mediump_i64vec4',['../a00721.html#gabf1f16c5ab8cb0484bd1e846ae4368f1',1,'glm']]], + ['mediump_5fi8',['mediump_i8',['../a00721.html#gacf1ded173e1e2d049c511d095b259e21',1,'glm']]], + ['mediump_5fi8vec1',['mediump_i8vec1',['../a00721.html#ga85e8893f4ae3630065690a9000c0c483',1,'glm']]], + ['mediump_5fi8vec2',['mediump_i8vec2',['../a00721.html#ga2a8bdc32184ea0a522ef7bd90640cf67',1,'glm']]], + ['mediump_5fi8vec3',['mediump_i8vec3',['../a00721.html#ga6dd1c1618378c6f94d522a61c28773c9',1,'glm']]], + ['mediump_5fi8vec4',['mediump_i8vec4',['../a00721.html#gac7bb04fb857ef7b520e49f6c381432be',1,'glm']]], + ['mediump_5fimat2',['mediump_imat2',['../a00712.html#ga20f4cc7ab23e2aa1f4db9fdb5496d378',1,'glm']]], + ['mediump_5fimat2x2',['mediump_imat2x2',['../a00712.html#ga4b2aeb11a329940721dda9583e71f856',1,'glm']]], + ['mediump_5fimat2x3',['mediump_imat2x3',['../a00712.html#ga74362470ba99843ac70aee5ac38cc674',1,'glm']]], + ['mediump_5fimat2x4',['mediump_imat2x4',['../a00712.html#ga8da25cd380ba30fc5b68a4687deb3e09',1,'glm']]], + ['mediump_5fimat3',['mediump_imat3',['../a00712.html#ga6c63bdc736efd3466e0730de0251cb71',1,'glm']]], + ['mediump_5fimat3x2',['mediump_imat3x2',['../a00712.html#gac0b4e42d648fb3eaf4bb88da82ecc809',1,'glm']]], + ['mediump_5fimat3x3',['mediump_imat3x3',['../a00712.html#gad99cc2aad8fc57f068cfa7719dbbea12',1,'glm']]], + ['mediump_5fimat3x4',['mediump_imat3x4',['../a00712.html#ga67689a518b181a26540bc44a163525cd',1,'glm']]], + ['mediump_5fimat4',['mediump_imat4',['../a00712.html#gaf348552978553630d2a00b78eb887ced',1,'glm']]], + ['mediump_5fimat4x2',['mediump_imat4x2',['../a00712.html#ga8b2d35816f7103f0f4c82dd2f27571fc',1,'glm']]], + ['mediump_5fimat4x3',['mediump_imat4x3',['../a00712.html#ga5b10acc696759e03f6ab918f4467e94c',1,'glm']]], + ['mediump_5fimat4x4',['mediump_imat4x4',['../a00712.html#ga2596869d154dec1180beadbb9df80501',1,'glm']]], + ['mediump_5fint16',['mediump_int16',['../a00721.html#gadff3608baa4b5bd3ed28f95c1c2c345d',1,'glm']]], + ['mediump_5fint16_5ft',['mediump_int16_t',['../a00721.html#ga80e72fe94c88498537e8158ba7591c54',1,'glm']]], + ['mediump_5fint32',['mediump_int32',['../a00721.html#ga5244cef85d6e870e240c76428a262ae8',1,'glm']]], + ['mediump_5fint32_5ft',['mediump_int32_t',['../a00721.html#ga26fc7ced1ad7ca5024f1c973c8dc9180',1,'glm']]], + ['mediump_5fint64',['mediump_int64',['../a00721.html#ga7b968f2b86a0442a89c7359171e1d866',1,'glm']]], + ['mediump_5fint64_5ft',['mediump_int64_t',['../a00721.html#gac3bc41bcac61d1ba8f02a6f68ce23f64',1,'glm']]], + ['mediump_5fint8',['mediump_int8',['../a00721.html#ga6fbd69cbdaa44345bff923a2cf63de7e',1,'glm']]], + ['mediump_5fint8_5ft',['mediump_int8_t',['../a00721.html#ga6d7b3789ecb932c26430009478cac7ae',1,'glm']]], + ['mediump_5fivec1',['mediump_ivec1',['../a00693.html#gad628c608970b3d0aa6cfb63ce6e53e56',1,'glm']]], + ['mediump_5fivec2',['mediump_ivec2',['../a00700.html#gac57496299d276ed97044074097bd5e2c',1,'glm']]], + ['mediump_5fivec3',['mediump_ivec3',['../a00700.html#ga27cfb51e0dbe15bba27a14a8590e8466',1,'glm']]], + ['mediump_5fivec4',['mediump_ivec4',['../a00700.html#ga92a204c37e66ac6c1dc7ae91142f2ea5',1,'glm']]], + ['mediump_5fmat2',['mediump_mat2',['../a00702.html#ga745452bd9c89f5ad948203e4fb4b4ea3',1,'glm']]], + ['mediump_5fmat2x2',['mediump_mat2x2',['../a00702.html#ga0cdf57d29f9448864237b2fb3e39aa1d',1,'glm']]], + ['mediump_5fmat2x3',['mediump_mat2x3',['../a00702.html#ga497d513d552d927537d61fa11e3701ab',1,'glm']]], + ['mediump_5fmat2x4',['mediump_mat2x4',['../a00702.html#gae7b75ea2e09fa686a79bbe9b6ca68ee5',1,'glm']]], + ['mediump_5fmat3',['mediump_mat3',['../a00702.html#ga5aae49834d02732942f44e61d7bce136',1,'glm']]], + ['mediump_5fmat3x2',['mediump_mat3x2',['../a00702.html#ga9e1c9ee65fef547bde793e69723e24eb',1,'glm']]], + ['mediump_5fmat3x3',['mediump_mat3x3',['../a00702.html#gabc0f2f4ad21c90b341881cf056f8650e',1,'glm']]], + ['mediump_5fmat3x4',['mediump_mat3x4',['../a00702.html#gaa669c6675c3405f76c0b14020d1c0d61',1,'glm']]], + ['mediump_5fmat4',['mediump_mat4',['../a00702.html#gab8531bc3f269aa45835cd6e1972b7fc7',1,'glm']]], + ['mediump_5fmat4x2',['mediump_mat4x2',['../a00702.html#gad75706b70545412ba9ac27d5ee210f66',1,'glm']]], + ['mediump_5fmat4x3',['mediump_mat4x3',['../a00702.html#ga4a1440b5ea3cf84d5b06c79b534bd770',1,'glm']]], + ['mediump_5fmat4x4',['mediump_mat4x4',['../a00702.html#ga15bca2b70917d9752231160d9da74b01',1,'glm']]], + ['mediump_5fquat',['mediump_quat',['../a00674.html#gad2a59409de1bb12ccb6eb692ee7e9d8d',1,'glm']]], + ['mediump_5fu16',['mediump_u16',['../a00721.html#ga9df98857be695d5a30cb30f5bfa38a80',1,'glm']]], + ['mediump_5fu16vec1',['mediump_u16vec1',['../a00721.html#ga400ce8cc566de093a9b28e59e220d6e4',1,'glm']]], + ['mediump_5fu16vec2',['mediump_u16vec2',['../a00721.html#ga429c201b3e92c90b4ef4356f2be52ee1',1,'glm']]], + ['mediump_5fu16vec3',['mediump_u16vec3',['../a00721.html#gac9ba20234b0c3751d45ce575fc71e551',1,'glm']]], + ['mediump_5fu16vec4',['mediump_u16vec4',['../a00721.html#ga5793393686ce5bd2d5968ff9144762b8',1,'glm']]], + ['mediump_5fu32',['mediump_u32',['../a00721.html#ga1bd0e914158bf03135f8a317de6debe9',1,'glm']]], + ['mediump_5fu32vec1',['mediump_u32vec1',['../a00721.html#ga8a11ccd2e38f674bbf3c2d1afc232aee',1,'glm']]], + ['mediump_5fu32vec2',['mediump_u32vec2',['../a00721.html#ga94f74851fce338549c705b5f0d601c4f',1,'glm']]], + ['mediump_5fu32vec3',['mediump_u32vec3',['../a00721.html#ga012c24c8fc69707b90260474c70275a2',1,'glm']]], + ['mediump_5fu32vec4',['mediump_u32vec4',['../a00721.html#ga5d43ee8b5dbaa06c327b03b83682598a',1,'glm']]], + ['mediump_5fu64',['mediump_u64',['../a00721.html#ga2af9490085ae3bdf36a544e9dd073610',1,'glm']]], + ['mediump_5fu64vec1',['mediump_u64vec1',['../a00721.html#ga659f372ccb8307d5db5beca942cde5e8',1,'glm']]], + ['mediump_5fu64vec2',['mediump_u64vec2',['../a00721.html#ga73a08ef5a74798f3a1a99250b5f86a7d',1,'glm']]], + ['mediump_5fu64vec3',['mediump_u64vec3',['../a00721.html#ga1900c6ab74acd392809425953359ef52',1,'glm']]], + ['mediump_5fu64vec4',['mediump_u64vec4',['../a00721.html#gaec7ee455cb379ec2993e81482123e1cc',1,'glm']]], + ['mediump_5fu8',['mediump_u8',['../a00721.html#gad1213a22bbb9e4107f07eaa4956f8281',1,'glm']]], + ['mediump_5fu8vec1',['mediump_u8vec1',['../a00721.html#ga4a43050843b141bdc7e85437faef6f55',1,'glm']]], + ['mediump_5fu8vec2',['mediump_u8vec2',['../a00721.html#ga907f85d4a0eac3d8aaf571e5c2647194',1,'glm']]], + ['mediump_5fu8vec3',['mediump_u8vec3',['../a00721.html#gaddc6f7748b699254942c5216b68f8f7f',1,'glm']]], + ['mediump_5fu8vec4',['mediump_u8vec4',['../a00721.html#gaaf4ee3b76d43d98da02ec399b99bda4b',1,'glm']]], + ['mediump_5fuint16',['mediump_uint16',['../a00721.html#ga2885a6c89916911e418c06bb76b9bdbb',1,'glm']]], + ['mediump_5fuint16_5ft',['mediump_uint16_t',['../a00721.html#ga3963b1050fc65a383ee28e3f827b6e3e',1,'glm']]], + ['mediump_5fuint32',['mediump_uint32',['../a00721.html#ga34dd5ec1988c443bae80f1b20a8ade5f',1,'glm']]], + ['mediump_5fuint32_5ft',['mediump_uint32_t',['../a00721.html#gaf4dae276fd29623950de14a6ca2586b5',1,'glm']]], + ['mediump_5fuint64',['mediump_uint64',['../a00721.html#ga30652709815ad9404272a31957daa59e',1,'glm']]], + ['mediump_5fuint64_5ft',['mediump_uint64_t',['../a00721.html#ga9b170dd4a8f38448a2dc93987c7875e9',1,'glm']]], + ['mediump_5fuint8',['mediump_uint8',['../a00721.html#ga1fa92a233b9110861cdbc8c2ccf0b5a3',1,'glm']]], + ['mediump_5fuint8_5ft',['mediump_uint8_t',['../a00721.html#gadfe65c78231039e90507770db50c98c7',1,'glm']]], + ['mediump_5fumat2',['mediump_umat2',['../a00712.html#ga43041378b3410ea951b7de0dfd2bc7ee',1,'glm']]], + ['mediump_5fumat2x2',['mediump_umat2x2',['../a00712.html#ga3b209b1b751f041422137e3c065dfa98',1,'glm']]], + ['mediump_5fumat2x3',['mediump_umat2x3',['../a00712.html#gaee2c1f13b41f4c92ea5b3efe367a1306',1,'glm']]], + ['mediump_5fumat2x4',['mediump_umat2x4',['../a00712.html#gae1317ddca16d01e119a40b7f0ee85f95',1,'glm']]], + ['mediump_5fumat3',['mediump_umat3',['../a00712.html#ga1730dbe3c67801f53520b06d1aa0a34a',1,'glm']]], + ['mediump_5fumat3x2',['mediump_umat3x2',['../a00712.html#gaadc28bfdc8ebca81ae85121b11994970',1,'glm']]], + ['mediump_5fumat3x3',['mediump_umat3x3',['../a00712.html#ga48f2fc38d3f7fab3cfbc961278ced53d',1,'glm']]], + ['mediump_5fumat3x4',['mediump_umat3x4',['../a00712.html#ga78009a1e4ca64217e46b418535e52546',1,'glm']]], + ['mediump_5fumat4',['mediump_umat4',['../a00712.html#ga5087c2beb26a11d9af87432e554cf9d1',1,'glm']]], + ['mediump_5fumat4x2',['mediump_umat4x2',['../a00712.html#gaf35aefd81cc13718f6b059623f7425fa',1,'glm']]], + ['mediump_5fumat4x3',['mediump_umat4x3',['../a00712.html#ga4e1bed14fbc7f4b376aaed064f89f0fb',1,'glm']]], + ['mediump_5fumat4x4',['mediump_umat4x4',['../a00712.html#gaa9428fc8430dc552aad920653f822ef3',1,'glm']]], + ['mediump_5fuvec1',['mediump_uvec1',['../a00696.html#ga38fde73aaf1420175ece8d4882558a3f',1,'glm']]], + ['mediump_5fuvec2',['mediump_uvec2',['../a00700.html#gaa3b4f7806dad03d83bb3da0baa1e3b9b',1,'glm']]], + ['mediump_5fuvec3',['mediump_uvec3',['../a00700.html#ga83b7df38feefbb357f3673d950fafef7',1,'glm']]], + ['mediump_5fuvec4',['mediump_uvec4',['../a00700.html#ga64ed0deb6573375b7016daf82ffd53a7',1,'glm']]], + ['mediump_5fvec1',['mediump_vec1',['../a00691.html#ga645f53e6b8056609023a894b4e2beef4',1,'glm']]], + ['mediump_5fvec2',['mediump_vec2',['../a00700.html#gabc61976261c406520c7a8e4d946dc3f0',1,'glm']]], + ['mediump_5fvec3',['mediump_vec3',['../a00700.html#ga2384e263df19f1404b733016eff78fca',1,'glm']]], + ['mediump_5fvec4',['mediump_vec4',['../a00700.html#ga5c6978d3ffba06738416a33083853fc0',1,'glm']]], + ['min',['min',['../a00662.html#ga6cf8098827054a270ee36b18e30d471d',1,'glm::min(genType x, genType y)'],['../a00662.html#gaa7d015eba1f9f48519251f4abe69b14d',1,'glm::min(vec< L, T, Q > const &x, T y)'],['../a00662.html#ga31f49ef9e7d1beb003160c5e009b0c48',1,'glm::min(vec< L, T, Q > const &x, vec< L, T, Q > const &y)'],['../a00679.html#ga420b37cbd98c395b93dab0278305cd46',1,'glm::min(T a, T b, T c)'],['../a00679.html#ga0d24a9acb8178df77e4aff90cbb2010d',1,'glm::min(T a, T b, T c, T d)'],['../a00687.html#ga3cd83d80fd4f433d8e333593ec56dddf',1,'glm::min(vec< L, T, Q > const &a, vec< L, T, Q > const &b, vec< L, T, Q > const &c)'],['../a00687.html#gab66920ed064ab518d6859c5a889c4be4',1,'glm::min(vec< L, T, Q > const &a, vec< L, T, Q > const &b, vec< L, T, Q > const &c, vec< L, T, Q > const &d)'],['../a00738.html#ga713d3f9b3e76312c0d314e0c8611a6a6',1,'glm::min(T const &x, T const &y, T const &z)'],['../a00738.html#ga74d1a96e7cdbac40f6d35142d3bcbbd4',1,'glm::min(C< T > const &x, typename C< T >::T const &y, typename C< T >::T const &z)'],['../a00738.html#ga42b5c3fc027fd3d9a50d2ccc9126d9f0',1,'glm::min(C< T > const &x, C< T > const &y, C< T > const &z)'],['../a00738.html#ga95466987024d03039607f09e69813d69',1,'glm::min(T const &x, T const &y, T const &z, T const &w)'],['../a00738.html#ga4fe35dd31dd0c45693c9b60b830b8d47',1,'glm::min(C< T > const &x, typename C< T >::T const &y, typename C< T >::T const &z, typename C< T >::T const &w)'],['../a00738.html#ga7471ea4159eed8dd9ea4ac5d46c2fead',1,'glm::min(C< T > const &x, C< T > const &y, C< T > const &z, C< T > const &w)']]], + ['mirrorclamp',['mirrorClamp',['../a00786.html#gaa6856a0a048d2749252848da35e10c8b',1,'glm']]], + ['mirrorrepeat',['mirrorRepeat',['../a00786.html#ga16a89b0661b60d5bea85137bbae74d73',1,'glm']]], + ['mix',['mix',['../a00662.html#ga8e93f374aae27d1a88b921860351f8d4',1,'glm::mix(genTypeT x, genTypeT y, genTypeU a)'],['../a00669.html#gafbfe587b8da11fb89a30c3d67dd5ccc2',1,'glm::mix(qua< T, Q > const &x, qua< T, Q > const &y, T a)']]], + ['mixed_5fproduct_2ehpp',['mixed_product.hpp',['../a00539.html',1,'']]], + ['mixedproduct',['mixedProduct',['../a00759.html#gab3c6048fbb67f7243b088a4fee48d020',1,'glm']]], + ['mod',['mod',['../a00662.html#ga9b197a452cd52db3c5c18bac72bd7798',1,'glm::mod(vec< L, T, Q > const &x, vec< L, T, Q > const &y)'],['../a00747.html#gaabfbb41531ab7ad8d06fc176edfba785',1,'glm::mod(int x, int y)'],['../a00747.html#ga63fc8d63e7da1706439233b386ba8b6f',1,'glm::mod(uint x, uint y)']]], + ['modf',['modf',['../a00662.html#ga85e33f139b8db1b39b590a5713b9e679',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/all_b.html b/common/glm/doc/api/search/all_b.html new file mode 100644 index 000000000..f2a3c8d0e --- /dev/null +++ b/common/glm/doc/api/search/all_b.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/all_b.js b/common/glm/doc/api/search/all_b.js new file mode 100644 index 000000000..c1e92e7a4 --- /dev/null +++ b/common/glm/doc/api/search/all_b.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['next_5ffloat',['next_float',['../a00723.html#gae516ae554faa6117660828240e8bdaf0',1,'glm::next_float(genType const &x)'],['../a00723.html#gad107ec3d9697ef82032a33338a73ebdd',1,'glm::next_float(genType const &x, uint const &Distance)']]], + ['nlz',['nlz',['../a00747.html#ga78dff8bdb361bf0061194c93e003d189',1,'glm']]], + ['noise_2ehpp',['noise.hpp',['../a00413.html',1,'']]], + ['norm_2ehpp',['norm.hpp',['../a00542.html',1,'']]], + ['normal_2ehpp',['normal.hpp',['../a00545.html',1,'']]], + ['normalize',['normalize',['../a00675.html#gabf30e3263fffe8dcc6659aea76ae8927',1,'glm::normalize(qua< T, Q > const &q)'],['../a00697.html#ga3b8d3dcae77870781392ed2902cce597',1,'glm::normalize(vec< L, T, Q > const &x)'],['../a00734.html#ga299b8641509606b1958ffa104a162cfe',1,'glm::normalize(tdualquat< T, Q > const &q)']]], + ['normalize_5fdot_2ehpp',['normalize_dot.hpp',['../a00548.html',1,'']]], + ['normalizedot',['normalizeDot',['../a00762.html#gacb140a2b903115d318c8b0a2fb5a5daa',1,'glm']]], + ['not_5f',['not_',['../a00791.html#ga610fcd175791fd246e328ffee10dbf1e',1,'glm']]], + ['notequal',['notEqual',['../a00667.html#ga8504f18a7e2bf315393032c2137dad83',1,'glm::notEqual(mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y)'],['../a00667.html#ga29071147d118569344d10944b7d5c378',1,'glm::notEqual(mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y, T epsilon)'],['../a00667.html#gad7959e14fbc35b4ed2617daf4d67f6cd',1,'glm::notEqual(mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y, vec< C, T, Q > const &epsilon)'],['../a00676.html#gab441cee0de5867a868f3a586ee68cfe1',1,'glm::notEqual(qua< T, Q > const &x, qua< T, Q > const &y)'],['../a00676.html#ga5117a44c1bf21af857cd23e44a96d313',1,'glm::notEqual(qua< T, Q > const &x, qua< T, Q > const &y, T epsilon)'],['../a01376.html#a835ecf946c74f3d68be93e70b10821e7',1,'glm::notEqual(genType const &x, genType const &y, genType const &epsilon)'],['../a00694.html#ga4a99cc41341567567a608719449c1fac',1,'glm::notEqual(vec< L, T, Q > const &x, vec< L, T, Q > const &y, T epsilon)'],['../a00694.html#ga417cf51304359db18e819dda9bce5767',1,'glm::notEqual(vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)'],['../a00791.html#ga17c19dc1b76cd5aef63e9e7ff3aa3c27',1,'glm::notEqual(vec< L, T, Q > const &x, vec< L, T, Q > const &y)']]], + ['number_5fprecision_2ehpp',['number_precision.hpp',['../a00551.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/all_c.html b/common/glm/doc/api/search/all_c.html new file mode 100644 index 000000000..637681075 --- /dev/null +++ b/common/glm/doc/api/search/all_c.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/all_c.js b/common/glm/doc/api/search/all_c.js new file mode 100644 index 000000000..d92e334bb --- /dev/null +++ b/common/glm/doc/api/search/all_c.js @@ -0,0 +1,27 @@ +var searchData= +[ + ['opengl_20mathematics_20_28glm_29',['OpenGL Mathematics (GLM)',['../index.html',1,'']]], + ['one',['one',['../a00708.html#ga39c2fb227631ca25894326529bdd1ee5',1,'glm']]], + ['one_5fover_5fpi',['one_over_pi',['../a00708.html#ga555150da2b06d23c8738981d5013e0eb',1,'glm']]], + ['one_5fover_5froot_5ftwo',['one_over_root_two',['../a00708.html#ga788fa23a0939bac4d1d0205fb4f35818',1,'glm']]], + ['one_5fover_5ftwo_5fpi',['one_over_two_pi',['../a00708.html#ga7c922b427986cbb2e4c6ac69874eefbc',1,'glm']]], + ['openbounded',['openBounded',['../a00731.html#gafd303042ba2ba695bf53b2315f53f93f',1,'glm']]], + ['optimum_5fpow_2ehpp',['optimum_pow.hpp',['../a00554.html',1,'']]], + ['orientate2',['orientate2',['../a00736.html#gae16738a9f1887cf4e4db6a124637608d',1,'glm']]], + ['orientate3',['orientate3',['../a00736.html#ga7ca98668a5786f19c7b38299ebbc9b4c',1,'glm::orientate3(T const &angle)'],['../a00736.html#ga7238c8e15c7720e3ca6a45ab151eeabb',1,'glm::orientate3(vec< 3, T, Q > const &angles)']]], + ['orientate4',['orientate4',['../a00736.html#ga4a044653f71a4ecec68e0b623382b48a',1,'glm']]], + ['orientation',['orientation',['../a00773.html#ga1a32fceb71962e6160e8af295c91930a',1,'glm']]], + ['orientedangle',['orientedAngle',['../a00784.html#ga9556a803dce87fe0f42fdabe4ebba1d5',1,'glm::orientedAngle(vec< 2, T, Q > const &x, vec< 2, T, Q > const &y)'],['../a00784.html#ga706fce3d111f485839756a64f5a48553',1,'glm::orientedAngle(vec< 3, T, Q > const &x, vec< 3, T, Q > const &y, vec< 3, T, Q > const &ref)']]], + ['ortho',['ortho',['../a00665.html#gae5b6b40ed882cd56cd7cb97701909c06',1,'glm::ortho(T left, T right, T bottom, T top)'],['../a00665.html#ga6615d8a9d39432e279c4575313ecb456',1,'glm::ortho(T left, T right, T bottom, T top, T zNear, T zFar)']]], + ['ortholh',['orthoLH',['../a00665.html#gad122a79aadaa5529cec4ac197203db7f',1,'glm']]], + ['ortholh_5fno',['orthoLH_NO',['../a00665.html#ga526416735ea7c5c5cd255bf99d051bd8',1,'glm']]], + ['ortholh_5fzo',['orthoLH_ZO',['../a00665.html#gab37ac3eec8d61f22fceda7775e836afa',1,'glm']]], + ['orthono',['orthoNO',['../a00665.html#gab219d28a8f178d4517448fcd6395a073',1,'glm']]], + ['orthonormalize',['orthonormalize',['../a00765.html#ga4cab5d698e6e2eccea30c8e81c74371f',1,'glm::orthonormalize(mat< 3, 3, T, Q > const &m)'],['../a00765.html#gac3bc7ef498815026bc3d361ae0b7138e',1,'glm::orthonormalize(vec< 3, T, Q > const &x, vec< 3, T, Q > const &y)']]], + ['orthonormalize_2ehpp',['orthonormalize.hpp',['../a00557.html',1,'']]], + ['orthorh',['orthoRH',['../a00665.html#ga16264c9b838edeb9dd1de7a1010a13a4',1,'glm']]], + ['orthorh_5fno',['orthoRH_NO',['../a00665.html#gaa2f7a1373170bf0a4a2ddef9b0706780',1,'glm']]], + ['orthorh_5fzo',['orthoRH_ZO',['../a00665.html#ga9aea2e515b08fd7dce47b7b6ec34d588',1,'glm']]], + ['orthozo',['orthoZO',['../a00665.html#gaea11a70817af2c0801c869dea0b7a5bc',1,'glm']]], + ['outerproduct',['outerProduct',['../a00788.html#gac29fb7bae75a8e4c1b74cbbf85520e50',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/all_d.html b/common/glm/doc/api/search/all_d.html new file mode 100644 index 000000000..cc52c79fb --- /dev/null +++ b/common/glm/doc/api/search/all_d.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/all_d.js b/common/glm/doc/api/search/all_d.js new file mode 100644 index 000000000..969597af2 --- /dev/null +++ b/common/glm/doc/api/search/all_d.js @@ -0,0 +1,262 @@ +var searchData= +[ + ['packdouble2x32',['packDouble2x32',['../a00789.html#gaa916ca426b2bb0343ba17e3753e245c2',1,'glm']]], + ['packed_5fbvec1',['packed_bvec1',['../a00720.html#ga88632cea9008ac0ac1388e94e804a53c',1,'glm']]], + ['packed_5fbvec2',['packed_bvec2',['../a00720.html#gab85245913eaa40ab82adabcae37086cb',1,'glm']]], + ['packed_5fbvec3',['packed_bvec3',['../a00720.html#ga0c48f9417f649e27f3fb0c9f733a18bd',1,'glm']]], + ['packed_5fbvec4',['packed_bvec4',['../a00720.html#ga3180d7db84a74c402157df3bbc0ae3ed',1,'glm']]], + ['packed_5fdmat2',['packed_dmat2',['../a00720.html#gad87408a8350918711f845f071bbe43fb',1,'glm']]], + ['packed_5fdmat2x2',['packed_dmat2x2',['../a00720.html#gaaa33d8e06657a777efb0c72c44ce87a9',1,'glm']]], + ['packed_5fdmat2x3',['packed_dmat2x3',['../a00720.html#gac3a5315f588ba04ad255188071ec4e22',1,'glm']]], + ['packed_5fdmat2x4',['packed_dmat2x4',['../a00720.html#gae398fc3156f51d3684b08f62c1a5a6d4',1,'glm']]], + ['packed_5fdmat3',['packed_dmat3',['../a00720.html#ga03dfc90d539cc87ea3a15a9caa5d2245',1,'glm']]], + ['packed_5fdmat3x2',['packed_dmat3x2',['../a00720.html#gae36de20a4c0e0b1444b7903ae811d94e',1,'glm']]], + ['packed_5fdmat3x3',['packed_dmat3x3',['../a00720.html#gab9b909f1392d86854334350efcae85f5',1,'glm']]], + ['packed_5fdmat3x4',['packed_dmat3x4',['../a00720.html#ga199131fd279c92c2ac12df6d978f1dd6',1,'glm']]], + ['packed_5fdmat4',['packed_dmat4',['../a00720.html#gada980a3485640aa8151f368f17ad3086',1,'glm']]], + ['packed_5fdmat4x2',['packed_dmat4x2',['../a00720.html#ga6dc65249730698d3cc9ac5d7e1bc4d72',1,'glm']]], + ['packed_5fdmat4x3',['packed_dmat4x3',['../a00720.html#gadf202aaa9ed71c09f9bbe347e43f8764',1,'glm']]], + ['packed_5fdmat4x4',['packed_dmat4x4',['../a00720.html#gae20617435a6d042d7c38da2badd64a09',1,'glm']]], + ['packed_5fdvec1',['packed_dvec1',['../a00720.html#ga532f0c940649b1ee303acd572fc35531',1,'glm']]], + ['packed_5fdvec2',['packed_dvec2',['../a00720.html#ga5c194b11fbda636f2ab20c3bd0079196',1,'glm']]], + ['packed_5fdvec3',['packed_dvec3',['../a00720.html#ga0581ea552d86b2b5de7a2804bed80e72',1,'glm']]], + ['packed_5fdvec4',['packed_dvec4',['../a00720.html#gae8a9b181f9dc813ad6e125a52b14b935',1,'glm']]], + ['packed_5fhighp_5fbvec1',['packed_highp_bvec1',['../a00720.html#ga439e97795314b81cd15abd4e5c2e6e7a',1,'glm']]], + ['packed_5fhighp_5fbvec2',['packed_highp_bvec2',['../a00720.html#gad791d671f4fcf1ed1ea41f752916b70a',1,'glm']]], + ['packed_5fhighp_5fbvec3',['packed_highp_bvec3',['../a00720.html#ga6a5a3250b57dfadc66735bc72911437f',1,'glm']]], + ['packed_5fhighp_5fbvec4',['packed_highp_bvec4',['../a00720.html#ga09f517d88b996ef1b2f42fd54222b82d',1,'glm']]], + ['packed_5fhighp_5fdmat2',['packed_highp_dmat2',['../a00720.html#gae29686632fd05efac0675d9a6370d77b',1,'glm']]], + ['packed_5fhighp_5fdmat2x2',['packed_highp_dmat2x2',['../a00720.html#ga22bd6382b16052e301edbfc031b9f37a',1,'glm']]], + ['packed_5fhighp_5fdmat2x3',['packed_highp_dmat2x3',['../a00720.html#ga999d82719696d4c59f4d236dd08f273d',1,'glm']]], + ['packed_5fhighp_5fdmat2x4',['packed_highp_dmat2x4',['../a00720.html#ga6998ac2a8d7fe456b651a6336ed26bb0',1,'glm']]], + ['packed_5fhighp_5fdmat3',['packed_highp_dmat3',['../a00720.html#gadac7c040c4810dd52b36fcd09d097400',1,'glm']]], + ['packed_5fhighp_5fdmat3x2',['packed_highp_dmat3x2',['../a00720.html#gab462744977beb85fb5c782bc2eea7b15',1,'glm']]], + ['packed_5fhighp_5fdmat3x3',['packed_highp_dmat3x3',['../a00720.html#ga49e5a709d098523823b2f824e48672a6',1,'glm']]], + ['packed_5fhighp_5fdmat3x4',['packed_highp_dmat3x4',['../a00720.html#ga2c67b3b0adab71c8680c3d819f1fa9b7',1,'glm']]], + ['packed_5fhighp_5fdmat4',['packed_highp_dmat4',['../a00720.html#ga6718822cd7af005a9b5bd6ee282f6ba6',1,'glm']]], + ['packed_5fhighp_5fdmat4x2',['packed_highp_dmat4x2',['../a00720.html#ga12e39e797fb724a5b51fcbea2513a7da',1,'glm']]], + ['packed_5fhighp_5fdmat4x3',['packed_highp_dmat4x3',['../a00720.html#ga79c2e9f82e67963c1ecad0ad6d0ec72e',1,'glm']]], + ['packed_5fhighp_5fdmat4x4',['packed_highp_dmat4x4',['../a00720.html#ga2df58e03e5afded28707b4f7d077afb4',1,'glm']]], + ['packed_5fhighp_5fdvec1',['packed_highp_dvec1',['../a00720.html#gab472b2d917b5e6efd76e8c7dbfbbf9f1',1,'glm']]], + ['packed_5fhighp_5fdvec2',['packed_highp_dvec2',['../a00720.html#ga5b2dc48fa19b684d207d69c6b145eb63',1,'glm']]], + ['packed_5fhighp_5fdvec3',['packed_highp_dvec3',['../a00720.html#gaaac6b356ef00154da41aaae7d1549193',1,'glm']]], + ['packed_5fhighp_5fdvec4',['packed_highp_dvec4',['../a00720.html#ga81b5368fe485e2630aa9b44832d592e7',1,'glm']]], + ['packed_5fhighp_5fivec1',['packed_highp_ivec1',['../a00720.html#ga7245acc887a5438f46fd85fdf076bb3b',1,'glm']]], + ['packed_5fhighp_5fivec2',['packed_highp_ivec2',['../a00720.html#ga54f368ec6b514a5aa4f28d40e6f93ef7',1,'glm']]], + ['packed_5fhighp_5fivec3',['packed_highp_ivec3',['../a00720.html#ga865a9c7bb22434b1b8c5ac31e164b628',1,'glm']]], + ['packed_5fhighp_5fivec4',['packed_highp_ivec4',['../a00720.html#gad6f1b4e3a51c2c051814b60d5d1b8895',1,'glm']]], + ['packed_5fhighp_5fmat2',['packed_highp_mat2',['../a00720.html#ga2f2d913d8cca2f935b2522964408c0b2',1,'glm']]], + ['packed_5fhighp_5fmat2x2',['packed_highp_mat2x2',['../a00720.html#ga245c12d2daf67feecaa2d3277c8f6661',1,'glm']]], + ['packed_5fhighp_5fmat2x3',['packed_highp_mat2x3',['../a00720.html#ga069cc8892aadae144c00f35297617d44',1,'glm']]], + ['packed_5fhighp_5fmat2x4',['packed_highp_mat2x4',['../a00720.html#ga6904d09b62141d09712b76983892f95b',1,'glm']]], + ['packed_5fhighp_5fmat3',['packed_highp_mat3',['../a00720.html#gabdd5fbffe8b8b8a7b33523f25b120dbe',1,'glm']]], + ['packed_5fhighp_5fmat3x2',['packed_highp_mat3x2',['../a00720.html#ga2624719cb251d8de8cad1beaefc3a3f9',1,'glm']]], + ['packed_5fhighp_5fmat3x3',['packed_highp_mat3x3',['../a00720.html#gaf2e07527d678440bf0c20adbeb9177c5',1,'glm']]], + ['packed_5fhighp_5fmat3x4',['packed_highp_mat3x4',['../a00720.html#ga72102fa6ac2445aa3bb203128ad52449',1,'glm']]], + ['packed_5fhighp_5fmat4',['packed_highp_mat4',['../a00720.html#ga253e8379b08d2dc6fe2800b2fb913203',1,'glm']]], + ['packed_5fhighp_5fmat4x2',['packed_highp_mat4x2',['../a00720.html#gae389c2071cf3cdb33e7812c6fd156710',1,'glm']]], + ['packed_5fhighp_5fmat4x3',['packed_highp_mat4x3',['../a00720.html#ga4584f64394bd7123b7a8534741e4916c',1,'glm']]], + ['packed_5fhighp_5fmat4x4',['packed_highp_mat4x4',['../a00720.html#ga0149fe15668925147e07c94fd2c2d6ae',1,'glm']]], + ['packed_5fhighp_5fuvec1',['packed_highp_uvec1',['../a00720.html#ga8c32b53f628a3616aa5061e58d66fe74',1,'glm']]], + ['packed_5fhighp_5fuvec2',['packed_highp_uvec2',['../a00720.html#gab704d4fb15f6f96d70e363d5db7060cd',1,'glm']]], + ['packed_5fhighp_5fuvec3',['packed_highp_uvec3',['../a00720.html#ga0b570da473fec4619db5aa0dce5133b0',1,'glm']]], + ['packed_5fhighp_5fuvec4',['packed_highp_uvec4',['../a00720.html#gaa582f38c82aef61dea7aaedf15bb06a6',1,'glm']]], + ['packed_5fhighp_5fvec1',['packed_highp_vec1',['../a00720.html#ga56473759d2702ee19ab7f91d0017fa70',1,'glm']]], + ['packed_5fhighp_5fvec2',['packed_highp_vec2',['../a00720.html#ga6b8b9475e7c3b16aed13edbc460bbc4d',1,'glm']]], + ['packed_5fhighp_5fvec3',['packed_highp_vec3',['../a00720.html#ga3815661df0e2de79beff8168c09adf1e',1,'glm']]], + ['packed_5fhighp_5fvec4',['packed_highp_vec4',['../a00720.html#ga4015f36bf5a5adb6ac5d45beed959867',1,'glm']]], + ['packed_5fivec1',['packed_ivec1',['../a00720.html#ga11581a06fc7bf941fa4d4b6aca29812c',1,'glm']]], + ['packed_5fivec2',['packed_ivec2',['../a00720.html#ga1fe4c5f56b8087d773aa90dc88a257a7',1,'glm']]], + ['packed_5fivec3',['packed_ivec3',['../a00720.html#gae157682a7847161787951ba1db4cf325',1,'glm']]], + ['packed_5fivec4',['packed_ivec4',['../a00720.html#gac228b70372abd561340d5f926a7c1778',1,'glm']]], + ['packed_5flowp_5fbvec1',['packed_lowp_bvec1',['../a00720.html#gae3c8750f53259ece334d3aa3b3649a40',1,'glm']]], + ['packed_5flowp_5fbvec2',['packed_lowp_bvec2',['../a00720.html#gac969befedbda69eb78d4e23f751fdbee',1,'glm']]], + ['packed_5flowp_5fbvec3',['packed_lowp_bvec3',['../a00720.html#ga7c20adbe1409e3fe4544677a7f6fe954',1,'glm']]], + ['packed_5flowp_5fbvec4',['packed_lowp_bvec4',['../a00720.html#gae473587cff3092edc0877fc691c26a0b',1,'glm']]], + ['packed_5flowp_5fdmat2',['packed_lowp_dmat2',['../a00720.html#gac93f9b1a35b9de4f456b9f2dfeaf1097',1,'glm']]], + ['packed_5flowp_5fdmat2x2',['packed_lowp_dmat2x2',['../a00720.html#gaeeaff6c132ec91ebd21da3a2399548ea',1,'glm']]], + ['packed_5flowp_5fdmat2x3',['packed_lowp_dmat2x3',['../a00720.html#ga2ccdcd4846775cbe4f9d12e71d55b5d2',1,'glm']]], + ['packed_5flowp_5fdmat2x4',['packed_lowp_dmat2x4',['../a00720.html#gac870c47d2d9d48503f6c9ee3baec8ce1',1,'glm']]], + ['packed_5flowp_5fdmat3',['packed_lowp_dmat3',['../a00720.html#ga3894a059eeaacec8791c25de398d9955',1,'glm']]], + ['packed_5flowp_5fdmat3x2',['packed_lowp_dmat3x2',['../a00720.html#ga23ec236950f5859f59197663266b535d',1,'glm']]], + ['packed_5flowp_5fdmat3x3',['packed_lowp_dmat3x3',['../a00720.html#ga4a7c7d8c3a663d0ec2a858cbfa14e54c',1,'glm']]], + ['packed_5flowp_5fdmat3x4',['packed_lowp_dmat3x4',['../a00720.html#ga8fc0e66da83599071b7ec17510686cd9',1,'glm']]], + ['packed_5flowp_5fdmat4',['packed_lowp_dmat4',['../a00720.html#ga03e1edf5666c40affe39aee35c87956f',1,'glm']]], + ['packed_5flowp_5fdmat4x2',['packed_lowp_dmat4x2',['../a00720.html#ga39658fb13369db869d363684bd8399c0',1,'glm']]], + ['packed_5flowp_5fdmat4x3',['packed_lowp_dmat4x3',['../a00720.html#ga30b0351eebc18c6056101359bdd3a359',1,'glm']]], + ['packed_5flowp_5fdmat4x4',['packed_lowp_dmat4x4',['../a00720.html#ga0294d4c45151425c86a11deee7693c0e',1,'glm']]], + ['packed_5flowp_5fdvec1',['packed_lowp_dvec1',['../a00720.html#ga054050e9d4e78d81db0e6d1573b1c624',1,'glm']]], + ['packed_5flowp_5fdvec2',['packed_lowp_dvec2',['../a00720.html#gadc19938ddb204bfcb4d9ef35b1e2bf93',1,'glm']]], + ['packed_5flowp_5fdvec3',['packed_lowp_dvec3',['../a00720.html#ga9189210cabd6651a5e14a4c46fb20598',1,'glm']]], + ['packed_5flowp_5fdvec4',['packed_lowp_dvec4',['../a00720.html#ga262dafd0c001c3a38d1cc91d024ca738',1,'glm']]], + ['packed_5flowp_5fivec1',['packed_lowp_ivec1',['../a00720.html#gaf22b77f1cf3e73b8b1dddfe7f959357c',1,'glm']]], + ['packed_5flowp_5fivec2',['packed_lowp_ivec2',['../a00720.html#ga52635859f5ef660ab999d22c11b7867f',1,'glm']]], + ['packed_5flowp_5fivec3',['packed_lowp_ivec3',['../a00720.html#ga98c9d122a959e9f3ce10a5623c310f5d',1,'glm']]], + ['packed_5flowp_5fivec4',['packed_lowp_ivec4',['../a00720.html#ga931731b8ae3b54c7ecc221509dae96bc',1,'glm']]], + ['packed_5flowp_5fmat2',['packed_lowp_mat2',['../a00720.html#ga70dcb9ef0b24e832772a7405efa9669a',1,'glm']]], + ['packed_5flowp_5fmat2x2',['packed_lowp_mat2x2',['../a00720.html#gac70667c7642ec8d50245e6e6936a3927',1,'glm']]], + ['packed_5flowp_5fmat2x3',['packed_lowp_mat2x3',['../a00720.html#ga3e7df5a11e1be27bc29a4c0d3956f234',1,'glm']]], + ['packed_5flowp_5fmat2x4',['packed_lowp_mat2x4',['../a00720.html#gaea9c555e669dc56c45d95dcc75d59bf3',1,'glm']]], + ['packed_5flowp_5fmat3',['packed_lowp_mat3',['../a00720.html#ga0d22400969dd223465b2900fecfb4f53',1,'glm']]], + ['packed_5flowp_5fmat3x2',['packed_lowp_mat3x2',['../a00720.html#ga128cd52649621861635fab746df91735',1,'glm']]], + ['packed_5flowp_5fmat3x3',['packed_lowp_mat3x3',['../a00720.html#ga5adf1802c5375a9dfb1729691bedd94e',1,'glm']]], + ['packed_5flowp_5fmat3x4',['packed_lowp_mat3x4',['../a00720.html#ga92247ca09fa03c4013ba364f3a0fca7f',1,'glm']]], + ['packed_5flowp_5fmat4',['packed_lowp_mat4',['../a00720.html#ga2a1dd2387725a335413d4c4fee8609c4',1,'glm']]], + ['packed_5flowp_5fmat4x2',['packed_lowp_mat4x2',['../a00720.html#ga8f22607dcd090cd280071ccc689f4079',1,'glm']]], + ['packed_5flowp_5fmat4x3',['packed_lowp_mat4x3',['../a00720.html#ga7661d759d6ad218e132e3d051e7b2c6c',1,'glm']]], + ['packed_5flowp_5fmat4x4',['packed_lowp_mat4x4',['../a00720.html#ga776f18d1a6e7d399f05d386167dc60f5',1,'glm']]], + ['packed_5flowp_5fuvec1',['packed_lowp_uvec1',['../a00720.html#gaf111fed760ecce16cb1988807569bee5',1,'glm']]], + ['packed_5flowp_5fuvec2',['packed_lowp_uvec2',['../a00720.html#ga958210fe245a75b058325d367c951132',1,'glm']]], + ['packed_5flowp_5fuvec3',['packed_lowp_uvec3',['../a00720.html#ga576a3f8372197a56a79dee1c8280f485',1,'glm']]], + ['packed_5flowp_5fuvec4',['packed_lowp_uvec4',['../a00720.html#gafdd97922b4a2a42cd0c99a13877ff4da',1,'glm']]], + ['packed_5flowp_5fvec1',['packed_lowp_vec1',['../a00720.html#ga0a6198fe64166a6a61084d43c71518a9',1,'glm']]], + ['packed_5flowp_5fvec2',['packed_lowp_vec2',['../a00720.html#gafbf1c2cce307c5594b165819ed83bf5d',1,'glm']]], + ['packed_5flowp_5fvec3',['packed_lowp_vec3',['../a00720.html#ga3a30c137c1f8cce478c28eab0427a570',1,'glm']]], + ['packed_5flowp_5fvec4',['packed_lowp_vec4',['../a00720.html#ga3cc94fb8de80bbd8a4aa7a5b206d304a',1,'glm']]], + ['packed_5fmat2',['packed_mat2',['../a00720.html#gadd019b43fcf42e1590d45dddaa504a1a',1,'glm']]], + ['packed_5fmat2x2',['packed_mat2x2',['../a00720.html#ga51eaadcdc292c8750f746a5dc3e6c517',1,'glm']]], + ['packed_5fmat2x3',['packed_mat2x3',['../a00720.html#ga301b76a89b8a9625501ca58815017f20',1,'glm']]], + ['packed_5fmat2x4',['packed_mat2x4',['../a00720.html#gac401da1dd9177ad81d7618a2a5541e23',1,'glm']]], + ['packed_5fmat3',['packed_mat3',['../a00720.html#ga9bc12b0ab7be8448836711b77cc7b83a',1,'glm']]], + ['packed_5fmat3x2',['packed_mat3x2',['../a00720.html#ga134f0d99fbd2459c13cd9ebd056509fa',1,'glm']]], + ['packed_5fmat3x3',['packed_mat3x3',['../a00720.html#ga6c1dbe8cde9fbb231284b01f8aeaaa99',1,'glm']]], + ['packed_5fmat3x4',['packed_mat3x4',['../a00720.html#gad63515526cccfe88ffa8fe5ed64f95f8',1,'glm']]], + ['packed_5fmat4',['packed_mat4',['../a00720.html#ga2c139854e5b04cf08a957dee3b510441',1,'glm']]], + ['packed_5fmat4x2',['packed_mat4x2',['../a00720.html#ga379c1153f1339bdeaefd592bebf538e8',1,'glm']]], + ['packed_5fmat4x3',['packed_mat4x3',['../a00720.html#gab286466e19f7399c8d25089da9400d43',1,'glm']]], + ['packed_5fmat4x4',['packed_mat4x4',['../a00720.html#ga67e7102557d6067bb6ac00d4ad0e1374',1,'glm']]], + ['packed_5fmediump_5fbvec1',['packed_mediump_bvec1',['../a00720.html#ga5546d828d63010a8f9cf81161ad0275a',1,'glm']]], + ['packed_5fmediump_5fbvec2',['packed_mediump_bvec2',['../a00720.html#gab4c6414a59539e66a242ad4cf4b476b4',1,'glm']]], + ['packed_5fmediump_5fbvec3',['packed_mediump_bvec3',['../a00720.html#ga70147763edff3fe96b03a0b98d6339a2',1,'glm']]], + ['packed_5fmediump_5fbvec4',['packed_mediump_bvec4',['../a00720.html#ga7b1620f259595b9da47a6374fc44588a',1,'glm']]], + ['packed_5fmediump_5fdmat2',['packed_mediump_dmat2',['../a00720.html#ga9d60e32d3fcb51f817046cd881fdbf57',1,'glm']]], + ['packed_5fmediump_5fdmat2x2',['packed_mediump_dmat2x2',['../a00720.html#ga39e8bb9b70e5694964e8266a21ba534e',1,'glm']]], + ['packed_5fmediump_5fdmat2x3',['packed_mediump_dmat2x3',['../a00720.html#ga8897c6d9adb4140b1c3b0a07b8f0a430',1,'glm']]], + ['packed_5fmediump_5fdmat2x4',['packed_mediump_dmat2x4',['../a00720.html#gaaa4126969c765e7faa2ebf6951c22ffb',1,'glm']]], + ['packed_5fmediump_5fdmat3',['packed_mediump_dmat3',['../a00720.html#gaf969eb879c76a5f4576e4a1e10095cf6',1,'glm']]], + ['packed_5fmediump_5fdmat3x2',['packed_mediump_dmat3x2',['../a00720.html#ga86efe91cdaa2864c828a5d6d46356c6a',1,'glm']]], + ['packed_5fmediump_5fdmat3x3',['packed_mediump_dmat3x3',['../a00720.html#gaf85877d38d8cfbc21d59d939afd72375',1,'glm']]], + ['packed_5fmediump_5fdmat3x4',['packed_mediump_dmat3x4',['../a00720.html#gad5dcaf93df267bc3029174e430e0907f',1,'glm']]], + ['packed_5fmediump_5fdmat4',['packed_mediump_dmat4',['../a00720.html#ga4b0ee7996651ddd04eaa0c4cdbb66332',1,'glm']]], + ['packed_5fmediump_5fdmat4x2',['packed_mediump_dmat4x2',['../a00720.html#ga9a15514a0631f700de6312b9d5db3a73',1,'glm']]], + ['packed_5fmediump_5fdmat4x3',['packed_mediump_dmat4x3',['../a00720.html#gab5b36cc9caee1bb1c5178fe191bf5713',1,'glm']]], + ['packed_5fmediump_5fdmat4x4',['packed_mediump_dmat4x4',['../a00720.html#ga21e86cf2f6c126bacf31b8985db06bd4',1,'glm']]], + ['packed_5fmediump_5fdvec1',['packed_mediump_dvec1',['../a00720.html#ga8920e90ea9c01d9c97e604a938ce2cbd',1,'glm']]], + ['packed_5fmediump_5fdvec2',['packed_mediump_dvec2',['../a00720.html#ga0c754a783b6fcf80374c013371c4dae9',1,'glm']]], + ['packed_5fmediump_5fdvec3',['packed_mediump_dvec3',['../a00720.html#ga1f18ada6f7cdd8c46db33ba987280fc4',1,'glm']]], + ['packed_5fmediump_5fdvec4',['packed_mediump_dvec4',['../a00720.html#ga568b850f1116b667043533cf77826968',1,'glm']]], + ['packed_5fmediump_5fivec1',['packed_mediump_ivec1',['../a00720.html#ga09507ef020a49517a7bcd50438f05056',1,'glm']]], + ['packed_5fmediump_5fivec2',['packed_mediump_ivec2',['../a00720.html#gaaa891048dddef4627df33809ec726219',1,'glm']]], + ['packed_5fmediump_5fivec3',['packed_mediump_ivec3',['../a00720.html#ga06f26d54dca30994eb1fdadb8e69f4a2',1,'glm']]], + ['packed_5fmediump_5fivec4',['packed_mediump_ivec4',['../a00720.html#ga70130dc8ed9c966ec2a221ce586d45d8',1,'glm']]], + ['packed_5fmediump_5fmat2',['packed_mediump_mat2',['../a00720.html#ga43cd36d430c5187bfdca34a23cb41581',1,'glm']]], + ['packed_5fmediump_5fmat2x2',['packed_mediump_mat2x2',['../a00720.html#ga2d2a73e662759e301c22b8931ff6a526',1,'glm']]], + ['packed_5fmediump_5fmat2x3',['packed_mediump_mat2x3',['../a00720.html#ga99049db01faf1e95ed9fb875a47dffe2',1,'glm']]], + ['packed_5fmediump_5fmat2x4',['packed_mediump_mat2x4',['../a00720.html#gad43a240533f388ce0504b495d9df3d52',1,'glm']]], + ['packed_5fmediump_5fmat3',['packed_mediump_mat3',['../a00720.html#ga13a75c6cbd0a411f694bc82486cd1e55',1,'glm']]], + ['packed_5fmediump_5fmat3x2',['packed_mediump_mat3x2',['../a00720.html#ga04cfaf1421284df3c24ea0985dab24e7',1,'glm']]], + ['packed_5fmediump_5fmat3x3',['packed_mediump_mat3x3',['../a00720.html#gaaa9cea174d342dd9650e3436823cab23',1,'glm']]], + ['packed_5fmediump_5fmat3x4',['packed_mediump_mat3x4',['../a00720.html#gabc93a9560593bd32e099c908531305f5',1,'glm']]], + ['packed_5fmediump_5fmat4',['packed_mediump_mat4',['../a00720.html#gae89d72ffc149147f61df701bbc8755bf',1,'glm']]], + ['packed_5fmediump_5fmat4x2',['packed_mediump_mat4x2',['../a00720.html#gaa458f9d9e0934bae3097e2a373b24707',1,'glm']]], + ['packed_5fmediump_5fmat4x3',['packed_mediump_mat4x3',['../a00720.html#ga02ca6255394aa778abaeb0f733c4d2b6',1,'glm']]], + ['packed_5fmediump_5fmat4x4',['packed_mediump_mat4x4',['../a00720.html#gaf304f64c06743c1571401504d3f50259',1,'glm']]], + ['packed_5fmediump_5fuvec1',['packed_mediump_uvec1',['../a00720.html#ga2c29fb42bab9a4f9b66bc60b2e514a34',1,'glm']]], + ['packed_5fmediump_5fuvec2',['packed_mediump_uvec2',['../a00720.html#gaa1f95690a78dc12e39da32943243aeef',1,'glm']]], + ['packed_5fmediump_5fuvec3',['packed_mediump_uvec3',['../a00720.html#ga1ea2bbdbcb0a69242f6d884663c1b0ab',1,'glm']]], + ['packed_5fmediump_5fuvec4',['packed_mediump_uvec4',['../a00720.html#ga63a73be86a4f07ea7a7499ab0bfebe45',1,'glm']]], + ['packed_5fmediump_5fvec1',['packed_mediump_vec1',['../a00720.html#ga71d63cead1e113fca0bcdaaa33aad050',1,'glm']]], + ['packed_5fmediump_5fvec2',['packed_mediump_vec2',['../a00720.html#ga6844c6f4691d1bf67673240850430948',1,'glm']]], + ['packed_5fmediump_5fvec3',['packed_mediump_vec3',['../a00720.html#gab0eb771b708c5b2205d9b14dd1434fd8',1,'glm']]], + ['packed_5fmediump_5fvec4',['packed_mediump_vec4',['../a00720.html#ga68c9bb24f387b312bae6a0a68e74d95e',1,'glm']]], + ['packed_5fuvec1',['packed_uvec1',['../a00720.html#ga5621493caac01bdd22ab6be4416b0314',1,'glm']]], + ['packed_5fuvec2',['packed_uvec2',['../a00720.html#gabcc33efb4d5e83b8fe4706360e75b932',1,'glm']]], + ['packed_5fuvec3',['packed_uvec3',['../a00720.html#gab96804e99e3a72a35740fec690c79617',1,'glm']]], + ['packed_5fuvec4',['packed_uvec4',['../a00720.html#ga8e5d92e84ebdbe2480cf96bc17d6e2f2',1,'glm']]], + ['packed_5fvec1',['packed_vec1',['../a00720.html#ga14741e3d9da9ae83765389927f837331',1,'glm']]], + ['packed_5fvec2',['packed_vec2',['../a00720.html#ga3254defa5a8f0ae4b02b45fedba84a66',1,'glm']]], + ['packed_5fvec3',['packed_vec3',['../a00720.html#gaccccd090e185450caa28b5b63ad4e8f0',1,'glm']]], + ['packed_5fvec4',['packed_vec4',['../a00720.html#ga37a0e0bf653169b581c5eea3d547fa5d',1,'glm']]], + ['packf2x11_5f1x10',['packF2x11_1x10',['../a00716.html#ga4944ad465ff950e926d49621f916c78d',1,'glm']]], + ['packf3x9_5fe1x5',['packF3x9_E1x5',['../a00716.html#ga3f648fc205467792dc6d8c59c748f8a6',1,'glm']]], + ['packhalf',['packHalf',['../a00716.html#ga2d8bbce673ebc04831c1fb05c47f5251',1,'glm']]], + ['packhalf1x16',['packHalf1x16',['../a00716.html#ga43f2093b6ff192a79058ff7834fc3528',1,'glm']]], + ['packhalf2x16',['packHalf2x16',['../a00789.html#ga20f134b07db3a3d3a38efb2617388c92',1,'glm']]], + ['packhalf4x16',['packHalf4x16',['../a00716.html#gafe2f7b39caf8f5ec555e1c059ec530e6',1,'glm']]], + ['packi3x10_5f1x2',['packI3x10_1x2',['../a00716.html#ga06ecb6afb902dba45419008171db9023',1,'glm']]], + ['packing_2ehpp',['packing.hpp',['../a00416.html',1,'']]], + ['packint2x16',['packInt2x16',['../a00716.html#ga3644163cf3a47bf1d4af1f4b03013a7e',1,'glm']]], + ['packint2x32',['packInt2x32',['../a00716.html#gad1e4c8a9e67d86b61a6eec86703a827a',1,'glm']]], + ['packint2x8',['packInt2x8',['../a00716.html#ga8884b1f2292414f36d59ef3be5d62914',1,'glm']]], + ['packint4x16',['packInt4x16',['../a00716.html#ga1989f093a27ae69cf9207145be48b3d7',1,'glm']]], + ['packint4x8',['packInt4x8',['../a00716.html#gaf2238401d5ce2aaade1a44ba19709072',1,'glm']]], + ['packrgbm',['packRGBM',['../a00716.html#ga0466daf4c90f76cc64b3f105ce727295',1,'glm']]], + ['packsnorm',['packSnorm',['../a00716.html#gaa54b5855a750d6aeb12c1c902f5939b8',1,'glm']]], + ['packsnorm1x16',['packSnorm1x16',['../a00716.html#gab22f8bcfdb5fc65af4701b25f143c1af',1,'glm']]], + ['packsnorm1x8',['packSnorm1x8',['../a00716.html#gae3592e0795e62aaa1865b3a10496a7a1',1,'glm']]], + ['packsnorm2x16',['packSnorm2x16',['../a00789.html#ga977ab172da5494e5ac63e952afacfbe2',1,'glm']]], + ['packsnorm2x8',['packSnorm2x8',['../a00716.html#ga6be3cfb2cce3702f03e91bbeb5286d7e',1,'glm']]], + ['packsnorm3x10_5f1x2',['packSnorm3x10_1x2',['../a00716.html#gab997545661877d2c7362a5084d3897d3',1,'glm']]], + ['packsnorm4x16',['packSnorm4x16',['../a00716.html#ga358943934d21da947d5bcc88c2ab7832',1,'glm']]], + ['packsnorm4x8',['packSnorm4x8',['../a00789.html#ga85e8f17627516445026ab7a9c2e3531a',1,'glm']]], + ['packu3x10_5f1x2',['packU3x10_1x2',['../a00716.html#gada3d88d59f0f458f9c51a9fd359a4bc0',1,'glm']]], + ['packuint2x16',['packUint2x16',['../a00716.html#ga5eecc9e8cbaf51ac6cf57501e670ee19',1,'glm']]], + ['packuint2x32',['packUint2x32',['../a00716.html#gaa864081097b86e83d8e4a4d79c382b22',1,'glm']]], + ['packuint2x8',['packUint2x8',['../a00716.html#ga3c3c9fb53ae7823b10fa083909357590',1,'glm']]], + ['packuint4x16',['packUint4x16',['../a00716.html#ga2ceb62cca347d8ace42ee90317a3f1f9',1,'glm']]], + ['packuint4x8',['packUint4x8',['../a00716.html#gaa0fe2f09aeb403cd66c1a062f58861ab',1,'glm']]], + ['packunorm',['packUnorm',['../a00716.html#gaccd3f27e6ba5163eb7aa9bc8ff96251a',1,'glm']]], + ['packunorm1x16',['packUnorm1x16',['../a00716.html#ga9f82737bf2a44bedff1d286b76837886',1,'glm']]], + ['packunorm1x5_5f1x6_5f1x5',['packUnorm1x5_1x6_1x5',['../a00716.html#ga768e0337dd6246773f14aa0a421fe9a8',1,'glm']]], + ['packunorm1x8',['packUnorm1x8',['../a00716.html#ga4b2fa60df3460403817d28b082ee0736',1,'glm']]], + ['packunorm2x16',['packUnorm2x16',['../a00789.html#ga0e2d107039fe608a209497af867b85fb',1,'glm']]], + ['packunorm2x3_5f1x2',['packUnorm2x3_1x2',['../a00716.html#ga7f9abdb50f9be1aa1c14912504a0d98d',1,'glm']]], + ['packunorm2x4',['packUnorm2x4',['../a00716.html#gab6bbd5be3b8e6db538ecb33a7844481c',1,'glm']]], + ['packunorm2x8',['packUnorm2x8',['../a00716.html#ga9a666b1c688ab54100061ed06526de6e',1,'glm']]], + ['packunorm3x10_5f1x2',['packUnorm3x10_1x2',['../a00716.html#ga8a1ee625d2707c60530fb3fca2980b19',1,'glm']]], + ['packunorm3x5_5f1x1',['packUnorm3x5_1x1',['../a00716.html#gaec4112086d7fb133bea104a7c237de52',1,'glm']]], + ['packunorm4x16',['packUnorm4x16',['../a00716.html#ga1f63c264e7ab63264e2b2a99fd393897',1,'glm']]], + ['packunorm4x4',['packUnorm4x4',['../a00716.html#gad3e7e3ce521513584a53aedc5f9765c1',1,'glm']]], + ['packunorm4x8',['packUnorm4x8',['../a00789.html#gaf7d2f7341a9eeb4a436929d6f9ad08f2',1,'glm']]], + ['perlin',['perlin',['../a00715.html#ga1e043ce3b51510e9bc4469227cefc38a',1,'glm::perlin(vec< L, T, Q > const &p)'],['../a00715.html#gac270edc54c5fc52f5985a45f940bb103',1,'glm::perlin(vec< L, T, Q > const &p, vec< L, T, Q > const &rep)']]], + ['perp',['perp',['../a00766.html#ga264cfc4e180cf9b852e943b35089003c',1,'glm']]], + ['perpendicular_2ehpp',['perpendicular.hpp',['../a00560.html',1,'']]], + ['perspective',['perspective',['../a00665.html#ga747c8cf99458663dd7ad1bb3a2f07787',1,'glm']]], + ['perspectivefov',['perspectiveFov',['../a00665.html#gaebd02240fd36e85ad754f02ddd9a560d',1,'glm']]], + ['perspectivefovlh',['perspectiveFovLH',['../a00665.html#ga6aebe16c164bd8e52554cbe0304ef4aa',1,'glm']]], + ['perspectivefovlh_5fno',['perspectiveFovLH_NO',['../a00665.html#gad18a4495b77530317327e8d466488c1a',1,'glm']]], + ['perspectivefovlh_5fzo',['perspectiveFovLH_ZO',['../a00665.html#gabdd37014f529e25b2fa1b3ba06c10d5c',1,'glm']]], + ['perspectivefovno',['perspectiveFovNO',['../a00665.html#gaf30e7bd3b1387a6776433dd5383e6633',1,'glm']]], + ['perspectivefovrh',['perspectiveFovRH',['../a00665.html#gaf32bf563f28379c68554a44ee60c6a85',1,'glm']]], + ['perspectivefovrh_5fno',['perspectiveFovRH_NO',['../a00665.html#ga257b733ff883c9a065801023cf243eb2',1,'glm']]], + ['perspectivefovrh_5fzo',['perspectiveFovRH_ZO',['../a00665.html#ga7dcbb25331676f5b0795aced1a905c44',1,'glm']]], + ['perspectivefovzo',['perspectiveFovZO',['../a00665.html#ga4bc69fa1d1f95128430aa3d2a712390b',1,'glm']]], + ['perspectivelh',['perspectiveLH',['../a00665.html#ga9bd34951dc7022ac256fcb51d7f6fc2f',1,'glm']]], + ['perspectivelh_5fno',['perspectiveLH_NO',['../a00665.html#gaead4d049d1feab463b700b5641aa590e',1,'glm']]], + ['perspectivelh_5fzo',['perspectiveLH_ZO',['../a00665.html#gaca32af88c2719005c02817ad1142986c',1,'glm']]], + ['perspectiveno',['perspectiveNO',['../a00665.html#gaf497e6bca61e7c87088370b126a93758',1,'glm']]], + ['perspectiverh',['perspectiveRH',['../a00665.html#ga26b88757fbd90601b80768a7e1ad3aa1',1,'glm']]], + ['perspectiverh_5fno',['perspectiveRH_NO',['../a00665.html#gad1526cb2cbe796095284e8f34b01c582',1,'glm']]], + ['perspectiverh_5fzo',['perspectiveRH_ZO',['../a00665.html#ga4da358d6e1b8e5b9ae35d1f3f2dc3b9a',1,'glm']]], + ['perspectivezo',['perspectiveZO',['../a00665.html#gaa9dfba5c2322da54f72b1eb7c7c11b47',1,'glm']]], + ['pi',['pi',['../a00680.html#ga94bafeb2a0f23ab6450fed1f98ee4e45',1,'glm']]], + ['pickmatrix',['pickMatrix',['../a00666.html#gaf6b21eadb7ac2ecbbe258a9a233b4c82',1,'glm']]], + ['pitch',['pitch',['../a00663.html#ga7603e81477b46ddb448896909bc04928',1,'glm']]], + ['polar',['polar',['../a00767.html#gab83ac2c0e55b684b06b6c46c28b1590d',1,'glm']]], + ['polar_5fcoordinates_2ehpp',['polar_coordinates.hpp',['../a00563.html',1,'']]], + ['pow',['pow',['../a00664.html#ga2254981952d4f333b900a6bf5167a6c4',1,'glm::pow(vec< L, T, Q > const &base, vec< L, T, Q > const &exponent)'],['../a00677.html#ga4975ffcacd312a8c0bbd046a76c5607e',1,'glm::pow(qua< T, Q > const &q, T y)'],['../a00747.html#ga465016030a81d513fa2fac881ebdaa83',1,'glm::pow(int x, uint y)'],['../a00747.html#ga998e5ee915d3769255519e2fbaa2bbf0',1,'glm::pow(uint x, uint y)']]], + ['pow2',['pow2',['../a00764.html#ga19aaff3213bf23bdec3ef124ace237e9',1,'glm::gtx']]], + ['pow3',['pow3',['../a00764.html#ga35689d03cd434d6ea819f1942d3bf82e',1,'glm::gtx']]], + ['pow4',['pow4',['../a00764.html#gacef0968763026e180e53e735007dbf5a',1,'glm::gtx']]], + ['poweroftwoabove',['powerOfTwoAbove',['../a00726.html#ga8cda2459871f574a0aecbe702ac93291',1,'glm::powerOfTwoAbove(genIUType Value)'],['../a00726.html#ga2bbded187c5febfefc1e524ba31b3fab',1,'glm::powerOfTwoAbove(vec< L, T, Q > const &value)']]], + ['poweroftwobelow',['powerOfTwoBelow',['../a00726.html#ga3de7df63c589325101a2817a56f8e29d',1,'glm::powerOfTwoBelow(genIUType Value)'],['../a00726.html#gaf78ddcc4152c051b2a21e68fecb10980',1,'glm::powerOfTwoBelow(vec< L, T, Q > const &value)']]], + ['poweroftwonearest',['powerOfTwoNearest',['../a00726.html#ga5f65973a5d2ea38c719e6a663149ead9',1,'glm::powerOfTwoNearest(genIUType Value)'],['../a00726.html#gac87e65d11e16c3d6b91c3bcfaef7da0b',1,'glm::powerOfTwoNearest(vec< L, T, Q > const &value)']]], + ['prev_5ffloat',['prev_float',['../a00723.html#ga2fcbb7bfbfc595712bfddc51b0715b07',1,'glm::prev_float(genType const &x)'],['../a00723.html#gaa399d5b6472a70e8952f9b26ecaacdec',1,'glm::prev_float(genType const &x, uint const &Distance)']]], + ['proj',['proj',['../a00768.html#ga58384b7170801dd513de46f87c7fb00e',1,'glm']]], + ['proj2d',['proj2D',['../a00780.html#ga5b992a0cdc8298054edb68e228f0d93e',1,'glm']]], + ['proj3d',['proj3D',['../a00780.html#gaa2b7f4f15b98f697caede11bef50509e',1,'glm']]], + ['project',['project',['../a00666.html#gaf36e96033f456659e6705472a06b6e11',1,'glm']]], + ['projection_2ehpp',['projection.hpp',['../a00566.html',1,'']]], + ['projectno',['projectNO',['../a00666.html#ga05249751f48d14cb282e4979802b8111',1,'glm']]], + ['projectzo',['projectZO',['../a00666.html#ga77d157525063dec83a557186873ee080',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/all_e.html b/common/glm/doc/api/search/all_e.html new file mode 100644 index 000000000..85b39bd48 --- /dev/null +++ b/common/glm/doc/api/search/all_e.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/all_e.js b/common/glm/doc/api/search/all_e.js new file mode 100644 index 000000000..1f6934c32 --- /dev/null +++ b/common/glm/doc/api/search/all_e.js @@ -0,0 +1,31 @@ +var searchData= +[ + ['qr_5fdecompose',['qr_decompose',['../a00753.html#ga77022dca1aa38add548f9f56a9f8071a',1,'glm']]], + ['quadraticeasein',['quadraticEaseIn',['../a00735.html#gaf42089d35855695132d217cd902304a0',1,'glm']]], + ['quadraticeaseinout',['quadraticEaseInOut',['../a00735.html#ga03e8fc2d7945a4e63ee33b2159c14cea',1,'glm']]], + ['quadraticeaseout',['quadraticEaseOut',['../a00735.html#ga283717bc2d937547ad34ec0472234ee3',1,'glm']]], + ['quarter_5fpi',['quarter_pi',['../a00708.html#ga3c9df42bd73c519a995c43f0f99e77e0',1,'glm']]], + ['quarticeasein',['quarticEaseIn',['../a00735.html#ga808b41f14514f47dad5dcc69eb924afd',1,'glm']]], + ['quarticeaseinout',['quarticEaseInOut',['../a00735.html#ga6d000f852de12b197e154f234b20c505',1,'glm']]], + ['quarticeaseout',['quarticEaseOut',['../a00735.html#ga4dfb33fa7664aa888eb647999d329b98',1,'glm']]], + ['quat',['quat',['../a00673.html#gab0b441adb4509bc58d2946c2239a8942',1,'glm']]], + ['quat_5fcast',['quat_cast',['../a00663.html#ga1108a4ab88ca87bac321454eea7702f8',1,'glm::quat_cast(mat< 3, 3, T, Q > const &x)'],['../a00663.html#ga4524810f07f72e8c7bdc7764fa11cb58',1,'glm::quat_cast(mat< 4, 4, T, Q > const &x)']]], + ['quat_5fidentity',['quat_identity',['../a00769.html#ga5ee8332600b2aca3a77622a28d857b55',1,'glm']]], + ['quaternion_5fcommon_2ehpp',['quaternion_common.hpp',['../a00203.html',1,'']]], + ['quaternion_5fdouble_2ehpp',['quaternion_double.hpp',['../a00206.html',1,'']]], + ['quaternion_5fdouble_5fprecision_2ehpp',['quaternion_double_precision.hpp',['../a00209.html',1,'']]], + ['quaternion_5fexponential_2ehpp',['quaternion_exponential.hpp',['../a00212.html',1,'']]], + ['quaternion_5ffloat_2ehpp',['quaternion_float.hpp',['../a00215.html',1,'']]], + ['quaternion_5ffloat_5fprecision_2ehpp',['quaternion_float_precision.hpp',['../a00218.html',1,'']]], + ['quaternion_5fgeometric_2ehpp',['quaternion_geometric.hpp',['../a00221.html',1,'']]], + ['quaternion_5frelational_2ehpp',['quaternion_relational.hpp',['../a00224.html',1,'']]], + ['quaternion_5ftransform_2ehpp',['quaternion_transform.hpp',['../a00227.html',1,'']]], + ['quaternion_5ftrigonometric_2ehpp',['quaternion_trigonometric.hpp',['../a00230.html',1,'']]], + ['quatlookat',['quatLookAt',['../a00663.html#gabe7fc5ec5feb41ab234d5d2b6254697f',1,'glm']]], + ['quatlookatlh',['quatLookAtLH',['../a00663.html#ga2da350c73411be3bb19441b226b81a74',1,'glm']]], + ['quatlookatrh',['quatLookAtRH',['../a00663.html#gaf6529ac8c04a57fcc35865b5c9437cc8',1,'glm']]], + ['quinticeasein',['quinticEaseIn',['../a00735.html#ga097579d8e087dcf48037588140a21640',1,'glm']]], + ['quinticeaseinout',['quinticEaseInOut',['../a00735.html#ga2a82d5c46df7e2d21cc0108eb7b83934',1,'glm']]], + ['quinticeaseout',['quinticEaseOut',['../a00735.html#ga7dbd4d5c8da3f5353121f615e7b591d7',1,'glm']]], + ['qword',['qword',['../a00771.html#ga4021754ffb8e5ef14c75802b15657714',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/all_f.html b/common/glm/doc/api/search/all_f.html new file mode 100644 index 000000000..89fa15a65 --- /dev/null +++ b/common/glm/doc/api/search/all_f.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/all_f.js b/common/glm/doc/api/search/all_f.js new file mode 100644 index 000000000..a70f98f12 --- /dev/null +++ b/common/glm/doc/api/search/all_f.js @@ -0,0 +1,43 @@ +var searchData= +[ + ['recommended_20extensions',['Recommended extensions',['../a00704.html',1,'']]], + ['radialgradient',['radialGradient',['../a00744.html#gaaecb1e93de4cbe0758b882812d4da294',1,'glm']]], + ['radians',['radians',['../a00790.html#ga6e1db4862c5e25afd553930e2fdd6a68',1,'glm']]], + ['random_2ehpp',['random.hpp',['../a00422.html',1,'']]], + ['range_2ehpp',['range.hpp',['../a00569.html',1,'']]], + ['raw_5fdata_2ehpp',['raw_data.hpp',['../a00572.html',1,'']]], + ['reciprocal_2ehpp',['reciprocal.hpp',['../a00425.html',1,'']]], + ['reflect',['reflect',['../a00697.html#ga5631dd1d5618de5450b1ea3cf3e94905',1,'glm']]], + ['refract',['refract',['../a00697.html#ga01da3dff9e2ef6b9d4915c3047e22b74',1,'glm']]], + ['repeat',['repeat',['../a00786.html#ga809650c6310ea7c42666e918c117fb6f',1,'glm']]], + ['rgb2ycocg',['rgb2YCoCg',['../a00730.html#ga0606353ec2a9b9eaa84f1b02ec391bc5',1,'glm']]], + ['rgb2ycocgr',['rgb2YCoCgR',['../a00730.html#ga0389772e44ca0fd2ba4a79bdd8efe898',1,'glm']]], + ['rgbcolor',['rgbColor',['../a00729.html#ga5f9193be46f45f0655c05a0cdca006db',1,'glm']]], + ['righthanded',['rightHanded',['../a00745.html#ga99386a5ab5491871b947076e21699cc8',1,'glm']]], + ['roll',['roll',['../a00663.html#ga0cc5ad970d0b00829b139fe0fe5a1e13',1,'glm']]], + ['root_5ffive',['root_five',['../a00708.html#gae9ebbded75b53d4faeb1e4ef8b3347a2',1,'glm']]], + ['root_5fhalf_5fpi',['root_half_pi',['../a00708.html#ga4e276cb823cc5e612d4f89ed99c75039',1,'glm']]], + ['root_5fln_5ffour',['root_ln_four',['../a00708.html#ga4129412e96b33707a77c1a07652e23e2',1,'glm']]], + ['root_5fpi',['root_pi',['../a00708.html#ga261380796b2cd496f68d2cf1d08b8eb9',1,'glm']]], + ['root_5fthree',['root_three',['../a00708.html#ga4f286be4abe88be1eed7d2a9f6cb193e',1,'glm']]], + ['root_5ftwo',['root_two',['../a00708.html#ga74e607d29020f100c0d0dc46ce2ca950',1,'glm']]], + ['root_5ftwo_5fpi',['root_two_pi',['../a00708.html#ga2bcedc575039fe0cd765742f8bbb0bd3',1,'glm']]], + ['rotate',['rotate',['../a00668.html#gaee9e865eaa9776370996da2940873fd4',1,'glm::rotate(mat< 4, 4, T, Q > const &m, T angle, vec< 3, T, Q > const &axis)'],['../a00677.html#gabfc57de6d4d2e11970f54119c5ccf0f5',1,'glm::rotate(qua< T, Q > const &q, T const &angle, vec< 3, T, Q > const &axis)'],['../a00758.html#gad5c84a4932a758f385a87098ce1b1660',1,'glm::rotate(mat< 3, 3, T, Q > const &m, T angle)'],['../a00769.html#ga07da6ef58646442efe93b0c273d73776',1,'glm::rotate(qua< T, Q > const &q, vec< 3, T, Q > const &v)'],['../a00769.html#gafcb78dfff45fbf19a7fcb2bd03fbf196',1,'glm::rotate(qua< T, Q > const &q, vec< 4, T, Q > const &v)'],['../a00773.html#gab64a67b52ff4f86c3ba16595a5a25af6',1,'glm::rotate(vec< 2, T, Q > const &v, T const &angle)'],['../a00773.html#ga1ba501ef83d1a009a17ac774cc560f21',1,'glm::rotate(vec< 3, T, Q > const &v, T const &angle, vec< 3, T, Q > const &normal)'],['../a00773.html#ga1005f1267ed9c57faa3f24cf6873b961',1,'glm::rotate(vec< 4, T, Q > const &v, T const &angle, vec< 3, T, Q > const &normal)'],['../a00779.html#gaf599be4c0e9d99be1f9cddba79b6018b',1,'glm::rotate(T angle, vec< 3, T, Q > const &v)']]], + ['rotate_5fnormalized_5faxis_2ehpp',['rotate_normalized_axis.hpp',['../a00575.html',1,'']]], + ['rotate_5fvector_2ehpp',['rotate_vector.hpp',['../a00578.html',1,'']]], + ['rotatenormalizedaxis',['rotateNormalizedAxis',['../a00772.html#ga50efd7ebca0f7a603bb3cc11e34c708d',1,'glm::rotateNormalizedAxis(mat< 4, 4, T, Q > const &m, T const &angle, vec< 3, T, Q > const &axis)'],['../a00772.html#ga08f9c5411437d528019a25bfc01473d1',1,'glm::rotateNormalizedAxis(qua< T, Q > const &q, T const &angle, vec< 3, T, Q > const &axis)']]], + ['rotatex',['rotateX',['../a00773.html#ga059fdbdba4cca35cdff172a9d0d0afc9',1,'glm::rotateX(vec< 3, T, Q > const &v, T const &angle)'],['../a00773.html#ga4333b1ea8ebf1bd52bc3801a7617398a',1,'glm::rotateX(vec< 4, T, Q > const &v, T const &angle)']]], + ['rotatey',['rotateY',['../a00773.html#gaebdc8b054ace27d9f62e054531c6f44d',1,'glm::rotateY(vec< 3, T, Q > const &v, T const &angle)'],['../a00773.html#ga3ce3db0867b7f8efd878ee34f95a623b',1,'glm::rotateY(vec< 4, T, Q > const &v, T const &angle)']]], + ['rotatez',['rotateZ',['../a00773.html#ga5a048838a03f6249acbacb4dbacf79c4',1,'glm::rotateZ(vec< 3, T, Q > const &v, T const &angle)'],['../a00773.html#ga923b75c6448161053768822d880702e6',1,'glm::rotateZ(vec< 4, T, Q > const &v, T const &angle)']]], + ['rotation',['rotation',['../a00769.html#ga03e61282831cc3f52cc76f72f52ad2c5',1,'glm']]], + ['round',['round',['../a00662.html#gafa03aca8c4713e1cc892aa92ca135a7e',1,'glm']]], + ['round_2ehpp',['round.hpp',['../a00428.html',1,'']]], + ['roundeven',['roundEven',['../a00662.html#ga76b81785045a057989a84d99aeeb1578',1,'glm']]], + ['roundmultiple',['roundMultiple',['../a00719.html#gab892defcc9c0b0618df7251253dc0fbb',1,'glm::roundMultiple(genType v, genType Multiple)'],['../a00719.html#ga2f1a68332d761804c054460a612e3a4b',1,'glm::roundMultiple(vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)']]], + ['roundpoweroftwo',['roundPowerOfTwo',['../a00719.html#gae4e1bf5d1cd179f59261a7342bdcafca',1,'glm::roundPowerOfTwo(genIUType v)'],['../a00719.html#ga258802a7d55c03c918f28cf4d241c4d0',1,'glm::roundPowerOfTwo(vec< L, T, Q > const &v)']]], + ['row',['row',['../a00711.html#ga259e5ebd0f31ec3f83440f8cae7f5dba',1,'glm::row(genType const &m, length_t index)'],['../a00711.html#gaadcc64829aadf4103477679e48c7594f',1,'glm::row(genType const &m, length_t index, typename genType::row_type const &x)']]], + ['rowmajor2',['rowMajor2',['../a00755.html#gaf5b1aee9e3eb1acf9d6c3c8be1e73bb8',1,'glm::rowMajor2(vec< 2, T, Q > const &v1, vec< 2, T, Q > const &v2)'],['../a00755.html#gaf66c75ed69ca9e87462550708c2c6726',1,'glm::rowMajor2(mat< 2, 2, T, Q > const &m)']]], + ['rowmajor3',['rowMajor3',['../a00755.html#ga2ae46497493339f745754e40f438442e',1,'glm::rowMajor3(vec< 3, T, Q > const &v1, vec< 3, T, Q > const &v2, vec< 3, T, Q > const &v3)'],['../a00755.html#gad8a3a50ab47bbe8d36cdb81d90dfcf77',1,'glm::rowMajor3(mat< 3, 3, T, Q > const &m)']]], + ['rowmajor4',['rowMajor4',['../a00755.html#ga9636cd6bbe2c32a8d0c03ffb8b1ef284',1,'glm::rowMajor4(vec< 4, T, Q > const &v1, vec< 4, T, Q > const &v2, vec< 4, T, Q > const &v3, vec< 4, T, Q > const &v4)'],['../a00755.html#gac92ad1c2acdf18d3eb7be45a32f9566b',1,'glm::rowMajor4(mat< 4, 4, T, Q > const &m)']]], + ['rq_5fdecompose',['rq_decompose',['../a00753.html#ga4e022709c9e7eaad9d7cc315d2cdb05c',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/close.png b/common/glm/doc/api/search/close.png new file mode 100644 index 0000000000000000000000000000000000000000..9342d3dfeea7b7c4ee610987e717804b5a42ceb9 GIT binary patch literal 273 zcmV+s0q*{ZP)4(RlMby96)VwnbG{ zbe&}^BDn7x>$<{ck4zAK-=nT;=hHG)kmplIF${xqm8db3oX6wT3bvp`TE@m0cg;b) zBuSL}5?N7O(iZLdAlz@)b)Rd~DnSsSX&P5qC`XwuFwcAYLC+d2>+1(8on;wpt8QIC X2MT$R4iQDd00000NkvXXu0mjfia~GN literal 0 HcmV?d00001 diff --git a/common/glm/doc/api/search/files_0.html b/common/glm/doc/api/search/files_0.html new file mode 100644 index 000000000..49606c82c --- /dev/null +++ b/common/glm/doc/api/search/files_0.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/files_0.js b/common/glm/doc/api/search/files_0.js new file mode 100644 index 000000000..bedee080d --- /dev/null +++ b/common/glm/doc/api/search/files_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['associated_5fmin_5fmax_2ehpp',['associated_min_max.hpp',['../a00446.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/files_1.html b/common/glm/doc/api/search/files_1.html new file mode 100644 index 000000000..c8871748e --- /dev/null +++ b/common/glm/doc/api/search/files_1.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/files_1.js b/common/glm/doc/api/search/files_1.js new file mode 100644 index 000000000..be55e43ca --- /dev/null +++ b/common/glm/doc/api/search/files_1.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['bit_2ehpp',['bit.hpp',['../a00449.html',1,'']]], + ['bitfield_2ehpp',['bitfield.hpp',['../a00389.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/files_10.html b/common/glm/doc/api/search/files_10.html new file mode 100644 index 000000000..0ffd7bf01 --- /dev/null +++ b/common/glm/doc/api/search/files_10.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/files_10.js b/common/glm/doc/api/search/files_10.js new file mode 100644 index 000000000..0a331204a --- /dev/null +++ b/common/glm/doc/api/search/files_10.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['scalar_5fcommon_2ehpp',['scalar_common.hpp',['../a00233.html',1,'']]], + ['scalar_5fconstants_2ehpp',['scalar_constants.hpp',['../a00236.html',1,'']]], + ['scalar_5ffloat_5fsized_2ehpp',['scalar_float_sized.hpp',['../a00239.html',1,'']]], + ['scalar_5fint_5fsized_2ehpp',['scalar_int_sized.hpp',['../a00242.html',1,'']]], + ['scalar_5fmultiplication_2ehpp',['scalar_multiplication.hpp',['../a00581.html',1,'']]], + ['scalar_5fuint_5fsized_2ehpp',['scalar_uint_sized.hpp',['../a00248.html',1,'']]], + ['spline_2ehpp',['spline.hpp',['../a00584.html',1,'']]], + ['std_5fbased_5ftype_2ehpp',['std_based_type.hpp',['../a00587.html',1,'']]], + ['string_5fcast_2ehpp',['string_cast.hpp',['../a00590.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/files_11.html b/common/glm/doc/api/search/files_11.html new file mode 100644 index 000000000..1fdd8544f --- /dev/null +++ b/common/glm/doc/api/search/files_11.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/files_11.js b/common/glm/doc/api/search/files_11.js new file mode 100644 index 000000000..7b156053c --- /dev/null +++ b/common/glm/doc/api/search/files_11.js @@ -0,0 +1,23 @@ +var searchData= +[ + ['texture_2ehpp',['texture.hpp',['../a00593.html',1,'']]], + ['transform_2ehpp',['transform.hpp',['../a00596.html',1,'']]], + ['transform2_2ehpp',['transform2.hpp',['../a00599.html',1,'']]], + ['trigonometric_2ehpp',['trigonometric.hpp',['../a00647.html',1,'']]], + ['type_5fmat2x2_2ehpp',['type_mat2x2.hpp',['../a00038.html',1,'']]], + ['type_5fmat2x3_2ehpp',['type_mat2x3.hpp',['../a00041.html',1,'']]], + ['type_5fmat2x4_2ehpp',['type_mat2x4.hpp',['../a00044.html',1,'']]], + ['type_5fmat3x2_2ehpp',['type_mat3x2.hpp',['../a00047.html',1,'']]], + ['type_5fmat3x3_2ehpp',['type_mat3x3.hpp',['../a00050.html',1,'']]], + ['type_5fmat3x4_2ehpp',['type_mat3x4.hpp',['../a00053.html',1,'']]], + ['type_5fmat4x2_2ehpp',['type_mat4x2.hpp',['../a00056.html',1,'']]], + ['type_5fmat4x3_2ehpp',['type_mat4x3.hpp',['../a00059.html',1,'']]], + ['type_5fmat4x4_2ehpp',['type_mat4x4.hpp',['../a00062.html',1,'']]], + ['type_5fprecision_2ehpp',['type_precision.hpp',['../a00434.html',1,'']]], + ['type_5fptr_2ehpp',['type_ptr.hpp',['../a00437.html',1,'']]], + ['type_5ftrait_2ehpp',['type_trait.hpp',['../a00602.html',1,'']]], + ['type_5fvec1_2ehpp',['type_vec1.hpp',['../a00068.html',1,'']]], + ['type_5fvec2_2ehpp',['type_vec2.hpp',['../a00071.html',1,'']]], + ['type_5fvec3_2ehpp',['type_vec3.hpp',['../a00074.html',1,'']]], + ['type_5fvec4_2ehpp',['type_vec4.hpp',['../a00077.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/files_12.html b/common/glm/doc/api/search/files_12.html new file mode 100644 index 000000000..8f0a92ae3 --- /dev/null +++ b/common/glm/doc/api/search/files_12.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/files_12.js b/common/glm/doc/api/search/files_12.js new file mode 100644 index 000000000..667bd1747 --- /dev/null +++ b/common/glm/doc/api/search/files_12.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['ulp_2ehpp',['ulp.hpp',['../a00440.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/files_13.html b/common/glm/doc/api/search/files_13.html new file mode 100644 index 000000000..073197b9c --- /dev/null +++ b/common/glm/doc/api/search/files_13.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/files_13.js b/common/glm/doc/api/search/files_13.js new file mode 100644 index 000000000..8349dbb71 --- /dev/null +++ b/common/glm/doc/api/search/files_13.js @@ -0,0 +1,52 @@ +var searchData= +[ + ['vec1_2ehpp',['vec1.hpp',['../a00443.html',1,'']]], + ['vec2_2ehpp',['vec2.hpp',['../a00650.html',1,'']]], + ['vec3_2ehpp',['vec3.hpp',['../a00653.html',1,'']]], + ['vec4_2ehpp',['vec4.hpp',['../a00656.html',1,'']]], + ['vec_5fswizzle_2ehpp',['vec_swizzle.hpp',['../a00605.html',1,'']]], + ['vector_5fangle_2ehpp',['vector_angle.hpp',['../a00608.html',1,'']]], + ['vector_5fbool1_2ehpp',['vector_bool1.hpp',['../a00251.html',1,'']]], + ['vector_5fbool1_5fprecision_2ehpp',['vector_bool1_precision.hpp',['../a00254.html',1,'']]], + ['vector_5fbool2_2ehpp',['vector_bool2.hpp',['../a00257.html',1,'']]], + ['vector_5fbool2_5fprecision_2ehpp',['vector_bool2_precision.hpp',['../a00260.html',1,'']]], + ['vector_5fbool3_2ehpp',['vector_bool3.hpp',['../a00263.html',1,'']]], + ['vector_5fbool3_5fprecision_2ehpp',['vector_bool3_precision.hpp',['../a00266.html',1,'']]], + ['vector_5fbool4_2ehpp',['vector_bool4.hpp',['../a00269.html',1,'']]], + ['vector_5fbool4_5fprecision_2ehpp',['vector_bool4_precision.hpp',['../a00272.html',1,'']]], + ['vector_5fcommon_2ehpp',['vector_common.hpp',['../a00275.html',1,'']]], + ['vector_5fdouble1_2ehpp',['vector_double1.hpp',['../a00278.html',1,'']]], + ['vector_5fdouble1_5fprecision_2ehpp',['vector_double1_precision.hpp',['../a00281.html',1,'']]], + ['vector_5fdouble2_2ehpp',['vector_double2.hpp',['../a00284.html',1,'']]], + ['vector_5fdouble2_5fprecision_2ehpp',['vector_double2_precision.hpp',['../a00287.html',1,'']]], + ['vector_5fdouble3_2ehpp',['vector_double3.hpp',['../a00290.html',1,'']]], + ['vector_5fdouble3_5fprecision_2ehpp',['vector_double3_precision.hpp',['../a00293.html',1,'']]], + ['vector_5fdouble4_2ehpp',['vector_double4.hpp',['../a00296.html',1,'']]], + ['vector_5fdouble4_5fprecision_2ehpp',['vector_double4_precision.hpp',['../a00299.html',1,'']]], + ['vector_5ffloat1_2ehpp',['vector_float1.hpp',['../a00302.html',1,'']]], + ['vector_5ffloat1_5fprecision_2ehpp',['vector_float1_precision.hpp',['../a00305.html',1,'']]], + ['vector_5ffloat2_2ehpp',['vector_float2.hpp',['../a00308.html',1,'']]], + ['vector_5ffloat2_5fprecision_2ehpp',['vector_float2_precision.hpp',['../a00311.html',1,'']]], + ['vector_5ffloat3_2ehpp',['vector_float3.hpp',['../a00314.html',1,'']]], + ['vector_5ffloat3_5fprecision_2ehpp',['vector_float3_precision.hpp',['../a00317.html',1,'']]], + ['vector_5ffloat4_2ehpp',['vector_float4.hpp',['../a00320.html',1,'']]], + ['vector_5ffloat4_5fprecision_2ehpp',['vector_float4_precision.hpp',['../a00323.html',1,'']]], + ['vector_5fint1_2ehpp',['vector_int1.hpp',['../a00326.html',1,'']]], + ['vector_5fint1_5fprecision_2ehpp',['vector_int1_precision.hpp',['../a00329.html',1,'']]], + ['vector_5fint2_2ehpp',['vector_int2.hpp',['../a00332.html',1,'']]], + ['vector_5fint2_5fprecision_2ehpp',['vector_int2_precision.hpp',['../a00335.html',1,'']]], + ['vector_5fint3_2ehpp',['vector_int3.hpp',['../a00338.html',1,'']]], + ['vector_5fint3_5fprecision_2ehpp',['vector_int3_precision.hpp',['../a00341.html',1,'']]], + ['vector_5fint4_2ehpp',['vector_int4.hpp',['../a00344.html',1,'']]], + ['vector_5fint4_5fprecision_2ehpp',['vector_int4_precision.hpp',['../a00347.html',1,'']]], + ['vector_5fquery_2ehpp',['vector_query.hpp',['../a00611.html',1,'']]], + ['vector_5frelational_2ehpp',['vector_relational.hpp',['../a00350.html',1,'']]], + ['vector_5fuint1_2ehpp',['vector_uint1.hpp',['../a00353.html',1,'']]], + ['vector_5fuint1_5fprecision_2ehpp',['vector_uint1_precision.hpp',['../a00356.html',1,'']]], + ['vector_5fuint2_2ehpp',['vector_uint2.hpp',['../a00359.html',1,'']]], + ['vector_5fuint2_5fprecision_2ehpp',['vector_uint2_precision.hpp',['../a00362.html',1,'']]], + ['vector_5fuint3_2ehpp',['vector_uint3.hpp',['../a00365.html',1,'']]], + ['vector_5fuint3_5fprecision_2ehpp',['vector_uint3_precision.hpp',['../a00368.html',1,'']]], + ['vector_5fuint4_2ehpp',['vector_uint4.hpp',['../a00371.html',1,'']]], + ['vector_5fuint4_5fprecision_2ehpp',['vector_uint4_precision.hpp',['../a00374.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/files_14.html b/common/glm/doc/api/search/files_14.html new file mode 100644 index 000000000..5022e7b4b --- /dev/null +++ b/common/glm/doc/api/search/files_14.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/files_14.js b/common/glm/doc/api/search/files_14.js new file mode 100644 index 000000000..d8117f246 --- /dev/null +++ b/common/glm/doc/api/search/files_14.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['wrap_2ehpp',['wrap.hpp',['../a00614.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/files_2.html b/common/glm/doc/api/search/files_2.html new file mode 100644 index 000000000..99bdf21c8 --- /dev/null +++ b/common/glm/doc/api/search/files_2.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/files_2.js b/common/glm/doc/api/search/files_2.js new file mode 100644 index 000000000..da8f26b2c --- /dev/null +++ b/common/glm/doc/api/search/files_2.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['closest_5fpoint_2ehpp',['closest_point.hpp',['../a00452.html',1,'']]], + ['color_5fencoding_2ehpp',['color_encoding.hpp',['../a00455.html',1,'']]], + ['color_5fspace_5fycocg_2ehpp',['color_space_YCoCg.hpp',['../a00458.html',1,'']]], + ['common_2ehpp',['common.hpp',['../a00002.html',1,'']]], + ['compatibility_2ehpp',['compatibility.hpp',['../a00461.html',1,'']]], + ['component_5fwise_2ehpp',['component_wise.hpp',['../a00464.html',1,'']]], + ['constants_2ehpp',['constants.hpp',['../a00395.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/files_3.html b/common/glm/doc/api/search/files_3.html new file mode 100644 index 000000000..f8e543a84 --- /dev/null +++ b/common/glm/doc/api/search/files_3.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/files_3.js b/common/glm/doc/api/search/files_3.js new file mode 100644 index 000000000..a65e08a08 --- /dev/null +++ b/common/glm/doc/api/search/files_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['dual_5fquaternion_2ehpp',['dual_quaternion.hpp',['../a00467.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/files_4.html b/common/glm/doc/api/search/files_4.html new file mode 100644 index 000000000..2ebb46c7e --- /dev/null +++ b/common/glm/doc/api/search/files_4.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/files_4.js b/common/glm/doc/api/search/files_4.js new file mode 100644 index 000000000..e6ffb9cfe --- /dev/null +++ b/common/glm/doc/api/search/files_4.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['easing_2ehpp',['easing.hpp',['../a00470.html',1,'']]], + ['epsilon_2ehpp',['epsilon.hpp',['../a00398.html',1,'']]], + ['euler_5fangles_2ehpp',['euler_angles.hpp',['../a00473.html',1,'']]], + ['exponential_2ehpp',['exponential.hpp',['../a00080.html',1,'']]], + ['ext_2ehpp',['ext.hpp',['../a00377.html',1,'']]], + ['extend_2ehpp',['extend.hpp',['../a00476.html',1,'']]], + ['extended_5fmin_5fmax_2ehpp',['extended_min_max.hpp',['../a00479.html',1,'']]], + ['exterior_5fproduct_2ehpp',['exterior_product.hpp',['../a00482.html',1,'']]], + ['matrix_5ftransform_2ehpp',['matrix_transform.hpp',['../a01361.html',1,'']]], + ['scalar_5frelational_2ehpp',['scalar_relational.hpp',['../a01376.html',1,'']]], + ['vector_5frelational_2ehpp',['vector_relational.hpp',['../a01388.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/files_5.html b/common/glm/doc/api/search/files_5.html new file mode 100644 index 000000000..268b7eb53 --- /dev/null +++ b/common/glm/doc/api/search/files_5.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/files_5.js b/common/glm/doc/api/search/files_5.js new file mode 100644 index 000000000..86f026621 --- /dev/null +++ b/common/glm/doc/api/search/files_5.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['fast_5fexponential_2ehpp',['fast_exponential.hpp',['../a00485.html',1,'']]], + ['fast_5fsquare_5froot_2ehpp',['fast_square_root.hpp',['../a00488.html',1,'']]], + ['fast_5ftrigonometry_2ehpp',['fast_trigonometry.hpp',['../a00491.html',1,'']]], + ['functions_2ehpp',['functions.hpp',['../a00494.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/files_6.html b/common/glm/doc/api/search/files_6.html new file mode 100644 index 000000000..98fc6666c --- /dev/null +++ b/common/glm/doc/api/search/files_6.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/files_6.js b/common/glm/doc/api/search/files_6.js new file mode 100644 index 000000000..538403b36 --- /dev/null +++ b/common/glm/doc/api/search/files_6.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['color_5fspace_2ehpp',['color_space.hpp',['../a01346.html',1,'(Global Namespace)'],['../a01349.html',1,'(Global Namespace)']]], + ['common_2ehpp',['common.hpp',['../a01352.html',1,'']]], + ['geometric_2ehpp',['geometric.hpp',['../a00383.html',1,'']]], + ['glm_2ehpp',['glm.hpp',['../a00386.html',1,'']]], + ['gradient_5fpaint_2ehpp',['gradient_paint.hpp',['../a00497.html',1,'']]], + ['integer_2ehpp',['integer.hpp',['../a01355.html',1,'(Global Namespace)'],['../a01358.html',1,'(Global Namespace)']]], + ['matrix_5ftransform_2ehpp',['matrix_transform.hpp',['../a01364.html',1,'']]], + ['packing_2ehpp',['packing.hpp',['../a01367.html',1,'']]], + ['quaternion_2ehpp',['quaternion.hpp',['../a01370.html',1,'(Global Namespace)'],['../a01373.html',1,'(Global Namespace)']]], + ['scalar_5frelational_2ehpp',['scalar_relational.hpp',['../a01379.html',1,'']]], + ['type_5faligned_2ehpp',['type_aligned.hpp',['../a01382.html',1,'(Global Namespace)'],['../a01385.html',1,'(Global Namespace)']]] +]; diff --git a/common/glm/doc/api/search/files_7.html b/common/glm/doc/api/search/files_7.html new file mode 100644 index 000000000..49507dedb --- /dev/null +++ b/common/glm/doc/api/search/files_7.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/files_7.js b/common/glm/doc/api/search/files_7.js new file mode 100644 index 000000000..de775dcb3 --- /dev/null +++ b/common/glm/doc/api/search/files_7.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['handed_5fcoordinate_5fspace_2ehpp',['handed_coordinate_space.hpp',['../a00500.html',1,'']]], + ['hash_2ehpp',['hash.hpp',['../a00503.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/files_8.html b/common/glm/doc/api/search/files_8.html new file mode 100644 index 000000000..12c6630be --- /dev/null +++ b/common/glm/doc/api/search/files_8.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/files_8.js b/common/glm/doc/api/search/files_8.js new file mode 100644 index 000000000..b9add412f --- /dev/null +++ b/common/glm/doc/api/search/files_8.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['integer_2ehpp',['integer.hpp',['../a00401.html',1,'']]], + ['intersect_2ehpp',['intersect.hpp',['../a00506.html',1,'']]], + ['io_2ehpp',['io.hpp',['../a00509.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/files_9.html b/common/glm/doc/api/search/files_9.html new file mode 100644 index 000000000..cabcae2f8 --- /dev/null +++ b/common/glm/doc/api/search/files_9.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/files_9.js b/common/glm/doc/api/search/files_9.js new file mode 100644 index 000000000..3723ce464 --- /dev/null +++ b/common/glm/doc/api/search/files_9.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['log_5fbase_2ehpp',['log_base.hpp',['../a00512.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/files_a.html b/common/glm/doc/api/search/files_a.html new file mode 100644 index 000000000..f7402215c --- /dev/null +++ b/common/glm/doc/api/search/files_a.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/files_a.js b/common/glm/doc/api/search/files_a.js new file mode 100644 index 000000000..715ff7d48 --- /dev/null +++ b/common/glm/doc/api/search/files_a.js @@ -0,0 +1,63 @@ +var searchData= +[ + ['mat2x2_2ehpp',['mat2x2.hpp',['../a00617.html',1,'']]], + ['mat2x3_2ehpp',['mat2x3.hpp',['../a00620.html',1,'']]], + ['mat2x4_2ehpp',['mat2x4.hpp',['../a00623.html',1,'']]], + ['mat3x2_2ehpp',['mat3x2.hpp',['../a00626.html',1,'']]], + ['mat3x3_2ehpp',['mat3x3.hpp',['../a00629.html',1,'']]], + ['mat3x4_2ehpp',['mat3x4.hpp',['../a00632.html',1,'']]], + ['mat4x2_2ehpp',['mat4x2.hpp',['../a00635.html',1,'']]], + ['mat4x3_2ehpp',['mat4x3.hpp',['../a00638.html',1,'']]], + ['mat4x4_2ehpp',['mat4x4.hpp',['../a00641.html',1,'']]], + ['matrix_2ehpp',['matrix.hpp',['../a00644.html',1,'']]], + ['matrix_5faccess_2ehpp',['matrix_access.hpp',['../a00404.html',1,'']]], + ['matrix_5fclip_5fspace_2ehpp',['matrix_clip_space.hpp',['../a00083.html',1,'']]], + ['matrix_5fcross_5fproduct_2ehpp',['matrix_cross_product.hpp',['../a00515.html',1,'']]], + ['matrix_5fdecompose_2ehpp',['matrix_decompose.hpp',['../a00518.html',1,'']]], + ['matrix_5fdouble2x2_2ehpp',['matrix_double2x2.hpp',['../a00086.html',1,'']]], + ['matrix_5fdouble2x2_5fprecision_2ehpp',['matrix_double2x2_precision.hpp',['../a00089.html',1,'']]], + ['matrix_5fdouble2x3_2ehpp',['matrix_double2x3.hpp',['../a00092.html',1,'']]], + ['matrix_5fdouble2x3_5fprecision_2ehpp',['matrix_double2x3_precision.hpp',['../a00095.html',1,'']]], + ['matrix_5fdouble2x4_2ehpp',['matrix_double2x4.hpp',['../a00098.html',1,'']]], + ['matrix_5fdouble2x4_5fprecision_2ehpp',['matrix_double2x4_precision.hpp',['../a00101.html',1,'']]], + ['matrix_5fdouble3x2_2ehpp',['matrix_double3x2.hpp',['../a00104.html',1,'']]], + ['matrix_5fdouble3x2_5fprecision_2ehpp',['matrix_double3x2_precision.hpp',['../a00107.html',1,'']]], + ['matrix_5fdouble3x3_2ehpp',['matrix_double3x3.hpp',['../a00110.html',1,'']]], + ['matrix_5fdouble3x3_5fprecision_2ehpp',['matrix_double3x3_precision.hpp',['../a00113.html',1,'']]], + ['matrix_5fdouble3x4_2ehpp',['matrix_double3x4.hpp',['../a00116.html',1,'']]], + ['matrix_5fdouble3x4_5fprecision_2ehpp',['matrix_double3x4_precision.hpp',['../a00119.html',1,'']]], + ['matrix_5fdouble4x2_2ehpp',['matrix_double4x2.hpp',['../a00122.html',1,'']]], + ['matrix_5fdouble4x2_5fprecision_2ehpp',['matrix_double4x2_precision.hpp',['../a00125.html',1,'']]], + ['matrix_5fdouble4x3_2ehpp',['matrix_double4x3.hpp',['../a00128.html',1,'']]], + ['matrix_5fdouble4x3_5fprecision_2ehpp',['matrix_double4x3_precision.hpp',['../a00131.html',1,'']]], + ['matrix_5fdouble4x4_2ehpp',['matrix_double4x4.hpp',['../a00134.html',1,'']]], + ['matrix_5fdouble4x4_5fprecision_2ehpp',['matrix_double4x4_precision.hpp',['../a00137.html',1,'']]], + ['matrix_5ffactorisation_2ehpp',['matrix_factorisation.hpp',['../a00521.html',1,'']]], + ['matrix_5ffloat2x2_2ehpp',['matrix_float2x2.hpp',['../a00140.html',1,'']]], + ['matrix_5ffloat2x2_5fprecision_2ehpp',['matrix_float2x2_precision.hpp',['../a00143.html',1,'']]], + ['matrix_5ffloat2x3_2ehpp',['matrix_float2x3.hpp',['../a00146.html',1,'']]], + ['matrix_5ffloat2x3_5fprecision_2ehpp',['matrix_float2x3_precision.hpp',['../a00149.html',1,'']]], + ['matrix_5ffloat2x4_2ehpp',['matrix_float2x4.hpp',['../a00152.html',1,'']]], + ['matrix_5ffloat2x4_5fprecision_2ehpp',['matrix_float2x4_precision.hpp',['../a00155.html',1,'']]], + ['matrix_5ffloat3x2_2ehpp',['matrix_float3x2.hpp',['../a00158.html',1,'']]], + ['matrix_5ffloat3x2_5fprecision_2ehpp',['matrix_float3x2_precision.hpp',['../a00161.html',1,'']]], + ['matrix_5ffloat3x3_2ehpp',['matrix_float3x3.hpp',['../a00164.html',1,'']]], + ['matrix_5ffloat3x3_5fprecision_2ehpp',['matrix_float3x3_precision.hpp',['../a00167.html',1,'']]], + ['matrix_5ffloat3x4_2ehpp',['matrix_float3x4.hpp',['../a00170.html',1,'']]], + ['matrix_5ffloat3x4_5fprecision_2ehpp',['matrix_float3x4_precision.hpp',['../a00173.html',1,'']]], + ['matrix_5ffloat4x2_2ehpp',['matrix_float4x2.hpp',['../a00176.html',1,'']]], + ['matrix_5ffloat4x3_2ehpp',['matrix_float4x3.hpp',['../a00182.html',1,'']]], + ['matrix_5ffloat4x3_5fprecision_2ehpp',['matrix_float4x3_precision.hpp',['../a00185.html',1,'']]], + ['matrix_5ffloat4x4_2ehpp',['matrix_float4x4.hpp',['../a00188.html',1,'']]], + ['matrix_5ffloat4x4_5fprecision_2ehpp',['matrix_float4x4_precision.hpp',['../a00191.html',1,'']]], + ['matrix_5finteger_2ehpp',['matrix_integer.hpp',['../a00407.html',1,'']]], + ['matrix_5finterpolation_2ehpp',['matrix_interpolation.hpp',['../a00524.html',1,'']]], + ['matrix_5finverse_2ehpp',['matrix_inverse.hpp',['../a00410.html',1,'']]], + ['matrix_5fmajor_5fstorage_2ehpp',['matrix_major_storage.hpp',['../a00527.html',1,'']]], + ['matrix_5foperation_2ehpp',['matrix_operation.hpp',['../a00530.html',1,'']]], + ['matrix_5fprojection_2ehpp',['matrix_projection.hpp',['../a00194.html',1,'']]], + ['matrix_5fquery_2ehpp',['matrix_query.hpp',['../a00533.html',1,'']]], + ['matrix_5frelational_2ehpp',['matrix_relational.hpp',['../a00197.html',1,'']]], + ['matrix_5ftransform_5f2d_2ehpp',['matrix_transform_2d.hpp',['../a00536.html',1,'']]], + ['mixed_5fproduct_2ehpp',['mixed_product.hpp',['../a00539.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/files_b.html b/common/glm/doc/api/search/files_b.html new file mode 100644 index 000000000..7be100307 --- /dev/null +++ b/common/glm/doc/api/search/files_b.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/files_b.js b/common/glm/doc/api/search/files_b.js new file mode 100644 index 000000000..45f58e231 --- /dev/null +++ b/common/glm/doc/api/search/files_b.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['noise_2ehpp',['noise.hpp',['../a00413.html',1,'']]], + ['norm_2ehpp',['norm.hpp',['../a00542.html',1,'']]], + ['normal_2ehpp',['normal.hpp',['../a00545.html',1,'']]], + ['normalize_5fdot_2ehpp',['normalize_dot.hpp',['../a00548.html',1,'']]], + ['number_5fprecision_2ehpp',['number_precision.hpp',['../a00551.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/files_c.html b/common/glm/doc/api/search/files_c.html new file mode 100644 index 000000000..c769b49bd --- /dev/null +++ b/common/glm/doc/api/search/files_c.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/files_c.js b/common/glm/doc/api/search/files_c.js new file mode 100644 index 000000000..c16609771 --- /dev/null +++ b/common/glm/doc/api/search/files_c.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['optimum_5fpow_2ehpp',['optimum_pow.hpp',['../a00554.html',1,'']]], + ['orthonormalize_2ehpp',['orthonormalize.hpp',['../a00557.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/files_d.html b/common/glm/doc/api/search/files_d.html new file mode 100644 index 000000000..54e39775b --- /dev/null +++ b/common/glm/doc/api/search/files_d.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/files_d.js b/common/glm/doc/api/search/files_d.js new file mode 100644 index 000000000..173d6b63d --- /dev/null +++ b/common/glm/doc/api/search/files_d.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['packing_2ehpp',['packing.hpp',['../a00416.html',1,'']]], + ['perpendicular_2ehpp',['perpendicular.hpp',['../a00560.html',1,'']]], + ['polar_5fcoordinates_2ehpp',['polar_coordinates.hpp',['../a00563.html',1,'']]], + ['projection_2ehpp',['projection.hpp',['../a00566.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/files_e.html b/common/glm/doc/api/search/files_e.html new file mode 100644 index 000000000..febb54941 --- /dev/null +++ b/common/glm/doc/api/search/files_e.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/files_e.js b/common/glm/doc/api/search/files_e.js new file mode 100644 index 000000000..6c67c52d8 --- /dev/null +++ b/common/glm/doc/api/search/files_e.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['quaternion_5fcommon_2ehpp',['quaternion_common.hpp',['../a00203.html',1,'']]], + ['quaternion_5fdouble_2ehpp',['quaternion_double.hpp',['../a00206.html',1,'']]], + ['quaternion_5fdouble_5fprecision_2ehpp',['quaternion_double_precision.hpp',['../a00209.html',1,'']]], + ['quaternion_5fexponential_2ehpp',['quaternion_exponential.hpp',['../a00212.html',1,'']]], + ['quaternion_5ffloat_2ehpp',['quaternion_float.hpp',['../a00215.html',1,'']]], + ['quaternion_5ffloat_5fprecision_2ehpp',['quaternion_float_precision.hpp',['../a00218.html',1,'']]], + ['quaternion_5fgeometric_2ehpp',['quaternion_geometric.hpp',['../a00221.html',1,'']]], + ['quaternion_5frelational_2ehpp',['quaternion_relational.hpp',['../a00224.html',1,'']]], + ['quaternion_5ftransform_2ehpp',['quaternion_transform.hpp',['../a00227.html',1,'']]], + ['quaternion_5ftrigonometric_2ehpp',['quaternion_trigonometric.hpp',['../a00230.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/files_f.html b/common/glm/doc/api/search/files_f.html new file mode 100644 index 000000000..30cd09be2 --- /dev/null +++ b/common/glm/doc/api/search/files_f.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/files_f.js b/common/glm/doc/api/search/files_f.js new file mode 100644 index 000000000..11ed9f940 --- /dev/null +++ b/common/glm/doc/api/search/files_f.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['random_2ehpp',['random.hpp',['../a00422.html',1,'']]], + ['range_2ehpp',['range.hpp',['../a00569.html',1,'']]], + ['raw_5fdata_2ehpp',['raw_data.hpp',['../a00572.html',1,'']]], + ['reciprocal_2ehpp',['reciprocal.hpp',['../a00425.html',1,'']]], + ['rotate_5fnormalized_5faxis_2ehpp',['rotate_normalized_axis.hpp',['../a00575.html',1,'']]], + ['rotate_5fvector_2ehpp',['rotate_vector.hpp',['../a00578.html',1,'']]], + ['round_2ehpp',['round.hpp',['../a00428.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/functions_0.html b/common/glm/doc/api/search/functions_0.html new file mode 100644 index 000000000..0539c8ced --- /dev/null +++ b/common/glm/doc/api/search/functions_0.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/functions_0.js b/common/glm/doc/api/search/functions_0.js new file mode 100644 index 000000000..ded0d3274 --- /dev/null +++ b/common/glm/doc/api/search/functions_0.js @@ -0,0 +1,30 @@ +var searchData= +[ + ['abs',['abs',['../a00662.html#ga439e60a72eadecfeda2df5449c613a64',1,'glm::abs(genType x)'],['../a00662.html#ga81d3abddd0ef0c8de579bc541ecadab6',1,'glm::abs(vec< L, T, Q > const &x)']]], + ['acos',['acos',['../a00790.html#gacc9b092df8257c68f19c9053703e2563',1,'glm']]], + ['acosh',['acosh',['../a00790.html#ga858f35dc66fd2688f20c52b5f25be76a',1,'glm']]], + ['acot',['acot',['../a00718.html#gaeadfb9c9d71093f7865b2ba2ca8d104d',1,'glm']]], + ['acoth',['acoth',['../a00718.html#gafaca98a7100170db8841f446282debfa',1,'glm']]], + ['acsc',['acsc',['../a00718.html#ga1b4bed91476b9b915e76b4a30236d330',1,'glm']]], + ['acsch',['acsch',['../a00718.html#ga4b50aa5e5afc7e19ec113ab91596c576',1,'glm']]], + ['affineinverse',['affineInverse',['../a00713.html#gae0fcc5fc8783291f9702272de428fa0e',1,'glm']]], + ['all',['all',['../a00791.html#ga87e53f50b679f5f95c5cb4780311b3dd',1,'glm']]], + ['angle',['angle',['../a00678.html#ga8aa248b31d5ade470c87304df5eb7bd8',1,'glm::angle(qua< T, Q > const &x)'],['../a00784.html#ga2e2917b4cb75ca3d043ac15ff88f14e1',1,'glm::angle(vec< L, T, Q > const &x, vec< L, T, Q > const &y)']]], + ['angleaxis',['angleAxis',['../a00678.html#ga5c0095cfcb218c75a4b79d7687950036',1,'glm']]], + ['any',['any',['../a00791.html#ga911b3f8e41459dd551ccb6d385d91061',1,'glm']]], + ['arecollinear',['areCollinear',['../a00785.html#ga13da4a787a2ff70e95d561fb19ff91b4',1,'glm']]], + ['areorthogonal',['areOrthogonal',['../a00785.html#gac7b95b3f798e3c293262b2bdaad47c57',1,'glm']]], + ['areorthonormal',['areOrthonormal',['../a00785.html#ga1b091c3d7f9ee3b0708311c001c293e3',1,'glm']]], + ['asec',['asec',['../a00718.html#ga2c5b7f962c2c9ff684e6d2de48db1f10',1,'glm']]], + ['asech',['asech',['../a00718.html#gaec7586dccfe431f850d006f3824b8ca6',1,'glm']]], + ['asin',['asin',['../a00790.html#ga0552d2df4865fa8c3d7cfc3ec2caac73',1,'glm']]], + ['asinh',['asinh',['../a00790.html#ga3ef16b501ee859fddde88e22192a5950',1,'glm']]], + ['associatedmax',['associatedMax',['../a00725.html#ga7d9c8785230c8db60f72ec8975f1ba45',1,'glm::associatedMax(T x, U a, T y, U b)'],['../a00725.html#ga5c6758bc50aa7fbe700f87123a045aad',1,'glm::associatedMax(vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b)'],['../a00725.html#ga0d169d6ce26b03248df175f39005d77f',1,'glm::associatedMax(T x, vec< L, U, Q > const &a, T y, vec< L, U, Q > const &b)'],['../a00725.html#ga4086269afabcb81dd7ded33cb3448653',1,'glm::associatedMax(vec< L, T, Q > const &x, U a, vec< L, T, Q > const &y, U b)'],['../a00725.html#gaec891e363d91abbf3a4443cf2f652209',1,'glm::associatedMax(T x, U a, T y, U b, T z, U c)'],['../a00725.html#gab84fdc35016a31e8cd0cbb8296bddf7c',1,'glm::associatedMax(vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b, vec< L, T, Q > const &z, vec< L, U, Q > const &c)'],['../a00725.html#gadd2a2002f4f2144bbc39eb2336dd2fba',1,'glm::associatedMax(T x, vec< L, U, Q > const &a, T y, vec< L, U, Q > const &b, T z, vec< L, U, Q > const &c)'],['../a00725.html#ga19f59d1141a51a3b2108a9807af78f7f',1,'glm::associatedMax(vec< L, T, Q > const &x, U a, vec< L, T, Q > const &y, U b, vec< L, T, Q > const &z, U c)'],['../a00725.html#ga3038ffcb43eaa6af75897a99a5047ccc',1,'glm::associatedMax(T x, U a, T y, U b, T z, U c, T w, U d)'],['../a00725.html#gaf5ab0c428f8d1cd9e3b45fcfbf6423a6',1,'glm::associatedMax(vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b, vec< L, T, Q > const &z, vec< L, U, Q > const &c, vec< L, T, Q > const &w, vec< L, U, Q > const &d)'],['../a00725.html#ga11477c2c4b5b0bfd1b72b29df3725a9d',1,'glm::associatedMax(T x, vec< L, U, Q > const &a, T y, vec< L, U, Q > const &b, T z, vec< L, U, Q > const &c, T w, vec< L, U, Q > const &d)'],['../a00725.html#gab9c3dd74cac899d2c625b5767ea3b3fb',1,'glm::associatedMax(vec< L, T, Q > const &x, U a, vec< L, T, Q > const &y, U b, vec< L, T, Q > const &z, U c, vec< L, T, Q > const &w, U d)']]], + ['associatedmin',['associatedMin',['../a00725.html#gacc01bd272359572fc28437ae214a02df',1,'glm::associatedMin(T x, U a, T y, U b)'],['../a00725.html#gac2f0dff90948f2e44386a5eafd941d1c',1,'glm::associatedMin(vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b)'],['../a00725.html#gacfec519c820331d023ef53a511749319',1,'glm::associatedMin(T x, const vec< L, U, Q > &a, T y, const vec< L, U, Q > &b)'],['../a00725.html#ga4757c7cab2d809124a8525d0a9deeb37',1,'glm::associatedMin(vec< L, T, Q > const &x, U a, vec< L, T, Q > const &y, U b)'],['../a00725.html#gad0aa8f86259a26d839d34a3577a923fc',1,'glm::associatedMin(T x, U a, T y, U b, T z, U c)'],['../a00725.html#ga723e5411cebc7ffbd5c81ffeec61127d',1,'glm::associatedMin(vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b, vec< L, T, Q > const &z, vec< L, U, Q > const &c)'],['../a00725.html#ga432224ebe2085eaa2b63a077ecbbbff6',1,'glm::associatedMin(T x, U a, T y, U b, T z, U c, T w, U d)'],['../a00725.html#ga66b08118bc88f0494bcacb7cdb940556',1,'glm::associatedMin(vec< L, T, Q > const &x, vec< L, U, Q > const &a, vec< L, T, Q > const &y, vec< L, U, Q > const &b, vec< L, T, Q > const &z, vec< L, U, Q > const &c, vec< L, T, Q > const &w, vec< L, U, Q > const &d)'],['../a00725.html#ga78c28fde1a7080fb7420bd88e68c6c68',1,'glm::associatedMin(T x, vec< L, U, Q > const &a, T y, vec< L, U, Q > const &b, T z, vec< L, U, Q > const &c, T w, vec< L, U, Q > const &d)'],['../a00725.html#ga2db7e351994baee78540a562d4bb6d3b',1,'glm::associatedMin(vec< L, T, Q > const &x, U a, vec< L, T, Q > const &y, U b, vec< L, T, Q > const &z, U c, vec< L, T, Q > const &w, U d)']]], + ['atan',['atan',['../a00790.html#gac61629f3a4aa14057e7a8cae002291db',1,'glm::atan(vec< L, T, Q > const &y, vec< L, T, Q > const &x)'],['../a00790.html#ga5229f087eaccbc466f1c609ce3107b95',1,'glm::atan(vec< L, T, Q > const &y_over_x)']]], + ['atan2',['atan2',['../a00732.html#gac63011205bf6d0be82589dc56dd26708',1,'glm::atan2(T x, T y)'],['../a00732.html#ga83bc41bd6f89113ee8006576b12bfc50',1,'glm::atan2(const vec< 2, T, Q > &x, const vec< 2, T, Q > &y)'],['../a00732.html#gac39314f5087e7e51e592897cabbc1927',1,'glm::atan2(const vec< 3, T, Q > &x, const vec< 3, T, Q > &y)'],['../a00732.html#gaba86c28da7bf5bdac64fecf7d56e8ff3',1,'glm::atan2(const vec< 4, T, Q > &x, const vec< 4, T, Q > &y)']]], + ['atanh',['atanh',['../a00790.html#gabc925650e618357d07da255531658b87',1,'glm']]], + ['axis',['axis',['../a00678.html#ga764254f10248b505e936e5309a88c23d',1,'glm']]], + ['axisangle',['axisAngle',['../a00754.html#gafefe32ce5a90a135287ba34fac3623bc',1,'glm']]], + ['axisanglematrix',['axisAngleMatrix',['../a00754.html#ga3a788e2f5223397df5c426413ecc2f6b',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/functions_1.html b/common/glm/doc/api/search/functions_1.html new file mode 100644 index 000000000..4878b3d12 --- /dev/null +++ b/common/glm/doc/api/search/functions_1.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/functions_1.js b/common/glm/doc/api/search/functions_1.js new file mode 100644 index 000000000..732fd9422 --- /dev/null +++ b/common/glm/doc/api/search/functions_1.js @@ -0,0 +1,20 @@ +var searchData= +[ + ['backeasein',['backEaseIn',['../a00735.html#ga93cddcdb6347a44d5927cc2bf2570816',1,'glm::backEaseIn(genType const &a)'],['../a00735.html#ga33777c9dd98f61d9472f96aafdf2bd36',1,'glm::backEaseIn(genType const &a, genType const &o)']]], + ['backeaseinout',['backEaseInOut',['../a00735.html#gace6d24722a2f6722b56398206eb810bb',1,'glm::backEaseInOut(genType const &a)'],['../a00735.html#ga68a7b760f2afdfab298d5cd6d7611fb1',1,'glm::backEaseInOut(genType const &a, genType const &o)']]], + ['backeaseout',['backEaseOut',['../a00735.html#gabf25069fa906413c858fd46903d520b9',1,'glm::backEaseOut(genType const &a)'],['../a00735.html#ga640c1ac6fe9d277a197da69daf60ee4f',1,'glm::backEaseOut(genType const &a, genType const &o)']]], + ['ballrand',['ballRand',['../a00717.html#ga7c53b7797f3147af68a11c767679fa3f',1,'glm']]], + ['bitcount',['bitCount',['../a00787.html#ga44abfe3379e11cbd29425a843420d0d6',1,'glm::bitCount(genType v)'],['../a00787.html#gaac7b15e40bdea8d9aa4c4cb34049f7b5',1,'glm::bitCount(vec< L, T, Q > const &v)']]], + ['bitfielddeinterleave',['bitfieldDeinterleave',['../a00706.html#ga091d934233a2e121df91b8c7230357c8',1,'glm::bitfieldDeinterleave(glm::uint16 x)'],['../a00706.html#ga7d1cc24dfbcdd932c3a2abbb76235f98',1,'glm::bitfieldDeinterleave(glm::uint32 x)'],['../a00706.html#ga8dbb8c87092f33bd815dd8a840be5d60',1,'glm::bitfieldDeinterleave(glm::uint64 x)']]], + ['bitfieldextract',['bitfieldExtract',['../a00787.html#ga346b25ab11e793e91a4a69c8aa6819f2',1,'glm']]], + ['bitfieldfillone',['bitfieldFillOne',['../a00706.html#ga46f9295abe3b5c7658f5b13c7f819f0a',1,'glm::bitfieldFillOne(genIUType Value, int FirstBit, int BitCount)'],['../a00706.html#ga3e96dd1f0a4bc892f063251ed118c0c1',1,'glm::bitfieldFillOne(vec< L, T, Q > const &Value, int FirstBit, int BitCount)']]], + ['bitfieldfillzero',['bitfieldFillZero',['../a00706.html#ga697b86998b7d74ee0a69d8e9f8819fee',1,'glm::bitfieldFillZero(genIUType Value, int FirstBit, int BitCount)'],['../a00706.html#ga0d16c9acef4be79ea9b47c082a0cf7c2',1,'glm::bitfieldFillZero(vec< L, T, Q > const &Value, int FirstBit, int BitCount)']]], + ['bitfieldinsert',['bitfieldInsert',['../a00787.html#ga2e82992340d421fadb61a473df699b20',1,'glm']]], + ['bitfieldinterleave',['bitfieldInterleave',['../a00706.html#ga24cad0069f9a0450abd80b3e89501adf',1,'glm::bitfieldInterleave(int8 x, int8 y)'],['../a00706.html#ga9a4976a529aec2cee56525e1165da484',1,'glm::bitfieldInterleave(uint8 x, uint8 y)'],['../a00706.html#ga4a76bbca39c40153f3203d0a1926e142',1,'glm::bitfieldInterleave(u8vec2 const &v)'],['../a00706.html#gac51c33a394593f0631fa3aa5bb778809',1,'glm::bitfieldInterleave(int16 x, int16 y)'],['../a00706.html#ga94f3646a5667f4be56f8dcf3310e963f',1,'glm::bitfieldInterleave(uint16 x, uint16 y)'],['../a00706.html#ga406c4ee56af4ca37a73f449f154eca3e',1,'glm::bitfieldInterleave(u16vec2 const &v)'],['../a00706.html#gaebb756a24a0784e3d6fba8bd011ab77a',1,'glm::bitfieldInterleave(int32 x, int32 y)'],['../a00706.html#ga2f1e2b3fe699e7d897ae38b2115ddcbd',1,'glm::bitfieldInterleave(uint32 x, uint32 y)'],['../a00706.html#ga8cb17574d60abd6ade84bc57c10e8f78',1,'glm::bitfieldInterleave(u32vec2 const &v)'],['../a00706.html#ga8fdb724dccd4a07d57efc01147102137',1,'glm::bitfieldInterleave(int8 x, int8 y, int8 z)'],['../a00706.html#ga9fc2a0dd5dcf8b00e113f272a5feca93',1,'glm::bitfieldInterleave(uint8 x, uint8 y, uint8 z)'],['../a00706.html#gaa901c36a842fa5d126ea650549f17b24',1,'glm::bitfieldInterleave(int16 x, int16 y, int16 z)'],['../a00706.html#ga3afd6d38881fe3948c53d4214d2197fd',1,'glm::bitfieldInterleave(uint16 x, uint16 y, uint16 z)'],['../a00706.html#gad2075d96a6640121edaa98ea534102ca',1,'glm::bitfieldInterleave(int32 x, int32 y, int32 z)'],['../a00706.html#gab19fbc739fc0cf7247978602c36f7da8',1,'glm::bitfieldInterleave(uint32 x, uint32 y, uint32 z)'],['../a00706.html#ga8a44ae22f5c953b296c42d067dccbe6d',1,'glm::bitfieldInterleave(int8 x, int8 y, int8 z, int8 w)'],['../a00706.html#ga14bb274d54a3c26f4919dd7ed0dd0c36',1,'glm::bitfieldInterleave(uint8 x, uint8 y, uint8 z, uint8 w)'],['../a00706.html#ga180a63161e1319fbd5a53c84d0429c7a',1,'glm::bitfieldInterleave(int16 x, int16 y, int16 z, int16 w)'],['../a00706.html#gafca8768671a14c8016facccb66a89f26',1,'glm::bitfieldInterleave(uint16 x, uint16 y, uint16 z, uint16 w)']]], + ['bitfieldreverse',['bitfieldReverse',['../a00787.html#ga750a1d92464489b7711dee67aa3441b6',1,'glm']]], + ['bitfieldrotateleft',['bitfieldRotateLeft',['../a00706.html#ga2eb49678a344ce1495bdb5586d9896b9',1,'glm::bitfieldRotateLeft(genIUType In, int Shift)'],['../a00706.html#gae186317091b1a39214ebf79008d44a1e',1,'glm::bitfieldRotateLeft(vec< L, T, Q > const &In, int Shift)']]], + ['bitfieldrotateright',['bitfieldRotateRight',['../a00706.html#ga1c33d075c5fb8bd8dbfd5092bfc851ca',1,'glm::bitfieldRotateRight(genIUType In, int Shift)'],['../a00706.html#ga590488e1fc00a6cfe5d3bcaf93fbfe88',1,'glm::bitfieldRotateRight(vec< L, T, Q > const &In, int Shift)']]], + ['bounceeasein',['bounceEaseIn',['../a00735.html#gaac30767f2e430b0c3fc859a4d59c7b5b',1,'glm']]], + ['bounceeaseinout',['bounceEaseInOut',['../a00735.html#gadf9f38eff1e5f4c2fa5b629a25ae413e',1,'glm']]], + ['bounceeaseout',['bounceEaseOut',['../a00735.html#ga94007005ff0dcfa0749ebfa2aec540b2',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/functions_10.html b/common/glm/doc/api/search/functions_10.html new file mode 100644 index 000000000..6f6fbae23 --- /dev/null +++ b/common/glm/doc/api/search/functions_10.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/functions_10.js b/common/glm/doc/api/search/functions_10.js new file mode 100644 index 000000000..63deebf6e --- /dev/null +++ b/common/glm/doc/api/search/functions_10.js @@ -0,0 +1,30 @@ +var searchData= +[ + ['saturate',['saturate',['../a00732.html#ga0fd09e616d122bc2ed9726682ffd44b7',1,'glm::saturate(T x)'],['../a00732.html#gaee97b8001c794a78a44f5d59f62a8aba',1,'glm::saturate(const vec< 2, T, Q > &x)'],['../a00732.html#ga39bfe3a421286ee31680d45c31ccc161',1,'glm::saturate(const vec< 3, T, Q > &x)'],['../a00732.html#ga356f8c3a7e7d6376d3d4b0a026407183',1,'glm::saturate(const vec< 4, T, Q > &x)']]], + ['saturation',['saturation',['../a00729.html#ga01a97152b44e1550edcac60bd849e884',1,'glm::saturation(T const s)'],['../a00729.html#ga2156cea600e90148ece5bc96fd6db43a',1,'glm::saturation(T const s, vec< 3, T, Q > const &color)'],['../a00729.html#gaba0eacee0736dae860e9371cc1ae4785',1,'glm::saturation(T const s, vec< 4, T, Q > const &color)']]], + ['scale',['scale',['../a00668.html#ga05051adbee603fb3c5095d8cf5cc229b',1,'glm::scale(mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &v)'],['../a00758.html#gadb47d2ad2bd984b213e8ff7d9cd8154e',1,'glm::scale(mat< 3, 3, T, Q > const &m, vec< 2, T, Q > const &v)'],['../a00779.html#gafbeefee8fec884d566e4ada0049174d7',1,'glm::scale(vec< 3, T, Q > const &v)']]], + ['scalebias',['scaleBias',['../a00780.html#gabf249498b236e62c983d90d30d63c99c',1,'glm::scaleBias(T scale, T bias)'],['../a00780.html#gae2bdd91a76759fecfbaef97e3020aa8e',1,'glm::scaleBias(mat< 4, 4, T, Q > const &m, T scale, T bias)']]], + ['sec',['sec',['../a00718.html#gae4bcbebee670c5ea155f0777b3acbd84',1,'glm']]], + ['sech',['sech',['../a00718.html#ga9a5cfd1e7170104a7b33863b1b75e5ae',1,'glm']]], + ['shearx',['shearX',['../a00758.html#ga2a118ece5db1e2022112b954846012af',1,'glm']]], + ['shearx2d',['shearX2D',['../a00780.html#gabf714b8a358181572b32a45555f71948',1,'glm']]], + ['shearx3d',['shearX3D',['../a00780.html#ga73e867c6cd4d700fe2054437e56106c4',1,'glm']]], + ['sheary',['shearY',['../a00758.html#ga717f1833369c1ac4a40e4ac015af885e',1,'glm']]], + ['sheary2d',['shearY2D',['../a00780.html#gac7998d0763d9181550c77e8af09a182c',1,'glm']]], + ['sheary3d',['shearY3D',['../a00780.html#gade5bb65ffcb513973db1a1314fb5cfac',1,'glm']]], + ['shearz3d',['shearZ3D',['../a00780.html#ga6591e0a3a9d2c9c0b6577bb4dace0255',1,'glm']]], + ['shortmix',['shortMix',['../a00769.html#gadc576cc957adc2a568cdcbc3799175bc',1,'glm']]], + ['sign',['sign',['../a00662.html#ga1e2e5cfff800056540e32f6c9b604b28',1,'glm::sign(vec< L, T, Q > const &x)'],['../a00750.html#ga04ef803a24f3d4f8c67dbccb33b0fce0',1,'glm::sign(vec< L, T, Q > const &x, vec< L, T, Q > const &base)']]], + ['simplex',['simplex',['../a00715.html#ga8122468c69015ff397349a7dcc638b27',1,'glm']]], + ['sin',['sin',['../a00790.html#ga29747fd108cb7292ae5a284f69691a69',1,'glm']]], + ['sineeasein',['sineEaseIn',['../a00735.html#gafb338ac6f6b2bcafee50e3dca5201dbf',1,'glm']]], + ['sineeaseinout',['sineEaseInOut',['../a00735.html#gaa46e3d5fbf7a15caa28eff9ef192d7c7',1,'glm']]], + ['sineeaseout',['sineEaseOut',['../a00735.html#gab3e454f883afc1606ef91363881bf5a3',1,'glm']]], + ['sinh',['sinh',['../a00790.html#gac7c39ff21809e281552b4dbe46f4a39d',1,'glm']]], + ['slerp',['slerp',['../a00669.html#gae7fc3c945be366b9942b842f55da428a',1,'glm::slerp(qua< T, Q > const &x, qua< T, Q > const &y, T a)'],['../a00773.html#ga8b11b18ce824174ea1a5a69ea14e2cee',1,'glm::slerp(vec< 3, T, Q > const &x, vec< 3, T, Q > const &y, T const &a)']]], + ['smoothstep',['smoothstep',['../a00662.html#ga562edf7eca082cc5b7a0aaf180436daf',1,'glm']]], + ['sphericalrand',['sphericalRand',['../a00717.html#ga22f90fcaccdf001c516ca90f6428e138',1,'glm']]], + ['sqrt',['sqrt',['../a00664.html#gaa83e5f1648b7ccdf33b87c07c76cb77c',1,'glm::sqrt(vec< L, T, Q > const &v)'],['../a00677.html#ga64b7b255ed7bcba616fe6b44470b022e',1,'glm::sqrt(qua< T, Q > const &q)'],['../a00747.html#ga7ce36693a75879ccd9bb10167cfa722d',1,'glm::sqrt(int x)'],['../a00747.html#ga1975d318978d6dacf78b6444fa5ed7bc',1,'glm::sqrt(uint x)']]], + ['squad',['squad',['../a00769.html#ga0b9bf3459e132ad8a18fe970669e3e35',1,'glm']]], + ['step',['step',['../a00662.html#ga015a1261ff23e12650211aa872863cce',1,'glm::step(genType edge, genType x)'],['../a00662.html#ga8f9a911a48ef244b51654eaefc81c551',1,'glm::step(T edge, vec< L, T, Q > const &x)'],['../a00662.html#gaf4a5fc81619c7d3e8b22f53d4a098c7f',1,'glm::step(vec< L, T, Q > const &edge, vec< L, T, Q > const &x)']]] +]; diff --git a/common/glm/doc/api/search/functions_11.html b/common/glm/doc/api/search/functions_11.html new file mode 100644 index 000000000..dd88d8b7e --- /dev/null +++ b/common/glm/doc/api/search/functions_11.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/functions_11.js b/common/glm/doc/api/search/functions_11.js new file mode 100644 index 000000000..2a38fd8e3 --- /dev/null +++ b/common/glm/doc/api/search/functions_11.js @@ -0,0 +1,20 @@ +var searchData= +[ + ['tan',['tan',['../a00790.html#ga293a34cfb9f0115cc606b4a97c84f11f',1,'glm']]], + ['tanh',['tanh',['../a00790.html#gaa1bccbfdcbe40ed2ffcddc2aa8bfd0f1',1,'glm']]], + ['third',['third',['../a00708.html#ga3077c6311010a214b69ddc8214ec13b5',1,'glm']]], + ['three_5fover_5ftwo_5fpi',['three_over_two_pi',['../a00708.html#gae94950df74b0ce382b1fc1d978ef7394',1,'glm']]], + ['to_5fstring',['to_string',['../a00777.html#ga8f0dced1fd45e67e2d77e80ab93c7af5',1,'glm']]], + ['tomat3',['toMat3',['../a00769.html#gaab0afabb894b28a983fb8ec610409d56',1,'glm']]], + ['tomat4',['toMat4',['../a00769.html#gadfa2c77094e8cc9adad321d938855ffb',1,'glm']]], + ['toquat',['toQuat',['../a00769.html#ga798de5d186499c9a9231cd92c8afaef1',1,'glm::toQuat(mat< 3, 3, T, Q > const &x)'],['../a00769.html#ga5eb36f51e1638e710451eba194dbc011',1,'glm::toQuat(mat< 4, 4, T, Q > const &x)']]], + ['translate',['translate',['../a00668.html#ga1a4ecc4ad82652b8fb14dcb087879284',1,'glm::translate(mat< 4, 4, T, Q > const &m, vec< 3, T, Q > const &v)'],['../a00758.html#gaf4573ae47c80938aa9053ef6a33755ab',1,'glm::translate(mat< 3, 3, T, Q > const &m, vec< 2, T, Q > const &v)'],['../a00779.html#ga309a30e652e58c396e2c3d4db3ee7658',1,'glm::translate(vec< 3, T, Q > const &v)']]], + ['transpose',['transpose',['../a00788.html#gae679d841da8ce9dbcc6c2d454f15bc35',1,'glm']]], + ['trianglenormal',['triangleNormal',['../a00761.html#gaff1cb5496925dfa7962df457772a7f35',1,'glm']]], + ['trunc',['trunc',['../a00662.html#gaf9375e3e06173271d49e6ffa3a334259',1,'glm']]], + ['tweakedinfiniteperspective',['tweakedInfinitePerspective',['../a00665.html#gaaeacc04a2a6f4b18c5899d37e7bb3ef9',1,'glm::tweakedInfinitePerspective(T fovy, T aspect, T near)'],['../a00665.html#gaf5b3c85ff6737030a1d2214474ffa7a8',1,'glm::tweakedInfinitePerspective(T fovy, T aspect, T near, T ep)']]], + ['two_5fover_5fpi',['two_over_pi',['../a00708.html#ga74eadc8a211253079683219a3ea0462a',1,'glm']]], + ['two_5fover_5froot_5fpi',['two_over_root_pi',['../a00708.html#ga5827301817640843cf02026a8d493894',1,'glm']]], + ['two_5fpi',['two_pi',['../a00708.html#gaa5276a4617566abcfe49286f40e3a256',1,'glm']]], + ['two_5fthirds',['two_thirds',['../a00708.html#ga9b4d2f4322edcf63a6737b92a29dd1f5',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/functions_12.html b/common/glm/doc/api/search/functions_12.html new file mode 100644 index 000000000..7093d19fe --- /dev/null +++ b/common/glm/doc/api/search/functions_12.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/functions_12.js b/common/glm/doc/api/search/functions_12.js new file mode 100644 index 000000000..3a93f499e --- /dev/null +++ b/common/glm/doc/api/search/functions_12.js @@ -0,0 +1,52 @@ +var searchData= +[ + ['uaddcarry',['uaddCarry',['../a00787.html#gaedcec48743632dff6786bcc492074b1b',1,'glm']]], + ['uintbitstofloat',['uintBitsToFloat',['../a00662.html#gab2bae0d15dcdca6093f88f76b3975d97',1,'glm::uintBitsToFloat(uint const &v)'],['../a00662.html#ga97f46b5f7b42fe44482e13356eb394ae',1,'glm::uintBitsToFloat(vec< L, uint, Q > const &v)']]], + ['umulextended',['umulExtended',['../a00787.html#ga732e2fb56db57ea541c7e5c92b7121be',1,'glm']]], + ['unpackdouble2x32',['unpackDouble2x32',['../a00789.html#ga5f4296dc5f12f0aa67ac05b8bb322483',1,'glm']]], + ['unpackf2x11_5f1x10',['unpackF2x11_1x10',['../a00716.html#ga2b1fd1e854705b1345e98409e0a25e50',1,'glm']]], + ['unpackf3x9_5fe1x5',['unpackF3x9_E1x5',['../a00716.html#gab9e60ebe3ad3eeced6a9ec6eb876d74e',1,'glm']]], + ['unpackhalf',['unpackHalf',['../a00716.html#ga30d6b2f1806315bcd6047131f547d33b',1,'glm']]], + ['unpackhalf1x16',['unpackHalf1x16',['../a00716.html#gac37dedaba24b00adb4ec6e8f92c19dbf',1,'glm']]], + ['unpackhalf2x16',['unpackHalf2x16',['../a00789.html#gaf59b52e6b28da9335322c4ae19b5d745',1,'glm']]], + ['unpackhalf4x16',['unpackHalf4x16',['../a00716.html#ga57dfc41b2eb20b0ac00efae7d9c49dcd',1,'glm']]], + ['unpacki3x10_5f1x2',['unpackI3x10_1x2',['../a00716.html#ga9a05330e5490be0908d3b117d82aff56',1,'glm']]], + ['unpackint2x16',['unpackInt2x16',['../a00716.html#gaccde055882918a3175de82f4ca8b7d8e',1,'glm']]], + ['unpackint2x32',['unpackInt2x32',['../a00716.html#gab297c0bfd38433524791eb0584d8f08d',1,'glm']]], + ['unpackint2x8',['unpackInt2x8',['../a00716.html#gab0c59f1e259fca9e68adb2207a6b665e',1,'glm']]], + ['unpackint4x16',['unpackInt4x16',['../a00716.html#ga52c154a9b232b62c22517a700cc0c78c',1,'glm']]], + ['unpackint4x8',['unpackInt4x8',['../a00716.html#ga1cd8d2038cdd33a860801aa155a26221',1,'glm']]], + ['unpackrgbm',['unpackRGBM',['../a00716.html#ga5c1ec97894b05ea21a05aea4f0204a02',1,'glm']]], + ['unpacksnorm',['unpackSnorm',['../a00716.html#ga6d49b31e5c3f9df8e1f99ab62b999482',1,'glm']]], + ['unpacksnorm1x16',['unpackSnorm1x16',['../a00716.html#ga96dd15002370627a443c835ab03a766c',1,'glm']]], + ['unpacksnorm1x8',['unpackSnorm1x8',['../a00716.html#ga4851ff86678aa1c7ace9d67846894285',1,'glm']]], + ['unpacksnorm2x16',['unpackSnorm2x16',['../a00789.html#gacd8f8971a3fe28418be0d0fa1f786b38',1,'glm']]], + ['unpacksnorm2x8',['unpackSnorm2x8',['../a00716.html#ga8b128e89be449fc71336968a66bf6e1a',1,'glm']]], + ['unpacksnorm3x10_5f1x2',['unpackSnorm3x10_1x2',['../a00716.html#ga7a4fbf79be9740e3c57737bc2af05e5b',1,'glm']]], + ['unpacksnorm4x16',['unpackSnorm4x16',['../a00716.html#gaaddf9c353528fe896106f7181219c7f4',1,'glm']]], + ['unpacksnorm4x8',['unpackSnorm4x8',['../a00789.html#ga2db488646d48b7c43d3218954523fe82',1,'glm']]], + ['unpacku3x10_5f1x2',['unpackU3x10_1x2',['../a00716.html#ga48df3042a7d079767f5891a1bfd8a60a',1,'glm']]], + ['unpackuint2x16',['unpackUint2x16',['../a00716.html#ga035bbbeab7ec2b28c0529757395b645b',1,'glm']]], + ['unpackuint2x32',['unpackUint2x32',['../a00716.html#gaf942ff11b65e83eb5f77e68329ebc6ab',1,'glm']]], + ['unpackuint2x8',['unpackUint2x8',['../a00716.html#gaa7600a6c71784b637a410869d2a5adcd',1,'glm']]], + ['unpackuint4x16',['unpackUint4x16',['../a00716.html#gab173834ef14cfc23a96a959f3ff4b8dc',1,'glm']]], + ['unpackuint4x8',['unpackUint4x8',['../a00716.html#gaf6dc0e4341810a641c7ed08f10e335d1',1,'glm']]], + ['unpackunorm',['unpackUnorm',['../a00716.html#ga3e6ac9178b59f0b1b2f7599f2183eb7f',1,'glm']]], + ['unpackunorm1x16',['unpackUnorm1x16',['../a00716.html#ga83d34160a5cb7bcb5339823210fc7501',1,'glm']]], + ['unpackunorm1x5_5f1x6_5f1x5',['unpackUnorm1x5_1x6_1x5',['../a00716.html#gab3bc08ecfc0f3339be93fb2b3b56d88a',1,'glm']]], + ['unpackunorm1x8',['unpackUnorm1x8',['../a00716.html#ga1319207e30874fb4931a9ee913983ee1',1,'glm']]], + ['unpackunorm2x16',['unpackUnorm2x16',['../a00789.html#ga1f66188e5d65afeb9ffba1ad971e4007',1,'glm']]], + ['unpackunorm2x3_5f1x2',['unpackUnorm2x3_1x2',['../a00716.html#ga6abd5a9014df3b5ce4059008d2491260',1,'glm']]], + ['unpackunorm2x4',['unpackUnorm2x4',['../a00716.html#ga2e50476132fe5f27f08e273d9c70d85b',1,'glm']]], + ['unpackunorm2x8',['unpackUnorm2x8',['../a00716.html#ga637cbe3913dd95c6e7b4c99c61bd611f',1,'glm']]], + ['unpackunorm3x10_5f1x2',['unpackUnorm3x10_1x2',['../a00716.html#ga5156d3060355fe332865da2c7f78815f',1,'glm']]], + ['unpackunorm3x5_5f1x1',['unpackUnorm3x5_1x1',['../a00716.html#ga5ff95ff5bc16f396432ab67243dbae4d',1,'glm']]], + ['unpackunorm4x16',['unpackUnorm4x16',['../a00716.html#ga2ae149c5d2473ac1e5f347bb654a242d',1,'glm']]], + ['unpackunorm4x4',['unpackUnorm4x4',['../a00716.html#gac58ee89d0e224bb6df5e8bbb18843a2d',1,'glm']]], + ['unpackunorm4x8',['unpackUnorm4x8',['../a00789.html#ga7f903259150b67e9466f5f8edffcd197',1,'glm']]], + ['unproject',['unProject',['../a00666.html#ga36641e5d60f994e01c3d8f56b10263d2',1,'glm']]], + ['unprojectno',['unProjectNO',['../a00666.html#gae089ba9fc150ff69c252a20e508857b5',1,'glm']]], + ['unprojectzo',['unProjectZO',['../a00666.html#gade5136413ce530f8e606124d570fba32',1,'glm']]], + ['uround',['uround',['../a00710.html#ga6715b9d573972a0f7763d30d45bcaec4',1,'glm']]], + ['usubborrow',['usubBorrow',['../a00787.html#gae3316ba1229ad9b9f09480833321b053',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/functions_13.html b/common/glm/doc/api/search/functions_13.html new file mode 100644 index 000000000..051a1eb82 --- /dev/null +++ b/common/glm/doc/api/search/functions_13.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/functions_13.js b/common/glm/doc/api/search/functions_13.js new file mode 100644 index 000000000..4b53fa8a0 --- /dev/null +++ b/common/glm/doc/api/search/functions_13.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['value_5fptr',['value_ptr',['../a00722.html#ga1c64669e1ba1160ad9386e43dc57569a',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/functions_14.html b/common/glm/doc/api/search/functions_14.html new file mode 100644 index 000000000..d5fdbda44 --- /dev/null +++ b/common/glm/doc/api/search/functions_14.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/functions_14.js b/common/glm/doc/api/search/functions_14.js new file mode 100644 index 000000000..20cf1e270 --- /dev/null +++ b/common/glm/doc/api/search/functions_14.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['wrapangle',['wrapAngle',['../a00742.html#ga069527c6dbd64f53435b8ebc4878b473',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/functions_15.html b/common/glm/doc/api/search/functions_15.html new file mode 100644 index 000000000..546d13e65 --- /dev/null +++ b/common/glm/doc/api/search/functions_15.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/functions_15.js b/common/glm/doc/api/search/functions_15.js new file mode 100644 index 000000000..b97977c02 --- /dev/null +++ b/common/glm/doc/api/search/functions_15.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['yaw',['yaw',['../a00663.html#ga8da38cdfdc452dafa660c2f46506bad5',1,'glm']]], + ['yawpitchroll',['yawPitchRoll',['../a00736.html#gae6aa26ccb020d281b449619e419a609e',1,'glm']]], + ['ycocg2rgb',['YCoCg2rgb',['../a00730.html#ga163596b804c7241810b2534a99eb1343',1,'glm']]], + ['ycocgr2rgb',['YCoCgR2rgb',['../a00730.html#gaf8d30574c8576838097d8e20c295384a',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/functions_16.html b/common/glm/doc/api/search/functions_16.html new file mode 100644 index 000000000..b3e771acd --- /dev/null +++ b/common/glm/doc/api/search/functions_16.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/functions_16.js b/common/glm/doc/api/search/functions_16.js new file mode 100644 index 000000000..8aae6ecd4 --- /dev/null +++ b/common/glm/doc/api/search/functions_16.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['zero',['zero',['../a00708.html#ga788f5a421fc0f40a1296ebc094cbaa8a',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/functions_2.html b/common/glm/doc/api/search/functions_2.html new file mode 100644 index 000000000..67d2a392c --- /dev/null +++ b/common/glm/doc/api/search/functions_2.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/functions_2.js b/common/glm/doc/api/search/functions_2.js new file mode 100644 index 000000000..15ff9c29a --- /dev/null +++ b/common/glm/doc/api/search/functions_2.js @@ -0,0 +1,42 @@ +var searchData= +[ + ['catmullrom',['catmullRom',['../a00775.html#ga8119c04f8210fd0d292757565cd6918d',1,'glm']]], + ['ceil',['ceil',['../a00662.html#gafb9d2a645a23aca12d4d6de0104b7657',1,'glm']]], + ['ceilmultiple',['ceilMultiple',['../a00719.html#ga1d89ac88582aaf4d5dfa5feb4a376fd4',1,'glm::ceilMultiple(genType v, genType Multiple)'],['../a00719.html#gab77fdcc13f8e92d2e0b1b7d7aeab8e9d',1,'glm::ceilMultiple(vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)']]], + ['ceilpoweroftwo',['ceilPowerOfTwo',['../a00719.html#ga5c3ef36ae32aa4271f1544f92bd578b6',1,'glm::ceilPowerOfTwo(genIUType v)'],['../a00719.html#gab53d4a97c0d3e297be5f693cdfdfe5d2',1,'glm::ceilPowerOfTwo(vec< L, T, Q > const &v)']]], + ['circulareasein',['circularEaseIn',['../a00735.html#ga34508d4b204a321ec26d6086aa047997',1,'glm']]], + ['circulareaseinout',['circularEaseInOut',['../a00735.html#ga0c1027637a5b02d4bb3612aa12599d69',1,'glm']]], + ['circulareaseout',['circularEaseOut',['../a00735.html#ga26fefde9ced9b72745fe21f1a3fe8da7',1,'glm']]], + ['circularrand',['circularRand',['../a00717.html#ga9dd05c36025088fae25b97c869e88517',1,'glm']]], + ['clamp',['clamp',['../a00662.html#ga7cd77683da6361e297c56443fc70806d',1,'glm::clamp(genType x, genType minVal, genType maxVal)'],['../a00662.html#gafba2e0674deb5953878d89483cd6323d',1,'glm::clamp(vec< L, T, Q > const &x, T minVal, T maxVal)'],['../a00662.html#gaa0f2f12e9108b09e22a3f0b2008a0b5d',1,'glm::clamp(vec< L, T, Q > const &x, vec< L, T, Q > const &minVal, vec< L, T, Q > const &maxVal)'],['../a00786.html#ga6c0cc6bd1d67ea1008d2592e998bad33',1,'glm::clamp(genType const &Texcoord)']]], + ['closebounded',['closeBounded',['../a00731.html#gab7d89c14c48ad01f720fb5daf8813161',1,'glm']]], + ['closestpointonline',['closestPointOnLine',['../a00727.html#ga36529c278ef716986151d58d151d697d',1,'glm::closestPointOnLine(vec< 3, T, Q > const &point, vec< 3, T, Q > const &a, vec< 3, T, Q > const &b)'],['../a00727.html#ga55bcbcc5fc06cb7ff7bc7a6e0e155eb0',1,'glm::closestPointOnLine(vec< 2, T, Q > const &point, vec< 2, T, Q > const &a, vec< 2, T, Q > const &b)']]], + ['colmajor2',['colMajor2',['../a00755.html#gaaff72f11286e59a4a88ed21a347f284c',1,'glm::colMajor2(vec< 2, T, Q > const &v1, vec< 2, T, Q > const &v2)'],['../a00755.html#gafc25fd44196c92b1397b127aec1281ab',1,'glm::colMajor2(mat< 2, 2, T, Q > const &m)']]], + ['colmajor3',['colMajor3',['../a00755.html#ga1e25b72b085087740c92f5c70f3b051f',1,'glm::colMajor3(vec< 3, T, Q > const &v1, vec< 3, T, Q > const &v2, vec< 3, T, Q > const &v3)'],['../a00755.html#ga86bd0656e787bb7f217607572590af27',1,'glm::colMajor3(mat< 3, 3, T, Q > const &m)']]], + ['colmajor4',['colMajor4',['../a00755.html#gaf4aa6c7e17bfce41a6c13bf6469fab05',1,'glm::colMajor4(vec< 4, T, Q > const &v1, vec< 4, T, Q > const &v2, vec< 4, T, Q > const &v3, vec< 4, T, Q > const &v4)'],['../a00755.html#gaf3f9511c366c20ba2e4a64c9e4cec2b3',1,'glm::colMajor4(mat< 4, 4, T, Q > const &m)']]], + ['column',['column',['../a00711.html#ga96022eb0d3fae39d89fc7a954e59b374',1,'glm::column(genType const &m, length_t index)'],['../a00711.html#ga9e757377523890e8b80c5843dbe4dd15',1,'glm::column(genType const &m, length_t index, typename genType::col_type const &x)']]], + ['compadd',['compAdd',['../a00733.html#gaf71833350e15e74d31cbf8a3e7f27051',1,'glm']]], + ['compmax',['compMax',['../a00733.html#gabfa4bb19298c8c73d4217ba759c496b6',1,'glm']]], + ['compmin',['compMin',['../a00733.html#gab5d0832b5c7bb01b8d7395973bfb1425',1,'glm']]], + ['compmul',['compMul',['../a00733.html#gae8ab88024197202c9479d33bdc5a8a5d',1,'glm']]], + ['compnormalize',['compNormalize',['../a00733.html#ga8f2b81ada8515875e58cb1667b6b9908',1,'glm']]], + ['compscale',['compScale',['../a00733.html#ga80abc2980d65d675f435d178c36880eb',1,'glm']]], + ['conjugate',['conjugate',['../a00669.html#ga10d7bda73201788ac2ab28cd8d0d409b',1,'glm']]], + ['convertd65xyztod50xyz',['convertD65XYZToD50XYZ',['../a00728.html#gad12f4f65022b2c80e33fcba2ced0dc48',1,'glm']]], + ['convertd65xyztolinearsrgb',['convertD65XYZToLinearSRGB',['../a00728.html#ga5265386fc3ac29e4c580d37ed470859c',1,'glm']]], + ['convertlinearsrgbtod50xyz',['convertLinearSRGBToD50XYZ',['../a00728.html#ga1522ba180e3d83d554a734056da031f9',1,'glm']]], + ['convertlinearsrgbtod65xyz',['convertLinearSRGBToD65XYZ',['../a00728.html#gaf9e130d9d4ccf51cc99317de7449f369',1,'glm']]], + ['convertlineartosrgb',['convertLinearToSRGB',['../a00707.html#ga42239e7b3da900f7ef37cec7e2476579',1,'glm::convertLinearToSRGB(vec< L, T, Q > const &ColorLinear)'],['../a00707.html#gaace0a21167d13d26116c283009af57f6',1,'glm::convertLinearToSRGB(vec< L, T, Q > const &ColorLinear, T Gamma)']]], + ['convertsrgbtolinear',['convertSRGBToLinear',['../a00707.html#ga16c798b7a226b2c3079dedc55083d187',1,'glm::convertSRGBToLinear(vec< L, T, Q > const &ColorSRGB)'],['../a00707.html#gad1b91f27a9726c9cb403f9fee6e2e200',1,'glm::convertSRGBToLinear(vec< L, T, Q > const &ColorSRGB, T Gamma)']]], + ['cos',['cos',['../a00790.html#ga6a41efc740e3b3c937447d3a6284130e',1,'glm']]], + ['cosh',['cosh',['../a00790.html#ga4e260e372742c5f517aca196cf1e62b3',1,'glm']]], + ['cot',['cot',['../a00718.html#ga3a7b517a95bbd3ad74da3aea87a66314',1,'glm']]], + ['coth',['coth',['../a00718.html#ga6b8b770eb7198e4dea59d52e6db81442',1,'glm']]], + ['cross',['cross',['../a00675.html#ga755beaa929c75751dee646cccba37e4c',1,'glm::cross(qua< T, Q > const &q1, qua< T, Q > const &q2)'],['../a00697.html#gaeeec0794212fe84fc9d261de067c9587',1,'glm::cross(vec< 3, T, Q > const &x, vec< 3, T, Q > const &y)'],['../a00739.html#gac36e72b934ea6a9dd313772d7e78fa93',1,'glm::cross(vec< 2, T, Q > const &v, vec< 2, T, Q > const &u)'],['../a00769.html#ga2f32f970411c44cdd38bb98960198385',1,'glm::cross(qua< T, Q > const &q, vec< 3, T, Q > const &v)'],['../a00769.html#ga9f5f77255756e5668dfee7f0d07ed021',1,'glm::cross(vec< 3, T, Q > const &v, qua< T, Q > const &q)']]], + ['csc',['csc',['../a00718.html#ga59dd0005b6474eea48af743b4f14ebbb',1,'glm']]], + ['csch',['csch',['../a00718.html#ga6d95843ff3ca6472ab399ba171d290a0',1,'glm']]], + ['cubic',['cubic',['../a00775.html#ga6b867eb52e2fc933d2e0bf26aabc9a70',1,'glm']]], + ['cubiceasein',['cubicEaseIn',['../a00735.html#gaff52f746102b94864d105563ba8895ae',1,'glm']]], + ['cubiceaseinout',['cubicEaseInOut',['../a00735.html#ga55134072b42d75452189321d4a2ad91c',1,'glm']]], + ['cubiceaseout',['cubicEaseOut',['../a00735.html#ga40d746385d8bcc5973f5bc6a2340ca91',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/functions_3.html b/common/glm/doc/api/search/functions_3.html new file mode 100644 index 000000000..1f0eedb33 --- /dev/null +++ b/common/glm/doc/api/search/functions_3.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/functions_3.js b/common/glm/doc/api/search/functions_3.js new file mode 100644 index 000000000..2d1fec02e --- /dev/null +++ b/common/glm/doc/api/search/functions_3.js @@ -0,0 +1,24 @@ +var searchData= +[ + ['decompose',['decompose',['../a00752.html#gac0e342656ba09a9bc97c57182ba73124',1,'glm']]], + ['degrees',['degrees',['../a00790.html#ga8faec9e303538065911ba8b3caf7326b',1,'glm']]], + ['derivedeuleranglex',['derivedEulerAngleX',['../a00736.html#ga994b8186b3b80d91cf90bc403164692f',1,'glm']]], + ['derivedeulerangley',['derivedEulerAngleY',['../a00736.html#ga0a4c56ecce7abcb69508ebe6313e9d10',1,'glm']]], + ['derivedeuleranglez',['derivedEulerAngleZ',['../a00736.html#gae8b397348201c42667be983ba3f344df',1,'glm']]], + ['determinant',['determinant',['../a00788.html#gad7928795124768e058f99dce270f5c8d',1,'glm']]], + ['diagonal2x2',['diagonal2x2',['../a00756.html#ga58a32a2beeb2478dae2a721368cdd4ac',1,'glm']]], + ['diagonal2x3',['diagonal2x3',['../a00756.html#gab69f900206a430e2875a5a073851e175',1,'glm']]], + ['diagonal2x4',['diagonal2x4',['../a00756.html#ga30b4dbfed60a919d66acc8a63bcdc549',1,'glm']]], + ['diagonal3x2',['diagonal3x2',['../a00756.html#ga832c805d5130d28ad76236958d15b47d',1,'glm']]], + ['diagonal3x3',['diagonal3x3',['../a00756.html#ga5487ff9cdbc8e04d594adef1bcb16ee0',1,'glm']]], + ['diagonal3x4',['diagonal3x4',['../a00756.html#gad7551139cff0c4208d27f0ad3437833e',1,'glm']]], + ['diagonal4x2',['diagonal4x2',['../a00756.html#gacb8969e6543ba775c6638161a37ac330',1,'glm']]], + ['diagonal4x3',['diagonal4x3',['../a00756.html#gae235def5049d6740f0028433f5e13f90',1,'glm']]], + ['diagonal4x4',['diagonal4x4',['../a00756.html#ga0b4cd8dea436791b072356231ee8578f',1,'glm']]], + ['diskrand',['diskRand',['../a00717.html#gaa0b18071f3f97dbf8bcf6f53c6fe5f73',1,'glm']]], + ['distance',['distance',['../a00697.html#gaa68de6c53e20dfb2dac2d20197562e3f',1,'glm']]], + ['distance2',['distance2',['../a00760.html#ga85660f1b79f66c09c7b5a6f80e68c89f',1,'glm']]], + ['dot',['dot',['../a00675.html#ga84865a56acb8fbd7bc4f5c0b928e3cfc',1,'glm::dot(qua< T, Q > const &x, qua< T, Q > const &y)'],['../a00697.html#gaad6c5d9d39bdc0bf43baf1b22e147a0a',1,'glm::dot(vec< L, T, Q > const &x, vec< L, T, Q > const &y)']]], + ['dual_5fquat_5fidentity',['dual_quat_identity',['../a00734.html#ga0b35c0e30df8a875dbaa751e0bd800e0',1,'glm']]], + ['dualquat_5fcast',['dualquat_cast',['../a00734.html#gac4064ff813759740201765350eac4236',1,'glm::dualquat_cast(mat< 2, 4, T, Q > const &x)'],['../a00734.html#ga91025ebdca0f4ea54da08497b00e8c84',1,'glm::dualquat_cast(mat< 3, 4, T, Q > const &x)']]] +]; diff --git a/common/glm/doc/api/search/functions_4.html b/common/glm/doc/api/search/functions_4.html new file mode 100644 index 000000000..c5bf87a47 --- /dev/null +++ b/common/glm/doc/api/search/functions_4.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/functions_4.js b/common/glm/doc/api/search/functions_4.js new file mode 100644 index 000000000..6a211ed1e --- /dev/null +++ b/common/glm/doc/api/search/functions_4.js @@ -0,0 +1,55 @@ +var searchData= +[ + ['e',['e',['../a00708.html#ga4b7956eb6e2fbedfc7cf2e46e85c5139',1,'glm']]], + ['elasticeasein',['elasticEaseIn',['../a00735.html#ga230918eccee4e113d10ec5b8cdc58695',1,'glm']]], + ['elasticeaseinout',['elasticEaseInOut',['../a00735.html#ga2db4ac8959559b11b4029e54812908d6',1,'glm']]], + ['elasticeaseout',['elasticEaseOut',['../a00735.html#gace9c9d1bdf88bf2ab1e7cdefa54c7365',1,'glm']]], + ['epsilon',['epsilon',['../a00680.html#ga2a1e57fc5592b69cfae84174cbfc9429',1,'glm']]], + ['epsilonequal',['epsilonEqual',['../a00709.html#ga91b417866cafadd076004778217a1844',1,'glm::epsilonEqual(vec< L, T, Q > const &x, vec< L, T, Q > const &y, T const &epsilon)'],['../a00709.html#gaa7f227999ca09e7ca994e8b35aba47bb',1,'glm::epsilonEqual(genType const &x, genType const &y, genType const &epsilon)']]], + ['epsilonnotequal',['epsilonNotEqual',['../a00709.html#gaf840d33b9a5261ec78dcd5125743b025',1,'glm::epsilonNotEqual(vec< L, T, Q > const &x, vec< L, T, Q > const &y, T const &epsilon)'],['../a00709.html#ga50a92103fb0cbd796908e1bf20c79aaf',1,'glm::epsilonNotEqual(genType const &x, genType const &y, genType const &epsilon)']]], + ['equal',['equal',['../a00667.html#ga27e90dcb7941c9b70e295dc3f6f6369f',1,'glm::equal(mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y)'],['../a00667.html#gaf5d687d70d11708b68c36c6db5777040',1,'glm::equal(mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y, T epsilon)'],['../a00667.html#gafa6a053e81179fa4292b35651c83c3fb',1,'glm::equal(mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y, vec< C, T, Q > const &epsilon)'],['../a00676.html#gad7827af0549504ff1cd6a359786acc7a',1,'glm::equal(qua< T, Q > const &x, qua< T, Q > const &y)'],['../a00676.html#gaa001eecb91106463169a8e5ef1577b39',1,'glm::equal(qua< T, Q > const &x, qua< T, Q > const &y, T epsilon)'],['../a01376.html#a90ebafeace352ccc14055418ebd220be',1,'glm::equal(genType const &x, genType const &y, genType const &epsilon)'],['../a00694.html#ga2ac7651a2fa7354f2da610dbd50d28e2',1,'glm::equal(vec< L, T, Q > const &x, vec< L, T, Q > const &y, T epsilon)'],['../a00694.html#ga37d261a65f69babc82cec2ae1af7145f',1,'glm::equal(vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)'],['../a00791.html#gab4c5cfdaa70834421397a85aa83ad946',1,'glm::equal(vec< L, T, Q > const &x, vec< L, T, Q > const &y)']]], + ['euclidean',['euclidean',['../a00767.html#ga1821d5b3324201e60a9e2823d0b5d0c8',1,'glm']]], + ['euler',['euler',['../a00708.html#gad8fe2e6f90bce9d829e9723b649fbd42',1,'glm']]], + ['eulerangles',['eulerAngles',['../a00663.html#gaf4dd967dead22dd932fc7460ceecb03f',1,'glm']]], + ['euleranglex',['eulerAngleX',['../a00736.html#gafba6282e4ed3ff8b5c75331abfba3489',1,'glm']]], + ['euleranglexy',['eulerAngleXY',['../a00736.html#ga64036577ee17a2d24be0dbc05881d4e2',1,'glm']]], + ['euleranglexyx',['eulerAngleXYX',['../a00736.html#ga29bd0787a28a6648159c0d6e69706066',1,'glm']]], + ['euleranglexyz',['eulerAngleXYZ',['../a00736.html#ga1975e0f0e9bed7f716dc9946da2ab645',1,'glm']]], + ['euleranglexz',['eulerAngleXZ',['../a00736.html#gaa39bd323c65c2fc0a1508be33a237ce9',1,'glm']]], + ['euleranglexzx',['eulerAngleXZX',['../a00736.html#ga60171c79a17aec85d7891ae1d1533ec9',1,'glm']]], + ['euleranglexzy',['eulerAngleXZY',['../a00736.html#ga996dce12a60d8a674ba6737a535fa910',1,'glm']]], + ['eulerangley',['eulerAngleY',['../a00736.html#gab84bf4746805fd69b8ecbb230e3974c5',1,'glm']]], + ['eulerangleyx',['eulerAngleYX',['../a00736.html#ga4f57e6dd25c3cffbbd4daa6ef3f4486d',1,'glm']]], + ['eulerangleyxy',['eulerAngleYXY',['../a00736.html#ga750fba9894117f87bcc529d7349d11de',1,'glm']]], + ['eulerangleyxz',['eulerAngleYXZ',['../a00736.html#gab8ba99a9814f6d9edf417b6c6d5b0c10',1,'glm']]], + ['eulerangleyz',['eulerAngleYZ',['../a00736.html#ga220379e10ac8cca55e275f0c9018fed9',1,'glm']]], + ['eulerangleyzx',['eulerAngleYZX',['../a00736.html#ga08bef16357b8f9b3051b3dcaec4b7848',1,'glm']]], + ['eulerangleyzy',['eulerAngleYZY',['../a00736.html#ga5e5e40abc27630749b42b3327c76d6e4',1,'glm']]], + ['euleranglez',['eulerAngleZ',['../a00736.html#ga5b3935248bb6c3ec6b0d9297d406e251',1,'glm']]], + ['euleranglezx',['eulerAngleZX',['../a00736.html#ga483903115cd4059228961046a28d69b5',1,'glm']]], + ['euleranglezxy',['eulerAngleZXY',['../a00736.html#gab4505c54d2dd654df4569fd1f04c43aa',1,'glm']]], + ['euleranglezxz',['eulerAngleZXZ',['../a00736.html#ga178f966c52b01e4d65e31ebd007e3247',1,'glm']]], + ['euleranglezy',['eulerAngleZY',['../a00736.html#ga400b2bd5984999efab663f3a68e1d020',1,'glm']]], + ['euleranglezyx',['eulerAngleZYX',['../a00736.html#ga2e61f1e39069c47530acab9167852dd6',1,'glm']]], + ['euleranglezyz',['eulerAngleZYZ',['../a00736.html#gacd795f1dbecaf74974f9c76bbcca6830',1,'glm']]], + ['exp',['exp',['../a00664.html#ga071566cadc7505455e611f2a0353f4d4',1,'glm::exp(vec< L, T, Q > const &v)'],['../a00677.html#gaab2d37ef7265819f1d2939b9dc2c52ac',1,'glm::exp(qua< T, Q > const &q)']]], + ['exp2',['exp2',['../a00664.html#gaff17ace6b579a03bf223ed4d1ed2cd16',1,'glm']]], + ['exponentialeasein',['exponentialEaseIn',['../a00735.html#ga7f24ee9219ab4c84dc8de24be84c1e3c',1,'glm']]], + ['exponentialeaseinout',['exponentialEaseInOut',['../a00735.html#ga232fb6dc093c5ce94bee105ff2947501',1,'glm']]], + ['exponentialeaseout',['exponentialEaseOut',['../a00735.html#ga517f2bcfd15bc2c25c466ae50808efc3',1,'glm']]], + ['extend',['extend',['../a00737.html#ga8140caae613b0f847ab0d7175dc03a37',1,'glm']]], + ['extracteuleranglexyx',['extractEulerAngleXYX',['../a00736.html#gaf1077a72171d0f3b08f022ab5ff88af7',1,'glm']]], + ['extracteuleranglexyz',['extractEulerAngleXYZ',['../a00736.html#gacea701562f778c1da4d3a0a1cf091000',1,'glm']]], + ['extracteuleranglexzx',['extractEulerAngleXZX',['../a00736.html#gacf0bc6c031f25fa3ee0055b62c8260d0',1,'glm']]], + ['extracteuleranglexzy',['extractEulerAngleXZY',['../a00736.html#gabe5a65d8eb1cd873c8de121cce1a15ed',1,'glm']]], + ['extracteulerangleyxy',['extractEulerAngleYXY',['../a00736.html#gaab8868556361a190db94374e9983ed39',1,'glm']]], + ['extracteulerangleyxz',['extractEulerAngleYXZ',['../a00736.html#gaf0937518e63037335a0e8358b6f053c5',1,'glm']]], + ['extracteulerangleyzx',['extractEulerAngleYZX',['../a00736.html#ga9049b78466796c0de2971756e25b93d3',1,'glm']]], + ['extracteulerangleyzy',['extractEulerAngleYZY',['../a00736.html#ga11dad972c109e4bf8694c915017c44a6',1,'glm']]], + ['extracteuleranglezxy',['extractEulerAngleZXY',['../a00736.html#ga81fbbca2ba0c778b9662d5355b4e2363',1,'glm']]], + ['extracteuleranglezxz',['extractEulerAngleZXZ',['../a00736.html#ga59359fef9bad92afaca55e193f91e702',1,'glm']]], + ['extracteuleranglezyx',['extractEulerAngleZYX',['../a00736.html#ga2d6c11a4abfa60c565483cee2d3f7665',1,'glm']]], + ['extracteuleranglezyz',['extractEulerAngleZYZ',['../a00736.html#gafdfa880a64b565223550c2d3938b1aeb',1,'glm']]], + ['extractmatrixrotation',['extractMatrixRotation',['../a00754.html#gabbc1c7385a145f04b5c54228965df145',1,'glm']]], + ['extractrealcomponent',['extractRealComponent',['../a00769.html#ga321953c1b2e7befe6f5dcfddbfc6b76b',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/functions_5.html b/common/glm/doc/api/search/functions_5.html new file mode 100644 index 000000000..a34446ce7 --- /dev/null +++ b/common/glm/doc/api/search/functions_5.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/functions_5.js b/common/glm/doc/api/search/functions_5.js new file mode 100644 index 000000000..9ec5020f3 --- /dev/null +++ b/common/glm/doc/api/search/functions_5.js @@ -0,0 +1,51 @@ +var searchData= +[ + ['faceforward',['faceforward',['../a00697.html#ga7aed0a36c738169402404a3a5d54e43b',1,'glm']]], + ['factorial',['factorial',['../a00747.html#ga8cbd3120905f398ec321b5d1836e08fb',1,'glm']]], + ['fastacos',['fastAcos',['../a00742.html#ga9721d63356e5d94fdc4b393a426ab26b',1,'glm']]], + ['fastasin',['fastAsin',['../a00742.html#ga562cb62c51fbfe7fac7db0bce706b81f',1,'glm']]], + ['fastatan',['fastAtan',['../a00742.html#ga8d197c6ef564f5e5d59af3b3f8adcc2c',1,'glm::fastAtan(T y, T x)'],['../a00742.html#gae25de86a968490ff56856fa425ec9d30',1,'glm::fastAtan(T angle)']]], + ['fastcos',['fastCos',['../a00742.html#gab34c8b45c23c0165a64dcecfcc3b302a',1,'glm']]], + ['fastdistance',['fastDistance',['../a00741.html#gaac333418d0c4e0cc6d3d219ed606c238',1,'glm::fastDistance(genType x, genType y)'],['../a00741.html#ga42d3e771fa7cb3c60d828e315829df19',1,'glm::fastDistance(vec< L, T, Q > const &x, vec< L, T, Q > const &y)']]], + ['fastexp',['fastExp',['../a00740.html#gaa3180ac8f96ab37ab96e0cacaf608e10',1,'glm::fastExp(T x)'],['../a00740.html#ga3ba6153aec6bd74628f8b00530aa8d58',1,'glm::fastExp(vec< L, T, Q > const &x)']]], + ['fastexp2',['fastExp2',['../a00740.html#ga0af50585955eb14c60bb286297fabab2',1,'glm::fastExp2(T x)'],['../a00740.html#gacaaed8b67d20d244b7de217e7816c1b6',1,'glm::fastExp2(vec< L, T, Q > const &x)']]], + ['fastinversesqrt',['fastInverseSqrt',['../a00741.html#ga7f081b14d9c7035c8714eba5f7f75a8f',1,'glm::fastInverseSqrt(genType x)'],['../a00741.html#gadcd7be12b1e5ee182141359d4c45dd24',1,'glm::fastInverseSqrt(vec< L, T, Q > const &x)']]], + ['fastlength',['fastLength',['../a00741.html#gafe697d6287719538346bbdf8b1367c59',1,'glm::fastLength(genType x)'],['../a00741.html#ga90f66be92ef61e705c005e7b3209edb8',1,'glm::fastLength(vec< L, T, Q > const &x)']]], + ['fastlog',['fastLog',['../a00740.html#gae1bdc97b7f96a600e29c753f1cd4388a',1,'glm::fastLog(T x)'],['../a00740.html#ga937256993a7219e73f186bb348fe6be8',1,'glm::fastLog(vec< L, T, Q > const &x)']]], + ['fastlog2',['fastLog2',['../a00740.html#ga6e98118685f6dc9e05fbb13dd5e5234e',1,'glm::fastLog2(T x)'],['../a00740.html#ga7562043539194ccc24649f8475bc5584',1,'glm::fastLog2(vec< L, T, Q > const &x)']]], + ['fastmix',['fastMix',['../a00769.html#ga264e10708d58dd0ff53b7902a2bd2561',1,'glm']]], + ['fastnormalize',['fastNormalize',['../a00741.html#ga3b02c1d6e0c754144e2f1e110bf9f16c',1,'glm']]], + ['fastnormalizedot',['fastNormalizeDot',['../a00762.html#ga2746fb9b5bd22b06b2f7c8babba5de9e',1,'glm']]], + ['fastpow',['fastPow',['../a00740.html#ga5340e98a11fcbbd936ba6e983a154d50',1,'glm::fastPow(genType x, genType y)'],['../a00740.html#ga15325a8ed2d1c4ed2412c4b3b3927aa2',1,'glm::fastPow(vec< L, T, Q > const &x, vec< L, T, Q > const &y)'],['../a00740.html#ga7f2562db9c3e02ae76169c36b086c3f6',1,'glm::fastPow(genTypeT x, genTypeU y)'],['../a00740.html#ga1abe488c0829da5b9de70ac64aeaa7e5',1,'glm::fastPow(vec< L, T, Q > const &x)']]], + ['fastsin',['fastSin',['../a00742.html#ga0aab3257bb3b628d10a1e0483e2c6915',1,'glm']]], + ['fastsqrt',['fastSqrt',['../a00741.html#ga6c460e9414a50b2fc455c8f64c86cdc9',1,'glm::fastSqrt(genType x)'],['../a00741.html#gae83f0c03614f73eae5478c5b6274ee6d',1,'glm::fastSqrt(vec< L, T, Q > const &x)']]], + ['fasttan',['fastTan',['../a00742.html#gaf29b9c1101a10007b4f79ee89df27ba2',1,'glm']]], + ['fclamp',['fclamp',['../a00738.html#ga1e28539d3a46965ed9ef92ec7cb3b18a',1,'glm::fclamp(genType x, genType minVal, genType maxVal)'],['../a00738.html#ga60796d08903489ee185373593bc16b9d',1,'glm::fclamp(vec< L, T, Q > const &x, T minVal, T maxVal)'],['../a00738.html#ga5c15fa4709763c269c86c0b8b3aa2297',1,'glm::fclamp(vec< L, T, Q > const &x, vec< L, T, Q > const &minVal, vec< L, T, Q > const &maxVal)']]], + ['findlsb',['findLSB',['../a00787.html#gaf74c4d969fa34ab8acb9d390f5ca5274',1,'glm::findLSB(genIUType x)'],['../a00787.html#ga4454c0331d6369888c28ab677f4810c7',1,'glm::findLSB(vec< L, T, Q > const &v)']]], + ['findmsb',['findMSB',['../a00787.html#ga7e4a794d766861c70bc961630f8ef621',1,'glm::findMSB(genIUType x)'],['../a00787.html#ga39ac4d52028bb6ab08db5ad6562c2872',1,'glm::findMSB(vec< L, T, Q > const &v)']]], + ['fliplr',['fliplr',['../a00753.html#gaf39f4e5f78eb29c1a90277d45b9b3feb',1,'glm']]], + ['flipud',['flipud',['../a00753.html#ga85003371f0ba97380dd25e8905de1870',1,'glm']]], + ['float_5fdistance',['float_distance',['../a00723.html#ga2e09bd6c8b0a9c91f6f5683d68245634',1,'glm::float_distance(T const &x, T const &y)'],['../a00723.html#ga72b3223069013f336d8c31812b7ada80',1,'glm::float_distance(vec< 2, T, Q > const &x, vec< 2, T, Q > const &y)']]], + ['floatbitstoint',['floatBitsToInt',['../a00662.html#ga1425c1c3160ec51214b03a0469a3013d',1,'glm::floatBitsToInt(float const &v)'],['../a00662.html#ga99f7d62f78ac5ea3b49bae715c9488ed',1,'glm::floatBitsToInt(vec< L, float, Q > const &v)']]], + ['floatbitstouint',['floatBitsToUint',['../a00662.html#ga70e0271c34af52f3100c7960e18c3f2b',1,'glm::floatBitsToUint(float const &v)'],['../a00662.html#ga49418ba4c8a60fbbb5d57b705f3e26db',1,'glm::floatBitsToUint(vec< L, float, Q > const &v)']]], + ['floor',['floor',['../a00662.html#gaa9d0742639e85b29c7c5de11cfd6840d',1,'glm']]], + ['floor_5flog2',['floor_log2',['../a00747.html#ga7011b4e1c1e1ed492149b028feacc00e',1,'glm']]], + ['floormultiple',['floorMultiple',['../a00719.html#ga2ffa3cd5f2ea746ee1bf57c46da6315e',1,'glm::floorMultiple(genType v, genType Multiple)'],['../a00719.html#gacdd8901448f51f0b192380e422fae3e4',1,'glm::floorMultiple(vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)']]], + ['floorpoweroftwo',['floorPowerOfTwo',['../a00719.html#gafe273a57935d04c9db677bf67f9a71f4',1,'glm::floorPowerOfTwo(genIUType v)'],['../a00719.html#gaf0d591a8fca8ddb9289cdeb44b989c2d',1,'glm::floorPowerOfTwo(vec< L, T, Q > const &v)']]], + ['fma',['fma',['../a00662.html#gad0f444d4b81cc53c3b6edf5aa25078c2',1,'glm']]], + ['fmax',['fmax',['../a00679.html#ga36920478565cf608e93064283ce06421',1,'glm::fmax(T a, T b)'],['../a00679.html#ga0007bba71ca451ac70e99d28dfbeaab9',1,'glm::fmax(T a, T b, T C)'],['../a00679.html#ga27e260b1ff4d04c3ad4b864d26cbaf08',1,'glm::fmax(T a, T b, T C, T D)'],['../a00687.html#gad66b6441f7200db16c9f341711733c56',1,'glm::fmax(vec< L, T, Q > const &a, T b)'],['../a00687.html#ga8df4be3f48d6717c40ea788fd30deebf',1,'glm::fmax(vec< L, T, Q > const &a, vec< L, T, Q > const &b)'],['../a00687.html#ga0f04ba924294dae4234ca93ede23229a',1,'glm::fmax(vec< L, T, Q > const &a, vec< L, T, Q > const &b, vec< L, T, Q > const &c)'],['../a00687.html#ga4ed3eb250ccbe17bfe8ded8a6b72d230',1,'glm::fmax(vec< L, T, Q > const &a, vec< L, T, Q > const &b, vec< L, T, Q > const &c, vec< L, T, Q > const &d)'],['../a00738.html#gae5792cb2b51190057e4aea027eb56f81',1,'glm::fmax(genType x, genType y)']]], + ['fmin',['fmin',['../a00679.html#ga7b2b438a765e2a62098c79eb212f28f0',1,'glm::fmin(T a, T b)'],['../a00679.html#ga1a95fe4cf5437e8133f1093fe9726a64',1,'glm::fmin(T a, T b, T c)'],['../a00679.html#ga3d6f9c6c16bfd6f38f2c4f8076e8b661',1,'glm::fmin(T a, T b, T c, T d)'],['../a00687.html#gae989203363cff9eab5093630df4fe071',1,'glm::fmin(vec< L, T, Q > const &x, T y)'],['../a00687.html#ga7c42e93cd778c9181d1cdeea4d3e43bd',1,'glm::fmin(vec< L, T, Q > const &x, vec< L, T, Q > const &y)'],['../a00687.html#ga7e62739055b49189d9355471f78fe000',1,'glm::fmin(vec< L, T, Q > const &a, vec< L, T, Q > const &b, vec< L, T, Q > const &c)'],['../a00687.html#ga4a543dd7d22ad1f3b8b839f808a9d93c',1,'glm::fmin(vec< L, T, Q > const &a, vec< L, T, Q > const &b, vec< L, T, Q > const &c, vec< L, T, Q > const &d)'],['../a00738.html#gaa3200559611ac5b9b9ae7283547916a7',1,'glm::fmin(genType x, genType y)']]], + ['fmod',['fmod',['../a00731.html#gae5e80425df9833164ad469e83b475fb4',1,'glm']]], + ['four_5fover_5fpi',['four_over_pi',['../a00708.html#ga753950e5140e4ea6a88e4a18ba61dc09',1,'glm']]], + ['fract',['fract',['../a00662.html#ga8ba89e40e55ae5cdf228548f9b7639c7',1,'glm::fract(genType x)'],['../a00662.html#ga2df623004f634b440d61e018d62c751b',1,'glm::fract(vec< L, T, Q > const &x)']]], + ['frexp',['frexp',['../a00662.html#ga20620e83544d1a988857a3bc4ebe0e1d',1,'glm']]], + ['frustum',['frustum',['../a00665.html#ga0bcd4542e0affc63a0b8c08fcb839ea9',1,'glm']]], + ['frustumlh',['frustumLH',['../a00665.html#gae4277c37f61d81da01bc9db14ea90296',1,'glm']]], + ['frustumlh_5fno',['frustumLH_NO',['../a00665.html#ga259520cad03b3f8bca9417920035ed01',1,'glm']]], + ['frustumlh_5fzo',['frustumLH_ZO',['../a00665.html#ga94218b094862d17798370242680b9030',1,'glm']]], + ['frustumno',['frustumNO',['../a00665.html#gae34ec664ad44860bf4b5ba631f0e0e90',1,'glm']]], + ['frustumrh',['frustumRH',['../a00665.html#ga4366ab45880c6c5f8b3e8c371ca4b136',1,'glm']]], + ['frustumrh_5fno',['frustumRH_NO',['../a00665.html#ga9236c8439f21be186b79c97b588836b9',1,'glm']]], + ['frustumrh_5fzo',['frustumRH_ZO',['../a00665.html#ga7654a9227f14d5382786b9fc0eb5692d',1,'glm']]], + ['frustumzo',['frustumZO',['../a00665.html#gaa73322e152edf50cf30a6edac342a757',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/functions_6.html b/common/glm/doc/api/search/functions_6.html new file mode 100644 index 000000000..6fd4b1f37 --- /dev/null +++ b/common/glm/doc/api/search/functions_6.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/functions_6.js b/common/glm/doc/api/search/functions_6.js new file mode 100644 index 000000000..f5ca8de6c --- /dev/null +++ b/common/glm/doc/api/search/functions_6.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['gauss',['gauss',['../a00743.html#ga0b50b197ff74261a0fad90f4b8d24702',1,'glm::gauss(T x, T ExpectedValue, T StandardDeviation)'],['../a00743.html#gad19ec8754a83c0b9a8dc16b7e60705ab',1,'glm::gauss(vec< 2, T, Q > const &Coord, vec< 2, T, Q > const &ExpectedValue, vec< 2, T, Q > const &StandardDeviation)']]], + ['gaussrand',['gaussRand',['../a00717.html#ga5193a83e49e4fdc5652c084711083574',1,'glm']]], + ['glm_5faligned_5ftypedef',['GLM_ALIGNED_TYPEDEF',['../a00781.html#gab5cd5c5fad228b25c782084f1cc30114',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_int8, aligned_lowp_int8, 1)'],['../a00781.html#ga5bb5dd895ef625c1b113f2cf400186b0',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_int16, aligned_lowp_int16, 2)'],['../a00781.html#gac6efa54cf7c6c86f7158922abdb1a430',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_int32, aligned_lowp_int32, 4)'],['../a00781.html#ga6612eb77c8607048e7552279a11eeb5f',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_int64, aligned_lowp_int64, 8)'],['../a00781.html#ga7ddc1848ff2223026db8968ce0c97497',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_int8_t, aligned_lowp_int8_t, 1)'],['../a00781.html#ga22240dd9458b0f8c11fbcc4f48714f68',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_int16_t, aligned_lowp_int16_t, 2)'],['../a00781.html#ga8130ea381d76a2cc34a93ccbb6cf487d',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_int32_t, aligned_lowp_int32_t, 4)'],['../a00781.html#ga7ccb60f3215d293fd62b33b31ed0e7be',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_int64_t, aligned_lowp_int64_t, 8)'],['../a00781.html#gac20d508d2ef5cc95ad3daf083c57ec2a',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_i8, aligned_lowp_i8, 1)'],['../a00781.html#ga50257b48069a31d0c8d9c1f644d267de',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_i16, aligned_lowp_i16, 2)'],['../a00781.html#gaa07e98e67b7a3435c0746018c7a2a839',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_i32, aligned_lowp_i32, 4)'],['../a00781.html#ga62601fc6f8ca298b77285bedf03faffd',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_i64, aligned_lowp_i64, 8)'],['../a00781.html#gac8cff825951aeb54dd846037113c72db',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_int8, aligned_mediump_int8, 1)'],['../a00781.html#ga78f443d88f438575a62b5df497cdf66b',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_int16, aligned_mediump_int16, 2)'],['../a00781.html#ga0680cd3b5d4e8006985fb41a4f9b57af',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_int32, aligned_mediump_int32, 4)'],['../a00781.html#gad9e5babb1dd3e3531b42c37bf25dd951',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_int64, aligned_mediump_int64, 8)'],['../a00781.html#ga353fd9fa8a9ad952fcabd0d53ad9a6dd',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_int8_t, aligned_mediump_int8_t, 1)'],['../a00781.html#ga2196442c0e5c5e8c77842de388c42521',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_int16_t, aligned_mediump_int16_t, 2)'],['../a00781.html#ga1284488189daf897cf095c5eefad9744',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_int32_t, aligned_mediump_int32_t, 4)'],['../a00781.html#ga73fdc86a539808af58808b7c60a1c4d8',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_int64_t, aligned_mediump_int64_t, 8)'],['../a00781.html#gafafeea923e1983262c972e2b83922d3b',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_i8, aligned_mediump_i8, 1)'],['../a00781.html#ga4b35ca5fe8f55c9d2fe54fdb8d8896f4',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_i16, aligned_mediump_i16, 2)'],['../a00781.html#ga63b882e29170d428463d99c3d630acc6',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_i32, aligned_mediump_i32, 4)'],['../a00781.html#ga8b20507bb048c1edea2d441cc953e6f0',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_i64, aligned_mediump_i64, 8)'],['../a00781.html#ga56c5ca60813027b603c7b61425a0479d',1,'glm::GLM_ALIGNED_TYPEDEF(highp_int8, aligned_highp_int8, 1)'],['../a00781.html#ga7a751b3aff24c0259f4a7357c2969089',1,'glm::GLM_ALIGNED_TYPEDEF(highp_int16, aligned_highp_int16, 2)'],['../a00781.html#ga70cd2144351c556469ee6119e59971fc',1,'glm::GLM_ALIGNED_TYPEDEF(highp_int32, aligned_highp_int32, 4)'],['../a00781.html#ga46bbf08dc004d8c433041e0b5018a5d3',1,'glm::GLM_ALIGNED_TYPEDEF(highp_int64, aligned_highp_int64, 8)'],['../a00781.html#gab3e10c77a20d1abad2de1c561c7a5c18',1,'glm::GLM_ALIGNED_TYPEDEF(highp_int8_t, aligned_highp_int8_t, 1)'],['../a00781.html#ga968f30319ebeaca9ebcd3a25a8e139fb',1,'glm::GLM_ALIGNED_TYPEDEF(highp_int16_t, aligned_highp_int16_t, 2)'],['../a00781.html#gaae773c28e6390c6aa76f5b678b7098a3',1,'glm::GLM_ALIGNED_TYPEDEF(highp_int32_t, aligned_highp_int32_t, 4)'],['../a00781.html#ga790cfff1ca39d0ed696ffed980809311',1,'glm::GLM_ALIGNED_TYPEDEF(highp_int64_t, aligned_highp_int64_t, 8)'],['../a00781.html#ga8265b91eb23c120a9b0c3e381bc37b96',1,'glm::GLM_ALIGNED_TYPEDEF(highp_i8, aligned_highp_i8, 1)'],['../a00781.html#gae6d384de17588d8edb894fbe06e0d410',1,'glm::GLM_ALIGNED_TYPEDEF(highp_i16, aligned_highp_i16, 2)'],['../a00781.html#ga9c8172b745ee03fc5b2b91c350c2922f',1,'glm::GLM_ALIGNED_TYPEDEF(highp_i32, aligned_highp_i32, 4)'],['../a00781.html#ga77e0dff12aa4020ddc3f8cabbea7b2e6',1,'glm::GLM_ALIGNED_TYPEDEF(highp_i64, aligned_highp_i64, 8)'],['../a00781.html#gabd82b9faa9d4d618dbbe0fc8a1efee63',1,'glm::GLM_ALIGNED_TYPEDEF(int8, aligned_int8, 1)'],['../a00781.html#ga285649744560be21000cfd81bbb5d507',1,'glm::GLM_ALIGNED_TYPEDEF(int16, aligned_int16, 2)'],['../a00781.html#ga07732da630b2deda428ce95c0ecaf3ff',1,'glm::GLM_ALIGNED_TYPEDEF(int32, aligned_int32, 4)'],['../a00781.html#ga1a8da2a8c51f69c07a2e7f473aa420f4',1,'glm::GLM_ALIGNED_TYPEDEF(int64, aligned_int64, 8)'],['../a00781.html#ga848aedf13e2d9738acf0bb482c590174',1,'glm::GLM_ALIGNED_TYPEDEF(int8_t, aligned_int8_t, 1)'],['../a00781.html#gafd2803d39049dd45a37a63931e25d943',1,'glm::GLM_ALIGNED_TYPEDEF(int16_t, aligned_int16_t, 2)'],['../a00781.html#gae553b33349d6da832cf0724f1e024094',1,'glm::GLM_ALIGNED_TYPEDEF(int32_t, aligned_int32_t, 4)'],['../a00781.html#ga16d223a2b3409e812e1d3bd87f0e9e5c',1,'glm::GLM_ALIGNED_TYPEDEF(int64_t, aligned_int64_t, 8)'],['../a00781.html#ga2de065d2ddfdb366bcd0febca79ae2ad',1,'glm::GLM_ALIGNED_TYPEDEF(i8, aligned_i8, 1)'],['../a00781.html#gabd786bdc20a11c8cb05c92c8212e28d3',1,'glm::GLM_ALIGNED_TYPEDEF(i16, aligned_i16, 2)'],['../a00781.html#gad4aefe56691cdb640c72f0d46d3fb532',1,'glm::GLM_ALIGNED_TYPEDEF(i32, aligned_i32, 4)'],['../a00781.html#ga8fe9745f7de24a8394518152ff9fccdc',1,'glm::GLM_ALIGNED_TYPEDEF(i64, aligned_i64, 8)'],['../a00781.html#gaaad735483450099f7f882d4e3a3569bd',1,'glm::GLM_ALIGNED_TYPEDEF(ivec1, aligned_ivec1, 4)'],['../a00781.html#gac7b6f823802edbd6edbaf70ea25bf068',1,'glm::GLM_ALIGNED_TYPEDEF(ivec2, aligned_ivec2, 8)'],['../a00781.html#ga3e235bcd2b8029613f25b8d40a2d3ef7',1,'glm::GLM_ALIGNED_TYPEDEF(ivec3, aligned_ivec3, 16)'],['../a00781.html#ga50d8a9523968c77f8325b4c9bfbff41e',1,'glm::GLM_ALIGNED_TYPEDEF(ivec4, aligned_ivec4, 16)'],['../a00781.html#ga9ec20fdfb729c702032da9378c79679f',1,'glm::GLM_ALIGNED_TYPEDEF(i8vec1, aligned_i8vec1, 1)'],['../a00781.html#ga25b3fe1d9e8d0a5e86c1949c1acd8131',1,'glm::GLM_ALIGNED_TYPEDEF(i8vec2, aligned_i8vec2, 2)'],['../a00781.html#ga2958f907719d94d8109b562540c910e2',1,'glm::GLM_ALIGNED_TYPEDEF(i8vec3, aligned_i8vec3, 4)'],['../a00781.html#ga1fe6fc032a978f1c845fac9aa0668714',1,'glm::GLM_ALIGNED_TYPEDEF(i8vec4, aligned_i8vec4, 4)'],['../a00781.html#gaa4161e7a496dc96972254143fe873e55',1,'glm::GLM_ALIGNED_TYPEDEF(i16vec1, aligned_i16vec1, 2)'],['../a00781.html#ga9d7cb211ccda69b1c22ddeeb0f3e7aba',1,'glm::GLM_ALIGNED_TYPEDEF(i16vec2, aligned_i16vec2, 4)'],['../a00781.html#gaaee91dd2ab34423bcc11072ef6bd0f02',1,'glm::GLM_ALIGNED_TYPEDEF(i16vec3, aligned_i16vec3, 8)'],['../a00781.html#ga49f047ccaa8b31fad9f26c67bf9b3510',1,'glm::GLM_ALIGNED_TYPEDEF(i16vec4, aligned_i16vec4, 8)'],['../a00781.html#ga904e9c2436bb099397c0823506a0771f',1,'glm::GLM_ALIGNED_TYPEDEF(i32vec1, aligned_i32vec1, 4)'],['../a00781.html#gaf90651cf2f5e7ee2b11cfdc5a6749534',1,'glm::GLM_ALIGNED_TYPEDEF(i32vec2, aligned_i32vec2, 8)'],['../a00781.html#ga7354a4ead8cb17868aec36b9c30d6010',1,'glm::GLM_ALIGNED_TYPEDEF(i32vec3, aligned_i32vec3, 16)'],['../a00781.html#gad2ecbdea18732163e2636e27b37981ee',1,'glm::GLM_ALIGNED_TYPEDEF(i32vec4, aligned_i32vec4, 16)'],['../a00781.html#ga965b1c9aa1800e93d4abc2eb2b5afcbf',1,'glm::GLM_ALIGNED_TYPEDEF(i64vec1, aligned_i64vec1, 8)'],['../a00781.html#ga1f9e9c2ea2768675dff9bae5cde2d829',1,'glm::GLM_ALIGNED_TYPEDEF(i64vec2, aligned_i64vec2, 16)'],['../a00781.html#gad77c317b7d942322cd5be4c8127b3187',1,'glm::GLM_ALIGNED_TYPEDEF(i64vec3, aligned_i64vec3, 32)'],['../a00781.html#ga716f8ea809bdb11b5b542d8b71aeb04f',1,'glm::GLM_ALIGNED_TYPEDEF(i64vec4, aligned_i64vec4, 32)'],['../a00781.html#gad46f8e9082d5878b1bc04f9c1471cdaa',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_uint8, aligned_lowp_uint8, 1)'],['../a00781.html#ga1246094581af624aca6c7499aaabf801',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_uint16, aligned_lowp_uint16, 2)'],['../a00781.html#ga7a5009a1d0196bbf21dd7518f61f0249',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_uint32, aligned_lowp_uint32, 4)'],['../a00781.html#ga45213fd18b3bb1df391671afefe4d1e7',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_uint64, aligned_lowp_uint64, 8)'],['../a00781.html#ga0ba26b4e3fd9ecbc25358efd68d8a4ca',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_uint8_t, aligned_lowp_uint8_t, 1)'],['../a00781.html#gaf2b58f5fb6d4ec8ce7b76221d3af43e1',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_uint16_t, aligned_lowp_uint16_t, 2)'],['../a00781.html#gadc246401847dcba155f0699425e49dcd',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_uint32_t, aligned_lowp_uint32_t, 4)'],['../a00781.html#gaace64bddf51a9def01498da9a94fb01c',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_uint64_t, aligned_lowp_uint64_t, 8)'],['../a00781.html#gad7bb97c29d664bd86ffb1bed4abc5534',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_u8, aligned_lowp_u8, 1)'],['../a00781.html#ga404bba7785130e0b1384d695a9450b28',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_u16, aligned_lowp_u16, 2)'],['../a00781.html#ga31ba41fd896257536958ec6080203d2a',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_u32, aligned_lowp_u32, 4)'],['../a00781.html#gacca5f13627f57b3505676e40a6e43e5e',1,'glm::GLM_ALIGNED_TYPEDEF(lowp_u64, aligned_lowp_u64, 8)'],['../a00781.html#ga5faf1d3e70bf33174dd7f3d01d5b883b',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_uint8, aligned_mediump_uint8, 1)'],['../a00781.html#ga727e2bf2c433bb3b0182605860a48363',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_uint16, aligned_mediump_uint16, 2)'],['../a00781.html#ga12566ca66d5962dadb4a5eb4c74e891e',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_uint32, aligned_mediump_uint32, 4)'],['../a00781.html#ga7b66a97a8acaa35c5a377b947318c6bc',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_uint64, aligned_mediump_uint64, 8)'],['../a00781.html#gaa9cde002439b74fa66120a16a9f55fcc',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_uint8_t, aligned_mediump_uint8_t, 1)'],['../a00781.html#ga1ca98c67f7d1e975f7c5202f1da1df1f',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_uint16_t, aligned_mediump_uint16_t, 2)'],['../a00781.html#ga1dc8bc6199d785f235576948d80a597c',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_uint32_t, aligned_mediump_uint32_t, 4)'],['../a00781.html#gad14a0f2ec93519682b73d70b8e401d81',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_uint64_t, aligned_mediump_uint64_t, 8)'],['../a00781.html#gada8b996eb6526dc1ead813bd49539d1b',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_u8, aligned_mediump_u8, 1)'],['../a00781.html#ga28948f6bfb52b42deb9d73ae1ea8d8b0',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_u16, aligned_mediump_u16, 2)'],['../a00781.html#gad6a7c0b5630f89d3f1c5b4ef2919bb4c',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_u32, aligned_mediump_u32, 4)'],['../a00781.html#gaa0fc531cbaa972ac3a0b86d21ef4a7fa',1,'glm::GLM_ALIGNED_TYPEDEF(mediump_u64, aligned_mediump_u64, 8)'],['../a00781.html#ga0ee829f7b754b262bbfe6317c0d678ac',1,'glm::GLM_ALIGNED_TYPEDEF(highp_uint8, aligned_highp_uint8, 1)'],['../a00781.html#ga447848a817a626cae08cedc9778b331c',1,'glm::GLM_ALIGNED_TYPEDEF(highp_uint16, aligned_highp_uint16, 2)'],['../a00781.html#ga6027ae13b2734f542a6e7beee11b8820',1,'glm::GLM_ALIGNED_TYPEDEF(highp_uint32, aligned_highp_uint32, 4)'],['../a00781.html#ga2aca46c8608c95ef991ee4c332acde5f',1,'glm::GLM_ALIGNED_TYPEDEF(highp_uint64, aligned_highp_uint64, 8)'],['../a00781.html#gaff50b10dd1c48be324fdaffd18e2c7ea',1,'glm::GLM_ALIGNED_TYPEDEF(highp_uint8_t, aligned_highp_uint8_t, 1)'],['../a00781.html#ga9fc4421dbb833d5461e6d4e59dcfde55',1,'glm::GLM_ALIGNED_TYPEDEF(highp_uint16_t, aligned_highp_uint16_t, 2)'],['../a00781.html#ga329f1e2b94b33ba5e3918197030bcf03',1,'glm::GLM_ALIGNED_TYPEDEF(highp_uint32_t, aligned_highp_uint32_t, 4)'],['../a00781.html#ga71e646f7e301aa422328194162c9c998',1,'glm::GLM_ALIGNED_TYPEDEF(highp_uint64_t, aligned_highp_uint64_t, 8)'],['../a00781.html#ga8942e09f479489441a7a5004c6d8cb66',1,'glm::GLM_ALIGNED_TYPEDEF(highp_u8, aligned_highp_u8, 1)'],['../a00781.html#gaab32497d6e4db16ee439dbedd64c5865',1,'glm::GLM_ALIGNED_TYPEDEF(highp_u16, aligned_highp_u16, 2)'],['../a00781.html#gaaadbb34952eca8e3d7fe122c3e167742',1,'glm::GLM_ALIGNED_TYPEDEF(highp_u32, aligned_highp_u32, 4)'],['../a00781.html#ga92024d27c74a3650afb55ec8e024ed25',1,'glm::GLM_ALIGNED_TYPEDEF(highp_u64, aligned_highp_u64, 8)'],['../a00781.html#gabde1d0b4072df35453db76075ab896a6',1,'glm::GLM_ALIGNED_TYPEDEF(uint8, aligned_uint8, 1)'],['../a00781.html#ga06c296c9e398b294c8c9dd2a7693dcbb',1,'glm::GLM_ALIGNED_TYPEDEF(uint16, aligned_uint16, 2)'],['../a00781.html#gacf1744488c96ebd33c9f36ad33b2010a',1,'glm::GLM_ALIGNED_TYPEDEF(uint32, aligned_uint32, 4)'],['../a00781.html#ga3328061a64c20ba59d5f9da24c2cd059',1,'glm::GLM_ALIGNED_TYPEDEF(uint64, aligned_uint64, 8)'],['../a00781.html#gaf6ced36f13bae57f377bafa6f5fcc299',1,'glm::GLM_ALIGNED_TYPEDEF(uint8_t, aligned_uint8_t, 1)'],['../a00781.html#gafbc7fb7847bfc78a339d1d371c915c73',1,'glm::GLM_ALIGNED_TYPEDEF(uint16_t, aligned_uint16_t, 2)'],['../a00781.html#gaa86bc56a73fd8120b1121b5f5e6245ae',1,'glm::GLM_ALIGNED_TYPEDEF(uint32_t, aligned_uint32_t, 4)'],['../a00781.html#ga68c0b9e669060d0eb5ab8c3ddeb483d8',1,'glm::GLM_ALIGNED_TYPEDEF(uint64_t, aligned_uint64_t, 8)'],['../a00781.html#ga4f3bab577daf3343e99cc005134bce86',1,'glm::GLM_ALIGNED_TYPEDEF(u8, aligned_u8, 1)'],['../a00781.html#ga13a2391339d0790d43b76d00a7611c4f',1,'glm::GLM_ALIGNED_TYPEDEF(u16, aligned_u16, 2)'],['../a00781.html#ga197570e03acbc3d18ab698e342971e8f',1,'glm::GLM_ALIGNED_TYPEDEF(u32, aligned_u32, 4)'],['../a00781.html#ga0f033b21e145a1faa32c62ede5878993',1,'glm::GLM_ALIGNED_TYPEDEF(u64, aligned_u64, 8)'],['../a00781.html#ga509af83527f5cd512e9a7873590663aa',1,'glm::GLM_ALIGNED_TYPEDEF(uvec1, aligned_uvec1, 4)'],['../a00781.html#ga94e86186978c502c6dc0c0d9c4a30679',1,'glm::GLM_ALIGNED_TYPEDEF(uvec2, aligned_uvec2, 8)'],['../a00781.html#ga5cec574686a7f3c8ed24bb195c5e2d0a',1,'glm::GLM_ALIGNED_TYPEDEF(uvec3, aligned_uvec3, 16)'],['../a00781.html#ga47edfdcee9c89b1ebdaf20450323b1d4',1,'glm::GLM_ALIGNED_TYPEDEF(uvec4, aligned_uvec4, 16)'],['../a00781.html#ga5611d6718e3a00096918a64192e73a45',1,'glm::GLM_ALIGNED_TYPEDEF(u8vec1, aligned_u8vec1, 1)'],['../a00781.html#ga19837e6f72b60d994a805ef564c6c326',1,'glm::GLM_ALIGNED_TYPEDEF(u8vec2, aligned_u8vec2, 2)'],['../a00781.html#ga9740cf8e34f068049b42a2753f9601c2',1,'glm::GLM_ALIGNED_TYPEDEF(u8vec3, aligned_u8vec3, 4)'],['../a00781.html#ga8b8588bb221448f5541a858903822a57',1,'glm::GLM_ALIGNED_TYPEDEF(u8vec4, aligned_u8vec4, 4)'],['../a00781.html#ga991abe990c16de26b2129d6bc2f4c051',1,'glm::GLM_ALIGNED_TYPEDEF(u16vec1, aligned_u16vec1, 2)'],['../a00781.html#gac01bb9fc32a1cd76c2b80d030f71df4c',1,'glm::GLM_ALIGNED_TYPEDEF(u16vec2, aligned_u16vec2, 4)'],['../a00781.html#ga09540dbca093793a36a8997e0d4bee77',1,'glm::GLM_ALIGNED_TYPEDEF(u16vec3, aligned_u16vec3, 8)'],['../a00781.html#gaecafb5996f5a44f57e34d29c8670741e',1,'glm::GLM_ALIGNED_TYPEDEF(u16vec4, aligned_u16vec4, 8)'],['../a00781.html#gac6b161a04d2f8408fe1c9d857e8daac0',1,'glm::GLM_ALIGNED_TYPEDEF(u32vec1, aligned_u32vec1, 4)'],['../a00781.html#ga1fa0dfc8feb0fa17dab2acd43e05342b',1,'glm::GLM_ALIGNED_TYPEDEF(u32vec2, aligned_u32vec2, 8)'],['../a00781.html#ga0019500abbfa9c66eff61ca75eaaed94',1,'glm::GLM_ALIGNED_TYPEDEF(u32vec3, aligned_u32vec3, 16)'],['../a00781.html#ga14fd29d01dae7b08a04e9facbcc18824',1,'glm::GLM_ALIGNED_TYPEDEF(u32vec4, aligned_u32vec4, 16)'],['../a00781.html#gab253845f534a67136f9619843cade903',1,'glm::GLM_ALIGNED_TYPEDEF(u64vec1, aligned_u64vec1, 8)'],['../a00781.html#ga929427a7627940cdf3304f9c050b677d',1,'glm::GLM_ALIGNED_TYPEDEF(u64vec2, aligned_u64vec2, 16)'],['../a00781.html#gae373b6c04fdf9879f33d63e6949c037e',1,'glm::GLM_ALIGNED_TYPEDEF(u64vec3, aligned_u64vec3, 32)'],['../a00781.html#ga53a8a03dca2015baec4584f45b8e9cdc',1,'glm::GLM_ALIGNED_TYPEDEF(u64vec4, aligned_u64vec4, 32)'],['../a00781.html#gab3301bae94ef5bf59fbdd9a24e7d2a01',1,'glm::GLM_ALIGNED_TYPEDEF(float32, aligned_float32, 4)'],['../a00781.html#gada9b0bea273d3ae0286f891533b9568f',1,'glm::GLM_ALIGNED_TYPEDEF(float32_t, aligned_float32_t, 4)'],['../a00781.html#gadbce23b9f23d77bb3884e289a574ebd5',1,'glm::GLM_ALIGNED_TYPEDEF(float32, aligned_f32, 4)'],['../a00781.html#ga75930684ff2233171c573e603f216162',1,'glm::GLM_ALIGNED_TYPEDEF(float64, aligned_float64, 8)'],['../a00781.html#ga6e3a2d83b131336219a0f4c7cbba2a48',1,'glm::GLM_ALIGNED_TYPEDEF(float64_t, aligned_float64_t, 8)'],['../a00781.html#gaa4deaa0dea930c393d55e7a4352b0a20',1,'glm::GLM_ALIGNED_TYPEDEF(float64, aligned_f64, 8)'],['../a00781.html#ga81bc497b2bfc6f80bab690c6ee28f0f9',1,'glm::GLM_ALIGNED_TYPEDEF(vec1, aligned_vec1, 4)'],['../a00781.html#gada3e8f783e9d4b90006695a16c39d4d4',1,'glm::GLM_ALIGNED_TYPEDEF(vec2, aligned_vec2, 8)'],['../a00781.html#gab8d081fac3a38d6f55fa552f32168d32',1,'glm::GLM_ALIGNED_TYPEDEF(vec3, aligned_vec3, 16)'],['../a00781.html#ga12fe7b9769c964c5b48dcfd8b7f40198',1,'glm::GLM_ALIGNED_TYPEDEF(vec4, aligned_vec4, 16)'],['../a00781.html#gaefab04611c7f8fe1fd9be3071efea6cc',1,'glm::GLM_ALIGNED_TYPEDEF(fvec1, aligned_fvec1, 4)'],['../a00781.html#ga2543c05ba19b3bd19d45b1227390c5b4',1,'glm::GLM_ALIGNED_TYPEDEF(fvec2, aligned_fvec2, 8)'],['../a00781.html#ga009afd727fd657ef33a18754d6d28f60',1,'glm::GLM_ALIGNED_TYPEDEF(fvec3, aligned_fvec3, 16)'],['../a00781.html#ga2f26177e74bfb301a3d0e02ec3c3ef53',1,'glm::GLM_ALIGNED_TYPEDEF(fvec4, aligned_fvec4, 16)'],['../a00781.html#ga309f495a1d6b75ddf195b674b65cb1e4',1,'glm::GLM_ALIGNED_TYPEDEF(f32vec1, aligned_f32vec1, 4)'],['../a00781.html#ga5e185865a2217d0cd47187644683a8c3',1,'glm::GLM_ALIGNED_TYPEDEF(f32vec2, aligned_f32vec2, 8)'],['../a00781.html#gade4458b27b039b9ca34f8ec049f3115a',1,'glm::GLM_ALIGNED_TYPEDEF(f32vec3, aligned_f32vec3, 16)'],['../a00781.html#ga2e8a12c5e6a9c4ae4ddaeda1d1cffe3b',1,'glm::GLM_ALIGNED_TYPEDEF(f32vec4, aligned_f32vec4, 16)'],['../a00781.html#ga3e0f35fa0c626285a8bad41707e7316c',1,'glm::GLM_ALIGNED_TYPEDEF(dvec1, aligned_dvec1, 8)'],['../a00781.html#ga78bfec2f185d1d365ea0a9ef1e3d45b8',1,'glm::GLM_ALIGNED_TYPEDEF(dvec2, aligned_dvec2, 16)'],['../a00781.html#ga01fe6fee6db5df580b6724a7e681f069',1,'glm::GLM_ALIGNED_TYPEDEF(dvec3, aligned_dvec3, 32)'],['../a00781.html#ga687d5b8f551d5af32425c0b2fba15e99',1,'glm::GLM_ALIGNED_TYPEDEF(dvec4, aligned_dvec4, 32)'],['../a00781.html#ga8e842371d46842ff8f1813419ba49d0f',1,'glm::GLM_ALIGNED_TYPEDEF(f64vec1, aligned_f64vec1, 8)'],['../a00781.html#ga32814aa0f19316b43134fc25f2aad2b9',1,'glm::GLM_ALIGNED_TYPEDEF(f64vec2, aligned_f64vec2, 16)'],['../a00781.html#gaf3d3bbc1e93909b689123b085e177a14',1,'glm::GLM_ALIGNED_TYPEDEF(f64vec3, aligned_f64vec3, 32)'],['../a00781.html#ga804c654cead1139bd250f90f9bb01fad',1,'glm::GLM_ALIGNED_TYPEDEF(f64vec4, aligned_f64vec4, 32)'],['../a00781.html#gacce4ac532880b8c7469d3c31974420a1',1,'glm::GLM_ALIGNED_TYPEDEF(mat2, aligned_mat2, 16)'],['../a00781.html#ga0498e0e249a6faddaf96aa55d7f81c3b',1,'glm::GLM_ALIGNED_TYPEDEF(mat3, aligned_mat3, 16)'],['../a00781.html#ga7435d87de82a0d652b35dc5b9cc718d5',1,'glm::GLM_ALIGNED_TYPEDEF(mat4, aligned_mat4, 16)'],['../a00781.html#ga719da577361541a4c43a2dd1d0e361e1',1,'glm::GLM_ALIGNED_TYPEDEF(fmat2x2, aligned_fmat2, 16)'],['../a00781.html#ga6e7ee4f541e1d7db66cd1a224caacafb',1,'glm::GLM_ALIGNED_TYPEDEF(fmat3x3, aligned_fmat3, 16)'],['../a00781.html#gae5d672d359f2a39f63f98c7975057486',1,'glm::GLM_ALIGNED_TYPEDEF(fmat4x4, aligned_fmat4, 16)'],['../a00781.html#ga6fa2df037dbfc5fe8c8e0b4db8a34953',1,'glm::GLM_ALIGNED_TYPEDEF(fmat2x2, aligned_fmat2x2, 16)'],['../a00781.html#ga0743b4f4f69a3227b82ff58f6abbad62',1,'glm::GLM_ALIGNED_TYPEDEF(fmat2x3, aligned_fmat2x3, 16)'],['../a00781.html#ga1a76b325fdf70f961d835edd182c63dd',1,'glm::GLM_ALIGNED_TYPEDEF(fmat2x4, aligned_fmat2x4, 16)'],['../a00781.html#ga4b4e181cd041ba28c3163e7b8074aef0',1,'glm::GLM_ALIGNED_TYPEDEF(fmat3x2, aligned_fmat3x2, 16)'],['../a00781.html#ga27b13f465abc8a40705698145e222c3f',1,'glm::GLM_ALIGNED_TYPEDEF(fmat3x3, aligned_fmat3x3, 16)'],['../a00781.html#ga2608d19cc275830a6f8c0b6405625a4f',1,'glm::GLM_ALIGNED_TYPEDEF(fmat3x4, aligned_fmat3x4, 16)'],['../a00781.html#ga93f09768241358a287c4cca538f1f7e7',1,'glm::GLM_ALIGNED_TYPEDEF(fmat4x2, aligned_fmat4x2, 16)'],['../a00781.html#ga7c117e3ecca089e10247b1d41d88aff9',1,'glm::GLM_ALIGNED_TYPEDEF(fmat4x3, aligned_fmat4x3, 16)'],['../a00781.html#ga07c75cd04ba42dc37fa3e105f89455c5',1,'glm::GLM_ALIGNED_TYPEDEF(fmat4x4, aligned_fmat4x4, 16)'],['../a00781.html#ga65ff0d690a34a4d7f46f9b2eb51525ee',1,'glm::GLM_ALIGNED_TYPEDEF(f32mat2x2, aligned_f32mat2, 16)'],['../a00781.html#gadd8ddbe2bf65ccede865ba2f510176dc',1,'glm::GLM_ALIGNED_TYPEDEF(f32mat3x3, aligned_f32mat3, 16)'],['../a00781.html#gaf18dbff14bf13d3ff540c517659ec045',1,'glm::GLM_ALIGNED_TYPEDEF(f32mat4x4, aligned_f32mat4, 16)'],['../a00781.html#ga66339f6139bf7ff19e245beb33f61cc8',1,'glm::GLM_ALIGNED_TYPEDEF(f32mat2x2, aligned_f32mat2x2, 16)'],['../a00781.html#ga1558a48b3934011b52612809f443e46d',1,'glm::GLM_ALIGNED_TYPEDEF(f32mat2x3, aligned_f32mat2x3, 16)'],['../a00781.html#gaa52e5732daa62851627021ad551c7680',1,'glm::GLM_ALIGNED_TYPEDEF(f32mat2x4, aligned_f32mat2x4, 16)'],['../a00781.html#gac09663c42566bcb58d23c6781ac4e85a',1,'glm::GLM_ALIGNED_TYPEDEF(f32mat3x2, aligned_f32mat3x2, 16)'],['../a00781.html#ga3f510999e59e1b309113e1d561162b29',1,'glm::GLM_ALIGNED_TYPEDEF(f32mat3x3, aligned_f32mat3x3, 16)'],['../a00781.html#ga2c9c94f0c89cd71ce56551db6cf4aaec',1,'glm::GLM_ALIGNED_TYPEDEF(f32mat3x4, aligned_f32mat3x4, 16)'],['../a00781.html#ga99ce8274c750fbfdf0e70c95946a2875',1,'glm::GLM_ALIGNED_TYPEDEF(f32mat4x2, aligned_f32mat4x2, 16)'],['../a00781.html#ga9476ef66790239df53dbe66f3989c3b5',1,'glm::GLM_ALIGNED_TYPEDEF(f32mat4x3, aligned_f32mat4x3, 16)'],['../a00781.html#gacc429b3b0b49921e12713b6d31e14e1d',1,'glm::GLM_ALIGNED_TYPEDEF(f32mat4x4, aligned_f32mat4x4, 16)'],['../a00781.html#ga88f6c6fa06e6e64479763e69444669cf',1,'glm::GLM_ALIGNED_TYPEDEF(f64mat2x2, aligned_f64mat2, 32)'],['../a00781.html#gaae8e4639c991e64754145ab8e4c32083',1,'glm::GLM_ALIGNED_TYPEDEF(f64mat3x3, aligned_f64mat3, 32)'],['../a00781.html#ga6e9094f3feb3b5b49d0f83683a101fde',1,'glm::GLM_ALIGNED_TYPEDEF(f64mat4x4, aligned_f64mat4, 32)'],['../a00781.html#gadbd2c639c03de1c3e9591b5a39f65559',1,'glm::GLM_ALIGNED_TYPEDEF(f64mat2x2, aligned_f64mat2x2, 32)'],['../a00781.html#gab059d7b9fe2094acc563b7223987499f',1,'glm::GLM_ALIGNED_TYPEDEF(f64mat2x3, aligned_f64mat2x3, 32)'],['../a00781.html#gabbc811d1c52ed2b8cfcaff1378f75c69',1,'glm::GLM_ALIGNED_TYPEDEF(f64mat2x4, aligned_f64mat2x4, 32)'],['../a00781.html#ga9ddf5212777734d2fd841a84439f3bdf',1,'glm::GLM_ALIGNED_TYPEDEF(f64mat3x2, aligned_f64mat3x2, 32)'],['../a00781.html#gad1dda32ed09f94bfcf0a7d8edfb6cf13',1,'glm::GLM_ALIGNED_TYPEDEF(f64mat3x3, aligned_f64mat3x3, 32)'],['../a00781.html#ga5875e0fa72f07e271e7931811cbbf31a',1,'glm::GLM_ALIGNED_TYPEDEF(f64mat3x4, aligned_f64mat3x4, 32)'],['../a00781.html#ga41e82cd6ac07f912ba2a2d45799dcf0d',1,'glm::GLM_ALIGNED_TYPEDEF(f64mat4x2, aligned_f64mat4x2, 32)'],['../a00781.html#ga0892638d6ba773043b3d63d1d092622e',1,'glm::GLM_ALIGNED_TYPEDEF(f64mat4x3, aligned_f64mat4x3, 32)'],['../a00781.html#ga912a16432608b822f1e13607529934c1',1,'glm::GLM_ALIGNED_TYPEDEF(f64mat4x4, aligned_f64mat4x4, 32)'],['../a00781.html#gafd945a8ea86b042aba410e0560df9a3d',1,'glm::GLM_ALIGNED_TYPEDEF(quat, aligned_quat, 16)'],['../a00781.html#ga19c2ba545d1f2f36bcb7b60c9a228622',1,'glm::GLM_ALIGNED_TYPEDEF(quat, aligned_fquat, 16)'],['../a00781.html#gaabc28c84a3288b697605d4688686f9a9',1,'glm::GLM_ALIGNED_TYPEDEF(dquat, aligned_dquat, 32)'],['../a00781.html#ga1ed8aeb5ca67fade269a46105f1bf273',1,'glm::GLM_ALIGNED_TYPEDEF(f32quat, aligned_f32quat, 16)'],['../a00781.html#ga95cc03b8b475993fa50e05e38e203303',1,'glm::GLM_ALIGNED_TYPEDEF(f64quat, aligned_f64quat, 32)']]], + ['golden_5fratio',['golden_ratio',['../a00708.html#ga748cf8642830657c5b7eae04d0a80899',1,'glm']]], + ['greaterthan',['greaterThan',['../a00663.html#ga8f7fa76e06c417b757ddfd438f3f677b',1,'glm::greaterThan(qua< T, Q > const &x, qua< T, Q > const &y)'],['../a00791.html#gadfdb8ea82deca869ddc7e63ea5a63ae4',1,'glm::greaterThan(vec< L, T, Q > const &x, vec< L, T, Q > const &y)']]], + ['greaterthanequal',['greaterThanEqual',['../a00663.html#ga388cbeba987dae7b5937f742efa49a5a',1,'glm::greaterThanEqual(qua< T, Q > const &x, qua< T, Q > const &y)'],['../a00791.html#ga859975f538940f8d18fe62f916b9abd7',1,'glm::greaterThanEqual(vec< L, T, Q > const &x, vec< L, T, Q > const &y)']]] +]; diff --git a/common/glm/doc/api/search/functions_7.html b/common/glm/doc/api/search/functions_7.html new file mode 100644 index 000000000..6e09abf1b --- /dev/null +++ b/common/glm/doc/api/search/functions_7.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/functions_7.js b/common/glm/doc/api/search/functions_7.js new file mode 100644 index 000000000..6c5d89aaa --- /dev/null +++ b/common/glm/doc/api/search/functions_7.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['half_5fpi',['half_pi',['../a00708.html#ga0c36b41d462e45641faf7d7938948bac',1,'glm']]], + ['hermite',['hermite',['../a00775.html#gaa69e143f6374d32f934a8edeaa50bac9',1,'glm']]], + ['highestbitvalue',['highestBitValue',['../a00726.html#ga0dcc8fe7c3d3ad60dea409281efa3d05',1,'glm::highestBitValue(genIUType Value)'],['../a00726.html#ga898ef075ccf809a1e480faab48fe96bf',1,'glm::highestBitValue(vec< L, T, Q > const &value)']]], + ['hsvcolor',['hsvColor',['../a00729.html#ga789802bec2d4fe0f9741c731b4a8a7d8',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/functions_8.html b/common/glm/doc/api/search/functions_8.html new file mode 100644 index 000000000..d59ea9719 --- /dev/null +++ b/common/glm/doc/api/search/functions_8.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/functions_8.js b/common/glm/doc/api/search/functions_8.js new file mode 100644 index 000000000..3d54621fd --- /dev/null +++ b/common/glm/doc/api/search/functions_8.js @@ -0,0 +1,31 @@ +var searchData= +[ + ['identity',['identity',['../a00668.html#ga81696f2b8d1db02ea1aff8da8f269314',1,'glm']]], + ['imulextended',['imulExtended',['../a00787.html#gac0c510a70e852f57594a9141848642e3',1,'glm']]], + ['infiniteperspective',['infinitePerspective',['../a00665.html#ga44fa38a18349450325cae2661bb115ca',1,'glm']]], + ['infiniteperspectivelh',['infinitePerspectiveLH',['../a00665.html#ga3201b30f5b3ea0f933246d87bfb992a9',1,'glm']]], + ['infiniteperspectiverh',['infinitePerspectiveRH',['../a00665.html#ga99672ffe5714ef478dab2437255fe7e1',1,'glm']]], + ['intbitstofloat',['intBitsToFloat',['../a00662.html#ga4fb7c21c2dce064b26fd9ccdaf9adcd4',1,'glm::intBitsToFloat(int const &v)'],['../a00662.html#ga7a0a8291a1cf3e1c2aee33030a1bd7b0',1,'glm::intBitsToFloat(vec< L, int, Q > const &v)']]], + ['intermediate',['intermediate',['../a00769.html#gacc5cd5f3e78de61d141c2355417424de',1,'glm']]], + ['interpolate',['interpolate',['../a00754.html#ga4e67863d150724b10c1ac00972dc958c',1,'glm']]], + ['intersectlinesphere',['intersectLineSphere',['../a00748.html#ga9c68139f3d8a4f3d7fe45f9dbc0de5b7',1,'glm']]], + ['intersectlinetriangle',['intersectLineTriangle',['../a00748.html#ga9d29b9b3acb504d43986502f42740df4',1,'glm']]], + ['intersectrayplane',['intersectRayPlane',['../a00748.html#gad3697a9700ea379739a667ea02573488',1,'glm']]], + ['intersectraysphere',['intersectRaySphere',['../a00748.html#gac88f8cd84c4bcb5b947d56acbbcfa56e',1,'glm::intersectRaySphere(genType const &rayStarting, genType const &rayNormalizedDirection, genType const &sphereCenter, typename genType::value_type const sphereRadiusSquered, typename genType::value_type &intersectionDistance)'],['../a00748.html#gad28c00515b823b579c608aafa1100c1d',1,'glm::intersectRaySphere(genType const &rayStarting, genType const &rayNormalizedDirection, genType const &sphereCenter, const typename genType::value_type sphereRadius, genType &intersectionPosition, genType &intersectionNormal)']]], + ['intersectraytriangle',['intersectRayTriangle',['../a00748.html#ga65bf2c594482f04881c36bc761f9e946',1,'glm']]], + ['inverse',['inverse',['../a00669.html#gab41da854ae678e23e114b598cbca4065',1,'glm::inverse(qua< T, Q > const &q)'],['../a00734.html#ga070f521a953f6461af4ab4cf8ccbf27e',1,'glm::inverse(tdualquat< T, Q > const &q)'],['../a00788.html#gaed509fe8129b01e4f20a6d0de5690091',1,'glm::inverse(mat< C, R, T, Q > const &m)']]], + ['inversesqrt',['inversesqrt',['../a00664.html#ga523dd6bd0ad9f75ae2d24c8e4b017b7a',1,'glm']]], + ['inversetranspose',['inverseTranspose',['../a00713.html#gab213cd0e3ead5f316d583f99d6312008',1,'glm']]], + ['iround',['iround',['../a00710.html#ga57824268ebe13a922f1d69a5d37f637f',1,'glm']]], + ['iscompnull',['isCompNull',['../a00785.html#gaf6ec1688eab7442fe96fe4941d5d4e76',1,'glm']]], + ['isdenormal',['isdenormal',['../a00731.html#ga74aa7c7462245d83bd5a9edf9c6c2d91',1,'glm']]], + ['isfinite',['isfinite',['../a00732.html#gaf4b04dcd3526996d68c1bfe17bfc8657',1,'glm::isfinite(genType const &x)'],['../a00732.html#gac3b12b8ac3014418fe53c299478b6603',1,'glm::isfinite(const vec< 1, T, Q > &x)'],['../a00732.html#ga8e76dc3e406ce6a4155c2b12a2e4b084',1,'glm::isfinite(const vec< 2, T, Q > &x)'],['../a00732.html#ga929ef27f896d902c1771a2e5e150fc97',1,'glm::isfinite(const vec< 3, T, Q > &x)'],['../a00732.html#ga19925badbe10ce61df1d0de00be0b5ad',1,'glm::isfinite(const vec< 4, T, Q > &x)']]], + ['isidentity',['isIdentity',['../a00757.html#gaee935d145581c82e82b154ccfd78ad91',1,'glm']]], + ['isinf',['isinf',['../a00662.html#ga2885587c23a106301f20443896365b62',1,'glm::isinf(vec< L, T, Q > const &x)'],['../a00669.html#ga45722741ea266b4e861938b365c5f362',1,'glm::isinf(qua< T, Q > const &x)']]], + ['ismultiple',['isMultiple',['../a00719.html#gaec593d33956a8fe43f78fccc63ddde9a',1,'glm::isMultiple(genIUType v, genIUType Multiple)'],['../a00719.html#ga354caf634ef333d9cb4844407416256a',1,'glm::isMultiple(vec< L, T, Q > const &v, T Multiple)'],['../a00719.html#gabb4360e38c0943d8981ba965dead519d',1,'glm::isMultiple(vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)']]], + ['isnan',['isnan',['../a00662.html#ga29ef934c00306490de837b4746b4e14d',1,'glm::isnan(vec< L, T, Q > const &x)'],['../a00669.html#ga1bb55f8963616502e96dc564384d8a03',1,'glm::isnan(qua< T, Q > const &x)']]], + ['isnormalized',['isNormalized',['../a00757.html#gae785af56f47ce220a1609f7f84aa077a',1,'glm::isNormalized(mat< 2, 2, T, Q > const &m, T const &epsilon)'],['../a00757.html#gaa068311695f28f5f555f5f746a6a66fb',1,'glm::isNormalized(mat< 3, 3, T, Q > const &m, T const &epsilon)'],['../a00757.html#ga4d9bb4d0465df49fedfad79adc6ce4ad',1,'glm::isNormalized(mat< 4, 4, T, Q > const &m, T const &epsilon)'],['../a00785.html#gac3c974f459fd75453134fad7ae89a39e',1,'glm::isNormalized(vec< L, T, Q > const &v, T const &epsilon)']]], + ['isnull',['isNull',['../a00757.html#ga9790ec222ce948c0ff0d8ce927340dba',1,'glm::isNull(mat< 2, 2, T, Q > const &m, T const &epsilon)'],['../a00757.html#gae14501c6b14ccda6014cc5350080103d',1,'glm::isNull(mat< 3, 3, T, Q > const &m, T const &epsilon)'],['../a00757.html#ga2b98bb30a9fefa7cdea5f1dcddba677b',1,'glm::isNull(mat< 4, 4, T, Q > const &m, T const &epsilon)'],['../a00785.html#gab4a3637dbcb4bb42dc55caea7a1e0495',1,'glm::isNull(vec< L, T, Q > const &v, T const &epsilon)']]], + ['isorthogonal',['isOrthogonal',['../a00757.html#ga58f3289f74dcab653387dd78ad93ca40',1,'glm']]], + ['ispoweroftwo',['isPowerOfTwo',['../a00719.html#gadf491730354aa7da67fbe23d4d688763',1,'glm::isPowerOfTwo(genIUType v)'],['../a00719.html#gabf2b61ded7049bcb13e25164f832a290',1,'glm::isPowerOfTwo(vec< L, T, Q > const &v)']]] +]; diff --git a/common/glm/doc/api/search/functions_9.html b/common/glm/doc/api/search/functions_9.html new file mode 100644 index 000000000..5ccec4291 --- /dev/null +++ b/common/glm/doc/api/search/functions_9.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/functions_9.js b/common/glm/doc/api/search/functions_9.js new file mode 100644 index 000000000..1f64e8594 --- /dev/null +++ b/common/glm/doc/api/search/functions_9.js @@ -0,0 +1,27 @@ +var searchData= +[ + ['l1norm',['l1Norm',['../a00760.html#gae2fc0b2aa967bebfd6a244700bff6997',1,'glm::l1Norm(vec< 3, T, Q > const &x, vec< 3, T, Q > const &y)'],['../a00760.html#ga1a7491e2037ceeb37f83ce41addfc0be',1,'glm::l1Norm(vec< 3, T, Q > const &v)']]], + ['l2norm',['l2Norm',['../a00760.html#ga41340b2ef40a9307ab0f137181565168',1,'glm::l2Norm(vec< 3, T, Q > const &x, vec< 3, T, Q > const &y)'],['../a00760.html#gae288bde8f0e41fb4ed62e65137b18cba',1,'glm::l2Norm(vec< 3, T, Q > const &x)']]], + ['ldexp',['ldexp',['../a00662.html#ga52e319d7289b849ec92055abd4830533',1,'glm']]], + ['lefthanded',['leftHanded',['../a00745.html#ga6f1bad193b9a3b048543d1935cf04dd3',1,'glm']]], + ['length',['length',['../a00675.html#gab703732449be6c7199369b3f9a91ed38',1,'glm::length(qua< T, Q > const &q)'],['../a00697.html#ga0cdabbb000834d994a1d6dc56f8f5263',1,'glm::length(vec< L, T, Q > const &x)']]], + ['length2',['length2',['../a00760.html#ga8d1789651050adb7024917984b41c3de',1,'glm::length2(vec< L, T, Q > const &x)'],['../a00769.html#ga58a609b1b8ab965f5df2702e8ca4e75b',1,'glm::length2(qua< T, Q > const &q)']]], + ['lerp',['lerp',['../a00669.html#ga6033dc0741051fa463a0a147ba29f293',1,'glm::lerp(qua< T, Q > const &x, qua< T, Q > const &y, T a)'],['../a00732.html#ga5494ba3a95ea6594c86fc75236886864',1,'glm::lerp(T x, T y, T a)'],['../a00732.html#gaa551c0a0e16d2d4608e49f7696df897f',1,'glm::lerp(const vec< 2, T, Q > &x, const vec< 2, T, Q > &y, T a)'],['../a00732.html#ga44a8b5fd776320f1713413dec959b32a',1,'glm::lerp(const vec< 3, T, Q > &x, const vec< 3, T, Q > &y, T a)'],['../a00732.html#ga89ac8e000199292ec7875519d27e214b',1,'glm::lerp(const vec< 4, T, Q > &x, const vec< 4, T, Q > &y, T a)'],['../a00732.html#gaf68de5baf72d16135368b8ef4f841604',1,'glm::lerp(const vec< 2, T, Q > &x, const vec< 2, T, Q > &y, const vec< 2, T, Q > &a)'],['../a00732.html#ga4ae1a616c8540a2649eab8e0cd051bb3',1,'glm::lerp(const vec< 3, T, Q > &x, const vec< 3, T, Q > &y, const vec< 3, T, Q > &a)'],['../a00732.html#gab5477ab69c40de4db5d58d3359529724',1,'glm::lerp(const vec< 4, T, Q > &x, const vec< 4, T, Q > &y, const vec< 4, T, Q > &a)'],['../a00734.html#gace8380112d16d33f520839cb35a4d173',1,'glm::lerp(tdualquat< T, Q > const &x, tdualquat< T, Q > const &y, T const &a)']]], + ['lessthan',['lessThan',['../a00663.html#gad091a2d22c8acfebfa92bcfca1dfe9c4',1,'glm::lessThan(qua< T, Q > const &x, qua< T, Q > const &y)'],['../a00791.html#gae90ed1592c395f93e3f3dfce6b2f39c6',1,'glm::lessThan(vec< L, T, Q > const &x, vec< L, T, Q > const &y)']]], + ['lessthanequal',['lessThanEqual',['../a00663.html#gac00012eea281800d2403f4ea8443134d',1,'glm::lessThanEqual(qua< T, Q > const &x, qua< T, Q > const &y)'],['../a00791.html#gab0bdafc019d227257ff73fb5bcca1718',1,'glm::lessThanEqual(vec< L, T, Q > const &x, vec< L, T, Q > const &y)']]], + ['levels',['levels',['../a00778.html#gaa8c377f4e63486db4fa872d77880da73',1,'glm']]], + ['lineargradient',['linearGradient',['../a00744.html#ga849241df1e55129b8ce9476200307419',1,'glm']]], + ['linearinterpolation',['linearInterpolation',['../a00735.html#ga290c3e47cb0a49f2e8abe90b1872b649',1,'glm']]], + ['linearrand',['linearRand',['../a00717.html#ga04e241ab88374a477a2c2ceadd2fa03d',1,'glm::linearRand(genType Min, genType Max)'],['../a00717.html#ga94731130c298a9ff5e5025fdee6d97a0',1,'glm::linearRand(vec< L, T, Q > const &Min, vec< L, T, Q > const &Max)']]], + ['ln_5fln_5ftwo',['ln_ln_two',['../a00708.html#gaca94292c839ed31a405ab7a81ae7e850',1,'glm']]], + ['ln_5ften',['ln_ten',['../a00708.html#gaf97ebc6c059ffd788e6c4946f71ef66c',1,'glm']]], + ['ln_5ftwo',['ln_two',['../a00708.html#ga24f4d27765678116f41a2f336ab7975c',1,'glm']]], + ['log',['log',['../a00664.html#ga918c9f3fd086ce20e6760c903bd30fa9',1,'glm::log(vec< L, T, Q > const &v)'],['../a00677.html#gaa5f7b20e296671b16ce25a2ab7ad5473',1,'glm::log(qua< T, Q > const &q)'],['../a00750.html#ga60a7b0a401da660869946b2b77c710c9',1,'glm::log(genType const &x, genType const &base)']]], + ['log2',['log2',['../a00664.html#ga82831c7d9cca777cebedfe03a19c8d75',1,'glm::log2(vec< L, T, Q > const &v)'],['../a00710.html#ga9bd682e74bfacb005c735305207ec417',1,'glm::log2(genIUType x)']]], + ['lookat',['lookAt',['../a00668.html#gaa64aa951a0e99136bba9008d2b59c78e',1,'glm']]], + ['lookatlh',['lookAtLH',['../a00668.html#gab2c09e25b0a16d3a9d89cc85bbae41b0',1,'glm']]], + ['lookatrh',['lookAtRH',['../a00668.html#gacfa12c8889c754846bc20c65d9b5c701',1,'glm']]], + ['lowestbitvalue',['lowestBitValue',['../a00726.html#ga2ff6568089f3a9b67f5c30918855fc6f',1,'glm']]], + ['luminosity',['luminosity',['../a00729.html#gad028e0a4f1a9c812b39439b746295b34',1,'glm']]], + ['lxnorm',['lxNorm',['../a00760.html#gacad23d30497eb16f67709f2375d1f66a',1,'glm::lxNorm(vec< 3, T, Q > const &x, vec< 3, T, Q > const &y, unsigned int Depth)'],['../a00760.html#gac61b6d81d796d6eb4d4183396a19ab91',1,'glm::lxNorm(vec< 3, T, Q > const &x, unsigned int Depth)']]] +]; diff --git a/common/glm/doc/api/search/functions_a.html b/common/glm/doc/api/search/functions_a.html new file mode 100644 index 000000000..3958eb7b9 --- /dev/null +++ b/common/glm/doc/api/search/functions_a.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/functions_a.js b/common/glm/doc/api/search/functions_a.js new file mode 100644 index 000000000..0a75f26c2 --- /dev/null +++ b/common/glm/doc/api/search/functions_a.js @@ -0,0 +1,36 @@ +var searchData= +[ + ['make_5fmat2',['make_mat2',['../a00722.html#ga04409e74dc3da251d2501acf5b4b546c',1,'glm']]], + ['make_5fmat2x2',['make_mat2x2',['../a00722.html#gae49e1c7bcd5abec74d1c34155031f663',1,'glm']]], + ['make_5fmat2x3',['make_mat2x3',['../a00722.html#ga21982104164789cf8985483aaefc25e8',1,'glm']]], + ['make_5fmat2x4',['make_mat2x4',['../a00722.html#ga078b862c90b0e9a79ed43a58997d8388',1,'glm']]], + ['make_5fmat3',['make_mat3',['../a00722.html#ga611ee7c4d4cadfc83a8fa8e1d10a170f',1,'glm']]], + ['make_5fmat3x2',['make_mat3x2',['../a00722.html#ga27a24e121dc39e6857620e0f85b6e1a8',1,'glm']]], + ['make_5fmat3x3',['make_mat3x3',['../a00722.html#gaf2e8337b15c3362aaeb6e5849e1c0536',1,'glm']]], + ['make_5fmat3x4',['make_mat3x4',['../a00722.html#ga05dd66232aedb993e3b8e7b35eaf932b',1,'glm']]], + ['make_5fmat4',['make_mat4',['../a00722.html#gae7bcedb710d1446c87fd1fc93ed8ee9a',1,'glm']]], + ['make_5fmat4x2',['make_mat4x2',['../a00722.html#ga8b34c9b25bf3310d8ff9c828c7e2d97c',1,'glm']]], + ['make_5fmat4x3',['make_mat4x3',['../a00722.html#ga0330bf6640092d7985fac92927bbd42b',1,'glm']]], + ['make_5fmat4x4',['make_mat4x4',['../a00722.html#ga8f084be30e404844bfbb4a551ac2728c',1,'glm']]], + ['make_5fquat',['make_quat',['../a00722.html#ga58110d7d81cf7d029e2bab7f8cd9b246',1,'glm']]], + ['make_5fvec1',['make_vec1',['../a00722.html#ga4135f03f3049f0a4eb76545c4967957c',1,'glm::make_vec1(vec< 1, T, Q > const &v)'],['../a00722.html#ga13c92b81e55f201b052a6404d57da220',1,'glm::make_vec1(vec< 2, T, Q > const &v)'],['../a00722.html#ga3c23cc74086d361e22bbd5e91a334e03',1,'glm::make_vec1(vec< 3, T, Q > const &v)'],['../a00722.html#ga6af06bb60d64ca8bcd169e3c93bc2419',1,'glm::make_vec1(vec< 4, T, Q > const &v)']]], + ['make_5fvec2',['make_vec2',['../a00722.html#ga8476d0e6f1b9b4a6193cc25f59d8a896',1,'glm::make_vec2(vec< 1, T, Q > const &v)'],['../a00722.html#gae54bd325a08ad26edf63929201adebc7',1,'glm::make_vec2(vec< 2, T, Q > const &v)'],['../a00722.html#ga0084fea4694cf47276e9cccbe7b1015a',1,'glm::make_vec2(vec< 3, T, Q > const &v)'],['../a00722.html#ga2b81f71f3a222fe5bba81e3983751249',1,'glm::make_vec2(vec< 4, T, Q > const &v)'],['../a00722.html#ga81253cf7b0ebfbb1e70540c5774e6824',1,'glm::make_vec2(T const *const ptr)']]], + ['make_5fvec3',['make_vec3',['../a00722.html#ga9147e4b3a5d0f4772edfbfd179d7ea0b',1,'glm::make_vec3(vec< 1, T, Q > const &v)'],['../a00722.html#ga482b60a842a5b154d3eed392417a9511',1,'glm::make_vec3(vec< 2, T, Q > const &v)'],['../a00722.html#gacd57046034df557b8b1c457f58613623',1,'glm::make_vec3(vec< 3, T, Q > const &v)'],['../a00722.html#ga8b589ed7d41a298b516d2a69169248f1',1,'glm::make_vec3(vec< 4, T, Q > const &v)'],['../a00722.html#gad9e0d36ff489cb30c65ad1fa40351651',1,'glm::make_vec3(T const *const ptr)']]], + ['make_5fvec4',['make_vec4',['../a00722.html#ga600cb97f70c5d50d3a4a145e1cafbf37',1,'glm::make_vec4(vec< 1, T, Q > const &v)'],['../a00722.html#gaa9bd116caf28196fd1cf00b278286fa7',1,'glm::make_vec4(vec< 2, T, Q > const &v)'],['../a00722.html#ga4036328ba4702c74cbdfad1fc03d1b8f',1,'glm::make_vec4(vec< 3, T, Q > const &v)'],['../a00722.html#gaa95cb15732f708f613e65a0578895ae5',1,'glm::make_vec4(vec< 4, T, Q > const &v)'],['../a00722.html#ga63f576518993efc22a969f18f80e29bb',1,'glm::make_vec4(T const *const ptr)']]], + ['mask',['mask',['../a00706.html#gad7eba518a0b71662114571ee76939f8a',1,'glm::mask(genIUType Bits)'],['../a00706.html#ga2e64e3b922a296033b825311e7f5fff1',1,'glm::mask(vec< L, T, Q > const &v)']]], + ['mat2x4_5fcast',['mat2x4_cast',['../a00734.html#gae99d143b37f9cad4cd9285571aab685a',1,'glm']]], + ['mat3_5fcast',['mat3_cast',['../a00663.html#ga333ab70047fbe4132406100c292dbc89',1,'glm']]], + ['mat3x4_5fcast',['mat3x4_cast',['../a00734.html#gaf59f5bb69620d2891c3795c6f2639179',1,'glm']]], + ['mat4_5fcast',['mat4_cast',['../a00663.html#ga1113212d9bdefc2e31ad40e5bbb506f3',1,'glm']]], + ['matrixcompmult',['matrixCompMult',['../a00788.html#gaf14569404c779fedca98d0b9b8e58c1f',1,'glm']]], + ['matrixcross3',['matrixCross3',['../a00751.html#ga5802386bb4c37b3332a3b6fd8b6960ff',1,'glm']]], + ['matrixcross4',['matrixCross4',['../a00751.html#ga20057fff91ddafa102934adb25458cde',1,'glm']]], + ['max',['max',['../a00662.html#gae02d42887fc5570451f880e3c624b9ac',1,'glm::max(genType x, genType y)'],['../a00662.html#ga03e45d6e60d1c36edb00c52edeea0f31',1,'glm::max(vec< L, T, Q > const &x, T y)'],['../a00662.html#gac1fec0c3303b572a6d4697a637213870',1,'glm::max(vec< L, T, Q > const &x, vec< L, T, Q > const &y)'],['../a00679.html#gaa20839d9ab14514f8966f69877ea0de8',1,'glm::max(T a, T b, T c)'],['../a00679.html#ga2274b5e75ed84b0b1e50d8d22f1f2f67',1,'glm::max(T a, T b, T c, T d)'],['../a00687.html#gaa45d34f6a2906f8bf58ab2ba5429234d',1,'glm::max(vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &z)'],['../a00687.html#ga94d42b8da2b4ded5ddf7504fbdc6bf10',1,'glm::max(vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &z, vec< L, T, Q > const &w)'],['../a00738.html#ga04991ccb9865c4c4e58488cfb209ce69',1,'glm::max(T const &x, T const &y, T const &z)'],['../a00738.html#gae1b7bbe5c91de4924835ea3e14530744',1,'glm::max(C< T > const &x, typename C< T >::T const &y, typename C< T >::T const &z)'],['../a00738.html#gaf832e9d4ab4826b2dda2fda25935a3a4',1,'glm::max(C< T > const &x, C< T > const &y, C< T > const &z)'],['../a00738.html#ga78e04a0cef1c4863fcae1a2130500d87',1,'glm::max(T const &x, T const &y, T const &z, T const &w)'],['../a00738.html#ga7cca8b53cfda402040494cdf40fbdf4a',1,'glm::max(C< T > const &x, typename C< T >::T const &y, typename C< T >::T const &z, typename C< T >::T const &w)'],['../a00738.html#gaacffbc466c2d08c140b181e7fd8a4858',1,'glm::max(C< T > const &x, C< T > const &y, C< T > const &z, C< T > const &w)']]], + ['min',['min',['../a00662.html#ga6cf8098827054a270ee36b18e30d471d',1,'glm::min(genType x, genType y)'],['../a00662.html#gaa7d015eba1f9f48519251f4abe69b14d',1,'glm::min(vec< L, T, Q > const &x, T y)'],['../a00662.html#ga31f49ef9e7d1beb003160c5e009b0c48',1,'glm::min(vec< L, T, Q > const &x, vec< L, T, Q > const &y)'],['../a00679.html#ga420b37cbd98c395b93dab0278305cd46',1,'glm::min(T a, T b, T c)'],['../a00679.html#ga0d24a9acb8178df77e4aff90cbb2010d',1,'glm::min(T a, T b, T c, T d)'],['../a00687.html#ga3cd83d80fd4f433d8e333593ec56dddf',1,'glm::min(vec< L, T, Q > const &a, vec< L, T, Q > const &b, vec< L, T, Q > const &c)'],['../a00687.html#gab66920ed064ab518d6859c5a889c4be4',1,'glm::min(vec< L, T, Q > const &a, vec< L, T, Q > const &b, vec< L, T, Q > const &c, vec< L, T, Q > const &d)'],['../a00738.html#ga713d3f9b3e76312c0d314e0c8611a6a6',1,'glm::min(T const &x, T const &y, T const &z)'],['../a00738.html#ga74d1a96e7cdbac40f6d35142d3bcbbd4',1,'glm::min(C< T > const &x, typename C< T >::T const &y, typename C< T >::T const &z)'],['../a00738.html#ga42b5c3fc027fd3d9a50d2ccc9126d9f0',1,'glm::min(C< T > const &x, C< T > const &y, C< T > const &z)'],['../a00738.html#ga95466987024d03039607f09e69813d69',1,'glm::min(T const &x, T const &y, T const &z, T const &w)'],['../a00738.html#ga4fe35dd31dd0c45693c9b60b830b8d47',1,'glm::min(C< T > const &x, typename C< T >::T const &y, typename C< T >::T const &z, typename C< T >::T const &w)'],['../a00738.html#ga7471ea4159eed8dd9ea4ac5d46c2fead',1,'glm::min(C< T > const &x, C< T > const &y, C< T > const &z, C< T > const &w)']]], + ['mirrorclamp',['mirrorClamp',['../a00786.html#gaa6856a0a048d2749252848da35e10c8b',1,'glm']]], + ['mirrorrepeat',['mirrorRepeat',['../a00786.html#ga16a89b0661b60d5bea85137bbae74d73',1,'glm']]], + ['mix',['mix',['../a00662.html#ga8e93f374aae27d1a88b921860351f8d4',1,'glm::mix(genTypeT x, genTypeT y, genTypeU a)'],['../a00669.html#gafbfe587b8da11fb89a30c3d67dd5ccc2',1,'glm::mix(qua< T, Q > const &x, qua< T, Q > const &y, T a)']]], + ['mixedproduct',['mixedProduct',['../a00759.html#gab3c6048fbb67f7243b088a4fee48d020',1,'glm']]], + ['mod',['mod',['../a00662.html#ga9b197a452cd52db3c5c18bac72bd7798',1,'glm::mod(vec< L, T, Q > const &x, vec< L, T, Q > const &y)'],['../a00747.html#gaabfbb41531ab7ad8d06fc176edfba785',1,'glm::mod(int x, int y)'],['../a00747.html#ga63fc8d63e7da1706439233b386ba8b6f',1,'glm::mod(uint x, uint y)']]], + ['modf',['modf',['../a00662.html#ga85e33f139b8db1b39b590a5713b9e679',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/functions_b.html b/common/glm/doc/api/search/functions_b.html new file mode 100644 index 000000000..b99b702d2 --- /dev/null +++ b/common/glm/doc/api/search/functions_b.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/functions_b.js b/common/glm/doc/api/search/functions_b.js new file mode 100644 index 000000000..6407d27d5 --- /dev/null +++ b/common/glm/doc/api/search/functions_b.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['next_5ffloat',['next_float',['../a00723.html#gae516ae554faa6117660828240e8bdaf0',1,'glm::next_float(genType const &x)'],['../a00723.html#gad107ec3d9697ef82032a33338a73ebdd',1,'glm::next_float(genType const &x, uint const &Distance)']]], + ['nlz',['nlz',['../a00747.html#ga78dff8bdb361bf0061194c93e003d189',1,'glm']]], + ['normalize',['normalize',['../a00675.html#gabf30e3263fffe8dcc6659aea76ae8927',1,'glm::normalize(qua< T, Q > const &q)'],['../a00697.html#ga3b8d3dcae77870781392ed2902cce597',1,'glm::normalize(vec< L, T, Q > const &x)'],['../a00734.html#ga299b8641509606b1958ffa104a162cfe',1,'glm::normalize(tdualquat< T, Q > const &q)']]], + ['normalizedot',['normalizeDot',['../a00762.html#gacb140a2b903115d318c8b0a2fb5a5daa',1,'glm']]], + ['not_5f',['not_',['../a00791.html#ga610fcd175791fd246e328ffee10dbf1e',1,'glm']]], + ['notequal',['notEqual',['../a00667.html#ga8504f18a7e2bf315393032c2137dad83',1,'glm::notEqual(mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y)'],['../a00667.html#ga29071147d118569344d10944b7d5c378',1,'glm::notEqual(mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y, T epsilon)'],['../a00667.html#gad7959e14fbc35b4ed2617daf4d67f6cd',1,'glm::notEqual(mat< C, R, T, Q > const &x, mat< C, R, T, Q > const &y, vec< C, T, Q > const &epsilon)'],['../a00676.html#gab441cee0de5867a868f3a586ee68cfe1',1,'glm::notEqual(qua< T, Q > const &x, qua< T, Q > const &y)'],['../a00676.html#ga5117a44c1bf21af857cd23e44a96d313',1,'glm::notEqual(qua< T, Q > const &x, qua< T, Q > const &y, T epsilon)'],['../a01376.html#a835ecf946c74f3d68be93e70b10821e7',1,'glm::notEqual(genType const &x, genType const &y, genType const &epsilon)'],['../a00694.html#ga4a99cc41341567567a608719449c1fac',1,'glm::notEqual(vec< L, T, Q > const &x, vec< L, T, Q > const &y, T epsilon)'],['../a00694.html#ga417cf51304359db18e819dda9bce5767',1,'glm::notEqual(vec< L, T, Q > const &x, vec< L, T, Q > const &y, vec< L, T, Q > const &epsilon)'],['../a00791.html#ga17c19dc1b76cd5aef63e9e7ff3aa3c27',1,'glm::notEqual(vec< L, T, Q > const &x, vec< L, T, Q > const &y)']]] +]; diff --git a/common/glm/doc/api/search/functions_c.html b/common/glm/doc/api/search/functions_c.html new file mode 100644 index 000000000..3a33d874d --- /dev/null +++ b/common/glm/doc/api/search/functions_c.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/functions_c.js b/common/glm/doc/api/search/functions_c.js new file mode 100644 index 000000000..a3bba2473 --- /dev/null +++ b/common/glm/doc/api/search/functions_c.js @@ -0,0 +1,24 @@ +var searchData= +[ + ['one',['one',['../a00708.html#ga39c2fb227631ca25894326529bdd1ee5',1,'glm']]], + ['one_5fover_5fpi',['one_over_pi',['../a00708.html#ga555150da2b06d23c8738981d5013e0eb',1,'glm']]], + ['one_5fover_5froot_5ftwo',['one_over_root_two',['../a00708.html#ga788fa23a0939bac4d1d0205fb4f35818',1,'glm']]], + ['one_5fover_5ftwo_5fpi',['one_over_two_pi',['../a00708.html#ga7c922b427986cbb2e4c6ac69874eefbc',1,'glm']]], + ['openbounded',['openBounded',['../a00731.html#gafd303042ba2ba695bf53b2315f53f93f',1,'glm']]], + ['orientate2',['orientate2',['../a00736.html#gae16738a9f1887cf4e4db6a124637608d',1,'glm']]], + ['orientate3',['orientate3',['../a00736.html#ga7ca98668a5786f19c7b38299ebbc9b4c',1,'glm::orientate3(T const &angle)'],['../a00736.html#ga7238c8e15c7720e3ca6a45ab151eeabb',1,'glm::orientate3(vec< 3, T, Q > const &angles)']]], + ['orientate4',['orientate4',['../a00736.html#ga4a044653f71a4ecec68e0b623382b48a',1,'glm']]], + ['orientation',['orientation',['../a00773.html#ga1a32fceb71962e6160e8af295c91930a',1,'glm']]], + ['orientedangle',['orientedAngle',['../a00784.html#ga9556a803dce87fe0f42fdabe4ebba1d5',1,'glm::orientedAngle(vec< 2, T, Q > const &x, vec< 2, T, Q > const &y)'],['../a00784.html#ga706fce3d111f485839756a64f5a48553',1,'glm::orientedAngle(vec< 3, T, Q > const &x, vec< 3, T, Q > const &y, vec< 3, T, Q > const &ref)']]], + ['ortho',['ortho',['../a00665.html#gae5b6b40ed882cd56cd7cb97701909c06',1,'glm::ortho(T left, T right, T bottom, T top)'],['../a00665.html#ga6615d8a9d39432e279c4575313ecb456',1,'glm::ortho(T left, T right, T bottom, T top, T zNear, T zFar)']]], + ['ortholh',['orthoLH',['../a00665.html#gad122a79aadaa5529cec4ac197203db7f',1,'glm']]], + ['ortholh_5fno',['orthoLH_NO',['../a00665.html#ga526416735ea7c5c5cd255bf99d051bd8',1,'glm']]], + ['ortholh_5fzo',['orthoLH_ZO',['../a00665.html#gab37ac3eec8d61f22fceda7775e836afa',1,'glm']]], + ['orthono',['orthoNO',['../a00665.html#gab219d28a8f178d4517448fcd6395a073',1,'glm']]], + ['orthonormalize',['orthonormalize',['../a00765.html#ga4cab5d698e6e2eccea30c8e81c74371f',1,'glm::orthonormalize(mat< 3, 3, T, Q > const &m)'],['../a00765.html#gac3bc7ef498815026bc3d361ae0b7138e',1,'glm::orthonormalize(vec< 3, T, Q > const &x, vec< 3, T, Q > const &y)']]], + ['orthorh',['orthoRH',['../a00665.html#ga16264c9b838edeb9dd1de7a1010a13a4',1,'glm']]], + ['orthorh_5fno',['orthoRH_NO',['../a00665.html#gaa2f7a1373170bf0a4a2ddef9b0706780',1,'glm']]], + ['orthorh_5fzo',['orthoRH_ZO',['../a00665.html#ga9aea2e515b08fd7dce47b7b6ec34d588',1,'glm']]], + ['orthozo',['orthoZO',['../a00665.html#gaea11a70817af2c0801c869dea0b7a5bc',1,'glm']]], + ['outerproduct',['outerProduct',['../a00788.html#gac29fb7bae75a8e4c1b74cbbf85520e50',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/functions_d.html b/common/glm/doc/api/search/functions_d.html new file mode 100644 index 000000000..31b75b889 --- /dev/null +++ b/common/glm/doc/api/search/functions_d.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/functions_d.js b/common/glm/doc/api/search/functions_d.js new file mode 100644 index 000000000..a03e6384c --- /dev/null +++ b/common/glm/doc/api/search/functions_d.js @@ -0,0 +1,82 @@ +var searchData= +[ + ['packdouble2x32',['packDouble2x32',['../a00789.html#gaa916ca426b2bb0343ba17e3753e245c2',1,'glm']]], + ['packf2x11_5f1x10',['packF2x11_1x10',['../a00716.html#ga4944ad465ff950e926d49621f916c78d',1,'glm']]], + ['packf3x9_5fe1x5',['packF3x9_E1x5',['../a00716.html#ga3f648fc205467792dc6d8c59c748f8a6',1,'glm']]], + ['packhalf',['packHalf',['../a00716.html#ga2d8bbce673ebc04831c1fb05c47f5251',1,'glm']]], + ['packhalf1x16',['packHalf1x16',['../a00716.html#ga43f2093b6ff192a79058ff7834fc3528',1,'glm']]], + ['packhalf2x16',['packHalf2x16',['../a00789.html#ga20f134b07db3a3d3a38efb2617388c92',1,'glm']]], + ['packhalf4x16',['packHalf4x16',['../a00716.html#gafe2f7b39caf8f5ec555e1c059ec530e6',1,'glm']]], + ['packi3x10_5f1x2',['packI3x10_1x2',['../a00716.html#ga06ecb6afb902dba45419008171db9023',1,'glm']]], + ['packint2x16',['packInt2x16',['../a00716.html#ga3644163cf3a47bf1d4af1f4b03013a7e',1,'glm']]], + ['packint2x32',['packInt2x32',['../a00716.html#gad1e4c8a9e67d86b61a6eec86703a827a',1,'glm']]], + ['packint2x8',['packInt2x8',['../a00716.html#ga8884b1f2292414f36d59ef3be5d62914',1,'glm']]], + ['packint4x16',['packInt4x16',['../a00716.html#ga1989f093a27ae69cf9207145be48b3d7',1,'glm']]], + ['packint4x8',['packInt4x8',['../a00716.html#gaf2238401d5ce2aaade1a44ba19709072',1,'glm']]], + ['packrgbm',['packRGBM',['../a00716.html#ga0466daf4c90f76cc64b3f105ce727295',1,'glm']]], + ['packsnorm',['packSnorm',['../a00716.html#gaa54b5855a750d6aeb12c1c902f5939b8',1,'glm']]], + ['packsnorm1x16',['packSnorm1x16',['../a00716.html#gab22f8bcfdb5fc65af4701b25f143c1af',1,'glm']]], + ['packsnorm1x8',['packSnorm1x8',['../a00716.html#gae3592e0795e62aaa1865b3a10496a7a1',1,'glm']]], + ['packsnorm2x16',['packSnorm2x16',['../a00789.html#ga977ab172da5494e5ac63e952afacfbe2',1,'glm']]], + ['packsnorm2x8',['packSnorm2x8',['../a00716.html#ga6be3cfb2cce3702f03e91bbeb5286d7e',1,'glm']]], + ['packsnorm3x10_5f1x2',['packSnorm3x10_1x2',['../a00716.html#gab997545661877d2c7362a5084d3897d3',1,'glm']]], + ['packsnorm4x16',['packSnorm4x16',['../a00716.html#ga358943934d21da947d5bcc88c2ab7832',1,'glm']]], + ['packsnorm4x8',['packSnorm4x8',['../a00789.html#ga85e8f17627516445026ab7a9c2e3531a',1,'glm']]], + ['packu3x10_5f1x2',['packU3x10_1x2',['../a00716.html#gada3d88d59f0f458f9c51a9fd359a4bc0',1,'glm']]], + ['packuint2x16',['packUint2x16',['../a00716.html#ga5eecc9e8cbaf51ac6cf57501e670ee19',1,'glm']]], + ['packuint2x32',['packUint2x32',['../a00716.html#gaa864081097b86e83d8e4a4d79c382b22',1,'glm']]], + ['packuint2x8',['packUint2x8',['../a00716.html#ga3c3c9fb53ae7823b10fa083909357590',1,'glm']]], + ['packuint4x16',['packUint4x16',['../a00716.html#ga2ceb62cca347d8ace42ee90317a3f1f9',1,'glm']]], + ['packuint4x8',['packUint4x8',['../a00716.html#gaa0fe2f09aeb403cd66c1a062f58861ab',1,'glm']]], + ['packunorm',['packUnorm',['../a00716.html#gaccd3f27e6ba5163eb7aa9bc8ff96251a',1,'glm']]], + ['packunorm1x16',['packUnorm1x16',['../a00716.html#ga9f82737bf2a44bedff1d286b76837886',1,'glm']]], + ['packunorm1x5_5f1x6_5f1x5',['packUnorm1x5_1x6_1x5',['../a00716.html#ga768e0337dd6246773f14aa0a421fe9a8',1,'glm']]], + ['packunorm1x8',['packUnorm1x8',['../a00716.html#ga4b2fa60df3460403817d28b082ee0736',1,'glm']]], + ['packunorm2x16',['packUnorm2x16',['../a00789.html#ga0e2d107039fe608a209497af867b85fb',1,'glm']]], + ['packunorm2x3_5f1x2',['packUnorm2x3_1x2',['../a00716.html#ga7f9abdb50f9be1aa1c14912504a0d98d',1,'glm']]], + ['packunorm2x4',['packUnorm2x4',['../a00716.html#gab6bbd5be3b8e6db538ecb33a7844481c',1,'glm']]], + ['packunorm2x8',['packUnorm2x8',['../a00716.html#ga9a666b1c688ab54100061ed06526de6e',1,'glm']]], + ['packunorm3x10_5f1x2',['packUnorm3x10_1x2',['../a00716.html#ga8a1ee625d2707c60530fb3fca2980b19',1,'glm']]], + ['packunorm3x5_5f1x1',['packUnorm3x5_1x1',['../a00716.html#gaec4112086d7fb133bea104a7c237de52',1,'glm']]], + ['packunorm4x16',['packUnorm4x16',['../a00716.html#ga1f63c264e7ab63264e2b2a99fd393897',1,'glm']]], + ['packunorm4x4',['packUnorm4x4',['../a00716.html#gad3e7e3ce521513584a53aedc5f9765c1',1,'glm']]], + ['packunorm4x8',['packUnorm4x8',['../a00789.html#gaf7d2f7341a9eeb4a436929d6f9ad08f2',1,'glm']]], + ['perlin',['perlin',['../a00715.html#ga1e043ce3b51510e9bc4469227cefc38a',1,'glm::perlin(vec< L, T, Q > const &p)'],['../a00715.html#gac270edc54c5fc52f5985a45f940bb103',1,'glm::perlin(vec< L, T, Q > const &p, vec< L, T, Q > const &rep)']]], + ['perp',['perp',['../a00766.html#ga264cfc4e180cf9b852e943b35089003c',1,'glm']]], + ['perspective',['perspective',['../a00665.html#ga747c8cf99458663dd7ad1bb3a2f07787',1,'glm']]], + ['perspectivefov',['perspectiveFov',['../a00665.html#gaebd02240fd36e85ad754f02ddd9a560d',1,'glm']]], + ['perspectivefovlh',['perspectiveFovLH',['../a00665.html#ga6aebe16c164bd8e52554cbe0304ef4aa',1,'glm']]], + ['perspectivefovlh_5fno',['perspectiveFovLH_NO',['../a00665.html#gad18a4495b77530317327e8d466488c1a',1,'glm']]], + ['perspectivefovlh_5fzo',['perspectiveFovLH_ZO',['../a00665.html#gabdd37014f529e25b2fa1b3ba06c10d5c',1,'glm']]], + ['perspectivefovno',['perspectiveFovNO',['../a00665.html#gaf30e7bd3b1387a6776433dd5383e6633',1,'glm']]], + ['perspectivefovrh',['perspectiveFovRH',['../a00665.html#gaf32bf563f28379c68554a44ee60c6a85',1,'glm']]], + ['perspectivefovrh_5fno',['perspectiveFovRH_NO',['../a00665.html#ga257b733ff883c9a065801023cf243eb2',1,'glm']]], + ['perspectivefovrh_5fzo',['perspectiveFovRH_ZO',['../a00665.html#ga7dcbb25331676f5b0795aced1a905c44',1,'glm']]], + ['perspectivefovzo',['perspectiveFovZO',['../a00665.html#ga4bc69fa1d1f95128430aa3d2a712390b',1,'glm']]], + ['perspectivelh',['perspectiveLH',['../a00665.html#ga9bd34951dc7022ac256fcb51d7f6fc2f',1,'glm']]], + ['perspectivelh_5fno',['perspectiveLH_NO',['../a00665.html#gaead4d049d1feab463b700b5641aa590e',1,'glm']]], + ['perspectivelh_5fzo',['perspectiveLH_ZO',['../a00665.html#gaca32af88c2719005c02817ad1142986c',1,'glm']]], + ['perspectiveno',['perspectiveNO',['../a00665.html#gaf497e6bca61e7c87088370b126a93758',1,'glm']]], + ['perspectiverh',['perspectiveRH',['../a00665.html#ga26b88757fbd90601b80768a7e1ad3aa1',1,'glm']]], + ['perspectiverh_5fno',['perspectiveRH_NO',['../a00665.html#gad1526cb2cbe796095284e8f34b01c582',1,'glm']]], + ['perspectiverh_5fzo',['perspectiveRH_ZO',['../a00665.html#ga4da358d6e1b8e5b9ae35d1f3f2dc3b9a',1,'glm']]], + ['perspectivezo',['perspectiveZO',['../a00665.html#gaa9dfba5c2322da54f72b1eb7c7c11b47',1,'glm']]], + ['pi',['pi',['../a00680.html#ga94bafeb2a0f23ab6450fed1f98ee4e45',1,'glm']]], + ['pickmatrix',['pickMatrix',['../a00666.html#gaf6b21eadb7ac2ecbbe258a9a233b4c82',1,'glm']]], + ['pitch',['pitch',['../a00663.html#ga7603e81477b46ddb448896909bc04928',1,'glm']]], + ['polar',['polar',['../a00767.html#gab83ac2c0e55b684b06b6c46c28b1590d',1,'glm']]], + ['pow',['pow',['../a00664.html#ga2254981952d4f333b900a6bf5167a6c4',1,'glm::pow(vec< L, T, Q > const &base, vec< L, T, Q > const &exponent)'],['../a00677.html#ga4975ffcacd312a8c0bbd046a76c5607e',1,'glm::pow(qua< T, Q > const &q, T y)'],['../a00747.html#ga465016030a81d513fa2fac881ebdaa83',1,'glm::pow(int x, uint y)'],['../a00747.html#ga998e5ee915d3769255519e2fbaa2bbf0',1,'glm::pow(uint x, uint y)']]], + ['pow2',['pow2',['../a00764.html#ga19aaff3213bf23bdec3ef124ace237e9',1,'glm::gtx']]], + ['pow3',['pow3',['../a00764.html#ga35689d03cd434d6ea819f1942d3bf82e',1,'glm::gtx']]], + ['pow4',['pow4',['../a00764.html#gacef0968763026e180e53e735007dbf5a',1,'glm::gtx']]], + ['poweroftwoabove',['powerOfTwoAbove',['../a00726.html#ga8cda2459871f574a0aecbe702ac93291',1,'glm::powerOfTwoAbove(genIUType Value)'],['../a00726.html#ga2bbded187c5febfefc1e524ba31b3fab',1,'glm::powerOfTwoAbove(vec< L, T, Q > const &value)']]], + ['poweroftwobelow',['powerOfTwoBelow',['../a00726.html#ga3de7df63c589325101a2817a56f8e29d',1,'glm::powerOfTwoBelow(genIUType Value)'],['../a00726.html#gaf78ddcc4152c051b2a21e68fecb10980',1,'glm::powerOfTwoBelow(vec< L, T, Q > const &value)']]], + ['poweroftwonearest',['powerOfTwoNearest',['../a00726.html#ga5f65973a5d2ea38c719e6a663149ead9',1,'glm::powerOfTwoNearest(genIUType Value)'],['../a00726.html#gac87e65d11e16c3d6b91c3bcfaef7da0b',1,'glm::powerOfTwoNearest(vec< L, T, Q > const &value)']]], + ['prev_5ffloat',['prev_float',['../a00723.html#ga2fcbb7bfbfc595712bfddc51b0715b07',1,'glm::prev_float(genType const &x)'],['../a00723.html#gaa399d5b6472a70e8952f9b26ecaacdec',1,'glm::prev_float(genType const &x, uint const &Distance)']]], + ['proj',['proj',['../a00768.html#ga58384b7170801dd513de46f87c7fb00e',1,'glm']]], + ['proj2d',['proj2D',['../a00780.html#ga5b992a0cdc8298054edb68e228f0d93e',1,'glm']]], + ['proj3d',['proj3D',['../a00780.html#gaa2b7f4f15b98f697caede11bef50509e',1,'glm']]], + ['project',['project',['../a00666.html#gaf36e96033f456659e6705472a06b6e11',1,'glm']]], + ['projectno',['projectNO',['../a00666.html#ga05249751f48d14cb282e4979802b8111',1,'glm']]], + ['projectzo',['projectZO',['../a00666.html#ga77d157525063dec83a557186873ee080',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/functions_e.html b/common/glm/doc/api/search/functions_e.html new file mode 100644 index 000000000..cddb9bb58 --- /dev/null +++ b/common/glm/doc/api/search/functions_e.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/functions_e.js b/common/glm/doc/api/search/functions_e.js new file mode 100644 index 000000000..4a9804fc7 --- /dev/null +++ b/common/glm/doc/api/search/functions_e.js @@ -0,0 +1,19 @@ +var searchData= +[ + ['qr_5fdecompose',['qr_decompose',['../a00753.html#ga77022dca1aa38add548f9f56a9f8071a',1,'glm']]], + ['quadraticeasein',['quadraticEaseIn',['../a00735.html#gaf42089d35855695132d217cd902304a0',1,'glm']]], + ['quadraticeaseinout',['quadraticEaseInOut',['../a00735.html#ga03e8fc2d7945a4e63ee33b2159c14cea',1,'glm']]], + ['quadraticeaseout',['quadraticEaseOut',['../a00735.html#ga283717bc2d937547ad34ec0472234ee3',1,'glm']]], + ['quarter_5fpi',['quarter_pi',['../a00708.html#ga3c9df42bd73c519a995c43f0f99e77e0',1,'glm']]], + ['quarticeasein',['quarticEaseIn',['../a00735.html#ga808b41f14514f47dad5dcc69eb924afd',1,'glm']]], + ['quarticeaseinout',['quarticEaseInOut',['../a00735.html#ga6d000f852de12b197e154f234b20c505',1,'glm']]], + ['quarticeaseout',['quarticEaseOut',['../a00735.html#ga4dfb33fa7664aa888eb647999d329b98',1,'glm']]], + ['quat_5fcast',['quat_cast',['../a00663.html#ga1108a4ab88ca87bac321454eea7702f8',1,'glm::quat_cast(mat< 3, 3, T, Q > const &x)'],['../a00663.html#ga4524810f07f72e8c7bdc7764fa11cb58',1,'glm::quat_cast(mat< 4, 4, T, Q > const &x)']]], + ['quat_5fidentity',['quat_identity',['../a00769.html#ga5ee8332600b2aca3a77622a28d857b55',1,'glm']]], + ['quatlookat',['quatLookAt',['../a00663.html#gabe7fc5ec5feb41ab234d5d2b6254697f',1,'glm']]], + ['quatlookatlh',['quatLookAtLH',['../a00663.html#ga2da350c73411be3bb19441b226b81a74',1,'glm']]], + ['quatlookatrh',['quatLookAtRH',['../a00663.html#gaf6529ac8c04a57fcc35865b5c9437cc8',1,'glm']]], + ['quinticeasein',['quinticEaseIn',['../a00735.html#ga097579d8e087dcf48037588140a21640',1,'glm']]], + ['quinticeaseinout',['quinticEaseInOut',['../a00735.html#ga2a82d5c46df7e2d21cc0108eb7b83934',1,'glm']]], + ['quinticeaseout',['quinticEaseOut',['../a00735.html#ga7dbd4d5c8da3f5353121f615e7b591d7',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/functions_f.html b/common/glm/doc/api/search/functions_f.html new file mode 100644 index 000000000..496729261 --- /dev/null +++ b/common/glm/doc/api/search/functions_f.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/functions_f.js b/common/glm/doc/api/search/functions_f.js new file mode 100644 index 000000000..2ab93e04c --- /dev/null +++ b/common/glm/doc/api/search/functions_f.js @@ -0,0 +1,35 @@ +var searchData= +[ + ['radialgradient',['radialGradient',['../a00744.html#gaaecb1e93de4cbe0758b882812d4da294',1,'glm']]], + ['radians',['radians',['../a00790.html#ga6e1db4862c5e25afd553930e2fdd6a68',1,'glm']]], + ['reflect',['reflect',['../a00697.html#ga5631dd1d5618de5450b1ea3cf3e94905',1,'glm']]], + ['refract',['refract',['../a00697.html#ga01da3dff9e2ef6b9d4915c3047e22b74',1,'glm']]], + ['repeat',['repeat',['../a00786.html#ga809650c6310ea7c42666e918c117fb6f',1,'glm']]], + ['rgb2ycocg',['rgb2YCoCg',['../a00730.html#ga0606353ec2a9b9eaa84f1b02ec391bc5',1,'glm']]], + ['rgb2ycocgr',['rgb2YCoCgR',['../a00730.html#ga0389772e44ca0fd2ba4a79bdd8efe898',1,'glm']]], + ['rgbcolor',['rgbColor',['../a00729.html#ga5f9193be46f45f0655c05a0cdca006db',1,'glm']]], + ['righthanded',['rightHanded',['../a00745.html#ga99386a5ab5491871b947076e21699cc8',1,'glm']]], + ['roll',['roll',['../a00663.html#ga0cc5ad970d0b00829b139fe0fe5a1e13',1,'glm']]], + ['root_5ffive',['root_five',['../a00708.html#gae9ebbded75b53d4faeb1e4ef8b3347a2',1,'glm']]], + ['root_5fhalf_5fpi',['root_half_pi',['../a00708.html#ga4e276cb823cc5e612d4f89ed99c75039',1,'glm']]], + ['root_5fln_5ffour',['root_ln_four',['../a00708.html#ga4129412e96b33707a77c1a07652e23e2',1,'glm']]], + ['root_5fpi',['root_pi',['../a00708.html#ga261380796b2cd496f68d2cf1d08b8eb9',1,'glm']]], + ['root_5fthree',['root_three',['../a00708.html#ga4f286be4abe88be1eed7d2a9f6cb193e',1,'glm']]], + ['root_5ftwo',['root_two',['../a00708.html#ga74e607d29020f100c0d0dc46ce2ca950',1,'glm']]], + ['root_5ftwo_5fpi',['root_two_pi',['../a00708.html#ga2bcedc575039fe0cd765742f8bbb0bd3',1,'glm']]], + ['rotate',['rotate',['../a00668.html#gaee9e865eaa9776370996da2940873fd4',1,'glm::rotate(mat< 4, 4, T, Q > const &m, T angle, vec< 3, T, Q > const &axis)'],['../a00677.html#gabfc57de6d4d2e11970f54119c5ccf0f5',1,'glm::rotate(qua< T, Q > const &q, T const &angle, vec< 3, T, Q > const &axis)'],['../a00758.html#gad5c84a4932a758f385a87098ce1b1660',1,'glm::rotate(mat< 3, 3, T, Q > const &m, T angle)'],['../a00769.html#ga07da6ef58646442efe93b0c273d73776',1,'glm::rotate(qua< T, Q > const &q, vec< 3, T, Q > const &v)'],['../a00769.html#gafcb78dfff45fbf19a7fcb2bd03fbf196',1,'glm::rotate(qua< T, Q > const &q, vec< 4, T, Q > const &v)'],['../a00773.html#gab64a67b52ff4f86c3ba16595a5a25af6',1,'glm::rotate(vec< 2, T, Q > const &v, T const &angle)'],['../a00773.html#ga1ba501ef83d1a009a17ac774cc560f21',1,'glm::rotate(vec< 3, T, Q > const &v, T const &angle, vec< 3, T, Q > const &normal)'],['../a00773.html#ga1005f1267ed9c57faa3f24cf6873b961',1,'glm::rotate(vec< 4, T, Q > const &v, T const &angle, vec< 3, T, Q > const &normal)'],['../a00779.html#gaf599be4c0e9d99be1f9cddba79b6018b',1,'glm::rotate(T angle, vec< 3, T, Q > const &v)']]], + ['rotatenormalizedaxis',['rotateNormalizedAxis',['../a00772.html#ga50efd7ebca0f7a603bb3cc11e34c708d',1,'glm::rotateNormalizedAxis(mat< 4, 4, T, Q > const &m, T const &angle, vec< 3, T, Q > const &axis)'],['../a00772.html#ga08f9c5411437d528019a25bfc01473d1',1,'glm::rotateNormalizedAxis(qua< T, Q > const &q, T const &angle, vec< 3, T, Q > const &axis)']]], + ['rotatex',['rotateX',['../a00773.html#ga059fdbdba4cca35cdff172a9d0d0afc9',1,'glm::rotateX(vec< 3, T, Q > const &v, T const &angle)'],['../a00773.html#ga4333b1ea8ebf1bd52bc3801a7617398a',1,'glm::rotateX(vec< 4, T, Q > const &v, T const &angle)']]], + ['rotatey',['rotateY',['../a00773.html#gaebdc8b054ace27d9f62e054531c6f44d',1,'glm::rotateY(vec< 3, T, Q > const &v, T const &angle)'],['../a00773.html#ga3ce3db0867b7f8efd878ee34f95a623b',1,'glm::rotateY(vec< 4, T, Q > const &v, T const &angle)']]], + ['rotatez',['rotateZ',['../a00773.html#ga5a048838a03f6249acbacb4dbacf79c4',1,'glm::rotateZ(vec< 3, T, Q > const &v, T const &angle)'],['../a00773.html#ga923b75c6448161053768822d880702e6',1,'glm::rotateZ(vec< 4, T, Q > const &v, T const &angle)']]], + ['rotation',['rotation',['../a00769.html#ga03e61282831cc3f52cc76f72f52ad2c5',1,'glm']]], + ['round',['round',['../a00662.html#gafa03aca8c4713e1cc892aa92ca135a7e',1,'glm']]], + ['roundeven',['roundEven',['../a00662.html#ga76b81785045a057989a84d99aeeb1578',1,'glm']]], + ['roundmultiple',['roundMultiple',['../a00719.html#gab892defcc9c0b0618df7251253dc0fbb',1,'glm::roundMultiple(genType v, genType Multiple)'],['../a00719.html#ga2f1a68332d761804c054460a612e3a4b',1,'glm::roundMultiple(vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)']]], + ['roundpoweroftwo',['roundPowerOfTwo',['../a00719.html#gae4e1bf5d1cd179f59261a7342bdcafca',1,'glm::roundPowerOfTwo(genIUType v)'],['../a00719.html#ga258802a7d55c03c918f28cf4d241c4d0',1,'glm::roundPowerOfTwo(vec< L, T, Q > const &v)']]], + ['row',['row',['../a00711.html#ga259e5ebd0f31ec3f83440f8cae7f5dba',1,'glm::row(genType const &m, length_t index)'],['../a00711.html#gaadcc64829aadf4103477679e48c7594f',1,'glm::row(genType const &m, length_t index, typename genType::row_type const &x)']]], + ['rowmajor2',['rowMajor2',['../a00755.html#gaf5b1aee9e3eb1acf9d6c3c8be1e73bb8',1,'glm::rowMajor2(vec< 2, T, Q > const &v1, vec< 2, T, Q > const &v2)'],['../a00755.html#gaf66c75ed69ca9e87462550708c2c6726',1,'glm::rowMajor2(mat< 2, 2, T, Q > const &m)']]], + ['rowmajor3',['rowMajor3',['../a00755.html#ga2ae46497493339f745754e40f438442e',1,'glm::rowMajor3(vec< 3, T, Q > const &v1, vec< 3, T, Q > const &v2, vec< 3, T, Q > const &v3)'],['../a00755.html#gad8a3a50ab47bbe8d36cdb81d90dfcf77',1,'glm::rowMajor3(mat< 3, 3, T, Q > const &m)']]], + ['rowmajor4',['rowMajor4',['../a00755.html#ga9636cd6bbe2c32a8d0c03ffb8b1ef284',1,'glm::rowMajor4(vec< 4, T, Q > const &v1, vec< 4, T, Q > const &v2, vec< 4, T, Q > const &v3, vec< 4, T, Q > const &v4)'],['../a00755.html#gac92ad1c2acdf18d3eb7be45a32f9566b',1,'glm::rowMajor4(mat< 4, 4, T, Q > const &m)']]], + ['rq_5fdecompose',['rq_decompose',['../a00753.html#ga4e022709c9e7eaad9d7cc315d2cdb05c',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/groups_0.html b/common/glm/doc/api/search/groups_0.html new file mode 100644 index 000000000..f4895cb40 --- /dev/null +++ b/common/glm/doc/api/search/groups_0.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/groups_0.js b/common/glm/doc/api/search/groups_0.js new file mode 100644 index 000000000..fa41c7685 --- /dev/null +++ b/common/glm/doc/api/search/groups_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['angle_20and_20trigonometry_20functions',['Angle and Trigonometry Functions',['../a00790.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/groups_1.html b/common/glm/doc/api/search/groups_1.html new file mode 100644 index 000000000..31952659a --- /dev/null +++ b/common/glm/doc/api/search/groups_1.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/groups_1.js b/common/glm/doc/api/search/groups_1.js new file mode 100644 index 000000000..5271671e3 --- /dev/null +++ b/common/glm/doc/api/search/groups_1.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['core_20features',['Core features',['../a00698.html',1,'']]], + ['common_20functions',['Common functions',['../a00662.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/groups_2.html b/common/glm/doc/api/search/groups_2.html new file mode 100644 index 000000000..58824467c --- /dev/null +++ b/common/glm/doc/api/search/groups_2.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/groups_2.js b/common/glm/doc/api/search/groups_2.js new file mode 100644 index 000000000..414d5c67a --- /dev/null +++ b/common/glm/doc/api/search/groups_2.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['exponential_20functions',['Exponential functions',['../a00664.html',1,'']]], + ['experimental_20extensions',['Experimental extensions',['../a00705.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/groups_3.html b/common/glm/doc/api/search/groups_3.html new file mode 100644 index 000000000..bd23aa6e1 --- /dev/null +++ b/common/glm/doc/api/search/groups_3.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/groups_3.js b/common/glm/doc/api/search/groups_3.js new file mode 100644 index 000000000..2061ee40f --- /dev/null +++ b/common/glm/doc/api/search/groups_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['floating_2dpoint_20pack_20and_20unpack_20functions',['Floating-Point Pack and Unpack Functions',['../a00789.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/groups_4.html b/common/glm/doc/api/search/groups_4.html new file mode 100644 index 000000000..34edffce9 --- /dev/null +++ b/common/glm/doc/api/search/groups_4.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/groups_4.js b/common/glm/doc/api/search/groups_4.js new file mode 100644 index 000000000..0edf75d74 --- /dev/null +++ b/common/glm/doc/api/search/groups_4.js @@ -0,0 +1,118 @@ +var searchData= +[ + ['geometric_20functions',['Geometric functions',['../a00697.html',1,'']]], + ['glm_5fext_5fmatrix_5fclip_5fspace',['GLM_EXT_matrix_clip_space',['../a00665.html',1,'']]], + ['glm_5fext_5fmatrix_5fprojection',['GLM_EXT_matrix_projection',['../a00666.html',1,'']]], + ['glm_5fext_5fmatrix_5frelational',['GLM_EXT_matrix_relational',['../a00667.html',1,'']]], + ['glm_5fext_5fmatrix_5ftransform',['GLM_EXT_matrix_transform',['../a00668.html',1,'']]], + ['glm_5fext_5fquaternion_5fcommon',['GLM_EXT_quaternion_common',['../a00669.html',1,'']]], + ['glm_5fext_5fquaternion_5fdouble',['GLM_EXT_quaternion_double',['../a00670.html',1,'']]], + ['glm_5fext_5fquaternion_5fdouble_5fprecision',['GLM_EXT_quaternion_double_precision',['../a00671.html',1,'']]], + ['glm_5fext_5fquaternion_5fexponential',['GLM_EXT_quaternion_exponential',['../a00672.html',1,'']]], + ['glm_5fext_5fquaternion_5ffloat',['GLM_EXT_quaternion_float',['../a00673.html',1,'']]], + ['glm_5fext_5fquaternion_5ffloat_5fprecision',['GLM_EXT_quaternion_float_precision',['../a00674.html',1,'']]], + ['glm_5fext_5fquaternion_5fgeometric',['GLM_EXT_quaternion_geometric',['../a00675.html',1,'']]], + ['glm_5fext_5fquaternion_5frelational',['GLM_EXT_quaternion_relational',['../a00676.html',1,'']]], + ['glm_5fext_5fquaternion_5ftransform',['GLM_EXT_quaternion_transform',['../a00677.html',1,'']]], + ['glm_5fext_5fquaternion_5ftrigonometric',['GLM_EXT_quaternion_trigonometric',['../a00678.html',1,'']]], + ['glm_5fext_5fscalar_5fcommon',['GLM_EXT_scalar_common',['../a00679.html',1,'']]], + ['glm_5fext_5fscalar_5fconstants',['GLM_EXT_scalar_constants',['../a00680.html',1,'']]], + ['glm_5fext_5fscalar_5ffloat_5fsized',['GLM_EXT_scalar_float_sized',['../a00681.html',1,'']]], + ['glm_5fext_5fscalar_5fint_5fsized',['GLM_EXT_scalar_int_sized',['../a00682.html',1,'']]], + ['glm_5fext_5fscalar_5frelational',['GLM_EXT_scalar_relational',['../a00683.html',1,'']]], + ['glm_5fext_5fscalar_5fuint_5fsized',['GLM_EXT_scalar_uint_sized',['../a00684.html',1,'']]], + ['glm_5fext_5fvector_5fbool1',['GLM_EXT_vector_bool1',['../a00685.html',1,'']]], + ['glm_5fext_5fvector_5fbool1_5fprecision',['GLM_EXT_vector_bool1_precision',['../a00686.html',1,'']]], + ['glm_5fext_5fvector_5fcommon',['GLM_EXT_vector_common',['../a00687.html',1,'']]], + ['glm_5fext_5fvector_5fdouble1',['GLM_EXT_vector_double1',['../a00688.html',1,'']]], + ['glm_5fext_5fvector_5fdouble1_5fprecision',['GLM_EXT_vector_double1_precision',['../a00689.html',1,'']]], + ['glm_5fext_5fvector_5ffloat1',['GLM_EXT_vector_float1',['../a00690.html',1,'']]], + ['glm_5fext_5fvector_5ffloat1_5fprecision',['GLM_EXT_vector_float1_precision',['../a00691.html',1,'']]], + ['glm_5fext_5fvector_5fint1',['GLM_EXT_vector_int1',['../a00692.html',1,'']]], + ['glm_5fext_5fvector_5fint1_5fprecision',['GLM_EXT_vector_int1_precision',['../a00693.html',1,'']]], + ['glm_5fext_5fvector_5frelational',['GLM_EXT_vector_relational',['../a00694.html',1,'']]], + ['glm_5fext_5fvector_5fuint1',['GLM_EXT_vector_uint1',['../a00695.html',1,'']]], + ['glm_5fext_5fvector_5fuint1_5fprecision',['GLM_EXT_vector_uint1_precision',['../a00696.html',1,'']]], + ['glm_5fgtc_5fbitfield',['GLM_GTC_bitfield',['../a00706.html',1,'']]], + ['glm_5fgtc_5fcolor_5fspace',['GLM_GTC_color_space',['../a00707.html',1,'']]], + ['glm_5fgtc_5fconstants',['GLM_GTC_constants',['../a00708.html',1,'']]], + ['glm_5fgtc_5fepsilon',['GLM_GTC_epsilon',['../a00709.html',1,'']]], + ['glm_5fgtc_5finteger',['GLM_GTC_integer',['../a00710.html',1,'']]], + ['glm_5fgtc_5fmatrix_5faccess',['GLM_GTC_matrix_access',['../a00711.html',1,'']]], + ['glm_5fgtc_5fmatrix_5finteger',['GLM_GTC_matrix_integer',['../a00712.html',1,'']]], + ['glm_5fgtc_5fmatrix_5finverse',['GLM_GTC_matrix_inverse',['../a00713.html',1,'']]], + ['glm_5fgtc_5fmatrix_5ftransform',['GLM_GTC_matrix_transform',['../a00714.html',1,'']]], + ['glm_5fgtc_5fnoise',['GLM_GTC_noise',['../a00715.html',1,'']]], + ['glm_5fgtc_5fpacking',['GLM_GTC_packing',['../a00716.html',1,'']]], + ['glm_5fgtc_5fquaternion',['GLM_GTC_quaternion',['../a00663.html',1,'']]], + ['glm_5fgtc_5frandom',['GLM_GTC_random',['../a00717.html',1,'']]], + ['glm_5fgtc_5freciprocal',['GLM_GTC_reciprocal',['../a00718.html',1,'']]], + ['glm_5fgtc_5fround',['GLM_GTC_round',['../a00719.html',1,'']]], + ['glm_5fgtc_5ftype_5faligned',['GLM_GTC_type_aligned',['../a00720.html',1,'']]], + ['glm_5fgtc_5ftype_5fprecision',['GLM_GTC_type_precision',['../a00721.html',1,'']]], + ['glm_5fgtc_5ftype_5fptr',['GLM_GTC_type_ptr',['../a00722.html',1,'']]], + ['glm_5fgtc_5fulp',['GLM_GTC_ulp',['../a00723.html',1,'']]], + ['glm_5fgtc_5fvec1',['GLM_GTC_vec1',['../a00724.html',1,'']]], + ['glm_5fgtx_5fassociated_5fmin_5fmax',['GLM_GTX_associated_min_max',['../a00725.html',1,'']]], + ['glm_5fgtx_5fbit',['GLM_GTX_bit',['../a00726.html',1,'']]], + ['glm_5fgtx_5fclosest_5fpoint',['GLM_GTX_closest_point',['../a00727.html',1,'']]], + ['glm_5fgtx_5fcolor_5fencoding',['GLM_GTX_color_encoding',['../a00728.html',1,'']]], + ['glm_5fgtx_5fcolor_5fspace',['GLM_GTX_color_space',['../a00729.html',1,'']]], + ['glm_5fgtx_5fcolor_5fspace_5fycocg',['GLM_GTX_color_space_YCoCg',['../a00730.html',1,'']]], + ['glm_5fgtx_5fcommon',['GLM_GTX_common',['../a00731.html',1,'']]], + ['glm_5fgtx_5fcompatibility',['GLM_GTX_compatibility',['../a00732.html',1,'']]], + ['glm_5fgtx_5fcomponent_5fwise',['GLM_GTX_component_wise',['../a00733.html',1,'']]], + ['glm_5fgtx_5fdual_5fquaternion',['GLM_GTX_dual_quaternion',['../a00734.html',1,'']]], + ['glm_5fgtx_5feasing',['GLM_GTX_easing',['../a00735.html',1,'']]], + ['glm_5fgtx_5feuler_5fangles',['GLM_GTX_euler_angles',['../a00736.html',1,'']]], + ['glm_5fgtx_5fextend',['GLM_GTX_extend',['../a00737.html',1,'']]], + ['glm_5fgtx_5fextented_5fmin_5fmax',['GLM_GTX_extented_min_max',['../a00738.html',1,'']]], + ['glm_5fgtx_5fexterior_5fproduct',['GLM_GTX_exterior_product',['../a00739.html',1,'']]], + ['glm_5fgtx_5ffast_5fexponential',['GLM_GTX_fast_exponential',['../a00740.html',1,'']]], + ['glm_5fgtx_5ffast_5fsquare_5froot',['GLM_GTX_fast_square_root',['../a00741.html',1,'']]], + ['glm_5fgtx_5ffast_5ftrigonometry',['GLM_GTX_fast_trigonometry',['../a00742.html',1,'']]], + ['glm_5fgtx_5ffunctions',['GLM_GTX_functions',['../a00743.html',1,'']]], + ['glm_5fgtx_5fgradient_5fpaint',['GLM_GTX_gradient_paint',['../a00744.html',1,'']]], + ['glm_5fgtx_5fhanded_5fcoordinate_5fspace',['GLM_GTX_handed_coordinate_space',['../a00745.html',1,'']]], + ['glm_5fgtx_5fhash',['GLM_GTX_hash',['../a00746.html',1,'']]], + ['glm_5fgtx_5finteger',['GLM_GTX_integer',['../a00747.html',1,'']]], + ['glm_5fgtx_5fintersect',['GLM_GTX_intersect',['../a00748.html',1,'']]], + ['glm_5fgtx_5fio',['GLM_GTX_io',['../a00749.html',1,'']]], + ['glm_5fgtx_5flog_5fbase',['GLM_GTX_log_base',['../a00750.html',1,'']]], + ['glm_5fgtx_5fmatrix_5fcross_5fproduct',['GLM_GTX_matrix_cross_product',['../a00751.html',1,'']]], + ['glm_5fgtx_5fmatrix_5fdecompose',['GLM_GTX_matrix_decompose',['../a00752.html',1,'']]], + ['glm_5fgtx_5fmatrix_5ffactorisation',['GLM_GTX_matrix_factorisation',['../a00753.html',1,'']]], + ['glm_5fgtx_5fmatrix_5finterpolation',['GLM_GTX_matrix_interpolation',['../a00754.html',1,'']]], + ['glm_5fgtx_5fmatrix_5fmajor_5fstorage',['GLM_GTX_matrix_major_storage',['../a00755.html',1,'']]], + ['glm_5fgtx_5fmatrix_5foperation',['GLM_GTX_matrix_operation',['../a00756.html',1,'']]], + ['glm_5fgtx_5fmatrix_5fquery',['GLM_GTX_matrix_query',['../a00757.html',1,'']]], + ['glm_5fgtx_5fmatrix_5ftransform_5f2d',['GLM_GTX_matrix_transform_2d',['../a00758.html',1,'']]], + ['glm_5fgtx_5fmixed_5fproducte',['GLM_GTX_mixed_producte',['../a00759.html',1,'']]], + ['glm_5fgtx_5fnorm',['GLM_GTX_norm',['../a00760.html',1,'']]], + ['glm_5fgtx_5fnormal',['GLM_GTX_normal',['../a00761.html',1,'']]], + ['glm_5fgtx_5fnormalize_5fdot',['GLM_GTX_normalize_dot',['../a00762.html',1,'']]], + ['glm_5fgtx_5fnumber_5fprecision',['GLM_GTX_number_precision',['../a00763.html',1,'']]], + ['glm_5fgtx_5foptimum_5fpow',['GLM_GTX_optimum_pow',['../a00764.html',1,'']]], + ['glm_5fgtx_5forthonormalize',['GLM_GTX_orthonormalize',['../a00765.html',1,'']]], + ['glm_5fgtx_5fperpendicular',['GLM_GTX_perpendicular',['../a00766.html',1,'']]], + ['glm_5fgtx_5fpolar_5fcoordinates',['GLM_GTX_polar_coordinates',['../a00767.html',1,'']]], + ['glm_5fgtx_5fprojection',['GLM_GTX_projection',['../a00768.html',1,'']]], + ['glm_5fgtx_5fquaternion',['GLM_GTX_quaternion',['../a00769.html',1,'']]], + ['glm_5fgtx_5frange',['GLM_GTX_range',['../a00770.html',1,'']]], + ['glm_5fgtx_5fraw_5fdata',['GLM_GTX_raw_data',['../a00771.html',1,'']]], + ['glm_5fgtx_5frotate_5fnormalized_5faxis',['GLM_GTX_rotate_normalized_axis',['../a00772.html',1,'']]], + ['glm_5fgtx_5frotate_5fvector',['GLM_GTX_rotate_vector',['../a00773.html',1,'']]], + ['glm_5fgtx_5fscalar_5frelational',['GLM_GTX_scalar_relational',['../a00774.html',1,'']]], + ['glm_5fgtx_5fspline',['GLM_GTX_spline',['../a00775.html',1,'']]], + ['glm_5fgtx_5fstd_5fbased_5ftype',['GLM_GTX_std_based_type',['../a00776.html',1,'']]], + ['glm_5fgtx_5fstring_5fcast',['GLM_GTX_string_cast',['../a00777.html',1,'']]], + ['glm_5fgtx_5ftexture',['GLM_GTX_texture',['../a00778.html',1,'']]], + ['glm_5fgtx_5ftransform',['GLM_GTX_transform',['../a00779.html',1,'']]], + ['glm_5fgtx_5ftransform2',['GLM_GTX_transform2',['../a00780.html',1,'']]], + ['glm_5fgtx_5ftype_5faligned',['GLM_GTX_type_aligned',['../a00781.html',1,'']]], + ['glm_5fgtx_5ftype_5ftrait',['GLM_GTX_type_trait',['../a00782.html',1,'']]], + ['glm_5fgtx_5fvec_5fswizzle',['GLM_GTX_vec_swizzle',['../a00783.html',1,'']]], + ['glm_5fgtx_5fvector_5fangle',['GLM_GTX_vector_angle',['../a00784.html',1,'']]], + ['glm_5fgtx_5fvector_5fquery',['GLM_GTX_vector_query',['../a00785.html',1,'']]], + ['glm_5fgtx_5fwrap',['GLM_GTX_wrap',['../a00786.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/groups_5.html b/common/glm/doc/api/search/groups_5.html new file mode 100644 index 000000000..6d9adbf88 --- /dev/null +++ b/common/glm/doc/api/search/groups_5.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/groups_5.js b/common/glm/doc/api/search/groups_5.js new file mode 100644 index 000000000..7d8568d9c --- /dev/null +++ b/common/glm/doc/api/search/groups_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['integer_20functions',['Integer functions',['../a00787.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/groups_6.html b/common/glm/doc/api/search/groups_6.html new file mode 100644 index 000000000..f8f808513 --- /dev/null +++ b/common/glm/doc/api/search/groups_6.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/groups_6.js b/common/glm/doc/api/search/groups_6.js new file mode 100644 index 000000000..4e347cc62 --- /dev/null +++ b/common/glm/doc/api/search/groups_6.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['matrix_20functions',['Matrix functions',['../a00788.html',1,'']]], + ['matrix_20types',['Matrix types',['../a00701.html',1,'']]], + ['matrix_20types_20with_20precision_20qualifiers',['Matrix types with precision qualifiers',['../a00702.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/groups_7.html b/common/glm/doc/api/search/groups_7.html new file mode 100644 index 000000000..8c734ab4d --- /dev/null +++ b/common/glm/doc/api/search/groups_7.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/groups_7.js b/common/glm/doc/api/search/groups_7.js new file mode 100644 index 000000000..96aea06a5 --- /dev/null +++ b/common/glm/doc/api/search/groups_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['recommended_20extensions',['Recommended extensions',['../a00704.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/groups_8.html b/common/glm/doc/api/search/groups_8.html new file mode 100644 index 000000000..2d0c65d4d --- /dev/null +++ b/common/glm/doc/api/search/groups_8.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/groups_8.js b/common/glm/doc/api/search/groups_8.js new file mode 100644 index 000000000..eaf4951fa --- /dev/null +++ b/common/glm/doc/api/search/groups_8.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['stable_20extensions',['Stable extensions',['../a00703.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/groups_9.html b/common/glm/doc/api/search/groups_9.html new file mode 100644 index 000000000..f7957bda3 --- /dev/null +++ b/common/glm/doc/api/search/groups_9.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/groups_9.js b/common/glm/doc/api/search/groups_9.js new file mode 100644 index 000000000..2119673d2 --- /dev/null +++ b/common/glm/doc/api/search/groups_9.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['vector_20relational_20functions',['Vector Relational Functions',['../a00791.html',1,'']]], + ['vector_20types',['Vector types',['../a00699.html',1,'']]], + ['vector_20types_20with_20precision_20qualifiers',['Vector types with precision qualifiers',['../a00700.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/groups_a.html b/common/glm/doc/api/search/groups_a.html new file mode 100644 index 000000000..98c7322ee --- /dev/null +++ b/common/glm/doc/api/search/groups_a.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/groups_a.js b/common/glm/doc/api/search/groups_a.js new file mode 100644 index 000000000..03c646c70 --- /dev/null +++ b/common/glm/doc/api/search/groups_a.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['vector_20relational_20functions',['Vector Relational Functions',['../a00788.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/groups_b.html b/common/glm/doc/api/search/groups_b.html new file mode 100644 index 000000000..8fd0de2a2 --- /dev/null +++ b/common/glm/doc/api/search/groups_b.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/groups_b.js b/common/glm/doc/api/search/groups_b.js new file mode 100644 index 000000000..585d3b2ac --- /dev/null +++ b/common/glm/doc/api/search/groups_b.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['vector_20relational_20functions',['Vector Relational Functions',['../a00795.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/mag_sel.png b/common/glm/doc/api/search/mag_sel.png new file mode 100644 index 0000000000000000000000000000000000000000..81f6040a2092402b4d98f9ffa8855d12a0d4ca17 GIT binary patch literal 563 zcmV-30?hr1P)zxx&tqG15pu7)IiiXFflOc2k;dXd>%13GZAy? zRz!q0=|E6a6vV)&ZBS~G9oe0kbqyw1*gvY`{Pop2oKq#FlzgXt@Xh-7fxh>}`Fxg> z$%N%{$!4=5nM{(;=c!aG1Ofr^Do{u%Ih{^&Fc@H2)+a-?TBXrw5DW&z%Nb6mQ!L9O zl}b@6mB?f=tX3;#vl)}ggh(Vpyh(IK z(Mb0D{l{U$FsRjP;!{($+bsaaVi8T#1c0V#qEIOCYa9@UVLV`f__E81L;?WEaRA;Y zUH;rZ;vb;mk7JX|$=i3O~&If0O@oZfLg8gfIjW=dcBsz;gI=!{-r4# z4%6v$&~;q^j7Fo67yJ(NJWuX+I~I!tj^nW3?}^9bq|<3^+vapS5sgM^x7!cs(+mMT z&y%j};&~po+YO)3hoUH4E*E;e9>?R6SS&`X)p`njycAVcg{rEb41T{~Hk(bl-7eSb zmFxA2uIqo#@R?lKm50ND`~6Nfn|-b1|L6O98vt3Tx@gKz#isxO002ovPDHLkV1kyW B_l^Jn literal 0 HcmV?d00001 diff --git a/common/glm/doc/api/search/nomatches.html b/common/glm/doc/api/search/nomatches.html new file mode 100644 index 000000000..b1ded27e9 --- /dev/null +++ b/common/glm/doc/api/search/nomatches.html @@ -0,0 +1,12 @@ + + + + + + + +
+
No Matches
+
+ + diff --git a/common/glm/doc/api/search/pages_0.html b/common/glm/doc/api/search/pages_0.html new file mode 100644 index 000000000..d7528582d --- /dev/null +++ b/common/glm/doc/api/search/pages_0.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/pages_0.js b/common/glm/doc/api/search/pages_0.js new file mode 100644 index 000000000..5d97ea165 --- /dev/null +++ b/common/glm/doc/api/search/pages_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['opengl_20mathematics_20_28glm_29',['OpenGL Mathematics (GLM)',['../index.html',1,'']]] +]; diff --git a/common/glm/doc/api/search/search.css b/common/glm/doc/api/search/search.css new file mode 100644 index 000000000..3cf9df94a --- /dev/null +++ b/common/glm/doc/api/search/search.css @@ -0,0 +1,271 @@ +/*---------------- Search Box */ + +#FSearchBox { + float: left; +} + +#MSearchBox { + white-space : nowrap; + float: none; + margin-top: 8px; + right: 0px; + width: 170px; + height: 24px; + z-index: 102; +} + +#MSearchBox .left +{ + display:block; + position:absolute; + left:10px; + width:20px; + height:19px; + background:url('search_l.png') no-repeat; + background-position:right; +} + +#MSearchSelect { + display:block; + position:absolute; + width:20px; + height:19px; +} + +.left #MSearchSelect { + left:4px; +} + +.right #MSearchSelect { + right:5px; +} + +#MSearchField { + display:block; + position:absolute; + height:19px; + background:url('search_m.png') repeat-x; + border:none; + width:115px; + margin-left:20px; + padding-left:4px; + color: #909090; + outline: none; + font: 9pt Arial, Verdana, sans-serif; + -webkit-border-radius: 0px; +} + +#FSearchBox #MSearchField { + margin-left:15px; +} + +#MSearchBox .right { + display:block; + position:absolute; + right:10px; + top:8px; + width:20px; + height:19px; + background:url('search_r.png') no-repeat; + background-position:left; +} + +#MSearchClose { + display: none; + position: absolute; + top: 4px; + background : none; + border: none; + margin: 0px 4px 0px 0px; + padding: 0px 0px; + outline: none; +} + +.left #MSearchClose { + left: 6px; +} + +.right #MSearchClose { + right: 2px; +} + +.MSearchBoxActive #MSearchField { + color: #000000; +} + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #90A5CE; + background-color: #F9FAFC; + z-index: 10001; + padding-top: 4px; + padding-bottom: 4px; + -moz-border-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +.SelectItem { + font: 8pt Arial, Verdana, sans-serif; + padding-left: 2px; + padding-right: 12px; + border: 0px; +} + +span.SelectionMark { + margin-right: 4px; + font-family: monospace; + outline-style: none; + text-decoration: none; +} + +a.SelectItem { + display: block; + outline-style: none; + color: #000000; + text-decoration: none; + padding-left: 6px; + padding-right: 12px; +} + +a.SelectItem:focus, +a.SelectItem:active { + color: #000000; + outline-style: none; + text-decoration: none; +} + +a.SelectItem:hover { + color: #FFFFFF; + background-color: #3D578C; + outline-style: none; + text-decoration: none; + cursor: pointer; + display: block; +} + +/*---------------- Search results window */ + +iframe#MSearchResults { + width: 60ex; + height: 15em; +} + +#MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #000; + background-color: #EEF1F7; + z-index:10000; +} + +/* ----------------------------------- */ + + +#SRIndex { + clear:both; + padding-bottom: 15px; +} + +.SREntry { + font-size: 10pt; + padding-left: 1ex; +} + +.SRPage .SREntry { + font-size: 8pt; + padding: 1px 5px; +} + +body.SRPage { + margin: 5px 2px; +} + +.SRChildren { + padding-left: 3ex; padding-bottom: .5em +} + +.SRPage .SRChildren { + display: none; +} + +.SRSymbol { + font-weight: bold; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRSymbol:focus, a.SRSymbol:active, +a.SRScope:focus, a.SRScope:active { + text-decoration: underline; +} + +span.SRScope { + padding-left: 4px; +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; +} + +.SRResult { + display: none; +} + +DIV.searchresults { + margin-left: 10px; + margin-right: 10px; +} + +/*---------------- External search page results */ + +.searchresult { + background-color: #F0F3F8; +} + +.pages b { + color: white; + padding: 5px 5px 3px 5px; + background-image: url("../tab_a.png"); + background-repeat: repeat-x; + text-shadow: 0 1px 1px #000000; +} + +.pages { + line-height: 17px; + margin-left: 4px; + text-decoration: none; +} + +.hl { + font-weight: bold; +} + +#searchresults { + margin-bottom: 20px; +} + +.searchpages { + margin-top: 10px; +} + diff --git a/common/glm/doc/api/search/search.js b/common/glm/doc/api/search/search.js new file mode 100644 index 000000000..a554ab9cb --- /dev/null +++ b/common/glm/doc/api/search/search.js @@ -0,0 +1,814 @@ +/* + @licstart The following is the entire license notice for the + JavaScript code in this file. + + Copyright (C) 1997-2017 by Dimitri van Heesch + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + @licend The above is the entire license notice + for the JavaScript code in this file + */ +function convertToId(search) +{ + var result = ''; + for (i=0;i do a search + { + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex0) // Up + { + this.searchIndex--; + this.OnSelectItem(this.searchIndex); + } + else if (e.keyCode==13 || e.keyCode==27) + { + this.OnSelectItem(this.searchIndex); + this.CloseSelectionWindow(); + this.DOMSearchField().focus(); + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() + { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.Activate(false); + } + + this.CloseSelectionWindow = function() + { + this.DOMSearchSelectWindow().style.display = 'none'; + } + + // Performs a search. + this.Search = function() + { + this.keyTimeout = 0; + + // strip leading whitespace + var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + var code = searchValue.toLowerCase().charCodeAt(0); + var idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair + { + idxChar = searchValue.substr(0, 2); + } + + var resultsPage; + var resultsPageWithSearch; + var hasResultsPage; + + var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) + { + var hexCode=idx.toString(16); + resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; + resultsPageWithSearch = resultsPage+'?'+escape(searchValue); + hasResultsPage = true; + } + else // nothing available for this search term + { + resultsPage = this.resultsPath + '/nomatches.html'; + resultsPageWithSearch = resultsPage; + hasResultsPage = false; + } + + window.frames.MSearchResults.location = resultsPageWithSearch; + var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + + if (domPopupSearchResultsWindow.style.display!='block') + { + var domSearchBox = this.DOMSearchBox(); + this.DOMSearchClose().style.display = 'inline'; + if (this.insideFrame) + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + domPopupSearchResultsWindow.style.position = 'relative'; + domPopupSearchResultsWindow.style.display = 'block'; + var width = document.body.clientWidth - 8; // the -8 is for IE :-( + domPopupSearchResultsWindow.style.width = width + 'px'; + domPopupSearchResults.style.width = width + 'px'; + } + else + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; + var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + } + } + + this.lastSearchValue = searchValue; + this.lastResultsPage = resultsPage; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) + { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) + { + this.DOMSearchBox().className = 'MSearchBoxActive'; + + var searchField = this.DOMSearchField(); + + if (searchField.value == this.searchLabel) // clear "Search" term upon entry + { + searchField.value = ''; + this.searchActive = true; + } + } + else if (!isActive) // directly remove the panel + { + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.DOMSearchField().value = this.searchLabel; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults(name) +{ + // The number of matches from the last run of . + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) + { + var parentElement = document.getElementById(id); + var element = parentElement.firstChild; + + while (element && element!=parentElement) + { + if (element.nodeName == 'DIV' && element.className == 'SRChildren') + { + return element; + } + + if (element.nodeName == 'DIV' && element.hasChildNodes()) + { + element = element.firstChild; + } + else if (element.nextSibling) + { + element = element.nextSibling; + } + else + { + do + { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) + { + element = element.nextSibling; + } + } + } + } + + this.Toggle = function(id) + { + var element = this.FindChildElement(id); + if (element) + { + if (element.style.display == 'block') + { + element.style.display = 'none'; + } + else + { + element.style.display = 'block'; + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) + { + if (!search) // get search word from URL + { + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + var resultRows = document.getElementsByTagName("div"); + var matches = 0; + + var i = 0; + while (i < resultRows.length) + { + var row = resultRows.item(i); + if (row.className == "SRResult") + { + var rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) + { + row.style.display = 'block'; + matches++; + } + else + { + row.style.display = 'none'; + } + } + i++; + } + document.getElementById("Searching").style.display='none'; + if (matches == 0) // no results + { + document.getElementById("NoMatches").style.display='block'; + } + else // at least one result + { + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } + + // return the first item with index index or higher that is visible + this.NavNext = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index--; + } + return focusItem; + } + + this.ProcessKeys = function(e) + { + if (e.type == "keydown") + { + this.repeatOn = false; + this.lastKey = e.keyCode; + } + else if (e.type == "keypress") + { + if (!this.repeatOn) + { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } + } + else if (e.type == "keyup") + { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; + } + + this.Nav = function(evt,itemIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + var newIndex = itemIndex-1; + var focusItem = this.NavPrev(newIndex); + if (focusItem) + { + var child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') // children visible + { + var n=0; + var tmpElem; + while (1) // search for last child + { + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) + { + focusItem = tmpElem; + } + else // found it! + { + break; + } + n++; + } + } + } + if (focusItem) + { + focusItem.focus(); + } + else // return focus to search field + { + parent.document.getElementById("MSearchField").focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = itemIndex+1; + var focusItem; + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') // children visible + { + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } + else if (this.lastKey==39) // Right + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } + else if (this.lastKey==37) // Left + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } + + this.NavChild = function(evt,itemIndex,childIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + if (childIndex>0) + { + var newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } + else // already at first child, jump to parent + { + document.getElementById('Item'+itemIndex).focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = childIndex+1; + var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) // last child, jump to parent next parent + { + elem = this.NavNext(itemIndex+1); + } + if (elem) + { + elem.focus(); + } + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } +} + +function setKeyActions(elem,action) +{ + elem.setAttribute('onkeydown',action); + elem.setAttribute('onkeypress',action); + elem.setAttribute('onkeyup',action); +} + +function setClassAttr(elem,attr) +{ + elem.setAttribute('class',attr); + elem.setAttribute('className',attr); +} + +function createResults() +{ + var results = document.getElementById("SRResults"); + for (var e=0; ek7RCwB~R6VQOP#AvB$vH7i{6H{96zot$7cZT<7246EF5Np6N}+$IbiG6W zg#87A+NFaX+=_^xM1#gCtshC=E{%9^uQX_%?YwXvo{#q&MnpJ8uh(O?ZRc&~_1%^SsPxG@rfElJg-?U zm!Cz-IOn(qJP3kDp-^~qt+FGbl=5jNli^Wj_xIBG{Rc0en{!oFvyoNC7{V~T8}b>| z=jL2WIReZzX(YN(_9fV;BBD$VXQIxNasAL8ATvEu822WQ%mvv4FO#qs` BFGc_W literal 0 HcmV?d00001 diff --git a/common/glm/doc/api/search/search_r.png b/common/glm/doc/api/search/search_r.png new file mode 100644 index 0000000000000000000000000000000000000000..97ee8b439687084201b79c6f776a41f495c6392a GIT binary patch literal 612 zcmV-q0-ODbP)PbXFRCwB?)W514K@j&X?z2*SxFI6-@HT2E2K=9X9%Pb zEK*!TBw&g(DMC;|A)uGlRkOS9vd-?zNs%bR4d$w+ox_iFnE8fvIvv7^5<(>Te12Li z7C)9srCzmK{ZcNM{YIl9j{DePFgOWiS%xG@5CnnnJa4nvY<^glbz7^|-ZY!dUkAwd z{gaTC@_>b5h~;ug#R0wRL0>o5!hxm*s0VW?8dr}O#zXTRTnrQm_Z7z1Mrnx>&p zD4qifUjzLvbVVWi?l?rUzwt^sdb~d!f_LEhsRVIXZtQ=qSxuxqm zEX#tf>$?M_Y1-LSDT)HqG?`%-%ZpY!#{N!rcNIiL;G7F0`l?)mNGTD9;f9F5Up3Kg zw}a<-JylhG&;=!>B+fZaCX+?C+kHYrP%c?X2!Zu_olK|GcS4A70HEy;vn)I0>0kLH z`jc(WIaaHc7!HS@f*^R^Znx8W=_jIl2oWJoQ*h1^$FX!>*PqR1J8k|fw}w_y}TpE>7m8DqDO<3z`OzXt$ccSejbEZCg@0000 + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/typedefs_0.js b/common/glm/doc/api/search/typedefs_0.js new file mode 100644 index 000000000..573894cb6 --- /dev/null +++ b/common/glm/doc/api/search/typedefs_0.js @@ -0,0 +1,179 @@ +var searchData= +[ + ['aligned_5fbvec1',['aligned_bvec1',['../a00720.html#ga780a35f764020f553a9601a3fcdcd059',1,'glm']]], + ['aligned_5fbvec2',['aligned_bvec2',['../a00720.html#gae766b317c5afec852bfb3d74a3c54bc8',1,'glm']]], + ['aligned_5fbvec3',['aligned_bvec3',['../a00720.html#gae1964ba70d15915e5b710926decbb3cb',1,'glm']]], + ['aligned_5fbvec4',['aligned_bvec4',['../a00720.html#gae164a1f7879f828bc35e50b79d786b05',1,'glm']]], + ['aligned_5fdmat2',['aligned_dmat2',['../a00720.html#ga6783859382677d35fcd5dac7dcbefdbd',1,'glm']]], + ['aligned_5fdmat2x2',['aligned_dmat2x2',['../a00720.html#ga449a3ec2dde6b6bb4bb94c49a6aad388',1,'glm']]], + ['aligned_5fdmat2x3',['aligned_dmat2x3',['../a00720.html#ga53d519a7b1bfb69076b3ec206a6b3bd1',1,'glm']]], + ['aligned_5fdmat2x4',['aligned_dmat2x4',['../a00720.html#ga5ccb2baeb0ab57b818c24e0d486c59d0',1,'glm']]], + ['aligned_5fdmat3',['aligned_dmat3',['../a00720.html#ga19aa695ffdb45ce29f7ea0b5029627de',1,'glm']]], + ['aligned_5fdmat3x2',['aligned_dmat3x2',['../a00720.html#ga5f5123d834bd1170edf8c386834e112c',1,'glm']]], + ['aligned_5fdmat3x3',['aligned_dmat3x3',['../a00720.html#ga635bf3732281a2c2ca54d8f9d33d178f',1,'glm']]], + ['aligned_5fdmat3x4',['aligned_dmat3x4',['../a00720.html#gaf488c6ad88c185054595d4d5c7ba5b9d',1,'glm']]], + ['aligned_5fdmat4',['aligned_dmat4',['../a00720.html#ga001bb387ae8192fa94dbd8b23b600439',1,'glm']]], + ['aligned_5fdmat4x2',['aligned_dmat4x2',['../a00720.html#gaa409cfb737bd59b68dc683e9b03930cc',1,'glm']]], + ['aligned_5fdmat4x3',['aligned_dmat4x3',['../a00720.html#ga621e89ca1dbdcb7b5a3e7de237c44121',1,'glm']]], + ['aligned_5fdmat4x4',['aligned_dmat4x4',['../a00720.html#gac9bda778d0b7ad82f656dab99b71857a',1,'glm']]], + ['aligned_5fdvec1',['aligned_dvec1',['../a00720.html#ga4974f46ae5a19415d91316960a53617a',1,'glm']]], + ['aligned_5fdvec2',['aligned_dvec2',['../a00720.html#ga18d859f87122b2b3b2992ffe86dbebc0',1,'glm']]], + ['aligned_5fdvec3',['aligned_dvec3',['../a00720.html#gaa37869eea77d28419b2fb0ff70b69bf0',1,'glm']]], + ['aligned_5fdvec4',['aligned_dvec4',['../a00720.html#ga8a9f0a4795ccc442fa9901845026f9f5',1,'glm']]], + ['aligned_5fhighp_5fbvec1',['aligned_highp_bvec1',['../a00720.html#ga862843a45b01c35ffe4d44c47ea774ad',1,'glm']]], + ['aligned_5fhighp_5fbvec2',['aligned_highp_bvec2',['../a00720.html#ga0731b593c5e33559954c80f8687e76c6',1,'glm']]], + ['aligned_5fhighp_5fbvec3',['aligned_highp_bvec3',['../a00720.html#ga0913bdf048d0cb74af1d2512aec675bc',1,'glm']]], + ['aligned_5fhighp_5fbvec4',['aligned_highp_bvec4',['../a00720.html#ga9df1d0c425852cf63a57e533b7a83f4f',1,'glm']]], + ['aligned_5fhighp_5fdmat2',['aligned_highp_dmat2',['../a00720.html#ga3a7eeae43cb7673e14cc89bf02f7dd45',1,'glm']]], + ['aligned_5fhighp_5fdmat2x2',['aligned_highp_dmat2x2',['../a00720.html#gaef26dfe3855a91644665b55c9096a8c8',1,'glm']]], + ['aligned_5fhighp_5fdmat2x3',['aligned_highp_dmat2x3',['../a00720.html#gaa7c9d4ab7ab651cdf8001fe7843e238b',1,'glm']]], + ['aligned_5fhighp_5fdmat2x4',['aligned_highp_dmat2x4',['../a00720.html#gaa0d2b8a75f1908dcf32c27f8524bdced',1,'glm']]], + ['aligned_5fhighp_5fdmat3',['aligned_highp_dmat3',['../a00720.html#gad8f6abb2c9994850b5d5c04a5f979ed8',1,'glm']]], + ['aligned_5fhighp_5fdmat3x2',['aligned_highp_dmat3x2',['../a00720.html#gab069b2fc2ec785fc4e193cf26c022679',1,'glm']]], + ['aligned_5fhighp_5fdmat3x3',['aligned_highp_dmat3x3',['../a00720.html#ga66073b1ddef34b681741f572338ddb8e',1,'glm']]], + ['aligned_5fhighp_5fdmat3x4',['aligned_highp_dmat3x4',['../a00720.html#ga683c8ca66de323ea533a760abedd0efc',1,'glm']]], + ['aligned_5fhighp_5fdmat4',['aligned_highp_dmat4',['../a00720.html#gacaa7407ea00ffdd322ce86a57adb547e',1,'glm']]], + ['aligned_5fhighp_5fdmat4x2',['aligned_highp_dmat4x2',['../a00720.html#ga93a23ca3d42818d56e0702213c66354b',1,'glm']]], + ['aligned_5fhighp_5fdmat4x3',['aligned_highp_dmat4x3',['../a00720.html#gacab7374b560745cb1d0a306a90353f58',1,'glm']]], + ['aligned_5fhighp_5fdmat4x4',['aligned_highp_dmat4x4',['../a00720.html#ga1fbfba14368b742972d3b58a0a303682',1,'glm']]], + ['aligned_5fhighp_5fdvec1',['aligned_highp_dvec1',['../a00720.html#gaf0448b0f7ceb8273f7eda3a92205eefc',1,'glm']]], + ['aligned_5fhighp_5fdvec2',['aligned_highp_dvec2',['../a00720.html#gab173a333e6b7ce153ceba66ac4a321cf',1,'glm']]], + ['aligned_5fhighp_5fdvec3',['aligned_highp_dvec3',['../a00720.html#gae94ef61edfa047d05bc69b6065fc42ba',1,'glm']]], + ['aligned_5fhighp_5fdvec4',['aligned_highp_dvec4',['../a00720.html#ga8fad35c5677f228e261fe541f15363a4',1,'glm']]], + ['aligned_5fhighp_5fivec1',['aligned_highp_ivec1',['../a00720.html#gad63b8c5b4dc0500d54d7414ef555178f',1,'glm']]], + ['aligned_5fhighp_5fivec2',['aligned_highp_ivec2',['../a00720.html#ga41563650f36cb7f479e080de21e08418',1,'glm']]], + ['aligned_5fhighp_5fivec3',['aligned_highp_ivec3',['../a00720.html#ga6eca5170bb35eac90b4972590fd31a06',1,'glm']]], + ['aligned_5fhighp_5fivec4',['aligned_highp_ivec4',['../a00720.html#ga31bfa801e1579fdba752ec3f7a45ec91',1,'glm']]], + ['aligned_5fhighp_5fmat2',['aligned_highp_mat2',['../a00720.html#gaf9db5e8a929c317da5aa12cc53741b63',1,'glm']]], + ['aligned_5fhighp_5fmat2x2',['aligned_highp_mat2x2',['../a00720.html#gab559d943abf92bc588bcd3f4c0e4664b',1,'glm']]], + ['aligned_5fhighp_5fmat2x3',['aligned_highp_mat2x3',['../a00720.html#ga50c9af5aa3a848956d625fc64dc8488e',1,'glm']]], + ['aligned_5fhighp_5fmat2x4',['aligned_highp_mat2x4',['../a00720.html#ga0edcfdd179f8a158342eead48a4d0c2a',1,'glm']]], + ['aligned_5fhighp_5fmat3',['aligned_highp_mat3',['../a00720.html#gabab3afcc04459c7b123604ae5dc663f6',1,'glm']]], + ['aligned_5fhighp_5fmat3x2',['aligned_highp_mat3x2',['../a00720.html#ga9fc2167b47c9be9295f2d8eea7f0ca75',1,'glm']]], + ['aligned_5fhighp_5fmat3x3',['aligned_highp_mat3x3',['../a00720.html#ga2f7b8c99ba6f2d07c73a195a8143c259',1,'glm']]], + ['aligned_5fhighp_5fmat3x4',['aligned_highp_mat3x4',['../a00720.html#ga52e00afd0eb181e6738f40cf41787049',1,'glm']]], + ['aligned_5fhighp_5fmat4',['aligned_highp_mat4',['../a00720.html#ga058ae939bfdbcbb80521dd4a3b01afba',1,'glm']]], + ['aligned_5fhighp_5fmat4x2',['aligned_highp_mat4x2',['../a00720.html#ga84e1f5e0718952a079b748825c03f956',1,'glm']]], + ['aligned_5fhighp_5fmat4x3',['aligned_highp_mat4x3',['../a00720.html#gafff1684c4ff19b4a818138ccacc1e78d',1,'glm']]], + ['aligned_5fhighp_5fmat4x4',['aligned_highp_mat4x4',['../a00720.html#ga40d49648083a0498a12a4bb41ae6ece8',1,'glm']]], + ['aligned_5fhighp_5fuvec1',['aligned_highp_uvec1',['../a00720.html#ga5b80e28396c6ef7d32c6fd18df498451',1,'glm']]], + ['aligned_5fhighp_5fuvec2',['aligned_highp_uvec2',['../a00720.html#ga04db692662a4908beeaf5a5ba6e19483',1,'glm']]], + ['aligned_5fhighp_5fuvec3',['aligned_highp_uvec3',['../a00720.html#ga073fd6e8b241afade6d8afbd676b2667',1,'glm']]], + ['aligned_5fhighp_5fuvec4',['aligned_highp_uvec4',['../a00720.html#gabdd60462042859f876c17c7346c732a5',1,'glm']]], + ['aligned_5fhighp_5fvec1',['aligned_highp_vec1',['../a00720.html#ga4d0bd70d5fac49b800546d608b707513',1,'glm']]], + ['aligned_5fhighp_5fvec2',['aligned_highp_vec2',['../a00720.html#gac9f8482dde741fb6bab7248b81a45465',1,'glm']]], + ['aligned_5fhighp_5fvec3',['aligned_highp_vec3',['../a00720.html#ga65415d2d68c9cc0ca554524a8f5510b2',1,'glm']]], + ['aligned_5fhighp_5fvec4',['aligned_highp_vec4',['../a00720.html#ga7cb26d354dd69d23849c34c4fba88da9',1,'glm']]], + ['aligned_5fivec1',['aligned_ivec1',['../a00720.html#ga76298aed82a439063c3d55980c84aa0b',1,'glm']]], + ['aligned_5fivec2',['aligned_ivec2',['../a00720.html#gae4f38fd2c86cee6940986197777b3ca4',1,'glm']]], + ['aligned_5fivec3',['aligned_ivec3',['../a00720.html#ga32794322d294e5ace7fed4a61896f270',1,'glm']]], + ['aligned_5fivec4',['aligned_ivec4',['../a00720.html#ga7f79eae5927c9033d84617e49f6f34e4',1,'glm']]], + ['aligned_5flowp_5fbvec1',['aligned_lowp_bvec1',['../a00720.html#gac6036449ab1c4abf8efe1ea00fcdd1c9',1,'glm']]], + ['aligned_5flowp_5fbvec2',['aligned_lowp_bvec2',['../a00720.html#ga59fadcd3835646e419372ae8b43c5d37',1,'glm']]], + ['aligned_5flowp_5fbvec3',['aligned_lowp_bvec3',['../a00720.html#ga83aab4d191053f169c93a3e364f2e118',1,'glm']]], + ['aligned_5flowp_5fbvec4',['aligned_lowp_bvec4',['../a00720.html#gaa7a76555ee4853614e5755181a8dd54e',1,'glm']]], + ['aligned_5flowp_5fdmat2',['aligned_lowp_dmat2',['../a00720.html#ga79a90173d8faa9816dc852ce447d66ca',1,'glm']]], + ['aligned_5flowp_5fdmat2x2',['aligned_lowp_dmat2x2',['../a00720.html#ga07cb8e846666cbf56045b064fb553d2e',1,'glm']]], + ['aligned_5flowp_5fdmat2x3',['aligned_lowp_dmat2x3',['../a00720.html#ga7a4536b6e1f2ebb690f63816b5d7e48b',1,'glm']]], + ['aligned_5flowp_5fdmat2x4',['aligned_lowp_dmat2x4',['../a00720.html#gab0cf4f7c9a264941519acad286e055ea',1,'glm']]], + ['aligned_5flowp_5fdmat3',['aligned_lowp_dmat3',['../a00720.html#gac00e15efded8a57c9dec3aed0fb547e7',1,'glm']]], + ['aligned_5flowp_5fdmat3x2',['aligned_lowp_dmat3x2',['../a00720.html#gaa281a47d5d627313984d0f8df993b648',1,'glm']]], + ['aligned_5flowp_5fdmat3x3',['aligned_lowp_dmat3x3',['../a00720.html#ga7f3148a72355e39932d6855baca42ebc',1,'glm']]], + ['aligned_5flowp_5fdmat3x4',['aligned_lowp_dmat3x4',['../a00720.html#gaea3ccc5ef5b178e6e49b4fa1427605d3',1,'glm']]], + ['aligned_5flowp_5fdmat4',['aligned_lowp_dmat4',['../a00720.html#gab92c6d7d58d43dfb8147e9aedfe8351b',1,'glm']]], + ['aligned_5flowp_5fdmat4x2',['aligned_lowp_dmat4x2',['../a00720.html#gaf806dfdaffb2e9f7681b1cd2825898ce',1,'glm']]], + ['aligned_5flowp_5fdmat4x3',['aligned_lowp_dmat4x3',['../a00720.html#gab0931ac7807fa1428c7bbf249efcdf0d',1,'glm']]], + ['aligned_5flowp_5fdmat4x4',['aligned_lowp_dmat4x4',['../a00720.html#gad8220a93d2fca2dd707821b4ab6f809e',1,'glm']]], + ['aligned_5flowp_5fdvec1',['aligned_lowp_dvec1',['../a00720.html#ga7f8a2cc5a686e52b1615761f4978ca62',1,'glm']]], + ['aligned_5flowp_5fdvec2',['aligned_lowp_dvec2',['../a00720.html#ga0e37cff4a43cca866101f0a35f01db6d',1,'glm']]], + ['aligned_5flowp_5fdvec3',['aligned_lowp_dvec3',['../a00720.html#gab9e669c4efd52d3347fc6d5f6b20fd59',1,'glm']]], + ['aligned_5flowp_5fdvec4',['aligned_lowp_dvec4',['../a00720.html#ga226f5ec7a953cea559c16fe3aff9924f',1,'glm']]], + ['aligned_5flowp_5fivec1',['aligned_lowp_ivec1',['../a00720.html#ga1101d3a82b2e3f5f8828bd8f3adab3e1',1,'glm']]], + ['aligned_5flowp_5fivec2',['aligned_lowp_ivec2',['../a00720.html#ga44c4accad582cfbd7226a19b83b0cadc',1,'glm']]], + ['aligned_5flowp_5fivec3',['aligned_lowp_ivec3',['../a00720.html#ga65663f10a02e52cedcddbcfe36ddf38d',1,'glm']]], + ['aligned_5flowp_5fivec4',['aligned_lowp_ivec4',['../a00720.html#gaae92fcec8b2e0328ffbeac31cc4fc419',1,'glm']]], + ['aligned_5flowp_5fmat2',['aligned_lowp_mat2',['../a00720.html#ga17c424412207b00dba1cf587b099eea3',1,'glm']]], + ['aligned_5flowp_5fmat2x2',['aligned_lowp_mat2x2',['../a00720.html#ga0e44aeb930a47f9cbf2db15b56433b0f',1,'glm']]], + ['aligned_5flowp_5fmat2x3',['aligned_lowp_mat2x3',['../a00720.html#ga7dec6d96bc61312b1e56d137c9c74030',1,'glm']]], + ['aligned_5flowp_5fmat2x4',['aligned_lowp_mat2x4',['../a00720.html#gaa694fab1f8df5f658846573ba8ffc563',1,'glm']]], + ['aligned_5flowp_5fmat3',['aligned_lowp_mat3',['../a00720.html#ga1eb9076cc28ead5020fd3029fd0472c5',1,'glm']]], + ['aligned_5flowp_5fmat3x2',['aligned_lowp_mat3x2',['../a00720.html#ga2d6639f0bd777bae1ee0eba71cd7bfdc',1,'glm']]], + ['aligned_5flowp_5fmat3x3',['aligned_lowp_mat3x3',['../a00720.html#gaeaab04e378a90956eec8d68a99d777ed',1,'glm']]], + ['aligned_5flowp_5fmat3x4',['aligned_lowp_mat3x4',['../a00720.html#ga1f03696ab066572c6c044e63edf635a2',1,'glm']]], + ['aligned_5flowp_5fmat4',['aligned_lowp_mat4',['../a00720.html#ga25ea2f684e36aa5e978b4f2f86593824',1,'glm']]], + ['aligned_5flowp_5fmat4x2',['aligned_lowp_mat4x2',['../a00720.html#ga2cb16c3fdfb15e0719d942ee3b548bc4',1,'glm']]], + ['aligned_5flowp_5fmat4x3',['aligned_lowp_mat4x3',['../a00720.html#ga7e96981e872f17a780d9f1c22dc1f512',1,'glm']]], + ['aligned_5flowp_5fmat4x4',['aligned_lowp_mat4x4',['../a00720.html#gadae3dcfc22d28c64d0548cbfd9d08719',1,'glm']]], + ['aligned_5flowp_5fuvec1',['aligned_lowp_uvec1',['../a00720.html#gad09b93acc43c43423408d17a64f6d7ca',1,'glm']]], + ['aligned_5flowp_5fuvec2',['aligned_lowp_uvec2',['../a00720.html#ga6f94fcd28dde906fc6cad5f742b55c1a',1,'glm']]], + ['aligned_5flowp_5fuvec3',['aligned_lowp_uvec3',['../a00720.html#ga9e9f006970b1a00862e3e6e599eedd4c',1,'glm']]], + ['aligned_5flowp_5fuvec4',['aligned_lowp_uvec4',['../a00720.html#ga46b1b0b9eb8625a5d69137bd66cd13dc',1,'glm']]], + ['aligned_5flowp_5fvec1',['aligned_lowp_vec1',['../a00720.html#gab34aee3d5e121c543fea11d2c50ecc43',1,'glm']]], + ['aligned_5flowp_5fvec2',['aligned_lowp_vec2',['../a00720.html#ga53ac5d252317f1fa43c2ef921857bf13',1,'glm']]], + ['aligned_5flowp_5fvec3',['aligned_lowp_vec3',['../a00720.html#ga98f0b5cd65fce164ff1367c2a3b3aa1e',1,'glm']]], + ['aligned_5flowp_5fvec4',['aligned_lowp_vec4',['../a00720.html#ga82f7275d6102593a69ce38cdad680409',1,'glm']]], + ['aligned_5fmat2',['aligned_mat2',['../a00720.html#ga5a8a5f8c47cd7d5502dd9932f83472b9',1,'glm']]], + ['aligned_5fmat2x2',['aligned_mat2x2',['../a00720.html#gabb04f459d81d753d278b2072e2375e8e',1,'glm']]], + ['aligned_5fmat2x3',['aligned_mat2x3',['../a00720.html#ga832476bb1c59ef673db37433ff34e399',1,'glm']]], + ['aligned_5fmat2x4',['aligned_mat2x4',['../a00720.html#gadab11a7504430825b648ff7c7e36b725',1,'glm']]], + ['aligned_5fmat3',['aligned_mat3',['../a00720.html#ga43a92a24ca863e0e0f3b65834b3cf714',1,'glm']]], + ['aligned_5fmat3x2',['aligned_mat3x2',['../a00720.html#ga5c0df24ba85eafafc0eb0c90690510ed',1,'glm']]], + ['aligned_5fmat3x3',['aligned_mat3x3',['../a00720.html#gadb065dbe5c11271fef8cf2ea8608f187',1,'glm']]], + ['aligned_5fmat3x4',['aligned_mat3x4',['../a00720.html#ga88061c72c997b94c420f2b0a60d9df26',1,'glm']]], + ['aligned_5fmat4',['aligned_mat4',['../a00720.html#gab0fddcf95dd51cbcbf624ea7c40dfeb8',1,'glm']]], + ['aligned_5fmat4x2',['aligned_mat4x2',['../a00720.html#gac9a2d0fb815fd5c2bd58b869c55e32d3',1,'glm']]], + ['aligned_5fmat4x3',['aligned_mat4x3',['../a00720.html#ga452bbbfd26e244de216e4d004d50bb74',1,'glm']]], + ['aligned_5fmat4x4',['aligned_mat4x4',['../a00720.html#ga8b8fb86973a0b768c5bd802c92fac1a1',1,'glm']]], + ['aligned_5fmediump_5fbvec1',['aligned_mediump_bvec1',['../a00720.html#gadd3b8bd71a758f7fb0da8e525156f34e',1,'glm']]], + ['aligned_5fmediump_5fbvec2',['aligned_mediump_bvec2',['../a00720.html#gacb183eb5e67ec0d0ea5a016cba962810',1,'glm']]], + ['aligned_5fmediump_5fbvec3',['aligned_mediump_bvec3',['../a00720.html#gacfa4a542f1b20a5b63ad702dfb6fd587',1,'glm']]], + ['aligned_5fmediump_5fbvec4',['aligned_mediump_bvec4',['../a00720.html#ga91bc1f513bb9b0fd60281d57ded9a48c',1,'glm']]], + ['aligned_5fmediump_5fdmat2',['aligned_mediump_dmat2',['../a00720.html#ga62a2dfd668c91072b72c3109fc6cda28',1,'glm']]], + ['aligned_5fmediump_5fdmat2x2',['aligned_mediump_dmat2x2',['../a00720.html#ga9b7feec247d378dd407ba81f56ea96c8',1,'glm']]], + ['aligned_5fmediump_5fdmat2x3',['aligned_mediump_dmat2x3',['../a00720.html#gafcb189f4f93648fe7ca802ca4aca2eb8',1,'glm']]], + ['aligned_5fmediump_5fdmat2x4',['aligned_mediump_dmat2x4',['../a00720.html#ga92f8873e3bbd5ca1323c8bbe5725cc5e',1,'glm']]], + ['aligned_5fmediump_5fdmat3',['aligned_mediump_dmat3',['../a00720.html#ga6dc2832b747c00e0a0df621aba196960',1,'glm']]], + ['aligned_5fmediump_5fdmat3x2',['aligned_mediump_dmat3x2',['../a00720.html#ga5a97f0355d801de3444d42c1d5b40438',1,'glm']]], + ['aligned_5fmediump_5fdmat3x3',['aligned_mediump_dmat3x3',['../a00720.html#ga649d0acf01054b17e679cf00e150e025',1,'glm']]], + ['aligned_5fmediump_5fdmat3x4',['aligned_mediump_dmat3x4',['../a00720.html#ga45e155a4840f69b2fa4ed8047a676860',1,'glm']]], + ['aligned_5fmediump_5fdmat4',['aligned_mediump_dmat4',['../a00720.html#ga8a9376d82f0e946e25137eb55543e6ce',1,'glm']]], + ['aligned_5fmediump_5fdmat4x2',['aligned_mediump_dmat4x2',['../a00720.html#gabc25e547f4de4af62403492532cd1b6d',1,'glm']]], + ['aligned_5fmediump_5fdmat4x3',['aligned_mediump_dmat4x3',['../a00720.html#gae84f4763ecdc7457ecb7930bad12057c',1,'glm']]], + ['aligned_5fmediump_5fdmat4x4',['aligned_mediump_dmat4x4',['../a00720.html#gaa292ebaa907afdecb2d5967fb4fb1247',1,'glm']]], + ['aligned_5fmediump_5fdvec1',['aligned_mediump_dvec1',['../a00720.html#ga7180b685c581adb224406a7f831608e3',1,'glm']]], + ['aligned_5fmediump_5fdvec2',['aligned_mediump_dvec2',['../a00720.html#ga9af1eabe22f569e70d9893be72eda0f5',1,'glm']]], + ['aligned_5fmediump_5fdvec3',['aligned_mediump_dvec3',['../a00720.html#ga058e7ddab1428e47f2197bdd3a5a6953',1,'glm']]], + ['aligned_5fmediump_5fdvec4',['aligned_mediump_dvec4',['../a00720.html#gaffd747ea2aea1e69c2ecb04e68521b21',1,'glm']]], + ['aligned_5fmediump_5fivec1',['aligned_mediump_ivec1',['../a00720.html#ga20e63dd980b81af10cadbbe219316650',1,'glm']]], + ['aligned_5fmediump_5fivec2',['aligned_mediump_ivec2',['../a00720.html#gaea13d89d49daca2c796aeaa82fc2c2f2',1,'glm']]], + ['aligned_5fmediump_5fivec3',['aligned_mediump_ivec3',['../a00720.html#gabbf0f15e9c3d9868e43241ad018f82bd',1,'glm']]], + ['aligned_5fmediump_5fivec4',['aligned_mediump_ivec4',['../a00720.html#ga6099dd7878d0a78101a4250d8cd2d736',1,'glm']]], + ['aligned_5fmediump_5fmat2',['aligned_mediump_mat2',['../a00720.html#gaf6f041b212c57664d88bc6aefb7e36f3',1,'glm']]], + ['aligned_5fmediump_5fmat2x2',['aligned_mediump_mat2x2',['../a00720.html#ga04bf49316ee777d42fcfe681ee37d7be',1,'glm']]], + ['aligned_5fmediump_5fmat2x3',['aligned_mediump_mat2x3',['../a00720.html#ga26a0b61e444a51a37b9737cf4d84291b',1,'glm']]], + ['aligned_5fmediump_5fmat2x4',['aligned_mediump_mat2x4',['../a00720.html#ga163facc9ed2692ea1300ed57c5d12b17',1,'glm']]], + ['aligned_5fmediump_5fmat3',['aligned_mediump_mat3',['../a00720.html#ga3b76ba17ae5d53debeb6f7e55919a57c',1,'glm']]], + ['aligned_5fmediump_5fmat3x2',['aligned_mediump_mat3x2',['../a00720.html#ga80dee705d714300378e0847f45059097',1,'glm']]], + ['aligned_5fmediump_5fmat3x3',['aligned_mediump_mat3x3',['../a00720.html#ga721f5404caf40d68962dcc0529de71d9',1,'glm']]], + ['aligned_5fmediump_5fmat3x4',['aligned_mediump_mat3x4',['../a00720.html#ga98f4dc6722a2541a990918c074075359',1,'glm']]], + ['aligned_5fmediump_5fmat4',['aligned_mediump_mat4',['../a00720.html#gaeefee8317192174596852ce19b602720',1,'glm']]], + ['aligned_5fmediump_5fmat4x2',['aligned_mediump_mat4x2',['../a00720.html#ga46f372a006345c252a41267657cc22c0',1,'glm']]], + ['aligned_5fmediump_5fmat4x3',['aligned_mediump_mat4x3',['../a00720.html#ga0effece4545acdebdc2a5512a303110e',1,'glm']]], + ['aligned_5fmediump_5fmat4x4',['aligned_mediump_mat4x4',['../a00720.html#ga312864244cae4e8f10f478cffd0f76de',1,'glm']]], + ['aligned_5fmediump_5fuvec1',['aligned_mediump_uvec1',['../a00720.html#gacb78126ea2eb779b41c7511128ff1283',1,'glm']]], + ['aligned_5fmediump_5fuvec2',['aligned_mediump_uvec2',['../a00720.html#ga081d53e0a71443d0b68ea61c870f9adc',1,'glm']]], + ['aligned_5fmediump_5fuvec3',['aligned_mediump_uvec3',['../a00720.html#gad6fc921bdde2bdbc7e09b028e1e9b379',1,'glm']]], + ['aligned_5fmediump_5fuvec4',['aligned_mediump_uvec4',['../a00720.html#ga73ea0c1ba31580e107d21270883f51fc',1,'glm']]], + ['aligned_5fmediump_5fvec1',['aligned_mediump_vec1',['../a00720.html#ga6b797eec76fa471e300158f3453b3b2e',1,'glm']]], + ['aligned_5fmediump_5fvec2',['aligned_mediump_vec2',['../a00720.html#ga026a55ddbf2bafb1432f1157a2708616',1,'glm']]], + ['aligned_5fmediump_5fvec3',['aligned_mediump_vec3',['../a00720.html#ga3a25e494173f6a64637b08a1b50a2132',1,'glm']]], + ['aligned_5fmediump_5fvec4',['aligned_mediump_vec4',['../a00720.html#ga320d1c661cff2ef214eb50241f2928b2',1,'glm']]], + ['aligned_5fuvec1',['aligned_uvec1',['../a00720.html#ga1ff8ed402c93d280ff0597c1c5e7c548',1,'glm']]], + ['aligned_5fuvec2',['aligned_uvec2',['../a00720.html#ga074137e3be58528d67041c223d49f398',1,'glm']]], + ['aligned_5fuvec3',['aligned_uvec3',['../a00720.html#ga2a8d9c3046f89d854eb758adfa0811c0',1,'glm']]], + ['aligned_5fuvec4',['aligned_uvec4',['../a00720.html#gabf842c45eea186170c267a328e3f3b7d',1,'glm']]], + ['aligned_5fvec1',['aligned_vec1',['../a00720.html#ga05e6d4c908965d04191c2070a8d0a65e',1,'glm']]], + ['aligned_5fvec2',['aligned_vec2',['../a00720.html#ga0682462f8096a226773e20fac993cde5',1,'glm']]], + ['aligned_5fvec3',['aligned_vec3',['../a00720.html#ga7cf643b66664e0cd3c48759ae66c2bd0',1,'glm']]], + ['aligned_5fvec4',['aligned_vec4',['../a00720.html#ga85d89e83cb8137e1be1446de8c3b643a',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/typedefs_1.html b/common/glm/doc/api/search/typedefs_1.html new file mode 100644 index 000000000..7af807db4 --- /dev/null +++ b/common/glm/doc/api/search/typedefs_1.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/typedefs_1.js b/common/glm/doc/api/search/typedefs_1.js new file mode 100644 index 000000000..d8c46a1ea --- /dev/null +++ b/common/glm/doc/api/search/typedefs_1.js @@ -0,0 +1,22 @@ +var searchData= +[ + ['bool1',['bool1',['../a00732.html#gaddcd7aa2e30e61af5b38660613d3979e',1,'glm']]], + ['bool1x1',['bool1x1',['../a00732.html#ga7f895c936f0c29c8729afbbf22806090',1,'glm']]], + ['bool2',['bool2',['../a00732.html#gaa09ab65ec9c3c54305ff502e2b1fe6d9',1,'glm']]], + ['bool2x2',['bool2x2',['../a00732.html#gadb3703955e513632f98ba12fe051ba3e',1,'glm']]], + ['bool2x3',['bool2x3',['../a00732.html#ga9ae6ee155d0f90cb1ae5b6c4546738a0',1,'glm']]], + ['bool2x4',['bool2x4',['../a00732.html#ga4d7fa65be8e8e4ad6d920b45c44e471f',1,'glm']]], + ['bool3',['bool3',['../a00732.html#ga99629f818737f342204071ef8296b2ed',1,'glm']]], + ['bool3x2',['bool3x2',['../a00732.html#gac7d7311f7e0fa8b6163d96dab033a755',1,'glm']]], + ['bool3x3',['bool3x3',['../a00732.html#ga6c97b99aac3e302053ffb58aace9033c',1,'glm']]], + ['bool3x4',['bool3x4',['../a00732.html#gae7d6b679463d37d6c527d478fb470fdf',1,'glm']]], + ['bool4',['bool4',['../a00732.html#ga13c3200b82708f73faac6d7f09ec91a3',1,'glm']]], + ['bool4x2',['bool4x2',['../a00732.html#ga9ed830f52408b2f83c085063a3eaf1d0',1,'glm']]], + ['bool4x3',['bool4x3',['../a00732.html#gad0f5dc7f22c2065b1b06d57f1c0658fe',1,'glm']]], + ['bool4x4',['bool4x4',['../a00732.html#ga7d2a7d13986602ae2896bfaa394235d4',1,'glm']]], + ['bvec1',['bvec1',['../a00685.html#ga067af382616d93f8e850baae5154cdcc',1,'glm']]], + ['bvec2',['bvec2',['../a00699.html#ga0b6123e03653cc1bbe366fc55238a934',1,'glm']]], + ['bvec3',['bvec3',['../a00699.html#ga197151b72dfaf289daf98b361760ffe7',1,'glm']]], + ['bvec4',['bvec4',['../a00699.html#ga9f7b9712373ff4342d9114619b55f5e3',1,'glm']]], + ['byte',['byte',['../a00771.html#ga3005cb0d839d546c616becfa6602c607',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/typedefs_2.html b/common/glm/doc/api/search/typedefs_2.html new file mode 100644 index 000000000..745d076c8 --- /dev/null +++ b/common/glm/doc/api/search/typedefs_2.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/typedefs_2.js b/common/glm/doc/api/search/typedefs_2.js new file mode 100644 index 000000000..41b1c4527 --- /dev/null +++ b/common/glm/doc/api/search/typedefs_2.js @@ -0,0 +1,37 @@ +var searchData= +[ + ['ddualquat',['ddualquat',['../a00734.html#ga3d71f98d84ba59dfe4e369fde4714cd6',1,'glm']]], + ['dmat2',['dmat2',['../a00701.html#ga21dbd1f987775d7cc7607c139531c7e6',1,'glm']]], + ['dmat2x2',['dmat2x2',['../a00701.html#ga66b6a9af787e468a46dfe24189e87f9b',1,'glm']]], + ['dmat2x3',['dmat2x3',['../a00701.html#ga92cd388753d48e20de69ea2dbedf826a',1,'glm']]], + ['dmat2x4',['dmat2x4',['../a00701.html#gaef2198807e937072803ae0ae45e1965e',1,'glm']]], + ['dmat3',['dmat3',['../a00701.html#ga6f40aa56265b4b0ccad41b86802efe33',1,'glm']]], + ['dmat3x2',['dmat3x2',['../a00701.html#ga001e3e0638fbf8719788fc64c5b8cf39',1,'glm']]], + ['dmat3x3',['dmat3x3',['../a00701.html#ga970cb3306be25a5ca5db5a9456831228',1,'glm']]], + ['dmat3x4',['dmat3x4',['../a00701.html#ga0412a634d183587e6188e9b11869f8f4',1,'glm']]], + ['dmat4',['dmat4',['../a00701.html#ga0f34486bb7fec8e5a5b3830b6a6cbeca',1,'glm']]], + ['dmat4x2',['dmat4x2',['../a00701.html#ga9bc0b3ab8b6ba2cb6782e179ad7ad156',1,'glm']]], + ['dmat4x3',['dmat4x3',['../a00701.html#gacd18864049f8c83799babe7e596ca05b',1,'glm']]], + ['dmat4x4',['dmat4x4',['../a00701.html#gad5a6484b983b74f9d801cab8bc4e6a10',1,'glm']]], + ['double1',['double1',['../a00732.html#ga20b861a9b6e2a300323671c57a02525b',1,'glm']]], + ['double1x1',['double1x1',['../a00732.html#ga45f16a4dd0db1f199afaed9fd12fe9a8',1,'glm']]], + ['double2',['double2',['../a00732.html#ga31b729b04facccda73f07ed26958b3c2',1,'glm']]], + ['double2x2',['double2x2',['../a00732.html#gae57d0201096834d25f2b91b319e7cdbd',1,'glm']]], + ['double2x3',['double2x3',['../a00732.html#ga3655bc324008553ca61f39952d0b2d08',1,'glm']]], + ['double2x4',['double2x4',['../a00732.html#gacd33061fc64a7b2dcfd7322c49d9557a',1,'glm']]], + ['double3',['double3',['../a00732.html#ga3d8b9028a1053a44a98902cd1c389472',1,'glm']]], + ['double3x2',['double3x2',['../a00732.html#ga5ec08fc39c9d783dfcc488be240fe975',1,'glm']]], + ['double3x3',['double3x3',['../a00732.html#ga4bad5bb20c6ddaecfe4006c93841d180',1,'glm']]], + ['double3x4',['double3x4',['../a00732.html#ga2ef022e453d663d70aec414b2a80f756',1,'glm']]], + ['double4',['double4',['../a00732.html#gaf92f58af24f35617518aeb3d4f63fda6',1,'glm']]], + ['double4x2',['double4x2',['../a00732.html#gabca29ccceea53669618b751aae0ba83d',1,'glm']]], + ['double4x3',['double4x3',['../a00732.html#gafad66a02ccd360c86d6ab9ff9cfbc19c',1,'glm']]], + ['double4x4',['double4x4',['../a00732.html#gaab541bed2e788e4537852a2492860806',1,'glm']]], + ['dquat',['dquat',['../a00670.html#ga1181459aa5d640a3ea43861b118f3f0b',1,'glm']]], + ['dualquat',['dualquat',['../a00734.html#gae93abee0c979902fbec6a7bee0f6fae1',1,'glm']]], + ['dvec1',['dvec1',['../a00688.html#ga6221af17edc2d4477a4583d2cd53e569',1,'glm']]], + ['dvec2',['dvec2',['../a00699.html#ga8b09c71aaac7da7867ae58377fe219a8',1,'glm']]], + ['dvec3',['dvec3',['../a00699.html#ga5b83ae3d0fdec519c038e4d2cf967cf0',1,'glm']]], + ['dvec4',['dvec4',['../a00699.html#ga57debab5d98ce618f7b2a97fe26eb3ac',1,'glm']]], + ['dword',['dword',['../a00771.html#ga86e46fff9f80ae33893d8d697f2ca98a',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/typedefs_3.html b/common/glm/doc/api/search/typedefs_3.html new file mode 100644 index 000000000..def60a5be --- /dev/null +++ b/common/glm/doc/api/search/typedefs_3.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/typedefs_3.js b/common/glm/doc/api/search/typedefs_3.js new file mode 100644 index 000000000..532088d95 --- /dev/null +++ b/common/glm/doc/api/search/typedefs_3.js @@ -0,0 +1,78 @@ +var searchData= +[ + ['f32',['f32',['../a00721.html#gabe6a542dd6c1d5ffd847f1b9b4c9c9b7',1,'glm']]], + ['f32mat1',['f32mat1',['../a00763.html#ga145ad477a2a3e152855511c3b52469a6',1,'glm::gtx']]], + ['f32mat1x1',['f32mat1x1',['../a00763.html#gac88c6a4dbfc380aa26e3adbbade36348',1,'glm::gtx']]], + ['f32mat2',['f32mat2',['../a00721.html#gab12383ed6ac7595ed6fde4d266c58425',1,'glm']]], + ['f32mat2x2',['f32mat2x2',['../a00721.html#ga04100c76f7d55a0dd0983ccf05142bff',1,'glm']]], + ['f32mat2x3',['f32mat2x3',['../a00721.html#gab256cdab5eb582e426d749ae77b5b566',1,'glm']]], + ['f32mat2x4',['f32mat2x4',['../a00721.html#gaf512b74c4400b68f9fdf9388b3d6aac8',1,'glm']]], + ['f32mat3',['f32mat3',['../a00721.html#ga856f3905ee7cc2e4890a8a1d56c150be',1,'glm']]], + ['f32mat3x2',['f32mat3x2',['../a00721.html#ga1320a08e14fdff3821241eefab6947e9',1,'glm']]], + ['f32mat3x3',['f32mat3x3',['../a00721.html#ga65261fa8a21045c8646ddff114a56174',1,'glm']]], + ['f32mat3x4',['f32mat3x4',['../a00721.html#gab90ade28222f8b861d5ceaf81a3a7f5d',1,'glm']]], + ['f32mat4',['f32mat4',['../a00721.html#ga99d1b85ff99956b33da7e9992aad129a',1,'glm']]], + ['f32mat4x2',['f32mat4x2',['../a00721.html#ga3b32ca1e57a4ef91babbc3d35a34ea20',1,'glm']]], + ['f32mat4x3',['f32mat4x3',['../a00721.html#ga239b96198771b7add8eea7e6b59840c0',1,'glm']]], + ['f32mat4x4',['f32mat4x4',['../a00721.html#gaee4da0e9fbd8cfa2f89cb80889719dc3',1,'glm']]], + ['f32quat',['f32quat',['../a00721.html#ga38e674196ba411d642be40c47bf33939',1,'glm']]], + ['f32vec1',['f32vec1',['../a00721.html#ga701f32ab5b3fb06996b41f5c0d643805',1,'glm::f32vec1()'],['../a00763.html#ga07f8d7348eb7ae059a84c118fdfeb943',1,'glm::gtx::f32vec1()']]], + ['f32vec2',['f32vec2',['../a00721.html#ga5d6c70e080409a76a257dc55bd8ea2c8',1,'glm']]], + ['f32vec3',['f32vec3',['../a00721.html#gaea5c4518e175162e306d2c2b5ef5ac79',1,'glm']]], + ['f32vec4',['f32vec4',['../a00721.html#ga31c6ca0e074a44007f49a9a3720b18c8',1,'glm']]], + ['f64',['f64',['../a00721.html#ga1d794d240091678f602e8de225b8d8c9',1,'glm']]], + ['f64mat1',['f64mat1',['../a00763.html#ga59bfa589419b5265d01314fcecd33435',1,'glm::gtx']]], + ['f64mat1x1',['f64mat1x1',['../a00763.html#ga448eeb08d0b7d8c43a8b292c981955fd',1,'glm::gtx']]], + ['f64mat2',['f64mat2',['../a00721.html#gad9771450a54785d13080cdde0fe20c1d',1,'glm']]], + ['f64mat2x2',['f64mat2x2',['../a00721.html#ga9ec7c4c79e303c053e30729a95fb2c37',1,'glm']]], + ['f64mat2x3',['f64mat2x3',['../a00721.html#gae3ab5719fc4c1e966631dbbcba8d412a',1,'glm']]], + ['f64mat2x4',['f64mat2x4',['../a00721.html#gac87278e0c702ba8afff76316d4eeb769',1,'glm']]], + ['f64mat3',['f64mat3',['../a00721.html#ga9b69181efbf8f37ae934f135137b29c0',1,'glm']]], + ['f64mat3x2',['f64mat3x2',['../a00721.html#ga2473d8bf3f4abf967c4d0e18175be6f7',1,'glm']]], + ['f64mat3x3',['f64mat3x3',['../a00721.html#ga916c1aed91cf91f7b41399ebe7c6e185',1,'glm']]], + ['f64mat3x4',['f64mat3x4',['../a00721.html#gaab239fa9e35b65a67cbaa6ac082f3675',1,'glm']]], + ['f64mat4',['f64mat4',['../a00721.html#ga0ecd3f4952536e5ef12702b44d2626fc',1,'glm']]], + ['f64mat4x2',['f64mat4x2',['../a00721.html#gab7daf79d6bc06a68bea1c6f5e11b5512',1,'glm']]], + ['f64mat4x3',['f64mat4x3',['../a00721.html#ga3e2e66ffbe341a80bc005ba2b9552110',1,'glm']]], + ['f64mat4x4',['f64mat4x4',['../a00721.html#gae52e2b7077a9ff928a06ab5ce600b81e',1,'glm']]], + ['f64quat',['f64quat',['../a00721.html#ga2b114a2f2af0fe1dfeb569c767822940',1,'glm']]], + ['f64vec1',['f64vec1',['../a00721.html#gade502df1ce14f837fae7f60a03ddb9b0',1,'glm::f64vec1()'],['../a00763.html#gae5987a61b8c03d5c432a9e62f0b3efe1',1,'glm::gtx::f64vec1()']]], + ['f64vec2',['f64vec2',['../a00721.html#gadc4e1594f9555d919131ee02b17822a2',1,'glm']]], + ['f64vec3',['f64vec3',['../a00721.html#gaa7a1ddca75c5f629173bf4772db7a635',1,'glm']]], + ['f64vec4',['f64vec4',['../a00721.html#ga66e92e57260bdb910609b9a56bf83e97',1,'glm']]], + ['fdualquat',['fdualquat',['../a00734.html#ga237c2b9b42c9a930e49de5840ae0f930',1,'glm']]], + ['float1',['float1',['../a00732.html#gaf5208d01f6c6fbcb7bb55d610b9c0ead',1,'glm']]], + ['float1x1',['float1x1',['../a00732.html#ga73720b8dc4620835b17f74d428f98c0c',1,'glm']]], + ['float2',['float2',['../a00732.html#ga02d3c013982c183906c61d74aa3166ce',1,'glm']]], + ['float2x2',['float2x2',['../a00732.html#ga33d43ecbb60a85a1366ff83f8a0ec85f',1,'glm']]], + ['float2x3',['float2x3',['../a00732.html#ga939b0cff15cee3030f75c1b2e36f89fe',1,'glm']]], + ['float2x4',['float2x4',['../a00732.html#gafec3cfd901ab334a92e0242b8f2269b4',1,'glm']]], + ['float3',['float3',['../a00732.html#ga821ff110fc8533a053cbfcc93e078cc0',1,'glm']]], + ['float32',['float32',['../a00681.html#gaacdc525d6f7bddb3ae95d5c311bd06a1',1,'glm']]], + ['float32_5ft',['float32_t',['../a00721.html#gaa4947bc8b47c72fceea9bda730ecf603',1,'glm']]], + ['float3x2',['float3x2',['../a00732.html#gaa6c69f04ba95f3faedf95dae874de576',1,'glm']]], + ['float3x3',['float3x3',['../a00732.html#ga6ceb5d38a58becdf420026e12a6562f3',1,'glm']]], + ['float3x4',['float3x4',['../a00732.html#ga4d2679c321b793ca3784fe0315bb5332',1,'glm']]], + ['float4',['float4',['../a00732.html#gae2da7345087db3815a25d8837a727ef1',1,'glm']]], + ['float4x2',['float4x2',['../a00732.html#ga308b9af0c221145bcfe9bfc129d9098e',1,'glm']]], + ['float4x3',['float4x3',['../a00732.html#gac0a51b4812038aa81d73ffcc37f741ac',1,'glm']]], + ['float4x4',['float4x4',['../a00732.html#gad3051649b3715d828a4ab92cdae7c3bf',1,'glm']]], + ['float64',['float64',['../a00681.html#ga232fad1b0d6dcc7c16aabde98b2e2a80',1,'glm']]], + ['float64_5ft',['float64_t',['../a00721.html#ga728366fef72cd96f0a5fa6429f05469e',1,'glm']]], + ['fmat2',['fmat2',['../a00721.html#ga4541dc2feb2a31d6ecb5a303f3dd3280',1,'glm']]], + ['fmat2x2',['fmat2x2',['../a00721.html#ga3350c93c3275298f940a42875388e4b4',1,'glm']]], + ['fmat2x3',['fmat2x3',['../a00721.html#ga55a2d2a8eb09b5633668257eb3cad453',1,'glm']]], + ['fmat2x4',['fmat2x4',['../a00721.html#ga681381f19f11c9e5ee45cda2c56937ff',1,'glm']]], + ['fmat3',['fmat3',['../a00721.html#ga253d453c20e037730023fea0215cb6f6',1,'glm']]], + ['fmat3x2',['fmat3x2',['../a00721.html#ga6af54d70d9beb0a7ef992a879e86b04f',1,'glm']]], + ['fmat3x3',['fmat3x3',['../a00721.html#gaa07c86650253672a19dbfb898f3265b8',1,'glm']]], + ['fmat3x4',['fmat3x4',['../a00721.html#ga44e158af77a670ee1b58c03cda9e1619',1,'glm']]], + ['fmat4',['fmat4',['../a00721.html#ga8cb400c0f4438f2640035d7b9824a0ca',1,'glm']]], + ['fmat4x2',['fmat4x2',['../a00721.html#ga8c8aa45aafcc23238edb1d5aeb801774',1,'glm']]], + ['fmat4x3',['fmat4x3',['../a00721.html#ga4295048a78bdf46b8a7de77ec665b497',1,'glm']]], + ['fmat4x4',['fmat4x4',['../a00721.html#gad01cc6479bde1fd1870f13d3ed9530b3',1,'glm']]], + ['fvec1',['fvec1',['../a00721.html#ga98b9ed43cf8c5cf1d354b23c7df9119f',1,'glm']]], + ['fvec2',['fvec2',['../a00721.html#ga24273aa02abaecaab7f160bac437a339',1,'glm']]], + ['fvec3',['fvec3',['../a00721.html#ga89930533646b30d021759298aa6bf04a',1,'glm']]], + ['fvec4',['fvec4',['../a00721.html#ga713c796c54875cf4092d42ff9d9096b0',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/typedefs_4.html b/common/glm/doc/api/search/typedefs_4.html new file mode 100644 index 000000000..ef733ad27 --- /dev/null +++ b/common/glm/doc/api/search/typedefs_4.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/typedefs_4.js b/common/glm/doc/api/search/typedefs_4.js new file mode 100644 index 000000000..7a5efb747 --- /dev/null +++ b/common/glm/doc/api/search/typedefs_4.js @@ -0,0 +1,188 @@ +var searchData= +[ + ['highp_5fbvec1',['highp_bvec1',['../a00686.html#gae8a1e14abae1387274f57741750c06a2',1,'glm']]], + ['highp_5fbvec2',['highp_bvec2',['../a00700.html#gac6c781a85f012d77a75310a3058702c2',1,'glm']]], + ['highp_5fbvec3',['highp_bvec3',['../a00700.html#gaedb70027d89a0a405046aefda4eabaa6',1,'glm']]], + ['highp_5fbvec4',['highp_bvec4',['../a00700.html#gaee663ff64429443ab07a5327074192f6',1,'glm']]], + ['highp_5fddualquat',['highp_ddualquat',['../a00734.html#ga8f67eafa7197d7a668dad5105a463d2a',1,'glm']]], + ['highp_5fdmat2',['highp_dmat2',['../a00702.html#ga369b447bb1b312449b679ea1f90f3cea',1,'glm']]], + ['highp_5fdmat2x2',['highp_dmat2x2',['../a00702.html#gae27ac20302c2e39b6c78e7fe18e62ef7',1,'glm']]], + ['highp_5fdmat2x3',['highp_dmat2x3',['../a00702.html#gad4689ec33bc2c26e10132b174b49001a',1,'glm']]], + ['highp_5fdmat2x4',['highp_dmat2x4',['../a00702.html#ga5ceeb46670fdc000a0701910cc5061c9',1,'glm']]], + ['highp_5fdmat3',['highp_dmat3',['../a00702.html#ga86d6d4dbad92ffdcc759773340e15a97',1,'glm']]], + ['highp_5fdmat3x2',['highp_dmat3x2',['../a00702.html#ga3647309010a2160e9ec89bc6f7c95c35',1,'glm']]], + ['highp_5fdmat3x3',['highp_dmat3x3',['../a00702.html#gae367ea93c4ad8a7c101dd27b8b2b04ce',1,'glm']]], + ['highp_5fdmat3x4',['highp_dmat3x4',['../a00702.html#ga6543eeeb64f48d79a0b96484308c50f0',1,'glm']]], + ['highp_5fdmat4',['highp_dmat4',['../a00702.html#ga945254f459860741138bceb74da496b9',1,'glm']]], + ['highp_5fdmat4x2',['highp_dmat4x2',['../a00702.html#gaeda1f474c668eaecc443bea85a4a4eca',1,'glm']]], + ['highp_5fdmat4x3',['highp_dmat4x3',['../a00702.html#gacf237c2d8832fe8db2d7e187585d34bd',1,'glm']]], + ['highp_5fdmat4x4',['highp_dmat4x4',['../a00702.html#ga118d24a3d12c034e7cccef7bf2f01b8a',1,'glm']]], + ['highp_5fdquat',['highp_dquat',['../a00671.html#gaf13a25f41afc03480b40fc71bd249cec',1,'glm']]], + ['highp_5fdualquat',['highp_dualquat',['../a00734.html#ga9ef5bf1da52a9d4932335a517086ceaf',1,'glm']]], + ['highp_5fdvec1',['highp_dvec1',['../a00689.html#ga77c22c4426da3a6865c88d3fc907e3fe',1,'glm']]], + ['highp_5fdvec2',['highp_dvec2',['../a00700.html#gab98d77cca255914f5e29697fcbc2d975',1,'glm']]], + ['highp_5fdvec3',['highp_dvec3',['../a00700.html#gab24dc20dcdc5b71282634bdbf6b70105',1,'glm']]], + ['highp_5fdvec4',['highp_dvec4',['../a00700.html#gab654f4ed4a99d64a6cfc65320c2a7590',1,'glm']]], + ['highp_5ff32',['highp_f32',['../a00721.html#ga6906e1ef0b34064b4b675489c5c38725',1,'glm']]], + ['highp_5ff32mat2',['highp_f32mat2',['../a00721.html#ga298f7d4d273678d0282812368da27fda',1,'glm']]], + ['highp_5ff32mat2x2',['highp_f32mat2x2',['../a00721.html#gae5eb02d92b7d4605a4b7f37ae5cb2968',1,'glm']]], + ['highp_5ff32mat2x3',['highp_f32mat2x3',['../a00721.html#ga0aeb5cb001473b08c88175012708a379',1,'glm']]], + ['highp_5ff32mat2x4',['highp_f32mat2x4',['../a00721.html#ga88938ee1e7981fa3402e88da6ad74531',1,'glm']]], + ['highp_5ff32mat3',['highp_f32mat3',['../a00721.html#ga24f9ef3263b1638564713892cc37981f',1,'glm']]], + ['highp_5ff32mat3x2',['highp_f32mat3x2',['../a00721.html#ga36537e701456f12c20e73f469cac4967',1,'glm']]], + ['highp_5ff32mat3x3',['highp_f32mat3x3',['../a00721.html#gaab691ae40c37976d268d8cac0096e0e1',1,'glm']]], + ['highp_5ff32mat3x4',['highp_f32mat3x4',['../a00721.html#gaa5086dbd6efb272d13fc88829330861d',1,'glm']]], + ['highp_5ff32mat4',['highp_f32mat4',['../a00721.html#ga14c90ca49885723f51d06e295587236f',1,'glm']]], + ['highp_5ff32mat4x2',['highp_f32mat4x2',['../a00721.html#ga602e119c6b246b4f6edcf66845f2aa0f',1,'glm']]], + ['highp_5ff32mat4x3',['highp_f32mat4x3',['../a00721.html#ga66bffdd8e5c0d3ef9958bbab9ca1ba59',1,'glm']]], + ['highp_5ff32mat4x4',['highp_f32mat4x4',['../a00721.html#gaf1b712b97b2322685fbbed28febe5f84',1,'glm']]], + ['highp_5ff32quat',['highp_f32quat',['../a00721.html#ga4252cf7f5b0e3cd47c3d3badf0ef43b3',1,'glm']]], + ['highp_5ff32vec1',['highp_f32vec1',['../a00721.html#gab1b1c9e8667902b78b2c330e4d383a61',1,'glm']]], + ['highp_5ff32vec2',['highp_f32vec2',['../a00721.html#ga0b8ebd4262331e139ff257d7cf2a4b77',1,'glm']]], + ['highp_5ff32vec3',['highp_f32vec3',['../a00721.html#ga522775dbcc6d96246a1c5cf02344fd8c',1,'glm']]], + ['highp_5ff32vec4',['highp_f32vec4',['../a00721.html#ga0f038d4e09862a74f03d102c59eda73e',1,'glm']]], + ['highp_5ff64',['highp_f64',['../a00721.html#ga51d5266017d88f62737c1973923a7cf4',1,'glm']]], + ['highp_5ff64mat2',['highp_f64mat2',['../a00721.html#gaf7adb92ce8de0afaff01436b039fd924',1,'glm']]], + ['highp_5ff64mat2x2',['highp_f64mat2x2',['../a00721.html#ga773ea237a051827cfc20de960bc73ff0',1,'glm']]], + ['highp_5ff64mat2x3',['highp_f64mat2x3',['../a00721.html#ga8342c7469384c6d769cacc9e309278d9',1,'glm']]], + ['highp_5ff64mat2x4',['highp_f64mat2x4',['../a00721.html#ga5a67a7440b9c0d1538533540f99036a5',1,'glm']]], + ['highp_5ff64mat3',['highp_f64mat3',['../a00721.html#ga609bf0ace941d6ab1bb2f9522a04e546',1,'glm']]], + ['highp_5ff64mat3x2',['highp_f64mat3x2',['../a00721.html#ga5bdbfb4ce7d05ce1e1b663f50be17e8a',1,'glm']]], + ['highp_5ff64mat3x3',['highp_f64mat3x3',['../a00721.html#ga7c2cadb9b85cc7e0d125db21ca19dea4',1,'glm']]], + ['highp_5ff64mat3x4',['highp_f64mat3x4',['../a00721.html#gad310b1dddeec9ec837a104e7db8de580',1,'glm']]], + ['highp_5ff64mat4',['highp_f64mat4',['../a00721.html#gad308e0ed27d64daa4213fb257fcbd5a5',1,'glm']]], + ['highp_5ff64mat4x2',['highp_f64mat4x2',['../a00721.html#ga58c4631421e323e252fc716b6103e38c',1,'glm']]], + ['highp_5ff64mat4x3',['highp_f64mat4x3',['../a00721.html#gae94823d65648e44d972863c6caa13103',1,'glm']]], + ['highp_5ff64mat4x4',['highp_f64mat4x4',['../a00721.html#ga09a2374b725c4246d263ee36fb66434c',1,'glm']]], + ['highp_5ff64quat',['highp_f64quat',['../a00721.html#gafcfdd74a115163af2ce1093551747352',1,'glm']]], + ['highp_5ff64vec1',['highp_f64vec1',['../a00721.html#ga62c31b133ceee9984fbee05ac4c434a9',1,'glm']]], + ['highp_5ff64vec2',['highp_f64vec2',['../a00721.html#ga670ea1b0a1172bc73b1d7c1e0c26cce2',1,'glm']]], + ['highp_5ff64vec3',['highp_f64vec3',['../a00721.html#gacd1196090ece7a69fb5c3e43a7d4d851',1,'glm']]], + ['highp_5ff64vec4',['highp_f64vec4',['../a00721.html#ga61185c44c8cc0b25d9a0f67d8a267444',1,'glm']]], + ['highp_5ffdualquat',['highp_fdualquat',['../a00734.html#ga4c4e55e9c99dc57b299ed590968da564',1,'glm']]], + ['highp_5ffloat32',['highp_float32',['../a00721.html#gac5a7f21136e0a78d0a1b9f60ef2f8aea',1,'glm']]], + ['highp_5ffloat32_5ft',['highp_float32_t',['../a00721.html#ga5376ef18dca9d248897c3363ef5a06b2',1,'glm']]], + ['highp_5ffloat64',['highp_float64',['../a00721.html#gadbb198a4d7aad82a0f4dc466ef6f6215',1,'glm']]], + ['highp_5ffloat64_5ft',['highp_float64_t',['../a00721.html#gaaeeb0077198cff40e3f48b1108ece139',1,'glm']]], + ['highp_5ffmat2',['highp_fmat2',['../a00721.html#gae98c88d9a7befa9b5877f49176225535',1,'glm']]], + ['highp_5ffmat2x2',['highp_fmat2x2',['../a00721.html#ga28635abcddb2f3e92c33c3f0fcc682ad',1,'glm']]], + ['highp_5ffmat2x3',['highp_fmat2x3',['../a00721.html#gacf111095594996fef29067b2454fccad',1,'glm']]], + ['highp_5ffmat2x4',['highp_fmat2x4',['../a00721.html#ga4920a1536f161f7ded1d6909b7fef0d2',1,'glm']]], + ['highp_5ffmat3',['highp_fmat3',['../a00721.html#gaed2dc69e0d507d4191092dbd44b3eb75',1,'glm']]], + ['highp_5ffmat3x2',['highp_fmat3x2',['../a00721.html#gae54e4d1aeb5a0f0c64822e6f1b299e19',1,'glm']]], + ['highp_5ffmat3x3',['highp_fmat3x3',['../a00721.html#gaa5b44d3ef6efcf33f44876673a7a936e',1,'glm']]], + ['highp_5ffmat3x4',['highp_fmat3x4',['../a00721.html#ga961fac2a885907ffcf4d40daac6615c5',1,'glm']]], + ['highp_5ffmat4',['highp_fmat4',['../a00721.html#gabf28443ce0cc0959077ec39b21f32c39',1,'glm']]], + ['highp_5ffmat4x2',['highp_fmat4x2',['../a00721.html#ga076961cf2d120c7168b957cb2ed107b3',1,'glm']]], + ['highp_5ffmat4x3',['highp_fmat4x3',['../a00721.html#gae406ec670f64170a7437b5e302eeb2cb',1,'glm']]], + ['highp_5ffmat4x4',['highp_fmat4x4',['../a00721.html#gaee80c7cd3caa0f2635058656755f6f69',1,'glm']]], + ['highp_5ffvec1',['highp_fvec1',['../a00721.html#gaa1040342c4efdedc8f90e6267db8d41c',1,'glm']]], + ['highp_5ffvec2',['highp_fvec2',['../a00721.html#ga7c0d196f5fa79f7e892a2f323a0be1ae',1,'glm']]], + ['highp_5ffvec3',['highp_fvec3',['../a00721.html#ga6ef77413883f48d6b53b4169b25edbd0',1,'glm']]], + ['highp_5ffvec4',['highp_fvec4',['../a00721.html#ga8b839abbb44f5102609eed89f6ed61f7',1,'glm']]], + ['highp_5fi16',['highp_i16',['../a00721.html#ga0336abc2604dd2c20c30e036454b64f8',1,'glm']]], + ['highp_5fi16vec1',['highp_i16vec1',['../a00721.html#ga70fdfcc1fd38084bde83c3f06a8b9f19',1,'glm']]], + ['highp_5fi16vec2',['highp_i16vec2',['../a00721.html#gaa7db3ad10947cf70cae6474d05ebd227',1,'glm']]], + ['highp_5fi16vec3',['highp_i16vec3',['../a00721.html#ga5609c8fa2b7eac3dec337d321cb0ca96',1,'glm']]], + ['highp_5fi16vec4',['highp_i16vec4',['../a00721.html#ga7a18659438828f91ccca28f1a1e067b4',1,'glm']]], + ['highp_5fi32',['highp_i32',['../a00721.html#ga727675ac6b5d2fc699520e0059735e25',1,'glm']]], + ['highp_5fi32vec1',['highp_i32vec1',['../a00721.html#ga6a9d71cc62745302f70422b7dc98755c',1,'glm']]], + ['highp_5fi32vec2',['highp_i32vec2',['../a00721.html#gaa9b4579f8e6f3d9b649a965bcb785530',1,'glm']]], + ['highp_5fi32vec3',['highp_i32vec3',['../a00721.html#ga31e070ea3bdee623e6e18a61ba5718b1',1,'glm']]], + ['highp_5fi32vec4',['highp_i32vec4',['../a00721.html#gadf70eaaa230aeed5a4c9f4c9c5c55902',1,'glm']]], + ['highp_5fi64',['highp_i64',['../a00721.html#gac25db6d2b1e2a0f351b77ba3409ac4cd',1,'glm']]], + ['highp_5fi64vec1',['highp_i64vec1',['../a00721.html#gabd2fda3cd208acf5a370ec9b5b3c58d4',1,'glm']]], + ['highp_5fi64vec2',['highp_i64vec2',['../a00721.html#gad9d1903cb20899966e8ebe0670889a5f',1,'glm']]], + ['highp_5fi64vec3',['highp_i64vec3',['../a00721.html#ga62324224b9c6cce9c6b4db96bb704a8a',1,'glm']]], + ['highp_5fi64vec4',['highp_i64vec4',['../a00721.html#gad23b1be9b3bf20352089a6b738f0ebba',1,'glm']]], + ['highp_5fi8',['highp_i8',['../a00721.html#gacb88796f2d08ef253d0345aff20c3aee',1,'glm']]], + ['highp_5fi8vec1',['highp_i8vec1',['../a00721.html#ga1d8c10949691b0fd990253476f47beb3',1,'glm']]], + ['highp_5fi8vec2',['highp_i8vec2',['../a00721.html#ga50542e4cb9b2f9bec213b66e06145d07',1,'glm']]], + ['highp_5fi8vec3',['highp_i8vec3',['../a00721.html#ga8396bfdc081d9113190d0c39c9f67084',1,'glm']]], + ['highp_5fi8vec4',['highp_i8vec4',['../a00721.html#ga4824e3ddf6e608117dfe4809430737b4',1,'glm']]], + ['highp_5fimat2',['highp_imat2',['../a00712.html#ga8499cc3b016003f835314c1c756e9db9',1,'glm']]], + ['highp_5fimat2x2',['highp_imat2x2',['../a00712.html#gaa389e2d1c3b10941cae870bc0aeba5b3',1,'glm']]], + ['highp_5fimat2x3',['highp_imat2x3',['../a00712.html#gaba49d890e06c9444795f5a133fbf1336',1,'glm']]], + ['highp_5fimat2x4',['highp_imat2x4',['../a00712.html#ga05a970fd4366dad6c8a0be676b1eae5b',1,'glm']]], + ['highp_5fimat3',['highp_imat3',['../a00712.html#gaca4506a3efa679eff7c006d9826291fd',1,'glm']]], + ['highp_5fimat3x2',['highp_imat3x2',['../a00712.html#ga91c671c3ff9706c2393e78b22fd84bcb',1,'glm']]], + ['highp_5fimat3x3',['highp_imat3x3',['../a00712.html#ga07d7b7173e2a6f843ff5f1c615a95b41',1,'glm']]], + ['highp_5fimat3x4',['highp_imat3x4',['../a00712.html#ga53008f580be99018a17b357b5a4ffc0d',1,'glm']]], + ['highp_5fimat4',['highp_imat4',['../a00712.html#ga7cfb09b34e0fcf73eaf6512d6483ef56',1,'glm']]], + ['highp_5fimat4x2',['highp_imat4x2',['../a00712.html#ga1858820fb292cae396408b2034407f72',1,'glm']]], + ['highp_5fimat4x3',['highp_imat4x3',['../a00712.html#ga6be0b80ae74bb309bc5b964d93d68fc5',1,'glm']]], + ['highp_5fimat4x4',['highp_imat4x4',['../a00712.html#ga2c783ee6f8f040ab37df2f70392c8b44',1,'glm']]], + ['highp_5fint16',['highp_int16',['../a00721.html#ga5fde0fa4a3852a9dd5d637a92ee74718',1,'glm']]], + ['highp_5fint16_5ft',['highp_int16_t',['../a00721.html#gacaea06d0a79ef3172e887a7a6ba434ff',1,'glm']]], + ['highp_5fint32',['highp_int32',['../a00721.html#ga84ed04b4e0de18c977e932d617e7c223',1,'glm']]], + ['highp_5fint32_5ft',['highp_int32_t',['../a00721.html#ga2c71c8bd9e2fe7d2e93ca250d8b6157f',1,'glm']]], + ['highp_5fint64',['highp_int64',['../a00721.html#ga226a8d52b4e3f77aaa6231135e886aac',1,'glm']]], + ['highp_5fint64_5ft',['highp_int64_t',['../a00721.html#ga73c6abb280a45feeff60f9accaee91f3',1,'glm']]], + ['highp_5fint8',['highp_int8',['../a00721.html#gad0549c902a96a7164e4ac858d5f39dbf',1,'glm']]], + ['highp_5fint8_5ft',['highp_int8_t',['../a00721.html#ga1085c50dd8fbeb5e7e609b1c127492a5',1,'glm']]], + ['highp_5fivec1',['highp_ivec1',['../a00693.html#ga7e02566f2bd2caa68e61be45a477c77e',1,'glm']]], + ['highp_5fivec2',['highp_ivec2',['../a00700.html#gaa18f6b80b41c214f10666948539c1f93',1,'glm']]], + ['highp_5fivec3',['highp_ivec3',['../a00700.html#ga7dd782c3ef5719bc6d5c3ca826b8ad18',1,'glm']]], + ['highp_5fivec4',['highp_ivec4',['../a00700.html#gafb84dccdf5d82443df3ffc8428dcaf3e',1,'glm']]], + ['highp_5fmat2',['highp_mat2',['../a00702.html#ga4d5a0055544a516237dcdace049b143d',1,'glm']]], + ['highp_5fmat2x2',['highp_mat2x2',['../a00702.html#ga2352ae43b284c9f71446674c0208c05d',1,'glm']]], + ['highp_5fmat2x3',['highp_mat2x3',['../a00702.html#ga7a0e3fe41512b0494e598f5c58722f19',1,'glm']]], + ['highp_5fmat2x4',['highp_mat2x4',['../a00702.html#ga61f36a81f2ed1b5f9fc8bc3b26faec8f',1,'glm']]], + ['highp_5fmat3',['highp_mat3',['../a00702.html#ga3fd9849f3da5ed6e3decc3fb10a20b3e',1,'glm']]], + ['highp_5fmat3x2',['highp_mat3x2',['../a00702.html#ga1eda47a00027ec440eac05d63739c71b',1,'glm']]], + ['highp_5fmat3x3',['highp_mat3x3',['../a00702.html#ga2ea82e12f4d7afcfce8f59894d400230',1,'glm']]], + ['highp_5fmat3x4',['highp_mat3x4',['../a00702.html#ga6454b3a26ea30f69de8e44c08a63d1b7',1,'glm']]], + ['highp_5fmat4',['highp_mat4',['../a00702.html#gad72e13d669d039f12ae5afa23148adc1',1,'glm']]], + ['highp_5fmat4x2',['highp_mat4x2',['../a00702.html#gab68b66e6d2c37b804d0baf970fa4f0e5',1,'glm']]], + ['highp_5fmat4x3',['highp_mat4x3',['../a00702.html#ga8d5a4e65fb976e4553b84995b95ecb38',1,'glm']]], + ['highp_5fmat4x4',['highp_mat4x4',['../a00702.html#ga58cc504be0e3b61c48bc91554a767b9f',1,'glm']]], + ['highp_5fquat',['highp_quat',['../a00674.html#gaa2fd8085774376310aeb80588e0eab6e',1,'glm']]], + ['highp_5fu16',['highp_u16',['../a00721.html#ga8e62c883d13f47015f3b70ed88751369',1,'glm']]], + ['highp_5fu16vec1',['highp_u16vec1',['../a00721.html#gad064202b4cf9a2972475c03de657cb39',1,'glm']]], + ['highp_5fu16vec2',['highp_u16vec2',['../a00721.html#ga791b15ceb3f1e09d1a0ec6f3057ca159',1,'glm']]], + ['highp_5fu16vec3',['highp_u16vec3',['../a00721.html#gacfd806749008f0ade6ac4bb9dd91082f',1,'glm']]], + ['highp_5fu16vec4',['highp_u16vec4',['../a00721.html#ga8a85a3d54a8a9e14fe7a1f96196c4f61',1,'glm']]], + ['highp_5fu32',['highp_u32',['../a00721.html#ga7a6f1929464dcc680b16381a4ee5f2cf',1,'glm']]], + ['highp_5fu32vec1',['highp_u32vec1',['../a00721.html#ga0e35a565b9036bfc3989f5e23a0792e3',1,'glm']]], + ['highp_5fu32vec2',['highp_u32vec2',['../a00721.html#ga2f256334f83fba4c2d219e414b51df6c',1,'glm']]], + ['highp_5fu32vec3',['highp_u32vec3',['../a00721.html#gaf14d7a50502464e7cbfa074f24684cb1',1,'glm']]], + ['highp_5fu32vec4',['highp_u32vec4',['../a00721.html#ga22166f0da65038b447f3c5e534fff1c2',1,'glm']]], + ['highp_5fu64',['highp_u64',['../a00721.html#ga0c181fdf06a309691999926b6690c969',1,'glm']]], + ['highp_5fu64vec1',['highp_u64vec1',['../a00721.html#gae4fe774744852c4d7d069be2e05257ab',1,'glm']]], + ['highp_5fu64vec2',['highp_u64vec2',['../a00721.html#ga78f77b8b2d17b431ac5a68c0b5d7050d',1,'glm']]], + ['highp_5fu64vec3',['highp_u64vec3',['../a00721.html#ga41bdabea6e589029659331ba47eb78c1',1,'glm']]], + ['highp_5fu64vec4',['highp_u64vec4',['../a00721.html#ga4f15b41aa24b11cc42ad5798c04a2325',1,'glm']]], + ['highp_5fu8',['highp_u8',['../a00721.html#gacd1259f3a9e8d2a9df5be2d74322ef9c',1,'glm']]], + ['highp_5fu8vec1',['highp_u8vec1',['../a00721.html#ga8408cb76b6550ff01fa0a3024e7b68d2',1,'glm']]], + ['highp_5fu8vec2',['highp_u8vec2',['../a00721.html#ga27585b7c3ab300059f11fcba465f6fd2',1,'glm']]], + ['highp_5fu8vec3',['highp_u8vec3',['../a00721.html#ga45721c13b956eb691cbd6c6c1429167a',1,'glm']]], + ['highp_5fu8vec4',['highp_u8vec4',['../a00721.html#gae0b75ad0fed8c00ddc0b5ce335d31060',1,'glm']]], + ['highp_5fuint16',['highp_uint16',['../a00721.html#ga746dc6da204f5622e395f492997dbf57',1,'glm']]], + ['highp_5fuint16_5ft',['highp_uint16_t',['../a00721.html#gacf54c3330ef60aa3d16cb676c7bcb8c7',1,'glm']]], + ['highp_5fuint32',['highp_uint32',['../a00721.html#ga256b12b650c3f2fb86878fd1c5db8bc3',1,'glm']]], + ['highp_5fuint32_5ft',['highp_uint32_t',['../a00721.html#gae978599c9711ac263ba732d4ac225b0e',1,'glm']]], + ['highp_5fuint64',['highp_uint64',['../a00721.html#gaa38d732f5d4a7bc42a1b43b9d3c141ce',1,'glm']]], + ['highp_5fuint64_5ft',['highp_uint64_t',['../a00721.html#gaa46172d7dc1c7ffe3e78107ff88adf08',1,'glm']]], + ['highp_5fuint8',['highp_uint8',['../a00721.html#ga97432f9979e73e66567361fd01e4cffb',1,'glm']]], + ['highp_5fuint8_5ft',['highp_uint8_t',['../a00721.html#gac4e00a26a2adb5f2c0a7096810df29e5',1,'glm']]], + ['highp_5fumat2',['highp_umat2',['../a00712.html#ga42cbce64c4c1cd121b8437daa6e110de',1,'glm']]], + ['highp_5fumat2x2',['highp_umat2x2',['../a00712.html#ga5337b7bc95f9cbac08a0c00b3f936b28',1,'glm']]], + ['highp_5fumat2x3',['highp_umat2x3',['../a00712.html#ga90718c7128320b24b52f9ea70e643ad4',1,'glm']]], + ['highp_5fumat2x4',['highp_umat2x4',['../a00712.html#gadca0a4724b4a6f56a2355b6f6e19248b',1,'glm']]], + ['highp_5fumat3',['highp_umat3',['../a00712.html#gaa1143120339b7d2d469d327662e8a172',1,'glm']]], + ['highp_5fumat3x2',['highp_umat3x2',['../a00712.html#ga844a5da2e7fc03fc7cccc7f1b70809c4',1,'glm']]], + ['highp_5fumat3x3',['highp_umat3x3',['../a00712.html#ga1f7d41c36b980774a4d2e7c1647fb4b2',1,'glm']]], + ['highp_5fumat3x4',['highp_umat3x4',['../a00712.html#ga25ee15c323924f2d0fe9896d329e5086',1,'glm']]], + ['highp_5fumat4',['highp_umat4',['../a00712.html#gaf665e4e78c2cc32a54ab40325738f9c9',1,'glm']]], + ['highp_5fumat4x2',['highp_umat4x2',['../a00712.html#gae69eb82ec08b0dc9bf2ead2a339ff801',1,'glm']]], + ['highp_5fumat4x3',['highp_umat4x3',['../a00712.html#ga45a8163d02c43216252056b0c120f3a5',1,'glm']]], + ['highp_5fumat4x4',['highp_umat4x4',['../a00712.html#ga6a56cbb769aed334c95241664415f9ba',1,'glm']]], + ['highp_5fuvec1',['highp_uvec1',['../a00696.html#gacda57dd8c2bff4934c7f09ddd87c0f39',1,'glm']]], + ['highp_5fuvec2',['highp_uvec2',['../a00700.html#gad5dd50da9e37387ca6b4e6f9c80fe6f8',1,'glm']]], + ['highp_5fuvec3',['highp_uvec3',['../a00700.html#gaef61508dd40ec523416697982f9ceaae',1,'glm']]], + ['highp_5fuvec4',['highp_uvec4',['../a00700.html#gaeebd7dd9f3e678691f8620241e5f9221',1,'glm']]], + ['highp_5fvec1',['highp_vec1',['../a00691.html#ga9e8ed21862a897c156c0b2abca70b1e9',1,'glm']]], + ['highp_5fvec2',['highp_vec2',['../a00700.html#gaa92c1954d71b1e7914874bd787b43d1c',1,'glm']]], + ['highp_5fvec3',['highp_vec3',['../a00700.html#gaca61dfaccbf2f58f2d8063a4e76b44a9',1,'glm']]], + ['highp_5fvec4',['highp_vec4',['../a00700.html#gad281decae52948b82feb3a9db8f63a7b',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/typedefs_5.html b/common/glm/doc/api/search/typedefs_5.html new file mode 100644 index 000000000..94db6d21e --- /dev/null +++ b/common/glm/doc/api/search/typedefs_5.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/typedefs_5.js b/common/glm/doc/api/search/typedefs_5.js new file mode 100644 index 000000000..8647d3c03 --- /dev/null +++ b/common/glm/doc/api/search/typedefs_5.js @@ -0,0 +1,61 @@ +var searchData= +[ + ['i16',['i16',['../a00721.html#ga3ab5fe184343d394fb6c2723c3ee3699',1,'glm']]], + ['i16vec1',['i16vec1',['../a00721.html#gafe730798732aa7b0647096a004db1b1c',1,'glm']]], + ['i16vec2',['i16vec2',['../a00721.html#ga2996630ba7b10535af8e065cf326f761',1,'glm']]], + ['i16vec3',['i16vec3',['../a00721.html#gae9c90a867a6026b1f6eab00456f3fb8b',1,'glm']]], + ['i16vec4',['i16vec4',['../a00721.html#ga550831bfc26d1e0101c1cb3d79938c06',1,'glm']]], + ['i32',['i32',['../a00721.html#ga96faea43ac5f875d2d3ffbf8d213e3eb',1,'glm']]], + ['i32vec1',['i32vec1',['../a00721.html#ga54b8a4e0f5a7203a821bf8e9c1265bcf',1,'glm']]], + ['i32vec2',['i32vec2',['../a00721.html#ga8b44026374982dcd1e52d22bac99247e',1,'glm']]], + ['i32vec3',['i32vec3',['../a00721.html#ga7f526b5cccef126a2ebcf9bdd890394e',1,'glm']]], + ['i32vec4',['i32vec4',['../a00721.html#ga866a05905c49912309ed1fa5f5980e61',1,'glm']]], + ['i64',['i64',['../a00721.html#gadb997e409103d4da18abd837e636a496',1,'glm']]], + ['i64vec1',['i64vec1',['../a00721.html#ga2b65767f8b5aed1bd1cf86c541662b50',1,'glm']]], + ['i64vec2',['i64vec2',['../a00721.html#ga48310188e1d0c616bf8d78c92447523b',1,'glm']]], + ['i64vec3',['i64vec3',['../a00721.html#ga667948cfe6fb3d6606c750729ec49f77',1,'glm']]], + ['i64vec4',['i64vec4',['../a00721.html#gaa4e31c3d9de067029efeb161a44b0232',1,'glm']]], + ['i8',['i8',['../a00721.html#ga302ec977b0c0c3ea245b6c9275495355',1,'glm']]], + ['i8vec1',['i8vec1',['../a00721.html#ga7e80d927ff0a3861ced68dfff8a4020b',1,'glm']]], + ['i8vec2',['i8vec2',['../a00721.html#gad06935764d78f43f9d542c784c2212ec',1,'glm']]], + ['i8vec3',['i8vec3',['../a00721.html#ga5a08d36cf7917cd19d081a603d0eae3e',1,'glm']]], + ['i8vec4',['i8vec4',['../a00721.html#ga4177a44206121dabc8c4ff1c0f544574',1,'glm']]], + ['imat2',['imat2',['../a00712.html#gaabe04f9948d4a213bb1c20137de03e01',1,'glm']]], + ['imat2x2',['imat2x2',['../a00712.html#gaa4732a240522ad9bc28144fda2fc14ec',1,'glm']]], + ['imat2x3',['imat2x3',['../a00712.html#ga3f42dd3d5d94a0fd5706f7ec8dd0c605',1,'glm']]], + ['imat2x4',['imat2x4',['../a00712.html#ga9d8faafdca42583d67e792dd038fc668',1,'glm']]], + ['imat3',['imat3',['../a00712.html#ga038f68437155ffa3c2583a15264a8195',1,'glm']]], + ['imat3x2',['imat3x2',['../a00712.html#ga7b33bbe4f12c060892bd3cc8d4cd737f',1,'glm']]], + ['imat3x3',['imat3x3',['../a00712.html#ga6aacc960f62e8f7d2fe9d32d5050e7a4',1,'glm']]], + ['imat3x4',['imat3x4',['../a00712.html#ga6e9ce23496d8b08dfc302d4039694b58',1,'glm']]], + ['imat4',['imat4',['../a00712.html#ga96b0d26a33b81bb6a60ca0f39682f7eb',1,'glm']]], + ['imat4x2',['imat4x2',['../a00712.html#ga8ce7ef51d8b2c1901fa5414deccbc3fa',1,'glm']]], + ['imat4x3',['imat4x3',['../a00712.html#ga705ee0bf49d6c3de4404ce2481bf0df5',1,'glm']]], + ['imat4x4',['imat4x4',['../a00712.html#ga43ed5e4f475b6f4cad7cba78f29c405b',1,'glm']]], + ['int1',['int1',['../a00732.html#ga0670a2111b5e4a6410bd027fa0232fc3',1,'glm']]], + ['int16',['int16',['../a00682.html#ga4355d16fcf9f644c9ac84293f0b1801f',1,'glm']]], + ['int16_5ft',['int16_t',['../a00721.html#gae8f5e3e964ca2ae240adc2c0d74adede',1,'glm']]], + ['int1x1',['int1x1',['../a00732.html#ga056ffe02d3a45af626f8e62221881c7a',1,'glm']]], + ['int2',['int2',['../a00732.html#gafe3a8fd56354caafe24bfe1b1e3ad22a',1,'glm']]], + ['int2x2',['int2x2',['../a00732.html#ga4e5ce477c15836b21e3c42daac68554d',1,'glm']]], + ['int2x3',['int2x3',['../a00732.html#ga197ded5ad8354f6b6fb91189d7a269b3',1,'glm']]], + ['int2x4',['int2x4',['../a00732.html#ga2749d59a7fddbac44f34ba78e57ef807',1,'glm']]], + ['int3',['int3',['../a00732.html#ga909c38a425f215a50c847145d7da09f0',1,'glm']]], + ['int32',['int32',['../a00682.html#ga56f1a81c92849566ae864511088eb7e8',1,'glm']]], + ['int32_5ft',['int32_t',['../a00721.html#ga042ef09ff2f0cb24a36f541bcb3a3710',1,'glm']]], + ['int3x2',['int3x2',['../a00732.html#gaa4cbe16a92cf3664376c7a2fc5126aa8',1,'glm']]], + ['int3x3',['int3x3',['../a00732.html#ga15c9649286f0bf431bdf9b3509580048',1,'glm']]], + ['int3x4',['int3x4',['../a00732.html#gaacac46ddc7d15d0f9529d05c92946a0f',1,'glm']]], + ['int4',['int4',['../a00732.html#gaecdef18c819c205aeee9f94dc93de56a',1,'glm']]], + ['int4x2',['int4x2',['../a00732.html#ga97a39dd9bc7d572810d80b8467cbffa1',1,'glm']]], + ['int4x3',['int4x3',['../a00732.html#gae4a2c53f14aeec9a17c2b81142b7e82d',1,'glm']]], + ['int4x4',['int4x4',['../a00732.html#ga04dee1552424198b8f58b377c2ee00d8',1,'glm']]], + ['int64',['int64',['../a00682.html#gaff5189f97f9e842d9636a0f240001b2e',1,'glm']]], + ['int64_5ft',['int64_t',['../a00721.html#ga322a7d7d2c2c68994dc872a33de63c61',1,'glm']]], + ['int8',['int8',['../a00682.html#gae47c588f3ab8c61121c1c7ab7edc47cd',1,'glm']]], + ['int8_5ft',['int8_t',['../a00721.html#ga4bf09d8838a86866b39ee6e109341645',1,'glm']]], + ['ivec1',['ivec1',['../a00692.html#gaedd0562c2e77714929d7723a7e2e0dba',1,'glm']]], + ['ivec2',['ivec2',['../a00699.html#ga6f9269106d91b2d2b91bcf27cd5f5560',1,'glm']]], + ['ivec3',['ivec3',['../a00699.html#gad0d784d8eee201aca362484d2daee46c',1,'glm']]], + ['ivec4',['ivec4',['../a00699.html#ga5abb4603dae0ce58c595e66d9123d812',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/typedefs_6.html b/common/glm/doc/api/search/typedefs_6.html new file mode 100644 index 000000000..bda8ea1c5 --- /dev/null +++ b/common/glm/doc/api/search/typedefs_6.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/typedefs_6.js b/common/glm/doc/api/search/typedefs_6.js new file mode 100644 index 000000000..b64d6ee4b --- /dev/null +++ b/common/glm/doc/api/search/typedefs_6.js @@ -0,0 +1,188 @@ +var searchData= +[ + ['lowp_5fbvec1',['lowp_bvec1',['../a00686.html#ga24a3d364e2ddd444f5b9e7975bbef8f9',1,'glm']]], + ['lowp_5fbvec2',['lowp_bvec2',['../a00700.html#ga5a5452140650988b94d5716e4d872465',1,'glm']]], + ['lowp_5fbvec3',['lowp_bvec3',['../a00700.html#ga79e0922a977662a8fd39d7829be3908b',1,'glm']]], + ['lowp_5fbvec4',['lowp_bvec4',['../a00700.html#ga15ac87724048ab7169bb5d3572939dd3',1,'glm']]], + ['lowp_5fddualquat',['lowp_ddualquat',['../a00734.html#gab4c5103338af3dac7e0fbc86895a3f1a',1,'glm']]], + ['lowp_5fdmat2',['lowp_dmat2',['../a00702.html#gad8e2727a6e7aa68280245bb0022118e1',1,'glm']]], + ['lowp_5fdmat2x2',['lowp_dmat2x2',['../a00702.html#gac61b94f5d9775f83f321bac899322fe2',1,'glm']]], + ['lowp_5fdmat2x3',['lowp_dmat2x3',['../a00702.html#gaf6bf2f5bde7ad5b9c289f777b93094af',1,'glm']]], + ['lowp_5fdmat2x4',['lowp_dmat2x4',['../a00702.html#ga97507a31ecee8609887d0f23bbde92c7',1,'glm']]], + ['lowp_5fdmat3',['lowp_dmat3',['../a00702.html#ga0cab80beee64a5f8d2ae4e823983063a',1,'glm']]], + ['lowp_5fdmat3x2',['lowp_dmat3x2',['../a00702.html#ga1e0ea3fba496bc7c6f620d2590acb66b',1,'glm']]], + ['lowp_5fdmat3x3',['lowp_dmat3x3',['../a00702.html#gac017848a9df570f60916a21a297b1e8e',1,'glm']]], + ['lowp_5fdmat3x4',['lowp_dmat3x4',['../a00702.html#ga93add35d2a44c5830978b827e8c295e8',1,'glm']]], + ['lowp_5fdmat4',['lowp_dmat4',['../a00702.html#ga708bc5b91bbfedd21debac8dcf2a64cd',1,'glm']]], + ['lowp_5fdmat4x2',['lowp_dmat4x2',['../a00702.html#ga382dc5295cead78766239a8457abfa98',1,'glm']]], + ['lowp_5fdmat4x3',['lowp_dmat4x3',['../a00702.html#ga3d7ea07da7c6e5c81a3f4c8b3d44056e',1,'glm']]], + ['lowp_5fdmat4x4',['lowp_dmat4x4',['../a00702.html#ga5b0413198b7e9f061f7534a221c9dac9',1,'glm']]], + ['lowp_5fdquat',['lowp_dquat',['../a00671.html#ga9e6e5f42e67dd5877350ba485c191f1c',1,'glm']]], + ['lowp_5fdualquat',['lowp_dualquat',['../a00734.html#gade05d29ebd4deea0f883d0e1bb4169aa',1,'glm']]], + ['lowp_5fdvec1',['lowp_dvec1',['../a00689.html#gaf906eb86b6e96c35138d0e4928e1435a',1,'glm']]], + ['lowp_5fdvec2',['lowp_dvec2',['../a00700.html#ga108086730d086b7f6f7a033955dfb9c3',1,'glm']]], + ['lowp_5fdvec3',['lowp_dvec3',['../a00700.html#ga42c518b2917e19ce6946a84c64a3a4b2',1,'glm']]], + ['lowp_5fdvec4',['lowp_dvec4',['../a00700.html#ga0b4432cb8d910e406576d10d802e190d',1,'glm']]], + ['lowp_5ff32',['lowp_f32',['../a00721.html#gaeea53879fc327293cf3352a409b7867b',1,'glm']]], + ['lowp_5ff32mat2',['lowp_f32mat2',['../a00721.html#ga52409bc6d4a2ce3421526c069220d685',1,'glm']]], + ['lowp_5ff32mat2x2',['lowp_f32mat2x2',['../a00721.html#ga1d091b6abfba1772450e1745a06525bc',1,'glm']]], + ['lowp_5ff32mat2x3',['lowp_f32mat2x3',['../a00721.html#ga961ccb34cd1a5654c772c8709e001dc5',1,'glm']]], + ['lowp_5ff32mat2x4',['lowp_f32mat2x4',['../a00721.html#gacc6bf0209dda0c7c14851a646071c974',1,'glm']]], + ['lowp_5ff32mat3',['lowp_f32mat3',['../a00721.html#ga4187f89f196505b40e63f516139511e5',1,'glm']]], + ['lowp_5ff32mat3x2',['lowp_f32mat3x2',['../a00721.html#gac53f9d7ab04eace67adad026092fb1e8',1,'glm']]], + ['lowp_5ff32mat3x3',['lowp_f32mat3x3',['../a00721.html#ga841211b641cff1fcf861bdb14e5e4abc',1,'glm']]], + ['lowp_5ff32mat3x4',['lowp_f32mat3x4',['../a00721.html#ga21b1b22dec013a72656e3644baf8a1e1',1,'glm']]], + ['lowp_5ff32mat4',['lowp_f32mat4',['../a00721.html#ga766aed2871e6173a81011a877f398f04',1,'glm']]], + ['lowp_5ff32mat4x2',['lowp_f32mat4x2',['../a00721.html#gae6f3fcb702a666de07650c149cfa845a',1,'glm']]], + ['lowp_5ff32mat4x3',['lowp_f32mat4x3',['../a00721.html#gac21eda58a1475449a5709b412ebd776c',1,'glm']]], + ['lowp_5ff32mat4x4',['lowp_f32mat4x4',['../a00721.html#ga4143d129898f91545948c46859adce44',1,'glm']]], + ['lowp_5ff32quat',['lowp_f32quat',['../a00721.html#gaa3ba60ef8f69c6aeb1629594eaa95347',1,'glm']]], + ['lowp_5ff32vec1',['lowp_f32vec1',['../a00721.html#ga43e5b41c834fcaf4db5a831c0e28128e',1,'glm']]], + ['lowp_5ff32vec2',['lowp_f32vec2',['../a00721.html#gaf3b694b2b8ded7e0b9f07b061917e1a0',1,'glm']]], + ['lowp_5ff32vec3',['lowp_f32vec3',['../a00721.html#gaf739a2cd7b81783a43148b53e40d983b',1,'glm']]], + ['lowp_5ff32vec4',['lowp_f32vec4',['../a00721.html#ga4e2e1debe022074ab224c9faf856d374',1,'glm']]], + ['lowp_5ff64',['lowp_f64',['../a00721.html#gabc7a97c07cbfac8e35eb5e63beb4b679',1,'glm']]], + ['lowp_5ff64mat2',['lowp_f64mat2',['../a00721.html#gafc730f6b4242763b0eda0ffa25150292',1,'glm']]], + ['lowp_5ff64mat2x2',['lowp_f64mat2x2',['../a00721.html#ga771fda9109933db34f808d92b9b84d7e',1,'glm']]], + ['lowp_5ff64mat2x3',['lowp_f64mat2x3',['../a00721.html#ga39e90adcffe33264bd608fa9c6bd184b',1,'glm']]], + ['lowp_5ff64mat2x4',['lowp_f64mat2x4',['../a00721.html#ga50265a202fbfe0a25fc70066c31d9336',1,'glm']]], + ['lowp_5ff64mat3',['lowp_f64mat3',['../a00721.html#ga58119a41d143ebaea0df70fe882e8a40',1,'glm']]], + ['lowp_5ff64mat3x2',['lowp_f64mat3x2',['../a00721.html#gab0eb2d65514ee3e49905aa2caad8c0ad',1,'glm']]], + ['lowp_5ff64mat3x3',['lowp_f64mat3x3',['../a00721.html#gac8f8a12ee03105ef8861dc652434e3b7',1,'glm']]], + ['lowp_5ff64mat3x4',['lowp_f64mat3x4',['../a00721.html#gade8d1edfb23996ab6c622e65e3893271',1,'glm']]], + ['lowp_5ff64mat4',['lowp_f64mat4',['../a00721.html#ga7451266e67794bd1125163502bc4a570',1,'glm']]], + ['lowp_5ff64mat4x2',['lowp_f64mat4x2',['../a00721.html#gab0cecb80fd106bc369b9e46a165815ce',1,'glm']]], + ['lowp_5ff64mat4x3',['lowp_f64mat4x3',['../a00721.html#gae731613b25db3a5ef5a05d21e57a57d3',1,'glm']]], + ['lowp_5ff64mat4x4',['lowp_f64mat4x4',['../a00721.html#ga8c9cd734e03cd49674f3e287aa4a6f95',1,'glm']]], + ['lowp_5ff64quat',['lowp_f64quat',['../a00721.html#gaa3ee2bc4af03cc06578b66b3e3f878ae',1,'glm']]], + ['lowp_5ff64vec1',['lowp_f64vec1',['../a00721.html#gaf2d02c5f4d59135b9bc524fe317fd26b',1,'glm']]], + ['lowp_5ff64vec2',['lowp_f64vec2',['../a00721.html#ga4e641a54d70c81eabf56c25c966d04bd',1,'glm']]], + ['lowp_5ff64vec3',['lowp_f64vec3',['../a00721.html#gae7a4711107b7d078fc5f03ce2227b90b',1,'glm']]], + ['lowp_5ff64vec4',['lowp_f64vec4',['../a00721.html#gaa666bb9e6d204d3bea0b3a39a3a335f4',1,'glm']]], + ['lowp_5ffdualquat',['lowp_fdualquat',['../a00734.html#gaa38f671be25a7f3b136a452a8bb42860',1,'glm']]], + ['lowp_5ffloat32',['lowp_float32',['../a00721.html#ga41b0d390bd8cc827323b1b3816ff4bf8',1,'glm']]], + ['lowp_5ffloat32_5ft',['lowp_float32_t',['../a00721.html#gaea881cae4ddc6c0fbf7cc5b08177ca5b',1,'glm']]], + ['lowp_5ffloat64',['lowp_float64',['../a00721.html#ga3714dab2c16a6545a405cb0c3b3aaa6f',1,'glm']]], + ['lowp_5ffloat64_5ft',['lowp_float64_t',['../a00721.html#ga7286a37076a09da140df18bfa75d4e38',1,'glm']]], + ['lowp_5ffmat2',['lowp_fmat2',['../a00721.html#ga5bba0ce31210e274f73efacd3364c03f',1,'glm']]], + ['lowp_5ffmat2x2',['lowp_fmat2x2',['../a00721.html#gab0feb11edd0d3ab3e8ed996d349a5066',1,'glm']]], + ['lowp_5ffmat2x3',['lowp_fmat2x3',['../a00721.html#ga71cdb53801ed4c3aadb3603c04723210',1,'glm']]], + ['lowp_5ffmat2x4',['lowp_fmat2x4',['../a00721.html#gaab217601c74974a84acbca428123ecf7',1,'glm']]], + ['lowp_5ffmat3',['lowp_fmat3',['../a00721.html#ga83079315e230e8f39728f4bf0d2f9a9b',1,'glm']]], + ['lowp_5ffmat3x2',['lowp_fmat3x2',['../a00721.html#ga49b98e7d71804af45d86886a489e633c',1,'glm']]], + ['lowp_5ffmat3x3',['lowp_fmat3x3',['../a00721.html#gaba56275dd04a7a61560b0e8fa5d365b4',1,'glm']]], + ['lowp_5ffmat3x4',['lowp_fmat3x4',['../a00721.html#ga28733aec7288191b314d42154fd0b690',1,'glm']]], + ['lowp_5ffmat4',['lowp_fmat4',['../a00721.html#ga5803cb9ae26399762d8bba9e0b2fc09f',1,'glm']]], + ['lowp_5ffmat4x2',['lowp_fmat4x2',['../a00721.html#ga5868c2dcce41cc3ea5edcaeae239f62c',1,'glm']]], + ['lowp_5ffmat4x3',['lowp_fmat4x3',['../a00721.html#ga5e649bbdb135fbcb4bfe950f4c73a444',1,'glm']]], + ['lowp_5ffmat4x4',['lowp_fmat4x4',['../a00721.html#gac2f5263708ac847b361a9841e74ddf9f',1,'glm']]], + ['lowp_5ffvec1',['lowp_fvec1',['../a00721.html#ga346b2336fff168a7e0df1583aae3e5a5',1,'glm']]], + ['lowp_5ffvec2',['lowp_fvec2',['../a00721.html#ga62a32c31f4e2e8ca859663b6e3289a2d',1,'glm']]], + ['lowp_5ffvec3',['lowp_fvec3',['../a00721.html#ga40b5c557efebb5bb99d6b9aa81095afa',1,'glm']]], + ['lowp_5ffvec4',['lowp_fvec4',['../a00721.html#ga755484ffbe39ae3db2875953ed04e7b7',1,'glm']]], + ['lowp_5fi16',['lowp_i16',['../a00721.html#ga392b673fd10847bfb78fb808c6cf8ff7',1,'glm']]], + ['lowp_5fi16vec1',['lowp_i16vec1',['../a00721.html#ga501a2f313f1c220eef4ab02bdabdc3c6',1,'glm']]], + ['lowp_5fi16vec2',['lowp_i16vec2',['../a00721.html#ga7cac84b520a6b57f2fbd880d3d63c51b',1,'glm']]], + ['lowp_5fi16vec3',['lowp_i16vec3',['../a00721.html#gab69ef9cbc2a9214bf5596c528c801b72',1,'glm']]], + ['lowp_5fi16vec4',['lowp_i16vec4',['../a00721.html#ga1d47d94d17c2406abdd1f087a816e387',1,'glm']]], + ['lowp_5fi32',['lowp_i32',['../a00721.html#ga7ff73a45cea9613ebf1a9fad0b9f82ac',1,'glm']]], + ['lowp_5fi32vec1',['lowp_i32vec1',['../a00721.html#gae31ac3608cf643ceffd6554874bec4a0',1,'glm']]], + ['lowp_5fi32vec2',['lowp_i32vec2',['../a00721.html#ga867a3c2d99ab369a454167d2c0a24dbd',1,'glm']]], + ['lowp_5fi32vec3',['lowp_i32vec3',['../a00721.html#ga5fe17c87ede1b1b4d92454cff4da076d',1,'glm']]], + ['lowp_5fi32vec4',['lowp_i32vec4',['../a00721.html#gac9b2eb4296ffe50a32eacca9ed932c08',1,'glm']]], + ['lowp_5fi64',['lowp_i64',['../a00721.html#ga354736e0c645099cd44c42fb2f87c2b8',1,'glm']]], + ['lowp_5fi64vec1',['lowp_i64vec1',['../a00721.html#gab0f7d875db5f3cc9f3168c5a0ed56437',1,'glm']]], + ['lowp_5fi64vec2',['lowp_i64vec2',['../a00721.html#gab485c48f06a4fdd6b8d58d343bb49f3c',1,'glm']]], + ['lowp_5fi64vec3',['lowp_i64vec3',['../a00721.html#ga5cb1dc9e8d300c2cdb0d7ff2308fa36c',1,'glm']]], + ['lowp_5fi64vec4',['lowp_i64vec4',['../a00721.html#gabb4229a4c1488bf063eed0c45355bb9c',1,'glm']]], + ['lowp_5fi8',['lowp_i8',['../a00721.html#ga552a6bde5e75984efb0f863278da2e54',1,'glm']]], + ['lowp_5fi8vec1',['lowp_i8vec1',['../a00721.html#ga036d6c7ca9fbbdc5f3871bfcb937c85c',1,'glm']]], + ['lowp_5fi8vec2',['lowp_i8vec2',['../a00721.html#gac03e5099d27eeaa74b6016ea435a1df2',1,'glm']]], + ['lowp_5fi8vec3',['lowp_i8vec3',['../a00721.html#gae2f43ace6b5b33ab49516d9e40af1845',1,'glm']]], + ['lowp_5fi8vec4',['lowp_i8vec4',['../a00721.html#ga6d388e9b9aa1b389f0672d9c7dfc61c5',1,'glm']]], + ['lowp_5fimat2',['lowp_imat2',['../a00712.html#gaa0bff0be804142bb16d441aec0a7962e',1,'glm']]], + ['lowp_5fimat2x2',['lowp_imat2x2',['../a00712.html#ga92b95b679975d408645547ab45a8dcd8',1,'glm']]], + ['lowp_5fimat2x3',['lowp_imat2x3',['../a00712.html#ga8c9e7a388f8e7c52f1e6857dee8afb65',1,'glm']]], + ['lowp_5fimat2x4',['lowp_imat2x4',['../a00712.html#ga9cc13bd1f8dd2933e9fa31fe3f70e16e',1,'glm']]], + ['lowp_5fimat3',['lowp_imat3',['../a00712.html#ga69bfe668f4170379fc1f35d82b060c43',1,'glm']]], + ['lowp_5fimat3x2',['lowp_imat3x2',['../a00712.html#ga33db8f27491d30906cd37c0d86b3f432',1,'glm']]], + ['lowp_5fimat3x3',['lowp_imat3x3',['../a00712.html#ga664f061df00020048c3f8530329ace45',1,'glm']]], + ['lowp_5fimat3x4',['lowp_imat3x4',['../a00712.html#ga9273faab33623d944af4080befbb2c80',1,'glm']]], + ['lowp_5fimat4',['lowp_imat4',['../a00712.html#gad1e77f7270cad461ca4fcb4c3ec2e98c',1,'glm']]], + ['lowp_5fimat4x2',['lowp_imat4x2',['../a00712.html#ga26ec1a2ba08a1488f5f05336858a0f09',1,'glm']]], + ['lowp_5fimat4x3',['lowp_imat4x3',['../a00712.html#ga8f40483a3ae634ead8ad22272c543a33',1,'glm']]], + ['lowp_5fimat4x4',['lowp_imat4x4',['../a00712.html#gaf65677e53ac8e31a107399340d5e2451',1,'glm']]], + ['lowp_5fint16',['lowp_int16',['../a00721.html#ga698e36b01167fc0f037889334dce8def',1,'glm']]], + ['lowp_5fint16_5ft',['lowp_int16_t',['../a00721.html#ga8b2cd8d31eb345b2d641d9261c38db1a',1,'glm']]], + ['lowp_5fint32',['lowp_int32',['../a00721.html#ga864aabca5f3296e176e0c3ed9cc16b02',1,'glm']]], + ['lowp_5fint32_5ft',['lowp_int32_t',['../a00721.html#ga0350631d35ff800e6133ac6243b13cbc',1,'glm']]], + ['lowp_5fint64',['lowp_int64',['../a00721.html#gaf645b1a60203b39c0207baff5e3d8c3c',1,'glm']]], + ['lowp_5fint64_5ft',['lowp_int64_t',['../a00721.html#gaebf341fc4a5be233f7dde962c2e33847',1,'glm']]], + ['lowp_5fint8',['lowp_int8',['../a00721.html#ga760bcf26fdb23a2c3ecad3c928a19ae6',1,'glm']]], + ['lowp_5fint8_5ft',['lowp_int8_t',['../a00721.html#ga119c41d73fe9977358174eb3ac1035a3',1,'glm']]], + ['lowp_5fivec1',['lowp_ivec1',['../a00693.html#ga836dbb1dc516c233b7f5fe9763bc15dc',1,'glm']]], + ['lowp_5fivec2',['lowp_ivec2',['../a00700.html#ga8433c6c1fdd80c0a83941d94aff73fa0',1,'glm']]], + ['lowp_5fivec3',['lowp_ivec3',['../a00700.html#gac1a86a75b3c68ebb704d7094043669d6',1,'glm']]], + ['lowp_5fivec4',['lowp_ivec4',['../a00700.html#ga27fc23da61859cd6356326c5f1c796de',1,'glm']]], + ['lowp_5fmat2',['lowp_mat2',['../a00702.html#gae400c4ce1f5f3e1fa12861b2baed331a',1,'glm']]], + ['lowp_5fmat2x2',['lowp_mat2x2',['../a00702.html#ga2df7cdaf9a571ce7a1b09435f502c694',1,'glm']]], + ['lowp_5fmat2x3',['lowp_mat2x3',['../a00702.html#ga3eee3a74d0f1de8635d846dfb29ec4bb',1,'glm']]], + ['lowp_5fmat2x4',['lowp_mat2x4',['../a00702.html#gade27f8324a16626cbce5d3e7da66b070',1,'glm']]], + ['lowp_5fmat3',['lowp_mat3',['../a00702.html#ga6271ebc85ed778ccc15458c3d86fc854',1,'glm']]], + ['lowp_5fmat3x2',['lowp_mat3x2',['../a00702.html#gaabf6cf90fd31efe25c94965507e98390',1,'glm']]], + ['lowp_5fmat3x3',['lowp_mat3x3',['../a00702.html#ga63362cb4a63fc1be7d2e49cd5d574c84',1,'glm']]], + ['lowp_5fmat3x4',['lowp_mat3x4',['../a00702.html#gac5fc6786688eff02904ca5e7d6960092',1,'glm']]], + ['lowp_5fmat4',['lowp_mat4',['../a00702.html#ga2dedee030500865267cd5851c00c139d',1,'glm']]], + ['lowp_5fmat4x2',['lowp_mat4x2',['../a00702.html#gafa3cdb8f24d09d761ec9ae2a4c7e5e21',1,'glm']]], + ['lowp_5fmat4x3',['lowp_mat4x3',['../a00702.html#ga534c3ef5c3b8fdd8656b6afc205b4b77',1,'glm']]], + ['lowp_5fmat4x4',['lowp_mat4x4',['../a00702.html#ga686468a9a815bd4db8cddae42a6d6b87',1,'glm']]], + ['lowp_5fquat',['lowp_quat',['../a00674.html#gade62c5316c1c11a79c34c00c189558eb',1,'glm']]], + ['lowp_5fu16',['lowp_u16',['../a00721.html#ga504ce1631cb2ac02fcf1d44d8c2aa126',1,'glm']]], + ['lowp_5fu16vec1',['lowp_u16vec1',['../a00721.html#gaa6aab4ee7189b86716f5d7015d43021d',1,'glm']]], + ['lowp_5fu16vec2',['lowp_u16vec2',['../a00721.html#ga2a7d997da9ac29cb931e35bd399f58df',1,'glm']]], + ['lowp_5fu16vec3',['lowp_u16vec3',['../a00721.html#gac0253db6c3d3bae1f591676307a9dd8c',1,'glm']]], + ['lowp_5fu16vec4',['lowp_u16vec4',['../a00721.html#gaa7f00459b9a2e5b2757e70afc0c189e1',1,'glm']]], + ['lowp_5fu32',['lowp_u32',['../a00721.html#ga4f072ada9552e1e480bbb3b1acde5250',1,'glm']]], + ['lowp_5fu32vec1',['lowp_u32vec1',['../a00721.html#gabed3be8dfdc4a0df4bf3271dbd7344c4',1,'glm']]], + ['lowp_5fu32vec2',['lowp_u32vec2',['../a00721.html#gaf7e286e81347011e257ee779524e73b9',1,'glm']]], + ['lowp_5fu32vec3',['lowp_u32vec3',['../a00721.html#gad3ad390560a671b1f676fbf03cd3aa15',1,'glm']]], + ['lowp_5fu32vec4',['lowp_u32vec4',['../a00721.html#ga4502885718742aa238c36a312c3f3f20',1,'glm']]], + ['lowp_5fu64',['lowp_u64',['../a00721.html#ga30069d1f02b19599cbfadf98c23ac6ed',1,'glm']]], + ['lowp_5fu64vec1',['lowp_u64vec1',['../a00721.html#ga859be7b9d3a3765c1cafc14dbcf249a6',1,'glm']]], + ['lowp_5fu64vec2',['lowp_u64vec2',['../a00721.html#ga581485db4ba6ddb501505ee711fd8e42',1,'glm']]], + ['lowp_5fu64vec3',['lowp_u64vec3',['../a00721.html#gaa4a8682bec7ec8af666ef87fae38d5d1',1,'glm']]], + ['lowp_5fu64vec4',['lowp_u64vec4',['../a00721.html#ga6fccc89c34045c86339f6fa781ce96de',1,'glm']]], + ['lowp_5fu8',['lowp_u8',['../a00721.html#ga1b09f03da7ac43055c68a349d5445083',1,'glm']]], + ['lowp_5fu8vec1',['lowp_u8vec1',['../a00721.html#ga4b2e0e10d8d154fec9cab50e216588ec',1,'glm']]], + ['lowp_5fu8vec2',['lowp_u8vec2',['../a00721.html#gae6f63fa38635431e51a8f2602f15c566',1,'glm']]], + ['lowp_5fu8vec3',['lowp_u8vec3',['../a00721.html#ga150dc47e31c6b8cf8461803c8d56f7bd',1,'glm']]], + ['lowp_5fu8vec4',['lowp_u8vec4',['../a00721.html#ga9910927f3a4d1addb3da6a82542a8287',1,'glm']]], + ['lowp_5fuint16',['lowp_uint16',['../a00721.html#gad68bfd9f881856fc863a6ebca0b67f78',1,'glm']]], + ['lowp_5fuint16_5ft',['lowp_uint16_t',['../a00721.html#ga91c4815f93177eb423362fd296a87e9f',1,'glm']]], + ['lowp_5fuint32',['lowp_uint32',['../a00721.html#gaa6a5b461bbf5fe20982472aa51896d4b',1,'glm']]], + ['lowp_5fuint32_5ft',['lowp_uint32_t',['../a00721.html#gaf1b735b4b1145174f4e4167d13778f9b',1,'glm']]], + ['lowp_5fuint64',['lowp_uint64',['../a00721.html#gaa212b805736a759998e312cbdd550fae',1,'glm']]], + ['lowp_5fuint64_5ft',['lowp_uint64_t',['../a00721.html#ga8dd3a3281ae5c970ffe0c41d538aa153',1,'glm']]], + ['lowp_5fuint8',['lowp_uint8',['../a00721.html#gaf49470869e9be2c059629b250619804e',1,'glm']]], + ['lowp_5fuint8_5ft',['lowp_uint8_t',['../a00721.html#ga667b2ece2b258be898812dc2177995d1',1,'glm']]], + ['lowp_5fumat2',['lowp_umat2',['../a00712.html#gaf2fba702d990437fc88ff3f3a76846ee',1,'glm']]], + ['lowp_5fumat2x2',['lowp_umat2x2',['../a00712.html#ga7b2e9d89745f7175051284e54c81d81c',1,'glm']]], + ['lowp_5fumat2x3',['lowp_umat2x3',['../a00712.html#ga3072f90fd86f17a862e21589fbb14c0f',1,'glm']]], + ['lowp_5fumat2x4',['lowp_umat2x4',['../a00712.html#ga8bb45fec4bd77bd81b4ae7eb961a270d',1,'glm']]], + ['lowp_5fumat3',['lowp_umat3',['../a00712.html#gaf1145f72bcdd590f5808c4bc170c2924',1,'glm']]], + ['lowp_5fumat3x2',['lowp_umat3x2',['../a00712.html#ga56ea68c6a6cba8d8c21d17bb14e69c6b',1,'glm']]], + ['lowp_5fumat3x3',['lowp_umat3x3',['../a00712.html#ga4f660a39a395cc14f018f985e7dfbeb5',1,'glm']]], + ['lowp_5fumat3x4',['lowp_umat3x4',['../a00712.html#gaec3d624306bd59649f021864709d56b5',1,'glm']]], + ['lowp_5fumat4',['lowp_umat4',['../a00712.html#gac092c6105827bf9ea080db38074b78eb',1,'glm']]], + ['lowp_5fumat4x2',['lowp_umat4x2',['../a00712.html#ga7716c2b210d141846f1ac4e774adef5e',1,'glm']]], + ['lowp_5fumat4x3',['lowp_umat4x3',['../a00712.html#ga09ab33a2636f5f43f7fae29cfbc20fff',1,'glm']]], + ['lowp_5fumat4x4',['lowp_umat4x4',['../a00712.html#ga10aafc66cf1a0ece336b1c5ae13d0cc0',1,'glm']]], + ['lowp_5fuvec1',['lowp_uvec1',['../a00696.html#ga8bf3fc8a7863d140f48b29341c750402',1,'glm']]], + ['lowp_5fuvec2',['lowp_uvec2',['../a00700.html#ga752ee45136011301b64afd8c310c47a4',1,'glm']]], + ['lowp_5fuvec3',['lowp_uvec3',['../a00700.html#ga7b2efbdd6bdc2f8250c57f3e5dc9a292',1,'glm']]], + ['lowp_5fuvec4',['lowp_uvec4',['../a00700.html#ga5e6a632ec1165cf9f54ceeaa5e9b2b1e',1,'glm']]], + ['lowp_5fvec1',['lowp_vec1',['../a00691.html#ga0a57630f03031706b1d26a7d70d9184c',1,'glm']]], + ['lowp_5fvec2',['lowp_vec2',['../a00700.html#ga30e8baef5d56d5c166872a2bc00f36e9',1,'glm']]], + ['lowp_5fvec3',['lowp_vec3',['../a00700.html#ga868e8e4470a3ef97c7ee3032bf90dc79',1,'glm']]], + ['lowp_5fvec4',['lowp_vec4',['../a00700.html#gace3acb313c800552a9411953eb8b2ed7',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/typedefs_7.html b/common/glm/doc/api/search/typedefs_7.html new file mode 100644 index 000000000..565b233f1 --- /dev/null +++ b/common/glm/doc/api/search/typedefs_7.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/typedefs_7.js b/common/glm/doc/api/search/typedefs_7.js new file mode 100644 index 000000000..34b9d27c0 --- /dev/null +++ b/common/glm/doc/api/search/typedefs_7.js @@ -0,0 +1,200 @@ +var searchData= +[ + ['mat2',['mat2',['../a00701.html#ga8dd59e7fc6913ac5d61b86553e9148ba',1,'glm']]], + ['mat2x2',['mat2x2',['../a00701.html#gaaa17ef6bfa4e4f2692348b1460c8efcb',1,'glm']]], + ['mat2x3',['mat2x3',['../a00701.html#ga493ab21243abe564b3f7d381e677d29a',1,'glm']]], + ['mat2x4',['mat2x4',['../a00701.html#ga8e879b57ddd81e5bf5a88929844e8b40',1,'glm']]], + ['mat3',['mat3',['../a00701.html#gaefb0fc7a4960b782c18708bb6b655262',1,'glm']]], + ['mat3x2',['mat3x2',['../a00698.html#ga2c27aea32de57d58aec8e92d5d2181e2',1,'glm']]], + ['mat3x3',['mat3x3',['../a00701.html#gab91887d7565059dac640e3a1921c914a',1,'glm']]], + ['mat3x4',['mat3x4',['../a00701.html#gaf991cad0b34f64e33af186326dbc4d66',1,'glm']]], + ['mat4',['mat4',['../a00701.html#ga0db98d836c5549d31cf64ecd043b7af7',1,'glm']]], + ['mat4x2',['mat4x2',['../a00701.html#gad941c947ad6cdd117a0e8554a4754983',1,'glm']]], + ['mat4x3',['mat4x3',['../a00701.html#gac7574544bb94777bdbd2eb224eb72fd0',1,'glm']]], + ['mat4x4',['mat4x4',['../a00701.html#gab2d35cc2655f44d60958d60a1de34e81',1,'glm']]], + ['mediump_5fbvec1',['mediump_bvec1',['../a00686.html#ga7b4ccb989ba179fa44f7b0879c782621',1,'glm']]], + ['mediump_5fbvec2',['mediump_bvec2',['../a00700.html#ga1e743764869efa9223c2bcefccedaddc',1,'glm']]], + ['mediump_5fbvec3',['mediump_bvec3',['../a00700.html#ga50c783c25082882ef00fe2e5cddba4aa',1,'glm']]], + ['mediump_5fbvec4',['mediump_bvec4',['../a00700.html#ga0be2c682258604a35004f088782a9645',1,'glm']]], + ['mediump_5fddualquat',['mediump_ddualquat',['../a00734.html#ga0fb11e48e2d16348ccb06a25213641b4',1,'glm']]], + ['mediump_5fdmat2',['mediump_dmat2',['../a00702.html#ga6205fd19be355600334edef6af0b27cb',1,'glm']]], + ['mediump_5fdmat2x2',['mediump_dmat2x2',['../a00702.html#ga51dc36a7719cb458fa5114831c20d64f',1,'glm']]], + ['mediump_5fdmat2x3',['mediump_dmat2x3',['../a00702.html#ga741e05adf1f12d5d913f67088db1009a',1,'glm']]], + ['mediump_5fdmat2x4',['mediump_dmat2x4',['../a00702.html#ga685bda24922d112786af385deb4deb43',1,'glm']]], + ['mediump_5fdmat3',['mediump_dmat3',['../a00702.html#ga939fbf9c53008a8e84c7dd7cf8de29e2',1,'glm']]], + ['mediump_5fdmat3x2',['mediump_dmat3x2',['../a00702.html#ga2076157df85e49b8c021e03e46a376c1',1,'glm']]], + ['mediump_5fdmat3x3',['mediump_dmat3x3',['../a00702.html#ga47bd2aae4701ee2fc865674a9df3d7a6',1,'glm']]], + ['mediump_5fdmat3x4',['mediump_dmat3x4',['../a00702.html#ga3a132bd05675c2e46556f67cf738600b',1,'glm']]], + ['mediump_5fdmat4',['mediump_dmat4',['../a00702.html#gaf650bc667bf2a0e496b5a9182bc8d378',1,'glm']]], + ['mediump_5fdmat4x2',['mediump_dmat4x2',['../a00702.html#gae220fa4c5a7b13ef2ab0420340de645c',1,'glm']]], + ['mediump_5fdmat4x3',['mediump_dmat4x3',['../a00702.html#ga43ef60e4d996db15c9c8f069a96ff763',1,'glm']]], + ['mediump_5fdmat4x4',['mediump_dmat4x4',['../a00702.html#ga5389b3ab32dc0d72bea00057ab6d1dd3',1,'glm']]], + ['mediump_5fdquat',['mediump_dquat',['../a00671.html#gacdf73b1f7fd8f5a0c79a3934e99c1a14',1,'glm']]], + ['mediump_5fdualquat',['mediump_dualquat',['../a00734.html#gaa7aeb54c167712b38f2178a1be2360ad',1,'glm']]], + ['mediump_5fdvec1',['mediump_dvec1',['../a00689.html#ga79a789ebb176b37a45848f7ccdd3b3dd',1,'glm']]], + ['mediump_5fdvec2',['mediump_dvec2',['../a00700.html#ga2f4f6e9a69a0281d06940fd0990cafc3',1,'glm']]], + ['mediump_5fdvec3',['mediump_dvec3',['../a00700.html#ga61c3b1dff4ec7c878af80503141b9f37',1,'glm']]], + ['mediump_5fdvec4',['mediump_dvec4',['../a00700.html#ga23a8bca00914a51542bfea13a4778186',1,'glm']]], + ['mediump_5ff32',['mediump_f32',['../a00721.html#ga3b27fcd9eaa2757f0aaf6b0ce0d85c80',1,'glm']]], + ['mediump_5ff32mat2',['mediump_f32mat2',['../a00721.html#gaf9020c6176a75bc84828ab01ea7dac25',1,'glm']]], + ['mediump_5ff32mat2x2',['mediump_f32mat2x2',['../a00721.html#gaa3ca74a44102035b3ffb5c9c52dfdd3f',1,'glm']]], + ['mediump_5ff32mat2x3',['mediump_f32mat2x3',['../a00721.html#gad4cc829ab1ad3e05ac0a24828a3c95cf',1,'glm']]], + ['mediump_5ff32mat2x4',['mediump_f32mat2x4',['../a00721.html#gae71445ac6cd0b9fba3e5c905cd030fb1',1,'glm']]], + ['mediump_5ff32mat3',['mediump_f32mat3',['../a00721.html#gaaaf878d0d7bfc0aac054fe269a886ca8',1,'glm']]], + ['mediump_5ff32mat3x2',['mediump_f32mat3x2',['../a00721.html#gaaab39454f56cf9fc6d940358ce5e6a0f',1,'glm']]], + ['mediump_5ff32mat3x3',['mediump_f32mat3x3',['../a00721.html#gacd80ad7640e9e32f2edcb8330b1ffe4f',1,'glm']]], + ['mediump_5ff32mat3x4',['mediump_f32mat3x4',['../a00721.html#ga8df705d775b776f5ae6b39e2ab892899',1,'glm']]], + ['mediump_5ff32mat4',['mediump_f32mat4',['../a00721.html#ga4491baaebbc46a20f1cb5da985576bf4',1,'glm']]], + ['mediump_5ff32mat4x2',['mediump_f32mat4x2',['../a00721.html#gab005efe0fa4de1a928e8ddec4bc2c43f',1,'glm']]], + ['mediump_5ff32mat4x3',['mediump_f32mat4x3',['../a00721.html#gade108f16633cf95fa500b5b8c36c8b00',1,'glm']]], + ['mediump_5ff32mat4x4',['mediump_f32mat4x4',['../a00721.html#ga936e95b881ecd2d109459ca41913fa99',1,'glm']]], + ['mediump_5ff32quat',['mediump_f32quat',['../a00721.html#gaa40c03d52dbfbfaf03e75773b9606ff3',1,'glm']]], + ['mediump_5ff32vec1',['mediump_f32vec1',['../a00721.html#gabb33cab7d7c74cc14aa95455d0690865',1,'glm']]], + ['mediump_5ff32vec2',['mediump_f32vec2',['../a00721.html#gad6eb11412a3161ca8dc1d63b2a307c4b',1,'glm']]], + ['mediump_5ff32vec3',['mediump_f32vec3',['../a00721.html#ga062ffef2973bd8241df993c3b30b327c',1,'glm']]], + ['mediump_5ff32vec4',['mediump_f32vec4',['../a00721.html#gad80c84bcd5f585840faa6179f6fd446c',1,'glm']]], + ['mediump_5ff64',['mediump_f64',['../a00721.html#ga6d40381d78472553f878f66e443feeef',1,'glm']]], + ['mediump_5ff64mat2',['mediump_f64mat2',['../a00721.html#gac1281da5ded55047e8892b0e1f1ae965',1,'glm']]], + ['mediump_5ff64mat2x2',['mediump_f64mat2x2',['../a00721.html#ga4fd527644cccbca4cb205320eab026f3',1,'glm']]], + ['mediump_5ff64mat2x3',['mediump_f64mat2x3',['../a00721.html#gafd9a6ebc0c7b95f5c581d00d16a17c54',1,'glm']]], + ['mediump_5ff64mat2x4',['mediump_f64mat2x4',['../a00721.html#gaf306dd69e53633636aee38cea79d4cb7',1,'glm']]], + ['mediump_5ff64mat3',['mediump_f64mat3',['../a00721.html#gad35fb67eb1d03c5a514f0bd7aed1c776',1,'glm']]], + ['mediump_5ff64mat3x2',['mediump_f64mat3x2',['../a00721.html#gacd926d36a72433f6cac51dd60fa13107',1,'glm']]], + ['mediump_5ff64mat3x3',['mediump_f64mat3x3',['../a00721.html#ga84d88a6e3a54ccd2b67e195af4a4c23e',1,'glm']]], + ['mediump_5ff64mat3x4',['mediump_f64mat3x4',['../a00721.html#gad38c544d332b8c4bd0b70b1bd9feccc2',1,'glm']]], + ['mediump_5ff64mat4',['mediump_f64mat4',['../a00721.html#gaa805ef691c711dc41e2776cfb67f5cf5',1,'glm']]], + ['mediump_5ff64mat4x2',['mediump_f64mat4x2',['../a00721.html#ga17d36f0ea22314117e1cec9594b33945',1,'glm']]], + ['mediump_5ff64mat4x3',['mediump_f64mat4x3',['../a00721.html#ga54697a78f9a4643af6a57fc2e626ec0d',1,'glm']]], + ['mediump_5ff64mat4x4',['mediump_f64mat4x4',['../a00721.html#ga66edb8de17b9235029472f043ae107e9',1,'glm']]], + ['mediump_5ff64quat',['mediump_f64quat',['../a00721.html#ga5e52f485059ce6e3010c590b882602c9',1,'glm']]], + ['mediump_5ff64vec1',['mediump_f64vec1',['../a00721.html#gac30fdf8afa489400053275b6a3350127',1,'glm']]], + ['mediump_5ff64vec2',['mediump_f64vec2',['../a00721.html#ga8ebc04ecf6440c4ee24718a16600ce6b',1,'glm']]], + ['mediump_5ff64vec3',['mediump_f64vec3',['../a00721.html#ga461c4c7d0757404dd0dba931760b25cf',1,'glm']]], + ['mediump_5ff64vec4',['mediump_f64vec4',['../a00721.html#gacfea053bd6bb3eddb996a4f94de22a3e',1,'glm']]], + ['mediump_5ffdualquat',['mediump_fdualquat',['../a00734.html#ga4a6b594ff7e81150d8143001367a9431',1,'glm']]], + ['mediump_5ffloat32',['mediump_float32',['../a00721.html#ga7812bf00676fb1a86dcd62cca354d2c7',1,'glm']]], + ['mediump_5ffloat32_5ft',['mediump_float32_t',['../a00721.html#gae4dee61f8fe1caccec309fbed02faf12',1,'glm']]], + ['mediump_5ffloat64',['mediump_float64',['../a00721.html#gab83d8aae6e4f115e97a785e8574a115f',1,'glm']]], + ['mediump_5ffloat64_5ft',['mediump_float64_t',['../a00721.html#gac61843e4fa96c1f4e9d8316454f32a8e',1,'glm']]], + ['mediump_5ffmat2',['mediump_fmat2',['../a00721.html#ga74e9133378fd0b4da8ac0bc0876702ff',1,'glm']]], + ['mediump_5ffmat2x2',['mediump_fmat2x2',['../a00721.html#ga98a687c17b174ea316b5f397b64f44bc',1,'glm']]], + ['mediump_5ffmat2x3',['mediump_fmat2x3',['../a00721.html#gaa03f939d90d5ef157df957d93f0b9a64',1,'glm']]], + ['mediump_5ffmat2x4',['mediump_fmat2x4',['../a00721.html#ga35223623e9ccebd8a281873b71b7d213',1,'glm']]], + ['mediump_5ffmat3',['mediump_fmat3',['../a00721.html#ga80823dfad5dba98512c76af498343847',1,'glm']]], + ['mediump_5ffmat3x2',['mediump_fmat3x2',['../a00721.html#ga42569e5b92f8635cedeadb1457ee1467',1,'glm']]], + ['mediump_5ffmat3x3',['mediump_fmat3x3',['../a00721.html#gaa6f526388c74a66b3d52315a14d434ae',1,'glm']]], + ['mediump_5ffmat3x4',['mediump_fmat3x4',['../a00721.html#gaefe8ef520c6cb78590ebbefe648da4d4',1,'glm']]], + ['mediump_5ffmat4',['mediump_fmat4',['../a00721.html#gac1c38778c0b5a1263f07753c05a4f7b9',1,'glm']]], + ['mediump_5ffmat4x2',['mediump_fmat4x2',['../a00721.html#gacea38a85893e17e6834b6cb09a9ad0cf',1,'glm']]], + ['mediump_5ffmat4x3',['mediump_fmat4x3',['../a00721.html#ga41ad497f7eae211556aefd783cb02b90',1,'glm']]], + ['mediump_5ffmat4x4',['mediump_fmat4x4',['../a00721.html#ga22e27beead07bff4d5ce9d6065a57279',1,'glm']]], + ['mediump_5ffvec1',['mediump_fvec1',['../a00721.html#ga367964fc2133d3f1b5b3755ff9cf6c9b',1,'glm']]], + ['mediump_5ffvec2',['mediump_fvec2',['../a00721.html#ga44bfa55cda5dbf53f24a1fb7610393d6',1,'glm']]], + ['mediump_5ffvec3',['mediump_fvec3',['../a00721.html#ga999dc6703ad16e3d3c26b74ea8083f07',1,'glm']]], + ['mediump_5ffvec4',['mediump_fvec4',['../a00721.html#ga1bed890513c0f50b7e7ba4f7f359dbfb',1,'glm']]], + ['mediump_5fi16',['mediump_i16',['../a00721.html#ga62a17cddeb4dffb4e18fe3aea23f051a',1,'glm']]], + ['mediump_5fi16vec1',['mediump_i16vec1',['../a00721.html#gacc44265ed440bf5e6e566782570de842',1,'glm']]], + ['mediump_5fi16vec2',['mediump_i16vec2',['../a00721.html#ga4b5e2c9aaa5d7717bf71179aefa12e88',1,'glm']]], + ['mediump_5fi16vec3',['mediump_i16vec3',['../a00721.html#ga3be6c7fc5fe08fa2274bdb001d5f2633',1,'glm']]], + ['mediump_5fi16vec4',['mediump_i16vec4',['../a00721.html#gaf52982bb23e3a3772649b2c5bb84b107',1,'glm']]], + ['mediump_5fi32',['mediump_i32',['../a00721.html#gaf5e94bf2a20af7601787c154751dc2e1',1,'glm']]], + ['mediump_5fi32vec1',['mediump_i32vec1',['../a00721.html#ga46a57f71e430637559097a732b550a7e',1,'glm']]], + ['mediump_5fi32vec2',['mediump_i32vec2',['../a00721.html#ga20bf224bd4f8a24ecc4ed2004a40c219',1,'glm']]], + ['mediump_5fi32vec3',['mediump_i32vec3',['../a00721.html#ga13a221b910aa9eb1b04ca1c86e81015a',1,'glm']]], + ['mediump_5fi32vec4',['mediump_i32vec4',['../a00721.html#ga6addd4dfee87fc09ab9525e3d07db4c8',1,'glm']]], + ['mediump_5fi64',['mediump_i64',['../a00721.html#ga3ebcb1f6d8d8387253de8bccb058d77f',1,'glm']]], + ['mediump_5fi64vec1',['mediump_i64vec1',['../a00721.html#ga8343e9d244fb17a5bbf0d94d36b3695e',1,'glm']]], + ['mediump_5fi64vec2',['mediump_i64vec2',['../a00721.html#ga2c94aeae3457325944ca1059b0b68330',1,'glm']]], + ['mediump_5fi64vec3',['mediump_i64vec3',['../a00721.html#ga8089722ffdf868cdfe721dea1fb6a90e',1,'glm']]], + ['mediump_5fi64vec4',['mediump_i64vec4',['../a00721.html#gabf1f16c5ab8cb0484bd1e846ae4368f1',1,'glm']]], + ['mediump_5fi8',['mediump_i8',['../a00721.html#gacf1ded173e1e2d049c511d095b259e21',1,'glm']]], + ['mediump_5fi8vec1',['mediump_i8vec1',['../a00721.html#ga85e8893f4ae3630065690a9000c0c483',1,'glm']]], + ['mediump_5fi8vec2',['mediump_i8vec2',['../a00721.html#ga2a8bdc32184ea0a522ef7bd90640cf67',1,'glm']]], + ['mediump_5fi8vec3',['mediump_i8vec3',['../a00721.html#ga6dd1c1618378c6f94d522a61c28773c9',1,'glm']]], + ['mediump_5fi8vec4',['mediump_i8vec4',['../a00721.html#gac7bb04fb857ef7b520e49f6c381432be',1,'glm']]], + ['mediump_5fimat2',['mediump_imat2',['../a00712.html#ga20f4cc7ab23e2aa1f4db9fdb5496d378',1,'glm']]], + ['mediump_5fimat2x2',['mediump_imat2x2',['../a00712.html#ga4b2aeb11a329940721dda9583e71f856',1,'glm']]], + ['mediump_5fimat2x3',['mediump_imat2x3',['../a00712.html#ga74362470ba99843ac70aee5ac38cc674',1,'glm']]], + ['mediump_5fimat2x4',['mediump_imat2x4',['../a00712.html#ga8da25cd380ba30fc5b68a4687deb3e09',1,'glm']]], + ['mediump_5fimat3',['mediump_imat3',['../a00712.html#ga6c63bdc736efd3466e0730de0251cb71',1,'glm']]], + ['mediump_5fimat3x2',['mediump_imat3x2',['../a00712.html#gac0b4e42d648fb3eaf4bb88da82ecc809',1,'glm']]], + ['mediump_5fimat3x3',['mediump_imat3x3',['../a00712.html#gad99cc2aad8fc57f068cfa7719dbbea12',1,'glm']]], + ['mediump_5fimat3x4',['mediump_imat3x4',['../a00712.html#ga67689a518b181a26540bc44a163525cd',1,'glm']]], + ['mediump_5fimat4',['mediump_imat4',['../a00712.html#gaf348552978553630d2a00b78eb887ced',1,'glm']]], + ['mediump_5fimat4x2',['mediump_imat4x2',['../a00712.html#ga8b2d35816f7103f0f4c82dd2f27571fc',1,'glm']]], + ['mediump_5fimat4x3',['mediump_imat4x3',['../a00712.html#ga5b10acc696759e03f6ab918f4467e94c',1,'glm']]], + ['mediump_5fimat4x4',['mediump_imat4x4',['../a00712.html#ga2596869d154dec1180beadbb9df80501',1,'glm']]], + ['mediump_5fint16',['mediump_int16',['../a00721.html#gadff3608baa4b5bd3ed28f95c1c2c345d',1,'glm']]], + ['mediump_5fint16_5ft',['mediump_int16_t',['../a00721.html#ga80e72fe94c88498537e8158ba7591c54',1,'glm']]], + ['mediump_5fint32',['mediump_int32',['../a00721.html#ga5244cef85d6e870e240c76428a262ae8',1,'glm']]], + ['mediump_5fint32_5ft',['mediump_int32_t',['../a00721.html#ga26fc7ced1ad7ca5024f1c973c8dc9180',1,'glm']]], + ['mediump_5fint64',['mediump_int64',['../a00721.html#ga7b968f2b86a0442a89c7359171e1d866',1,'glm']]], + ['mediump_5fint64_5ft',['mediump_int64_t',['../a00721.html#gac3bc41bcac61d1ba8f02a6f68ce23f64',1,'glm']]], + ['mediump_5fint8',['mediump_int8',['../a00721.html#ga6fbd69cbdaa44345bff923a2cf63de7e',1,'glm']]], + ['mediump_5fint8_5ft',['mediump_int8_t',['../a00721.html#ga6d7b3789ecb932c26430009478cac7ae',1,'glm']]], + ['mediump_5fivec1',['mediump_ivec1',['../a00693.html#gad628c608970b3d0aa6cfb63ce6e53e56',1,'glm']]], + ['mediump_5fivec2',['mediump_ivec2',['../a00700.html#gac57496299d276ed97044074097bd5e2c',1,'glm']]], + ['mediump_5fivec3',['mediump_ivec3',['../a00700.html#ga27cfb51e0dbe15bba27a14a8590e8466',1,'glm']]], + ['mediump_5fivec4',['mediump_ivec4',['../a00700.html#ga92a204c37e66ac6c1dc7ae91142f2ea5',1,'glm']]], + ['mediump_5fmat2',['mediump_mat2',['../a00702.html#ga745452bd9c89f5ad948203e4fb4b4ea3',1,'glm']]], + ['mediump_5fmat2x2',['mediump_mat2x2',['../a00702.html#ga0cdf57d29f9448864237b2fb3e39aa1d',1,'glm']]], + ['mediump_5fmat2x3',['mediump_mat2x3',['../a00702.html#ga497d513d552d927537d61fa11e3701ab',1,'glm']]], + ['mediump_5fmat2x4',['mediump_mat2x4',['../a00702.html#gae7b75ea2e09fa686a79bbe9b6ca68ee5',1,'glm']]], + ['mediump_5fmat3',['mediump_mat3',['../a00702.html#ga5aae49834d02732942f44e61d7bce136',1,'glm']]], + ['mediump_5fmat3x2',['mediump_mat3x2',['../a00702.html#ga9e1c9ee65fef547bde793e69723e24eb',1,'glm']]], + ['mediump_5fmat3x3',['mediump_mat3x3',['../a00702.html#gabc0f2f4ad21c90b341881cf056f8650e',1,'glm']]], + ['mediump_5fmat3x4',['mediump_mat3x4',['../a00702.html#gaa669c6675c3405f76c0b14020d1c0d61',1,'glm']]], + ['mediump_5fmat4',['mediump_mat4',['../a00702.html#gab8531bc3f269aa45835cd6e1972b7fc7',1,'glm']]], + ['mediump_5fmat4x2',['mediump_mat4x2',['../a00702.html#gad75706b70545412ba9ac27d5ee210f66',1,'glm']]], + ['mediump_5fmat4x3',['mediump_mat4x3',['../a00702.html#ga4a1440b5ea3cf84d5b06c79b534bd770',1,'glm']]], + ['mediump_5fmat4x4',['mediump_mat4x4',['../a00702.html#ga15bca2b70917d9752231160d9da74b01',1,'glm']]], + ['mediump_5fquat',['mediump_quat',['../a00674.html#gad2a59409de1bb12ccb6eb692ee7e9d8d',1,'glm']]], + ['mediump_5fu16',['mediump_u16',['../a00721.html#ga9df98857be695d5a30cb30f5bfa38a80',1,'glm']]], + ['mediump_5fu16vec1',['mediump_u16vec1',['../a00721.html#ga400ce8cc566de093a9b28e59e220d6e4',1,'glm']]], + ['mediump_5fu16vec2',['mediump_u16vec2',['../a00721.html#ga429c201b3e92c90b4ef4356f2be52ee1',1,'glm']]], + ['mediump_5fu16vec3',['mediump_u16vec3',['../a00721.html#gac9ba20234b0c3751d45ce575fc71e551',1,'glm']]], + ['mediump_5fu16vec4',['mediump_u16vec4',['../a00721.html#ga5793393686ce5bd2d5968ff9144762b8',1,'glm']]], + ['mediump_5fu32',['mediump_u32',['../a00721.html#ga1bd0e914158bf03135f8a317de6debe9',1,'glm']]], + ['mediump_5fu32vec1',['mediump_u32vec1',['../a00721.html#ga8a11ccd2e38f674bbf3c2d1afc232aee',1,'glm']]], + ['mediump_5fu32vec2',['mediump_u32vec2',['../a00721.html#ga94f74851fce338549c705b5f0d601c4f',1,'glm']]], + ['mediump_5fu32vec3',['mediump_u32vec3',['../a00721.html#ga012c24c8fc69707b90260474c70275a2',1,'glm']]], + ['mediump_5fu32vec4',['mediump_u32vec4',['../a00721.html#ga5d43ee8b5dbaa06c327b03b83682598a',1,'glm']]], + ['mediump_5fu64',['mediump_u64',['../a00721.html#ga2af9490085ae3bdf36a544e9dd073610',1,'glm']]], + ['mediump_5fu64vec1',['mediump_u64vec1',['../a00721.html#ga659f372ccb8307d5db5beca942cde5e8',1,'glm']]], + ['mediump_5fu64vec2',['mediump_u64vec2',['../a00721.html#ga73a08ef5a74798f3a1a99250b5f86a7d',1,'glm']]], + ['mediump_5fu64vec3',['mediump_u64vec3',['../a00721.html#ga1900c6ab74acd392809425953359ef52',1,'glm']]], + ['mediump_5fu64vec4',['mediump_u64vec4',['../a00721.html#gaec7ee455cb379ec2993e81482123e1cc',1,'glm']]], + ['mediump_5fu8',['mediump_u8',['../a00721.html#gad1213a22bbb9e4107f07eaa4956f8281',1,'glm']]], + ['mediump_5fu8vec1',['mediump_u8vec1',['../a00721.html#ga4a43050843b141bdc7e85437faef6f55',1,'glm']]], + ['mediump_5fu8vec2',['mediump_u8vec2',['../a00721.html#ga907f85d4a0eac3d8aaf571e5c2647194',1,'glm']]], + ['mediump_5fu8vec3',['mediump_u8vec3',['../a00721.html#gaddc6f7748b699254942c5216b68f8f7f',1,'glm']]], + ['mediump_5fu8vec4',['mediump_u8vec4',['../a00721.html#gaaf4ee3b76d43d98da02ec399b99bda4b',1,'glm']]], + ['mediump_5fuint16',['mediump_uint16',['../a00721.html#ga2885a6c89916911e418c06bb76b9bdbb',1,'glm']]], + ['mediump_5fuint16_5ft',['mediump_uint16_t',['../a00721.html#ga3963b1050fc65a383ee28e3f827b6e3e',1,'glm']]], + ['mediump_5fuint32',['mediump_uint32',['../a00721.html#ga34dd5ec1988c443bae80f1b20a8ade5f',1,'glm']]], + ['mediump_5fuint32_5ft',['mediump_uint32_t',['../a00721.html#gaf4dae276fd29623950de14a6ca2586b5',1,'glm']]], + ['mediump_5fuint64',['mediump_uint64',['../a00721.html#ga30652709815ad9404272a31957daa59e',1,'glm']]], + ['mediump_5fuint64_5ft',['mediump_uint64_t',['../a00721.html#ga9b170dd4a8f38448a2dc93987c7875e9',1,'glm']]], + ['mediump_5fuint8',['mediump_uint8',['../a00721.html#ga1fa92a233b9110861cdbc8c2ccf0b5a3',1,'glm']]], + ['mediump_5fuint8_5ft',['mediump_uint8_t',['../a00721.html#gadfe65c78231039e90507770db50c98c7',1,'glm']]], + ['mediump_5fumat2',['mediump_umat2',['../a00712.html#ga43041378b3410ea951b7de0dfd2bc7ee',1,'glm']]], + ['mediump_5fumat2x2',['mediump_umat2x2',['../a00712.html#ga3b209b1b751f041422137e3c065dfa98',1,'glm']]], + ['mediump_5fumat2x3',['mediump_umat2x3',['../a00712.html#gaee2c1f13b41f4c92ea5b3efe367a1306',1,'glm']]], + ['mediump_5fumat2x4',['mediump_umat2x4',['../a00712.html#gae1317ddca16d01e119a40b7f0ee85f95',1,'glm']]], + ['mediump_5fumat3',['mediump_umat3',['../a00712.html#ga1730dbe3c67801f53520b06d1aa0a34a',1,'glm']]], + ['mediump_5fumat3x2',['mediump_umat3x2',['../a00712.html#gaadc28bfdc8ebca81ae85121b11994970',1,'glm']]], + ['mediump_5fumat3x3',['mediump_umat3x3',['../a00712.html#ga48f2fc38d3f7fab3cfbc961278ced53d',1,'glm']]], + ['mediump_5fumat3x4',['mediump_umat3x4',['../a00712.html#ga78009a1e4ca64217e46b418535e52546',1,'glm']]], + ['mediump_5fumat4',['mediump_umat4',['../a00712.html#ga5087c2beb26a11d9af87432e554cf9d1',1,'glm']]], + ['mediump_5fumat4x2',['mediump_umat4x2',['../a00712.html#gaf35aefd81cc13718f6b059623f7425fa',1,'glm']]], + ['mediump_5fumat4x3',['mediump_umat4x3',['../a00712.html#ga4e1bed14fbc7f4b376aaed064f89f0fb',1,'glm']]], + ['mediump_5fumat4x4',['mediump_umat4x4',['../a00712.html#gaa9428fc8430dc552aad920653f822ef3',1,'glm']]], + ['mediump_5fuvec1',['mediump_uvec1',['../a00696.html#ga38fde73aaf1420175ece8d4882558a3f',1,'glm']]], + ['mediump_5fuvec2',['mediump_uvec2',['../a00700.html#gaa3b4f7806dad03d83bb3da0baa1e3b9b',1,'glm']]], + ['mediump_5fuvec3',['mediump_uvec3',['../a00700.html#ga83b7df38feefbb357f3673d950fafef7',1,'glm']]], + ['mediump_5fuvec4',['mediump_uvec4',['../a00700.html#ga64ed0deb6573375b7016daf82ffd53a7',1,'glm']]], + ['mediump_5fvec1',['mediump_vec1',['../a00691.html#ga645f53e6b8056609023a894b4e2beef4',1,'glm']]], + ['mediump_5fvec2',['mediump_vec2',['../a00700.html#gabc61976261c406520c7a8e4d946dc3f0',1,'glm']]], + ['mediump_5fvec3',['mediump_vec3',['../a00700.html#ga2384e263df19f1404b733016eff78fca',1,'glm']]], + ['mediump_5fvec4',['mediump_vec4',['../a00700.html#ga5c6978d3ffba06738416a33083853fc0',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/typedefs_8.html b/common/glm/doc/api/search/typedefs_8.html new file mode 100644 index 000000000..3063e0327 --- /dev/null +++ b/common/glm/doc/api/search/typedefs_8.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/typedefs_8.js b/common/glm/doc/api/search/typedefs_8.js new file mode 100644 index 000000000..64c45ad4a --- /dev/null +++ b/common/glm/doc/api/search/typedefs_8.js @@ -0,0 +1,179 @@ +var searchData= +[ + ['packed_5fbvec1',['packed_bvec1',['../a00720.html#ga88632cea9008ac0ac1388e94e804a53c',1,'glm']]], + ['packed_5fbvec2',['packed_bvec2',['../a00720.html#gab85245913eaa40ab82adabcae37086cb',1,'glm']]], + ['packed_5fbvec3',['packed_bvec3',['../a00720.html#ga0c48f9417f649e27f3fb0c9f733a18bd',1,'glm']]], + ['packed_5fbvec4',['packed_bvec4',['../a00720.html#ga3180d7db84a74c402157df3bbc0ae3ed',1,'glm']]], + ['packed_5fdmat2',['packed_dmat2',['../a00720.html#gad87408a8350918711f845f071bbe43fb',1,'glm']]], + ['packed_5fdmat2x2',['packed_dmat2x2',['../a00720.html#gaaa33d8e06657a777efb0c72c44ce87a9',1,'glm']]], + ['packed_5fdmat2x3',['packed_dmat2x3',['../a00720.html#gac3a5315f588ba04ad255188071ec4e22',1,'glm']]], + ['packed_5fdmat2x4',['packed_dmat2x4',['../a00720.html#gae398fc3156f51d3684b08f62c1a5a6d4',1,'glm']]], + ['packed_5fdmat3',['packed_dmat3',['../a00720.html#ga03dfc90d539cc87ea3a15a9caa5d2245',1,'glm']]], + ['packed_5fdmat3x2',['packed_dmat3x2',['../a00720.html#gae36de20a4c0e0b1444b7903ae811d94e',1,'glm']]], + ['packed_5fdmat3x3',['packed_dmat3x3',['../a00720.html#gab9b909f1392d86854334350efcae85f5',1,'glm']]], + ['packed_5fdmat3x4',['packed_dmat3x4',['../a00720.html#ga199131fd279c92c2ac12df6d978f1dd6',1,'glm']]], + ['packed_5fdmat4',['packed_dmat4',['../a00720.html#gada980a3485640aa8151f368f17ad3086',1,'glm']]], + ['packed_5fdmat4x2',['packed_dmat4x2',['../a00720.html#ga6dc65249730698d3cc9ac5d7e1bc4d72',1,'glm']]], + ['packed_5fdmat4x3',['packed_dmat4x3',['../a00720.html#gadf202aaa9ed71c09f9bbe347e43f8764',1,'glm']]], + ['packed_5fdmat4x4',['packed_dmat4x4',['../a00720.html#gae20617435a6d042d7c38da2badd64a09',1,'glm']]], + ['packed_5fdvec1',['packed_dvec1',['../a00720.html#ga532f0c940649b1ee303acd572fc35531',1,'glm']]], + ['packed_5fdvec2',['packed_dvec2',['../a00720.html#ga5c194b11fbda636f2ab20c3bd0079196',1,'glm']]], + ['packed_5fdvec3',['packed_dvec3',['../a00720.html#ga0581ea552d86b2b5de7a2804bed80e72',1,'glm']]], + ['packed_5fdvec4',['packed_dvec4',['../a00720.html#gae8a9b181f9dc813ad6e125a52b14b935',1,'glm']]], + ['packed_5fhighp_5fbvec1',['packed_highp_bvec1',['../a00720.html#ga439e97795314b81cd15abd4e5c2e6e7a',1,'glm']]], + ['packed_5fhighp_5fbvec2',['packed_highp_bvec2',['../a00720.html#gad791d671f4fcf1ed1ea41f752916b70a',1,'glm']]], + ['packed_5fhighp_5fbvec3',['packed_highp_bvec3',['../a00720.html#ga6a5a3250b57dfadc66735bc72911437f',1,'glm']]], + ['packed_5fhighp_5fbvec4',['packed_highp_bvec4',['../a00720.html#ga09f517d88b996ef1b2f42fd54222b82d',1,'glm']]], + ['packed_5fhighp_5fdmat2',['packed_highp_dmat2',['../a00720.html#gae29686632fd05efac0675d9a6370d77b',1,'glm']]], + ['packed_5fhighp_5fdmat2x2',['packed_highp_dmat2x2',['../a00720.html#ga22bd6382b16052e301edbfc031b9f37a',1,'glm']]], + ['packed_5fhighp_5fdmat2x3',['packed_highp_dmat2x3',['../a00720.html#ga999d82719696d4c59f4d236dd08f273d',1,'glm']]], + ['packed_5fhighp_5fdmat2x4',['packed_highp_dmat2x4',['../a00720.html#ga6998ac2a8d7fe456b651a6336ed26bb0',1,'glm']]], + ['packed_5fhighp_5fdmat3',['packed_highp_dmat3',['../a00720.html#gadac7c040c4810dd52b36fcd09d097400',1,'glm']]], + ['packed_5fhighp_5fdmat3x2',['packed_highp_dmat3x2',['../a00720.html#gab462744977beb85fb5c782bc2eea7b15',1,'glm']]], + ['packed_5fhighp_5fdmat3x3',['packed_highp_dmat3x3',['../a00720.html#ga49e5a709d098523823b2f824e48672a6',1,'glm']]], + ['packed_5fhighp_5fdmat3x4',['packed_highp_dmat3x4',['../a00720.html#ga2c67b3b0adab71c8680c3d819f1fa9b7',1,'glm']]], + ['packed_5fhighp_5fdmat4',['packed_highp_dmat4',['../a00720.html#ga6718822cd7af005a9b5bd6ee282f6ba6',1,'glm']]], + ['packed_5fhighp_5fdmat4x2',['packed_highp_dmat4x2',['../a00720.html#ga12e39e797fb724a5b51fcbea2513a7da',1,'glm']]], + ['packed_5fhighp_5fdmat4x3',['packed_highp_dmat4x3',['../a00720.html#ga79c2e9f82e67963c1ecad0ad6d0ec72e',1,'glm']]], + ['packed_5fhighp_5fdmat4x4',['packed_highp_dmat4x4',['../a00720.html#ga2df58e03e5afded28707b4f7d077afb4',1,'glm']]], + ['packed_5fhighp_5fdvec1',['packed_highp_dvec1',['../a00720.html#gab472b2d917b5e6efd76e8c7dbfbbf9f1',1,'glm']]], + ['packed_5fhighp_5fdvec2',['packed_highp_dvec2',['../a00720.html#ga5b2dc48fa19b684d207d69c6b145eb63',1,'glm']]], + ['packed_5fhighp_5fdvec3',['packed_highp_dvec3',['../a00720.html#gaaac6b356ef00154da41aaae7d1549193',1,'glm']]], + ['packed_5fhighp_5fdvec4',['packed_highp_dvec4',['../a00720.html#ga81b5368fe485e2630aa9b44832d592e7',1,'glm']]], + ['packed_5fhighp_5fivec1',['packed_highp_ivec1',['../a00720.html#ga7245acc887a5438f46fd85fdf076bb3b',1,'glm']]], + ['packed_5fhighp_5fivec2',['packed_highp_ivec2',['../a00720.html#ga54f368ec6b514a5aa4f28d40e6f93ef7',1,'glm']]], + ['packed_5fhighp_5fivec3',['packed_highp_ivec3',['../a00720.html#ga865a9c7bb22434b1b8c5ac31e164b628',1,'glm']]], + ['packed_5fhighp_5fivec4',['packed_highp_ivec4',['../a00720.html#gad6f1b4e3a51c2c051814b60d5d1b8895',1,'glm']]], + ['packed_5fhighp_5fmat2',['packed_highp_mat2',['../a00720.html#ga2f2d913d8cca2f935b2522964408c0b2',1,'glm']]], + ['packed_5fhighp_5fmat2x2',['packed_highp_mat2x2',['../a00720.html#ga245c12d2daf67feecaa2d3277c8f6661',1,'glm']]], + ['packed_5fhighp_5fmat2x3',['packed_highp_mat2x3',['../a00720.html#ga069cc8892aadae144c00f35297617d44',1,'glm']]], + ['packed_5fhighp_5fmat2x4',['packed_highp_mat2x4',['../a00720.html#ga6904d09b62141d09712b76983892f95b',1,'glm']]], + ['packed_5fhighp_5fmat3',['packed_highp_mat3',['../a00720.html#gabdd5fbffe8b8b8a7b33523f25b120dbe',1,'glm']]], + ['packed_5fhighp_5fmat3x2',['packed_highp_mat3x2',['../a00720.html#ga2624719cb251d8de8cad1beaefc3a3f9',1,'glm']]], + ['packed_5fhighp_5fmat3x3',['packed_highp_mat3x3',['../a00720.html#gaf2e07527d678440bf0c20adbeb9177c5',1,'glm']]], + ['packed_5fhighp_5fmat3x4',['packed_highp_mat3x4',['../a00720.html#ga72102fa6ac2445aa3bb203128ad52449',1,'glm']]], + ['packed_5fhighp_5fmat4',['packed_highp_mat4',['../a00720.html#ga253e8379b08d2dc6fe2800b2fb913203',1,'glm']]], + ['packed_5fhighp_5fmat4x2',['packed_highp_mat4x2',['../a00720.html#gae389c2071cf3cdb33e7812c6fd156710',1,'glm']]], + ['packed_5fhighp_5fmat4x3',['packed_highp_mat4x3',['../a00720.html#ga4584f64394bd7123b7a8534741e4916c',1,'glm']]], + ['packed_5fhighp_5fmat4x4',['packed_highp_mat4x4',['../a00720.html#ga0149fe15668925147e07c94fd2c2d6ae',1,'glm']]], + ['packed_5fhighp_5fuvec1',['packed_highp_uvec1',['../a00720.html#ga8c32b53f628a3616aa5061e58d66fe74',1,'glm']]], + ['packed_5fhighp_5fuvec2',['packed_highp_uvec2',['../a00720.html#gab704d4fb15f6f96d70e363d5db7060cd',1,'glm']]], + ['packed_5fhighp_5fuvec3',['packed_highp_uvec3',['../a00720.html#ga0b570da473fec4619db5aa0dce5133b0',1,'glm']]], + ['packed_5fhighp_5fuvec4',['packed_highp_uvec4',['../a00720.html#gaa582f38c82aef61dea7aaedf15bb06a6',1,'glm']]], + ['packed_5fhighp_5fvec1',['packed_highp_vec1',['../a00720.html#ga56473759d2702ee19ab7f91d0017fa70',1,'glm']]], + ['packed_5fhighp_5fvec2',['packed_highp_vec2',['../a00720.html#ga6b8b9475e7c3b16aed13edbc460bbc4d',1,'glm']]], + ['packed_5fhighp_5fvec3',['packed_highp_vec3',['../a00720.html#ga3815661df0e2de79beff8168c09adf1e',1,'glm']]], + ['packed_5fhighp_5fvec4',['packed_highp_vec4',['../a00720.html#ga4015f36bf5a5adb6ac5d45beed959867',1,'glm']]], + ['packed_5fivec1',['packed_ivec1',['../a00720.html#ga11581a06fc7bf941fa4d4b6aca29812c',1,'glm']]], + ['packed_5fivec2',['packed_ivec2',['../a00720.html#ga1fe4c5f56b8087d773aa90dc88a257a7',1,'glm']]], + ['packed_5fivec3',['packed_ivec3',['../a00720.html#gae157682a7847161787951ba1db4cf325',1,'glm']]], + ['packed_5fivec4',['packed_ivec4',['../a00720.html#gac228b70372abd561340d5f926a7c1778',1,'glm']]], + ['packed_5flowp_5fbvec1',['packed_lowp_bvec1',['../a00720.html#gae3c8750f53259ece334d3aa3b3649a40',1,'glm']]], + ['packed_5flowp_5fbvec2',['packed_lowp_bvec2',['../a00720.html#gac969befedbda69eb78d4e23f751fdbee',1,'glm']]], + ['packed_5flowp_5fbvec3',['packed_lowp_bvec3',['../a00720.html#ga7c20adbe1409e3fe4544677a7f6fe954',1,'glm']]], + ['packed_5flowp_5fbvec4',['packed_lowp_bvec4',['../a00720.html#gae473587cff3092edc0877fc691c26a0b',1,'glm']]], + ['packed_5flowp_5fdmat2',['packed_lowp_dmat2',['../a00720.html#gac93f9b1a35b9de4f456b9f2dfeaf1097',1,'glm']]], + ['packed_5flowp_5fdmat2x2',['packed_lowp_dmat2x2',['../a00720.html#gaeeaff6c132ec91ebd21da3a2399548ea',1,'glm']]], + ['packed_5flowp_5fdmat2x3',['packed_lowp_dmat2x3',['../a00720.html#ga2ccdcd4846775cbe4f9d12e71d55b5d2',1,'glm']]], + ['packed_5flowp_5fdmat2x4',['packed_lowp_dmat2x4',['../a00720.html#gac870c47d2d9d48503f6c9ee3baec8ce1',1,'glm']]], + ['packed_5flowp_5fdmat3',['packed_lowp_dmat3',['../a00720.html#ga3894a059eeaacec8791c25de398d9955',1,'glm']]], + ['packed_5flowp_5fdmat3x2',['packed_lowp_dmat3x2',['../a00720.html#ga23ec236950f5859f59197663266b535d',1,'glm']]], + ['packed_5flowp_5fdmat3x3',['packed_lowp_dmat3x3',['../a00720.html#ga4a7c7d8c3a663d0ec2a858cbfa14e54c',1,'glm']]], + ['packed_5flowp_5fdmat3x4',['packed_lowp_dmat3x4',['../a00720.html#ga8fc0e66da83599071b7ec17510686cd9',1,'glm']]], + ['packed_5flowp_5fdmat4',['packed_lowp_dmat4',['../a00720.html#ga03e1edf5666c40affe39aee35c87956f',1,'glm']]], + ['packed_5flowp_5fdmat4x2',['packed_lowp_dmat4x2',['../a00720.html#ga39658fb13369db869d363684bd8399c0',1,'glm']]], + ['packed_5flowp_5fdmat4x3',['packed_lowp_dmat4x3',['../a00720.html#ga30b0351eebc18c6056101359bdd3a359',1,'glm']]], + ['packed_5flowp_5fdmat4x4',['packed_lowp_dmat4x4',['../a00720.html#ga0294d4c45151425c86a11deee7693c0e',1,'glm']]], + ['packed_5flowp_5fdvec1',['packed_lowp_dvec1',['../a00720.html#ga054050e9d4e78d81db0e6d1573b1c624',1,'glm']]], + ['packed_5flowp_5fdvec2',['packed_lowp_dvec2',['../a00720.html#gadc19938ddb204bfcb4d9ef35b1e2bf93',1,'glm']]], + ['packed_5flowp_5fdvec3',['packed_lowp_dvec3',['../a00720.html#ga9189210cabd6651a5e14a4c46fb20598',1,'glm']]], + ['packed_5flowp_5fdvec4',['packed_lowp_dvec4',['../a00720.html#ga262dafd0c001c3a38d1cc91d024ca738',1,'glm']]], + ['packed_5flowp_5fivec1',['packed_lowp_ivec1',['../a00720.html#gaf22b77f1cf3e73b8b1dddfe7f959357c',1,'glm']]], + ['packed_5flowp_5fivec2',['packed_lowp_ivec2',['../a00720.html#ga52635859f5ef660ab999d22c11b7867f',1,'glm']]], + ['packed_5flowp_5fivec3',['packed_lowp_ivec3',['../a00720.html#ga98c9d122a959e9f3ce10a5623c310f5d',1,'glm']]], + ['packed_5flowp_5fivec4',['packed_lowp_ivec4',['../a00720.html#ga931731b8ae3b54c7ecc221509dae96bc',1,'glm']]], + ['packed_5flowp_5fmat2',['packed_lowp_mat2',['../a00720.html#ga70dcb9ef0b24e832772a7405efa9669a',1,'glm']]], + ['packed_5flowp_5fmat2x2',['packed_lowp_mat2x2',['../a00720.html#gac70667c7642ec8d50245e6e6936a3927',1,'glm']]], + ['packed_5flowp_5fmat2x3',['packed_lowp_mat2x3',['../a00720.html#ga3e7df5a11e1be27bc29a4c0d3956f234',1,'glm']]], + ['packed_5flowp_5fmat2x4',['packed_lowp_mat2x4',['../a00720.html#gaea9c555e669dc56c45d95dcc75d59bf3',1,'glm']]], + ['packed_5flowp_5fmat3',['packed_lowp_mat3',['../a00720.html#ga0d22400969dd223465b2900fecfb4f53',1,'glm']]], + ['packed_5flowp_5fmat3x2',['packed_lowp_mat3x2',['../a00720.html#ga128cd52649621861635fab746df91735',1,'glm']]], + ['packed_5flowp_5fmat3x3',['packed_lowp_mat3x3',['../a00720.html#ga5adf1802c5375a9dfb1729691bedd94e',1,'glm']]], + ['packed_5flowp_5fmat3x4',['packed_lowp_mat3x4',['../a00720.html#ga92247ca09fa03c4013ba364f3a0fca7f',1,'glm']]], + ['packed_5flowp_5fmat4',['packed_lowp_mat4',['../a00720.html#ga2a1dd2387725a335413d4c4fee8609c4',1,'glm']]], + ['packed_5flowp_5fmat4x2',['packed_lowp_mat4x2',['../a00720.html#ga8f22607dcd090cd280071ccc689f4079',1,'glm']]], + ['packed_5flowp_5fmat4x3',['packed_lowp_mat4x3',['../a00720.html#ga7661d759d6ad218e132e3d051e7b2c6c',1,'glm']]], + ['packed_5flowp_5fmat4x4',['packed_lowp_mat4x4',['../a00720.html#ga776f18d1a6e7d399f05d386167dc60f5',1,'glm']]], + ['packed_5flowp_5fuvec1',['packed_lowp_uvec1',['../a00720.html#gaf111fed760ecce16cb1988807569bee5',1,'glm']]], + ['packed_5flowp_5fuvec2',['packed_lowp_uvec2',['../a00720.html#ga958210fe245a75b058325d367c951132',1,'glm']]], + ['packed_5flowp_5fuvec3',['packed_lowp_uvec3',['../a00720.html#ga576a3f8372197a56a79dee1c8280f485',1,'glm']]], + ['packed_5flowp_5fuvec4',['packed_lowp_uvec4',['../a00720.html#gafdd97922b4a2a42cd0c99a13877ff4da',1,'glm']]], + ['packed_5flowp_5fvec1',['packed_lowp_vec1',['../a00720.html#ga0a6198fe64166a6a61084d43c71518a9',1,'glm']]], + ['packed_5flowp_5fvec2',['packed_lowp_vec2',['../a00720.html#gafbf1c2cce307c5594b165819ed83bf5d',1,'glm']]], + ['packed_5flowp_5fvec3',['packed_lowp_vec3',['../a00720.html#ga3a30c137c1f8cce478c28eab0427a570',1,'glm']]], + ['packed_5flowp_5fvec4',['packed_lowp_vec4',['../a00720.html#ga3cc94fb8de80bbd8a4aa7a5b206d304a',1,'glm']]], + ['packed_5fmat2',['packed_mat2',['../a00720.html#gadd019b43fcf42e1590d45dddaa504a1a',1,'glm']]], + ['packed_5fmat2x2',['packed_mat2x2',['../a00720.html#ga51eaadcdc292c8750f746a5dc3e6c517',1,'glm']]], + ['packed_5fmat2x3',['packed_mat2x3',['../a00720.html#ga301b76a89b8a9625501ca58815017f20',1,'glm']]], + ['packed_5fmat2x4',['packed_mat2x4',['../a00720.html#gac401da1dd9177ad81d7618a2a5541e23',1,'glm']]], + ['packed_5fmat3',['packed_mat3',['../a00720.html#ga9bc12b0ab7be8448836711b77cc7b83a',1,'glm']]], + ['packed_5fmat3x2',['packed_mat3x2',['../a00720.html#ga134f0d99fbd2459c13cd9ebd056509fa',1,'glm']]], + ['packed_5fmat3x3',['packed_mat3x3',['../a00720.html#ga6c1dbe8cde9fbb231284b01f8aeaaa99',1,'glm']]], + ['packed_5fmat3x4',['packed_mat3x4',['../a00720.html#gad63515526cccfe88ffa8fe5ed64f95f8',1,'glm']]], + ['packed_5fmat4',['packed_mat4',['../a00720.html#ga2c139854e5b04cf08a957dee3b510441',1,'glm']]], + ['packed_5fmat4x2',['packed_mat4x2',['../a00720.html#ga379c1153f1339bdeaefd592bebf538e8',1,'glm']]], + ['packed_5fmat4x3',['packed_mat4x3',['../a00720.html#gab286466e19f7399c8d25089da9400d43',1,'glm']]], + ['packed_5fmat4x4',['packed_mat4x4',['../a00720.html#ga67e7102557d6067bb6ac00d4ad0e1374',1,'glm']]], + ['packed_5fmediump_5fbvec1',['packed_mediump_bvec1',['../a00720.html#ga5546d828d63010a8f9cf81161ad0275a',1,'glm']]], + ['packed_5fmediump_5fbvec2',['packed_mediump_bvec2',['../a00720.html#gab4c6414a59539e66a242ad4cf4b476b4',1,'glm']]], + ['packed_5fmediump_5fbvec3',['packed_mediump_bvec3',['../a00720.html#ga70147763edff3fe96b03a0b98d6339a2',1,'glm']]], + ['packed_5fmediump_5fbvec4',['packed_mediump_bvec4',['../a00720.html#ga7b1620f259595b9da47a6374fc44588a',1,'glm']]], + ['packed_5fmediump_5fdmat2',['packed_mediump_dmat2',['../a00720.html#ga9d60e32d3fcb51f817046cd881fdbf57',1,'glm']]], + ['packed_5fmediump_5fdmat2x2',['packed_mediump_dmat2x2',['../a00720.html#ga39e8bb9b70e5694964e8266a21ba534e',1,'glm']]], + ['packed_5fmediump_5fdmat2x3',['packed_mediump_dmat2x3',['../a00720.html#ga8897c6d9adb4140b1c3b0a07b8f0a430',1,'glm']]], + ['packed_5fmediump_5fdmat2x4',['packed_mediump_dmat2x4',['../a00720.html#gaaa4126969c765e7faa2ebf6951c22ffb',1,'glm']]], + ['packed_5fmediump_5fdmat3',['packed_mediump_dmat3',['../a00720.html#gaf969eb879c76a5f4576e4a1e10095cf6',1,'glm']]], + ['packed_5fmediump_5fdmat3x2',['packed_mediump_dmat3x2',['../a00720.html#ga86efe91cdaa2864c828a5d6d46356c6a',1,'glm']]], + ['packed_5fmediump_5fdmat3x3',['packed_mediump_dmat3x3',['../a00720.html#gaf85877d38d8cfbc21d59d939afd72375',1,'glm']]], + ['packed_5fmediump_5fdmat3x4',['packed_mediump_dmat3x4',['../a00720.html#gad5dcaf93df267bc3029174e430e0907f',1,'glm']]], + ['packed_5fmediump_5fdmat4',['packed_mediump_dmat4',['../a00720.html#ga4b0ee7996651ddd04eaa0c4cdbb66332',1,'glm']]], + ['packed_5fmediump_5fdmat4x2',['packed_mediump_dmat4x2',['../a00720.html#ga9a15514a0631f700de6312b9d5db3a73',1,'glm']]], + ['packed_5fmediump_5fdmat4x3',['packed_mediump_dmat4x3',['../a00720.html#gab5b36cc9caee1bb1c5178fe191bf5713',1,'glm']]], + ['packed_5fmediump_5fdmat4x4',['packed_mediump_dmat4x4',['../a00720.html#ga21e86cf2f6c126bacf31b8985db06bd4',1,'glm']]], + ['packed_5fmediump_5fdvec1',['packed_mediump_dvec1',['../a00720.html#ga8920e90ea9c01d9c97e604a938ce2cbd',1,'glm']]], + ['packed_5fmediump_5fdvec2',['packed_mediump_dvec2',['../a00720.html#ga0c754a783b6fcf80374c013371c4dae9',1,'glm']]], + ['packed_5fmediump_5fdvec3',['packed_mediump_dvec3',['../a00720.html#ga1f18ada6f7cdd8c46db33ba987280fc4',1,'glm']]], + ['packed_5fmediump_5fdvec4',['packed_mediump_dvec4',['../a00720.html#ga568b850f1116b667043533cf77826968',1,'glm']]], + ['packed_5fmediump_5fivec1',['packed_mediump_ivec1',['../a00720.html#ga09507ef020a49517a7bcd50438f05056',1,'glm']]], + ['packed_5fmediump_5fivec2',['packed_mediump_ivec2',['../a00720.html#gaaa891048dddef4627df33809ec726219',1,'glm']]], + ['packed_5fmediump_5fivec3',['packed_mediump_ivec3',['../a00720.html#ga06f26d54dca30994eb1fdadb8e69f4a2',1,'glm']]], + ['packed_5fmediump_5fivec4',['packed_mediump_ivec4',['../a00720.html#ga70130dc8ed9c966ec2a221ce586d45d8',1,'glm']]], + ['packed_5fmediump_5fmat2',['packed_mediump_mat2',['../a00720.html#ga43cd36d430c5187bfdca34a23cb41581',1,'glm']]], + ['packed_5fmediump_5fmat2x2',['packed_mediump_mat2x2',['../a00720.html#ga2d2a73e662759e301c22b8931ff6a526',1,'glm']]], + ['packed_5fmediump_5fmat2x3',['packed_mediump_mat2x3',['../a00720.html#ga99049db01faf1e95ed9fb875a47dffe2',1,'glm']]], + ['packed_5fmediump_5fmat2x4',['packed_mediump_mat2x4',['../a00720.html#gad43a240533f388ce0504b495d9df3d52',1,'glm']]], + ['packed_5fmediump_5fmat3',['packed_mediump_mat3',['../a00720.html#ga13a75c6cbd0a411f694bc82486cd1e55',1,'glm']]], + ['packed_5fmediump_5fmat3x2',['packed_mediump_mat3x2',['../a00720.html#ga04cfaf1421284df3c24ea0985dab24e7',1,'glm']]], + ['packed_5fmediump_5fmat3x3',['packed_mediump_mat3x3',['../a00720.html#gaaa9cea174d342dd9650e3436823cab23',1,'glm']]], + ['packed_5fmediump_5fmat3x4',['packed_mediump_mat3x4',['../a00720.html#gabc93a9560593bd32e099c908531305f5',1,'glm']]], + ['packed_5fmediump_5fmat4',['packed_mediump_mat4',['../a00720.html#gae89d72ffc149147f61df701bbc8755bf',1,'glm']]], + ['packed_5fmediump_5fmat4x2',['packed_mediump_mat4x2',['../a00720.html#gaa458f9d9e0934bae3097e2a373b24707',1,'glm']]], + ['packed_5fmediump_5fmat4x3',['packed_mediump_mat4x3',['../a00720.html#ga02ca6255394aa778abaeb0f733c4d2b6',1,'glm']]], + ['packed_5fmediump_5fmat4x4',['packed_mediump_mat4x4',['../a00720.html#gaf304f64c06743c1571401504d3f50259',1,'glm']]], + ['packed_5fmediump_5fuvec1',['packed_mediump_uvec1',['../a00720.html#ga2c29fb42bab9a4f9b66bc60b2e514a34',1,'glm']]], + ['packed_5fmediump_5fuvec2',['packed_mediump_uvec2',['../a00720.html#gaa1f95690a78dc12e39da32943243aeef',1,'glm']]], + ['packed_5fmediump_5fuvec3',['packed_mediump_uvec3',['../a00720.html#ga1ea2bbdbcb0a69242f6d884663c1b0ab',1,'glm']]], + ['packed_5fmediump_5fuvec4',['packed_mediump_uvec4',['../a00720.html#ga63a73be86a4f07ea7a7499ab0bfebe45',1,'glm']]], + ['packed_5fmediump_5fvec1',['packed_mediump_vec1',['../a00720.html#ga71d63cead1e113fca0bcdaaa33aad050',1,'glm']]], + ['packed_5fmediump_5fvec2',['packed_mediump_vec2',['../a00720.html#ga6844c6f4691d1bf67673240850430948',1,'glm']]], + ['packed_5fmediump_5fvec3',['packed_mediump_vec3',['../a00720.html#gab0eb771b708c5b2205d9b14dd1434fd8',1,'glm']]], + ['packed_5fmediump_5fvec4',['packed_mediump_vec4',['../a00720.html#ga68c9bb24f387b312bae6a0a68e74d95e',1,'glm']]], + ['packed_5fuvec1',['packed_uvec1',['../a00720.html#ga5621493caac01bdd22ab6be4416b0314',1,'glm']]], + ['packed_5fuvec2',['packed_uvec2',['../a00720.html#gabcc33efb4d5e83b8fe4706360e75b932',1,'glm']]], + ['packed_5fuvec3',['packed_uvec3',['../a00720.html#gab96804e99e3a72a35740fec690c79617',1,'glm']]], + ['packed_5fuvec4',['packed_uvec4',['../a00720.html#ga8e5d92e84ebdbe2480cf96bc17d6e2f2',1,'glm']]], + ['packed_5fvec1',['packed_vec1',['../a00720.html#ga14741e3d9da9ae83765389927f837331',1,'glm']]], + ['packed_5fvec2',['packed_vec2',['../a00720.html#ga3254defa5a8f0ae4b02b45fedba84a66',1,'glm']]], + ['packed_5fvec3',['packed_vec3',['../a00720.html#gaccccd090e185450caa28b5b63ad4e8f0',1,'glm']]], + ['packed_5fvec4',['packed_vec4',['../a00720.html#ga37a0e0bf653169b581c5eea3d547fa5d',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/typedefs_9.html b/common/glm/doc/api/search/typedefs_9.html new file mode 100644 index 000000000..9c978f7ad --- /dev/null +++ b/common/glm/doc/api/search/typedefs_9.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/typedefs_9.js b/common/glm/doc/api/search/typedefs_9.js new file mode 100644 index 000000000..80a1658ca --- /dev/null +++ b/common/glm/doc/api/search/typedefs_9.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['quat',['quat',['../a00673.html#gab0b441adb4509bc58d2946c2239a8942',1,'glm']]], + ['qword',['qword',['../a00771.html#ga4021754ffb8e5ef14c75802b15657714',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/typedefs_a.html b/common/glm/doc/api/search/typedefs_a.html new file mode 100644 index 000000000..426df9054 --- /dev/null +++ b/common/glm/doc/api/search/typedefs_a.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/typedefs_a.js b/common/glm/doc/api/search/typedefs_a.js new file mode 100644 index 000000000..882958462 --- /dev/null +++ b/common/glm/doc/api/search/typedefs_a.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['sint',['sint',['../a00747.html#gada7e83fdfe943aba4f1d5bf80cb66f40',1,'glm']]], + ['size1',['size1',['../a00776.html#gaeb877ac8f9a3703961736c1c5072cf68',1,'glm']]], + ['size1_5ft',['size1_t',['../a00776.html#gaaf6accc57f5aa50447ba7310ce3f0d6f',1,'glm']]], + ['size2',['size2',['../a00776.html#ga1bfe8c4975ff282bce41be2bacd524fe',1,'glm']]], + ['size2_5ft',['size2_t',['../a00776.html#ga5976c25657d4e2b5f73f39364c3845d6',1,'glm']]], + ['size3',['size3',['../a00776.html#gae1c72956d0359b0db332c6c8774d3b04',1,'glm']]], + ['size3_5ft',['size3_t',['../a00776.html#gaf2654983c60d641fd3808e65a8dfad8d',1,'glm']]], + ['size4',['size4',['../a00776.html#ga3a19dde617beaf8ce3cfc2ac5064e9aa',1,'glm']]], + ['size4_5ft',['size4_t',['../a00776.html#gaa423efcea63675a2df26990dbcb58656',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/typedefs_b.html b/common/glm/doc/api/search/typedefs_b.html new file mode 100644 index 000000000..fe314a131 --- /dev/null +++ b/common/glm/doc/api/search/typedefs_b.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/typedefs_b.js b/common/glm/doc/api/search/typedefs_b.js new file mode 100644 index 000000000..8af1319d2 --- /dev/null +++ b/common/glm/doc/api/search/typedefs_b.js @@ -0,0 +1,47 @@ +var searchData= +[ + ['u16',['u16',['../a00721.html#gaa2d7acc0adb536fab71fe261232a40ff',1,'glm']]], + ['u16vec1',['u16vec1',['../a00721.html#ga08c05ba8ffb19f5d14ab584e1e9e9ee5',1,'glm::u16vec1()'],['../a00763.html#ga52cc069a92e126c3a8dcde93424d2ef0',1,'glm::gtx::u16vec1()']]], + ['u16vec2',['u16vec2',['../a00721.html#ga2a78447eb9d66a114b193f4a25899c16',1,'glm']]], + ['u16vec3',['u16vec3',['../a00721.html#ga1c522ca821c27b862fe51cf4024b064b',1,'glm']]], + ['u16vec4',['u16vec4',['../a00721.html#ga529496d75775fb656a07993ea9af2450',1,'glm']]], + ['u32',['u32',['../a00721.html#ga8165913e068444f7842302d40ba897b9',1,'glm']]], + ['u32vec1',['u32vec1',['../a00721.html#gae627372cfd5f20dd87db490387b71195',1,'glm::u32vec1()'],['../a00763.html#ga9bbc1e14aea65cba5e2dcfef6a67d9f3',1,'glm::gtx::u32vec1()']]], + ['u32vec2',['u32vec2',['../a00721.html#ga2a266e46ee218d0c680f12b35c500cc0',1,'glm']]], + ['u32vec3',['u32vec3',['../a00721.html#gae267358ff2a41d156d97f5762630235a',1,'glm']]], + ['u32vec4',['u32vec4',['../a00721.html#ga31cef34e4cd04840c54741ff2f7005f0',1,'glm']]], + ['u64',['u64',['../a00721.html#gaf3f312156984c365e9f65620354da70b',1,'glm']]], + ['u64vec1',['u64vec1',['../a00721.html#gaf09f3ca4b671a4a4f84505eb4cc865fd',1,'glm::u64vec1()'],['../a00763.html#ga818de170e2584ab037130f2881925974',1,'glm::gtx::u64vec1()']]], + ['u64vec2',['u64vec2',['../a00721.html#gaef3824ed4fe435a019c5b9dddf53fec5',1,'glm']]], + ['u64vec3',['u64vec3',['../a00721.html#ga489b89ba93d4f7b3934df78debc52276',1,'glm']]], + ['u64vec4',['u64vec4',['../a00721.html#ga3945dd6515d4498cb603e65ff867ab03',1,'glm']]], + ['u8',['u8',['../a00721.html#gaecc7082561fc9028b844b6cf3d305d36',1,'glm']]], + ['u8vec1',['u8vec1',['../a00721.html#ga29b349e037f0b24320b4548a143daee2',1,'glm::u8vec1()'],['../a00763.html#ga5853fe457f4c8a6bc09343d0e9833980',1,'glm::gtx::u8vec1()']]], + ['u8vec2',['u8vec2',['../a00721.html#ga518b8d948a6b4ddb72f84d5c3b7b6611',1,'glm']]], + ['u8vec3',['u8vec3',['../a00721.html#ga7c5706f6bbe5282e5598acf7e7b377e2',1,'glm']]], + ['u8vec4',['u8vec4',['../a00721.html#ga20779a61de2fd526a17f12fe53ec46b1',1,'glm']]], + ['uint16',['uint16',['../a00684.html#ga05f6b0ae8f6a6e135b0e290c25fe0e4e',1,'glm']]], + ['uint16_5ft',['uint16_t',['../a00721.html#ga91f91f411080c37730856ff5887f5bcf',1,'glm']]], + ['uint32',['uint32',['../a00684.html#ga1134b580f8da4de94ca6b1de4d37975e',1,'glm']]], + ['uint32_5ft',['uint32_t',['../a00721.html#ga2171d9dc1fefb1c82e2817f45b622eac',1,'glm']]], + ['uint64',['uint64',['../a00684.html#gab630f76c26b50298187f7889104d4b9c',1,'glm']]], + ['uint64_5ft',['uint64_t',['../a00721.html#ga3999d3e7ff22025c16ddb601e14dfdee',1,'glm']]], + ['uint8',['uint8',['../a00684.html#gadde6aaee8457bee49c2a92621fe22b79',1,'glm']]], + ['uint8_5ft',['uint8_t',['../a00721.html#ga28d97808322d3c92186e4a0c067d7e8e',1,'glm']]], + ['umat2',['umat2',['../a00712.html#ga4cae85566f900debf930c41944b64691',1,'glm']]], + ['umat2x2',['umat2x2',['../a00712.html#gabf8acdd33ce8951051edbca5200898aa',1,'glm']]], + ['umat2x3',['umat2x3',['../a00712.html#ga1870da7578d5022b973a83155d386ab3',1,'glm']]], + ['umat2x4',['umat2x4',['../a00712.html#ga57936a3998e992370e59a223e0ee4fd4',1,'glm']]], + ['umat3',['umat3',['../a00712.html#ga5085e3ff02abbac5e537eb7b89ab63b6',1,'glm']]], + ['umat3x2',['umat3x2',['../a00712.html#ga9cd7fa637a4a6788337f45231fad9e1a',1,'glm']]], + ['umat3x3',['umat3x3',['../a00712.html#ga1f2cfcf3357db0cdf31fcb15e3c6bafb',1,'glm']]], + ['umat3x4',['umat3x4',['../a00712.html#gae7c78ff3fc4309605ab0fa186c8d48ba',1,'glm']]], + ['umat4',['umat4',['../a00712.html#ga38bc7bb6494e344185df596deeb4544c',1,'glm']]], + ['umat4x2',['umat4x2',['../a00712.html#ga70fa2d05896aa83cbc8c07672a429b53',1,'glm']]], + ['umat4x3',['umat4x3',['../a00712.html#ga87581417945411f75cb31dd6ca1dba98',1,'glm']]], + ['umat4x4',['umat4x4',['../a00712.html#gaf72e6d399c42985db6872c50f53d7eb8',1,'glm']]], + ['uvec1',['uvec1',['../a00695.html#gac3bdd96183d23876c58a1424585fefe7',1,'glm']]], + ['uvec2',['uvec2',['../a00699.html#ga2f6d9ec3ae14813ade37d6aee3715fdb',1,'glm']]], + ['uvec3',['uvec3',['../a00699.html#ga3d3e55874babd4bf93baa7bbc83ae418',1,'glm']]], + ['uvec4',['uvec4',['../a00699.html#gaa57e96bb337867329d5f43bcc27c1095',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/typedefs_c.html b/common/glm/doc/api/search/typedefs_c.html new file mode 100644 index 000000000..3a6a4a76c --- /dev/null +++ b/common/glm/doc/api/search/typedefs_c.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/typedefs_c.js b/common/glm/doc/api/search/typedefs_c.js new file mode 100644 index 000000000..af5e8eb08 --- /dev/null +++ b/common/glm/doc/api/search/typedefs_c.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['vec1',['vec1',['../a00690.html#gadfc071d934d8dae7955a1d530a3cf656',1,'glm']]], + ['vec2',['vec2',['../a00699.html#gabe65c061834f61b4f7cb6037b19006a4',1,'glm']]], + ['vec3',['vec3',['../a00699.html#ga9c3019b13faf179e4ad3626ea66df334',1,'glm']]], + ['vec4',['vec4',['../a00699.html#gac215a35481a6597d1bf622a382e9d6e2',1,'glm']]] +]; diff --git a/common/glm/doc/api/search/typedefs_d.html b/common/glm/doc/api/search/typedefs_d.html new file mode 100644 index 000000000..8c3b81fde --- /dev/null +++ b/common/glm/doc/api/search/typedefs_d.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/common/glm/doc/api/search/typedefs_d.js b/common/glm/doc/api/search/typedefs_d.js new file mode 100644 index 000000000..03f6e83e9 --- /dev/null +++ b/common/glm/doc/api/search/typedefs_d.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['word',['word',['../a00771.html#ga16e9fea0ef1e6c4ef472d3d1731c49a5',1,'glm']]] +]; diff --git a/common/glm/doc/api/splitbar.png b/common/glm/doc/api/splitbar.png new file mode 100644 index 0000000000000000000000000000000000000000..d5bc78b2826eb4e32c5c7b00247aee6141b2a004 GIT binary patch literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^Yzz!63>-{AmhX=JfEakt5%>1oLf!@k0Tzd@zj_(1T>F?!+T=VO9&KmhYdpNbpg3vr z+%-EC_ddO|SvPX|ndHzG0VfVc4C2>Rt!^!Ot9PNXYbX5=(_gQIp#q{ye&u%Vi9ZDQ UeGhkH2Rebl)78&qol`;+0Eb>qmjD0& literal 0 HcmV?d00001 diff --git a/common/glm/doc/api/sync_off.png b/common/glm/doc/api/sync_off.png new file mode 100644 index 0000000000000000000000000000000000000000..9402c109d97fc70608ecf1b419628f8f64ee954c GIT binary patch literal 717 zcmV;;0y6!HP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02p*dSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;(#7eog=Y0zOGZK~zXfrPa+#RACebaK(Qi7dJ|CqxJe>kua3jNK)!d919Ya zx97~Ad++<+dm43I{9xw1&pBtl?wt~{twN5&9e4#FU=@DCJoLd`s0OJwM=U})bOH}k zd-x4KPz9k`p#ofk&maveWDRbDG0%7cEwByJfc<&^-b{V?RXFT$*DWv>9D%POg^RHX zC&635U#JvR)OlL2vq+U(cML%(4?hN(d{J{$Q6j!eV~+!MO}qh_0lbK6`P{Zn@q*Ss z5e;V)EsQE6QZ)L|Jk#}DaWbhHMb9runGRmiYZPPkiqapQ#{Di}t4oUdn}V4HFIeyj z!}k?se)vsnaYE7LGw61>*~zG)w%LUFHSO)jIRi3`42hj!IOntbE|Kxvx)Lh74@Lsvgc%nHAe0}VIG%V;X zT!hf9P$7U9J%L&H0({?Ehh<2>Q^ literal 0 HcmV?d00001 diff --git a/common/glm/doc/api/sync_on.png b/common/glm/doc/api/sync_on.png new file mode 100644 index 0000000000000000000000000000000000000000..85d975472a1815401af24942378f2f4942971804 GIT binary patch literal 712 zcmV;(0yq7MP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02p*dSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;(#7eog=Y0y#-UK~zXfrPa?%R8bTMaHW4C7cVSxqiF>a zI8&I6-AATD4I=tW#SONRt3%C}S z;~O+UF@O)$wNQ&3m9=oKtl37Pl80AACSMFVutUj&qKR9wm*`ZKe2nlq*)tkB;A)_# zMUE+&9alu8X#A$^$4=?q{IsIMR@vA3Ip9H{s3_i{DE&bX*e!sqEGT+(UakpwNe-B` zieuLmWme5*HaDf{#a+0U7gdxRwbx{`uCH>D1N76%hc-QIZz@OXDP}cn<^wi3fS*7V z>&`fNO!G7Hd*u-) zT#L)m1G%~W0LFh7t_}ZV0E#pH!wdLNehXZiOZf@KcV1v!_#6j*K7NC1SkQB50WnJy u0ywA--oR(z->nT;ge2U7++n(T6@LJKeZ8?m#aR#l0000VM%xNb!1@J z*w6hZkrl}2EbxddW?->OfygXeTLnOj;kDcXpaA074czwCumW0lN58E9lSY&%MY8lMl)7*S`x@4=* zuA-NAOP;&D>f?QVyy>Qro6ie_1>d({i}-a*OIxr`q>53-&2+KIj3XgHQyDy6{an^L HB{Ts5+#p5X literal 0 HcmV?d00001 diff --git a/common/glm/doc/api/tab_b.png b/common/glm/doc/api/tab_b.png new file mode 100644 index 0000000000000000000000000000000000000000..e14114dc75fef8984382122e778c4a0948dfcd6d GIT binary patch literal 253 zcmeAS@N?(olHy`uVBq!ia0vp^j6kfy!2~3aiye;!2^0spJ29*~C-V}>VM%xNb!1@J z*w6hZkrl}2EbxddW?->Of@;qG}LnOjg&sg&{1&FjfjI^Lb%~~M)X&Qgy136-oP4kRDkVa3`h3=FH%?p@ sv!0Uj&0VM%xNb!1@J z*w6hZkrl}2EbxddW?->Of3OrpLLnOkJe{9)0>EY#jWo`cK%NahZD7<6+bh}|k>%+_E*c8?^uDBV+ zc;u)<%#jb7!HkEOms&c^;XM-RFo*NtXWPab+#P!xZ?r$WyvRX;kLgi@0w3d}fHwcr viyAE29$sFhqTts!gV88IQswaSlVS{BcAggT5kfscyBR!P{an^LB{Ts5E4^4Y literal 0 HcmV?d00001 diff --git a/common/glm/doc/api/tab_s.png b/common/glm/doc/api/tab_s.png new file mode 100644 index 0000000000000000000000000000000000000000..8d36eef701f28f3037288ac442aa5c51ea79ed0d GIT binary patch literal 260 zcmeAS@N?(olHy`uVBq!ia0vp^j6kfy!2~3aiye;!2^0spJ29*~C-V}>VM%xNb!1@J z*w6hZkrl}2EbxddW?->OfNbP0l+XkKBJ5O) literal 0 HcmV?d00001 diff --git a/common/glm/doc/api/tabs.css b/common/glm/doc/api/tabs.css new file mode 100644 index 000000000..a28614b8e --- /dev/null +++ b/common/glm/doc/api/tabs.css @@ -0,0 +1 @@ +.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#doc-content{overflow:auto;display:block;padding:0;margin:0;-webkit-overflow-scrolling:touch}.sm-dox{background-image:url("tab_b.png")}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:"Lucida Grande","Geneva","Helvetica",Arial,sans-serif;font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:0 1px 1px rgba(255,255,255,0.9);color:#283a5d;outline:0}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace!important;text-align:center;text-shadow:none;background:rgba(255,255,255,0.5);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:rgba(162,162,162,0.1)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:white;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:url("tab_b.png");line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:#283a5d transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:url("tab_s.png");background-repeat:no-repeat;background-position:right;-moz-border-radius:0!important;-webkit-border-radius:0;border-radius:0!important}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a:hover span.sub-arrow{border-color:white transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent #fff transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:#fff;-moz-border-radius:5px!important;-webkit-border-radius:5px;border-radius:5px!important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent #555;border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:#555;background-image:none;border:0!important;color:#555;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent white}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:#fff;height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent #555 transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:#555 transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px!important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:url("tab_b.png")}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:#fff}} \ No newline at end of file diff --git a/common/glm/doc/man.doxy b/common/glm/doc/man.doxy new file mode 100644 index 000000000..52b91673c --- /dev/null +++ b/common/glm/doc/man.doxy @@ -0,0 +1,2415 @@ +# Doxyfile 1.8.10 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = "0.9.9 API documenation" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. + +PROJECT_LOGO = G:/Source/G-Truc/glm/doc/manual/logo-mini.png + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = . + +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = "The $name class " \ + "The $name widget " \ + "The $name file " \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = NO + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = "C:/Documents and Settings/Groove/ " + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = YES + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = YES + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# +# Note: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = NO + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = NO + +# This flag is only useful for Objective-C code. If set to YES, local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO, only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = YES + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = YES + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO, these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = YES + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = YES + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES, upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES, the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = YES + +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = NO + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = NO + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = YES + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = YES + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING +# Note: If this tag is empty the current directory is searched. + +INPUT = ../glm \ + . + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, +# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, +# *.vhdl, *.ucf, *.qsf, *.as and *.js. + +FILE_PATTERNS = *.hpp \ + *.doxy + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the +# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the +# cost of reduced performance. This can be particularly helpful with template +# rich C++ code for which doxygen's built-in parser lacks the necessary type +# information. +# Note: The availability of this option depends on whether or not doxygen was +# compiled with the --with-libclang option. +# The default value is: NO. + +CLANG_ASSISTED_PARSING = NO + +# If clang assisted parsing is enabled you can provide the compiler with command +# line options that you would normally use when invoking the compiler. Note that +# the include paths will already be set by doxygen for the files and directories +# specified with INPUT and INCLUDE_PATH. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. + +CLANG_OPTIONS = + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = NO + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the style sheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = NO + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler (hhc.exe). If non-empty, +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://www.mathjax.org/mathjax + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /